diff --git a/tools/FSharp_1.9.6.16/LICENSE-fsharp.txt b/tools/FSharp_1.9.6.16/LICENSE-fsharp.txt deleted file mode 100644 index 2f4fe052..00000000 --- a/tools/FSharp_1.9.6.16/LICENSE-fsharp.txt +++ /dev/null @@ -1,132 +0,0 @@ -Microsoft Research Shared Source License Agreement -(NON-STANDARD FOR F# Compiler) -<> - -_________________________________________________________ - -This Microsoft Research Shared Source license agreement ("MSR-SSLA") is a legal -agreement between you and Microsoft Corporation ("Microsoft" or "we") for the software -or data identified above, which may include source code, and any associated materials, -text or speech files, associated media and "online" or electronic documentation and any -updates or modifications Microsoft may choose to provide in its discretion (together, the -"Software"). - -By installing, copying, or otherwise using this Software, found at -http://www.microsoft.com/downloads, you agree to be bound by the terms of this -MSR-SSLA. If you do not agree, do not install copy or use the Software. The Software is -protected by copyright and other intellectual property laws and is licensed, not sold. - -SCOPE OF RIGHTS: -You may use, copy, reproduce, and distribute this Software for any non-commercial -purpose, subject to the restrictions in this MSR-SSLA. Some purposes which can be -non-commercial are teaching, academic research, public demonstrations and personal -experimentation. You may also distribute this Software with books or other teaching -materials, or publish the Software on websites, that are intended to teach the use of the -Software for academic or other non-commercial purposes. -You may not use or distribute this Software or any derivative works in any form for -commercial purposes, except as follows: -(i) you may use the unmodified binary form of the Software to compile your -commercial applications as long as you do not redistribute the Software in any -form for commercial purposes, and -(ii) notwithstanding (i) above, you may redistribute, including for commercial -purposes, copies of some or all of the Software runtime libraries called -FSHARP.CORE.DLL, FSHARP.POWERPACK.dll, FSHARP.POWERPACK.METADATA.dll and FSHARP.POWERPACK.LINQ.dll only, provided -that: (a) these runtime libraries are redistributed only in binary format as part of -your software application, (b) your software application adds significant -and primary functionality to the runtime libraries, (c) you do not use Microsoft's -name, logo, or trademarks to market your software application, except as -expressly authorized by Microsoft in a written agreement, (d) these portions of -your generated binaries are redistributed under the terms of this MSR-SSLA, -including without limitation, a conspicuous notice to all recipients of the -Disclaimers, Warnings and Limits on Liability and lack of support described in -Sections 7, 8 and 9 herein, and (e) you agree (as evidenced by your -redistribution) to indemnify, hold harmless, and defend Microsoft from and -against any claims or lawsuits, including attorneys' fees, that arise or result -from the use or distribution of your software application. -Examples of commercial purposes would be running business operations, licensing, -leasing, or selling the Software, distributing the Software for use with commercial -products, using the Software in the creation or use of commercial products or any other -activity which purpose is to procure a commercial gain to you or others. -If the Software includes source code or data, you may create derivative works of such -portions of the Software and distribute the modified Software for non-commercial -purposes only, as provided herein. - -In return, we simply require that you agree: -1. That you will not remove any copyright or other notices from the Software. -2. That if any of the Software is in binary format, you will not attempt to modify such -portions of the Software, or to reverse engineer or decompile them, except and -only to the extent authorized by applicable law. -3. That if you distribute the Software or any derivative works of the Software in -accordance with this Agreement, you will distribute them under a verbatim copy of -this license, and you will not grant other rights to the Software or derivative works -that are different from those provided by this MSR-SSLA. -4. That if you have created derivative works of the Software, and distribute such -derivative works, you will cause the modified files to carry prominent notices so -that recipients know that they are not receiving the original Software. Such notices -must state: (i) that you have changed the Software; and (ii) the date of any -changes. -5. That Microsoft is granted back, without any restrictions or limitations, a non- -exclusive, perpetual, irrevocable, royalty-free, assignable and sub-licensable -license, to reproduce, publicly perform or display, install, use, modify, distribute, -make and have made, sell and transfer your modifications to and/or derivative -works of the Software source code or data, for any purpose. . -6. That any feedback about the Software provided by you to us is voluntarily given, -and Microsoft shall be free to use the feedback as it sees fit without obligation or -restriction of any kind, even if the feedback is designated by you as confidential. -7. THAT THE SOFTWARE COMES "AS IS", WITH NO WARRANTIES. THIS -MEANS NO EXPRESS, IMPLIED OR STATUTORY WARRANTY, INCLUDING -WITHOUT LIMITATION, WARRANTIES OF MERCHANTABILITY OR FITNESS -FOR A PARTICULAR PURPOSE, ANY WARRANTY AGAINST INTERFERENCE -WITH YOUR ENJOYMENT OF THE SOFTWARE OR ANY WARRANTY OF -TITLE OR NON-INFRINGEMENT. THERE IS NO WARRANTY THAT THIS -SOFTWARE WILL FULFILL ANY OF YOUR PARTICULAR PURPOSES OR -NEEDS. THIS SOFTWARE SHOULD NOT BE USED IN ANY PRODUCT OR -SERVICE THAT MAY INVOLVE OR BE RELIED UPON FOR PUBLIC OR -INDIVIDUAL SAFETY, SECURITY, PRIVACY OR HEALTH. ALSO, YOU MUST -PASS THIS DISCLAIMER ON WHENEVER YOU DISTRIBUTE THE SOFTWARE -OR DERIVATIVE WORKS. -8. THAT NEITHER MICROSOFT NOR ANY CONTRIBUTOR TO THE SOFTWARE -WILL BE LIABLE FOR ANY DAMAGES RELATED TO THE SOFTWARE OR -THIS MSR-SSLA, INCLUDING DIRECT, INDIRECT, SPECIAL, -CONSEQUENTIAL OR INCIDENTAL DAMAGES, TO THE MAXIMUM EXTENT -THE LAW PERMITS, NO MATTER WHAT LEGAL THEORY IT IS BASED ON. -ALSO, YOU MUST PASS THIS LIMITATION OF LIABILITY ON WHENEVER YOU -DISTRIBUTE THE SOFTWARE OR DERIVATIVE WORKS. -9. That we have no duty of reasonable care or lack of negligence, and we are not -obligated to provide any technical support, updates or any other form of support -for the Software, but if any support or updates are provided (which shall be solely -in our discretion), they shall be deemed part of the Software and governed by this -Agreement. The provision of any Software technical support, updates or other -support shall in no way be deemed to create any further obligation of Microsoft to -provide additional support or updates in the future. -10. That if you breach this MSR-SSLA or if you sue anyone over patents that you think -may apply to or read on the Software or anyone's use of the Software, this MSR- -SSLA (and your license and rights obtained herein) terminate automatically. Upon -any such termination, you shall destroy all of your copies of the Software -immediately. Sections 5, 6, 7, 8, 9, 10, 13 and 14 of this MSR-SSLA shall survive -any termination of this MSR-SSLA. -11. That the patent rights, if any, granted to you in this MSR-SSLA only apply to the -Software, not to any derivative works you make. -12. That the Software may be subject to U.S. export jurisdiction at the time it is -licensed to you, and it may be subject to additional export or import laws in other -places. You agree to comply with all such laws and regulations that may apply to -the Software after delivery of the software to you. -13. That all rights not expressly granted to you in this MSR-SSLA are reserved. -14. That this MSR-SSLA shall be construed and controlled by the laws of the State of -Washington, USA, without regard to conflicts of law. If any provision of this MSR- -SSLA shall be deemed unenforceable or contrary to law, the rest of this MSR- -SSLA shall remain in full effect and interpreted in an enforceable manner that -most nearly captures the intent of the original language. - -Copyright (c) Microsoft Corporation. All rights reserved. - - - -Revised May 17, 2009 - diff --git a/tools/FSharp_1.9.6.16/README-fsharp.html b/tools/FSharp_1.9.6.16/README-fsharp.html deleted file mode 100644 index c1d10129..00000000 --- a/tools/FSharp_1.9.6.16/README-fsharp.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - -The F# May 2009 Community Technology Preview, 1.9.6.16 - - - - - - - - - - -

The F# May 2009 Community Technology Preview, 1.9.6.16

- -

Welcome to the F# May 2009 - Community Technology Preview (CTP). F# is a typesafe, scalable, succinct, typed, efficient - programming language for the .NET platform. This release represents an important step in - the evolution of the F# language as we progress it towards product quality. - The release contains:

- - -

Full details can be found - at the F# Developer Center or the F# website . - There you can find additional F# learning resources, links to the F# community and - more.  - You may be interested in - tracking Don Syme's F# blog - and/or blogging about your experiences with using F#. If you are getting started with F#, try the following sites:

- - - -

Table of Contents

- - -

Requirements

- - - - - - -

Providing Feedback

- -

- Your feedback is highly valuable to the F# team.  Please send any comments - to fsbugs@microsoft.com. Your positive - and negative feedback, as well as suggestions, comments, feature requests, and - bug reports are warmly welcomed.

-

- If you have questions for the F# user community, post them to one of the sites - listed in the Support section below.

- - - -

Support

- -

- This F# CTP is pre-release software and is not officially supported by Microsoft - product support.  If you have issues or questions that require support, you - can use one of the following resources:

- - -

Using F# with Mono

- -

-You may run F# programs in conjunction - with other CLI implementations such as Mono. -Please read the notes below. Some more information is -available at the F# Wiki. - -

- - - - -

Changes: F# CTP 2009 Release

- -

This release makes many improvements to the core experience provided with the last F# CTP, -with improved debugging support, performance and scalability improvements in the language, -libraries and Visual Studio, many minor language extensions, and a release of Visual Studio 2010 Beta1 with F# integrated. -

- -

The changes in this release are documented briefly below. More details are contained -in the blog announcements coinciding with this release.

-

-

Summary

- -

-

F# Language

-
#light is the default
-

-

- All F# source files now use the whitespace-aware #light - syntax by default. This may be - turned off with #light off at the top of a source file.

-

-

.NET ParamArray parameters (‘params’ in C#)

-

- F# can call methods with ParamArray parameters defined in - other .NET languages such as:

-
-        System.Console.WriteLine("a","b","c","d","e","f")
-        // Results in the following call:
-        //   System.Console.WriteLine("a", [|"b";"c";"d";"e";"f"|])
-        
-

- F# types can also expose ParamArray parameters themselves - using System.ParamArrayAttribute:

-
-        open System
-        type MyType() = 
-            member this.M([] args : string[]) = 
-                args |> Array.iter (printfn "%A")
-        
- -
Performance of Sequence Expressions
-

- Sequence expressions are now compiled to state machines, - instead of as a collection of API calls. This results in improved performance of F# code which works with seq. Many of the Seq.* library functions - also have improved performance as a result of this change.

-
Units of measure support for signed integral types
-

- Units of measure may now be applied to integral types such as int and int64, as - well as existing floating point types such as float and decimal.

-
-        [<Measure>]
-        type clicks
-
-        let x = 64<clicks> 
-

Also, a few bugs fixes to enable definitions of OO types annotated with measures to have the full - range of overloaded operators (e.g. Vector, Matrix etc.).

-
Support for custom numeric types (123X, 1.0R, etc.)
-

- It is now possible to bind numeric literals to custom numeric - types. Custom numeric literals, with - a numeric constant followed by a single letter, are treated as syntactic sugar - for API calls. -

-

- In particular, 123X is now syntactic sugar for

-
-        NumericLiteralX.FromInt32(123)
-

Likewise

-
-        NumericLiteralX.FromZero()
-        NumericLiteralX.FromOne()
-        NumericLiteralX.FromInt32(6)
-        NumericLiteralX.FromInt64(…)
-        NumericLiteralX.FromString(…)
-    
-

Depending on the input constant.

-
"?" operator enables definition of - dynamic member lookup
-

The ? and ?<- operators now treat their right-hand argument as a parse-time - symbol, and pass this symbol to the operator definition as a string argument. This enables the definition of - dynamic lookup as a library implementation of the ? operator. -

-
-        open System.Reflection
-        
-        let (?) (x: 'a) (prop: string) : 'b =
-            // A simplified '?' operator for dynamic property
-            // lookup using reflection
-            let pi = typeof<'a>.GetProperty(prop)
-            pi.GetValue(x, [||]) :?> 'b
-
-        let statically        = "hello".Length
-        let dynamically : int = "hello"?Length
-    
- - -

F# Compiler

-
Compiler command line option normalization
-

- - The command line options for the F# compiler have been further aligned with - standard .NET compiler practice. Here are a few notable changes:

- -

To see the full list of compiler options, use fsc.exe -?

-

F# Core Libraries

-
FSharp.Core.dll API naming standardization resulting in a handful of API changes
-

The camelCase naming scheme has been adopted in place of - under_scores in the compositional functional programming modules. -

-

A few other functions have been renamed to align better with - this naming convention.

-
BigInteger/BigRational
-

F# BigInteger has been aligned with the new .NET4.0 BigInteger type. On .NET 2.0, a matching BigInteger - implementation is included in FSharp.Core.dll.

-

- The BigRational type has been moved into the F# PowerPack.

-
Structured Formatting Customization
-

Two tools for customizing structured formatting of values with - %A or in the F# Interactive have been added to this release.

- -

- This attribute is used to mark how a type is displayed by - default when using %A printf formatting patterns and other two-dimensional - text-based display layouts. In version 1 of F# the only valid values will be of - the form PreText {PropertyName} PostText. The property name indicates a - property to evaluate and to display instead of the object itself. -

-

As a library developer: -

-

As a library developer: -

-
[.Net 4.0] F# uses new .NET4.0 Lazy and Tuple types
-

F# compiled for .NET4.0 uses the new System.Tuple and System.Lazy types in place - of F#-specific types.

-
[.Net 4.0] Converting between F# Async - and .NET4.0 Tasks
-

F# Async workflows can be used to compose together .NET4.0 Tasks, using the - Task<'T>.AsyncValue and Async.StartAsTask functions.

-
-        async { // Await the value from some future we've been given
-                // This is effectively "ContinueWith"
-                let! v1 = someFuture.AsyncValue 
-                ... }
-
-        async { // Set a sub-async program running as a future
-                let! subtask = Async.StartChildAsTask ( async { ... } )
-                // Await the value from the future (don't block the thread!)
-                // This is effectively "ContinueWith"
-                let! v1 = subtask.AsyncValue 
-                ... }
-
-        let mytask = async { ... } |> Async.StartAsTask 
-
[.Net 4.0] Array.Parallel
-

Data parallel versions of some of the common Array operations are available in - the Array.Parallel module. These can - be used to quickly parallelize key loops in F# code. The performance profile of these - operations is derived from the System.Threading.Parallel.For API in .NET4.0.

-
-        let random = new System.Random()
-        let numPoints = 10000000
-        let points = Array.init numPoints (fun _ -> random.NextDouble(), random.NextDouble())
-        let numInCircle = 
-            points
-            |> Array.Parallel.choose (fun (x,y) ->
-                 if x*x + y*y <= 1.0 then Some (x,y) else None)
-            |> Array.length
-        let pi = 4.0 * float numInCircle / float numPoints 
-

F# PowerPack

-
Additional Async utility functions
-

The following Async utility functions have been added to the PowerPack: -

- -
FSharp.PowerPack.Metadata.dll
-

The API in this assembly - provides access to the F#-specific metadata. This can be used to get information about F# notions such as type - abbreviations, units of measure, and currying or parameters.

-
-        #r "FSharp.PowerPack.Metadata.dll"
-        open FSharp.PowerPack.Metadata
-
-        let assm = FSharpAssembly.FromFile(@"FSharp.Core.dll")
-        let entities = assm.Entities
-        let allAbbreviations = 
-            [ for e in entities do
-                if e.IsAbbreviation 
-                then yield e.Name ]
- - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.Build.dll b/tools/FSharp_1.9.6.16/bin/FSharp.Build.dll deleted file mode 100644 index c0d2908e..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.Build.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.CodeDom.dll b/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.CodeDom.dll deleted file mode 100644 index 7851c1d3..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.CodeDom.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.CodeDom.xml b/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.CodeDom.xml deleted file mode 100644 index 93ee6ac8..00000000 --- a/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.CodeDom.xml +++ /dev/null @@ -1,679 +0,0 @@ - - -FSharp.Compiler.CodeDom - - - - The total number of elements in the set - - - - - Remove the given element from the set - - - - - Apply the given function to each binding in the hash table - - - - - Apply the given function to the set threading the accumulating parameter - through the sequence of function applications - - - - - Create a new empty mutable hash set - with key hash/equality based on the F# structural "hash" and (=) functions - - - - - Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with key hash/equality based on the F# structural "hash" and (=) functions - - - - - Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with the given key hash/equality functions - - - - - Create a new mutable hash set containing elements drawn from the given sequence - - - - - Make a shallow copy of the set - - - - - Test if the set contains the given element - - - - - Clear all elements from the set - - - - - Add an element to the collection - - - - - Create a new empty mutable hash set - with key hash/equality based on the F# structural "hash" and (=) functions - - - - - Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with key hash/equality based on the F# structural "hash" and (=) functions - - - - - Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with the given key hash/equality functions - - - - - Create a new mutable hash set containing elements drawn from the given sequence - - - - - Mutable hash sets based by default on F# structural "hash" and (=) functions. Implemented via a hash table and/or Dictionary. - - - - - The default location of FSharp.Core.dll and fsc.exe based on the version of fsc.exe that is running - - - - - - - - - - - - - - - - - Implementation of the CodeDomProvider for the F# language. - This is specialized version that can be used with ASP.NET. - - - - - - - - Implementation of the CodeDomProvider for the F# language. - If you intend to use CodeDom with ASP.NET you should use FSharpAspNetCodeProvider instead. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Where are we generating member? - - - - - - - - Generates code for binary operator using function for left and right operand - - - - - Process collection - keeps context through the whole processing - calls 'f' for every element in sequence and 'fs' between every two elements - as a separator - - - - - - - - Call specified function only on elements of specified type. - (performs dynamic type test using x.GetType()) - - - - - Process collection - keeps context through the whole processing - calls 'f' for every element in sequence and 'fs' between every two elements - as a separator. This is a variant that works on typed collections. - - - - - Returns F# conversion function for the specified type (or empty string) - - - - - - - - Create context using specified text writer and options - - - - - Create closure to do the counting - (this is usend when we need indexing during collection processing) - - - - - - - - Call function, but give it context as an argument - - - - - - - - - - - - - - - - - Generate array initializer. Checks generator options for ASP.NET workaround. - - - - - - - - Generates expression which is casted to the inferred type using "(unbox (box e))" - this is useful if the environment where it is used specifies the type explicitly - for example in array initializers - - - - - - - - - - - Generates method code, adds OverloadID attribute when index isn't "-1" - Generates comments and than calls 'generatMethod' - - - - - - - - - - - - - - - - - Generate code for compile unit (file) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generate expression - with unkonw type - - - - - Generates expression, but generates "this" if the expression is null - (used in field reference etc. because some CodeDOM generators do this - though I believe it is a mistake) - - - - - - - - fields - - - - - - - - - - - - - - Abstract method in the interface - - - - - Abstract property in the interface - - - - - - - - Generates a main method. - - - - - By default all CodeDOM generated methods are 'virtual' which means that - we have to generate "abstract and default" (unless we're in struct or - we're implementing an interface, or the method is overriden) - (NOTE: the same logic isn't properly implemented for properties) - - - - - Generate code for namespace without compilation unit - - - - - Generates namespace code - takes output from 'preprocessNamespace' - - - - - - - - Generate value of primitive expression - - - - - - - - - - - - - - Generate type arguments using context - - - - - - - - Generate code for type declaration (not included in namespace) - - - - - Generate type reference using context - (this is most commonly used method) - - - - - Get type reference, but don't rename .NET types to F# types - (this is only needed when calling static methods on the type) - - - - - - - - Generates type reference (not for arrays) - - - - - Generate type reference with empty context - - - - - - - - - - - Get full type reference using information from context - - - - - Get full type reference string using empty context - - - - - Identity function - - - - - - - - - - - Are both types numerical types where numeric conversion function can be applied? - - - - - - - - - - - - - - Perform map and filter operations in one - - - - - Output string as a valid F# identifier - - - - - Append specified string without line-break - - - - - Function composition operator - - - - - Break-line and append specified string - - - - - Returns CodeNamespace, list of classes with scope (which includes class names - of containing classes and sequence of class renames) - - - - - Preprocess collection with type parameters - Returns array to be used with usingTyParams and - function to be called to generate < ... > code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Print object converted to string - - - - - Tries to resolve type of a variable and adds it to the Context dictionary - - - - - Tries to resolve type of an expression using a few tricks: - * Fields of current type may have known type - * Properties of current type as well - * We can also try to resolve other properties (sometimes it helps) - * Resolve type for local variables or argument reference - - - - - Get System.Type of know type (either standard type or resolved) - - - - - Tries to resolve if type is an array, so we can generate - appropriate code (it can be either indexer or array, but we need to generate - .Item call for indexers (no overloading is supported by .[]). - Returns: "None" - can't resolve, "Some" resovled (true/false - is it an array?) - - - - - Print unique id using: "+> uniqid" - - - - - Record specified type parameters in the context, call generating function - and then restore the original type parameters - (this works if someone uses nested type parameters with the same name) - - - - - Matches array or indexer expression and corrects it if the generated CodeDOM is incorrect - - - - - Tries to find .NET type for specified type name - This is used when we need to know type in order to generate something correctly, - but it's just a fallback case - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Walks through the CodeDom tree and keeps current "scope" and the result. - The result is collected through entire tree, but the modified scope is - passed only to sub-nodes of the current node. - - First argument is a function that is called for nodes and has a - function as a first argument, scope and result as a second and current node as a third. - The function argument can be used to walk deeper in the tree if wanted. - - - - - - - - Search for members and return flat list of selected members - Function given as an argument returns tuple - first item specifies - if the current element should be included in the result, the second - specifies if we should walk through child members of the current object - - - - - - - - - - - - - diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.Interactive.Settings.dll b/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.Interactive.Settings.dll deleted file mode 100644 index abce86fa..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.Interactive.Settings.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.Server.Shared.dll b/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.Server.Shared.dll deleted file mode 100644 index 21b8c20a..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.Server.Shared.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.dll b/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.dll deleted file mode 100644 index 7abe6923..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.Compiler.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.Core.dll b/tools/FSharp_1.9.6.16/bin/FSharp.Core.dll deleted file mode 100644 index 56f1b6cd..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.Core.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.Core.pdb b/tools/FSharp_1.9.6.16/bin/FSharp.Core.pdb deleted file mode 100644 index 5dac0d2e..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.Core.pdb and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.Core.xml b/tools/FSharp_1.9.6.16/bin/FSharp.Core.xml deleted file mode 100644 index 376bd4cc..00000000 --- a/tools/FSharp_1.9.6.16/bin/FSharp.Core.xml +++ /dev/null @@ -1,8099 +0,0 @@ - - -FSharp.Core - - - - Gets the tail of the list, which is a list containing all the elements of the list, excluding the first element - - - - - Gets the number of items contained in the list - - - - - Get the element of the list at the given position. Note lists are represented - as linked lists so this is an O(n) operation. - - - - - Gets a value indicating if the list contains no entries - - - - - Gets the first element of the list - - - - - Returns an empty list of a particular type - - - - - Returns a list with head as its first element and tail as its subsequent elements - - - - - The type of immutable singly-linked lists. - - Use the constructors [] and :: (infix) to create values of this type, or - the notation [1;2;3]. Use the values in the List module to manipulate - values of this type, or pattern match against the values directly. - - - - - An abbreviation for the type of immutable singly-linked lists. - - - - - Lookup an element in the map. Raise KeyNotFoundException if no binding - exists in the map. - - - - - Return true if there are no bindings in the map. - - - - - The empty map - - - - - The number of bindings in the map - - - - - Lookup an element in the map, returning a Some value if the element is in the domain - of the map and None if not. - - - - - Remove an element from the domain of the map. No exception is raised if the element is not present. - - - - - - - - Test if an element is in the domain of the map - - - - - Return a new map with the binding added to the given map. - - - - - Build a map that contains the bindings of the given IEnumerable - - - - - Immutable maps. Keys are ordered by F# generic comparison. - - - Maps based on generic comparison are efficient for small keys. They are not a suitable choice if keys are recursive data structures - or if keys require bespoke comparison semantics. - - - - - - An abbreviation for the .NET type System.Collections.Generic.List<_> - - - - - Return a new set with the elements of the second set removed from the first. - - - - - Compute the union of the two sets. - - - - - Returns the lowest element in the set according to the ordering being used for the set - - - - - Returns the highest element in the set according to the ordering being used for the set - - - - - A useful shortcut for Set.isEmpty. See the Set module for further operations on sets. - - - - - The empty set for the type 'T. - - - - - The number of elements in the set - - - - - Return a new set with the elements of the second set removed from the first. - - - - - A useful shortcut for Set.remove. Note this operation produces a new set - and does not mutate the original set. The new set will share many storage - nodes with the original. See the Set module for further operations on sets. - - - - - Evaluates to "true" if all elements of the first set are in the second - - - - - Evaluates to "true" if all elements of the second set are in the first - - - - - Returns the greatest element in the set that is less than the given key - according to the ordering being used for the set - - - - - Returns the least element in the set that is greater than the given key - according to the ordering being used for the set - - - - - - - - A useful shortcut for Set.contains. See the Set module for further operations on sets. - - - - - A useful shortcut for Set.add. Note this operation produces a new set - and does not mutate the original set. The new set will share many storage - nodes with the original. See the Set module for further operations on sets. - - - - - Create a set containing elements drawn from the given sequence. - - - - - Immutable sets based on binary trees, where comparison is the - F# structural comparison function, potentially using implementations - of the IComparable interface on key values. - - See the Set module for further operations on sets. - - These sets can be used with elements of any type, but you should check that - structural hashing and equality on the element type are correct for your type. - - - - - An abbreviation for the type of immutable singly-linked lists. - - Use the constructors [] and :: (infix) to create values of this type, or - the notation [1;2;3]. Use the values in the List module to manipulate - values of this type, or pattern match against the values directly. - - - - - An abbreviation for the .NET type System.Collections.Generic.IEnumerable<_> - - - - - Fetch the base-index for the first dimension of the array. - - See notes on the Array2D module re. zero-basing. - - - - - Fetch the base-index for the second dimension of the array. - - See notes on the Array2D module re. zero-basing. - - - - - Read a range of elements from the first array and write them into the second. - - - - - Build a new array whose elements are the same as the input array. - - For non-zero-based arrays the basing on an input array will be propogated to the output - array. - - - - - Create an array whose elements are all initially the given value - - - - - Create a based array whose elements are all initially the given value - - - - - - - - Fetch an element from a 2D array. You can also use the syntax 'array.[index1,index2]' - - - - - Create an array given the dimensions and a generator function to compute the elements. - - - - - Create a based array given the dimensions and a generator function to compute the elements. - - - - - - - - Apply the given function to each element of the array. - - - - - Apply the given function to each element of the array. The integer indicies passed to the - function indicates the index of element. - - - - - Return the length of an array in the first dimension - - - - - Return the length of an array in the second dimension - - - - - Build a new array whose elements are the results of applying the given function - to each of the elements of the array. - - For non-zero-based arrays the basing on an input array will be propogated to the output - array. - - - - - Build a new array whose elements are the results of applying the given function - to each of the elements of the array. The integer indices passed to the - function indicates the element being transformed. - - For non-zero-based arrays the basing on an input array will be propogated to the output - array. - - - - - Build a new array whose elements are the same as the input array but - where a non-zero-based input array generates a corresponding zero-based - output array. - - - - - Set the value of an element in an array. You can also use the syntax 'array.[index1,index2] <- value' - - - - - - - - Create an array where the entries are initially Unchecked.defaultof<'T>. - - - - - Create a based array where the entries are initially Unchecked.defaultof<'T>. - - - - - - - - - - - Basic operations on 2-dimensional arrays. - - F# and .NET multi-dimensional arrays are typically zero-based. - However, .NET multi-dimensional arrays used in conjunction with external - libraries (e.g. libraries associated with Visual Basic) be - non-zero based, using a potentially different base for each dimension. - The operations in this module will accept such arrays, and - the basing on an input array will be propogated to a matching output - array on the Array2D.map and Array2D.mapi operations. - Non-zero-based arrays can also be created using Array2D.zero_create_based, - Array2D.create_based and Array2D.init_based. - - - - - Create an array whose elements are all initially the given value - - - - - Fetch an element from a 3D array. You can also use the syntax 'array.[index1,index2,index3]' - - - - - Create an array given the dimensions and a generator function to compute the elements. - - - - - Apply the given function to each element of the array. - - - - - Apply the given function to each element of the array. The integer indicies passed to the - function indicates the index of element. - - - - - Return the length of an array in the first dimension - - - - - Return the length of an array in the second dimension - - - - - Return the length of an array in the third dimension - - - - - Build a new array whose elements are the results of applying the given function - to each of the elements of the array. - - For non-zero-based arrays the basing on an input array will be propogated to the output - array. - - - - - Build a new array whose elements are the results of applying the given function - to each of the elements of the array. The integer indices passed to the - function indicates the element being transformed. - - For non-zero-based arrays the basing on an input array will be propogated to the output - array. - - - - - Set the value of an element in an array. You can also - use the syntax 'array.[index1,index2,index3] <- value'. - - - - - Create an array where the entries are initially the "default" value. - - - - - - - - Basic operations on rank 3 arrays. - - - - - Create an array whose elements are all initially the given value - - - - - Fetch an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' - - - - - Create an array given the dimensions and a generator function to compute the elements. - - - - - Return the length of an array in the first dimension - - - - - Return the length of an array in the second dimension - - - - - Return the length of an array in the third dimension - - - - - Return the length of an array in the fourth dimension - - - - - Set the value of an element in an array. You can also - use the syntax 'array.[index1,index2,index3,index4] <- value'. - - - - - Create an array where the entries are initially the "default" value. - - - - - Basic operations on rank 4 arrays. - - - - - Build a new array that contains the elements of the first array followed by the elements of the second array - - - - - Return the average of the elements in the array. If the array is empty an ArgumentException is thrown. - - - - - Return the average of the elements generated by applying the function to each element of the array. - If the array is empty an ArgumentException is thrown. - - - - - - - - Read a range of elements from the first array and write them into the second. - - - - - 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) - - - - - For each element of the array, apply the given function. Concatenate all the results and return the combined array. - - - - - - - - Build a new array that contains the elements of each of the given sequence of arrays - - - - - Build a new array that contains the elements of the given array - - - - - Create an array whose elements are all initially the given value. - - - - - Return an empty array of the given type - - - - - Test if any element of the array satisfies the given predicate. - - The predicate is applied to the elements of the input array. If any application - returns true then the overall result is true and no further elements are tested. - Otherwise, false is returned. - - - - - Test if any pair of corresponding elements of the arrays satisfies the given predicate. - - The predicate is applied to matching elements in the two collections up to the lesser of the - two lengths of the collections. If any application returns true then the overall result is - true and no further elements are tested. Otherwise, if one collections is longer - than the other then the ArgumentException exception is raised. - Otherwise, false is returned. - - - - - Fill a range of elements of the array with the given value. - - - - - Return a new collection containing only the elements of the collection - for which the given predicate returns "true" - - - - - Return the first element for which the given function returns 'true'. - Raise KeyNotFoundException if no such element exists. - - - - - Return the index of the first element in the array - that satisfies the given predicate. Raise KeyNotFoundException if - none of the elements satisy the predicate. - - - - - - - - - - - - - - Apply 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 - - - - - Apply 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. - - - - - Apply 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)) - - - - - 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. - - - - - - - - Apply 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. - - - - - Apply 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)) - - - - - - - - - - - - - - Test if all elements of the array satisfy the given predicate. - - The predicate is applied to the elements of the input collection. If any application - returns false then the overall result is false and no further elements are tested. - Otherwise, true is returned. - - - - - Test if all corresponding elements of the array satisfy the given predicate pairwise. - - The predicate is applied to matching elements in the two collections up to the lesser of the - two lengths of the collections. If any application returns false then the overall result is - false and no further elements are tested. Otherwise, if one collection is longer - than the other then the ArgumentException exception is raised. - Otherwise, true is returned. - - - - - Get an element from an array - - - - - Create an array given the dimension and a generator function to compute the elements. - - - - - Return true if the given array is empty, otherwise false - - - - - - - - Apply the given function to each element of the array. - - - - - Apply 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. - - - - - Apply the given function to each element of the array. The integer passed to the - function indicates the index of element. - - - - - Apply 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. - - - - - Return the length of an array. You can also use property arr.Length. - - - - - - - - Build a new array whose elements are the results of applying the given function - to each of the elements of the array. - - - - - Build 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. - - - - - 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. - - - - - Build 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. - - - - - Return the greatest of all elements of the array, compared via Operators.max on the function result - - - - - Return the greatest of all elements of the array, compared via Operators.max on the function result - - - - - - - - Return the lowest of all elements of the array, compared via Operators.min - - - - - Return the lowest of all elements of the array, compared via Operators.min on the function result - - - - - - - - Build an array from the given list - - - - - Build a new array from the given enumerable object - - - - - Split the collection into two collections, containing the - elements for which the given predicate returns "true" and "false" - respectively - - - - - Returns an array with all elements permuted according to the - specified permutation - - - - - Apply 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. - - - - - Apply 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. - - - - - Apply 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. - - - - - - - - - - - Return a new array with the elements in reverse order - - - - - Like fold_left, but return the intermediary and final results - - - - - Like fold_right, but return both the intermediary and final results - - - - - - - - - - - Set an element of an array - - - - - Sort the elements of an array, returning a new array. Elements are compared using Operators.compare. - - - - - Sort the elements of an array, using the given projection for the keys and returning a new array. Elements are compared using Operators.compare. - - - - - Sort the elements of an array by mutating the array in-place, using the given comparison function. Elements are compared using Operators.compare. - - - - - Sort the elements of an array by mutating the array in-place, using the given projection for the keys. Elements are compared using Operators.compare. - - - - - Sort the elements of an array by mutating the array in-place, using the given comparison function as the order - - - - - Sort the elements of an array, using the given comparison function as the order, returning a new array - - - - - Sort the elements of an array, using the given projection for the keys. Elements are compared using Operators.compare. - - - - - - - - Build a new array that contains the given subrange specified by - starting index and length. - - - - - Return the sum of the elements in the array - - - - - Return the sum of the results generated by applying the function to each element of the array. - - - - - - - - Build a list from the given array - - - - - View the given array as a sequence - - - - - Return the first element for which the given function returns true. - Return None if no such element exists. - - - - - Return the index of the first element in the array - that satisfies the given predicate. - - - - - Apply 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. - - - - - - - - - - - - - - Split an array of pairs into two arrays - - - - - Split an array of triples into three arrays - - - - - Create an array where the entries are initially the default value Unchecked.defaultof<'T>. - - - - - Create an array where the entries are initially the default value Unchecked.defaultof<'T>. - - - - - Combine the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is - raised. - - - - - Combine three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException is - raised. - - - - - Basic operations on arrays - - - - - Compare using the given comparer function - - - - - Convert an existing IComparer object into a comparison function with a fast entry point - If comparer was originally built using ComparisonIdentity.FromFunction then the original function will be - returned - - - - - Convert an existing IComparer object into a comparison function with a fast entry point - - - - - Structural comparison. Compare using Operators.compare. - - - - - Common notions of comparison identity used with sorted data structures. - - - - - Hash using the given hashing and equality functions - - - - - - - - Physical hashing (hash on reference identity of objects, and the contents of value types). - Hash using LanguagePrimitives.PhysicalEquality and LanguagePrimitives.PhysicalHash, - That is, for value types use GetHashCode and Object.Equals (if no other optimization available), - and for reference types use System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode and - reference equality. - - - - - Structural hashing. Hash using Operators.(=) and Operators.hash. - - - - - Common notions of value identity used with hash tables. - - - - - Return a new list that contains the elements of the first list - followed by elements of the second - - - - - Return the average of the elements in the list. - If the list is empty an ArgumentException is thrown. - - - - - Return the average of the elements generated by applying the function to each element of the list. - If the list is empty an ArgumentException is thrown. - - - - - - - - Apply the given function to each element of the list. Return - the list comprised of the results x for each element where - the function returns Some(x) - - - - - For each element of the list, apply the given function. Concatenate all the results and return the combined list. - - - - - - - - Return a new list that contains the elements of each the lists in order - - - - - Return an empty list of the given type - - - - - Test if any element of the list satisfies the given predicate. - - The predicate is applied to the elements of the input list. If any application - returns true then the overall result is true and no further elements are tested. - Otherwise, false is returned. - - - - - Test if any pair of corresponding elements of the lists satisfies the given predicate. - - The predicate is applied to matching elements in the two collections up to the lesser of the - two lengths of the collections. If any application returns true then the overall result is - true and no further elements are tested. Otherwise, if one collections is longer - than the other then the ArgumentException exception is raised. - Otherwise, false is returned. - - - - - Return a new collection containing only the elements of the collection - for which the given predicate returns "true" - - - - - Return the first element for which the given function returns true. - Raise KeyNotFoundException if no such element exists. - - - - - Return the index of the first element in the list - that satisfies the given predicate. - Raise KeyNotFoundException if no such element exists. - - - - - - - - - - - - - - - - - Apply a function to each element of the collection, threading an accumulator argument - through the computation. Take the second argument, and apply the function to it - and the first element of the list. Then feed this result into the function along - with the second element and so on. Return the final result. - If the input function is f and the elements are i0...iN then - computes f (... (f s i0) i1 ...) iN - - - - - Apply a function to corresponding elements of two collections, threading an accumulator argument - through the computation. The collections must have identical sizes. - If the input function is f and the elements are i0...iN and j0...jN - then computes f (... (f s i0 j0)...) iN jN. - - - - - Apply 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 i0 (...(f iN s)). - - - - - Apply a function to corresponding elements of two collections, threading an accumulator argument - through the computation. The collections must have identical sizes. - If the input function is f and the elements are i0...iN and j0...jN - then computes f i0 j0 (...(f iN jN s)). - - - - - - - - - - - - - - - - - - - - - - - Test if all elements of the collection satisfy the given predicate. - - The predicate is applied to the elements of the input list. If any application - returns false then the overall result is false and no further elements are tested. - Otherwise, true is returned. - - - - - Test if all corresponding elements of the collection satisfy the given predicate pairwise. - - The predicate is applied to matching elements in the two collections up to the lesser of the - two lengths of the collections. If any application returns false then the overall result is - false and no further elements are tested. Otherwise, if one collection is longer - than the other then the ArgumentException exception is raised. - Otherwise, true is returned. - - - - - Return the first element of the list. Raise (Invalid_argument "hd") if undefined. - - - - - Create a list by calling the given generator on each index - - - - - Return true if the list contains no elements, false otherwise - - - - - - - - Apply the given function to each element of the collection. - - - - - Apply the given function to two collections simultaneously. The - collections must have identical size. - - - - - Apply the given function to each element of the collection. The integer passed to the - function indicates the index of element. - - - - - Apply the given function to two collections simultaneously. The - collections must have identical size. The integer passed to the - function indicates the index of element. - - - - - Return the length of the list - - - - - Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. - - - - - Build a new collection whose elements are the results of applying the given function - to the corresponding elements of the two collections pairwise. - - - - - Build a new collection whose elements are the results of applying the given function - to the corresponding elements of the three collections simultaneously. - - - - - - - - Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The integer index passed to the - function indicates the index (from 0) of element being transformed. - - - - - Like mapi, but mapping corresponding elements from two lists of equal length. - - - - - Return the greatest of all elements of the list, compared via Operators.max - - - - - Return the greatest of all elements of the array, compared via Operators.max on the function result - - - - - - - - Return the lowest of all elements of the list, compared via Operators.min - - - - - Return the lowest of all elements of the array, compared via Operators.min on the function result - - - - - - - - Index into the list. The first element has index 0. - - - - - Build a collection from the given array - - - - - Build a new collection from the given enumerable object - - - - - Split the collection into two collections, containing the - elements for which the given predicate returns true and false - respectively - - - - - Returns a list with all elements permuted according to the - specified permutation - - - - - Apply the given function to successive elements, returning the first - result where function returns Some(x) for some x. If no such - element exists then raise System.Collections.Generic.KeyNotFoundException - - - - - Apply a function to each element of the collection, threading an accumulator argument - through the computation. Apply the function to the first two elements of the list. - Then feed this result into the function along with the third element and so on. - Return the final result. If the input function is f and the elements are i0...iN then computes - f (... (f i0 i1) i2 ...) iN. - Raises ArgumentException if the list has no elements. - - - - - Apply 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 i0 (...(f iN-1 iN)). - Raises ArgumentException if the list has no elements. - - - - - - - - - - - Create a list by calling the given generator on each index - - - - - Return a new list with the elements in reverse order - - - - - Apply a function to each element of the collection, threading an accumulator argument - through the computation. Take the second argument, and apply the function to it - and the first element of the list. Then feed this result into the function along - with the second element and so on. Return the list of intermediate results and the final result. - - - - - Like foldBack, but return both the intermediary and final results - - - - - - - - - - - Sort the given list using the given comparison function - - - - - Sort the given list using keys given by the given projection. Keys are compared using Operators.compare. - - - - - Sort the given list using the given comparison function - - - - - - - - - - - - - - Return the sum of the elements in the list - - - - - Return the sum of the results generated by applying the function to each element of the list. - - - - - - - - Return the tail of the list. Raise (Invalid_argument "tl") if undefined. - - - - - Build an array from the given collection - - - - - Build a new collection from the given enumerable object - - - - - Return the first element for which the given function returns true. - Return None if no such element exists. - - - - - Return the index of the first element in the list - that satisfies the given predicate. - Return None if no such element exists. - - - - - Apply the given function to successive elements, returning Some(x) the first - result where function returns Some(x) for some x. If no such element - exists then return None - - - - - - - - - - - Split a list of pairs into two lists - - - - - Split a list of triples into three lists - - - - - Combine the two lists into a list of pairs. The two lists must have equal lengths. - - - - - Combine the three lists into a list of triples. The lists must have equal lengths. - - - - - Basic operations on lists. - - - - - Return a new map with the binding added to the given map. - - - - - Test is an element is in the domain of the map - - - - - The empty map - - - - - Return true if the given predicate returns true for one of the - bindings in the map. - - - - - Build a new map containing only the bindings for which the given predicate returns 'true' - - - - - Lookup an element in the map, raising KeyNotFoundException if no binding - exists in the map. - - - - - Evaluates the function on each mapping in the collection. Returns the key for the first mapping - where the function returns 'true'. Raise KeyNotFoundException if no such element exists. - - - - - - - - Search the map looking for the first element where the given function returns a Some value - - - - - Fold over the bindings in the map - - - - - Fold over the bindings in the map - - - - - - - - - - - - - - Return true if the given predicate returns true for all of the - bindings in the map. - - - - - Is the map empty? - - - - - - - - Apply the given function to each binding in the dictionary - - - - - Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The index passed to the - function indicates the index of element being transformed. - - - - - - - - - - - Return a new map made from the given bindings - - - - - Return a new map made from the given bindings - - - - - Return a new map made from the given bindings - - - - - Build two new maps, one containing the bindings for which the given predicate returns 'true', - and the other the remaining bindings. - - - - - Search the map looking for the first element where the given function returns a Some value - - - - - Remove an element from the domain of the map. No exception is raised if the element is not present. - - - - - Returns an array of all key-value pairs in the mappinng - - - - - Returns a list of all key-value pairs in the mappinng - - - - - View the collection as an enumerable sequence. This collection - type is also directly compatible with 'seq<KeyValuePair<_,_> >'. - - Note this function returns a sequence of tuples, whereas the collection - itself is compatible with the logically equivalent sequence of KeyValuePairs. - Using sequences of tuples tends to be more convenient in F#, however the - collection itself must enumerate KeyValuePairs to conform to the .NET - design guidelines and the IDictionary interface. - - - - - Lookup an element in the map, returning a Some value if the element is in the domain - of the map and None if not. - - - - - Return the key of the first mapping in the collection that satisfies the given predicate. - Return 'None' if no such element exists. - - - - - Search the map looking for the first element where the given function returns a Some value - - - - - - - - - - - Functional programming operators related to the Map<_,_> type. - - - - - Wrap the two given enumeration-of-enumerations as a single concatenated - enumeration. - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - - - - Return the average of the elements in the sequence - - The elements are averaged using the '+' operator, 'DivideByInt' method and 'Zero' property - associated with the element type. - - - - - Return the average of the results generated by applying the function to each element of the sequence. - - The elements are averaged using the '+' operator, 'DivideByInt' method and 'Zero' property - associated with the generated type. - - - - - - - - Return a sequence that corresponds to a cached version of the input sequence. - This result sequence will have the same elements as the input sequence. The result - can be enumerated multiple times. The input sequence will be enumerated at most - once and only as far as is necessary. - - Enumeration of the result sequence is thread safe in the sense that multiple independent IEnumerator - values may be used simultaneously from different threads (accesses to - the internal lookaside table are thread safe). Each individual IEnumerator - is not typically thread safe and should not be accessed concurrently. - - Note, once enumeration of the input sequence has started, - it's enumerator will be kept live by this object until the enumeration has completed. - At that point, the enumerator will be disposed. - - The enumerator may be disposed and underlying cache storage released by - converting the returned sequence object to type IDisposable, and calling the Dispose method - on this object. The sequence object may then be re-enumerated and a fresh enumerator will - be used. - - - - - Wrap a loosely-typed System.Collections sequence as a typed sequence. - - The use of this function usually requires a type annotation. - An incorrect type annotation may result in runtime type - errors. - - Individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - - - - Apply the given function to each element of the list. Return - the list comprised of the results "x" for each element where - the function returns Some(x) - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - Remember sequence is lazy, effects are delayed until it is enumerated. - - - - - For each element of the enumeration apply the given function and concatenate all the results. - - Remember sequence is lazy, effects are delayed until it is enumerated. - - - - - Compare two sequence's using generic comparison, element by element. - - - - - Compare two sequence's using the given comparison function, element by element. - - - - - Wrap the given enumeration-of-enumerations as a single concatenated - enumeration. - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - - - - Apply a key-generating function to each element of a sequence and return a sequence yielding unique - keys and their number of occurences in the original sequence. - - Note that this function returns a sequence that digests the whole initial sequence as soon as - that sequence is iterated. As a result this function should not be used with - large or infinite sequences. The function makes no assumption on the ordering of the original - sequence. - - - - - - - - Return a sequence that is built from the given delayed specification of an - Seq. The input function is evaluated each time an IEnumerator for the sequence - is requested. - - - - - Return a sequence that contains no duplicate entries according to generic hash and equality comparisons on the entries. - If an element occurs multiple times in the sequence then the later occurrences are discarded. - - - - - Return a sequence that contains no duplicate entries according to the - generic hash and equality comparisons on the keys returned by the given key-generating function. - If an element occurs multiple times in the sequence then the later occurrences are discarded. - - - - - - - - Create an empty sequence - - - - - Test if any element of the sequence satisfies the given predicate. - - The predicate is applied to the elements of the input sequence. If any application - returns true then the overall result is true and no further elements are tested. - Otherwise, false is returned. - - - - - Test if any pair of corresponding elements of the input sequences satisfies the given predicate. - - The predicate is applied to matching elements in the two sequences up to the lesser of the - two lengths of the collections. If any application returns true then the overall result is - true and no further elements are tested. Otherwise, false is returned. If one sequence is shorter than - the other then the remaining elements of the longer sequence are ignored. - - - - - Return a new collection containing only the elements of the collection - for which the given predicate returns "true" - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - Remember sequence is lazy, effects are delayed until it is enumerated. - - - - - Return the first element for which the given function returns true. - Raise KeyNotFoundException if no such element exists. - - - - - Return the index of the first element in the sequence of pairs - that satisfies the given predicate. Raise KeyNotFoundException if no such element exists. - - - - - - - - - - - - - - Apply 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 - - - - - - - - - - - Test if all elements of the sequence satisfy the given predicate. - - The predicate is applied to the elements of the input sequence. If any application - returns false then the overall result is false and no further elements are tested. - Otherwise, true is returned. - - - - - Test the all pairs of elements drawn from the two sequences satisfies the - given predicate. If one sequence is shorter than - the other then the remaining elements of the longer sequence are ignored - - - - - Apply a key-generating function to each element of a sequence and yields a sequence of - unique keys. Each unique key has also contains a sequence of all elements that match - to this key. - - Note that this function returns a sequence that digests the whole initial sequence as soon as - that sequence is iterated. As a result this function should not be used with - large or infinite sequences. The function makes no assumption on the ordering of the original - sequence. - - - - - - - - Return the first element of the sequence. - - - - - Generate a new sequence which, when iterated, will return successive - elements by calling the given function, up to the given count. The results of calling the function - will not be saved, i.e. the function will be reapplied as necessary to - regenerate the elements. The function is passed the index of the item being - generated. - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - - - - Generate a new sequence which, when iterated, will return successive - elements by calling the given function. The results of calling the function - will not be saved, i.e. the function will be reapplied as necessary to - regenerate the elements. The function is passed the index of the item being - generated - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - - - - - - - - - - Return true if the sequence contains no elements, false otherwise - - - - - - - - Apply the given function to each element of the collection. - - - - - Apply the given function to two collections simultaneously. If one sequence is shorter than - the other then the remaining elements of the longer sequence are ignored. - - - - - Apply the given function to each element of the collection. The integer passed to the - function indicates the index of element. - - - - - Return the length of the sequence - - - - - Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The given function will be applied - as elements are demanded using the 'MoveNext' method on enumerators retrieved from the - object. - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - - - - Build a new collection whose elements are the results of applying the given function - to the corresponding pairs of elements from the two sequences. If one input sequence is shorter than - the other then the remaining elements of the longer sequence are ignored. - - - - - - - - Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The integer index passed to the - function indicates the index (from 0) of element being transformed. - - - - - Return the greatest of all elements of the sequence, compared via Operators.max - - - - - Return the greatest of all elements of the array, compared via Operators.max on the function result - - - - - - - - Return the lowest of all elements of the sequence, compared via Operators.min - - - - - Return the lowest of all elements of the array, compared via Operators.min on the function result - - - - - - - - Compute the nth element in the collection. - - - - - Build a collection from the given array - - - - - Build a collection from the given array - - - - - Return a sequence of each element in the input sequence and its predecessor, with the - exception of the first element which is only returned as the predecessor of the second element. - - - - - Apply the given function to successive elements, returning the first - 'x' where the function returns "Some(x)". - - - - - Build a new sequence object that delegates to the given sequence object. This ensures - the original sequence can't be rediscovered and mutated by a type cast. For example, - if given an array the returned sequence will return the elements of the array, but - you can't cast the returned sequence object to an array. - - - - - Apply a function to each element of the sequence, threading an accumulator argument - through the computation. Begin by applying the function to the first two elements. - Then feed this result into the function along with the third element and so on. - Return the final result. - Raises ArgumentException if the sequence has no elements. - - - - - Like fold, but compute on-demand and return the sequence of intermediary and final results - - - - - Return a sequence that yields one item only. - - - - - Return a sequence that skips N elements of the underlying sequence and then yields the - remaining elements of the sequence - - - - - Return a sequence that, when iterated, skips elements of the underlying sequence while the - given predicate returns 'true', and then yields the remaining elements of the sequence - - - - - - - - Yield a sequence ordered by keys. - - Note that this function returns a sequence that digests the whole initial sequence as soon as - that sequence is iterated. As a result this function should not be used with - large or infinite sequences. The function makes no assumption on the ordering of the original - sequence. - - - - - Apply a key-generating function to each element of a sequence and yield a sequence ordered - by keys. The keys are compared using generic comparison as implemented by Operators.compare. - - Note that this function returns a sequence that digests the whole initial sequence as soon as - that sequence is iterated. As a result this function should not be used with - large or infinite sequences. The function makes no assumption on the ordering of the original - sequence. - - - - - - - - Return the sum of the elements in the sequence. - - The elements are summed using the '+' operator and 'Zero' property associated with the generated type. - - - - - Return the sum of the results generated by applying the function to each element of the sequence. - The generated elements are summed using the '+' operator and 'Zero' property associated with the generated type. - - - - - - - - Return the first N elements of the sequence. - - - - - Return a sequence that, when iterated, yields elements of the underlying sequence while the - given predicate returns 'true', and returns no further elements - - - - - - - - Build an array from the given collection - - - - - Build a list from the given collection - - - - - Return a sequence that when enumerated returns at most N elements. - - - - - Return the first element for which the given function returns true. - Return None if no such element exists. - - - - - Return the index of the first element in the sequence - that satisfies the given predicate. Return 'None' if no such element exists. - - - - - Apply the given function to successive elements, returning the first - result where the function returns "Some(x)". - - - - - - - - - - - - - - Return a sequence that contains the elements generated by the given computation. - The given initial 'state' argument is passed to the element generator. - For each IEnumerator elements in the stream are generated on-demand by applying the element - generator, until a None value is returned by the element generator. Each call to the element - generator returns a new residual 'state'. - - Note the stream will be recomputed each time an IEnumerator is requested and iterated for the Seq. - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - - - - Return a sequence that yields 'sliding windows' of containing elements drawn from the input - sequence. Each window is returned as a fresh array. - - - - - Combine the two sequences into a list of pairs. The two sequences need not have equal lengths: - when one sequence is exhausted any remaining elements in the other - sequence are ignored. - - - - - Combine the three sequences into a list of triples. The two sequences need not have equal lengths: - when one sequence is exhausted any remaining elements in the other - sequence are ignored. - - - - - Basic operations on IEnumerables. - - - - - The F# compiler emits implementations of this method for compiled sequence expressions - - - - - The F# compiler emits implementations of this method for compiled sequence expressions - - - - - The F# compiler emits implementations of this method for compiled sequence expressions - - - - - The F# compiler emits implementations of this method for compiled sequence expressions - - - - - The F# compiler emits implementations of this method for compiled sequence expressions - - - - - The F# compiler emits implementations of this method for compiled sequence expressions - - - - - The F# compiler emits implementations of this type for compiled sequence expressions - - - - - The F# compiler emits calls to this function to implement the compiler-intrinsic - conversions from untyped System.Collections.IEnumerable sequences to typed sequences - - - - - The F# compiler emits calls to this function to - implement the 'try/finally' operator for F# sequence expressions - - - - - The F# compiler emits calls to this function to implement the 'use' operator for F# sequence expressions - - - - - The F# compiler emits calls to this function to - implement the 'while' operator for F# sequence expressions - - - - - A group of functions used as part of the compiled representation of F# sequence expressions - - - - - Return a new set with an element added to the set. No exception is raised if - the set already contains the given element. - - - - - Returns the minimum element of the set - - - - - - - -Evaluates to "true" if the given element is in the given set - - - - -Return the number of elements in the set. Same as size - - - - - Return a new set with the elements of the second set removed from the first. - - - - - The empty set for the type 'T . - - - - -Test if any element of the collection satisfies the given predicate. -If the input function is f and the elements are i0...iN -then computes p i0 or ... or p iN. - - - - - Return a new collection containing only the elements of the collection - for which the given predicate returns true - - - - - Apply the given accumulating function to all the elements of the set - - - - - Apply the given accumulating function to all the elements of the set - - - - - - - - - - - - - - Test if all elements of the collection satisfy the given predicate. - If the input function is f and the elements are i0...iN and "j0...jN" - then computes p i0 && ... && p iN. - - - - - Compute the intersection of the two sets. - - - - -Compute the intersection of a sequence of sets. The sequence must be non-empty - - - - - - - -Return "true" if the set is empty - - - - - - - -Apply the given function to each element of the set, in order according -to the comparison function - - - - - Return a new collection containing the results of applying the - given function to each element of the input set - - - - - - - -Evaluates to "true" if the given element is in the given set - - - - - - - - - - - Build a set that contains the same elements as the given array - - - - - Build a set that contains the same elements as the given list - - - - - Build a new collection from the given enumerable object - - - - -Split the set into two sets containing the elements for which the given predicate -returns true and false respectively - - - - - - - -Return a new set with the given element removed. No exception is raised in -the set doesn't contain the given element. - - - - - The set containing the given one element. - - - - - - - - Evaluates to "true" if all elements of the second set are in the first - - - - - Build an array that contains the elements of the set in order - - - - - Build a list that contains the elements of the set in order - - - - - Return a view of the collection as an enumerable object - - - - -Compute the union of the two sets. - - - - -Compute the union of a sequence of sets. - - - - - - - - Functional programming operators related to the Set<_> type. - - - - - Get the default group for executing asynchronous computations - - - - - Specify an asynchronous computation that, when run, executes computation, - If p is effectively cancelled before its termination then - the process f exn is executed. - - - - - Specify an asynchronous computation that, when run, queues a CPU-intensive work in the thread pool item that runs - its continutation. - - - - - Specify an asynchronous computation that, when run, creates a new thread and runs - its continutation in that thread - - - - - Specify an asynchronous computation that, when run, runs - its continuation using syncContext.Post. If syncContext is null - then the asynchronous computation is equivalent to SwitchToThreadPool(). - - - - - Start a child computation within an asynchronous workflow. - This allows multiple asynchronous computations to be executed simultaneously. - - This method should normally be used as the immediate - right-hand-side of a 'let!' binding in an F# asynchronous workflow, i.e., - - async { ... - let! completor1 = childComputation1 |> Async.StartChild - let! completor2 = childComputation2 |> Async.StartChild - ... - let! result1 = completor1 - let! result2 = completor2 - ... } - - When used in this way, each use of StartChild starts an instance of childComputation - and returns a completor object representing a computation to wait for the completion of the operation. - When executed, the completor awaits the completion of childComputation. - - - - - Start the asynchronous computation in the thread pool. Do not await its result. - - Run as part of the default AsyncGroup - - - - - - - - - - - - - - - - - Run an asynchronous computation, initially as a work item. - - Run as part of the default AsyncGroup - - - - - Run the asynchronous computation and await its result. - - If an exception occurs in the asynchronous computation then an exception is re-raised by this - function. - - Run as part of the default AsyncGroup - - - - - - - - - - - Specify an asynchronous computation that, when run, executes the given callback. - The callback must eventually call either the continuation, - the exception continuation or the cancel exception. - - - - - Specify an asynchronous computation that, when run, executese the three asynchronous computations, starting each in the thread pool. - If any raise an exception then the overall computation will raise an exception, and attempt to cancel the others. - All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. - - - - - Specify an asynchronous computation that, when run, executes the two asynchronous computations, starting each in the thread pool. - If any raise an exception then the overall computation will raise an exception, and attempt to cancel the others. - All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. - - - - - Specify an asynchronous computation that, when run, executes all the given asynchronous computations, initially - queueing each as work items and using a fork/join pattern. If any raise an exception then the - overall computation will raise the first detected exception, and attempt to cancel the others. - All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. - - - - - Generate a scoped, cooperative cancellation handler for use within an asynchronous workflow. - - async { use! holder = Async.OnCancel f ... } generates an asynchronous computation where, - if a cancellation happens any time during the execution of the asynchronous computation in the scope of 'holder', - then action 'f' is executed on the thread that is performing the cancellation. You can use - this to arrange for your own computation to be asynchronously notified that a cancellation has occurred, e.g. - by setting a flag, or deregistering a pending I/O action. - - - - - Specify an asynchronous computation that, when run, runs 'p', ignoring the result and - returning the result '()'. - - - - - - - - Get the default group for executing asynchronous computations - - - - - Raise the cancellation condition for the most recent set of Async computations started without any specific AsyncGroup. - Replace the global group with a new global group for any asynchronous computations created after this point without - any specific AsyncGroup. - - - - - - - - Specify an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET APIs where the overall operation is not qualified by any arguments. For example, - Async.BuildPrimitive(ws.BeginGetWeather,ws.EndGetWeather) - When the computation is run, the 'Begin' half of the operation is executed, and - an asynchronous computation is returned that, when run, awaits the completion - of the computation and fetches its overall result using the 'End' operation. - - - - - Specify an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET APIs where the - overall operation is qualified by one argument. For example, - Async.BuildPrimitive(place,ws.BeginGetWeather,ws.EndGetWeather) - When the computation is run, the 'Begin' half of the operation is executed, and - an asynchronous computation is returned that, when run, awaits the completion - of the computation and fetches its overall result using the 'End' operation. - - - - - Specify an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET APIs where the - overall operation is qualified by two arguments. For example, - Async.BuildPrimitive(arg1,arg2,ws.BeginGetWeather,ws.EndGetWeather) - When the computation is run, the 'Begin' half of the operation is executed, and - an asynchronous computation is returned that, when run, awaits the completion - of the computation and fetches its overall result using the 'End' operation. - - - - - Specify an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET APIs where the overall operation is qualified by three arguments. For example, - Async.BuildPrimitive(arg1,arg2,arg3,ws.BeginGetWeather,ws.EndGetWeather) - When the computation is run, the 'Begin' half of the operation is executed, and - an asynchronous computation is returned that, when run, awaits the completion - of the computation and fetches its overall result using the 'End' operation. - - - - - This static class holds members for creating and manipulating asynchronous computations - - - - - Specify an asynchronous computation that, when run, just returns '()' - - - - - Specify an asynchronous computation that, when run, runs 'p' repeatedly - until 'gd()' becomes false. - - - - - Specify an asynchronous computation that, when run, runs 'f(resource)'. - The action 'resource.Dispose()' is executed as this computation yields its result - or if the asynchronous computation exits by an exception or by cancellation. - - - - - Specify an asynchronous computation that, when run, runs 'p' and returns its result. - If an exception happens then 'f(exn)' is called and the resulting computation executed instead. - - - - - Specify an asynchronous computation that, when run, runs 'p'. The action 'f' is executed - after 'p' completes, whether 'p' exits normally or by an exception. If 'f' raises an exception itself - the original exception is discarded and the new exception becomes the overall result of the computation. - - - - - Specify an asynchronous computation that, when run, returns the result 'v' - - - - - Specify an asynchronous computation that, when run, enumerates the sequence 'seq' - on demand and runs 'f' for each element. - - - - - Specify an asynchronous computation that, when run, runs 'f()' - - - - - Specify an asynchronous computation that, when run, first runs 'p1' and then runs 'p2', returning the result of 'p2'. - - - - - Specify an asynchronous computation that, when run, runs 'p', and when - 'p' generates a result 'T', runs 'f res'. - - - - - Generate an object used to build asynchronous computations using F# computation expressions. The value - 'async' is a pre-defined instance of this type. - - - - - The type of the 'async' operator, used to build workflows for asynchronous computations. - - - - - Wait for the completion of the operation and get its result - - - - - - - - Raise the cancellation condition for this group of computations - - - - - Start the asynchronous computation as a work item. Do not await its result. - - - - - - - - - - - Start the asynchronous computation as a work item. - Return a handle to the computation as an AsyncFuture. - - - - - Run the asynchronous computation and await its result. - - If an exception occurs in the asynchronous computation then an exception is re-raised by this - function. - - - - - - - - Generate a new asynchronous group - - - - - A handle to a capability to cancel a set of asynchronous computations. - - - - - Send a reply to a PostAndReply message - - - - - A handle to a capability to reply to a PostAndReply message - - - - - An asynchronous computation, which, when run, will eventually produce a value - of the given type, or else raise an exception. The value and/or exception is not returned - to the caller immediately, but is rather passed to a success continuation, exception continuation - or cancellation continuation. - - Asynchronous computations are normally specified using the F# 'workflow' syntax for building - computations. - - When run, asynchronous computations can normally be thought of as running run in one of - two modes: 'work item mode' or 'waiting mode'. - - - 'work item mode' indicates that the computation is executing as a work item, - e.g. in the .NET Thread Pool via ThreadPool.QueueUserWorkItem, or is running - a brief event-response action on the GUI thread. - - - 'waiting mode' indicates the computations a waiting for asynchronous I/O completions, - typically suspended as thunks using ThreadPool.RegisterWaitForSingleObject. - - Asynchronous computations running as 'work items' should not generally perform blocking - operations, e.g. long running synchronous loops. However, some asynchronous - computations may, out of necessity, need to execute blocking I/O operations: - these should be run on new threads or a user-managed pool of threads specifically - dedicated to resolving blocking conditions. For example, System.IO.OpenFile is, by - design, a blocking operation. However frequently it is important to code as - if this is asynchronous. This can be done by executing Async.SwitchToNewThread - as part of the workflow. - - When run, asynchronous computations belong to an AsyncGroup. This can usually be specified - when the async computation is started. The only action on an AsyncGroup is to raise a cancellation - condition for the AsyncGroup. Async values check the cancellation condition for their AsyncGroup - regularly, though synchronous computations within an asynchronous computation will not automatically - check this condition. This gives a user-level cooperative cancellation protocol. - - - - - Publish the event as a first class event value - - - - - Trigger the event using the given parameters - - - - - Create an event object suitable for implementing an arbitrary type of delegate - - - - - Event implementations for an arbitrary type of delegate - - - - - Publish the event as a first class event value - - - - - Trigger the event using the given parameters - - - - - Create an event object suitable for implementing for the IEvent<_> type - - - - - Event implementations for the IEvent<_> type - - - - - Publish the event as a first class event value - - - - - Trigger the event using the given sender object and parameters. The sender object may be null. - - - - - Create an event object suitable for delegate types following the standard .NET Framework convention of a first 'sender' argument - - - - - Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument - - - - - - - - A delegate type associated with the F# event type IEvent<_> - - - - - Remove a listener delegate from an event listener store - - - - - Connect a handler delegate object to the event. A handler can - be later removed using RemoveHandler. The listener will - be invoked when the event is fired. - - - - - F# gives special status to non-virtual instance member properties compatible with type IDelegateEvent, - generating approriate .NET metadata to make the member appear to other .NET languages as a - .NET event. - - - - - First-class listening points (i.e. objects that permit you to register a 'callback' - activated when the event is triggered). See the module Event - for functions to create events. - - - - - Connect a listener function to the event. The listener will - be invoked when the event is fired. - - - - -The family of first class event values for delegate types that satisfy the F# delegate constraint. - - - - - Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to - prevent other threads also computing the value. - - - - - Indicates if the lazy value has been successfully computed - - - - - Indicates if the lazy value is being computed or the computation raised an exception - - - - - Indicates if the lazy value has yet to be computed - - - - - Same as Force, except no lock is taken. - - - - - Same as Force - - - - - Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to - prevent other threads also computing the value. If the value is re-forced during its own computation - the Undefined exception is raised. - - - - - Create a lazy computation that evaluates to the given value when forced - - - - - Create a lazy computation that evaluates to the result of the given function when forced - - - - - The type of delayed computations. - - Use the values in the Lazy module to manipulate - values of this type, and the notation 'lazy expr' to create values - of this type. - - - - - Raise a timeout exception if a message not received in this amount of time. Default infinite. - - - - - Raise a timeout exception if a message not received in this amount of time. Default infinite. - - - - - Return an asynchronous computation which will - look through messages in arrival order until 'scanner' returns a Some value. No thread - is blocked while waiting for further messages. Return None - if the timeout is exceeded. - - - - - Return an asynchronous computation which will - consume the first message in arrival order. No thread - is blocked while waiting for further messages. Return None - if the timeout is exceeded. - - - - - Like PostAndReply, but return None if no reply within the timeout period. - - - - - Create and start an instance of a MailboxProcessor. The asynchronous computation executed by the - processor is the one returned by the 'initial' function. - - - - - Start the MailboxProcessor - - - - - Return an asynchronous computation which will - look through messages in arrival order until 'scanner' returns a Some value. No thread - is blocked while waiting for further messages. Raise a TimeoutException - if the timeout is exceeded. - - - - - Return an asynchronous computation which will - consume the first message in arrival order. No thread - is blocked while waiting for further messages. Raise a TimeoutException - if the timeout is exceeded. - - - - - Post a message to the message queue of the MailboxProcessor and await a reply on the channel synchronously. - The message is produced by a single call to the first function which must build a message - containing the reply channel. The receiving MailboxProcessor must process this message and - invoke the Reply method on the reply channel precisly once. - - - - - Post a message to the message queue of the MailboxProcessor, asynchronously - - - - - Like AsyncPostAndReply, but return None if no reply within the timeout period. - - - - - Post a message to the message queue of the MailboxProcessor and await a reply on the channel asynchronously. - The message is produced by a single call to the first function which must build a message - containing the reply channel. The receiving MailboxProcessor must process this message and - invoke the Reply method on the reply channel precisly once. - - - - - Create an instance of a MailboxProcessor. The asynchronous computation executed by the - processor is the one returned by the 'initial' function. This function is not executed until - 'Start' is called. - - - - - A MailboxProcessor is a message-processing agent defined using an asynchronous workflow. - The agent encapsulates a message queue that supports multiple-writers and the single reader agent. - Writers send messages to the agent by using the Post, PostAndReply or AsyncPostAndReply methods. - - The reader agent is specified when creating the MailboxProcessor. The - agent is usually an asychronous workflow that waits for messages - by using the Receive or TryReceive methods. - A MailboxProcessor may also scan through all available messages by using the - Scan or TryScan method. The encapsulated message queue only - supports a single active reader, thus at most one concurrent call to Receive, TryReceive, - Scan and/or TryScan may be active at any one time. - - - - - The type of delayed computations. - - Use the values in the Lazy module to manipulate - values of this type, and the notation 'lazy expr' to create values - of this type. - - - - - An exeption type raised when the evaluation of a lazy value recursively depend upon itself - - - - - A module of extension members that provide asynchronous operations for some basic .NET types related to concurrency and I/O. - - - - - Return a new event which fires on a selection of messages from the original event. - The selection function takes an original message to an optional new message. - - - - - Create an IEvent with no initial listeners. Two items are returned: - a function to invoke (trigger) the event, and the event that clients - can plug listeners into. - - - - - Return a new event that listens to the original event and triggers the resulting - event only when the argument to the event passes the given function - - - - - Run the given function each time the given event is triggered. - - - - - Return a new event that passes values transformed by the given function - - - - - Fire the output event when either of the input events fire - - - - - Return a new event that triggers on the second and subsequent triggerings of the input event. - The Nth triggering of the input event passes the arguments from the N-1th and Nth triggering as - a pair. The argument passed to the N-1th triggering is held in hidden internal state until the - Nth triggering occurs. - - You should ensure that the contents of the values being sent down the event are - not mutable. Note that many EventArgs types are mutable, e.g. MouseEventArgs, and - each firing of an event using this argument type may reuse the same physical - argument obejct with different values. In this case you should extract the necessary - information from the argument before using this combinator. - - - - - Return a new event that listens to the original event and triggers the - first resulting event if the application of the predicate to the event arguments - returned true, and the second event if it returned false - - - - - Return a new event consisting of the results of applying the given accumulating function - to successive values triggered on the input event. An item of internal state - records the current value of the state parameter. The internal state is not locked during the - execution of the accumulation function, so care should be taken that the - input IEvent not triggered by multiple threads simultaneously. - - - - - Return a new event that listens to the original event and triggers the - first resulting event if the application of the function to the event arguments - returned a Choice1Of2, and the second event if it returns a Choice2Of2 - - - - - Basic operations on first class event objects. - - - - - Create an instance of the attribute - - - - - Adding this attribute to class definition makes it abstract, which means it need not - implement all its methods. Instances of abstract classes may not be constructed directly. - - - - - Indicates the namespace or module to be automatically opened when an assembly is referenced - or an enclosing module opened. - - - - - Create an attribute used to mark a module as 'automatically opened' when the enclosing namespace is opened - - - - - Create an attribute used to mark a namespace or module path to be 'automatically opened' when an assembly is referenced - - - - - This attribute is used for two purposes. When applied to an assembly, it must be given a string - argument, and this argument must indicate a valid module or namespace in that assembly. Source - code files compiled with a reference to this assembly are processed in an environment - where the given path is automatically oepned. - - When applied to a module within an assembly, then the attribute must not be given any arguments. - When the enclosing namespace is opened in user source code, the module is also implicitly opened. - - - - - The value of the attribute, indicating whether the type is automatically marked serializable or not - - - - - Create an instance of the attribute - - - - - Adding this attribute to a type with value 'false' disables the behaviour where F# makes the - type Serializable by default. - - - - - Create an instance of the attribute - - - - - Adding this attribute to a property with event type causes it to be compiled with as a .NET - Common Language Infrastructure metadata event, through a syntactic translation to a pair of - 'add_EventName' and 'remove_EventName' methods. - - - - - Helper types for active patterns with 2 choices. - - - - - Helper types for active patterns with 3 choices. - - - - - Helper types for active patterns with 4 choices. - - - - - Helper types for active patterns with 5 choices. - - - - - Helper types for active patterns with 6 choices. - - - - - Helper types for active patterns with 7 choices. - - - - - Create an instance of the attribute - - - - - Adding this attribute to a type causes it to be represented using a .NET class. - - - - - Indicates the variant number of the entity, if any, in a linear sequence of elements with F# source code - - - - - Indicates the relationship between the compiled entity and F# source code - - - - - Indicates the sequence number of the entity, if any, in a linear sequence of elements with F# source code - - - - - Create an instance of the attribute - - - - - Create an instance of the attribute - - - - - Create an instance of the attribute - - - - - This attribute is inserted automatically by the F# compiler to tag - types and methods in the gneerated .NET code with flags indicating the correspondence with - original source constructs. It is used by the functions in the - Microsoft.FSharp.Reflection library to reverse-map compiled constructs - to their original forms. It is not intended for use from use code. - - - - - Indicates one or more adjustments to the compiled representation of an F# type or member - - - - - Create an instance of the attribute - - - - - This attribute is used to adjust the runtime representation for a type. - For example, it may be used to note that the null representation - may be used for a type. This affects how some constructs are compiled. - - - - - Indicates one or more adjustments to the compiled representation of an F# type or member - - - - - The value of the attribute, indicating whether the type has a default augmentation or not - - - - - Create an instance of the attribute - - - - - Adding this attribute to a discriminated union with value false - turns off the generation of standard helper member tester, constructor - and accessor members for the generated .NET class for that type. - - - - - Indicates if a constraint is asserted that the field type supports 'null' - - - - - Create an instance of the attribute - - - - - Create an instance of the attribute - - - - - Adding this attribute to a field declaration means that the field is - not initialized. During type checking a constraint is asserted that the field type supports 'null'. - If the 'check' value is false then the constraint is not asserted. - - - - - Create an instance of the attribute - - - - - Adding this attribute to a function indicates it is the entrypoint for an application. - If this absent is not speficied for an EXE then the initialization implicit in the - module bindings in the last file in the compilation sequence are used as the entrypoint. - - - - - Indicates the warning message to be emitted when F# source code uses this construct - - - - - Create an instance of the attribute - - - - - This attribute is used to tag values that are part of an experimental library - feature - - - - - The release number of the F# version associated with the attribute - - - - - The minor version number of the F# version associated with the attribute - - - - - The major version number of the F# version associated with the attribute - - - - - Create an instance of the attribute - - - - - This attribute is added to generated assemblies to indicate the - version of the data schema used to encode additional F# - specific information in the resource attached to compiled F# libraries. - - - - - Convert an F# first class function value to a value of type System.Converter - - - - - Convert an value of type System.Converter to a F# first class function value - - - - - Convert an F# first class function value to a value of type System.Converter - - - - - Invoke an F# first class function value with five curried arguments. In some cases this - will result in a more efficient application than applying the arguments successively. - - - - - Invoke an F# first class function value with four curried arguments. In some cases this - will result in a more efficient application than applying the arguments successively. - - - - - Invoke an F# first class function value with three curried arguments. In some cases this - will result in a more efficient application than applying the arguments successively. - - - - - Invoke an F# first class function value with two curried arguments. In some cases this - will result in a more efficient application than applying the arguments successively. - - - - - Invoke an F# first class function value with one argument - - - - - Convert an value of type System.Converter to a F# first class function value - - - - - Construct an instance of an F# first class function value - - - - - The .NET type used to represent F# function values. This type is not - typically used directly, though may be used from other .NET languages. - - - - - Convert the given Action delegate object to an F# function value - - - - - Convert the given Converter delegate object to an F# function value - - - - - A utility funcion to convert function values from tupled to curried form - - - - - A utility funcion to convert function values from tupled to curried form - - - - - A utility funcion to convert function values from tupled to curried form - - - - - A utility funcion to convert function values from tupled to curried form - - - - - A utility funcion to convert function values from tupled to curried form - - - - - Helper functions for converting F# first class function values to and from .NET representaions - of functions using delegates. - - - - - Create an instance of the attribute - - - - - Adding this attribute to a non-function value with generic parameters indicates that - uses of the construct can give rise to generic code through type inference. - - - - - - - - - - - - - - - - - - - - Create an instance of the attribute - - - - - Adding this attribute to a type causes it to be represented using a .NET interface. - - - - - Create an instance of the attribute - - - - - Adding this attribute to a value causes it to be compiled as a .NET constant literal. - - - - - Create an instance of the attribute - - - - - Adding this attribute to a type causes it to be interpreted as a refined type, currently limited to measure-parameterized types. - This may only be used under very limited conditions. - - - - - Create an instance of the attribute - - - - - Adding this attribute to a type causes it to be interpreted as a unit of measure. - This may only be used under very limited conditions. - - - - - Create an instance of the attribute - - - - - This attribute is used to tag values that may not be dynamically invoked at runtime. This is - typically added to inlined functions whose implementations include unverifiable code. It - causes the method body emitted for the inlined function to raise an exception if - dynamically invoked, rather than including the unverifiable code in the generated - assembly. - - - - - Indicates the warning message to be emitted when F# source code uses this construct - - - - - Create an instance of the attribute - - - - - Create an instance of the attribute - - - - - This attribute is used to tag values, modules and types that are only - present in F# to permit a degree of code-compatibility and cross-compilation - with other implementations of ML-familty languages, in particular OCaml. The - use of the construct will give a warning unless the --ml-compatibility flag - is specified. - - - - - Get the value of a 'Some' option. A NullReferenceException is raised if the option is 'None'. - - - - - Create an option value that is a 'None' value. - - - - - Return 'true' if the option is a 'Some' value. - - - - - Return 'true' if the option is a 'None' value. - - - - - Create an option value that is a 'Some' value. - - - - - The type of optional values. When used from other .NET languages the - empty option is the null value. - - Use the constructors Some and None to create values of this type. - Use the values in the Option module to manipulate values of this type, - or pattern match against the values directly. - - None values will appear as the value null to other .NET languages. - Instance methods on this type will appear as static methods to other .NET languages - due to the use of null as a value representation. - - - - - Create an instance of the attribute - - - - - This attribute is added automatically for all optional arguments - - - - - A unique identifier for this overloaded member within a given overload set - - - - - Create an instance of the attribute - - - - - Adding the OverloadID attribute to a member permits it to - be part of a group overloaded by the same name and arity. The string - must be a unique name amongst those in the overload set. Overrides - of this method, if permitted, must be given the same OverloadID, - and the OverloadID must be specified in both signature and implementation - files if signature files are used. - - - - - The current value of the reference cell - - - - - The current value of the reference cell - - - - - The type of mutable references. Use the functions [:=] and [!] to get and - set values of this type. - - - - - - - - Create an instance of the attribute - - - - - Create an instance of the attribute - - - - - Adding this attribute to a record or union type disables the automatic generation - of overrides for 'System.Object.Equals(obj)', 'System.Object.GetHashCode()' - and 'System.IComparable' for the type. The type will by default use reference equality. - This is identical to adding attributes StructuralEquality(false) and StructuralComparison(false). - - - - - Create an instance of the attribute - - - - - Adding this attribute to the let-binding for the definition of a top-level - value makes the quotation expression that implements the value available - for use at runtime. - - - - - Create an instance of the attribute - - - - - This attribute is used to indicate that references to a the elements of a module, record or union - type require explicit qualified access. - - - - - Create an instance of the attribute - - - - - Adding this attribute to a type, value or member requires that - uses of the construct must explicitly instantiate any generic type parameters. - - - - - The value of the attribute, indicating whether the type is sealed or not - - - - - Create an instance of the attribute - - - - - Create an instance of the attribute - - - - - Adding this attribute to class definition makes it sealed, which means it may not - be extended or implemented. - - - - - Indicates the relationship between a compiled entity in a CLI binary and an element in F# source code - - - - - Create an instance of the attribute - - - - - Adding this attribute to a type causes it to be represented using a .NET struct. - - - - - The value of the attribute, indicating whether the type uses structural comparison or not - - - - - Create an instance of the attribute - - - - - Create an instance of the attribute - - - - - Adding this attribute to a record, union or struct type with value 'false' disables the automatic generation - of implementations for 'System.IComparable' for the type. - - - - - The value of the attribute, indicating whether the type uses structural equality or not - - - - - Create an instance of the attribute - - - - - Create an instance of the attribute - - - - - Adding this attribute to a record, union or struct type with value 'false' - confirms the automatic generation of overrides for 'System.Object.Equals(obj)' - and 'System.Object.GetHashCode()' for the type. This attribute is usually used in - conjunction with StructuralComparison(false) to generate a type that supports - structural equality but not structural comparison. - - - - - Indicates the text to display by default when objects of this type are displayed - using '%A' printf formatting patterns and other two-dimensional text-based display - layouts. - - - - - Create an instance of the attribute - - - - - This attribute is used to mark how a type is displayed by default when using - '%A' printf formatting patterns and other two-dimensional text-based display layouts. - In this version of F# the only valid values are of the form PreText {PropertyName} PostText. - The property name indicates a property to evaluate and to display instead of the object itself. - - - - - - - - - - - Compiled versions of F# tuple types. These are not used directly, though - these compiled forms are seen by other .NET languages. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Specialize the type function at a given type - - - - - Construct an instance of an F# first class type function value - - - - - The .NET type used to represent F# first-class type function values. This type is for use - by compiled F# code. - - - - - The type 'unit', which has only one value "()". This value is special and - always uses the representation 'null'. - - - - - Create an instance of the attribute - - - - - This attribute is used to tag values whose use will result in the generation - of unverifiable code. These values are inevitably marked 'inline' to ensure that - the unverifiable constructs are not present in the actual code for the F# library, - but are rather copied to the source code of the caller. - - - - - Four dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Use the values in the Array4D module - to manipulate values of this type, or the notation 'arr.[x1,x2,x3,x4]' to get and set array - values. - - - - - Three dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Use the values in the Array3D module - to manipulate values of this type, or the notation 'arr.[x1,x2,x3]' to get and set array - values. - - - - - Two dimensional arrays, typically zero-based. - - Use the values in the Array2D module - to manipulate values of this type, or the notation 'arr.[x,y]' to get/set array - values. - - Non-zero-based arrays can also be created using methods on the System.Array type. - - - - - Single dimensional, zero-based arrays, written 'int[]', 'string[]' etc. - Use the values in the Array module to manipulate values - of this type, or the notation 'arr.[x]' to get/set array - values. - - - - - Single dimensional, zero-based arrays, written 'int[]', 'string[]' etc. - Use the values in the Array module to manipulate values - of this type, or the notation 'arr.[x]' to get/set array - values. - - - - - An abbreviation for the type Microsoft.FSharp.Math.BigInt - - - - - An abbreviation for the .NET type System.Boolean - - - - - Represents a managed pointer in F# code. - - - - - An abbreviation for the .NET type System.Byte - - - - - An abbreviation for the .NET type System.Char - - - - - An abbreviation for the .NET type System.Decimal - - - - - The type of decimal numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Decimal. - - - - - An abbreviation for the .NET type System.Double - - - - - An abbreviation for the .NET type System.Exception - - - - - An abbreviation for the .NET type System.Double - - - - - An abbreviation for the .NET type System.Single - - - - - The type of floating point numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Single. - - - - - The type of floating point numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Double. - - - - - This type is for internal use by the F# code generator - - - - - An abbreviation for the .NET type System.Int32 - - - - - An abbreviation for the .NET type System.Int16 - - - - - The type of 16-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Int16. - - - - - An abbreviation for the .NET type System.Int32 - - - - - An abbreviation for the .NET type System.Int64 - - - - - The type of 64-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Int64. - - - - - An abbreviation for the .NET type System.SByte - - - - - The type of 8-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.SByte. - - - - - The type of 32-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Int32. - - - - - An abbreviation for the .NET type System.IntPtr - - - - - Represents an unmanaged pointer in F# code. - - This type should only be used when writing F# code that interoperates - with native code. Use of this type in F# code may result in - unverifiable code being generated. Conversions to and from the - nativeint type may be required. Values of this type can be generated - by the functions in the NativeInterop.NativePtr module. - - - - - An abbreviation for the .NET type System.Object - - - - - The type of optional values. When used from other .NET languages the - empty option is the null value. - - Use the constructors Some and None to create values of this type. - Use the values in the Option module to manipulate values of this type, - or pattern match against the values directly. - - 'None' values will appear as the value null to other .NET languages. - Instance methods on this type will appear as static methods to other .NET languages - due to the use of null as a value representation. - - - - - The type of mutable references. Use the functions [:=] and [!] to get and - set values of this type. - - - - - An abbreviation for the .NET type System.SByte - - - - - An abbreviation for the .NET type System.Single - - - - - An abbreviation for the .NET type System.String - - - - - An abbreviation for the .NET type System.UInt16 - - - - - An abbreviation for the .NET type System.UInt32 - - - - - An abbreviation for the .NET type System.UInt64 - - - - - An abbreviation for the .NET type System.Byte - - - - - An abbreviation for the .NET type System.UIntPtr - - - - - The type 'unit', which has only one value "()". This value is special and - always uses the representation 'null'. - - - - - Dynamic invocations of functions marked with the NoDynamicInvocationAttribute attribute raise this exception - - - - - This exception is raised by 'failwith' - - - - - Non-exhaustive match failures will raise the MatchFailure exception - - - - - - - - - - - - - - - - - Build an aysnchronous workflow using computation expression syntax - - - - - Builds a lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. - - - - - Print to stderr using the given format - - - - - Print to stderr using the given format, and add a newline - - - - - Print to a string buffer and raise an exception with the given - result. Helper printers must return strings. - - - - - Print to a file using the given format - - - - - Print to a file using the given format, and add a newline - - - - - Special prefix operator for splicing typed expressions into quotation holes - - - - - Special prefix operator for splicing untyped expressions into quotation holes - - - - - - - - - - - Print to stdout using the given format - - - - - Print to stdout using the given format, and add a newline - - - - - Builds a sequence using sequence expression syntax - - - - - Builds a set from a sequence of objects. The key objects are indexed using generic comparison - - - - - Print to a string using the given format - - - - - An active pattern to force the execution of values of type Lazy<_> - - - - -Pervasives: Additional bindings available at the top level - - - - - A compiler intrinsic that implements dynamic invocations to the '+' operator - - - - - A compiler intrinsic that implements dynamic invocations to the checked '+' operator - - - - - A compiler intrinsic that implements dynamic invocations to the checked '+' operator - - - - - Generate a null value for reference types. - - - - - Divide a floating point value by an integer - - - - - A compiler intrinsic that implements dynamic invocations for the DivideByInt primitive - - - - - Build an enum value from an underlying value - - - - - Get the underlying value for an enum value - - - - - A static F# comparer object - - - - - Return an F# comparer object suitable for hashing and equality. This hashing behaviour - of the returned comparer is not limited by an overall node count when hashing F# - records, lists and union types. - - - - - Make an F# comparer object for the given type - - - - - Make an F# hash/equality object for the given type - - - - - Make an F# hash/equality object for the given type using node-limited hashing when hashing F# - records, lists and union types. - - - - - Compare two values - - - - - Compare two values. May be called as a recursive case from an implementation of System.IComparable to - ensure consistent NaN comparison semantics. - - - - - Compare two values for equality - - - - - Compare two values for equality - - - - - Compare two values - - - - - Compare two values - - - - - Hash a value according to its structure. This hash is not limited by an overall node count when hashing F# - records, lists and union types. - - - - - Recursively hash a part of a value according to its structure. - - - - - Compare two values - - - - - Compare two values - - - - - Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# - records, lists and union types. - - - - - Take the maximum of two values structurally according to the order given by GenericComparison - - - - - Take the minimum of two values structurally according to the order given by GenericComparison - - - - - Resolves to the one value for any primitive numeric type or any type with a static member called 'One' - - - - - Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' - - - - - Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' - - - - - Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' - - - - - A compiler intrinsic that implements dynamic invocations to the '+' operator - - - - - Parse an int32 according to the rules used by the overloaded 'int32' conversion operator when applied to strings - - - - - Parse an int64 according to the rules used by the overloaded 'int64' conversion operator when applied to strings - - - - - Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings - - - - - Parse an uint64 according to the rules used by the overloaded 'uint64' conversion operator when applied to strings - - - - - Reference/physical equality. - True if boxed versions of the inputs are reference-equal, OR if - both are primitive numeric types and the implementation of Object.Equals for the type - of the first argument returns true on the boxed versions of the inputs. - - - - - The physical hash. Hashes on the object identity, except for value types, - where we hash on the contents. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - A primitive entry point used by the F# compiler for optimization purposes. - - - - - The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - - - - - This function implements calls to default constructors - acccessed by 'new' constraints. - - - - - A compiler intrinsic for the efficeint compilation of sequence expressions - - - - - The standard overloaded associative (indexed) lookup operator - - - - - The standard overloaded associative (2-indexed) lookup operator - - - - - The standard overloaded associative (3-indexed) lookup operator - - - - - The standard overloaded associative (4-indexed) lookup operator - - - - - Primitive used by pattern match compilation - - - - - This function implements parsing of decimal constants - - - - - The standard overloaded associative (indexed) mutation operator - - - - - The standard overloaded associative (2-indexed) mutation operator - - - - - The standard overloaded associative (3-indexed) mutation operator - - - - - The standard overloaded associative (4-indexed) mutation operator - - - - - A compiler intrinsic that implements the ':?' operator - - - - - A compiler intrinsic that implements the ':?' operator - - - - - A compiler intrinsic that implements the ':?>' operator - - - - - A compiler intrinsic that implements the ':?>' operator - - - - - The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - - - - - Address-of. Uses of this value may result in the generation of unverifiable code. - - - - - Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand - - - - - Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand - - - - - Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand - - - - - Address-of. Uses of this value may result in the generation of unverifiable code. - - - - - Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand - - - - - The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - - - - - Language primitives associated with the F# language - - - - - Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - - - - - - - - - - - - - - - - - - - - Provide a default implementation of the F# numeric literal syntax 'dddN' - - - - - Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - - - - - - - - - - - Absolute value of the given number - - - - - Inverse cosine of the given number - - - - - Inverse sine of the given number - - - - - Inverse tangent of the given number - - - - - Inverse tangent of x/y where x and y are specified separately - - - - - Boxes a strongly typed value. - - - - - Converts the argument to byte. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Byte.Parse() on strings and otherwise requires a ToByte method on the input type - - - - - Ceiling of the given number - - - - - Converts the argument to character. Numeric inputs are converted according to the UTF-16 - encoding for characters. String inputs must be exactly one character long. - For other types a static member ToChar must exist on the type. - - - - - Generic comparison - - - - - Cosine of the given number - - - - - Hyperbolic cosine of the given number - - - - - Converts the argument to System.Decimal using a direct conversion for all - primitive numeric types and requiring a ToDecimal method otherwise - - - - - Decrement a mutable reference cell containing an integer - - - - - Used to specify a default value for an optional argument in the implementation of a function - - - - - Converts the argument to 64-bit float. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type - - - - - Converts the argument to a particular enum type. - - - - - Exit the current hardware isolated process, if security settings permit, - otherwise raise an exception. Calls System.Environment.Exit. - - - - - Exponential of the given number - - - - - Throw a FailureException exception - - - - - Converts the argument to 64-bit float. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type - - - - - Converts the argument to 32-bit float. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type - - - - - Floor of the given number - - - - - Return the first element of a tuple, fst (a,b) = a. - - - - - A generic hash function, designed to return equal hash values for items that are - equal according to the "=" operator. By default it will use structural hashing - for F# union, record and tuple types, hashing the complete contents of the - type. The exact behaviour of the function can be adjusted on a - type-by-type basis by implementing GetHashCode for each type. - - - - - The identity function - - - - - Ignore the passed value. This is often used to throw away results of a computation. - - - - - Increment a mutable reference cell containing an integer - - - - - Equivalent to System.Double.PositiveInfinity - - - - - Equivalent to System.Single.PositiveInfinity - - - - - Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Int32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt32 method on the input type - - - - - Converts the argument to signed 16-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Int16.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt16 method on the input type - - - - - Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Int32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt32 method on the input type - - - - - Converts the argument to signed 64-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Int64.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt64 method on the input type - - - - - Throw an ArgumentException exception - - - - - Throw an InvalidOperationException exception - - - - - - - - - - - A generic hash function. This function has the same behaviour as 'hash', - however the default structural hashing for F# union, record and tuple - types stops when the given limit of nodes is reached. The exact behaviour of - the function can be adjusted on a type-by-type basis by implementing - GetHashCode for each type. - - - - - Execute the function as a mutual-exlcusion region using the input value as a lock. - - - - - Natural logarithm of the given number - - - - - Logarithm to base 10 of the given number - - - - - Maximum based on generic comparison - - - - - Minimum based on generic comparison - - - - - Equivalent to System.Double.NaN - - - - - Equivalent to System.Single.NaN - - - - - Converts the argument to signed native integer. This is a direct conversion for all - primitive numeric types and ToIntPtr method otherwise) - - - - - Negate a logical value. not true equals false and not false equals true - - - - - Throw an KeyNotFoundException exception - - - - - Throw an ArgumentNullException exception - - - - - Overloaded addition operator - - - - - Concatenate two lists. - - - - - Apply a function to three values, the values being a triple on the left, the function on the right - - - - - Apply a function to two values, the values being a pair on the left, the function on the right - - - - - Overloaded logical-AND operator - - - - - Overloaded logical-OR operator - - - - - Assign to a mutable reference cell - - - - - Compose two functions, the function on the right being applied first - - - - - Compose two functions, the function on the left being applied first - - - - - Concatenate two strings. The overlaoded operator '+' may also be used. - - - - - Dereference a mutable reference cell - - - - - Overloaded division operator - - - - -Structural equality - - - - - Overloaded logical-XOR operator - - - - - Overloaded power operator. - - - - - Structural greater-than - - - - -Structural greater-than-or-equal - - - - - Overloaded byte-shift left operator by a specified number of bits - - - - - Apply a function to two values, the values being a pair on the right, the function on the left - - - - - Apply a function to three values, the values being a triple on the right, the function on the left - - - - -Structural inequality - - - - - Structural less-than comparison - - - - -Structural less-than-or-equal comparison - - - - - Overloaded logical-NOT operator - - - - - Overloaded modulo operator - - - - - Overloaded multiplication operator - - - - - Apply a function to a value, the value being on the right, the function on the left - - - - - Apply a function to a value, the value being on the left, the function on the right - - - - - The standard overloaded range operator, e.g. [n..m] for lists, seq {n..m} for sequences - - - - - The standard overloaded skip range operator, e.g. [n..skip..m] for lists, seq {n..skip..m} for sequences - - - - - Overloaded byte-shift right operator by a specified number of bits - - - - - Overloaded subtraction operator - - - - - Overloaded unary negation. - - - - - Overloaded prefix=plus operator - - - - - Overloaded power operator. If n > 0 then equivalent to x*...*x for n occurrences of x. - - - - - Raises an exception - - - - - Create a mutable reference cell - - - - - Rethrows an exception. This should only be used when handling an exception - - - - - Round the given number - - - - - Converts the argument to signed byte. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using SByte.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSByte method on the input type - - - - - Sign of the given number - - - - - Sine of the given number - - - - - Converts the argument to 32-bit float. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type - - - - - Hyperbolic sine of the given number - - - - - Returns the internal size of a type in bytes. For example, sizeof<int> returns 4. - - - - - Return the second element of a tuple, snd (a,b) = b. - - - - - Square root of the given number - - - - - Reads the value of the property System.Console.Error. - - - - - Reads the value of the property System.Console.In. - - - - - Reads the value of the property System.Console.Out. - - - - - Converts the argument to a string using ToString. - For standard integer and floating point values the ToString conversion uses CultureInfo.InvariantCulture. - Note, native integer ToString does not support specifying CultureInfo. - - - - - Tangent of the given number - - - - - Hyperbolic tangent of the given number - - - - - Overloaded truncate operator. - - - - - Generate a System.Type representation for a type definition. If the - input type is a generic type instantiation then return the - generic type definition associated with all such instantiations. - - - - - Generate a System.Type runtime represenation of a static type. - The static type is still maintained on the value returned. - - - - - Converts the argument to unsigned 16-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using UInt16.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt16 method on the input type - - - - - Converts the argument to unsigned 32-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using UInt32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt32 method on the input type - - - - - Converts the argument to unsigned 64-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using UInt64.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt64 method on the input type - - - - - Converts the argument to unsigned native integer using a direct conversion for all - primitive numeric types and requiring a ToUintPtr method otherwise - - - - - Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a. - - - - - Clean up resources associated with the input object after the completion of the given function. - Cleanup occurs even when an exception is raised by the protected - code. - - - - - - - - An active pattern to match values of type System.Collections.Generic.KeyValuePair - - - - - Converts the argument to byte. This is a direct conversion for all - primitive numeric types and ToByte method otherwise) - - - - - Converts the argument to unicode character based on UTF16 encoding (a direct conversion for all - primitive numeric types and ToUIntPtr method otherwise) - - - - - Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types and ToInt32 method otherwise) - - - - - Converts the argument to signed 16-bit integer. This is a direct conversion for all - primitive numeric types and ToInt16 method otherwise) - - - - - Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types and ToInt32 method otherwise) - - - - - Converts the argument to signed 64-bit integer. This is a direct conversion for all - primitive numeric types and ToInt64 method otherwise) - - - - - Converts the argument to signed native integer. This is a direct conversion for all - primitive numeric types and ToIntPtr method otherwise) - - - - - Overloaded addition operator (checks for overflow) - - - - - Overloaded multiplication operator (checks for overflow) - - - - - Overloaded subtraction operator (checks for overflow) - - - - - Overloaded unary negation (checks for overflow) - - - - - Converts the argument to signed byte. This is a direct conversion for all - primitive numeric types and ToSByte method otherwise) - - - - - Converts the argument to unsigned 16-bit integer. This is a direct conversion for all - primitive numeric types and ToUInt16 method otherwise) - - - - - Converts the argument to unsigned 32-bit integer. This is a direct conversion for all - primitive numeric types and ToUInt32 method otherwise) - - - - - Converts the argument to unsigned 64-bit integer. This is a direct conversion for all - primitive numeric types and ToUInt64 method otherwise) - - - - - Converts the argument to unsigned native integer. This is a direct conversion for all - primitive numeric types and ToUIntPtr method otherwise) - - - - - This module contains the basic arithmetic operations with overflow checks. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get a slice of an array - - - - - Get a slice of an array - - - - - Get a slice of an array - - - - - Get a slice of an array - - - - - Get a slice from a string - - - - - - - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'byte' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'decimal' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'float' - - - - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int16' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int32' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int64' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'nativeint' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'sbyte' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'float32' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint16' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint32' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint64' - - - - - This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'unativeint' - - - - - Generate a range of byte values - - - - - Generate a range of char values - - - - - Generate a range of float values - - - - - Generate a range of values using the given zero, add, start, step and stop values - - - - - Generate a range of int16 values - - - - - Generate a range of integers - - - - - Generate a range of int64 values - - - - - Generate a range of nativeint values - - - - - Generate a range of sbyte values - - - - - Generate a range of float32 values - - - - - Generate a range of values using the given zero, add, start, step and stop values - - - - - Generate a range of uint16 values - - - - - Generate a range of uint32 values - - - - - Generate a range of uint64 values - - - - - Generate a range of unativeint values - - - - - - - - Set a slice of an array - - - - - Set a slice of an array - - - - - Set a slice of an array - - - - - Set a slice of an array - - - - - - - - - - - - - - - - - - - - - - - - - - A module of compiler intrinsic functions for efficient implementations of F# integer ranges - and dynamic invocations of other F# operators - - - - - Generate a defult value for any type. This is null for reference types, - For structs, this is struct value where all fields have the default value. - This function is unsafe in the sense that some F# values do not have proper null values. - - - - - This module contains basic operations which do not apply runtime and/or static checks - - - - - Basic F# Operators. This module is automatically opened in all F# code. - - - - - Invoke the optimized function value with two curried arguments - - - - - Adapt an F# first class function value to be an optimized function value that can - accept two curried arguments without intervening execution. - - - - - Construct an optimized function value that can accept two curried - arguments without intervening execution. - - - - - The .NET type used to represent F# function values that accept - two iterated (curried) arguments without intervening execution. This type should not - typically used directly from either F# code or from other .NET languages. - - - - - Invoke an F# first class function value that accepts three curried arguments - without intervening execution - - - - - Adapt an F# first class function value to be an optimized function value that can - accept three curried arguments without intervening execution. - - - - - Construct an optimized function value that can accept three curried - arguments without intervening execution. - - - - - The .NET type used to represent F# function values that accept - three iterated (curried) arguments without intervening execution. This type should not - typically used directly from either F# code or from other .NET languages. - - - - - Invoke an F# first class function value that accepts four curried arguments - without intervening execution - - - - - Adapt an F# first class function value to be an optimized function value that can - accept four curried arguments without intervening execution. - - - - - Construct an optimized function value that can accept four curried - arguments without intervening execution. - - - - - The .NET type used to represent F# function values that accept - four iterated (curried) arguments without intervening execution. This type should not - typically used directly from either F# code or from other .NET languages. - - - - - Invoke an F# first class function value that accepts five curried arguments - without intervening execution - - - - - Adapt an F# first class function value to be an optimized function value that can - accept five curried arguments without intervening execution. - - - - - Construct an optimized function value that can accept five curried - arguments without intervening execution. - - - - - The .NET type used to represent F# function values that accept - five iterated (curried) arguments without intervening execution. This type should not - typically used directly from either F# code or from other .NET languages. - - - - - An implementation module used to hold some private implementations of function - value invocation. - - - - bind f inp evaluates to match inp with None -> None | Some x -> f x - - - length inp evaluates to match inp with None -> 0 | Some _ -> 1 - - - exists p inp evaluates to match inp with None -> false | Some x -> p x - - - filter p inp evaluates to match inp with None -> None | Some x -> if p x then inp else None - - - fold_left f s inp evaluates to match inp with None -> s | Some x -> f s x - - - fold_right f inp s evaluates to "match inp with None -> s | Some x -> f x s" - - - - - - - - - - - - forall p inp" evaluates to "match inp with None -> true | Some x -> p x - - - - Gets the value associated with the option. If the option is None then - raises ArgumentException - - - - - Returns true if the option is None - - - - - Returns true if the option is not None - - - - - - - - - - iter f inp executes match inp with None -> () | Some x -> f x - - - filter p inp evaluates to match inp with None -> None | Some x -> if p x then inp else None - - - map f inp evaluates to match inp with None -> None | Some x -> Some (f x) - - - partition p inp evaluates to - match inp with None -> None,None | Some x -> if p x then inp,None else None,inp - - - - Convert the option to an array of length 0 or 1 - - - - - Convert the option to a list of length 0 or 1 - - - - - Basic operations on options. - - - - - Build a new string whose characters are the results of applying the function mapping - to each of the characters of the input string and concatenating the resulting - strings. - - - - - Return a new string made by concatenating the given strings - with separator 'sep', i.e. 'a1 + sep + ... + sep + aN' - - - - - Test if any character of the string satisfies the given predicate. - - - - - - - - Test if all characters in the string satisfy the given predicate. - - - - - Build a new string whose characters are the results of applying the function mapping - to each index from 0 to count-1 and concatenating the resulting - strings. - - - - - Apply the function action to each character in the string. - - - - - Apply the function action to the index of each character in the string and the character itself. - - - - - Return the length of the string. - - - - - Build a new string whose characters are the results of applying the function mapping - to each of the characters of the input string. - - - - - - - - Build a new string whose characters are the results of applying the function mapping - to each character in the string and the character itself. - - - - - Return a string by concatenating count instances of str. - - - - - Functional programming operators for string processing. Further string operations - are available via the member functions on strings and other functionality in - System.String - and System.Text.RegularExpressions types. - - - - - Return the given big integer - - - - - Return the negation of a big integer - - - - - Return the difference of big integers - - - - - Generate a range of big integers, with a step - - - - - Generate a range of big integers - - - - - Return the product of big integers - - - - - Return the modulus of big integers - - - - - This operator is for use from other .NET languages - - - - - This operator is for use from other .NET languages - - - - - This operator is for use from other .NET languages - - - - - This operator is for use from other .NET languages - - - - - This operator is for use from other .NET languages - - - - - This operator is for use from other .NET languages - - - - - Return the ratio of big integers - - - - - Return the sum of two big integers - - - - - Get the big integer for zero - - - - - Return the sign of a big integer: 0, +1 or -1 - - - - - Get the big integer for one - - - - - Return true if a big integer is 'zero' - - - - - Return true if a big integer is 'one' - - - - - - - - Convert a big integer to a 64-bit signed integer - - - - - Convert a big integer to a 32-bit signed integer - - - - - Convert a big integer to a floating point number - - - - - Return n^m for two big integers - - - - - Parse a big integer from a string format - - - - - - - - Return the greatest common divisor of two big integers - - - - - Compute the factorial function as a big integer - - - - - - - - Compute the ratio and remainder of two big integers - - - - - Compute the absolute value of a big integer - - - - - Construct a BigInt value for the given integer - - - - - Construct a BigInt value for the given 64-bit integer - - - - - The type of arbitrary-sized integers - - - - - Abstract internal type - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return a typed native pointer by adding index * sizeof<'T> to the - given input pointer - - - - - Dereference the typed native pointer computed by adding index * sizeof<'T> to the - given input pointer - - - - - Get the address of an element of a pinned array - - - - - Get the address of an element of a pinned 2-dimensional array - - - - - Return a typed native pointer for a given machine address - - - - - Dereference the given typed native pointer - - - - - Assign the value into the memory location referenced by the typed native - pointer computed by adding index * sizeof<'T> to the given input pointer - - - - - Return a machine address for a given typed native pointer - - - - - Assign the value into the memory location referenced by the given typed native pointer - - - - - Contains operations on native pointers. Use of these operators may - result in the generation of unverifiable code. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns type of an expression - - - - - Returns the custom attributes of an expression - - - - - Build an expression that represents a while loop - - - - - Build an expression that represents setting a mutable variable - - - - - Build an expression that represents a variable - - - - - Build an expression that represents a constant value of a particular type - - - - - Build an expression that represents a constant value - - - - - Build an expression that represents a test of a value is of a particular union case - - - - - Build an expression that represents a type test - - - - - Build an expression that represents getting a field of a tuple - - - - - Build an expression that represents a try/with construct for exception filtering and catching - - - - - Try and find a stored reflection definition for the given method. Stored reflection - definitions are added to an F# assembly through the use of the [<ReflectedDefinition>] attribute. - - - - - Build an expression that represents a try/finally construct - - - - - Substitute through the given expression using the given functions - to map variables to new values. The functions must give consistent results - at each application. Variable renaming may occur on the target expression - if variable capture occurs. - - - - - Build an expression that represents the sequential execution of one expression followed by another - - - - - Permit interactive environments such as F# Interactive - to explicitly register new pickled resources that represent persisted - top level definitions. The string indicates a unique name for the resources - being added. The format for the bytes is the encoding generated by the F# compiler. - - - - - Build an expression that represents a nested quotation literal - - - - - Build an expression that represents writing to a property of an object - - - - - Build an expression that represents writing to a static property - - - - - Build an expression that represents reading a property of an object - - - - - Build an expression that represents reading a static property - - - - - Build an expression that represents the creation of a union case value - - - - - Build an expression that represents the creation of an F# tuple value - - - - - Build record-construction expressions - - - - - Build an expression that represents the invocation of an object constructor - - - - - Build an expression that represents the creation of a delegate value for the given type - - - - - Build an expression that represents the creation of an array value initialized with the given elements - - - - - Build recursives expressions associated with 'let rec' constructs - - - - - Build expressions associated with 'let' constructs - - - - - Build an expression that represents the constrution of an F# function value - - - - - Build 'if ... then ... else' expressions - - - - - Fetch or create a new variable with the given name and type from a global pool of shared variables - indexed by name and type. The type is given by the expicit or inferred type parameter - - - - - Get the free expression variables of an expression as a list - - - - - Build a 'for i = ... to ... do ...' expression that represent loops over integer ranges - - - - - Build an expression that represents writing to a static field - - - - - Build an expression that represents writing to a field of an object - - - - - Build an expression that represents the access of a static field - - - - - Build an expression that represents the access of a field of an object - - - - - - - - This function is called automatically when quotation syntax (<@ @>) and related typed-expression - quotations are used. The bytes are a pickled binary representation of an unlinked form of the qutoed expression, - and the System.Type argument is any type in the assembly where the quoted - expression occurs, i.e. it helps scope the interpretation of the cross-assembly - references in the bytes. - - - - - Build an expression that represents the invocation of a default object constructor - - - - - Build an expression that represents the coercion of an expression to a type - - - - - Return a new typed expression given an underlying runtime-typed expression. - A type annotation is usually required to use this function, and - using an incorrect type annotation may result in a later runtime exception. - - - - - Build an expression that represents a call to an static method or module-bound function - - - - - Build an expression that represents a call to an instance method associated with an object - - - - - Build an expression that represents the application of a first class function value to multiple arguments - - - - - Build an expression that represents the application of a first class function value to a single argument - - - - - Build an expression that represents setting the value held at a particular address - - - - - Build an expression that represents getting the address of a value - - - - - Quoted expressions annotated with System.Type values. - - - - - Get the raw expression associated with this type-carrying expression - - - - - Type-carrying quoted expressions. Expressions are generated either - by quotations in source text or programatically - - - - - The type associated with the variable - - - - - The declared name of the variable - - - - - Indicates if the variable represents a mutable storage location - - - - - Fetch or create a new variable with the given name and type from a global pool of shared variables - indexed by name and type - - - - - Create a new variable with the given name, type and mutability - - - - - Information at the binding site of a variable - - - - - An active pattern to recognize expressions of the form a && b - - - - - An active pattern to recognize expressions that represent the application of a (possibly curried or tupled) first class function value - - - - - An active pattern to recognize constant boolean expressions - - - - - An active pattern to recognize constant byte expressions - - - - - An active pattern to recognize constant unicode character expressions - - - - - An active pattern to recognize constant 64-bit floating point number expressions - - - - - An active pattern to recognize constant int16 expressions - - - - - An active pattern to recognize constant int32 expressions - - - - - An active pattern to recognize constant int64 expressions - - - - - An active pattern to recognize expressions that represent a (possibly curried or tupled) first class function value - - - - - An active pattern to recognize methods that have an associated ReflectedDefinition - - - - - An active pattern to recognize expressions of the form a || b - - - - - An active pattern to recognize property getters or values in modules that have an associated ReflectedDefinition - - - - - An active pattern to recognize property setters that have an associated ReflectedDefinition - - - - - An active pattern to recognize constant signed byte expressions - - - - - An active pattern to recognize constant 32-bit floating point number expressions - - - - - A parameterized active pattern to recognize calls to a specified function or method - - - - - An active pattern to recognize constant string expressions - - - - - An active pattern to recognize constant unsigned int16 expressions - - - - - An active pattern to recognize constant unsigned int32 expressions - - - - - An active pattern to recognize constant unsigned int64 expressions - - - - - An active pattern to recognize () constant expressions - - - - - Contains a set of derived F# active patterns to analyze F# expression objects - - - - - Re-build combination expressions. The first parameter should be an object - returned by the ShapeCombination case of the active pattern in this module. - - - - - An active pattern that performs a complete decomposition viewing the expression tree as a binding structure - - - - - Active patterns for traversing, visiting, rebuilding and tranforming expressions in a generic way - - - - - An active pattern to recognize expressions that represent getting the address of a value - - - - - An active pattern to recognize expressions that represent setting the value held at an address - - - - - An active pattern to recognize expressions that represent applications of first class function values - - - - - An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules - - - - - An active pattern to recognize expressions that represent coercions from one type to another - - - - - An active pattern to recognize expressions that represent invocations of a default constructor of a struct - - - - - An active pattern to recognize expressions that represent getting a static or instance field - - - - - An active pattern to recognize expressions that represent setting a static or instance field - - - - - An active pattern to recognize expressions that represent loops over integer ranges - - - - - An active pattern to recognize expressions that represent conditionals - - - - - An active pattern to recognize expressions that represent first class function values - - - - - An active pattern to recognize expressions that represent recursive let bindings of one or more variables - - - - - An active pattern to recognize expressions that represent let bindings - - - - - An active pattern to recognize expressions that represent the construction of arrays - - - - - An active pattern to recognize expressions that represent construction of delegate values - - - - - An active pattern to recognize expressions that represent invocation of object constructors - - - - - An active pattern to recognize expressions that represent construction of record values - - - - - An active pattern to recognize expressions that represent construction of tuple values - - - - - An active pattern to recognize expressions that represent construction of particular union case values - - - - - An active pattern to recognize expressions that represent the read of a static or instance property, or a non-function value declared in a module - - - - - An active pattern to recognize expressions that represent setting a static or instance property, or a non-function value declared in a module - - - - - An active pattern to recognize expressions that represent a nested quotation literal - - - - - An active pattern to recognize expressions that represent sequential exeuction of one expression followed by another - - - - - An active pattern to recognize expressions that represent a try/finally construct - - - - - An active pattern to recognize expressions that represent a try/with construct for exception filtering and catching - - - - - An active pattern to recognize expressions that represent getting a tuple field - - - - - An active pattern to recognize expressions that represent a dynamic type test - - - - - An active pattern to recognize expressions that represent a test if a value is of a particular union case - - - - - An active pattern to recognize expressions that represent a constant value - - - - - An active pattern to recognize expressions that represent setting a mutable variable - - - - - An active pattern to recognize expressions that represent a variable - - - - - An active pattern to recognize expressions that represent while loops - - - - - Contains a set of primitive F# active patterns to analyze F# expression objects - - - - - Return a System.Type representing an F# tuple type with the given element types - - - - - Return a System.Type representing the F# function type with the given domain and range - - - - - Return true if the typ is a representation of an F# union type or the runtime type of a value of that type - - - - - Return true if the typ is a representation of an F# tuple type - - - - - Return true if the typ is a representation of an F# record type - - - - - Return true if the typ is a System.Type value corresponding to the compiled form of an F# module - - - - - Return true if the typ is a representation of an F# function type or the runtime type of a closure implementing an F# function type - - - - - Return true if the typ is a representation of an F# exception declaration - - - - - Get the cases of a union type. - - Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. - - - - - Get the tuple elements from the representation of an F# tuple type - - - - - Read all the fields from a record value, in declaration order - - Assumes the given input is a record value. If not, ArgumentException is raised. - - - - - Get the domain and range types from an F# function type or from the runtime type of a closure implementing an F# type - - - - - Read all the fields from an F# exception declaration, in declaration order - - Assumes exceptionType is an exception representation type. If not, ArgumentException is raised. - - - - - Contains operations associated with constructing and analyzing F# types such as records, unions and tuples - - - - - Assumes the given type is a union type. - If not, ArgumentException is raised during pre-computation. - - Using the computed function is more efficient than calling GetUnionCase - because the path executed by the computed function is optimized given the knowledge that it will be - used to read values of the given type. - - - - - Precompute a property or static method for reading an integer representing the case tag of a union type. - - - - - Precompute a function for reading all the fields for a particular discriminator case of a union type - - Using the computed function will typically be faster than executing a corresponding call to GetFields - - - - - A method that constructs objects of the given case - - - - - Precompute a function for constructing a discriminated union value for a particular union case. - - - - - Precompute a function for reading the values of a particular tuple type - - Assumes the given type is a TupleType. - If not, ArgumentException is raised during pre-computation. - - - - - Get information that indicates how to read a field of a tuple - - - - - Get a method that constructs objects of the given tuple type. - For small tuples, no additional typoe will be returned. - - For large tuples, an additional type is returned indicating that - a nested encoding has been used for the tuple type. In this case - the suffix portion of the tuple type has the given type and an - object of this type must be created and passed as the last argument - to the ConstructorInfo. A recursive call to PreComputeTupleConstructorInfo - can be used to determine the constructor for that the suffix type. - - - - - Precompute a function for reading the values of a particular tuple type - - Assumes the given type is a TupleType. - If not, ArgumentException is raised during pre-computation. - - - - - Precompute a function for reading all the fields from a record. The fields are returned in the - same order as the fields reported by a call to Microsoft.FSharp.Reflection.Type.GetInfo for - this type. - - Assumes the given type is a RecordType. - If not, ArgumentException is raised during pre-computation. - - Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo - because the path executed by the computed function is optimized given the knowledge that it will be - used to read values of the given type. - - - - - Precompute a function for reading a particular field from a record. - Assumes the given type is a RecordType with a field of the given name. - If not, ArgumentException is raised during pre-computation. - - Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo - because the path executed by the computed function is optimized given the knowledge that it will be - used to read values of the given type. - - - - - Get a ConstructorInfo for a record type - - - - - Precompute a function for constructing a record value. - - Assumes the given type is a RecordType. - If not, ArgumentException is raised during pre-computation. - - - - - Create a union case value - - - - - Create an instance of a tuple type - - Assumes at least one element is given. If not, ArgumentException is raised. - - - - - Create an instance of a record type - - Assumes the given input is a record type. If not, ArgumentException is raised. - - - - - Build a typed function from object from a dynamic function implementation - - - - - Identify the union case and its fields for an object - - Assumes the given input is a union case value. If not, ArgumentException is raised. - - If the type is not given, then the runtime type of the input object is used to identify the - relevant union type. The type should always be given if the input object may be null. For example, - option values may be represented using the 'null'. - - - - - Read all fields from a tuple - - Assumes the given input is a tuple value. If not, ArgumentException is raised. - - - - - Read a field from a tuple value - - Assumes the given input is a tuple value. If not, ArgumentException is raised. - - - - - Read all the fields from a record value - - Assumes the given input is a record value. If not, ArgumentException is raised. - - - - - Read a field from a record value - - Assumes the given input is a record value. If not, ArgumentException is raised. - - - - - Read all the fields from a value built using an instance of an F# exception declaration - - Assumes the given input is an F# exception value. If not, ArgumentException is raised. - - - - - Contains operations associated with constructing and analyzing values associated with F# types such as records, unions and tuples - - - - - The integer tag for the case - - - - - The name of the case - - - - - The type in which the case occurs - - - - - The fields associated with the case, represented by PropertyInfo - - - - - Return the custom attributes associated with the case - - - - - Return the custom attributes associated with the case matching the given attribute type - - - - -Represents a case of a discriminated union type - - - - - Type of a formatting expression - 'Printer : function type generated by printf - 'State: type argument passed to %a formatters - 'Residue: value generated by the overall printf action (e.g. sprint generates a string) - 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - - - - - Type of a formatting expression - 'Printer : function type generated by printf - 'State: type argument passed to %a formatters - 'Residue: value generated by the overall printf action (e.g. sprint generates a string) - 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - 'Tuple: tuple of values generated by scan or match - - - - - The raw text of the format string - - - - - Construct a format string - - - - - Type of a formatting expression. - 'Printer : function type generated by printf - 'State: type argument passed to %a formatters - 'Residue: value generated by the overall printf action (e.g. sprint generates a string) - 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - - - - - Construct a format string - - - - - Type of a formatting expression. - 'Printer : function type generated by printf - 'State: type argument passed to %a formatters - 'Residue: value generated by the overall printf action (e.g. sprint generates a string) - 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - 'Tuple: tuple of values generated by scan or match - - - - - Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The type parameter indicates the - arguments and return type of the format operation. - - - - - Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The first type parameter indicates the - arguments of the format operation and the last the overall return type. - - - - - Represents a statically-analyzed format when formatting builds a string. The type parameter indicates the - arguments and return type of the format operation. - - - - - Represents a statically-analyzed format when formatting builds a string. The first type parameter indicates the - arguments of the format operation and the last the overall return type. - - - - - Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The type parameter indicates the - arguments and return type of the format operation. - - - - - Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The first type parameter indicates the - arguments of the format operation and the last the overall return type. - - - - - Print to a System.Text.StringBuilder - - - - - Formatted printing to stderr - - - - - Formatted printing to stderr, adding a newline - - - - - Print to a string buffer and raise an exception with the given - result. Helper printers must return strings. - - - - - Print to a text writer or an OCaml-compatible channel - - - - - Print to a text writer or an OCaml-compatible channel, adding a newline - - - - - bprintf, but call the given 'final' function to generate the result. - See kprintf. - - - - - fprintf, but call the given 'final' function to generate the result. - See kprintf. - - - - - printf, but call the given 'final' function to generate the result. - For example, these let the printing force a flush after all output has - been entered onto the channel, but not before. - - - - - sprintf, but call the given 'final' function to generate the result. - See kprintf. - - - - - twprintf, but call the given 'final' function to generate the result. - See kprintf. - - - - - Formatted printing to stdout - - - - - Formatted printing to stdout, adding a newline - - - - - Print to a string via an internal string buffer and return - the result as a string. Helper printers must return strings. - - - - - Print to any subtype of the .NET type System.IO.TextWriter - - - - - Print to any subtype of the .NET type System.IO.TextWriter, and add a newline - - - - - Extensible printf-style formatting for numbers and other datatypes - - Format specifications are strings with "%" markers indicating format - placeholders. Format placeholders consist of: - - %[flags][width][.precision][type] - - where the type is interpreted as follows: - - %b: bool, formatted as "true" or "false" - %s: string, formatted as its unescaped contents - %d, %i: any basic integer type formatted as a decimal integer, signed if the basic integer type is signed. - %u: any basic integer type formatted as an unsigned decimal integer - %x, %X, %o: any basic integer type formatted as an unsigned hexadecimal - (a-f)/Hexadecimal (A-F)/Octal integer - - %e, %E, %f, %F, %g, %G: - any basic floating point type (float,float32) formatted - using a C-style floating point format specifications, i.e - - %e, %E: Signed value having the form [-]d.dddde[sign]ddd where - d is a single decimal digit, dddd is one or more decimal - digits, ddd is exactly three decimal digits, and sign - is + or - - - %f: Signed value having the form [-]dddd.dddd, where dddd is one - or more decimal digits. The number of digits before the - decimal point depends on the magnitude of the number, and - the number of digits after the decimal point depends on - the requested precision. - - %g, %G: Signed value printed in f or e format, whichever is - more compact for the given value and precision. - - - %M: System.Decimal value - - %O: Any value, printed by boxing the object and using it's ToString method(s) - - %A: Any value, printed by using Microsoft.FSharp.Text.StructuredPrintfImpl.Display.any_to_string with the default layout settings - - %a: A general format specifier, requires two arguments: - (1) a function which accepts two arguments: - (a) a context parameter of the appropriate type for the - given formatting function (e.g. an #System.IO.TextWriter) - (b) a value to print - and which either outputs or returns appropriate text. - - (2) the particular value to print - - - %t: A general format specifier, requires one argument: - (1) a function which accepts a context parameter of the - appropriate type for the given formatting function (e.g. - an System.IO.TextWriter)and which either outputs or returns - appropriate text. - - Basic integer types are: - byte,sbyte,int16,uint16,int32,uint32,int64,uint64,nativeint,unativeint - Basic floating point types are: - float, float32 - - The following format patterns are accepted but a warning is printed: - - %h(d|u|x|X|o) - %l(d|u|x|X|o) - - The following format patterns are now deprecated: - - %Ld, %Li, %Lu, %Lx, %LX, %Lo: same, but an int64 - %nd, %ni, %nu, %nx, %nX, %no: same, but a nativeint - %Ud, %Ui, %Uu, %Ux, %UX, %Uo: same, but an unsigned int32 (uint32) - %ULd, %ULi, %ULu, %ULx, %ULX, %ULo: same, but an unsigned int64 (uint64) - %Und, %Uni, %Unu, %Unx, %UnX, %Uno: same, but an unsigned nativeint (unativeint) - - The optional width is an integer indicating the minimal width of the - result. For instance, %6d prints an integer, prefixing it with spaces - to fill at least 6 characters. If width is '*', then an extra integer - argument is taken to specify the corresponding width. - - any number - '*': - - Valid flags are: - - 0: add zeros instead of spaces to make up the required width - '-': left justify the result within the width specified - '+': add a '+' character if the number is positive (to match a '-' sign - for negatives) - ' ': add an extra space if the number is positive (to match a '-' - sign for negatives) - - The printf '#' flag is invalid and a compile-time error will be reported if it is used. - - - - - - - - A record of options to control structural formatting. - For F# Interactive properties matching those of this value can be accessed via the 'fsi' - value. - - Floating Point format given in the same format accepted by System.Double.ToString, - e.g. f6 or g15. - - If ShowProperties is set the printing process will evaluate properties of the values being - displayed. This may cause additional computation. - - The ShowIEnumerable is set the printing process will force the evalution of IEnumerable objects - to a small, finite depth, as determined by the printing parameters. - This may lead to additional computation being performed during printing. - - - From F# Interactive the default settings can be adjusted using, for example, -
-   open Microsoft.FSharp.Compiler.Interactive.Settings;;
-   setPrintWidth 120;;
- 
-
-
-
- - - Data representing structured layouts of terms. - - - - - Convert any value to a string using a standard formatter - Data is typically formatted in a structured format, e.g. - lists are formatted using the "[1;2]" notation. - The details of the format are not specified and may change - from version to version and according to the flags given - to the F# compiler. The format is intended to be human-readable, - not machine readable. If alternative generic formats are required - you should develop your own formatter, using the code in the - implementation of this file as a starting point. - - Data from other .NET languages is formatted using a virtual - call to Object.ToString() on the boxed version of the input. - - - - - Convert any value to a layout using the given formatting options. The - layout can then be processed using formatting display engines such as - those in the LayoutOps module. any_to_string and output_any are - built using any_to_layout with default format options. - - - - - Ouput any value to a channel using the same set of formatting rules - as any_to_string - - - - - - - - - - - Layout two vertically. - - - - - Layout list vertically. - - - - - Wrap braces around layout. - - - - - Wrap round brackets around Layout. - - - - - Join layouts into a comma separated list. - - - - - The empty layout - - - - - Is it the empty layout? - - - - - An string which is left parenthesis (no space on the right). - - - - - Layout like an F# list. - - - - - An uninterpreted leaf, to be interpreted into a string - by the layout engine. This allows leaf layouts for numbers, strings and - other atoms to be customized according to culture. - - - - - Join broken with ident=0 - - - - - Join broken with ident=1 - - - - - Join broken with ident=2 - - - - - Join, unbreakable. - - - - - Join, possible break with indent=1 - - - - - Join, possible break with indent=2 - - - - - Join, possible break with indent=0 - - - - - Layout like an F# option. - - - - - An string which is right parenthesis (no space on it's left). - - - - - Join layouts into a semi-colon separated list. - - - - - An string which requires no spaces either side. - - - - - Join layouts into a list separated using the given Layout. - - - - - Join layouts into a space separated list. - - - - - Wrap square brackets around layout. - - - - - See tagL - - - - - Form tuple of layouts. - - - - - For limitting layout of list-like sequences (lists,arrays,etc). - unfold a list of items using (project and z) making layout list via itemL. - If reach maxLength (before exhausting) then truncate. - - - - - An string leaf - - - - - A layout is a sequence of strings which have been joined together. - The strings are classified as words, separators and left and right parenthesis. - This classification determines where spaces are inserted. - A joint is either unbreakable, breakable or broken. - If a joint is broken the RHS layout occurs on the next line with optional indentation. - A layout can be squashed to for given width which forces breaks as required. - - -
-
diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.LanguageService.Base.dll b/tools/FSharp_1.9.6.16/bin/FSharp.LanguageService.Base.dll deleted file mode 100644 index b06cbf74..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.LanguageService.Base.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.LanguageService.dll b/tools/FSharp_1.9.6.16/bin/FSharp.LanguageService.dll deleted file mode 100644 index 0b6a0d99..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.LanguageService.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Build.Tasks.dll b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Build.Tasks.dll deleted file mode 100644 index 916899c0..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Build.Tasks.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Build.Tasks.pdb b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Build.Tasks.pdb deleted file mode 100644 index f2ccb594..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Build.Tasks.pdb and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Build.Tasks.xml b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Build.Tasks.xml deleted file mode 100644 index a282a109..00000000 --- a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Build.Tasks.xml +++ /dev/null @@ -1,104 +0,0 @@ - - -FSharp.PowerPack.Build.Tasks - - - - The default location of FSharp.Core.dll and fsc.exe based on the version of fsc.exe that is running - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Linq.dll b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Linq.dll deleted file mode 100644 index e721d495..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Linq.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Linq.pdb b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Linq.pdb deleted file mode 100644 index 333f518e..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Linq.pdb and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Linq.xml b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Linq.xml deleted file mode 100644 index 529a7c69..00000000 --- a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Linq.xml +++ /dev/null @@ -1,337 +0,0 @@ - - -FSharp.PowerPack.Linq - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - When used in queries, this operator corresponds to the LINQ Min operator and the query convertor recognises it as such - It differs in return type from Seq.min_by - - - - - When used in queries, this operator corresponds to the LINQ Join operator and the query convertor recognises it as such - - - - - This join operator implements the LINQ GroupJoin operator and the query convertor recognises it as such - - - - - When used in queries, this operator corresponds to the LINQ Join operator and the query convertor recognises it as such - - - - - This join operator implements the LINQ GroupJoin operator and the query convertor recognises it as such - - - - - This join operator corresponds to the LINQ Join operator and the query convertor recognises it as such - - - - - When used in queries, this operator corresponds to the LINQ Max operator and the query convertor recognises it as such - It differs in return type from Seq.max_by - - - - - When used in queries, this operator corresponds to the LINQ Max operator and the query convertor recognises it as such - It differs in return type from Seq.max_by - - - - - When used in queries, this operator corresponds to the LINQ Min operator and the query convertor recognises it as such - It differs in return type from Seq.min_by - - - - - When used in queries, this operator corresponds to the LINQ Min operator and the query convertor recognises it as such - It differs in return type from Seq.min_by - - - - - Evaluate the quotation expression by first converting to a LINQ expression tree - making use of IQueryable operators and then executing expression tree - - Exceptions: InvalidArgumentException will be raised if the input expression is - not in the subset that can be converted to a LINQ expression tree - - - - - - - - This function should not be called directly. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A set of types used for implementing quotation conversions. - These are public only because targets of Linq Lambda expressions require them to be so - - - - - This module provides Compile and Eval extension members - for F# quotation values, implemented by translating to LINQ - expression trees and using the LINQ dynamic compiler. - - - - diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Math.Providers.dll b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Math.Providers.dll deleted file mode 100644 index 5b503731..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Math.Providers.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Metadata.dll b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Metadata.dll deleted file mode 100644 index 90fe9a2f..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Metadata.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Metadata.pdb b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Metadata.pdb deleted file mode 100644 index ebe05c3d..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Metadata.pdb and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Metadata.xml b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Metadata.xml deleted file mode 100644 index f518051f..00000000 --- a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Metadata.xml +++ /dev/null @@ -1,5569 +0,0 @@ - - -FSharp.PowerPack.Metadata - - - - - - - Return the System.Reflection.Assembly object for the assembly - - - - - Holds the full qualified assembly name - - - - - Get the object representing the F# core library (FSharp.Core.dll) for the running program - - - - - A handle to the full specification of the contents of the module contained in this Assembly - - - - - A hint as to where does the code for the CCU live (e.g what was the tcConfig.implicitIncludeDir at compilation time for this DLL?) - - - - - Return the System.Reflection.Assembly object for the assembly - - - - - This is one way of starting the loading process off. - - - - - This is one way of starting the loading process off. Dependencies are automatically - resolved by calling System.Reflection.Assembly.Load. - - - - - - - - - - - - - - - - - The declared documentation for the type or module - - - - - Indicates the type prefers the "tycon<a,b>" syntax for display etc. - - - - - The cases of a discriminated union - - - - - The fields of the class, struct or enum - - - - - The declaration location for the type constructor - - - - - Get the fully qualified name of the type or module - - - - - - - - The name of the type, possibly with `n mangling - - - - - Properties, methods etc. with implementations, also values in a module - - - - - Indicates the type is a struct - - - - - Indicates the entity is an F# module definition - - - - - Indicates the entity is a measure definition - - - - - If true, then this is a reference to something in some .NET assembly from another .NET language - - - - - Indicates an F# exception declaration - - - - - Indicates the type is a measure, type or exception abbreviation - - - - - Interface implementations - boolean indicates compiler-generated - - - - - Indicates that a module is compiled to a class with the given mangled name. The mangling is reversed during lookup - - - - - Indicates the type is implemented through a mapping to IL assembly code. THis is only - true for types in FSharp.Core.dll - - - - - Get the generic parameters, possibly including unit-of-measure parameters - - - - - Base type, if any - - - - - The declared attributes for the type - - - - - - - - Return the System.Type for the type - - Raises InvalidOperationException if the type is an abbreviation or has an assembly code representation. - - - - - Return the FSharpEntity corresponding to a .NET type - - - - - - - - The documentation for the type parameter. - - - - - - - - - - - Is this a ^a type variable - - - - - Is this a measure variable - - - - - The declared attributes of the type parameter. - - - - - - - - An F# discriminated union, as an object model - - - - - - - - XML documentation attached to a value. - - - - - The full type of the member or value when used as a first class value - - - - - - - - - - - Is this an F# type function - - - - - Is this a mutable value - - - - - Is this a module or member value - - - - - Is this an implicit constructor? - - - - - Is this an extension member? - - - - - Is this a compiler generated value - - - - - Is this a must-inline value - - - - - The typars of the member or value - - - - - - - - The member name in compiled code - - - - - Custom attributes attached to the value. These contain references to other values (i.e. constructors in types). Mutable to fixup - these value references after copying a colelction of values. - - - - - - - - - - - - - - - - - - - - - - - Documentation for the field - - - - - The type of the field, w.r.t. the generic parameters of the enclosing type constructor - - - - - Declaration-location of the field - - - - - Attributes attached to generated property - - - - - Name of the field - - - - - Indicates a static field - - - - - Is the field declared in F#? - - - - - Indicates a compiler generated field, not visible to Intellisense or name resolution - - - - - Attributes attached to generated field - - - - - - - - Get the named entity for a type constructed using a named entity - - - - - Indicates the type is a tuple type. The GenericArguments property returns the elements of the tuple type. - - - - - Indicates the type is constructed using a named entity - - - - - Indicates the type is a variable type, whether declared, generalized or an inference type parameter - - - - - Indicates the type is a function type. The GenericArguments property returns the domain and range of the function type. - - - - - Get the index for a generic parameter type - - - - - Get the generic parameter data for a generic parameter type - - - - - Get the generic arguments for a tuple type, a function type or a type constructed using a named entity - - - - - - - - Documentation for the case - - - - - Return type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it - - - - - Range of the name of the case - - - - - Name of the case - - - - - Data carried by the case. - - - - - Name of the case in generated IL code - - - - - Attributes, attached to the generated static method to make instances of the case - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Calling conventions. These are used in method pointer types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Global state: table of all assembly references keyed by AssemblyRefData - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The explicit offset in bytes when explicit layout is used. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index table by name and arity. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is used to store event, property and field maps. - - Review: this is not such a great data structure. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - keyed first on namespace then on type name. The namespace is often a unique key for a given type map. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A little ugly, but the idea is that if a data structure does not - contain lazy values then we don't add laziness. So if the thing to map - is already evaluated then immediately apply the function. - - - - - - - - Global State. All namespace splits - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Like Fixup but loader may return None, in which case there is no fixup. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Used when generating the secret paths used by FSI file generation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The characters that are allowed to be in an identifier. - - - - - Is this character a part of a long identifier - - - - - - - - - - - - - - - - - Used when generating the secret paths used by FSI file generation - - - - - Used when generating the secret paths used by FSI file generation - - - - - Try to chop "get_" or "set_" from a string - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Attrib(kind,unnamedArgs,propVals) - - - - - We keep both source expression and evaluated expression around to help intellisense and signature printing - - - - - - - - AttribNamedArg(name,type,isField,value) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The result of attempting to resolve an assembly name to a full ccu. - UnresolvedCcu will contain the name of the assembly that could not be resolved. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ensure the ccu is derefable in advance. Supply a path to attach to any resulting error message. - - - - - - - - - - - A relinkable handle to the contents of a compilation unit. Relinking is performed by mutation. - - - - - - - - - - - - - - The information ILXGEN needs about the location of an item - - - - - Specifies the compiled representations of type and exception definitions. - Computed and cached by later phases (never computed type checking). Cached at - type and exception definitions. Not pickled. - - - - - Constants in expressions - - - - - Decision trees. Pattern matching has been compiled down to - a decision tree by this point. The right-hand-sides (actions) of - the decision tree are labelled by integers that are unique for that - particular tree. - - - - - - - - - - - A target of a decision tree. Can be thought of as a little function, though is compiled as a local block. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From TAST TyconRef to IL ILTypeRef - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A named module-or-namespace-fragment definition - - - - - The module_typ is a binder. However it is not used in the ModuleOrNamespaceExpr: it is only referenced from the 'outside' - The contents of a module-or-namespace-fragment definition - - - - - A type for a module-or-namespace-fragment and the actual definition of the module-or-namespace-fragment - - - - - - - - note: ModuleOrNamespaceRef and TyconRef are type equivalent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Namespace or module-compiled-as-type? - - - - - - - - - - - - - - - - - Values, including members in F# types in this module-or-namespace-fragment. - - - - - Type, mapping mangled name to Tycon, e.g. - - - - - Lookup tables keyed the way various clients expect them to be keyed. - We attach them here so we don't need to store lookup tables via any other technique - - - - - - - - - - - Mutation used during compilation of FSharp.Core.dll - - - - - - - - - - - - - - Non-local references indirect via a CCU - The lookup into the CCU is a NonLocalPath, which is a series of strings - We cache the result of dereferencing - - - - - - - - - - - - - - - - - - - - - - - Index into the namespace/module structure of a particular CCU - - - - - - - - A representation of a method in an object expression. - Note: Methods associated with types are represented as val declarations - Note: We should probably use val_specs for object expressions, as then the treatment of members - in object expressions could be more unified with the treatment of members in types - - - - - - - - - - - A public path records where a construct lives within the global namespace - of a CCU. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This ModuleOrNamespace that represents the compilation of a module as a class. - The same set of tycons etc. are bound in the ModuleOrNamespace as in the ModuleOrNamespaceExpr - This is the body of the module/namespace - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The extra metadata stored about typars for top-level definitions. Any information here is propagated from signature through - to the compiled code. - - - - - The extra metadata stored about typars for top-level definitions. Any information here is propagated from signature through - to the compiled code. - - - - - - - - - - - - - - - - - The specification of a member constraint that must be solved - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The ILX data structure representing the discriminated union. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The type of the value. - May be a Type_forall for a generic value. - May be a type variable or type containing type variables during type inference. - - - - - - - - - - - - - - A unique stamp within the context of this invocation of the compiler process - - - - - - - - - - - The place where the value was defined. - - - - - What is the public path to the value, if any? Should be set if and only if - IsMemberOrModuleBinding is set. - - - - - - - - Is this a member, if so some more data about the member. - - Note, the value may still be (a) an extension member or (b) and abtract slot without - a true body. - - - - - - - - - - - The internal name the value. - - - - - Was the value inferred to be a method or function that definitely makes no critical tailcalls? - - - - - The value of a value or member marked with [<LiteralAttribute>] - - - - - - - - - - - - - - - - - - - - Is this a member definition or module definition? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Is this represented as a "top level" static binding (i.e. a static field, static member, - instance member), rather than an "inner" binding that may result in a closure. - - This is implied by IsMemberOrModuleBinding, however not vice versa, for two reasons. - Some optimizations mutate this value when they decide to change the representation of a - binding to be IsCompiledAsTopLevel. Second, even immediately after type checking we expect - some non-module, non-member bindings to be marked IsCompiledAsTopLevel, e.g. 'y' in - 'let x = let y = 1 in y + y' (NOTE: check this, don't take it as gospel) - - - - - - - - - - - - - - Range of the definition (implementation) of the value, used by Visual Studio - Updated by mutation when the implementation is matched against the signature. - - - - - - - - - - - - - - - - - - - - The parent type or module, if any (None for expression bindings and parameters) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - References are either local or nonlocal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The big type of expressions. - - - - - - - - - - - - - - The algebra of types - - - - - - - - Unique name generator for stamps attached to lambdas and object expressions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create a module Tycon based on an existing one using the function 'f'. - We require that we be given the parent for the new module. - We pass the new module to 'f' in case it needs to reparent the - contents of the module. - - - - - Create a tycon based on an existing one using the function 'f'. - We require that we be given the new parent for the new tycon. - We pass the new tycon to 'f' in case it needs to reparent the - contents of the tycon. - - - - - Create a Val based on an existing one using the function 'f'. - We require that we be given the parent for the new Val. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Given (newPath,oldPath) replace oldPath by newPath in the TAccess. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Equality on CCUs, implemented as reference equality - - - - - - - - - - - - - - - - - - - - - - - - - - Combine module types when multiple namespace fragments contribute to the - same namespace, making new module specs as we go. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Identical to tcref.Deref and deref_tycon, just used to help distinguish what kind of entity we expect here - - - - - - - - - - - - - - - - - - - - Compiler-internal references to items in fslib are generated as Ref_nonlocal even when compiling fslib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Unique name generator for stamps attached to to val_specs, tycon_specs etc. - - - - - - - - - - - This predicate tests if non-local resolution paths are definitely known to resolve - to different entities. All references with different named paths always resolve to - different entities. Two references with the same named paths may resolve to the same - entities even if they reference through different CCUs, because one reference - may be forwarded to another via a .NET TypeForwarder. - - - - - - - - - - - - - - - - - - - - See nlpath_definitely_not_eq - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Equality on type varialbes, implemented as reference equality - - - - - - - - - - - - - - - - - - - - - - - - - -verboseStamps: print #stamp on each id -- very verbose - but sometimes useful. Turn on using '--stamps' - - - - - - - - Equality on value specs, implemented as reference equality - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Metadata on values (names of arguments etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The default location of FSharp.Core.dll and fsc.exe based on the version of fsc.exe that is running - - - - - - - - - - - - - diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.Excel.dll b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.Excel.dll deleted file mode 100644 index 9c67c026..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.Excel.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.Neutral.dll b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.Neutral.dll deleted file mode 100644 index 5bc82faf..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.Neutral.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.XCeed.dll b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.XCeed.dll deleted file mode 100644 index 5ae233a9..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.XCeed.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.dll b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.dll deleted file mode 100644 index 5d631dc2..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.Plot.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.dll b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.dll deleted file mode 100644 index 7e0d3482..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.pdb b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.pdb deleted file mode 100644 index a5effb95..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.pdb and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.targets b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.targets deleted file mode 100644 index 12a0fb5d..00000000 --- a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.targets +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - CallFsLex;CallFsYacc;$(CompileDependsOn) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - false - - - - - - diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.xml b/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.xml deleted file mode 100644 index 0a19cbdc..00000000 --- a/tools/FSharp_1.9.6.16/bin/FSharp.PowerPack.xml +++ /dev/null @@ -1,8219 +0,0 @@ - - -FSharp.PowerPack - - - - - - - Lookup or set the given element in the table. Set replaces all existing bindings for a value with a single - bindings. Raise KeyNotFoundException if the element is not found. - - - - - Lookup or set the given element in the table. Set replaces all existing bindings for a value with a single - bindings. Raise KeyNotFoundException if the element is not found. - - - - - The total number of keys in the hash table - - - - - Lookup the given element in the table, returning the result as an Option - - - - - Replace the latest binding (if any) for the given element. - - - - - Remove the latest binding (if any) for the given element from the table - - - - -Apply the given function to each binding in the hash table - - - - - Apply the given function to each element in the collection threading the accumulating parameter - through the sequence of function applications - - - - - Find all bindings for the given element in the table, if any - - - - - - - - - - - - - - - - - Make a shallow copy of the collection - - - - - Test if the collection contains any bindings for the given element - - - - - Test if the collection contains any bindings for the given element - - - - - Clear all elements from the collection - - - - - Add a binding for the element to the table - - - - - Create a new empty mutable HashMultiMap - with key hash/equality based on the F# structural "hash" and (=) functions. - - - - - Create a new empty mutable HashMultiMap with an internal bucket array of the given approximate size - and with key hash/equality based on the F# structural "hash" and (=) functions - - - - - Create a new empty mutable HashMultiMap with an internal bucket array of the given approximate size - and with the given key hash/equality functions - - - - - Build a map that contains the bindings of the given IEnumerable - - - - - Hash tables, by default based on F# structural "hash" and (=) functions. - The table may map a single key to multiple bindings. - - - - - The total number of elements in the set - - - - - Remove the given element from the set - - - - - Apply the given function to each binding in the hash table - - - - - Apply the given function to the set threading the accumulating parameter - through the sequence of function applications - - - - - Create a new empty mutable hash set - with key hash/equality based on the F# structural "hash" and (=) functions - - - - - Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with key hash/equality based on the F# structural "hash" and (=) functions - - - - - Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with the given key hash/equality functions - - - - - Create a new mutable hash set containing elements drawn from the given sequence - - - - - Make a shallow copy of the set - - - - - Test if the set contains the given element - - - - - Clear all elements from the set - - - - - Add an element to the collection - - - - - Create a new empty mutable hash set - with key hash/equality based on the F# structural "hash" and (=) functions - - - - - Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with key hash/equality based on the F# structural "hash" and (=) functions - - - - - Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with the given key hash/equality functions - - - - - Create a new mutable hash set containing elements drawn from the given sequence - - - - - Mutable hash sets based by default on F# structural "hash" and (=) functions. Implemented via a hash table and/or Dictionary. - - - - - LazyLists are possibly-infinite, cached sequences. See also IEnumerable/Seq for - uncached sequences. Calling "get" on the same lazy list value you will keep - getting the same (cached) result. LazyLists normally involve delayed computations - without side-effects, and calling "get" may cause these computations to be executed. The results - of these computations are cached - evaluations will be performed - only once for each element of the lazy list. This is different to IEnumerable/Seq where - recomputation happens each time an enumerator is created and the sequence traversed. - - LazyLists can represent cached potentially-infinite computations. Because they are cached they may cause - memory leaks if some part of your code maintains a live reference to - the head of an infinite or very large lazy list while iterating it, or if a reference is - maintained after the list is no longer required. - - Although lazy lists are an abstract type you may pattern match against them using the - LazyList.Cons and LazyList.Nil active patterns. These may force the computation of elements - of the list. - - - - - - - - - - - Return the stream which contains on demand the elements of the first stream followed - by the elements of the second list - - - - - Return the stream which contains on demand the pair of elements of the first and second list - - - - - Return the stream which contains on demand the list of elements of the list of lazy lists. - - - - - Return a new stream which contains on demand the given item followed by the - given stream. - - - - - Return a new stream which contains on demand the given item followed by the - stream returned by the given computation. The computation is - not executed until the elements of the stream are consumed. The - computation is only executed once. - - - - - Return a stream that is in effect the stream returned by the given computation. - The given computation is not executed until the first element on the stream is - consumed. - - - - - Return the stream without the first 'n' elements of the given stream. Does - not force the evaluation of any cells in the stream. - - - - - Evaluates to the stream that contains no items - - - - - Return a new collection which on consumption will consist of only the elements of the collection - for which the given predicate returns "true" - - - - - Return the first element for which the given function returns true. - Raise KeyNotFoundException if no such element exists. - - - - - Apply the given function to successive elements of the list, returning the first - result where function returns Some(x) for some x. If the function never returns - true, 'None' is returned. - - - - - Return a new stream consisting of the results of applying the given accumulating function - to successive elements of the stream - - - - - Get the first cell of the stream. - - - - - Return the first element of the stream. Raise 'Invalid_argument "hd"' if the - stream is empty. Forces the evaluation of - the first cell of the stream if it is not already evaluated. - - - - - Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. - - - - - Build a new collection whose elements are the results of applying the given function - to the corresponding elements of the two collections pairwise. - - - - - Test if a stream contains at least one element. Forces the evaluation of - the first element of the stream if it is not already evaluated. - - - - - Build a collection from the given array. This function will eagerly evaluate all of the - stream (and thus may not terminate). - - - - - Build a collection from the given list. This function will eagerly evaluate all of the - stream (and thus may not terminate). - - - - - Build a new collection from the given enumerable object - - - - - Return the stream which on consumption will consist of an infinite sequence of the given item - - - - - Return the stream which on consumption will consist of at most 'n' elements of - the given stream. Does not force the evaluation of any cells in the stream. - - - - - Return the stream corresponding to the remaining items in the sequence. - Raise 'Invalid_argument "tl"' if the stream is empty. Forces the evaluation of - the first cell of the stream if it is not already evaluated. - - - - - Build an array from the given collection - - - - - Build a list from the given collection This function will eagerly evaluate all of the - stream (and thus may not terminate). - - - - - Return a view of the collection as an enumerable object - - - - - Return a stream that contains the elements returned by the given computation. - The given computation is not executed until the first element on the stream is - consumed. The given argument is passed to the computation. Subsequent elements - in the stream are generated by again applying the residual 'b to the computation. - - - - - - - - - - -Build a new array that contains the elements of the first array followed by the elements of the second array - - - - -Read a range of elements from the first array and write them into the second. - - - - -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) - - - - -Combine the two arrays into an array of pairs. The two arrays must have equal lengths. - - - - -Build a new array that contains the elements of each of the given list of arrays - - - - -Build a new array that contains the elements of the given array - - - - - Create an array whose elements are all initially the given value. - - - - - Test if any element of the array satisfies the given predicate. - If the input function is f and the elements are i0...iN - then computes p i0 or ... or p iN. - - - - - Test elements of the two arrays pairwise to see if any pair of element satisfies the given predicate. - Raise ArgumentException if the arrays have different lengths. - - - - -Fill a range of the collection with the given element - - - - -Return a new collection containing only the elements of the collection -for which the given predicate returns true - - - - -Return the first element for which the given function returns true. -Raise KeyNotFoundException if no such element exists. - - - - - Return the index of the first element in the array - that satisfies the given predicate. Raise KeyNotFoundException if - none of the elements satisy the predicate. - - - - - Return the index of the first element in the array - that satisfies the given predicate. Raise KeyNotFoundException if - none of the elements satisy the predicate. - - - - -Apply the given function to successive elements, returning the first -result where function returns "Some(x)" for some x. - - - - - Apply 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 - - - - - Apply 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. - - - - - Apply 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)). - - - - - 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. - - - - - Test if all elements of the array satisfy the given predicate. - If the input function is f and the elements are i0...iN and "j0...jN" - then computes p i0 && ... && p iN. - - - - - Test elements of the two arrays pairwise to see if all pairs of elements satisfy the given predicate. - Raise ArgumentException if the arrays have different lengths. - - - - - Fetch an element from the collection. You can also use the syntax arr.[idx]. - - - - - Create an array by calling the given generator on each index. - - - - - Return true if the given array is empty, otherwise false - - - - -Apply the given function to each element of the array. - - - - -Apply the given function to two arrays simultaneously. The -two arrays must have the same lengths, otherwise an Invalid_argument exception is -raised. - - - - -Apply the given function to each element of the array. The integer passed to the -function indicates the index of element. - - - - - Apply 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. - - - - - Return the length of the collection. You can also use property arr.Length. - - - - -Build a new array whose elements are the results of applying the given function -to each of the elements of the array. - - - - -Build 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. - - - - -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. - - - - - Build 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. - - - - -Build an array from the given list - - - - -Split the collection into two collections, containing the -elements for which the given predicate returns true and false -respectively - - - - - Apply 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. - - - - - Apply 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. - - - - -Return a new array with the elements in reverse order - - - - - Like fold_left, but return the intermediary and final results - - - - - Like fold_right, but return both the intermediary and final results - - - - - Set the value of an element in the collection. You can also use the syntax arr.[idx] <- e. - - - - - Return an array containing the given element - - - - - Sort the elements using the given comparison function - - - - - Sort the elements using the key extractor and generic comparison on the keys - - - - -Split a list of pairs into two lists - - - - -Build a new array that contains the given subrange specified by -starting index and length. - - - - -Build a list from the given array - - - - - Return a view of the array as an enumerable object - - - - -Return the first element for which the given function returns true. -Return None if no such element exists. - - - - - Return the index of the first element in the array - that satisfies the given predicate. - - - - - Return the index of the first element in the array - that satisfies the given predicate. - - - - - Split an array of pairs into two arrays - - - - - Combine the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is - raised.. - - - - - Generic operations on the type System.Collections.Generic.List, which is called ResizeArray in the F# libraries. - - - - - - - - Lookup or set the given element in the table. Raise KeyNotFoundException if the element is not found. - - - - - Lookup or set the given element in the table. Raise KeyNotFoundException if the element is not found. - - - - - The number of bindings in the hash table - - - - - Lookup the given element in the table, returning the result as an Option - - - - - Replace the latest binding (if any) for the given element. - - - - - Remove the latest binding (if any) for the given element from the table - - - - - Apply the given function to each binding in the hash table - - - - - Apply the given function to each element in the collection threading the accumulating parameter - through the sequence of function applications - - - - - Find all bindings for the given element in the table, if any - - - - - Create a new empty mutable hash table with an internal bucket array of the given approximate size - and with the given key hash/equality functions - - - - - Make a shallow copy of the collection - - - - - Test if the collection contains any bindings for the given element - - - - - Test if the collection contains any bindings for the given element - - - - - Clear all elements from the collection - - - - - Add a binding for the element to the table - - - - - HashMultiMap, but where a constraint tag tracks information about the hash/equality functions used - for the hashing. When the tag is Tags.StructuralHash this is identical to HashMultiMap. - - - - - - - - The number of elements in the set - - - - - Remove the given element from the set - - - - - Apply the given function to each binding in the hash table - - - - - Apply the given function to the set threading the accumulating parameter - through the sequence of function applications - - - - - Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with the given key hash/equality functions - - - - - Make a shallow copy of the set - - - - - Test if the set contains the given element - - - - - Clear all elements from the set - - - - - Add an element to the collection - - - - - Mutable hash sets based on F# structural "hash" and (=) functions. Implemented via a hash table and/or Dictionary. - Mutable hash sets where a constraint tag tracks information about the hash/equality functions used - for the hashing. When the tag is Tags.StructuralHash this is identical to HashSet. - - - - - Immutable maps. Keys are ordered by construction function specified - when creating empty maps or by F# structural comparison if no - construction function is specified. - - - Maps based on structural comparison are - efficient for small keys. They are not a suitable choice if keys are recursive data structures - or require non-structural comparison semantics. - - - - - - Lookup an element in the map. Raise KeyNotFoundException if no binding - exists in the map. - - - - - Return true if there are no bindings in the map. - - - - - The number of bindings in the map - - - - - Lookup an element in the map, returning a Some value if the element is in the domain - of the map and None if not. - - - - - The elements of the set as a list. - - - - - The elements of the set as an array - - - - - Remove an element from the domain of the map. No exception is raised if the element is not present. - - - - - Build two new maps, one containing the bindings for which the given predicate returns 'true', - and the other the remaining bindings. - - - - - Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. - - - - - Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The index passed to the - function indicates the index of element being transformed. - - - - - Apply the given function to each binding in the dictionary - - - - - - - - Return true if the given predicate returns true for all of the - bindings in the map. Always returns true if the map is empty. - - - - - Given the start and end points of a key range, - Fold over the bindings in the map that are in the range, - and the end points are included if present (the range is considered a closed interval). - - - - - Fold over the bindings in the map. - - - - - Fold over the bindings in the map. - - - - - Search the map looking for the first element where the given function returns a Some value - - - - - Build a new map containing the bindings for which the given predicate returns 'true'. - - - - - Return true if the given predicate returns true for one of the - bindings in the map. Always returns false if the map is empty. - - - - - - - - The empty map, and use the given comparer comparison function for all operations associated - with any maps built from this map. - - - - - Build a map that contains the bindings of the given IEnumerable - and where comparison of elements is based on the given comparison function - - - - - Test is an element is in the domain of the map - - - - - Return a new map with the binding added to the given map. - - - - - Immutable maps. A constraint tag carries information about the class of key-comparers being used. - - - - - Immutable sets based on binary trees, default tag - - - - - Return a new set with the elements of the second set removed from the first. - - - - - Compute the union of the two sets. - - - - - Returns the lowest element in the set according to the ordering being used for the set - - - - - Returns the highest element in the set according to the ordering being used for the set - - - - - A useful shortcut for Set.is_empty. See the Set module for further operations on sets. - - - - - Return the number of elements in the set - - - - - The number of elements in the set - - - - - Compute the union of the two sets. - - - - - The elements of the set as a list. - - - - - The elements of the set as an array. - - - - - A singleton set based on the given comparison operator - - - - - A useful shortcut for Set.remove. Note this operation produces a new set - and does not mutate the original set. The new set will share many storage - nodes with the original. See the Set module for further operations on sets. - - - - - Build two new sets, one containing the elements for which the given predicate returns 'true', - and the other the remaining elements. - - - - - Apply the given function to each binding in the collection - - - - - Evaluates to "true" if all elements of the first set are in the second - - - - - Evaluates to "true" if all elements of the second set are in the first - - - - - Compute the intersection of the two sets. - - - - - Test if all elements of the collection satisfy the given predicate. - If the input function is f and the elements are i0...iN and j0...jN then - computes p i0 && ... && p iN. - - - - - Apply the given accumulating function to all the elements of the set - - - - - Return a new collection containing only the elements of the collection - for which the given predicate returns "true" - - - - - Test if any element of the collection satisfies the given predicate. - If the input function is f and the elements are i0...iN then computes - p i0 or ... or p iN. - - - - - - - - Compares two sets and returns true if they are equal or false otherwise - - - - - The empty set based on the given comparer - - - - - Return a new set with the elements of the second set removed from the first. - - - - - A set based on the given comparer containing the given initial elements - - - - - A useful shortcut for Set.mem. See the Set module for further operations on sets. - - - - - Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b - - - - - A useful shortcut for Set.add. Note this operation prodcues a new set - and does not mutate the original set. The new set will share many storage - nodes with the original. See the Set module for further operations on sets. - - - - - Immutable sets where a constraint tag carries information about the class of key-comparer being used. - - - - - - - - - - - The spec value describes the action of the argument, - and whether it expects a following parameter. - - - - - "parse specs f use" parses the arguments given by Sys.argv - according to the argument processing specifications "specs". - Arguments begin with "-". Non-arguments are passed to "f" in - order. "use" is printed as part of the usage line if an error occurs. - - Permitted arguments are specified using triples: (arg, action, help). - Actions are: - Unit(f): call f, no subseq. arg - Set(br): set ref to 'true', no subseq. arg. - Clear(br): set ref to 'false, no subseq. arg. - String(f): pass the subseq. arg to f - Int(f): pass the subseq. arg to f - Float(f): pass the subseq. arg to f - Rest(f): pass all subseq. args to f in order - - - - - - - - "usage specs use" prints the help for each argument. - - - - - - - - - - - A simple command-line argument processor. - - - - - Is an element in the array, uses (=) equality. - - - - - Create a jagged 2 dimensional array. - - This member is primarily provided for compatibility with implementations - of ML. F# also supports non-jagged 2D arrays - see the Array2D module and - types such as "int[,]". - - - - - - - - Create a jagged 2 dimensional array. Synonym for create. - - This member is primarily provided for compatibility with implementations - of ML. F# also supports non-jagged 2D arrays - see the Array2D module and - types such as "int[,]". - - - - - - - - Return true if the list is not empty. - - - - - Pin the given array for the duration of a single call to the given function. A native pointer to - the first element in the array is passed to the given function. Cleanup the GCHandle associated with the - pin when the function completes, even if an exception is raised. - - - - - As for Array.pin, except that the caller is responsible for calling Free on the returned GCHandle in order - to release the pin. - - - - - - - - - - - - - - Like reduce, but return both the intermediary and final results - - - - - Like reduceBack, but return both the intermediary and final results - - - - - Compatibility operations on arrays. - - - - - Pin the given array for the duration of a single call to the given function. A native pointer to - the first element in the array is passed to the given function. Cleanup the GCHandle associated with the - pin when the function completes, even if an exception is raised. - - - - - As for Array2D.pin, except that the caller is responsible for calling Free on the returned GCHandle in order - to release the pin. - - - - - - - - - - - Returns the sum of a and b - - - - - Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b - - - - - Returns a divided by b - - - - - Combines the binary representation of a and b by bitwise and - - - - - Returns the bitwise logical negation of a - - - - - Combines the binary representation of a and b by bitwise or - - - - - Combines the binary representation of a and b by bitwise xor - - - - - Returns a multiplied by b - - - - - Converts a char to a byte - - - - - Converts a 32-bit integer to a byte - - - - - Converts a 32-bit integer to a byte - - - - - Converts a string to a byte - - - - - Converts a 16-bit integer to a byte - - - - - Converts an unsigned 32-bit integer to a byte - - - - - The value one as a System.Byte - - - - - Returns the predeccessor of the argument wrapped around 0uy - - - - - Returns the remainder of a divided by b - - - - - Shifts the binary representation a by n bits to the left - - - - - Shifts the binary representation a by n bits to the right - - - - - Returns a minus b - - - - - Returns the successor of the argument wrapped around 255uy - - - - - Converts a byte to a char - - - - - Converts a byte to a 32-bit integer - - - - - Converts a byte to a 32-bit integer - - - - - Converts a byte to a string - - - - - Converts a byte to a 16-bit integer - - - - - Converts a byte to an unsigned 32-bit integer - - - - - The value zero as a System.Byte - - - - - Byte (8-bit) operations. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Apply 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 - - - - - Apply 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 i0 (...(f iN s)). - - - - - - - - - - - Apply the given function to each element of the collection. - - - - - Apply the given function to each element of the collection. The integer passed to the - function indicates the index of element. - - - - - - - - - - - Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. - - - - - Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The integer index passed to the - function indicates the index of element being transformed. - - - - -Build a collection from the given list - - - - - - - - - - - - - -Build a list from the given collection - - - - - - - - Byte arrays. Arrays of bytes type-compatible with the C# byte[] type - - - - - Converts the value of the specified 32-bit signed integer to its equivalent Unicode character - - - - - Converts the value of the specified Unicode character to the equivalent 32-bit signed integer - - - - - Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b - - - - - Converts the value of a Unicode character to its lowercase equivalent - - - - - Converts the value of a Unicode character to its uppercase equivalent - - - - - Unicode characters, i.e. the System.Char type. see also the operations - in System.Char and the System.Text.Encoding interfaces if necessary. - - - - - Combine enum values using 'logical or'. The relevant enumeration type is inferred from context. - - - - - Convert an integer to an enumeration value. The result type is inferred from context. - - - - - Test if an enumeration value has a particular flag set, using 'logical and'. - The relevant enumeration type is inferred from context. - - - - - Convert an enumeration value to an integer. The argument type is inferred from context. - - - - - Simple operations to convert between .NET enuemration types and integers - - - - - Returns the sum of a and b - - - - - Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b - - - - - Returns a divided by b - - - - - Returns a multiplied by b - - - - - Returns -a - - - - - Converts a raw 32-bit representation to a 32-bit float - - - - - Converts a 64-bit float to a 32-bit float - - - - - Converts a 32-bit integer to a 32-bit float - - - - - Converts a 32-bit integer to a 32-bit float - - - - - Converts a 64-bit integer to a 32-bit float - - - - - Converts a string to a 32-bit float - - - - - Returns a minus b - - - - - Converts a 32-bit float to raw 32-bit representation - - - - - Converts a 32-bit float to a 64-bit float - - - - - Converts a 32-bit float to a 32-bit integer - - - - - Converts a 32-bit float to a 32-bit integer - - - - - Converts a 32-bit float to a 64-bit integer - - - - - Converts a 32-bit float to a string - - - - - ML-like operations on 32-bit System.Single floating point numbers. - - - - - Returns the sum of a and b - - - - - Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b - - - - - Returns a divided by b - - - - - Returns a multiplied by b - - - - - Returns -a - - - - - Converts a raw 64-bit representation to a 64-bit float - - - - - Converts a 32-bit float to a 64-bit float - - - - - Converts a 32-bit integer to a 64-bit float - - - - - Converts a 32-bit integer to a 64-bit float - - - - - Converts a 64-bit integer to a 64-bit float - - - - - Converts a string to a 64-bit float - - - - - Returns a minus b - - - - - Converts a 64-bit float to raw 64-bit representation - - - - - Converts a 64-bit float to a 32-bit float - - - - - Converts a 64-bit float to a 32-bit integer - - - - - Converts a 64-bit float to a 32-bit integer - - - - - Converts a 64-bit float to a 64-bit integer - - - - - Converts a 64-bit float to a string - - - - - ML-like operations on 64-bit System.Double floating point numbers. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns the absolute value of the argument - - - - - Returns the sum of a and b - - - - - Converts a 64-bit float to a raw 32-bit representation - - - - - Converts a 32-bit float to a raw 32-bit representation - - - - - Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b - - - - - Returns a divided by b - - - - - Converts a raw 32-bit representation to a 32-bit float - - - - - Converts a raw 32-bit representation to a 64-bit float - - - - - Combines the binary representation of a and b by bitwise and - - - - - Returns the bitwise logical negation of a - - - - - Combines the binary representation of a and b by bitwise or - - - - - Combines the binary representation of a and b by bitwise xor - - - - - Returns the largest 32-bit signed integer - - - - - Returns the smallest 32-bit signed integer - - - - - The value minus one as a System.Int32 - - - - - Returns a multiplied by b - - - - - Returns -a - - - - - Converts a 64-bit float to a 32-bit integer - - - - - Converts a 32-bit float to a 32-bit integer - - - - - Converts a 32-bit integer to a 32-bit integer (included for ML compatability) - - - - - Converts a 64-bit unsigned integer to a 32-bit integer - - - - - Converts a 32-bit unsigned integer to a 32-bit integer - - - - - Converts a string to a 32-bit integer - - - - - Converts a 32-bit unsigned integer to a 32-bit integer - - - - - The value one as a System.Int32 - - - - - Returns the predeccessor of the argument - - - - - Returns the remainder of a divided by b - - - - - Shifts the binary representation a by n bits to the left - - - - - Shifts the binary representation a by n bits to the right; high-order empty bits are set to the sign bit - - - - - Shifts the binary representation a by n bits to the right; high-order bits are zero-filled - - - - - Returns a minus b - - - - - Returns the successor of the argument - - - - - Converts a 32-bit integer to a 64-bit float - - - - - Converts a 32-bit integer to a 32-bit float - - - - - Converts a 32-bit integer to a 32-bit integer (included for ML compatability) - - - - - Converts a 32-bit unsigned integer to a 64-bit integer - - - - - Converts a 32-bit unsigned integer to a 32-bit integer - - - - - Converts a 32-bit integer to a string - - - - - Converts a 32-bit integer to a 32-bit unsigned integer - - - - - The value zero as a System.Int32 - - - - - Basic operations on 32-bit integers. The type int32 is identical to System.Int32. - - - - - Returns the absolute value of the argument - - - - - Returns the sum of a and b - - - - - Converts a 64-bit float to a raw 64-bit representation - - - - - Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b - - - - - Returns a divided by b - - - - - Converts a raw 64-bit representation to a 64-bit float - - - - - Combines the binary representation of a and b by bitwise and - - - - - Returns the bitwise logical negation of a - - - - - Combines the binary representation of a and b by bitwise or - - - - - Combines the binary representation of a and b by bitwise xor - - - - - Returns the largest 64-bit signed integer - - - - - Returns the smallest 64-bit signed integer - - - - - The value minus one as a System.Int64 - - - - - Returns a multiplied by b - - - - - Returns -a - - - - - Converts a 64-bit float to a 64-bit integer - - - - - Converts a 32-bit float to a 64-bit integer - - - - - Converts a 32-bit integer to a 64-bit integer - - - - - Converts a 32-bit integer to a 64-bit integer - - - - - Converts a native integer to a 64-bit integer - - - - - Converts a string to a 64-bit integer - - - - - Converts an unsigned 64-bit integer to a 64-bit integer - - - - - The value one as a System.Int64 - - - - - Returns the predeccessor of the argument - - - - - Returns the remainder of a divided by b - - - - - Shifts the binary representation a by n bits to the left - - - - - Shifts the binary representation a by n bits to the right; high-order empty bits are set to the sign bit - - - - - Shifts the binary representation a by n bits to the right; high-order bits are zero-filled - - - - - Returns a minus b - - - - - Returns the successor of the argument - - - - - Converts a 64-bit integer to a 64-bit float - - - - - Converts a 64-bit integer to a 32-bit float - - - - - Converts a 64-bit integer to a 32-bit integer - - - - - Converts a 64-bit integer to a 32-bit integer - - - - - Converts a 64-bit integer to a native integer - - - - - Converts a 64-bit integer to a string - - - - - Converts a 64-bit integer to an unsigned 64-bit integer - - - - - The value zero as a System.Int64 - - - - - Basic operations on 64-bit integers. The type int64 is identical to System.Int64. - - - - - - - - Build a lazy (delayed) value from the given computation - - - - - See Lazy.Force - - - - - See Lazy.Force. - - - - - See Lazy.SynchronizedForce. - - - - - See Lazy.UnsynchronizedForce - - - - - Build a lazy (delayed) value from the given computation - - - - - Build a lazy (delayed) value from the given pre-computed value. - - - - - Check if a lazy (delayed) value has already been computed - - - - - - - - - - - Lookup key's data in association list, uses (=) equality. - Raise System.IndexOutOfRangeException exception if key not found, in which case you should typically use try_assoc instead. - - - - - See assoc, but uses the physical equality operator (==) for equality tests - - - - - Is an element in the list. Elements are compared using generic equality. - - - - - - - - Is an element in the list. Elements are compared using generic equality. - - - - - Does the key have pair in the association list? - - - - - See mem_assoc, but uses the physical equality operator (==) for equality tests. - - - - - See mem, but uses the physical equality operator (==) for equality tests. - - - - - Return true if the list is not empty. - - - - - Remove pair for key from the association list (if it's there). - - - - - See remove_assoc, but uses the physical equality operator (==) for equality tests. - - - - - "rev_append l1 l2" evaluates to "append (rev l1) l2" - - - - - "rev_map f l1" evaluates to "map f (rev l1)" - - - - - "rev_map2 f l1 l2" evaluates to "map2 f (rev l1) (rev l2)" - - - - - - - - - - - Like reduce_left, but return both the intermediary and final results - - - - - Like reduce_right, but return both the intermediary and final results - - - - - Lookup key's data in association list, uses (=) equality, - returning "Some data" or "None". - - - - - See try_assoc, but uses the physical equality operator (==) for equality tests. - - - - - - - - Compatibility operations on lists. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A collection of operations for creating and using maps based on a particular comparison function. - The 'Tag type parameter is used to track information about the comparison function. - - - - - For use when not opening the Map module, e.g. Map.t - - - - - - - - A functor to build a collection of operations for creating and using - maps based on the given comparison function. This returns a record that - contains the functions you use to create and manipulate maps of - this kind. The returned value is much like an ML module. - - Language restrictions related to polymorphism may mean you - have to create a new instantiation of for each toplevel - key/value type pair. - - To use this function you need to define a new named class that implements IComparer and - pass an instance of that class as the first argument. For example: - type MyComparer = - new() = { } - interface IComparer<string> with - member self.Compare(x,y) = ... - - let MyStringMapProvider : Map.Provider < string,int > = Map.MakeTagged(new MyComparer()) - - - - - Fold over the bindings in the map - - - - - Extension functionality for maps using structural comparison - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Big_int compatability module for arbitrary sized integers. - - - - - - - - Add second buffer to the first. - - - - - Read the given number of bytes as ASCII and add the resulting string - to the buffer. Warning: this assumes an ASCII encoding for the I/O channel, i.e. it uses - Pervasives.really_input and then use ascii_to_string to produce the string - to add. - - - - - Add character to the buffer. - - - - - Add string to the buffer. - - - - - Given a string, start position and length add that substring to the buffer. - - - - - Clears the buffer. - - - - - Gets the string built from the buffer. - - - - - Create a buffer with suggested size. - - - - - Number of characters in the buffer. - - - - - - - - Clears the buffer (same as Buffer.clear). - - - - - Imperative buffers for building strings, a shallow interface to System.Text.StringBuilder - - - - - "dirname" and "basename" decompose a filename into a directory name - and a filename, i.e. "concat (dirname s) (basename s) = s" - - - - - "check_suffix f s" returns true if filename "f" ends in suffix "s", - e.g. check_suffix "abc.fs" ".fs" returns true. - - - - - "chop_extension f" removes the extension from the given - filename. Raises ArgumentException if no extension is present. - - - - - Assuming "check_suffix f s" holds, "chop_suffix f s" returns the - filename "f" with the suffix "s" removed. - - - - - "concat a b" returns System.IO.Path.Combine(a,b), i.e. the - two names conjoined by the appropriate directory separator character - for this architecture. - - - - - The name used for the current directory on this OS. - - - - - "dirname" and "basename" decompose a filename into a directory name - and a filename, i.e. "concat (dirname s) (basename s) = s" - - - - - Return true if the filename has a "." extension - - - - - Returns true if the path is relative to the current directory but does not begin with - an explicit "." or ".." - - - - - Is the path is relative to the current directory or absolute. - - - - - "parent_dir_name" returns the name for the directory above the current directory on - this OS. - - - - - "quote s" is designed for use to quote a filename when using it - for a system command. It returns ("\'" ^ s ^ "\'"). - - - - - "temp_file f s" returns a hitherto unused new file name. "f" and "s" - are hints as to a suitable file name and suffix for the file. - - - - - Common filename operations. This module is included to make it possible to cross-compile - code with other ML compilers. See also System.IO.Path - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A collection of operations for creating and using hash tables based on particular type-tracked hash/equality functions. -Generated by the Hashtbl.Make and Hashtbl.MakeTagged functors. This type is for use when you wish to -specify a comparison function once and carry around an object that is a provider of (i.e. a factory for) hashtables -that utilize that comparison function. - -The 'Tag' type parameter is used to track information about the comparison function, which helps ensure -that you don't mixup maps created with different comparison functions - - - - - OCaml compatible type name, for use when not opening module, e.g. Hashtbl.t - - - - - Build a collection of operations for creating and using - hashtables based on the given hash/equality functions. This returns a record - that contains the functions you use to create and manipulate tables of - this kind. The returned value is much like an ML module. You should call Make once for - each new pair of key/value types. You may need to constrain the result - to be an instantiation of Provider. - - let MyStringHashProvider : Provider<string,int> = Hashtbl.Make(myStringHash,myStringEq) - - - - - Same as Make, except track the comparison function being used through an additional type parameter. - - To use this function accurately you need to define a new named class that implements IEqualityComparer and - pass an instance of that class as the first argument. For example: - type MyHasher = - class - new() = { } - interface IEqualityComparer<string> with - member self.GetHashCode(x) = ... - member self.Equals(x,y) = ... - end - end - - let MyStringHashProvider : Hashtbl.Provider<string,int> = Hashtbl.MakeTagged(new MyStringHasher()) - - - - - Add key and data to the table. - - - - - Empty the table. - - - - - Create a copy of the table. Remember they are imperative and get mutated. - - - - - Create a hash table with the suggested initial size. - - Inlined to enable generation of efficient hash routines for the key type in the common case. - - - - - Lookup key's data in the table. - Raises exception is key not in table, if this could happen you should be using tryfind. - - - - - Return all bindings for the given key - - - - - Fold over all bindings - - - - - Hash on the structure of a value according to the F# structural hashing - conventions. See Pervasives.hash - - - - - Hash on the identity of an object. See Pervasives.hashq. - - - - -Apply the given function to each binding in the hash table - - - - - Test for the existence of any bindings for the given key - - - - - Create a hash table using the given data - - - - - Create hash table using the given data - - Inlined to enable generation of efficient hash routines for the key type in the common case. - - - - - Remove the latest binding for the given key - - - - - Replace the latest binding for the given key - - - - - Lookup the key's data in the table - - - - - Multi-entry hash tables using the structural "hash" and "equals" functions. - -These tables can be used with keys of any type, but you should check that -structural hashing and equality are correct for your key type. -Structural hashing is efficient but not a suitable choice in all circumstances, -e.g. may not hash efficiently on non-reference types and deeply-structured types. -Better efficiency is typically achieved if key types are F#-generated -types. - -These hash tables may map items to multiple keys (see find_all). - -The implementations are not safe for concurrent reading/writing, -and so users of these tables should take an appropriate lock -before reading/writing if used in a concurrent setting. - - - - - ASCII LexBuffers - - The type "lexbuf" is opaque, but has an internal position information field - that can be updated by setting "lexbuf.EndPos", for example if you wish - to update the other fields in that position data before or during - lexing. You will need to do this if you wish to maintain accurate - line-count information. If you do this and wish to maintain strict - cross-compiling compatibility with OCamlLex and other tools you may need code - to conditionally use lexbuf_set_curr_p when compiling F# code. - - - - - - - - Remove all input, though don't discard the except the current lexeme - - - - - Fuel a lexer using the given BinaryReader. - - - - - Fuel a lexer from an array of bytes - - - - - Fuel a lexer using the given in_channel. The bytes are read using Pervasives.input. - If the in_channel is a textual channel the bytes are - presented to the lexer by decoding the characters using System.Text.Encoding.ASCII. - - - - - Fuel a lexer from function that fills an array of bytes up to the given length, returning the - number of bytes filled. - - - - - Fuel a lexer from a string, converted to ascii using System.Text.Encoding.ASCII.GetBytes - - - - - Fuel a lexer using the given TextReader or StreamReader. - The characters read are decoded to bytes using the given encoding (e.g. System.Text.Encoding.ASCII) - and the bytes presented to the lexer. The encoding used to decode the characters - is associated with the expectations of the lexer (e.g. a lexer may be constructed to accept only - ASCII or pseudo-UTF8 bytes) and will typically be different to - the encoding used to decode the file. - - - - - same as lexeme_end_p - - - - - - - - - - - Return the matched string - - - - - Return the bytes for the matched string - - - - - Return a character from the matched string, innterpreting the bytes using an ASCII encoding - - - - - Return absolute positions into the entire stream of characters - - - - - Return the positions stored in the lexbuf for the matched string - - - - - Return absolute positions into the entire stream of characters - - - - - Return the positions stored in the lexbuf for the matched string - - - - - Return the matched string interpreting the bytes using the given Unicode text encoding - - - - - Lexing: ML-like lexing support - - This file maintains rough compatibility for lexbuffers used by some ML - laxer generators. The lexbuf carries an associated pair of positions. - Beware that only the "cnum" (absolute character number) field is automatically - updated as each lexeme is matched. Upon each successful match the prior end - position is transferred to be the start position and a new start position - is allocated with an updated pos_cnum field. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - See Microsoft.FSharp.Core.LanguagePrimitives.PhysicalEquality - - - - - - - - Negation of Obj.eq (i.e. reference/physical inequality) - - - - - - - - See Microsoft.FSharp.Core.Operators.unbox - - - - - See Microsoft.FSharp.Core.Operators.box - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - You can initialize error recovery by raising the Parse_error exception. - - - - - Parsing: parser support for parsers produced by fsyacc. - - Parsers generated by fsyacc provide location information within parser - actions. However that information is not available globally, but - rather is accessed via the functions available on the following local - variable which is available in all parser actions: - - parseState : 'a Microsoft.FSharp.Text.Parsing.IParseState - - However, this is not compatible with the parser specifications used - with ocamlyacc and similar tools, which make a single parser state available - globally. If you wish to use a global parser state (e.g. so your code will - cross-compile with OCaml) then you can use the functions in this file. - You will need to either generate the parser with '--ml-compatibility' option - or add the code - - Parsing.set_parse_state parseState; - - at the start of each action of your grammar. The functions below - simply report the results of corresponding calls to the latest object - specified by a call to set_parse_state. - - Note that there could be unprotected multi-threaded concurrent access for the - parser information, so you should not in general use these - functions if there may be more than one parser active, and - should instead use the functions directly available from the parseState - object. - - - - - - - - - - - - - - A pseudo-abstraction over binary and textual input channels. - OCaml-compatible channels conflate binary and text IO, and for this reasons their - use from F# is somewhat deprecated (direct use of System.IO StreamReader, TextReader and - BinaryReader objects is preferred, e.g. see System.IO.File.OpenText). - Well-written OCaml-compatible code that simply opens either a channel in text or binary - mode and then does text or binary I/O using the OCaml-compatible functions below - will work, though care must be taken with regard to end-of-line characters (see - input_char below). - - This library pretends that an in_channel is just a System.IO.TextReader. Channel values - created using open_in_bin maintain a private System.IO.BinaryReader, which will be used whenever - you do I/O using this channel. - - InChannel.of_BinaryReader and InChannel.of_StreamReader allow you to build input - channels out of the corresponding .NET abstractions. - - - - - This type is present primarily for compatibility with other versions of ML. When - not cross-compiling we recommend using the .NET I/O libraries - - - - - An pseudo-abstraction over binary and textual output channels. - OCaml-compatible channels conflate binary and text IO, and for this reasons their - use from F# is somewhat deprecated The direct use of System.IO StreamWriter, TextWriter and - BinaryWriter objects is preferred, e.g. see System.IO.File.CreateText). Well-written OCaml code - that simply opens either a channel in text or binary mode and then does text - or binary I/O using the OCaml functions will work, though care must - be taken with regard to end-of-line characters (see output_char below). - - This library pretends that an out_channel is just a System.IO.TextWriter. Channels - created using open_out_bin maintain a private System.IO.BinaryWriter, which will be used whenever - do I/O using this channel. - - - - - The exception thrown by invalid_arg and misues of F# library functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Close the channel - - - - - Close the given output channel - - - - - This value is present primarily for compatibility with other versions of ML - The smallest value that when added to 1.0 gives a different value to 1.0 - - - - - - - - - - - Flush all pending output on the channel to the physical - output device. - - - - - Return the length of the input channel - - - - - - - - - - - - - - - - - Attempt to input the given number of bytes from the channel, writing them into the - buffer at the given start position. Does not block if the bytes are not available. - - The use of this function with a channel performing byte-to-character translation (e.g. one - created with open_in, open_in_utf8 or open_in_encoded, or one - or built from a StreamReader or TextReader) is not recommended. - Instead, open the channel using open_in_bin or InChannel.of_BinaryReader. - - If used with a StreamReader channel, i.e. one created using - open_in, open_in_utf8 or open_in_encoded, or one - or built from a StreamReader, this function reads bytes directly from the underlying - BaseStream. This may not be appropriate if any other input techniques are being - used on the channel. - - If used with a TextReader channel (e.g. stdin), this function reads characters from the - stream and then fills some of the byte array with the decoding of these into - bytes, where the decoding is performed using the System.Text.Encoding.Default encoding - - Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. - - - - - Input a binary integer from a binary channel. Compatible with output_binary_int. - - - - - Input a single byte. - For text channels this only accepts characters with a UTF16 encoding that fits in a byte, e.g. ASCII. - Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. - - - - - Input a single character. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. - - - - - Attempt to input characters from a channel. Does not block if inpout is not available. - Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. - - No CRLF translation is done on input, even in text mode. That is, if an input file - has '\r\n' (CRLF) line terminators both characters will be seen in the input. - - - - - Input a single line. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. - - - - - Input a single serialized value from a binary stream. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. - - - - - Negation on integers of the 'int' type - - - - - - - - - - - - - - Throw an Invalid_argument exception - - - - - - - - - - - - - - - - - - - - - - - - - - This value is present primarily for compatibility with other versions of ML - The highest representable positive value in the 'float' type - - - - - The highest representable value in the 'int' type - - - - - This value is present primarily for compatibility with other versions of ML - The lowest non-denormalized positive IEEE64 float - - - - - The lowest representable value in the 'int' type - - - - - - - - This value is present primarily for compatibility with other versions of ML - - - - - This value is present primarily for compatibility with other versions of ML - - - - - This value is present primarily for compatibility with other versions of ML - - - - - 1D Array element set-accessor ('setter') - - - - - 1D Array element get-accessor ('getter') - - - - - Negation of the '==' operator, see also Obj.eq - - - - - This value is present primarily for compatibility with other versions of ML. In F# - the overloaded operators may be used. - - - - -Reference/physical equality. -True if boxed versions of the inputs are reference-equal, OR if -both are value types and the implementation of Object.Equals for the type -of the first argument returns true on the boxed versions of the inputs. - -In normal use on reference types or non-mutable value types this function -has the following properties: - - returns 'true' for two F# values where mutation of data - in mutable fields of one affects mutation of data in the other - - will return 'true' if (=) returns true - - hashq will return equal hashes if (==) returns 'true' - -The use on mutable value types is not recommended. - - - - - This value is present primarily for compatibility with other versions of ML. In F# - the overloaded operators may be used. - - - - - This value is present primarily for compatibility with other versions of ML - - - - - This value is present primarily for compatibility with other versions of ML. In F# - the overloaded operators may be used. - - - - - This value is present primarily for compatibility with other versions of ML. In F# - the overloaded operators may be used. - - - - - This value is present primarily for compatibility with other versions of ML. In F# - the overloaded operators may be used. - - - - - Open the given file to read. - -In the absence of an explicit encoding (e.g. using Open_encoding) open_in -uses the default text encoding (System.Text.Encoding.Default). If you want to read a file -regardless of encoding then you should use binary modes. Note that .NET's -"new StreamReader" function defaults to use a utf8 encoding, and also attempts -to determine an automatic encoding by looking for "byteorder-marks" at the head -of a text file. This function does not do this. - - No CR-LF translation is done on input. - - - - - Open the given file to read in binary-mode - - - - - Open the given file in the mode specified by the given flags - - - - - Open the given file to read in text-mode using the UTF8 encoding - - - - - Open the given file to write in text-mode using the - System.Text.Encoding.Default encoding - - See output_char for a description of CR-LF translation - done on output. - - - - - Open the given file to write in binary-mode - - - - - Open the given file to write in text-mode using the given encoding - - - - - Open the given file to write in the mode according to the specified flags - - - - - Open the given file to write in text-mode using the UTF8 encoding - - - - - Return the length of the output channel. - Raise an exception if not an app - - - - - - - - - - - - - - - - - Write the given range of bytes to the output channel. - - - - - Write the given integer to the output channel in binary format. - Only valid on binary channels. - - - - - Write the given byte to the output channel. No CRLF translation is - performed. - - - - - Write all the given bytes to the output channel. No CRLF translation is - performed. - - - - - Write the given Unicode character to the output channel. - - If the output channel is a binary stream and the UTF-16 value of the Unicode character is greater - than 255 then ArgumentException is thrown. - - No CRLF translation is done on output. That is, if the output character is - '\n' (LF) characters they will not be written as '\r\n' (CRLF) characters, regardless - of whether the underlying operating system or output stream uses CRLF as the default - line-feed character. - - - - - Write the given Unicode string to the output channel. See output_char for the treatment of - '\n' characters within the string. - - - - - Serialize the given value to the output channel. - - - - - Report the current position in the input channel - - - - - Return the current position in the output channel, measured from the - start of the channel. Not valid on all channels. - - - - - n-1 (no overflow checking) - - - - - Print a character to the stderr stream - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Read a floating point number from the console. - - - - -Read an integer from the console. - - - - -Read a line from the console, without the end-of-line character. - - - - - Reads bytes from the channel. Blocks if the bytes are not available. - See 'input' for treatment of text channels. - Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. - - - - - Reads bytes from the channel. Blocks if the bytes are not available. - For text channels this only accepts UTF-16 bytes with an encoding less than 256. - Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. - - - - - Set the current position in the output channel, measured from the - start of the channel. - - - - - Set the binary mode to true or false. If the binary mode is changed from "true" to - "false" then a StreamReader is created to read the binary stream. The StreamReader uses - the default text encoding System.Text.Encoding.Default - - - - - Set the binary mode. If the binary mode is changed from "true" to - "false" then a StreamWriter is created to write the binary stream. The StreamWriter uses - the default text encoding System.Text.Encoding.Default. - - - - - - - - - - - - - - - - - - - - - - - - - - n+1 (no overflow checking) - - - - - - - - - - - - - - - - - - - - The exception thrown by 'assert' failures. - A future release of F# may map this exception to a corresponding .NET exception. - - - - - - - - - - - - - - Non-exhaustive match failures will raise Match failures - A future release of F# may map this exception to a corresponding .NET exception. - - - - - - - - - - -Link .NET IO with the out_channel/in_channel model - - - - - Wrap a stream by creating a StreamReader for the - stream and then wrapping is as an input channel. - A text encoding must be given, e.g. System.Text.Encoding.UTF8 - - - - -Link .NET IO with the out_channel/in_channel model - - - - -Link .NET IO with the out_channel/in_channel model - - - - - Access the underlying stream-based objects for the channel - - - - -Link .NET IO with the out_channel/in_channel model - - - - - Access the underlying stream-based objects for the channel - - - - - Access the underlying stream-based objects for the channel - - - - - - - -Link .NET IO with the out_channel/in_channel model - - - - - Wrap a stream by creating a StreamWriter for the - stream and then wrapping is as an output channel. - A text encoding must be given, e.g. System.Text.Encoding.UTF8 - - - - -Link .NET IO with the out_channel/in_channel model - - - - -Link .NET IO with the out_channel/in_channel model - - - - - Access the underlying stream-based objects for the channel - - - - - Access the underlying stream-based objects for the channel - - - - - Access the underlying stream-based objects for the channel - - - - - Access the underlying stream-based objects for the channel - - - - - - - - - - -The type of simple immutable lists - - - - -The type of None/Some options - - - - -The type of pointers to mutable reference cells - - - - -Absolute value of the given integer - - - - - - - - - - - - - - - - - - - -Structural comparison - - - - - - - - - - -Decrement a mutable reference cell containing an integer - - - - -Exit the current hardware isolated process, if security settings permit, -otherwise raise an exception. Calls System.Environment.Exit. - - - - - - - - Throw a 'Failure' exception - - - - - - - - - - - - - -The "hash" function is a structural hash function. It is -designed to return equal hash values for items that are -equal according to the polymorphic equality -function Pervasives.(=) (i.e. the standard "=" operator). - - - - - - - -Increment a mutable reference cell containing an integer - - - - - - - - - - - - - -Maximum based on structural comparison - - - - -Minimum based on structural comparison - - - - - - - - - - - - - - Concatenate two lists. - - - - -Assign to a mutable reference cell - - - - - Concatenate two strings. The overlaoded operator '+' may also be used. - - - - -Dereference a mutable reference cell - - - - - - - -Structural equality - - - - - - - -Structural greater-than - - - - -Structural greater-than-or-equal - - - - -Structural inequality - - - - -Structural less-than comparison - - - - -Structural less-than-or-equal comparison - - - - - - - - - - - Throw an exception - - - - -Create a mutable reference cell - - - - - - - - - - - - - - - - - - - - - - - - - - The exception thrown by failure and many other F# functions - A future release of F# may map this exception to a corresponding .NET exception. - - - - - - - -Pervasives: Additional OCaml-compatible bindings - - - - - - - - - - - Compatibility module to display data about exceptions. - - - - - The array of command line options. Gives the command line arguments - as returned by System.Environment.GetCommandLineArgs. - - - - - Sets the current working directory for the process using System.IO.Directory.SetCurrentDirectory - - - - - Run the command and return it's exit code. - - Warning: 'command' currently attempts to execute the string using - the 'cmd.exe' shell processor. If it is not present on the system - then the operation will fail. Use System.Diagnostics.Process - directly to run commands in a portable way, which involves specifying - the program to run and the arguments independently. - - - - - Path of the current executable, using - System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,System.AppDomain.CurrentDomain.FriendlyName) - - - - - Returns true if a file currently exists, using System.IO.File.Exists(s). - - - - - Returns the current working directory for the process using System.IO.Directory.GetCurrentDirectory - - - - - Call System.Environment.GetEnvironmentVariable. Raise KeyNotFoundException if the variable is not defined. - - - - - Deletes a file using System.IO.File.Delete. - - - - - Rename a file on disk using System.IO.File.Move - - - - - Time consumed by the main thread. (for approximate timings). - Generally returns only the processor time used by the main - thread of the application. - - - - - The number of bits in the "int" type. - - - - - Sys: Basic system operations (for ML compatibility) - - This module is only included to make it possible to cross-compile - code with other ML compilers. It may be deprecated and/or removed in - a future release. You may wish to use .NET functions directly instead. - - - - - The identity permutation over any size - - - - - - - - Create a permutation by specifying the result of permuting [| 0 .. n-1 |]. For example, - Permutation.of_array [| 1;2;0 |] specifies a permutation that rotates all elements right one place. - - - - - Create a permutation by specifying (source,destination) index pairs. For example, - Permutation(3,[ (0,2);(1,0); (2,1) ]) specifies a permutation that rotates - all elements left one place. Not all elements need be given, e.g. - Permutation(5,[ (1,2);(2,1) |]) specifies a permutation that swaps elements at indexes - 1 and 2. - - - - - Return a permutation that, when applied, maps index 0 to size-1, size-1 to 0 etc. - - - - - Return a permutation that rotates right by the given distance. If the distance - is negative then a left rotation results. - - - - - Return a swaps the given two elements over any size - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Simple operations on signed bytes - - - - - A synonym for Seq.zip - - - - - Return an IEnumerable that when iterated yields - the given item followed by the items in the given sequence - - - - - - - - - - - Return true if the IEnumerable is not empty. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A collection of operations for creating and using sets based on a particular comparison function. -The 'Tag' type parameter is used to track information about the comparison function. - - - - - For use when not opening the Set module, e.g. Set.t - - - - - Build a collection of operations for creating and using - maps based on a single consistent comparison function. This returns a record - that contains the functions you use to create and manipulate maps all of which - use this comparison function. The returned value is much like an ML module. - - Use MakeTagged if you want additional type safety that guarantees that two sets - based on different comparison functions can never be combined in inconsistent ways. - - - - -A functor to build a collection of operations for creating and using - sets based on the given comparison function. This returns a record that - contains the functions you use to create and manipulate maps of - this kind. The returned value is much like an ML module. - - To use this function you need to define a new named class that implements IComparer and - pass an instance of that class as the first argument. For example: - type MyComparer() = - interface IComparer<string> with - member self.Compare(x,y) = ... - - let MyStringSetProvider = Set.MakeTagged(new MyComparer()) - - - - - - - -The elements of the set as a list. - - - - -Compute the intersection of the two sets. - - - - - Immutable sets implemented via binary trees - - - - - Return a string with the first character converted to uppercase. - - - - - Compare the given strings using ordinal comparison - - - - - Return true is the given string contains the given character - - - - - Return true is the given string contains the given character in the - range specified by the given start index and the given length - - - - - Return true is the given string contains the given character in the - range from the given start index to the end of the string. - - - - - Returns the character at the specified position in the string - - - - - Return the first index of the given character in the - string. Raise KeyNotFoundException if - the string does not contain the given character. - - - - - Return the first index of the given character in the - range from the given start position to the end of the string. - Raise KeyNotFoundException if - the string does not contain the given character. - - - - - Return a new string with all characters converted to lowercase - - - - - Return a string of the given length containing repetitions of the given character - - - - - Return s string of length 1 containing the given character - - - - - Return true if the string contains the given character prior to the given index - - - - - Return the index of the first occurrence of the given character - from the end of the string proceeding backwards - - - - - Return the index of the first occurrence of the given character - starting from the given index proceeding backwards. - - - - - Split the string using the given list of separator characters. - Trimming is also performed at both ends of the string and any empty - strings that result from the split are discarded. - - - - - Return a substring of length 'length' starting index 'start'. - - - - - Removes all occurrences of a set of characters specified in a - list from the beginning and end of this instance. - - - - - Return a string with the first character converted to lowercase. - - - - - Return a string with all characters converted to uppercase. - - - - - Compatibility module for string processing. Richer string operations - are available via the member functions on strings and other functionality in - the System.String type - and the System.Text.RegularExpressions namespace. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UInt32: ML-like operations on 32-bit System.UInt32 numbers. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UInt64: basic operations on 64-bit System.UInt64 numbers. - - - - - Wait for the result and commit it - - - - - Record the result in the AsyncResultCell. - Subsequent sets of the result are ignored. This can happen, - e.g. for a race between a cancellation and a success. - - - - - Create a new result cell - - - - - A helper type to store a single result from an asynchronous computation and asynchronously - access its result. - - When using .NET 4.0 you can often use Task<'T> instead of this type - - - - - Return an asynchronous computation that, when run, either returns a value, raises an exception - of cancels according to the value of the asynchronous result. - - - - - Represents the reified result of an asynchronous computation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Extensions to the F# Microsoft.FSharp.Control.Async module - - - - - - - - - - - - - - - - - - - - - - - The type of floating-point matrices. See Microsoft.FSharp.Math - - - - - The type of floating-point row vectors. See Microsoft.FSharp.Math - - - - - The type of floating-point vectors. See Microsoft.FSharp.Math - - - - - Constructs a complex number from both the real and imaginary part. - - - - - - - - Builds a matrix from a sequence of sequence of floats. - - - - - Builds a (row) vector from a sequence of floats. - - - - - Builds a (column) vector from a sequence of floats. - - - - - - - - - - - - - - - - - - - - - - - - - - Return the given rational number - - - - - Return the negation of a rational number - - - - - Return the difference of two rational numbers - - - - - Return the product of two rational numbers - - - - - This operator is for use from other .NET languages - - - - - This operator is for use from other .NET languages - - - - - This operator is for use from other .NET languages - - - - - This operator is for use from other .NET languages - - - - - This operator is for use from other .NET languages - - - - - This operator is for use from other .NET languages - - - - - Return the ratio of two rational numbers - - - - - Return the sum of two rational numbers - - - - - Get zero as a rational number - - - - - Return the sign of a rational number; 0, +1 or -1 - - - - - Get one as a rational number - - - - - Return the numerator of the normalized rational number - - - - - Return a boolean indicating if this rational number is strictly positive - - - - - Return a boolean indicating if this rational number is strictly negative - - - - - Return the denominator of the normalized rational number - - - - - - - - Return the result of converting the given rational number to an integer - - - - - Return the result of converting the given rational number to a floating point number - - - - - Return the result of converting the given rational number to a big integer - - - - - Return the result of raising the given rational number to the given power - - - - - Return the result of converting the string to a rational number - - - - - - - - Return the result of converting the given integer to a rational number - - - - - Return the result of converting the given big integer to a rational number - - - - - Return the absolute value of a rational number - - - - - The type of arbitrary-sized rational numbers - - - - - - - - Unary negation of a complex number - - - - - Subtract one complex number from another - - - - - Multiply two complex numbers - - - - - Multiply a scalar by a complex number - - - - - Multiply a complex number by a scalar - - - - - Complex division of two complex numbers - - - - - Add two complex numbers - - - - - The real part of a complex number - - - - - The imaginary part of a complex number - - - - - The complex number 0+0i - - - - - The real part of a complex number - - - - - The polar-coordinate phase of a complex number - - - - - The complex number 0+1i - - - - - The complex number 1+0i - - - - - The polar-coordinate magnitude of a complex number - - - - - The imaginary part of a complex number - - - - - The conjugate of a complex number, i.e. x-yi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create a complex number using magnitude/phase polar coordinates - - - - - Create a complex number x+ij using rectangular coordinates - - - - - - - - Computes the absolute value of a complex number: e.g. Abs x+iy = sqrt(x**2.0 + y**2.0.) - Note: Complex.Abs(z) is the same as z.Magnitude - - - - - The type of complex numbers stored as pairs of 64-bit floating point numbers in rectangular coordinates - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get the item at the given position in the matrix - - - - - Prefix '+' operator. A nop. - - - - - Matrix negation. - - - - - Point-wise subtraction of two matrices. An InvalidArgument exception will be - raised if the dimensions do not match. - - - - - Matrix multiplication. An InvalidArgument exception will be - raised if the dimensions do not match. - - - - - Matrix-vector multiplication. - - - - - Multiply each element of a matrix by the given scalar value - - - - - Multiply each element of a matrix by the given scalar value - - - - - Pointwise matrix multiplication. An InvalidArgument exception will be - raised if the dimensions do not match. - - - - - Point-wise addition of two matrices. An InvalidArgument exception will be - raised if the dimensions do not match. - - - - - Get the transpose of the matrix. - - - - - Get the number of rows in the matrix - - - - - Get the number of columns in the matrix - - - - - Returns sqrt(sum(norm(x)*(norm(x))) of all the elements of a matrix. - The element type of the matrix must have an associated instance of INormFloat<'T> (see GlobalAssociations) ((else NotSupportedException)). - - - - - Return the non-zero entries of a sparse or dense matrix - - - - - Get the item at the given position in the matrix - - - - - Indicates if the matrix uses the sparse representation. - - - - - Indicates if the matrix uses the dense representation. - - - - - Get the internal array of values for a sparse matrix. This property - should only be used when interoperating with other matrix libraries. - - - - - Get the internal array of row offsets for a sparse matrix. This property - should only be used when interoperating with other matrix libraries. - - - - - Get the internal array of column values for a sparse matrix. This property - should only be used when interoperating with other matrix libraries. - - - - - Get the internal array of values for a dense matrix. This property - should only be used when interoperating with other matrix libraries. - - - - - Retrieve the dictionary of numeric operations associated with the element - type of this matrix. Accessing the property may raise an NotSupportedException if the element - type doesn't support any numeric operations. The object returned - may support additional numeric operations such as IFractional: - this can be determined by a dynamic type test against the object - returned. - - - - - Get the number of (rows,columns) in the matrix - - - - - Get the main diagonal of a matrix, as a vector - - - - - Convert the matrix to a column vector - - - - - Convert the matrix to a row vector - - - - - Return a new array containing the elements of the given matrix - - - - - Supports the slicing syntax 'A.[idx1..idx2,idx1..idx2] <- B' - - - - - Select a range of rows from a matrix - - - - - Select a row from a matrix - - - - - Select a region from a matrix - - - - - Permutes the rows of the matrix. - - - - - Permutes the columns of the matrix. - - - - - Supports the slicing syntax 'A.[idx1..idx2,idx1..idx2]' - - - - - - - - Return the nth diagonal of a matrix, as a vector. Diagonal 0 is the primary - diagonal, positive diagonals are further to the upper-right of the matrix. - - - - - - - - Create a new matrix that is a copy of the given array - - - - - Select a range of columns from a matrix - - - - - Select a column from a matrix - - - - - The type of matrices. The arithmetic operations on the element type are determined by inspection on the element type itself. - Two representations are supported: sparse and dense. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get the transpose of the row vector. - - - - - - - - - - - - - - Get the underlying internal array of values for the vector. This property - should only be used when interoperating with other matrix libraries. - - - - - - - - Return a new array containing a copy of the elements of the given vector - - - - - Supports the slicing syntax 'rv.[idx1..idx2] <- rv2' - - - - - Permute the elements of the row vector. - - - - - Supports the slicing syntax 'rv.[idx1..idx2]' - - - - - - - - - - - Create a new matrix that is a copy of the given array - - - - - The type of row vectors. - - - - - Gets an item from the the vector - - - - - Return the input vector - - - - - Negate a vector - - - - - Subtract two vectors, pointwise - - - - - Multiply each element of a vector by the given scalar value. - - - - - Multiply a column vector and a row vector to produce a matrix - - - - - Multiply a vector by a scalar - - - - - Pointwise multiplication of two vectors. - - - - - Add two vectors, pointwise - - - - - Get the transpose of the vector. - - - - - Gets the number of rows in the vector - - - - - Computes the 2-norm of a vector: sqrt(x.Transpose*x). - - - - - Gets the number of entries in the vector - - - - - Gets an item from the the vector - - - - - Get the underlying internal array of values for the vector. This property - should only be used when interoperating with other matrix libraries. - - - - - Gets the element operations for the element type of the vector, if any - - - - - Return a new array containing a copy of the elements of the given vector - - - - - Supports the slicing syntax 'v.[idx1..idx2] <- v2' - - - - - Permute the elements of the vector. - - - - - Supports the slicing syntax 'v.[idx1..idx2]' - - - - - - - - - - - Create a new matrix that is a copy of the given array - - - - - The type of column vectors. The arithmetic operations on the element type are determined by inspection - on the element type itself - - - - - - - - The type of complex numbers - - - - - The type of floating point matrices - - - - - The type of floating point row vectors - - - - - The type of floating point column vectors - - - - - Add two complex numbers - - - - - A complex of magnitude 1 and the given phase and , i.e. cis x = mkPolar 1.0 x - - - - - The conjugate of a complex number, i.e. x-yi - - - - - Cosine - - - - - Complex division of two complex numbers - - - - - exp(x) = e^x - - - - - The imaginary part of a complex number - - - - - log(x) is natural log (base e) - - - - - The polar-coordinate magnitude of a complex number - - - - - Create a complex number using magnitude/phase polar coordinates - - - - - - - - Multiply two complex numbers - - - - - Multiply a complex number by a scalar - - - - - Unary negation of a complex number - - - - - The complex number 1+0i - - - - - The complex number 0+1i - - - - - The polar-coordinate phase of a complex number - - - - - pi - - - - - The real part of a complex number - - - - - Sine - - - - - Multiply a scalar by a complex number - - - - - sqrt(x) and 0 <= phase(x) < pi - - - - - Subtract one complex number from another - - - - - Tagent - - - - - The complex number 0+0i - - - - - - - - Attempt to determine a numeric association for the given type, i.e. a registered dictionary of - numeric operations. The interface can be queried dynamically for additional functionality in the numerics - hierarchy. - - - - - Record an AppDomain-wide association between the given type and the given dictionary of - numeric operations. Raise an error if an existing association already exists. - - - - - - - - Associations are a way of associating dictionaries of - operations with given types at runtime. Associations are global to a - .NET application domain. Once specified an association may not be deleted - or modified. - - In this release the system of associations is simply - limited to a registry of types that support dictionaries (i.e. interface objects) - of numeric operations. The following types are pre-registered with associated numeric - operations: float, int32, int64, bigint, float32, Complex, bignum. Other types must be - registered explicitly by user code. - - - - - - - - - - - - - - - - - - - - - - - - - - -Add two matrices (operator +) - - - - - - - - Create a new matrix that is a copy of the given array - - - - -Point-wise maximum element of two matrices - - - - -Point-wise minimum element of two matrices - - - - - - - -Pointwise exponential of a matrix. - - - - - Create a matrix with all entries the given constant - - - - - - - -Dot product - - - - - Check if a predicate holds for at least one element of a matrix - - - - - Check if a predicate holds for at least one element of a matrix - - - - - Fold the given function over all elements of a matrix - - - - - Fold the given function down each column of a matrix - - - - - Fold the given function along each row of a matrix - - - - - Fold the given function along a particular column of a matrix - - - - - Fold the given function down a particular row of a matrix - - - - - Fold the given function over all elements of a matrix - - - - - Check if a predicate holds for all elements of a matrix - - - - - Check if a predicate holds for all elements of a matrix - - - - - Get an element of a matrix - - - - - - - - - - - - - - - - - - - - - - - - - - Create a square matrix with the constant 1.0 lying on diagonal - - - - - - - - Create a dense representation matrix with the given entries. - - - - - Create a square matrix with the given vector lying on diagonal - - - - - Create a sparse representation matrix with the given entries. Not all - operations are available for sparse matrices, and mutation is not permitted. - If an operation on sparse matrices raises a runtime exception then consider - converting to a dense matrix using to_dense. - - - - - - - - - - - - - - In-place addition mutates first matrix argument. - - - - - - - - - - - - - - - - - In-place subtraction mutates first matrix argument. - - - - - Map the given function over each element of the matrix, producing a new matrix - - - - - Map the given indexed function over each element of the matrix, producing a new matrix - - - - - - - - - - - - - - - - - - - -sqrt(sum(x*x)) of all the elements of a matrix - - - - - - - - - - - - - - - - - - - - - - -Multiply all the elements of the matrix - - - - -Generate a new matrix of the same size as the input with random entries -drawn from the range 0..aij. Random numbers are generated using a globally -shared System.Random instance with the initial seed 99. - - - - - - - - Set an element of a matrix - - - - - - - -Sum all the elements of a matrix - - - - - - - - Ensure that a matrix uses dense representation. See init_sparse - - - - - - - - - - - - - - Sum of the diagonal elements of the matrix - - - - -Transpose of a matrix. Use also m.Transpose - - - - - Create a matrix with all entries zero - - - - - - - - - - - - - - Create a new matrix that is a copy of the given array - - - - -Take the pointwise maximum of two matrices - - - - -Take the pointwise maximum of two matrices - - - - - - - - Create a matrix containing the given value at every element. - - - - - - - - Sum of the point-wise multiple of the two matrices. - The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)). - - - - - - - - - - - - - - - - - - - - - - - Get an element from a matrix. The indexes are given in row/column order. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create a square matrix with the one for the element type lying on diagonal - The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)). - - - - - Create a matrix using the given function to compute the item at each index. - - - - - - - - Create a matrix containing the given vector along the diagonal. - The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)). - - - - - Create a matrix using the given function to compute the item at each index. - The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)). - The function is passed the dictionary of associated operations in addition to the index pair. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns sqrt(sum(norm(x)*(norm(x))) of all the elements of a matrix. - The element type of the matrix must have an associated instance of INormFloat<'T> (see GlobalAssociations) ((else NotSupportedException)). - - - - - Create a matrix from the given (usually constant) data - - - - - Create a matrix from the given (usually constant) data - - - - - - - - Create a 1x1 matrix containing the given value - - - - - - - - - - - - - - - - - Set an element in a matrix. The indexes are given in row/column order. - - - - - - - - - - - Return a new array containing the elements of the given matrix - - - - - - - - - - - - - - - - - Return a new matrix which is the transpose of the input matrix - - - - - Create a matrix containing the zero element at each index. - The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)). - - - - - Operations to manipulate matrix types carrying - arbitrary element types. The names and types of the operations match those - in the containing module Math.Matrix. - - The numeric operations on the element type (add, zero etc.) are inferred from the type - argument itself. That is, for some operations - the element type of the matrix must have an associated instance of INumeric<'T> - or some more specific numeric association (see GlobalAssociations) ((else NotSupportedException)). - - - - - Operations to manipulate floating - point matrices. The submodule Matrix.Generic contains a - matching set of operations to manipulate matrix types carrying - arbitrary element types. - - - - - - - - - - - - - - - - - - - - Faraday constant - - - - - Newtonian constant of gravitation - - - - - Conductance quantum 2e^2/h - - - - - Avogadro constant - - - - - Magnetic flux quantum h/2e - - - - - Molar gas constant - - - - - Rydberg constant - - - - - Fine-structure constant - - - - - speed of light in vacuum - - - - - Elementary charge - - - - - Electron volt - - - - - electric constant = 1/(mu0 c^2) - - - - - Planck constant - - - - - Dirac constant, also known as the reduced Planck constant = h/2pi - - - - - Boltzmann constant R/N_A - - - - - Electron mass - - - - - Proton mass - - - - - magnetic constant - - - - - Stefan-Boltzmann constant - - - - - Unified atomic mass unit - - - - - Fundamental physical constants, with units-of-measure - - - - - - - - Create by constant initialization - - - - - Get an element of a column vector - - - - - Create by comprehension - - - - - Get the dimensions (number of rows) of a column rowvec. - - - - - Create a vector from an array of double precision floats - - - - - Create a vector from a list of numbers - - - - - - - - Set an element of a column rowvec - - - - - Return a new array containing a copy of the elements of the given vector - - - - - - - - Return a vector of the given length where every entry is zero. - - - - - - - - Create by constant initialization - - - - - Get an element from a column vector. - - - - - Create by comprehension - - - - - Get the number of rows in a column vector. - - - - - Create a row vector from an array of elements - - - - - Create a row vector from a list of elements - - - - - Create a row vector from a sequence of elements - - - - - Set an element in a column vector. - - - - - Return a new array containing a copy of the elements of the given vector - - - - - Transpose the row vector - - - - - Return a vector of the given length where every entry is zero. - - - - - Operations to manipulate row vectors types carrying - arbitrary element types. - - - - - Operations to manipulate floating - point row vectors. These are included for completeness and are - nearly always transposed to column vectors. - - - - - ampere, SI unit of electric current - - - - - becquerel, SI unit of activity referred to a radionuclide - - - - - coulomb, SI unit of electric charge, amount of electricity - - - - - farad, SI unit of capacitance - - - - - gray, SI unit of absorbed dose - - - - - henry, SI unit of inductance - - - - - hertz, SI unit of frequency - - - - - joule, SI unit of energy, work, amount of heat - - - - - kelvin, SI unit of thermodynamic temperature - - - - - newton, SI unit of force - - - - - pascal, SI unit of pressure, stress - - - - - siemens, SI unit of electric conductance - - - - - sievert, SI unit of does equivalent - - - - - tesla, SI unit of magnetic flux density - - - - - volt, SI unit of electric potential difference, electromotive force - - - - - watt, SI unit of power, radiant flux - - - - - weber, SI unit of magnetic flux - - - - - candela, SI unit of luminous intensity - - - - - katal, SI unit of catalytic activity - - - - - kilogram, SI unit of mass - - - - - lumen, SI unit of luminous flux - - - - - lux, SI unit of illuminance - - - - - metre (or meter), SI unit of length - - - - - mole, SI unit of amount of substance - - - - - ohm, SI unit of electric resistance - - - - - second, SI unit of time - - - - - The International System of Units (SI) - - - - - - - - - - - - - -Pointwise exponential of a vector. - - - - - Generate a vector of the given length where each entry contains the given value - - - - -Dot product - - - - - - - - - - - - - - - - - - - - - - - Get an element of a column vector - - - - - - - - - - - - - - - - - - - - - - - - - - Get the dimensions (number of rows) of a column vector. Identical to nrows - - - - - - - - - - - - - - Computes the 2-norm of a vector: sqrt(x.Transpose*x). - - - - - Create a vector from an array of double precision floats - - - - - Create a vector from a list of numbers - - - - - Create a 1-element vector - - - - - - - -Multiply all the elements of the matrix - - - - - Create a vector that represents a integral mesh over the given range - e.g. range 1 5 = vector [ 1.;2.;3.;4.;5. ] - - - - - Create a vector that represents a mesh over the given range - e.g. rangef (-1.0) 0.5 1.0 = vector [ -1.0; -0.5; 0.0; 0.5; 1.0] - - - - - - - - Set an element of a column vector - - - - - - - -Sum all the elements of a vector - - - - - Return a new array containing a copy of the elements of the given vector - - - - -Transpose of a matrix. Use also m.Transpose - - - - - Return a vector of the given length where every entry is zero. - - - - -Add two vectors (operator +) - - - - - - - -Take the pointwise maximum of two vectors - - - - -Take the pointwise minimum of two vectors - - - - -Point-wise multiplication of two vectors (operator .*) - - - - - Generate a vector of the given length where each entry contains the given value - - - - -Dot product - - - - - - - - - - - - - - - - - - - - - - - Get an element of a column vector - - - - - Creation: general - - - - - Creation: useful when the element type has associated operations. - - - - - - - - - - - - - - - - - - - - - - - Get the dimensions (number of rows) of a column vector. Identical to nrows - - - - - - - - - - -Negation of the vector (each element is negated) (unary operator -) - - - - - Computes the 2-norm of a vector: sqrt(x.Transpose*x). - - - - - Create a vector from an array of elements - - - - - Create a vector from a list of numbers - - - - - Create a 1-element vector - - - - - Create a vector from a sequence of numbers - - - - -Multiply all the elements of the matrix - - - - -Pointwise multiplication of a matrix by a scalar - - - - - Set an element of a column vector - - - - -Subtract one vector from another (operator -) - - - - -Sum all the elements of a vector - - - - - Return a new array containing a copy of the elements of the given vector - - - - -Transpose of a matrix. Use also m.Transpose - - - - - Return a vector of the given length where every entry is zero. - - - - - Operations to manipulate column vectors carrying - arbitrary element types. - - - - - Operations to manipulate floating - point column vectors. The submodule VectorOps.Generic contains a - matching set of operations to manipulate column vectors carrying - arbitrary element types. - - - - - See NativeArray2 - - - - - WARNING: use of this function may lead to unverifiable or invalid code - - - - - - - - - - - - - - View a FortranMatrix as a CMatrix. Doesn't actually allocate - a new matirx - just gives a different label to the same bits, and swaps the - row/column count information associated with the bits. - - - - - WARNING: use of this function may lead to unverifiable or invalid code - - - - - - - - This type wraps a pointer to a blob of unmanaged memory assumed to contain - a Fortran-style column major two-dimensional matrix of items compatible with the (presumably blittable) - type 'T. The blob of memory must be allocated and managed externally, - e.g. by a computation routine written in C. - - All operations on this type are marked inlined - because the code used to implement the operations is not verifiable. - - Any code that uses these operations will be unverifiable and may - cause memory corruption if not used with extreme care. - - - - - WARNING: use of this function may lead to unverifiable or invalid code - - - - - Pointer to the C-style row major two-dimensional array - - - - - Number of rows of the native array - - - - - Number of columns of the native array - - - - - View a CMatrix as a FortranMatrix. Doesn't actually allocate - a new matirx - just gives a different label to the same bits, and swaps the - row/column count information associated with the bits. - - - - - WARNING: use of this function may lead to unverifiable or invalid code - - - - - Creates a C-style row major two-dimensional array from a native pointer, the number of rows and the number of columns. - Nothing is actually copied. - - - - - This type wraps a pointer to a blob of unmanaged memory assumed to contain - a C-style row major two-dimensional matrix of items compatible with the (presumably blittable) - type 'T. The blob of memory must be allocated and managed externally, - e.g. by a computation routine written in C. - - All operations on this type are marked inlined - because the code used to implement the operations is not verifiable. - - Any code that uses these operations will be unverifiable and may - cause memory corruption if not used with extreme care. - - - - - WARNING: use of this function may lead to unverifiable or invalid code - - - - - Pointer to the C-style one-dimensional array - - - - - Length of the C-style one-dimensional array - - - - - WARNING: use of this function may lead to unverifiable or invalid code - - - - - Creates a C-style one dimensional array from a native pointer and the length of the array - Nothing is actually copied. - - - - - This type wraps a pointer to a blob of unmanaged memory assumed to contain - a C-style one-dimensional array of items compatible with the (presumably blittable) - type 'T. The blob of memory must be allocated and managed externally, - e.g. by a computation routine written in C. - - All operations on this type are marked inlined - because the code used to implement the operations is not verifiable. - - Any code that uses these operations will be unverifiable and may - cause memory corruption if not used with extreme care. - - - - - For native interop. Pin the given object - - - - - - - - - - - - - - - - - - - - - - - Represents a pinned handle to a structure with an underlying 2D array, i.e. an underlying NativeArray2. - Used when interfacing with native code math libraries such as LAPACK. - - - - - For native interop. Pin the given object - - - - - - - - - - - - - - - - - - - - Represents a pinned handle to a structure with an underlying 1D array, i.e. an underlying NativeArray. - Used when interfacing with native code math libraries such as LAPACK. - - - - - - - - Pin the given ref for the duration of a single call to the given function. A native pointer to - the contents of the ref is passed to the given function. Cleanup the GCHandle associated with the - pin when the function completes, even if an exception is raised. - - This function should only be used if 'T is a simple blittable type - such as "int" that does not contain any further heap references. - - WARNING: use of this function may lead to unverifiable or invalid code - - - - - - - - Interpret tables for an ascii lexer generated by fslex. - - - - - - - - Interpret tables for an ascii lexer generated by fslex, processing input asynchronously - - - - - The type of tables for an ascii lexer generated by fslex. - - - - - The start position for the lexeme - - - - - True if the refill of the buffer ever failed , or if explicitly set to true. - - - - - The end position for the lexeme - - - - - The start position for the lexeme - - - - - The length of the matched string - - - - - The matched string - - - - - True if the refill of the buffer ever failed , or if explicitly set to true. - - - - - The end position for the lexeme - - - - - Dynamically typed, non-lexically scoped parameter table - - - - - Fast helper to turn the matched characters into a string, avoiding an intermediate array - - - - - Fetch a particular character in the matched string - - - - - - - - - - - - - - - - - Adjust the start position associated with the lexbuf - - - - - - - - - - - - - - Remove all input, though don't discard the current lexeme - - - - - - - - Return absolute offset of the start of the line marked by the position - - - - - - - - The line number in the input stream, assuming fresh positions have been updated - using AsNewLinePos() and by modifying the EndPos property of the LexBuffer. - - - - - The file name associated with the input stream. - - - - - Get an arbitrary position, with the empty string as filename, and - - - - - Return the column number marked by the position, i.e. the difference between the AbsoluteOffset and the StartOfLineAbsoluteOffset - - - - - - - - The character number in the input stream - - - - - Gives a position shifted by specified number of characters - - - - - Get a position corresponding to the first line (line number 1) in a given file - - - - - Given a position at the start of a token of length n, return a position just beyond the end of the token - - - - - - - - Position information stored for lexing tokens - - - - - Interpret tables for a unicode lexer generated by fslex. - - - - - - - - Interpret tables for a unicode lexer generated by fslex, processing input asynchronously - - - - - The type of tables for an unicode lexer generated by fslex. - - - - - - - - - - - - - - - - - - - - - - - - - - Parsers generated by FsPars provide information from within parser - actions. This is accessed via the functions available on the local - variable parseState within parser actions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Tables generated by fsyacc - - - - - - - - - - - - - - - - - - - - - - - A record of options to control structural formatting. - For F# Interactive properties matching those of this value can be accessed via the 'fsi' - value. - - Floating Point format given in the same format accepted by System.Double.ToString, - e.g. f6 or g15. - - If ShowProperties is set the printing process will evaluate properties of the values being - displayed. This may cause additional computation. - - The ShowIEnumerable is set the printing process will force the evalution of IEnumerable objects - to a small, finite depth, as determined by the printing parameters. - This may lead to additional computation being performed during printing. - - - From F# Interactive the default settings can be adjusted using, for example, -
-   open Microsoft.FSharp.Compiler.Interactive.Settings;;
-   setPrintWidth 120;;
- 
-
-
-
- - - The maximum number of rows for which to generate layout for table-like - structures. -1 if no maximum. - - - - - The maximum number of elements for which to generate layout for - list-like structures, or columns in table-like - structures. -1 if no maximum. - - - - - Return to the layout-generation - environment to layout any otherwise uninterpreted object - - - - - - - - Data representing structured layouts of terms. - - - - - - - - Convert any value to a string using a standard formatter - Data is typically formatted in a structured format, e.g. - lists are formatted using the "[1;2]" notation. - The details of the format are not specified and may change - from version to version and according to the flags given - to the F# compiler. The format is intended to be human-readable, - not machine readable. If alternative generic formats are required - you should develop your own formatter, using the code in the - implementation of this file as a starting point. - - Data from other .NET languages is formatted using a virtual - call to Object.ToString() on the boxed version of the input. - - - - - - - - Convert any value to a layout using the given formatting options. The - layout can then be processed using formatting display engines such as - those in the LayoutOps module. any_to_string and output_any are - built using any_to_layout with default format options. - - - - - Ouput any value to a channel using the same set of formatting rules - as any_to_string - - - - - - - - - - - - - - Layout two vertically. - - - - - Layout list vertically. - - - - - Wrap braces around layout. - - - - - Wrap round brackets around Layout. - - - - - Join layouts into a comma separated list. - - - - - The empty layout - - - - - Is it the empty layout? - - - - - An string which is left parenthesis (no space on the right). - - - - - Layout like an F# list. - - - - - An uninterpreted leaf, to be interpreted into a string - by the layout engine. This allows leaf layouts for numbers, strings and - other atoms to be customized according to culture. - - - - - Join broken with ident=0 - - - - - Join broken with ident=1 - - - - - Join broken with ident=2 - - - - - Join, unbreakable. - - - - - Join, possible break with indent=1 - - - - - Join, possible break with indent=2 - - - - - Join, possible break with indent=0 - - - - - Layout like an F# option. - - - - - An string which is right parenthesis (no space on it's left). - - - - - Join layouts into a semi-colon separated list. - - - - - An string which requires no spaces either side. - - - - - Join layouts into a list separated using the given Layout. - - - - - Join layouts into a space separated list. - - - - - Wrap square brackets around layout. - - - - - See tagL - - - - - Form tuple of layouts. - - - - - For limitting layout of list-like sequences (lists,arrays,etc). - unfold a list of items using (project and z) making layout list via itemL. - If reach maxLength (before exhausting) then truncate. - - - - - An string leaf - - - - - A layout is a sequence of strings which have been joined together. - The strings are classified as words, separators and left and right parenthesis. - This classification determines where spaces are inserted. - A joint is either unbreakable, breakable or broken. - If a joint is broken the RHS layout occurs on the next line with optional indentation. - A layout can be squashed to for given width which forces breaks as required. - - -
-
diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.ProjectSystem.Base.dll b/tools/FSharp_1.9.6.16/bin/FSharp.ProjectSystem.Base.dll deleted file mode 100644 index fdb51bf7..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.ProjectSystem.Base.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.ProjectSystem.FSharp.dll b/tools/FSharp_1.9.6.16/bin/FSharp.ProjectSystem.FSharp.dll deleted file mode 100644 index 786b8fe1..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.ProjectSystem.FSharp.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.ProjectSystem.PropertyPages.dll b/tools/FSharp_1.9.6.16/bin/FSharp.ProjectSystem.PropertyPages.dll deleted file mode 100644 index 42926c7a..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.ProjectSystem.PropertyPages.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/FSharp.VS.FSI.dll b/tools/FSharp_1.9.6.16/bin/FSharp.VS.FSI.dll deleted file mode 100644 index 5f3b1b18..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/FSharp.VS.FSI.dll and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/Microsoft.FSharp.targets b/tools/FSharp_1.9.6.16/bin/Microsoft.FSharp.targets deleted file mode 100644 index 5357e34d..00000000 --- a/tools/FSharp_1.9.6.16/bin/Microsoft.FSharp.targets +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - $(MSBuildExtensionsPath)\FSharp\1.0\ - $(MSBuildAllProjects);$(FSharpTargetsDir)\Microsoft.FSharp.targets - .fs - F# - - $(Optimize) - - - - - - - - - - <_Temporary Remove="@(_Temporary)" /> - - - - - - - - - - - - - - - - - - - - <_Temporary Remove="@(_Temporary)" /> - - - - - - <_DebugSymbolsIntermediatePathTemporary Include="$(PdbFile)"/> - - <_DebugSymbolsIntermediatePath Include="@(_DebugSymbolsIntermediatePathTemporary->'%(RootDir)%(Directory)%(Filename).pdb')"/> - - - - - false - _ComputeNonExistentFileProperty - $(WarningsAsErrors) - - - - - - - - - - <_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" /> - - - - - - - - diff --git a/tools/FSharp_1.9.6.16/bin/fsc.exe b/tools/FSharp_1.9.6.16/bin/fsc.exe deleted file mode 100644 index 67166806..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/fsc.exe and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/fsi.exe b/tools/FSharp_1.9.6.16/bin/fsi.exe deleted file mode 100644 index dbceba82..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/fsi.exe and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/fslex.exe b/tools/FSharp_1.9.6.16/bin/fslex.exe deleted file mode 100644 index 2ad6604d..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/fslex.exe and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/bin/fsyacc.exe b/tools/FSharp_1.9.6.16/bin/fsyacc.exe deleted file mode 100644 index 710aae35..00000000 Binary files a/tools/FSharp_1.9.6.16/bin/fsyacc.exe and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/doc/README-samples.html b/tools/FSharp_1.9.6.16/doc/README-samples.html deleted file mode 100644 index 87b93fc3..00000000 --- a/tools/FSharp_1.9.6.16/doc/README-samples.html +++ /dev/null @@ -1,26 +0,0 @@ - - - -The F# Compiler Version 1.9.6.16 - - - - - - - - - - -

Samples

- -

-The F# samples for this release can be found online at http://code.msdn.com/fsharpsamples. -

- - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/doc/README-vfsi.html b/tools/FSharp_1.9.6.16/doc/README-vfsi.html deleted file mode 100644 index d8e58271..00000000 --- a/tools/FSharp_1.9.6.16/doc/README-vfsi.html +++ /dev/null @@ -1,88 +0,0 @@ - - - -The F# Compiler Version 1.9.6.16 - - - - - - - - - - -

Using F# Interactive in Visual Studio

- -

-If you use Visual Studio 2008 (including the -freely available Visual Studio 2008 Shell), -you can use 'F# Interactive' as a tool window!

- -

Starting F# Interactive

- -

To start the session, go to the View -> Other Windows and select 'F# Interactive'. You can also start a session -simply using Alt-Return in an F# source document, or using the shortcut Ctrl+Alt+F.

- - -

Editing and Evaluating a Script

- -

You create a script file using File -> New File -> Script -> F# Script File.

- -

The normal mode of operation is to edit an F# script file and send fragments for execution in the tool window. In -this mode, your fragments are typechecked as you type, and you are actively working towards a completed -file that can act as the finished product of your explorative programming. The tool window is then -just used for displaying data.

- -

In the script file, you should use #r and #I to reference assemblies -and augment your assembly include path.

- - -

The session is global to the instance of Visual Studio and text can be sent from any -F# source code file (.fs, .fsi, .fsx, .ml, .mli). -Use the Alt-Return combination to evaluate -selected text. For example, highlight printfn "Hello World" and use this key combination - the code will then -execute.

- - -

Execution Context for Scripts

- - -

The F# Interactive session executes only those code fragments you direct it to. If you select a fragment from -half-way through your script, earlier portions of the script will not be executed implicitly.

- -

When sending text from a file, file names are resolved relative to the scripts containing the reference. Visual F# Interactive sets the -line and directory context of the session each time an entry is sent from Visual Studio, though it doesn't -adjust the value of System.Environment.CurrentDirectory. It can be useful to add

-
-    System.Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
-
-

to your script. __SOURCE_DIRECTORY can be used in any F# source file and is expanded to the directory -containing the file.

- - -

Organizing Your Scripts

- -

Although scripts can be authored without a project, it can be useful to create an F# Project to hold a group of related scripts. -You can do this with New Project or by making a copy of one of the projects in -the F# Samples directory. You can also use #load to load both signature and implementation files as -if they have been compiled as compilation units by the command-line compiler.

- - -

Controlling the Evaluation Session

- -

In the tool window, #quit;; will quit and Ctrl+C will cancel execution. -The context menu in the tool window includes -"Reset Session" and "Cancel Evaluation" commands. -If you do type into the tool window, history is available with the up/down arrows.

- - -

To troubleshoot, see README-fsharp.html

- -

Please contact fsbugs@microsoft.com with feedback on this documentation.

- - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/doc/core-style.css b/tools/FSharp_1.9.6.16/doc/core-style.css deleted file mode 100644 index 3fbff6f9..00000000 --- a/tools/FSharp_1.9.6.16/doc/core-style.css +++ /dev/null @@ -1,64 +0,0 @@ - diff --git a/tools/FSharp_1.9.6.16/doc/groupStyle-copy.css b/tools/FSharp_1.9.6.16/doc/groupStyle-copy.css deleted file mode 100644 index 61ec4f6b..00000000 --- a/tools/FSharp_1.9.6.16/doc/groupStyle-copy.css +++ /dev/null @@ -1,112 +0,0 @@ -BODY -{ - font-family: verdana; -} -P -{ - padding-left: 20px; -} -.TitleHeader -{ - padding-left: 20px; - font-size: 1em; - font-weight: bold; -} -.linkbox -{ - margin-left: 20px; - margin-right: 30px; - margin-bottom: 20px; - padding-bottom: 10px; - width: 175px; - float: right; - border-right: #0066CC 1px solid; - background: #f1f1f1; - border-left: #0066CC 1px solid; - border-bottom: #0066CC 1px solid; -} -.outlineDivTitle -{ - background-color: #0066CC; - color: #FFFFFF; - padding-left: 15px; - padding-bottom: 2px; - padding-top: 2px; - font: bold 70% Verdana; - color: #ffffff; -} -.outlineDiv -{ - padding-left: 20px; - background-image: URL(/images/blueTriangle.gif); - background-repeat: no-repeat; - background-position: 6 8; - font: 70% verdana; - color: #003399; - line-height: 200%; -} - -.GroupContactTitle -{ - color: #003399; - font-size: .93em; -} -.GroupContact -{ - color: #003399; - font-size: .93em; - font-weight: bold; -} -A.GroupContactLink -{ - color: #003399; -} -.BlankPictureDiv -{ - background-color: #cccccc; - width: 75px; - height: 75px; - border: solid #999999 1px; - font-size: 70%; - font-weight: bold; - padding-left: 5px; - padding-top: 20px; - padding-right: 5px; - padding-bottom: 5px; -} -.PeopleGroupImage -{ - border-color: #999999; -} -A.PeopleLastNameLink -{ - color: #003399; -} -.PeopleLastNameLinked -{ - padding-top: 3px; - font-size: .82em; - font-weight: bold; -} -.PeopleFirstNameLinked -{ - color: #003399; - padding-top: 3px; - padding-bottom: 8px; - font-size: .82em; - text-decoration: none; -} -.PeopleLastName -{ - padding-top: 3px; - font-size: .82em; - font-weight: bold; -} -.PeopleFirstName -{ - padding-top: 3px; - padding-bottom: 8px; - font-size: .82em; - text-decoration: none; -} - diff --git a/tools/FSharp_1.9.6.16/doc/rmcstyle-copy.css b/tools/FSharp_1.9.6.16/doc/rmcstyle-copy.css deleted file mode 100644 index 42bc2277..00000000 --- a/tools/FSharp_1.9.6.16/doc/rmcstyle-copy.css +++ /dev/null @@ -1,287 +0,0 @@ -.title_2ndLvl -{ - font-family: tahoma; - font-size: 120%; - color: #FFFFFF; - padding-left: 5px; -} -.BODY -{ - font-family:verdana; -} -A -{ - color: #003399; -} -.VR -{ - background-color: #cccccc; - width: 1px; -} -.HR -{ - background-color: #cccccc; - height: 1px; -} -.link1 -{ - font-size:70%; - font-family: verdana; -} -.link2 -{ - font-size: 70%; - font-family:Verdana; - font-style:italic; -} -.link3 -{ - font-style: italic; - font-family: Verdana; - color: #000000; - font-weight: bold; -} -.link4 -{ - font: italic 70% Verdana; - color: #000000; - text-decoration: none; -} -.link5 -{ - font: 70% Verdana; - color: #003399; - text-decoration: none; -} -.link6 -{ - font: 70% verdana; - color: #003399; -} -.text1 -{ - font: 70% Verdana; -} -.text2 -{ - padding-bottom: 10px; - font: 70% Verdana; -} -.text3 -{ - font-size: 120%; - font-family:Verdana; - color: #000000; -} -.text3_w_padding -{ - font: 120% Verdana; - color: #000000; - padding-left:20px; -} -.text4 -{ - font-weight: bold; - font-size: 70%; - font-family: Verdana; - color: #000000; -} -.text5 -{ - padding-left: 5px; - font-weight: bold; - font-size: 70%; - font-family: Verdana; - color: #ffffff; -} -.text6 -{ - font: 70%; - font-family: verdana; -} -.newsTitle -{ - font-family: tahoma; - font-size: 120%; - color: #CCCCCC; -} -.areaTitle -{ - font-family: tahoma; - font-size: 120%; - color: #FFFFFF; -} -.newsContentTitle -{ - font-family: tahoma; - font-size: 120%; - color: #FFFFFF; -} -.areaContentTitle -{ - font-family: verdana; - font-size: 140%; - color: #000000; -} -.areaContentTitle_w_pad -{ - font-family: verdana; - font-size: 140%; - color: #000000; - padding-left: 20px; - padding-top: 20px; -} - -.newsArchiveTitle -{ - font-family: verdana; - font-size: 150%; - color: #000000; -} -.FeatureStoryTitle -{ - font-family: verdana; - font-size: 130%; - color: #000000; -} -.FeatureStoryByLine -{ - font-family: verdana; - font-size: 80%; - color: #000000; -} -.SideBarLink -{ - font-family: verdana; - font-size: 80%; - color: #000000; -} -.newsArchiveSubTitle -{ - font-family: verdana; - font-size: 118%; - color: #666666; -} -.newsArchiveYear -{ - font: bold 80% Verdana; - color: #000000; - border-bottom: #cccccc 1px solid; - border-top: #cccccc 1px solid; -} - -.newsHeadlineTitle -{ - font-family: verdana; - font-size: 140%; - color: #000000; -} - -.newsPublicationDate -{ - font-family: Verdana; - font-size: 60%; - color: #000000; - font-weight: bold; -} -.newsPublicationSource -{ - font-family: Verdana; - font-size: 60%; - color: #000000; - font-weight: bold; -} -H1 -{ - font-family: tahoma; - font-weight: bold; - font-size: 120%; - color: #000000; -} -H3 -{ - font-family: tahoma; - font-weight: bold; - font-size: 110%; - color: #000000; -} -P -{ - font-family: verdana; - font-size: 70%; - color: #000000; -} -P P -{ - font-size: 100%; -} -HR -{ - color: #cccccc; - height: 1px; -} - - -.groupheading -{ - padding-left: 20px; - padding-top: 40px; - padding-bottom: 10px; - font-size: 1.4em; - color: #0065CF; - font-family:verdana; -} -.GroupTitle -{ - padding-left: 20px; - padding-top: 20px; - padding-bottom: 10px; - font-size: 1.4em; - color: #0065CF; -} -LI -{ - font-size: 70%; - font-family: Verdana; -} -LI LI -{ - font-size: 100%; -} -LI A -{ - font-size: 100%; -} -.linkbox -{ - margin-left: 20px; - margin-right: 30px; - margin-bottom: 20px; - padding-bottom: 10px; - width: 175px; - float: right; - border-right: #0066CC 1px solid; - background: #f1f1f1; - border-left: #0066CC 1px solid; - border-bottom: #0066CC 1px solid; -} -.outlineDivTitle -{ - background-color: #0066CC; - color: #FFFFFF; - padding-left: 15px; - padding-bottom: 2px; - padding-top: 2px; - font: bold 70% Verdana; - color: #ffffff; -} -.outlineDiv -{ - padding-left: 20px; - background-image: URL(/images/blueTriangle.gif); - background-repeat: no-repeat; - background-position: 6 8; - font: 70% verdana; - color: #003399; - line-height: 200%; -} \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/install-mono.sh b/tools/FSharp_1.9.6.16/install-mono.sh deleted file mode 100644 index c3bc4541..00000000 --- a/tools/FSharp_1.9.6.16/install-mono.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -# This script is for use with CLIs on Unix, e.g. Mono -gacutil -i bin/FSharp.Core.dll -gacutil -i bin/FSharp.Compiler.dll -gacutil -i bin/FSharp.PowerPack.dll - -# Trying to use --aot on Mono does not seem to work correctly, -# at least on the pre-release of Mono 2.0. -# On Un*x, it seems to work in the sense that it creates the -# .so files, but then fsi.exe does not seem to work at all. -# On Windows, it just does not work. -# For this reason, it does not seem to be advisable to try to -# use it. -#mono --aot bin/FSharp.Core.dll -#mono --aot bin/FSharp.Compiler.dll -#mono --aot bin/FSharp.PowerPack.dll -#mono --aot bin/fsc.exe -#mono --aot bin/fsi.exe diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/array.fs deleted file mode 100644 index 6117a9cb..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array.fs +++ /dev/null @@ -1,754 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open System.Diagnostics - open System.Collections.Generic - open System.Diagnostics.CodeAnalysis - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Primitives.Basics - - /// Basic operations on arrays - [] - [] - module Array = - - [] - let length (array: array<_>) = array.Length - - [] - let init n f = Microsoft.FSharp.Primitives.Basics.Array.init n f - - [] - let zeroCreate n = Microsoft.FSharp.Primitives.Basics.Array.zeroCreate n - - [] - let create (n:int) (x:'T) = - let array = (zeroCreate n : array<'T>) - for i = 0 to n - 1 do - array.[i] <- x - array - - - [] - let isEmpty (array: array<'T>) = (array.Length = 0) - - [] - let empty<'T> = ([| |] : 'T []) - - [] - let blit (array1 : array<'T>) sourceIndex (array2: array<'T>) targetIndex count = - if sourceIndex < 0 then invalidArg "sourceIndex" "index must be positive" - if count < 0 then invalidArg "count" "length must be positive" - if targetIndex < 0 then invalidArg "targetIndex" "index must be positive" - if sourceIndex + count > array1.Length then invalidArg "sourceIndex" "out of range" - if targetIndex + count > array2.Length then invalidArg "targetIndex" "out of range" - for i = 0 to count - 1 do - array2.[targetIndex+i] <- array1.[sourceIndex + i] - - let rec concatAddLengths (arrs:array<'T> array) i acc = - if i >= arrs.Length then acc - else concatAddLengths arrs (i+1) (acc + arrs.[i].Length) - - let rec concatBlit (arrs:array>) i j (tgt:array<'T>) = - if i < arrs.Length then - let h = arrs.[i] - let len = h.Length in - for i = 0 to len - 1 do - tgt.[j+i] <- h.[i] - concatBlit arrs (i+1) (j+len) tgt - - [] - let concatArrays (arrs : array>) = - let res = zeroCreate (concatAddLengths arrs 0 0) - concatBlit arrs 0 0 res ; - res - - [] - let concat (arrs: seq>) = - let arrs = Seq.to_array arrs in - concatArrays arrs - - [] - let collect (f : 'T -> array<'U>) (input : array<'T>) : array<'U>= - let inputLength = input.Length - let result = Array.zeroCreate> inputLength - for i = 0 to inputLength - 1 do - result.[i] <- f input.[i] - concatArrays result - - [] - let append (array1:array<'T>) (array2:array<'T>) = - let n1 = array1.Length - let n2 = array2.Length - let res = zeroCreate (n1 + n2) - for i = 0 to n1 - 1 do - res.[i] <- array1.[i] - for i = 0 to n2 - 1 do - res.[i+n1] <- array2.[i] - res - - [] - let copy (array: array<'T>) = - let len = array.Length - let res = zeroCreate len - for i = 0 to len - 1 do - res.[i] <- array.[i] - res - - [] - let to_list array = Microsoft.FSharp.Primitives.Basics.List.of_array array - - [] - let of_list xs = Microsoft.FSharp.Primitives.Basics.List.to_array xs - - [] - let iter f (array: array<'T>) = - let len = array.Length - for i = 0 to len - 1 do - f array.[i] - - [] - let map (f: 'T -> 'U) (array:array<'T>) = - let len = array.Length - let res = (zeroCreate len : array<'U>) - for i = 0 to len - 1 do - res.[i] <- f array.[i] - res - - [] - let iter2 f (array1: array<'T>) (array2: array<'U>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths"; - for i = 0 to len1 - 1 do - f.Invoke(array1.[i], array2.[i]) - - [] - let map2 f (array1: array<'T>) (array2: array<'U>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths"; - let res = zeroCreate len1 - for i = 0 to len1 - 1 do - res.[i] <- f.Invoke(array1.[i], array2.[i]) - res - - [] - let mapi2 f (array1: array<'T>) (array2: array<'U>) = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths"; - let res = zeroCreate len1 - for i = 0 to len1 - 1 do - res.[i] <- f.Invoke(i,array1.[i], array2.[i]) - res - - [] - let iteri f (array:array<'T>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len = array.Length - for i = 0 to len - 1 do - f.Invoke(i, array.[i]) - - [] - let iteri2 f (array1: array<'T>) (array2: array<'U>) = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths"; - for i = 0 to len1 - 1 do - f.Invoke(i,array1.[i], array2.[i]) - - [] - let mapi (f : int -> 'T -> 'U) (array: array<'T>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len = array.Length - let res = zeroCreate<'U> len - for i = 0 to len - 1 do - res.[i] <- f.Invoke(i,array.[i]) - res - - [] - let exists (f: 'T -> bool) (array:array<'T>) = - let len = array.Length - let rec loop i = i < len && (f array.[i] || loop (i+1)) - loop 0 - - [] - let exists2 f (array1: array<_>) (array2: array<_>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths" - let rec loop i = i < len1 && (f.Invoke(array1.[i], array2.[i]) || loop (i+1)) - loop 0 - - [] - let forall (f: 'T -> bool) (array:array<'T>) = - let len = array.Length - let rec loop i = i >= len || (f array.[i] && loop (i+1)) - loop 0 - - [] - let forall2 f (array1: array<_>) (array2: array<_>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths" - let rec loop i = i >= len1 || (f.Invoke(array1.[i], array2.[i]) && loop (i+1)) - loop 0 - - [] - let pick f (array: array<_>) = - let rec loop i = - if i >= array.Length then raise (System.Collections.Generic.KeyNotFoundException()) else - match f array.[i] with - | None -> loop(i+1) - | Some res -> res - loop 0 - - [] - let tryPick f (array: array<_>) = - let rec loop i = - if i >= array.Length then None else - match f array.[i] with - | None -> loop(i+1) - | res -> res - loop 0 - - [] - let choose f (array: array<_>) = - let res = new System.Collections.Generic.List<_>() // ResizeArray - for i = 0 to array.Length - 1 do - match f array.[i] with - | None -> () - | Some b -> res.Add(b) - res.ToArray() - - [] - let filter f (array: array<_>) = - let res = new System.Collections.Generic.List<_>() // ResizeArray - for i = 0 to array.Length - 1 do - let x = array.[i] - if f x then res.Add(x) - res.ToArray() - - [] - let partition f (array: array<_>) = - let res1 = new System.Collections.Generic.List<_>() // ResizeArray - let res2 = new System.Collections.Generic.List<_>() // ResizeArray - for i = 0 to array.Length - 1 do - let x = array.[i] - if f x then res1.Add(x) else res2.Add(x) - res1.ToArray(), res2.ToArray() - - [] - let find f (array: array<_>) = - let rec loop i = - if i >= array.Length then raise (System.Collections.Generic.KeyNotFoundException()) else - if f array.[i] then array.[i] else loop (i+1) - loop 0 - - [] - let tryFind f (array: array<_>) = - let rec loop i = - if i >= array.Length then None else - if f array.[i] then Some array.[i] else loop (i+1) - loop 0 - - [] - let zip (array1: array<_>) (array2: array<_>) = - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths" - let res = zeroCreate len1 - for i = 0 to len1 - 1 do - res.[i] <- (array1.[i],array2.[i]) - res - - [] - let zip3 (array1: array<_>) (array2: array<_>) (array3: array<_>) = - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths" - if len1 <> array3.Length then invalidArg "array3" "the arrays have different lengths" - let res = zeroCreate len1 - for i = 0 to len1 - 1 do - res.[i] <- (array1.[i],array2.[i],array3.[i]) - res - - [] - let unzip (array: array<_>) = - let len = array.Length - let res1 = zeroCreate len - let res2 = zeroCreate len - for i = 0 to len - 1 do - let x,y = array.[i] - res1.[i] <- x; - res2.[i] <- y; - res1,res2 - - [] - let unzip3 (array: array<_>) = - let len = array.Length - let res1 = zeroCreate len - let res2 = zeroCreate len - let res3 = zeroCreate len - for i = 0 to len - 1 do - let x,y,z = array.[i] - res1.[i] <- x; - res2.[i] <- y; - res3.[i] <- z; - res1,res2,res3 - - [] - let rev (array: array<_>) = - let len = array.Length - let res = zeroCreate len - for i = 0 to len - 1 do - res.[(len - i) - 1] <- array.[i] - res - - [] - let fold (f : 'T -> 'U -> 'T) (acc: 'T) (array:array<'U>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable state = acc - let len = array.Length - for i = 0 to len - 1 do - state <- f.Invoke(state,array.[i]) - state - - [] - let foldBack (f : 'T -> 'U -> 'U) (array:array<'T>) (acc: 'U) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable res = acc - let len = array.Length - for i = len - 1 downto 0 do - res <- f.Invoke(array.[i],res) - res - - - [] - let foldBack2 f (array1:'T1[]) (array2:'T2 []) (acc: 'U) = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let mutable res = acc - let len = array1.Length - if len <> array2.Length then invalidArg "array2" "the arrays have different lengths" - for i = len - 1 downto 0 do - res <- f.Invoke(array1.[i],array2.[i],res) - res - - [] - let fold2 f (acc: 'T) (array1:'T1[]) (array2:'T2 []) = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let mutable state = acc - let len = array1.Length - if len <> array2.Length then invalidArg "array2" "the arrays have different lengths" - for i = 0 to len - 1 do - state <- f.Invoke(state,array1.[i],array2.[i]) - state - - - [] - let foldSubLeft f acc (array : array<_>) start fin = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable res = acc - for i = start to fin do - res <- f.Invoke(res,array.[i]) - res - - [] - let foldSubRight f (array : array<_>) start fin acc = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable res = acc - for i = fin downto start do - res <- f.Invoke(array.[i],res) - res - - [] - let scanSubRight f (array : array<_>) start fin initState = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable state = initState - let res = create (2+fin-start) initState - for i = fin downto start do - state <- f.Invoke(array.[i],state); - res.[i - start] <- state - res - - [] - let scanSubLeft f initState (array : array<_>) start fin = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable state = initState - let res = create (2+fin-start) initState - for i = start to fin do - state <- f.Invoke(state,array.[i]); - res.[i - start+1] <- state - res - - [] - let scan f acc (array : array<_>) = - let arrn = array.Length - scanSubLeft f acc array 0 (arrn - 1) - - [] - let scanBack f (array : array<_>) acc = - let arrn = array.Length - scanSubRight f array 0 (arrn - 1) acc - - [] - let reduce f (array : array<_>) = - let arrn = array.Length - if arrn = 0 then invalidArg "array" "the input array may not be empty" - else foldSubLeft f array.[0] array 1 (arrn - 1) - - [] - let reduceBack f (array : array<_>) = - let arrn = array.Length - if arrn = 0 then invalidArg "array" "the input array may not be empty" - else foldSubRight f array 0 (arrn - 2) array.[arrn - 1] - - [] - let sortInPlaceWith f (array : array<'T>) = - let len = array.Length - if len < 2 then () - elif len = 2 then - let c = f array.[0] array.[1] - if c > 0 then - let tmp = array.[0] - array.[0] <- array.[1]; - array.[1] <- tmp - else - System.Array.Sort(array, ComparisonIdentity.FromFunction(f)) - - [] - let sortInPlaceBy (f: 'T -> 'U) (array : array<'T>) = - let len = array.Length - if len < 2 then () - elif len = 2 then - let c = Operators.compare (f array.[0]) (f array.[1]) - if c > 0 then - let tmp = array.[0] - array.[0] <- array.[1]; - array.[1] <- tmp - else - System.Array.Sort(array, ComparisonIdentity.FromFunction(fun x y -> Operators.compare (f x) (f y))) - - [] - let sortWith (f: 'T -> 'T -> int) (array : array<'T>) = - let array = copy array - sortInPlaceWith f array; - array - - [] - let sortBy f array = - let array = copy array - sortInPlaceBy f array; - array - - [] - let sort array = - sortWith Operators.compare array - - [] - let sortInPlace array = - sortInPlaceWith Operators.compare array - - [] - let to_seq a = Seq.of_array a - - [] - let of_seq ie = Seq.to_array ie - - [] - let findIndex f (array : array<_>) = - let len = array.Length - let rec go n = if n >= len then raise (System.Collections.Generic.KeyNotFoundException()) elif f array.[n] then n else go (n+1) - go 0 - - [] - let tryFindIndex f (array : array<_>) = - let len = array.Length - let rec go n = if n >= len then None elif f array.[n] then Some n else go (n+1) - go 0 - - [] - let permute p (array : array<_>) = Microsoft.FSharp.Primitives.Basics.Array.permute p array - - [] - let inline sum (array:array< (^T) >) : ^T = - let mutable acc = LanguagePrimitives.GenericZero< (^T) > - for i = 0 to array.Length - 1 do - acc <- Checked.(+) acc array.[i] - acc - - [] - let inline sumBy (f: 'T -> ^U) (array:array<'T>) : ^U = - let mutable acc = LanguagePrimitives.GenericZero< (^U) > - for i = 0 to array.Length - 1 do - acc <- Checked.(+) acc (f array.[i]) - acc - - [] - let min (array:array<_>) = - if array.Length = 0 then invalidArg "array" "the array is empty" - let mutable acc = array.[0] - for i = 1 to array.Length - 1 do - acc <- Operators.min acc array.[i] - acc - - [] - let minBy f (array:array<_>) = - if array.Length = 0 then invalidArg "array" "the array is empty" - let mutable acc = f array.[0] - let mutable acc_v = array.[0] - for i = 1 to array.Length - 1 do - let cur = f array.[i] - if cur < acc then - acc <- cur - acc_v <- array.[i] - acc_v - - [] - let max (array:array<_>) = - if array.Length = 0 then invalidArg "array" "the array is empty" - let mutable acc = array.[0] - for i = 1 to array.Length - 1 do - acc <- Operators.max acc array.[i] - acc - - [] - let maxBy f (array:array<_>) = - if array.Length = 0 then invalidArg "array" "the array is empty" - let mutable acc = f array.[0] - let mutable acc_v = array.[0] - for i = 1 to array.Length - 1 do - let cur = f array.[i] - if cur > acc then - acc <- cur - acc_v <- array.[i] - acc_v - - [] - let inline average (array:array<_>) = Seq.average array - - [] - let inline averageBy f (array:array<_>) = Seq.averageBy f array - - [] - let sub (array:array<'T>) (startIndex:int) (count:int) = - if startIndex < 0 then invalidArg "startIndex" "index must be positive" - if count < 0 then invalidArg "count" "length must be positive" - if startIndex + count > array.Length then invalidArg "count" "out of range" - - let res = (zeroCreate count : array<'T>) - for i = 0 to count - 1 do - res.[i] <- array.[startIndex + i] - res - - - [] - let is_empty array = isEmpty array - - [] - let get (array:array<_>) n = array.[n] - - [] - let set (array:array<_>) n v = array.[n] <- v - - [] - let zero_create n = Array.zeroCreate n - - [] - let fill (array:array<'T>) (startIndex:int) (count:int) (x:'T) = - if startIndex < 0 then invalidArg "startIndex" "index must be positive" - if count < 0 then invalidArg "count" "length must be positive" - for i = startIndex to startIndex + count - 1 do - array.[i] <- x - - [] - let fold_left f z array = fold f z array - - [] - let fold_right f array z = foldBack f array z - - [] - let fold_left2 f z array1 array2 = fold2 f z array1 array2 - - [] - let fold_right2 f array1 array2 z = foldBack2 f array1 array2 z - - [] - let reduce_left f array = reduce f array - - [] - let reduce_right f array = reduceBack f array - - [] - let scan_left f z array = scan f z array - - [] - let scan_right f array z = scanBack f array z - - [] - let for_all f array = forall f array - - [] - let for_all2 f array1 array2 = forall2 f array1 array2 - - [] - let tryfind f array = tryFind f array - - [] - let find_index f array = findIndex f array - - [] - let tryfind_index f array = tryFindIndex f array - - [] - let first f array = tryPick f array - -(* - [] - let sort f array = sortInPlaceWith f array -*) - - [] - let sort_by f array = sortInPlaceBy f array - - [] - let inline sum_by f array = sumBy f array - - [] - let inline average_by f array = averageBy f array - - [] - let min_by f array = minBy f array - - [] - let max_by f array = maxBy f array - - [] - let find_indexi f (array : array<_>) = - let len = array.Length - let rec go n = if n >= len then raise (System.Collections.Generic.KeyNotFoundException()) elif f n array.[n] then n else go (n+1) - go 0 - - [] - let tryfind_indexi f (array : array<_>) = - let len = array.Length - let rec go n = if n >= len then None elif f n array.[n] then Some n else go (n+1) - go 0 - - - [] - let split array = unzip array - - [] - let combine array1 array2 = zip array1 array2 - - [] - let make (n:int) (x:'T) = create n x - -#if FX_ATLEAST_40 - module Parallel = - open System.Threading - - [] - let choose f (c: array<'T>) = - let inputLength = c.Length - let lastInputIndex = inputLength - 1 - - let isChosen = zeroCreate inputLength - let results = zeroCreate<'U> inputLength - - Parallel.For(0, inputLength, (fun i -> - match f c.[i] with - | None -> () - | Some v -> - isChosen.[i] <- true; - results.[i] <- v - )) |> ignore - - let mutable outputLength = 0 - for i = 0 to lastInputIndex do - if isChosen.[i] then - outputLength <- outputLength + 1 - - let output = zeroCreate<'U> outputLength - let mutable curr = 0 - for i = 0 to lastInputIndex do - if isChosen.[i] then - output.[curr] <- results.[i] - curr <- curr + 1 - output - - [] - let collect (f : 'T -> array<'U>) (input : array<'T>) : array<'U>= - let inputLength = input.Length - let result = zeroCreate> inputLength - Parallel.For(0, inputLength, - (fun i -> result.[i] <- f input.[i])) |> ignore - concatArrays result - - [] - let map (f: 'T -> 'U) (input : array<'T>) : array<'U>= - let inputLength = input.Length - let result = zeroCreate<'U> inputLength - Parallel.For(0, inputLength, fun i -> - result.[i] <- f input.[i]) |> ignore - result - - [] - let mapi f (input: array<'T>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let inputLength = input.Length - let result = zeroCreate inputLength - Parallel.For(0, inputLength, fun i -> - result.[i] <- f.Invoke (i, input.[i])) |> ignore - result - - [] - let iter f (input : array<'T>) = - Parallel.For (0, input.Length, fun i -> f input.[i]) |> ignore - - [] - let iteri f (input : array<'T>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - Parallel.For (0, input.Length, fun i -> f.Invoke(i, input.[i])) |> ignore - - [] - let init count f = - let result = zeroCreate count - Parallel.For (0, count, fun i -> result.[i] <- f i) |> ignore - result - - [] - let partition predicate (array : array<'T>) = - let inputLength = array.Length - let lastInputIndex = inputLength - 1 - - let isTrue = zeroCreate inputLength - Parallel.For(0, inputLength, - fun i -> isTrue.[i] <- predicate array.[i] - ) |> ignore - - let mutable trueLength = 0 - for i in 0 .. lastInputIndex do - if isTrue.[i] then trueLength <- trueLength + 1 - - let trueResult = zeroCreate<'T> trueLength - let falseResult = zeroCreate<'T> (inputLength - trueLength) - let mutable iTrue = 0 - let mutable iFalse = 0 - for i = 0 to lastInputIndex do - if isTrue.[i] then - trueResult.[iTrue] <- array.[i] - iTrue <- iTrue + 1 - else - falseResult.[iFalse] <- array.[i] - iFalse <- iFalse + 1 - - (trueResult, falseResult) -#endif \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/array.fsi deleted file mode 100644 index 9381fdd9..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array.fsi +++ /dev/null @@ -1,463 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - open System.Collections.Generic - - /// Basic operations on arrays - [] - [] - module Array = - - /// Build a new array that contains the elements of the first array followed by the elements of the second array - val append: array1:array<'T> -> array2:array<'T> -> array<'T> - - /// Return the average of the elements in the array. If the array is empty an ArgumentException is thrown. - val inline average : array:^T array -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member DivideByInt : ^T*int -> ^T) - and ^T : (static member Zero : ^T) - - - /// Return the average of the elements generated by applying the function to each element of the array. - /// If the array is empty an ArgumentException is thrown. - val inline averageBy : projection:('T -> ^U) -> array:array<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U*int -> ^U) - and ^U : (static member Zero : ^U) - - /// Read a range of elements from the first array and write them into the second. - val blit: source:array<'T> -> sourceIndex:int -> target:array<'T> -> targetIndex:int -> count:int -> unit - - /// For each element of the array, apply the given function. Concatenate all the results and return the combined array. - val collect : mapping:('T -> array<'U>) -> array:array<'T> -> array<'U> - - /// Build a new array that contains the elements of each of the given sequence of arrays - val concat: arrays:seq> -> array<'T> - - /// Build a new array that contains the elements of the given array - val copy: array:array<'T> -> array<'T> - - /// Create an array whose elements are all initially the given value. - val create: count:int -> value:'T -> array<'T> - - /// Apply 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:array<'T> -> 'U option - - /// Fill a range of elements of the array with the given value. - val fill: target:array<'T> -> targetIndex:int -> count:int -> value:'T -> unit - - /// Apply 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:array<'T> -> 'U - - /// 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:array<'T> -> 'U array - - /// Return an empty array of the given type - [] - val empty<'T> : array<'T> - - /// Test if any element of the array satisfies the given predicate. - /// - /// The predicate is applied to the elements of the input array. If any application - /// returns true then the overall result is true and no further elements are tested. - /// Otherwise, false is returned. - val exists: predicate:('T -> bool) -> array:array<'T> -> bool - - /// Test if any pair of corresponding elements of the arrays satisfies the given predicate. - /// - /// The predicate is applied to matching elements in the two collections up to the lesser of the - /// two lengths of the collections. If any application returns true then the overall result is - /// true and no further elements are tested. Otherwise, if one collections is longer - /// than the other then the ArgumentException exception is raised. - /// Otherwise, false is returned. - val exists2: predicate:('T1 -> 'T2 -> bool) -> array1:'T1 array -> array2:'T2 array -> bool - - /// Return a new collection containing only the elements of the collection - /// for which the given predicate returns "true" - val filter: predicate:('T -> bool) -> array:array<'T> -> array<'T> - - /// Return the first element for which the given function returns 'true'. - /// Raise KeyNotFoundException if no such element exists. - val find: predicate:('T -> bool) -> array:array<'T> -> 'T - - /// Return 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:array<'T> -> int - - /// Test if all elements of the array satisfy the given predicate. - /// - /// The predicate is applied to the elements of the input collection. If any application - /// returns false then the overall result is false and no further elements are tested. - /// Otherwise, true is returned. - val forall: predicate:('T -> bool) -> array:array<'T> -> bool - - - /// Test if all corresponding elements of the array satisfy the given predicate pairwise. - /// - /// The predicate is applied to matching elements in the two collections up to the lesser of the - /// two lengths of the collections. If any application returns false then the overall result is - /// false and no further elements are tested. Otherwise, if one collection is longer - /// than the other then the ArgumentException exception is raised. - /// Otherwise, true is returned. - val forall2: predicate:('T1 -> 'T2 -> bool) -> array1:'T1 array -> array2:'T2 array -> bool - - /// Apply 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: array<'T> -> 'State - - /// Apply 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:array<'T> -> state:'State -> 'State - - /// Apply 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 array -> array2:'T2 array -> '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 array -> array2:'T2 array -> state:'State -> 'State - - /// Get an element from an array - val get: array:array<'T> -> index:int -> 'T - - /// Create an array given the dimension and a generator function to compute the elements. - val init: count:int -> initializer:(int -> 'T) -> array<'T> - - /// Create an array where the entries are initially the default value Unchecked.defaultof<'T>. - val zeroCreate: count:int -> array<'T> - - /// Return true if the given array is empty, otherwise false - val isEmpty: array:array<'T> -> bool - - /// Apply the given function to each element of the array. - val iter: action:('T -> unit) -> array:array<'T> -> unit - - /// Apply 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 array -> array2:'T2 array -> 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:array<'T> -> unit - - /// Apply 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 array -> array2:'T2 array -> unit - - /// Return the length of an array. You can also use property arr.Length. - val length: array:array<'T> -> int - - /// 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:array<'T> -> 'U array - - /// Build 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 array -> array2:'T2 array -> 'U array - - /// Build 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 array -> array2:'T2 array -> 'U array - - /// 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:array<'T> -> 'U array - - /// Return the greatest of all elements of the array, compared via Operators.max on the function result - val max : array:array<'T> -> 'T - - /// Return the greatest of all elements of the array, compared via Operators.max on the function result - val maxBy : projection:('T -> 'U) -> array:array<'T> -> 'T - - /// Return the lowest of all elements of the array, compared via Operators.min - val min : array:array<'T> -> 'T - - /// Return the lowest of all elements of the array, compared via Operators.min on the function result - val minBy : projection:('T -> 'U) -> array:array<'T> -> 'T - - /// Build an array from the given list - val of_list: elements:'T list -> array<'T> - - /// Build a new array from the given enumerable object - val of_seq: elements:seq<'T> -> array<'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:array<'T> -> array<'T> * array<'T> - - /// Returns an array with all elements permuted according to the - /// specified permutation - val permute : indexMap:(int -> int) -> array:array<'T> -> array<'T> - - /// Apply 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:array<'T> -> 'T - - /// Apply 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:array<'T> -> 'T - - /// Return a new array with the elements in reverse order - val rev: array:array<'T> -> array<'T> - - /// Like fold_left, but return the intermediary and final results - val scan : folder:('State -> 'T -> 'State) -> state:'State -> array:array<'T> -> 'State array - - /// Like fold_right, but return both the intermediary and final results - val scanBack : folder:('T -> 'State -> 'State) -> array:array<'T> -> state:'State -> 'State array - - /// Set an element of an array - val set: array:array<'T> -> index:int -> value:'T -> unit - - /// Build a new array that contains the given subrange specified by - /// starting index and length. - val sub: array:array<'T> -> startIndex:int -> count:int -> array<'T> - - /// Sort the elements of an array, returning a new array. Elements are compared using Operators.compare. - val sort: array:array<'T> -> array<'T> - - /// Sort 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 -> 'U) -> array:array<'T> -> array<'T> - - /// Sort the elements of an array, using the given comparison function as the order, returning a new array - val sortWith: comparer:('T -> 'T -> int) -> array:array<'T> -> array<'T> - - /// Sort 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 -> 'U) -> array:array<'T> -> unit - - - /// Sort 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:array<'T> -> unit - - /// Sort 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:array<'T> -> unit - - /// Return the sum of the elements in the array - val inline sum : array: ^T array -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member Zero : ^T) - - - /// Return the sum of the results generated by applying the function to each element of the array. - val inline sumBy : projection:('T -> ^U) -> array:array<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - /// Build a list from the given array - val to_list: array:array<'T> -> 'T list - - /// View the given array as a sequence - val to_seq: array:array<'T> -> seq<'T> - - /// Return the first element for which the given function returns true. - /// Return None if no such element exists. - val tryFind: predicate:('T -> bool) -> array:array<'T> -> 'T option - - /// Return the index of the first element in the array - /// that satisfies the given predicate. - val tryFindIndex : predicate:('T -> bool) -> array:array<'T> -> int option - - /// Split an array of pairs into two arrays - val unzip: array:('T1 * 'T2) array -> ('T1 array * 'T2 array) - - /// Split an array of triples into three arrays - val unzip3: array:('T1 * 'T2 * 'T3) array -> ('T1 array * 'T2 array * 'T3 array) - - /// Combine the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is - /// raised. - val zip: array1:'T1 array -> array2:'T2 array -> ('T1 * 'T2) array - - /// Combine three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException is - /// raised. - val zip3: array1:'T1 array -> array2:'T2 array -> array3:'T3 array -> ('T1 * 'T2 * 'T3) array - -#if FX_ATLEAST_40 - /// 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). - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val choose: chooser:('T -> 'U option) -> array:'T array -> 'U array - - /// For each element of the array, apply the given function. Concatenate all the results and return the combined array. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val collect : mapping:('T -> array<'U>) -> array:array<'T> -> array<'U> - - /// Build a new array whose elements are the results of applying the given function - /// to each of the elements of the array. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val map : mapping:('T -> 'U) -> array:array<'T> -> array<'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. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val mapi: mapping:(int -> 'T -> 'U) -> array:'T array -> 'U array - - /// Apply the given function to each element of the array. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val iter : action:('T -> unit) -> array:array<'T> -> unit - - /// Apply the given function to each element of the array. The integer passed to the - /// function indicates the index of element. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val iteri: action:(int -> 'T -> unit) -> array:'T array -> unit - - /// Create an array given the dimension and a generator function to compute the elements. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to indicies is not specified. - val init : count:int -> initializer:(int -> 'T) -> array<'T> - - /// Split the collection into two collections, containing the - /// elements for which the given predicate returns "true" and "false" - /// respectively - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to indicies is not specified. - val partition : predicate:('T -> bool) -> array:array<'T> -> array<'T> * array<'T> -#endif - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val combine: array1:'T1 array -> array2:'T2 array -> ('T1 * 'T2) array - - [] - val split: array:('T1 * 'T2) array -> ('T1 array * 'T2 array) - - [] - val inline average_by : projection:('T -> ^U) -> array:array<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U*int -> ^U) - and ^U : (static member Zero : ^U) - - [] - val find_index: predicate:('T -> bool) -> array:array<'T> -> int - - [] - val for_all: predicate:('T -> bool) -> array:array<'T> -> bool - - [] - val make: count:int -> value:'T -> array<'T> - - [] - val first: chooser:('T -> 'U option) -> array:array<'T> -> 'U option - - [] - val for_all2: predicate:('T1 -> 'T2 -> bool) -> array1:'T1 array -> array2:'T2 array -> bool - - [] - val fold_left: folder:('State -> 'T -> 'State) -> state:'State -> array: array<'T> -> 'State - - /// Apply 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 fold_right: folder:('T -> 'State -> 'State) -> array:array<'T> -> state:'State -> 'State - - /// Apply 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 fold_left2: folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> array1:'T1 array -> array2:'T2 array -> 'State - - [] - val fold_right2: folder:('T1 -> 'T2 -> 'State -> 'State) -> array1:'T1 array -> array2:'T2 array -> state:'State -> 'State - - /// Create an array where the entries are initially the default value Unchecked.defaultof<'T>. - [] - val zero_create: count:int -> array<'T> - - [] - val is_empty: array:array<'T> -> bool - - [] - val max_by : projection:('T -> 'U) -> array:array<'T> -> 'T - - [] - val min_by : projection:('T -> 'U) -> array:array<'T> -> 'T - - [] - val reduce_left: reduction:('T -> 'T -> 'T) -> array:array<'T> -> 'T - - [] - val reduce_right: reduction:('T -> 'T -> 'T) -> array:array<'T> -> 'T - - [] - val scan_left : folder:('State -> 'T -> 'State) -> state:'State -> array:array<'T> -> 'State array - - [] - val scan_right : folder:('T -> 'State -> 'State) -> array:array<'T> -> state:'State -> 'State array - - /// Sort the elements of an array, using the given projection for the keys. Elements are compared using Operators.compare. - [] - val sort_by: projection:('T -> 'U) -> array:array<'T> -> unit - - [] - val inline sum_by : projection:('T -> ^U) -> array:array<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - - [] - val tryfind: predicate:('T -> bool) -> array:array<'T> -> 'T option - - [] - val tryfind_index: predicate:('T -> bool) -> array:array<'T> -> int option - - [] - val tryfind_indexi: predicate:(int -> 'T -> bool) -> array:array<'T> -> int option - - [] - val find_indexi: predicate:(int -> 'T -> bool) -> array:array<'T> -> int - -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array2.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/array2.fs deleted file mode 100644 index 596f5b70..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array2.fs +++ /dev/null @@ -1,160 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System.Diagnostics - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Primitives.Basics - - [] - [] - module Array2D = - - // Define the primitive operations. - // Note: the "type" syntax is for the type parameter for inline - // polymorphic IL. This helps the compiler inline these fragments, - // i.e. work out the correspondence between IL and F# type variables. - - [] - let length1 (arr: 'a[,]) = (# "ldlen.multi 2 0" arr : int #) - [] - let length2 (arr: 'a[,]) = (# "ldlen.multi 2 1" arr : int #) - [] - let base1 (arr: 'a[,]) = arr.GetLowerBound(0) - [] - let base2 (arr: 'a[,]) = arr.GetLowerBound(1) - [] - let get (arr: 'a[,]) (n:int) (m:int) = (# "ldelem.multi 2 !0" type ('a) arr n m : 'a #) - [] - let set (arr: 'a[,]) (n:int) (m:int) (x:'a) = (# "stelem.multi 2 !0" type ('a) arr n m x #) - - [] - let zeroCreate (n:int) (m:int) = (# "newarr.multi 2 !0" type ('a) n m : 'a[,] #) - - let zeroCreateBased (b1:int) (b2:int) (n1:int) (n2:int) = - if (b1 = 0 && b2 = 0) then - // Note: this overload is available on Compact Framework and Silverlight - (System.Array.CreateInstance(typeof<'a>, [|n1;n2|]) :?> 'a[,]) - else -#if FX_NO_BASED_ARRAYS - raise (new System.NotSupportedException("arrays with non-zero base may not be created on this platform")) -#else - (System.Array.CreateInstance(typeof<'a>, [|n1;n2|],[|b1;b2|]) :?> 'a[,]) -#endif - - [] - let zero_create_based b1 b2 n1 n2 = zeroCreateBased b1 b2 n1 n2 - - [] - let createBased b1 b2 n m (x:'a) = - let arr = (zeroCreateBased b1 b2 n m : 'a[,]) - for i = b1 to b1+n - 1 do - for j = b2 to b2+m - 1 do - arr.[i,j] <- x - arr - - [] - let initBased b1 b2 n m f = - let arr = (zeroCreateBased b1 b2 n m : 'a[,]) - for i = b1 to b1+n - 1 do - for j = b2 to b2+m - 1 do - arr.[i,j] <- f i j - arr - - - [] - let create n m (x:'a) = - createBased 0 0 n m x - - [] - let init n m f = - initBased 0 0 n m f - - [] - let iter f arr = - let count1 = length1 arr - let count2 = length2 arr - let b1 = base1 arr - let b2 = base2 arr - for i = b1 to b1+count1 - 1 do - for j = b1 to b2+count2 - 1 do - f arr.[i,j] - - [] - let iteri (f : int -> int -> 'a -> unit) (arr:'a[,]) = - let count1 = length1 arr - let count2 = length2 arr - let b1 = base1 arr - let b2 = base2 arr - for i = b1 to b1+count1 - 1 do - for j = b1 to b2+count2 - 1 do - f i j arr.[i,j] - - [] - let map f arr = - initBased (base1 arr) (base2 arr) (length1 arr) (length2 arr) (fun i j -> f arr.[i,j]) - - [] - let mapi f arr = - initBased (base1 arr) (base2 arr) (length1 arr) (length2 arr) (fun i j -> f i j arr.[i,j]) - - [] - let copy arr = - initBased (base1 arr) (base2 arr) (length1 arr) (length2 arr) (fun i j -> arr.[i,j]) - - [] - let rebase arr = - let b1 = base1 arr - let b2 = base2 arr - init (length1 arr) (length2 arr) (fun i j -> arr.[b1+i,b2+j]) - - - [] - let copyTo(source: 'a[,],sourceIndex1,sourceIndex2,target: 'a[,],targetIndex1,targetIndex2,count1,count2) = - if sourceIndex1 < 0 then invalidArg "sourceIndex1" "index must be positive" - if sourceIndex2 < 0 then invalidArg "sourceIndex2" "index must be positive" - if targetIndex1 < 0 then invalidArg "targetIndex1" "index must be positive" - if targetIndex2 < 0 then invalidArg "targetIndex2" "index must be positive" - if sourceIndex1 + count1 > length1 source then invalidArg "count1" "out of range" - if sourceIndex2 + count2 > length2 source then invalidArg "count2" "out of range" - if targetIndex1 + count1 > length1 target then invalidArg "count1" "out of range" - if targetIndex2 + count2 > length2 target then invalidArg "count2" "out of range" - - for i = 0 to count1 - 1 do - for j = 0 to count2 - 1 do - target.[targetIndex1+i,targetIndex2+j] <- source.[sourceIndex1+i,sourceIndex2+j] - - - [] - let zero_create count1 count2 = zeroCreate count1 count2 - - [] - let create_based base1 base2 count1 count2 initial = createBased base1 base2 count1 count2 initial - - [] - let init_based base1 base2 count1 count2 f = initBased base1 base2 count1 count2 f - - [] - let sub (source : 'a[,]) sourceIndex1 sourceIndex2 count1 count2 = - if sourceIndex1 < 0 then invalidArg "sourceIndex1" "index must be positive" - if sourceIndex2 < 0 then invalidArg "sourceIndex2" "index must be positive" - if count1 < 0 then invalidArg "count1" "length must be positive" - if count2 < 0 then invalidArg "count2" "length must be positive" - if sourceIndex1 + count1 > length1 source then invalidArg "count1" "out of range" - if sourceIndex2 + count2 > length2 source then invalidArg "count2" "out of range" - - let res = zeroCreate count1 count2 - for i = 0 to count1 - 1 do - for j = 0 to count2 - 1 do - res.[i,j] <- source.[sourceIndex1 + i,sourceIndex2 + j] - res - - [] - let blit (source : 'a[,]) sourceIndex1 sourceIndex2 target targetIndex1 targetIndex2 count1 count2 = - copyTo(source,sourceIndex1,sourceIndex2,target,targetIndex1,targetIndex2,count1,count2) - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array2.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/array2.fsi deleted file mode 100644 index 8e1f3c11..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array2.fsi +++ /dev/null @@ -1,121 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - - [] - [] - /// Basic operations on 2-dimensional arrays. - /// - /// F# and .NET multi-dimensional arrays are typically zero-based. - /// However, .NET multi-dimensional arrays used in conjunction with external - /// libraries (e.g. libraries associated with Visual Basic) be - /// non-zero based, using a potentially different base for each dimension. - /// The operations in this module will accept such arrays, and - /// the basing on an input array will be propogated to a matching output - /// array on the Array2D.map and Array2D.mapi operations. - /// Non-zero-based arrays can also be created using Array2D.zero_create_based, - /// Array2D.create_based and Array2D.init_based. - module Array2D = - - /// Fetch the base-index for the first dimension of the array. - /// - /// See notes on the Array2D module re. zero-basing. - val base1: array:'T[,] -> int - - /// Fetch the base-index for the second dimension of the array. - /// - /// See notes on the Array2D module re. zero-basing. - val base2: array:'T[,] -> int - - /// Build a new array whose elements are the same as the input array. - /// - /// For non-zero-based arrays the basing on an input array will be propogated to the output - /// array. - val copy: array:'T[,] -> 'T[,] - - /// Read a range of elements from the first array and write them into the second. - val blit: source:'T[,] -> sourceIndex1:int -> sourceIndex2:int -> target:'T[,] -> targetIndex1:int -> targetIndex2:int -> length1:int -> length2:int -> unit - - /// Create an array given the dimensions and a generator function to compute the elements. - val init: length1:int -> length2:int -> initializer:(int -> int -> 'T) -> 'T[,] - - /// Create an array whose elements are all initially the given value - val create: length1:int -> length2:int -> value:'T -> 'T[,] - - /// Create an array where the entries are initially Unchecked.defaultof<'T>. - val zeroCreate : length1:int -> length2:int -> 'T[,] - -#if FX_NO_BASED_ARRAYS -#else - /// Create a based array given the dimensions and a generator function to compute the elements. - val initBased: base1:int -> base2:int -> length1:int -> length2:int -> initializer:(int -> int -> 'T) -> 'T[,] - - /// Create a based array whose elements are all initially the given value - val createBased: base1:int -> base2:int -> length1:int -> length2:int -> initial: 'T -> 'T[,] - - /// Create a based array where the entries are initially Unchecked.defaultof<'T>. - val zeroCreateBased : base1:int -> base2:int -> length1:int -> length2:int -> 'T[,] -#endif - - /// 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 indicies passed to the - /// function indicates the index of element. - val iteri: action:(int -> int -> 'T -> unit) -> array:'T[,] -> unit - - /// Return the length of an array in the first dimension - val length1: array:'T[,] -> int - - /// Return the length of an array in the second dimension - val length2: array:'T[,] -> int - /// Build a new array whose elements are the results of applying the given function - /// to each of the elements of the array. - /// - /// For non-zero-based arrays the basing on an input array will be propogated to the output - /// 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 indices passed to the - /// function indicates the element being transformed. - /// - /// For non-zero-based arrays the basing on an input array will be propogated to the output - /// array. - val mapi: mapping:(int -> int -> 'T -> 'U) -> array:'T[,] -> 'U[,] - - - /// Build a new array whose elements are the same as the input array but - /// where a non-zero-based input array generates a corresponding zero-based - /// output array. - val rebase: array:'T[,] -> 'T[,] - - /// Set the value of an element in an array. You can also use the syntax 'array.[index1,index2] <- value' - val set: array:'T[,] -> index1:int -> index2:int -> value:'T -> unit - - /// Fetch an element from a 2D array. You can also use the syntax 'array.[index1,index2]' - val get: array:'T[,] -> index1:int -> index2:int -> 'T - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val init_based: base1:int -> base2:int -> length1:int -> length2:int -> initializer:(int -> int -> 'T) -> 'T[,] - - [] - val create_based: base1:int -> base2:int -> length1:int -> length2:int -> initial: 'T -> 'T[,] - - [] - val zero_create : length1:int -> length2:int -> 'T[,] - - [] - val zero_create_based : base1:int -> base2:int -> length1:int -> length2:int -> 'T[,] - - [] - val sub: source:'T[,] -> sourceIndex1:int -> sourceIndex2:int -> count1:int -> count2:int -> 'T[,] -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array3.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/array3.fs deleted file mode 100644 index 04309231..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array3.fs +++ /dev/null @@ -1,145 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System.Diagnostics - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - - [] - [] - module Array3D = - - [] - let length1 (arr: 'a[,,]) = (# "ldlen.multi 3 0" arr : int #) - - [] - let length2 (arr: 'a[,,]) = (# "ldlen.multi 3 1" arr : int #) - - [] - let length3 (arr: 'a[,,]) = (# "ldlen.multi 3 2" arr : int #) - - [] - let get (arr: 'a[,,]) (n1:int) (n2:int) (n3:int) = (# "ldelem.multi 3 !0" type ('a) arr n1 n2 n3 : 'a #) - - [] - let set (arr: 'a[,,]) (n1:int) (n2:int) (n3:int) (x:'a) = (# "stelem.multi 3 !0" type ('a) arr n1 n2 n3 x #) - - [] - let zeroCreate (n1:int) (n2:int) (n3:int) = (# "newarr.multi 3 !0" type ('a) n1 n2 n3 : 'a[,,] #) - - [] - let create (n1:int) (n2:int) (n3:int) (x:'a) = - let arr = (zeroCreate n1 n2 n3 : 'a[,,]) - for i = 0 to n1 - 1 do - for j = 0 to n2 - 1 do - for k = 0 to n3 - 1 do - arr.[i,j,k] <- x - arr - - [] - let init n1 n2 n3 f = - let arr = (zeroCreate n1 n2 n3 : 'a[,,]) - for i = 0 to n1 - 1 do - for j = 0 to n2 - 1 do - for k = 0 to n3 - 1 do - arr.[i,j,k] <- f i j k - arr - - [] - let iter f arr = - let len1 = length1 arr - let len2 = length2 arr - let len3 = length3 arr - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - f arr.[i,j,k] - - [] - let map f arr = - let len1 = length1 arr - let len2 = length2 arr - let len3 = length3 arr - let res = (zeroCreate len1 len2 len3 : 'b[,,]) - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - res.[i,j,k] <- f arr.[i,j,k] - res - - [] - let iteri f arr = - let len1 = length1 arr - let len2 = length2 arr - let len3 = length3 arr - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - f i j k arr.[i,j,k] - - [] - let mapi f arr = - let len1 = length1 arr - let len2 = length2 arr - let len3 = length3 arr - let res = (zeroCreate len1 len2 len3 : 'b[,,]) - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - res.[i,j,k] <- f i j k arr.[i,j,k] - res - - [] - let zero_create n1 n2 n3 = zeroCreate n1 n2 n3 - - [] - [] - module Array4D = - - [] - let length1 (arr: 'a[,,,]) = (# "ldlen.multi 4 0" arr : int #) - - [] - let length2 (arr: 'a[,,,]) = (# "ldlen.multi 4 1" arr : int #) - - [] - let length3 (arr: 'a[,,,]) = (# "ldlen.multi 4 2" arr : int #) - - [] - let length4 (arr: 'a[,,,]) = (# "ldlen.multi 4 3" arr : int #) - - [] - let zeroCreate (n1:int) (n2:int) (n3:int) (n4:int) = (# "newarr.multi 4 !0" type ('a) n1 n2 n3 n4 : 'a[,,,] #) - - [] - let create n1 n2 n3 n4 (x:'a) = - let arr = (zeroCreate n1 n2 n3 n4 : 'a[,,,]) - for i = 0 to n1 - 1 do - for j = 0 to n2 - 1 do - for k = 0 to n3 - 1 do - for m = 0 to n4 - 1 do - arr.[i,j,k,m] <- x - arr - - [] - let init n1 n2 n3 n4 f = - let arr = (zeroCreate n1 n2 n3 n4 : 'a[,,,]) - for i = 0 to n1 - 1 do - for j = 0 to n2 - 1 do - for k = 0 to n3 - 1 do - for m = 0 to n4 - 1 do - arr.[i,j,k,m] <- f i j k m - arr - - - [] - let get (arr: 'a[,,,]) (n1:int) (n2:int) (n3:int) (n4:int) = (# "ldelem.multi 4 !0" type ('a) arr n1 n2 n3 n4 : 'a #) - - [] - let set (arr: 'a[,,,]) (n1:int) (n2:int) (n3:int) (n4:int) (x:'a) = (# "stelem.multi 4 !0" type ('a) arr n1 n2 n3 n4 x #) - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array3.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/array3.fsi deleted file mode 100644 index 769c6891..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/array3.fsi +++ /dev/null @@ -1,103 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - - [] - [] - /// Basic operations on rank 3 arrays. - module Array3D = - - /// Create an array whose elements are all initially the given value - val create: length1:int -> length2:int -> length3:int -> initial:'T -> 'T[,,] - - /// Create an array given the dimensions and a generator function to compute the elements. - val init: length1:int -> length2:int -> length3:int -> initializer:(int -> int -> int -> 'T) -> 'T[,,] - - /// Fetch an element from a 3D array. You can also use the syntax 'array.[index1,index2,index3]' - val get: array:'T[,,] -> index1:int -> index2:int -> index3:int -> 'T - - /// 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 indicies passed to the - /// function indicates the index of element. - val iteri: action:(int -> int -> int -> 'T -> unit) -> array:'T[,,] -> unit - - /// Return the length of an array in the first dimension - val length1: array:'T[,,] -> int - - /// Return the length of an array in the second dimension - val length2: array:'T[,,] -> int - - /// Return the length of an array in the third dimension - val length3: array:'T[,,] -> int - - /// Build a new array whose elements are the results of applying the given function - /// to each of the elements of the array. - /// - /// For non-zero-based arrays the basing on an input array will be propogated to the output - /// 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 indices passed to the - /// function indicates the element being transformed. - /// - /// For non-zero-based arrays the basing on an input array will be propogated to the output - /// array. - val mapi: mapping:(int -> int -> int -> 'T -> 'U) -> array:'T[,,] -> 'U[,,] - - /// Set the value of an element in an array. You can also - /// use the syntax 'array.[index1,index2,index3] <- value'. - val set: array:'T[,,] -> index1:int -> index2:int -> index3:int -> value:'T -> unit - - /// Create an array where the entries are initially the "default" value. - val zeroCreate: length1:int -> length2:int -> length3:int -> 'T[,,] - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val zero_create: length1:int -> length2:int -> length3:int -> 'T[,,] -#endif - - - [] - [] - /// Basic operations on rank 4 arrays. - module Array4D = - - /// Create an array whose elements are all initially the given value - val create: length1:int -> length2:int -> length3:int -> length4:int -> initial:'T -> 'T[,,,] - - /// Create an array given the dimensions and a generator function to compute the elements. - val init: length1:int -> length2:int -> length3:int -> length4:int -> initializer:(int -> int -> int -> int -> 'T) -> 'T[,,,] - - /// Return the length of an array in the first dimension - val length1: array:'T[,,,] -> int - - /// Return the length of an array in the second dimension - val length2: array:'T[,,,] -> int - - /// Return the length of an array in the third dimension - val length3: array:'T[,,,] -> int - - /// Return the length of an array in the fourth dimension - val length4: array:'T[,,,] -> int - - /// Create an array where the entries are initially the "default" value. - val zeroCreate: length1:int -> length2:int -> length3:int -> length4:int -> 'T[,,,] - - /// Fetch an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' - val get: array:'T[,,,] -> index1:int -> index2:int -> index3:int -> index4:int -> 'T - - /// Set the value of an element in an array. You can also - /// use the syntax 'array.[index1,index2,index3,index4] <- value'. - val set: array:'T[,,,] -> index1:int -> index2:int -> index3:int -> index4:int -> value:'T -> unit - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/collections.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/collections.fs deleted file mode 100644 index b024633a..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/collections.fs +++ /dev/null @@ -1,113 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - #nowarn "51" - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - open System - open System.Diagnostics - open System.Collections - open System.Collections.Generic - - module HashIdentity = - - let inline Structural<'a> : IEqualityComparer<'a> = - // type-specialize some common cases to generate more efficient functions - { new IEqualityComparer<'a> with - member self.GetHashCode(x) = LanguagePrimitives.GenericHash(x) - member self.Equals(x,y) = LanguagePrimitives.GenericEquality x y } - - let LimitedStructural<'T>(limit) : IEqualityComparer<'T> = - LanguagePrimitives.FastLimitedGenericEqualityComparer<'T>(limit) - - let Reference<'T> : IEqualityComparer<'T> = - { new IEqualityComparer<'T> with - member self.GetHashCode(x) = LanguagePrimitives.PhysicalHash(x) - member self.Equals(x,y) = LanguagePrimitives.PhysicalEquality x y } - - let inline FromFunctions hash eq : IEqualityComparer<'a> = - let eq = OptimizedClosures.FastFunc2<_,_,_>.Adapt(eq) - { new IEqualityComparer<'a> with - member self.GetHashCode(x) = hash x - member self.Equals(x,y) = eq.Invoke(x,y) } - - - module ComparisonIdentity = - - let inline MakeFastStructuralComparisonFunction<'a>() : OptimizedClosures.FastFunc2<'a,'a,int> = - OptimizedClosures.FastFunc2<'a,'a,int>.Adapt(LanguagePrimitives.GenericComparison) - - let Char = MakeFastStructuralComparisonFunction() - let String = MakeFastStructuralComparisonFunction() - let SByte = MakeFastStructuralComparisonFunction() - let Int16 = MakeFastStructuralComparisonFunction() - let Int32 = MakeFastStructuralComparisonFunction() - let Int64 = MakeFastStructuralComparisonFunction() - let IntPtr = MakeFastStructuralComparisonFunction() - let Byte = MakeFastStructuralComparisonFunction() - let UInt16 = MakeFastStructuralComparisonFunction() - let UInt32 = MakeFastStructuralComparisonFunction() - let UInt64 = MakeFastStructuralComparisonFunction() - let UIntPtr = MakeFastStructuralComparisonFunction() - - /// Use a type-indexed table to ensure we only create a single FastStructuralComparison function - /// for each type - [] - type FastStructuralComparisonTable<'a>() = - static let f : OptimizedClosures.FastFunc2<'a,'a,int> = - match typeof<'a> with - | ty when ty.Equals(typeof) -> unbox (box Byte) - | ty when ty.Equals(typeof) -> unbox (box Char) - | ty when ty.Equals(typeof) -> unbox (box SByte) - | ty when ty.Equals(typeof) -> unbox (box Int16) - | ty when ty.Equals(typeof) -> unbox (box Int32) - | ty when ty.Equals(typeof) -> unbox (box Int64) - | ty when ty.Equals(typeof) -> unbox (box IntPtr) - | ty when ty.Equals(typeof) -> unbox (box UInt16) - | ty when ty.Equals(typeof) -> unbox (box UInt32) - | ty when ty.Equals(typeof) -> unbox (box UInt64) - | ty when ty.Equals(typeof) -> unbox (box UIntPtr) - | ty when ty.Equals(typeof) -> unbox (box String) - | _ -> MakeFastStructuralComparisonFunction<'a>() - static member Function : OptimizedClosures.FastFunc2<'a,'a,int> = f - - let GetFastStructuralComparisonFunction<'a>() : OptimizedClosures.FastFunc2<'a,'a,int> = - FastStructuralComparisonTable<'a>.Function - - /// If an IComparer also implements this interface then library implementations - /// have the option of using the given FastComparisonFunction - /// for implementing comparison semantics. Calling the FastFunc2 implementation - /// tends to be faster than calling IComparer. Furthermore most F# comparers are - /// ultimately specified using FastFunc2 values, hence making a direct call to - /// a FastFunc2 value avoids a double indirection. - type IHasFastComparisonFunction<'a> = - interface IComparer<'a> - abstract FastComparisonFunction : OptimizedClosures.FastFunc2<'a,'a,int> - - let GetFastComparisonFunction(icomparer : IComparer<'a>) : OptimizedClosures.FastFunc2<'a,'a,int> = - match box icomparer with - | :? IHasFastComparisonFunction<'a> as x -> x.FastComparisonFunction - | _ -> OptimizedClosures.FastFunc2<_,_,_>.Adapt(fun x y -> icomparer.Compare(x,y)) - - let Structural<'a> : IComparer<'a> = - let comparer = MakeFastStructuralComparisonFunction<'a>() - { new IComparer<'a> with - member self.Compare(x,y) = LanguagePrimitives.GenericComparison x y - interface IHasFastComparisonFunction<'a> with - member self.FastComparisonFunction = comparer } - - let FromFunction comparer = - let comparer = OptimizedClosures.FastFunc2<'a,'a,int>.Adapt(comparer) - { new IComparer<'a> with - member self.Compare(x,y) = comparer.Invoke(x,y) - interface IHasFastComparisonFunction<'a> with - member self.FastComparisonFunction = comparer } - - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/collections.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/collections.fsi deleted file mode 100644 index c74732cb..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/collections.fsi +++ /dev/null @@ -1,55 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// This namespace contains some common collections in a style primarily designed for use from F#. - -namespace Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - open System - open System.Collections.Generic - - /// Common notions of comparison identity used with sorted data structures. - module ComparisonIdentity = - - /// Structural comparison. Compare using Operators.compare. - val Structural<'T> : IComparer<'T> - - /// Convert an existing IComparer object into a comparison function with a fast entry point - /// If comparer was originally built using ComparisonIdentity.FromFunction then the original function will be - /// returned - val GetFastComparisonFunction : comparer:IComparer<'T> -> OptimizedClosures.FastFunc2<'T,'T,int> - - /// Convert an existing IComparer object into a comparison function with a fast entry point - val GetFastStructuralComparisonFunction : unit -> OptimizedClosures.FastFunc2<'T,'T,int> - - /// Compare using the given comparer function - val FromFunction : comparer:('T -> 'T -> int) -> IComparer<'T> - - /// Common notions of value identity used with hash tables. - module HashIdentity = - - /// Structural hashing. Hash using Operators.(=) and Operators.hash. - - // inline justification: allows specialization of structural hash functions based on type - val inline Structural<'T> : IEqualityComparer<'T> - - val LimitedStructural<'T> : limit: int -> IEqualityComparer<'T> - - /// Physical hashing (hash on reference identity of objects, and the contents of value types). - /// Hash using LanguagePrimitives.PhysicalEquality and LanguagePrimitives.PhysicalHash, - /// That is, for value types use GetHashCode and Object.Equals (if no other optimization available), - /// and for reference types use System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode and - /// reference equality. - // - // inline justification: allows specialization of reference hash functions based on type - val Reference<'T> : IEqualityComparer<'T> - - /// Hash using the given hashing and equality functions - // - // inline justification: allows inlining of hash functions - val inline FromFunctions<'T> : hasher:('T -> int) -> equality:('T -> 'T -> bool) -> IEqualityComparer<'T> - - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/control.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/control.fs deleted file mode 100644 index 663a3cae..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/control.fs +++ /dev/null @@ -1,1247 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Control - - #nowarn "44" // This construct is deprecated. This method will be removed in the next version of F# and may no longer be used. Consider using Async.RunWithContinuations - #nowarn "67" // This type test or downcast will always hold - - open System - open System.Diagnostics - open System.Diagnostics.CodeAnalysis - open System.Threading - open System.IO - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Control - open Microsoft.FSharp.Collections - -#if FX_ATLEAST_40 - open System.Threading.Tasks -#endif - -#if FX_NO_OPERATION_CANCELLED - type OperationCanceledException(s : System.String) = - inherit System.Exception(s) -#endif - - /// We use our own internal implementation of queues to avoid a dependency on System.dll - type Queue<'T>() = //: IEnumerable, ICollection, IEnumerable - - let mutable array = [| |] - let mutable head = 0 - let mutable size = 0 - let mutable tail = 0 - - let SetCapacity(capacity) = - let destinationArray = Array.zeroCreate(capacity); - if (size > 0) then - if (head < tail) then - System.Array.Copy(array, head, destinationArray, 0, size); - else - System.Array.Copy(array, head, destinationArray, 0, array.Length - head); - System.Array.Copy(array, 0, destinationArray, array.Length - head, tail); - array <- destinationArray; - head <- 0; - tail <- if (size = capacity) then 0 else size; - - member x.Dequeue() = - if (size = 0) then - failwith "Dequeue" - let local = array.[head]; - array.[head] <- Unchecked.defaultof<'T> - head <- (head + 1) % array.Length; - size <- size - 1; - local - - member this.Enqueue(item) = - if (size = array.Length) then - let capacity = int ((int64 array.Length * 200L) / 100L); - let capacity = max capacity (array.Length + 4) - SetCapacity(capacity); - array.[tail] <- item; - tail <- (tail + 1) % array.Length; - size <- size + 1 - - member x.Count = size - - - - [] - type Unexpected = - /// cases that should never occur except due to bad code in this file - static member Fail msg = - //System.Diagnostics.Debug.Assert(false, msg) - raise <| new InvalidOperationException(msg) - - [] - type AsyncGroup() = - let mutable cancellationFlag = false - let mutable cancellationMessage = None - let cancelEvent = new Event<_>() - member x.TriggerCancel(?message:string) = - let message = defaultArg message "an exception happened on another parallel process" - //Console.WriteLine(" ** TriggerCancel on group {0}", x.GetHashCode()) - cancellationMessage <- Some message - cancellationFlag <- true; cancelEvent.Trigger(message) - - member x.Cancel = cancelEvent.Publish - - [] // inlined - member x.Test() = cancellationFlag - - [] // inlined - member x.GetMessage() = cancellationMessage - - member x.CreateSubGroup() = - let innerAsyncGroup = new AsyncGroup() - let handler = Handler(fun _ msg -> innerAsyncGroup.TriggerCancel(msg)) - //Console.WriteLine(" ** AddHandler for subgroup {0} to group {1}", innerAsyncGroup.GetHashCode(), x.GetHashCode); - x.Cancel.AddHandler(handler); - innerAsyncGroup, (fun () -> x.Cancel.RemoveHandler(handler)) - // Some versions of F# don't always take tailcalls to functions returning 'unit' because this - // is represented as type 'void' in the underlying IL. - // Hence we don't use the 'unit' return type here, and instead invent our own type. - type FakeUnitValue = - | FakeUnit - - - type cont<'T> = ('T -> FakeUnitValue) - type econt = (exn -> FakeUnitValue) - type ccont = (OperationCanceledException -> FakeUnitValue) - - [] - type AsyncParams<'T> = - { group : AsyncGroup; - cont : cont<'T>; - econt : econt; - ccont : ccont; - blocked : System.Threading.Thread; - } - - [] - type Async<'T> = - P of (AsyncParams<'T> -> FakeUnitValue) - - module AsyncBuilderImpl = - // To consider: augment with more exception traceability information - // To consider: add the ability to suspend running ps in debug mode - // To consider: add the ability to trace running ps in debug mode - open System - open System.Threading - open System.IO - - let fake () = FakeUnit - let unfake FakeUnit = () - let ignoreFake _ = FakeUnit - - - let defaultAsyncGroup = ref (AsyncGroup()) - - type Result<'T> = - | Error of exn - | Ok of 'T - - // Apply f to x and call either the continuation or exception continuation depending what happens - let inline protect econt f x (cont : 'T -> FakeUnitValue) : FakeUnitValue = - // This is deliberately written in a completely allocation-free style - let mutable res = Unchecked.defaultof<_> - let mutable exn = null - try - res <- f x - with - // Note: using a :? catch keeps FxCop happy - | :? System.Exception as e -> - exn <- e - match exn with - | null -> - // NOTE: this must be a tailcall - cont res - | exn -> - // NOTE: this must be a tailcall - econt exn - - type TailCallCount = -#if FX_NO_THREAD_STATIC // no thread static on .NET CF 2.0. The hijack implementation is still a reasonable approximation without this - hijacks are just aken more often -#else - [] -#endif - [] - static val mutable count : int - - let tailcallLim = 300 - - //if sizeof = 8 then - // Hijack every so often - //else - // f() - - // Reify exceptional results as exceptions - let commit res = - match res with - | Ok res -> res - | Error exn -> raise exn - - // Reify exceptional results as exceptions - let commitWithPossibleTimeout res = - match res with - | None -> raise (System.TimeoutException()) - | Some res -> commit res - - let cancelT (args:AsyncParams<_>) = - let msg = args.group.GetMessage() |> Option.get - args.ccont (new OperationCanceledException(msg)) - - - // Generate async computation which calls its continuation with the given result - let resultA x = - P (fun args -> - if args.group.Test() then - cancelT args - else - args.cont x) - - // Apply the underlying implementation of an async computation to its inputs - let inline invokeA (P pf) args = pf args - - // The primitive bind operation. Generate a process that runs the first process, takes - // its result, applies f and then runs the new process produced. Hijack if necessary and - // run 'f' with exception protection - let bindA p1 f = - P (fun args -> - if args.group.Test() then - cancelT args - else - - let bind() = - let cont a = protect args.econt f a (fun p2 -> invokeA p2 args) - invokeA p1 { cont=cont;ccont=args.ccont;econt=args.econt;blocked=args.blocked;group=args.group } - - // .NET 2.0 JIT 64 doesn't always take tailcalls correctly. Hence hijack the continuation onto a new work item - // every so often by counting the number of tailcalls we make from each particular O/S thread. - // Note this also gives more interleaving of I/O. - TailCallCount.count <- TailCallCount.count + 1 - if TailCallCount.count >= tailcallLim then - TailCallCount.count <- 0 -#if FX_NO_SYNC_CONTEXT - //if not (ExecutionContext.IsFlowSuppressed()) then ExecutionContext.SuppressFlow() |> ignore - if ThreadPool.QueueUserWorkItem(fun _ -> bind() |> unfake) then - FakeUnit - else - bind() -#else - let ctxt = System.Threading.SynchronizationContext.Current - if (match ctxt with null -> true | _ -> false) - || (match args.blocked with - | null -> false - | t -> t = System.Threading.Thread.CurrentThread) then - - //if not (ExecutionContext.IsFlowSuppressed()) then ExecutionContext.SuppressFlow() |> ignore - if ThreadPool.QueueUserWorkItem(fun _ -> bind() |> unfake) then - FakeUnit - else - bind() - else - // Reschedule in the same synchronization context if one is available - ctxt.Post(SendOrPostCallback(fun _ -> bind() |> unfake),null) - FakeUnit -#endif - else - // NOTE: this must be a tailcall - bind()) - - - - // callA = "bindA (return x) f", though no hijack check - let callA f x = - P (fun args -> - if args.group.Test() then - cancelT args - else - protect args.econt f x (fun p2 -> invokeA p2 args)) - - // delayPrim = "bindA (return ()) f", though no hijack check - let delayA f = callA f () - - // Call p but augment the normal, exception and cancel continuations with a call to finallyFunction. - // If the finallyFunction raises an exception then call the original exception continuation - // with the new exception. If exception is raised after a cancellation, exception is ignored - // and cancel continuation is called. - let tryFinallyA finallyFunction p = - P (fun args -> - if args.group.Test() then - cancelT args - else - // The new continuation runs the finallyFunction and resumes the old continuation - // If an exception is thrown we continue with the previous exception continuation. - let cont b = protect args.econt finallyFunction () (fun () -> args.cont b) - // The new exception continuation runs the finallyFunction and then runs the previous exception continuation. - // If an exception is thrown we continue with the previous exception continuation. - let econt exn = protect args.econt finallyFunction () (fun () -> args.econt exn) - // The cancellation continuation runs the finallyFunction and then runs the previous cancellation continuation. - // If an exception is thrown we continue with the previous cancellation continuation (the exception is lost) - let ccont cexn = protect (fun _ -> args.ccont cexn) finallyFunction () (fun () -> args.ccont cexn) - invokeA p { args with cont = cont; econt = econt; ccont = ccont } ) - - let protectedPrimitive f = - P (fun args -> - if args.group.Test() then - cancelT args - else - try f args - with exn -> args.econt exn) - - // Re-rout the exception continuation to call to catchFunction. This generates - // a new process. If catchFunction or the new process fail - // then call the original exception continuation with the failure. - let tryWithPrimA catchFunction p = - P (fun args -> - if args.group.Test() then - cancelT args - else - let econt exn = invokeA (callA catchFunction exn) args - invokeA p { args with econt = econt }) - - let tryWithA f p = tryWithPrimA f p - let doneA = resultA() - let fakeUnitA = resultA FakeUnit - let usingA (r:'T :> IDisposable) f = tryFinallyA (fun () -> r.Dispose()) (callA f r) - let raiseA exn = P (fun args -> args.econt (exn :> Exception)) - let ignoreA p = bindA p (fun _ -> doneA) - - let catchA p = - P (fun args -> - invokeA p { group = args.group; - blocked = args.blocked; - cont = (Ok >> args.cont); - ccont = args.ccont; - econt = (Error >> args.cont) }) - - let whenCancelledA finallyFunction p = - P (fun args -> - invokeA p { args with ccont = (fun exn -> finallyFunction(exn); args.ccont(exn)) }) - - let primitiveA f = - protectedPrimitive (fun args -> f (args.cont,args.econt, args.ccont)) - - // Start on the current thread. Only Async.Run uses this. - let startA blocked asyncGroup cont econt ccont p = - invokeA p { group = asyncGroup; cont = cont; econt = econt; ccont = ccont; blocked = blocked } - |> unfake - - // Start as a work item in the thread pool - let queueWorkItem asyncGroup cont econt ccont p = - let args = { group = asyncGroup; cont = cont; econt = econt; ccont = ccont; blocked = null } - //if not (ExecutionContext.IsFlowSuppressed()) then ExecutionContext.SuppressFlow() |> ignore - if not (ThreadPool.QueueUserWorkItem(fun _ -> invokeA p args |> unfake)) then - Unexpected.Fail "failed to queue user work item" - - let getAsyncGroup() = - P (fun args -> args.cont args.group) - - let rec whileA gd prog = - if gd() then bindA prog (fun () -> whileA gd prog) else doneA - - open AsyncBuilderImpl - - [] - type AsyncBuilder() = - member b.Zero() = doneA - member b.Delay(f) = delayA(f) - member b.Return(x) = resultA(x) - member b.Bind(p1,p2) = bindA p1 p2 - member b.Using(g,p) = usingA g p - member b.While(gd,prog) = whileA gd prog - member b.For(e:seq<_>,prog) = - usingA (e.GetEnumerator()) (fun ie -> - whileA - (fun () -> ie.MoveNext()) - (delayA(fun () -> prog ie.Current))) - - member b.Combine(p1,p2) = bindA p1 (fun () -> p2) - member b.TryFinally(p,cf) = tryFinallyA cf p - member b.TryWith(p,cf) = tryWithA cf p - - module AsyncImpl = - let async = AsyncBuilder() - -#if FX_NO_SYNC_CONTEXT -#else - let post (syncContext : SynchronizationContext) trigger args = - match syncContext with - | null -> () - | ctxt -> ctxt.Post(SendOrPostCallback(fun _ -> trigger args),state=null) -#endif - - - let boxed(a:Async<'b>) : Async = async { let! res = a in return box res } - - // A utility type to provide a synchronization point between an asynchronous computation and callers waiting - // on the result of that computation. - [] - [] - type ResultCell<'T>() = - // Use the reference cell as a lock - let mutable result = None - // The WaitHandle event for the result. Only created if needed, and set to None when disposed. - let mutable resEvent = null - let mutable disposed = false - // All writers of result are protected by lock on syncRoot. - // Note: don't use 'resEvent' as a lock - it is option-valued. Option values use 'null' as a representation. - let syncRoot = new Object() - - member x.GetWaitHandle() = - lock syncRoot (fun () -> - if disposed then - raise (System.ObjectDisposedException("ResultCell")); - match resEvent with - | null -> - // Start in signalled state if a result is already present. - let ev = new ManualResetEvent(result.IsSome) - resEvent <- ev - (ev :> WaitHandle) - | ev -> - (ev :> WaitHandle)) - - member x.Close() = - lock syncRoot (fun () -> - if not disposed then - disposed <- true; - match resEvent with - | null -> () - | ev -> - ev.Close(); - resEvent <- null) - - interface IDisposable with - member x.Dispose() = x.Close() // ; System.GC.SuppressFinalize(x) - - - member x.GrabResult() = - match result with - | Some res -> res - | None -> Unexpected.Fail "Unexpected no result" - - - // Record the result in the ResultCell. - member x.RegisterResult (res:'T) = - lock syncRoot (fun () -> - // In this case the ResultCell has already been disposed, e.g. due to a timeout. - // The result is dropped on the floor. - if disposed then - () - else - result <- Some res; - // If the resEvent exists then set it. If not we can skip setting it altogether and it won't be - // created - match resEvent with - | null -> - () - | ev -> - // If the resEvent exists then set it. If not we can skip setting it altogether and it won't be - // created. - ev.Set() |> ignore) - - /// Wait until a result is available in the ResultCell. Should be called at most once. - - member x.ResultAvailable = result.IsSome - - member x.TryWaitForResult (?timeout) : 'T option = - // Check if a result is available. - match result with - | Some res as r -> - r - | None -> - // Force the creation of the WaitHandle - let resHandle = x.GetWaitHandle() - // Check again. While we were in GetWaitHandle, a call to RegisterResult may have set result then skipped the - // Set because the resHandle wasn't forced. - match result with - | Some res as r -> - r - | None -> - // OK, let's really wait for the Set signal. This may block. - let timeout = defaultArg timeout Threading.Timeout.Infinite -#if FX_NO_EXIT_CONTEXT_FLAGS - let ok = resHandle.WaitOne(millisecondsTimeout= timeout) -#else - let ok = resHandle.WaitOne(millisecondsTimeout= timeout,exitContext=true) -#endif - if ok then - // Now the result really must be available - result - else - // timed out - None - - open AsyncImpl - - - type TaskResult<'T> = - | TaskOk of 'T - | TaskExn of exn - | TaskCancelled of string - - type AsyncGroup with - /// Run the asynchronous workflow and wait for its result. - member g.RunSynchronously (p,?timeout) = - let innerAsyncGroup, disposeFct = g.CreateSubGroup() - use resultCell = new ResultCell>() - let blocked = System.Threading.Thread.CurrentThread - startA - blocked - innerAsyncGroup - (fun res -> - // Note the ResultCell may have been disposed if the operation - // timed out. In this case RegisterResult drops the result on the floor. - resultCell.RegisterResult(Ok(res)); - FakeUnit) - (fun exn -> resultCell.RegisterResult(Error(exn)); FakeUnit) - (fun exn -> resultCell.RegisterResult(Error(exn :> Exception)); FakeUnit) - p - let res = resultCell.TryWaitForResult(?timeout = timeout) in - match res with - | None -> - innerAsyncGroup.TriggerCancel(); - disposeFct() - raise (System.TimeoutException()) - | Some res -> - disposeFct() - commit res - - member g.Start (computation) = - queueWorkItem - g - (fun () -> FakeUnit) // nothing to do on success - (fun _ -> FakeUnit) // ignore exception in child - (fun _ -> FakeUnit) // ignore cancellation in child - computation - - member g.RunWithContinuations(cont,econt,ccont,a:Async<'T>) : unit = - let (P(f)) = a - let args = { cont = (cont >> fake); econt = (econt >> fake); ccont = (ccont >> fake); blocked = null; group = g } - f args |> unfake -#if FX_ATLEAST_40 - member g.CreateTask (computation,?taskCreationOptions) = - let taskCreationOptions = defaultArg taskCreationOptions TaskCreationOptions.None - let task = ref Unchecked.defaultof> - let action () = - use resultCell = new ResultCell>() - startA - [] - g - (fun r -> resultCell.RegisterResult(TaskOk r) |> fake) - (fun exn -> resultCell.RegisterResult(TaskExn exn) |> fake) - (fun exn -> - resultCell.RegisterResult(TaskCancelled exn.Message); - (!task).Cancel() // wire group cancelation to task cancelation - FakeUnit) - computation - let res = resultCell.TryWaitForResult() - match res with - | None -> - // None case shouldn't happen - there is not timeout in TryWaitForResult - g.TriggerCancel() - raise (System.TimeoutException()) - | Some r -> - (match r with - | TaskOk r -> r - | TaskCancelled _ -> - (!task).AcknowledgeCancellation() - Unchecked.defaultof<_> - | TaskExn exn -> raise exn) - task := new Task<_>(Func<_>(action), taskCreationOptions) - - // Wire task cancelation to group cancelation - let onTaskCanceled canceledTask = - if not(g.Test()) then - g.TriggerCancel() - - let cancelationTask = (!task).ContinueWith(Action>(onTaskCanceled), TaskContinuationOptions.OnlyOnCanceled) - !task - - member g.StartAsTask (computation,?taskCreationOptions) = - let t = g.CreateTask(computation,?taskCreationOptions=taskCreationOptions) - t.Start() - t -#endif - -#if DONT_INCLUDE_DEPRECATED -#else - member g.Spawn computation = - g.Start computation - - member g.Run (computation,?timeout) = - g.RunSynchronously(computation,?timeout=timeout) -#endif - - [] - type Async = - - static member CancelCheck () = doneA - - [] - static member Primitive (f : ('T -> unit) * (exn -> unit) -> unit): Async<'T> = - primitiveA (fun (cont:cont<_>,econt:econt,_:ccont) -> - f (cont >> unfake, econt >> unfake) |> fake) - - [] - static member Primitive (f : ('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) : Async<'T> = - primitiveA (fun (cont:cont<_>,econt:econt,ccont:ccont) -> - f (cont >> unfake, econt >> unfake,ccont >> unfake) |> fake) - - static member CancelDefaultGroup(?message) = - let asyncGroup = !defaultAsyncGroup - asyncGroup.TriggerCancel(?message=message) - defaultAsyncGroup := new AsyncGroup() - - static member DefaultGroup = !defaultAsyncGroup - - static member Catch (p: Async<'T>) = - P (fun args -> - invokeA p { group = args.group; - cont = (Choice1Of2 >> args.cont); - blocked=args.blocked; - econt=(Choice2Of2 >> args.cont); - ccont=args.ccont}) - - static member RunSynchronously (p: Async<'T>,?timeout) = - (!defaultAsyncGroup).RunSynchronously(p, ?timeout=timeout) - - static member Start (computation) = - (!defaultAsyncGroup).Start computation - -#if FX_ATLEAST_40 - static member CreateTask (computation,?taskCreationOptions)= - (!defaultAsyncGroup).CreateTask(computation,?taskCreationOptions=taskCreationOptions) - - static member StartAsTask (computation,?taskCreationOptions)= - (!defaultAsyncGroup).StartAsTask(computation,?taskCreationOptions=taskCreationOptions) - -#endif - -#if DONT_INCLUDE_DEPRECATED -#else - static member Run (p: Async<'T>,?timeout) = - Async.RunSynchronously(p,?timeout = timeout) - - static member Spawn (computation) = - Async.Start computation -#endif - -#if FX_ATLEAST_40 - type AsyncGroup with - member g.StartChildAsTask (computation,?taskCreationOptions) = - async { return g.StartAsTask(computation, ?taskCreationOptions=taskCreationOptions) } - - type Async with - static member StartChildAsTask (computation,?taskCreationOptions) = - (!defaultAsyncGroup).StartChildAsTask(computation, ?taskCreationOptions=taskCreationOptions) - -#endif - type Async with - static member Parallel (l: seq>) = - protectedPrimitive (fun args -> - let tasks = Seq.to_array l - if tasks.Length = 0 then args.cont [| |] else - let count = ref tasks.Length - let firstExn = ref None - let results = Array.zeroCreate tasks.Length - // Attept to cancel the individual operations if an exception happens on any the other threads - let innerAsyncGroup, disposeFct = args.group.CreateSubGroup() - let finishTask(remaining) = - if (remaining=0) then - disposeFct(); - match (!firstExn) with - | None -> args.cont results - | Some (Choice1Of2 exn) -> args.econt exn - | Some (Choice2Of2 cexn) -> args.ccont cexn - else - FakeUnit - - let recordSuccess i res = - results.[i] <- res; - let remaining = lock count (fun () -> decr count; !count) - finishTask(remaining) - - let recordFailure exn = - let remaining = - lock count (fun () -> - decr count; - match !firstExn with - | None -> firstExn := Some exn // save the cancellation as the first exception - | _ -> () - !count) - if (remaining>0) then - innerAsyncGroup.TriggerCancel() - finishTask(remaining) - - tasks |> Array.iteri (fun i p -> - queueWorkItem - innerAsyncGroup - // on success, record the result - (fun res -> recordSuccess i res) - // on exception... - (fun exn -> recordFailure (Choice1Of2 exn)) - // on cancellation... - (fun cexn -> recordFailure (Choice2Of2 cexn)) - p); - FakeUnit) - - type Async with - - static member Parallel2 (a:Async<'T1>,b:Async<'T2>) = - async { let! res = Async.Parallel [boxed a; boxed b] - return (unbox<'T1>(res.[0]), unbox<'T2>(res.[1])) } - - static member Parallel3 (a:Async<'T1>,b:Async<'T2>,c:Async<'T3>) = - async { let! res = Async.Parallel [boxed a; boxed b; boxed c] - return (unbox<'T1>(res.[0]), unbox<'T2>(res.[1]), unbox<'T3>(res.[2])) } - - static member RunWithContinuations(cont,econt,ccont,a:Async<'T>) : unit = - (!defaultAsyncGroup).RunWithContinuations(cont,econt,ccont,a) - -#if FX_NO_REGISTERED_WAIT_HANDLES - static member WaitOne(waitHandle:WaitHandle,?millisecondsTimeout:int) = - protectedPrimitive(fun args -> - let millisecondsTimeout = defaultArg millisecondsTimeout Threading.Timeout.Infinite - if millisecondsTimeout = 0 then - let ok = waitHandle.WaitOne(0,exitContext=false) - args.cont ok - else - // The .NET Compact Framework doesn't support RegisterWaitForSingleObject - // Hence we unblock the condition byusing a new thread pool work item. - // This is sub-optimal. - if ThreadPool.QueueUserWorkItem(fun _ -> - let ok = waitHandle.WaitOne(millisecondsTimeout,exitContext=false) - args.cont ok |> ignore) then - FakeUnit - else - // If we couldn't queue in the thread pool, try a new thread - (new Thread(ThreadStart(fun () -> - let ok = waitHandle.WaitOne(millisecondsTimeout,exitContext=false) - args.cont ok |> ignore),IsBackground=true)).Start(); - FakeUnit) - -#else - static member WaitOne(waitHandle:WaitHandle,?millisecondsTimeout:int) = - protectedPrimitive(fun args -> - let millisecondsTimeout = defaultArg millisecondsTimeout Threading.Timeout.Infinite - if millisecondsTimeout = 0 then -#if FX_NO_EXIT_CONTEXT_FLAGS - let ok = waitHandle.WaitOne(0) -#else - let ok = waitHandle.WaitOne(0,exitContext=false) -#endif - args.cont ok - else - - let rwh = ref (None : RegisteredWaitHandle option) - - let cancelHandler = - Handler(fun obj (msg:string) -> - match !rwh with - | None -> () - | Some rwh -> - // If we successfully Unregister the operation then - // the callback below will never get called. So we call the cancel - // continuation directly in a new work item. - let succeeded = rwh.Unregister(waitHandle) - if succeeded then - Async.Start (async { do (args.ccont (new OperationCanceledException(msg)) |> unfake) })) - - rwh := Some(ThreadPool.RegisterWaitForSingleObject - (waitObject=waitHandle, - callBack=WaitOrTimerCallback(fun _ timeOut -> - rwh := None; - args.group.Cancel.RemoveHandler(cancelHandler); - args.cont (not timeOut) |> ignore), - state=null, - millisecondsTimeOutInterval=millisecondsTimeout, - executeOnlyOnce=true)); - - args.group.Cancel.AddHandler(cancelHandler); - FakeUnit) -#endif - - [] - static member WaitIAsyncResult(iar: IAsyncResult,endFunc): Async<'T> = - async { if iar.CompletedSynchronously then - return endFunc iar - else - let! ok = Async.WaitOne(iar.AsyncWaitHandle) - return endFunc iar } - - [] - static member BuildPrimitive(beginFunc,endFunc): Async<'T> = - async { let iar : IAsyncResult = beginFunc((null : System.AsyncCallback),(null:obj)) - return! Async.WaitIAsyncResult(iar,endFunc) } - - [] - static member BuildPrimitive(arg1,beginFunc,endFunc): Async<'T> = - async { let iar : IAsyncResult = beginFunc(arg1,(null : System.AsyncCallback),(null:obj)) - return! Async.WaitIAsyncResult(iar,endFunc) } - - [] - static member BuildPrimitive(arg1,arg2,beginFunc,endFunc): Async<'T> = - async { let iar : IAsyncResult = beginFunc(arg1,arg2,(null : System.AsyncCallback),(null:obj)) - return! Async.WaitIAsyncResult(iar,endFunc) } - - [] - static member BuildPrimitive(arg1,arg2,arg3,beginFunc,endFunc): Async<'T> = - async { let iar : IAsyncResult = beginFunc(arg1,arg2,arg3,(null : System.AsyncCallback),(null:obj)) - return! Async.WaitIAsyncResult(iar,endFunc) } - - type Async with -#if DONT_INCLUDE_DEPRECATED -#else - static member Generate (n,f, ?numChunks) : Async<'T array> = - async { let procs = defaultArg numChunks System.Environment.ProcessorCount - let resArray = Array.zeroCreate n - let! res = Async.Parallel - [ for pid in 0 .. procs-1 -> - async { for i in 0 .. (n/procs+(if n%procs > pid then 1 else 0)) - 1 do - let elem = (i + pid * (n/procs) + min (n%procs) pid) - let! res = f elem - do resArray.[elem] <- res; } ] - return resArray } -#endif - - static member Ignore (p: Async<'T>) = bindA p (fun _ -> doneA) - static member SwitchToNewThread() = - protectedPrimitive(fun args -> - (new Thread(ThreadStart(fun () -> args.cont () |> ignore),IsBackground=true)).Start(); FakeUnit) - - static member SwitchToThreadPool() = - protectedPrimitive(fun args -> - //if not (ExecutionContext.IsFlowSuppressed()) then ExecutionContext.SuppressFlow() |> ignore - if not (ThreadPool.QueueUserWorkItem(fun _ -> args.cont () |> ignore)) then - args.econt (Failure "SwitchToThreadPool: failed to queue user work item") - else - FakeUnit) - - type Async with - - static member StartChild (p:Async<'T>,?millisecondsTimeout) = - async { let resultCell = new ResultCell<_>() - let! asyncGroup = getAsyncGroup() - do queueWorkItem asyncGroup - (fun res -> resultCell.RegisterResult (Ok res); FakeUnit) - (fun err -> resultCell.RegisterResult (Error err); FakeUnit) - (fun err -> resultCell.RegisterResult (Error err); FakeUnit) - p - - return async { try - if resultCell.ResultAvailable then - return commit (resultCell.GrabResult()) - else - let! ok = Async.WaitOne(resultCell.GetWaitHandle(),?millisecondsTimeout=millisecondsTimeout) - return commitWithPossibleTimeout (if ok then Some(resultCell.GrabResult()) else None) - finally - resultCell.Close() } } - -#if DONT_INCLUDE_DEPRECATED -#else - static member SpawnChild p = - async { let! asyncGroup = getAsyncGroup() - do queueWorkItem asyncGroup - (fun () -> FakeUnit) // nothing to do on success - (fun _ -> FakeUnit) // ignore exception in child - (fun _ -> FakeUnit) // ignore cancellation in child - p } -#endif - -#if FX_NO_SYNC_CONTEXT -#else - static member SpawnThenPostBack (computation: Async<'T>,postBack) = - let syncContext = SynchronizationContext.Current - match syncContext with - | null -> raise <| new System.InvalidOperationException("The System.Threading.SynchronizationContext.Current of the calling thread is null") - | _ -> - Async.Start (async { let! res = catchA(computation) in - do post syncContext (fun () -> postBack (commit res)) () }) - - static member SwitchToGuiThread syncContext = - async { match syncContext with - | null -> - // no synchronization context, just switch to the thread pool - do! Async.SwitchToThreadPool() - | ctxt -> - // post the continuation to the synchronization context - do! Async.Primitive (fun (cont,econt) -> post ctxt (fun () -> cont()) ()) } -#endif - - static member OnCancel action = - async { let h = new Handler<_>(fun sender x -> try action x with _ -> ()) - let! asyncGroup = getAsyncGroup () - do asyncGroup.Cancel.AddHandler(h); - return { new IDisposable with - member x.Dispose() = asyncGroup.Cancel.RemoveHandler(h) } } - - static member TryCancelled (p: Async<'T>,f) = - whenCancelledA f p - -#if FX_ATLEAST_40 - static member WaitTask (task:Task<'T>) : Async<'T> = - protectedPrimitive(fun args -> - let continuation (completedTask : Task<_>) = - if completedTask.IsCanceled then - args.group.TriggerCancel() - args.ccont (new OperationCanceledException()) - elif completedTask.IsFaulted then - args.econt completedTask.Exception - else - args.cont completedTask.Result - - task.ContinueWith(Action>(continuation >> unfake), TaskContinuationOptions.None) |> ignore |> fake - ) -#endif - - module CommonExtensions = - open AsyncBuilderImpl - - type System.IO.Stream with - - member stream.AsyncRead(buffer: byte[],?offset,?count) = - let offset = defaultArg offset 0 - let count = defaultArg count buffer.Length - Async.BuildPrimitive (buffer,offset,count,stream.BeginRead,stream.EndRead) - - member stream.AsyncRead(count) = - async { let buffer = Array.zeroCreate count - let i = ref 0 - while !i < count do - let! n = stream.AsyncRead(buffer,!i,count - !i) - i := !i + n - if n = 0 then - raise(System.IO.EndOfStreamException("failed to read enough bytes from stream")) - return buffer } - - member stream.AsyncWrite(buffer:byte[], ?offset:int, ?count:int) = - let offset = defaultArg offset 0 - let count = defaultArg count buffer.Length - Async.BuildPrimitive (buffer,offset,count,stream.BeginWrite,stream.EndWrite) - - type System.Threading.WaitHandle with - member waitHandle.AsyncWaitOne(?millisecondsTimeout:int) = - Async.WaitOne(waitHandle,?millisecondsTimeout=millisecondsTimeout) - - type System.Threading.Thread with - - static member AsyncSleep(dueTime) = - Async.Primitive (fun (cont,econt) -> - let timer = ref None - timer := Some (new Timer((fun _ -> - // Try to Dispose of the TImer. - // Note: there is a race here: the System.Threading.Timer time very occasionally - // calls the callback _before_ the timer object has been recorded anywhere. This makes it difficult to dispose the - // timer in this situation. In this case we just let the timer be collected by finalization. - (match !timer with - | None -> () - | Some t -> t.Dispose()); - // Now we're done, so call the continuation - cont() |> ignore), - null, dueTime=dueTime, period = -1))) - -#if FX_ATLEAST_40 - type System.Threading.Tasks.Task<'T> with - member this.AsyncValue - with get () = - Async.WaitTask(this) -#endif - - open CommonExtensions - -#if DONT_INCLUDE_DEPRECATED -#else - [] - [] - [] - type AsyncFuture<'T>(resultCell:ResultCell>) = - [] - member x.Value = commitWithPossibleTimeout (resultCell.TryWaitForResult()) - - interface IAsyncResult with - member iar.IsCompleted= resultCell.ResultAvailable - member iar.AsyncState=null - member iar.CompletedSynchronously=false - member iar.AsyncWaitHandle = resultCell.GetWaitHandle() - interface IDisposable with - member x.Dispose() = resultCell.Close() - - - type AsyncGroup with - [] - member g.SpawnFuture p = - let resultCell = new ResultCell<_>() - - // OK, queueWorkItem the async computation and when it's done register completion - queueWorkItem - g - // on success, record the result - (fun res -> resultCell.RegisterResult (Ok res); FakeUnit) - // on exception... - (fun exn -> resultCell.RegisterResult (Error(exn)); FakeUnit) - // on cancellation... - (fun exn -> resultCell.RegisterResult (Error(exn :> Exception)); FakeUnit) - p - new AsyncFuture<_>(resultCell) - - type Async with - - [] - static member SpawnFuture (p: Async<'T>) = - (!defaultAsyncGroup).SpawnFuture p - -#endif - - [] - [] - type Mailbox<'Msg>() = - let mutable inbox_store = null - let mutable arrivals = new Queue<'Msg>() - let syncRoot = arrivals - - // Control elements indicating the state of the reader. When the reader is "blocked" at an - // asynchronous receive, either - // -- "cont" is non-null and the reader is "activated" by re-scheduling cont in the thread pool; or - // -- "pulse" is non-null and the reader is "activated" by setting this event - let mutable cont : (bool -> FakeUnitValue) = Unchecked.defaultof<_> - let mutable pulse : AutoResetEvent = null - let ensurePulse() = - match pulse with - | null -> - pulse <- new AutoResetEvent(false); - | ev -> - () - pulse - - let waitOneNoTimeout = - P (fun args -> - match box cont with - | null -> - let descheduled = - // An arrival may have happened while we're preparing to deschedule - lock syncRoot (fun () -> - if arrivals.Count = 0 then - // OK, no arrival so deschedule - cont <- args.cont; - true - else - false) - if descheduled then - FakeUnit - else - // If we didn't deschedule then run the continuation immediately - args.cont true - | _ -> - failwith "multiple waiting reader continuations for mailbox") - - let waitOne(timeout) = - if timeout < 0 then - waitOneNoTimeout - else - ensurePulse().AsyncWaitOne(millisecondsTimeout=timeout) - - member x.inbox = - match inbox_store with - | null -> inbox_store <- new System.Collections.Generic.List<'Msg>(1) // ResizeArray - | _ -> () - inbox_store - - member x.scanArrivalsUnsafe(f) = - if arrivals.Count = 0 then None - else let msg = arrivals.Dequeue() - match f msg with - | None -> - x.inbox.Add(msg); - x.scanArrivalsUnsafe(f) - | res -> res - // Lock the arrivals queue while we scan that - member x.scanArrivals(f) = lock syncRoot (fun () -> x.scanArrivalsUnsafe(f)) - - member x.scanInbox(f,n) = - match inbox_store with - | null -> None - | inbox -> - if n >= inbox.Count - then None - else - let msg = inbox.[n] - match f msg with - | None -> x.scanInbox (f,n+1) - | res -> inbox.RemoveAt(n); res - - member x.receiveFromArrivalsUnsafe() = - if arrivals.Count = 0 then None - else Some(arrivals.Dequeue()) - - member x.receiveFromArrivals() = - lock syncRoot (fun () -> x.receiveFromArrivalsUnsafe()) - - member x.receiveFromInbox() = - match inbox_store with - | null -> None - | inbox -> - if inbox.Count = 0 - then None - else - let x = inbox.[0] - inbox.RemoveAt(0); - Some(x) - - member x.Post(msg) = - lock syncRoot (fun () -> - arrivals.Enqueue(msg); - // This is called when we enqueue a message, within a lock - // We cooperatively unblock any waiting reader. If there is no waiting - // reader we just leave the message in the incoming queue - match box cont with - | null -> - match pulse with - | null -> - () // no one waiting, leaving the message in the queue is sufficient - | ev -> - // someone is waiting on the wait handle - ev.Set() |> ignore - | _ -> - let c = cont - cont <- Unchecked.defaultof<_> - //if not (ExecutionContext.IsFlowSuppressed()) then ExecutionContext.SuppressFlow() |> ignore - ThreadPool.QueueUserWorkItem(fun _ -> c true |> unfake) |> ignore) - - member x.TryScan ((f: 'Msg -> (Async<'T>) option), timeout) : Async<'T option> = - let rec scan() = - async { match x.scanArrivals(f) with - | None -> // Deschedule and wait for a message. When it comes, rescan the arrivals - let! ok = waitOne(timeout) - if ok then return! scan() else return None - | Some resP -> let! res = resP - return Some(res) } - // Look in the inbox first - async { match x.scanInbox(f,0) with - | None -> return! scan() - | Some resP -> let! res = resP - return Some(res) } - - member x.Scan((f: 'Msg -> (Async<'T>) option), timeout) = - async { let! resOpt = x.TryScan(f,timeout) - match resOpt with - | None -> return raise(TimeoutException("Mailbox.Scan timed out")) - | Some res -> return res } - - - member x.TryReceive(timeout) = - let rec processFirstArrival() = - async { match x.receiveFromArrivals() with - | None -> - // Wait until we have been notified about a message. When that happens, rescan the arrivals - let! ok = waitOne(timeout) - if ok then return! processFirstArrival() - else return None - | res -> return res } - // look in the inbox first - async { match x.receiveFromInbox() with - | None -> return! processFirstArrival() - | res -> return res } - - member x.Receive(timeout) = - - let rec processFirstArrival() = - async { match x.receiveFromArrivals() with - | None -> - // Wait until we have been notified about a message. When that happens, rescan the arrivals - let! ok = waitOne(timeout) - if ok then return! processFirstArrival() - else return raise(TimeoutException("Mailbox.Receive timed out")) - | Some res -> return res } - // look in the inbox first - async { match x.receiveFromInbox() with - | None -> return! processFirstArrival() - | Some res -> return res } - - interface System.IDisposable with - member x.Dispose() = - if pulse <> null then (pulse :> IDisposable).Dispose() - -#if DEBUG - member x.UnsafeContents = - (x.inbox,arrivals,pulse,cont) |> box -#endif - - - [] - type AsyncReplyChannel<'Reply>(replyf : 'Reply -> unit) = - member x.Reply(reply) = replyf(reply) - - [] - [] - type MailboxProcessor<'Msg>(initialState,?asyncGroup) = - let asyncGroup = defaultArg asyncGroup !defaultAsyncGroup - let mailbox = new Mailbox<'Msg>() - let mutable defaultTimeout = Threading.Timeout.Infinite - let mutable started = false - - member x.DefaultTimeout with get() = defaultTimeout and set(v) = defaultTimeout <- v -#if DEBUG - member x.UnsafeMessageQueueContents = mailbox.UnsafeContents -#endif - member x.Start() = - if started then - raise (new InvalidOperationException("the mailbox has already been started")) - else - started <- true - asyncGroup.Start(computation=initialState(x)) - member x.Post(msg) = mailbox.Post(msg) - - member x.TryPostAndReply(msgf : (_ -> 'Msg), ?timeout) : 'Reply option = - let timeout = defaultArg timeout defaultTimeout - use resultCell = new ResultCell<_>() - let msg = msgf (AsyncReplyChannel<_>(fun reply -> - // Note the ResultCell may have been disposed if the operation - // timed out. In this case RegisterResult drops the result on the floor. - resultCell.RegisterResult(reply))) - mailbox.Post(msg) - resultCell.TryWaitForResult(timeout=timeout) - - member x.PostAndReply(msgf, ?timeout) : 'Reply = - match x.TryPostAndReply(msgf,?timeout=timeout) with - | None -> raise (TimeoutException("PostAndReply timed out")) - | Some res -> res - - member x.AsyncTryPostAndReply(msgf, ?timeout) : Async<'Reply option> = - let timeout = defaultArg timeout defaultTimeout - let resultCell = new ResultCell<_>() - let msg = msgf (AsyncReplyChannel<_>(fun reply -> - // Note the ResultCell may have been disposed if the operation - // timed out. In this case RegisterResult drops the result on the floor. - resultCell.RegisterResult(reply))) - mailbox.Post(msg) - async { use disposeCell = resultCell - let! ok = resultCell.GetWaitHandle().AsyncWaitOne(millisecondsTimeout=timeout) - let res = (if ok then Some(resultCell.GrabResult()) else None) - return res } - - member x.AsyncPostAndReply(msgf, ?timeout) = - let timeout = defaultArg timeout defaultTimeout - let asyncReply = x.AsyncTryPostAndReply(msgf,timeout=timeout) - async { let! res = asyncReply - match res with - | None -> return! raise (TimeoutException("AsyncPostAndReply timed out")) - | Some res -> return res } - - member x.Receive(?timeout) = mailbox.Receive(timeout=defaultArg timeout defaultTimeout) - member x.TryReceive(?timeout) = mailbox.TryReceive(timeout=defaultArg timeout defaultTimeout) - member x.Scan(f: 'Msg -> (Async<'T>) option,?timeout) = mailbox.Scan(f,timeout=defaultArg timeout defaultTimeout) - member x.TryScan(f: 'Msg -> (Async<'T>) option,?timeout) = mailbox.TryScan(f,timeout=defaultArg timeout defaultTimeout) - - interface System.IDisposable with - member x.Dispose() = (mailbox :> IDisposable).Dispose() - - static member Start(initialState,?asyncGroup) = - let mb = new MailboxProcessor<'Msg>(initialState,?asyncGroup=asyncGroup) - mb.Start(); - mb - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/control.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/control.fsi deleted file mode 100644 index 6095c982..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/control.fsi +++ /dev/null @@ -1,508 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// This namespace contains types for derived control constructs including -/// on-demand and asynchronous computations. -namespace Microsoft.FSharp.Control - - #nowarn "44" // This construct is deprecated. This method will be removed in the next version of F# and may no longer be used. Consider using Async.RunWithContinuations - - open System - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Control - open Microsoft.FSharp.Collections - -#if FX_ATLEAST_40 - open System.Threading.Tasks -#endif - -#if FX_NO_OPERATION_CANCELLED - - type OperationCanceledException = - inherit System.Exception - new : System.String -> OperationCanceledException -#endif - -#if DONT_INCLUDE_DEPRECATED - type -#else - [] - [] - [] - type AsyncFuture<'T> = - interface System.IDisposable - interface System.IAsyncResult - /// Wait for the completion of the operation and get its result - member Value : 'T - - - /// A handle to a capability to cancel a set of asynchronous computations. - and -#endif - - [] - AsyncGroup = - /// Generate a new asynchronous group - new : unit -> AsyncGroup - /// Raise the cancellation condition for this group of computations - member TriggerCancel : ?message:string -> unit - - /// Run the asynchronous computation and await its result. - /// - /// If an exception occurs in the asynchronous computation then an exception is re-raised by this - /// function. - member RunSynchronously : computation:Async<'T> * ?timeout : int -> 'T - - /// Start the asynchronous computation as a work item. Do not await its result. - member Start : computation:Async -> unit - -#if FX_ATLEAST_40 - /// Creates a System.Threading.Tasks.Task that executes asynchronous computation. - /// The task is not started. - member CreateTask : computation:Async<'T> * ?taskCreationOptions : TaskCreationOptions -> Task<'T> - - /// Starts a System.Threading.Tasks.Task that executes asynchronous computation. - member StartAsTask : computation:Async<'T> * ?taskCreationOptions : TaskCreationOptions -> Task<'T> - - /// Creates an asynchronous computation which starts given computation as System.Threading.Tasks.Task - member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions : TaskCreationOptions -> Async> -#endif - -#if DONT_INCLUDE_DEPRECATED -#else - [] - member Run : computation:Async<'T> * ?timeout : int -> 'T - - [] - member Spawn : computation:Async -> unit - - [] - member SpawnFuture : computation:Async<'T> -> AsyncFuture<'T> -#endif - - /// Start the asynchronous computation as a work item. - /// Return a handle to the computation as an AsyncFuture. - member RunWithContinuations: continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * computation:Async<'T> -> unit - - /// An asynchronous computation, which, when run, will eventually produce a value - /// of the given type, or else raise an exception. The value and/or exception is not returned - /// to the caller immediately, but is rather passed to a success continuation, exception continuation - /// or cancellation continuation. - /// - /// Asynchronous computations are normally specified using the F# 'workflow' syntax for building - /// computations. - /// - /// When run, asynchronous computations can normally be thought of as running run in one of - /// two modes: 'work item mode' or 'waiting mode'. - /// - /// - 'work item mode' indicates that the computation is executing as a work item, - /// e.g. in the .NET Thread Pool via ThreadPool.QueueUserWorkItem, or is running - /// a brief event-response action on the GUI thread. - /// - /// - 'waiting mode' indicates the computations a waiting for asynchronous I/O completions, - /// typically suspended as thunks using ThreadPool.RegisterWaitForSingleObject. - /// - /// Asynchronous computations running as 'work items' should not generally perform blocking - /// operations, e.g. long running synchronous loops. However, some asynchronous - /// computations may, out of necessity, need to execute blocking I/O operations: - /// these should be run on new threads or a user-managed pool of threads specifically - /// dedicated to resolving blocking conditions. For example, System.IO.OpenFile is, by - /// design, a blocking operation. However frequently it is important to code as - /// if this is asynchronous. This can be done by executing Async.SwitchToNewThread - /// as part of the workflow. - /// - /// When run, asynchronous computations belong to an AsyncGroup. This can usually be specified - /// when the async computation is started. The only action on an AsyncGroup is to raise a cancellation - /// condition for the AsyncGroup. Async values check the cancellation condition for their AsyncGroup - /// regularly, though synchronous computations within an asynchronous computation will not automatically - /// check this condition. This gives a user-level cooperative cancellation protocol. - and - [] - [] - Async<'T> - - /// This static class holds members for creating and manipulating asynchronous computations - and - [] - Async = - - /// Run the asynchronous computation and await its result. - /// - /// If an exception occurs in the asynchronous computation then an exception is re-raised by this - /// function. - /// - /// Run as part of the default AsyncGroup - static member RunSynchronously : computation:Async<'T> * ?timeout : int -> 'T - -#if DONT_INCLUDE_DEPRECATED -#else - [] - static member Run : computation:Async<'T> * ?timeout : int -> 'T - -#if FX_NO_SYNC_CONTEXT -#else - [] - static member SpawnThenPostBack : computation:Async<'T> * postBack:('T -> unit) -> unit -#endif -#endif - - /// Start the asynchronous computation in the thread pool. Do not await its result. - /// - /// Run as part of the default AsyncGroup - static member Start : computation:Async -> unit - -#if DONT_INCLUDE_DEPRECATED -#else - [] - static member Spawn : computation:Async -> unit - - [] - static member SpawnFuture : computation:Async<'T> -> AsyncFuture<'T> -#endif - -#if FX_ATLEAST_40 - /// Creates a System.Threading.Tasks.Task that executes asynchronous computation. - /// The task is not started. - static member CreateTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Task<'T> - - /// Starts a System.Threading.Tasks.Task that executes asynchronous computation. - static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Task<'T> - - /// Creates an asynchronous computation which starts given computation as System.Threading.Tasks.Task - static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Async> -#endif - - /// Run an asynchronous computation, initially as a work item. - /// - /// Run as part of the default AsyncGroup - static member RunWithContinuations: continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * computation:Async<'T> -> unit - - //---------- Exceptions - - /// Get the default group for executing asynchronous computations - static member Catch : computation:Async<'T> -> Async> - - /// Specify an asynchronous computation that, when run, executes computation, - /// If p is effectively cancelled before its termination then - /// the process f exn is executed. - static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T> - - //---------- Cancellation checking and performing actions on cancellation. - -#if DONT_INCLUDE_DEPRECATED -#else - [] - static member CancelCheck : unit -> Async -#endif - - /// Generate a scoped, cooperative cancellation handler for use within an asynchronous workflow. - /// - /// async { use! holder = Async.OnCancel f ... } generates an asynchronous computation where, - /// if a cancellation happens any time during the execution of the asynchronous computation in the scope of 'holder', - /// then action 'f' is executed on the thread that is performing the cancellation. You can use - /// this to arrange for your own computation to be asynchronously notified that a cancellation has occurred, e.g. - /// by setting a flag, or deregistering a pending I/O action. - static member OnCancel : compensation: (string -> unit) -> Async - - /// Raise the cancellation condition for the most recent set of Async computations started without any specific AsyncGroup. - /// Replace the global group with a new global group for any asynchronous computations created after this point without - /// any specific AsyncGroup. - static member CancelDefaultGroup : ?message:string -> unit - - /// Get the default group for executing asynchronous computations - static member DefaultGroup : AsyncGroup - - //---------- Parallelism - - /// Start a child computation within an asynchronous workflow. - /// This allows multiple asynchronous computations to be executed simultaneously. - /// - /// This method should normally be used as the immediate - /// right-hand-side of a 'let!' binding in an F# asynchronous workflow, i.e., - /// - /// async { ... - /// let! completor1 = childComputation1 |> Async.StartChild - /// let! completor2 = childComputation2 |> Async.StartChild - /// ... - /// let! result1 = completor1 - /// let! result2 = completor2 - /// ... } - /// - /// When used in this way, each use of StartChild starts an instance of childComputation - /// and returns a completor object representing a computation to wait for the completion of the operation. - /// When executed, the completor awaits the completion of childComputation. - static member StartChild : computation:Async<'T> * ?millisecondsTimeout : int -> Async> - - -#if DONT_INCLUDE_DEPRECATED -#else - [Async.StartChild(computation) |> Async.Ignore or let! _ = Async.StartChild(computation). This indicates that results and errors from the child computation are ignored")>] - static member SpawnChild : computation:Async -> Async - - [] - static member Generate : itemCount:int * generator: (int -> Async<'T>) * ?groupCount: int -> Async<'T array> -#endif - - /// Specify an asynchronous computation that, when run, executes all the given asynchronous computations, initially - /// queueing each as work items and using a fork/join pattern. If any raise an exception then the - /// overall computation will raise the first detected exception, and attempt to cancel the others. - /// All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. - static member Parallel : computationList:seq> -> Async<'T array> - - /// Specify an asynchronous computation that, when run, executes the two asynchronous computations, starting each in the thread pool. - /// If any raise an exception then the overall computation will raise an exception, and attempt to cancel the others. - /// All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. - static member Parallel2 : computation1:Async<'T1> * computation2:Async<'T2> -> Async<'T1 * 'T2> - - /// Specify an asynchronous computation that, when run, executese the three asynchronous computations, starting each in the thread pool. - /// If any raise an exception then the overall computation will raise an exception, and attempt to cancel the others. - /// All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. - static member Parallel3 : computation1:Async<'T1> * computation2:Async<'T2> * computation3:Async<'T3> -> Async<'T1 * 'T2 * 'T3> - - //---------- Thread Control - - /// Specify an asynchronous computation that, when run, creates a new thread and runs - /// its continutation in that thread - static member SwitchToNewThread : unit -> Async - - /// Specify an asynchronous computation that, when run, queues a CPU-intensive work in the thread pool item that runs - /// its continutation. - static member SwitchToThreadPool : unit -> Async - -#if FX_NO_SYNC_CONTEXT -#else - /// Specify an asynchronous computation that, when run, runs - /// its continuation using syncContext.Post. If syncContext is null - /// then the asynchronous computation is equivalent to SwitchToThreadPool(). - static member SwitchToGuiThread : syncContext:System.Threading.SynchronizationContext -> Async -#endif - - - //---------- Building new primitive Async values - -#if DONT_INCLUDE_DEPRECATED -#else - [] - [] - static member Primitive : callback:(('T -> unit) * (exn -> unit) -> unit) -> Async<'T> -#endif - - /// Specify an asynchronous computation that, when run, executes the given callback. - /// The callback must eventually call either the continuation, - /// the exception continuation or the cancel exception. - [] - static member Primitive : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> - - /// Specify an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in .NET APIs where the overall operation is not qualified by any arguments. For example, - /// Async.BuildPrimitive(ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, the 'Begin' half of the operation is executed, and - /// an asynchronous computation is returned that, when run, awaits the completion - /// of the computation and fetches its overall result using the 'End' operation. - [] - static member BuildPrimitive : beginAction:(System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) -> Async<'T> - - /// Specify an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in .NET APIs where the - /// overall operation is qualified by one argument. For example, - /// Async.BuildPrimitive(place,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, the 'Begin' half of the operation is executed, and - /// an asynchronous computation is returned that, when run, awaits the completion - /// of the computation and fetches its overall result using the 'End' operation. - [] - static member BuildPrimitive : arg:'Arg1 * beginAction:('Arg1 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) -> Async<'T> - - /// Specify an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in .NET APIs where the - /// overall operation is qualified by two arguments. For example, - /// Async.BuildPrimitive(arg1,arg2,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, the 'Begin' half of the operation is executed, and - /// an asynchronous computation is returned that, when run, awaits the completion - /// of the computation and fetches its overall result using the 'End' operation. - [] - static member BuildPrimitive : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) -> Async<'T> - - /// Specify an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in .NET APIs where the overall operation is qualified by three arguments. For example, - /// Async.BuildPrimitive(arg1,arg2,arg3,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, the 'Begin' half of the operation is executed, and - /// an asynchronous computation is returned that, when run, awaits the completion - /// of the computation and fetches its overall result using the 'End' operation. - [] - static member BuildPrimitive : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) -> Async<'T> - - /// Specify an asynchronous computation that, when run, runs 'p', ignoring the result and - /// returning the result '()'. - static member Ignore : computation: Async<'T> -> Async - - - [] - /// The type of the 'async' operator, used to build workflows for asynchronous computations. - type AsyncBuilder = - /// Specify an asynchronous computation that, when run, enumerates the sequence 'seq' - /// on demand and runs 'f' for each element. - member For: sequence:seq<'T> * body:('T -> Async) -> Async - - /// Specify an asynchronous computation that, when run, just returns '()' - member Zero : unit -> Async - - /// Specify an asynchronous computation that, when run, first runs 'p1' and then runs 'p2', returning the result of 'p2'. - member Combine : computation1:Async * computation2:Async<'T> -> Async<'T> - - /// Specify an asynchronous computation that, when run, runs 'p' repeatedly - /// until 'gd()' becomes false. - member While : guard:(unit -> bool) * computation:Async -> Async - - /// Specify an asynchronous computation that, when run, returns the result 'v' - member Return : value:'T -> Async<'T> - - /// Specify an asynchronous computation that, when run, runs 'f()' - member Delay : generator:(unit -> Async<'T>) -> Async<'T> - - /// Specify an asynchronous computation that, when run, runs 'f(resource)'. - /// The action 'resource.Dispose()' is executed as this computation yields its result - /// or if the asynchronous computation exits by an exception or by cancellation. - member Using: resource:'T * binder:('T -> Async<'U>) -> Async<'U> when 'T :> System.IDisposable - - /// Specify an asynchronous computation that, when run, runs 'p', and when - /// 'p' generates a result 'T', runs 'f res'. - member Bind: computation: Async<'T> * binder: ('T -> Async<'U>) -> Async<'U> - - /// Specify an asynchronous computation that, when run, runs 'p'. The action 'f' is executed - /// after 'p' completes, whether 'p' exits normally or by an exception. If 'f' raises an exception itself - /// the original exception is discarded and the new exception becomes the overall result of the computation. - member TryFinally : computation:Async<'T> * compensation:(unit -> unit) -> Async<'T> - - /// Specify an asynchronous computation that, when run, runs 'p' and returns its result. - /// If an exception happens then 'f(exn)' is called and the resulting computation executed instead. - member TryWith : computation:Async<'T> * catchHandler:(exn -> Async<'T>) -> Async<'T> - - /// Generate an object used to build asynchronous computations using F# computation expressions. The value - /// 'async' is a pre-defined instance of this type. - internal new : unit -> AsyncBuilder - - - [] - /// A module of extension members that provide asynchronous operations for some basic .NET types related to concurrency and I/O. - module CommonExtensions = - open System.IO - - type System.IO.Stream with - - /// Return an asynchronous computation that will read from the stream into the given buffer. - member AsyncRead : buffer:byte[] * ?offset:int * ?count:int -> Async - - /// Return an asynchronous computation that will read the given number of bytes from the stream - member AsyncRead : count:int -> Async - - /// Return an asynchronous computation that will write the given bytes to the stream - member AsyncWrite : buffer:byte[] * ?offset:int * ?count:int -> Async - - type System.Threading.WaitHandle with - /// Return an asynchronous computation that will wait on the given WaitHandle. This is scheduled - /// as a wait-item in the .NET thread pool using RegisterWaitForSingleObject, - /// meaning that the operation will not block any .NET threads for - /// the duration of the wait. - member AsyncWaitOne: ?millisecondsTimeout:int -> Async - - type System.Threading.Thread with - /// Return an asynchronous computation that will sleep for the given time. This is scheduled - /// using a System.Threading.Timer object, meaning that the operation will not block any threads - /// for the duration of the wait. - static member AsyncSleep : millisecondsDueTime:int -> Async - -#if FX_ATLEAST_40 - type System.Threading.Tasks.Task<'T> with - member AsyncValue : Async<'T> -#endif - - - [] - /// A handle to a capability to reply to a PostAndReply message - type AsyncReplyChannel<'Reply> = - /// Send a reply to a PostAndReply message - member Reply : value:'Reply -> unit - - /// A MailboxProcessor is a message-processing agent defined using an asynchronous workflow. - /// The agent encapsulates a message queue that supports multiple-writers and the single reader agent. - /// Writers send messages to the agent by using the Post, PostAndReply or AsyncPostAndReply methods. - /// - /// The reader agent is specified when creating the MailboxProcessor. The - /// agent is usually an asychronous workflow that waits for messages - /// by using the Receive or TryReceive methods. - /// A MailboxProcessor may also scan through all available messages by using the - /// Scan or TryScan method. The encapsulated message queue only - /// supports a single active reader, thus at most one concurrent call to Receive, TryReceive, - /// Scan and/or TryScan may be active at any one time. - - [] - [] - type MailboxProcessor<'Msg> = - - /// Create an instance of a MailboxProcessor. The asynchronous computation executed by the - /// processor is the one returned by the 'initial' function. This function is not executed until - /// 'Start' is called. - new : initial:(MailboxProcessor<'Msg> -> Async) * ?asyncGroup: AsyncGroup -> MailboxProcessor<'Msg> - - /// Create and start an instance of a MailboxProcessor. The asynchronous computation executed by the - /// processor is the one returned by the 'initial' function. - static member Start : initial:(MailboxProcessor<'Msg> -> Async) * ?asyncGroup: AsyncGroup -> MailboxProcessor<'Msg> - - /// Post a message to the message queue of the MailboxProcessor, asynchronously - member Post : message:'Msg -> unit - - /// Post a message to the message queue of the MailboxProcessor and await a reply on the channel synchronously. - /// The message is produced by a single call to the first function which must build a message - /// containing the reply channel. The receiving MailboxProcessor must process this message and - /// invoke the Reply method on the reply channel precisly once. - member PostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply - - /// Post a message to the message queue of the MailboxProcessor and await a reply on the channel asynchronously. - /// The message is produced by a single call to the first function which must build a message - /// containing the reply channel. The receiving MailboxProcessor must process this message and - /// invoke the Reply method on the reply channel precisly once. - member AsyncPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply> - - /// Like PostAndReply, but return None if no reply within the timeout period. - member TryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply option - - /// Like AsyncPostAndReply, but return None if no reply within the timeout period. - member AsyncTryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply option> - - /// Return an asynchronous computation which will - /// consume the first message in arrival order. No thread - /// is blocked while waiting for further messages. Raise a TimeoutException - /// if the timeout is exceeded. - member Receive : ?timeout:int -> Async<'Msg> - - /// Return an asynchronous computation which will - /// consume the first message in arrival order. No thread - /// is blocked while waiting for further messages. Return None - /// if the timeout is exceeded. - member TryReceive : ?timeout:int -> Async<'Msg option> - - /// Return an asynchronous computation which will - /// look through messages in arrival order until 'scanner' returns a Some value. No thread - /// is blocked while waiting for further messages. Raise a TimeoutException - /// if the timeout is exceeded. - member Scan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T> - - /// Return an asynchronous computation which will - /// look through messages in arrival order until 'scanner' returns a Some value. No thread - /// is blocked while waiting for further messages. Return None - /// if the timeout is exceeded. - member TryScan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T option> - -#if DEBUG - member UnsafeMessageQueueContents : obj -#endif - - /// Start the MailboxProcessor - member Start : unit -> unit - - /// Raise a timeout exception if a message not received in this amount of time. Default infinite. - member DefaultTimeout : int with get, set - - interface System.IDisposable diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/event.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/event.fs deleted file mode 100644 index 770aa954..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/event.fs +++ /dev/null @@ -1,158 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Control - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Control - open System.Reflection - open System.Diagnostics - -#if FX_NO_DELEGATE_DYNAMIC_METHOD -#else - -#if FX_NO_DELEGATE_DYNAMIC_INVOKE - module Impl = - type System.Delegate with - member d.DynamicInvoke(args: obj[]) = - d.Method.Invoke(d.Target, BindingFlags.Default ||| BindingFlags.Public ||| BindingFlags.NonPublic , null, args, null) - - open Impl -#endif - - type DelegateEvent<'Del when 'Del :> System.Delegate>() = - let mutable multicast : System.Delegate = null - member x.Trigger(args:obj[]) = - match multicast with - | null -> () - | d -> d.DynamicInvoke(args) |> ignore - member x.Publish = - { new IDelegateEvent<'Del> with - member x.AddHandler(d) = - multicast <- System.Delegate.Combine(multicast, d) - member x.RemoveHandler(d) = - multicast <- System.Delegate.Remove(multicast, d) } - - [] - type Event<'Del,'Args when 'Del : delegate<'Args,unit> and 'Del :> System.Delegate >() = - let mutable multicast : System.Delegate = null - static let argTypes = - let instanceBindingFlags = BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly - let mi = typeof<'Del>.GetMethod("Invoke",instanceBindingFlags) - mi.GetParameters() |> (fun arr -> arr.[1..]) |> Array.map (fun p -> p.ParameterType) - - member x.Trigger(sender:obj,args:'Args) = - match multicast with - | null -> () - | d -> - if argTypes.Length = 1 then - d.DynamicInvoke([| sender; box args |]) |> ignore - else - d.DynamicInvoke(Array.append [| sender |] (Microsoft.FSharp.Reflection.FSharpValue.GetTupleFields(box args))) |> ignore - member x.Publish = - { new IEvent<'Del,'Args> with - member x.Add(f) = - multicast <- System.Delegate.Combine(multicast, new Handler<'Args>(fun sender arg -> f arg)) - member x.AddHandler(d) = - multicast <- System.Delegate.Combine(multicast, d) - member x.RemoveHandler(d) = - multicast <- System.Delegate.Remove(multicast, d) } -#endif - - [] - type Event<'T>() = - let mutable multicast : Handler<'T> option = None - member x.Delegate - with get () = match multicast with None -> null | Some(d) -> (d :> System.Delegate) - and set v = multicast <- (match v with null -> None | d -> Some d) - member x.Trigger(arg:'T) = - match multicast with - | None -> () - | Some d -> d.Invoke(null,arg) |> ignore - member x.Publish = - { new IEvent<'T> with - member e.AddHandler(d) = - x.Delegate <- (System.Delegate.Combine(x.Delegate, d) :?> Handler<'T>) - member e.RemoveHandler(d) = - x.Delegate <- (System.Delegate.Remove(x.Delegate, d) :?> Handler<'T>) - member e.Add(f:'T -> unit) = - x.Delegate <- (System.Delegate.Combine(x.Delegate, new Handler<'T>(fun sender arg -> f arg)) :?> Handler<'T>) } - - [] - [] - module Event = - [] - let create<'T>() = - let ev = new Event<'T>() - ev.Trigger, ev.Publish - - [] - let map f (w: IEvent<'Del,'T>) = - let ev = new Event<_>() - w.Add(fun x -> ev.Trigger(f x)); - ev.Publish - - [] - let filter f (w: IEvent<'Del,'T>) = - let ev = new Event<_>() - w.Add(fun x -> if f x then ev.Trigger x); - ev.Publish - - [] - let partition f (w: IEvent<'Del,'T>) = - let ev1 = new Event<_>() - let ev2 = new Event<_>() - w.Add(fun x -> if f x then ev1.Trigger x else ev2.Trigger x); - ev1.Publish,ev2.Publish - - [] - let choose f (w: IEvent<'Del,'T>) = - let ev = new Event<_>() - w.Add(fun x -> match f x with None -> () | Some r -> ev.Trigger r); - ev.Publish - - [] - let scan f z (w: IEvent<'Del,'T>) = - let state = ref z - let ev = new Event<_>() - w.Add(fun msg -> - let z = !state - let z = f z msg - state := z; - ev.Trigger(z)); - ev.Publish - - [] - let listen f (w: IEvent<'Del,'T>) = w.Add(f) - - [] - let pairwise (inp : IEvent<'Del,'T>) : IEvent<'T * 'T> = - let ev = new Event<'T * 'T>() - let lastArgs = ref None - inp.Add(fun args2 -> - (match !lastArgs with - | None -> () - | Some args1 -> ev.Trigger(args1,args2)); - lastArgs := Some args2); - - ev.Publish - - [] - let merge (w1: IEvent<'Del1,'T>) (w2: IEvent<'Del2,'T>) = - let ev = new Event<_>() - w1.Add(fun x -> ev.Trigger(x)); - w2.Add(fun x -> ev.Trigger(x)); - ev.Publish - - [] - let split (f : 'T -> Choice<'U1,'U2>) (w: IEvent<'Del,'T>) = - let ev1 = new Event<_>() - let ev2 = new Event<_>() - w.Add(fun x -> match f x with Choice1Of2 y -> ev1.Trigger(y) | Choice2Of2 z -> ev2.Trigger(z)); - ev1.Publish,ev2.Publish - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/event.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/event.fsi deleted file mode 100644 index cee7cdec..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/event.fsi +++ /dev/null @@ -1,99 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Control - - open System - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Control - open Microsoft.FSharp.Collections - -#if FX_NO_DELEGATE_DYNAMIC_METHOD // not available on CompactFramework 2.0 -#else - /// Event implementations for an arbitrary type of delegate - type DelegateEvent<'Del when 'Del :> System.Delegate> = - /// Create an event object suitable for implementing an arbitrary type of delegate - new : unit -> DelegateEvent<'Del> - /// Trigger the event using the given parameters - member Trigger : args:obj[] -> unit - /// Publish the event as a first class event value - member Publish : IDelegateEvent<'Del> - - /// Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument - type Event<'Del,'Args when 'Del : delegate<'Args,unit> and 'Del :> System.Delegate > = - /// Create an event object suitable for delegate types following the standard .NET Framework convention of a first 'sender' argument - new : unit -> Event<'Del,'Args> - /// Trigger the event using the given sender object and parameters. The sender object may be null. - member Trigger : sender:obj * args:'Args -> unit - /// Publish the event as a first class event value - member Publish : IEvent<'Del,'Args> - -#endif - /// Event implementations for the IEvent<_> type - type Event<'T> = - /// Create an event object suitable for implementing for the IEvent<_> type - new : unit -> Event<'T> - /// Trigger the event using the given parameters - member Trigger : arg:'T -> unit - /// Publish the event as a first class event value - member Publish : IEvent<'T> - - - [] - [] - /// Basic operations on first class event objects. - module Event = - - /// Create an IEvent with no initial listeners. Two items are returned: - /// a function to invoke (trigger) the event, and the event that clients - /// can plug listeners into. - val create : unit -> ('T -> unit) * IEvent<'T> - - /// Fire the output event when either of the input events fire - val merge: event1:IEvent<'del1,'T> -> event2:IEvent<'del2,'T> -> IEvent<'T> - - /// Return a new event that passes values transformed by the given function - val map: mapping:('T -> 'U) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> - - /// Return a new event that listens to the original event and triggers the resulting - /// event only when the argument to the event passes the given function - val filter: predicate:('T -> bool) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'T> - - /// Return a new event that listens to the original event and triggers the - /// first resulting event if the application of the predicate to the event arguments - /// returned true, and the second event if it returned false - val partition: predicate:('T -> bool) -> sourceEvent:IEvent<'Del,'T> -> (IEvent<'T> * IEvent<'T>) - - /// Return a new event that listens to the original event and triggers the - /// first resulting event if the application of the function to the event arguments - /// returned a Choice1Of2, and the second event if it returns a Choice2Of2 - val split: splitter:('T -> Choice<'U1,'U2>) -> sourceEvent:IEvent<'Del,'T> -> (IEvent<'U1> * IEvent<'U2>) - - /// Return a new event which fires on a selection of messages from the original event. - /// The selection function takes an original message to an optional new message. - val choose: chooser:('T -> 'U option) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> - - /// Return a new event consisting of the results of applying the given accumulating function - /// to successive values triggered on the input event. An item of internal state - /// records the current value of the state parameter. The internal state is not locked during the - /// execution of the accumulation function, so care should be taken that the - /// input IEvent not triggered by multiple threads simultaneously. - val scan: collector:('U -> 'T -> 'U) -> state:'U -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> - - /// Run the given function each time the given event is triggered. - val listen : callback:('T -> unit) -> sourceEvent:IEvent<'Del,'T> -> unit - - /// Return a new event that triggers on the second and subsequent triggerings of the input event. - /// The Nth triggering of the input event passes the arguments from the N-1th and Nth triggering as - /// a pair. The argument passed to the N-1th triggering is held in hidden internal state until the - /// Nth triggering occurs. - /// - /// You should ensure that the contents of the values being sent down the event are - /// not mutable. Note that many EventArgs types are mutable, e.g. MouseEventArgs, and - /// each firing of an event using this argument type may reuse the same physical - /// argument obejct with different values. In this case you should extract the necessary - /// information from the argument before using this combinator. - val pairwise: sourceEvent:IEvent<'Del,'T> -> IEvent<'T * 'T> - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/fslib-extra-pervasives.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/fslib-extra-pervasives.fs deleted file mode 100644 index 8fc58b67..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/fslib-extra-pervasives.fs +++ /dev/null @@ -1,152 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -module Microsoft.FSharp.Core.ExtraTopLevelOperators - -open System -open System.Collections.Generic -open System.IO -open System.Diagnostics -open Microsoft.FSharp -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Text -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Control -open Microsoft.FSharp.Primitives.Basics - -[] -let seq (x : seq<_>) = (x :> seq<_>) - -[] -let set l = Collections.Set.of_seq l - -[] -let dict l = - // Use a dictionary (this requires hashing and equality on the key type) - // Wrap keys in an Some(_) option in case they are null (when System.Collections.Generic.Dictionary fails). Sad but true. - let t = new Dictionary,_>(HashIdentity.Structural) - for (k,v) in l do - t.[Some(k)] <- v - let d = (t :> IDictionary<_,_>) - let c = (t :> ICollection<_>) - let ieg = (t :> IEnumerable<_>) - let ie = (t :> System.Collections.IEnumerable) - // Give a read-only view of the dictionary - { new IDictionary<'key, 'a> with - member s.Item - with get x = d.[Some(x)] - and set (x,v) = raise (NotSupportedException("This value may not be mutated")) - member s.Keys = - let keys = d.Keys - { new ICollection<'key> with - member s.Add(x) = raise (NotSupportedException("This value may not be mutated")); - member s.Clear() = raise (NotSupportedException("This value may not be mutated")); - member s.Remove(x) = raise (NotSupportedException("This value may not be mutated")); - member s.Contains(x) = keys.Contains(Some(x)) - member s.CopyTo(arr,i) = - let mutable n = 0 - for k in keys do - arr.[i+n] <- k.Value - n <- n + 1 - member s.IsReadOnly = true - member s.Count = keys.Count - interface IEnumerable<'key> with - member s.GetEnumerator() = (keys |> Seq.map (fun v -> v.Value)).GetEnumerator() - interface System.Collections.IEnumerable with - member s.GetEnumerator() = ((keys |> Seq.map (fun v -> v.Value)) :> System.Collections.IEnumerable).GetEnumerator() } - - member s.Values = d.Values - member s.Add(k,v) = raise (NotSupportedException("This value may not be mutated")) - member s.ContainsKey(k) = d.ContainsKey(Some(k)) - member s.TryGetValue(k,r) = - let key = Some(k) - if d.ContainsKey(key) then (r <- d.[key]; true) else false - member s.Remove(k : 'key) = (raise (NotSupportedException("This value may not be mutated")) : bool) - interface ICollection> with - member s.Add(x) = raise (NotSupportedException("This value may not be mutated")); - member s.Clear() = raise (NotSupportedException("This value may not be mutated")); - member s.Remove(x) = raise (NotSupportedException("This value may not be mutated")); - member s.Contains(KeyValue(k,v)) = c.Contains(KeyValuePair<_,_>(Some(k),v)) - member s.CopyTo(arr,i) = - let mutable n = 0 - for (KeyValue(k,v)) in c do - arr.[i+n] <- KeyValuePair<_,_>(k.Value,v) - n <- n + 1 - member s.IsReadOnly = true - member s.Count = c.Count - interface IEnumerable> with - member s.GetEnumerator() = - (c |> Seq.map (fun (KeyValue(k,v)) -> KeyValuePair<_,_>(k.Value,v))).GetEnumerator() - interface System.Collections.IEnumerable with - member s.GetEnumerator() = - ((c |> Seq.map (fun (KeyValue(k,v)) -> KeyValuePair<_,_>(k.Value,v))) :> System.Collections.IEnumerable).GetEnumerator() } - -// -------------------------------------------------------------------- -// Printf -// -------------------------------------------------------------------- - -[] -let sprintf fp = Printf.sprintf fp - -[] -let failwithf fp = Printf.failwithf fp - -[] -let fprintf (os:TextWriter) fp = Printf.fprintf os fp - -[] -let printf fp = Printf.printf fp - -[] -let eprintf fp = Printf.eprintf fp - -[] -let fprintfn (os:TextWriter) fp = Printf.fprintfn os fp - -[] -let printfn fp = Printf.printfn fp - -[] -let eprintfn fp = Printf.eprintfn fp - - -[] -let failwith s = raise (Failure s) - -[] -let output_any (oc: System.IO.TextWriter) x = Printf.fprintf oc "%A" x - -[] -let any_to_string x = Printf.sprintf "%A" x - -[] -let print_any x = Printf.printf "%A" x - - -[] -let async = new Microsoft.FSharp.Control.AsyncBuilder() - -#if FX_MINIMAL_REFLECTION // not on Compact Framework -#else -let (~%) (x:Microsoft.FSharp.Quotations.Expr<'a>) : 'a = failwith "first class uses of '%' are not permitted" - -let (~%%) (x: Microsoft.FSharp.Quotations.Expr) : 'a = failwith "first class uses of '%' are not permitted" -#endif - -[] -[] -[] -[] -[] -[] -[] -[] -do() - -let Array2 = 1 -let Array3 = 1 -let IEvent = 1 - -let (|Lazy|) (x:Lazy<_>) = x.SynchronizedForce() diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/fslib-extra-pervasives.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/fslib-extra-pervasives.fsi deleted file mode 100644 index d1402bac..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/fslib-extra-pervasives.fsi +++ /dev/null @@ -1,79 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -///Pervasives: Additional bindings available at the top level -module Microsoft.FSharp.Core.ExtraTopLevelOperators - -open System -open Microsoft.FSharp.Core -open Microsoft.FSharp.Control -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Text -open Microsoft.FSharp.Math - -#if DONT_INCLUDE_DEPRECATED -#else -[] -val any_to_string: 'T -> string - -[] -val output_any: System.IO.TextWriter -> 'T -> unit - -[] -val print_any : 'T -> unit -#endif - -/// 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,'d> -> '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 key objects are indexed using generic comparison -val set : elements:seq<'T> -> Set<'T> - -/// Build an aysnchronous workflow using computation expression syntax -val async : Microsoft.FSharp.Control.AsyncBuilder - -/// Builds a lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. -val dict : keyValuePairs:seq<'K * 'V> -> System.Collections.Generic.IDictionary <'K,'V> - -/// Builds a sequence using sequence expression syntax -val seq : sequence:seq<'T> -> seq<'T> - -#if FX_MINIMAL_REFLECTION // not on Compact Framework -#else -/// Special prefix operator for splicing typed expressions into quotation holes -val (~%) : expression:Microsoft.FSharp.Quotations.Expr<'T> -> 'T - -/// Special prefix operator for splicing untyped expressions into quotation holes -val (~%%) : expression:Microsoft.FSharp.Quotations.Expr -> 'T -#endif - -/// An active pattern to force the execution of values of type Lazy<_> -val (|Lazy|) : input:Lazy<'T> -> 'T - -#if DONT_INCLUDE_DEPRECATED -#else -[] -val Array2 : int - -[] -val Array3 : int - -[] -val IEvent : int -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/list.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/list.fs deleted file mode 100644 index b8d2b5f8..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/list.fs +++ /dev/null @@ -1,459 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Core.LanguagePrimitives - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - open System.Collections.Generic - - [] - [] - module List = - - [] - let length (list: 'a list) = list.Length - - [] - let rev list = Microsoft.FSharp.Primitives.Basics.List.rev list - - [] - let concat list = Microsoft.FSharp.Primitives.Basics.List.concat list - - [] - let map f list = Microsoft.FSharp.Primitives.Basics.List.map f list - - [] - let mapi f list = Microsoft.FSharp.Primitives.Basics.List.mapi f list - - [] - let iter f list = Microsoft.FSharp.Primitives.Basics.List.iter f list - - [] - let of_array (arr:'a array) = Microsoft.FSharp.Primitives.Basics.List.of_array arr - - [] - let to_array (list:'a list) = Microsoft.FSharp.Primitives.Basics.List.to_array list - - [] - let empty<'a> = ([ ] : 'a list) - - [] - let hd list = match list with (x:: _) -> x | [] -> invalidArg "list" "the input list was Empty" - - [] - let tl list = match list with (_ :: t) -> t | [] -> invalidArg "list" "the input list was Empty" - - [] - let isEmpty list = match list with [] -> true | _ -> false - - [] - let append list1 list2 = list1 @ list2 - - [] - let rec nth list index = - match list with - | h::t when index >= 0 -> - if index = 0 then h else nth t (index - 1) - | _ -> - invalidArg "index" "the index was outside the range of elements in the list" - - [] - let rec chooseAllAcc f xs acc = - match xs with - | [] -> rev acc - | h :: t -> - match f h with - | None -> chooseAllAcc f t acc - | Some x -> chooseAllAcc f t (x::acc) - - [] - let choose f xs = chooseAllAcc f xs [] - - [] - let iteri f list = Microsoft.FSharp.Primitives.Basics.List.iteri f list - - [] - let init n f = Microsoft.FSharp.Primitives.Basics.List.init n f - - [] - let rec initConstAcc n x acc = - if n <= 0 then acc else initConstAcc (n-1) x (x::acc) - - [] - let replicate count x = - if count < 0 then invalidArg "count" "the element count must be non-negative" - initConstAcc count x [] - - [] - let iter2 f list1 list2 = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let rec loop list1 list2 = - match list1,list2 with - | [],[] -> () - | (h1::t1), (h2::t2) -> f.Invoke(h1,h2); loop t1 t2 - | _ -> invalidArg "list2" "the lists had different lengths" - loop list1 list2 - - [] - let iteri2 f list1 list2 = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let rec loop n list1 list2 = - match list1,list2 with - | [],[] -> () - | (h1::t1), (h2::t2) -> f.Invoke(n,h1,h2); loop (n+1) t1 t2 - | _ -> invalidArg "list2" "the lists had different lengths" - loop 0 list1 list2 - - [] - let rec map3aux (f:OptimizedClosures.FastFunc3<_,_,_,_>) list1 list2 list3 acc = - match list1,list2,list3 with - | [],[],[] -> rev acc - | (h1::t1), (h2::t2),(h3::t3) -> let x = f.Invoke(h1,h2,h3) in map3aux f t1 t2 t3 (x :: acc) - | _ -> invalidArg "list3" "the lists had different lengths" - - [] - let map3 f list1 list2 list3 = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - map3aux f list1 list2 list3 [] - - [] - let rec mapi2aux n (f:OptimizedClosures.FastFunc3<_,_,_,_>) list1 list2 acc = - match list1,list2 with - | [],[] -> rev acc - | (h1::t1), (h2::t2) -> let x = f.Invoke(n,h1,h2) in mapi2aux (n+1) f t1 t2 (x :: acc) - | _ -> invalidArg "list2" "the lists had different lengths" - - [] - let mapi2 f list1 list2 = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - mapi2aux 0 f list1 list2 [] - - [] - let map2 f list1 list2 = Microsoft.FSharp.Primitives.Basics.List.map2 f list1 list2 - - [] - let fold f s list = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let rec loop s list = - match list with - | [] -> s - | (h::t) -> loop (f.Invoke(s,h)) t - loop s list - - [] - let reduce f list = - match list with - | [] -> invalidArg "list" "the input list was Empty" - | (h::t) -> fold f h t - - [] - let scan f s list = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let rec loop s list acc = - match list with - | [] -> rev acc - | (h::t) -> let s = f.Invoke(s,h) in loop s t (s :: acc) - loop s list [s] - - [] - let fold2 f acc list1 list2 = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let rec loop acc list1 list2 = - match list1,list2 with - | [],[] -> acc - | (h1::t1),(h2::t2) -> loop (f.Invoke(acc,h1,h2)) t1 t2 - | _ -> invalidArg "list2" "the lists had different lengths" - loop acc list1 list2 - - [] - let foldArraySubRight (f:OptimizedClosures.FastFunc2<'a,_,_>) (arr: 'a[]) start fin acc = - let mutable state = acc - for i = fin downto start do - state <- f.Invoke(arr.[i], state) - state - - (* this version doesn't causes stack overflow - it uses a private stack *) - [] - let foldBack f list acc = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - match list with - | [] -> acc - | [h] -> f.Invoke(h,acc) - | [h1;h2] -> f.Invoke(h1,f.Invoke(h2,acc)) - | [h1;h2;h3] -> f.Invoke(h1,f.Invoke(h2,f.Invoke(h3,acc))) - | [h1;h2;h3;h4] -> f.Invoke(h1,f.Invoke(h2,f.Invoke(h3,f.Invoke(h4,acc)))) - | _ -> - // It is faster to allocate and iterate an array than to create all those - // highly nested stacks. It also means we won't get stack overflows here. - let arr = to_array list - let arrn = arr.Length - foldArraySubRight f arr 0 (arrn - 1) acc - - [] - let reduceBack f list = - match list with - | [] -> invalidArg "list" "the input list was Empty" - | _ -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let arr = to_array list - let arrn = arr.Length - foldArraySubRight f arr 0 (arrn - 2) arr.[arrn - 1] - - [] - let scanArraySubRight<'a,'b> (f:OptimizedClosures.FastFunc2<'a,'b,'b>) (arr:_[]) start fin initState = - let mutable state = initState - let mutable res = [state] - for i = fin downto start do - state <- f.Invoke(arr.[i], state); - res <- state :: res - res - - [] - let scanBack f list s = - match list with - | [] -> [s] - | [h] -> - [f h s; s] - | _ -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - // It is faster to allocate and iterate an array than to create all those - // highly nested stacks. It also means we won't get stack overflows here. - let arr = to_array list - let arrn = arr.Length - scanArraySubRight f arr 0 (arrn - 1) s - - [] - let rec foldBack2UsingArrays (f:OptimizedClosures.FastFunc3<_,_,_,_>) list1 list2 acc = - let arr1 = to_array list1 - let arr2 = to_array list2 - let n1 = arr1.Length - let n2 = arr2.Length - if n1 <> n2 then invalidArg "list2" "the input lists had different lengths"; - let mutable res = acc - for i = n1 - 1 downto 0 do - res <- f.Invoke(arr1.[i],arr2.[i],res) - res - - [] - let rec foldBack2 f list1 list2 acc = - match list1,list2 with - | [],[] -> acc - | h1::rest1, k1::rest2 -> - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - match rest1, rest2 with - | [],[] -> f.Invoke(h1,k1,acc) - | [h2],[k2] -> f.Invoke(h1,k1,f.Invoke(h2,k2,acc)) - | [h2;h3],[k2;k3] -> f.Invoke(h1,k1,f.Invoke(h2,k2,f.Invoke(h3,k3,acc))) - | [h2;h3;h4],[k2;k3;k4] -> f.Invoke(h1,k1,f.Invoke(h2,k2,f.Invoke(h3,k3,f.Invoke(h4,k4,acc)))) - | _ -> foldBack2UsingArrays f list1 list2 acc - | _ -> invalidArg "list2" "the input lists had different lengths" - - [] - let rec forall2aux (f:OptimizedClosures.FastFunc2<_,_,_>) list1 list2 = - match list1,list2 with - | [],[] -> true - | (h1::t1),(h2::t2) -> f.Invoke(h1,h2) && forall2aux f t1 t2 - | _ -> invalidArg "list2" "the input lists had different lengths" - - [] - let forall2 f list1 list2 = - match list1,list2 with - | [],[] -> true - | _ -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - forall2aux f list1 list2 - - [] - let forall f list1 = Microsoft.FSharp.Primitives.Basics.List.forall f list1 - - [] - let exists f list1 = Microsoft.FSharp.Primitives.Basics.List.exists f list1 - - [] - let rec exists2aux (f:OptimizedClosures.FastFunc2<_,_,_>) list1 list2 = - match list1,list2 with - | [],[] -> false - | (h1::t1),(h2::t2) ->f.Invoke(h1,h2) || exists2aux f t1 t2 - | _ -> invalidArg "list2" "the input lists had different lengths" - - [] - let rec exists2 f list1 list2 = - match list1,list2 with - | [],[] -> false - | _ -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - exists2aux f list1 list2 - - [] - let rec find f list = match list with [] -> raise (System.Collections.Generic.KeyNotFoundException()) | h::t -> if f h then h else find f t - - [] - let rec tryFind f list = match list with [] -> None | h::t -> if f h then Some h else tryFind f t - - [] - let rec tryPick f list = match list with [] -> None | h::t -> match f h with None -> tryPick f t | r -> r - - [] - let rec pick f list = match list with [] -> raise (System.Collections.Generic.KeyNotFoundException()) | h::t -> match f h with None -> pick f t | Some r -> r - - [] - let filter f x = Microsoft.FSharp.Primitives.Basics.List.filter f x - - [] - let partition p x = Microsoft.FSharp.Primitives.Basics.List.partition p x - - [] - let unzip x = Microsoft.FSharp.Primitives.Basics.List.unzip x - - [] - let unzip3 x = Microsoft.FSharp.Primitives.Basics.List.unzip3 x - - [] - let zip x1 x2 = Microsoft.FSharp.Primitives.Basics.List.zip x1 x2 - - [] - let zip3 x1 x2 x3 = Microsoft.FSharp.Primitives.Basics.List.zip3 x1 x2 x3 - - [] - let sortWith cmp xs = Microsoft.FSharp.Primitives.Basics.List.sortWith cmp xs - - [] - let sortBy f list = sortWith (fun x y -> Operators.compare (f x) (f y)) list - - [] - let sort list = sortWith Operators.compare list - - [] - let of_list list = Seq.of_list list - - [] - let of_seq ie = Seq.to_list ie - - [] - let to_seq ie = Seq.of_list ie - - [] - let findIndex f list = - let rec loop n = function[] -> raise (System.Collections.Generic.KeyNotFoundException()) | h::t -> if f h then n else loop (n+1) t - loop 0 list - - [] - let tryFindIndex f list = - let rec loop n = function[] -> None | h::t -> if f h then Some n else loop (n+1) t - loop 0 list - - [] - let inline sum (list:list<_>) = Seq.sum list - - [] - let inline sumBy f (list:list<_>) = Seq.sumBy f list - - [] - let max (list:list<_>) = Seq.max list - - [] - let maxBy f (list:list<_>) = Seq.maxBy f list - - [] - let min (list:list<_>) = Seq.min list - - [] - let minBy f (list:list<_>) = Seq.minBy f list - - [] - let inline average (list:list<_>) = Seq.average list - - [] - let inline averageBy f (list:list<_>) = Seq.averageBy f list - - [] - let collect f list = Microsoft.FSharp.Primitives.Basics.List.collect f list - - [] - let permute indexMap list = list |> to_array |> Array.permute indexMap |> of_array - - [] - let is_empty xs = isEmpty xs - - [] - let fold_left f z xs = fold f z xs - - [] - let fold_left2 f z xs1 xs2 = fold2 f z xs1 xs2 - - [] - let fold_right f xs z = foldBack f xs z - - [] - let fold_right2 f xs1 xs2 z = foldBack2 f xs1 xs2 z - - [] - let reduce_left f xs = reduce f xs - - [] - let reduce_right f xs = reduceBack f xs - - [] - let scan_left f z xs = scan f z xs - - [] - let scan_right f xs z = scanBack f xs z - - [] - let for_all f xs = forall f xs - - [] - let for_all2 f xs1 xs2 = forall2 f xs1 xs2 - - [] - let first f xs = tryPick f xs - - [] - let find_index f xs = findIndex f xs - - [] - let tryfind f xs = tryFind f xs - - [] - let tryfind_index f xs = tryFindIndex f xs - - [] - let sort_by f xs = sortBy f xs - - [] - let inline sum_by f xs = sumBy f xs - - [] - let inline average_by f xs = averageBy f xs - - [] - let min_by f xs = minBy f xs - - [] - let max_by f xs = maxBy f xs - - [] - let map_concat f xs = collect f xs - - [] - let stable_sort f xs = sortWith f xs - - [] - let split x = unzip x - - [] - let combine x1 x2 = zip x1 x2 - - [] - let find_all f x = filter f x - - [] - let flatten (list:seq>) = concat list - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/list.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/list.fsi deleted file mode 100644 index 4058e14b..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/list.fsi +++ /dev/null @@ -1,372 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - /// Basic operations on lists. - [] - [] - module List = - - /// Return a new list that contains the elements of the first list - /// followed by elements of the second - val append: list1:'T list -> list2:'T list -> 'T list - - /// Return the average of the elements in the list. - /// If the list is empty an ArgumentException is thrown. - val inline average : list:^T list -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member DivideByInt : ^T*int -> ^T) - and ^T : (static member Zero : ^T) - - /// Return the average of the elements generated by applying the function to each element of the list. - /// If the list is empty an ArgumentException is thrown. - val inline averageBy : projection:('T -> ^U) -> list:'T list -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U*int -> ^U) - and ^U : (static member Zero : ^U) - - /// Apply the given function to each element of the list. Return - /// the list comprised of the results x for each element where - /// the function returns Some(x) - val choose: chooser:('T -> 'U option) -> list:'T list -> 'U list - - /// For each element of the list, apply the given function. Concatenate all the results and return the combined list. - val collect: mapping:('T -> 'U list) -> list:'T list -> 'U list - - /// Return a new list that contains the elements of each the lists in order - val concat: lists:seq<'T list> -> 'T list - - /// Return an empty list of the given type - [] - val empty<'T> : 'T list - - /// Test if any element of the list satisfies the given predicate. - /// - /// The predicate is applied to the elements of the input list. If any application - /// returns true then the overall result is true and no further elements are tested. - /// Otherwise, false is returned. - val exists: predicate:('T -> bool) -> list:'T list -> bool - - /// Test if any pair of corresponding elements of the lists satisfies the given predicate. - /// - /// The predicate is applied to matching elements in the two collections up to the lesser of the - /// two lengths of the collections. If any application returns true then the overall result is - /// true and no further elements are tested. Otherwise, if one collections is longer - /// than the other then the ArgumentException exception is raised. - /// Otherwise, false is returned. - val exists2: predicate:('T1 -> 'T2 -> bool) -> list1:'T1 list -> list2:'T2 list -> bool - - /// Return the first element for which the given function returns true. - /// Raise KeyNotFoundException if no such element exists. - val find: predicate:('T -> bool) -> list:'T list -> 'T - - /// Return the index of the first element in the list - /// that satisfies the given predicate. - /// Raise KeyNotFoundException if no such element exists. - val findIndex: predicate:('T -> bool) -> list:'T list -> int - - /// Return a new collection containing only the elements of the collection - /// for which the given predicate returns "true" - val filter: predicate:('T -> bool) -> list:'T list -> 'T list - - /// Apply a function to each element of the collection, threading an accumulator argument - /// through the computation. Take the second argument, and apply the function to it - /// and the first element of the list. Then feed this result into the function along - /// with the second element and so on. Return the final result. - /// If the input function is f and the elements are i0...iN then - /// computes f (... (f s i0) i1 ...) iN - val fold: folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State - - /// Apply a function to corresponding elements of two collections, threading an accumulator argument - /// through the computation. The collections must have identical sizes. - /// If the input function is f and the elements are i0...iN and j0...jN - /// then computes f (... (f s i0 j0)...) iN jN. - val fold2: folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> list1:'T1 list -> list2:'T2 list -> 'State - - /// Apply 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 i0 (...(f iN s)). - val foldBack: folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State - - /// Apply a function to corresponding elements of two collections, threading an accumulator argument - /// through the computation. The collections must have identical sizes. - /// If the input function is f and the elements are i0...iN and j0...jN - /// then computes f i0 j0 (...(f iN jN s)). - val foldBack2: folder:('T1 -> 'T2 -> 'State -> 'State) -> list1:'T1 list -> list2:'T2 list -> state:'State -> 'State - - /// Test if all elements of the collection satisfy the given predicate. - /// - /// The predicate is applied to the elements of the input list. If any application - /// returns false then the overall result is false and no further elements are tested. - /// Otherwise, true is returned. - val forall: predicate:('T -> bool) -> list:'T list -> bool - - /// Test if all corresponding elements of the collection satisfy the given predicate pairwise. - /// - /// The predicate is applied to matching elements in the two collections up to the lesser of the - /// two lengths of the collections. If any application returns false then the overall result is - /// false and no further elements are tested. Otherwise, if one collection is longer - /// than the other then the ArgumentException exception is raised. - /// Otherwise, true is returned. - val forall2: predicate:('T1 -> 'T2 -> bool) -> list1:'T1 list -> list2:'T2 list -> bool - - /// Return the first element of the list. Raise (Invalid_argument "hd") if undefined. - val hd: list:'T list -> 'T - - /// Create a list by calling the given generator on each index - val init: length:int -> initializer:(int -> 'T) -> 'T list - - /// Return true if the list contains no elements, false otherwise - val isEmpty: list:'T list -> bool - - /// Apply the given function to each element of the collection. - val iter: action:('T -> unit) -> list:'T list -> unit - - /// Apply the given function to two collections simultaneously. The - /// collections must have identical size. - val iter2: action:('T1 -> 'T2 -> unit) -> list1:'T1 list -> list2:'T2 list -> unit - - /// Apply the given function to each element of the collection. The integer passed to the - /// function indicates the index of element. - val iteri: action:(int -> 'T -> unit) -> list:'T list -> unit - - /// Apply the given function to two collections simultaneously. The - /// collections must have identical size. The integer passed to the - /// function indicates the index of element. - val iteri2: action:(int -> 'T1 -> 'T2 -> unit) -> list1:'T1 list -> list2:'T2 list -> unit - - /// Return the length of the list - val length: list:'T list -> int - - /// Build a new collection whose elements are the results of applying the given function - /// to each of the elements of the collection. - val map: mapping:('T -> 'U) -> list:'T list -> 'U list - - /// Build a new collection whose elements are the results of applying the given function - /// to the corresponding elements of the two collections pairwise. - val map2: mapping:('T1 -> 'T2 -> 'U) -> list1:'T1 list -> list2:'T2 list -> 'U list - - /// Build a new collection whose elements are the results of applying the given function - /// to the corresponding elements of the three collections simultaneously. - val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> list1:'T1 list -> list2:'T2 list -> list3:'T3 list -> 'U list - - /// Build a new collection whose elements are the results of applying the given function - /// to each of the elements of the collection. The integer index passed to the - /// function indicates the index (from 0) of element being transformed. - val mapi: mapping:(int -> 'T -> 'U) -> list:'T list -> 'U list - - /// Like mapi, but mapping corresponding elements from two lists of equal length. - val mapi2: mapping:(int -> 'T1 -> 'T2 -> 'U) -> list1:'T1 list -> list2:'T2 list -> 'U list - - /// Return the greatest of all elements of the list, compared via Operators.max - val max : list:'T list -> 'T - - /// Return the greatest of all elements of the array, compared via Operators.max on the function result - val maxBy : projection:('T -> 'U) -> list:'T list -> 'T - - /// Return the lowest of all elements of the list, compared via Operators.min - val min : list:'T list -> 'T - - /// Return the lowest of all elements of the array, compared via Operators.min on the function result - val minBy : projection:('T -> 'U) -> list:'T list -> 'T - - /// Index into the list. The first element has index 0. - val nth: list:'T list -> index:int -> 'T - - /// Build a collection from the given array - val of_array : array:'T array -> 'T list - - /// Build a new collection from the given enumerable object - val of_seq: elements:seq<'T> -> 'T list - - /// Split the collection into two collections, containing the - /// elements for which the given predicate returns true and false - /// respectively - val partition: predicate:('T -> bool) -> list:'T list -> ('T list * 'T list) - - /// Apply the given function to successive elements, returning the first - /// result where function returns Some(x) for some x. If no such - /// element exists then raise System.Collections.Generic.KeyNotFoundException - val pick: chooser:('T -> 'U option) -> list:'T list -> 'U - - /// Returns a list with all elements permuted according to the - /// specified permutation - val permute : indexMap:(int -> int) -> list:'T list -> 'T list - - /// Apply a function to each element of the collection, threading an accumulator argument - /// through the computation. Apply the function to the first two elements of the list. - /// Then feed this result into the function along with the third element and so on. - /// Return the final result. If the input function is f and the elements are i0...iN then computes - /// f (... (f i0 i1) i2 ...) iN. - /// Raises ArgumentException if the list has no elements. - val reduce: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T - - /// Apply 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 i0 (...(f iN-1 iN)). - /// Raises ArgumentException if the list has no elements. - val reduceBack: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T - - /// Create a list by calling the given generator on each index - val replicate: count:int -> initial:'T -> 'T list - - /// Return a new list with the elements in reverse order - val rev: list:'T list -> 'T list - - /// Apply a function to each element of the collection, threading an accumulator argument - /// through the computation. Take the second argument, and apply the function to it - /// and the first element of the list. Then feed this result into the function along - /// with the second element and so on. Return the list of intermediate results and the final result. - val scan : folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State list - - /// Like foldBack, but return both the intermediary and final results - val scanBack : folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State list - - /// Sort the given list using the given comparison function - val sortWith: comparer:('T -> 'T -> int) -> list:'T list -> 'T list - - /// Sort the given list using keys given by the given projection. Keys are compared using Operators.compare. - val sortBy: projection:('T -> 'U) -> list:'T list -> 'T list - - /// Sort the given list using the given comparison function - val sort: list:'T list -> 'T list - - /// Return the sum of the elements in the list - val inline sum : list:^T list -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member Zero : ^T) - - /// Return the sum of the results generated by applying the function to each element of the list. - val inline sumBy : projection:('T -> ^U) -> list:'T list -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - /// Return the tail of the list. Raise (Invalid_argument "tl") if undefined. - val tl: list:'T list -> 'T list - - /// Build an array from the given collection - val to_array: list:'T list -> 'T array - - /// Build a new collection from the given enumerable object - val to_seq: list:list<'T> -> seq<'T> - - /// Apply the given function to successive elements, returning Some(x) the first - /// result where function returns Some(x) for some x. If no such element - /// exists then return None - val tryPick: chooser:('T -> 'U option) -> list:'T list -> 'U option - - /// Return the first element for which the given function returns true. - /// Return None if no such element exists. - val tryFind: predicate:('T -> bool) -> list:'T list -> 'T option - - /// Return the index of the first element in the list - /// that satisfies the given predicate. - /// Return None if no such element exists. - val tryFindIndex: predicate:('T -> bool) -> list:'T list -> int option - - /// Split a list of pairs into two lists - val unzip: list:('T1 * 'T2) list -> ('T1 list * 'T2 list) - - /// Split a list of triples into three lists - val unzip3: list:('T1 * 'T2 * 'T3) list -> ('T1 list * 'T2 list * 'T3 list) - - /// Combine the two lists into a list of pairs. The two lists must have equal lengths. - val zip: list1:'T1 list -> list2:'T2 list -> ('T1 * 'T2) list - - /// Combine the three lists into a list of triples. The lists must have equal lengths. - val zip3: list1:'T1 list -> list2:'T2 list -> list3:'T3 list -> ('T1 * 'T2 * 'T3) list - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val inline average_by : projection:('T -> ^U) -> list:'T list -> ^U when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U*int -> ^U) - and ^U : (static member Zero : ^U) - - [] - val map_concat: mapping:('T -> 'U list) -> list:'T list -> 'U list - - [] - val flatten: lists:seq<'T list> -> 'T list - - [] - val find_index: predicate:('T -> bool) -> list:'T list -> int - - [] - val find_all: predicate:('T -> bool) -> list:'T list -> 'T list - - [] - val fold_left: folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State - - [] - val fold_left2: folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> list1:'T1 list -> list2:'T2 list -> 'State - - [] - val fold_right: folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State - - [] - val fold_right2: folder:('T1 -> 'T2 -> 'State -> 'State) -> list1:'T1 list -> list2:'T2 list -> state:'State -> 'State - - [] - val for_all: predicate:('T -> bool) -> list:'T list -> bool - - [] - val for_all2: predicate:('T1 -> 'T2 -> bool) -> list1:'T1 list -> list2:'T2 list -> bool - - [] - val is_empty: list:'T list -> bool - - [] - val max_by : projection:('T -> 'U) -> list:'T list -> 'T - - [] - val min_by : projection:('T -> 'U) -> list:'T list -> 'T - - [] - val reduce_left: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T - - [] - val reduce_right: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T - - [] - val scan_left : folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State list - - [] - val scan_right : folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State list - - [] - val sort_by: projection:('T -> 'U) -> list:'T list -> 'T list - - [] - val stable_sort: list: ('T -> 'T -> int) -> 'T list -> 'T list - - [] - val inline sum_by : projection:('T -> ^U) -> list:'T list -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - [] - val first: chooser:('T -> 'U option) -> list:'T list -> 'U option - - [] - val tryfind: predicate:('T -> bool) -> list:'T list -> 'T option - - [] - val tryfind_index: predicate:('T -> bool) -> list:'T list -> int option - - [] - val split: list:('T1 * 'T2) list -> ('T1 list * 'T2 list) - - [] - val combine: list1:'T1 list -> list2:'T2 list -> ('T1 * 'T2) list - -#endif - - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/local.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/local.fs deleted file mode 100644 index 11ace054..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/local.fs +++ /dev/null @@ -1,483 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Primitives.Basics - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Core.Operators -open System.Diagnostics.CodeAnalysis -open System.Collections.Generic -open System.Runtime.InteropServices - - -module internal List = - - let arrayZeroCreate (n:int) = (# "newarr !0" type ('a) n : 'a array #) - - [] - let nonempty x = match x with [] -> false | _ -> true - - let rec iter f x = match x with [] -> () | (h::t) -> f h; iter f t - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let inline setFreshConsTail cons t = cons.(::).1 <- t - let inline freshConsNoTail h = h :: (# "ldnull" : 'a list #) - - - let rec mapToFreshConsTail cons f x = - match x with - | [] -> - setFreshConsTail cons []; - | (h::t) -> - let cons2 = freshConsNoTail (f h) - setFreshConsTail cons cons2; - mapToFreshConsTail cons2 f t - - let map f x = - match x with - | [] -> [] - | [h] -> [f h] - | (h::t) -> - let cons = freshConsNoTail (f h) - mapToFreshConsTail cons f t - cons - - let rec mapiToFreshConsTail cons (f:OptimizedClosures.FastFunc2<_,_,_>) x i = - match x with - | [] -> - setFreshConsTail cons []; - | (h::t) -> - let cons2 = freshConsNoTail (f.Invoke(i,h)) - setFreshConsTail cons cons2; - mapiToFreshConsTail cons2 f t (i+1) - - let mapi f x = - match x with - | [] -> [] - | [h] -> [f 0 h] - | (h::t) -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let cons = freshConsNoTail (f.Invoke(0,h)) - mapiToFreshConsTail cons f t 1 - cons - - let rec map2ToFreshConsTail cons (f:OptimizedClosures.FastFunc2<_,_,_>) xs1 xs2 = - match xs1,xs2 with - | [],[] -> - setFreshConsTail cons []; - | (h1::t1),(h2::t2) -> - let cons2 = freshConsNoTail (f.Invoke(h1,h2)) - setFreshConsTail cons cons2; - map2ToFreshConsTail cons2 f t1 t2 - | _ -> invalidArg "xs2" "the lists had different lengths" - - let map2 f xs1 xs2 = - match xs1,xs2 with - | [],[] -> [] - | (h1::t1),(h2::t2) -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let cons = freshConsNoTail (f.Invoke(h1,h2)) - map2ToFreshConsTail cons f t1 t2 - cons - | _ -> invalidArg "xs2" "the lists had different lengths" - - let rec forall f xs1 = - match xs1 with - | [] -> true - | (h1::t1) -> f h1 && forall f t1 - - let rec exists f xs1 = - match xs1 with - | [] -> false - | (h1::t1) -> f h1 || exists f t1 - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec revAcc xs acc = - match xs with - | [] -> acc - | h::t -> revAcc t (h::acc) - - let rev xs = - match xs with - | [] -> xs - | [h] -> xs - | h1::h2::t -> revAcc t [h2;h1] - - // return the last cons it the chain - let rec appendToFreshConsTail cons xs = - match xs with - | [] -> - setFreshConsTail cons [] - cons - | h::t -> - let cons2 = freshConsNoTail h - setFreshConsTail cons cons2 - appendToFreshConsTail cons2 t - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec collectToFreshConsTail (f:'a -> 'b list) (list:'a list) cons = - match list with - | [] -> - setFreshConsTail cons [] - | h::t -> - collectToFreshConsTail f t (appendToFreshConsTail cons (f h)) - - let rec collect (f:'a -> 'b list) (list:'a list) = - match list with - | [] -> [] - | [h] -> f h - | _ -> - let cons = freshConsNoTail (Unchecked.defaultof<'b>) - collectToFreshConsTail f list cons - cons.Tail - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec filterToFreshConsTail cons f l = - match l with - | [] -> - setFreshConsTail cons []; - | h::t -> - if f h then - let cons2 = freshConsNoTail h - setFreshConsTail cons cons2; - filterToFreshConsTail cons2 f t - else - filterToFreshConsTail cons f t - - let rec filter f l = - match l with - | [] -> [] - | [h] -> if f h then l else [] - | h::t -> - if f h then - let cons = freshConsNoTail h - filterToFreshConsTail cons f t; - cons - else - filter f t - - let iteri f x = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let rec loop n x = match x with [] -> () | (h::t) -> f.Invoke(n,h); loop (n+1) t - loop 0 x - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec concatToFreshConsTail cons h1 l = - match l with - | [] -> setFreshConsTail cons h1 - | h2::t -> concatToFreshConsTail (appendToFreshConsTail cons h1) h2 t - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec concatToEmpty l = - match l with - | [] -> [] - | []::t -> concatToEmpty t - | (h::t1)::tt2 -> - let res = freshConsNoTail h - concatToFreshConsTail res t1 tt2; - res - - let seqToList (e : IEnumerable<'T>) = - match e with - | :? list<'T> as l -> l - | _ -> - use ie = e.GetEnumerator() - let mutable res = [] - while ie.MoveNext() do - res <- ie.Current :: res - rev res - - let concat (l : seq<_>) = - match seqToList l with - | [] -> [] - | [h] -> h - | [h1;h2] -> h1 @ h2 - | l -> concatToEmpty l - - let rec initToFreshConsTail cons i n f = - if i < n then - let cons2 = freshConsNoTail (f i) - setFreshConsTail cons cons2; - initToFreshConsTail cons2 (i+1) n f - else - setFreshConsTail cons [] - - - let init n f = - if n < 0 then invalidArg "n" "the length may not be negative" - if n = 0 then [] - else - let res = freshConsNoTail (f 0) - initToFreshConsTail res 1 n f - res - - - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec partitionToFreshConsTails consL consR p l = - match l with - | [] -> - setFreshConsTail consL []; - setFreshConsTail consR []; - - | h::t -> - let cons' = freshConsNoTail h - if p h then - setFreshConsTail consL cons'; - partitionToFreshConsTails cons' consR p t - else - setFreshConsTail consR cons'; - partitionToFreshConsTails consL cons' p t - - let rec partitionToFreshConsTailLeft consL p l = - match l with - | [] -> - setFreshConsTail consL []; - [] - | h::t -> - let cons' = freshConsNoTail h - if p h then - setFreshConsTail consL cons'; - partitionToFreshConsTailLeft cons' p t - else - partitionToFreshConsTails consL cons' p t; - cons' - - let rec partitionToFreshConsTailRight consR p l = - match l with - | [] -> - setFreshConsTail consR []; - [] - | h::t -> - let cons' = freshConsNoTail h - if p h then - partitionToFreshConsTails cons' consR p t; - cons' - else - setFreshConsTail consR cons'; - partitionToFreshConsTailRight cons' p t - - let partition p l = - match l with - | [] -> [],[] - | [h] -> if p h then l,[] else [],l - | h::t -> - let cons = freshConsNoTail h - if p h - then cons, (partitionToFreshConsTailLeft cons p t) - else (partitionToFreshConsTailRight cons p t), cons - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec unzipToFreshConsTail cons1a cons1b x = - match x with - | [] -> - setFreshConsTail cons1a [] - setFreshConsTail cons1b [] - | ((h1,h2)::t) -> - let cons2a = freshConsNoTail h1 - let cons2b = freshConsNoTail h2 - setFreshConsTail cons1a cons2a; - setFreshConsTail cons1b cons2b; - unzipToFreshConsTail cons2a cons2b t - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let unzip x = - match x with - | [] -> - [],[] - | ((h1,h2)::t) -> - let res1a = freshConsNoTail h1 - let res1b = freshConsNoTail h2 - unzipToFreshConsTail res1a res1b t; - res1a,res1b - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec unzip3ToFreshConsTail cons1a cons1b cons1c x = - match x with - | [] -> - setFreshConsTail cons1a []; - setFreshConsTail cons1b []; - setFreshConsTail cons1c []; - | ((h1,h2,h3)::t) -> - let cons2a = freshConsNoTail h1 - let cons2b = freshConsNoTail h2 - let cons2c = freshConsNoTail h3 - setFreshConsTail cons1a cons2a; - setFreshConsTail cons1b cons2b; - setFreshConsTail cons1c cons2c; - unzip3ToFreshConsTail cons2a cons2b cons2c t - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let unzip3 x = - match x with - | [] -> - [],[],[] - | ((h1,h2,h3)::t) -> - let res1a = freshConsNoTail h1 - let res1b = freshConsNoTail h2 - let res1c = freshConsNoTail h3 - unzip3ToFreshConsTail res1a res1b res1c t; - res1a,res1b,res1c - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec zipToFreshConsTail cons xs1 xs2 = - match xs1,xs2 with - | [],[] -> - setFreshConsTail cons [] - | (h1::t1),(h2::t2) -> - let cons2 = freshConsNoTail (h1,h2) - setFreshConsTail cons cons2; - zipToFreshConsTail cons2 t1 t2 - | _ -> - invalidArg "xs2" "the input lists had different lengths" - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let zip xs1 xs2 = - match xs1,xs2 with - | [],[] -> [] - | (h1::t1),(h2::t2) -> - let res = freshConsNoTail (h1,h2) - zipToFreshConsTail res t1 t2; - res - | _ -> - invalidArg "xs2" "the input lists had different lengths" - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec zip3ToFreshConsTail cons xs1 xs2 xs3 = - match xs1,xs2,xs3 with - | [],[],[] -> - setFreshConsTail cons []; - | (h1::t1),(h2::t2),(h3::t3) -> - let cons2 = freshConsNoTail (h1,h2,h3) - setFreshConsTail cons cons2; - zip3ToFreshConsTail cons2 t1 t2 t3 - | _ -> - invalidArg "xs1" "the input lists had different lengths" - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let zip3 xs1 xs2 xs3 = - match xs1,xs2,xs3 with - | [],[],[] -> - [] - | (h1::t1),(h2::t2),(h3::t3) -> - let res = freshConsNoTail (h1,h2,h3) - zip3ToFreshConsTail res t1 t2 t3; - res - | _ -> - invalidArg "xs1" "the input lists had different lengths" - - let to_array (l:'a list) = - let len = l.Length - let res = (arrayZeroCreate len : 'a array) - let mutable lref = l - for i = 0 to len - 1 do - res.[i] <- lref.(::).0; - lref <- lref.(::).1 - res - - let of_array (arr:'a array) = - let len = arr.Length - let mutable res = ([]: 'a list) - for i = len - 1 downto 0 do - res <- arr.[i] :: res - res - - module StableSortImplementation = - // Internal copy of stable sort - let rec revAppend xs1 xs2 = - match xs1 with - | [] -> xs2 - | h::t -> revAppend t (h::xs2) - let half x = x >>> 1 - - let rec merge cmp a b acc = - match a,b with - | [], a | a,[] -> revAppend acc a - | x::a', y::b' -> if cmp x y > 0 then merge cmp a b' (y::acc) else merge cmp a' b (x::acc) - - let sort2 cmp x y = - if cmp x y > 0 then [y;x] else [x;y] - - let sort3 cmp x y z = - let cxy = cmp x y - let cyz = cmp y z - if cxy > 0 && cyz < 0 then - if cmp x z > 0 then [y;z;x] else [y;x;z] - elif cxy < 0 && cyz > 0 then - if cmp x z > 0 then [z;x;y] else [x;z;y] - elif cxy > 0 then - if cyz > 0 then [z;y;x] - else [y;z;x] - else - if cyz > 0 then [z;x;y] - else [x;y;z] - - let trivial a = match a with [] | [_] -> true | _ -> false - - (* tail recursive using a ref *) - - let rec stableSortInner cmp la ar = - if la < 4 then (* sort two || three new entries *) - match !ar with - | x::y::b -> - if la = 2 then ( ar := b; sort2 cmp x y ) - else begin - match b with - | z::c -> ( ar := c; sort3 cmp x y z ) - | _ -> failwith "never" - end - | _ -> failwith "never" - else (* divide *) - let lb = half la - let sb = stableSortInner cmp lb ar - let sc = stableSortInner cmp (la - lb) ar - merge cmp sb sc [] - - let stableSort cmp (a: 'a list) = - if trivial a then a else - let ar = ref a - stableSortInner cmp a.Length ar - - let sortWith cmp a = StableSortImplementation.stableSort cmp a - -module internal Array = - - let inline zeroCreate (n:int) = (# "newarr !0" type ('a) n : 'a array #) - - let init (n:int) (f: int -> 'a) = - let arr = (zeroCreate n : 'a array) - for i = 0 to n - 1 do - arr.[i] <- f i - arr - - let permute indexMap (arr : _[]) = - let res = zeroCreate arr.Length - let inv = zeroCreate arr.Length - for i = 0 to arr.Length - 1 do - let j = indexMap i - if j < 0 or j >= arr.Length then invalidArg "indexMap" "the function did not compute a permutation" - res.[j] <- arr.[i] - inv.[j] <- 1uy - for i = 0 to arr.Length - 1 do - if inv.[i] <> 1uy then invalidArg "indexMap" "the function did not compute a permutation" - res - - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/local.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/local.fsi deleted file mode 100644 index ba2817e3..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/local.fsi +++ /dev/null @@ -1,38 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// Definitions internal for this library. -namespace Microsoft.FSharp.Primitives.Basics - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections - -module internal List = - val init : int -> (int -> 'a) -> 'a list - val iter : ('a -> unit) -> 'a list -> unit - val filter : predicate:('a -> bool) -> 'a list -> 'a list - val collect : ('a -> 'b list) -> 'a list -> 'b list - val partition : predicate:('a -> bool) -> 'a list -> 'a list * 'a list - val map : mapping:('a -> 'b) -> 'a list -> 'b list - val map2 : mapping:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list - val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list - val forall : predicate:('a -> bool) -> 'a list -> bool - val exists : predicate:('a -> bool) -> 'a list -> bool - val rev: 'a list -> 'a list - val concat : seq<'a list> -> 'a list - val iteri : action:(int -> 'a -> unit) -> 'a list -> unit - val unzip : ('a * 'b) list -> 'a list * 'b list - val unzip3 : ('a * 'b * 'c) list -> 'a list * 'b list * 'c list - val zip : 'a list -> 'b list -> ('a * 'b) list - val zip3 : 'a list -> 'b list -> 'c list -> ('a * 'b * 'c) list - val of_array : 'a[] -> 'a list - val to_array : 'a list -> 'a[] - val sortWith : ('a -> 'a -> int) -> 'a list -> 'a list - -module internal Array = - val inline zeroCreate : int -> 'a[] - val init : int -> (int -> 'a) -> 'a[] - val permute : indexMap:(int -> int) -> 'a[] -> 'a[] - - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/map.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/map.fs deleted file mode 100644 index d74136af..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/map.fs +++ /dev/null @@ -1,626 +0,0 @@ -// (c) Microsoft Corporation 2005-2008. - -#light - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - - [] - type MapTree<'Key,'Value> = - | MapEmpty - | MapOne of 'Key * 'Value - | MapNode of 'Key * 'Value * MapTree<'Key,'Value> * MapTree<'Key,'Value> * int - // REVIEW: performance rumour has it that the data held in MapNode and MapOne should be - // exactly one cache line. It is currently ~7 and 4 words respectively. - - [] - module MapTree = - - let empty = MapEmpty - - let height = function - | MapEmpty -> 0 - | MapOne _ -> 1 - | MapNode(_,_,_,_,h) -> h - - let is_empty m = - match m with - | MapEmpty -> true - | _ -> false - - let mk l k v r = - match l,r with - | MapEmpty,MapEmpty -> MapOne(k,v) - | _ -> - let hl = height l - let hr = height r - let m = if hl < hr then hr else hl - MapNode(k,v,l,r,m+1) - - let rebalance t1 k v t2 = - let t1h = height t1 - let t2h = height t2 - if t2h > t1h + 2 then (* right is heavier than left *) - match t2 with - | MapNode(t2k,t2v,t2l,t2r,t2h) -> - (* one of the nodes must have height > height t1 + 1 *) - if height t2l > t1h + 1 then (* balance left: combination *) - match t2l with - | MapNode(t2lk,t2lv,t2ll,t2lr,t2lh) -> - mk (mk t1 k v t2ll) t2lk t2lv (mk t2lr t2k t2v t2r) - | _ -> failwith "rebalance" - else (* rotate left *) - mk (mk t1 k v t2l) t2k t2v t2r - | _ -> failwith "rebalance" - else - if t1h > t2h + 2 then (* left is heavier than right *) - match t1 with - | MapNode(t1k,t1v,t1l,t1r,t1h) -> - (* one of the nodes must have height > height t2 + 1 *) - if height t1r > t2h + 1 then - (* balance right: combination *) - match t1r with - | MapNode(t1rk,t1rv,t1rl,t1rr,t1rh) -> - mk (mk t1l t1k t1v t1rl) t1rk t1rv (mk t1rr k v t2) - | _ -> failwith "rebalance" - else - mk t1l t1k t1v (mk t1r k v t2) - | _ -> failwith "rebalance" - else mk t1 k v t2 - - let rec sizeAux acc m = - match m with - | MapEmpty -> acc - | MapOne _ -> acc + 1 - | MapNode(k2,v2,l,r,h) -> sizeAux (sizeAux (acc+1) l) r - - let size x = sizeAux 0 x - - let rec add (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) k v m = - match m with - | MapEmpty -> MapOne(k,v) - | MapOne(k2,v2) -> - let c = comparer.Invoke(k,k2) - if c < 0 then MapNode (k,v,MapEmpty,m,2) - elif c = 0 then MapOne(k,v) - else MapNode (k,v,m,MapEmpty,2) - | MapNode(k2,v2,l,r,h) -> - let c = comparer.Invoke(k,k2) - if c < 0 then rebalance (add comparer k v l) k2 v2 r - elif c = 0 then MapNode(k,v,l,r,h) - else rebalance l k2 v2 (add comparer k v r) - - let rec find (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) k m = - match m with - | MapEmpty -> raise (System.Collections.Generic.KeyNotFoundException()) - | MapOne(k2,v2) -> - let c = comparer.Invoke(k,k2) - if c = 0 then v2 - else raise (System.Collections.Generic.KeyNotFoundException()) - | MapNode(k2,v2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then find comparer k l - elif c = 0 then v2 - else find comparer k r - - let rec tryfind (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) k m = - match m with - | MapEmpty -> None - | MapOne(k2,v2) -> - let c = comparer.Invoke(k,k2) - if c = 0 then Some v2 - else None - | MapNode(k2,v2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then tryfind comparer k l - elif c = 0 then Some v2 - else tryfind comparer k r - - let partition1 (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f k v (acc1,acc2) = - if f k v then (add comparer k v acc1,acc2) else (acc1,add comparer k v acc2) - - let rec partitionAux (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f s acc = - match s with - | MapEmpty -> acc - | MapOne(k,v) -> partition1 comparer f k v acc - | MapNode(k,v,l,r,_) -> - let acc = partitionAux comparer f r acc - let acc = partition1 comparer f k v acc - partitionAux comparer f l acc - - let partition (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f s = partitionAux comparer f s (empty,empty) - - let filter1 (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f k v acc = if f k v then add comparer k v acc else acc - - let rec filterAux (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f s acc = - match s with - | MapEmpty -> acc - | MapOne(k,v) -> filter1 comparer f k v acc - | MapNode(k,v,l,r,_) -> - let acc = filterAux comparer f l acc - let acc = filter1 comparer f k v acc - filterAux comparer f r acc - - let filter (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f s = filterAux comparer f s empty - - let rec spliceOutSuccessor m = - match m with - | MapEmpty -> failwith "internal error: Map.splice_out_succ_or_pred" - | MapOne(k2,v2) -> k2,v2,MapEmpty - | MapNode(k2,v2,l,r,_) -> - match l with - | MapEmpty -> k2,v2,r - | _ -> let k3,v3,l' = spliceOutSuccessor l in k3,v3,mk l' k2 v2 r - - let rec remove (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) k m = - match m with - | MapEmpty -> empty - | MapOne(k2,v2) -> - let c = comparer.Invoke(k,k2) - if c = 0 then MapEmpty else m - | MapNode(k2,v2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then rebalance (remove comparer k l) k2 v2 r - elif c = 0 then - match l,r with - | MapEmpty,_ -> r - | _,MapEmpty -> l - | _ -> - let sk,sv,r' = spliceOutSuccessor r - mk l sk sv r' - else rebalance l k2 v2 (remove comparer k r) - - let rec mem (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) k m = - match m with - | MapEmpty -> false - | MapOne(k2,v2) -> (comparer.Invoke(k,k2) = 0) - | MapNode(k2,v2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then mem comparer k l - else (c = 0 || mem comparer k r) - - let rec iter f m = - match m with - | MapEmpty -> () - | MapOne(k2,v2) -> f k2 v2 - | MapNode(k2,v2,l,r,_) -> iter f l; f k2 v2; iter f r - - let rec tryPick f m = - match m with - | MapEmpty -> None - | MapOne(k2,v2) -> f k2 v2 - | MapNode(k2,v2,l,r,_) -> - match tryPick f l with - | Some x as res -> res - | None -> - match f k2 v2 with - | Some x as res -> res - | None -> - tryPick f r - - let rec exists f m = - match m with - | MapEmpty -> false - | MapOne(k2,v2) -> f k2 v2 - | MapNode(k2,v2,l,r,_) -> exists f l || f k2 v2 || exists f r - - let rec for_all f m = - match m with - | MapEmpty -> true - | MapOne(k2,v2) -> f k2 v2 - | MapNode(k2,v2,l,r,_) -> for_all f l && f k2 v2 && for_all f r - - let rec map f m = - match m with - | MapEmpty -> empty - | MapOne(k,v) -> MapOne(k,f v) - | MapNode(k,v,l,r,h) -> - let l2 = map f l - let v2 = f v - let r2 = map f r - MapNode(k,v2,l2, r2,h) - - let rec mapi f m = - match m with - | MapEmpty -> empty - | MapOne(k,v) -> MapOne(k,f k v) - | MapNode(k,v,l,r,h) -> - let l2 = mapi f l - let v2 = f k v - let r2 = mapi f r - MapNode(k,v2, l2, r2,h) - - let rec foldBack (f:OptimizedClosures.FastFunc3<_,_,_,_>) m x = - match m with - | MapEmpty -> x - | MapOne(k,v) -> f.Invoke(k,v,x) - | MapNode(k,v,l,r,h) -> - let x = foldBack f r x - let x = f.Invoke(k,v,x) - foldBack f l x - - let rec fold (f:OptimizedClosures.FastFunc3<_,_,_,_>) x m = - match m with - | MapEmpty -> x - | MapOne(k,v) -> f.Invoke(x,k,v) - | MapNode(k,v,l,r,h) -> - let x = fold f x l - let x = f.Invoke(x,k,v) - fold f x r - - let foldSection (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) lo hi f m x = - let rec fold_from_to f m x = - match m with - | MapEmpty -> x - | MapOne(k,v) -> - let clo_k = comparer.Invoke(lo,k) - let ck_hi = comparer.Invoke(k,hi) - let x = if clo_k <= 0 && ck_hi <= 0 then f k v x else x - x - | MapNode(k,v,l,r,h) -> - let clo_k = comparer.Invoke(lo,k) - let ck_hi = comparer.Invoke(k,hi) - let x = if clo_k < 0 then fold_from_to f l x else x - let x = if clo_k <= 0 && ck_hi <= 0 then f k v x else x - let x = if ck_hi < 0 then fold_from_to f r x else x - x - - if comparer.Invoke(lo,hi) = 1 then x else fold_from_to f m x - - - let to_list m = - let rec loop m acc = - match m with - | MapEmpty -> acc - | MapOne(k,v) -> (k,v)::acc - | MapNode(k,v,l,r,h) -> loop l ((k,v)::loop r acc) - loop m [] - let to_array m = m |> to_list |> Array.of_list - let of_list comparer l = List.fold (fun acc (k,v) -> add comparer k v acc) empty l - - let rec mkFromEnumerator comparer acc (e : IEnumerator<_>) = - if e.MoveNext() then - let (x,y) = e.Current - mkFromEnumerator comparer (add comparer x y acc) e - else acc - - let of_seq comparer (c : seq<_>) = - use ie = c.GetEnumerator() - mkFromEnumerator comparer empty ie - - let copyToArray s (arr: _[]) i = - let j = ref i - s |> iter (fun x y -> arr.[!j] <- KeyValuePair(x,y); j := !j + 1) - - - /// Imperative left-to-right iterators. - [] - type iterator<'Key,'Value> = - { /// invariant: always collapseLHS result - mutable stack: MapTree<'Key,'Value> list; - /// true when MoveNext has been called - mutable started : bool } - - // collapseLHS: - // a) Always returns either [] or a list starting with SetOne. - // b) The "fringe" of the set stack is unchanged. - let rec collapseLHS stack = - match stack with - | [] -> [] - | MapEmpty :: rest -> collapseLHS rest - | MapOne (k,v) :: rest -> stack - | (MapNode(k,v,l,r,h)) :: rest -> collapseLHS (l :: MapOne (k,v) :: r :: rest) - - let mkIterator s = { stack = collapseLHS [s]; started = false } - - let not_started() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext.")) - let already_finished() = raise (new System.InvalidOperationException("Enumeration already finished.")) - - let current i = - if i.started then - match i.stack with - | MapOne (k,v) :: _ -> new KeyValuePair<_,_>(k,v) - | [] -> already_finished() - | _ -> failwith "Please report error: Map iterator, unexpected stack for current" - else - not_started() - - let rec moveNext i = - if i.started then - match i.stack with - | MapOne _ :: rest -> i.stack <- collapseLHS rest; - i.stack <> [] - | [] -> false - | _ -> failwith "Please report error: Map iterator, unexpected stack for moveNext" - else - i.started <- true; (* The first call to MoveNext "starts" the enumeration. *) - i.stack <> [] - - let mkIEnumerator s = - let i = ref (mkIterator s) - { new IEnumerator<_> with - member self.Current = current !i - interface System.Collections.IEnumerator with - member self.Current = box (current !i) - member self.MoveNext() = moveNext !i - member self.Reset() = i := mkIterator s - interface System.IDisposable with - member self.Dispose() = ()} - - - -#if FX_NO_DEBUG_PROXIES -#else - [>)>] -#endif -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - [] - [] - type Map<'Key,'Value>(comparer: OptimizedClosures.FastFunc2<'Key,'Key,int>, tree: MapTree<'Key,'Value>) = - - static let empty = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'Key>() - new Map<'Key,'Value>(comparer,MapTree<_,_>.MapEmpty) - - static member Empty : Map<'Key,'Value> = empty - - static member Create(ie : IEnumerable<_>) : Map<'Key,'Value> = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'Key>() - Map<_,_>(comparer,MapTree.of_seq comparer ie) - - static member Create() : Map<'Key,'Value> = empty - - new(ie : seq<_>) = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'Key>() - Map<_,_>(comparer,MapTree.of_seq comparer ie) - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member internal m.Comparer = comparer - //[] - member internal m.Tree = tree - member m.Add(k,v) : Map<'Key,'Value> = Map<'Key,'Value>(comparer,MapTree.add comparer k v tree) -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member m.IsEmpty = MapTree.is_empty tree - member m.Item with get(k : 'Key) = MapTree.find comparer k tree - member m.TryPick(f) = MapTree.tryPick f tree - member m.Exists(f) = MapTree.exists f tree - member m.Filter(f) : Map<'Key,'Value> = Map<'Key,'Value>(comparer ,MapTree.filter comparer f tree) - member m.ForAll(f) = MapTree.for_all f tree - member m.Fold f acc = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - MapTree.foldBack f tree acc - member m.FoldSection (lo:'Key) (hi:'Key) f (acc:'z) = MapTree.foldSection comparer lo hi f tree acc - member m.Iterate f = MapTree.iter f tree - member m.MapRange f = Map<'Key,'b>(comparer,MapTree.map f tree) - member m.Map f = Map<'Key,'b>(comparer,MapTree.mapi f tree) - member m.Partition(f) : Map<'Key,'Value> * Map<'Key,'Value> = - let r1,r2 = MapTree.partition comparer f tree in - Map<'Key,'Value>(comparer,r1), Map<'Key,'Value>(comparer,r2) - member m.Count = MapTree.size tree - member m.ContainsKey(k) = MapTree.mem comparer k tree - member m.Remove(k) : Map<'Key,'Value> = Map<'Key,'Value>(comparer,MapTree.remove comparer k tree) - member m.TryFind(k) = MapTree.tryfind comparer k tree - member m.ToList() = MapTree.to_list tree - member m.ToArray() = MapTree.to_array tree - - static member of_list(l) : Map<'Key,'Value> = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'Key>() - Map<_,_>(comparer,MapTree.of_list comparer l) - - member this.ComputeHashCode() = - let combineHash x y = (x <<< 1) + y + 631 - let mutable res = 0 - for (KeyValue(x,y)) in this do - res <- combineHash res (hash x) - res <- combineHash res (hash y) - abs res - - override this.Equals(that) = - match that with - | :? Map<'Key,'Value> -> - ((this :> System.IComparable).CompareTo(that) = 0) - | _ -> false - - override this.GetHashCode() = this.ComputeHashCode() - - interface IEnumerable> with - member s.GetEnumerator() = MapTree.mkIEnumerator tree - - interface System.Collections.IEnumerable with - member s.GetEnumerator() = (MapTree.mkIEnumerator tree :> System.Collections.IEnumerator) - - interface IDictionary<'Key, 'Value> with - member s.Item - with get x = s.[x] - and set x v = raise (NotSupportedException("Map values may not be mutated")) - - // REVIEW: this implementation could avoid copying the Values to an array - member s.Keys = ([| for kvp in s -> kvp.Key |] :> ICollection<'Key>) - - // REVIEW: this implementation could avoid copying the Values to an array - member s.Values = ([| for kvp in s -> kvp.Value |] :> ICollection<'Value>) - - member s.Add(k,v) = raise (NotSupportedException("Map values may not be mutated")) - member s.ContainsKey(k) = s.ContainsKey(k) - member s.TryGetValue(k,r) = if s.ContainsKey(k) then (r <- s.[k]; true) else false - member s.Remove(k : 'Key) = (raise (NotSupportedException("Map values may not be mutated")) : bool) - - interface ICollection> with - member s.Add(x) = raise (NotSupportedException("Map values may not be mutated")); - member s.Clear() = raise (NotSupportedException("Map values may not be mutated")); - member s.Remove(x) = raise (NotSupportedException("Map values may not be mutated")); - member s.Contains(x) = s.ContainsKey(x.Key) && s.[x.Key] = x.Value - member s.CopyTo(arr,i) = MapTree.copyToArray tree arr i - member s.IsReadOnly = true - member s.Count = s.Count - - interface System.IComparable with - member m.CompareTo(obj: obj) = - match obj with - | :? Map<'Key,'Value> as m2-> - Seq.compare - (fun (kvp1 : KeyValuePair<_,_>) (kvp2 : KeyValuePair<_,_>)-> - let c = comparer.Invoke(kvp1.Key,kvp2.Key) in - if c <> 0 then c else Operators.compare kvp1.Value kvp2.Value) - m m2 - | _ -> - invalidArg "obj" "the two obejcts have different types and are not comparable" -#if FX_NO_DEBUG_PROXIES -#else - and - [] - MapDebugView<'Key,'Value>(v: Map<'Key,'Value>) = - - [] - member x.Items = v |> Seq.truncate 1000 |> Seq.map (fun kvp -> { key = kvp.Key; value=kvp.Value}) |> Seq.to_array - - and - [] - MapDebugViewKeyValuePair = { key:obj; value:obj } - -#endif - - -namespace Microsoft.FSharp.Collections - - open System - open System.Diagnostics - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - - [] - [] - module Map = - - [] - let isEmpty (m:Map<_,_>) = m.IsEmpty - [] - let is_empty (m:Map<_,_>) = m.IsEmpty - - [] - let add k v (m:Map<_,_>) = m.Add(k,v) - - [] - let find k (m:Map<_,_>) = m.[k] - - [] - let tryFind k (m:Map<_,_>) = m.TryFind(k) - - [] - let tryfind k (m:Map<_,_>) = m.TryFind(k) - - [] - let remove k (m:Map<_,_>) = m.Remove(k) - - [] - let contains k (m:Map<_,_>) = m.ContainsKey(k) - - [] - let iter f (m:Map<_,_>) = m.Iterate(f) - - [] - let tryPick f (m:Map<_,_>) = m.TryPick(f) - - [] - let first f (m:Map<_,_>) = m.TryPick(f) - - [] - let pick f (m:Map<_,_>) = match tryPick f m with None -> raise (System.Collections.Generic.KeyNotFoundException()) | Some res -> res - - [] - let exists f (m:Map<_,_>) = m.Exists(f) - - [] - let filter f (m:Map<_,_>) = m.Filter(f) - - [] - let partition f (m:Map<_,_>) = m.Partition(f) - - [] - let forall f (m:Map<_,_>) = m.ForAll(f) - - [] - let for_all f m = forall f m - - [] - let mapRange f (m:Map<_,_>) = m.MapRange(f) - - [] - let mapi f (m:Map<_,_>) = m.Map(f) - - [] - let map f (m:Map<_,_>) = m.Map(f) - - [] - let fold f z (m:Map<_,_>) = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - MapTree.fold f z m.Tree - - [] - let fold_left f z m = fold f z m - - [] - let foldBack f (m:Map<_,_>) z = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - MapTree.foldBack f m.Tree z - - [] - let fold_right f m z = foldBack f m z - - [] - let to_seq (m:Map<_,_>) = m |> Seq.map (fun kvp -> kvp.Key, kvp.Value) - - [] - let findIndex f (m : Map<_,_>) = m |> to_seq |> Seq.pick (fun (k,v) -> if f k v then Some(k) else None) - - [] - let find_index f m = findIndex f m - - [] - let tryFindIndex f (m : Map<_,_>) = m |> to_seq |> Seq.tryPick (fun (k,v) -> if f k v then Some(k) else None) - - [] - let tryfind_index f m = tryFindIndex f m - - [] - let of_list (l: ('Key * 'Value) list) = Map<_,_>.of_list(l) - - [] - let of_seq l = Map<_,_>.Create(l) - - [] - let of_array (l: ('Key * 'Value) array) = of_seq l - - [] - let to_list (m:Map<_,_>) = m.ToList() - - [] - let to_array (m:Map<_,_>) = m.ToArray() - - [] - let empty<'Key,'Value> = Map<'Key,'Value>.Empty - - [] - let mem k (m:Map<_,_>) = m.ContainsKey(k) - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/map.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/map.fsi deleted file mode 100644 index 8c08d7a3..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/map.fsi +++ /dev/null @@ -1,186 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - /// Immutable maps. Keys are ordered by F# generic comparison. - /// - /// - /// Maps based on generic comparison are efficient for small keys. They are not a suitable choice if keys are recursive data structures - /// or if keys require bespoke comparison semantics. - /// - [] - type Map<'Key,'Value> = - /// Return a new map with the binding added to the given map. - member Add: key:'Key * value:'Value -> Map<'Key,'Value> - - /// Return true if there are no bindings in the map. - member IsEmpty: bool - - /// Build a map that contains the bindings of the given IEnumerable - new : elements:seq<'Key * 'Value> -> Map<'Key,'Value> - - /// The empty map - static member Empty: Map<'Key,'Value> - - /// Test if an element is in the domain of the map - member ContainsKey: key:'Key -> bool - - /// The number of bindings in the map - member Count: int - - /// Lookup an element in the map. Raise KeyNotFoundException if no binding - /// exists in the map. - member Item : key:'Key -> 'Value with get - - /// Remove an element from the domain of the map. No exception is raised if the element is not present. - member Remove: key:'Key -> Map<'Key,'Value> - - /// Lookup an element in the map, returning a Some value if the element is in the domain - /// of the map and None if not. - member TryFind: key:'Key -> 'Value option - - interface IDictionary<'Key, 'Value> - interface ICollection> - interface IEnumerable> - interface System.IComparable - interface System.Collections.IEnumerable - override Equals : obj -> bool - - /// Functional programming operators related to the Map<_,_> type. - [] - [] - module Map = - - /// Return a new map with the binding added to the given map. - val add: key:'Key -> value:'T -> table:Map<'Key,'T> -> Map<'Key,'T> - - /// Return a new map made from the given bindings - val of_list: elements:('Key * 'T) list -> Map<'Key,'T> - - /// Return a new map made from the given bindings - val of_array: elements:('Key * 'T) array -> Map<'Key,'T> - - /// Return a new map made from the given bindings - val of_seq: elements:seq<'Key * 'T> -> Map<'Key,'T> - - /// View the collection as an enumerable sequence. This collection - /// type is also directly compatible with 'seq<KeyValuePair<_,_> >'. - /// - /// Note this function returns a sequence of tuples, whereas the collection - /// itself is compatible with the logically equivalent sequence of KeyValuePairs. - /// Using sequences of tuples tends to be more convenient in F#, however the - /// collection itself must enumerate KeyValuePairs to conform to the .NET - /// design guidelines and the IDictionary interface. - val to_seq: table:Map<'Key,'T> -> seq<'Key * 'T> - - /// Returns a list of all key-value pairs in the mappinng - val to_list: table:Map<'Key,'T> -> list<'Key * 'T> - - /// Returns an array of all key-value pairs in the mappinng - val to_array: table:Map<'Key,'T> -> ('Key * 'T) array - - /// Is the map empty? - val isEmpty: table:Map<'Key,'T> -> bool - - [] - val is_empty: table:Map<'Key,'T> -> bool - - /// The empty map - [] - val empty<'Key,'T> : Map<'Key,'T> - - /// Lookup an element in the map, raising KeyNotFoundException if no binding - /// exists in the map. - val find: key:'Key -> table:Map<'Key,'T> -> 'T - - /// Search the map looking for the first element where the given function returns a Some value - val tryPick: chooser:('Key -> 'T -> 'U option) -> table:Map<'Key,'T> -> 'U option - - /// Search the map looking for the first element where the given function returns a Some value - val pick: chooser:('Key -> 'T -> 'U option) -> table:Map<'Key,'T> -> 'U - - /// Fold over the bindings in the map - val foldBack: folder:('Key -> 'T -> 'State -> 'State) -> table:Map<'Key,'T> -> state:'State -> 'State - - /// Fold over the bindings in the map - val fold: folder:('State -> 'Key -> 'T -> 'State) -> state:'State -> table:Map<'Key,'T> -> 'State - - /// Apply the given function to each binding in the dictionary - val iter: action:('Key -> 'T -> unit) -> table:Map<'Key,'T> -> unit - - /// Return true if the given predicate returns true for one of the - /// bindings in the map. - val exists: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> bool - - /// Build a new map containing only the bindings for which the given predicate returns 'true' - val filter: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> Map<'Key, 'T> - - /// Return true if the given predicate returns true for all of the - /// bindings in the map. - val forall: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> bool - - /// Build a new collection whose elements are the results of applying the given function - /// to each of the elements of the collection. The index passed to the - /// function indicates the index of element being transformed. - val map: mapping:('Key -> 'T -> 'U) -> table:Map<'Key,'T> -> Map<'Key,'U> - - /// Test is an element is in the domain of the map - val contains: key:'Key -> table:Map<'Key,'T> -> bool - - /// Build two new maps, one containing the bindings for which the given predicate returns 'true', - /// and the other the remaining bindings. - val partition: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> Map<'Key, 'T> * Map<'Key, 'T> - - /// Remove an element from the domain of the map. No exception is raised if the element is not present. - val remove: key:'Key -> table:Map<'Key,'T> -> Map<'Key,'T> - - /// Lookup an element in the map, returning a Some value if the element is in the domain - /// of the map and None if not. - val tryFind: key:'Key -> table:Map<'Key,'T> -> 'T option - - /// Evaluates the function on each mapping in the collection. Returns the key for the first mapping - /// where the function returns 'true'. Raise KeyNotFoundException if no such element exists. - val findIndex: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key - - /// Return the key of the first mapping in the collection that satisfies the given predicate. - /// Return 'None' if no such element exists. - val tryFindIndex: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key option - -#if DONT_INCLUDE_DEPRECATED -#else - /// Search the map looking for the first element where the given function returns a Some value - [] - val first: chooser:('Key -> 'T -> 'U option) -> table:Map<'Key,'T> -> 'U option - - [] - val fold_right: folder:('Key -> 'T -> 'State -> 'State) -> table:Map<'Key,'T> -> state:'State -> 'State - - [] - val fold_left: folder:('State -> 'Key -> 'T -> 'State) -> state:'State -> table:Map<'Key,'T> -> 'State - - [] - val for_all: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> bool - - [] - val mapi: mapping:('Key -> 'T -> 'U) -> table:Map<'Key,'T> -> Map<'Key,'U> - - [] - val mem: key:'Key -> table:Map<'Key,'T> -> bool - - [] - val tryfind: key:'Key -> table:Map<'Key,'T> -> 'T option - - [] - val find_index: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key - - [] - val tryfind_index: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key option - -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/n.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/n.fs deleted file mode 100644 index 44935af8..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/n.fs +++ /dev/null @@ -1,1604 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -namespace Microsoft.FSharp.Math - -#if FX_ATLEAST_40 -#else -open System -open System.Diagnostics.CodeAnalysis -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Primitives.Basics - -type ints = int array - -type internal BigNat = - - // Have n = sum (from i=0 to bound) a.[i] * baseN ^ i - // Have 0 <= a.[i] < baseN. - //------ - // Invariant: bound is least such, i.e. bound=0 or (a.[bound-1] is highest coeff). - // Zero is {bound=0,a=...}. - // Naturals are a normal form, - // but not structurally so, - // since arrays may have non-contributing cells at a.[bound] and beyond. - // - { mutable bound : int; // non-zero coeff must be 0...(bound-1) - digits : ints // must have at least elts 0...(bound-1), - // maybe more (which should be zero!). - // Actually, the "zero" condition may be relaxed. - // - } - - -module internal BigNatModule = - - //------------------------------------------------------------------------- - // misc - //----------------------------------------------------------------------- - - #if SELFTEST - let check b = if not b then failwith "assertion failwith" - #endif - - module FFT = - let rec pow32 x n = - if n=0 then 1 - elif n % 2 = 0 then pow32 (x*x) (n / 2) - else x* pow32 (x*x) (n / 2) - - let leastBounding2Power b = - let rec findBounding2Power b tp i = if b<=tp then tp,i else findBounding2Power b (tp*2) (i+1) in - findBounding2Power b 1 0 - - //------------------------------------------------------------------------- - // p = 2^k.m + 1 prime and w primitive 2^k root of 1 mod p - //----------------------------------------------------------------------- - - // Given p = 2^k.m + 1 prime and w a primitive 2^k root of unity (mod p). - // Required to define arithmetic ops for Fp = field modulo p. - // The following are possible choices for p. - - // p, k, m, g, w - // let p,k,m,g,w = 97L, 4, 6, 5, 8 // p is 7 bit - // let p,k,m,g,w = 769L, 8, 3, 7, 7 // p is 10 bit - // let p,k,m,g,w = 7681L, 8, 30, 13, 198 // p is 13 bit - // let p,k,m,g,w = 12289L, 10, 12, 11, 49 // p is 14 bit - // let p,k,m,g,w = 167772161L, 25, 5, 557092, 39162105 // p is 28 bit - // let p,k,m,g,w = 469762049L, 26, 7, 1226571, 288772249 // p is 29 bit - - - let p,k,m,g,w = 2013265921L, 27, 15, 31, 440564289 // p is 31 bit - let primeP = p - - let max_bits_inside_p = 30 - - - //------------------------------------------------------------------------- - // Fp = finite field mod p - rep is uint32 - //----------------------------------------------------------------------- - - - type fp = uint32 - // operations in Fp (finite field size p) - module Fp = - //module I = UInt32 - let p = 2013265921ul : fp - let p64 = 2013265921UL : uint64 - let to_int (x:fp) : int = int32 x - let of_int (x:int) : fp = uint32 x - - let mzero : fp = 0ul - let mone : fp = 1ul - let mtwo : fp = 2ul - let inline madd (x:fp) (y:fp) : fp = (x + y) % p - let inline msub (x:fp) (y:fp) : fp = (x + p - y) % p - let inline mmul (x:fp) (y:fp) : fp = uint32 ((uint64 x * uint64 y) % p64) - - let rec mpow x n = - if n=0 then mone - elif n % 2=0 then mpow (mmul x x) (n / 2) - else mmul x (mpow (mmul x x) (n / 2)) - - let rec mpowL x n = - if n = 0L then mone - elif n % 2L = 0L then mpowL (mmul x x) (n / 2L) - else mmul x (mpowL (mmul x x) (n / 2L)) - - // Have the w is primitive 2^kth root of 1 in Zp - let m2PowNthRoot n = - // Find x s.t. x is (2^n)th root of unity. - // - // pow w (pow 2 k) = 1 primitively. - // = pow w (pow 2 ((k-n)+n)) - // = pow w (pow 2 (k-n) * pow 2 n) - // = pow (pow w (pow 2 (k-n))) (pow 2 n) - // - // Take wn = pow (pow w (pow 2 (k-n))) - - mpow (uint32 w) (pow32 2 (k-n)) - - let minv x = mpowL x (primeP - 2L) - - - //------------------------------------------------------------------------- - // FFT - in place low garbage - //----------------------------------------------------------------------- - - open Fp - let rec computeFFT lambda mu n w (u: _[]) (res: _[]) offset = - // Given n a 2-power, - // w an nth root of 1 in Fp, and - // lambda, mu and u(x) defining - // poly(lambda,mu,x) = sum(i pow32 2 i) - - let computeFftPaddedPolynomialProduct bigK k u v = - // REQUIRES: bigK = 2^k - // REQUIRES: Array lengths of u and v = bigK. - // REQUIRES: degree(uv) <= bigK-1 - // --- - // Given u,v polynomials. - // Computes the product polynomial by FFT. - // For correctness, - // require the result coeff to be in range [0,p-1], for p defining Fp above. - - #if SELFTEST - check ( k <= maxTwoPower ); - check ( bigK = twoPowerTable.[k] ); - check ( u.Length = bigK ); - check ( v.Length = bigK ); - #endif - // Find 2^k primitive root of 1 - let w = m2PowNthRoot k - // FFT - let n = bigK - let uT = computFftInPlace n w u - let vT = computFftInPlace n w v - // Evaluate - let rT = Array.init n (fun i -> mmul uT.[i] vT.[i]) - // INV FFT - let r = computeInverseFftInPlace n w rT - r - - let padTo n (u: _ array) = - let uBound = u.Length - Array.init n (fun i -> if i mmul uT.[i] vT.[i]) - // INV FFT - let r = computeInverseFftInPlace n w rT - Array.map Fp.to_int r - - - //------------------------------------------------------------------------- - // fp exports - //----------------------------------------------------------------------- - - open Fp - let mzero = mzero - let mone = mone - let max_fp = msub Fp.p mone - let fp_of_int x = Fp.of_int x - let int_of_fp x = Fp.to_int x - let max_bits_inside_fp = max_bits_inside_p - - //------------------------------------------------------------------------- - // FFT - reference implementation - //----------------------------------------------------------------------- - - #if SELFTEST - open Fp - let rec computeFftReference n w u = - // Given n a 2-power, - // w an nth root of 1 in Fp, and - // u(x) = sum(i u.[2*i]) - let uodd = Array.init (n/2) (fun i -> u.[2*i+1]) - let uevenFT = computeFftReference (n/2) (mmul w w) ueven - let uoddFT = computeFftReference (n/2) (mmul w w) uodd - Array.init n - (fun j -> - if j < n/2 then - madd - (uevenFT.[j]) - (mmul - (mpow w j) - (uoddFT.[j])) - else - let j = j - (n/2) - msub - (uevenFT.[j]) - (mmul - (mpow w j) - (uoddFT.[j]))) - #endif - - open FFT - - type n = BigNat - - let string_of_int (i:int) = i.ToString() - - let bound (n: n) = n.bound - let setBound (n: n) (v:int32) = n.bound <- v - let coeff (n:n) i = n.digits.[i] - let coeff64 (n:n) i = int64 (coeff n i) - let setCoeff (n:n) i v = n.digits.[i] <- v - - let rec pow64 x n = - if n=0 then 1L - elif n % 2 = 0 then pow64 (x * x) (n / 2) - else x * (pow64 (x * x) (n / 2)) - - let rec pow32 x n = - if n=0 then 1 - elif n % 2 = 0 then pow32 (x*x) (n / 2) - else x* pow32 (x*x) (n / 2) - - let hash(n) = - let mutable res = 0 - for i = 0 to n.bound - 1 do // could stop soon, it's "hash" - res <- n.digits.[i] + (res <<< 3) - done; - res - - //---------------------------------------------------------------------------- - // misc - //-------------------------------------------------------------------------- - -#if CHECKED - let check b str = if not b then failwith ("check failed: " + str) -#endif - let max_int a b = if a int32 - let inline div64base (x:int64) = int64 (uint64 x >>> baseBits) - - let divbase x = int32 (uint32 x >>> baseBits) - let modbase x = (x &&& baseMask) - - let inline index z i = if i < z.bound then z.digits.[i] else 0 - - let createN b = { bound = b; - digits = Array.zeroCreate b } - let copyN x = { bound = x.bound; - digits = Array.copy x.digits } // could copy just enough... - - let normN n = - // normalises bound - let rec findLeastBound (na:ints) i = if i = -1 || na.[i]<>0 then i+1 else findLeastBound na (i-1) - let bound = findLeastBound n.digits (n.bound-1) - n.bound <- bound; - n - - let boundInt = 2 // int will fit with bound=2 - let boundInt64 = 3 // int64 will fit with bound=3 - let boundBase = 1 // base will fit with bound=1 - obviously! - -//---------------------------------------------------------------------------- -// base, coefficients, poly -//-------------------------------------------------------------------------- - - let embed x = - let x = if x<0 then 0 else x // no -ve naturals - if x < baseN then - let r = createN 1 - r.digits.[0] <- x; - normN r - else - let r = createN boundInt - for i = 0 to boundInt - 1 do - r.digits.[i] <- (x / pow32 baseN i) % baseN - done; - normN r - - let embed64 x = - let x = if x<0L then 0L else x // no -ve naturals - let r = createN boundInt64 - for i = 0 to boundInt64-1 do - r.digits.[i] <- int32 ( (x / pow64 baseNi64 i) % baseNi64) - done; - normN r - - let eval n = - if n.bound = 1 - then n.digits.[0] - else - let mutable acc = 0 - for i = n.bound-1 downto 0 do - acc <- n.digits.[i] + baseN * acc - done; - acc - - let eval64 n = - if n.bound = 1 - then int64 n.digits.[0] - else - let mutable acc = 0L - for i = n.bound-1 downto 0 do - acc <- int64 (n.digits.[i]) + baseNi64 * acc - done; - acc - - let one = embed 1 - let zero = embed 0 - - let restrictTo d n = - { bound = min_int d n.bound; digits = n.digits} - - let shiftUp d n = - let m = createN (n.bound+d) - for i = 0 to n.bound-1 do - m.digits.[i+d] <- n.digits.[i] - done; - m - - let shiftDown d n = - if n.bound-d<=0 then - zero - else - let m = createN (n.bound-d) - for i = 0 to m.bound-1 do - m.digits.[i] <- n.digits.[i+d] - done; - m - - let degree n = n.bound-1 - - -//---------------------------------------------------------------------------- -// add, sub -//-------------------------------------------------------------------------- - - // addition - let rec addP i n c p q r = // p+q + c - if i0 then - r.digits.[i] <- modbase x; - let c = divbase x - // if p (or q) exhausted and c zero could switch to copying mode - subP (i+1) n c p q r - else - let x = x + baseN // add baseN - r.digits.[i] <- modbase x; - let c = divbase x - 1 // sub baseN - // if p (or q) exhausted and c zero could switch to copying mode - subP (i+1) n c p q r - else - let underflow = c<>0 - underflow - - let sub p q = - // NOTE: x-y=0 when x<=y, it is natural subtraction - let rbound = max_int p.bound q.bound - let r = createN rbound - let carry = 0 - let underflow = subP 0 rbound carry p q r - if underflow then - embed 0 - else - normN r - - -//---------------------------------------------------------------------------- -// isZero, equal, ordering, sign, min, max -//-------------------------------------------------------------------------- - - let isZero p = p.bound=0 - let IsZero p = isZero p - let isOne p = p.bound=1 && p.digits.[0] = 1 - - let equal p q = - (p.bound = q.bound) && - (let rec check (pa:ints) (qa:ints) i = - // HAVE: pa.[j] = qa.[j] for i < j < p.bound - (i = -1) || (pa.[i]=qa.[i] && check pa qa (i-1)) - - check p.digits q.digits (p.bound-1)) - - let shiftCompare p pn q qn = - if p.bound + pn < q.bound + qn then -1 - elif p.bound + pn > q.bound + pn then 1 - else - let rec check (pa:ints) (qa:ints) i = - // HAVE: pa.[j-pn] = qa.[j-qn] for i < j < p.bound - // Looking for most significant differing coeffs to determine ordering - if i = -1 then - 0 - else - let pai = if i < pn then 0 else pa.[i-pn] - let qai = if i < qn then 0 else qa.[i-qn] - if pai = qai then check pa qa (i-1) - elif pai < qai then -1 - else 1 - - check p.digits q.digits (p.bound + pn - 1) - - let compare p q = - if p.bound < q.bound then -1 - elif p.bound > q.bound then 1 - else - let rec check (pa:ints) (qa:ints) i = - // HAVE: pa.[j] = qa.[j] for i < j < p.bound - // Looking for most significant differing coeffs to determine ordering - if i = -1 then 0 - elif pa.[i]=qa.[i] then check pa qa (i-1) - elif pa.[i]] - let lt p q = compare p q = -1 - [] - let gt p q = compare p q = 1 - [] - let lte p q = compare p q <> 1 - [] - let gte p q = compare p q <> -1 - - [] - let min a b = if lt a b then a else b - [] - let max a b = if lt a b then b else a - - -//---------------------------------------------------------------------------- -// scale -//-------------------------------------------------------------------------- - - // REQUIRE: baseN + baseN.2^32 < Int64.max_int - let rec contributeArr (a:ints) i (c:int64) = - // Given c and require c < baseN.2^32 - // Compute: r <- r + c . B^i - // via r.digits.[i] <- r.digits.[i] + c and normalised - let x = int64 a.[i] + c - // HAVE: x < baseN + baseN.2^32 - let c = div64base x - let x = mod64base x - // HAVE: c < 1 + 2^32 < baseN.2^32, recursive call ok - // HAVE: x < baseN - a.[i] <- x; // store residue x - if c>0L then - contributeArr a (i+1) c // contribute carry next position - - let inline contribute r i c = contributeArr r.digits i c - - // REQUIRE: max_int < 2^32 - [] - let rec scale (k:int) (p:n) = - // Given k and p and require k < 2^32 - // Computes "scalar" product k.p - // - let rbound = p.bound + boundInt - let r = createN rbound - let k = int64 k - for i = 0 to p.bound-1 do - let kpi = k * int64 p.digits.[i] - // HAVE: kpi < 2^32 * baseN which meets "contribute" requirement - contribute r i kpi - done; - normN r - - -//---------------------------------------------------------------------------- -// mulSchoolBook -//-------------------------------------------------------------------------- - - // multiplication: naively O(n^2) -(* - let mulSchoolBook' p q = - let rbound = p.bound + q.bound + boundBase*2 - let r = createN rbound - let pa = p.digits - let qa = q.digits - for i = 0 to p.bound-1 do - for j = 0 to q.bound-1 do - contribute r (i+j) (int64 pa.[i] * int64 qa.[j]) - done - done; - normN r -*) - - let mulSchoolBookBothSmall p q = - let r = createN 2 - let rak = int64 p * int64 q - setCoeff r 0 (mod64base rak); - setCoeff r 1 (int32 (div64base rak)) - normN r - - let rec mulSchoolBookCarry r c k = - if ( c > 0L ) then - // ToAdd = c.B^k - let rak = (coeff64 r k) + c - setCoeff r k (mod64base rak); - mulSchoolBookCarry r (div64base rak) (k + 1) - - let mulSchoolBookOneSmall p q = - let bp = bound(p) - let rbound = bp + 1 - let r = createN rbound - let q = int64 q - let mutable c = 0L - for i = 0 to bp-1 do - let rak = c + (coeff64 r i) + (coeff64 p i) * q - setCoeff r i (mod64base rak); - c <- div64base rak; - mulSchoolBookCarry r c bp - normN r - - - // multiplication: naively O(n^2) -- this version - unchecked - is faster - let mulSchoolBookNeitherSmall p q = - let rbound = p.bound + q.bound - let r = createN rbound - let ra = r.digits - let pa = p.digits - let qa = q.digits - // ToAdd p*q - for i = 0 to p.bound-1 do - // ToAdd p.[i] * q * B^i - let pai = int64 pa.[i] - let mutable c = 0L - let mutable k = i // k = i + j - // ToAdd = pi.qj.B^(i+j) for j = 0,j+1... - for j = 0 to q.bound-1 do - // ToAdd = c.B^k + pi.qj.B^(i+j) for j = j,j+1... and k = i+j - let qaj = int64 qa.[j] - let rak = int64 ra.[k] + c + pai * qaj - ra.[k] <- int32 (mod64base rak); - c <- div64base rak; - k <- k + 1; - mulSchoolBookCarry r c k - normN r - - let mulSchoolBook p q = - let pSmall = (bound(p) = 1) - let qSmall = (bound(q) = 1) - if (pSmall && qSmall) then mulSchoolBookBothSmall (coeff p 0) (coeff q 0) - elif pSmall then mulSchoolBookOneSmall q (coeff p 0) - elif qSmall then mulSchoolBookOneSmall p (coeff q 0) - else mulSchoolBookNeitherSmall p q - - -//---------------------------------------------------------------------------- -// quickMulUsingFft -//-------------------------------------------------------------------------- - - // The FFT polynomial multiplier requires the result coeffs fit inside Fp. - // - // OVERVIEW: - // The numbers are recoded as polynomials to be evaluated at (x=2^bigL). - // The polynomials are FFT multiplied, requiring result coeff to fit Fp. - // The result product is recovered by evaluating the poly at (x=2^bigL). - // - // REF: - // QuickMul: Practical FFT-base Integer Multiplication, - // Chee Yap and Chen Yi. - // - // There is choice of how to encode the nats polynomials. - // The choice is the (2^bigL) base to use. - // For bigL=1, the FFT will cater for a product of upto 256M bits. - // Larger bigL have less reach, but compute faster. - // So plan to choose bigL depending on the number of bits product. - // - // DETERMINING THE K,L BOUNDS. - // - // Given representing using K-vectors, K a power of 2, K=2^k, and - // If choosing inputs to have L-bit coefficients. - // - // The result coeff are: - // - // res(i) = sum (j pow32 2 (bigL*i)) - } - - let table = - [| // bigL , k , bigK , bigN // - mkEncoding ( 1 , 28 , 268435456 , 268435456 ) ; - mkEncoding ( 2 , 26 , 67108864 , 134217728 ) ; - mkEncoding ( 3 , 24 , 16777216 , 50331648 ) ; - mkEncoding ( 4 , 22 , 4194304 , 16777216 ) ; - mkEncoding ( 5 , 20 , 1048576 , 5242880 ) ; - mkEncoding ( 6 , 18 , 262144 , 1572864 ) ; - mkEncoding ( 7 , 16 , 65536 , 458752 ) ; - mkEncoding ( 8 , 14 , 16384 , 131072 ) ; - mkEncoding ( 9 , 12 , 4096 , 36864 ) ; - mkEncoding ( 10 , 10 , 1024 , 10240 ) ; - mkEncoding ( 11 , 8 , 256 , 2816 ) ; - mkEncoding ( 12 , 6 , 64 , 768 ) ; - mkEncoding ( 13 , 4 , 16 , 208 ) ; - |] - - let calculateTableTow bigL = - // Given L. - // Have L via "log2 K <= max_bits_inside_fp - 2L". - // Have N via "N = K.L" - // - let k = max_bits_inside_fp - 2*bigL - let bigK = pow64 2L k - let N = bigK * int64 bigL - bigL,k,bigK,N - - let encodingGivenResultBits bitsRes = - // choose maximum bigL s.t. bitsRes < bigN - // EXCEPTION: fails is bitsRes exceeds 2^28 (largest bigN table) - let rec selectFrom i = - if i+1 < table.Length && bitsRes < table.[i+1].bigN then - selectFrom (i+1) - else - table.[i] - - if bitsRes >= table.[0].bigN then - failwith "Product is huge, around 268435456 bits, beyond quickmul" - else - selectFrom 0 - - let bitmask = Array.init baseBits (fun i -> (pow32 2 i - 1)) - let twopowers = Array.init baseBits (fun i -> (pow32 2 i)) - let twopowersI64 = Array.init baseBits (fun i -> (pow64 2L i)) - // bitmask(k) = 2^k - 1 - // twopowers(k) = 2^k // - - let wordBits word = - let rec hi k = - if k=0 then 0 - elif (word &&& twopowers.[k-1]) <> 0 then k - else hi (k-1) - - hi baseBits - - let bits u = - if u.bound=0 then 0 - else degree u * baseBits + wordBits u.digits.[degree u] - - let extractBits n enc bi = - let bj = bi + enc.bigL - 1 // the last bit (inclusive) - let biw = bi / baseBits // first bit is this index pos - let bjw = bj / baseBits // last bit is this index pos - if biw <> bjw then - // two words - let x = index n biw - let y = index n bjw // bjw = biw+1 - let xbit = bi % baseBits // start bit x - let nxbits = baseBits - xbit // number of bitsin x - let x = x >>> xbit // shift down x so bit0 is first - let y = y <<< nxbits // shift up y so it starts where x finished - let x = x ||| y // combine them - let x = x &&& bitmask.[enc.bigL] // mask out (high y bits) to get required bits - x - else - // one word - let x = index n biw - let xbit = bi % baseBits // start bit x - let x = x >>> xbit - let x = x &&& bitmask.[enc.bigL] - x - - let encodePoly enc n = - // Find poly s.t. n = poly evaluated at x=2^bigL - // with 0 <= pi < 2^bigL. - // - let poly = Array.create enc.bigK (fp_of_int 0) - let biMax = n.bound * baseBits - let rec encoder i bi = - // bi = i * bigL - if i=enc.bigK || bi > biMax then - () // done - else - ( let pi = extractBits n enc bi - poly.[i] <- fp_of_int pi; - let i = i + 1 - let bi = bi + enc.bigL - encoder i bi - ) - - encoder 0 0; - poly - - let decodeResultBits enc (poly : fp array) = - // Decoding evaluates poly(x) (coeff Fp) at X = 2^bigL. - // A bound on number of result bits is "enc.bigN + boundInt", but that takes HUGE STEPS. - // Garbage has a cost, so we minimize it by working out a tight bound. - // - // poly(X) = sum i=0..n coeff_i * X^i where n is highest non-zero coeff. - // <= 2^max_bits_inside_fp * (1 + X + ... X^n) - // <= 2^max_bits_inside_fp * (X^(n+1) - 1) / (X - 1) - // <= 2^max_bits_inside_fp * X^(n+1) / (X - 1) - // <= 2^max_bits_inside_fp * X^(n+1) / (X/2) provided X/2 <= X-1 - // <= 2^max_bits_inside_fp * X^n * 2 - // <= 2^max_bits_inside_fp * (2^bigL)^n * 2 - // <= 2^(max_bits_inside_fp + bigL.n + 1) - // - let mutable n = 0 - for i = 0 to poly.Length-1 do - if poly.[i] <> mzero then n <- i - done; - let rbits = max_bits_inside_fp + enc.bigL * n + 1 - rbits + 1 // +1 since 2^1 requires 2 bits not 1 - - // REQUIRE: bigL <= baseBits - let decodePoly enc poly = - // Find n = poly evaluated at x=2^bigL - // Note, 0 <= pi < max_fp. - // - let rbound = enc.bigN + boundInt // gross bound - let rbound = (decodeResultBits enc poly) / baseBits + 1 - let r = createN rbound - let rec evaluate i j d = - // HAVE: bigL.i = j * baseBits + d and d= rbound then -#if CHECKED - check (poly.[i] = mzero) "decodePoly"; -#endif - () - else ( - let x = int64 (int_of_fp poly.[i]) * twopowersI64.[d] - // HAVE: x < 2^32 . 2^baseBits = 2^32.baseN - contribute r j x - ); - let i = i + 1 - let d = d + enc.bigL - let j,d = if d >= baseBits then j+1 , d-baseBits else j,d - // HAVE: d < baseBits, note: bigL minDigitsKaratsuba then - let k = bmax / 2 - let a0 = restrictTo k p - let a1 = shiftDown k p - let b0 = restrictTo k q - let b1 = shiftDown k q - let q0 = mul a0 b0 - let q1 = mul (add a0 a1) (add b0 b1) - let q2 = mul a1 b1 - let p0 = q0 - let p1 = sub q1 (add q0 q2) - let p2 = q2 - let r = add p0 (shiftUp k (add p1 (shiftUp k p2))) - r - else - mulSchoolBook p q - - let rec mulKaratsuba x y = recMulKaratsuba mulKaratsuba x y - - -//---------------------------------------------------------------------------- -// mul - composite -//-------------------------------------------------------------------------- - - let productDigitsUpperSchoolBook = (64000 / baseBits) - // When is it worth switching away from SchoolBook? - // SchoolBook overhead is low, so although it's O(n^2) it remains competitive. - // - // 28/3/2006: - // The FFT can take over from SchoolBook at around 64000 bits. - // Note, FFT performance is stepwise, according to enc from table. - // The steps are big steps (meaning sudden jumps/drops perf). - // - - let singleDigitForceSchoolBook = (32000 / baseBits) - // If either argument is "small" then stay with SchoolBook. - // - - let productDigitsUpperFft = (table.[0].bigN / baseBits) - // QuickMul is good upto a finite (but huge) limit: - // Limit 268,435,456 bits product. - // - // From the code: - // let bitsRes = bits u + bits v - // fails when bitsRes >= table.[0].bigN - // So, not applicable when: - // P1: table.[0].bigN <= bits(u) + bits(v) - // P2: table.[0].bigN <= .. <= baseBits * (u.bound + v.bound) - // P3: table.[0].bigN <= .. <= baseBits * (u.bound + v.bound) - // P4: table.[0].bigN / baseBits <= u.bound + v.bound - // - - // Summary of mul algorithm choice: - // 0 <= uv_bound < upper_school_book - Schoolbook - // upper_school_book <= uv_bound < upper_fft - QuickMul - // upper_fft <= uv_bound < ... - Karatsuba - // - // NOTE: - // - Karatsuba current implementation has high garbage cost. - // - However, a linear space cost is possible... - // - Meantime, switch to Karatsuba only beyond FFT range. - // - - let rec mul p q = - let pq_bound = p.bound + q.bound - if pq_bound < productDigitsUpperSchoolBook || - p.bound < singleDigitForceSchoolBook || - q.bound < singleDigitForceSchoolBook - then - // Within school-book initial range: - mulSchoolBook p q - else - if pq_bound < productDigitsUpperFft then - // Inside QuickMul FFT range: - quickMulUsingFft p q - else - // Beyond QuickMul FFT range, or maybe between Schoolbook and QuickMul (no!): - // Use karatsuba method, with "mul" as recursive multiplier, - // so will reduce sizes of products on recursive calls, - // and QuickMul will take over if they fall within it's range. - // - recMulKaratsuba mul p q - - -//---------------------------------------------------------------------------- -// division - scaleSubInPlace -//-------------------------------------------------------------------------- - - let scaleSubInPlace x f a n = - // Have x = sumR 0 xd (\i.xi.B^i) where xd = degree x - // a = sumR 0 ad (\i.digitsi.B^i) where ad = degree a - // f < B - // n < xd - // Assumes "f.digits.B^n < x". - // Required to remove f.digits.B^n from x place. - //------ - // Result = x_initial - f.digits.B^n - // = x_initial - f.[sumR 0 ad (\i.digitsi.B^(i+n))] - // State: j = 0 - // z = f * a0 - // Invariant(x,z,j,n): - // P1: x_result = x - z.B^(j+n) - f.[sumR (j+1) ad (\i.digitsi.B^i+n)] - // P2: z < B^2 - 1, and so has form z = zHi.B + zLo for zHi,zLo < B. - // Base: Invariant holds initially. - // Step: (a) Remove zLo from x: - // If zLo <= x_(j+n) then zLo <- 0 - // x_(j+n) <- x_(j+n) - zLo - // else zLo <- 0 - // x_(j+n) <- x_(j+n) + (B - zLo) - // = x_(j+n) - zLo + B - // zHi <- zHi + 1 - // Here, invariant P1 still holds, P2 may break. - // (b) Advance j: - // Have z = zHi.B since zLo = 0. - // j <- j + 1 - // z <- zHi + f * a_(j+1) - // P2 holds: - // Have z <= B + (B-1)*(B-1) = B + B^2 - 2B + 1 = B^2 - B + 1 - // Have z <= B^2 - 1 when B >= 2 which is required for B being a base. - // P1 holds, - // moved f.digits_(j+1).B^(j+1+n) factor over. - // - // Once j+1 exceeds ad, summation is zero and it contributes no more terms (b). - // Continue until z = 0, which happens since z decreases towards 0. - // Done. - // - let invariant (z,j,n) = () - #if CHECKED - let x_initial = copyN x - let x_result = sub x_initial (shiftUp n (scale f a)) - let invariant (z,j,n) = - let P1 = - equal - x_result - (sub x (add (shiftUp (j+n) (embed64 z)) - (mul (embed f) - (shiftUp (j+1+n) (shiftDown (j+1) a))))) - let P2 = z < baseNi64 * baseNi64 - 1L - check P1 "P1"; - check P2 "P2" - - #endif - let xres = x - let x,xd = x.digits,degree x - let a,ad = a.digits,degree a - let f = int64 f - let mutable j = 0 - let mutable z = f * int64 a.[0] - while( z > 0L || j < ad ) do - if j > xd then failwith "scaleSubInPlace: pre-condition did not apply, result would be -ve"; - invariant(z,j,n); // P1,P2 hold - let mutable zLo = mod64base z |> int32 - let mutable zHi = div64base z - if zLo <= x.[j+n] then - x.[j+n] <- x.[j+n] - zLo - else ( - x.[j+n] <- x.[j+n] + (baseN - zLo); - zHi <- zHi + 1L - ); - // P1 holds - if j < ad then - z <- zHi + f * int64 a.[j+1] - else - z <- zHi; - j <- j + 1; - // P1,P2 hold - done; - ignore (normN xres) - - // - let scaleSub x f a n = - let freshx = add x zero - scaleSubInPlace freshx f a n; - normN freshx -(* - - let scaleSub2 x f a n = sub x (shiftUp n (mul (embed f) a)) - - let x = (mul (embed 234234234) (pow (embed 10) (embed 20))) - let f = 2 - let a = (embed 1231231231) - let n = 2 - let res = scaleSub x f a n - let res2 = scaleSub2 x f a n - - let x, xd, f, a, ad, n = freshx.digits, freshx.bound, f, a.digits, a.bound, n - *) - - -//---------------------------------------------------------------------------- -// division - scaleAddInPlace -//-------------------------------------------------------------------------- - - let scaleAddInPlace x f a n = - // Have x = sumR 0 xd (\i.xi.B^i) - // a = sumR 0 ad (\i.digitsi.B^i) - // f < B - // n < xd - // Required to add f.digits.B^n to x place. - // Assumes result will fit with x (0...xd). - //------ - // Result = x_initial + f.digits.B^n - // = x_initial + f.[sumR 0 ad (\i.digitsi.B^i+n)] - // State: j = 0 - // z = f * a0 - // Invariant(x,z,j,n): - // P1: x_result = x + z.B^(j+n) + f.[sumR (j+1) ad (\i.digitsi.B^i+n)] - // P2: z < B^2 - 1, and so has form z = zHi.B + zLo for zHi,zLo < B. - // Base: Invariant holds initially. - // Step: (a) Add zLo to x: - // If zLo < B - x_(j+n) then zLo <- 0 - // x_(j+n) <- x_(j+n) + zLo - // else zLo <- 0 - // x_(j+n) <- zLo - (B - x_(j+n)) - // = x_(j+n) + zLo - B - // zHi <- zHi + 1 - // Here, invariant P1 still holds, P2 may break. - // (b) Advance j: - // Have z = zHi.B since zLo = 0. - // j <- j + 1 - // z <- zHi + f * a_(j+1) - // P2 holds: - // Have z <= B + (B-1)*(B-1) = B + B^2 - 2B + 1 = B^2 - B + 1 - // Have z <= B^2 - 1 when B >= 2 which is required for B being a base. - // P1 holds, - // moved f.digits_(j+1).B^(j+1+n) factor over. - // - // Once j+1 exceeds ad, summation is zero and it contributes no more terms (b). - // Continue until z = 0, which happens since z decreases towards 0. - // Done. - // - let invariant (z,j,n) = () -#if CHECKED - let x_initial = copyN x - let x_result = add x_initial (shiftUp n (scale f a)) - let invariant (z,j,n) = - let P1 = - equal - x_result - (add x (add (shiftUp (j+n) (embed64 z)) - (mul (embed f) - (shiftUp (j+1+n) (shiftDown (j+1) a))))) - let P2 = z < baseNi64 * baseNi64 - 1L - check P1 "P1"; - check P2 "P2" - -#endif - let xres = x - let x,xd = x.digits,degree x - let a,ad = a.digits,degree a - let f = int64 f - let mutable j = 0 - let mutable z = f * int64 a.[0] - while( z > 0L || j < ad ) do - if j > xd then failwith "scaleSubInPlace: pre-condition did not apply, result would be -ve"; - invariant(z,j,n); // P1,P2 hold - let mutable zLo = mod64base z |> int32 - let mutable zHi = div64base z - if zLo < baseN - x.[j+n] then - x.[j+n] <- x.[j+n] + zLo - else ( - x.[j+n] <- zLo - (baseN - x.[j+n]); - zHi <- zHi + 1L - ); - // P1 holds - if j < ad then - z <- zHi + f * int64 a.[j+1] - else - z <- zHi; - j <- j + 1; - // P1,P2 hold - done; - ignore (normN xres) - - // - let scaleAdd x f a n = - let freshx = add x zero - scaleAddInPlace freshx f a n; - normN freshx - -(* - let scaleAdd2 x f a n = add x (shiftUp n (mul (embed f) a)) - - let x = (mul (embed 234234234) (pow (embed 10) (embed 20))) - let f = 2 - let a = (embed 1231231231) - let n = 2 - let res = scaleAdd x f a n - let res2 = scaleAdd2 x f a n - - let x, xd, f, a, ad, n = freshx.digits, freshx.bound, f, a.digits, a.bound, n -*) - -//---------------------------------------------------------------------------- -// division - removeFactor -//-------------------------------------------------------------------------- - - (* - let removeFactorReference x a n = - let ff = div x (shiftUp n a) - to_int ff - *) - - let removeFactor x a n = - // Assumes x < a.B^(n+1) - // Choose f s.t. - // (a) f.digits.B^n <= x - // (b) f=0 iff x < a.B^n - // - let dega,degx = degree a,degree x - if degx < dega + n then 0 else // possible with "normalisation" - let aa,xa = a.digits,x.digits - let f = - if dega = 0 then // a = a0 - if degx = n then - xa.[n] / aa.[0] - else ( -#if CHECKED - check (degx = n+1) "removeFactor degx#1"; -#endif - let f64 = (int64 xa.[degx] * baseNi64 + int64 xa.[degx-1]) / int64 aa.[0] - int32 f64 - ) - else // a = sumR 0 dega (\i.digitsi.B^i) - if degx = dega + n then - xa.[degx] / (aa.[dega] + 1) // +1 to bound above a - else ( -#if CHECKED - check (degx = dega+n+1) "removeFactor degx#2"; -#endif - let f64 = (int64 xa.[degx] * baseNi64 + int64 xa.[degx-1]) - / (int64 aa.[dega] + 1L) // +1 to bound above a - int32 f64 - ) - - if f = 0 then - let lte = (shiftCompare a n x 0) <> 1 - if lte then 1 else 0 - else - f - - -//---------------------------------------------------------------------------- -// division - divmod -//-------------------------------------------------------------------------- - - let divmod b a = - // Returns d,r where b = d.digits + r and r0 then - scaleSubInPlace x f a n; - scaleAddInPlace d f one n; - Invariant(d,x,n,p) - else - finished <- f=0 && n=0; - if not finished then - if p = m+n then - Invariant(d,x,n-1,p); - n <- n-1 - else - Invariant(d,x,n-1,p-1); - n <- n-1; - p <- p-1 - // Have: "b = d.digits + x" return d,x - normN d,normN x - - //---------------------------------------------------------------------------- - // div, mod - //-------------------------------------------------------------------------- - - [] - let div b a = fst (divmod b a) - [] - let rem b a = snd (divmod b a) - // rem b a, for small a can do (base mod a) trick - O(N) - - - //---------------------------------------------------------------------------- - // hcf - //-------------------------------------------------------------------------- - - let hcf a b = - // Have: 0 <= a,b since naturals - let rec hcfloop a b = // Require: 0 <= a <= b - if equal zero a then b - else - // Have: 0 < a <= b - let d,r = divmod b a - // Have: r < a from divmod - hcfloop r a // Have: 0 <= r < a - - if lt a b then hcfloop a b // Have: 0 <= a < b - else hcfloop b a // Have: 0 <= b <= a - - //---------------------------------------------------------------------------- - // pow - //-------------------------------------------------------------------------- - - let two = embed 2 - let powi x n = - let rec power acc x n = - if n=0 then acc - elif n % 2=0 then power acc (mul x x) (n / 2) - else power (mul x acc) (mul x x) (n / 2) - - power one x n - - let pow x n = - let rec power acc x n = - if isZero n then acc - else - let ndiv2,nmod2 = divmod n two // use: intdivmod when available - if isZero nmod2 then power acc (mul x x) ndiv2 - else power (mul x acc) (mul x x) ndiv2 - - power one x n - -//---------------------------------------------------------------------------- -// float n -//-------------------------------------------------------------------------- - - let to_float n = - let basef = float baseN - let rec evalFloat acc k i = - if i = n.bound then - acc - else - evalFloat (acc + k * float n.digits.[i]) (k * basef) (i+1) - evalFloat 0.0 1.0 0 - -//---------------------------------------------------------------------------- -// n <-> int -//-------------------------------------------------------------------------- - - let of_int n = embed n - let of_int64 n = embed64 n - - /// Convert BigNat to uint32 otherwise OverflowException. - let to_uint32 n = - match n.bound with - | 0 -> 0u - | 1 -> n.digits.[0] |> uint32 - | 2 -> let xA,xB = n.digits.[0],n.digits.[1] - if xB > baseMask32B then raise (System.OverflowException()) - ( uint32 (xA &&& baseMask32A)) + - ((uint32 (xB &&& baseMask32B)) <<< baseShift32B) - | _ -> raise (System.OverflowException()) - - /// Convert BigNat to uint64 otherwise OverflowException. - let to_uint64 n = - match n.bound with - | 0 -> 0UL - | 1 -> n.digits.[0] |> uint64 - | 2 -> let xA,xB = n.digits.[0],n.digits.[1] - ( uint64 (xA &&& baseMask64A)) + - ((uint64 (xB &&& baseMask64B)) <<< baseShift64B) - | 3 -> let xA,xB,xC = n.digits.[0],n.digits.[1],n.digits.[2] - if xC > baseMask64C then raise (System.OverflowException()) - ( uint64 (xA &&& baseMask64A)) + - ((uint64 (xB &&& baseMask64B)) <<< baseShift64B) + - ((uint64 (xC &&& baseMask64C)) <<< baseShift64C) - | _ -> raise (System.OverflowException()) - - -//---------------------------------------------------------------------------- -// n -> string -//-------------------------------------------------------------------------- - - -#if CHECKED - let checks = false -#endif - let to_string n = - // Much better complexity than naive_string_of_z. - // It still does "nDigit" calls to (int)divmod, - // but the degree on which it is called halves (not decrements) each time. - // - let degn = degree n - let rec route prior k ten2k = - if degree ten2k > degn - then (k,ten2k)::prior - else route ((k,ten2k)::prior) (k+1) (mul ten2k ten2k) - let kten2ks = route [] 0 (embed 10) - let rec collect isLeading digits n = function - | [] -> - // Have 0 <= n < 10^1, so collect a single digit (if needed) - let n = eval n -#if CHECKED - if checks then check (0 <= n) "to_string: digit0"; - if checks then check (n <= 9) "to_string: digit9"; -#endif - if isLeading && n=0 then digits // suppress leading 0 - else string_of_int n :: digits - | (k,ten2k)::prior -> -#if CHECKED - if checks then check (lt n (mul ten2k ten2k)) "string_of_int: bound n"; -#endif - // Have 0 <= n < (ten2k)^2 and ten2k = 10^(2^k) - let nH,nL = divmod n ten2k -#if CHECKED - if checks then check (lt nH ten2k) "string_of_int: bound nH"; - if checks then check (lt nL ten2k) "string_of_int: bound nL"; -#endif - // Have 0 <= nH,nL < (ten2k) and ten2k = 10^(2^k) - if isLeading && isZero nH then - // suppress leading 0s - let digits = collect isLeading digits nL prior - digits - else - let digits = collect false digits nL prior - let digits = collect isLeading digits nH prior - digits - - let prior = kten2ks - let digits = collect true [] n prior - match digits with - | [] -> "0" - | _ -> digits |> Array.of_list |> System.String.Concat - -//---------------------------------------------------------------------------- -// n <- string -//-------------------------------------------------------------------------- - - let of_string (str:string) = - // Would it be better to split string half and combine results? - let len = str.Length - if System.String.IsNullOrEmpty str then invalidArg "str" "empty string"; - let ten = embed 10 - let rec build acc i = - if i=len then - acc - else - let c = str.[i] - let d = int c - int '0' - if 0 <= d && d <= 9 then - build (add (mul ten acc) (embed d)) (i+1) - else - invalidArg "str" "the string was not a valid number" - - build (embed 0) 0 - - let is_small n = (n.bound <= 1) - let get_small n = index n 0 - - //---------------------------------------------------------------------------- - // factorial - //-------------------------------------------------------------------------- - - let factorial n = - //***** - // Factorial(n) = 1.2.3.....(n-1).n - // - // Factorial is sometimes used as a test for multiplication. - // The QuickMul FFT multiplier takes over only when both operands reach a given size. - // How to compute factorial? - // - // (a) Factorial(n) = factorial(n-1).n - // This is unlikely to make use of the FFT (n never large enough). - // (b) Factorial(n) = (1.2.3.4....k) . (k.[k+1]...(n-1).n) - // Applied recursively QuickMul FFT will take over on large products. - // - //**** - let rec productR a b = - if equal a b then a - else - let m = div (add a b) (of_int 2) - mul (productR a m) (productR (add m one) b) - - productR one n - - -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/n.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/n.fsi deleted file mode 100644 index e3abc15b..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/n.fsi +++ /dev/null @@ -1,61 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Math - -#if FX_ATLEAST_40 -#else -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Core - -/// Abstract internal type -type internal BigNat - -module internal BigNatModule = - - val zero : BigNat - val one : BigNat - val two : BigNat - - val add : BigNat -> BigNat -> BigNat - val sub : BigNat -> BigNat -> BigNat - val mul : BigNat -> BigNat -> BigNat - val divmod : BigNat -> BigNat -> BigNat * BigNat - val div : BigNat -> BigNat -> BigNat - val rem : BigNat -> BigNat -> BigNat - val hcf : BigNat -> BigNat -> BigNat - - val min : BigNat -> BigNat -> BigNat - val max : BigNat -> BigNat -> BigNat - val scale : int -> BigNat -> BigNat - val powi : BigNat -> int -> BigNat - val pow : BigNat -> BigNat -> BigNat - - val IsZero : BigNat -> bool - val isZero : BigNat -> bool - val isOne : BigNat -> bool - val equal : BigNat -> BigNat -> bool - val compare : BigNat -> BigNat -> int - val lt : BigNat -> BigNat -> bool - val gt : BigNat -> BigNat -> bool - val lte : BigNat -> BigNat -> bool - val gte : BigNat -> BigNat -> bool - - val hash : BigNat -> int - val to_float : BigNat -> float - val of_int : int -> BigNat - val of_int64 : int64 -> BigNat - val to_string : BigNat -> string - val of_string : string -> BigNat - - val to_uint32 : BigNat -> uint32 - val to_uint64 : BigNat -> uint64 - - val factorial : BigNat -> BigNat - // val randomBits : int -> BigNat - val bits : BigNat -> int - val is_small : BigNat -> bool (* will fit in int32 (but not nec all int32) *) - val get_small : BigNat -> int32 (* get the value, if it satisfies is_small *) - -#endif \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/z.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/z.fs deleted file mode 100644 index f8838266..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/z.fs +++ /dev/null @@ -1,433 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#nowarn "44" // This construct is deprecated. This function is for use by compiled F# code and should not be used directly - -namespace Microsoft.FSharp.Math - -#if FX_ATLEAST_40 - type BigInt = System.Numerics.BigInteger - type bigint = System.Numerics.BigInteger -#else - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Primitives.Basics - open Microsoft.FSharp.Math - open System - open System.Globalization - - - // INVARIANT: signInt = 1 or -1 - // value(z) = signInt * v - // NOTE: 0 has two repns (+1,0) or (-1,0). - [] - [] - [] - type BigInt(signInt:int, v : BigNat) = - - //new() = new BigInt(0,0) - - static let smallLim = 4096 - static let smallPosTab = Array.init smallLim BigNatModule.of_int - static let one = BigInt(1) - static let zero = BigInt(0) - - static member internal nat n = - if BigNatModule.is_small n && BigNatModule.get_small n < smallLim - then smallPosTab.[BigNatModule.get_small n] - else n - static member internal create (s,n) = BigInt(s,BigInt.nat n) - static member internal posn n = BigInt(1,BigInt.nat n) - static member internal negn n = BigInt(-1,BigInt.nat n) - - - member x.Sign = if x.IsZero then 0 else signInt - member x.SignInt = signInt - member internal x.V = v - - static member op_Equality (x:BigInt, y:BigInt) = - //System.Console.WriteLine("x = {0}",box x) - //System.Console.WriteLine("y = {0}",box y) - match x.SignInt,y.SignInt with - | 1, 1 -> BigNatModule.equal x.V y.V // +1.xv = +1.yv iff xv = yv - | -1, -1 -> BigNatModule.equal x.V y.V // -1.xv = -1.yv iff xv = yv - | 1,-1 -> BigNatModule.isZero x.V && BigNatModule.isZero y.V // 1.xv = -1.yv iff xv=0 and yv=0 - | -1, 1 -> BigNatModule.isZero x.V && BigNatModule.isZero y.V // -1.xv = 1.yv iff xv=0 and yv=0 - | _ -> invalidArg "x" "signs should be +/- 1" - - static member op_Inequality (x:BigInt, y:BigInt) = not (BigInt.op_Equality(x,y)) // CA2226: OperatorsShouldHaveSymmetricalOverloads - - static member op_LessThan (x:BigInt, y:BigInt) = - match x.SignInt,y.SignInt with - | 1, 1 -> BigNatModule.lt x.V y.V // 1.xv < 1.yv iff xv < yv - | -1,-1 -> BigNatModule.lt y.V x.V // -1.xv < -1.yv iff yv < xv - | 1,-1 -> false // 1.xv < -1.yv iff 0 <= 1.xv < -1.yv <= 0 iff false - | -1, 1 -> not (BigNatModule.isZero x.V) || not (BigNatModule.isZero y.V) - // -1.xv < 1.yv - // (a) xv=0 and yv=0, then false - // (b) xv<>0, -1.xv < 0 <= 1.yv, so true - // (c) yv<>0, -1.xv <= 0 < 1.yv, so true - | _ -> invalidArg "x" "signs should be +/- 1" - - static member op_GreaterThan (x:BigInt, y:BigInt) = // Follow lt by +/- symmetry - match x.SignInt,y.SignInt with - | 1, 1 -> BigNatModule.gt x.V y.V - | -1,-1 -> BigNatModule.gt y.V x.V - | 1,-1 -> not (BigNatModule.isZero x.V) || not (BigNatModule.isZero y.V) - | -1, 1 -> false - | _ -> invalidArg "x" "signs should be +/- 1" - - static member internal compare(n,nn) = if BigInt.op_LessThan(n,nn) then -1 elif BigInt.op_Equality(n,nn) then 0 else 1 - static member internal hash (z:BigInt) = z.SignInt + BigNatModule.hash(z.V) - - override x.ToString() = - match x.SignInt with - | 1 -> BigNatModule.to_string x.V // positive - | -1 -> - if BigNatModule.isZero x.V - then "0" // not negative infact, but zero. - else "-" + BigNatModule.to_string x.V // negative - | _ -> invalidArg "x" "signs should be +/- 1" - - member x.StructuredDisplayString = x.ToString() - - interface System.IComparable with - member this.CompareTo(obj:obj) = - match obj with - | :? BigInt as that -> BigInt.compare(this,that) - | _ -> invalidArg "obj" "the objects are not comparable" - - override this.Equals(obj) = - match obj with - | :? BigInt as that -> BigInt.op_Equality(this, that) - | _ -> false - - override x.GetHashCode() = BigInt.hash(x) - - - [] - new (n:int) = - if n>=0 - then BigInt (1,BigInt.nat(BigNatModule.of_int n)) - elif (n = System.Int32.MinValue) - then BigInt(-1,BigInt.nat(BigNatModule.of_int64 (-(int64 n)))) - else BigInt(-1,BigInt.nat(BigNatModule.of_int (-n))) - - static member ToInt32(z:BigInt) = - let u = BigNatModule.to_uint32 z.V - if u <= uint32 System.Int32.MaxValue then - (* Handle range [-MaxValue,MaxValue] *) - z.SignInt * int32 u - elif z.SignInt = -1 && u = uint32 (System.Int32.MaxValue + 1) then - //assert(System.Int32.MinValue = 0 - System.Int32.MaxValue - 1) - (* Handle MinValue = -(MaxValue+1) special case not covered by the above *) - System.Int32.MinValue - else - raise (System.OverflowException()) - - [] - new (n:int64) = - if n>=0L - then BigInt(1,BigInt.nat (BigNatModule.of_int64 n)) - elif (n = System.Int64.MinValue) - then BigInt(-1,BigInt.nat (BigNatModule.add (BigNatModule.of_int64 System.Int64.MaxValue) BigNatModule.one) ) - else BigInt(-1,BigInt.nat (BigNatModule.of_int64 (-n))) - - static member ToInt64(z:BigInt) = - let u = BigNatModule.to_uint64 z.V - if u <= uint64 System.Int64.MaxValue then - (* Handle range [-MaxValue,MaxValue] *) - int64 z.SignInt * int64 u - elif z.SignInt = -1 && u = uint64 (System.Int64.MaxValue + 1L) then - //assert(System.Int64.MinValue = 0 - System.Int64.MaxValue - 1L) - (* Handle MinValue = -(MaxValue+1) special case not covered by the above *) - System.Int64.MinValue - else - raise (System.OverflowException()) - - static member One = one - static member Zero = zero - static member (~-) (z:BigInt) = BigInt.create(-1 * z.SignInt,z.V) - static member Scale(k,z:BigInt) = - if k<0 - then BigInt.create(-z.SignInt, (BigNatModule.scale (-k) z.V)) // k.zsign.zv = -zsign.(-k.zv) - else BigInt.create(z.SignInt, (BigNatModule.scale k z.V)) // k.zsign.zv = zsign.k.zv - - // Result: 1.nx - 1.ny (integer subtraction) - static member internal subnn (nx,ny) = - if BigNatModule.gte nx ny - then BigInt.posn (BigNatModule.sub nx ny) // nx >= ny, result +ve, +1.(nx - ny) - else BigInt.negn (BigNatModule.sub ny nx) // nx < ny, result -ve, -1.(ny - nx) - - static member internal addnn (nx,ny) = - BigInt.posn (BigNatModule.add nx ny) // Compute "nx + ny" to be integer - - member x.IsZero = BigNatModule.isZero x.V // signx.xv = 0 iff xv=0, since signx is +1,-1 - member x.IsOne = (x.SignInt = 1) && BigNatModule.isOne x.V // signx.xv = 1 iff signx = +1 and xv = 1 - static member (+) (x:BigInt,y:BigInt) = - if y.IsZero then x else - if x.IsZero then y else - match x.SignInt,y.SignInt with - | 1, 1 -> BigInt.addnn(x.V,y.V) // 1.xv + 1.yv = (xv + yv) - | -1,-1 -> -(BigInt.addnn(x.V,y.V)) // -1.xv + -1.yv = -(xv + yv) - | 1,-1 -> BigInt.subnn (x.V,y.V) // 1.xv + -1.yv = (xv - yv) - | -1, 1 -> BigInt.subnn(y.V,x.V) // -1.xv + 1.yv = (yv - xv) - | _ -> invalidArg "x" "signs should be +/- 1" - - static member (-) (x:BigInt,y:BigInt) = - if y.IsZero then x else - match x.SignInt,y.SignInt with - | 1, 1 -> BigInt.subnn(x.V,y.V) // 1.xv - 1.yv = (xv - yv) - | -1,-1 -> BigInt.subnn(y.V,x.V) // -1.xv - -1.yv = (yv - xv) - | 1,-1 -> BigInt.addnn(x.V,y.V) // 1.xv - -1.yv = (xv + yv) - | -1, 1 -> -(BigInt.addnn(x.V,y.V)) // -1.xv - 1.yv = -(xv + yv) - | _ -> invalidArg "x" "signs should be +/- 1" - - static member ( * ) (x:BigInt,y:BigInt) = - if x.IsZero then x - elif y.IsZero then y - elif x.IsOne then y - elif y.IsOne then x - else - let m = (BigNatModule.mul x.V y.V) -// sample "smallMulResult" (BigNatModule.is_small m) smallMulResult - BigInt.create (x.SignInt * y.SignInt,m) // xsign.xv * ysign.yv = (xsign.ysign).(xv.yv) - - static member DivRem (x:BigInt,y:BigInt) = - let d,r = BigNatModule.divmod x.V y.V - // HAVE: |x| = d.|y| + r and 0 <= r < |y| - // HAVE: xv = d.yv + r and 0 <= r < yv - match x.SignInt,y.SignInt with - | 1, 1 -> BigInt.posn d,BigInt.posn r // 1.xv = 1.d.( 1.yv) + ( 1.r) - | -1,-1 -> BigInt.posn d,BigInt.negn r // -1.xv = 1.d.(-1.yv) + (-1.r) - | 1,-1 -> BigInt.negn d,BigInt.posn r // 1.xv = -1.d.(-1.yv) + ( 1.r) - | -1, 1 -> BigInt.negn d,BigInt.negn r // -1.xv = -1.d.( 1.yv) + (-1.r) - | _ -> invalidArg "x" "signs should be +/- 1" - - static member (/) (x:BigInt,y:BigInt) = fst (BigInt.DivRem(x,y)) - static member (%) (x:BigInt,y:BigInt) = snd (BigInt.DivRem(x,y)) - static member Gcd (x:BigInt,y:BigInt) = BigInt.posn (BigNatModule.hcf x.V y.V) // hcf (xsign.xv,ysign.yv) = hcf (xv,yv) - -(* - let min (x:BigInt) (y:BigInt) = - match x.SignInt,y.SignInt with - | 1, 1 -> if BigNatModule.lte(x.V,y.V) then x else y // if xv <= yv then 1.xv <= 1.yv - | -1,-1 -> if BigNatModule.lte(x.V,y.V) then y else x // if xv <= yv then -1.yv <= -1.xv - | 1,-1 -> y // -1.yv <= 1.xv - | -1, 1 -> x // -1.xv <= 1.yv - | _ -> invalidArg "x" "signs should be +/- 1" - - let max (x:BigInt) (y:BigInt) = - match x.SignInt,y.SignInt with - | 1, 1 -> if BigNatModule.gte(x.V,y.V) then x else y // if xv >= yv then 1.xv >= 1.yv - | -1,-1 -> if BigNatModule.gte(x.V,y.V) then y else x // if xv >= yv then -1.yv >= -1.xv - | 1,-1 -> x // 1.xv >= -1.yv - | -1, 1 -> y // 1.yv >= -1.xv - | _ -> invalidArg "x" "signs should be +/- 1" -*) - member x.IsNegative = x.SignInt = -1 && not (x.IsZero) // signx.xv < 0 iff signx = -1 and xv<>0 - member x.IsPositive = x.SignInt = 1 && not (x.IsZero) // signx.xv > 0 iff signx = +1 and xv<>0 - static member Abs (x:BigInt) = if x.SignInt = -1 then -x else x - - static member op_LessThanOrEqual (x:BigInt,y:BigInt) = - match x.SignInt,y.SignInt with - | 1, 1 -> BigNatModule.lte x.V y.V // 1.xv <= 1.yv iff xv <= yv - | -1,-1 -> BigNatModule.lte y.V x.V // -1.xv <= -1.yv iff yv <= xv - | 1,-1 -> BigNatModule.isZero x.V && BigNatModule.isZero y.V // 1.xv <= -1.yv, - // (a) if xv=0 and yv=0 then true - // (b) otherwise false, only meet at zero. - - | -1, 1 -> true // -1.xv <= 1.yv, true - | _ -> invalidArg "x" "signs should be +/- 1" - - static member op_GreaterThanOrEqual (x:BigInt,y:BigInt) = // Follow lte by +/- symmetry - match x.SignInt,y.SignInt with - | 1, 1 -> BigNatModule.gte x.V y.V - | -1,-1 -> BigNatModule.gte y.V x.V - | 1,-1 -> true - | -1, 1 -> BigNatModule.isZero x.V && BigNatModule.isZero y.V - | _ -> invalidArg "x" "signs should be +/- 1" - - static member internal powi (z:BigInt,i) = - if i>=0 then - // (signz.zv)^i = (signz^i) .(zv^i) - // = (signz^(i mod 2)).(zv^i) since signInt is 1,-1 - // = either 1.zv^i when i mod 2 = 0 (even power kills signInt) - // or signz.zv^i when i mod 2 = 1 (odd power keeps signInt) - - BigInt.create ((if i % 2 = 0 then 1 else z.SignInt), BigNatModule.powi z.V i) - else - invalidArg "i" "unexpected negative exponent" - - static member Pow (z:BigInt,i:BigInt) = - if not i.IsNegative then - BigInt.create ((if BigNatModule.isZero (BigNatModule.rem i.V BigNatModule.two) then 1 else z.SignInt), BigNatModule.pow z.V i.V) - else - invalidArg "i" "unexpected negative exponent" - - static member ToDouble(x:BigInt) = - match x.SignInt with - | 1 -> BigNatModule.to_float x.V // float (1.xv) = float (xv) - | -1 -> - (BigNatModule.to_float x.V) // float (-1.xv) = - float (xv) - | _ -> invalidArg "x" "signs should be +/- 1" - - static member Parse(str:string) = - let len = str.Length - if len = 0 then invalidArg "str" "empty string"; - if str.[0..0] = "-" then - BigInt.negn (BigNatModule.of_string str.[1..len-1]) - else - BigInt.posn (BigNatModule.of_string str) - - member internal x.IsSmall = BigNatModule.is_small (x.V) - static member Factorial (x:BigInt) = - if x.IsNegative then invalidArg "x" "the input was negative" - elif x.IsPositive then BigInt.posn (BigNatModule.factorial x.V) - else BigInt.One - - static member ( ~+ )(n1:BigInt) = n1 - static member (..) (n1:BigInt,n2:BigInt) = OperatorIntrinsics.RangeStepGeneric(BigInt.Zero,(+),n1,BigInt.One,n2) - static member (.. ..) (n1:BigInt,step:BigInt,n2:BigInt) = OperatorIntrinsics.RangeStepGeneric(BigInt.Zero,(+),n1,step,n2) - - static member FromInt64(x:int64) = new BigInt(x) - static member FromInt32(x:int32) = new BigInt(x) - - type bigint = BigInt - -namespace Microsoft.FSharp.Core - -#if FX_ATLEAST_40 - // The "bigint" type alias is not defined in the FSharp.Core namespace in Dev10. - type bigint = - | NotDefined -#else - type bigint = Microsoft.FSharp.Math.BigInt -#endif - open System - open System.Diagnostics.CodeAnalysis - open System.Globalization - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Math - -#if FX_ATLEAST_40 - // No need for FxCop suppressions on Dev10 -#else - // FxCop suppressions - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - do() -#endif - - [] - module NumericLiterals = - -#if FX_ATLEAST_40 - module NumericLiteralI = - let numTy = System.Reflection.Assembly.Load("System").GetType("System.Numerics.BigInteger") - let meth64 = numTy.GetConstructor([|typeof|]) - let methString = numTy.GetMethod("Parse",[|typeof; typeof; typeof |]) - - let tab64 = new System.Collections.Generic.Dictionary() - let tabParse = new System.Collections.Generic.Dictionary() - let FromInt64Dynamic (x64:int64) : obj = - lock tab64 (fun () -> - let mutable res = Unchecked.defaultof<_> - let ok = tab64.TryGetValue(x64,&res) - if ok then res else - res <- meth64.Invoke [| box x64 |] - tab64.[x64] <- res - res) - - let inline get32 (x32:int32) = FromInt64Dynamic (int64 x32) - - let inline isOX s = not (System.String.IsNullOrEmpty(s)) && s.Length > 2 && s.[0] = '0' && s.[1] = 'x' - - let FromStringDynamic (s:string) : obj = - lock tabParse (fun () -> - let mutable res = Unchecked.defaultof<_> - let ok = tabParse.TryGetValue(s,&res) - if ok then res else - res <- - if isOX s then - methString.Invoke(null,[| box s; box NumberStyles.AllowHexSpecifier; box CultureInfo.InvariantCulture |] ) - else - methString.Invoke(null,[| box s; box NumberStyles.AllowLeadingSign; box CultureInfo.InvariantCulture |] ) - - tabParse.[s] <- res - res) - - let inline FromZero () : 'T = - (get32 0 :?> 'T) - when 'T : bigint = BigInt.Zero - - let inline FromOne () : 'T = - (get32 1 :?> 'T) - when 'T : bigint = BigInt.One - - let inline FromInt32 (i:int32): 'T = - (get32 i :?> 'T) - when 'T : bigint = new BigInt(i) - - let inline FromInt64 (i:int64): 'T = - (FromInt64Dynamic i :?> 'T) - when 'T : bigint = new BigInt(i) - - let inline FromString (s:string) : 'T = - (FromStringDynamic s :?> 'T) - when 'T : bigint = - if isOX s then - BigInt.Parse (s.[2..],NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture) - else - BigInt.Parse (s,NumberStyles.AllowLeadingSign,CultureInfo.InvariantCulture) - -#else - module NumericLiteralI = - let tab64 = new System.Collections.Generic.Dictionary() - let get64 (x64:int64) = - lock tab64 (fun () -> - let mutable res = Unchecked.defaultof<_> - let ok = tab64.TryGetValue(x64,&res) - if ok then res else - res <- BigInt.FromInt64 x64 - tab64.[x64] <- res - res) - - let get32 (x32:int32) = get64 (int64 x32) - - let tabParse = new System.Collections.Generic.Dictionary() - let getParse s = - lock tabParse (fun () -> - let mutable res = Unchecked.defaultof<_> - let ok = tabParse.TryGetValue(s,&res) - if ok then res else - res <- BigInt.Parse s - tabParse.[s] <- res - res) - - let FromZero () = BigInt.Zero - let FromOne () = BigInt.One - let FromInt32 i = get32 i - let FromInt64 i = get64 i - let FromString s = getParse s - - module NumericLiteralN = - let FromZero () = failwith "this code should not be reachable" - let FromOne () = failwith "this code should not be reachable" - let FromInt32 (i:int32) = failwith "this code should not be reachable" - let FromInt64 (i64:int64) = failwith "this code should not be reachable" - let FromString (s:string) = failwith "this code should not be reachable" -#endif // FX_ATLEAST_40 - -#endif - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/z.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/z.fsi deleted file mode 100644 index 0334050b..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/math/z.fsi +++ /dev/null @@ -1,158 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// This namespace contains numerical and mathematical types such as arbitrarily sized integers -namespace Microsoft.FSharp.Math - - open System - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - -#if FX_ATLEAST_40 - type BigInt = System.Numerics.BigInteger - type bigint = System.Numerics.BigInteger -#else - /// The type of arbitrary-sized integers - [] - [] - type BigInt = - /// Return the sum of two big integers - static member ( + ) : x:BigInt * y:BigInt -> BigInt - /// Return the modulus of big integers - static member ( % ) : x:BigInt * y:BigInt -> BigInt - /// Return the product of big integers - static member ( * ) : x:BigInt * y:BigInt -> BigInt - /// Return the difference of big integers - static member ( - ) : x:BigInt * y:BigInt -> BigInt - /// Return the ratio of big integers - static member ( / ) : x:BigInt * y:BigInt -> BigInt - /// Return the negation of a big integer - static member (~-) : x:BigInt -> BigInt - /// Return the given big integer - static member (~+) : x:BigInt -> BigInt - /// Generate a range of big integers - static member (..) : start:BigInt * finish:BigInt -> seq - /// Generate a range of big integers, with a step - static member (.. ..) : start:BigInt * step:BigInt * finish:BigInt -> seq - /// Convert a big integer to a floating point number - static member ToDouble : x:BigInt -> float - /// Convert a big integer to a 64-bit signed integer - static member ToInt64 : x:BigInt -> int64 - /// Convert a big integer to a 32-bit signed integer - static member ToInt32 : x:BigInt -> int32 - /// Parse a big integer from a string format - static member Parse : text:string -> BigInt - /// Return the sign of a big integer: 0, +1 or -1 - member Sign : int - /// Compute the factorial function as a big integer - static member Factorial : x:BigInt -> BigInt - /// Compute the ratio and remainder of two big integers - static member DivRem : x:BigInt * y:BigInt -> BigInt * BigInt - - /// This operator is for use from other .NET languages - static member op_LessThan : x:BigInt * y:BigInt -> bool - /// This operator is for use from other .NET languages - static member op_LessThanOrEqual : x:BigInt * y:BigInt -> bool - /// This operator is for use from other .NET languages - static member op_GreaterThan : x:BigInt * y:BigInt -> bool - /// This operator is for use from other .NET languages - static member op_GreaterThanOrEqual : x:BigInt * y:BigInt -> bool - /// This operator is for use from other .NET languages - static member op_Equality : x:BigInt * y:BigInt -> bool - /// This operator is for use from other .NET languages - static member op_Inequality : x:BigInt * y:BigInt -> bool - - /// Return the greatest common divisor of two big integers - static member Gcd : x:BigInt * y:BigInt -> BigInt - /// Return n^m for two big integers - static member Pow : x:BigInt * y:BigInt -> BigInt - /// Compute the absolute value of a big integer - static member Abs : x:BigInt -> BigInt - /// Get the big integer for zero - static member Zero : BigInt - /// Get the big integer for one - static member One : BigInt - - - /// Return true if a big integer is 'zero' - member IsZero : bool - /// Return true if a big integer is 'one' - member IsOne : bool - interface System.IComparable - override Equals : obj -> bool - override GetHashCode : unit -> int - override ToString : unit -> string - - [] - /// Construct a BigInt value for the given integer - new : x:int -> BigInt - [] - /// Construct a BigInt value for the given 64-bit integer - new : x:int64 -> BigInt - - type bigint = BigInt - -namespace Microsoft.FSharp.Core - - open Microsoft.FSharp.Math - -#if FX_ATLEAST_40 - [] - type bigint -#else - /// An abbreviation for the type Microsoft.FSharp.Math.BigInt - [] - type bigint = Microsoft.FSharp.Math.BigInt -#endif - - [] - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - module NumericLiterals = - - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - module NumericLiteralI = -#if FX_ATLEAST_40 - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val inline FromZero : value:unit -> 'T - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val inline FromOne : value:unit -> 'T - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val inline FromInt32 : value:int32 -> 'T - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val inline FromInt64 : value:int64 -> 'T - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val inline FromString : text:string -> 'T - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromInt64Dynamic : value:int64 -> obj - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromStringDynamic : text:string -> obj -#else - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromZero : unit -> bigint - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromOne : unit -> bigint - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromInt32 : value:int32 -> bigint - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromInt64 : value:int64 -> bigint - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromString : text:string -> bigint - - - /// Provide a default implementation of the F# numeric literal syntax 'dddN' - module NumericLiteralN = - [] - val FromZero : unit -> 'a - [] - val FromOne : unit -> 'a - [] - val FromInt32 : int32 -> 'a - [] - val FromInt64 : int64 -> 'a - [] - val FromString : string -> 'a -#endif - -#endif - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/nativeptr.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/nativeptr.fs deleted file mode 100644 index d7ae31a4..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/nativeptr.fs +++ /dev/null @@ -1,57 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.NativeInterop - -#nowarn "44";; -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -open Microsoft.FSharp.Primitives.Basics -open Microsoft.FSharp.Core.Operators - -open System -open System.Diagnostics -open System.Runtime.InteropServices - -[] -[] -module NativePtr = - - [] - [] - let inline of_nativeint (x:nativeint) = (# "" x : nativeptr<'T> #) - - [] - [] - let inline to_nativeint (x: nativeptr<'T>) = (# "" x : nativeint #) - - [] - [] - let inline add (x : nativeptr<'T>) (n:int) : nativeptr<'T> = to_nativeint x + nativeint n * (# "sizeof !0" type('T) : nativeint #) |> of_nativeint - - [] - [] - let inline get (p : nativeptr<'T>) n = (# "ldobj !0" type ('T) (add p n) : 'T #) - - [] - [] - let inline set (p : nativeptr<'T>) n (x : 'T) = (# "stobj !0" type ('T) (add p n) x #) - - [] - [] - let inline read (p : nativeptr<'T>) = (# "ldobj !0" type ('T) p : 'T #) - - [] - [] - let inline write (p : nativeptr<'T>) (x : 'T) = (# "stobj !0" type ('T) p x #) - - [] - [] - let inline of_array (arr: 'T[]) (m:int) : nativeptr<'T> = (# "ldelema !0" type('T) arr m : nativeptr<'T> #) - - [] - [] - let inline of_array2 (arr: 'T[,]) (n:int) (m:int) : nativeptr<'T> = (# "ldelema.multi 2 !0" type('T) arr n m : nativeptr<'T> #) - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/nativeptr.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/nativeptr.fsi deleted file mode 100644 index c6d3a311..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/nativeptr.fsi +++ /dev/null @@ -1,63 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - - -namespace Microsoft.FSharp.NativeInterop - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - [] - [] - /// Contains operations on native pointers. Use of these operators may - /// result in the generation of unverifiable code. - module NativePtr = - - [] - [] - /// Return a typed native pointer for a given machine address - val inline of_nativeint : address:nativeint -> nativeptr<'T> - - [] - [] - /// Return a machine address for a given typed native pointer - val inline to_nativeint : address:nativeptr<'T> -> nativeint - - [] - [] - /// Return a typed native pointer by adding index * sizeof<'T> to the - /// given input pointer - val inline add : address:nativeptr<'T> -> index:int -> nativeptr<'T> - - [] - [] - /// Dereference the typed native pointer computed by adding index * sizeof<'T> to the - /// given input pointer - val inline get : address:nativeptr<'T> -> index:int -> 'T - - [] - [] - /// Dereference the given typed native pointer - val inline read : address:nativeptr<'T> -> 'T - - [] - [] - /// Assign the value into the memory location referenced by the given typed native pointer - val inline write : address:nativeptr<'T> -> value:'T -> unit - - [] - [] - /// Assign the value into the memory location referenced by the typed native - /// pointer computed by adding index * sizeof<'T> to the given input pointer - val inline set : address:nativeptr<'T> -> index:int -> value:'T -> unit - - /// Get the address of an element of a pinned array - [] - [] - val inline of_array: array:'T[] -> index:int -> nativeptr<'T> - - /// Get the address of an element of a pinned 2-dimensional array - [] - [] - val inline of_array2 : array:'T[,] -> index1:int -> index2:int -> nativeptr<'T> diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/option.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/option.fs deleted file mode 100644 index 487c30c2..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/option.fs +++ /dev/null @@ -1,79 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - - -namespace Microsoft.FSharp.Core - - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core.Operators - - [] - module Option = - - [] - let get option = match option with None -> invalidArg "option" "The option value was None" | Some x -> x - - [] - let isSome option = match option with None -> false | Some _ -> true - - [] - let is_some option = match option with None -> false | Some _ -> true - - [] - let isNone option = match option with None -> true | Some _ -> false - - [] - let is_none option = match option with None -> true | Some _ -> false - - [] - let count option = match option with None -> 0 | Some _ -> 1 - - [] - let fold f s inp = match inp with None -> s | Some x -> f s x - - [] - let foldBack f inp s = match inp with None -> s | Some x -> f x s - - [] - let fold_left f s inp = match inp with None -> s | Some x -> f s x - - [] - let fold_right f inp s = match inp with None -> s | Some x -> f x s - - [] - let exists p inp = match inp with None -> false | Some x -> p x - - [] - let forall p inp = match inp with None -> true | Some x -> p x - - [] - let filter p inp = match inp with None -> None | Some x -> if p x then inp else None - - [] - let partition p inp = match inp with None -> None,None | Some x -> if p x then inp,None else None,inp - - [] - let iter f inp = match inp with None -> () | Some x -> f x - - [] - let map f inp = match inp with None -> None | Some x -> Some (f x) - - [] - let bind f inp = match inp with None -> None | Some x -> f x - - [] - let to_array option = match option with None -> [| |] | Some x -> [| x |] - - [] - let to_list option = match option with None -> [ ] | Some x -> [ x ] - - [] - let length option = match option with None -> 0 | Some _ -> 1 - - [] - let for_all p inp = match inp with None -> true | Some x -> p x - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/option.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/option.fsi deleted file mode 100644 index 268c23be..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/option.fsi +++ /dev/null @@ -1,87 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Core - - open System - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - - [] - /// Basic operations on options. - module Option = - - /// Returns true if the option is not None - val isSome: option:'T option -> bool - - /// Returns true if the option is None - val isNone: option:'T option -> bool - - /// Gets the value associated with the option. If the option is None then - /// raises ArgumentException - val get: option:'T option -> 'T - - /// length inp evaluates to match inp with None -> 0 | Some _ -> 1 - val count: option:'T option -> int - - /// fold_left f s inp evaluates to match inp with None -> s | Some x -> f s x - val fold: folder:('State -> 'T -> 'State) -> state:'State -> option:'T option -> 'State - - /// fold_right f inp s evaluates to "match inp with None -> s | Some x -> f x s" - val foldBack: folder:('T -> 'State -> 'State) -> option:'T option -> state:'State -> 'State - - /// exists p inp evaluates to match inp with None -> false | Some x -> p x - val exists: predicate:('T -> bool) -> option:'T option -> bool - - /// forall p inp" evaluates to "match inp with None -> true | Some x -> p x - val forall: predicate:('T -> bool) -> option:'T option -> bool - - /// iter f inp executes match inp with None -> () | Some x -> f x - val iter: action:('T -> unit) -> option:'T option -> unit - - /// map f inp evaluates to match inp with None -> None | Some x -> Some (f x) - val map: mapping:('T -> 'U) -> option:'T option -> 'U option - - /// bind f inp evaluates to match inp with None -> None | Some x -> f x - val bind: binder:('T -> 'U option) -> option:'T option -> 'U option - - /// Convert the option to an array of length 0 or 1 - val to_array: option:'T option -> 'T array - - /// Convert the option to a list of length 0 or 1 - val to_list: option:'T option -> 'T list - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val is_some: option:'T option -> bool - - [] - val is_none: option:'T option -> bool - - [] - val fold_left: folder:('State -> 'T -> 'State) -> state:'State -> option:'T option -> 'State - - [] - val fold_right: folder:('T -> 'State -> 'State) -> option:'T option -> state:'State -> 'State - - [] - val for_all: predicate:('T -> bool) -> option:'T option -> bool - - /// filter p inp evaluates to match inp with None -> None | Some x -> if p x then inp else None - [] - val filter: predicate:('T -> bool) -> option:'T option -> 'T option - - /// filter p inp evaluates to match inp with None -> None | Some x -> if p x then inp else None - [] - val length: option:'T option -> int - - /// partition p inp evaluates to - /// match inp with None -> None,None | Some x -> if p x then inp,None else None,inp - [] - val partition: predicate:('T -> bool) -> option:'T option -> ('T option * 'T option) - -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/prim-types.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/prim-types.fs deleted file mode 100644 index c5c42b65..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/prim-types.fs +++ /dev/null @@ -1,5423 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -#nowarn "25" // Incomplete match expressions -#nowarn "35" // This construct is deprecated: the treatment of this operator is now handled directly by the F# compiler and its meaning may not be redefined. -#nowarn "44" // This construct is deprecated. This function is for use by compiled F# code and should not be used directly -#nowarn "52" // The value has been copied to ensure the original is not mutated by this operation -#nowarn "61" // The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. -#nowarn "62" // This construct is for compatibility with OCaml. The syntax 'module ... : sig .. end' is deprecated unless OCaml compatibility is enabled. Consider using 'module ... = begin .. end'. -#nowarn "69" // Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. -#nowarn "77" // Member constraints with the name 'Exp' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in compilation failures if you attempt to invoke the member constraint from your own code. - -namespace Microsoft.FSharp.Core - - //------------------------------------------------------------------------- - // Basic type abbreviations - - open System - open System.Collections - open System.Collections.Generic - open System.Diagnostics - open System.Globalization - open System.Text - - - type obj = System.Object - type exn = System.Exception - type nativeint = System.IntPtr - type unativeint = System.UIntPtr - type string = System.String - type float32 = System.Single - type float = System.Double - type single = System.Single - type double = System.Double - type sbyte = System.SByte - type byte = System.Byte - type int8 = System.SByte - type uint8 = System.Byte - type int16 = System.Int16 - type uint16 = System.UInt16 - type int32 = System.Int32 - type uint32 = System.UInt32 - type int64 = System.Int64 - type uint64 = System.UInt64 - type char = System.Char - type bool = System.Boolean - type decimal = System.Decimal - type int = int32 - - type ``[]``<'T> = (# "!0[]" #) - type ``[,]``<'T> = (# "!0[0 ...,0 ...]" #) - type ``[,,]``<'T> = (# "!0[0 ...,0 ...,0 ...]" #) - type ``[,,,]``<'T> = (# "!0[0 ...,0 ...,0 ...,0 ...]" #) - - type array<'T> = 'T[] - - type byref<'T> = (# "!0&" #) - - type nativeptr<'T> = (# "native int" #) - type ilsigptr<'T> = (# "!0*" #) - - - - -#if FX_ATLEAST_40 - type IStructuralEquatable = System.Collections.IStructuralEquatable - type IStructuralComparable = System.Collections.IStructuralComparable -#else - //------------------------------------------------------------------------- - // Structural equality - type IStructuralEquatable = - interface - abstract Equals: o:obj * comp:System.Collections.IEqualityComparer -> bool - abstract GetHashCode: comp:System.Collections.IEqualityComparer -> int - end - - //------------------------------------------------------------------------- - // Structural comparison - and IStructuralComparable = - interface - abstract CompareTo: o:obj * comp:System.Collections.IComparer -> int - end -#endif - - //------------------------------------------------------------------------- - // Unit - - and [] // No op_equality on unit - Unit = - { dummy:int } - override x.GetHashCode() = 0 - override x.Equals(obj:obj) = - match obj with null -> true | :? Unit -> true | _ -> false - interface System.IComparable with - member x.CompareTo(obj:obj) = 0 - - and unit = Unit - - //------------------------------------------------------------------------- - // .NET enumerations - - type SourceConstructFlags = - | None = 0 - | SumType = 1 - | RecordType = 2 - | ObjectType = 3 - | Field = 4 - | Exception = 5 - | Closure = 6 - | Module = 7 - | UnionCase = 8 - | Value = 9 - | KindMask = 31 - | NonpublicRepresentation = 32 - - [] - type CompilationRepresentationFlags = - | None = 0 - | Static = 1 - | Instance = 2 - | ModuleSuffix = 4 // append 'Module' to the end of a non-unique module - | UseNullAsTrueValue = 8 // Note if you change this then change CompilationRepresentationFlags_PermitNull further below - | Event = 16 - - - [] - type SealedAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - new() = new SealedAttribute(true) - - [] - [] - type AbstractClassAttribute() = - inherit System.Attribute() - - [] - [] - type DefaultAugmentationAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - - [] - [] - type CLIEventAttribute() = - inherit System.Attribute() - - [] - [] - type AutoSerializableAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - - [] - [] - type DefaultValueAttribute(check:bool) = - inherit System.Attribute() - member x.Check = check - new() = new DefaultValueAttribute(true) - - [] - [] - type EntryPointAttribute() = - inherit System.Attribute() - - [] - [] - type ReferenceEqualityAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - new() = ReferenceEqualityAttribute(true) - - [] - [] - type StructuralComparisonAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - new() = StructuralComparisonAttribute(true) - - [] - [] - type StructuralEqualityAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - new() = StructuralEqualityAttribute(true) - - [] - [] - type OverloadIDAttribute(uniqueName:string) = - inherit System.Attribute() - member x.UniqueName = uniqueName - - [] - [] - type ReflectedDefinitionAttribute() = - inherit System.Attribute() - - [] - [] - type StructAttribute() = - inherit System.Attribute() - - [] - [] - type MeasureAttribute() = - inherit System.Attribute() - - [] - [] - type MeasureAnnotatedAbbreviationAttribute() = - inherit System.Attribute() - - [] - [] - type InterfaceAttribute() = - inherit System.Attribute() - - [] - [] - type ClassAttribute() = - inherit System.Attribute() - - [] - [] - type LiteralAttribute() = - inherit System.Attribute() - - [] - [] - type FSharpInterfaceDataVersionAttribute(major:int,minor:int,release:int) = - inherit System.Attribute() - member x.Major = major - member x.Minor = minor - member x.Release = release - - [] - [] - type CompilationMappingAttribute(sourceConstructFlags:SourceConstructFlags, - variantNumber:int, - sequenceNumber:int) = - inherit System.Attribute() - member x.SourceConstructFlags = sourceConstructFlags - member x.SequenceNumber = sequenceNumber - member x.VariantNumber = variantNumber - new(sourceConstructFlags) = CompilationMappingAttribute(sourceConstructFlags,0,0) - new(sourceConstructFlags,sequenceNumber) = CompilationMappingAttribute(sourceConstructFlags,0,sequenceNumber) - - //------------------------------------------------------------------------- - [] - [] - type CompilationRepresentationAttribute (flags : CompilationRepresentationFlags) = - inherit System.Attribute() - member x.Flags = flags - - [] - [] - type ExperimentalAttribute(message:string) = - inherit System.Attribute() - member x.Message = message - - [] - [] - type StructuredFormatDisplayAttribute(value:string) = - inherit System.Attribute() - member x.Value = value - - [] - [] - type OCamlCompatibilityAttribute(message:string) = - inherit System.Attribute() - member x.Message = message - new() = OCamlCompatibilityAttribute(null) - - [] - [] - type UnverifiableAttribute() = - inherit System.Attribute() - - [] - [] - type NoDynamicInvocationAttribute() = - inherit System.Attribute() - - [] - [] - type OptionalArgumentAttribute() = - inherit System.Attribute() - - [] - [] - type GeneralizableValueAttribute() = - inherit System.Attribute() - - [] - [] - type RequiresExplicitTypeArgumentsAttribute() = - inherit System.Attribute() - - [] - [] - type RequireQualifiedAccessAttribute() = - inherit System.Attribute() - - [] - [] - type AutoOpenAttribute(path:string) = - inherit System.Attribute() - member x.Path = path - new() = AutoOpenAttribute("") - - [] type float<[] 'u> = float - [] type float32<[] 'u> = float32 - [] type decimal<[] 'u> = decimal - [] type int<[] 'u> = int - [] type int8<[] 'u> = int8 - [] type int16<[] 'u> = int16 - [] type int64<[] 'u> = int64 - - - module BasicInlinedOperations = - let inline unboxPrim<'T>(x:obj) = (# "unbox.any !0" type ('T) x : 'T #) - let inline box (x:'T) = (# "box !0" type ('T) x : obj #) - let inline not (b:bool) = (# "ceq" b false : bool #) - let inline (=) (x:int) (y:int) = (# "ceq" x y : bool #) - let inline (<>) (x:int) (y:int) = not(# "ceq" x y : bool #) - let inline (>=) (x:int) (y:int) = not(# "clt" x y : bool #) - let inline (>=.) (x:int64) (y:int64) = not(# "clt" x y : bool #) - let inline (>=...) (x:char) (y:char) = not(# "clt" x y : bool #) - let inline (<=...) (x:char) (y:char) = not(# "cgt" x y : bool #) - - let inline (/) (x:int) (y:int) = (# "div" x y : int #) - let inline (+) (x:int) (y:int) = (# "add" x y : int #) - let inline (+.) (x:int64) (y:int64) = (# "add" x y : int64 #) - let inline (+..) (x:uint64) (y:uint64) = (# "add" x y : uint64 #) - let inline ( *. ) (x:int64) (y:int64) = (# "mul" x y : int64 #) - let inline ( *.. ) (x:uint64) (y:uint64) = (# "mul" x y : uint64 #) - let inline (^) (x:string) (y:string) = System.String.Concat(x,y) - let inline (<<<) (x:int) (y:int) = (# "shl" x y : int #) - let inline ( * ) (x:int) (y:int) = (# "mul" x y : int #) - let inline (-) (x:int) (y:int) = (# "sub" x y : int #) - let inline (-.) (x:int64) (y:int64) = (# "sub" x y : int64 #) - let inline (-..) (x:uint64) (y:uint64) = (# "sub" x y : uint64 #) - let inline (>) (x:int) (y:int) = (# "cgt" x y : bool #) - let inline (<) (x:int) (y:int) = (# "clt" x y : bool #) - - [] - let inline rethrow() = unboxPrim(# "rethrow ldnull" : System.Object #) - - let inline int_of_byte (b:byte) = (# "" b : int #) - let inline raise (e: System.Exception) = (# "throw" e : 'U #) - let inline length (x: 'T[]) = (# "ldlen conv.i4" x : int #) - let inline zero_create (n:int) = (# "newarr !0" type ('T) n : 'T[] #) - let inline get (arr: 'T[]) (n:int) = (# "ldelem.any !0" type ('T) arr n : 'T #) - let set (arr: 'T[]) (n:int) (x:'T) = (# "stelem.any !0" type ('T) arr n x #) - - - let inline objEq (xobj:obj) (yobj:obj) = (# "ceq" xobj yobj : bool #) - let inline int64Eq (x:int64) (y:int64) = (# "ceq" x y : bool #) - let inline int32Eq (x:int32) (y:int32) = (# "ceq" x y : bool #) - let inline floatEq (x:float) (y:float) = (# "ceq" x y : bool #) - let inline float32Eq (x:float32) (y:float32) = (# "ceq" x y : bool #) - let inline charEq (x:char) (y:char) = (# "ceq" x y : bool #) - let inline intOrder (x:int) (y:int) = if (# "clt" x y : bool #) then (0-1) else (# "cgt" x y : int #) - let inline int64Order (x:int64) (y:int64) = if (# "clt" x y : bool #) then (0-1) else (# "cgt" x y : int #) - let inline byteOrder (x:byte) (y:byte) = if (# "clt" x y : bool #) then (0-1) else (# "cgt" x y : int #) - let inline byteEq (x:byte) (y:byte) = (# "ceq" x y : bool #) - let inline int64 (x:int) = (# "conv.i8" x : int64 #) - let inline int32 (x:int64) = (# "conv.i4" x : int32 #) - - let inline typeof<'T> = - let tok = (# "ldtoken !0" type('T) : System.RuntimeTypeHandle #) - System.Type.GetTypeFromHandle(tok) - - let inline typedefof<'T> = - let ty = typeof<'T> - if ty.IsGenericType then ty.GetGenericTypeDefinition() else ty - - let inline sizeof<'T> = - (# "sizeof !0" type('T) : int #) - - let inline unsafeDefault<'T> : 'T = (# "ilzero !0" type ('T) : 'T #) - let inline isinstPrim<'T>(x:obj) = (# "isinst !0" type ('T) x : obj #) - let inline castclassPrim<'T>(x:obj) = (# "castclass !0" type ('T) x : 'T #) - let inline notnullPrim<'T when 'T : not struct>(x:'T) = (# "ldnull cgt.un" x : bool #) - let inline iscastPrim<'T when 'T : not struct>(x:obj) = (# "isinst !0" type ('T) x : 'T #) - - - open BasicInlinedOperations - -#if FX_ATLEAST_40 -#else - module TupleUtils = - - open BasicInlinedOperations - - // adapted from System.Tuple::CombineHashCodes - let inline mask (n:int) (m:int) = (# "and" n m : int #) - let inline opshl (x:int) (n:int) : int = (# "shl" x (mask n 31) : int #) - let inline opxor (x:int) (y:int) : int = (# "xor" x y : int32 #) - let inline combine_tuple_hashes (h1 : int) (h2 : int) = (opxor ((opshl h1 5) + h1) h2) - - let combine_tuple_hash_codes (codes : int []) = - let mutable (num : int32) = codes.Length - 1 - - while (num > 1) do - let mutable i = 0 - while ((i * 2) < (num+1)) do - let index = i * 2 - let num' = index + 1 - if index = num then - set codes i (get codes index) - num <- i - else - set codes i (combine_tuple_hashes (get codes index) (get codes num)) - if num' = num then - num <- i - i <- i + 1 - combine_tuple_hashes (get codes 0) (get codes 1) - - - type Tuple<'T1>(t1:'T1) = - member t.Item1 = t1 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if TUPLE_STRUXT - // NOTE: Tuple`2 is a struct type. - // WARNING: If you change additional tuple types to be structs then you must change 'highestTupleStructType' in tastops.ml -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - [] - type Tuple<'T1,'T2> = - new (v1,v2) = { Item1 = v1; Item2 = v2 } - val Item1 : 'T1 - val Item2 : 'T2 -#else - type Tuple<'T1,'T2>(t1:'T1, t2:'T2) = - member t.Item1 = t1 - member t.Item2 = t2 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable -#endif - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3>(t1:'T1,t2:'T2,t3:'T3) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3,'T4>(t1:'T1,t2:'T2,t3:'T3,t4:'T4) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - member t.Item4 = t4 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3,'T4,'T5>(t1:'T1,t2:'T2,t3:'T3,t4:'T4,t5:'T5) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - member t.Item4 = t4 - member t.Item5 = t5 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6>(t1:'T1,t2:'T2,t3:'T3,t4:'T4,t5:'T5,t6:'T6) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - member t.Item4 = t4 - member t.Item5 = t5 - member t.Item6 = t6 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7>(t1:'T1,t2:'T2,t3:'T3,t4:'T4,t5:'T5,t6:'T6,t7:'T7) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - member t.Item4 = t4 - member t.Item5 = t5 - member t.Item6 = t6 - member t.Item7 = t7 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest>(t1:'T1,t2:'T2,t3:'T3,t4:'T4,t5:'T5,t6:'T6,t7:'T7,rest:'TRest) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - member t.Item4 = t4 - member t.Item5 = t5 - member t.Item6 = t6 - member t.Item7 = t7 - member t.Rest = rest - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable -#endif - - - //------------------------------------------------------------------------- - // The main aim here is to bootsrap the definition of structural hashing - // and comparison. Calls to these form part of the auto-generated - // code for each new datatype. - - module LanguagePrimitives = - - - let inline DefaultValue<'T when 'T : null> = unsafeDefault<'T> - - [] // nested module OK - module IntrinsicOperators = - //------------------------------------------------------------------------- - // Lazy and/or. Laziness added by the F# compiler. - - let (&) x y = if x then y else false - let (&&) x y = if x then y else false - let (or) x y = if x then true else y - let (||) x y = if x then true else y - - //------------------------------------------------------------------------- - // Address-of - // Note, "raise<'T> : exn -> 'T" is manually inlined below. - // Byref usage checks prohibit type instantiations involving byrefs. - - [] - let inline (~&) (x : 'T) : 'T byref = - let e = new System.ArgumentException("first class uses of address-of operators are not permitted") in - (# "throw" (e :> System.Exception) : 'T byref #) - - [] - let inline (~&&) (x : 'T) : nativeptr<'T> = - let e = new System.ArgumentException("first class uses of address-of operators are not permitted") in - (# "throw" (e :> System.Exception) : nativeptr<'T> #) - - - open IntrinsicOperators - [] // nested module OK - module IntrinsicFunctions = - - //------------------------------------------------------------------------- - // Unboxing, type casts, type tests - - type TypeNullnessSemantics = int - // .NET reference types - let TypeNullnessSemantics_NullIsExtraValue = 1 - // F# types with [] - let TypeNullnessSemantics_NullTrueValue = 2 - // F# record, union, tuple, function types - let TypeNullnessSemantics_NullNotLiked = 3 - // structs - let TypeNullnessSemantics_NullNever = 4 - - // duplicated from above since we're using integers in this section - let CompilationRepresentationFlags_PermitNull = 8 - - [] - type TypeInfo<'T>() = - // Compute an on-demand per-instantiation static field - static let info = - let ty = typeof<'T> - if ty.IsValueType - then TypeNullnessSemantics_NullNever else - let mappingAttrs = ty.GetCustomAttributes(typeof,false) - if mappingAttrs.Length = 0 - then TypeNullnessSemantics_NullIsExtraValue - elif ty.Equals(typeof) then - TypeNullnessSemantics_NullTrueValue - else - let reprAttrs = ty.GetCustomAttributes(typeof,false) - if reprAttrs.Length = 0 - then TypeNullnessSemantics_NullNotLiked - else - let reprAttr = get reprAttrs 0 - let reprAttr = (# "unbox.any !0" type (CompilationRepresentationAttribute) reprAttr : CompilationRepresentationAttribute #) - if (# "and" reprAttr.Flags CompilationRepresentationFlags_PermitNull : int #) = 0 - then TypeNullnessSemantics_NullNotLiked - else TypeNullnessSemantics_NullTrueValue - - // Publish the results of that compuation - static member TypeInfo = info - - - // Note: cheap nullness test for generic value: - // IL_0000: ldarg.1 - // IL_0001: box !TKey - // IL_0006: brtrue.s IL_000e - - // worst case: nothing known about source or destination - let UnboxGeneric<'T>(x:obj) = - if notnullPrim(x) or TypeInfo<'T>.TypeInfo <> TypeNullnessSemantics_NullNotLiked then - unboxPrim<'T>(x) - else - //System.Console.WriteLine("UnboxGeneric, x = {0}, 'T = {1}", x, typeof<'T>) - raise (System.NullReferenceException()) - - // better: source is NOT TypeNullnessSemantics_NullNotLiked - let inline UnboxFast<'T>(x:obj) = - // assert not(TypeInfo<'T>.TypeInfo = TypeNullnessSemantics_NullNotLiked) - unboxPrim<'T>(x) - - - // worst case: nothing known about source or destination - let TypeTestGeneric<'T>(x:obj) = - if notnullPrim(isinstPrim<'T>(x)) then true - elif notnullPrim(x) then false - else (TypeInfo<'T>.TypeInfo = TypeNullnessSemantics_NullTrueValue) - - // quick entry: source is NOT TypeNullnessSemantics_NullTrueValue - let inline TypeTestFast<'T>(x:obj) = - //assert not(TypeInfo<'T>.TypeInfo = TypeNullnessSemantics_NullTrueValue) - notnullPrim(isinstPrim<'T>(x)) - - let Dispose<'T when 'T :> System.IDisposable >(x:'T) = - match box x with - | null -> () - | _ -> x.Dispose() - - let inline MakeDecimal lo med hi isNegative scale = new System.Decimal(lo,med,hi,isNegative,scale) - - let inline GetString (s: string) (n:int) = s.Chars(n) - - let inline CreateInstance<'T when 'T : (new : unit -> 'T) >() = - (System.Activator.CreateInstance() : 'T) - - [] - let inline retype (x:'T) : 'U = (# "" x : 'U #) - - let inline GetArray (arr: 'T array) (n:int) = (# "ldelem.any !0" type ('T) arr n : 'T #) - let inline SetArray (arr: 'T array) (n:int,x:'T) = (# "stelem.any !0" type ('T) arr n x #) - - - let inline GetArraySub arr (start:int) (len:int) = - let len1 = (if len < 0 then 0 else len) - let dst = zero_create len - for i = 0 to len - 1 do - SetArray dst (i,GetArray arr (start + i)) - dst - - let inline SetArraySub arr (start:int) (len:int) (src:_[]) = - for i = 0 to len - 1 do - SetArray arr (start+i,GetArray src i) - - - let inline GetArray2D (arr: 'T[,]) (n1:int,n2:int) = (# "ldelem.multi 2 !0" type ('T) arr n1 n2 : 'T #) - let inline SetArray2D (arr: 'T[,]) (n1:int,n2:int,x:'T) = (# "stelem.multi 2 !0" type ('T) arr n1 n2 x #) - let inline GetArray2DLength1 (arr: 'T[,]) = (# "ldlen.multi 2 0" arr : int #) - let inline GetArray2DLength2 (arr: 'T[,]) = (# "ldlen.multi 2 1" arr : int #) - - let inline Array2DZeroCreate (n:int) (m:int) = (# "newarr.multi 2 !0" type ('T) n m : 'T[,] #) - let GetArray2DSub (src: 'T[,]) src1 src2 len1 len2 = - let len1 = (if len1 < 0 then 0 else len1) - let len2 = (if len2 < 0 then 0 else len2) - let dst = Array2DZeroCreate len1 len2 - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - SetArray2D dst (i,j,GetArray2D src (src1 + i,src2 + j)) - dst - - let SetArray2DSub (dst: 'T[,]) src1 src2 len1 len2 src = - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - SetArray2D dst (src1+i,src2+j,GetArray2D src (i,j)) - - - let inline GetArray3D (arr: 'T[,,]) (n1:int,n2:int,n3:int) = (# "ldelem.multi 3 !0" type ('T) arr n1 n2 n3 : 'T #) - let inline SetArray3D (arr: 'T[,,]) (n1:int,n2:int,n3:int,x:'T) = (# "stelem.multi 3 !0" type ('T) arr n1 n2 n3 x #) - let inline GetArray3DLength1 (arr: 'T[,,]) = (# "ldlen.multi 3 0" arr : int #) - let inline GetArray3DLength2 (arr: 'T[,,]) = (# "ldlen.multi 3 1" arr : int #) - let inline GetArray3DLength3 (arr: 'T[,,]) = (# "ldlen.multi 3 2" arr : int #) - - let inline Array3DZeroCreate (n1:int) (n2:int) (n3:int) = (# "newarr.multi 3 !0" type ('T) n1 n2 n3 : 'T[,,] #) - - let GetArray3DSub (src: 'T[,,]) src1 src2 src3 len1 len2 len3 = - let len1 = (if len1 < 0 then 0 else len1) - let len2 = (if len2 < 0 then 0 else len2) - let len3 = (if len3 < 0 then 0 else len3) - let dst = Array3DZeroCreate len1 len2 len3 - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - SetArray3D dst (i,j,k,GetArray3D src (src1+i,src2+j,src3+k)) - dst - - let SetArray3DSub (dst: 'T[,,]) src1 src2 src3 len1 len2 len3 src = - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - SetArray3D dst (src1+i,src2+j,src3+k,GetArray3D src (i,j,k)) - - - - let inline GetArray4D (arr: 'T[,,,]) (n1:int,n2:int,n3:int,n4:int) = (# "ldelem.multi 4 !0" type ('T) arr n1 n2 n3 n4 : 'T #) - let inline SetArray4D (arr: 'T[,,,]) (n1:int,n2:int,n3:int,n4:int,x:'T) = (# "stelem.multi 4 !0" type ('T) arr n1 n2 n3 n4 x #) - let inline Array4DLength1 (arr: 'T[,,,]) = (# "ldlen.multi 4 0" arr : int #) - let inline Array4DLength2 (arr: 'T[,,,]) = (# "ldlen.multi 4 1" arr : int #) - let inline Array4DLength3 (arr: 'T[,,,]) = (# "ldlen.multi 4 2" arr : int #) - let inline Array4DLength4 (arr: 'T[,,,]) = (# "ldlen.multi 4 3" arr : int #) - - let inline Array4DZeroCreate (n1:int) (n2:int) (n3:int) (n4:int) = (# "newarr.multi 4 !0" type ('T) n1 n2 n3 n4 : 'T[,,,] #) - - let GetArray4DSub (src: 'T[,,,]) src1 src2 src3 src4 len1 len2 len3 len4 = - let len1 = (if len1 < 0 then 0 else len1) - let len2 = (if len2 < 0 then 0 else len2) - let len3 = (if len3 < 0 then 0 else len3) - let len4 = (if len4 < 0 then 0 else len4) - let dst = Array4DZeroCreate len1 len2 len3 len4 - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - for m = 0 to len4 - 1 do - SetArray4D dst (i,j,k,m,GetArray4D src (src1+i,src2+j,src3+k,src3+m)) - dst - - let SetArray4DSub (dst: 'T[,,,]) src1 src2 src3 src4 len1 len2 len3 len4 src = - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - for m = 0 to len4 - 1 do - SetArray4D dst (src1+i,src2+j,src3+k,src4+m,GetArray4D src (i,j,k,m)) - - - module HashCompare = - - let PhysicalEqualityObj (xobj:obj) (yobj:obj) = - objEq xobj yobj - || (match xobj with - | null -> false - | :? System.ValueType -> xobj.Equals(yobj) - | _ -> false) - - // NOTE: compiler/optimizer is aware of this function and optimizes calls to it in many situations - // where it is known that PhysicalEqualityObj is identical to reference comparison - let PhysicalEqualityIntrinsic (x:'T) (y:'T) = - PhysicalEqualityObj (box x) (box y) - - let rec inline PhysicalEqualityFast (x:'T) (y:'T) = - PhysicalEqualityIntrinsic x y - when 'T : bool = (# "ceq" x y : bool #) - when 'T : int = (# "ceq" x y : bool #) - when 'T : sbyte = (# "ceq" x y : bool #) - when 'T : int16 = (# "ceq" x y : bool #) - when 'T : int32 = (# "ceq" x y : bool #) - when 'T : int64 = (# "ceq" x y : bool #) - when 'T : byte = (# "ceq" x y : bool #) - when 'T : uint16 = (# "ceq" x y : bool #) - when 'T : uint32 = (# "ceq" x y : bool #) - when 'T : uint64 = (# "ceq" x y : bool #) - when 'T : float = (# "ceq" x y : bool #) - when 'T : char = (# "ceq" x y : bool #) - - let PhysicalHashObj (xobj: obj) = -#if FX_NO_GET_HASH_CODE_HELPER - xobj.GetHashCode() -#else - match xobj with - | :? System.ValueType as v -> v.GetHashCode() - | _ -> - System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(xobj) -#endif - - let PhysicalHashIntrinsic (x: 'T) = PhysicalHashObj (box x) - - let inline PhysicalHashFast (x: 'T) = - PhysicalHashIntrinsic x - // NOTE: only specialziations on value types are allowed, and - // any type specializations on value types must return identical values to - // the mscorlib implementations of the ::GetHashCode methods on the given types. - when 'T : bool = (# "" x : int #) - when 'T : int = (# "" x : int #) - when 'T : int32 = (# "" x : int #) - when 'T : byte = (# "" x : int #) - when 'T : uint32 = (# "" x : int #) - - - //------------------------------------------------------------------------- - // Bi-modal generic comparison helper implementation. - // - // For structured data (records, tuples, unions) the IComparable implementation on - // types is run in either Equivalence Relation or Partial Equivalence Relation (PER) mode. - // - // In the second mode, generic comparison of two NaN values is recorded by clearing - // the PERMode.mode variable. PER mode can also be thought of as "no pair of NaNs detected yet" mode. - // Entry points that care about NaN pairs set the PERMode.mode variable and if it remains un-set by - // the end of their execution then no NaN pair was detected. - // - // From the library spec point of view: - // - GenericComparisonWithComparer will (a) make IComparable calls in the same mode as - // called and (b) if in PER node then a NaN pair will cause the outer operation that entered - // PER mode to return false. - // - // - GenericLessThan, GenericGreaterThan etc. enters PER mode and retores the previous PER mode on exit - // - // - GenericComparison clears PER mode and retores the previous PER mode on exit - // - // - GenericEquality is implemented via obj.Equals and always has PER semantics - // - // Note that some representations chosen by F# are legitimately allowed to be null, e.g. the empty list. - // However, because null values don't support the polymorphic virtual comparison operation CompareTo - // the test for nullness must be made on the caller side. - //------------------------------------------------------------------------- - - - let FailGenericComparison (obj: obj) = - raise (new System.ArgumentException("Failure during generic comparison: the type "^obj.GetType().ToString()^" does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type")) - - type GenericComparer(throwsOnPER:bool) = - - member c.ThrowsOnPER() = throwsOnPER - abstract CompareC : obj * obj -> int - - interface System.Collections.IComparer - - type NaNException(s) = - inherit System.ArgumentException(s) - - let rec GenericCompare (comp:GenericComparer) (xobj:obj,yobj:obj) = - (*if objEq xobj yobj then 0 else *) - //System.Console.WriteLine("xobj = {0}, yobj = {1}, NaNs = {2}, PERMode.mode = {3}", [| xobj; yobj; box PER_NAN_PAIR_DETECTED; box PERMode.mode |]) - match xobj,yobj with - | null,null -> 0 - | null,_ -> -1 - | _,null -> 1 -#if INVARIANT_CULTURE_STRING_COMPARISON - // Use invariant culture comparison for strings - | (:? string as x),(:? string as y) -> System.String.Compare(x, y, false, CultureInfo.InvariantCulture) -#else - // Use Ordinal comparison for strings - | (:? string as x),(:? string as y) -> System.String.CompareOrdinal(x, y) -#endif - // Permit structural comparison on arrays - | (:? System.Array as arr1),_ -> - match arr1,yobj with - // Fast path - | (:? (obj[]) as arr1) , (:? (obj[]) as arr2) -> GenericComparisonObjArrayWithComparer comp arr1 arr2 - // Fast path - | (:? (byte[]) as arr1), (:? (byte[]) as arr2) -> GenericComparisonByteArray arr1 arr2 - | _ , (:? System.Array as arr2) -> GenericComparisonArbArrayWithComparer comp arr1 arr2 - | _ -> FailGenericComparison xobj - // Check for IStructuralComparable - | (:? IStructuralComparable as x),_ -> - x.CompareTo(yobj,comp) - // Check for IComparable - | (:? System.IComparable as x),_ -> - match xobj,yobj with - | (:? float as x),(:? float as y) -> - if System.Double.IsNaN x && System.Double.IsNaN y && (comp.ThrowsOnPER()) then - raise (NaNException("float NaN Comparison")) - | (:? float32 as x),(:? float32 as y) -> - if System.Single.IsNaN x && System.Single.IsNaN y && (comp.ThrowsOnPER()) then - raise (NaNException("float32 NaN Comparison")) - | _ -> () - x.CompareTo(yobj) - | (:? nativeint as x),(:? nativeint as y) -> if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - | (:? unativeint as x),(:? unativeint as y) -> if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - | _,(:? IStructuralComparable as yc) -> - let res = yc.CompareTo(xobj,comp) - if res < 0 then 1 elif res > 0 then -1 else 0 - | _,(:? System.IComparable as yc) -> - // Note -c doesn't work here: be careful of comparison function returning minint - let c = yc.CompareTo(xobj) in - if c < 0 then 1 elif c > 0 then -1 else 0 - | _ -> FailGenericComparison xobj - - /// specialcase: Core implementation of structural comparison on arbitrary arrays. - and GenericComparisonArbArrayWithComparer (comp:GenericComparer) (x:System.Array) (y:System.Array) : int = -#if FX_NO_ARRAY_LONG_LENGTH - if x.Rank = 1 && y.Rank = 1 then - let lenx = x.Length - let leny = y.Length - let c = intOrder lenx leny - if c <> 0 then c else - let rec check i = - if i >= lenx then 0 else - let c = GenericCompare comp ((x.GetValue(i)),(y.GetValue(i))) - if c <> 0 then c else check (i + 1) - check 0 - elif x.Rank = 2 && y.Rank = 2 then - let lenx0 = x.GetLength(0) - let leny0 = y.GetLength(0) - let c = intOrder lenx0 leny0 - if c <> 0 then c else - let lenx1 = x.GetLength(1) - let leny1 = y.GetLength(1) - let c = intOrder lenx1 leny1 - if c <> 0 then c else - let basex0 = (x.GetLowerBound(0)) - let basex1 = (x.GetLowerBound(1)) - let basey0 = (y.GetLowerBound(0)) - let basey1 = (y.GetLowerBound(1)) - let c = intOrder basex0 basey0 - if c <> 0 then c else - let c = intOrder basex1 basey1 - if c <> 0 then c else - let rec check0 i = - let rec check1 j = - if j >= lenx1 then 0 else - let c = GenericCompare comp ((x.GetValue(i + basex0,j + basex1)), (y.GetValue(i + basey0,j + basey1))) - if c <> 0 then c else check1 (j + 1) - if i >= lenx0 then 0 else - let c = check1 0 - if c <> 0 then c else - check0 (i + 1) - check0 0 - else - let c = intOrder x.Rank y.Rank - if c <> 0 then c else - let ndims = x.Rank - // check lengths - let rec precheck k = - if k >= ndims then 0 else - let c = intOrder (x.GetLength(k)) (y.GetLength(k)) - if c <> 0 then c else - let c = intOrder (x.GetLowerBound(k)) (y.GetLowerBound(k)) - if c <> 0 then c else - precheck (k+1) - let c = precheck 0 - if c <> 0 then c else - let idxs : int[] = zero_create ndims - let rec checkN k baseIdx i lim = - if i >= lim then 0 else - set idxs k (baseIdx + i) - let c = - if k = ndims - 1 - then GenericCompare comp ((x.GetValue(idxs)), (y.GetValue(idxs))) - else check (k+1) - if c <> 0 then c else - checkN k baseIdx (i + 1) lim - and check k = - if k >= ndims then 0 else - let baseIdx = x.GetLowerBound(k) - checkN k baseIdx 0 (x.GetLength(k)) - check 0 -#else - if x.Rank = 1 && y.Rank = 1 then - let lenx = x.LongLength - let leny = y.LongLength - let c = int64Order lenx leny - if c <> 0 then c else - let rec check i = - if i >=. lenx then 0 else - let c = GenericCompare comp ((x.GetValue(i)), (y.GetValue(i))) - if c <> 0 then c else check (i +. 1L) - check 0L - elif x.Rank = 2 && y.Rank = 2 then - let lenx0 = x.GetLongLength(0) - let leny0 = y.GetLongLength(0) - let c = int64Order lenx0 leny0 - if c <> 0 then c else - let lenx1 = x.GetLongLength(1) - let leny1 = y.GetLongLength(1) - let c = int64Order lenx1 leny1 - if c <> 0 then c else - let basex0 = int64 (x.GetLowerBound(0)) - let basex1 = int64 (x.GetLowerBound(1)) - let basey0 = int64 (y.GetLowerBound(0)) - let basey1 = int64 (y.GetLowerBound(1)) - let c = int64Order basex0 basey0 - if c <> 0 then c else - let c = int64Order basex1 basey1 - if c <> 0 then c else - let rec check0 i = - let rec check1 j = - if j >=. lenx1 then 0 else - let c = GenericCompare comp ((x.GetValue(i +. basex0,j +. basex1)), (y.GetValue(i +. basey0,j +. basey1))) - if c <> 0 then c else check1 (j +. 1L) - if i >=. lenx0 then 0 else - let c = check1 0L - if c <> 0 then c else - check0 (i +. 1L) - check0 0L - else - let c = intOrder x.Rank y.Rank - if c <> 0 then c else - let ndims = x.Rank - // check lengths - let rec precheck k = - if k >= ndims then 0 else - let c = int64Order (x.GetLongLength(k)) (y.GetLongLength(k)) - if c <> 0 then c else - let c = intOrder (x.GetLowerBound(k)) (y.GetLowerBound(k)) - if c <> 0 then c else - precheck (k+1) - let c = precheck 0 - if c <> 0 then c else - let idxs : int64[] = zero_create ndims - let rec checkN k baseIdx i lim = - if i >=. lim then 0 else - set idxs k (baseIdx +. i) - let c = - if k = ndims - 1 - then GenericCompare comp ((x.GetValue(idxs)), (y.GetValue(idxs))) - else check (k+1) - if c <> 0 then c else - checkN k baseIdx (i +. 1L) lim - and check k = - if k >= ndims then 0 else - let baseIdx = x.GetLowerBound(k) - checkN k (int64 baseIdx) 0L (x.GetLongLength(k)) - check 0 -#endif - - /// optimized case: Core implementation of structural comparison on object arrays. - and GenericComparisonObjArrayWithComparer (comp:GenericComparer) (x:obj[]) (y:obj[]) : int = - let lenx = x.Length - let leny = y.Length - let c = intOrder lenx leny - if c <> 0 then c - else - let mutable i = 0 - let mutable res = 0 - while i < lenx do - let c = GenericCompare comp ((get x i), (get y i)) - if c <> 0 then (res <- c; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural comparison on arrays. - and GenericComparisonByteArray (x:byte[]) (y:byte[]) : int = - let lenx = x.Length - let leny = y.Length - let c = intOrder lenx leny - if c <> 0 then c - else - let mutable i = 0 - let mutable res = 0 - while i < lenx do - let c = byteOrder (get x i) (get y i) - if c <> 0 then (res <- c; i <- lenx) - else i <- i + 1 - res - - type GenericComparer with - - interface System.Collections.IComparer with - override c.Compare(x:obj,y:obj) = GenericCompare c (x,y) - override c.CompareC(x:obj,y:obj) = GenericCompare c (x,y) - - let fsComparer = GenericComparer(true) - let fsComparerNoThrow = GenericComparer(false) - - // NOTE: compiler/optimizer is aware of this function and optimizes calls to it in many situations - // where it is known how GenericComparisonObjBimodal will dispatch via IComparable. - let GenericComparisonWithComparerIntrinsic<'T> (comp:System.Collections.IComparer) (x:'T) (y:'T) : int = - // if 'T = float then x.CompareTo(y) - // if 'T = float32 then x.CompareTo(y) - comp.Compare(box x, box y) - - let inline GenericComparisonWithComparerFast<'T> (comp:System.Collections.IComparer) (x:'T) (y:'T) : int = - GenericComparisonWithComparerIntrinsic comp x y - when 'T : bool = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : sbyte = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int16 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int32 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int64 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : nativeint = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : byte = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint16 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint32 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint64 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : unativeint = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - // Multi-modal direct implementation for float/float32 all of "clt", "cgt" and "ceq" may fail on NaN. In this case we must detect our mode - // and possibly change PERMode.mode. We do this by bailing out to call GenericComparisonWithComparerIntrinsic - when 'T : float = if (# "clt" x y : bool #) then (-1) else if (# "cgt" x y : bool #) then 1 else if (# "ceq" x y : bool #) then 0 else GenericComparisonWithComparerIntrinsic comp x y - when 'T : float32 = if (# "clt" x y : bool #) then (-1) else if (# "cgt" x y : bool #) then 1 else if (# "ceq" x y : bool #) then 0 else GenericComparisonWithComparerIntrinsic comp x y - when 'T : char = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : string = -#if INVARIANT_CULTURE_STRING_COMPARISON - // NOTE: we don't have to null check here because System.String.Compare - // gives reliable results on null values. - System.String.Compare((# "" x : string #) ,(# "" y : string #), false, CultureInfo.InvariantCulture) -#else - // NOTE: we don't have to null check here because System.String.CompareOrdinal - // gives reliable results on null values. - System.String.CompareOrdinal((# "" x : string #) ,(# "" y : string #)) -#endif - - - let GenericComparisonIntrinsic<'T> (x:'T) (y:'T) : int = - GenericComparisonWithComparerIntrinsic (fsComparerNoThrow :> System.Collections.IComparer) x y - - - // Check for 'T = float or 'T = float32 (in case we didn't resolve this statically). - // In these cases we must use the right "clt" to cope with NaN. Note "<" etc. take - // on a different meaning for floats nested inside data structures than when immediately - // applied to type float. This gives us the IEEE semantics when "<" etc. are used on - // floats, and a sound structural semantics when used on structured data, though - // comparisons on structural data containing floats do not get optimized. - let GenericLessThanIntrinsic (x:'T) (y:'T) = - try - (# "clt" (GenericComparisonWithComparerIntrinsic fsComparer x y) 0 : bool #) - with - | :? NaNException -> false - - - let GenericGreaterThanIntrinsic (x:'T) (y:'T) = - try - (# "cgt" (GenericComparisonWithComparerIntrinsic fsComparer x y) 0 : bool #) - with - | :? NaNException -> false - - - let GenericGreaterOrEqualIntrinsic (x:'T) (y:'T) = - try - (# "cgt" (GenericComparisonWithComparerIntrinsic fsComparer x y) (-1) : bool #) - with - | :? NaNException -> false - - - - let GenericLessOrEqualIntrinsic (x:'T) (y:'T) = - try - (# "clt" (GenericComparisonWithComparerIntrinsic fsComparer x y) 1 : bool #) - with - | :? NaNException -> false - - - /// Core implementation of structural comparison on arbitrary values. - let inline GenericComparisonFast<'T> (x:'T) (y:'T) : int = - GenericComparisonIntrinsic x y - when 'T : bool = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : sbyte = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int16 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int32 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int64 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : nativeint = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : byte = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint16 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint32 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint64 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : unativeint = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : float = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : float32 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : char = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : string = -#if INVARIANT_CULTURE_STRING_COMPARISON - // NOTE: we don't have to null check here because System.String.Compare - // gives reliable results on null values. - System.String.Compare((# "" x : string #) ,(# "" y : string #), false, CultureInfo.InvariantCulture) -#else - // NOTE: we don't have to null check here because System.String.CompareOrdinal - // gives reliable results on null values. - System.String.CompareOrdinal((# "" x : string #) ,(# "" y : string #)) -#endif - - - let inline GenericLessThanFast (x:'T) (y:'T) = - GenericLessThanIntrinsic x y - when 'T : bool = (# "clt" x y : bool #) - when 'T : int = (# "clt" x y : bool #) - when 'T : sbyte = (# "clt" x y : bool #) - when 'T : int16 = (# "clt" x y : bool #) - when 'T : int32 = (# "clt" x y : bool #) - when 'T : int64 = (# "clt" x y : bool #) - when 'T : byte = (# "clt.un" x y : bool #) - when 'T : uint16 = (# "clt.un" x y : bool #) - when 'T : uint32 = (# "clt.un" x y : bool #) - when 'T : uint64 = (# "clt.un" x y : bool #) - when 'T : unativeint = (# "clt.un" x y : bool #) - when 'T : nativeint = (# "clt" x y : bool #) - when 'T : float = (# "clt" x y : bool #) - when 'T : float32= (# "clt" x y : bool #) - when 'T : char = (# "clt" x y : bool #) - - let inline GenericGreaterThanFast (x:'T) (y:'T) = - GenericGreaterThanIntrinsic x y - when 'T : bool = (# "cgt" x y : bool #) - when 'T : int = (# "cgt" x y : bool #) - when 'T : sbyte = (# "cgt" x y : bool #) - when 'T : int16 = (# "cgt" x y : bool #) - when 'T : int32 = (# "cgt" x y : bool #) - when 'T : int64 = (# "cgt" x y : bool #) - when 'T : nativeint = (# "cgt" x y : bool #) - when 'T : byte = (# "cgt.un" x y : bool #) - when 'T : uint16 = (# "cgt.un" x y : bool #) - when 'T : uint32 = (# "cgt.un" x y : bool #) - when 'T : uint64 = (# "cgt.un" x y : bool #) - when 'T : unativeint = (# "cgt.un" x y : bool #) - when 'T : float = (# "cgt" x y : bool #) - when 'T : float32 = (# "cgt" x y : bool #) - when 'T : char = (# "cgt" x y : bool #) - - let inline GenericLessOrEqualFast (x:'T) (y:'T) = - GenericLessOrEqualIntrinsic x y - when 'T : bool = not (# "cgt" x y : bool #) - when 'T : int = not (# "cgt" x y : bool #) - when 'T : sbyte = not (# "cgt" x y : bool #) - when 'T : int16 = not (# "cgt" x y : bool #) - when 'T : int32 = not (# "cgt" x y : bool #) - when 'T : int64 = not (# "cgt" x y : bool #) - when 'T : nativeint = not (# "cgt" x y : bool #) - when 'T : byte = not (# "cgt.un" x y : bool #) - when 'T : uint16 = not (# "cgt.un" x y : bool #) - when 'T : uint32 = not (# "cgt.un" x y : bool #) - when 'T : uint64 = not (# "cgt.un" x y : bool #) - when 'T : unativeint = not (# "cgt.un" x y : bool #) - when 'T : float = not (# "cgt.un" x y : bool #) - when 'T : float32 = not (# "cgt.un" x y : bool #) - when 'T : char = not(# "cgt" x y : bool #) - - let inline GenericGreaterOrEqualFast (x:'T) (y:'T) = - GenericGreaterOrEqualIntrinsic x y - when 'T : bool = not (# "clt" x y : bool #) - when 'T : int = not (# "clt" x y : bool #) - when 'T : sbyte = not (# "clt" x y : bool #) - when 'T : int16 = not (# "clt" x y : bool #) - when 'T : int32 = not (# "clt" x y : bool #) - when 'T : int64 = not (# "clt" x y : bool #) - when 'T : nativeint = not (# "clt" x y : bool #) - when 'T : byte = not (# "clt.un" x y : bool #) - when 'T : uint16 = not (# "clt.un" x y : bool #) - when 'T : uint32 = not (# "clt.un" x y : bool #) - when 'T : uint64 = not (# "clt.un" x y : bool #) - when 'T : unativeint = not (# "clt.un" x y : bool #) - when 'T : float = not (# "clt.un" x y : bool #) - when 'T : float32 = not (# "clt.un" x y : bool #) - when 'T : char = not (# "clt" x y : bool #) - - let GenericMinimumFast x y = if GenericLessThanFast x y then x else y - let GenericMaximumFast x y = if GenericLessThanFast x y then y else x - - - //------------------------------------------------------------------------- - // EQUALITY - //------------------------------------------------------------------------- - - - /// optimized case: Core implementation of structural equality on arrays. - let GenericEqualityByteArray (x:byte[]) (y:byte[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = byteEq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural equality on arrays. - let GenericEqualityInt32Array (x:int[]) (y:int[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = int32Eq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural equality on arrays - let GenericEqualitySingleArray (x:float32[]) (y:float32[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = float32Eq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural equality on arrays. - let GenericEqualityDoubleArray (x:float[]) (y:float[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = floatEq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural equality on arrays. - let GenericEqualityCharArray (x:char[]) (y:char[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = charEq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural equality on arrays. - let GenericEqualityInt64Array (x:int64[]) (y:int64[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = int64Eq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - - - let rec GenericEqualityObj (iec:System.Collections.IEqualityComparer) ((xobj:obj),(yobj:obj)) : bool = - (*if objEq xobj yobj then true else *) - match xobj,yobj with - | null,null -> true - | null,_ -> false - | _,null -> false - | (:? string as xs),(:? string as ys) -> System.String.Equals(xs,ys) - // Permit structural equality on arrays - | (:? System.Array as arr1),_ -> - match arr1,yobj with - // Fast path - | (:? (obj[]) as arr1) , (:? (obj[]) as arr2) -> GenericEqualityObjArray iec arr1 arr2 - // Fast path - | (:? (byte[]) as arr1), (:? (byte[]) as arr2) -> GenericEqualityByteArray arr1 arr2 - | (:? (int32[]) as arr1), (:? (int32[]) as arr2) -> GenericEqualityInt32Array arr1 arr2 - | (:? (int64[]) as arr1), (:? (int64[]) as arr2) -> GenericEqualityInt64Array arr1 arr2 - | (:? (char[]) as arr1), (:? (char[]) as arr2) -> GenericEqualityCharArray arr1 arr2 - | (:? (float32[]) as arr1), (:? (float32[]) as arr2) -> GenericEqualitySingleArray arr1 arr2 - | (:? (float[]) as arr1), (:? (float[]) as arr2) -> GenericEqualityDoubleArray arr1 arr2 - | _ , (:? System.Array as arr2) -> GenericEqualityArbArray iec arr1 arr2 - | _ -> xobj.Equals(yobj) - | (:? IStructuralEquatable as x1),_ -> x1.Equals(yobj,iec) - // Ensure NaN semantics on recursive calls - | (:? float as f1), (:? float as f2) -> (# "ceq" f1 f2 : bool #) - | (:? float32 as f1), (:? float32 as f2) -> (# "ceq" f1 f2 : bool #) - | _ -> xobj.Equals(yobj) - - /// specialcase: Core implementation of structural equality on arbitrary arrays. - and GenericEqualityArbArray (iec:System.Collections.IEqualityComparer) (x:System.Array) (y:System.Array) : bool = -#if FX_NO_ARRAY_LONG_LENGTH - if x.Rank = 1 && y.Rank = 1 then - // check lengths - let lenx = x.Length - let leny = y.Length - (int32Eq lenx leny) && - // check contents - let rec check i = (i >= lenx) || (GenericEqualityObj iec ((x.GetValue(i)),(y.GetValue(i))) && check (i + 1)) - check 0 - elif x.Rank = 2 && y.Rank = 2 then - // check lengths - let lenx0 = x.GetLength(0) - let leny0 = y.GetLength(0) - (int32Eq lenx0 leny0) && - let lenx1 = x.GetLength(1) - let leny1 = y.GetLength(1) - (int32Eq lenx1 leny1) && - let basex0 = x.GetLowerBound(0) - let basex1 = x.GetLowerBound(1) - let basey0 = y.GetLowerBound(0) - let basey1 = y.GetLowerBound(1) - (int32Eq basex0 basey0) && - (int32Eq basex1 basey1) && - // check contents - let rec check0 i = - let rec check1 j = (j >= lenx1) || (GenericEqualityObj iec ((x.GetValue(basex0 + i,basex1 + j)), (y.GetValue(basey0 + i,basey1 + j))) && check1 (j + 1)) - (i >= lenx0) || (check1 0 && check0 (i + 1)) - check0 0 - else - (x.Rank = y.Rank) && - let ndims = x.Rank - // check lengths - let rec precheck k = - (k >= ndims) || - (int32Eq (x.GetLength(k)) (y.GetLength(k)) && - int32Eq (x.GetLowerBound(k)) (y.GetLowerBound(k)) && - precheck (k+1)) - precheck 0 && - let idxs : int32[] = zero_create ndims - // check contents - let rec checkN k baseIdx i lim = - (i >= lim) || - (set idxs k (baseIdx + i); - (if k = ndims - 1 - then GenericEqualityObj iec ((x.GetValue(idxs)),(y.GetValue(idxs))) - else check (k+1)) && - checkN k baseIdx (i + 1) lim) - and check k = - (k >= ndims) || - (let baseIdx = x.GetLowerBound(k) - checkN k baseIdx 0 (x.GetLength(k))) - - check 0 -#else - if x.Rank = 1 && y.Rank = 1 then - // check lengths - let lenx = x.LongLength - let leny = y.LongLength - (int64Eq lenx leny) && - // check contents - let rec check i = (i >=. lenx) || (GenericEqualityObj iec ((x.GetValue(i)),(y.GetValue(i))) && check (i +. 1L)) - check 0L - elif x.Rank = 2 && y.Rank = 2 then - // check lengths - let lenx0 = x.GetLongLength(0) - let leny0 = y.GetLongLength(0) - (int64Eq lenx0 leny0) && - let lenx1 = x.GetLongLength(1) - let leny1 = y.GetLongLength(1) - (int64Eq lenx1 leny1) && - let basex0 = int64 (x.GetLowerBound(0)) - let basex1 = int64 (x.GetLowerBound(1)) - let basey0 = int64 (y.GetLowerBound(0)) - let basey1 = int64 (y.GetLowerBound(1)) - (int64Eq basex0 basey0) && - (int64Eq basex1 basey1) && - // check contents - let rec check0 i = - let rec check1 j = (j >=. lenx1) || (GenericEqualityObj iec ((x.GetValue(basex0 +. i,basex1 +. j)),(y.GetValue(basey0 +. i,basey1 +. j))) && check1 (j +. 1L)) - (i >=. lenx0) || (check1 0L && check0 (i +. 1L)) - check0 0L - else - (x.Rank = y.Rank) && - let ndims = x.Rank - // check lengths - let rec precheck k = - (k >= ndims) || - (int64Eq (x.GetLongLength(k)) (y.GetLongLength(k)) && - int32Eq (x.GetLowerBound(k)) (y.GetLowerBound(k)) && - precheck (k+1)) - precheck 0 && - let idxs : int64[] = zero_create ndims - // check contents - let rec checkN k baseIdx i lim = - (i >=. lim) || - (set idxs k (baseIdx +. i); - (if k = ndims - 1 - then GenericEqualityObj iec ((x.GetValue(idxs)),(y.GetValue(idxs))) - else check (k+1)) && - checkN k baseIdx (i +. 1L) lim) - and check k = - (k >= ndims) || - (let baseIdx = x.GetLowerBound(k) - checkN k (int64 baseIdx) 0L (x.GetLongLength(k))) - - check 0 -#endif - - /// optimized case: Core implementation of structural equality on object arrays. - and GenericEqualityObjArray iec (x:obj[]) (y:obj[]) : bool = - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny ) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = GenericEqualityObj iec ((get x i),(get y i)) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - - let fsEqualityComparer = - { new System.Collections.IEqualityComparer with - override iec.Equals(x:obj,y:obj) = GenericEqualityObj iec (x,y) - override iec.GetHashCode(x:obj) = raise (InvalidOperationException "this object is for recursive equality calls and may not be used for hashing") } - - let rec GenericEqualityIntrinsic (x : 'T) (y : 'T) : bool = - fsEqualityComparer.Equals((box x), (box y)) - - let rec GenericEqualityWithComparerIntrinsic (comp : System.Collections.IEqualityComparer) (x : 'T) (y : 'T) : bool = - //comp.Equals((box x),(box y)) - GenericEqualityObj comp ((box x),(box y)) - - - let inline GenericEqualityFast (x : 'T) (y : 'T) : bool = - GenericEqualityIntrinsic x y - when 'T : bool = (# "ceq" x y : bool #) - when 'T : int = (# "ceq" x y : bool #) - when 'T : sbyte = (# "ceq" x y : bool #) - when 'T : int16 = (# "ceq" x y : bool #) - when 'T : int32 = (# "ceq" x y : bool #) - when 'T : int64 = (# "ceq" x y : bool #) - when 'T : byte = (# "ceq" x y : bool #) - when 'T : uint16 = (# "ceq" x y : bool #) - when 'T : uint32 = (# "ceq" x y : bool #) - when 'T : uint64 = (# "ceq" x y : bool #) - when 'T : float = (# "ceq" x y : bool #) - when 'T : float32 = (# "ceq" x y : bool #) - when 'T : char = (# "ceq" x y : bool #) - when 'T : string = System.String.Equals((# "" x : string #),(# "" y : string #)) - - let inline GenericEqualityWithComparerFast (comp : System.Collections.IEqualityComparer) (x : 'T) (y : 'T) : bool = - GenericEqualityWithComparerIntrinsic comp x y - when 'T : bool = (# "ceq" x y : bool #) - when 'T : int = (# "ceq" x y : bool #) - when 'T : sbyte = (# "ceq" x y : bool #) - when 'T : int16 = (# "ceq" x y : bool #) - when 'T : int32 = (# "ceq" x y : bool #) - when 'T : int64 = (# "ceq" x y : bool #) - when 'T : byte = (# "ceq" x y : bool #) - when 'T : uint16 = (# "ceq" x y : bool #) - when 'T : uint32 = (# "ceq" x y : bool #) - when 'T : uint64 = (# "ceq" x y : bool #) - when 'T : float = (# "ceq" x y : bool #) - when 'T : float32 = (# "ceq" x y : bool #) - when 'T : char = (# "ceq" x y : bool #) - when 'T : string = System.String.Equals((# "" x : string #),(# "" y : string #)) - - - let inline GenericInequalityFast (x:'T) (y:'T) = (not(GenericEqualityFast x y) : bool) - - - //------------------------------------------------------------------------- - // HASHING - //------------------------------------------------------------------------- - - - - let defaultHashNodes = 18 - - type CountLimitedHasher(sz:int) = - [] - val mutable nodeCount : int - - member x.Fresh() = - if (System.Threading.Interlocked.CompareExchange(&(x.nodeCount), sz, 0) = 0) then - x - else - new CountLimitedHasher(sz) - - interface IEqualityComparer - - - type UnlimitedHasher() = - - interface IEqualityComparer - - - let fsUnlimitedHasher = UnlimitedHasher() - - let inline HashCombine nr x y = (x <<< 1) + y + 631 * nr - - let GenericHashObjArray (iec : System.Collections.IEqualityComparer) (x: obj[]) : int = - let len = x.Length - let mutable i = len - 1 - if i > defaultHashNodes then i <- defaultHashNodes // limit the hash - let mutable acc = 0 - while (i >= 0) do - // NOTE: GenericHash* call decreases nr - acc <- HashCombine i acc (iec.GetHashCode(x.GetValue(i))); - i <- i - 1 - acc - - // optimized case - byte arrays - let GenericHashByteArray (iec : System.Collections.IEqualityComparer) (x: byte[]) : int = - let len = length x - let mutable i = len - 1 - if i > defaultHashNodes then i <- defaultHashNodes // limit the hash - let mutable acc = 0 - while (i >= 0) do - acc <- HashCombine i acc (int_of_byte (get x i)); - i <- i - 1 - acc - - // optimized case - int arrays - let GenericHashInt32Array (iec : System.Collections.IEqualityComparer) (x: int[]) : int = - let len = length x - let mutable i = len - 1 - if i > defaultHashNodes then i <- defaultHashNodes // limit the hash - let mutable acc = 0 - while (i >= 0) do - acc <- HashCombine i acc (get x i); - i <- i - 1 - acc - - // optimized case - int arrays - let GenericHashInt64Array (iec : System.Collections.IEqualityComparer) (x: int64[]) : int = - let len = length x - let mutable i = len - 1 - if i > defaultHashNodes then i <- defaultHashNodes // limit the hash - let mutable acc = 0 - while (i >= 0) do - acc <- HashCombine i acc (int32 (get x i)); - i <- i - 1 - acc - - // special case - arrays do not by default have a decent structural hashing function - let GenericHashArbArray (iec : System.Collections.IEqualityComparer) (x: System.Array) : int = - match x.Rank with - | 1 -> - let b = x.GetLowerBound(0) - let len = x.Length - let mutable i = b + len - 1 - if i > b + defaultHashNodes then i <- b + defaultHashNodes // limit the hash - let mutable acc = 0 - while (i >= b) do - // NOTE: GenericHash* call decreases nr - acc <- HashCombine i acc (iec.GetHashCode(x.GetValue(i))); - i <- i - 1 - acc - | n -> - HashCombine 10 (x.GetLength(0)) (x.GetLength(1)) - - // Core implementation of structural hashing. Search for the IStructuralHash interface. - // Arrays and strings are structurally hashed through a separate technique. - // Objects which do not support this interface get hashed using a virtual - // call to the standard Object::GetStructuralHashCode(). - let rec GenericHashParamObj (iec : System.Collections.IEqualityComparer) (x: obj) : int = - match x with - | null -> 0 - | (:? System.Array as a) -> - match a with - | :? (obj[]) as oa -> GenericHashObjArray iec oa - | :? (byte[]) as ba -> GenericHashByteArray iec ba - | :? (int[]) as ba -> GenericHashInt32Array iec ba - | :? (int64[]) as ba -> GenericHashInt64Array iec ba - | _ -> GenericHashArbArray iec a - // REVIEW: System.Array implements IStructuralEquatable in Dev10 - | :? IStructuralEquatable as a -> - a.GetHashCode(iec) - | _ -> - x.GetHashCode() - - - // optimized case - hash on things compatible with obj[] - - - type CountLimitedHasher with - - interface System.Collections.IEqualityComparer with - override iec.Equals(x:obj,y:obj) = - GenericEqualityObj iec (x,y) - override iec.GetHashCode(x:obj) = - iec.nodeCount <- iec.nodeCount - 1 - if iec.nodeCount > 0 then - GenericHashParamObj iec x - else - -1 - - type UnlimitedHasher with - - interface System.Collections.IEqualityComparer with - override iec.Equals(x:obj,y:obj) = GenericEqualityObj iec (x,y) - override iec.GetHashCode(x:obj) = GenericHashParamObj iec x - - // Represents an call to structural hashing that was not optimized by static conditionals. - // NOTE: compiler/optimizer is aware of this function and optimizes calls to it in many situations - let GenericHashIntrinsic x = GenericHashParamObj fsUnlimitedHasher (box(x)) - - let LimitedGenericHashIntrinsic limit x = GenericHashParamObj (CountLimitedHasher(limit)) (box(x)) - - // Represents a recursive call to structural hashing that was not optimized by static conditionals. - // For unoptimized recursive calls we fetch the generic hasher - let GenericHashWithComparerIntrinsic<'T> (comp : System.Collections.IEqualityComparer) (x : 'T) : int = - GenericHashParamObj comp (box(x)) - - - /// Core entry into structural hashing. Hash to a given depth limit. - let inline GenericHashWithComparerFast (comp : System.Collections.IEqualityComparer) (x:'T) : int = - GenericHashWithComparerIntrinsic comp x - when 'T : bool = (# "" x : int #) - when 'T : int = (# "" x : int #) - when 'T : int32 = (# "" x : int #) - when 'T : byte = (# "" x : int #) - when 'T : uint32 = (# "" x : int #) - when 'T : string = - match (# "" x : obj #) with - | null -> 0 - | _ -> (# "call instance int32 [mscorlib]System.String:: GetHashCode()" x : int #) - - /// Core entry into structural hashing. Hash to a given depth limit. - let inline GenericHashFast (x:'T) : int = - GenericHashIntrinsic x - when 'T : bool = (# "" x : int #) - when 'T : int = (# "" x : int #) - when 'T : int32 = (# "" x : int #) - when 'T : byte = (# "" x : int #) - when 'T : uint32 = (# "" x : int #) - when 'T : string = - match (# "" x : obj #) with - | null -> 0 - | _ -> (# "call instance int32 [mscorlib]System.String:: GetHashCode()" x : int #) - - /// Core entry into structural hashing. Hash to a given depth limit. - let inline GenericLimitedHashFast (limit:int) (x:'T) : int = - LimitedGenericHashIntrinsic limit x - when 'T : bool = (# "" x : int #) - when 'T : int = (# "" x : int #) - when 'T : int32 = (# "" x : int #) - when 'T : byte = (# "" x : int #) - when 'T : uint32 = (# "" x : int #) - when 'T : string = - match (# "" x : obj #) with - | null -> 0 - | _ -> (# "call instance int32 [mscorlib]System.String:: GetHashCode()" x : int #) - - - let inline FastHashTuple2 (comparer:System.Collections.IEqualityComparer) (x1,x2) = - TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x1) (GenericHashWithComparerFast comparer x2) - - let inline FastHashTuple3 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3) = - TupleUtils.combine_tuple_hashes (TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x1) (GenericHashWithComparerFast comparer x2)) (GenericHashWithComparerFast comparer x3) - - let inline FastHashTuple4 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3,x4) = - TupleUtils.combine_tuple_hashes (TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x1) (GenericHashWithComparerFast comparer x2)) (TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x3) (GenericHashWithComparerFast comparer x4)) - - let inline FastHashTuple5 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3,x4,x5) = - TupleUtils.combine_tuple_hashes (TupleUtils.combine_tuple_hashes (TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x1) (GenericHashWithComparerFast comparer x2)) (TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x3) (GenericHashWithComparerFast comparer x4))) (GenericHashWithComparerFast comparer x5) - - let inline FastEqualsTuple2 (comparer:System.Collections.IEqualityComparer) (x1,x2) (y1,y2) = - GenericEqualityWithComparerFast comparer x1 y1 && - GenericEqualityWithComparerFast comparer x2 y2 - - let inline FastEqualsTuple3 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3) (y1,y2,y3) = - GenericEqualityWithComparerFast comparer x1 y1 && - GenericEqualityWithComparerFast comparer x2 y2 && - GenericEqualityWithComparerFast comparer x3 y3 - - let inline FastEqualsTuple4 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3,x4) (y1,y2,y3,y4) = - GenericEqualityWithComparerFast comparer x1 y1 && - GenericEqualityWithComparerFast comparer x2 y2 && - GenericEqualityWithComparerFast comparer x3 y3 && - GenericEqualityWithComparerFast comparer x4 y4 - - let inline FastEqualsTuple5 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3,x4,x5) (y1,y2,y3,y4,y5) = - GenericEqualityWithComparerFast comparer x1 y1 && - GenericEqualityWithComparerFast comparer x2 y2 && - GenericEqualityWithComparerFast comparer x3 y3 && - GenericEqualityWithComparerFast comparer x4 y4 && - GenericEqualityWithComparerFast comparer x5 y5 - - let inline FastCompareTuple2 (comparer:System.Collections.IComparer) (x1,x2) (y1,y2) = - let n = GenericComparisonWithComparerFast comparer x1 y1 - if n <> 0 then n else - GenericComparisonWithComparerFast comparer x2 y2 - - let inline FastCompareTuple3 (comparer:System.Collections.IComparer) (x1,x2,x3) (y1,y2,y3) = - let n = GenericComparisonWithComparerFast comparer x1 y1 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x2 y2 - if n <> 0 then n else - GenericComparisonWithComparerFast comparer x3 y3 - - let inline FastCompareTuple4 (comparer:System.Collections.IComparer) (x1,x2,x3,x4) (y1,y2,y3,y4) = - let n = GenericComparisonWithComparerFast comparer x1 y1 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x2 y2 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x3 y3 - if n <> 0 then n else - GenericComparisonWithComparerFast comparer x4 y4 - - let inline FastCompareTuple5 (comparer:System.Collections.IComparer) (x1,x2,x3,x4,x5) (y1,y2,y3,y4,y5) = - let n = GenericComparisonWithComparerFast comparer x1 y1 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x2 y2 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x3 y3 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x4 y4 - if n <> 0 then n else - GenericComparisonWithComparerFast comparer x5 y5 - - - - let inline GenericEquality x y = HashCompare.GenericEqualityFast x y - let inline GenericEqualityWithComparer comp x y = HashCompare.GenericEqualityWithComparerFast comp x y - let inline GenericComparison x y = HashCompare.GenericComparisonFast x y - let inline GenericComparisonWithComparer comp x y = HashCompare.GenericComparisonWithComparerFast comp x y - let inline GenericLessThan x y = HashCompare.GenericLessThanFast x y - let inline GenericGreaterThan x y = HashCompare.GenericGreaterThanFast x y - let inline GenericLessOrEqual x y = HashCompare.GenericLessOrEqualFast x y - let inline GenericGreaterOrEqual x y = HashCompare.GenericGreaterOrEqualFast x y - let inline GenericMinimum x y = if HashCompare.GenericLessThanFast x y then x else y - let inline GenericMaximum x y = if HashCompare.GenericLessThanFast x y then y else x - - let inline PhysicalEquality x y = HashCompare.PhysicalEqualityFast x y - let inline PhysicalHash x = HashCompare.PhysicalHashFast x - let FSharpComparer() = HashCompare.fsComparer :> System.Collections.IComparer - let FSharpEqualityComparer() = HashCompare.fsUnlimitedHasher :> System.Collections.IEqualityComparer - - let inline GenericHash x = HashCompare.GenericHashFast x - let inline GenericLimitedHash limit x = HashCompare.GenericLimitedHashFast limit x - let inline GenericHashWithComparer comp x = HashCompare.GenericHashWithComparerFast comp x - - let inline MakeGenericEqualityComparer<'T>() = - // type-specialize some common cases to generate more efficient functions - { new System.Collections.Generic.IEqualityComparer<'T> with - member self.GetHashCode(x) = GenericHash x - member self.Equals(x,y) = GenericEquality x y } - - let inline MakeGenericLimitedEqualityComparer<'T>(limit:int) = - // type-specialize some common cases to generate more efficient functions - { new System.Collections.Generic.IEqualityComparer<'T> with - member self.GetHashCode(x) = GenericLimitedHash limit x - member self.Equals(x,y) = GenericEquality x y } - -(* - let CharIEquality = MakeGenericEqualityComparer() - let StringIEquality = MakeGenericEqualityComparer() - let SByteIEquality = MakeGenericEqualityComparer() - let Int16IEquality = MakeGenericEqualityComparer() - let Int32IEquality = MakeGenericEqualityComparer() - let Int64IEquality = MakeGenericEqualityComparer() - let IntPtrIEquality = MakeGenericEqualityComparer() - let ByteIEquality = MakeGenericEqualityComparer() - let UInt16IEquality = MakeGenericEqualityComparer() - let UInt32IEquality = MakeGenericEqualityComparer() - let UInt64IEquality = MakeGenericEqualityComparer() - let UIntPtrIEquality = MakeGenericEqualityComparer() - let FloatIEquality = MakeGenericEqualityComparer() - let Float32IEquality = MakeGenericEqualityComparer() - let DecimalIEquality = MakeGenericEqualityComparer() - - [] - type FastGenericEqualityComparerTable<'T>() = - static let f : System.Collections.Generic.IEqualityComparer<'T> = - match typeof<'T> with - | ty when ty.Equals(typeof) -> unboxPrim (box ByteIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box CharIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box SByteIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box Int16IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box Int32IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box Int64IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box IntPtrIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt16IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt32IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt64IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box UIntPtrIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box FloatIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box Float32IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box DecimalIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box StringIEquality) - | _ -> MakeGenericEqualityComparer<'T>() - static member Function : System.Collections.Generic.IEqualityComparer<'T> = f - - let FastGenericEqualityComparer<'T> = FastGenericEqualityComparerTable<'T>.Function -*) - let inline FastGenericEqualityComparer<'T> = MakeGenericEqualityComparer<'T>() - let inline FastLimitedGenericEqualityComparer<'T>(limit) = MakeGenericLimitedEqualityComparer<'T>(limit) - - let inline MakeFastGenericComparer<'T>() = - { new System.Collections.Generic.IComparer<'T> with - member __.Compare(x,y) = GenericComparison x y } - - let CharComparer = MakeFastGenericComparer() - let StringComparer = MakeFastGenericComparer() - let SByteComparer = MakeFastGenericComparer() - let Int16Comparer = MakeFastGenericComparer() - let Int32Comparer = MakeFastGenericComparer() - let Int64Comparer = MakeFastGenericComparer() - let IntPtrComparer = MakeFastGenericComparer() - let ByteComparer = MakeFastGenericComparer() - let UInt16Comparer = MakeFastGenericComparer() - let UInt32Comparer = MakeFastGenericComparer() - let UInt64Comparer = MakeFastGenericComparer() - let UIntPtrComparer = MakeFastGenericComparer() - let FloatComparer = MakeFastGenericComparer() - let Float32Comparer = MakeFastGenericComparer() - let DecimalComparer = MakeFastGenericComparer() - - /// Use a type-indexed table to ensure we only create a single FastStructuralComparison function - /// for each type - [] - type FastGenericComparerTable<'T>() = - static let f : System.Collections.Generic.IComparer<'T> = - match typeof<'T> with - | ty when ty.Equals(typeof) -> unboxPrim (box ByteComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box CharComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box SByteComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box Int16Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box Int32Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box Int64Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box IntPtrComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt16Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt32Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt64Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box UIntPtrComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box FloatComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box Float32Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box DecimalComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box StringComparer) - | _ -> MakeFastGenericComparer<'T>() - static member Function : System.Collections.Generic.IComparer<'T> = f - - let FastGenericComparer<'T> = FastGenericComparerTable<'T>.Function - - - let inline retype (x:'T) : 'U = (# "" x : 'U #) - - let inline EnumOfValue (u : 'u) : 'e when 'e : enum<'u> = - unboxPrim<'e>(box u) - when 'e : 'e = (retype u : 'e) - - let inline EnumToValue (e : 'e) : 'u when 'e : enum<'u> = - unboxPrim<'u>(box e) - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - when 'e : 'e = (retype e : 'u) - - - - let inline format_error() = raise (new System.FormatException("Input string was not in a correct format")) - - // Parse formats - // DDDDDDDD - // -DDDDDDDD - // 0xHHHHHHHH - // -0xHHHHHHHH - // 0bBBBBBBB - // -0bBBBBBBB - // 0oOOOOOOO - // -0oOOOOOOO - // without leading/trailing spaces. - /// - // Note: Parse defaults to NumberStyles.Integer = AllowLeadingWhite ||| AllowTrailingWhite ||| AllowLeadingSign - // However, that is not the required behaviour of 'int32', 'int64' etc. when used on string - // arguments: we explicitly disallow AllowLeadingWhite ||| AllowTrailingWhite - // and only request AllowLeadingSign. - - let is_oxb c = -#if FX_NO_TO_LOWER_INVARIANT - let c = System.Char.ToLower c -#else - let c = System.Char.ToLowerInvariant c -#endif - charEq c 'x' || charEq c 'o' || charEq c 'b' - - let is_0oxb (s:string) p l = - l >= p + 2 && charEq (s.Chars(p)) '0' && is_oxb (s.Chars(p+1)) - - let get_0oxb (s:string) p l = - if is_0oxb s p l -#if FX_NO_TO_LOWER_INVARIANT - then p+2,System.Char.ToLower(s.Chars(p+1) ) -#else - then p+2,System.Char.ToLowerInvariant(s.Chars(p+1) ) -#endif - else p,'d' - - let getSign32 (s:string) p l = - if (l >= p + 1 && charEq (s.Chars(p)) '-') - then 1,(-1) - else 0,1 - - let getSign64 (s:string) p l = - if (l >= p + 1 && charEq (s.Chars(p)) '-') - then 1, -1L - else 0,1L - - let parseOctalUInt64 (s:string) p l = - let rec parse n acc = if n < l then parse (n+1) (acc *.. 8UL +.. (let c = s.Chars(n) in if c >=... '0' && c <=... '7' then Convert.ToUInt64(c) -.. Convert.ToUInt64('0') else format_error())) else acc in - parse p 0UL - - let parseBinaryUInt64 (s:string) p l = - let rec parse n acc = if n < l then parse (n+1) (acc *.. 2UL +.. (match s.Chars(n) with '0' -> 0UL | '1' -> 1UL | _ -> format_error())) else acc in - parse p 0UL - - let ParseUInt32 (s:string) = - let s = s.Trim() - let l = s.Length - let p = 0 - let p,specifier = get_0oxb s p l in - if p >= l then format_error() else - match specifier with - | 'x' -> UInt32.Parse( s.Substring(p), NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture) - | 'b' -> Convert.ToUInt32(parseBinaryUInt64 s p l) - | 'o' -> Convert.ToUInt32(parseOctalUInt64 s p l) - | _ -> UInt32.Parse(s.Substring(p), NumberStyles.Integer, CultureInfo.InvariantCulture) in - - let inline int32_of_uint32 (x:uint32) = (# "" x : int32 #) - let inline int64_of_uint64 (x:uint64) = (# "" x : int64 #) - - let ParseInt32 (s:string) = - let s = s.Trim() in - let l = s.Length in - let p = 0 in - let p,sign = getSign32 s p l in - let p,specifier = get_0oxb s p l in - if p >= l then format_error() else - match Char.ToLower(specifier,CultureInfo.InvariantCulture(*FxCop:1304*)) with - | 'x' -> sign * (int32_of_uint32 (Convert.ToUInt32(UInt64.Parse(s.Substring(p), NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture)))) - | 'b' -> sign * (int32_of_uint32 (Convert.ToUInt32(parseBinaryUInt64 s p l))) - | 'o' -> sign * (int32_of_uint32 (Convert.ToUInt32(parseOctalUInt64 s p l))) - | _ -> Int32.Parse(s, NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture) - - let ParseInt64 (s:string) = - let s = s.Trim() - let l = s.Length - let p = 0 - let p,sign = getSign64 s p l in - let p,specifier = get_0oxb s p l in - if p >= l then format_error() else - match Char.ToLower(specifier,CultureInfo.InvariantCulture(*FxCop:1304*)) with - | 'x' -> sign *. Int64.Parse(s.Substring(p), NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture) - | 'b' -> sign *. (int64_of_uint64 (parseBinaryUInt64 s p l)) - | 'o' -> sign *. (int64_of_uint64 (parseOctalUInt64 s p l)) - | _ -> Int64.Parse(s, NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture) - - let ParseUInt64 (s:string) : uint64 = - let s = s.Trim() in - let l = s.Length in - let p = 0 in - let p,specifier = get_0oxb s p l in - if p >= l then format_error() else - match specifier with - | 'x' -> UInt64.Parse(s.Substring(p), NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture) - | 'b' -> parseBinaryUInt64 s p l - | 'o' -> parseOctalUInt64 s p l - | _ -> UInt64.Parse(s.Substring(p), NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture) - - - [] - type GenericZeroDynamicImplTable<'T>() = - static let result : 'T = - // The dynamic implementation - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<'T> (box 0y) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0s) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0L) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0n) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0uy) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0us) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0u) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0UL) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0un) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0M) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0.0) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0.0f) - else - let pinfo = aty.GetProperty("Zero") - unboxPrim<'T> (pinfo.GetValue(null,null)) - static member Result : 'T = result - - [] - type GenericOneDynamicImplTable<'T>() = - static let result : 'T = - // The dynamic implementation - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<'T> (box 1y) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1s) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1L) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1n) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1uy) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1us) - elif aty.Equals(typeof) then unboxPrim<'T> (box (retype 1us : char)) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1u) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1UL) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1un) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1M) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1.0) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1.0f) - else - let pinfo = aty.GetProperty("One") - unboxPrim<'T> (pinfo.GetValue(null,null)) - - static member Result : 'T = result - - let GenericZeroDynamic< 'T >() : 'T = GenericZeroDynamicImplTable<'T>.Result - let GenericOneDynamic< 'T >() : 'T = GenericOneDynamicImplTable<'T>.Result - - let inline GenericZero< ^T when ^T : (static member Zero : ^T) > : ^T = - GenericZeroDynamic<(^T)>() - when ^T : int32 = 0 - when ^T : float = 0.0 - when ^T : float32 = 0.0f - when ^T : int64 = 0L - when ^T : uint64 = 0UL - when ^T : uint32 = 0ul - when ^T : nativeint = 0n - when ^T : unativeint = 0un - when ^T : int16 = 0s - when ^T : uint16 = 0us - when ^T : sbyte = 0y - when ^T : byte = 0uy - when ^T : decimal = 0M - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - when ^T : ^T = (^T : (static member Zero : ^T) ()) - - - let inline GenericOne< ^T when ^T : (static member One : ^T) > : ^T = - GenericOneDynamic<(^T)>() - when ^T : int32 = 1 - when ^T : float = 1.0 - when ^T : float32 = 1.0f - when ^T : int64 = 1L - when ^T : uint64 = 1UL - when ^T : uint32 = 1ul - when ^T : nativeint = 1n - when ^T : unativeint = 1un - when ^T : int16 = 1s - when ^T : uint16 = 1us - when ^T : char = (retype 1us : char) - when ^T : sbyte = 1y - when ^T : byte = 1uy - when ^T : decimal = 1M - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - // That is, not in the generic implementation of '+' - when ^T : ^T = (^T : (static member One : ^T) ()) - - [] - type GenericDivideByIntDynamicImplTable<'T>() = - static let result : ('T -> int -> 'T) = - // The dynamic implementation - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_> (box (fun (x:decimal) (n:int) -> System.Decimal.Divide(x, System.Convert.ToDecimal(n)))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float) (n:int) -> (# "div" x ((# "conv.r8" n : float #)) : float #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float32) (n:int) -> (# "div" x ((# "conv.r4" n : float32 #)) : float32 #))) - else - match aty.GetMethod("DivideByInt",[| aty; typeof |]) with - | null -> raise (NotSupportedException "dynamic invocation of DivideByInt involving coercions") - | m -> (fun x n -> unboxPrim<_> (m.Invoke(null,[| box x; box n |]))) - - static member Result : ('T -> int -> 'T) = result - - let DivideByIntDynamic<'T> x n = GenericDivideByIntDynamicImplTable<('T)>.Result x n - - let inline DivideByInt< ^T when ^T : (static member DivideByInt : ^T * int -> ^T) > (x:^T) (n:int) : ^T = - DivideByIntDynamic<'T> x n - when ^T : float = (# "div" x ((# "conv.r8" (n:int) : float #)) : float #) - when ^T : float32 = (# "div" x ((# "conv.r4" (n:int) : float32 #)) : float32 #) - when ^T : decimal = System.Decimal.Divide((retype x:decimal), System.Convert.ToDecimal(n)) - when ^T : ^T = (^T : (static member DivideByInt : ^T * int -> ^T) (x, n)) - - - // Dynamic implementation of addition operator resolution - [] - type AdditionDynamicImplTable<'T,'U,'V>() = - static let impl : ('T -> 'U -> 'V) = - // The dynamic implementation - let aty = typeof<'T> - let bty = typeof<'U> - let cty = typeof<'V> - let dyn() = - let ameth = aty.GetMethod("op_Addition",[| aty; bty |]) - let bmeth = if aty.Equals(bty) then null else bty.GetMethod("op_Addition",[| aty; bty |]) - match ameth,bmeth with - | null, null -> raise (NotSupportedException "dynamic invocation of op_Addition involving coercions") - | m,null | null,m -> (fun x y -> unboxPrim<_> (m.Invoke(null,[| box x; box y |]))) - | _ -> raise (NotSupportedException "dynamic invocation of op_Addition involving overloading") - - if aty.Equals(bty) && bty.Equals(cty) then - if aty.Equals(typeof) then unboxPrim<_> (box (fun (x:sbyte) (y:sbyte) -> (# "conv.i1" (# "add" x y : int32 #) : sbyte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int16) (y:int16) -> (# "conv.i2" (# "add" x y : int32 #) : int16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int32) (y:int32) -> (# "add" x y : int32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int64) (y:int64) -> (# "add" x y : int64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:nativeint) (y:nativeint) -> (# "add" x y : nativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:byte) (y:byte) -> (# "conv.u1" (# "add" x y : uint32 #) : byte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint16) (y:uint16) -> (# "conv.u2" (# "add" x y : uint32 #) : uint16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint32) (y:uint32) -> (# "add" x y : uint32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint64) (y:uint64) -> (# "add" x y : uint64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:unativeint) (y:unativeint) -> (# "add" x y : unativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float) (y:float) -> (# "add" x y : float #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float32) (y:float32) -> (# "add" x y : float32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:string) (y:string) -> System.String.Concat(x,y))) - else dyn() - else dyn() - - static member Impl : ('T -> 'U -> 'V) = impl - - let AdditionDynamic<'T,'U,'V> x n = AdditionDynamicImplTable<'T,'U,'V>.Impl x n - - // Dynamic implementation of checked addition operator resolution - [] - type CheckedAdditionDynamicImplTable<'T,'U,'V>() = - static let impl : ('T -> 'U -> 'V) = - // The dynamic implementation - let aty = typeof<'T> - let bty = typeof<'U> - let cty = typeof<'V> - let dyn() = - let ameth = aty.GetMethod("op_Addition",[| aty; bty |]) - let bmeth = if aty.Equals(bty) then null else bty.GetMethod("op_Addition",[| aty; bty |]) - match ameth,bmeth with - | null, null -> raise (NotSupportedException "dynamic invocation of op_Addition involving coercions") - | m,null | null,m -> (fun x y -> unboxPrim<_> (m.Invoke(null,[| box x; box y |]))) - | _ -> raise (NotSupportedException "dynamic invocation of op_Addition involving overloading") - - if aty.Equals(bty) && bty.Equals(cty) then - if aty.Equals(typeof) then unboxPrim<_> (box (fun (x:sbyte) (y:sbyte) -> (# "conv.ovf.i1" (# "add.ovf" x y : int32 #) : sbyte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int16) (y:int16) -> (# "conv.ovf.i2" (# "add.ovf" x y : int32 #) : int16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int32) (y:int32) -> (# "add.ovf" x y : int32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int64) (y:int64) -> (# "add.ovf" x y : int64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:nativeint) (y:nativeint) -> (# "add.ovf" x y : nativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:byte) (y:byte) -> (# "conv.ovf.u1.un" (# "add.ovf.un" x y : uint32 #) : byte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint16) (y:uint16) -> (# "conv.ovf.u2.un" (# "add.ovf.un" x y : uint32 #) : uint16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:char) (y:char) -> (# "conv.ovf.u2.un" (# "add.ovf.un" x y : uint32 #) : char #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint32) (y:uint32) -> (# "add.ovf.un" x y : uint32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint64) (y:uint64) -> (# "add.ovf.un" x y : uint64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:unativeint) (y:unativeint) -> (# "add.ovf.un" x y : unativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float) (y:float) -> (# "add" x y : float #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float32) (y:float32) -> (# "add" x y : float32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:string) (y:string) -> System.String.Concat(x,y))) - else dyn() - else dyn() - - - static member Impl : ('T -> 'U -> 'V) = impl - - let CheckedAdditionDynamic<'T,'U,'V> x n = CheckedAdditionDynamicImplTable<'T,'U,'V>.Impl x n - - - // Dynamic implementation of addition operator resolution - [] - type MultiplyDynamicImplTable<'T,'U,'V>() = - static let impl : ('T -> 'U -> 'V) = - // The dynamic implementation - let aty = typeof<'T> - let bty = typeof<'U> - let cty = typeof<'V> - let dyn() = - let ameth = aty.GetMethod("op_Multiply",[| aty; bty |]) - let bmeth = if aty.Equals(bty) then null else bty.GetMethod("op_Multiply",[| aty; bty |]) - match ameth,bmeth with - | null, null -> raise (NotSupportedException "dynamic invocation of op_Multiply involving coercions") - | m,null | null,m -> (fun x y -> unboxPrim<_> (m.Invoke(null,[| box x; box y |]))) - | _ -> raise (NotSupportedException "dynamic invocation of op_Multiply involving overloading") - - if aty.Equals(bty) && bty.Equals(cty) then - if aty.Equals(typeof) then unboxPrim<_> (box (fun (x:sbyte) (y:sbyte) -> (# "conv.i1" (# "mul" x y : int32 #) : sbyte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int16) (y:int16) -> (# "conv.i2" (# "mul" x y : int32 #) : int16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int32) (y:int32) -> (# "mul" x y : int32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int64) (y:int64) -> (# "mul" x y : int64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:nativeint) (y:nativeint) -> (# "mul" x y : nativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:byte) (y:byte) -> (# "conv.u1" (# "mul" x y : uint32 #) : byte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint16) (y:uint16) -> (# "conv.u2" (# "mul" x y : uint32 #) : uint16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint32) (y:uint32) -> (# "mul" x y : uint32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint64) (y:uint64) -> (# "mul" x y : uint64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:unativeint) (y:unativeint) -> (# "mul" x y : unativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float) (y:float) -> (# "mul" x y : float #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float32) (y:float32) -> (# "mul" x y : float32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:string) (y:string) -> System.String.Concat(x,y))) - else dyn() - else dyn() - - static member Impl : ('T -> 'U -> 'V) = impl - - let MultiplyDynamic<'T,'U,'V> x n = MultiplyDynamicImplTable<'T,'U,'V>.Impl x n - - // Dynamic implementation of checked addition operator resolution - [] - type CheckedMultiplyDynamicImplTable<'T,'U,'V>() = - static let impl : ('T -> 'U -> 'V) = - // The dynamic implementation - let aty = typeof<'T> - let bty = typeof<'U> - let cty = typeof<'V> - let dyn() = - let ameth = aty.GetMethod("op_Multiply",[| aty; bty |]) - let bmeth = if aty.Equals(bty) then null else bty.GetMethod("op_Multiply",[| aty; bty |]) - match ameth,bmeth with - | null, null -> raise (NotSupportedException "dynamic invocation of op_Multiply involving coercions") - | m,null | null,m -> (fun x y -> unboxPrim<_> (m.Invoke(null,[| box x; box y |]))) - | _ -> raise (NotSupportedException "dynamic invocation of op_Multiply involving overloading") - - if aty.Equals(bty) && bty.Equals(cty) then - if aty.Equals(typeof) then unboxPrim<_> (box (fun (x:sbyte) (y:sbyte) -> (# "conv.ovf.i1" (# "mul.ovf" x y : int32 #) : sbyte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int16) (y:int16) -> (# "conv.ovf.i2" (# "mul.ovf" x y : int32 #) : int16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int32) (y:int32) -> (# "mul.ovf" x y : int32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int64) (y:int64) -> (# "mul.ovf" x y : int64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:nativeint) (y:nativeint) -> (# "mul.ovf" x y : nativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:byte) (y:byte) -> (# "conv.ovf.u1.un" (# "mul.ovf.un" x y : uint32 #) : byte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint16) (y:uint16) -> (# "conv.ovf.u2.un" (# "mul.ovf.un" x y : uint16 #) : uint16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint32) (y:uint32) -> (# "mul.ovf.un" x y : uint32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint64) (y:uint64) -> (# "mul.ovf.un" x y : uint64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:unativeint) (y:unativeint) -> (# "mul.ovf.un" x y : unativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float) (y:float) -> (# "mul" x y : float #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float32) (y:float32) -> (# "mul" x y : float32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:string) (y:string) -> System.String.Concat(x,y))) - else dyn() - else dyn() - - static member Impl : ('T -> 'U -> 'V) = impl - - let CheckedMultiplyDynamic<'T,'U,'V> x n = CheckedMultiplyDynamicImplTable<'T,'U,'V>.Impl x n - - - - - open BasicInlinedOperations - open LanguagePrimitives - open LanguagePrimitives.IntrinsicOperators - open LanguagePrimitives.IntrinsicFunctions - -#if FX_ATLEAST_40 -#else - type Tuple<'T1> with - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1> = other :?> Tuple<'T1> - comparer.Compare((box t.Item1),(box t2.Item1)) - interface IStructuralEquatable with - override t.Equals(other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1> = other :?> Tuple<'T1> - comparer.Equals((box t.Item1),(box t2.Item1)) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - comparer.GetHashCode(t.Item1) - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other,(HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2> with - override x.ToString() = - let sb = StringBuilder(10) in - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2> = other :?> Tuple<'T1,'T2> - HashCompare.FastCompareTuple2 comparer (retype t : ('T1 * 'T2)) (retype t2) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2> = other :?> Tuple<'T1,'T2> - HashCompare.FastEqualsTuple2 comparer (retype t : ('T1 * 'T2)) (retype t2) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - HashCompare.FastHashTuple2 comparer (retype t : ('T1 * 'T2)) - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - - type Tuple<'T1,'T2,'T3> with - override x.ToString() = - let sb = StringBuilder(10) in - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3> = other :?> Tuple<'T1,'T2,'T3> - HashCompare.FastCompareTuple3 comparer (retype t : ('T1 * 'T2 * 'T3)) (retype t2) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3> = other :?> Tuple<'T1,'T2,'T3> - HashCompare.FastEqualsTuple3 comparer (retype t : ('T1 * 'T2 * 'T3)) (retype t2) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - HashCompare.FastHashTuple3 comparer (retype t : ('T1 * 'T2 * 'T3)) - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2,'T3,'T4> with - override x.ToString() = - let sb = StringBuilder(10) in - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(",") - .Append(box(x.Item4).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4> = other :?> Tuple<'T1,'T2,'T3,'T4> - HashCompare.FastCompareTuple4 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4)) (retype t2) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4> = other :?> Tuple<'T1,'T2,'T3,'T4> - HashCompare.FastEqualsTuple4 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4)) (retype t2) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - HashCompare.FastHashTuple4 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4)) - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2,'T3,'T4,'T5> with - override x.ToString() = - let sb = StringBuilder(10) in - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(",") - .Append(box(x.Item4).ToString()).Append(",") - .Append(box(x.Item5).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5> - HashCompare.FastCompareTuple5 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4 * 'T5)) (retype t2) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5> - HashCompare.FastEqualsTuple5 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4 * 'T5)) (retype t2) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - HashCompare.FastHashTuple5 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4 * 'T5)) - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6> with - override x.ToString() = - let sb = StringBuilder(10) - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(",") - .Append(box(x.Item4).ToString()).Append(",") - .Append(box(x.Item5).ToString()).Append(",") - .Append(box(x.Item6).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6> - let mutable n = comparer.Compare((box t.Item1),(box t2.Item1)) - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item2), (box t2.Item2)) ; - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item3), (box t2.Item3)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item4), (box t2.Item4)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item5), (box t2.Item5)); - if n <> 0 then - n - else - comparer.Compare((box t.Item6), (box t2.Item6)) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6> - comparer.Equals((box t.Item1),(box t2.Item1)) && comparer.Equals((box t.Item2),(box t2.Item2)) && comparer.Equals((box t.Item3),(box t2.Item3)) && - comparer.Equals((box t.Item4),(box t2.Item4)) && comparer.Equals((box t.Item5),(box t2.Item5)) && comparer.Equals((box t.Item6),(box t2.Item6)) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - TupleUtils.combine_tuple_hash_codes [|(comparer.GetHashCode(t.Item1)) ; (comparer.GetHashCode(t.Item2)) ; (comparer.GetHashCode(t.Item3)) ; (comparer.GetHashCode(t.Item4)) ; (comparer.GetHashCode(t.Item5)) ; (comparer.GetHashCode(t.Item6))|] - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> with - override x.ToString() = - let sb = StringBuilder(10) - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(",") - .Append(box(x.Item4).ToString()).Append(",") - .Append(box(x.Item5).ToString()).Append(",") - .Append(box(x.Item6).ToString()).Append(",") - .Append(box(x.Item7).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> - let mutable n = comparer.Compare((box t.Item1),(box t2.Item1)) - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item2), (box t2.Item2)) ; - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item3), (box t2.Item3)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item4), (box t2.Item4)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item5), (box t2.Item5)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item6), (box t2.Item6)); - if n <> 0 then - n - else - comparer.Compare((box t.Item7), (box t2.Item7)) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> - comparer.Equals((box t.Item1),(box t2.Item1)) && comparer.Equals((box t.Item2),(box t2.Item2)) && comparer.Equals((box t.Item3),(box t2.Item3)) && - comparer.Equals((box t.Item4),(box t2.Item4)) && comparer.Equals((box t.Item5),(box t2.Item5)) && comparer.Equals((box t.Item6),(box t2.Item6)) && comparer.Equals((box t.Item7),(box t2.Item7)) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - TupleUtils.combine_tuple_hash_codes [|(comparer.GetHashCode(t.Item1)) ; (comparer.GetHashCode(t.Item2)) ; (comparer.GetHashCode(t.Item3)) ; (comparer.GetHashCode(t.Item4)) ; (comparer.GetHashCode(t.Item5)) ; (comparer.GetHashCode(t.Item6)) ; (comparer.GetHashCode(t.Item7))|] - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> with - override x.ToString() = - let sb = StringBuilder(10) - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(",") - .Append(box(x.Item4).ToString()).Append(",") - .Append(box(x.Item5).ToString()).Append(",") - .Append(box(x.Item6).ToString()).Append(",") - .Append(box(x.Item7).ToString()).Append(",") - .Append("...").Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> - let mutable n = comparer.Compare((box t.Item1),(box t2.Item1)) - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item2), (box t2.Item2)) ; - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item3), (box t2.Item3)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item4), (box t2.Item4)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item5), (box t2.Item5)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item6), (box t2.Item6)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item7), (box t2.Item7)) - if n <> 0 then - n - else - comparer.Compare((box t.Rest), (box t2.Rest)) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> - comparer.Equals((box t.Item1),(box t2.Item1)) && comparer.Equals((box t.Item2),(box t2.Item2)) && comparer.Equals((box t.Item3),(box t2.Item3)) && - comparer.Equals((box t.Item4),(box t2.Item4)) && comparer.Equals((box t.Item5),(box t2.Item5)) && comparer.Equals((box t.Item6),(box t2.Item6)) && - comparer.Equals((box t.Item7),(box t2.Item7)) && comparer.Equals((box t.Rest),(box t2.Rest)) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - TupleUtils.combine_tuple_hash_codes [|(comparer.GetHashCode(t.Item1)) ; (comparer.GetHashCode(t.Item2)) ; (comparer.GetHashCode(t.Item3)) ; (comparer.GetHashCode(t.Item4)) ; (comparer.GetHashCode(t.Item5)) ; (comparer.GetHashCode(t.Item6)) ; (comparer.GetHashCode(t.Item7)) ; (comparer.GetHashCode(t.Rest))|] - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) -#endif - - [] - type Choice<'T1,'T2> = - | Choice1Of2 of 'T1 - | Choice2Of2 of 'T2 - - [] - type Choice<'T1,'T2,'T3> = - | Choice1Of3 of 'T1 - | Choice2Of3 of 'T2 - | Choice3Of3 of 'T3 - - [] - type Choice<'T1,'T2,'T3,'T4> = - | Choice1Of4 of 'T1 - | Choice2Of4 of 'T2 - | Choice3Of4 of 'T3 - | Choice4Of4 of 'T4 - - [] - type Choice<'T1,'T2,'T3,'T4,'T5> = - | Choice1Of5 of 'T1 - | Choice2Of5 of 'T2 - | Choice3Of5 of 'T3 - | Choice4Of5 of 'T4 - | Choice5Of5 of 'T5 - - [] - type Choice<'T1,'T2,'T3,'T4,'T5,'T6> = - | Choice1Of6 of 'T1 - | Choice2Of6 of 'T2 - | Choice3Of6 of 'T3 - | Choice4Of6 of 'T4 - | Choice5Of6 of 'T5 - | Choice6Of6 of 'T6 - - [] - type Choice<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = - | Choice1Of7 of 'T1 - | Choice2Of7 of 'T2 - | Choice3Of7 of 'T3 - | Choice4Of7 of 'T4 - | Choice5Of7 of 'T5 - | Choice6Of7 of 'T6 - | Choice7Of7 of 'T7 - - //------------------------------------------------------------------------- - // F#-specific Exceptions - - exception Failure of string with - override x.Message = (match (x :> exn) with Failure(s) -> s) - - exception MatchFailure of string * int * int with - override x.Message = (match (x :> exn) with MatchFailure(s,n,m) -> "The match cases were incomplete") - - exception DynamicInvocationNotSupported of string - - //------------------------------------------------------------------------- - // Function Values - - [] - type TypeFunc() = - abstract Specialize<'T> : unit -> obj - - [] - type FastFunc<'T,'Res>() = - abstract Invoke : 'T -> 'Res - - module OptimizedClosures = - - [] - type FastFunc2 <'T,'U,'V>() = - inherit FastFunc<'T,('U -> 'V)>() - abstract Invoke : 'T * 'U -> 'V - override f.Invoke(t) = (fun u -> f.Invoke(t,u)) - static member Adapt(f : 'T -> 'U -> 'V) = - match box f with - | :? FastFunc2 <'T,'U,'V> as f -> f - | _ -> { new FastFunc2<'T,'U,'V>() with - member x.Invoke(t,u) = f t u } - - [] - type FastFunc3<'T,'U,'V,'W>() = - inherit FastFunc<'T,('U -> 'V -> 'W)>() - abstract Invoke : 'T * 'U * 'V -> 'W - override f.Invoke(t) = (fun u v -> f.Invoke(t,u,v)) - static member Adapt(f : 'T -> 'U -> 'V -> 'W) = - match box f with - | :? FastFunc3<'T,'U,'V,'W> as f -> f - | :? FastFunc2<'T,'U,FastFunc<'V,'W>> as f -> - { new FastFunc3<'T,'U,'V,'W>() with - member x.Invoke(t,u,v) = f.Invoke(t,u).Invoke(v) } - | _ -> { new FastFunc3<'T,'U,'V,'W>() with - member x.Invoke(t,u,v) = f t u v } - - [] - type FastFunc4 <'T,'U,'V,'W,'X>() = - inherit FastFunc<'T,('U -> 'V -> 'W -> 'X)>() - abstract Invoke : 'T * 'U * 'V * 'W -> 'X - static member Adapt(f : 'T -> 'U -> 'V -> 'W -> 'X) = - match box f with - | :? FastFunc4<'T,'U,'V,'W,'X> as f -> f - | :? FastFunc3<'T,'U,'V,FastFunc<'W,'X>> as f -> - { new FastFunc4<'T,'U,'V,'W,'X>() with - member x.Invoke(t,u,v,w) = f.Invoke(t,u,v).Invoke(w) } - | :? FastFunc2<'T,'U,FastFunc<'V,FastFunc<'W,'X>>> as f -> - { new FastFunc4<'T,'U,'V,'W,'X>() with - member x.Invoke(t,u,v,w) = f.Invoke(t,u).Invoke(v).Invoke(w) } - | _ -> { new FastFunc4<'T,'U,'V,'W,'X>() with - member x.Invoke(t,u,v,w) = f t u v w } - override f.Invoke(t) = (fun u v w -> f.Invoke(t,u,v,w)) - - [] - type FastFunc5<'T,'U,'V,'W,'X,'Y>() = - inherit FastFunc<'T,('U -> 'V -> 'W -> 'X -> 'Y)>() - abstract Invoke : 'T * 'U * 'V * 'W * 'X -> 'Y - override f.Invoke(t) = (fun u v w x -> f.Invoke(t,u,v,w,x)) - static member Adapt(f : 'T -> 'U -> 'V -> 'W -> 'X -> 'Y) = - match box f with - | :? FastFunc5<'T,'U,'V,'W,'X,'Y> as f -> f - | :? FastFunc4<'T,'U,'V,'W,FastFunc<'X,'Y>> as f -> - { new FastFunc5<'T,'U,'V,'W,'X,'Y>() with - member ff.Invoke(t,u,v,w,x) = f.Invoke(t,u,v,w).Invoke(x) } - | :? FastFunc3<'T,'U,'V,FastFunc<'W,FastFunc<'X,'Y>>> as f -> - { new FastFunc5<'T,'U,'V,'W,'X,'Y>() with - member ff.Invoke(t,u,v,w,x) = f.Invoke(t,u,v).Invoke(w).Invoke(x) } - | :? FastFunc2<'T,'U,FastFunc<'V,FastFunc<'W,FastFunc<'X,'Y>>>> as f -> - { new FastFunc5<'T,'U,'V,'W,'X,'Y>() with - member ff.Invoke(t,u,v,w,x) = f.Invoke(t,u).Invoke(v).Invoke(w).Invoke(x) } - | _ -> { new FastFunc5<'T,'U,'V,'W,'X,'Y>() with - member ff.Invoke(t,u,v,w,x) = f t u v w x } - - let inline invokeFast2((f1 : FastFunc<'T,('U -> 'V)>), t,u) = - match f1 with - | :? FastFunc2<'T,'U,'V> as f2 -> f2.Invoke(t,u) - | _ -> (f1.Invoke(t)) u - - let inline invokeFast3((f1 : FastFunc<'T,('U -> 'V -> 'W)>), t,u,v) = - match f1 with - | :? FastFunc3<'T,'U,'V,'W> as f3 -> f3.Invoke(t,u,v) - | :? FastFunc2<'T,'U,('V -> 'W)> as f2 -> (f2.Invoke(t,u)) v - | _ -> (f1.Invoke(t)) u v - - let inline invokeFast4((f1 : FastFunc<'T,('U -> 'V -> 'W -> 'X)>), t,u,v,w) = - match f1 with - | :? FastFunc4<'T,'U,'V,'W,'X> as f4 -> f4.Invoke(t,u,v,w) - | :? FastFunc3<'T,'U,'V,('W -> 'X)> as f3 -> (f3.Invoke(t,u,v)) w - | :? FastFunc2<'T,'U,('V -> 'W -> 'X)> as f2 -> (f2.Invoke(t,u)) v w - | _ -> (f1.Invoke(t)) u v w - - let inline invokeFast5((f1 : FastFunc<'T,('U -> 'V -> 'W -> 'X -> 'Y)>), t,u,v,w,x) = - match f1 with - | :? FastFunc5<'T,'U,'V,'W,'X,'Y> as f5 -> f5.Invoke(t,u,v,w,x) - | :? FastFunc4<'T,'U,'V,'W,('X -> 'Y)> as f4 -> (f4.Invoke(t,u,v,w)) x - | :? FastFunc3<'T,'U,'V,('W -> 'X -> 'Y)> as f3 -> (f3.Invoke(t,u,v)) w x - | :? FastFunc2<'T,'U,('V -> 'W -> 'X -> 'Y)> as f2 -> (f2.Invoke(t,u)) v w x - | _ -> (f1.Invoke(t)) u v w x - - - type FastFunc<'T,'Res> with - [] - [] - static member op_Implicit(f : System.Converter<_,_>) : ('T -> 'Res) = (fun t -> f.Invoke(t)) - [] - [] - static member op_Implicit( f : ('T -> 'Res) ) = new System.Converter<'T,'Res>(f) - - static member FromConverter(f : System.Converter<_,_>) : ('T -> 'Res) = (fun t -> f.Invoke(t)) - static member ToConverter( f : ('T -> 'Res) ) = new System.Converter<'T,'Res>(f) - - static member InvokeFast(f:FastFunc<_,_>,(t:'T),(u:'Res)) = OptimizedClosures.invokeFast2(f,t,u) - static member InvokeFast(f:FastFunc<_,_>,(t:'T),(u:'Res),v) = OptimizedClosures.invokeFast3(f,t,u,v) - static member InvokeFast(f:FastFunc<_,_>,(t:'T),(u:'Res),v,w) = OptimizedClosures.invokeFast4(f,t,u,v,w) - static member InvokeFast(f:FastFunc<_,_>,(t:'T),(u:'Res),v,w,x) = OptimizedClosures.invokeFast5(f,t,u,v,w,x) - - [] - [] - type FuncConvert = - [] - static member ToFastFunc( f : Action<_>) = (fun t -> f.Invoke(t)) - [] - static member ToFastFunc( f : Converter<_,_>) = (fun t -> f.Invoke(t)) - [] - static member FuncFromTupled (f:'T -> 'Res) = (fun a -> f a) - [] - static member FuncFromTupled (f:'T1 * 'T2 -> 'Res) = (fun a b -> f (a, b)) - [] - static member FuncFromTupled (f:'T1 * 'T2 * 'T3 -> 'Res) = (fun a b c -> f (a, b, c)) - [] - static member FuncFromTupled (f:'T1 * 'T2 * 'T3 * 'T4 -> 'Res) = (fun a b c d -> f (a, b, c, d)) - [] - static member FuncFromTupled (f:'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'Res) = (fun a b c d e-> f (a, b, c, d, e)) - - - - //------------------------------------------------------------------------- - // Refs - //------------------------------------------------------------------------- - - [] - do() - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Ref<'T> = - { -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - mutable contents: 'T } - member x.Value - with get() = x.contents - and set v = x.contents <- v - - and 'T ref = Ref<'T> - - //------------------------------------------------------------------------- - // Options - //------------------------------------------------------------------------- - - [] -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - [] - [] - type Option<'T> = - | None : 'T option - | Some : value:'T -> 'T option - - [] - member x.Value = match x with Some x -> x | None -> raise (new System.InvalidOperationException("Option.Value")) - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.IsNone = match x with None -> true | _ -> false - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.IsSome = match x with Some _ -> true | _ -> false - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - static member None : 'T option = None - - static member Some(x) : 'T option = Some(x) - - override x.ToString() = "Some("^x.Value.ToString()^")" - - and 'T option = 'T Option - - - -//============================================================================ -//============================================================================ -namespace Microsoft.FSharp.Collections - - //------------------------------------------------------------------------- - // Lists - //------------------------------------------------------------------------- - - open System.Collections.Generic - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions - open Microsoft.FSharp.Core.BasicInlinedOperations - - [] -#if FX_NO_DEBUG_PROXIES -#else - [>)>] -#endif -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - [] - type FSharpList<'T> = - | ([]) : 'T list - | (::) : _Head: 'T * _Tail: 'T list -> 'T list - interface System.Collections.Generic.IEnumerable<'T> - interface System.Collections.IEnumerable - - and 'T list = FSharpList<'T> - and List<'T> = FSharpList<'T> - - //------------------------------------------------------------------------- - // List (debug view) - //------------------------------------------------------------------------- - - and - ListDebugView<'T>(l:list<'T>) = - - let rec count l n = match l with [] -> n | _::t -> if n > 50 then n else count t (n+1) - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.Items = - let n = count l 0 - let items = zero_create n - let rec copy (items: 'T[]) l i = - match l with - | [] -> () - | h::t -> if i < n then (SetArray items (i,h); copy items t (i+1)) - copy items l 0; - items - - type ResizeArray<'T> = System.Collections.Generic.List<'T> - - //------------------------------------------------------------------------- - // List (augmentation) - //------------------------------------------------------------------------- - - module PrivateListHelpers = - - let notStarted() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext.")) - let alreadyFinished() = raise (new System.InvalidOperationException("Enumeration already finished.")) - let nonempty x = match x with [] -> false | _ -> true - - type ListEnumerator<'T> (s: 'T list) = - let mutable curr = s - let mutable started = false - - member x.GetCurrent() = - if started then - match curr with - | [] -> alreadyFinished() - | h::t -> h - else - notStarted() - - interface IEnumerator<'T> with - member x.Current = x.GetCurrent() - - interface System.Collections.IEnumerator with - member x.MoveNext() = - if started then - match curr with - | h :: t -> (curr <- t; nonempty curr) - | _ -> false - else - (started <- true; nonempty curr) - member x.Current = box (x.GetCurrent()) - member x.Reset() = started <- false; curr <- s - - interface System.IDisposable with - member x.Dispose() = () - - let mkListEnumerator s = (new ListEnumerator<'T>(s) :> IEnumerator<'T>) - - let rec lengthAcc acc l = match l with [] -> acc | h::t -> lengthAcc (acc+1) t - - let rec nth l n = - match l with - | [] -> raise (new System.ArgumentException("the index was outside the range of elements in the list","n")) - | h::t -> - if n < 0 then raise (new System.ArgumentException("the index was negative","n")) - elif n = 0 then h - else nth t (n - 1) - - type FSharpList<'T> with -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member l.Length = PrivateListHelpers.lengthAcc 0 l - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member l.DebugDisplay = - let n = l.Length - let txt = - if n > 1000 then "Length > 1000" - else System.String.Concat( [| "Length = "; n.ToString() |]) - new System.Text.StringBuilder(txt) - - - - member l.Head = match l with a :: b -> a | [] -> raise (System.InvalidOperationException("the list is empty")) - member l.Tail = match l with a :: b -> b | [] -> raise (System.InvalidOperationException("the list is empty")) - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member l.IsCons = match l with [] -> false | _ -> true - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member l.IsEmpty = match l with [] -> true | _ -> false - member l.Item with get(index) = PrivateListHelpers.nth l index - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - static member Empty : 'T list = [] - - static member Cons(head,tail) : 'T list = head::tail - - interface IEnumerable<'T> with - member l.GetEnumerator() = PrivateListHelpers.mkListEnumerator l - - interface System.Collections.IEnumerable with - member l.GetEnumerator() = (PrivateListHelpers.mkListEnumerator l :> System.Collections.IEnumerator) - - type seq<'T> = IEnumerable<'T> - - -//------------------------------------------------------------------------- -// Operators -//------------------------------------------------------------------------- - - -namespace Microsoft.FSharp.Core - - open System - open System.Diagnostics - open System.Collections.Generic - open System.Globalization - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions - open Microsoft.FSharp.Core.BasicInlinedOperations - open Microsoft.FSharp.Collections - - - - [] - module Operators = - - [] - let seq x = x (* temp addition for comprehension/workflow transitions *) - - [] - let inline unbox (x:obj) = UnboxGeneric(x) - - [] - let inline box (x:'T) = (# "box !0" type ('T) x : obj #) - - [] - let raise (e: exn) = (# "throw" e : 'T #) - - - [] - let inline not (b:bool) = (# "ceq" b false : bool #) - - - [] - let inline objEq (xobj:obj) (yobj:obj) = (# "ceq" xobj yobj : bool #) - - - let inline (<) x y = GenericLessThan x y - let inline (>) x y = GenericGreaterThan x y - let inline (>=) x y = GenericGreaterOrEqual x y - let inline (<=) x y = GenericLessOrEqual x y - let inline (=) x y = GenericEquality x y - let inline (<>) x y = not (GenericEquality x y) - - [] - let inline compare (x:'T) (y:'T) = GenericComparison x y - - [] - let inline max x y = GenericMaximum x y - - [] - let inline min x y = GenericMinimum x y - - -(* - [] - let ``assert`` (b) = System.Diagnostics.Debug.Assert(b) -*) - - [] - let failwith s = raise (Failure(s)) - - let InvalidArgument message = (new ArgumentException(message:string) :> exn) - - type InvalidArgumentException = ArgumentException - - let (|InvalidArgument|_|) (exn:exn) = match exn with :? ArgumentException as e -> Some(e.Message) | _ -> None - - - [] - let invalid_arg message = raise (InvalidArgument(message)) - - [] - let invalidArg (arg:string) (msg:string) = raise (new System.ArgumentException(msg,arg)) - - [] - let nullArg (arg:string) = raise (new System.ArgumentNullException(arg)) - - [] - let invalidOp s = raise (System.InvalidOperationException(s)) - - [] - let invalid_op s = raise (System.InvalidOperationException(s)) - - [] - let not_found() = raise (new KeyNotFoundException("The item, key or index was not found in the collection")) - - [] - [] - let inline rethrow() = unbox<_>(# "rethrow ldnull" : System.Object #) - - - [] - let fst (a,b) = a - - [] - let snd (a,b) = b - - [] - let ignore x = () - - [] - let ref x = { contents = x } - - let (:=) x y = x.contents <- y - - let (!) x = x.contents - - let inline (|>) x f = f x - - let inline (||>) (x1,x2) f = f x1 x2 - - let inline (|||>) (x1,x2,x3) f = f x1 x2 x3 - - let inline (<|) f x = f x - - let inline (<||) f (x1,x2) = f x1 x2 - - let inline (<|||) f (x1,x2,x3) = f x1 x2 x3 - - let inline (>>) f g x = g(f x) - - let inline (<<) f g x = f(g x) - - let (^) (x:string) (y:string) = System.String.Concat(x,y) - - - [] - let defaultArg x y = match x with None -> y | Some v -> v - - - let inline (~-) (x: ^T) : ^T = - (^T : (static member (~-) : ^T -> ^T) (x)) - when ^T : int32 = (# "neg" x : int32 #) - when ^T : float = (# "neg" x : float #) - when ^T : float32 = (# "neg" x : float32 #) - when ^T : int64 = (# "neg" x : int64 #) - when ^T : int16 = (# "neg" x : int16 #) - when ^T : nativeint = (# "neg" x : nativeint #) - when ^T : sbyte = (# "neg" x : sbyte #) - when ^T : decimal = (# "" (System.Decimal.op_UnaryNegation((# "" x : decimal #))) : ^T #) - - - let inline (+) (x: ^T) (y: ^U) : ^V = - AdditionDynamic<(^T),(^U),(^V)> x y - when ^T : int32 and ^U : int32 = (# "add" x y : int32 #) - when ^T : float and ^U : float = (# "add" x y : float #) - when ^T : float32 and ^U : float32 = (# "add" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "add" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "add" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "add" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "add" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "add" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.i2" (# "add" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.u2" (# "add" x y : uint32 #) : uint16 #) - when ^T : char and ^U : char = (# "conv.u2" (# "add" x y : uint32 #) : char #) - when ^T : sbyte and ^U : sbyte = (# "conv.i1" (# "add" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.u1" (# "add" x y : uint32 #) : byte #) - when ^T : string and ^U : string = (# "" (System.String.Concat((# "" x : string #),(# "" y : string #))) : ^T #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Addition((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - // That is, not in the generic implementation of '+' - when ^T : ^T = ((^T or ^U): (static member (+) : ^T * ^U -> ^V) (x,y)) - - let inline (-) (x: ^T) (y: ^U) : ^V = - ((^T or ^U): (static member (-) : ^T * ^U -> ^V) (x,y)) - when ^T : int32 and ^U : int32 = (# "sub" x y : int32 #) - when ^T : float and ^U : float = (# "sub" x y : float #) - when ^T : float32 and ^U : float32 = (# "sub" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "sub" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "sub" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "sub" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "sub" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "sub" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.i2" (# "sub" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.u2" (# "sub" x y : uint32 #) : uint16 #) - when ^T : sbyte and ^U : sbyte = (# "conv.i1" (# "sub" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.u1" (# "sub" x y : uint32 #) : byte #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Subtraction((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - - - let inline ( * ) (x: ^T) (y: ^U) : ^V = - MultiplyDynamic<(^T),(^U),(^V)> x y - when ^T : int32 and ^U : int32 = (# "mul" x y : int32 #) - when ^T : float and ^U : float = (# "mul" x y : float #) - when ^T : float32 and ^U : float32 = (# "mul" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "mul" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "mul" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "mul" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "mul" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "mul" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.i2" (# "mul" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.u2" (# "mul" x y : uint32 #) : uint16 #) - when ^T : sbyte and ^U : sbyte = (# "conv.i1" (# "mul" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.u1" (# "mul" x y : uint32 #) : byte #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Multiply((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - // That is, not in the generic implementation of '*' - when ^T : ^T = ((^T or ^U): (static member (*) : ^T * ^U -> ^V) (x,y)) - - let inline ( / ) (x: ^T) (y: ^U) : ^V = - ((^T or ^U): (static member (/) : ^T * ^U -> ^V) (x,y)) - when ^T : int32 and ^U : int32 = (# "div" x y : int32 #) - when ^T : float and ^U : float = (# "div" x y : float #) - when ^T : float32 and ^U : float32 = (# "div" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "div" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "div.un" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "div.un" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "div" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "div.un" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.i2" (# "div" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.u2" (# "div.un" x y : uint32 #) : uint16 #) - when ^T : sbyte and ^U : sbyte = (# "conv.i1" (# "div" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.u1" (# "div.un" x y : uint32 #) : byte #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Division((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - - let inline ( % ) (x: ^T) (y: ^U) : ^V = - ((^T or ^U): (static member (%) : ^T * ^U -> ^V) (x,y)) - when ^T : int32 and ^U : int32 = (# "rem" x y : int32 #) - when ^T : float and ^U : float = (# "rem" x y : float #) - when ^T : float32 and ^U : float32 = (# "rem" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "rem" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "rem.un" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "rem.un" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "rem" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "rem.un" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.i2" (# "rem" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.u2" (# "rem.un" x y : uint32 #) : uint16 #) - when ^T : sbyte and ^U : sbyte = (# "conv.i1" (# "rem" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.u1" (# "rem.un" x y : uint32 #) : byte #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Modulus((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - - let inline (~+) (x: ^T) : ^T = - (^T: (static member (~+) : ^T -> ^T) (x)) - when ^T : int32 = x - when ^T : float = x - when ^T : float32 = x - when ^T : int64 = x - when ^T : uint64 = x - when ^T : uint32 = x - when ^T : int16 = x - when ^T : uint16 = x - when ^T : nativeint = x - when ^T : unativeint = x - when ^T : sbyte = x - when ^T : byte = x - when ^T : decimal = x - - let inline mask (n:int) (m:int) = (# "and" n m : int #) - let inline (<<<) (x: ^T) (n:int) : ^T = - (^T: (static member (<<<) : ^T * int -> ^T) (x,n)) - when ^T : int32 = (# "shl" x (mask n 31) : int #) - when ^T : uint32 = (# "shl" x (mask n 31) : uint32 #) - when ^T : int64 = (# "shl" x (mask n 63) : int64 #) - when ^T : uint64 = (# "shl" x (mask n 63) : uint64 #) - when ^T : nativeint = (# "shl" x n : nativeint #) - when ^T : unativeint = (# "shl" x n : unativeint #) - when ^T : int16 = (# "conv.i2" (# "shl" x (mask n 15) : int32 #) : int16 #) - when ^T : uint16 = (# "conv.u2" (# "shl" x (mask n 15) : uint32 #) : uint16 #) - when ^T : sbyte = (# "conv.i1" (# "shl" x (mask n 7 ) : int32 #) : sbyte #) - when ^T : byte = (# "conv.u1" (# "shl" x (mask n 7 ) : uint32 #) : byte #) - - let inline (>>>) (x: ^T) (n:int) : ^T = - (^T: (static member (>>>) : ^T * int -> ^T) (x,n)) - when ^T : int32 = (# "shr" x (mask n 31) : int32 #) - when ^T : uint32 = (# "shr.un" x (mask n 31) : uint32 #) - when ^T : int64 = (# "shr" x (mask n 63) : int64 #) - when ^T : uint64 = (# "shr.un" x (mask n 63) : uint64 #) - when ^T : nativeint = (# "shr" x n : nativeint #) - when ^T : unativeint = (# "shr.un" x n : unativeint #) - when ^T : int16 = (# "conv.i2" (# "shr" x (mask n 15) : int32 #) : int16 #) - when ^T : uint16 = (# "conv.u2" (# "shr.un" x (mask n 15) : uint32 #) : uint16 #) - when ^T : sbyte = (# "conv.i1" (# "shr" x (mask n 7 ) : int32 #) : sbyte #) - when ^T : byte = (# "conv.u1" (# "shr.un" x (mask n 7 ) : uint32 #) : byte #) - - let inline (&&&) (x: ^T) (y: ^T) : ^T = - (^T: (static member (&&&) : ^T * ^T -> ^T) (x,y)) - when ^T : int32 = (# "and" x y : int32 #) - when ^T : int64 = (# "and" x y : int64 #) - when ^T : uint64 = (# "and" x y : uint64 #) - when ^T : uint32 = (# "and" x y : uint32 #) - when ^T : int16 = (# "and" x y : int16 #) - when ^T : uint16 = (# "and" x y : uint16 #) - when ^T : nativeint = (# "and" x y : nativeint #) - when ^T : unativeint = (# "and" x y : unativeint #) - when ^T : sbyte = (# "and" x y : sbyte #) - when ^T : byte = (# "and" x y : byte #) - - let inline (|||) (x: ^T) (y: ^T) : ^T = - (^T: (static member (|||) : ^T * ^T -> ^T) (x,y)) - when ^T : int32 = (# "or" x y : int32 #) - when ^T : int64 = (# "or" x y : int64 #) - when ^T : uint64 = (# "or" x y : uint64 #) - when ^T : uint32 = (# "or" x y : uint32 #) - when ^T : int16 = (# "or" x y : int16 #) - when ^T : uint16 = (# "or" x y : uint16 #) - when ^T : nativeint = (# "or" x y : nativeint #) - when ^T : unativeint = (# "or" x y : unativeint #) - when ^T : sbyte = (# "or" x y : sbyte #) - when ^T : byte = (# "or" x y : byte #) - - let inline (^^^) (x: ^T) (y: ^T) : ^T = - (^T: (static member (^^^) : ^T * ^T -> ^T) (x,y)) - when ^T : int32 = (# "xor" x y : int32 #) - when ^T : int64 = (# "xor" x y : int64 #) - when ^T : uint64 = (# "xor" x y : uint64 #) - when ^T : uint32 = (# "xor" x y : uint32 #) - when ^T : int16 = (# "xor" x y : int16 #) - when ^T : uint16 = (# "xor" x y : uint16 #) - when ^T : nativeint = (# "xor" x y : nativeint #) - when ^T : unativeint = (# "xor" x y : unativeint #) - when ^T : sbyte = (# "xor" x y : sbyte #) - when ^T : byte = (# "xor" x y : byte #) - - let inline (~~~) (x: ^T) : ^T = - (^T: (static member (~~~) : ^T -> ^T) (x)) - when ^T : int32 = (# "not" x : int32 #) - when ^T : int64 = (# "not" x : int64 #) - when ^T : uint64 = (# "not" x : uint64 #) - when ^T : uint32 = (# "not" x : uint32 #) - when ^T : nativeint = (# "not" x : nativeint #) - when ^T : unativeint = (# "not" x : unativeint #) - when ^T : int16 = (# "conv.i2" (# "not" x : int32 #) : int16 #) - when ^T : uint16 = (# "conv.u2" (# "not" x : uint32 #) : uint16 #) - when ^T : sbyte = (# "conv.i1" (# "not" x : int32 #) : sbyte #) - when ^T : byte = (# "conv.u1" (# "not" x : uint32 #) : byte #) - - let inline castToString (x:'T) = (# "" x : string #) // internal - - let nonempty x = match x with [] -> false | _ -> true - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let setFreshConsTail cons t = - cons.(::).1 <- t - - // Return the last cons it the chain - let rec appendToFreshConsTail cons xs = - match xs with - | [] -> cons - | h::t -> - let cons2 = [h] - setFreshConsTail cons cons2 - appendToFreshConsTail cons2 t - - // let rec (@) x y = match x with [] -> y | (h::t) -> h :: (t @ y) - let (@) l1 l2 = - match l1 with - | [] -> l2 - | (h::t) -> - match l2 with - | [] -> l1 - | _ -> - let res = [h] - let cons = appendToFreshConsTail res t - setFreshConsTail cons l2; - res - - - [] - let incr x = x.contents <- x.contents + 1 - - [] - let decr x = x.contents <- x.contents - 1 -#if FX_NO_EXIT -#else - [] - let exit (n:int) = System.Environment.Exit(n); failwith "System.Environment.Exit did not exit!" -#endif - let inline byte_of_string (s:string) = (# "conv.ovf.u1" (ParseUInt32 s) : byte #) - let inline sbyte_of_string (s:string) = (# "conv.ovf.i1" (ParseInt32 s) : sbyte #) - let inline int16_of_string (s:string) = (# "conv.ovf.i2" (ParseInt32 s) : int16 #) - let inline uint16_of_string (s:string) = (# "conv.ovf.u2" (ParseUInt32 s) : uint16 #) - let inline nativeint_of_string (s:string) = (# "conv.ovf.i" (ParseInt64 s) : nativeint #) - let inline unativeint_of_string (s:string) = (# "conv.ovf.u" (ParseInt64 s) : unativeint #) - - let inline float_of_string (s:string) = Double.Parse(s,NumberStyles.Float, CultureInfo.InvariantCulture) - - let inline float32_of_string (s:string) = Single.Parse(s,NumberStyles.Float, CultureInfo.InvariantCulture) - - - [] - let inline byte (x: ^T) = - (^T : (static member ToByte: ^T -> byte) (x)) - when ^T : string = byte_of_string (castToString x) - when ^T : float = (# "conv.u1" x : byte #) - when ^T : float32 = (# "conv.u1" x : byte #) - when ^T : int64 = (# "conv.u1" x : byte #) - when ^T : int32 = (# "conv.u1" x : byte #) - when ^T : int16 = (# "conv.u1" x : byte #) - when ^T : nativeint = (# "conv.u1" x : byte #) - when ^T : sbyte = (# "conv.u1" x : byte #) - when ^T : uint64 = (# "conv.u1" x : byte #) - when ^T : uint32 = (# "conv.u1" x : byte #) - when ^T : uint16 = (# "conv.u1" x : byte #) - when ^T : char = (# "conv.u1" x : byte #) - when ^T : unativeint = (# "conv.u1" x : byte #) - when ^T : byte = (# "conv.u1" x : byte #) - - - [] - let inline sbyte (x: ^T) = - (^T : (static member ToSByte: ^T -> sbyte) (x)) - when ^T : string = sbyte_of_string (castToString x) - when ^T : float = (# "conv.i1" x : sbyte #) - when ^T : float32 = (# "conv.i1" x : sbyte #) - when ^T : int64 = (# "conv.i1" x : sbyte #) - when ^T : int32 = (# "conv.i1" x : sbyte #) - when ^T : int16 = (# "conv.i1" x : sbyte #) - when ^T : nativeint = (# "conv.i1" x : sbyte #) - when ^T : sbyte = (# "conv.i1" x : sbyte #) - when ^T : uint64 = (# "conv.i1" x : sbyte #) - when ^T : uint32 = (# "conv.i1" x : sbyte #) - when ^T : uint16 = (# "conv.i1" x : sbyte #) - when ^T : char = (# "conv.i1" x : sbyte #) - when ^T : unativeint = (# "conv.i1" x : sbyte #) - when ^T : byte = (# "conv.i1" x : sbyte #) - - - [] - let inline uint16 (x: ^T) = - (^T : (static member ToUInt16: ^T -> uint16) (x)) - when ^T : string = uint16_of_string (castToString x) - when ^T : float = (# "conv.u2" x : uint16 #) - when ^T : float32 = (# "conv.u2" x : uint16 #) - when ^T : int64 = (# "conv.u2" x : uint16 #) - when ^T : int32 = (# "conv.u2" x : uint16 #) - when ^T : int16 = (# "conv.u2" x : uint16 #) - when ^T : nativeint = (# "conv.u2" x : uint16 #) - when ^T : sbyte = (# "conv.u2" x : uint16 #) - when ^T : uint64 = (# "conv.u2" x : uint16 #) - when ^T : uint32 = (# "conv.u2" x : uint16 #) - when ^T : uint16 = (# "conv.u2" x : uint16 #) - when ^T : char = (# "conv.u2" x : uint16 #) - when ^T : unativeint = (# "conv.u2" x : uint16 #) - when ^T : byte = (# "conv.u2" x : uint16 #) - - - [] - let inline int16 (x: ^T) = - (^T : (static member ToInt16: ^T -> int16) (x)) - when ^T : string = int16_of_string (castToString x) - when ^T : float = (# "conv.i2" x : int16 #) - when ^T : float32 = (# "conv.i2" x : int16 #) - when ^T : int64 = (# "conv.i2" x : int16 #) - when ^T : int32 = (# "conv.i2" x : int16 #) - when ^T : int16 = (# "conv.i2" x : int16 #) - when ^T : nativeint = (# "conv.i2" x : int16 #) - when ^T : sbyte = (# "conv.i2" x : int16 #) - when ^T : uint64 = (# "conv.i2" x : int16 #) - when ^T : uint32 = (# "conv.i2" x : int16 #) - when ^T : uint16 = (# "conv.i2" x : int16 #) - when ^T : char = (# "conv.i2" x : int16 #) - when ^T : unativeint = (# "conv.i2" x : int16 #) - when ^T : byte = (# "conv.i2" x : int16 #) - - - [] - let inline uint32 (x: ^T) = - (^T : (static member ToUInt32: ^T -> uint32) (x)) - when ^T : string = ParseUInt32 (castToString x) - when ^T : float = (# "conv.u4" x : uint32 #) - when ^T : float32 = (# "conv.u4" x : uint32 #) - - when ^T : int64 = (# "conv.u4" x : uint32 #) - when ^T : nativeint = (# "conv.u4" x : uint32 #) - - // For integers shorter that 32 bits, we must first - // sign-widen the signed integer to 32 bits, and then - // "convert" from signed int32 to unsigned int32 - // This is a no-op on IL stack (ECMA 335 Part III 1.5 Tables 8 & 9) - when ^T : int32 = (# "" x : uint32 #) - when ^T : int16 = (# "" x : uint32 #) - when ^T : sbyte = (# "" x : uint32 #) - - - when ^T : uint64 = (# "conv.u4" x : uint32 #) - when ^T : uint32 = (# "conv.u4" x : uint32 #) - when ^T : uint16 = (# "conv.u4" x : uint32 #) - when ^T : char = (# "conv.u4" x : uint32 #) - when ^T : unativeint = (# "conv.u4" x : uint32 #) - when ^T : byte = (# "conv.u4" x : uint32 #) - - - [] - let inline int32 (x: ^T) = - (^T : (static member ToInt32: ^T -> int32) (x)) - when ^T : string = ParseInt32 (castToString x) - when ^T : float = (# "conv.i4" x : int32 #) - when ^T : float32 = (# "conv.i4" x : int32 #) - when ^T : int64 = (# "conv.i4" x : int32 #) - when ^T : nativeint = (# "conv.i4" x : int32 #) - - // For integers shorter that 32 bits, we sign-widen the signed integer to 32 bits - // This is a no-op on IL stack (ECMA 335 Part III 1.5 Tables 8 & 9) - when ^T : int32 = (# "" x : int32 #) - when ^T : int16 = (# "" x : int32 #) - when ^T : sbyte = (# "" x : int32 #) - - when ^T : uint64 = (# "conv.i4" x : int32 #) - when ^T : uint32 = (# "" x : int32 #) // Signed<->Unsigned conversion is a no-op on IL stack - when ^T : uint16 = (# "conv.i4" x : int32 #) - when ^T : char = (# "conv.i4" x : int32 #) - when ^T : unativeint = (# "conv.i4" x : int32 #) - when ^T : byte = (# "conv.i4" x : int32 #) - - - [] - - [] - let inline int x = int32 x - - - [] - let inline enum< ^T when ^T : enum > (x:int32) : ^T = EnumOfValue x - - let ( |KeyValue| ) (kvp : KeyValuePair<'T,'U>) = (kvp.Key, kvp.Value) - - - [] - let infinity = System.Double.PositiveInfinity - - [] - let nan = System.Double.NaN - - [] - let infinityf = System.Single.PositiveInfinity - - [] - let nanf = System.Single.NaN - - //let max_float = System.Double.MaxValue - //let min_float = 0x0010000000000000LF - //let epsilon_float = 0x3CB0000000000000LF // Int64.float_of_bits 4372995238176751616L - - - [] - let inline uint64 (x: ^T) = - (^T : (static member ToUInt64: ^T -> uint64) (x)) - when ^T : string = ParseUInt64 (castToString x) - when ^T : float = (# "conv.u8" x : uint64 #) - when ^T : float32 = (# "conv.u8" x : uint64 #) - - // we must first sign-widen the signed integer to 64 bits, and then - // "convert" from signed int64 to unsigned int64 - // conv.i8 sign-widens the input, and on IL stack, - // conversion from signed to unsigned is a no-op (ECMA 335 Part III 1.5 Table 8) - when ^T : int64 = (# "" x : uint64 #) - when ^T : int32 = (# "conv.i8" x : uint64 #) - when ^T : int16 = (# "conv.i8" x : uint64 #) - when ^T : nativeint = (# "conv.i8" x : uint64 #) - when ^T : sbyte = (# "conv.i8" x : uint64 #) - - - when ^T : uint64 = (# "" x : uint64 #) - when ^T : uint32 = (# "conv.u8" x : uint64 #) - when ^T : uint16 = (# "conv.u8" x : uint64 #) - when ^T : char = (# "conv.u8" x : uint64 #) - when ^T : unativeint = (# "conv.u8" x : uint64 #) - when ^T : byte = (# "conv.u8" x : uint64 #) - - - [] - let inline int64 (x: ^T) = - (^T : (static member ToInt64: ^T -> int64) (x)) - when ^T : string = ParseInt64 (castToString x) - when ^T : float = (# "conv.i8" x : int64 #) - when ^T : float32 = (# "conv.i8" x : int64 #) - when ^T : int64 = (# "conv.i8" x : int64 #) - when ^T : int32 = (# "conv.i8" x : int64 #) - when ^T : int16 = (# "conv.i8" x : int64 #) - when ^T : nativeint = (# "conv.i8" x : int64 #) - when ^T : sbyte = (# "conv.i8" x : int64 #) - - // When converting unsigned integer, we should zero-widen them, NOT sign-widen - // No-op for uint64, conv.u8 for uint32, for smaller types conv.u8 and conv.i8 are identical. - // For nativeint, conv.u8 works correctly both in 32 bit and 64 bit case. - when ^T : uint64 = (# "" x : int64 #) - when ^T : uint32 = (# "conv.u8" x : int64 #) - when ^T : uint16 = (# "conv.u8" x : int64 #) - when ^T : char = (# "conv.u8" x : int64 #) - when ^T : unativeint = (# "conv.u8" x : int64 #) - when ^T : byte = (# "conv.u8" x : int64 #) - - - [] - [] - let inline float32 (x: ^T) = - (^T : (static member ToSingle : ^T -> float32) (x)) - when ^T : string = float32_of_string (castToString x) - when ^T : float = (# "conv.r4" x : float32 #) - when ^T : float32 = (# "" x : float32 #) - when ^T : int64 = (# "conv.r4" x : float32 #) - when ^T : int32 = (# "conv.r4" x : float32 #) - when ^T : int16 = (# "conv.r4" x : float32 #) - when ^T : nativeint = (# "conv.r4" x : float32 #) - when ^T : sbyte = (# "conv.r4" x : float32 #) - when ^T : uint64 = (# "conv.r.un conv.r4" x : float32 #) - when ^T : uint32 = (# "conv.r.un conv.r4" x : float32 #) - when ^T : uint16 = (# "conv.r.un conv.r4" x : float32 #) - when ^T : char = (# "conv.r.un conv.r4" x : float32 #) - when ^T : unativeint = (# "conv.r.un conv.r4" x : float32 #) - when ^T : byte = (# "conv.r.un conv.r4" x : float32 #) - - - [] - [] - let inline float (x: ^T) = - (^T : (static member ToDouble : ^T -> float) (x)) - when ^T : string = float_of_string (castToString x) - when ^T : float = (# "" x : float #) - when ^T : float32 = (# "conv.r8" x : float #) - when ^T : int64 = (# "conv.r8" x : float #) - when ^T : int32 = (# "conv.r8" x : float #) - when ^T : int16 = (# "conv.r8" x : float #) - when ^T : nativeint = (# "conv.r8" x : float #) - when ^T : sbyte = (# "conv.r8" x : float #) - when ^T : uint64 = (# "conv.r.un conv.r8" x : float #) - when ^T : uint32 = (# "conv.r.un conv.r8" x : float #) - when ^T : uint16 = (# "conv.r.un conv.r8" x : float #) - when ^T : char = (# "conv.r.un conv.r8" x : float #) - when ^T : unativeint = (# "conv.r.un conv.r8" x : float #) - when ^T : byte = (# "conv.r.un conv.r8" x : float #) - when ^T : decimal = (System.Convert.ToDouble((# "" x : decimal #))) - - - [] - let inline decimal (x: ^T) = - (^T : (static member ToDecimal : ^T -> decimal) (x)) - when ^T : string = (System.Decimal.Parse(castToString x,NumberStyles.Float,CultureInfo.InvariantCulture)) - when ^T : float = (System.Convert.ToDecimal((# "" x : float #))) - when ^T : float32 = (System.Convert.ToDecimal((# "" x : float32 #))) - when ^T : int64 = (System.Convert.ToDecimal((# "" x : int64 #))) - when ^T : int32 = (System.Convert.ToDecimal((# "" x : int32 #))) - when ^T : int16 = (System.Convert.ToDecimal((# "" x : int16 #))) - when ^T : nativeint = (System.Convert.ToDecimal(int64 (# "" x : nativeint #))) - when ^T : sbyte = (System.Convert.ToDecimal((# "" x : sbyte #))) - when ^T : uint64 = (System.Convert.ToDecimal((# "" x : uint64 #))) - when ^T : uint32 = (System.Convert.ToDecimal((# "" x : uint32 #))) - when ^T : uint16 = (System.Convert.ToDecimal((# "" x : uint16 #))) - when ^T : unativeint = (System.Convert.ToDecimal(uint64 (# "" x : unativeint #))) - when ^T : byte = (System.Convert.ToDecimal((# "" x : byte #))) - when ^T : decimal = (# "" x : decimal #) - - // Recall type names. - // Framework names: sbyte, byte, int16, uint16, int32, uint32, int64, uint64, single, double. - // C# names: sbyte, byte, short, ushort, int, uint, long, ulong, single, double. - // F# names: sbyte, byte, int16, uint16, int, uint32, int64, uint64, float32, float. - // Systematic names: int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64. - - // The names float/float32 are being migrated to double/single - - [] - let inline single x = float32 x - - [] - let inline double x = float x - - - [] - let inline unativeint (x: ^T) = - (^T : (static member ToUIntPtr: ^T -> unativeint) (x)) - when ^T : string = unativeint_of_string (castToString x) - when ^T : float = (# "conv.u" x : unativeint #) - when ^T : float32 = (# "conv.u" x : unativeint #) - - // Narrower signed types we sign-extend. - // Same length signed types we leave as such (so -1 gets reinterpreted as unsigned MaxValue). - // Wider signed types we truncate. - // conv.i does just that for both 32 and 64 bit case of nativeint, and conversion from nativeint is no-op. - when ^T : int64 = (# "conv.i" x : unativeint #) - when ^T : int32 = (# "conv.i" x : unativeint #) - when ^T : int16 = (# "conv.i" x : unativeint #) - when ^T : nativeint = (# "" x : unativeint #) - when ^T : sbyte = (# "conv.i" x : unativeint #) - - when ^T : uint64 = (# "conv.u" x : unativeint #) - when ^T : uint32 = (# "conv.u" x : unativeint #) - when ^T : uint16 = (# "conv.u" x : unativeint #) - when ^T : char = (# "conv.u" x : unativeint #) - when ^T : unativeint = (# "" x : unativeint #) - when ^T : byte = (# "conv.u" x : unativeint #) - - - [] - let inline nativeint (x: ^T) = - (^T : (static member ToIntPtr: ^T -> nativeint) (x)) - when ^T : string = nativeint_of_string (castToString x) - when ^T : float = (# "conv.i" x : nativeint #) - when ^T : float32 = (# "conv.i" x : nativeint #) - - when ^T : int64 = (# "conv.i" x : nativeint #) - when ^T : int32 = (# "conv.i" x : nativeint #) - when ^T : int16 = (# "conv.i" x : nativeint #) - when ^T : nativeint = (# "conv.i" x : nativeint #) - when ^T : sbyte = (# "conv.i" x : nativeint #) - - // Narrower unsigned types we zero-extend. - // Same length unsigned types we leave as such (so unsigned MaxValue (all-bits-set) gets reinterpreted as -1). - // Wider unsigned types we truncate. - // conv.u does just that for both 32- and 64-bit-wide nativeint, and conversion from unativeint is no-op. - when ^T : uint64 = (# "conv.u" x : nativeint #) - when ^T : uint32 = (# "conv.u" x : nativeint #) - when ^T : uint16 = (# "conv.u" x : nativeint #) - when ^T : char = (# "conv.u" x : nativeint #) - when ^T : unativeint = (# "" x : nativeint #) - when ^T : byte = (# "conv.i" x : nativeint #) - - - [] - let inline string (x: ^T) = - match box x with - | :? System.IFormattable as f -> f.ToString("g",CultureInfo.InvariantCulture) - | obj -> obj.ToString() - when ^T : float = (# "" x : float #).ToString("g",CultureInfo.InvariantCulture) - when ^T : float32 = (# "" x : float32 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : int64 = (# "" x : int64 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : int32 = (# "" x : int32 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : int16 = (# "" x : int16 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : nativeint = (# "" x : nativeint #).ToString() - when ^T : sbyte = (# "" x : sbyte #).ToString("g",CultureInfo.InvariantCulture) - when ^T : uint64 = (# "" x : uint64 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : uint32 = (# "" x : uint32 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : int16 = (# "" x : int16 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : unativeint = (# "" x : unativeint #).ToString() - when ^T : byte = (# "" x : byte #).ToString("g",CultureInfo.InvariantCulture) - - - [] - let inline char (x: ^T) = - (^T : (static member ToChar: ^T -> char) (x)) -#if FX_NO_CHAR_PARSE - when ^T : string = (castToString x).[0] -#else - when ^T : string = (System.Char.Parse(castToString x)) -#endif - when ^T : float = (# "conv.u2" x : char #) - when ^T : float32 = (# "conv.u2" x : char #) - when ^T : int64 = (# "conv.u2" x : char #) - when ^T : int32 = (# "conv.u2" x : char #) - when ^T : int16 = (# "conv.u2" x : char #) - when ^T : nativeint = (# "conv.u2" x : char #) - when ^T : sbyte = (# "conv.u2" x : char #) - when ^T : uint64 = (# "conv.u2" x : char #) - when ^T : uint32 = (# "conv.u2" x : char #) - when ^T : uint16 = (# "conv.u2" x : char #) - when ^T : char = (# "conv.u2" x : char #) - when ^T : unativeint = (# "conv.u2" x : char #) - when ^T : byte = (# "conv.u2" x : char #) - - - module Attributes = - open System.Runtime.CompilerServices - -#if FX_NO_DEFAULT_DEPENDENCY_TYPE -#else - [] - [] -#endif - [] - [] - -#if BE_SECURITY_TRANSPARENT - [] // assembly is fully transparent - [] // v4 transparency; soon to be the default, but not yet -#else -#if FX_NO_SECURITY_PERMISSIONS -#else -#if FX_SIMPLE_SECURITY_PERMISSIONS - [] -#else - [] - [] -#endif -#endif -#endif - do () - - - [] - let inline lock (lockobj : 'T when 'T : not struct) f = - System.Threading.Monitor.Enter(lockobj); - try f() - finally - System.Threading.Monitor.Exit(lockobj) - - - [] - let using (ie : 'T when 'T :> System.IDisposable) f = - try f(ie) - finally match (box ie) with null -> () | _ -> ie.Dispose() - - - [] - let inline typeof<'T> = BasicInlinedOperations.typeof<'T> - - - [] - let inline typedefof<'T> = BasicInlinedOperations.typedefof<'T> - - - [] - let inline sizeof<'T> = BasicInlinedOperations.sizeof<'T> - - - [] - let inline hash (x: 'T) = LanguagePrimitives.GenericHash x - - [] - let inline limitedHash (limit:int) (x: 'T) = LanguagePrimitives.GenericLimitedHash limit x - - - [] - let id x = x - - // std* are TypeFunctions with the effect of reading the property on instantiation. - // So, direct uses of stdout should capture the current System.Console.Out at that point. - [] - let stdin<'T> = System.Console.In - - [] - let stdout<'T> = System.Console.Out - - [] - let stderr<'T> = System.Console.Error - - - let inline defaultof<'T> = unsafeDefault<'T> - - - module Unchecked = - - [] - let inline defaultof<'T> = unsafeDefault<'T> - - module Checked = - - let inline (+) (x: ^T) (y: ^U) : ^V = - CheckedAdditionDynamic<(^T),(^U),(^V)> x y - when ^T : int32 and ^U : int32 = (# "add.ovf" x y : int32 #) - when ^T : float and ^U : float = (# "add" x y : float #) - when ^T : float32 and ^U : float32 = (# "add" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "add.ovf" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "add.ovf.un" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "add.ovf.un" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "add.ovf" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "add.ovf.un" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.ovf.i2" (# "add.ovf" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.ovf.u2.un" (# "add.ovf.un" x y : uint32 #) : uint16 #) - when ^T : char and ^U : char = (# "conv.ovf.u2.un" (# "add.ovf.un" x y : uint32 #) : char #) - when ^T : sbyte and ^U : sbyte = (# "conv.ovf.i1" (# "add.ovf" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.ovf.u1.un" (# "add.ovf.un" x y : uint32 #) : byte #) - when ^T : string and ^U : string = (# "" (System.String.Concat((# "" x : string #),(# "" y : string #))) : ^T #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Addition((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - // That is, not in the generic implementation of '+' - when ^T : ^T = ((^T or ^U): (static member (+) : ^T * ^U -> ^V) (x,y)) - - let inline (-) (x: ^T) (y: ^U) : ^V = - ((^T or ^U): (static member (-) : ^T * ^U -> ^V) (x,y)) - when ^T : int32 and ^U : int32 = (# "sub.ovf" x y : int32 #) - when ^T : float and ^U : float = (# "sub" x y : float #) - when ^T : float32 and ^U : float32 = (# "sub" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "sub.ovf" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "sub.ovf.un" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "sub.ovf.un" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "sub.ovf" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "sub.ovf.un" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.ovf.i2" (# "sub.ovf" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.ovf.u2.un" (# "sub.ovf.un" x y : uint32 #) : uint16 #) - when ^T : sbyte and ^U : sbyte = (# "conv.ovf.i1" (# "sub.ovf" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.ovf.u1.un" (# "sub.ovf.un" x y : uint32 #) : byte #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Subtraction((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - - let inline (~-) (x: ^T) : ^T = - (^T : (static member (~-) : ^T -> ^T) (x)) - when ^T : int32 = (# "sub.ovf" 0 x : int32 #) - when ^T : float = (# "neg" x : float #) - when ^T : float32 = (# "neg" x : float32 #) - when ^T : int64 = (# "sub.ovf" 0L x : int64 #) - when ^T : int16 = (# "sub.ovf" 0s x : int16 #) - when ^T : nativeint = (# "sub.ovf" 0n x : nativeint #) - when ^T : sbyte = (# "sub.ovf" 0y x : sbyte #) - when ^T : decimal = (# "" (System.Decimal.op_UnaryNegation((# "" x : decimal #))) : ^T #) - - let inline ( * ) (x: ^T) (y: ^U) : ^V = - CheckedMultiplyDynamic<(^T),(^U),(^V)> x y - when ^T : sbyte and ^U : sbyte = (# "conv.ovf.i1" (# "mul.ovf" x y : int32 #) : sbyte #) - when ^T : int16 and ^U : int16 = (# "conv.ovf.i2" (# "mul.ovf" x y : int32 #) : int16 #) - when ^T : int64 and ^U : int64 = (# "mul.ovf" x y : int64 #) - when ^T : int32 and ^U : int32 = (# "mul.ovf" x y : int32 #) - when ^T : nativeint and ^U : nativeint = (# "mul.ovf" x y : nativeint #) - when ^T : byte and ^U : byte = (# "conv.ovf.u1.un" (# "mul.ovf.un" x y : uint32 #) : byte #) - when ^T : uint16 and ^U : uint16 = (# "conv.ovf.u2.un" (# "mul.ovf.un" x y : uint32 #) : uint16 #) - when ^T : uint32 and ^U : uint32 = (# "mul.ovf.un" x y : uint32 #) - when ^T : uint64 and ^U : uint64 = (# "mul.ovf.un" x y : uint64 #) - when ^T : unativeint and ^U : unativeint = (# "mul.ovf.un" x y : unativeint #) - when ^T : float and ^U : float = (# "mul" x y : float #) - when ^T : float32 and ^U : float32 = (# "mul" x y : float32 #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Multiply((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - // That is, not in the generic implementation of '*' - when ^T : ^T = ((^T or ^U): (static member (*) : ^T * ^U -> ^V) (x,y)) - - - [] - let inline byte (x: ^T) = - (^T : (static member ToByte: ^T -> byte) (x)) - when ^T : string = byte_of_string (castToString x) - when ^T : float = (# "conv.ovf.u1" x : byte #) - when ^T : float32 = (# "conv.ovf.u1" x : byte #) - when ^T : int64 = (# "conv.ovf.u1" x : byte #) - when ^T : int32 = (# "conv.ovf.u1" x : byte #) - when ^T : int16 = (# "conv.ovf.u1" x : byte #) - when ^T : nativeint = (# "conv.ovf.u1" x : byte #) - when ^T : sbyte = (# "conv.ovf.u1" x : byte #) - when ^T : uint64 = (# "conv.ovf.u1.un" x : byte #) - when ^T : uint32 = (# "conv.ovf.u1.un" x : byte #) - when ^T : uint16 = (# "conv.ovf.u1.un" x : byte #) - when ^T : char = (# "conv.ovf.u1.un" x : byte #) - when ^T : unativeint = (# "conv.ovf.u1.un" x : byte #) - when ^T : byte = (# "conv.ovf.u1.un" x : byte #) - - - [] - let inline sbyte (x: ^T) = - (^T : (static member ToSByte: ^T -> sbyte) (x)) - when ^T : string = sbyte_of_string (castToString x) - when ^T : float = (# "conv.ovf.i1" x : sbyte #) - when ^T : float32 = (# "conv.ovf.i1" x : sbyte #) - when ^T : int64 = (# "conv.ovf.i1" x : sbyte #) - when ^T : int32 = (# "conv.ovf.i1" x : sbyte #) - when ^T : int16 = (# "conv.ovf.i1" x : sbyte #) - when ^T : nativeint = (# "conv.ovf.i1" x : sbyte #) - when ^T : sbyte = (# "conv.ovf.i1" x : sbyte #) - when ^T : uint64 = (# "conv.ovf.i1.un" x : sbyte #) - when ^T : uint32 = (# "conv.ovf.i1.un" x : sbyte #) - when ^T : uint16 = (# "conv.ovf.i1.un" x : sbyte #) - when ^T : char = (# "conv.ovf.i1.un" x : sbyte #) - when ^T : unativeint = (# "conv.ovf.i1.un" x : sbyte #) - when ^T : byte = (# "conv.ovf.i1.un" x : sbyte #) - - - [] - let inline uint16 (x: ^T) = - (^T : (static member ToUInt16: ^T -> uint16) (x)) - when ^T : string = uint16_of_string (castToString x) - when ^T : float = (# "conv.ovf.u2" x : uint16 #) - when ^T : float32 = (# "conv.ovf.u2" x : uint16 #) - when ^T : int64 = (# "conv.ovf.u2" x : uint16 #) - when ^T : int32 = (# "conv.ovf.u2" x : uint16 #) - when ^T : int16 = (# "conv.ovf.u2" x : uint16 #) - when ^T : nativeint = (# "conv.ovf.u2" x : uint16 #) - when ^T : sbyte = (# "conv.ovf.u2" x : uint16 #) - when ^T : uint64 = (# "conv.ovf.u2.un" x : uint16 #) - when ^T : uint32 = (# "conv.ovf.u2.un" x : uint16 #) - when ^T : uint16 = (# "conv.ovf.u2.un" x : uint16 #) - when ^T : char = (# "conv.ovf.u2.un" x : uint16 #) - when ^T : unativeint = (# "conv.ovf.u2.un" x : uint16 #) - when ^T : byte = (# "conv.ovf.u2.un" x : uint16 #) - - - [] - let inline char (x: ^T) = - (^T : (static member ToChar: ^T -> char) (x)) -#if FX_NO_CHAR_PARSE - when ^T : string = (castToString x).[0] -#else - when ^T : string = (System.Char.Parse(castToString x)) -#endif - when ^T : float = (# "conv.ovf.u2" x : char #) - when ^T : float32 = (# "conv.ovf.u2" x : char #) - when ^T : int64 = (# "conv.ovf.u2" x : char #) - when ^T : int32 = (# "conv.ovf.u2" x : char #) - when ^T : int16 = (# "conv.ovf.u2" x : char #) - when ^T : nativeint = (# "conv.ovf.u2" x : char #) - when ^T : sbyte = (# "conv.ovf.u2" x : char #) - when ^T : uint64 = (# "conv.ovf.u2.un" x : char #) - when ^T : uint32 = (# "conv.ovf.u2.un" x : char #) - when ^T : uint16 = (# "conv.ovf.u2.un" x : char #) - when ^T : char = (# "conv.ovf.u2.un" x : char #) - when ^T : unativeint = (# "conv.ovf.u2.un" x : char #) - when ^T : byte = (# "conv.ovf.u2.un" x : char #) - - - [] - let inline int16 (x: ^T) = - (^T : (static member ToInt16: ^T -> int16) (x)) - when ^T : string = int16_of_string (castToString x) - when ^T : float = (# "conv.ovf.i2" x : int16 #) - when ^T : float32 = (# "conv.ovf.i2" x : int16 #) - when ^T : int64 = (# "conv.ovf.i2" x : int16 #) - when ^T : int32 = (# "conv.ovf.i2" x : int16 #) - when ^T : int16 = (# "conv.ovf.i2" x : int16 #) - when ^T : nativeint = (# "conv.ovf.i2" x : int16 #) - when ^T : sbyte = (# "conv.ovf.i2" x : int16 #) - when ^T : uint64 = (# "conv.ovf.i2.un" x : int16 #) - when ^T : uint32 = (# "conv.ovf.i2.un" x : int16 #) - when ^T : uint16 = (# "conv.ovf.i2.un" x : int16 #) - when ^T : char = (# "conv.ovf.i2.un" x : int16 #) - when ^T : unativeint = (# "conv.ovf.i2.un" x : int16 #) - when ^T : byte = (# "conv.ovf.i2.un" x : int16 #) - - - [] - let inline uint32 (x: ^T) = - (^T : (static member ToUInt32: ^T -> uint32) (x)) - when ^T : string = ParseUInt32 (castToString x) - when ^T : float = (# "conv.ovf.u4" x : uint32 #) - when ^T : float32 = (# "conv.ovf.u4" x : uint32 #) - when ^T : int64 = (# "conv.ovf.u4" x : uint32 #) - when ^T : int32 = (# "conv.ovf.u4" x : uint32 #) - when ^T : int16 = (# "conv.ovf.u4" x : uint32 #) - when ^T : nativeint = (# "conv.ovf.u4" x : uint32 #) - when ^T : sbyte = (# "conv.ovf.u4" x : uint32 #) - when ^T : uint64 = (# "conv.ovf.u4.un" x : uint32 #) - when ^T : uint32 = (# "conv.ovf.u4.un" x : uint32 #) - when ^T : uint16 = (# "conv.ovf.u4.un" x : uint32 #) - when ^T : char = (# "conv.ovf.u4.un" x : uint32 #) - when ^T : unativeint = (# "conv.ovf.u4.un" x : uint32 #) - when ^T : byte = (# "conv.ovf.u4.un" x : uint32 #) - - - [] - let inline int32 (x: ^T) = - (^T : (static member ToInt32: ^T -> int32) (x)) - when ^T : string = ParseInt32 (castToString x) - when ^T : float = (# "conv.ovf.i4" x : int32 #) - when ^T : float32 = (# "conv.ovf.i4" x : int32 #) - when ^T : int64 = (# "conv.ovf.i4" x : int32 #) - when ^T : int32 = (# "conv.ovf.i4" x : int32 #) - when ^T : int16 = (# "conv.ovf.i4" x : int32 #) - when ^T : nativeint = (# "conv.ovf.i4" x : int32 #) - when ^T : sbyte = (# "conv.ovf.i4" x : int32 #) - when ^T : uint64 = (# "conv.ovf.i4.un" x : int32 #) - when ^T : uint32 = (# "conv.ovf.i4.un" x : int32 #) - when ^T : uint16 = (# "conv.ovf.i4.un" x : int32 #) - when ^T : char = (# "conv.ovf.i4.un" x : int32 #) - when ^T : unativeint = (# "conv.ovf.i4.un" x : int32 #) - when ^T : byte = (# "conv.ovf.i4.un" x : int32 #) - - - [] - [] - let inline int x = int32 x - - - [] - let inline uint64 (x: ^T) = - (^T : (static member ToUInt64: ^T -> uint64) (x)) - when ^T : string = ParseUInt64 (castToString x) - when ^T : float = (# "conv.ovf.u8" x : uint64 #) - when ^T : float32 = (# "conv.ovf.u8" x : uint64 #) - when ^T : int64 = (# "conv.ovf.u8" x : uint64 #) - when ^T : int32 = (# "conv.ovf.u8" x : uint64 #) - when ^T : int16 = (# "conv.ovf.u8" x : uint64 #) - when ^T : nativeint = (# "conv.ovf.u8" x : uint64 #) - when ^T : sbyte = (# "conv.ovf.u8" x : uint64 #) - when ^T : uint64 = (# "conv.ovf.u8.un" x : uint64 #) - when ^T : uint32 = (# "conv.ovf.u8.un" x : uint64 #) - when ^T : uint16 = (# "conv.ovf.u8.un" x : uint64 #) - when ^T : char = (# "conv.ovf.u8.un" x : uint64 #) - when ^T : unativeint = (# "conv.ovf.u8.un" x : uint64 #) - when ^T : byte = (# "conv.ovf.u8.un" x : uint64 #) - - - [] - let inline int64 (x: ^T) = - (^T : (static member ToInt64: ^T -> int64) (x)) - when ^T : string = ParseInt64 (castToString x) - when ^T : float = (# "conv.ovf.i8" x : int64 #) - when ^T : float32 = (# "conv.ovf.i8" x : int64 #) - when ^T : int64 = (# "conv.ovf.i8" x : int64 #) - when ^T : int32 = (# "conv.ovf.i8" x : int64 #) - when ^T : int16 = (# "conv.ovf.i8" x : int64 #) - when ^T : nativeint = (# "conv.ovf.i8" x : int64 #) - when ^T : sbyte = (# "conv.ovf.i8" x : int64 #) - when ^T : uint64 = (# "conv.ovf.i8.un" x : int64 #) - when ^T : uint32 = (# "conv.ovf.i8.un" x : int64 #) - when ^T : uint16 = (# "conv.ovf.i8.un" x : int64 #) - when ^T : char = (# "conv.ovf.i8.un" x : int64 #) - when ^T : unativeint = (# "conv.ovf.i8.un" x : int64 #) - when ^T : byte = (# "conv.ovf.i8.un" x : int64 #) - - - [] - let inline unativeint (x: ^T) = - (^T : (static member ToUIntPtr: ^T -> unativeint) (x)) - when ^T : string = unativeint_of_string (castToString x) - when ^T : float = (# "conv.ovf.u" x : unativeint #) - when ^T : float32 = (# "conv.ovf.u" x : unativeint #) - when ^T : int64 = (# "conv.ovf.u" x : unativeint #) - when ^T : int32 = (# "conv.ovf.u" x : unativeint #) - when ^T : int16 = (# "conv.ovf.u" x : unativeint #) - when ^T : nativeint = (# "conv.ovf.u" x : unativeint #) - when ^T : sbyte = (# "conv.ovf.u" x : unativeint #) - when ^T : uint64 = (# "conv.ovf.u.un" x : unativeint #) - when ^T : uint32 = (# "conv.ovf.u.un" x : unativeint #) - when ^T : uint16 = (# "conv.ovf.u.un" x : unativeint #) - when ^T : char = (# "conv.ovf.u.un" x : unativeint #) - when ^T : unativeint = (# "conv.ovf.u.un" x : unativeint #) - when ^T : byte = (# "conv.ovf.u.un" x : unativeint #) - - - [] - let inline nativeint (x: ^T) = - (^T : (static member ToIntPtr: ^T -> nativeint) (x)) - when ^T : string = nativeint_of_string (castToString x) - when ^T : float = (# "conv.ovf.i" x : nativeint #) - when ^T : float32 = (# "conv.ovf.i" x : nativeint #) - when ^T : int64 = (# "conv.ovf.i" x : nativeint #) - when ^T : int32 = (# "conv.ovf.i" x : nativeint #) - when ^T : int16 = (# "conv.ovf.i" x : nativeint #) - when ^T : nativeint = (# "conv.ovf.i" x : nativeint #) - when ^T : sbyte = (# "conv.ovf.i" x : nativeint #) - when ^T : uint64 = (# "conv.ovf.i.un" x : nativeint #) - when ^T : uint32 = (# "conv.ovf.i.un" x : nativeint #) - when ^T : uint16 = (# "conv.ovf.i.un" x : nativeint #) - when ^T : char = (# "conv.ovf.i.un" x : nativeint #) - when ^T : unativeint = (# "conv.ovf.i.un" x : nativeint #) - when ^T : byte = (# "conv.ovf.i.un" x : nativeint #) - - module OperatorIntrinsics = begin - - - open System.Collections - - let notStarted() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext.")) - let alreadyFinished() = raise (new System.InvalidOperationException("Enumeration already finished.")) - - // Notes on "inline" with range ienumerable generation. - // "inline" is used to ensure explicit lambda arguments can be reduced by the optimiser. - // However, it is not used to ensure that primitive ops like add,sub etc. are direct calls. - - type mode = NotStarted | Running | Finished - - let inline makeEnumerator (z:'z) (canStart:'z->bool) (canStep:'z->bool) (doReset:'z->unit) (current:'z->'T) = - // Generate enumerator from mutable state "z". - // Marked "inline" to ensure argument functions are reduced (by optimiser). - let mode = ref NotStarted - let getCurrent() = - match !mode with - | NotStarted -> notStarted() - | Running -> current z - | Finished -> alreadyFinished() - { new IEnumerator<'T> with - member obj.Current = getCurrent() - interface System.Collections.IEnumerator with - member obj.Current = box (getCurrent()) - member obj.MoveNext() = - match !mode with - | NotStarted -> if canStart z then (mode := Running; true) else (mode := Finished; false) - | Running -> if canStep z then true else (mode := Finished; false) - | Finished -> false - member obj.Reset() = - mode := NotStarted - doReset z - interface System.IDisposable with - member obj.Dispose() = () - } - - let makeEmptyEnumerator() = - makeEnumerator () (fun () -> false) (fun () -> false) (fun () -> ()) - (fun () -> failwith "this makeEmptyEnumerator getter should be dead code") - - let makeSingletonEnumerator v = - let doReset () = () - let current () = v - let canStart () = true - let canStep () = false - makeEnumerator () canStart canStep doReset current - - let id x = x - let makeProperIntegralRangeEnumerator (<<) add (x0,dx,x1) f = - // NOTE: The ordering << is an argument. - // << will be < or > depending on direction. - // Assumes x0 << x1 and zero << dx (i.e. it's a "proper" range). - //-------- - // NOTE: "inline" so << becomes direct operation (should be IL comparision operation) - let z = ref x0 - let doReset z = z := x0 - let current z = f !z - let canStart z = true - let canStep z = let x = !z - let x' = add !z dx - if x' << x then false // x+dx has wrapped around - elif x' = x then false // x+dx has not moved (unexpected, dx<>0) - elif x << x' && x' << x1 then (z := x'; true) // x+dx has moved towards end point - elif x' = x1 then (z := x'; true) // x+dx has reached end point - else (* x1 << x' then *) false // x+dx has passed end point - makeEnumerator z canStart canStep doReset current - - let integralRangeStepEnumerator (zero,add) x0 dx x1 f = - // Generates sequence z_i where z_i = f (x0 + i.dx) while x0 + i.dx is in region (x0,x1) - // NOTE: could/should drop "inline", trade indirect add against code size. - if x0 = x1 then - makeSingletonEnumerator (f x0) - elif x0 < x1 then - if dx < zero then - makeEmptyEnumerator() // interval increasing, step decreasing - else - makeProperIntegralRangeEnumerator (<) add (x0,dx,x1) f // generate proper increasing sequence - else - if dx > zero then - makeEmptyEnumerator() // interval decreasing, step increasing - else - makeProperIntegralRangeEnumerator (>) add (x0,dx,x1) f // generate proper decreasing sequence - - let integralRangeEnumerator (dx,add,x0,x1) = - // Generates sequence z_i where z_i = (x0 + i.dx) while x0 + i.dx is in region (x0,x1) - if x0 = x1 then - makeSingletonEnumerator x0 - elif x0 < x1 then - makeProperIntegralRangeEnumerator (<) add (x0,dx,x1) id // generate proper increasing sequence - else - makeEmptyEnumerator() // interval decreasing, step increasing - - let integralRange<'T> (one:'T, add:'T -> 'T -> 'T, n:'T,m:'T) = - let gen() = integralRangeEnumerator (one,add,n,m) - { new IEnumerable<'T> with - member x.GetEnumerator() = gen() - interface System.Collections.IEnumerable with - member x.GetEnumerator() = (gen() :> System.Collections.IEnumerator) } - - let integralRangeStep<'T,'U> (zero:'U) (add:'T -> 'U -> 'T) (n:'T,step:'U,m:'T) = - if step = zero then invalidArg "step" "the step of a range cannot be zero"; - let gen() = integralRangeStepEnumerator (zero,add) n step m id - { new IEnumerable<'T> with - member x.GetEnumerator() = gen() - interface System.Collections.IEnumerable with - member x.GetEnumerator() = (gen() :> System.Collections.IEnumerator) } - - let isNaN x = x <> x // NaN is the only value that does not equal itself. - let makeProperFloatingRangeStepEnumerator (<<) add (x0,dx,x1) = - // NOTE: The ordering << is an argument. - // << will be < or > depending on direction. - // Assumes x0 << x1 and zero << dx. - // NOTE: "inline" ensures << is comparision op - let z = ref x0 - let doReset z = z := x0 - let current z = !z - let canStart z = true - let canStep z = let x = !z - let x' = add !z dx - // NOTE: The following code is similar to the integer case, but there are differences. - // * With floats, there is a NaN case to consider. - // * With floats, there should not be any wrapping around arithmetic. - // * With floats, x + dx == x is possible when dx>0. - if x' = x then false // no movement, loss of precision - elif x << x' && x' << x1 then (z := x'; true) // advanced towards end point - elif x' = x1 then (z := x'; true) // hit end point - elif x1 << x' then false // passed beyond end point - // [includes x' infinite, x1 finite case] - elif isNaN x' then false // x' has become NaN, which is possible... - // e.g. -infinity + infinity = NaN - elif x' << x then failwith // x + dx should not move against << - "Broken invariant in F# floating point range" - else false // Are there any cases left? [i think not] - makeEnumerator z canStart canStep doReset current - - let floatingRangeStepEnumerator (zero,add) x0 step x1 = - if step = zero then invalidArg "step" "the step of a range cannot be zero"; - if isNaN x0 then invalidArg "x0" "start of a range cannot be NaN"; - if isNaN step then invalidArg "step" "step of a range cannot be NaN"; - if isNaN x1 then invalidArg "x1" "end of a range cannot be NaN"; - if x0 = x1 then - makeSingletonEnumerator x0 - elif x0 < x1 then - if step < zero then - makeEmptyEnumerator() // interval increasing, step decreasing - else - makeProperFloatingRangeStepEnumerator (<) add (x0,step,x1) // generate proper increasing sequence - else - if step > zero then - makeEmptyEnumerator() // interval decreasing, step increasing - else - makeProperFloatingRangeStepEnumerator (>) add (x0,step,x1) // generate proper decreasing sequence - - // When is a System.Double an System.Int32? - let minIntR = -2147483648.0 - let maxIntR = 2147483647.0 - let asInt x = if minIntR <= x && x <= maxIntR && System.Math.Floor x = x then Some (int x) else None - - type ops<'T> = - { zero : 'T; - add : 'T -> 'T -> 'T; - sub : 'T -> 'T -> 'T; - mul : 'T -> 'T -> 'T; - div : 'T -> 'T -> 'T; - ofInt : int -> 'T; - toFloat : 'T -> float } - - // When a floating range looks like an exact number of steps, generate using {x0+i.dx} for i from an integer range. - let optimisedFloatingRangeEnumerator (ops:ops<'T>) x0 dx x1 = - match asInt (ops.toFloat (ops.div (ops.sub x1 x0) dx)) with - | Some n -> - integralRangeStepEnumerator (0,(+)) 0 1 n (fun i -> ops.add x0 (ops.mul (ops.ofInt i) dx)) - | None -> - floatingRangeStepEnumerator (ops.zero,ops.add) x0 dx x1 - - let floatingRange ops (n,step,m) = - let gen() = optimisedFloatingRangeEnumerator ops n step m - { new IEnumerable<'T> with - member x.GetEnumerator() = gen() - interface System.Collections.IEnumerable with - member x.GetEnumerator() = (gen() :> System.Collections.IEnumerator) } - - let floatOps :ops = {zero=0.0; add=(+); sub=(-); mul=( * );div=(/);ofInt=float;toFloat=float} - let float32Ops :ops= {zero=0.0f; add=(+); sub=(-); mul=( * );div=(/);ofInt=float32;toFloat=float} - - let RangeInt32 (n,step,m) : seq = integralRangeStep 0 (+) (n,step,m) - let RangeInt64 (n,step,m) : seq = integralRangeStep 0L (+) (n,step,m) - let RangeUInt64 (n,step,m) : seq = integralRangeStep 0UL (+) (n,step,m) - let RangeUInt32 (n,step,m) : seq = integralRangeStep 0ul (+) (n,step,m) - let RangeIntPtr (n,step,m) : seq = integralRangeStep 0n (+) (n,step,m) - let RangeUIntPtr (n,step,m) : seq = integralRangeStep 0un (+) (n,step,m) - let RangeInt16 (n,step,m) : seq = integralRangeStep 0s (+) (n,step,m) - let RangeUInt16 (n,step,m) : seq = integralRangeStep 0us (+) (n,step,m) - let RangeSByte (n,step,m) : seq = integralRangeStep 0y (+) (n,step,m) - let RangeByte (n,step,m) : seq = integralRangeStep 0uy (+) (n,step,m) - let RangeDouble (n,step,m) : seq = floatingRange floatOps (n,step,m) - let RangeSingle (n,step,m) : seq = floatingRange float32Ops (n,step,m) - let RangeGeneric (one,add,n,m) : seq<'T> = integralRange (one,add,n,m) - let RangeStepGeneric (zero,add,n,step,m) : seq<'T> = integralRangeStep zero add (n,step,m) - let RangeChar (n:char, m:char) = - integralRange ((retype 1us : char),(fun (x:char) (y:char) -> retype ((retype x : uint16) + (retype y : uint16)) ),n,m) - - - let inline to_float (x:float32) = (# "conv.r8" x : float #) - let inline to_float32 (x:float) = (# "conv.r4" x : float32 #) - - let inline ComputePowerGenericInlined one mul x n = - let rec loop n = - match n with - | 0 -> one - | 1 -> x - | 2 -> mul x x - | 3 -> mul (mul x x) x - | 4 -> let v = mul x x in mul v v - | _ -> - let v = loop (n/2) in - let v = mul v v in - if n%2 = 0 then v else mul v x in - loop n - - - [] - let PowByte (x:byte) n = ComputePowerGenericInlined 1uy Checked.( * ) x n - - [] - let PowSByte (x:sbyte) n = ComputePowerGenericInlined 1y Checked.( * ) x n - - [] - let PowInt16 (x:int16) n = ComputePowerGenericInlined 1s Checked.( * ) x n - - [] - let PowUInt16 (x:uint16) n = ComputePowerGenericInlined 1us Checked.( * ) x n - - [] - let PowInt32 (x:int32) n = ComputePowerGenericInlined 1 Checked.( * ) x n - - [] - let PowUInt32 (x:uint32) n = ComputePowerGenericInlined 1u Checked.( * ) x n - - [] - let PowInt64 (x:int64) n = ComputePowerGenericInlined 1L Checked.( * ) x n - - [] - let PowUInt64 (x:uint64) n = ComputePowerGenericInlined 1UL Checked.( * ) x n - - [] - let PowIntPtr (x:nativeint) n = ComputePowerGenericInlined 1n Checked.( * ) x n - - [] - let PowUIntPtr (x:unativeint) n = ComputePowerGenericInlined 1un Checked.( * ) x n - - [] - let PowSingle (x:float32) n = ComputePowerGenericInlined 1.0f Checked.( * ) x n - - [] - let PowDouble (x:float) n = ComputePowerGenericInlined 1.0 Checked.( * ) x n - - [] - let PowDecimal (x:decimal) n = ComputePowerGenericInlined 1.0M Checked.( * ) x n - - [] - let PowGeneric (one,mul,x:'T,n) = ComputePowerGenericInlined one mul x n - - - - let inline GetArraySlice (arr: _[]) (start,finish) = - let start = (match start with None -> 0 | Some n -> n) - let finish = (match finish with None -> arr.Length - 1 | Some n -> n) - GetArraySub arr start (finish - start + 1) - - let inline SetArraySlice (dst: _[]) (start,finish,src:_[]) = - let start = (match start with None -> 0 | Some n -> n) - let finish = (match finish with None -> dst.Length - 1 | Some n -> n) - SetArraySub dst start (finish - start + 1) src - - let GetArraySlice2D (arr: _[,]) (start1,finish1,start2,finish2) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> GetArray2DLength1 arr - 1 | Some n -> n) - let finish2 = (match finish2 with None -> GetArray2DLength2 arr - 1 | Some n -> n) - let len1 = (finish1 - start1 + 1) - let len2 = (finish2 - start2 + 1) - GetArray2DSub arr start1 start2 len1 len2 - - let SetArraySlice2D (dst: _[,]) (start1,finish1,start2,finish2,src:_[,]) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> GetArray2DLength1 dst - 1 | Some n -> n) - let finish2 = (match finish2 with None -> GetArray2DLength2 dst - 1 | Some n -> n) - SetArray2DSub dst start1 start2 (finish1 - start1 + 1) (finish2 - start2 + 1) src - - let GetArraySlice3D (arr: _[,,]) (start1,finish1,start2,finish2,start3,finish3) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let start3 = (match start3 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> GetArray3DLength1 arr - 1 | Some n -> n) - let finish2 = (match finish2 with None -> GetArray3DLength2 arr - 1 | Some n -> n) - let finish3 = (match finish3 with None -> GetArray3DLength3 arr - 1 | Some n -> n) - let len1 = (finish1 - start1 + 1) - let len2 = (finish2 - start2 + 1) - let len3 = (finish3 - start3 + 1) - GetArray3DSub arr start1 start2 start3 len1 len2 len3 - - let SetArraySlice3D (dst: _[,,]) (start1,finish1,start2,finish2,start3,finish3,src:_[,,]) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let start3 = (match start3 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> GetArray3DLength1 dst - 1 | Some n -> n) - let finish2 = (match finish2 with None -> GetArray3DLength2 dst - 1 | Some n -> n) - let finish3 = (match finish3 with None -> GetArray3DLength3 dst - 1 | Some n -> n) - SetArray3DSub dst start1 start2 start3 (finish1 - start1 + 1) (finish2 - start2 + 1) (finish3 - start3 + 1) src - - let GetArraySlice4D (arr: _[,,,]) (start1,finish1,start2,finish2,start3,finish3,start4,finish4) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let start3 = (match start3 with None -> 0 | Some n -> n) - let start4 = (match start4 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> Array4DLength1 arr - 1 | Some n -> n) - let finish2 = (match finish2 with None -> Array4DLength2 arr - 1 | Some n -> n) - let finish3 = (match finish3 with None -> Array4DLength3 arr - 1 | Some n -> n) - let finish4 = (match finish4 with None -> Array4DLength4 arr - 1 | Some n -> n) - let len1 = (finish1 - start1 + 1) - let len2 = (finish2 - start2 + 1) - let len3 = (finish3 - start3 + 1) - let len4 = (finish4 - start4 + 1) - GetArray4DSub arr start1 start2 start3 start4 len1 len2 len3 len4 - - let SetArraySlice4D (dst: _[,,,]) (start1,finish1,start2,finish2,start3,finish3,start4,finish4,src:_[,,,]) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let start3 = (match start3 with None -> 0 | Some n -> n) - let start4 = (match start4 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> Array4DLength1 dst - 1 | Some n -> n) - let finish2 = (match finish2 with None -> Array4DLength2 dst - 1 | Some n -> n) - let finish3 = (match finish3 with None -> Array4DLength3 dst - 1 | Some n -> n) - let finish4 = (match finish4 with None -> Array4DLength4 dst - 1 | Some n -> n) - SetArray4DSub dst start1 start2 start3 start4 (finish1 - start1 + 1) (finish2 - start2 + 1) (finish3 - start3 + 1) (finish4 - start4 + 1) src - - let inline GetStringSlice (str:string) (start,finish) = - let start = (match start with None -> 0 | Some n -> n) - let finish = (match finish with None -> str.Length - 1 | Some n -> n) - str.Substring(start, finish-start+1) - - - - let inline abs_impl (x: ^T) : ^T = - (^T: (static member Abs : ^T -> ^T) (x)) - when ^T : int32 = let x : int32 = retype x in System.Math.Abs(x) - when ^T : float = let x : float = retype x in System.Math.Abs(x) - when ^T : float32 = let x : float32 = retype x in System.Math.Abs(x) - when ^T : int64 = let x : int64 = retype x in System.Math.Abs(x) - when ^T : nativeint = - let x : nativeint = retype x in - if x >= 0n then x else - let res = -x in - if res < 0n then raise (System.OverflowException("Negating the minimum value of a twos complement number is invalid.")) - res - when ^T : int16 = let x : int16 = retype x in System.Math.Abs(x) - when ^T : sbyte = let x : sbyte = retype x in System.Math.Abs(x) - when ^T : decimal = System.Math.Abs(retype x : decimal) - - let inline acos_impl(x: ^T) : ^T = - (^T: (static member Acos : ^T -> ^T) (x)) - when ^T : float = System.Math.Acos(retype x) - when ^T : float32 = System.Math.Acos(to_float (retype x)) |> to_float32 - - let inline asin_impl(x: ^T) : ^T = - (^T: (static member Asin : ^T -> ^T) (x)) - when ^T : float = System.Math.Asin(retype x) - when ^T : float32 = System.Math.Asin(to_float (retype x)) |> to_float32 - - let inline atan_impl(x: ^T) : ^T = - (^T: (static member Atan : ^T -> ^T) (x)) - when ^T : float = System.Math.Atan(retype x) - when ^T : float32 = System.Math.Atan(to_float (retype x)) |> to_float32 - - let inline atan2_impl(x: ^T) (y: ^T) : 'U = - (^T: (static member Atan2 : ^T * ^T -> 'U) (x,y)) - when ^T : float = System.Math.Atan2(retype x, retype y) - when ^T : float32 = System.Math.Atan2(to_float (retype x), to_float(retype y)) |> to_float32 - - let inline ceil_impl(x: ^T) : ^T = - (^T: (static member Ceiling : ^T -> ^T) (x)) - when ^T : float = System.Math.Ceiling(retype x : float) - when ^T : float32 = System.Math.Ceiling(to_float (retype x)) |> to_float32 - - let inline exp_impl(x: ^T) : ^T = - (^T: (static member Exp : ^T -> ^T) (x)) - when ^T : float = System.Math.Exp(retype x) - when ^T : float32 = System.Math.Exp(to_float (retype x)) |> to_float32 - - let inline floor_impl (x: ^T) : ^T = - (^T: (static member Floor : ^T -> ^T) (x)) - when ^T : float = System.Math.Floor(retype x : float) - when ^T : float32 = System.Math.Floor(to_float (retype x)) |> to_float32 - - let inline truncate_impl (x: ^T) : ^T = - (^T: (static member Truncate : ^T -> ^T) (x)) -#if FX_NO_TRUNCATE - when ^T : float = 0.0 - when ^T : float32 = 0.0 -#else - when ^T : float = System.Math.Truncate(retype x : float) - when ^T : float32 = System.Math.Truncate(to_float (retype x)) |> to_float32 -#endif - - let inline round_impl (x: ^T) : ^T = - (^T: (static member Round : ^T -> ^T) (x)) - when ^T : float = System.Math.Round(retype x : float) - when ^T : float32 = System.Math.Round(to_float (retype x)) |> to_float32 - - let inline sign_impl (x: ^T) : int = - (^T: (member Sign : int) (x)) - when ^T : int32 = System.Math.Sign(retype x : int32) - when ^T : int64 = System.Math.Sign(retype x : int64) - when ^T : nativeint = if (retype x : nativeint) < 0n then -1 else if (retype x : nativeint) > 0n then 1 else 0 - when ^T : int16 = System.Math.Sign(retype x : int16) - when ^T : sbyte = System.Math.Sign(retype x : sbyte) - when ^T : float = System.Math.Sign(retype x : float) - when ^T : float32 = System.Math.Sign(to_float (retype x)) - when ^T : decimal = System.Math.Sign(retype x : decimal) - - let inline log_impl(x: ^T) : ^T = - (^T: (static member Log : ^T -> ^T) (x)) - when ^T : float = System.Math.Log(retype x) - when ^T : float32 = System.Math.Log(to_float (retype x)) |> to_float32 - - let inline log10_impl(x: ^T) : ^T = - (^T: (static member Log10 : ^T -> ^T) (x)) - when ^T : float = System.Math.Log10(retype x) - when ^T : float32 = System.Math.Log10(to_float (retype x)) |> to_float32 - - let inline sqrt_impl(x: ^T) : ^U = - (^T: (static member Sqrt : ^T -> ^U) (x)) - when ^T : float = System.Math.Sqrt(retype x : float) - when ^T : float32 = System.Math.Sqrt(to_float (retype x)) |> to_float32 - - let inline cos_impl(x: ^T) : ^T = - (^T: (static member Cos : ^T -> ^T) (x)) - when ^T : float = System.Math.Cos(retype x) - when ^T : float32 = System.Math.Cos(to_float (retype x)) |> to_float32 - - let inline cosh_impl(x: ^T) : ^T = - (^T: (static member Cosh : ^T -> ^T) (x)) - when ^T : float = System.Math.Cosh(retype x) - when ^T : float32 = System.Math.Cosh(to_float (retype x)) |> to_float32 - - let inline sin_impl(x: ^T) : ^T = - (^T: (static member Sin : ^T -> ^T) (x)) - when ^T : float = System.Math.Sin(retype x) - when ^T : float32 = System.Math.Sin(to_float (retype x)) |> to_float32 - - let inline sinh_impl(x: ^T) : ^T = - (^T: (static member Sinh : ^T -> ^T) (x)) - when ^T : float = System.Math.Sinh(retype x) - when ^T : float32 = System.Math.Sinh(to_float (retype x)) |> to_float32 - - let inline tan_impl(x: ^T) : ^T = - (^T: (static member Tan : ^T -> ^T) (x)) - when ^T : float = System.Math.Tan(retype x) - when ^T : float32 = System.Math.Tan(to_float (retype x)) |> to_float32 - - - let inline tanh_impl(x: ^T) : ^T = - (^T: (static member Tanh : ^T -> ^T) (x)) - when ^T : float = System.Math.Tanh(retype x) - when ^T : float32 = System.Math.Tanh(to_float (retype x)) |> to_float32 - - let inline pow_impl (x: ^T) (y: ^T) : ^T = - (^T: (static member Pow : ^T * ^T -> ^T) (x,y)) - when ^T : float = System.Math.Pow((retype x : float), (retype y: float)) - when ^T : float32 = System.Math.Pow(to_float (retype x), to_float(retype y)) |> to_float32 - - [] - let UnaryDynamicImpl nm : ('T -> 'U) = - let aty = typeof<'T> - let minfo = aty.GetMethod(nm, [| aty |]) - (fun x -> unboxPrim<_>(minfo.Invoke(null,[| box x|]))) - - let BinaryDynamicImpl nm : ('T -> 'T -> 'U) = - let aty = typeof<'T> - let minfo = aty.GetMethod(nm,[| aty;aty |]) - (fun x y-> unboxPrim<_>(minfo.Invoke(null,[| box x; box y|]))) - - [] - type AbsDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:sbyte) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int16) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int32) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int64) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:nativeint) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:decimal) -> abs_impl x) - else UnaryDynamicImpl "Abs" - static member Result : ('T -> 'T) = result - - [] - type AcosDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> acos_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> acos_impl x) - else UnaryDynamicImpl "Acos" - static member Result : ('T -> 'T) = result - - [] - type AsinDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> asin_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> asin_impl x) - else UnaryDynamicImpl "Asin" - static member Result : ('T -> 'T) = result - - [] - type AtanDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> atan_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> atan_impl x) - else UnaryDynamicImpl "Atan" - static member Result : ('T -> 'T) = result - - [] - type Atan2DynamicImplTable<'T,'U>() = - static let result : ('T -> 'T -> 'U) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) (y:float) -> atan2_impl x y) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) (y:float32) -> atan2_impl x y) - else BinaryDynamicImpl "Atan2" - static member Result : ('T -> 'T -> 'U) = result - - [] - type CeilingDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> ceil_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> ceil_impl x) - else UnaryDynamicImpl "Ceiling" - static member Result : ('T -> 'T) = result - - [] - type ExpDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> exp_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> exp_impl x) - else UnaryDynamicImpl "Exp" - static member Result : ('T -> 'T) = result - - [] - type FloorDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> floor_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> floor_impl x) - else UnaryDynamicImpl "Floor" - static member Result : ('T -> 'T) = result - - [] - type TruncateDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> truncate_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> truncate_impl x) - else UnaryDynamicImpl "Truncate" - static member Result : ('T -> 'T) = result - - [] - type RoundDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> round_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> round_impl x) - else UnaryDynamicImpl "Round" - static member Result : ('T -> 'T) = result - - [] - type SignDynamicImplTable<'T>() = - static let result : ('T -> int) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:nativeint) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:decimal) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int16) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int32) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int64) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:sbyte) -> sign_impl x) - else UnaryDynamicImpl "Sign" - static member Result : ('T -> int) = result - - [] - type LogDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> log_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> log_impl x) - else UnaryDynamicImpl "Log" - static member Result : ('T -> 'T) = result - - [] - type Log10DynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> log10_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> log10_impl x) - else UnaryDynamicImpl "Log10" - static member Result : ('T -> 'T) = result - - [] - type SqrtDynamicImplTable<'T,'U>() = - static let result : ('T -> 'U) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> sqrt_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> sqrt_impl x) - else UnaryDynamicImpl "Sqrt" - static member Result : ('T -> 'U) = result - - [] - type CosDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> cos_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> cos_impl x) - else UnaryDynamicImpl "Cos" - static member Result : ('T -> 'T) = result - - [] - type CoshDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> cosh_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> cosh_impl x) - else UnaryDynamicImpl "Cosh" - static member Result : ('T -> 'T) = result - - [] - type SinDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> sin_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> sin_impl x) - else UnaryDynamicImpl "Sin" - static member Result : ('T -> 'T) = result - - [] - type SinhDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> sinh_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> sinh_impl x) - else UnaryDynamicImpl "Sinh" - static member Result : ('T -> 'T) = result - - [] - type TanDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> tan_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> tan_impl x) - else UnaryDynamicImpl "Tan" - static member Result : ('T -> 'T) = result - - [] - type TanhDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> tanh_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> tanh_impl x) - else UnaryDynamicImpl "Tanh" - static member Result : ('T -> 'T) = result - - [] - type PowDynamicImplTable<'T>() = - static let result : ('T -> 'T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) (y:float) -> pow_impl x y) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) (y:float32) -> pow_impl x y) - else BinaryDynamicImpl "Pow" - static member Result : ('T -> 'T -> 'T) = result - - let AbsDynamic x = AbsDynamicImplTable<_>.Result x - let AcosDynamic x = AcosDynamicImplTable<_>.Result x - let AsinDynamic x = AsinDynamicImplTable<_>.Result x - let AtanDynamic x = AtanDynamicImplTable<_>.Result x - let Atan2Dynamic x y = Atan2DynamicImplTable<_,_>.Result x y - let CeilingDynamic x = CeilingDynamicImplTable<_>.Result x - let ExpDynamic x = ExpDynamicImplTable<_>.Result x - let FloorDynamic x = FloorDynamicImplTable<_>.Result x - let TruncateDynamic x = TruncateDynamicImplTable<_>.Result x - let RoundDynamic x = RoundDynamicImplTable<_>.Result x - let SignDynamic x = SignDynamicImplTable<_>.Result x - let LogDynamic x = LogDynamicImplTable<_>.Result x - let Log10Dynamic x = Log10DynamicImplTable<_>.Result x - let SqrtDynamic x = SqrtDynamicImplTable<_,_>.Result x - let CosDynamic x = CosDynamicImplTable<_>.Result x - let CoshDynamic x = CoshDynamicImplTable<_>.Result x - let SinDynamic x = SinDynamicImplTable<_>.Result x - let SinhDynamic x = SinhDynamicImplTable<_>.Result x - let TanDynamic x = TanDynamicImplTable<_>.Result x - let TanhDynamic x = TanhDynamicImplTable<_>.Result x - let PowDynamic x y = PowDynamicImplTable<_>.Result x y - - - end - open OperatorIntrinsics - - - let inline (..) (n:^T) (m:^T) = - RangeGeneric (GenericOne< (^T) >, Checked.( + ),n,m) - when ^T : int32 = RangeInt32 (retype n,1 ,retype m) - when ^T : float = RangeDouble (retype n,1.0 ,retype m) - when ^T : float32 = RangeSingle (retype n,1.0f ,retype m) - when ^T : int64 = RangeInt64 (retype n,1L ,retype m) - when ^T : uint64 = RangeUInt64 (retype n,1UL ,retype m) - when ^T : uint32 = RangeUInt32 (retype n,1ul ,retype m) - when ^T : nativeint = RangeIntPtr (retype n,1n ,retype m) - when ^T : unativeint = RangeUIntPtr (retype n,1un ,retype m) - when ^T : int16 = RangeInt16 (retype n,1s ,retype m) - when ^T : uint16 = RangeUInt16 (retype n,1us ,retype m) - when ^T : sbyte = RangeSByte (retype n,1y ,retype m) - when ^T : byte = RangeByte (retype n,1uy ,retype m) - when ^T : char = RangeChar (retype n,retype m) - - let inline (.. ..) (n:^T) (step:^U) (m:^T) = - RangeStepGeneric (GenericZero< (^U) >, Checked.( + ),n,step,m) - when ^T : int32 = RangeInt32 (retype n ,retype step ,retype m) - when ^T : float = RangeDouble (retype n ,retype step ,retype m) - when ^T : float32 = RangeSingle (retype n ,retype step ,retype m) - when ^T : int64 = RangeInt64 (retype n ,retype step ,retype m) - when ^T : uint64 = RangeUInt64 (retype n ,retype step ,retype m) - when ^T : uint32 = RangeUInt32 (retype n ,retype step ,retype m) - when ^T : nativeint = RangeIntPtr (retype n ,retype step ,retype m) - when ^T : unativeint = RangeUIntPtr (retype n ,retype step ,retype m) - when ^T : int16 = RangeInt16 (retype n ,retype step ,retype m) - when ^T : uint16 = RangeUInt16 (retype n ,retype step ,retype m) - when ^T : sbyte = RangeSByte (retype n ,retype step ,retype m) - when ^T : byte = RangeByte (retype n ,retype step ,retype m) - - - [] - let inline abs (x: ^T) : ^T = - AbsDynamic x - when ^T : ^T = abs_impl x - - - [] - let inline acos(x: ^T) : ^T = - AcosDynamic x - when ^T : ^T = acos_impl x - - - [] - let inline asin(x: ^T) : ^T = - AsinDynamic x - when ^T : ^T = asin_impl x - - - [] - let inline atan(x: ^T) : ^T = - AtanDynamic x - when ^T : ^T = atan_impl x - - - [] - let inline atan2(x: ^T) (y: ^T) : 'U = - Atan2Dynamic x y - when ^T : ^T = (atan2_impl x y : 'U) - - - [] - let inline ceil(x: ^T) : ^T = - CeilingDynamic x - when ^T : ^T = ceil_impl x - - - [] - let inline exp(x: ^T) : ^T = - ExpDynamic x - when ^T : ^T = exp_impl x - - - [] - let inline floor (x: ^T) : ^T = - FloorDynamic x - when ^T : ^T = floor_impl x - - - [] - let inline truncate (x: ^T) : ^T = - TruncateDynamic x - when ^T : ^T = truncate_impl x - - - [] - let inline round (x: ^T) : ^T = - RoundDynamic x - when ^T : ^T = round_impl x - - - [] - let inline sign (x: ^T) : int = - SignDynamic x - when ^T : ^T = sign_impl x - - - [] - let inline log(x: ^T) : ^T = - LogDynamic x - when ^T : ^T = log_impl x - - - [] - let inline log10(x: ^T) : ^T = - Log10Dynamic x - when ^T : ^T = log10_impl x - - - [] - let inline sqrt(x: ^T) : ^U = - SqrtDynamic x - when ^T : ^T = (sqrt_impl x : ^U) - - - [] - let inline cos(x: ^T) : ^T = - CosDynamic x - when ^T : ^T = cos_impl x - - - [] - let inline cosh(x: ^T) : ^T = - CoshDynamic x - when ^T : ^T = cosh_impl x - - - [] - let inline sin(x: ^T) : ^T = - SinDynamic x - when ^T : ^T = sin_impl x - - - [] - let inline sinh(x: ^T) : ^T = - SinhDynamic x - when ^T : ^T = sinh_impl x - - - [] - let inline tan(x: ^T) : ^T = - TanDynamic x - when ^T : ^T = tan_impl x - - - [] - let inline tanh(x: ^T) : ^T = - TanhDynamic x - when ^T : ^T = tanh_impl x - - let inline ( ** ) (x: ^T) (y: ^T) : ^T = - PowDynamic x y - when ^T : ^T = pow_impl x y - - - [] - let inline gpown (x: ^T) n = - let v = PowGeneric (GenericOne< (^T) >, Checked.( * ), x,n) - if n < 0 then GenericOne< (^T) > / v - else v - - [] - let inline pown (x: ^T) n = - (if n = Int32.MinValue then gpown x (n+1) / x else gpown x n) - when ^T : int32 = - (let x = (retype x : int32) in - if x = 2 && n >= 0 && n < 31 then 1 <<< n - elif n >= 0 then PowInt32 x n - else 1 / PowInt32 x n) - when ^T : int64 = - (let x = (retype x : int64) in - if x = 2L && n >= 0 && n < 63 then 1L <<< n - elif n >= 0 then PowInt64 x n - else 1L / PowInt64 x n) - when ^T : int16 = - (let x = (retype x : int16) in - if x = 2s && n >= 0 && n < 15 then 1s <<< n - elif n >= 0 then PowInt16 x n - else 1s / PowInt16 x n) - when ^T : sbyte = - (let x = (retype x : sbyte) in - if x = 2y && n >= 0 && n < 7 then 1y <<< n - elif n >= 0 then PowSByte x n - else 1y / PowSByte x n) - when ^T : nativeint = - (let x = (retype x : nativeint) in - if x = 2n && n >= 0 && n < 31 then 1n <<< n - elif n >= 0 then PowIntPtr x n - else 1n / PowIntPtr x n) - when ^T : uint32 = - (let x = (retype x : uint32) in - if x = 2u && n >= 0 && n <= 31 then 1u <<< n - elif n >= 0 then PowUInt32 x n - else 1u / PowUInt32 x n) - when ^T : uint64 = - (let x = (retype x : uint64) in - if x = 2UL && n >= 0 && n <= 63 then 1UL <<< n - elif n >= 0 then PowUInt64 x n - else 1UL / PowUInt64 x n) - when ^T : uint16 = - (let x = (retype x : uint16) in - if x = 2us && n >= 0 && n <= 15 then 1us <<< n - elif n >= 0 then PowUInt16 x n - else 1us / PowUInt16 x n) - when ^T : byte = - (let x = (retype x : byte) in - if x = 2uy && n >= 0 && n <= 7 then 1uy <<< n - elif n >= 0 then PowByte x n - else 1uy / PowByte x n) - when ^T : unativeint = - (let x = (retype x : unativeint) in - if x = 2un && n >= 0 && n <= 31 then 1un <<< n - elif n >= 0 then PowUIntPtr x n - else 1un / PowUIntPtr x n) - - when ^T : float = - (let x = (retype x : float) in - if n >= 0 then PowDouble x n else 1.0 / PowDouble x n) - when ^T : float32 = - (let x = (retype x : float32) in - if n >= 0 then PowSingle x n else 1.0f / PowSingle x n) - when ^T : decimal = - (let x = (retype x : decimal) in - if n >= 0 then PowDecimal x n else 1.0M / PowDecimal x n) - - - - - - - - -//============================================================================ -//============================================================================ - -namespace Microsoft.FSharp.Control - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - - exception Undefined - - type LazyFailure(exn:exn) = - static let undefined = new LazyFailure(Undefined) - member x.Exception = exn - static member Undefined = undefined - -#if FX_ATLEAST_40 - open System.Threading - - module LazyExtensions = - type System.Threading.LazyInit<'T> with - static member Create(f : unit -> 'T) = - let creator = new System.Func<'T>(f) - System.Threading.LazyInit<'T>(creator,System.Threading.LazyInitMode.EnsureSingleExecution) - static member CreateFromValue(value : 'T) = - System.Threading.LazyInit<'T>.Create(fun () -> value) - member x.IsDelayed = not(x.IsInitialized) - member x.IsForced = x.IsInitialized - member x.IsException = false - member x.Force() = x.Value - member x.SynchronizedForce() = x.Value - member x.UnsynchronizedForce() = x.Value - - type Lazy<'T> = System.Threading.LazyInit<'T> - - and 'T ``lazy`` = Lazy<'T> -#else - - - [] - [] - [] - type Lazy<'T> = - { /// This field holds the result of a successful computation. It's initial value is Unchecked.defaultof - mutable value : 'T - /// This field holds either the function to run or a LazyFailure object recording the exception raised - /// from running the function. It is null if the thunk has been evaluated successfully. - mutable funcOrException: obj } - static member Create(f: (unit->'T)) : Lazy<'T> = - { value = Unchecked.defaultof<'T>; - funcOrException = box(f); } - static member CreateFromValue(x:'T) : Lazy<'T> = - { value = x; - funcOrException = null; } - member x.IsDelayed = (match x.funcOrException with null -> false | :? LazyFailure -> false | _ -> true) - member x.IsException = (match x.funcOrException with null -> false | :? LazyFailure -> true | _ -> false) - member x.IsForced = (match x.funcOrException with null -> true | _ -> false) - member x.Force() = - match x.funcOrException with - | null -> x.value - | _ -> - // Enter the lock in case another thread is in the process of evaluting the result - System.Threading.Monitor.Enter(x); - try - x.UnsynchronizedForce() - finally - System.Threading.Monitor.Exit(x) - member x.UnsynchronizedForce() = - match x.funcOrException with - | null -> x.value - | :? LazyFailure as res -> - raise(res.Exception) - | :? (unit -> 'T) as f -> - x.funcOrException <- box(LazyFailure.Undefined) - try - let res = f () - x.funcOrException <- null; - x.value <- res; - res - with e -> - x.funcOrException <- box(new LazyFailure(e)); - rethrow() - | _ -> - failwith "unreachable" - member x.SynchronizedForce() = x.Force() -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.Value = x.Force() - - member internal x.StructuredFormatDisplay = x.ToString() // for the StructuredFormatDisplay attribute - override x.ToString() = - if x.IsForced then - if box x.Value = null then - "" - else - x.Value.ToString() - else - match x.funcOrException with - | :? LazyFailure as res -> - match res.Exception with - | Undefined -> "" - | e -> e.ToString() - | _ -> - "" - - and 'T ``lazy`` = Lazy<'T> -#endif - - - -//============================================================================ -//============================================================================ - - -namespace Microsoft.FSharp.Control - - open System.Diagnostics - open Microsoft.FSharp.Core - - type IDelegateEvent<'Del when 'Del :> System.Delegate > = - [] - abstract AddHandler: handler:'Del -> unit - [] - abstract RemoveHandler: handler:'Del -> unit - - type IEvent<'Del,'Args when 'Del : delegate<'Args,unit> and 'Del :> System.Delegate > = - abstract Add: callback:('Args -> unit) -> unit - inherit IDelegateEvent<'Del> - - [] - type Handler<'Args> = delegate of sender:obj * args:'Args -> unit - - type IEvent<'Args> = IEvent, 'Args> - - // FxCop suppressions - open System.Diagnostics.CodeAnalysis - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - do() - - // FxCop suppressions - [] - [] - [] - [] - [] - [] - [] - [] - - [] - [] - [] - [] - [] - [] - - - [] - [] - - [] - [] - [] - [] - [] - [] - [] - [] - [] - - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - - - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - - [] - - - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - - - [] - [] - [] - [] - do() - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/prim-types.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/prim-types.fsi deleted file mode 100644 index 577847be..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/prim-types.fsi +++ /dev/null @@ -1,2248 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -#nowarn "35" // This construct is deprecated: the treatment of this operator is now handled directly by the F# compiler and its meaning may not be redefined. -#nowarn "61" // The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. -#nowarn "62" // This construct is for compatibility with OCaml. The syntax 'module ... : sig .. end' is deprecated unless OCaml compatibility is enabled. Consider using 'module ... = begin .. end'. - -/// Basic F# type definitions, functions and operators -namespace Microsoft.FSharp.Core - - open System - - /// An abbreviation for the .NET type System.Object - type obj = System.Object - - /// An abbreviation for the .NET type System.Exception - type exn = System.Exception - - /// An abbreviation for the .NET type System.IntPtr - type nativeint = System.IntPtr - /// An abbreviation for the .NET type System.UIntPtr - type unativeint = System.UIntPtr - - /// An abbreviation for the .NET type System.String - type string = System.String - - /// An abbreviation for the .NET type System.Single - type float32 = System.Single - /// An abbreviation for the .NET type System.Double - type float = System.Double - /// An abbreviation for the .NET type System.Single - type single = System.Single - /// An abbreviation for the .NET type System.Double - type double = System.Double - - /// An abbreviation for the .NET type System.SByte - type sbyte = System.SByte - /// An abbreviation for the .NET type System.Byte - type byte = System.Byte - /// An abbreviation for the .NET type System.SByte - type int8 = System.SByte - /// An abbreviation for the .NET type System.Byte - type uint8 = System.Byte - - /// An abbreviation for the .NET type System.Int16 - type int16 = System.Int16 - /// An abbreviation for the .NET type System.UInt16 - type uint16 = System.UInt16 - - /// An abbreviation for the .NET type System.Int32 - type int32 = System.Int32 - /// An abbreviation for the .NET type System.UInt32 - type uint32 = System.UInt32 - - /// An abbreviation for the .NET type System.Int64 - type int64 = System.Int64 - /// An abbreviation for the .NET type System.UInt64 - type uint64 = System.UInt64 - - /// An abbreviation for the .NET type System.Char - type char = System.Char - /// An abbreviation for the .NET type System.Boolean - type bool = System.Boolean - /// An abbreviation for the .NET type System.Decimal - type decimal = System.Decimal - - /// An abbreviation for the .NET type System.Int32 - type int = int32 - - /// Single dimensional, zero-based arrays, written 'int[]', 'string[]' etc. - /// Use the values in the Array module to manipulate values - /// of this type, or the notation 'arr.[x]' to get/set array - /// values. - type 'T ``[]`` = (# "!0[]" #) - - /// Two dimensional arrays, typically zero-based. - /// - /// Use the values in the Array2D module - /// to manipulate values of this type, or the notation 'arr.[x,y]' to get/set array - /// values. - /// - /// Non-zero-based arrays can also be created using methods on the System.Array type. - type 'T ``[,]`` = (# "!0[0 ... , 0 ... ]" #) - - /// Three dimensional arrays, typically zero-based. Non-zero-based arrays - /// can be created using methods on the System.Array type. - /// - /// Use the values in the Array3D module - /// to manipulate values of this type, or the notation 'arr.[x1,x2,x3]' to get and set array - /// values. - type 'T ``[,,]`` = (# "!0[0 ...,0 ...,0 ...]" #) - - /// Four dimensional arrays, typically zero-based. Non-zero-based arrays - /// can be created using methods on the System.Array type. - /// - /// Use the values in the Array4D module - /// to manipulate values of this type, or the notation 'arr.[x1,x2,x3,x4]' to get and set array - /// values. - type 'T ``[,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...]" #) - - /// Single dimensional, zero-based arrays, written 'int[]', 'string[]' etc. - /// Use the values in the Array module to manipulate values - /// of this type, or the notation 'arr.[x]' to get/set array - /// values. - type 'T array = 'T[] - - - /// Represents a managed pointer in F# code. - type 'T byref = (# "!0&" #) - - /// Represents an unmanaged pointer in F# code. - /// - /// This type should only be used when writing F# code that interoperates - /// with native code. Use of this type in F# code may result in - /// unverifiable code being generated. Conversions to and from the - /// nativeint type may be required. Values of this type can be generated - /// by the functions in the NativeInterop.NativePtr module. - type nativeptr<'T> = (# "native int" #) - - /// This type is for internal use by the F# code generator - type 'T ilsigptr = (# "!0*" #) - - - -#if FX_ATLEAST_40 - // we get IStructrualEquatable and IStructuralComparable from System - type IStructuralEquatable = System.Collections.IStructuralEquatable - type IStructuralComparable = System.Collections.IStructuralComparable -#else - //------------------------------------------------------------------------- - // Structural equality - type IStructuralEquatable = - interface - abstract Equals: o:obj * comp:System.Collections.IEqualityComparer -> bool - abstract GetHashCode: comp:System.Collections.IEqualityComparer -> int - end - - //------------------------------------------------------------------------- - // Structural comparison - and IStructuralComparable = - interface - abstract CompareTo: o:obj * comp:System.Collections.IComparer -> int - end -#endif - - /// The type 'unit', which has only one value "()". This value is special and - /// always uses the representation 'null'. - and Unit = - interface System.IComparable - - /// The type 'unit', which has only one value "()". This value is special and - /// always uses the representation 'null'. - and unit = Unit - - /// Indicates the relationship between a compiled entity in a CLI binary and an element in F# source code - type SourceConstructFlags = - /// Indicates that the compiled entity has no relationship to an element in F# source code - | None = 0 - /// Indicates that the compiled entity is part of the representation of an F# union type declaration - | SumType = 1 - /// Indicates that the compiled entity is part of the representation of an F# record type declaration - | RecordType = 2 - /// Indicates that the compiled entity is part of the representation of an F# class or other object type declaration - | ObjectType = 3 - /// Indicates that the compiled entity is part of the representation of an F# record or union case field declaration - | Field = 4 - /// Indicates that the compiled entity is part of the representation of an F# exception declaration - | Exception = 5 - /// Indicates that the compiled entity is part of the representation of an F# closure - | Closure = 6 - /// Indicates that the compiled entity is part of the representation of an F# module declaration - | Module = 7 - /// Indicates that the compiled entity is part of the representation of an F# union case declaration - | UnionCase = 8 - /// Indicates that the compiled entity is part of the representation of an F# value declaration - | Value = 9 - /// The mask of values related to the kind of the compiled entity - | KindMask = 31 - /// Indicates that the compiled entity had private or internal representation in F# source code - | NonpublicRepresentation = 32 - - [] - /// Indicates one or more adjustments to the compiled representation of an F# type or member - type CompilationRepresentationFlags = - /// No special compilation representation - | None = 0 - /// Compile an instance member as 'static' - | Static = 1 - /// Compile a member as 'instance' even if null is used as a representation for this type - | Instance = 2 - /// append 'Module' to the end of a module whose name clashes with a type name in the same namespace - | ModuleSuffix = 4 - /// Permit the use of null as a representation for nullary discriminators in a discriminated union - | UseNullAsTrueValue = 8 - /// Compile a property as a .NET event - | Event = 16 - - //------------------------------------------------------------------------- - // F#-specific Attributes - - - /// Adding this attribute to class definition makes it sealed, which means it may not - /// be extended or implemented. - [] - type SealedAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> SealedAttribute - - /// The value of the attribute, indicating whether the type is sealed or not - member Value: bool - /// Create an instance of the attribute - new : value:bool -> SealedAttribute - - /// Adding this attribute to class definition makes it abstract, which means it need not - /// implement all its methods. Instances of abstract classes may not be constructed directly. - [] - [] - type AbstractClassAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> AbstractClassAttribute - - - /// Adding this attribute to the let-binding for the definition of a top-level - /// value makes the quotation expression that implements the value available - /// for use at runtime. - [] - [] - type ReflectedDefinitionAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> ReflectedDefinitionAttribute - - /// Adding this attribute to a type causes it to be represented using a .NET struct. - [] - [] - type StructAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> StructAttribute - - /// Adding this attribute to a type causes it to be interpreted as a unit of measure. - /// This may only be used under very limited conditions. - [] - [] - type MeasureAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> MeasureAttribute - - /// Adding this attribute to a type causes it to be interpreted as a refined type, currently limited to measure-parameterized types. - /// This may only be used under very limited conditions. - [] - [] - type MeasureAnnotatedAbbreviationAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> MeasureAnnotatedAbbreviationAttribute - - /// Adding this attribute to a type causes it to be represented using a .NET interface. - [] - [] - type InterfaceAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> InterfaceAttribute - - /// Adding this attribute to a type causes it to be represented using a .NET class. - [] - [] - type ClassAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> ClassAttribute - - /// Adding this attribute to a value causes it to be compiled as a .NET constant literal. - [] - [] - type LiteralAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> LiteralAttribute - - /// Adding this attribute to a property with event type causes it to be compiled with as a .NET - /// Common Language Infrastructure metadata event, through a syntactic translation to a pair of - /// 'add_EventName' and 'remove_EventName' methods. - [] - [] - type CLIEventAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> CLIEventAttribute - - /// Adding this attribute to a discriminated union with value false - /// turns off the generation of standard helper member tester, constructor - /// and accessor members for the generated .NET class for that type. - [] - [] - type DefaultAugmentationAttribute = - inherit System.Attribute - /// The value of the attribute, indicating whether the type has a default augmentation or not - member Value: bool - /// Create an instance of the attribute - new : value:bool -> DefaultAugmentationAttribute - - /// Adding this attribute to a function indicates it is the entrypoint for an application. - /// If this absent is not speficied for an EXE then the initialization implicit in the - /// module bindings in the last file in the compilation sequence are used as the entrypoint. - [] - [] - type EntryPointAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> EntryPointAttribute - - /// Adding this attribute to a record or union type disables the automatic generation - /// of overrides for 'System.Object.Equals(obj)', 'System.Object.GetHashCode()' - /// and 'System.IComparable' for the type. The type will by default use reference equality. - /// This is identical to adding attributes StructuralEquality(false) and StructuralComparison(false). - [] - [] - type ReferenceEqualityAttribute = - inherit System.Attribute - member Value: bool - /// Create an instance of the attribute - new : unit -> ReferenceEqualityAttribute - /// Create an instance of the attribute - new : value:bool -> ReferenceEqualityAttribute - - /// Adding this attribute to a record, union or struct type with value 'false' - /// confirms the automatic generation of overrides for 'System.Object.Equals(obj)' - /// and 'System.Object.GetHashCode()' for the type. This attribute is usually used in - /// conjunction with StructuralComparison(false) to generate a type that supports - /// structural equality but not structural comparison. - [] - [] - type StructuralEqualityAttribute = - inherit System.Attribute - /// The value of the attribute, indicating whether the type uses structural equality or not - member Value: bool - /// Create an instance of the attribute - new : unit -> StructuralEqualityAttribute - /// Create an instance of the attribute - new : value:bool -> StructuralEqualityAttribute - - /// Adding this attribute to a record, union or struct type with value 'false' disables the automatic generation - /// of implementations for 'System.IComparable' for the type. - [] - [] - type StructuralComparisonAttribute = - inherit System.Attribute - /// The value of the attribute, indicating whether the type uses structural comparison or not - member Value: bool - /// Create an instance of the attribute - new : unit -> StructuralComparisonAttribute - /// Create an instance of the attribute - new : value:bool -> StructuralComparisonAttribute - - /// Adding this attribute to a field declaration means that the field is - /// not initialized. During type checking a constraint is asserted that the field type supports 'null'. - /// If the 'check' value is false then the constraint is not asserted. - [] - [] - type DefaultValueAttribute = - inherit System.Attribute - /// Indicates if a constraint is asserted that the field type supports 'null' - member Check: bool - /// Create an instance of the attribute - new : unit -> DefaultValueAttribute - /// Create an instance of the attribute - new : check: bool -> DefaultValueAttribute - - /// This attribute is added automatically for all optional arguments - [] - [] - type OptionalArgumentAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> OptionalArgumentAttribute - - /// Adding this attribute to a type, value or member requires that - /// uses of the construct must explicitly instantiate any generic type parameters. - [] - [] - type RequiresExplicitTypeArgumentsAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> RequiresExplicitTypeArgumentsAttribute - - /// Adding this attribute to a non-function value with generic parameters indicates that - /// uses of the construct can give rise to generic code through type inference. - [] - [] - type GeneralizableValueAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> GeneralizableValueAttribute - - /// Adding the OverloadID attribute to a member permits it to - /// be part of a group overloaded by the same name and arity. The string - /// must be a unique name amongst those in the overload set. Overrides - /// of this method, if permitted, must be given the same OverloadID, - /// and the OverloadID must be specified in both signature and implementation - /// files if signature files are used. - [] - [] - type OverloadIDAttribute = - inherit System.Attribute - /// A unique identifier for this overloaded member within a given overload set - member UniqueName: string - /// Create an instance of the attribute - new : uniqueName:string -> OverloadIDAttribute - - /// Adding this attribute to a type with value 'false' disables the behaviour where F# makes the - /// type Serializable by default. - [] - [] - type AutoSerializableAttribute = - inherit System.Attribute - /// The value of the attribute, indicating whether the type is automatically marked serializable or not - member Value: bool - /// Create an instance of the attribute - new : value:bool -> AutoSerializableAttribute - - /// This attribute is added to generated assemblies to indicate the - /// version of the data schema used to encode additional F# - /// specific information in the resource attached to compiled F# libraries. - [] - [] - type FSharpInterfaceDataVersionAttribute = - inherit System.Attribute - /// The major version number of the F# version associated with the attribute - member Major: int - /// The minor version number of the F# version associated with the attribute - member Minor: int - /// The release number of the F# version associated with the attribute - member Release: int - /// Create an instance of the attribute - new : major:int * minor:int * release:int -> FSharpInterfaceDataVersionAttribute - - /// This attribute is inserted automatically by the F# compiler to tag - /// types and methods in the gneerated .NET code with flags indicating the correspondence with - /// original source constructs. It is used by the functions in the - /// Microsoft.FSharp.Reflection library to reverse-map compiled constructs - /// to their original forms. It is not intended for use from use code. - [] - [] - type CompilationMappingAttribute = - inherit System.Attribute - /// Indicates the relationship between the compiled entity and F# source code - member SourceConstructFlags : SourceConstructFlags - /// Indicates the sequence number of the entity, if any, in a linear sequence of elements with F# source code - member SequenceNumber : int - /// Indicates the variant number of the entity, if any, in a linear sequence of elements with F# source code - member VariantNumber : int - /// Create an instance of the attribute - new : sourceConstructFlags:SourceConstructFlags -> CompilationMappingAttribute - /// Create an instance of the attribute - new : sourceConstructFlags:SourceConstructFlags * sequenceNumber: int -> CompilationMappingAttribute - /// Create an instance of the attribute - new : sourceConstructFlags:SourceConstructFlags * variantNumber : int * sequenceNumber : int -> CompilationMappingAttribute - - /// This attribute is used to adjust the runtime representation for a type. - /// For example, it may be used to note that the null representation - /// may be used for a type. This affects how some constructs are compiled. - [] - [] - type CompilationRepresentationAttribute = - inherit System.Attribute - /// Indicates one or more adjustments to the compiled representation of an F# type or member - member Flags : CompilationRepresentationFlags - /// Create an instance of the attribute - new : flags:CompilationRepresentationFlags -> CompilationRepresentationAttribute - - /// This attribute is used to tag values that are part of an experimental library - /// feature - [] - [] - type ExperimentalAttribute = - inherit System.Attribute - /// Indicates the warning message to be emitted when F# source code uses this construct - member Message: string - /// Create an instance of the attribute - new : message:string-> ExperimentalAttribute - - /// This attribute is used to mark how a type is displayed by default when using - /// '%A' printf formatting patterns and other two-dimensional text-based display layouts. - /// In this version of F# the only valid values are of the form PreText {PropertyName} PostText. - /// The property name indicates a property to evaluate and to display instead of the object itself. - [] - [] - type StructuredFormatDisplayAttribute = - inherit System.Attribute - /// Indicates the text to display by default when objects of this type are displayed - /// using '%A' printf formatting patterns and other two-dimensional text-based display - /// layouts. - member Value: string - /// Create an instance of the attribute - new : value:string-> StructuredFormatDisplayAttribute - - - /// This attribute is used to tag values, modules and types that are only - /// present in F# to permit a degree of code-compatibility and cross-compilation - /// with other implementations of ML-familty languages, in particular OCaml. The - /// use of the construct will give a warning unless the --ml-compatibility flag - /// is specified. - [] - [] - type OCamlCompatibilityAttribute = - inherit System.Attribute - /// Indicates the warning message to be emitted when F# source code uses this construct - member Message: string - /// Create an instance of the attribute - new : unit -> OCamlCompatibilityAttribute - /// Create an instance of the attribute - new : message:string -> OCamlCompatibilityAttribute - - /// This attribute is used to tag values whose use will result in the generation - /// of unverifiable code. These values are inevitably marked 'inline' to ensure that - /// the unverifiable constructs are not present in the actual code for the F# library, - /// but are rather copied to the source code of the caller. - [] - [] - type UnverifiableAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> UnverifiableAttribute - - /// This attribute is used to tag values that may not be dynamically invoked at runtime. This is - /// typically added to inlined functions whose implementations include unverifiable code. It - /// causes the method body emitted for the inlined function to raise an exception if - /// dynamically invoked, rather than including the unverifiable code in the generated - /// assembly. - [] - [] - type NoDynamicInvocationAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> NoDynamicInvocationAttribute - - - /// This attribute is used to indicate that references to a the elements of a module, record or union - /// type require explicit qualified access. - [] - [] - type RequireQualifiedAccessAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> RequireQualifiedAccessAttribute - - /// This attribute is used for two purposes. When applied to an assembly, it must be given a string - /// argument, and this argument must indicate a valid module or namespace in that assembly. Source - /// code files compiled with a reference to this assembly are processed in an environment - /// where the given path is automatically oepned. - /// - /// When applied to a module within an assembly, then the attribute must not be given any arguments. - /// When the enclosing namespace is opened in user source code, the module is also implicitly opened. - [] - [] - type AutoOpenAttribute = - inherit System.Attribute - /// Indicates the namespace or module to be automatically opened when an assembly is referenced - /// or an enclosing module opened. - member Path: string - /// Create an attribute used to mark a module as 'automatically opened' when the enclosing namespace is opened - new : unit -> AutoOpenAttribute - /// Create an attribute used to mark a namespace or module path to be 'automatically opened' when an assembly is referenced - new : path:string-> AutoOpenAttribute - - //------------------------------------------------------------------------- - // Units of measure - - [] - /// The type of floating point numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Double. - type float<[] 'U> = float - - [] - /// The type of floating point numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Single. - type float32<[] 'U> = float32 - - [] - /// The type of decimal numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Decimal. - type decimal<[] 'U> = decimal - - [] - /// The type of 32-bit signed integer numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int32. - type int<[] 'U> = int - - [] - /// The type of 8-bit signed integer numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.SByte. - type int8<[] 'U> = int8 - - [] - /// The type of 16-bit signed integer numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int16. - type int16<[] 'U> = int16 - - [] - /// The type of 64-bit signed integer numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int64. - type int64<[] 'U> = int64 - - //[] - //type MeasureProduct<[] 'U1, [] 'U2> = decimal - - - /// Language primitives associated with the F# language - module LanguagePrimitives = - - - /// Compare two values for equality - val inline GenericEquality : e1:'T -> e2:'T -> bool - - /// Compare two values for equality - val inline GenericEqualityWithComparer : comp:System.Collections.IEqualityComparer -> e1:'T -> e2:'T -> bool - - /// Compare two values - val inline GenericComparison : e1:'T -> e2:'T -> int - - /// Compare two values. May be called as a recursive case from an implementation of System.IComparable to - /// ensure consistent NaN comparison semantics. - val inline GenericComparisonWithComparer : comp:System.Collections.IComparer -> e1:'T -> e2:'T -> int - - /// Compare two values - val inline GenericLessThan : e1:'T -> e2:'T -> bool - - /// Compare two values - val inline GenericGreaterThan : e1:'T -> e2:'T -> bool - - /// Compare two values - val inline GenericLessOrEqual : e1:'T -> e2:'T -> bool - - /// Compare two values - val inline GenericGreaterOrEqual : e1:'T -> e2:'T -> bool - - /// Take the minimum of two values structurally according to the order given by GenericComparison - val inline GenericMinimum : e1:'T -> e2:'T -> 'T - - /// Take the maximum of two values structurally according to the order given by GenericComparison - val inline GenericMaximum : e1:'T -> e2:'T -> 'T - - - /// Reference/physical equality. - /// True if boxed versions of the inputs are reference-equal, OR if - /// both are primitive numeric types and the implementation of Object.Equals for the type - /// of the first argument returns true on the boxed versions of the inputs. - val inline PhysicalEquality : e1:'T -> e2:'T -> bool - - /// The physical hash. Hashes on the object identity, except for value types, - /// where we hash on the contents. - val inline PhysicalHash : obj:'T -> int - - /// Return an F# comparer object suitable for hashing and equality. This hashing behaviour - /// of the returned comparer is not limited by an overall node count when hashing F# - /// records, lists and union types. - val FSharpEqualityComparer : unit -> System.Collections.IEqualityComparer - - /// A static F# comparer object - val FSharpComparer : unit -> System.Collections.IComparer - - /// Make an F# comparer object for the given type - val FastGenericComparer<'T> : System.Collections.Generic.IComparer<'T> - - /// Make an F# hash/equality object for the given type - val inline FastGenericEqualityComparer<'T> : System.Collections.Generic.IEqualityComparer<'T> - - /// Make an F# hash/equality object for the given type using node-limited hashing when hashing F# - /// records, lists and union types. - val inline FastLimitedGenericEqualityComparer<'T> : limit: int -> System.Collections.Generic.IEqualityComparer<'T> - - /// Hash a value according to its structure. This hash is not limited by an overall node count when hashing F# - /// records, lists and union types. - val inline GenericHash : obj:'T -> int - - /// Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# - /// records, lists and union types. - val inline GenericLimitedHash : limit: int -> obj:'T -> int - - /// Recursively hash a part of a value according to its structure. - val inline GenericHashWithComparer : comparer : System.Collections.IEqualityComparer -> obj:'T -> int - - /// Generate a null value for reference types. - val inline DefaultValue<'T when 'T : null> : 'T - - /// Build an enum value from an underlying value - val inline EnumOfValue : value:'T -> 'Enum when 'Enum : enum<'T> - - /// Get the underlying value for an enum value - val inline EnumToValue : enum:'Enum -> 'T when 'Enum : enum<'T> - - /// Parse an int32 according to the rules used by the overloaded 'int32' conversion operator when applied to strings - val ParseInt32 : s:string -> int32 - - /// Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings - val ParseUInt32 : s:string -> uint32 - - /// Parse an int64 according to the rules used by the overloaded 'int64' conversion operator when applied to strings - val ParseInt64 : s:string -> int64 - - /// Parse an uint64 according to the rules used by the overloaded 'uint64' conversion operator when applied to strings - val ParseUInt64 : s:string -> uint64 - - /// Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' - [] - val GenericZeroDynamic : unit -> 'T - - /// Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' - [] - val GenericOneDynamic : unit -> 'T - - /// A compiler intrinsic that implements dynamic invocations to the '+' operator - [] - val AdditionDynamic : x:'T -> y:'U -> 'V - - /// A compiler intrinsic that implements dynamic invocations to the checked '+' operator - [] - val CheckedAdditionDynamic : x:'T -> y:'U -> 'V - - /// A compiler intrinsic that implements dynamic invocations to the '+' operator - [] - val MultiplyDynamic : x:'T -> y:'U -> 'V - - /// A compiler intrinsic that implements dynamic invocations to the checked '+' operator - [] - val CheckedMultiplyDynamic : x:'T -> y:'U -> 'V - - /// A compiler intrinsic that implements dynamic invocations for the DivideByInt primitive - [] - val DivideByIntDynamic : x:'T -> y:int -> 'T - - /// Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' - val inline GenericZero< ^T > : ^T when ^T : (static member Zero : ^T) - - /// Resolves to the one value for any primitive numeric type or any type with a static member called 'One' - val inline GenericOne< ^T > : ^T when ^T : (static member One : ^T) - - /// Divide a floating point value by an integer - val inline DivideByInt< ^T > : x:^T -> y:int -> ^T when ^T : (static member DivideByInt : ^T * int -> ^T) - - //------------------------------------------------------------------------- - - /// The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - module IntrinsicOperators = - - /// Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand - [] - val ( & ) : e1:bool -> e2:bool -> bool - /// Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand - val ( && ) : e1:bool -> e2:bool -> bool - /// Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand - //[] - val ( or ) : e1:bool -> e2:bool -> bool - /// Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand - val ( || ) : e1:bool -> e2:bool -> bool - /// Address-of. Uses of this value may result in the generation of unverifiable code. - [] - val inline ( ~& ) : obj:'T -> 'T byref - /// Address-of. Uses of this value may result in the generation of unverifiable code. - [] - val inline ( ~&& ) : obj:'T -> nativeptr<'T> - - //------------------------------------------------------------------------- - - /// The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - module IntrinsicFunctions = - - /// A compiler intrinsic that implements the ':?>' operator - [] - val UnboxGeneric<'T> : source:obj -> 'T - - /// A compiler intrinsic that implements the ':?>' operator - [] - val inline UnboxFast<'T> : source:obj -> 'T - - /// A compiler intrinsic that implements the ':?' operator - [] - val TypeTestGeneric<'T> : source:obj -> bool - - /// A compiler intrinsic that implements the ':?' operator - [] - val inline TypeTestFast<'T> : source:obj -> bool - - /// Primitive used by pattern match compilation - //[] - val inline GetString : source:string -> index:int -> char - - /// This function implements calls to default constructors - /// acccessed by 'new' constraints. - [] - val inline CreateInstance : unit -> 'T when 'T : (new : unit -> 'T) - - /// This function implements parsing of decimal constants - [] - val inline MakeDecimal : low:int -> medium:int -> high:int -> isNegative:bool -> scale:byte -> decimal - - /// A compiler intrinsic for the efficeint compilation of sequence expressions - [] - val Dispose<'T when 'T :> System.IDisposable > : resource:'T -> unit - - /// The standard overloaded associative (indexed) lookup operator - //[] - val inline GetArray : source:'T[] -> index:int -> 'T - - /// The standard overloaded associative (2-indexed) lookup operator - //[] - val inline GetArray2D : source:'T[,] -> index1:int * index2:int -> 'T - - /// The standard overloaded associative (3-indexed) lookup operator - //[] - val inline GetArray3D : source:'T[,,] ->index1:int * index2:int * index3:int -> 'T - - /// The standard overloaded associative (4-indexed) lookup operator - //[] - val inline GetArray4D : source:'T[,,,] ->index1:int * index2:int * index3:int * index4:int -> 'T - - /// The standard overloaded associative (indexed) mutation operator - //[] - val inline SetArray : target:'T[] -> index:int * value:'T -> unit - - /// The standard overloaded associative (2-indexed) mutation operator - //[] - val inline SetArray2D : target:'T[,] -> index1:int * index2:int * value:'T -> unit - - /// The standard overloaded associative (3-indexed) mutation operator - //[] - val inline SetArray3D : target:'T[,,] -> index1:int * index2:int * index3:int * value:'T -> unit - - /// The standard overloaded associative (4-indexed) mutation operator - //[] - val inline SetArray4D : target:'T[,,,] -> index1:int * index2:int * index3:int * index4:int * value:'T -> unit - - /// The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - module HashCompare = - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val PhysicalHashIntrinsic : input:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val PhysicalEqualityIntrinsic : x:'T -> y:'T -> bool - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericHashIntrinsic : input:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val LimitedGenericHashIntrinsic : limit: int -> input:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericHashWithComparerIntrinsic : comp:System.Collections.IEqualityComparer -> input:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericComparisonWithComparerIntrinsic : comp:System.Collections.IComparer -> x:'T -> y:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericComparisonIntrinsic : x:'T -> y:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericEqualityIntrinsic : x:'T -> y:'T -> bool - // A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericEqualityWithComparerIntrinsic : comp:System.Collections.IEqualityComparer -> x:'T -> y:'T -> bool - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericLessThanIntrinsic : x:'T -> y:'T -> bool - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericGreaterThanIntrinsic : x:'T -> y:'T -> bool - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericGreaterOrEqualIntrinsic : x:'T -> y:'T -> bool - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericLessOrEqualIntrinsic : x:'T -> y:'T -> bool - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastHashTuple2 : comparer:System.Collections.IEqualityComparer -> tuple:('T1 * 'T2) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastHashTuple3 : comparer:System.Collections.IEqualityComparer -> tuple:('T1 * 'T2 * 'T3) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastHashTuple4 : comparer:System.Collections.IEqualityComparer -> tuple:('T1 * 'T2 * 'T3 * 'T4) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastHashTuple5 : comparer:System.Collections.IEqualityComparer -> tuple:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastEqualsTuple2 : comparer:System.Collections.IEqualityComparer -> tuple1:('T1 * 'T2) -> tuple2:('T1 * 'T2) -> bool - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastEqualsTuple3 : comparer:System.Collections.IEqualityComparer -> tuple1:('T1 * 'T2 * 'T3) -> tuple2:('T1 * 'T2 * 'T3) -> bool - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastEqualsTuple4 : comparer:System.Collections.IEqualityComparer -> tuple1:('T1 * 'T2 * 'T3 * 'T4) -> tuple2:('T1 * 'T2 * 'T3 * 'T4) -> bool - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastEqualsTuple5 : comparer:System.Collections.IEqualityComparer -> tuple1:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> tuple2:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> bool - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastCompareTuple2 : comparer:System.Collections.IComparer -> tuple1:('T1 * 'T2) -> tuple2:('T1 * 'T2) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastCompareTuple3 : comparer:System.Collections.IComparer -> tuple1:('T1 * 'T2 * 'T3) -> tuple2:('T1 * 'T2 * 'T3) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastCompareTuple4 : comparer:System.Collections.IComparer -> tuple1:('T1 * 'T2 * 'T3 * 'T4) -> tuple2:('T1 * 'T2 * 'T3 * 'T4) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastCompareTuple5 : comparer:System.Collections.IComparer -> tuple1:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> tuple2:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> int - - -#if FX_ATLEAST_40 -#else - //------------------------------------------------------------------------- - // F# Tuple Types - - - /// Compiled versions of F# tuple types. These are not used directly, though - /// these compiled forms are seen by other .NET languages. - type Tuple<'T1> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 -> Tuple<'T1> - member Item1 : 'T1 with get -#if TUPLE_STRUXT - [] - type Tuple<'T1,'T2> = - new : 'T1 * 'T2 -> Tuple<'T1,'T2> - val Item1 : 'T1 - val Item2 : 'T2 // -#else - type Tuple<'T1,'T2> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 -> Tuple<'T1,'T2> - member Item1 : 'T1 with get - member Item2 : 'T2 with get -#endif - - type Tuple<'T1,'T2,'T3> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 -> Tuple<'T1,'T2,'T3> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - - type Tuple<'T1,'T2,'T3,'T4> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 * 'T4 -> Tuple<'T1,'T2,'T3,'T4> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - member Item4 : 'T4 with get - - type Tuple<'T1,'T2,'T3,'T4,'T5> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> Tuple<'T1,'T2,'T3,'T4,'T5> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - member Item4 : 'T4 with get - member Item5 : 'T5 with get - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6-> Tuple<'T1,'T2,'T3,'T4,'T5,'T6> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - member Item4 : 'T4 with get - member Item5 : 'T5 with get - member Item6 : 'T6 with get - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 -> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - member Item4 : 'T4 with get - member Item5 : 'T5 with get - member Item6 : 'T6 with get - member Item7 : 'T7 with get - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'TRest -> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - member Item4 : 'T4 with get - member Item5 : 'T5 with get - member Item6 : 'T6 with get - member Item7 : 'T7 with get - member Rest : 'TRest with get -#endif - - //------------------------------------------------------------------------- - // F# Choice Types - - - /// Helper types for active patterns with 2 choices. - [] - //[] - type Choice<'T1,'T2> = - /// Choice 1 of 2 choices - | Choice1Of2 of 'T1 - /// Choice 2 of 2 choices - | Choice2Of2 of 'T2 - - /// Helper types for active patterns with 3 choices. - [] - type Choice<'T1,'T2,'T3> = - /// Choice 1 of 3 choices - | Choice1Of3 of 'T1 - /// Choice 2 of 3 choices - | Choice2Of3 of 'T2 - /// Choice 3 of 3 choices - | Choice3Of3 of 'T3 - - /// Helper types for active patterns with 4 choices. - [] - type Choice<'T1,'T2,'T3,'T4> = - /// Choice 1 of 4 choices - | Choice1Of4 of 'T1 - /// Choice 2 of 4 choices - | Choice2Of4 of 'T2 - /// Choice 3 of 4 choices - | Choice3Of4 of 'T3 - /// Choice 4 of 4 choices - | Choice4Of4 of 'T4 - - /// Helper types for active patterns with 5 choices. - [] - type Choice<'T1,'T2,'T3,'T4,'T5> = - /// Choice 1 of 5 choices - | Choice1Of5 of 'T1 - /// Choice 2 of 5 choices - | Choice2Of5 of 'T2 - /// Choice 3 of 5 choices - | Choice3Of5 of 'T3 - /// Choice 4 of 5 choices - | Choice4Of5 of 'T4 - /// Choice 5 of 5 choices - | Choice5Of5 of 'T5 - - /// Helper types for active patterns with 6 choices. - [] - type Choice<'T1,'T2,'T3,'T4,'T5,'T6> = - /// Choice 1 of 6 choices - | Choice1Of6 of 'T1 - /// Choice 2 of 6 choices - | Choice2Of6 of 'T2 - /// Choice 3 of 6 choices - | Choice3Of6 of 'T3 - /// Choice 4 of 6 choices - | Choice4Of6 of 'T4 - /// Choice 5 of 6 choices - | Choice5Of6 of 'T5 - /// Choice 6 of 6 choices - | Choice6Of6 of 'T6 - - /// Helper types for active patterns with 7 choices. - [] - type Choice<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = - /// Choice 1 of 7 choices - | Choice1Of7 of 'T1 - /// Choice 2 of 7 choices - | Choice2Of7 of 'T2 - /// Choice 3 of 7 choices - | Choice3Of7 of 'T3 - /// Choice 4 of 7 choices - | Choice4Of7 of 'T4 - /// Choice 5 of 7 choices - | Choice5Of7 of 'T5 - /// Choice 6 of 7 choices - | Choice6Of7 of 'T6 - /// Choice 7 of 7 choices - | Choice7Of7 of 'T7 - - //------------------------------------------------------------------------- - // F# Exception Types - - - /// This exception is raised by 'failwith' - exception Failure of string - - /// Non-exhaustive match failures will raise the MatchFailure exception - exception MatchFailure of string * int * int - /// Dynamic invocations of functions marked with the NoDynamicInvocationAttribute attribute raise this exception - exception DynamicInvocationNotSupported of string - - - //------------------------------------------------------------------------- - // F# Function Types - - - /// The .NET type used to represent F# first-class type function values. This type is for use - /// by compiled F# code. - [] - type TypeFunc = - /// Specialize the type function at a given type - abstract Specialize<'T> : unit -> obj - /// Construct an instance of an F# first class type function value - new : unit -> TypeFunc - - /// The .NET type used to represent F# function values. This type is not - /// typically used directly, though may be used from other .NET languages. - [] - type FastFunc<'T,'Result> = - /// Invoke an F# first class function value with one argument - abstract member Invoke : func:'T -> 'Result - [] - /// Convert an F# first class function value to a value of type System.Converter - static member op_Implicit : func:('T -> 'Result) -> System.Converter <'T,'Result> - [] - /// Convert an value of type System.Converter to a F# first class function value - static member op_Implicit : converter:System.Converter <'T,'Result> -> ('T -> 'Result) - - /// Convert an F# first class function value to a value of type System.Converter - static member ToConverter : func:('T -> 'Result) -> System.Converter <'T,'Result> - /// Convert an value of type System.Converter to a F# first class function value - static member FromConverter : converter:System.Converter <'T,'Result> -> ('T -> 'Result) - - /// Invoke an F# first class function value with five curried arguments. In some cases this - /// will result in a more efficient application than applying the arguments successively. - static member InvokeFast : func:FastFunc <'T,('Result -> 'V -> 'W -> 'X -> 'Y)> * arg1:'T * arg2:'Result * arg3:'V * arg4:'W * arg5:'X -> 'Y - /// Invoke an F# first class function value with four curried arguments. In some cases this - /// will result in a more efficient application than applying the arguments successively. - static member InvokeFast : func:FastFunc <'T,('Result -> 'V -> 'W -> 'X)> * arg1:'T * arg2:'Result * arg3:'V * arg4:'W -> 'X - /// Invoke an F# first class function value with three curried arguments. In some cases this - /// will result in a more efficient application than applying the arguments successively. - static member InvokeFast : func:FastFunc <'T,('Result -> 'V -> 'W)> * arg1:'T * arg2:'Result * arg3:'V -> 'W - /// Invoke an F# first class function value with two curried arguments. In some cases this - /// will result in a more efficient application than applying the arguments successively. - static member InvokeFast : func:FastFunc <'T,('Result -> 'V)> * arg1:'T * arg2:'Result -> 'V - - /// Construct an instance of an F# first class function value - new : unit -> FastFunc <'T,'Result> - - [] - [] - /// Helper functions for converting F# first class function values to and from .NET representaions - /// of functions using delegates. - type FuncConvert = - [] - /// Convert the given Action delegate object to an F# function value - static member ToFastFunc : action:Action<'T> -> ('T -> unit) - - [] - /// Convert the given Converter delegate object to an F# function value - static member ToFastFunc : converter:Converter<'T,'U> -> ('T -> 'U) - - [] - /// A utility funcion to convert function values from tupled to curried form - static member FuncFromTupled : func:('T -> 'U) -> ('T -> 'U) - - [] - /// A utility funcion to convert function values from tupled to curried form - static member FuncFromTupled : func:('T1 * 'T2 -> 'U) -> ('T1 -> 'T2 -> 'U) - - [] - /// A utility funcion to convert function values from tupled to curried form - static member FuncFromTupled : func:('T1 * 'T2 * 'T3 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'U) - - [] - /// A utility funcion to convert function values from tupled to curried form - static member FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) - - [] - /// A utility funcion to convert function values from tupled to curried form - static member FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) - - /// An implementation module used to hold some private implementations of function - /// value invocation. - module OptimizedClosures = - - /// The .NET type used to represent F# function values that accept - /// two iterated (curried) arguments without intervening execution. This type should not - /// typically used directly from either F# code or from other .NET languages. - [] - type FastFunc2<'T1,'T2,'Result> = - inherit FastFunc <'T1,('T2 -> 'Result)> - /// Invoke the optimized function value with two curried arguments - abstract member Invoke : arg1:'T1 * arg2:'T2 -> 'Result - /// Adapt an F# first class function value to be an optimized function value that can - /// accept two curried arguments without intervening execution. - static member Adapt : func:('T1 -> 'T2 -> 'Result) -> FastFunc2<'T1,'T2,'Result> - /// Construct an optimized function value that can accept two curried - /// arguments without intervening execution. - new : unit -> FastFunc2 <'T1,'T2,'Result> - - /// The .NET type used to represent F# function values that accept - /// three iterated (curried) arguments without intervening execution. This type should not - /// typically used directly from either F# code or from other .NET languages. - [] - type FastFunc3<'T1,'T2,'T3,'Result> = - inherit FastFunc <'T1,('T2 -> 'T3 -> 'Result)> - /// Invoke an F# first class function value that accepts three curried arguments - /// without intervening execution - abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 -> 'Result - /// Adapt an F# first class function value to be an optimized function value that can - /// accept three curried arguments without intervening execution. - static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'Result) -> FastFunc3<'T1,'T2,'T3,'Result> - /// Construct an optimized function value that can accept three curried - /// arguments without intervening execution. - new : unit -> FastFunc3 <'T1,'T2,'T3,'Result> - - /// The .NET type used to represent F# function values that accept - /// four iterated (curried) arguments without intervening execution. This type should not - /// typically used directly from either F# code or from other .NET languages. - [] - type FastFunc4<'T1,'T2,'T3,'T4,'Result> = - inherit FastFunc <'T1,('T2 -> 'T3 -> 'T4 -> 'Result)> - /// Invoke an F# first class function value that accepts four curried arguments - /// without intervening execution - abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 * arg4:'T4 -> 'Result - /// Adapt an F# first class function value to be an optimized function value that can - /// accept four curried arguments without intervening execution. - static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'T4 -> 'Result) -> FastFunc4<'T1,'T2,'T3,'T4,'Result> - /// Construct an optimized function value that can accept four curried - /// arguments without intervening execution. - new : unit -> FastFunc4 <'T1,'T2,'T3,'T4,'Result> - - /// The .NET type used to represent F# function values that accept - /// five iterated (curried) arguments without intervening execution. This type should not - /// typically used directly from either F# code or from other .NET languages. - [] - type FastFunc5<'T1,'T2,'T3,'T4,'T5,'Result> = - inherit FastFunc <'T1,('T2 -> 'T3 -> 'T4 -> 'T5 -> 'Result)> - /// Invoke an F# first class function value that accepts five curried arguments - /// without intervening execution - abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 * arg4:'T4 * arg5:'T5 -> 'Result - /// Adapt an F# first class function value to be an optimized function value that can - /// accept five curried arguments without intervening execution. - static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'Result) -> FastFunc5<'T1,'T2,'T3,'T4,'T5,'Result> - /// Construct an optimized function value that can accept five curried - /// arguments without intervening execution. - new : unit -> FastFunc5 <'T1,'T2,'T3,'T4,'T5,'Result> - - - //------------------------------------------------------------------------- - // F# Mutable Reference Cells - - - /// The type of mutable references. Use the functions [:=] and [!] to get and - /// set values of this type. - type Ref <'T> = - { /// The current value of the reference cell - [] - mutable contents: 'T;} - /// The current value of the reference cell - member Value : 'T with get,set - - /// The type of mutable references. Use the functions [:=] and [!] to get and - /// set values of this type. - and 'T ref = Ref<'T> - - //------------------------------------------------------------------------- - // F# Option Types - - - /// The type of optional values. When used from other .NET languages the - /// empty option is the null value. - /// - /// Use the constructors Some and None to create values of this type. - /// Use the values in the Option module to manipulate values of this type, - /// or pattern match against the values directly. - /// - /// None values will appear as the value null to other .NET languages. - /// Instance methods on this type will appear as static methods to other .NET languages - /// due to the use of null as a value representation. - [] - [] - type Option <'T> = - /// The representation of "No value" - | None : 'T option - /// The representation of "Value of type 'T" - | Some : value:'T -> 'T option - /// Create an option value that is a 'None' value. - static member None : 'T option - /// Create an option value that is a 'Some' value. - static member Some : value:'T -> 'T option - [] - /// Get the value of a 'Some' option. A NullReferenceException is raised if the option is 'None'. - member Value : 'T - /// Return 'true' if the option is a 'Some' value. - member IsSome : bool - /// Return 'true' if the option is a 'None' value. - member IsNone : bool - - /// The type of optional values. When used from other .NET languages the - /// empty option is the null value. - /// - /// Use the constructors Some and None to create values of this type. - /// Use the values in the Option module to manipulate values of this type, - /// or pattern match against the values directly. - /// - /// 'None' values will appear as the value null to other .NET languages. - /// Instance methods on this type will appear as static methods to other .NET languages - /// due to the use of null as a value representation. - and 'T option = Option<'T> - - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - - /// The type of immutable singly-linked lists. - /// - /// Use the constructors [] and :: (infix) to create values of this type, or - /// the notation [1;2;3]. Use the values in the List module to manipulate - /// values of this type, or pattern match against the values directly. - type FSharpList<'T> = - | ([]) : 'T list - | (::) : _Head: 'T * _Tail: 'T list -> 'T list - /// Returns an empty list of a particular type - static member Empty : 'T list - - /// Gets the number of items contained in the list - member Length : int - /// Gets a value indicating if the list contains no entries - member IsEmpty : bool - - /// Gets the first element of the list - member Head : 'T - - /// Gets the tail of the list, which is a list containing all the elements of the list, excluding the first element - member Tail : 'T list - - /// Get the element of the list at the given position. Note lists are represented - /// as linked lists so this is an O(n) operation. - member Item : index:int -> 'T with get - - /// Returns a list with head as its first element and tail as its subsequent elements - static member Cons : head:'T * tail:'T list -> 'T list - - interface System.Collections.Generic.IEnumerable<'T> - interface System.Collections.IEnumerable - - /// An abbreviation for the type of immutable singly-linked lists. - /// - /// Use the constructors [] and :: (infix) to create values of this type, or - /// the notation [1;2;3]. Use the values in the List module to manipulate - /// values of this type, or pattern match against the values directly. - and 'T list = FSharpList<'T> - - /// An abbreviation for the type of immutable singly-linked lists. - and List<'T> = FSharpList<'T> - - /// An abbreviation for the .NET type System.Collections.Generic.List<_> - type ResizeArray<'T> = System.Collections.Generic.List<'T> - - /// An abbreviation for the .NET type System.Collections.Generic.IEnumerable<_> - type seq<'T> = IEnumerable<'T> - - - -namespace Microsoft.FSharp.Core - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - - /// Basic F# Operators. This module is automatically opened in all F# code. - module Operators = - - // Arithmetic operators. These operators are overloaded and can be used - // on any pair of types that satisfies the constraint, e.g. the - // '+' function can be used on any type that supports the "op_Addition" - // constraint. This includes all .NET types that support the op_Addition - // operator. The standard integral and floating point types support - // constraints as follows: - // - The built-in integral types are: - // sbyte, byte, int16, uint16, int32, unit32, - // int64, uint64, nativeint, unativeint - // - // - The built-in floating point types are: - // float, float32 - // - // - The built-in numeric types are these combined - // - // All built-in numeric types support: - // 'ty.(+) : (ty,ty) -> ty - // 'ty.(-) : (ty,ty) -> ty - // 'ty.( * ) : (ty,ty) -> ty - // 'ty.(/) : (ty,ty) -> ty - // 'ty.(%) : (ty,ty) -> ty - // 'ty.(~+) : (ty) -> ty - // - // All signed numeric types support: - // 'ty.(~-) : (ty) -> ty - - - /// Overloaded unary negation. - val inline ( ~- ) : n:^T -> ^T when ^T : (static member ( ~- ) : ^T -> ^T) and default ^T : int - - /// Overloaded addition operator - val inline ( + ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( + ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded subtraction operator - val inline ( - ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( - ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded multiplication operator - val inline ( * ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( * ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded division operator - val inline ( / ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( / ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded modulo operator - val inline ( % ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( % ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded logical-AND operator - val inline (&&&): x:^T -> y:^T -> ^T when ^T : (static member (&&&) : ^T * ^T -> ^T) and default ^T : int - - /// Overloaded logical-OR operator - val inline (|||) : x:^T -> y:^T -> ^T when ^T : (static member (|||) : ^T * ^T -> ^T) and default ^T : int - - /// Overloaded logical-XOR operator - val inline (^^^) : x:^T -> y:^T -> ^T when ^T : (static member (^^^) : ^T * ^T -> ^T) and default ^T : int - - /// Overloaded byte-shift left operator by a specified number of bits - val inline (<<<) : value:^T -> shift:int32 -> ^T when ^T : (static member (<<<) : ^T * int32 -> ^T) and default ^T : int - - /// Overloaded byte-shift right operator by a specified number of bits - val inline (>>>) : value:^T -> shift:int32 -> ^T when ^T : (static member (>>>) : ^T * int32 -> ^T) and default ^T : int - - /// Overloaded logical-NOT operator - val inline (~~~) : value:^T -> ^T when ^T : (static member (~~~) : ^T -> ^T) and default ^T : int - - /// Overloaded prefix=plus operator - val inline (~+) : value:^T -> ^T when ^T : (static member (~+) : ^T -> ^T) and default ^T : int - - /// Structural less-than comparison - val inline ( < ) : x:'T -> y:'T -> bool - - /// Structural greater-than - val inline ( > ) : x:'T -> y:'T -> bool - - ///Structural greater-than-or-equal - val inline ( >= ) : x:'T -> y:'T -> bool - - ///Structural less-than-or-equal comparison - val inline ( <= ) : x:'T -> y:'T -> bool - - ///Structural equality - val inline ( = ) : x:'T -> y:'T -> bool - - ///Structural inequality - val inline ( <> ) : x:'T -> y:'T -> bool - - /// Compose two functions, the function on the left being applied first - val inline (>>): func1:('T -> 'U) -> func2:('U -> 'V) -> ('T -> 'V) - - /// Compose two functions, the function on the right being applied first - val inline (<<): func2:('U -> 'V) -> func1:('T -> 'U) -> ('T -> 'V) - - /// Apply a function to a value, the value being on the left, the function on the right - val inline (|>): arg:'T -> func:('T -> 'U) -> 'U - /// Apply a function to two values, the values being a pair on the left, the function on the right - val inline (||>): arg1:'T1 * arg2:'T2 -> func:('T1 -> 'T2 -> 'U) -> 'U - /// Apply a function to three values, the values being a triple on the left, the function on the right - val inline (|||>): arg1:'T1 * arg2:'T2 * arg3:'T3 -> func:('T1 -> 'T2 -> 'T3 -> 'U) -> 'U - - /// Apply a function to a value, the value being on the right, the function on the left - val inline (<|): func:('T -> 'U) -> arg1:'T -> 'U - - /// Apply a function to two values, the values being a pair on the right, the function on the left - val inline (<||): func:('T1 -> 'T2 -> 'U) -> arg1:'T1 * arg2:'T2 -> 'U - - /// Apply a function to three values, the values being a triple on the right, the function on the left - val inline (<|||): func:('T1 -> 'T2 -> 'T3 -> 'U) -> arg1:'T1 * arg2:'T2 * arg3:'T3 -> 'U - - /// Used to specify a default value for an optional argument in the implementation of a function - val defaultArg : arg:'T option -> defaultValue:'T -> 'T - - /// Concatenate two strings. The overlaoded operator '+' may also be used. - val (^): s1:string -> s2:string -> string - - /// Raises an exception - val raise : exn:System.Exception -> 'T - - /// Rethrows an exception. This should only be used when handling an exception - [] - val inline rethrow : unit -> 'T - - /// Return the first element of a tuple, fst (a,b) = a. - val fst : tuple:('T1 * 'T2) -> 'T1 - - /// Return the second element of a tuple, snd (a,b) = b. - val snd : tuple:('T1 * 'T2) -> 'T2 - - /// Generic comparison - val inline compare: e1:'T -> e2:'T -> int - /// Maximum based on generic comparison - val inline max : e1:'T -> e2:'T -> 'T - /// Minimum based on generic comparison - val inline min : e1:'T -> e2:'T -> 'T - - /// Ignore the passed value. This is often used to throw away results of a computation. - val ignore : value:'T -> unit - - /// Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a. - val inline unbox : value:obj -> 'T - /// Boxes a strongly typed value. - val inline box : value:'T -> obj - - /// Throw a FailureException exception - val failwith : message:string -> 'T - - /// Throw an ArgumentException exception - val invalidArg : argumentName:string -> message:string -> 'T - - /// Throw an ArgumentNullException exception - val nullArg : argumentName:string -> 'T - - /// Throw an InvalidOperationException exception - val invalidOp : message:string -> 'T - - /// The identity function - val id : x:'T -> 'T - - /// Create a mutable reference cell - val ref : value:'T -> 'T ref - - /// Assign to a mutable reference cell - val ( := ) : cell:'T ref -> value:'T -> unit - - /// Dereference a mutable reference cell - val ( ! ) : cell:'T ref -> 'T - - /// Decrement a mutable reference cell containing an integer - val decr: cell:int ref -> unit - - /// Increment a mutable reference cell containing an integer - val incr: cell:int ref -> unit - - /// Concatenate two lists. - val (@): list1:'T list -> list2:'T list -> 'T list - - /// Negate a logical value. not true equals false and not false equals true - val inline not : value:bool -> bool - -#if FX_NO_EXIT -#else - /// Exit the current hardware isolated process, if security settings permit, - /// otherwise raise an exception. Calls System.Environment.Exit. - val exit: exitcode:int -> 'T when default 'T : obj -#endif - - /// Equivalent to System.Double.PositiveInfinity - val infinity: float - - /// Equivalent to System.Double.NaN - val nan: float - - /// Equivalent to System.Single.PositiveInfinity - val infinityf: float32 - - /// Equivalent to System.Single.NaN - val nanf: float32 - - /// Reads the value of the property System.Console.In. - val stdin<'T> : System.IO.TextReader - - /// Reads the value of the property System.Console.Error. - val stderr<'T> : System.IO.TextWriter - - /// Reads the value of the property System.Console.Out. - val stdout<'T> : System.IO.TextWriter - - /// The standard overloaded range operator, e.g. [n..m] for lists, seq {n..m} for sequences - val inline (..) : start:^T -> finish:^T -> seq< ^T > - when ^T : (static member (+) : ^T * ^T -> ^T) - and ^T : (static member One : ^T) - and default ^T : int - - /// The standard overloaded skip range operator, e.g. [n..skip..m] for lists, seq {n..skip..m} for sequences - val inline (.. ..) : start:^T -> step:^U -> finish:^T -> seq< ^T > - when (^T or ^U) : (static member (+) : ^T * ^U -> ^T) - and ^U : (static member Zero : ^U) - and default ^U : ^T - and default ^T : int - - /// Execute the function as a mutual-exlcusion region using the input value as a lock. - val inline lock: lockObject:'lock -> action:(unit -> 'T) -> 'T when 'lock : not struct - - /// Clean up resources associated with the input object after the completion of the given function. - /// Cleanup occurs even when an exception is raised by the protected - /// code. - val using: resource:('T :> System.IDisposable) -> action:('T -> 'U) -> 'U - - - /// Generate a System.Type runtime represenation of a static type. - /// The static type is still maintained on the value returned. - [] - val inline typeof<'T> : System.Type - - /// Generate a System.Type representation for a type definition. If the - /// input type is a generic type instantiation then return the - /// generic type definition associated with all such instantiations. - [] - val inline typedefof<'T> : System.Type - - /// Returns the internal size of a type in bytes. For example, sizeof<int> returns 4. - [] - val inline sizeof<'T> : int - - /// A generic hash function, designed to return equal hash values for items that are - /// equal according to the "=" operator. By default it will use structural hashing - /// for F# union, record and tuple types, hashing the complete contents of the - /// type. The exact behaviour of the function can be adjusted on a - /// type-by-type basis by implementing GetHashCode for each type. - val inline hash: obj:'T -> int - - /// A generic hash function. This function has the same behaviour as 'hash', - /// however the default structural hashing for F# union, record and tuple - /// types stops when the given limit of nodes is reached. The exact behaviour of - /// the function can be adjusted on a type-by-type basis by implementing - /// GetHashCode for each type. - val inline limitedHash: limit: int -> obj:'T -> int - - - /// Absolute value of the given number - val inline abs : value:^T -> ^T when ^T : (static member Abs : ^T -> ^T) and default ^T : int - - /// Inverse cosine of the given number - val inline acos : value:^T -> ^T when ^T : (static member Acos : ^T -> ^T) and default ^T : float - - /// Inverse sine of the given number - val inline asin : value:^T -> ^T when ^T : (static member Asin : ^T -> ^T) and default ^T : float - - /// Inverse tangent of the given number - val inline atan : value:^T -> ^T when ^T : (static member Atan : ^T -> ^T) and default ^T : float - - /// Inverse tangent of x/y where x and y are specified separately - val inline atan2 : y:^T -> x:^T -> 'U when ^T : (static member Atan2 : ^T * ^T -> 'U) and default ^T : float - - /// Ceiling of the given number - val inline ceil : value:^T -> ^T when ^T : (static member Ceiling : ^T -> ^T) and default ^T : float - - /// Exponential of the given number - val inline exp : value:^T -> ^T when ^T : (static member Exp : ^T -> ^T) and default ^T : float - - /// Floor of the given number - val inline floor : value:^T -> ^T when ^T : (static member Floor : ^T -> ^T) and default ^T : float - - /// Sign of the given number - val inline sign : value:^T -> int when ^T : (member Sign : int) and default ^T : float - - /// Round the given number - val inline round : value:^T -> ^T when ^T : (static member Round : ^T -> ^T) and default ^T : float - - /// Natural logarithm of the given number - val inline log : value:^T -> ^T when ^T : (static member Log : ^T -> ^T) and default ^T : float - - /// Logarithm to base 10 of the given number - val inline log10 : value:^T -> ^T when ^T : (static member Log10 : ^T -> ^T) and default ^T : float - - /// Square root of the given number - val inline sqrt : value:^T -> ^U when ^T : (static member Sqrt : ^T -> ^U) and default ^U : ^T and default ^T : ^U and default ^T : float - - /// Cosine of the given number - val inline cos : value:^T -> ^T when ^T : (static member Cos : ^T -> ^T) and default ^T : float - - /// Hyperbolic cosine of the given number - val inline cosh : value:^T -> ^T when ^T : (static member Cosh : ^T -> ^T) and default ^T : float - - /// Sine of the given number - val inline sin : value:^T -> ^T when ^T : (static member Sin : ^T -> ^T) and default ^T : float - - /// Hyperbolic sine of the given number - val inline sinh : value:^T -> ^T when ^T : (static member Sinh : ^T -> ^T) and default ^T : float - - /// Tangent of the given number - val inline tan : value:^T -> ^T when ^T : (static member Tan : ^T -> ^T) and default ^T : float - - /// Hyperbolic tangent of the given number - val inline tanh : value:^T -> ^T when ^T : (static member Tanh : ^T -> ^T) and default ^T : float - -#if FX_NO_TRUNCATE -#else - /// Overloaded truncate operator. - val inline truncate : value:^T -> ^T when ^T : (static member Truncate : ^T -> ^T) and default ^T : float -#endif - - /// Overloaded power operator. - val inline ( ** ) : x:^T -> y:^T -> ^T when ^T : (static member Pow : ^T * ^T -> ^T) and default ^T : float - - /// Overloaded power operator. If n > 0 then equivalent to x*...*x for n occurrences of x. - val inline pown : x:^T -> n:int -> ^T when ^T : (static member One : ^T) - and ^T : (static member ( * ) : ^T * ^T -> ^T) - and ^T : (static member ( / ) : ^T * ^T -> ^T) - and default ^T : int - - /// Converts the argument to byte. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Byte.Parse() on strings and otherwise requires a ToByte method on the input type - val inline byte : value:^T -> byte when ^T : (static member ToByte : ^T -> byte) and default ^T : int - - /// Converts the argument to signed byte. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using SByte.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSByte method on the input type - val inline sbyte : value:^T -> sbyte when ^T : (static member ToSByte : ^T -> sbyte) and default ^T : int - - /// Converts the argument to signed 16-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Int16.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt16 method on the input type - val inline int16 : value:^T -> int16 when ^T : (static member ToInt16 : ^T -> int16) and default ^T : int - - /// Converts the argument to unsigned 16-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using UInt16.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt16 method on the input type - val inline uint16 : value:^T -> uint16 when ^T : (static member ToUInt16 : ^T -> uint16) and default ^T : int - - /// Converts the argument to signed 32-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Int32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt32 method on the input type - val inline int : value:^T -> int when ^T : (static member ToInt32 : ^T -> int) and default ^T : int - - /// Converts the argument to a particular enum type. - val inline enum : value:int32 -> ^U when ^U : enum - - /// Converts the argument to signed 32-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Int32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt32 method on the input type - val inline int32 : value:^T -> int32 when ^T : (static member ToInt32 : ^T -> int32) and default ^T : int - - /// Converts the argument to unsigned 32-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using UInt32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt32 method on the input type - val inline uint32 : value:^T -> uint32 when ^T : (static member ToUInt32 : ^T -> uint32) and default ^T : int - - /// Converts the argument to signed 64-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Int64.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt64 method on the input type - val inline int64 : value:^T -> int64 when ^T : (static member ToInt64 : ^T -> int64) and default ^T : int - - /// Converts the argument to unsigned 64-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using UInt64.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt64 method on the input type - val inline uint64 : value:^T -> uint64 when ^T : (static member ToUInt64 : ^T -> uint64) and default ^T : int - - /// Converts the argument to 32-bit float. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type - val inline float32 : value:^T -> float32 when ^T : (static member ToSingle : ^T -> float32) and default ^T : int - - /// Converts the argument to 64-bit float. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type - val inline float : value:^T -> float when ^T : (static member ToDouble : ^T -> float) and default ^T : int - - /// Converts the argument to 32-bit float. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type - val inline single : value:^T -> single when ^T : (static member ToSingle : ^T -> single) and default ^T : int - - /// Converts the argument to 64-bit float. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type - val inline double : value:^T -> float when ^T : (static member ToDouble : ^T -> double) and default ^T : int - - /// Converts the argument to signed native integer. This is a direct conversion for all - /// primitive numeric types and ToIntPtr method otherwise) - val inline nativeint : value:^T -> nativeint when ^T : (static member ToIntPtr : ^T -> nativeint) and default ^T : int - - /// Converts the argument to unsigned native integer using a direct conversion for all - /// primitive numeric types and requiring a ToUintPtr method otherwise - val inline unativeint : value:^T -> unativeint when ^T : (static member ToUIntPtr : ^T -> unativeint) and default ^T : int - - /// Converts the argument to a string using ToString. - /// For standard integer and floating point values the ToString conversion uses CultureInfo.InvariantCulture. - /// Note, native integer ToString does not support specifying CultureInfo. - val inline string : value:^T -> string - - /// Converts the argument to System.Decimal using a direct conversion for all - /// primitive numeric types and requiring a ToDecimal method otherwise - val inline decimal : value:^T -> decimal when ^T : (static member ToDecimal : ^T -> decimal) and default ^T : int - - /// Converts the argument to character. Numeric inputs are converted according to the UTF-16 - /// encoding for characters. String inputs must be exactly one character long. - /// For other types a static member ToChar must exist on the type. - val inline char : value:^T -> char when ^T : (static member ToChar : ^T -> char) and default ^T : int - - /// An active pattern to match values of type System.Collections.Generic.KeyValuePair - val ( |KeyValue| ): keyValuePair:KeyValuePair<'T,'U> -> 'T * 'U - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val invalid_arg : message:string -> 'T - - [] - val invalid_op : message:string -> 'T - - /// Throw an KeyNotFoundException exception - [] - val not_found : unit -> 'T - - [] - val InvalidArgument : string -> exn - - [] - val (|InvalidArgument|_|) : exn -> string option - - [] - type InvalidArgumentException = ArgumentException -#endif - - - /// A module of compiler intrinsic functions for efficient implementations of F# integer ranges - /// and dynamic invocations of other F# operators - module OperatorIntrinsics = - - //[] - /// Get a slice of an array - val inline GetArraySlice : source:'T[] -> start:int option * finish:int option -> 'T[] - - //[] - /// Set a slice of an array - val inline SetArraySlice : target:'T[] -> start:int option * finish:int option * source:'T[] -> unit - - //[] - /// Get a slice of an array - val GetArraySlice2D : source:'T[,] -> start1:int option * finish1:int option * start2:int option * finish2:int option -> 'T[,] - - //[] - /// Set a slice of an array - val SetArraySlice2D : target:'T[,] -> start1:int option * finish1:int option * start2:int option * finish2:int option * source:'T[,] -> unit - - //[] - /// Get a slice of an array - val GetArraySlice3D : source:'T[,,] -> start1:int option * finish1:int option * start2:int option * finish2:int option * start3:int option * finish3:int option -> 'T[,,] - - //[] - /// Set a slice of an array - val SetArraySlice3D : target:'T[,,] -> start1:int option * finish1:int option * start2:int option * finish2:int option * start3:int option * finish3:int option * source:'T[,,] -> unit - - //[] - /// Get a slice of an array - val GetArraySlice4D : source:'T[,,,] -> start1:int option * finish1:int option * start2:int option * finish2:int option * start3:int option * finish3:int option * start4:int option * finish4:int option -> 'T[,,,] - - // [] - /// Set a slice of an array - val SetArraySlice4D : target:'T[,,,] -> start1:int option * finish1:int option * start2:int option * finish2:int option * start3:int option * finish3:int option * start4:int option * finish4:int option * source:'T[,,,] -> unit - - //[] - /// Get a slice from a string - val inline GetStringSlice : source:string -> start:int option * finish:int option -> string - - /// Generate a range of integers - [] - val RangeInt32 : start:int * step:int * stop:int -> seq - /// Generate a range of float values - [] - val RangeDouble : start:float * step:float * stop:float -> seq - /// Generate a range of float32 values - [] - val RangeSingle : start:float32 * step:float32 * stop:float32 -> seq - /// Generate a range of int64 values - [] - val RangeInt64 : start:int64 * step:int64 * stop:int64 -> seq - /// Generate a range of uint64 values - [] - val RangeUInt64 : start:uint64 * step:uint64 * stop:uint64 -> seq - /// Generate a range of uint32 values - [] - val RangeUInt32 : start:uint32 * step:uint32 * stop:uint32 -> seq - /// Generate a range of nativeint values - [] - val RangeIntPtr : start:nativeint * step:nativeint * stop:nativeint -> seq - /// Generate a range of unativeint values - [] - val RangeUIntPtr : start:unativeint * step:unativeint * stop:unativeint -> seq - /// Generate a range of int16 values - [] - val RangeInt16 : start:int16 * step:int16 * stop:int16 -> seq - /// Generate a range of uint16 values - [] - val RangeUInt16 : start:uint16 * step:uint16 * stop:uint16 -> seq - /// Generate a range of sbyte values - [] - val RangeSByte : start:sbyte * step:sbyte * stop:sbyte -> seq - /// Generate a range of byte values - [] - val RangeByte : start:byte * step:byte * stop:byte -> seq - /// Generate a range of char values - [] - val RangeChar : start:char * stop:char -> seq - /// Generate a range of values using the given zero, add, start, step and stop values - [] - val RangeGeneric : one:'T * add:('T -> 'T -> 'T) * start:'T * stop:'T -> seq<'T> - /// Generate a range of values using the given zero, add, start, step and stop values - [] - val RangeStepGeneric : zero:'U * add:('T -> 'U -> 'T) * start:'T * step:'U * stop:'T -> seq<'T> - - [] - val AbsDynamic : x:'T -> 'T - - [] - val AcosDynamic : x:'T -> 'T - - - [] - val AsinDynamic : x:'T -> 'T - - [] - val AtanDynamic : x:'T -> 'T - - [] - val Atan2Dynamic : y:'T -> x:'T -> 'U - - [] - val CeilingDynamic : x:'T -> 'T - - - [] - val ExpDynamic : x:'T -> 'T - - [] - val FloorDynamic : x:'T -> 'T - - [] - val TruncateDynamic : x:'T -> 'T - - [] - val RoundDynamic : x:'T -> 'T - - [] - val SignDynamic : 'T -> int - - [] - val LogDynamic : x:'T -> 'T - - [] - val Log10Dynamic : x:'T -> 'T - - [] - val SqrtDynamic : 'T -> 'U - - [] - val CosDynamic : x:'T -> 'T - - [] - val CoshDynamic : x:'T -> 'T - - [] - val SinDynamic : x:'T -> 'T - - [] - val SinhDynamic : x:'T -> 'T - - [] - val TanDynamic : x:'T -> 'T - - [] - val TanhDynamic : x:'T -> 'T - - [] - val PowDynamic : x:'T -> y:'T -> 'T - - - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'byte' - [] - val PowByte : x:byte -> n:int -> byte - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'sbyte' - [] - val PowSByte : x:sbyte -> n:int -> sbyte - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int16' - [] - val PowInt16 : x:int16 -> n:int -> int16 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint16' - [] - val PowUInt16 : x:uint16 -> n:int -> uint16 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int32' - [] - val PowInt32 : x:int32 -> n:int -> int32 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint32' - [] - val PowUInt32 : x:uint32 -> n:int -> uint32 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int64' - [] - val PowInt64 : x:int64 -> n:int -> int64 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint64' - [] - val PowUInt64 : x:uint64 -> n:int -> uint64 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'nativeint' - [] - val PowIntPtr : x:nativeint -> n:int -> nativeint - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'unativeint' - [] - val PowUIntPtr : x:unativeint -> n:int -> unativeint - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'float32' - [] - val PowSingle : x:float32 -> n:int -> float32 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'float' - [] - val PowDouble : x:float -> n:int -> float - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'decimal' - [] - val PowDecimal : x:decimal -> n:int -> decimal - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator - [] - val PowGeneric : one:'T * mul: ('T -> 'T -> 'T) * value:'T * exponent:int -> 'T - - /// This module contains basic operations which do not apply runtime and/or static checks - module Unchecked = - - /// Generate a defult value for any type. This is null for reference types, - /// For structs, this is struct value where all fields have the default value. - /// This function is unsafe in the sense that some F# values do not have proper null values. - [] - val inline defaultof<'T> : 'T - - /// This module contains the basic arithmetic operations with overflow checks. - module Checked = - /// Overloaded unary negation (checks for overflow) - [] - val inline ( ~- ) : value:^T -> ^T when ^T : (static member ( ~- ) : ^T -> ^T) and default ^T : int - - /// Overloaded subtraction operator (checks for overflow) - [] - val inline ( - ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( - ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded addition operator (checks for overflow) - val inline ( + ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( + ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded multiplication operator (checks for overflow) - [] - val inline ( * ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( * ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Converts the argument to byte. This is a direct conversion for all - /// primitive numeric types and ToByte method otherwise) - [] - val inline byte : value:^T -> byte when ^T : (static member ToByte : ^T -> byte) and default ^T : int - - /// Converts the argument to signed byte. This is a direct conversion for all - /// primitive numeric types and ToSByte method otherwise) - [] - val inline sbyte : value:^T -> sbyte when ^T : (static member ToSByte : ^T -> sbyte) and default ^T : int - - /// Converts the argument to signed 16-bit integer. This is a direct conversion for all - /// primitive numeric types and ToInt16 method otherwise) - [] - val inline int16 : value:^T -> int16 when ^T : (static member ToInt16 : ^T -> int16) and default ^T : int - - /// Converts the argument to unsigned 16-bit integer. This is a direct conversion for all - /// primitive numeric types and ToUInt16 method otherwise) - [] - val inline uint16 : value:^T -> uint16 when ^T : (static member ToUInt16 : ^T -> uint16) and default ^T : int - - /// Converts the argument to signed 32-bit integer. This is a direct conversion for all - /// primitive numeric types and ToInt32 method otherwise) - [] - val inline int : value:^T -> int when ^T : (static member ToInt32 : ^T -> int) and default ^T : int - - /// Converts the argument to signed 32-bit integer. This is a direct conversion for all - /// primitive numeric types and ToInt32 method otherwise) - [] - val inline int32 : value:^T -> int32 when ^T : (static member ToInt32 : ^T -> int32) and default ^T : int - - /// Converts the argument to unsigned 32-bit integer. This is a direct conversion for all - /// primitive numeric types and ToUInt32 method otherwise) - [] - val inline uint32 : value:^T -> uint32 when ^T : (static member ToUInt32 : ^T -> uint32) and default ^T : int - - /// Converts the argument to signed 64-bit integer. This is a direct conversion for all - /// primitive numeric types and ToInt64 method otherwise) - [] - val inline int64 : value:^T -> int64 when ^T : (static member ToInt64 : ^T -> int64) and default ^T : int - - /// Converts the argument to unsigned 64-bit integer. This is a direct conversion for all - /// primitive numeric types and ToUInt64 method otherwise) - [] - val inline uint64 : value:^T -> uint64 when ^T : (static member ToUInt64 : ^T -> uint64) and default ^T : int - - /// Converts the argument to signed native integer. This is a direct conversion for all - /// primitive numeric types and ToIntPtr method otherwise) - [] - val inline nativeint : value:^T -> nativeint when ^T : (static member ToIntPtr : ^T -> nativeint) and default ^T : int - - /// Converts the argument to unsigned native integer. This is a direct conversion for all - /// primitive numeric types and ToUIntPtr method otherwise) - [] - val inline unativeint : value:^T -> unativeint when ^T : (static member ToUIntPtr : ^T -> unativeint) and default ^T : int - - /// Converts the argument to unicode character based on UTF16 encoding (a direct conversion for all - /// primitive numeric types and ToUIntPtr method otherwise) - [] - val inline char : value:^T -> char when ^T : (static member ToChar : ^T -> char) and default ^T : int - - - -namespace Microsoft.FSharp.Control - open Microsoft.FSharp.Core - - /// An exeption type raised when the evaluation of a lazy value recursively depend upon itself - exception Undefined - -#if FX_ATLEAST_40 - - [] - module LazyExtensions = - type System.Threading.LazyInit<'T> with - /// Create a lazy computation that evaluates to the result of the given function when forced - static member Create : creator:(unit -> 'T) -> System.Threading.LazyInit<'T> - /// Create a lazy computation that evaluates to the given value when forced - static member CreateFromValue : value:'T -> System.Threading.LazyInit<'T> - /// Indicates if the lazy value has yet to be computed - [] - member IsDelayed : bool - /// Indicates if the lazy value has been successfully computed - [] - member IsForced : bool - /// Indicates if the lazy value is being computed or the computation raised an exception - [] - member IsException : bool - /// Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to - /// prevent other threads also computing the value. If the value is re-forced during its own computation - /// the Undefined exception is raised. - [] - member Force : unit -> 'T - // Same as Force - [] - member SynchronizedForce : unit -> 'T - /// Same as Force, except no lock is taken. - [] - member UnsynchronizedForce : unit -> 'T - - /// The type of delayed computations. - /// - /// Use the values in the Lazy module to manipulate - /// values of this type, and the notation 'lazy expr' to create values - /// of this type. - type Lazy<'T> = System.Threading.LazyInit<'T> - and 'T ``lazy`` = Lazy<'T> - - -#else - - - /// The type of delayed computations. - /// - /// Use the values in the Lazy module to manipulate - /// values of this type, and the notation 'lazy expr' to create values - /// of this type. - [] - type Lazy <'T> = - /// Indicates if the lazy value has been successfully computed - member IsForced : bool - /// Indicates if the lazy value is being computed or the computation raised an exception - member IsException : bool - /// Indicates if the lazy value has yet to be computed - member IsDelayed : bool - /// Same as Force - member SynchronizedForce : unit -> 'T - /// Same as Force, except no lock is taken. - member UnsynchronizedForce : unit -> 'T - /// Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to - /// prevent other threads also computing the value. If the value is re-forced during its own computation - /// the Undefined exception is raised. - member Force : unit -> 'T - /// Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to - /// prevent other threads also computing the value. - member Value : 'T - /// Create a lazy computation that evaluates to the result of the given function when forced - static member Create : creator:(unit -> 'T) -> Lazy<'T> - /// Create a lazy computation that evaluates to the given value when forced - static member CreateFromValue : value:'T -> Lazy<'T> - /// The type of delayed computations. - /// - /// Use the values in the Lazy module to manipulate - /// values of this type, and the notation 'lazy expr' to create values - /// of this type. - and 'T ``lazy`` = Lazy<'T> -#endif - - - -namespace Microsoft.FSharp.Control - - open Microsoft.FSharp.Core - - /// F# gives special status to non-virtual instance member properties compatible with type IDelegateEvent, - /// generating approriate .NET metadata to make the member appear to other .NET languages as a - /// .NET event. - type IDelegateEvent<'Del when 'Del :> System.Delegate > = - /// Connect a handler delegate object to the event. A handler can - /// be later removed using RemoveHandler. The listener will - /// be invoked when the event is fired. - abstract AddHandler: handler:'Del -> unit - /// Remove a listener delegate from an event listener store - abstract RemoveHandler: handler:'Del -> unit - - ///The family of first class event values for delegate types that satisfy the F# delegate constraint. - type IEvent<'Del,'Args when 'Del : delegate<'Args,unit> and 'Del :> System.Delegate > = - /// Connect a listener function to the event. The listener will - /// be invoked when the event is fired. - abstract Add: callback:('Args -> unit) -> unit - inherit IDelegateEvent<'Del> - - - /// A delegate type associated with the F# event type IEvent<_> - type Handler<'T> = delegate of sender:obj * args:'T -> unit - - /// First-class listening points (i.e. objects that permit you to register a 'callback' - /// activated when the event is triggered). See the module Event - /// for functions to create events. - type IEvent<'T> = IEvent, 'T> - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/printf.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/printf.fs deleted file mode 100644 index 9800cd8e..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/printf.fs +++ /dev/null @@ -1,630 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Text - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Text -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Reflection -open Microsoft.FSharp.Text.StructuredPrintfImpl -open System.Globalization -open System.IO -open System.Text - -type PrintfFormat<'printer,'state,'residue,'result>(value:string) = - member x.Value = value - -type PrintfFormat<'printer,'state,'residue,'result,'tuple>(value:string) = - inherit PrintfFormat<'printer,'state,'residue,'result>(value) - -type Format<'printer,'state,'residue,'result> = PrintfFormat<'printer,'state,'residue,'result> -type Format<'printer,'state,'residue,'result,'tuple> = PrintfFormat<'printer,'state,'residue,'result,'tuple> - -module PrintfImpl = - - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Reflection - open System.Reflection - - type buf = System.Text.StringBuilder - - let string_of_char (c:char) = System.Char.ToString(c) - let string_of_int (i:int) = i.ToString() - - type info = - { mutable leftJustify : bool; - mutable numPrefixIfPos : char option; - mutable addZeros : bool; } - - let outputSignAndLeftSpace(outputChar,info,pos,width,numDigits) = - let used = - if pos then - match info.numPrefixIfPos with - | None -> 0 - | Some _ -> 1 - else 1 - let len = numDigits + used - if not info.leftJustify && not info.addZeros then - match width with - | None -> () - | Some w -> - for i = 1 to (w - len) do - outputChar ' '; - begin - if pos then - match info.numPrefixIfPos with - | None -> () - | Some c -> outputChar c - else outputChar '-'; - end; - if not info.leftJustify && info.addZeros then - match width with - | None -> () - | Some w -> - for i = 1 to (w - len) do - outputChar (if info.addZeros then '0' else ' '); - used - - let decode (c:char) = System.Convert.ToInt32(c) - let encode (x:int) = System.Convert.ToChar(x) - - let outputDigit(outputChar,intFormatChar,digit) = - let digitc = - if digit < 10 - then decode '0' + digit - else decode (if intFormatChar = 'x' then 'a' else 'A') + (digit - 10) - outputChar (encode digitc) - - let outputSpace(outputChar,width,len) = - match width with - | None -> () - | Some width -> - for i = 1 to (width - len) do - outputChar ' '; - - let outputZeros(outputChar,width,len) = - match width with - | None -> () - | Some width -> - for i = 1 to (width - len) do - outputChar '0' - - let outputRightSpace(outputChar,leftJustify,width,len) = - if leftJustify then outputSpace(outputChar,width,len) - - let outputUInt64(outputChar,intFormatChar,width,info,(n:uint64)) = - let nbase = match intFormatChar with 'o' -> 8uL | 'x' | 'X' -> 16uL | _ -> 10uL - let numDigits = - let mutable numDigits = 1 - let mutable nval = n / nbase - while nval > 0UL do - numDigits <- numDigits + 1; - nval <- nval / nbase; - numDigits - let topdiv = - let mutable topdiv = 1UL - for i = 1 to numDigits - 1 do - topdiv <- topdiv * nbase; - topdiv - - let len = numDigits + (outputSignAndLeftSpace(outputChar,info,true,width,numDigits)) - - let mutable residue = n - let mutable divisor = topdiv - while divisor > 0UL do - let digit = residue / divisor - outputDigit(outputChar,intFormatChar, int32(int64 digit)); - residue <- residue % divisor; - divisor <- divisor / nbase; - outputRightSpace(outputChar,info.leftJustify,width,len) - - let outputInt64(outputChar,intFormatChar,width,info,(n:int64)) = - let nbase = match intFormatChar with 'o' -> 8L | 'x' | 'X' -> 16L | _ -> 10L - let numDigits = - let mutable numDigits = 1 - let mutable nval = if n >= 0L then n / nbase else - (n / nbase) - while nval > 0L do - numDigits <- numDigits + 1; - nval <- nval / nbase; - numDigits - let topdiv = - let mutable topdiv = 1L - for i = 1 to numDigits - 1 do - topdiv <- topdiv * nbase; - topdiv - - let len = numDigits + (outputSignAndLeftSpace(outputChar,info,(n >= 0L),width,numDigits) ) - - let mutable residue = - if n = System.Int64.MinValue then System.Int64.MaxValue - elif n < 0L then - n - else n - let mutable divisor = topdiv - while divisor > 0L do - let digit = - if n = System.Int64.MinValue && divisor = 1L - then (match intFormatChar with 'd' | 'i' -> 8L | _ -> 100L) // nb. special case for min_int - else residue / divisor - outputDigit(outputChar,intFormatChar,int32(digit)); - residue <- residue % divisor; - divisor <- divisor / nbase; - outputRightSpace(outputChar,info.leftJustify,width,len) - - // The general technique used this file is to interpret - // a format string and use reflection to construct a function value that matches - // the specification of the format string. - // - // Generics add some serious complications here - we have to generate - // a function value of exactly the right runtime type, though the most - // natural scheme is to produce one of type 'obj -> obj'. We get around - // this by using a semi-reflective approach to creating and invoking - // function values of the right type. This comes with some - // overheads (though they are not too bad) and thus could and should be - // optimized in some special cases, e.g. where a format string - // just contains a single simple format specifier such as '%x' - //type DynamicFunction<'a,'b> = - // static member Make(impl : obj -> obj) : obj = - // box (fun (inp:'a) -> (unbox (impl (box (inp : 'a))) : 'b)) - - //let dynCloMakerTy = typeof>.GetGenericTypeDefinition() - let staticInvokeFlags = BindingFlags.Public ||| BindingFlags.InvokeMethod ||| BindingFlags.Static - let mkFunctionValue (tys: System.Type[]) (impl:obj->obj) = - //let saverTy = dynCloMakerTy.MakeGenericType(tys) - FSharpValue.MakeFunction(FSharpType.MakeFunctionType(tys.[0],tys.[1]), impl) - //saverTy.InvokeMember("Make",staticInvokeFlags,null,null,[| box impl |]) - - let funTyC = typeof<(obj -> obj)>.GetGenericTypeDefinition() - let mkFunTy a b = funTyC.MakeGenericType([| a;b |]) - - let isNamedType(ty:System.Type) = not (ty.IsArray || ty.IsByRef || ty.IsPointer) - let isFunctionType (ty1:System.Type) = - isNamedType(ty1) && ty1.IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(funTyC) - - let rec destFunTy (ty:System.Type) = - if isFunctionType ty then - ty, ty.GetGenericArguments() - else - match ty.BaseType with - | null -> failwith "destFunTy: not a function type" - | b -> destFunTy b - - let instanceInvokeFlags = BindingFlags.Public ||| BindingFlags.InvokeMethod ||| BindingFlags.Instance - let invokeFunctionValue (f:obj) (x:obj) = - let fTy,_ = destFunTy (f.GetType()) -#if FX_NO_CULTURE_INFO_ARGS - fTy.InvokeMember("Invoke",instanceInvokeFlags,(null:Binder),f,[| x |]) -#else - fTy.InvokeMember("Invoke",instanceInvokeFlags,(null:Binder),f,[| x |],CultureInfo.InvariantCulture(*FxCop:1304*)) -#endif - - let buildFunctionForOneArgPat (ty: System.Type) impl = - let _,tys = destFunTy ty - let dty = tys.[0] - let rty = tys.[1] - // PERF: this technique is a bit slow (e.g. in simple cases, like 'sprintf "%x"') - mkFunctionValue tys (fun inp -> impl rty inp) - - let buildFunctionForTwoArgPat args ty i go = - let _,tys1 = destFunTy ty - let rty1 = tys1.[1] - let _,tys2 = destFunTy rty1 - let rty2 = tys2.[1] - mkFunctionValue tys1 (fun inpf -> - mkFunctionValue tys2 (fun inpx -> - go (inpx::inpf::args) rty2 (i+1))) - - let buildFunctionForOneFunArgPat args ty i go = - let _,tys1 = destFunTy ty - let rty1 = tys1.[1] - mkFunctionValue tys1 (fun inpf -> go (inpf::args) rty1 (i+1)) - - let isDigit c = ('0' <= c && c <= '9') - let rec parseFlags info (fmt:string) i = - if i >= fmt.Length then failwith "missing format specifier"; - match fmt.[i] with - | '-' -> info.leftJustify <- true; parseFlags info fmt (i+1) - | '+' -> info.numPrefixIfPos <- Some '+'; parseFlags info fmt (i+1) - | '0' -> info.addZeros <- true; parseFlags info fmt (i+1) - | ' ' -> info.numPrefixIfPos <- Some ' '; parseFlags info fmt (i+1) - | '#' -> failwith "The # formatting modifier is invalid in F#"; - | _ -> i - - let rec parseDigitsPrecision (fmt:string) len i = - if i >= len then failwith "bad format specifier (precision)"; - match fmt.[i] with - | c when isDigit c -> parseDigitsPrecision fmt len (i+1) - | _ -> i - - let parsePrecision (fmt:string) len i = - if i >= len then failwith "bad format specifier (precision)"; - match fmt.[i] with - | c when isDigit c -> false,parseDigitsPrecision fmt len (i+1) - | '*' -> true,(i+1) - | _ -> false,i - - let rec parseSliceDotAndPrecision (fmt:string) len i = - match fmt.[i] with - | '.' -> - let w1 = i - let precisionArg,i = parsePrecision fmt len (i+1) - w1,Some (precisionArg,i),i - | _ -> i,None,i - - let rec parseSliceWidthAndPrecision (fmt:string) len i = - if i >= len then failwith "bad format specifier (width)"; - match fmt.[i] with - | c when isDigit c -> parseSliceWidthAndPrecision fmt len (i+1) - | '*' -> true,parseSliceDotAndPrecision fmt len (i+1) - | _ -> false,parseSliceDotAndPrecision fmt len i - - let invariantCulture = System.Globalization.CultureInfo.InvariantCulture - let parseWidthAndPrecision fmt len i = - let w0 = i - let widthArg,(w1,w2,i) = parseSliceWidthAndPrecision fmt len i - let width = - if (w0 = w1) then None - elif widthArg then Some(None) - else Some (Some(System.Int32.Parse (fmt.[w0..w1-1],invariantCulture)) ) - let precision = - match w2 with - | None -> None - | Some (precisionArg,w2') -> - if precisionArg then Some(None) - else Some (Some(System.Int32.Parse (fmt.[w1+1..w2'-1],invariantCulture)) ) - width,precision,i - - let newInfo ()= - { leftJustify = false; - numPrefixIfPos = None; - addZeros = false; } - - let defaultInfo = newInfo() - - let formatString outputChar info width (s:string) isNum = - match s with - | null -> outputSpace(outputChar,width,0) - | _ -> - if not info.leftJustify then - if isNum && info.addZeros then outputZeros(outputChar,width,s.Length) - else outputSpace(outputChar,width,s.Length); - s |> String.iter outputChar; - if info.leftJustify then - if isNum && info.addZeros then outputZeros(outputChar,width,s.Length) - else outputSpace(outputChar,width,s.Length) - - let capture1 (fmt:string) i args ty (go : obj list -> System.Type -> int -> obj) : obj = - let info = newInfo() - let len = fmt.Length - let i = parseFlags info fmt i - let width,precision,i = parseWidthAndPrecision fmt len i - let intFormatChar = fmt.[i] - - let captureCoreArgs args ty = - match intFormatChar with - | '%' -> go args ty (i+1) - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'l' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - | 'n' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - | 'L' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - - | 'U' -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'l' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - | 'n' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - | 'L' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - | _ -> failwith "bad format specifier (after U)" - - | 'f' | 'F' | 'e' | 'E' | 'g' | 'G' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'M' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 's' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'c' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'b' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'O' -> buildFunctionForOneArgPat ty (fun rty xobj -> go (xobj::args) rty (i+1)) - | 'A' -> buildFunctionForOneArgPat ty (fun rty xobj -> go (xobj::args) rty (i+1)) - | 'a' -> buildFunctionForTwoArgPat args ty i go - | 't' -> buildFunctionForOneFunArgPat args ty i go - | _ -> failwith "bad format specifier" - let capturePrecisionArg args ty = - match precision with - | None | Some(Some _) -> captureCoreArgs args ty - | Some(None) -> buildFunctionForOneArgPat ty (fun rty n -> captureCoreArgs (n :: args) rty) - let captureWidthArg args ty = - match width with - | None | Some(Some _) -> capturePrecisionArg args ty - | Some(None) -> buildFunctionForOneArgPat ty (fun rty n -> capturePrecisionArg (n :: args) rty) - captureWidthArg args ty - - - let unboxAsInt64 (n:obj) = - match n with - | :? sbyte as x -> x |> int64 - | :? int16 as x -> x |> int64 - | :? int32 as x -> x |> int64 - | :? nativeint as x -> x |> int64 - | :? int64 as x -> x - | :? byte as x -> x |> uint64 |> int64 - | :? uint16 as x -> x |> uint64 |> int64 - | :? uint32 as x -> x |> uint64 |> int64 - | :? uint64 as x -> x |> int64 - | :? unativeint as x -> x |> uint64 |> int64 - | _ -> failwith "bad integer supplied to dynamic formatter" - - let unboxAsUInt64 (n:obj) = - let unsigned = - match n with - | :? sbyte as x -> x |> byte |> box - | :? int16 as x -> x |> uint16 |> box - | :? int32 as x -> x |> uint32 |> box - | :? int64 as x -> x |> uint64 |> box - | :? nativeint as x -> x |> unativeint |> box - | _ -> n - unboxAsInt64 unsigned |> uint64 - - let format_one (outa: 'c -> unit) (outputChar: char -> unit) (os : 'b) (fmt:string) i args : (int * obj list) = - let info = newInfo() - let len = fmt.Length - let i = parseFlags info fmt i - let width,precision,i = parseWidthAndPrecision fmt len i - let intFormatChar = fmt.[i] - - let width,args = - match width,args with - | None,args -> None,args - | Some(Some w),args -> Some w,args - | Some(None),n::args -> Some (unbox n), args - | _ -> failwith "expected a width argument" - - let precision,args = - match precision,args with - | None,args -> None,args - | Some(Some w),args -> Some w,args - | Some(None),n::args -> Some (unbox n), args - | _ -> failwith "expected a precision argument" - - match intFormatChar,args with - | '%',args -> - outputChar intFormatChar; i+1, args - | ('d' | 'i'),n::args -> - match n with - | (:? byte | :? uint16 | :? uint32 | :? uint64 | :? unativeint) -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - | _ -> - outputInt64(outputChar,intFormatChar,width,info,(unboxAsInt64 n)); - i+1,args - | ('o' | 'u' | 'x' | 'X'),n::args -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | ('l' | 'L'),n::args -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' -> - outputInt64(outputChar,intFormatChar,width,info,(unboxAsInt64 n)); - i+1,args - | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | _ -> failwith "bad format specifier (after n)" - | 'n',n::args -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' -> - outputInt64(outputChar,intFormatChar,width,info,(unboxAsInt64 n)); - i+1,args - | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | _ -> failwith "bad format specifier (after l)" - | 'U',n::args -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | 'l' -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | _ -> failwith "bad format specifier (after Ul)" - | 'n' -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | _ -> failwith "bad format specifier (after Un)" - | 'L' -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | _ -> failwith "bad format specifier (after UL)" - | _ -> failwith "bad format specifier (after U)" - - | ('f' | 'F' | 'e' | 'E' | 'g' | 'G'),n::args -> - let s, number, positive = - match n with - | :? float as f -> f.ToString(string_of_char intFormatChar + (match precision with None -> "6" | Some n -> string_of_int (max (min n 99) 0)),invariantCulture), not (f = infinity || f = -infinity || System.Double.IsNaN f), f >= 0. - | :? float32 as f -> f.ToString(string_of_char intFormatChar + (match precision with None -> "6" | Some n -> string_of_int (max (min n 99) 0)),invariantCulture), not (f = infinityf || f = -infinityf || System.Single.IsNaN f), f >= 0.f - | :? decimal as f -> f.ToString(string_of_char intFormatChar + (match precision with None -> "6" | Some n -> string_of_int (max (min n 99) 0)),invariantCulture), true, f >= 0M - | _ -> failwith "bad float value" - - let s = match info.numPrefixIfPos with Some c when positive -> string_of_char c + s | _ -> s - formatString outputChar info width s number; - i+1,args - | 'M',n::args -> - let d = (unbox n : System.Decimal) - let s = d.ToString("G",invariantCulture) - let s = match info.numPrefixIfPos with Some c when d >= 0M -> string_of_char c + s | _ -> s - formatString outputChar info width s true; - i+1,args - | 's',nobj::args -> formatString outputChar info width (unbox nobj) false; i+1,args - | 'c',nobj::args -> outputChar (unbox nobj); i+1,args - | 'b',nobj::args -> formatString outputChar info width (if (unbox nobj) then "true" else "false") false; i+1,args - | 'O',xobj::args -> formatString outputChar info width (match xobj with null -> "" | _ -> xobj.ToString()) false; i+1,args - | 'A',xobj::args -> - let bindingFlags = - match info.numPrefixIfPos with - | None -> BindingFlags.Public // Default see Public only - | Some '+' -> BindingFlags.Public ||| BindingFlags.NonPublic // %+A, sees anything possible - | Some c -> failwith ("internal: %A has an unexpected numeric prefix '" ^ string c ^ "'") - let opts = FormatOptions.Default - let opts = match width with None -> opts | Some w -> { opts with PrintWidth = w } - // printfn %0A is considered to mean 'print width zero' - let opts = if info.addZeros then { opts with PrintWidth = 0 } else opts - - let opts = match precision with None -> opts | Some w -> { opts with PrintSize = w } - let txt = - match xobj with - | null -> "" - | _ -> - Display.printf_any_to_string opts bindingFlags xobj - - txt |> String.iter outputChar; - i+1,args - | 'a',fobj::xobj::args -> - outa (unbox (invokeFunctionValue (invokeFunctionValue fobj (box os)) xobj)); - i+1,args - | 't',f::args -> outa ((unbox f) os); i+1,args - | _ -> failwith "bad format specifier" - - - let gprintf (initialize : unit -> 'b * ('c -> unit) * (char -> unit) * (unit -> 'd)) (fmt : PrintfFormat<'a,'b,'c,'d>) : 'a = - let fmt = fmt.Value - match fmt with - // optimize some common cases - | "%s" -> unbox (box (fun (s:string) -> let os,outa,outputChar,finalize = initialize() in formatString outputChar defaultInfo None s false; finalize())) - // | "%x" -> unbox (box (fun (n:int) -> let os,outa,outputChar,finalize = initialize() in outputUInt64 outputChar 'x' None defaultInfo (int32_to_uint64 n); finalize())) - // | "%d" -> unbox (box (fun (n:int) -> let os,outa,outputChar,finalize = initialize() in outputInt64 outputChar 'd' None defaultInfo (int32_to_int64 n); finalize())) - | _ -> - let len = fmt.Length - - /// After all arguments are captures we reinterpret and execute the actions - let run args = - let os,outa,outputChar,finalize = initialize() - let rec go args i = - if i >= len || (fmt.[i] = '%' && i+1 >= len) then (box (finalize())) - elif System.Char.IsSurrogatePair(fmt,i) then - outputChar fmt.[i]; - outputChar fmt.[i+1]; - go args (i+2) - else - - match fmt.[i] with - | '%' -> - let i,args = format_one outa outputChar os fmt (i+1) args - go args i - | c -> - outputChar c; go args (i+1) - go args 0 - - /// Function to capture the arguments and then run. - let rec capture args ty i = - if i >= len || (fmt.[i] = '%' && i+1 >= len) then - run (List.rev args) - elif System.Char.IsSurrogatePair(fmt,i) then - capture args ty (i+2) - else - match fmt.[i] with - | '%' -> - let i = i+1 - capture1 fmt i args ty capture - | c -> - capture args ty (i+1) - - (unbox (capture [] (typeof<'a>) 0) : 'a) - -module Printf = - - open System.Text - open System.Diagnostics - open PrintfImpl - - // These indicate the final type returned - type BuilderFormat<'a,'d> = Format<'a, StringBuilder, unit, 'd> - type StringFormat<'a,'d> = Format<'a, unit, string, 'd> - type TextWriterFormat<'a,'d> = Format<'a, TextWriter, unit, 'd> - - // These fix the final type returned - type BuilderFormat<'a> = BuilderFormat<'a,unit> - type StringFormat<'a> = StringFormat<'a,string> - type TextWriterFormat<'a> = TextWriterFormat<'a,unit> - - - [] - let ksprintf (f : string -> 'd) (fp : StringFormat<'a,'d>) = - let init () = - let buf = new StringBuilder() - let outputChar (c:char) = ignore (buf.Append(c)) - let outa (s:string) = ignore (buf.Append(s)) - let finish () = f (buf.ToString()) - (),outa,outputChar,finish - PrintfImpl.gprintf init fp - - [] - let kprintf f fmt = ksprintf f fmt - - let kprintf_imperative f handle outputChar fmt = - let init () = - let outa () = () - handle,outa,outputChar,f - PrintfImpl.gprintf init fmt - - [] - let kbprintf f (buf: StringBuilder) fmt = kprintf_imperative f buf (fun c -> ignore (buf.Append(c))) fmt - - [] - let ktwprintf f os fmt = kprintf_imperative f (os :> TextWriter) (fun c -> ignore (os.Write(c))) fmt - - [] - let kfprintf f (os:TextWriter) fmt = ktwprintf f os fmt - - [] - let sprintf fmt = ksprintf (fun x -> x) fmt - - [] - let failwithf fmt = ksprintf failwith fmt - - [] - let bprintf buf fmt = kbprintf (fun _ -> ()) buf fmt - - [] - let fprintf (os: TextWriter) fmt = kfprintf (fun _ -> ()) os fmt - - [] - let fprintfn (os: TextWriter) fmt = kfprintf (fun _ -> os.WriteLine()) os fmt - - [] - let twprintf os fmt = ktwprintf (fun _ -> ()) os fmt - - [] - let twprintfn (os : TextWriter) fmt = ktwprintf (fun _ -> os.WriteLine()) os fmt - - [] - let printf fmt = fprintf System.Console.Out fmt - - [] - let eprintf fmt = fprintf System.Console.Error fmt - - [] - let printfn fmt = fprintfn System.Console.Out fmt - - [] - let eprintfn fmt = fprintfn System.Console.Error fmt - - // FxCop suppressions (pending) - do() diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/printf.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/printf.fsi deleted file mode 100644 index b19b9d91..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/printf.fsi +++ /dev/null @@ -1,220 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// This namespace contains types and modules for generating and formatting text with F# -namespace Microsoft.FSharp.Text - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections -open System.IO -open System.Text - -/// Type of a formatting expression. -/// 'Printer : function type generated by printf -/// 'State: type argument passed to %a formatters -/// 'Residue: value generated by the overall printf action (e.g. sprint generates a string) -/// 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) -type PrintfFormat<'Printer,'State,'Residue,'Result> = - /// Construct a format string - new : value:string -> PrintfFormat<'Printer,'State,'Residue,'Result> - /// The raw text of the format string - member Value : string - -/// Type of a formatting expression. -/// 'Printer : function type generated by printf -/// 'State: type argument passed to %a formatters -/// 'Residue: value generated by the overall printf action (e.g. sprint generates a string) -/// 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) -/// 'Tuple: tuple of values generated by scan or match -type PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> = - inherit PrintfFormat<'Printer,'State,'Residue,'Result> - /// Construct a format string - new: value:string -> PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> - -/// Type of a formatting expression -/// 'Printer : function type generated by printf -/// 'State: type argument passed to %a formatters -/// 'Residue: value generated by the overall printf action (e.g. sprint generates a string) -/// 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) -type Format<'Printer,'State,'Residue,'Result> = PrintfFormat<'Printer,'State,'Residue,'Result> - -/// Type of a formatting expression -/// 'Printer : function type generated by printf -/// 'State: type argument passed to %a formatters -/// 'Residue: value generated by the overall printf action (e.g. sprint generates a string) -/// 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) -/// 'Tuple: tuple of values generated by scan or match -type Format<'Printer,'State,'Residue,'Result,'Tuple> = PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> - -/// Extensible printf-style formatting for numbers and other datatypes -/// -/// Format specifications are strings with "%" markers indicating format -/// placeholders. Format placeholders consist of: -/// -/// %[flags][width][.precision][type] -/// -/// where the type is interpreted as follows: -/// -/// %b: bool, formatted as "true" or "false" -/// %s: string, formatted as its unescaped contents -/// %d, %i: any basic integer type formatted as a decimal integer, signed if the basic integer type is signed. -/// %u: any basic integer type formatted as an unsigned decimal integer -/// %x, %X, %o: any basic integer type formatted as an unsigned hexadecimal -/// (a-f)/Hexadecimal (A-F)/Octal integer -/// -/// %e, %E, %f, %F, %g, %G: -/// any basic floating point type (float,float32) formatted -/// using a C-style floating point format specifications, i.e -/// -/// %e, %E: Signed value having the form [-]d.dddde[sign]ddd where -/// d is a single decimal digit, dddd is one or more decimal -/// digits, ddd is exactly three decimal digits, and sign -/// is + or - -/// -/// %f: Signed value having the form [-]dddd.dddd, where dddd is one -/// or more decimal digits. The number of digits before the -/// decimal point depends on the magnitude of the number, and -/// the number of digits after the decimal point depends on -/// the requested precision. -/// -/// %g, %G: Signed value printed in f or e format, whichever is -/// more compact for the given value and precision. -/// -/// -/// %M: System.Decimal value -/// -/// %O: Any value, printed by boxing the object and using it's ToString method(s) -/// -/// %A: Any value, printed by using Microsoft.FSharp.Text.StructuredPrintfImpl.Display.any_to_string with the default layout settings -/// -/// %a: A general format specifier, requires two arguments: -/// (1) a function which accepts two arguments: -/// (a) a context parameter of the appropriate type for the -/// given formatting function (e.g. an #System.IO.TextWriter) -/// (b) a value to print -/// and which either outputs or returns appropriate text. -/// -/// (2) the particular value to print -/// -/// -/// %t: A general format specifier, requires one argument: -/// (1) a function which accepts a context parameter of the -/// appropriate type for the given formatting function (e.g. -/// an System.IO.TextWriter)and which either outputs or returns -/// appropriate text. -/// -/// Basic integer types are: -/// byte,sbyte,int16,uint16,int32,uint32,int64,uint64,nativeint,unativeint -/// Basic floating point types are: -/// float, float32 -/// -/// The following format patterns are accepted but a warning is printed: -/// -/// %h(d|u|x|X|o) -/// %l(d|u|x|X|o) -/// -/// The following format patterns are now deprecated: -/// -/// %Ld, %Li, %Lu, %Lx, %LX, %Lo: same, but an int64 -/// %nd, %ni, %nu, %nx, %nX, %no: same, but a nativeint -/// %Ud, %Ui, %Uu, %Ux, %UX, %Uo: same, but an unsigned int32 (uint32) -/// %ULd, %ULi, %ULu, %ULx, %ULX, %ULo: same, but an unsigned int64 (uint64) -/// %Und, %Uni, %Unu, %Unx, %UnX, %Uno: same, but an unsigned nativeint (unativeint) -/// -/// The optional width is an integer indicating the minimal width of the -/// result. For instance, %6d prints an integer, prefixing it with spaces -/// to fill at least 6 characters. If width is '*', then an extra integer -/// argument is taken to specify the corresponding width. -/// -/// any number -/// '*': -/// -/// Valid flags are: -/// -/// 0: add zeros instead of spaces to make up the required width -/// '-': left justify the result within the width specified -/// '+': add a '+' character if the number is positive (to match a '-' sign -/// for negatives) -/// ' ': add an extra space if the number is positive (to match a '-' -/// sign for negatives) -/// -/// The printf '#' flag is invalid and a compile-time error will be reported if it is used. -module Printf = - - /// Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The first type parameter indicates the - /// arguments of the format operation and the last the overall return type. - type BuilderFormat<'T,'Result> = Format<'T, StringBuilder, unit, 'Result> - /// Represents a statically-analyzed format when formatting builds a string. The first type parameter indicates the - /// arguments of the format operation and the last the overall return type. - type StringFormat<'T,'Result> = Format<'T, unit, string, 'Result> - /// Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The first type parameter indicates the - /// arguments of the format operation and the last the overall return type. - type TextWriterFormat<'T,'Result> = Format<'T, TextWriter, unit, 'Result> - - /// Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The type parameter indicates the - /// arguments and return type of the format operation. - type BuilderFormat<'T> = BuilderFormat<'T,unit> - /// Represents a statically-analyzed format when formatting builds a string. The type parameter indicates the - /// arguments and return type of the format operation. - type StringFormat<'T> = StringFormat<'T,string> - /// Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The type parameter indicates the - /// arguments and return type of the format operation. - type TextWriterFormat<'T> = TextWriterFormat<'T,unit> - - /// Print to a System.Text.StringBuilder - val bprintf : builder:StringBuilder -> format:BuilderFormat<'T> -> 'T - - /// Print to a text writer or an OCaml-compatible channel - val fprintf : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T - - /// Print to a text writer or an OCaml-compatible channel, adding a newline - val fprintfn : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T - - /// Print to any subtype of the .NET type System.IO.TextWriter - val twprintf : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T - - /// Print to any subtype of the .NET type System.IO.TextWriter, and add a newline - val twprintfn : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T - - /// Formatted printing to stderr - val eprintf : format:TextWriterFormat<'T> -> 'T - - /// Formatted printing to stderr, adding a newline - val eprintfn : format:TextWriterFormat<'T> -> 'T - - /// Formatted printing to stdout - val printf : format:TextWriterFormat<'T> -> 'T - - /// Formatted printing to stdout, adding a newline - val printfn : format:TextWriterFormat<'T> -> 'T - - /// Print to a string via an internal string buffer and return - /// the result as a string. Helper printers must return strings. - val sprintf : format:StringFormat<'T> -> 'T - - /// bprintf, but call the given 'final' function to generate the result. - /// See kprintf. - val kbprintf : continutation:(unit -> 'Result) -> builder:StringBuilder -> format:BuilderFormat<'T,'Result> -> 'T - - /// fprintf, but call the given 'final' function to generate the result. - /// See kprintf. - val kfprintf : continutation:(unit -> 'Result) -> textWriter:TextWriter -> format:TextWriterFormat<'T,'Result> -> 'T - - /// printf, but call the given 'final' function to generate the result. - /// For example, these let the printing force a flush after all output has - /// been entered onto the channel, but not before. - val kprintf : continutation:(string -> 'Result) -> format:StringFormat<'T,'Result> -> 'T - - /// twprintf, but call the given 'final' function to generate the result. - /// See kprintf. - val ktwprintf : continutation:(unit -> 'Result) -> textWriter:TextWriter -> format:TextWriterFormat<'T,'Result> -> 'T - - /// sprintf, but call the given 'final' function to generate the result. - /// See kprintf. - val ksprintf : continutation:(string -> 'Result) -> format:StringFormat<'T,'Result> -> 'T - - /// Print to a string buffer and raise an exception with the given - /// result. Helper printers must return strings. - val failwithf: format:StringFormat<'T,'Result> -> 'T - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/quotations.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/quotations.fs deleted file mode 100644 index 030f9cc0..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/quotations.fs +++ /dev/null @@ -1,1558 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Quotations - -#if FX_MINIMAL_REFLECTION -#else -open System -open System.IO -open System.Reflection -open System.Collections.Generic -open Microsoft.FSharp -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Primitives.Basics -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Reflection -open Microsoft.FSharp.Text -open Microsoft.FSharp.Text.Printf -open Microsoft.FSharp.Text.StructuredPrintfImpl -open Microsoft.FSharp.Text.StructuredPrintfImpl.LayoutOps - -//-------------------------------------------------------------------------- -// RAW quotations - basic data types -//-------------------------------------------------------------------------- - -module Helpers = - let qOneOrMoreRLinear q inp = - let rec queryAcc rvs e = - match q e with - | Some(v,body) -> queryAcc (v::rvs) body - | None -> - match rvs with - | [] -> None - | _ -> Some(List.rev rvs,e) - queryAcc [] inp - - let qOneOrMoreLLinear q inp = - let rec queryAcc e rvs = - match q e with - | Some(body,v) -> queryAcc body (v::rvs) - | None -> - match rvs with - | [] -> None - | _ -> Some(e,rvs) - queryAcc inp [] - - let mkRLinear mk (vs,body) = List.foldBack (fun v acc -> mk(v,acc)) vs body - let mkLLinear mk (body,vs) = List.fold (fun acc v -> mk(acc,v)) body vs - - let staticBindingFlags = BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly - let staticOrInstanceBindingFlags = BindingFlags.Instance ||| BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly - let instanceBindingFlags = BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly - let publicOrPrivateBindingFlags = System.Reflection.BindingFlags.Public ||| System.Reflection.BindingFlags.NonPublic - - let isDelegateType (typ:Type) = - if typ.IsSubclassOf(typeof) then - match typ.GetMethod("Invoke", instanceBindingFlags) with - | null -> false - | _ -> true - else - false - - let getDelegateInvoke ty = - if not (isDelegateType(ty)) then invalidArg "ty" "Expecting delegate type" - ty.GetMethod("Invoke", instanceBindingFlags) - -open Helpers - - - -[] -[] -type Var(name: string, typ:Type, ?isMutable: bool) = - - inherit obj() - static let mutable lastStamp = 0L - static let globals = new Dictionary<(string*Type),Var>(11) - - let stamp = lastStamp - let isMutable = defaultArg isMutable false - do lock globals (fun () -> lastStamp <- lastStamp + 1L) - - member v.Name = name - member v.IsMutable = isMutable - member v.Type = typ - member v.Stamp = stamp - - static member Global(nm,typ: Type) = - lock globals (fun () -> - let mutable res = Unchecked.defaultof - let ok = globals.TryGetValue((nm,typ),&res) - if ok then res else - let res = new Var(nm,typ) - globals.[((nm,typ))] <- res - res) - - override v.ToString() = name - override v.GetHashCode() = base.GetHashCode() - override v.Equals(obj:obj) = - match obj with - | :? Var as v2 -> System.Object.ReferenceEquals(v,v2) - | _ -> false - - interface System.IComparable with - member v.CompareTo(obj:obj) = - match obj with - | :? Var as v2 -> - if System.Object.ReferenceEquals(v,v2) then 0 else - let c = compare v.Name v2.Name in - if c <> 0 then c else -#if FX_NO_REFLECTION_METADATA_TOKENS // not available on Compact Framework -#else - let c = compare v.Type.MetadataToken v2.Type.MetadataToken in - if c <> 0 then c else - let c = compare v.Type.Module.MetadataToken v2.Type.Module.MetadataToken in - if c <> 0 then c else -#endif - let c = compare v.Type.Assembly.FullName v2.Type.Assembly.FullName in - if c <> 0 then c else - compare v.Stamp v2.Stamp - | _ -> 0 - -/// Represents specifications of a subset of F# expressions -[] -type Tree = - | CombTerm of ExprConstInfo * Expr list - | VarTerm of Var - | LambdaTerm of Var * Expr - | HoleTerm of Type * int - -and - [] - ExprConstInfo = - | AppOp - | IfThenElseOp - | LetRecOp - | LetRecCombOp - | LetOp - | NewRecordOp of Type - | NewUnionCaseOp of UnionCaseInfo - | UnionCaseTestOp of UnionCaseInfo - | NewTupleOp of Type - | TupleGetOp of Type * int - | InstancePropGetOp of PropertyInfo - | StaticPropGetOp of PropertyInfo - | InstancePropSetOp of PropertyInfo - | StaticPropSetOp of PropertyInfo - | InstanceFieldGetOp of FieldInfo - | StaticFieldGetOp of FieldInfo - | InstanceFieldSetOp of FieldInfo - | StaticFieldSetOp of FieldInfo - | NewObjectOp of ConstructorInfo - | InstanceMethodCallOp of MethodInfo - | StaticMethodCallOp of MethodInfo - | CoerceOp of Type - | NewArrayOp of Type - | NewDelegateOp of Type - | QuoteOp - | SequentialOp - | AddressOfOp - | VarSetOp - | AddressSetOp - | TypeTestOp of Type - | TryWithOp - | TryFinallyOp - | ForIntegerRangeLoopOp - | WhileLoopOp - // Arbitrary spliced values - not serialized - | ValueOp of obj * Type - | DefaultValueOp of Type - -and Expr(term:Tree,attribs:Expr list) = - member x.Tree = term - member x.CustomAttributes = attribs - override x.Equals(obj:obj) = - match obj with - | :? Expr as yt -> x.Tree = yt.Tree - | _ -> false - - override x.GetHashCode() = - x.Tree.GetHashCode() - - override x.ToString() = - Microsoft.FSharp.Text.StructuredPrintfImpl.Display.layout_to_string Microsoft.FSharp.Text.StructuredPrintfImpl.FormatOptions.Default (x.GetLayout()) - - member x.GetLayout() = - let expr (e:Expr ) = e.GetLayout() - let exprs (es:Expr list) = es |> List.map expr - let parens ls = bracketL (commaListL ls) - let pairL l1 l2 = bracketL (l1 $$ sepL "," $$ l2) - let listL ls = squareBracketL (commaListL ls) - let combL nm ls = wordL nm $$ parens ls - let noneL = wordL "None" - let someL e = combL "Some" [expr e] - let typeL (o: Type) = wordL o.FullName - let objL (o: 'T) = wordL (sprintf "%A" o) - let varL (v:Var) = wordL v.Name - let (|E|) (e: Expr) = e.Tree - let (|Lambda|_|) (E x) = match x with LambdaTerm(a,b) -> Some (a,b) | _ -> None - let (|IteratedLambda|_|) (e: Expr) = qOneOrMoreRLinear (|Lambda|_|) e - - let rec (|NLambdas|_|) n (e:Expr) = - match e with - | _ when n <= 0 -> Some([],e) - | Lambda(v,NLambdas ((-) n 1) (vs,b)) -> Some(v::vs,b) - | _ -> None - - match x.Tree with - | CombTerm(AppOp,args) -> combL "Application" (exprs args) - | CombTerm(IfThenElseOp,args) -> combL "IfThenElse" (exprs args) - | CombTerm(LetRecOp,[IteratedLambda(vs,E(CombTerm(LetRecCombOp,b2::bs)))]) -> combL "LetRec" [listL (List.map2 pairL (List.map varL vs) (exprs bs) ); b2.GetLayout()] - | CombTerm(LetOp,[e;E(LambdaTerm(v,b))]) -> combL "Let" [varL v; e.GetLayout(); b.GetLayout()] - | CombTerm(NewRecordOp(ty),args) -> combL "NewRecord" (typeL ty :: exprs args) - | CombTerm(NewUnionCaseOp(ucinfo),args) -> combL "NewUnionCase" (objL ucinfo :: exprs args) - | CombTerm(UnionCaseTestOp(ucinfo),args) -> combL "UnionCaseTest" (exprs args@ [objL ucinfo]) - | CombTerm(NewTupleOp(ty),args) -> combL "NewTuple" (exprs args) - | CombTerm(TupleGetOp(ty,i),[arg]) -> combL "TupleGet" ([expr arg] @ [objL i]) - | CombTerm(ValueOp(v,ty),[]) -> combL "Value" [objL v] - | CombTerm(InstanceMethodCallOp(minfo),obj::args) -> combL "Call" [someL obj; objL minfo; listL (exprs args)] - | CombTerm(StaticMethodCallOp(minfo),args) -> combL "Call" [noneL; objL minfo; listL (exprs args)] - | CombTerm(InstancePropGetOp(pinfo),(obj::args)) -> combL "PropGet" [someL obj; objL pinfo; listL (exprs args)] - | CombTerm(StaticPropGetOp(pinfo),args) -> combL "PropGet" [noneL; objL pinfo; listL (exprs args)] - | CombTerm(InstancePropSetOp(pinfo),(obj::args)) -> combL "PropSet" [someL obj; objL pinfo; listL (exprs args)] - | CombTerm(StaticPropSetOp(pinfo),args) -> combL "PropSet" [noneL; objL pinfo; listL (exprs args)] - | CombTerm(InstanceFieldGetOp(finfo),[obj]) -> combL "FieldGet" [someL obj; objL finfo] - | CombTerm(StaticFieldGetOp(finfo),[]) -> combL "FieldGet" [noneL; objL finfo] - | CombTerm(InstanceFieldSetOp(finfo),[obj;v]) -> combL "FieldSet" [someL obj; objL finfo; expr v;] - | CombTerm(StaticFieldSetOp(finfo),[v]) -> combL "FieldSet" [noneL; objL finfo; expr v;] - | CombTerm(CoerceOp(ty),[arg]) -> combL "Coerce" [ expr arg; typeL ty] - | CombTerm(NewObjectOp minfo,args) -> combL "NewObject" ([ objL minfo ] @ exprs args) - | CombTerm(DefaultValueOp(ty),args) -> combL "DefaultValue" ([ typeL ty ] @ exprs args) - | CombTerm(NewArrayOp(ty),args) -> combL "NewArray" ([ typeL ty ] @ exprs args) - | CombTerm(TypeTestOp(ty),args) -> combL "TypeTest" ([ typeL ty] @ exprs args) - | CombTerm(AddressOfOp,args) -> combL "AddressOf" (exprs args) - | CombTerm(VarSetOp,[E(VarTerm(v)); e]) -> combL "VarSet" [varL v; expr e] - | CombTerm(AddressSetOp,args) -> combL "AddressSet" (exprs args) - | CombTerm(ForIntegerRangeLoopOp,[e1;e2;E(LambdaTerm(v,e3))]) -> combL "ForIntegerRangeLoop" [varL v; expr e1; expr e2; expr e3] - | CombTerm(WhileLoopOp,args) -> combL "WhileLoop" (exprs args) - | CombTerm(TryFinallyOp,args) -> combL "TryFinally" (exprs args) - | CombTerm(TryWithOp,[e1;Lambda(v1,e2);Lambda(v2,e3)]) -> combL "TryWith" [expr e1; varL v1; expr e2; varL v2; expr e3] - | CombTerm(SequentialOp,args) -> combL "Sequential" (exprs args) - | CombTerm(NewDelegateOp(ty),[e]) -> - let n = (getDelegateInvoke ty).GetParameters().Length - match e with - | NLambdas n (vs,e) -> combL "NewDelegate" ([typeL ty] @ (vs |> List.map varL) @ [expr e]) - | _ -> combL "NewDelegate" ([typeL ty; expr e]) - //| CombTerm(_,args) -> combL "??" (exprs args) - | VarTerm(v) -> wordL v.Name - | LambdaTerm(v,b) -> combL "Lambda" [wordL v.Name; expr b] - | HoleTerm _ -> wordL "_" - | CombTerm(QuoteOp,args) -> combL "Quote" (exprs args) - | _ -> failwithf "Unexpected term in layout %A" x.Tree - - -type Expr<'T>(term:Tree,attribs) = - inherit Expr(term,attribs) - member x.Raw = (x :> Expr) - -[] -module Patterns = - - /// Represents a deserialized object that is yet to be instantiated. Representation is - /// as a computation. - type Instantiable<'T> = (int -> Type) -> 'T - - type ByteStream(bytes:byte[],initial:int,len:int) = - - let mutable pos = initial - let lim = initial + len - - member b.ReadByte() = - if pos >= lim then failwith "end of stream"; - let res = int32 bytes.[pos] - pos <- pos + 1; - res - - member b.ReadBytes n = - if pos + n > lim then failwith "ByteStream.ReadBytes: end of stream"; - let res = bytes.[pos..pos+n-1] - pos <- pos + n; - res - - member b.ReadUtf8BytesAsString n = - let res = System.Text.Encoding.UTF8.GetString(bytes,pos,n) - pos <- pos + n; - res - - - let E t = Expr< >(t,[]) - let EA (t,attribs) = Expr< >(t,attribs) - let ES ts = List.map E ts - - let (|E|) (e: Expr) = e.Tree - let (|ES|) (es: list) = es |> List.map (fun e -> e.Tree) - - - - let funTyC = typeof<(obj -> obj)>.GetGenericTypeDefinition() - let exprTyC = typedefof> - let checkVoid a = if a = typeof then typeof else a - let mkFunTy a b = - let (a, b) = checkVoid a, checkVoid b - funTyC.MakeGenericType([| a;b |]) - - let mkArrayTy (t:Type) = t.MakeArrayType(); - let mkExprTy (t:Type) = exprTyC.MakeGenericType([| t |]) - - - //-------------------------------------------------------------------------- - // Active patterns for decomposing quotations - //-------------------------------------------------------------------------- - - let (|Comb0|_|) (E x) = match x with CombTerm(k,[]) -> Some(k) | _ -> None - let (|Comb1|_|) (E x) = match x with CombTerm(k,[x]) -> Some(k,x) | _ -> None - let (|Comb2|_|) (E x) = match x with CombTerm(k,[x1;x2]) -> Some(k,x1,x2) | _ -> None - let (|Comb3|_|) (E x) = match x with CombTerm(k,[x1;x2;x3]) -> Some(k,x1,x2,x3) | _ -> None - - let (|Var|_|) (E x) = match x with VarTerm v -> Some v | _ -> None - let (|Application|_|) x = match x with Comb2(AppOp,a,b) -> Some (a,b) | _ -> None - let (|Lambda|_|) (E x) = match x with LambdaTerm(a,b) -> Some (a,b) | _ -> None - - let (|Quote|_|) (E x) = match x with CombTerm(QuoteOp,[a]) -> Some (a) | _ -> None - let (|IfThenElse|_|) = function Comb3(IfThenElseOp,e1,e2,e3) -> Some(e1,e2,e3) | _ -> None - - let (|NewTuple|_|) = function E(CombTerm(NewTupleOp(_),es)) -> Some(es) | _ -> None - let (|DefaultValue|_|) = function E(CombTerm(DefaultValueOp(ty),[])) -> Some(ty) | _ -> None - - let (|NewRecord|_|) = function E(CombTerm(NewRecordOp(x),es)) -> Some(x,es) | _ -> None - let (|NewUnionCase|_|) = function E(CombTerm(NewUnionCaseOp(ucinfo),es)) -> Some(ucinfo,es) | _ -> None - let (|UnionCaseTest|_|) = function Comb1(UnionCaseTestOp(ucinfo),e) -> Some(e,ucinfo) | _ -> None - let (|TupleGet|_|) = function Comb1(TupleGetOp(ty,n),e) -> Some(e,n) | _ -> None - let (|Coerce|_|) = function Comb1(CoerceOp ty,e1) -> Some(e1,ty) | _ -> None - let (|TypeTest|_|) = function Comb1(TypeTestOp ty,e1) -> Some(e1,ty) | _ -> None - let (|NewArray|_|) = function E(CombTerm(NewArrayOp ty,es)) -> Some(ty,es) | _ -> None - let (|AddressSet|_|) = function E(CombTerm(AddressSetOp,[e;v])) -> Some(e,v) | _ -> None - let (|TryFinally|_|) = function E(CombTerm(TryFinallyOp,[e1;e2])) -> Some(e1,e2) | _ -> None - let (|TryWith|_|) = function E(CombTerm(TryWithOp,[e1;Lambda(v1,e2);Lambda(v2,e3)])) -> Some(e1,v1,e2,v2,e3) | _ -> None - let (|VarSet|_| ) = function E(CombTerm(VarSetOp,[E(VarTerm(v)); e])) -> Some(v,e) | _ -> None - let (|Value|_|) = function E(CombTerm(ValueOp (v,ty),_)) -> Some(v,ty) | _ -> None - let (|ValueObj|_|) = function E(CombTerm(ValueOp (v,_),_)) -> Some(v) | _ -> None - - let (|AddressOf|_|) = function Comb1(AddressOfOp,e) -> Some(e) | _ -> None - let (|Sequential|_|) = function Comb2(SequentialOp,e1,e2) -> Some(e1,e2) | _ -> None - let (|ForIntegerRangeLoop|_|) = function Comb3(ForIntegerRangeLoopOp,e1,e2,Lambda(v, e3)) -> Some(v,e1,e2,e3) | _ -> None - let (|WhileLoop|_|) = function Comb2(WhileLoopOp,e1,e2) -> Some(e1,e2) | _ -> None - let (|PropGet|_|) = function E(CombTerm(StaticPropGetOp pinfo,args)) -> Some(None,pinfo,args) - | E(CombTerm(InstancePropGetOp pinfo,obj::args)) -> Some(Some(obj),pinfo,args) - | _ -> None - let (|PropSet|_|) = function E(CombTerm(StaticPropSetOp pinfo,v::args)) -> Some(None,pinfo,args,v) - | E(CombTerm(InstancePropSetOp pinfo,obj::v::args)) -> Some(Some(obj),pinfo,args,v) - | _ -> None - let (|FieldGet|_|) = function E(CombTerm(StaticFieldGetOp finfo,[])) -> Some(None,finfo) - | E(CombTerm(InstanceFieldGetOp finfo,[obj])) -> Some(Some(obj),finfo) - | _ -> None - let (|FieldSet|_|) = function E(CombTerm(StaticFieldSetOp finfo,[v])) -> Some(None,finfo,v) - | E(CombTerm(InstanceFieldSetOp finfo,[obj;v])) -> Some(Some(obj),finfo,v) - | _ -> None - let (|NewObject|_|) = function E(CombTerm(NewObjectOp ty,e)) -> Some(ty,e) | _ -> None - let (|Call|_|) = function E(CombTerm(StaticMethodCallOp minfo,args)) -> Some(None,minfo,args) - | E(CombTerm(InstanceMethodCallOp minfo,(obj::args))) -> Some(Some(obj),minfo,args) - | _ -> None - let (|LetRaw|_|) = function Comb2(LetOp,e1,e2) -> Some(e1,e2) | _ -> None - let (|LetRecRaw|_|) = function Comb1(LetRecOp,e1) -> Some(e1) | _ -> None - - let (|Let|_|) = function LetRaw(e,Lambda(v,body)) -> Some(v,e,body) | _ -> None - - let (|IteratedLambda|_|) (e: Expr) = qOneOrMoreRLinear (|Lambda|_|) e - let rec (|NLambdas|_|) n (e:Expr) = - match e with - | _ when n <= 0 -> Some([],e) - | Lambda(v,NLambdas ((-) n 1) (vs,b)) -> Some(v::vs,b) - | _ -> None - - let (|NewDelegate|_|) e = - match e with - | Comb1(NewDelegateOp(ty),e) -> - let n = (getDelegateInvoke ty).GetParameters().Length - match e with - | NLambdas n (vs,e) -> Some(ty,vs,e) - | _ -> None - | _ -> None - - let (|LetRec|_|) e = - match e with - | LetRecRaw(IteratedLambda(vs1,E(CombTerm(LetRecCombOp,body::es)))) -> Some(List.zip vs1 es,body) - | _ -> None - - //-------------------------------------------------------------------------- - // Getting the type of Raw quotations - //-------------------------------------------------------------------------- - - // Returns record member specified by name - let getRecordProperty(ty,fieldName) = - let mems = FSharpType.GetRecordFields(ty,publicOrPrivateBindingFlags) - match mems |> Array.tryFind (fun minfo -> minfo.Name = fieldName) with - | Some (m) -> m - | _ -> invalidArg "fieldName" "couldn't find a record member with specified name" - - let getUnionCaseInfo(ty,unionCaseName) = - let cases = FSharpType.GetUnionCases(ty,publicOrPrivateBindingFlags) - match cases |> Array.tryFind (fun ucase -> ucase.Name = unionCaseName) with - | Some(case) -> case - | _ -> invalidArg "unionCaseName" ("couldn't find a union case with the name '" + unionCaseName + "'") - - let getUnionCaseInfoField(ucinfo:UnionCaseInfo,index) = - let fields = ucinfo.GetFields() - if index < 0 || index >= fields.Length then invalidArg "index" "not a valid union case index" - fields.[index] - - /// Returns type of lambda applciation - something like "(fun a -> ..) b" - let rec typeOfAppliedLambda f = - let fty = ((typeOf f):Type) - match fty.GetGenericArguments() with - | [|a; b|] -> b - | _ -> failwith "ill formed expression: AppOp or LetOp" - - /// Returns type of the Raw quotation or fails if the quotation is ill formed - /// if 'verify' is true, verifies all branches, otherwise ignores some of them when not needed - and typeOf<'T> (e : ('T :> Expr)) : Type = - let (E t) = e - match t with - | VarTerm v -> v.Type - | LambdaTerm (v,b) -> mkFunTy v.Type (typeOf b) - | HoleTerm (ty,_) -> ty - | CombTerm (c,args) -> - match c,args with - | AppOp,[f;x] -> typeOfAppliedLambda f - | LetOp,_ -> match e with Let(_,_,b) -> typeOf b | _ -> failwith "unreachable" - | IfThenElseOp,[_;t;_] -> typeOf t - | LetRecOp,_ -> match e with LetRec(_,b) -> typeOf b | _ -> failwith "unreachable" - | LetRecCombOp,_ -> failwith "typeOfConst: LetRecCombOp" - | NewRecordOp ty,_ -> ty - | NewUnionCaseOp ucinfo,_ -> ucinfo.DeclaringType - | UnionCaseTestOp ucinfo,_ -> typeof - | ValueOp (o, ty),_ -> ty - | TupleGetOp (ty,i),_ -> FSharpType.GetTupleElements(ty).[i] - | NewTupleOp ty,_ -> ty - | StaticPropGetOp prop,_ -> prop.PropertyType - | InstancePropGetOp prop,_ -> prop.PropertyType - | StaticPropSetOp prop ,_ -> typeof - | InstancePropSetOp prop,_ -> typeof - | InstanceFieldGetOp fld ,_ -> fld.FieldType - | StaticFieldGetOp fld ,_ -> fld.FieldType - | InstanceFieldSetOp fld,_ -> typeof - | StaticFieldSetOp fld,_ -> typeof - | NewObjectOp ctor,_ -> ctor.DeclaringType - | InstanceMethodCallOp minfo,_ -> minfo.ReturnType |> checkVoid - | StaticMethodCallOp minfo,_ -> minfo.ReturnType |> checkVoid - | CoerceOp ty,_ -> ty - | SequentialOp,[a;b] -> typeOf b - | ForIntegerRangeLoopOp,_ -> typeof - | NewArrayOp ty,_ -> mkArrayTy ty - | NewDelegateOp ty,_ -> ty - | DefaultValueOp ty,_ -> ty - | QuoteOp,[expr] -> mkExprTy (typeOf expr) - | TryFinallyOp,[e1;e2] -> typeOf e1 - | TryWithOp,[e1;e2;e3] -> typeOf e1 - | WhileLoopOp,_ - | AddressSetOp,_ -> typeof - | AddressOfOp,_ -> failwith "can't take the address of this quotation" - | _ -> failwith "unreachable" - - //-------------------------------------------------------------------------- - // Constructors for building Raw quotations - //-------------------------------------------------------------------------- - - let mkFEN op l = E(CombTerm(op,l)) - let mkFE0 op = E(CombTerm(op,[])) - let mkFE1 op x = E(CombTerm(op,[(x:>Expr)])) - let mkFE2 op (x,y) = E(CombTerm(op,[(x:>Expr);(y:>Expr)])) - let mkFE3 op (x,y,z) = E(CombTerm(op,[(x:>Expr);(y:>Expr);(z:>Expr)]) ) - let mkOp v () = v - - let mkLetRaw v = mkFE2 LetOp v - - //-------------------------------------------------------------------------- - // Type-checked constructors for building Raw quotations - //-------------------------------------------------------------------------- - - // t2 is inherited from t1 / t2 implements interface t1 or t2 == t1 - let assignableFrom (t1:Type) (t2:Type) = - t1.IsAssignableFrom(t2) - - let checkTypes (expectedType: Type) (receivedType : Type) msg1 msg2 = - if (expectedType <> receivedType) then - invalidArg "receivedType" (sprintf "type mismatch when building '%s': %s. Expected '%A', got type '%A'" msg1 msg2 expectedType receivedType) - - let checkTypesWeak (expectedType: Type) (receivedType : Type) msg1 msg2 = - if (not (assignableFrom expectedType receivedType)) then - invalidArg "receivedType" (sprintf "type mismatch when building '%s': %s. Expected '%A', got type '%A'" msg1 msg2 expectedType receivedType) - - let checkArgs (paramInfos: ParameterInfo[]) (args:list) = - if (paramInfos.Length <> args.Length) then invalidArg "args" "incorrect number of arguments" - List.iter2 - ( fun (p:ParameterInfo) a -> checkTypesWeak p.ParameterType (typeOf a) "args" "invalid parameter for a method or indexer property") - (paramInfos |> Array.to_list) - args - // todo: shouldn't this be "strong" type check? sometimes? - - let checkAssignableFrom ty1 ty2 = - if not (assignableFrom ty1 ty2) then invalidArg "ty2" "incorrect type" - - let checkObj (membInfo: MemberInfo) (obj: Expr) = - if not (assignableFrom membInfo.DeclaringType (typeOf obj)) then invalidArg "obj" "incorrect instance type" - - - // Checks lambda application for correctnes - let checkAppliedLambda (f, v) = - let fty = typeOf f - let ftyG = (if fty.IsGenericType then fty.GetGenericTypeDefinition() else fty) - checkTypes funTyC ftyG "f" "expected function type in function application or let binding" - let vty = (typeOf v) - match fty.GetGenericArguments() with - | [|a; b|] -> checkTypes vty a "f" "function argument type doesn't match" - | _ -> invalidArg "f" "invalid function type" - - // Returns option (by name) of a NewUnionCase type - let getUnionCaseFields ty str = - let cases = FSharpType.GetUnionCases(ty,publicOrPrivateBindingFlags) - match cases |> Array.tryFind (fun ucase -> ucase.Name = str) with - | Some(case) -> case.GetFields() - | _ -> invalidArg "ty" "type is not a union type" - - let checkBind(v:Var,e) = - let ety = typeOf e - checkTypes v.Type ety "let" "the variable type doesn't match the type of the rhs of a let binding" - - // [Correct by definition] - let mkVar v = E(VarTerm v ) - let mkQuote(a) = E(CombTerm(QuoteOp,[(a:>Expr)] )) - - let mkValue (v,ty) = mkFE0 (ValueOp(v,ty)) - let mkValueG (v:'T) = mkValue(box v, typeof<'T>) - let mkLiftedValueOpG (v:'T) = ValueOp(box v, typeof<'T>) - let mkUnit () = mkValue(null, typeof) - let mkBool (v:bool) = mkValueG(v) - let mkString (v:string) = mkValueG(v) - let mkSingle (v:single) = mkValueG(v) - let mkDouble (v:double) = mkValueG(v) - let mkChar (v:char) = mkValueG(v) - let mkSByte (v:sbyte) = mkValueG(v) - let mkByte (v:byte) = mkValueG(v) - let mkInt16 (v:int16) = mkValueG(v) - let mkUInt16 (v:uint16) = mkValueG(v) - let mkInt32 (v:int32) = mkValueG(v) - let mkUInt32 (v:uint32) = mkValueG(v) - let mkInt64 (v:int64) = mkValueG(v) - let mkUInt64 (v:uint64) = mkValueG(v) - let mkAddressOf v = mkFE1 AddressOfOp v - let mkSequential (e1,e2) = mkFE2 SequentialOp (e1,e2) - let mkTypeTest (e,ty) = mkFE1 (TypeTestOp(ty)) e - let mkVarSet (v,e) = mkFE2 VarSetOp (mkVar(v),e) - let mkAddressSet (e1,e2) = mkFE2 AddressSetOp (e1,e2) - let mkLambda(var,body) = E(LambdaTerm(var,(body:>Expr))) - let mkTryWith(e1,v1,e2,v2,e3) = mkFE3 TryWithOp (e1,mkLambda(v1,e2),mkLambda(v2,e3)) - let mkTryFinally(e1,e2) = mkFE2 TryFinallyOp (e1,e2) - - let mkCoerce (ty,x) = mkFE1 (CoerceOp ty) x - let mkNull (ty) = mkFE0 (ValueOp(null,ty)) - - let mkApplication v = checkAppliedLambda v; mkFE2 AppOp v - - // Tuples - let mkNewTupleWithType (ty,args:Expr list) = - let mems = FSharpType.GetTupleElements ty |> Array.to_list - if (args.Length <> mems.Length) then invalidArg "args" "incompatible tuple length" - List.iter2(fun mt a -> checkTypes mt (typeOf a) "args" "Mismatching type of argument and tuple element." ) mems args - mkFEN (NewTupleOp ty) args - - let mkNewTuple (args) = - let ty = FSharpType.MakeTupleType(Array.map typeOf (Array.of_list args)) - mkFEN (NewTupleOp ty) args - - let mkTupleGet (ty,n,x) = - checkTypes ty (typeOf x) "tupleGet" "expression doesn't match the tuple type" - let mems = FSharpType.GetTupleElements ty - if (n < 0 or mems.Length <= n) then invalidArg "n" "tuple access out of range" - mkFE1 (TupleGetOp (ty,n)) x - - // Records - let mkNewRecord (ty,args:list) = - let mems = FSharpType.GetRecordFields(ty,publicOrPrivateBindingFlags) - if (args.Length <> mems.Length) then invalidArg "args" "incompatible record length" - List.iter2 (fun (minfo:PropertyInfo) a -> checkTypes minfo.PropertyType (typeOf a) "recd" "incorrect argument type for a record") (Array.to_list mems) args - mkFEN (NewRecordOp ty) args - - - // Discriminated unions - let mkNewUnionCase (ucinfo:UnionCaseInfo,args:list) = - let sargs = ucinfo.GetFields() - if (args.Length <> sargs.Length) then invalidArg "args" "union type requires different number of arguments" - List.iter2 (fun (minfo:PropertyInfo) a -> checkTypes minfo.PropertyType (typeOf a) "sum" "incorrect argument type for a union") (Array.to_list sargs) args - mkFEN (NewUnionCaseOp ucinfo) args - - let mkUnionCaseTest (ucinfo:UnionCaseInfo,expr) = - checkTypes ucinfo.DeclaringType (typeOf expr) "UnionCaseTagTest" "types of expression does not match" - mkFE1 (UnionCaseTestOp ucinfo) expr - - // Conditional etc.. - let mkIfThenElse (e,t,f) = - checkTypes (typeOf t) (typeOf f) "cond" "types of true and false branches differ" - checkTypes (typeof) (typeOf e) "cond" "condition expression must be of type bool" - mkFE3 IfThenElseOp (e,t,f) - - let mkNewArray (ty,args) = - List.iter (fun a -> checkTypes ty (typeOf a) "newArray" "initializer doesn't match array type") args - mkFEN (NewArrayOp ty) args - - let mkInstanceFieldGet(obj,finfo:FieldInfo) = - match finfo.IsStatic with - | false -> - checkObj finfo obj - mkFE1 (InstanceFieldGetOp finfo) obj - | true -> invalidArg "finfo" "object provided for static member" - - let mkStaticFieldGet (finfo:FieldInfo) = - match finfo.IsStatic with - | true -> mkFE0 (StaticFieldGetOp finfo) - | false -> invalidArg "finfo" "no object provided for instance member" - - let mkStaticFieldSet (finfo:FieldInfo,value:Expr) = - checkTypes (typeOf value) finfo.FieldType "value" "the type of the field was incorrect" - match finfo.IsStatic with - | true -> mkFE1 (StaticFieldSetOp finfo) value - | false -> invalidArg "finfo" "no object provided for instance member" - - let mkInstanceFieldSet (obj,finfo:FieldInfo,value:Expr) = - checkTypes (typeOf value) finfo.FieldType "value" "the type of the field was incorrect" - match finfo.IsStatic with - | false -> - checkObj finfo obj - mkFE2 (InstanceFieldSetOp finfo) (obj,value) - | true -> invalidArg "finfo" "object provided for static member" - - let mkCtorCall (ci:ConstructorInfo,args:list) = - checkArgs (ci.GetParameters()) args - mkFEN (NewObjectOp ci) args - - let mkDefaultValue (ty:Type) = - mkFE0 (DefaultValueOp ty) - - let mkStaticPropGet (pinfo:PropertyInfo,args:list) = - if (not pinfo.CanRead) then invalidArg "pinfo" "reading a set-only property" - checkArgs (pinfo.GetIndexParameters()) args - match pinfo.GetGetMethod(true).IsStatic with - | true -> mkFEN (StaticPropGetOp pinfo) args - | false -> invalidArg "pinfo" "no object provided for instance member" - - let mkInstancePropGet (obj,pinfo:PropertyInfo,args:list) = - if (not pinfo.CanRead) then invalidArg "pinfo" "reading a set-only property" - checkArgs (pinfo.GetIndexParameters()) args - match pinfo.GetGetMethod(true).IsStatic with - | false -> - checkObj pinfo obj - mkFEN (InstancePropGetOp pinfo) (obj::args) - | true -> invalidArg "pinfo" "object provided for static member" - - let mkStaticPropSet (pinfo:PropertyInfo,args:list,value:Expr) = - if (not pinfo.CanWrite) then invalidArg "pinfo" "writing a get-only property" - checkArgs (pinfo.GetIndexParameters()) args - match pinfo.GetSetMethod(true).IsStatic with - | true -> mkFEN (StaticPropSetOp pinfo) (value::args) - | false -> invalidArg "pinfo" "no object provided for instance member" - - let mkInstancePropSet (obj,pinfo:PropertyInfo,args:list,value:Expr) = - if (not pinfo.CanWrite) then invalidArg "pinfo" "writing a get-only property" - checkArgs (pinfo.GetIndexParameters()) args - match pinfo.GetSetMethod(true).IsStatic with - | false -> - checkObj pinfo obj - mkFEN (InstancePropSetOp pinfo) (obj::value::args) - | true -> invalidArg "pinfo" "object provided for static member" - - let mkInstanceMethodCall (obj,minfo:MethodInfo,args:list) = - checkArgs (minfo.GetParameters()) args - match minfo.IsStatic with - | false -> - checkObj minfo obj - mkFEN (InstanceMethodCallOp minfo) (obj::args) - | true -> invalidArg "minfo" "object provided for static member" - - let mkStaticMethodCall (minfo:MethodInfo,args:list) = - checkArgs (minfo.GetParameters()) args - match minfo.IsStatic with - | true -> mkFEN (StaticMethodCallOp minfo) args - | false -> invalidArg "minfo" "no object provided for instance member" - - let mkForLoop (v:Var,lowerBound,upperBound,body) = - checkTypes (typeof) (typeOf lowerBound) "lowerBound" "lower bound variable must be an integer" - checkTypes (typeof) (typeOf upperBound) "upperBound" "upper bound variable must be an integer" - checkTypes (typeof) (v.Type) "for" "body of the for loop must be lambda taking integer as an argument" - mkFE3 ForIntegerRangeLoopOp (lowerBound, upperBound, mkLambda(v,body)) - - let mkWhileLoop (guard,body) = - checkTypes (typeof) (typeOf guard) "guard" "guard must return boolean" - checkTypes (typeof) (typeOf body) "body" "body must return unit" - mkFE2 (WhileLoopOp) (guard,body) - - let mkNewDelegate (ty,e) = - let mi = getDelegateInvoke ty - let ps = mi.GetParameters() - let dlfun = Array.foldBack (fun (p:ParameterInfo) rty -> mkFunTy p.ParameterType rty) ps mi.ReturnType - checkTypes dlfun (typeOf e) "ty" "Function type doesn't match delegate type." - mkFE1 (NewDelegateOp ty) e - - let mkLet (v,e,b) = - checkBind (v,e); - mkLetRaw (e,mkLambda(v,b)) - - //let mkLambdas(vs,b) = mkRLinear mkLambdaRaw (vs,(b:>Expr)) - let mkTupledApplication (f,args) = - match args with - | [] -> mkApplication (f,mkUnit()) - | [x] -> mkApplication (f,x) - | _ -> mkApplication (f,mkNewTuple args) - - let mkApplications(f: Expr,es:list>) = mkLLinear mkTupledApplication (f,es) - - let mkIteratedLambdas(vs,b) = mkRLinear mkLambda (vs,b) - - let mkLetRecRaw v = mkFE1 LetRecOp v - let mkLetRecCombRaw v = mkFEN LetRecCombOp v - let mkLetRec (ves:(Var*Expr) list,body) = - List.iter checkBind ves; - let vs,es = List.unzip ves - mkLetRecRaw(mkIteratedLambdas (vs,mkLetRecCombRaw (body::es))) - - let ReflectedDefinitionsResourceNameBase = "ReflectedDefinitions" - - //------------------------------------------------------------------------- - // General Method Binder - - let typeEquals (s:Type) (t:Type) = s.Equals(t) - let typesEqual (ss:Type list) (tt:Type list) = - (ss.Length = tt.Length) && List.forall2 typeEquals ss tt - - let instFormal (typarEnv: Type[]) (ty:Instantiable<'T>) = ty (fun i -> typarEnv.[i]) - - let getGenericArguments(tc:Type) = - if tc.IsGenericType then tc.GetGenericArguments() else [| |] - - let getNumGenericArguments(tc:Type) = - if tc.IsGenericType then tc.GetGenericArguments().Length else 0 - - let bindMethodBySearch (parentT:Type,nm,marity,argtys,rty) = - let methInfos = parentT.GetMethods(staticOrInstanceBindingFlags) |> Array.to_list - // First, filter on name, if unique, then binding "done" - let tyargTs = getGenericArguments(parentT) - let methInfos = methInfos |> List.filter (fun methInfo -> methInfo.Name = nm) - match methInfos with - | [methInfo] -> - methInfo - | _ -> - // Second, type match. Note type erased (non-generic) F# code would not type match but they have unique names - let select (methInfo:MethodInfo) = - let tyargTIs = if parentT.IsGenericType then parentT.GetGenericArguments() else [| |] - // mref implied Types - let mtyargTIs = if methInfo.IsGenericMethod then methInfo.GetGenericArguments() else [| |] - if mtyargTIs.Length <> marity then false (* method generic arity mismatch *) else - let typarEnv = (Array.append tyargTs mtyargTIs) - let argTs = argtys |> List.map (instFormal typarEnv) - let resT = instFormal typarEnv rty - - // methInfo implied Types - let haveArgTs = - let parameters = Array.to_list (methInfo.GetParameters()) - parameters |> List.map (fun param -> param.ParameterType) - let haveResT = methInfo.ReturnType - // check for match - if argTs.Length <> haveArgTs.Length then false (* method argument length mismatch *) else - let res = typesEqual (resT::argTs) (haveResT::haveArgTs) - res - // return MethodInfo for (generic) type's (generic) method - match List.tryFind select methInfos with - | None -> failwith "convMethodRef: could not bind to method" - | Some methInfo -> methInfo - - let bindMethodHelper (parentT: Type, nm,marity,argtys,rty) = - if parentT = null then invalidArg "parentT" "parent type should not be null" - if marity = 0 then - let tyargTs = if parentT.IsGenericType then parentT.GetGenericArguments() else [| |] - let argTs,resT = - let argTs = Array.of_list (List.map (instFormal tyargTs) argtys) - let resT = instFormal tyargTs rty - argTs,resT - let methInfo = - try - match parentT.GetMethod(nm,staticOrInstanceBindingFlags,null,argTs,null) with - | null -> None - | res -> Some(res) - with :? AmbiguousMatchException -> None - match methInfo with - | Some methInfo when (typeEquals resT methInfo.ReturnType) -> methInfo - | _ -> bindMethodBySearch(parentT,nm,marity,argtys,rty) - else - bindMethodBySearch(parentT,nm,marity,argtys,rty) - - let bindModuleProperty (ty:Type,nm) = - match ty.GetProperty(nm,staticBindingFlags) with - | null -> failwith ("Couldn't bind property " + nm + " in type " + (ty.ToString())) - | res -> res - - - let bindModuleFunction (ty:Type,nm) = - match ty.GetMethod(nm,staticBindingFlags) with - | null -> failwith ("Couldn't bind function " + nm + " in type " + (ty.ToString())) - | res -> res - - let mkNamedType (tc:Type,tyargs) = - match tyargs with - | [] -> tc - | _ -> tc.MakeGenericType(Array.of_list tyargs) - - let inline checkNonNullArg (arg:string,err:string) y = match box y with null -> raise (new ArgumentNullException(arg,err)) | _ -> y - - let inst (tyargs:Type list) (i: Instantiable<'T>) = i (fun idx -> tyargs.[idx]) // Note, O(n) looks, but #tyargs is always small - - let bindProp (tc,propName,retType,argTypes,tyargs) = - // We search in the instantiated type, rather than searching the generic type. - let typ = mkNamedType(tc,tyargs) - let argtyps : Type list = argTypes |> inst tyargs - let retType : Type = retType |> inst tyargs - typ.GetProperty(propName, staticOrInstanceBindingFlags, null, retType, Array.of_list argtyps,null) |> checkNonNullArg ("propName","failed to bind property '"+ propName+"'") // fxcop may not see "propName" as an arg - - let bindField (tc,fldName,tyargs) = - let typ = mkNamedType(tc,tyargs) - typ.GetField(fldName,staticOrInstanceBindingFlags) |> checkNonNullArg ("fldName","failed to bind field '"+ fldName+"'") // fxcop may not see "fldName" as an arg - - let bindGenericCtor (tc:Type,argTypes:Instantiable) = - let argtyps = instFormal (getGenericArguments tc) argTypes - tc.GetConstructor(instanceBindingFlags,null,Array.of_list argtyps,null) |> checkNonNullArg ("tc","failed to bind constructor") // fxcop may not see "tc" as an arg - - let bindCtor (tc,argTypes:Instantiable,tyargs) = - let typ = mkNamedType(tc,tyargs) - let argtyps = argTypes |> inst tyargs - typ.GetConstructor(instanceBindingFlags,null,Array.of_list argtyps,null) |> checkNonNullArg ("tc","failed to bind constructor") // fxcop may not see "tc" as an arg - - let chop n xs = - if n<0 then failwith "List.chop: -ve" else - let rec split l = - match l with - | 0,xs -> [],xs - | n,x::xs -> let front,back = split (n-1,xs) - x::front,back - | n,[] -> failwith "List.chop: not enough elts list" - split (n,xs) - - let instMeth (ngmeth: MethodInfo, methTypeArgs) = - if ngmeth.GetGenericArguments().Length = 0 then ngmeth(* non generic *) - else ngmeth.MakeGenericMethod(Array.of_list methTypeArgs) - - let bindGenericMeth (tc:Type,argTypes : list>,retType,methName,numMethTyargs) = - bindMethodHelper(tc,methName,numMethTyargs,argTypes,retType) - - let bindMeth ((tc:Type,argTypes : list>,retType,methName,numMethTyargs),tyargs) = - let ntyargs = tc.GetGenericArguments().Length - let enclTypeArgs,methTypeArgs = chop ntyargs tyargs - let ty = mkNamedType(tc,enclTypeArgs) - let ngmeth = bindMethodHelper(ty,methName,numMethTyargs,argTypes,retType) - instMeth(ngmeth,methTypeArgs) - - let pinfoIsStatic (pinfo:PropertyInfo) = - if pinfo.CanRead then pinfo.GetGetMethod(true).IsStatic - elif pinfo.CanWrite then pinfo.GetSetMethod(true).IsStatic - else false - - //-------------------------------------------------------------------------- - // Unpickling - //-------------------------------------------------------------------------- - - module SimpleUnpickle = - - type instate = - { is: ByteStream; - istrings: string array; - localAssembly: System.Reflection.Assembly } - - let u_byte_as_int st = st.is.ReadByte() - - let u_bool st = let b = u_byte_as_int st in (b = 1) - let u_void (is: instate) = () - let u_unit (is: instate) = () - let prim_u_int32 st = - let b0 = (u_byte_as_int st) - let b1 = (u_byte_as_int st) - let b2 = (u_byte_as_int st) - let b3 = (u_byte_as_int st) - b0 ||| (b1 <<< 8) ||| (b2 <<< 16) ||| (b3 <<< 24) - - let u_int32 st = - let b0 = u_byte_as_int st - if b0 <= 0x7F then b0 - elif b0 <= 0xbf then - let b0 = b0 &&& 0x7f - let b1 = (u_byte_as_int st) - (b0 <<< 8) ||| b1 - else - prim_u_int32 st - - let u_bytes st = - let n = u_int32 st - st.is.ReadBytes(n) - - let prim_u_string st = - let len = (u_int32 st) - st.is.ReadUtf8BytesAsString(len) - - let u_int st = u_int32 st - let u_sbyte st = sbyte (u_int32 st) - let u_byte st = byte (u_byte_as_int st) - let u_int16 st = int16 (u_int32 st) - let u_uint16 st = uint16 (u_int32 st) - let u_uint32 st = uint32 (u_int32 st) - let u_int64 st = - let b1 = int64 (u_int32 st) &&& 0xFFFFFFFFL - let b2 = int64 (u_int32 st) - b1 ||| (b2 <<< 32) - let u_uint64 st = uint64 (u_int64 st) - let u_double st = System.BitConverter.ToDouble(System.BitConverter.GetBytes(u_int64 st),0) - let u_float32 st = System.BitConverter.ToSingle(System.BitConverter.GetBytes(u_int32 st),0) - let u_char st = char (int32 (u_uint16 st)) - let inline u_tup2 p1 p2 st = let a = p1 st in let b = p2 st in (a,b) - let inline u_tup3 p1 p2 p3 st = - let a = p1 st in let b = p2 st in let c = p3 st in (a,b,c) - let inline u_tup4 p1 p2 p3 p4 st = - let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in (a,b,c,d) - let inline u_tup5 p1 p2 p3 p4 p5 st = - let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in (a,b,c,d,e) - let u_uniq (tbl: _ array) st = - let n = u_int st - if n < 0 || n >= tbl.Length then failwith ("u_uniq: out of range, n = "+string n+ ", sizeof(tab) = " + string tbl.Length); - tbl.[n] - let u_string st = u_uniq st.istrings st - - let rec u_list_aux f acc st = - let tag = u_byte_as_int st - match tag with - | 0 -> List.rev acc - | 1 -> let a = f st in u_list_aux f (a::acc) st - | n -> failwith ("u_list: found number " + string n) - let u_list f st = u_list_aux f [] st - - let unpickle_obj localAssembly u phase2bytes = - let phase2data = - let st2 = - { is = new ByteStream(phase2bytes,0,phase2bytes.Length); - istrings = [| |]; - localAssembly=localAssembly } - u_tup2 (u_list prim_u_string) u_bytes st2 - let stringTab,phase1bytes = phase2data - let st1 = - { is = new ByteStream(phase1bytes,0,phase1bytes.Length); - istrings = Array.of_list stringTab; - localAssembly=localAssembly } - let res = u st1 - res - - open SimpleUnpickle - - let decodeFunTy args = - match args with - | [d;r] -> funTyC.MakeGenericType([| d; r |]) - | _ -> invalidArg "args" "expected two type arguments" - - let decodeArrayTy n (tys: Type list) = - match tys with - | [ty] -> if (n = 1) then ty.MakeArrayType() else ty.MakeArrayType(n) - // typeof.MakeArrayType(1) returns "Int[*]" but we need "Int[]" - | _ -> invalidArg "tys" "expected one type argument" - - let mkNamedTycon (tcName,ass:Assembly) = - match ass.GetType(tcName) with - | null -> - // For some reason we can get 'null' returned here even when a type with the right name exists... Hence search the slow way... - match (ass.GetTypes() |> Array.tryFind (fun a -> a.FullName = tcName)) with - | Some ty -> ty - | None -> invalidArg "tcName" "failed to bind type '%s' in assembly '%O'." tcName ass // "Available types are:\n%A" tcName ass (ass.GetTypes() |> Array.map (fun a -> a.FullName)) - | ty -> ty - - let decodeNamedTy tc tsR = mkNamedType(tc,tsR) - - let mscorlib = typeof.Assembly - let u_assref st = - let a = u_string st - if a = "" then mscorlib - elif a = "." then st.localAssembly - else - match System.Reflection.Assembly.Load(a) with - | null -> failwithf "failed to bind assembly '%s' while processing quotation data" a - | ass -> ass - - let u_NamedType st = - let a,b = u_tup2 u_string u_assref st - mkNamedTycon (a,b) - let u_tyvarSpec st = let tvName = u_string st in () - let u_tyconstSpec st = - let tag = u_byte_as_int st - match tag with - | 1 -> u_unit st |> (fun () -> decodeFunTy) - | 2 -> u_NamedType st |> decodeNamedTy - | 3 -> u_int st |> decodeArrayTy - | _ -> failwith "u_tyconstSpec" - - let appL fs env = List.map (fun f -> f env) fs - - let rec u_dtype st : (int -> Type) -> Type = - let tag = u_byte_as_int st - match tag with - | 0 -> u_int st |> (fun x env -> env(x)) - | 1 -> u_tup2 u_tyconstSpec (u_list u_dtype) st |> (fun (a,b) env -> a (appL b env)) - | _ -> failwith "u_dtype" - - let u_dtypes st = let a = u_list u_dtype st in appL a - - let (|NoTyArgs|) = function [] -> () | _ -> failwith "incorrect number of arguments during deserialization" - let (|OneTyArg|) = function [x] -> x | _ -> failwith "incorrect number of arguments during deserialization" - - type env = - { vars : Map; varn: int; typeInst : int -> Type } - let addVar env v = - { env with vars = env.vars.Add(env.varn,v); varn=env.varn+1 } - let envClosed (types:Type[]) = - { vars = Map.Empty; - varn = 0; - typeInst = fun (n:int) -> types.[n] } - - type Bindable<'T> = env -> 'T - - let rec u_Expr st = - let tag = u_byte_as_int st - match tag with - | 0 -> u_tup3 u_constSpec u_dtypes (u_list u_Expr) st - |> (fun (a,b,args) (env:env) -> - let tyargs = b env.typeInst - E(CombTerm(a tyargs, List.map (fun e -> e env) args ))) - | 1 -> let x = u_VarRef st - (fun env -> E(VarTerm (x env))) - | 2 -> let a = u_VarDecl st - let b = u_Expr st - (fun env -> let v = a env in E(LambdaTerm(v,b (addVar env v)))) - | 3 -> let a = u_dtype st - let idx = u_int st - (fun env -> E(HoleTerm(a env.typeInst , idx))) - | 4 -> let a = u_Expr st - (fun env -> mkQuote(a env)) - | 5 -> let a = u_Expr st - let attrs = u_list u_Expr st - (fun env -> let e = (a env) in EA(e.Tree,(e.CustomAttributes @ List.map (fun attrf -> attrf env) attrs))) - | _ -> failwith "u_Expr" - and u_VarDecl st = - let s,b = u_tup2 u_string u_dtype st in - (fun env -> new Var(s, b env.typeInst)) - and u_VarRef st = - let i = u_int st in - (fun env -> env.vars.[i]) - and u_RecdField st = - let ty,nm = u_tup2 u_NamedType u_string st - (fun tyargs -> getRecordProperty(mkNamedType(ty,tyargs),nm)) - and u_UnionCaseInfo st = - let ty,nm = u_tup2 u_NamedType u_string st - (fun tyargs -> getUnionCaseInfo(mkNamedType(ty,tyargs),nm)) - - and u_UnionCaseField st = - let case,i = u_tup2 u_UnionCaseInfo u_int st - (fun tyargs -> getUnionCaseInfoField(case tyargs,i)) - - and u_ModuleDefn st = - let (ty,nm,isProp) = u_tup3 u_NamedType u_string u_bool st - if isProp then StaticPropGetOp(bindModuleProperty(ty,nm)) - else StaticMethodCallOp(bindModuleFunction(ty,nm)) - - and u_MethodInfoData st = - u_tup5 u_NamedType (u_list u_dtype) u_dtype u_string u_int st - - and u_PropInfoData st = - u_tup4 u_NamedType u_string u_dtype u_dtypes st - - and u_CtorInfoData st = - u_tup2 u_NamedType u_dtypes st - - and u_MethodBase st = - let tag = u_byte_as_int st - match tag with - | 0 -> - match u_ModuleDefn st with - | StaticMethodCallOp(minfo) -> (minfo :> MethodBase) - | StaticPropGetOp(pinfo) -> (pinfo.GetGetMethod() :> MethodBase) - | _ -> failwith "unreachable" - | 1 -> - let data = u_MethodInfoData st - let minfo = bindGenericMeth(data) in - (minfo :> MethodBase) - | 2 -> - let data = u_CtorInfoData st - let cinfo = bindGenericCtor(data) in - (cinfo :> MethodBase) - | _ -> failwith "u_MethodBase" - - - and u_constSpec st = - let tag = u_byte_as_int st - match tag with - | 0 -> u_void st |> (fun () NoTyArgs -> IfThenElseOp) - | 1 -> u_ModuleDefn st |> (fun op tyargs -> - match op with - | StaticMethodCallOp(minfo) -> StaticMethodCallOp(instMeth(minfo,tyargs)) - // OK to throw away the tyargs here since this only non-generic values in modules get represented by static properties - | op -> op) - | 2 -> u_void st |> (fun () NoTyArgs -> LetRecOp) - | 3 -> u_NamedType st |> (fun x tyargs -> NewRecordOp (mkNamedType(x,tyargs))) - | 4 -> u_RecdField st |> (fun prop tyargs -> InstancePropGetOp(prop tyargs)) - | 5 -> u_UnionCaseInfo st |> (fun ucinfo tyargs -> NewUnionCaseOp(ucinfo tyargs)) - | 6 -> u_UnionCaseField st |> (fun prop tyargs -> InstancePropGetOp(prop tyargs) ) - | 7 -> u_UnionCaseInfo st |> (fun ucinfo tyargs -> UnionCaseTestOp(ucinfo tyargs)) - | 8 -> u_void st |> (fun () (OneTyArg(tyarg)) -> NewTupleOp tyarg) - | 9 -> u_int st |> (fun x (OneTyArg(tyarg)) -> TupleGetOp (tyarg,x)) - | 11 -> u_bool st |> (fun x NoTyArgs -> mkLiftedValueOpG x) - | 12 -> u_string st |> (fun x NoTyArgs -> mkLiftedValueOpG x) - | 13 -> u_float32 st |> (fun x NoTyArgs -> mkLiftedValueOpG x) - | 14 -> u_double st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 15 -> u_char st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 16 -> u_sbyte st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 17 -> u_byte st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 18 -> u_int16 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 19 -> u_uint16 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 20 -> u_int32 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 21 -> u_uint32 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 22 -> u_int64 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 23 -> u_uint64 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 24 -> u_void st |> (fun a NoTyArgs -> mkLiftedValueOpG ()) - | 25 -> u_PropInfoData st |> (fun (a,b,c,d) tyargs -> let pinfo = bindProp(a,b,c,d,tyargs) in if pinfoIsStatic pinfo then StaticPropGetOp(pinfo) else InstancePropGetOp(pinfo)) - | 26 -> u_CtorInfoData st |> (fun (a,b) tyargs -> NewObjectOp (bindCtor(a,b,tyargs))) - | 28 -> u_void st |> (fun a (OneTyArg(ty)) -> CoerceOp ty) - | 29 -> u_void st |> (fun a NoTyArgs -> SequentialOp) - | 30 -> u_void st |> (fun a NoTyArgs -> ForIntegerRangeLoopOp) - | 31 -> u_MethodInfoData st |> (fun p tyargs -> let minfo = bindMeth(p,tyargs) in if minfo.IsStatic then StaticMethodCallOp(minfo) else InstanceMethodCallOp(minfo)) - | 32 -> u_void st |> (fun a (OneTyArg(ty)) -> NewArrayOp ty) - | 33 -> u_void st |> (fun a (OneTyArg(ty)) -> NewDelegateOp ty) - | 34 -> u_void st |> (fun a NoTyArgs -> WhileLoopOp) - | 35 -> u_void st |> (fun () NoTyArgs -> LetOp) - | 36 -> u_RecdField st |> (fun prop tyargs -> InstancePropSetOp(prop tyargs)) - | 37 -> u_tup2 u_NamedType u_string st |> (fun (a,b) tyargs -> let finfo = bindField(a,b,tyargs) in if finfo.IsStatic then StaticFieldGetOp(finfo) else InstanceFieldGetOp(finfo)) - | 38 -> u_void st |> (fun () NoTyArgs -> LetRecCombOp) - | 39 -> u_void st |> (fun () NoTyArgs -> AppOp) - | 40 -> u_void st |> (fun () (OneTyArg(ty)) -> ValueOp(null,ty)) - | 41 -> u_void st |> (fun () (OneTyArg(ty)) -> DefaultValueOp(ty)) - | 42 -> u_PropInfoData st |> (fun (a,b,c,d) tyargs -> let pinfo = bindProp(a,b,c,d,tyargs) in if pinfoIsStatic pinfo then StaticPropSetOp(pinfo) else InstancePropSetOp(pinfo)) - | 43 -> u_tup2 u_NamedType u_string st |> (fun (a,b) tyargs -> let finfo = bindField(a,b,tyargs) in if finfo.IsStatic then StaticFieldSetOp(finfo) else InstanceFieldSetOp(finfo)) - | 44 -> u_void st |> (fun () NoTyArgs -> AddressOfOp) - | 45 -> u_void st |> (fun () NoTyArgs -> AddressSetOp) - | 46 -> u_void st |> (fun () (OneTyArg(ty)) -> TypeTestOp(ty)) - | 47 -> u_void st |> (fun () NoTyArgs -> TryFinallyOp) - | 48 -> u_void st |> (fun () NoTyArgs -> TryWithOp) - | _ -> failwithf "u_constSpec, unrecognized tag %d" tag - let unpickle_raw_expr (localType : System.Type) = unpickle_obj localType.Assembly u_Expr - let u_defn = u_tup2 u_MethodBase u_Expr - let u_defns = u_list u_defn - let unpickleDefns (localAssembly : System.Reflection.Assembly) = unpickle_obj localAssembly u_defns - - //-------------------------------------------------------------------------- - // General utilities that will eventually be folded into - // Microsoft.FSharp.Quotations.Typed - //-------------------------------------------------------------------------- - - /// Fill the holes in an Expr - let rec fillHolesInRawExpr (l:Expr[]) (E t as e) = - match t with - | VarTerm _ -> e - | LambdaTerm (v,b) -> EA(LambdaTerm(v, fillHolesInRawExpr l b ),e.CustomAttributes) - | CombTerm (op,args) -> EA(CombTerm(op, args |> List.map (fillHolesInRawExpr l)),e.CustomAttributes) - | HoleTerm (ty,idx) -> - if idx < 0 or idx >= l.Length then failwith "hole index out of range"; - let h = l.[idx] - checkTypes (typeOf h) ty "fill" "type of the argument doesn't match the hole type" - h - - let rec freeInExprAcc bvs acc (E t) = - match t with - | HoleTerm _ -> acc - | CombTerm (_, ag) -> ag |> List.fold (freeInExprAcc bvs) acc - | VarTerm v -> if Set.contains v bvs || Set.contains v acc then acc else Set.add v acc - | LambdaTerm (v,b) -> freeInExprAcc (Set.add v bvs) acc b - and freeInExpr e = freeInExprAcc Set.Empty Set.Empty e - - // utility for folding - let foldWhile f st (ie: seq<'T>) = - use e = ie.GetEnumerator() - let mutable res = Some st - while (res.IsSome && e.MoveNext()) do - res <- f (match res with Some a -> a | _ -> failwith "internal error") e.Current; - res - - let mkTyparSubst (tyargs:Type[]) = - let n = tyargs.Length - fun idx -> - if idx < n then tyargs.[idx] - else failwith "type argument out of range" - - exception Clash of Var - - /// Replace type variables and expression variables with parameters using the - /// given substitution functions/maps. - let rec substituteB bvs tmsubst (E t as e) = - match t with - | CombTerm (c, args) -> - let substargs = args |> List.map (fun arg -> substituteB bvs tmsubst arg) - EA(CombTerm(c, substargs),e.CustomAttributes) - | VarTerm v -> - match tmsubst v with - | None -> e - | Some e2 -> - let fvs = freeInExpr e2 - let clashes = Set.intersect fvs bvs in - if clashes.IsEmpty then e2 - else raise (Clash(clashes.MinimumElement)) - | LambdaTerm (v,b) -> - try EA(LambdaTerm(v,substituteB (Set.add v bvs) tmsubst b),e.CustomAttributes) - with Clash(bv) -> - if v = bv then - let v2 = new Var(v.Name,v.Type) - let v2exp = E(VarTerm(v2)) - EA(LambdaTerm(v2,substituteB bvs (fun v -> if v = bv then Some(v2exp) else tmsubst v) b),e.CustomAttributes) - else - rethrow() - | HoleTerm _ -> e - - - let substituteRaw tmsubst e = substituteB Set.Empty tmsubst e - - let readToEnd (s : Stream) = - let n = int s.Length - let res = Array.zeroCreate n - let i = ref 0 - while (!i < n) do - i := !i + s.Read(res,!i,(n - !i)) - done; - res - - let decodedTopResources = new Dictionary(10,HashIdentity.Structural) - -#if FX_NO_REFLECTION_MODULE_HANDLES // not available on Silverlight - type ModuleHandle = string - type System.Reflection.Module with - member x.ModuleHandle = x.FullyQualifiedName -#else - type ModuleHandle = System.ModuleHandle -#endif - -#if FX_NO_REFLECTION_METADATA_TOKENS // not available on Compact Framework - type ReflectedDefinitionTableKey = - | Key of Type * int * Type[] - static member GetKey(mbase:MethodBase) = - Key(mbase.DeclaringType.Module.ModuleHandle, - (if mbase.IsGenericMethod then mbase.GetGenericArguments().Length else 0), - mbase.GetParameters() |> Array.map (fun p -> p.Type)) -#else - type ReflectedDefinitionTableKey = - | Key of ModuleHandle * int - static member GetKey(mbase:MethodBase) = - Key(mbase.Module.ModuleHandle,mbase.MetadataToken) -#endif - - type ReflectedDefinitionTableEntry = Entry of Bindable - - let reflectedDefinitionTable = new Dictionary(10,HashIdentity.Structural) - - let registerReflectedDefinitions (assem : Assembly,rn,bytes:byte[]) = - let defns = unpickleDefns assem bytes - defns |> List.iter (fun (minfo,e) -> - //printfn "minfo = %A, handle = %A, token = %A" minfo minfo.Module.ModuleHandle minfo.MetadataToken - let key = ReflectedDefinitionTableKey.GetKey minfo - lock reflectedDefinitionTable (fun () -> - //printfn "Adding %A, hc = %d" key (key.GetHashCode()); - reflectedDefinitionTable.Add(key,Entry(e)))); - //System.Console.WriteLine("Added {0} resource {1}", assem.FullName, rn); - decodedTopResources.Add((assem,rn),0) - - let resolveMethodBase (mbase: MethodBase,tyargs: Type []) = - let data = - let assem = mbase.DeclaringType.Assembly - let key = ReflectedDefinitionTableKey.GetKey mbase - //printfn "Looking for %A, hc = %d, hc2 = %d" key (key.GetHashCode()) (assem.GetHashCode()); - let ok,res = lock reflectedDefinitionTable (fun () -> reflectedDefinitionTable.TryGetValue(key)) - if ok then Some(res) else - //System.Console.WriteLine("Loading {0}", td.Assembly); - let qdataResources = - // dynamic assemblies don't support the GetManifestResourceNames - match assem with - | :? System.Reflection.Emit.AssemblyBuilder -> [] - | _ -> - (try assem.GetManifestResourceNames() - // This raises NotSupportedException for dynamic assemblies - with :? NotSupportedException -> [| |]) - |> Array.to_list - |> List.filter (fun rn -> - //System.Console.WriteLine("Considering resource {0}", rn); - rn.StartsWith(ReflectedDefinitionsResourceNameBase,StringComparison.Ordinal) && - not (decodedTopResources.ContainsKey((assem,rn)))) - |> List.map (fun rn -> rn,unpickleDefns assem (readToEnd (assem.GetManifestResourceStream(rn)))) - - // ok, add to the table - let ok,res = - lock reflectedDefinitionTable (fun () -> - // check another thread didn't get in first - if not (reflectedDefinitionTable.ContainsKey(key)) then - qdataResources - |> List.iter (fun (rn,defns) -> - defns |> List.iter (fun (mbase,e) -> - reflectedDefinitionTable.[ReflectedDefinitionTableKey.GetKey mbase] <- Entry(e)); - decodedTopResources.Add((assem,rn),0)) - // we know it's in the table now, if it's ever going to be there - reflectedDefinitionTable.TryGetValue(key) - ); - - if ok then Some(res) else None - - match data with - | Some (Entry(exprBuilder)) -> - let expectedNumTypars = - getNumGenericArguments(mbase.DeclaringType) + - (match mbase with - | :? MethodInfo as minfo -> if minfo.IsGenericMethod then minfo.GetGenericArguments().Length else 0 - | _ -> 0) - if (expectedNumTypars <> tyargs.Length) then - invalidArg "tyargs" (sprintf "the method '%A' expects %d type arguments but %d were provided" mbase expectedNumTypars tyargs.Length); - Some(exprBuilder {typeInst = mkTyparSubst tyargs; vars=Map.Empty; varn=0}) - | None -> None - - let resolveMethodBaseInstantiated (mbase:MethodBase) = - match mbase with - | :? MethodInfo as minfo -> - let tyargs = - Array.append - (getGenericArguments(minfo.DeclaringType)) - (if minfo.IsGenericMethod then minfo.GetGenericArguments() else [| |]) - resolveMethodBase(mbase,tyargs) - | :? ConstructorInfo as cinfo -> - let tyargs = getGenericArguments(cinfo.DeclaringType) - resolveMethodBase(mbase,tyargs) - | _ -> - resolveMethodBase(mbase,[| |]) - - let deserialize(localAssembly,types,splices,bytes) : Expr = - let expr = unpickle_raw_expr localAssembly bytes (envClosed (Array.of_list types)) - fillHolesInRawExpr (Array.of_list splices) expr - - - let cast (expr: Expr) : Expr<'T> = - checkTypes (typeof<'T>) (typeOf expr) "expr" "the expression has the wrong type" - new Expr<'T>(expr.Tree,expr.CustomAttributes) - -open Patterns - - -type Expr with - member x.Substitute f = substituteRaw f x - member x.GetFreeVars () = (freeInExpr x :> seq<_>) - member x.Type = typeOf x - - static member AddressOf(e:Expr) = mkAddressOf(e) - static member AddressSet(e1:Expr,e2:Expr) = mkAddressSet(e1,e2) - static member Application(e1:Expr,e2:Expr) = mkApplication(e1,e2) - static member Applications(f:Expr,es) = mkApplications(f,es) - static member Call(meth:MethodInfo,args) = mkStaticMethodCall(meth,args) - static member Call(obj:Expr,meth:MethodInfo,args) = mkInstanceMethodCall(obj,meth,args) - static member Coerce(e:Expr,ty:Type) = mkCoerce(ty,e) - static member IfThenElse(g:Expr,t:Expr,e:Expr) = mkIfThenElse(g,t,e) - static member ForIntegerRangeLoop(v,start:Expr,finish:Expr,body:Expr) = mkForLoop(v,start,finish,body) - //static member Range: Expr * Expr -> Expr - //static member RangeStep: Expr * Expr * Expr -> Expr - static member FieldGet(finfo:FieldInfo) = mkStaticFieldGet(finfo) - static member FieldGet(obj:Expr,finfo:FieldInfo) = mkInstanceFieldGet(obj,finfo) - static member FieldSet(finfo:FieldInfo,v:Expr) = mkStaticFieldSet(finfo,v) - static member FieldSet(obj:Expr,finfo:FieldInfo,v:Expr) = mkInstanceFieldSet(obj,finfo,v) - static member Lambda(v:Var,e:Expr) = mkLambda(v,e) - //static member Lambdas(vs,e:Expr) = mkLambdas(vs,e) - static member Let(v:Var,e:Expr,b:Expr) = mkLet(v,e,b) - static member LetRec(binds,e:Expr) = mkLetRec(binds,e) - static member NewObject(cinfo:ConstructorInfo,args) = mkCtorCall(cinfo,args) - static member DefaultValue(ty:Type) = mkDefaultValue(ty) - static member NewTuple(es) = mkNewTuple(es) - static member NewRecord(ty:Type,args) = mkNewRecord(ty,args) - static member NewArray(ty:Type,es) = mkNewArray(ty,es) - static member NewDelegate(ty:Type,vs : Var list,body: Expr) = mkNewDelegate(ty,mkIteratedLambdas(vs, body)) - static member NewUnionCase(uc,es) = mkNewUnionCase(uc,es) - static member PropGet(obj:Expr,pinfo:PropertyInfo,?args) = mkInstancePropGet(obj,pinfo,(defaultArg args [])) - static member PropGet(pinfo:PropertyInfo,?args) = mkStaticPropGet(pinfo,(defaultArg args [])) - static member PropSet(obj:Expr,pinfo:PropertyInfo,value:Expr,?args) = mkInstancePropSet(obj,pinfo,(defaultArg args []),value) - static member PropSet(pinfo:PropertyInfo,value:Expr,?args) = mkStaticPropSet(pinfo,(defaultArg args []),value) - static member Quote(expr:Expr) = mkQuote(expr) - static member Sequential(e1:Expr,e2:Expr) = mkSequential(e1,e2) - static member TryWith(e1:Expr,v2:Var,e2:Expr,v3:Var,e3:Expr) = mkTryWith(e1,v2,e2,v3,e3) - static member TryFinally(e1:Expr,e2:Expr) = mkTryFinally(e1,e2) - static member TupleGet(e:Expr,n) = mkTupleGet(typeOf(e),n,e) - static member TypeTest(e:Expr,ty:Type) = mkTypeTest(e,ty) - static member UnionCaseTest(e:Expr,uci) = mkUnionCaseTest(uci,e) - static member Value(v:'T) = mkValue(box v, typeof<'T>) - static member Value(obj:obj,typ:Type) = mkValue(obj, typ) - static member Var(v) = mkVar(v) - static member VarSet(v,e:Expr) = mkVarSet(v,e) - static member WhileLoop(e1:Expr,e2:Expr) = mkWhileLoop(e1,e2) - //static member IsInlinedMethodInfo(minfo:MethodInfo) = false - static member TryGetReflectedDefinition(mbase:MethodBase) = resolveMethodBaseInstantiated(mbase) - static member Cast(expr:Expr) = cast expr - static member Deserialize(qualifyingType:Type,spliceTypes,spliceExprs,bytes) = deserialize(qualifyingType,spliceTypes,spliceExprs,bytes) - static member RegisterReflectedDefinitions(assembly:Assembly,nm,bytes) = registerReflectedDefinitions(assembly,nm,bytes) - static member GlobalVar<'T>(nm) : Expr<'T> = Expr.Var(Var.Global(nm,typeof<'T>)) |> Expr.Cast - -[] -module DerivedPatterns = - open Patterns - - let (|Bool|_|) = function ValueObj(:? bool as v) -> Some(v) | _ -> None - let (|String|_|) = function ValueObj(:? string as v) -> Some(v) | _ -> None - let (|Single|_|) = function ValueObj(:? single as v) -> Some(v) | _ -> None - let (|Double|_|) = function ValueObj(:? double as v) -> Some(v) | _ -> None - let (|Char|_|) = function ValueObj(:? char as v) -> Some(v) | _ -> None - let (|SByte|_|) = function ValueObj(:? sbyte as v) -> Some(v) | _ -> None - let (|Byte|_|) = function ValueObj(:? byte as v) -> Some(v) | _ -> None - let (|Int16|_|) = function ValueObj(:? int16 as v) -> Some(v) | _ -> None - let (|UInt16|_|) = function ValueObj(:? uint16 as v) -> Some(v) | _ -> None - let (|Int32|_|) = function ValueObj(:? int32 as v) -> Some(v) | _ -> None - let (|UInt32|_|) = function ValueObj(:? uint32 as v) -> Some(v) | _ -> None - let (|Int64|_|) = function ValueObj(:? int64 as v) -> Some(v) | _ -> None - let (|UInt64|_|) = function ValueObj(:? uint64 as v) -> Some(v) | _ -> None - let (|Unit|_|) = function Comb0(ValueOp(_,ty)) when ty = typeof -> Some() | _ -> None - - /// (fun (x,y) -> z) is represented as 'fun p -> let x = p#0 let y = p#1' etc. - /// This reverses this encoding. - let (|TupledLambda|_|) (lam: Expr) = - /// Strip off the 'let' bindings for an TupledLambda - let rec stripSuccessiveProjLets (p:Var) n expr = - match expr with - | Let(v1,TupleGet(Var(pA),m),rest) - when p = pA && m = n-> - let restvs,b = stripSuccessiveProjLets p (n+1) rest - v1::restvs, b - | _ -> ([],expr) - match lam.Tree with - | LambdaTerm(v,body) -> - match stripSuccessiveProjLets v 0 body with - | [],b -> Some([v], b) - | letvs,b -> Some(letvs,b) - | _ -> None - - let (|TupledApplication|_|) e = - match e with - | Application(f,x) -> - match x with - | Unit -> Some(f,[]) - | NewTuple(x) -> Some(f,x) - | x -> Some(f,[x]) - | _ -> None - - let (|Lambdas|_|) (e: Expr) = qOneOrMoreRLinear (|TupledLambda|_|) e - let (|Applications|_|) (e: Expr) = qOneOrMoreLLinear (|TupledApplication|_|) e - /// Reverse the compilation of And and Or - let (|AndAlso|_|) x = - match x with - | IfThenElse(x,y,Bool(false)) -> Some(x,y) - | _ -> None - - let (|OrElse|_|) x = - match x with - | IfThenElse(x,Bool(true),y) -> Some(x,y) - | _ -> None - - let (|SpecificCall|_|) templateParameter = - // Note: precomputation - match templateParameter with - | (Lambdas(_,Call(_,minfo1,_)) | Call(_,minfo1,_)) -> - let isg1 = minfo1.IsGenericMethod - let gmd = if isg1 then minfo1.GetGenericMethodDefinition() else null - - // end-of-precomputation - - (fun tm -> - match tm with - | Call(obj,minfo2,args) - when (minfo1.MetadataToken = minfo2.MetadataToken && - if isg1 then - minfo2.IsGenericMethod && gmd = minfo2.GetGenericMethodDefinition() - else - minfo1 = minfo2) -> - Some((minfo2.GetGenericArguments() |> Array.to_list),args) - | _ -> None) - | _ -> - invalidArg "templateParameter" "the parameter is not a recognized method name" - - - let (|MethodWithReflectedDefinition|_|) (minfo) = - Expr.TryGetReflectedDefinition(minfo) - - let (|PropertyGetterWithReflectedDefinition|_|) (pinfo:System.Reflection.PropertyInfo) = - Expr.TryGetReflectedDefinition(pinfo.GetGetMethod()) - - let (|PropertySetterWithReflectedDefinition|_|) (pinfo:System.Reflection.PropertyInfo) = - Expr.TryGetReflectedDefinition(pinfo.GetSetMethod()) - -[] -module ExprShape = - open Patterns - let RebuildShapeCombination(a:obj,args) = - // preserve the attributes - let op,attrs = unbox(a) - let e = - match op,args with - | AppOp,[f;x] -> mkApplication(f,x) - | IfThenElseOp,[g;t;e] -> mkIfThenElse(g,t,e) - | LetRecOp,[e1] -> mkLetRecRaw(e1) - | LetRecCombOp,_ -> mkLetRecCombRaw(args) - | LetOp,[e1;e2] -> mkLetRaw(e1,e2) - | NewRecordOp(ty),_ -> mkNewRecord(ty, args) - | NewUnionCaseOp(ucinfo),_ -> mkNewUnionCase(ucinfo, args) - | UnionCaseTestOp(ucinfo),[arg] -> mkUnionCaseTest(ucinfo,arg) - | NewTupleOp(ty),_ -> mkNewTupleWithType(ty, args) - | TupleGetOp(ty,i),[arg] -> mkTupleGet(ty,i,arg) - | InstancePropGetOp(pinfo),(obj::args) -> mkInstancePropGet(obj,pinfo,args) - | StaticPropGetOp(pinfo),[] -> mkStaticPropGet(pinfo,args) - | InstancePropSetOp(pinfo),obj::v::args -> mkInstancePropSet(obj,pinfo,args,v) - | StaticPropSetOp(pinfo),v::args -> mkStaticPropSet(pinfo,args,v) - | InstanceFieldGetOp(finfo),[obj] -> mkInstanceFieldGet(obj,finfo) - | StaticFieldGetOp(finfo),[] -> mkStaticFieldGet(finfo ) - | InstanceFieldSetOp(finfo),[obj;v] -> mkInstanceFieldSet(obj,finfo,v) - | StaticFieldSetOp(finfo),[v] -> mkStaticFieldSet(finfo,v) - | NewObjectOp minfo,_ -> mkCtorCall(minfo,args) - | DefaultValueOp(ty),_ -> mkDefaultValue(ty) - | StaticMethodCallOp(minfo),_ -> mkStaticMethodCall(minfo,args) - | InstanceMethodCallOp(minfo),obj::args -> mkInstanceMethodCall(obj,minfo,args) - | CoerceOp(ty),[arg] -> mkCoerce(ty,arg) - | NewArrayOp(ty),_ -> mkNewArray(ty,args) - | NewDelegateOp(ty),[arg] -> mkNewDelegate(ty,arg) - | SequentialOp,[e1;e2] -> mkSequential(e1,e2) - | TypeTestOp(ty),[e1] -> mkTypeTest(e1,ty) - | AddressOfOp,[e1] -> mkAddressOf(e1) - | VarSetOp,[E(VarTerm(v)); e] -> mkVarSet(v,e) - | AddressSetOp,[e1;e2] -> mkAddressSet(e1,e2) - | ForIntegerRangeLoopOp,[e1;e2;E(LambdaTerm(v,e3))] -> mkForLoop(v,e1,e2,e3) - | WhileLoopOp,[e1;e2] -> mkWhileLoop(e1,e2) - | ValueOp(v,ty),[] -> mkValue(v,ty) - | _ -> - //assert(false) - failwith "Unexpected error in mkConstApp" - EA(e.Tree,attrs) - - let rec (|ShapeVar|ShapeLambda|ShapeCombination|) e = - let rec loop expr = - let (E(t)) = expr - match t with - | VarTerm v -> ShapeVar(v) - | LambdaTerm(v,b) -> ShapeLambda(v,b) - | CombTerm(op,args) -> ShapeCombination(box (op,expr.CustomAttributes),args) - | HoleTerm _ -> invalidArg "expr" "Unexpected hole in expression" - loop (e :> Expr) -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/quotations.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/quotations.fsi deleted file mode 100644 index e50d8fd3..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/quotations.fsi +++ /dev/null @@ -1,350 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// Types and functions related to expression quotations -namespace Microsoft.FSharp.Quotations - -#if FX_MINIMAL_REFLECTION // not on Compact Framework -#else -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Reflection -open System -open System.Reflection - -[] -/// Information at the binding site of a variable -type Var = - /// The type associated with the variable - member Type : Type - /// The declared name of the variable - member Name : string - /// Indicates if the variable represents a mutable storage location - member IsMutable: bool - /// Create a new variable with the given name, type and mutability - new : name:string * typ:Type * ?isMutable : bool -> Var - /// Fetch or create a new variable with the given name and type from a global pool of shared variables - /// indexed by name and type - static member Global : name:string * typ:Type -> Var - - interface System.IComparable - -/// Quoted expressions annotated with System.Type values. -[] -type Expr = - - /// Substitute through the given expression using the given functions - /// to map variables to new values. The functions must give consistent results - /// at each application. Variable renaming may occur on the target expression - /// if variable capture occurs. - member Substitute : substitution:(Var -> Expr option) -> Expr - - /// Get the free expression variables of an expression as a list - member GetFreeVars : unit -> seq - - /// Returns type of an expression - member Type : Type - - /// Returns the custom attributes of an expression - member CustomAttributes : Expr list - - override Equals : obj:obj -> bool - - /// Build an expression that represents getting the address of a value - static member AddressOf : target:Expr -> Expr - - /// Build an expression that represents setting the value held at a particular address - static member AddressSet : target:Expr * value:Expr -> Expr - - /// Build an expression that represents the application of a first class function value to a single argument - static member Application: functionExpr:Expr * argument:Expr -> Expr - - /// Build an expression that represents the application of a first class function value to multiple arguments - static member Applications: functionExpr:Expr * arguments:list> -> Expr - - /// Build an expression that represents a call to an static method or module-bound function - static member Call : methodInfo:MethodInfo * arguments:list -> Expr - - /// Build an expression that represents a call to an instance method associated with an object - static member Call : obj:Expr * methodInfo:MethodInfo * arguments:list -> Expr - - /// Build an expression that represents the coercion of an expression to a type - static member Coerce : source:Expr * target:Type -> Expr - - /// Build 'if ... then ... else' expressions - static member IfThenElse : guard:Expr * thenExpr:Expr * elseExpr:Expr -> Expr - - /// Build a 'for i = ... to ... do ...' expression that represent loops over integer ranges - static member ForIntegerRangeLoop: loopVariable:Var * start:Expr * endExpr:Expr * body:Expr -> Expr - - /// Build an expression that represents the access of a static field - static member FieldGet: fieldInfo:FieldInfo -> Expr - - /// Build an expression that represents the access of a field of an object - static member FieldGet: obj:Expr * fieldInfo:FieldInfo -> Expr - - /// Build an expression that represents writing to a static field - static member FieldSet: fieldInfo:FieldInfo * value:Expr -> Expr - - /// Build an expression that represents writing to a field of an object - static member FieldSet: obj:Expr * fieldInfo:FieldInfo * value:Expr -> Expr - - /// Build an expression that represents the constrution of an F# function value - static member Lambda : parameter:Var * body:Expr -> Expr - - /// Build expressions associated with 'let' constructs - static member Let : letVariable:Var * letExpr:Expr * body:Expr -> Expr - - /// Build recursives expressions associated with 'let rec' constructs - static member LetRec : bindings:(Var * Expr) list * body:Expr -> Expr - - /// Build an expression that represents the invocation of an object constructor - static member NewObject: constructorInfo:ConstructorInfo * arguments:Expr list -> Expr - - - /// Build an expression that represents the invocation of a default object constructor - static member DefaultValue: expressionType:Type -> Expr - - - /// Build an expression that represents the creation of an F# tuple value - static member NewTuple: elements:Expr list -> Expr - - /// Build record-construction expressions - static member NewRecord: recordType:Type * elements:Expr list -> Expr - - /// Build an expression that represents the creation of an array value initialized with the given elements - static member NewArray: elementType:Type * elements:Expr list -> Expr - - /// Build an expression that represents the creation of a delegate value for the given type - static member NewDelegate: delegateType:Type * parameters:Var list * body:Expr -> Expr - - /// Build an expression that represents the creation of a union case value - static member NewUnionCase: unionCase:UnionCaseInfo * arguments:Expr list -> Expr - - /// Build an expression that represents reading a property of an object - static member PropGet: obj:Expr * property:PropertyInfo * ?indexerArgs: Expr list -> Expr - - /// Build an expression that represents reading a static property - static member PropGet: property:PropertyInfo * ?indexerArgs: Expr list -> Expr - - /// Build an expression that represents writing to a property of an object - static member PropSet: obj:Expr * property:PropertyInfo * value:Expr * ?indexerArgs: Expr list -> Expr - - /// Build an expression that represents writing to a static property - static member PropSet: property:PropertyInfo * value:Expr * ?indexerArgs: Expr list -> Expr - - /// Build an expression that represents a nested quotation literal - static member Quote: inner:Expr -> Expr - - /// Build an expression that represents the sequential execution of one expression followed by another - static member Sequential: first:Expr * second:Expr -> Expr - - /// Build an expression that represents a try/with construct for exception filtering and catching - static member TryWith: body:Expr * filterVar:Var * filterBody:Expr * catchVar:Var * catchBody:Expr -> Expr - - /// Build an expression that represents a try/finally construct - static member TryFinally: body:Expr * compensation:Expr -> Expr - - /// Build an expression that represents getting a field of a tuple - static member TupleGet: tuple:Expr * index:int -> Expr - - - /// Build an expression that represents a type test - static member TypeTest: source:Expr * target:Type -> Expr - - /// Build an expression that represents a test of a value is of a particular union case - static member UnionCaseTest: source:Expr * unionCase:UnionCaseInfo -> Expr - - /// Build an expression that represents a constant value of a particular type - static member Value : value:obj * expressionType:Type -> Expr - - /// Build an expression that represents a constant value - static member Value : value:'T -> Expr - - /// Build an expression that represents a variable - static member Var : variable:Var -> Expr - - /// Build an expression that represents setting a mutable variable - static member VarSet : variable:Var * value:Expr -> Expr - - /// Build an expression that represents a while loop - static member WhileLoop : guard:Expr * body:Expr -> Expr - - //---------------- - - - /// Return a new typed expression given an underlying runtime-typed expression. - /// A type annotation is usually required to use this function, and - /// using an incorrect type annotation may result in a later runtime exception. - static member Cast : source:Expr -> Expr<'T> - - /// Try and find a stored reflection definition for the given method. Stored reflection - /// definitions are added to an F# assembly through the use of the [<ReflectedDefinition>] attribute. - static member TryGetReflectedDefinition : methodBase:MethodBase -> Expr option - - /// This function is called automatically when quotation syntax (<@ @>) and related typed-expression - /// quotations are used. The bytes are a pickled binary representation of an unlinked form of the qutoed expression, - /// and the System.Type argument is any type in the assembly where the quoted - /// expression occurs, i.e. it helps scope the interpretation of the cross-assembly - /// references in the bytes. - static member Deserialize : qualifyingType:System.Type * spliceTypes:list * spliceExprs:list * value:byte[] -> Expr - - /// Permit interactive environments such as F# Interactive - /// to explicitly register new pickled resources that represent persisted - /// top level definitions. The string indicates a unique name for the resources - /// being added. The format for the bytes is the encoding generated by the F# compiler. - static member RegisterReflectedDefinitions: assembly:Assembly * resource:string * serializedValue:byte[] -> unit - - /// Fetch or create a new variable with the given name and type from a global pool of shared variables - /// indexed by name and type. The type is given by the expicit or inferred type parameter - static member GlobalVar<'T> : name:string -> Expr<'T> - - -/// Type-carrying quoted expressions. Expressions are generated either -/// by quotations in source text or programatically -and - [] - Expr<'T> = - inherit Expr - /// Get the raw expression associated with this type-carrying expression - member Raw : Expr - - -[] -/// Contains a set of primitive F# active patterns to analyze F# expression objects -module Patterns = - - /// An active pattern to recognize expressions that represent getting the address of a value - val (|AddressOf|_|) : input:Expr -> Expr option - /// An active pattern to recognize expressions that represent setting the value held at an address - val (|AddressSet|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions that represent applications of first class function values - val (|Application|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules - val (|Call|_|) : input:Expr -> (Expr option * MethodInfo * Expr list) option - /// An active pattern to recognize expressions that represent coercions from one type to another - val (|Coerce|_|) : input:Expr -> (Expr * Type) option - /// An active pattern to recognize expressions that represent getting a static or instance field - val (|FieldGet|_|) : input:Expr -> (Expr option * FieldInfo) option - /// An active pattern to recognize expressions that represent setting a static or instance field - val (|FieldSet|_|) : input:Expr -> (Expr option * FieldInfo * Expr) option - /// An active pattern to recognize expressions that represent loops over integer ranges - val (|ForIntegerRangeLoop|_|) : input:Expr -> (Var * Expr * Expr * Expr) option - /// An active pattern to recognize expressions that represent while loops - val (|WhileLoop|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions that represent conditionals - val (|IfThenElse|_|) : input:Expr -> (Expr * Expr * Expr) option - /// An active pattern to recognize expressions that represent first class function values - val (|Lambda|_|) : input:Expr -> (Var * Expr) option - /// An active pattern to recognize expressions that represent let bindings - val (|Let|_|) : input:Expr -> (Var * Expr * Expr) option - /// An active pattern to recognize expressions that represent recursive let bindings of one or more variables - val (|LetRec|_|) : input:Expr -> ((Var * Expr) list * Expr) option - /// An active pattern to recognize expressions that represent the construction of arrays - val (|NewArray|_|) : input:Expr -> (Type * Expr list) option - /// An active pattern to recognize expressions that represent invocations of a default constructor of a struct - val (|DefaultValue|_|) : input:Expr -> Type option - /// An active pattern to recognize expressions that represent construction of delegate values - val (|NewDelegate|_|) : input:Expr -> (Type * Var list * Expr) option - /// An active pattern to recognize expressions that represent invocation of object constructors - val (|NewObject|_|) : input:Expr -> (ConstructorInfo * Expr list) option - /// An active pattern to recognize expressions that represent construction of record values - val (|NewRecord|_|) : input:Expr -> (Type * Expr list) option - /// An active pattern to recognize expressions that represent construction of particular union case values - val (|NewUnionCase|_|) : input:Expr -> (UnionCaseInfo * Expr list) option - /// An active pattern to recognize expressions that represent construction of tuple values - val (|NewTuple|_|) : input:Expr -> (Expr list) option - /// An active pattern to recognize expressions that represent the read of a static or instance property, or a non-function value declared in a module - val (|PropGet|_|) : input:Expr -> (Expr option * PropertyInfo * Expr list) option - /// An active pattern to recognize expressions that represent setting a static or instance property, or a non-function value declared in a module - val (|PropSet|_|) : input:Expr -> (Expr option * PropertyInfo * Expr list * Expr) option - /// An active pattern to recognize expressions that represent a nested quotation literal - val (|Quote|_|) : input:Expr -> Expr option - /// An active pattern to recognize expressions that represent sequential exeuction of one expression followed by another - val (|Sequential|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions that represent a try/with construct for exception filtering and catching - val (|TryWith|_|) : input:Expr -> (Expr * Var * Expr * Var * Expr) option - /// An active pattern to recognize expressions that represent a try/finally construct - val (|TryFinally|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions that represent getting a tuple field - val (|TupleGet|_|) : input:Expr -> (Expr * int) option - /// An active pattern to recognize expressions that represent a dynamic type test - val (|TypeTest|_|) : input:Expr -> (Expr * Type) option - /// An active pattern to recognize expressions that represent a test if a value is of a particular union case - val (|UnionCaseTest|_|) : input:Expr -> (Expr * UnionCaseInfo) option - /// An active pattern to recognize expressions that represent a constant value - val (|Value|_|) : input:Expr -> (obj * Type) option - /// An active pattern to recognize expressions that represent a variable - val (|Var|_|) : input:Expr -> Var option - /// An active pattern to recognize expressions that represent setting a mutable variable - val (|VarSet|_|) : input:Expr -> (Var * Expr) option - - //---------------------------------------------------------------- - // Helpers - -[] -/// Contains a set of derived F# active patterns to analyze F# expression objects -module DerivedPatterns = - //val (|NewList|_|) : input:Expr -> Expr list option - /// An active pattern to recognize expressions that represent a (possibly curried or tupled) first class function value - val (|Lambdas|_|) : input:Expr -> (Var list list * Expr) option - /// An active pattern to recognize expressions that represent the application of a (possibly curried or tupled) first class function value - val (|Applications|_|) : input:Expr -> (Expr * Expr list list) option - /// An active pattern to recognize expressions of the form a && b - val (|AndAlso|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions of the form a || b - val (|OrElse|_|) : input:Expr -> (Expr * Expr) option - - /// An active pattern to recognize () constant expressions - val (|Unit|_|) : input:Expr -> unit option - /// An active pattern to recognize constant boolean expressions - val (|Bool|_|) : input:Expr -> bool option - /// An active pattern to recognize constant string expressions - val (|String|_|) : input:Expr -> string option - /// An active pattern to recognize constant 32-bit floating point number expressions - val (|Single|_|) : input:Expr -> float32 option - /// An active pattern to recognize constant 64-bit floating point number expressions - val (|Double|_|) : input:Expr -> float option - /// An active pattern to recognize constant unicode character expressions - val (|Char|_|) : input:Expr -> char option - /// An active pattern to recognize constant signed byte expressions - val (|SByte|_|) : input:Expr -> sbyte option - /// An active pattern to recognize constant byte expressions - val (|Byte|_|) : input:Expr -> byte option - /// An active pattern to recognize constant int16 expressions - val (|Int16|_|) : input:Expr -> int16 option - /// An active pattern to recognize constant unsigned int16 expressions - val (|UInt16|_|) : input:Expr -> uint16 option - /// An active pattern to recognize constant int32 expressions - val (|Int32|_|) : input:Expr -> int32 option - /// An active pattern to recognize constant unsigned int32 expressions - val (|UInt32|_|) : input:Expr -> uint32 option - /// An active pattern to recognize constant int64 expressions - val (|Int64|_|) : input:Expr -> int64 option - /// An active pattern to recognize constant unsigned int64 expressions - val (|UInt64|_|) : input:Expr -> uint64 option - /// A parameterized active pattern to recognize calls to a specified function or method - val (|SpecificCall|_|) : templateParameter:Expr -> (Expr -> (list * list) option) - - /// An active pattern to recognize methods that have an associated ReflectedDefinition - val (|MethodWithReflectedDefinition|_|) : methodBase:MethodBase -> Expr option - - /// An active pattern to recognize property getters or values in modules that have an associated ReflectedDefinition - val (|PropertyGetterWithReflectedDefinition|_|) : propertyInfo:PropertyInfo -> Expr option - /// An active pattern to recognize property setters that have an associated ReflectedDefinition - val (|PropertySetterWithReflectedDefinition|_|) : propertyInfo:PropertyInfo -> Expr option - -/// Active patterns for traversing, visiting, rebuilding and tranforming expressions in a generic way -[] -module ExprShape = - /// An active pattern that performs a complete decomposition viewing the expression tree as a binding structure - val (|ShapeVar|ShapeLambda|ShapeCombination|) : - input:Expr -> Choice)> // ConstApp - /// Re-build combination expressions. The first parameter should be an object - /// returned by the ShapeCombination case of the active pattern in this module. - val RebuildShapeCombination : shape:obj * arguments:list -> Expr - -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/reflect.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/reflect.fs deleted file mode 100644 index 580419eb..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/reflect.fs +++ /dev/null @@ -1,709 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -// -// Reflection on F# values. Analyze an object to see if it the representation -// of an F# value. -//========================================================================= - -namespace Microsoft.FSharp.Reflection - -open System -open System.Globalization -open System.Reflection -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Primitives.Basics - -module internal Impl = - - let debug = false - - let inline checkNonNull argName (v: 'T) = - match box v with - | null -> nullArg argName - | _ -> () - - let emptyArray arr = (Array.length arr = 0) - let nonEmptyArray arr = Array.length arr > 0 - - let isNamedType(typ:Type) = not (typ.IsArray || typ.IsByRef || typ.IsPointer) - - let equivHeadTypes (ty1:Type) (ty2:Type) = - isNamedType(ty1) && - if ty1.IsGenericType then - ty2.IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(ty2.GetGenericTypeDefinition()) - else - ty1.Equals(ty2) - - let option = typedefof - let func = typedefof<(obj -> obj)> - - let isOptionType typ = equivHeadTypes typ (typeof) - let isFunctionType typ = equivHeadTypes typ (typeof<(int -> int)>) - let isUnitType typ = equivHeadTypes typ (typeof) - let isListType typ = equivHeadTypes typ (typeof) - - let tuple1 = typedefof> - let tuple2 = typedefof - let tuple3 = typedefof - let tuple4 = typedefof - let tuple5 = typedefof - let tuple6 = typedefof - let tuple7 = typedefof - let tuple8 = typedefof - - let isTuple1Type typ = equivHeadTypes typ tuple1 - let isTuple2Type typ = equivHeadTypes typ tuple2 - let isTuple3Type typ = equivHeadTypes typ tuple3 - let isTuple4Type typ = equivHeadTypes typ tuple4 - let isTuple5Type typ = equivHeadTypes typ tuple5 - let isTuple6Type typ = equivHeadTypes typ tuple6 - let isTuple7Type typ = equivHeadTypes typ tuple7 - let isTuple8Type typ = equivHeadTypes typ tuple8 - - let isTupleType typ = - isTuple1Type typ - || isTuple2Type typ - || isTuple3Type typ - || isTuple4Type typ - || isTuple5Type typ - || isTuple6Type typ - || isTuple7Type typ - || isTuple8Type typ - - let maxTuple = 8 - // Which field holds the nested tuple? - let tupleEncField = maxTuple-1 - - let rec mkTupleType (tys: Type[]) = - match tys.Length with - | 1 -> tuple1.MakeGenericType(tys) - | 2 -> tuple2.MakeGenericType(tys) - | 3 -> tuple3.MakeGenericType(tys) - | 4 -> tuple4.MakeGenericType(tys) - | 5 -> tuple5.MakeGenericType(tys) - | 6 -> tuple6.MakeGenericType(tys) - | 7 -> tuple7.MakeGenericType(tys) - | n when n >= maxTuple -> - let tysA = tys.[0..tupleEncField-1] - let tysB = tys.[maxTuple-1..] - let tyB = mkTupleType tysB - tuple8.MakeGenericType(Array.append tysA [| tyB |]) - | _ -> invalidArg "tys" "this is not a valid tuple type for the F# reflection library" - - let instancePropertyFlags = BindingFlags.GetProperty ||| BindingFlags.Instance - let staticGetFieldFlags = BindingFlags.GetField ||| BindingFlags.Static - let instanceBindingFlags = BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly - - let getPropertyInfo (typ: Type,propName,bindingFlags) = typ.GetProperty(propName,instancePropertyFlags ||| bindingFlags) - let getPropertyInfos (typ,names,bindingFlags) = names |> Array.map (fun nm -> getPropertyInfo (typ,nm,bindingFlags)) - - let tryFindMemberCompilationMappingAttribute (info: MemberInfo) = - match info.GetCustomAttributes (typeof, false) with - | null | [| |] -> None - | res -> Some (res.[0] :?> CompilationMappingAttribute) - - let findMemberCompilationMappingAttribute (info: MemberInfo) = - match info.GetCustomAttributes (typeof, false) with - | null | [| |] -> failwith "the member did not have a compilation mapping attribute" - | res -> (res.[0] :?> CompilationMappingAttribute) - - let sequenceNumberOfMember (x: MemberInfo) = (findMemberCompilationMappingAttribute x).SequenceNumber - let variantNumberOfMember (x: MemberInfo) = (findMemberCompilationMappingAttribute x).VariantNumber - - let sortFreshArray f arr = Array.sortInPlaceWith f arr; arr - - let isFieldProperty (prop : PropertyInfo) = - match tryFindMemberCompilationMappingAttribute(prop) with - | None -> false - | Some attr -> (attr.SourceConstructFlags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.Field - - let fieldsPropsOfUnionCase((typ:Type), (tag:int),bindingFlags) = - if isOptionType typ then - match tag with - | 0 (* None *) -> getPropertyInfos (typ,[| |],bindingFlags) - | 1 (* Some *) -> getPropertyInfos (typ,[| "Value" |] ,bindingFlags) - | _ -> failwith "fieldsPropsOfUnionCase" - elif isListType typ then - match tag with - | 0 (* Nil *) -> getPropertyInfos (typ,[| |],bindingFlags) - | 1 (* Cons *) -> getPropertyInfos (typ,[| "Head"; "Tail" |],bindingFlags) - | _ -> failwith "fieldsPropsOfUnionCase" - else - typ.GetProperties(instancePropertyFlags ||| bindingFlags) - |> Array.filter isFieldProperty - |> Array.filter (fun prop -> variantNumberOfMember prop = tag) - |> sortFreshArray (fun p1 p2 -> compare (sequenceNumberOfMember p1) (sequenceNumberOfMember p2)) - - let emptyObjArray : obj[] = [| |] - - let callStaticMethod (typ:Type,name,args,bindingFlags) = -#if FX_NO_CULTURE_INFO_ARGS - typ.InvokeMember(name, BindingFlags.Static ||| BindingFlags.InvokeMethod ||| bindingFlags, null, null,args) -#else - typ.InvokeMember(name, BindingFlags.Static ||| BindingFlags.InvokeMethod ||| bindingFlags, null, null,args,CultureInfo.InvariantCulture(*FxCop:1304*)) -#endif - - let tryFindCompilationMappingAttribute (typ:Type) = - match typ.GetCustomAttributes (typeof, false) with - | null | [| |] -> None - | res -> Some(res.[0] :?> CompilationMappingAttribute) - - let tryFindSourceConstructFlagsOfType (typ:Type) = - match tryFindCompilationMappingAttribute typ with - | None -> None - | Some attr -> Some attr.SourceConstructFlags - - let rec getTupleTypeInfo (typ:Type) = - if not (isTupleType (typ) ) then invalidArg "typ" "the type is not a tuple type"; - let tyargs = typ.GetGenericArguments() - if tyargs.Length = maxTuple then - let tysA = tyargs.[0..tupleEncField-1] - let tyB = tyargs.[tupleEncField] - Array.append tysA (getTupleTypeInfo tyB) - else - tyargs - - - let getFunctionTypeInfo (typ:Type) = - if not (isFunctionType typ) then invalidArg "typ" "not a function type" - let tyargs = typ.GetGenericArguments() - tyargs.[0], tyargs.[1] - - let isUnionType (typ:Type,bindingFlags:BindingFlags) = - isOptionType typ || - isListType typ || - match tryFindSourceConstructFlagsOfType(typ) with - | None -> false - | Some(flags) -> - (flags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.SumType && - // We see private representations only if BindingFlags.NonPublic is set - (if (flags &&& SourceConstructFlags.NonpublicRepresentation) <> enum(0) then - (bindingFlags &&& BindingFlags.NonPublic) <> enum(0) - else - true) - - let isRecordType (typ:Type,bindingFlags:BindingFlags) = - match tryFindSourceConstructFlagsOfType(typ) with - | None -> false - | Some(flags) -> - (flags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.RecordType && - // We see private representations only if BindingFlags.NonPublic is set - (if (flags &&& SourceConstructFlags.NonpublicRepresentation) <> enum(0) then - (bindingFlags &&& BindingFlags.NonPublic) <> enum(0) - else - true) && - not (isTupleType typ) - - let isModuleType (typ:Type) = - match tryFindSourceConstructFlagsOfType(typ) with - | None -> false - | Some(flags) -> - (flags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.Module - - let fieldPropsOfRecordType(typ:Type,bindingFlags) = - typ.GetProperties(instancePropertyFlags ||| bindingFlags) - |> Array.filter isFieldProperty - |> sortFreshArray (fun p1 p2 -> compare (sequenceNumberOfMember p1) (sequenceNumberOfMember p2)) - - let rec isClosureRepr typ = - isFunctionType typ || - (match typ.BaseType with null -> false | bty -> isClosureRepr bty) - - let isFSharpObjectType typ = - match tryFindSourceConstructFlagsOfType(typ) with - | None -> false - | Some(flags) -> - (flags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.ObjectType - - let discriminatorNameFromSumConstructor (m:MethodInfo) = - let nm = m.Name - if (m.GetParameters()).Length = 0 then - if nm.Substring(0,4) = "get_" then nm.Substring(4) else nm - else - nm - - - let getUnionTypeTagFields (typ:Type,bindingFlags) = - typ.GetFields(staticGetFieldFlags ||| bindingFlags) - |> Array.filter (fun (f:FieldInfo) -> f.Name.Length > 4 && f.Name.Substring(0,4) = "tag_") - - |> sortFreshArray (fun f1 f2 -> compare (f1.GetValue(null) :?> int) (f1.GetValue(null) :?> int)) - - // Check the base type - if it is also an F# type then - // for the moment we know it is a Discriminated Union - let isConstructorRepr (typ:Type,bindingFlags:BindingFlags) = - let rec get (typ:Type) = isUnionType (typ,bindingFlags) || match typ.BaseType with null -> false | b -> get b - get typ - - let unionTypeOfUnionCaseType (typ:Type,bindingFlags) = - let rec get (typ:Type) = if isUnionType (typ,bindingFlags) then typ else match typ.BaseType with null -> typ | b -> get b - get typ - - // Check the base type - if it is also an F# type then - // for the moment we know it is a Discriminated Union - let isExceptionRepr (typ:Type,bindingFlags) = - match tryFindSourceConstructFlagsOfType(typ) with - | None -> false - | Some(flags) -> - ((flags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.Exception) && - // We see private representations only if BindingFlags.NonPublic is set - (if (flags &&& SourceConstructFlags.NonpublicRepresentation) <> enum(0) then - (bindingFlags &&& BindingFlags.NonPublic) <> enum(0) - else - true) - - let recdDescOfProps props = - props |> Array.to_list |> List.map (fun (p:PropertyInfo) -> p.Name, p.PropertyType) - - let getRecd obj (props:PropertyInfo[]) = - props |> Array.map (fun prop -> prop.GetValue(obj,null)) - - let getRecordReader(typ:Type,bindingFlags) = - let props = fieldPropsOfRecordType(typ,bindingFlags) - (fun (obj:obj) -> props |> Array.map (fun prop -> prop.GetValue(obj,null))) - - let getRecordConstructorMethod(typ:Type,bindingFlags) = - let props = fieldPropsOfRecordType(typ,bindingFlags) - let ctor = typ.GetConstructor(BindingFlags.Instance ||| bindingFlags,null,props |> Array.map (fun p -> p.PropertyType),null) - checkNonNull "typ" ctor; - ctor - - let getRecordConstructor(typ:Type,bindingFlags) = - let ctor = getRecordConstructorMethod(typ,bindingFlags) - (fun (args:obj[]) -> - ctor.Invoke(BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| bindingFlags,null,args,null)) - - let getTupleConstructorMethod(typ:Type,bindingFlags) = -#if FX_ATLEAST_40 - let props = typ.GetProperties() -#else - let props = typ.GetProperties() |> Array.rev -#endif - let ctor = typ.GetConstructor(BindingFlags.Instance ||| bindingFlags,null,props |> Array.map (fun p -> p.PropertyType),null) - checkNonNull "typ" ctor; - ctor - - let getTupleCtor(typ:Type,bindingFlags) = - let ctor = getTupleConstructorMethod(typ,bindingFlags) - (fun (args:obj[]) -> - ctor.Invoke(BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| bindingFlags,null,args,null)) - - let getPropertyReader (typ: Type,propName,bindingFlags) = - match getPropertyInfo(typ,propName,bindingFlags) with - | null -> None - | prop -> Some(fun (obj:obj) -> prop.GetValue(obj,instancePropertyFlags ||| bindingFlags,null,null,null)) - - let getRecordFieldReader (typ,propName,bindingFlags) = - match getPropertyReader (typ,propName,bindingFlags) with - | None -> failwith "getRecordFieldReader" - | Some reader -> reader - - let rec getTupleReader (typ:Type) = - let etys = typ.GetGenericArguments() - // Get the reader for the outer tuple record -#if FX_ATLEAST_40 - let props = typ.GetProperties(instancePropertyFlags ||| BindingFlags.Public) -#else - let props = typ.GetProperties(instancePropertyFlags ||| BindingFlags.Public) |> Array.rev -#endif - let reader = (fun (obj:obj) -> props |> Array.map (fun prop -> prop.GetValue(obj,null))) - if etys.Length < maxTuple - then reader - else - let tyBenc = etys.[tupleEncField] - let reader2 = getTupleReader(tyBenc) - (fun obj -> - let directVals = reader obj - let encVals = reader2 directVals.[tupleEncField] - Array.append directVals.[0..tupleEncField-1] encVals) - - let rec getTupleConstructor (typ:Type) = - let etys = typ.GetGenericArguments() - let maker1 = getTupleCtor (typ,BindingFlags.Public) - if etys.Length < maxTuple - then maker1 - else - let tyBenc = etys.[tupleEncField] - let maker2 = getTupleConstructor(tyBenc) - (fun (args:obj[]) -> - let encVal = maker2 args.[tupleEncField..] - maker1 (Array.append args.[0..tupleEncField-1] [| encVal |])) - - let getTupleConstructorInfo (typ:Type) = - let etys = typ.GetGenericArguments() - let maker1 = getTupleConstructorMethod (typ,BindingFlags.Public) - if etys.Length < maxTuple then - maker1,None - else - maker1,Some(etys.[tupleEncField]) - - let getTupleReaderInfo (typ:Type,index:int) = - - if index < 0 then invalidArg "index" "the tuple index was out of range" -#if FX_ATLEAST_40 - let props = typ.GetProperties(instancePropertyFlags ||| BindingFlags.Public) -#else - let props = typ.GetProperties(instancePropertyFlags ||| BindingFlags.Public) |> Array.rev -#endif - let get index = - if index >= props.Length then invalidArg "index" "the tuple index was out of range" - props.[index] - - if index < tupleEncField then - get index, None - else - let etys = typ.GetGenericArguments() - get tupleEncField, Some(etys.[tupleEncField],index-(maxTuple-1)) - - let getUnionCaseRecordReader (typ:Type,tag:int,bindingFlags) = - let props = fieldsPropsOfUnionCase(typ,tag,bindingFlags) - (fun (obj:obj) -> props |> Array.map (fun prop -> prop.GetValue(obj,bindingFlags,null,null,null))) - - let getUnionTagReader (typ:Type,bindingFlags) = - if isOptionType typ then (function null -> 0 | _ -> 1) - else - let tagreader = - match getPropertyReader (typ,"Tag",bindingFlags) with - | Some reader -> reader - | None -> (fun obj -> callStaticMethod(typ,"GetTag",[|obj|],bindingFlags)) - (fun obj -> (tagreader obj :?> int)) - - let getUnionTagMemberInfo (typ:Type,bindingFlags) = - match getPropertyInfo (typ,"Tag",bindingFlags) with - | null -> (typ.GetMethod("GetTag",BindingFlags.Static ||| bindingFlags) :> MemberInfo) - | info -> (info :> MemberInfo) - - let getUnionTypeTagNameMap (typ:Type,bindingFlags) = - getUnionTypeTagFields(typ,bindingFlags) - |> Array.map (fun tagfield -> - let constrname = tagfield.Name.Substring(4,tagfield.Name.Length - 4) - (tagfield.GetValue(null) :?> int),constrname) - - let getUnionTagConverter (typ:Type,bindingFlags) = - if isOptionType typ then (fun tag -> match tag with 0 -> "None" | 1 -> "Some" | _ -> invalidArg "tag" "tag out of range") - elif isListType typ then (fun tag -> match tag with 0 -> "Empty" | 1 -> "Cons" | _ -> invalidArg "tag" "tag out of range") - else - let tagfieldmap = getUnionTypeTagNameMap(typ,bindingFlags) |> Map.of_seq - (fun tag -> tagfieldmap.[tag]) - - let swap (x,y) = (y,x) - - let getUnionTagConverters (typ:Type,bindingFlags) = - let tagfields = getUnionTypeTagNameMap(typ,bindingFlags) - let tagfieldmap1 = tagfields |> Map.of_seq - let tagfieldmap2 = tagfields |> Array.map swap |> Map.of_seq - tagfields.Length, (fun tag -> tagfieldmap1.[tag]), (fun tag -> tagfieldmap2.[tag]) - - let getUnionCaseConstructorMethod (typ:Type,tag:int,bindingFlags) = - let props = fieldsPropsOfUnionCase(typ,tag,bindingFlags) - let constrname = getUnionTagConverter (typ,bindingFlags) tag - let methname = if emptyArray props then "get_"+constrname else constrname - match typ.GetMethod(methname, BindingFlags.Static ||| bindingFlags) with - | null -> failwith ("the constructor method '" + methname + "' for the union case could not be found") - | meth -> meth - - let getUnionCaseConstructor (typ:Type,tag:int,bindingFlags) = - let meth = getUnionCaseConstructorMethod (typ,tag,bindingFlags) - (fun args -> - meth.Invoke(null,BindingFlags.Static ||| BindingFlags.InvokeMethod ||| bindingFlags,null,args,null)) - - let getTypeOfReprType (typ:Type,bindingFlags) = - if isExceptionRepr(typ,bindingFlags) then typ.BaseType - elif isConstructorRepr(typ,bindingFlags) then unionTypeOfUnionCaseType(typ,bindingFlags) - elif isClosureRepr(typ) then - let rec get (typ:Type) = if isFunctionType typ then typ else match typ.BaseType with null -> typ | b -> get b - get typ - else typ - - - let ensureType (typ:Type,obj:obj,bindingFlags) = - match typ with - | null -> - match obj with - | null -> invalidArg "obj" "the object is null and no type was given" - | _ -> obj.GetType() - | _ -> typ - - - let checkUnionType(unionType,bindingFlags) = - checkNonNull "unionType" unionType; - if not (isUnionType (unionType,bindingFlags)) then - if isUnionType (unionType,bindingFlags ||| BindingFlags.NonPublic) then - invalidArg "unionType" "The type is a union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations" - else - invalidArg "unionType" "The type is not a union type" - - let checkExnType(exceptionType,bindingFlags) = - if not (isExceptionRepr (exceptionType,bindingFlags)) then - if isExceptionRepr (exceptionType,bindingFlags ||| BindingFlags.NonPublic) then - invalidArg "exceptionType" "The type is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations" - else - invalidArg "exceptionType" "The type is not the representation of an F# exception declaration" - - - // inline lets FxCop check that argument names match those given - let checkRecordType(argName,recordType,bindingFlags) = - checkNonNull "recordType" recordType; - if not (isRecordType (recordType,bindingFlags) ) then - if isRecordType (recordType,bindingFlags ||| BindingFlags.NonPublic) then - invalidArg "recordType" "The type is a record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations" - else - invalidArg "recordType" "The type is not a record type" - - let checkTupleType(argName,tupleType) = - checkNonNull argName tupleType; - if not (isTupleType tupleType) then invalidArg argName "the type is not a tuple type" - -[] -type UnionCaseInfo(typ: System.Type, tag:int) = - // Cache the tag -> name map - let mutable names = None - member x.Name = - match names with - | None -> (let conv = Impl.getUnionTagConverter (typ,BindingFlags.Public ||| BindingFlags.NonPublic) in names <- Some(conv); conv tag) - | Some(conv) -> conv tag - - member x.DeclaringType = typ - //member x.CustomAttributes = failwith "nyi" - member x.GetFields() = Impl.fieldsPropsOfUnionCase(typ,tag,BindingFlags.Public ||| BindingFlags.NonPublic) - - member x.GetCustomAttributes() = - let methInfo = Impl.getUnionCaseConstructorMethod (typ,tag,BindingFlags.Public ||| BindingFlags.NonPublic) - methInfo.GetCustomAttributes(false) - - member x.GetCustomAttributes(attributeType) = - let methInfo = Impl.getUnionCaseConstructorMethod (typ,tag,BindingFlags.Public ||| BindingFlags.NonPublic) - methInfo.GetCustomAttributes(attributeType,false) - - member x.Tag = tag - override x.ToString() = typ.Name + "." + x.Name - override x.GetHashCode() = typ.GetHashCode() + tag - override x.Equals(obj:obj) = - match obj with - | :? UnionCaseInfo as uci -> uci.DeclaringType = typ && uci.Tag = tag - | _ -> false - - -[] -type FSharpType = - - static member IsTuple(typ:Type) = - Impl.checkNonNull "typ" typ; - Impl.isTupleType typ - - static member IsRecord(typ:Type,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkNonNull "typ" typ; - Impl.isRecordType (typ,bindingFlags) - - static member IsUnion(typ:Type,?bindingFlags) = - Impl.checkNonNull "typ" typ; - let typ = Impl.getTypeOfReprType (typ ,BindingFlags.Public ||| BindingFlags.NonPublic) - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.isUnionType (typ,bindingFlags) - - static member IsFunction(typ:Type) = - Impl.checkNonNull "typ" typ; - let typ = Impl.getTypeOfReprType (typ ,BindingFlags.Public ||| BindingFlags.NonPublic) - Impl.isFunctionType typ - - static member IsModule(typ:Type) = - Impl.checkNonNull "typ" typ; - Impl.isModuleType typ - - static member MakeFunctionType(domain:Type,range:Type) = - Impl.checkNonNull "domain" domain; - Impl.checkNonNull "range" range; - Impl.func.MakeGenericType [| domain; range |] - - static member MakeTupleType(types:Type[]) = - Impl.checkNonNull "types" types; - if types |> Array.exists (function null -> true | _ -> false) then - invalidArg "types" "one of the types is null" - Impl.mkTupleType types - - static member GetTupleElements(tupleType:Type) = - Impl.checkTupleType("tupleType",tupleType); - Impl.getTupleTypeInfo tupleType - - static member GetFunctionElements(functionType:Type) = - Impl.checkNonNull "functionType" functionType; - let functionType = Impl.getTypeOfReprType (functionType ,BindingFlags.Public ||| BindingFlags.NonPublic) - Impl.getFunctionTypeInfo functionType - - static member GetRecordFields(recordType:Type,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkRecordType("recordType",recordType,bindingFlags); - Impl.fieldPropsOfRecordType(recordType,bindingFlags) - - static member GetUnionCases (unionType:Type,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - let unionType = Impl.getTypeOfReprType (unionType ,bindingFlags) - Impl.checkUnionType(unionType,bindingFlags); - Impl.getUnionTypeTagFields(unionType,bindingFlags) |> Array.mapi (fun i _ -> UnionCaseInfo(unionType,i)) - - static member IsExceptionRepresentation(typ:Type, ?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkNonNull "typ" typ; - Impl.isExceptionRepr(typ,bindingFlags) - - static member GetExceptionFields(exceptionType:Type, ?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkExnType(exceptionType,bindingFlags); - Impl.fieldPropsOfRecordType (exceptionType,bindingFlags) - -type DynamicFunction<'T1,'T2> = - static member Make(impl : obj -> obj) : obj = - box<('T1 -> 'T2)> (fun inp -> unbox<'T2>(impl (box<'T1>(inp)))) - - -[] -type FSharpValue = - - static member MakeRecord(recordType:Type,args,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkRecordType("recordType",recordType,bindingFlags); - Impl.getRecordConstructor (recordType,bindingFlags) args - - static member GetRecordField(record:obj,info:PropertyInfo) = - Impl.checkNonNull "info" info; - Impl.checkNonNull "record" record; - let reprty = record.GetType() - if not (Impl.isRecordType(reprty,BindingFlags.Public ||| BindingFlags.NonPublic)) then invalidArg "record" "the object is not an F# record value"; - info.GetValue(record,null) - - static member GetRecordFields(record:obj,?bindingFlags) = - Impl.checkNonNull "record" record; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - let typ = record.GetType() - if not (Impl.isRecordType(typ,bindingFlags)) then invalidArg "record" "the object is not an F# record value"; - Impl.getRecordReader (typ,bindingFlags) record - - static member PreComputeRecordFieldReader(info:PropertyInfo) = - Impl.checkNonNull "info" info; - (fun (obj:obj) -> info.GetValue(obj,null)) - - static member PreComputeRecordReader(recordType:Type,?bindingFlags) : (obj -> obj[]) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkRecordType("recordType",recordType,bindingFlags); - Impl.getRecordReader (recordType,bindingFlags) - - static member PreComputeRecordConstructor(recordType:Type,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkRecordType("recordType",recordType,bindingFlags); - Impl.getRecordConstructor (recordType,bindingFlags) - - static member PreComputeRecordConstructorInfo(recordType:Type, ?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkRecordType("recordType",recordType,bindingFlags); - Impl.getRecordConstructorMethod(recordType,bindingFlags) - - - static member MakeFunction(functionType:Type,implementation:(obj->obj)) = - Impl.checkNonNull "functionType" functionType; - if not (Impl.isFunctionType functionType) then invalidArg "functionType" "not a function type"; - Impl.checkNonNull "implementation" implementation; - let domain,range = Impl.getFunctionTypeInfo functionType - let dynCloMakerTy = typedefof> - let saverTy = dynCloMakerTy.MakeGenericType [| domain; range |] -#if FX_NO_CULTURE_INFO_ARGS - saverTy.InvokeMember("Make",BindingFlags.Static ||| BindingFlags.InvokeMethod ||| BindingFlags.Public ||| BindingFlags.NonPublic,null,null,[| box implementation |]) -#else - saverTy.InvokeMember("Make",BindingFlags.Static ||| BindingFlags.InvokeMethod ||| BindingFlags.Public ||| BindingFlags.NonPublic,null,null,[| box implementation |],CultureInfo.InvariantCulture(*FxCop:1304*)) -#endif - - static member MakeTuple(tupleElements: obj[],tupleType:Type) = - Impl.checkNonNull "tupleElements" tupleElements; - Impl.checkTupleType("tupleType",tupleType) - Impl.getTupleConstructor tupleType tupleElements - - static member GetTupleFields(tuple:obj) = // argument name(s) used in error message - Impl.checkNonNull "tuple" tuple; - let typ = tuple.GetType() - if not (Impl.isTupleType typ ) then invalidArg "tuple" "the object is not a tuple"; - Impl.getTupleReader typ tuple - - static member GetTupleField(tuple:obj,index:int) = // argument name(s) used in error message - Impl.checkNonNull "tuple" tuple; - let typ = tuple.GetType() - if not (Impl.isTupleType typ ) then invalidArg "tuple" "the object is not a tuple"; - let fields = Impl.getTupleReader typ tuple - if index < 0 || index >= fields.Length then invalidArg "index" "tuple field index out of range"; - fields.[index] - - static member PreComputeTupleReader(tupleType:Type) : (obj -> obj[]) = - Impl.checkTupleType("tupleType",tupleType) - Impl.getTupleReader tupleType - - static member PreComputeTuplePropertyInfo(tupleType:Type,index:int) = - Impl.checkTupleType("tupleType",tupleType) - Impl.getTupleReaderInfo (tupleType,index) - - static member PreComputeTupleConstructor(tupleType:Type) = - Impl.checkTupleType("tupleType",tupleType) - Impl.getTupleConstructor tupleType - - static member PreComputeTupleConstructorInfo(tupleType:Type) = - Impl.checkTupleType("tupleType",tupleType) - Impl.getTupleConstructorInfo (tupleType) - - static member MakeUnion(unionCase:UnionCaseInfo,args: obj [],?bindingFlags) = - Impl.checkNonNull "unionCase" unionCase; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.getUnionCaseConstructor (unionCase.DeclaringType,unionCase.Tag,bindingFlags) args - - static member PreComputeUnionConstructor (unionCase:UnionCaseInfo,?bindingFlags) = - Impl.checkNonNull "unionCase" unionCase; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.getUnionCaseConstructor (unionCase.DeclaringType,unionCase.Tag,bindingFlags) - - static member PreComputeUnionConstructorInfo(unionCase:UnionCaseInfo, ?bindingFlags) = - Impl.checkNonNull "unionCase" unionCase; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.getUnionCaseConstructorMethod (unionCase.DeclaringType,unionCase.Tag,bindingFlags) - - static member GetUnionFields(obj:obj,unionType:Type,?bindingFlags) = - //System.Console.WriteLine("typ1 = {0}",box unionType) - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - let unionType = Impl.ensureType(unionType,obj,bindingFlags) - //System.Console.WriteLine("typ2 = {0}",box unionType) - Impl.checkNonNull "unionType" unionType; - let unionType = Impl.getTypeOfReprType (unionType ,bindingFlags) - //System.Console.WriteLine("typ3 = {0}",box unionType) - Impl.checkUnionType(unionType,bindingFlags); - let tag = Impl.getUnionTagReader (unionType,bindingFlags) obj - let flds = Impl.getUnionCaseRecordReader (unionType,tag,bindingFlags) obj - UnionCaseInfo(unionType,tag), flds - - static member PreComputeUnionTagReader(unionType: Type,?bindingFlags) : (obj -> int) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkNonNull "unionType" unionType; - let unionType = Impl.getTypeOfReprType (unionType ,bindingFlags) - Impl.checkUnionType(unionType,bindingFlags); - Impl.getUnionTagReader (unionType ,bindingFlags) - - static member PreComputeUnionTagMemberInfo(unionType: Type,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkNonNull "unionType" unionType; - let unionType = Impl.getTypeOfReprType (unionType ,bindingFlags) - Impl.checkUnionType(unionType,bindingFlags); - Impl.getUnionTagMemberInfo(unionType ,bindingFlags) - - static member PreComputeUnionReader(unionCase: UnionCaseInfo,?bindingFlags) : (obj -> obj[]) = - Impl.checkNonNull "unionCase" unionCase; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - let typ = unionCase.DeclaringType - Impl.getUnionCaseRecordReader (typ,unionCase.Tag,bindingFlags) - - - static member GetExceptionFields(exn:obj, ?bindingFlags) = - Impl.checkNonNull "exn" exn; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - let typ = exn.GetType() - Impl.checkExnType(typ,bindingFlags); - Impl.getRecordReader (typ,bindingFlags) exn - - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/reflect.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/reflect.fsi deleted file mode 100644 index 3b757295..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/reflect.fsi +++ /dev/null @@ -1,223 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// This namespace contains constructs for reflecting on the representation of -/// F# values and types. It augments the design of System.Reflection. -namespace Microsoft.FSharp.Reflection - -open System -open System.Reflection -open Microsoft.FSharp.Core -open Microsoft.FSharp.Primitives.Basics -open Microsoft.FSharp.Collections - -//--------------------------------------------------------------------- -// F# reified type inspection. - -///Represents a case of a discriminated union type -[] -type UnionCaseInfo = - /// The name of the case - member Name : string - /// The type in which the case occurs - member DeclaringType: Type - - /// Return the custom attributes associated with the case - member GetCustomAttributes: unit -> obj[] - /// Return the custom attributes associated with the case matching the given attribute type - member GetCustomAttributes: attributeType:System.Type -> obj[] - - /// The fields associated with the case, represented by PropertyInfo - member GetFields: unit -> PropertyInfo [] - - /// The integer tag for the case - member Tag: int - - -[] -/// Contains operations associated with constructing and analyzing values associated with F# types such as records, unions and tuples -type FSharpValue = - - /// Create an instance of a record type - /// - /// Assumes the given input is a record type. If not, ArgumentException is raised. - static member MakeRecord: recordType:Type * values:obj [] * ?bindingFlags:BindingFlags -> obj - - /// Read a field from a record value - /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. - static member GetRecordField: record:obj * info:PropertyInfo -> obj - - /// Read all the fields from a record value - /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. - static member GetRecordFields: record:obj * ?bindingFlags:BindingFlags -> obj[] - - - /// Precompute a function for reading a particular field from a record. - /// Assumes the given type is a RecordType with a field of the given name. - /// If not, ArgumentException is raised during pre-computation. - /// - /// Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo - /// because the path executed by the computed function is optimized given the knowledge that it will be - /// used to read values of the given type. - static member PreComputeRecordFieldReader : info:PropertyInfo -> (obj -> obj) - - /// Precompute a function for reading all the fields from a record. The fields are returned in the - /// same order as the fields reported by a call to Microsoft.FSharp.Reflection.Type.GetInfo for - /// this type. - /// - /// Assumes the given type is a RecordType. - /// If not, ArgumentException is raised during pre-computation. - /// - /// Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo - /// because the path executed by the computed function is optimized given the knowledge that it will be - /// used to read values of the given type. - static member PreComputeRecordReader : recordType:Type * ?bindingFlags:BindingFlags -> (obj -> obj[]) - - - /// Precompute a function for constructing a record value. - /// - /// Assumes the given type is a RecordType. - /// If not, ArgumentException is raised during pre-computation. - static member PreComputeRecordConstructor : recordType:Type * ?bindingFlags:BindingFlags -> (obj[] -> obj) - - /// Get a ConstructorInfo for a record type - static member PreComputeRecordConstructorInfo: recordType:Type * ?bindingFlags:BindingFlags -> ConstructorInfo - - /// Create a union case value - static member MakeUnion: unionCase:UnionCaseInfo * args:obj [] * ?bindingFlags:BindingFlags -> obj - - /// Identify the union case and its fields for an object - /// - /// Assumes the given input is a union case value. If not, ArgumentException is raised. - /// - /// If the type is not given, then the runtime type of the input object is used to identify the - /// relevant union type. The type should always be given if the input object may be null. For example, - /// option values may be represented using the 'null'. - static member GetUnionFields: value:obj * unionType:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo * obj [] - - /// - /// Assumes the given type is a union type. - /// If not, ArgumentException is raised during pre-computation. - /// - /// Using the computed function is more efficient than calling GetUnionCase - /// because the path executed by the computed function is optimized given the knowledge that it will be - /// used to read values of the given type. - static member PreComputeUnionTagReader : unionType:Type * ?bindingFlags:BindingFlags -> (obj -> int) - - /// Precompute a property or static method for reading an integer representing the case tag of a union type. - static member PreComputeUnionTagMemberInfo : unionType:Type * ?bindingFlags:BindingFlags -> MemberInfo - - /// Precompute a function for reading all the fields for a particular discriminator case of a union type - /// - /// Using the computed function will typically be faster than executing a corresponding call to GetFields - static member PreComputeUnionReader : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj -> obj[]) - - /// Precompute a function for constructing a discriminated union value for a particular union case. - static member PreComputeUnionConstructor : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj[] -> obj) - - /// A method that constructs objects of the given case - static member PreComputeUnionConstructorInfo: unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> MethodInfo - - /// Create an instance of a tuple type - /// - /// Assumes at least one element is given. If not, ArgumentException is raised. - static member MakeTuple: tupleElements:obj[] * tupleType:Type -> obj - - /// Read a field from a tuple value - /// - /// Assumes the given input is a tuple value. If not, ArgumentException is raised. - static member GetTupleField: tuple:obj * index:int -> obj - - /// Read all fields from a tuple - /// - /// Assumes the given input is a tuple value. If not, ArgumentException is raised. - static member GetTupleFields: tuple:obj -> obj [] - - /// Precompute a function for reading the values of a particular tuple type - /// - /// Assumes the given type is a TupleType. - /// If not, ArgumentException is raised during pre-computation. - static member PreComputeTupleReader : tupleType:Type -> (obj -> obj[]) - - /// Get information that indicates how to read a field of a tuple - static member PreComputeTuplePropertyInfo: tupleType:Type * index:int -> PropertyInfo * (Type * int) option - - /// Precompute a function for reading the values of a particular tuple type - /// - /// Assumes the given type is a TupleType. - /// If not, ArgumentException is raised during pre-computation. - static member PreComputeTupleConstructor : tupleType:Type -> (obj[] -> obj) - - /// Get a method that constructs objects of the given tuple type. - /// For small tuples, no additional typoe will be returned. - /// - /// For large tuples, an additional type is returned indicating that - /// a nested encoding has been used for the tuple type. In this case - /// the suffix portion of the tuple type has the given type and an - /// object of this type must be created and passed as the last argument - /// to the ConstructorInfo. A recursive call to PreComputeTupleConstructorInfo - /// can be used to determine the constructor for that the suffix type. - static member PreComputeTupleConstructorInfo: tupleType:Type -> ConstructorInfo * Type option - - /// Build a typed function from object from a dynamic function implementation - static member MakeFunction : functionType:Type * implementation:(obj -> obj) -> obj - - /// Read all the fields from a value built using an instance of an F# exception declaration - /// - /// Assumes the given input is an F# exception value. If not, ArgumentException is raised. - static member GetExceptionFields: exn:obj * ?bindingFlags:BindingFlags -> obj[] - - -[] -/// Contains operations associated with constructing and analyzing F# types such as records, unions and tuples -type FSharpType = - - /// Read all the fields from a record value, in declaration order - /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. - static member GetRecordFields: recordType:Type * ?bindingFlags:BindingFlags -> PropertyInfo[] - - /// Get the cases of a union type. - /// - /// Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. - static member GetUnionCases: unionType:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo[] - - /// Return a System.Type representing the F# function type with the given domain and range - static member MakeFunctionType: domain:Type * range:Type -> Type - - /// Return a System.Type representing an F# tuple type with the given element types - static member MakeTupleType: types:Type[] -> Type - - /// Return true if the typ is a representation of an F# tuple type - static member IsTuple : typ:Type -> bool - - /// Return true if the typ is a representation of an F# function type or the runtime type of a closure implementing an F# function type - static member IsFunction : typ:Type -> bool - - /// Return true if the typ is a System.Type value corresponding to the compiled form of an F# module - static member IsModule: typ:Type -> bool - - /// Return true if the typ is a representation of an F# record type - static member IsRecord: typ:Type * ?bindingFlags:BindingFlags -> bool - - /// Return true if the typ is a representation of an F# union type or the runtime type of a value of that type - static member IsUnion: typ:Type * ?bindingFlags:BindingFlags -> bool - - /// Get the tuple elements from the representation of an F# tuple type - static member GetTupleElements : tupleType:Type -> Type[] - - /// Get the domain and range types from an F# function type or from the runtime type of a closure implementing an F# type - static member GetFunctionElements : functionType:Type -> Type * Type - - /// Read all the fields from an F# exception declaration, in declaration order - /// - /// Assumes exceptionType is an exception representation type. If not, ArgumentException is raised. - static member GetExceptionFields: exceptionType:Type * ?bindingFlags:BindingFlags -> PropertyInfo[] - - /// Return true if the typ is a representation of an F# exception declaration - static member IsExceptionRepresentation: exceptionType:Type * ?bindingFlags:BindingFlags -> bool - - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/seq.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/seq.fs deleted file mode 100644 index 22d59ceb..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/seq.fs +++ /dev/null @@ -1,1369 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Control - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - open System.Collections - open System.Collections.Generic - - module IEnumerator = - - - let noReset() = raise (new System.NotSupportedException("Reset is not supported on this enumerator.")) - let notStarted() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext.")) - let alreadyFinished() = raise (new System.InvalidOperationException("Enumeration already finished.")) - let check started = if not started then notStarted() - let dispose (r : System.IDisposable) = r.Dispose() - - let cast (e : IEnumerator) : IEnumerator<'T> = - { new IEnumerator<'T> with - member x.Current = unbox e.Current - interface IEnumerator with - member x.Current = unbox e.Current - member x.MoveNext() = e.MoveNext() - member x.Reset() = noReset(); - interface System.IDisposable with - member x.Dispose() = - match e with - | :? System.IDisposable as e -> e.Dispose() - | _ -> () } - - /// A concrete implementation of an enumerator that returns no values - [] - type EmptyEnumerator<'T>() = - let mutable started = false - interface IEnumerator<'T> with - member x.Current = - check started; - (alreadyFinished() : 'T) - - interface System.Collections.IEnumerator with - member x.Current = - check started; - (alreadyFinished() : obj) - member x.MoveNext() = - if not started then started <- true; - false - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = () - - let Empty () = (new EmptyEnumerator<'T>() :> IEnumerator<'T>) - - let rec nth index (e : IEnumerator<'T>) = - if not (e.MoveNext()) then invalidArg "index" "not enough elements in the sequence"; - if index < 0 then invalidArg "index" "negative index requested"; - if index = 0 then e.Current - else nth (index-1) e - - type MapEnumeratorState = NotStarted | InProcess | Finished - - [] - type MapEnumerator<'T> () = - let mutable state = NotStarted - [] - val mutable curr : 'T - - member this.GetCurrent () = - match state with - | NotStarted -> notStarted() - | Finished -> alreadyFinished() - | InProcess -> () - this.curr - - abstract DoMoveNext : byref<'T> -> bool - abstract Dispose : unit -> unit - - interface IEnumerator<'T> with - member this.Current = this.GetCurrent() - - interface IEnumerator with - member this.Current = box(this.GetCurrent()) - member this.MoveNext () = - state <- InProcess - if this.DoMoveNext(&this.curr) then - true - else - state <- Finished - false - member this.Reset() = noReset() - interface System.IDisposable with - member this.Dispose() = this.Dispose() - - let map f (e : IEnumerator<_>) : IEnumerator<_>= - upcast - { new MapEnumerator<_>() with - member this.DoMoveNext (curr : byref<_>) = - if e.MoveNext() then - curr <- (f e.Current) - true - else - false - member this.Dispose() = e.Dispose() - } - - let mapi f (e : IEnumerator<_>) : IEnumerator<_> = - let i = ref (-1) - upcast - { new MapEnumerator<_>() with - member this.DoMoveNext curr = - i := !i + 1 - if e.MoveNext() then - curr <- f !i e.Current - true - else - false - member this.Dispose() = e.Dispose() - } - - let map2 f (e1 : IEnumerator<_>) (e2 : IEnumerator<_>) : IEnumerator<_>= - upcast - { new MapEnumerator<_>() with - member this.DoMoveNext curr = - let n1 = e1.MoveNext() - let n2 = e2.MoveNext() - if n1 && n2 then - curr <- f e1.Current e2.Current - true - else - false - member this.Dispose() = e1.Dispose(); e2.Dispose() - } - - - let choose f (e : IEnumerator<'T>) = - let started = ref false - let curr = ref None - let get() = check !started; (match !curr with None -> alreadyFinished() | Some x -> x) - { new IEnumerator<'b> with - member x.Current = get() - interface IEnumerator with - member x.Current = box (get()) - member x.MoveNext() = - if not !started then started := true; - curr := None; - while ((!curr).IsNone && e.MoveNext()) do - curr := f e.Current; - Option.isSome !curr - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = e.Dispose() } - - let filter f (e : IEnumerator<'T>) = - let started = ref false - let this = - { new IEnumerator<'T> with - member x.Current = check !started; e.Current - interface IEnumerator with - member x.Current = check !started; box e.Current - member x.MoveNext() = - let rec next() = - if not !started then started := true; - e.MoveNext() && (f e.Current || next()) - next() - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = e.Dispose() } - this - - let unfold f x : IEnumerator<_> = - let state = ref x - upcast - { new MapEnumerator<_>() with - member this.DoMoveNext curr = - match f !state with - | None -> false - | Some(r,s) -> - curr <- r - state := s - true - member this.Dispose() = () - } - - let upto lastOption f = - match lastOption with - | Some b when b<0 -> Empty() // a request for -ve length returns empty sequence - | _ -> - let unstarted = -1 // index value means unstarted (and no valid index) - let completed = -2 // index value means completed (and no valid index) - let unreachable = -3 // index is unreachable from 0,1,2,3,... - let finalIndex = match lastOption with - | Some b -> b // here b>=0, a valid end value. - | None -> unreachable // run "forever", well as far as Int32.MaxValue since indexing with a bounded type. - // The Current value for a valid index is "f i". - // Lazy<_> values are used as caches, to store either the result or an exception if thrown. - // These "Lazy<_>" caches are created only on the first call to current and forced immediately. - // The lazy creation of the cache nodes means enumerations that skip many Current values are not delayed by GC. - // For example, the full enumeration of Seq.initInfinite in the tests. - // state - let index = ref unstarted - // a Lazy node to cache the result/exception - let current = ref (Unchecked.defaultof<_>) - let setIndex i = index := i; current := (Unchecked.defaultof<_>) // cache node unprimed, initialised on demand. - let getCurrent() = - if !index = unstarted then notStarted() - if !index = completed then alreadyFinished() - match box !current with - | null -> current := Lazy.Create(fun () -> f !index); - | _ -> () - // forced or re-forced immediately. - (!current).Force() - { new IEnumerator<'b> with - member x.Current = getCurrent() - interface IEnumerator with - member x.Current = box (getCurrent()) - member x.MoveNext() = - if !index = completed then - false - elif !index = unstarted then - setIndex 0 - true - else ( - if !index = System.Int32.MaxValue then failwith "Enumeration based on System.Int32 exceeded System.Int32.MaxValue" - if !index = finalIndex then - false - else - setIndex (!index + 1) - true - ) - member self.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = () } - - let readAndClear r = - lock r (fun () -> match !r with None -> None | Some x as res -> r := None; res) - - let generateWhileSome openf compute closef : IEnumerator<'b> = - let started = ref false - let curr = ref None - let state = ref (Some(openf())) - let getCurr() = - check !started; - match !curr with None -> alreadyFinished() | Some x -> x - let start() = if not !started then (started := true) - - let dispose() = readAndClear state |> Option.iter closef - let finish() = (dispose(); curr := None) - { new IEnumerator<'b> with - member x.Current = getCurr() - interface IEnumerator with - member x.Current = box (getCurr()) - member x.MoveNext() = - start(); - match !state with - | None -> false (* we started, then reached the end, then got another MoveNext *) - | Some s -> - match (try compute s with e -> finish(); rethrow ()) with - | None -> finish(); false - | Some(r) as x -> curr := x; true - - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = dispose() } - - [] - type ArrayEnumerator<'T>(arr: 'T array) = - let mutable curr = -1 - let mutable len = arr.Length - member x.Get() = - if curr >= 0 then - if curr >= len then alreadyFinished() - else arr.[curr] - else - notStarted() - interface IEnumerator<'T> with - member x.Current = x.Get() - interface System.Collections.IEnumerator with - member x.MoveNext() = - if curr >= len then false - else - curr <- curr + 1; - (curr < len) - member x.Current = box(x.Get()) - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = () - - let of_array arr = (new ArrayEnumerator<'T>(arr) :> IEnumerator<'T>) - - [] - type Singleton<'T>(v:'T) = - let mutable started = false - interface IEnumerator<'T> with - member x.Current = v - interface IEnumerator with - member x.Current = box v - member x.MoveNext() = if started then false else (started <- true; true) - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = () - - let Singleton x = (new Singleton<'T>(x) :> IEnumerator<'T>) - - let EnumerateThenFinally f (e : IEnumerator<'T>) = - { new IEnumerator<'T> with - member x.Current = e.Current - interface IEnumerator with - member x.Current = (e :> IEnumerator).Current - member x.MoveNext() = e.MoveNext() - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = f(); e.Dispose() } - - // Use generators for some implementations of IEnumerables. - // - module Generator = - - open System.Collections - open System.Collections.Generic - - type Step<'T> = - | Stop - | Yield of 'T - | Goto of Generator<'T> - - and Generator<'T> = - abstract Apply: (unit -> Step<'T>) - abstract Disposer: (unit -> unit) option - - let disposeG (g:Generator<'T>) = - match g.Disposer with - | None -> () - | Some f -> f() - - let chainDisposeG d1 (g:Generator<'T>) = - let app = g.Apply - let disp = match g.Disposer with Some f2 -> Some(fun () -> f2(); d1()) | None -> Some d1 - { new Generator<_> with - member x.Apply = app - member x.Disposer = disp } - - let appG (g:Generator<_>) = - //System.Console.WriteLine("{0}.appG", box g) - let res = g.Apply() - match res with - | Goto(next) -> - Goto(next) - | Yield _ -> - res - | Stop -> - //System.Console.WriteLine("appG: Stop") - disposeG g; - res - - // Binding. - // - // We use a type defintion to apply a local dynamic optimization. - // We automatically right-associate binding, i.e. push the continuations to the right. - // That is, bindG (bindG G1 cont1) cont2 --> bindG G1 (cont1 o cont2) - // This makes constructs such as the following linear rather than quadratic: - // - // let rec rwalk n = { if n > 0 then - // yield! rwalk (n-1) - // yield n } - - type GenerateThen<'T>(g:Generator<'T>, cont : unit -> Generator<'T>) = - member self.Generator = g - member self.Cont = cont - interface Generator<'T> with - member x.Apply = (fun () -> - match appG g with - | Stop -> - // OK, move onto the generator given by the continuation - Goto(cont()) - - | Yield v as res -> - res - - | Goto next -> - Goto(GenerateThen<_>.Bind(next,cont))) - member x.Disposer = - g.Disposer - - - static member Bind (g:Generator<'T>, cont) = - match g with - | :? GenerateThen<'T> as g -> GenerateThen<_>.Bind(g.Generator,(fun () -> GenerateThen<_>.Bind (g.Cont(), cont))) - | g -> (new GenerateThen<'T>(g, cont) :> Generator<'T>) - - - let bindG g cont = GenerateThen<_>.Bind(g,cont) - - //let emptyG () = - // { new Generator<_> with - // member x.Apply = (fun () -> Stop) - // member x.Disposer = None } - // - //let delayG f = - // { new Generator<_> with - // member x.Apply = fun () -> Goto(f()) - // member x.Disposer = None } - // - //let useG (v: System.IDisposable) f = - // { new Generator<_> with - // member x.Apply = (fun () -> - // let g = f v in - // // We're leaving this generator but want to maintain the disposal on the target. - // // Hence chain it into the disposer of the target - // Goto(chainDisposeG v.Dispose g)) - // member x.Disposer = Some (fun () -> v.Dispose()) } - // - //let yieldG (v:'T) = - // let yielded = ref false - // { new Generator<_> with - // member x.Apply = fun () -> if !yielded then Stop else (yielded := true; Yield(v)) - // member x.Disposer = None } - // - //let rec whileG gd b = if gd() then bindG (b()) (fun () -> whileG gd b) else emptyG() - // - //let yieldThenG x b = bindG (yieldG x) b - // - //let forG (v: seq<'T>) f = - // let e = v.GetEnumerator() in - // whileG e.MoveNext (fun () -> f e.Current) - - // Internal type. Drive an underlying generator. Crucially when the generator returns - // a new generator we simply update our current generator and continue. Thus the enumerator - // effectively acts as a reference cell holding the current generator. This means that - // infinite or large generation chains (e.g. caused by long sequences of append's, including - // possible delay loops) can be referenced via a single enumerator. - // - // A classic case where this arises in this sort of sequence expression: - // let rec data s = { yield s; - // yield! data (s + random()) } - // - // This translates to - // let rec data s = Seq.delay (fun () -> Seq.append (Seq.singleton s) (Seq.delay (fun () -> data (s+random())))) - // - // When you unwind through all the Seq, IEnumerator and Generator objects created, - // you get (data s).GetEnumerator being an "GenerateFromEnumerator(EnumeratorWrappingLazyGenerator(...))" for the append. - // After one element is yielded, we move on to the generator for the inner delay, which in turn - // comes back to be a "GenerateFromEnumerator(EnumeratorWrappingLazyGenerator(...))". - // - // Defined as a type so we can optimize Enumerator/Generator chains in enumerateFromLazyGenerator - // and GenerateFromEnumerator. - - - [] - type EnumeratorWrappingLazyGenerator<'T>(g:Generator<'T>) = - let mutable g = g - let mutable curr = None - let mutable finished = false - member e.Generator = g - interface IEnumerator<'T> with - member x.Current= match curr with Some(v) -> v | None -> failwith "MoveNext not called, or finished" - interface System.Collections.IEnumerator with - member x.Current = box (x :> IEnumerator<_>).Current - member x.MoveNext() = - not finished && - (match appG g with - | Stop -> - curr <- None; - finished <- true; - false - | Yield(v) -> - curr <- Some(v); - true - | Goto(next) -> - (g <- next); - (x :> IEnumerator).MoveNext()) - member x.Reset() = IEnumerator.noReset() - interface System.IDisposable with - member x.Dispose() = - if not finished then disposeG g - - // Internal type, used to optimize Enumerator/Generator chains - type LazyGeneratorWrappingEnumerator<'T>(e:System.Collections.Generic.IEnumerator<'T>) = - member g.Enumerator = e - interface Generator<'T> with - member g.Apply = (fun () -> - if e.MoveNext() then - Yield(e.Current) - else - Stop) - member g.Disposer= Some(e.Dispose) - - let EnumerateFromGenerator(g:Generator<'T>) = - match g with - | :? LazyGeneratorWrappingEnumerator<'T> as g -> g.Enumerator - | _ -> (new EnumeratorWrappingLazyGenerator<_>(g) :> System.Collections.Generic.IEnumerator<_>) - - let GenerateFromEnumerator (e:System.Collections.Generic.IEnumerator<'T>) = - match e with - | :? EnumeratorWrappingLazyGenerator<'T> as e -> e.Generator - | _ -> (new LazyGeneratorWrappingEnumerator<'T>(e) :> Generator<'T>) - - - module SequenceExpressionHelpers = - - let mkSeq f = - { new IEnumerable<'b> with - member x.GetEnumerator() = f() - interface IEnumerable with - member x.GetEnumerator() = (f() :> IEnumerator) } - - type EmptyEnumerable<'T> = - | EmptyEnumerable - interface IEnumerable<'T> with - member x.GetEnumerator() = IEnumerator.Empty<'T>() - interface IEnumerable with - member x.GetEnumerator() = (IEnumerator.Empty<'T>() :> IEnumerator) - - let Generate openf compute closef = - mkSeq (fun () -> IEnumerator.generateWhileSome openf compute closef) - - let GenerateUsing (openf : unit -> ('b :> System.IDisposable)) compute = - Generate openf compute (fun (s:'b) -> s.Dispose()) - - let EnumerateFromFunctions opener moveNext current = - Generate - opener - (fun x -> if moveNext x then Some(current x) else None) - (fun x -> match box(x) with :? System.IDisposable as id -> id.Dispose() | _ -> ()) - - // A family of enumerators that can have additional 'finally' actions added to the enumerator through - // the use of mutation. This is used to 'push' the disposal action for a 'use' into the next enumerator. - // For example, - // seq { use x = ... - // while ... } - // results in the 'while' loop giving an adjustable enumerator. This is then adjusted by adding the disposal action - // from the 'use' into the enumerator. This means that we avoid constructing a two-deep enumerator chain in this - // common case. - type IFinallyEnumerator = - abstract AppendFinallyAction : (unit -> unit) -> unit - - /// A concrete implementation of IEnumerable that adds the given compensation to the "Dispose" chain of any - /// enumerators returned by the enumerable. - [] - type FinallyEnumerable<'T>(compensation: unit -> unit, restf: unit -> seq<'T>) = - interface IEnumerable<'T> with - member x.GetEnumerator() = - try - let ie = restf().GetEnumerator() - match ie with - | :? IFinallyEnumerator as a -> - a.AppendFinallyAction(compensation); - ie - | _ -> - IEnumerator.EnumerateThenFinally compensation ie - with e -> - compensation(); - rethrow() - interface IEnumerable with - member x.GetEnumerator() = ((x :> IEnumerable<'T>).GetEnumerator() :> IEnumerator) - - /// An optimized object for concatenating a sequence of enumerables - [] - type ConcatEnumerator<'T,'b when 'b :> seq<'T>>(ies: seq<'b>) = - let mutable outerEnum = ies.GetEnumerator() - let mutable currInnerEnum = IEnumerator.Empty() - - let mutable started = false - let mutable finished = false - let mutable compensations = [] - - [] // false = unchecked - val mutable currElement : 'T - - member x.Finish() = - finished <- true - match currInnerEnum with - | null -> () - | _ -> - currInnerEnum.Dispose() - currInnerEnum <- null - match outerEnum with - | null -> () - | _ -> - outerEnum.Dispose() - outerEnum <- null - for f in compensations do - f() - compensations <- [] - - member x.GetCurrent() = - IEnumerator.check started; - if finished then IEnumerator.alreadyFinished() else x.currElement - - interface IFinallyEnumerator with - member x.AppendFinallyAction(f) = - compensations <- f :: compensations - - interface IEnumerator<'T> with - member x.Current = x.GetCurrent() - - interface IEnumerator with - member x.Current = box (x.GetCurrent()) - - member x.MoveNext() = - if not started then (started <- true) - if finished then false - else - let rec takeInner () = - // check the inner list - if currInnerEnum.MoveNext() then - x.currElement <- currInnerEnum.Current; - true - else - // check the outer list - let rec takeOuter() = - if outerEnum.MoveNext() then - let ie = outerEnum.Current - // Optimization to detect the statically-allocated empty IEnumerables - match box ie with - | :? EmptyEnumerable<'T> -> - // This one is empty, just skip, don't call GetEnumerator, try again - takeOuter() - | _ -> - // OK, this one may not be empty. - // Don't forget to dispose of the enumerator for the inner list now we're done with it - currInnerEnum.Dispose(); - currInnerEnum <- ie.GetEnumerator(); - takeInner () - else - // We're done - x.Finish() - false - takeOuter() - takeInner () - - member x.Reset() = IEnumerator.noReset() - - interface System.IDisposable with - member x.Dispose() = - if not finished then - x.Finish() - - let EnumerateUsing (resource : 'T :> System.IDisposable) (rest: 'T -> #seq<'b>) = - (FinallyEnumerable((fun () -> match box resource with null -> () | _ -> resource.Dispose()), - (fun () -> rest resource :> seq<_>)) :> seq<_>) - - let mkConcatEnumerable (ies: seq<'b :> seq<'T>>) = - mkSeq (fun () -> new ConcatEnumerator<_,_>(ies) :> IEnumerator<'T>) - - let EnumerateWhile (g : unit -> bool) (b: seq<'T>) : seq<'T> = - let started = ref false - let curr = ref None - let getCurr() = - IEnumerator.check !started; - match !curr with None -> IEnumerator.alreadyFinished() | Some x -> x - let start() = if not !started then (started := true) - - let finish() = (curr := None) - mkConcatEnumerable - (mkSeq (fun () -> - { new IEnumerator<_> with - member x.Current = getCurr() - interface IEnumerator with - member x.Current = box (getCurr()) - member x.MoveNext() = - start(); - let keepGoing = (try g() with e -> finish(); rethrow ()) in - if keepGoing then - curr := Some(b); true - else - finish(); false - member x.Reset() = IEnumerator.noReset() - interface System.IDisposable with - member x.Dispose() = () })) - - let EnumerateThenFinally (rest : seq<'T>) (compensation : unit -> unit) = - (FinallyEnumerable(compensation, (fun () -> rest)) :> seq<_>) - - [] - type GeneratedSequenceBase<'T>() as this = - let mutable redirectTo : GeneratedSequenceBase<'T> = Unchecked.defaultof<_> - let mutable redirect : bool = false - - abstract GetFreshEnumerator : unit -> IEnumerator<'T> - abstract GenerateNext : next:byref> -> int // 0 = Stop, 1 = Yield, 2 = Goto - abstract Close: unit -> unit - abstract CheckClose: bool - abstract LastGenerated : 'T - - member x.MoveNextImpl() = - let active = - if redirect then redirectTo - else this - let mutable target = null - match active.GenerateNext(&target) with - | 1 -> - true - | 2 -> - match target.GetEnumerator() with - | :? GeneratedSequenceBase<'T> as g when not active.CheckClose -> - redirectTo <- g - | e -> - redirectTo <- - { new GeneratedSequenceBase<'T>() with - member x.GetFreshEnumerator() = e - member x.GenerateNext(_) = if e.MoveNext() then 1 else 0 - member x.Close() = e.Dispose(); active.Close() - member x.CheckClose = true - member x.LastGenerated = e.Current } - redirect <- true - x.MoveNextImpl() - | _ (* 0 *) -> - false - - interface IEnumerable<'T> with - member x.GetEnumerator() = x.GetFreshEnumerator() - interface IEnumerable with - member x.GetEnumerator() = (x.GetFreshEnumerator() :> IEnumerator); - interface IEnumerator<'T> with - member x.Current = if redirect then redirectTo.LastGenerated else x.LastGenerated - member x.Dispose() = if redirect then redirectTo.Close() else x.Close() - interface IEnumerator with - member x.Current = box (if redirect then redirectTo.LastGenerated else x.LastGenerated) - member x.MoveNext() = x.MoveNextImpl() - - member x.Reset() = raise <| new System.NotSupportedException(); - - - [] - [] - type CachedSeq<'T>(cleanup,res:seq<'T>) = - interface System.IDisposable with - member x.Dispose() = cleanup() - interface System.Collections.Generic.IEnumerable<'T> with - member x.GetEnumerator() = res.GetEnumerator() - interface System.Collections.IEnumerable with - member x.GetEnumerator() = (res :> System.Collections.IEnumerable).GetEnumerator() - member obj.Clear() = cleanup() - - - [] - [] - module Seq = - - open SequenceExpressionHelpers - - let mkDelayedSeq (f: unit -> IEnumerable<'T>) = mkSeq (fun () -> f().GetEnumerator()) - let mkUnfoldSeq f x = mkSeq (fun () -> IEnumerator.unfold f x) - - [] - let delay f = mkDelayedSeq f - - [] - let unfold f x = mkUnfoldSeq f x - - [] - let empty<'T> = (EmptyEnumerable :> seq<'T>) - - [] - let initInfinite f = mkSeq (fun () -> IEnumerator.upto None f) - - [] - let init_infinite f = initInfinite f - - [] - let init count f = - if count < 0 then invalidArg "count" "the number of elements was negative" - mkSeq (fun () -> IEnumerator.upto (Some (count-1)) f) - - [] - let init_finite count f = init count f - - [] - let iter f (ie : seq<'T>) = - use e = ie.GetEnumerator() - while e.MoveNext() do - f e.Current; - - [] - let nth i (ie : seq<'T>) = - use e = ie.GetEnumerator() - IEnumerator.nth i e - - [] - let iteri f (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable i = 0 - while e.MoveNext() do - f i e.Current; - i <- i + 1; - - [] - let exists f (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable state = false - while (not state && e.MoveNext()) do - state <- f e.Current - state - - [] - let for_all f (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable state = true - while (state && e.MoveNext()) do - state <- f e.Current - state - - [] - let forall f ie = for_all f ie - - [] - let iter2 f (ie1 : seq<_>) (ie2 : seq<_>) = - use e1 = ie1.GetEnumerator() - use e2 = ie2.GetEnumerator() - while (e1.MoveNext() && e2.MoveNext()) do - f e1.Current e2.Current; - - - // Build an IEnumerble by wrapping/transforming iterators as they get generated. - let revamp f (ie : seq<_>) = mkSeq (fun () -> f (ie.GetEnumerator())) - let revamp2 f (ie1 : seq<_>) (ie2 : seq<_>) = mkSeq (fun () -> f (ie1.GetEnumerator()) (ie2.GetEnumerator())) - [] - let filter f ie = revamp (IEnumerator.filter f) ie - [] - let map f ie = revamp (IEnumerator.map f) ie - [] - let mapi f ie = revamp (IEnumerator.mapi f) ie - [] - let map2 f ie1 ie2 = revamp2 (IEnumerator.map2 f) ie1 ie2 - [] - let choose f ie = revamp (IEnumerator.choose f) ie - [] - let zip ie1 ie2 = map2 (fun x y -> x,y) ie1 ie2 - [] - let zip3 ie1 ie2 ie3 = map2 (fun x (y,z) -> x,y,z) ie1 (zip ie2 ie3) - - [] - let cast (seq: IEnumerable) = mkSeq (fun () -> IEnumerator.cast (seq.GetEnumerator())) - - [] - let tryPick f (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable res = None - while (Option.isNone res && e.MoveNext()) do - res <- f e.Current; - res - let first f ie = tryPick f ie - let pick f ie = match tryPick f ie with None -> raise (System.Collections.Generic.KeyNotFoundException()) | Some x -> x - - [] - let tryFind f (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable res = None - while (Option.isNone res && e.MoveNext()) do - let c = e.Current - if f c then res <- Some(c) - res - - let tryfind f ie = tryFind f ie - - [] - let find f ie = match tryfind f ie with None -> raise (System.Collections.Generic.KeyNotFoundException()) | Some x -> x - - [] - let take count (sequence : seq<'T>) = - if count < 0 then invalidArg "count" "the number of elements to take may not be negative" - (* Note: don't create or dispose any IEnumerable if n = 0 *) - if count = 0 then empty else - { use e = sequence.GetEnumerator() - for i in 0 .. count - 1 do - if not (e.MoveNext()) then - raise <| System.InvalidOperationException "the input sequence had insufficient elements" - yield e.Current } - - [] - let isEmpty (ie : seq<'T>) = - use ie = ie.GetEnumerator() - not (ie.MoveNext()) - - [] - let is_empty ie = isEmpty ie - - [] - let concat ies = SequenceExpressionHelpers.mkConcatEnumerable ies - - [] - let length (ie : seq<'T>) = - match ie with - | :? array<'T> as a -> a.Length - | :? list<'T> as a -> a.Length - | :? ResizeArray<'T> as a -> a.Count - | _ -> - use e = ie.GetEnumerator() - let mutable state = 0 - while e.MoveNext() do - state <- state + 1; - state - - [] - let fold f x (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable state = x - while e.MoveNext() do - state <- f state e.Current; - state - - [] - let reduce f (sequence : seq<'T>) = - use e = sequence.GetEnumerator() - if not (e.MoveNext()) then invalidArg "sequence" "the input sequence was empty"; - let mutable state = e.Current - while e.MoveNext() do - state <- f state e.Current; - state - - let fromGenerator f = mkSeq(fun () -> Generator.EnumerateFromGenerator (f())) - let toGenerator (ie : seq<_>) = Generator.GenerateFromEnumerator (ie.GetEnumerator()) - - - [] - let append (ie1: seq<'T>) (ie2: seq<'T>) = - fromGenerator(fun () -> Generator.bindG (toGenerator ie1) (fun () -> toGenerator ie2)) - - - [] - let collect f ies = map f ies |> concat - - [] - let map_concat f ies = collect f ies - - [] - let compareWith (f:'T -> 'T -> int) (s1 : seq<'T>) (s2: seq<'T>) = - use e1 = s1.GetEnumerator() - use e2 = s2.GetEnumerator() - let rec go () = - let e1ok = e1.MoveNext() - let e2ok = e2.MoveNext() - let c = (if e1ok = e2ok then 0 else if e1ok then 1 else -1) - if c <> 0 then c else - if not e1ok || not e2ok then 0 - else - let c = f e1.Current e2.Current - if c <> 0 then c else - go () - go() - - [] - let compare f s1 s2 = compareWith f s1 s2 - - [] - let of_list (l : 'T list) = - (l :> seq<'T>) - - [] - let to_list (ie : seq<'T>) = - match ie with - | :? list<'T> as res -> res - | :? array<'T> as res -> List.of_array res - | _ -> - use e = ie.GetEnumerator() - let mutable res = [] - while e.MoveNext() do - res <- e.Current :: res - List.rev res - - // Create a new object to ensure underlying array may not be mutated by a backdoor cast - [] - let of_array (a : 'T array) = - mkSeq (fun () -> IEnumerator.of_array a) - - [] - let to_array (ie : seq<'T>) = - match ie with - | :? ('T[]) as res -> res - | :? list<'T> as res -> List.to_array res - | _ -> - use e = ie.GetEnumerator() - let res = new System.Collections.Generic.List<_>() - while e.MoveNext() do - res.Add(e.Current) - res.ToArray() - - [] - let singleton x = mkSeq (fun () -> IEnumerator.Singleton x) - - - [] - let truncate n (x: seq<'T>) = - { let i = ref 0 - use ie = x.GetEnumerator() - while !i < n && ie.MoveNext() do - i := !i + 1 - yield ie.Current } - - [] - let pairwise (x: seq<'T>) = - { use ie = x.GetEnumerator() - if ie.MoveNext() then - let iref = ref ie.Current - while ie.MoveNext() do - let j = ie.Current - yield (!iref, j) - iref := j } - - [] - let scan f z (seq : seq<_>) = - { let zref = ref z - yield !zref - use ie = seq.GetEnumerator() - while ie.MoveNext() do - zref := f !zref ie.Current - yield !zref } - -(* - [] - let scan1 f (sequence : seq<'T>) = - { use ie = sequence.GetEnumerator() - if ie.MoveNext() then - let zref = ref ie.Current - while ie.MoveNext() do - zref := f !zref ie.Current - yield !zref - else - raise <| System.InvalidOperationException "the input sequence was empty" } -*) - - [] - let find_index p s = s |> find (snd >> p) |> fst - - [] - let findIndex p (s:seq<_>) = - use ie = s.GetEnumerator() - let rec loop i = - if ie.MoveNext() then - if p ie.Current then - i - else loop (i+1) - else - raise (System.Collections.Generic.KeyNotFoundException()) - loop 0 - - [] - let tryFindIndex p (s:seq<_>) = - use ie = s.GetEnumerator() - let rec loop i = - if ie.MoveNext() then - if p ie.Current then - Some i - else loop (i+1) - else - None - loop 0 - - [] - let tryfind_index p s = s |> tryfind (snd >> p) |> Option.map fst - - - // windowed : int -> seq<'T> -> seq> - [] - let windowed windowSize (s: seq<_>) = - if windowSize <= 0 then invalidArg "windowSize" "the window size must be positive" - { let arr = Array.zeroCreate windowSize - let r = ref (windowSize-1) - let i = ref 0 - use e = s.GetEnumerator() - while e.MoveNext() do - arr.[!i] <- e.Current - i := (!i + 1) % windowSize - if !r = 0 then - yield Array.init windowSize (fun j -> arr.[(!i+j) % windowSize]) - else - r := (!r - 1) } - - [] - let cache (seq : seq<'T>) = - // Wrap a seq to ensure that it is enumerated just once and only as far as is necessary. - // - // This code is required to be thread safe. - // The necessary calls should be called at most once (include .MoveNext() = false). - // The enumerator should be disposed (and dropped) when no longer required. - //------ - // The state is (prefix,enumerator) with invariants: - // * the prefix followed by elts from the enumerator are the initial sequence. - // * the prefix contains only as many elements as the longest enumeration so far. - let prefix = System.Collections.Generic.List<_>() - let enumeratorR = ref None : IEnumerator<'T> option option ref // nested options rather than new type... - // None = Unstarted. - // Some(Some e) = Started. - // Some None = Finished. - let oneStepTo i = - // If possible, step the enumeration to prefix length i (at most one step). - // Be speculative, since this could have already happened via another thread. - lock enumeratorR (fun () -> - if not (i < prefix.Count) then // is a step still required? - // If not yet started, start it (create enumerator). - if !enumeratorR = None then enumeratorR := Some (Some (seq.GetEnumerator())) - match (!enumeratorR).Value with - | Some enumerator -> if enumerator.MoveNext() then - prefix.Add(enumerator.Current) - else - enumerator.Dispose() // Move failed, dispose enumerator, - enumeratorR := Some None // drop it and record finished. - | None -> ()) - let result = - unfold (fun i -> // i being the next position to be returned - if i < prefix.Count then - Some (prefix.[i],i+1) - else - oneStepTo i - if i < prefix.Count then - Some (prefix.[i],i+1) - else - None) 0 - let cleanup() = - lock enumeratorR (fun () -> - prefix.Clear() - begin match !enumeratorR with - | Some (Some e) -> IEnumerator.dispose e; - | _ -> () - end; - enumeratorR := None) - (new CachedSeq<_>(cleanup, result) :> seq<_>) - - [] - let readonly (s:seq<_>) = mkSeq (fun () -> s.GetEnumerator()) - - [] - let groupBy keyf seq = - - mkDelayedSeq (fun () -> - // Wrap a Some(_) aroud all keys in case the key type is itself a type using null as a representation - let dict = new Dictionary<'key option,System.Collections.Generic.List<'T>>(HashIdentity.Structural) - - // Build the groupings - seq |> iter (fun v -> - let key = Some (keyf v) - let ok,prev = dict.TryGetValue(key) - if ok then prev.Add(v) - else let prev = new List<'T>(1) - dict.[key] <- prev - prev.Add(v)) - - // Trim the size of each result group. - dict |> iter (fun group -> group.Value.TrimExcess()) - - // Return the sequence-of-sequences. Don't reveal the - // internal collections: just reveal them as sequences - dict |> map (fun group -> (group.Key.Value, readonly group.Value))) - - - [] - let distinct seq = - { // Wrap a Some(_) aroud all keys in case the key type is itself a type using null as a representation - let dict = new Dictionary<'key option,obj>(HashIdentity.Structural) - for v in seq do - let key = Some v - if not (dict.ContainsKey(key)) then - dict.[key] <- null; - yield v } - - [] - let distinctBy f seq = - { // Wrap a Some(_) aroud all keys in case the key type is itself a type using null as a representation - let dict = new Dictionary<'key option,obj>(HashIdentity.Structural) - for v in seq do - let key = Some (f v) - if not (dict.ContainsKey(key)) then - dict.[key] <- null; - yield v } - - [] - let sortBy keyf seq = - let comparer = ComparisonIdentity.Structural - mkDelayedSeq (fun () -> - (seq |> to_list |> List.sortWith (fun x y -> comparer.Compare(keyf x,keyf y)) |> to_array) :> seq<_>) - - [] - let sort seq = - mkDelayedSeq (fun () -> - (seq |> to_list |> List.sortWith Operators.compare |> to_array) :> seq<_>) - - [] - let countBy keyf seq = - mkDelayedSeq (fun () -> - let dict = new Dictionary<'key option,int>(HashIdentity.Structural) - - // Build the groupings - seq |> iter (fun v -> - let key = Some (keyf v ) - let ok,prev = dict.TryGetValue(key) - if ok then dict.[key] <- dict.[key] + 1 - else dict.[key] <- 1) - - dict |> map (fun group -> (group.Key.Value, group.Value))) - - [] - let inline sum (seq: seq< (^a) >) : ^a = - use e = seq.GetEnumerator() - let mutable acc = LanguagePrimitives.GenericZero< (^a) > - while e.MoveNext() do - acc <- Checked.(+) acc e.Current - acc - - [] - let inline sumBy (f : 'T -> ^U) (seq: seq<'T>) : ^U = - use e = seq.GetEnumerator() - let mutable acc = LanguagePrimitives.GenericZero< (^U) > - while e.MoveNext() do - acc <- Checked.(+) acc (f e.Current) - acc - - [] - let inline average (sequence: seq< (^a) >) : ^a = - use e = sequence.GetEnumerator() - let mutable acc = LanguagePrimitives.GenericZero< (^a) > - let mutable count = 0 - while e.MoveNext() do - acc <- Checked.(+) acc e.Current - count <- count + 1 - if count = 0 then - invalidArg "sequence" "the input sequence is empty"; - LanguagePrimitives.DivideByInt< (^a) > acc count - - [] - let inline averageBy (f : 'T -> ^U) (sequence: seq< 'T >) : ^U = - use e = sequence.GetEnumerator() - let mutable acc = LanguagePrimitives.GenericZero< (^U) > - let mutable count = 0 - while e.MoveNext() do - acc <- Checked.(+) acc (f e.Current) - count <- count + 1 - if count = 0 then - invalidArg "sequence" "the input sequence is empty"; - LanguagePrimitives.DivideByInt< (^U) > acc count - - [] - let min (sequence: seq<_>) = - use e = sequence.GetEnumerator() - if not (e.MoveNext()) then - invalidArg "sequence" "the input sequence is empty"; - let mutable acc = e.Current - while e.MoveNext() do - acc <- Operators.min acc e.Current - acc - - [] - let minBy (f : 'T -> 'U) (sequence: seq<'T>) : 'T = - use e = sequence.GetEnumerator() - if not (e.MoveNext()) then - invalidArg "sequence" "the input sequence is empty"; - let mutable acc = f e.Current - let mutable acc_v = e.Current - while e.MoveNext() do - let cur = f e.Current - if cur < acc then - acc <- cur - acc_v <- e.Current - acc_v - - [] - let max (sequence: seq<_>) = - use e = sequence.GetEnumerator() - if not (e.MoveNext()) then - invalidArg "sequence" "the input sequence is empty"; - let mutable acc = e.Current - while e.MoveNext() do - acc <- Operators.max acc e.Current - acc - - [] - let maxBy (f : 'T -> 'U) (sequence: seq<'T>) : 'T = - use e = sequence.GetEnumerator() - if not (e.MoveNext()) then - invalidArg "sequence" "the input sequence is empty"; - let mutable acc = f e.Current - let mutable acc_v = e.Current - while e.MoveNext() do - let cur = f e.Current - if cur > acc then - acc <- cur - acc_v <- e.Current - acc_v - - [] - let group_by keyf seq = groupBy keyf seq - [] - let distinct_by f seq = distinctBy f seq - [] - let sort_by keyf seq = sortBy keyf seq - [] - let count_by keyf seq = countBy keyf seq - [] - let inline sum_by (f : 'T -> ^U) (seq: seq<'T>) : ^U = sumBy f seq - [] - let inline average_by (f : 'T -> ^U) (sequence: seq< 'T >) : ^U = averageBy f sequence - [] - let min_by (f : 'T -> 'U) (sequence: seq<'T>) : 'T = minBy f sequence - [] - let max_by (f : 'T -> 'U) (sequence: seq<'T>) : 'T = maxBy f sequence - - [] - let takeWhile p (sequence: seq<_>) = - { use e = sequence.GetEnumerator() - let latest = ref (Unchecked.defaultof<_>) - while e.MoveNext() && (latest := e.Current; p !latest) do - yield !latest } - - [] - let skip count (sequence: seq<_>) = - { use e = sequence.GetEnumerator() - let latest = ref (Unchecked.defaultof<_>) - let ok = ref false - for i in 1 .. count do - if not (e.MoveNext()) then - raise <| System.InvalidOperationException "the input sequence had insufficient elements" - while e.MoveNext() do - yield e.Current } - - [] - let skipWhile p (sequence: seq<_>) = - { use e = sequence.GetEnumerator() - let latest = ref (Unchecked.defaultof<_>) - let ok = ref false - while e.MoveNext() do - if (latest := e.Current; (!ok || not (p !latest))) then - ok := true - yield !latest } - - [] - let skip_while p sequence = skipWhile p sequence - - [] - let take_while p sequence = takeWhile p sequence - - [] - let forall2 p (sequence1: seq<_>) (sequence2: seq<_>) = - use e1 = sequence1.GetEnumerator() - use e2 = sequence2.GetEnumerator() - let mutable ok = true - while (ok && e1.MoveNext() && e2.MoveNext()) do - ok <- p e1.Current e2.Current; - ok - - [] - let for_all2 p sequence1 sequence2 = forall2 p sequence1 sequence2 - - [] - let exists2 p (sequence1: seq<_>) (sequence2: seq<_>) = - use e1 = sequence1.GetEnumerator() - use e2 = sequence2.GetEnumerator() - let mutable ok = false - while (not ok && e1.MoveNext() && e2.MoveNext()) do - ok <- p e1.Current e2.Current; - ok - - [] - let hd (sequence : seq<_>) = - use e = sequence.GetEnumerator() - if (e.MoveNext()) then e.Current - else invalidArg "sequence" "the input sequence was empty" - - - [] - let find_indexi p s = s |> find (fun (x,y) -> p x y) |> fst - - [] - let tryfind_indexi p s = s |> tryFind (fun (x,y) -> p x y) |> Option.map fst diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/seq.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/seq.fsi deleted file mode 100644 index 4514d85a..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/seq.fsi +++ /dev/null @@ -1,509 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - - /// Basic operations on IEnumerables. - [] - [] - module Seq = - - /// Wrap the two given enumeration-of-enumerations as a single concatenated - /// enumeration. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val append: sequence1:seq<'T> -> sequence2:seq<'T> -> seq<'T> - - /// Return the average of the elements in the sequence - /// - /// The elements are averaged using the '+' operator, 'DivideByInt' method and 'Zero' property - /// associated with the element type. - val inline average : sequence:seq<(^T)> -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member DivideByInt : ^T * int -> ^T) - and ^T : (static member Zero : ^T) - - /// Return the average of the results generated by applying the function to each element of the sequence. - /// - /// The elements are averaged using the '+' operator, 'DivideByInt' method and 'Zero' property - /// associated with the generated type. - val inline averageBy : projection:('T -> ^U) -> sequence:seq<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U * int -> ^U) - and ^U : (static member Zero : ^U) - - /// Return a sequence that corresponds to a cached version of the input sequence. - /// This result sequence will have the same elements as the input sequence. The result - /// can be enumerated multiple times. The input sequence will be enumerated at most - /// once and only as far as is necessary. - /// - /// Enumeration of the result sequence is thread safe in the sense that multiple independent IEnumerator - /// values may be used simultaneously from different threads (accesses to - /// the internal lookaside table are thread safe). Each individual IEnumerator - /// is not typically thread safe and should not be accessed concurrently. - /// - /// Note, once enumeration of the input sequence has started, - /// it's enumerator will be kept live by this object until the enumeration has completed. - /// At that point, the enumerator will be disposed. - /// - /// The enumerator may be disposed and underlying cache storage released by - /// converting the returned sequence object to type IDisposable, and calling the Dispose method - /// on this object. The sequence object may then be re-enumerated and a fresh enumerator will - /// be used. - val cache: sequence:seq<'T> -> seq<'T> - - /// Wrap a loosely-typed System.Collections sequence as a typed sequence. - /// - /// The use of this function usually requires a type annotation. - /// An incorrect type annotation may result in runtime type - /// errors. - /// - /// Individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val cast: sequence:IEnumerable -> seq<'T> - - /// Apply the given function to each element of the list. Return - /// the list comprised of the results "x" for each element where - /// the function returns Some(x) - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - /// - /// Remember sequence is lazy, effects are delayed until it is enumerated. - val choose: chooser:('T -> 'U option) -> sequence:seq<'T> -> seq<'U> - - /// For each element of the enumeration apply the given function and concatenate all the results. - /// - /// Remember sequence is lazy, effects are delayed until it is enumerated. - val collect: mapping:('T -> #seq<'U>) -> sequence:seq<'T> -> seq<'U> - - /// Compare two sequence's using generic comparison, element by element. - val compare: comparer:('T -> 'T -> int) -> sequence1:seq<'T> -> sequence2:seq<'T> -> int - - /// Compare two sequence's using the given comparison function, element by element. - val compareWith: comparer:('T -> 'T -> int) -> sequence1:seq<'T> -> sequence2:seq<'T> -> int - - /// Wrap the given enumeration-of-enumerations as a single concatenated - /// enumeration. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val concat: sequences:seq<#seq<'T>> -> seq<'T> - - - /// Apply a key-generating function to each element of a sequence and return a sequence yielding unique - /// keys and their number of occurences in the original sequence. - /// - /// Note that this function returns a sequence that digests the whole initial sequence as soon as - /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. - val countBy : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'Key * int> - - /// Return a sequence that is built from the given delayed specification of an - /// Seq. The input function is evaluated each time an IEnumerator for the sequence - /// is requested. - val delay : generator:(unit -> seq<'T>) -> seq<'T> - - /// Return a sequence that contains no duplicate entries according to generic hash and equality comparisons on the entries. - /// If an element occurs multiple times in the sequence then the later occurrences are discarded. - val distinct: sequence:seq<'T> -> seq<'T> - - /// Return a sequence that contains no duplicate entries according to the - /// generic hash and equality comparisons on the keys returned by the given key-generating function. - /// If an element occurs multiple times in the sequence then the later occurrences are discarded. - val distinctBy: projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'T> - - /// Create an empty sequence - [] - val empty<'T> : seq<'T> - - /// Test if any element of the sequence satisfies the given predicate. - /// - /// The predicate is applied to the elements of the input sequence. If any application - /// returns true then the overall result is true and no further elements are tested. - /// Otherwise, false is returned. - val exists: predicate:('T -> bool) -> sequence:seq<'T> -> bool - - /// Test if any pair of corresponding elements of the input sequences satisfies the given predicate. - /// - /// The predicate is applied to matching elements in the two sequences up to the lesser of the - /// two lengths of the collections. If any application returns true then the overall result is - /// true and no further elements are tested. Otherwise, false is returned. If one sequence is shorter than - /// the other then the remaining elements of the longer sequence are ignored. - val exists2: predicate:('T1 -> 'T2 -> bool) -> sequence1:seq<'T1> -> sequence2:seq<'T2> -> bool - - /// Return a new collection containing only the elements of the collection - /// for which the given predicate returns "true" - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - /// - /// Remember sequence is lazy, effects are delayed until it is enumerated. - val filter: predicate:('T -> bool) -> sequence:seq<'T> -> seq<'T> - - /// Return the first element for which the given function returns true. - /// Raise KeyNotFoundException if no such element exists. - val find: predicate:('T -> bool) -> sequence:seq<'T> -> 'T - - /// Return the index of the first element in the sequence of pairs - /// that satisfies the given predicate. Raise KeyNotFoundException if no such element exists. - val findIndex: predicate:('T -> bool) -> sequence:seq<'T> -> int - - /// Apply 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 -> sequence:seq<'T> -> 'State - - /// Test if all elements of the sequence satisfy the given predicate. - /// - /// The predicate is applied to the elements of the input sequence. If any application - /// returns false then the overall result is false and no further elements are tested. - /// Otherwise, true is returned. - val forall: predicate:('T -> bool) -> sequence:seq<'T> -> bool - - /// Test the all pairs of elements drawn from the two sequences satisfies the - /// given predicate. If one sequence is shorter than - /// the other then the remaining elements of the longer sequence are ignored - val forall2: predicate:('T1 -> 'T2 -> bool) -> sequence1:seq<'T1> -> sequence2:seq<'T2> -> bool - - /// Apply a key-generating function to each element of a sequence and yields a sequence of - /// unique keys. Each unique key has also contains a sequence of all elements that match - /// to this key. - /// - /// Note that this function returns a sequence that digests the whole initial sequence as soon as - /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. - val groupBy : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'Key * seq<'T>> - - /// Return the first element of the sequence. - val hd: sequence:seq<'T> -> 'T - - /// Return true if the sequence contains no elements, false otherwise - val isEmpty: sequence:seq<'T> -> bool - - /// Generate a new sequence which, when iterated, will return successive - /// elements by calling the given function, up to the given count. The results of calling the function - /// will not be saved, i.e. the function will be reapplied as necessary to - /// regenerate the elements. The function is passed the index of the item being - /// generated. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val init: count:int -> initializer:(int -> 'T) -> seq<'T> - - /// Generate a new sequence which, when iterated, will return successive - /// elements by calling the given function. The results of calling the function - /// will not be saved, i.e. the function will be reapplied as necessary to - /// regenerate the elements. The function is passed the index of the item being - /// generated - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val initInfinite: initializer:(int -> 'T) -> seq<'T> - - /// Apply the given function to each element of the collection. - val iter: action:('T -> unit) -> sequence:seq<'T> -> unit - - /// Apply the given function to each element of the collection. The integer passed to the - /// function indicates the index of element. - val iteri: action:(int -> 'T -> unit) -> sequence:seq<'T> -> unit - - /// Apply the given function to two collections simultaneously. If one sequence is shorter than - /// the other then the remaining elements of the longer sequence are ignored. - val iter2: action:('T1 -> 'T2 -> unit) -> sequence1:seq<'T1> -> sequence2:seq<'T2> -> unit - - /// Return the length of the sequence - val length: sequence:seq<'T> -> int - - /// Build a new collection whose elements are the results of applying the given function - /// to each of the elements of the collection. The given function will be applied - /// as elements are demanded using the 'MoveNext' method on enumerators retrieved from the - /// object. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - val map : mapping:('T -> 'U) -> sequence:seq<'T> -> seq<'U> - - /// Build a new collection whose elements are the results of applying the given function - /// to the corresponding pairs of elements from the two sequences. If one input sequence is shorter than - /// the other then the remaining elements of the longer sequence are ignored. - val map2: mapping:('T1 -> 'T2 -> 'U) -> sequence1:seq<'T1> -> sequence2:seq<'T2> -> seq<'U> - - /// Build a new collection whose elements are the results of applying the given function - /// to each of the elements of the collection. The integer index passed to the - /// function indicates the index (from 0) of element being transformed. - val mapi: mapping:(int -> 'T -> 'U) -> sequence:seq<'T> -> seq<'U> - - /// Return the greatest of all elements of the sequence, compared via Operators.max - val max : sequence:seq<'T> -> 'T - - /// Return the greatest of all elements of the array, compared via Operators.max on the function result - val maxBy : projection:('T -> 'Key) -> sequence:seq<'T> -> 'T - - /// Return the lowest of all elements of the sequence, compared via Operators.min - val min : sequence:seq<'T> -> 'T - - /// Return the lowest of all elements of the array, compared via Operators.min on the function result - val minBy : projection:('T -> 'Key) -> sequence:seq<'T> -> 'T - - /// Compute the nth element in the collection. - val nth: index:int -> sequence:seq<'T> -> 'T - - /// Build a collection from the given array - val of_array: elements:'T array -> seq<'T> - - /// Build a collection from the given array - val of_list: elements:'T list -> seq<'T> - - /// Return a sequence of each element in the input sequence and its predecessor, with the - /// exception of the first element which is only returned as the predecessor of the second element. - val pairwise: sequence:seq<'T> -> seq<'T * 'T> - - /// Apply the given function to successive elements, returning the first - /// 'x' where the function returns "Some(x)". - val pick: chooser:('T -> 'U option) -> sequence:seq<'T> -> 'U - - /// Build a new sequence object that delegates to the given sequence object. This ensures - /// the original sequence can't be rediscovered and mutated by a type cast. For example, - /// if given an array the returned sequence will return the elements of the array, but - /// you can't cast the returned sequence object to an array. - val readonly : sequence:seq<'T> -> seq<'T> - - /// Apply a function to each element of the sequence, threading an accumulator argument - /// through the computation. Begin by applying the function to the first two elements. - /// Then feed this result into the function along with the third element and so on. - /// Return the final result. - /// Raises ArgumentException if the sequence has no elements. - val reduce: reduction:('T -> 'T -> 'T) -> sequence:seq<'T> -> 'T - - /// Like fold, but compute on-demand and return the sequence of intermediary and final results - val scan : folder:('State -> 'T -> 'State) -> state:'State -> sequence:seq<'T> -> seq<'State> - - /// Return a sequence that yields one item only. - val singleton: value:'T -> seq<'T> - - /// Return a sequence that skips N elements of the underlying sequence and then yields the - /// remaining elements of the sequence - val skip: count:int -> sequence:seq<'T> -> seq<'T> - - /// Return a sequence that, when iterated, skips elements of the underlying sequence while the - /// given predicate returns 'true', and then yields the remaining elements of the sequence - val skipWhile: predicate:('T -> bool) -> sequence:seq<'T> -> seq<'T> - - /// Yield a sequence ordered by keys. - /// - /// Note that this function returns a sequence that digests the whole initial sequence as soon as - /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. - val sort : sequence:seq<'T> -> seq<'T> - - /// Apply a key-generating function to each element of a sequence and yield a sequence ordered - /// by keys. The keys are compared using generic comparison as implemented by Operators.compare. - /// - /// Note that this function returns a sequence that digests the whole initial sequence as soon as - /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. - val sortBy : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'T> - - /// Return the sum of the elements in the sequence. - /// - /// The elements are summed using the '+' operator and 'Zero' property associated with the generated type. - val inline sum : sequence:seq<(^T)> -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member Zero : ^T) - - /// Return the sum of the results generated by applying the function to each element of the sequence. - /// The generated elements are summed using the '+' operator and 'Zero' property associated with the generated type. - val inline sumBy : projection:('T -> ^U) -> sequence:seq<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - /// Return the first N elements of the sequence. - val take: count:int -> sequence:seq<'T> -> seq<'T> - - /// Return a sequence that, when iterated, yields elements of the underlying sequence while the - /// given predicate returns 'true', and returns no further elements - val takeWhile: predicate:('T -> bool) -> sequence:seq<'T> -> seq<'T> - - /// Build an array from the given collection - val to_array: sequence:seq<'T> -> 'T array - - /// Build a list from the given collection - val to_list: sequence:seq<'T> -> 'T list - - /// Return the first element for which the given function returns true. - /// Return None if no such element exists. - val tryFind: predicate:('T -> bool) -> sequence:seq<'T> -> 'T option - - /// Return the index of the first element in the sequence - /// that satisfies the given predicate. Return 'None' if no such element exists. - val tryFindIndex : predicate:('T -> bool) -> sequence:seq<'T> -> int option - - /// Apply the given function to successive elements, returning the first - /// result where the function returns "Some(x)". - val tryPick: chooser:('T -> 'U option) -> sequence:seq<'T> -> 'U option - - /// Return a sequence that when enumerated returns at most N elements. - val truncate: count:int -> sequence:seq<'T> -> seq<'T> - - /// Return a sequence that contains the elements generated by the given computation. - /// The given initial 'state' argument is passed to the element generator. - /// For each IEnumerator elements in the stream are generated on-demand by applying the element - /// generator, until a None value is returned by the element generator. Each call to the element - /// generator returns a new residual 'state'. - /// - /// Note the stream will be recomputed each time an IEnumerator is requested and iterated for the Seq. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val unfold : generator:('State -> ('T * 'State) option) -> state:'State -> seq<'T> - - /// Return a sequence that yields 'sliding windows' of containing elements drawn from the input - /// sequence. Each window is returned as a fresh array. - val windowed: windowSize:int -> sequence:seq<'T> -> seq<'T[]> - - /// Combine the two sequences into a list of pairs. The two sequences need not have equal lengths: - /// when one sequence is exhausted any remaining elements in the other - /// sequence are ignored. - val zip: sequence1:seq<'T1> -> sequence2:seq<'T2> -> seq<'T1 * 'T2> - - /// Combine the three sequences into a list of triples. The two sequences need not have equal lengths: - /// when one sequence is exhausted any remaining elements in the other - /// sequence are ignored. - val zip3: sequence1:seq<'T1> -> sequence2:seq<'T2> -> sequence3:seq<'T3> -> seq<'T1 * 'T2 * 'T3> - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val group_by : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'Key * seq<'T>> - - [] - val is_empty: sequence:seq<'T> -> bool - - [] - val first: chooser:('T -> 'U option) -> sequence:seq<'T> -> 'U option - - [] - val for_all: predicate:('T -> bool) -> sequence:seq<'T> -> bool - - [] - val for_all2: predicate:('T1 -> 'T2 -> bool) -> sequence1:seq<'T1> -> sequence2:seq<'T2> -> bool - - - [] - val find_index: predicate:('T -> bool) -> sequence:seq<'Key * 'T> -> 'Key - - [] - val find_indexi: predicate:('Key -> 'T -> bool) -> sequence:seq<'Key * 'T> -> 'Key - - [] - val tryfind: predicate:('T -> bool) -> sequence:seq<'T> -> 'T option - - [] - val tryfind_index : predicate:('T -> bool) -> sequence:seq<'Key * 'T> -> 'Key option - - [] - val tryfind_indexi : predicate:('Key -> 'T -> bool) -> sequence:seq<'Key * 'T> -> 'Key option - - [] - val map_concat: mapping:('T -> #seq<'U>) -> sequence:seq<'T> -> seq<'U> - - [] - val init_finite: count:int -> initializer:(int -> 'T) -> seq<'T> - - [] - val init_infinite: initializer:(int -> 'T) -> seq<'T> - - [] - val take_while: predicate:('T -> bool) -> sequence:seq<'T> -> seq<'T> - - [] - val skip_while: predicate:('T -> bool) -> sequence:seq<'T> -> seq<'T> - - [] - val distinct_by : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'T> - - [] - val count_by : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'Key * int> - - [] - val sort_by : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'T> - - - [] - val inline sum_by : projection:('T -> ^U) -> sequence:seq<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - [] - val inline average_by : projection:('T -> ^U) -> sequence:seq<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U * int -> ^U) - and ^U : (static member Zero : ^U) - - [] - val min_by : projection:('T -> 'Key) -> sequence:seq<'T> -> 'T - - [] - val max_by : projection:('T -> 'Key) -> sequence:seq<'T> -> 'T -#endif - - [] - /// A group of functions used as part of the compiled representation of F# sequence expressions - module SequenceExpressionHelpers = - - /// The F# compiler emits calls to this function to - /// implement the 'while' operator for F# sequence expressions - val EnumerateWhile : guard:(unit -> bool) -> sequence:seq<'T> -> seq<'T> - - /// The F# compiler emits calls to this function to - /// implement the 'try/finally' operator for F# sequence expressions - val EnumerateThenFinally : sequence:seq<'T> -> compensation:(unit -> unit) -> seq<'T> - - /// The F# compiler emits calls to this function to implement the compiler-intrinsic - /// conversions from untyped System.Collections.IEnumerable sequences to typed sequences - val EnumerateFromFunctions: create:(unit -> 'T) -> moveNext:('T -> bool) -> current:('T -> 'U) -> seq<'U> - - /// The F# compiler emits calls to this function to implement the 'use' operator for F# sequence expressions - val EnumerateUsing : resource:'T -> sequence:('T -> #seq<'U>) -> seq<'U> when 'T :> IDisposable - - [] - /// The F# compiler emits implementations of this type for compiled sequence expressions - type GeneratedSequenceBase<'T> = - /// The F# compiler emits implementations of this method for compiled sequence expressions - new : unit -> GeneratedSequenceBase<'T> - /// The F# compiler emits implementations of this method for compiled sequence expressions - abstract GetFreshEnumerator : unit -> IEnumerator<'T> - /// The F# compiler emits implementations of this method for compiled sequence expressions - abstract GenerateNext : next:byref> -> int - /// The F# compiler emits implementations of this method for compiled sequence expressions - abstract Close: unit -> unit - /// The F# compiler emits implementations of this method for compiled sequence expressions - abstract CheckClose: bool - /// The F# compiler emits implementations of this method for compiled sequence expressions - abstract LastGenerated : 'T - interface IEnumerable<'T> - interface IEnumerable - interface IEnumerator<'T> - interface IEnumerator - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/set.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/set.fs deleted file mode 100644 index c263520c..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/set.fs +++ /dev/null @@ -1,818 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open System.Collections - open System.Collections.Generic - open System.Diagnostics - - (* A classic functional language implementation of binary trees *) - - [] - type (* internal *) SetTree<'T> = - | SetEmpty // height = 0 - | SetNode of 'T * SetTree<'T> * SetTree<'T> * int // height = int - | SetOne of 'T // height = 1 - // OPTIMIZATION: store SetNode(k,SetEmpty,SetEmpty,1) ---> SetOne(k) - // REVIEW: performance rumour has it that the data held in SetNode and SetOne should be - // exactly one cache line on typical architectures. They are currently - // ~6 and 3 words respectively. - - [] - module internal SetTree = - - let height t = - match t with - | SetEmpty -> 0 - | SetOne _ -> 1 - | SetNode (_,_,_,h) -> h - - #if CHECKED - let rec checkInvariant t = - // A good sanity check, loss of balance can hit perf - match t with - | SetEmpty -> true - | SetOne _ -> true - | SetNode (k,t1,t2,h) -> - let h1 = height t1 - let h2 = height t2 - (-2 <= (h1 - h2) && (h1 - h2) <= 2) && checkInvariant t1 && checkInvariant t2 - #endif - - let tolerance = 2 - - let mk l k r = - match l,r with - | SetEmpty,SetEmpty -> SetOne (k) - | _ -> - let hl = height l - let hr = height r - let m = if hl < hr then hr else hl - SetNode(k,l,r,m+1) - - let rebalance t1 k t2 = - let t1h = height t1 - let t2h = height t2 - if t2h > t1h + tolerance then // right is heavier than left - match t2 with - | SetNode(t2k,t2l,t2r,t2h) -> - // one of the nodes must have height > height t1 + 1 - if height t2l > t1h + 1 then // balance left: combination - match t2l with - | SetNode(t2lk,t2ll,t2lr,t2lh) -> - mk (mk t1 k t2ll) t2lk (mk t2lr t2k t2r) - | _ -> failwith "rebalance" - else // rotate left - mk (mk t1 k t2l) t2k t2r - | _ -> failwith "rebalance" - else - if t1h > t2h + tolerance then // left is heavier than right - match t1 with - | SetNode(t1k,t1l,t1r,t1h) -> - // one of the nodes must have height > height t2 + 1 - if height t1r > t2h + 1 then - // balance right: combination - match t1r with - | SetNode(t1rk,t1rl,t1rr,t1rh) -> - mk (mk t1l t1k t1rl) t1rk (mk t1rr k t2) - | _ -> failwith "rebalance" - else - mk t1l t1k (mk t1r k t2) - | _ -> failwith "rebalance" - else mk t1 k t2 - - let rec add (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) k t = - match t with - | SetNode (k2,l,r,h) -> - let c = comparer.Invoke(k,k2) - if c < 0 then rebalance (add comparer k l) k2 r - elif c = 0 then t - else rebalance l k2 (add comparer k r) - | SetOne(k2) -> - // nb. no check for rebalance needed for small trees, also be sure to reuse node already allocated - let c = comparer.Invoke(k,k2) - if c < 0 then SetNode (k,SetEmpty,t,2) - elif c = 0 then t - else SetNode (k,t,SetEmpty,2) - | SetEmpty -> SetOne(k) - - let rec balance comparer t1 k t2 = - // Given t1 < k < t2 where t1 and t2 are "balanced", - // return a balanced tree for . - // Recall: balance means subtrees heights differ by at most "tolerance" - match t1,t2 with - | SetEmpty,t2 -> add comparer k t2 // drop t1 = empty - | t1,SetEmpty -> add comparer k t1 // drop t2 = empty - | SetOne k1,t2 -> add comparer k (add comparer k1 t2) - | t1,SetOne k2 -> add comparer k (add comparer k2 t1) - | SetNode(k1,t11,t12,h1),SetNode(k2,t21,t22,h2) -> - // Have: (t11 < k1 < t12) < k < (t21 < k2 < t22) - // Either (a) h1,h2 differ by at most 2 - no rebalance needed. - // (b) h1 too small, i.e. h1+2 < h2 - // (c) h2 too small, i.e. h2+2 < h1 - if h1+tolerance < h2 then - // case: b, h1 too small - // push t1 into low side of t2, may increase height by 1 so rebalance - rebalance (balance comparer t1 k t21) k2 t22 - elif h2+tolerance < h1 then - // case: c, h2 too small - // push t2 into high side of t1, may increase height by 1 so rebalance - rebalance t11 k1 (balance comparer t12 k t2) - else - // case: a, h1 and h2 meet balance requirement - mk t1 k t2 - - let rec split (comparer : OptimizedClosures.FastFunc2<'T,'T,int>) pivot t = - // Given a pivot and a set t - // Return { x in t s.t. x < pivot }, pivot in t? , { x in t s.t. x > pivot } - match t with - | SetNode(k1,t11,t12,h1) -> - let c = comparer.Invoke(pivot,k1) - if c < 0 then // pivot t1 - let t11_lo,havePivot,t11_hi = split comparer pivot t11 - t11_lo,havePivot,balance comparer t11_hi k1 t12 - elif c = 0 then // pivot is k1 - t11,true,t12 - else // pivot t2 - let t12_lo,havePivot,t12_hi = split comparer pivot t12 - balance comparer t11 k1 t12_lo,havePivot,t12_hi - | SetOne k1 -> - let c = comparer.Invoke(k1,pivot) - if c < 0 then t ,false,SetEmpty // singleton under pivot - elif c = 0 then SetEmpty,true ,SetEmpty // singleton is pivot - else SetEmpty,false,t // singleton over pivot - | SetEmpty -> - SetEmpty,false,SetEmpty - - let rec spliceOutSuccessor t = - match t with - | SetEmpty -> failwith "internal error: Map.splice_out_succ_or_pred" - | SetOne (k2) -> k2,SetEmpty - | SetNode (k2,l,r,_) -> - match l with - | SetEmpty -> k2,r - | _ -> let k3,l' = spliceOutSuccessor l in k3,mk l' k2 r - - let rec remove (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) k t = - match t with - | SetEmpty -> t - | SetOne (k2) -> - let c = comparer.Invoke(k,k2) - if c = 0 then SetEmpty - else t - | SetNode (k2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then rebalance (remove comparer k l) k2 r - elif c = 0 then - match l,r with - | SetEmpty,_ -> r - | _,SetEmpty -> l - | _ -> - let sk,r' = spliceOutSuccessor r - mk l sk r' - else rebalance l k2 (remove comparer k r) - - let rec mem (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) k t = - match t with - | SetNode(k2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then mem comparer k l - elif c = 0 then true - else mem comparer k r - | SetOne(k2) -> (comparer.Invoke(k,k2) = 0) - | SetEmpty -> false - - let rec iter f t = - match t with - | SetNode(k2,l,r,_) -> iter f l; f k2; iter f r - | SetOne(k2) -> f k2 - | SetEmpty -> () - - let rec fold_right f m x = - match m with - | SetNode(k,l,r,h) -> fold_right f l (f k (fold_right f r x)) - | SetOne(k) -> f k x - | SetEmpty -> x - - let rec fold_left f x m = - match m with - | SetNode(k,l,r,h) -> - let x = fold_left f x l in - let x = f x k - fold_left f x r - | SetOne(k) -> f x k - | SetEmpty -> x - - let rec for_all f m = - match m with - | SetNode(k2,l,r,h) -> f k2 && for_all f l && for_all f r - | SetOne(k2) -> f k2 - | SetEmpty -> true - - let rec exists f m = - match m with - | SetNode(k2,l,r,h) -> f k2 || exists f l || exists f r - | SetOne(k2) -> f k2 - | SetEmpty -> false - - let is_empty m = match m with | SetEmpty -> true | _ -> false - - let subset comparer a b = for_all (fun x -> mem comparer x b) a - - let rec filterAux comparer f s acc = - match s with - | SetNode(k,l,r,_) -> - let acc = if f k then add comparer k acc else acc - filterAux comparer f l (filterAux comparer f r acc) - | SetOne(k) -> if f k then add comparer k acc else acc - | SetEmpty -> acc - - let filter comparer f s = filterAux comparer f s SetEmpty - - let rec diffAux comparer m acc = - match m with - | SetNode(k,l,r,_) -> diffAux comparer l (diffAux comparer r (remove comparer k acc)) - | SetOne(k) -> remove comparer k acc - | SetEmpty -> acc - - let diff comparer a b = diffAux comparer b a - - let rec countAux s acc = - match s with - | SetNode(k,l,r,_) -> countAux l (countAux r (acc+1)) - | SetOne(k) -> acc+1 - | SetEmpty -> acc - - let count s = countAux s 0 - - let rec union comparer t1 t2 = - // Perf: tried bruteForce for low heights, but nothing significant - match t1,t2 with - | SetNode(k1,t11,t12,h1),SetNode(k2,t21,t22,h2) -> // (t11 < k < t12) AND (t21 < k2 < t22) - // Divide and Quonquer: - // Suppose t1 is largest. - // Split t2 using pivot k1 into lo and hi. - // Union disjoint subproblems and then combine. - if h1 > h2 then - let lo,_,hi = split comparer k1 t2 in - balance comparer (union comparer t11 lo) k1 (union comparer t12 hi) - else - let lo,_,hi = split comparer k2 t1 in - balance comparer (union comparer t21 lo) k2 (union comparer t22 hi) - | SetEmpty,t -> t - | t,SetEmpty -> t - | SetOne k1,t2 -> add comparer k1 t2 - | t1,SetOne k2 -> add comparer k2 t1 - - let rec intersectionAux comparer b m acc = - match m with - | SetNode(k,l,r,_) -> - let acc = intersectionAux comparer b r acc - let acc = if mem comparer k b then add comparer k acc else acc - intersectionAux comparer b l acc - | SetOne(k) -> - if mem comparer k b then add comparer k acc else acc - | SetEmpty -> acc - - let intersection comparer a b = intersectionAux comparer b a SetEmpty - - let partition1 comparer f k (acc1,acc2) = if f k then (add comparer k acc1,acc2) else (acc1,add comparer k acc2) - - let rec partitionAux comparer f s acc = - match s with - | SetNode(k,l,r,_) -> - let acc = partitionAux comparer f r acc - let acc = partition1 comparer f k acc - partitionAux comparer f l acc - | SetOne(k) -> partition1 comparer f k acc - | SetEmpty -> acc - - let partition comparer f s = partitionAux comparer f s (SetEmpty,SetEmpty) - - // It's easier to get many less-important algorithms right using this active pattern - let (|MatchSetNode|MatchSetEmpty|) s = - match s with - | SetNode(k2,l,r,_) -> MatchSetNode(k2,l,r) - | SetOne(k2) -> MatchSetNode(k2,SetEmpty,SetEmpty) - | SetEmpty -> MatchSetEmpty - - let rec nextElemCont (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) k s cont = - match s with - | MatchSetNode(k2,l,r) -> - let c = comparer.Invoke(k,k2) - if c < 0 then nextElemCont comparer k l (function None -> cont(Some(k2)) | res -> res) - elif c = 0 then cont(minimumElementOpt r) - else nextElemCont comparer k r cont - | MatchSetEmpty -> cont(None) - - and nextElem comparer k s = nextElemCont comparer k s (fun res -> res) - - and prevElemCont (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) k s cont = - match s with - | MatchSetNode(k2,l,r) -> - let c = comparer.Invoke(k,k2) - if c > 0 then prevElemCont comparer k r (function None -> cont(Some(k2)) | res -> res) - elif c = 0 then cont(maximumElementOpt r) - else prevElemCont comparer k l cont - | MatchSetEmpty -> cont(None) - - and prevElem comparer k s = prevElemCont comparer k s (fun res -> res) - - and minimumElementAux s n = - match s with - | SetNode(k,l,r,_) -> minimumElementAux l k - | SetOne(k) -> k - | SetEmpty -> n - - and minimumElementOpt s = - match s with - | SetNode(k,l,r,_) -> Some(minimumElementAux l k) - | SetOne(k) -> Some k - | SetEmpty -> None - - and maximumElementAux s n = - match s with - | SetNode(k,l,r,_) -> maximumElementAux r k - | SetOne(k) -> k - | SetEmpty -> n - - and maximumElementOpt s = - match s with - | SetNode(k,l,r,_) -> Some(maximumElementAux r k) - | SetOne(k) -> Some(k) - | SetEmpty -> None - - let minimumElement s = - match minimumElementOpt s with - | Some(k) -> k - | None -> failwith "minimumElement" - - let maximumElement s = - match maximumElementOpt s with - | Some(k) -> k - | None -> failwith "maximumElement" - - - //-------------------------------------------------------------------------- - // Imperative left-to-right iterators. - //-------------------------------------------------------------------------- - - [] - type iterator<'T> = - { mutable stack: SetTree<'T> list; // invariant: always collapseLHS result - mutable started : bool // true when MoveNext has been called - } - - // collapseLHS: - // a) Always returns either [] or a list starting with SetOne. - // b) The "fringe" of the set stack is unchanged. - let rec collapseLHS stack = - match stack with - | [] -> [] - | SetEmpty :: rest -> collapseLHS rest - | SetOne k :: rest -> stack - | SetNode(k,l,r,h) :: rest -> collapseLHS (l :: SetOne k :: r :: rest) - - let mkIterator s = { stack = collapseLHS [s]; started = false } - - let not_started() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext.")) - let already_finished() = raise (new System.InvalidOperationException("Enumeration already finished.")) - - let current i = - if i.started then - match i.stack with - | SetOne k :: _ -> k - | [] -> already_finished() - | _ -> failwith "Please report error: Set iterator, unexpected stack for current" - else - not_started() - - let rec moveNext i = - if i.started then - match i.stack with - | SetOne k :: rest -> ( i.stack <- collapseLHS rest; - i.stack <> [] - ) - | [] -> false - | _ -> failwith "Please report error: Set iterator, unexpected stack for moveNext" - else - i.started <- true; // The first call to MoveNext "starts" the enumeration. - i.stack <> [] - - let mkIEnumerator s = - let i = ref (mkIterator s) - { new IEnumerator<_> with - member x.Current = current !i - interface IEnumerator with - member x.Current = box (current !i) - member x.MoveNext() = moveNext !i - member x.Reset() = i := mkIterator s - interface System.IDisposable with - member x.Dispose() = () } - - //-------------------------------------------------------------------------- - // Set comparison. This can be expensive. - //-------------------------------------------------------------------------- - - let rec compareStacks (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) l1 l2 = - match l1,l2 with - | [],[] -> 0 - | [],_ -> -1 - | _ ,[] -> 1 - | (SetEmpty _ :: t1),(SetEmpty :: t2) -> compareStacks comparer t1 t2 - | (SetOne(n1k) :: t1),(SetOne(n2k) :: t2) -> - let c = comparer.Invoke(n1k,n2k) - if c <> 0 then c else compareStacks comparer t1 t2 - | (SetOne(n1k) :: t1),(SetNode(n2k,SetEmpty,n2r,_) :: t2) -> - let c = comparer.Invoke(n1k,n2k) - if c <> 0 then c else compareStacks comparer (SetEmpty :: t1) (n2r :: t2) - | (SetNode(n1k,(SetEmpty as emp),n1r,_) :: t1),(SetOne(n2k) :: t2) -> - let c = comparer.Invoke(n1k,n2k) - if c <> 0 then c else compareStacks comparer (n1r :: t1) (emp :: t2) - | (SetNode(n1k,(SetEmpty as emp),n1r,_) :: t1),(SetNode(n2k,SetEmpty,n2r,_) :: t2) -> - let c = comparer.Invoke(n1k,n2k) - if c <> 0 then c else compareStacks comparer (n1r :: t1) (n2r :: t2) - | (SetOne(n1k) :: t1),_ -> - compareStacks comparer (SetEmpty :: SetOne(n1k) :: t1) l2 - | (SetNode(n1k,n1l,n1r,_) :: t1),_ -> - compareStacks comparer (n1l :: SetNode(n1k,SetEmpty,n1r,0) :: t1) l2 - | _,(SetOne(n2k) :: t2) -> - compareStacks comparer l1 (SetEmpty :: SetOne(n2k) :: t2) - | _,(SetNode(n2k,n2l,n2r,_) :: t2) -> - compareStacks comparer l1 (n2l :: SetNode(n2k,SetEmpty,n2r,0) :: t2) - - let compare comparer s1 s2 = - match s1,s2 with - | SetEmpty,SetEmpty -> 0 - | SetEmpty,_ -> -1 - | _,SetEmpty -> 1 - | _ -> compareStacks comparer [s1] [s2] - - let choose s = minimumElement s - - let to_list s = - let rec loop m acc = - match m with - | SetNode(k,l,r,h) -> loop l (k :: loop r acc) - | SetOne(k) -> k ::acc - | SetEmpty -> acc - loop s [] - - let copyToArray s (arr: _[]) i = - let j = ref i - iter (fun x -> arr.[!j] <- x; j := !j + 1) s - - let to_array s = - let n = (count s) - let res = Array.zeroCreate n - copyToArray s res 0; - res - - - - let rec mkFromEnumerator comparer acc (e : IEnumerator<_>) = - if e.MoveNext() then - mkFromEnumerator comparer (add comparer e.Current acc) e - else acc - - let of_seq comparer (c : IEnumerable<_>) = - use ie = c.GetEnumerator() - mkFromEnumerator comparer SetEmpty ie - - let of_array comparer l = Array.fold (fun acc k -> add comparer k acc) SetEmpty l - - - [] -#if FX_NO_DEBUG_PROXIES -#else - [>)>] -#endif -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - [] - [] - - type Set<'T>(comparer:OptimizedClosures.FastFunc2<'T,'T,int>, tree: SetTree<'T>) = - - // We use .NET generics per-instantiation static fields to avoid allocating a new object for each empty - // set (it is just be a lookup into a .NET table of type-instantiation-indexed static fields). - - static let empty : Set<'T> = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'T>() - new Set<'T>(comparer,SetEmpty) - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member internal set.Comparer = comparer - //[] - member internal set.Tree : SetTree<'T> = tree - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - static member Empty :Set<'T> = empty - - member s.Add(x) : Set<'T> = Set<'T>(s.Comparer,SetTree.add s.Comparer x s.Tree ) - member s.Remove(x) : Set<'T> = Set<'T>(s.Comparer,SetTree.remove s.Comparer x s.Tree) - member s.Count = SetTree.count s.Tree - member s.Contains(x) = SetTree.mem s.Comparer x s.Tree - member s.Iterate(x) = SetTree.iter x s.Tree - member s.Fold f z = SetTree.fold_left (fun x z -> f z x) z s.Tree - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member s.IsEmpty = SetTree.is_empty s.Tree - - member s.Partition f : Set<'T> * Set<'T> = - match s.Tree with - | SetEmpty -> s,s - | _ -> let t1,t2 = SetTree.partition s.Comparer f s.Tree in Set<_>(s.Comparer,t1), Set<_>(s.Comparer,t2) - - member s.Filter f : Set<'T> = - match s.Tree with - | SetEmpty -> s - | _ -> Set<_>(s.Comparer,SetTree.filter s.Comparer f s.Tree) - - member s.Map f : Set<'U> = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'U>() - Set<_>(comparer,SetTree.fold_left (fun acc k -> SetTree.add comparer (f k) acc) (SetTree<_>.SetEmpty) s.Tree) - - member s.Exists f = SetTree.exists f s.Tree - - member s.forall f = SetTree.for_all f s.Tree - - static member (-) (a: Set<'T>, b: Set<'T>) = Set<_>.Subtract(a,b) - - [] - static member (+) (a: Set<'T>, b: Set<'T>) = Set<_>.Union(a,b) - - static member Intersection(a: Set<'T>, b: Set<'T>) : Set<'T> = - match b.Tree with - | SetEmpty -> b (* A INTER 0 = 0 *) - | _ -> - match a.Tree with - | SetEmpty -> a (* 0 INTER B = 0 *) - | _ -> Set<_>(a.Comparer,SetTree.intersection a.Comparer a.Tree b.Tree) - - static member Union(a: Set<'T>, b: Set<'T>) : Set<'T> = - match b.Tree with - | SetEmpty -> a (* A U 0 = A *) - | _ -> - match a.Tree with - | SetEmpty -> b (* 0 U B = B *) - | _ -> Set<_>(a.Comparer,SetTree.union a.Comparer a.Tree b.Tree) - - static member Union(sets:seq>) : Set<'T> = - Seq.fold (fun s1 s2 -> Set<_>.Union(s1,s2)) Set<'T>.Empty sets - - static member Intersection(sets:seq>) : Set<'T> = - Seq.reduce (fun s1 s2 -> Set<_>.Intersection(s1,s2)) sets - - static member Subtract(a: Set<'T>, b: Set<'T>) : Set<'T> = - match a.Tree with - | SetEmpty -> a (* 0 - B = 0 *) - | _ -> - match b.Tree with - | SetEmpty -> a (* A - 0 = A *) - | _ -> Set<_>(a.Comparer,SetTree.diff a.Comparer a.Tree b.Tree) - - static member Equality(a: Set<'T>, b: Set<'T>) = (SetTree.compare a.Comparer a.Tree b.Tree = 0) - - static member Compare(a: Set<'T>, b: Set<'T>) = SetTree.compare a.Comparer a.Tree b.Tree - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.Choose = SetTree.choose x.Tree - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.MinimumElement = SetTree.minimumElement x.Tree - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.MaximumElement = SetTree.maximumElement x.Tree - member x.GetNextElement(e) = SetTree.nextElem x.Comparer e x.Tree - member x.GetPreviousElement(e) = SetTree.prevElem x.Comparer e x.Tree - - member x.IsSubsetOf(y: Set<'T>) = SetTree.subset x.Comparer x.Tree y.Tree - member x.IsSupersetOf(y: Set<'T>) = SetTree.subset x.Comparer y.Tree x.Tree - member x.ToList () = SetTree.to_list x.Tree - member x.ToArray () = SetTree.to_array x.Tree - - member this.ComputeHashCode() = - let combineHash x y = (x <<< 1) + y + 631 - let mutable res = 0 - for x in this do - res <- combineHash res (hash x) - abs res - - override this.GetHashCode() = this.ComputeHashCode() - - override this.Equals(that) = - match that with - | :? Set<'T> as that -> - ((this :> System.IComparable).CompareTo(that) = 0) - | _ -> false - - interface System.IComparable with - member this.CompareTo(that: obj) = SetTree.compare this.Comparer this.Tree ((that :?> Set<'T>).Tree) - - interface ICollection<'T> with - member s.Add(x) = raise (new System.NotSupportedException("ReadOnlyCollection")) - member s.Clear() = raise (new System.NotSupportedException("ReadOnlyCollection")) - member s.Remove(x) = raise (new System.NotSupportedException("ReadOnlyCollection")) - member s.Contains(x) = SetTree.mem s.Comparer x s.Tree - member s.CopyTo(arr,i) = SetTree.copyToArray s.Tree arr i - member s.get_IsReadOnly() = true - member s.get_Count() = SetTree.count s.Tree - - interface IEnumerable<'T> with - member s.GetEnumerator() = SetTree.mkIEnumerator s.Tree - - interface IEnumerable with - override s.GetEnumerator() = (SetTree.mkIEnumerator s.Tree :> IEnumerator) - - static member Singleton(x:'T) : Set<'T> = Set<'T>.Empty.Add(x) - - new (elements : seq<'T>) = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'T>() - Set<_>(comparer,SetTree.of_seq comparer elements) - - static member Create(elements : seq<'T>) = Set<'T>(elements) - - static member FromArray(arr : 'T array) : Set<'T> = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'T>() - Set<_>(comparer,SetTree.of_array comparer arr) - - and - [] - SetDebugView<'T>(v: Set<'T>) = - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.Items = v |> Seq.truncate 1000 |> Seq.to_array - -namespace Microsoft.FSharp.Collections - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open System.Collections - open System.Collections.Generic - open System.Diagnostics - - [] - [] - module Set = - - [] - let isEmpty (s : Set<'T>) = s.IsEmpty - - [] - let is_empty (s : Set<'T>) = s.IsEmpty - - [] - let contains x (s : Set<'T>) = s.Contains(x) - - [] - let mem x (s : Set<'T>) = s.Contains(x) - - [] - let add x (s : Set<'T>) = s.Add(x) - - [] - let singleton x = Set<'T>.Singleton(x) - - [] - let remove x (s : Set<'T>) = s.Remove(x) - - [] - let union (s1 : Set<'T>) (s2 : Set<'T>) = Set<'T>.Union(s1,s2) - - [] - let unionMany sets = Set<_>.Union(sets) - - [] - let union_all sets = unionMany sets - - [] - let intersect (s1 : Set<'T>) (s2 : Set<'T>) = Set<'T>.Intersection(s1,s2) - - [] - let intersectMany sets = Set<_>.Intersection(sets) - - [] - let intersect_all sets = intersectMany sets - - [] - let iter f (s : Set<'T>) = s.Iterate(f) - - [] - let empty<'T> : Set<'T> = Set<'T>.Empty - - [] - let forall f (s : Set<'T>) = s.forall f - - [] - let for_all f (s : Set<'T>) = s.forall f - - [] - let exists f (s : Set<'T>) = s.Exists f - - [] - let filter f (s : Set<'T>) = s.Filter f - - [] - let partition f (s : Set<'T>) = s.Partition f - - [] - let fold f z (s : Set<'T>) = SetTree.fold_left f z s.Tree - - [] - let fold_left f z s = fold f z s - - [] - let foldBack f (s : Set<'T>) z = SetTree.fold_right f s.Tree z - - [] - let fold_right f s z = foldBack f s z - - [] - let map f (s : Set<'T>) = s.Map f - - [] - let count (s : Set<'T>) = s.Count - - [] - let minimumElement (s : Set<'T>) = s.MinimumElement - - [] - let maximumElement (s : Set<'T>) = s.MaximumElement - - [] - let choose (s : Set<'T>) = s.Choose - - [] - let of_list l = Set<_>(List.to_seq l) - - [] - let of_array (l : 'T array) = Set<'T>.FromArray(l) - - [] - let to_list (s : Set<'T>) = s.ToList() - - [] - let to_array (s : Set<'T>) = s.ToArray() - - [] - let to_seq (s : Set<'T>) = (s :> seq<'T>) - - [] - let of_seq (c : seq<_>) = Set<_>(c) - - - [] - let next_elt x (s : Set<'T>) = s.GetNextElement(x) - - [] - let prev_elt x (s : Set<'T>) = s.GetPreviousElement(x) - - [] - let min_elt (s : Set<'T>) = s.MinimumElement - - [] - let max_elt (s : Set<'T>) = s.MaximumElement - - [] - let size (s: Set<'T>) = s.Count - - [] - let compare (s1: Set<'T>) (s2: Set<'T>) = Set<_>.Compare(s1,s2) - - [] - let subset (s1: Set<'T>) (s2: Set<'T>) = s1.IsSubsetOf(s2) - - [] - let diff (s1: Set<'T>) (s2: Set<'T>) = s1 - s2 diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/set.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/set.fsi deleted file mode 100644 index 46475cbc..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/set.fsi +++ /dev/null @@ -1,245 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - /// Immutable sets based on binary trees, where comparison is the - /// F# structural comparison function, potentially using implementations - /// of the IComparable interface on key values. - /// - /// See the Set module for further operations on sets. - /// - /// These sets can be used with elements of any type, but you should check that - /// structural hashing and equality on the element type are correct for your type. - [] - type Set<'T> = - - /// Create a set containing elements drawn from the given sequence. - new : elements:seq<'T> -> Set<'T> - - /// The empty set for the type 'T. - static member Empty : Set<'T> - - /// A useful shortcut for Set.add. Note this operation produces a new set - /// and does not mutate the original set. The new set will share many storage - /// nodes with the original. See the Set module for further operations on sets. - member Add : value:'T -> Set<'T> - - /// A useful shortcut for Set.remove. Note this operation produces a new set - /// and does not mutate the original set. The new set will share many storage - /// nodes with the original. See the Set module for further operations on sets. - member Remove : value:'T -> Set<'T> - - /// The number of elements in the set - member Count : int - - /// A useful shortcut for Set.contains. See the Set module for further operations on sets. - member Contains : value:'T -> bool - - /// A useful shortcut for Set.isEmpty. See the Set module for further operations on sets. - member IsEmpty : bool - - /// Return a new set with the elements of the second set removed from the first. - static member Subtract : set1:Set<'T> * set2:Set<'T> -> Set<'T> - - /// Return a new set with the elements of the second set removed from the first. - static member (-) : set1:Set<'T> * set2:Set<'T> -> Set<'T> - - /// Compute the union of the two sets. - static member (+) : set1:Set<'T> * set2:Set<'T> -> Set<'T> - - - /// Evaluates to "true" if all elements of the second set are in the first - member IsSubsetOf: set:Set<'T> -> bool - - /// Evaluates to "true" if all elements of the first set are in the second - member IsSupersetOf: set:Set<'T> -> bool - - - /// Returns the lowest element in the set according to the ordering being used for the set - member MinimumElement: 'T - - /// Returns the highest element in the set according to the ordering being used for the set - member MaximumElement: 'T - -#if DONT_INCLUDE_DEPRECATED -#else - /// Returns the least element in the set that is greater than the given key - /// according to the ordering being used for the set - [] - member GetNextElement: value:'T -> 'T option - - /// Returns the greatest element in the set that is less than the given key - /// according to the ordering being used for the set - [] - member GetPreviousElement: value:'T -> 'T option -#endif - - interface ICollection<'T> - interface IEnumerable<'T> - interface System.Collections.IEnumerable - - interface System.IComparable - override Equals : obj -> bool - - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - [] - [] - - /// Functional programming operators related to the Set<_> type. - module Set = - - /// The empty set for the type 'T . - [] - val empty<'T> : Set<'T> - - /// The set containing the given one element. - val singleton: value:'T -> Set<'T> - - /// Return a new set with an element added to the set. No exception is raised if - /// the set already contains the given element. - val add: value:'T -> set:Set<'T> -> Set<'T> - - ///Evaluates to "true" if the given element is in the given set - val contains: element:'T -> set:Set<'T> -> bool - - ///Return the number of elements in the set. Same as size - val count: set:Set<'T> -> int - - ///Test if any element of the collection satisfies the given predicate. - ///If the input function is f and the elements are i0...iN - ///then computes p i0 or ... or p iN. - val exists: predicate:('T -> bool) -> set:Set<'T> -> bool - - /// Return a new collection containing only the elements of the collection - /// for which the given predicate returns true - val filter: predicate:('T -> bool) -> set:Set<'T> -> Set<'T> - - /// Return a new collection containing the results of applying the - /// given function to each element of the input set - val map: mapping:('T -> 'U) -> set:Set<'T> -> Set<'U> - - /// Apply the given accumulating function to all the elements of the set - val fold: folder:('State -> 'T -> 'State) -> state:'State -> set:Set<'T> -> 'State - - /// Apply the given accumulating function to all the elements of the set - val foldBack: folder:('T -> 'State -> 'State) -> set:Set<'T> -> state:'State -> 'State - - /// Test if all elements of the collection satisfy the given predicate. - /// If the input function is f and the elements are i0...iN and "j0...jN" - /// then computes p i0 && ... && p iN. - val forall: predicate:('T -> bool) -> set:Set<'T> -> bool - - /// Compute the intersection of the two sets. - val intersect: set1:Set<'T> -> set2:Set<'T> -> Set<'T> - - ///Compute the intersection of a sequence of sets. The sequence must be non-empty - val intersectMany: sets:seq> -> Set<'T> - - ///Compute the union of the two sets. - val union: set1:Set<'T> -> set2:Set<'T> -> Set<'T> - - ///Compute the union of a sequence of sets. - val unionMany: sets:seq> -> Set<'T> - - ///Return "true" if the set is empty - val isEmpty: set:Set<'T> -> bool - - ///Apply the given function to each element of the set, in order according - ///to the comparison function - val iter: action:('T -> unit) -> set:Set<'T> -> unit - - ///Split the set into two sets containing the elements for which the given predicate - ///returns true and false respectively - val partition: predicate:('T -> bool) -> set:Set<'T> -> (Set<'T> * Set<'T>) - - ///Return a new set with the given element removed. No exception is raised in - ///the set doesn't contain the given element. - val remove: value: 'T -> set:Set<'T> -> Set<'T> - - /// Build a set that contains the same elements as the given list - val of_list: elements:'T list -> Set<'T> - - /// Build a list that contains the elements of the set in order - val to_list: set:Set<'T> -> 'T list - - /// Build a set that contains the same elements as the given array - val of_array: array:'T array -> Set<'T> - - /// Build an array that contains the elements of the set in order - val to_array: set:Set<'T> -> 'T array - - /// Return a view of the collection as an enumerable object - val to_seq: set:Set<'T> -> seq<'T> - - /// Build a new collection from the given enumerable object - val of_seq: elements:seq<'T> -> Set<'T> - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val union_all: seq> -> Set<'T> - - [] - val min_elt: set:Set<'T> -> 'T - - [] - val max_elt: set:Set<'T> -> 'T - - [] - val next_elt: value:'T -> set:Set<'T> -> 'T option - - [] - val prev_elt: value:'T -> set:Set<'T> -> 'T option - - [] - val size: set:Set<'T> -> int - - [] - val compare: set1:Set<'T> -> set2:Set<'T> -> int - - ///Evaluates to "true" if the given element is in the given set - [] - val mem: element:'T -> set:Set<'T> -> bool - - /// Returns the minimum element of the set - [] - val choose: set:Set<'T> -> 'T - - /// Evaluates to "true" if all elements of the second set are in the first - [] - val subset: set1:Set<'T> -> set2:Set<'T> -> bool - - /// Return a new set with the elements of the second set removed from the first. - [] - val diff: set1:Set<'T> -> set2:Set<'T> -> Set<'T> - - [] - val intersect_all: seq> -> Set<'T> - - [] - val is_empty: set:Set<'T> -> bool - - [] - val for_all: predicate:('T -> bool) -> set:Set<'T> -> bool - - [] - val fold_left: folder:('State -> 'T -> 'State) -> state:'State -> set:Set<'T> -> 'State - - [] - val fold_right: folder:('T -> 'State -> 'State) -> set:Set<'T> -> state:'State -> 'State - -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/string.fs b/tools/FSharp_1.9.6.16/lib/FSharp.Core/string.fs deleted file mode 100644 index e1236f36..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/string.fs +++ /dev/null @@ -1,96 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Core - - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - - [] - [] - module String = - - let inline checkNonNull arg = - match box arg with null -> nullArg "str" | _ -> () - - [] - let concat sep (strings : seq) = - System.String.Join(sep, Seq.to_array strings) - - [] - let iter (f : (char -> unit)) (str:string) = - checkNonNull str - for i = 0 to str.Length - 1 do - f str.[i] - - [] - let iteri f (str:string) = - checkNonNull str - for i = 0 to str.Length - 1 do - f i str.[i] - - [] - let map (f: char -> char) (str:string) = - checkNonNull str - let res = new System.Text.StringBuilder(str.Length) - str |> iter (fun c -> res.Append(f c) |> ignore); - res.ToString() - - [] - let mapi (f: int -> char -> char) (str:string) = - checkNonNull str - let res = new System.Text.StringBuilder(str.Length) - str |> iteri (fun i c -> res.Append(f i c) |> ignore); - res.ToString() - - [] - let collect (f: char -> string) (str:string) = - checkNonNull str - let res = new System.Text.StringBuilder(str.Length) - str |> iter (fun c -> res.Append(f c) |> ignore); - res.ToString() - - [] - let init (count:int) (f: int-> string) = - if count < 0 then invalidArg "n" "the length may not be negative" - let res = new System.Text.StringBuilder(count) - for i = 0 to count - 1 do - res.Append(f i) |> ignore; - res.ToString() - - [] - let replicate (count:int) (str:string) = - checkNonNull str - let res = new System.Text.StringBuilder(str.Length) - for i = 0 to count - 1 do - res.Append(str) |> ignore; - res.ToString() - - [] - let map_concat f str = collect f str - - [] - let forall f (str:string) = - checkNonNull str - let rec check i = (i >= str.Length) || (f str.[i] && check (i+1)) - check 0 - - [] - let for_all f str = forall f str - - [] - let exists f (str:string) = - checkNonNull str - let rec check i = (i < str.Length) && (f str.[i] || check (i+1)) - check 0 - - [] - let length (str:string) = - checkNonNull str - str.Length - - diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.Core/string.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.Core/string.fsi deleted file mode 100644 index bb32b6ee..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.Core/string.fsi +++ /dev/null @@ -1,67 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Core - - open System - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - - /// Functional programming operators for string processing. Further string operations - /// are available via the member functions on strings and other functionality in - /// System.String - /// and System.Text.RegularExpressions types. - [] - [] - module String = - - /// Return a new string made by concatenating the given strings - /// with separator 'sep', i.e. 'a1 + sep + ... + sep + aN' - val concat: sep:string -> strings: seq -> string - - /// Apply the function action to each character in the string. - val iter: action:(char -> unit) -> str:string -> unit - - /// Apply the function action to the index of each character in the string and the character itself. - val iteri: action:(int -> char -> unit) -> str:string -> unit - - /// Build a new string whose characters are the results of applying the function mapping - /// to each of the characters of the input string. - val map: mapping:(char -> char) -> str:string -> string - - /// Build a new string whose characters are the results of applying the function mapping - /// to each character in the string and the character itself. - val mapi: mapping:(int -> char -> char) -> str:string -> string - - /// Build a new string whose characters are the results of applying the function mapping - /// to each of the characters of the input string and concatenating the resulting - /// strings. - val collect: mapping:(char -> string) -> str:string -> string - - /// Build a new string whose characters are the results of applying the function mapping - /// to each index from 0 to count-1 and concatenating the resulting - /// strings. - val init: count:int -> initializer:(int -> string) -> string - - /// Test if all characters in the string satisfy the given predicate. - val forall: predicate:(char -> bool) -> str:string -> bool - - /// Test if any character of the string satisfies the given predicate. - val exists: predicate:(char -> bool) -> str:string -> bool - - /// Return a string by concatenating count instances of str. - val replicate: count:int -> str: string -> string - - /// Return the length of the string. - val length: str:string -> int - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val map_concat: mapping:(char -> string) -> str:string -> string - - [] - val for_all: predicate:(char -> bool) -> str:string -> bool -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.PowerPack/sformat.fs b/tools/FSharp_1.9.6.16/lib/FSharp.PowerPack/sformat.fs deleted file mode 100644 index 821e43b9..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.PowerPack/sformat.fs +++ /dev/null @@ -1,1069 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -// This file is compiled 4(!) times in the codebase -// - as the internal implementation of printf '%A' formatting -// defines: RUNTIME -// - as the internal implementation of structured formatting in the FSharp.Compiler-proto.dll -// defines: INTERNALIZED_POWER_PACK + BUILDING_WITH_LKG -// - as the internal implementation of structured formatting in FSharp.Compiler.dll -// defines: INTERNALIZED_POWER_PACK -// NOTE: this implementation is used by fsi.exe. This is very important. -// - as the public implementation of structured formatting in the FSharp.PowerPack.dll -// defines: -// -// The one implementation file is used because we very much want to keep the implementations of -// structured formatting the same for fsi.exe and '%A' printing. However fsi.exe may have -// a richer feature set. -// -// Note no layout objects are ever transferred between the above implementations, and in -// all 4 cases the layout types are really different types. - -#nowarn "52" // The value has been copied to ensure the original is not mutated by this operation - -#if INTERNALIZED_POWER_PACK -// FSharp.Compiler-proto.dll: -// FSharp.Compiler.dll: -namespace Internal.Utilities.StructuredFormat -#else -#if RUNTIME -// FSharp.Core.dll: -namespace Microsoft.FSharp.Text.StructuredPrintfImpl -#else -// Powerpack: -namespace Microsoft.FSharp.Text.StructuredFormat -#endif -#endif - - // Breakable block layout implementation. - // This is a fresh implementation of pre-existing ideas. - - open System - open System.Diagnostics - open System.Text - open System.IO - open System.Reflection - open System.Globalization - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Reflection - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - - /// A joint, between 2 layouts, is either: - /// - unbreakable, or - /// - breakable, and if broken the second block has a given indentation. - type Joint = - | Unbreakable - | Breakable of int - | Broken of int - - /// Leaf juxt,data,juxt - /// Node juxt,left,juxt,right,juxt and joint - /// - /// If either juxt flag is true, then no space between words. - [] - type Layout = - | Leaf of bool * obj * bool - | Node of bool * layout * bool * layout * bool * joint - | Attr of string * (string * string) list * layout - - and layout = Layout - and joint = Joint - - type IEnvironment = - abstract GetLayout : obj -> layout - abstract MaxColumns : int - abstract MaxRows : int - - module LayoutOps = - let rec juxtLeft = function - | Leaf (jl,text,jr) -> jl - | Node (jl,l,jm,r,jr,joint) -> jl - | Attr (tag,attrs,l) -> juxtLeft l - - let rec juxtRight = function - | Leaf (jl,text,jr) -> jr - | Node (jl,l,jm,r,jr,joint) -> jr - | Attr (tag,attrs,l) -> juxtRight l - - let mkNode l r joint = - let jl = juxtLeft l - let jm = juxtRight l || juxtLeft r - let jr = juxtRight r - Node(jl,l,jm,r,jr,joint) - - - // constructors - - - let objL (obj:obj) = Leaf (false,obj,false) - let sLeaf (l,(str:string),r) = Leaf (l,(str:>obj),r) - let wordL str = sLeaf (false,str,false) - let sepL str = sLeaf (true ,str,true) - let rightL str = sLeaf (true ,str,false) - let leftL str = sLeaf (false,str,true) - let emptyL = sLeaf (true,"",true) - let isEmptyL = function - | Leaf(true,s,true) -> - match s with - | :? string as s -> s = "" - | _ -> false - | _ -> false - - - let aboveL l r = mkNode l r (Broken 0) - - let joinN i l r = mkNode l r (Breakable i) - let join = joinN 0 - let join1 = joinN 1 - let join2 = joinN 2 - let join3 = joinN 3 - - let tagAttrL tag attrs l = Attr(tag,attrs,l) - - let apply2 f l r = if isEmptyL l then r else - if isEmptyL r then l else f l r - - let ($$) l r = mkNode l r (Unbreakable) - let (++) l r = mkNode l r (Breakable 0) - let (--) l r = mkNode l r (Breakable 1) - let (---) l r = mkNode l r (Breakable 2) - let (@@) l r = apply2 (fun l r -> mkNode l r (Broken 0)) l r - let (@@-) l r = apply2 (fun l r -> mkNode l r (Broken 1)) l r - let (@@--) l r = apply2 (fun l r -> mkNode l r (Broken 2)) l r - let tagListL tagger = function - | [] -> emptyL - | [x] -> x - | x::xs -> - let rec process' prefixL = function - [] -> prefixL - | y::ys -> process' ((tagger prefixL) ++ y) ys - in process' x xs - - let commaListL x = tagListL (fun prefixL -> prefixL $$ rightL ",") x - let semiListL x = tagListL (fun prefixL -> prefixL $$ rightL ";") x - let spaceListL x = tagListL (fun prefixL -> prefixL) x - let sepListL x y = tagListL (fun prefixL -> prefixL $$ x) y - let bracketL l = leftL "(" $$ l $$ rightL ")" - let tupleL xs = bracketL (sepListL (sepL ",") xs) - let aboveListL = function - | [] -> emptyL - | [x] -> x - | x::ys -> List.fold (fun pre y -> pre @@ y) x ys - - let optionL xL = function - None -> wordL "None" - | Some x -> wordL "Some" -- (xL x) - - let listL xL xs = leftL "[" $$ sepListL (sepL ";") (List.map xL xs) $$ rightL "]" - - let squareBracketL x = leftL "[" $$ x $$ rightL "]" - - let braceL x = leftL "{" $$ x $$ rightL "}" - - let boundedUnfoldL - (itemL : 'a -> layout) - (project : 'z -> ('a * 'z) option) - (stopShort : 'z -> bool) - (z : 'z) - maxLength = - let rec consume n z = - if stopShort z then [wordL "..."] else - match project z with - | None -> [] (* exhaused input *) - | Some (x,z) -> if n<=0 then [wordL "..."] (* hit print_length limit *) - else itemL x :: consume (n-1) z (* cons recursive... *) - consume maxLength z - - let unfoldL itemL project z maxLength = boundedUnfoldL itemL project (fun _ -> false) z maxLength - - /// These are a typical set of options used to control structured formatting. - [] - type FormatOptions = - { FloatingPointFormat: string; - AttributeProcessor: (string -> (string * string) list -> bool -> unit); -#if RUNTIME -#else -#if INTERNALIZED_POWER_PACK // FSharp.Compiler.dll: This is the PrintIntercepts extensibility point currently revealed by fsi.exe's AddPrinter - PrintIntercepts: (IEnvironment -> obj -> Layout option) list; - StringLimit : int; -#endif -#endif - FormatProvider: System.IFormatProvider; - BindingFlags: System.Reflection.BindingFlags - PrintWidth : int; - PrintDepth : int; - PrintLength : int; - PrintSize : int; - ShowProperties : bool; - ShowIEnumerable: bool; } - static member Default = - { FormatProvider = (System.Globalization.CultureInfo.InvariantCulture :> System.IFormatProvider); -#if RUNTIME -#else -#if INTERNALIZED_POWER_PACK // FSharp.Compiler.dll: This is the PrintIntercepts extensibility point currently revealed by fsi.exe's AddPrinter - PrintIntercepts = []; - StringLimit = System.Int32.MaxValue; -#endif -#endif - AttributeProcessor= (fun _ _ _ -> ()); - BindingFlags = System.Reflection.BindingFlags.Public; - FloatingPointFormat = "g10"; - PrintWidth = 80 ; - PrintDepth = 100 ; - PrintLength = 100; - PrintSize = 10000; - ShowProperties = false; - ShowIEnumerable = true; } - - - - module ReflectUtils = - open System - open System.Reflection - - type TypeInfo = - | TupleType of Type list - | FunctionType of Type * Type - | RecordType of (string * Type) list - | SumType of (string * (string * Type) list) list - | UnitType - | ObjectType of Type - - - let isNamedType(typ:Type) = not (typ.IsArray || typ.IsByRef || typ.IsPointer) - let equivHeadTypes (ty1:Type) (ty2:Type) = - isNamedType(ty1) && - if ty1.IsGenericType then - ty2.IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(ty2.GetGenericTypeDefinition()) - else - ty1.Equals(ty2) - - let option = typedefof - let func = typedefof<(obj -> obj)> - - let isOptionType typ = equivHeadTypes typ (typeof) - let isUnitType typ = equivHeadTypes typ (typeof) - let isListType typ = - FSharpType.IsUnion typ && - (let cases = FSharpType.GetUnionCases typ - cases.Length > 0 && equivHeadTypes (typedefof>) cases.[0].DeclaringType) - - module Type = - - let recdDescOfProps props = - props |> Array.to_list |> List.map (fun (p:PropertyInfo) -> p.Name, p.PropertyType) - - let getTypeInfoOfType (bindingFlags:BindingFlags) (typ:Type) = - if FSharpType.IsTuple(typ) then TypeInfo.TupleType (FSharpType.GetTupleElements(typ) |> Array.to_list) - elif FSharpType.IsFunction(typ) then let ty1,ty2 = FSharpType.GetFunctionElements typ in TypeInfo.FunctionType( ty1,ty2) - elif FSharpType.IsUnion(typ,bindingFlags) then - let cases = FSharpType.GetUnionCases(typ,bindingFlags) - match cases with - | [| |] -> TypeInfo.ObjectType(typ) - | _ -> - TypeInfo.SumType(cases |> Array.to_list |> List.map (fun case -> - let flds = case.GetFields() - case.Name,recdDescOfProps(flds))) - elif FSharpType.IsRecord(typ,bindingFlags) then - let flds = FSharpType.GetRecordFields(typ,bindingFlags) - TypeInfo.RecordType(recdDescOfProps(flds)) - else - TypeInfo.ObjectType(typ) - - let IsOptionType (typ:Type) = isOptionType typ - let IsListType (typ:Type) = isListType typ - let IsUnitType (typ:Type) = isUnitType typ - - type ValueInfo = - | TupleValue of obj list - | FunctionClosureValue of System.Type * obj - | RecordValue of (string * obj) list - | ConstructorValue of string * (string * obj) list - | ExceptionValue of System.Type * (string * obj) list - | UnitValue - | ObjectValue of obj - - module Value = - - // Analyze an object to see if it the representation - // of an F# value. - let GetValueInfoOfObject (bindingFlags:BindingFlags) (obj : obj) = - match obj with - | null -> ObjectValue(obj) - | _ -> - let reprty = obj.GetType() - - // First a bunch of special rules for tuples - // Because of the way F# currently compiles tuple values - // of size > 7 we can only reliably reflect on sizes up - // to 7. - - if FSharpType.IsTuple reprty then - TupleValue (FSharpValue.GetTupleFields obj |> Array.to_list) - elif FSharpType.IsFunction reprty then - FunctionClosureValue(reprty,obj) - - // It must be exception, abstract, record or union. - // Either way we assume the only properties defined on - // the type are the actual fields of the type. Again, - // we should be reading attributes here that indicate the - // true structure of the type, e.g. the order of the fields. - elif FSharpType.IsUnion(reprty,bindingFlags) then - let tag,vals = FSharpValue.GetUnionFields (obj,reprty,bindingFlags) - let props = tag.GetFields() - let pvals = (props,vals) ||> Array.map2 (fun prop v -> prop.Name,v) - ConstructorValue(tag.Name, Array.to_list pvals) - - elif FSharpType.IsExceptionRepresentation(reprty,bindingFlags) then - let props = FSharpType.GetExceptionFields(reprty,bindingFlags) - let vals = FSharpValue.GetExceptionFields(obj,bindingFlags) - let pvals = (props,vals) ||> Array.map2 (fun prop v -> prop.Name,v) - ExceptionValue(reprty, pvals |> Array.to_list) - - elif FSharpType.IsRecord(reprty,bindingFlags) then - let props = FSharpType.GetRecordFields(reprty,bindingFlags) - RecordValue(props |> Array.map (fun prop -> prop.Name, prop.GetValue(obj,null)) |> Array.to_list) - else - ObjectValue(obj) - - // This one is like the above but can make use of additional - // statically-known type information to aid in the - // analysis of null values. - - let GetValueInfo bindingFlags (x : 'a) (* x could be null *) = - let obj = (box x) - match obj with - | null -> - let typ = typeof<'a> - if isOptionType typ then ConstructorValue("None", []) - elif isUnitType typ then UnitValue - else ObjectValue(obj) - | _ -> - GetValueInfoOfObject bindingFlags (obj) - - - let GetInfo bindingFlags (v:'a) = GetValueInfo bindingFlags (v:'a) - - module Display = - - open ReflectUtils - open LayoutOps - let string_of_int (i:int) = i.ToString() - - let typeUsesSystemObjectToString (typ:System.Type) = - try let methInfo = typ.GetMethod("ToString",BindingFlags.Public ||| BindingFlags.Instance,null,[| |],null) - methInfo.DeclaringType = typeof - with e -> false - - /// If "str" ends with "ending" then remove it from "str", otherwise no change. - let trimEnding (ending:string) (str:string) = -#if FX_NO_CULTURE_INFO_ARGS - if str.EndsWith(ending) then -#else - if str.EndsWith(ending,false,CultureInfo.InvariantCulture) then -#endif - str.Substring(0,str.Length - ending.Length) - else str - - let catchExn f = try Choice1Of2 (f ()) with e -> Choice2Of2 e - - // An implementation of break stack. - // Uses mutable state, relying on linear threading of the state. - - type breaks = - Breaks of - int * // pos of next free slot - int * // pos of next possible "outer" break - OR - outer=next if none possible - int array // stack of savings, -ve means it has been broken - - // next is next slot to push into - aka size of current occupied stack. - // outer counts up from 0, and is next slot to break if break forced. - // - if all breaks forced, then outer=next. - // - popping under these conditions needs to reduce outer and next. - - - //let dumpBreaks prefix (Breaks(next,outer,stack)) = () - // printf "%s: next=%d outer=%d stack.Length=%d\n" prefix next outer stack.Length; - // stdout.Flush() - - let chunkN = 400 - let breaks0 () = Breaks(0,0,Array.create chunkN 0) - - let pushBreak saving (Breaks(next,outer,stack)) = - //dumpBreaks "pushBreak" (next,outer,stack); - let stack = - if next = stack.Length then - Array.init (next + chunkN) (fun i -> if i < next then stack.[i] else 0) // expand if full - else - stack - - stack.[next] <- saving; - Breaks(next+1,outer,stack) - - let popBreak (Breaks(next,outer,stack)) = - //dumpBreaks "popBreak" (next,outer,stack); - if next=0 then raise (Failure "popBreak: underflow"); - let topBroke = stack.[next-1] < 0 - let outer = if outer=next then outer-1 else outer // if all broken, unwind - let next = next - 1 - Breaks(next,outer,stack),topBroke - - let forceBreak (Breaks(next,outer,stack)) = - //dumpBreaks "forceBreak" (next,outer,stack); - if outer=next then - // all broken - None - else - let saving = stack.[outer] - stack.[outer] <- -stack.[outer]; - let outer = outer+1 - Some (Breaks(next,outer,stack),saving) - - // ------------------------------------------------------------------------- - // fitting - // ------------------------------------------------------------------------ - - let squashTo (maxWidth,leafFormatter) layout = - if maxWidth <= 0 then layout else - let rec fit breaks (pos,layout) = - // breaks = break context, can force to get indentation savings. - // pos = current position in line - // layout = to fit - //------ - // returns: - // breaks - // layout - with breaks put in to fit it. - // pos - current pos in line = rightmost position of last line of block. - // offset - width of last line of block - // NOTE: offset <= pos -- depending on tabbing of last block - - let breaks,layout,pos,offset = - match layout with - | Attr (tag,attrs,l) -> - let breaks,layout,pos,offset = fit breaks (pos,l) - let layout = Attr (tag,attrs,layout) - breaks,layout,pos,offset - | Leaf (jl,obj,jr) -> - let text:string = leafFormatter obj - // save the formatted text from the squash - let layout = Leaf(jl,(text :> obj),jr) - let textWidth = text.Length - let rec fitLeaf breaks pos = - if pos + textWidth <= maxWidth then - breaks,layout,pos + textWidth,textWidth // great, it fits - else - match forceBreak breaks with - | None -> - breaks,layout,pos + textWidth,textWidth // tough, no more breaks - | Some (breaks,saving) -> - let pos = pos - saving - fitLeaf breaks pos - - fitLeaf breaks pos - | Node (jl,l,jm,r,jr,joint) -> - let mid = if jm then 0 else 1 - match joint with - | Unbreakable -> - let breaks,l,pos,offsetl = fit breaks (pos,l) // fit left - let pos = pos + mid // fit space if juxt says so - let breaks,r,pos,offsetr = fit breaks (pos,r) // fit right - breaks,Node (jl,l,jm,r,jr,Unbreakable),pos,offsetl + mid + offsetr - | Broken indent -> - let breaks,l,pos,offsetl = fit breaks (pos,l) // fit left - let pos = pos - offsetl + indent // broken so - offset left + ident - let breaks,r,pos,offsetr = fit breaks (pos,r) // fit right - breaks,Node (jl,l,jm,r,jr,Broken indent),pos,indent + offsetr - | Breakable indent -> - let breaks,l,pos,offsetl = fit breaks (pos,l) // fit left - // have a break possibility, with saving - let saving = offsetl + mid - indent - let pos = pos + mid - if saving>0 then - let breaks = pushBreak saving breaks - let breaks,r,pos,offsetr = fit breaks (pos,r) - let breaks,broken = popBreak breaks - if broken then - breaks,Node (jl,l,jm,r,jr,Broken indent) ,pos,indent + offsetr - else - breaks,Node (jl,l,jm,r,jr,Breakable indent),pos,offsetl + mid + offsetr - else - // actually no saving so no break - let breaks,r,pos,offsetr = fit breaks (pos,r) - breaks,Node (jl,l,jm,r,jr,Breakable indent) ,pos,offsetl + mid + offsetr - - //Printf.printf "\nDone: pos=%d offset=%d" pos offset; - breaks,layout,pos,offset - - let breaks = breaks0 () - let pos = 0 - let breaks,layout,pos,offset = fit breaks (pos,layout) - layout - - // ------------------------------------------------------------------------- - // showL - // ------------------------------------------------------------------------ - - let combine strs = System.String.Concat(Array.of_list(strs) : string[]) - let showL opts leafFormatter layout = - let push x rstrs = x::rstrs - let z0 = [],0 - let addText (rstrs,i) (text:string) = push text rstrs,i + text.Length - let index (rstrs,i) = i - let extract rstrs = combine(List.rev rstrs) - let newLine (rstrs,i) n = // \n then spaces... - let indent = new System.String(' ', n) - let rstrs = push "\n" rstrs - let rstrs = push indent rstrs - rstrs,n - - // addL: pos is tab level - let rec addL z pos layout = - match layout with - | Leaf (jl,obj,jr) -> - let text = leafFormatter obj - addText z text - | Node (jl,l,jm,r,jr,Broken indent) - // Print width = 0 implies 1D layout, no squash - when not (opts.PrintWidth = 0) -> - let z = addL z pos l - let z = newLine z (pos+indent) - let z = addL z (pos+indent) r - z - | Node (jl,l,jm,r,jr,_) -> - let z = addL z pos l - let z = if jm then z else addText z " " - let pos = index z - let z = addL z pos r - z - | Attr (tag,attrs,l) -> - addL z pos l - - let rstrs,i = addL z0 0 layout - extract rstrs - - - // ------------------------------------------------------------------------- - // outL - // ------------------------------------------------------------------------ - - let outL outAttribute leafFormatter (chan : TextWriter) layout = - // write layout to output chan directly - let write (s:string) = chan.Write(s) - // z is just current indent - let z0 = 0 - let index i = i - let addText z text = write text; (z + text.Length) - let newLine z n = // \n then spaces... - let indent = new System.String(' ',n) - chan.WriteLine(); - write indent; - n - - // addL: pos is tab level - let rec addL z pos layout = - match layout with - | Leaf (jl,obj,jr) -> - let text = leafFormatter obj - addText z text - | Node (jl,l,jm,r,jr,Broken indent) -> - let z = addL z pos l - let z = newLine z (pos+indent) - let z = addL z (pos+indent) r - z - | Node (jl,l,jm,r,jr,_) -> - let z = addL z pos l - let z = if jm then z else addText z " " - let pos = index z - let z = addL z pos r - z - | Attr (tag,attrs,l) -> - let _ = outAttribute tag attrs true - let z = addL z pos l - let _ = outAttribute tag attrs false - z - - let i = addL z0 0 layout - () - - // -------------------------------------------------------------------- - // pprinter: using general-purpose reflection... - // -------------------------------------------------------------------- - - let getValueInfo bindingFlags (x:'a) = Value.GetInfo bindingFlags (x:'a) - - let unpackCons recd = - match recd with - | [(_,h);(_,t)] -> (h,t) - | _ -> failwith "unpackCons" - - let getListValueInfo bindingFlags (x:obj) = - match x with - | null -> None - | _ -> - match getValueInfo bindingFlags x with - | ConstructorValue ("Cons",recd) -> Some (unpackCons recd) - | ConstructorValue ("Empty",[]) -> None - | _ -> failwith "List value had unexpected ValueInfo" - - let compactCommaListL xs = sepListL (sepL ",") xs // compact, no spaces around "," - let nullL = wordL "null" - let measureL = wordL "()" - - // -------------------------------------------------------------------- - // pprinter: attributes - // -------------------------------------------------------------------- - - let makeRecordVerticalL nameXs = - let itemL (name,xL) = let labelL = wordL name in ((labelL $$ wordL "=")) -- (xL $$ (rightL ";")) - let braceL xs = (leftL "{") $$ xs $$ (rightL "}") - braceL (aboveListL (List.map itemL nameXs)) - - let makeRecordHorizontalL nameXs = (* This is a more compact rendering of records - and is more like tuples *) - let itemL (name,xL) = let labelL = wordL name in ((labelL $$ wordL "=")) -- xL - let braceL xs = (leftL "{") $$ xs $$ (rightL "}") - braceL (sepListL (rightL ";") (List.map itemL nameXs)) - - let makeRecordL nameXs = makeRecordVerticalL nameXs (* REVIEW: switch to makeRecordHorizontalL ? *) - - let makePropertiesL nameXs = - let itemL (name,v) = - let labelL = wordL name - (labelL $$ wordL "=") - $$ (match v with - | None -> wordL "?" - | Some xL -> xL) - $$ (rightL ";") - let braceL xs = (leftL "{") $$ xs $$ (rightL "}") - braceL (aboveListL (List.map itemL nameXs)) - - let makeListL itemLs = - (leftL "[") $$ - sepListL (rightL ";") itemLs $$ - (rightL "]") - - let makeArrayL xs = - (leftL "[|") $$ - sepListL (rightL ";") xs $$ - (rightL "|]") - - let makeArray2L xs = leftL "[" $$ aboveListL xs $$ rightL "]" - - // -------------------------------------------------------------------- - // pprinter: anyL - support functions - // -------------------------------------------------------------------- - - let getProperty (obj: obj) name = - let ty = obj.GetType() -#if FX_NO_CULTURE_INFO_ARGS - ty.InvokeMember(name, (BindingFlags.GetProperty ||| BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic), null, obj, Array.of_list [ ]) -#else - ty.InvokeMember(name, (BindingFlags.GetProperty ||| BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic), null, obj, Array.of_list [ ],CultureInfo.InvariantCulture) -#endif - - let formatChar isChar c = - match c with - | '\'' when isChar -> "\\\'" - | '\"' when not isChar -> "\\\"" - //| '\n' -> "\\n" - //| '\r' -> "\\r" - //| '\t' -> "\\t" - | '\\' -> "\\\\" - | '\b' -> "\\b" - | _ when System.Char.IsControl(c) -> - let d1 = (int c / 100) % 10 - let d2 = (int c / 10) % 10 - let d3 = int c % 10 - "\\" + d1.ToString() + d2.ToString() + d3.ToString() - | _ -> c.ToString() - - let formatString (s:string) = - let rec check i = i < s.Length && not (System.Char.IsControl(s,i)) && s.[i] <> '\"' && check (i+1) - let rec conv i acc = if i = s.Length then combine (List.rev acc) else conv (i+1) (formatChar false s.[i] :: acc) - "\"" + s + "\"" - // REVIEW: should we check for the common case of no control characters? Reinstate the following? - //"\"" + (if check 0 then s else conv 0 []) + "\"" - - let formatStringInWidth (width:int) (str:string) = - // Return a truncated version of the string, e.g. - // "This is the initial text, which has been truncat"+[12 chars] - // - // Note: The layout code forces breaks based on leaf size and possible break points. - // It does not force leaf size based on width. - // So long leaf-string width can not depend on their printing context... - // - // The suffix like "+[dd chars]" is 11 chars. - // 12345678901 - let suffixLength = 11 // turning point suffix length - let prefixMinLength = 12 // arbitrary. If print width is reduced, want to print a minimum of information on strings... - let prefixLength = max (width - 2 (*quotes*) - suffixLength) prefixMinLength - "\"" ^ (str.Substring(0,prefixLength)) ^ "\"" ^ "+[" ^ (str.Length - prefixLength).ToString() ^ " chars]" - - // -------------------------------------------------------------------- - // pprinter: anyL - // -------------------------------------------------------------------- - - type Precedence = - | BracketIfTupleOrNotAtomic = 2 - | BracketIfTuple = 3 - | NeverBracket = 4 - - // In fsi.exe, certain objects are not printed for top-level bindings. - type ShowMode = ShowAll | ShowTopLevelBinding - - // polymorphic and inner recursion limitations prevent us defining polyL in the recursive loop - let polyL bindingFlags (objL: ShowMode -> int -> Precedence -> ValueInfo -> obj -> Layout) showMode i prec (x:'a) (* x could be null *) = - objL showMode i prec (getValueInfo bindingFlags (x:'a)) (box x) - - let anyL showMode bindingFlags (opts:FormatOptions) (x:'a) = - // showMode = ShowTopLevelBinding on the outermost expression when called from fsi.exe, - // This allows certain outputs, e.g. objects that would print as to be suppressed, etc. See 4343. - // Calls to layout proper sub-objects should pass showMode = ShowAll. - - // Precedences to ensure we add brackets in the right places - - // Keep a record of objects encountered along the way - let path = Dictionary(10,HashIdentity.Reference) - - // Roughly count the "nodes" printed, e.g. leaf items and inner nodes, but not every bracket and comma. - let size = ref opts.PrintSize - let exceededPrintSize() = !size<=0 - let countNodes n = if !size > 0 then size := !size - n else () (* no need to keep decrementing (and avoid wrap around) *) - let stopShort _ = exceededPrintSize() // for unfoldL - - // Recursive descent - let rec objL depthLim prec (x:obj) = polyL bindingFlags objWithReprL ShowAll depthLim prec x (* showMode for inner expr *) - and sameObjL depthLim prec (x:obj) = polyL bindingFlags objWithReprL showMode depthLim prec x (* showMode preserved *) - - and objWithReprL showMode depthLim prec (info:ValueInfo) (x:obj) (* x could be null *) = - let showModeFilter lay = match showMode with ShowAll -> lay | ShowTopLevelBinding -> emptyL - try - if depthLim<=0 || exceededPrintSize() then wordL "..." else - match x with - | null -> - reprL showMode (depthLim-1) prec info x - | _ -> - if (path.ContainsKey(x)) then - wordL "..." - else - path.Add(x,0); - let res = - - // Try the extensibility attribute - match x.GetType().GetCustomAttributes (typeof, true) with - | null | [| |] -> None - | res -> - let attr = (res.[0] :?> StructuredFormatDisplayAttribute) - let txt = attr.Value - if txt = null || txt.Length <= 1 then - None - else - let p1 = txt.IndexOf "{" - let p2 = txt.LastIndexOf "}" - if p1 < 0 || p2 < 0 || p1+1 >= p2 then - None - else - let preText = if p1 <= 0 then "" else txt.[0..p1-1] - let postText = if p2+1 >= txt.Length then "" else txt.[p2+1..] - let prop = txt.[p1+1..p2-1] - match catchExn (fun () -> getProperty x prop) with - | Choice2Of2 e -> Some (wordL ("")) - | Choice1Of2 alternativeObj -> - try - let alternativeObjL = - match alternativeObj with - // A particular rule is that if the alternative property - // returns a string, we turn off auto-quoting and esaping of - // the string, i.e. just treat the string as display text. - // This allows simple implementations of - // such as - // - // [] - // type BigInt(signInt:int, v : BigNat) = - // member x.StructuredDisplayString = x.ToString() - // - | :? string as s -> sepL s - | _ -> sameObjL (depthLim-1) Precedence.BracketIfTuple alternativeObj - countNodes 0 (* 0 means we do not count the preText and postText *) - Some (leftL preText $$ alternativeObjL $$ rightL postText) - with _ -> - None - -#if RUNTIME -#else -#if INTERNALIZED_POWER_PACK // FSharp.Compiler.dll: This is the PrintIntercepts extensibility point currently revealed by fsi.exe's AddPrinter - let res = - match res with - | Some _ -> res - | None -> - let env = { new IEnvironment with - member env.GetLayout(y) = objL (depthLim-1) Precedence.BracketIfTuple y - member env.MaxColumns = opts.PrintLength - member env.MaxRows = opts.PrintLength } - opts.PrintIntercepts |> List.tryPick (fun intercept -> intercept env x) -#endif -#endif - let res = - match res with - | Some res -> res - | None -> reprL showMode (depthLim-1) prec info x - path .Remove(x) |> ignore; - res - with - e -> - countNodes 1 - wordL ("Error: " + e.Message) - - and recdAtomicTupleL depthLim recd = - // tuples up args to UnionConstruction or ExceptionConstructor. no node count. - match recd with - | [(_,x)] -> objL depthLim Precedence.BracketIfTupleOrNotAtomic x - | txs -> leftL "(" $$ compactCommaListL (List.map (snd >> objL depthLim Precedence.BracketIfTuple) txs) $$ rightL ")" - - and bracketIfL b basicL = - if b then (leftL "(") $$ basicL $$ (rightL ")") else basicL - - and reprL showMode depthLim prec repr x (* x could be null *) = - let showModeFilter lay = match showMode with ShowAll -> lay | ShowTopLevelBinding -> emptyL - match repr with - | TupleValue vals -> - let basicL = sepListL (rightL ",") (List.map (objL depthLim Precedence.BracketIfTuple ) vals) - bracketIfL (prec <= Precedence.BracketIfTuple) basicL - - | RecordValue items -> - let itemL (name,x) = - countNodes 1 // record labels are counted as nodes. [REVIEW: discussion under 4090]. - (name,objL depthLim Precedence.BracketIfTuple x) - makeRecordL (List.map itemL items) - - | ConstructorValue (constr,recd) when (* x is List. Note: "null" is never a valid list value. *) - x<>null && Type.IsListType (x.GetType()) -> - match constr with - | "Cons" -> - let (x,xs) = unpackCons recd - let project xs = getListValueInfo bindingFlags xs - let itemLs = objL depthLim Precedence.BracketIfTuple x :: boundedUnfoldL (objL depthLim Precedence.BracketIfTuple) project stopShort xs (opts.PrintLength - 1) - makeListL itemLs - | _ -> - countNodes 1 - wordL "[]" - - | ConstructorValue(nm,[]) -> - countNodes 1 - (wordL nm) - - | ConstructorValue(nm,recd) -> - countNodes 1 (* e.g. Some (Some (Some (Some 2))) should count for 5 *) - (wordL nm --- recdAtomicTupleL depthLim recd) |> bracketIfL (prec <= Precedence.BracketIfTupleOrNotAtomic) - - | ExceptionValue(ty,recd) -> - countNodes 1 - // Bug 4045: ty.Name may have form Exception. We should be using the constructor . - let name = ty.Name |> trimEnding "Exception" (* if present, trim trailing "Exception" from type name *) - match recd with - | [] -> (wordL name) - | recd -> (wordL name --- recdAtomicTupleL depthLim recd) |> bracketIfL (prec <= Precedence.BracketIfTupleOrNotAtomic) - - | FunctionClosureValue(ty,obj) -> - // Q: should function printing include the ty.Name? It does not convey much useful info to most users, e.g. "clo@0_123". - countNodes 1 - wordL ("") |> showModeFilter - - | ObjectValue(obj) -> - match obj with - | null -> (countNodes 1; nullL) - | _ -> - let ty = obj.GetType() - match obj with - | :? string as s -> - countNodes 1 -#if INTERNALIZED_POWER_PACK - if s.Length + 2(*quotes*) <= opts.StringLimit then - // With the quotes, it fits within the limit. - wordL (formatString s) - else - // When a string is considered too long to print, there is a choice: what to print? - // a) -- follows - // b) -- follows and gives just the length - // c) "abcdefg"+[n chars] -- gives a prefix and the remaining chars - wordL (formatStringInWidth opts.StringLimit s) -#else - wordL (formatString s) -#endif - | :? System.Array as arr -> - match arr.Rank with - | 1 -> - let n = arr.Length - let b1 = arr.GetLowerBound(0) - let project depthLim = if depthLim=(b1+n) then None else Some (box (arr.GetValue(depthLim)),depthLim+1) - let itemLs = boundedUnfoldL (objL depthLim Precedence.BracketIfTuple) project stopShort b1 opts.PrintLength - makeArrayL (if b1 = 0 then itemLs else wordL("bound1="+string_of_int b1)::itemLs) - | 2 -> - let n1 = arr.GetLength(0) - let n2 = arr.GetLength(1) - let b1 = arr.GetLowerBound(0) - let b2 = arr.GetLowerBound(1) - let project2 x y = - if x>=(b1+n1) || y>=(b2+n2) then None - else Some (box (arr.GetValue(x,y)),y+1) - let rowL x = boundedUnfoldL (objL depthLim Precedence.BracketIfTuple) (project2 x) stopShort b2 opts.PrintLength |> makeListL - let project1 x = if x>=(b1+n1) then None else Some (x,x+1) - let rowsL = boundedUnfoldL rowL project1 stopShort b1 opts.PrintLength - makeArray2L (if b1=0 && b2 = 0 then rowsL else wordL("bound1=" + string_of_int b1)::wordL("bound2=" + string_of_int b2)::rowsL) - | n -> - makeArrayL [wordL("rank=" + string_of_int n)] - - | :? System.Collections.IEnumerable as ie -> - if opts.ShowIEnumerable then - let it = ie.GetEnumerator() - try - let itemLs = boundedUnfoldL (objL depthLim Precedence.BracketIfTuple) (fun () -> if it.MoveNext() then Some(it.Current,()) else None) stopShort () (1+opts.PrintLength/30) - (wordL "seq" --- makeListL itemLs) |> bracketIfL (prec <= Precedence.BracketIfTupleOrNotAtomic) - finally - match it with - | :? System.IDisposable as e -> e.Dispose() - | _ -> () - - else - // Sequence printing is turned off for declared-values, and maybe be disabled to users. - // There is choice here, what to print? or ... or ? - // Also, in the declared values case, if the sequence is actually a known non-lazy type (list, array etc etc) we could print it. - wordL "" |> showModeFilter - | _ -> - if showMode = ShowTopLevelBinding && typeUsesSystemObjectToString (obj.GetType()) then - emptyL - else - countNodes 1 - let basicL = LayoutOps.objL obj (* This burries an obj in the layout, rendered at squash time via a leafFormatter. - * If the leafFormatter was directly here, then layout leaves could store strings. - *) - match obj with - | _ when opts.ShowProperties -> - let props = ty.GetProperties(BindingFlags.GetField ||| BindingFlags.Instance ||| BindingFlags.Public) - // massively reign in deep printing of properties - let nDepth = depthLim/10 - System.Array.Sort((props:>System.Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> PropertyInfo).Name) ((p2 :?> PropertyInfo).Name) } ); - if props.Length = 0 || (nDepth <= 0) then basicL - else basicL --- - (props - |> Array.to_list - |> List.map (fun p -> (p.Name,(try Some (objL nDepth Precedence.BracketIfTuple (getProperty obj p.Name)) - with _ -> None))) - |> makePropertiesL) - | _ -> basicL - | UnitValue -> countNodes 1; measureL - - polyL bindingFlags objWithReprL showMode opts.PrintDepth Precedence.BracketIfTuple x - - // -------------------------------------------------------------------- - // pprinter: leafFormatter - // -------------------------------------------------------------------- - -#if Suggestion4299 - // See bug 4299. Suppress FSI_dddd+ from fsi printer. - let fixupForInteractiveFSharpClassesWithNoToString obj (text:string) = - // Given obj:T. - // If T is a nested type inside a parent type called FSI_dddd, then it looks like an F# Interactive type. - // Further, if the .ToString() text starts with "FSI_dddd+T" then it looks like it's the default ToString. - // A better test: it is default ToString if the MethodInfo.DeclaringType is System.Object. - // In this case, replace "FSI_dddd+T" by "T". - // assert(obj <> null) - let fullName = obj.GetType().FullName // e.g. "FSI_0123+Name" - let name = obj.GetType().Name // e.g. "Name" - let T = obj.GetType() - if text.StartsWith(fullName) then - // text could be a default .ToString() since it starts with the FullName of the type. More checks... - if T.IsNested && - T.DeclaringType.Name.StartsWith("FSI_") && // Name has "FSI_" which is - T.DeclaringType.Name.Substring(4) |> Seq.forall System.Char.IsDigit // followed by digits? - then - name ^ text.Substring(fullName.Length) // replace fullName by name at start of text - else - text - else - text -#endif - - let leafFormatter (opts:FormatOptions) (obj :obj) = - match obj with - | null -> "null" - | :? double as d -> - let s = d.ToString(opts.FloatingPointFormat,opts.FormatProvider) - if System.Double.IsNaN(d) then "nan" - elif System.Double.IsNegativeInfinity(d) then "-infinity" - elif System.Double.IsPositiveInfinity(d) then "infinity" - elif opts.FloatingPointFormat.[0] = 'g' && String.forall(fun c -> System.Char.IsDigit(c) || c = '-') s - then s + ".0" - else s - | :? single as d -> - (if System.Single.IsNaN(d) then "nan" - elif System.Single.IsNegativeInfinity(d) then "-infinity" - elif System.Single.IsPositiveInfinity(d) then "infinity" - elif opts.FloatingPointFormat.Length >= 1 && opts.FloatingPointFormat.[0] = 'g' - && float32(System.Int32.MinValue) < d && d < float32(System.Int32.MaxValue) - && float32(int32(d)) = d - then (System.Convert.ToInt32 d).ToString(opts.FormatProvider) + ".0" - else d.ToString(opts.FloatingPointFormat,opts.FormatProvider)) - + "f" - | :? System.Decimal as d -> d.ToString("g",opts.FormatProvider) + "M" - | :? uint64 as d -> d.ToString(opts.FormatProvider) + "UL" - | :? int64 as d -> d.ToString(opts.FormatProvider) + "L" - | :? int32 as d -> d.ToString(opts.FormatProvider) - | :? uint32 as d -> d.ToString(opts.FormatProvider) + "u" - | :? int16 as d -> d.ToString(opts.FormatProvider) + "s" - | :? uint16 as d -> d.ToString(opts.FormatProvider) + "us" - | :? sbyte as d -> d.ToString(opts.FormatProvider) + "y" - | :? byte as d -> d.ToString(opts.FormatProvider) + "uy" - | :? nativeint as d -> d.ToString() + "n" - | :? unativeint as d -> d.ToString() + "un" - | :? bool as b -> (if b then "true" else "false") - | :? char as c -> "\'" + formatChar true c + "\'" - | _ -> try let text = obj.ToString() -//Suggestion4299. Not yet fixed. -//#if INTERNALIZED_POWER_PACK -// let text = fixupForInteractiveFSharpClassesWithNoToString obj text -//#endif - text - with e -> - // If a .ToString() call throws an exception, catch it and use the message as the result. - // This may be informative, e.g. division by zero etc... - "" - - let any_to_layout opts x = anyL ShowAll BindingFlags.Public opts x - - let squash_layout opts l = - // Print width = 0 implies 1D layout, no squash - if opts.PrintWidth = 0 then - l - else - l |> squashTo (opts.PrintWidth,leafFormatter opts) - - let output_layout opts oc l = - l |> squash_layout opts - |> outL opts.AttributeProcessor (leafFormatter opts) oc - - let layout_to_string opts l = - l |> squash_layout opts - |> showL opts (leafFormatter opts) - - let output_any_ex opts oc x = x |> any_to_layout opts |> output_layout opts oc - - let output_any oc x = output_any_ex FormatOptions.Default oc x - - let layout_as_string opts x = x |> any_to_layout opts |> layout_to_string opts - - let any_to_string x = layout_as_string FormatOptions.Default x - -#if RUNTIME - let internal printf_any_to_string opts (bindingFlags:BindingFlags) x = - x |> anyL ShowAll bindingFlags opts |> layout_to_string opts -#endif - -#if INTERNALIZED_POWER_PACK - /// Called - let fsi_any_to_layout opts x = anyL ShowTopLevelBinding BindingFlags.Public opts x -#endif diff --git a/tools/FSharp_1.9.6.16/lib/FSharp.PowerPack/sformat.fsi b/tools/FSharp_1.9.6.16/lib/FSharp.PowerPack/sformat.fsi deleted file mode 100644 index 01840acc..00000000 --- a/tools/FSharp_1.9.6.16/lib/FSharp.PowerPack/sformat.fsi +++ /dev/null @@ -1,257 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -// This file is compiled 4(!) times in the codebase -// - as the internal implementation of printf '%A' formatting -// defines: RUNTIME -// - as the internal implementation of structured formatting in the FSharp.Compiler-proto.dll -// defines: INTERNALIZED_POWER_PACK + BUILDING_WITH_LKG -// - as the internal implementation of structured formatting in FSharp.Compiler.dll -// defines: INTERNALIZED_POWER_PACK -// NOTE: this implementation is used by fsi.exe. This is very important. -// - as the public implementation of structured formatting in the FSharp.PowerPack.dll -// defines: -// -// The one implementation file is used because we very much want to keep the implementations of -// structured formatting the same for fsi.exe and '%A' printing. However fsi.exe may have -// a richer feature set. -// -// Note no layout objects are ever transferred between the above implementations, and in -// all 4 cases the layout types are really different types. - -#if INTERNALIZED_POWER_PACK -// FSharp.Compiler-proto.dll: -// FSharp.Compiler.dll: -namespace Internal.Utilities.StructuredFormat -#else -#if RUNTIME -// FSharp.Core.dll: -namespace Microsoft.FSharp.Text.StructuredPrintfImpl -#else -// Powerpack: -namespace Microsoft.FSharp.Text.StructuredFormat -#endif -#endif - - open System - open System.IO - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - - /// Data representing structured layouts of terms. -#if INTERNALIZED_POWER_PACK // FSharp.Compiler-proto.dll, FSharp.Compiler.dll: the F# compiler likes to see these representations - - /// Data representing joints in structured layouts of terms. The representation - /// of this data type is only for the consumption of formatting engines. - type Joint = - | Unbreakable - | Breakable of int - | Broken of int - - /// Data representing structured layouts of terms. The representation - /// of this data type is only for the consumption of formatting engines. - [] - type Layout = - | Leaf of bool * obj * bool - | Node of bool * Layout * bool * Layout * bool * Joint - | Attr of string * (string * string) list * Layout -#else -#if RUNTIME // FSharp.Core.dll makes things internal and hides representations - type internal Layout -#else // FSharp.PowerPack.dll makes things public but hides representations - type Layout -#endif -#endif - - -#if RUNTIME // FSharp.Core.dll doesn't use PrintIntercepts -#else // FSharp.Compiler.dll, FSharp.Compiler-proto.dll, FSharp.PowerPack.dll - type IEnvironment = - /// Return to the layout-generation - /// environment to layout any otherwise uninterpreted object - abstract GetLayout : obj -> Layout - /// The maximum number of elements for which to generate layout for - /// list-like structures, or columns in table-like - /// structures. -1 if no maximum. - abstract MaxColumns : int - /// The maximum number of rows for which to generate layout for table-like - /// structures. -1 if no maximum. - abstract MaxRows : int -#endif - - /// A layout is a sequence of strings which have been joined together. - /// The strings are classified as words, separators and left and right parenthesis. - /// This classification determines where spaces are inserted. - /// A joint is either unbreakable, breakable or broken. - /// If a joint is broken the RHS layout occurs on the next line with optional indentation. - /// A layout can be squashed to for given width which forces breaks as required. - module -#if RUNTIME // FSharp.Core.dll - internal -#endif - LayoutOps = - - /// The empty layout - val emptyL : Layout - /// Is it the empty layout? - val isEmptyL : layout:Layout -> bool - - /// An uninterpreted leaf, to be interpreted into a string - /// by the layout engine. This allows leaf layouts for numbers, strings and - /// other atoms to be customized according to culture. - val objL : value:obj -> Layout - - /// An string leaf - val wordL : text:string -> Layout - /// An string which requires no spaces either side. - val sepL : text:string -> Layout - /// An string which is right parenthesis (no space on it's left). - val rightL : text:string -> Layout - /// An string which is left parenthesis (no space on the right). - val leftL : text:string -> Layout - - /// Join, unbreakable. - val ( $$ ) : layout1:Layout -> layout2:Layout -> Layout - /// Join, possible break with indent=0 - val ( ++ ) : layout1:Layout -> layout2:Layout -> Layout - /// Join, possible break with indent=1 - val ( -- ) : layout1:Layout -> layout2:Layout -> Layout - /// Join, possible break with indent=2 - val ( --- ) : layout1:Layout -> layout2:Layout -> Layout - /// Join broken with ident=0 - val ( @@ ) : layout1:Layout -> layout2:Layout -> Layout - /// Join broken with ident=1 - val ( @@- ) : layout1:Layout -> layout2:Layout -> Layout - /// Join broken with ident=2 - val ( @@-- ) : layout1:Layout -> layout2:Layout -> Layout - - /// Join layouts into a comma separated list. - val commaListL : layouts:Layout list -> Layout - - /// Join layouts into a space separated list. - val spaceListL : layouts:Layout list -> Layout - - /// Join layouts into a semi-colon separated list. - val semiListL : layouts:Layout list -> Layout - - /// Join layouts into a list separated using the given Layout. - val sepListL : layout1:Layout -> layouts:Layout list -> Layout - - /// Wrap round brackets around Layout. - val bracketL : Layout:Layout -> Layout - /// Wrap square brackets around layout. - val squareBracketL : layout:Layout -> Layout - /// Wrap braces around layout. - val braceL : layout:Layout -> Layout - /// Form tuple of layouts. - val tupleL : layouts:Layout list -> Layout - /// Layout two vertically. - val aboveL : layout1:Layout -> layout2:Layout -> Layout - /// Layout list vertically. - val aboveListL : layouts:Layout list -> Layout - - /// Layout like an F# option. - val optionL : selector:('T -> Layout) -> value:'T option -> Layout - /// Layout like an F# list. - val listL : selector:('T -> Layout) -> value:'T list -> Layout - - /// See tagL - val tagAttrL : text:string -> maps:(string * string) list -> layout:Layout -> Layout - - /// For limitting layout of list-like sequences (lists,arrays,etc). - /// unfold a list of items using (project and z) making layout list via itemL. - /// If reach maxLength (before exhausting) then truncate. - val unfoldL : selector:('T -> Layout) -> folder:('State -> ('T * 'State) option) -> state:'State -> count:int -> Layout list - - /// A record of options to control structural formatting. - /// For F# Interactive properties matching those of this value can be accessed via the 'fsi' - /// value. - /// - /// Floating Point format given in the same format accepted by System.Double.ToString, - /// e.g. f6 or g15. - /// - /// If ShowProperties is set the printing process will evaluate properties of the values being - /// displayed. This may cause additional computation. - /// - /// The ShowIEnumerable is set the printing process will force the evalution of IEnumerable objects - /// to a small, finite depth, as determined by the printing parameters. - /// This may lead to additional computation being performed during printing. - /// - /// - /// From F# Interactive the default settings can be adjusted using, for example, - ///
-    ///   open Microsoft.FSharp.Compiler.Interactive.Settings;;
-    ///   setPrintWidth 120;;
-    /// 
- ///
- [] - type -#if RUNTIME // FSharp.Core.dll - internal -#endif - FormatOptions = - { FloatingPointFormat: string - AttributeProcessor: (string -> (string * string) list -> bool -> unit); -#if RUNTIME // FSharp.Core.dll: PrintIntercepts aren't used there -#else -#if INTERNALIZED_POWER_PACK // FSharp.Compiler.dll: This is the PrintIntercepts extensibility point currently revealed by fsi.exe's AddPrinter - PrintIntercepts: (IEnvironment -> obj -> Layout option) list; - StringLimit: int; -#endif -#endif - FormatProvider: System.IFormatProvider - BindingFlags: System.Reflection.BindingFlags - PrintWidth : int - PrintDepth : int - PrintLength : int - PrintSize : int - ShowProperties : bool - ShowIEnumerable: bool } - static member Default : FormatOptions - - module -#if RUNTIME // FSharp.Core.dll - internal -#endif - Display = - - - /// Convert any value to a string using a standard formatter - /// Data is typically formatted in a structured format, e.g. - /// lists are formatted using the "[1;2]" notation. - /// The details of the format are not specified and may change - /// from version to version and according to the flags given - /// to the F# compiler. The format is intended to be human-readable, - /// not machine readable. If alternative generic formats are required - /// you should develop your own formatter, using the code in the - /// implementation of this file as a starting point. - /// - /// Data from other .NET languages is formatted using a virtual - /// call to Object.ToString() on the boxed version of the input. - val any_to_string: value:'T -> string - - /// Ouput any value to a channel using the same set of formatting rules - /// as any_to_string - val output_any: writer:TextWriter -> value:'T -> unit - -#if RUNTIME // FSharp.Core.dll: Most functions aren't needed in FSharp.Core.dll, but we add one entry for printf - val printf_any_to_string: options:FormatOptions -> bindingFlags:System.Reflection.BindingFlags -> value:'T -> string -#else - val any_to_layout : options:FormatOptions -> value:'T -> Layout - val squash_layout : options:FormatOptions -> layout:Layout -> Layout - val output_layout : options:FormatOptions -> writer:TextWriter -> layout:Layout -> unit - val layout_as_string: options:FormatOptions -> value:'T -> string -#endif - - /// Convert any value to a layout using the given formatting options. The - /// layout can then be processed using formatting display engines such as - /// those in the LayoutOps module. any_to_string and output_any are - /// built using any_to_layout with default format options. - val layout_to_string: options:FormatOptions -> layout:Layout -> string - - -#if INTERNALIZED_POWER_PACK - val fsi_any_to_layout : options:FormatOptions -> value:'T -> Layout -#endif diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array.html deleted file mode 100644 index efb57e0b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array.html +++ /dev/null @@ -1,325 +0,0 @@ -Microsoft.FSharp.Collections.Array -
-
-

[Home] Module Microsoft.FSharp.Collections.Array


-
-
- - - -
- Basic operations on arrays - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val append : 'T array -> 'T array -> 'T array
- Build a new array that contains the elements of the first array followed by the elements of the second array -
val average : overloaded
- Return the average of the elements in the array. If the array is empty an ArgumentException is thrown. -
val averageBy : overloaded
- Return the average of the elements generated by applying the function to each element of the array. - If the array is empty an ArgumentException is thrown. -
val blit : 'T array -> int -> 'T array -> int -> int -> unit
- Read a range of elements from the first array and write them into the second. -
val choose : ('T -> 'U option) -> 'T array -> 'U array
- 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 collect : ('T -> 'U array) -> 'T array -> 'U array
- For each element of the array, apply the given function. Concatenate all the results and return the combined array. -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'zip' instead")>]
-val combine : 'T1 array -> 'T2 array -> ('T1 * 'T2) array
val concat : seq<'T array> -> 'T array
- Build a new array that contains the elements of each of the given sequence of arrays -
val copy : 'T array -> 'T array
- Build a new array that contains the elements of the given array -
val create : int -> 'T -> 'T array
- Create an array whose elements are all initially the given value. -
[<GeneralizableValueAttribute ()>]
-val empty<'T> : 'T array
- Return an empty array of the given type -
val exists : ('T -> bool) -> 'T array -> bool
- Test if any element of the array satisfies the given predicate. - - The predicate is applied to the elements of the input array. If any application - returns true then the overall result is true and no further elements are tested. - Otherwise, false is returned. -
val exists2 : ('T1 -> 'T2 -> bool) -> 'T1 array -> 'T2 array -> bool
- Test if any pair of corresponding elements of the arrays satisfies the given predicate. - - The predicate is applied to matching elements in the two collections up to the lesser of the - two lengths of the collections. If any application returns true then the overall result is - true and no further elements are tested. Otherwise, if one collections is longer - than the other then the ArgumentException exception is raised. - Otherwise, false is returned. -
val fill : 'T array -> int -> int -> 'T -> unit
- Fill a range of elements of the array with the given value. -
val filter : ('T -> bool) -> 'T array -> 'T array
- Return a new collection containing only the elements of the collection - for which the given predicate returns "true" -
val find : ('T -> bool) -> 'T array -> 'T
- Return the first element for which the given function returns 'true'. - Raise KeyNotFoundException if no such element exists. -
val findIndex : ('T -> bool) -> 'T array -> int
- Return 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 fold : ('State -> 'T -> 'State) -> 'State -> 'T array -> 'State
- Apply 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 fold2 :
-  ('State -> 'T1 -> 'T2 -> 'State) -> 'State -> 'T1 array -> 'T2 array -> 'State
- Apply 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. -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'fold' instead")>]
-val fold_left : ('State -> 'T -> 'State) -> 'State -> 'T array -> 'State
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'foldBack' instead")>]
-val fold_right : ('T -> 'State -> 'State) -> 'T array -> 'State -> 'State
- Apply 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 : ('T -> 'State -> 'State) -> 'T array -> 'State -> 'State
- Apply 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 foldBack2 :
-  ('T1 -> 'T2 -> 'State -> 'State) -> 'T1 array -> 'T2 array -> 'State -> '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. -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'forall' instead")>]
-val for_all : ('T -> bool) -> 'T array -> bool
val forall : ('T -> bool) -> 'T array -> bool
- Test if all elements of the array satisfy the given predicate. - - The predicate is applied to the elements of the input collection. If any application - returns false then the overall result is false and no further elements are tested. - Otherwise, true is returned. -
val forall2 : ('T1 -> 'T2 -> bool) -> 'T1 array -> 'T2 array -> bool
- Test if all corresponding elements of the array satisfy the given predicate pairwise. - - The predicate is applied to matching elements in the two collections up to the lesser of the - two lengths of the collections. If any application returns false then the overall result is - false and no further elements are tested. Otherwise, if one collection is longer - than the other then the ArgumentException exception is raised. - Otherwise, true is returned. -
val get : 'T array -> int -> 'T
- Get an element from an array -
val init : int -> (int -> 'T) -> 'T array
- Create an array given the dimension and a generator function to compute the elements. -
val isEmpty : 'T array -> bool
- Return true if the given array is empty, otherwise false -
val iter : ('T -> unit) -> 'T array -> unit
- Apply the given function to each element of the array. -
val iter2 : ('T1 -> 'T2 -> unit) -> 'T1 array -> 'T2 array -> unit
- Apply 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 iteri : (int -> 'T -> unit) -> 'T array -> unit
- Apply the given function to each element of the array. The integer passed to the - function indicates the index of element. -
val iteri2 : (int -> 'T1 -> 'T2 -> unit) -> 'T1 array -> 'T2 array -> unit
- Apply 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 length : 'T array -> int
- Return the length of an array. You can also use property arr.Length. -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'create' instead")>]
-val make : int -> 'T -> 'T array
val map : ('T -> 'U) -> 'T array -> 'U array
- Build a new array whose elements are the results of applying the given function - to each of the elements of the array. -
val map2 : ('T1 -> 'T2 -> 'U) -> 'T1 array -> 'T2 array -> 'U array
- Build 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 mapi : (int -> 'T -> 'U) -> 'T array -> 'U array
- 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 mapi2 : (int -> 'T1 -> 'T2 -> 'U) -> 'T1 array -> 'T2 array -> 'U array
- Build 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 max : 'T array -> 'T
- Return the greatest of all elements of the array, compared via Operators.max on the function result -
val maxBy : ('T -> 'U) -> 'T array -> 'T
- Return the greatest of all elements of the array, compared via Operators.max on the function result -
val min : 'T array -> 'T
- Return the lowest of all elements of the array, compared via Operators.min -
val minBy : ('T -> 'U) -> 'T array -> 'T
- Return the lowest of all elements of the array, compared via Operators.min on the function result -
val of_list : 'T list -> 'T array
- Build an array from the given list -
val of_seq : seq<'T> -> 'T array
- Build a new array from the given enumerable object -
val partition : ('T -> bool) -> 'T array -> 'T array * 'T array
- Split the collection into two collections, containing the - elements for which the given predicate returns "true" and "false" - respectively -
val permute : (int -> int) -> 'T array -> 'T array
- Returns an array with all elements permuted according to the - specified permutation -
val pick : ('T -> 'U option) -> 'T array -> 'U
- Apply 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 reduce : ('T -> 'T -> 'T) -> 'T array -> 'T
- Apply 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 reduceBack : ('T -> 'T -> 'T) -> 'T array -> 'T
- Apply 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 rev : 'T array -> 'T array
- Return a new array with the elements in reverse order -
val scan : ('State -> 'T -> 'State) -> 'State -> 'T array -> 'State array
- Like fold_left, but return the intermediary and final results -
val scanBack : ('T -> 'State -> 'State) -> 'T array -> 'State -> 'State array
- Like fold_right, but return both the intermediary and final results -
val set : 'T array -> int -> 'T -> unit
- Set an element of an array -
val sort : 'T array -> 'T array
- Sort the elements of an array, returning a new array. Elements are compared using Operators.compare. -
val sortBy : ('T -> 'U) -> 'T array -> 'T array
- Sort the elements of an array, using the given projection for the keys and returning a new array. Elements are compared using Operators.compare. -
val sortInPlace : 'T array -> unit
- Sort the elements of an array by mutating the array in-place, using the given comparison function. Elements are compared using Operators.compare. -
val sortInPlaceBy : ('T -> 'U) -> 'T array -> unit
- Sort 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 sortInPlaceWith : ('T -> 'T -> int) -> 'T array -> unit
- Sort the elements of an array by mutating the array in-place, using the given comparison function as the order -
val sortWith : ('T -> 'T -> int) -> 'T array -> 'T array
- Sort the elements of an array, using the given comparison function as the order, returning a new array -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'unzip' instead")>]
-val split : ('T1 * 'T2) array -> 'T1 array * 'T2 array
val sub : 'T array -> int -> int -> 'T array
- Build a new array that contains the given subrange specified by - starting index and length. -
val sum : overloaded
- Return the sum of the elements in the array -
val sumBy : overloaded
- Return the sum of the results generated by applying the function to each element of the array. -
val to_list : 'T array -> 'T list
- Build a list from the given array -
val to_seq : 'T array -> seq<'T>
- View the given array as a sequence -
val tryFind : ('T -> bool) -> 'T array -> 'T option
- Return the first element for which the given function returns true. - Return None if no such element exists. -
val tryFindIndex : ('T -> bool) -> 'T array -> int option
- Return the index of the first element in the array - that satisfies the given predicate. -
val tryPick : ('T -> 'U option) -> 'T array -> 'U option
- Apply 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 unzip : ('T1 * 'T2) array -> 'T1 array * 'T2 array
- Split an array of pairs into two arrays -
val unzip3 : ('T1 * 'T2 * 'T3) array -> 'T1 array * 'T2 array * 'T3 array
- Split an array of triples into three arrays -
val zeroCreate : int -> 'T array
- Create an array where the entries are initially the default value Unchecked.defaultof<'T>. -
val zip : 'T1 array -> 'T2 array -> ('T1 * 'T2) array
- Combine the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is - raised. -
val zip3 : 'T1 array -> 'T2 array -> 'T3 array -> ('T1 * 'T2 * 'T3) array
- Combine three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException is - raised. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array2D.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array2D.html deleted file mode 100644 index 5f884ab4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array2D.html +++ /dev/null @@ -1,112 +0,0 @@ -Microsoft.FSharp.Collections.Array2D -
-
-

[Home] Module Microsoft.FSharp.Collections.Array2D


-
-
- - - -
- Basic operations on 2-dimensional arrays. - - F# and .NET multi-dimensional arrays are typically zero-based. - However, .NET multi-dimensional arrays used in conjunction with external - libraries (e.g. libraries associated with Visual Basic) be - non-zero based, using a potentially different base for each dimension. - The operations in this module will accept such arrays, and - the basing on an input array will be propogated to a matching output - array on the Array2D.map and Array2D.mapi operations. - Non-zero-based arrays can also be created using Array2D.zero_create_based, - Array2D.create_based and Array2D.init_based. - -

Values

- - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val base1 : 'T [,] -> int
- Fetch the base-index for the first dimension of the array. - - See notes on the Array2D module re. zero-basing. -
val base2 : 'T [,] -> int
- Fetch the base-index for the second dimension of the array. - - See notes on the Array2D module re. zero-basing. -
val blit : 'T [,] -> int -> int -> 'T [,] -> int -> int -> int -> int -> unit
- Read a range of elements from the first array and write them into the second. -
val copy : 'T [,] -> 'T [,]
- Build a new array whose elements are the same as the input array. - - For non-zero-based arrays the basing on an input array will be propogated to the output - array. -
val create : int -> int -> 'T -> 'T [,]
- Create an array whose elements are all initially the given value -
val createBased : int -> int -> int -> int -> 'T -> 'T [,]
- Create a based array whose elements are all initially the given value -
val get : 'T [,] -> int -> int -> 'T
- Fetch an element from a 2D array. You can also use the syntax 'array.[index1,index2]' -
val init : int -> int -> (int -> int -> 'T) -> 'T [,]
- Create an array given the dimensions and a generator function to compute the elements. -
val initBased : int -> int -> int -> int -> (int -> int -> 'T) -> 'T [,]
- Create a based array given the dimensions and a generator function to compute the elements. -
val iter : ('T -> unit) -> 'T [,] -> unit
- Apply the given function to each element of the array. -
val iteri : (int -> int -> 'T -> unit) -> 'T [,] -> unit
- Apply the given function to each element of the array. The integer indicies passed to the - function indicates the index of element. -
val length1 : 'T [,] -> int
- Return the length of an array in the first dimension -
val length2 : 'T [,] -> int
- Return the length of an array in the second dimension -
val map : ('T -> 'U) -> 'T [,] -> 'U [,]
- Build a new array whose elements are the results of applying the given function - to each of the elements of the array. - - For non-zero-based arrays the basing on an input array will be propogated to the output - array. -
val mapi : (int -> int -> 'T -> 'U) -> '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 indices passed to the - function indicates the element being transformed. - - For non-zero-based arrays the basing on an input array will be propogated to the output - array. -
val rebase : 'T [,] -> 'T [,]
- Build a new array whose elements are the same as the input array but - where a non-zero-based input array generates a corresponding zero-based - output array. -
val set : 'T [,] -> int -> int -> 'T -> unit
- Set the value of an element in an array. You can also use the syntax 'array.[index1,index2] <- value' -
val zeroCreate : int -> int -> 'T [,]
- Create an array where the entries are initially Unchecked.defaultof<'T>. -
val zeroCreateBased : int -> int -> int -> int -> 'T [,]
- Create a based array where the entries are initially Unchecked.defaultof<'T>. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array3D.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array3D.html deleted file mode 100644 index 19731223..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array3D.html +++ /dev/null @@ -1,73 +0,0 @@ -Microsoft.FSharp.Collections.Array3D -
-
-

[Home] Module Microsoft.FSharp.Collections.Array3D


-
-
- - - -
- Basic operations on rank 3 arrays. - -

Values

- - - - - - - - - - - - - - - -
ValueDescription
val create : int -> int -> int -> 'T -> 'T [,,]
- Create an array whose elements are all initially the given value -
val get : 'T [,,] -> int -> int -> int -> 'T
- Fetch an element from a 3D array. You can also use the syntax 'array.[index1,index2,index3]' -
val init : int -> int -> int -> (int -> int -> int -> 'T) -> 'T [,,]
- Create an array given the dimensions and a generator function to compute the elements. -
val iter : ('T -> unit) -> 'T [,,] -> unit
- Apply the given function to each element of the array. -
val iteri : (int -> int -> int -> 'T -> unit) -> 'T [,,] -> unit
- Apply the given function to each element of the array. The integer indicies passed to the - function indicates the index of element. -
val length1 : 'T [,,] -> int
- Return the length of an array in the first dimension -
val length2 : 'T [,,] -> int
- Return the length of an array in the second dimension -
val length3 : 'T [,,] -> int
- Return the length of an array in the third dimension -
val map : ('T -> 'U) -> 'T [,,] -> 'U [,,]
- Build a new array whose elements are the results of applying the given function - to each of the elements of the array. - - For non-zero-based arrays the basing on an input array will be propogated to the output - array. -
val mapi : (int -> int -> int -> 'T -> 'U) -> '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 indices passed to the - function indicates the element being transformed. - - For non-zero-based arrays the basing on an input array will be propogated to the output - array. -
val set : 'T [,,] -> int -> int -> int -> 'T -> unit
- Set the value of an element in an array. You can also - use the syntax 'array.[index1,index2,index3] <- value'. -
val zeroCreate : int -> int -> int -> 'T [,,]
- Create an array where the entries are initially the "default" value. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array4D.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array4D.html deleted file mode 100644 index 9b23aec5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Array4D.html +++ /dev/null @@ -1,55 +0,0 @@ -Microsoft.FSharp.Collections.Array4D -
-
-

[Home] Module Microsoft.FSharp.Collections.Array4D


-
-
- - - -
- Basic operations on rank 4 arrays. - -

Values

- - - - - - - - - - - - -
ValueDescription
val create : int -> int -> int -> int -> 'T -> 'T [,,,]
- Create an array whose elements are all initially the given value -
val get : 'T [,,,] -> int -> int -> int -> int -> 'T
- Fetch an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' -
val init :
-  int -> int -> int -> int -> (int -> int -> int -> int -> 'T) -> 'T [,,,]
- Create an array given the dimensions and a generator function to compute the elements. -
val length1 : 'T [,,,] -> int
- Return the length of an array in the first dimension -
val length2 : 'T [,,,] -> int
- Return the length of an array in the second dimension -
val length3 : 'T [,,,] -> int
- Return the length of an array in the third dimension -
val length4 : 'T [,,,] -> int
- Return the length of an array in the fourth dimension -
val set : 'T [,,,] -> int -> int -> int -> int -> 'T -> unit
- Set the value of an element in an array. You can also - use the syntax 'array.[index1,index2,index3,index4] <- value'. -
val zeroCreate : int -> int -> int -> int -> 'T [,,,]
- Create an array where the entries are initially the "default" value. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.ComparisonIdentity.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.ComparisonIdentity.html deleted file mode 100644 index 23aef994..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.ComparisonIdentity.html +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft.FSharp.Collections.ComparisonIdentity -
-
-

[Home] Module Microsoft.FSharp.Collections.ComparisonIdentity


-
-
- - - -
- Common notions of comparison identity used with sorted data structures. - -

Values

- - - - - - - -
ValueDescription
val FromFunction : ('T -> 'T -> int) -> IComparer<'T>
- Compare using the given comparer function -
val GetFastComparisonFunction :
-  IComparer<'T> -> FastFunc2<'T,'T,int>
- Convert an existing IComparer object into a comparison function with a fast entry point - If comparer was originally built using ComparisonIdentity.FromFunction then the original function will be - returned -
val GetFastStructuralComparisonFunction : unit -> FastFunc2<'T,'T,int>
- Convert an existing IComparer object into a comparison function with a fast entry point -
val Structural<'T> : IComparer<'T>
- Structural comparison. Compare using Operators.compare. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.HashIdentity.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.HashIdentity.html deleted file mode 100644 index 55d20c4f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.HashIdentity.html +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft.FSharp.Collections.HashIdentity -
-
-

[Home] Module Microsoft.FSharp.Collections.HashIdentity


-
-
- - - -
- Common notions of value identity used with hash tables. - -

Values

- - - - - - - -
ValueDescription
val FromFunctions :
-  ('T -> int) -> ('T -> 'T -> bool) -> IEqualityComparer<'T>
- Hash using the given hashing and equality functions -
val LimitedStructural : int -> IEqualityComparer<'T>
val Reference<'T> : IEqualityComparer<'T>
- Physical hashing (hash on reference identity of objects, and the contents of value types). - Hash using LanguagePrimitives.PhysicalEquality and LanguagePrimitives.PhysicalHash, - That is, for value types use GetHashCode and Object.Equals (if no other optimization available), - and for reference types use System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode and - reference equality. -
val Structural<'T> : IEqualityComparer<'T>
- Structural hashing. Hash using Operators.(=) and Operators.hash. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.List.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.List.html deleted file mode 100644 index 5d1aa362..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.List.html +++ /dev/null @@ -1,320 +0,0 @@ -Microsoft.FSharp.Collections.List -
-
-

[Home] Module Microsoft.FSharp.Collections.List


-
-
- - - -
- Basic operations on lists. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val append : 'T list -> 'T list -> 'T list
- Return a new list that contains the elements of the first list - followed by elements of the second -
val average : overloaded
- Return the average of the elements in the list. - If the list is empty an ArgumentException is thrown. -
val averageBy : overloaded
- Return the average of the elements generated by applying the function to each element of the list. - If the list is empty an ArgumentException is thrown. -
val choose : ('T -> 'U option) -> 'T list -> 'U list
- Apply the given function to each element of the list. Return - the list comprised of the results x for each element where - the function returns Some(x) -
val collect : ('T -> 'U list) -> 'T list -> 'U list
- For each element of the list, apply the given function. Concatenate all the results and return the combined list. -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'zip' instead")>]
-val combine : 'T1 list -> 'T2 list -> ('T1 * 'T2) list
val concat : seq<'T list> -> 'T list
- Return a new list that contains the elements of each the lists in order -
[<GeneralizableValueAttribute ()>]
-val empty<'T> : 'T list
- Return an empty list of the given type -
val exists : ('T -> bool) -> 'T list -> bool
- Test if any element of the list satisfies the given predicate. - - The predicate is applied to the elements of the input list. If any application - returns true then the overall result is true and no further elements are tested. - Otherwise, false is returned. -
val exists2 : ('T1 -> 'T2 -> bool) -> 'T1 list -> 'T2 list -> bool
- Test if any pair of corresponding elements of the lists satisfies the given predicate. - - The predicate is applied to matching elements in the two collections up to the lesser of the - two lengths of the collections. If any application returns true then the overall result is - true and no further elements are tested. Otherwise, if one collections is longer - than the other then the ArgumentException exception is raised. - Otherwise, false is returned. -
val filter : ('T -> bool) -> 'T list -> 'T list
- Return a new collection containing only the elements of the collection - for which the given predicate returns "true" -
val find : ('T -> bool) -> 'T list -> 'T
- Return the first element for which the given function returns true. - Raise KeyNotFoundException if no such element exists. -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'filter' instead")>]
-val find_all : ('T -> bool) -> 'T list -> 'T list
val findIndex : ('T -> bool) -> 'T list -> int
- Return the index of the first element in the list - that satisfies the given predicate. - Raise KeyNotFoundException if no such element exists. -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'concat' instead")>]
-val flatten : seq<'T list> -> 'T list
val fold : ('State -> 'T -> 'State) -> 'State -> 'T list -> 'State
- Apply a function to each element of the collection, threading an accumulator argument - through the computation. Take the second argument, and apply the function to it - and the first element of the list. Then feed this result into the function along - with the second element and so on. Return the final result. - If the input function is f and the elements are i0...iN then - computes f (... (f s i0) i1 ...) iN -
val fold2 :
-  ('State -> 'T1 -> 'T2 -> 'State) -> 'State -> 'T1 list -> 'T2 list -> 'State
- Apply a function to corresponding elements of two collections, threading an accumulator argument - through the computation. The collections must have identical sizes. - If the input function is f and the elements are i0...iN and j0...jN - then computes f (... (f s i0 j0)...) iN jN. -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'fold' instead")>]
-val fold_left : ('State -> 'T -> 'State) -> 'State -> 'T list -> 'State
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'fold2' instead")>]
-val fold_left2 :
-  ('State -> 'T1 -> 'T2 -> 'State) -> 'State -> 'T1 list -> 'T2 list -> 'State
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'foldBack' instead")>]
-val fold_right : ('T -> 'State -> 'State) -> 'T list -> 'State -> 'State
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'foldBack2' instead")>]
-val fold_right2 :
-  ('T1 -> 'T2 -> 'State -> 'State) -> 'T1 list -> 'T2 list -> 'State -> 'State
val foldBack : ('T -> 'State -> 'State) -> 'T list -> 'State -> 'State
- Apply 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 i0 (...(f iN s)). -
val foldBack2 :
-  ('T1 -> 'T2 -> 'State -> 'State) -> 'T1 list -> 'T2 list -> 'State -> 'State
- Apply a function to corresponding elements of two collections, threading an accumulator argument - through the computation. The collections must have identical sizes. - If the input function is f and the elements are i0...iN and j0...jN - then computes f i0 j0 (...(f iN jN s)). -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'forall' instead")>]
-val for_all : ('T -> bool) -> 'T list -> bool
val forall : ('T -> bool) -> 'T list -> bool
- Test if all elements of the collection satisfy the given predicate. - - The predicate is applied to the elements of the input list. If any application - returns false then the overall result is false and no further elements are tested. - Otherwise, true is returned. -
val forall2 : ('T1 -> 'T2 -> bool) -> 'T1 list -> 'T2 list -> bool
- Test if all corresponding elements of the collection satisfy the given predicate pairwise. - - The predicate is applied to matching elements in the two collections up to the lesser of the - two lengths of the collections. If any application returns false then the overall result is - false and no further elements are tested. Otherwise, if one collection is longer - than the other then the ArgumentException exception is raised. - Otherwise, true is returned. -
val hd : 'T list -> 'T
- Return the first element of the list. Raise (Invalid_argument "hd") if undefined. -
val init : int -> (int -> 'T) -> 'T list
- Create a list by calling the given generator on each index -
val isEmpty : 'T list -> bool
- Return true if the list contains no elements, false otherwise -
val iter : ('T -> unit) -> 'T list -> unit
- Apply the given function to each element of the collection. -
val iter2 : ('T1 -> 'T2 -> unit) -> 'T1 list -> 'T2 list -> unit
- Apply the given function to two collections simultaneously. The - collections must have identical size. -
val iteri : (int -> 'T -> unit) -> 'T list -> unit
- Apply the given function to each element of the collection. The integer passed to the - function indicates the index of element. -
val iteri2 : (int -> 'T1 -> 'T2 -> unit) -> 'T1 list -> 'T2 list -> unit
- Apply the given function to two collections simultaneously. The - collections must have identical size. The integer passed to the - function indicates the index of element. -
val length : 'T list -> int
- Return the length of the list -
val map : ('T -> 'U) -> 'T list -> 'U list
- Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. -
val map2 : ('T1 -> 'T2 -> 'U) -> 'T1 list -> 'T2 list -> 'U list
- Build a new collection whose elements are the results of applying the given function - to the corresponding elements of the two collections pairwise. -
val map3 :
-  ('T1 -> 'T2 -> 'T3 -> 'U) -> 'T1 list -> 'T2 list -> 'T3 list -> 'U list
- Build a new collection whose elements are the results of applying the given function - to the corresponding elements of the three collections simultaneously. -
val mapi : (int -> 'T -> 'U) -> 'T list -> 'U list
- Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The integer index passed to the - function indicates the index (from 0) of element being transformed. -
val mapi2 : (int -> 'T1 -> 'T2 -> 'U) -> 'T1 list -> 'T2 list -> 'U list
- Like mapi, but mapping corresponding elements from two lists of equal length. -
val max : 'T list -> 'T
- Return the greatest of all elements of the list, compared via Operators.max -
val maxBy : ('T -> 'U) -> 'T list -> 'T
- Return the greatest of all elements of the array, compared via Operators.max on the function result -
val min : 'T list -> 'T
- Return the lowest of all elements of the list, compared via Operators.min -
val minBy : ('T -> 'U) -> 'T list -> 'T
- Return the lowest of all elements of the array, compared via Operators.min on the function result -
val nth : 'T list -> int -> 'T
- Index into the list. The first element has index 0. -
val of_array : 'T array -> 'T list
- Build a collection from the given array -
val of_seq : seq<'T> -> 'T list
- Build a new collection from the given enumerable object -
val partition : ('T -> bool) -> 'T list -> 'T list * 'T list
- Split the collection into two collections, containing the - elements for which the given predicate returns true and false - respectively -
val permute : (int -> int) -> 'T list -> 'T list
- Returns a list with all elements permuted according to the - specified permutation -
val pick : ('T -> 'U option) -> 'T list -> 'U
- Apply the given function to successive elements, returning the first - result where function returns Some(x) for some x. If no such - element exists then raise System.Collections.Generic.KeyNotFoundException -
val reduce : ('T -> 'T -> 'T) -> 'T list -> 'T
- Apply a function to each element of the collection, threading an accumulator argument - through the computation. Apply the function to the first two elements of the list. - Then feed this result into the function along with the third element and so on. - Return the final result. If the input function is f and the elements are i0...iN then computes - f (... (f i0 i1) i2 ...) iN. - Raises ArgumentException if the list has no elements. -
val reduceBack : ('T -> 'T -> 'T) -> 'T list -> 'T
- Apply 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 i0 (...(f iN-1 iN)). - Raises ArgumentException if the list has no elements. -
val replicate : int -> 'T -> 'T list
- Create a list by calling the given generator on each index -
val rev : 'T list -> 'T list
- Return a new list with the elements in reverse order -
val scan : ('State -> 'T -> 'State) -> 'State -> 'T list -> 'State list
- Apply a function to each element of the collection, threading an accumulator argument - through the computation. Take the second argument, and apply the function to it - and the first element of the list. Then feed this result into the function along - with the second element and so on. Return the list of intermediate results and the final result. -
val scanBack : ('T -> 'State -> 'State) -> 'T list -> 'State -> 'State list
- Like foldBack, but return both the intermediary and final results -
val sort : 'T list -> 'T list
- Sort the given list using the given comparison function -
val sortBy : ('T -> 'U) -> 'T list -> 'T list
- Sort the given list using keys given by the given projection. Keys are compared using Operators.compare. -
val sortWith : ('T -> 'T -> int) -> 'T list -> 'T list
- Sort the given list using the given comparison function -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'unzip' instead")>]
-val split : ('T1 * 'T2) list -> 'T1 list * 'T2 list
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'sortWith' instead")>]
-val stable_sort : ('T -> 'T -> int) -> 'T list -> 'T list
val sum : overloaded
- Return the sum of the elements in the list -
val sumBy : overloaded
- Return the sum of the results generated by applying the function to each element of the list. -
val tl : 'T list -> 'T list
- Return the tail of the list. Raise (Invalid_argument "tl") if undefined. -
val to_array : 'T list -> 'T array
- Build an array from the given collection -
val to_seq : 'T list -> seq<'T>
- Build a new collection from the given enumerable object -
val tryFind : ('T -> bool) -> 'T list -> 'T option
- Return the first element for which the given function returns true. - Return None if no such element exists. -
val tryFindIndex : ('T -> bool) -> 'T list -> int option
- Return the index of the first element in the list - that satisfies the given predicate. - Return None if no such element exists. -
val tryPick : ('T -> 'U option) -> 'T list -> 'U option
- Apply the given function to successive elements, returning Some(x) the first - result where function returns Some(x) for some x. If no such element - exists then return None -
val unzip : ('T1 * 'T2) list -> 'T1 list * 'T2 list
- Split a list of pairs into two lists -
val unzip3 : ('T1 * 'T2 * 'T3) list -> 'T1 list * 'T2 list * 'T3 list
- Split a list of triples into three lists -
val zip : 'T1 list -> 'T2 list -> ('T1 * 'T2) list
- Combine the two lists into a list of pairs. The two lists must have equal lengths. -
val zip3 : 'T1 list -> 'T2 list -> 'T3 list -> ('T1 * 'T2 * 'T3) list
- Combine the three lists into a list of triples. The lists must have equal lengths. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Map.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Map.html deleted file mode 100644 index 10dd6af1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Map.html +++ /dev/null @@ -1,128 +0,0 @@ -Microsoft.FSharp.Collections.Map -
-
-

[Home] Module Microsoft.FSharp.Collections.Map


-
-
- - - -
- Functional programming operators related to the Map<_,_> type. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add : 'Key -> 'T -> Map<'Key,'T> -> Map<'Key,'T>
- Return a new map with the binding added to the given map. -
val contains : 'Key -> Map<'Key,'T> -> bool
- Test is an element is in the domain of the map -
[<GeneralizableValueAttribute ()>]
-val empty<'Key,'T> : Map<'Key,'T>
- The empty map -
val exists : ('Key -> 'T -> bool) -> Map<'Key,'T> -> bool
- Return true if the given predicate returns true for one of the - bindings in the map. -
val filter : ('Key -> 'T -> bool) -> Map<'Key,'T> -> Map<'Key,'T>
- Build a new map containing only the bindings for which the given predicate returns 'true' -
val find : 'Key -> Map<'Key,'T> -> 'T
- Lookup an element in the map, raising KeyNotFoundException if no binding - exists in the map. -
val findIndex : ('Key -> 'T -> bool) -> Map<'Key,'T> -> 'Key
- Evaluates the function on each mapping in the collection. Returns the key for the first mapping - where the function returns 'true'. Raise KeyNotFoundException if no such element exists. -
val fold :
-  ('State -> 'Key -> 'T -> 'State) -> 'State -> Map<'Key,'T> -> 'State
- Fold over the bindings in the map -
val foldBack :
-  ('Key -> 'T -> 'State -> 'State) -> Map<'Key,'T> -> 'State -> 'State
- Fold over the bindings in the map -
val forall : ('Key -> 'T -> bool) -> Map<'Key,'T> -> bool
- Return true if the given predicate returns true for all of the - bindings in the map. -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'isEmpty' instead")>]
-val is_empty : Map<'Key,'T> -> bool
val isEmpty : Map<'Key,'T> -> bool
- Is the map empty? -
val iter : ('Key -> 'T -> unit) -> Map<'Key,'T> -> unit
- Apply the given function to each binding in the dictionary -
val map : ('Key -> 'T -> 'U) -> Map<'Key,'T> -> Map<'Key,'U>
- Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The index passed to the - function indicates the index of element being transformed. -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'contains' instead")>]
-val mem : 'Key -> Map<'Key,'T> -> bool
val of_array : ('Key * 'T) array -> Map<'Key,'T>
- Return a new map made from the given bindings -
val of_list : ('Key * 'T) list -> Map<'Key,'T>
- Return a new map made from the given bindings -
val of_seq : seq<'Key * 'T> -> Map<'Key,'T>
- Return a new map made from the given bindings -
val partition :
-  ('Key -> 'T -> bool) ->
-    Map<'Key,'T> -> Map<'Key,'T> * Map<'Key,'T>
- Build two new maps, one containing the bindings for which the given predicate returns 'true', - and the other the remaining bindings. -
val pick : ('Key -> 'T -> 'U option) -> Map<'Key,'T> -> 'U
- Search the map looking for the first element where the given function returns a Some value -
val remove : 'Key -> Map<'Key,'T> -> Map<'Key,'T>
- Remove an element from the domain of the map. No exception is raised if the element is not present. -
val to_array : Map<'Key,'T> -> ('Key * 'T) array
- Returns an array of all key-value pairs in the mappinng -
val to_list : Map<'Key,'T> -> ('Key * 'T) list
- Returns a list of all key-value pairs in the mappinng -
val to_seq : Map<'Key,'T> -> seq<'Key * 'T>
- View the collection as an enumerable sequence. This collection - type is also directly compatible with 'seq<KeyValuePair<_,_> >'. - - Note this function returns a sequence of tuples, whereas the collection - itself is compatible with the logically equivalent sequence of KeyValuePairs. - Using sequences of tuples tends to be more convenient in F#, however the - collection itself must enumerate KeyValuePairs to conform to the .NET - design guidelines and the IDictionary interface. -
val tryFind : 'Key -> Map<'Key,'T> -> 'T option
- Lookup an element in the map, returning a Some value if the element is in the domain - of the map and None if not. -
val tryFindIndex : ('Key -> 'T -> bool) -> Map<'Key,'T> -> 'Key option
- Return the key of the first mapping in the collection that satisfies the given predicate. - Return 'None' if no such element exists. -
val tryPick : ('Key -> 'T -> 'U option) -> Map<'Key,'T> -> 'U option
- Search the map looking for the first element where the given function returns a Some value -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Seq.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Seq.html deleted file mode 100644 index 452d3343..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Seq.html +++ /dev/null @@ -1,387 +0,0 @@ -Microsoft.FSharp.Collections.Seq -
-
-

[Home] Module Microsoft.FSharp.Collections.Seq


-
-
- - - -
- Basic operations on IEnumerables. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val append : seq<'T> -> seq<'T> -> seq<'T>
- Wrap the two given enumeration-of-enumerations as a single concatenated - enumeration. - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. -
val average : overloaded
- Return the average of the elements in the sequence - - The elements are averaged using the '+' operator, 'DivideByInt' method and 'Zero' property - associated with the element type. -
val averageBy : overloaded
- Return the average of the results generated by applying the function to each element of the sequence. - - The elements are averaged using the '+' operator, 'DivideByInt' method and 'Zero' property - associated with the generated type. -
val cache : seq<'T> -> seq<'T>
- Return a sequence that corresponds to a cached version of the input sequence. - This result sequence will have the same elements as the input sequence. The result - can be enumerated multiple times. The input sequence will be enumerated at most - once and only as far as is necessary. - - Enumeration of the result sequence is thread safe in the sense that multiple independent IEnumerator - values may be used simultaneously from different threads (accesses to - the internal lookaside table are thread safe). Each individual IEnumerator - is not typically thread safe and should not be accessed concurrently. - - Note, once enumeration of the input sequence has started, - it's enumerator will be kept live by this object until the enumeration has completed. - At that point, the enumerator will be disposed. - - The enumerator may be disposed and underlying cache storage released by - converting the returned sequence object to type IDisposable, and calling the Dispose method - on this object. The sequence object may then be re-enumerated and a fresh enumerator will - be used. -
val cast : IEnumerable -> seq<'T>
- Wrap a loosely-typed System.Collections sequence as a typed sequence. - - The use of this function usually requires a type annotation. - An incorrect type annotation may result in runtime type - errors. - - Individual IEnumerator values generated from the returned sequence should not be accessed concurrently. -
val choose : ('T -> 'U option) -> seq<'T> -> seq<'U>
- Apply the given function to each element of the list. Return - the list comprised of the results "x" for each element where - the function returns Some(x) - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - Remember sequence is lazy, effects are delayed until it is enumerated. -
val collect : ('T -> #seq<'U>) -> seq<'T> -> seq<'U>
- For each element of the enumeration apply the given function and concatenate all the results. - - Remember sequence is lazy, effects are delayed until it is enumerated. -
val compare : ('T -> 'T -> int) -> seq<'T> -> seq<'T> -> int
- Compare two sequence's using generic comparison, element by element. -
val compareWith : ('T -> 'T -> int) -> seq<'T> -> seq<'T> -> int
- Compare two sequence's using the given comparison function, element by element. -
val concat : seq<#seq<'T>> -> seq<'T>
- Wrap the given enumeration-of-enumerations as a single concatenated - enumeration. - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. -
val countBy : ('T -> 'Key) -> seq<'T> -> seq<'Key * int>
- Apply a key-generating function to each element of a sequence and return a sequence yielding unique - keys and their number of occurences in the original sequence. - - Note that this function returns a sequence that digests the whole initial sequence as soon as - that sequence is iterated. As a result this function should not be used with - large or infinite sequences. The function makes no assumption on the ordering of the original - sequence. -
val delay : (unit -> seq<'T>) -> seq<'T>
- Return a sequence that is built from the given delayed specification of an - Seq. The input function is evaluated each time an IEnumerator for the sequence - is requested. -
val distinct : seq<'T> -> seq<'T>
- Return a sequence that contains no duplicate entries according to generic hash and equality comparisons on the entries. - If an element occurs multiple times in the sequence then the later occurrences are discarded. -
val distinctBy : ('T -> 'Key) -> seq<'T> -> seq<'T>
- Return a sequence that contains no duplicate entries according to the - generic hash and equality comparisons on the keys returned by the given key-generating function. - If an element occurs multiple times in the sequence then the later occurrences are discarded. -
[<GeneralizableValueAttribute ()>]
-val empty<'T> : seq<'T>
- Create an empty sequence -
val exists : ('T -> bool) -> seq<'T> -> bool
- Test if any element of the sequence satisfies the given predicate. - - The predicate is applied to the elements of the input sequence. If any application - returns true then the overall result is true and no further elements are tested. - Otherwise, false is returned. -
val exists2 : ('T1 -> 'T2 -> bool) -> seq<'T1> -> seq<'T2> -> bool
- Test if any pair of corresponding elements of the input sequences satisfies the given predicate. - - The predicate is applied to matching elements in the two sequences up to the lesser of the - two lengths of the collections. If any application returns true then the overall result is - true and no further elements are tested. Otherwise, false is returned. If one sequence is shorter than - the other then the remaining elements of the longer sequence are ignored. -
val filter : ('T -> bool) -> seq<'T> -> seq<'T>
- Return a new collection containing only the elements of the collection - for which the given predicate returns "true" - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - Remember sequence is lazy, effects are delayed until it is enumerated. -
val find : ('T -> bool) -> seq<'T> -> 'T
- Return the first element for which the given function returns true. - Raise KeyNotFoundException if no such element exists. -
val findIndex : ('T -> bool) -> seq<'T> -> int
- Return the index of the first element in the sequence of pairs - that satisfies the given predicate. Raise KeyNotFoundException if no such element exists. -
val fold : ('State -> 'T -> 'State) -> 'State -> seq<'T> -> 'State
- Apply 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 forall : ('T -> bool) -> seq<'T> -> bool
- Test if all elements of the sequence satisfy the given predicate. - - The predicate is applied to the elements of the input sequence. If any application - returns false then the overall result is false and no further elements are tested. - Otherwise, true is returned. -
val forall2 : ('T1 -> 'T2 -> bool) -> seq<'T1> -> seq<'T2> -> bool
- Test the all pairs of elements drawn from the two sequences satisfies the - given predicate. If one sequence is shorter than - the other then the remaining elements of the longer sequence are ignored -
val groupBy : ('T -> 'Key) -> seq<'T> -> seq<'Key * seq<'T>>
- Apply a key-generating function to each element of a sequence and yields a sequence of - unique keys. Each unique key has also contains a sequence of all elements that match - to this key. - - Note that this function returns a sequence that digests the whole initial sequence as soon as - that sequence is iterated. As a result this function should not be used with - large or infinite sequences. The function makes no assumption on the ordering of the original - sequence. -
val hd : seq<'T> -> 'T
- Return the first element of the sequence. -
val init : int -> (int -> 'T) -> seq<'T>
- Generate a new sequence which, when iterated, will return successive - elements by calling the given function, up to the given count. The results of calling the function - will not be saved, i.e. the function will be reapplied as necessary to - regenerate the elements. The function is passed the index of the item being - generated. - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. -
val initInfinite : (int -> 'T) -> seq<'T>
- Generate a new sequence which, when iterated, will return successive - elements by calling the given function. The results of calling the function - will not be saved, i.e. the function will be reapplied as necessary to - regenerate the elements. The function is passed the index of the item being - generated - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. -
val isEmpty : seq<'T> -> bool
- Return true if the sequence contains no elements, false otherwise -
val iter : ('T -> unit) -> seq<'T> -> unit
- Apply the given function to each element of the collection. -
val iter2 : ('T1 -> 'T2 -> unit) -> seq<'T1> -> seq<'T2> -> unit
- Apply the given function to two collections simultaneously. If one sequence is shorter than - the other then the remaining elements of the longer sequence are ignored. -
val iteri : (int -> 'T -> unit) -> seq<'T> -> unit
- Apply the given function to each element of the collection. The integer passed to the - function indicates the index of element. -
val length : seq<'T> -> int
- Return the length of the sequence -
val map : ('T -> 'U) -> seq<'T> -> seq<'U>
- Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The given function will be applied - as elements are demanded using the 'MoveNext' method on enumerators retrieved from the - object. - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. -
val map2 :
-  ('T1 -> 'T2 -> 'U) -> seq<'T1> -> seq<'T2> -> seq<'U>
- Build a new collection whose elements are the results of applying the given function - to the corresponding pairs of elements from the two sequences. If one input sequence is shorter than - the other then the remaining elements of the longer sequence are ignored. -
val mapi : (int -> 'T -> 'U) -> seq<'T> -> seq<'U>
- Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The integer index passed to the - function indicates the index (from 0) of element being transformed. -
val max : seq<'T> -> 'T
- Return the greatest of all elements of the sequence, compared via Operators.max -
val maxBy : ('T -> 'Key) -> seq<'T> -> 'T
- Return the greatest of all elements of the array, compared via Operators.max on the function result -
val min : seq<'T> -> 'T
- Return the lowest of all elements of the sequence, compared via Operators.min -
val minBy : ('T -> 'Key) -> seq<'T> -> 'T
- Return the lowest of all elements of the array, compared via Operators.min on the function result -
val nth : int -> seq<'T> -> 'T
- Compute the nth element in the collection. -
val of_array : 'T array -> seq<'T>
- Build a collection from the given array -
val of_list : 'T list -> seq<'T>
- Build a collection from the given array -
val pairwise : seq<'T> -> seq<'T * 'T>
- Return a sequence of each element in the input sequence and its predecessor, with the - exception of the first element which is only returned as the predecessor of the second element. -
val pick : ('T -> 'U option) -> seq<'T> -> 'U
- Apply the given function to successive elements, returning the first - 'x' where the function returns "Some(x)". -
val readonly : seq<'T> -> seq<'T>
- Build a new sequence object that delegates to the given sequence object. This ensures - the original sequence can't be rediscovered and mutated by a type cast. For example, - if given an array the returned sequence will return the elements of the array, but - you can't cast the returned sequence object to an array. -
val reduce : ('T -> 'T -> 'T) -> seq<'T> -> 'T
- Apply a function to each element of the sequence, threading an accumulator argument - through the computation. Begin by applying the function to the first two elements. - Then feed this result into the function along with the third element and so on. - Return the final result. - Raises ArgumentException if the sequence has no elements. -
val scan :
-  ('State -> 'T -> 'State) -> 'State -> seq<'T> -> seq<'State>
- Like fold, but compute on-demand and return the sequence of intermediary and final results -
val singleton : 'T -> seq<'T>
- Return a sequence that yields one item only. -
val skip : int -> seq<'T> -> seq<'T>
- Return a sequence that skips N elements of the underlying sequence and then yields the - remaining elements of the sequence -
val skipWhile : ('T -> bool) -> seq<'T> -> seq<'T>
- Return a sequence that, when iterated, skips elements of the underlying sequence while the - given predicate returns 'true', and then yields the remaining elements of the sequence -
val sort : seq<'T> -> seq<'T>
- Yield a sequence ordered by keys. - - Note that this function returns a sequence that digests the whole initial sequence as soon as - that sequence is iterated. As a result this function should not be used with - large or infinite sequences. The function makes no assumption on the ordering of the original - sequence. -
val sortBy : ('T -> 'Key) -> seq<'T> -> seq<'T>
- Apply a key-generating function to each element of a sequence and yield a sequence ordered - by keys. The keys are compared using generic comparison as implemented by Operators.compare. - - Note that this function returns a sequence that digests the whole initial sequence as soon as - that sequence is iterated. As a result this function should not be used with - large or infinite sequences. The function makes no assumption on the ordering of the original - sequence. -
val sum : overloaded
- Return the sum of the elements in the sequence. - - The elements are summed using the '+' operator and 'Zero' property associated with the generated type. -
val sumBy : overloaded
- Return the sum of the results generated by applying the function to each element of the sequence. - The generated elements are summed using the '+' operator and 'Zero' property associated with the generated type. -
val take : int -> seq<'T> -> seq<'T>
- Return the first N elements of the sequence. -
val takeWhile : ('T -> bool) -> seq<'T> -> seq<'T>
- Return a sequence that, when iterated, yields elements of the underlying sequence while the - given predicate returns 'true', and returns no further elements -
val to_array : seq<'T> -> 'T array
- Build an array from the given collection -
val to_list : seq<'T> -> 'T list
- Build a list from the given collection -
val truncate : int -> seq<'T> -> seq<'T>
- Return a sequence that when enumerated returns at most N elements. -
val tryFind : ('T -> bool) -> seq<'T> -> 'T option
- Return the first element for which the given function returns true. - Return None if no such element exists. -
val tryFindIndex : ('T -> bool) -> seq<'T> -> int option
- Return the index of the first element in the sequence - that satisfies the given predicate. Return 'None' if no such element exists. -
val tryPick : ('T -> 'U option) -> seq<'T> -> 'U option
- Apply the given function to successive elements, returning the first - result where the function returns "Some(x)". -
val unfold : ('State -> ('T * 'State) option) -> 'State -> seq<'T>
- Return a sequence that contains the elements generated by the given computation. - The given initial 'state' argument is passed to the element generator. - For each IEnumerator elements in the stream are generated on-demand by applying the element - generator, until a None value is returned by the element generator. Each call to the element - generator returns a new residual 'state'. - - Note the stream will be recomputed each time an IEnumerator is requested and iterated for the Seq. - - The returned sequence may be passed between threads safely. However, - individual IEnumerator values generated from the returned sequence should not be accessed concurrently. -
val windowed : int -> seq<'T> -> seq<'T []>
- Return a sequence that yields 'sliding windows' of containing elements drawn from the input - sequence. Each window is returned as a fresh array. -
val zip : seq<'T1> -> seq<'T2> -> seq<'T1 * 'T2>
- Combine the two sequences into a list of pairs. The two sequences need not have equal lengths: - when one sequence is exhausted any remaining elements in the other - sequence are ignored. -
val zip3 :
-  seq<'T1> ->
-    seq<'T2> -> seq<'T3> -> seq<'T1 * 'T2 * 'T3>
- Combine the three sequences into a list of triples. The two sequences need not have equal lengths: - when one sequence is exhausted any remaining elements in the other - sequence are ignored. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.SequenceExpressionHelpers.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.SequenceExpressionHelpers.html deleted file mode 100644 index de97ec37..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.SequenceExpressionHelpers.html +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft.FSharp.Collections.SequenceExpressionHelpers -
-
-

[Home] Module Microsoft.FSharp.Collections.SequenceExpressionHelpers


-
-
- - - -
- A group of functions used as part of the compiled representation of F# sequence expressions - -

Type Definitions

- - - - -
TypeDescription
type GeneratedSequenceBase - The F# compiler emits implementations of this type for compiled sequence expressions -
-
-

Values

- - - - - - - -
ValueDescription
val EnumerateFromFunctions :
-  (unit -> 'T) -> ('T -> bool) -> ('T -> 'U) -> seq<'U>
- The F# compiler emits calls to this function to implement the compiler-intrinsic - conversions from untyped System.Collections.IEnumerable sequences to typed sequences -
val EnumerateThenFinally : seq<'T> -> (unit -> unit) -> seq<'T>
- The F# compiler emits calls to this function to - implement the 'try/finally' operator for F# sequence expressions -
val EnumerateUsing :
-  'T -> ('T -> #seq<'U>) -> seq<'U> (requires 'T :> IDisposable)
- The F# compiler emits calls to this function to implement the 'use' operator for F# sequence expressions -
val EnumerateWhile : (unit -> bool) -> seq<'T> -> seq<'T>
- The F# compiler emits calls to this function to - implement the 'while' operator for F# sequence expressions -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.SequenceExpressionHelpers.type_GeneratedSequenceBase-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.SequenceExpressionHelpers.type_GeneratedSequenceBase-1.html deleted file mode 100644 index 2a368f94..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.SequenceExpressionHelpers.type_GeneratedSequenceBase-1.html +++ /dev/null @@ -1,65 +0,0 @@ -Microsoft.FSharp.Collections.SequenceExpressionHelpers.GeneratedSequenceBase -
-
-

[Home] Type Microsoft.FSharp.Collections.SequenceExpressionHelpers.GeneratedSequenceBase


-
-
- - - -
- The F# compiler emits implementations of this type for compiled sequence expressions - -

Full Type Signature

-
[<AbstractClassAttribute ()>]
-type GeneratedSequenceBase<'T> =
-  class
-    interface IEnumerator
-    interface IEnumerator<'T>
-    interface IEnumerable
-    interface IEnumerable<'T>
-    new : unit -> GeneratedSequenceBase<'T>
-    abstract member Close : unit -> unit
-    abstract member GenerateNext : next:IEnumerable<'T> byref -> int
-    abstract member GetFreshEnumerator : unit -> IEnumerator<'T>
-    abstract member CheckClose : bool
-    abstract member LastGenerated : 'T
-  end
-

Instance Members

- - - - - - - - -
MemberDescription
member CheckClose : bool
- The F# compiler emits implementations of this method for compiled sequence expressions -
member Close : unit -> unit
- The F# compiler emits implementations of this method for compiled sequence expressions -
member GenerateNext : next:IEnumerable<'T> byref -> int
- The F# compiler emits implementations of this method for compiled sequence expressions -
member GetFreshEnumerator : unit -> IEnumerator<'T>
- The F# compiler emits implementations of this method for compiled sequence expressions -
member LastGenerated : 'T
- The F# compiler emits implementations of this method for compiled sequence expressions -
-
-

Static Members

- - - - -
MemberDescription
new : unit -> GeneratedSequenceBase<'T>
- The F# compiler emits implementations of this method for compiled sequence expressions -
-
-
-

See Also

-Microsoft.FSharp.Collections.SequenceExpressionHelpers
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Set.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Set.html deleted file mode 100644 index 77c33014..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.Set.html +++ /dev/null @@ -1,118 +0,0 @@ -Microsoft.FSharp.Collections.Set -
-
-

[Home] Module Microsoft.FSharp.Collections.Set


-
-
- - - -
- Functional programming operators related to the Set<_> type. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add : 'T -> Set<'T> -> Set<'T>
- Return a new set with an element added to the set. No exception is raised if - the set already contains the given element. -
val contains : 'T -> Set<'T> -> bool
-Evaluates to "true" if the given element is in the given set -
val count : Set<'T> -> int
-Return the number of elements in the set. Same as size -
[<GeneralizableValueAttribute ()>]
-val empty<'T> : Set<'T>
- The empty set for the type 'T . -
val exists : ('T -> bool) -> Set<'T> -> bool
-Test if any element of the collection satisfies the given predicate. -If the input function is f and the elements are i0...iN -then computes p i0 or ... or p iN. -
val filter : ('T -> bool) -> Set<'T> -> Set<'T>
- Return a new collection containing only the elements of the collection - for which the given predicate returns true -
val fold : ('State -> 'T -> 'State) -> 'State -> Set<'T> -> 'State
- Apply the given accumulating function to all the elements of the set -
val foldBack : ('T -> 'State -> 'State) -> Set<'T> -> 'State -> 'State
- Apply the given accumulating function to all the elements of the set -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'forall' instead")>]
-val for_all : ('T -> bool) -> Set<'T> -> bool
val forall : ('T -> bool) -> Set<'T> -> bool
- Test if all elements of the collection satisfy the given predicate. - If the input function is f and the elements are i0...iN and "j0...jN" - then computes p i0 && ... && p iN. -
val intersect : Set<'T> -> Set<'T> -> Set<'T>
- Compute the intersection of the two sets. -
val intersectMany : seq<Set<'T>> -> Set<'T>
-Compute the intersection of a sequence of sets. The sequence must be non-empty -
[<OCamlCompatibilityAttribute
-  ("This F# library function has been renamed. Use 'isEmpty' instead")>]
-val is_empty : Set<'T> -> bool
val isEmpty : Set<'T> -> bool
-Return "true" if the set is empty -
val iter : ('T -> unit) -> Set<'T> -> unit
-Apply the given function to each element of the set, in order according -to the comparison function -
val map : ('T -> 'U) -> Set<'T> -> Set<'U>
- Return a new collection containing the results of applying the - given function to each element of the input set -
val of_array : 'T array -> Set<'T>
- Build a set that contains the same elements as the given array -
val of_list : 'T list -> Set<'T>
- Build a set that contains the same elements as the given list -
val of_seq : seq<'T> -> Set<'T>
- Build a new collection from the given enumerable object -
val partition : ('T -> bool) -> Set<'T> -> Set<'T> * Set<'T>
-Split the set into two sets containing the elements for which the given predicate -returns true and false respectively -
val remove : 'T -> Set<'T> -> Set<'T>
-Return a new set with the given element removed. No exception is raised in -the set doesn't contain the given element. -
val singleton : 'T -> Set<'T>
- The set containing the given one element. -
val to_array : Set<'T> -> 'T array
- Build an array that contains the elements of the set in order -
val to_list : Set<'T> -> 'T list
- Build a list that contains the elements of the set in order -
val to_seq : Set<'T> -> seq<'T>
- Return a view of the collection as an enumerable object -
val union : Set<'T> -> Set<'T> -> Set<'T>
-Compute the union of the two sets. -
val unionMany : seq<Set<'T>> -> Set<'T>
-Compute the union of a sequence of sets. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.html deleted file mode 100644 index ede561e7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.html +++ /dev/null @@ -1,114 +0,0 @@ -Microsoft.FSharp.Collections -
-
-

[Home] Namespace Microsoft.FSharp.Collections


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.Core')

- - - - - - - - - - - - - - -
ModuleDescription
Microsoft.FSharp.Collections.Array - Basic operations on arrays -
Microsoft.FSharp.Collections.Array2D - Basic operations on 2-dimensional arrays. - - F# and .NET multi-dimensional arrays are typically zero-based. - However, .NET multi-dimensional arrays used in conjunction with external - libraries (e.g. libraries associated with Visual Basic) be - non-zero based, using a potentially different base for each dimension. - The operations in this module will accept such arrays, and - the basing on an input array will be propogated to a matching output - array on the Array2D.map and Array2D.mapi operations. - Non-zero-based arrays can also be created using Array2D.zero_create_based, - Array2D.create_based and Array2D.init_based. -
Microsoft.FSharp.Collections.Array3D - Basic operations on rank 3 arrays. -
Microsoft.FSharp.Collections.Array4D - Basic operations on rank 4 arrays. -
Microsoft.FSharp.Collections.ComparisonIdentity - Common notions of comparison identity used with sorted data structures. -
Microsoft.FSharp.Collections.HashIdentity - Common notions of value identity used with hash tables. -
Microsoft.FSharp.Collections.List - Basic operations on lists. -
Microsoft.FSharp.Collections.Map - Functional programming operators related to the Map<_,_> type. -
Microsoft.FSharp.Collections.Seq - Basic operations on IEnumerables. -
Microsoft.FSharp.Collections.SequenceExpressionHelpers - A group of functions used as part of the compiled representation of F# sequence expressions -
Microsoft.FSharp.Collections.Set - Functional programming operators related to the Set<_> type. -
-
-

Type Definitions

- - - - - - - - - - -
TypeDescription
type FSharpList - The type of immutable singly-linked lists. - - Use the constructors [] and :: (infix) to create values of this type, or - the notation [1;2;3]. Use the values in the List module to manipulate - values of this type, or pattern match against the values directly. -
type list - An abbreviation for the type of immutable singly-linked lists. - - Use the constructors [] and :: (infix) to create values of this type, or - the notation [1;2;3]. Use the values in the List module to manipulate - values of this type, or pattern match against the values directly. - Note: an abbreviation for FSharpList<'T>
type List - An abbreviation for the type of immutable singly-linked lists. - Note: an abbreviation for FSharpList<'T>
type Map - Immutable maps. Keys are ordered by F# generic comparison. - - - Maps based on generic comparison are efficient for small keys. They are not a suitable choice if keys are recursive data structures - or if keys require bespoke comparison semantics. - -
type ResizeArray - An abbreviation for the .NET type System.Collections.Generic.List<_> - Note: an abbreviation for List<'T>
type seq - An abbreviation for the .NET type System.Collections.Generic.IEnumerable<_> - Note: an abbreviation for IEnumerable<'T>
type Set - Immutable sets based on binary trees, where comparison is the - F# structural comparison function, potentially using implementations - of the IComparable interface on key values. - - See the Set module for further operations on sets. - - These sets can be used with elements of any type, but you should check that - structural hashing and equality on the element type are correct for your type. -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_FSharpList-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_FSharpList-1.html deleted file mode 100644 index 22865cda..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_FSharpList-1.html +++ /dev/null @@ -1,73 +0,0 @@ -Microsoft.FSharp.Collections.FSharpList -
-
-

[Home] Type Microsoft.FSharp.Collections.FSharpList


-
-
- - - -
- The type of immutable singly-linked lists. - - Use the constructors [] and :: (infix) to create values of this type, or - the notation [1;2;3]. Use the values in the List module to manipulate - values of this type, or pattern match against the values directly. - -

Full Type Signature

-
type FSharpList<'T> =
-  | ( [] )
-  | ( :: ) of 'T * 'T list
-  with
-    interface IEnumerable
-    interface IEnumerable<'T>
-    member Head : 'T
-    member IsEmpty : bool
-    member Item : index:int -> 'T with get
-    member Length : int
-    member Tail : 'T list
-    static member Cons : head:'T * tail:'T list -> 'T list
-    static member Empty : 'T list
-  end
-

Instance Members

- - - - - - - - -
MemberDescription
member Head : 'T
- Gets the first element of the list -
member IsEmpty : bool
- Gets a value indicating if the list contains no entries -
member Item : index:int -> 'T with get
- Get the element of the list at the given position. Note lists are represented - as linked lists so this is an O(n) operation. -
member Length : int
- Gets the number of items contained in the list -
member Tail : 'T list
- Gets the tail of the list, which is a list containing all the elements of the list, excluding the first element -
-
-

Static Members

- - - - - -
MemberDescription
member Cons : head:'T * tail:'T list -> 'T list
- Returns a list with head as its first element and tail as its subsequent elements -
member Empty : 'T list
- Returns an empty list of a particular type -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_List-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_List-1.html deleted file mode 100644 index c3d355f8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_List-1.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Collections.List -
-
-

[Home] Type Microsoft.FSharp.Collections.List


-
-
- - - -
- An abbreviation for the type of immutable singly-linked lists. - Note: an abbreviation for FSharpList<'T> -

Full Type Signature

-
type List<'T> = FSharpList<'T>
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_Map-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_Map-2.html deleted file mode 100644 index a38c9ae3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_Map-2.html +++ /dev/null @@ -1,87 +0,0 @@ -Microsoft.FSharp.Collections.Map -
-
-

[Home] Type Microsoft.FSharp.Collections.Map


-
-
- - - -
- Immutable maps. Keys are ordered by F# generic comparison. - - - Maps based on generic comparison are efficient for small keys. They are not a suitable choice if keys are recursive data structures - or if keys require bespoke comparison semantics. - - -

Full Type Signature

-
[<SealedAttribute ()>]
-type Map<'Key,'Value> =
-  class
-    interface IEnumerable
-    interface IComparable
-    interface IEnumerable<KeyValuePair<'Key,'Value>>
-    interface ICollection<KeyValuePair<'Key,'Value>>
-    interface IDictionary<'Key,'Value>
-    new : elements:seq<'Key * 'Value> -> Map<'Key,'Value>
-    member Add : key:'Key * value:'Value -> Map<'Key,'Value>
-    member ContainsKey : key:'Key -> bool
-    override Equals : obj -> bool
-    member Remove : key:'Key -> Map<'Key,'Value>
-    member TryFind : key:'Key -> 'Value option
-    member Count : int
-    member IsEmpty : bool
-    member Item : key:'Key -> 'Value with get
-    static member Empty : Map<'Key,'Value>
-  end
-

Instance Members

- - - - - - - - - - - -
MemberDescription
member Add : key:'Key * value:'Value -> Map<'Key,'Value>
- Return a new map with the binding added to the given map. -
member ContainsKey : key:'Key -> bool
- Test if an element is in the domain of the map -
member Count : int
- The number of bindings in the map -
override Equals : obj -> bool
member IsEmpty : bool
- Return true if there are no bindings in the map. -
member Item : key:'Key -> 'Value with get
- Lookup an element in the map. Raise KeyNotFoundException if no binding - exists in the map. -
member Remove : key:'Key -> Map<'Key,'Value>
- Remove an element from the domain of the map. No exception is raised if the element is not present. -
member TryFind : key:'Key -> 'Value option
- Lookup an element in the map, returning a Some value if the element is in the domain - of the map and None if not. -
-
-

Static Members

- - - - - -
MemberDescription
new : elements:seq<'Key * 'Value> -> Map<'Key,'Value>
- Build a map that contains the bindings of the given IEnumerable -
member Empty : Map<'Key,'Value>
- The empty map -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_ResizeArray-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_ResizeArray-1.html deleted file mode 100644 index 1f58c382..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_ResizeArray-1.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Collections.ResizeArray -
-
-

[Home] Type Microsoft.FSharp.Collections.ResizeArray


-
-
- - - -
- An abbreviation for the .NET type System.Collections.Generic.List<_> - Note: an abbreviation for List<'T> -

Full Type Signature

-
type ResizeArray<'T> = List<'T>
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_Set-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_Set-1.html deleted file mode 100644 index 06d4920e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type_Set-1.html +++ /dev/null @@ -1,110 +0,0 @@ -Microsoft.FSharp.Collections.Set -
-
-

[Home] Type Microsoft.FSharp.Collections.Set


-
-
- - - -
- Immutable sets based on binary trees, where comparison is the - F# structural comparison function, potentially using implementations - of the IComparable interface on key values. - - See the Set module for further operations on sets. - - These sets can be used with elements of any type, but you should check that - structural hashing and equality on the element type are correct for your type. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type Set<'T> =
-  class
-    interface IComparable
-    interface IEnumerable
-    interface IEnumerable<'T>
-    interface ICollection<'T>
-    new : elements:seq<'T> -> Set<'T>
-    member Add : value:'T -> Set<'T>
-    member Contains : value:'T -> bool
-    override Equals : obj -> bool
-    member IsSubsetOf : set:Set<'T> -> bool
-    member IsSupersetOf : set:Set<'T> -> bool
-    member Remove : value:'T -> Set<'T>
-    member Count : int
-    member IsEmpty : bool
-    member MaximumElement : 'T
-    member MinimumElement : 'T
-    static member Subtract : set1:Set<'T> * set2:Set<'T> -> Set<'T>
-    static member Empty : Set<'T>
-    static member ( + ) : set1:Set<'T> * set2:Set<'T> -> Set<'T>
-    static member ( - ) : set1:Set<'T> * set2:Set<'T> -> Set<'T>
-  end
-

Instance Members

- - - - - - - - - - - - - -
MemberDescription
member Add : value:'T -> Set<'T>
- A useful shortcut for Set.add. Note this operation produces a new set - and does not mutate the original set. The new set will share many storage - nodes with the original. See the Set module for further operations on sets. -
member Contains : value:'T -> bool
- A useful shortcut for Set.contains. See the Set module for further operations on sets. -
member Count : int
- The number of elements in the set -
override Equals : obj -> bool
member IsEmpty : bool
- A useful shortcut for Set.isEmpty. See the Set module for further operations on sets. -
member IsSubsetOf : set:Set<'T> -> bool
- Evaluates to "true" if all elements of the second set are in the first -
member IsSupersetOf : set:Set<'T> -> bool
- Evaluates to "true" if all elements of the first set are in the second -
member MaximumElement : 'T
- Returns the highest element in the set according to the ordering being used for the set -
member MinimumElement : 'T
- Returns the lowest element in the set according to the ordering being used for the set -
member Remove : value:'T -> Set<'T>
- A useful shortcut for Set.remove. Note this operation produces a new set - and does not mutate the original set. The new set will share many storage - nodes with the original. See the Set module for further operations on sets. -
-
-

Static Members

- - - - - - - - -
MemberDescription
member ( + ) : set1:Set<'T> * set2:Set<'T> -> Set<'T>
- Compute the union of the two sets. -
member ( - ) : set1:Set<'T> * set2:Set<'T> -> Set<'T>
- Return a new set with the elements of the second set removed from the first. -
new : elements:seq<'T> -> Set<'T>
- Create a set containing elements drawn from the given sequence. -
member Empty : Set<'T>
- The empty set for the type 'T. -
member Subtract : set1:Set<'T> * set2:Set<'T> -> Set<'T>
- Return a new set with the elements of the second set removed from the first. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type__list-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type__list-1.html deleted file mode 100644 index e3118c23..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type__list-1.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Collections.list -
-
-

[Home] Type Microsoft.FSharp.Collections.list


-
-
- - - -
- An abbreviation for the type of immutable singly-linked lists. - - Use the constructors [] and :: (infix) to create values of this type, or - the notation [1;2;3]. Use the values in the List module to manipulate - values of this type, or pattern match against the values directly. - Note: an abbreviation for FSharpList<'T> -

Full Type Signature

-
type 'T list = FSharpList<'T>
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type__seq-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type__seq-1.html deleted file mode 100644 index 11828f6f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Collections.type__seq-1.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Collections.seq -
-
-

[Home] Type Microsoft.FSharp.Collections.seq


-
-
- - - -
- An abbreviation for the .NET type System.Collections.Generic.IEnumerable<_> - Note: an abbreviation for IEnumerable<'T> -

Full Type Signature

-
type seq<'T> = IEnumerable<'T>
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.CommonExtensions.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.CommonExtensions.html deleted file mode 100644 index d32f5f5a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.CommonExtensions.html +++ /dev/null @@ -1,47 +0,0 @@ -Microsoft.FSharp.Control.CommonExtensions -
-
-

[Home] Module Microsoft.FSharp.Control.CommonExtensions


-
-
- - - -
- A module of extension members that provide asynchronous operations for some basic .NET types related to concurrency and I/O. - -

Extension Members

- - - - - - - - -
Extension MemberDescription
member AsyncRead : buffer:byte [] * ?offset:int * ?count:int -> Async<int>
- Return an asynchronous computation that will read from the stream into the given buffer. -
member AsyncRead : count:int -> Async<byte []>
- Return an asynchronous computation that will read the given number of bytes from the stream -
member AsyncSleep : millisecondsDueTime:int -> Async<unit>
- Return an asynchronous computation that will sleep for the given time. This is scheduled - using a System.Threading.Timer object, meaning that the operation will not block any threads - for the duration of the wait. -
member AsyncWaitOne : ?millisecondsTimeout:int -> Async<bool>
- Return an asynchronous computation that will wait on the given WaitHandle. This is scheduled - as a wait-item in the .NET thread pool using RegisterWaitForSingleObject, - meaning that the operation will not block any .NET threads for - the duration of the wait. -
member
-  AsyncWrite : buffer:byte [] * ?offset:int * ?count:int -> Async<unit>
- Return an asynchronous computation that will write the given bytes to the stream -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.Event.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.Event.html deleted file mode 100644 index 049f6f9e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.Event.html +++ /dev/null @@ -1,96 +0,0 @@ -Microsoft.FSharp.Control.Event -
-
-

[Home] Module Microsoft.FSharp.Control.Event


-
-
- - - -
- Basic operations on first class event objects. - -

Values

- - - - - - - - - - - - - -
ValueDescription
val choose :
-  ('T -> 'U option) -> IEvent<'Del,'T> -> IEvent<'U>
-    (requires delegate and 'Del :> Delegate)
- Return a new event which fires on a selection of messages from the original event. - The selection function takes an original message to an optional new message. -
val create : unit -> ('T -> unit) * IEvent<'T>
- Create an IEvent with no initial listeners. Two items are returned: - a function to invoke (trigger) the event, and the event that clients - can plug listeners into. -
val filter :
-  ('T -> bool) -> IEvent<'Del,'T> -> IEvent<'T>
-    (requires delegate and 'Del :> Delegate)
- Return a new event that listens to the original event and triggers the resulting - event only when the argument to the event passes the given function -
val listen :
-  ('T -> unit) -> IEvent<'Del,'T> -> unit
-    (requires delegate and 'Del :> Delegate)
- Run the given function each time the given event is triggered. -
val map :
-  ('T -> 'U) -> IEvent<'Del,'T> -> IEvent<'U>
-    (requires delegate and 'Del :> Delegate)
- Return a new event that passes values transformed by the given function -
val merge :
-  IEvent<'del1,'T> -> IEvent<'del2,'T> -> IEvent<'T>
-    (requires delegate and 'del1 :> Delegate and delegate and 'del2 :> Delegate)
- Fire the output event when either of the input events fire -
val pairwise :
-  IEvent<'Del,'T> -> IEvent<'T * 'T>
-    (requires delegate and 'Del :> Delegate)
- Return a new event that triggers on the second and subsequent triggerings of the input event. - The Nth triggering of the input event passes the arguments from the N-1th and Nth triggering as - a pair. The argument passed to the N-1th triggering is held in hidden internal state until the - Nth triggering occurs. - - You should ensure that the contents of the values being sent down the event are - not mutable. Note that many EventArgs types are mutable, e.g. MouseEventArgs, and - each firing of an event using this argument type may reuse the same physical - argument obejct with different values. In this case you should extract the necessary - information from the argument before using this combinator. -
val partition :
-  ('T -> bool) -> IEvent<'Del,'T> -> IEvent<'T> * IEvent<'T>
-    (requires delegate and 'Del :> Delegate)
- Return a new event that listens to the original event and triggers the - first resulting event if the application of the predicate to the event arguments - returned true, and the second event if it returned false -
val scan :
-  ('U -> 'T -> 'U) -> 'U -> IEvent<'Del,'T> -> IEvent<'U>
-    (requires delegate and 'Del :> Delegate)
- Return a new event consisting of the results of applying the given accumulating function - to successive values triggered on the input event. An item of internal state - records the current value of the state parameter. The internal state is not locked during the - execution of the accumulation function, so care should be taken that the - input IEvent not triggered by multiple threads simultaneously. -
val split :
-  ('T -> Choice<'U1,'U2>) ->
-    IEvent<'Del,'T> -> IEvent<'U1> * IEvent<'U2>
-    (requires delegate and 'Del :> Delegate)
- Return a new event that listens to the original event and triggers the - first resulting event if the application of the function to the event arguments - returned a Choice1Of2, and the second event if it returns a Choice2Of2 -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.html deleted file mode 100644 index 42094d8d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.html +++ /dev/null @@ -1,143 +0,0 @@ -Microsoft.FSharp.Control -
-
-

[Home] Namespace Microsoft.FSharp.Control


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.Core')

- - - - - -
ModuleDescription
Microsoft.FSharp.Control.CommonExtensions - A module of extension members that provide asynchronous operations for some basic .NET types related to concurrency and I/O. -
Microsoft.FSharp.Control.Event - Basic operations on first class event objects. -
-
-

Type Definitions

- - - - - - - - - - - - - - - - - - -
TypeDescription
type Async - An asynchronous computation, which, when run, will eventually produce a value - of the given type, or else raise an exception. The value and/or exception is not returned - to the caller immediately, but is rather passed to a success continuation, exception continuation - or cancellation continuation. - - Asynchronous computations are normally specified using the F# 'workflow' syntax for building - computations. - - When run, asynchronous computations can normally be thought of as running run in one of - two modes: 'work item mode' or 'waiting mode'. - - - 'work item mode' indicates that the computation is executing as a work item, - e.g. in the .NET Thread Pool via ThreadPool.QueueUserWorkItem, or is running - a brief event-response action on the GUI thread. - - - 'waiting mode' indicates the computations a waiting for asynchronous I/O completions, - typically suspended as thunks using ThreadPool.RegisterWaitForSingleObject. - - Asynchronous computations running as 'work items' should not generally perform blocking - operations, e.g. long running synchronous loops. However, some asynchronous - computations may, out of necessity, need to execute blocking I/O operations: - these should be run on new threads or a user-managed pool of threads specifically - dedicated to resolving blocking conditions. For example, System.IO.OpenFile is, by - design, a blocking operation. However frequently it is important to code as - if this is asynchronous. This can be done by executing Async.SwitchToNewThread - as part of the workflow. - - When run, asynchronous computations belong to an AsyncGroup. This can usually be specified - when the async computation is started. The only action on an AsyncGroup is to raise a cancellation - condition for the AsyncGroup. Async values check the cancellation condition for their AsyncGroup - regularly, though synchronous computations within an asynchronous computation will not automatically - check this condition. This gives a user-level cooperative cancellation protocol. -
type Async - This static class holds members for creating and manipulating asynchronous computations -
type AsyncBuilder - The type of the 'async' operator, used to build workflows for asynchronous computations. -
type AsyncGroup - A handle to a capability to cancel a set of asynchronous computations. -
type AsyncReplyChannel - A handle to a capability to reply to a PostAndReply message -
type DelegateEvent - Event implementations for an arbitrary type of delegate -
type Event - Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument -
type Event - Event implementations for the IEvent<_> type -
type Handler - A delegate type associated with the F# event type IEvent<_> -
type IDelegateEvent - F# gives special status to non-virtual instance member properties compatible with type IDelegateEvent, - generating approriate .NET metadata to make the member appear to other .NET languages as a - .NET event. -
type IEvent -The family of first class event values for delegate types that satisfy the F# delegate constraint. -
type IEvent - First-class listening points (i.e. objects that permit you to register a 'callback' - activated when the event is triggered). See the module Event - for functions to create events. - Note: an abbreviation for IEvent<Handler<'T>,'T>
type lazy - The type of delayed computations. - - Use the values in the Lazy module to manipulate - values of this type, and the notation 'lazy expr' to create values - of this type. - Note: an abbreviation for Lazy<'T>
type Lazy - The type of delayed computations. - - Use the values in the Lazy module to manipulate - values of this type, and the notation 'lazy expr' to create values - of this type. -
type MailboxProcessor - A MailboxProcessor is a message-processing agent defined using an asynchronous workflow. - The agent encapsulates a message queue that supports multiple-writers and the single reader agent. - Writers send messages to the agent by using the Post, PostAndReply or AsyncPostAndReply methods. - - The reader agent is specified when creating the MailboxProcessor. The - agent is usually an asychronous workflow that waits for messages - by using the Receive or TryReceive methods. - A MailboxProcessor may also scan through all available messages by using the - Scan or TryScan method. The encapsulated message queue only - supports a single active reader, thus at most one concurrent call to Receive, TryReceive, - Scan and/or TryScan may be active at any one time. -
-
-

Exceptions

- - - - -
ExceptionDescription
exception Undefined - An exeption type raised when the evaluation of a lazy value recursively depend upon itself -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Async-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Async-1.html deleted file mode 100644 index 7c24352b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Async-1.html +++ /dev/null @@ -1,54 +0,0 @@ -Microsoft.FSharp.Control.Async -
-
-

[Home] Type Microsoft.FSharp.Control.Async


-
-
- - - -
- An asynchronous computation, which, when run, will eventually produce a value - of the given type, or else raise an exception. The value and/or exception is not returned - to the caller immediately, but is rather passed to a success continuation, exception continuation - or cancellation continuation. - - Asynchronous computations are normally specified using the F# 'workflow' syntax for building - computations. - - When run, asynchronous computations can normally be thought of as running run in one of - two modes: 'work item mode' or 'waiting mode'. - - - 'work item mode' indicates that the computation is executing as a work item, - e.g. in the .NET Thread Pool via ThreadPool.QueueUserWorkItem, or is running - a brief event-response action on the GUI thread. - - - 'waiting mode' indicates the computations a waiting for asynchronous I/O completions, - typically suspended as thunks using ThreadPool.RegisterWaitForSingleObject. - - Asynchronous computations running as 'work items' should not generally perform blocking - operations, e.g. long running synchronous loops. However, some asynchronous - computations may, out of necessity, need to execute blocking I/O operations: - these should be run on new threads or a user-managed pool of threads specifically - dedicated to resolving blocking conditions. For example, System.IO.OpenFile is, by - design, a blocking operation. However frequently it is important to code as - if this is asynchronous. This can be done by executing Async.SwitchToNewThread - as part of the workflow. - - When run, asynchronous computations belong to an AsyncGroup. This can usually be specified - when the async computation is started. The only action on an AsyncGroup is to raise a cancellation - condition for the AsyncGroup. Async values check the cancellation condition for their AsyncGroup - regularly, though synchronous computations within an asynchronous computation will not automatically - check this condition. This gives a user-level cooperative cancellation protocol. - -

Full Type Signature

-
[<SealedAttribute (); StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type Async<'T>
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Async.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Async.html deleted file mode 100644 index 0f1c72e7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Async.html +++ /dev/null @@ -1,235 +0,0 @@ -Microsoft.FSharp.Control.Async -
-
-

[Home] Type Microsoft.FSharp.Control.Async


-
-
- - - -
- This static class holds members for creating and manipulating asynchronous computations - -

Full Type Signature

-
[<SealedAttribute ()>]
-type Async
-with
-  static member
-    BuildPrimitive : arg:'Arg1 * beginAction:('Arg1 * AsyncCallback * obj -> IAsyncResult) *
-                     endAction:(IAsyncResult -> 'T) -> Async<'T>
-  static member
-    BuildPrimitive : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 *
-                     beginAction:('Arg1 * 'Arg2 * 'Arg3 * AsyncCallback * obj -> IAsyncResult) *
-                     endAction:(IAsyncResult -> 'T) -> Async<'T>
-  static member
-    BuildPrimitive : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * AsyncCallback * obj -> IAsyncResult) *
-                     endAction:(IAsyncResult -> 'T) -> Async<'T>
-  static member
-    BuildPrimitive : beginAction:(AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) ->
-                       Async<'T>
-  static member CancelDefaultGroup : ?message:string -> unit
-  static member Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
-  static member Ignore : computation:Async<'T> -> Async<unit>
-  static member OnCancel : compensation:(string -> unit) -> Async<IDisposable>
-  static member Parallel : computationList:seq<Async<'T>> -> Async<'T array>
-  static member Parallel2 : computation1:Async<'T1> * computation2:Async<'T2> -> Async<'T1 * 'T2>
-  static member
-    Parallel3 : computation1:Async<'T1> * computation2:Async<'T2> * computation3:Async<'T3> ->
-                  Async<'T1 * 'T2 * 'T3>
-  static member
-    Primitive : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) ->
-                  Async<'T>
-  static member RunSynchronously : computation:Async<'T> * ?timeout:int -> 'T
-  static member
-    RunWithContinuations : continuation:('T -> unit) * exceptionContinuation:(exn -> unit) *
-                           cancellationContinuation:(OperationCanceledException -> unit) * computation:Async<'T> ->
-                             unit
-  static member Start : computation:Async<unit> -> unit
-  static member StartChild : computation:Async<'T> * ?millisecondsTimeout:int -> Async<Async<'T>>
-  static member SwitchToGuiThread : syncContext:SynchronizationContext -> Async<unit>
-  static member SwitchToNewThread : unit -> Async<unit>
-  static member SwitchToThreadPool : unit -> Async<unit>
-  static member
-    TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T>
-  static member DefaultGroup : AsyncGroup
-end
-

Static Members

- - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member
-  BuildPrimitive : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 *
-                   beginAction:('Arg1 * 'Arg2 * 'Arg3 * AsyncCallback * obj ->
-                                  IAsyncResult) * endAction:(IAsyncResult -> 'T) ->
-                     Async<'T>
- Specify an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET APIs where the overall operation is qualified by three arguments. For example, - Async.BuildPrimitive(arg1,arg2,arg3,ws.BeginGetWeather,ws.EndGetWeather) - When the computation is run, the 'Begin' half of the operation is executed, and - an asynchronous computation is returned that, when run, awaits the completion - of the computation and fetches its overall result using the 'End' operation. -
member
-  BuildPrimitive : arg1:'Arg1 * arg2:'Arg2 *
-                   beginAction:('Arg1 * 'Arg2 * AsyncCallback * obj ->
-                                  IAsyncResult) * endAction:(IAsyncResult -> 'T) ->
-                     Async<'T>
- Specify an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET APIs where the - overall operation is qualified by two arguments. For example, - Async.BuildPrimitive(arg1,arg2,ws.BeginGetWeather,ws.EndGetWeather) - When the computation is run, the 'Begin' half of the operation is executed, and - an asynchronous computation is returned that, when run, awaits the completion - of the computation and fetches its overall result using the 'End' operation. -
member
-  BuildPrimitive : arg:'Arg1 *
-                   beginAction:('Arg1 * AsyncCallback * obj -> IAsyncResult) *
-                   endAction:(IAsyncResult -> 'T) -> Async<'T>
- Specify an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET APIs where the - overall operation is qualified by one argument. For example, - Async.BuildPrimitive(place,ws.BeginGetWeather,ws.EndGetWeather) - When the computation is run, the 'Begin' half of the operation is executed, and - an asynchronous computation is returned that, when run, awaits the completion - of the computation and fetches its overall result using the 'End' operation. -
member
-  BuildPrimitive : beginAction:(AsyncCallback * obj -> IAsyncResult) *
-                   endAction:(IAsyncResult -> 'T) -> Async<'T>
- Specify an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET APIs where the overall operation is not qualified by any arguments. For example, - Async.BuildPrimitive(ws.BeginGetWeather,ws.EndGetWeather) - When the computation is run, the 'Begin' half of the operation is executed, and - an asynchronous computation is returned that, when run, awaits the completion - of the computation and fetches its overall result using the 'End' operation. -
member CancelDefaultGroup : ?message:string -> unit
- Raise the cancellation condition for the most recent set of Async computations started without any specific AsyncGroup. - Replace the global group with a new global group for any asynchronous computations created after this point without - any specific AsyncGroup. -
member Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
- Get the default group for executing asynchronous computations -
member DefaultGroup : AsyncGroup
- Get the default group for executing asynchronous computations -
member Ignore : computation:Async<'T> -> Async<unit>
- Specify an asynchronous computation that, when run, runs 'p', ignoring the result and - returning the result '()'. -
member OnCancel : compensation:(string -> unit) -> Async<IDisposable>
- Generate a scoped, cooperative cancellation handler for use within an asynchronous workflow. - - async { use! holder = Async.OnCancel f ... } generates an asynchronous computation where, - if a cancellation happens any time during the execution of the asynchronous computation in the scope of 'holder', - then action 'f' is executed on the thread that is performing the cancellation. You can use - this to arrange for your own computation to be asynchronously notified that a cancellation has occurred, e.g. - by setting a flag, or deregistering a pending I/O action. -
member
-  Parallel : computationList:seq<Async<'T>> -> Async<'T array>
- Specify an asynchronous computation that, when run, executes all the given asynchronous computations, initially - queueing each as work items and using a fork/join pattern. If any raise an exception then the - overall computation will raise the first detected exception, and attempt to cancel the others. - All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. -
member
-  Parallel2 : computation1:Async<'T1> * computation2:Async<'T2> ->
-                Async<'T1 * 'T2>
- Specify an asynchronous computation that, when run, executes the two asynchronous computations, starting each in the thread pool. - If any raise an exception then the overall computation will raise an exception, and attempt to cancel the others. - All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. -
member
-  Parallel3 : computation1:Async<'T1> * computation2:Async<'T2> *
-              computation3:Async<'T3> -> Async<'T1 * 'T2 * 'T3>
- Specify an asynchronous computation that, when run, executese the three asynchronous computations, starting each in the thread pool. - If any raise an exception then the overall computation will raise an exception, and attempt to cancel the others. - All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. -
member
-  Primitive : callback:(('T -> unit) * (exn -> unit) *
-                        (OperationCanceledException -> unit) -> unit) ->
-                Async<'T>
- Specify an asynchronous computation that, when run, executes the given callback. - The callback must eventually call either the continuation, - the exception continuation or the cancel exception. -
member RunSynchronously : computation:Async<'T> * ?timeout:int -> 'T
- Run the asynchronous computation and await its result. - - If an exception occurs in the asynchronous computation then an exception is re-raised by this - function. - - Run as part of the default AsyncGroup -
member
-  RunWithContinuations : continuation:('T -> unit) *
-                         exceptionContinuation:(exn -> unit) *
-                         cancellationContinuation:(OperationCanceledException ->
-                                                     unit) *
-                         computation:Async<'T> -> unit
- Run an asynchronous computation, initially as a work item. - - Run as part of the default AsyncGroup -
member Start : computation:Async<unit> -> unit
- Start the asynchronous computation in the thread pool. Do not await its result. - - Run as part of the default AsyncGroup -
member
-  StartChild : computation:Async<'T> * ?millisecondsTimeout:int ->
-                 Async<Async<'T>>
- Start a child computation within an asynchronous workflow. - This allows multiple asynchronous computations to be executed simultaneously. - - This method should normally be used as the immediate - right-hand-side of a 'let!' binding in an F# asynchronous workflow, i.e., - - async { ... - let! completor1 = childComputation1 |> Async.StartChild - let! completor2 = childComputation2 |> Async.StartChild - ... - let! result1 = completor1 - let! result2 = completor2 - ... } - - When used in this way, each use of StartChild starts an instance of childComputation - and returns a completor object representing a computation to wait for the completion of the operation. - When executed, the completor awaits the completion of childComputation. -
member
-  SwitchToGuiThread : syncContext:SynchronizationContext -> Async<unit>
- Specify an asynchronous computation that, when run, runs - its continuation using syncContext.Post. If syncContext is null - then the asynchronous computation is equivalent to SwitchToThreadPool(). -
member SwitchToNewThread : unit -> Async<unit>
- Specify an asynchronous computation that, when run, creates a new thread and runs - its continutation in that thread -
member SwitchToThreadPool : unit -> Async<unit>
- Specify an asynchronous computation that, when run, queues a CPU-intensive work in the thread pool item that runs - its continutation. -
member
-  TryCancelled : computation:Async<'T> *
-                 compensation:(OperationCanceledException -> unit) ->
-                   Async<'T>
- Specify an asynchronous computation that, when run, executes computation, - If p is effectively cancelled before its termination then - the process f exn is executed. -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_AsyncBuilder.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_AsyncBuilder.html deleted file mode 100644 index bf266c4e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_AsyncBuilder.html +++ /dev/null @@ -1,94 +0,0 @@ -Microsoft.FSharp.Control.AsyncBuilder -
-
-

[Home] Type Microsoft.FSharp.Control.AsyncBuilder


-
-
- - - -
- The type of the 'async' operator, used to build workflows for asynchronous computations. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type AsyncBuilder =
-  class
-    internal new : unit -> AsyncBuilder
-    member Bind : computation:Async<'T> * binder:('T -> Async<'U>) -> Async<'U>
-    member Combine : computation1:Async<unit> * computation2:Async<'T> -> Async<'T>
-    member Delay : generator:(unit -> Async<'T>) -> Async<'T>
-    member For : sequence:seq<'T> * body:('T -> Async<unit>) -> Async<unit>
-    member Return : value:'T -> Async<'T>
-    member TryFinally : computation:Async<'T> * compensation:(unit -> unit) -> Async<'T>
-    member TryWith : computation:Async<'T> * catchHandler:(exn -> Async<'T>) -> Async<'T>
-    member Using : resource:'T * binder:('T -> Async<'U>) -> Async<'U> (requires 'T :> IDisposable)
-    member While : guard:(unit -> bool) * computation:Async<unit> -> Async<unit>
-    member Zero : unit -> Async<unit>
-  end
-

Instance Members

- - - - - - - - - - - - - -
MemberDescription
member
-  Bind : computation:Async<'T> * binder:('T -> Async<'U>) ->
-           Async<'U>
- Specify an asynchronous computation that, when run, runs 'p', and when - 'p' generates a result 'T', runs 'f res'. -
member
-  Combine : computation1:Async<unit> * computation2:Async<'T> ->
-              Async<'T>
- Specify an asynchronous computation that, when run, first runs 'p1' and then runs 'p2', returning the result of 'p2'. -
member Delay : generator:(unit -> Async<'T>) -> Async<'T>
- Specify an asynchronous computation that, when run, runs 'f()' -
member
-  For : sequence:seq<'T> * body:('T -> Async<unit>) ->
-          Async<unit>
- Specify an asynchronous computation that, when run, enumerates the sequence 'seq' - on demand and runs 'f' for each element. -
member Return : value:'T -> Async<'T>
- Specify an asynchronous computation that, when run, returns the result 'v' -
member
-  TryFinally : computation:Async<'T> * compensation:(unit -> unit) ->
-                 Async<'T>
- Specify an asynchronous computation that, when run, runs 'p'. The action 'f' is executed - after 'p' completes, whether 'p' exits normally or by an exception. If 'f' raises an exception itself - the original exception is discarded and the new exception becomes the overall result of the computation. -
member
-  TryWith : computation:Async<'T> * catchHandler:(exn -> Async<'T>) ->
-              Async<'T>
- Specify an asynchronous computation that, when run, runs 'p' and returns its result. - If an exception happens then 'f(exn)' is called and the resulting computation executed instead. -
member
-  Using : resource:'T * binder:('T -> Async<'U>) -> Async<'U>
-            (requires 'T :> IDisposable)
- Specify an asynchronous computation that, when run, runs 'f(resource)'. - The action 'resource.Dispose()' is executed as this computation yields its result - or if the asynchronous computation exits by an exception or by cancellation. -
member
-  While : guard:(unit -> bool) * computation:Async<unit> ->
-            Async<unit>
- Specify an asynchronous computation that, when run, runs 'p' repeatedly - until 'gd()' becomes false. -
member Zero : unit -> Async<unit>
- Specify an asynchronous computation that, when run, just returns '()' -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_AsyncGroup.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_AsyncGroup.html deleted file mode 100644 index 92ae736c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_AsyncGroup.html +++ /dev/null @@ -1,69 +0,0 @@ -Microsoft.FSharp.Control.AsyncGroup -
-
-

[Home] Type Microsoft.FSharp.Control.AsyncGroup


-
-
- - - -
- A handle to a capability to cancel a set of asynchronous computations. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type AsyncGroup =
-  class
-    new : unit -> AsyncGroup
-    member RunSynchronously : computation:Async<'T> * ?timeout:int -> 'T
-    member
-      RunWithContinuations : continuation:('T -> unit) * exceptionContinuation:(exn -> unit) *
-                             cancellationContinuation:(OperationCanceledException -> unit) * computation:Async<'T> ->
-                               unit
-    member Start : computation:Async<unit> -> unit
-    member TriggerCancel : ?message:string -> unit
-  end
-

Instance Members

- - - - - - - -
MemberDescription
member RunSynchronously : computation:Async<'T> * ?timeout:int -> 'T
- Run the asynchronous computation and await its result. - - If an exception occurs in the asynchronous computation then an exception is re-raised by this - function. -
member
-  RunWithContinuations : continuation:('T -> unit) *
-                         exceptionContinuation:(exn -> unit) *
-                         cancellationContinuation:(OperationCanceledException ->
-                                                     unit) *
-                         computation:Async<'T> -> unit
- Start the asynchronous computation as a work item. - Return a handle to the computation as an AsyncFuture. -
member Start : computation:Async<unit> -> unit
- Start the asynchronous computation as a work item. Do not await its result. -
member TriggerCancel : ?message:string -> unit
- Raise the cancellation condition for this group of computations -
-
-

Static Members

- - - - -
MemberDescription
new : unit -> AsyncGroup
- Generate a new asynchronous group -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_AsyncReplyChannel-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_AsyncReplyChannel-1.html deleted file mode 100644 index b47aad80..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_AsyncReplyChannel-1.html +++ /dev/null @@ -1,35 +0,0 @@ -Microsoft.FSharp.Control.AsyncReplyChannel -
-
-

[Home] Type Microsoft.FSharp.Control.AsyncReplyChannel


-
-
- - - -
- A handle to a capability to reply to a PostAndReply message - -

Full Type Signature

-
[<SealedAttribute ()>]
-type AsyncReplyChannel<'Reply>
-with
-  member Reply : value:'Reply -> unit
-end
-

Instance Members

- - - - -
MemberDescription
member Reply : value:'Reply -> unit
- Send a reply to a PostAndReply message -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_DelegateEvent-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_DelegateEvent-1.html deleted file mode 100644 index 46bac112..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_DelegateEvent-1.html +++ /dev/null @@ -1,48 +0,0 @@ -Microsoft.FSharp.Control.DelegateEvent -
-
-

[Home] Type Microsoft.FSharp.Control.DelegateEvent


-
-
- - - -
- Event implementations for an arbitrary type of delegate - -

Full Type Signature

-
type DelegateEvent<'Del (requires 'Del :> Delegate)> =
-  class
-    new : unit -> DelegateEvent<'Del>
-    member Trigger : args:obj [] -> unit
-    member Publish : IDelegateEvent<'Del>
-  end
-

Instance Members

- - - - - -
MemberDescription
member Publish : IDelegateEvent<'Del>
- Publish the event as a first class event value -
member Trigger : args:obj [] -> unit
- Trigger the event using the given parameters -
-
-

Static Members

- - - - -
MemberDescription
new : unit -> DelegateEvent<'Del>
- Create an event object suitable for implementing an arbitrary type of delegate -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Event-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Event-1.html deleted file mode 100644 index e6e4fa4c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Event-1.html +++ /dev/null @@ -1,48 +0,0 @@ -Microsoft.FSharp.Control.Event -
-
-

[Home] Type Microsoft.FSharp.Control.Event


-
-
- - - -
- Event implementations for the IEvent<_> type - -

Full Type Signature

-
type Event<'T> =
-  class
-    new : unit -> Event<'T>
-    member Trigger : arg:'T -> unit
-    member Publish : IEvent<'T>
-  end
-

Instance Members

- - - - - -
MemberDescription
member Publish : IEvent<'T>
- Publish the event as a first class event value -
member Trigger : arg:'T -> unit
- Trigger the event using the given parameters -
-
-

Static Members

- - - - -
MemberDescription
new : unit -> Event<'T>
- Create an event object suitable for implementing for the IEvent<_> type -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Event-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Event-2.html deleted file mode 100644 index 17431b09..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Event-2.html +++ /dev/null @@ -1,48 +0,0 @@ -Microsoft.FSharp.Control.Event -
-
-

[Home] Type Microsoft.FSharp.Control.Event


-
-
- - - -
- Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument - -

Full Type Signature

-
type Event<'Del,'Args (requires delegate and 'Del :> Delegate)> =
-  class
-    new : unit -> Event<'Del,'Args>
-    member Trigger : sender:obj * args:'Args -> unit
-    member Publish : IEvent<'Del,'Args>
-  end
-

Instance Members

- - - - - -
MemberDescription
member Publish : IEvent<'Del,'Args>
- Publish the event as a first class event value -
member Trigger : sender:obj * args:'Args -> unit
- Trigger the event using the given sender object and parameters. The sender object may be null. -
-
-

Static Members

- - - - -
MemberDescription
new : unit -> Event<'Del,'Args>
- Create an event object suitable for delegate types following the standard .NET Framework convention of a first 'sender' argument -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Handler-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Handler-1.html deleted file mode 100644 index 9bfa4e1e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Handler-1.html +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft.FSharp.Control.Handler -
-
-

[Home] Type Microsoft.FSharp.Control.Handler


-
-
- - - -
- A delegate type associated with the F# event type IEvent<_> - -

Full Type Signature

-
type Handler<'T> =
-  delegate of obj * 'T -> unit
-

Instance Members

- - - - -
MemberDescription
member Invoke : sender:obj * args:'T -> unit
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_IDelegateEvent-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_IDelegateEvent-1.html deleted file mode 100644 index 535a7466..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_IDelegateEvent-1.html +++ /dev/null @@ -1,42 +0,0 @@ -Microsoft.FSharp.Control.IDelegateEvent -
-
-

[Home] Type Microsoft.FSharp.Control.IDelegateEvent


-
-
- - - -
- F# gives special status to non-virtual instance member properties compatible with type IDelegateEvent, - generating approriate .NET metadata to make the member appear to other .NET languages as a - .NET event. - -

Full Type Signature

-
type IDelegateEvent<'Del (requires 'Del :> Delegate)> =
-  interface
-    abstract member AddHandler : handler:'Del -> unit
-    abstract member RemoveHandler : handler:'Del -> unit
-  end
-

Instance Members

- - - - - -
MemberDescription
member AddHandler : handler:'Del -> unit
- Connect a handler delegate object to the event. A handler can - be later removed using RemoveHandler. The listener will - be invoked when the event is fired. -
member RemoveHandler : handler:'Del -> unit
- Remove a listener delegate from an event listener store -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_IEvent-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_IEvent-1.html deleted file mode 100644 index 4fcb0d3c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_IEvent-1.html +++ /dev/null @@ -1,24 +0,0 @@ -Microsoft.FSharp.Control.IEvent -
-
-

[Home] Type Microsoft.FSharp.Control.IEvent


-
-
- - - -
- First-class listening points (i.e. objects that permit you to register a 'callback' - activated when the event is triggered). See the module Event - for functions to create events. - Note: an abbreviation for IEvent<Handler<'T>,'T> -

Full Type Signature

-
type IEvent<'T> = IEvent<Handler<'T>,'T>
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_IEvent-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_IEvent-2.html deleted file mode 100644 index 2a843897..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_IEvent-2.html +++ /dev/null @@ -1,36 +0,0 @@ -Microsoft.FSharp.Control.IEvent -
-
-

[Home] Type Microsoft.FSharp.Control.IEvent


-
-
- - - -
-The family of first class event values for delegate types that satisfy the F# delegate constraint. - -

Full Type Signature

-
type IEvent<'Del,'Args (requires delegate and 'Del :> Delegate)> =
-  interface
-    inherit IDelegateEvent<'Del>
-    abstract member Add : callback:('Args -> unit) -> unit
-  end
-

Instance Members

- - - - -
MemberDescription
member Add : callback:('Args -> unit) -> unit
- Connect a listener function to the event. The listener will - be invoked when the event is fired. -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Lazy-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Lazy-1.html deleted file mode 100644 index 0b0602a4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Lazy-1.html +++ /dev/null @@ -1,80 +0,0 @@ -Microsoft.FSharp.Control.Lazy -
-
-

[Home] Type Microsoft.FSharp.Control.Lazy


-
-
- - - -
- The type of delayed computations. - - Use the values in the Lazy module to manipulate - values of this type, and the notation 'lazy expr' to create values - of this type. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type Lazy<'T>
-with
-  member Force : unit -> 'T
-  member SynchronizedForce : unit -> 'T
-  member UnsynchronizedForce : unit -> 'T
-  member IsDelayed : bool
-  member IsException : bool
-  member IsForced : bool
-  member Value : 'T
-  static member Create : creator:(unit -> 'T) -> Lazy<'T>
-  static member CreateFromValue : value:'T -> Lazy<'T>
-end
-

Instance Members

- - - - - - - - - - -
MemberDescription
member Force : unit -> 'T
- Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to - prevent other threads also computing the value. If the value is re-forced during its own computation - the Undefined exception is raised. -
member IsDelayed : bool
- Indicates if the lazy value has yet to be computed -
member IsException : bool
- Indicates if the lazy value is being computed or the computation raised an exception -
member IsForced : bool
- Indicates if the lazy value has been successfully computed -
member SynchronizedForce : unit -> 'T
- Same as Force -
member UnsynchronizedForce : unit -> 'T
- Same as Force, except no lock is taken. -
member Value : 'T
- Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to - prevent other threads also computing the value. -
-
-

Static Members

- - - - - -
MemberDescription
member Create : creator:(unit -> 'T) -> Lazy<'T>
- Create a lazy computation that evaluates to the result of the given function when forced -
member CreateFromValue : value:'T -> Lazy<'T>
- Create a lazy computation that evaluates to the given value when forced -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_MailboxProcessor-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_MailboxProcessor-1.html deleted file mode 100644 index f23a0cc6..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_MailboxProcessor-1.html +++ /dev/null @@ -1,146 +0,0 @@ -Microsoft.FSharp.Control.MailboxProcessor -
-
-

[Home] Type Microsoft.FSharp.Control.MailboxProcessor


-
-
- - - -
- A MailboxProcessor is a message-processing agent defined using an asynchronous workflow. - The agent encapsulates a message queue that supports multiple-writers and the single reader agent. - Writers send messages to the agent by using the Post, PostAndReply or AsyncPostAndReply methods. - - The reader agent is specified when creating the MailboxProcessor. The - agent is usually an asychronous workflow that waits for messages - by using the Receive or TryReceive methods. - A MailboxProcessor may also scan through all available messages by using the - Scan or TryScan method. The encapsulated message queue only - supports a single active reader, thus at most one concurrent call to Receive, TryReceive, - Scan and/or TryScan may be active at any one time. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type MailboxProcessor<'Msg> =
-  class
-    interface IDisposable
-    new : initial:(MailboxProcessor<'Msg> -> Async<unit>) * ?asyncGroup:AsyncGroup ->
-            MailboxProcessor<'Msg>
-    member
-      AsyncPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout:int -> Async<'Reply>
-    member
-      AsyncTryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout:int ->
-                               Async<'Reply option>
-    member Post : message:'Msg -> unit
-    member PostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout:int -> 'Reply
-    member Receive : ?timeout:int -> Async<'Msg>
-    member Scan : scanner:('Msg -> Async<'T> option) * ?timeout:int -> Async<'T>
-    member Start : unit -> unit
-    member TryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout:int -> 'Reply option
-    member TryReceive : ?timeout:int -> Async<'Msg option>
-    member TryScan : scanner:('Msg -> Async<'T> option) * ?timeout:int -> Async<'T option>
-    member DefaultTimeout : int
-    member DefaultTimeout : int with set
-    static member
-      Start : initial:(MailboxProcessor<'Msg> -> Async<unit>) * ?asyncGroup:AsyncGroup ->
-                MailboxProcessor<'Msg>
-  end
-

Instance Members

- - - - - - - - - - - - - - - -
MemberDescription
member
-  AsyncPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) *
-                      ?timeout:int -> Async<'Reply>
- Post a message to the message queue of the MailboxProcessor and await a reply on the channel asynchronously. - The message is produced by a single call to the first function which must build a message - containing the reply channel. The receiving MailboxProcessor must process this message and - invoke the Reply method on the reply channel precisly once. -
member
-  AsyncTryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) *
-                         ?timeout:int -> Async<'Reply option>
- Like AsyncPostAndReply, but return None if no reply within the timeout period. -
member DefaultTimeout : int
- Raise a timeout exception if a message not received in this amount of time. Default infinite. -
member DefaultTimeout : int with set
- Raise a timeout exception if a message not received in this amount of time. Default infinite. -
member Post : message:'Msg -> unit
- Post a message to the message queue of the MailboxProcessor, asynchronously -
member
-  PostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) *
-                 ?timeout:int -> 'Reply
- Post a message to the message queue of the MailboxProcessor and await a reply on the channel synchronously. - The message is produced by a single call to the first function which must build a message - containing the reply channel. The receiving MailboxProcessor must process this message and - invoke the Reply method on the reply channel precisly once. -
member Receive : ?timeout:int -> Async<'Msg>
- Return an asynchronous computation which will - consume the first message in arrival order. No thread - is blocked while waiting for further messages. Raise a TimeoutException - if the timeout is exceeded. -
member
-  Scan : scanner:('Msg -> Async<'T> option) * ?timeout:int ->
-           Async<'T>
- Return an asynchronous computation which will - look through messages in arrival order until 'scanner' returns a Some value. No thread - is blocked while waiting for further messages. Raise a TimeoutException - if the timeout is exceeded. -
member Start : unit -> unit
- Start the MailboxProcessor -
member
-  TryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) *
-                    ?timeout:int -> 'Reply option
- Like PostAndReply, but return None if no reply within the timeout period. -
member TryReceive : ?timeout:int -> Async<'Msg option>
- Return an asynchronous computation which will - consume the first message in arrival order. No thread - is blocked while waiting for further messages. Return None - if the timeout is exceeded. -
member
-  TryScan : scanner:('Msg -> Async<'T> option) * ?timeout:int ->
-              Async<'T option>
- Return an asynchronous computation which will - look through messages in arrival order until 'scanner' returns a Some value. No thread - is blocked while waiting for further messages. Return None - if the timeout is exceeded. -
-
-

Static Members

- - - - - -
MemberDescription
new : initial:(MailboxProcessor<'Msg> -> Async<unit>) *
-      ?asyncGroup:AsyncGroup -> MailboxProcessor<'Msg>
- Create an instance of a MailboxProcessor. The asynchronous computation executed by the - processor is the one returned by the 'initial' function. This function is not executed until - 'Start' is called. -
member
-  Start : initial:(MailboxProcessor<'Msg> -> Async<unit>) *
-          ?asyncGroup:AsyncGroup -> MailboxProcessor<'Msg>
- Create and start an instance of a MailboxProcessor. The asynchronous computation executed by the - processor is the one returned by the 'initial' function. -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Undefined.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Undefined.html deleted file mode 100644 index 5be54782..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type_Undefined.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Control.Undefined -
-
-

[Home] Exception Microsoft.FSharp.Control.Undefined


-
-
- - - -
- An exeption type raised when the evaluation of a lazy value recursively depend upon itself - -

Full Signature

-
exception Undefined
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type__lazy-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type__lazy-1.html deleted file mode 100644 index caf54454..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Control.type__lazy-1.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Control.lazy -
-
-

[Home] Type Microsoft.FSharp.Control.lazy


-
-
- - - -
- The type of delayed computations. - - Use the values in the Lazy module to manipulate - values of this type, and the notation 'lazy expr' to create values - of this type. - Note: an abbreviation for Lazy<'T> -

Full Type Signature

-
type 'T lazy = Lazy<'T>
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.ExtraTopLevelOperators.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.ExtraTopLevelOperators.html deleted file mode 100644 index 769f8cde..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.ExtraTopLevelOperators.html +++ /dev/null @@ -1,78 +0,0 @@ -Microsoft.FSharp.Core.ExtraTopLevelOperators -
-
-

[Home] Module Microsoft.FSharp.Core.ExtraTopLevelOperators


-
-
- - - -
-Pervasives: Additional bindings available at the top level - -

Values

- - - - - - - - - - - - - - - - - -
ValueDescription
val ( ~% ) : Expr<'T> -> 'T
- Special prefix operator for splicing typed expressions into quotation holes -
val ( ~%% ) : Expr -> 'T
- Special prefix operator for splicing untyped expressions into quotation holes -
val async : AsyncBuilder
- Build an aysnchronous workflow using computation expression syntax -
val dict : seq<'K * 'V> -> IDictionary<'K,'V>
- Builds a lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. -
val eprintf : TextWriterFormat<'T> -> 'T
- Print to stderr using the given format -
val eprintfn : TextWriterFormat<'T> -> 'T
- Print to stderr using the given format, and add a newline -
val failwithf : StringFormat<'T,'d> -> 'T
- Print to a string buffer and raise an exception with the given - result. Helper printers must return strings. -
val fprintf : TextWriter -> TextWriterFormat<'T> -> 'T
- Print to a file using the given format -
val fprintfn : TextWriter -> TextWriterFormat<'T> -> 'T
- Print to a file using the given format, and add a newline -
val printf : TextWriterFormat<'T> -> 'T
- Print to stdout using the given format -
val printfn : TextWriterFormat<'T> -> 'T
- Print to stdout using the given format, and add a newline -
val seq : seq<'T> -> seq<'T>
- Builds a sequence using sequence expression syntax -
val set : seq<'T> -> Set<'T>
- Builds a set from a sequence of objects. The key objects are indexed using generic comparison -
val sprintf : StringFormat<'T> -> 'T
- Print to a string using the given format -
-
-

Active Patterns

- - - - -
Active PatternDescription
val ( |Lazy| ) : Lazy<'T> -> 'T
- An active pattern to force the execution of values of type Lazy<_> -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.HashCompare.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.HashCompare.html deleted file mode 100644 index 39ed8ebb..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.HashCompare.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Core.LanguagePrimitives.HashCompare -
-
-

[Home] Module Microsoft.FSharp.Core.LanguagePrimitives.HashCompare


-
-
- - - -
- The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - -
-

See Also

-Microsoft.FSharp.Core.LanguagePrimitives
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions.html deleted file mode 100644 index 4c5246ec..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions.html +++ /dev/null @@ -1,53 +0,0 @@ -Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions -
-
-

[Home] Module Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions


-
-
- - - -
- The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - -

Values

- - - - - - - - - - - - -
ValueDescription
val GetArray : 'T [] -> int -> 'T
- The standard overloaded associative (indexed) lookup operator -
val GetArray2D : 'T [,] -> int * int -> 'T
- The standard overloaded associative (2-indexed) lookup operator -
val GetArray3D : 'T [,,] -> int * int * int -> 'T
- The standard overloaded associative (3-indexed) lookup operator -
val GetArray4D : 'T [,,,] -> int * int * int * int -> 'T
- The standard overloaded associative (4-indexed) lookup operator -
val GetString : string -> int -> char
- Primitive used by pattern match compilation -
val SetArray : 'T [] -> int * 'T -> unit
- The standard overloaded associative (indexed) mutation operator -
val SetArray2D : 'T [,] -> int * int * 'T -> unit
- The standard overloaded associative (2-indexed) mutation operator -
val SetArray3D : 'T [,,] -> int * int * int * 'T -> unit
- The standard overloaded associative (3-indexed) mutation operator -
val SetArray4D : 'T [,,,] -> int * int * int * int * 'T -> unit
- The standard overloaded associative (4-indexed) mutation operator -
-
-
-

See Also

-Microsoft.FSharp.Core.LanguagePrimitives
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators.html deleted file mode 100644 index 1a284d6c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators.html +++ /dev/null @@ -1,47 +0,0 @@ -Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -
-
-

[Home] Module Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators


-
-
- - - -
- The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - -

Values

- - - - - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute ("Consider using '&&' instead")>]
-val ( & ) : bool -> bool -> bool
- Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand -
val ( && ) : bool -> bool -> bool
- Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand -
val ( || ) : bool -> bool -> bool
- Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand -
[<NoDynamicInvocationAttribute ()>]
-val ( ~& ) : 'T -> 'T byref
- Address-of. Uses of this value may result in the generation of unverifiable code. -
[<NoDynamicInvocationAttribute ()>]
-val ( ~&& ) : 'T -> nativeptr<'T>
- Address-of. Uses of this value may result in the generation of unverifiable code. -
val or : bool -> bool -> bool
- Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand -
-
-
-

See Also

-Microsoft.FSharp.Core.LanguagePrimitives
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.html deleted file mode 100644 index 05446cb2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.LanguagePrimitives.html +++ /dev/null @@ -1,141 +0,0 @@ -Microsoft.FSharp.Core.LanguagePrimitives -
-
-

[Home] Module Microsoft.FSharp.Core.LanguagePrimitives


-
-
- - - -
- Language primitives associated with the F# language - -

Modules (as contributed by assembly 'FSharp.Core')

- - - - - - -
ModuleDescription
Microsoft.FSharp.Core.LanguagePrimitives.HashCompare - The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs -
Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions - The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs -
Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs -
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val DefaultValue<'T (requires 'T : null)> : 'T (requires 'T : null)
- Generate a null value for reference types. -
val DivideByInt : overloaded
- Divide a floating point value by an integer -
val EnumOfValue : 'T -> 'Enum (requires enum)
- Build an enum value from an underlying value -
val EnumToValue : 'Enum -> 'T (requires enum)
- Get the underlying value for an enum value -
val FastGenericComparer<'T> : IComparer<'T>
- Make an F# comparer object for the given type -
val FastGenericEqualityComparer<'T> : IEqualityComparer<'T>
- Make an F# hash/equality object for the given type -
val FastLimitedGenericEqualityComparer : int -> IEqualityComparer<'T>
- Make an F# hash/equality object for the given type using node-limited hashing when hashing F# - records, lists and union types. -
val FSharpComparer : unit -> IComparer
- A static F# comparer object -
val FSharpEqualityComparer : unit -> IEqualityComparer
- Return an F# comparer object suitable for hashing and equality. This hashing behaviour - of the returned comparer is not limited by an overall node count when hashing F# - records, lists and union types. -
val GenericComparison : 'T -> 'T -> int
- Compare two values -
val GenericComparisonWithComparer : IComparer -> 'T -> 'T -> int
- Compare two values. May be called as a recursive case from an implementation of System.IComparable to - ensure consistent NaN comparison semantics. -
val GenericEquality : 'T -> 'T -> bool
- Compare two values for equality -
val GenericEqualityWithComparer : IEqualityComparer -> 'T -> 'T -> bool
- Compare two values for equality -
val GenericGreaterOrEqual : 'T -> 'T -> bool
- Compare two values -
val GenericGreaterThan : 'T -> 'T -> bool
- Compare two values -
val GenericHash : 'T -> int
- Hash a value according to its structure. This hash is not limited by an overall node count when hashing F# - records, lists and union types. -
val GenericHashWithComparer : IEqualityComparer -> 'T -> int
- Recursively hash a part of a value according to its structure. -
val GenericLessOrEqual : 'T -> 'T -> bool
- Compare two values -
val GenericLessThan : 'T -> 'T -> bool
- Compare two values -
val GenericLimitedHash : int -> 'T -> int
- Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# - records, lists and union types. -
val GenericMaximum : 'T -> 'T -> 'T
- Take the maximum of two values structurally according to the order given by GenericComparison -
val GenericMinimum : 'T -> 'T -> 'T
- Take the minimum of two values structurally according to the order given by GenericComparison -
val GenericOne<'T (requires member get_One)> : overloaded
- Resolves to the one value for any primitive numeric type or any type with a static member called 'One' -
val GenericZero<'T (requires member get_Zero)> : overloaded
- Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' -
val ParseInt32 : string -> int32
- Parse an int32 according to the rules used by the overloaded 'int32' conversion operator when applied to strings -
val ParseInt64 : string -> int64
- Parse an int64 according to the rules used by the overloaded 'int64' conversion operator when applied to strings -
val ParseUInt32 : string -> uint32
- Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings -
val ParseUInt64 : string -> uint64
- Parse an uint64 according to the rules used by the overloaded 'uint64' conversion operator when applied to strings -
val PhysicalEquality : 'T -> 'T -> bool
- Reference/physical equality. - True if boxed versions of the inputs are reference-equal, OR if - both are primitive numeric types and the implementation of Object.Equals for the type - of the first argument returns true on the boxed versions of the inputs. -
val PhysicalHash : 'T -> int
- The physical hash. Hashes on the object identity, except for value types, - where we hash on the contents. -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.NumericLiterals.NumericLiteralI.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.NumericLiterals.NumericLiteralI.html deleted file mode 100644 index d829e918..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.NumericLiterals.NumericLiteralI.html +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft.FSharp.Core.NumericLiterals.NumericLiteralI -
-
-

[Home] Module Microsoft.FSharp.Core.NumericLiterals.NumericLiteralI


-
-
- - - -
- Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - -

Values

- - - - - - - - -
ValueDescription
val FromInt32 : int32 -> bigint
- Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' -
val FromInt64 : int64 -> bigint
- Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' -
val FromOne : unit -> bigint
- Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' -
val FromString : string -> bigint
- Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' -
val FromZero : unit -> bigint
- Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' -
-
-
-

See Also

-Microsoft.FSharp.Core.NumericLiterals
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.NumericLiterals.NumericLiteralN.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.NumericLiterals.NumericLiteralN.html deleted file mode 100644 index 5ca1bdda..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.NumericLiterals.NumericLiteralN.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Core.NumericLiterals.NumericLiteralN -
-
-

[Home] Module Microsoft.FSharp.Core.NumericLiterals.NumericLiteralN


-
-
- - - -
- Provide a default implementation of the F# numeric literal syntax 'dddN' - -
-

See Also

-Microsoft.FSharp.Core.NumericLiterals
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.NumericLiterals.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.NumericLiterals.html deleted file mode 100644 index c95daf2b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.NumericLiterals.html +++ /dev/null @@ -1,32 +0,0 @@ -Microsoft.FSharp.Core.NumericLiterals -
-
-

[Home] Module Microsoft.FSharp.Core.NumericLiterals


-
-
- - - -
- Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - -

Modules (as contributed by assembly 'FSharp.Core')

- - - - - -
ModuleDescription
Microsoft.FSharp.Core.NumericLiterals.NumericLiteralI - Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' -
Microsoft.FSharp.Core.NumericLiterals.NumericLiteralN - Provide a default implementation of the F# numeric literal syntax 'dddN' -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.Checked.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.Checked.html deleted file mode 100644 index 5c5246e0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.Checked.html +++ /dev/null @@ -1,101 +0,0 @@ -Microsoft.FSharp.Core.Operators.Checked -
-
-

[Home] Module Microsoft.FSharp.Core.Operators.Checked


-
-
- - - -
- This module contains the basic arithmetic operations with overflow checks. - -

Values

- - - - - - - - - - - - - - - - - - - -
ValueDescription
[<NoDynamicInvocationAttribute ()>]
-val ( * ) : overloaded
- Overloaded multiplication operator (checks for overflow) -
val ( + ) : overloaded
- Overloaded addition operator (checks for overflow) -
[<NoDynamicInvocationAttribute ()>]
-val ( - ) : overloaded
- Overloaded subtraction operator (checks for overflow) -
[<NoDynamicInvocationAttribute ()>]
-val ( ~- ) : overloaded
- Overloaded unary negation (checks for overflow) -
[<NoDynamicInvocationAttribute ()>]
-val byte : overloaded
- Converts the argument to byte. This is a direct conversion for all - primitive numeric types and ToByte method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val char : overloaded
- Converts the argument to unicode character based on UTF16 encoding (a direct conversion for all - primitive numeric types and ToUIntPtr method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val int : overloaded
- Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types and ToInt32 method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val int16 : overloaded
- Converts the argument to signed 16-bit integer. This is a direct conversion for all - primitive numeric types and ToInt16 method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val int32 : overloaded
- Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types and ToInt32 method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val int64 : overloaded
- Converts the argument to signed 64-bit integer. This is a direct conversion for all - primitive numeric types and ToInt64 method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val nativeint : overloaded
- Converts the argument to signed native integer. This is a direct conversion for all - primitive numeric types and ToIntPtr method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val sbyte : overloaded
- Converts the argument to signed byte. This is a direct conversion for all - primitive numeric types and ToSByte method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val uint16 : overloaded
- Converts the argument to unsigned 16-bit integer. This is a direct conversion for all - primitive numeric types and ToUInt16 method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val uint32 : overloaded
- Converts the argument to unsigned 32-bit integer. This is a direct conversion for all - primitive numeric types and ToUInt32 method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val uint64 : overloaded
- Converts the argument to unsigned 64-bit integer. This is a direct conversion for all - primitive numeric types and ToUInt64 method otherwise) -
[<NoDynamicInvocationAttribute ()>]
-val unativeint : overloaded
- Converts the argument to unsigned native integer. This is a direct conversion for all - primitive numeric types and ToUIntPtr method otherwise) -
-
-
-

See Also

-Microsoft.FSharp.Core.Operators
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.OperatorIntrinsics.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.OperatorIntrinsics.html deleted file mode 100644 index 8a4c3aff..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.OperatorIntrinsics.html +++ /dev/null @@ -1,68 +0,0 @@ -Microsoft.FSharp.Core.Operators.OperatorIntrinsics -
-
-

[Home] Module Microsoft.FSharp.Core.Operators.OperatorIntrinsics


-
-
- - - -
- A module of compiler intrinsic functions for efficient implementations of F# integer ranges - and dynamic invocations of other F# operators - -

Values

- - - - - - - - - - - - -
ValueDescription
val GetArraySlice : 'T [] -> int option * int option -> 'T []
- Get a slice of an array -
val GetArraySlice2D :
-  'T [,] -> int option * int option * int option * int option -> 'T [,]
- Get a slice of an array -
val GetArraySlice3D :
-  'T [,,] ->
-    int option * int option * int option * int option * int option * int option ->
-      'T [,,]
- Get a slice of an array -
val GetArraySlice4D :
-  'T [,,,] ->
-    int option * int option * int option * int option * int option * int option *
-    int option * int option -> 'T [,,,]
- Get a slice of an array -
val GetStringSlice : string -> int option * int option -> string
- Get a slice from a string -
val SetArraySlice : 'T [] -> int option * int option * 'T [] -> unit
- Set a slice of an array -
val SetArraySlice2D :
-  'T [,] -> int option * int option * int option * int option * 'T [,] -> unit
- Set a slice of an array -
val SetArraySlice3D :
-  'T [,,] ->
-    int option * int option * int option * int option * int option * int option *
-    'T [,,] -> unit
- Set a slice of an array -
val SetArraySlice4D :
-  'T [,,,] ->
-    int option * int option * int option * int option * int option * int option *
-    int option * int option * 'T [,,,] -> unit
- Set a slice of an array -
-
-
-

See Also

-Microsoft.FSharp.Core.Operators
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.Unchecked.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.Unchecked.html deleted file mode 100644 index e5bedaa5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.Unchecked.html +++ /dev/null @@ -1,32 +0,0 @@ -Microsoft.FSharp.Core.Operators.Unchecked -
-
-

[Home] Module Microsoft.FSharp.Core.Operators.Unchecked


-
-
- - - -
- This module contains basic operations which do not apply runtime and/or static checks - -

Values

- - - - -
ValueDescription
[<RequiresExplicitTypeArgumentsAttribute ()>]
-val defaultof<'T> : 'T
- Generate a defult value for any type. This is null for reference types, - For structs, this is struct value where all fields have the default value. - This function is unsafe in the sense that some F# values do not have proper null values. -
-
-
-

See Also

-Microsoft.FSharp.Core.Operators
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.html deleted file mode 100644 index c643a273..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Operators.html +++ /dev/null @@ -1,423 +0,0 @@ -Microsoft.FSharp.Core.Operators -
-
-

[Home] Module Microsoft.FSharp.Core.Operators


-
-
- - - -
- Basic F# Operators. This module is automatically opened in all F# code. - -

Modules (as contributed by assembly 'FSharp.Core')

- - - - - - -
ModuleDescription
Microsoft.FSharp.Core.Operators.Checked - This module contains the basic arithmetic operations with overflow checks. -
Microsoft.FSharp.Core.Operators.OperatorIntrinsics - A module of compiler intrinsic functions for efficient implementations of F# integer ranges - and dynamic invocations of other F# operators -
Microsoft.FSharp.Core.Operators.Unchecked - This module contains basic operations which do not apply runtime and/or static checks -
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val ( ! ) : 'T ref -> 'T
- Dereference a mutable reference cell -
val ( % ) : overloaded
- Overloaded modulo operator -
val ( &&& ) : overloaded
- Overloaded logical-AND operator -
val ( * ) : overloaded
- Overloaded multiplication operator -
val ( ** ) : overloaded
- Overloaded power operator. -
val ( + ) : overloaded
- Overloaded addition operator -
val ( - ) : overloaded
- Overloaded subtraction operator -
val ( .. ) : overloaded
- The standard overloaded range operator, e.g. [n..m] for lists, seq {n..m} for sequences -
val ( .. .. ) : overloaded
- The standard overloaded skip range operator, e.g. [n..skip..m] for lists, seq {n..skip..m} for sequences -
val ( / ) : overloaded
- Overloaded division operator -
val ( := ) : 'T ref -> 'T -> unit
- Assign to a mutable reference cell -
val ( < ) : 'T -> 'T -> bool
- Structural less-than comparison -
val ( << ) : ('U -> 'V) -> ('T -> 'U) -> ('T -> 'V)
- Compose two functions, the function on the right being applied first -
val ( <<< ) : overloaded
- Overloaded byte-shift left operator by a specified number of bits -
val ( <= ) : 'T -> 'T -> bool
-Structural less-than-or-equal comparison -
val ( <> ) : 'T -> 'T -> bool
-Structural inequality -
val ( <| ) : ('T -> 'U) -> 'T -> 'U
- Apply a function to a value, the value being on the right, the function on the left -
val ( <|| ) : ('T1 -> 'T2 -> 'U) -> 'T1 * 'T2 -> 'U
- Apply a function to two values, the values being a pair on the right, the function on the left -
val ( <||| ) : ('T1 -> 'T2 -> 'T3 -> 'U) -> 'T1 * 'T2 * 'T3 -> 'U
- Apply a function to three values, the values being a triple on the right, the function on the left -
val ( = ) : 'T -> 'T -> bool
-Structural equality -
val ( > ) : 'T -> 'T -> bool
- Structural greater-than -
val ( >= ) : 'T -> 'T -> bool
-Structural greater-than-or-equal -
val ( >> ) : ('T -> 'U) -> ('U -> 'V) -> ('T -> 'V)
- Compose two functions, the function on the left being applied first -
val ( >>> ) : overloaded
- Overloaded byte-shift right operator by a specified number of bits -
val ( @ ) : 'T list -> 'T list -> 'T list
- Concatenate two lists. -
val ( ^ ) : string -> string -> string
- Concatenate two strings. The overlaoded operator '+' may also be used. -
val ( ^^^ ) : overloaded
- Overloaded logical-XOR operator -
val ( |> ) : 'T -> ('T -> 'U) -> 'U
- Apply a function to a value, the value being on the left, the function on the right -
val ( ||> ) : 'T1 * 'T2 -> ('T1 -> 'T2 -> 'U) -> 'U
- Apply a function to two values, the values being a pair on the left, the function on the right -
val ( ||| ) : overloaded
- Overloaded logical-OR operator -
val ( |||> ) : 'T1 * 'T2 * 'T3 -> ('T1 -> 'T2 -> 'T3 -> 'U) -> 'U
- Apply a function to three values, the values being a triple on the left, the function on the right -
val ( ~+ ) : overloaded
- Overloaded prefix=plus operator -
val ( ~- ) : overloaded
- Overloaded unary negation. -
val ( ~~~ ) : overloaded
- Overloaded logical-NOT operator -
val abs : overloaded
- Absolute value of the given number -
val acos : overloaded
- Inverse cosine of the given number -
val asin : overloaded
- Inverse sine of the given number -
val atan : overloaded
- Inverse tangent of the given number -
val atan2 : overloaded
- Inverse tangent of x/y where x and y are specified separately -
val box : 'T -> obj
- Boxes a strongly typed value. -
val byte : overloaded
- Converts the argument to byte. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Byte.Parse() on strings and otherwise requires a ToByte method on the input type -
val ceil : overloaded
- Ceiling of the given number -
val char : overloaded
- Converts the argument to character. Numeric inputs are converted according to the UTF-16 - encoding for characters. String inputs must be exactly one character long. - For other types a static member ToChar must exist on the type. -
val compare : 'T -> 'T -> int
- Generic comparison -
val cos : overloaded
- Cosine of the given number -
val cosh : overloaded
- Hyperbolic cosine of the given number -
val decimal : overloaded
- Converts the argument to System.Decimal using a direct conversion for all - primitive numeric types and requiring a ToDecimal method otherwise -
val decr : int ref -> unit
- Decrement a mutable reference cell containing an integer -
val defaultArg : 'T option -> 'T -> 'T
- Used to specify a default value for an optional argument in the implementation of a function -
val double : overloaded
- Converts the argument to 64-bit float. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type -
val enum : int32 -> 'U (requires enum)
- Converts the argument to a particular enum type. -
val exit : int -> 'T
- Exit the current hardware isolated process, if security settings permit, - otherwise raise an exception. Calls System.Environment.Exit. -
val exp : overloaded
- Exponential of the given number -
val failwith : string -> 'T
- Throw a FailureException exception -
val float : overloaded
- Converts the argument to 64-bit float. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type -
val float32 : overloaded
- Converts the argument to 32-bit float. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type -
val floor : overloaded
- Floor of the given number -
val fst : ('T1 * 'T2) -> 'T1
- Return the first element of a tuple, fst (a,b) = a. -
val hash : 'T -> int
- A generic hash function, designed to return equal hash values for items that are - equal according to the "=" operator. By default it will use structural hashing - for F# union, record and tuple types, hashing the complete contents of the - type. The exact behaviour of the function can be adjusted on a - type-by-type basis by implementing GetHashCode for each type. -
val id : 'T -> 'T
- The identity function -
val ignore : 'T -> unit
- Ignore the passed value. This is often used to throw away results of a computation. -
val incr : int ref -> unit
- Increment a mutable reference cell containing an integer -
val infinity : float
- Equivalent to System.Double.PositiveInfinity -
val infinityf : float32
- Equivalent to System.Single.PositiveInfinity -
val int : overloaded
- Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Int32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt32 method on the input type -
val int16 : overloaded
- Converts the argument to signed 16-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Int16.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt16 method on the input type -
val int32 : overloaded
- Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Int32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt32 method on the input type -
val int64 : overloaded
- Converts the argument to signed 64-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Int64.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt64 method on the input type -
[<OCamlCompatibilityAttribute ("Consider using 'invalidArg' instead")>]
-val invalid_arg : string -> 'T
val invalidArg : string -> string -> 'T
- Throw an ArgumentException exception -
val invalidOp : string -> 'T
- Throw an InvalidOperationException exception -
val limitedHash : int -> 'T -> int
- A generic hash function. This function has the same behaviour as 'hash', - however the default structural hashing for F# union, record and tuple - types stops when the given limit of nodes is reached. The exact behaviour of - the function can be adjusted on a type-by-type basis by implementing - GetHashCode for each type. -
val lock : 'lock -> (unit -> 'T) -> 'T (requires reference type)
- Execute the function as a mutual-exlcusion region using the input value as a lock. -
val log : overloaded
- Natural logarithm of the given number -
val log10 : overloaded
- Logarithm to base 10 of the given number -
val max : 'T -> 'T -> 'T
- Maximum based on generic comparison -
val min : 'T -> 'T -> 'T
- Minimum based on generic comparison -
val nan : float
- Equivalent to System.Double.NaN -
val nanf : float32
- Equivalent to System.Single.NaN -
val nativeint : overloaded
- Converts the argument to signed native integer. This is a direct conversion for all - primitive numeric types and ToIntPtr method otherwise) -
val not : bool -> bool
- Negate a logical value. not true equals false and not false equals true -
[<OCamlCompatibilityAttribute
-  ("Consider using 'raise (KeyNotFoundException(message))' instead")>]
-val not_found : unit -> 'T
- Throw an KeyNotFoundException exception -
val nullArg : string -> 'T
- Throw an ArgumentNullException exception -
val pown : overloaded
- Overloaded power operator. If n > 0 then equivalent to x*...*x for n occurrences of x. -
val raise : Exception -> 'T
- Raises an exception -
val ref : 'T -> 'T ref
- Create a mutable reference cell -
[<NoDynamicInvocationAttribute ()>]
-val rethrow : unit -> 'T
- Rethrows an exception. This should only be used when handling an exception -
val round : overloaded
- Round the given number -
val sbyte : overloaded
- Converts the argument to signed byte. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using SByte.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSByte method on the input type -
val sign : overloaded
- Sign of the given number -
val sin : overloaded
- Sine of the given number -
val single : overloaded
- Converts the argument to 32-bit float. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type -
val sinh : overloaded
- Hyperbolic sine of the given number -
[<RequiresExplicitTypeArgumentsAttribute ()>]
-val sizeof<'T> : int
- Returns the internal size of a type in bytes. For example, sizeof<int> returns 4. -
val snd : ('T1 * 'T2) -> 'T2
- Return the second element of a tuple, snd (a,b) = b. -
val sqrt : overloaded
- Square root of the given number -
val stderr<'T> : TextWriter
- Reads the value of the property System.Console.Error. -
val stdin<'T> : TextReader
- Reads the value of the property System.Console.In. -
val stdout<'T> : TextWriter
- Reads the value of the property System.Console.Out. -
val string : 'T -> string
- Converts the argument to a string using ToString. - For standard integer and floating point values the ToString conversion uses CultureInfo.InvariantCulture. - Note, native integer ToString does not support specifying CultureInfo. -
val tan : overloaded
- Tangent of the given number -
val tanh : overloaded
- Hyperbolic tangent of the given number -
val truncate : overloaded
- Overloaded truncate operator. -
[<RequiresExplicitTypeArgumentsAttribute ()>]
-val typedefof<'T> : Type
- Generate a System.Type representation for a type definition. If the - input type is a generic type instantiation then return the - generic type definition associated with all such instantiations. -
[<RequiresExplicitTypeArgumentsAttribute ()>]
-val typeof<'T> : Type
- Generate a System.Type runtime represenation of a static type. - The static type is still maintained on the value returned. -
val uint16 : overloaded
- Converts the argument to unsigned 16-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using UInt16.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt16 method on the input type -
val uint32 : overloaded
- Converts the argument to unsigned 32-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using UInt32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt32 method on the input type -
val uint64 : overloaded
- Converts the argument to unsigned 64-bit integer. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using UInt64.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt64 method on the input type -
val unativeint : overloaded
- Converts the argument to unsigned native integer using a direct conversion for all - primitive numeric types and requiring a ToUintPtr method otherwise -
val unbox : obj -> 'T
- Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a. -
val using : 'T -> ('T -> 'U) -> 'U (requires 'T :> IDisposable)
- Clean up resources associated with the input object after the completion of the given function. - Cleanup occurs even when an exception is raised by the protected - code. -
-
-

Active Patterns

- - - - -
Active PatternDescription
val ( |KeyValue| ) : KeyValuePair<'T,'U> -> 'T * 'U
- An active pattern to match values of type System.Collections.Generic.KeyValuePair -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Option.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Option.html deleted file mode 100644 index 084ff9db..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.Option.html +++ /dev/null @@ -1,50 +0,0 @@ -Microsoft.FSharp.Core.Option -
-
-

[Home] Module Microsoft.FSharp.Core.Option


-
-
- - - -
- Basic operations on options. - -

Values

- - - - - - - - - - - - - - - - -
ValueDescription
val bind : ('T -> 'U option) -> 'T option -> 'U option
bind f inp evaluates to match inp with None -> None | Some x -> f x
val count : 'T option -> int
length inp evaluates to match inp with None -> 0 | Some _ -> 1
val exists : ('T -> bool) -> 'T option -> bool
exists p inp evaluates to match inp with None -> false | Some x -> p x
val fold : ('State -> 'T -> 'State) -> 'State -> 'T option -> 'State
fold_left f s inp evaluates to match inp with None -> s | Some x -> f s x
val foldBack : ('T -> 'State -> 'State) -> 'T option -> 'State -> 'State
fold_right f inp s evaluates to "match inp with None -> s | Some x -> f x s"
val forall : ('T -> bool) -> 'T option -> bool
forall p inp" evaluates to "match inp with None -> true | Some x -> p x
val get : 'T option -> 'T
- Gets the value associated with the option. If the option is None then - raises ArgumentException -
val isNone : 'T option -> bool
- Returns true if the option is None -
val isSome : 'T option -> bool
- Returns true if the option is not None -
val iter : ('T -> unit) -> 'T option -> unit
iter f inp executes match inp with None -> () | Some x -> f x
val map : ('T -> 'U) -> 'T option -> 'U option
map f inp evaluates to match inp with None -> None | Some x -> Some (f x)
val to_array : 'T option -> 'T array
- Convert the option to an array of length 0 or 1 -
val to_list : 'T option -> 'T list
- Convert the option to a list of length 0 or 1 -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.String.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.String.html deleted file mode 100644 index c0d727c8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.String.html +++ /dev/null @@ -1,69 +0,0 @@ -Microsoft.FSharp.Core.String -
-
-

[Home] Module Microsoft.FSharp.Core.String


-
-
- - - -
- Functional programming operators for string processing. Further string operations - are available via the member functions on strings and other functionality in - System.String - and System.Text.RegularExpressions types. - -

Values

- - - - - - - - - - - - - - -
ValueDescription
val collect : (char -> string) -> string -> string
- Build a new string whose characters are the results of applying the function mapping - to each of the characters of the input string and concatenating the resulting - strings. -
val concat : string -> seq<string> -> string
- Return a new string made by concatenating the given strings - with separator 'sep', i.e. 'a1 + sep + ... + sep + aN' -
val exists : (char -> bool) -> string -> bool
- Test if any character of the string satisfies the given predicate. -
val forall : (char -> bool) -> string -> bool
- Test if all characters in the string satisfy the given predicate. -
val init : int -> (int -> string) -> string
- Build a new string whose characters are the results of applying the function mapping - to each index from 0 to count-1 and concatenating the resulting - strings. -
val iter : (char -> unit) -> string -> unit
- Apply the function action to each character in the string. -
val iteri : (int -> char -> unit) -> string -> unit
- Apply the function action to the index of each character in the string and the character itself. -
val length : string -> int
- Return the length of the string. -
val map : (char -> char) -> string -> string
- Build a new string whose characters are the results of applying the function mapping - to each of the characters of the input string. -
val mapi : (int -> char -> char) -> string -> string
- Build a new string whose characters are the results of applying the function mapping - to each character in the string and the character itself. -
val replicate : int -> string -> string
- Return a string by concatenating count instances of str. -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.html deleted file mode 100644 index e9393ee7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.html +++ /dev/null @@ -1,240 +0,0 @@ -Microsoft.FSharp.Core -
-
-

[Home] Namespace Microsoft.FSharp.Core


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.Core')

- - - - - - - - - -
ModuleDescription
Microsoft.FSharp.Core.ExtraTopLevelOperators -Pervasives: Additional bindings available at the top level -
Microsoft.FSharp.Core.LanguagePrimitives - Language primitives associated with the F# language -
Microsoft.FSharp.Core.NumericLiterals - Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' -
Microsoft.FSharp.Core.Operators - Basic F# Operators. This module is automatically opened in all F# code. -
Microsoft.FSharp.Core.Option - Basic operations on options. -
Microsoft.FSharp.Core.String - Functional programming operators for string processing. Further string operations - are available via the member functions on strings and other functionality in - System.String - and System.Text.RegularExpressions types. -
-
-

Type Definitions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
type array - Single dimensional, zero-based arrays, written 'int[]', 'string[]' etc. - Use the values in the Array module to manipulate values - of this type, or the notation 'arr.[x]' to get/set array - values. - Note: an abbreviation for 'T []
type bool - An abbreviation for the .NET type System.Boolean - Note: an abbreviation for Boolean
type byref - Represents a managed pointer in F# code. -
type byte - An abbreviation for the .NET type System.Byte - Note: an abbreviation for Byte
type char - An abbreviation for the .NET type System.Char - Note: an abbreviation for Char
type decimal - The type of decimal numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Decimal. -
type decimal - An abbreviation for the .NET type System.Decimal - Note: an abbreviation for Decimal
type double - An abbreviation for the .NET type System.Double - Note: an abbreviation for Double
type exn - An abbreviation for the .NET type System.Exception - Note: an abbreviation for Exception
type float - The type of floating point numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Double. -
type float - An abbreviation for the .NET type System.Double - Note: an abbreviation for Double
type float32 - The type of floating point numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Single. -
type float32 - An abbreviation for the .NET type System.Single - Note: an abbreviation for Single
type FuncConvert - Helper functions for converting F# first class function values to and from .NET representaions - of functions using delegates. -
type ilsigptr - This type is for internal use by the F# code generator -
type int - The type of 32-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Int32. -
type int - An abbreviation for the .NET type System.Int32 - Note: an abbreviation for int32
type int16 - The type of 16-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Int16. -
type int16 - An abbreviation for the .NET type System.Int16 - Note: an abbreviation for Int16
type int32 - An abbreviation for the .NET type System.Int32 - Note: an abbreviation for Int32
type int64 - The type of 64-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Int64. -
type int64 - An abbreviation for the .NET type System.Int64 - Note: an abbreviation for Int64
type int8 - The type of 8-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.SByte. -
type int8 - An abbreviation for the .NET type System.SByte - Note: an abbreviation for SByte
type IStructuralComparable
type IStructuralEquatable
type nativeint - An abbreviation for the .NET type System.IntPtr - Note: an abbreviation for IntPtr
type nativeptr - Represents an unmanaged pointer in F# code. - - This type should only be used when writing F# code that interoperates - with native code. Use of this type in F# code may result in - unverifiable code being generated. Conversions to and from the - nativeint type may be required. Values of this type can be generated - by the functions in the NativeInterop.NativePtr module. -
type obj - An abbreviation for the .NET type System.Object - Note: an abbreviation for Object
type option - The type of optional values. When used from other .NET languages the - empty option is the null value. - - Use the constructors Some and None to create values of this type. - Use the values in the Option module to manipulate values of this type, - or pattern match against the values directly. - - 'None' values will appear as the value null to other .NET languages. - Instance methods on this type will appear as static methods to other .NET languages - due to the use of null as a value representation. - Note: an abbreviation for Option<'T>
type Option - The type of optional values. When used from other .NET languages the - empty option is the null value. - - Use the constructors Some and None to create values of this type. - Use the values in the Option module to manipulate values of this type, - or pattern match against the values directly. - - None values will appear as the value null to other .NET languages. - Instance methods on this type will appear as static methods to other .NET languages - due to the use of null as a value representation. -
type ref - The type of mutable references. Use the functions [:=] and [!] to get and - set values of this type. - Note: an abbreviation for Ref<'T>
type Ref - The type of mutable references. Use the functions [:=] and [!] to get and - set values of this type. -
type sbyte - An abbreviation for the .NET type System.SByte - Note: an abbreviation for SByte
type single - An abbreviation for the .NET type System.Single - Note: an abbreviation for Single
type string - An abbreviation for the .NET type System.String - Note: an abbreviation for String
type uint16 - An abbreviation for the .NET type System.UInt16 - Note: an abbreviation for UInt16
type uint32 - An abbreviation for the .NET type System.UInt32 - Note: an abbreviation for UInt32
type uint64 - An abbreviation for the .NET type System.UInt64 - Note: an abbreviation for UInt64
type uint8 - An abbreviation for the .NET type System.Byte - Note: an abbreviation for Byte
type unativeint - An abbreviation for the .NET type System.UIntPtr - Note: an abbreviation for UIntPtr
type unit - The type 'unit', which has only one value "()". This value is special and - always uses the representation 'null'. - Note: an abbreviation for Unit
-
-

Exceptions

- - - - - - -
ExceptionDescription
exception DynamicInvocationNotSupported - Dynamic invocations of functions marked with the NoDynamicInvocationAttribute attribute raise this exception -
exception Failure - This exception is raised by 'failwith' -
exception MatchFailure - Non-exhaustive match failures will raise the MatchFailure exception -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_DynamicInvocationNotSupported.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_DynamicInvocationNotSupported.html deleted file mode 100644 index 78c7766d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_DynamicInvocationNotSupported.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.DynamicInvocationNotSupported -
-
-

[Home] Exception Microsoft.FSharp.Core.DynamicInvocationNotSupported


-
-
- - - -
- Dynamic invocations of functions marked with the NoDynamicInvocationAttribute attribute raise this exception - -

Full Signature

-
exception DynamicInvocationNotSupported of string
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_Failure.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_Failure.html deleted file mode 100644 index 5e321feb..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_Failure.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.Failure -
-
-

[Home] Exception Microsoft.FSharp.Core.Failure


-
-
- - - -
- This exception is raised by 'failwith' - -

Full Signature

-
exception Failure of string
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_FuncConvert.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_FuncConvert.html deleted file mode 100644 index a9ab67ca..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_FuncConvert.html +++ /dev/null @@ -1,65 +0,0 @@ -Microsoft.FSharp.Core.FuncConvert -
-
-

[Home] Type Microsoft.FSharp.Core.FuncConvert


-
-
- - - -
- Helper functions for converting F# first class function values to and from .NET representaions - of functions using delegates. - -

Full Type Signature

-
[<AbstractClassAttribute (); SealedAttribute ()>]
-type FuncConvert =
-  class
-    static member FuncFromTupled : func:('T -> 'U) -> ('T -> 'U)
-    static member FuncFromTupled : func:('T1 * 'T2 -> 'U) -> ('T1 -> 'T2 -> 'U)
-    static member FuncFromTupled : func:('T1 * 'T2 * 'T3 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'U)
-    static member FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U)
-    static member FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U)
-    static member ToFastFunc : action:Action<'T> -> ('T -> unit)
-    static member ToFastFunc : converter:Converter<'T,'U> -> ('T -> 'U)
-  end
-

Static Members

- - - - - - - - - - -
MemberDescription
member
-  FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'U) ->
-                     ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U)
- A utility funcion to convert function values from tupled to curried form -
member
-  FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 -> 'U) ->
-                     ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U)
- A utility funcion to convert function values from tupled to curried form -
member
-  FuncFromTupled : func:('T1 * 'T2 * 'T3 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'U)
- A utility funcion to convert function values from tupled to curried form -
member FuncFromTupled : func:('T1 * 'T2 -> 'U) -> ('T1 -> 'T2 -> 'U)
- A utility funcion to convert function values from tupled to curried form -
member FuncFromTupled : func:('T -> 'U) -> ('T -> 'U)
- A utility funcion to convert function values from tupled to curried form -
member ToFastFunc : converter:Converter<'T,'U> -> ('T -> 'U)
- Convert the given Converter delegate object to an F# function value -
member ToFastFunc : action:Action<'T> -> ('T -> unit)
- Convert the given Action delegate object to an F# function value -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_IStructuralComparable.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_IStructuralComparable.html deleted file mode 100644 index 1066a253..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_IStructuralComparable.html +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft.FSharp.Core.IStructuralComparable -
-
-

[Home] Type Microsoft.FSharp.Core.IStructuralComparable


-
-
- - - -
-

Full Type Signature

-
type IStructuralComparable =
-  interface
-    abstract member CompareTo : o:obj * comp:IComparer -> int
-  end
-

Instance Members

- - - - -
MemberDescription
member CompareTo : o:obj * comp:IComparer -> int
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_IStructuralEquatable.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_IStructuralEquatable.html deleted file mode 100644 index 86e2bee9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_IStructuralEquatable.html +++ /dev/null @@ -1,32 +0,0 @@ -Microsoft.FSharp.Core.IStructuralEquatable -
-
-

[Home] Type Microsoft.FSharp.Core.IStructuralEquatable


-
-
- - - -
-

Full Type Signature

-
type IStructuralEquatable =
-  interface
-    abstract member Equals : o:obj * comp:IEqualityComparer -> bool
-    abstract member GetHashCode : comp:IEqualityComparer -> int
-  end
-

Instance Members

- - - - - -
MemberDescription
member Equals : o:obj * comp:IEqualityComparer -> bool
member GetHashCode : comp:IEqualityComparer -> int
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_MatchFailure.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_MatchFailure.html deleted file mode 100644 index 167b6e23..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_MatchFailure.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.MatchFailure -
-
-

[Home] Exception Microsoft.FSharp.Core.MatchFailure


-
-
- - - -
- Non-exhaustive match failures will raise the MatchFailure exception - -

Full Signature

-
exception MatchFailure of string * int * int
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_Option-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_Option-1.html deleted file mode 100644 index e54ebca2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_Option-1.html +++ /dev/null @@ -1,72 +0,0 @@ -Microsoft.FSharp.Core.Option -
-
-

[Home] Type Microsoft.FSharp.Core.Option


-
-
- - - -
- The type of optional values. When used from other .NET languages the - empty option is the null value. - - Use the constructors Some and None to create values of this type. - Use the values in the Option module to manipulate values of this type, - or pattern match against the values directly. - - None values will appear as the value null to other .NET languages. - Instance methods on this type will appear as static methods to other .NET languages - due to the use of null as a value representation. - -

Full Type Signature

-
[<DefaultAugmentationAttribute (false);
-  CompilationRepresentationAttribute (enum<CompilationRepresentationFlags> (8))>]
-type Option<'T> =
-  | None
-  | Some of 'T
-  with
-    member IsNone : bool
-    member IsSome : bool
-    [<CompilationRepresentationAttribute (enum<CompilationRepresentationFlags> (2))>]
-    member Value : 'T
-    static member Some : value:'T -> 'T option
-    static member None : 'T option
-  end
-

Instance Members

- - - - - - -
MemberDescription
member IsNone : bool
- Return 'true' if the option is a 'None' value. -
member IsSome : bool
- Return 'true' if the option is a 'Some' value. -
[<CompilationRepresentationAttribute
-  (enum<CompilationRepresentationFlags> (2))>]
-member Value : 'T
- Get the value of a 'Some' option. A NullReferenceException is raised if the option is 'None'. -
-
-

Static Members

- - - - - -
MemberDescription
member None : 'T option
- Create an option value that is a 'None' value. -
member Some : value:'T -> 'T option
- Create an option value that is a 'Some' value. -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_Ref-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_Ref-1.html deleted file mode 100644 index e12a7ac8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type_Ref-1.html +++ /dev/null @@ -1,40 +0,0 @@ -Microsoft.FSharp.Core.Ref -
-
-

[Home] Type Microsoft.FSharp.Core.Ref


-
-
- - - -
- The type of mutable references. Use the functions [:=] and [!] to get and - set values of this type. - -

Full Type Signature

-
type Ref<'T> =
-  {mutable contents: 'T;}
-  with
-    member Value : 'T
-    member Value : 'T with set
-  end
-

Instance Members

- - - - - -
MemberDescription
member Value : 'T
- The current value of the reference cell -
member Value : 'T with set
- The current value of the reference cell -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__array-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__array-1.html deleted file mode 100644 index 2efca433..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__array-1.html +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft.FSharp.Core.array -
-
-

[Home] Type Microsoft.FSharp.Core.array


-
-
- - - -
- Single dimensional, zero-based arrays, written 'int[]', 'string[]' etc. - Use the values in the Array module to manipulate values - of this type, or the notation 'arr.[x]' to get/set array - values. - Note: an abbreviation for 'T [] -

Full Type Signature

-
type 'T array = 'T []
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__bool.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__bool.html deleted file mode 100644 index 49bb6c55..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__bool.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.bool -
-
-

[Home] Type Microsoft.FSharp.Core.bool


-
-
- - - -
- An abbreviation for the .NET type System.Boolean - Note: an abbreviation for Boolean -

Full Type Signature

-
type bool = Boolean
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__byref-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__byref-1.html deleted file mode 100644 index 3a1b0ff1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__byref-1.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.byref -
-
-

[Home] Type Microsoft.FSharp.Core.byref


-
-
- - - -
- Represents a managed pointer in F# code. - -

Full Type Signature

-
type 'T byref = (# "" #)
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__byte.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__byte.html deleted file mode 100644 index 7bcd4722..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__byte.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.byte -
-
-

[Home] Type Microsoft.FSharp.Core.byte


-
-
- - - -
- An abbreviation for the .NET type System.Byte - Note: an abbreviation for Byte -

Full Type Signature

-
type byte = Byte
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__char.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__char.html deleted file mode 100644 index 4d26d67a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__char.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.char -
-
-

[Home] Type Microsoft.FSharp.Core.char


-
-
- - - -
- An abbreviation for the .NET type System.Char - Note: an abbreviation for Char -

Full Type Signature

-
type char = Char
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__decimal-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__decimal-1.html deleted file mode 100644 index 3053a87a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__decimal-1.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Core.decimal -
-
-

[Home] Type Microsoft.FSharp.Core.decimal


-
-
- - - -
- The type of decimal numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Decimal. - -

Full Type Signature

-
[<MeasureAnnotatedAbbreviationAttribute ()>]
-type decimal<[] 'U> = decimal
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__decimal.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__decimal.html deleted file mode 100644 index 1bde6468..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__decimal.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.decimal -
-
-

[Home] Type Microsoft.FSharp.Core.decimal


-
-
- - - -
- An abbreviation for the .NET type System.Decimal - Note: an abbreviation for Decimal -

Full Type Signature

-
type decimal = Decimal
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__double.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__double.html deleted file mode 100644 index 5c5e79c0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__double.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.double -
-
-

[Home] Type Microsoft.FSharp.Core.double


-
-
- - - -
- An abbreviation for the .NET type System.Double - Note: an abbreviation for Double -

Full Type Signature

-
type double = Double
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__exn.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__exn.html deleted file mode 100644 index f14d771b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__exn.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.exn -
-
-

[Home] Type Microsoft.FSharp.Core.exn


-
-
- - - -
- An abbreviation for the .NET type System.Exception - Note: an abbreviation for Exception -

Full Type Signature

-
type exn = Exception
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float-1.html deleted file mode 100644 index 3ab6fd80..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float-1.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Core.float -
-
-

[Home] Type Microsoft.FSharp.Core.float


-
-
- - - -
- The type of floating point numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Double. - -

Full Type Signature

-
[<MeasureAnnotatedAbbreviationAttribute ()>]
-type float<[] 'U> = float
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float.html deleted file mode 100644 index fdcc007c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.float -
-
-

[Home] Type Microsoft.FSharp.Core.float


-
-
- - - -
- An abbreviation for the .NET type System.Double - Note: an abbreviation for Double -

Full Type Signature

-
type float = Double
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float32-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float32-1.html deleted file mode 100644 index 648c6e0a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float32-1.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Core.float32 -
-
-

[Home] Type Microsoft.FSharp.Core.float32


-
-
- - - -
- The type of floating point numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Single. - -

Full Type Signature

-
[<MeasureAnnotatedAbbreviationAttribute ()>]
-type float32<[] 'U> = float32
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float32.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float32.html deleted file mode 100644 index 82074ed2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__float32.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.float32 -
-
-

[Home] Type Microsoft.FSharp.Core.float32


-
-
- - - -
- An abbreviation for the .NET type System.Single - Note: an abbreviation for Single -

Full Type Signature

-
type float32 = Single
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__ilsigptr-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__ilsigptr-1.html deleted file mode 100644 index 594f6445..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__ilsigptr-1.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.ilsigptr -
-
-

[Home] Type Microsoft.FSharp.Core.ilsigptr


-
-
- - - -
- This type is for internal use by the F# code generator - -

Full Type Signature

-
type 'T ilsigptr = (# "" #)
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int-1.html deleted file mode 100644 index 101ad312..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int-1.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Core.int -
-
-

[Home] Type Microsoft.FSharp.Core.int


-
-
- - - -
- The type of 32-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Int32. - -

Full Type Signature

-
[<MeasureAnnotatedAbbreviationAttribute ()>]
-type int<[] 'U> = int
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int.html deleted file mode 100644 index ed04ece3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.int -
-
-

[Home] Type Microsoft.FSharp.Core.int


-
-
- - - -
- An abbreviation for the .NET type System.Int32 - Note: an abbreviation for int32 -

Full Type Signature

-
type int = int32
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int16-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int16-1.html deleted file mode 100644 index c5d3c44c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int16-1.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Core.int16 -
-
-

[Home] Type Microsoft.FSharp.Core.int16


-
-
- - - -
- The type of 16-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Int16. - -

Full Type Signature

-
[<MeasureAnnotatedAbbreviationAttribute ()>]
-type int16<[] 'U> = int16
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int16.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int16.html deleted file mode 100644 index 7c8715a4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int16.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.int16 -
-
-

[Home] Type Microsoft.FSharp.Core.int16


-
-
- - - -
- An abbreviation for the .NET type System.Int16 - Note: an abbreviation for Int16 -

Full Type Signature

-
type int16 = Int16
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int32.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int32.html deleted file mode 100644 index 3b1eafc5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int32.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.int32 -
-
-

[Home] Type Microsoft.FSharp.Core.int32


-
-
- - - -
- An abbreviation for the .NET type System.Int32 - Note: an abbreviation for Int32 -

Full Type Signature

-
type int32 = Int32
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int64-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int64-1.html deleted file mode 100644 index 713b0390..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int64-1.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Core.int64 -
-
-

[Home] Type Microsoft.FSharp.Core.int64


-
-
- - - -
- The type of 64-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.Int64. - -

Full Type Signature

-
[<MeasureAnnotatedAbbreviationAttribute ()>]
-type int64<[] 'U> = int64
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int64.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int64.html deleted file mode 100644 index 897c4495..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int64.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.int64 -
-
-

[Home] Type Microsoft.FSharp.Core.int64


-
-
- - - -
- An abbreviation for the .NET type System.Int64 - Note: an abbreviation for Int64 -

Full Type Signature

-
type int64 = Int64
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int8-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int8-1.html deleted file mode 100644 index 080e906c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int8-1.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Core.int8 -
-
-

[Home] Type Microsoft.FSharp.Core.int8


-
-
- - - -
- The type of 8-bit signed integer numbers, annotated with a unit of measure. The unit - of measure is erased in compiled code and when values of this type - are analyzed using reflection. The type is representationally equivalent to - System.SByte. - -

Full Type Signature

-
[<MeasureAnnotatedAbbreviationAttribute ()>]
-type int8<[] 'U> = int8
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int8.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int8.html deleted file mode 100644 index 3fb5c84b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__int8.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.int8 -
-
-

[Home] Type Microsoft.FSharp.Core.int8


-
-
- - - -
- An abbreviation for the .NET type System.SByte - Note: an abbreviation for SByte -

Full Type Signature

-
type int8 = SByte
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__nativeint.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__nativeint.html deleted file mode 100644 index ef274933..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__nativeint.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.nativeint -
-
-

[Home] Type Microsoft.FSharp.Core.nativeint


-
-
- - - -
- An abbreviation for the .NET type System.IntPtr - Note: an abbreviation for IntPtr -

Full Type Signature

-
type nativeint = IntPtr
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__nativeptr-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__nativeptr-1.html deleted file mode 100644 index d0a29f80..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__nativeptr-1.html +++ /dev/null @@ -1,28 +0,0 @@ -Microsoft.FSharp.Core.nativeptr -
-
-

[Home] Type Microsoft.FSharp.Core.nativeptr


-
-
- - - -
- Represents an unmanaged pointer in F# code. - - This type should only be used when writing F# code that interoperates - with native code. Use of this type in F# code may result in - unverifiable code being generated. Conversions to and from the - nativeint type may be required. Values of this type can be generated - by the functions in the NativeInterop.NativePtr module. - -

Full Type Signature

-
type nativeptr<'T> = (# "" #)
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__obj.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__obj.html deleted file mode 100644 index 587d8d3d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__obj.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.obj -
-
-

[Home] Type Microsoft.FSharp.Core.obj


-
-
- - - -
- An abbreviation for the .NET type System.Object - Note: an abbreviation for Object -

Full Type Signature

-
type obj = Object
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__option-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__option-1.html deleted file mode 100644 index ec26a3e7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__option-1.html +++ /dev/null @@ -1,31 +0,0 @@ -Microsoft.FSharp.Core.option -
-
-

[Home] Type Microsoft.FSharp.Core.option


-
-
- - - -
- The type of optional values. When used from other .NET languages the - empty option is the null value. - - Use the constructors Some and None to create values of this type. - Use the values in the Option module to manipulate values of this type, - or pattern match against the values directly. - - 'None' values will appear as the value null to other .NET languages. - Instance methods on this type will appear as static methods to other .NET languages - due to the use of null as a value representation. - Note: an abbreviation for Option<'T> -

Full Type Signature

-
type 'T option = Option<'T>
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__ref-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__ref-1.html deleted file mode 100644 index e4362253..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__ref-1.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Core.ref -
-
-

[Home] Type Microsoft.FSharp.Core.ref


-
-
- - - -
- The type of mutable references. Use the functions [:=] and [!] to get and - set values of this type. - Note: an abbreviation for Ref<'T> -

Full Type Signature

-
type 'T ref = Ref<'T>
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__sbyte.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__sbyte.html deleted file mode 100644 index 2295282e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__sbyte.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.sbyte -
-
-

[Home] Type Microsoft.FSharp.Core.sbyte


-
-
- - - -
- An abbreviation for the .NET type System.SByte - Note: an abbreviation for SByte -

Full Type Signature

-
type sbyte = SByte
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__single.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__single.html deleted file mode 100644 index 2a44154d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__single.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.single -
-
-

[Home] Type Microsoft.FSharp.Core.single


-
-
- - - -
- An abbreviation for the .NET type System.Single - Note: an abbreviation for Single -

Full Type Signature

-
type single = Single
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__string.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__string.html deleted file mode 100644 index 9c21a3cf..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__string.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.string -
-
-

[Home] Type Microsoft.FSharp.Core.string


-
-
- - - -
- An abbreviation for the .NET type System.String - Note: an abbreviation for String -

Full Type Signature

-
type string = String
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint16.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint16.html deleted file mode 100644 index 5ed2ed15..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint16.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.uint16 -
-
-

[Home] Type Microsoft.FSharp.Core.uint16


-
-
- - - -
- An abbreviation for the .NET type System.UInt16 - Note: an abbreviation for UInt16 -

Full Type Signature

-
type uint16 = UInt16
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint32.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint32.html deleted file mode 100644 index 1785286c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint32.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.uint32 -
-
-

[Home] Type Microsoft.FSharp.Core.uint32


-
-
- - - -
- An abbreviation for the .NET type System.UInt32 - Note: an abbreviation for UInt32 -

Full Type Signature

-
type uint32 = UInt32
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint64.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint64.html deleted file mode 100644 index 02697797..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint64.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.uint64 -
-
-

[Home] Type Microsoft.FSharp.Core.uint64


-
-
- - - -
- An abbreviation for the .NET type System.UInt64 - Note: an abbreviation for UInt64 -

Full Type Signature

-
type uint64 = UInt64
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint8.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint8.html deleted file mode 100644 index 542cdd83..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__uint8.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.uint8 -
-
-

[Home] Type Microsoft.FSharp.Core.uint8


-
-
- - - -
- An abbreviation for the .NET type System.Byte - Note: an abbreviation for Byte -

Full Type Signature

-
type uint8 = Byte
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__unativeint.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__unativeint.html deleted file mode 100644 index dcbbaaad..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__unativeint.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.unativeint -
-
-

[Home] Type Microsoft.FSharp.Core.unativeint


-
-
- - - -
- An abbreviation for the .NET type System.UIntPtr - Note: an abbreviation for UIntPtr -

Full Type Signature

-
type unativeint = UIntPtr
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__unit.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__unit.html deleted file mode 100644 index 18de38f8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Core.type__unit.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Core.unit -
-
-

[Home] Type Microsoft.FSharp.Core.unit


-
-
- - - -
- The type 'unit', which has only one value "()". This value is special and - always uses the representation 'null'. - Note: an abbreviation for Unit -

Full Type Signature

-
type unit = Unit
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Math.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Math.html deleted file mode 100644 index 5acb6fdd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Math.html +++ /dev/null @@ -1,28 +0,0 @@ -Microsoft.FSharp.Math -
-
-

[Home] Namespace Microsoft.FSharp.Math


-
-
- - - -
-

Type Definitions

- - - - - -
TypeDescription
type bigint Note: an abbreviation for BigInt
type BigInt - The type of arbitrary-sized integers -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Math.type_BigInt.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Math.type_BigInt.html deleted file mode 100644 index 1692d5fb..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Math.type_BigInt.html +++ /dev/null @@ -1,169 +0,0 @@ -Microsoft.FSharp.Math.BigInt -
-
-

[Home] Type Microsoft.FSharp.Math.BigInt


-
-
- - - -
- The type of arbitrary-sized integers - -

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type BigInt =
-  struct
-    interface IComparable
-    new : x:int -> BigInt
-    new : x:int64 -> BigInt
-    override Equals : obj -> bool
-    override GetHashCode : unit -> int
-    override ToString : unit -> string
-    member IsOne : bool
-    member IsZero : bool
-    member Sign : int
-    static member Abs : x:BigInt -> BigInt
-    static member DivRem : x:BigInt * y:BigInt -> BigInt * BigInt
-    static member Factorial : x:BigInt -> BigInt
-    static member Gcd : x:BigInt * y:BigInt -> BigInt
-    static member Parse : text:string -> BigInt
-    static member Pow : x:BigInt * y:BigInt -> BigInt
-    static member ToDouble : x:BigInt -> float
-    static member ToInt32 : x:BigInt -> int32
-    static member ToInt64 : x:BigInt -> int64
-    static member One : BigInt
-    static member Zero : BigInt
-    static member ( + ) : x:BigInt * y:BigInt -> BigInt
-    static member ( / ) : x:BigInt * y:BigInt -> BigInt
-    static member ( = ) : x:BigInt * y:BigInt -> bool
-    static member ( > ) : x:BigInt * y:BigInt -> bool
-    static member ( >= ) : x:BigInt * y:BigInt -> bool
-    static member op_Inequality : x:BigInt * y:BigInt -> bool
-    static member ( < ) : x:BigInt * y:BigInt -> bool
-    static member ( <= ) : x:BigInt * y:BigInt -> bool
-    static member ( % ) : x:BigInt * y:BigInt -> BigInt
-    static member ( * ) : x:BigInt * y:BigInt -> BigInt
-    static member ( .. ) : start:BigInt * finish:BigInt -> seq<BigInt>
-    static member ( .. .. ) : start:BigInt * step:BigInt * finish:BigInt -> seq<BigInt>
-    static member ( - ) : x:BigInt * y:BigInt -> BigInt
-    static member ( ~- ) : x:BigInt -> BigInt
-    static member ( ~+ ) : x:BigInt -> BigInt
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
override Equals : obj -> bool
override GetHashCode : unit -> int
member IsOne : bool
- Return true if a big integer is 'one' -
member IsZero : bool
- Return true if a big integer is 'zero' -
member Sign : int
- Return the sign of a big integer: 0, +1 or -1 -
override ToString : unit -> string
-
-

Static Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member ( % ) : x:BigInt * y:BigInt -> BigInt
- Return the modulus of big integers -
member ( * ) : x:BigInt * y:BigInt -> BigInt
- Return the product of big integers -
member ( + ) : x:BigInt * y:BigInt -> BigInt
- Return the sum of two big integers -
member ( - ) : x:BigInt * y:BigInt -> BigInt
- Return the difference of big integers -
member ( .. ) : start:BigInt * finish:BigInt -> seq<BigInt>
- Generate a range of big integers -
member
-  ( .. .. ) : start:BigInt * step:BigInt * finish:BigInt -> seq<BigInt>
- Generate a range of big integers, with a step -
new : x:int64 -> BigInt
- Construct a BigInt value for the given 64-bit integer -
new : x:int -> BigInt
- Construct a BigInt value for the given integer -
member ( / ) : x:BigInt * y:BigInt -> BigInt
- Return the ratio of big integers -
member ( < ) : x:BigInt * y:BigInt -> bool
- This operator is for use from other .NET languages -
member ( <= ) : x:BigInt * y:BigInt -> bool
- This operator is for use from other .NET languages -
member ( = ) : x:BigInt * y:BigInt -> bool
- This operator is for use from other .NET languages -
member ( > ) : x:BigInt * y:BigInt -> bool
- This operator is for use from other .NET languages -
member ( >= ) : x:BigInt * y:BigInt -> bool
- This operator is for use from other .NET languages -
member ( ~+ ) : x:BigInt -> BigInt
- Return the given big integer -
member ( ~- ) : x:BigInt -> BigInt
- Return the negation of a big integer -
member Abs : x:BigInt -> BigInt
- Compute the absolute value of a big integer -
member DivRem : x:BigInt * y:BigInt -> BigInt * BigInt
- Compute the ratio and remainder of two big integers -
member Factorial : x:BigInt -> BigInt
- Compute the factorial function as a big integer -
member Gcd : x:BigInt * y:BigInt -> BigInt
- Return the greatest common divisor of two big integers -
member One : BigInt
- Get the big integer for one -
member op_Inequality : x:BigInt * y:BigInt -> bool
- This operator is for use from other .NET languages -
member Parse : text:string -> BigInt
- Parse a big integer from a string format -
member Pow : x:BigInt * y:BigInt -> BigInt
- Return n^m for two big integers -
member ToDouble : x:BigInt -> float
- Convert a big integer to a floating point number -
member ToInt32 : x:BigInt -> int32
- Convert a big integer to a 32-bit signed integer -
member ToInt64 : x:BigInt -> int64
- Convert a big integer to a 64-bit signed integer -
member Zero : BigInt
- Get the big integer for zero -
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Math.type__bigint.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Math.type__bigint.html deleted file mode 100644 index 7590df08..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Math.type__bigint.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Math.bigint -
-
-

[Home] Type Microsoft.FSharp.Math.bigint


-
-
- - - -
Note: an abbreviation for BigInt -

Full Type Signature

-
type bigint = BigInt
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.NativeInterop.NativePtr.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.NativeInterop.NativePtr.html deleted file mode 100644 index b25dd49d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.NativeInterop.NativePtr.html +++ /dev/null @@ -1,66 +0,0 @@ -Microsoft.FSharp.NativeInterop.NativePtr -
-
-

[Home] Module Microsoft.FSharp.NativeInterop.NativePtr


-
-
- - - -
- Contains operations on native pointers. Use of these operators may - result in the generation of unverifiable code. - -

Values

- - - - - - - - - - - - -
ValueDescription
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val add : nativeptr<'T> -> int -> nativeptr<'T>
- Return a typed native pointer by adding index * sizeof<'T> to the - given input pointer -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val get : nativeptr<'T> -> int -> 'T
- Dereference the typed native pointer computed by adding index * sizeof<'T> to the - given input pointer -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val of_array : 'T [] -> int -> nativeptr<'T>
- Get the address of an element of a pinned array -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val of_array2 : 'T [,] -> int -> int -> nativeptr<'T>
- Get the address of an element of a pinned 2-dimensional array -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val of_nativeint : nativeint -> nativeptr<'T>
- Return a typed native pointer for a given machine address -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val read : nativeptr<'T> -> 'T
- Dereference the given typed native pointer -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val set : nativeptr<'T> -> int -> 'T -> unit
- Assign the value into the memory location referenced by the typed native - pointer computed by adding index * sizeof<'T> to the given input pointer -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val to_nativeint : nativeptr<'T> -> nativeint
- Return a machine address for a given typed native pointer -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val write : nativeptr<'T> -> 'T -> unit
- Assign the value into the memory location referenced by the given typed native pointer -
-
-
-

See Also

-Microsoft.FSharp.NativeInterop
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.NativeInterop.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.NativeInterop.html deleted file mode 100644 index ced155c6..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.NativeInterop.html +++ /dev/null @@ -1,28 +0,0 @@ -Microsoft.FSharp.NativeInterop -
-
-

[Home] Namespace Microsoft.FSharp.NativeInterop


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.Core')

- - - - -
ModuleDescription
Microsoft.FSharp.NativeInterop.NativePtr - Contains operations on native pointers. Use of these operators may - result in the generation of unverifiable code. -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.DerivedPatterns.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.DerivedPatterns.html deleted file mode 100644 index 801a5b79..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.DerivedPatterns.html +++ /dev/null @@ -1,92 +0,0 @@ -Microsoft.FSharp.Quotations.DerivedPatterns -
-
-

[Home] Module Microsoft.FSharp.Quotations.DerivedPatterns


-
-
- - - -
- Contains a set of derived F# active patterns to analyze F# expression objects - -

Active Patterns

- - - - - - - - - - - - - - - - - - - - - - - - - -
Active PatternDescription
val ( |AndAlso|_| ) : Expr -> (Expr * Expr) option
- An active pattern to recognize expressions of the form a && b -
val ( |Applications|_| ) : Expr -> (Expr * Expr list list) option
- An active pattern to recognize expressions that represent the application of a (possibly curried or tupled) first class function value -
val ( |Bool|_| ) : Expr -> bool option
- An active pattern to recognize constant boolean expressions -
val ( |Byte|_| ) : Expr -> byte option
- An active pattern to recognize constant byte expressions -
val ( |Char|_| ) : Expr -> char option
- An active pattern to recognize constant unicode character expressions -
val ( |Double|_| ) : Expr -> float option
- An active pattern to recognize constant 64-bit floating point number expressions -
val ( |Int16|_| ) : Expr -> int16 option
- An active pattern to recognize constant int16 expressions -
val ( |Int32|_| ) : Expr -> int32 option
- An active pattern to recognize constant int32 expressions -
val ( |Int64|_| ) : Expr -> int64 option
- An active pattern to recognize constant int64 expressions -
val ( |Lambdas|_| ) : Expr -> (Var list list * Expr) option
- An active pattern to recognize expressions that represent a (possibly curried or tupled) first class function value -
val ( |MethodWithReflectedDefinition|_| ) : MethodBase -> Expr option
- An active pattern to recognize methods that have an associated ReflectedDefinition -
val ( |OrElse|_| ) : Expr -> (Expr * Expr) option
- An active pattern to recognize expressions of the form a || b -
val ( |PropertyGetterWithReflectedDefinition|_| ) : PropertyInfo -> Expr option
- An active pattern to recognize property getters or values in modules that have an associated ReflectedDefinition -
val ( |PropertySetterWithReflectedDefinition|_| ) : PropertyInfo -> Expr option
- An active pattern to recognize property setters that have an associated ReflectedDefinition -
val ( |SByte|_| ) : Expr -> sbyte option
- An active pattern to recognize constant signed byte expressions -
val ( |Single|_| ) : Expr -> float32 option
- An active pattern to recognize constant 32-bit floating point number expressions -
val ( |SpecificCall|_| ) : Expr -> (Expr -> (Type list * Expr list) option)
- A parameterized active pattern to recognize calls to a specified function or method -
val ( |String|_| ) : Expr -> string option
- An active pattern to recognize constant string expressions -
val ( |UInt16|_| ) : Expr -> uint16 option
- An active pattern to recognize constant unsigned int16 expressions -
val ( |UInt32|_| ) : Expr -> uint32 option
- An active pattern to recognize constant unsigned int32 expressions -
val ( |UInt64|_| ) : Expr -> uint64 option
- An active pattern to recognize constant unsigned int64 expressions -
val ( |Unit|_| ) : Expr -> unit option
- An active pattern to recognize () constant expressions -
-
-
-

See Also

-Microsoft.FSharp.Quotations
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.ExprShape.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.ExprShape.html deleted file mode 100644 index e11f5bc1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.ExprShape.html +++ /dev/null @@ -1,40 +0,0 @@ -Microsoft.FSharp.Quotations.ExprShape -
-
-

[Home] Module Microsoft.FSharp.Quotations.ExprShape


-
-
- - - -
- Active patterns for traversing, visiting, rebuilding and tranforming expressions in a generic way - -

Values

- - - - -
ValueDescription
val RebuildShapeCombination : obj * Expr list -> Expr
- Re-build combination expressions. The first parameter should be an object - returned by the ShapeCombination case of the active pattern in this module. -
-
-

Active Patterns

- - - - -
Active PatternDescription
val ( |ShapeVar|ShapeLambda|ShapeCombination| ) :
-  Expr -> Choice<Var,(Var * Expr),(obj * Expr list)>
- An active pattern that performs a complete decomposition viewing the expression tree as a binding structure -
-
-
-

See Also

-Microsoft.FSharp.Quotations
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.Patterns.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.Patterns.html deleted file mode 100644 index 14fc2f10..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.Patterns.html +++ /dev/null @@ -1,123 +0,0 @@ -Microsoft.FSharp.Quotations.Patterns -
-
-

[Home] Module Microsoft.FSharp.Quotations.Patterns


-
-
- - - -
- Contains a set of primitive F# active patterns to analyze F# expression objects - -

Active Patterns

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Active PatternDescription
val ( |AddressOf|_| ) : Expr -> Expr option
- An active pattern to recognize expressions that represent getting the address of a value -
val ( |AddressSet|_| ) : Expr -> (Expr * Expr) option
- An active pattern to recognize expressions that represent setting the value held at an address -
val ( |Application|_| ) : Expr -> (Expr * Expr) option
- An active pattern to recognize expressions that represent applications of first class function values -
val ( |Call|_| ) : Expr -> (Expr option * MethodInfo * Expr list) option
- An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules -
val ( |Coerce|_| ) : Expr -> (Expr * Type) option
- An active pattern to recognize expressions that represent coercions from one type to another -
val ( |DefaultValue|_| ) : Expr -> Type option
- An active pattern to recognize expressions that represent invocations of a default constructor of a struct -
val ( |FieldGet|_| ) : Expr -> (Expr option * FieldInfo) option
- An active pattern to recognize expressions that represent getting a static or instance field -
val ( |FieldSet|_| ) : Expr -> (Expr option * FieldInfo * Expr) option
- An active pattern to recognize expressions that represent setting a static or instance field -
val ( |ForIntegerRangeLoop|_| ) : Expr -> (Var * Expr * Expr * Expr) option
- An active pattern to recognize expressions that represent loops over integer ranges -
val ( |IfThenElse|_| ) : Expr -> (Expr * Expr * Expr) option
- An active pattern to recognize expressions that represent conditionals -
val ( |Lambda|_| ) : Expr -> (Var * Expr) option
- An active pattern to recognize expressions that represent first class function values -
val ( |LetRec|_| ) : Expr -> ((Var * Expr) list * Expr) option
- An active pattern to recognize expressions that represent recursive let bindings of one or more variables -
val ( |Let|_| ) : Expr -> (Var * Expr * Expr) option
- An active pattern to recognize expressions that represent let bindings -
val ( |NewArray|_| ) : Expr -> (Type * Expr list) option
- An active pattern to recognize expressions that represent the construction of arrays -
val ( |NewDelegate|_| ) : Expr -> (Type * Var list * Expr) option
- An active pattern to recognize expressions that represent construction of delegate values -
val ( |NewObject|_| ) : Expr -> (ConstructorInfo * Expr list) option
- An active pattern to recognize expressions that represent invocation of object constructors -
val ( |NewRecord|_| ) : Expr -> (Type * Expr list) option
- An active pattern to recognize expressions that represent construction of record values -
val ( |NewTuple|_| ) : Expr -> Expr list option
- An active pattern to recognize expressions that represent construction of tuple values -
val ( |NewUnionCase|_| ) : Expr -> (UnionCaseInfo * Expr list) option
- An active pattern to recognize expressions that represent construction of particular union case values -
val ( |PropGet|_| ) : Expr -> (Expr option * PropertyInfo * Expr list) option
- An active pattern to recognize expressions that represent the read of a static or instance property, or a non-function value declared in a module -
val ( |PropSet|_| ) :
-  Expr -> (Expr option * PropertyInfo * Expr list * Expr) option
- An active pattern to recognize expressions that represent setting a static or instance property, or a non-function value declared in a module -
val ( |Quote|_| ) : Expr -> Expr option
- An active pattern to recognize expressions that represent a nested quotation literal -
val ( |Sequential|_| ) : Expr -> (Expr * Expr) option
- An active pattern to recognize expressions that represent sequential exeuction of one expression followed by another -
val ( |TryFinally|_| ) : Expr -> (Expr * Expr) option
- An active pattern to recognize expressions that represent a try/finally construct -
val ( |TryWith|_| ) : Expr -> (Expr * Var * Expr * Var * Expr) option
- An active pattern to recognize expressions that represent a try/with construct for exception filtering and catching -
val ( |TupleGet|_| ) : Expr -> (Expr * int) option
- An active pattern to recognize expressions that represent getting a tuple field -
val ( |TypeTest|_| ) : Expr -> (Expr * Type) option
- An active pattern to recognize expressions that represent a dynamic type test -
val ( |UnionCaseTest|_| ) : Expr -> (Expr * UnionCaseInfo) option
- An active pattern to recognize expressions that represent a test if a value is of a particular union case -
val ( |Value|_| ) : Expr -> (obj * Type) option
- An active pattern to recognize expressions that represent a constant value -
val ( |VarSet|_| ) : Expr -> (Var * Expr) option
- An active pattern to recognize expressions that represent setting a mutable variable -
val ( |Var|_| ) : Expr -> Var option
- An active pattern to recognize expressions that represent a variable -
val ( |WhileLoop|_| ) : Expr -> (Expr * Expr) option
- An active pattern to recognize expressions that represent while loops -
-
-
-

See Also

-Microsoft.FSharp.Quotations
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.html deleted file mode 100644 index 4cd4b1a9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.html +++ /dev/null @@ -1,49 +0,0 @@ -Microsoft.FSharp.Quotations -
-
-

[Home] Namespace Microsoft.FSharp.Quotations


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.Core')

- - - - - - -
ModuleDescription
Microsoft.FSharp.Quotations.DerivedPatterns - Contains a set of derived F# active patterns to analyze F# expression objects -
Microsoft.FSharp.Quotations.ExprShape - Active patterns for traversing, visiting, rebuilding and tranforming expressions in a generic way -
Microsoft.FSharp.Quotations.Patterns - Contains a set of primitive F# active patterns to analyze F# expression objects -
-
-

Type Definitions

- - - - - - -
TypeDescription
type Expr - Type-carrying quoted expressions. Expressions are generated either - by quotations in source text or programatically -
type Expr - Quoted expressions annotated with System.Type values. -
type Var - Information at the binding site of a variable -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.type_Expr-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.type_Expr-1.html deleted file mode 100644 index 151eea27..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.type_Expr-1.html +++ /dev/null @@ -1,36 +0,0 @@ -Microsoft.FSharp.Quotations.Expr -
-
-

[Home] Type Microsoft.FSharp.Quotations.Expr


-
-
- - - -
- Type-carrying quoted expressions. Expressions are generated either - by quotations in source text or programatically - -

Full Type Signature

-
type Expr<'T> =
-  class
-    inherit Expr
-    member Raw : Expr
-  end
-

Instance Members

- - - - -
MemberDescription
member Raw : Expr
- Get the raw expression associated with this type-carrying expression -
-
-
-

See Also

-Microsoft.FSharp.Quotations
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.type_Expr.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.type_Expr.html deleted file mode 100644 index eff747fd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.type_Expr.html +++ /dev/null @@ -1,257 +0,0 @@ -Microsoft.FSharp.Quotations.Expr -
-
-

[Home] Type Microsoft.FSharp.Quotations.Expr


-
-
- - - -
- Quoted expressions annotated with System.Type values. - -

Full Type Signature

-
type Expr =
-  class
-    override Equals : obj:obj -> bool
-    member GetFreeVars : unit -> seq<Var>
-    member Substitute : substitution:(Var -> Expr option) -> Expr
-    member CustomAttributes : Expr list
-    member Type : Type
-    static member AddressOf : target:Expr -> Expr
-    static member AddressSet : target:Expr * value:Expr -> Expr
-    static member Application : functionExpr:Expr * argument:Expr -> Expr
-    static member Applications : functionExpr:Expr * arguments:Expr list list -> Expr
-    static member Call : methodInfo:MethodInfo * arguments:Expr list -> Expr
-    static member Call : obj:Expr * methodInfo:MethodInfo * arguments:Expr list -> Expr
-    static member Cast : source:Expr -> Expr<'T>
-    static member Coerce : source:Expr * target:Type -> Expr
-    static member DefaultValue : expressionType:Type -> Expr
-    static member
-      Deserialize : qualifyingType:Type * spliceTypes:Type list * spliceExprs:Expr list * value:byte [] -> Expr
-    static member FieldGet : fieldInfo:FieldInfo -> Expr
-    static member FieldGet : obj:Expr * fieldInfo:FieldInfo -> Expr
-    static member FieldSet : fieldInfo:FieldInfo * value:Expr -> Expr
-    static member FieldSet : obj:Expr * fieldInfo:FieldInfo * value:Expr -> Expr
-    static member ForIntegerRangeLoop : loopVariable:Var * start:Expr * endExpr:Expr * body:Expr -> Expr
-    static member GlobalVar : name:string -> Expr<'T>
-    static member IfThenElse : guard:Expr * thenExpr:Expr * elseExpr:Expr -> Expr
-    static member Lambda : parameter:Var * body:Expr -> Expr
-    static member Let : letVariable:Var * letExpr:Expr * body:Expr -> Expr
-    static member LetRec : bindings:(Var * Expr) list * body:Expr -> Expr
-    static member NewArray : elementType:Type * elements:Expr list -> Expr
-    static member NewDelegate : delegateType:Type * parameters:Var list * body:Expr -> Expr
-    static member NewObject : constructorInfo:ConstructorInfo * arguments:Expr list -> Expr
-    static member NewRecord : recordType:Type * elements:Expr list -> Expr
-    static member NewTuple : elements:Expr list -> Expr
-    static member NewUnionCase : unionCase:UnionCaseInfo * arguments:Expr list -> Expr
-    static member PropGet : property:PropertyInfo * ?indexerArgs:Expr list -> Expr
-    static member PropGet : obj:Expr * property:PropertyInfo * ?indexerArgs:Expr list -> Expr
-    static member PropSet : property:PropertyInfo * value:Expr * ?indexerArgs:Expr list -> Expr
-    static member PropSet : obj:Expr * property:PropertyInfo * value:Expr * ?indexerArgs:Expr list -> Expr
-    static member Quote : inner:Expr -> Expr
-    static member RegisterReflectedDefinitions : assembly:Assembly * resource:string * serializedValue:byte [] -> unit
-    static member Sequential : first:Expr * second:Expr -> Expr
-    static member TryFinally : body:Expr * compensation:Expr -> Expr
-    static member TryGetReflectedDefinition : methodBase:MethodBase -> Expr option
-    static member TryWith : body:Expr * filterVar:Var * filterBody:Expr * catchVar:Var * catchBody:Expr -> Expr
-    static member TupleGet : tuple:Expr * index:int -> Expr
-    static member TypeTest : source:Expr * target:Type -> Expr
-    static member UnionCaseTest : source:Expr * unionCase:UnionCaseInfo -> Expr
-    static member Value : value:'T -> Expr
-    static member Value : value:obj * expressionType:Type -> Expr
-    static member Var : variable:Var -> Expr
-    static member VarSet : variable:Var * value:Expr -> Expr
-    static member WhileLoop : guard:Expr * body:Expr -> Expr
-  end
-

Instance Members

- - - - - - - - -
MemberDescription
member CustomAttributes : Expr list
- Returns the custom attributes of an expression -
override Equals : obj:obj -> bool
member GetFreeVars : unit -> seq<Var>
- Get the free expression variables of an expression as a list -
member Substitute : substitution:(Var -> Expr option) -> Expr
- Substitute through the given expression using the given functions - to map variables to new values. The functions must give consistent results - at each application. Variable renaming may occur on the target expression - if variable capture occurs. -
member Type : Type
- Returns type of an expression -
-
-

Static Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member AddressOf : target:Expr -> Expr
- Build an expression that represents getting the address of a value -
member AddressSet : target:Expr * value:Expr -> Expr
- Build an expression that represents setting the value held at a particular address -
member Application : functionExpr:Expr * argument:Expr -> Expr
- Build an expression that represents the application of a first class function value to a single argument -
member Applications : functionExpr:Expr * arguments:Expr list list -> Expr
- Build an expression that represents the application of a first class function value to multiple arguments -
member Call : obj:Expr * methodInfo:MethodInfo * arguments:Expr list -> Expr
- Build an expression that represents a call to an instance method associated with an object -
member Call : methodInfo:MethodInfo * arguments:Expr list -> Expr
- Build an expression that represents a call to an static method or module-bound function -
member Cast : source:Expr -> Expr<'T>
- Return a new typed expression given an underlying runtime-typed expression. - A type annotation is usually required to use this function, and - using an incorrect type annotation may result in a later runtime exception. -
member Coerce : source:Expr * target:Type -> Expr
- Build an expression that represents the coercion of an expression to a type -
member DefaultValue : expressionType:Type -> Expr
- Build an expression that represents the invocation of a default object constructor -
member
-  Deserialize : qualifyingType:Type * spliceTypes:Type list *
-                spliceExprs:Expr list * value:byte [] -> Expr
- This function is called automatically when quotation syntax (<@ @>) and related typed-expression - quotations are used. The bytes are a pickled binary representation of an unlinked form of the qutoed expression, - and the System.Type argument is any type in the assembly where the quoted - expression occurs, i.e. it helps scope the interpretation of the cross-assembly - references in the bytes. -
member FieldGet : obj:Expr * fieldInfo:FieldInfo -> Expr
- Build an expression that represents the access of a field of an object -
member FieldGet : fieldInfo:FieldInfo -> Expr
- Build an expression that represents the access of a static field -
member FieldSet : obj:Expr * fieldInfo:FieldInfo * value:Expr -> Expr
- Build an expression that represents writing to a field of an object -
member FieldSet : fieldInfo:FieldInfo * value:Expr -> Expr
- Build an expression that represents writing to a static field -
member
-  ForIntegerRangeLoop : loopVariable:Var * start:Expr * endExpr:Expr * body:Expr ->
-                          Expr
- Build a 'for i = ... to ... do ...' expression that represent loops over integer ranges -
member GlobalVar : name:string -> Expr<'T>
- Fetch or create a new variable with the given name and type from a global pool of shared variables - indexed by name and type. The type is given by the expicit or inferred type parameter -
member IfThenElse : guard:Expr * thenExpr:Expr * elseExpr:Expr -> Expr
- Build 'if ... then ... else' expressions -
member Lambda : parameter:Var * body:Expr -> Expr
- Build an expression that represents the constrution of an F# function value -
member Let : letVariable:Var * letExpr:Expr * body:Expr -> Expr
- Build expressions associated with 'let' constructs -
member LetRec : bindings:(Var * Expr) list * body:Expr -> Expr
- Build recursives expressions associated with 'let rec' constructs -
member NewArray : elementType:Type * elements:Expr list -> Expr
- Build an expression that represents the creation of an array value initialized with the given elements -
member NewDelegate : delegateType:Type * parameters:Var list * body:Expr -> Expr
- Build an expression that represents the creation of a delegate value for the given type -
member NewObject : constructorInfo:ConstructorInfo * arguments:Expr list -> Expr
- Build an expression that represents the invocation of an object constructor -
member NewRecord : recordType:Type * elements:Expr list -> Expr
- Build record-construction expressions -
member NewTuple : elements:Expr list -> Expr
- Build an expression that represents the creation of an F# tuple value -
member NewUnionCase : unionCase:UnionCaseInfo * arguments:Expr list -> Expr
- Build an expression that represents the creation of a union case value -
member PropGet : property:PropertyInfo * ?indexerArgs:Expr list -> Expr
- Build an expression that represents reading a static property -
member
-  PropGet : obj:Expr * property:PropertyInfo * ?indexerArgs:Expr list -> Expr
- Build an expression that represents reading a property of an object -
member
-  PropSet : property:PropertyInfo * value:Expr * ?indexerArgs:Expr list -> Expr
- Build an expression that represents writing to a static property -
member
-  PropSet : obj:Expr * property:PropertyInfo * value:Expr *
-            ?indexerArgs:Expr list -> Expr
- Build an expression that represents writing to a property of an object -
member Quote : inner:Expr -> Expr
- Build an expression that represents a nested quotation literal -
member
-  RegisterReflectedDefinitions : assembly:Assembly * resource:string *
-                                 serializedValue:byte [] -> unit
- Permit interactive environments such as F# Interactive - to explicitly register new pickled resources that represent persisted - top level definitions. The string indicates a unique name for the resources - being added. The format for the bytes is the encoding generated by the F# compiler. -
member Sequential : first:Expr * second:Expr -> Expr
- Build an expression that represents the sequential execution of one expression followed by another -
member TryFinally : body:Expr * compensation:Expr -> Expr
- Build an expression that represents a try/finally construct -
member TryGetReflectedDefinition : methodBase:MethodBase -> Expr option
- Try and find a stored reflection definition for the given method. Stored reflection - definitions are added to an F# assembly through the use of the [<ReflectedDefinition>] attribute. -
member
-  TryWith : body:Expr * filterVar:Var * filterBody:Expr * catchVar:Var *
-            catchBody:Expr -> Expr
- Build an expression that represents a try/with construct for exception filtering and catching -
member TupleGet : tuple:Expr * index:int -> Expr
- Build an expression that represents getting a field of a tuple -
member TypeTest : source:Expr * target:Type -> Expr
- Build an expression that represents a type test -
member UnionCaseTest : source:Expr * unionCase:UnionCaseInfo -> Expr
- Build an expression that represents a test of a value is of a particular union case -
member Value : value:'T -> Expr
- Build an expression that represents a constant value -
member Value : value:obj * expressionType:Type -> Expr
- Build an expression that represents a constant value of a particular type -
member Var : variable:Var -> Expr
- Build an expression that represents a variable -
member VarSet : variable:Var * value:Expr -> Expr
- Build an expression that represents setting a mutable variable -
member WhileLoop : guard:Expr * body:Expr -> Expr
- Build an expression that represents a while loop -
-
-
-

See Also

-Microsoft.FSharp.Quotations
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.type_Var.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.type_Var.html deleted file mode 100644 index 1dd25c56..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Quotations.type_Var.html +++ /dev/null @@ -1,59 +0,0 @@ -Microsoft.FSharp.Quotations.Var -
-
-

[Home] Type Microsoft.FSharp.Quotations.Var


-
-
- - - -
- Information at the binding site of a variable - -

Full Type Signature

-
[<SealedAttribute ()>]
-type Var =
-  class
-    interface IComparable
-    new : name:string * typ:Type * ?isMutable:bool -> Var
-    member IsMutable : bool
-    member Name : string
-    member Type : Type
-    static member Global : name:string * typ:Type -> Var
-  end
-

Instance Members

- - - - - - -
MemberDescription
member IsMutable : bool
- Indicates if the variable represents a mutable storage location -
member Name : string
- The declared name of the variable -
member Type : Type
- The type associated with the variable -
-
-

Static Members

- - - - - -
MemberDescription
new : name:string * typ:Type * ?isMutable:bool -> Var
- Create a new variable with the given name, type and mutability -
member Global : name:string * typ:Type -> Var
- Fetch or create a new variable with the given name and type from a global pool of shared variables - indexed by name and type -
-
-
-

See Also

-Microsoft.FSharp.Quotations
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.html deleted file mode 100644 index 92161289..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.html +++ /dev/null @@ -1,33 +0,0 @@ -Microsoft.FSharp.Reflection -
-
-

[Home] Namespace Microsoft.FSharp.Reflection


-
-
- - - -
-

Type Definitions

- - - - - - -
TypeDescription
type FSharpType - Contains operations associated with constructing and analyzing F# types such as records, unions and tuples -
type FSharpValue - Contains operations associated with constructing and analyzing values associated with F# types such as records, unions and tuples -
type UnionCaseInfo -Represents a case of a discriminated union type -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.type_FSharpType.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.type_FSharpType.html deleted file mode 100644 index 360e133f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.type_FSharpType.html +++ /dev/null @@ -1,97 +0,0 @@ -Microsoft.FSharp.Reflection.FSharpType -
-
-

[Home] Type Microsoft.FSharp.Reflection.FSharpType


-
-
- - - -
- Contains operations associated with constructing and analyzing F# types such as records, unions and tuples - -

Full Type Signature

-
[<AbstractClassAttribute (); SealedAttribute ()>]
-type FSharpType =
-  class
-    static member GetExceptionFields : exceptionType:Type * ?bindingFlags:BindingFlags -> PropertyInfo []
-    static member GetFunctionElements : functionType:Type -> Type * Type
-    static member GetRecordFields : recordType:Type * ?bindingFlags:BindingFlags -> PropertyInfo []
-    static member GetTupleElements : tupleType:Type -> Type []
-    static member GetUnionCases : unionType:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo []
-    static member IsExceptionRepresentation : exceptionType:Type * ?bindingFlags:BindingFlags -> bool
-    static member IsFunction : typ:Type -> bool
-    static member IsModule : typ:Type -> bool
-    static member IsRecord : typ:Type * ?bindingFlags:BindingFlags -> bool
-    static member IsTuple : typ:Type -> bool
-    static member IsUnion : typ:Type * ?bindingFlags:BindingFlags -> bool
-    static member MakeFunctionType : domain:Type * range:Type -> Type
-    static member MakeTupleType : types:Type [] -> Type
-  end
-

Static Members

- - - - - - - - - - - - - - - - -
MemberDescription
member
-  GetExceptionFields : exceptionType:Type * ?bindingFlags:BindingFlags ->
-                         PropertyInfo []
- Read all the fields from an F# exception declaration, in declaration order - - Assumes exceptionType is an exception representation type. If not, ArgumentException is raised. -
member GetFunctionElements : functionType:Type -> Type * Type
- Get the domain and range types from an F# function type or from the runtime type of a closure implementing an F# type -
member
-  GetRecordFields : recordType:Type * ?bindingFlags:BindingFlags ->
-                      PropertyInfo []
- Read all the fields from a record value, in declaration order - - Assumes the given input is a record value. If not, ArgumentException is raised. -
member GetTupleElements : tupleType:Type -> Type []
- Get the tuple elements from the representation of an F# tuple type -
member
-  GetUnionCases : unionType:Type * ?bindingFlags:BindingFlags ->
-                    UnionCaseInfo []
- Get the cases of a union type. - - Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. -
member
-  IsExceptionRepresentation : exceptionType:Type * ?bindingFlags:BindingFlags ->
-                                bool
- Return true if the typ is a representation of an F# exception declaration -
member IsFunction : typ:Type -> bool
- Return true if the typ is a representation of an F# function type or the runtime type of a closure implementing an F# function type -
member IsModule : typ:Type -> bool
- Return true if the typ is a System.Type value corresponding to the compiled form of an F# module -
member IsRecord : typ:Type * ?bindingFlags:BindingFlags -> bool
- Return true if the typ is a representation of an F# record type -
member IsTuple : typ:Type -> bool
- Return true if the typ is a representation of an F# tuple type -
member IsUnion : typ:Type * ?bindingFlags:BindingFlags -> bool
- Return true if the typ is a representation of an F# union type or the runtime type of a value of that type -
member MakeFunctionType : domain:Type * range:Type -> Type
- Return a System.Type representing the F# function type with the given domain and range -
member MakeTupleType : types:Type [] -> Type
- Return a System.Type representing an F# tuple type with the given element types -
-
-
-

See Also

-Microsoft.FSharp.Reflection
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.type_FSharpValue.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.type_FSharpValue.html deleted file mode 100644 index b679b6d1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.type_FSharpValue.html +++ /dev/null @@ -1,208 +0,0 @@ -Microsoft.FSharp.Reflection.FSharpValue -
-
-

[Home] Type Microsoft.FSharp.Reflection.FSharpValue


-
-
- - - -
- Contains operations associated with constructing and analyzing values associated with F# types such as records, unions and tuples - -

Full Type Signature

-
[<AbstractClassAttribute (); SealedAttribute ()>]
-type FSharpValue =
-  class
-    static member GetExceptionFields : exn:obj * ?bindingFlags:BindingFlags -> obj []
-    static member GetRecordField : record:obj * info:PropertyInfo -> obj
-    static member GetRecordFields : record:obj * ?bindingFlags:BindingFlags -> obj []
-    static member GetTupleField : tuple:obj * index:int -> obj
-    static member GetTupleFields : tuple:obj -> obj []
-    static member GetUnionFields : value:obj * unionType:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo * obj []
-    static member MakeFunction : functionType:Type * implementation:(obj -> obj) -> obj
-    static member MakeRecord : recordType:Type * values:obj [] * ?bindingFlags:BindingFlags -> obj
-    static member MakeTuple : tupleElements:obj [] * tupleType:Type -> obj
-    static member MakeUnion : unionCase:UnionCaseInfo * args:obj [] * ?bindingFlags:BindingFlags -> obj
-    static member PreComputeRecordConstructor : recordType:Type * ?bindingFlags:BindingFlags -> (obj [] -> obj)
-    static member PreComputeRecordConstructorInfo : recordType:Type * ?bindingFlags:BindingFlags -> ConstructorInfo
-    static member PreComputeRecordFieldReader : info:PropertyInfo -> (obj -> obj)
-    static member PreComputeRecordReader : recordType:Type * ?bindingFlags:BindingFlags -> (obj -> obj [])
-    static member PreComputeTupleConstructor : tupleType:Type -> (obj [] -> obj)
-    static member PreComputeTupleConstructorInfo : tupleType:Type -> ConstructorInfo * Type option
-    static member PreComputeTuplePropertyInfo : tupleType:Type * index:int -> PropertyInfo * (Type * int) option
-    static member PreComputeTupleReader : tupleType:Type -> (obj -> obj [])
-    static member PreComputeUnionConstructor : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj [] -> obj)
-    static member PreComputeUnionConstructorInfo : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> MethodInfo
-    static member PreComputeUnionReader : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj -> obj [])
-    static member PreComputeUnionTagMemberInfo : unionType:Type * ?bindingFlags:BindingFlags -> MemberInfo
-    static member PreComputeUnionTagReader : unionType:Type * ?bindingFlags:BindingFlags -> (obj -> int)
-  end
-

Static Members

- - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member GetExceptionFields : exn:obj * ?bindingFlags:BindingFlags -> obj []
- Read all the fields from a value built using an instance of an F# exception declaration - - Assumes the given input is an F# exception value. If not, ArgumentException is raised. -
member GetRecordField : record:obj * info:PropertyInfo -> obj
- Read a field from a record value - - Assumes the given input is a record value. If not, ArgumentException is raised. -
member GetRecordFields : record:obj * ?bindingFlags:BindingFlags -> obj []
- Read all the fields from a record value - - Assumes the given input is a record value. If not, ArgumentException is raised. -
member GetTupleField : tuple:obj * index:int -> obj
- Read a field from a tuple value - - Assumes the given input is a tuple value. If not, ArgumentException is raised. -
member GetTupleFields : tuple:obj -> obj []
- Read all fields from a tuple - - Assumes the given input is a tuple value. If not, ArgumentException is raised. -
member
-  GetUnionFields : value:obj * unionType:Type * ?bindingFlags:BindingFlags ->
-                     UnionCaseInfo * obj []
- Identify the union case and its fields for an object - - Assumes the given input is a union case value. If not, ArgumentException is raised. - - If the type is not given, then the runtime type of the input object is used to identify the - relevant union type. The type should always be given if the input object may be null. For example, - option values may be represented using the 'null'. -
member MakeFunction : functionType:Type * implementation:(obj -> obj) -> obj
- Build a typed function from object from a dynamic function implementation -
member
-  MakeRecord : recordType:Type * values:obj [] * ?bindingFlags:BindingFlags ->
-                 obj
- Create an instance of a record type - - Assumes the given input is a record type. If not, ArgumentException is raised. -
member MakeTuple : tupleElements:obj [] * tupleType:Type -> obj
- Create an instance of a tuple type - - Assumes at least one element is given. If not, ArgumentException is raised. -
member
-  MakeUnion : unionCase:UnionCaseInfo * args:obj [] * ?bindingFlags:BindingFlags ->
-                obj
- Create a union case value -
member
-  PreComputeRecordConstructor : recordType:Type * ?bindingFlags:BindingFlags ->
-                                  (obj [] -> obj)
- Precompute a function for constructing a record value. - - Assumes the given type is a RecordType. - If not, ArgumentException is raised during pre-computation. -
member
-  PreComputeRecordConstructorInfo : recordType:Type * ?bindingFlags:BindingFlags ->
-                                      ConstructorInfo
- Get a ConstructorInfo for a record type -
member PreComputeRecordFieldReader : info:PropertyInfo -> (obj -> obj)
- Precompute a function for reading a particular field from a record. - Assumes the given type is a RecordType with a field of the given name. - If not, ArgumentException is raised during pre-computation. - - Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo - because the path executed by the computed function is optimized given the knowledge that it will be - used to read values of the given type. -
member
-  PreComputeRecordReader : recordType:Type * ?bindingFlags:BindingFlags ->
-                             (obj -> obj [])
- Precompute a function for reading all the fields from a record. The fields are returned in the - same order as the fields reported by a call to Microsoft.FSharp.Reflection.Type.GetInfo for - this type. - - Assumes the given type is a RecordType. - If not, ArgumentException is raised during pre-computation. - - Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo - because the path executed by the computed function is optimized given the knowledge that it will be - used to read values of the given type. -
member PreComputeTupleConstructor : tupleType:Type -> (obj [] -> obj)
- Precompute a function for reading the values of a particular tuple type - - Assumes the given type is a TupleType. - If not, ArgumentException is raised during pre-computation. -
member
-  PreComputeTupleConstructorInfo : tupleType:Type ->
-                                     ConstructorInfo * Type option
- Get a method that constructs objects of the given tuple type. - For small tuples, no additional typoe will be returned. - - For large tuples, an additional type is returned indicating that - a nested encoding has been used for the tuple type. In this case - the suffix portion of the tuple type has the given type and an - object of this type must be created and passed as the last argument - to the ConstructorInfo. A recursive call to PreComputeTupleConstructorInfo - can be used to determine the constructor for that the suffix type. -
member
-  PreComputeTuplePropertyInfo : tupleType:Type * index:int ->
-                                  PropertyInfo * (Type * int) option
- Get information that indicates how to read a field of a tuple -
member PreComputeTupleReader : tupleType:Type -> (obj -> obj [])
- Precompute a function for reading the values of a particular tuple type - - Assumes the given type is a TupleType. - If not, ArgumentException is raised during pre-computation. -
member
-  PreComputeUnionConstructor : unionCase:UnionCaseInfo *
-                               ?bindingFlags:BindingFlags -> (obj [] -> obj)
- Precompute a function for constructing a discriminated union value for a particular union case. -
member
-  PreComputeUnionConstructorInfo : unionCase:UnionCaseInfo *
-                                   ?bindingFlags:BindingFlags -> MethodInfo
- A method that constructs objects of the given case -
member
-  PreComputeUnionReader : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags ->
-                            (obj -> obj [])
- Precompute a function for reading all the fields for a particular discriminator case of a union type - - Using the computed function will typically be faster than executing a corresponding call to GetFields -
member
-  PreComputeUnionTagMemberInfo : unionType:Type * ?bindingFlags:BindingFlags ->
-                                   MemberInfo
- Precompute a property or static method for reading an integer representing the case tag of a union type. -
member
-  PreComputeUnionTagReader : unionType:Type * ?bindingFlags:BindingFlags ->
-                               (obj -> int)
- Assumes the given type is a union type. - If not, ArgumentException is raised during pre-computation. - - Using the computed function is more efficient than calling GetUnionCase - because the path executed by the computed function is optimized given the knowledge that it will be - used to read values of the given type. -
-
-
-

See Also

-Microsoft.FSharp.Reflection
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.type_UnionCaseInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.type_UnionCaseInfo.html deleted file mode 100644 index 8dfcd987..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Reflection.type_UnionCaseInfo.html +++ /dev/null @@ -1,55 +0,0 @@ -Microsoft.FSharp.Reflection.UnionCaseInfo -
-
-

[Home] Type Microsoft.FSharp.Reflection.UnionCaseInfo


-
-
- - - -
-Represents a case of a discriminated union type - -

Full Type Signature

-
[<SealedAttribute ()>]
-type UnionCaseInfo
-with
-  member GetCustomAttributes : unit -> obj []
-  member GetCustomAttributes : attributeType:Type -> obj []
-  member GetFields : unit -> PropertyInfo []
-  member DeclaringType : Type
-  member Name : string
-  member Tag : int
-end
-

Instance Members

- - - - - - - - - -
MemberDescription
member DeclaringType : Type
- The type in which the case occurs -
member GetCustomAttributes : attributeType:Type -> obj []
- Return the custom attributes associated with the case matching the given attribute type -
member GetCustomAttributes : unit -> obj []
- Return the custom attributes associated with the case -
member GetFields : unit -> PropertyInfo []
- The fields associated with the case, represented by PropertyInfo -
member Name : string
- The name of the case -
member Tag : int
- The integer tag for the case -
-
-
-

See Also

-Microsoft.FSharp.Reflection
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.html deleted file mode 100644 index 3c95a805..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.html +++ /dev/null @@ -1,207 +0,0 @@ -Microsoft.FSharp.Text.Printf -
-
-

[Home] Module Microsoft.FSharp.Text.Printf


-
-
- - - -
- Extensible printf-style formatting for numbers and other datatypes - - Format specifications are strings with "%" markers indicating format - placeholders. Format placeholders consist of: - - %[flags][width][.precision][type] - - where the type is interpreted as follows: - - %b: bool, formatted as "true" or "false" - %s: string, formatted as its unescaped contents - %d, %i: any basic integer type formatted as a decimal integer, signed if the basic integer type is signed. - %u: any basic integer type formatted as an unsigned decimal integer - %x, %X, %o: any basic integer type formatted as an unsigned hexadecimal - (a-f)/Hexadecimal (A-F)/Octal integer - - %e, %E, %f, %F, %g, %G: - any basic floating point type (float,float32) formatted - using a C-style floating point format specifications, i.e - - %e, %E: Signed value having the form [-]d.dddde[sign]ddd where - d is a single decimal digit, dddd is one or more decimal - digits, ddd is exactly three decimal digits, and sign - is + or - - - %f: Signed value having the form [-]dddd.dddd, where dddd is one - or more decimal digits. The number of digits before the - decimal point depends on the magnitude of the number, and - the number of digits after the decimal point depends on - the requested precision. - - %g, %G: Signed value printed in f or e format, whichever is - more compact for the given value and precision. - - - %M: System.Decimal value - - %O: Any value, printed by boxing the object and using it's ToString method(s) - - %A: Any value, printed by using Microsoft.FSharp.Text.StructuredPrintfImpl.Display.any_to_string with the default layout settings - - %a: A general format specifier, requires two arguments: - (1) a function which accepts two arguments: - (a) a context parameter of the appropriate type for the - given formatting function (e.g. an #System.IO.TextWriter) - (b) a value to print - and which either outputs or returns appropriate text. - - (2) the particular value to print - - - %t: A general format specifier, requires one argument: - (1) a function which accepts a context parameter of the - appropriate type for the given formatting function (e.g. - an System.IO.TextWriter)and which either outputs or returns - appropriate text. - - Basic integer types are: - byte,sbyte,int16,uint16,int32,uint32,int64,uint64,nativeint,unativeint - Basic floating point types are: - float, float32 - - The following format patterns are accepted but a warning is printed: - - %h(d|u|x|X|o) - %l(d|u|x|X|o) - - The following format patterns are now deprecated: - - %Ld, %Li, %Lu, %Lx, %LX, %Lo: same, but an int64 - %nd, %ni, %nu, %nx, %nX, %no: same, but a nativeint - %Ud, %Ui, %Uu, %Ux, %UX, %Uo: same, but an unsigned int32 (uint32) - %ULd, %ULi, %ULu, %ULx, %ULX, %ULo: same, but an unsigned int64 (uint64) - %Und, %Uni, %Unu, %Unx, %UnX, %Uno: same, but an unsigned nativeint (unativeint) - - The optional width is an integer indicating the minimal width of the - result. For instance, %6d prints an integer, prefixing it with spaces - to fill at least 6 characters. If width is '*', then an extra integer - argument is taken to specify the corresponding width. - - any number - '*': - - Valid flags are: - - 0: add zeros instead of spaces to make up the required width - '-': left justify the result within the width specified - '+': add a '+' character if the number is positive (to match a '-' sign - for negatives) - ' ': add an extra space if the number is positive (to match a '-' - sign for negatives) - - The printf '#' flag is invalid and a compile-time error will be reported if it is used. - -

Type Definitions

- - - - - - - - - -
TypeDescription
type BuilderFormat - Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The first type parameter indicates the - arguments of the format operation and the last the overall return type. - Note: an abbreviation for Format<'T,StringBuilder,unit,'Result>
type BuilderFormat - Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The type parameter indicates the - arguments and return type of the format operation. - Note: an abbreviation for BuilderFormat<'T,unit>
type StringFormat - Represents a statically-analyzed format when formatting builds a string. The first type parameter indicates the - arguments of the format operation and the last the overall return type. - Note: an abbreviation for Format<'T,unit,string,'Result>
type StringFormat - Represents a statically-analyzed format when formatting builds a string. The type parameter indicates the - arguments and return type of the format operation. - Note: an abbreviation for StringFormat<'T,string>
type TextWriterFormat - Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The first type parameter indicates the - arguments of the format operation and the last the overall return type. - Note: an abbreviation for Format<'T,TextWriter,unit,'Result>
type TextWriterFormat - Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The type parameter indicates the - arguments and return type of the format operation. - Note: an abbreviation for TextWriterFormat<'T,unit>
-
-

Values

- - - - - - - - - - - - - - - - - - - -
ValueDescription
val bprintf : StringBuilder -> BuilderFormat<'T> -> 'T
- Print to a System.Text.StringBuilder -
val eprintf : TextWriterFormat<'T> -> 'T
- Formatted printing to stderr -
val eprintfn : TextWriterFormat<'T> -> 'T
- Formatted printing to stderr, adding a newline -
val failwithf : StringFormat<'T,'Result> -> 'T
- Print to a string buffer and raise an exception with the given - result. Helper printers must return strings. -
val fprintf : TextWriter -> TextWriterFormat<'T> -> 'T
- Print to a text writer or an OCaml-compatible channel -
val fprintfn : TextWriter -> TextWriterFormat<'T> -> 'T
- Print to a text writer or an OCaml-compatible channel, adding a newline -
val kbprintf :
-  (unit -> 'Result) -> StringBuilder -> BuilderFormat<'T,'Result> -> 'T
- bprintf, but call the given 'final' function to generate the result. - See kprintf. -
val kfprintf :
-  (unit -> 'Result) -> TextWriter -> TextWriterFormat<'T,'Result> -> 'T
- fprintf, but call the given 'final' function to generate the result. - See kprintf. -
val kprintf : (string -> 'Result) -> StringFormat<'T,'Result> -> 'T
- printf, but call the given 'final' function to generate the result. - For example, these let the printing force a flush after all output has - been entered onto the channel, but not before. -
val ksprintf : (string -> 'Result) -> StringFormat<'T,'Result> -> 'T
- sprintf, but call the given 'final' function to generate the result. - See kprintf. -
val ktwprintf :
-  (unit -> 'Result) -> TextWriter -> TextWriterFormat<'T,'Result> -> 'T
- twprintf, but call the given 'final' function to generate the result. - See kprintf. -
val printf : TextWriterFormat<'T> -> 'T
- Formatted printing to stdout -
val printfn : TextWriterFormat<'T> -> 'T
- Formatted printing to stdout, adding a newline -
val sprintf : StringFormat<'T> -> 'T
- Print to a string via an internal string buffer and return - the result as a string. Helper printers must return strings. -
val twprintf : TextWriter -> TextWriterFormat<'T> -> 'T
- Print to any subtype of the .NET type System.IO.TextWriter -
val twprintfn : TextWriter -> TextWriterFormat<'T> -> 'T
- Print to any subtype of the .NET type System.IO.TextWriter, and add a newline -
-
-
-

See Also

-Microsoft.FSharp.Text
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_BuilderFormat-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_BuilderFormat-1.html deleted file mode 100644 index f7e9f491..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_BuilderFormat-1.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Text.Printf.BuilderFormat -
-
-

[Home] Type Microsoft.FSharp.Text.Printf.BuilderFormat


-
-
- - - -
- Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The type parameter indicates the - arguments and return type of the format operation. - Note: an abbreviation for BuilderFormat<'T,unit> -

Full Type Signature

-
type BuilderFormat<'T> = BuilderFormat<'T,unit>
-
-

See Also

-Microsoft.FSharp.Text.Printf
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_BuilderFormat-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_BuilderFormat-2.html deleted file mode 100644 index fcf79ea0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_BuilderFormat-2.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Text.Printf.BuilderFormat -
-
-

[Home] Type Microsoft.FSharp.Text.Printf.BuilderFormat


-
-
- - - -
- Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The first type parameter indicates the - arguments of the format operation and the last the overall return type. - Note: an abbreviation for Format<'T,StringBuilder,unit,'Result> -

Full Type Signature

-
type BuilderFormat<'T,'Result> = Format<'T,StringBuilder,unit,'Result>
-
-

See Also

-Microsoft.FSharp.Text.Printf
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_StringFormat-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_StringFormat-1.html deleted file mode 100644 index 00250146..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_StringFormat-1.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Text.Printf.StringFormat -
-
-

[Home] Type Microsoft.FSharp.Text.Printf.StringFormat


-
-
- - - -
- Represents a statically-analyzed format when formatting builds a string. The type parameter indicates the - arguments and return type of the format operation. - Note: an abbreviation for StringFormat<'T,string> -

Full Type Signature

-
type StringFormat<'T> = StringFormat<'T,string>
-
-

See Also

-Microsoft.FSharp.Text.Printf
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_StringFormat-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_StringFormat-2.html deleted file mode 100644 index a43cfbf6..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_StringFormat-2.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Text.Printf.StringFormat -
-
-

[Home] Type Microsoft.FSharp.Text.Printf.StringFormat


-
-
- - - -
- Represents a statically-analyzed format when formatting builds a string. The first type parameter indicates the - arguments of the format operation and the last the overall return type. - Note: an abbreviation for Format<'T,unit,string,'Result> -

Full Type Signature

-
type StringFormat<'T,'Result> = Format<'T,unit,string,'Result>
-
-

See Also

-Microsoft.FSharp.Text.Printf
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_TextWriterFormat-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_TextWriterFormat-1.html deleted file mode 100644 index cbb3e5d0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_TextWriterFormat-1.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Text.Printf.TextWriterFormat -
-
-

[Home] Type Microsoft.FSharp.Text.Printf.TextWriterFormat


-
-
- - - -
- Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The type parameter indicates the - arguments and return type of the format operation. - Note: an abbreviation for TextWriterFormat<'T,unit> -

Full Type Signature

-
type TextWriterFormat<'T> = TextWriterFormat<'T,unit>
-
-

See Also

-Microsoft.FSharp.Text.Printf
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_TextWriterFormat-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_TextWriterFormat-2.html deleted file mode 100644 index 55114dae..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.Printf.type_TextWriterFormat-2.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Text.Printf.TextWriterFormat -
-
-

[Home] Type Microsoft.FSharp.Text.Printf.TextWriterFormat


-
-
- - - -
- Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The first type parameter indicates the - arguments of the format operation and the last the overall return type. - Note: an abbreviation for Format<'T,TextWriter,unit,'Result> -

Full Type Signature

-
type TextWriterFormat<'T,'Result> = Format<'T,TextWriter,unit,'Result>
-
-

See Also

-Microsoft.FSharp.Text.Printf
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.html b/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.html deleted file mode 100644 index 81444499..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.Core/Microsoft.FSharp.Text.html +++ /dev/null @@ -1,119 +0,0 @@ -Microsoft.FSharp.Text -
-
-

[Home] Namespace Microsoft.FSharp.Text


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.Core')

- - - - -
ModuleDescription
Microsoft.FSharp.Text.Printf - Extensible printf-style formatting for numbers and other datatypes - - Format specifications are strings with "%" markers indicating format - placeholders. Format placeholders consist of: - - %[flags][width][.precision][type] - - where the type is interpreted as follows: - - %b: bool, formatted as "true" or "false" - %s: string, formatted as its unescaped contents - %d, %i: any basic integer type formatted as a decimal integer, signed if the basic integer type is signed. - %u: any basic integer type formatted as an unsigned decimal integer - %x, %X, %o: any basic integer type formatted as an unsigned hexadecimal - (a-f)/Hexadecimal (A-F)/Octal integer - - %e, %E, %f, %F, %g, %G: - any basic floating point type (float,float32) formatted - using a C-style floating point format specifications, i.e - - %e, %E: Signed value having the form [-]d.dddde[sign]ddd where - d is a single decimal digit, dddd is one or more decimal - digits, ddd is exactly three decimal digits, and sign - is + or - - - %f: Signed value having the form [-]dddd.dddd, where dddd is one - or more decimal digits. The number of digits before the - decimal point depends on the magnitude of the number, and - the number of digits after the decimal point depends on - the requested precision. - - %g, %G: Signed value printed in f or e format, whichever is - more compact for the given value and precision. - - - %M: System.Decimal value - - %O: Any value, printed by boxing the object and using it's ToString method(s) - - %A: Any value, printed by using Microsoft.FSharp.Text.StructuredPrintfImpl.Display.any_to_string with the default layout settings - - %a: A general format specifier, requires two arguments: - (1) a function which accepts two arguments: - (a) a context parameter of the appropriate type for the - given formatting function (e.g. an #System.IO.TextWriter) - (b) a value to print - and which either outputs or returns appropriate text. - - (2) the particular value to print - - - %t: A general format specifier, requires one argument: - (1) a function which accepts a context parameter of the - appropriate type for the given formatting function (e.g. - an System.IO.TextWriter)and which either outputs or returns - appropriate text. - - Basic integer types are: - byte,sbyte,int16,uint16,int32,uint32,int64,uint64,nativeint,unativeint - Basic floating point types are: - float, float32 - - The following format patterns are accepted but a warning is printed: - - %h(d|u|x|X|o) - %l(d|u|x|X|o) - - The following format patterns are now deprecated: - - %Ld, %Li, %Lu, %Lx, %LX, %Lo: same, but an int64 - %nd, %ni, %nu, %nx, %nX, %no: same, but a nativeint - %Ud, %Ui, %Uu, %Ux, %UX, %Uo: same, but an unsigned int32 (uint32) - %ULd, %ULi, %ULu, %ULx, %ULX, %ULo: same, but an unsigned int64 (uint64) - %Und, %Uni, %Unu, %Unx, %UnX, %Uno: same, but an unsigned nativeint (unativeint) - - The optional width is an integer indicating the minimal width of the - result. For instance, %6d prints an integer, prefixing it with spaces - to fill at least 6 characters. If width is '*', then an extra integer - argument is taken to specify the corresponding width. - - any number - '*': - - Valid flags are: - - 0: add zeros instead of spaces to make up the required width - '-': left justify the result within the width specified - '+': add a '+' character if the number is positive (to match a '-' sign - for negatives) - ' ': add an extra space if the number is positive (to match a '-' - sign for negatives) - - The printf '#' flag is invalid and a compile-time error will be reported if it is used. -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Build.Tasks/Microsoft.FSharp.Build.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Build.Tasks/Microsoft.FSharp.Build.html deleted file mode 100644 index fadf1492..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Build.Tasks/Microsoft.FSharp.Build.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Build -
-
-

[Home] Namespace Microsoft.FSharp.Build


-
-
- - - -
-

Type Definitions

- - - - - -
TypeDescription
type FsLex
type FsYacc
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack.Build.Tasks, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Build.Tasks/Microsoft.FSharp.Build.type_FsLex.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Build.Tasks/Microsoft.FSharp.Build.type_FsLex.html deleted file mode 100644 index 944ccb11..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Build.Tasks/Microsoft.FSharp.Build.type_FsLex.html +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft.FSharp.Build.FsLex -
-
-

[Home] Type Microsoft.FSharp.Build.FsLex


-
-
- - - -
-

Full Type Signature

-
type FsLex =
-  class
-    inherit ToolTask
-    new : unit -> FsLex
-    override GenerateCommandLineCommands : unit -> String
-    override GenerateFullPathToTool : unit -> String
-    member internal InternalGenerateCommandLineCommands : unit -> String
-    override ToolName : String
-    member CodePage : string with set
-    member InputFile : string with set
-    member OtherFlags : string with set
-    [<Output ()>]
-    member OutputFile : string with set
-    member ToolExe : string with set
-    member ToolPath : string with set
-    member Unicode : bool with set
-  end
-

Instance Members

- - - - - - - - - - - - - -
MemberDescription
member CodePage : string with set
override GenerateCommandLineCommands : unit -> String
override GenerateFullPathToTool : unit -> String
member InputFile : string with set
member OtherFlags : string with set
[<Output ()>]
-member OutputFile : string with set
member ToolExe : string with set
override ToolName : String
member ToolPath : string with set
member Unicode : bool with set
-
-

Static Members

- - - - -
MemberDescription
new : unit -> FsLex
-
-
-

See Also

-Microsoft.FSharp.Build
-
-
-
-

Documentation for assembly FSharp.PowerPack.Build.Tasks, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Build.Tasks/Microsoft.FSharp.Build.type_FsYacc.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Build.Tasks/Microsoft.FSharp.Build.type_FsYacc.html deleted file mode 100644 index 0db1a5ec..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Build.Tasks/Microsoft.FSharp.Build.type_FsYacc.html +++ /dev/null @@ -1,64 +0,0 @@ -Microsoft.FSharp.Build.FsYacc -
-
-

[Home] Type Microsoft.FSharp.Build.FsYacc


-
-
- - - -
-

Full Type Signature

-
type FsYacc =
-  class
-    inherit ToolTask
-    new : unit -> FsYacc
-    override GenerateCommandLineCommands : unit -> String
-    override GenerateFullPathToTool : unit -> String
-    member internal InternalGenerateCommandLineCommands : unit -> String
-    override ToolName : String
-    member CodePage : string with set
-    member InputFile : string with set
-    member MLCompatibility : bool with set
-    member Module : string with set
-    member Open : string with set
-    member OtherFlags : string with set
-    [<Output ()>]
-    member OutputFile : string with set
-    member ToolExe : string with set
-    member ToolPath : string with set
-  end
-

Instance Members

- - - - - - - - - - - - - - - -
MemberDescription
member CodePage : string with set
override GenerateCommandLineCommands : unit -> String
override GenerateFullPathToTool : unit -> String
member InputFile : string with set
member MLCompatibility : bool with set
member Module : string with set
member Open : string with set
member OtherFlags : string with set
[<Output ()>]
-member OutputFile : string with set
member ToolExe : string with set
override ToolName : String
member ToolPath : string with set
-
-

Static Members

- - - - -
MemberDescription
new : unit -> FsYacc
-
-
-

See Also

-Microsoft.FSharp.Build
-
-
-
-

Documentation for assembly FSharp.PowerPack.Build.Tasks, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.Query.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.Query.html deleted file mode 100644 index 440e80fa..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.Query.html +++ /dev/null @@ -1,62 +0,0 @@ -Microsoft.FSharp.Linq.Query -
-
-

[Home] Module Microsoft.FSharp.Linq.Query


-
-
- - - -
-

Values

- - - - - - - - - - -
ValueDescription
val contains : 'T -> seq<'T> -> bool
- When used in queries, this operator corresponds to the LINQ Min operator and the query convertor recognises it as such - It differs in return type from Seq.min_by -
val groupBy :
-  ('T -> 'Key) -> seq<'T> -> seq<IGrouping<'Key,'T>>
- When used in queries, this operator corresponds to the LINQ Join operator and the query convertor recognises it as such -
val groupJoin :
-  seq<'Outer> ->
-    seq<'Inner> ->
-      ('Outer -> 'Key) ->
-        ('Inner -> 'Key) ->
-          ('Outer -> seq<'Inner> -> 'Result) -> seq<'Result>
- This join operator implements the LINQ GroupJoin operator and the query convertor recognises it as such -
val join :
-  seq<'Outer> ->
-    seq<'Inner> ->
-      ('Outer -> 'Key) ->
-        ('Inner -> 'Key) -> ('Outer -> 'Inner -> 'Result) -> seq<'Result>
- This join operator corresponds to the LINQ Join operator and the query convertor recognises it as such -
val maxBy : ('T -> 'Key) -> seq<'T> -> 'Key
- When used in queries, this operator corresponds to the LINQ Max operator and the query convertor recognises it as such - It differs in return type from Seq.max_by -
val minBy : ('T -> 'Key) -> seq<'T> -> 'Key
- When used in queries, this operator corresponds to the LINQ Min operator and the query convertor recognises it as such - It differs in return type from Seq.min_by -
val query : Expr<'T> -> 'T
- Evaluate the quotation expression by first converting to a LINQ expression tree - making use of IQueryable operators and then executing expression tree - - Exceptions: InvalidArgumentException will be raised if the input expression is - not in the subset that can be converted to a LINQ expression tree -
-
-
-

See Also

-Microsoft.FSharp.Linq
-
-
-
-

Documentation for assembly FSharp.PowerPack.Linq, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.QuotationEvaluation.HelperTypes.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.QuotationEvaluation.HelperTypes.html deleted file mode 100644 index 70b46acf..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.QuotationEvaluation.HelperTypes.html +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft.FSharp.Linq.QuotationEvaluation.HelperTypes -
-
-

[Home] Module Microsoft.FSharp.Linq.QuotationEvaluation.HelperTypes


-
-
- - - -
- A set of types used for implementing quotation conversions. - These are public only because targets of Linq Lambda expressions require them to be so - -
-

See Also

-Microsoft.FSharp.Linq.QuotationEvaluation
-
-
-
-

Documentation for assembly FSharp.PowerPack.Linq, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.QuotationEvaluation.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.QuotationEvaluation.html deleted file mode 100644 index d86c41cc..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.QuotationEvaluation.html +++ /dev/null @@ -1,79 +0,0 @@ -Microsoft.FSharp.Linq.QuotationEvaluation -
-
-

[Home] Module Microsoft.FSharp.Linq.QuotationEvaluation


-
-
- - - -
- This module provides Compile and Eval extension members - for F# quotation values, implemented by translating to LINQ - expression trees and using the LINQ dynamic compiler. - -

Modules (as contributed by assembly 'FSharp.PowerPack.Linq')

- - - - -
ModuleDescription
Microsoft.FSharp.Linq.QuotationEvaluation.HelperTypes - A set of types used for implementing quotation conversions. - These are public only because targets of Linq Lambda expressions require them to be so -
-
-

Values

- - - - -
ValueDescription
val LinqExpressionHelper : 'T -> Expression<'T>
- This function should not be called directly. -
-
-

Extension Members

- - - - - - - - -
Extension MemberDescription
member Compile : unit -> (unit -> 'T)
- Compile the quotation expression by first converting to LINQ expression trees - - Exceptions: InvalidArgumentException will be raised if the input expression is - not in the subset that can be converted to a LINQ expression tree -
member CompileUntyped : unit -> (unit -> obj)
- Compile the quotation expression by first converting to LINQ expression trees - - Exceptions: InvalidArgumentException will be raised if the input expression is - not in the subset that can be converted to a LINQ expression tree -
member Eval : unit -> 'T
- Evaluate the quotation expression by first converting to LINQ expression trees - - Exceptions: InvalidArgumentException will be raised if the input expression is - not in the subset that can be converted to a LINQ expression tree -
member EvalUntyped : unit -> obj
- Compile the quotation expression by first converting to LINQ expression trees - - Exceptions: InvalidArgumentException will be raised if the input expression is - not in the subset that can be converted to a LINQ expression tree -
member ToLinqExpression : unit -> Expression
- Convert the quotation expression to LINQ expression trees - - This operation will only succeed for a subset of quotation expressions. - - Exceptions: InvalidArgumentException will be raised if the input expression is - not in the subset that can be converted to a LINQ expression tree -
-
-
-

See Also

-Microsoft.FSharp.Linq
-
-
-
-

Documentation for assembly FSharp.PowerPack.Linq, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.html deleted file mode 100644 index 84eeeefb..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.Linq.html +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft.FSharp.Linq -
-
-

[Home] Namespace Microsoft.FSharp.Linq


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack.Linq')

- - - - - -
ModuleDescription
Microsoft.FSharp.Linq.Query
Microsoft.FSharp.Linq.QuotationEvaluation - This module provides Compile and Eval extension members - for F# quotation values, implemented by translating to LINQ - expression trees and using the LINQ dynamic compiler. -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack.Linq, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.html deleted file mode 100644 index 21317ea1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.html +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft.FSharp -
-
-

[Home] Namespace Microsoft.FSharp


-
-
- - - -
-

Type Definitions

- - - - -
TypeDescription
type FuncConvertExtensions
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack.Linq, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.type_FuncConvertExtensions.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.type_FuncConvertExtensions.html deleted file mode 100644 index 9e88a317..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Linq/Microsoft.FSharp.type_FuncConvertExtensions.html +++ /dev/null @@ -1,69 +0,0 @@ -Microsoft.FSharp.FuncConvertExtensions -
-
-

[Home] Type Microsoft.FSharp.FuncConvertExtensions


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute (); AbstractClassAttribute ()>]
-type FuncConvertExtensions =
-  class
-    static member ToFastFunc : Action<'T1,'T2> -> ('T1 -> 'T2 -> unit)
-    static member ToFastFunc : Action<'T1,'T2,'T3> -> ('T1 -> 'T2 -> 'T3 -> unit)
-    static member ToFastFunc : Action<'T1,'T2,'T3,'T4> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> unit)
-    static member ToFastFunc : Func<'U> -> (unit -> 'U)
-    static member ToFastFunc : Func<'T1,'U> -> ('T1 -> 'U)
-    static member ToFastFunc : Func<'T1,'T2,'U> -> ('T1 -> 'T2 -> 'U)
-    static member ToFastFunc : Func<'T1,'T2,'T3,'U> -> ('T1 -> 'T2 -> 'T3 -> 'U)
-    static member ToFastFunc : Func<'T1,'T2,'T3,'T4,'U> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U)
-    static member ToTupledFastFunc : Action<'T1,'T2> -> ('T1 * 'T2 -> unit)
-    static member ToTupledFastFunc : Action<'T1,'T2,'T3> -> ('T1 * 'T2 * 'T3 -> unit)
-    static member ToTupledFastFunc : Action<'T1,'T2,'T3,'T4> -> ('T1 * 'T2 * 'T3 * 'T4 -> unit)
-    static member ToTupledFastFunc : Func<'U> -> (unit -> 'U)
-    static member ToTupledFastFunc : Func<'T1,'U> -> ('T1 -> 'U)
-    static member ToTupledFastFunc : Func<'T1,'T2,'U> -> ('T1 * 'T2 -> 'U)
-    static member ToTupledFastFunc : Func<'T1,'T2,'T3,'U> -> ('T1 * 'T2 * 'T3 -> 'U)
-    static member ToTupledFastFunc : Func<'T1,'T2,'T3,'T4,'U> -> ('T1 * 'T2 * 'T3 * 'T4 -> 'U)
-  end
-

Static Members

- - - - - - - - - - - - - - - - - - - -
MemberDescription
member
-  ToFastFunc : Func<'T1,'T2,'T3,'T4,'U> ->
-                 ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U)
member
-  ToFastFunc : Action<'T1,'T2,'T3,'T4> ->
-                 ('T1 -> 'T2 -> 'T3 -> 'T4 -> unit)
member ToFastFunc : Func<'T1,'T2,'T3,'U> -> ('T1 -> 'T2 -> 'T3 -> 'U)
member ToFastFunc : Action<'T1,'T2,'T3> -> ('T1 -> 'T2 -> 'T3 -> unit)
member ToFastFunc : Func<'T1,'T2,'U> -> ('T1 -> 'T2 -> 'U)
member ToFastFunc : Action<'T1,'T2> -> ('T1 -> 'T2 -> unit)
member ToFastFunc : Func<'T1,'U> -> ('T1 -> 'U)
member ToFastFunc : Func<'U> -> (unit -> 'U)
member
-  ToTupledFastFunc : Func<'T1,'T2,'T3,'T4,'U> ->
-                       ('T1 * 'T2 * 'T3 * 'T4 -> 'U)
member
-  ToTupledFastFunc : Action<'T1,'T2,'T3,'T4> ->
-                       ('T1 * 'T2 * 'T3 * 'T4 -> unit)
member ToTupledFastFunc : Func<'T1,'T2,'T3,'U> -> ('T1 * 'T2 * 'T3 -> 'U)
member ToTupledFastFunc : Action<'T1,'T2,'T3> -> ('T1 * 'T2 * 'T3 -> unit)
member ToTupledFastFunc : Func<'T1,'T2,'U> -> ('T1 * 'T2 -> 'U)
member ToTupledFastFunc : Action<'T1,'T2> -> ('T1 * 'T2 -> unit)
member ToTupledFastFunc : Func<'T1,'U> -> ('T1 -> 'U)
member ToTupledFastFunc : Func<'U> -> (unit -> 'U)
-
-
-

See Also

-Microsoft.FSharp
-
-
-
-

Documentation for assembly FSharp.PowerPack.Linq, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.html deleted file mode 100644 index dd5e55bb..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.html +++ /dev/null @@ -1,46 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1 -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1


-
-
- - - -
-

Type Definitions

- - - - - -
TypeDescription
type chan
type sha_instream
-
-

Values

- - - - - - - - - - - - - - - - - -
ValueDescription
val f : int * int * int * int -> int
val k : int -> int
val k0to19 : int
val k20to39 : int
val k40to59 : int
val k60to79 : int
val lsr : int -> int -> int32
val rot_left32 : int32 -> int32 -> int32
val sha1_hash : sha_instream -> int * int * int * int * int
val sha1_hash_bytes : byte [] -> byte array
val sha_after_eof : sha_instream -> int
val sha_eof : sha_instream -> bool
val sha_read32 : sha_instream -> int
val sha_read8 : sha_instream -> int
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.type__chan.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.type__chan.html deleted file mode 100644 index 23ca38cf..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.type__chan.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.chan -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.chan


-
-
- - - -
-

Full Type Signature

-
type chan = | SHABytes of byte []
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.type__sha_instream.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.type__sha_instream.html deleted file mode 100644 index 20203235..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.type__sha_instream.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.sha_instream -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1.sha_instream


-
-
- - - -
-

Full Type Signature

-
type sha_instream =
-  {stream: chan;
-   mutable pos: int;
-   mutable eof: bool;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.html deleted file mode 100644 index 8e09cf8a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.html +++ /dev/null @@ -1,230 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack.Metadata')

- - - - -
ModuleDescription
FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.SHA1
-
-

Type Definitions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
type Alignment
type AssemblyRefData
type ExportedTypesMap Note: an abbreviation for Map<string,ILExportedType>
type Guid Note: an abbreviation for byte []
type ILArgumentConvention - Calling conventions. These are used in method pointer types. -
type ILArithInstr
type ILArrayBound Note: an abbreviation for int32 option
type ILArrayBounds Note: an abbreviation for ILArrayBound * ILArrayBound
type ILArrayShape
type ILAssemblyLongevity
type ILAssemblyManifest
type ILAssemblyRef - Global state: table of all assembly references keyed by AssemblyRefData -
type ILAttribute
type ILAttributeElement
type ILAttributeNamedArg Note: an abbreviation for string * ILType * bool * ILAttributeElement
type ILAttributes
type ILBasicBlock
type ILBasicType
type ILBoxity
type ILCallingConv
type ILCallingSignature
type ILCode
type ILCodeLabel Note: an abbreviation for int
type ILComparisonInstr
type ILConstSpec
type ILDebugMapping
type ILDefaultPInvokeEncoding
type ILEventDef
type ILEventDefs
type ILExceptionBlock
type ILExportedType
type ILExportedTypes
type ILFieldDef
type ILFieldDefs
type ILFieldInit
type ILFieldRef
type ILFieldSpec
type ILFilterBlock
type ILGenericArgs Note: an abbreviation for ILType list
type ILGenericParameterDef
type ILGenericParameterDefs Note: an abbreviation for ILGenericParameterDef list
type ILGenericVariance
type ILInstr
type ILMemberAccess
type ILMethodBody
type ILMethodDef
type ILMethodDefs - Index table by name and arity. -
type ILMethodImplDef
type ILMethodImplDefs
type ILMethodRef
type ILMethodSpec
type ILMethodVirtualInfo
type ILModuleDef
type ILModuleRef
type ILNativeType
type ILNativeVariantType
type ILNestedExportedType
type ILNestedExportedTypes
type ILParameter
type ILPermission
type ILPermissions
type ILPlatform
type ILPropertyDef
type ILResource
type ILResourceAccess
type ILResourceLocation
type ILResources
type ILReturnValue
type ILScopeRef
type ILSecurityAction
type ILSourceDocument
type ILSourceMarker
type ILThisConvention
type ILTokenSpec
type ILType
type ILTypeDef
type ILTypeDefAccess
type ILTypeDefInitSemantics
type ILTypeDefKind
type ILTypeDefLayout
type ILTypeDefLayoutInfo
type ILTypeDefs
type ILTypeRef
type ILTypeSpec
type ILVersionInfo Note: an abbreviation for uint16 * uint16 * uint16 * uint16
type IlxExtensionInstr
type IlxExtensionType
type IlxExtensionTypeKind
type LazyMethodBody
type LazyOrderedMultiMap - This is used to store event, property and field maps. - - Review: this is not such a great data structure. -
type Local
type Locale Note: an abbreviation for string
type MethodBody
type MethodCodeKind
type MethodDefMap Note: an abbreviation for Map<string,ILMethodDef list>
type MethodImplsMap Note: an abbreviation for Map<(string * int),ILMethodImplDef list>
type MethodKind
type NamespaceAndTypename Note: an abbreviation for string list * string
type NestedExportedTypesMap Note: an abbreviation for Map<string,ILNestedExportedType>
type OverridesSpec
type PInvokeCallingConvention
type PInvokeCharBestFit
type PInvokeCharEncoding
type PInvokeMethod
type PInvokeThrowOnUnmappableChar
type PropertyDefs
type PublicKey
type ReadonlySpec
type Tailcall
type TypeDefsMap - keyed first on namespace then on type name. The namespace is often a unique key for a given type map. - Note: an abbreviation for Map<string list,Dictionary<string,Lazy<ILTypeDef>>>
type varargs Note: an abbreviation for ILType list option
type Volatility
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val b0 : int -> int
val b1 : int -> int
val b2 : int -> int
val b3 : int -> int
val callconv_eq : ILCallingConv -> ILCallingConv -> bool
val dest_custom_attrs : ILAttributes -> ILAttribute list
val dest_edefs : ILEventDefs -> ILEventDef list
val dest_exported_types : ILExportedTypes -> ILExportedType list
val dest_fdefs : ILFieldDefs -> ILFieldDef list
val dest_lazy_tdefs :
-  ILTypeDefs ->
-    (string list * string * ILAttributes * Lazy<ILTypeDef>) list
val dest_mbody : LazyMethodBody -> MethodBody
val dest_mimpls : ILMethodImplDefs -> ILMethodImplDef list
val dest_mspec : ILMethodSpec -> ILMethodRef * ILType * ILGenericArgs
val dest_nested_exported_types :
-  ILNestedExportedTypes -> ILNestedExportedType list
val dest_pdefs : PropertyDefs -> ILPropertyDef list
val dest_resources : ILResources -> ILResource list
val dest_security_decls : ILPermissions -> ILPermission list
val dest_tdefs : ILTypeDefs -> ILTypeDef list
val emptyStringArray : string []
val find_edefs : string -> ILEventDefs -> ILEventDef list
val find_exported_type : string -> ILExportedTypes -> ILExportedType
val find_fdefs : string -> ILFieldDefs -> ILFieldDef list
val find_pdefs : string -> PropertyDefs -> ILPropertyDef list
val find_tdef : string -> ILTypeDefs -> ILTypeDef
val mutable instance_callconv : obj
val lazy_map : ('a -> 'b) -> Lazy<'a> -> Lazy<'b>
- A little ugly, but the idea is that if a data structure does not - contain lazy values then we don't add laziness. So if the thing to map - is already evaluated then immediately apply the function. -
val memoize_namespace_array_tab : Dictionary<string,string array>
val memoize_namespace_tab : Dictionary<string,string list>
- Global State. All namespace splits -
val mk_callsig : ILCallingConv * ILType list * ILType -> ILCallingSignature
val mk_empty_gactuals : ILGenericArgs
val mk_empty_gparams : ILGenericParameterDefs
val mk_lazy_mbody : Lazy<MethodBody> -> LazyMethodBody
val mk_mbody : MethodBody -> LazyMethodBody
val notlazy : 'a -> Lazy<'a>
val qrescope_scoref : ILScopeRef -> ILScopeRef -> ILScopeRef option
val qrescope_tref : ILScopeRef -> ILTypeRef -> ILTypeRef option
val qrescope_tspec : ILScopeRef -> ILTypeSpec -> ILTypeSpec option
val rescope_callsig : ILScopeRef -> ILCallingSignature -> ILCallingSignature
val rescope_dloc : ILScopeRef -> ILTypeRef -> ILTypeRef
val rescope_fref : ILScopeRef -> ILFieldRef -> ILFieldRef
val rescope_fspec : ILScopeRef -> ILFieldSpec -> ILFieldSpec
val rescope_inst : ILScopeRef -> ILGenericArgs -> ILGenericArgs
val rescope_mref : ILScopeRef -> ILMethodRef -> ILMethodRef
val rescope_mspec : ILScopeRef -> ILMethodSpec -> ILMethodSpec
val rescope_ospec : ILScopeRef -> OverridesSpec -> OverridesSpec
val rescope_scoref : ILScopeRef -> ILScopeRef -> ILScopeRef
val rescope_tref : ILScopeRef -> ILTypeRef -> ILTypeRef
val rescope_tspec : ILScopeRef -> ILTypeSpec -> ILTypeSpec
val rescope_typ : ILScopeRef -> ILType -> ILType
val sha1_hash_bytes : byte [] -> byte array
val split_name_at : string -> int -> string * string
val split_namespace : string -> string list
val split_namespace_array : string -> string array
val split_namespace_aux : string -> string list
val split_namespace_memoized : string -> string list
val split_type_name : string -> string list * string
val split_type_name_array : string -> string [] * string
val mutable static_callconv : obj
val typs_of_params : ILParameter list -> ILType list
val unsplit_type_name : string list * string -> string
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Alignment.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Alignment.html deleted file mode 100644 index af6890ea..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Alignment.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Alignment -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Alignment


-
-
- - - -
-

Full Type Signature

-
type Alignment =
-  | Aligned
-  | Unaligned_1
-  | Unaligned_2
-  | Unaligned_4
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_AssemblyRefData.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_AssemblyRefData.html deleted file mode 100644 index 1269514e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_AssemblyRefData.html +++ /dev/null @@ -1,26 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.AssemblyRefData -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.AssemblyRefData


-
-
- - - -
-

Full Type Signature

-
type AssemblyRefData =
-  {assemRefName: string;
-   assemRefHash: byte [] option;
-   assemRefPublicKeyInfo: PublicKey option;
-   assemRefRetargetable: bool;
-   assemRefVersion: ILVersionInfo option;
-   assemRefLocale: Locale option;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ExportedTypesMap.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ExportedTypesMap.html deleted file mode 100644 index 3f74d141..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ExportedTypesMap.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ExportedTypesMap -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ExportedTypesMap


-
-
- - - -
Note: an abbreviation for Map<string,ILExportedType> -

Full Type Signature

-
type ExportedTypesMap = Map<string,ILExportedType>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Guid.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Guid.html deleted file mode 100644 index 7ba0b90c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Guid.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Guid -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Guid


-
-
- - - -
Note: an abbreviation for byte [] -

Full Type Signature

-
type Guid = byte []
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArgumentConvention.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArgumentConvention.html deleted file mode 100644 index c9262096..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArgumentConvention.html +++ /dev/null @@ -1,28 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILArgumentConvention -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILArgumentConvention


-
-
- - - -
- Calling conventions. These are used in method pointer types. - -

Full Type Signature

-
type ILArgumentConvention =
-  | CC_default
-  | CC_cdecl
-  | CC_stdcall
-  | CC_thiscall
-  | CC_fastcall
-  | CC_vararg
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArithInstr.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArithInstr.html deleted file mode 100644 index 530a84e5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArithInstr.html +++ /dev/null @@ -1,55 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILArithInstr -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILArithInstr


-
-
- - - -
-

Full Type Signature

-
type ILArithInstr =
-  | AI_add
-  | AI_add_ovf
-  | AI_add_ovf_un
-  | AI_and
-  | AI_div
-  | AI_div_un
-  | AI_ceq
-  | AI_cgt
-  | AI_cgt_un
-  | AI_clt
-  | AI_clt_un
-  | AI_conv of ILBasicType
-  | AI_conv_ovf of ILBasicType
-  | AI_conv_ovf_un of ILBasicType
-  | AI_mul
-  | AI_mul_ovf
-  | AI_mul_ovf_un
-  | AI_rem
-  | AI_rem_un
-  | AI_shl
-  | AI_shr
-  | AI_shr_un
-  | AI_sub
-  | AI_sub_ovf
-  | AI_sub_ovf_un
-  | AI_xor
-  | AI_or
-  | AI_neg
-  | AI_not
-  | AI_ldnull
-  | AI_dup
-  | AI_pop
-  | AI_ckfinite
-  | AI_nop
-  | AI_ldc of ILBasicType * ILConstSpec
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArrayBound.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArrayBound.html deleted file mode 100644 index fdca3edf..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArrayBound.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILArrayBound -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILArrayBound


-
-
- - - -
Note: an abbreviation for int32 option -

Full Type Signature

-
type ILArrayBound = int32 option
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArrayBounds.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArrayBounds.html deleted file mode 100644 index c380144c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArrayBounds.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILArrayBounds -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILArrayBounds


-
-
- - - -
Note: an abbreviation for ILArrayBound * ILArrayBound -

Full Type Signature

-
type ILArrayBounds = ILArrayBound * ILArrayBound
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArrayShape.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArrayShape.html deleted file mode 100644 index e06f9d40..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILArrayShape.html +++ /dev/null @@ -1,31 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILArrayShape -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILArrayShape


-
-
- - - -
-

Full Type Signature

-
type ILArrayShape =
-  | ILArrayShape of ILArrayBounds list
-  with
-    member Rank : int
-  end
-

Instance Members

- - - - -
MemberDescription
member Rank : int
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAssemblyLongevity.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAssemblyLongevity.html deleted file mode 100644 index 40c72694..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAssemblyLongevity.html +++ /dev/null @@ -1,25 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAssemblyLongevity -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAssemblyLongevity


-
-
- - - -
-

Full Type Signature

-
type ILAssemblyLongevity =
-  | LongevityUnspecified
-  | LongevityLibrary
-  | LongevityPlatformAppDomain
-  | LongevityPlatformProcess
-  | LongevityPlatformSystem
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAssemblyManifest.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAssemblyManifest.html deleted file mode 100644 index 1645d380..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAssemblyManifest.html +++ /dev/null @@ -1,67 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAssemblyManifest -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAssemblyManifest


-
-
- - - -
-

Full Type Signature

-
type ILAssemblyManifest =
-  {manifestName: string;
-   manifestAuxModuleHashAlgorithm: int32;
-   manifestSecurityDecls: ILPermissions;
-   manifestPublicKey: byte [] option;
-   manifestVersion: ILVersionInfo option;
-   manifestLocale: Locale option;
-   manifestCustomAttrs: ILAttributes;
-   manifestLongevity: ILAssemblyLongevity;
-   manifestDisableJitOptimizations: bool;
-   manifestJitTracking: bool;
-   manifestRetargetable: bool;
-   manifestExportedTypes: ILExportedTypes;
-   manifestEntrypointElsewhere: ILModuleRef option;}
-  with
-    member AssemblyLongevity : ILAssemblyLongevity
-    member AuxModuleHashAlgorithm : int32
-    member CustomAttrs : ILAttributes
-    member DisableJitOptimizations : bool
-    member EntrypointElsewhere : ILModuleRef option
-    member ExportedTypes : ILExportedTypes
-    member JitTracking : bool
-    member Locale : Locale option
-    member Name : string
-    member PublicKey : byte [] option
-    member Retargetable : bool
-    member SecurityDecls : ILPermissions
-    member Version : ILVersionInfo option
-  end
-

Instance Members

- - - - - - - - - - - - - - - - -
MemberDescription
member AssemblyLongevity : ILAssemblyLongevity
member AuxModuleHashAlgorithm : int32
member CustomAttrs : ILAttributes
member DisableJitOptimizations : bool
member EntrypointElsewhere : ILModuleRef option
member ExportedTypes : ILExportedTypes
member JitTracking : bool
member Locale : Locale option
member Name : string
member PublicKey : byte [] option
member Retargetable : bool
member SecurityDecls : ILPermissions
member Version : ILVersionInfo option
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAssemblyRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAssemblyRef.html deleted file mode 100644 index 68be41b8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAssemblyRef.html +++ /dev/null @@ -1,62 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAssemblyRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAssemblyRef


-
-
- - - -
- Global state: table of all assembly references keyed by AssemblyRefData - -

Full Type Signature

-
[<SealedAttribute ()>]
-type ILAssemblyRef =
-  class
-    new : data:AssemblyRefData -> ILAssemblyRef
-    member Hash : byte [] option
-    member Locale : Locale option
-    member Name : string
-    member PublicKey : PublicKey option
-    member QualifiedName : string
-    member Retargetable : bool
-    member Version : ILVersionInfo option
-    static member
-      Create : name:string * hash:byte [] option * publicKey:PublicKey option * retargetable:bool *
-               version:ILVersionInfo option * locale:Locale option -> ILAssemblyRef
-    static member FromAssembly : assembly:Assembly -> ILAssemblyRef
-  end
-

Instance Members

- - - - - - - - - - -
MemberDescription
member Hash : byte [] option
member Locale : Locale option
member Name : string
member PublicKey : PublicKey option
member QualifiedName : string
member Retargetable : bool
member Version : ILVersionInfo option
-
-

Static Members

- - - - - - -
MemberDescription
new : data:AssemblyRefData -> ILAssemblyRef
member
-  Create : name:string * hash:byte [] option * publicKey:PublicKey option *
-           retargetable:bool * version:ILVersionInfo option *
-           locale:Locale option -> ILAssemblyRef
member FromAssembly : assembly:Assembly -> ILAssemblyRef
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttribute.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttribute.html deleted file mode 100644 index fe8add05..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttribute.html +++ /dev/null @@ -1,34 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAttribute -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAttribute


-
-
- - - -
-

Full Type Signature

-
type ILAttribute =
-  {customMethod: ILMethodSpec;
-   customData: byte [];}
-  with
-    member Data : byte []
-    member Method : ILMethodSpec
-  end
-

Instance Members

- - - - - -
MemberDescription
member Data : byte []
member Method : ILMethodSpec
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttributeElement.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttributeElement.html deleted file mode 100644 index eaeff498..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttributeElement.html +++ /dev/null @@ -1,36 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAttributeElement -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAttributeElement


-
-
- - - -
-

Full Type Signature

-
type ILAttributeElement =
-  | CustomElem_string of string option
-  | CustomElem_bool of bool
-  | CustomElem_char of char
-  | CustomElem_int8 of int8
-  | CustomElem_int16 of int16
-  | CustomElem_int32 of int32
-  | CustomElem_int64 of int64
-  | CustomElem_uint8 of uint8
-  | CustomElem_uint16 of uint16
-  | CustomElem_uint32 of uint32
-  | CustomElem_uint64 of uint64
-  | CustomElem_float32 of single
-  | CustomElem_float64 of double
-  | CustomElem_type of ILType
-  | CustomElem_tref of ILTypeRef
-  | CustomElem_array of ILAttributeElement list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttributeNamedArg.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttributeNamedArg.html deleted file mode 100644 index b4ca2203..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttributeNamedArg.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAttributeNamedArg -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAttributeNamedArg


-
-
- - - -
Note: an abbreviation for string * ILType * bool * ILAttributeElement -

Full Type Signature

-
type ILAttributeNamedArg = string * ILType * bool * ILAttributeElement
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttributes.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttributes.html deleted file mode 100644 index d05c83e1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILAttributes.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAttributes -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILAttributes


-
-
- - - -
-

Full Type Signature

-
type ILAttributes = | CustomAttrs of Lazy<ILAttribute list>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILBasicBlock.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILBasicBlock.html deleted file mode 100644 index 45201327..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILBasicBlock.html +++ /dev/null @@ -1,34 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILBasicBlock -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILBasicBlock


-
-
- - - -
-

Full Type Signature

-
type ILBasicBlock =
-  {bblockLabel: ILCodeLabel;
-   bblockInstrs: ILInstr array;}
-  with
-    member Instructions : ILInstr array
-    member Label : ILCodeLabel
-  end
-

Instance Members

- - - - - -
MemberDescription
member Instructions : ILInstr array
member Label : ILCodeLabel
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILBasicType.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILBasicType.html deleted file mode 100644 index 242afd0f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILBasicType.html +++ /dev/null @@ -1,34 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILBasicType -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILBasicType


-
-
- - - -
-

Full Type Signature

-
type ILBasicType =
-  | DT_R
-  | DT_I1
-  | DT_U1
-  | DT_I2
-  | DT_U2
-  | DT_I4
-  | DT_U4
-  | DT_I8
-  | DT_U8
-  | DT_R4
-  | DT_R8
-  | DT_I
-  | DT_U
-  | DT_REF
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILBoxity.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILBoxity.html deleted file mode 100644 index 6767cc01..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILBoxity.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILBoxity -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILBoxity


-
-
- - - -
-

Full Type Signature

-
type ILBoxity =
-  | AsObject
-  | AsValue
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCallingConv.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCallingConv.html deleted file mode 100644 index 69baa487..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCallingConv.html +++ /dev/null @@ -1,49 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILCallingConv -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILCallingConv


-
-
- - - -
-

Full Type Signature

-
type ILCallingConv =
-  | Callconv of ILThisConvention * ILArgumentConvention
-  with
-    member BasicConv : ILArgumentConvention
-    member IsInstance : bool
-    member IsInstanceExplicit : bool
-    member IsStatic : bool
-    member ThisConv : ILThisConvention
-    static member Instance : ILCallingConv
-    static member Static : ILCallingConv
-  end
-

Instance Members

- - - - - - - - -
MemberDescription
member BasicConv : ILArgumentConvention
member IsInstance : bool
member IsInstanceExplicit : bool
member IsStatic : bool
member ThisConv : ILThisConvention
-
-

Static Members

- - - - - -
MemberDescription
member Instance : ILCallingConv
member Static : ILCallingConv
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCallingSignature.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCallingSignature.html deleted file mode 100644 index 8b483cba..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCallingSignature.html +++ /dev/null @@ -1,37 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILCallingSignature -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILCallingSignature


-
-
- - - -
-

Full Type Signature

-
type ILCallingSignature =
-  {callsigCallconv: ILCallingConv;
-   callsigArgs: ILType list;
-   callsigReturn: ILType;}
-  with
-    member ArgTypes : ILType list
-    member CallingConv : ILCallingConv
-    member ReturnType : ILType
-  end
-

Instance Members

- - - - - - -
MemberDescription
member ArgTypes : ILType list
member CallingConv : ILCallingConv
member ReturnType : ILType
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCode.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCode.html deleted file mode 100644 index 32bd8485..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCode.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILCode -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILCode


-
-
- - - -
-

Full Type Signature

-
type ILCode =
-  | ILBasicBlock of ILBasicBlock
-  | GroupBlock of ILDebugMapping list * ILCode list
-  | RestrictBlock of ILCodeLabel list * ILCode
-  | TryBlock of ILCode * ILExceptionBlock
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCodeLabel.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCodeLabel.html deleted file mode 100644 index 6908fab3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILCodeLabel.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILCodeLabel -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILCodeLabel


-
-
- - - -
Note: an abbreviation for int -

Full Type Signature

-
type ILCodeLabel = int
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILComparisonInstr.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILComparisonInstr.html deleted file mode 100644 index 63626fbd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILComparisonInstr.html +++ /dev/null @@ -1,32 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILComparisonInstr -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILComparisonInstr


-
-
- - - -
-

Full Type Signature

-
type ILComparisonInstr =
-  | BI_beq
-  | BI_bge
-  | BI_bge_un
-  | BI_bgt
-  | BI_bgt_un
-  | BI_ble
-  | BI_ble_un
-  | BI_blt
-  | BI_blt_un
-  | BI_bne_un
-  | BI_brfalse
-  | BI_brtrue
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILConstSpec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILConstSpec.html deleted file mode 100644 index fd7bd786..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILConstSpec.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILConstSpec -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILConstSpec


-
-
- - - -
-

Full Type Signature

-
type ILConstSpec =
-  | NUM_I4 of int32
-  | NUM_I8 of int64
-  | NUM_R4 of single
-  | NUM_R8 of double
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILDebugMapping.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILDebugMapping.html deleted file mode 100644 index 0d777220..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILDebugMapping.html +++ /dev/null @@ -1,34 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILDebugMapping -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILDebugMapping


-
-
- - - -
-

Full Type Signature

-
type ILDebugMapping =
-  {localNum: int;
-   localName: string;}
-  with
-    member LocalVarIndex : int
-    member Name : string
-  end
-

Instance Members

- - - - - -
MemberDescription
member LocalVarIndex : int
member Name : string
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILDefaultPInvokeEncoding.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILDefaultPInvokeEncoding.html deleted file mode 100644 index a95a39bc..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILDefaultPInvokeEncoding.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILDefaultPInvokeEncoding -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILDefaultPInvokeEncoding


-
-
- - - -
-

Full Type Signature

-
type ILDefaultPInvokeEncoding =
-  | TypeEncoding_ansi
-  | TypeEncoding_autochar
-  | TypeEncoding_unicode
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILEventDef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILEventDef.html deleted file mode 100644 index da08ae64..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILEventDef.html +++ /dev/null @@ -1,51 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILEventDef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILEventDef


-
-
- - - -
-

Full Type Signature

-
type ILEventDef =
-  {eventType: ILType option;
-   eventName: string;
-   eventRTSpecialName: bool;
-   eventSpecialName: bool;
-   eventAddOn: ILMethodRef;
-   eventRemoveOn: ILMethodRef;
-   eventFire: ILMethodRef option;
-   eventOther: ILMethodRef list;
-   eventCustomAttrs: ILAttributes;}
-  with
-    member AddMethod : ILMethodRef
-    member CustomAttrs : ILAttributes
-    member FireMethod : ILMethodRef option
-    member Name : string
-    member OtherMethods : ILMethodRef list
-    member RemoveMethod : ILMethodRef
-    member Type : ILType option
-  end
-

Instance Members

- - - - - - - - - - -
MemberDescription
member AddMethod : ILMethodRef
member CustomAttrs : ILAttributes
member FireMethod : ILMethodRef option
member Name : string
member OtherMethods : ILMethodRef list
member RemoveMethod : ILMethodRef
member Type : ILType option
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILEventDefs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILEventDefs.html deleted file mode 100644 index aaf15ec1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILEventDefs.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILEventDefs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILEventDefs


-
-
- - - -
-

Full Type Signature

-
type ILEventDefs = | Events of LazyOrderedMultiMap<string,ILEventDef>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILExceptionBlock.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILExceptionBlock.html deleted file mode 100644 index 5a752209..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILExceptionBlock.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILExceptionBlock -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILExceptionBlock


-
-
- - - -
-

Full Type Signature

-
type ILExceptionBlock =
-  | FaultBlock of ILCode
-  | FinallyBlock of ILCode
-  | FilterCatchBlock of (ILFilterBlock * ILCode) list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILExportedType.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILExportedType.html deleted file mode 100644 index e6b30b9c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILExportedType.html +++ /dev/null @@ -1,46 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILExportedType -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILExportedType


-
-
- - - -
-

Full Type Signature

-
type ILExportedType =
-  {exportedTypeScope: ILScopeRef;
-   exportedTypeName: string;
-   exportedTypeForwarder: bool;
-   exportedTypeAccess: ILTypeDefAccess;
-   exportedTypeNested: ILNestedExportedTypes;
-   exportedTypeCustomAttrs: ILAttributes;}
-  with
-    member Access : ILTypeDefAccess
-    member CustomAttrs : ILAttributes
-    member IsForwarder : bool
-    member Name : string
-    member Nested : ILNestedExportedTypes
-    member ScopeRef : ILScopeRef
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
member Access : ILTypeDefAccess
member CustomAttrs : ILAttributes
member IsForwarder : bool
member Name : string
member Nested : ILNestedExportedTypes
member ScopeRef : ILScopeRef
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILExportedTypes.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILExportedTypes.html deleted file mode 100644 index 6afe91c9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILExportedTypes.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILExportedTypes -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILExportedTypes


-
-
- - - -
-

Full Type Signature

-
type ILExportedTypes = | ILExportedTypes of Lazy<ExportedTypesMap>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldDef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldDef.html deleted file mode 100644 index 6a6be8af..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldDef.html +++ /dev/null @@ -1,67 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFieldDef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFieldDef


-
-
- - - -
-

Full Type Signature

-
type ILFieldDef =
-  {fdName: string;
-   fdType: ILType;
-   fdStatic: bool;
-   fdAccess: ILMemberAccess;
-   fdData: byte [] option;
-   fdInit: ILFieldInit option;
-   fdOffset: int32 option;
-   fdSpecialName: bool;
-   fdMarshal: ILNativeType option;
-   fdNotSerialized: bool;
-   fdLiteral: bool;
-   fdInitOnly: bool;
-   fdCustomAttrs: ILAttributes;}
-  with
-    member Access : ILMemberAccess
-    member CustomAttrs : ILAttributes
-    member Data : byte [] option
-    member IsInitOnly : bool
-    member IsLiteral : bool
-    member IsStatic : bool
-    member LiteralValue : ILFieldInit option
-    member Marshal : ILNativeType option
-    member Name : string
-    member NotSerialized : bool
-    member Offset : int32 option
-    member Type : ILType
-  end
-

Instance Members

- - - - - - - - - - - - - - - -
MemberDescription
member Access : ILMemberAccess
member CustomAttrs : ILAttributes
member Data : byte [] option
member IsInitOnly : bool
member IsLiteral : bool
member IsStatic : bool
member LiteralValue : ILFieldInit option
member Marshal : ILNativeType option
member Name : string
member NotSerialized : bool
member Offset : int32 option
- The explicit offset in bytes when explicit layout is used. -
member Type : ILType
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldDefs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldDefs.html deleted file mode 100644 index 6a3c1ed9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldDefs.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFieldDefs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFieldDefs


-
-
- - - -
-

Full Type Signature

-
type ILFieldDefs = | Fields of LazyOrderedMultiMap<string,ILFieldDef>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldInit.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldInit.html deleted file mode 100644 index 2823f271..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldInit.html +++ /dev/null @@ -1,34 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFieldInit -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFieldInit


-
-
- - - -
-

Full Type Signature

-
type ILFieldInit =
-  | FieldInit_string of string
-  | FieldInit_bool of bool
-  | FieldInit_char of uint16
-  | FieldInit_int8 of int8
-  | FieldInit_int16 of int16
-  | FieldInit_int32 of int32
-  | FieldInit_int64 of int64
-  | FieldInit_uint8 of uint8
-  | FieldInit_uint16 of uint16
-  | FieldInit_uint32 of uint32
-  | FieldInit_uint64 of uint64
-  | FieldInit_single of single
-  | FieldInit_double of double
-  | FieldInit_ref
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldRef.html deleted file mode 100644 index b6bd56c8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldRef.html +++ /dev/null @@ -1,37 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFieldRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFieldRef


-
-
- - - -
-

Full Type Signature

-
type ILFieldRef =
-  {frefParent: ILTypeRef;
-   frefName: string;
-   frefType: ILType;}
-  with
-    member EnclosingTypeRef : ILTypeRef
-    member Name : string
-    member Type : ILType
-  end
-

Instance Members

- - - - - - -
MemberDescription
member EnclosingTypeRef : ILTypeRef
member Name : string
member Type : ILType
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldSpec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldSpec.html deleted file mode 100644 index 5a1caa51..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFieldSpec.html +++ /dev/null @@ -1,41 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFieldSpec -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFieldSpec


-
-
- - - -
-

Full Type Signature

-
type ILFieldSpec =
-  {fspecFieldRef: ILFieldRef;
-   fspecEnclosingType: ILType;}
-  with
-    member EnclosingType : ILType
-    member EnclosingTypeRef : ILTypeRef
-    member FieldRef : ILFieldRef
-    member FormalType : ILType
-    member Name : string
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
member EnclosingType : ILType
member EnclosingTypeRef : ILTypeRef
member FieldRef : ILFieldRef
member FormalType : ILType
member Name : string
override ToString : unit -> string
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFilterBlock.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFilterBlock.html deleted file mode 100644 index cd77cdc7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILFilterBlock.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFilterBlock -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILFilterBlock


-
-
- - - -
-

Full Type Signature

-
type ILFilterBlock =
-  | TypeFilter of ILType
-  | CodeFilter of ILCode
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericArgs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericArgs.html deleted file mode 100644 index 80d1c24b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericArgs.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILGenericArgs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILGenericArgs


-
-
- - - -
Note: an abbreviation for ILType list -

Full Type Signature

-
type ILGenericArgs = ILType list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericParameterDef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericParameterDef.html deleted file mode 100644 index 027cd60c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericParameterDef.html +++ /dev/null @@ -1,47 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILGenericParameterDef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILGenericParameterDef


-
-
- - - -
-

Full Type Signature

-
type ILGenericParameterDef =
-  {gpName: string;
-   gpConstraints: ILType list;
-   gpVariance: ILGenericVariance;
-   gpReferenceTypeConstraint: bool;
-   gpNotNullableValueTypeConstraint: bool;
-   gpDefaultConstructorConstraint: bool;}
-  with
-    member Constraints : ILType list
-    member HasDefaultConstructorConstraint : bool
-    member HasNotNullableValueTypeConstraint : bool
-    member HasReferenceTypeConstraint : bool
-    member Name : string
-    member Variance : ILGenericVariance
-  end
-

Instance Members

- - - - - - - - - - -
MemberDescription
member Constraints : ILType list
member HasDefaultConstructorConstraint : bool
member HasNotNullableValueTypeConstraint : bool
member HasReferenceTypeConstraint : bool
member Name : string
override ToString : unit -> string
member Variance : ILGenericVariance
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericParameterDefs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericParameterDefs.html deleted file mode 100644 index 77e25097..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericParameterDefs.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILGenericParameterDefs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILGenericParameterDefs


-
-
- - - -
Note: an abbreviation for ILGenericParameterDef list -

Full Type Signature

-
type ILGenericParameterDefs = ILGenericParameterDef list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericVariance.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericVariance.html deleted file mode 100644 index 72dbe18b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILGenericVariance.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILGenericVariance -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILGenericVariance


-
-
- - - -
-

Full Type Signature

-
type ILGenericVariance =
-  | NonVariant
-  | CoVariant
-  | ContraVariant
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILInstr.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILInstr.html deleted file mode 100644 index 3d12ec00..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILInstr.html +++ /dev/null @@ -1,83 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILInstr -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILInstr


-
-
- - - -
-

Full Type Signature

-
type ILInstr =
-  | I_arith of ILArithInstr
-  | I_ldarg of uint16
-  | I_ldarga of uint16
-  | I_ldind of Alignment * Volatility * ILBasicType
-  | I_ldloc of uint16
-  | I_ldloca of uint16
-  | I_starg of uint16
-  | I_stind of Alignment * Volatility * ILBasicType
-  | I_stloc of uint16
-  | I_br of ILCodeLabel
-  | I_jmp of ILMethodSpec
-  | I_brcmp of ILComparisonInstr * ILCodeLabel * ILCodeLabel
-  | I_switch of (ILCodeLabel list * ILCodeLabel)
-  | I_ret
-  | I_call of Tailcall * ILMethodSpec * varargs
-  | I_callvirt of Tailcall * ILMethodSpec * varargs
-  | I_callconstraint of Tailcall * ILType * ILMethodSpec * varargs
-  | I_calli of Tailcall * ILCallingSignature * varargs
-  | I_ldftn of ILMethodSpec
-  | I_newobj of ILMethodSpec * varargs
-  | I_throw
-  | I_endfinally
-  | I_endfilter
-  | I_leave of ILCodeLabel
-  | I_ldsfld of Volatility * ILFieldSpec
-  | I_ldfld of Alignment * Volatility * ILFieldSpec
-  | I_ldsflda of ILFieldSpec
-  | I_ldflda of ILFieldSpec
-  | I_stsfld of Volatility * ILFieldSpec
-  | I_stfld of Alignment * Volatility * ILFieldSpec
-  | I_ldstr of string
-  | I_isinst of ILType
-  | I_castclass of ILType
-  | I_ldtoken of ILTokenSpec
-  | I_ldvirtftn of ILMethodSpec
-  | I_cpobj of ILType
-  | I_initobj of ILType
-  | I_ldobj of Alignment * Volatility * ILType
-  | I_stobj of Alignment * Volatility * ILType
-  | I_box of ILType
-  | I_unbox of ILType
-  | I_unbox_any of ILType
-  | I_sizeof of ILType
-  | I_ldelem of ILBasicType
-  | I_stelem of ILBasicType
-  | I_ldelema of ReadonlySpec * ILArrayShape * ILType
-  | I_ldelem_any of ILArrayShape * ILType
-  | I_stelem_any of ILArrayShape * ILType
-  | I_newarr of ILArrayShape * ILType
-  | I_ldlen
-  | I_mkrefany of ILType
-  | I_refanytype
-  | I_refanyval of ILType
-  | I_rethrow
-  | I_break
-  | I_seqpoint of ILSourceMarker
-  | I_arglist
-  | I_localloc
-  | I_cpblk of Alignment * Volatility
-  | I_initblk of Alignment * Volatility
-  | EI_ilzero of ILType
-  | EI_ldlen_multi of int32 * int32
-  | I_other of IlxExtensionInstr
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMemberAccess.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMemberAccess.html deleted file mode 100644 index e3685f8c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMemberAccess.html +++ /dev/null @@ -1,27 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMemberAccess -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMemberAccess


-
-
- - - -
-

Full Type Signature

-
type ILMemberAccess =
-  | MemAccess_assembly
-  | MemAccess_compilercontrolled
-  | MemAccess_famandassem
-  | MemAccess_famorassem
-  | MemAccess_family
-  | MemAccess_private
-  | MemAccess_public
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodBody.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodBody.html deleted file mode 100644 index 7056121b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodBody.html +++ /dev/null @@ -1,26 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodBody -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodBody


-
-
- - - -
-

Full Type Signature

-
type ILMethodBody =
-  {ilZeroInit: bool;
-   ilMaxStack: int32;
-   ilNoInlining: bool;
-   ilLocals: Local list;
-   ilCode: ILCode;
-   ilSource: ILSourceMarker option;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodDef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodDef.html deleted file mode 100644 index 72de1f9a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodDef.html +++ /dev/null @@ -1,127 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodDef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodDef


-
-
- - - -
-

Full Type Signature

-
type ILMethodDef =
-  {mdName: string;
-   mdKind: MethodKind;
-   mdCallconv: ILCallingConv;
-   mdParams: ILParameter list;
-   mdReturn: ILReturnValue;
-   mdAccess: ILMemberAccess;
-   mdBody: LazyMethodBody;
-   mdCodeKind: MethodCodeKind;
-   mdInternalCall: bool;
-   mdManaged: bool;
-   mdForwardRef: bool;
-   mdSecurityDecls: ILPermissions;
-   mdHasSecurity: bool;
-   mdEntrypoint: bool;
-   mdReqSecObj: bool;
-   mdHideBySig: bool;
-   mdSpecialName: bool;
-   mdUnmanagedExport: bool;
-   mdSynchronized: bool;
-   mdPreserveSig: bool;
-   mdMustRun: bool;
-   mdExport: (int32 * string option) option;
-   mdVtableEntry: (int32 * int32) option;
-   mdGenericParams: ILGenericParameterDefs;
-   mdCustomAttrs: ILAttributes;}
-  with
-    member Access : ILMemberAccess
-    member CallingConv : ILCallingConv
-    member Code : ILCode option
-    member CustomAttrs : ILAttributes
-    member GenericParams : ILGenericParameterDefs
-    member HasSecurity : bool
-    member IsAbstract : bool
-    member IsCheckAccessOnOverride : bool
-    member IsClassInitializer : bool
-    member IsConstructor : bool
-    member IsEntrypoint : bool
-    member IsFinal : bool
-    member IsForwardRef : bool
-    member IsHideBySig : bool
-    member IsIL : bool
-    member IsInternalCall : bool
-    member IsManaged : bool
-    member IsMustRun : bool
-    member IsNewSlot : bool
-    member IsNoInline : bool
-    member IsNonVirtualInstance : bool
-    member IsPreserveSig : bool
-    member IsReqSecObj : bool
-    member IsStatic : bool
-    member IsSynchronized : bool
-    member IsUnmanagedExport : bool
-    member IsVirtual : bool
-    member IsZeroInit : bool
-    member Locals : Local list
-    member MaxStack : int32
-    member MethodBody : ILMethodBody
-    member Name : string
-    member ParameterTypes : ILType list
-    member Parameters : ILParameter list
-    member Return : ILReturnValue
-    member SecurityDecls : ILPermissions
-    member SourceMarker : ILSourceMarker option
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member Access : ILMemberAccess
member CallingConv : ILCallingConv
member Code : ILCode option
member CustomAttrs : ILAttributes
member GenericParams : ILGenericParameterDefs
member HasSecurity : bool
member IsAbstract : bool
member IsCheckAccessOnOverride : bool
member IsClassInitializer : bool
member IsConstructor : bool
member IsEntrypoint : bool
member IsFinal : bool
member IsForwardRef : bool
member IsHideBySig : bool
member IsIL : bool
member IsInternalCall : bool
member IsManaged : bool
member IsMustRun : bool
member IsNewSlot : bool
member IsNoInline : bool
member IsNonVirtualInstance : bool
member IsPreserveSig : bool
member IsReqSecObj : bool
member IsStatic : bool
member IsSynchronized : bool
member IsUnmanagedExport : bool
member IsVirtual : bool
member IsZeroInit : bool
member Locals : Local list
member MaxStack : int32
member MethodBody : ILMethodBody
member Name : string
member Parameters : ILParameter list
member ParameterTypes : ILType list
member Return : ILReturnValue
member SecurityDecls : ILPermissions
member SourceMarker : ILSourceMarker option
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodDefs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodDefs.html deleted file mode 100644 index 8427a2ff..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodDefs.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodDefs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodDefs


-
-
- - - -
- Index table by name and arity. - -

Full Type Signature

-
type ILMethodDefs = | Methods of Lazy<ILMethodDef list * MethodDefMap>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodImplDef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodImplDef.html deleted file mode 100644 index a693f4b9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodImplDef.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodImplDef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodImplDef


-
-
- - - -
-

Full Type Signature

-
type ILMethodImplDef =
-  {mimplOverrides: OverridesSpec;
-   mimplOverrideBy: ILMethodSpec;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodImplDefs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodImplDefs.html deleted file mode 100644 index 1e786e95..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodImplDefs.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodImplDefs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodImplDefs


-
-
- - - -
-

Full Type Signature

-
type ILMethodImplDefs = | MethodImpls of Lazy<MethodImplsMap>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodRef.html deleted file mode 100644 index ef957e69..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodRef.html +++ /dev/null @@ -1,61 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodRef


-
-
- - - -
-

Full Type Signature

-
type ILMethodRef =
-  {mrefParent: ILTypeRef;
-   mrefCallconv: ILCallingConv;
-   mrefGenericArity: int;
-   mrefName: string;
-   mrefArgs: ILType list;
-   mrefReturn: ILType;}
-  with
-    member ArgCount : int
-    member ArgTypes : ILType list
-    member CallingConv : ILCallingConv
-    member CallingSignature : ILCallingSignature
-    member EnclosingTypeRef : ILTypeRef
-    member GenericArity : int
-    member Name : string
-    member ReturnType : ILType
-    static member Create : a:ILTypeRef * b:ILCallingConv * c:string * d:int * e:ILType list * f:ILType -> ILMethodRef
-  end
-

Instance Members

- - - - - - - - - - - - -
MemberDescription
member ArgCount : int
member ArgTypes : ILType list
member CallingConv : ILCallingConv
member CallingSignature : ILCallingSignature
member EnclosingTypeRef : ILTypeRef
member GenericArity : int
member Name : string
member ReturnType : ILType
override ToString : unit -> string
-
-

Static Members

- - - - -
MemberDescription
member
-  Create : a:ILTypeRef * b:ILCallingConv * c:string * d:int * e:ILType list *
-           f:ILType -> ILMethodRef
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodSpec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodSpec.html deleted file mode 100644 index 7ebb4904..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodSpec.html +++ /dev/null @@ -1,56 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodSpec -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodSpec


-
-
- - - -
-

Full Type Signature

-
type ILMethodSpec =
-  {mspecMethodRefF: ILMethodRef;
-   mspecEnclosingTypeF: ILType;
-   mspecMethodInstF: ILGenericArgs;}
-  with
-    member CallingConv : ILCallingConv
-    member EnclosingType : ILType
-    member FormalArgTypes : ILType list
-    member FormalReturnType : ILType
-    member GenericArgs : ILGenericArgs
-    member GenericArity : int
-    member MethodRef : ILMethodRef
-    member Name : string
-    static member Create : a:ILType * b:ILMethodRef * c:ILGenericArgs -> ILMethodSpec
-  end
-

Instance Members

- - - - - - - - - - - - -
MemberDescription
member CallingConv : ILCallingConv
member EnclosingType : ILType
member FormalArgTypes : ILType list
member FormalReturnType : ILType
member GenericArgs : ILGenericArgs
member GenericArity : int
member MethodRef : ILMethodRef
member Name : string
override ToString : unit -> string
-
-

Static Members

- - - - -
MemberDescription
member Create : a:ILType * b:ILMethodRef * c:ILGenericArgs -> ILMethodSpec
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodVirtualInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodVirtualInfo.html deleted file mode 100644 index 3af8f968..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILMethodVirtualInfo.html +++ /dev/null @@ -1,40 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodVirtualInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILMethodVirtualInfo


-
-
- - - -
-

Full Type Signature

-
type ILMethodVirtualInfo =
-  {virtFinal: bool;
-   virtNewslot: bool;
-   virtStrict: bool;
-   virtAbstract: bool;}
-  with
-    member IsAbstract : bool
-    member IsCheckAccessOnOverride : bool
-    member IsFinal : bool
-    member IsNewSlot : bool
-  end
-

Instance Members

- - - - - - - -
MemberDescription
member IsAbstract : bool
member IsCheckAccessOnOverride : bool
member IsFinal : bool
member IsNewSlot : bool
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILModuleDef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILModuleDef.html deleted file mode 100644 index eed9dd55..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILModuleDef.html +++ /dev/null @@ -1,75 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILModuleDef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILModuleDef


-
-
- - - -
-

Full Type Signature

-
type ILModuleDef =
-  {modulManifest: ILAssemblyManifest option;
-   modulCustomAttrs: ILAttributes;
-   modulName: string;
-   modulTypeDefs: ILTypeDefs;
-   modulSubSystem: int32;
-   modulDLL: bool;
-   modulILonly: bool;
-   modulPlatform: ILPlatform option;
-   modul32bit: bool;
-   modul64bit: bool;
-   modulVirtAlignment: int32;
-   modulPhysAlignment: int32;
-   modulImageBase: int32;
-   modulResources: ILResources;
-   modulNativeResources: Lazy<byte []> list;}
-  with
-    member CustomAttrs : ILAttributes
-    member ImageBase : int32
-    member Is32Bit : bool
-    member Is64Bit : bool
-    member IsDLL : bool
-    member IsILOnly : bool
-    member Manifest : ILAssemblyManifest option
-    member ManifestOfAssembly : ILAssemblyManifest
-    member Name : string
-    member NativeResources : Lazy<byte []> list
-    member PhysicalAlignment : int32
-    member Platform : ILPlatform option
-    member Resources : ILResources
-    member SubSystemFlags : int32
-    member TypeDefs : ILTypeDefs
-    member VirtualAlignment : int32
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - -
MemberDescription
member CustomAttrs : ILAttributes
member ImageBase : int32
member Is32Bit : bool
member Is64Bit : bool
member IsDLL : bool
member IsILOnly : bool
member Manifest : ILAssemblyManifest option
member ManifestOfAssembly : ILAssemblyManifest
member Name : string
member NativeResources : Lazy<byte []> list
member PhysicalAlignment : int32
member Platform : ILPlatform option
member Resources : ILResources
member SubSystemFlags : int32
member TypeDefs : ILTypeDefs
member VirtualAlignment : int32
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILModuleRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILModuleRef.html deleted file mode 100644 index 1cec5b05..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILModuleRef.html +++ /dev/null @@ -1,46 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILModuleRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILModuleRef


-
-
- - - -
-

Full Type Signature

-
type ILModuleRef =
-  {name: string;
-   hasMetadata: bool;
-   hash: byte [] option;}
-  with
-    member HasMetadata : bool
-    member Hash : byte [] option
-    member Name : string
-    static member Create : name:string * hasMetadata:bool * hash:byte [] option -> ILModuleRef
-  end
-

Instance Members

- - - - - - -
MemberDescription
member Hash : byte [] option
member HasMetadata : bool
member Name : string
-
-

Static Members

- - - - -
MemberDescription
member
-  Create : name:string * hasMetadata:bool * hash:byte [] option -> ILModuleRef
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNativeType.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNativeType.html deleted file mode 100644 index d12a46f1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNativeType.html +++ /dev/null @@ -1,57 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILNativeType -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILNativeType


-
-
- - - -
-

Full Type Signature

-
type ILNativeType =
-  | NativeType_empty
-  | NativeType_custom of Guid * string * string * byte []
-  | NativeType_fixed_sysstring of int32
-  | NativeType_fixed_array of int32
-  | NativeType_currency
-  | NativeType_lpstr
-  | NativeType_lpwstr
-  | NativeType_lptstr
-  | NativeType_byvalstr
-  | NativeType_tbstr
-  | NativeType_lpstruct
-  | NativeType_struct
-  | NativeType_void
-  | NativeType_bool
-  | NativeType_int8
-  | NativeType_int16
-  | NativeType_int32
-  | NativeType_int64
-  | NativeType_float32
-  | NativeType_float64
-  | NativeType_unsigned_int8
-  | NativeType_unsigned_int16
-  | NativeType_unsigned_int32
-  | NativeType_unsigned_int64
-  | NativeType_array of ILNativeType option * (int32 * int32 option) option
-  | NativeType_int
-  | NativeType_unsigned_int
-  | NativeType_method
-  | NativeType_as_any
-  | NativeType_bstr
-  | NativeType_iunknown
-  | NativeType_idsipatch
-  | NativeType_interface
-  | NativeType_error
-  | NativeType_safe_array of ILNativeVariantType * string option
-  | NativeType_ansi_bstr
-  | NativeType_variant_bool
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNativeVariantType.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNativeVariantType.html deleted file mode 100644 index 0f9cd9ed..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNativeVariantType.html +++ /dev/null @@ -1,64 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILNativeVariantType -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILNativeVariantType


-
-
- - - -
-

Full Type Signature

-
type ILNativeVariantType =
-  | VariantType_empty
-  | VariantType_null
-  | VariantType_variant
-  | VariantType_currency
-  | VariantType_decimal
-  | VariantType_date
-  | VariantType_bstr
-  | VariantType_lpstr
-  | VariantType_lpwstr
-  | VariantType_iunknown
-  | VariantType_idispatch
-  | VariantType_safearray
-  | VariantType_error
-  | VariantType_hresult
-  | VariantType_carray
-  | VariantType_userdefined
-  | VariantType_record
-  | VariantType_filetime
-  | VariantType_blob
-  | VariantType_stream
-  | VariantType_storage
-  | VariantType_streamed_object
-  | VariantType_stored_object
-  | VariantType_blob_object
-  | VariantType_cf
-  | VariantType_clsid
-  | VariantType_void
-  | VariantType_bool
-  | VariantType_int8
-  | VariantType_int16
-  | VariantType_int32
-  | VariantType_int64
-  | VariantType_float32
-  | VariantType_float64
-  | VariantType_unsigned_int8
-  | VariantType_unsigned_int16
-  | VariantType_unsigned_int32
-  | VariantType_unsigned_int64
-  | VariantType_ptr
-  | VariantType_array of ILNativeVariantType
-  | VariantType_vector of ILNativeVariantType
-  | VariantType_byref of ILNativeVariantType
-  | VariantType_int
-  | VariantType_unsigned_int
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNestedExportedType.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNestedExportedType.html deleted file mode 100644 index adfe68d7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNestedExportedType.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILNestedExportedType -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILNestedExportedType


-
-
- - - -
-

Full Type Signature

-
type ILNestedExportedType =
-  {nestedExportedTypeName: string;
-   nestedExportedTypeAccess: ILMemberAccess;
-   nestedExportedTypeNested: ILNestedExportedTypes;
-   nestedExportedTypeCustomAttrs: ILAttributes;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNestedExportedTypes.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNestedExportedTypes.html deleted file mode 100644 index 8a344493..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILNestedExportedTypes.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILNestedExportedTypes -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILNestedExportedTypes


-
-
- - - -
-

Full Type Signature

-
type ILNestedExportedTypes = | ILNestedExportedTypes of Lazy<NestedExportedTypesMap>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILParameter.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILParameter.html deleted file mode 100644 index 9f859ca5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILParameter.html +++ /dev/null @@ -1,52 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILParameter -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILParameter


-
-
- - - -
-

Full Type Signature

-
type ILParameter =
-  {paramName: string option;
-   paramType: ILType;
-   paramDefault: ILFieldInit option;
-   paramMarshal: ILNativeType option;
-   paramIn: bool;
-   paramOut: bool;
-   paramOptional: bool;
-   paramCustomAttrs: ILAttributes;}
-  with
-    member CustomAttrs : ILAttributes
-    member Default : ILFieldInit option
-    member IsIn : bool
-    member IsOptional : bool
-    member IsOut : bool
-    member Marshal : ILNativeType option
-    member Name : string option
-    member Type : ILType
-  end
-

Instance Members

- - - - - - - - - - - -
MemberDescription
member CustomAttrs : ILAttributes
member Default : ILFieldInit option
member IsIn : bool
member IsOptional : bool
member IsOut : bool
member Marshal : ILNativeType option
member Name : string option
member Type : ILType
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPermission.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPermission.html deleted file mode 100644 index 86ea6947..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPermission.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILPermission -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILPermission


-
-
- - - -
-

Full Type Signature

-
type ILPermission = | PermissionSet of ILSecurityAction * byte []
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPermissions.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPermissions.html deleted file mode 100644 index aab8e0d2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPermissions.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILPermissions -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILPermissions


-
-
- - - -
-

Full Type Signature

-
type ILPermissions = | SecurityDecls of Lazy<ILPermission list>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPlatform.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPlatform.html deleted file mode 100644 index e5775dc7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPlatform.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILPlatform -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILPlatform


-
-
- - - -
-

Full Type Signature

-
type ILPlatform =
-  | X86
-  | AMD64
-  | IA64
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPropertyDef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPropertyDef.html deleted file mode 100644 index 3615b875..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILPropertyDef.html +++ /dev/null @@ -1,54 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILPropertyDef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILPropertyDef


-
-
- - - -
-

Full Type Signature

-
type ILPropertyDef =
-  {propName: string;
-   propRTSpecialName: bool;
-   propSpecialName: bool;
-   propSet: ILMethodRef option;
-   propGet: ILMethodRef option;
-   propCallconv: ILThisConvention;
-   propType: ILType;
-   propInit: ILFieldInit option;
-   propArgs: ILType list;
-   propCustomAttrs: ILAttributes;}
-  with
-    member Args : ILType list
-    member CallingConv : ILThisConvention
-    member CustomAttrs : ILAttributes
-    member GetMethod : ILMethodRef option
-    member Init : ILFieldInit option
-    member Name : string
-    member SetMethod : ILMethodRef option
-    member Type : ILType
-  end
-

Instance Members

- - - - - - - - - - - -
MemberDescription
member Args : ILType list
member CallingConv : ILThisConvention
member CustomAttrs : ILAttributes
member GetMethod : ILMethodRef option
member Init : ILFieldInit option
member Name : string
member SetMethod : ILMethodRef option
member Type : ILType
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResource.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResource.html deleted file mode 100644 index b2396259..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResource.html +++ /dev/null @@ -1,40 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILResource -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILResource


-
-
- - - -
-

Full Type Signature

-
type ILResource =
-  {resourceName: string;
-   resourceWhere: ILResourceLocation;
-   resourceAccess: ILResourceAccess;
-   resourceCustomAttrs: ILAttributes;}
-  with
-    member Access : ILResourceAccess
-    member CustomAttrs : ILAttributes
-    member Location : ILResourceLocation
-    member Name : string
-  end
-

Instance Members

- - - - - - - -
MemberDescription
member Access : ILResourceAccess
member CustomAttrs : ILAttributes
member Location : ILResourceLocation
member Name : string
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResourceAccess.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResourceAccess.html deleted file mode 100644 index 0de39686..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResourceAccess.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILResourceAccess -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILResourceAccess


-
-
- - - -
-

Full Type Signature

-
type ILResourceAccess =
-  | Resource_public
-  | Resource_private
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResourceLocation.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResourceLocation.html deleted file mode 100644 index da9e1b15..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResourceLocation.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILResourceLocation -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILResourceLocation


-
-
- - - -
-

Full Type Signature

-
type ILResourceLocation =
-  | Resource_local of (unit -> byte [])
-  | Resource_file of ILModuleRef * int32
-  | Resource_assembly of ILAssemblyRef
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResources.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResources.html deleted file mode 100644 index 8aa9fa90..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILResources.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILResources -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILResources


-
-
- - - -
-

Full Type Signature

-
type ILResources = | ILResources of Lazy<ILResource list>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILReturnValue.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILReturnValue.html deleted file mode 100644 index fe71afdc..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILReturnValue.html +++ /dev/null @@ -1,37 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILReturnValue -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILReturnValue


-
-
- - - -
-

Full Type Signature

-
type ILReturnValue =
-  {returnMarshal: ILNativeType option;
-   returnType: ILType;
-   returnCustomAttrs: ILAttributes;}
-  with
-    member CustomAttrs : ILAttributes
-    member Marshal : ILNativeType option
-    member Type : ILType
-  end
-

Instance Members

- - - - - - -
MemberDescription
member CustomAttrs : ILAttributes
member Marshal : ILNativeType option
member Type : ILType
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILScopeRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILScopeRef.html deleted file mode 100644 index 1e4beda2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILScopeRef.html +++ /dev/null @@ -1,57 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILScopeRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILScopeRef


-
-
- - - -
-

Full Type Signature

-
type ILScopeRef =
-  | ScopeRef_local
-  | ScopeRef_module of ILModuleRef
-  | ScopeRef_assembly of ILAssemblyRef
-  with
-    member AssemblyRef : ILAssemblyRef
-    member IsAssemblyRef : bool
-    member IsLocalRef : bool
-    member IsModuleRef : bool
-    member ModuleRef : ILModuleRef
-    member QualifiedName : string
-    member QualifiedNameWithNoShortMscorlib : string
-    static member Assembly : aref:ILAssemblyRef -> ILScopeRef
-    static member Module : mref:ILModuleRef -> ILScopeRef
-    static member Local : ILScopeRef
-  end
-

Instance Members

- - - - - - - - - - -
MemberDescription
member AssemblyRef : ILAssemblyRef
member IsAssemblyRef : bool
member IsLocalRef : bool
member IsModuleRef : bool
member ModuleRef : ILModuleRef
member QualifiedName : string
member QualifiedNameWithNoShortMscorlib : string
-
-

Static Members

- - - - - - -
MemberDescription
member Assembly : aref:ILAssemblyRef -> ILScopeRef
member Local : ILScopeRef
member Module : mref:ILModuleRef -> ILScopeRef
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILSecurityAction.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILSecurityAction.html deleted file mode 100644 index 92d62ffd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILSecurityAction.html +++ /dev/null @@ -1,38 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILSecurityAction -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILSecurityAction


-
-
- - - -
-

Full Type Signature

-
type ILSecurityAction =
-  | SecAction_request
-  | SecAction_demand
-  | SecAction_assert
-  | SecAction_deny
-  | SecAction_permitonly
-  | SecAction_linkcheck
-  | SecAction_inheritcheck
-  | SecAction_reqmin
-  | SecAction_reqopt
-  | SecAction_reqrefuse
-  | SecAction_prejitgrant
-  | SecAction_prejitdeny
-  | SecAction_noncasdemand
-  | SecAction_noncaslinkdemand
-  | SecAction_noncasinheritance
-  | SecAction_linkdemandchoice
-  | SecAction_inheritancedemandchoice
-  | SecAction_demandchoice
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILSourceDocument.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILSourceDocument.html deleted file mode 100644 index 814db241..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILSourceDocument.html +++ /dev/null @@ -1,51 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILSourceDocument -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILSourceDocument


-
-
- - - -
-

Full Type Signature

-
type ILSourceDocument =
-  {sourceLanguage: Guid option;
-   sourceVendor: Guid option;
-   sourceDocType: Guid option;
-   sourceFile: string;}
-  with
-    member DocumentType : Guid option
-    member File : string
-    member Language : Guid option
-    member Vendor : Guid option
-    static member
-      Create : language:Guid option * vendor:Guid option * docType:Guid option * file:string -> ILSourceDocument
-  end
-

Instance Members

- - - - - - - -
MemberDescription
member DocumentType : Guid option
member File : string
member Language : Guid option
member Vendor : Guid option
-
-

Static Members

- - - - -
MemberDescription
member
-  Create : language:Guid option * vendor:Guid option * docType:Guid option *
-           file:string -> ILSourceDocument
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILSourceMarker.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILSourceMarker.html deleted file mode 100644 index 36469a16..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILSourceMarker.html +++ /dev/null @@ -1,55 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILSourceMarker -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILSourceMarker


-
-
- - - -
-

Full Type Signature

-
type ILSourceMarker =
-  {sourceDocument: ILSourceDocument;
-   sourceLine: int;
-   sourceColumn: int;
-   sourceEndLine: int;
-   sourceEndColumn: int;}
-  with
-    member Column : int
-    member Document : ILSourceDocument
-    member EndColumn : int
-    member EndLine : int
-    member Line : int
-    static member
-      Create : document:ILSourceDocument * line:int * column:int * endLine:int * endColumn:int -> ILSourceMarker
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
member Column : int
member Document : ILSourceDocument
member EndColumn : int
member EndLine : int
member Line : int
override ToString : unit -> string
-
-

Static Members

- - - - -
MemberDescription
member
-  Create : document:ILSourceDocument * line:int * column:int * endLine:int *
-           endColumn:int -> ILSourceMarker
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILThisConvention.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILThisConvention.html deleted file mode 100644 index 05fcc875..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILThisConvention.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILThisConvention -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILThisConvention


-
-
- - - -
-

Full Type Signature

-
type ILThisConvention =
-  | CC_instance
-  | CC_instance_explicit
-  | CC_static
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTokenSpec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTokenSpec.html deleted file mode 100644 index cb556f8b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTokenSpec.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTokenSpec -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTokenSpec


-
-
- - - -
-

Full Type Signature

-
type ILTokenSpec =
-  | Token_type of ILType
-  | Token_method of ILMethodSpec
-  | Token_field of ILFieldSpec
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILType.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILType.html deleted file mode 100644 index 9365d66d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILType.html +++ /dev/null @@ -1,55 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILType -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILType


-
-
- - - -
-

Full Type Signature

-
type ILType =
-  | Type_void
-  | Type_array of ILArrayShape * ILType
-  | Type_value of ILTypeSpec
-  | Type_boxed of ILTypeSpec
-  | Type_ptr of ILType
-  | Type_byref of ILType
-  | Type_fptr of ILCallingSignature
-  | Type_tyvar of uint16
-  | Type_modified of bool * ILTypeRef * ILType
-  with
-    member AddQualifiedNameExtensionWithNoShortMscorlib : basic:string -> string
-    member BasicQualifiedName : string
-    member Boxity : ILBoxity
-    member GenericArgs : ILGenericArgs
-    member IsNominal : bool
-    member IsTyvar : bool
-    member QualifiedNameWithNoShortMscorlib : string
-    member TypeRef : ILTypeRef
-    member TypeSpec : ILTypeSpec
-  end
-

Instance Members

- - - - - - - - - - - - -
MemberDescription
member AddQualifiedNameExtensionWithNoShortMscorlib : basic:string -> string
member BasicQualifiedName : string
member Boxity : ILBoxity
member GenericArgs : ILGenericArgs
member IsNominal : bool
member IsTyvar : bool
member QualifiedNameWithNoShortMscorlib : string
member TypeRef : ILTypeRef
member TypeSpec : ILTypeSpec
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDef.html deleted file mode 100644 index 235545bd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDef.html +++ /dev/null @@ -1,105 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDef


-
-
- - - -
-

Full Type Signature

-
type ILTypeDef =
-  {tdKind: ILTypeDefKind;
-   tdName: string;
-   tdGenericParams: ILGenericParameterDefs;
-   tdAccess: ILTypeDefAccess;
-   tdAbstract: bool;
-   tdSealed: bool;
-   tdSerializable: bool;
-   tdComInterop: bool;
-   tdLayout: ILTypeDefLayout;
-   tdSpecialName: bool;
-   tdEncoding: ILDefaultPInvokeEncoding;
-   tdNested: ILTypeDefs;
-   tdImplements: ILType list;
-   tdExtends: ILType option;
-   tdMethodDefs: ILMethodDefs;
-   tdSecurityDecls: ILPermissions;
-   tdHasSecurity: bool;
-   tdFieldDefs: ILFieldDefs;
-   tdMethodImpls: ILMethodImplDefs;
-   tdInitSemantics: ILTypeDefInitSemantics;
-   tdEvents: ILEventDefs;
-   tdProperties: PropertyDefs;
-   tdCustomAttrs: ILAttributes;}
-  with
-    member Access : ILTypeDefAccess
-    member CustomAttrs : ILAttributes
-    member Encoding : ILDefaultPInvokeEncoding
-    member Events : ILEventDefs
-    member Extends : ILType option
-    member Fields : ILFieldDefs
-    member GenericParams : ILGenericParameterDefs
-    member HasSecurity : bool
-    member Implements : ILType list
-    member InitSemantics : ILTypeDefInitSemantics
-    member IsAbstract : bool
-    member IsClass : bool
-    member IsComInterop : bool
-    member IsDelegate : bool
-    member IsEnum : bool
-    member IsInterface : bool
-    member IsSealed : bool
-    member IsSerializable : bool
-    member IsSpecialName : bool
-    member IsValueType : bool
-    member Layout : ILTypeDefLayout
-    member MethodImpls : ILMethodImplDefs
-    member Methods : ILMethodDefs
-    member Name : string
-    member NestedTypes : ILTypeDefs
-    member Properties : PropertyDefs
-    member SecurityDecls : ILPermissions
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member Access : ILTypeDefAccess
member CustomAttrs : ILAttributes
member Encoding : ILDefaultPInvokeEncoding
member Events : ILEventDefs
member Extends : ILType option
member Fields : ILFieldDefs
member GenericParams : ILGenericParameterDefs
member HasSecurity : bool
member Implements : ILType list
member InitSemantics : ILTypeDefInitSemantics
member IsAbstract : bool
member IsClass : bool
member IsComInterop : bool
member IsDelegate : bool
member IsEnum : bool
member IsInterface : bool
member IsSealed : bool
member IsSerializable : bool
member IsSpecialName : bool
member IsValueType : bool
member Layout : ILTypeDefLayout
member MethodImpls : ILMethodImplDefs
member Methods : ILMethodDefs
member Name : string
member NestedTypes : ILTypeDefs
member Properties : PropertyDefs
member SecurityDecls : ILPermissions
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefAccess.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefAccess.html deleted file mode 100644 index e5d5c84a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefAccess.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefAccess -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefAccess


-
-
- - - -
-

Full Type Signature

-
type ILTypeDefAccess =
-  | TypeAccess_public
-  | TypeAccess_private
-  | TypeAccess_nested of ILMemberAccess
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefInitSemantics.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefInitSemantics.html deleted file mode 100644 index 5d9acc32..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefInitSemantics.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefInitSemantics -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefInitSemantics


-
-
- - - -
-

Full Type Signature

-
type ILTypeDefInitSemantics =
-  | TypeInit_beforefield
-  | TypeInit_beforeany
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefKind.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefKind.html deleted file mode 100644 index 14181b35..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefKind.html +++ /dev/null @@ -1,26 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefKind -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefKind


-
-
- - - -
-

Full Type Signature

-
type ILTypeDefKind =
-  | TypeDef_class
-  | TypeDef_valuetype
-  | TypeDef_interface
-  | TypeDef_enum
-  | TypeDef_delegate
-  | TypeDef_other of IlxExtensionTypeKind
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefLayout.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefLayout.html deleted file mode 100644 index 1eeb2c15..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefLayout.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefLayout -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefLayout


-
-
- - - -
-

Full Type Signature

-
type ILTypeDefLayout =
-  | TypeLayout_auto
-  | TypeLayout_sequential of ILTypeDefLayoutInfo
-  | TypeLayout_explicit of ILTypeDefLayoutInfo
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefLayoutInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefLayoutInfo.html deleted file mode 100644 index d1710b0c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefLayoutInfo.html +++ /dev/null @@ -1,34 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefLayoutInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefLayoutInfo


-
-
- - - -
-

Full Type Signature

-
type ILTypeDefLayoutInfo =
-  {typeSize: int32 option;
-   typePack: uint16 option;}
-  with
-    member Pack : uint16 option
-    member Size : int32 option
-  end
-

Instance Members

- - - - - -
MemberDescription
member Pack : uint16 option
member Size : int32 option
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefs.html deleted file mode 100644 index 8b9a624c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeDefs.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeDefs


-
-
- - - -
-

Full Type Signature

-
type ILTypeDefs =
-  | TypeDefTable of
-    Lazy<(string list * string * ILAttributes * Lazy<ILTypeDef>) array> * Lazy<TypeDefsMap>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeRef.html deleted file mode 100644 index df356de8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeRef.html +++ /dev/null @@ -1,65 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeRef


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type ILTypeRef =
-  {trefScope: ILScopeRef;
-   trefEnclosing: string list;
-   trefName: string;
-   hashCode: int;}
-  with
-    interface IComparable
-    member AddQualifiedNameExtensionWithNoShortMscorlib : basic:string -> string
-    member ApproxId : int
-    member BasicQualifiedName : string
-    member Enclosing : string list
-    member FullName : string
-    member Name : string
-    member QualifiedName : string
-    member QualifiedNameWithNoShortMscorlib : string
-    member Scope : ILScopeRef
-    static member Create : scope:ILScopeRef * enclosing:string list * name:string -> ILTypeRef
-  end
-

Instance Members

- - - - - - - - - - - - - - - - -
MemberDescription
override ( System-IComparable-CompareTo ) : yobj:obj -> int
member AddQualifiedNameExtensionWithNoShortMscorlib : basic:string -> string
member ApproxId : int
member BasicQualifiedName : string
member Enclosing : string list
override Equals : yobj:obj -> bool
member FullName : string
override GetHashCode : unit -> int
member Name : string
member QualifiedName : string
member QualifiedNameWithNoShortMscorlib : string
member Scope : ILScopeRef
override ToString : unit -> string
-
-

Static Members

- - - - -
MemberDescription
member
-  Create : scope:ILScopeRef * enclosing:string list * name:string -> ILTypeRef
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeSpec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeSpec.html deleted file mode 100644 index 44f22a28..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILTypeSpec.html +++ /dev/null @@ -1,53 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeSpec -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILTypeSpec


-
-
- - - -
-

Full Type Signature

-
type ILTypeSpec =
-  {tspecTypeRef: ILTypeRef;
-   tspecInst: ILGenericArgs;}
-  with
-    member AddQualifiedNameExtensionWithNoShortMscorlib : basic:string -> string
-    member BasicQualifiedName : string
-    member Enclosing : string list
-    member GenericArgs : ILGenericArgs
-    member Name : string
-    member Scope : ILScopeRef
-    member TypeRef : ILTypeRef
-    static member Create : tref:ILTypeRef * inst:ILGenericArgs -> ILTypeSpec
-  end
-

Instance Members

- - - - - - - - - - - -
MemberDescription
member AddQualifiedNameExtensionWithNoShortMscorlib : basic:string -> string
member BasicQualifiedName : string
member Enclosing : string list
member GenericArgs : ILGenericArgs
member Name : string
member Scope : ILScopeRef
override ToString : unit -> string
member TypeRef : ILTypeRef
-
-

Static Members

- - - - -
MemberDescription
member Create : tref:ILTypeRef * inst:ILGenericArgs -> ILTypeSpec
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILVersionInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILVersionInfo.html deleted file mode 100644 index e543d27b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ILVersionInfo.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILVersionInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ILVersionInfo


-
-
- - - -
Note: an abbreviation for uint16 * uint16 * uint16 * uint16 -

Full Type Signature

-
type ILVersionInfo = uint16 * uint16 * uint16 * uint16
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_IlxExtensionInstr.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_IlxExtensionInstr.html deleted file mode 100644 index bb6c0234..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_IlxExtensionInstr.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.IlxExtensionInstr -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.IlxExtensionInstr


-
-
- - - -
-

Full Type Signature

-
type IlxExtensionInstr = | Ext_instr of obj
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_IlxExtensionType.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_IlxExtensionType.html deleted file mode 100644 index c01d9a15..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_IlxExtensionType.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.IlxExtensionType -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.IlxExtensionType


-
-
- - - -
-

Full Type Signature

-
type IlxExtensionType = | Ext_typ of obj
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_IlxExtensionTypeKind.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_IlxExtensionTypeKind.html deleted file mode 100644 index f715c0e4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_IlxExtensionTypeKind.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.IlxExtensionTypeKind -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.IlxExtensionTypeKind


-
-
- - - -
-

Full Type Signature

-
type IlxExtensionTypeKind = | Ext_type_def_kind of obj
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_LazyMethodBody.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_LazyMethodBody.html deleted file mode 100644 index 62368e22..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_LazyMethodBody.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.LazyMethodBody -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.LazyMethodBody


-
-
- - - -
-

Full Type Signature

-
type LazyMethodBody = | LazyMethodBody of Lazy<MethodBody>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_LazyOrderedMultiMap-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_LazyOrderedMultiMap-2.html deleted file mode 100644 index 257844f8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_LazyOrderedMultiMap-2.html +++ /dev/null @@ -1,49 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.LazyOrderedMultiMap -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.LazyOrderedMultiMap


-
-
- - - -
- This is used to store event, property and field maps. - - Review: this is not such a great data structure. - -

Full Type Signature

-
type LazyOrderedMultiMap<'key,'data> =
-  class
-    new : keyf:('data -> 'key) * lazyItems:Lazy<'data list> -> LazyOrderedMultiMap<'key,'data>
-    member Add : y:'data -> LazyOrderedMultiMap<'key,'data>
-    member Entries : unit -> 'data list
-    member Filter : f:('data -> bool) -> LazyOrderedMultiMap<'key,'data>
-    member Item : x:'key -> 'data list with get
-  end
-

Instance Members

- - - - - - - -
MemberDescription
member Add : y:'data -> LazyOrderedMultiMap<'key,'data>
member Entries : unit -> 'data list
member Filter : f:('data -> bool) -> LazyOrderedMultiMap<'key,'data>
member Item : x:'key -> 'data list with get
-
-

Static Members

- - - - -
MemberDescription
new : keyf:('data -> 'key) * lazyItems:Lazy<'data list> ->
-        LazyOrderedMultiMap<'key,'data>
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Local.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Local.html deleted file mode 100644 index f7064bef..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Local.html +++ /dev/null @@ -1,34 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Local -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Local


-
-
- - - -
-

Full Type Signature

-
type Local =
-  {localType: ILType;
-   localPinned: bool;}
-  with
-    member IsPinned : bool
-    member Type : ILType
-  end
-

Instance Members

- - - - - -
MemberDescription
member IsPinned : bool
member Type : ILType
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Locale.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Locale.html deleted file mode 100644 index 1f037d6c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Locale.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Locale -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Locale


-
-
- - - -
Note: an abbreviation for string -

Full Type Signature

-
type Locale = string
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodBody.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodBody.html deleted file mode 100644 index fe141b6b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodBody.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.MethodBody -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.MethodBody


-
-
- - - -
-

Full Type Signature

-
type MethodBody =
-  | MethodBody_il of ILMethodBody
-  | MethodBody_pinvoke of PInvokeMethod
-  | MethodBody_abstract
-  | MethodBody_native
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodCodeKind.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodCodeKind.html deleted file mode 100644 index ccb6ca86..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodCodeKind.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.MethodCodeKind -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.MethodCodeKind


-
-
- - - -
-

Full Type Signature

-
type MethodCodeKind =
-  | MethodCodeKind_il
-  | MethodCodeKind_native
-  | MethodCodeKind_runtime
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodDefMap.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodDefMap.html deleted file mode 100644 index c6d3d60b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodDefMap.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.MethodDefMap -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.MethodDefMap


-
-
- - - -
Note: an abbreviation for Map<string,ILMethodDef list> -

Full Type Signature

-
type MethodDefMap = Map<string,ILMethodDef list>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodImplsMap.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodImplsMap.html deleted file mode 100644 index f544e0d1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodImplsMap.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.MethodImplsMap -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.MethodImplsMap


-
-
- - - -
Note: an abbreviation for Map<(string * int),ILMethodImplDef list> -

Full Type Signature

-
type MethodImplsMap = Map<(string * int),ILMethodImplDef list>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodKind.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodKind.html deleted file mode 100644 index 593aaa5f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_MethodKind.html +++ /dev/null @@ -1,25 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.MethodKind -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.MethodKind


-
-
- - - -
-

Full Type Signature

-
type MethodKind =
-  | MethodKind_static
-  | MethodKind_cctor
-  | MethodKind_ctor
-  | MethodKind_nonvirtual
-  | MethodKind_virtual of ILMethodVirtualInfo
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_NamespaceAndTypename.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_NamespaceAndTypename.html deleted file mode 100644 index edf892d9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_NamespaceAndTypename.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.NamespaceAndTypename -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.NamespaceAndTypename


-
-
- - - -
Note: an abbreviation for string list * string -

Full Type Signature

-
type NamespaceAndTypename = string list * string
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_NestedExportedTypesMap.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_NestedExportedTypesMap.html deleted file mode 100644 index 17cd951d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_NestedExportedTypesMap.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.NestedExportedTypesMap -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.NestedExportedTypesMap


-
-
- - - -
Note: an abbreviation for Map<string,ILNestedExportedType> -

Full Type Signature

-
type NestedExportedTypesMap = Map<string,ILNestedExportedType>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_OverridesSpec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_OverridesSpec.html deleted file mode 100644 index 2b3eb86b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_OverridesSpec.html +++ /dev/null @@ -1,33 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.OverridesSpec -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.OverridesSpec


-
-
- - - -
-

Full Type Signature

-
type OverridesSpec =
-  | OverridesSpec of ILMethodRef * ILType
-  with
-    member EnclosingType : ILType
-    member MethodRef : ILMethodRef
-  end
-

Instance Members

- - - - - -
MemberDescription
member EnclosingType : ILType
member MethodRef : ILMethodRef
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeCallingConvention.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeCallingConvention.html deleted file mode 100644 index 83a59045..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeCallingConvention.html +++ /dev/null @@ -1,26 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PInvokeCallingConvention -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PInvokeCallingConvention


-
-
- - - -
-

Full Type Signature

-
type PInvokeCallingConvention =
-  | PInvokeCallConvNone
-  | PInvokeCallConvCdecl
-  | PInvokeCallConvStdcall
-  | PInvokeCallConvThiscall
-  | PInvokeCallConvFastcall
-  | PInvokeCallConvWinapi
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeCharBestFit.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeCharBestFit.html deleted file mode 100644 index 05ccb762..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeCharBestFit.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PInvokeCharBestFit -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PInvokeCharBestFit


-
-
- - - -
-

Full Type Signature

-
type PInvokeCharBestFit =
-  | PInvokeBestFitUseAssem
-  | PInvokeBestFitEnabled
-  | PInvokeBestFitDisabled
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeCharEncoding.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeCharEncoding.html deleted file mode 100644 index bb9824ec..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeCharEncoding.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PInvokeCharEncoding -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PInvokeCharEncoding


-
-
- - - -
-

Full Type Signature

-
type PInvokeCharEncoding =
-  | PInvokeEncodingNone
-  | PInvokeEncodingAnsi
-  | PInvokeEncodingUnicode
-  | PInvokeEncodingAuto
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeMethod.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeMethod.html deleted file mode 100644 index 2b11f3ec..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeMethod.html +++ /dev/null @@ -1,52 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PInvokeMethod -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PInvokeMethod


-
-
- - - -
-

Full Type Signature

-
type PInvokeMethod =
-  {pinvokeWhere: ILModuleRef;
-   pinvokeName: string;
-   pinvokeCallconv: PInvokeCallingConvention;
-   PInvokeCharEncoding: PInvokeCharEncoding;
-   pinvokeNoMangle: bool;
-   pinvokeLastErr: bool;
-   PInvokeThrowOnUnmappableChar: PInvokeThrowOnUnmappableChar;
-   PInvokeCharBestFit: PInvokeCharBestFit;}
-  with
-    member CallingConv : PInvokeCallingConvention
-    member CharBestFit : PInvokeCharBestFit
-    member CharEncoding : PInvokeCharEncoding
-    member LastError : bool
-    member Name : string
-    member NoMangle : bool
-    member ThrowOnUnmappableChar : PInvokeThrowOnUnmappableChar
-    member Where : ILModuleRef
-  end
-

Instance Members

- - - - - - - - - - - -
MemberDescription
member CallingConv : PInvokeCallingConvention
member CharBestFit : PInvokeCharBestFit
member CharEncoding : PInvokeCharEncoding
member LastError : bool
member Name : string
member NoMangle : bool
member ThrowOnUnmappableChar : PInvokeThrowOnUnmappableChar
member Where : ILModuleRef
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeThrowOnUnmappableChar.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeThrowOnUnmappableChar.html deleted file mode 100644 index 99ac93ae..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PInvokeThrowOnUnmappableChar.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PInvokeThrowOnUnmappableChar -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PInvokeThrowOnUnmappableChar


-
-
- - - -
-

Full Type Signature

-
type PInvokeThrowOnUnmappableChar =
-  | PInvokeThrowOnUnmappableCharUseAssem
-  | PInvokeThrowOnUnmappableCharEnabled
-  | PInvokeThrowOnUnmappableCharDisabled
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PropertyDefs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PropertyDefs.html deleted file mode 100644 index 014135a9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PropertyDefs.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PropertyDefs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PropertyDefs


-
-
- - - -
-

Full Type Signature

-
type PropertyDefs = | Properties of LazyOrderedMultiMap<string,ILPropertyDef>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PublicKey.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PublicKey.html deleted file mode 100644 index d2683f84..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_PublicKey.html +++ /dev/null @@ -1,48 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PublicKey -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.PublicKey


-
-
- - - -
-

Full Type Signature

-
type PublicKey =
-  | PublicKey of byte []
-  | PublicKeyToken of byte []
-  with
-    member ToToken : unit -> byte array
-    member IsKey : bool
-    member IsKeyToken : bool
-    member Key : byte []
-    member KeyToken : byte []
-    static member KeyAsToken : k:byte [] -> PublicKey
-  end
-

Instance Members

- - - - - - - - -
MemberDescription
member IsKey : bool
member IsKeyToken : bool
member Key : byte []
member KeyToken : byte []
member ToToken : unit -> byte array
-
-

Static Members

- - - - -
MemberDescription
member KeyAsToken : k:byte [] -> PublicKey
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ReadonlySpec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ReadonlySpec.html deleted file mode 100644 index 67039bfc..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_ReadonlySpec.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ReadonlySpec -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.ReadonlySpec


-
-
- - - -
-

Full Type Signature

-
type ReadonlySpec =
-  | ReadonlyAddress
-  | NormalAddress
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Tailcall.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Tailcall.html deleted file mode 100644 index b98493bc..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Tailcall.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Tailcall -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Tailcall


-
-
- - - -
-

Full Type Signature

-
type Tailcall =
-  | Tailcall
-  | Normalcall
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_TypeDefsMap.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_TypeDefsMap.html deleted file mode 100644 index f02b7228..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_TypeDefsMap.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.TypeDefsMap -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.TypeDefsMap


-
-
- - - -
- keyed first on namespace then on type name. The namespace is often a unique key for a given type map. - Note: an abbreviation for Map<string list,Dictionary<string,Lazy<ILTypeDef>>> -

Full Type Signature

-
type TypeDefsMap = Map<string list,Dictionary<string,Lazy<ILTypeDef>>>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Volatility.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Volatility.html deleted file mode 100644 index 0d998273..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type_Volatility.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Volatility -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.Volatility


-
-
- - - -
-

Full Type Signature

-
type Volatility =
-  | Volatile
-  | Nonvolatile
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type__varargs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type__varargs.html deleted file mode 100644 index a9c624af..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.type__varargs.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.varargs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL.varargs


-
-
- - - -
Note: an abbreviation for ILType list option -

Full Type Signature

-
type varargs = ILType list option
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.html deleted file mode 100644 index 1a661db8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.html +++ /dev/null @@ -1,25 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL -
-
-

[Home] Namespace FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack.Metadata')

- - - - -
ModuleDescription
FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.html deleted file mode 100644 index 0c4b1c49..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.html +++ /dev/null @@ -1,513 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Pickle -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Pickle


-
-
- - - -
-

Type Definitions

- - - - - - - - - - -
TypeDescription
type itbl
type osgn_inmap
type PickledDataWithReferences
type ReaderState
type sizes Note: an abbreviation for int * int * int
type tbl
type unpickler Note: an abbreviation for ReaderState -> 'a
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add_entry : 'a tbl -> 'a -> int
val decode_ccuref : 'a -> 'a
val decode_nlpath :
-  ReaderState -> ccu itbl -> string itbl -> int * int array -> NonLocalPath
val decode_pubpath : ReaderState -> string itbl -> int array * int -> PublicPath
val decode_simpletyp :
-  ReaderState -> 'a -> string itbl -> NonLocalPath itbl -> int * int -> typ
val decode_string : 'a -> 'a
val decode_tab : (ReaderState -> ILInstr) array
val decoders : (int * (ReaderState -> ILInstr)) list
val dummy : 'a -> 'a
val encode_ccuref : string tbl -> CcuThunk -> int
val encode_instr : ILInstr -> int
val encode_string : 'a tbl -> 'a -> int
val encode_table : Dictionary<ILInstr,int>
val encode_uniq : 'a tbl -> 'a -> int
val ffailwith : string -> string -> 'a
val fill_u_attribs : (Attribs unpickler -> unit)
val fill_u_binds : (Bindings unpickler -> unit)
val fill_u_constraints : (StaticOptimization list unpickler -> unit)
val fill_u_Exprs : (Exprs unpickler -> unit)
val fill_u_FlatExprs : (FlatExprs unpickler -> unit)
val fill_u_FlatVals : (FlatVals unpickler -> unit)
val fill_u_iltyp : (ILType unpickler -> unit)
val fill_u_targets : (DecisionTreeTarget array unpickler -> unit)
val fill_u_typ : (typ unpickler -> unit)
val fill_u_Vals : (Val list unpickler -> unit)
val find_or_add_entry : 'a tbl -> 'a -> int
val float32_of_bits : int32 -> float32
val float_of_bits : int64 -> float
val get_tbl : 'a tbl -> 'a array
val is_noarg_instr : ILInstr -> bool
val itag_add : int
val itag_add_ovf : int
val itag_add_ovf_un : int
val itag_and : int
val itag_arglist : int
val itag_beq : int
val itag_bge : int
val itag_bge_un : int
val itag_bgt : int
val itag_bgt_un : int
val itag_ble : int
val itag_ble_un : int
val itag_blt : int
val itag_blt_un : int
val itag_bne_un : int
val itag_box : int
val itag_br : int
val itag_break : int
val itag_brfalse : int
val itag_brtrue : int
val itag_call : int
val itag_callconstrained : int
val itag_calli : int
val itag_callvirt : int
val itag_castclass : int
val itag_ceq : int
val itag_cgt : int
val itag_cgt_un : int
val itag_ckfinite : int
val itag_clt : int
val itag_clt_un : int
val itag_constrained : int
val itag_conv : int
val itag_conv_ovf : int
val itag_conv_ovf_un : int
val itag_conv_un : int
val itag_cpblk : int
val itag_cpobj : int
val itag_div : int
val itag_div_un : int
val itag_dup : int
val itag_endfilter : int
val itag_endfinally : int
val itag_ilzero : int
val itag_initblk : int
val itag_initobj : int
val itag_isinst : int
val itag_jmp : int
val itag_ldarg : int
val itag_ldarga : int
val itag_ldc : int
val itag_ldelem : int
val itag_ldelem_any : int
val itag_ldelema : int
val itag_ldfld : int
val itag_ldflda : int
val itag_ldftn : int
val itag_ldind : int
val itag_ldlen : int
val itag_ldlen_multi : int
val itag_ldloc : int
val itag_ldloca : int
val itag_ldnull : int
val itag_ldobj : int
val itag_ldsfld : int
val itag_ldsflda : int
val itag_ldstr : int
val itag_ldtoken : int
val itag_ldunit : int
val itag_ldvirtftn : int
val itag_leave : int
val itag_localloc : int
val itag_mkrefany : int
val itag_mul : int
val itag_mul_ovf : int
val itag_mul_ovf_un : int
val itag_neg : int
val itag_newarr : int
val itag_newobj : int
val itag_nop : int
val itag_not : int
val itag_or : int
val itag_pop : int
val itag_readonly : int
val itag_refanytype : int
val itag_refanyval : int
val itag_rem : int
val itag_rem_un : int
val itag_ret : int
val itag_rethrow : int
val itag_shl : int
val itag_shr : int
val itag_shr_un : int
val itag_sizeof : int
val itag_starg : int
val itag_stelem : int
val itag_stelem_any : int
val itag_stfld : int
val itag_stind : int
val itag_stloc : int
val itag_stobj : int
val itag_stsfld : int
val itag_sub : int
val itag_sub_ovf : int
val itag_sub_ovf_un : int
val itag_switch : int
val itag_tail : int
val itag_throw : int
val itag_unaligned : int
val itag_unbox : int
val itag_unbox_any : int
val itag_volatile : int
val itag_xor : int
val lookup_ccuref : ReaderState -> 'a itbl -> int -> 'a
val lookup_nlpath : ReaderState -> 'a itbl -> int -> 'a
val lookup_pubpath : ReaderState -> 'a itbl -> int -> 'a
val lookup_simpletyp : ReaderState -> 'a itbl -> int -> 'a
val lookup_string : ReaderState -> 'a itbl -> int -> 'a
val lookup_uniq : ReaderState -> 'a itbl -> int -> 'a
val new_itbl : string -> 'a array -> 'a itbl
val new_osgn_inmap :
-  (unit -> 'a) ->
-    ('a -> 'b -> unit) ->
-      ('a -> bool) -> string -> int -> osgn_inmap<'b,'a>
val new_tbl : string -> 'a tbl
val prim_u_int32 : ReaderState -> int32
val simple_instrs : (int * ILInstr) list
val tbl_size : 'a tbl -> int
val u_access : ReaderState -> Accessibility
val u_alignment : ReaderState -> Alignment
val u_arg : ReaderState -> expr * typ
val u_array : (ReaderState -> 'a) -> ReaderState -> 'a array
val u_array_revi : (ReaderState -> int32 -> 'a) -> ReaderState -> 'a array
val u_array_shape : ILArrayShape unpickler
val u_assref : ReaderState -> ILAssemblyRef
val u_attrib : ReaderState -> Attrib
val u_attrib_arg : ReaderState -> AttribNamedArg
val u_attrib_expr : ReaderState -> AttribExpr
val u_attribkind : ReaderState -> AttribKind
val u_attribs : (ReaderState -> Attribs)
val u_basethis : ReaderState -> ValBaseOrThisInfo
val u_basic_callconv : ReaderState -> ILArgumentConvention
val u_bind : ReaderState -> Binding
val u_binds : (ReaderState -> Bindings)
val u_bool : ReaderState -> bool
val u_byte : ReaderState -> int32
val u_bytes : ReaderState -> byte array
val u_callconv : ReaderState -> ILCallingConv
val u_callsig : ILCallingSignature unpickler
val u_ccuref : ReaderState -> CcuThunk
val u_char : ReaderState -> char
val u_const : ReaderState -> Constant
val u_constraint : ReaderState -> StaticOptimization
val u_constraints : (ReaderState -> StaticOptimization list)
val u_cpath : ReaderState -> CompilationPath
val u_double : ReaderState -> float
val u_dtree : ReaderState -> DecisionTree
val u_dtree_case : ReaderState -> DecisionTreeCase
val u_dtree_discrim : ReaderState -> DecisionTreeDiscriminator
val u_dummy_range : ReaderState -> range
val u_encoded_ccuref : (ReaderState -> string)
val u_encoded_nlpath : (ReaderState -> int32 * int32 array)
val u_encoded_pubpath : (ReaderState -> int32 array * int32)
val u_encoded_simpletyp : (ReaderState -> int32 * int32)
val u_encoded_string : (ReaderState -> string)
val u_entity_spec_data : ReaderState -> EntityData
val u_exnc_repr : ReaderState -> ExceptionInfo
val u_exnc_spec : ReaderState -> Tycon
val u_exnc_spec_data : ReaderState -> EntityData
val u_expr : ReaderState -> expr
val u_Exprs : (ReaderState -> Exprs)
val u_FlatExprs : (ReaderState -> FlatExprs)
val u_FlatList : (ReaderState -> 'a) -> ReaderState -> 'a list
val u_FlatVals : (ReaderState -> FlatVals)
val u_hasthis : ReaderState -> ILThisConvention
val u_hole : unit -> ('a unpickler -> unit) * (ReaderState -> 'a)
val u_ident : ReaderState -> ident
val u_ieee64 : ReaderState -> float
val u_ilfref : ReaderState -> ILFieldRef
val u_ilinstr : ReaderState -> ILInstr
val u_ilmref : ReaderState -> ILMethodRef
val u_iltref : ReaderState -> ILTypeRef
val u_iltspec : ReaderState -> ILTypeSpec
val u_iltyp : (ReaderState -> ILType)
val u_iltyps : (ReaderState -> ILType list)
val u_immutable_ref : 'a unpickler -> 'a ref unpickler
val u_int : ReaderState -> int32
val u_int16 : ReaderState -> int16
val u_int32 : ReaderState -> int32
val u_int64 : ReaderState -> int64
val u_int8 : ReaderState -> sbyte
val u_intf : ReaderState -> typ * ObjExprMethod list
val u_intfs : ReaderState -> (typ * ObjExprMethod list) list
val u_ints : (ReaderState -> int32 list)
val u_istype : ReaderState -> ModuleOrNamespaceKind
val u_kind : ReaderState -> TyparKind
val u_lazy : (ReaderState -> 'a) -> ReaderState -> Lazy<'a>
val u_ldc_info : ReaderState -> ILConstSpec
val u_ldtoken_info : ReaderState -> ILTokenSpec
val u_list : (ReaderState -> 'a) -> ReaderState -> 'a list
val u_list_revi : (ReaderState -> int32 -> 'a) -> ReaderState -> 'a list
val u_local_item_ref : osgn_inmap<'a,'b> -> ReaderState -> 'b
val u_lval_op_kind : ReaderState -> LValueOperation
val u_Map :
-  (ReaderState -> 'a) -> (ReaderState -> 'b) -> Map<'a,'b> unpickler
val u_measure_expr : ReaderState -> measure
val u_member_info : ReaderState -> ValMemberInfo
val u_member_kind : ReaderState -> MemberKind
val u_MemberFlags : ReaderState -> MemberFlags
val u_method : ReaderState -> ObjExprMethod
val u_methods : ReaderState -> ObjExprMethod list
val u_modref : ReaderState -> ILModuleRef
val u_modul_typ : ReaderState -> ModuleOrNamespaceType
val u_mustinline : ReaderState -> ValInlineInfo
val u_namemap : (ReaderState -> 'a) -> Map<string,'a> unpickler
val u_nlpath : ReaderState -> NonLocalPath
val u_nonlocal_item_ref : unit -> ReaderState -> NonLocalItemRef
val u_op : ReaderState -> ExprOpSpec
val u_option : (ReaderState -> 'a) -> ReaderState -> 'a option
val u_osgn_decl :
-  osgn_inmap<'a,'b> -> (ReaderState -> 'a) -> ReaderState -> 'b
val u_osgn_ref : osgn_inmap<'a,'b> -> ReaderState -> 'b
val u_parentref : ReaderState -> ParentRef
val u_pos : ReaderState -> pos
val u_prim_string : ReaderState -> string
val u_pubkey : ReaderState -> PublicKey
val u_pubpath : ReaderState -> PublicPath
val u_range : ReaderState -> range
val u_ranges : (ReaderState -> (range * range) option)
val u_readonly : ReaderState -> ReadonlySpec
val u_recdfield_spec : ReaderState -> RecdField
val u_recdInfo : ReaderState -> RecordConstructionInfo
val u_rfield_table : ReaderState -> TyconRecdFields
val u_rfref : ReaderState -> RecdFieldRef
val u_scoref : ReaderState -> ILScopeRef
val u_simpletyp : ReaderState -> typ
val u_single : ReaderState -> float32
val u_slotparam : ReaderState -> SlotParam
val u_slotsig : ReaderState -> SlotSig
val u_string : ReaderState -> string
val u_strings : (ReaderState -> string list)
val u_tailness : ReaderState -> Tailcall
val u_target : ReaderState -> DecisionTreeTarget
val u_targets : (ReaderState -> DecisionTreeTarget array)
val u_tcaug : ReaderState -> TyconAugmentation
val u_tcref : ReaderState -> EntityRef
val u_TopArgInfo : ReaderState -> TopArgInfo
val u_TopTyparInfo : ReaderState -> TopTyparInfo
val u_tpref : ReaderState -> Typar
val u_trait : ReaderState -> TraitConstraintInfo
val u_trait_sln : ReaderState -> TraitConstraintSln
val u_tup2 :
-  (ReaderState -> 'a) -> (ReaderState -> 'b) -> ReaderState -> 'a * 'b
val u_tup3 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) -> (ReaderState -> 'c) -> ReaderState -> 'a * 'b * 'c
val u_tup4 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) -> ReaderState -> 'a * 'b * 'c * 'd
val u_tup5 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) -> ReaderState -> 'a * 'b * 'c * 'd * 'e
val u_tup6 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) ->
-            (ReaderState -> 'f) -> ReaderState -> 'a * 'b * 'c * 'd * 'e * 'f
val u_tycon_objmodel_data : ReaderState -> TyconObjModelData
val u_tycon_objmodel_kind : ReaderState -> TyconObjModelKind
val u_tycon_repr : ReaderState -> TyconRepresentation
val u_tycon_spec : ReaderState -> Tycon
val u_typ : (ReaderState -> typ)
val u_typar_constraint : ReaderState -> (int -> TyparConstraint)
val u_typar_constraints : (ReaderState -> TyparConstraint list)
val u_typar_spec : ReaderState -> Typar
val u_typar_spec_data : ReaderState -> TyparData
val u_typar_specs : (ReaderState -> Typar list)
val u_typs : (ReaderState -> typ list)
val u_ucref : ReaderState -> UnionCaseRef
val u_uint16 : ReaderState -> uint16
val u_uint32 : ReaderState -> uint32
val u_uint64 : ReaderState -> uint64
val u_uint8 : ReaderState -> byte
val u_unioncase_spec : ReaderState -> UnionCase
val u_unit : ReaderState -> unit
val u_Val : ReaderState -> Val
val u_val_repr : ReaderState -> expr
val u_ValData : ReaderState -> ValData
val u_Vals : (ReaderState -> Val list)
val u_ValTopReprInfo : ReaderState -> ValTopReprInfo
val u_varargs : (ReaderState -> ILType list option)
val u_version : ReaderState -> uint16 * uint16 * uint16 * uint16
val u_void : ReaderState -> unit
val u_volatility : ReaderState -> Volatility
val u_vref : ReaderState -> ValRef
val u_vrefFlags : ReaderState -> ValUseFlag
val u_vrefs : (ReaderState -> ValRef list)
val u_wrap : ('b -> 'a) -> 'b unpickler -> ReaderState -> 'a
val u_xmldoc : ReaderState -> XmlDoc
val ubasic_type : ReaderState -> ILBasicType
val ufailwith : ReaderState -> string -> 'a
val uilfspec : ReaderState -> ILFieldSpec
val uilmspec : ReaderState -> ILMethodSpec
val unpickle_modul_spec : ReaderState -> Tycon
val unpickle_obj_with_dangling_ccus :
-  string ->
-    ILScopeRef ->
-      (ReaderState -> 'a) -> byte [] -> PickledDataWithReferences<'a>
val UnpickleModuleInfo : ReaderState -> PickledModuleInfo
val utup10 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) ->
-            (ReaderState -> 'f) ->
-              (ReaderState -> 'g) ->
-                (ReaderState -> 'h) ->
-                  (ReaderState -> 'i) ->
-                    (ReaderState -> 'j) ->
-                      ReaderState ->
-                        'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j
val utup11 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) ->
-            (ReaderState -> 'f) ->
-              (ReaderState -> 'g) ->
-                (ReaderState -> 'h) ->
-                  (ReaderState -> 'i) ->
-                    (ReaderState -> 'j) ->
-                      (ReaderState -> 'k) ->
-                        ReaderState ->
-                          'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j * 'k
val utup12 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) ->
-            (ReaderState -> 'f) ->
-              (ReaderState -> 'g) ->
-                (ReaderState -> 'h) ->
-                  (ReaderState -> 'i) ->
-                    (ReaderState -> 'j) ->
-                      (ReaderState -> 'k) ->
-                        (ReaderState -> 'l) ->
-                          ReaderState ->
-                            'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j * 'k *
-                            'l
val utup13 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) ->
-            (ReaderState -> 'f) ->
-              (ReaderState -> 'g) ->
-                (ReaderState -> 'h) ->
-                  (ReaderState -> 'i) ->
-                    (ReaderState -> 'j) ->
-                      (ReaderState -> 'k) ->
-                        (ReaderState -> 'l) ->
-                          (ReaderState -> 'm) ->
-                            ReaderState ->
-                              'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j *
-                              'k * 'l * 'm
val utup14 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) ->
-            (ReaderState -> 'f) ->
-              (ReaderState -> 'g) ->
-                (ReaderState -> 'h) ->
-                  (ReaderState -> 'i) ->
-                    (ReaderState -> 'j) ->
-                      (ReaderState -> 'k) ->
-                        (ReaderState -> 'l) ->
-                          (ReaderState -> 'm) ->
-                            (ReaderState -> 'n) ->
-                              ReaderState ->
-                                'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i * 'j *
-                                'k * 'l * 'm * 'n
val utup15 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) ->
-            (ReaderState -> 'f) ->
-              (ReaderState -> 'g) ->
-                (ReaderState -> 'h) ->
-                  (ReaderState -> 'i) ->
-                    (ReaderState -> 'j) ->
-                      (ReaderState -> 'k) ->
-                        (ReaderState -> 'l) ->
-                          (ReaderState -> 'm) ->
-                            (ReaderState -> 'n) ->
-                              (ReaderState -> 'o) ->
-                                ReaderState ->
-                                  'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i *
-                                  'j * 'k * 'l * 'm * 'n * 'o
val utup7 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) ->
-            (ReaderState -> 'f) ->
-              (ReaderState -> 'g) ->
-                ReaderState -> 'a * 'b * 'c * 'd * 'e * 'f * 'g
val utup8 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) ->
-            (ReaderState -> 'f) ->
-              (ReaderState -> 'g) ->
-                (ReaderState -> 'h) ->
-                  ReaderState -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h
val utup9 :
-  (ReaderState -> 'a) ->
-    (ReaderState -> 'b) ->
-      (ReaderState -> 'c) ->
-        (ReaderState -> 'd) ->
-          (ReaderState -> 'e) ->
-            (ReaderState -> 'f) ->
-              (ReaderState -> 'g) ->
-                (ReaderState -> 'h) ->
-                  (ReaderState -> 'i) ->
-                    ReaderState -> 'a * 'b * 'c * 'd * 'e * 'f * 'g * 'h * 'i
val verbose : bool
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type_PickledDataWithReferences-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type_PickledDataWithReferences-1.html deleted file mode 100644 index 58fe1403..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type_PickledDataWithReferences-1.html +++ /dev/null @@ -1,36 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Pickle.PickledDataWithReferences -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Pickle.PickledDataWithReferences


-
-
- - - -
-

Full Type Signature

-
type PickledDataWithReferences<'rawData> =
-  {RawData: 'rawData;
-   FixupThunks: CcuThunk list;}
-  with
-    member Fixup : loader:(string -> CcuThunk) -> 'rawData
-    member OptionalFixup : loader:(string -> CcuThunk option) -> 'rawData
-  end
-

Instance Members

- - - - - -
MemberDescription
member Fixup : loader:(string -> CcuThunk) -> 'rawData
member OptionalFixup : loader:(string -> CcuThunk option) -> 'rawData
- Like Fixup but loader may return None, in which case there is no fixup. -
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Pickle
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type_ReaderState.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type_ReaderState.html deleted file mode 100644 index adf767ad..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type_ReaderState.html +++ /dev/null @@ -1,31 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Pickle.ReaderState -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Pickle.ReaderState


-
-
- - - -
-

Full Type Signature

-
type ReaderState =
-  {is: t;
-   iilscope: ILScopeRef;
-   iccus: CcuThunk itbl;
-   itycons: osgn_inmap<EntityData,Tycon>;
-   itypars: osgn_inmap<TyparData,Typar>;
-   ivals: osgn_inmap<ValData,Val>;
-   istrings: string itbl;
-   ipubpaths: PublicPath itbl;
-   inlpaths: NonLocalPath itbl;
-   isimpletyps: typ itbl;
-   ifile: string;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Pickle
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__itbl-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__itbl-1.html deleted file mode 100644 index e3a2d29d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__itbl-1.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Pickle.itbl -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Pickle.itbl


-
-
- - - -
-

Full Type Signature

-
type 'a itbl =
-  {itbl_name: string;
-   itbl_rows: 'a array;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Pickle
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__osgn_inmap-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__osgn_inmap-2.html deleted file mode 100644 index 729e40a0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__osgn_inmap-2.html +++ /dev/null @@ -1,31 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Pickle.osgn_inmap -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Pickle.osgn_inmap


-
-
- - - -
-

Full Type Signature

-
type osgn_inmap<'data,'osgn> =
-  | ObservableNodeInMap of ('osgn -> 'data -> unit) * ('osgn -> bool) * string * 'osgn array
-  with
-    member Get : n:int -> 'osgn
-  end
-

Instance Members

- - - - -
MemberDescription
member Get : n:int -> 'osgn
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Pickle
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__sizes.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__sizes.html deleted file mode 100644 index 8c07b23d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__sizes.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Pickle.sizes -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Pickle.sizes


-
-
- - - -
Note: an abbreviation for int * int * int -

Full Type Signature

-
type sizes = int * int * int
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Pickle
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__tbl-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__tbl-1.html deleted file mode 100644 index 1243f29f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__tbl-1.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Pickle.tbl -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Pickle.tbl


-
-
- - - -
-

Full Type Signature

-
type 'a tbl =
-  {name: string;
-   tbl: Dictionary<'a,int>;
-   mutable rows: ResizeArray<'a>;
-   mutable count: int;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Pickle
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__unpickler-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__unpickler-1.html deleted file mode 100644 index 61b2da51..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Pickle.type__unpickler-1.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Pickle.unpickler -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Pickle.unpickler


-
-
- - - -
Note: an abbreviation for ReaderState -> 'a -

Full Type Signature

-
type 'a unpickler = ReaderState -> 'a
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Pickle
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream.html deleted file mode 100644 index 333777be..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream.html +++ /dev/null @@ -1,38 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream


-
-
- - - -
-

Type Definitions

- - - - -
TypeDescription
type t
-
-

Values

- - - - - - - - - - -
ValueDescription
val clone_and_seek : t -> int -> t
val of_bytes : byte [] -> int -> int -> t
val position : t -> int
val read_byte : t -> int32
val read_bytes : t -> int -> byte array
val read_utf8_bytes_as_string : t -> int -> string
val skip : t -> int -> unit
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream.type__t.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream.type__t.html deleted file mode 100644 index bfaea778..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream.type__t.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream.t -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream.t


-
-
- - - -
-

Full Type Signature

-
type t =
-  {bytes: byte [];
-   mutable pos: int;
-   max: int;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.html deleted file mode 100644 index e8a8f45d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.html +++ /dev/null @@ -1,25 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack.Metadata')

- - - - -
ModuleDescription
FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes.Bytestream
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.List.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.List.html deleted file mode 100644 index 004e0ac3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.List.html +++ /dev/null @@ -1,26 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.List -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Prelude.List


-
-
- - - -
-

Values

- - - - - -
ValueDescription
val frontAndBack : 'a list -> 'a list * 'a
val mapSquared : ('a -> 'b) -> 'a list list -> 'b list list
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMap.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMap.html deleted file mode 100644 index 86f6dc7c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMap.html +++ /dev/null @@ -1,32 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMap -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMap


-
-
- - - -
-

Values

- - - - - - - - - - - -
ValueDescription
val add : string -> 'a -> NameMap<'a> -> Map<string,'a>
val empty : Map<'a,'b>
val find : string -> NameMap<'a> -> 'a
val foldRange : ('a -> 'b -> 'b) -> NameMap<'a> -> 'b -> 'b
val mem : string -> NameMap<'a> -> bool
val of_keyed_list : ('a -> 'b) -> 'a list -> Map<'b,'a>
val range : Map<'a,'b> -> 'b list
val tryfind : string -> NameMap<'a> -> 'a option
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMultiMap.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMultiMap.html deleted file mode 100644 index 50b21941..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMultiMap.html +++ /dev/null @@ -1,28 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMultiMap -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMultiMap


-
-
- - - -
-

Values

- - - - - - - -
ValueDescription
val add : string -> 'a -> NameMultiMap<'a> -> Map<string,'a list>
val empty : NameMultiMap<'a>
val find : string -> NameMultiMap<'a> -> 'a list
val range : NameMultiMap<'a> -> 'a list
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.String.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.String.html deleted file mode 100644 index 265acc61..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.String.html +++ /dev/null @@ -1,27 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.String -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Prelude.String


-
-
- - - -
-

Values

- - - - - - -
ValueDescription
val dropSuffix : string -> string -> string
val hasSuffix : string -> string -> bool
val tryDropSuffix : string -> string -> string option
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.html deleted file mode 100644 index 17f5443a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.html +++ /dev/null @@ -1,96 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Prelude


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack.Metadata')

- - - - - - - - -
ModuleDescription
FSharp.PowerPack.Metadata.Reader.Internal.Prelude.Bytes
FSharp.PowerPack.Metadata.Reader.Internal.Prelude.List
FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMap
FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMultiMap
FSharp.PowerPack.Metadata.Reader.Internal.Prelude.String
-
-

Type Definitions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
type cache
type ExprData Note: an abbreviation for unit
type FlatList Note: an abbreviation for List<'a>
type FreeVarsCache Note: an abbreviation for cache<unit>
type ident
type LazyWithContext
type MemberFlags
type MemberKind
type NameMap Note: an abbreviation for Map<string,'a>
type NameMultiMap Note: an abbreviation for NameMap<'a list>
type nonnull_slot Note: an abbreviation for 'a
type pos
type range
type SequencePointInfoForBinding Note: an abbreviation for unit
type SequencePointInfoForFinally Note: an abbreviation for unit
type SequencePointInfoForForLoop Note: an abbreviation for unit
type SequencePointInfoForSeq Note: an abbreviation for unit
type SequencePointInfoForTarget Note: an abbreviation for unit
type SequencePointInfoForTry Note: an abbreviation for unit
type SequencePointInfoForWhileLoop Note: an abbreviation for unit
type SequencePointInfoForWith Note: an abbreviation for unit
type SkipFreeVarsCache Note: an abbreviation for unit
type SynTypar
type TyparStaticReq
type XmlDoc
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val ( === ) : 'a -> 'a -> bool
val cached : 'a -> (unit -> 'b) -> 'b
val cacheOptRef : 'a -> (unit -> 'b) -> 'b
val dprintf : TextWriterFormat<'a> -> 'a
val emptyXmlDoc : XmlDoc
val error : Exception -> 'a
val Error : string * 'a -> exn
val errorR : Exception -> 'a
val InternalError : string * 'a -> exn
val isSome : 'a option -> bool
val MergeXmlDoc : XmlDoc -> XmlDoc -> XmlDoc
val mk_pos : int -> int -> pos
val mk_range : string -> pos -> pos -> range
val mksyn_id : range -> string -> ident
val new_cache : unit -> cache<'a>
val NoSequencePointAtFinally : unit
val NoSequencePointAtForLoop : unit
val NoSequencePointAtStickyBinding : unit
val NoSequencePointAtTry : unit
val NoSequencePointAtWhileLoop : unit
val NoSequencePointAtWith : unit
val notlazy : 'a -> Lazy<'a>
val nullable_slot_empty : unit -> 'a
val nullable_slot_full : 'a -> 'a
val range0 : range
val SuppressSequencePointAtTarget : unit
val SuppressSequencePointOnExprOfSequential : unit
val text_of_path : seq<string> -> string
val UnresolvedPathReferenceNoRange : string * string -> exn
val UnresolvedReferenceNoRange : string -> exn
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_ExprData.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_ExprData.html deleted file mode 100644 index e14b26fd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_ExprData.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.ExprData -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.ExprData


-
-
- - - -
Note: an abbreviation for unit -

Full Type Signature

-
type ExprData = unit
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_FlatList-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_FlatList-1.html deleted file mode 100644 index 86582076..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_FlatList-1.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.FlatList -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.FlatList


-
-
- - - -
Note: an abbreviation for List<'a> -

Full Type Signature

-
type FlatList<'a> = List<'a>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_FreeVarsCache.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_FreeVarsCache.html deleted file mode 100644 index 856d0cdb..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_FreeVarsCache.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.FreeVarsCache -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.FreeVarsCache


-
-
- - - -
Note: an abbreviation for cache<unit> -

Full Type Signature

-
type FreeVarsCache = cache<unit>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_LazyWithContext-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_LazyWithContext-2.html deleted file mode 100644 index f0b73d98..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_LazyWithContext-2.html +++ /dev/null @@ -1,41 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.LazyWithContext -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.LazyWithContext


-
-
- - - -
-

Full Type Signature

-
type LazyWithContext<'a,'ctxt> =
-  {v: Lazy<'a>;}
-  with
-    member Force : 'a2 -> 'a
-    static member Create : f:(unit -> 'a) -> LazyWithContext<'a,'a2>
-    static member NotLazy : x:'a -> LazyWithContext<'a,'a2>
-  end
-

Instance Members

- - - - -
MemberDescription
member Force : 'a2 -> 'a
-
-

Static Members

- - - - - -
MemberDescription
member Create : f:(unit -> 'a) -> LazyWithContext<'a,'a2>
member NotLazy : x:'a -> LazyWithContext<'a,'a2>
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_MemberFlags.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_MemberFlags.html deleted file mode 100644 index da0d6205..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_MemberFlags.html +++ /dev/null @@ -1,27 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.MemberFlags -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.MemberFlags


-
-
- - - -
-

Full Type Signature

-
type MemberFlags =
-  {OverloadQualifier: string option;
-   MemberIsInstance: bool;
-   MemberIsVirtual: bool;
-   MemberIsDispatchSlot: bool;
-   MemberIsOverrideOrExplicitImpl: bool;
-   MemberIsFinal: bool;
-   MemberKind: MemberKind;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_MemberKind.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_MemberKind.html deleted file mode 100644 index 24f6d2b6..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_MemberKind.html +++ /dev/null @@ -1,26 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.MemberKind -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.MemberKind


-
-
- - - -
-

Full Type Signature

-
type MemberKind =
-  | MemberKindClassConstructor
-  | MemberKindConstructor
-  | MemberKindMember
-  | MemberKindPropertyGet
-  | MemberKindPropertySet
-  | MemberKindPropertyGetSet
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_NameMap-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_NameMap-1.html deleted file mode 100644 index e1f23644..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_NameMap-1.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMap -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMap


-
-
- - - -
Note: an abbreviation for Map<string,'a> -

Full Type Signature

-
type NameMap<'a> = Map<string,'a>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_NameMultiMap-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_NameMultiMap-1.html deleted file mode 100644 index 2feb2c61..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_NameMultiMap-1.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMultiMap -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.NameMultiMap


-
-
- - - -
Note: an abbreviation for NameMap<'a list> -

Full Type Signature

-
type NameMultiMap<'a> = NameMap<'a list>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForBinding.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForBinding.html deleted file mode 100644 index d2a28ce4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForBinding.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForBinding -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForBinding


-
-
- - - -
Note: an abbreviation for unit -

Full Type Signature

-
type SequencePointInfoForBinding = unit
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForFinally.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForFinally.html deleted file mode 100644 index c551b04f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForFinally.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForFinally -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForFinally


-
-
- - - -
Note: an abbreviation for unit -

Full Type Signature

-
type SequencePointInfoForFinally = unit
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForForLoop.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForForLoop.html deleted file mode 100644 index 824b4522..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForForLoop.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForForLoop -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForForLoop


-
-
- - - -
Note: an abbreviation for unit -

Full Type Signature

-
type SequencePointInfoForForLoop = unit
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForSeq.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForSeq.html deleted file mode 100644 index 782d1102..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForSeq.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForSeq -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForSeq


-
-
- - - -
Note: an abbreviation for unit -

Full Type Signature

-
type SequencePointInfoForSeq = unit
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForTarget.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForTarget.html deleted file mode 100644 index ca9d3cca..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForTarget.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForTarget -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForTarget


-
-
- - - -
Note: an abbreviation for unit -

Full Type Signature

-
type SequencePointInfoForTarget = unit
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForTry.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForTry.html deleted file mode 100644 index b58958f1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForTry.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForTry -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForTry


-
-
- - - -
Note: an abbreviation for unit -

Full Type Signature

-
type SequencePointInfoForTry = unit
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForWhileLoop.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForWhileLoop.html deleted file mode 100644 index 79965bed..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForWhileLoop.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForWhileLoop -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForWhileLoop


-
-
- - - -
Note: an abbreviation for unit -

Full Type Signature

-
type SequencePointInfoForWhileLoop = unit
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForWith.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForWith.html deleted file mode 100644 index c8432d4e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SequencePointInfoForWith.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForWith -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SequencePointInfoForWith


-
-
- - - -
Note: an abbreviation for unit -

Full Type Signature

-
type SequencePointInfoForWith = unit
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SkipFreeVarsCache.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SkipFreeVarsCache.html deleted file mode 100644 index 7a301d3a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SkipFreeVarsCache.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SkipFreeVarsCache -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SkipFreeVarsCache


-
-
- - - -
Note: an abbreviation for unit -

Full Type Signature

-
type SkipFreeVarsCache = unit
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SynTypar.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SynTypar.html deleted file mode 100644 index e95e5930..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_SynTypar.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SynTypar -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.SynTypar


-
-
- - - -
-

Full Type Signature

-
type SynTypar = | Typar of ident * TyparStaticReq * bool
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_TyparStaticReq.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_TyparStaticReq.html deleted file mode 100644 index b7a226cd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_TyparStaticReq.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.TyparStaticReq -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.TyparStaticReq


-
-
- - - -
-

Full Type Signature

-
type TyparStaticReq =
-  | NoStaticReq
-  | HeadTypeStaticReq
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_XmlDoc.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_XmlDoc.html deleted file mode 100644 index 92bffec0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type_XmlDoc.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.XmlDoc -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.XmlDoc


-
-
- - - -
-

Full Type Signature

-
type XmlDoc = | XmlDoc of string []
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__cache-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__cache-1.html deleted file mode 100644 index 307b0ff6..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__cache-1.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.cache -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.cache


-
-
- - - -
-

Full Type Signature

-
type cache<'a> = | NoCache
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__ident.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__ident.html deleted file mode 100644 index 1a21761b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__ident.html +++ /dev/null @@ -1,42 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.ident -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.ident


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type ident =
-  class
-    new : text:string * range:range -> ident
-    member idRange : range
-    member idText : string
-  end
-

Instance Members

- - - - - - -
MemberDescription
member idRange : range
member idText : string
override ToString : unit -> string
-
-

Static Members

- - - - -
MemberDescription
new : text:string * range:range -> ident
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__nonnull_slot-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__nonnull_slot-1.html deleted file mode 100644 index 63402d54..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__nonnull_slot-1.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.nonnull_slot -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.nonnull_slot


-
-
- - - -
Note: an abbreviation for 'a -

Full Type Signature

-
type 'a nonnull_slot = 'a
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__pos.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__pos.html deleted file mode 100644 index 6a665489..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__pos.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.pos -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.pos


-
-
- - - -
-

Full Type Signature

-
type pos =
-  {posLine: int;
-   posCol: int;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__range.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__range.html deleted file mode 100644 index 9531bd0b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Prelude.type__range.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Prelude.range -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Prelude.range


-
-
- - - -
-

Full Type Signature

-
type range =
-  {rangeFile: string;
-   rangeBegin: pos;
-   rangeEnd: pos;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming.html deleted file mode 100644 index 06eea833..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming.html +++ /dev/null @@ -1,82 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming


-
-
- - - -
-

Type Definitions

- - - - -
TypeDescription
type NameArityPair
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val ChopPropertyName : string -> string
val ChopUnshowableInFsiGenerationPath : string list -> string list
- Used when generating the secret paths used by FSI file generation -
val CompileOpName : (string -> string)
val CompilerGeneratedName : string -> string
val CompilerGeneratedNameSuffix : string -> string -> string
val DecodeGenericTypeName : string -> NameArityPair
val DecompileOpName : (string -> string)
val DemangleExceptionName : string -> string
val DemangleGenericTypeName : string -> string
val DemangleOperatorName : string -> string
val FSharpModuleSuffix : string
val GetBasicNameOfPossibleCompilerGeneratedName : string -> string
val IsCompilerGeneratedName : string -> bool
val IsIdentifierPartCharacter : char -> bool
- The characters that are allowed to be in an identifier. -
val IsLongIdentifierPartCharacter : char -> bool
- Is this character a part of a long identifier -
val IsMangledGenericName : string -> bool
val IsMangledOpName : string -> bool
val IsOpName : (string -> bool)
val IsPrefixOperator : string -> bool
val JoinNamesForFsiGenerationPath : string list -> string
- Used when generating the secret paths used by FSI file generation -
val lparen_get : string
val lparen_set : string
val mangle_exception_name : string -> string
val opCharTranslateTable : (char * string) list
val opname_Cons : string
val opname_Equals : string
val opname_Nil : string
val qmark : string
val qmark_set : string
val SplitNamesForFsiGenerationPath : string -> string list
- Used when generating the secret paths used by FSI file generation -
val TryChopPropertyName : string -> string option
- Try to chop "get_" or "set_" from a string -
-
-

Active Patterns

- - - - -
Active PatternDescription
val ( |Control|Equality|Relational|Indexer|FixedTypes|Other| ) :
-  string -> Choice<unit,unit,unit,unit,unit,unit>
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming.type_NameArityPair.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming.type_NameArityPair.html deleted file mode 100644 index 06e4f2c8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming.type_NameArityPair.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming.NameArityPair -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming.NameArityPair


-
-
- - - -
-

Full Type Signature

-
type NameArityPair = | NameArityPair of string * int
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.TopValInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.TopValInfo.html deleted file mode 100644 index 38ccd2ae..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.TopValInfo.html +++ /dev/null @@ -1,36 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TopValInfo -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Tast.TopValInfo


-
-
- - - -
- Metadata on values (names of arguments etc. - -

Values

- - - - - - - - - - - - - -
ValueDescription
val emptyValData : ValTopReprInfo
val HasNoArgs : ValTopReprInfo -> bool
val InferTopArgInfo : Val -> TopArgInfo
val InferTopArgInfos : Val list list -> ValTopReprInfo
val InferTyparInfo : Typar list -> TopTyparInfo list
val selfMetadata : TopArgInfo list
val unitArgData : 'a list list
val unnamedRetVal : TopArgInfo
val unnamedTopArg : TopArgInfo list
val unnamedTopArg1 : TopArgInfo
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparFlags.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparFlags.html deleted file mode 100644 index d99285d3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparFlags.html +++ /dev/null @@ -1,39 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparFlags -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparFlags


-
-
- - - -
-

Values

- - - - - - - - - - - - - - - - -
ValueDescription
val compgen_of_tpflags : int -> bool
val dynamic_req_of_tpflags : int -> TyparDynamicReq
val encode :
-  TyparKind * TyparRigidity * bool * bool * TyparStaticReq * TyparDynamicReq ->
-    int
val encode_compgen_of_tpflags : bool -> int -> int
val encode_dynamic_req_of_tpflags : TyparDynamicReq -> int -> int
val encode_from_error_of_tpflags : bool -> int -> int
val encode_kind_of_tpflags : TyparKind -> int -> int
val encode_rigid_of_tpflags : TyparRigidity -> int -> int
val encode_static_req_of_tpflags : TyparStaticReq -> int -> int
val from_error_of_tpflags : int -> bool
val kind_of_tpflags : int -> TyparKind
val rigid_of_tpflags : int -> TyparRigidity
val static_req_of_tpflags : int -> TyparStaticReq
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValFlags.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValFlags.html deleted file mode 100644 index dbea3ae4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValFlags.html +++ /dev/null @@ -1,47 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValFlags -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValFlags


-
-
- - - -
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val base_of_vflags : int64 -> ValBaseOrThisInfo
val encode :
-  ValRecursiveScopeInfo * ValBaseOrThisInfo * bool * ValInlineInfo *
-  ValMutability * bool * bool * bool * bool -> int64
val encode_base_of_vflags : ValBaseOrThisInfo -> int64 -> int64
val encode_compgen_of_vflags : bool -> int64 -> int64
val encode_is_incr_class_of_vflags : bool -> int64 -> int64
val encode_is_topbind_of_vflags : bool -> int64 -> int64
val encode_is_tyfunc_of_vflags : bool -> int64 -> int64
val encode_isext_of_vflags : bool -> int64 -> int64
val encode_mustinline_of_vflags : ValInlineInfo -> int64 -> int64
val encode_mutability_of_vflags : ValMutability -> int64 -> int64
val encode_notailcall_hint_of_vflags : bool -> int64 -> int64
val encode_vrec_of_vflags : ValRecursiveScopeInfo -> int64 -> int64
val inline_info_of_vflags : int64 -> ValInlineInfo
val is_compgen_of_vflags : int64 -> bool
val is_extension_member_of_vflags : int64 -> bool
val is_incr_class_of_vflags : int64 -> bool
val is_notailcall_hint_of_vflags : int64 -> bool
val is_topbind_of_vflags : int64 -> bool
val is_tyfunc_of_vflags : int64 -> bool
val mutability_of_vflags : int64 -> ValMutability
val vrec_of_vflags : int64 -> ValRecursiveScopeInfo
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.html deleted file mode 100644 index c8778711..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.html +++ /dev/null @@ -1,464 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast -
-
-

[Home] Module FSharp.PowerPack.Metadata.Reader.Internal.Tast


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack.Metadata')

- - - - - - -
ModuleDescription
FSharp.PowerPack.Metadata.Reader.Internal.Tast.TopValInfo - Metadata on values (names of arguments etc. -
FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparFlags
FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValFlags
-
-

Type Definitions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
type Accessibility
type ActivePatternElemRef
type ActivePatternInfo
type Attrib - Attrib(kind,unnamedArgs,propVals) -
type AttribExpr - We keep both source expression and evaluated expression around to help intellisense and signature printing -
type AttribKind
type AttribNamedArg - AttribNamedArg(name,type,isField,value) -
type Attribs Note: an abbreviation for Attrib list
type Binding
type Bindings Note: an abbreviation for FlatList<Binding>
type ccu Note: an abbreviation for CcuThunk
type CcuData
type CcuReference Note: an abbreviation for string
type CcuResolutionResult - The result of attempting to resolve an assembly name to a full ccu. - UnresolvedCcu will contain the name of the assembly that could not be resolved. -
type CcuThunk - A relinkable handle to the contents of a compilation unit. Relinking is performed by mutation. -
type CcuTypeForwarderTable Note: an abbreviation for Lazy<Map<(string [] * string),EntityRef>>
type CompilationPath - The information ILXGEN needs about the location of an item -
type CompiledTypeRepr - Specifies the compiled representations of type and exception definitions. - Computed and cached by later phases (never computed type checking). Cached at - type and exception definitions. Not pickled. -
type Constant - Constants in expressions -
type DecisionTree - Decision trees. Pattern matching has been compiled down to - a decision tree by this point. The right-hand-sides (actions) of - the decision tree are labelled by integers that are unique for that - particular tree. -
type DecisionTreeCase
type DecisionTreeDiscriminator
type DecisionTreeTarget - A target of a decision tree. Can be thought of as a little function, though is compiled as a local block. -
type Entity
type EntityData
type EntityRef
type ExceptionInfo
type expr - The big type of expressions. -
type ExprOpSpec
type Exprs Note: an abbreviation for expr list
type FlatExprs Note: an abbreviation for FlatList<expr>
type FlatVals Note: an abbreviation for FlatList<Val>
type ForLoopStyle
type LValueOperation
type measure
type ModuleOrNamespace Note: an abbreviation for Entity
type ModuleOrNamespaceBinding - A named module-or-namespace-fragment definition -
type ModuleOrNamespaceExpr - The module_typ is a binder. However it is not used in the ModuleOrNamespaceExpr: it is only referenced from the 'outside' - The contents of a module-or-namespace-fragment definition -
type ModuleOrNamespaceExprWithSig - A type for a module-or-namespace-fragment and the actual definition of the module-or-namespace-fragment -
type ModuleOrNamespaceKind
type ModuleOrNamespaceRef - note: ModuleOrNamespaceRef and TyconRef are type equivalent - Note: an abbreviation for EntityRef
type ModuleOrNamespaceType
type NonLocalItemRef - Non-local references indirect via a CCU - The lookup into the CCU is a NonLocalPath, which is a series of strings - We cache the result of dereferencing -
type NonLocalPath - Index into the namespace/module structure of a particular CCU -
type ObjExprMethod - A representation of a method in an object expression. - Note: Methods associated with types are represented as val declarations - Note: We should probably use val_specs for object expressions, as then the treatment of members - in object expressions could be more unified with the treatment of members in types -
type ParentRef
type PickledModuleInfo
type PublicPath - A public path records where a construct lives within the global namespace - of a CCU. -
type RecdField
type RecdFieldRef
type RecordConstructionInfo - This ModuleOrNamespace that represents the compilation of a module as a class. - The same set of tycons etc. are bound in the ModuleOrNamespace as in the ModuleOrNamespaceExpr - This is the body of the module/namespace -
type SequentialOpKind
type SlotParam
type SlotSig
type stamp Note: an abbreviation for int64
type StaticOptimization
type TcGlobals
type tinst Note: an abbreviation for typ list
type TopArgInfo - The extra metadata stored about typars for top-level definitions. Any information here is propagated from signature through - to the compiled code. -
type TopTyparInfo - The extra metadata stored about typars for top-level definitions. Any information here is propagated from signature through - to the compiled code. -
type TraitConstraintInfo - The specification of a member constraint that must be solved -
type TraitConstraintSln
type Tycon Note: an abbreviation for Entity
type TyconAugmentation
type TyconObjModelData
type TyconObjModelKind
type TyconRecdFields
type TyconRef Note: an abbreviation for EntityRef
type TyconRepresentation
type TyconUnionCases
type TyconUnionData
type typ - The algebra of types -
type Typar
type TyparConstraint
type TyparData
type TyparDynamicReq
type TyparKind
type TyparRigidity
type typars Note: an abbreviation for Typar list
type UnionCase
type UnionCaseRef
type uniq - Unique name generator for stamps attached to lambdas and object expressions - Note: an abbreviation for int64
type Val
type ValBaseOrThisInfo
type ValData
type ValInlineInfo
type ValMemberInfo
type ValMutability
type ValRecursiveScopeInfo
type ValRef - References are either local or nonlocal -
type Vals Note: an abbreviation for Val list
type ValTopReprInfo
type ValUseFlag
-
-

Exceptions

- - - - - - - - - -
ExceptionDescription
exception Duplicate
exception FullAbstraction
exception InternalUndefinedItemRef
exception InternalUndefinedTyconItem
exception NameClash
exception UndefinedName
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val access_subst_paths :
-  CompilationPath * CompilationPath -> Accessibility -> Accessibility
- Given (newPath,oldPath) replace oldPath by newPath in the TAccess. -
val AddTyconsByAccessNames :
-  string -> 'a -> NameMultiMap<'a> -> Map<string,'a list>
val AddTyconsByDemangledNameAndArity :
-  string ->
-    Typar list ->
-      'a -> Map<NameArityPair,'a> -> Map<NameArityPair,'a>
val arity_of_val : Val -> ValTopReprInfo
val array_path_eq : string [] -> string [] -> bool
val attribs_of_tycon : Tycon -> Attribs
val can_access_cpath_from : CompilationPath -> CompilationPath -> bool
val can_access_cpath_from_one_of :
-  CompilationPath list -> CompilationPath -> bool
val can_access_from : Accessibility -> CompilationPath -> bool
val can_access_from_everywhere : Accessibility -> bool
val can_access_from_somewhere : Accessibility -> bool
val ccu_eq : ccu -> ccu -> bool
- Equality on CCUs, implemented as reference equality -
val ccu_of_nlpath : NonLocalPath -> ccu
val ccu_of_nlref : NonLocalItemRef -> ccu
val ccu_of_tcref : EntityRef -> ccu option
val ccu_of_vref : ValRef -> ccu option
val combine_mtyps :
-  string list -> range -> ModuleOrNamespaceType list -> ModuleOrNamespaceType
val combineAccess : Accessibility -> Accessibility -> Accessibility
val CopyTypar : Typar -> Typar
val CopyTypars : Typar list -> Typar list
val cpath_of_ccu : ccu -> CompilationPath
val data_of_val : Val -> ValData
val demangled_name_of_entity_name : string -> ModuleOrNamespaceKind -> string
val demangled_name_of_modref : ModuleOrNamespaceRef -> string
val demangled_name_of_modul : ModuleOrNamespace -> string
val demangled_path_of_cpath : CompilationPath -> string list
val deref_modul : ModuleOrNamespaceRef -> Entity
- Identical to tcref.Deref and deref_tycon, just used to help distinguish what kind of entity we expect here -
val deref_tycon : TyconRef -> Entity
val deref_val : ValRef -> Val
val empty_mtype : ModuleOrNamespaceKind -> ModuleOrNamespaceType
val enclosing_nlpath_of_pubpath : ccu -> PublicPath -> NonLocalPath
val ERef_nonlocal : NonLocalItemRef -> EntityRef
val ERef_nonlocal_preresolved :
-  Entity nonnull_slot -> NonLocalItemRef -> EntityRef
val ERef_private : Entity nonnull_slot -> EntityRef
val fixup_typar_constraints : Typar -> TyparConstraint list -> unit
val FSharpOptimizationDataResourceName : string
val FSharpSignatureDataResourceName : string
val fslib_nlpath_eq_pubpath : NonLocalItemRef -> PublicPath -> bool
- Compiler-internal references to items in fslib are generated as Ref_nonlocal even when compiling fslib -
val fslib_refs_eq :
-  ('a -> PublicPath option) ->
-    'b -> ('c -> Choice<'a,NonLocalItemRef>) -> ccu -> 'c -> 'c -> bool
val full_cpath_of_modul : ModuleOrNamespace -> CompilationPath
val id_of_tycon : Tycon -> ident
val id_of_val : Val -> ident
val IsLessAccessible : Accessibility -> Accessibility -> bool
val item_of_nlref : NonLocalItemRef -> string
val local_tcref_eq : Tycon -> Tycon -> bool
val MakeRecdFieldsTable : RecdField list -> TyconRecdFields
val MakeUnionCases : UnionCase list -> TyconUnionData
val MakeUnionCasesTable : UnionCase list -> TyconUnionCases
val MakeUnionRepr : UnionCase list -> TyconRepresentation
val mangled_path_of_cpath : CompilationPath -> string list
val mk_byref_typ : TcGlobals -> typ -> typ
val mk_cpath :
-  CompilationPath -> string -> ModuleOrNamespaceKind -> CompilationPath
val mk_exnconstr_namemap : (Tycon list -> Map<string,Tycon>)
val mk_local_tcref : Entity nonnull_slot -> EntityRef
val mk_multi_dim_array_typ : TcGlobals -> int -> typ -> typ
val mk_namemap : string -> ('a -> ident) -> 'a list -> Map<string,'a>
val mk_nativeint_typ : TcGlobals -> typ
val mk_nativeptr_typ : TcGlobals -> typ -> typ
val mk_nlpath : NonLocalPath -> string -> NonLocalPath
val mk_nlr : NonLocalPath -> string -> NonLocalItemRef
val mk_nonlocal_tcref : NonLocalPath -> string -> EntityRef
val mk_nonlocal_tcref_preresolved :
-  Entity nonnull_slot -> NonLocalPath -> string -> EntityRef
val mk_nonlocal_vref : NonLocalPath -> string -> ValRef
val mk_nonlocal_vref_preresolved :
-  Val nonnull_slot -> NonLocalPath -> string -> ValRef
val mk_rfref : TyconRef -> string -> RecdFieldRef
val mk_rigid_typar : string -> range -> Typar
val mk_tycon_namemap : (Tycon list -> Map<string,Tycon>)
val mk_typar_ty : Typar -> typ
val mk_ucref : TyconRef -> string -> UnionCaseRef
val mk_unit_typ : TcGlobals -> typ
val mk_val_namemap : (Val list -> Map<string,Val>)
val mustinline : ValInlineInfo -> bool
val name_of_rfield : RecdField -> string
val name_of_val : Val -> string
val new_ccu : CcuReference -> CcuData -> ccu
val new_stamp : (unit -> int64)
- Unique name generator for stamps attached to to val_specs, tycon_specs etc. -
val new_tcaug : unit -> TyconAugmentation
val new_uniq : (unit -> int64)
val NewCcuContents :
-  ILScopeRef -> range -> string -> ModuleOrNamespaceType -> Entity
val NewClonedModuleOrNamespace : Tycon -> Entity
val NewClonedTycon : Tycon -> Entity
val NewExn :
-  CompilationPath option ->
-    ident -> Accessibility -> ExceptionInfo -> Attribs -> XmlDoc -> Entity
val NewFreeVarsCache : unit -> cache<'a>
val NewILTycon :
-  CompilationPath option ->
-    string * range ->
-      LazyWithContext<typars,range> ->
-        ILScopeRef * ILTypeDef list * ILTypeDef ->
-          Lazy<ModuleOrNamespaceType> -> Entity
val NewModifiedModuleOrNamespace :
-  (ModuleOrNamespaceType -> ModuleOrNamespaceType) -> Tycon -> Entity
- Create a module Tycon based on an existing one using the function 'f'. - We require that we be given the parent for the new module. - We pass the new module to 'f' in case it needs to reparent the - contents of the module. -
val NewModifiedTycon : (EntityData -> EntityData) -> Tycon -> Entity
- Create a tycon based on an existing one using the function 'f'. - We require that we be given the new parent for the new tycon. - We pass the new tycon to 'f' in case it needs to reparent the - contents of the tycon. -
val NewModifiedVal : (ValData -> ValData) -> Val -> Val
- Create a Val based on an existing one using the function 'f'. - We require that we be given the parent for the new Val. -
val NewModuleOrNamespace :
-  CompilationPath option ->
-    Accessibility ->
-      ident -> XmlDoc -> Attribs -> Lazy<ModuleOrNamespaceType> -> Entity
val NewModuleOrNamespaceType :
-  ModuleOrNamespaceKind -> Entity list -> Val list -> ModuleOrNamespaceType
val NewRecdField :
-  bool ->
-    Constant option ->
-      ident ->
-        typ ->
-          bool ->
-            Attribs -> Attribs -> XmlDoc -> Accessibility -> bool -> RecdField
val NewTycon :
-  CompilationPath option ->
-    string * range ->
-      Accessibility ->
-        Accessibility ->
-          TyparKind ->
-            LazyWithContext<typars,range> ->
-              XmlDoc -> bool -> Lazy<ModuleOrNamespaceType> -> Entity
val NewTypar :
-  TyparKind * TyparRigidity * SynTypar * bool * TyparDynamicReq * Attribs ->
-    Typar
val NewUnionCase :
-  ident ->
-    string ->
-      RecdField list -> typ -> Attribs -> XmlDoc -> Accessibility -> UnionCase
val NewVal :
-  ident * typ * ValMutability * bool * ValTopReprInfo option *
-  CompilationPath option * Accessibility * ValRecursiveScopeInfo *
-  ValMemberInfo option * ValBaseOrThisInfo * Attribs * ValInlineInfo * XmlDoc *
-  bool * bool * bool * bool * Constant option * ParentRef -> Val
val nlpath_definitely_not_eq : NonLocalPath -> NonLocalPath -> bool
- This predicate tests if non-local resolution paths are definitely known to resolve - to different entities. All references with different named paths always resolve to - different entities. Two references with the same named paths may resolve to the same - entities even if they reference through different CCUs, because one reference - may be forwarded to another via a .NET TypeForwarder. -
val nlpath_eq : NonLocalPath -> NonLocalPath -> bool
val nlpath_of_ccu : ccu -> NonLocalPath
val nlpath_of_modul : ccu -> ModuleOrNamespace -> NonLocalPath option
val nlpath_of_nlref : NonLocalItemRef -> NonLocalPath
val nlpath_of_pubpath : ccu -> PublicPath -> NonLocalPath
val nlref_definitely_not_eq : NonLocalItemRef -> NonLocalItemRef -> bool
- See nlpath_definitely_not_eq -
val nlref_eq : NonLocalItemRef -> NonLocalItemRef -> bool
val nlref_of_pubpath : ccu -> PublicPath -> 'a -> NonLocalItemRef
val parent_cpath : CompilationPath -> CompilationPath
val path_of_nlpath : NonLocalPath -> string []
val prim_tcref_eq : bool -> ccu -> TyconRef -> TyconRef -> bool
val prim_ucref_eq : bool -> ccu -> UnionCaseRef -> UnionCaseRef -> bool
val prim_vref_eq : bool -> ccu -> ValRef -> ValRef -> bool
val pubpath_of_cpath : ident -> CompilationPath -> PublicPath
val pubpath_of_tycon : Tycon -> PublicPath option
val pubpath_of_val : Val -> PublicPath option
val rescope_tycon_pubpath : ccu -> PublicPath -> 'a -> TyconRef
val rescope_val_pubpath : ccu -> PublicPath -> 'a -> ValRef
val rfref_of_rfield : TyconRef -> RecdField -> RecdFieldRef
val set_compgen_of_tpdata : TyparData -> bool -> unit
val set_dynamic_req_of_tpdata : TyparData -> TyparDynamicReq -> unit
val set_from_error_of_tpdata : TyparData -> bool -> unit
val set_is_topbind_of_vflags : ValData -> bool -> unit
val set_kind_of_tpdata : TyparData -> TyparKind -> unit
val set_notailcall_hint_of_vflags : ValData -> bool -> unit
val set_rigid_of_tpdata : TyparData -> TyparRigidity -> unit
val set_static_req_of_tpdata : TyparData -> TyparStaticReq -> unit
val set_tcaug_compare : TyconAugmentation -> ValRef * ValRef -> unit
val set_tcaug_compare_withc : TyconAugmentation -> ValRef -> unit
val set_tcaug_equals : TyconAugmentation -> ValRef * ValRef -> unit
val set_tcaug_hash_and_equals_withc :
-  TyconAugmentation -> ValRef * ValRef -> unit
val set_tcaug_hasObjectGetHashCode : TyconAugmentation -> bool -> unit
val set_vrec_of_vflags : ValData -> ValRecursiveScopeInfo -> unit
val SkipCacheCompute : SkipFreeVarsCache -> (unit -> 'a) -> 'a
val SkipFreeVarsCache : unit -> unit
val stamp_of_tycon : Tycon -> stamp
val strip_tpeqns : typ -> typ
val strip_tpeqnsA : bool -> typ -> typ
val strip_upeqns : measure -> measure
val strip_upeqnsA : bool -> measure -> measure
val taccessPublic : Accessibility
val tcref_in_this_assembly : bool -> TyconRef -> bool
val tpref_is_solved : Typar -> bool
val tpspec_eq : Typar -> Typar -> bool
- Equality on type varialbes, implemented as reference equality -
val try_deref_val : ValRef -> Val option
val try_shortcut_solved_upref : bool -> Typar -> measure
val typar_ref_eq : Typar -> Typar -> bool
val type_of_val : Val -> typ
val types_of_vals : Val list -> typ list
val ucref_of_ucase : TyconRef -> UnionCase -> UnionCaseRef
val unassignedTyparName : string
val verboseStamps : bool ref
-verboseStamps: print #stamp on each id -- very verbose - but sometimes useful. Turn on using '--stamps' -
val vref_in_this_assembly : bool -> ValRef -> bool
val VRef_nonlocal : NonLocalItemRef -> ValRef
val VRef_nonlocal_preresolved : Val nonnull_slot -> NonLocalItemRef -> ValRef
val VRef_private : Val nonnull_slot -> ValRef
val vspec_eq : Val -> Val -> bool
- Equality on value specs, implemented as reference equality -
-
-

Active Patterns

- - - - - - -
Active PatternDescription
val ( |ERef_private|ERef_nonlocal| ) :
-  EntityRef -> Choice<Entity nonnull_slot,NonLocalItemRef>
val ( |ValDeref| ) : ValRef -> Val
val ( |VRef_private|VRef_nonlocal| ) :
-  ValRef -> Choice<Val nonnull_slot,NonLocalItemRef>
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Accessibility.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Accessibility.html deleted file mode 100644 index 977b5b09..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Accessibility.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Accessibility -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Accessibility


-
-
- - - -
-

Full Type Signature

-
type Accessibility = | TAccess of CompilationPath list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ActivePatternElemRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ActivePatternElemRef.html deleted file mode 100644 index fa1fcfa3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ActivePatternElemRef.html +++ /dev/null @@ -1,35 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ActivePatternElemRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ActivePatternElemRef


-
-
- - - -
-

Full Type Signature

-
type ActivePatternElemRef =
-  | APElemRef of ActivePatternInfo * ValRef * int
-  with
-    member ActivePatternVal : ValRef
-    member CaseIndex : int
-    member IsTotalActivePattern : ActivePatternInfo
-  end
-

Instance Members

- - - - - - -
MemberDescription
member ActivePatternVal : ValRef
member CaseIndex : int
member IsTotalActivePattern : ActivePatternInfo
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ActivePatternInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ActivePatternInfo.html deleted file mode 100644 index bda5e10f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ActivePatternInfo.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ActivePatternInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ActivePatternInfo


-
-
- - - -
-

Full Type Signature

-
type ActivePatternInfo = | APInfo of bool * string list * range
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Attrib.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Attrib.html deleted file mode 100644 index d2e18004..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Attrib.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Attrib -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Attrib


-
-
- - - -
- Attrib(kind,unnamedArgs,propVals) - -

Full Type Signature

-
type Attrib = | Attrib of TyconRef * AttribKind * AttribExpr list * AttribNamedArg list * range
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_AttribExpr.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_AttribExpr.html deleted file mode 100644 index 5ab1c231..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_AttribExpr.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.AttribExpr -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.AttribExpr


-
-
- - - -
- We keep both source expression and evaluated expression around to help intellisense and signature printing - -

Full Type Signature

-
type AttribExpr = | AttribExpr of expr * expr
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_AttribKind.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_AttribKind.html deleted file mode 100644 index 28063298..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_AttribKind.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.AttribKind -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.AttribKind


-
-
- - - -
-

Full Type Signature

-
type AttribKind =
-  | ILAttrib of ILMethodRef
-  | FSAttrib of ValRef
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_AttribNamedArg.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_AttribNamedArg.html deleted file mode 100644 index 17734e2f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_AttribNamedArg.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.AttribNamedArg -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.AttribNamedArg


-
-
- - - -
- AttribNamedArg(name,type,isField,value) - -

Full Type Signature

-
type AttribNamedArg = | AttribNamedArg of (string * typ * bool * AttribExpr)
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Attribs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Attribs.html deleted file mode 100644 index 13832411..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Attribs.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Attribs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Attribs


-
-
- - - -
Note: an abbreviation for Attrib list -

Full Type Signature

-
type Attribs = Attrib list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Binding.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Binding.html deleted file mode 100644 index 80b8dfdc..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Binding.html +++ /dev/null @@ -1,35 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Binding -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Binding


-
-
- - - -
-

Full Type Signature

-
type Binding =
-  | TBind of Val * expr * SequencePointInfoForBinding
-  with
-    member Expr : expr
-    member SequencePointInfo : SequencePointInfoForBinding
-    member Var : Val
-  end
-

Instance Members

- - - - - - -
MemberDescription
member Expr : expr
member SequencePointInfo : SequencePointInfoForBinding
member Var : Val
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Bindings.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Bindings.html deleted file mode 100644 index 877ca658..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Bindings.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Bindings -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Bindings


-
-
- - - -
Note: an abbreviation for FlatList<Binding> -

Full Type Signature

-
type Bindings = FlatList<Binding>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuData.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuData.html deleted file mode 100644 index fbafb260..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuData.html +++ /dev/null @@ -1,30 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.CcuData -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.CcuData


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type CcuData =
-  {ccu_filename: string option;
-   ccu_scoref: ILScopeRef;
-   ccu_stamp: stamp;
-   ccu_qname: string option;
-   ccu_code_dir: string;
-   ccu_fsharp: bool;
-   mutable ccu_usesQuotations: bool;
-   mutable ccu_contents: ModuleOrNamespace;
-   ccu_forwarders: CcuTypeForwarderTable;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuReference.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuReference.html deleted file mode 100644 index 11730dbf..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuReference.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.CcuReference -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.CcuReference


-
-
- - - -
Note: an abbreviation for string -

Full Type Signature

-
type CcuReference = string
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuResolutionResult.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuResolutionResult.html deleted file mode 100644 index 8546056d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuResolutionResult.html +++ /dev/null @@ -1,25 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.CcuResolutionResult -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.CcuResolutionResult


-
-
- - - -
- The result of attempting to resolve an assembly name to a full ccu. - UnresolvedCcu will contain the name of the assembly that could not be resolved. - -

Full Type Signature

-
type CcuResolutionResult =
-  | ResolvedCcu of ccu
-  | UnresolvedCcu of string
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuThunk.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuThunk.html deleted file mode 100644 index 2377dffa..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuThunk.html +++ /dev/null @@ -1,84 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.CcuThunk -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.CcuThunk


-
-
- - - -
- A relinkable handle to the contents of a compilation unit. Relinking is performed by mutation. - -

Full Type Signature

-
type CcuThunk =
-  {mutable target: CcuData;
-   mutable orphanfixup: bool;
-   name: CcuReference;}
-  with
-    member EnsureDerefable : requiringPath:string [] -> unit
-    member Fixup : avail:CcuThunk -> unit
-    member FixupOrphaned : unit -> unit
-    member TryForward : nlpath:string [] * item:string -> EntityRef option
-    member AssemblyName : string
-    member Contents : Entity
-    member Deref : CcuData
-    member FileName : string option
-    member ILScopeRef : ILScopeRef
-    member IsFSharp : bool
-    member IsUnresolvedReference : bool
-    member QualifiedName : string option
-    member SourceCodeDirectory : string
-    member Stamp : stamp
-    member TopModulesAndNamespaces : NameMap<Entity>
-    member TopTypeAndExceptionDefinitions : Entity list
-    member TypeForwarders : Map<(string [] * string),EntityRef>
-    member UsesQuotations : bool
-    member UsesQuotations : bool with set
-    static member Create : nm:CcuReference * x:CcuData -> CcuThunk
-    static member CreateDelayed : nm:CcuReference -> CcuThunk
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member AssemblyName : string
member Contents : Entity
member Deref : CcuData
member EnsureDerefable : requiringPath:string [] -> unit
- Ensure the ccu is derefable in advance. Supply a path to attach to any resulting error message. -
member FileName : string option
member Fixup : avail:CcuThunk -> unit
member FixupOrphaned : unit -> unit
member ILScopeRef : ILScopeRef
member IsFSharp : bool
member IsUnresolvedReference : bool
member QualifiedName : string option
member SourceCodeDirectory : string
member Stamp : stamp
member TopModulesAndNamespaces : NameMap<Entity>
member TopTypeAndExceptionDefinitions : Entity list
override ToString : unit -> string
member TryForward : nlpath:string [] * item:string -> EntityRef option
member TypeForwarders : Map<(string [] * string),EntityRef>
member UsesQuotations : bool
member UsesQuotations : bool with set
-
-

Static Members

- - - - - -
MemberDescription
member Create : nm:CcuReference * x:CcuData -> CcuThunk
member CreateDelayed : nm:CcuReference -> CcuThunk
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuTypeForwarderTable.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuTypeForwarderTable.html deleted file mode 100644 index 3e327266..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CcuTypeForwarderTable.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.CcuTypeForwarderTable -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.CcuTypeForwarderTable


-
-
- - - -
Note: an abbreviation for Lazy<Map<(string [] * string),EntityRef>> -

Full Type Signature

-
type CcuTypeForwarderTable = Lazy<Map<(string [] * string),EntityRef>>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CompilationPath.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CompilationPath.html deleted file mode 100644 index 6ffe84de..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CompilationPath.html +++ /dev/null @@ -1,35 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.CompilationPath -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.CompilationPath


-
-
- - - -
- The information ILXGEN needs about the location of an item - -

Full Type Signature

-
type CompilationPath =
-  | CompPath of ILScopeRef * (string * ModuleOrNamespaceKind) list
-  with
-    member AccessPath : (string * ModuleOrNamespaceKind) list
-    member ILScopeRef : ILScopeRef
-  end
-

Instance Members

- - - - - -
MemberDescription
member AccessPath : (string * ModuleOrNamespaceKind) list
member ILScopeRef : ILScopeRef
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CompiledTypeRepr.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CompiledTypeRepr.html deleted file mode 100644 index 396022f8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_CompiledTypeRepr.html +++ /dev/null @@ -1,26 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.CompiledTypeRepr -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.CompiledTypeRepr


-
-
- - - -
- Specifies the compiled representations of type and exception definitions. - Computed and cached by later phases (never computed type checking). Cached at - type and exception definitions. Not pickled. - -

Full Type Signature

-
type CompiledTypeRepr =
-  | TyrepNamed of ILTypeRef * ILBoxity
-  | TyrepOpen of ILType
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Constant.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Constant.html deleted file mode 100644 index 1caf9767..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Constant.html +++ /dev/null @@ -1,40 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Constant -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Constant


-
-
- - - -
- Constants in expressions - -

Full Type Signature

-
type Constant =
-  | TConst_bool of bool
-  | TConst_sbyte of sbyte
-  | TConst_byte of byte
-  | TConst_int16 of int16
-  | TConst_uint16 of uint16
-  | TConst_int32 of int32
-  | TConst_uint32 of uint32
-  | TConst_int64 of int64
-  | TConst_uint64 of uint64
-  | TConst_nativeint of int64
-  | TConst_unativeint of uint64
-  | TConst_float32 of single
-  | TConst_float of double
-  | TConst_char of char
-  | TConst_string of string
-  | TConst_decimal of Decimal
-  | TConst_unit
-  | TConst_zero
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTree.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTree.html deleted file mode 100644 index 2b30fb8b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTree.html +++ /dev/null @@ -1,29 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.DecisionTree -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.DecisionTree


-
-
- - - -
- Decision trees. Pattern matching has been compiled down to - a decision tree by this point. The right-hand-sides (actions) of - the decision tree are labelled by integers that are unique for that - particular tree. - -

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type DecisionTree =
-  | TDSwitch of expr * DecisionTreeCase list * DecisionTree option * range
-  | TDSuccess of FlatExprs * int
-  | TDBind of Binding * DecisionTree
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTreeCase.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTreeCase.html deleted file mode 100644 index ee803385..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTreeCase.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.DecisionTreeCase -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.DecisionTreeCase


-
-
- - - -
-

Full Type Signature

-
type DecisionTreeCase = | TCase of DecisionTreeDiscriminator * DecisionTree
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTreeDiscriminator.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTreeDiscriminator.html deleted file mode 100644 index 1ea6abd4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTreeDiscriminator.html +++ /dev/null @@ -1,27 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.DecisionTreeDiscriminator -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.DecisionTreeDiscriminator


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type DecisionTreeDiscriminator =
-  | TTest_unionconstr of (UnionCaseRef * tinst)
-  | TTest_array_length of int * typ
-  | TTest_const of Constant
-  | TTest_isnull
-  | TTest_isinst of typ * typ
-  | TTest_query of expr * typ list * ValRef option * int * ActivePatternInfo
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTreeTarget.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTreeTarget.html deleted file mode 100644 index e8aa2098..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_DecisionTreeTarget.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.DecisionTreeTarget -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.DecisionTreeTarget


-
-
- - - -
- A target of a decision tree. Can be thought of as a little function, though is compiled as a local block. - -

Full Type Signature

-
type DecisionTreeTarget = | TTarget of FlatVals * expr * SequencePointInfoForTarget
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Duplicate.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Duplicate.html deleted file mode 100644 index fc41a738..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Duplicate.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Duplicate -
-
-

[Home] Exception FSharp.PowerPack.Metadata.Reader.Internal.Tast.Duplicate


-
-
- - - -
-

Full Signature

-
exception Duplicate of string * string * range
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Entity.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Entity.html deleted file mode 100644 index c1389e62..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Entity.html +++ /dev/null @@ -1,166 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Entity -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Entity


-
-
- - - -
-

Full Type Signature

-
type Entity =
-  {mutable Data: EntityData;}
-  with
-    member GetFieldByIndex : n:int -> RecdField
-    member GetFieldByName : n:string -> RecdField option
-    member GetUnionCaseByName : n:string -> UnionCase option
-    member Link : tg:EntityData -> unit
-    member Typars : m:range -> Typar list
-    member Accessibility : Accessibility
-    member AllFieldTable : TyconRecdFields
-    member AllFieldsArray : RecdField array
-    member AllFieldsAsList : RecdField list
-    member AllInstanceFieldsAsList : RecdField list
-    member Attribs : Attribs
-    member CompilationPath : CompilationPath
-    member CompilationPathOpt : CompilationPath option
-    member CompiledReprCache : cache<CompiledTypeRepr>
-    member CompiledRepresentation : CompiledTypeRepr
-    member CompiledRepresentationForTyrepNamed : ILTypeRef
-    member DemangledExceptionName : string
-    member DisplayName : string
-    member DisplayNameWithUnderscoreTypars : string
-    member ExceptionInfo : ExceptionInfo
-    member FSharpObjectModelTypeInfo : TyconObjModelData
-    member ILTyconInfo : ILScopeRef * ILTypeDef list * ILTypeDef
-    member ILTyconRawMetadata : ILTypeDef
-    member Id : ident
-    member IsAsmReprTycon : bool
-    member IsExceptionDecl : bool
-    member IsFSharpDelegateTycon : bool
-    member IsFSharpEnumTycon : bool
-    member IsFSharpInterfaceTycon : bool
-    member IsFSharpObjectModelTycon : bool
-    member IsFSharpStructTycon : bool
-    member IsHiddenReprTycon : bool
-    member IsILStructTycon : bool
-    member IsILTycon : bool
-    member IsLinked : bool
-    member IsMeasureableReprTycon : bool
-    member IsModule : bool
-    member IsModuleOrNamespace : bool
-    member IsNamespace : bool
-    member IsPrefixDisplay : bool
-    member IsRecordTycon : bool
-    member IsStructTycon : bool
-    member IsTypeAbbrev : bool
-    member IsUnionTycon : bool
-    member MangledName : string
-    member ModuleOrNamespaceType : ModuleOrNamespaceType
-    member PublicPath : PublicPath option
-    member Range : range
-    member Stamp : stamp
-    member TrueFieldsAsList : RecdField list
-    member TrueInstanceFieldsAsList : RecdField list
-    member TyparsNoRange : Typar list
-    member TypeAbbrev : typ option
-    member TypeContents : TyconAugmentation
-    member TypeOrMeasureKind : TyparKind
-    member TypeReprAccessibility : Accessibility
-    member TypeReprInfo : TyconRepresentation option
-    member UnionCasesArray : UnionCase array
-    member UnionCasesAsList : UnionCase list
-    member UnionInfo : TyconUnionData option
-    member UnionTypeInfo : TyconUnionData option
-    member XmlDoc : XmlDoc
-    static member New : reason:string -> data:EntityData -> Entity
-    static member NewUnlinked : unit -> Entity
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member Accessibility : Accessibility
member AllFieldsArray : RecdField array
member AllFieldsAsList : RecdField list
member AllFieldTable : TyconRecdFields
member AllInstanceFieldsAsList : RecdField list
member Attribs : Attribs
member CompilationPath : CompilationPath
member CompilationPathOpt : CompilationPath option
member CompiledReprCache : cache<CompiledTypeRepr>
member CompiledRepresentation : CompiledTypeRepr
- From TAST TyconRef to IL ILTypeRef -
member CompiledRepresentationForTyrepNamed : ILTypeRef
member DemangledExceptionName : string
member DisplayName : string
member DisplayNameWithUnderscoreTypars : string
member ExceptionInfo : ExceptionInfo
member FSharpObjectModelTypeInfo : TyconObjModelData
member GetFieldByIndex : n:int -> RecdField
member GetFieldByName : n:string -> RecdField option
member GetUnionCaseByName : n:string -> UnionCase option
member Id : ident
member ILTyconInfo : ILScopeRef * ILTypeDef list * ILTypeDef
member ILTyconRawMetadata : ILTypeDef
member IsAsmReprTycon : bool
member IsExceptionDecl : bool
member IsFSharpDelegateTycon : bool
member IsFSharpEnumTycon : bool
member IsFSharpInterfaceTycon : bool
member IsFSharpObjectModelTycon : bool
member IsFSharpStructTycon : bool
member IsHiddenReprTycon : bool
member IsILStructTycon : bool
member IsILTycon : bool
member IsLinked : bool
member IsMeasureableReprTycon : bool
member IsModule : bool
member IsModuleOrNamespace : bool
member IsNamespace : bool
member IsPrefixDisplay : bool
member IsRecordTycon : bool
member IsStructTycon : bool
member IsTypeAbbrev : bool
member IsUnionTycon : bool
member Link : tg:EntityData -> unit
member MangledName : string
member ModuleOrNamespaceType : ModuleOrNamespaceType
member PublicPath : PublicPath option
member Range : range
member Stamp : stamp
override ToString : unit -> string
member TrueFieldsAsList : RecdField list
member TrueInstanceFieldsAsList : RecdField list
member Typars : m:range -> Typar list
member TyparsNoRange : Typar list
member TypeAbbrev : typ option
member TypeContents : TyconAugmentation
member TypeOrMeasureKind : TyparKind
member TypeReprAccessibility : Accessibility
member TypeReprInfo : TyconRepresentation option
member UnionCasesArray : UnionCase array
member UnionCasesAsList : UnionCase list
member UnionInfo : TyconUnionData option
member UnionTypeInfo : TyconUnionData option
member XmlDoc : XmlDoc
-
-

Static Members

- - - - - -
MemberDescription
member New : reason:string -> data:EntityData -> Entity
member NewUnlinked : unit -> Entity
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_EntityData.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_EntityData.html deleted file mode 100644 index 631f8a42..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_EntityData.html +++ /dev/null @@ -1,40 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.EntityData -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.EntityData


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type EntityData =
-  {mutable entity_typars: LazyWithContext<typars,range>;
-   mutable entity_kind: TyparKind;
-   entity_stamp: stamp;
-   entity_name: string;
-   entity_range: range;
-   entity_uses_prefix_display: bool;
-   entity_is_modul_or_namespace: bool;
-   entity_tycon_repr_accessibility: Accessibility;
-   mutable entity_attribs: Attribs;
-   mutable entity_tycon_repr: TyconRepresentation option;
-   mutable entity_tycon_abbrev: typ option;
-   mutable entity_tycon_tcaug: TyconAugmentation;
-   mutable entity_exn_info: ExceptionInfo;
-   mutable entity_modul_contents: Lazy<ModuleOrNamespaceType>;
-   entity_xmldoc: XmlDoc;
-   entity_pubpath: PublicPath option;
-   mutable entity_accessiblity: Accessibility;
-   entity_cpath: CompilationPath option;
-   entity_il_repr_cache: cache<CompiledTypeRepr>;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_EntityRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_EntityRef.html deleted file mode 100644 index 27577e03..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_EntityRef.html +++ /dev/null @@ -1,165 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.EntityRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.EntityRef


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type EntityRef =
-  {mutable binding: Entity nonnull_slot;
-   nlr: NonLocalItemRef;}
-  with
-    member GetFieldByIndex : n:int -> RecdField
-    member GetFieldByName : n:string -> RecdField option
-    member GetUnionCaseByName : n:string -> UnionCase option
-    member private Resolve : unit -> unit
-    member Typars : m:range -> Typar list
-    member Accessibility : Accessibility
-    member AllFieldTable : TyconRecdFields
-    member AllFieldsArray : RecdField array
-    member AllFieldsAsList : RecdField list
-    member AllInstanceFieldsAsList : RecdField list
-    member Attribs : Attribs
-    member CompilationPath : CompilationPath
-    member CompilationPathOpt : CompilationPath option
-    member CompiledReprCache : cache<CompiledTypeRepr>
-    member CompiledRepresentation : CompiledTypeRepr
-    member CompiledRepresentationForTyrepNamed : ILTypeRef
-    member DemangledExceptionName : string
-    member Deref : Entity
-    member DisplayName : string
-    member DisplayNameWithUnderscoreTypars : string
-    member ExceptionInfo : ExceptionInfo
-    member FSharpObjectModelTypeInfo : TyconObjModelData
-    member ILTyconInfo : ILScopeRef * ILTypeDef list * ILTypeDef
-    member ILTyconRawMetadata : ILTypeDef
-    member Id : ident
-    member IsAsmReprTycon : bool
-    member IsExceptionDecl : bool
-    member IsFSharpDelegateTycon : bool
-    member IsFSharpEnumTycon : bool
-    member IsFSharpInterfaceTycon : bool
-    member IsFSharpObjectModelTycon : bool
-    member IsFSharpStructTycon : bool
-    member IsHiddenReprTycon : bool
-    member IsILStructTycon : bool
-    member IsILTycon : bool
-    member IsLocalRef : bool
-    member IsMeasureableReprTycon : bool
-    member IsModule : bool
-    member IsModuleOrNamespace : bool
-    member IsNamespace : bool
-    member IsPrefixDisplay : bool
-    member IsRecordTycon : bool
-    member IsResolved : bool
-    member IsStructTycon : bool
-    member IsTypeAbbrev : bool
-    member IsUnionTycon : bool
-    member MangledName : string
-    member ModuleOrNamespaceType : ModuleOrNamespaceType
-    member PrivateTarget : Entity nonnull_slot
-    member PublicPath : PublicPath option
-    member Range : range
-    member ResolvedTarget : Entity nonnull_slot
-    member Stamp : stamp
-    member TrueFieldsAsList : RecdField list
-    member TrueInstanceFieldsAsList : RecdField list
-    member TryDeref : Entity option
-    member TyparsNoRange : Typar list
-    member TypeAbbrev : typ option
-    member TypeContents : TyconAugmentation
-    member TypeOrMeasureKind : TyparKind
-    member TypeReprAccessibility : Accessibility
-    member TypeReprInfo : TyconRepresentation option
-    member UnionCasesArray : UnionCase array
-    member UnionCasesAsList : UnionCase list
-    member UnionInfo : TyconUnionData option
-    member UnionTypeInfo : TyconUnionData option
-    member XmlDoc : XmlDoc
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member Accessibility : Accessibility
member AllFieldsArray : RecdField array
member AllFieldsAsList : RecdField list
member AllFieldTable : TyconRecdFields
member AllInstanceFieldsAsList : RecdField list
member Attribs : Attribs
member CompilationPath : CompilationPath
member CompilationPathOpt : CompilationPath option
member CompiledReprCache : cache<CompiledTypeRepr>
member CompiledRepresentation : CompiledTypeRepr
member CompiledRepresentationForTyrepNamed : ILTypeRef
member DemangledExceptionName : string
member Deref : Entity
member DisplayName : string
member DisplayNameWithUnderscoreTypars : string
member ExceptionInfo : ExceptionInfo
member FSharpObjectModelTypeInfo : TyconObjModelData
member GetFieldByIndex : n:int -> RecdField
member GetFieldByName : n:string -> RecdField option
member GetUnionCaseByName : n:string -> UnionCase option
member Id : ident
member ILTyconInfo : ILScopeRef * ILTypeDef list * ILTypeDef
member ILTyconRawMetadata : ILTypeDef
member IsAsmReprTycon : bool
member IsExceptionDecl : bool
member IsFSharpDelegateTycon : bool
member IsFSharpEnumTycon : bool
member IsFSharpInterfaceTycon : bool
member IsFSharpObjectModelTycon : bool
member IsFSharpStructTycon : bool
member IsHiddenReprTycon : bool
member IsILStructTycon : bool
member IsILTycon : bool
member IsLocalRef : bool
member IsMeasureableReprTycon : bool
member IsModule : bool
member IsModuleOrNamespace : bool
member IsNamespace : bool
member IsPrefixDisplay : bool
member IsRecordTycon : bool
member IsResolved : bool
member IsStructTycon : bool
member IsTypeAbbrev : bool
member IsUnionTycon : bool
member MangledName : string
member ModuleOrNamespaceType : ModuleOrNamespaceType
member PrivateTarget : Entity nonnull_slot
member PublicPath : PublicPath option
member Range : range
member ResolvedTarget : Entity nonnull_slot
member Stamp : stamp
override ToString : unit -> string
member TrueFieldsAsList : RecdField list
member TrueInstanceFieldsAsList : RecdField list
member TryDeref : Entity option
member Typars : m:range -> Typar list
member TyparsNoRange : Typar list
member TypeAbbrev : typ option
member TypeContents : TyconAugmentation
member TypeOrMeasureKind : TyparKind
member TypeReprAccessibility : Accessibility
member TypeReprInfo : TyconRepresentation option
member UnionCasesArray : UnionCase array
member UnionCasesAsList : UnionCase list
member UnionInfo : TyconUnionData option
member UnionTypeInfo : TyconUnionData option
member XmlDoc : XmlDoc
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ExceptionInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ExceptionInfo.html deleted file mode 100644 index 13fb7041..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ExceptionInfo.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ExceptionInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ExceptionInfo


-
-
- - - -
-

Full Type Signature

-
type ExceptionInfo =
-  | TExnAbbrevRepr of TyconRef
-  | TExnAsmRepr of ILTypeRef
-  | TExnFresh of TyconRecdFields
-  | TExnNone
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ExprOpSpec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ExprOpSpec.html deleted file mode 100644 index ecb52850..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ExprOpSpec.html +++ /dev/null @@ -1,52 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ExprOpSpec -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ExprOpSpec


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type ExprOpSpec =
-  | TOp_ucase of UnionCaseRef
-  | TOp_exnconstr of TyconRef
-  | TOp_tuple
-  | TOp_array
-  | TOp_bytes of byte []
-  | TOp_uint16s of uint16 []
-  | TOp_while of SequencePointInfoForWhileLoop
-  | TOp_for of SequencePointInfoForForLoop * ForLoopStyle
-  | TOp_try_catch of SequencePointInfoForTry * SequencePointInfoForWith
-  | TOp_try_finally of SequencePointInfoForTry * SequencePointInfoForFinally
-  | TOp_recd of RecordConstructionInfo * TyconRef
-  | TOp_rfield_set of RecdFieldRef
-  | TOp_rfield_get of RecdFieldRef
-  | TOp_field_get_addr of RecdFieldRef
-  | TOp_ucase_tag_get of TyconRef
-  | TOp_ucase_proof of UnionCaseRef
-  | TOp_ucase_field_get of UnionCaseRef * int
-  | TOp_ucase_field_set of UnionCaseRef * int
-  | TOp_exnconstr_field_get of TyconRef * int
-  | TOp_exnconstr_field_set of TyconRef * int
-  | TOp_tuple_field_get of int
-  | TOp_asm of ILInstr list * typ list
-  | TOp_get_ref_lval
-  | TOp_coerce
-  | TOp_rethrow
-  | TOp_return
-  | TOp_trait_call of TraitConstraintInfo
-  | TOp_lval_op of LValueOperation * ValRef
-  | TOp_ilcall of
-    (bool * bool * bool * bool * ValUseFlag * bool * bool * (typ * typ) option * ILMethodRef) * typ list * typ list *
-    typ list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Exprs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Exprs.html deleted file mode 100644 index e78e908c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Exprs.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Exprs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Exprs


-
-
- - - -
Note: an abbreviation for expr list -

Full Type Signature

-
type Exprs = expr list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_FlatExprs.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_FlatExprs.html deleted file mode 100644 index 67f355c4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_FlatExprs.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.FlatExprs -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.FlatExprs


-
-
- - - -
Note: an abbreviation for FlatList<expr> -

Full Type Signature

-
type FlatExprs = FlatList<expr>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_FlatVals.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_FlatVals.html deleted file mode 100644 index 1720950c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_FlatVals.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.FlatVals -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.FlatVals


-
-
- - - -
Note: an abbreviation for FlatList<Val> -

Full Type Signature

-
type FlatVals = FlatList<Val>
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ForLoopStyle.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ForLoopStyle.html deleted file mode 100644 index 1a88bbeb..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ForLoopStyle.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ForLoopStyle -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ForLoopStyle


-
-
- - - -
-

Full Type Signature

-
type ForLoopStyle =
-  | FSharpForLoopUp
-  | FSharpForLoopDown
-  | CSharpForLoopUp
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_FullAbstraction.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_FullAbstraction.html deleted file mode 100644 index 7ca41b2a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_FullAbstraction.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.FullAbstraction -
-
-

[Home] Exception FSharp.PowerPack.Metadata.Reader.Internal.Tast.FullAbstraction


-
-
- - - -
-

Full Signature

-
exception FullAbstraction of string * range
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_InternalUndefinedItemRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_InternalUndefinedItemRef.html deleted file mode 100644 index 91f7c76d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_InternalUndefinedItemRef.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.InternalUndefinedItemRef -
-
-

[Home] Exception FSharp.PowerPack.Metadata.Reader.Internal.Tast.InternalUndefinedItemRef


-
-
- - - -
-

Full Signature

-
exception InternalUndefinedItemRef of string * string * string * string
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_InternalUndefinedTyconItem.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_InternalUndefinedTyconItem.html deleted file mode 100644 index 7ae4634a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_InternalUndefinedTyconItem.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.InternalUndefinedTyconItem -
-
-

[Home] Exception FSharp.PowerPack.Metadata.Reader.Internal.Tast.InternalUndefinedTyconItem


-
-
- - - -
-

Full Signature

-
exception InternalUndefinedTyconItem of string * TyconRef * string
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_LValueOperation.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_LValueOperation.html deleted file mode 100644 index e3c9c08f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_LValueOperation.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.LValueOperation -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.LValueOperation


-
-
- - - -
-

Full Type Signature

-
type LValueOperation =
-  | LGetAddr
-  | LByrefGet
-  | LSet
-  | LByrefSet
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespace.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespace.html deleted file mode 100644 index f0aa360a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespace.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespace -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespace


-
-
- - - -
Note: an abbreviation for Entity -

Full Type Signature

-
type ModuleOrNamespace = Entity
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceBinding.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceBinding.html deleted file mode 100644 index 7f8856e2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceBinding.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceBinding -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceBinding


-
-
- - - -
- A named module-or-namespace-fragment definition - -

Full Type Signature

-
type ModuleOrNamespaceBinding = | TMBind of ModuleOrNamespace * ModuleOrNamespaceExpr
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceExpr.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceExpr.html deleted file mode 100644 index a1ec47ff..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceExpr.html +++ /dev/null @@ -1,28 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceExpr -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceExpr


-
-
- - - -
- The module_typ is a binder. However it is not used in the ModuleOrNamespaceExpr: it is only referenced from the 'outside' - The contents of a module-or-namespace-fragment definition - -

Full Type Signature

-
type ModuleOrNamespaceExpr =
-  | TMAbstract of ModuleOrNamespaceExprWithSig
-  | TMDefs of ModuleOrNamespaceExpr list
-  | TMDefLet of Binding * range
-  | TMDefDo of expr * range
-  | TMDefRec of Tycon list * Bindings * ModuleOrNamespaceBinding list * range
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceExprWithSig.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceExprWithSig.html deleted file mode 100644 index 9d59ef05..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceExprWithSig.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceExprWithSig -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceExprWithSig


-
-
- - - -
- A type for a module-or-namespace-fragment and the actual definition of the module-or-namespace-fragment - -

Full Type Signature

-
type ModuleOrNamespaceExprWithSig = | TMTyped of ModuleOrNamespaceType * ModuleOrNamespaceExpr * range
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceKind.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceKind.html deleted file mode 100644 index 9c1d0315..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceKind.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceKind -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceKind


-
-
- - - -
-

Full Type Signature

-
type ModuleOrNamespaceKind =
-  | FSharpModuleWithSuffix
-  | FSharpModule
-  | Namespace
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceRef.html deleted file mode 100644 index 0a4ab03d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceRef.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceRef


-
-
- - - -
- note: ModuleOrNamespaceRef and TyconRef are type equivalent - Note: an abbreviation for EntityRef -

Full Type Signature

-
type ModuleOrNamespaceRef = EntityRef
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceType.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceType.html deleted file mode 100644 index 952b674b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ModuleOrNamespaceType.html +++ /dev/null @@ -1,94 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceType -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ModuleOrNamespaceType


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type ModuleOrNamespaceType =
-  class
-    new : kind:ModuleOrNamespaceKind * vals:NameMap<Val> * entities:NameMap<Entity> -> ModuleOrNamespaceType
-    member AddEntity : tycon:Tycon -> ModuleOrNamespaceType
-    member AddModuleOrNamespaceByMutation : modul:ModuleOrNamespace -> unit
-    member AddVal : vspec:Val -> ModuleOrNamespaceType
-    member TypesByDemangledNameAndArity : m:range -> Map<NameArityPair,Tycon>
-    member ActivePatternsLookupTable : NameMap<ActivePatternElemRef> option ref
-    member AllEntities : NameMap<Entity>
-    member AllValuesAndMembers : NameMap<Val>
-    member ExceptionDefinitions : Entity list
-    member ExceptionDefinitionsByDemangledName : NameMap<Tycon>
-    member FSharpExceptionsLookupTable : NameMap<Tycon> option ref
-    member ModuleAndNamespaceDefinitions : Entity list
-    member ModuleOrNamespaceKind : ModuleOrNamespaceKind
-    member ModulesAndNamespacesByDemangledName : NameMap<Entity>
-    member ModulesAndNamespacesLookupTable : NameMap<ModuleOrNamespace> option ref
-    member TypeAndExceptionDefinitions : Entity list
-    member TypeDefinitions : Entity list
-    member TypesByAccessNames : Map<string,Tycon list>
-    member TypesByAccessNamesLookupTable : NameMultiMap<Tycon> option ref
-    member TypesByDemangledNameAndArityLookupTable : Map<NameArityPair,Tycon> option ref
-    member TypesByMangledName : NameMap<Tycon>
-    member TypesByMangledNameLookupTable : NameMap<Tycon> option ref
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member
-  ActivePatternsLookupTable : NameMap<ActivePatternElemRef> option ref
- Lookup tables keyed the way various clients expect them to be keyed. - We attach them here so we don't need to store lookup tables via any other technique -
member AddEntity : tycon:Tycon -> ModuleOrNamespaceType
member AddModuleOrNamespaceByMutation : modul:ModuleOrNamespace -> unit
- Mutation used during compilation of FSharp.Core.dll -
member AddVal : vspec:Val -> ModuleOrNamespaceType
member AllEntities : NameMap<Entity>
- Type, mapping mangled name to Tycon, e.g. -
member AllValuesAndMembers : NameMap<Val>
- Values, including members in F# types in this module-or-namespace-fragment. -
member ExceptionDefinitions : Entity list
member ExceptionDefinitionsByDemangledName : NameMap<Tycon>
member FSharpExceptionsLookupTable : NameMap<Tycon> option ref
member ModuleAndNamespaceDefinitions : Entity list
member ModuleOrNamespaceKind : ModuleOrNamespaceKind
- Namespace or module-compiled-as-type? -
member ModulesAndNamespacesByDemangledName : NameMap<Entity>
member
-  ModulesAndNamespacesLookupTable : NameMap<ModuleOrNamespace> option ref
member TypeAndExceptionDefinitions : Entity list
member TypeDefinitions : Entity list
member TypesByAccessNames : Map<string,Tycon list>
member TypesByAccessNamesLookupTable : NameMultiMap<Tycon> option ref
member TypesByDemangledNameAndArity : m:range -> Map<NameArityPair,Tycon>
member
-  TypesByDemangledNameAndArityLookupTable : Map<NameArityPair,Tycon> option ref
member TypesByMangledName : NameMap<Tycon>
member TypesByMangledNameLookupTable : NameMap<Tycon> option ref
-
-

Static Members

- - - - -
MemberDescription
new : kind:ModuleOrNamespaceKind * vals:NameMap<Val> *
-      entities:NameMap<Entity> -> ModuleOrNamespaceType
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_NameClash.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_NameClash.html deleted file mode 100644 index e076ef59..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_NameClash.html +++ /dev/null @@ -1,21 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.NameClash -
-
-

[Home] Exception FSharp.PowerPack.Metadata.Reader.Internal.Tast.NameClash


-
-
- - - -
-

Full Signature

-
exception NameClash of
-                      string * string * string * range * string * string * range
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_NonLocalItemRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_NonLocalItemRef.html deleted file mode 100644 index a4f7e126..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_NonLocalItemRef.html +++ /dev/null @@ -1,26 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.NonLocalItemRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.NonLocalItemRef


-
-
- - - -
- Non-local references indirect via a CCU - The lookup into the CCU is a NonLocalPath, which is a series of strings - We cache the result of dereferencing - -

Full Type Signature

-
type NonLocalItemRef =
-  {nlr_nlpath: NonLocalPath;
-   nlr_item: string;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_NonLocalPath.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_NonLocalPath.html deleted file mode 100644 index 03dba596..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_NonLocalPath.html +++ /dev/null @@ -1,43 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.NonLocalPath -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.NonLocalPath


-
-
- - - -
- Index into the namespace/module structure of a particular CCU - -

Full Type Signature

-
type NonLocalPath =
-  | NLPath of ccu * string []
-  with
-    member AssemblyName : string
-    member Deref : Entity
-    member DisplayName : string
-    member ModuleOrNamespaceType : ModuleOrNamespaceType
-    member TryDeref : Entity option
-    member TryModuleOrNamespaceType : ModuleOrNamespaceType option
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
member AssemblyName : string
member Deref : Entity
member DisplayName : string
member ModuleOrNamespaceType : ModuleOrNamespaceType
member TryDeref : Entity option
member TryModuleOrNamespaceType : ModuleOrNamespaceType option
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ObjExprMethod.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ObjExprMethod.html deleted file mode 100644 index 4536892b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ObjExprMethod.html +++ /dev/null @@ -1,36 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ObjExprMethod -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ObjExprMethod


-
-
- - - -
- A representation of a method in an object expression. - Note: Methods associated with types are represented as val declarations - Note: We should probably use val_specs for object expressions, as then the treatment of members - in object expressions could be more unified with the treatment of members in types - -

Full Type Signature

-
type ObjExprMethod =
-  | TObjExprMethod of SlotSig * typars * Val list list * expr * range
-  with
-    member Id : ident
-  end
-

Instance Members

- - - - -
MemberDescription
member Id : ident
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ParentRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ParentRef.html deleted file mode 100644 index 00279c24..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ParentRef.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ParentRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ParentRef


-
-
- - - -
-

Full Type Signature

-
type ParentRef =
-  | Parent of TyconRef
-  | ParentNone
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_PickledModuleInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_PickledModuleInfo.html deleted file mode 100644 index 74357eb2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_PickledModuleInfo.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.PickledModuleInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.PickledModuleInfo


-
-
- - - -
-

Full Type Signature

-
type PickledModuleInfo =
-  {mspec: ModuleOrNamespace;
-   compile_time_working_dir: string;
-   usesQuotations: bool;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_PublicPath.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_PublicPath.html deleted file mode 100644 index 278176c8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_PublicPath.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.PublicPath -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.PublicPath


-
-
- - - -
- A public path records where a construct lives within the global namespace - of a CCU. - -

Full Type Signature

-
type PublicPath = | PubPath of string [] * string
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_RecdField.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_RecdField.html deleted file mode 100644 index b341532d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_RecdField.html +++ /dev/null @@ -1,63 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.RecdField -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.RecdField


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type RecdField =
-  {rfield_mutable: bool;
-   rfield_xmldoc: XmlDoc;
-   rfield_type: typ;
-   rfield_static: bool;
-   rfield_secret: bool;
-   rfield_const: Constant option;
-   rfield_access: Accessibility;
-   rfield_pattribs: Attribs;
-   rfield_fattribs: Attribs;
-   rfield_id: ident;}
-  with
-    member Accessibility : Accessibility
-    member FieldAttribs : Attribs
-    member FormalType : typ
-    member Id : ident
-    member IsCompilerGenerated : bool
-    member IsMutable : bool
-    member IsStatic : bool
-    member IsZeroInit : bool
-    member LiteralValue : Constant option
-    member Name : string
-    member PropertyAttribs : Attribs
-    member Range : range
-  end
-

Instance Members

- - - - - - - - - - - - - - - -
MemberDescription
member Accessibility : Accessibility
member FieldAttribs : Attribs
member FormalType : typ
member Id : ident
member IsCompilerGenerated : bool
member IsMutable : bool
member IsStatic : bool
member IsZeroInit : bool
member LiteralValue : Constant option
member Name : string
member PropertyAttribs : Attribs
member Range : range
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_RecdFieldRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_RecdFieldRef.html deleted file mode 100644 index d4a3a406..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_RecdFieldRef.html +++ /dev/null @@ -1,41 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.RecdFieldRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.RecdFieldRef


-
-
- - - -
-

Full Type Signature

-
type RecdFieldRef =
-  | RFRef of TyconRef * string
-  with
-    member FieldName : string
-    member PropertyAttribs : Attribs
-    member Range : range
-    member RecdField : RecdField
-    member Tycon : Entity
-    member TyconRef : TyconRef
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
member FieldName : string
member PropertyAttribs : Attribs
member Range : range
member RecdField : RecdField
member Tycon : Entity
member TyconRef : TyconRef
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_RecordConstructionInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_RecordConstructionInfo.html deleted file mode 100644 index ba18b7db..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_RecordConstructionInfo.html +++ /dev/null @@ -1,26 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.RecordConstructionInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.RecordConstructionInfo


-
-
- - - -
- This ModuleOrNamespace that represents the compilation of a module as a class. - The same set of tycons etc. are bound in the ModuleOrNamespace as in the ModuleOrNamespaceExpr - This is the body of the module/namespace - -

Full Type Signature

-
type RecordConstructionInfo =
-  | RecdExprIsObjInit
-  | RecdExpr
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_SequentialOpKind.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_SequentialOpKind.html deleted file mode 100644 index 21194404..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_SequentialOpKind.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.SequentialOpKind -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.SequentialOpKind


-
-
- - - -
-

Full Type Signature

-
type SequentialOpKind =
-  | NormalSeq
-  | ThenDoSeq
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_SlotParam.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_SlotParam.html deleted file mode 100644 index aacb8a2b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_SlotParam.html +++ /dev/null @@ -1,31 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.SlotParam -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.SlotParam


-
-
- - - -
-

Full Type Signature

-
type SlotParam =
-  | TSlotParam of string option * typ * bool * bool * bool * Attribs
-  with
-    member Type : typ
-  end
-

Instance Members

- - - - -
MemberDescription
member Type : typ
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_SlotSig.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_SlotSig.html deleted file mode 100644 index 12a5f856..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_SlotSig.html +++ /dev/null @@ -1,41 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.SlotSig -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.SlotSig


-
-
- - - -
-

Full Type Signature

-
type SlotSig =
-  | TSlotSig of string * typ * typars * typars * SlotParam list list * typ option
-  with
-    member ClassTypars : typars
-    member FormalParams : SlotParam list list
-    member FormalReturnType : typ option
-    member ImplementedType : typ
-    member MethodTypars : typars
-    member Name : string
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
member ClassTypars : typars
member FormalParams : SlotParam list list
member FormalReturnType : typ option
member ImplementedType : typ
member MethodTypars : typars
member Name : string
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_StaticOptimization.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_StaticOptimization.html deleted file mode 100644 index e2751623..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_StaticOptimization.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.StaticOptimization -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.StaticOptimization


-
-
- - - -
-

Full Type Signature

-
type StaticOptimization = | TTyconEqualsTycon of typ * typ
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TcGlobals.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TcGlobals.html deleted file mode 100644 index 7c06458d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TcGlobals.html +++ /dev/null @@ -1,28 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TcGlobals -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TcGlobals


-
-
- - - -
-

Full Type Signature

-
type TcGlobals =
-  {nativeptr_tcr: TyconRef;
-   nativeint_tcr: TyconRef;
-   byref_tcr: TyconRef;
-   il_arr1_tcr: TyconRef;
-   il_arr2_tcr: TyconRef;
-   il_arr3_tcr: TyconRef;
-   il_arr4_tcr: TyconRef;
-   unit_tcr: TyconRef;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TopArgInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TopArgInfo.html deleted file mode 100644 index 1e6c9784..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TopArgInfo.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TopArgInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TopArgInfo


-
-
- - - -
- The extra metadata stored about typars for top-level definitions. Any information here is propagated from signature through - to the compiled code. - -

Full Type Signature

-
type TopArgInfo = | TopArgInfo of Attribs * ident option
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TopTyparInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TopTyparInfo.html deleted file mode 100644 index 7a3faf02..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TopTyparInfo.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TopTyparInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TopTyparInfo


-
-
- - - -
- The extra metadata stored about typars for top-level definitions. Any information here is propagated from signature through - to the compiled code. - -

Full Type Signature

-
type TopTyparInfo = | TopTyparInfo of ident * TyparKind
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TraitConstraintInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TraitConstraintInfo.html deleted file mode 100644 index 1167fc2f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TraitConstraintInfo.html +++ /dev/null @@ -1,39 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TraitConstraintInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TraitConstraintInfo


-
-
- - - -
- The specification of a member constraint that must be solved - -

Full Type Signature

-
type TraitConstraintInfo =
-  | TTrait of typ list * string * MemberFlags * typ list * typ option * TraitConstraintSln option ref
-  with
-    member MemberName : string
-    member ReturnType : typ option
-    member Solution : TraitConstraintSln option
-    member Solution : TraitConstraintSln option with set
-  end
-

Instance Members

- - - - - - - -
MemberDescription
member MemberName : string
member ReturnType : typ option
member Solution : TraitConstraintSln option
member Solution : TraitConstraintSln option with set
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TraitConstraintSln.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TraitConstraintSln.html deleted file mode 100644 index bdc67bc9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TraitConstraintSln.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TraitConstraintSln -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TraitConstraintSln


-
-
- - - -
-

Full Type Signature

-
type TraitConstraintSln =
-  | FSMethSln of typ * ValRef * tinst
-  | ILMethSln of typ * ILTypeRef option * ILMethodRef * tinst
-  | BuiltInSln
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Tycon.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Tycon.html deleted file mode 100644 index fc128d7d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Tycon.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Tycon -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Tycon


-
-
- - - -
Note: an abbreviation for Entity -

Full Type Signature

-
type Tycon = Entity
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconAugmentation.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconAugmentation.html deleted file mode 100644 index 8a047073..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconAugmentation.html +++ /dev/null @@ -1,32 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconAugmentation -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconAugmentation


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type TyconAugmentation =
-  {mutable tcaug_compare: (ValRef * ValRef) option;
-   mutable tcaug_compare_withc: ValRef option;
-   mutable tcaug_equals: (ValRef * ValRef) option;
-   mutable tcaug_hash_and_equals_withc: (ValRef * ValRef) option;
-   mutable tcaug_hasObjectGetHashCode: bool;
-   mutable tcaug_structural_hash: ValRef option;
-   mutable tcaug_adhoc: NameMap<ValRef list>;
-   mutable tcaug_implements: (typ * bool * range) list;
-   mutable tcaug_super: typ option;
-   mutable tcaug_closed: bool;
-   mutable tcaug_abstract: bool;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconObjModelData.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconObjModelData.html deleted file mode 100644 index f504c975..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconObjModelData.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconObjModelData -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconObjModelData


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type TyconObjModelData =
-  {fsobjmodel_kind: TyconObjModelKind;
-   fsobjmodel_vslots: ValRef list;
-   fsobjmodel_rfields: TyconRecdFields;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconObjModelKind.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconObjModelKind.html deleted file mode 100644 index 66dbe8c4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconObjModelKind.html +++ /dev/null @@ -1,25 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconObjModelKind -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconObjModelKind


-
-
- - - -
-

Full Type Signature

-
type TyconObjModelKind =
-  | TTyconClass
-  | TTyconInterface
-  | TTyconStruct
-  | TTyconDelegate of SlotSig
-  | TTyconEnum
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconRecdFields.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconRecdFields.html deleted file mode 100644 index 28641382..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconRecdFields.html +++ /dev/null @@ -1,41 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconRecdFields -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconRecdFields


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type TyconRecdFields =
-  {rfields_by_index: RecdField array;
-   rfields_by_name: NameMap<RecdField>;}
-  with
-    member FieldByIndex : n:int -> RecdField
-    member FieldByName : n:string -> RecdField option
-    member AllFieldsAsList : RecdField list
-    member TrueFieldsAsList : RecdField list
-    member TrueInstanceFieldsAsList : RecdField list
-  end
-

Instance Members

- - - - - - - - -
MemberDescription
member AllFieldsAsList : RecdField list
member FieldByIndex : n:int -> RecdField
member FieldByName : n:string -> RecdField option
member TrueFieldsAsList : RecdField list
member TrueInstanceFieldsAsList : RecdField list
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconRef.html deleted file mode 100644 index 38b3031e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconRef.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconRef


-
-
- - - -
Note: an abbreviation for EntityRef -

Full Type Signature

-
type TyconRef = EntityRef
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconRepresentation.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconRepresentation.html deleted file mode 100644 index 004432e0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconRepresentation.html +++ /dev/null @@ -1,27 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconRepresentation -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconRepresentation


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type TyconRepresentation =
-  | TFsObjModelRepr of TyconObjModelData
-  | TRecdRepr of TyconRecdFields
-  | TFiniteUnionRepr of TyconUnionData
-  | TILObjModelRepr of ILScopeRef * ILTypeDef list * ILTypeDef
-  | TAsmRepr of ILType
-  | TMeasureableRepr of typ
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconUnionCases.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconUnionCases.html deleted file mode 100644 index ac86894d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconUnionCases.html +++ /dev/null @@ -1,35 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconUnionCases -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconUnionCases


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type TyconUnionCases =
-  {ucases_by_index: UnionCase array;
-   ucases_by_name: NameMap<UnionCase>;}
-  with
-    member GetUnionCaseByIndex : n:int -> UnionCase
-    member UnionCasesAsList : UnionCase list
-  end
-

Instance Members

- - - - - -
MemberDescription
member GetUnionCaseByIndex : n:int -> UnionCase
member UnionCasesAsList : UnionCase list
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconUnionData.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconUnionData.html deleted file mode 100644 index 37c4c9c1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyconUnionData.html +++ /dev/null @@ -1,34 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconUnionData -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyconUnionData


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type TyconUnionData =
-  {funion_ucases: TyconUnionCases;}
-  with
-    member UnionCasesAsList : UnionCase list
-  end
-

Instance Members

- - - - -
MemberDescription
member UnionCasesAsList : UnionCase list
- The ILX data structure representing the discriminated union. -
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Typar.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Typar.html deleted file mode 100644 index 34ec0a68..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Typar.html +++ /dev/null @@ -1,76 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Typar -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Typar


-
-
- - - -
-

Full Type Signature

-
[<ReferenceEqualityAttribute (true)>]
-type Typar =
-  {mutable Data: TyparData;
-   mutable AsType: typ;}
-  with
-    member Link : tg:TyparData -> unit
-    member Attribs : Attribs
-    member Constraints : TyparConstraint list
-    member DisplayName : string
-    member DynamicReq : TyparDynamicReq
-    member Id : ident
-    member IsCompilerGenerated : bool
-    member IsErased : bool
-    member IsFromError : bool
-    member IsLinked : bool
-    member Kind : TyparKind
-    member Name : string
-    member Range : range
-    member Rigidity : TyparRigidity
-    member Solution : typ option
-    member Stamp : stamp
-    member StaticReq : TyparStaticReq
-    static member New : data:TyparData -> Typar
-    static member NewUnlinked : unit -> Typar
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member Attribs : Attribs
member Constraints : TyparConstraint list
member DisplayName : string
member DynamicReq : TyparDynamicReq
member Id : ident
member IsCompilerGenerated : bool
member IsErased : bool
member IsFromError : bool
member IsLinked : bool
member Kind : TyparKind
member Link : tg:TyparData -> unit
member Name : string
member Range : range
member Rigidity : TyparRigidity
member Solution : typ option
member Stamp : stamp
member StaticReq : TyparStaticReq
override ToString : unit -> string
-
-

Static Members

- - - - - -
MemberDescription
member New : data:TyparData -> Typar
member NewUnlinked : unit -> Typar
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparConstraint.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparConstraint.html deleted file mode 100644 index 03e14181..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparConstraint.html +++ /dev/null @@ -1,31 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparConstraint -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparConstraint


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type TyparConstraint =
-  | TTyparCoercesToType of typ * range
-  | TTyparDefaultsToType of int * typ * range
-  | TTyparSupportsNull of range
-  | TTyparMayResolveMemberConstraint of TraitConstraintInfo * range
-  | TTyparIsNotNullableValueType of range
-  | TTyparIsReferenceType of range
-  | TTyparSimpleChoice of typ list * range
-  | TTyparRequiresDefaultConstructor of range
-  | TTyparIsEnum of typ * range
-  | TTyparIsDelegate of typ * typ * range
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparData.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparData.html deleted file mode 100644 index e0cd9443..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparData.html +++ /dev/null @@ -1,28 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparData -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparData


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type TyparData =
-  {mutable typar_id: ident;
-   mutable typar_flags: int32;
-   typar_stamp: stamp;
-   typar_xmldoc: XmlDoc;
-   mutable typar_attribs: Attribs;
-   mutable typar_solution: typ option;
-   mutable typar_constraints: TyparConstraint list;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparDynamicReq.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparDynamicReq.html deleted file mode 100644 index b3f9b54a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparDynamicReq.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparDynamicReq -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparDynamicReq


-
-
- - - -
-

Full Type Signature

-
type TyparDynamicReq =
-  | NoDynamicReq
-  | DynamicReq
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparKind.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparKind.html deleted file mode 100644 index be6b7185..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparKind.html +++ /dev/null @@ -1,33 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparKind -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparKind


-
-
- - - -
-

Full Type Signature

-
type TyparKind =
-  | KindType
-  | KindMeasure
-  with
-    member AttrName : string option
-  end
-

Instance Members

- - - - - -
MemberDescription
member AttrName : string option
override ToString : unit -> string
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparRigidity.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparRigidity.html deleted file mode 100644 index 677091c2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_TyparRigidity.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparRigidity -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.TyparRigidity


-
-
- - - -
-

Full Type Signature

-
type TyparRigidity =
-  | TyparRigid
-  | TyparWarnIfNotRigid
-  | TyparFlexible
-  | TyparAnon
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_UndefinedName.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_UndefinedName.html deleted file mode 100644 index cafd164f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_UndefinedName.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.UndefinedName -
-
-

[Home] Exception FSharp.PowerPack.Metadata.Reader.Internal.Tast.UndefinedName


-
-
- - - -
-

Full Signature

-
exception UndefinedName of int * string * ident * string list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_UnionCase.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_UnionCase.html deleted file mode 100644 index f37d680a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_UnionCase.html +++ /dev/null @@ -1,54 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.UnionCase -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.UnionCase


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type UnionCase =
-  {ucase_rfields: TyconRecdFields;
-   ucase_rty: typ;
-   ucase_il_name: string;
-   ucase_xmldoc: XmlDoc;
-   ucase_id: ident;
-   ucase_access: Accessibility;
-   ucase_attribs: Attribs;}
-  with
-    member GetFieldByName : nm:string -> RecdField option
-    member Accessibility : Accessibility
-    member Attribs : Attribs
-    member DisplayName : string
-    member Id : ident
-    member IsNullary : bool
-    member Range : range
-    member RecdFields : RecdField list
-    member RecdFieldsArray : RecdField array
-  end
-

Instance Members

- - - - - - - - - - - - -
MemberDescription
member Accessibility : Accessibility
member Attribs : Attribs
member DisplayName : string
member GetFieldByName : nm:string -> RecdField option
member Id : ident
member IsNullary : bool
member Range : range
member RecdFields : RecdField list
member RecdFieldsArray : RecdField array
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_UnionCaseRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_UnionCaseRef.html deleted file mode 100644 index 35bc0cd7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_UnionCaseRef.html +++ /dev/null @@ -1,41 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.UnionCaseRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.UnionCaseRef


-
-
- - - -
-

Full Type Signature

-
type UnionCaseRef =
-  | UCRef of TyconRef * string
-  with
-    member Attribs : Attribs
-    member CaseName : string
-    member Range : range
-    member Tycon : Entity
-    member TyconRef : TyconRef
-    member UnionCase : UnionCase
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
member Attribs : Attribs
member CaseName : string
member Range : range
member Tycon : Entity
member TyconRef : TyconRef
member UnionCase : UnionCase
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Val.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Val.html deleted file mode 100644 index 308015d3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Val.html +++ /dev/null @@ -1,172 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Val -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Val


-
-
- - - -
-

Full Type Signature

-
type Val =
-  {mutable Data: ValData;}
-  with
-    member Link : tg:ValData -> unit
-    member Accessibility : Accessibility
-    member ActualParent : ParentRef
-    member ApparentParent : ParentRef
-    member Attribs : Attribs
-    member BaseOrThisInfo : ValBaseOrThisInfo
-    member CompiledName : string
-    member CoreDisplayName : string
-    member DefinitionRange : range
-    member DisplayName : string
-    member Id : ident
-    member InlineInfo : ValInlineInfo
-    member IsCompiledAsTopLevel : bool
-    member IsCompiledIntoModule : bool
-    member IsCompilerGenerated : bool
-    member IsConstructor : bool
-    member IsExtensionMember : bool
-    member IsIncrClassConstructor : bool
-    member IsIncrClassGeneratedMember : bool
-    member IsInstanceMember : bool
-    member IsLinked : bool
-    member IsMember : bool
-    member IsMemberOrModuleBinding : bool
-    member IsModuleBinding : bool
-    member IsMutable : bool
-    member IsNonExtensionMember : bool
-    member IsOverride : bool
-    member IsTypeFunction : bool
-    member LiteralValue : Constant option
-    member MakesNoCriticalTailcalls : bool
-    member MangledName : string
-    member MemberActualParent : TyconRef
-    member MemberApparentParent : TyconRef
-    member MemberInfo : ValMemberInfo option
-    member MustInline : bool
-    member PublicPath : PublicPath option
-    member Range : range
-    member RecursiveValInfo : ValRecursiveScopeInfo
-    member ReflectedDefinition : expr option
-    member Stamp : stamp
-    member TauType : typ
-    member TopValInfo : ValTopReprInfo option
-    member Typars : typars
-    member Type : typ
-    member TypeScheme : typars * typ
-    member UniqueCompiledName : string
-    member XmlDoc : XmlDoc
-    static member New : data:ValData -> Val
-    static member NewUnlinked : unit -> Val
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member Accessibility : Accessibility
member ActualParent : ParentRef
- The parent type or module, if any (None for expression bindings and parameters) -
member ApparentParent : ParentRef
member Attribs : Attribs
member BaseOrThisInfo : ValBaseOrThisInfo
member CompiledName : string
member CoreDisplayName : string
member DefinitionRange : range
- Range of the definition (implementation) of the value, used by Visual Studio - Updated by mutation when the implementation is matched against the signature. -
member DisplayName : string
member Id : ident
member InlineInfo : ValInlineInfo
member IsCompiledAsTopLevel : bool
- Is this represented as a "top level" static binding (i.e. a static field, static member, - instance member), rather than an "inner" binding that may result in a closure. - - This is implied by IsMemberOrModuleBinding, however not vice versa, for two reasons. - Some optimizations mutate this value when they decide to change the representation of a - binding to be IsCompiledAsTopLevel. Second, even immediately after type checking we expect - some non-module, non-member bindings to be marked IsCompiledAsTopLevel, e.g. 'y' in - 'let x = let y = 1 in y + y' (NOTE: check this, don't take it as gospel) -
member IsCompiledIntoModule : bool
member IsCompilerGenerated : bool
member IsConstructor : bool
member IsExtensionMember : bool
member IsIncrClassConstructor : bool
member IsIncrClassGeneratedMember : bool
member IsInstanceMember : bool
member IsLinked : bool
member IsMember : bool
member IsMemberOrModuleBinding : bool
- Is this a member definition or module definition? -
member IsModuleBinding : bool
member IsMutable : bool
member IsNonExtensionMember : bool
member IsOverride : bool
member IsTypeFunction : bool
member Link : tg:ValData -> unit
member LiteralValue : Constant option
- The value of a value or member marked with [<LiteralAttribute>] -
member MakesNoCriticalTailcalls : bool
- Was the value inferred to be a method or function that definitely makes no critical tailcalls? -
member MangledName : string
- The internal name the value. -
member MemberActualParent : TyconRef
member MemberApparentParent : TyconRef
member MemberInfo : ValMemberInfo option
- Is this a member, if so some more data about the member. - - Note, the value may still be (a) an extension member or (b) and abtract slot without - a true body. -
member MustInline : bool
member PublicPath : PublicPath option
- What is the public path to the value, if any? Should be set if and only if - IsMemberOrModuleBinding is set. -
member Range : range
- The place where the value was defined. -
member RecursiveValInfo : ValRecursiveScopeInfo
member ReflectedDefinition : expr option
member Stamp : stamp
- A unique stamp within the context of this invocation of the compiler process -
member TauType : typ
member TopValInfo : ValTopReprInfo option
override ToString : unit -> string
member Typars : typars
member Type : typ
- The type of the value. - May be a Type_forall for a generic value. - May be a type variable or type containing type variables during type inference. -
member TypeScheme : typars * typ
member UniqueCompiledName : string
member XmlDoc : XmlDoc
-
-

Static Members

- - - - - -
MemberDescription
member New : data:ValData -> Val
member NewUnlinked : unit -> Val
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValBaseOrThisInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValBaseOrThisInfo.html deleted file mode 100644 index 940eced5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValBaseOrThisInfo.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValBaseOrThisInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValBaseOrThisInfo


-
-
- - - -
-

Full Type Signature

-
type ValBaseOrThisInfo =
-  | CtorThisVal
-  | BaseVal
-  | NormalVal
-  | MemberThisVal
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValData.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValData.html deleted file mode 100644 index 44627a3a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValData.html +++ /dev/null @@ -1,36 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValData -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValData


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type ValData =
-  {val_name: string;
-   val_range: range;
-   mutable val_defn_range: range;
-   mutable val_type: typ;
-   val_stamp: stamp;
-   mutable val_flags: int64;
-   mutable val_const: Constant option;
-   val_pubpath: PublicPath option;
-   mutable val_defn: expr option;
-   val_access: Accessibility;
-   val_member_info: ValMemberInfo option;
-   mutable val_attribs: Attribs;
-   mutable val_top_repr_info: ValTopReprInfo option;
-   mutable val_actual_parent: ParentRef;
-   val_xmldoc: XmlDoc;}
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValInlineInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValInlineInfo.html deleted file mode 100644 index 316f621e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValInlineInfo.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValInlineInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValInlineInfo


-
-
- - - -
-

Full Type Signature

-
type ValInlineInfo =
-  | PseudoValue
-  | AlwaysInline
-  | OptionalInline
-  | NeverInline
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValMemberInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValMemberInfo.html deleted file mode 100644 index 2436fc34..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValMemberInfo.html +++ /dev/null @@ -1,38 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValMemberInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValMemberInfo


-
-
- - - -
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type ValMemberInfo =
-  {CompiledName: string;
-   ApparentParent: TyconRef;
-   mutable ImplementedSlotSigs: SlotSig list;
-   mutable IsImplemented: bool;
-   MemberFlags: MemberFlags;}
-  with
-    member LogicalName : string
-    member PropertyName : string
-  end
-

Instance Members

- - - - - -
MemberDescription
member LogicalName : string
member PropertyName : string
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValMutability.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValMutability.html deleted file mode 100644 index ec230b29..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValMutability.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValMutability -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValMutability


-
-
- - - -
-

Full Type Signature

-
type ValMutability =
-  | Immutable
-  | Mutable
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValRecursiveScopeInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValRecursiveScopeInfo.html deleted file mode 100644 index 384315d3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValRecursiveScopeInfo.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValRecursiveScopeInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValRecursiveScopeInfo


-
-
- - - -
-

Full Type Signature

-
type ValRecursiveScopeInfo =
-  | ValInRecScope of bool
-  | ValNotInRecScope
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValRef.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValRef.html deleted file mode 100644 index 993e06f2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValRef.html +++ /dev/null @@ -1,130 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValRef -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValRef


-
-
- - - -
- References are either local or nonlocal - -

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type ValRef =
-  {mutable binding: Val nonnull_slot;
-   nlr: NonLocalItemRef;}
-  with
-    member Accessibility : Accessibility
-    member ActualParent : ParentRef
-    member ApparentParent : ParentRef
-    member Attribs : Attribs
-    member BaseOrThisInfo : ValBaseOrThisInfo
-    member CompiledName : string
-    member CoreDisplayName : string
-    member DefinitionRange : range
-    member Deref : Val
-    member DisplayName : string
-    member Id : ident
-    member InlineInfo : ValInlineInfo
-    member IsCompiledAsTopLevel : bool
-    member IsCompilerGenerated : bool
-    member IsConstructor : bool
-    member IsExtensionMember : bool
-    member IsIncrClassConstructor : bool
-    member IsIncrClassGeneratedMember : bool
-    member IsInstanceMember : bool
-    member IsLocalRef : bool
-    member IsMember : bool
-    member IsMemberOrModuleBinding : bool
-    member IsModuleBinding : bool
-    member IsMutable : bool
-    member IsResolved : bool
-    member IsTypeFunction : bool
-    member LiteralValue : Constant option
-    member MakesNoCriticalTailcalls : bool
-    member MangledName : string
-    member MemberActualParent : TyconRef
-    member MemberApparentParent : TyconRef
-    member MemberInfo : ValMemberInfo option
-    member MustInline : bool
-    member PrivateTarget : Val nonnull_slot
-    member PublicPath : PublicPath option
-    member Range : range
-    member RecursiveValInfo : ValRecursiveScopeInfo
-    member ReflectedDefinition : expr option
-    member ResolvedTarget : Val nonnull_slot
-    member Stamp : stamp
-    member TauType : typ
-    member TopValInfo : ValTopReprInfo option
-    member TryDeref : Val option
-    member Typars : typars
-    member Type : typ
-    member TypeScheme : typars * typ
-    member UniqueCompiledName : string
-    member XmlDoc : XmlDoc
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member Accessibility : Accessibility
member ActualParent : ParentRef
member ApparentParent : ParentRef
member Attribs : Attribs
member BaseOrThisInfo : ValBaseOrThisInfo
member CompiledName : string
member CoreDisplayName : string
member DefinitionRange : range
member Deref : Val
member DisplayName : string
member Id : ident
member InlineInfo : ValInlineInfo
member IsCompiledAsTopLevel : bool
member IsCompilerGenerated : bool
member IsConstructor : bool
member IsExtensionMember : bool
member IsIncrClassConstructor : bool
member IsIncrClassGeneratedMember : bool
member IsInstanceMember : bool
member IsLocalRef : bool
member IsMember : bool
member IsMemberOrModuleBinding : bool
member IsModuleBinding : bool
member IsMutable : bool
member IsResolved : bool
member IsTypeFunction : bool
member LiteralValue : Constant option
member MakesNoCriticalTailcalls : bool
member MangledName : string
member MemberActualParent : TyconRef
member MemberApparentParent : TyconRef
member MemberInfo : ValMemberInfo option
member MustInline : bool
member PrivateTarget : Val nonnull_slot
member PublicPath : PublicPath option
member Range : range
member RecursiveValInfo : ValRecursiveScopeInfo
member ReflectedDefinition : expr option
member ResolvedTarget : Val nonnull_slot
member Stamp : stamp
member TauType : typ
member TopValInfo : ValTopReprInfo option
override ToString : unit -> string
member TryDeref : Val option
member Typars : typars
member Type : typ
member TypeScheme : typars * typ
member UniqueCompiledName : string
member XmlDoc : XmlDoc
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValTopReprInfo.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValTopReprInfo.html deleted file mode 100644 index bdf916ff..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValTopReprInfo.html +++ /dev/null @@ -1,41 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValTopReprInfo -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValTopReprInfo


-
-
- - - -
-

Full Type Signature

-
type ValTopReprInfo =
-  | TopValInfo of TopTyparInfo list * TopArgInfo list list * TopArgInfo
-  with
-    member ArgInfos : TopArgInfo list list
-    member AritiesOfArgs : int list
-    member HasNoArgs : bool
-    member KindsOfTypars : TyparKind list
-    member NumCurriedArgs : int
-    member NumTypars : int
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
member ArgInfos : TopArgInfo list list
member AritiesOfArgs : int list
member HasNoArgs : bool
member KindsOfTypars : TyparKind list
member NumCurriedArgs : int
member NumTypars : int
-
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValUseFlag.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValUseFlag.html deleted file mode 100644 index f5f7c8fe..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_ValUseFlag.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValUseFlag -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ValUseFlag


-
-
- - - -
-

Full Type Signature

-
type ValUseFlag =
-  | NormalValUse
-  | CtorValUsedAsSuperInit
-  | CtorValUsedAsSelfInit
-  | VSlotDirectCall
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Vals.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Vals.html deleted file mode 100644 index 163bd888..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type_Vals.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.Vals -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.Vals


-
-
- - - -
Note: an abbreviation for Val list -

Full Type Signature

-
type Vals = Val list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__ccu.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__ccu.html deleted file mode 100644 index 8b916246..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__ccu.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.ccu -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.ccu


-
-
- - - -
Note: an abbreviation for CcuThunk -

Full Type Signature

-
type ccu = CcuThunk
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__expr.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__expr.html deleted file mode 100644 index b29a4af2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__expr.html +++ /dev/null @@ -1,39 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.expr -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.expr


-
-
- - - -
- The big type of expressions. - -

Full Type Signature

-
type expr =
-  | TExpr_const of Constant * range * typ
-  | TExpr_val of ValRef * ValUseFlag * range
-  | TExpr_seq of expr * expr * SequentialOpKind * SequencePointInfoForSeq * range
-  | TExpr_lambda of uniq * Val option * Val list * expr * range * typ * SkipFreeVarsCache
-  | TExpr_tlambda of uniq * typars * expr * range * typ * SkipFreeVarsCache
-  | TExpr_app of expr * typ * tinst * Exprs * range
-  | TExpr_letrec of Bindings * expr * range * FreeVarsCache
-  | TExpr_let of Binding * expr * range * FreeVarsCache
-  | TExpr_obj of
-    uniq * typ * Val option * expr * ObjExprMethod list * (typ * ObjExprMethod list) list * range * SkipFreeVarsCache
-  | TExpr_match of
-    SequencePointInfoForBinding * range * DecisionTree * DecisionTreeTarget array * range * typ * SkipFreeVarsCache
-  | TExpr_static_optimization of StaticOptimization list * expr * expr * range
-  | TExpr_op of ExprOpSpec * tinst * Exprs * range
-  | TExpr_quote of expr * (typ list * Exprs * ExprData) option ref * range * typ
-  | TExpr_tchoose of typars * expr * range
-  | TExpr_link of expr ref
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__measure.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__measure.html deleted file mode 100644 index 1edc900d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__measure.html +++ /dev/null @@ -1,25 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.measure -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.measure


-
-
- - - -
-

Full Type Signature

-
type measure =
-  | MeasureVar of Typar
-  | MeasureCon of TyconRef
-  | MeasureProd of measure * measure
-  | MeasureInv of measure
-  | MeasureOne
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__stamp.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__stamp.html deleted file mode 100644 index 0ed7a2b5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__stamp.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.stamp -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.stamp


-
-
- - - -
Note: an abbreviation for int64 -

Full Type Signature

-
type stamp = int64
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__tinst.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__tinst.html deleted file mode 100644 index 74bf1e8f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__tinst.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.tinst -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.tinst


-
-
- - - -
Note: an abbreviation for typ list -

Full Type Signature

-
type tinst = typ list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__typ.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__typ.html deleted file mode 100644 index 8832fa88..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__typ.html +++ /dev/null @@ -1,31 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.typ -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.typ


-
-
- - - -
- The algebra of types - -

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type typ =
-  | TType_forall of typars * typ
-  | TType_app of TyconRef * tinst
-  | TType_tuple of typ list
-  | TType_fun of typ * typ
-  | TType_ucase of UnionCaseRef * tinst
-  | TType_var of Typar
-  | TType_modul_bindings
-  | TType_measure of measure
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__typars.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__typars.html deleted file mode 100644 index 9202372b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__typars.html +++ /dev/null @@ -1,20 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.typars -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.typars


-
-
- - - -
Note: an abbreviation for Typar list -

Full Type Signature

-
type typars = Typar list
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__uniq.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__uniq.html deleted file mode 100644 index 415605a5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.Tast.type__uniq.html +++ /dev/null @@ -1,22 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal.Tast.uniq -
-
-

[Home] Type FSharp.PowerPack.Metadata.Reader.Internal.Tast.uniq


-
-
- - - -
- Unique name generator for stamps attached to lambdas and object expressions - Note: an abbreviation for int64 -

Full Type Signature

-
type uniq = int64
-
-

See Also

-FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.html deleted file mode 100644 index 06de5d21..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.Reader.Internal.html +++ /dev/null @@ -1,28 +0,0 @@ -FSharp.PowerPack.Metadata.Reader.Internal -
-
-

[Home] Namespace FSharp.PowerPack.Metadata.Reader.Internal


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack.Metadata')

- - - - - - - -
ModuleDescription
FSharp.PowerPack.Metadata.Reader.Internal.Pickle
FSharp.PowerPack.Metadata.Reader.Internal.Prelude
FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming
FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.html deleted file mode 100644 index 5fb4d1cc..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.html +++ /dev/null @@ -1,39 +0,0 @@ -FSharp.PowerPack.Metadata -
-
-

[Home] Namespace FSharp.PowerPack.Metadata


-
-
- - - -
-

Type Definitions

- - - - - - - - - - - - - - - - -
TypeDescription
type FSharpAccessibility
type FSharpAssembly
type FSharpAttribute
type FSharpEntity
type FSharpGenericParameter
type FSharpGenericParameterConstraint - An F# discriminated union, as an object model -
type FSharpInlineAnnotation
type FSharpMemberOrVal
type FSharpParameter
type FSharpRecordField
type FSharpType
type FSharpUnionCase
type Range
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpAccessibility.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpAccessibility.html deleted file mode 100644 index c310ac21..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpAccessibility.html +++ /dev/null @@ -1,21 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpAccessibility -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpAccessibility


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpAccessibility
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpAssembly.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpAssembly.html deleted file mode 100644 index 73096039..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpAssembly.html +++ /dev/null @@ -1,68 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpAssembly -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpAssembly


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpAssembly
-with
-  member GetEntity : string -> FSharpEntity
-  member CodeLocation : string
-  member Entities : ReadOnlyCollection<FSharpEntity>
-  member QualifiedName : string
-  member ReflectionAssembly : Assembly
-  static member FromAssembly : Assembly -> FSharpAssembly
-  static member FromFile : fileName:string -> FSharpAssembly
-  static member FSharpLibrary : FSharpAssembly
-end
-

Instance Members

- - - - - - - - -
MemberDescription
member CodeLocation : string
- A hint as to where does the code for the CCU live (e.g what was the tcConfig.implicitIncludeDir at compilation time for this DLL?) -
member Entities : ReadOnlyCollection<FSharpEntity>
- A handle to the full specification of the contents of the module contained in this Assembly -
member GetEntity : string -> FSharpEntity
- Return the System.Reflection.Assembly object for the assembly -
member QualifiedName : string
- Holds the full qualified assembly name -
member ReflectionAssembly : Assembly
- Return the System.Reflection.Assembly object for the assembly -
-
-

Static Members

- - - - - - -
MemberDescription
member FromAssembly : Assembly -> FSharpAssembly
- This is one way of starting the loading process off. Dependencies are automatically - resolved by calling System.Reflection.Assembly.Load. -
member FromFile : fileName:string -> FSharpAssembly
- This is one way of starting the loading process off. -
member FSharpLibrary : FSharpAssembly
- Get the object representing the F# core library (FSharp.Core.dll) for the running program -
-
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpAttribute.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpAttribute.html deleted file mode 100644 index 1a5745ad..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpAttribute.html +++ /dev/null @@ -1,33 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpAttribute -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpAttribute


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpAttribute
-with
-  member GetReflectionType : unit -> Type
-  member Value : obj
-end
-

Instance Members

- - - - - -
MemberDescription
member GetReflectionType : unit -> Type
member Value : obj
-
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpEntity.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpEntity.html deleted file mode 100644 index 112ca650..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpEntity.html +++ /dev/null @@ -1,130 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpEntity -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpEntity


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpEntity
-with
-  member GetReflectionType : unit -> Type
-  member AbbreviatedType : FSharpType
-  member Attributes : ReadOnlyCollection<FSharpAttribute>
-  member BaseType : FSharpType
-  member GenericParameters : ReadOnlyCollection<FSharpGenericParameter>
-  member HasAssemblyCodeRepresentation : bool
-  member HasFSharpModuleSuffix : bool
-  member Implements : ReadOnlyCollection<FSharpType>
-  member IsAbbreviation : bool
-  member IsExceptionDeclaration : bool
-  member IsExternal : bool
-  member IsMeasure : bool
-  member IsModule : bool
-  member IsStruct : bool
-  member MembersOrValues : ReadOnlyCollection<FSharpMemberOrVal>
-  member Name : string
-  member NestedEntities : ReadOnlyCollection<FSharpEntity>
-  member QualifiedName : string
-  member Range : Range
-  member RecordFields : ReadOnlyCollection<FSharpRecordField>
-  member UnionCases : ReadOnlyCollection<FSharpUnionCase>
-  member UsesPrefixDisplay : bool
-  member XmlDoc : ReadOnlyCollection<string>
-  static member FromType : Type -> FSharpEntity
-end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member AbbreviatedType : FSharpType
member Attributes : ReadOnlyCollection<FSharpAttribute>
- The declared attributes for the type -
member BaseType : FSharpType
- Base type, if any -
member GenericParameters : ReadOnlyCollection<FSharpGenericParameter>
- Get the generic parameters, possibly including unit-of-measure parameters -
member GetReflectionType : unit -> Type
- Return the System.Type for the type - - Raises InvalidOperationException if the type is an abbreviation or has an assembly code representation. -
member HasAssemblyCodeRepresentation : bool
- Indicates the type is implemented through a mapping to IL assembly code. THis is only - true for types in FSharp.Core.dll -
member HasFSharpModuleSuffix : bool
- Indicates that a module is compiled to a class with the given mangled name. The mangling is reversed during lookup -
member Implements : ReadOnlyCollection<FSharpType>
- Interface implementations - boolean indicates compiler-generated -
member IsAbbreviation : bool
- Indicates the type is a measure, type or exception abbreviation -
member IsExceptionDeclaration : bool
- Indicates an F# exception declaration -
member IsExternal : bool
- If true, then this is a reference to something in some .NET assembly from another .NET language -
member IsMeasure : bool
- Indicates the entity is a measure definition -
member IsModule : bool
- Indicates the entity is an F# module definition -
member IsStruct : bool
- Indicates the type is a struct -
member MembersOrValues : ReadOnlyCollection<FSharpMemberOrVal>
- Properties, methods etc. with implementations, also values in a module -
member Name : string
- The name of the type, possibly with `n mangling -
member NestedEntities : ReadOnlyCollection<FSharpEntity>
member QualifiedName : string
- Get the fully qualified name of the type or module -
member Range : Range
- The declaration location for the type constructor -
member RecordFields : ReadOnlyCollection<FSharpRecordField>
- The fields of the class, struct or enum -
member UnionCases : ReadOnlyCollection<FSharpUnionCase>
- The cases of a discriminated union -
member UsesPrefixDisplay : bool
- Indicates the type prefers the "tycon<a,b>" syntax for display etc. -
member XmlDoc : ReadOnlyCollection<string>
- The declared documentation for the type or module -
-
-

Static Members

- - - - -
MemberDescription
member FromType : Type -> FSharpEntity
- Return the FSharpEntity corresponding to a .NET type -
-
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpGenericParameter.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpGenericParameter.html deleted file mode 100644 index b19791ae..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpGenericParameter.html +++ /dev/null @@ -1,49 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpGenericParameter -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpGenericParameter


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpGenericParameter
-with
-  member Attributes : ReadOnlyCollection<FSharpAttribute>
-  member IsMeasure : bool
-  member IsSolveAtCompileTime : bool
-  member Name : string
-  member Range : Range
-  member XmlDoc : ReadOnlyCollection<string>
-end
-

Instance Members

- - - - - - - - - -
MemberDescription
member Attributes : ReadOnlyCollection<FSharpAttribute>
- The declared attributes of the type parameter. -
member IsMeasure : bool
- Is this a measure variable -
member IsSolveAtCompileTime : bool
- Is this a ^a type variable -
member Name : string
member Range : Range
member XmlDoc : ReadOnlyCollection<string>
- The documentation for the type parameter. -
-
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpGenericParameterConstraint.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpGenericParameterConstraint.html deleted file mode 100644 index 4e2077a8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpGenericParameterConstraint.html +++ /dev/null @@ -1,23 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpGenericParameterConstraint -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpGenericParameterConstraint


-
-
- - - -
- An F# discriminated union, as an object model - -

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpGenericParameterConstraint
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpInlineAnnotation.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpInlineAnnotation.html deleted file mode 100644 index f8a1cc01..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpInlineAnnotation.html +++ /dev/null @@ -1,24 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpInlineAnnotation -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpInlineAnnotation


-
-
- - - -
-

Full Type Signature

-
type FSharpInlineAnnotation =
-  |  PsuedoValue  =  3
-  |  AlwaysInline  =  2
-  |  OptionalInline  =  1
-  |  NeverInline  =  0
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpMemberOrVal.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpMemberOrVal.html deleted file mode 100644 index 5631389f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpMemberOrVal.html +++ /dev/null @@ -1,85 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpMemberOrVal -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpMemberOrVal


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpMemberOrVal
-with
-  member Attributes : ReadOnlyCollection<FSharpAttribute>
-  member CompiledName : string
-  member CurriedParameterGroups : ReadOnlyCollection<ReadOnlyCollection<FSharpParameter>>
-  member GenericParameters : ReadOnlyCollection<FSharpGenericParameter>
-  member InlineAnnotation : FSharpInlineAnnotation
-  member IsCompilerGenerated : bool
-  member IsExtensionMember : bool
-  member IsImplicitConstructor : bool
-  member IsModuleValueOrMember : bool
-  member IsMutable : bool
-  member IsTypeFunction : bool
-  member Range : Range
-  member ReturnParameter : FSharpParameter
-  member Type : FSharpType
-  member XmlDoc : ReadOnlyCollection<string>
-end
-

Instance Members

- - - - - - - - - - - - - - - - - - -
MemberDescription
member Attributes : ReadOnlyCollection<FSharpAttribute>
- Custom attributes attached to the value. These contain references to other values (i.e. constructors in types). Mutable to fixup - these value references after copying a colelction of values. -
member CompiledName : string
- The member name in compiled code -
member
-  CurriedParameterGroups : ReadOnlyCollection<ReadOnlyCollection<FSharpParameter>>
member GenericParameters : ReadOnlyCollection<FSharpGenericParameter>
- The typars of the member or value -
member InlineAnnotation : FSharpInlineAnnotation
- Is this a must-inline value -
member IsCompilerGenerated : bool
- Is this a compiler generated value -
member IsExtensionMember : bool
- Is this an extension member? -
member IsImplicitConstructor : bool
- Is this an implicit constructor? -
member IsModuleValueOrMember : bool
- Is this a module or member value -
member IsMutable : bool
- Is this a mutable value -
member IsTypeFunction : bool
- Is this an F# type function -
member Range : Range
member ReturnParameter : FSharpParameter
member Type : FSharpType
- The full type of the member or value when used as a first class value -
member XmlDoc : ReadOnlyCollection<string>
- XML documentation attached to a value. -
-
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpParameter.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpParameter.html deleted file mode 100644 index f162d62b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpParameter.html +++ /dev/null @@ -1,37 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpParameter -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpParameter


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpParameter
-with
-  member Attributes : ReadOnlyCollection<FSharpAttribute>
-  member Name : string
-  member Range : Range
-  member Type : FSharpType
-end
-

Instance Members

- - - - - - - -
MemberDescription
member Attributes : ReadOnlyCollection<FSharpAttribute>
member Name : string
member Range : Range
member Type : FSharpType
-
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpRecordField.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpRecordField.html deleted file mode 100644 index efb767ba..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpRecordField.html +++ /dev/null @@ -1,65 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpRecordField -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpRecordField


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpRecordField
-with
-  member FieldAttributes : ReadOnlyCollection<FSharpAttribute>
-  member IsCompilerGenerated : bool
-  member IsMutable : bool
-  member IsStatic : bool
-  member Name : string
-  member PropertyAttributes : ReadOnlyCollection<FSharpAttribute>
-  member Range : Range
-  member Type : FSharpType
-  member XmlDoc : ReadOnlyCollection<string>
-end
-

Instance Members

- - - - - - - - - - - - -
MemberDescription
member FieldAttributes : ReadOnlyCollection<FSharpAttribute>
- Attributes attached to generated field -
member IsCompilerGenerated : bool
- Indicates a compiler generated field, not visible to Intellisense or name resolution -
member IsMutable : bool
- Is the field declared in F#? -
member IsStatic : bool
- Indicates a static field -
member Name : string
- Name of the field -
member PropertyAttributes : ReadOnlyCollection<FSharpAttribute>
- Attributes attached to generated property -
member Range : Range
- Declaration-location of the field -
member Type : FSharpType
- The type of the field, w.r.t. the generic parameters of the enclosing type constructor -
member XmlDoc : ReadOnlyCollection<string>
- Documentation for the field -
-
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpType.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpType.html deleted file mode 100644 index b21d0718..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpType.html +++ /dev/null @@ -1,61 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpType -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpType


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpType
-with
-  member GenericArguments : ReadOnlyCollection<FSharpType>
-  member GenericParameter : FSharpGenericParameter
-  member GenericParameterIndex : int
-  member IsFunction : bool
-  member IsGenericParameter : bool
-  member IsNamed : bool
-  member IsTuple : bool
-  member NamedEntity : FSharpEntity
-end
-

Instance Members

- - - - - - - - - - - -
MemberDescription
member GenericArguments : ReadOnlyCollection<FSharpType>
- Get the generic arguments for a tuple type, a function type or a type constructed using a named entity -
member GenericParameter : FSharpGenericParameter
- Get the generic parameter data for a generic parameter type -
member GenericParameterIndex : int
- Get the index for a generic parameter type -
member IsFunction : bool
- Indicates the type is a function type. The GenericArguments property returns the domain and range of the function type. -
member IsGenericParameter : bool
- Indicates the type is a variable type, whether declared, generalized or an inference type parameter -
member IsNamed : bool
- Indicates the type is constructed using a named entity -
member IsTuple : bool
- Indicates the type is a tuple type. The GenericArguments property returns the elements of the tuple type. -
member NamedEntity : FSharpEntity
- Get the named entity for a type constructed using a named entity -
-
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpUnionCase.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpUnionCase.html deleted file mode 100644 index f1ac5a6e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_FSharpUnionCase.html +++ /dev/null @@ -1,57 +0,0 @@ -FSharp.PowerPack.Metadata.FSharpUnionCase -
-
-

[Home] Type FSharp.PowerPack.Metadata.FSharpUnionCase


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type FSharpUnionCase
-with
-  member Attributes : ReadOnlyCollection<FSharpAttribute>
-  member CompiledName : string
-  member Fields : ReadOnlyCollection<FSharpRecordField>
-  member Name : string
-  member Range : Range
-  member ReturnType : FSharpType
-  member XmlDoc : ReadOnlyCollection<string>
-end
-

Instance Members

- - - - - - - - - - -
MemberDescription
member Attributes : ReadOnlyCollection<FSharpAttribute>
- Attributes, attached to the generated static method to make instances of the case -
member CompiledName : string
- Name of the case in generated IL code -
member Fields : ReadOnlyCollection<FSharpRecordField>
- Data carried by the case. -
member Name : string
- Name of the case -
member Range : Range
- Range of the name of the case -
member ReturnType : FSharpType
- Return type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it -
member XmlDoc : ReadOnlyCollection<string>
- Documentation for the case -
-
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_Range.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_Range.html deleted file mode 100644 index 1ac546d7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.type_Range.html +++ /dev/null @@ -1,39 +0,0 @@ -FSharp.PowerPack.Metadata.Range -
-
-

[Home] Type FSharp.PowerPack.Metadata.Range


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type Range
-with
-  member Document : string
-  member EndColumn : int
-  member EndLine : int
-  member StartColumn : int
-  member StartLine : int
-end
-

Instance Members

- - - - - - - - -
MemberDescription
member Document : string
member EndColumn : int
member EndLine : int
member StartColumn : int
member StartLine : int
-
-
-

See Also

-FSharp.PowerPack.Metadata
-
-
-
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.LazyList.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.LazyList.html deleted file mode 100644 index 0621dfa5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.LazyList.html +++ /dev/null @@ -1,145 +0,0 @@ -Microsoft.FSharp.Collections.LazyList -
-
-

[Home] Module Microsoft.FSharp.Collections.LazyList


-
-
- - - -
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val append : LazyList<'T> -> LazyList<'T> -> LazyList<'T>
- Return the stream which contains on demand the elements of the first stream followed - by the elements of the second list -
val combine :
-  LazyList<'T1> -> LazyList<'T2> -> LazyList<'T1 * 'T2>
- Return the stream which contains on demand the pair of elements of the first and second list -
val concat : LazyList<LazyList<'T>> -> LazyList<'T>
- Return the stream which contains on demand the list of elements of the list of lazy lists. -
val cons : 'T -> LazyList<'T> -> LazyList<'T>
- Return a new stream which contains on demand the given item followed by the - given stream. -
val consf : 'T -> (unit -> LazyList<'T>) -> LazyList<'T>
- Return a new stream which contains on demand the given item followed by the - stream returned by the given computation. The computation is - not executed until the elements of the stream are consumed. The - computation is only executed once. -
val delayed : (unit -> LazyList<'T>) -> LazyList<'T>
- Return a stream that is in effect the stream returned by the given computation. - The given computation is not executed until the first element on the stream is - consumed. -
val drop : int -> LazyList<'T> -> LazyList<'T>
- Return the stream without the first 'n' elements of the given stream. Does - not force the evaluation of any cells in the stream. -
val empty : unit -> LazyList<'T>
- Evaluates to the stream that contains no items -
val filter : ('T -> bool) -> LazyList<'T> -> LazyList<'T>
- Return a new collection which on consumption will consist of only the elements of the collection - for which the given predicate returns "true" -
val find : ('T -> bool) -> LazyList<'T> -> 'T
- Return the first element for which the given function returns true. - Raise KeyNotFoundException if no such element exists. -
val first : ('T -> bool) -> LazyList<'T> -> 'T option
- Apply the given function to successive elements of the list, returning the first - result where function returns Some(x) for some x. If the function never returns - true, 'None' is returned. -
val folds :
-  ('State -> 'T -> 'State) ->
-    'State -> LazyList<'T> -> LazyList<'State>
- Return a new stream consisting of the results of applying the given accumulating function - to successive elements of the stream -
val get : LazyList<'T> -> ('T * LazyList<'T>) option
- Get the first cell of the stream. -
val hd : LazyList<'T> -> 'T
- Return the first element of the stream. Raise 'Invalid_argument "hd"' if the - stream is empty. Forces the evaluation of - the first cell of the stream if it is not already evaluated. -
val map : ('T -> 'U) -> LazyList<'T> -> LazyList<'U>
- Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. -
val map2 :
-  ('T1 -> 'T2 -> 'U) ->
-    LazyList<'T1> -> LazyList<'T2> -> LazyList<'U>
- Build a new collection whose elements are the results of applying the given function - to the corresponding elements of the two collections pairwise. -
val nonempty : LazyList<'T> -> bool
- Test if a stream contains at least one element. Forces the evaluation of - the first element of the stream if it is not already evaluated. -
val of_array : 'T array -> LazyList<'T>
- Build a collection from the given array. This function will eagerly evaluate all of the - stream (and thus may not terminate). -
val of_list : 'T list -> LazyList<'T>
- Build a collection from the given list. This function will eagerly evaluate all of the - stream (and thus may not terminate). -
val of_seq : seq<'T> -> LazyList<'T>
- Build a new collection from the given enumerable object -
val repeat : 'T -> LazyList<'T>
- Return the stream which on consumption will consist of an infinite sequence of the given item -
val take : int -> LazyList<'T> -> LazyList<'T>
- Return the stream which on consumption will consist of at most 'n' elements of - the given stream. Does not force the evaluation of any cells in the stream. -
val tl : LazyList<'T> -> LazyList<'T>
- Return the stream corresponding to the remaining items in the sequence. - Raise 'Invalid_argument "tl"' if the stream is empty. Forces the evaluation of - the first cell of the stream if it is not already evaluated. -
val to_array : LazyList<'T> -> 'T array
- Build an array from the given collection -
val to_list : LazyList<'T> -> 'T list
- Build a list from the given collection This function will eagerly evaluate all of the - stream (and thus may not terminate). -
val to_seq : LazyList<'T> -> seq<'T>
- Return a view of the collection as an enumerable object -
val unfold : ('State -> ('T * 'State) option) -> 'State -> LazyList<'T>
- Return a stream that contains the elements returned by the given computation. - The given computation is not executed until the first element on the stream is - consumed. The given argument is passed to the computation. Subsequent elements - in the stream are generated by again applying the residual 'b to the computation. -
-
-

Active Patterns

- - - - -
Active PatternDescription
val ( |Cons|Nil| ) :
-  LazyList<'T> -> Choice<('T * LazyList<'T>),unit>
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.ResizeArray.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.ResizeArray.html deleted file mode 100644 index 4c88af9b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.ResizeArray.html +++ /dev/null @@ -1,258 +0,0 @@ -Microsoft.FSharp.Collections.ResizeArray -
-
-

[Home] Module Microsoft.FSharp.Collections.ResizeArray


-
-
- - - -
- Generic operations on the type System.Collections.Generic.List, which is called ResizeArray in the F# libraries. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val append :
-  ResizeArray<'a> -> ResizeArray<'a> -> ResizeArray<'a>
-Build a new array that contains the elements of the first array followed by the elements of the second array -
val blit :
-  ResizeArray<'a> -> int -> ResizeArray<'a> -> int -> int -> unit
-Read a range of elements from the first array and write them into the second. -
val choose : ('a -> 'b option) -> ResizeArray<'a> -> ResizeArray<'b>
-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 combine :
-  ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<'a * 'b>
-Combine the two arrays into an array of pairs. The two arrays must have equal lengths. -
val concat : ResizeArray<'a> list -> ResizeArray<'a>
-Build a new array that contains the elements of each of the given list of arrays -
val copy : ResizeArray<'a> -> ResizeArray<'a>
-Build a new array that contains the elements of the given array -
val create : int -> 'a -> ResizeArray<'a>
- Create an array whose elements are all initially the given value. -
val exists : ('a -> bool) -> ResizeArray<'a> -> bool
- Test if any element of the array satisfies the given predicate. - If the input function is f and the elements are i0...iN - then computes p i0 or ... or p iN. -
val exists2 :
-  ('a -> 'b -> bool) -> ResizeArray<'a> -> ResizeArray<'b> -> bool
- Test elements of the two arrays pairwise to see if any pair of element satisfies the given predicate. - Raise ArgumentException if the arrays have different lengths. -
val fill : ResizeArray<'a> -> int -> int -> 'a -> unit
-Fill a range of the collection with the given element -
val filter : ('a -> bool) -> ResizeArray<'a> -> ResizeArray<'a>
-Return a new collection containing only the elements of the collection -for which the given predicate returns true -
val find : ('a -> bool) -> ResizeArray<'a> -> 'a
-Return the first element for which the given function returns true. -Raise KeyNotFoundException if no such element exists. -
val find_index : ('a -> bool) -> ResizeArray<'a> -> int
- Return 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 find_indexi : (int -> 'a -> bool) -> ResizeArray<'a> -> int
- Return 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 first : ('a -> 'b option) -> ResizeArray<'a> -> 'b option
-Apply the given function to successive elements, returning the first -result where function returns "Some(x)" for some x. -
val fold_left : ('a -> 'b -> 'a) -> 'a -> ResizeArray<'b> -> 'a
- Apply 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_left2 :
-  ('state -> 'b1 -> 'b2 -> 'state) ->
-    'state -> ResizeArray<'b1> -> ResizeArray<'b2> -> 'state
- Apply 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 fold_right : ('a -> 'b -> 'b) -> ResizeArray<'a> -> 'b -> 'b
- Apply 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 fold_right2 :
-  ('a1 -> 'a2 -> 'b -> 'b) ->
-    ResizeArray<'a1> -> ResizeArray<'a2> -> 'b -> 'b
- 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 for_all : ('a -> bool) -> ResizeArray<'a> -> bool
- Test if all elements of the array satisfy the given predicate. - If the input function is f and the elements are i0...iN and "j0...jN" - then computes p i0 && ... && p iN. -
val for_all2 :
-  ('a -> 'b -> bool) -> ResizeArray<'a> -> ResizeArray<'b> -> bool
- Test elements of the two arrays pairwise to see if all pairs of elements satisfy the given predicate. - Raise ArgumentException if the arrays have different lengths. -
val get : ResizeArray<'a> -> int -> 'a
- Fetch an element from the collection. You can also use the syntax arr.[idx]. -
val init : int -> (int -> 'a) -> ResizeArray<'a>
- Create an array by calling the given generator on each index. -
val is_empty : ResizeArray<'a> -> bool
- Return true if the given array is empty, otherwise false -
val iter : ('a -> unit) -> ResizeArray<'a> -> unit
-Apply the given function to each element of the array. -
val iter2 :
-  ('a -> 'b -> unit) -> ResizeArray<'a> -> ResizeArray<'b> -> unit
-Apply the given function to two arrays simultaneously. The -two arrays must have the same lengths, otherwise an Invalid_argument exception is -raised. -
val iteri : (int -> 'a -> unit) -> ResizeArray<'a> -> unit
-Apply the given function to each element of the array. The integer passed to the -function indicates the index of element. -
val iteri2 :
-  (int -> 'a -> 'b -> unit) ->
-    ResizeArray<'a> -> ResizeArray<'b> -> unit
- Apply 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 length : ResizeArray<'a> -> int
- Return the length of the collection. You can also use property arr.Length. -
val map : ('a -> 'b) -> ResizeArray<'a> -> ResizeArray<'b>
-Build a new array whose elements are the results of applying the given function -to each of the elements of the array. -
val map2 :
-  ('a -> 'b -> 'c) ->
-    ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<'c>
-Build 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. -
val mapi : (int -> 'a -> 'b) -> ResizeArray<'a> -> ResizeArray<'b>
-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 mapi2 :
-  (int -> 'a -> 'b -> 'c) ->
-    ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<'c>
- Build 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 of_list : 'a list -> ResizeArray<'a>
-Build an array from the given list -
val partition :
-  ('a -> bool) ->
-    ResizeArray<'a> -> ResizeArray<'a> * ResizeArray<'a>
-Split the collection into two collections, containing the -elements for which the given predicate returns true and false -respectively -
val reduce_left : ('a -> 'a -> 'a) -> ResizeArray<'a> -> 'a
- Apply 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_right : ('a -> 'a -> 'a) -> ResizeArray<'a> -> 'a
- Apply 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 rev : ResizeArray<'a> -> ResizeArray<'a>
-Return a new array with the elements in reverse order -
val scan_left :
-  ('b -> 'a -> 'b) -> 'b -> ResizeArray<'a> -> ResizeArray<'b>
- Like fold_left, but return the intermediary and final results -
val scan_right :
-  ('a -> 'c -> 'c) -> ResizeArray<'a> -> 'c -> ResizeArray<'c>
- Like fold_right, but return both the intermediary and final results -
val set : ResizeArray<'a> -> int -> 'a -> unit
- Set the value of an element in the collection. You can also use the syntax arr.[idx] <- e. -
val singleton : 'a -> ResizeArray<'a>
- Return an array containing the given element -
val sort : ('a -> 'a -> int) -> ResizeArray<'a> -> unit
- Sort the elements using the given comparison function -
val sort_by : ('a -> 'key) -> ResizeArray<'a> -> unit
- Sort the elements using the key extractor and generic comparison on the keys -
val split :
-  ResizeArray<'a * 'b> -> ResizeArray<'a> * ResizeArray<'b>
-Split a list of pairs into two lists -
val sub : ResizeArray<'a> -> int -> int -> ResizeArray<'a>
-Build a new array that contains the given subrange specified by -starting index and length. -
val to_list : ResizeArray<'a> -> 'a list
-Build a list from the given array -
val to_seq : ResizeArray<'a> -> seq<'a>
- Return a view of the array as an enumerable object -
val tryfind : ('a -> bool) -> ResizeArray<'a> -> 'a option
-Return the first element for which the given function returns true. -Return None if no such element exists. -
val tryfind_index : ('a -> bool) -> ResizeArray<'a> -> int option
- Return the index of the first element in the array - that satisfies the given predicate. -
val tryfind_indexi : (int -> 'a -> bool) -> ResizeArray<'a> -> int option
- Return the index of the first element in the array - that satisfies the given predicate. -
val unzip :
-  ResizeArray<'a * 'b> -> ResizeArray<'a> * ResizeArray<'b>
- Split an array of pairs into two arrays -
val zip :
-  ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<'a * 'b>
- Combine the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is - raised.. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.html deleted file mode 100644 index 21230c4f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.html +++ /dev/null @@ -1,55 +0,0 @@ -Microsoft.FSharp.Collections.Tagged -
-
-

[Home] Namespace Microsoft.FSharp.Collections.Tagged


-
-
- - - -
-

Type Definitions

- - - - - - - - - - - -
TypeDescription
type HashMultiMap - HashMultiMap, but where a constraint tag tracks information about the hash/equality functions used - for the hashing. When the tag is Tags.StructuralHash this is identical to HashMultiMap. -
type HashMultiMap Note: an abbreviation for HashMultiMap<'key,'a,IEqualityComparer<'key>>
type HashSet - Mutable hash sets based on F# structural "hash" and (=) functions. Implemented via a hash table and/or Dictionary. - Mutable hash sets where a constraint tag tracks information about the hash/equality functions used - for the hashing. When the tag is Tags.StructuralHash this is identical to HashSet. -
type HashSet Note: an abbreviation for HashSet<'a,IEqualityComparer<'a>>
type Map - Immutable maps. A constraint tag carries information about the class of key-comparers being used. -
type Map - Immutable maps. Keys are ordered by construction function specified - when creating empty maps or by F# structural comparison if no - construction function is specified. - - - Maps based on structural comparison are - efficient for small keys. They are not a suitable choice if keys are recursive data structures - or require non-structural comparison semantics. - - Note: an abbreviation for Map<'key,'a,IComparer<'key>>
type Set - Immutable sets where a constraint tag carries information about the class of key-comparer being used. -
type Set - Immutable sets based on binary trees, default tag - Note: an abbreviation for Set<'a,IComparer<'a>>
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashMultiMap-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashMultiMap-2.html deleted file mode 100644 index 630fc97c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashMultiMap-2.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Collections.Tagged.HashMultiMap -
-
-

[Home] Type Microsoft.FSharp.Collections.Tagged.HashMultiMap


-
-
- - - -
Note: an abbreviation for HashMultiMap<'key,'a,IEqualityComparer<'key>> -

Full Type Signature

-
type HashMultiMap<'key,'a> = HashMultiMap<'key,'a,IEqualityComparer<'key>>
-
-

See Also

-Microsoft.FSharp.Collections.Tagged
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashMultiMap-3.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashMultiMap-3.html deleted file mode 100644 index e8344550..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashMultiMap-3.html +++ /dev/null @@ -1,96 +0,0 @@ -Microsoft.FSharp.Collections.Tagged.HashMultiMap -
-
-

[Home] Type Microsoft.FSharp.Collections.Tagged.HashMultiMap


-
-
- - - -
- HashMultiMap, but where a constraint tag tracks information about the hash/equality functions used - for the hashing. When the tag is Tags.StructuralHash this is identical to HashMultiMap. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type HashMultiMap<'key,'a,'hashTag (requires 'hashTag :> IEqualityComparer<'key>)>
-with
-  member Add : 'key * 'a -> unit
-  member Clear : unit -> unit
-  member ContainsKey : 'key -> bool
-  member Copy : unit -> HashMultiMap<'key,'a,'hashTag>
-  member FindAll : 'key -> 'a list
-  member Fold : ('key -> 'a -> 'c -> 'c) -> 'c -> 'c
-  member Iterate : ('key -> 'a -> unit) -> unit
-  member Remove : 'key -> unit
-  member Replace : 'key * 'a -> unit
-  member TryFind : 'key -> 'a option
-  member Count : int
-  member Item : 'key -> 'a with get
-  member Item : 'key -> 'a with set
-  static member Create : 'hashTag * int -> HashMultiMap<'key,'a,'hashTag>
-end
-

Instance Members

- - - - - - - - - - - - - - - - -
MemberDescription
member Add : 'key * 'a -> unit
- Add a binding for the element to the table -
member Clear : unit -> unit
- Clear all elements from the collection -
member ContainsKey : 'key -> bool
- Test if the collection contains any bindings for the given element -
member Copy : unit -> HashMultiMap<'key,'a,'hashTag>
- Make a shallow copy of the collection -
member Count : int
- The number of bindings in the hash table -
member FindAll : 'key -> 'a list
- Find all bindings for the given element in the table, if any -
member Fold : ('key -> 'a -> 'c -> 'c) -> 'c -> 'c
- Apply the given function to each element in the collection threading the accumulating parameter - through the sequence of function applications -
member Item : 'key -> 'a with get
- Lookup or set the given element in the table. Raise KeyNotFoundException if the element is not found. -
member Item : 'key -> 'a with set
- Lookup or set the given element in the table. Raise KeyNotFoundException if the element is not found. -
member Iterate : ('key -> 'a -> unit) -> unit
- Apply the given function to each binding in the hash table -
member Remove : 'key -> unit
- Remove the latest binding (if any) for the given element from the table -
member Replace : 'key * 'a -> unit
- Replace the latest binding (if any) for the given element. -
member TryFind : 'key -> 'a option
- Lookup the given element in the table, returning the result as an Option -
-
-

Static Members

- - - - -
MemberDescription
member Create : 'hashTag * int -> HashMultiMap<'key,'a,'hashTag>
- Create a new empty mutable hash table with an internal bucket array of the given approximate size - and with the given key hash/equality functions -
-
-
-

See Also

-Microsoft.FSharp.Collections.Tagged
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashSet-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashSet-1.html deleted file mode 100644 index cc16374c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashSet-1.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Collections.Tagged.HashSet -
-
-

[Home] Type Microsoft.FSharp.Collections.Tagged.HashSet


-
-
- - - -
Note: an abbreviation for HashSet<'a,IEqualityComparer<'a>> -

Full Type Signature

-
type HashSet<'a> = HashSet<'a,IEqualityComparer<'a>>
-
-

See Also

-Microsoft.FSharp.Collections.Tagged
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashSet-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashSet-2.html deleted file mode 100644 index f14e42a8..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_HashSet-2.html +++ /dev/null @@ -1,79 +0,0 @@ -Microsoft.FSharp.Collections.Tagged.HashSet -
-
-

[Home] Type Microsoft.FSharp.Collections.Tagged.HashSet


-
-
- - - -
- Mutable hash sets based on F# structural "hash" and (=) functions. Implemented via a hash table and/or Dictionary. - Mutable hash sets where a constraint tag tracks information about the hash/equality functions used - for the hashing. When the tag is Tags.StructuralHash this is identical to HashSet. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type HashSet<'a,'hashTag (requires 'hashTag :> IEqualityComparer<'a>)>
-with
-  interface IEnumerable
-  interface IEnumerable<'a>
-  member Add : 'a -> unit
-  member Clear : unit -> unit
-  member Contains : 'a -> bool
-  member Copy : unit -> HashSet<'a,'hashTag>
-  member Fold : ('a -> 'b -> 'b) -> 'b -> 'b
-  member Iterate : ('a -> unit) -> unit
-  member Remove : 'a -> unit
-  member Count : int
-  static member Create : 'hashTag * int -> HashSet<'a,'hashTag>
-end
-

Instance Members

- - - - - - - - - - - -
MemberDescription
member Add : 'a -> unit
- Add an element to the collection -
member Clear : unit -> unit
- Clear all elements from the set -
member Contains : 'a -> bool
- Test if the set contains the given element -
member Copy : unit -> HashSet<'a,'hashTag>
- Make a shallow copy of the set -
member Count : int
- The number of elements in the set -
member Fold : ('a -> 'b -> 'b) -> 'b -> 'b
- Apply the given function to the set threading the accumulating parameter - through the sequence of function applications -
member Iterate : ('a -> unit) -> unit
- Apply the given function to each binding in the hash table -
member Remove : 'a -> unit
- Remove the given element from the set -
-
-

Static Members

- - - - -
MemberDescription
member Create : 'hashTag * int -> HashSet<'a,'hashTag>
- Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with the given key hash/equality functions -
-
-
-

See Also

-Microsoft.FSharp.Collections.Tagged
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Map-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Map-2.html deleted file mode 100644 index e9ec5bc5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Map-2.html +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft.FSharp.Collections.Tagged.Map -
-
-

[Home] Type Microsoft.FSharp.Collections.Tagged.Map


-
-
- - - -
- Immutable maps. Keys are ordered by construction function specified - when creating empty maps or by F# structural comparison if no - construction function is specified. - - - Maps based on structural comparison are - efficient for small keys. They are not a suitable choice if keys are recursive data structures - or require non-structural comparison semantics. - - Note: an abbreviation for Map<'key,'a,IComparer<'key>> -

Full Type Signature

-
type Map<'key,'a> = Map<'key,'a,IComparer<'key>>
-
-

See Also

-Microsoft.FSharp.Collections.Tagged
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Map-3.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Map-3.html deleted file mode 100644 index 57a0c0fe..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Map-3.html +++ /dev/null @@ -1,154 +0,0 @@ -Microsoft.FSharp.Collections.Tagged.Map -
-
-

[Home] Type Microsoft.FSharp.Collections.Tagged.Map


-
-
- - - -
- Immutable maps. A constraint tag carries information about the class of key-comparers being used. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type Map<'key,'a,'comparerTag (requires 'comparerTag :> IComparer<'key>)>
-with
-  interface IComparable
-  interface IEnumerable
-  interface IEnumerable<KeyValuePair<'key,'a>>
-  member Add : 'key * 'a -> Map<'key,'a,'comparerTag>
-  member ContainsKey : 'key -> bool
-  override Equals : obj -> bool
-  member Exists : ('key -> 'a -> bool) -> bool
-  member Filter : ('key -> 'a -> bool) -> Map<'key,'a,'comparerTag>
-  member First : ('key -> 'a -> 'b option) -> 'b option
-  member Fold : folder:('key -> 'a -> 'state -> 'state) -> 'state -> 'state
-  member FoldAndMap : ('key -> 'a -> 'state -> 'b * 'state) -> 'state -> Map<'key,'b,'comparerTag> * 'state
-  member FoldSection : 'key -> 'key -> ('key -> 'a -> 'state -> 'state) -> 'state -> 'state
-  member ForAll : ('key -> 'a -> bool) -> bool
-  member Iterate : action:('key -> 'a -> unit) -> unit
-  member Map : mapping:('key -> 'a -> 'b) -> Map<'key,'b,'comparerTag>
-  member MapRange : mapping:('a -> 'b) -> Map<'key,'b,'comparerTag>
-  member Partition : ('key -> 'a -> bool) -> Map<'key,'a,'comparerTag> * Map<'key,'a,'comparerTag>
-  member Remove : 'key -> Map<'key,'a,'comparerTag>
-  member ToArray : unit -> ('key * 'a) array
-  member ToList : unit -> ('key * 'a) list
-  member TryFind : 'key -> 'a option
-  member Count : int
-  member IsEmpty : bool
-  member Item : 'key -> 'a with get
-  static member Create : 'comparerTag * seq<'key * 'a> -> Map<'key,'a,'comparerTag>
-  static member Empty : 'comparerTag -> Map<'key,'a,'comparerTag>
-  static member FromList : 'comparerTag * ('key * 'a) list -> Map<'key,'a,'comparerTag>
-end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member Add : 'key * 'a -> Map<'key,'a,'comparerTag>
- Return a new map with the binding added to the given map. -
member ContainsKey : 'key -> bool
- Test is an element is in the domain of the map -
member Count : int
- The number of bindings in the map -
override Equals : obj -> bool
member Exists : ('key -> 'a -> bool) -> bool
- Return true if the given predicate returns true for one of the - bindings in the map. Always returns false if the map is empty. -
member Filter : ('key -> 'a -> bool) -> Map<'key,'a,'comparerTag>
- Build a new map containing the bindings for which the given predicate returns 'true'. -
member First : ('key -> 'a -> 'b option) -> 'b option
- Search the map looking for the first element where the given function returns a Some value -
member Fold : folder:('key -> 'a -> 'state -> 'state) -> 'state -> 'state
- Fold over the bindings in the map. -
member
-  FoldAndMap : ('key -> 'a -> 'state -> 'b * 'state) ->
-                 'state -> Map<'key,'b,'comparerTag> * 'state
- Fold over the bindings in the map. -
member
-  FoldSection : 'key ->
-                  'key -> ('key -> 'a -> 'state -> 'state) -> 'state -> 'state
- Given the start and end points of a key range, - Fold over the bindings in the map that are in the range, - and the end points are included if present (the range is considered a closed interval). -
member ForAll : ('key -> 'a -> bool) -> bool
- Return true if the given predicate returns true for all of the - bindings in the map. Always returns true if the map is empty. -
member IsEmpty : bool
- Return true if there are no bindings in the map. -
member Item : 'key -> 'a with get
- Lookup an element in the map. Raise KeyNotFoundException if no binding - exists in the map. -
member Iterate : action:('key -> 'a -> unit) -> unit
- Apply the given function to each binding in the dictionary -
member Map : mapping:('key -> 'a -> 'b) -> Map<'key,'b,'comparerTag>
- Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The index passed to the - function indicates the index of element being transformed. -
member MapRange : mapping:('a -> 'b) -> Map<'key,'b,'comparerTag>
- Build a new collection whose elements are the results of applying the given function - to each of the elements of the collection. -
member
-  Partition : ('key -> 'a -> bool) ->
-                Map<'key,'a,'comparerTag> *
-                Map<'key,'a,'comparerTag>
- Build two new maps, one containing the bindings for which the given predicate returns 'true', - and the other the remaining bindings. -
member Remove : 'key -> Map<'key,'a,'comparerTag>
- Remove an element from the domain of the map. No exception is raised if the element is not present. -
member ToArray : unit -> ('key * 'a) array
- The elements of the set as an array -
member ToList : unit -> ('key * 'a) list
- The elements of the set as a list. -
member TryFind : 'key -> 'a option
- Lookup an element in the map, returning a Some value if the element is in the domain - of the map and None if not. -
-
-

Static Members

- - - - - - -
MemberDescription
member
-  Create : 'comparerTag * seq<'key * 'a> ->
-             Map<'key,'a,'comparerTag>
- Build a map that contains the bindings of the given IEnumerable - and where comparison of elements is based on the given comparison function -
member Empty : 'comparerTag -> Map<'key,'a,'comparerTag>
- The empty map, and use the given comparer comparison function for all operations associated - with any maps built from this map. -
member
-  FromList : 'comparerTag * ('key * 'a) list -> Map<'key,'a,'comparerTag>
-
-
-

See Also

-Microsoft.FSharp.Collections.Tagged
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Set-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Set-1.html deleted file mode 100644 index 53319564..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Set-1.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Collections.Tagged.Set -
-
-

[Home] Type Microsoft.FSharp.Collections.Tagged.Set


-
-
- - - -
- Immutable sets based on binary trees, default tag - Note: an abbreviation for Set<'a,IComparer<'a>> -

Full Type Signature

-
type Set<'a> = Set<'a,IComparer<'a>>
-
-

See Also

-Microsoft.FSharp.Collections.Tagged
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Set-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Set-2.html deleted file mode 100644 index a72d26a2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.Tagged.type_Set-2.html +++ /dev/null @@ -1,179 +0,0 @@ -Microsoft.FSharp.Collections.Tagged.Set -
-
-

[Home] Type Microsoft.FSharp.Collections.Tagged.Set


-
-
- - - -
- Immutable sets where a constraint tag carries information about the class of key-comparer being used. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type Set<'a,'comparerTag (requires 'comparerTag :> IComparer<'a>)>
-with
-  interface IComparable
-  interface IEnumerable
-  interface IEnumerable<'a>
-  interface ICollection<'a>
-  member Add : 'a -> Set<'a,'comparerTag>
-  member Contains : 'a -> bool
-  override Equals : obj -> bool
-  member Exists : predicate:('a -> bool) -> bool
-  member Filter : predicate:('a -> bool) -> Set<'a,'comparerTag>
-  member Fold : ('a -> 'b -> 'b) -> 'b -> 'b
-  member ForAll : predicate:('a -> bool) -> bool
-  member IsSubsetOf : Set<'a,'comparerTag> -> bool
-  member IsSupersetOf : Set<'a,'comparerTag> -> bool
-  member Iterate : ('a -> unit) -> unit
-  member Partition : predicate:('a -> bool) -> Set<'a,'comparerTag> * Set<'a,'comparerTag>
-  member Remove : 'a -> Set<'a,'comparerTag>
-  member ToArray : unit -> 'a array
-  member ToList : unit -> 'a list
-  member Choose : 'a
-  member Count : int
-  member IsEmpty : bool
-  member MaximumElement : 'a
-  member MinimumElement : 'a
-  static member Compare : a:Set<'a,'comparerTag> * b:Set<'a,'comparerTag> -> int
-  static member Create : 'comparerTag * seq<'a> -> Set<'a,'comparerTag>
-  static member Difference : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> Set<'a,'comparerTag>
-  static member Empty : 'comparerTag -> Set<'a,'comparerTag>
-  static member Equality : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> bool
-  static member Intersection : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> Set<'a,'comparerTag>
-  static member Singleton : 'comparerTag * 'a -> Set<'a,'comparerTag>
-  static member Union : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> Set<'a,'comparerTag>
-  static member ( + ) : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> Set<'a,'comparerTag>
-  static member ( - ) : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> Set<'a,'comparerTag>
-end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member Add : 'a -> Set<'a,'comparerTag>
- A useful shortcut for Set.add. Note this operation prodcues a new set - and does not mutate the original set. The new set will share many storage - nodes with the original. See the Set module for further operations on sets. -
member Choose : 'a
- The number of elements in the set -
member Contains : 'a -> bool
- A useful shortcut for Set.mem. See the Set module for further operations on sets. -
member Count : int
- Return the number of elements in the set -
override Equals : obj -> bool
member Exists : predicate:('a -> bool) -> bool
- Test if any element of the collection satisfies the given predicate. - If the input function is f and the elements are i0...iN then computes - p i0 or ... or p iN. -
member Filter : predicate:('a -> bool) -> Set<'a,'comparerTag>
- Return a new collection containing only the elements of the collection - for which the given predicate returns "true" -
member Fold : ('a -> 'b -> 'b) -> 'b -> 'b
- Apply the given accumulating function to all the elements of the set -
member ForAll : predicate:('a -> bool) -> bool
- Test if all elements of the collection satisfy the given predicate. - If the input function is f and the elements are i0...iN and j0...jN then - computes p i0 && ... && p iN. -
member IsEmpty : bool
- A useful shortcut for Set.is_empty. See the Set module for further operations on sets. -
member IsSubsetOf : Set<'a,'comparerTag> -> bool
- Evaluates to "true" if all elements of the second set are in the first -
member IsSupersetOf : Set<'a,'comparerTag> -> bool
- Evaluates to "true" if all elements of the first set are in the second -
member Iterate : ('a -> unit) -> unit
- Apply the given function to each binding in the collection -
member MaximumElement : 'a
- Returns the highest element in the set according to the ordering being used for the set -
member MinimumElement : 'a
- Returns the lowest element in the set according to the ordering being used for the set -
member
-  Partition : predicate:('a -> bool) ->
-                Set<'a,'comparerTag> * Set<'a,'comparerTag>
- Build two new sets, one containing the elements for which the given predicate returns 'true', - and the other the remaining elements. -
member Remove : 'a -> Set<'a,'comparerTag>
- A useful shortcut for Set.remove. Note this operation produces a new set - and does not mutate the original set. The new set will share many storage - nodes with the original. See the Set module for further operations on sets. -
member ToArray : unit -> 'a array
- The elements of the set as an array. -
member ToList : unit -> 'a list
- The elements of the set as a list. -
-
-

Static Members

- - - - - - - - - - - - - -
MemberDescription
member
-  ( + ) : Set<'a,'comparerTag> * Set<'a,'comparerTag> ->
-            Set<'a,'comparerTag>
- Compute the union of the two sets. -
member
-  ( - ) : Set<'a,'comparerTag> * Set<'a,'comparerTag> ->
-            Set<'a,'comparerTag>
- Return a new set with the elements of the second set removed from the first. -
member
-  Compare : a:Set<'a,'comparerTag> * b:Set<'a,'comparerTag> -> int
- Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b -
member Create : 'comparerTag * seq<'a> -> Set<'a,'comparerTag>
- A set based on the given comparer containing the given initial elements -
member
-  Difference : Set<'a,'comparerTag> * Set<'a,'comparerTag> ->
-                 Set<'a,'comparerTag>
- Return a new set with the elements of the second set removed from the first. -
member Empty : 'comparerTag -> Set<'a,'comparerTag>
- The empty set based on the given comparer -
member
-  Equality : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> bool
- Compares two sets and returns true if they are equal or false otherwise -
member
-  Intersection : Set<'a,'comparerTag> * Set<'a,'comparerTag> ->
-                   Set<'a,'comparerTag>
- Compute the intersection of the two sets. -
member Singleton : 'comparerTag * 'a -> Set<'a,'comparerTag>
- A singleton set based on the given comparison operator -
member
-  Union : Set<'a,'comparerTag> * Set<'a,'comparerTag> ->
-            Set<'a,'comparerTag>
- Compute the union of the two sets. -
-
-
-

See Also

-Microsoft.FSharp.Collections.Tagged
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.html deleted file mode 100644 index 6438d576..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.html +++ /dev/null @@ -1,59 +0,0 @@ -Microsoft.FSharp.Collections -
-
-

[Home] Namespace Microsoft.FSharp.Collections


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - - -
ModuleDescription
Microsoft.FSharp.Collections.LazyList
Microsoft.FSharp.Collections.ResizeArray - Generic operations on the type System.Collections.Generic.List, which is called ResizeArray in the F# libraries. -
-
-

Type Definitions

- - - - - - -
TypeDescription
type HashMultiMap - Hash tables, by default based on F# structural "hash" and (=) functions. - The table may map a single key to multiple bindings. -
type HashSet - Mutable hash sets based by default on F# structural "hash" and (=) functions. Implemented via a hash table and/or Dictionary. -
type LazyList - LazyLists are possibly-infinite, cached sequences. See also IEnumerable/Seq for - uncached sequences. Calling "get" on the same lazy list value you will keep - getting the same (cached) result. LazyLists normally involve delayed computations - without side-effects, and calling "get" may cause these computations to be executed. The results - of these computations are cached - evaluations will be performed - only once for each element of the lazy list. This is different to IEnumerable/Seq where - recomputation happens each time an enumerator is created and the sequence traversed. - - LazyLists can represent cached potentially-infinite computations. Because they are cached they may cause - memory leaks if some part of your code maintains a live reference to - the head of an infinite or very large lazy list while iterating it, or if a reference is - maintained after the list is no longer required. - - Although lazy lists are an abstract type you may pattern match against them using the - LazyList.Cons and LazyList.Nil active patterns. These may force the computation of elements - of the list. -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.type_HashMultiMap-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.type_HashMultiMap-2.html deleted file mode 100644 index b6d965cc..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.type_HashMultiMap-2.html +++ /dev/null @@ -1,117 +0,0 @@ -Microsoft.FSharp.Collections.HashMultiMap -
-
-

[Home] Type Microsoft.FSharp.Collections.HashMultiMap


-
-
- - - -
- Hash tables, by default based on F# structural "hash" and (=) functions. - The table may map a single key to multiple bindings. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type HashMultiMap<'Key,'Value> =
-  class
-    interface IEnumerable
-    interface IEnumerable<KeyValuePair<'Key,'Value>>
-    interface ICollection<KeyValuePair<'Key,'Value>>
-    interface IDictionary<'Key,'Value>
-    new : unit -> HashMultiMap<'Key,'Value>
-    new : comparer:IEqualityComparer<'Key> * size:int -> HashMultiMap<'Key,'Value>
-    new : entries:seq<'Key * 'Value> -> HashMultiMap<'Key,'Value>
-    new : size:int -> HashMultiMap<'Key,'Value>
-    member Add : 'Key * 'Value -> unit
-    member Clear : unit -> unit
-    member ContainsKey : 'Key -> bool
-    member Copy : unit -> HashMultiMap<'Key,'Value>
-    member FindAll : 'Key -> 'Value list
-    member Fold : ('Key -> 'Value -> 'State -> 'State) -> 'State -> 'State
-    member Iterate : ('Key -> 'Value -> unit) -> unit
-    member Remove : 'Key -> unit
-    member Replace : 'Key * 'Value -> unit
-    member TryFind : 'Key -> 'Value option
-    member Count : int
-    member Item : 'Key -> 'Value with get
-    member Item : 'Key -> 'Value with set
-  end
-

Instance Members

- - - - - - - - - - - - - - - - -
MemberDescription
member Add : 'Key * 'Value -> unit
- Add a binding for the element to the table -
member Clear : unit -> unit
- Clear all elements from the collection -
member ContainsKey : 'Key -> bool
- Test if the collection contains any bindings for the given element -
member Copy : unit -> HashMultiMap<'Key,'Value>
- Make a shallow copy of the collection -
member Count : int
- The total number of keys in the hash table -
member FindAll : 'Key -> 'Value list
- Find all bindings for the given element in the table, if any -
member Fold : ('Key -> 'Value -> 'State -> 'State) -> 'State -> 'State
- Apply the given function to each element in the collection threading the accumulating parameter - through the sequence of function applications -
member Item : 'Key -> 'Value with get
- Lookup or set the given element in the table. Set replaces all existing bindings for a value with a single - bindings. Raise KeyNotFoundException if the element is not found. -
member Item : 'Key -> 'Value with set
- Lookup or set the given element in the table. Set replaces all existing bindings for a value with a single - bindings. Raise KeyNotFoundException if the element is not found. -
member Iterate : ('Key -> 'Value -> unit) -> unit
-Apply the given function to each binding in the hash table -
member Remove : 'Key -> unit
- Remove the latest binding (if any) for the given element from the table -
member Replace : 'Key * 'Value -> unit
- Replace the latest binding (if any) for the given element. -
member TryFind : 'Key -> 'Value option
- Lookup the given element in the table, returning the result as an Option -
-
-

Static Members

- - - - - - - -
MemberDescription
new : entries:seq<'Key * 'Value> -> HashMultiMap<'Key,'Value>
- Build a map that contains the bindings of the given IEnumerable -
new : comparer:IEqualityComparer<'Key> * size:int ->
-        HashMultiMap<'Key,'Value>
- Create a new empty mutable HashMultiMap with an internal bucket array of the given approximate size - and with the given key hash/equality functions -
new : size:int -> HashMultiMap<'Key,'Value>
- Create a new empty mutable HashMultiMap with an internal bucket array of the given approximate size - and with key hash/equality based on the F# structural "hash" and (=) functions -
new : unit -> HashMultiMap<'Key,'Value>
- Create a new empty mutable HashMultiMap - with key hash/equality based on the F# structural "hash" and (=) functions. -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.type_HashSet-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.type_HashSet-1.html deleted file mode 100644 index ac782a66..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.type_HashSet-1.html +++ /dev/null @@ -1,91 +0,0 @@ -Microsoft.FSharp.Collections.HashSet -
-
-

[Home] Type Microsoft.FSharp.Collections.HashSet


-
-
- - - -
- Mutable hash sets based by default on F# structural "hash" and (=) functions. Implemented via a hash table and/or Dictionary. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type HashSet<'a> =
-  class
-    interface IEnumerable
-    interface IEnumerable<'a>
-    new : unit -> HashSet<'a>
-    new : size:int * comparer:IEqualityComparer<'a> -> HashSet<'a>
-    new : elements:seq<'a> -> HashSet<'a>
-    new : size:int -> HashSet<'a>
-    member Add : 'a -> unit
-    member Clear : unit -> unit
-    member Contains : 'a -> bool
-    member Copy : unit -> HashSet<'a>
-    member Fold : ('a -> 'b -> 'b) -> 'b -> 'b
-    member Iterate : ('a -> unit) -> unit
-    member Remove : 'a -> unit
-    member Count : int
-  end
-

Instance Members

- - - - - - - - - - - -
MemberDescription
member Add : 'a -> unit
- Add an element to the collection -
member Clear : unit -> unit
- Clear all elements from the set -
member Contains : 'a -> bool
- Test if the set contains the given element -
member Copy : unit -> HashSet<'a>
- Make a shallow copy of the set -
member Count : int
- The total number of elements in the set -
member Fold : ('a -> 'b -> 'b) -> 'b -> 'b
- Apply the given function to the set threading the accumulating parameter - through the sequence of function applications -
member Iterate : ('a -> unit) -> unit
- Apply the given function to each binding in the hash table -
member Remove : 'a -> unit
- Remove the given element from the set -
-
-

Static Members

- - - - - - - -
MemberDescription
new : elements:seq<'a> -> HashSet<'a>
- Create a new mutable hash set containing elements drawn from the given sequence -
new : size:int * comparer:IEqualityComparer<'a> -> HashSet<'a>
- Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with the given key hash/equality functions -
new : size:int -> HashSet<'a>
- Create a new empty mutable hash set with an internal bucket array of the given approximate size - and with key hash/equality based on the F# structural "hash" and (=) functions -
new : unit -> HashSet<'a>
- Create a new empty mutable hash set - with key hash/equality based on the F# structural "hash" and (=) functions -
-
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.type_LazyList-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.type_LazyList-1.html deleted file mode 100644 index 4800fe97..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Collections.type_LazyList-1.html +++ /dev/null @@ -1,42 +0,0 @@ -Microsoft.FSharp.Collections.LazyList -
-
-

[Home] Type Microsoft.FSharp.Collections.LazyList


-
-
- - - -
- LazyLists are possibly-infinite, cached sequences. See also IEnumerable/Seq for - uncached sequences. Calling "get" on the same lazy list value you will keep - getting the same (cached) result. LazyLists normally involve delayed computations - without side-effects, and calling "get" may cause these computations to be executed. The results - of these computations are cached - evaluations will be performed - only once for each element of the lazy list. This is different to IEnumerable/Seq where - recomputation happens each time an enumerator is created and the sequence traversed. - - LazyLists can represent cached potentially-infinite computations. Because they are cached they may cause - memory leaks if some part of your code maintains a live reference to - the head of an infinite or very large lazy list while iterating it, or if a reference is - maintained after the list is no longer required. - - Although lazy lists are an abstract type you may pattern match against them using the - LazyList.Cons and LazyList.Nil active patterns. These may force the computation of elements - of the list. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type LazyList<'T>
-with
-  interface IEnumerable
-  interface IEnumerable<'T>
-end
-
-

See Also

-Microsoft.FSharp.Collections
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.html deleted file mode 100644 index aa27aece..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.html +++ /dev/null @@ -1,66 +0,0 @@ -Microsoft.FSharp.Compatibility.Arg -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Arg


-
-
- - - -
- A simple command-line argument processor. - -

Type Definitions

- - - - - -
TypeDescription
type argspec Note: an abbreviation for string * spec * string
type spec - The spec value describes the action of the argument, - and whether it expects a following parameter. -
-
-

Exceptions

- - - - - -
ExceptionDescription
exception Bad
exception Help
-
-

Values

- - - - - - -
ValueDescription
val parse : argspec list -> (string -> unit) -> string -> unit
- "parse specs f use" parses the arguments given by Sys.argv - according to the argument processing specifications "specs". - Arguments begin with "-". Non-arguments are passed to "f" in - order. "use" is printed as part of the usage line if an error occurs. - - Permitted arguments are specified using triples: (arg, action, help). - Actions are: - Unit(f): call f, no subseq. arg - Set(br): set ref to 'true', no subseq. arg. - Clear(br): set ref to 'false, no subseq. arg. - String(f): pass the subseq. arg to f - Int(f): pass the subseq. arg to f - Float(f): pass the subseq. arg to f - Rest(f): pass all subseq. args to f in order -
val parse_argv :
-  int ref -> string array -> argspec list -> (string -> unit) -> string -> unit
val usage : argspec list -> string -> unit
- "usage specs use" prints the help for each argument. -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type_Bad.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type_Bad.html deleted file mode 100644 index 63469a69..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type_Bad.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.Arg.Bad -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.Arg.Bad


-
-
- - - -
-

Full Signature

-
exception Bad of string
-
-

See Also

-Microsoft.FSharp.Compatibility.Arg
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type_Help.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type_Help.html deleted file mode 100644 index 2ee178e0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type_Help.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.Arg.Help -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.Arg.Help


-
-
- - - -
-

Full Signature

-
exception Help of string
-
-

See Also

-Microsoft.FSharp.Compatibility.Arg
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type__argspec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type__argspec.html deleted file mode 100644 index e6810e22..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type__argspec.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.Arg.argspec -
-
-

[Home] Type Microsoft.FSharp.Compatibility.Arg.argspec


-
-
- - - -
Note: an abbreviation for string * spec * string -

Full Type Signature

-
type argspec = string * spec * string
-
-

See Also

-Microsoft.FSharp.Compatibility.Arg
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type__spec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type__spec.html deleted file mode 100644 index e24e128d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Arg.type__spec.html +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft.FSharp.Compatibility.Arg.spec -
-
-

[Home] Type Microsoft.FSharp.Compatibility.Arg.spec


-
-
- - - -
- The spec value describes the action of the argument, - and whether it expects a following parameter. - -

Full Type Signature

-
type spec =
-  | Clear of bool ref
-  | Float of (float -> unit)
-  | Int of (int -> unit)
-  | Rest of (string -> unit)
-  | Set of bool ref
-  | String of (string -> unit)
-  | Unit of (unit -> unit)
-
-

See Also

-Microsoft.FSharp.Compatibility.Arg
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Array.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Array.html deleted file mode 100644 index 30499e1a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Array.html +++ /dev/null @@ -1,58 +0,0 @@ -Microsoft.FSharp.Compatibility.Array -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Array


-
-
- - - -
- Compatibility operations on arrays. - -

Values

- - - - - - - - - - - -
ValueDescription
val contains : 'T -> 'T array -> bool
- Is an element in the array, uses (=) equality. -
[<OCamlCompatibilityAttribute
-  ("The F# name for this function is 'createJaggedMatrix'")>]
-val create_matrix : int -> int -> 'T -> 'T array array
val createJaggedMatrix : int -> int -> 'T -> 'T array array
- Create a jagged 2 dimensional array. - - This member is primarily provided for compatibility with implementations - of ML. F# also supports non-jagged 2D arrays - see the Array2D module and - types such as "int[,]". -
[<OCamlCompatibilityAttribute ("The F# name for this function is 'contains'")>]
-val mem : 'T -> 'T array -> bool
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val pin : 'T [] -> (nativeptr<'T> -> 'b) -> 'b
- Pin the given array for the duration of a single call to the given function. A native pointer to - the first element in the array is passed to the given function. Cleanup the GCHandle associated with the - pin when the function completes, even if an exception is raised. -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val pinUnscoped : 'T [] -> nativeptr<'T> * GCHandle
- As for Array.pin, except that the caller is responsible for calling Free on the returned GCHandle in order - to release the pin. -
val scanReduce : ('T -> 'T -> 'T) -> 'T array -> 'T array
- Like reduce, but return both the intermediary and final results -
val scanReduceBack : ('T -> 'T -> 'T) -> 'T array -> 'T array
- Like reduceBack, but return both the intermediary and final results -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Array2D.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Array2D.html deleted file mode 100644 index 303841b2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Array2D.html +++ /dev/null @@ -1,35 +0,0 @@ -Microsoft.FSharp.Compatibility.Array2D -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Array2D


-
-
- - - -
-

Values

- - - - - -
ValueDescription
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val pin : 'T [,] -> (nativeptr<'T> -> 'b) -> 'b
- Pin the given array for the duration of a single call to the given function. A native pointer to - the first element in the array is passed to the given function. Cleanup the GCHandle associated with the - pin when the function completes, even if an exception is raised. -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val pinUnscoped : 'T [,] -> nativeptr<'T> * GCHandle
- As for Array2D.pin, except that the caller is responsible for calling Free on the returned GCHandle in order - to release the pin. -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Byte.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Byte.html deleted file mode 100644 index 9cec0110..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Byte.html +++ /dev/null @@ -1,110 +0,0 @@ -Microsoft.FSharp.Compatibility.Byte -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Byte


-
-
- - - -
- Byte (8-bit) operations. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add : byte -> byte -> byte
- Returns the sum of a and b -
val compare : byte -> byte -> int
- Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b -
val div : byte -> byte -> byte
- Returns a divided by b -
val logand : byte -> byte -> byte
- Combines the binary representation of a and b by bitwise and -
val lognot : byte -> byte
- Returns the bitwise logical negation of a -
val logor : byte -> byte -> byte
- Combines the binary representation of a and b by bitwise or -
val logxor : byte -> byte -> byte
- Combines the binary representation of a and b by bitwise xor -
val mul : byte -> byte -> byte
- Returns a multiplied by b -
val of_char : char -> byte
- Converts a char to a byte -
val of_int : int -> byte
- Converts a 32-bit integer to a byte -
val of_int32 : int32 -> byte
- Converts a 32-bit integer to a byte -
val of_string : string -> byte
- Converts a string to a byte -
val of_uint16 : uint16 -> byte
- Converts a 16-bit integer to a byte -
val of_uint32 : uint32 -> byte
- Converts an unsigned 32-bit integer to a byte -
val one : byte
- The value one as a System.Byte -
val pred : byte -> byte
- Returns the predeccessor of the argument wrapped around 0uy -
val rem : byte -> byte -> byte
- Returns the remainder of a divided by b -
val shift_left : byte -> int -> byte
- Shifts the binary representation a by n bits to the left -
val shift_right : byte -> int -> byte
- Shifts the binary representation a by n bits to the right -
val sub : byte -> byte -> byte
- Returns a minus b -
val succ : byte -> byte
- Returns the successor of the argument wrapped around 255uy -
val to_char : byte -> char
- Converts a byte to a char -
val to_int : byte -> int
- Converts a byte to a 32-bit integer -
val to_int32 : byte -> int32
- Converts a byte to a 32-bit integer -
val to_string : byte -> string
- Converts a byte to a string -
val to_uint16 : byte -> uint16
- Converts a byte to a 16-bit integer -
val to_uint32 : byte -> uint32
- Converts a byte to an unsigned 32-bit integer -
val zero : byte
- The value zero as a System.Byte -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Char.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Char.html deleted file mode 100644 index d56278a3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Char.html +++ /dev/null @@ -1,42 +0,0 @@ -Microsoft.FSharp.Compatibility.Char -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Char


-
-
- - - -
- Unicode characters, i.e. the System.Char type. see also the operations - in System.Char and the System.Text.Encoding interfaces if necessary. - -

Values

- - - - - - - - -
ValueDescription
val chr : int -> char
- Converts the value of the specified 32-bit signed integer to its equivalent Unicode character -
val code : char -> int
- Converts the value of the specified Unicode character to the equivalent 32-bit signed integer -
val compare : char -> char -> int
- Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b -
val lowercase : char -> char
- Converts the value of a Unicode character to its lowercase equivalent -
val uppercase : char -> char
- Converts the value of a Unicode character to its uppercase equivalent -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Enum.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Enum.html deleted file mode 100644 index c98557c9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Enum.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.Enum -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Enum


-
-
- - - -
- Simple operations to convert between .NET enuemration types and integers - -
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Float.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Float.html deleted file mode 100644 index 601280cc..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Float.html +++ /dev/null @@ -1,80 +0,0 @@ -Microsoft.FSharp.Compatibility.Float -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Float


-
-
- - - -
- ML-like operations on 64-bit System.Double floating point numbers. - -

Values

- - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add : float -> float -> float
- Returns the sum of a and b -
val compare : float -> float -> int
- Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b -
val div : float -> float -> float
- Returns a divided by b -
val mul : float -> float -> float
- Returns a multiplied by b -
val neg : float -> float
- Returns -a -
val of_bits : int64 -> float
- Converts a raw 64-bit representation to a 64-bit float -
val of_float32 : float32 -> float
- Converts a 32-bit float to a 64-bit float -
val of_int : int -> float
- Converts a 32-bit integer to a 64-bit float -
val of_int32 : int32 -> float
- Converts a 32-bit integer to a 64-bit float -
val of_int64 : int64 -> float
- Converts a 64-bit integer to a 64-bit float -
val of_string : string -> float
- Converts a string to a 64-bit float -
val sub : float -> float -> float
- Returns a minus b -
val to_bits : float -> int64
- Converts a 64-bit float to raw 64-bit representation -
val to_float32 : float -> float32
- Converts a 64-bit float to a 32-bit float -
val to_int : float -> int
- Converts a 64-bit float to a 32-bit integer -
val to_int32 : float -> int32
- Converts a 64-bit float to a 32-bit integer -
val to_int64 : float -> int64
- Converts a 64-bit float to a 64-bit integer -
val to_string : float -> string
- Converts a 64-bit float to a string -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Int16.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Int16.html deleted file mode 100644 index 95d12031..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Int16.html +++ /dev/null @@ -1,51 +0,0 @@ -Microsoft.FSharp.Compatibility.Int16 -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Int16


-
-
- - - -
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val abs : int16 -> int16
val add : int16 -> int16 -> int16
val compare : int16 -> int16 -> int
val div : int16 -> int16 -> int16
val logand : int16 -> int16 -> int16
val lognot : int16 -> int16
val logor : int16 -> int16 -> int16
val logxor : int16 -> int16 -> int16
val max_int : int16
val min_int : int16
val minus_one : int16
val mul : int16 -> int16 -> int16
val neg : int16 -> int16
val of_int : int -> int16
val of_int32 : int32 -> int16
val of_int8 : int8 -> int16
val one : int16
val pred : int16 -> int16
val rem : int16 -> int16 -> int16
val shift_left : int16 -> int -> int16
val shift_right : int16 -> int -> int16
val sub : int16 -> int16 -> int16
val succ : int16 -> int16
val to_int : int16 -> int
val to_int32 : int16 -> int32
val to_int8 : int16 -> sbyte
val zero : int16
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Int32.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Int32.html deleted file mode 100644 index 325b4323..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Int32.html +++ /dev/null @@ -1,146 +0,0 @@ -Microsoft.FSharp.Compatibility.Int32 -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Int32


-
-
- - - -
- Basic operations on 32-bit integers. The type int32 is identical to System.Int32. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val abs : int32 -> int32
- Returns the absolute value of the argument -
val add : int32 -> int32 -> int32
- Returns the sum of a and b -
val bits_of_float : float -> int32
- Converts a 64-bit float to a raw 32-bit representation -
val bits_of_float32 : float32 -> int32
- Converts a 32-bit float to a raw 32-bit representation -
val compare : int32 -> int32 -> int
- Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b -
val div : int32 -> int32 -> int32
- Returns a divided by b -
val float32_of_bits : int32 -> float32
- Converts a raw 32-bit representation to a 32-bit float -
val float_of_bits : int32 -> float
- Converts a raw 32-bit representation to a 64-bit float -
val logand : int32 -> int32 -> int32
- Combines the binary representation of a and b by bitwise and -
val lognot : int32 -> int32
- Returns the bitwise logical negation of a -
val logor : int32 -> int32 -> int32
- Combines the binary representation of a and b by bitwise or -
val logxor : int32 -> int32 -> int32
- Combines the binary representation of a and b by bitwise xor -
val max_int : int32
- Returns the largest 32-bit signed integer -
val min_int : int32
- Returns the smallest 32-bit signed integer -
val minus_one : int32
- The value minus one as a System.Int32 -
val mul : int32 -> int32 -> int32
- Returns a multiplied by b -
val neg : int32 -> int32
- Returns -a -
val of_float : float -> int32
- Converts a 64-bit float to a 32-bit integer -
val of_float32 : float32 -> int32
- Converts a 32-bit float to a 32-bit integer -
val of_int : int -> int32
- Converts a 32-bit integer to a 32-bit integer (included for ML compatability) -
val of_int64 : int64 -> int32
- Converts a 64-bit unsigned integer to a 32-bit integer -
val of_nativeint : nativeint -> int32
- Converts a 32-bit unsigned integer to a 32-bit integer -
val of_string : string -> int32
- Converts a string to a 32-bit integer -
val of_uint32 : uint32 -> int32
- Converts a 32-bit unsigned integer to a 32-bit integer -
val one : int32
- The value one as a System.Int32 -
val pred : int32 -> int32
- Returns the predeccessor of the argument -
val rem : int32 -> int32 -> int32
- Returns the remainder of a divided by b -
val shift_left : int32 -> int -> int32
- Shifts the binary representation a by n bits to the left -
val shift_right : int32 -> int -> int32
- Shifts the binary representation a by n bits to the right; high-order empty bits are set to the sign bit -
val shift_right_logical : int32 -> int -> int32
- Shifts the binary representation a by n bits to the right; high-order bits are zero-filled -
val sub : int32 -> int32 -> int32
- Returns a minus b -
val succ : int32 -> int32
- Returns the successor of the argument -
val to_float : int32 -> float
- Converts a 32-bit integer to a 64-bit float -
val to_float32 : int32 -> float32
- Converts a 32-bit integer to a 32-bit float -
val to_int : int32 -> int
- Converts a 32-bit integer to a 32-bit integer (included for ML compatability) -
val to_int64 : int32 -> int64
- Converts a 32-bit unsigned integer to a 64-bit integer -
val to_nativeint : int32 -> nativeint
- Converts a 32-bit unsigned integer to a 32-bit integer -
val to_string : int32 -> string
- Converts a 32-bit integer to a string -
val to_uint32 : int32 -> uint32
- Converts a 32-bit integer to a 32-bit unsigned integer -
val zero : int32
- The value zero as a System.Int32 -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Int64.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Int64.html deleted file mode 100644 index c4d60631..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Int64.html +++ /dev/null @@ -1,140 +0,0 @@ -Microsoft.FSharp.Compatibility.Int64 -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Int64


-
-
- - - -
- Basic operations on 64-bit integers. The type int64 is identical to System.Int64. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val abs : int64 -> int64
- Returns the absolute value of the argument -
val add : int64 -> int64 -> int64
- Returns the sum of a and b -
val bits_of_float : float -> int64
- Converts a 64-bit float to a raw 64-bit representation -
val compare : int64 -> int64 -> int
- Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b -
val div : int64 -> int64 -> int64
- Returns a divided by b -
val float_of_bits : int64 -> float
- Converts a raw 64-bit representation to a 64-bit float -
val logand : int64 -> int64 -> int64
- Combines the binary representation of a and b by bitwise and -
val lognot : int64 -> int64
- Returns the bitwise logical negation of a -
val logor : int64 -> int64 -> int64
- Combines the binary representation of a and b by bitwise or -
val logxor : int64 -> int64 -> int64
- Combines the binary representation of a and b by bitwise xor -
val max_int : int64
- Returns the largest 64-bit signed integer -
val min_int : int64
- Returns the smallest 64-bit signed integer -
val minus_one : int64
- The value minus one as a System.Int64 -
val mul : int64 -> int64 -> int64
- Returns a multiplied by b -
val neg : int64 -> int64
- Returns -a -
val of_float : float -> int64
- Converts a 64-bit float to a 64-bit integer -
val of_float32 : float32 -> int64
- Converts a 32-bit float to a 64-bit integer -
val of_int : int -> int64
- Converts a 32-bit integer to a 64-bit integer -
val of_int32 : int32 -> int64
- Converts a 32-bit integer to a 64-bit integer -
val of_nativeint : nativeint -> int64
- Converts a native integer to a 64-bit integer -
val of_string : string -> int64
- Converts a string to a 64-bit integer -
val of_uint64 : uint64 -> int64
- Converts an unsigned 64-bit integer to a 64-bit integer -
val one : int64
- The value one as a System.Int64 -
val pred : int64 -> int64
- Returns the predeccessor of the argument -
val rem : int64 -> int64 -> int64
- Returns the remainder of a divided by b -
val shift_left : int64 -> int -> int64
- Shifts the binary representation a by n bits to the left -
val shift_right : int64 -> int -> int64
- Shifts the binary representation a by n bits to the right; high-order empty bits are set to the sign bit -
val shift_right_logical : int64 -> int -> int64
- Shifts the binary representation a by n bits to the right; high-order bits are zero-filled -
val sub : int64 -> int64 -> int64
- Returns a minus b -
val succ : int64 -> int64
- Returns the successor of the argument -
val to_float : int64 -> float
- Converts a 64-bit integer to a 64-bit float -
val to_float32 : int64 -> float32
- Converts a 64-bit integer to a 32-bit float -
val to_int : int64 -> int
- Converts a 64-bit integer to a 32-bit integer -
val to_int32 : int64 -> int32
- Converts a 64-bit integer to a 32-bit integer -
val to_nativeint : int64 -> nativeint
- Converts a 64-bit integer to a native integer -
val to_string : int64 -> string
- Converts a 64-bit integer to a string -
val to_uint64 : int64 -> uint64
- Converts a 64-bit integer to an unsigned 64-bit integer -
val zero : int64
- The value zero as a System.Int64 -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Lazy.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Lazy.html deleted file mode 100644 index 502d339b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Lazy.html +++ /dev/null @@ -1,61 +0,0 @@ -Microsoft.FSharp.Compatibility.Lazy -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Lazy


-
-
- - - -
-

Type Definitions

- - - - -
TypeDescription
type t Note: an abbreviation for Lazy<'T>
-
-

Exceptions

- - - - -
ExceptionDescription
exception Undefined Note: an abbreviation for = Undefined
-
-

Values

- - - - - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute ("Consider using Lazy.Create instead")>]
-val create : (unit -> 'T) -> Lazy<'T>
- Build a lazy (delayed) value from the given computation -
val force : Lazy<'T> -> 'T
- See Lazy.Force -
[<OCamlCompatibilityAttribute ("Consider using 'v.Force()' instead")>]
-val force_val : Lazy<'T> -> 'T
- See Lazy.Force. -
[<OCamlCompatibilityAttribute ("Consider using 'lazy' instead")>]
-val lazy_from_fun : (unit -> 'T) -> Lazy<'T>
- Build a lazy (delayed) value from the given computation -
[<OCamlCompatibilityAttribute ("Consider using 'Lazy.CreateFromValue' instead")>]
-val lazy_from_val : 'T -> Lazy<'T>
- Build a lazy (delayed) value from the given pre-computed value. -
[<OCamlCompatibilityAttribute ("Consider using 'Lazy.IsForced' instead")>]
-val lazy_is_val : Lazy<'T> -> bool
- Check if a lazy (delayed) value has already been computed -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Lazy.type_Undefined.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Lazy.type_Undefined.html deleted file mode 100644 index 1a206ec4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Lazy.type_Undefined.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.Lazy.Undefined -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.Lazy.Undefined


-
-
- - - -
Note: an abbreviation for = Undefined -

Full Signature

-
exception Undefined = Undefined
-
-

See Also

-Microsoft.FSharp.Compatibility.Lazy
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Lazy.type__t-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Lazy.type__t-1.html deleted file mode 100644 index 97d73fde..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Lazy.type__t-1.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.Lazy.t -
-
-

[Home] Type Microsoft.FSharp.Compatibility.Lazy.t


-
-
- - - -
Note: an abbreviation for Lazy<'T> -

Full Type Signature

-
type 'T t = Lazy<'T>
-
-

See Also

-Microsoft.FSharp.Compatibility.Lazy
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.List.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.List.html deleted file mode 100644 index 98754521..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.List.html +++ /dev/null @@ -1,89 +0,0 @@ -Microsoft.FSharp.Compatibility.List -
-
-

[Home] Module Microsoft.FSharp.Compatibility.List


-
-
- - - -
- Compatibility operations on lists. - -

Values

- - - - - - - - - - - - - - - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute ()>]
-val assoc : 'Key -> ('Key * 'T) list -> 'T
- Lookup key's data in association list, uses (=) equality. - Raise System.IndexOutOfRangeException exception if key not found, in which case you should typically use try_assoc instead. -
[<OCamlCompatibilityAttribute ()>]
-val assq : 'Key -> ('Key * 'T) list -> 'T
- See assoc, but uses the physical equality operator (==) for equality tests -
val contains : 'T -> 'T list -> bool
- Is an element in the list. Elements are compared using generic equality. -
[<OCamlCompatibilityAttribute ("The F# name for this function is 'contains'")>]
-val mem : 'T -> 'T list -> bool
- Is an element in the list. Elements are compared using generic equality. -
[<OCamlCompatibilityAttribute ()>]
-val mem_assoc : 'Key -> ('Key * 'T) list -> bool
- Does the key have pair in the association list? -
[<OCamlCompatibilityAttribute ()>]
-val mem_assq : 'Key -> ('Key * 'T) list -> bool
- See mem_assoc, but uses the physical equality operator (==) for equality tests. -
[<OCamlCompatibilityAttribute ()>]
-val memq : 'Key -> 'Key list -> bool
- See mem, but uses the physical equality operator (==) for equality tests. -
[<OCamlCompatibilityAttribute ()>]
-val remove_assoc : 'Key -> ('Key * 'T) list -> ('Key * 'T) list
- Remove pair for key from the association list (if it's there). -
[<OCamlCompatibilityAttribute ()>]
-val remove_assq : 'Key -> ('Key * 'T) list -> ('Key * 'T) list
- See remove_assoc, but uses the physical equality operator (==) for equality tests. -
[<OCamlCompatibilityAttribute ()>]
-val rev_append : 'T list -> 'T list -> 'T list
- "rev_append l1 l2" evaluates to "append (rev l1) l2" -
[<OCamlCompatibilityAttribute ()>]
-val rev_map : ('T -> 'U) -> 'T list -> 'U list
- "rev_map f l1" evaluates to "map f (rev l1)" -
[<OCamlCompatibilityAttribute ()>]
-val rev_map2 : ('T1 -> 'T2 -> 'U) -> 'T1 list -> 'T2 list -> 'U list
- "rev_map2 f l1 l2" evaluates to "map2 f (rev l1) (rev l2)" -
val scanReduce : ('T -> 'T -> 'T) -> 'T list -> 'T list
- Like reduce_left, but return both the intermediary and final results -
val scanReduceBack : ('T -> 'T -> 'T) -> 'T list -> 'T list
- Like reduce_right, but return both the intermediary and final results -
[<OCamlCompatibilityAttribute ()>]
-val try_assoc : 'Key -> ('Key * 'T) list -> 'T option
- Lookup key's data in association list, uses (=) equality, - returning "Some data" or "None". -
[<OCamlCompatibilityAttribute ()>]
-val try_assq : 'Key -> ('Key * 'T) list -> 'T option
- See try_assoc, but uses the physical equality operator (==) for equality tests. -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Map.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Map.html deleted file mode 100644 index 7d555e20..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Map.html +++ /dev/null @@ -1,66 +0,0 @@ -Microsoft.FSharp.Compatibility.Map -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Map


-
-
- - - -
- Extension functionality for maps using structural comparison - -

Type Definitions

- - - - - -
TypeDescription
type Provider - A collection of operations for creating and using maps based on a particular comparison function. - The 'Tag type parameter is used to track information about the comparison function. -
type Provider Note: an abbreviation for Provider<'Key,'T,IComparer<'Key>>
-
-

Values

- - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute ()>]
-val fold :
-  ('Key -> 'Value -> 'State -> 'State) ->
-    Map<'Key,'Value> -> 'State -> 'State
- Fold over the bindings in the map -
[<OCamlCompatibilityAttribute ()>]
-val Make : ('Key -> 'Key -> int) -> Provider<'Key,'T>
[<OCamlCompatibilityAttribute ()>]
-val MakeTagged :
-  'Tag -> Provider<'Key,'T,'Tag> (requires 'Tag :> IComparer<'Key>)
- A functor to build a collection of operations for creating and using - maps based on the given comparison function. This returns a record that - contains the functions you use to create and manipulate maps of - this kind. The returned value is much like an ML module. - - Language restrictions related to polymorphism may mean you - have to create a new instantiation of for each toplevel - key/value type pair. - - To use this function you need to define a new named class that implements IComparer and - pass an instance of that class as the first argument. For example: - type MyComparer = - new() = { } - interface IComparer<string> with - member self.Compare(x,y) = ... - - let MyStringMapProvider : Map.Provider < string,int > = Map.MakeTagged(new MyComparer()) -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Map.type_Provider-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Map.type_Provider-2.html deleted file mode 100644 index a92e1599..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Map.type_Provider-2.html +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft.FSharp.Compatibility.Map.Provider -
-
-

[Home] Type Microsoft.FSharp.Compatibility.Map.Provider


-
-
- - - -
Note: an abbreviation for Provider<'Key,'T,IComparer<'Key>> -

Full Type Signature

-
[<OCamlCompatibilityAttribute ()>]
-type Provider<'Key,'T> = Provider<'Key,'T,IComparer<'Key>>
-
-

See Also

-Microsoft.FSharp.Compatibility.Map
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Map.type_Provider-3.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Map.type_Provider-3.html deleted file mode 100644 index 8c0e94d5..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Map.type_Provider-3.html +++ /dev/null @@ -1,58 +0,0 @@ -Microsoft.FSharp.Compatibility.Map.Provider -
-
-

[Home] Type Microsoft.FSharp.Compatibility.Map.Provider


-
-
- - - -
- A collection of operations for creating and using maps based on a particular comparison function. - The 'Tag type parameter is used to track information about the comparison function. - -

Full Type Signature

-
[<OCamlCompatibilityAttribute ()>]
-type Provider<'Key,'T,'Tag (requires 'Tag :> IComparer<'Key>)> =
-  interface
-    abstract member add : 'Key -> 'T -> Map<'Key,'T,'Tag> -> Map<'Key,'T,'Tag>
-    abstract member find : 'Key -> Map<'Key,'T,'Tag> -> 'T
-    abstract member first : ('Key -> 'T -> 'U option) -> Map<'Key,'T,'Tag> -> 'U option
-    abstract member fold : ('Key -> 'T -> 'State -> 'State) -> Map<'Key,'T,'Tag> -> 'State -> 'State
-    abstract member empty : Map<'Key,'T,'Tag>
-    abstract member iter : ('Key -> 'T -> unit) -> Map<'Key,'T,'Tag> -> unit
-    abstract member map : ('T -> 'U) -> Map<'Key,'T,'Tag> -> Map<'Key,'U,'Tag>
-    abstract member mapi : ('Key -> 'T -> 'U) -> Map<'Key,'T,'Tag> -> Map<'Key,'U,'Tag>
-    abstract member mem : 'Key -> Map<'Key,'T,'Tag> -> bool
-    abstract member remove : 'Key -> Map<'Key,'T,'Tag> -> Map<'Key,'T,'Tag>
-    abstract member tryfind : 'Key -> Map<'Key,'T,'Tag> -> 'T option
-  end
-

Instance Members

- - - - - - - - - - - - - - -
MemberDescription
member add : 'Key -> 'T -> Map<'Key,'T,'Tag> -> Map<'Key,'T,'Tag>
member empty : Map<'Key,'T,'Tag>
member find : 'Key -> Map<'Key,'T,'Tag> -> 'T
member first : ('Key -> 'T -> 'U option) -> Map<'Key,'T,'Tag> -> 'U option
member
-  fold : ('Key -> 'T -> 'State -> 'State) ->
-           Map<'Key,'T,'Tag> -> 'State -> 'State
member iter : ('Key -> 'T -> unit) -> Map<'Key,'T,'Tag> -> unit
member map : ('T -> 'U) -> Map<'Key,'T,'Tag> -> Map<'Key,'U,'Tag>
member
-  mapi : ('Key -> 'T -> 'U) ->
-           Map<'Key,'T,'Tag> -> Map<'Key,'U,'Tag>
member mem : 'Key -> Map<'Key,'T,'Tag> -> bool
member remove : 'Key -> Map<'Key,'T,'Tag> -> Map<'Key,'T,'Tag>
member tryfind : 'Key -> Map<'Key,'T,'Tag> -> 'T option
-
-
-

See Also

-Microsoft.FSharp.Compatibility.Map
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Big_int.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Big_int.html deleted file mode 100644 index 0832766d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Big_int.html +++ /dev/null @@ -1,66 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Big_int -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Big_int


-
-
- - - -
- Big_int compatability module for arbitrary sized integers. - -

Type Definitions

- - - - -
TypeDescription
type big_int Note: an abbreviation for bigint
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add_big_int : big_int -> big_int -> big_int
val add_int_big_int : int -> big_int -> big_int
val big_int_of_int : int -> big_int
val big_int_of_string : string -> big_int
val compare_big_int : big_int -> big_int -> int
val div_big_int : big_int -> big_int -> big_int
val eq_big_int : big_int -> big_int -> bool
val float_of_big_int : big_int -> float
val gcd_big_int : big_int -> big_int -> big_int
val ge_big_int : big_int -> big_int -> bool
val gt_big_int : big_int -> big_int -> bool
val int_of_big_int : big_int -> int
val le_big_int : big_int -> big_int -> bool
val lt_big_int : big_int -> big_int -> bool
val max_big_int : big_int -> big_int -> big_int
val min_big_int : big_int -> big_int -> big_int
val minus_big_int : big_int -> big_int -> big_int
val mod_big_int : big_int -> big_int -> big_int
val mult_big_int : big_int -> big_int -> big_int
val mult_int_big_int : int -> big_int -> big_int
val power_big_int_positive_big_int : big_int -> big_int -> big_int
val power_big_int_positive_int : big_int -> int -> big_int
val power_int_positive_big_int : int -> big_int -> big_int
val power_int_positive_int : int -> int -> big_int
val pred_big_int : big_int -> big_int
val quomod_big_int : big_int -> big_int -> big_int * big_int
val sign_big_int : big_int -> int
val square_big_int : big_int -> big_int
val string_of_big_int : big_int -> string
val sub_big_int : big_int -> big_int -> big_int
val succ_big_int : big_int -> big_int
val unit_big_int : big_int
val zero_big_int : big_int
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Big_int.type__big_int.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Big_int.type__big_int.html deleted file mode 100644 index b95f6d0c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Big_int.type__big_int.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Big_int.big_int -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Big_int.big_int


-
-
- - - -
Note: an abbreviation for bigint -

Full Type Signature

-
type big_int = bigint
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Big_int
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Buffer.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Buffer.html deleted file mode 100644 index b9b40039..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Buffer.html +++ /dev/null @@ -1,67 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Buffer -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Buffer


-
-
- - - -
- Imperative buffers for building strings, a shallow interface to System.Text.StringBuilder - -

Type Definitions

- - - - -
TypeDescription
type t Note: an abbreviation for StringBuilder
-
-

Values

- - - - - - - - - - - - - - -
ValueDescription
val add_buffer : t -> t -> unit
- Add second buffer to the first. -
val add_channel : t -> in_channel -> int -> unit
- Read the given number of bytes as ASCII and add the resulting string - to the buffer. Warning: this assumes an ASCII encoding for the I/O channel, i.e. it uses - Pervasives.really_input and then use ascii_to_string to produce the string - to add. -
val add_char : t -> char -> unit
- Add character to the buffer. -
val add_string : t -> string -> unit
- Add string to the buffer. -
val add_substring : t -> string -> int -> int -> unit
- Given a string, start position and length add that substring to the buffer. -
val clear : t -> unit
- Clears the buffer. -
val contents : t -> string
- Gets the string built from the buffer. -
val create : int -> t
- Create a buffer with suggested size. -
val length : t -> int
- Number of characters in the buffer. -
val output_buffer : out_channel -> t -> unit
val reset : t -> unit
- Clears the buffer (same as Buffer.clear). -
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Buffer.type__t.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Buffer.type__t.html deleted file mode 100644 index cafa0b58..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Buffer.type__t.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Buffer.t -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Buffer.t


-
-
- - - -
Note: an abbreviation for StringBuilder -

Full Type Signature

-
type t = StringBuilder
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Buffer
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Filename.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Filename.html deleted file mode 100644 index d659b8f9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Filename.html +++ /dev/null @@ -1,77 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Filename -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Filename


-
-
- - - -
- Common filename operations. This module is included to make it possible to cross-compile - code with other ML compilers. See also System.IO.Path - -

Values

- - - - - - - - - - - - - - - - -
ValueDescription
val basename : string -> string
- "dirname" and "basename" decompose a filename into a directory name - and a filename, i.e. "concat (dirname s) (basename s) = s" -
val check_suffix : string -> string -> bool
- "check_suffix f s" returns true if filename "f" ends in suffix "s", - e.g. check_suffix "abc.fs" ".fs" returns true. -
val chop_extension : string -> string
- "chop_extension f" removes the extension from the given - filename. Raises ArgumentException if no extension is present. -
val chop_suffix : string -> string -> string
- Assuming "check_suffix f s" holds, "chop_suffix f s" returns the - filename "f" with the suffix "s" removed. -
val concat : string -> string -> string
- "concat a b" returns System.IO.Path.Combine(a,b), i.e. the - two names conjoined by the appropriate directory separator character - for this architecture. -
val current_dir_name : string
- The name used for the current directory on this OS. -
val dirname : string -> string
- "dirname" and "basename" decompose a filename into a directory name - and a filename, i.e. "concat (dirname s) (basename s) = s" -
val has_extension : string -> bool
- Return true if the filename has a "." extension -
val is_implicit : string -> bool
- Returns true if the path is relative to the current directory but does not begin with - an explicit "." or ".." -
val is_relative : string -> bool
- Is the path is relative to the current directory or absolute. -
val parent_dir_name : string
- "parent_dir_name" returns the name for the directory above the current directory on - this OS. -
val quote : string -> string
- "quote s" is designed for use to quote a filename when using it - for a system command. It returns ("\'" ^ s ^ "\'"). -
val temp_file : string -> string -> string
- "temp_file f s" returns a hitherto unused new file name. "f" and "s" - are hints as to a suitable file name and suffix for the file. -
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.html deleted file mode 100644 index 7ae47d7d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.html +++ /dev/null @@ -1,142 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Hashtbl -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Hashtbl


-
-
- - - -
- Multi-entry hash tables using the structural "hash" and "equals" functions. - -These tables can be used with keys of any type, but you should check that -structural hashing and equality are correct for your key type. -Structural hashing is efficient but not a suitable choice in all circumstances, -e.g. may not hash efficiently on non-reference types and deeply-structured types. -Better efficiency is typically achieved if key types are F#-generated -types. - -These hash tables may map items to multiple keys (see find_all). - -The implementations are not safe for concurrent reading/writing, -and so users of these tables should take an appropriate lock -before reading/writing if used in a concurrent setting. - -

Type Definitions

- - - - - - -
TypeDescription
type Provider -A collection of operations for creating and using hash tables based on particular type-tracked hash/equality functions. -Generated by the Hashtbl.Make and Hashtbl.MakeTagged functors. This type is for use when you wish to -specify a comparison function once and carry around an object that is a provider of (i.e. a factory for) hashtables -that utilize that comparison function. - -The 'Tag' type parameter is used to track information about the comparison function, which helps ensure -that you don't mixup maps created with different comparison functions -
type Provider Note: an abbreviation for Provider<'Key,'Value,IEqualityComparer<'Key>>
type t - OCaml compatible type name, for use when not opening module, e.g. Hashtbl.t - Note: an abbreviation for HashMultiMap<'Key,'Value>
-
-

Values

- - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add : HashMultiMap<'Key,'Value> -> 'Key -> 'Value -> unit
- Add key and data to the table. -
val clear : HashMultiMap<'Key,'Value> -> unit
- Empty the table. -
val copy : HashMultiMap<'Key,'Value> -> HashMultiMap<'Key,'Value>
- Create a copy of the table. Remember they are imperative and get mutated. -
val create : int -> HashMultiMap<'Key,'Value>
- Create a hash table with the suggested initial size. - - Inlined to enable generation of efficient hash routines for the key type in the common case. -
val find : HashMultiMap<'Key,'Value> -> 'Key -> 'Value
- Lookup key's data in the table. - Raises exception is key not in table, if this could happen you should be using tryfind. -
val find_all : HashMultiMap<'Key,'Value> -> 'Key -> 'Value list
- Return all bindings for the given key -
val fold :
-  ('Key -> 'Value -> 'State -> 'State) ->
-    HashMultiMap<'Key,'Value> -> 'State -> 'State
- Fold over all bindings -
val hash : 'Value -> int
- Hash on the structure of a value according to the F# structural hashing - conventions. See Pervasives.hash -
val hashq : 'Value -> int
- Hash on the identity of an object. See Pervasives.hashq. -
val iter : ('Key -> 'Value -> unit) -> HashMultiMap<'Key,'Value> -> unit
-Apply the given function to each binding in the hash table -
val Make : ('Key -> int) * ('Key -> 'Key -> bool) -> Provider<'Key,'Value>
- Build a collection of operations for creating and using - hashtables based on the given hash/equality functions. This returns a record - that contains the functions you use to create and manipulate tables of - this kind. The returned value is much like an ML module. You should call Make once for - each new pair of key/value types. You may need to constrain the result - to be an instantiation of Provider. - - let MyStringHashProvider : Provider<string,int> = Hashtbl.Make(myStringHash,myStringEq) -
val MakeTagged :
-  'Tag -> Provider<'Key,'Value,'Tag>
-    (requires 'Tag :> IEqualityComparer<'Key>)
- Same as Make, except track the comparison function being used through an additional type parameter. - - To use this function accurately you need to define a new named class that implements IEqualityComparer and - pass an instance of that class as the first argument. For example: - type MyHasher = - class - new() = { } - interface IEqualityComparer<string> with - member self.GetHashCode(x) = ... - member self.Equals(x,y) = ... - end - end - - let MyStringHashProvider : Hashtbl.Provider<string,int> = Hashtbl.MakeTagged(new MyStringHasher()) -
val mem : HashMultiMap<'Key,'Value> -> 'Key -> bool
- Test for the existence of any bindings for the given key -
val of_list : ('Key * 'Value) list -> HashMultiMap<'Key,'Value>
- Create a hash table using the given data -
val of_seq : seq<'Key * 'Value> -> HashMultiMap<'Key,'Value>
- Create hash table using the given data - - Inlined to enable generation of efficient hash routines for the key type in the common case. -
val remove : HashMultiMap<'Key,'Value> -> 'Key -> unit
- Remove the latest binding for the given key -
val replace : HashMultiMap<'Key,'Value> -> 'Key -> 'Value -> unit
- Replace the latest binding for the given key -
val tryfind : HashMultiMap<'Key,'Value> -> 'Key -> 'Value option
- Lookup the key's data in the table -
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.type_Provider-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.type_Provider-2.html deleted file mode 100644 index 782fd79d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.type_Provider-2.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Hashtbl.Provider -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Hashtbl.Provider


-
-
- - - -
Note: an abbreviation for Provider<'Key,'Value,IEqualityComparer<'Key>> -

Full Type Signature

-
type Provider<'Key,'Value> = Provider<'Key,'Value,IEqualityComparer<'Key>>
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Hashtbl
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.type_Provider-3.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.type_Provider-3.html deleted file mode 100644 index a32d7785..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.type_Provider-3.html +++ /dev/null @@ -1,67 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Hashtbl.Provider -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Hashtbl.Provider


-
-
- - - -
-A collection of operations for creating and using hash tables based on particular type-tracked hash/equality functions. -Generated by the Hashtbl.Make and Hashtbl.MakeTagged functors. This type is for use when you wish to -specify a comparison function once and carry around an object that is a provider of (i.e. a factory for) hashtables -that utilize that comparison function. - -The 'Tag' type parameter is used to track information about the comparison function, which helps ensure -that you don't mixup maps created with different comparison functions - -

Full Type Signature

-
type Provider<'Key,'Value,'Tag (requires 'Tag :> IEqualityComparer<'Key>)> =
-  interface
-    abstract member add : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value -> unit
-    abstract member clear : HashMultiMap<'Key,'Value,'Tag> -> unit
-    abstract member copy : HashMultiMap<'Key,'Value,'Tag> -> HashMultiMap<'Key,'Value,'Tag>
-    abstract member create : int -> HashMultiMap<'Key,'Value,'Tag>
-    abstract member find : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value
-    abstract member find_all : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value list
-    abstract member
-      fold : ('Key -> 'Value -> 'State -> 'State) -> HashMultiMap<'Key,'Value,'Tag> -> 'State -> 'State
-    abstract member iter : ('Key -> 'Value -> unit) -> HashMultiMap<'Key,'Value,'Tag> -> unit
-    abstract member mem : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> bool
-    abstract member remove : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> unit
-    abstract member replace : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value -> unit
-    abstract member tryfind : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value option
-  end
-

Instance Members

- - - - - - - - - - - - - - - -
MemberDescription
member add : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value -> unit
member clear : HashMultiMap<'Key,'Value,'Tag> -> unit
member
-  copy : HashMultiMap<'Key,'Value,'Tag> ->
-           HashMultiMap<'Key,'Value,'Tag>
member create : int -> HashMultiMap<'Key,'Value,'Tag>
member find : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value
member find_all : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value list
member
-  fold : ('Key -> 'Value -> 'State -> 'State) ->
-           HashMultiMap<'Key,'Value,'Tag> -> 'State -> 'State
member
-  iter : ('Key -> 'Value -> unit) ->
-           HashMultiMap<'Key,'Value,'Tag> -> unit
member mem : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> bool
member remove : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> unit
member replace : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value -> unit
member tryfind : HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value option
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Hashtbl
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.type__t-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.type__t-2.html deleted file mode 100644 index 71b7511e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Hashtbl.type__t-2.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Hashtbl.t -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Hashtbl.t


-
-
- - - -
- OCaml compatible type name, for use when not opening module, e.g. Hashtbl.t - Note: an abbreviation for HashMultiMap<'Key,'Value> -

Full Type Signature

-
type t<'Key,'Value> = HashMultiMap<'Key,'Value>
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Hashtbl
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Lexing.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Lexing.html deleted file mode 100644 index c006345b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Lexing.html +++ /dev/null @@ -1,104 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Lexing -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Lexing


-
-
- - - -
- Lexing: ML-like lexing support - - This file maintains rough compatibility for lexbuffers used by some ML - laxer generators. The lexbuf carries an associated pair of positions. - Beware that only the "cnum" (absolute character number) field is automatically - updated as each lexeme is matched. Upon each successful match the prior end - position is transferred to be the start position and a new start position - is allocated with an updated pos_cnum field. - -

Type Definitions

- - - - - -
TypeDescription
type lexbuf - ASCII LexBuffers - - The type "lexbuf" is opaque, but has an internal position information field - that can be updated by setting "lexbuf.EndPos", for example if you wish - to update the other fields in that position data before or during - lexing. You will need to do this if you wish to maintain accurate - line-count information. If you do this and wish to maintain strict - cross-compiling compatibility with OCamlLex and other tools you may need code - to conditionally use lexbuf_set_curr_p when compiling F# code. - Note: an abbreviation for LexBuffer<byte>
type position Note: an abbreviation for Position
-
-

Values

- - - - - - - - - - - - - - - - - - -
ValueDescription
val flush_input : lexbuf -> unit
- Remove all input, though don't discard the except the current lexeme -
val from_binary_reader : BinaryReader -> lexbuf
- Fuel a lexer using the given BinaryReader. -
val from_bytearray : byte [] -> lexbuf
- Fuel a lexer from an array of bytes -
val from_channel : TextReader -> lexbuf
- Fuel a lexer using the given in_channel. The bytes are read using Pervasives.input. - If the in_channel is a textual channel the bytes are - presented to the lexer by decoding the characters using System.Text.Encoding.ASCII. -
val from_function : (byte [] -> int -> int) -> lexbuf
- Fuel a lexer from function that fills an array of bytes up to the given length, returning the - number of bytes filled. -
val from_string : string -> lexbuf
- Fuel a lexer from a string, converted to ascii using System.Text.Encoding.ASCII.GetBytes -
val from_text_reader : Encoding -> TextReader -> lexbuf
- Fuel a lexer using the given TextReader or StreamReader. - The characters read are decoded to bytes using the given encoding (e.g. System.Text.Encoding.ASCII) - and the bytes presented to the lexer. The encoding used to decode the characters - is associated with the expectations of the lexer (e.g. a lexer may be constructed to accept only - ASCII or pseudo-UTF8 bytes) and will typically be different to - the encoding used to decode the file. -
val lexeme : lexbuf -> string
- Return the matched string -
val lexeme_bytes : lexbuf -> byte array
- Return the bytes for the matched string -
val lexeme_char : lexbuf -> int -> char
- Return a character from the matched string, innterpreting the bytes using an ASCII encoding -
val lexeme_end : lexbuf -> int
- Return absolute positions into the entire stream of characters -
val lexeme_end_p : lexbuf -> position
- Return the positions stored in the lexbuf for the matched string -
val lexeme_start : lexbuf -> int
- Return absolute positions into the entire stream of characters -
val lexeme_start_p : lexbuf -> position
- Return the positions stored in the lexbuf for the matched string -
val lexeme_utf8 : lexbuf -> string
- Return the matched string interpreting the bytes using the given Unicode text encoding -
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Lexing.type__lexbuf.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Lexing.type__lexbuf.html deleted file mode 100644 index 243b5c49..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Lexing.type__lexbuf.html +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Lexing.lexbuf -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Lexing.lexbuf


-
-
- - - -
- ASCII LexBuffers - - The type "lexbuf" is opaque, but has an internal position information field - that can be updated by setting "lexbuf.EndPos", for example if you wish - to update the other fields in that position data before or during - lexing. You will need to do this if you wish to maintain accurate - line-count information. If you do this and wish to maintain strict - cross-compiling compatibility with OCamlLex and other tools you may need code - to conditionally use lexbuf_set_curr_p when compiling F# code. - Note: an abbreviation for LexBuffer<byte> -

Full Type Signature

-
type lexbuf = LexBuffer<byte>
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Lexing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Lexing.type__position.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Lexing.type__position.html deleted file mode 100644 index 1270b952..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Lexing.type__position.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Lexing.position -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Lexing.position


-
-
- - - -
Note: an abbreviation for Position -

Full Type Signature

-
type position = Position
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Lexing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Obj.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Obj.html deleted file mode 100644 index 56eb2237..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Obj.html +++ /dev/null @@ -1,53 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Obj -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Obj


-
-
- - - -
-

Type Definitions

- - - - -
TypeDescription
type t Note: an abbreviation for obj
-
-

Values

- - - - - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute
-  ("Consider using 'Microsoft.FSharp.Core.LanguagePrimitives.PhysicalEquality' instead")>]
-val eq : 'a -> 'a -> bool
- See Microsoft.FSharp.Core.LanguagePrimitives.PhysicalEquality -
[<OCamlCompatibilityAttribute ("Consider using 'box' and/or 'unbox' instead")>]
-val magic : 'a -> 'b
[<OCamlCompatibilityAttribute
-  ("Consider using 'not(Microsoft.FSharp.Core.LanguagePrimitives.PhysicalEquality(...))' instead")>]
-val not_eq : 'a -> 'a -> bool
- Negation of Obj.eq (i.e. reference/physical inequality) -
[<OCamlCompatibilityAttribute ("Consider using 'null' instead")>]
-val nullobj : obj
[<OCamlCompatibilityAttribute ("Consider using 'unbox' instead")>]
-val obj : obj -> 'a
- See Microsoft.FSharp.Core.Operators.unbox -
[<OCamlCompatibilityAttribute ("Consider using 'box' instead")>]
-val repr : 'a -> obj
- See Microsoft.FSharp.Core.Operators.box -
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Obj.type__t.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Obj.type__t.html deleted file mode 100644 index 29782a35..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Obj.type__t.html +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Obj.t -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Obj.t


-
-
- - - -
Note: an abbreviation for obj -

Full Type Signature

-
[<OCamlCompatibilityAttribute ("Consider using 'obj' instead")>]
-type t = obj
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Obj
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Parsing.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Parsing.html deleted file mode 100644 index cb2fa1ed..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Parsing.html +++ /dev/null @@ -1,70 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Parsing -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Parsing


-
-
- - - -
- Parsing: parser support for parsers produced by fsyacc. - - Parsers generated by fsyacc provide location information within parser - actions. However that information is not available globally, but - rather is accessed via the functions available on the following local - variable which is available in all parser actions: - - parseState : 'a Microsoft.FSharp.Text.Parsing.IParseState - - However, this is not compatible with the parser specifications used - with ocamlyacc and similar tools, which make a single parser state available - globally. If you wish to use a global parser state (e.g. so your code will - cross-compile with OCaml) then you can use the functions in this file. - You will need to either generate the parser with '--ml-compatibility' option - or add the code - - Parsing.set_parse_state parseState; - - at the start of each action of your grammar. The functions below - simply report the results of corresponding calls to the latest object - specified by a call to set_parse_state. - - Note that there could be unprotected multi-threaded concurrent access for the - parser information, so you should not in general use these - functions if there may be more than one parser active, and - should instead use the functions directly available from the parseState - object. - -

Exceptions

- - - - -
ExceptionDescription
exception Parse_error - You can initialize error recovery by raising the Parse_error exception. - Note: an abbreviation for = RecoverableParseError
-
-

Values

- - - - - - - - - - - - -
ValueDescription
val rhs_end : int -> int
val rhs_end_pos : int -> position
val rhs_start : int -> int
val rhs_start_pos : int -> position
val set_parse_state : IParseState -> unit
val symbol_end : unit -> int
val symbol_end_pos : unit -> position
val symbol_start : unit -> int
val symbol_start_pos : unit -> position
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Parsing.type_Parse_error.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Parsing.type_Parse_error.html deleted file mode 100644 index 309351e7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Parsing.type_Parse_error.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Parsing.Parse_error -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.OCaml.Parsing.Parse_error


-
-
- - - -
- You can initialize error recovery by raising the Parse_error exception. - Note: an abbreviation for = RecoverableParseError -

Full Signature

-
exception Parse_error = RecoverableParseError
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Parsing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.InChannel.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.InChannel.html deleted file mode 100644 index 79ba5f0c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.InChannel.html +++ /dev/null @@ -1,58 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.InChannel -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Pervasives.InChannel


-
-
- - - -
-

Values

- - - - - - - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute ()>]
-val of_BinaryReader : BinaryReader -> in_channel
-Link .NET IO with the out_channel/in_channel model -
[<OCamlCompatibilityAttribute ()>]
-val of_Stream : Encoding -> Stream -> in_channel
- Wrap a stream by creating a StreamReader for the - stream and then wrapping is as an input channel. - A text encoding must be given, e.g. System.Text.Encoding.UTF8 -
[<OCamlCompatibilityAttribute ()>]
-val of_StreamReader : StreamReader -> in_channel
-Link .NET IO with the out_channel/in_channel model -
[<OCamlCompatibilityAttribute ()>]
-val of_TextReader : TextReader -> in_channel
-Link .NET IO with the out_channel/in_channel model -
[<OCamlCompatibilityAttribute ()>]
-val to_BinaryReader : in_channel -> BinaryReader
- Access the underlying stream-based objects for the channel -
[<OCamlCompatibilityAttribute ()>]
-val to_Stream : in_channel -> Stream
-Link .NET IO with the out_channel/in_channel model -
[<OCamlCompatibilityAttribute ()>]
-val to_StreamReader : in_channel -> StreamReader
- Access the underlying stream-based objects for the channel -
[<OCamlCompatibilityAttribute ()>]
-val to_TextReader : in_channel -> TextReader
- Access the underlying stream-based objects for the channel -
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.OutChannel.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.OutChannel.html deleted file mode 100644 index aa7b9085..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.OutChannel.html +++ /dev/null @@ -1,58 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.OutChannel -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Pervasives.OutChannel


-
-
- - - -
-

Values

- - - - - - - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute ()>]
-val of_BinaryWriter : BinaryWriter -> out_channel
-Link .NET IO with the out_channel/in_channel model -
[<OCamlCompatibilityAttribute ()>]
-val of_Stream : Encoding -> Stream -> out_channel
- Wrap a stream by creating a StreamWriter for the - stream and then wrapping is as an output channel. - A text encoding must be given, e.g. System.Text.Encoding.UTF8 -
[<OCamlCompatibilityAttribute ()>]
-val of_StreamWriter : StreamWriter -> out_channel
-Link .NET IO with the out_channel/in_channel model -
[<OCamlCompatibilityAttribute ()>]
-val of_TextWriter : TextWriter -> out_channel
-Link .NET IO with the out_channel/in_channel model -
[<OCamlCompatibilityAttribute ()>]
-val to_BinaryWriter : out_channel -> BinaryWriter
- Access the underlying stream-based objects for the channel -
[<OCamlCompatibilityAttribute ()>]
-val to_Stream : out_channel -> Stream
- Access the underlying stream-based objects for the channel -
[<OCamlCompatibilityAttribute ()>]
-val to_StreamWriter : out_channel -> StreamWriter
- Access the underlying stream-based objects for the channel -
[<OCamlCompatibilityAttribute ()>]
-val to_TextWriter : out_channel -> TextWriter
- Access the underlying stream-based objects for the channel -
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.html deleted file mode 100644 index 7d272f00..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.html +++ /dev/null @@ -1,246 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives


-
-
- - - -
-

Type Definitions

- - - - - - - -
TypeDescription
type exn Note: an abbreviation for Exception
type list -The type of simple immutable lists - Note: an abbreviation for List<'a>
type option -The type of None/Some options - Note: an abbreviation for Option<'a>
type ref -The type of pointers to mutable reference cells - Note: an abbreviation for Ref<'a>
-
-

Exceptions

- - - - -
ExceptionDescription
exception Failure - The exception thrown by failure and many other F# functions - A future release of F# may map this exception to a corresponding .NET exception. - Note: an abbreviation for = Failure
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( ! ) : 'a ref -> 'a
-Dereference a mutable reference cell -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( * ) : int -> int -> int
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( ** ) : float -> float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( + ) : int -> int -> int
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( - ) : int -> int -> int
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( / ) : int -> int -> int
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( := ) : 'a ref -> 'a -> unit
-Assign to a mutable reference cell -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( < ) : 'a -> 'a -> bool
-Structural less-than comparison -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( <= ) : 'a -> 'a -> bool
-Structural less-than-or-equal comparison -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( <> ) : 'a -> 'a -> bool
-Structural inequality -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( = ) : 'a -> 'a -> bool
-Structural equality -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( > ) : 'a -> 'a -> bool
-Structural greater-than -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( >= ) : 'a -> 'a -> bool
-Structural greater-than-or-equal -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( @ ) : 'a list -> 'a list -> 'a list
- Concatenate two lists. -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ( ^ ) : string -> string -> string
- Concatenate two strings. The overlaoded operator '+' may also be used. -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val abs : int -> int
-Absolute value of the given integer -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val acos : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val asin : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val atan : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val atan2 : float -> float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ceil : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val compare : 'a -> 'a -> int
-Structural comparison -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val cos : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val cosh : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val decr : int ref -> unit
-Decrement a mutable reference cell containing an integer -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val exit : int -> 'a
-Exit the current hardware isolated process, if security settings permit, -otherwise raise an exception. Calls System.Environment.Exit. -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val exp : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val failwith : string -> 'a
- Throw a 'Failure' exception -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val float : int -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val floor : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val fst : ('a * 'b) -> 'a
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val hash : 'a -> int
-The "hash" function is a structural hash function. It is -designed to return equal hash values for items that are -equal according to the polymorphic equality -function Pervasives.(=) (i.e. the standard "=" operator). -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ignore : 'a -> unit
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val incr : int ref -> unit
-Increment a mutable reference cell containing an integer -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val infinity : float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val log : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val log10 : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val max : 'a -> 'a -> 'a
-Maximum based on structural comparison -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val min : 'a -> 'a -> 'a
-Minimum based on structural comparison -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val nan : float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val not : bool -> bool
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val raise : exn -> 'a
- Throw an exception -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val ref : 'a -> 'a ref
-Create a mutable reference cell -
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val sin : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val sinh : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val snd : ('a * 'b) -> 'b
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val sqrt : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val tan : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val tanh : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-val truncate : float -> int
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type_Failure.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type_Failure.html deleted file mode 100644 index 26c18d1a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type_Failure.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.Failure -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.Failure


-
-
- - - -
- The exception thrown by failure and many other F# functions - A future release of F# may map this exception to a corresponding .NET exception. - Note: an abbreviation for = Failure -

Full Signature

-
exception Failure = Failure
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__exn.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__exn.html deleted file mode 100644 index 94f71aba..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__exn.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.exn -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.exn


-
-
- - - -
Note: an abbreviation for Exception -

Full Type Signature

-
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-type exn = Exception
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__list-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__list-1.html deleted file mode 100644 index 3d5db887..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__list-1.html +++ /dev/null @@ -1,24 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.list -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.list


-
-
- - - -
-The type of simple immutable lists - Note: an abbreviation for List<'a> -

Full Type Signature

-
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-type 'a list = List<'a>
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__option-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__option-1.html deleted file mode 100644 index 50e22048..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__option-1.html +++ /dev/null @@ -1,24 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.option -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.option


-
-
- - - -
-The type of None/Some options - Note: an abbreviation for Option<'a> -

Full Type Signature

-
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-type 'a option = Option<'a>
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__ref-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__ref-1.html deleted file mode 100644 index 77ec4780..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.type__ref-1.html +++ /dev/null @@ -1,24 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.ref -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives.ref


-
-
- - - -
-The type of pointers to mutable reference cells - Note: an abbreviation for Ref<'a> -

Full Type Signature

-
[<OCamlCompatibilityAttribute
-  ("Consider replacing uses of the functions accessible via Pervasives.* with their F# equivalents, usually by deleting 'Pervasives.'")>]
-type 'a ref = Ref<'a>
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.html deleted file mode 100644 index 0a9610bd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.html +++ /dev/null @@ -1,559 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Pervasives


-
-
- - - -
-Pervasives: Additional OCaml-compatible bindings - -

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - - - -
ModuleDescription
Microsoft.FSharp.Compatibility.OCaml.Pervasives.InChannel
Microsoft.FSharp.Compatibility.OCaml.Pervasives.OutChannel
Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives
-
-

Type Definitions

- - - - - - - - - -
TypeDescription
type format Note: an abbreviation for Format<'a,'b,'c,'c>
type format4 Note: an abbreviation for Format<'a,'b,'c,'d>
type fpclass
type in_channel - A pseudo-abstraction over binary and textual input channels. - OCaml-compatible channels conflate binary and text IO, and for this reasons their - use from F# is somewhat deprecated (direct use of System.IO StreamReader, TextReader and - BinaryReader objects is preferred, e.g. see System.IO.File.OpenText). - Well-written OCaml-compatible code that simply opens either a channel in text or binary - mode and then does text or binary I/O using the OCaml-compatible functions below - will work, though care must be taken with regard to end-of-line characters (see - input_char below). - - This library pretends that an in_channel is just a System.IO.TextReader. Channel values - created using open_in_bin maintain a private System.IO.BinaryReader, which will be used whenever - you do I/O using this channel. - - InChannel.of_BinaryReader and InChannel.of_StreamReader allow you to build input - channels out of the corresponding .NET abstractions. - Note: an abbreviation for TextReader
type open_flag - This type is present primarily for compatibility with other versions of ML. When - not cross-compiling we recommend using the .NET I/O libraries -
type out_channel - An pseudo-abstraction over binary and textual output channels. - OCaml-compatible channels conflate binary and text IO, and for this reasons their - use from F# is somewhat deprecated The direct use of System.IO StreamWriter, TextWriter and - BinaryWriter objects is preferred, e.g. see System.IO.File.CreateText). Well-written OCaml code - that simply opens either a channel in text or binary mode and then does text - or binary I/O using the OCaml functions will work, though care must - be taken with regard to end-of-line characters (see output_char below). - - This library pretends that an out_channel is just a System.IO.TextWriter. Channels - created using open_out_bin maintain a private System.IO.BinaryWriter, which will be used whenever - do I/O using this channel. - Note: an abbreviation for TextWriter
-
-

Exceptions

- - - - - - - - - - -
ExceptionDescription
exception Assert_failure - The exception thrown by 'assert' failures. - A future release of F# may map this exception to a corresponding .NET exception. -
exception Division_by_zero
exception End_of_file
exception Exit
exception Match_failure - Non-exhaustive match failures will raise Match failures - A future release of F# may map this exception to a corresponding .NET exception. - Note: an abbreviation for = MatchFailure
exception Out_of_memory
exception Stack_overflow
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute
-  ("Using the physical inequality operator '!=' is not recommended except in cross-compiled code. Consider using generic structual inequality 'x <> y' or 'not(LanguagePrimitives.PhysicalEquality x y)'")>]
-val ( != ) : 'a -> 'a -> bool
- Negation of the '==' operator, see also Obj.eq -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x * y' instead of 'x *. y'")>]
-val ( *. ) : float -> float -> float
- This value is present primarily for compatibility with other versions of ML -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x + y' instead of 'x +. y'")>]
-val ( +. ) : float -> float -> float
- This value is present primarily for compatibility with other versions of ML. In F# - the overloaded operators may be used. -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x - y' instead of 'x -. y'")>]
-val ( -. ) : float -> float -> float
- This value is present primarily for compatibility with other versions of ML. In F# - the overloaded operators may be used. -
[<OCamlCompatibilityAttribute ("Consider using 'arr.[idx]' instead")>]
-val ( .() ) : 'a array -> int -> 'a
- 1D Array element get-accessor ('getter') -
[<OCamlCompatibilityAttribute ("Consider using 'arr.[idx] <- v' instead")>]
-val ( .()<- ) : 'a array -> int -> 'a -> unit
- 1D Array element set-accessor ('setter') -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x / y' instead of 'x /. y'")>]
-val ( /. ) : float -> float -> float
- This value is present primarily for compatibility with other versions of ML. In F# - the overloaded operators may be used. -
[<OCamlCompatibilityAttribute
-  ("Using the physical equality operator '==' is not recommended except in cross-compiled code. Consider using generic structural equality 'x = y' or 'LanguagePrimitives.PhysicalEquality x y'")>]
-val ( == ) : 'a -> 'a -> bool
-Reference/physical equality. -True if boxed versions of the inputs are reference-equal, OR if -both are value types and the implementation of Object.Equals for the type -of the first argument returns true on the boxed versions of the inputs. - -In normal use on reference types or non-mutable value types this function -has the following properties: - - returns 'true' for two F# values where mutation of data - in mutable fields of one affects mutation of data in the other - - will return 'true' if (=) returns true - - hashq will return equal hashes if (==) returns 'true' - -The use on mutable value types is not recommended. -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator '+x' instead of '+. x'")>]
-val ( ~+. ) : float -> float
- This value is present primarily for compatibility with other versions of ML. In F# - the overloaded operators may be used. -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator '-x' instead of '-. x'")>]
-val ( ~-. ) : float -> float
- This value is present primarily for compatibility with other versions of ML. In F# - the overloaded operators may be used. -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded F# library function 'abs' instead")>]
-val abs_float : float -> float
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x >>> y' instead of 'x asr y'. The precedence of these operators differs, so you may need to add parentheses")>]
-val asr : int -> int -> int
[<OCamlCompatibilityAttribute ()>]
-val bool_of_string : string -> bool
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'char' instead")>]
-val char_of_int : int -> char
[<OCamlCompatibilityAttribute ()>]
-val classify_float : float -> fpclass
[<OCamlCompatibilityAttribute ("Consider using 'channel.Close()' instead")>]
-val close_in : in_channel -> unit
- Close the channel -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.Close()' instead, or create the channel via a 'use' binding to ensure automatic cleanup")>]
-val close_out : out_channel -> unit
- Close the given output channel -
[<OCamlCompatibilityAttribute ()>]
-val epsilon_float : float
- This value is present primarily for compatibility with other versions of ML - The smallest value that when added to 1.0 gives a different value to 1.0 -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded conversion function 'float' instead")>]
-val float_of_int : int -> float
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded conversion function 'float' instead")>]
-val float_of_string : string -> float
[<OCamlCompatibilityAttribute ("Consider using 'channel.Flush()' instead")>]
-val flush : out_channel -> unit
- Flush all pending output on the channel to the physical - output device. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.BaseStream.Length' instead")>]
-val in_channel_length : in_channel -> int
- Return the length of the input channel -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.Read(buffer,index,count)' instead")>]
-val input : in_channel -> byte [] -> int -> int -> int
- Attempt to input the given number of bytes from the channel, writing them into the - buffer at the given start position. Does not block if the bytes are not available. - - The use of this function with a channel performing byte-to-character translation (e.g. one - created with open_in, open_in_utf8 or open_in_encoded, or one - or built from a StreamReader or TextReader) is not recommended. - Instead, open the channel using open_in_bin or InChannel.of_BinaryReader. - - If used with a StreamReader channel, i.e. one created using - open_in, open_in_utf8 or open_in_encoded, or one - or built from a StreamReader, this function reads bytes directly from the underlying - BaseStream. This may not be appropriate if any other input techniques are being - used on the channel. - - If used with a TextReader channel (e.g. stdin), this function reads characters from the - stream and then fills some of the byte array with the decoding of these into - bytes, where the decoding is performed using the System.Text.Encoding.Default encoding - - Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.ReadInt32()' on a BinaryReader instead")>]
-val input_binary_int : in_channel -> int
- Input a binary integer from a binary channel. Compatible with output_binary_int. -
[<OCamlCompatibilityAttribute
-  ("Consider using the 'Read()' method on a 'BinaryReader' instead, which returns -1 if no byte is available")>]
-val input_byte : in_channel -> int
- Input a single byte. - For text channels this only accepts characters with a UTF16 encoding that fits in a byte, e.g. ASCII. - Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. -
[<OCamlCompatibilityAttribute
-  ("Consider using the 'channel.Read()' method instead, which returns -1 if no character is available")>]
-val input_char : in_channel -> char
- Input a single character. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.Read(buffer,index,count)' instead")>]
-val input_chars : in_channel -> char [] -> int -> int -> int
- Attempt to input characters from a channel. Does not block if inpout is not available. - Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. - - No CRLF translation is done on input, even in text mode. That is, if an input file - has '\r\n' (CRLF) line terminators both characters will be seen in the input. -
[<OCamlCompatibilityAttribute
-  ("Consider using the 'channel.ReadLine()' method instead")>]
-val input_line : in_channel -> string
- Input a single line. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. -
[<OCamlCompatibilityAttribute
-  ("Consider deserializing using an object of type 'System.Runtime.Serialization.Formatters.Binary.BinaryFormatter' method instead")>]
-val input_value : in_channel -> 'a
- Input a single serialized value from a binary stream. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator '-x' instead of 'int_neg x'")>]
-val int_neg : int -> int
- Negation on integers of the 'int' type -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'int' instead")>]
-val int_of_char : char -> int
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'int' instead")>]
-val int_of_float : float -> int
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'int' instead")>]
-val int_of_string : string -> int
val invalid_arg : string -> 'a
- Throw an Invalid_argument exception -
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.ArgumentException' instead")>]
-val Invalid_argument : string -> exn
- The exception thrown by invalid_arg and misues of F# library functions -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x &&& y' instead of 'x land y'. The precedence of these operators differs, so you may need to add parentheses")>]
-val land : int -> int -> int
[<OCamlCompatibilityAttribute ()>]
-val ldexp : float -> int -> float
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator '~~~x' instead of 'lnot x'")>]
-val lnot : int -> int
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x ||| y' instead of 'x lor y'. The precedence of these operators differs, so you may need to add parentheses")>]
-val lor : int -> int -> int
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x <<< y' instead of 'x lsl y'. The precedence of these operators differs, so you may need to add parentheses")>]
-val lsl : int -> int -> int
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x >>> y' on an unsigned type instead of 'x lsr y'. The precedence of these operators differs, so you may need to add parentheses")>]
-val lsr : int -> int -> int
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x ^^^ y' instead of 'x lxor y'. The precedence of these operators differs, so you may need to add parentheses")>]
-val lxor : int -> int -> int
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Double.MaxValue' instead")>]
-val max_float : float
- This value is present primarily for compatibility with other versions of ML - The highest representable positive value in the 'float' type -
[<OCamlCompatibilityAttribute ("Consider using 'System.Int32.MaxValue' instead")>]
-val max_int : int
- The highest representable value in the 'int' type -
[<OCamlCompatibilityAttribute ()>]
-val min_float : float
- This value is present primarily for compatibility with other versions of ML - The lowest non-denormalized positive IEEE64 float -
[<OCamlCompatibilityAttribute ("Consider using 'System.Int32.MinValue' instead")>]
-val min_int : int
- The lowest representable value in the 'int' type -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'x % y' instead of 'x mod y'. The precedence of these operators differs, so you may need to add parentheses")>]
-val mod : int -> int -> int
[<OCamlCompatibilityAttribute ("Consider using the '%' operator instead")>]
-val mod_float : float -> float -> float
- This value is present primarily for compatibility with other versions of ML -
[<OCamlCompatibilityAttribute ()>]
-val modf : float -> float * float
- This value is present primarily for compatibility with other versions of ML -
[<OCamlCompatibilityAttribute ("Consider using '-infinity' instead")>]
-val neg_infinity : float
- This value is present primarily for compatibility with other versions of ML -
[<OCamlCompatibilityAttribute
-  ("This is a synonym for 'System.Collections.Generic.KeyNotFoundException'")>]
-val Not_found<'a> : exn
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.IO.File.OpenText(path)' instead")>]
-val open_in : string -> in_channel
- Open the given file to read. - -In the absence of an explicit encoding (e.g. using Open_encoding) open_in -uses the default text encoding (System.Text.Encoding.Default). If you want to read a file -regardless of encoding then you should use binary modes. Note that .NET's -"new StreamReader" function defaults to use a utf8 encoding, and also attempts -to determine an automatic encoding by looking for "byteorder-marks" at the head -of a text file. This function does not do this. - - No CR-LF translation is done on input. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'new System.IO.BinaryReader(System.IO.File.OpenRead(path))' and changing your type to be a BinaryReader instead")>]
-val open_in_bin : string -> in_channel
- Open the given file to read in binary-mode -
[<OCamlCompatibilityAttribute
-  ("For advanced I/O consider using the System.IO namespace instead")>]
-val open_in_gen : open_flag list -> int -> string -> in_channel
- Open the given file in the mode specified by the given flags -
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.IO.File.CreateText(path)' instead")>]
-val open_out : string -> out_channel
- Open the given file to write in text-mode using the - System.Text.Encoding.Default encoding - - See output_char for a description of CR-LF translation - done on output. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'new System.IO.BinaryWriter(System.IO.File.Create(path))' and changing your type to be a BinaryWriter instead")>]
-val open_out_bin : string -> out_channel
- Open the given file to write in binary-mode -
[<OCamlCompatibilityAttribute
-  ("For advanced I/O consider using the System.IO namespace")>]
-val open_out_gen : open_flag list -> int -> string -> out_channel
- Open the given file to write in the mode according to the specified flags -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.BaseStream.Length' instead")>]
-val out_channel_length : out_channel -> int
- Return the length of the output channel. - Raise an exception if not an app -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.Write(buffer,index,count)' instead")>]
-val output : out_channel -> byte [] -> int -> int -> unit
- Write the given range of bytes to the output channel. -
[<OCamlCompatibilityAttribute ("Consider using 'channel.Write(int)' instead")>]
-val output_binary_int : out_channel -> int -> unit
- Write the given integer to the output channel in binary format. - Only valid on binary channels. -
[<OCamlCompatibilityAttribute ("Consider using 'channel.Write(byte)' instead")>]
-val output_byte : out_channel -> int -> unit
- Write the given byte to the output channel. No CRLF translation is - performed. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.Write(bytes,0,bytes.Length)' instead")>]
-val output_bytearray : out_channel -> byte [] -> unit
- Write all the given bytes to the output channel. No CRLF translation is - performed. -
[<OCamlCompatibilityAttribute ("Consider using 'channel.Write(char)' instead")>]
-val output_char : out_channel -> char -> unit
- Write the given Unicode character to the output channel. - - If the output channel is a binary stream and the UTF-16 value of the Unicode character is greater - than 255 then ArgumentException is thrown. - - No CRLF translation is done on output. That is, if the output character is - '\n' (LF) characters they will not be written as '\r\n' (CRLF) characters, regardless - of whether the underlying operating system or output stream uses CRLF as the default - line-feed character. -
[<OCamlCompatibilityAttribute ("Consider using 'channel.Write(string)' instead")>]
-val output_string : out_channel -> string -> unit
- Write the given Unicode string to the output channel. See output_char for the treatment of - '\n' characters within the string. -
[<OCamlCompatibilityAttribute
-  ("Consider serializing using an object of type 'System.Runtime.Serialization.Formatters.Binary.BinaryFormatter' instead")>]
-val output_value : out_channel -> 'a -> unit
- Serialize the given value to the output channel. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.BaseStream.Position' property instead")>]
-val pos_in : in_channel -> int
- Report the current position in the input channel -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.BaseStream.Position' on a TextWriter or '.Position' on a Stream instead")>]
-val pos_out : out_channel -> int
- Return the current position in the output channel, measured from the - start of the channel. Not valid on all channels. -
[<OCamlCompatibilityAttribute ()>]
-val pred : int -> int
- n-1 (no overflow checking) -
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.Error.Write(char)' instead")>]
-val prerr_char : char -> unit
- Print a character to the stderr stream -
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.Error.WriteLine(string)' instead")>]
-val prerr_endline : string -> unit
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.Error.Write(double)' instead")>]
-val prerr_float : float -> unit
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.Error.Write(int)' instead")>]
-val prerr_int : int -> unit
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.Error.WriteLine()' instead")>]
-val prerr_newline : unit -> unit
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.Error.Write(string)' instead")>]
-val prerr_string : string -> unit
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.Write(char)' instead")>]
-val print_char : char -> unit
val print_endline : string -> unit
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.Write(double)' instead")>]
-val print_float : float -> unit
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.Write(int)' instead")>]
-val print_int : int -> unit
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.WriteLine()' instead")>]
-val print_newline : unit -> unit
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.Write(string)' instead")>]
-val print_string : string -> unit
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.ReadLine() |> float' instead")>]
-val read_float : unit -> float
-Read a floating point number from the console. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.ReadLine() |> int' instead")>]
-val read_int : unit -> int
-Read an integer from the console. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.Console.ReadLine()' instead")>]
-val read_line : unit -> string
-Read a line from the console, without the end-of-line character. -
[<OCamlCompatibilityAttribute ()>]
-val really_input : in_channel -> byte [] -> int -> int -> unit
- Reads bytes from the channel. Blocks if the bytes are not available. - See 'input' for treatment of text channels. - Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.BaseStream.Seek' method instead, or using a 'System.IO.BinaryReader' and related types for binary I/O")>]
-val seek_in : in_channel -> int -> unit
- Reads bytes from the channel. Blocks if the bytes are not available. - For text channels this only accepts UTF-16 bytes with an encoding less than 256. - Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'channel.BaseStream.Seek' on a TextReader or 'channel.Seek' on a Stream instead")>]
-val seek_out : out_channel -> int -> unit
- Set the current position in the output channel, measured from the - start of the channel. -
[<OCamlCompatibilityAttribute
-  ("Consider using 'System.IO.BinaryReader' and related types for binary I/O")>]
-val set_binary_mode_in : in_channel -> bool -> unit
- Set the binary mode to true or false. If the binary mode is changed from "true" to - "false" then a StreamReader is created to read the binary stream. The StreamReader uses - the default text encoding System.Text.Encoding.Default -
[<OCamlCompatibilityAttribute
-  ("For advanced I/O consider using the System.IO namespace")>]
-val set_binary_mode_out : out_channel -> bool -> unit
- Set the binary mode. If the binary mode is changed from "true" to - "false" then a StreamWriter is created to write the binary stream. The StreamWriter uses - the default text encoding System.Text.Encoding.Default. -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'string' instead")>]
-val string_of_bool : bool -> string
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'string' instead")>]
-val string_of_float : float -> string
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded operator 'string' instead")>]
-val string_of_int : int -> string
[<OCamlCompatibilityAttribute ()>]
-val succ : int -> int
- n+1 (no overflow checking) -
-
-

Active Patterns

- - - - - -
Active PatternDescription
[<OCamlCompatibilityAttribute
-  ("Consider matching against 'System.ArgumentException' instead")>]
-val ( |Invalid_argument|_| ) : exn -> string option
[<OCamlCompatibilityAttribute
-  ("This is a synonym for 'System.Collections.Generic.KeyNotFoundException'")>]
-val ( |Not_found|_| ) : exn -> unit option
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Assert_failure.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Assert_failure.html deleted file mode 100644 index ac710c03..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Assert_failure.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Assert_failure -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.OCaml.Pervasives.Assert_failure


-
-
- - - -
- The exception thrown by 'assert' failures. - A future release of F# may map this exception to a corresponding .NET exception. - -

Full Signature

-
exception Assert_failure of string * int * int
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Division_by_zero.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Division_by_zero.html deleted file mode 100644 index f1e88200..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Division_by_zero.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Division_by_zero -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.OCaml.Pervasives.Division_by_zero


-
-
- - - -
-

Full Signature

-
exception Division_by_zero = (# ... #)
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_End_of_file.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_End_of_file.html deleted file mode 100644 index 62949362..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_End_of_file.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.End_of_file -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.OCaml.Pervasives.End_of_file


-
-
- - - -
-

Full Signature

-
exception End_of_file = (# ... #)
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Exit.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Exit.html deleted file mode 100644 index 5029b590..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Exit.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Exit -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.OCaml.Pervasives.Exit


-
-
- - - -
-

Full Signature

-
exception Exit
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Match_failure.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Match_failure.html deleted file mode 100644 index c162c6e0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Match_failure.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Match_failure -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.OCaml.Pervasives.Match_failure


-
-
- - - -
- Non-exhaustive match failures will raise Match failures - A future release of F# may map this exception to a corresponding .NET exception. - Note: an abbreviation for = MatchFailure -

Full Signature

-
exception Match_failure = MatchFailure
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Out_of_memory.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Out_of_memory.html deleted file mode 100644 index 29f32173..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Out_of_memory.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Out_of_memory -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.OCaml.Pervasives.Out_of_memory


-
-
- - - -
-

Full Signature

-
exception Out_of_memory = (# ... #)
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Stack_overflow.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Stack_overflow.html deleted file mode 100644 index ade0980c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type_Stack_overflow.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.Stack_overflow -
-
-

[Home] Exception Microsoft.FSharp.Compatibility.OCaml.Pervasives.Stack_overflow


-
-
- - - -
-

Full Signature

-
exception Stack_overflow = (# ... #)
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__format-3.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__format-3.html deleted file mode 100644 index cc6f7d25..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__format-3.html +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.format -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.format


-
-
- - - -
Note: an abbreviation for Format<'a,'b,'c,'c> -

Full Type Signature

-
[<OCamlCompatibilityAttribute ("Consider using Microsoft.FSharp.Text.Format<_,_,_,_> instead")>]
-type ('a,'b,'c) format = Format<'a,'b,'c,'c>
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__format4-4.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__format4-4.html deleted file mode 100644 index aec4d7bd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__format4-4.html +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.format4 -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.format4


-
-
- - - -
Note: an abbreviation for Format<'a,'b,'c,'d> -

Full Type Signature

-
[<OCamlCompatibilityAttribute ("Consider using Microsoft.FSharp.Text.Format<_,_,_,_> instead")>]
-type ('a,'b,'c,'d) format4 = Format<'a,'b,'c,'d>
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__fpclass.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__fpclass.html deleted file mode 100644 index 5a5c528f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__fpclass.html +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.fpclass -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.fpclass


-
-
- - - -
-

Full Type Signature

-
[<OCamlCompatibilityAttribute ()>]
-type fpclass =
-  | FP_normal
-  | FP_zero
-  | FP_infinite
-  | FP_nan
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__in_channel.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__in_channel.html deleted file mode 100644 index bdf7cd3c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__in_channel.html +++ /dev/null @@ -1,38 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.in_channel -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.in_channel


-
-
- - - -
- A pseudo-abstraction over binary and textual input channels. - OCaml-compatible channels conflate binary and text IO, and for this reasons their - use from F# is somewhat deprecated (direct use of System.IO StreamReader, TextReader and - BinaryReader objects is preferred, e.g. see System.IO.File.OpenText). - Well-written OCaml-compatible code that simply opens either a channel in text or binary - mode and then does text or binary I/O using the OCaml-compatible functions below - will work, though care must be taken with regard to end-of-line characters (see - input_char below). - - This library pretends that an in_channel is just a System.IO.TextReader. Channel values - created using open_in_bin maintain a private System.IO.BinaryReader, which will be used whenever - you do I/O using this channel. - - InChannel.of_BinaryReader and InChannel.of_StreamReader allow you to build input - channels out of the corresponding .NET abstractions. - Note: an abbreviation for TextReader -

Full Type Signature

-
[<OCamlCompatibilityAttribute
-  ("Consider using one of the types System.IO.TextReader, System.IO.BinaryReader or System.IO.StreamReader instead")>]
-type in_channel = TextReader
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__open_flag.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__open_flag.html deleted file mode 100644 index 83dc4774..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__open_flag.html +++ /dev/null @@ -1,34 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.open_flag -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.open_flag


-
-
- - - -
- This type is present primarily for compatibility with other versions of ML. When - not cross-compiling we recommend using the .NET I/O libraries - -

Full Type Signature

-
[<OCamlCompatibilityAttribute ("For advanced I/O consider using the System.IO namespace")>]
-type open_flag =
-  | Open_rdonly
-  | Open_wronly
-  | Open_append
-  | Open_creat
-  | Open_trunc
-  | Open_excl
-  | Open_binary
-  | Open_text
-  | Open_nonblock
-  | Open_encoding of Encoding
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__out_channel.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__out_channel.html deleted file mode 100644 index c438bd1e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Pervasives.type__out_channel.html +++ /dev/null @@ -1,34 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Pervasives.out_channel -
-
-

[Home] Type Microsoft.FSharp.Compatibility.OCaml.Pervasives.out_channel


-
-
- - - -
- An pseudo-abstraction over binary and textual output channels. - OCaml-compatible channels conflate binary and text IO, and for this reasons their - use from F# is somewhat deprecated The direct use of System.IO StreamWriter, TextWriter and - BinaryWriter objects is preferred, e.g. see System.IO.File.CreateText). Well-written OCaml code - that simply opens either a channel in text or binary mode and then does text - or binary I/O using the OCaml functions will work, though care must - be taken with regard to end-of-line characters (see output_char below). - - This library pretends that an out_channel is just a System.IO.TextWriter. Channels - created using open_out_bin maintain a private System.IO.BinaryWriter, which will be used whenever - do I/O using this channel. - Note: an abbreviation for TextWriter -

Full Type Signature

-
[<OCamlCompatibilityAttribute
-  ("Consider using one of the types 'System.IO.TextWriter', 'System.IO.StreamWriter' or 'System.IO.BinaryWriter' instead")>]
-type out_channel = TextWriter
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Printexc.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Printexc.html deleted file mode 100644 index 4bd4e25e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Printexc.html +++ /dev/null @@ -1,28 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Printexc -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Printexc


-
-
- - - -
- Compatibility module to display data about exceptions. - -

Values

- - - - - -
ValueDescription
val print : ('a -> 'b) -> 'a -> 'b
val to_string : exn -> string
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Sys.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Sys.html deleted file mode 100644 index b62a03ae..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.Sys.html +++ /dev/null @@ -1,92 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml.Sys -
-
-

[Home] Module Microsoft.FSharp.Compatibility.OCaml.Sys


-
-
- - - -
- Sys: Basic system operations (for ML compatibility) - - This module is only included to make it possible to cross-compile - code with other ML compilers. It may be deprecated and/or removed in - a future release. You may wish to use .NET functions directly instead. - -

Values

- - - - - - - - - - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute
-  ("Consider using System.Environment.GetCommandLineArgs directly")>]
-val argv : string array
- The array of command line options. Gives the command line arguments - as returned by System.Environment.GetCommandLineArgs. -
[<OCamlCompatibilityAttribute
-  ("Consider using System.IO.Directory.SetCurrentDirectory directly")>]
-val chdir : string -> unit
- Sets the current working directory for the process using System.IO.Directory.SetCurrentDirectory -
[<OCamlCompatibilityAttribute
-  ("Consider using System.Diagnostics.Process directly")>]
-val command : string -> int
- Run the command and return it's exit code. - - Warning: 'command' currently attempts to execute the string using - the 'cmd.exe' shell processor. If it is not present on the system - then the operation will fail. Use System.Diagnostics.Process - directly to run commands in a portable way, which involves specifying - the program to run and the arguments independently. -
[<OCamlCompatibilityAttribute
-  ("Consider using System.AppDomain.CurrentDomain.FriendlyName directly")>]
-val executable_name : string
- Path of the current executable, using - System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,System.AppDomain.CurrentDomain.FriendlyName) -
[<OCamlCompatibilityAttribute ("Consider using System.IO.File.Exists directly")>]
-val file_exists : string -> bool
- Returns true if a file currently exists, using System.IO.File.Exists(s). -
[<OCamlCompatibilityAttribute
-  ("Consider using System.IO.Directory.GetCurrentDirectory directly")>]
-val getcwd : unit -> string
- Returns the current working directory for the process using System.IO.Directory.GetCurrentDirectory -
[<OCamlCompatibilityAttribute
-  ("Consider using System.Environment.GetEnvironmentVariable directly")>]
-val getenv : string -> string
- Call System.Environment.GetEnvironmentVariable. Raise KeyNotFoundException if the variable is not defined. -
[<OCamlCompatibilityAttribute ("Consider using System.IO.File.Delete directly")>]
-val remove : string -> unit
- Deletes a file using System.IO.File.Delete. -
[<OCamlCompatibilityAttribute ("Consider using System.IO.File.Move directly")>]
-val rename : string -> string -> unit
- Rename a file on disk using System.IO.File.Move -
[<OCamlCompatibilityAttribute
-  ("Consider using System.Diagnostics.Process.GetCurrentProcess().UserProcessorTime.TotalSeconds directly")>]
-val time : unit -> float
- Time consumed by the main thread. (for approximate timings). - Generally returns only the processor time used by the main - thread of the application. -
[<OCamlCompatibilityAttribute
-  ("Consider using sizeof directly, where this returns a size in bytes")>]
-val word_size : int
- The number of bits in the "int" type. -
-
-
-

See Also

-Microsoft.FSharp.Compatibility.OCaml
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.html deleted file mode 100644 index aa00957a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.OCaml.html +++ /dev/null @@ -1,103 +0,0 @@ -Microsoft.FSharp.Compatibility.OCaml -
-
-

[Home] Namespace Microsoft.FSharp.Compatibility.OCaml


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - - - - - - - - - - -
ModuleDescription
Microsoft.FSharp.Compatibility.OCaml.Big_int - Big_int compatability module for arbitrary sized integers. -
Microsoft.FSharp.Compatibility.OCaml.Buffer - Imperative buffers for building strings, a shallow interface to System.Text.StringBuilder -
Microsoft.FSharp.Compatibility.OCaml.Filename - Common filename operations. This module is included to make it possible to cross-compile - code with other ML compilers. See also System.IO.Path -
Microsoft.FSharp.Compatibility.OCaml.Hashtbl - Multi-entry hash tables using the structural "hash" and "equals" functions. - -These tables can be used with keys of any type, but you should check that -structural hashing and equality are correct for your key type. -Structural hashing is efficient but not a suitable choice in all circumstances, -e.g. may not hash efficiently on non-reference types and deeply-structured types. -Better efficiency is typically achieved if key types are F#-generated -types. - -These hash tables may map items to multiple keys (see find_all). - -The implementations are not safe for concurrent reading/writing, -and so users of these tables should take an appropriate lock -before reading/writing if used in a concurrent setting. -
Microsoft.FSharp.Compatibility.OCaml.Lexing - Lexing: ML-like lexing support - - This file maintains rough compatibility for lexbuffers used by some ML - laxer generators. The lexbuf carries an associated pair of positions. - Beware that only the "cnum" (absolute character number) field is automatically - updated as each lexeme is matched. Upon each successful match the prior end - position is transferred to be the start position and a new start position - is allocated with an updated pos_cnum field. -
Microsoft.FSharp.Compatibility.OCaml.Obj
Microsoft.FSharp.Compatibility.OCaml.Parsing - Parsing: parser support for parsers produced by fsyacc. - - Parsers generated by fsyacc provide location information within parser - actions. However that information is not available globally, but - rather is accessed via the functions available on the following local - variable which is available in all parser actions: - - parseState : 'a Microsoft.FSharp.Text.Parsing.IParseState - - However, this is not compatible with the parser specifications used - with ocamlyacc and similar tools, which make a single parser state available - globally. If you wish to use a global parser state (e.g. so your code will - cross-compile with OCaml) then you can use the functions in this file. - You will need to either generate the parser with '--ml-compatibility' option - or add the code - - Parsing.set_parse_state parseState; - - at the start of each action of your grammar. The functions below - simply report the results of corresponding calls to the latest object - specified by a call to set_parse_state. - - Note that there could be unprotected multi-threaded concurrent access for the - parser information, so you should not in general use these - functions if there may be more than one parser active, and - should instead use the functions directly available from the parseState - object. -
Microsoft.FSharp.Compatibility.OCaml.Pervasives -Pervasives: Additional OCaml-compatible bindings -
Microsoft.FSharp.Compatibility.OCaml.Printexc - Compatibility module to display data about exceptions. -
Microsoft.FSharp.Compatibility.OCaml.Sys - Sys: Basic system operations (for ML compatibility) - - This module is only included to make it possible to cross-compile - code with other ML compilers. It may be deprecated and/or removed in - a future release. You may wish to use .NET functions directly instead. -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Permutation.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Permutation.html deleted file mode 100644 index 80eb23c0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Permutation.html +++ /dev/null @@ -1,49 +0,0 @@ -Microsoft.FSharp.Compatibility.Permutation -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Permutation


-
-
- - - -
-

Values

- - - - - - - - - - -
ValueDescription
val identity : permutation
- The identity permutation over any size -
val inverse : int -> permutation -> permutation
val of_array : int array -> permutation
- Create a permutation by specifying the result of permuting [| 0 .. n-1 |]. For example, - Permutation.of_array [| 1;2;0 |] specifies a permutation that rotates all elements right one place. -
val of_pairs : seq<int * int> -> permutation
- Create a permutation by specifying (source,destination) index pairs. For example, - Permutation(3,[ (0,2);(1,0); (2,1) ]) specifies a permutation that rotates - all elements left one place. Not all elements need be given, e.g. - Permutation(5,[ (1,2);(2,1) |]) specifies a permutation that swaps elements at indexes - 1 and 2. -
val reversal : int -> permutation
- Return a permutation that, when applied, maps index 0 to size-1, size-1 to 0 etc. -
val rotation : int -> int -> permutation
- Return a permutation that rotates right by the given distance. If the distance - is negative then a left rotation results. -
val swap : int -> int -> permutation
- Return a swaps the given two elements over any size -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.SByte.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.SByte.html deleted file mode 100644 index 4ef5680b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.SByte.html +++ /dev/null @@ -1,57 +0,0 @@ -Microsoft.FSharp.Compatibility.SByte -
-
-

[Home] Module Microsoft.FSharp.Compatibility.SByte


-
-
- - - -
- Simple operations on signed bytes - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val abs : int8 -> int8
val add : int8 -> int8 -> int8
val compare : int8 -> int8 -> int
val div : int8 -> int8 -> int8
val logand : int8 -> int8 -> int8
val lognot : int8 -> int8
val logor : int8 -> int8 -> int8
val logxor : int8 -> int8 -> int8
val max_int : byte
val min_int : sbyte
val minus_one : sbyte
val mul : int8 -> int8 -> int8
val neg : int8 -> int8
val of_byte : byte -> sbyte
val of_int : int -> sbyte
val of_int16 : int16 -> sbyte
val of_int32 : int32 -> sbyte
val of_uint8 : byte -> sbyte
val one : sbyte
val pred : int8 -> int8
val rem : int8 -> int8 -> int8
val shift_left : int8 -> int -> int8
val shift_right : int8 -> int -> int8
val sub : int8 -> int8 -> int8
val succ : int8 -> int8
val to_byte : int8 -> byte
val to_int : int8 -> int
val to_int16 : int8 -> int16
val to_int32 : int8 -> int32
val to_uint8 : int8 -> byte
val zero : sbyte
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Seq.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Seq.html deleted file mode 100644 index f458edfc..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Seq.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Compatibility.Seq -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Seq


-
-
- - - -
-

Values

- - - - -
ValueDescription
val generate :
-  (unit -> 'b) -> ('b -> 'T option) -> ('b -> unit) -> seq<'T>
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Set.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Set.html deleted file mode 100644 index 4458a43e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Set.html +++ /dev/null @@ -1,73 +0,0 @@ -Microsoft.FSharp.Compatibility.Set -
-
-

[Home] Module Microsoft.FSharp.Compatibility.Set


-
-
- - - -
- Immutable sets implemented via binary trees - -

Type Definitions

- - - - - -
TypeDescription
type Provider -A collection of operations for creating and using sets based on a particular comparison function. -The 'Tag' type parameter is used to track information about the comparison function. -
type Provider Note: an abbreviation for Provider<'T,IComparer<'T>>
-
-

Values

- - - - - - - - -
ValueDescription
[<OCamlCompatibilityAttribute ()>]
-val cardinal : Set<'T> -> int
[<OCamlCompatibilityAttribute ()>]
-val elements : Set<'T> -> 'T list
-The elements of the set as a list. -
[<OCamlCompatibilityAttribute ()>]
-val inter : Set<'T> -> Set<'T> -> Set<'T>
-Compute the intersection of the two sets. -
[<OCamlCompatibilityAttribute ()>]
-val Make : ('T -> 'T -> int) -> Provider<'T>
- Build a collection of operations for creating and using - maps based on a single consistent comparison function. This returns a record - that contains the functions you use to create and manipulate maps all of which - use this comparison function. The returned value is much like an ML module. - - Use MakeTagged if you want additional type safety that guarantees that two sets - based on different comparison functions can never be combined in inconsistent ways. -
[<OCamlCompatibilityAttribute ()>]
-val MakeTagged :
-  'Tag -> Provider<'T,'Tag> (requires 'Tag :> IComparer<'T>)
-A functor to build a collection of operations for creating and using - sets based on the given comparison function. This returns a record that - contains the functions you use to create and manipulate maps of - this kind. The returned value is much like an ML module. - - To use this function you need to define a new named class that implements IComparer and - pass an instance of that class as the first argument. For example: - type MyComparer() = - interface IComparer<string> with - member self.Compare(x,y) = ... - - let MyStringSetProvider = Set.MakeTagged(new MyComparer()) -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Set.type_Provider-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Set.type_Provider-1.html deleted file mode 100644 index 8af8f605..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Set.type_Provider-1.html +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft.FSharp.Compatibility.Set.Provider -
-
-

[Home] Type Microsoft.FSharp.Compatibility.Set.Provider


-
-
- - - -
Note: an abbreviation for Provider<'T,IComparer<'T>> -

Full Type Signature

-
[<OCamlCompatibilityAttribute ()>]
-type Provider<'T> = Provider<'T,IComparer<'T>>
-
-

See Also

-Microsoft.FSharp.Compatibility.Set
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Set.type_Provider-2.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Set.type_Provider-2.html deleted file mode 100644 index 9379035e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.Set.type_Provider-2.html +++ /dev/null @@ -1,80 +0,0 @@ -Microsoft.FSharp.Compatibility.Set.Provider -
-
-

[Home] Type Microsoft.FSharp.Compatibility.Set.Provider


-
-
- - - -
-A collection of operations for creating and using sets based on a particular comparison function. -The 'Tag' type parameter is used to track information about the comparison function. - -

Full Type Signature

-
[<OCamlCompatibilityAttribute ()>]
-type Provider<'T,'Tag (requires 'Tag :> IComparer<'T>)> =
-  interface
-    abstract member add : 'T -> Set<'T,'Tag> -> Set<'T,'Tag>
-    abstract member cardinal : Set<'T,'Tag> -> int
-    abstract member choose : Set<'T,'Tag> -> 'T
-    abstract member compare : Set<'T,'Tag> -> Set<'T,'Tag> -> int
-    abstract member diff : Set<'T,'Tag> -> Set<'T,'Tag> -> Set<'T,'Tag>
-    abstract member elements : Set<'T,'Tag> -> 'T list
-    abstract member equal : Set<'T,'Tag> -> Set<'T,'Tag> -> bool
-    abstract member exists : ('T -> bool) -> Set<'T,'Tag> -> bool
-    abstract member filter : ('T -> bool) -> Set<'T,'Tag> -> Set<'T,'Tag>
-    abstract member fold : ('T -> 'State -> 'State) -> Set<'T,'Tag> -> 'State -> 'State
-    abstract member for_all : ('T -> bool) -> Set<'T,'Tag> -> bool
-    abstract member empty : Set<'T,'Tag>
-    abstract member inter : Set<'T,'Tag> -> Set<'T,'Tag> -> Set<'T,'Tag>
-    abstract member is_empty : Set<'T,'Tag> -> bool
-    abstract member iter : ('T -> unit) -> Set<'T,'Tag> -> unit
-    abstract member max_elt : Set<'T,'Tag> -> 'T
-    abstract member mem : 'T -> Set<'T,'Tag> -> bool
-    abstract member min_elt : Set<'T,'Tag> -> 'T
-    abstract member partition : ('T -> bool) -> Set<'T,'Tag> -> Set<'T,'Tag> * Set<'T,'Tag>
-    abstract member remove : 'T -> Set<'T,'Tag> -> Set<'T,'Tag>
-    abstract member singleton : 'T -> Set<'T,'Tag>
-    abstract member subset : Set<'T,'Tag> -> Set<'T,'Tag> -> bool
-    abstract member union : Set<'T,'Tag> -> Set<'T,'Tag> -> Set<'T,'Tag>
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member add : 'T -> Set<'T,'Tag> -> Set<'T,'Tag>
member cardinal : Set<'T,'Tag> -> int
member choose : Set<'T,'Tag> -> 'T
member compare : Set<'T,'Tag> -> Set<'T,'Tag> -> int
member diff : Set<'T,'Tag> -> Set<'T,'Tag> -> Set<'T,'Tag>
member elements : Set<'T,'Tag> -> 'T list
member empty : Set<'T,'Tag>
member equal : Set<'T,'Tag> -> Set<'T,'Tag> -> bool
member exists : ('T -> bool) -> Set<'T,'Tag> -> bool
member filter : ('T -> bool) -> Set<'T,'Tag> -> Set<'T,'Tag>
member fold : ('T -> 'State -> 'State) -> Set<'T,'Tag> -> 'State -> 'State
member for_all : ('T -> bool) -> Set<'T,'Tag> -> bool
member inter : Set<'T,'Tag> -> Set<'T,'Tag> -> Set<'T,'Tag>
member is_empty : Set<'T,'Tag> -> bool
member iter : ('T -> unit) -> Set<'T,'Tag> -> unit
member max_elt : Set<'T,'Tag> -> 'T
member mem : 'T -> Set<'T,'Tag> -> bool
member min_elt : Set<'T,'Tag> -> 'T
member
-  partition : ('T -> bool) ->
-                Set<'T,'Tag> -> Set<'T,'Tag> * Set<'T,'Tag>
member remove : 'T -> Set<'T,'Tag> -> Set<'T,'Tag>
member singleton : 'T -> Set<'T,'Tag>
member subset : Set<'T,'Tag> -> Set<'T,'Tag> -> bool
member union : Set<'T,'Tag> -> Set<'T,'Tag> -> Set<'T,'Tag>
-
-
-

See Also

-Microsoft.FSharp.Compatibility.Set
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.String.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.String.html deleted file mode 100644 index 008f5d35..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.String.html +++ /dev/null @@ -1,114 +0,0 @@ -Microsoft.FSharp.Compatibility.String -
-
-

[Home] Module Microsoft.FSharp.Compatibility.String


-
-
- - - -
- Compatibility module for string processing. Richer string operations - are available via the member functions on strings and other functionality in - the System.String type - and the System.Text.RegularExpressions namespace. - -

Values

- - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val capitalize : string -> string
- Return a string with the first character converted to uppercase. -
[<OCamlCompatibilityAttribute ("Consider using 'Operators.compare' instead")>]
-val compare : string -> string -> int
- Compare the given strings using ordinal comparison -
[<OCamlCompatibilityAttribute ("Consider using 'str.Contains' instead")>]
-val contains : string -> char -> bool
- Return true is the given string contains the given character -
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
-val contains_between : string -> int -> int -> char -> bool
- Return true is the given string contains the given character in the - range specified by the given start index and the given length -
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
-val contains_from : string -> int -> char -> bool
- Return true is the given string contains the given character in the - range from the given start index to the end of the string. -
[<OCamlCompatibilityAttribute ("Consider using 'str.[i]' instead")>]
-val get : string -> int -> char
- Returns the character at the specified position in the string -
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
-val index : string -> char -> int
- Return the first index of the given character in the - string. Raise KeyNotFoundException if - the string does not contain the given character. -
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
-val index_from : string -> int -> char -> int
- Return the first index of the given character in the - range from the given start position to the end of the string. - Raise KeyNotFoundException if - the string does not contain the given character. -
[<OCamlCompatibilityAttribute ("Consider using 'str.ToLower()' instead")>]
-val lowercase : string -> string
- Return a new string with all characters converted to lowercase -
[<OCamlCompatibilityAttribute ("Consider using 'String.replicate' instead")>]
-val make : int -> char -> string
- Return a string of the given length containing repetitions of the given character -
[<OCamlCompatibilityAttribute
-  ("Consider using the overloaded 'string' operator instead")>]
-val of_char : char -> string
- Return s string of length 1 containing the given character -
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
-val rcontains_from : string -> int -> char -> bool
- Return true if the string contains the given character prior to the given index -
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
-val rindex : string -> char -> int
- Return the index of the first occurrence of the given character - from the end of the string proceeding backwards -
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
-val rindex_from : string -> int -> char -> int
- Return the index of the first occurrence of the given character - starting from the given index proceeding backwards. -
val split : char list -> (string -> string list)
- Split the string using the given list of separator characters. - Trimming is also performed at both ends of the string and any empty - strings that result from the split are discarded. -
[<OCamlCompatibilityAttribute ("Consider using 'str.[i]' instead")>]
-val sub : string -> int -> int -> string
- Return a substring of length 'length' starting index 'start'. -
val trim : char list -> (string -> string)
- Removes all occurrences of a set of characters specified in a - list from the beginning and end of this instance. -
val uncapitalize : string -> string
- Return a string with the first character converted to lowercase. -
[<OCamlCompatibilityAttribute ("Consider using 'str.ToUpper' instead")>]
-val uppercase : string -> string
- Return a string with all characters converted to uppercase. -
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.UInt32.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.UInt32.html deleted file mode 100644 index 934da6d2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.UInt32.html +++ /dev/null @@ -1,62 +0,0 @@ -Microsoft.FSharp.Compatibility.UInt32 -
-
-

[Home] Module Microsoft.FSharp.Compatibility.UInt32


-
-
- - - -
- UInt32: ML-like operations on 32-bit System.UInt32 numbers. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add : uint32 -> uint32 -> uint32
val bits_of_float : float -> uint32
val bits_of_float32 : float32 -> uint32
val compare : uint32 -> uint32 -> int
val div : uint32 -> uint32 -> uint32
val float32_of_bits : uint32 -> float32
val float_of_bits : uint32 -> float
val logand : uint32 -> uint32 -> uint32
val lognot : uint32 -> uint32
val logor : uint32 -> uint32 -> uint32
val logxor : uint32 -> uint32 -> uint32
val max_int : uint32
val min_int : uint32
val mul : uint32 -> uint32 -> uint32
val of_float : float -> uint32
val of_float32 : float32 -> uint32
val of_int : int -> uint32
val of_int32 : int32 -> uint32
val of_string : string -> uint32
val of_uint64 : uint64 -> uint32
val of_unativeint : unativeint -> uint32
val one : uint32
val pred : uint32 -> uint32
val rem : uint32 -> uint32 -> uint32
val shift_left : uint32 -> int -> uint32
val shift_right : uint32 -> int -> uint32
val sub : uint32 -> uint32 -> uint32
val succ : uint32 -> uint32
val to_float : uint32 -> float
val to_float32 : uint32 -> float32
val to_int : uint32 -> int
val to_int32 : uint32 -> int32
val to_string : uint32 -> string
val to_uint64 : uint32 -> uint64
val to_unativeint : uint32 -> unativeint
val zero : uint32
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.UInt64.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.UInt64.html deleted file mode 100644 index 58f6985c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.UInt64.html +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft.FSharp.Compatibility.UInt64 -
-
-

[Home] Module Microsoft.FSharp.Compatibility.UInt64


-
-
- - - -
- UInt64: basic operations on 64-bit System.UInt64 numbers. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add : uint64 -> uint64 -> uint64
val bits_of_float : float -> uint64
val compare : uint64 -> uint64 -> int
val div : uint64 -> uint64 -> uint64
val float_of_bits : uint64 -> float
val logand : uint64 -> uint64 -> uint64
val lognot : uint64 -> uint64
val logor : uint64 -> uint64 -> uint64
val logxor : uint64 -> uint64 -> uint64
val max_int : uint64
val min_int : uint64
val mul : uint64 -> uint64 -> uint64
val of_float : float -> uint64
val of_float32 : float32 -> uint64
val of_int : int -> uint64
val of_int64 : int64 -> uint64
val of_string : string -> uint64
val of_uint32 : uint32 -> uint64
val of_unativeint : unativeint -> uint64
val one : uint64
val pred : uint64 -> uint64
val rem : uint64 -> uint64 -> uint64
val shift_left : uint64 -> int -> uint64
val shift_right : uint64 -> int -> uint64
val sub : uint64 -> uint64 -> uint64
val succ : uint64 -> uint64
val to_float : uint64 -> float
val to_float32 : uint64 -> float32
val to_int : uint64 -> int
val to_int64 : uint64 -> int64
val to_string : uint64 -> string
val to_uint32 : uint64 -> uint32
val to_unativeint : uint64 -> unativeint
val zero : uint64
-
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.html deleted file mode 100644 index 25026cc4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.html +++ /dev/null @@ -1,85 +0,0 @@ -Microsoft.FSharp.Compatibility -
-
-

[Home] Namespace Microsoft.FSharp.Compatibility


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - - - - - - - - - - - - - - - - - - - - -
ModuleDescription
Microsoft.FSharp.Compatibility.Arg - A simple command-line argument processor. -
Microsoft.FSharp.Compatibility.Array - Compatibility operations on arrays. -
Microsoft.FSharp.Compatibility.Array2D
Microsoft.FSharp.Compatibility.Byte - Byte (8-bit) operations. -
Microsoft.FSharp.Compatibility.Char - Unicode characters, i.e. the System.Char type. see also the operations - in System.Char and the System.Text.Encoding interfaces if necessary. -
Microsoft.FSharp.Compatibility.Enum - Simple operations to convert between .NET enuemration types and integers -
Microsoft.FSharp.Compatibility.Float - ML-like operations on 64-bit System.Double floating point numbers. -
Microsoft.FSharp.Compatibility.Int16
Microsoft.FSharp.Compatibility.Int32 - Basic operations on 32-bit integers. The type int32 is identical to System.Int32. -
Microsoft.FSharp.Compatibility.Int64 - Basic operations on 64-bit integers. The type int64 is identical to System.Int64. -
Microsoft.FSharp.Compatibility.Lazy
Microsoft.FSharp.Compatibility.List - Compatibility operations on lists. -
Microsoft.FSharp.Compatibility.Map - Extension functionality for maps using structural comparison -
Microsoft.FSharp.Compatibility.Permutation
Microsoft.FSharp.Compatibility.SByte - Simple operations on signed bytes -
Microsoft.FSharp.Compatibility.Seq
Microsoft.FSharp.Compatibility.Set - Immutable sets implemented via binary trees -
Microsoft.FSharp.Compatibility.String - Compatibility module for string processing. Richer string operations - are available via the member functions on strings and other functionality in - the System.String type - and the System.Text.RegularExpressions namespace. -
Microsoft.FSharp.Compatibility.UInt32 - UInt32: ML-like operations on 32-bit System.UInt32 numbers. -
Microsoft.FSharp.Compatibility.UInt64 - UInt64: basic operations on 64-bit System.UInt64 numbers. -
-
-

Type Definitions

- - - - -
TypeDescription
type permutation Note: an abbreviation for int -> int
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.type__permutation.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.type__permutation.html deleted file mode 100644 index 8251eddd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Compatibility.type__permutation.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Compatibility.permutation -
-
-

[Home] Type Microsoft.FSharp.Compatibility.permutation


-
-
- - - -
Note: an abbreviation for int -> int -

Full Type Signature

-
type permutation = int -> int
-
-

See Also

-Microsoft.FSharp.Compatibility
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.AsyncExtensions.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.AsyncExtensions.html deleted file mode 100644 index f5b22419..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.AsyncExtensions.html +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft.FSharp.Control.AsyncExtensions -
-
-

[Home] Module Microsoft.FSharp.Control.AsyncExtensions


-
-
- - - -
- Extensions to the F# Microsoft.FSharp.Control.Async module - -

Extension Members

- - - - - -
Extension MemberDescription
member
-  AsBeginEnd : computation:Async<'T> ->
-                 (AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) *
-                 (IAsyncResult -> unit)
- Return three functions that can be used to implement the .NET Asynchronous - Programming Model (APM) for a given asynchronous computation. - - The functions should normally be published as members with prefix 'Begin', - 'End' and 'Cancel', and can be used within a type definition as follows: - - let beginAction,endAction,cancelAction = Async.AsBeginEnd computation - member x.BeginSomeOperation(callback,state) = beginAction(callback,state) - member x.EndSomeOperation(iar) = endAction(iar) - member x.CancelSomeOperation(iar) = cancelAction(iar) - - - The resulting API will be familiar to programmers in other .NET languages and - is a useful way to publish asynchronous computations in .NET components. -
member
-  AwaitEvent : IEvent<'Delegate,'T> * ?cancelAction:(unit -> unit) ->
-                 Async<'T> (requires delegate and 'Delegate :> Delegate)
- Return an asynchronous computation that waits for a single invocation of a .NET event by - internally adding a handler to the event. Once the computation completes or is cancelled, the - handler is removed from the event. - - The computation will respond to cancellation while waiting for the completion - of the operation. If 'cancelAction' is specified, cancellation causes the given - function to be executed. The computation then continues to wait for the event. - - If 'cancelAction' is not specified, then cancellation causes the computation - to stop immediately, and if the event is subsequently raised it may - be ignored. -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.FileExtensions.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.FileExtensions.html deleted file mode 100644 index 90747541..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.FileExtensions.html +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft.FSharp.Control.FileExtensions -
-
-

[Home] Module Microsoft.FSharp.Control.FileExtensions


-
-
- - - -
-

Extension Members

- - - - - - - - -
Extension MemberDescription
member AsyncAppendText : path:string -> Async<StreamWriter>
- Return an asynchronous computation that will open the file via a fresh blocking I/O thread. -
member
-  AsyncOpen : path:string * mode:FileMode * ?access:FileAccess *
-              ?share:FileShare * ?bufferSize:int * ?options:FileOptions ->
-                Async<FileStream>
- Return an asynchronous computation that will open the file via a fresh blocking I/O thread. - Pass 'options=FileOptions.Asynchronous' to enable further asynchronous read/write operations - on the FileStream. -
member AsyncOpenRead : path:string -> Async<FileStream>
- Return an asynchronous computation that will open the file via a fresh blocking I/O thread. -
member AsyncOpenText : path:string -> Async<StreamReader>
- Return an asynchronous computation that will open the file via a fresh blocking I/O thread. -
member AsyncOpenWrite : path:string -> Async<FileStream>
- Return an asynchronous computation that will open the file via a fresh blocking I/O thread. -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.StreamReaderExtensions.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.StreamReaderExtensions.html deleted file mode 100644 index e02af890..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.StreamReaderExtensions.html +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft.FSharp.Control.StreamReaderExtensions -
-
-

[Home] Module Microsoft.FSharp.Control.StreamReaderExtensions


-
-
- - - -
-

Extension Members

- - - - -
Extension MemberDescription
member AsyncReadToEnd : unit -> Async<string>
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.WebClientExtensions.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.WebClientExtensions.html deleted file mode 100644 index d00a2d36..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.WebClientExtensions.html +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft.FSharp.Control.WebClientExtensions -
-
-

[Home] Module Microsoft.FSharp.Control.WebClientExtensions


-
-
- - - -
-

Extension Members

- - - - -
Extension MemberDescription
member AsyncDownloadString : address:Uri -> Async<string>
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.WebRequestExtensions.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.WebRequestExtensions.html deleted file mode 100644 index 62eecaae..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.WebRequestExtensions.html +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft.FSharp.Control.WebRequestExtensions -
-
-

[Home] Module Microsoft.FSharp.Control.WebRequestExtensions


-
-
- - - -
-

Extension Members

- - - - -
Extension MemberDescription
member AsyncGetResponse : unit -> Async<WebResponse>
- Return an asynchronous computation that, when run, will wait for a response to the given WebRequest. -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.html deleted file mode 100644 index 5b1b61be..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.html +++ /dev/null @@ -1,47 +0,0 @@ -Microsoft.FSharp.Control -
-
-

[Home] Namespace Microsoft.FSharp.Control


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - - - - - -
ModuleDescription
Microsoft.FSharp.Control.AsyncExtensions - Extensions to the F# Microsoft.FSharp.Control.Async module -
Microsoft.FSharp.Control.FileExtensions
Microsoft.FSharp.Control.StreamReaderExtensions
Microsoft.FSharp.Control.WebClientExtensions
Microsoft.FSharp.Control.WebRequestExtensions
-
-

Type Definitions

- - - - - - -
TypeDescription
type AsyncResult - Represents the reified result of an asynchronous computation -
type AsyncResultCell - A helper type to store a single result from an asynchronous computation and asynchronously - access its result. - - When using .NET 4.0 you can often use Task<'T> instead of this type -
type AsyncWorker
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.type_AsyncResult-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.type_AsyncResult-1.html deleted file mode 100644 index d1a4fa9e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.type_AsyncResult-1.html +++ /dev/null @@ -1,38 +0,0 @@ -Microsoft.FSharp.Control.AsyncResult -
-
-

[Home] Type Microsoft.FSharp.Control.AsyncResult


-
-
- - - -
- Represents the reified result of an asynchronous computation - -

Full Type Signature

-
type AsyncResult<'T> =
-  | AsyncOk of 'T
-  | AsyncException of exn
-  | AsyncCanceled of OperationCanceledException
-  with
-    static member Commit : AsyncResult<'T> -> Async<'T>
-  end
-

Static Members

- - - - -
MemberDescription
member Commit : AsyncResult<'T> -> Async<'T>
- Return an asynchronous computation that, when run, either returns a value, raises an exception - of cancels according to the value of the asynchronous result. -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.type_AsyncResultCell-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.type_AsyncResultCell-1.html deleted file mode 100644 index f8547e9b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.type_AsyncResultCell-1.html +++ /dev/null @@ -1,54 +0,0 @@ -Microsoft.FSharp.Control.AsyncResultCell -
-
-

[Home] Type Microsoft.FSharp.Control.AsyncResultCell


-
-
- - - -
- A helper type to store a single result from an asynchronous computation and asynchronously - access its result. - - When using .NET 4.0 you can often use Task<'T> instead of this type - -

Full Type Signature

-
[<SealedAttribute ()>]
-type AsyncResultCell<'T> =
-  class
-    new : unit -> AsyncResultCell<'T>
-    member RegisterResult : AsyncResult<'T> -> unit
-    member AsyncResult : Async<'T>
-  end
-

Instance Members

- - - - - -
MemberDescription
member AsyncResult : Async<'T>
- Wait for the result and commit it -
member RegisterResult : AsyncResult<'T> -> unit
- Record the result in the AsyncResultCell. - Subsequent sets of the result are ignored. This can happen, - e.g. for a race between a cancellation and a success. -
-
-

Static Members

- - - - -
MemberDescription
new : unit -> AsyncResultCell<'T>
- Create a new result cell -
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.type_AsyncWorker-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.type_AsyncWorker-1.html deleted file mode 100644 index 9537faeb..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Control.type_AsyncWorker-1.html +++ /dev/null @@ -1,50 +0,0 @@ -Microsoft.FSharp.Control.AsyncWorker -
-
-

[Home] Type Microsoft.FSharp.Control.AsyncWorker


-
-
- - - -
-

Full Type Signature

-
type AsyncWorker<'T> =
-  class
-    new : Async<'T> * ?asyncGroup:AsyncGroup -> AsyncWorker<'T>
-    member CancelAsync : ?message:string -> unit
-    member ReportProgress : int -> unit
-    member RunAsync : unit -> bool
-    member Canceled : IEvent<OperationCanceledException>
-    member Completed : IEvent<'T>
-    member Error : IEvent<exn>
-    member ProgressChanged : IEvent<int>
-  end
-

Instance Members

- - - - - - - - - - -
MemberDescription
member CancelAsync : ?message:string -> unit
member Canceled : IEvent<OperationCanceledException>
member Completed : IEvent<'T>
member Error : IEvent<exn>
member ProgressChanged : IEvent<int>
member ReportProgress : int -> unit
member RunAsync : unit -> bool
-
-

Static Members

- - - - -
MemberDescription
new : Async<'T> * ?asyncGroup:AsyncGroup -> AsyncWorker<'T>
-
-
-

See Also

-Microsoft.FSharp.Control
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.ComplexCommonExtensions.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.ComplexCommonExtensions.html deleted file mode 100644 index 4def208e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.ComplexCommonExtensions.html +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft.FSharp.Core.ComplexCommonExtensions -
-
-

[Home] Module Microsoft.FSharp.Core.ComplexCommonExtensions


-
-
- - - -
-

Values

- - - - -
ValueDescription
val complex : float -> float -> complex
- Constructs a complex number from both the real and imaginary part. -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.MatrixCommonExtensions.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.MatrixCommonExtensions.html deleted file mode 100644 index bb8a1b3f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.MatrixCommonExtensions.html +++ /dev/null @@ -1,33 +0,0 @@ -Microsoft.FSharp.Core.MatrixCommonExtensions -
-
-

[Home] Module Microsoft.FSharp.Core.MatrixCommonExtensions


-
-
- - - -
-

Values

- - - - - - -
ValueDescription
val matrix : seq<#seq<float>> -> matrix
- Builds a matrix from a sequence of sequence of floats. -
val rowvec : seq<float> -> rowvec
- Builds a (row) vector from a sequence of floats. -
val vector : seq<float> -> vector
- Builds a (column) vector from a sequence of floats. -
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.NumericLiteralN.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.NumericLiteralN.html deleted file mode 100644 index 2e4875f7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.NumericLiteralN.html +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft.FSharp.Core.NumericLiteralN -
-
-

[Home] Module Microsoft.FSharp.Core.NumericLiteralN


-
-
- - - -
-

Values

- - - - - - - - -
ValueDescription
val FromInt32 : int32 -> bignum
val FromInt64 : int64 -> bignum
val FromOne : unit -> bignum
val FromString : string -> bignum
val FromZero : unit -> bignum
-
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.html deleted file mode 100644 index 7fc3a35e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.html +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft.FSharp.Core -
-
-

[Home] Namespace Microsoft.FSharp.Core


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - - - -
ModuleDescription
Microsoft.FSharp.Core.ComplexCommonExtensions
Microsoft.FSharp.Core.MatrixCommonExtensions
Microsoft.FSharp.Core.NumericLiteralN
-
-

Type Definitions

- - - - - - - - -
TypeDescription
type bignum Note: an abbreviation for BigNum
type complex Note: an abbreviation for Complex
type matrix - The type of floating-point matrices. See Microsoft.FSharp.Math - Note: an abbreviation for matrix
type rowvec - The type of floating-point row vectors. See Microsoft.FSharp.Math - Note: an abbreviation for rowvec
type vector - The type of floating-point vectors. See Microsoft.FSharp.Math - Note: an abbreviation for vector
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__bignum.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__bignum.html deleted file mode 100644 index 08b5d6ed..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__bignum.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Core.bignum -
-
-

[Home] Type Microsoft.FSharp.Core.bignum


-
-
- - - -
Note: an abbreviation for BigNum -

Full Type Signature

-
type bignum = BigNum
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__complex.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__complex.html deleted file mode 100644 index 0c44c9a1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__complex.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Core.complex -
-
-

[Home] Type Microsoft.FSharp.Core.complex


-
-
- - - -
Note: an abbreviation for Complex -

Full Type Signature

-
type complex = Complex
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__matrix.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__matrix.html deleted file mode 100644 index 55683920..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__matrix.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.matrix -
-
-

[Home] Type Microsoft.FSharp.Core.matrix


-
-
- - - -
- The type of floating-point matrices. See Microsoft.FSharp.Math - Note: an abbreviation for matrix -

Full Type Signature

-
type matrix = matrix
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__rowvec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__rowvec.html deleted file mode 100644 index f748103f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__rowvec.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.rowvec -
-
-

[Home] Type Microsoft.FSharp.Core.rowvec


-
-
- - - -
- The type of floating-point row vectors. See Microsoft.FSharp.Math - Note: an abbreviation for rowvec -

Full Type Signature

-
type rowvec = rowvec
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__vector.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__vector.html deleted file mode 100644 index 9d0e81ab..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Core.type__vector.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Core.vector -
-
-

[Home] Type Microsoft.FSharp.Core.vector


-
-
- - - -
- The type of floating-point vectors. See Microsoft.FSharp.Math - Note: an abbreviation for vector -

Full Type Signature

-
type vector = vector
-
-

See Also

-Microsoft.FSharp.Core
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Complex.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Complex.html deleted file mode 100644 index d0615a9e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Complex.html +++ /dev/null @@ -1,97 +0,0 @@ -Microsoft.FSharp.Math.Complex -
-
-

[Home] Module Microsoft.FSharp.Math.Complex


-
-
- - - -
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add : complex -> complex -> complex
- Add two complex numbers -
val cis : float -> complex
- A complex of magnitude 1 and the given phase and , i.e. cis x = mkPolar 1.0 x -
val conjugate : complex -> complex
- The conjugate of a complex number, i.e. x-yi -
val cos : Complex -> Complex
- Cosine -
val div : complex -> complex -> complex
- Complex division of two complex numbers -
val exp : Complex -> Complex
- exp(x) = e^x -
val imagPart : complex -> float
- The imaginary part of a complex number -
val log : Complex -> Complex
- log(x) is natural log (base e) -
val magnitude : complex -> float
- The polar-coordinate magnitude of a complex number -
val mkPolar : float * float -> complex
- Create a complex number using magnitude/phase polar coordinates -
val mkRect : float * float -> complex
val mul : complex -> complex -> complex
- Multiply two complex numbers -
val muls : complex -> float -> complex
- Multiply a complex number by a scalar -
val neg : complex -> complex
- Unary negation of a complex number -
val one : complex
- The complex number 1+0i -
val onei : complex
- The complex number 0+1i -
val phase : complex -> float
- The polar-coordinate phase of a complex number -
val pi : Complex
- pi -
val realPart : complex -> float
- The real part of a complex number -
val sin : Complex -> Complex
- Sine -
val smul : float -> complex -> complex
- Multiply a scalar by a complex number -
val sqrt : Complex -> Complex
- sqrt(x) and 0 <= phase(x) < pi -
val sub : complex -> complex -> complex
- Subtract one complex number from another -
val tan : Complex -> Complex
- Tagent -
val zero : complex
- The complex number 0+0i -
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.GlobalAssociations.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.GlobalAssociations.html deleted file mode 100644 index df18a915..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.GlobalAssociations.html +++ /dev/null @@ -1,46 +0,0 @@ -Microsoft.FSharp.Math.GlobalAssociations -
-
-

[Home] Module Microsoft.FSharp.Math.GlobalAssociations


-
-
- - - -
- Associations are a way of associating dictionaries of - operations with given types at runtime. Associations are global to a - .NET application domain. Once specified an association may not be deleted - or modified. - - In this release the system of associations is simply - limited to a registry of types that support dictionaries (i.e. interface objects) - of numeric operations. The following types are pre-registered with associated numeric - operations: float, int32, int64, bigint, float32, Complex, bignum. Other types must be - registered explicitly by user code. - - -

Values

- - - - - - -
ValueDescription
val GetNumericAssociation : unit -> INumeric<'a>
- Attempt to determine a numeric association for the given type, i.e. a registered dictionary of - numeric operations. The interface can be queried dynamically for additional functionality in the numerics - hierarchy. -
val RegisterNumericAssociation : INumeric<'a> -> unit
- Record an AppDomain-wide association between the given type and the given dictionary of - numeric operations. Raise an error if an existing association already exists. -
val TryGetNumericAssociation : unit -> INumeric<'a> option
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Instances.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Instances.html deleted file mode 100644 index 8a21a878..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Instances.html +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft.FSharp.Math.Instances -
-
-

[Home] Module Microsoft.FSharp.Math.Instances


-
-
- - - -
-

Values

- - - - - - - - - -
ValueDescription
val BigIntNumerics : IIntegral<bigint>
val BigNumNumerics : IFractional<bignum>
val Float32Numerics : IFractional<float32>
val FloatNumerics : IIEEE<float>
val Int32Numerics : IIntegral<int32>
val Int64Numerics : IIntegral<int64>
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Matrix.Generic.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Matrix.Generic.html deleted file mode 100644 index f2d94f38..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Matrix.Generic.html +++ /dev/null @@ -1,117 +0,0 @@ -Microsoft.FSharp.Math.Matrix.Generic -
-
-

[Home] Module Microsoft.FSharp.Math.Matrix.Generic


-
-
- - - -
- Operations to manipulate matrix types carrying - arbitrary element types. The names and types of the operations match those - in the containing module Math.Matrix. - - The numeric operations on the element type (add, zero etc.) are inferred from the type - argument itself. That is, for some operations - the element type of the matrix must have an associated instance of INumeric<'T> - or some more specific numeric association (see GlobalAssociations) ((else NotSupportedException)). - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val copy : Matrix<'T> -> Matrix<'T>
- Create a new matrix that is a copy of the given array -
val cptMax : Matrix<'T> -> Matrix<'T> -> Matrix<'T>
-Take the pointwise maximum of two matrices -
val cptMin : Matrix<'T> -> Matrix<'T> -> Matrix<'T>
-Take the pointwise maximum of two matrices -
val create : int -> int -> 'T -> Matrix<'T>
- Create a matrix containing the given value at every element. -
val dot : Matrix<'T> -> Matrix<'T> -> 'T
- Sum of the point-wise multiple of the two matrices. - The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)). -
val exists : ('T -> bool) -> Matrix<'T> -> bool
val existsi : (int -> int -> 'T -> bool) -> Matrix<'T> -> bool
val fold : ('State -> 'T -> 'State) -> 'State -> Matrix<'T> -> 'State
val foldi :
-  (int -> int -> 'State -> 'T -> 'State) -> 'State -> Matrix<'T> -> 'State
val forall : ('T -> bool) -> Matrix<'T> -> bool
val foralli : (int -> int -> 'T -> bool) -> Matrix<'T> -> bool
val get : Matrix<'T> -> int -> int -> 'T
- Get an element from a matrix. The indexes are given in row/column order. -
val identity : int -> Matrix<'T>
- Create a square matrix with the one for the element type lying on diagonal - The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)). -
val init : int -> int -> (int -> int -> 'T) -> Matrix<'T>
- Create a matrix using the given function to compute the item at each index. -
val initDense : int -> int -> seq<int * int * 'T> -> Matrix<'T>
val initDiagonal : Vector<'T> -> Matrix<'T>
- Create a matrix containing the given vector along the diagonal. - The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)). -
val initNumeric :
-  int -> int -> (INumeric<'T> -> int -> int -> 'T) -> Matrix<'T>
- Create a matrix using the given function to compute the item at each index. - The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)). - The function is passed the dictionary of associated operations in addition to the index pair. -
val initSparse : int -> int -> seq<int * int * 'T> -> Matrix<'T>
val inplace_add : Matrix<'T> -> Matrix<'T> -> unit
val inplace_sub : Matrix<'T> -> Matrix<'T> -> unit
val map : ('T -> 'T) -> Matrix<'T> -> Matrix<'T>
val mapi : (int -> int -> 'T -> 'T) -> Matrix<'T> -> Matrix<'T>
val norm : Matrix<'T> -> float
- Returns sqrt(sum(norm(x)*(norm(x))) of all the elements of a matrix. - The element type of the matrix must have an associated instance of INormFloat<'T> (see GlobalAssociations) ((else NotSupportedException)). -
val of_array2 : 'T [,] -> Matrix<'T>
- Create a matrix from the given (usually constant) data -
val of_list : 'T list list -> Matrix<'T>
- Create a matrix from the given (usually constant) data -
val of_rowvec : RowVector<'T> -> Matrix<'T>
val of_scalar : 'T -> Matrix<'T>
- Create a 1x1 matrix containing the given value -
val of_seq : seq<#seq<'T>> -> Matrix<'T>
val of_vector : Vector<'T> -> Matrix<'T>
val prod : Matrix<'T> -> 'T
val set : Matrix<'T> -> int -> int -> 'T -> unit
- Set an element in a matrix. The indexes are given in row/column order. -
val sum : Matrix<'T> -> 'T
val to_array2 : Matrix<'T> -> 'T [,]
- Return a new array containing the elements of the given matrix -
val to_rowvec : Matrix<'T> -> RowVector<'T>
val to_scalar : Matrix<'T> -> 'T
val to_vector : Matrix<'T> -> Vector<'T>
val trace : Matrix<'T> -> 'T
val transpose : Matrix<'T> -> Matrix<'T>
- Return a new matrix which is the transpose of the input matrix -
val zero : int -> int -> Matrix<'T>
- Create a matrix containing the zero element at each index. - The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)). -
-
-
-

See Also

-Microsoft.FSharp.Math.Matrix
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Matrix.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Matrix.html deleted file mode 100644 index e85ddaef..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Matrix.html +++ /dev/null @@ -1,168 +0,0 @@ -Microsoft.FSharp.Math.Matrix -
-
-

[Home] Module Microsoft.FSharp.Math.Matrix


-
-
- - - -
- Operations to manipulate floating - point matrices. The submodule Matrix.Generic contains a - matching set of operations to manipulate matrix types carrying - arbitrary element types. - -

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - -
ModuleDescription
Microsoft.FSharp.Math.Matrix.Generic - Operations to manipulate matrix types carrying - arbitrary element types. The names and types of the operations match those - in the containing module Math.Matrix. - - The numeric operations on the element type (add, zero etc.) are inferred from the type - argument itself. That is, for some operations - the element type of the matrix must have an associated instance of INumeric<'T> - or some more specific numeric association (see GlobalAssociations) ((else NotSupportedException)). -
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val add : matrix -> matrix -> matrix
-Add two matrices (operator +) -
val copy : matrix -> matrix
- Create a new matrix that is a copy of the given array -
val cptMax : matrix -> matrix -> matrix
-Point-wise maximum element of two matrices -
val cptMin : matrix -> matrix -> matrix
-Point-wise minimum element of two matrices -
val cptPow : matrix -> float -> matrix
-Pointwise exponential of a matrix. -
val create : int -> int -> float -> matrix
- Create a matrix with all entries the given constant -
val dot : matrix -> matrix -> float
-Dot product -
val exists : (float -> bool) -> matrix -> bool
- Check if a predicate holds for at least one element of a matrix -
val existsi : (int -> int -> float -> bool) -> matrix -> bool
- Check if a predicate holds for at least one element of a matrix -
val fold : ('T -> float -> 'T) -> 'T -> matrix -> 'T
- Fold the given function over all elements of a matrix -
val foldByCol :
-  ('T -> float -> 'T) -> RowVector<'T> -> matrix -> RowVector<'T>
- Fold the given function down each column of a matrix -
val foldByRow :
-  ('T -> float -> 'T) -> Vector<'T> -> matrix -> Vector<'T>
- Fold the given function along each row of a matrix -
val foldCol : ('T -> float -> 'T) -> 'T -> matrix -> int -> 'T
- Fold the given function along a particular column of a matrix -
val foldi : (int -> int -> 'T -> float -> 'T) -> 'T -> matrix -> 'T
- Fold the given function over all elements of a matrix -
val foldRow : ('T -> float -> 'T) -> 'T -> matrix -> int -> 'T
- Fold the given function down a particular row of a matrix -
val forall : (float -> bool) -> matrix -> bool
- Check if a predicate holds for all elements of a matrix -
val foralli : (int -> int -> float -> bool) -> matrix -> bool
- Check if a predicate holds for all elements of a matrix -
val get : matrix -> int -> int -> float
- Get an element of a matrix -
val identity : int -> matrix
- Create a square matrix with the constant 1.0 lying on diagonal -
val init : int -> int -> (int -> int -> float) -> matrix
val initDense : int -> int -> seq<int * int * float> -> matrix
- Create a dense representation matrix with the given entries. -
val initDiagonal : vector -> matrix
- Create a square matrix with the given vector lying on diagonal -
val initSparse : int -> int -> seq<int * int * float> -> matrix
- Create a sparse representation matrix with the given entries. Not all - operations are available for sparse matrices, and mutation is not permitted. - If an operation on sparse matrices raises a runtime exception then consider - converting to a dense matrix using to_dense. -
val inplace_add : matrix -> matrix -> unit
- In-place addition mutates first matrix argument. -
val inplace_sub : matrix -> matrix -> unit
- In-place subtraction mutates first matrix argument. -
val map : (float -> float) -> matrix -> matrix
- Map the given function over each element of the matrix, producing a new matrix -
val mapi : (int -> int -> float -> float) -> matrix -> matrix
- Map the given indexed function over each element of the matrix, producing a new matrix -
val norm : matrix -> float
-sqrt(sum(x*x)) of all the elements of a matrix -
val of_array2 : float [,] -> matrix
val of_list : float list list -> matrix
val of_rowvec : rowvec -> matrix
val of_scalar : float -> matrix
val of_seq : seq<#seq<float>> -> matrix
val of_vector : vector -> matrix
val prod : matrix -> float
-Multiply all the elements of the matrix -
val randomize : matrix -> matrix
-Generate a new matrix of the same size as the input with random entries -drawn from the range 0..aij. Random numbers are generated using a globally -shared System.Random instance with the initial seed 99. -
val set : matrix -> int -> int -> float -> unit
- Set an element of a matrix -
val sum : matrix -> float
-Sum all the elements of a matrix -
val to_array2 : matrix -> float [,]
val to_dense : matrix -> matrix
- Ensure that a matrix uses dense representation. See init_sparse -
val to_rowvec : matrix -> rowvec
val to_scalar : matrix -> float
val to_vector : matrix -> vector
val trace : matrix -> float
- Sum of the diagonal elements of the matrix -
val transpose : matrix -> matrix
-Transpose of a matrix. Use also m.Transpose -
val zero : int -> int -> matrix
- Create a matrix with all entries zero -
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Measure.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Measure.html deleted file mode 100644 index cfeb2499..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Measure.html +++ /dev/null @@ -1,28 +0,0 @@ -Microsoft.FSharp.Math.Measure -
-
-

[Home] Module Microsoft.FSharp.Math.Measure


-
-
- - - -
-

Values

- - - - - - - -
ValueDescription
val infinity<[] 'u> : float<'u>
val infinityf<[] 'u> : float32<'u>
val nan<[] 'u> : float<'u>
val nanf<[] 'u> : float32<'u>
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.PhysicalConstants.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.PhysicalConstants.html deleted file mode 100644 index 37995b8c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.PhysicalConstants.html +++ /dev/null @@ -1,106 +0,0 @@ -Microsoft.FSharp.Math.PhysicalConstants -
-
-

[Home] Module Microsoft.FSharp.Math.PhysicalConstants


-
-
- - - -
- Fundamental physical constants, with units-of-measure - -

Values

- - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
[<LiteralAttribute ()>]
-val alpha : float
- Fine-structure constant -
[<LiteralAttribute ()>]
-val c : float<m/s>
- speed of light in vacuum -
[<LiteralAttribute ()>]
-val e : float<C>
- Elementary charge -
[<LiteralAttribute ()>]
-val epsilon0 : float<F/m>
- electric constant = 1/(mu0 c^2) -
[<LiteralAttribute ()>]
-val eV : float<J>
- Electron volt -
[<LiteralAttribute ()>]
-val F : float<C/mol>
- Faraday constant -
[<LiteralAttribute ()>]
-val G : float<m ^ 3/(kg s ^ 2)>
- Newtonian constant of gravitation -
[<LiteralAttribute ()>]
-val G0 : float<S>
- Conductance quantum 2e^2/h -
[<LiteralAttribute ()>]
-val h : float<J s>
- Planck constant -
[<LiteralAttribute ()>]
-val hbar : float<J s>
- Dirac constant, also known as the reduced Planck constant = h/2pi -
[<LiteralAttribute ()>]
-val k : float<J/K>
- Boltzmann constant R/N_A -
[<LiteralAttribute ()>]
-val m_e : float<kg>
- Electron mass -
[<LiteralAttribute ()>]
-val m_p : float<kg>
- Proton mass -
[<LiteralAttribute ()>]
-val mu0 : float<N/A ^ 2>
- magnetic constant -
[<LiteralAttribute ()>]
-val N_A : float</mol>
- Avogadro constant -
[<LiteralAttribute ()>]
-val Phi0 : float<Wb>
- Magnetic flux quantum h/2e -
[<LiteralAttribute ()>]
-val R : float<J/(K mol)>
- Molar gas constant -
[<LiteralAttribute ()>]
-val R_inf : float</m>
- Rydberg constant -
[<LiteralAttribute ()>]
-val sigma : float<W/(K ^ 4 m ^ 2)>
- Stefan-Boltzmann constant -
[<LiteralAttribute ()>]
-val u : float<kg>
- Unified atomic mass unit -
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.RowVector.Generic.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.RowVector.Generic.html deleted file mode 100644 index adea2717..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.RowVector.Generic.html +++ /dev/null @@ -1,61 +0,0 @@ -Microsoft.FSharp.Math.RowVector.Generic -
-
-

[Home] Module Microsoft.FSharp.Math.RowVector.Generic


-
-
- - - -
- Operations to manipulate row vectors types carrying - arbitrary element types. - -

Values

- - - - - - - - - - - - - - - -
ValueDescription
val copy : RowVector<'T> -> RowVector<'T>
val create : int -> 'T -> RowVector<'T>
- Create by constant initialization -
val get : RowVector<'T> -> int -> 'T
- Get an element from a column vector. -
val init : int -> (int -> 'T) -> RowVector<'T>
- Create by comprehension -
val length : RowVector<'T> -> int
- Get the number of rows in a column vector. -
val of_array : 'T [] -> RowVector<'T>
- Create a row vector from an array of elements -
val of_list : 'T list -> RowVector<'T>
- Create a row vector from a list of elements -
val of_seq : seq<'T> -> RowVector<'T>
- Create a row vector from a sequence of elements -
val set : RowVector<'T> -> int -> 'T -> unit
- Set an element in a column vector. -
val to_array : RowVector<'T> -> 'T []
- Return a new array containing a copy of the elements of the given vector -
val transpose : RowVector<'T> -> Vector<'T>
- Transpose the row vector -
val zero : int -> RowVector<'T>
- Return a vector of the given length where every entry is zero. -
-
-
-

See Also

-Microsoft.FSharp.Math.RowVector
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.RowVector.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.RowVector.html deleted file mode 100644 index 1f3f5362..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.RowVector.html +++ /dev/null @@ -1,68 +0,0 @@ -Microsoft.FSharp.Math.RowVector -
-
-

[Home] Module Microsoft.FSharp.Math.RowVector


-
-
- - - -
- Operations to manipulate floating - point row vectors. These are included for completeness and are - nearly always transposed to column vectors. - -

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - -
ModuleDescription
Microsoft.FSharp.Math.RowVector.Generic - Operations to manipulate row vectors types carrying - arbitrary element types. -
-
-

Values

- - - - - - - - - - - - - - - -
ValueDescription
val copy : rowvec -> rowvec
val create : int -> float -> rowvec
- Create by constant initialization -
val get : rowvec -> int -> float
- Get an element of a column vector -
val init : int -> (int -> float) -> rowvec
- Create by comprehension -
val length : rowvec -> int
- Get the dimensions (number of rows) of a column rowvec. -
val of_array : float array -> rowvec
- Create a vector from an array of double precision floats -
val of_list : float list -> rowvec
- Create a vector from a list of numbers -
val of_seq : seq<float> -> rowvec
val set : rowvec -> int -> float -> unit
- Set an element of a column rowvec -
val to_array : rowvec -> float array
- Return a new array containing a copy of the elements of the given vector -
val transpose : rowvec -> vector
val zero : int -> rowvec
- Return a vector of the given length where every entry is zero. -
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.html deleted file mode 100644 index d21b5f41..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.html +++ /dev/null @@ -1,104 +0,0 @@ -Microsoft.FSharp.Math.SI -
-
-

[Home] Module Microsoft.FSharp.Math.SI


-
-
- - - -
- The International System of Units (SI) - -

Type Definitions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
type A - ampere, SI unit of electric current -
type Bq - becquerel, SI unit of activity referred to a radionuclide - Note: an abbreviation for /s
type C - coulomb, SI unit of electric charge, amount of electricity - Note: an abbreviation for A s
type cd - candela, SI unit of luminous intensity -
type F - farad, SI unit of capacitance - Note: an abbreviation for C/V
type Gy - gray, SI unit of absorbed dose - Note: an abbreviation for J/kg
type H - henry, SI unit of inductance - Note: an abbreviation for Wb/A
type Hz - hertz, SI unit of frequency - Note: an abbreviation for /s
type J - joule, SI unit of energy, work, amount of heat - Note: an abbreviation for N m
type K - kelvin, SI unit of thermodynamic temperature -
type kat - katal, SI unit of catalytic activity - Note: an abbreviation for mol/s
type kg - kilogram, SI unit of mass -
type lm - lumen, SI unit of luminous flux - Note: an abbreviation for cd
type lx - lux, SI unit of illuminance - Note: an abbreviation for lm/m ^ 2
type m - metre (or meter), SI unit of length -
type mol - mole, SI unit of amount of substance -
type N - newton, SI unit of force - Note: an abbreviation for kg m/s ^ 2
type ohm - ohm, SI unit of electric resistance - Note: an abbreviation for V/A
type Pa - pascal, SI unit of pressure, stress - Note: an abbreviation for N/m ^ 2
type s - second, SI unit of time -
type S - siemens, SI unit of electric conductance - Note: an abbreviation for A/V
type Sv - sievert, SI unit of does equivalent - Note: an abbreviation for J/kg
type T - tesla, SI unit of magnetic flux density - Note: an abbreviation for Wb/m ^ 2
type V - volt, SI unit of electric potential difference, electromotive force - Note: an abbreviation for W/A
type W - watt, SI unit of power, radiant flux - Note: an abbreviation for J/s
type Wb - weber, SI unit of magnetic flux - Note: an abbreviation for V s
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_A.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_A.html deleted file mode 100644 index 3ac484dd..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_A.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.A -
-
-

[Home] Type Microsoft.FSharp.Math.SI.A


-
-
- - - -
- ampere, SI unit of electric current - -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type A
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Bq.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Bq.html deleted file mode 100644 index 9276fb21..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Bq.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.Bq -
-
-

[Home] Type Microsoft.FSharp.Math.SI.Bq


-
-
- - - -
- becquerel, SI unit of activity referred to a radionuclide - Note: an abbreviation for /s -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type Bq =/s
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_C.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_C.html deleted file mode 100644 index ba6988ec..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_C.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.C -
-
-

[Home] Type Microsoft.FSharp.Math.SI.C


-
-
- - - -
- coulomb, SI unit of electric charge, amount of electricity - Note: an abbreviation for A s -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type C = A s
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_F.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_F.html deleted file mode 100644 index 312e6fd7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_F.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.F -
-
-

[Home] Type Microsoft.FSharp.Math.SI.F


-
-
- - - -
- farad, SI unit of capacitance - Note: an abbreviation for C/V -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type F = C/V
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Gy.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Gy.html deleted file mode 100644 index 2256effa..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Gy.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.Gy -
-
-

[Home] Type Microsoft.FSharp.Math.SI.Gy


-
-
- - - -
- gray, SI unit of absorbed dose - Note: an abbreviation for J/kg -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type Gy = J/kg
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_H.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_H.html deleted file mode 100644 index e0961e90..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_H.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.H -
-
-

[Home] Type Microsoft.FSharp.Math.SI.H


-
-
- - - -
- henry, SI unit of inductance - Note: an abbreviation for Wb/A -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type H = Wb/A
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Hz.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Hz.html deleted file mode 100644 index c217bf0f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Hz.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.Hz -
-
-

[Home] Type Microsoft.FSharp.Math.SI.Hz


-
-
- - - -
- hertz, SI unit of frequency - Note: an abbreviation for /s -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type Hz =/s
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_J.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_J.html deleted file mode 100644 index 21f117f7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_J.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.J -
-
-

[Home] Type Microsoft.FSharp.Math.SI.J


-
-
- - - -
- joule, SI unit of energy, work, amount of heat - Note: an abbreviation for N m -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type J = N m
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_K.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_K.html deleted file mode 100644 index 26bce352..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_K.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.K -
-
-

[Home] Type Microsoft.FSharp.Math.SI.K


-
-
- - - -
- kelvin, SI unit of thermodynamic temperature - -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type K
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_N.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_N.html deleted file mode 100644 index 40ce397e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_N.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.N -
-
-

[Home] Type Microsoft.FSharp.Math.SI.N


-
-
- - - -
- newton, SI unit of force - Note: an abbreviation for kg m/s ^ 2 -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type N = kg m/s ^ 2
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Pa.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Pa.html deleted file mode 100644 index b8b25602..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Pa.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.Pa -
-
-

[Home] Type Microsoft.FSharp.Math.SI.Pa


-
-
- - - -
- pascal, SI unit of pressure, stress - Note: an abbreviation for N/m ^ 2 -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type Pa = N/m ^ 2
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_S.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_S.html deleted file mode 100644 index b9031d7c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_S.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.S -
-
-

[Home] Type Microsoft.FSharp.Math.SI.S


-
-
- - - -
- siemens, SI unit of electric conductance - Note: an abbreviation for A/V -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type S = A/V
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Sv.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Sv.html deleted file mode 100644 index fafa5d1d..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Sv.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.Sv -
-
-

[Home] Type Microsoft.FSharp.Math.SI.Sv


-
-
- - - -
- sievert, SI unit of does equivalent - Note: an abbreviation for J/kg -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type Sv = J/kg
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_T.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_T.html deleted file mode 100644 index 33152b9c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_T.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.T -
-
-

[Home] Type Microsoft.FSharp.Math.SI.T


-
-
- - - -
- tesla, SI unit of magnetic flux density - Note: an abbreviation for Wb/m ^ 2 -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type T = Wb/m ^ 2
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_V.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_V.html deleted file mode 100644 index 2786dba9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_V.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.V -
-
-

[Home] Type Microsoft.FSharp.Math.SI.V


-
-
- - - -
- volt, SI unit of electric potential difference, electromotive force - Note: an abbreviation for W/A -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type V = W/A
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_W.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_W.html deleted file mode 100644 index f1b7de71..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_W.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.W -
-
-

[Home] Type Microsoft.FSharp.Math.SI.W


-
-
- - - -
- watt, SI unit of power, radiant flux - Note: an abbreviation for J/s -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type W = J/s
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Wb.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Wb.html deleted file mode 100644 index a3054ca9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type_Wb.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.Wb -
-
-

[Home] Type Microsoft.FSharp.Math.SI.Wb


-
-
- - - -
- weber, SI unit of magnetic flux - Note: an abbreviation for V s -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type Wb = V s
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__cd.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__cd.html deleted file mode 100644 index 807a47be..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__cd.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.cd -
-
-

[Home] Type Microsoft.FSharp.Math.SI.cd


-
-
- - - -
- candela, SI unit of luminous intensity - -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type cd
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__kat.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__kat.html deleted file mode 100644 index 8f22d758..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__kat.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.kat -
-
-

[Home] Type Microsoft.FSharp.Math.SI.kat


-
-
- - - -
- katal, SI unit of catalytic activity - Note: an abbreviation for mol/s -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type kat = mol/s
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__kg.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__kg.html deleted file mode 100644 index 59fa7229..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__kg.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.kg -
-
-

[Home] Type Microsoft.FSharp.Math.SI.kg


-
-
- - - -
- kilogram, SI unit of mass - -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type kg
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__lm.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__lm.html deleted file mode 100644 index db975ec9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__lm.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.lm -
-
-

[Home] Type Microsoft.FSharp.Math.SI.lm


-
-
- - - -
- lumen, SI unit of luminous flux - Note: an abbreviation for cd -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type lm = cd
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__lx.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__lx.html deleted file mode 100644 index d618d30a..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__lx.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.lx -
-
-

[Home] Type Microsoft.FSharp.Math.SI.lx


-
-
- - - -
- lux, SI unit of illuminance - Note: an abbreviation for lm/m ^ 2 -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type lx = lm/m ^ 2
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__m.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__m.html deleted file mode 100644 index 5fe558ca..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__m.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.m -
-
-

[Home] Type Microsoft.FSharp.Math.SI.m


-
-
- - - -
- metre (or meter), SI unit of length - -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type m
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__mol.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__mol.html deleted file mode 100644 index 7c3b5158..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__mol.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.mol -
-
-

[Home] Type Microsoft.FSharp.Math.SI.mol


-
-
- - - -
- mole, SI unit of amount of substance - -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type mol
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__ohm.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__ohm.html deleted file mode 100644 index 30c80465..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__ohm.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.ohm -
-
-

[Home] Type Microsoft.FSharp.Math.SI.ohm


-
-
- - - -
- ohm, SI unit of electric resistance - Note: an abbreviation for V/A -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type ohm = V/A
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__s.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__s.html deleted file mode 100644 index 068aadc0..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.SI.type__s.html +++ /dev/null @@ -1,23 +0,0 @@ -Microsoft.FSharp.Math.SI.s -
-
-

[Home] Type Microsoft.FSharp.Math.SI.s


-
-
- - - -
- second, SI unit of time - -

Full Type Signature

-
[<MeasureAttribute ()>]
-[] type s
-
-

See Also

-Microsoft.FSharp.Math.SI
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Vector.Generic.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Vector.Generic.html deleted file mode 100644 index bbd1e028..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Vector.Generic.html +++ /dev/null @@ -1,94 +0,0 @@ -Microsoft.FSharp.Math.Vector.Generic -
-
-

[Home] Module Microsoft.FSharp.Math.Vector.Generic


-
-
- - - -
- Operations to manipulate column vectors carrying - arbitrary element types. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val copy : Vector<'T> -> Vector<'T>
val cptMax : Vector<'T> -> Vector<'T> -> Vector<'T>
-Take the pointwise maximum of two vectors -
val cptMin : Vector<'T> -> Vector<'T> -> Vector<'T>
-Take the pointwise minimum of two vectors -
val create : int -> 'T -> Vector<'T>
- Generate a vector of the given length where each entry contains the given value -
val dot : Vector<'T> -> Vector<'T> -> 'T
-Dot product -
val exists : ('T -> bool) -> Vector<'T> -> bool
val existsi : (int -> 'T -> bool) -> Vector<'T> -> bool
val fold : ('State -> 'T -> 'State) -> 'State -> Vector<'T> -> 'State
val foldi :
-  (int -> 'State -> 'T -> 'State) -> 'State -> Vector<'T> -> 'State
val forall : ('T -> bool) -> Vector<'T> -> bool
val foralli : (int -> 'T -> bool) -> Vector<'T> -> bool
val get : Vector<'T> -> int -> 'T
- Get an element of a column vector -
val init : int -> (int -> 'T) -> Vector<'T>
- Creation: general -
val initNumeric : int -> (INumeric<'T> -> int -> 'T) -> Vector<'T>
- Creation: useful when the element type has associated operations. -
val length : Vector<'T> -> int
- Get the dimensions (number of rows) of a column vector. Identical to nrows -
val map : ('T -> 'T) -> Vector<'T> -> Vector<'T>
val mapi : (int -> 'T -> 'T) -> Vector<'T> -> Vector<'T>
val norm : Vector<'T> -> float
- Computes the 2-norm of a vector: sqrt(x.Transpose*x). -
val of_array : 'T [] -> Vector<'T>
- Create a vector from an array of elements -
val of_list : 'T list -> Vector<'T>
- Create a vector from a list of numbers -
val of_scalar : 'T -> Vector<'T>
- Create a 1-element vector -
val of_seq : seq<'T> -> Vector<'T>
- Create a vector from a sequence of numbers -
val prod : Vector<'T> -> 'T
-Multiply all the elements of the matrix -
val set : Vector<'T> -> int -> 'T -> unit
- Set an element of a column vector -
val sum : Vector<'T> -> 'T
-Sum all the elements of a vector -
val to_array : Vector<'T> -> 'T []
- Return a new array containing a copy of the elements of the given vector -
val transpose : Vector<'T> -> RowVector<'T>
-Transpose of a matrix. Use also m.Transpose -
val zero : int -> Vector<'T>
- Return a vector of the given length where every entry is zero. -
-
-
-

See Also

-Microsoft.FSharp.Math.Vector
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Vector.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Vector.html deleted file mode 100644 index fd07fb20..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.Vector.html +++ /dev/null @@ -1,103 +0,0 @@ -Microsoft.FSharp.Math.Vector -
-
-

[Home] Module Microsoft.FSharp.Math.Vector


-
-
- - - -
- Operations to manipulate floating - point column vectors. The submodule VectorOps.Generic contains a - matching set of operations to manipulate column vectors carrying - arbitrary element types. - -

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - -
ModuleDescription
Microsoft.FSharp.Math.Vector.Generic - Operations to manipulate column vectors carrying - arbitrary element types. -
-
-

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val copy : vector -> vector
val cptPow : vector -> float -> vector
-Pointwise exponential of a vector. -
val create : int -> float -> vector
- Generate a vector of the given length where each entry contains the given value -
val dot : vector -> vector -> float
-Dot product -
val exists : (float -> bool) -> vector -> bool
val existsi : (int -> float -> bool) -> vector -> bool
val fold : ('T -> float -> 'T) -> 'T -> vector -> 'T
val foldi : (int -> 'T -> float -> 'T) -> 'T -> vector -> 'T
val forall : (float -> bool) -> vector -> bool
val foralli : (int -> float -> bool) -> vector -> bool
val get : vector -> int -> float
- Get an element of a column vector -
val init : int -> (int -> float) -> vector
val length : vector -> int
- Get the dimensions (number of rows) of a column vector. Identical to nrows -
val map : (float -> float) -> vector -> vector
val mapi : (int -> float -> float) -> vector -> vector
val norm : vector -> float
- Computes the 2-norm of a vector: sqrt(x.Transpose*x). -
val of_array : float array -> vector
- Create a vector from an array of double precision floats -
val of_list : float list -> vector
- Create a vector from a list of numbers -
val of_scalar : float -> vector
- Create a 1-element vector -
val of_seq : seq<float> -> vector
val prod : vector -> float
-Multiply all the elements of the matrix -
val range : int -> int -> vector
- Create a vector that represents a integral mesh over the given range - e.g. range 1 5 = vector [ 1.;2.;3.;4.;5. ] -
val rangef : float -> float -> float -> vector
- Create a vector that represents a mesh over the given range - e.g. rangef (-1.0) 0.5 1.0 = vector [ -1.0; -0.5; 0.0; 0.5; 1.0] -
val set : vector -> int -> float -> unit
- Set an element of a column vector -
val sum : vector -> float
-Sum all the elements of a vector -
val to_array : vector -> float array
- Return a new array containing a copy of the elements of the given vector -
val transpose : vector -> rowvec
-Transpose of a matrix. Use also m.Transpose -
val zero : int -> vector
- Return a vector of the given length where every entry is zero. -
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.html deleted file mode 100644 index 9810fa85..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.html +++ /dev/null @@ -1,106 +0,0 @@ -Microsoft.FSharp.Math -
-
-

[Home] Namespace Microsoft.FSharp.Math


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - - - - - - - - - -
ModuleDescription
Microsoft.FSharp.Math.Complex
Microsoft.FSharp.Math.GlobalAssociations - Associations are a way of associating dictionaries of - operations with given types at runtime. Associations are global to a - .NET application domain. Once specified an association may not be deleted - or modified. - - In this release the system of associations is simply - limited to a registry of types that support dictionaries (i.e. interface objects) - of numeric operations. The following types are pre-registered with associated numeric - operations: float, int32, int64, bigint, float32, Complex, bignum. Other types must be - registered explicitly by user code. - -
Microsoft.FSharp.Math.Instances
Microsoft.FSharp.Math.Matrix - Operations to manipulate floating - point matrices. The submodule Matrix.Generic contains a - matching set of operations to manipulate matrix types carrying - arbitrary element types. -
Microsoft.FSharp.Math.Measure
Microsoft.FSharp.Math.PhysicalConstants - Fundamental physical constants, with units-of-measure -
Microsoft.FSharp.Math.RowVector - Operations to manipulate floating - point row vectors. These are included for completeness and are - nearly always transposed to column vectors. -
Microsoft.FSharp.Math.SI - The International System of Units (SI) -
Microsoft.FSharp.Math.Vector - Operations to manipulate floating - point column vectors. The submodule VectorOps.Generic contains a - matching set of operations to manipulate column vectors carrying - arbitrary element types. -
-
-

Type Definitions

- - - - - - - - - - - - - - - - - - - - -
TypeDescription
type bignum Note: an abbreviation for BigNum
type BigNum - The type of arbitrary-sized rational numbers -
type BigRational Note: an abbreviation for BigNum
type complex - The type of complex numbers - Note: an abbreviation for Complex
type Complex - The type of complex numbers stored as pairs of 64-bit floating point numbers in rectangular coordinates -
type IFloating
type IFractional
type IIEEE
type IIntegral
type INormFloat
type INumeric
type matrix - The type of floating point matrices - Note: an abbreviation for Matrix<float>
type Matrix - The type of matrices. The arithmetic operations on the element type are determined by inspection on the element type itself. - Two representations are supported: sparse and dense. -
type rowvec - The type of floating point row vectors - Note: an abbreviation for RowVector<float>
type RowVector - The type of row vectors. -
type vector - The type of floating point column vectors - Note: an abbreviation for Vector<float>
type Vector - The type of column vectors. The arithmetic operations on the element type are determined by inspection - on the element type itself -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_BigNum.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_BigNum.html deleted file mode 100644 index a89c9789..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_BigNum.html +++ /dev/null @@ -1,150 +0,0 @@ -Microsoft.FSharp.Math.BigNum -
-
-

[Home] Type Microsoft.FSharp.Math.BigNum


-
-
- - - -
- The type of arbitrary-sized rational numbers - -

Full Type Signature

-
[<SealedAttribute ()>]
-type BigNum
-with
-  interface IComparable
-  override GetHashCode : unit -> int
-  override ToString : unit -> string
-  member Denominator : bigint
-  member IsNegative : bool
-  member IsPositive : bool
-  member Numerator : bigint
-  member Sign : int
-  static member Abs : BigNum -> BigNum
-  static member FromBigInt : bigint -> BigNum
-  static member FromInt : int -> BigNum
-  static member Parse : string -> BigNum
-  static member PowN : BigNum * int -> BigNum
-  static member ToBigInt : BigNum -> bigint
-  static member ToDouble : BigNum -> float
-  static member ToInt32 : BigNum -> int
-  static member One : BigNum
-  static member Zero : BigNum
-  static member ( + ) : BigNum * BigNum -> BigNum
-  static member ( / ) : BigNum * BigNum -> BigNum
-  static member ( = ) : BigNum * BigNum -> bool
-  static member ( > ) : BigNum * BigNum -> bool
-  static member ( >= ) : BigNum * BigNum -> bool
-  static member op_Inequality : BigNum * BigNum -> bool
-  static member ( < ) : BigNum * BigNum -> bool
-  static member ( <= ) : BigNum * BigNum -> bool
-  static member ( * ) : BigNum * BigNum -> BigNum
-  static member ( - ) : BigNum * BigNum -> BigNum
-  static member ( ~- ) : BigNum -> BigNum
-  static member ( ~+ ) : BigNum -> BigNum
-end
-

Instance Members

- - - - - - - - - - -
MemberDescription
member Denominator : bigint
- Return the denominator of the normalized rational number -
override GetHashCode : unit -> int
member IsNegative : bool
- Return a boolean indicating if this rational number is strictly negative -
member IsPositive : bool
- Return a boolean indicating if this rational number is strictly positive -
member Numerator : bigint
- Return the numerator of the normalized rational number -
member Sign : int
- Return the sign of a rational number; 0, +1 or -1 -
override ToString : unit -> string
-
-

Static Members

- - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member ( * ) : BigNum * BigNum -> BigNum
- Return the product of two rational numbers -
member ( + ) : BigNum * BigNum -> BigNum
- Return the sum of two rational numbers -
member ( - ) : BigNum * BigNum -> BigNum
- Return the difference of two rational numbers -
member ( / ) : BigNum * BigNum -> BigNum
- Return the ratio of two rational numbers -
member ( < ) : BigNum * BigNum -> bool
- This operator is for use from other .NET languages -
member ( <= ) : BigNum * BigNum -> bool
- This operator is for use from other .NET languages -
member ( = ) : BigNum * BigNum -> bool
- This operator is for use from other .NET languages -
member ( > ) : BigNum * BigNum -> bool
- This operator is for use from other .NET languages -
member ( >= ) : BigNum * BigNum -> bool
- This operator is for use from other .NET languages -
member ( ~+ ) : BigNum -> BigNum
- Return the given rational number -
member ( ~- ) : BigNum -> BigNum
- Return the negation of a rational number -
member Abs : BigNum -> BigNum
- Return the absolute value of a rational number -
member FromBigInt : bigint -> BigNum
- Return the result of converting the given big integer to a rational number -
member FromInt : int -> BigNum
- Return the result of converting the given integer to a rational number -
member One : BigNum
- Get one as a rational number -
member op_Inequality : BigNum * BigNum -> bool
- This operator is for use from other .NET languages -
member Parse : string -> BigNum
- Return the result of converting the string to a rational number -
member PowN : BigNum * int -> BigNum
- Return the result of raising the given rational number to the given power -
member ToBigInt : BigNum -> bigint
- Return the result of converting the given rational number to a big integer -
member ToDouble : BigNum -> float
- Return the result of converting the given rational number to a floating point number -
member ToInt32 : BigNum -> int
- Return the result of converting the given rational number to an integer -
member Zero : BigNum
- Get zero as a rational number -
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_BigRational.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_BigRational.html deleted file mode 100644 index 66f145f4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_BigRational.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Math.BigRational -
-
-

[Home] Type Microsoft.FSharp.Math.BigRational


-
-
- - - -
Note: an abbreviation for BigNum -

Full Type Signature

-
type BigRational = BigNum
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_Complex.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_Complex.html deleted file mode 100644 index 0597c07e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_Complex.html +++ /dev/null @@ -1,139 +0,0 @@ -Microsoft.FSharp.Math.Complex -
-
-

[Home] Type Microsoft.FSharp.Math.Complex


-
-
- - - -
- The type of complex numbers stored as pairs of 64-bit floating point numbers in rectangular coordinates - -

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type Complex =
-  struct
-    interface IComparable
-    override Equals : obj -> bool
-    override ToString : unit -> string
-    member ToString : format:string -> string
-    member ToString : format:string * provider:IFormatProvider -> string
-    member Conjugate : Complex
-    member ImaginaryPart : float
-    member Magnitude : float
-    member Phase : float
-    member RealPart : float
-    member i : float
-    member r : float
-    static member Abs : Complex -> float
-    static member Cos : Complex -> Complex
-    static member Create : float * float -> Complex
-    static member CreatePolar : float * float -> Complex
-    static member Exp : Complex -> Complex
-    static member Log : Complex -> Complex
-    static member Sin : Complex -> Complex
-    static member Sqrt : Complex -> Complex
-    static member Tan : Complex -> Complex
-    static member One : Complex
-    static member OneI : Complex
-    static member Zero : Complex
-    static member ( + ) : Complex * Complex -> Complex
-    static member ( / ) : Complex * Complex -> Complex
-    static member ( * ) : Complex * Complex -> Complex
-    static member ( * ) : Complex * float -> Complex
-    static member ( * ) : float * Complex -> Complex
-    static member ( - ) : Complex * Complex -> Complex
-    static member ( ~- ) : Complex -> Complex
-  end
-

Instance Members

- - - - - - - - - - - - - - -
MemberDescription
member Conjugate : Complex
- The conjugate of a complex number, i.e. x-yi -
override Equals : obj -> bool
member i : float
- The imaginary part of a complex number -
member ImaginaryPart : float
- The imaginary part of a complex number -
member Magnitude : float
- The polar-coordinate magnitude of a complex number -
member Phase : float
- The polar-coordinate phase of a complex number -
member r : float
- The real part of a complex number -
member RealPart : float
- The real part of a complex number -
member ToString : format:string * provider:IFormatProvider -> string
member ToString : format:string -> string
override ToString : unit -> string
-
-

Static Members

- - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member ( * ) : Complex * float -> Complex
- Multiply a complex number by a scalar -
member ( * ) : float * Complex -> Complex
- Multiply a scalar by a complex number -
member ( * ) : Complex * Complex -> Complex
- Multiply two complex numbers -
member ( + ) : Complex * Complex -> Complex
- Add two complex numbers -
member ( - ) : Complex * Complex -> Complex
- Subtract one complex number from another -
member ( / ) : Complex * Complex -> Complex
- Complex division of two complex numbers -
member ( ~- ) : Complex -> Complex
- Unary negation of a complex number -
member Abs : Complex -> float
- Computes the absolute value of a complex number: e.g. Abs x+iy = sqrt(x**2.0 + y**2.0.) - Note: Complex.Abs(z) is the same as z.Magnitude -
member Cos : Complex -> Complex
member Create : float * float -> Complex
- Create a complex number x+ij using rectangular coordinates -
member CreatePolar : float * float -> Complex
- Create a complex number using magnitude/phase polar coordinates -
member Exp : Complex -> Complex
member Log : Complex -> Complex
member One : Complex
- The complex number 1+0i -
member OneI : Complex
- The complex number 0+1i -
member Sin : Complex -> Complex
member Sqrt : Complex -> Complex
member Tan : Complex -> Complex
member Zero : Complex
- The complex number 0+0i -
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IFloating-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IFloating-1.html deleted file mode 100644 index 172e693b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IFloating-1.html +++ /dev/null @@ -1,59 +0,0 @@ -Microsoft.FSharp.Math.IFloating -
-
-

[Home] Type Microsoft.FSharp.Math.IFloating


-
-
- - - -
-

Full Type Signature

-
type IFloating<'a> =
-  interface
-    inherit IFractional<'a>
-    abstract member Acos : 'a -> 'a
-    abstract member Asin : 'a -> 'a
-    abstract member Atan : 'a -> 'a
-    abstract member Atan2 : 'a * 'a -> 'a
-    abstract member Cos : 'a -> 'a
-    abstract member Cosh : 'a -> 'a
-    abstract member Exp : 'a -> 'a
-    abstract member Log : 'a -> 'a
-    abstract member LogN : 'a * 'a -> 'a
-    abstract member Sin : 'a -> 'a
-    abstract member Sinh : 'a -> 'a
-    abstract member Sqrt : 'a -> 'a
-    abstract member Tan : 'a -> 'a
-    abstract member Tanh : 'a -> 'a
-    abstract member Pi : 'a
-  end
-

Instance Members

- - - - - - - - - - - - - - - - - - -
MemberDescription
member Acos : 'a -> 'a
member Asin : 'a -> 'a
member Atan : 'a -> 'a
member Atan2 : 'a * 'a -> 'a
member Cos : 'a -> 'a
member Cosh : 'a -> 'a
member Exp : 'a -> 'a
member Log : 'a -> 'a
member LogN : 'a * 'a -> 'a
member Pi : 'a
member Sin : 'a -> 'a
member Sinh : 'a -> 'a
member Sqrt : 'a -> 'a
member Tan : 'a -> 'a
member Tanh : 'a -> 'a
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IFractional-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IFractional-1.html deleted file mode 100644 index ee89d6c6..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IFractional-1.html +++ /dev/null @@ -1,33 +0,0 @@ -Microsoft.FSharp.Math.IFractional -
-
-

[Home] Type Microsoft.FSharp.Math.IFractional


-
-
- - - -
-

Full Type Signature

-
type IFractional<'a> =
-  interface
-    inherit INumeric<'a>
-    abstract member Divide : 'a * 'a -> 'a
-    abstract member Reciprocal : 'a -> 'a
-  end
-

Instance Members

- - - - - -
MemberDescription
member Divide : 'a * 'a -> 'a
member Reciprocal : 'a -> 'a
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IIEEE-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IIEEE-1.html deleted file mode 100644 index bc1a309e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IIEEE-1.html +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft.FSharp.Math.IIEEE -
-
-

[Home] Type Microsoft.FSharp.Math.IIEEE


-
-
- - - -
-

Full Type Signature

-
type IIEEE<'a> =
-  interface
-    inherit IFloating<'a>
-    abstract member IsInfinite : 'a -> bool
-    abstract member IsNaN : 'a -> bool
-    abstract member EpsilonOne : 'a
-    abstract member NaN : 'a
-    abstract member NegativeInfinity : 'a
-    abstract member PositiveInfinity : 'a
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
member EpsilonOne : 'a
member IsInfinite : 'a -> bool
member IsNaN : 'a -> bool
member NaN : 'a
member NegativeInfinity : 'a
member PositiveInfinity : 'a
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IIntegral-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IIntegral-1.html deleted file mode 100644 index ca862f37..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_IIntegral-1.html +++ /dev/null @@ -1,39 +0,0 @@ -Microsoft.FSharp.Math.IIntegral -
-
-

[Home] Type Microsoft.FSharp.Math.IIntegral


-
-
- - - -
-

Full Type Signature

-
type IIntegral<'a> =
-  interface
-    inherit INumeric<'a>
-    abstract member DivRem : 'a * 'a -> 'a * 'a
-    abstract member Divide : 'a * 'a -> 'a
-    abstract member Modulus : 'a * 'a -> 'a
-    abstract member OfBigInt : bigint -> 'a
-    abstract member ToBigInt : 'a -> bigint
-  end
-

Instance Members

- - - - - - - - -
MemberDescription
member Divide : 'a * 'a -> 'a
member DivRem : 'a * 'a -> 'a * 'a
member Modulus : 'a * 'a -> 'a
member OfBigInt : bigint -> 'a
member ToBigInt : 'a -> bigint
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_INormFloat-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_INormFloat-1.html deleted file mode 100644 index 86f0837f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_INormFloat-1.html +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft.FSharp.Math.INormFloat -
-
-

[Home] Type Microsoft.FSharp.Math.INormFloat


-
-
- - - -
-

Full Type Signature

-
type INormFloat<'a> =
-  interface
-    abstract member Norm : 'a -> float
-  end
-

Instance Members

- - - - -
MemberDescription
member Norm : 'a -> float
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_INumeric-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_INumeric-1.html deleted file mode 100644 index 3982adf6..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_INumeric-1.html +++ /dev/null @@ -1,48 +0,0 @@ -Microsoft.FSharp.Math.INumeric -
-
-

[Home] Type Microsoft.FSharp.Math.INumeric


-
-
- - - -
-

Full Type Signature

-
type INumeric<'a> =
-  interface
-    abstract member Abs : 'a -> 'a
-    abstract member Add : 'a * 'a -> 'a
-    abstract member Multiply : 'a * 'a -> 'a
-    abstract member Negate : 'a -> 'a
-    abstract member Parse : string * NumberStyles * IFormatProvider -> 'a
-    abstract member Sign : 'a -> int
-    abstract member Subtract : 'a * 'a -> 'a
-    abstract member ToString : 'a * string * IFormatProvider -> string
-    abstract member One : 'a
-    abstract member Zero : 'a
-  end
-

Instance Members

- - - - - - - - - - - - - -
MemberDescription
member Abs : 'a -> 'a
member Add : 'a * 'a -> 'a
member Multiply : 'a * 'a -> 'a
member Negate : 'a -> 'a
member One : 'a
member Parse : string * NumberStyles * IFormatProvider -> 'a
member Sign : 'a -> int
member Subtract : 'a * 'a -> 'a
member ToString : 'a * string * IFormatProvider -> string
member Zero : 'a
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_Matrix-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_Matrix-1.html deleted file mode 100644 index 560f5210..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_Matrix-1.html +++ /dev/null @@ -1,225 +0,0 @@ -Microsoft.FSharp.Math.Matrix -
-
-

[Home] Type Microsoft.FSharp.Math.Matrix


-
-
- - - -
- The type of matrices. The arithmetic operations on the element type are determined by inspection on the element type itself. - Two representations are supported: sparse and dense. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type Matrix<'T>
-with
-  interface IEnumerable<'T>
-  interface IStructuralEquatable
-  interface IStructuralComparable
-  interface IComparable
-  member Column : index:int -> Vector<'T>
-  member Columns : start:int * length:int -> Matrix<'T>
-  member Copy : unit -> Matrix<'T>
-  override Equals : obj -> bool
-  member GetDiagonal : int -> Vector<'T>
-  override GetHashCode : unit -> int
-  member GetSlice : start1:int option * finish1:int option * start2:int option * finish2:int option -> Matrix<'T>
-  member PermuteColumns : permutation:(int -> int) -> Matrix<'T>
-  member PermuteRows : permutation:(int -> int) -> Matrix<'T>
-  member Region : starti:int * startj:int * lengthi:int * lengthj:int -> Matrix<'T>
-  member Row : index:int -> RowVector<'T>
-  member Rows : start:int * length:int -> Matrix<'T>
-  member
-    SetSlice : start1:int option * finish1:int option * start2:int option * finish2:int option * Matrix<'T> ->
-                 unit
-  member ToArray2 : unit -> 'T [,]
-  member ToRowVector : unit -> RowVector<'T>
-  member ToVector : unit -> Vector<'T>
-  member Diagonal : Vector<'T>
-  member Dimensions : int * int
-  member ElementOps : INumeric<'T>
-  member InternalDenseValues : 'T [,]
-  member InternalSparseColumnValues : int []
-  member InternalSparseRowOffsets : int []
-  member InternalSparseValues : 'T []
-  member IsDense : bool
-  member IsSparse : bool
-  member Item : int * int -> 'T with get
-  member NonZeroEntries : seq<int * int * 'T>
-  member Norm : float
-  member NumCols : int
-  member NumRows : int
-  member Transpose : Matrix<'T>
-  member Item : int * int -> 'T with set
-  static member ( + ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
-  static member ( .* ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
-  static member ( * ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
-  static member ( * ) : Matrix<'T> * 'T -> Matrix<'T>
-  static member ( * ) : Matrix<'T> * Vector<'T> -> Vector<'T>
-  static member ( * ) : 'T * Matrix<'T> -> Matrix<'T>
-  static member ( - ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
-  static member ( ~- ) : Matrix<'T> -> Matrix<'T>
-  static member ( ~+ ) : Matrix<'T> -> Matrix<'T>
-end
-

Instance Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
member Column : index:int -> Vector<'T>
- Select a column from a matrix -
member Columns : start:int * length:int -> Matrix<'T>
- Select a range of columns from a matrix -
member Copy : unit -> Matrix<'T>
- Create a new matrix that is a copy of the given array -
member Diagonal : Vector<'T>
- Get the main diagonal of a matrix, as a vector -
member Dimensions : int * int
- Get the number of (rows,columns) in the matrix -
member ElementOps : INumeric<'T>
- Retrieve the dictionary of numeric operations associated with the element - type of this matrix. Accessing the property may raise an NotSupportedException if the element - type doesn't support any numeric operations. The object returned - may support additional numeric operations such as IFractional: - this can be determined by a dynamic type test against the object - returned. -
override Equals : obj -> bool
member GetDiagonal : int -> Vector<'T>
- Return the nth diagonal of a matrix, as a vector. Diagonal 0 is the primary - diagonal, positive diagonals are further to the upper-right of the matrix. -
override GetHashCode : unit -> int
member
-  GetSlice : start1:int option * finish1:int option * start2:int option *
-             finish2:int option -> Matrix<'T>
- Supports the slicing syntax 'A.[idx1..idx2,idx1..idx2]' -
member InternalDenseValues : 'T [,]
- Get the internal array of values for a dense matrix. This property - should only be used when interoperating with other matrix libraries. -
member InternalSparseColumnValues : int []
- Get the internal array of column values for a sparse matrix. This property - should only be used when interoperating with other matrix libraries. -
member InternalSparseRowOffsets : int []
- Get the internal array of row offsets for a sparse matrix. This property - should only be used when interoperating with other matrix libraries. -
member InternalSparseValues : 'T []
- Get the internal array of values for a sparse matrix. This property - should only be used when interoperating with other matrix libraries. -
member IsDense : bool
- Indicates if the matrix uses the dense representation. -
member IsSparse : bool
- Indicates if the matrix uses the sparse representation. -
member Item : int * int -> 'T with get
- Get the item at the given position in the matrix -
member Item : int * int -> 'T with set
- Get the item at the given position in the matrix -
member NonZeroEntries : seq<int * int * 'T>
- Return the non-zero entries of a sparse or dense matrix -
member Norm : float
- Returns sqrt(sum(norm(x)*(norm(x))) of all the elements of a matrix. - The element type of the matrix must have an associated instance of INormFloat<'T> (see GlobalAssociations) ((else NotSupportedException)). -
member NumCols : int
- Get the number of columns in the matrix -
member NumRows : int
- Get the number of rows in the matrix -
member PermuteColumns : permutation:(int -> int) -> Matrix<'T>
- Permutes the columns of the matrix. -
member PermuteRows : permutation:(int -> int) -> Matrix<'T>
- Permutes the rows of the matrix. -
member
-  Region : starti:int * startj:int * lengthi:int * lengthj:int ->
-             Matrix<'T>
- Select a region from a matrix -
member Row : index:int -> RowVector<'T>
- Select a row from a matrix -
member Rows : start:int * length:int -> Matrix<'T>
- Select a range of rows from a matrix -
member
-  SetSlice : start1:int option * finish1:int option * start2:int option *
-             finish2:int option * Matrix<'T> -> unit
- Supports the slicing syntax 'A.[idx1..idx2,idx1..idx2] <- B' -
member ToArray2 : unit -> 'T [,]
- Return a new array containing the elements of the given matrix -
member ToRowVector : unit -> RowVector<'T>
- Convert the matrix to a row vector -
member ToVector : unit -> Vector<'T>
- Convert the matrix to a column vector -
member Transpose : Matrix<'T>
- Get the transpose of the matrix. -
-
-

Static Members

- - - - - - - - - - - - -
MemberDescription
member ( * ) : 'T * Matrix<'T> -> Matrix<'T>
- Multiply each element of a matrix by the given scalar value -
member ( * ) : Matrix<'T> * 'T -> Matrix<'T>
- Multiply each element of a matrix by the given scalar value -
member ( * ) : Matrix<'T> * Vector<'T> -> Vector<'T>
- Matrix-vector multiplication. -
member ( * ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
- Matrix multiplication. An InvalidArgument exception will be - raised if the dimensions do not match. -
member ( + ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
- Point-wise addition of two matrices. An InvalidArgument exception will be - raised if the dimensions do not match. -
member ( - ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
- Point-wise subtraction of two matrices. An InvalidArgument exception will be - raised if the dimensions do not match. -
member ( .* ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
- Pointwise matrix multiplication. An InvalidArgument exception will be - raised if the dimensions do not match. -
member ( ~+ ) : Matrix<'T> -> Matrix<'T>
- Prefix '+' operator. A nop. -
member ( ~- ) : Matrix<'T> -> Matrix<'T>
- Matrix negation. -
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_RowVector-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_RowVector-1.html deleted file mode 100644 index 6f630af3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_RowVector-1.html +++ /dev/null @@ -1,104 +0,0 @@ -Microsoft.FSharp.Math.RowVector -
-
-

[Home] Type Microsoft.FSharp.Math.RowVector


-
-
- - - -
- The type of row vectors. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type RowVector<'T>
-with
-  interface IEnumerable<'T>
-  interface IStructuralEquatable
-  interface IStructuralComparable
-  interface IComparable
-  member Copy : unit -> RowVector<'T>
-  override Equals : obj -> bool
-  override GetHashCode : unit -> int
-  member GetSlice : start:int option * finish:int option -> RowVector<'T>
-  member Permute : permutation:(int -> int) -> RowVector<'T>
-  member SetSlice : start:int option * finish:int option * src:RowVector<'T> -> unit
-  member ToArray : unit -> 'T []
-  member ElementOps : INumeric<'T>
-  member InternalValues : 'T []
-  member Item : int -> 'T with get
-  member Length : int
-  member NumCols : int
-  member Transpose : Vector<'T>
-  member Item : int -> 'T with set
-  static member ( + ) : RowVector<'T> * RowVector<'T> -> RowVector<'T>
-  static member ( .* ) : RowVector<'T> * RowVector<'T> -> RowVector<'T>
-  static member ( * ) : RowVector<'T> * Matrix<'T> -> RowVector<'T>
-  static member ( * ) : RowVector<'T> * 'T -> RowVector<'T>
-  static member ( * ) : RowVector<'T> * Vector<'T> -> 'T
-  static member ( * ) : 'T * RowVector<'T> -> RowVector<'T>
-  static member ( - ) : RowVector<'T> * RowVector<'T> -> RowVector<'T>
-  static member ( ~- ) : RowVector<'T> -> RowVector<'T>
-  static member ( ~+ ) : RowVector<'T> -> RowVector<'T>
-end
-

Instance Members

- - - - - - - - - - - - - - - - - -
MemberDescription
member Copy : unit -> RowVector<'T>
- Create a new matrix that is a copy of the given array -
member ElementOps : INumeric<'T>
override Equals : obj -> bool
override GetHashCode : unit -> int
member GetSlice : start:int option * finish:int option -> RowVector<'T>
- Supports the slicing syntax 'rv.[idx1..idx2]' -
member InternalValues : 'T []
- Get the underlying internal array of values for the vector. This property - should only be used when interoperating with other matrix libraries. -
member Item : int -> 'T with get
member Item : int -> 'T with set
member Length : int
member NumCols : int
member Permute : permutation:(int -> int) -> RowVector<'T>
- Permute the elements of the row vector. -
member
-  SetSlice : start:int option * finish:int option * src:RowVector<'T> ->
-               unit
- Supports the slicing syntax 'rv.[idx1..idx2] <- rv2' -
member ToArray : unit -> 'T []
- Return a new array containing a copy of the elements of the given vector -
member Transpose : Vector<'T>
- Get the transpose of the row vector. -
-
-

Static Members

- - - - - - - - - - - - -
MemberDescription
member ( * ) : 'T * RowVector<'T> -> RowVector<'T>
member ( * ) : RowVector<'T> * 'T -> RowVector<'T>
member ( * ) : RowVector<'T> * Matrix<'T> -> RowVector<'T>
member ( * ) : RowVector<'T> * Vector<'T> -> 'T
member ( + ) : RowVector<'T> * RowVector<'T> -> RowVector<'T>
member ( - ) : RowVector<'T> * RowVector<'T> -> RowVector<'T>
member ( .* ) : RowVector<'T> * RowVector<'T> -> RowVector<'T>
member ( ~+ ) : RowVector<'T> -> RowVector<'T>
member ( ~- ) : RowVector<'T> -> RowVector<'T>
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_Vector-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_Vector-1.html deleted file mode 100644 index 411719ca..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type_Vector-1.html +++ /dev/null @@ -1,132 +0,0 @@ -Microsoft.FSharp.Math.Vector -
-
-

[Home] Type Microsoft.FSharp.Math.Vector


-
-
- - - -
- The type of column vectors. The arithmetic operations on the element type are determined by inspection - on the element type itself - -

Full Type Signature

-
[<SealedAttribute ()>]
-type Vector<'T>
-with
-  interface IEnumerable<'T>
-  interface IStructuralEquatable
-  interface IStructuralComparable
-  interface IComparable
-  member Copy : unit -> Vector<'T>
-  override Equals : obj -> bool
-  override GetHashCode : unit -> int
-  member GetSlice : start:int option * finish:int option -> Vector<'T>
-  member Permute : permutation:(int -> int) -> Vector<'T>
-  member SetSlice : start:int option * finish:int option * src:Vector<'T> -> unit
-  member ToArray : unit -> 'T []
-  member ElementOps : INumeric<'T>
-  member InternalValues : 'T []
-  member Item : int -> 'T with get
-  member Length : int
-  member Norm : float
-  member NumRows : int
-  member Transpose : RowVector<'T>
-  member Item : int -> 'T with set
-  static member ( + ) : Vector<'T> * Vector<'T> -> Vector<'T>
-  static member ( .* ) : Vector<'T> * Vector<'T> -> Vector<'T>
-  static member ( * ) : 'T * Vector<'T> -> Vector<'T>
-  static member ( * ) : Vector<'T> * RowVector<'T> -> Matrix<'T>
-  static member ( * ) : Vector<'T> * 'T -> Vector<'T>
-  static member ( - ) : Vector<'T> * Vector<'T> -> Vector<'T>
-  static member ( ~- ) : Vector<'T> -> Vector<'T>
-  static member ( ~+ ) : Vector<'T> -> Vector<'T>
-end
-

Instance Members

- - - - - - - - - - - - - - - - - - -
MemberDescription
member Copy : unit -> Vector<'T>
- Create a new matrix that is a copy of the given array -
member ElementOps : INumeric<'T>
- Gets the element operations for the element type of the vector, if any -
override Equals : obj -> bool
override GetHashCode : unit -> int
member GetSlice : start:int option * finish:int option -> Vector<'T>
- Supports the slicing syntax 'v.[idx1..idx2]' -
member InternalValues : 'T []
- Get the underlying internal array of values for the vector. This property - should only be used when interoperating with other matrix libraries. -
member Item : int -> 'T with get
- Gets an item from the the vector -
member Item : int -> 'T with set
- Gets an item from the the vector -
member Length : int
- Gets the number of entries in the vector -
member Norm : float
- Computes the 2-norm of a vector: sqrt(x.Transpose*x). -
member NumRows : int
- Gets the number of rows in the vector -
member Permute : permutation:(int -> int) -> Vector<'T>
- Permute the elements of the vector. -
member
-  SetSlice : start:int option * finish:int option * src:Vector<'T> -> unit
- Supports the slicing syntax 'v.[idx1..idx2] <- v2' -
member ToArray : unit -> 'T []
- Return a new array containing a copy of the elements of the given vector -
member Transpose : RowVector<'T>
- Get the transpose of the vector. -
-
-

Static Members

- - - - - - - - - - - -
MemberDescription
member ( * ) : Vector<'T> * 'T -> Vector<'T>
- Multiply a vector by a scalar -
member ( * ) : Vector<'T> * RowVector<'T> -> Matrix<'T>
- Multiply a column vector and a row vector to produce a matrix -
member ( * ) : 'T * Vector<'T> -> Vector<'T>
- Multiply each element of a vector by the given scalar value. -
member ( + ) : Vector<'T> * Vector<'T> -> Vector<'T>
- Add two vectors, pointwise -
member ( - ) : Vector<'T> * Vector<'T> -> Vector<'T>
- Subtract two vectors, pointwise -
member ( .* ) : Vector<'T> * Vector<'T> -> Vector<'T>
- Pointwise multiplication of two vectors. -
member ( ~+ ) : Vector<'T> -> Vector<'T>
- Return the input vector -
member ( ~- ) : Vector<'T> -> Vector<'T>
- Negate a vector -
-
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__bignum.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__bignum.html deleted file mode 100644 index 8365e40f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__bignum.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Math.bignum -
-
-

[Home] Type Microsoft.FSharp.Math.bignum


-
-
- - - -
Note: an abbreviation for BigNum -

Full Type Signature

-
type bignum = BigNum
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__complex.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__complex.html deleted file mode 100644 index e65c0fbe..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__complex.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Math.complex -
-
-

[Home] Type Microsoft.FSharp.Math.complex


-
-
- - - -
- The type of complex numbers - Note: an abbreviation for Complex -

Full Type Signature

-
type complex = Complex
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__matrix.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__matrix.html deleted file mode 100644 index 39ddbf10..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__matrix.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Math.matrix -
-
-

[Home] Type Microsoft.FSharp.Math.matrix


-
-
- - - -
- The type of floating point matrices - Note: an abbreviation for Matrix<float> -

Full Type Signature

-
type matrix = Matrix<float>
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__rowvec.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__rowvec.html deleted file mode 100644 index 8a3ad823..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__rowvec.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Math.rowvec -
-
-

[Home] Type Microsoft.FSharp.Math.rowvec


-
-
- - - -
- The type of floating point row vectors - Note: an abbreviation for RowVector<float> -

Full Type Signature

-
type rowvec = RowVector<float>
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__vector.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__vector.html deleted file mode 100644 index 36b734e4..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Math.type__vector.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Math.vector -
-
-

[Home] Type Microsoft.FSharp.Math.vector


-
-
- - - -
- The type of floating point column vectors - Note: an abbreviation for Vector<float> -

Full Type Signature

-
type vector = Vector<float>
-
-

See Also

-Microsoft.FSharp.Math
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.NativArrayExtensionsForMatrix.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.NativArrayExtensionsForMatrix.html deleted file mode 100644 index e9d96c26..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.NativArrayExtensionsForMatrix.html +++ /dev/null @@ -1,36 +0,0 @@ -Microsoft.FSharp.NativeInterop.NativArrayExtensionsForMatrix -
-
-

[Home] Module Microsoft.FSharp.NativeInterop.NativArrayExtensionsForMatrix


-
-
- - - -
-

Extension Members

- - - - - - -
Extension MemberDescription
[<NoDynamicInvocationAttribute ()>]
-member of_matrix : Matrix<'T> -> PinnedArray2<'T>
- For native interop. Pin the given object -
[<NoDynamicInvocationAttribute ()>]
-member of_rowvec : RowVector<'T> -> PinnedArray<'T>
- For native interop. Pin the given object -
[<NoDynamicInvocationAttribute ()>]
-member of_vector : Vector<'T> -> PinnedArray<'T>
- For native interop. Pin the given object -
-
-
-

See Also

-Microsoft.FSharp.NativeInterop
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.Ref.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.Ref.html deleted file mode 100644 index 1023d985..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.Ref.html +++ /dev/null @@ -1,35 +0,0 @@ -Microsoft.FSharp.NativeInterop.Ref -
-
-

[Home] Module Microsoft.FSharp.NativeInterop.Ref


-
-
- - - -
-

Values

- - - - -
ValueDescription
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-val pin : 'T ref -> (nativeptr<'T> -> 'b) -> 'b
- Pin the given ref for the duration of a single call to the given function. A native pointer to - the contents of the ref is passed to the given function. Cleanup the GCHandle associated with the - pin when the function completes, even if an exception is raised. - - This function should only be used if 'T is a simple blittable type - such as "int" that does not contain any further heap references. - - WARNING: use of this function may lead to unverifiable or invalid code -
-
-
-

See Also

-Microsoft.FSharp.NativeInterop
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.html deleted file mode 100644 index 9ac508d1..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.html +++ /dev/null @@ -1,79 +0,0 @@ -Microsoft.FSharp.NativeInterop -
-
-

[Home] Namespace Microsoft.FSharp.NativeInterop


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - - -
ModuleDescription
Microsoft.FSharp.NativeInterop.NativArrayExtensionsForMatrix
Microsoft.FSharp.NativeInterop.Ref
-
-

Type Definitions

- - - - - - - - - -
TypeDescription
type CMatrix - See NativeArray2 - Note: an abbreviation for NativeArray2<'T>
type FortranMatrix - This type wraps a pointer to a blob of unmanaged memory assumed to contain - a Fortran-style column major two-dimensional matrix of items compatible with the (presumably blittable) - type 'T. The blob of memory must be allocated and managed externally, - e.g. by a computation routine written in C. - - All operations on this type are marked inlined - because the code used to implement the operations is not verifiable. - - Any code that uses these operations will be unverifiable and may - cause memory corruption if not used with extreme care. -
type NativeArray - This type wraps a pointer to a blob of unmanaged memory assumed to contain - a C-style one-dimensional array of items compatible with the (presumably blittable) - type 'T. The blob of memory must be allocated and managed externally, - e.g. by a computation routine written in C. - - All operations on this type are marked inlined - because the code used to implement the operations is not verifiable. - - Any code that uses these operations will be unverifiable and may - cause memory corruption if not used with extreme care. -
type NativeArray2 - This type wraps a pointer to a blob of unmanaged memory assumed to contain - a C-style row major two-dimensional matrix of items compatible with the (presumably blittable) - type 'T. The blob of memory must be allocated and managed externally, - e.g. by a computation routine written in C. - - All operations on this type are marked inlined - because the code used to implement the operations is not verifiable. - - Any code that uses these operations will be unverifiable and may - cause memory corruption if not used with extreme care. -
type PinnedArray - Represents a pinned handle to a structure with an underlying 1D array, i.e. an underlying NativeArray. - Used when interfacing with native code math libraries such as LAPACK. -
type PinnedArray2 - Represents a pinned handle to a structure with an underlying 2D array, i.e. an underlying NativeArray2. - Used when interfacing with native code math libraries such as LAPACK. -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_CMatrix-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_CMatrix-1.html deleted file mode 100644 index f48d2a72..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_CMatrix-1.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.NativeInterop.CMatrix -
-
-

[Home] Type Microsoft.FSharp.NativeInterop.CMatrix


-
-
- - - -
- See NativeArray2 - Note: an abbreviation for NativeArray2<'T> -

Full Type Signature

-
type CMatrix<'T> = NativeArray2<'T>
-
-

See Also

-Microsoft.FSharp.NativeInterop
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_FortranMatrix-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_FortranMatrix-1.html deleted file mode 100644 index bfb0a8e7..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_FortranMatrix-1.html +++ /dev/null @@ -1,72 +0,0 @@ -Microsoft.FSharp.NativeInterop.FortranMatrix -
-
-

[Home] Type Microsoft.FSharp.NativeInterop.FortranMatrix


-
-
- - - -
- This type wraps a pointer to a blob of unmanaged memory assumed to contain - a Fortran-style column major two-dimensional matrix of items compatible with the (presumably blittable) - type 'T. The blob of memory must be allocated and managed externally, - e.g. by a computation routine written in C. - - All operations on this type are marked inlined - because the code used to implement the operations is not verifiable. - - Any code that uses these operations will be unverifiable and may - cause memory corruption if not used with extreme care. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type FortranMatrix<'T> =
-  class
-    new : nativeptr<'T> * nrows:int * ncols:int -> FortranMatrix<'T>
-    [<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-    member Item : int * int -> 'T with get
-    member NativeTranspose : CMatrix<'T>
-    member NumCols : int
-    member NumRows : int
-    member Ptr : nativeptr<'T>
-    [<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-    member Item : int * int -> 'T with set
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-member Item : int * int -> 'T with get
- WARNING: use of this function may lead to unverifiable or invalid code -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-member Item : int * int -> 'T with set
- WARNING: use of this function may lead to unverifiable or invalid code -
member NativeTranspose : CMatrix<'T>
- View a FortranMatrix as a CMatrix. Doesn't actually allocate - a new matirx - just gives a different label to the same bits, and swaps the - row/column count information associated with the bits. -
member NumCols : int
member NumRows : int
member Ptr : nativeptr<'T>
-
-

Static Members

- - - - -
MemberDescription
new : nativeptr<'T> * nrows:int * ncols:int -> FortranMatrix<'T>
-
-
-

See Also

-Microsoft.FSharp.NativeInterop
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_NativeArray-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_NativeArray-1.html deleted file mode 100644 index 5a660d2b..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_NativeArray-1.html +++ /dev/null @@ -1,71 +0,0 @@ -Microsoft.FSharp.NativeInterop.NativeArray -
-
-

[Home] Type Microsoft.FSharp.NativeInterop.NativeArray


-
-
- - - -
- This type wraps a pointer to a blob of unmanaged memory assumed to contain - a C-style one-dimensional array of items compatible with the (presumably blittable) - type 'T. The blob of memory must be allocated and managed externally, - e.g. by a computation routine written in C. - - All operations on this type are marked inlined - because the code used to implement the operations is not verifiable. - - Any code that uses these operations will be unverifiable and may - cause memory corruption if not used with extreme care. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type NativeArray<'T> =
-  class
-    new : startAddress:nativeptr<'T> * length:int -> NativeArray<'T>
-    [<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-    member Item : int -> 'T with get
-    member Length : int
-    member Ptr : nativeptr<'T>
-    [<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-    member Item : int -> 'T with set
-  end
-

Instance Members

- - - - - - - -
MemberDescription
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-member Item : int -> 'T with get
- WARNING: use of this function may lead to unverifiable or invalid code -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-member Item : int -> 'T with set
- WARNING: use of this function may lead to unverifiable or invalid code -
member Length : int
- Length of the C-style one-dimensional array -
member Ptr : nativeptr<'T>
- Pointer to the C-style one-dimensional array -
-
-

Static Members

- - - - -
MemberDescription
new : startAddress:nativeptr<'T> * length:int -> NativeArray<'T>
- Creates a C-style one dimensional array from a native pointer and the length of the array - Nothing is actually copied. -
-
-
-

See Also

-Microsoft.FSharp.NativeInterop
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_NativeArray2-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_NativeArray2-1.html deleted file mode 100644 index 326ba086..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_NativeArray2-1.html +++ /dev/null @@ -1,81 +0,0 @@ -Microsoft.FSharp.NativeInterop.NativeArray2 -
-
-

[Home] Type Microsoft.FSharp.NativeInterop.NativeArray2


-
-
- - - -
- This type wraps a pointer to a blob of unmanaged memory assumed to contain - a C-style row major two-dimensional matrix of items compatible with the (presumably blittable) - type 'T. The blob of memory must be allocated and managed externally, - e.g. by a computation routine written in C. - - All operations on this type are marked inlined - because the code used to implement the operations is not verifiable. - - Any code that uses these operations will be unverifiable and may - cause memory corruption if not used with extreme care. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type NativeArray2<'T> =
-  class
-    new : nativeptr<'T> * nrows:int * ncols:int -> NativeArray2<'T>
-    [<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-    member Item : int * int -> 'T with get
-    member NativeTranspose : FortranMatrix<'T>
-    member NumCols : int
-    member NumRows : int
-    member Ptr : nativeptr<'T>
-    [<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-    member Item : int * int -> 'T with set
-  end
-

Instance Members

- - - - - - - - - -
MemberDescription
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-member Item : int * int -> 'T with get
- WARNING: use of this function may lead to unverifiable or invalid code -
[<UnverifiableAttribute (); NoDynamicInvocationAttribute ()>]
-member Item : int * int -> 'T with set
- WARNING: use of this function may lead to unverifiable or invalid code -
member NativeTranspose : FortranMatrix<'T>
- View a CMatrix as a FortranMatrix. Doesn't actually allocate - a new matirx - just gives a different label to the same bits, and swaps the - row/column count information associated with the bits. -
member NumCols : int
- Number of columns of the native array -
member NumRows : int
- Number of rows of the native array -
member Ptr : nativeptr<'T>
- Pointer to the C-style row major two-dimensional array -
-
-

Static Members

- - - - -
MemberDescription
new : nativeptr<'T> * nrows:int * ncols:int -> NativeArray2<'T>
- Creates a C-style row major two-dimensional array from a native pointer, the number of rows and the number of columns. - Nothing is actually copied. -
-
-
-

See Also

-Microsoft.FSharp.NativeInterop
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_PinnedArray-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_PinnedArray-1.html deleted file mode 100644 index e8d777f3..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_PinnedArray-1.html +++ /dev/null @@ -1,55 +0,0 @@ -Microsoft.FSharp.NativeInterop.PinnedArray -
-
-

[Home] Type Microsoft.FSharp.NativeInterop.PinnedArray


-
-
- - - -
- Represents a pinned handle to a structure with an underlying 1D array, i.e. an underlying NativeArray. - Used when interfacing with native code math libraries such as LAPACK. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type PinnedArray<'T> =
-  class
-    interface IDisposable
-    new : NativeArray<'T> * GCHandle -> PinnedArray<'T>
-    member Free : unit -> unit
-    member Length : int
-    member NativeArray : NativeArray<'T>
-    member Ptr : nativeptr<'T>
-    [<NoDynamicInvocationAttribute ()>]
-    static member of_array : 'T [] -> PinnedArray<'T>
-  end
-

Instance Members

- - - - - - - -
MemberDescription
member Free : unit -> unit
member Length : int
member NativeArray : NativeArray<'T>
member Ptr : nativeptr<'T>
-
-

Static Members

- - - - - -
MemberDescription
new : NativeArray<'T> * GCHandle -> PinnedArray<'T>
[<NoDynamicInvocationAttribute ()>]
-member of_array : 'T [] -> PinnedArray<'T>
- For native interop. Pin the given object -
-
-
-

See Also

-Microsoft.FSharp.NativeInterop
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_PinnedArray2-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_PinnedArray2-1.html deleted file mode 100644 index 0f4bef28..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.NativeInterop.type_PinnedArray2-1.html +++ /dev/null @@ -1,57 +0,0 @@ -Microsoft.FSharp.NativeInterop.PinnedArray2 -
-
-

[Home] Type Microsoft.FSharp.NativeInterop.PinnedArray2


-
-
- - - -
- Represents a pinned handle to a structure with an underlying 2D array, i.e. an underlying NativeArray2. - Used when interfacing with native code math libraries such as LAPACK. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type PinnedArray2<'T> =
-  class
-    interface IDisposable
-    new : NativeArray2<'T> * GCHandle -> PinnedArray2<'T>
-    member Free : unit -> unit
-    member NativeArray : NativeArray2<'T>
-    member NumCols : int
-    member NumRows : int
-    member Ptr : nativeptr<'T>
-    [<NoDynamicInvocationAttribute ()>]
-    static member of_array2 : 'T [,] -> PinnedArray2<'T>
-  end
-

Instance Members

- - - - - - - - -
MemberDescription
member Free : unit -> unit
member NativeArray : NativeArray2<'T>
member NumCols : int
member NumRows : int
member Ptr : nativeptr<'T>
-
-

Static Members

- - - - - -
MemberDescription
new : NativeArray2<'T> * GCHandle -> PinnedArray2<'T>
[<NoDynamicInvocationAttribute ()>]
-member of_array2 : 'T [,] -> PinnedArray2<'T>
- For native interop. Pin the given object -
-
-
-

See Also

-Microsoft.FSharp.NativeInterop
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.html deleted file mode 100644 index 6a597d00..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.html +++ /dev/null @@ -1,34 +0,0 @@ -Microsoft.FSharp.Text.Lexing -
-
-

[Home] Namespace Microsoft.FSharp.Text.Lexing


-
-
- - - -
-

Type Definitions

- - - - - - - -
TypeDescription
type AsciiTables - The type of tables for an ascii lexer generated by fslex. -
type LexBuffer
type Position - Position information stored for lexing tokens -
type UnicodeTables - The type of tables for an unicode lexer generated by fslex. -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_AsciiTables.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_AsciiTables.html deleted file mode 100644 index 7bbed5ab..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_AsciiTables.html +++ /dev/null @@ -1,48 +0,0 @@ -Microsoft.FSharp.Text.Lexing.AsciiTables -
-
-

[Home] Type Microsoft.FSharp.Text.Lexing.AsciiTables


-
-
- - - -
- The type of tables for an ascii lexer generated by fslex. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type AsciiTables
-with
-  member AsyncInterpret : initialState:int * LexBuffer<byte> -> Async<int>
-  member Interpret : initialState:int * LexBuffer<byte> -> int
-  static member Create : uint16 [] array * uint16 [] -> AsciiTables
-end
-

Instance Members

- - - - - -
MemberDescription
member
-  AsyncInterpret : initialState:int * LexBuffer<byte> -> Async<int>
- Interpret tables for an ascii lexer generated by fslex, processing input asynchronously -
member Interpret : initialState:int * LexBuffer<byte> -> int
- Interpret tables for an ascii lexer generated by fslex. -
-
-

Static Members

- - - - -
MemberDescription
member Create : uint16 [] array * uint16 [] -> AsciiTables
-
-
-

See Also

-Microsoft.FSharp.Text.Lexing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_LexBuffer-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_LexBuffer-1.html deleted file mode 100644 index 9a596861..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_LexBuffer-1.html +++ /dev/null @@ -1,99 +0,0 @@ -Microsoft.FSharp.Text.Lexing.LexBuffer -
-
-

[Home] Type Microsoft.FSharp.Text.Lexing.LexBuffer


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type LexBuffer<'char>
-with
-  member DiscardInput : unit -> unit
-  member LexemeChar : int -> 'char
-  member BufferLocalStore : IDictionary<string,obj>
-  member EndPos : Position
-  member IsPastEndOfStream : bool
-  member Lexeme : 'char array
-  member LexemeLength : int
-  member StartPos : Position
-  member EndPos : Position with set
-  member IsPastEndOfStream : bool with set
-  member StartPos : Position with set
-  static member FromAsyncFunction : ('char [] * int * int -> Async<int>) -> LexBuffer<'char>
-  static member FromBinaryReader : BinaryReader -> LexBuffer<byte>
-  static member FromBytes : byte [] -> LexBuffer<byte>
-  static member FromChars : char [] -> LexBuffer<char>
-  static member FromFunction : ('char [] * int * int -> int) -> LexBuffer<'char>
-  static member FromTextReader : TextReader -> LexBuffer<char>
-  static member LexemeString : LexBuffer<char> -> string
-end
-

Instance Members

- - - - - - - - - - - - - - -
MemberDescription
member BufferLocalStore : IDictionary<string,obj>
- Dynamically typed, non-lexically scoped parameter table -
member DiscardInput : unit -> unit
- Remove all input, though don't discard the current lexeme -
member EndPos : Position
- The end position for the lexeme -
member EndPos : Position with set
- The end position for the lexeme -
member IsPastEndOfStream : bool
- True if the refill of the buffer ever failed , or if explicitly set to true. -
member IsPastEndOfStream : bool with set
- True if the refill of the buffer ever failed , or if explicitly set to true. -
member Lexeme : 'char array
- The matched string -
member LexemeChar : int -> 'char
- Fetch a particular character in the matched string -
member LexemeLength : int
- The length of the matched string -
member StartPos : Position
- The start position for the lexeme -
member StartPos : Position with set
- The start position for the lexeme -
-
-

Static Members

- - - - - - - - - - -
MemberDescription
member
-  FromAsyncFunction : ('char [] * int * int -> Async<int>) ->
-                        LexBuffer<'char>
member FromBinaryReader : BinaryReader -> LexBuffer<byte>
member FromBytes : byte [] -> LexBuffer<byte>
- Adjust the start position associated with the lexbuf -
member FromChars : char [] -> LexBuffer<char>
member FromFunction : ('char [] * int * int -> int) -> LexBuffer<'char>
member FromTextReader : TextReader -> LexBuffer<char>
member LexemeString : LexBuffer<char> -> string
- Fast helper to turn the matched characters into a string, avoiding an intermediate array -
-
-
-

See Also

-Microsoft.FSharp.Text.Lexing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_Position.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_Position.html deleted file mode 100644 index 8427f59c..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_Position.html +++ /dev/null @@ -1,79 +0,0 @@ -Microsoft.FSharp.Text.Lexing.Position -
-
-

[Home] Type Microsoft.FSharp.Text.Lexing.Position


-
-
- - - -
- Position information stored for lexing tokens - -

Full Type Signature

-
type Position =
-  {pos_fname: string;
-   pos_lnum: int;
-   pos_bol: int;
-   pos_cnum: int;}
-  with
-    member EndOfToken : n:int -> Position
-    member ShiftColumnBy : by:int -> Position
-    member AbsoluteOffset : int
-    member Column : int
-    member FileName : string
-    member Line : int
-    member NextLine : Position
-    member StartOfLineAbsoluteOffset : int
-    static member FirstLine : filename:string -> Position
-    static member Empty : Position
-  end
-

Instance Members

- - - - - - - - - - - -
MemberDescription
member AbsoluteOffset : int
- The character number in the input stream -
member Column : int
- Return the column number marked by the position, i.e. the difference between the AbsoluteOffset and the StartOfLineAbsoluteOffset -
member EndOfToken : n:int -> Position
- Given a position at the start of a token of length n, return a position just beyond the end of the token -
member FileName : string
- The file name associated with the input stream. -
member Line : int
- The line number in the input stream, assuming fresh positions have been updated - using AsNewLinePos() and by modifying the EndPos property of the LexBuffer. -
member NextLine : Position
member ShiftColumnBy : by:int -> Position
- Gives a position shifted by specified number of characters -
member StartOfLineAbsoluteOffset : int
- Return absolute offset of the start of the line marked by the position -
-
-

Static Members

- - - - - -
MemberDescription
member Empty : Position
- Get an arbitrary position, with the empty string as filename, and -
member FirstLine : filename:string -> Position
- Get a position corresponding to the first line (line number 1) in a given file -
-
-
-

See Also

-Microsoft.FSharp.Text.Lexing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_UnicodeTables.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_UnicodeTables.html deleted file mode 100644 index a0fefa28..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Lexing.type_UnicodeTables.html +++ /dev/null @@ -1,48 +0,0 @@ -Microsoft.FSharp.Text.Lexing.UnicodeTables -
-
-

[Home] Type Microsoft.FSharp.Text.Lexing.UnicodeTables


-
-
- - - -
- The type of tables for an unicode lexer generated by fslex. - -

Full Type Signature

-
[<SealedAttribute ()>]
-type UnicodeTables
-with
-  member AsyncInterpret : initialState:int * LexBuffer<char> -> Async<int>
-  member Interpret : initialState:int * LexBuffer<char> -> int
-  static member Create : uint16 [] array * uint16 [] -> UnicodeTables
-end
-

Instance Members

- - - - - -
MemberDescription
member
-  AsyncInterpret : initialState:int * LexBuffer<char> -> Async<int>
- Interpret tables for a unicode lexer generated by fslex, processing input asynchronously -
member Interpret : initialState:int * LexBuffer<char> -> int
- Interpret tables for a unicode lexer generated by fslex. -
-
-

Static Members

- - - - -
MemberDescription
member Create : uint16 [] array * uint16 [] -> UnicodeTables
-
-
-

See Also

-Microsoft.FSharp.Text.Lexing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.ParseHelpers.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.ParseHelpers.html deleted file mode 100644 index 0342388e..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.ParseHelpers.html +++ /dev/null @@ -1,26 +0,0 @@ -Microsoft.FSharp.Text.Parsing.ParseHelpers -
-
-

[Home] Module Microsoft.FSharp.Text.Parsing.ParseHelpers


-
-
- - - -
-

Values

- - - - - -
ValueDescription
val parse_error : string -> unit
val parse_error_rich : (ParseErrorContext<'tok> -> unit) option
-
-
-

See Also

-Microsoft.FSharp.Text.Parsing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.html deleted file mode 100644 index acf20bf9..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.html +++ /dev/null @@ -1,48 +0,0 @@ -Microsoft.FSharp.Text.Parsing -
-
-

[Home] Namespace Microsoft.FSharp.Text.Parsing


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - -
ModuleDescription
Microsoft.FSharp.Text.Parsing.ParseHelpers
-
-

Type Definitions

- - - - - - -
TypeDescription
type IParseState - Parsers generated by FsPars provide information from within parser - actions. This is accessed via the functions available on the local - variable parseState within parser actions -
type ParseErrorContext
type Tables - Tables generated by fsyacc -
-
-

Exceptions

- - - - - -
ExceptionDescription
exception Accept
exception RecoverableParseError
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_Accept.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_Accept.html deleted file mode 100644 index a88669ac..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_Accept.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Text.Parsing.Accept -
-
-

[Home] Exception Microsoft.FSharp.Text.Parsing.Accept


-
-
- - - -
-

Full Signature

-
exception Accept of obj
-
-

See Also

-Microsoft.FSharp.Text.Parsing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_IParseState.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_IParseState.html deleted file mode 100644 index f83469cb..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_IParseState.html +++ /dev/null @@ -1,46 +0,0 @@ -Microsoft.FSharp.Text.Parsing.IParseState -
-
-

[Home] Type Microsoft.FSharp.Text.Parsing.IParseState


-
-
- - - -
- Parsers generated by FsPars provide information from within parser - actions. This is accessed via the functions available on the local - variable parseState within parser actions - -

Full Type Signature

-
type IParseState =
-  interface
-    abstract member GetInput : int -> obj
-    abstract member InputEndPosition : int -> Position
-    abstract member InputRange : int -> Position * Position
-    abstract member InputStartPosition : int -> Position
-    abstract member RaiseError : unit -> 'b
-    abstract member ParserLocalStore : IDictionary<string,obj>
-    abstract member ResultRange : Position * Position
-  end
-

Instance Members

- - - - - - - - - - -
MemberDescription
member GetInput : int -> obj
member InputEndPosition : int -> Position
member InputRange : int -> Position * Position
member InputStartPosition : int -> Position
member ParserLocalStore : IDictionary<string,obj>
member RaiseError : unit -> 'b
member ResultRange : Position * Position
-
-
-

See Also

-Microsoft.FSharp.Text.Parsing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_ParseErrorContext-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_ParseErrorContext-1.html deleted file mode 100644 index e48880fe..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_ParseErrorContext-1.html +++ /dev/null @@ -1,43 +0,0 @@ -Microsoft.FSharp.Text.Parsing.ParseErrorContext -
-
-

[Home] Type Microsoft.FSharp.Text.Parsing.ParseErrorContext


-
-
- - - -
-

Full Type Signature

-
[<SealedAttribute ()>]
-type ParseErrorContext<'tok>
-with
-  member CurrentToken : 'tok option
-  member Message : string
-  member ParseState : IParseState
-  member ReduceTokens : int list
-  member ReducibleProductions : int list list
-  member ShiftTokens : int list
-  member StateStack : int list
-end
-

Instance Members

- - - - - - - - - - -
MemberDescription
member CurrentToken : 'tok option
member Message : string
member ParseState : IParseState
member ReduceTokens : int list
member ReducibleProductions : int list list
member ShiftTokens : int list
member StateStack : int list
-
-
-

See Also

-Microsoft.FSharp.Text.Parsing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_RecoverableParseError.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_RecoverableParseError.html deleted file mode 100644 index 3403e60f..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_RecoverableParseError.html +++ /dev/null @@ -1,20 +0,0 @@ -Microsoft.FSharp.Text.Parsing.RecoverableParseError -
-
-

[Home] Exception Microsoft.FSharp.Text.Parsing.RecoverableParseError


-
-
- - - -
-

Full Signature

-
exception RecoverableParseError
-
-

See Also

-Microsoft.FSharp.Text.Parsing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_Tables-1.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_Tables-1.html deleted file mode 100644 index 59b0a653..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.Parsing.type_Tables-1.html +++ /dev/null @@ -1,50 +0,0 @@ -Microsoft.FSharp.Text.Parsing.Tables -
-
-

[Home] Type Microsoft.FSharp.Text.Parsing.Tables


-
-
- - - -
- Tables generated by fsyacc - -

Full Type Signature

-
type Tables<'tok> =
-  {reductions: (IParseState -> obj) array;
-   endOfInputTag: int;
-   tagOfToken: 'tok -> int;
-   dataOfToken: 'tok -> obj;
-   actionTableElements: uint16 [];
-   actionTableRowOffsets: uint16 [];
-   reductionSymbolCounts: uint16 [];
-   immediateActions: uint16 [];
-   gotos: uint16 [];
-   sparseGotoTableRowOffsets: uint16 [];
-   stateToProdIdxsTableElements: uint16 [];
-   stateToProdIdxsTableRowOffsets: uint16 [];
-   productionToNonTerminalTable: uint16 [];
-   parseError: ParseErrorContext<'tok> -> unit;
-   numTerminals: int;
-   tagOfErrorTerminal: int;}
-  with
-    member Interpret : lexer:(LexBuffer<'char> -> 'tok) * lexbuf:LexBuffer<'char> * startState:int -> obj
-  end
-

Instance Members

- - - - -
MemberDescription
member
-  Interpret : lexer:(LexBuffer<'char> -> 'tok) *
-              lexbuf:LexBuffer<'char> * startState:int -> obj
-
-
-

See Also

-Microsoft.FSharp.Text.Parsing
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.Display.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.Display.html deleted file mode 100644 index d8e864d6..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.Display.html +++ /dev/null @@ -1,52 +0,0 @@ -Microsoft.FSharp.Text.StructuredFormat.Display -
-
-

[Home] Module Microsoft.FSharp.Text.StructuredFormat.Display


-
-
- - - -
-

Values

- - - - - - - - - - -
ValueDescription
val any_to_layout : FormatOptions -> 'T -> Layout
val any_to_string : 'T -> string
- Convert any value to a string using a standard formatter - Data is typically formatted in a structured format, e.g. - lists are formatted using the "[1;2]" notation. - The details of the format are not specified and may change - from version to version and according to the flags given - to the F# compiler. The format is intended to be human-readable, - not machine readable. If alternative generic formats are required - you should develop your own formatter, using the code in the - implementation of this file as a starting point. - - Data from other .NET languages is formatted using a virtual - call to Object.ToString() on the boxed version of the input. -
val layout_as_string : FormatOptions -> 'T -> string
val layout_to_string : FormatOptions -> Layout -> string
- Convert any value to a layout using the given formatting options. The - layout can then be processed using formatting display engines such as - those in the LayoutOps module. any_to_string and output_any are - built using any_to_layout with default format options. -
val output_any : TextWriter -> 'T -> unit
- Ouput any value to a channel using the same set of formatting rules - as any_to_string -
val output_layout : FormatOptions -> TextWriter -> Layout -> unit
val squash_layout : FormatOptions -> Layout -> Layout
-
-
-

See Also

-Microsoft.FSharp.Text.StructuredFormat
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.LayoutOps.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.LayoutOps.html deleted file mode 100644 index f93c1063..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.LayoutOps.html +++ /dev/null @@ -1,121 +0,0 @@ -Microsoft.FSharp.Text.StructuredFormat.LayoutOps -
-
-

[Home] Module Microsoft.FSharp.Text.StructuredFormat.LayoutOps


-
-
- - - -
- A layout is a sequence of strings which have been joined together. - The strings are classified as words, separators and left and right parenthesis. - This classification determines where spaces are inserted. - A joint is either unbreakable, breakable or broken. - If a joint is broken the RHS layout occurs on the next line with optional indentation. - A layout can be squashed to for given width which forces breaks as required. - -

Values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
val ( $$ ) : Layout -> Layout -> Layout
- Join, unbreakable. -
val ( ++ ) : Layout -> Layout -> Layout
- Join, possible break with indent=0 -
val ( -- ) : Layout -> Layout -> Layout
- Join, possible break with indent=1 -
val ( --- ) : Layout -> Layout -> Layout
- Join, possible break with indent=2 -
val ( @@ ) : Layout -> Layout -> Layout
- Join broken with ident=0 -
val ( @@- ) : Layout -> Layout -> Layout
- Join broken with ident=1 -
val ( @@-- ) : Layout -> Layout -> Layout
- Join broken with ident=2 -
val aboveL : Layout -> Layout -> Layout
- Layout two vertically. -
val aboveListL : Layout list -> Layout
- Layout list vertically. -
val braceL : Layout -> Layout
- Wrap braces around layout. -
val bracketL : Layout -> Layout
- Wrap round brackets around Layout. -
val commaListL : Layout list -> Layout
- Join layouts into a comma separated list. -
val emptyL : Layout
- The empty layout -
val isEmptyL : Layout -> bool
- Is it the empty layout? -
val leftL : string -> Layout
- An string which is left parenthesis (no space on the right). -
val listL : ('T -> Layout) -> 'T list -> Layout
- Layout like an F# list. -
val objL : obj -> Layout
- An uninterpreted leaf, to be interpreted into a string - by the layout engine. This allows leaf layouts for numbers, strings and - other atoms to be customized according to culture. -
val optionL : ('T -> Layout) -> 'T option -> Layout
- Layout like an F# option. -
val rightL : string -> Layout
- An string which is right parenthesis (no space on it's left). -
val semiListL : Layout list -> Layout
- Join layouts into a semi-colon separated list. -
val sepL : string -> Layout
- An string which requires no spaces either side. -
val sepListL : Layout -> Layout list -> Layout
- Join layouts into a list separated using the given Layout. -
val spaceListL : Layout list -> Layout
- Join layouts into a space separated list. -
val squareBracketL : Layout -> Layout
- Wrap square brackets around layout. -
val tagAttrL : string -> (string * string) list -> Layout -> Layout
- See tagL -
val tupleL : Layout list -> Layout
- Form tuple of layouts. -
val unfoldL :
-  ('T -> Layout) ->
-    ('State -> ('T * 'State) option) -> 'State -> int -> Layout list
- For limitting layout of list-like sequences (lists,arrays,etc). - unfold a list of items using (project and z) making layout list via itemL. - If reach maxLength (before exhausting) then truncate. -
val wordL : string -> Layout
- An string leaf -
-
-
-

See Also

-Microsoft.FSharp.Text.StructuredFormat
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.html deleted file mode 100644 index 6a211a00..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.html +++ /dev/null @@ -1,66 +0,0 @@ -Microsoft.FSharp.Text.StructuredFormat -
-
-

[Home] Namespace Microsoft.FSharp.Text.StructuredFormat


-
-
- - - -
-

Modules (as contributed by assembly 'FSharp.PowerPack')

- - - - - -
ModuleDescription
Microsoft.FSharp.Text.StructuredFormat.Display
Microsoft.FSharp.Text.StructuredFormat.LayoutOps - A layout is a sequence of strings which have been joined together. - The strings are classified as words, separators and left and right parenthesis. - This classification determines where spaces are inserted. - A joint is either unbreakable, breakable or broken. - If a joint is broken the RHS layout occurs on the next line with optional indentation. - A layout can be squashed to for given width which forces breaks as required. -
-
-

Type Definitions

- - - - - - -
TypeDescription
type FormatOptions - A record of options to control structural formatting. - For F# Interactive properties matching those of this value can be accessed via the 'fsi' - value. - - Floating Point format given in the same format accepted by System.Double.ToString, - e.g. f6 or g15. - - If ShowProperties is set the printing process will evaluate properties of the values being - displayed. This may cause additional computation. - - The ShowIEnumerable is set the printing process will force the evalution of IEnumerable objects - to a small, finite depth, as determined by the printing parameters. - This may lead to additional computation being performed during printing. - - - From F# Interactive the default settings can be adjusted using, for example, -
-   open Microsoft.FSharp.Compiler.Interactive.Settings;;
-   setPrintWidth 120;;
- 
-
-
type IEnvironment
type Layout - Data representing structured layouts of terms. -
-
-
-

See Also

-Namespaces
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.type_FormatOptions.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.type_FormatOptions.html deleted file mode 100644 index b49513bb..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.type_FormatOptions.html +++ /dev/null @@ -1,63 +0,0 @@ -Microsoft.FSharp.Text.StructuredFormat.FormatOptions -
-
-

[Home] Type Microsoft.FSharp.Text.StructuredFormat.FormatOptions


-
-
- - - -
- A record of options to control structural formatting. - For F# Interactive properties matching those of this value can be accessed via the 'fsi' - value. - - Floating Point format given in the same format accepted by System.Double.ToString, - e.g. f6 or g15. - - If ShowProperties is set the printing process will evaluate properties of the values being - displayed. This may cause additional computation. - - The ShowIEnumerable is set the printing process will force the evalution of IEnumerable objects - to a small, finite depth, as determined by the printing parameters. - This may lead to additional computation being performed during printing. - - - From F# Interactive the default settings can be adjusted using, for example, -
-   open Microsoft.FSharp.Compiler.Interactive.Settings;;
-   setPrintWidth 120;;
- 
-
-
-

Full Type Signature

-
[<StructuralEqualityAttribute (false); StructuralComparisonAttribute (false)>]
-type FormatOptions =
-  {FloatingPointFormat: string;
-   AttributeProcessor: string -> (string * string) list -> bool -> unit;
-   FormatProvider: IFormatProvider;
-   BindingFlags: BindingFlags;
-   PrintWidth: int;
-   PrintDepth: int;
-   PrintLength: int;
-   PrintSize: int;
-   ShowProperties: bool;
-   ShowIEnumerable: bool;}
-  with
-    static member Default : FormatOptions
-  end
-

Static Members

- - - - -
MemberDescription
member Default : FormatOptions
-
-
-

See Also

-Microsoft.FSharp.Text.StructuredFormat
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.type_IEnvironment.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.type_IEnvironment.html deleted file mode 100644 index 64b9f9b2..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.type_IEnvironment.html +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft.FSharp.Text.StructuredFormat.IEnvironment -
-
-

[Home] Type Microsoft.FSharp.Text.StructuredFormat.IEnvironment


-
-
- - - -
-

Full Type Signature

-
type IEnvironment =
-  interface
-    abstract member GetLayout : obj -> Layout
-    abstract member MaxColumns : int
-    abstract member MaxRows : int
-  end
-

Instance Members

- - - - - - -
MemberDescription
member GetLayout : obj -> Layout
- Return to the layout-generation - environment to layout any otherwise uninterpreted object -
member MaxColumns : int
- The maximum number of elements for which to generate layout for - list-like structures, or columns in table-like - structures. -1 if no maximum. -
member MaxRows : int
- The maximum number of rows for which to generate layout for table-like - structures. -1 if no maximum. -
-
-
-

See Also

-Microsoft.FSharp.Text.StructuredFormat
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.type_Layout.html b/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.type_Layout.html deleted file mode 100644 index 936616de..00000000 --- a/tools/FSharp_1.9.6.16/manual/FSharp.PowerPack/Microsoft.FSharp.Text.StructuredFormat.type_Layout.html +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.FSharp.Text.StructuredFormat.Layout -
-
-

[Home] Type Microsoft.FSharp.Text.StructuredFormat.Layout


-
-
- - - -
- Data representing structured layouts of terms. - -

Full Type Signature

-
type Layout
-
-

See Also

-Microsoft.FSharp.Text.StructuredFormat
-
-
-
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/manual/msdn.css b/tools/FSharp_1.9.6.16/manual/msdn.css deleted file mode 100644 index 554a5dc0..00000000 --- a/tools/FSharp_1.9.6.16/manual/msdn.css +++ /dev/null @@ -1,229 +0,0 @@ -body -{ - width: 100%; - margin: 0px 0px 0px 0px; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 70%; -} - -h1, h3, h4 -{ - margin-bottom: .4em; - margin-top: 1em; -} - -h1 -{ - font-size: 120%; - margin-top: 0em; -} - -h3 -{ - font-size: 115%; -} - -h4 -{ - font-size: 100%; -} - -div.table -{ - text-align: center; -} - -table -{ - font-size: 100%; - border-collapse: collapse; - width: 93%; -} - -th -{ - background-color: #cccccc; - color: #000000; - font-weight: bolder; - padding: 5px; - border: 1px solid #999999; -} - -tr -{ - background-color: #ffffff; - padding: 5px; - text-align: left; - border: 1px solid #999999; -} - -td -{ - border: 1px solid #999999; - padding: 5px; -} - -p -{ - margin: .5em 0em .5em 0em; -} - -pre -{ - margin-top: .5em; - margin-bottom: .5em; -} - -pre.code -{ - font: Monospace, Courier New, Courier; - color: #000066; - font-size: 100%; - margin-left: 20px; -} - -.syntax -{ - font: Monospace, Courier New, Courier; - letter-spacing: .1em; - background-color: #cccccc; - color: #000000; - font-size: 100%; - font-weight: bolder; - padding: 5px; - border: 1px solid #999999; - margin-left: 20px; - padding: 4px 8px; - margin-top: 1em; - margin-bottom: 1em; - width: 96%; -} -.comment -{ - color:Green; - font-weight:lighter; -} -.i1 -{ - margin-left: 20px; -} - -.i2 -{ - margin-left: 40px; -} - -.i3 -{ - margin-left: 60px; -} - -.missing -{ - color: Red; -} - -div#banner -{ - width: 100%; - margin: 0px 0px 0px 0px; - border-width: 0px; - border-bottom: 1px solid #999999; - padding: 0px 0px 0px 0px; - background-color: #99ccff; -} - -div#header -{ - margin: 0px 0px 0px 0px; - border-width: 0px; - padding: .4em .4em 0 .4em; - background-color: #99ccff; - font-style: italic; -} - -div#footer -{ - font-size: 100%; - font-style:italic; - border-top: 1px solid #999999; - margin-left: 20px; - margin-top: 1em; - margin-bottom: 1em; - width: 96%; -} - -div#banner h1 -{ - margin: 0px 0px 0px 0px; - border-width: 0px; - padding: 0 .4em .3em .4em; - background-color: #99ccff; -} - -div#content -{ - margin: 0px 0px 0px 0px; - padding: 4px 4px 4px 4px; -} - -code.ce -{ - font-style: italic; -} - -pre.syntax span.lang -{ - margin: 0; - font-weight: normal; -} - -pre.syntax span.meta -{ - margin: 0; - font-weight: normal; - font-style: italic; -} - -.permissions -{ - margin-top: 6px; -} - -blockquote.dtBlock -{ - margin: .5em 1.5em .5em 1.5em; -} - -a:link -{ - color: #0000ff; -} - -a:visited -{ - color: #0000ff; -} - -a:hover -{ - color: #3366ff; -} - -a.typeLink -{ - text-decoration:none; -} -a:link.typeLink -{ - text-decoration:none; -} -a:visited.typeLink; -{ - text-decoration:none; -} -a:hover.typeLink -{ - font-style:italic; - text-decoration:underline; -} diff --git a/tools/FSharp_1.9.6.16/manual/namespaces.html b/tools/FSharp_1.9.6.16/manual/namespaces.html deleted file mode 100644 index 581d3f74..00000000 --- a/tools/FSharp_1.9.6.16/manual/namespaces.html +++ /dev/null @@ -1,149 +0,0 @@ -Namespaces -

- - - - - - - - - - - - - - - - - - - - - - - - -
Namespaces in assembly FSharp.CoreDescription
Microsoft.FSharp.Collections - - This namespace contains some common collections in a style primarily designed for use from F#. -

Types: [seq], [list], [Set], [ResizeArray], [Map], [List], [FSharpList]

Modules: [Array], [Array2D], [Array3D], [Array4D], [ComparisonIdentity], [HashIdentity], [List], [Map], [Seq], [SequenceExpressionHelpers], [Set]
Microsoft.FSharp.Control - - This namespace contains types for derived control constructs including - on-demand and asynchronous computations. -

Types: [lazy], [MailboxProcessor], [Lazy], [IEvent], [IEvent], [IDelegateEvent], [Handler], [Event], [Event], [DelegateEvent], [Async], [AsyncReplyChannel], [AsyncGroup], [AsyncBuilder], [Async]

Modules: [CommonExtensions], [Event]
Microsoft.FSharp.Core - - Basic F# type definitions, functions and operators -

Types: [unit], [unativeint], [uint8], [uint64], [uint32], [uint16], [string], [single], [sbyte], [ref], [option], [obj], [nativeptr], [nativeint], [int], [int8], [int8], [int64], [int64], [int32], [int16], [int16], [int], [ilsigptr], [float], [float32], [float32], [float], [exn], [double], [decimal], [decimal], [char], [byte], [byref], [bool], [array], [Ref], [Option], [IStructuralEquatable], [IStructuralComparable], [FuncConvert]

Modules: [ExtraTopLevelOperators], [LanguagePrimitives], [NumericLiterals], [Operators], [OptimizedClosures], [Option], [String]
Microsoft.FSharp.Math - - This namespace contains numerical and mathematical types such as arbitrarily sized integers -

Types: [bigint], [BigInt]
Microsoft.FSharp.NativeInterop -

Modules: [NativePtr]
Microsoft.FSharp.Quotations - - Types and functions related to expression quotations -

Types: [Var], [Expr], [Expr]

Modules: [DerivedPatterns], [ExprShape], [Patterns]
Microsoft.FSharp.Reflection - - This namespace contains constructs for reflecting on the representation of - F# values and types. It augments the design of System.Reflection. -

Types: [UnionCaseInfo], [FSharpValue], [FSharpType]
Microsoft.FSharp.Text - - This namespace contains types and modules for generating and formatting text with F# -

Modules: [Printf]
-

Documentation for assembly FSharp.Core, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- -Namespaces -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Namespaces in assembly FSharp.PowerPackDescription
Microsoft.FSharp.Collections - - This namespace contains FSharp.PowerPack extensions for the F# collection types -

Types: [LazyList], [HashSet], [HashMultiMap]

Modules: [LazyList], [ResizeArray]
Microsoft.FSharp.Collections.Tagged - - This namespace contains FSharp.PowerPack extensions for the F# collection types -

Types: [Set], [Set], [Map], [Map], [HashSet], [HashSet], [HashMultiMap], [HashMultiMap]
Microsoft.FSharp.Compatibility -

Types: [permutation]

Modules: [Arg], [Array], [Array2D], [Byte], [Char], [Enum], [Float], [Int16], [Int32], [Int64], [Lazy], [List], [Map], [Permutation], [SByte], [Seq], [Set], [String], [UInt32], [UInt64]
Microsoft.FSharp.Compatibility.OCaml -

Modules: [Big_int], [Buffer], [Filename], [Hashtbl], [Lexing], [Obj], [Parsing], [Pervasives], [Printexc], [Sys]
Microsoft.FSharp.Control -

Types: [AsyncWorker], [AsyncResult], [AsyncResultCell]

Modules: [AsyncExtensions], [FileExtensions], [StreamReaderExtensions], [WebClientExtensions], [WebRequestExtensions]
Microsoft.FSharp.Core -

Types: [vector], [rowvec], [matrix], [complex], [bignum]

Modules: [ComplexCommonExtensions], [MatrixCommonExtensions], [NumericLiteralN]
Microsoft.FSharp.Math -

Types: [vector], [rowvec], [matrix], [complex], [bignum], [Vector], [RowVector], [Matrix], [INumeric], [INormFloat], [IIntegral], [IIEEE], [IFractional], [IFloating], [Complex], [BigRational], [BigNum]

Modules: [Complex], [GlobalAssociations], [Instances], [Matrix], [Measure], [PhysicalConstants], [RowVector], [SI], [Vector]
Microsoft.FSharp.NativeInterop -

Types: [PinnedArray], [PinnedArray2], [NativeArray], [NativeArray2], [FortranMatrix], [CMatrix]

Modules: [NativArrayExtensionsForMatrix], [Ref]
Microsoft.FSharp.Text.Lexing -

Types: [UnicodeTables], [Position], [LexBuffer], [AsciiTables]
Microsoft.FSharp.Text.Parsing -

Types: [Tables], [ParseErrorContext], [IParseState]

Modules: [ParseHelpers]
Microsoft.FSharp.Text.StructuredFormat -

Types: [Layout], [IEnvironment], [FormatOptions]

Modules: [Display], [LayoutOps]
-

Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- -Namespaces -

- - - - - - - - - -
Namespaces in assembly FSharp.PowerPack.LinqDescription
-

Modules: [Assembly]
Microsoft.FSharp -

Types: [FuncConvertExtensions]
Microsoft.FSharp.Linq -

Modules: [Query], [QuotationEvaluation]
-

Documentation for assembly FSharp.PowerPack.Linq, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- -Namespaces -

- - - - - - - - - -
Namespaces in assembly FSharp.PowerPack.MetadataDescription
FSharp.PowerPack.Metadata -

Types: [Range], [FSharpUnionCase], [FSharpType], [FSharpRecordField], [FSharpParameter], [FSharpMemberOrVal], [FSharpInlineAnnotation], [FSharpGenericParameterConstraint], [FSharpGenericParameter], [FSharpEntity], [FSharpAttribute], [FSharpAssembly], [FSharpAccessibility]
FSharp.PowerPack.Metadata.Reader.Internal -

Modules: [Pickle], [Prelude], [PrettyNaming], [Tast]
FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL -

Modules: [IL]
-

Documentation for assembly FSharp.PowerPack.Metadata, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- -Namespaces -

- - - -
Namespaces in assembly FSharp.PowerPack.Build.TasksDescription
Microsoft.FSharp.Build -

Types: [FsYacc], [FsLex]
-

Documentation for assembly FSharp.PowerPack.Build.Tasks, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16

- diff --git a/tools/FSharp_1.9.6.16/source/absil/bytes.ml b/tools/FSharp_1.9.6.16/source/absil/bytes.ml deleted file mode 100644 index a0aaecae..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/bytes.ml +++ /dev/null @@ -1,171 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. -#light - -/// Byte arrays -#if STANDALONE_METADATA -module FSharp.PowerPack.Metadata.Reader.Bytes -#else -module Microsoft.FSharp.Compiler.AbstractIL.Internal.Bytes -#endif - -open System.IO -open Internal.Utilities -open Internal.Utilities.Pervasives - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - - -let b0 n = (n &&& 0xFF) -let b1 n = ((n >>> 8) &&& 0xFF) -let b2 n = ((n >>> 16) &&& 0xFF) -let b3 n = ((n >>> 24) &&& 0xFF) - -let dWw1 n = int32 ((n >>> 32) &&& 0xFFFFFFFFL) -let dWw0 n = int32 (n &&& 0xFFFFFFFFL) - -let length (b:byte[]) = Array.length b -let get (b:byte[]) n = int32 (Array.get b n) -let make (f : _ -> int) n = Array.init n (fun i -> byte (f i)) -let zero_create n : byte[] = Array.zeroCreate n - -#if STANDALONE_METADATA -#else -let really_input (is:TextReader) n = - let buff = Array.create n 0uy in - really_input is buff 0 n; - buff - -let maybe_input (is:TextReader) n = - let buff = Array.create n 0uy in - let x = input is buff 0 n in - Array.sub buff 0 x - -let output (os:TextWriter) b = - Pervasives.output os b 0 (Array.length b) -#endif - -let sub ( b:byte[]) s l = Array.sub b s l -let set bb n (b:int32) = Array.set bb n (byte b) -let blit (a:byte[]) b c d e = Array.blit a b c d e -let string_as_unicode_bytes (s:string) = System.Text.Encoding.Unicode.GetBytes s -let utf8_bytes_as_string (b:byte[]) = System.Text.Encoding.UTF8.GetString b -let unicode_bytes_as_string (b:byte[]) = System.Text.Encoding.Unicode.GetString b -let compare (b1:byte[]) (b2:byte[]) = compare b1 b2 - -let to_intarray (b:byte[]) = Array.init (length b) (get b) -let of_intarray (arr:int[]) = make (fun i -> arr.[i]) (Array.length arr) - -let string_as_utf8_bytes (s:string) = System.Text.Encoding.UTF8.GetBytes s - -let append (b1: byte[]) (b2:byte[]) = Array.append b1 b2 - -let string_as_utf8_bytes_null_terminated (s:string) = - append (string_as_utf8_bytes s) (of_intarray [| 0x0 |]) - -let string_as_unicode_bytes_null_terminated (s:string) = - append (string_as_unicode_bytes s) (of_intarray [| 0x0;0x0 |]) - - -module Bytestream = - type t = { bytes: byte[]; mutable pos: int; max: int } - - let of_bytes b n len = - if n < 0 or (n+len) > length b then failwith "Bytestream.of_bytes"; - { bytes = b; pos = n; max = n+len } - - let read_byte b = - if b.pos >= b.max then failwith "Bytestream.of_bytes.read_byte: end of stream"; - let res = get b.bytes b.pos in - b.pos <- b.pos + 1; - res - - let read_bytes b n = - if b.pos + n > b.max then failwith "Bytestream.read_bytes: end of stream"; - let res = sub b.bytes b.pos n in - b.pos <- b.pos + n; - res - - let position b = b.pos - let clone_and_seek b pos = { bytes=b.bytes; pos=pos; max=b.max } - let skip b n = b.pos <- b.pos + n - - let read_utf8_bytes_as_string (b:t) n = - let res = System.Text.Encoding.UTF8.GetString(b.bytes,b.pos,n) in - b.pos <- b.pos + n; res - - -module Bytebuf = - type t = - { mutable bbArray: byte[]; - mutable bbCurrent: int } - - let create sz = - { bbArray=zero_create sz; - bbCurrent = 0; } - - let ensure_bytebuf buf new_size = - let old_buf_size = buf.bbArray.Length in - if new_size > old_buf_size then begin - let old = buf.bbArray in - buf.bbArray <- zero_create (max new_size (old_buf_size * 2)); - blit old 0 buf.bbArray 0 buf.bbCurrent; - end - - let close buf = sub buf.bbArray 0 buf.bbCurrent - - let emit_int_as_byte buf i = - let new_size = buf.bbCurrent + 1 in - ensure_bytebuf buf new_size; - set buf.bbArray buf.bbCurrent i; - buf.bbCurrent <- new_size - - let emit_byte buf (b:byte) = emit_int_as_byte buf (int b) - let emit_bool_as_byte buf (b:bool) = emit_int_as_byte buf (if b then 1 else 0) - - let emit_bytes buf i = - let n = length i in - let new_size = buf.bbCurrent + n in - ensure_bytebuf buf new_size; - blit i 0 buf.bbArray buf.bbCurrent n; - buf.bbCurrent <- new_size - - let emit_i32_as_u16 buf n = - let new_size = buf.bbCurrent + 2 in - ensure_bytebuf buf new_size; - set buf.bbArray buf.bbCurrent (b0 n); - set buf.bbArray (buf.bbCurrent + 1) (b1 n); - buf.bbCurrent <- new_size - - let emit_u16 buf (x:uint16) = emit_i32_as_u16 buf (int32 x) - - let fixup_i32 bb pos n = - set bb.bbArray pos (b0 n); - set bb.bbArray (pos + 1) (b1 n); - set bb.bbArray (pos + 2) (b2 n); - set bb.bbArray (pos + 3) (b3 n); - - let emit_i32 buf n = - let new_size = buf.bbCurrent + 4 in - ensure_bytebuf buf new_size; - fixup_i32 buf buf.bbCurrent n; - buf.bbCurrent <- new_size - - let emit_i64 buf x = - emit_i32 buf (dWw0 x); - emit_i32 buf (dWw1 x) - - let emit_intarray_as_bytes buf arr = - let n = Array.length arr in - let new_size = buf.bbCurrent + n in - ensure_bytebuf buf new_size; - let bbarr = buf.bbArray in - let bbbase = buf.bbCurrent in - for i= 0 to n - 1 do set bbarr (bbbase + i) arr.[i] done; - buf.bbCurrent <- new_size - - let length bb = bb.bbCurrent - let position bb = bb.bbCurrent - - - diff --git a/tools/FSharp_1.9.6.16/source/absil/bytes.mli b/tools/FSharp_1.9.6.16/source/absil/bytes.mli deleted file mode 100644 index a3011c87..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/bytes.mli +++ /dev/null @@ -1,75 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -/// Blobs of bytes, cross-compiling -module Microsoft.FSharp.Compiler.AbstractIL.Internal.Bytes - -open Internal.Utilities -open Internal.Utilities.Pervasives - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -val length: byte[] -> int -/// returned int will be 0 <= x <= 255 -val get: byte[] -> int -> int -val make: (int -> int) -> int -> byte[] -val zero_create: int -> byte[] -/// each int must be 0 <= x <= 255 -val of_intarray: int array -> byte[] -/// each int will be 0 <= x <= 255 - -val to_intarray: byte[] -> int array -val sub: byte[] -> int -> int -> byte[] -val set: byte[] -> int -> int -> unit -val blit: byte[] -> int -> byte[] -> int -> int -> unit -val append: byte[] -> byte[] -> byte[] -val compare: byte[] -> byte[] -> int - - -/// Read/write byte[] off a binary stream -val really_input: in_channel -> int -> byte[] -val maybe_input: in_channel -> int -> byte[] -val output: out_channel -> byte[] -> unit - -(* Bytes are commonly used for unicode strings *) -val string_as_unicode_bytes: string -> byte[] -val string_as_utf8_bytes: string -> byte[] -val unicode_bytes_as_string: byte[] -> string -val utf8_bytes_as_string: byte[] -> string - -/// included mainly for legacy reasons -val string_as_unicode_bytes_null_terminated: string -> byte[] -val string_as_utf8_bytes_null_terminated: string -> byte[] - - -/// Imperative buffers and streams of byte[] -module Bytebuf = - - type t - val create : int -> t - val emit_int_as_byte : t -> int -> unit - val emit_intarray_as_bytes : t -> int array -> unit - val close : t -> byte[] - val emit_byte : t -> byte -> unit - val emit_bool_as_byte : t -> bool -> unit - val emit_u16 : t -> uint16 -> unit - val emit_bytes : t -> byte[] -> unit - val emit_i32 : t -> int32 -> unit - val emit_i64 : t -> int64 -> unit - val emit_i32_as_u16 : t -> int32 -> unit - val length : t -> int - val position : t -> int - val fixup_i32 : t -> position:int -> value:int32 -> unit - - -module Bytestream = - type t - val of_bytes: byte[] -> int -> int -> t - val read_byte: t -> int - val position : t -> int - val clone_and_seek: t -> int -> t - val skip : t -> int -> unit - val read_bytes: t -> int -> byte[] - val read_utf8_bytes_as_string: t -> int -> string diff --git a/tools/FSharp_1.9.6.16/source/absil/il.ml b/tools/FSharp_1.9.6.16/source/absil/il.ml deleted file mode 100644 index 2e75767c..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/il.ml +++ /dev/null @@ -1,5009 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -#if STANDALONE_METADATA -module (* internal *) FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL - -open System.Collections.Generic - -#else -module (* internal *) Microsoft.FSharp.Compiler.AbstractIL.IL - -#nowarn "49" - -open Internal.Utilities -open Internal.Utilities.Pervasives -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open System.Collections.Generic - -let logging = false - -// Officially supported way to detect if we are running on Mono. -// See http://www.mono-project.com/FAQ:_Technical -// "How can I detect if am running in Mono?" section -let runningOnMono = System.Type.GetType("Mono.Runtime") <> null - -let _ = if logging then dprintn "* warning: Il.logging is on" - -let isNil x = match x with [] -> true | _ -> false -let nonNil x = match x with [] -> false | _ -> true -let int_order (a:int) b = compare a b -#endif - -let notlazy v = Lazy.CreateFromValue v - -/// A little ugly, but the idea is that if a data structure does not -/// contain lazy values then we don't add laziness. So if the thing to map -/// is already evaluated then immediately apply the function. -let lazy_map f (x:Lazy<_>) = - if x.IsForced then notlazy (f (x.Force())) else lazy (f (x.Force())) - - - -// -------------------------------------------------------------------- -// Ordered lists with a lookup table -// -------------------------------------------------------------------- - -/// This is used to store event, property and field maps. -/// -/// Review: this is not such a great data structure. -type LazyOrderedMultiMap<'key,'data>(keyf : 'data -> 'key, lazyItems : Lazy<'data list>) = - - let quickMap= - lazyItems |> lazy_map (fun entries -> - let t = new Dictionary<_,_>(entries.Length) - do entries |> List.iter (fun y -> let key = keyf y in t.[key] <- y :: (if t.ContainsKey(key) then t.[key] else [])) - t) - - member self.Entries() = lazyItems.Force() - - member self.Add(y) = new LazyOrderedMultiMap<'key,'data>(keyf, lazyItems |> lazy_map (fun x -> y :: x)) - - member self.Filter(f) = new LazyOrderedMultiMap<'key,'data>(keyf, lazyItems |> lazy_map (List.filter f)) - - member self.Item with get(x) = let t = quickMap.Force() in if t.ContainsKey x then t.[x] else [] - - -(*--------------------------------------------------------------------- - * SHA1 hash-signing algorithm. Used to get the public key token from - * the public key. - *---------------------------------------------------------------------*) - - -let b0 n = (n &&& 0xFF) -let b1 n = ((n >>> 8) &&& 0xFF) -let b2 n = ((n >>> 16) &&& 0xFF) -let b3 n = ((n >>> 24) &&& 0xFF) - - -module SHA1 = - let inline (lsr) (x:int) (y:int) = int32 (uint32 x >>> y) - let f(t,b,c,d) = - if t < 20 then (b &&& c) ||| ((~~~b) &&& d) else - if t < 40 then b ^^^ c ^^^ d else - if t < 60 then (b &&& c) ||| (b &&& d) ||| (c &&& d) else - b ^^^ c ^^^ d - - let k0to19 = 0x5A827999 - let k20to39 = 0x6ED9EBA1 - let k40to59 = 0x8F1BBCDC - let k60to79 = 0xCA62C1D6 - - let k(t) = - if t < 20 then k0to19 - elif t < 40 then k20to39 - elif t < 60 then k40to59 - else k60to79 - - - type chan = SHABytes of byte[] - type sha_instream = - { stream: chan; - mutable pos: int; - mutable eof: bool; } - - let rot_left32 x n = (x <<< n) ||| (x lsr (32-n)) - - let sha_eof sha = sha.eof - - (* padding and length (in bits!) recorded at end *) - let sha_after_eof sha = - let n = sha.pos - let len = - (match sha.stream with - | SHABytes s -> s.Length) - if n = len then 0x80 - else - let padded_len = (((len + 9 + 63) / 64) * 64) - 8 - if n < padded_len - 8 then 0x0 - elif (n &&& 63) = 56 then int32 ((int64 len * int64 8) >>> 56) &&& 0xff - elif (n &&& 63) = 57 then int32 ((int64 len * int64 8) >>> 48) &&& 0xff - elif (n &&& 63) = 58 then int32 ((int64 len * int64 8) >>> 40) &&& 0xff - elif (n &&& 63) = 59 then int32 ((int64 len * int64 8) >>> 32) &&& 0xff - elif (n &&& 63) = 60 then int32 ((int64 len * int64 8) >>> 24) &&& 0xff - elif (n &&& 63) = 61 then int32 ((int64 len * int64 8) >>> 16) &&& 0xff - elif (n &&& 63) = 62 then int32 ((int64 len * int64 8) >>> 8) &&& 0xff - elif (n &&& 63) = 63 then (sha.eof <- true; int32 (int64 len * int64 8) &&& 0xff) - else 0x0 - - let sha_read8 sha = - let b = - match sha.stream with - | SHABytes s -> if sha.pos >= s.Length then sha_after_eof sha else int32 s.[sha.pos] - sha.pos <- sha.pos + 1; - b - - let sha_read32 sha = - let b0 = sha_read8 sha - let b1 = sha_read8 sha - let b2 = sha_read8 sha - let b3 = sha_read8 sha - let res = (b0 <<< 24) ||| (b1 <<< 16) ||| (b2 <<< 8) ||| b3 - res - - - let sha1_hash sha = - let h0 = ref 0x67452301 - let h1 = ref 0xEFCDAB89 - let h2 = ref 0x98BADCFE - let h3 = ref 0x10325476 - let h4 = ref 0xC3D2E1F0 - let a = ref 0 - let b = ref 0 - let c = ref 0 - let d = ref 0 - let e = ref 0 - let w = Array.create 80 0x00 - while (not (sha_eof sha)) do - for i = 0 to 15 do - w.[i] <- sha_read32 sha - done; - for t = 16 to 79 do - w.[t] <- rot_left32 (w.[t-3] ^^^ w.[t-8] ^^^ w.[t-14] ^^^ w.[t-16]) 1; - done; - a := !h0; - b := !h1; - c := !h2; - d := !h3; - e := !h4; - for t = 0 to 79 do - let temp = (rot_left32 !a 5) + f(t,!b,!c,!d) + !e + w.[t] + k(t) - e := !d; - d := !c; - c := rot_left32 !b 30; - b := !a; - a := temp; - done; - h0 := !h0 + !a; - h1 := !h1 + !b; - h2 := !h2 + !c; - h3 := !h3 + !d; - h4 := !h4 + !e - done; - (!h0,!h1,!h2,!h3,!h4) - - let sha1_hash_bytes s = - let (h0,h1,h2,h3,h4) = sha1_hash { stream = SHABytes s; pos = 0; eof = false } - Array.map byte [| b0 h4; b1 h4; b2 h4; b3 h4; b0 h3; b1 h3; b2 h3; b3 h3; |] - - -let sha1_hash_bytes s = SHA1.sha1_hash_bytes s -(* -------------------------------------------------------------------- - * - * -------------------------------------------------------------------- *) - -type ILVersionInfo = uint16 * uint16 * uint16 * uint16 - -type Locale = string -type PublicKey = - | PublicKey of byte[] - | PublicKeyToken of byte[] - member x.IsKey=match x with PublicKey _ -> true | _ -> false - member x.IsKeyToken=match x with PublicKeyToken _ -> true | _ -> false - member x.Key=match x with PublicKey b -> b | _ -> invalid_arg "not a key" - member x.KeyToken=match x with PublicKeyToken b -> b | _ -> invalid_arg "not a key token" - - member x.ToToken() = - match x with - | PublicKey bytes -> SHA1.sha1_hash_bytes bytes - | PublicKeyToken token -> token - static member KeyAsToken(k) = PublicKeyToken(PublicKey(k).ToToken()) - -type AssemblyRefData = - { assemRefName: string; - assemRefHash: byte[] option; - assemRefPublicKeyInfo: PublicKey option; - assemRefRetargetable: bool; - assemRefVersion: ILVersionInfo option; - assemRefLocale: Locale option; } - -/// Global state: table of all assembly references keyed by AssemblyRefData -#if STANDALONE_METADATA -#else -let AssemblyRefUniqueStampGenerator = new UniqueStampGenerator() -#endif - -[] -type ILAssemblyRef(data) = -#if STANDALONE_METADATA -#else - let uniqueStamp = AssemblyRefUniqueStampGenerator.Encode(data) -#endif - member x.Name=data.assemRefName - member x.Hash=data.assemRefHash - member x.PublicKey=data.assemRefPublicKeyInfo - member x.Retargetable=data.assemRefRetargetable - member x.Version=data.assemRefVersion - member x.Locale=data.assemRefLocale -#if STANDALONE_METADATA -#else - member x.UniqueStamp=uniqueStamp - override x.GetHashCode() = uniqueStamp - override x.Equals(yobj) = ((yobj :?> ILAssemblyRef).UniqueStamp = uniqueStamp) - interface System.IComparable with - override x.CompareTo(yobj) = compare (yobj :?> ILAssemblyRef).UniqueStamp uniqueStamp -#endif - static member Create(name,hash,publicKey,retargetable,version,locale) = - ILAssemblyRef - { assemRefName=name; - assemRefHash=hash; - assemRefPublicKeyInfo=publicKey; - assemRefRetargetable=retargetable; - assemRefVersion=version; - assemRefLocale=locale; } - - static member FromAssembly(assembly:System.Reflection.Assembly) = - let aname = assembly.GetName() - let locale = None - //match aname.CultureInfo with - // | null -> None - // | x -> Some x.Name - let publicKey = - match aname.GetPublicKey() with - | null -> - match aname.GetPublicKeyToken() with - | null -> None - | bytes -> Some (PublicKeyToken bytes) - | bytes -> - Some (PublicKey bytes) - - let version = - match aname.Version with - | null -> None - | v -> Some (uint16 v.Major,uint16 v.Minor,uint16 v.Build,uint16 v.Revision) - - ILAssemblyRef.Create(aname.Name,None,publicKey,false,version,locale) - - member aref.QualifiedName = - let b = new System.Text.StringBuilder(100) - let add (s:string) = (b.Append(s) |> ignore) - let addC (s:char) = (b.Append(s) |> ignore) - add(aref.Name); - begin match aref.Version with - | None -> () - | Some (a,b,c,d) -> - add ", Version="; - add (string (int a)) - add "."; - add (string (int b)) - add "."; - add (string (int c)) - add "."; - add (string (int d)) - add ", Culture=" - begin match aref.Locale with - | None -> add "neutral" - | Some b -> add b - end; - add ", PublicKeyToken=" - begin match aref.PublicKey with - | None -> add "null" - | Some pki -> - let pkt = pki.ToToken() - let convDigit(digit) = - let digitc = - if digit < 10 - then System.Convert.ToInt32 '0' + digit - else System.Convert.ToInt32 'a' + (digit - 10) - System.Convert.ToChar(digitc) - for i = 0 to pkt.Length-1 do - let v = pkt.[i] - addC (convDigit(System.Convert.ToInt32(v)/16)) - addC (convDigit(System.Convert.ToInt32(v)%16)) - done - end - end; - b.ToString() - - -type ILModuleRef = - { name: string; - hasMetadata: bool; - hash: byte[] option; } - static member Create(name,hasMetadata,hash) = - { name=name; - hasMetadata= hasMetadata; - hash=hash } - - member x.Name=x.name - member x.HasMetadata=x.hasMetadata - member x.Hash=x.hash - -type ILScopeRef = - | ScopeRef_local - | ScopeRef_module of ILModuleRef - | ScopeRef_assembly of ILAssemblyRef - static member Local = ScopeRef_local - static member Module(mref) = ScopeRef_module(mref) - static member Assembly(aref) = ScopeRef_assembly(aref) - member x.IsLocalRef = match x with ScopeRef_local -> true | _ -> false - member x.IsModuleRef = match x with ScopeRef_module _ -> true | _ -> false - member x.IsAssemblyRef= match x with ScopeRef_assembly _ -> true | _ -> false - member x.ModuleRef = match x with ScopeRef_module x -> x | _ -> failwith "not a module reference" - member x.AssemblyRef = match x with ScopeRef_assembly x -> x | _ -> failwith "not an assembly reference" - - member scoref.QualifiedName = - match scoref with - | ScopeRef_local -> "" - | ScopeRef_module mref -> "module "^mref.Name - | ScopeRef_assembly aref when aref.Name = "mscorlib" -> "" - | ScopeRef_assembly aref -> aref.QualifiedName - - member scoref.QualifiedNameWithNoShortMscorlib = - match scoref with - | ScopeRef_local -> "" - | ScopeRef_module mref -> "module "^mref.Name - | ScopeRef_assembly aref -> aref.QualifiedName - -type ILArrayBound = int32 option -type ILArrayBounds = ILArrayBound * ILArrayBound -type ILArrayShape = - | ILArrayShape of ILArrayBounds list (* lobound/size pairs *) - member x.Rank = (let (ILArrayShape l) = x in l.Length) - - -/// Calling conventions. These are used in method pointer types. -type ILArgumentConvention = - | CC_default - | CC_cdecl - | CC_stdcall - | CC_thiscall - | CC_fastcall - | CC_vararg - -type ILThisConvention = - | CC_instance - | CC_instance_explicit - | CC_static - -let mutable instance_callconv : obj = new obj() -let mutable static_callconv : obj = new obj() - -type ILCallingConv = - | Callconv of ILThisConvention * ILArgumentConvention - member x.ThisConv = let (Callconv(a,b)) = x in a - member x.BasicConv = let (Callconv(a,b)) = x in b - member x.IsInstance = match x.ThisConv with CC_instance -> true | _ -> false - member x.IsInstanceExplicit = match x.ThisConv with CC_instance_explicit -> true | _ -> false - member x.IsStatic = match x.ThisConv with CC_static -> true | _ -> false - - static member Instance : ILCallingConv = unbox(instance_callconv) - static member Static : ILCallingConv = unbox(static_callconv) - -do instance_callconv <- box (Callconv(CC_instance,CC_default)) -do static_callconv <- box (Callconv(CC_static,CC_default)) - -let callconv_eq (a:ILCallingConv) b = (a = b) - -type ILBoxity = - | AsObject - | AsValue - - -// IL type references have a pre-computed hash code to enable quick lookup tables during binary generation. -[] -type ILTypeRef = - { trefScope: ILScopeRef; - trefEnclosing: string list; - trefName: string; - hashCode : int } - - static member Create(scope,enclosing,name) = - let hashCode = hash scope * 17 ^^^ (hash enclosing * 101 <<< 1) ^^^ (hash name * 47 <<< 2) - { trefScope=scope; - trefEnclosing= enclosing; - trefName=name; - hashCode=hashCode } - - member x.Scope= x.trefScope - member x.Enclosing= x.trefEnclosing - member x.Name=x.trefName - member x.ApproxId= x.hashCode - override x.GetHashCode() = x.hashCode - override x.Equals(yobj) = - let y = (yobj :?> ILTypeRef) - (x.ApproxId = y.ApproxId) && - (x.Scope = y.Scope) && - (x.Name = y.Name) && - (x.Enclosing = y.Enclosing) - interface System.IComparable with - override x.CompareTo(yobj) = - let y = (yobj :?> ILTypeRef) - let c = compare x.ApproxId y.ApproxId - if c <> 0 then c else - let c = compare x.Scope y.Scope - if c <> 0 then c else - let c = compare x.Name y.Name - if c <> 0 then c else - compare x.Enclosing y.Enclosing - - member tref.FullName = String.concat "." (tref.Enclosing @ [tref.Name]) - - member tref.BasicQualifiedName = - String.concat "+" (tref.Enclosing @ [ tref.Name ]) - - member tref.AddQualifiedNameExtensionWithNoShortMscorlib(basic) = - let sco = tref.Scope.QualifiedNameWithNoShortMscorlib - if sco = "" then basic else String.concat ", " [basic;sco] - - member tref.QualifiedNameWithNoShortMscorlib = - tref.AddQualifiedNameExtensionWithNoShortMscorlib(tref.BasicQualifiedName) - - member tref.QualifiedName = - let basic = tref.BasicQualifiedName - let sco = tref.Scope.QualifiedName - if sco = "" then basic else String.concat ", " [basic;sco] - - - override x.ToString() = x.FullName - - -type ILTypeSpec = - { tspecTypeRef: ILTypeRef; - /// The type instantiation if the type is generic - tspecInst: ILGenericArgs } - member x.TypeRef=x.tspecTypeRef - member x.Scope=x.TypeRef.Scope - member x.Enclosing=x.TypeRef.Enclosing - member x.Name=x.TypeRef.Name - member x.GenericArgs=x.tspecInst - static member Create(tref,inst) = { tspecTypeRef =tref; tspecInst=inst } - override x.ToString() = x.TypeRef.ToString() + (match x.GenericArgs with [] -> "" | _ -> "<...>") - member x.BasicQualifiedName = - let tc = x.TypeRef.BasicQualifiedName - match x.GenericArgs with - | [] -> tc - | args -> tc + "[" + String.concat "," (args |> List.map (fun arg -> "[" + arg.QualifiedNameWithNoShortMscorlib + "]")) + "]" - - member x.AddQualifiedNameExtensionWithNoShortMscorlib(basic) = - x.TypeRef.AddQualifiedNameExtensionWithNoShortMscorlib(basic) - -and ILType = - | Type_void - | Type_array of ILArrayShape * ILType - | Type_value of ILTypeSpec - | Type_boxed of ILTypeSpec - | Type_ptr of ILType - | Type_byref of ILType - | Type_fptr of ILCallingSignature - | Type_tyvar of uint16 - | Type_modified of bool * ILTypeRef * ILType - - member x.BasicQualifiedName = - match x with - | Type_tyvar n -> "!" + string n - | Type_modified(_,ty1,ty2) -> ty2.BasicQualifiedName - | Type_array (ILArrayShape(s),ty) -> ty.BasicQualifiedName + "[" + System.String(',',s.Length-1) + "]" - | Type_value tr | Type_boxed tr -> tr.BasicQualifiedName - | Type_void -> failwith "unexpected void type" - | Type_ptr ty -> failwith "unexpected pointer type" - | Type_byref ty -> failwith "unexpected byref type" - | Type_fptr mref -> failwith "unexpected function pointer type" - - member x.AddQualifiedNameExtensionWithNoShortMscorlib(basic) = - match x with - | Type_tyvar n -> basic - | Type_modified(_,ty1,ty2) -> ty2.AddQualifiedNameExtensionWithNoShortMscorlib(basic) - | Type_array (ILArrayShape(s),ty) -> ty.AddQualifiedNameExtensionWithNoShortMscorlib(basic) - | Type_value tr | Type_boxed tr -> tr.AddQualifiedNameExtensionWithNoShortMscorlib(basic) - | Type_void -> failwith "unexpected void type" - | Type_ptr ty -> failwith "unexpected pointer type" - | Type_byref ty -> failwith "unexpected byref type" - | Type_fptr mref -> failwith "unexpected function pointer type" - - member x.QualifiedNameWithNoShortMscorlib = - x.AddQualifiedNameExtensionWithNoShortMscorlib(x.BasicQualifiedName) - -and IlxExtensionType = Ext_typ of obj - -and ILCallingSignature = - { callsigCallconv: ILCallingConv; - callsigArgs: ILType list; - callsigReturn: ILType } - member x.CallingConv = x.callsigCallconv - member x.ArgTypes = x.callsigArgs - member x.ReturnType = x.callsigReturn - - -and ILGenericParameterDefs = ILGenericParameterDef list -and ILGenericArgs = ILType list -and ILGenericVariance = - | NonVariant - | CoVariant - | ContraVariant - -and ILGenericParameterDef = - { gpName: string; - gpConstraints: ILType list; - gpVariance: ILGenericVariance; - gpReferenceTypeConstraint: bool; - gpNotNullableValueTypeConstraint: bool; - gpDefaultConstructorConstraint: bool; } - - member x.Name = x.gpName - member x.Constraints = x.gpConstraints - member x.Variance = x.gpVariance - member x.HasReferenceTypeConstraint = x.gpReferenceTypeConstraint - member x.HasNotNullableValueTypeConstraint = x.gpNotNullableValueTypeConstraint - member x.HasDefaultConstructorConstraint = x.gpDefaultConstructorConstraint - override x.ToString() = x.Name - -let mk_callsig (cc,args,ret) = { callsigArgs=args; callsigCallconv=cc; callsigReturn=ret} - - -type ILMethodRef = - { mrefParent: ILTypeRef; - mrefCallconv: ILCallingConv; - mrefGenericArity: int; - mrefName: string; - mrefArgs: ILType list; - mrefReturn: ILType } - member x.EnclosingTypeRef = x.mrefParent - member x.CallingConv = x.mrefCallconv - member x.Name = x.mrefName - member x.GenericArity = x.mrefGenericArity - member x.ArgCount = x.mrefArgs.Length - member x.ArgTypes = x.mrefArgs - member x.ReturnType = x.mrefReturn - - member x.CallingSignature = mk_callsig (x.CallingConv,x.ArgTypes,x.ReturnType) - static member Create(a,b,c,d,e,f) = - { mrefParent= a;mrefCallconv=b;mrefName=c;mrefGenericArity=d; mrefArgs=e;mrefReturn=f } - override x.ToString() = x.Name + "(...)" - - -type ILFieldRef = - { frefParent: ILTypeRef; - frefName: string; - frefType: ILType } - member x.EnclosingTypeRef = x.frefParent - member x.Name = x.frefName - member x.Type = x.frefType - -type ILMethodSpec = - { mspecMethodRefF: ILMethodRef; - mspecEnclosingTypeF: ILType; - mspecMethodInstF: ILGenericArgs; } - static member Create(a,b,c) = { mspecEnclosingTypeF=a; mspecMethodRefF =b; mspecMethodInstF=c } - member x.MethodRef = x.mspecMethodRefF - member x.EnclosingType=x.mspecEnclosingTypeF - member x.GenericArgs=x.mspecMethodInstF - member x.Name=x.MethodRef.Name - member x.CallingConv=x.MethodRef.CallingConv - member x.GenericArity = x.MethodRef.GenericArity - member x.FormalArgTypes = x.MethodRef.ArgTypes - member x.FormalReturnType = x.MethodRef.ReturnType - override x.ToString() = x.Name + "(...)" - -let dest_mspec x = (x.mspecMethodRefF, x.mspecEnclosingTypeF, x.mspecMethodInstF) - -type ILFieldSpec = - { fspecFieldRef: ILFieldRef; - fspecEnclosingType: ILType } - member x.FieldRef = x.fspecFieldRef - member x.EnclosingType = x.fspecEnclosingType - member x.FormalType = x.FieldRef.Type - member x.Name = x.FieldRef.Name - member x.EnclosingTypeRef = x.FieldRef.EnclosingTypeRef - override x.ToString() = x.Name - - -(* -------------------------------------------------------------------- - * Debug info. - * -------------------------------------------------------------------- *) - -type Guid = byte[] - -type ILPlatform = - | X86 - | AMD64 - | IA64 - -type ILSourceDocument = - { sourceLanguage: Guid option; - sourceVendor: Guid option; - sourceDocType: Guid option; - sourceFile: string; } - static member Create(language,vendor,docType,file) = - { sourceLanguage=language; - sourceVendor=vendor; - sourceDocType=docType; - sourceFile=file; } - member x.Language=x.sourceLanguage - member x.Vendor=x.sourceVendor - member x.DocumentType=x.sourceDocType - member x.File=x.sourceFile - -type ILSourceMarker = - { sourceDocument: ILSourceDocument; - sourceLine: int; - sourceColumn: int; - sourceEndLine: int; - sourceEndColumn: int } - static member Create(document, line, column, endLine, endColumn) = - { sourceDocument=document; - sourceLine=line; - sourceColumn=column; - sourceEndLine=endLine; - sourceEndColumn=endColumn } - member x.Document=x.sourceDocument - member x.Line=x.sourceLine - member x.Column=x.sourceColumn - member x.EndLine=x.sourceEndLine - member x.EndColumn=x.sourceEndColumn - override x.ToString() = sprintf "(%d,%d)-(%d,%d)" x.Line x.Column x.EndLine x.EndColumn - -(* -------------------------------------------------------------------- - * Custom attributes - * -------------------------------------------------------------------- *) - -type ILAttributeElement = - | CustomElem_string of string option - | CustomElem_bool of bool - | CustomElem_char of char - | CustomElem_int8 of int8 - | CustomElem_int16 of int16 - | CustomElem_int32 of int32 - | CustomElem_int64 of int64 - | CustomElem_uint8 of uint8 - | CustomElem_uint16 of uint16 - | CustomElem_uint32 of uint32 - | CustomElem_uint64 of uint64 - | CustomElem_float32 of single - | CustomElem_float64 of double - | CustomElem_type of ILType - | CustomElem_tref of ILTypeRef - | CustomElem_array of ILAttributeElement list - -type ILAttributeNamedArg = (string * ILType * bool * ILAttributeElement) -type ILAttribute = - { customMethod: ILMethodSpec; - customData: byte[] } - member x.Data = x.customData - member x.Method =x.customMethod - -type ILAttributes = - CustomAttrs of Lazy - -type ILCodeLabel = int - -(* -------------------------------------------------------------------- - * Instruction set. - * -------------------------------------------------------------------- *) - -type ILBasicType = - | DT_R - | DT_I1 - | DT_U1 - | DT_I2 - | DT_U2 - | DT_I4 - | DT_U4 - | DT_I8 - | DT_U8 - | DT_R4 - | DT_R8 - | DT_I - | DT_U - | DT_REF - -type ILTokenSpec = - | Token_type of ILType - | Token_method of ILMethodSpec - | Token_field of ILFieldSpec - -type ILConstSpec = - | NUM_I4 of int32 - | NUM_I8 of int64 - | NUM_R4 of single - | NUM_R8 of double - -type Tailcall = - | Tailcall - | Normalcall - -type Alignment = - | Aligned - | Unaligned_1 - | Unaligned_2 - | Unaligned_4 - -type Volatility = - | Volatile - | Nonvolatile - -type ReadonlySpec = - | ReadonlyAddress - | NormalAddress - -type varargs = ILType list option - -type ILComparisonInstr = - | BI_beq - | BI_bge - | BI_bge_un - | BI_bgt - | BI_bgt_un - | BI_ble - | BI_ble_un - | BI_blt - | BI_blt_un - | BI_bne_un - | BI_brfalse - | BI_brtrue - -type ILArithInstr = - | AI_add - | AI_add_ovf - | AI_add_ovf_un - | AI_and - | AI_div - | AI_div_un - | AI_ceq - | AI_cgt - | AI_cgt_un - | AI_clt - | AI_clt_un - | AI_conv of ILBasicType - | AI_conv_ovf of ILBasicType - | AI_conv_ovf_un of ILBasicType - | AI_mul - | AI_mul_ovf - | AI_mul_ovf_un - | AI_rem - | AI_rem_un - | AI_shl - | AI_shr - | AI_shr_un - | AI_sub - | AI_sub_ovf - | AI_sub_ovf_un - | AI_xor - | AI_or - | AI_neg - | AI_not - | AI_ldnull - | AI_dup - | AI_pop - | AI_ckfinite - | AI_nop - | AI_ldc of ILBasicType * ILConstSpec - - -type ILInstr = - | I_arith of ILArithInstr - | I_ldarg of uint16 - | I_ldarga of uint16 - | I_ldind of Alignment * Volatility * ILBasicType - | I_ldloc of uint16 - | I_ldloca of uint16 - | I_starg of uint16 - | I_stind of Alignment * Volatility * ILBasicType - | I_stloc of uint16 - - | I_br of ILCodeLabel - | I_jmp of ILMethodSpec - | I_brcmp of ILComparisonInstr * ILCodeLabel * ILCodeLabel (* second label is fall-through *) - | I_switch of (ILCodeLabel list * ILCodeLabel) (* last label is fallthrough *) - | I_ret - - | I_call of Tailcall * ILMethodSpec * varargs - | I_callvirt of Tailcall * ILMethodSpec * varargs - | I_callconstraint of Tailcall * ILType * ILMethodSpec * varargs - | I_calli of Tailcall * ILCallingSignature * varargs - | I_ldftn of ILMethodSpec - | I_newobj of ILMethodSpec * varargs - - | I_throw - | I_endfinally - | I_endfilter - | I_leave of ILCodeLabel - - | I_ldsfld of Volatility * ILFieldSpec - | I_ldfld of Alignment * Volatility * ILFieldSpec - | I_ldsflda of ILFieldSpec - | I_ldflda of ILFieldSpec - | I_stsfld of Volatility * ILFieldSpec - | I_stfld of Alignment * Volatility * ILFieldSpec - | I_ldstr of string - | I_isinst of ILType - | I_castclass of ILType - | I_ldtoken of ILTokenSpec - | I_ldvirtftn of ILMethodSpec - - | I_cpobj of ILType - | I_initobj of ILType - | I_ldobj of Alignment * Volatility * ILType - | I_stobj of Alignment * Volatility * ILType - | I_box of ILType - | I_unbox of ILType - | I_unbox_any of ILType - | I_sizeof of ILType - - | I_ldelem of ILBasicType - | I_stelem of ILBasicType - | I_ldelema of ReadonlySpec * ILArrayShape * ILType - | I_ldelem_any of ILArrayShape * ILType - | I_stelem_any of ILArrayShape * ILType - | I_newarr of ILArrayShape * ILType - | I_ldlen - - | I_mkrefany of ILType - | I_refanytype - | I_refanyval of ILType - | I_rethrow - - | I_break - | I_seqpoint of ILSourceMarker - - | I_arglist - - | I_localloc - | I_cpblk of Alignment * Volatility - | I_initblk of Alignment * Volatility - - (* FOR EXTENSIONS, e.g. MS-ILX *) - | EI_ilzero of ILType - | EI_ldlen_multi of int32 * int32 - | I_other of IlxExtensionInstr - -and IlxExtensionInstr = Ext_instr of obj - - -type ILDebugMapping = - { localNum: int; - localName: string; } - member x.LocalVarIndex = x.localNum - member x.Name = x.localName - -type ILBasicBlock = - { bblockLabel: ILCodeLabel; - bblockInstrs: ILInstr array } - member x.Label = x.bblockLabel - member x.Instructions = x.bblockInstrs - -type ILCode = - | ILBasicBlock of ILBasicBlock - | GroupBlock of ILDebugMapping list * ILCode list - | RestrictBlock of ILCodeLabel list * ILCode - | TryBlock of ILCode * ILExceptionBlock - -and ILExceptionBlock = - | FaultBlock of ILCode - | FinallyBlock of ILCode - | FilterCatchBlock of (ILFilterBlock * ILCode) list - -and ILFilterBlock = - | TypeFilter of ILType - | CodeFilter of ILCode - -type Local = - { localType: ILType; - localPinned: bool } - member x.Type = x.localType - member x.IsPinned = x.localPinned - -type ILMethodBody = - { ilZeroInit: bool; - ilMaxStack: int32; - ilNoInlining: bool; - ilLocals: Local list; - ilCode: ILCode; - ilSource: ILSourceMarker option } - -type ILMemberAccess = - | MemAccess_assembly - | MemAccess_compilercontrolled - | MemAccess_famandassem - | MemAccess_famorassem - | MemAccess_family - | MemAccess_private - | MemAccess_public - -and ILFieldInit = - | FieldInit_string of string - | FieldInit_bool of bool - | FieldInit_char of uint16 - | FieldInit_int8 of int8 - | FieldInit_int16 of int16 - | FieldInit_int32 of int32 - | FieldInit_int64 of int64 - | FieldInit_uint8 of uint8 - | FieldInit_uint16 of uint16 - | FieldInit_uint32 of uint32 - | FieldInit_uint64 of uint64 - | FieldInit_single of single - | FieldInit_double of double - | FieldInit_ref - -// -------------------------------------------------------------------- -// Native Types, for marshalling to the native C interface. -// These are taken directly from the ILASM syntax, and don't really -// correspond yet to the ECMA Spec (Partition II, 7.4). -// -------------------------------------------------------------------- - -type ILNativeType = - | NativeType_empty - | NativeType_custom of Guid * string * string * byte[] (* guid,nativeTypeName,custMarshallerName,cookieString *) - | NativeType_fixed_sysstring of int32 - | NativeType_fixed_array of int32 - | NativeType_currency - | NativeType_lpstr - | NativeType_lpwstr - | NativeType_lptstr - | NativeType_byvalstr - | NativeType_tbstr - | NativeType_lpstruct - | NativeType_struct - | NativeType_void - | NativeType_bool - | NativeType_int8 - | NativeType_int16 - | NativeType_int32 - | NativeType_int64 - | NativeType_float32 - | NativeType_float64 - | NativeType_unsigned_int8 - | NativeType_unsigned_int16 - | NativeType_unsigned_int32 - | NativeType_unsigned_int64 - | NativeType_array of ILNativeType option * (int32 * int32 option) option (* optional idx of parameter giving size plus optional additive i.e. num elems *) - | NativeType_int - | NativeType_unsigned_int - | NativeType_method - | NativeType_as_any - | (* COM interop *) NativeType_bstr - | (* COM interop *) NativeType_iunknown - | (* COM interop *) NativeType_idsipatch - | (* COM interop *) NativeType_interface - | (* COM interop *) NativeType_error - | (* COM interop *) NativeType_safe_array of ILNativeVariantType * string option - | (* COM interop *) NativeType_ansi_bstr - | (* COM interop *) NativeType_variant_bool - - - and ILNativeVariantType = - | VariantType_empty - | VariantType_null - | VariantType_variant - | VariantType_currency - | VariantType_decimal - | VariantType_date - | VariantType_bstr - | VariantType_lpstr - | VariantType_lpwstr - | VariantType_iunknown - | VariantType_idispatch - | VariantType_safearray - | VariantType_error - | VariantType_hresult - | VariantType_carray - | VariantType_userdefined - | VariantType_record - | VariantType_filetime - | VariantType_blob - | VariantType_stream - | VariantType_storage - | VariantType_streamed_object - | VariantType_stored_object - | VariantType_blob_object - | VariantType_cf - | VariantType_clsid - | VariantType_void - | VariantType_bool - | VariantType_int8 - | VariantType_int16 - | VariantType_int32 - | VariantType_int64 - | VariantType_float32 - | VariantType_float64 - | VariantType_unsigned_int8 - | VariantType_unsigned_int16 - | VariantType_unsigned_int32 - | VariantType_unsigned_int64 - | VariantType_ptr - | VariantType_array of ILNativeVariantType - | VariantType_vector of ILNativeVariantType - | VariantType_byref of ILNativeVariantType - | VariantType_int - | VariantType_unsigned_int - -and ILSecurityAction = - | SecAction_request - | SecAction_demand - | SecAction_assert - | SecAction_deny - | SecAction_permitonly - | SecAction_linkcheck - | SecAction_inheritcheck - | SecAction_reqmin - | SecAction_reqopt - | SecAction_reqrefuse - | SecAction_prejitgrant - | SecAction_prejitdeny - | SecAction_noncasdemand - | SecAction_noncaslinkdemand - | SecAction_noncasinheritance - | SecAction_linkdemandchoice - | SecAction_inheritancedemandchoice - | SecAction_demandchoice - -and ILPermission = - | PermissionSet of ILSecurityAction * byte[] - -and ILPermissions = - | SecurityDecls of Lazy - -and PInvokeMethod = - { pinvokeWhere: ILModuleRef; - pinvokeName: string; - pinvokeCallconv: PInvokeCallingConvention; - PInvokeCharEncoding: PInvokeCharEncoding; - pinvokeNoMangle: bool; - pinvokeLastErr: bool; - PInvokeThrowOnUnmappableChar: PInvokeThrowOnUnmappableChar; - PInvokeCharBestFit: PInvokeCharBestFit } - member x.Where = x.pinvokeWhere - member x.Name = x.pinvokeName - member x.CallingConv = x.pinvokeCallconv - member x.CharEncoding = x.PInvokeCharEncoding - member x.NoMangle = x.pinvokeNoMangle - member x.LastError = x.pinvokeLastErr - member x.ThrowOnUnmappableChar = x.PInvokeThrowOnUnmappableChar - member x.CharBestFit = x.PInvokeCharBestFit - -and PInvokeCharBestFit = - | PInvokeBestFitUseAssem - | PInvokeBestFitEnabled - | PInvokeBestFitDisabled - -and PInvokeThrowOnUnmappableChar = - | PInvokeThrowOnUnmappableCharUseAssem - | PInvokeThrowOnUnmappableCharEnabled - | PInvokeThrowOnUnmappableCharDisabled - -and PInvokeCallingConvention = - | PInvokeCallConvNone - | PInvokeCallConvCdecl - | PInvokeCallConvStdcall - | PInvokeCallConvThiscall - | PInvokeCallConvFastcall - | PInvokeCallConvWinapi - -and PInvokeCharEncoding = - | PInvokeEncodingNone - | PInvokeEncodingAnsi - | PInvokeEncodingUnicode - | PInvokeEncodingAuto - -and ILParameter = - { paramName: string option; - paramType: ILType; - paramDefault: ILFieldInit option; - paramMarshal: ILNativeType option; - paramIn: bool; - paramOut: bool; - paramOptional: bool; - paramCustomAttrs: ILAttributes } - member x.Name = x.paramName - member x.Type = x.paramType - member x.Default = x.paramDefault - member x.Marshal = x.paramMarshal - member x.IsIn = x.paramIn - member x.IsOut = x.paramOut - member x.IsOptional = x.paramOptional - member x.CustomAttrs = x.paramCustomAttrs - - -type ILReturnValue = - { returnMarshal: ILNativeType option; - returnType: ILType; - returnCustomAttrs: ILAttributes } - member x.Type = x.returnType - member x.Marshal = x.returnMarshal - member x.CustomAttrs = x.returnCustomAttrs - -type OverridesSpec = - | OverridesSpec of ILMethodRef * ILType - member x.MethodRef = let (OverridesSpec(mr,ty)) = x in mr - member x.EnclosingType = let (OverridesSpec(mr,ty)) = x in ty - -type ILMethodVirtualInfo = - { virtFinal: bool; - virtNewslot: bool; - virtStrict: bool; (* mdCheckAccessOnOverride *) - virtAbstract: bool; - } - member x.IsFinal = x.virtFinal - member x.IsNewSlot = x.virtNewslot - member x.IsCheckAccessOnOverride = x.virtStrict - member x.IsAbstract = x.virtAbstract - -type MethodKind = - | MethodKind_static - | MethodKind_cctor - | MethodKind_ctor - | MethodKind_nonvirtual - | MethodKind_virtual of ILMethodVirtualInfo - -type MethodBody = - | MethodBody_il of ILMethodBody - | MethodBody_pinvoke of PInvokeMethod (* platform invoke to native *) - | MethodBody_abstract - | MethodBody_native - -type LazyMethodBody = LazyMethodBody of Lazy - -type MethodCodeKind = - | MethodCodeKind_il - | MethodCodeKind_native - | MethodCodeKind_runtime - -let mk_mbody mb = LazyMethodBody (Lazy.CreateFromValue mb) -let dest_mbody (LazyMethodBody mb) = mb.Force() -let mk_lazy_mbody mb = LazyMethodBody mb - -let typs_of_params (ps:ILParameter list) = ps |> List.map (fun p -> p.Type) - -type ILMethodDef = - { mdName: string; - mdKind: MethodKind; - mdCallconv: ILCallingConv; - mdParams: ILParameter list; - mdReturn: ILReturnValue; - mdAccess: ILMemberAccess; - mdBody: LazyMethodBody; - mdCodeKind: MethodCodeKind; - mdInternalCall: bool; - mdManaged: bool; - mdForwardRef: bool; - mdSecurityDecls: ILPermissions; - mdHasSecurity: bool; - mdEntrypoint:bool; - mdReqSecObj: bool; - mdHideBySig: bool; - mdSpecialName: bool; - mdUnmanagedExport: bool; - mdSynchronized: bool; - mdPreserveSig: bool; - mdMustRun: bool; - mdExport: (int32 * string option) option; - mdVtableEntry: (int32 * int32) option; - - mdGenericParams: ILGenericParameterDefs; - mdCustomAttrs: ILAttributes; } - member x.Name = x.mdName - member x.CallingConv = x.mdCallconv - member x.Parameters = x.mdParams - member x.ParameterTypes = typs_of_params x.mdParams - member x.Return = x.mdReturn - member x.Access = x.mdAccess - member x.IsInternalCall = x.mdInternalCall - member x.IsManaged = x.mdManaged - member x.IsForwardRef = x.mdForwardRef - member x.SecurityDecls = x.mdSecurityDecls - member x.HasSecurity = x.mdHasSecurity - member x.IsEntrypoint = x.mdEntrypoint - member x.IsReqSecObj = x.mdReqSecObj - member x.IsHideBySig = x.mdHideBySig - member x.IsUnmanagedExport = x.mdUnmanagedExport - member x.IsSynchronized = x.mdSynchronized - member x.IsPreserveSig = x.mdPreserveSig - // Whidbey feature: SafeHandle finalizer must be run - member x.IsMustRun = x.mdMustRun - member x.GenericParams = x.mdGenericParams - member x.CustomAttrs = x.mdCustomAttrs - member md.Code = - match dest_mbody md.mdBody with - | MethodBody_il il-> Some il.ilCode - | _ -> None - member x.IsIL = match dest_mbody x.mdBody with | MethodBody_il _ -> true | _ -> false - member x.Locals = match dest_mbody x.mdBody with | MethodBody_il il -> il.ilLocals | _ -> [] - - member x.MethodBody = match dest_mbody x.mdBody with MethodBody_il il -> il | _ -> failwith "ilmbody_of_mdef: not IL" - - member x.IsNoInline = x.MethodBody.ilNoInlining - member x.SourceMarker = x.MethodBody.ilSource - member x.MaxStack = x.MethodBody.ilMaxStack - member x.IsZeroInit = x.MethodBody.ilZeroInit - - member x.IsClassInitializer = match x.mdKind with | MethodKind_cctor -> true | _ -> false - member x.IsConstructor = match x.mdKind with | MethodKind_ctor -> true | _ -> false - member x.IsStatic = match x.mdKind with | MethodKind_static -> true | _ -> false - member x.IsNonVirtualInstance = match x.mdKind with | MethodKind_nonvirtual -> true | _ -> false - member x.IsVirtual = match x.mdKind with | MethodKind_virtual _ -> true | _ -> false - - member x.IsFinal = match x.mdKind with | MethodKind_virtual v -> v.virtFinal | _ -> invalid_arg "ILMethodDef.IsFinal" - member x.IsNewSlot = match x.mdKind with | MethodKind_virtual v -> v.virtNewslot | _ -> invalid_arg "ILMethodDef.IsNewSlot" - member x.IsCheckAccessOnOverride= match x.mdKind with | MethodKind_virtual v -> v.virtStrict | _ -> invalid_arg "ILMethodDef.IsCheckAccessOnOverride" - member x.IsAbstract = match x.mdKind with | MethodKind_virtual v -> v.virtAbstract | _ -> invalid_arg "ILMethodDef.IsAbstract" - -/// Index table by name and arity. -type ILMethodDefs = Methods of Lazy -and MethodDefMap = Map - -type ILEventDef = - { eventType: ILType option; - eventName: string; - eventRTSpecialName: bool; - eventSpecialName: bool; - eventAddOn: ILMethodRef; - eventRemoveOn: ILMethodRef; - eventFire: ILMethodRef option; - eventOther: ILMethodRef list; - eventCustomAttrs: ILAttributes; } - member x.Type = x.eventType - member x.Name = x.eventName - member x.AddMethod = x.eventAddOn - member x.RemoveMethod = x.eventRemoveOn - member x.FireMethod = x.eventFire - member x.OtherMethods = x.eventOther - member x.CustomAttrs = x.eventCustomAttrs - -(* Index table by name. *) -type ILEventDefs = Events of LazyOrderedMultiMap - -type ILPropertyDef = - { propName: string; - propRTSpecialName: bool; - propSpecialName: bool; - propSet: ILMethodRef option; - propGet: ILMethodRef option; - propCallconv: ILThisConvention; - propType: ILType; - propInit: ILFieldInit option; - propArgs: ILType list; - propCustomAttrs: ILAttributes; } - member x.Name = x.propName - member x.SetMethod = x.propSet - member x.GetMethod = x.propGet - member x.CallingConv = x.propCallconv - member x.Type = x.propType - member x.Init = x.propInit - member x.Args = x.propArgs - member x.CustomAttrs = x.propCustomAttrs - -// Index table by name. -type PropertyDefs = Properties of LazyOrderedMultiMap - -type ILFieldDef = - { fdName: string; - fdType: ILType; - fdStatic: bool; - fdAccess: ILMemberAccess; - fdData: byte[] option; - fdInit: ILFieldInit option; - fdOffset: int32 option; (* -- the explicit offset in bytes *) - fdSpecialName: bool; - fdMarshal: ILNativeType option; - fdNotSerialized: bool; - fdLiteral: bool ; - fdInitOnly: bool; - fdCustomAttrs: ILAttributes; } - member x.Name = x.fdName - member x.Type = x.fdType - member x.IsStatic = x.fdStatic - member x.Access = x.fdAccess - member x.Data = x.fdData - member x.LiteralValue = x.fdInit - /// The explicit offset in bytes when explicit layout is used. - member x.Offset = x.fdOffset - member x.Marshal = x.fdMarshal - member x.NotSerialized = x.fdNotSerialized - member x.IsLiteral = x.fdLiteral - member x.IsInitOnly = x.fdInitOnly - member x.CustomAttrs = x.fdCustomAttrs - - -// Index table by name. Keep a canonical list to make sure field order is not disturbed for binary manipulation. -type ILFieldDefs = - | Fields of LazyOrderedMultiMap - -type ILMethodImplDef = - { mimplOverrides: OverridesSpec; - mimplOverrideBy: ILMethodSpec } - -// Index table by name and arity. -type ILMethodImplDefs = - | MethodImpls of Lazy -and MethodImplsMap = Map - -type ILTypeDefLayout = - | TypeLayout_auto - | TypeLayout_sequential of ILTypeDefLayoutInfo - | TypeLayout_explicit of ILTypeDefLayoutInfo (* REVIEW: add field info here *) - -and ILTypeDefLayoutInfo = - { typeSize: int32 option; - typePack: uint16 option } - member x.Size = x.typeSize - member x.Pack = x.typePack - -type ILTypeDefInitSemantics = - | TypeInit_beforefield - | TypeInit_beforeany - -type ILDefaultPInvokeEncoding = - | TypeEncoding_ansi - | TypeEncoding_autochar - | TypeEncoding_unicode - -type ILTypeDefAccess = - | TypeAccess_public - | TypeAccess_private - | TypeAccess_nested of ILMemberAccess - -type ILTypeDefKind = - | TypeDef_class - | TypeDef_valuetype - | TypeDef_interface - | TypeDef_enum - | TypeDef_delegate - | TypeDef_other of IlxExtensionTypeKind - -and IlxExtensionTypeKind = Ext_type_def_kind of obj - - -type ILTypeDef = - { tdKind: ILTypeDefKind; - tdName: string; - tdGenericParams: ILGenericParameterDefs; (* class is generic *) - tdAccess: ILTypeDefAccess; - tdAbstract: bool; - tdSealed: bool; - tdSerializable: bool; - tdComInterop: bool; (* Class or interface generated for COM interop *) - tdLayout: ILTypeDefLayout; - tdSpecialName: bool; - tdEncoding: ILDefaultPInvokeEncoding; - tdNested: ILTypeDefs; - tdImplements: ILType list; - tdExtends: ILType option; - tdMethodDefs: ILMethodDefs; - tdSecurityDecls: ILPermissions; - tdHasSecurity: bool; - tdFieldDefs: ILFieldDefs; - tdMethodImpls: ILMethodImplDefs; - tdInitSemantics: ILTypeDefInitSemantics; - tdEvents: ILEventDefs; - tdProperties: PropertyDefs; - tdCustomAttrs: ILAttributes; } - member x.IsClass= (match x.tdKind with TypeDef_class -> true | _ -> false) - member x.IsValueType= (match x.tdKind with TypeDef_valuetype -> true | _ -> false) - member x.IsInterface= (match x.tdKind with TypeDef_interface -> true | _ -> false) - member x.IsEnum= (match x.tdKind with TypeDef_enum -> true | _ -> false) - member x.IsDelegate= (match x.tdKind with TypeDef_delegate -> true | _ -> false) - member x.Name = x.tdName - member x.GenericParams = x.tdGenericParams - member x.Access = x.tdAccess - member x.IsAbstract = x.tdAbstract - member x.IsSealed = x.tdSealed - member x.IsSerializable = x.tdSerializable - member x.IsComInterop = x.tdComInterop - member x.Layout = x.tdLayout - member x.IsSpecialName = x.tdSpecialName - member x.Encoding = x.tdEncoding - member x.NestedTypes = x.tdNested - member x.Implements = x.tdImplements - member x.Extends = x.tdExtends - member x.Methods = x.tdMethodDefs - member x.SecurityDecls = x.tdSecurityDecls - member x.HasSecurity = x.tdHasSecurity - member x.Fields = x.tdFieldDefs - member x.MethodImpls = x.tdMethodImpls - member x.InitSemantics = x.tdInitSemantics - member x.Events = x.tdEvents - member x.Properties = x.tdProperties - member x.CustomAttrs = x.tdCustomAttrs - -and ILTypeDefs = - | TypeDefTable of Lazy<(string list * string * ILAttributes * Lazy) array> * Lazy - -/// keyed first on namespace then on type name. The namespace is often a unique key for a given type map. -and TypeDefsMap = - Map>> - -and NamespaceAndTypename = string list * string - -type ILNestedExportedType = - { nestedExportedTypeName: string; - nestedExportedTypeAccess: ILMemberAccess; - nestedExportedTypeNested: ILNestedExportedTypes; - nestedExportedTypeCustomAttrs: ILAttributes } - -and ILNestedExportedTypes = ILNestedExportedTypes of Lazy -and NestedExportedTypesMap = Map - -and ILExportedType = - { exportedTypeScope: ILScopeRef; - exportedTypeName: string; - exportedTypeForwarder: bool; - exportedTypeAccess: ILTypeDefAccess; - exportedTypeNested: ILNestedExportedTypes; - exportedTypeCustomAttrs: ILAttributes } - member x.ScopeRef = x.exportedTypeScope - member x.Name = x.exportedTypeName - member x.IsForwarder = x.exportedTypeForwarder - member x.Access = x.exportedTypeAccess - member x.Nested = x.exportedTypeNested - member x.CustomAttrs = x.exportedTypeCustomAttrs - -and ILExportedTypes = ILExportedTypes of Lazy -and ExportedTypesMap = Map - -type ILResourceAccess = - | Resource_public - | Resource_private - -type ILResourceLocation = - | Resource_local of (unit -> byte[]) - | Resource_file of ILModuleRef * int32 - | Resource_assembly of ILAssemblyRef - -type ILResource = - { resourceName: string; - resourceWhere: ILResourceLocation; - resourceAccess: ILResourceAccess; - resourceCustomAttrs: ILAttributes } - member x.Name = x.resourceName - member x.Location = x.resourceWhere - member x.Access = x.resourceAccess - member x.CustomAttrs = x.resourceCustomAttrs - -type ILResources = ILResources of Lazy - -(* -------------------------------------------------------------------- - * One module in the "current" assembly - * -------------------------------------------------------------------- *) - -type ILAssemblyLongevity = - | LongevityUnspecified - | LongevityLibrary - | LongevityPlatformAppDomain - | LongevityPlatformProcess - | LongevityPlatformSystem - - -type ILAssemblyManifest = - { manifestName: string; - manifestAuxModuleHashAlgorithm: int32; - manifestSecurityDecls: ILPermissions; - manifestPublicKey: byte[] option; - manifestVersion: ILVersionInfo option; - manifestLocale: Locale option; - manifestCustomAttrs: ILAttributes; - - manifestLongevity: ILAssemblyLongevity; - manifestDisableJitOptimizations: bool; - manifestJitTracking: bool; - manifestRetargetable: bool; - - manifestExportedTypes: ILExportedTypes; - (* -- Records the types impemented by other modules. *) - manifestEntrypointElsewhere: ILModuleRef option; - (* -- Records whether the entrypoint resides in another module. *) - } - member x.Name = x.manifestName - member x.AuxModuleHashAlgorithm = x.manifestAuxModuleHashAlgorithm - member x.SecurityDecls = x.manifestSecurityDecls - member x.PublicKey = x.manifestPublicKey - member x.Version = x.manifestVersion - member x.Locale = x.manifestLocale - member x.CustomAttrs = x.manifestCustomAttrs - member x.AssemblyLongevity = x.manifestLongevity - member x.DisableJitOptimizations = x.manifestDisableJitOptimizations - member x.JitTracking = x.manifestJitTracking - member x.Retargetable = x.manifestRetargetable - member x.ExportedTypes = x.manifestExportedTypes - member x.EntrypointElsewhere = x.manifestEntrypointElsewhere - -type ILModuleDef = - { modulManifest: ILAssemblyManifest option; - modulCustomAttrs: ILAttributes; - modulName: string; - modulTypeDefs: ILTypeDefs; - (* Random bits of relatively uninteresting data *) - modulSubSystem: int32; - modulDLL: bool; - modulILonly: bool; - modulPlatform: ILPlatform option; - modul32bit: bool; - modul64bit: bool; - modulVirtAlignment: int32; - modulPhysAlignment: int32; - modulImageBase: int32; - modulResources: ILResources; - modulNativeResources: list>; (* e.g. win32 resources *) - } - member x.Manifest = x.modulManifest - member x.CustomAttrs = x.modulCustomAttrs - member x.Name = x.modulName - member x.TypeDefs = x.modulTypeDefs - member x.SubSystemFlags = x.modulSubSystem - member x.IsDLL = x.modulDLL - member x.IsILOnly = x.modulILonly - member x.Platform = x.modulPlatform - member x.Is32Bit = x.modul32bit - member x.Is64Bit = x.modul64bit - member x.VirtualAlignment = x.modulVirtAlignment - member x.PhysicalAlignment = x.modulPhysAlignment - member x.ImageBase = x.modulImageBase - member x.Resources = x.modulResources - member x.NativeResources = x.modulNativeResources - - member x.ManifestOfAssembly = - match x.modulManifest with - | Some m -> m - | None -> failwith "no manifest. It is possible you are using an auxiliary module of an assembly in a context where the main module of an assembly is expected. Typically the main module of an assembly must be specified first within a list of the modules in an assembly." - - - -// -------------------------------------------------------------------- -// Utilities: type names -// -------------------------------------------------------------------- - -let split_name_at nm idx = - if idx < 0 then failwith "split_name_at: idx < 0"; - let last = String.length nm - 1 - if idx > last then failwith "split_name_at: idx > last"; - (nm.Substring(0,idx)), - (if idx < last then nm.Substring (idx+1,last - idx) else "") - -let rec split_namespace_aux (nm:string) = - match nm.IndexOf '.' with - | -1 -> [nm] - | idx -> - let s1,s2 = split_name_at nm idx - s1::split_namespace_aux s2 - -/// Global State. All namespace splits -let memoize_namespace_tab = - Dictionary(10) - -let split_namespace nm = - let mutable res = Unchecked.defaultof<_> - let ok = memoize_namespace_tab.TryGetValue(nm,&res) - if ok then res else - let x = split_namespace_aux nm - (memoize_namespace_tab.[nm] <- x; x) - -let split_namespace_memoized nm = split_namespace nm - -// REVIEW: CONCURRENCY: lock this table. -let memoize_namespace_array_tab = - Dictionary(10) - -let split_namespace_array nm = - let mutable res = Unchecked.defaultof<_> - let ok = memoize_namespace_array_tab.TryGetValue(nm,&res) - if ok then res else - let x = Array.of_list (split_namespace nm) - (memoize_namespace_array_tab.[nm] <- x; x) - - -let split_type_name (nm:string) = - match nm.LastIndexOf '.' with - | -1 -> [],nm - | idx -> - let s1,s2 = split_name_at nm idx - split_namespace s1,s2 - -let emptyStringArray = ([| |] : string[]) -let split_type_name_array (nm:string) = - match nm.LastIndexOf '.' with - | -1 -> emptyStringArray,nm - | idx -> - let s1,s2 = split_name_at nm idx - split_namespace_array s1,s2 - -let unsplit_type_name (ns,n) = - match ns with - | [] -> String.concat "." ns ^"."^n - | _ -> n - -// -------------------------------------------------------------------- -// Add fields and types to tables, with decent error messages -// when clashes occur... -// -------------------------------------------------------------------- - - - -let dest_fdefs (Fields t) = t.Entries() -let dest_edefs (Events t) = t.Entries() -let dest_pdefs (Properties t) = t.Entries() -let dest_exported_types (ILExportedTypes ltab) = Map.foldBack (fun x y r -> y::r) (ltab.Force()) [] -let dest_nested_exported_types (ILNestedExportedTypes ltab) = Map.foldBack (fun x y r -> y::r) (ltab.Force()) [] -let dest_resources (ILResources ltab) = (ltab.Force()) -let dest_mimpls (MethodImpls ltab) = Map.foldBack (fun x y r -> y@r) (ltab.Force()) [] -let dest_lazy_tdefs (TypeDefTable (larr,tab)) = larr.Force() |> Array.to_list -let dest_tdefs tdefs = tdefs |> dest_lazy_tdefs |> List.map (fun (_,_,_,td) -> td.Force()) -let dest_custom_attrs (CustomAttrs m) = m.Force() -let dest_security_decls (SecurityDecls m) = m.Force() - -let find_tdef x (TypeDefTable (_,m)) = - let ns,n = split_type_name x - m.Force().[ns].[n].Force() - -let find_fdefs x (Fields t) = t.[x] -let find_edefs x (Events t) = t.[x] -let find_pdefs x (Properties t) = t.[x] -let find_exported_type x (ILExportedTypes ltab) = Map.find x (ltab.Force()) - -let mk_empty_gparams = ([]: ILGenericParameterDefs) -let mk_empty_gactuals = ([]: ILGenericArgs) - - -type ILType with - member x.TypeSpec = - match x with - | Type_boxed tr | Type_value tr -> tr - | _ -> failwith "tspec_of_typ" - member x.Boxity = - match x with - | Type_boxed _ -> AsObject - | Type_value _ -> AsValue - | _ -> failwith "boxity_of_typ" - member x.TypeRef = - match x with - | Type_boxed tspec | Type_value tspec -> tspec.TypeRef - | _ -> failwith "tref_of_typ" - member x.IsNominal = - match x with - | Type_boxed tr | Type_value tr -> true - | _ -> false - member x.GenericArgs = - match x with - | Type_boxed tspec | Type_value tspec -> tspec.GenericArgs - | _ -> mk_empty_gactuals - member x.IsTyvar = - match x with - | Type_tyvar _ -> true | _ -> false - - -#if STANDALONE_METADATA -#else - -// -------------------------------------------------------------------- -// Helpers for the ILX extensions -// -------------------------------------------------------------------- - -type internal_instr_extension = - { internalInstrExtIs: IlxExtensionInstr -> bool; - internalInstrExtDests: IlxExtensionInstr -> ILCodeLabel list; - internalInstrExtFallthrough: IlxExtensionInstr -> ILCodeLabel option; - internalInstrExtIsTailcall: IlxExtensionInstr -> bool; - internalInstrExtRelabel: (ILCodeLabel -> ILCodeLabel) -> IlxExtensionInstr -> IlxExtensionInstr; } - -type internal_type_def_kind_extension = - { internalTypeDefKindExtIs: IlxExtensionTypeKind -> bool; } - -type 'a ILInstrSetExtension = - { instrExtDests: 'a -> ILCodeLabel list; - instrExtFallthrough: 'a -> ILCodeLabel option; - instrExtIsTailcall: 'a -> bool; - instrExtRelabel: (ILCodeLabel -> ILCodeLabel) -> 'a -> 'a; } - -let instr_extensions = ref [] -let type_def_kind_extensions = ref [] - -let define_instr_extension (ext: 'a ILInstrSetExtension) = - if nonNil !instr_extensions then failwith "define_instr_extension: only one extension currently allowed"; - let mk (x: 'a) = Ext_instr (box x) - let test (Ext_instr x) = true - let dest (Ext_instr x) = (unbox x : 'a) - instr_extensions := - { internalInstrExtIs=test; - internalInstrExtDests=(fun x -> ext.instrExtDests (dest x)); - internalInstrExtFallthrough=(fun x -> ext.instrExtFallthrough (dest x)); - internalInstrExtIsTailcall=(fun x -> ext.instrExtIsTailcall (dest x)); - internalInstrExtRelabel=(fun f x -> mk (ext.instrExtRelabel f (dest x))); } - :: !instr_extensions; - mk,test,dest - -type 'a ILTypeDefKindExtension = - | Type_def_kind_extension - -let define_type_def_kind_extension (Type_def_kind_extension : 'a ILTypeDefKindExtension) = - if nonNil !type_def_kind_extensions then failwith "define_type_extension: only one extension currently allowed"; - let mk (x:'a) = Ext_type_def_kind (box x) - let test (Ext_type_def_kind x) = true - let dest (Ext_type_def_kind x) = (unbox x: 'a) - type_def_kind_extensions := - { internalTypeDefKindExtIs=test;} - :: !type_def_kind_extensions; - mk,test,dest - -// -------------------------------------------------------------------- -// Making assembly, module and file references -// -------------------------------------------------------------------- - -let mk_simple_assref n = - ILAssemblyRef.Create(n, None, None, false, None, None) - -let mk_simple_modref n = - ILModuleRef.Create(n, true, None) - -let scoref_for_modname modul = ScopeRef_module(mk_simple_modref modul) - -let module_name_of_scoref = function - | ScopeRef_module(mref) -> mref.Name - | _ -> failwith "module_name_of_scoref" - -let module_is_mainmod m = - match m.modulManifest with None -> false | _ -> true - - -let assname_of_mainmod (mainmod:ILModuleDef) = mainmod.ManifestOfAssembly.manifestName - -// -------------------------------------------------------------------- -// Types -// -------------------------------------------------------------------- - - -let is_tyvar_ty = function Type_tyvar _ -> true | _ -> false -let tspec_of_typ (ty:ILType) = ty.TypeSpec -let boxity_of_typ (ty:ILType) = ty.Boxity -let tref_of_typ (ty:ILType) = ty.TypeRef -let is_tref_typ (ty:ILType) = ty.IsNominal -let inst_of_typ (ty:ILType) = ty.GenericArgs - -let mk_typ boxed tspec = - match boxed with AsObject -> Type_boxed tspec | _ -> Type_value tspec - -let mk_named_typ vc tref tinst = mk_typ vc (ILTypeSpec.Create(tref, tinst)) - -let mk_value_typ tref tinst = mk_named_typ AsValue tref tinst -let mk_boxed_typ tref tinst = mk_named_typ AsObject tref tinst - -let mk_nongeneric_value_typ tref = mk_named_typ AsValue tref [] -let mk_nongeneric_boxed_typ tref = mk_named_typ AsObject tref [] - - -// -------------------------------------------------------------------- -// Make references to ILMethodDefs -// -------------------------------------------------------------------- - -let mk_nested_tref (scope,l,nm) = ILTypeRef.Create(scope,l,nm) -let mk_tref (scope,nm) = mk_nested_tref (scope,[],nm) -let mk_tspec (tref,inst) = ILTypeSpec.Create(tref, inst) -let mk_nongeneric_tspec tref = mk_tspec (tref,[]) - -let mk_tref_in_tref (tref:ILTypeRef,nm) = - mk_nested_tref (tref.Scope,tref.Enclosing@[tref.Name],nm) - -// -------------------------------------------------------------------- -// The toplevel class of a module is called "" -// -// REVIEW: the following comments from the ECMA Spec (Parition II, Section 9.8) -// -// "For an ordinary type, if the metadata merges two definitions -// of the same type, it simply discards one definition on the -// assumption they are equivalent and that any anomaly will be -// discovered when the type is used. For the special class that -// holds global members, however, members are unioned across all -// modules at merge time. If the same name appears to be defined -// for cross-module use in multiple modules then there is an -// error. In detail: -// - If no member of the same kind (field or method), name, and -// signature exists, then add this member to the output class. -// - If there are duplicates and no more than one has an -// accessibility other than compilercontrolled, then add them -// all in the output class. -// - If there are duplicates and two or more have an accessibility -// other than compilercontrolled an error has occurred." -// -------------------------------------------------------------------- - -let tname_for_toplevel = "" - -let tref_for_toplevel scoref = ILTypeRef.Create(scoref,[],tname_for_toplevel) - -let tspec_for_toplevel scoref = mk_nongeneric_tspec (tref_for_toplevel scoref) - -let typ_for_toplevel scorefs = Type_boxed (tspec_for_toplevel scorefs) - -let is_toplevel_tname d = (d = tname_for_toplevel) - -let mk_mref (tref,callconv,nm,gparams,args,rty) = - { mrefParent=tref; - mrefCallconv=callconv; - mrefGenericArity=gparams; - mrefName=nm; - mrefArgs=args; - mrefReturn=rty} - -let mk_mref_mspec_in_typ (mref,typ,minst) = - { mspecMethodRefF=mref; - mspecEnclosingTypeF=typ; - mspecMethodInstF=minst } - -let mk_mspec (mref, vc, tinst, minst) =mk_mref_mspec_in_typ (mref,mk_named_typ vc mref.EnclosingTypeRef tinst,minst) - -let mk_mspec_in_tref (tref,vc,cc,nm,args,rty,tinst,minst) = - mk_mspec (mk_mref ( tref,cc,nm,List.length minst,args,rty),vc,tinst,minst) - -let mk_mspec_in_tspec (tspec:ILTypeSpec,vc,cc,nm,args,rty,minst) = - mk_mspec_in_tref (tspec.TypeRef,vc,cc,nm,args,rty,tspec.GenericArgs,minst) - -let mk_nongeneric_mspec_in_tspec (tspec,vc,cc,nm,args,rty) = - mk_mspec_in_tspec (tspec,vc,cc,nm,args,rty,mk_empty_gactuals) - -let mk_mspec_in_typ (typ,cc,nm,args,rty,minst) = - mk_mref_mspec_in_typ (mk_mref (tref_of_typ typ,cc,nm,List.length minst,args,rty),typ,minst) - -let mk_nongeneric_mspec_in_typ (typ,cc,nm,args,rty) = - mk_mspec_in_typ (typ,cc,nm,args,rty,mk_empty_gactuals) - -let mk_instance_mspec_in_tref (tref,vc,nm,args,rty,cinst,minst) = - mk_mspec_in_tref (tref,vc,ILCallingConv.Instance,nm,args,rty,cinst,minst) - -let mk_instance_mspec_in_tspec (tspec:ILTypeSpec,vc,nm,args,rty,minst) = - mk_instance_mspec_in_tref (tspec.TypeRef, vc,nm,args,rty,tspec.GenericArgs,minst) - -let mk_instance_mspec_in_typ (typ,nm,args,rty,minst) = - mk_instance_mspec_in_tspec (tspec_of_typ typ, boxity_of_typ typ,nm,args,rty,minst) - -let mk_instance_mspec_in_boxed_tspec (tspec,nm,args,rty,minst) = - mk_instance_mspec_in_tspec (tspec,AsObject,nm,args,rty,minst) - -let mk_instance_mspec_in_nongeneric_boxed_tref(tref,nm,args,rty,minst) = - mk_instance_mspec_in_boxed_tspec (mk_nongeneric_tspec tref,nm,args,rty,minst) - -let mk_nongeneric_instance_mspec_in_tref (tref,vc,nm,args,rty,cinst) = - mk_instance_mspec_in_tref (tref,vc,nm,args,rty,cinst,mk_empty_gactuals) - -let mk_nongeneric_instance_mspec_in_tspec (tspec:ILTypeSpec,vc,nm,args,rty) = - mk_nongeneric_instance_mspec_in_tref (tspec.TypeRef,vc,nm,args,rty,tspec.GenericArgs) -let mk_nongeneric_instance_mspec_in_typ (typ,nm,args,rty) = - mk_nongeneric_instance_mspec_in_tspec (tspec_of_typ typ,boxity_of_typ typ,nm,args,rty) - -let mk_nongeneric_instance_mspec_in_boxed_tspec (tspec,nm,args,rty) = - mk_nongeneric_instance_mspec_in_tspec(tspec,AsObject,nm,args,rty) - -let mk_nongeneric_instance_mspec_in_nongeneric_boxed_tref(tref,nm,args,rty) = - mk_nongeneric_instance_mspec_in_boxed_tspec (mk_nongeneric_tspec tref,nm,args,rty) - -let mk_nongeneric_mspec_in_tref (tref,vc,cc,nm,args,rty,cinst) = - mk_mspec (mk_mref (tref,cc,nm,0,args,rty),vc,cinst,mk_empty_gactuals) - -let mk_nongeneric_mspec_in_nongeneric_tref (tref,vc,callconv,nm,args,rty) = - mk_nongeneric_mspec_in_tref (tref,vc,callconv,nm,args,rty,mk_empty_gactuals) - -let mk_static_mref_in_tref (tref,nm,gparams,args,rty) = - mk_mref(tref,ILCallingConv.Static,nm,gparams,args,rty) - -let mk_static_mspec_in_nongeneric_boxed_tref (tref,nm,args,rty,minst) = - mk_mspec_in_tref (tref,AsObject,ILCallingConv.Static,nm,args,rty,mk_empty_gactuals,minst) - -let mk_static_mspec_in_boxed_tspec (tspec,nm,args,rty,minst) = - mk_mspec_in_tspec (tspec,AsObject,ILCallingConv.Static,nm,args,rty,minst) - -let mk_static_mspec_in_typ (typ,nm,args,rty,minst) = - mk_mspec_in_typ (typ,ILCallingConv.Static,nm,args,rty,minst) - -let mk_static_nongeneric_mspec_in_nongeneric_boxed_tref (tref,nm,args,rty) = - mk_static_mspec_in_nongeneric_boxed_tref (tref,nm,args,rty,mk_empty_gactuals) - -let mk_static_nongeneric_mspec_in_boxed_tspec (tspec,nm,args,rty) = - mk_static_mspec_in_boxed_tspec (tspec,nm,args,rty,mk_empty_gactuals) - -let mk_static_nongeneric_mspec_in_typ (typ,nm,args,rty) = - mk_static_mspec_in_typ (typ,nm,args,rty,mk_empty_gactuals) - -let mk_toplevel_static_mref scoref (nm,args,rty,gparams) = - mk_static_mref_in_tref ( (tref_for_toplevel scoref),nm,args,rty,gparams) - -let mk_toplevel_static_mspec scoref (nm,args,rty,minst) = - mk_static_mspec_in_nongeneric_boxed_tref (tref_for_toplevel scoref,nm,args,rty,minst) - -let mk_toplevel_static_nongeneric_mspec scoref (nm,args,rty) = - mk_toplevel_static_mspec scoref (nm,args,rty,mk_empty_gactuals) - -let mk_ctor_mspec (tref,vc,args,cinst) = - mk_mspec_in_tref(tref,vc,ILCallingConv.Instance,".ctor",args,Type_void,cinst, mk_empty_gactuals) - -let mk_ctor_mspec_for_typ (ty,args) = - mk_mspec_in_typ(ty,ILCallingConv.Instance,".ctor",args,Type_void, mk_empty_gactuals) - -let mk_nongeneric_ctor_mspec (tref,vc,args) = - mk_ctor_mspec (tref,vc,args,mk_empty_gactuals) - -let mk_ctor_mspec_for_boxed_tspec (tspec:ILTypeSpec,argtys) = - mk_ctor_mspec(tspec.TypeRef,AsObject,argtys, tspec.GenericArgs) - -let mk_ctor_mspec_for_nongeneric_boxed_tref (tr,argtys) = - mk_ctor_mspec(tr,AsObject,argtys, mk_empty_gactuals) - -// -------------------------------------------------------------------- -// Make references to fields -// -------------------------------------------------------------------- - -let mk_fref_in_tref(tref,nm,ty) = - { frefParent=tref; - frefName=nm; - frefType=ty} - -let mk_fspec (tref,ty) = - { fspecFieldRef= tref; - fspecEnclosingType=ty } - -let mk_fspec_in_tspec (tspec:ILTypeSpec,boxity,nm,ty) = - mk_fspec (mk_fref_in_tref (tspec.TypeRef,nm,ty), mk_typ boxity tspec) - -let mk_fspec_in_typ (typ,nm,fty) = - mk_fspec (mk_fref_in_tref ((tspec_of_typ typ).TypeRef,nm,fty), typ) - -let mk_fspec_in_boxed_tspec (tspec,nm,ty) = - mk_fspec_in_tspec (tspec,AsObject,nm,ty) - -let mk_fspec_in_nongeneric_boxed_tref (tref,nm,ty) = - mk_fspec_in_tspec (mk_nongeneric_tspec tref, AsObject,nm,ty) - -let add_custom_attr_to_tab ca tab = ca::tab -let mk_custom_attrs l = CustomAttrs (Lazy.CreateFromValue(List.foldBack add_custom_attr_to_tab l [])) -let mk_computed_custom_attrs l = CustomAttrs (Lazy.Create l) - -let and_tailness x y = - match x with Tailcall when y -> Tailcall | _ -> Normalcall - -// -------------------------------------------------------------------- -// ILAttributes on code blocks (esp. debug info) -// -------------------------------------------------------------------- - -let code_label_eq (x:ILCodeLabel) y = (x = y) -let string_of_code_label (x:int) = "L"^string x - -module CodeLabels = - let insert (e:ILCodeLabel) l = Zset.add e l - let remove e l = Zset.remove e l - let fold f s acc = Zset.fold f s acc - let add s x = Zset.add s x - let addList s xs = Zset.addList s xs - let diff l1 l2 = Zset.diff l1 l2 - let union l1 l2 = Zset.union l1 l2 - let inter (l1:ILCodeLabel Zset.t) l2 = Zset.inter l1 l2 - let subset (l1:ILCodeLabel Zset.t) l2 = Zset.subset l1 l2 - let empty = Zset.empty int_order - let is_non_empty s = not (Zset.is_empty s) - let of_list l = Zset.addList l empty - let to_list l = Zset.elements l - -// -------------------------------------------------------------------- -// Basic operations on code. -// -------------------------------------------------------------------- - - -let label_of_bblock b = b.bblockLabel - -let instrs_of_bblock bk = bk.bblockInstrs - -let last_of_bblock bb = - let n = Array.length bb.bblockInstrs - if n = 0 then failwith "last_of_bblock: empty bblock"; - bb.bblockInstrs.[n - 1] - -let rec find_extension s f l = - let rec look l1 = - match l1 with - | [] -> failwith ("extension for "^s^" not found") - | (h::t) -> match f h with None -> look t | Some res -> res - look l - -let destinations_of_instr i = - match i with - | I_leave l | I_br l -> [l] - | I_brcmp (_,l1,l2) -> [l1; l2] - | I_switch (ls,l) -> CodeLabels.to_list (CodeLabels.of_list (l::ls)) - | I_endfinally | I_endfilter | I_ret | I_throw | I_rethrow - | I_call (Tailcall,_,_)| I_callvirt (Tailcall,_,_)| I_callconstraint (Tailcall,_,_,_) - | I_calli (Tailcall,_,_) -> [] - | I_other e -> find_extension "instr" (fun ext -> if ext.internalInstrExtIs e then Some (ext.internalInstrExtDests e) else None) !instr_extensions - | _ -> [] - -let destinations_of_bblock (bblock:ILBasicBlock) = destinations_of_instr (last_of_bblock bblock) - -let fallthrough_of_bblock (bblock:ILBasicBlock) = - begin match last_of_bblock bblock with - | I_br l | I_brcmp (_,_,l) | I_switch (_,l) -> Some l - | I_other e -> find_extension "instr" (fun ext -> if ext.internalInstrExtIs e then Some (ext.internalInstrExtFallthrough e) else None) !instr_extensions - | _ -> None - end - -let instr_is_tailcall i = - match i with - | I_call (Tailcall,_,_)| I_callvirt (Tailcall,_,_) | I_callconstraint (Tailcall,_,_,_) | I_calli (Tailcall,_,_) -> true - | I_other e -> find_extension "instr" (fun ext -> if ext.internalInstrExtIs e then Some (ext.internalInstrExtIsTailcall e) else None) !instr_extensions - | _ -> false - -let instr_is_bblock_end i = - instr_is_tailcall i or - match i with - | I_leave _ | I_br _ | I_brcmp _ | I_switch _ | I_endfinally - | I_endfilter | I_ret | I_throw | I_rethrow -> true - | I_other e -> find_extension "instr" (fun ext -> if ext.internalInstrExtIs e then Some (nonNil (ext.internalInstrExtDests e)) else None) !instr_extensions - | _ -> false - -let checks = false -let _ = if checks then dprintn "Warning - Il.checks is on" - -let rec acc_entries_of_code c acc = - match c with - | ILBasicBlock bb -> CodeLabels.add bb.bblockLabel acc - | GroupBlock (_,l) -> List.foldBack acc_entries_of_code l acc - | RestrictBlock (ls,c) -> CodeLabels.union acc (CodeLabels.diff (entries_of_code' c) (CodeLabels.of_list ls)) - | TryBlock (l,r) -> acc_entries_of_code l acc -and entries_of_code' c = acc_entries_of_code c CodeLabels.empty - -let rec acc_exits_of_code c acc = - let basic_outside_labels = - match c with - | ILBasicBlock bblock -> CodeLabels.addList (destinations_of_bblock bblock) acc - | GroupBlock (_,l) -> List.foldBack acc_exits_of_code l acc - | RestrictBlock (ls,c) -> CodeLabels.union acc (CodeLabels.diff (exits_of_code' c) (CodeLabels.of_list ls)) - | TryBlock (l,r) -> acc_exits_of_code l acc - CodeLabels.diff basic_outside_labels (entries_of_code' c) -and exits_of_code' c = acc_exits_of_code c CodeLabels.empty - -let entries_of_code c = CodeLabels.to_list (entries_of_code' c) -let exits_of_code c = CodeLabels.to_list (exits_of_code' c) - -/// Finds all labels defined within this code block, seeing through restrictions. -/// This assumes that labels are unique within the code blocks, even if hidden behind restrictions. -/// -// Note: Repeats in the list indicate this invariant is broken. -let rec acc_labels_of_code acc c = - match c with - | ILBasicBlock bb -> bb.bblockLabel::acc - | GroupBlock (_,l) -> List.fold acc_labels_of_code acc l - | RestrictBlock (ls,c) -> acc_labels_of_code acc c - | TryBlock (l,r) -> let acc = acc_labels_of_code acc l - let acc = acc_labels_of_seh acc r - acc -and acc_labels_of_seh acc = function - | FaultBlock code -> acc_labels_of_code acc code - | FinallyBlock code -> acc_labels_of_code acc code - | FilterCatchBlock fcodes -> List.fold acc_labels_of_fcode acc fcodes - -and acc_labels_of_fcode acc = function - | TypeFilter typ,code -> acc_labels_of_code acc code - | CodeFilter test,code -> let accA = acc_labels_of_code acc code - let accB = acc_labels_of_code accA test - accB - -let labels_of_code code = acc_labels_of_code [] code - -(* - -From the ECMA spec: - -There are only two ways to enter a try block from outside its lexical body: - - Branching to or falling into the try block’s first instruction. The branch may be made using a 37 -conditional branch, an unconditional branch, or a leave instruction. 38 - - Using a leave instruction from that try’s catch block. In this case, correct CIL code may 39 -branch to any instruction within the try block, not just its first instruction, so long as that 40 -branch target is not protected by yet another try, nested withing the first -*) - - -let check_code code = - if checks then begin - match code with - | RestrictBlock (ls,c') -> - (* - if not (CodeLabels.subset ls (entries_of_code c')) then begin - dprintn ("* warning: Restricting labels that are not declared in block, e.g. "^ (List.hd (CodeLabels.diff ls (entries_of_code c')))); - dprintn ("* warning: Labels in block are: "^ (String.concat "," (entries_of_code c'))); - dprintn ("* warning: Labels being restricted are: "^ (String.concat "," ls)); - end; - *) - let cls = (CodeLabels.inter (CodeLabels.of_list ls) (exits_of_code' c')) - if (CodeLabels.is_non_empty cls) then - dprintn ("* warning: restricting unsatisfied exits from a block, e.g. "^ string_of_code_label (List.hd (CodeLabels.to_list cls))); - | TryBlock (l,r) -> - begin match r with - | FaultBlock b | FinallyBlock b -> - if (CodeLabels.is_non_empty (CodeLabels.inter (exits_of_code' b) (entries_of_code' b))) then - dprintn "* warning: exits from fault or finally blocks must leave the block"; - let n = List.length (entries_of_code b) - if not (n = 1) then dprintn "* warning: zero or more than one entry to a fault or finally block"; - | FilterCatchBlock r -> - List.iter - (fun (flt,z) -> - let m = List.length (entries_of_code z) - if not (m = 1) then dprintn "* warning: zero or more than one entry to a catch block"; - match flt with - | CodeFilter y -> - if (CodeLabels.is_non_empty (exits_of_code' y)) then dprintn "* warning: exits exist from filter block - you must always exit using endfinally"; - let n = List.length (entries_of_code y) - if not (n = 1) then dprintn "* warning: zero or more than one entry to a filter block"; - | TypeFilter ty -> ()) - r; - end; - | ILBasicBlock bb -> - if (Array.length bb.bblockInstrs) = 0 then dprintn ("* warning: basic block "^string_of_code_label bb.bblockLabel^" is empty") - elif not (instr_is_bblock_end (bb.bblockInstrs.[Array.length bb.bblockInstrs - 1])) then failwith "* warning: bblock does not end in an appropriate instruction"; - - | _ -> () - end; - match code with - | RestrictBlock (labs,c) when (isNil labs) -> c - | GroupBlock ([],[c]) -> c - | _ -> code - - -let mk_bblock bb = ILBasicBlock bb -let mk_scope_block (a,b) = GroupBlock (a,[check_code b]) -let mk_group_block_from_code (internals,codes) = RestrictBlock (internals,check_code (GroupBlock ([],codes))) -let mk_group_block (internals,blocks) = mk_group_block_from_code (internals,List.map check_code blocks) - -let mk_restrict_block lab c = RestrictBlock (CodeLabels.to_list (CodeLabels.remove lab (entries_of_code' c)),c) -let mk_try_finally_block (tryblock, enter_finally_lab, finallyblock) = - TryBlock(check_code tryblock, FinallyBlock (check_code (mk_restrict_block enter_finally_lab (check_code finallyblock)))) - -let mk_try_fault_block (tryblock, enter_fault_lab, faultblock) = - TryBlock(check_code tryblock, FaultBlock (check_code (mk_restrict_block enter_fault_lab (check_code faultblock)))) - -let mk_try_multi_filter_catch_block (tryblock, clauses) = - TryBlock - (check_code tryblock, - FilterCatchBlock - (clauses |> List.map (fun (flt, (enter_catch_lab, catchblock)) -> - let fltcode = - match flt with - | Choice1Of2 (enter_filter_lab, filterblock) -> - CodeFilter (check_code (mk_restrict_block enter_filter_lab (check_code filterblock))) - | Choice2Of2 ty -> - TypeFilter ty - fltcode, - check_code (mk_restrict_block enter_catch_lab (check_code catchblock))))) - - -let new_generator () = - let i = ref 0 - fun n -> - incr i; !i - -let code_label_generator = (new_generator () : unit -> ILCodeLabel) -let generate_code_label x = code_label_generator x - -let unique_entry_of_code c = - match entries_of_code c with - | [] -> failwith ("unique_entry_of_code: no entries to code") - | [inlab] -> inlab - | labs -> failwith ("unique_entry_of_code: need one entry to code, found: "^String.concat "," (List.map string_of_code_label labs)) - -let unique_exit_of_code c = - match exits_of_code c with - | [] -> failwith ("unique_exit_of_code: no exits from code") - | [outlab] -> outlab - | labs -> failwith ("unique_exit_of_code: need one exit from code, found: "^String.concat "," (List.map string_of_code_label labs)) - -let nonbranching_instrs inplab instrs = - check_code (mk_bblock {bblockLabel=inplab; bblockInstrs= Array.of_list instrs}) - -let nonbranching_instrs_then inplab instrs instr = - if nonNil instrs && instr_is_bblock_end (List.last instrs) then failwith "nonbranching_instrs_then: bblock already terminates with a control flow instruction"; - nonbranching_instrs inplab (instrs @ [ instr ]) - -let nonbranching_instrs_then_ret inplab instrs = - nonbranching_instrs_then inplab instrs I_ret - -let nonbranching_instrs_then_br inplab instrs lab = - nonbranching_instrs_then inplab instrs (I_br lab) - -let nonbranching_instrs_to_code instrs = - let inplab = (generate_code_label ()) - if nonNil instrs && instr_is_bblock_end (List.last instrs) then - nonbranching_instrs inplab instrs - else - nonbranching_instrs_then_ret inplab instrs - -let join_code code1 code2 = - if not (code_label_eq (unique_exit_of_code code1) (unique_entry_of_code code2)) then - dprintn "* warning: join_code: exit of code1 is not entry of code 2"; - check_code - (RestrictBlock ([unique_exit_of_code code1], - (check_code (mk_group_block ([],[ code1; code2 ]))))) - -(* -------------------------------------------------------------------- - * Security declarations (2) - * -------------------------------------------------------------------- *) - -let add_security_decl_to_tab sd tab = sd::tab -let mk_security_decls l = SecurityDecls (notlazy (List.foldBack add_security_decl_to_tab l [])) -let mk_lazy_security_decls l = SecurityDecls (lazy (List.foldBack add_security_decl_to_tab (Lazy.force l) [])) - -(* -------------------------------------------------------------------- - * ILX stuff - * -------------------------------------------------------------------- *) - -let mk_tyvar_ty tv = Type_tyvar tv - - -let list_read l n = try List.nth l n with _ -> failwith "uninterp: read" - -let inst_read (inst:ILGenericArgs) v = - try list_read inst (int v) - with _ -> failwithf "type variable no. %d needs a value" v - -let inst_add (x1:ILGenericArgs) (x2:ILGenericArgs) = (x1@x2 : ILGenericArgs) - -let mk_simple_gparam nm = - { gpName=nm; - gpConstraints=[]; - gpVariance=NonVariant; - gpReferenceTypeConstraint=false; - gpNotNullableValueTypeConstraint=false; - gpDefaultConstructorConstraint=false; } - -let gparam_of_gactual (ga:ILType) = mk_simple_gparam "T" - -let gparams_of_inst (x: ILGenericArgs) = List.map gparam_of_gactual x - -let generalize_gparams (gparams:ILGenericParameterDefs) = - List.mapi (fun n gf -> mk_tyvar_ty (uint16 n)) gparams - -let generalize_tref tref gparams = mk_tspec (tref,generalize_gparams gparams) - -(* -------------------------------------------------------------------- - * Operations on class etc. defs. - * -------------------------------------------------------------------- *) - -let is_value_or_enum_tdef tdef = - match tdef.tdKind with - | TypeDef_valuetype | TypeDef_enum -> true - | _ -> false - -let tref_for_nested_tdef scope (enc:ILTypeDef list,td:ILTypeDef) = - mk_nested_tref(scope, (enc |> List.map (fun etd -> etd.Name)), td.Name) - -let tspec_for_nested_tdef scope (enc:ILTypeDef list,td:ILTypeDef) = - generalize_tref (tref_for_nested_tdef scope (enc,td)) td.tdGenericParams - -(* -------------------------------------------------------------------- - * Operations on type tables. - * -------------------------------------------------------------------- *) - -let getname ltd = - let td = (Lazy.force ltd) - let ns,n = split_type_name td.tdName - (ns,n,td.tdCustomAttrs,ltd) - -let add_tdef_to_tab (ns,n,cas,ltd) tab = - let prev = - (match Map.tryfind ns tab with - | None -> Dictionary.create 1 - | Some prev -> prev) - if prev.ContainsKey n then - let msg = sprintf "not unique type %s" (unsplit_type_name (ns,n)); - System.Diagnostics.Debug.Assert(false,msg) - failwith msg - prev.[n] <- ltd; - Map.add ns prev tab - -let add_lazy_tdef_to_larr ltd larr = lazy_map (fun arr -> Array.of_list (getname ltd :: Array.to_list arr)) larr - -let build_tab larr = lazy_map (fun arr -> Array.foldBack add_tdef_to_tab arr Map.empty) larr -let build_types larr = TypeDefTable (larr, build_tab larr) - -(* this is not performance critical *) -let add_tdef td (TypeDefTable (larr,ltab)) = build_types (add_lazy_tdef_to_larr (notlazy td) larr) -let mk_tdefs l = build_types (List.map (notlazy >> getname) l |> Array.of_list |> notlazy ) -let mk_lazy_tdefs llist = build_types (lazy_map Array.of_list llist) -//REVIEW: Propagate the underlying array representation up through the callers of these two functions -//REVIEW: This conversion to a list causes a lot of allocations -let iter_tdefs f tdefs = dest_tdefs tdefs |> List.iter f - -let replace_tdef td (TypeDefTable (larr,_)) = - larr - |> lazy_map (fun larr -> - let llist = Array.to_list larr - let (ns,n,_,_) as data = getname (notlazy td) - let llist = llist |> List.filter (fun (ns2,n2,_,_) -> not (ns = ns2 && n = n2)) - Array.of_list (data :: llist)) - |> build_types - -// -------------------------------------------------------------------- -// Operations on method tables. -// -// REVIEW: this data structure looks substandard -// -------------------------------------------------------------------- - -let dest_mdefs (Methods lpmap) = fst (Lazy.force lpmap) -let add_mdef_to_tab y tab = - let key = y.mdName - let prev = Map.tryFindMulti key tab - Map.add key (y::prev) tab - -let add_mdef_to_pmap y (mds,tab) = y::mds,add_mdef_to_tab y tab -let add_mdef y (Methods lpmap) = Methods (lazy_map (add_mdef_to_pmap y) lpmap) - -let mk_mdefs l = Methods (notlazy (List.foldBack add_mdef_to_pmap l ([],Map.empty))) -let mk_lazy_mdefs l = Methods (lazy (List.foldBack add_mdef_to_pmap (Lazy.force l) ([],Map.empty))) -let add_mdef_to_tdef m cd = {cd with tdMethodDefs = add_mdef m cd.tdMethodDefs } - -let filter_mdefs f (Methods lpmap) = - Methods (lazy_map (fun (fs,_) -> - let l = List.filter f fs - (l, List.foldBack add_mdef_to_tab l Map.empty)) lpmap) - -let find_mdefs_by_name nm (Methods lpmap) = - let t = snd (Lazy.force lpmap) - Map.tryFindMulti nm t - -let find_mdefs_by_arity (nm,arity) tab = - List.filter (fun x -> x.mdParams.Length = arity) (find_mdefs_by_name nm tab) - - -(* -------------------------------------------------------------------- - * Operations and defaults for modules, assemblies etc. - * -------------------------------------------------------------------- *) - -let default_modulSubSystem = 3 (* this is what comes out of ILDASM on 30/04/2001 *) -let default_modulPhysAlignment = 512 (* this is what comes out of ILDASM on 30/04/2001 *) -let default_modulVirtAlignment = 0x2000 (* this is what comes out of ILDASM on 30/04/2001 *) -let default_modulImageBase = 0x034f0000 (* this is what comes out of ILDASM on 30/04/2001 *) - -// -------------------------------------------------------------------- -// Array types -// -------------------------------------------------------------------- - -let rank_of_array_shape (ILArrayShape l) = (List.length l) -let mk_array_ty (ty,shape) = Type_array(shape,ty) -let Rank1ArrayShape = ILArrayShape [(Some 0, None)] -let mk_sdarray_ty ty = mk_array_ty (ty,Rank1ArrayShape) - -let dest_array_ty = function - | Type_array (shape,ty) -> shape,ty - | _ -> failwith "dest_array_ty: bad array type" - -let is_array_ty = function - | Type_array _ -> true - | _ -> false - -(* -------------------------------------------------------------------- - * Sigs of special types built-in, e.g. those needed by the verifier - * -------------------------------------------------------------------- *) - -let mscorlib_module_name = "CommonLanguageRuntimeLibrary" - -let tname_Object = "System.Object" -let tname_String = "System.String" -let tname_StringBuilder = "System.Text.StringBuilder" -let tname_AsyncCallback = "System.AsyncCallback" -let tname_IAsyncResult = "System.IAsyncResult" -let tname_IComparable = "System.IComparable" -let tname_Exception = "System.Exception" -let tname_Type = "System.Type" -let tname_Missing = "System.Reflection.Missing" -let tname_Activator = "System.Activator" -let tname_SerializationInfo = "System.Runtime.Serialization.SerializationInfo" -let tname_StreamingContext = "System.Runtime.Serialization.StreamingContext" -let tname_SecurityPermissionAttribute = "System.Security.Permissions.SecurityPermissionAttribute" -let tname_Delegate = "System.Delegate" -let tname_ValueType = "System.ValueType" -let tname_TypedReference = "System.TypedReference" -let tname_Enum = "System.Enum" -let tname_MulticastDelegate = "System.MulticastDelegate" -let tname_Array = "System.Array" - -let tname_Int64 = "System.Int64" -let tname_UInt64 = "System.UInt64" -let tname_Int32 = "System.Int32" -let tname_UInt32 = "System.UInt32" -let tname_Int16 = "System.Int16" -let tname_UInt16 = "System.UInt16" -let tname_SByte = "System.SByte" -let tname_Byte = "System.Byte" -let tname_Single = "System.Single" -let tname_Double = "System.Double" -let tname_Bool = "System.Boolean" -let tname_Char = "System.Char" -let tname_IntPtr = "System.IntPtr" -let tname_UIntPtr = "System.UIntPtr" -let tname_RuntimeArgumentHandle = "System.RuntimeArgumentHandle" -let tname_RuntimeTypeHandle = "System.RuntimeTypeHandle" -let tname_RuntimeMethodHandle = "System.RuntimeMethodHandle" -let tname_RuntimeFieldHandle = "System.RuntimeFieldHandle" - -[] -type ILGlobals = - { mscorlib_scoref: ILScopeRef; - mscorlibAssemblyName: string; - tref_Object: ILTypeRef - ; tspec_Object: ILTypeSpec - ; typ_Object: ILType - ; tref_String: ILTypeRef - ; typ_String: ILType - ; typ_StringBuilder: ILType - ; typ_AsyncCallback: ILType - ; typ_IAsyncResult: ILType - ; typ_IComparable: ILType - ; tref_Type: ILTypeRef - ; typ_Type: ILType - ; tref_Missing: ILTypeRef - ; typ_Missing: ILType - ; typ_Activator: ILType - ; typ_Delegate: ILType - ; typ_ValueType: ILType - ; typ_Enum: ILType - ; tspec_TypedReference: ILTypeSpec - ; typ_TypedReference: ILType - ; typ_MulticastDelegate: ILType - ; typ_Array: ILType - ; tspec_Int64: ILTypeSpec - ; tspec_UInt64: ILTypeSpec - ; tspec_Int32: ILTypeSpec - ; tspec_UInt32: ILTypeSpec - ; tspec_Int16: ILTypeSpec - ; tspec_UInt16: ILTypeSpec - ; tspec_SByte: ILTypeSpec - ; tspec_Byte: ILTypeSpec - ; tspec_Single: ILTypeSpec - ; tspec_Double: ILTypeSpec - ; tspec_IntPtr: ILTypeSpec - ; tspec_UIntPtr: ILTypeSpec - ; tspec_Char: ILTypeSpec - ; tspec_Bool: ILTypeSpec - ; typ_int8: ILType - ; typ_int16: ILType - ; typ_int32: ILType - ; typ_int64: ILType - ; typ_uint8: ILType - ; typ_uint16: ILType - ; typ_uint32: ILType - ; typ_uint64: ILType - ; typ_float32: ILType - ; typ_float64: ILType - ; typ_bool: ILType - ; typ_char: ILType - ; typ_IntPtr: ILType - ; typ_UIntPtr: ILType - ; typ_RuntimeArgumentHandle: ILType - ; typ_RuntimeTypeHandle: ILType - ; typ_RuntimeMethodHandle: ILType - ; typ_RuntimeFieldHandle: ILType - ; typ_Byte: ILType - ; typ_Int16: ILType - ; typ_Int32: ILType - ; typ_Int64: ILType - ; typ_SByte: ILType - ; typ_UInt16: ILType - ; typ_UInt32: ILType - ; typ_UInt64: ILType - ; typ_Single: ILType - ; typ_Double: ILType - ; typ_Bool: ILType - ; typ_Char: ILType - ; typ_SerializationInfo: ILType - ; typ_StreamingContext: ILType - ; tref_SecurityPermissionAttribute: ILTypeRef - ; tspec_Exception: ILTypeSpec - ; typ_Exception: ILType } - -let mk_normal_call mspec = I_call (Normalcall, mspec, None) -let mk_normal_callvirt mspec = I_callvirt (Normalcall, mspec, None) -let mk_normal_callconstraint (ty,mspec) = I_callconstraint (Normalcall, ty, mspec, None) -let mk_normal_newobj mspec = I_newobj (mspec, None) -let ldarg_0 = I_ldarg 0us -let ldarg_1 = I_ldarg 1us -let tname_CompilerGeneratedAttribute = "System.Runtime.CompilerServices.CompilerGeneratedAttribute" -let tname_DebuggableAttribute = "System.Diagnostics.DebuggableAttribute" - -let mk_ILGlobals mscorlib_scoref mscorlib_assembly_name_option = - let mscorlibAssemblyName = - match mscorlib_assembly_name_option with - | Some name -> name - | None -> (match mscorlib_scoref with - | ScopeRef_assembly assref -> assref.Name - | _ -> failwith "mk_ILGlobals: mscorlib ILScopeRef is not an assembly ref") - let tref_Object = mk_tref (mscorlib_scoref,tname_Object) - let tspec_Object = mk_nongeneric_tspec tref_Object - let typ_Object = Type_boxed tspec_Object - - let tref_String = mk_tref (mscorlib_scoref,tname_String) - let tspec_String = mk_tspec(tref_String,mk_empty_gactuals) - let typ_String = Type_boxed tspec_String - - let tref_StringBuilder = mk_tref (mscorlib_scoref,tname_StringBuilder) - let tspec_StringBuilder = mk_tspec(tref_StringBuilder,mk_empty_gactuals) - let typ_StringBuilder = Type_boxed tspec_StringBuilder - - let tref_AsyncCallback = mk_tref (mscorlib_scoref,tname_AsyncCallback) - let tspec_AsyncCallback = mk_tspec(tref_AsyncCallback,mk_empty_gactuals) - let typ_AsyncCallback = Type_boxed tspec_AsyncCallback - - let tref_IAsyncResult = mk_tref (mscorlib_scoref,tname_IAsyncResult) - let tspec_IAsyncResult = mk_tspec(tref_IAsyncResult,mk_empty_gactuals) - let typ_IAsyncResult = Type_boxed tspec_IAsyncResult - - let tref_IComparable = mk_tref (mscorlib_scoref,tname_IComparable) - let tspec_IComparable = mk_tspec(tref_IComparable,mk_empty_gactuals) - let typ_IComparable = Type_boxed tspec_IComparable - - let tref_Exception = mk_tref (mscorlib_scoref,tname_Exception) - let tspec_Exception = mk_tspec(tref_Exception,mk_empty_gactuals) - let typ_Exception = Type_boxed tspec_Exception - - let tref_Type = mk_tref(mscorlib_scoref,tname_Type) - let tspec_Type = mk_tspec(tref_Type,mk_empty_gactuals) - let typ_Type = Type_boxed tspec_Type - - let tref_Missing = mk_tref(mscorlib_scoref,tname_Missing) - let tspec_Missing = mk_tspec(tref_Missing,mk_empty_gactuals) - let typ_Missing = Type_boxed tspec_Missing - - - let tref_Activator = mk_tref(mscorlib_scoref,tname_Activator) - let tspec_Activator = mk_tspec(tref_Activator,mk_empty_gactuals) - let typ_Activator = Type_boxed tspec_Activator - - let tref_SerializationInfo = mk_tref(mscorlib_scoref,tname_SerializationInfo) - let tspec_SerializationInfo = mk_tspec(tref_SerializationInfo,mk_empty_gactuals) - let typ_SerializationInfo = Type_boxed tspec_SerializationInfo - - let tref_StreamingContext = mk_tref(mscorlib_scoref,tname_StreamingContext) - let tspec_StreamingContext = mk_tspec(tref_StreamingContext,mk_empty_gactuals) - let typ_StreamingContext = Type_value tspec_StreamingContext - - let tref_SecurityPermissionAttribute = mk_tref(mscorlib_scoref,tname_SecurityPermissionAttribute) - - let tref_Delegate = mk_tref(mscorlib_scoref,tname_Delegate) - let tspec_Delegate = mk_tspec(tref_Delegate,mk_empty_gactuals) - let typ_Delegate = Type_boxed tspec_Delegate - - let tref_ValueType = mk_tref (mscorlib_scoref,tname_ValueType) - let tspec_ValueType = mk_tspec(tref_ValueType,mk_empty_gactuals) - let typ_ValueType = Type_boxed tspec_ValueType - - let tref_TypedReference = mk_tref (mscorlib_scoref,tname_TypedReference) - let tspec_TypedReference = mk_tspec(tref_TypedReference,mk_empty_gactuals) - let typ_TypedReference = Type_value tspec_TypedReference - - let tref_Enum = mk_tref (mscorlib_scoref,tname_Enum) - let tspec_Enum = mk_tspec(tref_Enum,mk_empty_gactuals) - let typ_Enum = Type_boxed tspec_Enum - - let tref_MulticastDelegate = mk_tref (mscorlib_scoref,tname_MulticastDelegate) - let tspec_MulticastDelegate = mk_tspec(tref_MulticastDelegate,mk_empty_gactuals) - let typ_MulticastDelegate = Type_boxed tspec_MulticastDelegate - - let typ_Array = Type_boxed (mk_tspec(mk_tref (mscorlib_scoref,tname_Array),mk_empty_gactuals)) - - let tref_Int64 = mk_tref (mscorlib_scoref,tname_Int64) - let tref_UInt64 = mk_tref (mscorlib_scoref,tname_UInt64) - let tref_Int32 = mk_tref (mscorlib_scoref,tname_Int32) - let tref_UInt32 = mk_tref (mscorlib_scoref,tname_UInt32) - let tref_Int16 = mk_tref (mscorlib_scoref,tname_Int16) - let tref_UInt16 = mk_tref (mscorlib_scoref,tname_UInt16) - let tref_SByte = mk_tref (mscorlib_scoref,tname_SByte) - let tref_Byte = mk_tref (mscorlib_scoref,tname_Byte) - let tref_Single = mk_tref (mscorlib_scoref,tname_Single) - let tref_Double = mk_tref (mscorlib_scoref,tname_Double) - let tref_Bool = mk_tref (mscorlib_scoref,tname_Bool) - let tref_Char = mk_tref (mscorlib_scoref,tname_Char) - let tref_IntPtr = mk_tref (mscorlib_scoref,tname_IntPtr) - let tref_UIntPtr = mk_tref (mscorlib_scoref,tname_UIntPtr) - - let tspec_Int64 = mk_tspec(tref_Int64,mk_empty_gactuals) - let tspec_UInt64 = mk_tspec(tref_UInt64,mk_empty_gactuals) - let tspec_Int32 = mk_tspec(tref_Int32,mk_empty_gactuals) - let tspec_UInt32 = mk_tspec(tref_UInt32,mk_empty_gactuals) - let tspec_Int16 = mk_tspec(tref_Int16,mk_empty_gactuals) - let tspec_UInt16 = mk_tspec(tref_UInt16,mk_empty_gactuals) - let tspec_SByte = mk_tspec(tref_SByte,mk_empty_gactuals) - let tspec_Byte = mk_tspec(tref_Byte,mk_empty_gactuals) - let tspec_Single = mk_tspec(tref_Single,mk_empty_gactuals) - let tspec_Double = mk_tspec(tref_Double,mk_empty_gactuals) - let tspec_IntPtr = mk_tspec(tref_IntPtr,mk_empty_gactuals) - let tspec_UIntPtr = mk_tspec(tref_UIntPtr,mk_empty_gactuals) - let tspec_Char = mk_tspec(tref_Char,mk_empty_gactuals) - let tspec_Bool = mk_tspec(tref_Bool,mk_empty_gactuals) - - let typ_int8 = Type_value tspec_SByte - let typ_int16 = Type_value tspec_Int16 - let typ_int32 = Type_value tspec_Int32 - let typ_int64 = Type_value tspec_Int64 - let typ_uint8 = Type_value tspec_Byte - let typ_uint16 = Type_value tspec_UInt16 - let typ_uint32 = Type_value tspec_UInt32 - let typ_uint64 = Type_value tspec_UInt64 - let typ_float32 = Type_value tspec_Single - let typ_float64 = Type_value tspec_Double - let typ_bool = Type_value tspec_Bool - let typ_char = Type_value tspec_Char - let typ_IntPtr = Type_value tspec_IntPtr - let typ_UIntPtr = Type_value tspec_UIntPtr - - let typ_SByte = Type_value tspec_SByte - let typ_Int16 = Type_value tspec_Int16 - let typ_Int32 = Type_value tspec_Int32 - let typ_Int64 = Type_value tspec_Int64 - let typ_Byte = Type_value tspec_Byte - let typ_UInt16 = Type_value tspec_UInt16 - let typ_UInt32 = Type_value tspec_UInt32 - let typ_UInt64 = Type_value tspec_UInt64 - let typ_Single = Type_value tspec_Single - let typ_Double = Type_value tspec_Double - let typ_Bool = Type_value tspec_Bool - let typ_Char = Type_value tspec_Char - - let tref_RuntimeArgumentHandle = mk_tref (mscorlib_scoref,tname_RuntimeArgumentHandle) - let tspec_RuntimeArgumentHandle = mk_tspec(tref_RuntimeArgumentHandle,mk_empty_gactuals) - let typ_RuntimeArgumentHandle = Type_value tspec_RuntimeArgumentHandle - let tref_RuntimeTypeHandle = mk_tref (mscorlib_scoref,tname_RuntimeTypeHandle) - let tspec_RuntimeTypeHandle = mk_tspec(tref_RuntimeTypeHandle,mk_empty_gactuals) - let typ_RuntimeTypeHandle = Type_value tspec_RuntimeTypeHandle - let tref_RuntimeMethodHandle = mk_tref (mscorlib_scoref,tname_RuntimeMethodHandle) - let tspec_RuntimeMethodHandle = mk_tspec(tref_RuntimeMethodHandle,mk_empty_gactuals) - let typ_RuntimeMethodHandle = Type_value tspec_RuntimeMethodHandle - let tref_RuntimeFieldHandle = mk_tref (mscorlib_scoref,tname_RuntimeFieldHandle) - let tspec_RuntimeFieldHandle = mk_tspec(tref_RuntimeFieldHandle,mk_empty_gactuals) - let typ_RuntimeFieldHandle = Type_value tspec_RuntimeFieldHandle - { mscorlib_scoref =mscorlib_scoref - ; mscorlibAssemblyName =mscorlibAssemblyName - ; tref_Object =tref_Object - ; tspec_Object =tspec_Object - ; typ_Object =typ_Object - ; tref_String =tref_String - ; typ_String =typ_String - ; typ_StringBuilder =typ_StringBuilder - ; typ_AsyncCallback =typ_AsyncCallback - ; typ_IAsyncResult =typ_IAsyncResult - ; typ_IComparable =typ_IComparable - ; typ_Activator =typ_Activator - ; tref_Type =tref_Type - ; typ_Type =typ_Type - ; tref_Missing =tref_Missing - ; typ_Missing =typ_Missing - ; typ_Delegate =typ_Delegate - ; typ_ValueType =typ_ValueType - ; typ_Enum =typ_Enum - ; tspec_TypedReference =tspec_TypedReference - ; typ_TypedReference =typ_TypedReference - ; typ_MulticastDelegate =typ_MulticastDelegate - ; typ_Array =typ_Array - ; tspec_Int64 =tspec_Int64 - ; tspec_UInt64 =tspec_UInt64 - ; tspec_Int32 =tspec_Int32 - ; tspec_UInt32 =tspec_UInt32 - ; tspec_Int16 =tspec_Int16 - ; tspec_UInt16 =tspec_UInt16 - ; tspec_SByte =tspec_SByte - ; tspec_Byte =tspec_Byte - ; tspec_Single =tspec_Single - ; tspec_Double =tspec_Double - ; tspec_IntPtr =tspec_IntPtr - ; tspec_UIntPtr =tspec_UIntPtr - ; tspec_Char =tspec_Char - ; tspec_Bool =tspec_Bool - ; typ_int8 =typ_int8 - ; typ_int16 =typ_int16 - ; typ_int32 =typ_int32 - ; typ_int64 =typ_int64 - ; typ_uint8 =typ_uint8 - ; typ_uint16 =typ_uint16 - ; typ_uint32 =typ_uint32 - ; typ_uint64 =typ_uint64 - ; typ_float32 =typ_float32 - ; typ_float64 =typ_float64 - ; typ_bool =typ_bool - ; typ_char =typ_char - ; typ_IntPtr =typ_IntPtr - ; typ_UIntPtr =typ_UIntPtr - ; typ_RuntimeArgumentHandle =typ_RuntimeArgumentHandle - ; typ_RuntimeTypeHandle =typ_RuntimeTypeHandle - ; typ_RuntimeMethodHandle =typ_RuntimeMethodHandle - ; typ_RuntimeFieldHandle =typ_RuntimeFieldHandle - - ; typ_Byte =typ_Byte - ; typ_Int16 =typ_Int16 - ; typ_Int32 =typ_Int32 - ; typ_Int64 =typ_Int64 - ; typ_SByte =typ_SByte - ; typ_UInt16 =typ_UInt16 - ; typ_UInt32 =typ_UInt32 - ; typ_UInt64 =typ_UInt64 - ; typ_Single =typ_Single - ; typ_Double =typ_Double - ; typ_Bool =typ_Bool - ; typ_Char =typ_Char - ; typ_SerializationInfo=typ_SerializationInfo - ; typ_StreamingContext=typ_StreamingContext - ; tref_SecurityPermissionAttribute=tref_SecurityPermissionAttribute - ; tspec_Exception =tspec_Exception - ; typ_Exception =typ_Exception } - - -(* NOTE: ecma_ prefix refers to the standard "mscorlib" *) -let ecma_mscorlib_assembly_name = "mscorlib" -let ecma_public_token = PublicKeyToken (Bytes.of_intarray [|0x96; 0x9D; 0xB8; 0x05; 0x3D; 0x33; 0x22; 0xAC |]) -let ecma_mscorlib_assref = - ILAssemblyRef.Create(ecma_mscorlib_assembly_name, None, Some ecma_public_token, true, None, None) - -let ecma_mscorlib_scoref = ScopeRef_assembly ecma_mscorlib_assref - -let ecmaILGlobals = mk_ILGlobals ecma_mscorlib_scoref None - -let mspec_RuntimeHelpers_InitializeArray ilg = - mk_static_nongeneric_mspec_in_nongeneric_boxed_tref (mk_tref(ilg.mscorlib_scoref,"System.Runtime.CompilerServices.RuntimeHelpers"),"InitializeArray", [ilg.typ_Array;ilg.typ_RuntimeFieldHandle], Type_void) -(* e.ilg. [mk_mscorlib_exn_newobj "System.InvalidCastException"] *) -let mk_mscorlib_exn_newobj ilg eclass = - mk_normal_newobj (mk_nongeneric_ctor_mspec (mk_tref(ilg.mscorlib_scoref,eclass),AsObject,[])) - -let mspec_Console_WriteLine ilg = mk_static_nongeneric_mspec_in_nongeneric_boxed_tref (mk_tref(ilg.mscorlib_scoref,"System.Console"),"WriteLine",[ilg.typ_String],Type_void) - -let mspec_RunClassConstructor ilg = - mk_static_nongeneric_mspec_in_nongeneric_boxed_tref (mk_tref(ilg.mscorlib_scoref,"System.Runtime.CompilerServices.RuntimeHelpers"),"RunClassConstructor",[ilg.typ_RuntimeTypeHandle],Type_void) - - -let mk_RunClassConstructor ilg tspec = - [ I_ldtoken (Token_type (mk_typ AsObject tspec)); - mk_normal_call (mspec_RunClassConstructor ilg) ] - -let mspec_StringBuilder_string ilg = - mk_ctor_mspec_for_typ(ilg.typ_StringBuilder,[ilg.typ_String]) - -let typ_is_boxed = function Type_boxed _ -> true | _ -> false -let typ_is_value = function Type_value _ -> true | _ -> false - - -let tspec_is_mscorlib ilg (tspec:ILTypeSpec) n = - let tref = tspec.TypeRef - let scoref = tref.Scope - (tref.Name = n) && - begin match scoref with - | ScopeRef_assembly n -> n.Name = ilg.mscorlibAssemblyName - | ScopeRef_module _ -> false - | ScopeRef_local -> true - end - -let typ_is_boxed_mscorlib_typ ilg ty n = - typ_is_boxed ty && tspec_is_mscorlib ilg (tspec_of_typ ty) n - -let typ_is_value_mscorlib_typ ilg ty n = - typ_is_value ty && tspec_is_mscorlib ilg (tspec_of_typ ty) n - -let typ_is_Object ilg ty = typ_is_boxed_mscorlib_typ ilg ty tname_Object -(* -let typ_is_MulticastDelegate ilg ty = typ_is_boxed_mscorlib_typ ilg ty tname_MulticastDelegate -let typ_is_Delegate ilg ty = typ_is_boxed_mscorlib_typ ilg ty tname_Delegate -let typ_is_Enum ilg ty = typ_is_boxed_mscorlib_typ ilg ty tname_Enum -let typ_is_ValueType ilg ty = typ_is_boxed_mscorlib_typ ilg ty tname_ValueType -*) -let typ_is_String ilg ty = typ_is_boxed_mscorlib_typ ilg ty tname_String -let typ_is_AsyncCallback ilg ty = typ_is_boxed_mscorlib_typ ilg ty tname_AsyncCallback -let typ_is_TypedReference ilg ty = typ_is_value_mscorlib_typ ilg ty tname_TypedReference -let typ_is_IAsyncResult ilg ty = typ_is_boxed_mscorlib_typ ilg ty tname_IAsyncResult -let typ_is_IComparable ilg ty = typ_is_boxed_mscorlib_typ ilg ty tname_IComparable -let typ_is_SByte ilg ty = typ_is_value_mscorlib_typ ilg ty tname_SByte -let typ_is_Byte ilg ty = typ_is_value_mscorlib_typ ilg ty tname_Byte -let typ_is_Int16 ilg ty = typ_is_value_mscorlib_typ ilg ty tname_Int16 -let typ_is_UInt16 ilg ty = typ_is_value_mscorlib_typ ilg ty tname_UInt16 -let typ_is_Int32 ilg ty = typ_is_value_mscorlib_typ ilg ty tname_Int32 -let typ_is_UInt32 ilg ty = typ_is_value_mscorlib_typ ilg ty tname_UInt32 -let typ_is_Int64 ilg ty = typ_is_value_mscorlib_typ ilg ty tname_Int64 -let typ_is_UInt64 ilg ty = typ_is_value_mscorlib_typ ilg ty tname_UInt64 -let typ_is_IntPtr ilg ty = typ_is_value_mscorlib_typ ilg ty tname_IntPtr -let typ_is_UIntPtr ilg ty = typ_is_value_mscorlib_typ ilg ty tname_UIntPtr -let typ_is_Bool ilg ty = typ_is_value_mscorlib_typ ilg ty tname_Bool -let typ_is_Char ilg ty = typ_is_value_mscorlib_typ ilg ty tname_Char -let typ_is_Single ilg ty = typ_is_value_mscorlib_typ ilg ty tname_Single -let typ_is_Double ilg ty = typ_is_value_mscorlib_typ ilg ty tname_Double - -#endif - -(* -------------------------------------------------------------------- - * Rescoping - * -------------------------------------------------------------------- *) - - -let qrescope_scoref scoref scoref_old = - match scoref,scoref_old with - | _,ScopeRef_local -> Some scoref - | ScopeRef_local,_ -> None - | _,ScopeRef_module _ -> Some scoref - | ScopeRef_module _,_ -> None - | _ -> None -let qrescope_tref scoref (x:ILTypeRef) = - match qrescope_scoref scoref x.Scope with - | None -> None - | Some s -> Some (ILTypeRef.Create(s,x.Enclosing,x.Name)) - -let rescope_scoref x y = match qrescope_scoref x y with Some x -> x | None -> y -let rescope_tref x y = match qrescope_tref x y with Some x -> x | None -> y - -// ORIGINAL IMPLEMENTATION (too many allocations -// { tspecTypeRef=rescope_tref scoref tref; -// tspecInst=rescope_inst scoref tinst } -let rec qrescope_tspec scoref (tspec:ILTypeSpec) = - let tref = tspec.TypeRef - let tinst = tspec.GenericArgs - let qtref = qrescope_tref scoref tref - match tinst,qtref with - | [],None -> None (* avoid reallocation in the common case *) - | _,None -> - Some (ILTypeSpec.Create (tref, rescope_inst scoref tinst)) - | _,Some tref -> - Some (ILTypeSpec.Create (tref, rescope_inst scoref tinst)) -and rescope_tspec x y = match qrescope_tspec x y with Some x -> x | None -> y -and rescope_typ scoref typ = - match typ with - | Type_ptr t -> Type_ptr (rescope_typ scoref t) - | Type_fptr t -> Type_fptr (rescope_callsig scoref t) - | Type_byref t -> Type_byref (rescope_typ scoref t) - | Type_boxed cr -> - begin match qrescope_tspec scoref cr with - | Some res -> Type_boxed res - | None -> typ (* avoid reallocation in the common case *) - end - - | Type_array (s,ty) -> Type_array (s,rescope_typ scoref ty) - | Type_value cr -> - begin match qrescope_tspec scoref cr with - | Some res -> Type_value res - | None -> typ (* avoid reallocation in the common case *) - end - | Type_modified(b,tref,ty) -> Type_modified(b,rescope_tref scoref tref, rescope_typ scoref ty) - | x -> x -and rescope_inst scoref i = List.map (rescope_typ scoref) i -and rescope_callsig scoref csig = - mk_callsig - (csig.callsigCallconv,List.map (rescope_typ scoref) csig.callsigArgs,rescope_typ scoref csig.callsigReturn) - -let rescope_dloc scoref tref = rescope_tref scoref tref -let rescope_mref scoref (x:ILMethodRef) = - { mrefParent = rescope_dloc scoref x.EnclosingTypeRef; - mrefCallconv = x.mrefCallconv; - mrefGenericArity=x.mrefGenericArity; - mrefName=x.mrefName; - mrefArgs = List.map (rescope_typ scoref) x.mrefArgs; - mrefReturn= rescope_typ scoref x.mrefReturn } - -let rescope_fref scoref x = - { frefParent = rescope_tref scoref x.frefParent; - frefName= x.frefName; - frefType= rescope_typ scoref x.frefType } - -let rescope_ospec scoref (OverridesSpec(mref,typ)) = - OverridesSpec (rescope_mref scoref mref,rescope_typ scoref typ) - -let rescope_fspec scoref x = - { fspecFieldRef = rescope_fref scoref x.fspecFieldRef; - fspecEnclosingType = rescope_typ scoref x.fspecEnclosingType } - -let rescope_mspec scoref x = - let x1,x2,x3 = dest_mspec x - ILMethodSpec.Create(rescope_typ scoref x2,rescope_mref scoref x1,rescope_inst scoref x3) - -#if STANDALONE_METADATA -#else - -(* -------------------------------------------------------------------- - * Instantiate polymorphism in types - * -------------------------------------------------------------------- *) - -let rec inst_tspec_aux num_free inst (tspec:ILTypeSpec) = - ILTypeSpec.Create(tspec.TypeRef,inst_inst_aux num_free inst tspec.GenericArgs) - -and inst_typ_aux num_free inst typ = - match typ with - | Type_ptr t -> Type_ptr (inst_typ_aux num_free inst t) - | Type_fptr t -> Type_fptr (inst_callsig_aux num_free inst t) - | Type_array (a,t) -> Type_array (a,inst_typ_aux num_free inst t) - | Type_byref t -> Type_byref (inst_typ_aux num_free inst t) - | Type_boxed cr -> Type_boxed (inst_tspec_aux num_free inst cr) - | Type_value cr -> Type_value (inst_tspec_aux num_free inst cr) - | Type_tyvar v -> - let v = int v - let top = List.length inst - if v < num_free then typ else - if v - num_free >= top then Type_tyvar (uint16 (v - top)) else - inst_read inst (uint16 (v - num_free)) - | x -> x - -and inst_inst_aux num_free inst i = List.map (inst_typ_aux num_free inst) i -and inst_callsig_aux num_free inst csig = - mk_callsig - (csig.callsigCallconv,List.map (inst_typ_aux num_free inst) csig.callsigArgs,inst_typ_aux num_free inst csig.callsigReturn) - -let inst_typ i t = inst_typ_aux 0 i t -let inst_inst i t = inst_inst_aux 0 i t -let inst_tspec i t = inst_tspec_aux 0 i t -let inst_callsig i t = inst_callsig_aux 0 i t - -(* -------------------------------------------------------------------- - * MS-IL: Parameters, Return types and Locals - * -------------------------------------------------------------------- *) - -let mk_param (name,ty) = - { paramName=name; - paramDefault=None; - paramMarshal=None; - paramIn=false; - paramOut=false; - paramOptional=false; - paramType=ty; - paramCustomAttrs=mk_custom_attrs [] } -let mk_named_param (s,ty) = mk_param (Some s,ty) -let mk_unnamed_param ty = mk_param (None,ty) - -let mk_return ty = - { returnMarshal=None; - returnType=ty; - returnCustomAttrs=mk_custom_attrs [] } - -let mk_local ty = - { localPinned=false; - localType=ty; } -let typ_of_local p = p.localType - -let active_inst_of_fspec fspec = - inst_of_typ fspec.fspecEnclosingType - -let actual_typ_of_fspec fr = - let env = active_inst_of_fspec fr - inst_typ env fr.FormalType - -(* -------------------------------------------------------------------- - * - * -------------------------------------------------------------------- *) - -let mk_ldc_i32 i = I_arith (AI_ldc (DT_I4,NUM_I4 i)) - -(* -------------------------------------------------------------------- - * Make a method mbody - * -------------------------------------------------------------------- *) - -let mk_ilmbody (zeroinit,locals,maxstack,code,tag) = - { ilZeroInit=zeroinit; - ilMaxStack=maxstack; - ilNoInlining=false; - ilLocals=locals; - ilCode= code; - ilSource=tag } - -let mk_impl info = MethodBody_il (mk_ilmbody info) - -(* -------------------------------------------------------------------- - * Make a constructor - * -------------------------------------------------------------------- *) - -let mk_void_return = mk_return Type_void - -let mk_ctor (access,args,impl) = - { mdName=".ctor"; - mdKind=MethodKind_ctor; - mdCallconv=ILCallingConv.Instance; - mdParams=args; - mdReturn= mk_void_return; - mdAccess=access; - mdBody= mk_mbody impl; - mdCodeKind=MethodCodeKind_il; - mdInternalCall=false; - mdManaged=true; - mdForwardRef=false; - - mdSecurityDecls=mk_security_decls []; - mdHasSecurity=false; - mdEntrypoint=false; - - mdGenericParams=mk_empty_gparams; - mdExport=None; - mdVtableEntry=None; - mdReqSecObj=false; - mdHideBySig=false; - mdSpecialName=true; - mdUnmanagedExport=false; - mdSynchronized=false; - mdMustRun=false; - mdPreserveSig=false; - mdCustomAttrs = mk_custom_attrs []; - } - -(* -------------------------------------------------------------------- - * Do-nothing ctor, just pass on to monomorphic superclass - * -------------------------------------------------------------------- *) - -let mk_ldargs args = - [ ldarg_0; ] @ - List.mapi (fun i _ -> I_ldarg (uint16 (i+1))) args - -let mk_call_superclass_constructor_prim args mspec = - mk_ldargs args @ [ mk_normal_call mspec ] - -let mk_nongeneric_call_superclass_constructor ((args:ILType list),super_tref) = - mk_call_superclass_constructor_prim args (mk_nongeneric_ctor_mspec (super_tref,AsObject,[])) - -let mk_nongeneric_call_superclass_constructor2 ((args:ILParameter list),super_tref) = - mk_call_superclass_constructor_prim args (mk_nongeneric_ctor_mspec (super_tref,AsObject,[])) - -let mk_call_superclass_constructor ((args:ILType list),tspec) = - mk_call_superclass_constructor_prim args (mk_ctor_mspec_for_boxed_tspec (tspec,[])) - - -let mk_normal_stfld fspec = I_stfld (Aligned,Nonvolatile,fspec) -let mk_normal_stsfld fspec = I_stsfld (Nonvolatile,fspec) -let mk_normal_ldsfld fspec = I_ldsfld (Nonvolatile,fspec) -let mk_normal_ldfld fspec = I_ldfld (Aligned,Nonvolatile,fspec) -let mk_normal_ldflda fspec = I_ldflda fspec -let mk_normal_stind dt = I_stind (Aligned,Nonvolatile,dt) -let mk_normal_ldind dt = I_ldind (Aligned,Nonvolatile,dt) -let mk_normal_ldobj dt = I_ldobj(Aligned,Nonvolatile,dt) -let mk_normal_stobj dt = I_stobj(Aligned,Nonvolatile,dt) -let mk_normal_cpind dt = [ I_ldind (Aligned,Nonvolatile,dt); - I_stind (Aligned,Nonvolatile,dt) ] (* REVIEW: check me *) - -let mk_nongeneric_nothing_ctor tag super_tref args = - mk_ctor(MemAccess_public,args, - mk_impl(false,[],8, - nonbranching_instrs_to_code - (mk_nongeneric_call_superclass_constructor2 (args,super_tref)),tag)) - -(* -------------------------------------------------------------------- - * Make a static, top level monomophic method - very useful for - * creating helper ILMethodDefs for internal use. - * -------------------------------------------------------------------- *) -let mk_static_mdef (genparams,nm,access,args,ret,impl) = - { mdGenericParams=genparams; - mdName=nm; - mdCallconv = ILCallingConv.Static; - mdKind=MethodKind_static; - mdParams= args; - mdReturn= ret; - mdAccess=access; - mdHasSecurity=false; - mdSecurityDecls=mk_security_decls []; - mdEntrypoint=false; - mdExport=None; - mdCustomAttrs = mk_custom_attrs []; - mdVtableEntry=None; - mdBody= mk_mbody impl; - mdCodeKind=MethodCodeKind_il; - mdInternalCall=false; - mdManaged=true; - mdForwardRef=false; - mdReqSecObj=false; - mdHideBySig=false; - mdSpecialName=false; - mdUnmanagedExport=false; - mdSynchronized=false; - mdMustRun=false; - mdPreserveSig=false; } - -let mk_static_nongeneric_mdef (nm,access,args,ret,impl) = - mk_static_mdef (mk_empty_gparams,nm,access,args,ret,impl) - -let mk_cctor impl = - { mdName=".cctor"; - mdCallconv=ILCallingConv.Static; - mdGenericParams=mk_empty_gparams; - mdKind=MethodKind_cctor; - mdParams=[]; - mdReturn=mk_void_return; - mdAccess=MemAccess_private; - mdEntrypoint=false; - mdHasSecurity=false; - mdSecurityDecls=mk_security_decls []; - mdExport=None; - mdCustomAttrs = mk_custom_attrs []; - mdVtableEntry=None; - mdBody= mk_mbody impl; - mdCodeKind=MethodCodeKind_il; - mdInternalCall=false; - mdManaged=true; - mdForwardRef=false; - mdReqSecObj=false; - mdHideBySig=false; - mdSpecialName=true; - mdUnmanagedExport=false; - mdSynchronized=false; - mdMustRun=false; - mdPreserveSig=false; } - -(* -------------------------------------------------------------------- - * Make a virtual method, where the overriding is simply the default - * (i.e. overrides by name/signature) - * -------------------------------------------------------------------- *) - -let mk_ospec (typ,callconv,nm,genparams,formal_args,formal_ret) = - OverridesSpec (mk_mref (tref_of_typ typ, callconv, nm, genparams, formal_args,formal_ret), typ) - -let mk_generic_virtual_mdef (nm,access,genparams,actual_args,actual_ret,impl) = - { mdName=nm; - mdGenericParams=genparams; - mdCallconv=ILCallingConv.Instance; - mdKind= - MethodKind_virtual - { virtFinal=false; - // REVIEW: We'll need to start setting this eventually - virtNewslot = false; - virtStrict=true; - virtAbstract=(match impl with MethodBody_abstract -> true | _ -> false) ; }; - mdParams= actual_args; - mdReturn=actual_ret; - mdAccess=access; - mdEntrypoint=false; - mdHasSecurity=false; - mdSecurityDecls=mk_security_decls []; - mdExport=None; - mdCustomAttrs = mk_custom_attrs []; - mdVtableEntry=None; - mdBody= mk_mbody impl; - mdCodeKind=MethodCodeKind_il; - mdInternalCall=false; - mdManaged=true; - mdForwardRef=false; - mdReqSecObj=false; - mdHideBySig=false; - mdSpecialName=false; - mdUnmanagedExport=false; - mdSynchronized=false; - mdMustRun=false; - mdPreserveSig=false; } - -let mk_virtual_mdef (nm,access,args,ret,impl) = - mk_generic_virtual_mdef (nm,access,mk_empty_gparams,args,ret,impl) - -let mk_generic_instance_mdef (nm,access,genparams, actual_args,actual_ret, impl) = - { mdName=nm; - mdGenericParams=genparams; - mdCallconv=ILCallingConv.Instance; - mdKind=MethodKind_nonvirtual; - mdParams= actual_args; - mdReturn=actual_ret; - mdAccess=access; - mdEntrypoint=false; - mdHasSecurity=false; - mdSecurityDecls=mk_security_decls []; - mdExport=None; - mdCustomAttrs = mk_custom_attrs []; - mdVtableEntry=None; - mdBody= mk_mbody impl; - mdCodeKind=MethodCodeKind_il; - mdInternalCall=false; - mdManaged=true; - mdForwardRef=false; - mdReqSecObj=false; - mdHideBySig=false; - mdSpecialName=false; - mdUnmanagedExport=false; - mdSynchronized=false; - mdMustRun=false; - mdPreserveSig=false; } - -let mk_instance_mdef (nm,access,args,ret,impl) = - mk_generic_instance_mdef (nm,access,mk_empty_gparams,args,ret,impl) - - -(* -------------------------------------------------------------------- - * Add some code to the end of the .cctor for a type. Create a .cctor - * if one doesn't exist already. - * -------------------------------------------------------------------- *) - -let ilmbody_code2code f il = - {il with ilCode = f il.ilCode} - -let mdef_code2code f md = - let il = - match dest_mbody md.mdBody with - | MethodBody_il il-> il - | _ -> failwith "mdef_code2code - method not IL" - let b = MethodBody_il (ilmbody_code2code f il) - {md with mdBody= mk_mbody b } - -let prepend_instrs_to_code c1 c2 = - let internalLab = generate_code_label () - join_code (check_code (mk_bblock {bblockLabel=internalLab; - bblockInstrs=Array.of_list (c1 @ [ I_br (unique_entry_of_code c2)])})) c2 - -let prepend_instrs_to_mdef new_code md = - mdef_code2code (prepend_instrs_to_code new_code) md - -let cctor_id = (".cctor",0) -(* Creates cctor if needed *) -let cdef_cctorCode2CodeOrCreate tag f cd = - let mdefs = cd.tdMethodDefs - let md,mdefs = - match find_mdefs_by_arity cctor_id mdefs with - | [mdef] -> mdef,filter_mdefs (fun md -> not (md.mdName = (fst cctor_id))) mdefs - | [] -> mk_cctor (mk_impl (false,[],1,nonbranching_instrs_to_code [ ],tag)), mdefs - | _ -> failwith "bad method table: more than one .cctor found" - let md' = f md - {cd with tdMethodDefs = add_mdef md' mdefs} - -let ilmbody_of_mdef m = - match dest_mbody m.mdBody with - | MethodBody_il il -> il - | _ -> failwith "ilmbody_of_mdef: not IL" - - -let code_of_mdef (md:ILMethodDef) = - match md.Code with - | Some x -> x - | None -> failwith "code_of_mdef: not IL" - -let argtys_of_mdef (md:ILMethodDef) = md.ParameterTypes -let retty_of_mdef (md:ILMethodDef) = md.Return.Type - -let callsig_of_mdef md = - mk_callsig (md.mdCallconv,argtys_of_mdef md,retty_of_mdef md) - -let mk_mref_to_mdef (tref,md) = - mk_mref (tref,md.mdCallconv,md.mdName,md.mdGenericParams.Length,argtys_of_mdef md,retty_of_mdef md) - -let mk_fref_to_fdef (tref,fdef) = mk_fref_in_tref (tref, fdef.fdName, fdef.fdType) - -let mref_for_mdef scope (tdefs,tdef) mdef = mk_mref_to_mdef (tref_for_nested_tdef scope (tdefs,tdef), mdef) -let fref_for_fdef scope (tdefs,tdef) fdef = mk_fref_in_tref (tref_for_nested_tdef scope (tdefs,tdef), fdef.fdName, fdef.fdType) - - -(* Creates cctor if needed *) -let prepend_instrs_to_cctor instrs tag cd = - cdef_cctorCode2CodeOrCreate tag (prepend_instrs_to_mdef instrs) cd - - -let mk_fdef (isStatic,nm,ty,init,at,access) = - { fdName=nm; - fdType=ty; - fdStatic = isStatic; - fdInit = init; - fdData=at; - fdOffset=None; - fdSpecialName = false; - fdMarshal=None; - fdNotSerialized=false; - fdInitOnly = false; - fdLiteral = false; - fdAccess = access; - fdCustomAttrs=mk_custom_attrs [] } - -let mk_instance_fdef (nm,ty,init,access) = mk_fdef (false,nm,ty,init,None,access) -let mk_static_fdef (nm,ty,init,at,access) = mk_fdef (true,nm,ty,init,at,access) - -(* -------------------------------------------------------------------- - * Scopes for allocating new temporary variables. - * -------------------------------------------------------------------- *) - -type tmps = { num_old_locals: int; newlocals: Local ResizeArray.t } -let alloc_tmp tmps loc = - let locn = uint16(tmps.num_old_locals + ResizeArray.length tmps.newlocals) - ResizeArray.add tmps.newlocals loc; - locn - -let get_tmps tmps = ResizeArray.to_list tmps.newlocals -let new_tmps n = { num_old_locals=n; newlocals=ResizeArray.create 10 } - - -let typ_of_fdef f = f.fdType -let name_of_fdef f = f.fdName - -let name_of_event e = e.eventName -let name_of_property p = p.propName - -let mk_fdefs l = Fields (LazyOrderedMultiMap(name_of_fdef,notlazy l)) -let mk_lazy_fdefs l = Fields (LazyOrderedMultiMap(name_of_fdef,l)) -let filter_fdefs f (Fields t) = Fields (t.Filter(f)) - -let mk_events l = Events (LazyOrderedMultiMap(name_of_event,notlazy l)) -let mk_lazy_events l = Events (LazyOrderedMultiMap(name_of_event,l)) -let filter_edefs f (Events t) = Events (t.Filter(f)) - -let mk_properties l = Properties (LazyOrderedMultiMap(name_of_property,notlazy l)) -let mk_lazy_properties l = Properties (LazyOrderedMultiMap(name_of_property,l) ) -let filter_pdefs f (Properties t) = Properties (t.Filter(f)) - -let add_exported_type_to_tab y tab = Map.add y.exportedTypeName y tab -let mk_exported_types l = ILExportedTypes (notlazy (List.foldBack add_exported_type_to_tab l Map.empty)) -let mk_lazy_exported_types (l:Lazy<_>) = ILExportedTypes (lazy (List.foldBack add_exported_type_to_tab (l.Force()) Map.empty)) - -let add_nested_exported_type_to_tab y tab = - let key = y.nestedExportedTypeName - Map.add key y tab - -let mk_nested_exported_types l = - ILNestedExportedTypes (notlazy (List.foldBack add_nested_exported_type_to_tab l Map.empty)) -let mk_lazy_nested_exported_types (l:Lazy<_>) = - ILNestedExportedTypes (lazy (List.foldBack add_nested_exported_type_to_tab (l.Force()) Map.empty)) -let find_nested_exported_type x (ILNestedExportedTypes ltab) = Map.find x (ltab.Force()) - -let mk_resources l = ILResources (notlazy l) -let mk_lazy_resources l = ILResources l - -let add_mimpl_to_tab y tab = - let key = (y.mimplOverrides.MethodRef.Name,List.length y.mimplOverrides.MethodRef.ArgTypes) - let prev = Map.tryFindMulti key tab - Map.add key (y::prev) tab -let mk_mimpls l = MethodImpls (notlazy (List.foldBack add_mimpl_to_tab l Map.empty)) -let mk_lazy_mimpls l = MethodImpls (lazy (List.foldBack add_mimpl_to_tab (Lazy.force l) Map.empty)) -let filter_mimpls f (MethodImpls ltab) = MethodImpls (lazy_map (Map.mapi (fun _ x -> List.filter f x)) ltab) - -(* -------------------------------------------------------------------- - * Make a constructor that simply takes its arguments and stuffs - * them in fields. preblock is how to call the superclass constructor.... - * -------------------------------------------------------------------- *) - -let mk_storage_ctor_with_param_names(tag,preblock,tspec,flds,access) = - mk_ctor(access, - flds |> List.map (fun (pnm,_,ty) -> mk_named_param (pnm,ty)), - mk_impl - (false,[],2, - nonbranching_instrs_to_code - begin - (match tag with Some x -> [I_seqpoint x] | None -> []) @ - preblock @ - begin - List.concat (List.mapi (fun n (pnm,nm,ty) -> - [ ldarg_0; - I_ldarg (uint16 (n+1)); - mk_normal_stfld (mk_fspec_in_boxed_tspec (tspec,nm,ty)); - ]) flds) - end - end,tag)) - -let mk_simple_storage_ctor_with_param_names(tag,base_tspec,derived_tspec,flds,access) = - let preblock = - match base_tspec with - None -> [] - | Some tspec -> - ([ ldarg_0; - mk_normal_call (mk_ctor_mspec_for_boxed_tspec (tspec,[])) ]) - mk_storage_ctor_with_param_names(tag,preblock,derived_tspec,flds,access) - -let add_param_names flds = - flds |> List.map (fun (nm,ty) -> (nm,nm,ty)) - -let mk_simple_storage_ctor(tag,base_tspec,derived_tspec,flds,access) = - mk_simple_storage_ctor_with_param_names(tag,base_tspec,derived_tspec, add_param_names flds, access) - -let mk_storage_ctor(tag,preblock,tspec,flds,access) = mk_storage_ctor_with_param_names(tag,preblock,tspec, add_param_names flds, access) - - -let mk_generic_class (nm,access,genparams,extends,impl,methods,fields,props,events,attrs) = - { tdKind=TypeDef_class; - tdName=nm; - tdGenericParams= genparams; - tdAccess = access; - tdImplements = impl; - tdAbstract = false; - tdSealed = false; - tdSerializable = false; - tdComInterop=false; - tdSpecialName=false; - tdLayout=TypeLayout_auto; - tdEncoding=TypeEncoding_ansi; - tdInitSemantics=TypeInit_beforefield; - tdExtends = Some extends; - tdMethodDefs= methods; - tdFieldDefs= fields; - tdNested=mk_tdefs []; - tdCustomAttrs=attrs; - tdMethodImpls=mk_mimpls []; - tdProperties=props; - tdEvents=events; - tdSecurityDecls=mk_security_decls []; - tdHasSecurity=false; -} - -let mk_rawdata_vtdef ilg (nm,size,pack) = - { tdKind=TypeDef_valuetype; - tdName = nm; - tdGenericParams= []; - tdAccess = TypeAccess_private; - tdImplements = []; - tdAbstract = false; - tdSealed = true; - tdExtends = Some ilg.typ_ValueType; - tdComInterop=false; - tdSerializable = false; - tdSpecialName=false; - tdLayout=TypeLayout_explicit { typeSize=Some size; typePack=Some pack }; - tdEncoding=TypeEncoding_ansi; - tdInitSemantics=TypeInit_beforefield; - tdMethodDefs= mk_mdefs []; - tdFieldDefs= mk_fdefs []; - tdNested=mk_tdefs []; - tdCustomAttrs=mk_custom_attrs []; - tdMethodImpls=mk_mimpls []; - tdProperties=mk_properties []; - tdEvents=mk_events []; - tdSecurityDecls=mk_security_decls []; - tdHasSecurity=false; } - - -let mk_simple_tdef ilg (nm,access,methods,fields,props,events,attrs) = - mk_generic_class (nm,access, mk_empty_gparams, ilg.typ_Object, [], methods,fields,props,events,attrs) - -let mk_toplevel_tdef ilg (methods,fields) = mk_simple_tdef ilg (tname_for_toplevel,TypeAccess_public, methods,fields,mk_properties [], mk_events [], mk_custom_attrs []) - -let dest_tdefs_with_toplevel_first ilg tdefs = - let l = dest_tdefs tdefs - let top,nontop = l |> List.partition (fun td -> td.Name = tname_for_toplevel) - let top2 = if isNil top then [mk_toplevel_tdef ilg (mk_mdefs [], mk_fdefs [])] else top - top2@nontop - -let mk_simple_mainmod assname modname dll tdefs hashalg locale flags = - { modulManifest= - Some { manifestName=assname; - manifestAuxModuleHashAlgorithm= match hashalg with | Some(alg) -> alg | _ -> 0x8004; // SHA1 - manifestSecurityDecls=mk_security_decls []; - manifestPublicKey= None; - manifestVersion= None; - manifestLocale=locale - manifestCustomAttrs=mk_custom_attrs []; - manifestLongevity=LongevityUnspecified; - manifestDisableJitOptimizations= 0 <> (flags &&& 0x4000); - manifestJitTracking=0 <> (flags &&& 0x8000); // always turn these on - manifestRetargetable= 0 <> (flags &&& 0xff); - manifestExportedTypes=mk_exported_types []; - manifestEntrypointElsewhere=None - }; - modulCustomAttrs=mk_custom_attrs []; - modulName=modname; - modulNativeResources=[]; - - modulTypeDefs=tdefs; - modulSubSystem=default_modulSubSystem; - modulDLL=dll; - modulILonly=true; - modulPlatform=None; - modul32bit=false; - modul64bit=false; - modulPhysAlignment=default_modulPhysAlignment; - modulVirtAlignment=default_modulVirtAlignment; - modulImageBase=default_modulImageBase; - modulResources=mk_resources []; -(* modulFixups=[]; *) - } - - -(*----------------------------------------------------------------------- - * Intermediate parsing structure for exception tables.... - *----------------------------------------------------------------------*) - -type ExceptionClause = - | SEH_finally of (ILCodeLabel * ILCodeLabel) - | SEH_fault of (ILCodeLabel * ILCodeLabel) - | SEH_filter_catch of (ILCodeLabel * ILCodeLabel) * (ILCodeLabel * ILCodeLabel) - | SEH_type_catch of ILType * (ILCodeLabel * ILCodeLabel) - -type ILExceptionSpec = - { exnRange: (ILCodeLabel * ILCodeLabel); - exnClauses: ExceptionClause list } - -type exceptions = ILExceptionSpec list - -(*----------------------------------------------------------------------- - * [instructions_to_code] makes the basic block structure of code from - * a primitive array of instructions. We - * do this be iterating over the instructions, pushing new basic blocks - * everytime we encounter an address that has been recorded - * [bbstartToCodeLabelMap]. - *----------------------------------------------------------------------*) - -type ILLocalSpec = - { locRange: (ILCodeLabel * ILCodeLabel); - locInfos: ILDebugMapping list } - -type structspec = SEH of ILExceptionSpec | LOCAL of ILLocalSpec - -let delayInsertedToWorkaroundKnownNgenBug s f = - (* Some random code to prevent inlining of this function *) - let mutable res = 10 - for i = 0 to 2 do - res <- res + 1; - done; - //Printf.printf "------------------------executing NGEN bug delay '%s', calling 'f' --------------\n" s; - let res = f() - //Printf.printf "------------------------exiting NGEN bug delay '%s' --------------\n" s; - res - - -let popRangeM lo hi (m:Zmap.map<'a,'b>) = - let collect k v (rvs,m) = (v :: rvs) , Zmap.remove k m - let rvs,m = Zmap.fold_section lo hi collect m ([],m) - List.rev rvs,m - -type BasicBlockStartsToCodeLabelsMap(instrs,tryspecs,localspecs,lab2pc) = - - (* Find all the interesting looking labels that form the boundaries of basic blocks. *) - (* These are the destinations of branches and the boundaries of both exceptions and *) - (* those blocks where locals are live. *) - let bbstartToCodeLabelMap = - let res = ref CodeLabels.empty - let add_range (a,b) = res := CodeLabels.insert a (CodeLabels.insert b !res) - instrs |> Array.iter (fun i -> res := CodeLabels.addList (destinations_of_instr i) !res); - - tryspecs |> List.iter (fun espec -> - add_range espec.exnRange; - List.iter (function - | SEH_finally r1 | SEH_fault r1 | SEH_type_catch (_,r1)-> add_range r1 - | SEH_filter_catch (r1,r2) -> add_range r1; add_range r2) espec.exnClauses); - - localspecs |> List.iter (fun l -> add_range l.locRange) ; - - !res - - (* Construct a map that gives a unique ILCodeLabel for each label that *) - (* might be a boundary of a basic block. These will be the labels *) - (* for the basic blocks we end up creating. *) - let lab2cl_map = Dictionary.create 10 - let pc2cl_map = Dictionary.create 10 - let add_bbstart_pc pc pcs cls = - if Dictionary.mem pc2cl_map pc then - Dictionary.find pc2cl_map pc, pcs, cls - else - let cl = generate_code_label () - Dictionary.add pc2cl_map pc cl; - cl, pc::pcs, CodeLabels.insert cl cls - - let bbstart_pcs, bbstart_code_labs = - CodeLabels.fold - (fun bbstart_lab (pcs, cls) -> - let pc = lab2pc bbstart_lab - if logging then dprintf "bblock starts with label %s at pc %d\n" (string_of_code_label bbstart_lab) pc; - let cl,pcs',cls' = add_bbstart_pc pc pcs cls - Dictionary.add lab2cl_map bbstart_lab cl; - pcs', - cls') - bbstartToCodeLabelMap - ([], CodeLabels.empty) - let cl0,bbstart_pcs, bbstart_code_labs = add_bbstart_pc 0 bbstart_pcs bbstart_code_labs - - - member c.InitialCodeLabel = cl0 - member c.BasicBlockStartPositions = bbstart_pcs - member c.BasicBlockStartCodeLabels = bbstart_code_labs - - member c.lab2cl bb_lab = try Dictionary.find lab2cl_map bb_lab with Not_found -> failwith ("basic block label "^string_of_code_label bb_lab^" not declared") - member c.pc2cl pc = try Dictionary.find pc2cl_map pc with Not_found -> failwith ("internal error while mapping pc "^string pc^" to code label") - - member c.remap_labels i = - match i with - | I_leave l -> I_leave(c.lab2cl l) - | I_br l -> I_br (c.lab2cl l) - | I_other e -> I_other (find_extension "instr" (fun ext -> if ext.internalInstrExtIs e then Some (ext.internalInstrExtRelabel c.lab2cl e) else None) !instr_extensions) - | I_brcmp (x,l1,l2) -> I_brcmp(x,c.lab2cl l1, c.lab2cl l2) - | I_switch (ls,l) -> I_switch(List.map c.lab2cl ls, c.lab2cl l) - | _ -> i - -let disjoint_range (start_pc1,end_pc1) (start_pc2,end_pc2) = - ((start_pc1 : int) < start_pc2 && end_pc1 <= start_pc2) or - (start_pc1 >= end_pc2 && end_pc1 > end_pc2) - -let merge_ranges (start_pc1,end_pc1) (start_pc2,end_pc2) = - (min (start_pc1:int) start_pc2, max (end_pc1:int) end_pc2) - -let range_inside_range (start_pc1,end_pc1) (start_pc2,end_pc2) = - (start_pc1:int) >= start_pc2 && start_pc1 < end_pc2 && - (end_pc1:int) > start_pc2 && end_pc1 <= end_pc2 - -let lranges_of_clause cl = - match cl with - | SEH_finally r1 -> [r1] - | SEH_fault r1 -> [r1] - | SEH_filter_catch (r1,r2) -> [r1;r2] - | SEH_type_catch (ty,r1) -> [r1] - - -type CodeOffsetViewOfLabelledItems(lab2pc) = - member x.labels_to_range p = let (l1,l2) = p in lab2pc l1, lab2pc l2 - - member x.lrange_inside_lrange ls1 ls2 = - range_inside_range (x.labels_to_range ls1) (x.labels_to_range ls2) - - member x.disjoint_lranges ls1 ls2 = - disjoint_range (x.labels_to_range ls1) (x.labels_to_range ls2) - - member x.clause_inside_lrange cl lr = - List.forall (fun lr1 -> x.lrange_inside_lrange lr1 lr) (lranges_of_clause cl) - - member x.clauses_inside_lrange cls lr = - List.forall - (fun cl -> x.clause_inside_lrange cl lr) - cls - - member x.tryspec_inside_lrange tryspec1 lr = - (x.lrange_inside_lrange tryspec1.exnRange lr & - x.clauses_inside_lrange tryspec1.exnClauses lr) - - member x.tryspec_inside_clause tryspec1 cl = - List.exists (fun lr -> x.tryspec_inside_lrange tryspec1 lr) (lranges_of_clause cl) - - member x.locspec_inside_clause locspec1 cl = - List.exists (fun lr -> x.lrange_inside_lrange locspec1.locRange lr) (lranges_of_clause cl) - - member x.tryspec_inside_tryspec tryspec1 tryspec2 = - x.tryspec_inside_lrange tryspec1 tryspec2.exnRange or - List.exists (fun c2 -> x.tryspec_inside_clause tryspec1 c2) tryspec2.exnClauses - - member x.locspec_inside_tryspec locspec1 tryspec2 = - x.lrange_inside_lrange locspec1.locRange tryspec2.exnRange or - List.exists (fun c2 -> x.locspec_inside_clause locspec1 c2) tryspec2.exnClauses - - member x.tryspec_inside_locspec tryspec1 locspec2 = - x.tryspec_inside_lrange tryspec1 locspec2.locRange - - member x.disjoint_clause_and_lrange cl lr = - List.forall (fun lr1 -> x.disjoint_lranges lr1 lr) (lranges_of_clause cl) - - member x.disjoint_clauses_and_lrange cls lr = - List.forall (fun cl -> x.disjoint_clause_and_lrange cl lr) cls - - member x.disjoint_tryspec_and_lrange tryspec1 lr = - (x.disjoint_lranges tryspec1.exnRange lr & - x.disjoint_clauses_and_lrange tryspec1.exnClauses lr) - - member x.disjoint_tryspec_and_clause tryspec1 cl = - List.forall (fun lr -> x.disjoint_tryspec_and_lrange tryspec1 lr) (lranges_of_clause cl) - - member x.tryspec_disjoint_from_tryspec tryspec1 tryspec2 = - x.disjoint_tryspec_and_lrange tryspec1 tryspec2.exnRange & - List.forall (fun c2 -> x.disjoint_tryspec_and_clause tryspec1 c2) tryspec2.exnClauses - - member x.tryspec_disjoint_from_locspec tryspec1 locspec2 = - x.disjoint_tryspec_and_lrange tryspec1 locspec2.locRange - - member x.locspec_disjoint_from_locspec locspec1 locspec2 = - x.disjoint_lranges locspec1.locRange locspec2.locRange - - member x.locspec_inside_locspec locspec1 locspec2 = - x.lrange_inside_lrange locspec1.locRange locspec2.locRange - - member x.structspec_inside_structspec specA specB = (* only for sanity checks, then can be removed *) - match specA,specB with - | SEH tryspecA,SEH tryspecB -> x.tryspec_inside_tryspec tryspecA tryspecB - | SEH tryspecA,LOCAL locspecB -> x.tryspec_inside_locspec tryspecA locspecB - | LOCAL locspecA,SEH tryspecB -> x.locspec_inside_tryspec locspecA tryspecB - | LOCAL locspecA,LOCAL locspecB -> x.locspec_inside_locspec locspecA locspecB - - - (* extent (or size) is the sum of range extents *) - (* We want to build in increasing containment-order, that's a partial order. *) - (* Size-order implies containment-order, and size-order is a total order. *) - member x.extent_structspec ss = - let extent_range (start_pc,end_pc) = end_pc - start_pc - let extent_lrange lrange = extent_range (x.labels_to_range lrange) - let extent_locspec locspec = extent_lrange locspec.locRange - let extent_list extent_item items = List.fold (fun acc item -> acc + extent_item item) 0 items - let extent_list2 extent_item items = List.fold (fun acc item -> acc + extent_item item) 0 items - let extent_clause cl = extent_list extent_lrange (lranges_of_clause cl) - let extent_tryspec tryspec = extent_lrange tryspec.exnRange + (extent_list2 extent_clause tryspec.exnClauses) - - match ss with - | LOCAL locspec -> extent_locspec locspec - | SEH tryspec -> extent_tryspec tryspec - - (* DIAGNOSTICS: START ------------------------------ *) - member x.string_of_structspec ss = - let string_of_range (l1,l2) = - let pc1,pc2 = x.labels_to_range ((l1,l2)) - string_of_code_label l1^"("^string pc1^")-"^ string_of_code_label l2^"("^string pc2^")" - let string_of_clause cl = String.concat "+" (List.map string_of_range (lranges_of_clause cl)) - let string_of_tryspec tryspec = "tryspec"^ string_of_range tryspec.exnRange ^ "--" ^ String.concat " / " (List.map string_of_clause tryspec.exnClauses) - let string_of_locspec locspec = "local "^(String.concat ";" (locspec.locInfos |> List.map (fun l -> l.localName)))^": "^ string_of_range locspec.locRange - match ss with - | SEH tryspec -> string_of_tryspec tryspec - | LOCAL locspec -> string_of_locspec locspec - - - -(* Stage 2b - Given an innermost tryspec, collect together the *) -(* blocks covered by it. Preserve the essential ordering of blocks. *) -let block_for_inner_tryspec (codeOffsetView:CodeOffsetViewOfLabelledItems, - coverage_of_codes, - addBlocks, - compute_covered_blocks, - bbstartToCodeLabelMap:BasicBlockStartsToCodeLabelsMap) tryspec state0 = - - let (blocks, remaining_bblock_starts) = state0 - let try_blocks, other_blocks = compute_covered_blocks (codeOffsetView.labels_to_range tryspec.exnRange) blocks - if isNil try_blocks then (dprintn "try block specification covers no real code"; state0) else - let get_clause r other_blocks = - let clause_blocks, other_blocks = - compute_covered_blocks (*_rough*) (codeOffsetView.labels_to_range r) other_blocks - if isNil clause_blocks then - failwith "clause block specification covers no real code"; - (* The next line computes the code label for the entry to the clause *) - let clause_entry_lab = bbstartToCodeLabelMap.lab2cl (fst r) - (* Now compute the overall clause, with labels still visible. *) - let clause_block = mk_group_block ([],List.map snd clause_blocks) - (* if logging then dprintf "-- clause entry label is %s" clause_entry_lab; *) - (clause_entry_lab, clause_blocks, clause_block), other_blocks - let try_code_blocks = List.map snd try_blocks - let try_entry_lab = bbstartToCodeLabelMap.lab2cl (fst tryspec.exnRange) - let try_hidden = - CodeLabels.remove try_entry_lab (List.foldBack (entries_of_code' >> CodeLabels.union) try_code_blocks CodeLabels.empty) - let try_block = mk_group_block (CodeLabels.to_list try_hidden,try_code_blocks) - - match tryspec.exnClauses with - | SEH_finally _ :: _ :: _ -> failwith "finally clause combined with others" - | [ SEH_finally r ] | [ SEH_fault r ] -> - - let maker = - match tryspec.exnClauses with - [ SEH_finally _ ] -> mk_try_finally_block - | [ SEH_fault _ ] -> mk_try_fault_block - | _ -> failwith "" - - let (clause_entry_lab, clause_blocks, clause_block), other_blocks = get_clause r other_blocks - let newblock_range = coverage_of_codes (try_blocks@clause_blocks) - (* The next construction joins the blocks together. *) - (* It automatically hides any internal labels used in the *) - (* clause blocks. Only the entry to the clause is kept visible. *) - (* We hide the entries to the try block up above. *) - let newblock = maker (try_block,clause_entry_lab,clause_block) - (* None of the entries to the clause block are visible outside the *) - (* entire try-clause construct, nor the other entries to the try block *) - (* apart from the one at the. top *) - let newstarts = CodeLabels.diff remaining_bblock_starts (CodeLabels.union try_hidden (entries_of_code' clause_block)) - (* Now return the new block, the remaining blocks and the new set *) - (* of entries. *) - addBlocks other_blocks [(newblock_range, newblock)], newstarts - | clauses when - List.forall - (function - | SEH_filter_catch _ -> true - | SEH_type_catch _ -> true | _ -> false) - clauses -> - - let clause_infos, other_blocks (*(prior,posterior)*) = - List.fold - (fun (sofar,other_blocks) cl -> - match cl with - | SEH_filter_catch(r1,r2) -> - let ((lab1,_,bl1) as info1),other_blocks = get_clause r1 other_blocks - let info2,other_blocks = get_clause r2 other_blocks - (sofar@[(Choice1Of2 (lab1,bl1),info2)]), other_blocks - | SEH_type_catch(typ,r2) -> - let info2,other_blocks = get_clause r2 other_blocks - (sofar@[(Choice2Of2 typ,info2)]), other_blocks - | _ -> failwith "internal error") - ([],other_blocks) - clauses - let newblock_range = - (* Ignore filter blocks when computing this range *) - (* REVIEW: They must always come before the catch blocks. *) - coverage_of_codes - (try_blocks@ - ((List.collect (fun (_,(_,blocks2,_)) -> blocks2) clause_infos))) - - (* The next construction joins the blocks together. *) - (* It automatically hides any internal labels used in the *) - (* clause blocks. Only the entry to the clause is kept visible. *) - let newblock = - mk_try_multi_filter_catch_block - (try_block, - List.map - (fun (choice,(lab2,_,bl2)) -> choice, (lab2,bl2)) - clause_infos) - (* None of the entries to the filter or catch blocks are *) - (* visible outside the entire exception construct. *) - let newstarts = - CodeLabels.diff remaining_bblock_starts - (CodeLabels.union try_hidden - (List.foldBack - (fun (flt,(_,_,ctch_blck)) acc -> - CodeLabels.union - (match flt with - | Choice1Of2 (_,flt_block) -> entries_of_code' flt_block - | Choice2Of2 _ -> CodeLabels.empty) - (CodeLabels.union (entries_of_code' ctch_blck) acc)) - clause_infos - CodeLabels.empty)) - (* Now return the new block, the remaining blocks and the new set *) - (* of entries. *) - addBlocks other_blocks [ (newblock_range, newblock)], newstarts - | _ -> failwith "invalid pattern of exception constructs" - - - -let do_structure' (codeOffsetView:CodeOffsetViewOfLabelledItems, - compute_covered_blocks, - coverage_of_codes, - addBlocks, - bbstartToCodeLabelMap:BasicBlockStartsToCodeLabelsMap) - structspecs - block_state = - - (* Stage 2b - Given an innermost tryspec, collect together the *) - (* blocks covered by it. Preserve the essential ordering of blocks. *) - let block_for_inner_locspec locspec ((blocks, remaining_bblock_starts) as state0) = - let scope_blocks, other_blocks (*(prior,posterior)*) = compute_covered_blocks (codeOffsetView.labels_to_range locspec.locRange) blocks - if isNil scope_blocks then (dprintn "scope block specification covers no real code"; state0) else - let newblock = mk_scope_block (locspec.locInfos,mk_group_block ([],List.map snd scope_blocks)) - let newblock_range = coverage_of_codes scope_blocks - addBlocks other_blocks [ (newblock_range, newblock)], remaining_bblock_starts - - // Require items by increasing inclusion-order. - // Order by size/extent. - // a) size-ordering implies containment-ordering. - // b) size-ordering is total, so works with List.sort - let build_order sA sB = int_order (codeOffsetView.extent_structspec sA) (codeOffsetView.extent_structspec sB) - - (* checkOrder: checking is O(n^2) *) -(* - let rec checkOrder = function - | [] -> () - | sA::sBs -> List.iter (fun sB -> - if codeOffsetView.structspec_inside_structspec sB sA && not (codeOffsetView.structspec_inside_structspec sA sB) then ( - dprintf "sA = %s\n" (codeOffsetView.string_of_structspec sA); - dprintf "sB = %s\n" (codeOffsetView.string_of_structspec sB); - assert false - )) sBs; - checkOrder sBs -*) - - let structspecs = List.sortWith build_order structspecs - - (* if sanity_check_order then checkOrder structspecs; *) (* note: this check is n^2 *) - let buildBlock block_state = function - | SEH tryspec -> (if logging then dprintn "-- checkin a tryspec"; - block_for_inner_tryspec (codeOffsetView,coverage_of_codes,addBlocks,compute_covered_blocks,bbstartToCodeLabelMap) tryspec block_state) - | LOCAL locspec -> (if logging then dprintn "-- checkin a locspec"; - block_for_inner_locspec locspec block_state) - List.fold buildBlock block_state structspecs - - -// REVIEW: this function shows up on performance traces. If we eliminated the last ILX->IL rewrites from the -// F# compiler we could get rid of this structured code representation from Abstract IL altogether, and -// never convert F# code into this form. -let build_code meth_name lab2pc instrs tryspecs localspecs = - - let bbstartToCodeLabelMap = BasicBlockStartsToCodeLabelsMap(instrs,tryspecs,localspecs,lab2pc) - let codeOffsetView = CodeOffsetViewOfLabelledItems(lab2pc) - - let basic_instructions = Array.map bbstartToCodeLabelMap.remap_labels instrs - - (* DIAGNOSTICS: END -------------------------------- *) - - let build_code_from_instruction_array instrs = - - (* Consume instructions until we hit the end of the basic block, either *) - (* by hitting a control-flow instruction or by hitting the start of the *) - (* next basic block by fall-through. *) - let rec consume_bblock_instrs instrs rinstrs (pc:int) next_bbstart_pc = - (* rinstrs = accumulates instructions in reverse order *) - if pc = (Array.length instrs) then - dprintn "* WARNING: basic block at end of method ends without a leave, branch, return or throw. Adding throw\n"; - pc,List.rev (I_throw :: rinstrs) - // The next test is for drop-through at end of bblock, when we just insert - // a branch to the next bblock. - elif (match next_bbstart_pc with Some pc' -> pc = pc' | _ -> false) then - if logging then dprintf "-- pushing br, pc = next_bbstart_pc = %d\n" pc; - pc,List.rev (I_br (bbstartToCodeLabelMap.pc2cl pc) :: rinstrs) - else - // Otherwise bblocks end with control-flow. - let i = instrs.[pc] - let pc' = pc + 1 - if instr_is_bblock_end i then - if instr_is_tailcall i then - if pc' = instrs.Length || (match instrs.[pc'] with I_ret -> false | _ -> true) then - failwithf "a tailcall must be followed by a return, instrs = %A" instrs - elif (match next_bbstart_pc with Some pc'' -> pc' = pc'' | _ -> false) then - // In this obscure case, someone branches to the return instruction - // following the tailcall, so we'd better build a basic block - // containing just that return instruction. - pc', List.rev (i :: rinstrs) - else - // Otherwise skip the return instruction, but keep the tailcall. - pc'+1, List.rev (i :: rinstrs) - else - pc', List.rev (i :: rinstrs) - else - // recursive case - consume_bblock_instrs instrs (i::rinstrs) pc' next_bbstart_pc - - (* type block = (int * int) * Code // a local type (alias) would be good, good for intelisense too *) - let rec consume_one_bblock bbstart_pc next_bbstart_pc current_pc = - if current_pc = (Array.length instrs) then None - elif bbstart_pc < current_pc then failwith "internal error: bad basic block structure (missing bblock start marker?)" - elif bbstart_pc > current_pc then - (* dprintn ("* ignoring unreachable instruction in method: "^ meth_name); *) - consume_one_bblock - bbstart_pc - next_bbstart_pc - (current_pc + 1) - else - let pc', bblock_instrs = consume_bblock_instrs instrs [] bbstart_pc next_bbstart_pc - if logging then dprintf "-- making bblock, entry label is %s, length = %d, bbstart_pc = %d\n" (string_of_code_label (bbstartToCodeLabelMap.pc2cl bbstart_pc)) (List.length bblock_instrs) bbstart_pc; - let bblock = mk_bblock {bblockLabel= bbstartToCodeLabelMap.pc2cl bbstart_pc; bblockInstrs=Array.of_list bblock_instrs} - - let bblock_range = (bbstart_pc, pc') - (* Return the bblock and the range of instructions that the bblock covered. *) - (* Also return any remaining instructions and the pc' for the first *) - (* such instruction. *) - Some ((bblock_range, bblock), pc') - - let rec fetch_bblocks bbstartToCodeLabelMap current_pc = - match bbstartToCodeLabelMap with - [] -> - (* if current_pc <> Array.length instrs then - dprintn ("* ignoring instructions at end of method: "^ meth_name); *) - [] - | h::t -> - let h2 = match t with [] -> None | h2:: _ -> assert (not (h = h2)); Some h2 - match consume_one_bblock h h2 current_pc with - | None -> [] - | Some (bblock, current_pc') -> bblock :: fetch_bblocks t current_pc' - - let inside range (brange,_) = - if range_inside_range brange range then true else - if disjoint_range brange range then false else - failwith "exception block specification overlaps the range of a basic block" - - (* A "blocks" contain blocks, ordered on startPC. - * Recall, a block is (range,code) where range=(pcStart,pcLast+1). *) - let addBlock m (((startPC,endPC),code) as block) = - match Zmap.tryfind startPC m with - | None -> Zmap.add startPC [block] m - | Some blocks -> Zmap.add startPC (block :: blocks) m in (* NOTE: may reverse block *) - - let addBlocks m blocks = List.fold addBlock m blocks - - let mkBlocks blocks = - let emptyBlocks = (Zmap.empty int_order : Zmap.map) - List.fold addBlock emptyBlocks blocks - - let sanity_check_cover = false in (* linear check - REVIEW: set false and elim checks *) - let sanity_check_order = false in (* quadratic check - REVIEW: set false and elim checks *) - - let compute_covered_blocks ((start_pc,end_pc) as range) (blocks: Zmap.map ) = - (* It is assumed that scopes never overlap. - * locinfo scopes could overlap if there is a bug elsewhere. - * If overlaps are discovered, an exception is raised. see NOTE#overlap. - *) - let pcCovered,blocks = popRangeM start_pc (end_pc - 1) blocks - let coveredBlocks = pcCovered |> List.concat - (* Look for bad input, e.g. overlapping locinfo scopes. *) - let overlapBlocks = List.filter (inside range >> not) coveredBlocks - if not (isNil overlapBlocks) then raise Not_found; (* see NOTE#overlap *) - if sanity_check_cover then ( - let assertIn block = assert (inside range block) - let assertOut block = assert (not (inside range block)) - List.iter assertIn coveredBlocks; - Zmap.iter (fun _ bs -> List.iter assertOut bs) blocks - ); - coveredBlocks,blocks - - let rec coverage_of_codes blocks = - match blocks with - [] -> failwith "start_of_codes" - | [(r,_)] -> r - | ((r,_)::t) -> merge_ranges r (coverage_of_codes t) - - delayInsertedToWorkaroundKnownNgenBug "Delay4i3" <| fun () -> - - let do_structure = do_structure' (codeOffsetView, compute_covered_blocks,coverage_of_codes,addBlocks,bbstartToCodeLabelMap) - - (* Apply stage 1. Compute the blocks not taking exceptions into account. *) - let bblocks = - fetch_bblocks (List.sort bbstartToCodeLabelMap.BasicBlockStartPositions) 0 - - let bblocks = mkBlocks bblocks - (* Apply stage 2. Compute the overall morphed blocks. *) - let morphed_blocks,remaining_entries = - let specs1 = List.map (fun x -> SEH x) tryspecs - let specs2 = List.map (fun x -> LOCAL x) localspecs - try do_structure (specs1 @ specs2) (bblocks,bbstartToCodeLabelMap.BasicBlockStartCodeLabels) - with Not_found -> - (* NOTE#overlap. - * Here, "Not_found" indicates overlapping scopes were found. - * Maybe the calling code got the locspecs scopes wrong. - * Try recovery by discarding locspec info... - *) - let string_of_tryspec tryspec = "tryspec" - let string_of_range (l1,l2) = - let pc1,pc2 = codeOffsetView.labels_to_range ((l1,l2)) - string_of_code_label l1^"("^string pc1^")-"^ string_of_code_label l2^"("^string pc2^")" - let string_of_locspec locspec = "local "^(String.concat ";" (locspec.locInfos |> List.map (fun l -> l.localName)))^": "^ string_of_range locspec.locRange - - dprintf "\nERROR: could not find an innermost exception block or local scope, specs = \n%s\nTrying again without locals." - (String.concat "\n" (List.map string_of_tryspec tryspecs @ List.map string_of_locspec localspecs)); - do_structure specs1 (bblocks,bbstartToCodeLabelMap.BasicBlockStartCodeLabels) - - delayInsertedToWorkaroundKnownNgenBug "Delay4k" <| fun () -> - - let morphed_blocks = Zmap.values morphed_blocks |> List.concat in (* NOTE: may mixup order *) - (* Now join up all the remaining blocks into one block with one entry. *) - if logging then dprintn "-- computing entry label"; - if logging then dprintn ("-- entry label is "^string_of_code_label bbstartToCodeLabelMap.InitialCodeLabel); - mk_group_block - (CodeLabels.to_list (CodeLabels.remove bbstartToCodeLabelMap.InitialCodeLabel remaining_entries),List.map snd morphed_blocks) - - - try build_code_from_instruction_array basic_instructions - with e -> - dprintn ("* error while converting instructions to code for method: " ^meth_name); - rethrow() - - -(* -------------------------------------------------------------------- - * Detecting Delegates - * -------------------------------------------------------------------- *) - -let mk_delegate_mdefs ilg (parms,rtv:ILReturnValue) = - let rty = rtv.Type - let one nm args ret = - let mdef = mk_virtual_mdef (nm,MemAccess_public,args,(mk_return ret),MethodBody_abstract) - let mdef = - {mdef with mdKind= - match mdef.mdKind with - | MethodKind_virtual vinfo -> MethodKind_virtual {vinfo with virtAbstract=false; } - | k -> k } - {mdef with - mdCodeKind=MethodCodeKind_runtime; - mdHideBySig=true; } - let ctor = mk_ctor(MemAccess_public, [ mk_named_param("object",ilg.typ_Object); mk_named_param("method",ilg.typ_IntPtr) ], MethodBody_abstract) - let ctor = { ctor with mdCodeKind=MethodCodeKind_runtime; mdHideBySig=true } - [ ctor; - one "Invoke" parms rty; - one "BeginInvoke" (parms @ [mk_named_param("callback",ilg.typ_AsyncCallback); - mk_named_param("objects",ilg.typ_Object) ] ) ilg.typ_IAsyncResult; - one "EndInvoke" [mk_named_param("result",ilg.typ_IAsyncResult)] rty; ] - - -let mk_ctor_mspec_for_delegate ilg (tref:ILTypeRef,cinst,useUIntPtr) = - let scoref = tref.Scope - mk_nongeneric_instance_mspec_in_tref (tref,AsObject,".ctor",[rescope_typ scoref ilg.typ_Object; rescope_typ scoref (if useUIntPtr then ilg.typ_UIntPtr else ilg.typ_IntPtr)],Type_void,cinst) - -type ILEnumInfo = - { enumValues: (string * ILFieldInit) list; - enumType: ILType } - -let typ_of_enum_info info = info.enumType - -let info_for_enum (tdName,tdFieldDefs) = - match (List.partition (fun fd -> fd.fdStatic) (dest_fdefs tdFieldDefs)) with - | sfds,[vfd] -> - { enumType = vfd.fdType; - enumValues = List.map (fun fd -> (fd.fdName, match fd.fdInit with Some i -> i | None -> failwith ("info_of_enum_tdef: badly formed enum "^tdName^": static field does not have an default value"))) sfds } - | _,[] -> failwith ("info_of_enum_tdef: badly formed enum "^tdName^": no non-static field found") - | _,_ -> failwith ("info_of_enum_tdef: badly formed enum "^tdName^": more than one non-static field found") - - -(* -------------------------------------------------------------------- - * Intern tables to save space. - * -------------------------------------------------------------------- *) - -let new_intern_table () = - let idx = ref 0 - let t = new Dictionary<_,_>(100) - fun s -> - if t.ContainsKey s then t.[s] - else let i = !idx in incr idx; (t.[s] <- (s,i); (s,i)) - -let new_idx_intern_table idf tagf = - let idx = ref 0 - let t = new Dictionary<_,_>(100) - fun s -> - match idf s with - | Some i -> s,i - | None -> - if t.ContainsKey s then - let r = t.[s] - let i = (match idf r with Some x -> x | None -> failwith "new_idx_intern_table: internal error") - r,i - else begin - incr idx; - let i = !idx - let r = (tagf s i) - t.[s] <- r; - r,i - end - -let memoize_on keyf f = - let t = new Dictionary<_,_>(100) - fun x -> - let idx = keyf x - if t.ContainsKey idx then t.[idx] - else let r = f x in t.[idx] <- r; r - -let memoize f = - let t = new Dictionary<_,_>(1000) - fun x -> - if t.ContainsKey x then t.[ x ] - else let r = f x in t.[x] <- r; r - -(*--------------------------------------------------------------------- - * Get the public key token from the public key. - *---------------------------------------------------------------------*) - - -let assref_for_manifest m = - ILAssemblyRef.Create(m.manifestName, - // REVIEW: find hash?? - None, - (match m.manifestPublicKey with Some k -> Some (PublicKey.KeyAsToken(k)) | None -> None), - false, m.manifestVersion, m.manifestLocale) - -let assref_for_mainmod (mainmod:ILModuleDef) = - assref_for_manifest mainmod.ManifestOfAssembly - - - - -let z_unsigned_int_size n = - if n <= 0x7F then 1 - elif n <= 0x3FFF then 2 - else 3 - -let z_unsigned_int n = - if n >= 0 && n <= 0x7F then [| n |] - else - (if n >= 0x80 && n <= 0x3FFF then [| 0x80 ||| (n lsr 8); n &&& 0xFF |] - else [| 0xc0 ||| (n lsr 24); (n lsr 16) &&& 0xFF; (n lsr 8) &&& 0xFF; n &&& 0xFF |]) - -let string_as_utf8_intarray (s:string) = Bytes.to_intarray (Bytes.string_as_utf8_bytes s) - -(* Little-endian encoding of int64 *) -let dw7 n = int32 ((n >>> 56) &&& (int64 0xFF)) -let dw6 n = int32 ((n >>> 48) &&& (int64 0xFF)) -let dw5 n = int32 ((n >>> 40) &&& (int64 0xFF)) -let dw4 n = int32 ((n >>> 32) &&& (int64 0xFF)) -let dw3 n = int32 ((n >>> 24) &&& (int64 0xFF)) -let dw2 n = int32 ((n >>> 16) &&& (int64 0xFF)) -let dw1 n = int32 ((n >>> 8) &&& (int64 0xFF)) -let dw0 n = int32 (n &&& (int64 0xFF)) - -let u8_as_intarray i = [| b0 (int i) |] -let u16_as_intarray x = let n = (int x) in [| b0 n; b1 n |] -let i32_as_intarray i = [| b0 i; b1 i; b2 i; b3 i |] -let i64_as_intarray i = [| dw0 i; dw1 i; dw2 i; dw3 i; dw4 i; dw5 i; dw6 i; dw7 i |] - -let i8_as_intarray (i:sbyte) = u8_as_intarray (byte i) -let i16_as_intarray (i:int16) = u16_as_intarray (uint16 i) -let u32_as_intarray (i:uint32) = i32_as_intarray (int32 i) -let u64_as_intarray (i:uint64) = i64_as_intarray (int64 i) - -let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0) -let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x) - -let ieee32_as_intarray i = i32_as_intarray (bits_of_float32 i) -let ieee64_as_intarray i = i64_as_intarray (bits_of_float i) - -/// Given a custom attribute element, work out the type of the .NET argument for that element -let rec celem_ty ilg x = - match x with - | CustomElem_string _ -> ilg.typ_String - | CustomElem_bool _ -> ilg.typ_bool - | CustomElem_char _ -> ilg.typ_char - | CustomElem_int8 _ -> ilg.typ_int8 - | CustomElem_int16 _ -> ilg.typ_int16 - | CustomElem_int32 _ -> ilg.typ_int32 - | CustomElem_int64 _ -> ilg.typ_int64 - | CustomElem_uint8 _ -> ilg.typ_uint8 - | CustomElem_uint16 _ -> ilg.typ_uint16 - | CustomElem_uint32 _ -> ilg.typ_uint32 - | CustomElem_uint64 _ -> ilg.typ_uint64 - | CustomElem_type _ -> ilg.typ_Type - | CustomElem_tref _ -> ilg.typ_Type - | CustomElem_float32 _ -> ilg.typ_float32 - | CustomElem_float64 _ -> ilg.typ_float64 - | CustomElem_array _ -> failwith "Unexpected array element" - -let et_END = 0x00 -let et_VOID = 0x01 -let et_BOOLEAN = 0x02 -let et_CHAR = 0x03 -let et_I1 = 0x04 -let et_U1 = 0x05 -let et_I2 = 0x06 -let et_U2 = 0x07 -let et_I4 = 0x08 -let et_U4 = 0x09 -let et_I8 = 0x0a -let et_U8 = 0x0b -let et_R4 = 0x0c -let et_R8 = 0x0d -let et_STRING = 0x0e -let et_PTR = 0x0f -let et_BYREF = 0x10 -let et_VALUETYPE = 0x11 -let et_CLASS = 0x12 -let et_VAR = 0x13 -let et_ARRAY = 0x14 -let et_WITH = 0x15 -let et_TYPEDBYREF = 0x16 -let et_I = 0x18 -let et_U = 0x19 -let et_FNPTR = 0x1B -let et_OBJECT = 0x1C -let et_SZARRAY = 0x1D -let et_MVAR = 0x1e -let et_CMOD_REQD = 0x1F -let et_CMOD_OPT = 0x20 - -let version_to_string ((a,b,c,d):ILVersionInfo) = Printf.sprintf "%d.%d.%d.%d" (int a) (int b) (int c) (int d) - - - -let celem_serstring s = - let arr = string_as_utf8_intarray s - Array.concat [ z_unsigned_int (Array.length arr); arr ] - -let rec celem_enc_ty isNamedArg x = - match x with - | Type_value tspec when tspec.Name = "System.SByte" -> [| et_I1 |] - | Type_value tspec when tspec.Name = "System.Byte" -> [| et_U1 |] - | Type_value tspec when tspec.Name = "System.Int16" -> [| et_I2 |] - | Type_value tspec when tspec.Name = "System.UInt16" -> [| et_U2 |] - | Type_value tspec when tspec.Name = "System.Int32" -> [| et_I4 |] - | Type_value tspec when tspec.Name = "System.UInt32" -> [| et_U4 |] - | Type_value tspec when tspec.Name = "System.Int64" -> [| et_I8 |] - | Type_value tspec when tspec.Name = "System.UInt64" -> [| et_U8 |] - | Type_value tspec when tspec.Name = "System.Double" -> [| et_R8 |] - | Type_value tspec when tspec.Name = "System.Single" -> [| et_R4 |] - | Type_value tspec when tspec.Name = "System.Char" -> [| et_CHAR |] - | Type_value tspec when tspec.Name = "System.Boolean" -> [| et_BOOLEAN |] - | Type_boxed tspec when tspec.Name = "System.String" -> [| et_STRING |] - | Type_boxed tspec when tspec.Name = "System.Object" -> [| et_OBJECT |] - | Type_boxed tspec when tspec.Name = "System.Type" -> [| 0x50 |] - | Type_value tspec -> - if isNamedArg then - Array.append [| 0x55 |] (celem_serstring tspec.TypeRef.QualifiedNameWithNoShortMscorlib) - else (* assume it is an enumeration *) [| et_I4 |] - | _ -> failwith "celem_enc_ty: unrecognized custom element type" - -let rec celem_dec_ty ilg x = - match x with - | x when x = et_I1 -> ilg.typ_SByte - | x when x = et_U1 -> ilg.typ_Byte - | x when x = et_I2 -> ilg.typ_Int16 - | x when x = et_U2 -> ilg.typ_UInt16 - | x when x = et_I4 -> ilg.typ_Int32 - | x when x = et_U4 -> ilg.typ_UInt32 - | x when x = et_I8 -> ilg.typ_Int64 - | x when x = et_U8 -> ilg.typ_UInt64 - | x when x = et_R8 -> ilg.typ_Double - | x when x = et_R4 -> ilg.typ_Single - | x when x = et_CHAR -> ilg.typ_Char - | x when x = et_BOOLEAN -> ilg.typ_Bool - | x when x = et_STRING -> ilg.typ_String - | x when x = et_OBJECT -> ilg.typ_Object - | x when x = 0x50 -> ilg.typ_Type - | _ -> failwith "celem_dec_ty ilg: unrecognized custom element type" - - -/// Given a custom attribute element, encode it to a binary representation according to the rules in Ecma 335 Partition II. -let rec celem_val_prim c = - match c with - | CustomElem_bool b -> [| if b then 0x01 else 0x00 |] - | CustomElem_string None -> [| 0xFF |] - | CustomElem_string (Some(s)) -> celem_serstring s - | CustomElem_char x -> u16_as_intarray (uint16 x) - | CustomElem_int8 x -> i8_as_intarray x - | CustomElem_int16 x -> i16_as_intarray x - | CustomElem_int32 x -> i32_as_intarray x - | CustomElem_int64 x -> i64_as_intarray x - | CustomElem_uint8 x -> u8_as_intarray x - | CustomElem_uint16 x -> u16_as_intarray x - | CustomElem_uint32 x -> u32_as_intarray x - | CustomElem_uint64 x -> u64_as_intarray x - | CustomElem_float32 x -> ieee32_as_intarray x - | CustomElem_float64 x -> ieee64_as_intarray x - | CustomElem_type ty -> celem_serstring ty.QualifiedNameWithNoShortMscorlib - | CustomElem_tref tref -> celem_serstring tref.QualifiedNameWithNoShortMscorlib - | CustomElem_array _ -> failwith "unreachable" - -let rec celem_val ilg ty c = - match ty, c with - | Type_boxed tspec, _ when tspec.Name = "System.Object" -> - Array.concat [ celem_enc_ty false (celem_ty ilg c); celem_val_prim c ] - | Type_array(shape,elemType), CustomElem_array(elems) when shape = Rank1ArrayShape -> - Array.concat [ i32_as_intarray (List.length elems); Array.concat (List.map (celem_val ilg elemType) elems) ] - | _ -> - celem_val_prim c - -let encode_named_arg ilg (nm,ty,prop,elem) = - [| yield (if prop then 0x54 else 0x53) - yield! celem_enc_ty true ty; - yield! celem_serstring nm; - yield! celem_val ilg ty elem |] - -let mk_custom_attribute_mref ilg (mspec:ILMethodSpec,fixedArgs: list<_>,namedArgs: list<_>) = - let argtys = mspec.MethodRef.ArgTypes - let args = - [| yield! [| 0x01; 0x00; |] - for (argty,fixedArg) in Seq.zip argtys fixedArgs do - yield! celem_val ilg argty fixedArg - yield! u16_as_intarray (uint16 namedArgs.Length) - for namedArg in namedArgs do - yield! encode_named_arg ilg namedArg |] - - { customMethod = mspec; - customData = Bytes.of_intarray args } - -let mk_custom_attribute ilg (tref,argtys,argvs,propvs) = - mk_custom_attribute_mref ilg (mk_ctor_mspec_for_nongeneric_boxed_tref (tref,argtys),argvs,propvs) - -(* Q: CompilerGeneratedAttribute is new in 2.0. Unconditional generation of this attribute prevents running on 1.1 Framework. (discovered running on early mono version). *) -let tref_CompilerGeneratedAttribute ilg = mk_tref (ilg.mscorlib_scoref,tname_CompilerGeneratedAttribute) - -let tname_DebuggerNonUserCodeAttribute = "System.Diagnostics.DebuggerNonUserCodeAttribute" -let tname_DebuggableAttribute_DebuggingModes = "DebuggingModes" -let tname_DebuggerHiddenAttribute = "System.Diagnostics.DebuggerHiddenAttribute" -let tname_DebuggerDisplayAttribute = "System.Diagnostics.DebuggerDisplayAttribute" -let tname_DebuggerTypeProxyAttribute = "System.Diagnostics.DebuggerTypeProxyAttribute" -let tname_DebuggerStepThroughAttribute = "System.Diagnostics.DebuggerStepThroughAttribute" -let tname_DebuggerBrowsableAttribute = "System.Diagnostics.DebuggerBrowsableAttribute" -let tname_DebuggerBrowsableState = "System.Diagnostics.DebuggerBrowsableState" - -let tref_DebuggerNonUserCodeAttribute ilg = mk_tref (ilg.mscorlib_scoref,tname_DebuggerNonUserCodeAttribute) -let tref_DebuggerHiddenAttribute ilg = mk_tref (ilg.mscorlib_scoref,tname_DebuggerHiddenAttribute) -let tref_DebuggerDisplayAttribute ilg = mk_tref (ilg.mscorlib_scoref,tname_DebuggerDisplayAttribute) -let tref_DebuggerTypeProxyAttribute ilg = mk_tref (ilg.mscorlib_scoref,tname_DebuggerTypeProxyAttribute) -let tref_DebuggerBrowsableAttribute ilg = mk_tref (ilg.mscorlib_scoref,tname_DebuggerBrowsableAttribute) -let tref_DebuggableAttribute ilg = mk_tref (ilg.mscorlib_scoref,tname_DebuggableAttribute) -let tref_DebuggableAttribute_DebuggingModes ilg = mk_nested_tref (ilg.mscorlib_scoref,[tname_DebuggableAttribute],tname_DebuggableAttribute_DebuggingModes) - -let typ_DebuggerBrowsableState ilg = - let tref_DebuggerBrowsableState = mk_tref(ilg.mscorlib_scoref,tname_DebuggerBrowsableState) - Type_value (mk_tspec(tref_DebuggerBrowsableState,mk_empty_gactuals)) - -let mk_CompilerGeneratedAttribute ilg = mk_custom_attribute ilg (tref_CompilerGeneratedAttribute ilg,[],[],[]) -let mk_DebuggerHiddenAttribute ilg = mk_custom_attribute ilg (tref_DebuggerHiddenAttribute ilg,[],[],[]) -let mk_DebuggerDisplayAttribute ilg s = mk_custom_attribute ilg (tref_DebuggerDisplayAttribute ilg,[ilg.typ_String],[CustomElem_string (Some s)],[]) -let mk_DebuggerTypeProxyAttribute ilg ty = mk_custom_attribute ilg (tref_DebuggerTypeProxyAttribute ilg,[ilg.typ_Type],[CustomElem_tref (tref_of_typ ty)],[]) -let mk_DebuggerBrowsableAttribute ilg n = mk_custom_attribute ilg (tref_DebuggerBrowsableAttribute ilg,[typ_DebuggerBrowsableState ilg],[CustomElem_int32 n],[]) -let mk_DebuggerBrowsableNeverAttribute ilg = mk_DebuggerBrowsableAttribute ilg 0 -let mk_DebuggerBrowsableCollapsedAttribute ilg = mk_DebuggerBrowsableAttribute ilg 2 -let mk_DebuggerBrowsableRootHiddenAttribute ilg = mk_DebuggerBrowsableAttribute ilg 3 -let mk_DebuggerNonUserCodeAttribute ilg = mk_custom_attribute ilg (tref_DebuggerNonUserCodeAttribute ilg,[],[],[]) -let mk_DebuggableAttribute ilg (jitTracking, jitOptimizerDisabled) = - mk_custom_attribute ilg (tref_DebuggableAttribute ilg,[ilg.typ_Bool;ilg.typ_Bool], [CustomElem_bool jitTracking; CustomElem_bool jitOptimizerDisabled],[]) - - -// Bug 2129. Requests attributes to be added to compiler generated methods -let add_generated_attrs ilg attrs = mk_custom_attrs (dest_custom_attrs attrs @ [mk_CompilerGeneratedAttribute ilg;mk_DebuggerNonUserCodeAttribute ilg]) - -let add_mdef_generated_attrs ilg (mdef:ILMethodDef) = {mdef with mdCustomAttrs = add_generated_attrs ilg mdef.mdCustomAttrs} -let add_pdef_generated_attrs ilg (pdef:ILPropertyDef) = {pdef with propCustomAttrs = add_generated_attrs ilg pdef.propCustomAttrs} -let add_fdef_generated_attrs ilg (fdef:ILFieldDef) = {fdef with fdCustomAttrs = add_generated_attrs ilg fdef.fdCustomAttrs} - -let add_never_attrs ilg attrs = mk_custom_attrs (dest_custom_attrs attrs @ [mk_DebuggerBrowsableNeverAttribute ilg]) -let add_pdef_never_attrs ilg (pdef:ILPropertyDef) = {pdef with propCustomAttrs = add_never_attrs ilg pdef.propCustomAttrs} -let add_fdef_never_attrs ilg (fdef:ILFieldDef) = {fdef with fdCustomAttrs = add_never_attrs ilg fdef.fdCustomAttrs} - - -// PermissionSet is a 'blob' having the following format: -// • A byte containing a period (.). -// • A compressed int32 containing the number of attributes encoded in the blob. -// • An array of attributes each containing the following: -// o A String, which is the fully-qualified type name of the attribute. (Strings are encoded -// as a compressed int to indicate the size followed by an array of UTF8 characters.) -// o A set of properties, encoded as the named arguments to a custom attribute would be (as -// in §23.3, beginning with NumNamed). -let mk_permission_set ilg (action,attributes: list<(ILTypeRef * (string * ILType * ILAttributeElement) list)>) = - let bytes = - [| yield (int '.'); - yield! z_unsigned_int attributes.Length; - for (tref:ILTypeRef,props) in attributes do - yield! celem_serstring tref.QualifiedNameWithNoShortMscorlib - let bytes = - [| yield! z_unsigned_int props.Length; - for (nm,typ,value) in props do - yield! encode_named_arg ilg (nm,typ,true,value)|] - yield! z_unsigned_int bytes.Length; - yield! bytes |] - - PermissionSet(action,Bytes.of_intarray bytes) - - -//--------------------------------------------------------------------- -// Primitives to help read signatures. These do not use the file cursor, but -// pass around an int index -//--------------------------------------------------------------------- - -let sigptr_get_byte bytes sigptr = - Bytes.get bytes sigptr, sigptr + 1 - -let sigptr_get_bool bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - (b0 = 0x01) ,sigptr - -let sigptr_get_u8 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - byte b0,sigptr - -let sigptr_get_i8 bytes sigptr = - let i,sigptr = sigptr_get_u8 bytes sigptr - sbyte i,sigptr - -let sigptr_get_u16 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - let b1,sigptr = sigptr_get_byte bytes sigptr - uint16 (b0 ||| (b1 <<< 8)),sigptr - -let sigptr_get_i16 bytes sigptr = - let u,sigptr = sigptr_get_u16 bytes sigptr - int16 u,sigptr - -let sigptr_get_i32 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - let b1,sigptr = sigptr_get_byte bytes sigptr - let b2,sigptr = sigptr_get_byte bytes sigptr - let b3,sigptr = sigptr_get_byte bytes sigptr - b0 ||| (b1 <<< 8) ||| (b2 <<< 16) ||| (b3 <<< 24),sigptr - -let sigptr_get_u32 bytes sigptr = - let u,sigptr = sigptr_get_i32 bytes sigptr - uint32 u,sigptr - -let sigptr_get_i64 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - let b1,sigptr = sigptr_get_byte bytes sigptr - let b2,sigptr = sigptr_get_byte bytes sigptr - let b3,sigptr = sigptr_get_byte bytes sigptr - let b4,sigptr = sigptr_get_byte bytes sigptr - let b5,sigptr = sigptr_get_byte bytes sigptr - let b6,sigptr = sigptr_get_byte bytes sigptr - let b7,sigptr = sigptr_get_byte bytes sigptr - int64 b0 ||| (int64 b1 <<< 8) ||| (int64 b2 <<< 16) ||| (int64 b3 <<< 24) ||| - (int64 b4 <<< 32) ||| (int64 b5 <<< 40) ||| (int64 b6 <<< 48) ||| (int64 b7 <<< 56), - sigptr - -let sigptr_get_u64 bytes sigptr = - let u,sigptr = sigptr_get_i64 bytes sigptr - uint64 u,sigptr - -let float32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0) -let float_of_bits (x:int64) = System.BitConverter.Int64BitsToDouble(x) - -let sigptr_get_ieee32 bytes sigptr = - let u,sigptr = sigptr_get_i32 bytes sigptr - float32_of_bits u,sigptr - -let sigptr_get_ieee64 bytes sigptr = - let u,sigptr = sigptr_get_i64 bytes sigptr - float_of_bits u,sigptr - -let sigptr_get_intarray n bytes sigptr = - let res = Bytes.zero_create n - for i = 0 to (n - 1) do - Bytes.set res i (Bytes.get bytes (sigptr + i)) - done; - res, sigptr + n - -let sigptr_get_string n bytes sigptr = - let intarray,sigptr = sigptr_get_intarray n bytes sigptr - Bytes.utf8_bytes_as_string intarray , sigptr - -let sigptr_get_z_i32 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - if b0 <= 0x7F then b0, sigptr - elif b0 <= 0xbf then - let b0 = b0 &&& 0x7f - let b1,sigptr = sigptr_get_byte bytes sigptr - (b0 <<< 8) ||| b1, sigptr - else - let b0 = b0 &&& 0x3f - let b1,sigptr = sigptr_get_byte bytes sigptr - let b2,sigptr = sigptr_get_byte bytes sigptr - let b3,sigptr = sigptr_get_byte bytes sigptr - (b0 <<< 24) ||| (b1 <<< 16) ||| (b2 <<< 8) ||| b3, sigptr - -let sigptr_get_serstring bytes sigptr = - let len,sigptr = sigptr_get_z_i32 bytes sigptr - sigptr_get_string ( len) bytes sigptr - -let sigptr_get_serstring_possibly_null bytes sigptr = - let b0,_ = sigptr_get_byte bytes sigptr (* throw away sigptr *) - if b0 = 0xFF then - None,sigptr - else - let len,sigptr = sigptr_get_z_i32 bytes sigptr - let s, sigptr = sigptr_get_string len bytes sigptr - Some(s),sigptr - -let decode_il_attrib_data ilg ca = - let bytes = ca.customData - let sigptr = 0 - let bb0,sigptr = sigptr_get_byte bytes sigptr - let bb1,sigptr = sigptr_get_byte bytes sigptr - if not (bb0 = 0x01 && bb1 = 0x00) then failwith "decode_simple_cattr_data: invalid data"; - let rec parseVal argty sigptr = - match argty with - | Type_value tspec when tspec.Name = "System.SByte" -> - let n,sigptr = sigptr_get_i8 bytes sigptr - CustomElem_int8 n, sigptr - | Type_value tspec when tspec.Name = "System.Byte" -> - let n,sigptr = sigptr_get_u8 bytes sigptr - CustomElem_uint8 n, sigptr - | Type_value tspec when tspec.Name = "System.Int16" -> - let n,sigptr = sigptr_get_i16 bytes sigptr - CustomElem_int16 n, sigptr - | Type_value tspec when tspec.Name = "System.UInt16" -> - let n,sigptr = sigptr_get_u16 bytes sigptr - CustomElem_uint16 n, sigptr - | Type_value tspec when tspec.Name = "System.Int32" -> - let n,sigptr = sigptr_get_i32 bytes sigptr - CustomElem_int32 n, sigptr - | Type_value tspec when tspec.Name = "System.UInt32" -> - let n,sigptr = sigptr_get_u32 bytes sigptr - CustomElem_uint32 n, sigptr - | Type_value tspec when tspec.Name = "System.Int64" -> - let n,sigptr = sigptr_get_i64 bytes sigptr - CustomElem_int64 n, sigptr - | Type_value tspec when tspec.Name = "System.UInt64" -> - let n,sigptr = sigptr_get_u64 bytes sigptr - CustomElem_uint64 n, sigptr - | Type_value tspec when tspec.Name = "System.Double" -> - let n,sigptr = sigptr_get_ieee64 bytes sigptr - CustomElem_float64 n, sigptr - | Type_value tspec when tspec.Name = "System.Single" -> - let n,sigptr = sigptr_get_ieee32 bytes sigptr - CustomElem_float32 n, sigptr - | Type_value tspec when tspec.Name = "System.Char" -> - let n,sigptr = sigptr_get_u16 bytes sigptr - CustomElem_char (char (int32 n)), sigptr - | Type_value tspec when tspec.Name = "System.Boolean" -> - let n,sigptr = sigptr_get_byte bytes sigptr - CustomElem_bool (not (n = 0)), sigptr - | Type_boxed tspec when tspec.Name = "System.String" -> - let n,sigptr = sigptr_get_serstring_possibly_null bytes sigptr - CustomElem_string n, sigptr - | Type_boxed tspec when tspec.Name = "System.Type" -> - let n,sigptr = sigptr_get_serstring bytes sigptr - CustomElem_tref (mk_tref(ilg.mscorlib_scoref,n)), sigptr - | Type_boxed tspec when tspec.Name = "System.Object" -> - let et,sigptr = sigptr_get_u8 bytes sigptr - let ty = celem_dec_ty ilg (int et) - parseVal ty sigptr - | Type_array(shape,elemTy) when shape = Rank1ArrayShape -> - let n,sigptr = sigptr_get_i32 bytes sigptr - let rec parseElems acc n sigptr = - if n = 0 then List.rev acc else - let v,sigptr = parseVal elemTy sigptr - parseElems (v ::acc) (n-1) sigptr - let elems = parseElems [] n sigptr - CustomElem_array(elems), sigptr - | Type_value _ -> (* assume it is an enumeration *) - let n,sigptr = sigptr_get_i32 bytes sigptr - CustomElem_int32 n, sigptr - | _ -> failwith "decode_simple_cattr_data: attribute data involves an enum or System.Type value" - let rec parseFixed argtys sigptr = - match argtys with - [] -> [],sigptr - | h::t -> - let nh,sigptr = parseVal h sigptr - let nt,sigptr = parseFixed t sigptr - nh ::nt, sigptr - let fixedArgs,sigptr = parseFixed (ca.Method.FormalArgTypes) sigptr - let nnamed,sigptr = sigptr_get_u16 bytes sigptr - let rec parseNamed acc n sigptr = - if n = 0 then List.rev acc else - let isPropByte,sigptr = sigptr_get_u8 bytes sigptr - let isProp = (int isPropByte = 0x54) - let et,sigptr = sigptr_get_u8 bytes sigptr - let ty = celem_dec_ty ilg (int et) - let nm,sigptr = sigptr_get_serstring bytes sigptr - let v,sigptr = parseVal ty sigptr - parseNamed ((nm,ty,isProp,v) ::acc) (n-1) sigptr - let named = parseNamed [] (int nnamed) sigptr - fixedArgs,named - - -let mk_DebuggableAttribute_v2 ilg (jitTracking, ignoreSymbolStoreSequencePoints, jitOptimizerDisabled,enableEnC) = - mk_custom_attribute ilg - (tref_DebuggableAttribute ilg,[mk_nongeneric_value_typ (tref_DebuggableAttribute_DebuggingModes ilg)], - [CustomElem_int32( - (* See System.Diagnostics.DebuggableAttribute.DebuggingModes *) - (if jitTracking then 1 else 0) ||| - (if jitOptimizerDisabled then 256 else 0) ||| - (if ignoreSymbolStoreSequencePoints then 2 else 0) ||| - (if enableEnC then 4 else 0))],[]) - -// -------------------------------------------------------------------- -// Functions to collect up all the references in a full module or -// asssembly manifest. The process also allocates -// a unique name to each unique internal assembly reference. -// -------------------------------------------------------------------- - -type ILReferences = - { refsAssembly: ILAssemblyRef list; - refsModul: ILModuleRef list; } - member x.AssemblyReferences = x.refsAssembly - member x.ModuleReferences = x.refsModul - -let insert_aref (e:ILAssemblyRef) l = if List.mem e l.refsAssembly then l else {l with refsAssembly=e::l.refsAssembly} -let insert_mref (e:ILModuleRef) l = if List.mem e l.refsModul then l else {l with refsModul=e::l.refsModul} - -module Hashset = - type 'a t = Dictionary<'a,int> - let create n = new Dictionary<'a,int>(n:int) - let mem (t: 'a t) x = t.ContainsKey x - let add (t: 'a t) x = if not (t.ContainsKey x) then t.[x] <- 0 - let fold f t acc = Dictionary.fold (fun x y z -> f x z) t acc - - -type refstate = - { refsA: ILAssemblyRef Hashset.t; - refsM: ILModuleRef Hashset.t; } - -let empty_refs = - { refsAssembly=[]; - refsModul = []; } - -let iter_option f x = match x with None -> () | Some x -> f x -let iter_pair f1 f2 (x,y) = f1 x; f2 y - -(* Now find references. *) -let refs_of_assref s x = Hashset.add s.refsA x -let refs_of_modref s x = Hashset.add s.refsM x - -let refs_of_scoref s x = - match x with - | ScopeRef_local -> () - | ScopeRef_assembly assref -> refs_of_assref s assref - | ScopeRef_module modref -> refs_of_modref s modref - -let refs_of_tref s (x:ILTypeRef) = refs_of_scoref s x.Scope - -let rec refs_of_typ s x = - match x with - | Type_void | Type_tyvar _ -> () - | Type_modified(_,ty1,ty2) -> refs_of_tref s ty1; refs_of_typ s ty2 - | Type_array (_,ty) - | Type_ptr ty | Type_byref ty -> refs_of_typ s ty - | Type_value tr | Type_boxed tr -> refs_of_tspec s tr - | Type_fptr mref -> refs_of_callsig s mref -and refs_of_inst s i = List.iter (refs_of_typ s) i -and refs_of_tspec s (x:ILTypeSpec) = refs_of_tref s x.TypeRef; refs_of_inst s x.GenericArgs -and refs_of_callsig s csig = refs_of_typs s csig.callsigArgs; refs_of_typ s csig.callsigReturn -and refs_of_genparam s x = refs_of_typs s x.gpConstraints -and refs_of_genparams s b = List.iter (refs_of_genparam s) b - -and refs_of_dloc s ts = refs_of_tref s ts - -and refs_of_mref s (x:ILMethodRef) = - refs_of_dloc s x.EnclosingTypeRef ; - List.iter (refs_of_typ s) x.mrefArgs; - refs_of_typ s x.mrefReturn - -and refs_of_fref s x = refs_of_tref s x.frefParent; refs_of_typ s x.frefType -and refs_of_ospec s (OverridesSpec(mref,ty)) = refs_of_mref s mref; refs_of_typ s ty -and refs_of_mspec s x = - let x1,x2,x3 = dest_mspec x - refs_of_mref s x1; - refs_of_typ s x2; - refs_of_inst s x3 - -and refs_of_fspec s x = - refs_of_fref s x.fspecFieldRef; - refs_of_typ s x.fspecEnclosingType - -and refs_of_typs s l = List.iter (refs_of_typ s) l - -and refs_of_token s x = - match x with - | Token_type ty -> refs_of_typ s ty - | Token_method mr -> refs_of_mspec s mr - | Token_field fr -> refs_of_fspec s fr -and refs_of_custom_attr s x = refs_of_mspec s x.customMethod - -and refs_of_custom_attrs s cas = List.iter (refs_of_custom_attr s) (dest_custom_attrs cas) -and refs_of_varargs s tyso = iter_option (refs_of_typs s) tyso -and refs_of_instr s x = - match x with - | I_call (_,mr,varargs) | I_newobj (mr,varargs) | I_callvirt (_,mr,varargs) -> - refs_of_mspec s mr; - refs_of_varargs s varargs - | I_callconstraint (_,tr,mr,varargs) -> - refs_of_typ s tr; - refs_of_mspec s mr; - refs_of_varargs s varargs - | I_calli (_,callsig,varargs) -> - refs_of_callsig s callsig; refs_of_varargs s varargs - | I_jmp mr | I_ldftn mr | I_ldvirtftn mr -> - refs_of_mspec s mr - | I_ldsfld (_,fr) | I_ldfld (_,_,fr) | I_ldsflda fr | I_ldflda fr | I_stsfld (_,fr) | I_stfld (_,_,fr) -> - refs_of_fspec s fr - | I_isinst ty | I_castclass ty | I_cpobj ty | I_initobj ty | I_ldobj (_,_,ty) - | I_stobj (_,_,ty) | I_box ty |I_unbox ty | I_unbox_any ty | I_sizeof ty - | I_ldelem_any (_,ty) | I_ldelema (_,_,ty) |I_stelem_any (_,ty) | I_newarr (_,ty) - | I_mkrefany ty | I_refanyval ty - | EI_ilzero ty -> refs_of_typ s ty - | I_ldtoken token -> refs_of_token s token - | I_stelem _|I_ldelem _|I_ldstr _|I_switch _|I_stloc _|I_stind _ - | I_starg _|I_ldloca _|I_ldloc _|I_ldind _ - | I_ldarga _|I_ldarg _|I_leave _|I_br _ - | I_brcmp _|I_rethrow|I_refanytype|I_ldlen|I_throw|I_initblk _ |I_cpblk _ - | I_localloc|I_ret |I_endfilter|I_endfinally|I_arglist - | I_other _ | I_break|I_arith _ |I_seqpoint _ | EI_ldlen_multi _ -> () - - -and refs_of_il_block s c = - match c with - | ILBasicBlock bb -> Array.iter (refs_of_instr s) bb.bblockInstrs - | GroupBlock (_,l) -> List.iter (refs_of_il_code s) l - | RestrictBlock (nms,c) -> refs_of_il_code s c - | TryBlock (l,r) -> - refs_of_il_code s l; - match r with - | FaultBlock flt -> refs_of_il_code s flt - | FinallyBlock flt -> refs_of_il_code s flt - | FilterCatchBlock clauses -> - List.iter - (fun (flt,ctch) -> - refs_of_il_code s ctch; - begin match flt with - | CodeFilter fltcode -> refs_of_il_code s fltcode - | TypeFilter ty -> refs_of_typ s ty - end) - clauses - -and refs_of_il_code s c = refs_of_il_block s c - -and refs_of_ilmbody s il = - List.iter (refs_of_local s) il.ilLocals; - refs_of_il_code s il.ilCode - -and refs_of_local s loc = refs_of_typ s loc.localType - -and refs_of_mbody s x = - match x with - | MethodBody_il il -> refs_of_ilmbody s il - | MethodBody_pinvoke (attr) -> refs_of_modref s attr.pinvokeWhere - | _ -> () - -and refs_of_mdef s md = - List.iter (refs_of_param s) md.mdParams; - refs_of_return s md.mdReturn; - refs_of_mbody s (dest_mbody md.mdBody); - refs_of_custom_attrs s md.mdCustomAttrs; - refs_of_genparams s md.mdGenericParams - -and refs_of_param s p = refs_of_typ s p.paramType -and refs_of_return s (rt:ILReturnValue) = refs_of_typ s rt.Type -and refs_of_mdefs s x = List.iter (refs_of_mdef s) (dest_mdefs x) - -and refs_of_event_def s ed = - iter_option (refs_of_typ s) ed.eventType ; - refs_of_mref s ed.eventAddOn ; - refs_of_mref s ed.eventRemoveOn; - iter_option (refs_of_mref s) ed.eventFire ; - List.iter (refs_of_mref s) ed.eventOther ; - refs_of_custom_attrs s ed.eventCustomAttrs - -and refs_of_events s x = List.iter (refs_of_event_def s) (dest_edefs x) - -and refs_of_property_def s pd = - iter_option (refs_of_mref s) pd.propSet ; - iter_option (refs_of_mref s) pd.propGet ; - refs_of_typ s pd.propType ; - refs_of_typs s pd.propArgs ; - refs_of_custom_attrs s pd.propCustomAttrs - -and refs_of_properties s x = List.iter (refs_of_property_def s) (dest_pdefs x) - -and refs_of_fdef s fd = - refs_of_typ s fd.fdType; - refs_of_custom_attrs s fd.fdCustomAttrs - -and refs_of_fields s fields = List.iter (refs_of_fdef s) fields - -and refs_of_method_impls s mimpls = List.iter (refs_of_method_impl s) mimpls - -and refs_of_method_impl s m = - refs_of_ospec s m.mimplOverrides; - refs_of_mspec s m.mimplOverrideBy -and refs_of_tdef_kind s k = () - -and refs_of_tdef s td = - refs_of_types s td.tdNested; - refs_of_genparams s td.tdGenericParams; - refs_of_typs s td.tdImplements; - iter_option (refs_of_typ s) td.tdExtends; - refs_of_mdefs s td.tdMethodDefs; - refs_of_fields s (dest_fdefs td.tdFieldDefs); - refs_of_method_impls s (dest_mimpls td.tdMethodImpls); - refs_of_events s td.tdEvents; - refs_of_tdef_kind s td.tdKind; - refs_of_custom_attrs s td.tdCustomAttrs; - refs_of_properties s td.tdProperties - -and refs_of_string s _ = () -and refs_of_types s types = List.iter (refs_of_tdef s) (dest_tdefs types) - -and refs_of_exported_type s c = - refs_of_custom_attrs s c.exportedTypeCustomAttrs - -and refs_of_exported_types s tab = List.iter (refs_of_exported_type s) (dest_exported_types tab) - -and refs_of_resource_where s x = - match x with - | Resource_local _ -> () - | Resource_file (mref,_) -> refs_of_modref s mref - | Resource_assembly aref -> refs_of_assref s aref -and refs_of_resource s x = - refs_of_resource_where s x.resourceWhere; - refs_of_custom_attrs s x.resourceCustomAttrs - -and refs_of_resources s tab = List.iter (refs_of_resource s) (dest_resources tab) - -and refs_of_modul s m = - refs_of_types s m.modulTypeDefs; - refs_of_resources s m.modulResources; - iter_option (refs_of_manifest s) m.modulManifest - -and refs_of_manifest s m = - refs_of_custom_attrs s m.manifestCustomAttrs; - refs_of_exported_types s m.manifestExportedTypes - -let refs_of_module modul = - let s = - { refsA = Hashset.create 10; - refsM = Hashset.create 5; - (* mspecsVisited = Visitset.create "mspecs" 1000 *) } - refs_of_modul s modul; - (* Visitset.report s.mspecsVisited; *) - { refsAssembly = Hashset.fold (fun x acc -> x::acc) s.refsA []; - refsModul = Hashset.fold (fun x acc -> x::acc) s.refsM [] } - -let tspan = System.TimeSpan(System.DateTime.Now.Ticks - System.DateTime(2000,1,1).Ticks) - -let parse_version (vstr : string) = - // matches "v1.2.3.4" or "1.2.3.4". Note, if numbers are missing, returns -1 (not 0). - let mutable vstr = vstr.TrimStart [|'v'|] - // if the version string contains wildcards, replace them - let versionComponents = vstr.Split([|'.'|]) - - // account for wildcards - if versionComponents.Length > 2 then - let defaultBuild = (uint16)tspan.Days % System.UInt16.MaxValue - 1us - let defaultRevision = (uint16)(System.DateTime.Now.TimeOfDay.TotalSeconds / 2.0) % System.UInt16.MaxValue - 1us - if versionComponents.[2] = "*" then - if versionComponents.Length > 3 then - failwith "Invalid version format" - else - // set the build number to the number of days since Jan 1, 2000 - versionComponents.[2] <- defaultBuild.ToString() ; - // Set the revision number to number of seconds today / 2 - vstr <- System.String.Join(".",versionComponents) ^ "." ^ defaultRevision.ToString() ; - elif versionComponents.Length > 3 && versionComponents.[3] = "*" then - // Set the revision number to number of seconds today / 2 - versionComponents.[3] <- defaultRevision.ToString() ; - vstr <- System.String.Join(".",versionComponents) ; - - let version = System.Version(vstr) - let zero16 n = if n < 0s then 0us else uint16(n) - let zero32 n = if n < 0 then 0us else uint16(n) - (zero32 version.Major, zero32 version.Minor, zero32 version.Build, zero16 version.MinorRevision);; - - -let version_compare (a1,a2,a3,a4) ((b1,b2,b3,b4) : ILVersionInfo) = - let c = compare a1 b1 - if c <> 0 then c else - let c = compare a2 b2 - if c <> 0 then c else - let c = compare a3 b3 - if c <> 0 then c else - let c = compare a4 b4 - if c <> 0 then c else - 0 - - -let version_max a b = if version_compare a b < 0 then b else a -let version_min a b = if version_compare a b > 0 then b else a - - -let resolve_mref td (mref:ILMethodRef) = - let args = mref.ArgTypes - let nargs = List.length args - let nm = mref.Name - let mid =(nm,nargs) - let possibles = find_mdefs_by_arity mid td.tdMethodDefs - if isNil possibles then failwith ("no method named "^nm^" found in type "^td.tdName); - match - possibles |> List.filter (fun md -> - callconv_eq mref.CallingConv md.mdCallconv & - List.lengthsEqAndForall2 (fun p1 p2 -> p1.paramType = p2) md.mdParams mref.ArgTypes) with - | [] -> - failwith ("no method named "^nm^" with appropriate argument types found in type "^td.tdName); - | [mdef] -> mdef - | _ -> - failwith ("multiple methods named "^nm^" appear with identical argument types in type "^td.tdName) - -let modref_for_modul m = - ILModuleRef.Create(m.modulName, true, None) - - -let ungenericize_tname n = - let sym = '`' - if - String.contains n sym && - (* check what comes after the symbol is a number *) - begin - let m = String.rindex n sym - let res = ref (m < String.length n - 1) - for i = m + 1 to String.length n - 1 do - res := !res && String.get n i >= '0' && String.get n i <= '9'; - done; - !res - end - then - let pos = String.rindex n sym - String.sub n 0 pos - else n - - -(* -------------------------------------------------------------------- - * Augmentations - * -------------------------------------------------------------------- *) - -type ILTypeSpec with - member x.FullName=x.TypeRef.FullName - -type ILEventRef = - { erA: ILTypeRef; erB: string } - static member Create(a,b) = {erA=a;erB=b} - member x.EnclosingTypeRef = x.erA - member x.Name = x.erB - -type ILEventSpec = - { esA: ILEventRef; esB: ILType } - static member Create (a,b) = {esA=a;esB=b} - member x.EventRef = x.esA - member x.EnclosingType = x.esB - -type ILPropertyRef = - { prA: ILTypeRef; prB: string } - static member Create (a,b) = {prA=a;prB=b} - member x.EnclosingTypeRef = x.prA - member x.Name = x.prB - -type ILPropertySpec = - { psA: ILPropertyRef; psB: ILType } - static member Create (a,b) = {psA=a;psB=b} - member x.PropertyRef = x.psA - member x.EnclosingType = x.psB - - -let tref_of_pref x = x.prA -let tref_of_eref x = x.erA -let name_of_pref x = x.prB -let name_of_eref x = x.erB -let mk_pref (a,b) = {prA=a;prB=b} -let mk_eref (a,b) = {erA=a;erB=b} -let mk_pspec (a,b) = {psA=a;psB=b} -let mk_espec (a,b) = {esA=a;esB=b} -let enclosing_typ_of_pspec x = x.psB -let enclosing_typ_of_espec x = x.esB -let pref_of_pspec x = x.psA -let eref_of_espec x = x.esA -let eref_for_edef scope (tdefs,tdef) (x:ILEventDef) = mk_eref (tref_for_nested_tdef scope (tdefs,tdef), x.eventName) -let pref_for_pdef scope (tdefs,tdef) (x:ILPropertyDef) = mk_pref (tref_for_nested_tdef scope (tdefs,tdef), x.propName) - -type ILArrayShape with - static member SingleDimensional = Rank1ArrayShape - -open System.Runtime.CompilerServices -[] do () - - - -#endif diff --git a/tools/FSharp_1.9.6.16/source/absil/il.mli b/tools/FSharp_1.9.6.16/source/absil/il.mli deleted file mode 100644 index 8871583e..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/il.mli +++ /dev/null @@ -1,2446 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -/// The "unlinked" view of .NET metadata and code. Central to -/// to Abstract IL library -module (* internal *) Microsoft.FSharp.Compiler.AbstractIL.IL - -open Internal.Utilities - -#light - -// ==================================================================== -// .NET binaries can be converted to the data structures below by using -// the functions in the "Ilread" module. -// -// Constituent types are listed in ascending order of complexity, -// all the way up to the type "assembly". Types are often specified -// via a concrete representation for the type (e.g. a record), though -// later versions of this toolkit may make these types abstract. -// Types are followed by a collection of abstract functions -// of the form "dest_XYZ" and "ABC_of_XYZ" to -// access information from objects. Sometimes these -// abstract access functions are not complete, i.e. you may have -// to use the concrete representation directly. -// -// The second part of the file (after the definition of all the types) -// specifies a large set of utilities for building objects belonging to -// the types. You will only need to become familiar with these if you -// are transforming code or writing a code-generating compiler. -// -// Several other utilities are also defined in this file: -// 1. A code builder for turning linear sequences of instructions -// augmented with exception tables into the more structured -// format used for code. -// -// 2. The "typ_XYZ", "tspec_XYZ" and "mspec_XYZ" values which -// can be used to reference types in the "mscorlib" assembly. -// -// 3. The "rescope_XYZ" functions which can be used to lift a piece of -// metadata from one assembly and transform it to a piece of metadata -// suitable for use from another assembly. The transformation adjusts -// references in the metadata to take into account the assembly -// where the metadata will now be located. -// -// 4. The "inst_XYZ" utilities to replace type variables -// by types. These are associated with generics. -// -// 5. The "intern_XYZ" tables for reducing the memory used by -// generated constructs. -// -// 6. The "refs_of_XYZ" utilities for finding all the assemblies -// referenced by a module. -// -// 7. A somewhat obscure facility to allow new instructions and types -// to be added to the IL. This is used by ILX. -// ==================================================================== - -// A note on strings: Strings in this module represent slightly -// different things depending on whether you are accessing the -// library using OCaml or a .NET language: -// -// F# (and any other .NET language): -// The type 'string' in this file repesents a Unicode string. -// - -// We often use the type "byte[]" where we want a type that can faithfully -// represent Unicode strings. - - -// Guids - REVIEW: adjust these to the System.Guid type -type Guid = byte[] - -type ILPlatform = - | X86 - | AMD64 - | IA64 - -/// Debug info. Values of type "source" can be attached at sequence -/// points and some other locations. -[] -type ILSourceDocument = - static member Create : language: Guid option * vendor: Guid option * documentType: Guid option * file: string -> ILSourceDocument - member Language: Guid option - member Vendor: Guid option - member DocumentType: Guid option - member File: string - - -[] -type ILSourceMarker = - static member Create : document: ILSourceDocument * line: int * column: int * endLine:int * endColumn: int-> ILSourceMarker - member Document: ILSourceDocument - member Line: int - member Column: int - member EndLine: int - member EndColumn: int - -/// Extensibility: ignore these unless you are generating ILX -/// structures directly. -type IlxExtensionType -type IlxExtensionTypeKind -type IlxExtensionInstr - - -type Locale = string -type PublicKey = - | PublicKey of byte[] - | PublicKeyToken of byte[] - member IsKey: bool - member IsKeyToken: bool - member Key: byte[] - member KeyToken: byte[] - -type ILVersionInfo = uint16 * uint16 * uint16 * uint16 - -[] -type ILAssemblyRef = - static member Create : name: string * hash: byte[] option * publicKey: PublicKey option * retargetable: bool * version: ILVersionInfo option * locale: Locale option -> ILAssemblyRef - - static member FromAssembly : System.Reflection.Assembly -> ILAssemblyRef - - member Name: string; - /// The fully qualified name of the assembly reference, e.g. mscorlib, Version=1.0.3705 etc. - member QualifiedName: string; - member Hash: byte[] option; - member PublicKey: PublicKey option; - /// CLI says this indicates if the assembly can be retargeted (at runtime) to be from a different publisher. - member Retargetable: bool; - member Version: ILVersionInfo option; - member Locale: Locale option - interface System.IComparable - -[] -type ILModuleRef = - static member Create : name: string * hasMetadata: bool * hash: byte[] option -> ILModuleRef - member Name: string; - member HasMetadata: bool; - member Hash: byte[] option; - -/// Scope references -/// -/// Scope references are the bits of metadata attached to type names -/// that indicate where a type can be found. CIL has three -/// kinds: local, module and assembly references: -/// o Local: the type must reside in the same module as the scope reference -/// o Module: the type must reside in the indicated module in the same -/// assembly as the scope reference -/// o Assembly: The type must reside in the indicated assembly. -/// These have no implicit context. Assembly references can end up -/// binding to the assembly containing the reference, i.e. -/// may be self or mutually referential. -/// -/// Assembly reference may also resolve to type in an -/// auxiliary module of an assembly when the assembly -/// has an "exported types" (here called "classes elsewhere") table. -/// -/// We represent these references by values embedded within type -/// references. These values are usually "shared" across the data -/// structures for a module, i.e. one such value is created for each -/// assembly or module reference, and this value is reused within each -/// type object. -/// -/// Note that as with method references the term structure is not -/// _linked_, i.e. a "ILScopeRef" is still a _reference_ to a scope, -/// not the scope itself. Because the structure is not linked, -/// the Abstract IL toolset does not require -/// strongly connected inputs: you can manipulate an assembly -/// without loading all its dependent assemblies. This is the primary -/// difference between Abstract IL and Reflection, and it can be both -/// a blessing and a curse depending on the kind of manipulation you -/// wish to perform. -/// -/// Similarly, you can manipulate individual modules within -/// an assembly without having the whole assembly loaded. (But note that -/// most assemblies are single-module in any case). -/// -/// [ILScopeRef]'s _cannot_ be compared for equality in the way that -/// might be expected, in these sense that two ILScopeRef's may -/// resolve to the same assembly/module even though they are not equal. -/// -/// Aside: People have suggested normalizing all scope references -/// so that this would be possible, and early versions of this -/// toolkit did this. However, this meant that in order to load -/// each module you had to tell the toolkit which assembly it belonged to. -/// Furthermore, you had to know the exact resolved details of -/// each assembly the module refers to. This is -/// effectively like having a "fully-linked" view of the graph -/// of assemblies, like that provided in the Ilbind module. This is really problematic for compile-time tools, -/// as, for example, the policy for linking at the runtime-machine -/// may actually alter the results of linking. If such compile-time -/// assumptions are to be made then the tool built on top -/// of the toolkit rather than the toolkit itself should -/// make them. -/// -/// Scope references, type references, field references and method references -/// can be "bound" to particular assemblies using the functions in "Ilbind". -/// This simulates the resolution/binding process performed by a Common Language -/// Runtime during execution. Various tests and derived operations -/// can then be performed on the results of binding. See the Ilbind module -/// for more details. Many (but not all) analyses should rightly be built on top of -/// Ilbind. -type ILScopeRef = - // ... in M. - | ScopeRef_local - // ... be in the given module of A. - | ScopeRef_module of ILModuleRef - // ... be in some module of the given assembly. - | ScopeRef_assembly of ILAssemblyRef - static member Local: ILScopeRef - static member Module: ILModuleRef -> ILScopeRef - static member Assembly: ILAssemblyRef -> ILScopeRef - member IsLocalRef: bool - member IsModuleRef: bool - member IsAssemblyRef: bool - member ModuleRef: ILModuleRef - member AssemblyRef: ILAssemblyRef - member QualifiedName: string - -/// Calling conventions. -/// -/// For nearly all purposes you simply want to use CC_default combined -/// with CC_instance or CC_static, i.e. -/// ILCallingConv.Instance == Callconv(CC_instance, CC_default): for an instance method -/// ILCallingConv.Static == Callconv(CC_static, CC_default): for a static method -/// -/// CC_instance_explicit is only used by Managed C++, and indicates -/// that the 'this' pointer is actually explicit in the signature. -type ILArgumentConvention = - | CC_default - | CC_cdecl - | CC_stdcall - | CC_thiscall - | CC_fastcall - | CC_vararg - -type ILThisConvention = - /// accepts an implicit 'this' pointer - | CC_instance - /// accepts an implicit 'this' pointer - | CC_instance_explicit - /// no 'this' pointer is passed - | CC_static - -type ILCallingConv = - | Callconv of ILThisConvention * ILArgumentConvention - member IsInstance : bool - member IsInstanceExplicit : bool - member IsStatic : bool - member ThisConv : ILThisConvention - member BasicConv : ILArgumentConvention - static member Instance : ILCallingConv - static member Static : ILCallingConv - -/// Array shapes. For most purposes, including verification, the -/// rank is the only thing that matters. - -type ILArrayBound = int32 option -type ILArrayBounds = ILArrayBound * ILArrayBound -type ILArrayShape = - | ILArrayShape of ILArrayBounds list (* lobound/size pairs *) - member Rank : int - static member SingleDimensional: ILArrayShape - -/// Bounds for a single dimensional, zero based array -val Rank1ArrayShape: ILArrayShape - -type ILBoxity = - | AsObject - | AsValue - - -/// Type refs, i.e. references to types in some .NET assembly -[] -type ILTypeRef = - /// Create a ILTypeRef - static member Create : scope: ILScopeRef * enclosing: string list * name: string -> ILTypeRef - - /// Where is the type, i.e. is it in this module, in another module in this assembly or in another assembly? - member Scope: ILScopeRef - /// The list of enclosing type names for a nested type. If non-nil then the first of these also contains the namespace. - member Enclosing: string list - /// The name of the type. This also contains the namespace if Enclosing is empty - member Name: string - member FullName: string - member QualifiedName: string - interface System.IComparable - -/// Type specs and types. -/// -/// These are the types that appear syntactically in -/// .NET binaries. They can be resolved to bound types (see ilbind.ml). -/// -/// Generic type definitions must be combined with -/// an instantiation to form a type. Throughout this file, -/// a "ref" refers to something that is uninstantiated, and -/// a "spec" to a ref that is combined with the relevant instantiations. - -[] -type ILTypeSpec = - static member Create : typeRef:ILTypeRef * instantiation:ILGenericArgs -> ILTypeSpec - - /// Which type is being referred to? - member TypeRef: ILTypeRef - /// The type instantiation if the type is generic, otherwise empty - member GenericArgs: ILGenericArgs - member Scope: ILScopeRef - member Enclosing: string list - member Name: string - member FullName: string - -and ILType = - /// Used only in return and pointer types. - | Type_void - /// Array types - | Type_array of ILArrayShape * ILType - /// Unboxed types, including builtin types. - | Type_value of ILTypeSpec - /// Reference types. Also may be used for parents of members even if for members in value types. - | Type_boxed of ILTypeSpec - /// Unmanaged pointers. Nb. the type is used by tools and for binding only, not by the verifier. - | Type_ptr of ILType - /// Managed pointers. - | Type_byref of ILType - /// ILCode pointers. - | Type_fptr of ILCallingSignature - /// Reference a generic arg. - | Type_tyvar of uint16 - /// Custom modifiers. - | Type_modified of - /// True if modifier is "required" - bool * - /// The class of the custom modifier. - ILTypeRef * - /// The type being modified. - ILType - member TypeSpec : ILTypeSpec - member Boxity : ILBoxity - member TypeRef : ILTypeRef - member IsNominal : bool - member GenericArgs : ILGenericArgs - member IsTyvar : bool - -and ILCallingSignature = - { callsigCallconv: ILCallingConv; - callsigArgs: ILType list; - callsigReturn: ILType } - member CallingConv : ILCallingConv - member ArgTypes: ILType list - member ReturnType: ILType - -/// Generic parameters. Actual generic parameters are -/// always types. Formal generic parameter declarations -/// may include the bounds, if any, on the generic parameter. -and ILGenericParameterDefs = ILGenericParameterDef list -and ILGenericArgs = ILType list -and ILGenericVariance = - | NonVariant - | CoVariant - | ContraVariant -and ILGenericParameterDef = - { gpName: string; - gpConstraints: ILType list; - gpVariance: ILGenericVariance; - gpReferenceTypeConstraint: bool; - gpNotNullableValueTypeConstraint: bool; - gpDefaultConstructorConstraint: bool; } - member Name : string - /// At most one is the parent type, the others are interface types - member Constraints: ILType list - /// Variance of type parameters, only applicable to generic parameters for generic interfaces and delegates - member Variance: ILGenericVariance - /// The type argument must be a reference type - member HasReferenceTypeConstraint: bool - /// The type argument must be a value type, but not Nullable - member HasNotNullableValueTypeConstraint: bool - /// The type argument must have a public nullary constructor - member HasDefaultConstructorConstraint: bool - -/// Accessors on types - -val is_array_ty: ILType -> bool -val dest_array_ty: ILType -> ILArrayShape * ILType -val tspec_of_typ: ILType -> ILTypeSpec -val boxity_of_typ: ILType -> ILBoxity -val tref_of_typ: ILType -> ILTypeRef -val is_tref_typ: ILType -> bool -val inst_of_typ: ILType -> ILGenericArgs -val is_tyvar_ty: ILType -> bool - -/// Formal identities of methods. Method refs refer to methods on -/// named types. In general you should work with ILMethodSpec objects -/// rather than MethodRef objects, because ILMethodSpec objects carry -/// information about how generic methods are instantiated. MethodRef -/// objects are only used at a few places in the Abstract IL syntax -/// and if analyzing or generating IL you will be unlikely to come across -/// these. - -[] -type ILMethodRef = - static member Create : enclosingTypeRef: ILTypeRef * - callingConv: ILCallingConv * - name: string * - genericArity: int * - argTypes: ILType list * - returnType: ILType - -> ILMethodRef - - member EnclosingTypeRef: ILTypeRef - member CallingConv: ILCallingConv - member Name: string - member GenericArity: int - member ArgCount: int - member ArgTypes: ILType list - member ReturnType: ILType - member CallingSignature: ILCallingSignature - - -/// Formal identities of fields. - -type ILFieldRef = - { frefParent: ILTypeRef; - frefName: string; - frefType: ILType } - member EnclosingTypeRef: ILTypeRef - member Name: string - member Type: ILType - -/// Method specs and field specs -/// -/// A ILMethodSpec is everything given at the callsite (apart from -/// whether the call is a tailcall and whether it is passing -/// varargs - see the instruction set below). It is made up of -/// 1) a (possibly generic) ILMethodRef -/// 2) a "usage type" that indicates the how the type -/// containing the declaration is being used (as -/// a value class, a boxed value class, an instantiated -/// generic class or whatever - see below) -/// 3) an instantiation in the case where the method is generic. -/// -/// In this unbound form of the metadata, the enclosing type may -/// be Type_boxed even when the member is a member of a value type or -/// enumeration. This is because the binary format of the metadata -/// does not carry enough information in a MemberRefParent to determine -/// from the binary alone whether the enclosing type is a value type or -/// not. - -[] -type ILMethodSpec = - static member Create : ILType * ILMethodRef * ILGenericArgs -> ILMethodSpec - member MethodRef: ILMethodRef - member EnclosingType: ILType - member GenericArgs: ILGenericArgs - member CallingConv: ILCallingConv - member GenericArity: int - member Name: string - member FormalArgTypes: ILType list - member FormalReturnType: ILType - -val dest_mspec : ILMethodSpec -> ILMethodRef * ILType * ILGenericArgs - -/// Field specs. The data given for a ldfld, stfld etc. instruction. -type ILFieldSpec = - { fspecFieldRef: ILFieldRef; - fspecEnclosingType: ILType } - member FieldRef: ILFieldRef - member EnclosingType: ILType - member EnclosingTypeRef: ILTypeRef - member Name: string - member FormalType: ILType - -val actual_typ_of_fspec: ILFieldSpec -> ILType - -/// ILCode labels. In structured code each code label -/// refers to a basic block somewhere in the code of the method. - -type ILCodeLabel = int - -type ILBasicType = - | DT_R - | DT_I1 - | DT_U1 - | DT_I2 - | DT_U2 - | DT_I4 - | DT_U4 - | DT_I8 - | DT_U8 - | DT_R4 - | DT_R8 - | DT_I - | DT_U - | DT_REF - -type ILTokenSpec = - | Token_type of ILType - | Token_method of ILMethodSpec - | Token_field of ILFieldSpec - -type ILConstSpec = - | NUM_I4 of int32 - | NUM_I8 of int64 - | NUM_R4 of single - | NUM_R8 of double - -type Tailcall = - | Tailcall - | Normalcall - -type Alignment = - | Aligned - | Unaligned_1 - | Unaligned_2 - | Unaligned_4 - -type Volatility = - | Volatile - | Nonvolatile - -type ReadonlySpec = - | ReadonlyAddress - | NormalAddress - -type varargs = ILType list option - -type ILComparisonInstr = - | BI_beq - | BI_bge - | BI_bge_un - | BI_bgt - | BI_bgt_un - | BI_ble - | BI_ble_un - | BI_blt - | BI_blt_un - | BI_bne_un - | BI_brfalse - | BI_brtrue - -type ILArithInstr = - | AI_add - | AI_add_ovf - | AI_add_ovf_un - | AI_and - | AI_div - | AI_div_un - | AI_ceq - | AI_cgt - | AI_cgt_un - | AI_clt - | AI_clt_un - | AI_conv of ILBasicType - | AI_conv_ovf of ILBasicType - | AI_conv_ovf_un of ILBasicType - | AI_mul - | AI_mul_ovf - | AI_mul_ovf_un - | AI_rem - | AI_rem_un - | AI_shl - | AI_shr - | AI_shr_un - | AI_sub - | AI_sub_ovf - | AI_sub_ovf_un - | AI_xor - | AI_or - | AI_neg - | AI_not - | AI_ldnull - | AI_dup - | AI_pop - | AI_ckfinite - | AI_nop - | AI_ldc of ILBasicType * ILConstSpec - -/// The instruction set. -/// -/// In general we don't categorize instructions, as different -/// instruction groups are relevant for different types of operations. -/// However we do collect the branch and compare instructions together -/// because they all take an address, and the ILArithInstr ones because -/// none of them take any direct arguments. -type ILInstr = - (* Basic *) - | I_arith of ILArithInstr - | I_ldarg of uint16 - | I_ldarga of uint16 - | I_ldind of Alignment * Volatility * ILBasicType - | I_ldloc of uint16 - | I_ldloca of uint16 - | I_starg of uint16 - | I_stind of Alignment * Volatility * ILBasicType - | I_stloc of uint16 - - (* Control transfer *) - | I_br of ILCodeLabel - | I_jmp of ILMethodSpec - | I_brcmp of ILComparisonInstr * ILCodeLabel * ILCodeLabel (* second label is fall-through *) - | I_switch of (ILCodeLabel list * ILCodeLabel) (* last label is fallthrough *) - | I_ret - - (* Method call *) - | I_call of Tailcall * ILMethodSpec * varargs - | I_callvirt of Tailcall * ILMethodSpec * varargs - | I_callconstraint of Tailcall * ILType * ILMethodSpec * varargs - | I_calli of Tailcall * ILCallingSignature * varargs - | I_ldftn of ILMethodSpec - | I_newobj of ILMethodSpec * varargs - - (* Exceptions *) - | I_throw - | I_endfinally - | I_endfilter - | I_leave of ILCodeLabel - - (* Object instructions *) - | I_ldsfld of Volatility * ILFieldSpec - | I_ldfld of Alignment * Volatility * ILFieldSpec - | I_ldsflda of ILFieldSpec - | I_ldflda of ILFieldSpec - | I_stsfld of Volatility * ILFieldSpec - | I_stfld of Alignment * Volatility * ILFieldSpec - | I_ldstr of string - | I_isinst of ILType - | I_castclass of ILType - | I_ldtoken of ILTokenSpec - | I_ldvirtftn of ILMethodSpec - - (* Value type instructions *) - | I_cpobj of ILType - | I_initobj of ILType - | I_ldobj of Alignment * Volatility * ILType - | I_stobj of Alignment * Volatility * ILType - | I_box of ILType - | I_unbox of ILType - | I_unbox_any of ILType - | I_sizeof of ILType - - (* Generalized array instructions. In AbsIL these instructions include *) - (* both the single-dimensional variants (with ILArrayShape == Rank1ArrayShape) *) - (* and calls to the "special" multi-dimensional "methods" such as *) - (* newobj void string[,]::.ctor(int32, int32) *) - (* call string string[,]::Get(int32, int32) *) - (* call string& string[,]::Address(int32, int32) *) - (* call void string[,]::Set(int32, int32,string) *) - (* The IL reader transforms calls of this form to the corresponding *) - (* generalized instruction with the corresponding ILArrayShape *) - (* argument. This is done to simplify the IL and make it more uniform. *) - (* The IL writer then reverses this when emitting the binary. *) - | I_ldelem of ILBasicType - | I_stelem of ILBasicType - | I_ldelema of ReadonlySpec * ILArrayShape * ILType (* ILArrayShape = Rank1ArrayShape for single dimensional arrays *) - | I_ldelem_any of ILArrayShape * ILType (* ILArrayShape = Rank1ArrayShape for single dimensional arrays *) - | I_stelem_any of ILArrayShape * ILType (* ILArrayShape = Rank1ArrayShape for single dimensional arrays *) - | I_newarr of ILArrayShape * ILType (* ILArrayShape = Rank1ArrayShape for single dimensional arrays *) - | I_ldlen - - (* "System.TypedReference" related instructions: almost *) - (* no languages produce these, though they do occur in mscorlib.dll *) - (* System.TypedReference represents a pair of a type and a byref-pointer *) - (* to a value of that type. *) - | I_mkrefany of ILType - | I_refanytype - | I_refanyval of ILType - | I_rethrow - - (* Debug-specific *) - (* I_seqpoint is a fake instruction to represent a sequence point: *) - (* the next instruction starts the execution of the *) - (* statement covered by the given range - this is a *) - (* dummy instruction and is not emitted *) - | I_break - | I_seqpoint of ILSourceMarker - - (* Varargs - C++ only *) - | I_arglist - - (* Local aggregates, i.e. stack allocated data (alloca) : C++ only *) - | I_localloc - | I_cpblk of Alignment * Volatility - | I_initblk of Alignment * Volatility - - (* FOR EXTENSIONS, e.g. MS-ILX *) - | EI_ilzero of ILType - | EI_ldlen_multi of int32 * int32 - | I_other of IlxExtensionInstr - -/// Basic Blocks -/// A basic block is a list of instructions ending in an unconditionally -/// branching instruction. A basic block has a label which must be unique -/// within the method it is located in. Only the first instruction of -/// a basic block can be the target of a branch. -/// -/// Details: The last instruction is always a control flow instruction, -/// i.e. branch, tailcall, throw etc. -/// -/// For example -/// B1: ldarg 1 -/// pop -/// ret -/// -/// will be one basic block: -/// ILBasicBlock("B1", [| I_ldarg(1); I_arith(AI_pop); I_ret |]) - -type ILBasicBlock = - { bblockLabel: ILCodeLabel; - bblockInstrs: ILInstr array } - member Label : ILCodeLabel - member Instructions: ILInstr array - -val fallthrough_of_bblock: ILBasicBlock -> ILCodeLabel option - - -/// These nodes indicate a particular local variable has the given source -/// language name within a GroupBlock. Note this does not effect local -/// variable numbering, which is global over the whole method. -type ILDebugMapping = - { localNum: int; - localName: string; } - member LocalVarIndex : int - member Name: string - -/// ILCode -/// -/// The code for a method is made up of a "code" object. Each "code" -/// object gives the contents of the method in a "semi-structured" form, i.e. -/// 1. The structure implicit in the IL exception handling tables -/// has been made explicit -/// 2. No relative offsets are used in the code: all branches and -/// switch targets are made explicit as labels. -/// 3. All "fallthroughs" from one basic block to the next have -/// been made explicit, by adding extra "branch" instructions to -/// the end of basic blocks which simply fallthrough to another basic -/// block. -/// -/// You can convert a straight-line sequence of instructions to structured -/// code by using build_code and -/// Most of the interesting code is contained in BasicBlocks. If you're -/// just interested in getting started with the format then begin -/// by simply considering methods which do not contain any branch -/// instructions, or methods which do not contain any exception handling -/// constructs. -/// -/// The above format has the great advantage that you can insert and -/// delete new code blocks without needing to fixup relative offsets -/// or exception tables. -/// -/// ILBasicBlock(bblock) -/// See above -/// -/// GroupBlock(localDebugInfo, blocks) -/// A set of blocks, with interior branching between the blocks. For example -/// B1: ldarg 1 -/// br B2 -/// -/// B2: pop -/// ret -/// -/// will be two basic blocks -/// let b1 = ILBasicBlock("B1", [| I_ldarg(1); I_br("B2") |]) -/// let b2 = ILBasicBlock("B2", [| I_arith(AI_pop); I_ret |]) -/// GroupBlock([], [b1; b2]) -/// -/// A GroupBlock can include a list of debug info records for locally -/// scoped local variables. These indicate that within the given blocks -/// the given local variables are used for the given Debug info -/// will only be recorded for local variables -/// declared in these nodes, and the local variable will only appear live -/// in the debugger for the instructions covered by this node. So if you -/// omit or erase these nodes then no debug info will be emitted for local -/// variables. If necessary you can have one outer ScopeBlock which specifies -/// the information for all the local variables -/// -/// Not all the destination labels used within a group of blocks need -/// be satisfied by that group alone. For example, the interior "try" code -/// of "try"-"catch" construct may be: -/// B1: ldarg 1 -/// br B2 -/// -/// B2: pop -/// leave B3 -/// -/// Again there will be two basic blocks grouped together: -/// let b1 = ILBasicBlock("B1", [| I_ldarg(1); I_br("B2") |]) -/// let b2 = ILBasicBlock("B2", [| I_arith(AI_pop); I_leave("B3") |]) -/// GroupBlock([], [b1; b2]) -/// Here the code must be embedded in a method where "B3" is a label -/// somewhere in the method. -/// -/// RestrictBlock(labels,code) -/// This block hides labels, i.e. the given set of labels represent -/// wiring which is purely internal to the given code block, and may not -/// be used as the target of a branch by any blocks which this block -/// is placed alongside. -/// -/// For example, if a method is made up of: -/// B1: ldarg 1 -/// br B2 -/// -/// B2: ret -/// -/// then the label "B2" is internal. The overall code will -/// be two basic blocks grouped together, surrounded by a RestrictBlock. -/// The label "B1" is then the only remaining visible entry to the method -/// and execution will begin at that label. -/// -/// let b1 = ILBasicBlock("B1", [| I_ldarg(1); I_br("B2") |]) -/// let b2 = ILBasicBlock("B2", [| I_arith(AI_pop); I_leave("B3") |]) -/// let gb1 = GroupBlock([], [b1; b2]) -/// RestrictBlock(["B2"], gb1) -/// -/// RestrictBlock is necessary to build well-formed code. -/// -/// TryBlock(trycode,seh) -/// -/// A try-catch, try-finally or try-fault block. -/// If an exception is raised while executing -/// an instruction in 'trycode' then the exception handler given by -/// 'seh' is executed. -/// -/// Well-formedness conditions for code: -/// -/// Well-formed code includes nodes which explicitly "hide" interior labels. -/// For example, the code object for a method may have only one entry -/// label which is not hidden, and this label will be the label where -/// execution begins. -/// -/// Both filter and catch blocks must have one -/// and only one entry. These entry labels are not visible -/// outside the filter and catch blocks. Filter has no -/// exits (it always uses endfilter), catch may have exits. -/// The "try" block can have multiple entries, i.e. you can branch -/// into a try from outside. They can have multiple exits, each of -/// which will be a "leave". -/// -type ILCode = - | ILBasicBlock of ILBasicBlock - | GroupBlock of ILDebugMapping list * ILCode list - | RestrictBlock of ILCodeLabel list * ILCode - | TryBlock of ILCode * ILExceptionBlock - -/// The 'seh' specification can have several forms: -/// -/// FilterCatchBlock -/// A multi-try-filter-catch block. Execute the -/// filters in order to determine which 'catch' block to catch the -/// exception with. There are two kinds of filters - one for -/// filtering exceptions by type and one by an instruction sequence. -/// Note that filter blocks can't contain any exception blocks. -/// -and ILExceptionBlock = - | FaultBlock of ILCode - | FinallyBlock of ILCode - | FilterCatchBlock of (ILFilterBlock * ILCode) list - -and ILFilterBlock = - | TypeFilter of ILType - | CodeFilter of ILCode - -val labels_of_code: ILCode -> ILCodeLabel list -val unique_entry_of_code: ILCode -> ILCodeLabel - -/// Field Init - -type ILFieldInit = - | FieldInit_string of string - | FieldInit_bool of bool - | FieldInit_char of uint16 - | FieldInit_int8 of sbyte - | FieldInit_int16 of int16 - | FieldInit_int32 of int32 - | FieldInit_int64 of int64 - | FieldInit_uint8 of byte - | FieldInit_uint16 of uint16 - | FieldInit_uint32 of uint32 - | FieldInit_uint64 of uint64 - | FieldInit_single of single - | FieldInit_double of double - | FieldInit_ref - -/// Native Types, for marshalling to the native C interface. -/// These are taken directly from the ILASM syntax, and don't really -/// correspond yet to the ECMA Spec (Partition II, 7.4). - -type ILNativeType = - | NativeType_empty - | NativeType_custom of Guid * string * string * byte[] (* guid,nativeTypeName,custMarshallerName,cookieString *) - | NativeType_fixed_sysstring of int32 - | NativeType_fixed_array of int32 - | NativeType_currency - | NativeType_lpstr - | NativeType_lpwstr - | NativeType_lptstr - | NativeType_byvalstr - | NativeType_tbstr - | NativeType_lpstruct - | NativeType_struct - | NativeType_void - | NativeType_bool - | NativeType_int8 - | NativeType_int16 - | NativeType_int32 - | NativeType_int64 - | NativeType_float32 - | NativeType_float64 - | NativeType_unsigned_int8 - | NativeType_unsigned_int16 - | NativeType_unsigned_int32 - | NativeType_unsigned_int64 - | NativeType_array of ILNativeType option * (int32 * int32 option) option (* optional idx of parameter giving size plus optional additive i.e. num elems *) - | NativeType_int - | NativeType_unsigned_int - | NativeType_method - | NativeType_as_any - | (* COM interop *) NativeType_bstr - | (* COM interop *) NativeType_iunknown - | (* COM interop *) NativeType_idsipatch - | (* COM interop *) NativeType_interface - | (* COM interop *) NativeType_error - | (* COM interop *) NativeType_safe_array of ILNativeVariantType * string option - | (* COM interop *) NativeType_ansi_bstr - | (* COM interop *) NativeType_variant_bool - -and ILNativeVariantType = - | VariantType_empty - | VariantType_null - | VariantType_variant - | VariantType_currency - | VariantType_decimal - | VariantType_date - | VariantType_bstr - | VariantType_lpstr - | VariantType_lpwstr - | VariantType_iunknown - | VariantType_idispatch - | VariantType_safearray - | VariantType_error - | VariantType_hresult - | VariantType_carray - | VariantType_userdefined - | VariantType_record - | VariantType_filetime - | VariantType_blob - | VariantType_stream - | VariantType_storage - | VariantType_streamed_object - | VariantType_stored_object - | VariantType_blob_object - | VariantType_cf - | VariantType_clsid - | VariantType_void - | VariantType_bool - | VariantType_int8 - | VariantType_int16 - | VariantType_int32 - | VariantType_int64 - | VariantType_float32 - | VariantType_float64 - | VariantType_unsigned_int8 - | VariantType_unsigned_int16 - | VariantType_unsigned_int32 - | VariantType_unsigned_int64 - | VariantType_ptr - | VariantType_array of ILNativeVariantType - | VariantType_vector of ILNativeVariantType - | VariantType_byref of ILNativeVariantType - | VariantType_int - | VariantType_unsigned_int - - -/// Local variables -type Local = - { localType: ILType; - localPinned: bool } - member Type: ILType - member IsPinned: bool - -val typ_of_local: Local -> ILType - -/// IL method bodies -type ILMethodBody = - { ilZeroInit: bool; - /// strictly speakin should be a uint16 - ilMaxStack: int32; - ilNoInlining: bool; - ilLocals: Local list; - ilCode: ILCode; - ilSource: ILSourceMarker option } - -/// Member Access -type ILMemberAccess = - | MemAccess_assembly - | MemAccess_compilercontrolled - | MemAccess_famandassem - | MemAccess_famorassem - | MemAccess_family - | MemAccess_private - | MemAccess_public - -type ILAttributeElement = - /// Represents a custom attribute parameter of type 'string'. These may be null, in which case they are encoded in a special - /// way as indicated by Ecma-335 Partition II. - | CustomElem_string of string option - | CustomElem_bool of bool - | CustomElem_char of char - | CustomElem_int8 of sbyte - | CustomElem_int16 of int16 - | CustomElem_int32 of int32 - | CustomElem_int64 of int64 - | CustomElem_uint8 of byte - | CustomElem_uint16 of uint16 - | CustomElem_uint32 of uint32 - | CustomElem_uint64 of uint64 - | CustomElem_float32 of single - | CustomElem_float64 of double - | CustomElem_type of ILType - | CustomElem_tref of ILTypeRef - | CustomElem_array of ILAttributeElement list - -/// Named args: values and flags indicating if they are fields or properties -type ILAttributeNamedArg = (string * ILType * bool * ILAttributeElement) - -/// Custom attributes. See 'decode_il_attrib_data' for a helper to parse the byte[] -/// to ILAttributeElement's as best as possible. -type ILAttribute = - { customMethod: ILMethodSpec; - customData: byte[] } - member Data: byte[] - member Method: ILMethodSpec - -type ILAttributes - -val dest_custom_attrs: ILAttributes -> ILAttribute list - -/// Method parameters and return values - -type ILParameter = - { paramName: string option; - paramType: ILType; - paramDefault: ILFieldInit option; - /// Marshalling map for parameters. COM Interop only. - paramMarshal: ILNativeType option; - paramIn: bool; - paramOut: bool; - paramOptional: bool; - paramCustomAttrs: ILAttributes } - member Name: string option - member Type: ILType - member Default: ILFieldInit option - member Marshal: ILNativeType option - member IsIn: bool - member IsOut: bool - member IsOptional: bool - member CustomAttrs: ILAttributes; - -val typs_of_params : ILParameter list -> ILType list - -/// Method return values -type ILReturnValue = - { returnMarshal: ILNativeType option; - returnType: ILType; - returnCustomAttrs: ILAttributes } - member Type: ILType - member Marshal: ILNativeType option - member CustomAttrs: ILAttributes - -/// Security ILPermissions -/// -/// Attached to various structures... - -type ILSecurityAction = - | SecAction_request - | SecAction_demand - | SecAction_assert - | SecAction_deny - | SecAction_permitonly - | SecAction_linkcheck - | SecAction_inheritcheck - | SecAction_reqmin - | SecAction_reqopt - | SecAction_reqrefuse - | SecAction_prejitgrant - | SecAction_prejitdeny - | SecAction_noncasdemand - | SecAction_noncaslinkdemand - | SecAction_noncasinheritance - | SecAction_linkdemandchoice - | SecAction_inheritancedemandchoice - | SecAction_demandchoice - -type ILPermission = - | PermissionSet of ILSecurityAction * byte[] - -/// Abstract type equivalent to ILPermission list - use helpers -/// below to construct/destruct these -type ILPermissions - -val dest_security_decls: ILPermissions -> ILPermission list - -/// PInvoke attributes. -type PInvokeCallingConvention = - | PInvokeCallConvNone - | PInvokeCallConvCdecl - | PInvokeCallConvStdcall - | PInvokeCallConvThiscall - | PInvokeCallConvFastcall - | PInvokeCallConvWinapi - -type PInvokeCharEncoding = - | PInvokeEncodingNone - | PInvokeEncodingAnsi - | PInvokeEncodingUnicode - | PInvokeEncodingAuto - -type PInvokeCharBestFit = - | PInvokeBestFitUseAssem - | PInvokeBestFitEnabled - | PInvokeBestFitDisabled - -type PInvokeThrowOnUnmappableChar = - | PInvokeThrowOnUnmappableCharUseAssem - | PInvokeThrowOnUnmappableCharEnabled - | PInvokeThrowOnUnmappableCharDisabled - -type PInvokeMethod = - { pinvokeWhere: ILModuleRef; - pinvokeName: string; - pinvokeCallconv: PInvokeCallingConvention; - PInvokeCharEncoding: PInvokeCharEncoding; - pinvokeNoMangle: bool; - pinvokeLastErr: bool; - PInvokeThrowOnUnmappableChar: PInvokeThrowOnUnmappableChar; - PInvokeCharBestFit: PInvokeCharBestFit } - member Where: ILModuleRef - member Name: string - member CallingConv: PInvokeCallingConvention - member CharEncoding: PInvokeCharEncoding - member NoMangle: bool - member LastError: bool - member ThrowOnUnmappableChar: PInvokeThrowOnUnmappableChar - member CharBestFit: PInvokeCharBestFit - - -/// [OverridesSpec] - refer to a method declaration in a superclass -/// or superinterface. Used for overriding/method impls. Includes -/// a type for the parent for the same reason that a method specs -/// includes the type of the enclosing type, i.e. the type -/// gives the "ILGenericArgs" at which the parent type is being used. - -type OverridesSpec = - | OverridesSpec of ILMethodRef * ILType - member MethodRef: ILMethodRef - member EnclosingType: ILType - -type ILMethodVirtualInfo = - { virtFinal: bool; - virtNewslot: bool; - virtStrict: bool; (* mdCheckAccessOnOverride *) - virtAbstract: bool; } - member IsFinal: bool - member IsNewSlot: bool - member IsCheckAccessOnOverride: bool - member IsAbstract: bool - - -type MethodKind = - | MethodKind_static - | MethodKind_cctor - | MethodKind_ctor - | MethodKind_nonvirtual - | MethodKind_virtual of ILMethodVirtualInfo - -type MethodBody = - | MethodBody_il of ILMethodBody - | MethodBody_pinvoke of PInvokeMethod (* platform invoke to native *) - | MethodBody_abstract - | MethodBody_native - -type MethodCodeKind = - | MethodCodeKind_il - | MethodCodeKind_native - | MethodCodeKind_runtime - -type LazyMethodBody - -val dest_mbody : LazyMethodBody -> MethodBody - -/// Method definitions. -/// -/// There are several different flavours of methods (constructors, -/// abstract, virtual, static, instance, class constructors). There -/// is no perfect factorization of these as the combinations are not -/// independent. - -type ILMethodDef = - { mdName: string; - mdKind: MethodKind; - mdCallconv: ILCallingConv; - mdParams: ILParameter list; - mdReturn: ILReturnValue; - mdAccess: ILMemberAccess; - mdBody: LazyMethodBody; - mdCodeKind: MethodCodeKind; - mdInternalCall: bool; - mdManaged: bool; - mdForwardRef: bool; - mdSecurityDecls: ILPermissions; - /// Note: some methods are marked "HasSecurity" even if there are no permissions attached, e.g. if they use SuppressUnmanagedCodeSecurityAttribute - mdHasSecurity: bool; - mdEntrypoint:bool; - mdReqSecObj: bool; - mdHideBySig: bool; - mdSpecialName: bool; - /// The method is exported to unmanaged code using COM interop. - mdUnmanagedExport: bool; - mdSynchronized: bool; - mdPreserveSig: bool; - /// .NET 2.0 feature: SafeHandle finalizer must be run - mdMustRun: bool; - mdExport: (int32 * string option) option; - mdVtableEntry: (int32 * int32) option; - - mdGenericParams: ILGenericParameterDefs; - mdCustomAttrs: ILAttributes; } - - member Name: string; - //mdKind: MethodKind; - //Body: LazyMethodBody; - //CodeKind: MethodCodeKind; - member CallingConv: ILCallingConv; - member Parameters: ILParameter list; - member ParameterTypes: ILType list; - member Return: ILReturnValue; - member Access: ILMemberAccess; - member IsInternalCall: bool; - member IsManaged: bool; - member IsForwardRef: bool; - member SecurityDecls: ILPermissions; - /// Note: some methods are marked "HasSecurity" even if there are no permissions attached, e.g. if they use SuppressUnmanagedCodeSecurityAttribute - member HasSecurity: bool; - member IsEntrypoint:bool; - member IsReqSecObj: bool; - member IsHideBySig: bool; - /// The method is exported to unmanaged code using COM interop. - member IsUnmanagedExport: bool; - member IsSynchronized: bool; - member IsPreserveSig: bool; - /// Whidbey feature: SafeHandle finalizer must be run - member IsMustRun: bool; - //member Export: (int32 * string option) option; - //member VtableEntry: (int32 * int32) option; - member GenericParams: ILGenericParameterDefs; - member CustomAttrs: ILAttributes; - member IsIL : bool - member Code : ILCode option - member Locals : Local list - member IsNoInline : bool - member MaxStack : int32 - member IsZeroInit : bool - - /// .cctor methods. The predicates (IsClassInitializer,IsConstructor,IsStatic,IsNonVirtualInstance,IsVirtual) form a complete, non-overlapping classification of this type - member IsClassInitializer: bool - /// .ctor methods. The predicates (IsClassInitializer,IsConstructor,IsStatic,IsNonVirtualInstance,IsVirtual) form a complete, non-overlapping classification of this type - member IsConstructor: bool - /// static methods. The predicates (IsClassInitializer,IsConstructor,IsStatic,IsNonVirtualInstance,IsVirtual) form a complete, non-overlapping classification of this type - member IsStatic: bool - /// instance methods that are not virtual. The predicates (IsClassInitializer,IsConstructor,IsStatic,IsNonVirtualInstance,IsVirtual) form a complete, non-overlapping classification of this type - member IsNonVirtualInstance: bool - /// instance methods that are virtual or abstract or implement an interface slot. The predicates (IsClassInitializer,IsConstructor,IsStatic,IsNonVirtualInstance,IsVirtual) form a complete, non-overlapping classification of this type - member IsVirtual: bool - - member IsFinal: bool - member IsNewSlot: bool - member IsCheckAccessOnOverride : bool - member IsAbstract: bool - -val ilmbody_of_mdef: ILMethodDef -> ILMethodBody -val callsig_of_mdef: ILMethodDef -> ILCallingSignature - -/// Tables of methods. Logically equivalent to a list of methods but -/// the table is kept in a form optimized for looking up methods by -/// name and arity. - -/// abstract type equivalent to [ILMethodDef list] -type ILMethodDefs - -val dest_mdefs: ILMethodDefs -> ILMethodDef list -val find_mdefs_by_name: string -> ILMethodDefs -> ILMethodDef list -val find_mdefs_by_arity: string * int -> ILMethodDefs -> ILMethodDef list - -/// Field definitions -type ILFieldDef = - { fdName: string; - fdType: ILType; - fdStatic: bool; - fdAccess: ILMemberAccess; - fdData: byte[] option; - fdInit: ILFieldInit option; - fdOffset: int32 option; - fdSpecialName: bool; - fdMarshal: ILNativeType option; - fdNotSerialized: bool; - fdLiteral: bool ; - fdInitOnly: bool; - fdCustomAttrs: ILAttributes; } - member Name: string; - member Type: ILType; - member IsStatic: bool; - member Access: ILMemberAccess; - member Data: byte[] option; - member LiteralValue: ILFieldInit option; - /// The explicit offset in byte[] when explicit layout is used. - member Offset: int32 option; - member Marshal: ILNativeType option; - member NotSerialized: bool; - member IsLiteral: bool ; - member IsInitOnly: bool; - member CustomAttrs: ILAttributes; - -val typ_of_fdef : ILFieldDef -> ILType -val name_of_fdef: ILFieldDef -> string - -/// Tables of fields. Logically equivalent to a list of fields but -/// the table is kept in a form optimized for looking up fields by -/// name. -type ILFieldDefs - -val dest_fdefs: ILFieldDefs -> ILFieldDef list -val filter_fdefs: (ILFieldDef -> bool) -> ILFieldDefs -> ILFieldDefs -val find_fdefs: string -> ILFieldDefs -> ILFieldDef list - -/// Event definitions -type ILEventDef = - { eventType: ILType option; - eventName: string; - eventRTSpecialName: bool; - eventSpecialName: bool; - eventAddOn: ILMethodRef; - eventRemoveOn: ILMethodRef; - eventFire: ILMethodRef option; - eventOther: ILMethodRef list; - eventCustomAttrs: ILAttributes; } - member Type: ILType option; - member Name: string; - member AddMethod: ILMethodRef; - member RemoveMethod: ILMethodRef; - member FireMethod: ILMethodRef option; - member OtherMethods: ILMethodRef list; - member CustomAttrs: ILAttributes; - -/// Table of those events in a type definition. -type ILEventDefs - -val dest_edefs: ILEventDefs -> ILEventDef list -val filter_edefs: (ILEventDef -> bool) -> ILEventDefs -> ILEventDefs -val find_edefs: string -> ILEventDefs -> ILEventDef list - -/// Property definitions -type ILPropertyDef = - { propName: string; - propRTSpecialName: bool; - propSpecialName: bool; - propSet: ILMethodRef option; - propGet: ILMethodRef option; - propCallconv: ILThisConvention; - propType: ILType; - propInit: ILFieldInit option; - propArgs: ILType list; - propCustomAttrs: ILAttributes; } - member Name: string; - member SetMethod: ILMethodRef option; - member GetMethod: ILMethodRef option; - member CallingConv: ILThisConvention; - member Type: ILType; - member Init: ILFieldInit option; - member Args: ILType list; - member CustomAttrs: ILAttributes; - -/// Table of those properties in a type definition. -type PropertyDefs - -val dest_pdefs: PropertyDefs -> ILPropertyDef list -val filter_pdefs: (ILPropertyDef -> bool) -> PropertyDefs -> PropertyDefs -val find_pdefs: string -> PropertyDefs -> ILPropertyDef list - -/// Method Impls -/// -/// If there is an entry (pms --> ms) in this table, then method [ms] -/// is used to implement method [pms] for the purposes of this class -/// and its subclasses. -type ILMethodImplDef = - { mimplOverrides: OverridesSpec; - mimplOverrideBy: ILMethodSpec } - -type ILMethodImplDefs - -val dest_mimpls: ILMethodImplDefs -> ILMethodImplDef list - -/// Type Layout information -type ILTypeDefLayout = - | TypeLayout_auto - | TypeLayout_sequential of ILTypeDefLayoutInfo - | TypeLayout_explicit of ILTypeDefLayoutInfo - -and ILTypeDefLayoutInfo = - { typeSize: int32 option; - typePack: uint16 option } - member Size: int32 option - member Pack: uint16 option - -/// Type init semantics -type ILTypeDefInitSemantics = - | TypeInit_beforefield - | TypeInit_beforeany - -/// Default Unicode encoding for P/Invoke within a type -type ILDefaultPInvokeEncoding = - | TypeEncoding_ansi - | TypeEncoding_autochar - | TypeEncoding_unicode - -/// Type Access -type ILTypeDefAccess = - | TypeAccess_public - | TypeAccess_private - | TypeAccess_nested of ILMemberAccess - -/// A categorization of type definitions into "kinds" - -(*------------------------------------------------------------------- - * - * A note for the nit-picky.... In theory, the "kind" of a type - * definition can only be partially determined prior to binding. - * For example, you cannot really, absolutely tell if a type is - * really, absolutely a value type until you bind the - * super class and test it for type equality against System.ValueType. - * However, this is unbearably annoying, as it means you - * have to load "mscorlib" and perform bind operations - * in order to be able to determine some quite simple - * things. So we approximate by simply looking at the name - * of the superclass when loading. - * ------------------------------------------------------------------ *) - -type ILTypeDefKind = - | TypeDef_class - | TypeDef_valuetype - | TypeDef_interface - | TypeDef_enum - | TypeDef_delegate - (* FOR EXTENSIONS, e.g. MS-ILX *) - | TypeDef_other of IlxExtensionTypeKind - -(* ------------------------------------------------------------------ - * Type Names - * - * The name of a type stored in the tdName field is as follows: - * - For outer types it is, for example, System.String, i.e. - * the namespace followed by the type name. - * - For nested types, it is simply the type name. The namespace - * must be gleaned from the context in which the nested type - * lies. - * ------------------------------------------------------------------ *) - -type NamespaceAndTypename = string list * string - -val split_namespace: string -> string list - -val split_namespace_array: string -> string[] - -/// The [split_type_name] utility helps you split a string representing -/// a type name into the leading namespace elements (if any), the -/// names of any nested types and the type name itself. This function -/// memoizes and interns the splitting of the namespace portion of -/// the type name. -val split_type_name: string -> NamespaceAndTypename - -val split_type_name_array: string -> string[] * string - - -/// Type Definitions -/// -/// As for methods there are several important constraints not encoded -/// in the type definition below, for example that the super class of -/// an interface type is always None, or that enumerations always -/// have a very specific form. -type ILTypeDef = - { tdKind: ILTypeDefKind; - tdName: string; - tdGenericParams: ILGenericParameterDefs; - tdAccess: ILTypeDefAccess; - tdAbstract: bool; - tdSealed: bool; - tdSerializable: bool; - tdComInterop: bool; (* Class or interface generated for COM interop *) - tdLayout: ILTypeDefLayout; - tdSpecialName: bool; - tdEncoding: ILDefaultPInvokeEncoding; - tdNested: ILTypeDefs; - tdImplements: ILType list; - tdExtends: ILType option; - tdMethodDefs: ILMethodDefs; - tdSecurityDecls: ILPermissions; - tdHasSecurity: bool; (* Note: some classes are marked "HasSecurity" even if there are no permissions attached, e.g. if they use SuppressUnmanagedCodeSecurityAttribute *) - tdFieldDefs: ILFieldDefs; - tdMethodImpls: ILMethodImplDefs; - tdInitSemantics: ILTypeDefInitSemantics; - tdEvents: ILEventDefs; - tdProperties: PropertyDefs; - tdCustomAttrs: ILAttributes; } - member IsClass: bool; - member IsValueType: bool; - member IsInterface: bool; - member IsEnum: bool; - member IsDelegate: bool; - member Name: string; - member GenericParams: ILGenericParameterDefs; - member Access: ILTypeDefAccess; - member IsAbstract: bool; - member IsSealed: bool; - member IsSerializable: bool; - /// Class or interface generated for COM interop - member IsComInterop: bool; - member Layout: ILTypeDefLayout; - member IsSpecialName: bool; - member Encoding: ILDefaultPInvokeEncoding; - member NestedTypes: ILTypeDefs; - member Implements: ILType list; - member Extends: ILType option; - member SecurityDecls: ILPermissions; - /// Note: some classes are marked "HasSecurity" even if there are no permissions attached, e.g. if they use SuppressUnmanagedCodeSecurityAttribute - member HasSecurity: bool; - member Fields: ILFieldDefs; - member Methods: ILMethodDefs; - member MethodImpls: ILMethodImplDefs; - member Events: ILEventDefs; - member Properties: PropertyDefs; - member InitSemantics: ILTypeDefInitSemantics; - member CustomAttrs: ILAttributes; - -/// Tables of named type definitions. The types and table may contain on-demand -/// (lazy) computations, e.g. the actual reading of some aspects -/// of a type definition may be delayed if the reader being used supports -/// this. -/// -/// This is an abstract type equivalent to "ILTypeDef list" -and ILTypeDefs - -val is_value_or_enum_tdef: ILTypeDef -> bool - -/// Find the method definition corresponding to the given property or -/// event operation. These are always in the same class as the property -/// or event. This is useful especially if your code is not using the Ilbind -/// API to bind references. -val resolve_mref: ILTypeDef -> ILMethodRef -> ILMethodDef -val iter_tdefs: (ILTypeDef -> unit) -> ILTypeDefs -> unit -val dest_tdefs: ILTypeDefs -> ILTypeDef list - -/// Calls to [find_tdef] will result in any laziness in the overall -/// set of ILTypeDefs being read in in addition -/// to the details for the type found, but the remaining individual -/// type definitions will not be read. -val find_tdef: string -> ILTypeDefs -> ILTypeDef - -val dest_lazy_tdefs: ILTypeDefs -> (string list * string * ILAttributes * ILTypeDef Lazy.t) list - -val tname_for_toplevel: string -val is_toplevel_tname: string -> bool - -val ungenericize_tname: string -> string (* e.g. List`1 --> List *) - -/// "Classes Elsewhere" - classes in auxiliary modules. -/// -/// Manifests include declarations for all the classes in an -/// assembly, regardless of which module they are in. -/// -/// The ".class extern" construct describes so-called exported types -- -/// these are public classes defined in the auxiliary modules of this assembly, -/// i.e. modules other than the manifest-carrying module. -/// -/// For example, if you have a two-module -/// assembly (A.DLL and B.DLL), and the manifest resides in the A.DLL, -/// then in the manifest all the public classes declared in B.DLL should -/// be defined as exported types, i.e., as ".class extern". The public classes -/// defined in A.DLL should not be defined as ".class extern" -- they are -/// already available in the manifest-carrying module. The union of all -/// public classes defined in the manifest-carrying module and all -/// exported types defined there is the set of all classes exposed by -/// this assembly. Thus, by analysing the metadata of the manifest-carrying -/// module of an assembly, you can identify all the classes exposed by -/// this assembly, and where to find them. -/// -/// Nested classes found in external modules should also be located in -/// this table, suitably nested inside another "ILExportedType" -/// definition. - -/// these are only found in the "Nested" field of ILExportedType objects -type ILNestedExportedType = - { nestedExportedTypeName: string; - nestedExportedTypeAccess: ILMemberAccess; - nestedExportedTypeNested: ILNestedExportedTypes; - nestedExportedTypeCustomAttrs: ILAttributes } - -and ILNestedExportedTypes - -/// these are only found in the ILExportedTypes table in the manifest -type ILExportedType = - { exportedTypeScope: ILScopeRef; - /// [Namespace.]Name - exportedTypeName: string; - exportedTypeForwarder: bool; - exportedTypeAccess: ILTypeDefAccess; - exportedTypeNested: ILNestedExportedTypes; - exportedTypeCustomAttrs: ILAttributes } - member ScopeRef: ILScopeRef - member IsForwarder: bool - member Name: string - member Access: ILTypeDefAccess - member Nested: ILNestedExportedTypes - member CustomAttrs: ILAttributes - -type ILExportedTypes - -val dest_nested_exported_types: ILNestedExportedTypes -> ILNestedExportedType list -val dest_exported_types: ILExportedTypes -> ILExportedType list -val find_exported_type: string -> ILExportedTypes -> ILExportedType - -type ILResourceAccess = - | Resource_public - | Resource_private - -type ILResourceLocation = - | Resource_local of (unit -> byte[]) (* resources may be re-read each time this function is called *) - | Resource_file of ILModuleRef * int32 - | Resource_assembly of ILAssemblyRef - -/// "Manifest ILResources" are chunks of resource data, being one of: -/// - the data section of the current module (byte[] of resource given directly) -/// - in an external file in this assembly (offset given in the ILResourceLocation field) -/// - as a resources in another assembly of the same name. -type ILResource = - { resourceName: string; - resourceWhere: ILResourceLocation; - resourceAccess: ILResourceAccess; - resourceCustomAttrs: ILAttributes } - member Name: string - member Location: ILResourceLocation - member Access: ILResourceAccess - member CustomAttrs: ILAttributes - -/// Table of resources in a module -type ILResources - -val dest_resources: ILResources -> ILResource list - - -type ILAssemblyLongevity = - | LongevityUnspecified - | LongevityLibrary - | LongevityPlatformAppDomain - | LongevityPlatformProcess - | LongevityPlatformSystem - -/// The main module of an assembly is a module plus some manifest information. -type ILAssemblyManifest = - { manifestName: string; - manifestAuxModuleHashAlgorithm: int32; - manifestSecurityDecls: ILPermissions; - manifestPublicKey: byte[] option; - manifestVersion: ILVersionInfo option; - manifestLocale: Locale option; - manifestCustomAttrs: ILAttributes; - manifestLongevity: ILAssemblyLongevity; - manifestDisableJitOptimizations: bool; - manifestJitTracking: bool; - manifestRetargetable: bool; - manifestExportedTypes: ILExportedTypes; - manifestEntrypointElsewhere: ILModuleRef option; - } - member Name: string; - - /// This is ID of the algorithm used for the hashes of auxiliary - /// files in the assembly. These hashes are stored in the - /// ILModuleRef.Hash fields of this assembly. These are not cryptographic - /// hashes: they are simple file hashes. The algorithm is normally - /// 0x00008004 indicating the SHA1 hash algorithm. - member AuxModuleHashAlgorithm: int32; - - member SecurityDecls: ILPermissions; - - /// This is the public key used to sign this - /// assembly (the signature itself is stored elsewhere: see the - /// binary format, and may not have been written if delay signing - /// is used). (member Name, member PublicKey) forms the full - /// public name of the assembly. - member PublicKey: byte[] option; - - member Version: ILVersionInfo option; - member Locale: Locale option; - member CustomAttrs: ILAttributes; - member AssemblyLongevity: ILAssemblyLongevity; - member DisableJitOptimizations: bool; - member JitTracking: bool; - member Retargetable: bool; - - /// Records the types impemented by this asssembly in auxiliary - /// modules. - member ExportedTypes: ILExportedTypes; - - /// Records whether the entrypoint resides in another module. - member EntrypointElsewhere: ILModuleRef option; - -/// One module in the "current" assembly, either a main-module or -/// an auxiliary module. The main module will have a manifest. -/// -/// An assembly is built by joining together a "main" module plus -/// several auxiliary modules. -type ILModuleDef = - { modulManifest: ILAssemblyManifest option; - modulCustomAttrs: ILAttributes; - modulName: string; - modulTypeDefs: ILTypeDefs; - modulSubSystem: int32; - modulDLL: bool; - modulILonly: bool; - modulPlatform: ILPlatform option; - modul32bit: bool; - modul64bit: bool; - modulVirtAlignment: int32; - modulPhysAlignment: int32; - modulImageBase: int32; - modulResources: ILResources; - modulNativeResources: byte[] Lazy.t list; (* e.g. win86 resources, as the exact contents of a .res or .obj file *) -(* modulFixups: fixups; *) } - member Manifest: ILAssemblyManifest option; - member ManifestOfAssembly: ILAssemblyManifest - member CustomAttrs: ILAttributes; - member Name: string; - member TypeDefs: ILTypeDefs; - member SubSystemFlags: int32; - member IsDLL: bool; - member IsILOnly: bool; - member Platform: ILPlatform option; - member Is32Bit: bool; - member Is64Bit: bool; - member VirtualAlignment: int32; - member PhysicalAlignment: int32; - member ImageBase: int32; - member Resources: ILResources; - member NativeResources: byte[] Lazy.t list - -val module_is_mainmod: ILModuleDef -> bool -val assname_of_mainmod: ILModuleDef -> string - -// ==================================================================== -// PART 2 -// -// Making metadata. Where no explicit constructor -// is given, you should create the concrete datatype directly, -// e.g. by filling in all appropriate record fields. -// ==================================================================== *) - -/// A table of common references to items in mscorlib. Version-neutral references -/// can be generated using ecmaILGlobals. If you have already loaded a particular -/// version of mscorlib you should reference items via an ILGlobals for that particular -/// version of mscorlib built using mk_ILGlobals. -[] -type ILGlobals = - { mscorlib_scoref: ILScopeRef; - mscorlibAssemblyName: string; - tref_Object: ILTypeRef - ; tspec_Object: ILTypeSpec - ; typ_Object: ILType - ; tref_String: ILTypeRef - ; typ_String: ILType - ; typ_StringBuilder: ILType - ; typ_AsyncCallback: ILType - ; typ_IAsyncResult: ILType - ; typ_IComparable: ILType - ; tref_Type: ILTypeRef - ; typ_Type: ILType - ; tref_Missing: ILTypeRef - ; typ_Missing: ILType - ; typ_Activator: ILType - ; typ_Delegate: ILType - ; typ_ValueType: ILType - ; typ_Enum: ILType - ; tspec_TypedReference: ILTypeSpec - ; typ_TypedReference: ILType - ; typ_MulticastDelegate: ILType - ; typ_Array: ILType - ; tspec_Int64: ILTypeSpec - ; tspec_UInt64: ILTypeSpec - ; tspec_Int32: ILTypeSpec - ; tspec_UInt32: ILTypeSpec - ; tspec_Int16: ILTypeSpec - ; tspec_UInt16: ILTypeSpec - ; tspec_SByte: ILTypeSpec - ; tspec_Byte: ILTypeSpec - ; tspec_Single: ILTypeSpec - ; tspec_Double: ILTypeSpec - ; tspec_IntPtr: ILTypeSpec - ; tspec_UIntPtr: ILTypeSpec - ; tspec_Char: ILTypeSpec - ; tspec_Bool: ILTypeSpec - ; typ_int8: ILType - ; typ_int16: ILType - ; typ_int32: ILType - ; typ_int64: ILType - ; typ_uint8: ILType - ; typ_uint16: ILType - ; typ_uint32: ILType - ; typ_uint64: ILType - ; typ_float32: ILType - ; typ_float64: ILType - ; typ_bool: ILType - ; typ_char: ILType - ; typ_IntPtr: ILType - ; typ_UIntPtr: ILType - ; typ_RuntimeArgumentHandle: ILType - ; typ_RuntimeTypeHandle: ILType - ; typ_RuntimeMethodHandle: ILType - ; typ_RuntimeFieldHandle: ILType - ; typ_Byte: ILType - ; typ_Int16: ILType - ; typ_Int32: ILType - ; typ_Int64: ILType - ; typ_SByte: ILType - ; typ_UInt16: ILType - ; typ_UInt32: ILType - ; typ_UInt64: ILType - ; typ_Single: ILType - ; typ_Double: ILType - ; typ_Bool: ILType - ; typ_Char: ILType - ; typ_SerializationInfo: ILType - ; typ_StreamingContext: ILType - ; tref_SecurityPermissionAttribute : ILTypeRef - ; tspec_Exception: ILTypeSpec - ; typ_Exception: ILType } - -/// Build the table of commonly used references given a ILScopeRef for mscorlib. -val mk_ILGlobals : ILScopeRef -> string option -> ILGlobals - - -/// When writing a binary the fake "toplevel" type definition (called ) -/// must come first. [dest_tdefs_with_toplevel_first] puts it first, and -/// creates it in the returned list as an empty typedef if it -/// doesn't already exist. -val dest_tdefs_with_toplevel_first: ILGlobals -> ILTypeDefs -> ILTypeDef list - -/// Note: not all custom attribute data can be decoded without binding types. In particular -/// enums must be bound in order to discover the size of the underlying integer. -/// The following assumes enums have size int32. -/// It also does not completely decode System.Type attributes -val decode_il_attrib_data: - ILGlobals -> - ILAttribute -> - ILAttributeElement list * (* fixed args *) - ILAttributeNamedArg list (* named args: values and flags indicating if they are fields or properties *) - -/// Generate simple references to assemblies and modules -val mk_simple_assref: string -> ILAssemblyRef -val mk_simple_modref: string -> ILModuleRef -val scoref_for_modname: string -> ILScopeRef - -val mk_empty_gactuals: ILGenericArgs -val mk_tyvar_ty: uint16 -> ILType - -/// Make type refs -val mk_nested_tref: ILScopeRef * string list * string -> ILTypeRef -val mk_tref: ILScopeRef * string -> ILTypeRef -val mk_tref_in_tref: ILTypeRef * string -> ILTypeRef - -/// Make type specs -val mk_nongeneric_tspec: ILTypeRef -> ILTypeSpec -val mk_tspec: ILTypeRef * ILGenericArgs -> ILTypeSpec - -/// Make types -val mk_typ: ILBoxity -> ILTypeSpec -> ILType -val mk_named_typ: ILBoxity -> ILTypeRef -> ILGenericArgs -> ILType -val mk_boxed_typ: ILTypeRef -> ILGenericArgs -> ILType -val mk_value_typ: ILTypeRef -> ILGenericArgs -> ILType -val mk_nongeneric_boxed_typ: ILTypeRef -> ILType -val mk_nongeneric_value_typ: ILTypeRef -> ILType -val mk_array_ty: ILType * ILArrayShape -> ILType -val mk_sdarray_ty: ILType -> ILType - -/// Make method references and specs -val mk_mref: ILTypeRef * ILCallingConv * string * int * ILType list * ILType -> ILMethodRef -val mk_mspec: ILMethodRef * ILBoxity * ILGenericArgs * ILGenericArgs -> ILMethodSpec -val mk_mref_mspec_in_typ: ILMethodRef * ILType * ILGenericArgs -> ILMethodSpec -val mk_mspec_in_typ: ILType * ILCallingConv * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec - -/// Construct references to methods on a given type -val mk_nongeneric_mspec_in_typ: ILType * ILCallingConv * string * ILType list * ILType -> ILMethodSpec - -/// Construct references to methods given a ILTypeSpec -val mk_mspec_in_tspec: ILTypeSpec * ILBoxity * ILCallingConv * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec -val mk_nongeneric_mspec_in_tspec: ILTypeSpec * ILBoxity * ILCallingConv * string * ILType list * ILType -> ILMethodSpec - -/// Construct references to instance methods -val mk_instance_mspec_in_tref: ILTypeRef * ILBoxity * string * ILType list * ILType * ILGenericArgs * ILGenericArgs -> ILMethodSpec -val mk_instance_mspec_in_tspec: ILTypeSpec * ILBoxity * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec -val mk_instance_mspec_in_typ: ILType * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec -val mk_instance_mspec_in_boxed_tspec: ILTypeSpec * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec -val mk_instance_mspec_in_nongeneric_boxed_tref: ILTypeRef * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec - -/// Construct references to non-generic methods -val mk_nongeneric_mspec_in_tref: ILTypeRef * ILBoxity * ILCallingConv * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec -val mk_nongeneric_mspec_in_nongeneric_tref: ILTypeRef * ILBoxity * ILCallingConv * string * ILType list * ILType -> ILMethodSpec - -/// Construct references to non-generic instance methods -val mk_nongeneric_instance_mspec_in_tref: ILTypeRef * ILBoxity * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec -val mk_nongeneric_instance_mspec_in_tspec: ILTypeSpec * ILBoxity * string * ILType list * ILType -> ILMethodSpec -val mk_nongeneric_instance_mspec_in_typ: ILType * string * ILType list * ILType -> ILMethodSpec -val mk_nongeneric_instance_mspec_in_boxed_tspec: ILTypeSpec * string * ILType list * ILType -> ILMethodSpec -val mk_nongeneric_instance_mspec_in_nongeneric_boxed_tref: ILTypeRef * string * ILType list * ILType -> ILMethodSpec - -/// Construct references to static methods -val mk_static_mspec_in_nongeneric_boxed_tref: ILTypeRef * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec -val mk_static_mspec_in_boxed_tspec: ILTypeSpec * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec -val mk_static_mspec_in_typ: ILType * string * ILType list * ILType * ILGenericArgs -> ILMethodSpec - -/// Construct references to static, non-generic methods -val mk_static_nongeneric_mspec_in_nongeneric_boxed_tref: ILTypeRef * string * ILType list * ILType -> ILMethodSpec -val mk_static_nongeneric_mspec_in_boxed_tspec: ILTypeSpec * string * ILType list * ILType -> ILMethodSpec -val mk_static_nongeneric_mspec_in_typ: ILType * string * ILType list * ILType -> ILMethodSpec - -/// Construct references to toplevel methods in modules. Usually compiler generated. -val mk_toplevel_static_mspec: ILScopeRef -> string * ILType list * ILType * ILGenericArgs -> ILMethodSpec -val mk_toplevel_static_nongeneric_mspec: ILScopeRef -> string * ILType list * ILType -> ILMethodSpec - -/// Construct references to constructors -val mk_ctor_mspec: ILTypeRef * ILBoxity * ILType list * ILGenericArgs -> ILMethodSpec -val mk_nongeneric_ctor_mspec: ILTypeRef * ILBoxity * ILType list -> ILMethodSpec -val mk_ctor_mspec_for_boxed_tspec: ILTypeSpec * ILType list -> ILMethodSpec -val mk_ctor_mspec_for_typ: ILType * ILType list -> ILMethodSpec -val mk_ctor_mspec_for_nongeneric_boxed_tref: ILTypeRef * ILType list -> ILMethodSpec - -/// Construct references to fields -val mk_fref_in_tref: ILTypeRef * string * ILType -> ILFieldRef -val mk_fspec: ILFieldRef * ILType -> ILFieldSpec -val mk_fspec_in_typ: ILType * string * ILType -> ILFieldSpec -val mk_fspec_in_tspec: ILTypeSpec * ILBoxity * string * ILType -> ILFieldSpec -val mk_fspec_in_boxed_tspec: ILTypeSpec * string * ILType -> ILFieldSpec -val mk_fspec_in_nongeneric_boxed_tref: ILTypeRef * string * ILType -> ILFieldSpec - -val mk_callsig: ILCallingConv * ILType list * ILType -> ILCallingSignature - -/// Make generalized verions of possibly-generic types, -/// e.g. Given the ILTypeDef for List, return the type "List". - -val generalize_tref: ILTypeRef -> ILGenericParameterDef list -> ILTypeSpec - -val gparam_of_gactual: ILType -> ILGenericParameterDef -val gparams_of_inst: ILGenericArgs -> ILGenericParameterDefs -val generalize_gparams: ILGenericParameterDefs -> ILGenericArgs - -/// Make custom attributes -val mk_custom_attribute_mref: - ILGlobals - -> ILMethodSpec - * ILAttributeElement list (* fixed args: values and implicit types *) - * ILAttributeNamedArg list (* named args: values and flags indicating if they are fields or properties *) - -> ILAttribute - -val mk_custom_attribute: - ILGlobals - -> ILTypeRef * ILType list * - ILAttributeElement list (* fixed args: values and implicit types *) * - ILAttributeNamedArg list (* named args: values and flags indicating if they are fields or properties *) - -> ILAttribute - -val mk_permission_set : ILGlobals -> ILSecurityAction * (ILTypeRef * (string * ILType * ILAttributeElement) list) list -> ILPermission - -/// Making code. -val check_code: ILCode -> ILCode -val generate_code_label: unit -> ILCodeLabel -val string_of_code_label : ILCodeLabel -> string - -/// Make some code that is a straight line sequence of instructions. -/// The function will add a "return" if the last instruction is not an exiting instruction -val nonbranching_instrs_to_code: ILInstr list -> ILCode - -/// Make some code that is a straight line sequence of instructions, then do -/// some control flow. The first code label is the entry label of the generated code. -val nonbranching_instrs_then: ILCodeLabel -> ILInstr list -> ILInstr -> ILCode -val nonbranching_instrs_then_br: ILCodeLabel -> ILInstr list -> ILCodeLabel -> ILCode - -/// Make a basic block. The final instruction must be control flow -val nonbranching_instrs: ILCodeLabel -> ILInstr list -> ILCode - -/// Some more primitive helpers -val mk_bblock: ILBasicBlock -> ILCode -val mk_group_block: ILCodeLabel list * ILCode list -> ILCode - -/// Helpers for codegen: scopes for allocating new temporary variables. -type tmps -val alloc_tmp: tmps -> Local -> uint16 -val new_tmps : int -> tmps -val get_tmps : tmps -> Local list - -/// Derived functions for making some common patterns of instructions -val mk_normal_call: ILMethodSpec -> ILInstr -val mk_normal_callvirt: ILMethodSpec -> ILInstr -val mk_normal_callconstraint: ILType * ILMethodSpec -> ILInstr -val mk_normal_newobj: ILMethodSpec -> ILInstr -val mk_nongeneric_call_superclass_constructor: ILType list * ILTypeRef -> ILInstr list -val mk_call_superclass_constructor : ILType list * ILTypeSpec -> ILInstr list -val mk_normal_stfld: ILFieldSpec -> ILInstr -val mk_normal_stsfld: ILFieldSpec -> ILInstr -val mk_normal_ldsfld: ILFieldSpec -> ILInstr -val mk_normal_ldfld: ILFieldSpec -> ILInstr -val mk_normal_ldflda: ILFieldSpec -> ILInstr -val mk_normal_stind: ILBasicType -> ILInstr -val mk_normal_ldind: ILBasicType -> ILInstr -val mk_normal_cpind: ILBasicType -> ILInstr list -val mk_normal_ldobj: ILType -> ILInstr -val mk_normal_stobj: ILType -> ILInstr -val mk_ldc_i32: int32 -> ILInstr -val ldarg_0: ILInstr - -val and_tailness: Tailcall -> bool -> Tailcall - -/// Derived functions for making return, parameter and local variable -/// objects for use in method definitions. -val mk_param: string option * ILType -> ILParameter -val mk_unnamed_param: ILType -> ILParameter -val mk_named_param: string * ILType -> ILParameter -val mk_return: ILType -> ILReturnValue -val mk_local: ILType -> Local - -/// Make a formal generic parameters -val mk_empty_gparams: ILGenericParameterDefs - -/// Make method definitions -val mk_ilmbody: initlocals:bool * Local list * int * ILCode * ILSourceMarker option -> ILMethodBody -val mk_impl: bool * Local list * int * ILCode * ILSourceMarker option -> MethodBody - -val mk_ctor: ILMemberAccess * ILParameter list * MethodBody -> ILMethodDef -val mk_nongeneric_nothing_ctor: ILSourceMarker option -> ILTypeRef -> ILParameter list -> ILMethodDef -val mk_static_mdef: ILGenericParameterDefs * string * ILMemberAccess * ILParameter list * ILReturnValue * MethodBody -> ILMethodDef -val mk_static_nongeneric_mdef: string * ILMemberAccess * ILParameter list * ILReturnValue * MethodBody -> ILMethodDef -val mk_cctor: MethodBody -> ILMethodDef -val mk_generic_virtual_mdef: string * ILMemberAccess * ILGenericParameterDefs * ILParameter list * ILReturnValue * MethodBody -> ILMethodDef -val mk_generic_instance_mdef: string * ILMemberAccess * ILGenericParameterDefs * ILParameter list * ILReturnValue * MethodBody -> ILMethodDef -val mk_virtual_mdef: string * ILMemberAccess * ILParameter list * ILReturnValue * MethodBody -> ILMethodDef -val mk_instance_mdef: string * ILMemberAccess * ILParameter list * ILReturnValue * MethodBody -> ILMethodDef - - -/// Make field definitions -val mk_instance_fdef: string * ILType * ILFieldInit option * ILMemberAccess -> ILFieldDef -val mk_static_fdef: string * ILType * ILFieldInit option * byte[] option * ILMemberAccess -> ILFieldDef - -/// Make a type definition -val mk_generic_class: string * ILTypeDefAccess * ILGenericParameterDefs * ILType * ILType list * ILMethodDefs * ILFieldDefs * PropertyDefs * ILEventDefs * ILAttributes -> ILTypeDef -val mk_simple_tdef: ILGlobals -> string * ILTypeDefAccess * ILMethodDefs * ILFieldDefs * PropertyDefs * ILEventDefs * ILAttributes -> ILTypeDef -val mk_toplevel_tdef: ILGlobals -> ILMethodDefs * ILFieldDefs -> ILTypeDef - -/// Make a type definition for a value type used to point to raw data. -/// These are useful when generating array initialization code -/// according to the -/// ldtoken field valuetype ''/'$$struct0x6000127-1' ''::'$$method0x6000127-1' -/// call void System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class System.Array,valuetype System.RuntimeFieldHandle) -/// idiom. -val mk_rawdata_vtdef: ILGlobals -> string * size:int32 * pack:uint16 -> ILTypeDef - -/// Injecting code into existing code blocks. A branch will -/// be added from the given instructions to the (unique) entry of -/// the code, and the first instruction will be the new entry -/// of the method. The instructions should be non-branching. - -val prepend_instrs_to_code: ILInstr list -> ILCode -> ILCode -val prepend_instrs_to_mdef: ILInstr list -> ILMethodDef -> ILMethodDef - -/// Injecting initialization code into a class. -/// Add some code to the end of the .cctor for a type. Create a .cctor -/// if one doesn't exist already. -val prepend_instrs_to_cctor: ILInstr list -> ILSourceMarker option -> ILTypeDef -> ILTypeDef - -/// Derived functions for making some simple constructors -val mk_storage_ctor: ILSourceMarker option * ILInstr list * ILTypeSpec * (string * ILType) list * ILMemberAccess -> ILMethodDef -val mk_simple_storage_ctor: ILSourceMarker option * ILTypeSpec option * ILTypeSpec * (string * ILType) list * ILMemberAccess -> ILMethodDef -val mk_simple_storage_ctor_with_param_names: ILSourceMarker option * ILTypeSpec option * ILTypeSpec * (string * string * ILType) list * ILMemberAccess -> ILMethodDef - -val mk_delegate_mdefs: ILGlobals -> ILParameter list * ILReturnValue -> ILMethodDef list - -/// Given a delegate type definition which lies in a particular scope, -/// make a reference to its constructor -val mk_ctor_mspec_for_delegate: ILGlobals -> ILTypeRef * ILGenericArgs * bool -> ILMethodSpec - -/// The toplevel "class" for a module or assembly. -val typ_for_toplevel: ILScopeRef -> ILType - -/// Making tables of custom attributes, etc. -val mk_custom_attrs: ILAttribute list -> ILAttributes -val mk_computed_custom_attrs: (unit -> ILAttribute list) -> ILAttributes - -val mk_security_decls: ILPermission list -> ILPermissions -val mk_lazy_security_decls: (ILPermission list) Lazy.t -> ILPermissions - -val mk_mbody : MethodBody -> LazyMethodBody -val mk_lazy_mbody : MethodBody Lazy.t -> LazyMethodBody - -val mk_events: ILEventDef list -> ILEventDefs -val mk_lazy_events: (ILEventDef list) Lazy.t -> ILEventDefs - -val mk_properties: ILPropertyDef list -> PropertyDefs -val mk_lazy_properties: (ILPropertyDef list) Lazy.t -> PropertyDefs - -val mk_mdefs: ILMethodDef list -> ILMethodDefs -val mk_lazy_mdefs: (ILMethodDef list) Lazy.t -> ILMethodDefs -val add_mdef: ILMethodDef -> ILMethodDefs -> ILMethodDefs - -val mk_fdefs: ILFieldDef list -> ILFieldDefs -val mk_lazy_fdefs: (ILFieldDef list) Lazy.t -> ILFieldDefs - -val mk_mimpls: ILMethodImplDef list -> ILMethodImplDefs -val mk_lazy_mimpls: (ILMethodImplDef list) Lazy.t -> ILMethodImplDefs - -val mk_tdefs: ILTypeDef list -> ILTypeDefs - -/// Create table of types which is loaded/computed on-demand, and whose individual -/// elements are also loaded/computed on-demand. Any call to [dest_tdefs] will -/// result in the laziness being forced. Operations can examine the -/// custom attributes and name of each type in order to decide whether -/// to proceed with examining the other details of the type. -/// -/// Note that individual type definitions may contain further delays -/// in their method, field and other tables. -val mk_lazy_tdefs: ((string list * string * ILAttributes * ILTypeDef Lazy.t) list) Lazy.t -> ILTypeDefs -val add_tdef: ILTypeDef -> ILTypeDefs -> ILTypeDefs - -val mk_nested_exported_types: ILNestedExportedType list -> ILNestedExportedTypes -val mk_lazy_nested_exported_types: (ILNestedExportedType list) Lazy.t -> ILNestedExportedTypes - -val mk_exported_types: ILExportedType list -> ILExportedTypes -val mk_lazy_exported_types: (ILExportedType list) Lazy.t -> ILExportedTypes - -val mk_resources: ILResource list -> ILResources -val mk_lazy_resources: (ILResource list) Lazy.t -> ILResources - -/// Making modules -val mk_simple_mainmod: assemblyName:string -> moduleName:string -> dll:bool -> ILTypeDefs -> int32 option -> Locale option -> int -> ILModuleDef - -/// Default values for some of the strange flags in a module. -val default_modulSubSystem: int32 -val default_modulVirtAlignment: int32 -val default_modulPhysAlignment: int32 -val default_modulImageBase: int32 - -/// Generate references to existing type definitions, method definitions -/// etc. Useful for generating references, e.g. to a class we're processing -/// Also used to reference type definitions that we've generated. [ILScopeRef] -/// is normally ScopeRef_local, unless we've generated the ILTypeDef in -/// an auxiliary module or are generating multiple assemblies at -/// once. - -val tref_for_nested_tdef : ILScopeRef -> ILTypeDef list * ILTypeDef -> ILTypeRef -val tspec_for_nested_tdef: ILScopeRef -> ILTypeDef list * ILTypeDef -> ILTypeSpec -val mref_for_mdef : ILScopeRef -> ILTypeDef list * ILTypeDef -> ILMethodDef -> ILMethodRef -val fref_for_fdef : ILScopeRef -> ILTypeDef list * ILTypeDef -> ILFieldDef -> ILFieldRef - -val mk_mref_to_mdef: ILTypeRef * ILMethodDef -> ILMethodRef -val mk_fref_to_fdef: ILTypeRef * ILFieldDef -> ILFieldRef - -val assref_for_manifest: ILAssemblyManifest -> ILAssemblyRef -val assref_for_mainmod: ILModuleDef -> ILAssemblyRef -val modref_for_modul: ILModuleDef -> ILModuleRef - - -// -------------------------------------------------------------------- -// Rescoping. -// -// Given an object O1 referenced from where1 (e.g. O1 binds to some -// result R when referenced from where1), and given that SR2 resolves to where1 from where2, -// produce a new O2 for use from where2 (e.g. O2 binds to R from where2) -// -// So, ILScopeRef tells you how to reference the original scope from -// the new scope. e.g. if ILScopeRef is: -// [ScopeRef_local] then the object is returned unchanged -// [ScopeRef_module m] then an object is returned -// where all ScopeRef_local references -// become ScopeRef_module m -// [ScopeRef_assembly m] then an object is returned -// where all ScopeRef_local and ScopeRef_module references -// become ScopeRef_assembly m -// -------------------------------------------------------------------- - -/// Rescoping. The first argument tells the function how to reference the original scope from -/// the new scope. -val rescope_scoref: ILScopeRef -> ILScopeRef -> ILScopeRef -/// Rescoping. The first argument tells the function how to reference the original scope from -/// the new scope. -val rescope_tspec: ILScopeRef -> ILTypeSpec -> ILTypeSpec -/// Rescoping. The first argument tells the function how to reference the original scope from -/// the new scope. -val rescope_typ: ILScopeRef -> ILType -> ILType -/// Rescoping. The first argument tells the function how to reference the original scope from -/// the new scope. -val rescope_mspec: ILScopeRef -> ILMethodSpec -> ILMethodSpec -/// Rescoping. The first argument tells the function how to reference the original scope from -/// the new scope. -val rescope_ospec: ILScopeRef -> OverridesSpec -> OverridesSpec -/// Rescoping. The first argument tells the function how to reference the original scope from -/// the new scope. -val rescope_mref: ILScopeRef -> ILMethodRef -> ILMethodRef -/// Rescoping. The first argument tells the function how to reference the original scope from -/// the new scope. -val rescope_fref: ILScopeRef -> ILFieldRef -> ILFieldRef -/// Rescoping. The first argument tells the function how to reference the original scope from -/// the new scope. -val rescope_fspec: ILScopeRef -> ILFieldSpec -> ILFieldSpec - - -//----------------------------------------------------------------------- -// The ILCode Builder utility. -//---------------------------------------------------------------------- - -type ExceptionClause = - | SEH_finally of (ILCodeLabel * ILCodeLabel) - | SEH_fault of (ILCodeLabel * ILCodeLabel) - | SEH_filter_catch of (ILCodeLabel * ILCodeLabel) * (ILCodeLabel * ILCodeLabel) - | SEH_type_catch of ILType * (ILCodeLabel * ILCodeLabel) - -type ILExceptionSpec = - { exnRange: (ILCodeLabel * ILCodeLabel); - exnClauses: ExceptionClause list } - -type ILLocalSpec = - { locRange: (ILCodeLabel * ILCodeLabel); - locInfos: ILDebugMapping list } - -/// build_code: Build code from a sequence of instructions. -/// -/// e.g. "build_code meth resolver instrs exns locals" -/// -/// This makes the basic block structure of code from more primitive -/// information, i.e. an array of instructions. -/// [meth]: for debugging and should give the name of the method. -/// [resolver]: should return the instruction indexes referred to -/// by code-label strings in the instruction stream. -/// [instrs]: the instructions themselves, perhaps with attributes giving -/// debugging information -/// [exns]: the table of exception-handling specifications -/// for the method. These are again given with respect to labels which will -/// be mapped to pc's by [resolver]. -/// [locals]: the table of specifications of when local variables are live and -/// should appear in the debug info. -/// -/// If the input code is well-formed, the function will returns the -/// chop up the instruction sequence into basic blocks as required for -/// the exception handlers and then return the tree-structured code -/// corresponding to the instruction stream. -/// A new set of code labels will be used throughout the resulting code. -/// -/// The input can be badly formed in many ways: exception handlers might -/// overlap, or scopes of local variables may overlap badly with -/// exception handlers. -val build_code: - string -> - (ILCodeLabel -> int) -> - ILInstr array -> - ILExceptionSpec list -> - ILLocalSpec list -> - ILCode - -// -------------------------------------------------------------------- -// The instantiation utilities. -// -------------------------------------------------------------------- - -/// Instantiate type variables that occur within types and other items. -val inst_typ_aux: int -> ILGenericArgs -> ILType -> ILType - -/// Instantiate type variables that occur within types and other items. -val inst_typ: ILGenericArgs -> ILType -> ILType - -/// Instantiate type variables that occur within types and other items. -val inst_inst: ILGenericArgs -> ILGenericArgs -> ILGenericArgs - -/// Instantiate type variables that occur within types and other items. -val inst_tspec: ILGenericArgs -> ILTypeSpec -> ILTypeSpec - -/// Instantiate type variables that occur within types and other items. -val inst_callsig: ILGenericArgs -> ILCallingSignature -> ILCallingSignature - -/// Instantiate type variables that occur within types and other items. -val inst_read: ILGenericArgs -> uint16 -> ILType - -/// Instantiate type variables that occur within types and other items. -val inst_add: ILGenericArgs -> ILGenericArgs -> ILGenericArgs - -/// Names of some commonly used things in mscorlib... -val mscorlib_module_name: string - -/// This is a 'vendor neutral' way of referencing mscorlib. -val ecma_public_token: PublicKey -/// This is a 'vendor neutral' way of referencing mscorlib. -val ecma_mscorlib_scoref: ILScopeRef -/// This is a 'vendor neutral' collection of references to items in mscorlib. -val ecmaILGlobals: ILGlobals - - -/// Some commonly used methods -val mspec_RuntimeHelpers_InitializeArray: ILGlobals -> ILMethodSpec -val mspec_RunClassConstructor: ILGlobals -> ILMethodSpec -val mspec_StringBuilder_string: ILGlobals -> ILMethodSpec -val mk_RunClassConstructor: ILGlobals -> ILTypeSpec -> ILInstr list - -val mk_mscorlib_exn_newobj: ILGlobals -> string -> ILInstr - -/// Some commonly used custom attibutes -val mk_DebuggableAttribute: ILGlobals -> bool (* debug tracking *) * bool (* disable JIT optimizations *) -> ILAttribute -val mk_DebuggableAttribute_v2: ILGlobals -> bool (* jitTracking *) * bool (* ignoreSymbolStoreSequencePoints *) * bool (* disable JIT optimizations *) * bool (* enable EnC *) -> ILAttribute - -val mk_CompilerGeneratedAttribute : ILGlobals -> ILAttribute -val mk_DebuggerNonUserCodeAttribute : ILGlobals -> ILAttribute -val mk_DebuggerHiddenAttribute : ILGlobals -> ILAttribute -val mk_DebuggerDisplayAttribute : ILGlobals -> string -> ILAttribute -val mk_DebuggerTypeProxyAttribute : ILGlobals -> ILType -> ILAttribute -val mk_DebuggerBrowsableNeverAttribute : ILGlobals -> ILAttribute -val mk_DebuggerBrowsableRootHiddenAttribute: ILGlobals -> ILAttribute -val mk_DebuggerBrowsableCollapsedAttribute : ILGlobals -> ILAttribute - -val add_mdef_generated_attrs : ILGlobals -> ILMethodDef -> ILMethodDef -val add_pdef_generated_attrs : ILGlobals -> ILPropertyDef -> ILPropertyDef -val add_fdef_generated_attrs : ILGlobals -> ILFieldDef -> ILFieldDef - -val add_pdef_never_attrs : ILGlobals -> ILPropertyDef -> ILPropertyDef -val add_fdef_never_attrs : ILGlobals -> ILFieldDef -> ILFieldDef - -/// Discriminating different important built-in types -val typ_is_Object: ILGlobals -> ILType -> bool -val typ_is_String: ILGlobals -> ILType -> bool -val typ_is_SByte: ILGlobals -> ILType -> bool -val typ_is_Byte: ILGlobals -> ILType -> bool -val typ_is_Int16: ILGlobals -> ILType -> bool -val typ_is_UInt16: ILGlobals -> ILType -> bool -val typ_is_Int32: ILGlobals -> ILType -> bool -val typ_is_UInt32: ILGlobals -> ILType -> bool -val typ_is_Int64: ILGlobals -> ILType -> bool -val typ_is_UInt64: ILGlobals -> ILType -> bool -val typ_is_IntPtr: ILGlobals -> ILType -> bool -val typ_is_UIntPtr: ILGlobals -> ILType -> bool -val typ_is_Bool: ILGlobals -> ILType -> bool -val typ_is_Char: ILGlobals -> ILType -> bool -val typ_is_TypedReference: ILGlobals -> ILType -> bool -val typ_is_Double: ILGlobals -> ILType -> bool -val typ_is_Single: ILGlobals -> ILType -> bool - -/// Get a public key token from a public key. -val sha1_hash_bytes : byte[] -> byte[] (* SHA1 hash *) - -/// Get a version number from a CLR version string, e.g. 1.0.3705.0 -val parse_version: string -> ILVersionInfo -val version_to_string: ILVersionInfo -> string -val version_compare: ILVersionInfo -> ILVersionInfo -> int -val version_max: ILVersionInfo -> ILVersionInfo -> ILVersionInfo -val version_min: ILVersionInfo -> ILVersionInfo -> ILVersionInfo - - -/// Decompose a type definition according to its kind. -type ILEnumInfo = - { enumValues: (string * ILFieldInit) list; - enumType: ILType } - -val typ_of_enum_info: ILEnumInfo -> ILType - -val info_for_enum: string * ILFieldDefs -> ILEnumInfo - -val memoize_on: ('a -> 'key) -> ('a -> 'b) -> ('a -> 'b) -val memoize: mapping:('a -> 'b) -> ('a -> 'b) - -// -------------------------------------------------------------------- -// For completeness. These do not occur in metadata but tools that -// care about the existence of properties and events in the metadata -// can benefit from them. -// -------------------------------------------------------------------- - -[] -type ILEventRef = - static member Create : ILTypeRef * string -> ILEventRef - member EnclosingTypeRef: ILTypeRef - member Name: string - -[] -type ILEventSpec = - static member Create : ILEventRef * ILType -> ILEventSpec - member EventRef: ILEventRef - member EnclosingType: ILType - -[] -type ILPropertyRef = - static member Create : ILTypeRef * string -> ILPropertyRef - member EnclosingTypeRef: ILTypeRef - member Name: string - -[] -type ILPropertySpec = - static member Create : ILPropertyRef * ILType -> ILPropertySpec - member PropertyRef: ILPropertyRef - member EnclosingType: ILType - -val tref_of_pref : ILPropertyRef -> ILTypeRef -val tref_of_eref : ILEventRef -> ILTypeRef -val mk_pref : ILTypeRef * string -> ILPropertyRef -val mk_eref : ILTypeRef * string -> ILEventRef -val mk_pspec : ILPropertyRef * ILType -> ILPropertySpec -val mk_espec : ILEventRef * ILType -> ILEventSpec -val name_of_pref : ILPropertyRef -> string -val name_of_eref : ILEventRef -> string -val enclosing_typ_of_pspec : ILPropertySpec -> ILType -val enclosing_typ_of_espec : ILEventSpec -> ILType -val pref_of_pspec : ILPropertySpec -> ILPropertyRef -val eref_of_espec : ILEventSpec -> ILEventRef -val eref_for_edef : ILScopeRef -> ILTypeDef list * ILTypeDef -> ILEventDef -> ILEventRef -val pref_for_pdef : ILScopeRef -> ILTypeDef list * ILTypeDef -> ILPropertyDef -> ILPropertyRef - - -// -------------------------------------------------------------------- -// The referenced-assemblies utility. - -val runningOnMono: bool - -type ILReferences = - { refsAssembly: ILAssemblyRef list; - refsModul: ILModuleRef list; } - member AssemblyReferences: ILAssemblyRef list - member ModuleReferences: ILModuleRef list - -/// Find the full set of assemblies referenced by a module -val refs_of_module: ILModuleDef -> ILReferences -val empty_refs: ILReferences - -// -------------------------------------------------------------------- -// The following functions are used to define an extension to the IL. In reality the only extension is ILX - -type ILInstrSetExtension<'a> = - { instrExtDests: ('a -> ILCodeLabel list); - instrExtFallthrough: ('a -> ILCodeLabel option); - instrExtIsTailcall: ('a -> bool); - instrExtRelabel: (ILCodeLabel -> ILCodeLabel) -> 'a -> 'a; } - -type ILTypeDefKindExtension<'a> = Type_def_kind_extension - -val define_instr_extension: 'a ILInstrSetExtension -> ('a -> IlxExtensionInstr) * (IlxExtensionInstr -> bool) * (IlxExtensionInstr -> 'a) -val define_type_def_kind_extension: 'a ILTypeDefKindExtension -> ('a -> IlxExtensionTypeKind) * (IlxExtensionTypeKind -> bool) * (IlxExtensionTypeKind -> 'a) diff --git a/tools/FSharp_1.9.6.16/source/absil/ilascii.ml b/tools/FSharp_1.9.6.16/source/absil/ilascii.ml deleted file mode 100644 index 6aeeede6..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilascii.ml +++ /dev/null @@ -1,458 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -module (* internal *) Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiConstants - -open Internal.Utilities - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -module Ildiag = Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -module Ilx = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL - -open Ildiag -open Il -open Ilx - -(* The hasthis i.e. static/nonstatic part of the calling convention *) -(* participates in binding, i.e. constructors have the flag set. *) -(* However, when quoting a constructor at the callsite of a newobj *) -(* instruction the flag does not have to be given, even though that *) -(* results in an inadequate specification of the method to call. *) -(* Thus we perform a fix-up on every method quoted at a newobj instruction, *) -(* forcing the flag to be set. This is only for naming/linking purposes, *) -(* and the semantic meaning of the flag, as stored in the method callsig, is *) -(* not effected. *) -let set_hasthis_in_callconv hasthis (Callconv (_,bcc)) = Callconv (hasthis,bcc) -let set_hasthis_in_callsig hasthis x = {x with callsigCallconv= set_hasthis_in_callconv hasthis x.callsigCallconv} -let set_hasthis_in_mref hasthis (x:ILMethodRef) = - ILMethodRef.Create(enclosingTypeRef=x.EnclosingTypeRef, - callingConv=set_hasthis_in_callconv hasthis x.CallingConv, - name=x.Name, - genericArity=x.GenericArity, - argTypes= x.ArgTypes, - returnType= x.ReturnType) - -let set_hasthis_in_mspec hasthis x = let x1,x2,x3 = dest_mspec x in mk_mref_mspec_in_typ(set_hasthis_in_mref hasthis x1,x2,x3) - -let pretty () = true -let parse_ilGlobals = ref (ecmaILGlobals) - -(* -------------------------------------------------------------------- - * Table of parsing and pretty printing data for instructions. - * - PP data is only used for instructions with no arguments - * -------------------------------------------------------------------- *) - -let noarg_instrs = - lazy [ - ["ldc";"i4";"0"], (((mk_ldc_i32 (0)))); - ["ldc";"i4";"1"], (((mk_ldc_i32 (1)))); - ["ldc";"i4";"2"], (((mk_ldc_i32 (2)))); - ["ldc";"i4";"3"], (((mk_ldc_i32 (3)))); - ["ldc";"i4";"4"], (((mk_ldc_i32 (4)))); - ["ldc";"i4";"5"], (((mk_ldc_i32 (5)))); - ["ldc";"i4";"6"], (((mk_ldc_i32 (6)))); - ["ldc";"i4";"7"], (((mk_ldc_i32 (7)))); - ["ldc";"i4";"8"], (((mk_ldc_i32 (8)))); - ["ldc";"i4";"M1"], (((mk_ldc_i32 ((0-1))))); - ["ldc";"i4";"m1"], (((mk_ldc_i32 ((0-1))))); - ["stloc";"0"], (I_stloc (uint16 ( 0))); - ["stloc";"1"], (I_stloc (uint16 ( 1))); - ["stloc";"2"], (I_stloc (uint16 ( 2))); - ["stloc";"3"], (I_stloc (uint16 ( 3))); - ["ldloc";"0"], (I_ldloc (uint16 ( 0))); - ["ldloc";"1"], (I_ldloc (uint16 ( 1))); - ["ldloc";"2"], (I_ldloc (uint16 ( 2))); - ["ldloc";"3"], (I_ldloc (uint16 ( 3))); - ["ldarg";"0"], (I_ldarg (uint16 ( 0))); - ["ldarg";"1"], (I_ldarg (uint16 ( 1))); - ["ldarg";"2"], (I_ldarg (uint16 ( 2))); - ["ldarg";"3"], (I_ldarg (uint16 ( 3))); - ["ret"], (I_ret); - ["add"], (I_arith AI_add); - ["add";"ovf"], (I_arith AI_add_ovf); - ["add";"ovf";"un"], (I_arith AI_add_ovf_un); - ["and"], (I_arith AI_and); - ["div"], (I_arith AI_div); - ["div";"un"], (I_arith AI_div_un); - ["ceq"], (I_arith AI_ceq); - ["cgt"], (I_arith AI_cgt ); - ["cgt";"un"], (I_arith AI_cgt_un); - ["clt"], (I_arith AI_clt); - ["clt";"un"], (I_arith AI_clt_un); - ["conv";"i1"], (I_arith (AI_conv DT_I1)); - ["conv";"i2"], (I_arith (AI_conv DT_I2)); - ["conv";"i4"], (I_arith (AI_conv DT_I4)); - ["conv";"i8"], (I_arith (AI_conv DT_I8)); - ["conv";"i"], (I_arith (AI_conv DT_I)); - ["conv";"r4"], (I_arith (AI_conv DT_R4)); - ["conv";"r8"], (I_arith (AI_conv DT_R8)); - ["conv";"u1"], (I_arith (AI_conv DT_U1)); - ["conv";"u2"], (I_arith (AI_conv DT_U2)); - ["conv";"u4"], (I_arith (AI_conv DT_U4)); - ["conv";"u8"], (I_arith (AI_conv DT_U8)); - ["conv";"u"], (I_arith (AI_conv DT_U)); - ["conv";"r"; "un"], (I_arith (AI_conv DT_R)); - ["conv";"ovf";"i1"], (I_arith (AI_conv_ovf DT_I1)); - ["conv";"ovf";"i2"], (I_arith (AI_conv_ovf DT_I2)); - ["conv";"ovf";"i4"], (I_arith (AI_conv_ovf DT_I4)); - ["conv";"ovf";"i8"], (I_arith (AI_conv_ovf DT_I8)); - ["conv";"ovf";"i"], (I_arith (AI_conv_ovf DT_I)); - ["conv";"ovf";"u1"], (I_arith (AI_conv_ovf DT_U1)); - ["conv";"ovf";"u2"], (I_arith (AI_conv_ovf DT_U2)); - ["conv";"ovf";"u4"], (I_arith (AI_conv_ovf DT_U4)); - ["conv";"ovf";"u8"], (I_arith (AI_conv_ovf DT_U8)); - ["conv";"ovf";"u"], (I_arith (AI_conv_ovf DT_U)); - ["conv";"ovf";"i1"; "un"], (I_arith (AI_conv_ovf_un DT_I1)); - ["conv";"ovf";"i2"; "un"], (I_arith (AI_conv_ovf_un DT_I2)); - ["conv";"ovf";"i4"; "un"], (I_arith (AI_conv_ovf_un DT_I4)); - ["conv";"ovf";"i8"; "un"], (I_arith (AI_conv_ovf_un DT_I8)); - ["conv";"ovf";"i"; "un"], (I_arith (AI_conv_ovf_un DT_I)); - ["conv";"ovf";"u1"; "un"], (I_arith (AI_conv_ovf_un DT_U1)); - ["conv";"ovf";"u2"; "un"], (I_arith (AI_conv_ovf_un DT_U2)); - ["conv";"ovf";"u4"; "un"], (I_arith (AI_conv_ovf_un DT_U4)); - ["conv";"ovf";"u8"; "un"], (I_arith (AI_conv_ovf_un DT_U8)); - ["conv";"ovf";"u"; "un"], (I_arith (AI_conv_ovf_un DT_U)); - ["stelem";"i1"], (I_stelem DT_I1); - ["stelem";"i2"], (I_stelem DT_I2); - ["stelem";"i4"], (I_stelem DT_I4); - ["stelem";"i8"], (I_stelem DT_I8); - ["stelem";"r4"], (I_stelem DT_R4); - ["stelem";"r8"], (I_stelem DT_R8); - ["stelem";"i"], (I_stelem DT_I); - ["stelem";"u"], (I_stelem DT_I); - ["stelem";"u8"], (I_stelem DT_I8); - ["stelem";"ref"], (I_stelem DT_REF); - ["ldelem";"i1"], (I_ldelem DT_I1); - ["ldelem";"i2"], (I_ldelem DT_I2); - ["ldelem";"i4"], (I_ldelem DT_I4); - ["ldelem";"i8"], (I_ldelem DT_I8); - ["ldelem";"u8"], (I_ldelem DT_I8); - ["ldelem";"u1"], (I_ldelem DT_U1); - ["ldelem";"u2"], (I_ldelem DT_U2); - ["ldelem";"u4"], (I_ldelem DT_U4); - ["ldelem";"r4"], (I_ldelem DT_R4); - ["ldelem";"r8"], (I_ldelem DT_R8); - ["ldelem";"u"], (I_ldelem DT_I); (* EQUIV *) - ["ldelem";"i"], (I_ldelem DT_I); - ["ldelem";"ref"], (I_ldelem DT_REF); - ["mul"], (I_arith AI_mul ); - ["mul";"ovf"], (I_arith AI_mul_ovf); - ["mul";"ovf";"un"], (I_arith AI_mul_ovf_un); - ["rem"], (I_arith AI_rem ); - ["rem";"un"], (I_arith AI_rem_un ); - ["shl"], (I_arith AI_shl ); - ["shr"], (I_arith AI_shr ); - ["shr";"un"], (I_arith AI_shr_un); - ["sub"], (I_arith AI_sub ); - ["sub";"ovf"], (I_arith AI_sub_ovf); - ["sub";"ovf";"un"], (I_arith AI_sub_ovf_un); - ["xor"], (I_arith AI_xor); - ["or"], (I_arith AI_or); - ["neg"], (I_arith AI_neg); - ["not"], (I_arith AI_not); - ["ldnull"], (I_arith AI_ldnull); - ["dup"], (I_arith AI_dup); - ["pop"], (I_arith AI_pop); - ["ckfinite"], (I_arith AI_ckfinite); - ["nop"], (I_arith AI_nop); - ["break"], (I_break); - ["arglist"], (I_arglist); - ["endfilter"], (I_endfilter); - ["endfinally"], I_endfinally; - ["refanytype"], (I_refanytype); - ["localloc"], (I_localloc); - ["throw"], (I_throw); - ["ldlen"], (I_ldlen); - ["rethrow"], (I_rethrow); -];; - - -let words_of_noarg_instr, is_noarg_instr = - let t = - lazy begin - let t = Hashtbl.create 300 in - List.iter (fun (x,mk) -> Hashtbl.add t mk x) (Lazy.force noarg_instrs); - t - end in - (fun s -> Hashtbl.find (Lazy.force t) s), - (fun s -> Hashtbl.mem (Lazy.force t) s) - -(* -------------------------------------------------------------------- - * Instructions are preceded by prefixes, e.g. ".tail" etc. - * -------------------------------------------------------------------- *) - -type instr_name = string list -type 'a named = instr_name * 'a - -type prefix = - | Prefix_Tail - | Prefix_Volatile - | Prefix_Unaligned of int - | Prefix_Readonly - | Prefix_Constrained of ILType -type prefixes = prefix list - -let prefix_processor nm mk = (nm, fun x (prefixes:prefixes) -> mk prefixes x) - -let no_prefixes (nm,mk) = - prefix_processor nm - (function - [] -> mk - | h::t -> failwith ("no prefixes are not allowed for instruction"^String.concat "." nm)) - -let int_to_unaligned n = - if n = 1 then Unaligned_1 - else if n = 2 then Unaligned_2 - else if n = 4 then Unaligned_4 - else failwith "int_to_unaligned" - -let volatile_unaligned_prefix (nm,mk) = - prefix_processor nm - (function - [] -> mk(Aligned, Nonvolatile) - | [Prefix_Unaligned n] -> mk(int_to_unaligned n, Nonvolatile) - | [Prefix_Volatile] -> mk(Aligned, Volatile) - | [Prefix_Unaligned n;Prefix_Volatile] - | [Prefix_Volatile;Prefix_Unaligned n] -> mk(int_to_unaligned n, Volatile) - | _ -> failwith ("bad prefix for instruction"^String.concat "." nm)) - -let volatile_prefix (nm,mk) = - prefix_processor nm - (function - [] -> mk(Nonvolatile) - | [Prefix_Volatile] -> mk(Volatile) - | _ -> failwith ("bad prefix for instruction"^String.concat "." nm)) - -let tail_prefix (nm,mk) = - prefix_processor nm - (function - [] -> mk Normalcall - | [Prefix_Tail] -> mk Tailcall - | _ -> failwith ("bad prefix for instruction"^String.concat "." nm)) - -let readonly_prefix (nm,mk) = - prefix_processor nm - (function - [] -> mk NormalAddress - | [Prefix_Readonly] -> mk ReadonlyAddress - | _ -> failwith ("bad prefix for instruction"^String.concat "." nm)) - -let constraint_tail_prefix (nm,mk) = - prefix_processor nm - (function - [] -> mk (None, Normalcall) - | [Prefix_Tail] -> mk (None,Tailcall) - | [Prefix_Constrained ty; Prefix_Tail] - | [ Prefix_Tail; Prefix_Constrained ty] -> mk (Some ty,Tailcall) - | [ Prefix_Constrained ty] -> mk (Some ty,Normalcall) - | _ -> failwith ("bad prefix for instruction"^String.concat "." nm)) - -let mk_stind (nm,dt) = volatile_unaligned_prefix (nm, (fun (x,y) () -> I_stind(x,y,dt))) -let mk_ldind (nm,dt) = volatile_unaligned_prefix (nm, (fun (x,y) () -> I_ldind(x,y,dt))) - -(* -------------------------------------------------------------------- - * Parsing only... Tables of different types of instructions. - * First the different kinds of instructions. - * -------------------------------------------------------------------- *) - -type CoreInstr = prefixes -> ILInstr - -type none_instr = (unit -> CoreInstr) -type i32_instr = (int32 -> CoreInstr) -type i32_i32_instr = (int32 * int32 -> CoreInstr) -type arg_instr = (uint16 -> CoreInstr) -type env_instr = (int -> CoreInstr) -type loc_instr = (uint16 -> CoreInstr) -type arg_typ_instr = (uint16 * ILType -> CoreInstr) -type i64_instr = (int64 -> CoreInstr) -type real_instr = (ILConstSpec -> CoreInstr) -//type field_instr = (ILFieldSpec -> CoreInstr) -type method_instr = (ILMethodSpec * varargs -> CoreInstr) -type unconditional_instr = (ILCodeLabel -> CoreInstr) -type conditional_instr = (ILCodeLabel * ILCodeLabel -> CoreInstr) -type type_instr = (ILType -> CoreInstr) -type int_type_instr = (int * ILType -> CoreInstr) -type valuetype_instr = (ILType -> CoreInstr) (* nb. diff. interp of types to type_instr *) -type string_instr = (string -> CoreInstr) -//type sig_instr = (ILCallingSignature * varargs -> CoreInstr) -type tok_instr = (ILTokenSpec -> CoreInstr) -type switch_instr = (ILCodeLabel list * ILCodeLabel -> CoreInstr) - -(* -------------------------------------------------------------------- - * Now the generic code to make a table of instructions - * -------------------------------------------------------------------- *) - -type 'a instr_table = (string list * 'a) list -type 'a lazy_instr_table = 'a instr_table Lazy.t -let mk_table l = l -(* let tab = Hashtbl.create 100 in - List.iter (fun (x,mk) -> Hashtbl.add tab x mk) l; - (tab : 'a instr_table);; -*) -(* -------------------------------------------------------------------- - * Now the tables of instructions - * -------------------------------------------------------------------- *) - -let arg_instrs = -lazy (mk_table [ - no_prefixes (["ldarg"], (fun x -> I_ldarg x)); - no_prefixes (["ldarg";"s"], (fun x -> I_ldarg x)); - no_prefixes (["starg"], (fun x -> I_starg x)); - no_prefixes (["starg";"s"], (fun x -> I_starg x)); - no_prefixes (["ldarga"], (fun x -> I_ldarga x)); - no_prefixes (["ldarga";"s"], (fun x -> I_ldarga x)); -] : arg_instr instr_table) - -let loc_instrs = -lazy (mk_table [ - no_prefixes (["stloc"], (fun x -> I_stloc x)); - no_prefixes (["stloc";"s"], (fun x -> I_stloc x)); - no_prefixes (["ldloc"], (fun x -> I_ldloc x)); - no_prefixes (["ldloc";"s"], (fun x -> I_ldloc x)); - no_prefixes (["ldloca"], (fun x -> I_ldloca x)); - no_prefixes (["ldloca";"s"], (fun x -> I_ldloca x)); -] : loc_instr instr_table) - -let none_instrs = - lazy (mk_table - (List.map (fun (nm,i) -> no_prefixes (nm,(fun () -> i))) (Lazy.force noarg_instrs) @ - [ (mk_stind (["stind";"u"], DT_I)); - (mk_stind (["stind";"i"], DT_I)); - (mk_stind (["stind";"u1"], DT_I1));(* ILX EQUIVALENT *) - (mk_stind (["stind";"i1"], DT_I1)); - (mk_stind (["stind";"u2"], DT_I2)); - (mk_stind (["stind";"i2"], DT_I2)); - (mk_stind (["stind";"u4"], DT_I4)); (* ILX EQUIVALENT *) - (mk_stind (["stind";"i4"], DT_I4)); - (mk_stind (["stind";"u8"], DT_I8)); (* ILX EQUIVALENT *) - (mk_stind (["stind";"i8"], DT_I8)); - (mk_stind (["stind";"r4"], DT_R4)); - (mk_stind (["stind";"r8"], DT_R8)); - (mk_stind (["stind";"ref"], DT_REF)); - (mk_ldind (["ldind";"i"], DT_I)); - (mk_ldind (["ldind";"i1"], DT_I1)); - (mk_ldind (["ldind";"i2"], DT_I2)); - (mk_ldind (["ldind";"i4"], DT_I4)); - (mk_ldind (["ldind";"i8"], DT_I8)); - (mk_ldind (["ldind";"u1"], DT_U1)); - (mk_ldind (["ldind";"u2"], DT_U2)); - (mk_ldind (["ldind";"u4"], DT_U4)); - (mk_ldind (["ldind";"u8"], DT_I8)); - (mk_ldind (["ldind";"r4"], DT_R4)); - (mk_ldind (["ldind";"r8"], DT_R8)); - (mk_ldind (["ldind";"ref"], DT_REF)); - volatile_unaligned_prefix (["cpblk"], (fun (x,y) () -> I_cpblk(x,y))); - volatile_unaligned_prefix (["initblk"], (fun (x,y) () -> I_initblk(x,y))); - ]) : none_instr instr_table);; - -let i64_instrs = - lazy (mk_table [ - no_prefixes (["ldc";"i8"], (fun x ->I_arith (AI_ldc (DT_I8, NUM_I8 x)))); - ] : i64_instr instr_table) - -let i32_instrs = - lazy (mk_table [ - no_prefixes (["ldc";"i4"], (fun x -> ((mk_ldc_i32 x)))); - no_prefixes (["ldc";"i4";"s"], (fun x -> ((mk_ldc_i32 x)))); - ] : i32_instr instr_table) - -let i32_i32_instrs = - lazy (mk_table [ - no_prefixes (["ldlen";"multi"], (fun (x,y) -> EI_ldlen_multi (x, y))); - ] : i32_i32_instr instr_table) - -let real_instrs = - lazy (mk_table [ - no_prefixes (["ldc";"r4"], (fun x -> I_arith (AI_ldc (DT_R4, x)))); - no_prefixes (["ldc";"r8"], (fun x -> I_arith (AI_ldc (DT_R8, x)))); - ] : real_instr instr_table) - -//let field_instrs = -// lazy (mk_table [ -// (volatile_unaligned_prefix (["ldfld"], (fun (x,y) fspec -> I_ldfld(x,y,fspec)))); -// (volatile_unaligned_prefix (["stfld"], (fun (x,y) fspec -> I_stfld(x,y,fspec)))); -// (volatile_prefix (["ldsfld"], (fun x fspec -> I_ldsfld (x, fspec)))); -// (volatile_prefix (["stsfld"], (fun x fspec -> I_stsfld (x, fspec)))); -// (no_prefixes (["ldflda"], (fun fspec -> I_ldflda fspec))); -// (no_prefixes (["ldsflda"],(fun fspec -> I_ldsflda fspec))); -// ] : field_instr instr_table) - -let method_instrs = - lazy (mk_table [ - (tail_prefix (["call"], (fun tl (mspec,y) -> I_call (tl,mspec,y)))); - (no_prefixes (["ldftn"], (fun (mspec,y) -> I_ldftn mspec))); - (no_prefixes (["ldvirtftn"], (fun (mspec,y) -> I_ldvirtftn mspec))); -(* nb. set "instance" bit in method id for newobj and callvirt *) -(* This is the behaviour of ILDASM. You'd think it would also do it for *) -(* ldvirtftn but it doesn't. *) - (no_prefixes (["newobj"], (fun (mspec,y) -> I_newobj (set_hasthis_in_mspec CC_instance mspec,y)))); - (constraint_tail_prefix (["callvirt"], - (fun (cons,tl) (mspec,y) -> - let mspec2 = set_hasthis_in_mspec CC_instance mspec in - match cons with - | Some ty -> I_callconstraint (tl,ty,mspec2,y) - | None -> I_callvirt (tl,set_hasthis_in_mspec CC_instance mspec,y)))); - ] : method_instr instr_table) - -let string_instrs = - lazy (mk_table [ - no_prefixes (["ldstr"], (fun x -> I_ldstr x)); - ] : string_instr instr_table) - -let switch_instrs = - lazy (mk_table [ - no_prefixes (["switch"], (fun x -> I_switch x)); - ] : switch_instr instr_table) - -let tok_instrs = - lazy (mk_table [ - no_prefixes (["ldtoken"], (fun x -> I_ldtoken x)); - ] : tok_instr instr_table) - - -//let sig_instrs = -// lazy (mk_table [ -// (tail_prefix (["calli"], (fun tl (x,y) -> I_calli (tl, x, y)))); -// ] : sig_instr instr_table) - -let type_instrs = - lazy (mk_table [ - no_prefixes (["mkrefany"], (fun x -> I_mkrefany x)); - no_prefixes (["refanyval"], (fun x -> I_refanyval x)); - readonly_prefix (["ldelema"], (fun ro x -> I_ldelema (ro,Rank1ArrayShape,x))); - no_prefixes (["ldelem";"any"], (fun x -> I_ldelem_any (Rank1ArrayShape,x))); - no_prefixes (["stelem";"any"], (fun x -> I_stelem_any (Rank1ArrayShape, x))); - no_prefixes (["newarr"], (fun x -> I_newarr (Rank1ArrayShape,x))); - no_prefixes (["castclass"], (fun x -> I_castclass x)); - no_prefixes (["ilzero"], (fun x -> EI_ilzero x)); - no_prefixes (["isinst"], (fun x -> I_isinst x)); - no_prefixes (["initobj";"any"], (fun x -> I_initobj x)); - no_prefixes (["unbox";"any"], (fun x -> I_unbox_any x)); -] : type_instr instr_table) - -let mk_shape n = ILArrayShape(Array.to_list (Array.create n (None,None))) -let int_type_instrs = - lazy (mk_table [ - no_prefixes (["ldelem";"multi"], (fun (x,y) -> (I_ldelem_any (mk_shape x,y)))); - no_prefixes (["stelem";"multi"], (fun (x,y) -> (I_stelem_any (mk_shape x,y)))); - no_prefixes (["newarr";"multi"], (fun (x,y) -> (I_newarr (mk_shape x,y)))); - readonly_prefix (["ldelema";"multi"], (fun ro (x,y) -> (I_ldelema (ro,mk_shape x,y)))); -] : int_type_instr instr_table) - -let valuetype_instrs = - lazy (mk_table [ - no_prefixes (["cpobj"], (fun x -> I_cpobj x)); - no_prefixes (["initobj"], (fun x -> I_initobj x)); - volatile_unaligned_prefix (["ldobj"], (fun (x,y) z -> I_ldobj (x,y,z))); - volatile_unaligned_prefix (["stobj"], (fun (x,y) z -> I_stobj (x,y,z))); - no_prefixes (["sizeof"], (fun x -> I_sizeof x)); - no_prefixes (["box"], (fun x -> I_box x)); - no_prefixes (["unbox"], (fun x -> I_unbox x)); -] : valuetype_instr instr_table) - -(* -------------------------------------------------------------------- - * Parser/lexer state. - * -------------------------------------------------------------------- *) - -let lexing_bytearray = ref false;; diff --git a/tools/FSharp_1.9.6.16/source/absil/ilascii.mli b/tools/FSharp_1.9.6.16/source/absil/ilascii.mli deleted file mode 100644 index 76ca7684..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilascii.mli +++ /dev/null @@ -1,89 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -/// Various constants and utilities used when parsing the ILASM format for IL -module (* internal *) Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiConstants - -open Internal.Utilities - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -module Ilx = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL - -open Ilx -open Il - -// -------------------------------------------------------------------- -// IL Parser state - must be initialized before parsing a module -// -------------------------------------------------------------------- - -val parse_ilGlobals: ILGlobals ref - -// -------------------------------------------------------------------- -// IL Lexer and pretty-printer tables -// -------------------------------------------------------------------- - -type instr_name = string list -type prefix = - | Prefix_Tail - | Prefix_Volatile - | Prefix_Unaligned of int - | Prefix_Readonly - | Prefix_Constrained of ILType -type prefixes = prefix list - -type CoreInstr = prefixes -> ILInstr - -type none_instr = unit -> CoreInstr -type i32_instr = int32 -> CoreInstr -type i32_i32_instr = int32 * int32 -> CoreInstr -type arg_instr = uint16 -> CoreInstr -type loc_instr = uint16 -> CoreInstr -type env_instr = int -> CoreInstr -type arg_typ_instr = uint16 * ILType -> CoreInstr -type i64_instr = int64 -> CoreInstr -type real_instr = ILConstSpec -> CoreInstr -//type field_instr = ILFieldSpec -> CoreInstr -type method_instr = ILMethodSpec * varargs -> CoreInstr -type unconditional_instr = ILCodeLabel -> CoreInstr -type conditional_instr = ILCodeLabel * ILCodeLabel -> CoreInstr -type type_instr = ILType -> CoreInstr -type int_type_instr = int * ILType -> CoreInstr -type valuetype_instr = ILType -> CoreInstr -type string_instr = string -> CoreInstr -//type sig_instr = ILCallingSignature * varargs -> CoreInstr -type tok_instr = ILTokenSpec -> CoreInstr -type switch_instr = ILCodeLabel list * ILCodeLabel -> CoreInstr - -type 'a instr_table = (string list * 'a) list -type 'a lazy_instr_table = 'a instr_table Lazy.t - -val loc_instrs: loc_instr lazy_instr_table -val arg_instrs: arg_instr lazy_instr_table -val none_instrs: none_instr lazy_instr_table -val i64_instrs: i64_instr lazy_instr_table -val i32_instrs: i32_instr lazy_instr_table -val i32_i32_instrs: i32_i32_instr lazy_instr_table -val real_instrs: real_instr lazy_instr_table -//val field_instrs: field_instr lazy_instr_table -val method_instrs: method_instr lazy_instr_table -val string_instrs: string_instr lazy_instr_table -val switch_instrs: switch_instr lazy_instr_table -val tok_instrs: tok_instr lazy_instr_table -//val sig_instrs: sig_instr lazy_instr_table -val type_instrs: type_instr lazy_instr_table -val int_type_instrs: int_type_instr lazy_instr_table -val valuetype_instrs: valuetype_instr lazy_instr_table - -val words_of_noarg_instr : (ILInstr -> string list) -val is_noarg_instr : (ILInstr -> bool) - -(* -------------------------------------------------------------------- - * Lexer state - * -------------------------------------------------------------------- *) - -val lexing_bytearray: bool ref - - - diff --git a/tools/FSharp_1.9.6.16/source/absil/ilbinary.ml b/tools/FSharp_1.9.6.16/source/absil/ilbinary.ml deleted file mode 100644 index e0d3e5cf..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilbinary.ml +++ /dev/null @@ -1,1005 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - - -module Microsoft.FSharp.Compiler.AbstractIL.Internal.BinaryConstants - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -type table = Table of int -let tag_of_table (Table n) = n - -let tab_Module = Table 0 -let tab_TypeRef = Table 1 -let tab_TypeDef = Table 2 -let tab_FieldPtr = Table 3 -let tab_Field = Table 4 -let tab_MethodPtr = Table 5 -let tab_Method = Table 6 -let tab_ParamPtr = Table 7 -let tab_Param = Table 8 -let tab_InterfaceImpl = Table 9 -let tab_MemberRef = Table 10 -let tab_Constant = Table 11 -let tab_CustomAttribute = Table 12 -let tab_FieldMarshal = Table 13 -let tab_Permission = Table 14 -let tab_ClassLayout = Table 15 -let tab_FieldLayout = Table 16 -let tab_StandAloneSig = Table 17 -let tab_EventMap = Table 18 -let tab_EventPtr = Table 19 -let tab_Event = Table 20 -let tab_PropertyMap = Table 21 -let tab_PropertyPtr = Table 22 -let tab_Property = Table 23 -let tab_MethodSemantics = Table 24 -let tab_MethodImpl = Table 25 -let tab_ModuleRef = Table 26 -let tab_TypeSpec = Table 27 -let tab_ImplMap = Table 28 -let tab_FieldRVA = Table 29 -let tab_ENCLog = Table 30 -let tab_ENCMap = Table 31 -let tab_Assembly = Table 32 -let tab_AssemblyProcessor = Table 33 -let tab_AssemblyOS = Table 34 -let tab_AssemblyRef = Table 35 -let tab_AssemblyRefProcessor = Table 36 -let tab_AssemblyRefOS = Table 37 -let tab_File = Table 38 -let tab_ExportedType = Table 39 -let tab_ManifestResource = Table 40 -let tab_Nested = Table 41 -let tab_GenericParam = Table 42 -let tab_MethodSpec = Table 43 -let tab_GenericParamConstraint = Table 44 - -let tab_UserStrings = Table 0x70 (* Special encoding of embedded UserString tokens - See 1.9 Partition III *) - -(* Sorted bit-vector as stored by CLR V1: 00fa 0133 0002 0000 *) -(* But what does this mean? The ECMA spec does not say! *) -(* Metainfo -schema reports sorting as shown below. *) -(* But some sorting, e.g. EventMap does not seem to show *) - -(* Which tables are sorted and by which column *) -let sorted_table_info = - [ (tab_InterfaceImpl,0); - (tab_Constant, 1); - (tab_CustomAttribute, 0); - (tab_FieldMarshal, 0); - (tab_Permission, 1); - (tab_ClassLayout, 2); - (tab_FieldLayout, 1); - (tab_MethodSemantics, 2); - (tab_MethodImpl, 0); - (tab_ImplMap, 1); - (tab_FieldRVA, 1); - (tab_Nested, 0); - (tab_GenericParam, 2); - (tab_GenericParamConstraint, 0); ] - -type typeDefOrRef_tag = TypeDefOrRefOrSpecTag of int32 -let tdor_TypeDef = TypeDefOrRefOrSpecTag 0x00 -let tdor_TypeRef = TypeDefOrRefOrSpecTag 0x01 -let tdor_TypeSpec = TypeDefOrRefOrSpecTag 0x2 -let mkTypeDefOrRefOrSpecTag x = - match x with - | 0x00 -> tdor_TypeDef // nb. avoid reallocation - | 0x01 -> tdor_TypeRef - | 0x02 -> tdor_TypeSpec - | _ -> invalid_arg "mkTypeDefOrRefOrSpecTag" - -type hasConstant_tag = HasConstantTag of int32 -let hc_FieldDef = HasConstantTag 0x0 -let hc_ParamDef = HasConstantTag 0x1 -let hc_Property = HasConstantTag 0x2 - -let mkHasConstantTag x = - match x with - | 0x00l -> hc_FieldDef - | 0x01l -> hc_ParamDef - | 0x02l -> hc_Property - | _ -> invalid_arg "mkHasConstantTag" - -type hasCustomAttribute_tag = HasCustomAttributeTag of int32 -let hca_MethodDef = HasCustomAttributeTag 0x0 -let hca_FieldDef = HasCustomAttributeTag 0x1 -let hca_TypeRef = HasCustomAttributeTag 0x2 -let hca_TypeDef = HasCustomAttributeTag 0x3 -let hca_ParamDef = HasCustomAttributeTag 0x4 -let hca_InterfaceImpl = HasCustomAttributeTag 0x5 -let hca_MemberRef = HasCustomAttributeTag 0x6 -let hca_Module = HasCustomAttributeTag 0x7 -let hca_Permission = HasCustomAttributeTag 0x8 -let hca_Property = HasCustomAttributeTag 0x9 -let hca_Event = HasCustomAttributeTag 0xa -let hca_StandAloneSig = HasCustomAttributeTag 0xb -let hca_ModuleRef = HasCustomAttributeTag 0xc -let hca_TypeSpec = HasCustomAttributeTag 0xd -let hca_Assembly = HasCustomAttributeTag 0xe -let hca_AssemblyRef = HasCustomAttributeTag 0xf -let hca_File = HasCustomAttributeTag 0x10 -let hca_ExportedType = HasCustomAttributeTag 0x11 -let hca_ManifestResource = HasCustomAttributeTag 0x12 -let hca_GenericParam = HasCustomAttributeTag 0x13 -let hca_GenericParamConstraint = HasCustomAttributeTag 0x14 -let hca_MethodSpec = HasCustomAttributeTag 0x15 - -let mkHasCustomAttributeTag x = - match x with - | 0x00 -> hca_MethodDef - | 0x01 -> hca_FieldDef - | 0x02 -> hca_TypeRef - | 0x03 -> hca_TypeDef - | 0x04 -> hca_ParamDef - | 0x05 -> hca_InterfaceImpl - | 0x06 -> hca_MemberRef - | 0x07 -> hca_Module - | 0x08 -> hca_Permission - | 0x09 -> hca_Property - | 0x0a -> hca_Event - | 0x0b -> hca_StandAloneSig - | 0x0c -> hca_ModuleRef - | 0x0d -> hca_TypeSpec - | 0x0e -> hca_Assembly - | 0x0f -> hca_AssemblyRef - | 0x10 -> hca_File - | 0x11 -> hca_ExportedType - | 0x12 -> hca_ManifestResource - | 0x13 -> hca_GenericParam - | 0x14 -> hca_GenericParamConstraint - | 0x15 -> hca_MethodSpec - | _ -> HasCustomAttributeTag x - -type hasFieldMarshal_tag = HasFieldMarshalTag of int32 -let hfm_FieldDef = HasFieldMarshalTag 0x00 -let hfm_ParamDef = HasFieldMarshalTag 0x01 - -let mkHasFieldMarshalTag x = - match x with - | 0x00 -> hfm_FieldDef - | 0x01 -> hfm_ParamDef - | _ -> HasFieldMarshalTag x - -type hasDeclSecurity_tag = HasDeclSecurityTag of int32 -let hds_TypeDef = HasDeclSecurityTag 0x00 -let hds_MethodDef = HasDeclSecurityTag 0x01 -let hds_Assembly = HasDeclSecurityTag 0x02 - -let mkHasDeclSecurityTag x = - match x with - | 0x00 -> hds_TypeDef - | 0x01 -> hds_MethodDef - | 0x02 -> hds_Assembly - | _ -> HasDeclSecurityTag x - -type memberRefParent_tag = MemberRefParentTag of int32 -let mrp_TypeRef = MemberRefParentTag 0x01 -let mrp_ModuleRef = MemberRefParentTag 0x02 -let mrp_MethodDef = MemberRefParentTag 0x03 -let mrp_TypeSpec = MemberRefParentTag 0x04 - -let mkMemberRefParentTag x = - match x with - | 0x01 -> mrp_TypeRef - | 0x02 -> mrp_ModuleRef - | 0x03 -> mrp_MethodDef - | 0x04 -> mrp_TypeSpec - | _ -> MemberRefParentTag x - -type hasSemantics_tag = HasSemanticsTag of int32 -let hs_Event = HasSemanticsTag 0x00 -let hs_Property = HasSemanticsTag 0x01 - -let mkHasSemanticsTag x = - match x with - | 0x00 -> hs_Event - | 0x01 -> hs_Property - | _ -> HasSemanticsTag x - -type methodDefOrRef_tag = MethodDefOrRefTag of int32 -let mdor_MethodDef = MethodDefOrRefTag 0x00 -let mdor_MemberRef = MethodDefOrRefTag 0x01 -let mdor_MethodSpec = MethodDefOrRefTag 0x02 - -let mkMethodDefOrRefTag x = - match x with - | 0x00 -> mdor_MethodDef - | 0x01 -> mdor_MemberRef - | 0x02 -> mdor_MethodSpec - | _ -> MethodDefOrRefTag x - -type memberForwarded_tag = MemberForwardedTag of int32 -let mf_FieldDef = MemberForwardedTag 0x00 -let mf_MethodDef = MemberForwardedTag 0x01 - -let mkMemberForwardedTag x = - match x with - | 0x00 -> mf_FieldDef - | 0x01 -> mf_MethodDef - | _ -> MemberForwardedTag x - -type implementation_tag = ImplementationTag of int32 -let i_File = ImplementationTag 0x00 -let i_AssemblyRef = ImplementationTag 0x01 -let i_ExportedType = ImplementationTag 0x02 - -let mkImplementationTag x = - match x with - | 0x00 -> i_File - | 0x01 -> i_AssemblyRef - | 0x02 -> i_ExportedType - | _ -> ImplementationTag x - -type customAttributeType_tag = CustomAttributeTypeTag of int32 -let cat_MethodDef = CustomAttributeTypeTag 0x02 -let cat_MemberRef = CustomAttributeTypeTag 0x03 - -let mkCustomAttributeTypeTag x = - match x with - | 0x02 -> cat_MethodDef - | 0x03 -> cat_MemberRef - | _ -> CustomAttributeTypeTag x - -type resolutionScope_tag = ResolutionScopeTag of int32 -let rs_Module = ResolutionScopeTag 0x00 -let rs_ModuleRef = ResolutionScopeTag 0x01 -let rs_AssemblyRef = ResolutionScopeTag 0x02 -let rs_TypeRef = ResolutionScopeTag 0x03 - -let mkResolutionScopeTag x = - match x with - | 0x00 -> rs_Module - | 0x01 -> rs_ModuleRef - | 0x02 -> rs_AssemblyRef - | 0x03 -> rs_TypeRef - | _ -> ResolutionScopeTag x - -type typeOrMethodDef_tag = TypeOrMethodDefTag of int32 -let tomd_TypeDef = TypeOrMethodDefTag 0x00 -let tomd_MethodDef = TypeOrMethodDefTag 0x01 - -let mkTypeOrMethodDefTag x = - match x with - | 0x00 -> tomd_TypeDef - | 0x01 -> tomd_MethodDef - | _ -> TypeOrMethodDefTag x - -let et_END = 0x00 -let et_VOID = 0x01 -let et_BOOLEAN = 0x02 -let et_CHAR = 0x03 -let et_I1 = 0x04 -let et_U1 = 0x05 -let et_I2 = 0x06 -let et_U2 = 0x07 -let et_I4 = 0x08 -let et_U4 = 0x09 -let et_I8 = 0x0a -let et_U8 = 0x0b -let et_R4 = 0x0c -let et_R8 = 0x0d -let et_STRING = 0x0e -let et_PTR = 0x0f -let et_BYREF = 0x10 -let et_VALUETYPE = 0x11 -let et_CLASS = 0x12 -let et_VAR = 0x13 -let et_ARRAY = 0x14 -let et_WITH = 0x15 -let et_TYPEDBYREF = 0x16 -let et_I = 0x18 -let et_U = 0x19 -let et_FNPTR = 0x1B -let et_OBJECT = 0x1C -let et_SZARRAY = 0x1D -let et_MVAR = 0x1e -let et_CMOD_REQD = 0x1F -let et_CMOD_OPT = 0x20 - -let et_SENTINEL = 0x41 (* sentinel for varargs *) -let et_PINNED = 0x45 - - -let i_nop = 0x00 -let i_break = 0x01 -let i_ldarg_0 = 0x02 -let i_ldarg_1 = 0x03 -let i_ldarg_2 = 0x04 -let i_ldarg_3 = 0x05 -let i_ldloc_0 = 0x06 -let i_ldloc_1 = 0x07 -let i_ldloc_2 = 0x08 -let i_ldloc_3 = 0x09 -let i_stloc_0 = 0x0a -let i_stloc_1 = 0x0b -let i_stloc_2 = 0x0c -let i_stloc_3 = 0x0d -let i_ldarg_s = 0x0e -let i_ldarga_s = 0x0f -let i_starg_s = 0x10 -let i_ldloc_s = 0x11 -let i_ldloca_s = 0x12 -let i_stloc_s = 0x13 -let i_ldnull = 0x14 -let i_ldc_i4_m1 = 0x15 -let i_ldc_i4_0 = 0x16 -let i_ldc_i4_1 = 0x17 -let i_ldc_i4_2 = 0x18 -let i_ldc_i4_3 = 0x19 -let i_ldc_i4_4 = 0x1a -let i_ldc_i4_5 = 0x1b -let i_ldc_i4_6 = 0x1c -let i_ldc_i4_7 = 0x1d -let i_ldc_i4_8 = 0x1e -let i_ldc_i4_s = 0x1f -let i_ldc_i4 = 0x20 -let i_ldc_i8 = 0x21 -let i_ldc_r4 = 0x22 -let i_ldc_r8 = 0x23 -let i_dup = 0x25 -let i_pop = 0x26 -let i_jmp = 0x27 -let i_call = 0x28 -let i_calli = 0x29 -let i_ret = 0x2a -let i_br_s = 0x2b -let i_brfalse_s = 0x2c -let i_brtrue_s = 0x2d -let i_beq_s = 0x2e -let i_bge_s = 0x2f -let i_bgt_s = 0x30 -let i_ble_s = 0x31 -let i_blt_s = 0x32 -let i_bne_un_s = 0x33 -let i_bge_un_s = 0x34 -let i_bgt_un_s = 0x35 -let i_ble_un_s = 0x36 -let i_blt_un_s = 0x37 -let i_br = 0x38 -let i_brfalse = 0x39 -let i_brtrue = 0x3a -let i_beq = 0x3b -let i_bge = 0x3c -let i_bgt = 0x3d -let i_ble = 0x3e -let i_blt = 0x3f -let i_bne_un = 0x40 -let i_bge_un = 0x41 -let i_bgt_un = 0x42 -let i_ble_un = 0x43 -let i_blt_un = 0x44 -let i_switch = 0x45 -let i_ldind_i1 = 0x46 -let i_ldind_u1 = 0x47 -let i_ldind_i2 = 0x48 -let i_ldind_u2 = 0x49 -let i_ldind_i4 = 0x4a -let i_ldind_u4 = 0x4b -let i_ldind_i8 = 0x4c -let i_ldind_i = 0x4d -let i_ldind_r4 = 0x4e -let i_ldind_r8 = 0x4f -let i_ldind_ref = 0x50 -let i_stind_ref = 0x51 -let i_stind_i1 = 0x52 -let i_stind_i2 = 0x53 -let i_stind_i4 = 0x54 -let i_stind_i8 = 0x55 -let i_stind_r4 = 0x56 -let i_stind_r8 = 0x57 -let i_add = 0x58 -let i_sub = 0x59 -let i_mul = 0x5a -let i_div = 0x5b -let i_div_un = 0x5c -let i_rem = 0x5d -let i_rem_un = 0x5e -let i_and = 0x5f -let i_or = 0x60 -let i_xor = 0x61 -let i_shl = 0x62 -let i_shr = 0x63 -let i_shr_un = 0x64 -let i_neg = 0x65 -let i_not = 0x66 -let i_conv_i1 = 0x67 -let i_conv_i2 = 0x68 -let i_conv_i4 = 0x69 -let i_conv_i8 = 0x6a -let i_conv_r4 = 0x6b -let i_conv_r8 = 0x6c -let i_conv_u4 = 0x6d -let i_conv_u8 = 0x6e -let i_callvirt = 0x6f -let i_cpobj = 0x70 -let i_ldobj = 0x71 -let i_ldstr = 0x72 -let i_newobj = 0x73 -let i_castclass = 0x74 -let i_isinst = 0x75 -let i_conv_r_un = 0x76 -let i_unbox = 0x79 -let i_throw = 0x7a -let i_ldfld = 0x7b -let i_ldflda = 0x7c -let i_stfld = 0x7d -let i_ldsfld = 0x7e -let i_ldsflda = 0x7f -let i_stsfld = 0x80 -let i_stobj = 0x81 -let i_conv_ovf_i1_un= 0x82 -let i_conv_ovf_i2_un= 0x83 -let i_conv_ovf_i4_un= 0x84 -let i_conv_ovf_i8_un= 0x85 -let i_conv_ovf_u1_un= 0x86 -let i_conv_ovf_u2_un= 0x87 -let i_conv_ovf_u4_un= 0x88 -let i_conv_ovf_u8_un= 0x89 -let i_conv_ovf_i_un = 0x8a -let i_conv_ovf_u_un = 0x8b -let i_box = 0x8c -let i_newarr = 0x8d -let i_ldlen = 0x8e -let i_ldelema = 0x8f -let i_ldelem_i1 = 0x90 -let i_ldelem_u1 = 0x91 -let i_ldelem_i2 = 0x92 -let i_ldelem_u2 = 0x93 -let i_ldelem_i4 = 0x94 -let i_ldelem_u4 = 0x95 -let i_ldelem_i8 = 0x96 -let i_ldelem_i = 0x97 -let i_ldelem_r4 = 0x98 -let i_ldelem_r8 = 0x99 -let i_ldelem_ref = 0x9a -let i_stelem_i = 0x9b -let i_stelem_i1 = 0x9c -let i_stelem_i2 = 0x9d -let i_stelem_i4 = 0x9e -let i_stelem_i8 = 0x9f -let i_stelem_r4 = 0xa0 -let i_stelem_r8 = 0xa1 -let i_stelem_ref = 0xa2 -let i_conv_ovf_i1 = 0xb3 -let i_conv_ovf_u1 = 0xb4 -let i_conv_ovf_i2 = 0xb5 -let i_conv_ovf_u2 = 0xb6 -let i_conv_ovf_i4 = 0xb7 -let i_conv_ovf_u4 = 0xb8 -let i_conv_ovf_i8 = 0xb9 -let i_conv_ovf_u8 = 0xba -let i_refanyval = 0xc2 -let i_ckfinite = 0xc3 -let i_mkrefany = 0xc6 -let i_ldtoken = 0xd0 -let i_conv_u2 = 0xd1 -let i_conv_u1 = 0xd2 -let i_conv_i = 0xd3 -let i_conv_ovf_i = 0xd4 -let i_conv_ovf_u = 0xd5 -let i_add_ovf = 0xd6 -let i_add_ovf_un = 0xd7 -let i_mul_ovf = 0xd8 -let i_mul_ovf_un = 0xd9 -let i_sub_ovf = 0xda -let i_sub_ovf_un = 0xdb -let i_endfinally = 0xdc -let i_leave = 0xdd -let i_leave_s = 0xde -let i_stind_i = 0xdf -let i_conv_u = 0xe0 -let i_arglist = 0xfe00 -let i_ceq = 0xfe01 -let i_cgt = 0xfe02 -let i_cgt_un = 0xfe03 -let i_clt = 0xfe04 -let i_clt_un = 0xfe05 -let i_ldftn = 0xfe06 -let i_ldvirtftn = 0xfe07 -let i_ldarg = 0xfe09 -let i_ldarga = 0xfe0a -let i_starg = 0xfe0b -let i_ldloc = 0xfe0c -let i_ldloca = 0xfe0d -let i_stloc = 0xfe0e -let i_localloc = 0xfe0f -let i_endfilter = 0xfe11 -let i_unaligned = 0xfe12 -let i_volatile = 0xfe13 -let i_constrained = 0xfe16 -let i_readonly = 0xfe1e -let i_tail = 0xfe14 -let i_initobj = 0xfe15 -let i_cpblk = 0xfe17 -let i_initblk = 0xfe18 -let i_rethrow = 0xfe1a -let i_sizeof = 0xfe1c -let i_refanytype = 0xfe1d - -let i_ldelem_any = 0xa3 -let i_stelem_any = 0xa4 -let i_unbox_any = 0xa5 - -let mk_ldc i = (((mk_ldc_i32 (i)))) -let noarg_instrs = lazy - [ - i_ldc_i4_0, mk_ldc 0; - i_ldc_i4_1, mk_ldc 1; - i_ldc_i4_2, mk_ldc 2; - i_ldc_i4_3, mk_ldc 3; - i_ldc_i4_4, mk_ldc 4; - i_ldc_i4_5, mk_ldc 5; - i_ldc_i4_6, mk_ldc 6; - i_ldc_i4_7, mk_ldc 7; - i_ldc_i4_8, mk_ldc 8; - i_ldc_i4_m1, mk_ldc (0-1); - 0x0a, (I_stloc (uint16 ( 0))); - 0x0b, (I_stloc (uint16 ( 1))); - 0x0c, (I_stloc (uint16 ( 2))); - 0x0d, (I_stloc (uint16 ( 3))); - 0x06, (I_ldloc (uint16 ( 0))); - 0x07, (I_ldloc (uint16 ( 1))); - 0x08, (I_ldloc (uint16 ( 2))); - 0x09, (I_ldloc (uint16 ( 3))); - 0x02, (I_ldarg (uint16 ( 0))); - 0x03, (I_ldarg (uint16 ( 1))); - 0x04, (I_ldarg (uint16 ( 2))); - 0x05, (I_ldarg (uint16 ( 3))); - 0x2a, (I_ret); - 0x58, (I_arith AI_add); - 0xd6, (I_arith AI_add_ovf); - 0xd7, (I_arith AI_add_ovf_un); - 0x5f, (I_arith AI_and); - 0x5b, (I_arith AI_div); - 0x5c, (I_arith AI_div_un); - 0xfe01, (I_arith AI_ceq); - 0xfe02, (I_arith AI_cgt ); - 0xfe03, (I_arith AI_cgt_un); - 0xfe04, (I_arith AI_clt); - 0xfe05, (I_arith AI_clt_un); - 0x67, (I_arith (AI_conv DT_I1)); - 0x68, (I_arith (AI_conv DT_I2)); - 0x69, (I_arith (AI_conv DT_I4)); - 0x6a, (I_arith (AI_conv DT_I8)); - 0xd3, (I_arith (AI_conv DT_I)); - 0x6b, (I_arith (AI_conv DT_R4)); - 0x6c, (I_arith (AI_conv DT_R8)); - 0xd2, (I_arith (AI_conv DT_U1)); - 0xd1, (I_arith (AI_conv DT_U2)); - 0x6d, (I_arith (AI_conv DT_U4)); - 0x6e, (I_arith (AI_conv DT_U8)); - 0xe0, (I_arith (AI_conv DT_U)); - 0x76, (I_arith (AI_conv DT_R)); - 0xb3, (I_arith (AI_conv_ovf DT_I1)); - 0xb5, (I_arith (AI_conv_ovf DT_I2)); - 0xb7, (I_arith (AI_conv_ovf DT_I4)); - 0xb9, (I_arith (AI_conv_ovf DT_I8)); - 0xd4, (I_arith (AI_conv_ovf DT_I)); - 0xb4, (I_arith (AI_conv_ovf DT_U1)); - 0xb6, (I_arith (AI_conv_ovf DT_U2)); - 0xb8, (I_arith (AI_conv_ovf DT_U4)); - 0xba, (I_arith (AI_conv_ovf DT_U8)); - 0xd5, (I_arith (AI_conv_ovf DT_U)); - 0x82, (I_arith (AI_conv_ovf_un DT_I1)); - 0x83, (I_arith (AI_conv_ovf_un DT_I2)); - 0x84, (I_arith (AI_conv_ovf_un DT_I4)); - 0x85, (I_arith (AI_conv_ovf_un DT_I8)); - 0x8a, (I_arith (AI_conv_ovf_un DT_I)); - 0x86, (I_arith (AI_conv_ovf_un DT_U1)); - 0x87, (I_arith (AI_conv_ovf_un DT_U2)); - 0x88, (I_arith (AI_conv_ovf_un DT_U4)); - 0x89, (I_arith (AI_conv_ovf_un DT_U8)); - 0x8b, (I_arith (AI_conv_ovf_un DT_U)); - 0x9c, (I_stelem DT_I1); - 0x9d, (I_stelem DT_I2); - 0x9e, (I_stelem DT_I4); - 0x9f, (I_stelem DT_I8); - 0xa0, (I_stelem DT_R4); - 0xa1, (I_stelem DT_R8); - 0x9b, (I_stelem DT_I); - 0xa2, (I_stelem DT_REF); - 0x90, (I_ldelem DT_I1); - 0x92, (I_ldelem DT_I2); - 0x94, (I_ldelem DT_I4); - 0x96, (I_ldelem DT_I8); - 0x91, (I_ldelem DT_U1); - 0x93, (I_ldelem DT_U2); - 0x95, (I_ldelem DT_U4); - 0x98, (I_ldelem DT_R4); - 0x99, (I_ldelem DT_R8); - 0x97, (I_ldelem DT_I); - 0x9a, (I_ldelem DT_REF); - 0x5a, (I_arith AI_mul ); - 0xd8, (I_arith AI_mul_ovf); - 0xd9, (I_arith AI_mul_ovf_un); - 0x5d, (I_arith AI_rem ); - 0x5e, (I_arith AI_rem_un ); - 0x62, (I_arith AI_shl ); - 0x63, (I_arith AI_shr ); - 0x64, (I_arith AI_shr_un); - 0x59, (I_arith AI_sub ); - 0xda, (I_arith AI_sub_ovf); - 0xdb, (I_arith AI_sub_ovf_un); - 0x61, (I_arith AI_xor); - 0x60, (I_arith AI_or); - 0x65, (I_arith AI_neg); - 0x66, (I_arith AI_not); - i_ldnull, (I_arith AI_ldnull); - i_dup, (I_arith AI_dup); - i_pop, (I_arith AI_pop); - i_ckfinite, (I_arith AI_ckfinite); - i_nop, (I_arith AI_nop); - i_break, (I_break); - i_arglist, (I_arglist); - i_endfilter, (I_endfilter); - i_endfinally, I_endfinally; - i_refanytype, (I_refanytype); - i_localloc, (I_localloc); - i_throw, (I_throw); - i_ldlen, (I_ldlen); - i_rethrow, (I_rethrow); -];; - -let is_noarg_instr i = - match i with - | I_arith (AI_ldc (DT_I4, NUM_I4 n)) when (-1) <= n && n <= 8 -> true - | I_stloc n | I_ldloc n | I_ldarg n when n <= 3us -> true - | I_ret - | I_arith AI_add - | I_arith AI_add_ovf - | I_arith AI_add_ovf_un - | I_arith AI_and - | I_arith AI_div - | I_arith AI_div_un - | I_arith AI_ceq - | I_arith AI_cgt - | I_arith AI_cgt_un - | I_arith AI_clt - | I_arith AI_clt_un - | I_arith (AI_conv DT_I1) - | I_arith (AI_conv DT_I2) - | I_arith (AI_conv DT_I4) - | I_arith (AI_conv DT_I8) - | I_arith (AI_conv DT_I) - | I_arith (AI_conv DT_R4) - | I_arith (AI_conv DT_R8) - | I_arith (AI_conv DT_U1) - | I_arith (AI_conv DT_U2) - | I_arith (AI_conv DT_U4) - | I_arith (AI_conv DT_U8) - | I_arith (AI_conv DT_U) - | I_arith (AI_conv DT_R) - | I_arith (AI_conv_ovf DT_I1) - | I_arith (AI_conv_ovf DT_I2) - | I_arith (AI_conv_ovf DT_I4) - | I_arith (AI_conv_ovf DT_I8) - | I_arith (AI_conv_ovf DT_I) - | I_arith (AI_conv_ovf DT_U1) - | I_arith (AI_conv_ovf DT_U2) - | I_arith (AI_conv_ovf DT_U4) - | I_arith (AI_conv_ovf DT_U8) - | I_arith (AI_conv_ovf DT_U) - | I_arith (AI_conv_ovf_un DT_I1) - | I_arith (AI_conv_ovf_un DT_I2) - | I_arith (AI_conv_ovf_un DT_I4) - | I_arith (AI_conv_ovf_un DT_I8) - | I_arith (AI_conv_ovf_un DT_I) - | I_arith (AI_conv_ovf_un DT_U1) - | I_arith (AI_conv_ovf_un DT_U2) - | I_arith (AI_conv_ovf_un DT_U4) - | I_arith (AI_conv_ovf_un DT_U8) - | I_arith (AI_conv_ovf_un DT_U) - | I_stelem DT_I1 - | I_stelem DT_I2 - | I_stelem DT_I4 - | I_stelem DT_I8 - | I_stelem DT_R4 - | I_stelem DT_R8 - | I_stelem DT_I - | I_stelem DT_REF - | I_ldelem DT_I1 - | I_ldelem DT_I2 - | I_ldelem DT_I4 - | I_ldelem DT_I8 - | I_ldelem DT_U1 - | I_ldelem DT_U2 - | I_ldelem DT_U4 - | I_ldelem DT_R4 - | I_ldelem DT_R8 - | I_ldelem DT_I - | I_ldelem DT_REF - | I_arith AI_mul - | I_arith AI_mul_ovf - | I_arith AI_mul_ovf_un - | I_arith AI_rem - | I_arith AI_rem_un - | I_arith AI_shl - | I_arith AI_shr - | I_arith AI_shr_un - | I_arith AI_sub - | I_arith AI_sub_ovf - | I_arith AI_sub_ovf_un - | I_arith AI_xor - | I_arith AI_or - | I_arith AI_neg - | I_arith AI_not - | I_arith AI_ldnull - | I_arith AI_dup - | I_arith AI_pop - | I_arith AI_ckfinite - | I_arith AI_nop - | I_break - | I_arglist - | I_endfilter - | I_endfinally - | I_refanytype - | I_localloc - | I_throw - | I_ldlen - | I_rethrow -> true - | _ -> false - -let brcmp_map = lazy - (Dictionary.of_list - [ BI_beq , i_beq - ; BI_bgt , i_bgt - ; BI_bgt_un , i_bgt_un - ; BI_bge , i_bge - ; BI_bge_un , i_bge_un - ; BI_ble , i_ble - ; BI_ble_un , i_ble_un - ; BI_blt , i_blt - ; BI_blt_un , i_blt_un - ; BI_bne_un , i_bne_un - ; BI_brfalse , i_brfalse - ; BI_brtrue , i_brtrue ]) - -let brcmp_smap = lazy - (Dictionary.of_list - [ BI_beq , i_beq_s - ; BI_bgt , i_bgt_s - ; BI_bgt_un , i_bgt_un_s - ; BI_bge , i_bge_s - ; BI_bge_un , i_bge_un_s - ; BI_ble , i_ble_s - ; BI_ble_un , i_ble_un_s - ; BI_blt , i_blt_s - ; BI_blt_un , i_blt_un_s - ; BI_bne_un , i_bne_un_s - ; BI_brfalse , i_brfalse_s - ; BI_brtrue , i_brtrue_s ]) - -(* From corhdr.h *) - -let nt_VOID = 0x1 -let nt_BOOLEAN = 0x2 -let nt_I1 = 0x3 -let nt_U1 = 0x4 -let nt_I2 = 0x5 -let nt_U2 = 0x6 -let nt_I4 = 0x7 -let nt_U4 = 0x8 -let nt_I8 = 0x9 -let nt_U8 = 0xa -let nt_R4 = 0xb -let nt_R8 = 0xc -let nt_SYSCHAR = 0xd -let nt_VARIANT = 0xe -let nt_CURRENCY = 0xf -let nt_PTR = 0x10 -let nt_DECIMAL = 0x11 -let nt_DATE = 0x12 -let nt_BSTR = 0x13 -let nt_LPSTR = 0x14 -let nt_LPWSTR = 0x15 -let nt_LPTSTR = 0x16 -let nt_FIXEDSYSSTRING = 0x17 -let nt_OBJECTREF = 0x18 -let nt_IUNKNOWN = 0x19 -let nt_IDISPATCH = 0x1a -let nt_STRUCT = 0x1b -let nt_INTF = 0x1c -let nt_SAFEARRAY = 0x1d -let nt_FIXEDARRAY = 0x1e -let nt_INT = 0x1f -let nt_UINT = 0x20 -let nt_NESTEDSTRUCT = 0x21 -let nt_BYVALSTR = 0x22 -let nt_ANSIBSTR = 0x23 -let nt_TBSTR = 0x24 -let nt_VARIANTBOOL = 0x25 -let nt_FUNC = 0x26 -let nt_ASANY = 0x28 -let nt_ARRAY = 0x2a -let nt_LPSTRUCT = 0x2b -let nt_CUSTOMMARSHALER = 0x2c -let nt_ERROR = 0x2d -let nt_MAX = 0x50 - -(* From c:/clrenv.i386/Crt/Inc/i386/hs.h *) - -let vt_EMPTY = 0 -let vt_NULL = 1 -let vt_I2 = 2 -let vt_I4 = 3 -let vt_R4 = 4 -let vt_R8 = 5 -let vt_CY = 6 -let vt_DATE = 7 -let vt_BSTR = 8 -let vt_DISPATCH = 9 -let vt_ERROR = 10 -let vt_BOOL = 11 -let vt_VARIANT = 12 -let vt_UNKNOWN = 13 -let vt_DECIMAL = 14 -let vt_I1 = 16 -let vt_UI1 = 17 -let vt_UI2 = 18 -let vt_UI4 = 19 -let vt_I8 = 20 -let vt_UI8 = 21 -let vt_INT = 22 -let vt_UINT = 23 -let vt_VOID = 24 -let vt_HRESULT = 25 -let vt_PTR = 26 -let vt_SAFEARRAY = 27 -let vt_CARRAY = 28 -let vt_USERDEFINED = 29 -let vt_LPSTR = 30 -let vt_LPWSTR = 31 -let vt_RECORD = 36 -let vt_FILETIME = 64 -let vt_BLOB = 65 -let vt_STREAM = 66 -let vt_STORAGE = 67 -let vt_STREAMED_OBJECT = 68 -let vt_STORED_OBJECT = 69 -let vt_BLOB_OBJECT = 70 -let vt_CF = 71 -let vt_CLSID = 72 -let vt_VECTOR = 0x1000 -let vt_ARRAY = 0x2000 -let vt_BYREF = 0x4000 - - -let native_type_map = - lazy [ nt_CURRENCY , NativeType_currency - ; nt_BSTR , (* COM interop *) NativeType_bstr - ; nt_LPSTR , NativeType_lpstr - ; nt_LPWSTR , NativeType_lpwstr - ; nt_LPTSTR, NativeType_lptstr - ; nt_IUNKNOWN , (* COM interop *) NativeType_iunknown - ; nt_IDISPATCH , (* COM interop *) NativeType_idsipatch - ; nt_BYVALSTR , NativeType_byvalstr - ; nt_TBSTR , NativeType_tbstr - ; nt_LPSTRUCT , NativeType_lpstruct - ; nt_INTF , (* COM interop *) NativeType_interface - ; nt_STRUCT , NativeType_struct - ; nt_ERROR , (* COM interop *) NativeType_error - ; nt_VOID , NativeType_void - ; nt_BOOLEAN , NativeType_bool - ; nt_I1 , NativeType_int8 - ; nt_I2 , NativeType_int16 - ; nt_I4 , NativeType_int32 - ; nt_I8, NativeType_int64 - ; nt_R4 , NativeType_float32 - ; nt_R8 , NativeType_float64 - ; nt_U1 , NativeType_unsigned_int8 - ; nt_U2 , NativeType_unsigned_int16 - ; nt_U4 , NativeType_unsigned_int32 - ; nt_U8, NativeType_unsigned_int64 - ; nt_INT , NativeType_int - ; nt_UINT, NativeType_unsigned_int - ; nt_ANSIBSTR, (* COM interop *) NativeType_ansi_bstr - ; nt_VARIANTBOOL, (* COM interop *) NativeType_variant_bool - ; nt_FUNC , NativeType_method - ; nt_ASANY, NativeType_as_any ] - -let native_type_rmap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force native_type_map)) - -let variant_type_map = - lazy [ VariantType_empty , vt_EMPTY - ; VariantType_null , vt_NULL - ; VariantType_variant , vt_VARIANT - ; VariantType_currency , vt_CY - ; VariantType_decimal , vt_DECIMAL - ; VariantType_date , vt_DATE - ; VariantType_bstr , vt_BSTR - ; VariantType_lpstr , vt_LPSTR - ; VariantType_lpwstr , vt_LPWSTR - ; VariantType_iunknown , vt_UNKNOWN - ; VariantType_idispatch , vt_DISPATCH - ; VariantType_safearray , vt_SAFEARRAY - ; VariantType_error , vt_ERROR - ; VariantType_hresult , vt_HRESULT - ; VariantType_carray , vt_CARRAY - ; VariantType_userdefined , vt_USERDEFINED - ; VariantType_record , vt_RECORD - ; VariantType_filetime , vt_FILETIME - ; VariantType_blob , vt_BLOB - ; VariantType_stream , vt_STREAM - ; VariantType_storage , vt_STORAGE - ; VariantType_streamed_object , vt_STREAMED_OBJECT - ; VariantType_stored_object , vt_STORED_OBJECT - ; VariantType_blob_object , vt_BLOB_OBJECT - ; VariantType_cf , vt_CF - ; VariantType_clsid , vt_CLSID - ; VariantType_void , vt_VOID - ; VariantType_bool , vt_BOOL - ; VariantType_int8 , vt_I1 - ; VariantType_int16 , vt_I2 - ; VariantType_int32 , vt_I4 - ; VariantType_int64 , vt_I8 - ; VariantType_float32 , vt_R4 - ; VariantType_float64 , vt_R8 - ; VariantType_unsigned_int8 , vt_UI1 - ; VariantType_unsigned_int16 , vt_UI2 - ; VariantType_unsigned_int32 , vt_UI4 - ; VariantType_unsigned_int64 , vt_UI8 - ; VariantType_ptr , vt_PTR - ; VariantType_int , vt_INT - ; VariantType_unsigned_int , vt_UINT ] - -let variant_type_rmap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force variant_type_map)) - -let secaction_map = - lazy - [ SecAction_request , 0x0001 - ; SecAction_demand , 0x0002 - ; SecAction_assert , 0x0003 - ; SecAction_deny , 0x0004 - ; SecAction_permitonly , 0x0005 - ; SecAction_linkcheck , 0x0006 - ; SecAction_inheritcheck , 0x0007 - ; SecAction_reqmin , 0x0008 - ; SecAction_reqopt , 0x0009 - ; SecAction_reqrefuse , 0x000a - ; SecAction_prejitgrant , 0x000b - ; SecAction_prejitdeny , 0x000c - ; SecAction_noncasdemand , 0x000d - ; SecAction_noncaslinkdemand , 0x000e - ; SecAction_noncasinheritance , 0x000f - ; SecAction_linkdemandchoice , 0x0010 - ; SecAction_inheritancedemandchoice , 0x0011 - ; SecAction_demandchoice , 0x0012 ] - -let secaction_rmap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force secaction_map)) - -let e_CorILMethod_TinyFormat = 0x02 -let e_CorILMethod_FatFormat = 0x03 -let e_CorILMethod_FormatMask = 0x03 -let e_CorILMethod_MoreSects = 0x08 -let e_CorILMethod_InitLocals = 0x10 - - -let e_CorILMethod_Sect_EHTable = 0x1 -let e_CorILMethod_Sect_FatFormat = 0x40 -let e_CorILMethod_Sect_MoreSects = 0x80 - -let e_COR_ILEXCEPTION_CLAUSE_EXCEPTION = 0x0 -let e_COR_ILEXCEPTION_CLAUSE_FILTER = 0x1 -let e_COR_ILEXCEPTION_CLAUSE_FINALLY = 0x2 -let e_COR_ILEXCEPTION_CLAUSE_FAULT = 0x4 - -let e_IMAGE_CEE_CS_CALLCONV_FASTCALL = 0x04 -let e_IMAGE_CEE_CS_CALLCONV_STDCALL = 0x02 -let e_IMAGE_CEE_CS_CALLCONV_THISCALL = 0x03 -let e_IMAGE_CEE_CS_CALLCONV_CDECL = 0x01 -let e_IMAGE_CEE_CS_CALLCONV_VARARG = 0x05 -let e_IMAGE_CEE_CS_CALLCONV_FIELD = 0x06 -let e_IMAGE_CEE_CS_CALLCONV_LOCAL_SIG = 0x07 -let e_IMAGE_CEE_CS_CALLCONV_PROPERTY = 0x08 - -let e_IMAGE_CEE_CS_CALLCONV_GENERICINST = 0x0a -let e_IMAGE_CEE_CS_CALLCONV_GENERIC = 0x10 -let e_IMAGE_CEE_CS_CALLCONV_INSTANCE = 0x20 -let e_IMAGE_CEE_CS_CALLCONV_INSTANCE_EXPLICIT = 0x40 - - diff --git a/tools/FSharp_1.9.6.16/source/absil/ilbinary.mli b/tools/FSharp_1.9.6.16/source/absil/ilbinary.mli deleted file mode 100644 index de8525d7..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilbinary.mli +++ /dev/null @@ -1,517 +0,0 @@ -(* (c) Microsoft Corporation. All rights reserved *) - -/// Internal use only. Code and constants shared between binary reader/writer. -module Microsoft.FSharp.Compiler.AbstractIL.Internal.BinaryConstants - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - - -type table = Table of int -val tag_of_table : table -> int -val tab_Module : table -val tab_TypeRef : table -val tab_TypeDef : table -val tab_FieldPtr : table -val tab_Field : table -val tab_MethodPtr : table -val tab_Method : table -val tab_ParamPtr : table -val tab_Param : table -val tab_InterfaceImpl : table -val tab_MemberRef : table -val tab_Constant : table -val tab_CustomAttribute : table -val tab_FieldMarshal : table -val tab_Permission : table -val tab_ClassLayout : table -val tab_FieldLayout : table -val tab_StandAloneSig : table -val tab_EventMap : table -val tab_EventPtr : table -val tab_Event : table -val tab_PropertyMap : table -val tab_PropertyPtr : table -val tab_Property : table -val tab_MethodSemantics : table -val tab_MethodImpl : table -val tab_ModuleRef : table -val tab_TypeSpec : table -val tab_ImplMap : table -val tab_FieldRVA : table -val tab_ENCLog : table -val tab_ENCMap : table -val tab_Assembly : table -val tab_AssemblyProcessor : table -val tab_AssemblyOS : table -val tab_AssemblyRef : table -val tab_AssemblyRefProcessor : table -val tab_AssemblyRefOS : table -val tab_File : table -val tab_ExportedType : table -val tab_ManifestResource : table -val tab_Nested : table -val tab_GenericParam : table -val tab_GenericParamConstraint : table -val tab_MethodSpec : table -val tab_UserStrings : table -val sorted_table_info : (table * int) list -type typeDefOrRef_tag = TypeDefOrRefOrSpecTag of int32 -val tdor_TypeDef : typeDefOrRef_tag -val tdor_TypeRef : typeDefOrRef_tag -val tdor_TypeSpec : typeDefOrRef_tag -type hasConstant_tag = HasConstantTag of int32 -val hc_FieldDef : hasConstant_tag -val hc_ParamDef : hasConstant_tag -val hc_Property : hasConstant_tag -type hasCustomAttribute_tag = HasCustomAttributeTag of int32 -val hca_MethodDef : hasCustomAttribute_tag -val hca_FieldDef : hasCustomAttribute_tag -val hca_TypeRef : hasCustomAttribute_tag -val hca_TypeDef : hasCustomAttribute_tag -val hca_ParamDef : hasCustomAttribute_tag -val hca_InterfaceImpl : hasCustomAttribute_tag -val hca_MemberRef : hasCustomAttribute_tag -val hca_Module : hasCustomAttribute_tag -val hca_Permission : hasCustomAttribute_tag -val hca_Property : hasCustomAttribute_tag -val hca_Event : hasCustomAttribute_tag -val hca_StandAloneSig : hasCustomAttribute_tag -val hca_ModuleRef : hasCustomAttribute_tag -val hca_TypeSpec : hasCustomAttribute_tag -val hca_Assembly : hasCustomAttribute_tag -val hca_AssemblyRef : hasCustomAttribute_tag -val hca_File : hasCustomAttribute_tag -val hca_ExportedType : hasCustomAttribute_tag -val hca_ManifestResource : hasCustomAttribute_tag -type hasFieldMarshal_tag = HasFieldMarshalTag of int32 -val hfm_FieldDef : hasFieldMarshal_tag -val hfm_ParamDef : hasFieldMarshal_tag -type hasDeclSecurity_tag = HasDeclSecurityTag of int32 -val hds_TypeDef : hasDeclSecurity_tag -val hds_MethodDef : hasDeclSecurity_tag -val hds_Assembly : hasDeclSecurity_tag -type memberRefParent_tag = MemberRefParentTag of int32 -val mrp_TypeRef : memberRefParent_tag -val mrp_ModuleRef : memberRefParent_tag -val mrp_MethodDef : memberRefParent_tag -val mrp_TypeSpec : memberRefParent_tag -type hasSemantics_tag = HasSemanticsTag of int32 -val hs_Event : hasSemantics_tag -val hs_Property : hasSemantics_tag -type methodDefOrRef_tag = MethodDefOrRefTag of int32 -val mdor_MethodDef : methodDefOrRef_tag -val mdor_MemberRef : methodDefOrRef_tag -type memberForwarded_tag = MemberForwardedTag of int32 -val mf_FieldDef : memberForwarded_tag -val mf_MethodDef : memberForwarded_tag -type implementation_tag = ImplementationTag of int32 -val i_File : implementation_tag -val i_AssemblyRef : implementation_tag -val i_ExportedType : implementation_tag -type customAttributeType_tag = CustomAttributeTypeTag of int32 -val cat_MethodDef : customAttributeType_tag -val cat_MemberRef : customAttributeType_tag -type resolutionScope_tag = ResolutionScopeTag of int32 -val rs_Module : resolutionScope_tag -val rs_ModuleRef : resolutionScope_tag -val rs_AssemblyRef : resolutionScope_tag -val rs_TypeRef : resolutionScope_tag -type typeOrMethodDef_tag = TypeOrMethodDefTag of int32 -val tomd_TypeDef : typeOrMethodDef_tag -val tomd_MethodDef : typeOrMethodDef_tag - -val mkTypeDefOrRefOrSpecTag: int32 -> typeDefOrRef_tag -val mkHasConstantTag : int32 -> hasConstant_tag -val mkHasCustomAttributeTag : int32 -> hasCustomAttribute_tag -val mkHasFieldMarshalTag : int32 -> hasFieldMarshal_tag -val mkHasDeclSecurityTag : int32 -> hasDeclSecurity_tag -val mkMemberRefParentTag : int32 -> memberRefParent_tag -val mkHasSemanticsTag : int32 -> hasSemantics_tag -val mkMethodDefOrRefTag : int32 -> methodDefOrRef_tag -val mkMemberForwardedTag : int32 -> memberForwarded_tag -val mkImplementationTag : int32 -> implementation_tag -val mkCustomAttributeTypeTag : int32 -> customAttributeType_tag -val mkResolutionScopeTag : int32 -> resolutionScope_tag -val mkTypeOrMethodDefTag : int32 -> typeOrMethodDef_tag - -val et_END : int -val et_VOID : int -val et_BOOLEAN : int -val et_CHAR : int -val et_I1 : int -val et_U1 : int -val et_I2 : int -val et_U2 : int -val et_I4 : int -val et_U4 : int -val et_I8 : int -val et_U8 : int -val et_R4 : int -val et_R8 : int -val et_STRING : int -val et_PTR : int -val et_BYREF : int -val et_VALUETYPE : int -val et_CLASS : int -val et_VAR : int -val et_ARRAY : int -val et_WITH : int -val et_TYPEDBYREF : int -val et_I : int -val et_U : int -val et_FNPTR : int -val et_OBJECT : int -val et_SZARRAY : int -val et_MVAR : int -val et_CMOD_REQD : int -val et_CMOD_OPT : int -val et_SENTINEL : int -val et_PINNED : int -val i_nop : int -val i_break : int -val i_ldarg_0 : int -val i_ldarg_1 : int -val i_ldarg_2 : int -val i_ldarg_3 : int -val i_ldloc_0 : int -val i_ldloc_1 : int -val i_ldloc_2 : int -val i_ldloc_3 : int -val i_stloc_0 : int -val i_stloc_1 : int -val i_stloc_2 : int -val i_stloc_3 : int -val i_ldarg_s : int -val i_ldarga_s : int -val i_starg_s : int -val i_ldloc_s : int -val i_ldloca_s : int -val i_stloc_s : int -val i_ldnull : int -val i_ldc_i4_m1 : int -val i_ldc_i4_0 : int -val i_ldc_i4_1 : int -val i_ldc_i4_2 : int -val i_ldc_i4_3 : int -val i_ldc_i4_4 : int -val i_ldc_i4_5 : int -val i_ldc_i4_6 : int -val i_ldc_i4_7 : int -val i_ldc_i4_8 : int -val i_ldc_i4_s : int -val i_ldc_i4 : int -val i_ldc_i8 : int -val i_ldc_r4 : int -val i_ldc_r8 : int -val i_dup : int -val i_pop : int -val i_jmp : int -val i_call : int -val i_calli : int -val i_ret : int -val i_br_s : int -val i_brfalse_s : int -val i_brtrue_s : int -val i_beq_s : int -val i_bge_s : int -val i_bgt_s : int -val i_ble_s : int -val i_blt_s : int -val i_bne_un_s : int -val i_bge_un_s : int -val i_bgt_un_s : int -val i_ble_un_s : int -val i_blt_un_s : int -val i_br : int -val i_brfalse : int -val i_brtrue : int -val i_beq : int -val i_bge : int -val i_bgt : int -val i_ble : int -val i_blt : int -val i_bne_un : int -val i_bge_un : int -val i_bgt_un : int -val i_ble_un : int -val i_blt_un : int -val i_switch : int -val i_ldind_i1 : int -val i_ldind_u1 : int -val i_ldind_i2 : int -val i_ldind_u2 : int -val i_ldind_i4 : int -val i_ldind_u4 : int -val i_ldind_i8 : int -val i_ldind_i : int -val i_ldind_r4 : int -val i_ldind_r8 : int -val i_ldind_ref : int -val i_stind_ref : int -val i_stind_i1 : int -val i_stind_i2 : int -val i_stind_i4 : int -val i_stind_i8 : int -val i_stind_r4 : int -val i_stind_r8 : int -val i_add : int -val i_sub : int -val i_mul : int -val i_div : int -val i_div_un : int -val i_rem : int -val i_rem_un : int -val i_and : int -val i_or : int -val i_xor : int -val i_shl : int -val i_shr : int -val i_shr_un : int -val i_neg : int -val i_not : int -val i_conv_i1 : int -val i_conv_i2 : int -val i_conv_i4 : int -val i_conv_i8 : int -val i_conv_r4 : int -val i_conv_r8 : int -val i_conv_u4 : int -val i_conv_u8 : int -val i_callvirt : int -val i_cpobj : int -val i_ldobj : int -val i_ldstr : int -val i_newobj : int -val i_castclass : int -val i_isinst : int -val i_conv_r_un : int -val i_unbox : int -val i_throw : int -val i_ldfld : int -val i_ldflda : int -val i_stfld : int -val i_ldsfld : int -val i_ldsflda : int -val i_stsfld : int -val i_stobj : int -val i_conv_ovf_i1_un : int -val i_conv_ovf_i2_un : int -val i_conv_ovf_i4_un : int -val i_conv_ovf_i8_un : int -val i_conv_ovf_u1_un : int -val i_conv_ovf_u2_un : int -val i_conv_ovf_u4_un : int -val i_conv_ovf_u8_un : int -val i_conv_ovf_i_un : int -val i_conv_ovf_u_un : int -val i_box : int -val i_newarr : int -val i_ldlen : int -val i_ldelema : int -val i_ldelem_i1 : int -val i_ldelem_u1 : int -val i_ldelem_i2 : int -val i_ldelem_u2 : int -val i_ldelem_i4 : int -val i_ldelem_u4 : int -val i_ldelem_i8 : int -val i_ldelem_i : int -val i_ldelem_r4 : int -val i_ldelem_r8 : int -val i_ldelem_ref : int -val i_stelem_i : int -val i_stelem_i1 : int -val i_stelem_i2 : int -val i_stelem_i4 : int -val i_stelem_i8 : int -val i_stelem_r4 : int -val i_stelem_r8 : int -val i_stelem_ref : int -val i_conv_ovf_i1 : int -val i_conv_ovf_u1 : int -val i_conv_ovf_i2 : int -val i_conv_ovf_u2 : int -val i_conv_ovf_i4 : int -val i_conv_ovf_u4 : int -val i_conv_ovf_i8 : int -val i_conv_ovf_u8 : int -val i_refanyval : int -val i_ckfinite : int -val i_mkrefany : int -val i_ldtoken : int -val i_conv_u2 : int -val i_conv_u1 : int -val i_conv_i : int -val i_conv_ovf_i : int -val i_conv_ovf_u : int -val i_add_ovf : int -val i_add_ovf_un : int -val i_mul_ovf : int -val i_mul_ovf_un : int -val i_sub_ovf : int -val i_sub_ovf_un : int -val i_endfinally : int -val i_leave : int -val i_leave_s : int -val i_stind_i : int -val i_conv_u : int -val i_arglist : int -val i_ceq : int -val i_cgt : int -val i_cgt_un : int -val i_clt : int -val i_clt_un : int -val i_ldftn : int -val i_ldvirtftn : int -val i_ldarg : int -val i_ldarga : int -val i_starg : int -val i_ldloc : int -val i_ldloca : int -val i_stloc : int -val i_localloc : int -val i_endfilter : int -val i_unaligned : int -val i_volatile : int -val i_constrained : int -val i_readonly : int -val i_tail : int -val i_initobj : int -val i_cpblk : int -val i_initblk : int -val i_rethrow : int -val i_sizeof : int -val i_refanytype : int -val i_ldelem_any : int -val i_stelem_any : int -val i_unbox_any : int -val noarg_instrs : Lazy<(int * ILInstr) list> -val is_noarg_instr : ILInstr -> bool -val brcmp_map : System.Collections.Generic.Dictionary Lazy.t -val brcmp_smap : System.Collections.Generic.Dictionary Lazy.t -val nt_VOID : int -val nt_BOOLEAN : int -val nt_I1 : int -val nt_U1 : int -val nt_I2 : int -val nt_U2 : int -val nt_I4 : int -val nt_U4 : int -val nt_I8 : int -val nt_U8 : int -val nt_R4 : int -val nt_R8 : int -val nt_SYSCHAR : int -val nt_VARIANT : int -val nt_CURRENCY : int -val nt_PTR : int -val nt_DECIMAL : int -val nt_DATE : int -val nt_BSTR : int -val nt_LPSTR : int -val nt_LPWSTR : int -val nt_LPTSTR : int -val nt_FIXEDSYSSTRING : int -val nt_OBJECTREF : int -val nt_IUNKNOWN : int -val nt_IDISPATCH : int -val nt_STRUCT : int -val nt_INTF : int -val nt_SAFEARRAY : int -val nt_FIXEDARRAY : int -val nt_INT : int -val nt_UINT : int -val nt_NESTEDSTRUCT : int -val nt_BYVALSTR : int -val nt_ANSIBSTR : int -val nt_TBSTR : int -val nt_VARIANTBOOL : int -val nt_FUNC : int -val nt_ASANY : int -val nt_ARRAY : int -val nt_LPSTRUCT : int -val nt_CUSTOMMARSHALER : int -val nt_ERROR : int -val nt_MAX : int -val vt_EMPTY : int32 -val vt_NULL : int32 -val vt_I2 : int32 -val vt_I4 : int32 -val vt_R4 : int32 -val vt_R8 : int32 -val vt_CY : int32 -val vt_DATE : int32 -val vt_BSTR : int32 -val vt_DISPATCH : int32 -val vt_ERROR : int32 -val vt_BOOL : int32 -val vt_VARIANT : int32 -val vt_UNKNOWN : int32 -val vt_DECIMAL : int32 -val vt_I1 : int32 -val vt_UI1 : int32 -val vt_UI2 : int32 -val vt_UI4 : int32 -val vt_I8 : int32 -val vt_UI8 : int32 -val vt_INT : int32 -val vt_UINT : int32 -val vt_VOID : int32 -val vt_HRESULT : int32 -val vt_PTR : int32 -val vt_SAFEARRAY : int32 -val vt_CARRAY : int32 -val vt_USERDEFINED : int32 -val vt_LPSTR : int32 -val vt_LPWSTR : int32 -val vt_RECORD : int32 -val vt_FILETIME : int32 -val vt_BLOB : int32 -val vt_STREAM : int32 -val vt_STORAGE : int32 -val vt_STREAMED_OBJECT : int32 -val vt_STORED_OBJECT : int32 -val vt_BLOB_OBJECT : int32 -val vt_CF : int32 -val vt_CLSID : int32 -val vt_VECTOR : int32 -val vt_ARRAY : int32 -val vt_BYREF : int32 -val native_type_map : (int * ILNativeType) list Lazy.t -val native_type_rmap : (ILNativeType * int) list Lazy.t -val variant_type_map : (ILNativeVariantType * int32) list Lazy.t -val variant_type_rmap : (int32 * ILNativeVariantType) list Lazy.t -val secaction_map : (ILSecurityAction * int) list Lazy.t -val secaction_rmap : (int * ILSecurityAction) list Lazy.t -val e_CorILMethod_TinyFormat : int32 -val e_CorILMethod_FatFormat : int32 -val e_CorILMethod_FormatMask : int32 -val e_CorILMethod_MoreSects : int32 -val e_CorILMethod_InitLocals : int32 -val e_CorILMethod_Sect_EHTable : int32 -val e_CorILMethod_Sect_FatFormat : int32 -val e_CorILMethod_Sect_MoreSects : int32 -val e_COR_ILEXCEPTION_CLAUSE_EXCEPTION : int32 -val e_COR_ILEXCEPTION_CLAUSE_FILTER : int32 -val e_COR_ILEXCEPTION_CLAUSE_FINALLY : int32 -val e_COR_ILEXCEPTION_CLAUSE_FAULT : int32 - -val e_IMAGE_CEE_CS_CALLCONV_FASTCALL : int -val e_IMAGE_CEE_CS_CALLCONV_STDCALL : int -val e_IMAGE_CEE_CS_CALLCONV_THISCALL : int -val e_IMAGE_CEE_CS_CALLCONV_CDECL : int -val e_IMAGE_CEE_CS_CALLCONV_VARARG : int - -val e_IMAGE_CEE_CS_CALLCONV_FIELD : int -val e_IMAGE_CEE_CS_CALLCONV_LOCAL_SIG : int -val e_IMAGE_CEE_CS_CALLCONV_GENERICINST : int -val e_IMAGE_CEE_CS_CALLCONV_PROPERTY : int - -val e_IMAGE_CEE_CS_CALLCONV_INSTANCE : int -val e_IMAGE_CEE_CS_CALLCONV_INSTANCE_EXPLICIT : int -val e_IMAGE_CEE_CS_CALLCONV_GENERIC : int - - diff --git a/tools/FSharp_1.9.6.16/source/absil/ildiag.ml b/tools/FSharp_1.9.6.16/source/absil/ildiag.ml deleted file mode 100644 index 8f87b055..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ildiag.ml +++ /dev/null @@ -1,28 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -/// Configurable AppDomain-global diagnostics channel for the Abstract IL library -/// -/// REVIEW: review if we should just switch to System.Diagnostics -module Microsoft.FSharp.Compiler.AbstractIL.Diagnostics - -open Internal.Utilities -open Internal.Utilities.Pervasives - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -let diagnosticsLog = ref (Some stdout) -let dflushn () = match !diagnosticsLog with None -> () | Some d -> d.WriteLine(); flush d -let dflush () = match !diagnosticsLog with None -> () | Some d -> flush d -let dprintn s = - match !diagnosticsLog with None -> () | Some d -> output_string d s; output_string d "\n"; dflush() -let dprint s = - match !diagnosticsLog with None -> () | Some d -> output_string d s; dflush() - -let dprintf (fmt: (_,_,_,_) format4) = - Printf.kfprintf dflush (match !diagnosticsLog with None -> System.IO.TextWriter.Null | Some d -> d) fmt - -let dprintfn (fmt: (_,_,_,_) format4) = - Printf.kfprintf dflushn (match !diagnosticsLog with None -> System.IO.TextWriter.Null | Some d -> d) fmt - -let setDiagnosticsChannel s = diagnosticsLog := s diff --git a/tools/FSharp_1.9.6.16/source/absil/ildiag.mli b/tools/FSharp_1.9.6.16/source/absil/ildiag.mli deleted file mode 100644 index 2d544846..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ildiag.mli +++ /dev/null @@ -1,23 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -/// Diagnostics from the AbsIL toolkit. You can reset the diagnostics -/// stream to point elsewhere, or turn it -/// off altogether by setting it to 'None'. The logging channel initally -/// points to stderr. All functions call flush() automatically. -/// -/// REVIEW: review if we should just switch to System.Diagnostics -module Microsoft.FSharp.Compiler.AbstractIL.Diagnostics - -open System.IO -open Microsoft.FSharp.Text.Printf -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -val public setDiagnosticsChannel: TextWriter option -> unit - -val public dprintfn: TextWriterFormat<'a> -> 'a -val public dprintf: TextWriterFormat<'a> -> 'a - -val public dprintn: string -> unit -val public dprint: string -> unit - diff --git a/tools/FSharp_1.9.6.16/source/absil/illex.mll b/tools/FSharp_1.9.6.16/source/absil/illex.mll deleted file mode 100644 index f4df93d1..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/illex.mll +++ /dev/null @@ -1,240 +0,0 @@ - -{ -// (c) Microsoft Corporation 2005-2009. - -module Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiLexer - -open Internal.Utilities -open Internal.Utilities.Text -open Internal.Utilities.Text.Lexing -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -module Ildiag = Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -module Ilpars = Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser -module Ilascii = Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiConstants - - -open Ildiag -open Ilpars -open Ilascii - -let lexeme (lexbuf : LexBuffer) = new System.String(lexbuf.Lexeme) - -let unexpected_char lexbuf = - dprintf "Unexpected character '%s'" (lexeme lexbuf); - raise Parsing.RecoverableParseError ;; - -let unquote n m s = - String.sub s n (String.length s-(n+m));; - -(* -------------------------------------------------------------------- - * STRING LITERALS - * -------------------------------------------------------------------- *) - -let string_buffer = Buffer.create 256 -let reset_string_buffer () = Buffer.clear string_buffer -let store_string_char c = Buffer.add_char string_buffer c -let get_stored_string () =Buffer.contents string_buffer - -let escape = function - | 'n' -> '\010' - | 'r' -> '\013' - | 'b' -> '\008' - | 't' -> '\009' - | c -> c - -(* -------------------------------------------------------------------- - * Keywords - * -------------------------------------------------------------------- *) - -let keywords = lazy - -[ - "void",VOID -; "bool",BOOL -; "bytearray",BYTEARRAY -; "cdecl",CDECL -; "char",CHAR -; "class",CLASS -; "default",DEFAULT -; "explicit",EXPLICIT -; "fastcall",FASTCALL -; "float32",FLOAT32 -; "float64",FLOAT64 -; "instance",INSTANCE -; "int",INT -; "int16",INT16 -; "int32",INT32 -; "int64",INT64 -; "int8",INT8 -; "method",METHOD -; "native",NATIVE -; "object", OBJECT -; "stdcall",STDCALL -; "string",STRING -; "thiscall",THISCALL -; "typedref",TYPEDREF -; "uint",UINT -; "uint16",UINT16 -; "uint32",UINT32 -; "uint64",UINT64 -; "uint8",UINT8 -; "unmanaged",UNMANAGED -; "unsigned",UNSIGNED -; "value",VALUE -; "valuetype",VALUETYPE -; "vararg",VARARG - -] - -(* -------------------------------------------------------------------- - * Instructions - * -------------------------------------------------------------------- *) - -let addTable t f l = List.iter (fun (x,i) -> Hashtbl.add t (String.concat "." x) (f i)) (Lazy.force l) - -let kwd_instr_table = - lazy begin - let t = Hashtbl.create 1000 in - List.iter (fun (x,y) -> Hashtbl.add t x y) (Lazy.force keywords); - addTable t (fun i -> INSTR_NONE i) none_instrs; - addTable t (fun i -> INSTR_ARG i) arg_instrs; - addTable t (fun i -> INSTR_LOC i) loc_instrs; - addTable t (fun i -> INSTR_I i) i32_instrs; - addTable t (fun i -> INSTR_I32_I32 i) i32_i32_instrs; - addTable t (fun i -> INSTR_I8 i) i64_instrs; - addTable t (fun i -> INSTR_R i) real_instrs; - addTable t (fun i -> INSTR_METHOD i) method_instrs; - //addTable t (fun i -> INSTR_FIELD i) field_instrs; - addTable t (fun i -> INSTR_TYPE i) type_instrs; - addTable t (fun i -> INSTR_INT_TYPE i) int_type_instrs; - addTable t (fun i -> INSTR_VALUETYPE i) valuetype_instrs; - addTable t (fun i -> INSTR_STRING i) string_instrs; - //addTable t (fun i -> INSTR_SIG i) sig_instrs; - addTable t (fun i -> INSTR_TOK i) tok_instrs; - //addTable t (fun i -> INSTR_SWITCH i) switch_instrs; - t - end - -let kwd_or_instr s = Hashtbl.find (Lazy.force kwd_instr_table) s (* words *) - -let eval = function - | '0' -> 0 | '1' -> 1 | '2' -> 2 | '3' -> 3 | '4' -> 4 | '5' -> 5 - | '6' -> 6 | '7' -> 7 | '8' -> 8 | '9' -> 9 - | 'A' -> 10 | 'B' -> 11 | 'C' -> 12 | 'D' -> 13 | 'E' -> 14 | 'F' -> 15 - | 'a' -> 10 | 'b' -> 11 | 'c' -> 12 | 'd' -> 13 | 'e' -> 14 | 'f' -> 15 - | _ -> failwith "bad hexbyte" - -let kwd_or_instr_or_id s = if Hashtbl.mem (Lazy.force kwd_instr_table) s then kwd_or_instr s else VAL_ID s - -} - -(* -------------------------------------------------------------------- - * The Rules - * -------------------------------------------------------------------- *) -rule token = parse - | "," { COMMA } - | "." { DOT } - | "*" { STAR } - | "!" { BANG } - | "&" { AMP } - | "(" { LPAREN } - | ")" { RPAREN } - | "[" { LBRACK } - | "]" { RBRACK } - | "/" { SLASH } - | "<" { LESS } - | ">" { GREATER } - | "..." { ELIPSES } - | "::" { DCOLON } - | "+" { PLUS } - | (['0'-'9']) | (['0'-'9']['0'-'9']['0'-'9']+) - { VAL_INT64(int64(lexeme lexbuf)) } - - (* We need to be able to parse all of *) - (* ldc.r8 0. *) - (* float64(-657435.) *) - (* and int32[0...,0...] *) - (* The problem is telling an integer-followed-by-ellipses from a floating-point-nubmer-followed-by-dots *) - - | ((['0'-'9']) | (['0'-'9']['0'-'9']['0'-'9']+)) "..." - { let b = lexeme lexbuf in - VAL_INT32_ELIPSES(int32(String.sub b 0 (String.length b - 3))) } - | ['0'-'9' 'A'-'F' 'a'-'f' ] ['0'-'9' 'A'-'F' 'a'-'f' ] - { let c1 = String.get (lexeme lexbuf) 0 in - let c2 = String.get (lexeme lexbuf) 1 in - if !lexing_bytearray then - VAL_HEXBYTE (16 * eval c1 + eval c2) - else if c1 >= '0' & c1 <= '9' & c2 >= '0' & c2 <= '9' then - VAL_INT64(int64 (10*eval c1 + eval c2) ) - else VAL_ID(lexeme lexbuf) } - | '0' 'x' ['0'-'9' 'a'-'f' 'A'-'F']+ - { VAL_INT64(int64(lexeme lexbuf)) } - | "FFFFFF" ['0'-'9' 'A'-'F' 'a'-'f' ] ['0'-'9' 'A'-'F' 'a'-'f' ] - { let c1 = (lexeme lexbuf).[6] in - let c2 = (lexeme lexbuf).[7] in - if !lexing_bytearray then - VAL_HEXBYTE (16 * eval c1 + eval c2) - else if c1 >= '0' & c1 <= '9' & c2 >= '0' & c2 <= '9' then - VAL_INT64(int64 (10*eval c1 + eval c2)) - else VAL_ID(lexeme lexbuf) } - - | '-' ['0'-'9']+ - { VAL_INT64(int64(lexeme lexbuf)) } - | ('+'|'-')? ['0'-'9']+ ('.' ['0' - '9']*)? (('E'|'e') ('-'|'+')? ['0' - '9']+)? - { VAL_FLOAT64( (float (lexeme lexbuf)) ) } - - | '\'' - { reset_string_buffer(); - singleQuoteString lexbuf; - VAL_SQSTRING (get_stored_string()) } - | "\"" - { reset_string_buffer(); - stringToken lexbuf; - VAL_QSTRING (get_stored_string()) } - - | ("ldarg"|"ldc"|"ldloc"|"stloc"|"bne"|"conv"|"ble"|"bgt"|"bge"|"blt"|"cle"|"cgt"|"cge"|"clt"|"ceq"|"brtrue"|"brfalse"|"br"|"add"|"sub"|"div"|"rem"|"mul"|"beq"|"bne"|"cne"|"ldarga"|"ldloca"|"ldind"|"leave"|"newarr"|"shr"|"starg"|"stind"|"ldelem"|"ldelema"|"ldlen"|"stelem"|"unbox"|"box"|"initobj") '.' ['a'-'z' 'A'-'Z' '0'-'9' '.']+ - { let s = (lexeme lexbuf) in kwd_or_instr s } - | [ '`' '\128'-'\255' '@' '?' '$' 'a'-'z' 'A'-'Z' '_'] [ '`' '\128'-'\255' '$' 'a'-'z' 'A'-'Z' '0'-'9' '-' '_' '@' '$' ] * - { kwd_or_instr_or_id (lexeme lexbuf) } - | [ '`' '\128'-'\255' '@' '?' '$' 'a'-'z' 'A'-'Z' '_'] [ '`' '\128'-'\255' '$' 'a'-'z' 'A'-'Z' '0'-'9' '-' '_' '@' '$' ]+ - ('.' [ '`' '\128'-'\255' '@' '?' '$' 'a'-'z' 'A'-'Z' '_'] [ '`' '\128'-'\255' '$' 'a'-'z' 'A'-'Z' '0'-'9' '-' '_' '@' '$' ] +)+ - { VAL_DOTTEDNAME(lexeme lexbuf) } - | ".cctor" {DOT_CCTOR} - | ".ctor" {DOT_CTOR} - - | [' ' '\t' '\r' '\n'] - { token lexbuf } - | _ - { unexpected_char lexbuf } - | eof - { EOF } - -and singleQuoteString = parse - '\'' - { () } - | '\\' ("\010" | "\013" | "\013\010") [' ' '\009'] * - { singleQuoteString lexbuf } - | '\\' ['\\' '\'' 'n' 't' 'b' 'r'] - { store_string_char(escape(String.get (lexeme lexbuf) 1)); - singleQuoteString lexbuf } - | eof - { failwith "unterminated string" } - | _ - { store_string_char(String.get (lexeme lexbuf) 0); - singleQuoteString lexbuf } - -and stringToken = parse - '"' - { () } - | '\\' ("\010" | "\013" | "\013\010") [' ' '\009'] * - { stringToken lexbuf } - | '\\' ['\\' '"' 'n' 't' 'b' 'r'] - { store_string_char(escape(String.get (lexeme lexbuf) 1)); - stringToken lexbuf } - | eof - { failwith "unterminated string" } - | _ - { store_string_char(String.get (lexeme lexbuf) 0); - stringToken lexbuf } diff --git a/tools/FSharp_1.9.6.16/source/absil/illib.ml b/tools/FSharp_1.9.6.16/source/absil/illib.ml deleted file mode 100644 index 4d4d54d6..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/illib.ml +++ /dev/null @@ -1,902 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved( - -#light - -module Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -open System.Collections -open System.Collections.Generic -open Internal.Utilities -open Internal.Utilities.Pervasives - -let notlazy v = Lazy.CreateFromValue v - -let isSome x = match x with None -> false | _ -> true -let isNone x = match x with None -> true | _ -> false -let isNil x = match x with [] -> true | _ -> false -let nonNil x = match x with [] -> false | _ -> true -let isNonNull (x : 'a) = match (x :> obj) with null -> false | _ -> true -let nonNull msg x = if isNonNull x then x else failwith ("null: " ^ msg) -let (===) x y = (x == y) - -//------------------------------------------------------------------------- -// Library: arrays,lists,options -//------------------------------------------------------------------------- - -module Array = - - let mapq f inp = - match inp with - | [| |] -> inp - | _ -> - let res = Array.map f inp - let len = inp.Length - let mutable eq = true - let mutable i = 0 - while eq && i < len do - if not (inp.[i] === res.[i]) then eq <- false; - i <- i + 1 - if eq then inp else res - - let for_all2 f (arr1:'a array) (arr2:'a array) = - let len1 = arr1.Length - let len2 = arr2.Length - if len1 <> len2 then invalid_arg "Array.for_all2" - let rec loop i = (i >= len1) || (f arr1.[i] arr2.[i] && loop (i+1)) - loop 0 - - let mapfold f s l = - let mutable acc = s - let n = Array.length l - let mutable res = Array.zeroCreate n - for i = 0 to n - 1 do - let h',s' = f acc l.[i] - res.[i] <- h'; - acc <- s' - res, acc - - // REVIEW: systematically eliminate fmap/mapfold duplication - let fmap f s l = - let mutable acc = s - let n = Array.length l - let mutable res = Array.zeroCreate n - for i = 0 to n - 1 do - let s',h' = f acc l.[i] - res.[i] <- h' - acc <- s' - acc, res - - let order eltOrder (xs:array<_>) (ys:array<_>) = - let c = compare xs.Length ys.Length - if c <> 0 then c else - let rec loop i = - if i >= xs.Length then 0 else - let c = eltOrder xs.[i] ys.[i] - if c <> 0 then c else - loop (i+1) - loop 0 - - let existsOne p l = - let rec array_forall_aux p l n = - (n >= Array.length l) || (p l.[n] && array_forall_aux p l (n+1)) - - let rec array_exists_one_aux p l n = - (n < Array.length l) && - (if p l.[n] then array_forall_aux (fun x -> not (p x)) l (n+1) else array_exists_one_aux p l (n+1)) - - array_exists_one_aux p l 0 - - -module Option = - let mapfold f s opt = - match opt with - | None -> None,s - | Some x -> let x',s' = f s x in Some x',s' - - let otherwise opt dflt = - match opt with - | None -> dflt - | Some x -> x - - // REVIEW: systematically eliminate fmap/mapfold duplication - let fmap f z l = - match l with - | None -> z,None - | Some x -> let z,x = f z x - z,Some x - - let fold f z x = - match x with - | None -> z - | Some x -> f z x - - -let (+??) opt dflt = match opt with None -> dflt() | Some x -> opt -let (+?) opt dflt = match opt with None -> dflt() | Some x -> x - -let the = function None -> failwith "the" | Some x -> x - -module List = - - let existsi f xs = - let rec loop i xs = match xs with [] -> false | h::t -> f i h || loop (i+1) t - loop 0 xs - - let lengthsEqAndForall2 p l1 l2 = - List.length l1 = List.length l2 && - List.forall2 p l1 l2 - - let rec findi n f l = - match l with - | [] -> None - | h::t -> if f h then Some (h,n) else findi (n+1) f t - - let chop n l = - if n = List.length l then (l,[]) else // avoids allocation unless necessary - let rec loop n l acc = - if n <= 0 then (List.rev acc,l) else - match l with - | [] -> failwith "List.chop: overchop" - | (h::t) -> loop (n-1) t (h::acc) - loop n l [] - - let take n l = - if n = List.length l then l else - let rec loop acc n l = - match l with - | [] -> List.rev acc - | x::xs -> if n<=0 then List.rev acc else loop (x::acc) (n-1) xs - - loop [] n l - - let rec drop n l = - match l with - | [] -> [] - | x::xs -> if n=0 then l else drop (n-1) xs - - - let splitChoose select l = - let rec ch acc1 acc2 l = - match l with - | [] -> List.rev acc1,List.rev acc2 - | x::xs -> - match select x with - | Choice1Of2 sx -> ch (sx::acc1) acc2 xs - | Choice2Of2 sx -> ch acc1 (sx::acc2) xs - - ch [] [] l - - let mapq (f: 'a -> 'a) inp = - assert not (typeof<'a>.IsValueType) - match inp with - | [] -> inp - | _ -> - let res = List.map f inp - let rec check l1 l2 = - match l1,l2 with - | h1::t1,h2::t2 -> - System.Runtime.CompilerServices.RuntimeHelpers.Equals(h1,h2) && check t1 t2 - | _ -> true - if check inp res then inp else res - - let frontAndBack l = - let rec loop acc l = - match l with - | [] -> - System.Diagnostics.Debug.Assert(false, "empty list") - invalidArg "l" "empty list" - | [h] -> List.rev acc,h - | h::t -> loop (h::acc) t - loop [] l - - - let headAndTail l = - match l with - | [] -> - System.Diagnostics.Debug.Assert(false, "empty list") - failwith "List.headAndTail" - | h::t -> h,t - - let unzip4 l = - let a,b,cd = List.unzip3 (List.map (fun (x,y,z,w) -> (x,y,(z,w))) l) - let c,d = List.unzip cd - a,b,c,d - - let rec iter3 f l1 l2 l3 = - match l1,l2,l3 with - | h1::t1, h2::t2, h3::t3 -> f h1 h2 h3; iter3 f t1 t2 t3 - | [], [], [] -> () - | _ -> failwith "iter3" - - /// warning: not tail recursive - let rec takeUntil p l = - match l with - | [] -> [],[] - | x::xs -> if p x then [],l else let a,b = takeUntil p xs in x::a,b - - let rec order eltOrder xs ys = - match xs,ys with - | [],[] -> 0 - | [],ys -> -1 - | xs,[] -> 1 - | x::xs,y::ys -> let cxy = eltOrder x y - if cxy=0 then order eltOrder xs ys else cxy - - - let rec last l = match l with [] -> failwith "last" | [h] -> h | h::t -> last t - - let replicate x n = - Array.to_list (Array.create x n) - - let range n m = [ n .. m ] - - - // must be tail recursive - let mapfold f s l = - // microbenchmark suggested this implementation is faster than the simpler recursive one, and this function is called a lot - let mutable s = s - let mutable r = [] - let mutable l = l - let mutable finished = false - while not finished do - match l with - | x::xs -> let x',s' = f s x - s <- s' - r <- x' :: r - l <- xs - | _ -> finished <- true - List.rev r, s - - let mapNth n f xs = - let rec mn i = function - | [] -> [] - | x::xs -> if i=n then f x::xs else x::mn (i+1) xs - - mn 0 xs - - let rec until p l = match l with [] -> [] | h::t -> if p h then [] else h :: until p t - - let count pred xs = List.fold (fun n x -> if pred x then n+1 else n) 0 xs - - let rec private repeatA n x acc = if n <= 0 then acc else repeatA (n-1) x (x::acc) - let repeat n x = repeatA n x [] - - (* WARNING: not tail-recursive *) - let mapHeadTail fhead ftail = function - | [] -> [] - | [x] -> [fhead x] - | x::xs -> fhead x :: List.map ftail xs - - let collectFold f s l = - let l, s = mapfold f s l - List.concat l, s - - let singleton x = [x] - - // note: must be tail-recursive - let rec private fmapA f z l acc = - match l with - | [] -> z,List.rev acc - | x::xs -> let z,x = f z x - fmapA f z xs (x::acc) - - // note: must be tail-recursive - // REVIEW: systematically eliminate fmap/mapfold duplication - let fmap f z l = fmapA f z l [] - - let collect2 f xs ys = List.concat (List.map2 f xs ys) - - let iterSquared f xss = xss |> List.iter (List.iter f) - let collectSquared f xss = xss |> List.collect (List.collect f) - let mapSquared f xss = xss |> List.map (List.map f) - let mapfoldSquared f xss = xss |> mapfold (mapfold f) - let forallSquared f xss = xss |> List.forall (List.forall f) - let mapiSquared f xss = xss |> List.mapi (fun i xs -> xs |> List.mapi (fun j x -> f i j x)) - let existsSquared f xss = xss |> List.exists (fun xs -> xs |> List.exists (fun x -> f x)) - -module String = - let order (a:string) (b:string) = Operators.compare a b - - let isUpper (s:string) = - s.Length >= 1 && System.Char.IsUpper s.[0] && not (System.Char.IsLower s.[0]) - - - let tryDropPrefix s t = - let lens = String.length s - let lent = String.length t - if (lens >= lent && (String.sub s 0 lent = t)) then - Some(String.sub s lent (lens - lent) ) - else - None - - let tryDropSuffix s t = - let lens = String.length s - let lent = String.length t - if (lens >= lent && (String.sub s (lens-lent) lent = t)) then - Some (String.sub s 0 (lens - lent)) - else - None - - let hasPrefix s t = isSome (tryDropPrefix s t) - let dropPrefix s t = match (tryDropPrefix s t) with Some(res) -> res | None -> failwith "String.dropPrefix" - - let hasSuffix s t = isSome (tryDropSuffix s t) - let dropSuffix s t = match (tryDropSuffix s t) with Some(res) -> res | None -> failwith "dropSuffix" - - let isAllLower s = ((String.lowercase s) = s) - -// Make .NET Dictionaries look like the OCaml Hashtbl type. .NET Dictionaries are -// generally faster and we're gradually converting most code over to use them. -module Dictionary = - - type ('a,'b) t = Dictionary<'a,'b> - - let inline create (n:int) = - new System.Collections.Generic.Dictionary<_,_>(n, HashIdentity.Structural) - - let inline of_list l = - let dict = new System.Collections.Generic.Dictionary<_,_>(List.length l, HashIdentity.Structural) - l |> List.iter (fun (k,v) -> dict.Add(k,v)) - dict - - let mem (t : Dictionary<_,_>) x = t.ContainsKey(x) - let find (t : Dictionary<_,_>) x = t.[x] - let replace (t : Dictionary<_,_>) x y = t.[x] <- y - let tryfind (t : Dictionary<_,_>) x = if t.ContainsKey(x) then Some(t.[x]) else None - let add (t : Dictionary<_,_>) x y = t.[x] <- y - let fold f (t : Dictionary<_,_>) z = t |> Seq.fold (fun acc kvp -> f kvp.Key kvp.Value acc) z - let iter f (t : Dictionary<_,_>) = t |> Seq.iter (fun kvp -> f kvp.Key kvp.Value) - - -//--------------------------------------------------- -// Lists as sets. This is almost always a bad data structure and -// we should gradually eliminate these from the compiler. - -module ListSet = - let insert e l = - if List.mem e l then l else e::l - -//--------------------------------------------------- -// Misc - -/// Get an initialization hole -let getHole r = match !r with None -> failwith "getHole" | Some x -> x - -module ResizeArray = - - type 'a t = ResizeArray<'a> - - let length (bb: ResizeArray<_>) = bb.Count - - let create sz = new ResizeArray<_>(sz:int) - - let to_array arrl = Seq.to_array arrl - - let add (bb: ResizeArray<_>) i = bb.Add(i) - let replace (bb: ResizeArray<_>) i x = bb.[i] <- x - - let get (bb: ResizeArray<_>) i = bb.[i] - - let choosei p arrl = - let rec aux i = - if i >= length arrl then None else - match p i (get arrl i) with - | None -> aux(i+1) - | res -> res - aux 0 - let to_list (bb: ResizeArray<_>) = ResizeArray.to_list bb - -module Map = - let tryFindMulti k map = match Map.tryfind k map with Some res -> res | None -> [] - - -//------------------------------------------------------------------------- -// Library: flat list (immutable arrays) -//------------------------------------------------------------------------ -#if FLAT_LIST_AS_ARRAY_STRUCT -[] -type FlatList<'a> = - val internal array : 'a[] - internal new (arr: 'a[]) = { array = (match arr with null -> null | arr -> if arr.Length = 0 then null else arr) } - member x.Item with get(n:int) = x.array.[n] - member x.Length = match x.array with null -> 0 | arr -> arr.Length - member x.IsEmpty = match x.array with null -> true | _ -> false - static member Empty : FlatList<'a> = FlatList(null) - interface IEnumerable<'a> with - member x.GetEnumerator() : IEnumerator<'a> = - match x.array with - | null -> Seq.empty.GetEnumerator() - | arr -> (arr :> IEnumerable<'a>).GetEnumerator() - interface IEnumerable with - member x.GetEnumerator() : IEnumerator = - match x.array with - | null -> (Seq.empty :> IEnumerable).GetEnumerator() - | arr -> (arr :> IEnumerable).GetEnumerator() - - -[] -module FlatList = - - let empty<'a> = FlatList<'a>.Empty - - let collect (f: 'a -> FlatList<'a>) (x:FlatList<_>) = - match x.array with - | null -> FlatList.Empty - | arr -> - if arr.Length = 1 then f arr.[0] - else FlatList(Array.map (fun x -> match (f x).array with null -> [| |] | arr -> arr) arr |> Array.concat) - - let exists f (x:FlatList<_>) = - match x.array with - | null -> false - | arr -> Array.exists f arr - - let filter f (x:FlatList<_>) = - match x.array with - | null -> FlatList.Empty - | arr -> FlatList(Array.filter f arr) - - let fold f acc (x:FlatList<_>) = - match x.array with - | null -> acc - | arr -> Array.fold_left f acc arr - - let fold2 f acc (x:FlatList<_>) (y:FlatList<_>) = - match x.array,y.array with - | null,null -> acc - | null,_ | _,null -> invalidArg "x" "mismatched list lengths" - | arr1,arr2 -> Array.fold_left2 f acc arr1 arr2 - - let foldBack f (x:FlatList<_>) acc = - match x.array with - | null -> acc - | arr -> Array.fold_right f arr acc - - let foldBack2 f (x:FlatList<_>) (y:FlatList<_>) acc = - match x.array,y.array with - | null,null -> acc - | null,_ | _,null -> invalidArg "x" "mismatched list lengths" - | arr1,arr2 -> Array.fold_right2 f arr1 arr2 acc - - let map2 f (x:FlatList<_>) (y:FlatList<_>) = - match x.array,y.array with - | null,null -> FlatList.Empty - | null,_ | _,null -> invalidArg "x" "mismatched list lengths" - | arr1,arr2 -> FlatList(Array.map2 f arr1 arr2) - - let forall f (x:FlatList<_>) = - match x.array with - | null -> true - | arr -> Array.forall f arr - - let forall2 f (x1:FlatList<_>) (x2:FlatList<_>) = - match x1.array, x2.array with - | null,null -> true - | null,_ | _,null -> invalidArg "x1" "mismatched list lengths" - | arr1,arr2 -> Array.for_all2 f arr1 arr2 - - let iter2 f (x1:FlatList<_>) (x2:FlatList<_>) = - match x1.array, x2.array with - | null,null -> () - | null,_ | _,null -> invalidArg "x1" "mismatched list lengths" - | arr1,arr2 -> Array.iter2 f arr1 arr2 - - let partition f (x:FlatList<_>) = - match x.array with - | null -> FlatList.Empty,FlatList.Empty - | arr -> - let arr1,arr2 = Array.partition f arr - FlatList(arr1),FlatList(arr2) - - let (* inline *) sum (x:FlatList) = - match x.array with - | null -> 0 - | arr -> Array.sum arr - - let (* inline *) sum_by (f: 'a -> int) (x:FlatList<'a>) = - match x.array with - | null -> 0 - | arr -> Array.sum_by f arr - - let unzip (x:FlatList<_>) = - match x.array with - | null -> FlatList.Empty,FlatList.Empty - | arr -> let arr1,arr2 = Array.unzip arr in FlatList(arr1),FlatList(arr2) - - let physicalEquality (x:FlatList<_>) (y:FlatList<_>) = x.array === y.array - - let tryfind f (x:FlatList<_>) = - match x.array with - | null -> None - | arr -> Array.tryfind f arr - - let concat (x:FlatList<_>) = - match x.array with - | null -> FlatList.Empty - | arr -> FlatList(Array.concat arr) - - let order eltOrder (xs:FlatList<_>) (ys:FlatList<_>) = - match xs.array,ys.array with - | null,null -> 0 - | _,null -> 1 - | null,_ -> -1 - | arr1,arr2 -> Array.order eltOrder arr1 arr2 - - let isEmpty (x:FlatList<_>) = x.IsEmpty - let one(x) = FlatList([| x |]) - - let toMap (x:FlatList<_>) = match x.array with null -> Map.empty | arr -> Map.of_array arr - let length (x:FlatList<_>) = x.Length - - let map f (x:FlatList<_>) = - match x.array with - | null -> FlatList.Empty - | arr -> FlatList(Array.map f arr) - - let mapi f (x:FlatList<_>) = - match x.array with - | null -> FlatList.Empty - | arr -> FlatList(Array.mapi f arr) - - let iter f (x:FlatList<_>) = - match x.array with - | null -> () - | arr -> Array.iter f arr - - let iteri f (x:FlatList<_>) = - match x.array with - | null -> () - | arr -> Array.iteri f arr - - let mapq f (x:FlatList<_>) = - match x.array with - | null -> x - | arr -> - let arr' = Array.map f arr in - let n = arr.Length in - let rec check i = if i >= n then true else arr.[i] === arr'.[i] && check (i+1) - if check 0 then x else FlatList(arr') - - let to_list (x:FlatList<_>) = - match x.array with - | null -> [] - | arr -> Array.to_list arr - - let append(l1 : FlatList<'a>) (l2 : FlatList<'a>) = - match l1.array, l2.array with - | null,_ -> l2 - | _,null -> l1 - | arr1, arr2 -> FlatList(Array.append arr1 arr2) - - let of_list(l) = - match l with - | [] -> FlatList.Empty - | l -> FlatList(Array.of_list l) - - let init n f = - if n = 0 then - FlatList.Empty - else - FlatList(Array.init n f) - - let zip (x:FlatList<_>) (y:FlatList<_>) = - match x.array,y.array with - | null,null -> FlatList.Empty - | null,_ | _,null -> invalidArg "x" "mismatched list lengths" - | arr1,arr2 -> FlatList(Array.zip arr1 arr2) - - let mapfold f acc (x:FlatList<_>) = - match x.array with - | null -> - FlatList.Empty,acc - | arr -> - let arr,acc = Array.mapfold f acc x.array - FlatList(arr),acc - - // REVIEW: systematically eliminate fmap/mapfold duplication - let fmap f acc (x:FlatList<_>) = - match x.array with - | null -> - acc,FlatList.Empty - | arr -> - let acc,arr = Array.fmap f acc x.array - acc,FlatList(arr) -#endif -#if FLAT_LIST_AS_LIST - -#else -type FlatList<'a> ='a list - -[] -module FlatList = - let empty<'a> : 'a list = [] - let collect (f: 'a -> FlatList<'a>) (x:FlatList<_>) = List.collect f x - let exists f (x:FlatList<_>) = List.exists f x - let filter f (x:FlatList<_>) = List.filter f x - let fold f acc (x:FlatList<_>) = List.fold f acc x - let fold2 f acc (x:FlatList<_>) (y:FlatList<_>) = List.fold_left2 f acc x y - let foldBack f (x:FlatList<_>) acc = List.foldBack f x acc - let foldBack2 f (x:FlatList<_>) (y:FlatList<_>) acc = List.fold_right2 f x y acc - let map2 f (x:FlatList<_>) (y:FlatList<_>) = List.map2 f x y - let forall f (x:FlatList<_>) = List.forall f x - let forall2 f (x1:FlatList<_>) (x2:FlatList<_>) = List.for_all2 f x1 x2 - let iter2 f (x1:FlatList<_>) (x2:FlatList<_>) = List.iter2 f x1 x2 - let partition f (x:FlatList<_>) = List.partition f x - let (* inline *) sum (x:FlatList) = List.sum x - let (* inline *) sum_by (f: 'a -> int) (x:FlatList<'a>) = List.sum_by f x - let unzip (x:FlatList<_>) = List.unzip x - let physicalEquality (x:FlatList<_>) (y:FlatList<_>) = x === y - let tryfind f (x:FlatList<_>) = List.tryfind f x - let concat (x:FlatList<_>) = List.concat x - let order eltOrder (xs:FlatList<_>) (ys:FlatList<_>) = List.order eltOrder xs ys - let isEmpty (x:FlatList<_>) = List.is_empty x - let one(x) = [x] - let toMap (x:FlatList<_>) = Map.of_list x - let length (x:FlatList<_>) = List.length x - let map f (x:FlatList<_>) = List.map f x - let mapi f (x:FlatList<_>) = List.mapi f x - let iter f (x:FlatList<_>) = List.iter f x - let iteri f (x:FlatList<_>) = List.iteri f x - let mapq f (x:FlatList<_>) = List.mapq f x - let to_list (x:FlatList<_>) = x - let append(l1 : FlatList<'a>) (l2 : FlatList<'a>) = List.append l1 l2 - let of_list(l) = l - let init n f = List.init n f - let zip (x:FlatList<_>) (y:FlatList<_>) = List.zip x y - let mapfold f acc (x:FlatList<_>) = List.mapfold f acc x - // REVIEW: systematically eliminate fmap/mapfold duplication - let fmap f acc (x:FlatList<_>) = List.fmap f acc x -#endif - -#if FLAT_LIST_AS_ARRAY - -type FlatList<'a> ='a array - -type FlatListEmpty<'a>() = - // cache the empty array in a generic static field - static let empty : 'a array = [| |] - static member Empty : 'a array = empty - -[] -module FlatList = - let empty<'a> : 'a array = FlatListEmpty<'a>.Empty - let collect (f: 'a -> FlatList<'a>) (x:FlatList<_>) = x |> Array.map f |> Array.concat - let exists f x = Array.exists f x - let filter f x = Array.filter f x - let fold f acc x = Array.fold_left f acc x - let fold2 f acc x y = Array.fold_left2 f acc x y - let foldBack f x acc = Array.fold_right f x acc - let foldBack2 f x y acc = Array.fold_right2 f x y acc - let map2 f x y = Array.map2 f x y - let forall f x = Array.forall f x - let forall2 f x1 x2 = Array.for_all2 f x1 x2 - let iter2 f x1 x2 = Array.iter2 f x1 x2 - let partition f x = Array.partition f x - let (* inline *) sum (x:FlatList) = Array.sum x - let (* inline *) sum_by (f: 'a -> int) (x:FlatList<'a>) = Array.sum_by f x - let unzip x = Array.unzip x - let physicalEquality (x:FlatList<_>) (y:FlatList<_>) = x === y - let tryfind f x = Array.tryfind f x - let concat x = Array.concat x - let order eltOrder xs ys = Array.order eltOrder xs ys - let isEmpty x = Array.is_empty x - let one(x) = [| x |] - let toMap x = Map.of_array x - let length x = Array.length x - let map f x = Array.map f x - let mapi f x = Array.mapi f x - let iter f x = Array.iter f x - let iteri f x = Array.iteri f x - let mapq f x = Array.mapq f x - let to_list x = Array.to_list x - let append l1 l2 = Array.append l1 l2 - let of_list l = Array.of_list l - let init n f = Array.init n f - let zip x y = Array.zip x y - let mapfold f acc x = Array.mapfold f acc x - // REVIEW: systematically eliminate fmap/mapfold duplication - let fmap f acc x = Array.fmap f acc x -#endif - -type ResultOrException<'tresult> = - | Result of 'tresult - | Exception of System.Exception - - -/// Computations that can cooperatively yield by returning a continuation -/// -/// - Any yield of a NotYetDone should typically be "abandonable" without adverse consequences. No resource release -/// will be called when the computation is abandoned. -/// -/// - Computations suspend via a NotYetDone may use local state (mutables), where these are -/// captured by the NotYetDone closure. Computations do not need to be restartable. -/// -/// - The key thing is that you can take an Eventually value and run it with -/// Eventually.repeatedlyProgressUntilDoneOrTimeShareOver -type Eventually<'T> = - | Done of 'T - | NotYetDone of (unit -> Eventually<'T>) - -[] -module Eventually = - let rec box e = - match e with - | Done x -> Done (Operators.box x) - | NotYetDone (work) -> NotYetDone (fun () -> box (work())) - - let rec force e = - match e with - | Done x -> x - | NotYetDone (work) -> force (work()) - - let repeatedlyProgressUntilDoneOrTimeShareOver timeShareInMilliseconds runner e = - let sw = new System.Diagnostics.Stopwatch() - let rec runTimeShare e = - runner (fun () -> - sw.Reset() - sw.Start(); - let rec loop(e) = - match e with - | Done _ -> e - | NotYetDone (work) -> - if sw.ElapsedMilliseconds > timeShareInMilliseconds then - sw.Stop(); - NotYetDone(fun () -> runTimeShare e) - else - loop(work()) - loop(e)) - runTimeShare e - - let rec bind k e = - match e with - | Done x -> k x - | NotYetDone work -> NotYetDone (fun () -> bind k (work())) - - let fold f acc seq = - (Done acc,seq) ||> Seq.fold (fun acc x -> acc |> bind (fun acc -> f acc x)) - - let rec catch e = - match e with - | Done x -> Done(Result x) - | NotYetDone work -> - NotYetDone (fun () -> - let res = try Result(work()) with | e -> Exception e - match res with - | Result cont -> catch cont - | Exception e -> Done(Exception e)) - - let delay f = NotYetDone (fun () -> f()) - - let tryFinally e compensation = - catch (e) - |> bind (fun res -> compensation(); - match res with - | Result v -> Eventually.Done v - | Exception e -> raise e) - - let tryWith e handler = - catch e - |> bind (function Result v -> Done v | Exception e -> handler e) - -type EventuallyBuilder() = - member x.Bind(e,k) = Eventually.bind k e - member x.Return(v) = Eventually.Done v - member x.Combine(e1,e2) = e1 |> Eventually.bind (fun () -> e2) - member x.TryWith(e,handler) = Eventually.tryWith e handler - member x.TryFinally(e,compensation) = Eventually.tryFinally e compensation - //member x.Using(resource:System.IDisposable,e) = Eventually.tryFinally (e resource) resource.Dispose - member x.Delay(f) = Eventually.delay f - member x.Zero() = Eventually.Done () - - -let eventually = new EventuallyBuilder() - -(* -let _ = eventually { return 1 } -let _ = eventually { let x = 1 in return 1 } -let _ = eventually { let! x = eventually { return 1 } in return 1 } -let _ = eventually { try return (failwith "") with _ -> return 1 } -let _ = eventually { use x = null in return 1 } -*) - -//--------------------------------------------------------------------------- -// generate unique stamps -//--------------------------------------------------------------------------- - -type UniqueStampGenerator<'a>() = - let encodeTab = new Dictionary<'a,int>() - let mutable nItems = 0 - let encode str = - if encodeTab.ContainsKey(str) - then - encodeTab.[str] - else - let idx = nItems - encodeTab.[str] <- idx - nItems <- nItems + 1 - idx - member this.Encode(str) = encode str - -//--------------------------------------------------------------------------- -// memoize tables (all entries cached, never collected) -//--------------------------------------------------------------------------- - -type MemoizationTable<'a,'b>(compute: 'a -> 'b, ?canMemoize, ?keyHash, ?keyEquals) = - - let table = - match keyHash,keyEquals with - | Some h, Some e -> new System.Collections.Generic.Dictionary<'a,'b>(HashIdentity.FromFunctions h e) - | _ -> new System.Collections.Generic.Dictionary<'a,'b>() - member t.Apply(x) = - if (match canMemoize with None -> true | Some f -> f x) then - let mutable res = Unchecked.defaultof<'b> - let ok = table.TryGetValue(x,&res) - if ok then res - else - lock table (fun () -> - let mutable res = Unchecked.defaultof<'b> - let ok = table.TryGetValue(x,&res) - if ok then res - else - let res = compute x - table.[x] <- res; - res) - else compute x - - -type LazyWithContextFailure(exn:exn) = - static let undefined = new LazyWithContextFailure(Undefined) - member x.Exception = exn - static member Undefined = undefined - -/// Just like "Lazy" but EVERY forcer must provide an instance of "ctxt", e.g. to help track errors -/// on forcing back to at least one sensible user location -[] -[] -type LazyWithContext<'a,'ctxt> = - { /// This field holds the result of a successful computation. It's initial value is Unchecked.defaultof - mutable value : 'a - /// This field holds either the function to run or a LazyWithContextFailure object recording the exception raised - /// from running the function. It is null if the thunk has been evaluated successfully. - mutable funcOrException: obj } - static member Create(f: ('ctxt->'a)) : LazyWithContext<'a,'ctxt> = - { value = Unchecked.defaultof<'a>; - funcOrException = box(f); } - static member NotLazy(x:'a) : LazyWithContext<'a,'ctxt> = - { value = x; - funcOrException = null; } - member x.IsDelayed = (match x.funcOrException with null -> false | :? LazyWithContextFailure -> false | _ -> true) - member x.IsException = (match x.funcOrException with null -> false | :? LazyWithContextFailure -> true | _ -> false) - member x.IsForced = (match x.funcOrException with null -> true | _ -> false) - member x.Force(ctxt:'ctxt) = - match x.funcOrException with - | null -> x.value - | _ -> - // Enter the lock in case another thread is in the process of evaluting the result - System.Threading.Monitor.Enter(x); - try - x.UnsynchronizedForce(ctxt) - finally - System.Threading.Monitor.Exit(x) - - member x.UnsynchronizedForce(ctxt) = - match x.funcOrException with - | null -> x.value - | :? LazyWithContextFailure as res -> - raise(res.Exception) - | :? ('ctxt -> 'a) as f -> - x.funcOrException <- box(LazyWithContextFailure.Undefined) - try - let res = f ctxt - x.funcOrException <- null; - x.value <- res; - res - with e -> - x.funcOrException <- box(new LazyWithContextFailure(e)); - rethrow() - | _ -> - failwith "unreachable" - - member x.SynchronizedForce(ctxt) = x.Force(ctxt) - - diff --git a/tools/FSharp_1.9.6.16/source/absil/ilmorph.ml b/tools/FSharp_1.9.6.16/source/absil/ilmorph.ml deleted file mode 100644 index d2b62e89..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilmorph.ml +++ /dev/null @@ -1,554 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved -#light - -module Microsoft.FSharp.Compiler.AbstractIL.Morphs - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -module Illib = Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -module Ildiag = Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -module Ilx = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL -open Ildiag -open Il -open Ilx -open Illib - -type 'a morph = 'a -> 'a - -type EnclosingTypeDefs = ILTypeDef list * ILTypeDef - -let checking = false -let notlazy v = Lazy.CreateFromValue v - -let mdef_code2code f md = - let code = - match dest_mbody md.mdBody with - | MethodBody_il il-> il - | _ -> failwith "mdef_code2code - method not IL" - let code' = MethodBody_il {code with ilCode = f code.ilCode} - {md with mdBody= mk_mbody code'} - -let code_block2block f (c:ILCode) = check_code (f c) - -let bblock_instr2instr f bb = - let instrs = bb.bblockInstrs - let len = Array.length instrs - let res = Array.zeroCreate len - for i = 0 to len - 1 do - res.[i] <- f instrs.[i] - {bb with bblockInstrs=res} - -// This is quite performance critical -let nonNil x = match x with [] -> false | _ -> true -let bblock_instr2instrs f bb = - let instrs = bb.bblockInstrs - let codebuf = ref (Array.zeroCreate (Array.length instrs)) - let codebuf_size = ref 0 - for i = 0 to Array.length instrs - 1 do - let instr = instrs.[i] - let instrs = f instr - let curr = ref instrs - while nonNil !curr do - match !curr with - (instr'::t) -> - let sz = !codebuf_size - let old_buf_size = Array.length !codebuf - let new_size = sz + 1 - if new_size > old_buf_size then begin - let old = !codebuf - let new' = Array.zeroCreate (max new_size (old_buf_size * 4)) - Array.blit old 0 new' 0 sz; - codebuf := new'; - end; - (!codebuf).[sz] <- instr'; - incr codebuf_size; - curr := t; - | [] -> () - done; - done; - {bb with bblockInstrs = Array.sub !codebuf 0 !codebuf_size} - -(* Map each instruction in a basic block to a more complicated block that *) -(* may involve internal branching, but which will still have one entry *) -(* label and one exit label. This is used, for example, when macro-expanding *) -(* complicated high-level ILX instructions. *) -(* The morphing function is told the name of the input and output labels *) -(* that must be used for the generated block. *) -(* Optimize the case where an instruction gets mapped to a *) -(* straightline sequence of instructions by allowing the morphing *) -(* function to return a special result for this case. *) -(* *) -(* Let [i] be the instruction being morphed. If [i] is a control-flow *) -(* then instruction then [f] must return either a control-flow terminated *) -(* sequence of instructions or a block both of which must targets the same labels *) -(* (or a subset of the labels) targeted in [i]. If [i] *) -(* is not a if not a control-flow instruction then [f] *) -(* must return a block targeting the given output label. *) -let commit_acc_bblock sofar = - let sofar = List.rev sofar (* fragments pushed in reverse *) - let nres = - let len = ref 0 (* 1: make room for final branch instruction *) - List.iter (fun l -> len := !len + List.length l) sofar; - !len - let res = Array.create nres I_ret - let count = ref 0 - sofar |> List.iterSquared (fun i -> res.[!count] <- i; incr count) ; - assert(!count = nres); - res - -let rec bblock_loop f bb curr_bblock_inplab curri_inplab curri_outlab sofar instrs = - match instrs with - | (i::rest) -> - let res = f curri_inplab curri_outlab i - begin match res with - (* First possibility: return a sequence of instructions. No *) - (* addresses get consumed. *) - | Choice1Of2 is' -> - bblock_loop f bb curr_bblock_inplab curri_inplab curri_outlab (is' :: sofar) rest - | Choice2Of2 middle_bblock -> - let before_bblock = - let instrs = commit_acc_bblock ([I_br curri_inplab] :: sofar) - mk_bblock {bblockLabel=curr_bblock_inplab;bblockInstrs=instrs} - if checking && unique_entry_of_code middle_bblock <> curri_inplab then - dprintn ("*** warning when transforming bblock "^string_of_code_label bb.bblockLabel^": bblock2code_instr2code: input label of returned block does not match the expected label while converting an instruction to a block."); - let after_blocks = - match rest with - | [] -> - (* - if checking && List.mem curri_outlab (exits_of_code middle_bblock) then - dprintn ("*** warning when transforming bblock "^string_of_code_label bb.bblockLabel^": bblock2code_instr2code: output label of transformed control flow instruction should not use the label provided for non-control-flow instructions."); - *) - [] (* the bblock has already been transformed *) - | _ -> - (* - if checking && unique_exit_of_code middle_bblock <> curri_outlab then - dprintn ("*** warning when transforming bblock "^string_of_code_label bb.bblockLabel^": bblock2code_instr2code: output label of returned block does not match the expected label while converting an instruction to a block."); - *) - let new_curri_inlab = generate_code_label () - let new_curri_outlab = generate_code_label () - [ bblock_loop f bb curri_outlab new_curri_inlab new_curri_outlab [] rest ] - - check_code - (mk_group_block - ( curri_inplab :: (match rest with [] -> [] | _ -> [ curri_outlab ]), - before_bblock :: middle_bblock :: after_blocks)) - end - | [] -> - let instrs = commit_acc_bblock sofar - mk_bblock {bblockLabel=curr_bblock_inplab;bblockInstrs=instrs} - -let bblock2code_instr2code - (f:ILCodeLabel -> ILCodeLabel -> ILInstr -> Choice ) - bb = - bblock_loop f bb - bb.bblockLabel - (generate_code_label ()) - (generate_code_label ()) [] (Array.to_list bb.bblockInstrs) - -let rec block_bblock2code_typ2typ ((fbb,fty) as f) x = - match x with - | ILBasicBlock bblock -> fbb bblock - | GroupBlock (locs,l) -> GroupBlock(locs,List.map (code_bblock2code_typ2typ f) l) - | TryBlock (tryb,seh) -> - TryBlock (code_bblock2code_typ2typ f tryb, - begin match seh with - | FaultBlock b -> FaultBlock (code_bblock2code_typ2typ f b) - | FinallyBlock b -> FinallyBlock (code_bblock2code_typ2typ f b) - | FilterCatchBlock clsl -> - FilterCatchBlock - (List.map (fun (flt,ctch) -> - (match flt with - CodeFilter fltcode -> CodeFilter (code_bblock2code_typ2typ f fltcode) - | TypeFilter ty -> TypeFilter (fty ty)), - code_bblock2code_typ2typ f ctch) clsl) - end) - | RestrictBlock (ls,c) -> RestrictBlock (ls,code_bblock2code_typ2typ f c) - -and code_bblock2code_typ2typ f (c:ILCode) = check_code (block_bblock2code_typ2typ f c) -let topcode_bblock2code_typ2typ f (c:ILCode) = code_bblock2code_typ2typ f c - -let rec block_bblock2code f x = - match x with - | ILBasicBlock bblock -> f bblock - | GroupBlock (locs,l) -> GroupBlock(locs,List.map (code_bblock2code f) l) - | TryBlock (tryb,seh) -> - TryBlock (code_bblock2code f tryb, - begin match seh with - | FaultBlock b -> FaultBlock (code_bblock2code f b) - | FinallyBlock b -> FinallyBlock (code_bblock2code f b) - | FilterCatchBlock clsl -> - FilterCatchBlock - (List.map (fun (flt,ctch) -> - (match flt with - |CodeFilter fltcode -> CodeFilter (code_bblock2code f fltcode) - | TypeFilter ty -> flt), - code_bblock2code f ctch) clsl) - end) - | RestrictBlock (ls,c) -> RestrictBlock (ls,code_bblock2code f c) - -and code_bblock2code f (c:ILCode) = check_code (block_bblock2code f c) -let topcode_bblock2code f (c:ILCode) = code_bblock2code f c - -(* -------------------------------------------------------------------- - * Standard morphisms - mapping types etc. - * -------------------------------------------------------------------- *) - -let rec typ_tref2tref f x = - match x with - | Type_ptr t -> Type_ptr (typ_tref2tref f t) - | Type_fptr x -> - Type_fptr - { callsigCallconv=x.callsigCallconv; - callsigArgs=List.map (typ_tref2tref f) x.callsigArgs; - callsigReturn=typ_tref2tref f x.callsigReturn} - | Type_byref t -> Type_byref (typ_tref2tref f t) - | Type_boxed cr -> Type_boxed (tspec_tref2tref f cr) - | Type_value ir -> Type_value (tspec_tref2tref f ir) - | Type_array (s,ty) -> Type_array (s,typ_tref2tref f ty) - | Type_tyvar v -> Type_tyvar v - | x -> x -and tspec_tref2tref f (x:ILTypeSpec) = - ILTypeSpec.Create(f x.TypeRef, List.map (typ_tref2tref f) x.GenericArgs) - - -let rec typ_scoref2scoref_tyvar2typ ((fscope,ftyvar) as fs)x = - match x with - | Type_ptr t -> Type_ptr (typ_scoref2scoref_tyvar2typ fs t) - | Type_fptr t -> Type_fptr (callsig_scoref2scoref_tyvar2typ fs t) - | Type_byref t -> Type_byref (typ_scoref2scoref_tyvar2typ fs t) - | Type_boxed cr -> Type_boxed (tspec_scoref2scoref_tyvar2typ fs cr) - | Type_value ir -> Type_value (tspec_scoref2scoref_tyvar2typ fs ir) - | Type_array (s,ty) -> Type_array (s,typ_scoref2scoref_tyvar2typ fs ty) - | Type_tyvar v -> ftyvar v - | x -> x -and tspec_scoref2scoref_tyvar2typ fs (x:ILTypeSpec) = - ILTypeSpec.Create(tref_scoref2scoref (fst fs) x.TypeRef,typs_scoref2scoref_tyvar2typ fs x.GenericArgs) -and callsig_scoref2scoref_tyvar2typ f x = - { callsigCallconv=x.callsigCallconv; - callsigArgs=List.map (typ_scoref2scoref_tyvar2typ f) x.callsigArgs; - callsigReturn=typ_scoref2scoref_tyvar2typ f x.callsigReturn} -and typs_scoref2scoref_tyvar2typ f i = List.map (typ_scoref2scoref_tyvar2typ f) i -and gparams_scoref2scoref_tyvar2typ f i = List.map (gparam_scoref2scoref_tyvar2typ f) i -and gparam_scoref2scoref_tyvar2typ f i = i -and tref_scoref2scoref fscope (x:ILTypeRef) = - ILTypeRef.Create(scope=fscope x.Scope, enclosing=x.Enclosing, name = x.Name) - - -let callsig_typ2typ f x = - { callsigCallconv=x.callsigCallconv; - callsigArgs=List.map f x.callsigArgs; - callsigReturn=f x.callsigReturn} - -let gparam_typ2typ f gf = {gf with gpConstraints=List.map f gf.gpConstraints} -let gparams_typ2typ f gfs = List.map (gparam_typ2typ f) gfs -let typs_typ2typ f x = List.map f x -let mref_typ2typ f (x:ILMethodRef) = - ILMethodRef.Create(enclosingTypeRef=tref_of_typ (f (Type_boxed (mk_nongeneric_tspec x.EnclosingTypeRef))), - callingConv=x.CallingConv, - name=x.Name, - genericArity=x.GenericArity, - argTypes= List.map f x.ArgTypes, - returnType= f x.ReturnType) - - -type formal_scope_ctxt = Choice - -let mspec_typ2typ (((factualty : ILType -> ILType) , (fformalty: formal_scope_ctxt -> ILType -> ILType)) as fs) x = - let x1,x2,x3 = dest_mspec x - mk_mref_mspec_in_typ(mref_typ2typ (fformalty (Choice1Of3 x)) x1, - factualty x2, - typs_typ2typ factualty x3) - -let fref_typ2typ f x = - { x with frefParent = tref_of_typ (f (Type_boxed (mk_nongeneric_tspec x.frefParent))); - frefType= f x.frefType } -let fspec_typ2typ ((factualty,(fformalty : formal_scope_ctxt -> ILType -> ILType)) as fs) x = - { fspecFieldRef=fref_typ2typ (fformalty (Choice2Of3 x)) x.fspecFieldRef; - fspecEnclosingType= factualty x.fspecEnclosingType } - -let cattr_typ2typ f c = - { c with customMethod = mspec_typ2typ (f, (fun _ -> f)) c.customMethod } - -let cattrs_typ2typ f cs = - mk_custom_attrs (List.map (cattr_typ2typ f) (dest_custom_attrs cs)) - -let fdef_typ2typ ftype fd = {fd with fdType=ftype fd.fdType; - fdCustomAttrs=cattrs_typ2typ ftype fd.fdCustomAttrs} - -let alts_typ2typ f alts = - Array.map (fun alt -> { alt with altFields = Array.map (fdef_typ2typ f) alt.altFields; - altCustomAttrs = cattrs_typ2typ f alt.altCustomAttrs }) alts - -let curef_typ2typ f (IlxUnionRef(s,alts,nullPermitted)) = - IlxUnionRef(s,alts_typ2typ f alts,nullPermitted) - -let local_typ2typ f l = {l with localType = f l.localType} -let freevar_typ2typ f l = {l with fvType = f l.fvType} -let varargs_typ2typ f varargs = Option.map (List.map f) varargs -(* REVIEW: convert varargs *) -let instr_typ2typ ((factualty,fformalty) as fs) i = - let factualty = factualty (Some i) - let conv_fspec fr = fspec_typ2typ (factualty,fformalty (Some i)) fr - let conv_mspec mr = mspec_typ2typ (factualty,fformalty (Some i)) mr - match i with - | I_calli (a,mref,varargs) -> I_calli (a,callsig_typ2typ (factualty) mref,varargs_typ2typ factualty varargs) - | I_call (a,mr,varargs) -> I_call (a,conv_mspec mr,varargs_typ2typ factualty varargs) - | I_callvirt (a,mr,varargs) -> I_callvirt (a,conv_mspec mr,varargs_typ2typ factualty varargs) - | I_callconstraint (a,ty,mr,varargs) -> I_callconstraint (a,factualty ty,conv_mspec mr,varargs_typ2typ factualty varargs) - | I_newobj (mr,varargs) -> I_newobj (conv_mspec mr,varargs_typ2typ factualty varargs) - | I_ldftn mr -> I_ldftn (conv_mspec mr) - | I_ldvirtftn mr -> I_ldvirtftn (conv_mspec mr) - | I_other e when is_ilx_ext_instr e -> - begin match (dest_ilx_ext_instr e) with - | (EI_ldftn_then_call (mr1,(a,mr2,varargs))) -> - mk_IlxInstr (EI_ldftn_then_call (conv_mspec mr1,(a, conv_mspec mr2, varargs_typ2typ factualty varargs))) - | (EI_ld_instance_ftn_then_newobj (mr1,callsig,(mr2,varargs2))) -> - mk_IlxInstr (EI_ld_instance_ftn_then_newobj - (conv_mspec mr1, - callsig_typ2typ (fformalty (Some i) (Choice1Of3 mr2)) callsig, - (conv_mspec mr2, varargs_typ2typ factualty varargs2))) - | _ -> i - end - | I_ldfld (a,b,fr) -> I_ldfld (a,b,conv_fspec fr) - | I_ldsfld (a,fr) -> I_ldsfld (a,conv_fspec fr) - | I_ldsflda (fr) -> I_ldsflda (conv_fspec fr) - | I_ldflda fr -> I_ldflda (conv_fspec fr) - | I_stfld (a,b,fr) -> I_stfld (a,b,conv_fspec fr) - | I_stsfld (a,fr) -> I_stsfld (a,conv_fspec fr) - | I_castclass typ -> I_castclass (factualty typ) - | I_isinst typ -> I_isinst (factualty typ) - | I_initobj typ -> I_initobj (factualty typ) - | I_cpobj typ -> I_cpobj (factualty typ) - | I_stobj (al,vol,typ) -> I_stobj (al,vol,factualty typ) - | I_ldobj (al,vol,typ) -> I_ldobj (al,vol,factualty typ) - | I_box typ -> I_box (factualty typ) - | I_unbox typ -> I_unbox (factualty typ) - | I_unbox_any typ -> I_unbox_any (factualty typ) - | I_ldelem_any (shape,typ) -> I_ldelem_any (shape,factualty typ) - | I_stelem_any (shape,typ) -> I_stelem_any (shape,factualty typ) - | I_newarr (shape,typ) -> I_newarr (shape,factualty typ) - | I_ldelema (ro,shape,typ) -> I_ldelema (ro,shape,factualty typ) - | I_sizeof typ -> I_sizeof (factualty typ) - | I_ldtoken tok -> - begin match tok with - Token_type typ -> I_ldtoken (Token_type (factualty typ)) - | Token_method mr -> I_ldtoken (Token_method (conv_mspec mr)) - | Token_field fr -> I_ldtoken (Token_field (conv_fspec fr)) - end - | x -> x - -let return_typ2typ f (r:ILReturnValue) = {r with returnType=f r.Type; returnCustomAttrs=cattrs_typ2typ f r.returnCustomAttrs} -let param_typ2typ f p = {p with paramType=f p.paramType; paramCustomAttrs=cattrs_typ2typ f p.paramCustomAttrs} - -let mdefs_mdef2mdef f (m:ILMethodDefs) = mk_mdefs (List.map f (dest_mdefs m)) -let fdefs_fdef2fdef f (m:ILFieldDefs) = mk_fdefs (List.map f (dest_fdefs m)) - -(* use this when the conversion produces just one type... *) -let tdefs_tdef2tdef f m = mk_tdefs (List.map f (dest_tdefs m)) - -let tdefs_tdef2tdefs f (m:ILTypeDefs) = - mk_tdefs (List.foldBack (fun x y -> f x @ y)(dest_tdefs m) []) - -let module_tdefs2tdefs typesf m = - {m with modulTypeDefs=typesf m.modulTypeDefs} - -let locals_typ2typ f ls = List.map (local_typ2typ f) ls -let freevars_typ2typ f ls = List.map (freevar_typ2typ f) ls - -let ilmbody_bblock2code_typ2typ_maxstack2maxstack fs il = - let (finstr,ftype,fmaxstack) = fs - {il with ilCode=topcode_bblock2code_typ2typ (finstr,ftype) il.ilCode; - ilLocals = locals_typ2typ ftype il.ilLocals; - ilMaxStack = fmaxstack il.ilMaxStack } - -let mbody_details_ilmbody2ilmbody (filmbody) x = - match x with - | MethodBody_il il -> MethodBody_il (filmbody il) - | x -> x - -let mbody_ilmbody2ilmbody (filmbody) x = mk_mbody (mbody_details_ilmbody2ilmbody filmbody (dest_mbody x)) - -let ospec_typ2typ f (OverridesSpec(mref,ty)) =OverridesSpec(mref_typ2typ f mref, f ty) - -let mdef_typ2typ_ilmbody2ilmbody fs md = - let (ftype,filmbody) = fs - let ftype' = ftype (Some md) - let body' = mbody_ilmbody2ilmbody (filmbody (Some md)) md.mdBody - {md with - mdGenericParams=gparams_typ2typ ftype' md.mdGenericParams; - mdBody= body'; - mdParams = List.map (param_typ2typ ftype') md.mdParams; - mdReturn = return_typ2typ ftype' md.mdReturn; - mdCustomAttrs=cattrs_typ2typ ftype' md.mdCustomAttrs } - -let fdefs_typ2typ f x = fdefs_fdef2fdef (fdef_typ2typ f) x - -let mdefs_typ2typ_ilmbody2ilmbody fs x = mdefs_mdef2mdef (mdef_typ2typ_ilmbody2ilmbody fs) x - -let cuinfo_typ2typ ftype cud = - { cud with cudAlternatives = alts_typ2typ ftype cud.cudAlternatives; } - - -let cloinfo_typ2typ_ilmbody2ilmbody fs clo = - let (ftype,filmbody) = fs - let c' = filmbody None (Lazy.force clo.cloCode) - { clo with cloFreeVars = freevars_typ2typ ftype clo.cloFreeVars; - cloCode=notlazy c' } - -let cloinfo_ilmbody2ilmbody f clo = - let c' = f (Lazy.force clo.cloCode) - { clo with cloCode=notlazy c' } - -let mimpl_typ2typ f e = - { e with - mimplOverrides = ospec_typ2typ f e.mimplOverrides; - mimplOverrideBy = mspec_typ2typ (f,(fun _ -> f)) e.mimplOverrideBy; } - -let edef_typ2typ f e = - { e with - eventType = Option.map f e.eventType; - eventAddOn = mref_typ2typ f e.eventAddOn; - eventRemoveOn = mref_typ2typ f e.eventRemoveOn; - eventFire = Option.map (mref_typ2typ f) e.eventFire; - eventOther = List.map (mref_typ2typ f) e.eventOther; - eventCustomAttrs = cattrs_typ2typ f e.eventCustomAttrs } - -let pdef_typ2typ f p = - { p with - propSet = Option.map (mref_typ2typ f) p.propSet; - propGet = Option.map (mref_typ2typ f) p.propGet; - propType = f p.propType; - propArgs = List.map f p.propArgs; - propCustomAttrs = cattrs_typ2typ f p.propCustomAttrs } - -let pdefs_typ2typ f pdefs = - mk_properties (List.map (pdef_typ2typ f) (dest_pdefs pdefs)) -let edefs_typ2typ f edefs = - mk_events (List.map (edef_typ2typ f) (dest_edefs edefs)) - -let mimpls_typ2typ f mimpls = - mk_mimpls (List.map (mimpl_typ2typ f) (dest_mimpls mimpls)) - -let rec tdef_typ2typ_ilmbody2ilmbody_mdefs2mdefs enc fs td = - let (ftype,filmbody,fmdefs) = fs - let ftype' = ftype (Some (enc,td)) None - let mdefs' = fmdefs (enc,td) td.tdMethodDefs - let fdefs' = fdefs_typ2typ ftype' td.tdFieldDefs - {td with tdImplements= List.map ftype' td.tdImplements; - tdGenericParams= gparams_typ2typ ftype' td.tdGenericParams; - tdExtends = Option.map ftype' td.tdExtends; - tdMethodDefs=mdefs'; - tdNested=tdefs_typ2typ_ilmbody2ilmbody_mdefs2mdefs (enc@[td]) fs td.tdNested; - tdFieldDefs=fdefs'; - tdMethodImpls = mimpls_typ2typ ftype' td.MethodImpls; - tdEvents = edefs_typ2typ ftype' td.Events; - tdProperties = pdefs_typ2typ ftype' td.Properties; - tdCustomAttrs = cattrs_typ2typ ftype' td.CustomAttrs; - tdKind = - begin match td.tdKind with - | TypeDef_other e when is_ilx_ext_type_def_kind e -> - begin match dest_ilx_ext_type_def_kind e with - | ETypeDef_closure i -> mk_IlxTypeDefKind (ETypeDef_closure (cloinfo_typ2typ_ilmbody2ilmbody (ftype',filmbody (enc,td)) i)) - | ETypeDef_classunion i -> mk_IlxTypeDefKind (ETypeDef_classunion (cuinfo_typ2typ ftype' i)) - end - | _ -> td.tdKind - end - } - -and tdefs_typ2typ_ilmbody2ilmbody_mdefs2mdefs enc fs tdefs = - tdefs_tdef2tdef (tdef_typ2typ_ilmbody2ilmbody_mdefs2mdefs enc fs) tdefs - -(* -------------------------------------------------------------------- - * Derived versions of the above, e.g. with defaults added - * -------------------------------------------------------------------- *) - -let manifest_typ2typ f m = - { m with - manifestCustomAttrs = cattrs_typ2typ f m.manifestCustomAttrs } - -let module_typ2typ_ilmbody2ilmbody_mdefs2mdefs - ((ftype: ILModuleDef -> (ILTypeDef list * ILTypeDef) option -> ILMethodDef option -> ILType -> ILType), - (filmbody: ILModuleDef -> ILTypeDef list * ILTypeDef -> ILMethodDef option -> ILMethodBody -> ILMethodBody), - fmdefs) m = - let ftdefs = - tdefs_typ2typ_ilmbody2ilmbody_mdefs2mdefs [] - (ftype m, - filmbody m, - fmdefs m) - { m with modulTypeDefs=ftdefs m.modulTypeDefs; - modulCustomAttrs=cattrs_typ2typ (ftype m None None) m.modulCustomAttrs; - modulManifest=Option.map (manifest_typ2typ (ftype m None None)) m.modulManifest } - -let module_bblock2code_typ2typ_maxstack2maxstack fs x = - let (fbblock,ftype,fmaxstack) = fs - let filmbody mod_ctxt tdef_ctxt mdef_ctxt = - ilmbody_bblock2code_typ2typ_maxstack2maxstack - (fbblock mod_ctxt tdef_ctxt mdef_ctxt, - ftype mod_ctxt (Some tdef_ctxt) mdef_ctxt, - fmaxstack mod_ctxt tdef_ctxt mdef_ctxt) - let fmdefs mod_ctxt tdef_ctxt = - mdefs_typ2typ_ilmbody2ilmbody - (ftype mod_ctxt (Some tdef_ctxt), - filmbody mod_ctxt tdef_ctxt) - module_typ2typ_ilmbody2ilmbody_mdefs2mdefs - (ftype, - filmbody, - fmdefs) - x - -let module_bblock2code f x = - module_bblock2code_typ2typ_maxstack2maxstack - (f, - (fun mod_ctxt tdef_ctxt mdef_ctxt x -> x), - (fun mod_ctxt tdef_ctxt mdef_ctxt x -> x)) x -let module_bblock2code_typ2typ (f1,f2) x = - module_bblock2code_typ2typ_maxstack2maxstack - (f1, - f2, - (fun mod_ctxt tdef_ctxt mdef_ctxt x -> x)) x -let module_bblock2code_maxstack2maxstack (f1,f2) x = - module_bblock2code_typ2typ_maxstack2maxstack - (f1, - (fun mod_ctxt tdef_ctxt mdef_ctxt x -> x), - f2) - x -let module_instr2instr_typ2typ (f1,f2) x = - module_bblock2code_typ2typ - ((fun mod_ctxt tdef_ctxt mdef_ctxt i -> mk_bblock (bblock_instr2instr (f1 mod_ctxt tdef_ctxt mdef_ctxt) i)), - f2) - x - -let topcode_instr2instrs f x = - topcode_bblock2code - (fun i -> mk_bblock (bblock_instr2instrs f i)) - x -let topcode_instr2code f x = - topcode_bblock2code (bblock2code_instr2code f) x - -let module_typ2typ ftype y = - let finstr mod_ctxt tdef_ctxt mdef_ctxt = - let fty = ftype mod_ctxt (Some tdef_ctxt) mdef_ctxt - instr_typ2typ ((fun instr_ctxt -> fty), (fun instr_ctxt formal_ctxt -> fty)) - module_instr2instr_typ2typ (finstr,ftype) y - - -let rec tdef_tdef2tdef f enc td = - let td' = f enc td - {td' with tdNested = all_tdefs_tdef2tdef f (enc@[td]) td'.tdNested } -and all_tdefs_tdef2tdef f enc tds = mk_tdefs (List.map (tdef_tdef2tdef f enc) (dest_tdefs tds)) - -let module_tdef2tdef f m = module_tdefs2tdefs (all_tdefs_tdef2tdef f []) m - -let module_tref2tref_memoized f modul = - let fty = memoize (typ_tref2tref f) - module_typ2typ (fun _ _ _ ty -> fty ty) modul - -let module_scoref2scoref_memoized f modul = - module_tref2tref_memoized (tref_scoref2scoref f) modul - - - - - diff --git a/tools/FSharp_1.9.6.16/source/absil/ilmorph.mli b/tools/FSharp_1.9.6.16/source/absil/ilmorph.mli deleted file mode 100644 index be344213..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilmorph.mli +++ /dev/null @@ -1,43 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -/// A set of "IL rewrites" ("morphs"). These map each sub-construct -/// of particular ILTypeDefs. The morphing functions are passed -/// some details about the context in which the item being -/// morphed occurs, e.g. the module being morphed itself, the -/// ILTypeDef (possibly nested) where the item occurs, -/// the ILMethodDef (if any) where the item occurs. etc. -module Microsoft.FSharp.Compiler.AbstractIL.Morphs - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -open Microsoft.FSharp.Compiler.AbstractIL.IL - -type 'a morph = 'a -> 'a - -/// Morph each scope reference inside a type signature -val tref_scoref2scoref: ILScopeRef morph -> ILTypeRef -> ILTypeRef - -val mdefs_mdef2mdef: ILMethodDef morph -> ILMethodDefs -> ILMethodDefs -/// nb. does not do nested tdefs -val tdefs_tdef2tdef: ILTypeDef morph -> ILTypeDefs -> ILTypeDefs - -val tdefs_tdef2tdefs: (ILTypeDef -> ILTypeDef list) -> ILTypeDefs -> ILTypeDefs - -/// Morph all tables of ILTypeDefs in "ILModuleDef" -val module_tdefs2tdefs: ILTypeDefs morph -> ILModuleDef -> ILModuleDef - -/// Morph all type references throughout an entire module. -val module_tref2tref_memoized: ILTypeRef morph -> ILModuleDef -> ILModuleDef - -val module_scoref2scoref_memoized: ILScopeRef morph -> ILModuleDef -> ILModuleDef - -/// Morph all type definitions throughout an entire module, including nested type -/// definitions. -val module_tdef2tdef: (ILTypeDef list -> ILTypeDef morph) -> ILModuleDef -> ILModuleDef - -val mbody_ilmbody2ilmbody: ILMethodBody morph -> LazyMethodBody -> LazyMethodBody -val cloinfo_ilmbody2ilmbody: ILMethodBody morph -> IlxClosureInfo -> IlxClosureInfo -val topcode_instr2instrs: (ILInstr -> ILInstr list) -> ILCode -> ILCode -val topcode_instr2code: (ILCodeLabel -> ILCodeLabel -> ILInstr -> Choice) -> ILCode -> ILCode diff --git a/tools/FSharp_1.9.6.16/source/absil/ilpars.mly b/tools/FSharp_1.9.6.16/source/absil/ilpars.mly deleted file mode 100644 index db4ecf35..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilpars.mly +++ /dev/null @@ -1,497 +0,0 @@ -%{ -// (c) Microsoft Corporation 2005-2009. - -open Internal.Utilities -open Internal.Utilities.Text - -open Microsoft.FSharp.Text -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -module Ilascii = Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiConstants -module Ildiag = Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL -module Ilx = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL -module Illib = Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -open Illib -open Ildiag -open Il -open Ilascii -open Ilx - -let pfailwith s = - stderr.WriteLine ("*** error: "^s); - raise Parsing.RecoverableParseError - -/// vararg sentinels -type sig_arg = SigArg of (string option * ILType) | Sentinel - -let decode_varargs args = - let rec normals = function - | [] -> ([],None) - | Sentinel :: t -> ([],Some (varargs t)) - | SigArg (_,p)::t -> let (n,r) = normals t in (p::n, r) - and varargs = function - | [] -> [] - | SigArg (_,ty):: t -> let l = varargs t in ty::l - | Sentinel :: t -> pfailwith "two sentinels in vararg call" in - normals args;; - - -type 'a resolved_at_mspec_scope = - ResolvedAtMethodSpecScope of (ILGenericParameterDefs -> 'a) - -let no_mspec_scope x = ResolvedAtMethodSpecScope (fun cgparams -> x) -let resolve_mspec_scope (ResolvedAtMethodSpecScope f) x = f x -let resolve_mspec_scope_then (ResolvedAtMethodSpecScope f) g = - ResolvedAtMethodSpecScope (fun x -> resolve_mspec_scope (g(f x)) x) - -let resolve_mspec_scope_to_formal_scope tspeco obj = - match tspeco with - None -> resolve_mspec_scope obj mk_empty_gparams - | Some (tspec:ILTypeSpec) -> resolve_mspec_scope obj (gparams_of_inst tspec.GenericArgs) - -let resolve_mspec_scope_to_current_scope obj = - resolve_mspec_scope obj mk_empty_gparams - - -let find_mscorlib_aref() = - match (!parse_ilGlobals).mscorlib_scoref with - | ScopeRef_assembly aref -> aref - | _ -> pfailwith "mscorlib_scoref not set to valid assembly reference in parse_ilGlobals" - -let find_aref nm = - if nm = "mscorlib" then find_mscorlib_aref() else - pfailwith ("Undefined assembly ref '" ^ nm ^ "'") - -%} - -/*----------------------------------------------------------------------- - * The YACC Grammar - *----------------------------------------------------------------------*/ - -%token VAL_INT64 /* 342534523534534 0x34FA434644554 */ -%token VAL_INT32_ELIPSES /* 342534523534534... */ -%token VAL_FLOAT64 /* -334234 24E-34 */ -%token INSTR_ARG -%token INSTR_I -%token INSTR_I32_I32 -%token INSTR_I8 -%token INSTR_R -%token INSTR_LOC -%token INSTR_METHOD -%token INSTR_NONE -%token INSTR_STRING -%token INSTR_SWITCH -%token INSTR_TOK -%token INSTR_TYPE -%token INSTR_INT_TYPE -%token INSTR_VALUETYPE -%token VAL_HEXBYTE /* 05 1A FA */ -%token VAL_ID /* testing343 */ -%token VAL_DOTTEDNAME /* testing343.abd */ -%token VAL_QSTRING /* "Hello World\n" */ -%token VAL_SQSTRING /* 'Hello World\n' */ -%token AMP -%token BANG -%token BOOL -%token BYTEARRAY -%token CDECL -%token CHAR -%token CLASS -%token COMMA -%token DCOLON -%token DEFAULT -%token DOT -%token DOT_CCTOR -%token DOT_CTOR -%token ELIPSES -%token EOF -%token EXPLICIT -%token FASTCALL -%token FIELD -%token FLOAT32 -%token FLOAT64 -%token GREATER -%token INSTANCE -%token INT -%token INT16 -%token INT32 -%token INT64 -%token INT8 -%token LBRACK -%token LESS -%token LPAREN -%token METHOD -%token NATIVE -%token OBJECT -%token PLUS -%token RBRACK -%token RPAREN -%token SLASH -%token STAR -%token STDCALL -%token STRING -%token THISCALL -%token TYPEDREF -%token UINT -%token UINT16 -%token UINT32 -%token UINT64 -%token UINT8 -%token UNMANAGED -%token UNSIGNED -%token VALUE -%token VALUETYPE -%token VARARG -%token VOID - -/* %type modul */ -%type name1 -%type typ -%type top_instrs -%type top_typ -%start top_instrs top_typ - -/**************************************************************************/ -%% - -/* ENTRYPOINT */ -top_typ: typ EOF - { resolve_mspec_scope $1 [] } - -/* ENTRYPOINT */ -top_instrs: instrs2 EOF - { Array.of_list $1 } - - -compQstring: - VAL_QSTRING { $1 } - | compQstring PLUS VAL_QSTRING { $1 ^ $3 } - -methodName: - DOT_CTOR - { ".ctor" } - | DOT_CCTOR - { ".cctor" } - | name1 - { $1 } - -instrs2: - | instr instrs2 - { $1 [] :: $2 } - | { [] } - - -methodSpec: methodSpecMaybeArrayMethod - { let data,varargs = $1 in - mk_mspec_in_typ data,varargs } - - -methodSpecMaybeArrayMethod: - callConv typ typSpec DCOLON methodName opt_actual_tyargs LPAREN sigArgs0 RPAREN - { let callee_class_typ = resolve_mspec_scope_to_current_scope $3 in - let gscope = (if Ilx.gen_is_array_ty callee_class_typ then None else Some (tspec_of_typ callee_class_typ)) in - let argtys_n_varargs = resolve_mspec_scope_to_formal_scope gscope $8 in - let (argtys,varargs) = decode_varargs argtys_n_varargs in - let minst = resolve_mspec_scope_to_current_scope $6 in - let callee_retty = resolve_mspec_scope_to_formal_scope gscope $2 in - (callee_class_typ, $1, $5, argtys, callee_retty, minst), varargs } - -instr_r_head: - INSTR_R LPAREN - { lexing_bytearray := true; $1 } - -instr: - INSTR_NONE - { ($1 ()) } - | INSTR_ARG int32 - { ($1 (uint16 ( ( $2)))) } - | INSTR_LOC int32 - { ($1 (uint16 ( ( $2)))) } - | INSTR_I int32 - { ($1 $2) } - | INSTR_I32_I32 int32 int32 - { ($1 ($2,$3)) } - | INSTR_I8 int64 - { ($1 $2) } - | INSTR_R float64 - { ($1 (NUM_R8 $2)) } - | INSTR_R int64 - { ($1 (NUM_R8 (float $2))) } - | INSTR_METHOD methodSpecMaybeArrayMethod - { - begin - let ((encl_typ, cc, nm, argtys, retty, minst) as data),varargs = $2 in - if Ilx.gen_is_array_ty encl_typ then - (fun prefixes -> - let (shape,ty) = gen_dest_array_ty encl_typ in - begin match nm with - | "Get" -> I_ldelem_any(shape,ty) - | "Set" -> I_stelem_any(shape,ty) - | "Address" -> I_ldelema((if prefixes=[Prefix_Readonly] then ReadonlyAddress else NormalAddress), shape,ty) - | ".ctor" -> I_newarr(shape,ty) - | _ -> failwith "bad method on array type" - end) - else - - $1 (mk_mspec_in_typ data, varargs) - end } - | INSTR_TYPE typSpec - { ($1 (resolve_mspec_scope_to_current_scope $2)) } - | INSTR_INT_TYPE int32 typSpec - { ($1 ( $2,resolve_mspec_scope_to_current_scope $3)) } - | INSTR_VALUETYPE typSpec - { let vtr = - match resolve_mspec_scope_to_current_scope $2 with - (* Type_boxed tr -> Type_value tr - | Type_value vtr as typ -> typ - | *) typ -> typ in - ($1 vtr) } - | INSTR_TOK typSpec - { ($1 (Token_type (resolve_mspec_scope_to_current_scope $2))) } - -/*----------------------------------------------- - * Formal signatures of methods etc. - *---------------------------------------------*/ - -sigArgs0: - { no_mspec_scope [] } - | sigArgs1 { $1 } - -sigArgs1: - sigArgs1a - { ResolvedAtMethodSpecScope (fun c -> List.map (fun obj -> resolve_mspec_scope obj c) (List.rev $1)) } - -sigArgs1a: - sigArg - { [$1] } - | sigArgs1a COMMA sigArg - { $3:: $1 } - -sigArg: - ELIPSES - { no_mspec_scope Sentinel } - | typ opt_id - { resolve_mspec_scope_then $1 (fun ty -> - no_mspec_scope (SigArg($2, ty))) } - - - -opt_id: { None } | id { Some $1 } - - -/*----------------------------------------------- - * Type names - *---------------------------------------------*/ -name1: - | id - { $1 } - | VAL_DOTTEDNAME - { $1 } - | name1 DOT id - { $1 ^"."^ $3 } - -className: - LBRACK name1 RBRACK slashedName - { let (enc,nm) = $4 in - let aref = find_aref $2 in - ScopeRef_assembly aref, enc, nm } - | slashedName - { let enc, nm = $1 in (ScopeRef_local, enc, nm) } - -slashedName: - name1 - { ([],$1) } - | name1 SLASH slashedName - { let (enc,nm) = $3 in ($1::enc, nm) } - -typeNameInst: - className opt_actual_tyargs - { let (a,b,c) = $1 in - resolve_mspec_scope_then $2 (fun inst -> - no_mspec_scope ( (mk_tspec ( (mk_nested_tref (a,b,c)), inst)))) } - - -typeName: - className - { let (a,b,c) = $1 in - no_mspec_scope ( (mk_tspec ( (mk_nested_tref (a,b,c)), mk_empty_gactuals))) } - - -typSpec: - typeName - { resolve_mspec_scope_then $1 (fun tref -> - no_mspec_scope (Type_boxed tref)) } - | typ - { $1 } - | LPAREN typ RPAREN - { $2 } - - -callConv: - INSTANCE callKind - { Callconv (CC_instance,$2) } - | EXPLICIT callKind - { Callconv (CC_instance_explicit,$2) } - | callKind - { Callconv (CC_static,$1) } - -callKind: - /* EMPTY */ - { CC_default } - | DEFAULT - { CC_default } - | VARARG - { CC_vararg } - | UNMANAGED CDECL - { CC_cdecl } - | UNMANAGED STDCALL - { CC_stdcall } - | UNMANAGED THISCALL - { CC_thiscall } - | UNMANAGED FASTCALL - { CC_fastcall } - -/*----------------------------------------------- - * The full algebra of types, typically producing results - * awaiting further info about how to fix up type - * variable numbers etc. - *---------------------------------------------*/ - -typ: STRING - { no_mspec_scope (!parse_ilGlobals).typ_String } - | OBJECT - { no_mspec_scope (!parse_ilGlobals).typ_Object } - | CLASS typeNameInst - { resolve_mspec_scope_then $2 (fun tspec -> - no_mspec_scope (Type_boxed tspec)) } - | VALUE CLASS typeNameInst - { resolve_mspec_scope_then $3 (fun tspec -> - no_mspec_scope (Type_value tspec)) } - | VALUETYPE typeNameInst - { resolve_mspec_scope_then $2 (fun tspec -> - no_mspec_scope (Type_value tspec)) } - | typ LBRACK RBRACK - { resolve_mspec_scope_then $1 (fun ty -> no_mspec_scope (mk_sdarray_ty ty)) } - | typ LBRACK bounds1 RBRACK - { resolve_mspec_scope_then $1 (fun ty -> no_mspec_scope (mk_array_ty (ty,ILArrayShape $3))) } - | typ AMP - { resolve_mspec_scope_then $1 (fun ty -> no_mspec_scope (Type_byref ty)) } - | typ STAR - { resolve_mspec_scope_then $1 (fun ty -> no_mspec_scope (Type_ptr ty)) } - - | TYPEDREF - { no_mspec_scope (!parse_ilGlobals).typ_TypedReference } - | CHAR - { no_mspec_scope (!parse_ilGlobals).typ_char } - | VOID - { no_mspec_scope Type_void } - | BOOL - { no_mspec_scope (!parse_ilGlobals).typ_bool } - | INT8 - { no_mspec_scope (!parse_ilGlobals).typ_int8 } - | INT16 - { no_mspec_scope (!parse_ilGlobals).typ_int16 } - | INT32 - { no_mspec_scope (!parse_ilGlobals).typ_int32 } - | INT64 - { no_mspec_scope (!parse_ilGlobals).typ_int64 } - | FLOAT32 - { no_mspec_scope (!parse_ilGlobals).typ_float32 } - | FLOAT64 - { no_mspec_scope (!parse_ilGlobals).typ_float64 } - | UNSIGNED INT8 - { no_mspec_scope (!parse_ilGlobals).typ_uint8 } - | UNSIGNED INT16 - { no_mspec_scope (!parse_ilGlobals).typ_uint16 } - | UNSIGNED INT32 - { no_mspec_scope (!parse_ilGlobals).typ_uint32 } - | UNSIGNED INT64 - { no_mspec_scope (!parse_ilGlobals).typ_uint64 } - | UINT8 - { no_mspec_scope (!parse_ilGlobals).typ_uint8 } - | UINT16 - { no_mspec_scope (!parse_ilGlobals).typ_uint16 } - | UINT32 - { no_mspec_scope (!parse_ilGlobals).typ_uint32 } - | UINT64 - { no_mspec_scope (!parse_ilGlobals).typ_uint64 } - | NATIVE INT - { no_mspec_scope (!parse_ilGlobals).typ_IntPtr } - | NATIVE UNSIGNED INT - { no_mspec_scope (!parse_ilGlobals).typ_UIntPtr } - | NATIVE UINT - { no_mspec_scope (!parse_ilGlobals).typ_UIntPtr } - - | BANG int32 - { no_mspec_scope (Type_tyvar (uint16 ( $2))) } - - -bounds1: - bound - { [$1] } - | bounds1 COMMA bound - { $1 @ [$3] } - -bound: - /*EMPTY*/ - { (None, None) } - | int32 - { (None, Some $1) } - | int32 ELIPSES int32 - { (Some $1, Some ($3 - $1 + 1)) } - | int32 ELIPSES - { (Some $1, None) } -/* We need to be able to parse all of */ -/* ldc.r8 0. */ -/* float64(-657435.) */ -/* and int32[0...,0...] */ -/* The problem is telling an integer-followed-by-ellipses from a floating-point-nubmer-followed-by-dots */ - | VAL_INT32_ELIPSES int32 - { (Some $1, Some ($2 - $1 + 1)) } - | VAL_INT32_ELIPSES - { (Some $1, None) } - -id: - VAL_ID - { $1 } - | VAL_SQSTRING - { $1 } - -int32: - VAL_INT64 - { int32 $1 } - -int64: - VAL_INT64 - { $1 } - -float64: - VAL_FLOAT64 - { $1 } - | FLOAT64 LPAREN int64 RPAREN - { System.BitConverter.Int64BitsToDouble $3 } - -opt_actual_tyargs: - /* EMPTY */ - { no_mspec_scope mk_empty_gactuals } - | actual_tyargs - { resolve_mspec_scope_then $1 (fun res -> - no_mspec_scope res) } - -actual_tyargs: - LESS actualTypSpecs GREATER - { $2 } - -actualTypSpecs: - typSpec - { resolve_mspec_scope_then $1 (fun res -> - no_mspec_scope [ res]) } - | actualTypSpecs COMMA typSpec - { resolve_mspec_scope_then $1 (fun x -> - resolve_mspec_scope_then $3 (fun y -> - no_mspec_scope (x @ [ y]))) } - diff --git a/tools/FSharp_1.9.6.16/source/absil/ilprint.ml b/tools/FSharp_1.9.6.16/source/absil/ilprint.ml deleted file mode 100644 index 81e10c1a..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilprint.ml +++ /dev/null @@ -1,1415 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -module (* internal *) Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter - -open Internal.Utilities -open Internal.Utilities.Pervasives -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -open Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiConstants -open Microsoft.FSharp.Compiler.AbstractIL.IL - -open System.Text -open System.IO - -let emit_tailcalls = ref true - -#if DEBUG -let tailcall_via_ldftn = ref false -let call_via_ldftn = ref false -let pretty () = true - -// -------------------------------------------------------------------- -// Pretty printing -// -------------------------------------------------------------------- - - -let tyvar_generator = - let i = ref 0 in - fun n -> - incr i; n^string !i - -(* Carry an environment because the way we print method variables *) -(* depends on the gparams of the current scope. *) -type ppenv = - { ppenvClassFormals: int; - ppenvMethodFormals: int } -let ppenv_enter_method mgparams env = - {env with ppenvMethodFormals=mgparams} -let ppenv_enter_tdef gparams env = - {env with ppenvClassFormals=List.length gparams; ppenvMethodFormals=0} -let mk_ppenv = { ppenvClassFormals=0; ppenvMethodFormals=0 } -let debug_ppenv = mk_ppenv -let ppenv_enter_modul env = { env with ppenvClassFormals=0; ppenvMethodFormals=0 } - -(* -------------------------------------------------------------------- - * Pretty printing - output streams - * -------------------------------------------------------------------- *) - -let output_int os (i:int) = output_string os (string i) -let output_hex_digit os i = - assert (i >= 0 & i < 16); - if i > 9 then output_char os (char (int32 'A' + (i-10))) - else output_char os (char (int32 '0' + i)) - -let output_qstring os s = - output_char os '"'; - for i = 0 to String.length s - 1 do - let c = String.get s i in - if (c >= '\000' & c <= '\031') or (c >= '\127' & c <= '\255') then - let c' = int32 c in - output_char os '\\'; - output_int os (c'/64); - output_int os ((c' % 64) / 8); - output_int os (c' % 8) - else if (c = '"') then - (output_char os '\\'; output_char os '"') - else if (c = '\\') then - (output_char os '\\'; output_char os '\\') - else - output_char os c - done; - output_char os '"' -let output_sqstring os s = - output_char os '\''; - for i = 0 to String.length s - 1 do - let c = s.[i] in - if (c >= '\000' & c <= '\031') or (c >= '\127' & c <= '\255') then - let c' = int32 c in - output_char os '\\'; - output_int os (c'/64); - output_int os ((c' % 64) / 8); - output_int os (c' % 8) - else if (c = '\\') then - (output_char os '\\'; output_char os '\\') - else if (c = '\'') then - (output_char os '\\'; output_char os '\'') - else - output_char os c - done; - output_char os '\'' - -let output_list sep f os a = - if List.length a > 0 then - begin - f os (List.hd a); - List.iter (fun x -> output_string os sep; f os x) (List.tl a) - end -let output_parens f os a = output_string os "("; f os a; output_string os ")" -let output_angled f os a = output_string os "<"; f os a; output_string os ">" -let output_bracks f os a = output_string os "["; f os a; output_string os "]" - -let output_id os n = output_sqstring os n - -let output_label os n = output_string os n - -(* let output_data_label os ((l,_): DataLabel) = output_string os l *) -(* REVIEW: get data labels right when using indexes *) - -let output_lid os lid = output_list "." output_string os lid;; -let string_of_type_name (_,n) = n - -let output_byte os i = - output_hex_digit os (i / 16); - output_hex_digit os (i % 16) - -let output_bytes os bytes = - for i = 0 to Bytes.length bytes - 1 do - output_byte os (Bytes.get bytes i); - output_string os " " - done - - -let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0) -let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x) - -let output_u8 os (x:byte) = output_string os (string (int x)) -let output_i8 os (x:sbyte) = output_string os (string (int x)) -let output_u16 os (x:uint16) = output_string os (string (int x)) -let output_i16 os (x:int16) = output_string os (string (int x)) -let output_u32 os (x:uint32) = output_string os (string (int64 x)) -let output_i32 os (x:int32) = output_string os (string x) -let output_u64 os (x:uint64) = output_string os (string (int64 x)) -let output_i64 os (x:int64) = output_string os (string x) -let output_ieee32 os (x:float32) = (output_string os "float32 ("; output_string os (string (bits_of_float32 x)); output_string os ")") -let output_ieee64 os (x:float) = (output_string os "float64 ("; output_string os (string (bits_of_float x)); output_string os ")") - -let rec goutput_scoref env os = function - | ScopeRef_local -> () - | ScopeRef_assembly aref -> - output_string os "["; output_sqstring os aref.Name; output_string os "]" - | ScopeRef_module mref -> - output_string os "[.module "; output_sqstring os mref.Name; output_string os "]" - -and goutput_type_name_ref env os (scoref,enc,n) = - goutput_scoref env os scoref; - output_list "/" output_sqstring os (enc@[n]) -and goutput_tref env os (x:ILTypeRef) = - goutput_type_name_ref env os (x.Scope,x.Enclosing,x.Name) - -and goutput_typ env os ty = - match ty with - | Type_boxed tr -> goutput_tspec env os tr - | Type_tyvar tv -> - (* Special rule to print method type variables in Generic EE preferred form *) - (* when an environment is available to help us do this. *) - let cgparams = env.ppenvClassFormals in - let mgparams = env.ppenvMethodFormals in - if int tv < cgparams then begin - output_string os "!"; - output_tyvar os tv - end else if int tv - cgparams < mgparams then begin - output_string os "!!"; - output_int os (int tv - cgparams); - end else begin - output_string os "!"; - output_tyvar os tv; - output_int os (int tv) - end - | Type_byref typ -> goutput_typ env os typ; output_string os "&" - | Type_ptr typ -> goutput_typ env os typ; output_string os "*" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_SByte.Name -> output_string os "int8" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_Int16.Name -> output_string os "int16" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_Int32.Name -> output_string os "int32" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_Int64.Name -> output_string os "int64" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_IntPtr.Name -> output_string os "native int" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_Byte.Name -> output_string os "unsigned int8" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_UInt16.Name -> output_string os "unsigned int16" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_UInt32.Name -> output_string os "unsigned int32" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_UInt64.Name -> output_string os "unsigned int64" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_UIntPtr.Name -> output_string os "native unsigned int" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_Double.Name -> output_string os "float64" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_Single.Name -> output_string os "float32" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_Bool.Name -> output_string os "bool" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_Char.Name -> output_string os "char" - | Type_value tspec when tspec.Name = ecmaILGlobals.tspec_TypedReference.Name -> output_string os "refany" - | Type_value tspec -> - output_string os "value class "; - goutput_tref env os tspec.TypeRef; - output_string os " "; - goutput_gactuals env os tspec.GenericArgs - | Type_void -> output_string os "void" - | Type_array (bounds,ty) -> - goutput_typ env os ty; - output_string os "["; - output_arr_bounds os bounds; - output_string os "]"; - | Type_fptr csig -> - output_string os "method "; - goutput_typ env os csig.ReturnType; - output_string os " *("; - output_list "," (goutput_typ env) os csig.ArgTypes; - output_string os ")" - | _ -> output_string os "NaT" - -and output_tyvar os d = - output_u16 os d; () - -and goutput_ldtoken_info env os = function - | Token_type x -> goutput_typ env os x - | Token_method x -> output_string os "method "; goutput_mspec env os x - | Token_field x -> output_string os "field "; goutput_fspec env os x - -and goutput_typ_with_shortened_class_syntax env os = function - Type_boxed tspec when tspec.GenericArgs = mk_empty_gactuals -> - goutput_tref env os tspec.TypeRef - | typ2 -> goutput_typ env os typ2 - -and goutput_gactuals env os inst = - if inst = [] then () - else begin - output_string os "<"; - goutput_gactual env os (List.hd inst); - List.iter (fun x -> output_string os ", "; goutput_gactual env os x) (List.tl inst); - output_string os ">"; - end - -and goutput_gactual env os ty = goutput_typ env os ty - -and goutput_tspec env os tspec = - output_string os "class "; - goutput_tref env os tspec.TypeRef; - output_string os " "; - goutput_gactuals env os tspec.GenericArgs; - -and output_arr_bounds os = function - | bounds when bounds = Rank1ArrayShape -> () - | ILArrayShape l -> - output_list "," - (fun os -> function - | (None,None) -> output_string os "" - | (None,Some sz) -> - output_int os sz - | (Some lower,None) -> - output_int os lower; - output_string os " ... " - | (Some lower,Some d) -> - output_int os lower; - output_string os " ... "; - output_int os d) - os - l - -and goutput_permission env os p = - let output_security_action os x = - output_string os - (match x with - | SecAction_request -> "request" - | SecAction_demand -> "demand" - | SecAction_assert-> "assert" - | SecAction_deny-> "deny" - | SecAction_permitonly-> "permitonly" - | SecAction_linkcheck-> "linkcheck" - | SecAction_inheritcheck-> "inheritcheck" - | SecAction_reqmin-> "reqmin" - | SecAction_reqopt-> "reqopt" - | SecAction_reqrefuse-> "reqrefuse" - | SecAction_prejitgrant-> "prejitgrant" - | SecAction_prejitdeny-> "prejitdeny" - | SecAction_noncasdemand-> "noncasdemand" - | SecAction_noncaslinkdemand-> "noncaslinkdemand" - | SecAction_noncasinheritance-> "noncasinheritance" - | SecAction_linkdemandchoice -> "linkdemandchoice" - | SecAction_inheritancedemandchoice -> "inheritancedemandchoice" - | SecAction_demandchoice -> "demandchoice") in - - - - begin match p with - | PermissionSet (sa,b) -> - output_string os " .permissionset "; - output_security_action os sa ; - output_string os " = (" ; - output_bytes os b ; - output_string os ")" ; - end - -and goutput_security_decls env os ps = output_list " " (goutput_permission env) os (dest_security_decls ps) - -and goutput_gparam env os gf = - output_string os (tyvar_generator gf.gpName); - output_parens (output_list "," (goutput_typ env)) os gf.gpConstraints - -and goutput_gparams env os b = - if b = [] then () - else begin output_string os "<"; output_list "," (goutput_gparam env) os b; output_string os ">"; () end - -and output_bcc os bcc = - output_string os - (match bcc with - | CC_fastcall -> "fastcall " - | CC_stdcall -> "stdcall " - | CC_thiscall -> "thiscall " - | CC_cdecl -> "cdecl " - | CC_default -> " " - | CC_vararg -> "vararg ") - -and output_callconv os (Callconv (hasthis,cc)) = - output_string os - (match hasthis with - CC_instance -> "instance " - | CC_instance_explicit -> "explicit " - | CC_static -> "") ; - output_bcc os cc - -and goutput_dlocref env os = function - | dref when - is_tref_typ dref && - is_toplevel_tname (tref_of_typ dref).Name && - (tref_of_typ dref).Scope = ScopeRef_local -> - () - | dref when - is_tref_typ dref && - is_toplevel_tname (tref_of_typ dref).Name -> - goutput_scoref env os (tref_of_typ dref).Scope; - output_string os "::" - | ty ->goutput_typ_with_shortened_class_syntax env os ty; output_string os "::" - -and goutput_callsig env os (csig:ILCallingSignature) = - output_callconv os csig.CallingConv; - output_string os " "; - goutput_typ env os csig.ReturnType; - output_parens (output_list "," (goutput_typ env)) os csig.ArgTypes - -and goutput_mref env os (mref:ILMethodRef) = - output_callconv os mref.CallingConv; - output_string os " "; - goutput_typ_with_shortened_class_syntax env os mref.ReturnType; - output_string os " "; - (* no quotes for ".ctor" *) - let name = mref.Name in - begin if name = ".ctor" or name = ".cctor" then output_string os name else output_id os name; end; - output_parens (output_list "," (goutput_typ env)) os mref.ArgTypes - -and goutput_mspec env os (mspec:ILMethodSpec) = - let fenv = - ppenv_enter_method mspec.GenericArity - (ppenv_enter_tdef (gparams_of_inst (inst_of_typ mspec.EnclosingType)) env) in - output_callconv os mspec.CallingConv; - output_string os " "; - goutput_typ fenv os mspec.FormalReturnType; - output_string os " "; - goutput_dlocref env os mspec.EnclosingType; - output_string os " "; - let name = mspec.Name in - begin if name = ".ctor" or name = ".cctor" then output_string os name else output_id os name; end; - goutput_gactuals env os mspec.GenericArgs; - output_parens (output_list "," (goutput_typ fenv)) os mspec.FormalArgTypes; - -and goutput_vararg_mspec env os (mspec, varargs) = - match varargs with - | None -> goutput_mspec env os mspec - | Some varargs' -> - let fenv = - ppenv_enter_method mspec.GenericArity - (ppenv_enter_tdef (gparams_of_inst (inst_of_typ mspec.EnclosingType)) env) in - output_callconv os mspec.CallingConv; - output_string os " "; - goutput_typ fenv os mspec.FormalReturnType; - output_string os " "; - goutput_dlocref env os mspec.EnclosingType; - let name = mspec.Name in - begin if name = ".ctor" or name = ".cctor" then output_string os name else output_id os name; end; - goutput_gactuals env os mspec.GenericArgs; - output_string os "("; - output_list "," (goutput_typ fenv) os mspec.FormalArgTypes; - output_string os ",...,"; - output_list "," (goutput_typ fenv) os varargs'; - output_string os ")"; - -and goutput_vararg_sig env os (csig:ILCallingSignature,varargs) = - match varargs with - | None -> goutput_callsig env os csig; () - | Some varargs' -> - goutput_typ env os csig.ReturnType; - output_string os " ("; - let argtys = csig.ArgTypes in - if argtys = [] then () else begin - goutput_typ env os (List.hd argtys); - List.iter (fun ty -> output_string os ","; goutput_typ env os ty) (List.tl argtys); - end; - output_string os ",...,"; - output_list "," (goutput_typ env) os varargs'; - output_string os ")"; - -and goutput_fspec env os (x:ILFieldSpec) = - let fenv = ppenv_enter_tdef (gparams_of_inst (inst_of_typ x.EnclosingType)) env in - goutput_typ fenv os x.FormalType; - output_string os " "; - goutput_dlocref env os x.EnclosingType; - output_id os x.Name - -let output_member_access os access = - output_string os - (match access with - | MemAccess_public -> "public" - | MemAccess_private -> "private" - | MemAccess_compilercontrolled -> "privatescope" - | MemAccess_family -> "family" - | MemAccess_famandassem -> "famandassem" - | MemAccess_famorassem -> "famorassem" - | MemAccess_assembly -> "assembly") - -let output_type_access os access = - match access with - | TypeAccess_public -> output_string os "public" - | TypeAccess_private -> output_string os "private" - | TypeAccess_nested ILMemberAccess -> output_string os "nested "; output_member_access os ILMemberAccess - -let output_encoding os e = - match e with - | TypeEncoding_ansi -> output_string os " ansi " - | TypeEncoding_autochar -> output_string os " autochar " - | TypeEncoding_unicode -> output_string os " unicode " -let output_field_init os = function - | FieldInit_string s -> output_string os "= "; output_string os s - | FieldInit_bool x-> output_string os "= bool"; output_parens output_string os (if x then "true" else "false") - | FieldInit_char x-> output_string os "= char"; output_parens output_u16 os x - | FieldInit_int8 x-> output_string os "= int8"; output_parens output_i8 os x - | FieldInit_int16 x-> output_string os "= int16"; output_parens output_i16 os x - | FieldInit_int32 x-> output_string os "= int32"; output_parens output_i32 os x - | FieldInit_int64 x-> output_string os "= int64"; output_parens output_i64 os x - | FieldInit_uint8 x-> output_string os "= uint8"; output_parens output_u8 os x - | FieldInit_uint16 x-> output_string os "= uint16"; output_parens output_u16 os x - | FieldInit_uint32 x-> output_string os "= uint32"; output_parens output_u32 os x - | FieldInit_uint64 x-> output_string os "= uint64"; output_parens output_u64 os x - | FieldInit_single x-> output_string os "= float32"; output_parens output_ieee32 os x - | FieldInit_double x-> output_string os "= float64"; output_parens output_ieee64 os x - | FieldInit_ref-> output_string os "= nullref" - -let output_at os b = - Printf.fprintf os " at (* no labels for data available, data = %a *)" (output_parens output_bytes) b - -let output_option f os = function None -> () | Some x -> f os x - -let goutput_alternative_ref env os alt = - output_id os (name_of_alt alt); output_parens (output_list "," (fun os fdef -> goutput_typ env os fdef.fdType)) os (Array.to_list (fdefs_of_alt alt)) - -let goutput_curef env os (IlxUnionRef(tref,alts,_)) = - output_string os " .classunion import "; - goutput_tref env os tref; - output_parens (output_list "," (goutput_alternative_ref env)) os (Array.to_list alts) - -let goutput_cuspec env os (IlxUnionSpec(IlxUnionRef(tref,_,_),i)) = - output_string os "class /* classunion */ "; - goutput_tref env os tref; - goutput_gactuals env os i - -let goutput_cloref env os (IlxClosureRef(tref,_,fvs)) = - output_string os " .closure import "; - goutput_tref env os tref; - output_parens (output_list "," (fun os fv -> goutput_typ env os (typ_of_freevar fv))) os fvs; - output_string os "{ /* closure-ref - REVIEW */ }" - -let goutput_clospec env os (IlxClosureSpec(IlxClosureRef(tref,_,_) as cloref,i) as clospec) = - output_string os "class /* closure */ "; - goutput_cloref env os cloref; - - goutput_tref env os tref; - goutput_gactuals env os i - -let output_basic_type os x = - output_string os - (match x with - | DT_I1 -> "i1" - | DT_U1 -> "u1" - | DT_I2 -> "i2" - | DT_U2 -> "u2" - | DT_I4 -> "i4" - | DT_U4 -> "u4" - | DT_I8 -> "i8" - | DT_U8 -> "u8" - | DT_R4 -> "r4" - | DT_R8 -> "r8" - | DT_R -> "r" - | DT_I -> "i" - | DT_U -> "u" - | DT_REF -> "ref") - -let output_custom_attr_data os data = - output_string os " = "; output_parens output_bytes os data - -let goutput_custom_attr env os attr = - output_string os " .custom "; - goutput_mspec env os attr.customMethod; - output_custom_attr_data os attr.customData - -let goutput_custom_attrs env os attrs = - List.iter (fun attr -> goutput_custom_attr env os attr; output_string os "\n" ) (dest_custom_attrs attrs) - -let goutput_fdef tref env os fd = - output_string os " .field "; - begin match fd.fdOffset with Some i -> output_string os "["; output_i32 os i; output_string os "] " | None -> () end; - begin match fd.fdMarshal with Some i -> output_string os "// marshal attribute not printerd\n"; | None -> () end; (* REVIEW *) - output_member_access os fd.fdAccess; - output_string os " "; - if fd.fdStatic then output_string os " static "; - if fd.fdLiteral then output_string os " literal "; - if fd.fdSpecialName then output_string os " specialname rtspecialname "; - if fd.fdInitOnly then output_string os " initonly "; - if fd.fdNotSerialized then output_string os " notserialized "; - goutput_typ env os fd.fdType; - output_string os " "; - output_id os fd.fdName; - output_option output_at os fd.fdData; - output_option output_field_init os fd.fdInit; - output_string os "\n"; - goutput_custom_attrs env os fd.fdCustomAttrs - - -let output_alignment os = function - Aligned -> () - | Unaligned_1 -> output_string os "unaligned. 1 " - | Unaligned_2 -> output_string os "unaligned. 2 " - | Unaligned_4 -> output_string os "unaligned. 4 " - -let output_volatility os = function - Nonvolatile -> () - | Volatile -> output_string os "volatile. " -let output_tailness os = function - | Tailcall when !emit_tailcalls -> output_string os "tail. " - | Tailcall -> output_string os " /* tail. */ " - | _ -> () -let output_after_tailcall os = function - | Tailcall -> output_string os " ret " - | _ -> () -let rec goutput_apps env os = function - | Apps_tyapp (actual,cs) -> - output_angled (goutput_gactual env) os actual; - output_string os " "; - output_angled (goutput_gparam env) os (gparam_of_gactual actual) ; - output_string os " "; - goutput_apps env os cs - | Apps_app(ty,cs) -> - output_parens (goutput_typ env) os ty; - output_string os " "; - goutput_apps env os cs - | Apps_done ty -> - output_string os "--> "; - goutput_typ env os ty - -/// utilities to help print out short forms of instructions -let output_short_u16 os (x:uint16) = - if int x < 256 then (output_string os ".s "; output_u16 os x) - else (output_string os " "; output_u16 os x) -let output_short_i32 os i32 = - if i32 < 256 && 0 >= i32 then (output_string os ".s "; output_i32 os i32) - else (output_string os " "; output_i32 os i32 ) - -let output_code_label os lab = - output_string os (string_of_code_label lab) - -let goutput_local env os l = - goutput_typ env os l.localType; - if l.localPinned then output_string os " pinned" - -let goutput_param env os l = - (* REVIEW: more stuff *) - begin match l.paramName with - None -> goutput_typ env os l.paramType; - | Some n -> goutput_typ env os l.paramType; output_string os " "; output_sqstring os n - end - -let goutput_params env os ps = - output_parens (output_list "," (goutput_param env)) os ps - -let goutput_freevar env os l = - goutput_typ env os l.fvType; output_string os " "; output_sqstring os l.fvName - -let goutput_freevars env os ps = - output_parens (output_list "," (goutput_freevar env)) os ps - -let output_source os (s:ILSourceMarker) = - if s.Document.File = "" then () else begin - output_string os " .line "; - output_int os s.Line; - if s.Column <> -1 then begin - output_string os " : "; - output_int os s.Column; - end; - output_string os " /* - "; - output_int os s.EndLine; - if s.Column <> -1 then begin - output_string os " : "; - output_int os s.EndColumn; - end; - output_string os "*/ "; - output_sqstring os s.Document.File - end - - -let rec goutput_instr env os inst = - match inst with - | si when is_noarg_instr si -> - output_lid os (words_of_noarg_instr si) - | I_brcmp (cmp,tg1,tg2) -> - output_string os - begin match cmp with - | BI_beq -> "beq" - | BI_bgt -> "bgt" - | BI_bgt_un -> "bgt.un" - | BI_bge -> "bge" - | BI_bge_un -> "bge.un" - | BI_ble -> "ble" - | BI_ble_un -> "ble.un" - | BI_blt -> "blt" - | BI_blt_un -> "blt.un" - | BI_bne_un -> "bne.un" - | BI_brfalse -> "brfalse" - | BI_brtrue -> "brtrue" - end; - output_string os " "; - output_code_label os tg1 - | I_br tg -> output_string os "/* br "; output_code_label os tg; output_string os "*/"; - | I_leave tg -> output_string os "leave "; output_code_label os tg - | I_call (tl,mspec,varargs) -> - output_tailness os tl; - output_string os "call "; - goutput_vararg_mspec env os (mspec,varargs); - output_after_tailcall os tl; - | I_calli (tl,mref,varargs) -> - output_tailness os tl; - output_string os "calli "; - goutput_vararg_sig env os (mref,varargs); - output_after_tailcall os tl; - | I_ldarg u16 -> output_string os "ldarg"; output_short_u16 os u16 - | I_ldarga u16 -> output_string os "ldarga "; output_u16 os u16 - | I_arith (AI_ldc (dt, NUM_I4 x)) -> - output_string os "ldc."; output_basic_type os dt; output_short_i32 os x - | I_arith (AI_ldc (dt, NUM_I8 x)) -> - output_string os "ldc."; output_basic_type os dt; output_string os " "; output_i64 os x - | I_arith (AI_ldc (dt, NUM_R4 x)) -> - output_string os "ldc."; output_basic_type os dt; output_string os " "; output_ieee32 os x - | I_arith (AI_ldc (dt, NUM_R8 x)) -> - output_string os "ldc."; output_basic_type os dt; output_string os " "; output_ieee64 os x - | I_ldftn mspec -> output_string os "ldftn "; goutput_mspec env os mspec - | I_ldvirtftn mspec -> output_string os "ldvirtftn "; goutput_mspec env os mspec - | I_ldind (al,vol,dt) -> - output_alignment os al; - output_volatility os vol; - output_string os "ldind."; - output_basic_type os dt - | I_cpblk (al,vol) -> - output_alignment os al; - output_volatility os vol; - output_string os "cpblk" - | I_initblk (al,vol) -> - output_alignment os al; - output_volatility os vol; - output_string os "initblk" - | I_ldloc u16 -> output_string os "ldloc"; output_short_u16 os u16 - | I_ldloca u16 -> output_string os "ldloca "; output_u16 os u16 - | I_starg u16 -> output_string os "starg "; output_u16 os u16 - | I_stind (al,vol,dt) -> - output_alignment os al; - output_volatility os vol; - output_string os "stind."; - output_basic_type os dt - | I_stloc u16 -> output_string os "stloc"; output_short_u16 os u16 - | I_switch (l,dflt) -> output_string os "switch "; output_parens (output_list "," output_code_label) os l - | I_callvirt (tl,mspec,varargs) -> - output_tailness os tl; - output_string os "callvirt "; - goutput_vararg_mspec env os (mspec,varargs); - output_after_tailcall os tl; - | I_callconstraint (tl,ty,mspec,varargs) -> - output_tailness os tl; - output_string os "constraint. "; - goutput_typ env os ty; - output_string os " callvirt "; - goutput_vararg_mspec env os (mspec,varargs); - output_after_tailcall os tl; - | I_castclass ty -> output_string os "castclass "; goutput_typ env os ty - | I_isinst ty -> output_string os "isinst "; goutput_typ env os ty - | I_ldfld (al,vol,fspec) -> - output_alignment os al; - output_volatility os vol; - output_string os "ldfld "; - goutput_fspec env os fspec - | I_ldflda fspec -> - output_string os "ldflda " ; - goutput_fspec env os fspec - | I_ldsfld (vol,fspec) -> - output_volatility os vol; - output_string os "ldsfld "; - goutput_fspec env os fspec - | I_ldsflda fspec -> - output_string os "ldsflda "; - goutput_fspec env os fspec - | I_stfld (al,vol,fspec) -> - output_alignment os al; - output_volatility os vol; - output_string os "stfld "; - goutput_fspec env os fspec - | I_stsfld (vol,fspec) -> - output_volatility os vol; - output_string os "stsfld "; - goutput_fspec env os fspec - | I_ldtoken tok -> output_string os "ldtoken "; goutput_ldtoken_info env os tok - | I_refanyval ty -> output_string os "refanyval "; goutput_typ env os ty - | I_refanytype -> output_string os "refanytype" - | I_mkrefany typ -> output_string os "mkrefany "; goutput_typ env os typ - | I_ldstr s -> - output_string os "ldstr "; - output_string os s - | I_newobj (mspec,varargs) -> - (* newobj: IL has a special rule that the CC is always implicitly "instance" and need *) - (* not be mentioned explicitly *) - output_string os "newobj "; - goutput_vararg_mspec env os (mspec,varargs) - | I_stelem dt -> output_string os "stelem."; output_basic_type os dt - | I_ldelem dt -> output_string os "ldelem."; output_basic_type os dt - - | I_newarr (shape,typ) -> - if shape = Rank1ArrayShape then begin - output_string os "newarr "; - goutput_typ_with_shortened_class_syntax env os typ - end else begin - output_string os "newobj void "; - goutput_dlocref env os (mk_array_ty(typ,shape)); - output_string os ".ctor"; - let rank = shape.Rank in - output_parens (output_list "," (goutput_typ env)) os (Array.to_list (Array.create ( rank) ecmaILGlobals.typ_int32)) - end - | I_stelem_any (shape,dt) -> - if shape = Rank1ArrayShape then begin - output_string os "stelem.any "; goutput_typ env os dt - end else begin - output_string os "call instance void "; - goutput_dlocref env os (mk_array_ty(dt,shape)); - output_string os "Set"; - let rank = shape.Rank in - output_parens (output_list "," (goutput_typ env)) os (Array.to_list (Array.create ( rank) ecmaILGlobals.typ_int32) @ [dt]) - end - | I_ldelem_any (shape,tok) -> - if shape = Rank1ArrayShape then begin - output_string os "ldelem.any "; goutput_typ env os tok - end else begin - output_string os "call instance "; - goutput_typ env os tok; - output_string os " "; - goutput_dlocref env os (mk_array_ty(tok,shape)); - output_string os "Get"; - let rank = shape.Rank in - output_parens (output_list "," (goutput_typ env)) os (Array.to_list (Array.create ( rank) ecmaILGlobals.typ_int32)) - end - | I_ldelema (ro,shape,tok) -> - if ro = ReadonlyAddress then output_string os "readonly. "; - if shape = Rank1ArrayShape then begin - output_string os "ldelema "; goutput_typ env os tok - end else begin - output_string os "call instance "; - goutput_typ env os (Type_byref tok); - output_string os " "; - goutput_dlocref env os (mk_array_ty(tok,shape)); - output_string os "Address"; - let rank = shape.Rank in - output_parens (output_list "," (goutput_typ env)) os (Array.to_list (Array.create ( rank) ecmaILGlobals.typ_int32)) - end - | I_box tok -> output_string os "box "; goutput_typ env os tok - | I_unbox tok -> output_string os "unbox "; goutput_typ env os tok - | I_unbox_any tok -> output_string os "unbox.any "; goutput_typ env os tok - | I_initobj tok -> output_string os "initobj "; goutput_typ env os tok - | I_ldobj (al,vol,tok) -> - output_alignment os al; - output_volatility os vol; - output_string os "ldobj "; - goutput_typ env os tok - | I_stobj (al,vol,tok) -> - output_alignment os al; - output_volatility os vol; - output_string os "stobj "; - goutput_typ env os tok - | I_cpobj tok -> output_string os "cpobj "; goutput_typ env os tok - | I_sizeof tok -> output_string os "sizeof "; goutput_typ env os tok - | I_seqpoint s -> output_source os s - | (EI_ilzero ty) -> output_string os "ilzero "; goutput_typ env os ty - | I_other e when is_ilx_ext_instr e -> - begin match (dest_ilx_ext_instr e) with - | (EI_castdata (check,ty,n)) -> - if not check then output_string os "/* unchecked. */ "; - output_string os "castdata "; - goutput_cuspec env os ty; - output_string os ","; - output_int os n - | (EI_isdata (ty,n)) -> - output_string os "isdata "; - goutput_cuspec env os ty; - output_string os ","; - output_int os n - | (EI_brisdata (ty,n,tg1,_)) -> - output_string os "brisdata "; - goutput_cuspec env os ty; - output_string os ","; - output_string os "("; - output_int os n; - output_string os ","; - output_code_label os tg1; - output_string os ")" - | (EI_lddata (ty,n,m)) -> - output_string os "lddata "; - goutput_cuspec env os ty; - output_string os ","; - output_int os n; - output_string os ","; - output_int os m - | (EI_lddatatag ty) -> - output_string os "lddatatag "; - goutput_cuspec env os ty - | (EI_stdata (ty,n,m)) -> - output_string os "stdata "; - goutput_cuspec env os ty; - output_string os ","; - output_int os n; - output_string os ","; - output_int os m - | (EI_newdata (ty,n)) -> - output_string os "newdata "; - goutput_cuspec env os ty; - output_string os ","; - output_int os n - | (EI_datacase (complete,ty,l,_)) -> - output_string os (if complete then "datacase" else "dataswitch"); - output_string os " "; - goutput_cuspec env os ty; - output_string os ","; - output_parens (output_list "," (fun os (x,y) -> output_int os x; output_string os ","; output_code_label os y)) os l - | (EI_ldenv n) -> output_string os "ldenv "; output_int os n - | (EI_stenv n) -> output_string os "stenv "; output_int os n - | (EI_ldenva n) -> output_string os "ldenva "; output_int os n - | (EI_newclo clospec) -> output_string os "newclo "; goutput_clospec env os clospec - | (EI_isclo clospec) -> output_string os "isclo "; goutput_clospec env os clospec - | (EI_stclofld (clospec,n)) -> output_string os "stclofld "; goutput_clospec env os clospec; output_string os " "; output_int os n - | (EI_castclo clospec) -> output_string os "castclo "; goutput_clospec env os clospec - | (EI_callclo (tl,clospec,apps)) -> - output_tailness os tl; - output_string os "callclo "; - goutput_clospec env os clospec; - output_string os ", "; - goutput_apps env os apps; - output_after_tailcall os tl; - | (EI_callfunc (tl,cs)) -> - output_tailness os tl; - output_string os "callfunc "; - goutput_apps env os cs; - output_after_tailcall os tl; - | (EI_ldftn_then_call (mr1,(tl,mr2,varargs))) -> - output_string os "/* ldftn_then_call */ ldftn "; - goutput_mspec env os mr1; - output_string os " "; - goutput_instr env os (I_call (tl,mr2,varargs)) - | (EI_ld_instance_ftn_then_newobj (mr1,_,(mr2,varargs))) -> - output_string os "/* ld_instance_ftn_then_newobj */ ldftn "; - goutput_mspec env os mr1; - output_string os " "; - goutput_instr env os (I_newobj (mr2,varargs)) - end - | si -> - output_string os "" - -let output_if b f os x = if b then f os x else () - -let goutput_ilmbody env os il = - if il.ilZeroInit then output_string os " .zeroinit\n"; - (* Add one to .maxstack if doing "calli" testing . *) - output_string os " .maxstack "; - output_i32 os (if !tailcall_via_ldftn or !call_via_ldftn then il.ilMaxStack+1 else il.ilMaxStack); - output_string os "\n"; - let output_susp os susp = - match susp with - | Some s -> - output_string os "\nbr "; output_code_label os s; output_string os "\n" - | _ -> () in - let commit_susp os susp lab = - match susp with - | Some s when s <> lab -> output_susp os susp - | _ -> () in - if il.ilLocals <> [] then begin - output_string os " .locals("; - goutput_local env os (List.hd il.ilLocals); - List.iter (fun l -> output_string os ",\n"; goutput_local env os l) (List.tl il.ilLocals); - output_string os ")\n" - end; - (* Print the code by left-to-right traversal *) - begin - let rec goutput_block env os (susp,block) = - match block with - | ILBasicBlock bb -> - commit_susp os susp bb.bblockLabel; - output_code_label os bb.bblockLabel; output_string os ": \n" ; - Array.iter (fun i -> goutput_instr env os i; output_string os "\n") bb.bblockInstrs; - (fallthrough_of_bblock bb) - | GroupBlock (_,l) -> - let new_susp = ref susp in - List.iter (fun c -> new_susp := goutput_code env os (!new_susp,c)) l; - !new_susp - | RestrictBlock (_,c) -> goutput_code env os (susp,c) - | TryBlock (c,seh) -> - -(* REVIEW: The code entry need not be unique. - Take into account the second half of the following. - -ECMA: - There are only two ways to enter a try block from outside its lexical body: - - Branching to or falling into the try block’s first instruction. The branch may be made using a conditional branch, an unconditional branch, or a leave instruction. - - Using a leave instruction from that try’s catch block. In this case, correct CIL code may branch to any instruction within the try block, not just its first instruction, so long as that branch target is not protected by yet another try, nested withing the first. - -*) - - commit_susp os susp (unique_entry_of_code c); - output_string os " .try {\n"; - let susp = goutput_code env os (None,c) in - if (susp <> None) then output_string os "// warning: fallthrough at end of try\n"; - output_string os "\n}"; - begin match seh with - FaultBlock flt -> - output_string os "fault {\n"; - output_susp os (goutput_code env os (None,flt)); - output_string os "\n}" - | FinallyBlock flt -> - output_string os "finally {\n"; - output_susp os (goutput_code env os (None,flt)); - output_string os "\n}"; - | FilterCatchBlock clauses -> - List.iter - (fun (flt,ctch) -> - match flt with - | TypeFilter typ -> - output_string os " catch "; - goutput_typ_with_shortened_class_syntax env os typ; - output_string os "{\n"; - output_susp os (goutput_code env os (None,ctch)); - output_string os "\n}" - | CodeFilter fltcode -> - output_string os "filter {\n"; - output_susp os (goutput_code env os (None,fltcode)); - output_string os "\n} catch {\n"; - output_susp os (goutput_code env os (None,ctch)); - output_string os "\n}";) - clauses - end; - None - - and goutput_code env os (susp,code) = - goutput_block env os (susp,code) in - - let goutput_topcode env os code = - let final_susp = - goutput_code env os (Some (unique_entry_of_code code),code) in - (match final_susp with Some s -> output_string os "\nbr "; output_code_label os s; output_string os "\n" | _ -> ()) in - - goutput_topcode env os il.ilCode; - - end; -;; - - -let goutput_mbody is_entrypoint env os md = - begin match md.mdCodeKind with - | MethodCodeKind_native -> output_string os "native " - | MethodCodeKind_il -> output_string os "cil " - | MethodCodeKind_runtime -> output_string os "runtime " - end; - output_string os (if md.mdInternalCall then "internalcall " else " "); - output_string os (if md.mdManaged then "managed " else " "); - output_string os (if md.mdForwardRef then "forwardref " else " "); - output_string os " \n{ \n" ; - goutput_security_decls env os md.mdSecurityDecls; - goutput_custom_attrs env os md.mdCustomAttrs; - begin match dest_mbody md.mdBody with - | MethodBody_il il -> goutput_ilmbody env os il - | _ -> () - end; - if is_entrypoint then output_string os " .entrypoint"; - output_string os "\n"; - output_string os "}\n" - -let goutput_mdef env os md = - let attrs = - match md.mdKind with - | MethodKind_virtual vinfo -> - "virtual "^ - (if vinfo.virtFinal then "final " else "")^ - (if vinfo.virtNewslot then "newslot " else "")^ - (if vinfo.virtStrict then " strict " else "")^ - (if vinfo.virtAbstract then " abstract " else "")^ - " " - | MethodKind_nonvirtual -> "" - | MethodKind_ctor -> "rtspecialname" - | MethodKind_static -> - "static "^ - (match dest_mbody md.mdBody with - MethodBody_pinvoke (attr) -> - "pinvokeimpl(\""^ attr.pinvokeWhere.Name^"\" as \""^ attr.pinvokeName ^"\""^ - begin match attr.pinvokeCallconv with - | PInvokeCallConvNone -> "" - | PInvokeCallConvCdecl -> " cdecl" - | PInvokeCallConvStdcall -> " stdcall" - | PInvokeCallConvThiscall -> " thiscall" - | PInvokeCallConvFastcall -> " fastcall" - | PInvokeCallConvWinapi -> " winapi" - end ^ - begin match attr.PInvokeCharEncoding with - | PInvokeEncodingNone -> "" - | PInvokeEncodingAnsi -> " ansi" - | PInvokeEncodingUnicode -> " unicode" - | PInvokeEncodingAuto -> " autochar" - end ^ - (if attr.pinvokeNoMangle then " nomangle" else "") ^ - (if attr.pinvokeLastErr then " lasterr" else "") ^ - (* todo: PInvokeThrowOnUnmappableChar, PInvokeCharBestFit *) - ")" - | _ -> - "") - | MethodKind_cctor -> "specialname rtspecialname static" in - let is_entrypoint = md.mdEntrypoint in - let menv = ppenv_enter_method (List.length md.mdGenericParams) env in - output_string os " .method "; - if md.mdHideBySig then output_string os "hidebysig "; - if md.mdReqSecObj then output_string os "reqsecobj "; - if md.mdSpecialName then output_string os "specialname "; - if md.mdUnmanagedExport then output_string os "unmanagedexp "; - output_member_access os md.mdAccess; - output_string os " "; - output_string os attrs; - output_string os " "; - output_callconv os md.mdCallconv; - output_string os " "; - (goutput_typ menv) os md.Return.Type; - output_string os " "; - output_id os md.mdName ; - output_string os " "; - (goutput_gparams env) os md.mdGenericParams; - output_string os " "; - (goutput_params menv) os md.mdParams; - output_string os " "; - if md.mdSynchronized then output_string os "synchronized "; - if md.mdMustRun then output_string os "/* mustrun */ "; - if md.mdPreserveSig then output_string os "preservesig "; - (goutput_mbody is_entrypoint menv) os md; - output_string os "\n" - -let goutput_pdef env os pd = - output_string os "property\n\tgetter: "; - (match pd.propGet with None -> () | Some mref -> goutput_mref env os mref); - output_string os "\n\tsetter: "; - (match pd.propSet with None -> () | Some mref -> goutput_mref env os mref) - -let goutput_superclass env os = function - None -> () - | Some typ -> output_string os "extends "; (goutput_typ_with_shortened_class_syntax env) os typ - -let goutput_superinterfaces env os imp = - if imp = [] then () else - output_string os "implements "; - output_list "," (goutput_typ_with_shortened_class_syntax env) os imp;; - -let goutput_implements env os imp = - if imp = [] then () else - output_string os "implements "; - output_list "," (goutput_typ_with_shortened_class_syntax env) os imp;; - -let the = function Some x -> x | None -> failwith "the" - -let output_type_layout_info os info = - if info.typeSize <> None then (output_string os " .size "; output_i32 os (the info.typeSize)); - if info.typePack <> None then (output_string os " .pack "; output_u16 os (the info.typePack)) - -let split_type_layout = function - | TypeLayout_auto -> "auto",(fun os () -> ()) - | TypeLayout_sequential info -> "sequential", (fun os () -> output_type_layout_info os info) - | TypeLayout_explicit info -> "explicit", (fun os () -> output_type_layout_info os info) - - -let goutput_fdefs tref env os fdefs = - List.iter (fun f -> (goutput_fdef tref env) os f; output_string os "\n" ) (dest_fdefs fdefs) -let goutput_mdefs env os mdefs = - List.iter (fun f -> (goutput_mdef env) os f; output_string os "\n" ) (dest_mdefs mdefs) -let goutput_pdefs env os pdefs = - List.iter (fun f -> (goutput_pdef env) os f; output_string os "\n" ) (dest_pdefs pdefs) - -let rec goutput_tdef (enc) env contents os cd = - let env = ppenv_enter_tdef cd.tdGenericParams env in - let layout_attr,pp_layout_decls = split_type_layout cd.tdLayout in - if is_toplevel_tname cd.tdName then - begin - if contents then begin - let tref = (mk_nested_tref (ScopeRef_local,enc,cd.tdName)) in - goutput_mdefs env os cd.tdMethodDefs; - goutput_fdefs tref env os cd.tdFieldDefs; - goutput_pdefs env os cd.tdProperties; - (* REVIEW: warn if top level module contains anything else?? *) - end - end - else begin - let isclo = - match cd.tdKind with - | TypeDef_other e when is_ilx_ext_type_def_kind e -> - begin match dest_ilx_ext_type_def_kind e with - | ETypeDef_closure _ -> true - | _ -> false - end - | _ -> false in - let isclassunion = - match cd.tdKind with - | TypeDef_other e when is_ilx_ext_type_def_kind e -> - begin match dest_ilx_ext_type_def_kind e with - | ETypeDef_classunion _ -> true - | _ -> false - end - | _ -> false in - if not (isclo or isclassunion) or contents then begin - output_string os "\n"; - begin match cd.tdKind with - | TypeDef_class | TypeDef_enum | TypeDef_delegate | TypeDef_valuetype -> output_string os ".class " - | TypeDef_interface -> output_string os ".class interface " - | TypeDef_other e when is_ilx_ext_type_def_kind e -> - begin match dest_ilx_ext_type_def_kind e with - | ETypeDef_closure _ -> output_string os ".closure " - | ETypeDef_classunion _ -> output_string os ".classunion " - end - | TypeDef_other _ -> failwith "unknown extension" - end; - output_init_semantics os cd.tdInitSemantics; - output_string os " "; - output_type_access os cd.tdAccess; - output_string os " "; - output_encoding os cd.tdEncoding; - output_string os " "; - output_string os layout_attr; - output_string os " "; - if cd.IsSealed then output_string os "sealed "; - if cd.IsAbstract then output_string os "abstract "; - if cd.tdSerializable then output_string os "serializable "; - if cd.tdComInterop then output_string os "import "; - output_sqstring os cd.tdName ; - goutput_gparams env os cd.tdGenericParams; - output_string os "\n\t"; - if isclo then - match cd.tdKind with - | TypeDef_other e when is_ilx_ext_type_def_kind e -> - begin match dest_ilx_ext_type_def_kind e with - | ETypeDef_closure cloinfo -> goutput_freevars env os cloinfo.cloFreeVars - | _ -> () - end - | _ -> () - else - begin - goutput_superclass env os cd.tdExtends; - output_string os "\n\t"; - end; - goutput_implements env os cd.tdImplements; - output_string os "\n{\n "; - if contents then begin - let tref = (mk_nested_tref (ScopeRef_local,enc,cd.tdName)) in - goutput_custom_attrs env os cd.tdCustomAttrs; - goutput_security_decls env os cd.tdSecurityDecls; - pp_layout_decls os (); - goutput_fdefs tref env os cd.tdFieldDefs; - goutput_mdefs env os cd.tdMethodDefs; - begin match cd.tdKind with - | TypeDef_other e when is_ilx_ext_type_def_kind e -> - begin match dest_ilx_ext_type_def_kind e with - | ETypeDef_closure x -> - output_string os "\n.apply "; - (goutput_lambdas env) os x.cloStructure; - output_string os "\n { "; - (goutput_ilmbody env) os (Lazy.force x.cloCode); - output_string os "}\n"; - | ETypeDef_classunion x -> - Array.iter (fun x -> output_string os " .alternative "; - (goutput_alternative_ref env) os x) x.cudAlternatives; - end - | _ -> () - end; - end; - - goutput_tdefs contents (enc@[cd.tdName]) env os cd.tdNested; - output_string os "\n}"; - end; - end - -and output_init_semantics os f = - match f with - TypeInit_beforefield -> output_string os "beforefieldinit"; - | TypeInit_beforeany -> () - -and goutput_lambdas env os lambdas = - match lambdas with - | Lambdas_forall (gf,l) -> - output_angled (goutput_gparam env) os gf; - output_string os " "; - (goutput_lambdas env) os l - | Lambdas_lambda (ps,l) -> - output_parens (goutput_param env) os ps; - output_string os " "; - (goutput_lambdas env) os l - | Lambdas_return typ -> output_string os "--> "; (goutput_typ env) os typ - -and goutput_tdefs contents (enc) env os td = - List.iter (goutput_tdef enc env contents os) (dest_tdefs td) - -let output_ver os (a,b,c,d) = - output_string os " .ver "; - output_u16 os a; - output_string os " : "; - output_u16 os b; - output_string os " : "; - output_u16 os c; - output_string os " : "; - output_u16 os d - -let output_locale os s = output_string os " .Locale "; output_qstring os s - -let output_hash os x = - output_string os " .hash = "; output_parens output_bytes os x -let output_publickeytoken os x = - output_string os " .publickeytoken = "; output_parens output_bytes os x -let output_publickey os x = - output_string os " .publickey = "; output_parens output_bytes os x - -let output_publickeyinfo os = function - | PublicKey k -> output_publickey os k - | PublicKeyToken k -> output_publickeytoken os k - -let output_assref os (aref:ILAssemblyRef) = - output_string os " .assembly extern "; - output_sqstring os aref.Name; - (if aref.Retargetable then output_string os " retargetable "); - output_string os " { "; - (output_option output_hash) os aref.Hash; - (output_option output_publickeyinfo) os aref.PublicKey; - (output_option output_ver) os aref.Version; - (output_option output_locale) os aref.Locale; - output_string os " } " - -let output_modref os (modref:ILModuleRef) = - output_string os (if modref.HasMetadata then " .module extern " else " .file nometadata " ); - output_sqstring os modref.Name; - (output_option output_hash) os modref.Hash - -let goutput_resource env os r = - output_string os " .mresource "; - output_string os (match r.resourceAccess with Resource_public -> " public " | Resource_private -> " private "); - output_sqstring os r.resourceName; - output_string os " { "; - goutput_custom_attrs env os r.resourceCustomAttrs; - begin match r.resourceWhere with - | Resource_local _ -> - output_string os " /* loc nyi */ "; - | Resource_file (mref,off) -> - output_string os " .file "; - output_sqstring os mref.Name; - output_string os " at "; - output_i32 os off - | Resource_assembly aref -> - output_string os " .assembly extern "; - output_sqstring os aref.Name - end; - output_string os " }\n " - -let goutput_manifest env os m = - output_string os " .assembly "; - begin match m.manifestLongevity with - | LongevityUnspecified -> () - | LongevityLibrary -> output_string os "library "; - | LongevityPlatformAppDomain -> output_string os "platformappdomain "; - | LongevityPlatformProcess -> output_string os "platformprocess "; - | LongevityPlatformSystem -> output_string os "platformmachine "; - end ; - output_sqstring os m.manifestName; - output_string os " { \n"; - output_string os ".hash algorithm "; output_i32 os m.manifestAuxModuleHashAlgorithm; output_string os "\n"; - goutput_custom_attrs env os m.manifestCustomAttrs; - goutput_security_decls env os m.manifestSecurityDecls; - (output_option output_publickey) os m.manifestPublicKey; - (output_option output_ver) os m.manifestVersion; - (output_option output_locale) os m.manifestLocale; - output_string os " } \n" - - - (* REVIEW - other assembly data *) -(* manifestExportedTypes: ILExportedTypes; - manifestEntrypointElsewhere: ILScopeRef option; -*) - -let output_module_fragment_aux refs os modul = - try - let env = mk_ppenv in - let env = ppenv_enter_modul env in - goutput_tdefs false ([]) env os modul.modulTypeDefs; - goutput_tdefs true ([]) env os modul.modulTypeDefs; - with e -> - output_string os "*** Error during printing : "; output_string os (e.ToString()); flush os; - rethrow(); - raise e - -let output_module_fragment os modul = - let refs = refs_of_module modul in - output_module_fragment_aux refs os modul; - refs - -let output_module_refs os refs = - let env = mk_ppenv in - List.iter (fun x -> output_assref os x; output_string os "\n") refs.refsAssembly; - List.iter (fun x -> output_modref os x; output_string os "\n") refs.refsModul - -let goutput_module_manifest env os modul = - output_string os " .module "; output_sqstring os modul.modulName; - goutput_custom_attrs env os modul.modulCustomAttrs; - output_string os " .imagebase "; output_i32 os modul.modulImageBase; - output_string os " .file alignment "; output_i32 os modul.modulPhysAlignment; - output_string os " .subsystem "; output_i32 os modul.modulSubSystem; - output_string os " .corflags "; output_i32 os ((if modul.modulILonly then 0x0001 else 0) ||| (if modul.modul32bit then 0x0002 else 0)); - List.iter (fun r -> goutput_resource env os r) (dest_resources modul.modulResources); - output_string os "\n"; - (output_option (goutput_manifest env)) os modul.modulManifest - -let output_module os modul = - try - let refs = refs_of_module modul in - let env = mk_ppenv in - let env = ppenv_enter_modul env in - output_module_refs os refs; - goutput_module_manifest env os modul; - output_module_fragment_aux refs os modul; - with e -> - output_string os "*** Error during printing : "; output_string os (e.ToString()); flush os; - raise e - - -(* -------------------------------------------------------------------- - * Debug printing functions... - * -------------------------------------------------------------------- *) - -let output_scoref os x = goutput_scoref debug_ppenv os x -let output_fdef os x = goutput_fdef ecmaILGlobals.tref_Object debug_ppenv os x -let output_alternative os x = goutput_alternative_ref debug_ppenv os x -let output_curef os x = goutput_curef debug_ppenv os x -let output_cloref os x = goutput_cloref debug_ppenv os x -let output_cuspec os x = goutput_cuspec debug_ppenv os x -let output_instr os x = goutput_instr debug_ppenv os x -let output_ilmbody os x = goutput_ilmbody debug_ppenv os x -let output_mbody os x = goutput_mbody false debug_ppenv os x -let output_mdef os x = goutput_mdef debug_ppenv os x -let output_superclass os x = goutput_superclass debug_ppenv os x -let output_superinterfaces os x = goutput_superinterfaces debug_ppenv os x -let output_implements os x = goutput_implements debug_ppenv os x -let output_fdefs os x = goutput_fdefs ecmaILGlobals.tref_Object debug_ppenv os x -let output_mdefs os x = goutput_mdefs debug_ppenv os x -let output_typ os x = goutput_typ debug_ppenv os x -let output_ldtoken_info os x = goutput_ldtoken_info debug_ppenv os x -let output_typ_with_shortened_class_syntax os x = goutput_typ_with_shortened_class_syntax debug_ppenv os x -let output_gactuals os x = goutput_gactuals debug_ppenv os x -let output_tspec os x = goutput_tspec debug_ppenv os x -let output_tref os x = goutput_tref debug_ppenv os x -let output_gparam os x = goutput_gparam debug_ppenv os x -let output_gparams os x = goutput_gparams debug_ppenv os x -let output_gactual os x = goutput_gactual debug_ppenv os x -let output_dlocref os x = goutput_dlocref debug_ppenv os x -let output_callsig os x = goutput_callsig debug_ppenv os x -let output_mref os x = goutput_mref debug_ppenv os x -let output_mspec os x = goutput_mspec debug_ppenv os x -let output_vararg_mspec os x = goutput_vararg_mspec debug_ppenv os x -let output_vararg_sig os x = goutput_vararg_sig debug_ppenv os x -let output_fspec os x = goutput_fspec debug_ppenv os x -let output_apps os x = goutput_apps debug_ppenv os x -let output_tdef os x = goutput_tdef [] debug_ppenv true os x -let output_custom_attr os x = goutput_custom_attr debug_ppenv os x -let output_module_manifest os x = goutput_module_manifest debug_ppenv os x -let output_clospec os x = goutput_clospec debug_ppenv os x - -let output_sig_of_mdef os (md:ILMethodDef) = - output_callconv os md.mdCallconv; - output_string os " "; - output_typ os md.Return.Type; - output_string os " "; - output_sqstring os md.mdName; - output_parens (output_list "," output_typ) os md.ParameterTypes - -let gen_print_module f2 outfile modul = - let os = open_out outfile in - try - let res = f2 os modul in - close_out os; - res - with e -> - (try close_out os with _ -> ()); - rethrow(); - raise e - -let print_module y z = gen_print_module output_module y z - -let string_of_instr (x :ILInstr) = - let strBuilder = new StringBuilder() in - let strWriter = new StringWriter(strBuilder,System.Globalization.CultureInfo.CurrentCulture) in - let os = text_writer_to_out_channel (strWriter :> TextWriter) in - output_instr os x; - strBuilder.ToString() -#endif - - - - diff --git a/tools/FSharp_1.9.6.16/source/absil/ilprint.mli b/tools/FSharp_1.9.6.16/source/absil/ilprint.mli deleted file mode 100644 index 9abf4895..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilprint.mli +++ /dev/null @@ -1,15 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -/// Printer for the abstract syntax. -module Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open System.IO - -#if DEBUG -val public output_module : TextWriter -> ILModuleDef -> unit -#endif - -val public emit_tailcalls : bool ref diff --git a/tools/FSharp_1.9.6.16/source/absil/ilread.ml b/tools/FSharp_1.9.6.16/source/absil/ilread.ml deleted file mode 100644 index abc1bb70..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilread.ml +++ /dev/null @@ -1,4182 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. -#light - -//--------------------------------------------------------------------- -// The big binary reader -// -//--------------------------------------------------------------------- - -module Microsoft.FSharp.Compiler.AbstractIL.BinaryReader - -open System.IO -open System.Collections.Generic -open Internal.Utilities -open Internal.Utilities.Pervasives -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Support -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.AbstractIL.Internal.BinaryConstants -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Range - -type readerOptions = - { pdbPath: string option; - ilGlobals: ILGlobals; - optimizeForMemory: bool } - -let report_ref = ref (fun oc -> ()) -let add_report f = let old = !report_ref in report_ref := (fun oc -> old oc; f oc) -let report (oc:TextWriter) = !report_ref oc - -let logging = false -let checking = false -let _ = if checking then dprintn "warning : Ilread.checking is on" - -let empty_custom_attrs = mk_custom_attrs [] - -/// Read file from memory mapped files -module MMap = - - open System - open System.IO - open System.Runtime.InteropServices - open Microsoft.FSharp.NativeInterop - - type HANDLE = nativeint - type ADDR = nativeint - type SIZE_T = nativeint - - [] - extern bool CloseHandle (HANDLE handler) - - [] - extern HANDLE CreateFile (string lpFileName, - int dwDesiredAccess, - int dwShareMode, - HANDLE lpSecurityAttributes, - int dwCreationDisposition, - int dwFlagsAndAttributes, - HANDLE hTemplateFile) - - [] - extern HANDLE CreateFileMapping (HANDLE hFile, - HANDLE lpAttributes, - int flProtect, - int dwMaximumSizeLow, - int dwMaximumSizeHigh, - string lpName) - - [] - extern ADDR MapViewOfFile (HANDLE hFileMappingObject, - int dwDesiredAccess, - int dwFileOffsetHigh, - int dwFileOffsetLow, - SIZE_T dwNumBytesToMap) - - [] - extern bool UnmapViewOfFile (ADDR lpBaseAddress) - - let INVALID_HANDLE = new IntPtr(-1) - let MAP_READ = 0x0004 - let GENERIC_READ = 0x80000000 - let NULL_HANDLE = IntPtr.Zero - let FILE_SHARE_NONE = 0x0000 - let FILE_SHARE_READ = 0x0001 - let FILE_SHARE_WRITE = 0x0002 - let FILE_SHARE_READ_WRITE = 0x0003 - let CREATE_ALWAYS = 0x0002 - let OPEN_EXISTING = 0x0003 - let OPEN_ALWAYS = 0x0004 - - type mmap = { hMap: HANDLE; start:nativeint } - - let create fileName = - //printf "fileName = %s\n" fileName; - let hFile = CreateFile (fileName, GENERIC_READ, FILE_SHARE_READ_WRITE, IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero ) - //printf "hFile = %Lx\n" (hFile.ToInt64()); - if ( hFile.Equals(INVALID_HANDLE) ) then - failwithf "CreateFile(0x%08x)" ( Marshal.GetHRForLastWin32Error() ); - let protection = 0x00000002 (* ReadOnly *) - //printf "OK! hFile = %Lx\n" (hFile.ToInt64()); - let hMap = CreateFileMapping (hFile, IntPtr.Zero, protection, 0,0, null ) - ignore(CloseHandle(hFile)); - if hMap.Equals(NULL_HANDLE) then - failwithf "CreateFileMapping(0x%08x)" ( Marshal.GetHRForLastWin32Error() ); - - let start = MapViewOfFile (hMap, MAP_READ,0,0,0n) - - if ( start.Equals(IntPtr.Zero) ) then - failwithf "MapViewOfFile(0x%08x)" ( Marshal.GetHRForLastWin32Error() ); - { hMap = hMap; start = start; } - - let addr m (i:int) = - m.start + nativeint i - - let deref_byte (p:nativeint) = - NativePtr.read (NativePtr.of_nativeint p) |> int32 - - let read_byte m i = - deref_byte (addr m i) - - let read_bytes m i len = - let res = Bytes.zero_create len - Marshal.Copy(addr m i, res, 0,len); - res - - let read_i32 m i = - NativePtr.read (NativePtr.of_nativeint (addr m i)) - - let read_u16_as_i32 m i = - NativePtr.read (NativePtr.of_nativeint (addr m i)) |> int32 - - let close m = - ignore(UnmapViewOfFile ( m.start )); - ignore(CloseHandle ( m.hMap )) - - let count_utf8_string m i = - let start = addr m i - let mutable p = start - while deref_byte p <> 0 do - p <- p+1n - int (p-start) - - let read_utf8_string m i = - let n = count_utf8_string m i - new System.String(NativePtr.of_nativeint (addr m i), 0, n, System.Text.Encoding.UTF8) - - -module MMapChannel = - - type t = - { mutable mmPos: int; - mmMap: MMap.mmap } - - let open_in f = - let mmap = MMap.create f - { mmPos = 0; mmMap = mmap } - - let input_byte mc = - let res = MMap.read_byte mc.mmMap mc.mmPos - mc.mmPos <- mc.mmPos + 1; - res - - let input_i32 mc = - let res = MMap.read_i32 mc.mmMap mc.mmPos - mc.mmPos <- mc.mmPos + 4; - res - - let input_u16_as_i32 mc = - let res = MMap.read_u16_as_i32 mc.mmMap mc.mmPos - mc.mmPos <- mc.mmPos + 2; - res - - let input_bytes mc len = - let res = MMap.read_bytes mc.mmMap mc.mmPos len - mc.mmPos <- mc.mmPos + len; - res - - let peek_utf8_string mc = - MMap.read_utf8_string mc.mmMap mc.mmPos - - let seek mc addr = mc.mmPos <- addr - let close mc = MMap.close mc.mmMap - -/// Read file into cached memory blocks to avoid taking any kind of a -/// lock on the file, and avoid needing any cleanup of files. -module MemChannel = - - type mem_in_channel = - { mutable mcPos: int; - mcBlocks: byte[] } - - let open_in f = - let mcBlocks = System.IO.File.ReadAllBytes f - { mcPos = 0; mcBlocks = mcBlocks } - - let input_byte mc = - let p = mc.mcPos - let res = int mc.mcBlocks.[p] - mc.mcPos <- p + 1; - res - - let input_bytes mc len = - let p = mc.mcPos - let res = Array.sub mc.mcBlocks p len - mc.mcPos <- p + len; - res - - let seek mc addr = - mc.mcPos <- addr - - -(*--------------------------------------------------------------------- - * Read file from cached memory blocks or via 'seek' - *---------------------------------------------------------------------*) - -type input = - /// REVIEW: use a BinaryReader directly - | Chan of string * in_channel option ref - | Mem of MemChannel.mem_in_channel - | MMap of MMapChannel.t - -let input_byte is = - match is with - | Chan (_,{contents=Some ic}) -> Pervasives.input_byte ic - | Chan (s,_) -> failwith ("input_byte: input channel "^s^" was closed" ) - | Mem mc -> MemChannel.input_byte mc - | MMap mc -> MMapChannel.input_byte mc - -let seek is addr = - match is with - | Chan (_,{contents=Some ic}) -> Pervasives.seek_in ic ( addr) - | Chan (s,_) -> failwith ("seek: input channel "^s^" was closed" ) - | Mem mc -> MemChannel.seek mc ( addr) - | MMap mc -> MMapChannel.seek mc ( addr) - -let read_bytes is len = - match is with - | Chan (_,{contents=Some ic}) -> Bytes.really_input ic ( len) - | Chan (s,_) -> failwith ("read_bytes: input channel "^s^" was closed" ) - | Mem mc -> MemChannel.input_bytes mc ( len) - | MMap mc -> MMapChannel.input_bytes mc ( len) - -let read_i64 is = - let b0 = input_byte is - let b1 = input_byte is - let b2 = input_byte is - let b3 = input_byte is - let b4 = input_byte is - let b5 = input_byte is - let b6 = input_byte is - let b7 = input_byte is - int64 b0 ||| (int64 b1 <<< 8) ||| (int64 b2 <<< 16) ||| (int64 b3 <<< 24) ||| - (int64 b4 <<< 32) ||| (int64 b5 <<< 40) ||| (int64 b6 <<< 48) ||| (int64 b7 <<< 56) - -let read_i32 is = - match is with - | Chan (_,{contents=Some ic}) -> Pervasives.input_binary_int ic - | Chan (s,_) -> failwith ("read_bytes: input channel "^s^" was closed" ) - | MMap mm -> MMapChannel.input_i32 mm - | Mem _ -> - let b0 = input_byte is - let b1 = input_byte is - let b2 = input_byte is - let b3 = input_byte is - b0 ||| (b1 <<< 8) ||| (b2 <<< 16) ||| (b3 <<< 24) - - -(*--------------------------------------------------------------------- - * Derived reading - *---------------------------------------------------------------------*) - -let read_u16_as_i32 is = - match is with - | MMap mm -> MMapChannel.input_u16_as_i32 mm - | _ -> - let b0 = input_byte is - let b1 = input_byte is - b0 ||| (b1 <<< 8) - - -let read_u16 is = uint16 (read_u16_as_i32 is) - -let read_u8_as_i32 is = - let b0 = input_byte is - b0 - -let read_u8_as_u16 is = uint16 (read_u8_as_i32 is) - -let read_i8 is = - let b0 = input_byte is - sbyte (byte b0) - - -let read_i8_as_i32 is = int32 (read_i8 is) - -let float32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0) -let float_of_bits (x:int64) = System.BitConverter.Int64BitsToDouble(x) - -let read_ieee32 is = float32_of_bits (read_i32 is) -let read_ieee64 is = float_of_bits (read_i64 is) - -let read_z_unsigned_int32 is = - let b0 = read_u8_as_i32 is - if b0 <= 0x7F then b0 - elif b0 <= 0xbf then - let b0 = b0 &&& 0x7f - let b1 = read_u8_as_i32 is - (b0 <<< 8) ||| b1 - else - let b0 = b0 &&& 0x3f - let b1 = read_u8_as_i32 is - let b2 = read_u8_as_i32 is - let b3 = read_u8_as_i32 is - (b0 <<< 24) ||| (b1 <<< 16) ||| (b2 <<< 8) ||| b3 - -let SeekReadInt32 is addr = seek is addr; read_i32 is -let SeekReadInt64 is addr = seek is addr; read_i64 is -let SeekReadUInt16AsInt32 is addr = seek is addr; read_u16_as_i32 is -let SeekReadUInt16 is addr = seek is addr; read_u16 is -let SeekReadByteAsInt32 is addr = seek is addr; read_u8_as_i32 is -let SeekReadByteAsUInt16 is addr = seek is addr; read_u8_as_u16 is -let SeekReadSByte is addr = seek is addr; read_i8 is -let SeekReadSByteAsInt32 is addr = seek is addr; read_i8_as_i32 is -let SeekReadSingle is addr = seek is addr; read_ieee32 is -let SeekReadDouble is addr = seek is addr; read_ieee64 is -let SeekReadBytes is addr len = seek is addr; read_bytes is len - -let rec count_utf8_string is n = - let c = input_byte is - if c = 0 then n - else count_utf8_string is (n+1) - -let SeekReadUTF8String is addr = - seek is addr; - match is with - | MMap mc -> - // optimized implementation - MMapChannel.peek_utf8_string mc - | _ -> - let n = count_utf8_string is 0 - let bytes = SeekReadBytes is addr (n) - Bytes.utf8_bytes_as_string bytes - -let ReadBlob is = - let len = read_z_unsigned_int32 is - read_bytes is len - -let SeekReadBlob is addr = - seek is addr; - ReadBlob is - -let ReadUserString is = - let len = read_z_unsigned_int32 is - Bytes.unicode_bytes_as_string (read_bytes is (len - 1)) - -let SeekReadUserString is addr = - seek is addr; - ReadUserString is - -let ReadGuid is = - read_bytes is 0x10 - -let SeakReadGuid is addr = - seek is addr; - ReadGuid is - -(*--------------------------------------------------------------------- - * Utilities. - *---------------------------------------------------------------------*) - -let align alignment n = ((n + alignment - 0x1) / alignment) * alignment - -let uncoded_token tab idx = (((tag_of_table tab) <<< 24) ||| idx) - -let i32_to_uncoded_token tok = - let idx = tok &&& 0xffffff - let tab = tok lsr 24 - (Table ( tab), idx) - -let read_uncoded_token is = i32_to_uncoded_token (read_i32 is) - -#nowarn "65" - -type TaggedIndex<'a> = - struct - val tag: 'a - val index : int32 - new(tag,index) = { tag=tag; index=index } - end - - -let uncoded_token_to_tdor (tab,tok) = - let tag = - if tab = tab_TypeDef then tdor_TypeDef - elif tab = tab_TypeRef then tdor_TypeRef - elif tab = tab_TypeSpec then tdor_TypeSpec - else failwith "bad table in uncoded_token_to_tdor" - TaggedIndex(tag,tok) - -let uncoded_token_to_mdor (tab,tok) = - let tag = - if tab = tab_Method then mdor_MethodDef - elif tab = tab_MemberRef then mdor_MemberRef - else failwith "bad table in uncoded_token_to_mdor" - TaggedIndex(tag,tok) - -let SeekReaduncoded_token is addr = - seek is addr; - read_uncoded_token is - -let (|TaggedIndex|) (x:TaggedIndex<'a>) = x.tag, x.index -let read_z_tagged_idx f nbits big is = - let tok = if big then read_i32 is else read_u16_as_i32 is - let tagmask = - if nbits = 1 then 1 - elif nbits = 2 then 3 - elif nbits = 3 then 7 - elif nbits = 4 then 15 - elif nbits = 5 then 31 - else failwith "too many nbits" - let tag = tok &&& tagmask - let idx = tok lsr nbits - TaggedIndex(f tag, idx) - -(*--------------------------------------------------------------------- - * Primitives to help read signatures. These do not use the file cursor, but - * pass ar - *---------------------------------------------------------------------*) - -let sigptr_check (bytes:byte[]) sigptr = - if checking && sigptr >= bytes.Length then failwith "read past end of sig. " - -let sigptr_get_byte (bytes:byte[]) sigptr = - sigptr_check bytes sigptr; - int(bytes.[sigptr]), sigptr + 1 - -let sigptr_get_bool bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - (b0 = 0x01) ,sigptr - -let sigptr_get_u8 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - byte b0,sigptr - -let sigptr_get_i8 bytes sigptr = - let i,sigptr = sigptr_get_u8 bytes sigptr - sbyte i,sigptr - -let sigptr_get_u16 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - let b1,sigptr = sigptr_get_byte bytes sigptr - uint16 (b0 ||| (b1 <<< 8)),sigptr - -let sigptr_get_i16 bytes sigptr = - let u,sigptr = sigptr_get_u16 bytes sigptr - int16 u,sigptr - -let sigptr_get_i32 bytes sigptr = - sigptr_check bytes sigptr; - let b0 = int bytes.[sigptr] - let b1 = int bytes.[sigptr+1] - let b2 = int bytes.[sigptr+2] - let b3 = int bytes.[sigptr+3] - let res = b0 ||| (b1 <<< 8) ||| (b2 <<< 16) ||| (b3 <<< 24) - res, sigptr + 4 - -let sigptr_get_u32 bytes sigptr = - let u,sigptr = sigptr_get_i32 bytes sigptr - uint32 u,sigptr - -let sigptr_get_u64 bytes sigptr = - let u0,sigptr = sigptr_get_u32 bytes sigptr - let u1,sigptr = sigptr_get_u32 bytes sigptr - (uint64 u0 ||| (uint64 u1 <<< 32)),sigptr - -let sigptr_get_i64 bytes sigptr = - let u,sigptr = sigptr_get_u64 bytes sigptr - int64 u,sigptr - -let sigptr_get_ieee32 bytes sigptr = - let u,sigptr = sigptr_get_i32 bytes sigptr - float32_of_bits u,sigptr - -let sigptr_get_ieee64 bytes sigptr = - let u,sigptr = sigptr_get_i64 bytes sigptr - float_of_bits u,sigptr - -let sigptr_get_z_i32 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - if b0 <= 0x7F then b0, sigptr - elif b0 <= 0xbf then - let b0 = b0 &&& 0x7f - let b1,sigptr = sigptr_get_byte bytes sigptr - (b0 <<< 8) ||| b1, sigptr - else - let b0 = b0 &&& 0x3f - let b1,sigptr = sigptr_get_byte bytes sigptr - let b2,sigptr = sigptr_get_byte bytes sigptr - let b3,sigptr = sigptr_get_byte bytes sigptr - (b0 <<< 24) ||| (b1 <<< 16) ||| (b2 <<< 8) ||| b3, sigptr - - -let rec sigptr_foldi_acc f n (bytes:byte[]) (sigptr:int) i acc = - if i < n then - let x,sp = f bytes sigptr - sigptr_foldi_acc f n bytes sp (i+1) (x::acc) - else - List.rev acc, sigptr - -let sigptr_foldi f n (bytes:byte[]) (sigptr:int) = - sigptr_foldi_acc f n bytes sigptr 0 [] - - -let sigptr_get_bytes n bytes sigptr = - if checking && sigptr + n >= Bytes.length bytes then - dprintn "read past end of sig. in sigptr_get_string"; - Bytes.zero_create 0, sigptr - else - let res = Bytes.zero_create n - for i = 0 to (n - 1) do - Bytes.set res i (Bytes.get bytes (sigptr + i)) - res, sigptr + n - -let sigptr_get_string n bytes sigptr = - let bytearray,sigptr = sigptr_get_bytes n bytes sigptr - Bytes.utf8_bytes_as_string bytearray,sigptr - - -(* -------------------------------------------------------------------- - * Now the tables of instructions - * -------------------------------------------------------------------- *) - -[] -type prefixes = - { mutable al:Alignment; - mutable tl:Tailcall; - mutable vol:Volatility; - mutable ro:ReadonlySpec; - mutable constrained: ILType option} - -let no_prefixes mk prefixes = - if prefixes.al <> Aligned then failwith "an unaligned prefix is not allowed here"; - if prefixes.vol <> Nonvolatile then failwith "a volatile prefix is not allowed here"; - if prefixes.tl <> Normalcall then failwith "a tailcall prefix is not allowed here"; - if prefixes.ro <> NormalAddress then failwith "a readonly prefix is not allowed here"; - if prefixes.constrained <> None then failwith "a constrained prefix is not allowed here"; - mk - -let volatile_unaligned_prefix mk prefixes = - if prefixes.tl <> Normalcall then failwith "a tailcall prefix is not allowed here"; - if prefixes.constrained <> None then failwith "a constrained prefix is not allowed here"; - if prefixes.ro <> NormalAddress then failwith "a readonly prefix is not allowed here"; - mk (prefixes.al,prefixes.vol) - -let volatile_prefix mk prefixes = - if prefixes.al <> Aligned then failwith "an unaligned prefix is not allowed here"; - if prefixes.tl <> Normalcall then failwith "a tailcall prefix is not allowed here"; - if prefixes.constrained <> None then failwith "a constrained prefix is not allowed here"; - if prefixes.ro <> NormalAddress then failwith "a readonly prefix is not allowed here"; - mk prefixes.vol - -let tail_prefix mk prefixes = - if prefixes.al <> Aligned then failwith "an unaligned prefix is not allowed here"; - if prefixes.vol <> Nonvolatile then failwith "a volatile prefix is not allowed here"; - if prefixes.constrained <> None then failwith "a constrained prefix is not allowed here"; - if prefixes.ro <> NormalAddress then failwith "a readonly prefix is not allowed here"; - mk prefixes.tl - -let constraint_tail_prefix mk prefixes = - if prefixes.al <> Aligned then failwith "an unaligned prefix is not allowed here"; - if prefixes.vol <> Nonvolatile then failwith "a volatile prefix is not allowed here"; - if prefixes.ro <> NormalAddress then failwith "a readonly prefix is not allowed here"; - mk (prefixes.constrained,prefixes.tl ) - -let readonly_prefix mk prefixes = - if prefixes.al <> Aligned then failwith "an unaligned prefix is not allowed here"; - if prefixes.vol <> Nonvolatile then failwith "a volatile prefix is not allowed here"; - if prefixes.tl <> Normalcall then failwith "a tailcall prefix is not allowed here"; - if prefixes.constrained <> None then failwith "a constrained prefix is not allowed here"; - mk prefixes.ro - - -[] -type instr_decoder = - | I_u16_u8_instr of (prefixes -> uint16 -> ILInstr) - | I_u16_u16_instr of (prefixes -> uint16 -> ILInstr) - | I_none_instr of (prefixes -> ILInstr) - | I_i64_instr of (prefixes -> int64 -> ILInstr) - | I_i32_i32_instr of (prefixes -> int32 -> ILInstr) - | I_i32_i8_instr of (prefixes -> int32 -> ILInstr) - | I_r4_instr of (prefixes -> single -> ILInstr) - | I_r8_instr of (prefixes -> double -> ILInstr) - | I_field_instr of (prefixes -> ILFieldSpec -> ILInstr) - | I_method_instr of (prefixes -> ILMethodSpec * varargs -> ILInstr) - | I_unconditional_i32_instr of (prefixes -> ILCodeLabel -> ILInstr) - | I_unconditional_i8_instr of (prefixes -> ILCodeLabel -> ILInstr) - | I_conditional_i32_instr of (prefixes -> ILCodeLabel * ILCodeLabel -> ILInstr) - | I_conditional_i8_instr of (prefixes -> ILCodeLabel * ILCodeLabel -> ILInstr) - | I_string_instr of (prefixes -> string -> ILInstr) - | I_switch_instr of (prefixes -> ILCodeLabel list * ILCodeLabel -> ILInstr) - | I_tok_instr of (prefixes -> ILTokenSpec -> ILInstr) - | I_sig_instr of (prefixes -> ILCallingSignature * varargs -> ILInstr) - | I_type_instr of (prefixes -> ILType -> ILInstr) - | I_invalid_instr - -let mk_stind dt = volatile_unaligned_prefix (fun (x,y) -> I_stind(x,y,dt)) -let mk_ldind dt = volatile_unaligned_prefix (fun (x,y) -> I_ldind(x,y,dt)) - -let instrs () = - [ i_ldarg_s, I_u16_u8_instr (no_prefixes (fun x -> I_ldarg x)); - i_starg_s, I_u16_u8_instr (no_prefixes (fun x -> I_starg x)); - i_ldarga_s, I_u16_u8_instr (no_prefixes (fun x -> I_ldarga x)); - i_stloc_s, I_u16_u8_instr (no_prefixes (fun x -> I_stloc x)); - i_ldloc_s, I_u16_u8_instr (no_prefixes (fun x -> I_ldloc x)); - i_ldloca_s, I_u16_u8_instr (no_prefixes (fun x -> I_ldloca x)); - i_ldarg, I_u16_u16_instr (no_prefixes (fun x -> I_ldarg x)); - i_starg, I_u16_u16_instr (no_prefixes (fun x -> I_starg x)); - i_ldarga, I_u16_u16_instr (no_prefixes (fun x -> I_ldarga x)); - i_stloc, I_u16_u16_instr (no_prefixes (fun x -> I_stloc x)); - i_ldloc, I_u16_u16_instr (no_prefixes (fun x -> I_ldloc x)); - i_ldloca, I_u16_u16_instr (no_prefixes (fun x -> I_ldloca x)); - i_stind_i, I_none_instr (mk_stind DT_I); - i_stind_i1, I_none_instr (mk_stind DT_I1); - i_stind_i2, I_none_instr (mk_stind DT_I2); - i_stind_i4, I_none_instr (mk_stind DT_I4); - i_stind_i8, I_none_instr (mk_stind DT_I8); - i_stind_r4, I_none_instr (mk_stind DT_R4); - i_stind_r8, I_none_instr (mk_stind DT_R8); - i_stind_ref, I_none_instr (mk_stind DT_REF); - i_ldind_i, I_none_instr (mk_ldind DT_I); - i_ldind_i1, I_none_instr (mk_ldind DT_I1); - i_ldind_i2, I_none_instr (mk_ldind DT_I2); - i_ldind_i4, I_none_instr (mk_ldind DT_I4); - i_ldind_i8, I_none_instr (mk_ldind DT_I8); - i_ldind_u1, I_none_instr (mk_ldind DT_U1); - i_ldind_u2, I_none_instr (mk_ldind DT_U2); - i_ldind_u4, I_none_instr (mk_ldind DT_U4); - i_ldind_r4, I_none_instr (mk_ldind DT_R4); - i_ldind_r8, I_none_instr (mk_ldind DT_R8); - i_ldind_ref, I_none_instr (mk_ldind DT_REF); - i_cpblk, I_none_instr (volatile_unaligned_prefix (fun (x,y) -> I_cpblk(x,y))); - i_initblk, I_none_instr (volatile_unaligned_prefix (fun (x,y) -> I_initblk(x,y))); - i_ldc_i8, I_i64_instr (no_prefixes (fun x ->I_arith (AI_ldc (DT_I8, NUM_I8 x)))); - i_ldc_i4, I_i32_i32_instr (no_prefixes (fun x -> ((mk_ldc_i32 x)))); - i_ldc_i4_s, I_i32_i8_instr (no_prefixes (fun x -> ((mk_ldc_i32 x)))); - i_ldc_r4, I_r4_instr (no_prefixes (fun x -> I_arith (AI_ldc (DT_R4, NUM_R4 x)))); - i_ldc_r8, I_r8_instr (no_prefixes (fun x -> I_arith (AI_ldc (DT_R8, NUM_R8 x)))); - i_ldfld, I_field_instr (volatile_unaligned_prefix(fun (x,y) fspec -> I_ldfld(x,y,fspec))); - i_stfld, I_field_instr (volatile_unaligned_prefix(fun (x,y) fspec -> I_stfld(x,y,fspec))); - i_ldsfld, I_field_instr (volatile_prefix (fun x fspec -> I_ldsfld (x, fspec))); - i_stsfld, I_field_instr (volatile_prefix (fun x fspec -> I_stsfld (x, fspec))); - i_ldflda, I_field_instr (no_prefixes (fun fspec -> I_ldflda fspec)); - i_ldsflda, I_field_instr (no_prefixes (fun fspec -> I_ldsflda fspec)); - i_call, I_method_instr (tail_prefix (fun tl (mspec,y) -> I_call (tl,mspec,y))); - i_ldftn, I_method_instr (no_prefixes (fun (mspec,y) -> I_ldftn mspec)); - i_ldvirtftn, I_method_instr (no_prefixes (fun (mspec,y) -> I_ldvirtftn mspec)); - i_newobj, I_method_instr (no_prefixes (fun (mspec,y) -> I_newobj (mspec,y))); - i_callvirt, I_method_instr (constraint_tail_prefix (fun (c,tl) (mspec,y) -> match c with Some ty -> I_callconstraint(tl,ty,mspec,y) | None -> I_callvirt (tl,mspec,y))); - i_leave_s, I_unconditional_i8_instr (no_prefixes (fun x -> I_leave x)); - i_br_s, I_unconditional_i8_instr (no_prefixes (fun x -> I_br x)); - i_leave, I_unconditional_i32_instr (no_prefixes (fun x -> I_leave x)); - i_br, I_unconditional_i32_instr (no_prefixes (fun x -> I_br x)); - i_brtrue_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_brtrue,x,y))); - i_brfalse_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_brfalse,x,y))); - i_beq_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_beq,x,y))); - i_blt_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_blt,x,y))); - i_blt_un_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_blt_un,x,y))); - i_ble_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_ble,x,y))); - i_ble_un_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_ble_un,x,y))); - i_bgt_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_bgt,x,y))); - i_bgt_un_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_bgt_un,x,y))); - i_bge_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_bge,x,y))); - i_bge_un_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_bge_un,x,y))); - i_bne_un_s, I_conditional_i8_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_bne_un,x,y))); - i_brtrue, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_brtrue,x,y))); - i_brfalse, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_brfalse,x,y))); - i_beq, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_beq,x,y))); - i_blt, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_blt,x,y))); - i_blt_un, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_blt_un,x,y))); - i_ble, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_ble,x,y))); - i_ble_un, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_ble_un,x,y))); - i_bgt, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_bgt,x,y))); - i_bgt_un, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_bgt_un,x,y))); - i_bge, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_bge,x,y))); - i_bge_un, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_bge_un,x,y))); - i_bne_un, I_conditional_i32_instr (no_prefixes (fun (x,y) -> I_brcmp (BI_bne_un,x,y))); - i_ldstr, I_string_instr (no_prefixes (fun x -> I_ldstr x)); - i_switch, I_switch_instr (no_prefixes (fun x -> I_switch x)); - i_ldtoken, I_tok_instr (no_prefixes (fun x -> I_ldtoken x)); - i_calli, I_sig_instr (tail_prefix (fun tl (x,y) -> I_calli (tl, x, y))); - i_mkrefany, I_type_instr (no_prefixes (fun x -> I_mkrefany x)); - i_refanyval, I_type_instr (no_prefixes (fun x -> I_refanyval x)); - i_ldelema, I_type_instr (readonly_prefix (fun ro x -> I_ldelema (ro,Rank1ArrayShape,x))); - i_ldelem_any, I_type_instr (no_prefixes (fun x -> I_ldelem_any (Rank1ArrayShape,x))); - i_stelem_any, I_type_instr (no_prefixes (fun x -> I_stelem_any (Rank1ArrayShape,x))); - i_newarr, I_type_instr (no_prefixes (fun x -> I_newarr (Rank1ArrayShape,x))); - i_castclass, I_type_instr (no_prefixes (fun x -> I_castclass x)); - i_isinst, I_type_instr (no_prefixes (fun x -> I_isinst x)); - i_unbox_any, I_type_instr (no_prefixes (fun x -> I_unbox_any x)); - i_cpobj, I_type_instr (no_prefixes (fun x -> I_cpobj x)); - i_initobj, I_type_instr (no_prefixes (fun x -> I_initobj x)); - i_ldobj, I_type_instr (volatile_unaligned_prefix (fun (x,y) z -> I_ldobj (x,y,z))); - i_stobj, I_type_instr (volatile_unaligned_prefix (fun (x,y) z -> I_stobj (x,y,z))); - i_sizeof, I_type_instr (no_prefixes (fun x -> I_sizeof x)); - i_box, I_type_instr (no_prefixes (fun x -> I_box x)); - i_unbox, I_type_instr (no_prefixes (fun x -> I_unbox x)); ] - -(* The tables are delayed to avoid building them unnecessarily at startup *) -(* Many applications of AbsIL (e.g. a compiler) don't need to read instructions. *) -let one_byte_instrs = ref None -let two_byte_instrs = ref None -let fill_instrs () = - let one_byte_tab = Array.create 256 I_invalid_instr - let two_byte_tab = Array.create 256 I_invalid_instr - let add_instr (i,f) = - if i > 0xff then - assert (i lsr 8 = 0xfe); - let i = (i &&& 0xff) - if (two_byte_tab.[i] <> I_invalid_instr) then - dprintn ("warning: duplicate decode entries for "^string i); - two_byte_tab.[i] <- f - else - if (one_byte_tab.[i] <> I_invalid_instr) then - dprintn ("warning: duplicate decode entries for "^string i); - one_byte_tab.[i] <- f - List.iter add_instr (instrs()); - List.iter (fun (x,mk) -> add_instr (x,I_none_instr (no_prefixes mk))) (noarg_instrs.Force()); - one_byte_instrs := Some one_byte_tab; - two_byte_instrs := Some two_byte_tab - -let rec get_one_byte_instr i = - match !one_byte_instrs with - | None -> fill_instrs(); get_one_byte_instr i - | Some t -> t.[i] - -let rec get_two_byte_instr i = - match !two_byte_instrs with - | None -> fill_instrs(); get_two_byte_instr i - | Some t -> t.[i] - -(*--------------------------------------------------------------------- - * - *---------------------------------------------------------------------*) - -type chunk = { size: int32; addr: int32 } - -let chunk sz next = ({addr=next; size=sz},next + sz) -let nochunk next = ({addr= 0x0;size= 0x0; } ,next) - -type row_element_kind = - | UShort - | ULong - | Byte - | Data - | GGuid - | Blob - | SString - | SimpleIndex of table - | TypeDefOrRefOrSpec - | TypeOrMethodDef - | HasConstant - | HasCustomAttribute - | HasFieldMarshal - | HasDeclSecurity - | MemberRefParent - | HasSemantics - | MethodDefOrRef - | MemberForwarded - | Implementation - | CustomAttributeType - | ResolutionScope -type row_kind = RowKind of row_element_kind list - -let kind_AssemblyRef = RowKind [ UShort; UShort; UShort; UShort; ULong; Blob; SString; SString; Blob; ] -let kind_ModuleRef = RowKind [ SString ] -let kind_FileRef = RowKind [ ULong; SString; Blob ] -let kind_TypeRef = RowKind [ ResolutionScope; SString; SString ] -let kind_TypeSpec = RowKind [ Blob ] -let kind_TypeDef = RowKind [ ULong; SString; SString; TypeDefOrRefOrSpec; SimpleIndex tab_Field; SimpleIndex tab_Method ] -let kind_PropertyMap = RowKind [ SimpleIndex tab_TypeDef; SimpleIndex tab_Property ] -let kind_EventMap = RowKind [ SimpleIndex tab_TypeDef; SimpleIndex tab_Event ] -let kind_InterfaceImpl = RowKind [ SimpleIndex tab_TypeDef; TypeDefOrRefOrSpec ] -let kind_Nested = RowKind [ SimpleIndex tab_TypeDef; SimpleIndex tab_TypeDef ] -let kind_CustomAttribute = RowKind [HasCustomAttribute; CustomAttributeType; Blob ] -let kind_DeclSecurity = RowKind [ UShort; HasDeclSecurity; Blob ] -let kind_MemberRef = RowKind [MemberRefParent; SString; Blob ] -let kind_StandAloneSig = RowKind [Blob ] -let kind_FieldDef = RowKind [UShort; SString; Blob ] -let kind_FieldRVA = RowKind [Data; SimpleIndex tab_Field ] -let kind_FieldMarshal = RowKind [HasFieldMarshal; Blob ] -let kind_Constant = RowKind [ UShort;HasConstant; Blob ] -let kind_FieldLayout = RowKind [ULong; SimpleIndex tab_Field ] -let kind_Param = RowKind [ UShort; UShort; SString ] -let kind_MethodDef = RowKind [ULong; UShort; UShort; SString; Blob; SimpleIndex tab_Param ] -let kind_MethodImpl = RowKind [SimpleIndex tab_TypeDef; MethodDefOrRef; MethodDefOrRef ] -let kind_ImplMap = RowKind [UShort; MemberForwarded; SString; SimpleIndex tab_ModuleRef ] -let kind_MethodSemantics = RowKind [UShort; SimpleIndex tab_Method; HasSemantics ] -let kind_Property =RowKind [ UShort; SString; Blob ] -let kind_Event =RowKind [ UShort; SString; TypeDefOrRefOrSpec ] -let kind_ManifestResource =RowKind [ ULong; ULong; SString; Implementation ] -let kind_ClassLayout = RowKind [ UShort; ULong; SimpleIndex tab_TypeDef ] -let kind_ExportedType = RowKind [ ULong; ULong; SString; SString; Implementation ] -let kind_Assembly = RowKind [ ULong; UShort; UShort; UShort; UShort; ULong; Blob; SString; SString ] -let kind_GenericParam_v1_1 = RowKind [ UShort; UShort; TypeOrMethodDef; SString; TypeDefOrRefOrSpec ] -let kind_GenericParam_v2_0 = RowKind [ UShort; UShort; TypeOrMethodDef; SString ] -let kind_MethodSpec = RowKind [ MethodDefOrRef; Blob ] -let kind_GenericParamConstraint = RowKind [ SimpleIndex tab_GenericParam; TypeDefOrRefOrSpec ] -let kind_Module = RowKind [ UShort; SString; GGuid; GGuid; GGuid ] -let kind_Illegal = RowKind [] - -(*--------------------------------------------------------------------- - * Used for binary searches of sorted tables. Each function that reads - * a table row returns a tuple that contains the elements of the row. - * One of these elements may be a key for a sorted table. These - * keys can be compared using the functions below depending on the - * kind of element in that column. - *---------------------------------------------------------------------*) - -let hc_compare (TaggedIndex(HasConstantTag t1, (idx1:int))) (TaggedIndex(HasConstantTag t2, idx2)) = - if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1 t2 - -let hs_compare (TaggedIndex(HasSemanticsTag t1, (idx1:int))) (TaggedIndex(HasSemanticsTag t2, idx2)) = - if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1 t2 - -let hca_compare (TaggedIndex(HasCustomAttributeTag t1, (idx1:int))) (TaggedIndex(HasCustomAttributeTag t2, idx2)) = - if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1 t2 - -let mf_compare (TaggedIndex(MemberForwardedTag t1, (idx1:int))) (TaggedIndex(MemberForwardedTag t2, idx2)) = - if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1 t2 - -let hds_compare (TaggedIndex(HasDeclSecurityTag t1, (idx1:int))) (TaggedIndex(HasDeclSecurityTag t2, idx2)) = - if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1 t2 - -let hfm_compare (TaggedIndex(HasFieldMarshalTag t1, idx1)) (TaggedIndex(HasFieldMarshalTag t2, idx2)) = - if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1 t2 - -let tomd_compare (TaggedIndex(TypeOrMethodDefTag t1, idx1)) (TaggedIndex(TypeOrMethodDefTag t2, idx2)) = - if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1 t2 - -let simpleindex_compare (idx1:int) (idx2:int) = - compare idx1 idx2 - -(*--------------------------------------------------------------------- - * The various keys for the various caches. We avoid using polymorphic - * types within keys becuase F# is not crash hot at hashing and compare - * them. In other words, the types in the indexes below should not - * use (real) tuples, lists, options etc. We also add a couple of - * hashtables indexed by integers since these are also much faster - * for F#. - *---------------------------------------------------------------------*) - -type typeDefAsTypIdx = TypeDefAsTypIdx of ILBoxity * ILGenericArgs * int -type typeRefAsTypIdx = TypeRefAsTypIdx of ILBoxity * ILGenericArgs * int -type blobAsMethodSigIdx = BlobAsMethodSigIdx of int * int32 -type blobAsFieldSigIdx = BlobAsFieldSigIdx of int * int32 -type blobAsPropSigIdx = BlobAsPropSigIdx of int * int32 -type blobAsLocalSigIdx = BlobAsLocalSigIdx of int * int32 -type memberRefAsMspecIdx = MemberRefAsMspecIdx of int * int -type methodSpecAsMspecIdx = MethodSpecAsMspecIdx of int * int -type memberRefAsFspecIdx = MemberRefAsFspecIdx of int * int -type customAttrIdx = CustomAttrIdx of customAttributeType_tag * int * int32 -type securityDeclIdx = SecurityDeclIdx of uint16 * int32 -type genericParsIdx = GenericParamsIdx of int * typeOrMethodDef_tag * int - -(*--------------------------------------------------------------------- - * Polymorphic caches for row and heap readers - *---------------------------------------------------------------------*) - -module I32hashtbl = - - type 'a t = System.Collections.Generic.Dictionary - let create (n:int) : 'a t = new System.Collections.Generic.Dictionary<_,_>(n) - let add (t: 'a t) x y = t.Add(x,y) - let find (t: 'a t) x = t.Item(x) - let mem (t: 'a t) x = t.ContainsKey(x) - - -let mk_cache_int32 lowMem inbase nm sz = - if lowMem then (fun f x -> f x) else - let cache = ref null in // I32hashtbl.create 11 (* sz *) - let count = ref 0 - add_report (fun oc -> if !count <> 0 then output_string oc (inbase^string !count ^ " "^nm^" cache hits"^"\n")); - fun f (idx:int32) -> - let cache = - match !cache with - | null -> cache := I32hashtbl.create 11 (* sz *) - | _ -> () - !cache - if I32hashtbl.mem cache idx then (incr count; I32hashtbl.find cache idx) - else let res = f idx in I32hashtbl.add cache idx res; res - -let mk_cache_gen lowMem inbase nm sz = - if lowMem then (fun f x -> f x) else - let cache = ref null in // I32hashtbl.create 11 (* sz *) - //let cache = new Dictionary<_,_>(sz:int) - let count = ref 0 - add_report (fun oc -> if !count <> 0 then output_string oc (inbase^string !count ^ " "^nm^" cache hits"^"\n")); - fun f (idx :'a) -> - let cache = - match !cache with - | null -> cache := new Dictionary<_,_>(11 (* sz:int *) ) - | _ -> () - !cache - if cache.ContainsKey idx then (incr count; cache.[idx]) - else let res = f idx in cache.[idx] <- res; res - -(*----------------------------------------------------------------------- - * Polymorphic general helpers for searching for particular rows. - * ----------------------------------------------------------------------*) - -let SeekFindRow nrows rowChooser = - let mutable i = 1 - while (i <= nrows && not (rowChooser i)) do - i <- i + 1; - if i > nrows then dprintn "warning: SeekFindRow: row not found"; - i - -// search for rows satisfying predicate -let SeekReadIndexedRows (nrows,rowReader,keyfunc,keycomparef,binchop, rowConverter) = - if binchop then - let mutable low = 0 - let mutable high = nrows + 1 - begin - let mutable fin = false - while not fin do - (* if logging then dprintn (infile ^ ": binary search of table "^string (tag_of_table tab)^", low = "^string !low^", high = "^string !high);*) - if high - low <= 1 then - fin <- true - else - let mid = (low + high) / 2 - let midrow = rowReader mid - let c = keycomparef (keyfunc midrow) - if c > 0 then - low <- mid - elif c < 0 then - high <- mid - else - fin <- true - end; - (* if logging then dprintn (infile ^ ": finished binary search of table "^string (tag_of_table tab));*) - let mutable res = [] - if high - low > 1 then - // now read off rows, forward and backwards - let mid = (low + high) / 2 - // read forward - begin - let mutable fin = false - let mutable curr = mid - while not fin do - if curr > nrows then - fin <- true; - else - let currrow = rowReader curr - if keycomparef (keyfunc currrow) = 0 then - res <- rowConverter currrow :: res; - else - fin <- true; - curr <- curr + 1; - done; - end; - res <- List.rev res; - // read backwards - begin - let mutable fin = false - let mutable curr = mid - 1 - while not fin do - if curr = 0 then - fin <- true - else - let currrow = rowReader curr - if keycomparef (keyfunc currrow) = 0 then - res <- rowConverter currrow :: res; - else - fin <- true; - curr <- curr - 1; - end; - // sanity check - if checking then - let res2 = - [ for i = 1 to nrows do - let rowinfo = rowReader i - if keycomparef (keyfunc rowinfo) = 0 then - yield rowConverter rowinfo ] - if (res2 <> res) then - failwith ("results of binary search did not match results of linear search: linear search produced "^string res2.Length^", binary search produced "^string res.Length) - - res - else - let res = ref [] - for i = 1 to nrows do - let rowinfo = rowReader i - if keycomparef (keyfunc rowinfo) = 0 then - res := rowConverter rowinfo :: !res; - List.rev !res - - -let SeekReadOptionalIndexedRow ((nrows,rowReader,keyfunc,keycomparer,binchop,rowConverter) as info) = - match SeekReadIndexedRows info with - | [k] -> Some k - | [] -> None - | h::t -> - dprintn ("multiple rows found when indexing table"); - Some h - -let SeekReadIndexedRow ((nrows,rowReader,keyfunc,keycomparer,binchop,rowConverter) as info) = - match SeekReadOptionalIndexedRow info with - | Some row -> row - | None -> failwith ("no row found for key when indexing table") - -(*--------------------------------------------------------------------- - * The big fat reader. - *---------------------------------------------------------------------*) - -type ILModuleReader = - { modul: ILModuleDef; - ilAssemblyRefs: Lazy - dispose: unit -> unit } - member x.ILModuleDef = x.modul - member x.ILAssemblyRefs = x.ilAssemblyRefs.Force() - - -type method_data = ILType * ILCallingConv * string * ILType list * ILType * ILType list -type vararg_method_data = ILType * ILCallingConv * string * ILType list * ILType list option * ILType * ILType list - -[] -type ctxt = - { ilg: ILGlobals; - data_end_points: int32 list Lazy.t; - sorted: int64; - pdb: (pdb_reader * (string -> ILSourceDocument)) option; - eptoken: table * int; - nrows: table -> int; - text_phys_loc : int32; - text_phys_size : int32; - data_phys_loc : int32; - data_phys_size : int32; - anyV2P : (string * int32) -> int32; - metadata_addr: int32; - section_headers : (int32 * int32 * int32) list; - native_resources_addr:int32; - native_resources_size:int32; - resources_addr:int32; - strongname_addr:int32; - vtable_fixups_addr:int32; - is:input; - infile:string; - user_strings_stream_phys_loc: int32; - strings_stream_phys_loc: int32; - blobs_stream_phys_loc: int32; - ReadUserStringHeap: (int32 -> string); - MemoizeString: string -> string; - ReadStringHeap: (int32 -> string); - ReadBlobHeap: (int32 -> byte[]); - guids_stream_phys_loc : int32; - row_addr : (table -> int -> int32); - table_bignesses : bool array; - rs_bigness : bool; - tdor_bigness : bool; - tomd_bigness : bool; - hc_bigness : bool; - hca_bigness : bool; - hfm_bigness : bool; - hds_bigness : bool; - mrp_bigness : bool; - hs_bigness : bool; - mdor_bigness : bool; - mf_bigness : bool; - i_bigness : bool; - cat_bigness : bool; - strings_big: bool; - guids_big: bool; - blobs_big: bool; - count_TypeRef : int ref; - count_TypeDef : int ref; - count_Field : int ref; - count_Method : int ref; - count_Param : int ref; - count_InterfaceImpl : int ref; - count_MemberRef : int ref; - count_Constant : int ref; - count_CustomAttribute : int ref; - count_FieldMarshal: int ref; - count_Permission : int ref; - count_ClassLayout : int ref; - count_FieldLayout : int ref; - count_StandAloneSig : int ref; - count_EventMap : int ref; - count_Event : int ref; - count_PropertyMap : int ref; - count_Property : int ref; - count_MethodSemantics : int ref; - count_MethodImpl : int ref; - count_ModuleRef : int ref; - count_TypeSpec : int ref; - count_ImplMap : int ref; - count_FieldRVA : int ref; - count_Assembly : int ref; - count_AssemblyRef : int ref; - count_File : int ref; - count_ExportedType : int ref; - count_ManifestResource : int ref; - count_Nested : int ref; - count_GenericParam : int ref; - count_GenericParamConstraint : int ref; - count_MethodSpec : int ref; - SeekReadNestedRow : int -> int * int; - SeekReadConstantRow : int -> int32 * TaggedIndex * int32; - SeekReadMethodSemanticsRow : int -> int32 * int * TaggedIndex; - SeekReadTypeDefRow : int -> int32 * int32 * int32 * TaggedIndex * int * int; - SeekReadInterfaceImplRow : int -> int * TaggedIndex; - SeekReadFieldMarshalRow : int -> TaggedIndex * int32; - SeekReadPropertyMapRow : int -> int * int; - SeekReadAssemblyRef : int -> ILAssemblyRef; - SeekReadMethodSpec_as_mdata : methodSpecAsMspecIdx -> vararg_method_data; - SeekReadMemberRef_as_mdata : memberRefAsMspecIdx -> vararg_method_data; - SeekReadMemberRef_as_fspec : memberRefAsFspecIdx -> ILFieldSpec; - SeekReadCustomAttr : customAttrIdx -> ILAttribute; - SeekReadSecurityDecl : securityDeclIdx -> ILPermission; - SeekReadTypeRef : int ->ILTypeRef; - SeekReadTypeRef_as_typ : typeRefAsTypIdx -> ILType; - ReadBlobHeap_as_property_sig : blobAsPropSigIdx -> ILThisConvention * ILType * ILType list; - ReadBlobHeap_as_field_sig : blobAsFieldSigIdx -> ILType; - ReadBlobHeap_as_method_sig : blobAsMethodSigIdx -> bool * int32 * ILCallingConv * ILType * ILType list * ILType list option; - - ReadBlobHeap_as_locals_sig : blobAsLocalSigIdx -> Local list; - SeekReadTypeDefAsType : typeDefAsTypIdx -> ILType; - SeekReadMethodDef_as_mdata : int -> method_data; - SeekReadGenericParams : genericParsIdx -> ILGenericParameterDef list; - SeekReadFieldDef_as_fspec : int -> ILFieldSpec; } - -let read_z_untagged_idx tab ctxt = - if ctxt.table_bignesses.[tag_of_table tab] - then read_i32 ctxt.is - else read_u16_as_i32 ctxt.is - -let read_rs_idx ctxt = read_z_tagged_idx mkResolutionScopeTag 2 ctxt.rs_bigness ctxt.is -let read_tdor_idx ctxt = read_z_tagged_idx mkTypeDefOrRefOrSpecTag 2 ctxt.tdor_bigness ctxt.is -let read_tomd_idx ctxt = read_z_tagged_idx mkTypeOrMethodDefTag 1 ctxt.tomd_bigness ctxt.is -let read_hc_idx ctxt = read_z_tagged_idx mkHasConstantTag 2 ctxt.hc_bigness ctxt.is -let read_hca_idx ctxt = read_z_tagged_idx mkHasCustomAttributeTag 5 ctxt.hca_bigness ctxt.is -let read_hfm_idx ctxt = read_z_tagged_idx mkHasFieldMarshalTag 1 ctxt.hfm_bigness ctxt.is -let read_hds_idx ctxt = read_z_tagged_idx mkHasDeclSecurityTag 2 ctxt.hds_bigness ctxt.is -let read_mrp_idx ctxt = read_z_tagged_idx mkMemberRefParentTag 3 ctxt.mrp_bigness ctxt.is -let read_hs_idx ctxt = read_z_tagged_idx mkHasSemanticsTag 1 ctxt.hs_bigness ctxt.is -let read_mdor_idx ctxt = read_z_tagged_idx mkMethodDefOrRefTag 1 ctxt.mdor_bigness ctxt.is -let read_mf_idx ctxt = read_z_tagged_idx mkMemberForwardedTag 1 ctxt.mf_bigness ctxt.is -let read_i_idx ctxt = read_z_tagged_idx mkImplementationTag 2 ctxt.i_bigness ctxt.is -let read_cat_idx ctxt = read_z_tagged_idx mkCustomAttributeTypeTag 3 ctxt.cat_bigness ctxt.is -let read_string_idx ctxt = if ctxt.strings_big then read_i32 ctxt.is else read_u16_as_i32 ctxt.is -let read_guid_idx ctxt = if ctxt.guids_big then read_i32 ctxt.is else read_u16_as_i32 ctxt.is -let read_blob_idx ctxt = if ctxt.blobs_big then read_i32 ctxt.is else read_u16_as_i32 ctxt.is - -let SeekReadModuleRow ctxt idx = - if idx = 0 then failwith "cannot read Module table row 0"; - let addr = ctxt.row_addr tab_Module idx - if logging then dprintn (ctxt.infile ^ ": module row addr = " ^ string addr); - - seek ctxt.is addr; - let generation = read_u16 ctxt.is - let name_idx = read_string_idx ctxt - let mvid_idx = read_guid_idx ctxt - let encid_idx = read_guid_idx ctxt - let encbaseid_idx = read_guid_idx ctxt - (generation, name_idx, mvid_idx, encid_idx, encbaseid_idx) - -/// Read Table ILTypeRef -let SeekReadTypeRefRow ctxt idx = - incr ctxt.count_TypeRef; - let addr = ctxt.row_addr tab_TypeRef idx - seek ctxt.is addr; - let scope_idx = read_rs_idx ctxt - let name_idx = read_string_idx ctxt - let namespace_idx = read_string_idx ctxt - (scope_idx,name_idx,namespace_idx) - -/// Read Table ILTypeDef -let SeekReadTypeDefRow ctxt idx = ctxt.SeekReadTypeDefRow idx -let SeekReadTypeDefRowUncached ctxtH idx = - let ctxt = getHole ctxtH - incr ctxt.count_TypeDef; - let addr = ctxt.row_addr tab_TypeDef idx - seek ctxt.is addr; - let flags = read_i32 ctxt.is - let name_idx = read_string_idx ctxt - let namespace_idx = read_string_idx ctxt - let extends_idx = read_tdor_idx ctxt - let fields_idx = read_z_untagged_idx tab_Field ctxt - let methods_idx = read_z_untagged_idx tab_Method ctxt - (flags, name_idx, namespace_idx, extends_idx, fields_idx, methods_idx) - -/// Read Table Field -let SeekReadFieldRow ctxt idx = - incr ctxt.count_Field; - let addr = ctxt.row_addr tab_Field idx - seek ctxt.is addr; - let flags = read_u16_as_i32 ctxt.is - let name_idx = read_string_idx ctxt - let type_idx = read_blob_idx ctxt - (flags,name_idx,type_idx) - -/// Read Table Method -let SeekReadMethodRow ctxt idx = - incr ctxt.count_Method; - let addr = ctxt.row_addr tab_Method idx - seek ctxt.is addr; - let code_rva = read_i32 ctxt.is - let implflags = read_u16_as_i32 ctxt.is - let flags = read_u16_as_i32 ctxt.is - let name_idx = read_string_idx ctxt - let type_idx = read_blob_idx ctxt - let param_idx = read_z_untagged_idx tab_Param ctxt - (code_rva, implflags, flags, name_idx, type_idx, param_idx) - -/// Read Table Param -let SeekReadParamRow ctxt idx = - incr ctxt.count_Param; - let addr = ctxt.row_addr tab_Param idx - seek ctxt.is addr; - let flags = read_u16_as_i32 ctxt.is - let seq = (read_u16_as_i32 ctxt.is) - let name_idx = read_string_idx ctxt - (flags,seq,name_idx) - -/// Read Table InterfaceImpl -let SeekReadInterfaceImplRow ctxt idx = ctxt.SeekReadInterfaceImplRow idx -let SeekReadInterfaceImplRowUncached ctxtH idx = - let ctxt = getHole ctxtH - incr ctxt.count_InterfaceImpl; - let addr = ctxt.row_addr tab_InterfaceImpl idx - seek ctxt.is addr; - let tidx = read_z_untagged_idx tab_TypeDef ctxt - let intf_idx = read_tdor_idx ctxt - (tidx,intf_idx) - -/// Read Table MemberRef -let SeekReadMemberRefRow ctxt idx = - incr ctxt.count_MemberRef; - let addr = ctxt.row_addr tab_MemberRef idx - seek ctxt.is addr; - let mrp_idx = read_mrp_idx ctxt - let name_idx = read_string_idx ctxt - let type_idx = read_blob_idx ctxt - (mrp_idx,name_idx,type_idx) - -/// Read Table Constant -let SeekReadConstantRow ctxt idx = ctxt.SeekReadConstantRow idx -let SeekReadConstantRowUncached ctxtH idx = - let ctxt = getHole ctxtH - incr ctxt.count_Constant; - let addr = ctxt.row_addr tab_Constant idx - seek ctxt.is addr; - let kind = read_u16_as_i32 ctxt.is - let parent_idx = read_hc_idx ctxt - let val_idx = read_blob_idx ctxt - (kind, parent_idx, val_idx) - -/// Read Table CustomAttribute -let SeekReadCustomAttributeRow ctxt idx = - incr ctxt.count_CustomAttribute; - let addr = ctxt.row_addr tab_CustomAttribute idx - seek ctxt.is addr; - let parent_idx = read_hca_idx ctxt - let type_idx = read_cat_idx ctxt - let val_idx = read_blob_idx ctxt - (parent_idx, type_idx, val_idx) - -/// Read Table FieldMarshal -let SeekReadFieldMarshalRow ctxt idx = ctxt.SeekReadFieldMarshalRow idx -let SeekReadFieldMarshalRowUncached ctxtH idx = - let ctxt = getHole ctxtH - incr ctxt.count_FieldMarshal; - let addr = ctxt.row_addr tab_FieldMarshal idx - seek ctxt.is addr; - let parent_idx = read_hfm_idx ctxt - let type_idx = read_blob_idx ctxt - (parent_idx, type_idx) - -/// Read Table Permission -let SeekReadPermissionRow ctxt idx = - incr ctxt.count_Permission; - (* if logging then dprintn (ctxt.infile ^ ": reading Permission row "^string idx); *) - let addr = ctxt.row_addr tab_Permission idx - seek ctxt.is addr; - let action = read_u16 ctxt.is - let parent_idx = read_hds_idx ctxt - let type_idx = read_blob_idx ctxt - (* if logging then dprintn "finished read of Permission row";*) - (action,parent_idx, type_idx) - -/// Read Table ClassLayout -let SeekReadClassLayoutRow ctxt idx = - incr ctxt.count_ClassLayout; - let addr = ctxt.row_addr tab_ClassLayout idx - seek ctxt.is addr; - let pack = read_u16 ctxt.is - let size = read_i32 ctxt.is - let tidx = read_z_untagged_idx tab_TypeDef ctxt - (pack,size,tidx) - -/// Read Table FieldLayout -let SeekReadFieldLayoutRow ctxt idx = - incr ctxt.count_FieldLayout; - let addr = ctxt.row_addr tab_FieldLayout idx - seek ctxt.is addr; - let offset = read_i32 ctxt.is - let fidx = read_z_untagged_idx tab_Field ctxt - (offset,fidx) - -//// Read Table StandAloneSig -let SeekReadStandAloneSigRow ctxt idx = - incr ctxt.count_StandAloneSig; - let addr = ctxt.row_addr tab_StandAloneSig idx - seek ctxt.is addr; - let sig_idx = read_blob_idx ctxt - (sig_idx) - -/// Read Table EventMap -let SeekReadEventMapRow ctxt idx = - incr ctxt.count_EventMap; - let addr = ctxt.row_addr tab_EventMap idx - seek ctxt.is addr; - let tidx = read_z_untagged_idx tab_TypeDef ctxt - let events_idx = read_z_untagged_idx tab_Event ctxt - (tidx,events_idx) - -/// Read Table Event -let SeekReadEventRow ctxt idx = - incr ctxt.count_Event; - let addr = ctxt.row_addr tab_Event idx - seek ctxt.is addr; - let flags = read_u16_as_i32 ctxt.is - let name_idx = read_string_idx ctxt - let typ_idx = read_tdor_idx ctxt - (flags,name_idx,typ_idx) - -/// Read Table PropertyMap -let SeekReadPropertyMapRow ctxt idx = ctxt.SeekReadPropertyMapRow idx -let SeekReadPropertyMapRowUncached ctxtH idx = - let ctxt = getHole ctxtH - incr ctxt.count_PropertyMap; - let addr = ctxt.row_addr tab_PropertyMap idx - seek ctxt.is addr; - let tidx = read_z_untagged_idx tab_TypeDef ctxt - let props_idx = read_z_untagged_idx tab_Property ctxt - (tidx,props_idx) - -/// Read Table Property -let SeekReadPropertyRow ctxt idx = - incr ctxt.count_Property; - let addr = ctxt.row_addr tab_Property idx - seek ctxt.is addr; - let flags = read_u16_as_i32 ctxt.is - let name_idx = read_string_idx ctxt - let typ_idx = read_blob_idx ctxt - (flags,name_idx,typ_idx) - -/// Read Table MethodSemantics -let SeekReadMethodSemanticsRow ctxt idx = ctxt.SeekReadMethodSemanticsRow idx -let SeekReadMethodSemanticsRowUncached ctxtH idx = - let ctxt = getHole ctxtH - incr ctxt.count_MethodSemantics; - let addr = ctxt.row_addr tab_MethodSemantics idx - seek ctxt.is addr; - let flags = read_u16_as_i32 ctxt.is - let midx = read_z_untagged_idx tab_Method ctxt - let assoc_idx = read_hs_idx ctxt - (flags,midx,assoc_idx) - -/// Read Table MethodImpl -let SeekReadMethodImplRow ctxt idx = - incr ctxt.count_MethodImpl; - let addr = ctxt.row_addr tab_MethodImpl idx - seek ctxt.is addr; - let tidx = read_z_untagged_idx tab_TypeDef ctxt - let mbody_idx = read_mdor_idx ctxt - let mdecl_idx = read_mdor_idx ctxt - (tidx,mbody_idx,mdecl_idx) - -/// Read Table ILModuleRef -let SeekReadModuleRefRow ctxt idx = - incr ctxt.count_ModuleRef; - let addr = ctxt.row_addr tab_ModuleRef idx - seek ctxt.is addr; - let name_idx = read_string_idx ctxt - name_idx - -/// Read Table ILTypeSpec -let SeekReadTypeSpecRow ctxt idx = - incr ctxt.count_TypeSpec; - let addr = ctxt.row_addr tab_TypeSpec idx - seek ctxt.is addr; - let blob_idx = read_blob_idx ctxt - blob_idx - -/// Read Table ImplMap -let SeekReadImplMapRow ctxt idx = - incr ctxt.count_ImplMap; - let addr = ctxt.row_addr tab_ImplMap idx - seek ctxt.is addr; - let flags = read_u16_as_i32 ctxt.is - let forwrded_idx = read_mf_idx ctxt - let name_idx = read_string_idx ctxt - let scope_idx = read_z_untagged_idx tab_ModuleRef ctxt - (flags, forwrded_idx, name_idx, scope_idx) - -/// Read Table FieldRVA -let SeekReadFieldRVARow ctxt idx = - incr ctxt.count_FieldRVA; - let addr = ctxt.row_addr tab_FieldRVA idx - seek ctxt.is addr; - let rva = read_i32 ctxt.is - let fidx = read_z_untagged_idx tab_Field ctxt - (rva,fidx) - -/// Read Table Assembly -let SeekReadAssemblyRow ctxt idx = - incr ctxt.count_Assembly; - let addr = ctxt.row_addr tab_Assembly idx - seek ctxt.is addr; - let hash = read_i32 ctxt.is - let v1 = read_u16 ctxt.is - let v2 = read_u16 ctxt.is - let v3 = read_u16 ctxt.is - let v4 = read_u16 ctxt.is - let flags = read_i32 ctxt.is - let public_key_idx = read_blob_idx ctxt - let name_idx = read_string_idx ctxt - let locale_idx = read_string_idx ctxt - (hash,v1,v2,v3,v4,flags,public_key_idx, name_idx, locale_idx) - -/// Read Table ILAssemblyRef -let SeekReadAssemblyRefRow ctxt idx = - incr ctxt.count_AssemblyRef; - let addr = ctxt.row_addr tab_AssemblyRef idx - seek ctxt.is addr; - let v1 = read_u16 ctxt.is - let v2 = read_u16 ctxt.is - let v3 = read_u16 ctxt.is - let v4 = read_u16 ctxt.is - let flags = read_i32 ctxt.is - let public_key_or_token_idx = read_blob_idx ctxt - let name_idx = read_string_idx ctxt - let locale_idx = read_string_idx ctxt - let hash_value_idx = read_blob_idx ctxt - (v1,v2,v3,v4,flags,public_key_or_token_idx, name_idx, locale_idx,hash_value_idx) - -/// Read Table File -let SeekReadFileRow ctxt idx = - incr ctxt.count_File; - let addr = ctxt.row_addr tab_File idx - seek ctxt.is addr; - let flags = read_i32 ctxt.is - let name_idx = read_string_idx ctxt - let hash_value_idx = read_blob_idx ctxt - (flags, name_idx, hash_value_idx) - -/// Read Table ILExportedType -let SeekReadExportedTypeRow ctxt idx = - incr ctxt.count_ExportedType; - let addr = ctxt.row_addr tab_ExportedType idx - seek ctxt.is addr; - let flags = read_i32 ctxt.is - let tok = read_i32 ctxt.is - let name_idx = read_string_idx ctxt - let namespace_idx = read_string_idx ctxt - let impl_idx = read_i_idx ctxt - (flags,tok,name_idx,namespace_idx,impl_idx) - -/// Read Table ManifestResource -let SeekReadManifestResourceRow ctxt idx = - incr ctxt.count_ManifestResource; - let addr = ctxt.row_addr tab_ManifestResource idx - seek ctxt.is addr; - let offset = read_i32 ctxt.is - let flags = read_i32 ctxt.is - let name_idx = read_string_idx ctxt - let impl_idx = read_i_idx ctxt - (offset,flags,name_idx,impl_idx) - -/// Read Table Nested -let SeekReadNestedRow ctxt idx = ctxt.SeekReadNestedRow idx -let SeekReadNestedRowUncached ctxtH idx = - let ctxt = getHole ctxtH - incr ctxt.count_Nested; - let addr = ctxt.row_addr tab_Nested idx - seek ctxt.is addr; - let nested_idx = read_z_untagged_idx tab_TypeDef ctxt - let encl_idx = read_z_untagged_idx tab_TypeDef ctxt - (nested_idx,encl_idx) - -/// Read Table GenericParam -let SeekReadGenericParamRow ctxt idx = - incr ctxt.count_GenericParam; - let addr = ctxt.row_addr tab_GenericParam idx - seek ctxt.is addr; - let seq = read_u16 ctxt.is - let flags = read_u16 ctxt.is - let owner_idx = read_tomd_idx ctxt - let name_idx = read_string_idx ctxt - (idx,seq,flags,owner_idx,name_idx) - -// Read Table GenericParamConstraint -let SeekReadGenericParamConstraintRow ctxt idx = - incr ctxt.count_GenericParamConstraint; - let addr = ctxt.row_addr tab_GenericParamConstraint idx - seek ctxt.is addr; - let pidx = read_z_untagged_idx tab_GenericParam ctxt - let constraint_idx = read_tdor_idx ctxt - (pidx,constraint_idx) - -/// Read Table ILMethodSpec -let SeekReadMethodSpecRow ctxt idx = - incr ctxt.count_MethodSpec; - let addr = ctxt.row_addr tab_MethodSpec idx - seek ctxt.is addr; - let mdor_idx = read_mdor_idx ctxt - let inst_idx = read_blob_idx ctxt - (mdor_idx,inst_idx) - -let ReadUserStringHeapUncached ctxtH idx = - let ctxt = getHole ctxtH - if logging then dprintn (ctxt.infile ^ ": reading user string heap "^string idx); - let res = SeekReadUserString ctxt.is (ctxt.user_strings_stream_phys_loc + idx) - (* if logging then dprintn (ctxt.infile ^ ": read string '"^res^"'"); *) - res -let ReadUserStringHeap ctxt idx = ctxt.ReadUserStringHeap idx - -let ReadStringHeapUncached ctxtH idx = - let ctxt = getHole ctxtH - SeekReadUTF8String ctxt.is (ctxt.strings_stream_phys_loc + idx) -let ReadStringHeap ctxt idx = ctxt.ReadStringHeap idx -let ReadStringHeapOption ctxt idx = if idx = 0 then None else Some (ReadStringHeap ctxt idx) - -let ReadBlobHeapUncached ctxtH idx = - let ctxt = getHole ctxtH - if logging then dprintn (ctxt.infile ^ ": reading blob heap "^string idx); - SeekReadBlob ctxt.is (ctxt.blobs_stream_phys_loc + idx) -let ReadBlobHeap ctxt idx = ctxt.ReadBlobHeap idx -let ReadBlobHeapOption ctxt idx = if idx = 0 then None else Some (ReadBlobHeap ctxt idx) - -let ReadGuidHeap ctxt idx = SeakReadGuid ctxt.is (ctxt.guids_stream_phys_loc + idx) - - (* read a single value out of a blob heap using the given function *) -let ReadBlobHeap_as_bool ctxt vidx = fst (sigptr_get_bool (ReadBlobHeap ctxt vidx) 0) -let ReadBlobHeap_as_i8 ctxt vidx = fst (sigptr_get_i8 (ReadBlobHeap ctxt vidx) 0) -let ReadBlobHeap_as_i16 ctxt vidx = fst (sigptr_get_i16 (ReadBlobHeap ctxt vidx) 0) -let ReadBlobHeap_as_i32 ctxt vidx = fst (sigptr_get_i32 (ReadBlobHeap ctxt vidx) 0) -let ReadBlobHeap_as_i64 ctxt vidx = fst (sigptr_get_i64 (ReadBlobHeap ctxt vidx) 0) -let ReadBlobHeap_as_u8 ctxt vidx = fst (sigptr_get_u8 (ReadBlobHeap ctxt vidx) 0) -let ReadBlobHeap_as_u16 ctxt vidx = fst (sigptr_get_u16 (ReadBlobHeap ctxt vidx) 0) -let ReadBlobHeap_as_u32 ctxt vidx = fst (sigptr_get_u32 (ReadBlobHeap ctxt vidx) 0) -let ReadBlobHeap_as_u64 ctxt vidx = fst (sigptr_get_u64 (ReadBlobHeap ctxt vidx) 0) -let ReadBlobHeap_as_ieee32 ctxt vidx = fst (sigptr_get_ieee32 (ReadBlobHeap ctxt vidx) 0) -let ReadBlobHeap_as_ieee64 ctxt vidx = fst (sigptr_get_ieee64 (ReadBlobHeap ctxt vidx) 0) - - - -//----------------------------------------------------------------------- -// This is gross. Some binaries have raw data embedded -// their text sections, e.g. mscorlib, for field inits. And there is no -// information that definitively tells us the extent of -// the text section that may be interesting data. -// But we certainly don't want to duplicate the entire -// text section as data! -// -// So, we assume: -// 1. no part of the metadata is double-used for raw data -// 2. the data bits are all the bits of the text section -// that stretch from a Field or Resource RVA to one of -// (a) the next Field or resource RVA -// (b) a MethodRVA -// (c) the start of the metadata -// (d) the end of a section -// (e) the start of the native resources attached to the binary if any -// ----------------------------------------------------------------------*) - - -let read_native_resources ctxt = - - let native_resources = - if logging then dprintn (ctxt.infile ^ ": native_resources_size = "^string ctxt.native_resources_size); - if logging then dprintn (ctxt.infile ^ ": native_resources_addr = "^string ctxt.native_resources_addr); - if ctxt.native_resources_size = 0x0 or ctxt.native_resources_addr = 0x0 then - [] - else - [ (lazy (if logging then dprintn (ctxt.infile ^ ": reading linked resource..."); - let linkedResource = SeekReadBytes ctxt.is (ctxt.anyV2P (ctxt.infile ^ ": native resources",ctxt.native_resources_addr)) ctxt.native_resources_size - if logging then dprintn (ctxt.infile ^ ": size = "^string (Bytes.length linkedResource)); - if logging then dprintn (ctxt.infile ^ ": unlinking resource..."); - unlinkResource ctxt.native_resources_addr linkedResource)) ] - native_resources - -let data_end_points ctxtH = - lazy - begin - let ctxt = getHole ctxtH - let dataStartPoints = - let res = ref [] - for i = 1 to ctxt.nrows (tab_FieldRVA) do - let rva,fidx = SeekReadFieldRVARow ctxt i - res := ("field",rva) :: !res; - for i = 1 to ctxt.nrows (tab_ManifestResource) do - let (offset,_,_,TaggedIndex(tag,idx)) = SeekReadManifestResourceRow ctxt i - if idx = 0 then - let rva = ctxt.resources_addr + offset - res := ("manifest resource", rva) :: !res; - !res - if isNil dataStartPoints then [] - else - let methodRVAs = - let res = ref [] - for i = 1 to ctxt.nrows (tab_Method) do - let (rva, _, _, name_idx, _, _) = SeekReadMethodRow ctxt i - if rva <> 0 then - let nm = ReadStringHeap ctxt name_idx - res := (nm,rva) :: !res; - !res - ([ ctxt.text_phys_loc + ctxt.text_phys_size; - ctxt.data_phys_loc + ctxt.data_phys_size; ] - @ - (List.map ctxt.anyV2P - (dataStartPoints - @ [for (virt_addr,virt_size,phys_loc) in ctxt.section_headers do yield ("section start",virt_addr) done] - @ [("md",ctxt.metadata_addr)] - @ (if ctxt.native_resources_addr = 0x0 then [] else [("native resources",ctxt.native_resources_addr); ]) - @ (if ctxt.resources_addr = 0x0 then [] else [("managed resources",ctxt.resources_addr); ]) - @ (if ctxt.strongname_addr = 0x0 then [] else [("managed strongname",ctxt.strongname_addr); ]) - @ (if ctxt.vtable_fixups_addr = 0x0 then [] else [("managed vtable_fixups",ctxt.vtable_fixups_addr); ]) - @ methodRVAs))) - // Make distinct - |> Set.of_list - |> Set.to_list - |> List.sort - end - - -let rec rva_to_data ctxt nm rva = - if rva = 0x0 then failwith "rva is zero"; - let start = ctxt.anyV2P (nm, rva) - let endPoints = (Lazy.force ctxt.data_end_points) - let rec look l = - match l with - | [] -> - failwithf "find_text_data_extent: none found for infile=%s, name=%s, rva=0x%08x, start=0x%08x" ctxt.infile nm rva start - | e::t -> - if start < e then - (SeekReadBytes ctxt.is start (e - start)) - else look t - look endPoints - - - -//----------------------------------------------------------------------- -// Read the AbsIL structure (lazily) by reading off the relevant rows. -// ---------------------------------------------------------------------- - -let is_sorted ctxt tab = ((ctxt.sorted &&& (int64 1 <<< tag_of_table tab)) <> int64 0x0) - -let rec SeekReadModule ctxt (subsys,ilonly,only32,only64,platform,is_dll, align_virt,align_phys,image_base_real) idx = - let (generation, name_idx, mvid_idx, encid_idx, encbaseid_idx) = SeekReadModuleRow ctxt idx - let mname = ReadStringHeap ctxt name_idx - let native_resources = read_native_resources ctxt - - { modulManifest = - if ctxt.nrows (tab_Assembly) > 0 then Some (SeekReadAssemblyManifest ctxt 1) - else None; - modulCustomAttrs = SeekReadCustomAttrs ctxt (TaggedIndex(hca_Module,idx)); - modulName = mname; - modulNativeResources=native_resources; - modulTypeDefs = mk_lazy_tdefs (lazy (SeekReadTopTypeDefs ctxt ())); - modulSubSystem = int32 subsys; - modulILonly = ilonly; - modulPlatform = platform; - modul32bit = only32; - modul64bit = only64; - modulDLL=is_dll; - modulVirtAlignment = align_virt; - modulPhysAlignment = align_phys; - modulImageBase = image_base_real; - modulResources = SeekReadManifestResources ctxt (); - (* modulFixups = [] (* REVIEW:VIP *) *) } - -and SeekReadAssemblyManifest ctxt idx = - let (hash,v1,v2,v3,v4,flags,public_key_idx, name_idx, locale_idx) = SeekReadAssemblyRow ctxt idx - let name = ReadStringHeap ctxt name_idx - let pubkey = ReadBlobHeapOption ctxt public_key_idx - { manifestName= name; - manifestAuxModuleHashAlgorithm=hash; - manifestSecurityDecls= SeekReadSecurityDecls ctxt (TaggedIndex(hds_Assembly,idx)); - manifestPublicKey= pubkey; - manifestVersion= Some (v1,v2,v3,v4); - manifestLocale= ReadStringHeapOption ctxt locale_idx; - manifestCustomAttrs = SeekReadCustomAttrs ctxt (TaggedIndex(hca_Assembly,idx)); - manifestLongevity= - begin let masked = flags &&& 0x000e - if masked = 0x0000 then LongevityUnspecified - elif masked = 0x0002 then LongevityLibrary - elif masked = 0x0004 then LongevityPlatformAppDomain - elif masked = 0x0006 then LongevityPlatformProcess - elif masked = 0x0008 then LongevityPlatformSystem - else LongevityUnspecified - end; - manifestExportedTypes= SeekReadTopExportedTypes ctxt (); - manifestEntrypointElsewhere=(if fst ctxt.eptoken = tab_File then Some (SeekReadFile ctxt (snd ctxt.eptoken)) else None); - manifestRetargetable = 0 <> (flags &&& 0xff); - manifestDisableJitOptimizations = 0 <> (flags &&& 0x4000); - manifestJitTracking = 0 <> (flags &&& 0x8000); } - -and SeekReadAssemblyRef ctxt idx = ctxt.SeekReadAssemblyRef idx -and SeekReadAssemblyRefUncached ctxtH idx = - let ctxt = getHole ctxtH - let (v1,v2,v3,v4,flags,public_key_or_token_idx, name_idx, locale_idx,hash_value_idx) = SeekReadAssemblyRefRow ctxt idx - let nm = ReadStringHeap ctxt name_idx - let publicKey = - match ReadBlobHeapOption ctxt public_key_or_token_idx with - | None -> None - | Some blob -> Some (if (flags &&& 0x0001) <> 0x0 then PublicKey blob else PublicKeyToken blob) - - ILAssemblyRef.Create - (name=nm, - hash=ReadBlobHeapOption ctxt hash_value_idx, - publicKey=publicKey, - retargetable=((flags &&& 0x0100) <> 0x0), - version=Some(v1,v2,v3,v4), - locale=ReadStringHeapOption ctxt locale_idx;) - -and SeekReadModuleRef ctxt idx = - let (name_idx) = SeekReadModuleRefRow ctxt idx - ILModuleRef.Create(name = ReadStringHeap ctxt name_idx, - hasMetadata=true, - hash=None) - -and SeekReadFile ctxt idx = - let (flags, name_idx, hash_value_idx) = SeekReadFileRow ctxt idx - ILModuleRef.Create(name = ReadStringHeap ctxt name_idx, - hasMetadata= ((flags &&& 0x0001) = 0x0), - hash= ReadBlobHeapOption ctxt hash_value_idx) - -and SeekReadClassLayout ctxt idx = - match SeekReadOptionalIndexedRow (ctxt.nrows tab_ClassLayout,SeekReadClassLayoutRow ctxt,(fun (_,_,tidx) -> tidx),simpleindex_compare idx,is_sorted ctxt tab_ClassLayout,(fun (pack,size,_) -> pack,size)) with - | None -> { typeSize = None; typePack = None } - | Some (pack,size) -> { typeSize = Some size; - typePack = Some pack; } - -and member_access_of_flags flags = - let f = (flags &&& 0x00000007) - if f = 0x00000001 then MemAccess_private - elif f = 0x00000006 then MemAccess_public - elif f = 0x00000004 then MemAccess_family - elif f = 0x00000002 then MemAccess_famandassem - elif f = 0x00000005 then MemAccess_famorassem - elif f = 0x00000003 then MemAccess_assembly - else MemAccess_compilercontrolled - -and type_access_of_flags flags = - let f = (flags &&& 0x00000007) - if f = 0x00000001 then TypeAccess_public - elif f = 0x00000002 then TypeAccess_nested MemAccess_public - elif f = 0x00000003 then TypeAccess_nested MemAccess_private - elif f = 0x00000004 then TypeAccess_nested MemAccess_family - elif f = 0x00000006 then TypeAccess_nested MemAccess_famandassem - elif f = 0x00000007 then TypeAccess_nested MemAccess_famorassem - elif f = 0x00000005 then TypeAccess_nested MemAccess_assembly - else TypeAccess_private - -and type_layout_of_flags ctxt flags tidx = - let f = (flags &&& 0x00000018) - if f = 0x00000008 then TypeLayout_sequential (SeekReadClassLayout ctxt tidx) - elif f = 0x00000010 then TypeLayout_explicit (SeekReadClassLayout ctxt tidx) - else TypeLayout_auto - -and type_kind_of_flags nm mdefs fdefs super flags = - if (flags &&& 0x00000020) <> 0x0 then TypeDef_interface - else - let is_enum = (match super with None -> false | Some ty -> (tspec_of_typ ty).Name = "System.Enum") - let is_delegate = (match super with None -> false | Some ty -> (tspec_of_typ ty).Name = "System.Delegate") - let is_multicast_delegate = (match super with None -> false | Some ty -> (tspec_of_typ ty).Name = "System.MulticastDelegate") - let self_is_multicast_delegate = nm = "System.MulticastDelegate" - let is_valuetype = (match super with None -> false | Some ty -> (tspec_of_typ ty).Name = "System.ValueType" && nm <> "System.Enum") - if is_enum then TypeDef_enum - elif (is_delegate && not self_is_multicast_delegate) or is_multicast_delegate then TypeDef_delegate - elif is_valuetype then TypeDef_valuetype - else TypeDef_class - -and type_encoding_of_flags flags = - let f = (flags &&& 0x00030000) - if f = 0x00020000 then TypeEncoding_autochar - elif f = 0x00010000 then TypeEncoding_unicode - else TypeEncoding_ansi - -and seek_is_wanted_TypeDef flags = true - -and seek_is_top_TypeDef flags = - (type_access_of_flags flags = TypeAccess_private) || - type_access_of_flags flags = TypeAccess_public - -and seek_is_top_TypeDef_idx ctxt idx = - let (flags,_,_, _, _,_) = SeekReadTypeDefRow ctxt idx - seek_is_top_TypeDef flags - -and ReadBlobHeap_as_split_type_name ctxt (name_idx,namespace_idx) = - let name = ReadStringHeap ctxt name_idx - let nspace = ReadStringHeapOption ctxt namespace_idx - match nspace with - | Some nspace -> split_namespace nspace,name - | None -> [],name - -and ReadBlobHeapAsTypeName ctxt (name_idx,namespace_idx) = - let name = ReadStringHeap ctxt name_idx - let nspace = ReadStringHeapOption ctxt namespace_idx - match nspace with - | None -> name - | Some ns -> ctxt.MemoizeString (ns^"."^name) - -and SeekReadTypeDefRow_extents ctxt ((_,_, _, _, fields_idx, methods_idx) as info ) (idx:int) = - if idx >= ctxt.nrows (tab_TypeDef) then - ctxt.nrows (tab_Field) + 1, - ctxt.nrows (tab_Method) + 1 - else - let (_, _, _, _, fields_idx, methods_idx) = SeekReadTypeDefRow ctxt (idx + 1) - fields_idx, methods_idx - -and SeekReadTypeDefRow_with_extents ctxt (idx:int) = - let info= SeekReadTypeDefRow ctxt idx - info,SeekReadTypeDefRow_extents ctxt info idx - -and SeekReadTypeDef ctxt toponly acc (idx:int) = - let (flags,name_idx,namespace_idx, _, _, _) = SeekReadTypeDefRow ctxt idx - if toponly && not (seek_is_top_TypeDef flags) then acc - elif not (seek_is_wanted_TypeDef flags) then acc - else - let ns,n = ReadBlobHeap_as_split_type_name ctxt (name_idx,namespace_idx) - let cas = SeekReadCustomAttrs ctxt (TaggedIndex(hca_TypeDef,idx)) - - let rest = - lazy - begin - (* Re-read so as not to save all these in the lazy closure - this suspension ctxt.is the largest *) - (* heavily allocated one in all of AbsIL*) - let ((flags,name_idx,namespace_idx, extends_idx, fields_idx, methods_idx) as info) = SeekReadTypeDefRow ctxt idx - let nm = ReadBlobHeapAsTypeName ctxt (name_idx,namespace_idx) - let cas = SeekReadCustomAttrs ctxt (TaggedIndex(hca_TypeDef,idx)) - - if logging then dprintn ("reading remainder of type "^nm); - let (end_fields_idx, end_methods_idx) = SeekReadTypeDefRow_extents ctxt info idx - let typars = SeekReadGenericParams ctxt 0 (tomd_TypeDef,idx) - let numtypars = List.length typars - if logging then dprintn ("reading supertype of type "^nm); - let super = SeekReadOptionalTypeDefOrRef ctxt numtypars AsObject extends_idx - let layout = type_layout_of_flags ctxt flags idx - let has_layout = (match layout with TypeLayout_explicit _ -> true | _ -> false) - if logging then dprintn ("setting up reading of methods and fields for type "^nm); - let mdefs = SeekReadMethods ctxt numtypars methods_idx end_methods_idx - let fdefs = SeekReadFields ctxt (numtypars,has_layout) fields_idx end_fields_idx - if logging then dprintn ("determining kind of type "^nm); - let kind = type_kind_of_flags nm mdefs fdefs super flags - if logging then dprintn ("setting up read of nested types for type "^nm); - let nested = SeekReadNestedTypeDefs ctxt idx nm - if logging then dprintn ("setting up read of interface impls for type "^nm); - let impls = SeekReadInterfaceImpls ctxt numtypars idx - if logging then dprintn ("setting up read of security decls for type "^nm); - let sdecls = SeekReadSecurityDecls ctxt (TaggedIndex(hds_TypeDef,idx)) - if logging then dprintn ("setting up read of mimpls for type "^nm); - let mimpls = SeekReadMethodImpls ctxt numtypars idx - if logging then dprintn ("setting up read of properties for type "^nm); - let props = SeekReadProperties ctxt numtypars idx - if logging then dprintn ("setting up read of custom attributes for type "^nm); - let events = SeekReadEvents ctxt numtypars idx - if logging then dprintn ("preparing results for type "^nm); - let res = - { tdKind= kind; - tdName=nm; - tdGenericParams=typars; - tdAccess= type_access_of_flags flags; - tdAbstract= (flags &&& 0x00000080) <> 0x0; - tdSealed= (flags &&& 0x00000100) <> 0x0; - tdSerializable= (flags &&& 0x00002000) <> 0x0; - tdComInterop= (flags &&& 0x00001000) <> 0x0; - tdLayout = layout; - tdSpecialName= (flags &&& 0x00000400) <> 0x0; - tdEncoding=type_encoding_of_flags flags; - tdNested= nested; - tdImplements = impls; - tdExtends = super; - tdMethodDefs = mdefs; - tdSecurityDecls = sdecls; - tdHasSecurity=(flags &&& 0x00040000) <> 0x0; - tdFieldDefs=fdefs; - tdMethodImpls=mimpls; - tdInitSemantics= - if kind = TypeDef_interface then TypeInit_beforeany - elif (flags &&& 0x00100000) <> 0x0 then TypeInit_beforefield - else TypeInit_beforeany; - tdEvents= events; - tdProperties=props; - tdCustomAttrs=cas; } - if logging then dprintn ("done reading remainder of type "^nm); - res - end - (ns,n,cas,rest) :: acc - -and SeekReadTopTypeDefs ctxt () = - let res = ref [] - for i = 1 to ctxt.nrows (tab_TypeDef) do - res := SeekReadTypeDef ctxt true !res i; - List.rev !res - -and SeekReadNestedTypeDefs ctxt tidx nm = - mk_lazy_tdefs - (lazy - begin - if logging then dprintn ("reading nested ILTypeDefs for type "^nm); - let nested_idxs = SeekReadIndexedRows (ctxt.nrows tab_Nested,SeekReadNestedRow ctxt,snd,simpleindex_compare tidx,false,fst) - List.rev (List.fold (SeekReadTypeDef ctxt false) [] nested_idxs) - end) - -and SeekReadInterfaceImpls ctxt numtypars tidx = - SeekReadIndexedRows (ctxt.nrows tab_InterfaceImpl, - SeekReadInterfaceImplRow ctxt, - fst, - simpleindex_compare tidx, - is_sorted ctxt tab_InterfaceImpl, - (snd >> SeekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) [])) - -and SeekReadGenericParams ctxt numtypars (a,b) = ctxt.SeekReadGenericParams (GenericParamsIdx(numtypars,a,b)) - -and SeekReadGenericParamsUncached ctxtH (GenericParamsIdx(numtypars,a,b)) = - let ctxt = getHole ctxtH - let pars = - SeekReadIndexedRows - (ctxt.nrows tab_GenericParam,SeekReadGenericParamRow ctxt, - (fun (_,_,_,tomd,_) -> tomd), - tomd_compare (TaggedIndex(a,b)), - is_sorted ctxt tab_GenericParam, - (fun (gpidx,seq,flags,_,name_idx) -> - let flags = int32 flags - let variance_flags = flags &&& 0x0003 - let variance = - if variance_flags = 0x0000 then NonVariant - elif variance_flags = 0x0001 then CoVariant - elif variance_flags = 0x0002 then ContraVariant - else NonVariant - let constraints = SeekReadGenericParamConstraintsUncached ctxt numtypars gpidx - seq, {gpName=ReadStringHeap ctxt name_idx; - gpConstraints=constraints; - gpVariance=variance; - gpReferenceTypeConstraint= (flags &&& 0x0004) <> 0; - gpNotNullableValueTypeConstraint= (flags &&& 0x0008) <> 0; - gpDefaultConstructorConstraint=(flags &&& 0x0010) <> 0; })) - pars |> List.sortBy fst |> List.map snd - -and SeekReadGenericParamConstraintsUncached ctxt numtypars gpidx = - SeekReadIndexedRows - (ctxt.nrows tab_GenericParamConstraint, - SeekReadGenericParamConstraintRow ctxt, - fst, - simpleindex_compare gpidx, - is_sorted ctxt tab_GenericParamConstraint, - (snd >> SeekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) [])) - -and SeekReadTypeDefAsType ctxt boxity ginst idx = - ctxt.SeekReadTypeDefAsType (TypeDefAsTypIdx (boxity,ginst,idx)) - -and SeekReadTypeDefAsTypeUncached ctxtH (TypeDefAsTypIdx (boxity,ginst,idx)) = - let ctxt = getHole ctxtH - mk_typ boxity (ILTypeSpec.Create(SeekReadTypeDefAsTypeRef ctxt idx, ginst)) - -and SeekReadTypeDefAsTypeRef ctxt idx = - if logging then dprintn ("reading ILTypeDef "^string idx^" as type ref"); - let enc = - if seek_is_top_TypeDef_idx ctxt idx then [] - else - let encl_idx = SeekReadIndexedRow (ctxt.nrows tab_Nested,SeekReadNestedRow ctxt,fst,simpleindex_compare idx,is_sorted ctxt tab_Nested,snd) - let tref = SeekReadTypeDefAsTypeRef ctxt encl_idx - tref.Enclosing@[tref.Name] - let (_, name_idx, namespace_idx, _, _, _) = SeekReadTypeDefRow ctxt idx - let nm = ReadBlobHeapAsTypeName ctxt (name_idx,namespace_idx) - ILTypeRef.Create(scope=ScopeRef_local, enclosing=enc, name = nm ) - -and SeekReadTypeRef ctxt idx = ctxt.SeekReadTypeRef idx -and SeekReadTypeRefUncached ctxtH idx = - let ctxt = getHole ctxtH - if logging then dprintn ("reading ILTypeRef "^string idx); - let scope_idx,name_idx,namespace_idx = SeekReadTypeRefRow ctxt idx - let scope,enc = SeekReadTypeRefScope ctxt scope_idx - let nm = ReadBlobHeapAsTypeName ctxt (name_idx,namespace_idx) - ILTypeRef.Create(scope=scope, enclosing=enc, name = nm) - -and SeekReadTypeRef_as_typ ctxt boxity ginst idx = ctxt.SeekReadTypeRef_as_typ (TypeRefAsTypIdx (boxity,ginst,idx)) -and SeekReadTypeRef_as_typUncached ctxtH (TypeRefAsTypIdx (boxity,ginst,idx)) = - let ctxt = getHole ctxtH - mk_typ boxity (ILTypeSpec.Create(SeekReadTypeRef ctxt idx, ginst)) - -and SeekReadTypeDefOrRef ctxt numtypars boxity ginst (TaggedIndex(tag,idx) ) = - match tag with - | tag when tag = tdor_TypeDef -> SeekReadTypeDefAsType ctxt boxity ginst idx - | tag when tag = tdor_TypeRef -> SeekReadTypeRef_as_typ ctxt boxity ginst idx - | tag when tag = tdor_TypeSpec -> - if ginst <> [] then dprintn ("type spec used as type constructor for a generic instantiation: ignoring instantiation"); - ReadBlobHeap_as_typ ctxt numtypars (SeekReadTypeSpecRow ctxt idx) - | _ -> failwith "SeekReadTypeDefOrRef ctxt" - -and SeekReadTypeDefOrRefAsTypeRef ctxt (TaggedIndex(tag,idx) ) = - match tag with - | tag when tag = tdor_TypeDef -> SeekReadTypeDefAsTypeRef ctxt idx - | tag when tag = tdor_TypeRef -> SeekReadTypeRef ctxt idx - | tag when tag = tdor_TypeSpec -> - dprintn ("type spec used where a type ref or def ctxt.is required"); - ctxt.ilg.tref_Object - | _ -> failwith "SeekReadTypeDefOrRefAsTypeRef_read_tdor" - -and SeekReadMethodRefParent ctxt numtypars (TaggedIndex(tag,idx)) = - match tag with - | tag when tag = mrp_TypeRef -> SeekReadTypeRef_as_typ ctxt AsObject (* not ok - no way to tell if a member ref parent ctxt.is a value type or not *) [] idx - | tag when tag = mrp_ModuleRef -> typ_for_toplevel (ScopeRef_module (SeekReadModuleRef ctxt idx)) - | tag when tag = mrp_MethodDef -> - let mspec = mk_mspec_in_typ(SeekReadMethodDef_as_mdata ctxt idx) - mspec.EnclosingType - | tag when tag = mrp_TypeSpec -> ReadBlobHeap_as_typ ctxt numtypars (SeekReadTypeSpecRow ctxt idx) - | _ -> failwith "SeekReadMethodRefParent ctxt" - -and SeekReadMethodDefOrRef ctxt numtypars (TaggedIndex(tag,idx)) = - match tag with - | tag when tag = mdor_MethodDef -> - let (encl_typ, cc, nm, argtys, retty,minst) = SeekReadMethodDef_as_mdata ctxt idx - (encl_typ, cc, nm, argtys, None,retty,minst) - | tag when tag = mdor_MemberRef -> SeekReadMemberRef_as_mdata ctxt numtypars idx - | _ -> failwith "SeekReadMethodDefOrRef ctxt" - -and SeekReadMethodDefOrRefNoVarargs ctxt numtypars x = - let (encl_typ, cc, nm, argtys, varargs,retty,minst)= SeekReadMethodDefOrRef ctxt numtypars x - if varargs <> None then dprintf "ignoring sentinel and varargs in ILMethodDef token signature"; - (encl_typ, cc, nm, argtys, retty,minst) - -and SeekReadCustomAttrType ctxt (TaggedIndex(tag,idx) ) = - match tag with - | tag when tag = cat_MethodDef -> (mk_mspec_in_typ (SeekReadMethodDef_as_mdata ctxt idx)) - | tag when tag = cat_MemberRef -> (mk_mspec_in_typ (SeekReadMemberRef_as_mdata_no_varargs ctxt 0 idx)) - | _ -> failwith "SeekReadCustomAttrType ctxt" - -and SeekReadImplAsScopeRef ctxt (TaggedIndex(tag,idx) ) = - if idx = 0 then ScopeRef_local - else - match tag with - | tag when tag = i_File -> ScopeRef_module (SeekReadFile ctxt idx) - | tag when tag = i_AssemblyRef -> ScopeRef_assembly (SeekReadAssemblyRef ctxt idx) - | tag when tag = i_ExportedType -> failwith "SeekReadImplAsScopeRef ctxt" - | _ -> failwith "SeekReadImplAsScopeRef ctxt" - -and SeekReadTypeRefScope ctxt (TaggedIndex(tag,idx) ) = - match tag with - | tag when tag = rs_Module -> ScopeRef_local,[] - | tag when tag = rs_ModuleRef -> ScopeRef_module (SeekReadModuleRef ctxt idx),[] - | tag when tag = rs_AssemblyRef -> ScopeRef_assembly (SeekReadAssemblyRef ctxt idx),[] - | tag when tag = rs_TypeRef -> - let tref = SeekReadTypeRef ctxt idx - tref.Scope,(tref.Enclosing@[tref.Name]) - | _ -> failwith "SeekReadTypeRefScope ctxt" - -and SeekReadOptionalTypeDefOrRef ctxt numtypars boxity idx = - if idx = TaggedIndex(tdor_TypeDef, 0) then None - else Some (SeekReadTypeDefOrRef ctxt numtypars boxity [] idx) - -and SeekReadField ctxt (numtypars, has_layout) (idx:int) = - let (flags,name_idx,type_idx) = SeekReadFieldRow ctxt idx - let nm = ReadStringHeap ctxt name_idx - if logging then dprintn ("reading field "^nm); - let isStatic = (flags &&& 0x0010) <> 0 - let fd = - { fdName = nm; - fdType= ReadBlobHeap_as_field_sig ctxt numtypars type_idx; - fdAccess = member_access_of_flags flags; - fdStatic = isStatic; - fdInitOnly = (flags &&& 0x0020) <> 0; - fdLiteral = (flags &&& 0x0040) <> 0; - fdNotSerialized = (flags &&& 0x0080) <> 0; - fdSpecialName = (flags &&& 0x0200) <> 0 or (flags &&& 0x0400) <> 0; (* REVIEW: RTSpecialName *) - fdInit = if (flags &&& 0x8000) = 0 then None else Some (SeekReadConstant ctxt (TaggedIndex(hc_FieldDef,idx))); - fdMarshal = - if (flags &&& 0x1000) = 0 then None else - Some (SeekReadIndexedRow (ctxt.nrows tab_FieldMarshal, - SeekReadFieldMarshalRow ctxt, - fst, - hfm_compare (TaggedIndex(hfm_FieldDef,idx)), - is_sorted ctxt tab_FieldMarshal, - (snd >> ReadBlobHeapAsNativeType ctxt))); - fdData = - begin - if (flags &&& 0x0100) = 0 then None - else - let rva = SeekReadIndexedRow (ctxt.nrows tab_FieldRVA, - SeekReadFieldRVARow ctxt, - snd, - simpleindex_compare idx, - is_sorted ctxt tab_FieldRVA, - fst) - Some (rva_to_data ctxt "field" rva) - end; - fdOffset = - if has_layout && not isStatic then Some (SeekReadIndexedRow (ctxt.nrows tab_FieldLayout, - SeekReadFieldLayoutRow ctxt, - snd, - simpleindex_compare idx, - is_sorted ctxt tab_FieldLayout, - fst)) else None; - fdCustomAttrs=SeekReadCustomAttrs ctxt (TaggedIndex(hca_FieldDef,idx)); } - if logging then dprintn ("done reading field "^nm); - fd - -and SeekReadFields ctxt (numtypars, has_layout) fidx1 fidx2 = - mk_lazy_fdefs - (lazy - [ for i = fidx1 to fidx2 - 1 do - yield SeekReadField ctxt (numtypars, has_layout) i ]) - -and SeekReadMethods ctxt numtypars midx1 midx2 = - mk_lazy_mdefs - (lazy - [ for i = midx1 to midx2 - 1 do - if seek_is_wanted_MethodDef i then - yield SeekReadMethod ctxt numtypars i ]) - -and sigptr_get_tdor_idx bytes sigptr = - let n, sigptr = sigptr_get_z_i32 bytes sigptr - if (n &&& 0x01) = 0x0 then (* Type Def *) - TaggedIndex(tdor_TypeDef, (n lsr 2)), sigptr - else (* Type Ref *) - TaggedIndex(tdor_TypeRef, (n lsr 2)), sigptr - - -and sigptr_get_typ ctxt numtypars bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - if logging then dprintn ("reading type from sig at "^string sigptr^", et = "^string b0); - if b0 = et_OBJECT then ctxt.ilg.typ_Object , sigptr - elif b0 = et_STRING then ctxt.ilg.typ_String, sigptr - elif b0 = et_I1 then ctxt.ilg.typ_int8, sigptr - elif b0 = et_I2 then ctxt.ilg.typ_int16, sigptr - elif b0 = et_I4 then ctxt.ilg.typ_int32, sigptr - elif b0 = et_I8 then ctxt.ilg.typ_int64, sigptr - elif b0 = et_I then ctxt.ilg.typ_IntPtr, sigptr - elif b0 = et_U1 then ctxt.ilg.typ_uint8, sigptr - elif b0 = et_U2 then ctxt.ilg.typ_uint16, sigptr - elif b0 = et_U4 then ctxt.ilg.typ_uint32, sigptr - elif b0 = et_U8 then ctxt.ilg.typ_uint64, sigptr - elif b0 = et_U then ctxt.ilg.typ_UIntPtr, sigptr - elif b0 = et_R4 then ctxt.ilg.typ_float32, sigptr - elif b0 = et_R8 then ctxt.ilg.typ_float64, sigptr - elif b0 = et_CHAR then ctxt.ilg.typ_char, sigptr - elif b0 = et_BOOLEAN then ctxt.ilg.typ_bool, sigptr - elif b0 = et_WITH then - let b0,sigptr = sigptr_get_byte bytes sigptr - let tdor_idx, sigptr = sigptr_get_tdor_idx bytes sigptr - let n, sigptr = sigptr_get_z_i32 bytes sigptr - let argtys,sigptr = sigptr_foldi (sigptr_get_typ ctxt numtypars) ( n) bytes sigptr - SeekReadTypeDefOrRef ctxt numtypars (if b0 = et_CLASS then AsObject else AsValue) argtys tdor_idx, - sigptr - - elif b0 = et_CLASS then - let tdor_idx, sigptr = sigptr_get_tdor_idx bytes sigptr - SeekReadTypeDefOrRef ctxt numtypars AsObject [] tdor_idx, sigptr - elif b0 = et_VALUETYPE then - let tdor_idx, sigptr = sigptr_get_tdor_idx bytes sigptr - SeekReadTypeDefOrRef ctxt numtypars AsValue [] tdor_idx, sigptr - elif b0 = et_VAR then - let n, sigptr = sigptr_get_z_i32 bytes sigptr - Type_tyvar (uint16 n),sigptr - elif b0 = et_MVAR then - let n, sigptr = sigptr_get_z_i32 bytes sigptr - Type_tyvar (uint16 (n + numtypars)), sigptr - elif b0 = et_BYREF then - let typ, sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - Type_byref typ, sigptr - elif b0 = et_PTR then - let typ, sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - Type_ptr typ, sigptr - elif b0 = et_SZARRAY then - let typ, sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - mk_sdarray_ty typ, sigptr - elif b0 = et_ARRAY then - let typ, sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - let rank, sigptr = sigptr_get_z_i32 bytes sigptr - let num_sized, sigptr = sigptr_get_z_i32 bytes sigptr - let sizes, sigptr = sigptr_foldi sigptr_get_z_i32 ( num_sized) bytes sigptr - let num_lobounded, sigptr = sigptr_get_z_i32 bytes sigptr - let lobounds, sigptr = sigptr_foldi sigptr_get_z_i32 ( num_lobounded) bytes sigptr - let shape = - let dim i = - (if i < num_lobounded then Some (List.nth lobounds i) else None), - (if i < num_sized then Some (List.nth sizes i) else None) - ILArrayShape (Array.to_list (Array.init ( rank) dim)) - mk_array_ty (typ, shape), sigptr - - elif b0 = et_VOID then Type_void, sigptr - elif b0 = et_TYPEDBYREF then ctxt.ilg.typ_TypedReference, sigptr - elif b0 = et_CMOD_REQD or b0 = et_CMOD_OPT then - let tdor_idx, sigptr = sigptr_get_tdor_idx bytes sigptr - let typ, sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - Type_modified((b0 = et_CMOD_REQD), SeekReadTypeDefOrRefAsTypeRef ctxt tdor_idx, typ), sigptr - elif b0 = et_FNPTR then - begin - if logging then dprintn ("reading fptr sig "); - let cc_byte,sigptr = sigptr_get_byte bytes sigptr - let generic,cc = byte_as_callconv cc_byte - if generic then failwith "fptr sig may not be generic"; - let numparams,sigptr = sigptr_get_z_i32 bytes sigptr - let retty,sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - let argtys,sigptr = sigptr_foldi (sigptr_get_typ ctxt numtypars) ( numparams) bytes sigptr - Type_fptr - { callsigCallconv=cc; - callsigArgs=argtys; - callsigReturn=retty } - ,sigptr - end - elif b0 = et_SENTINEL then failwith "varargs NYI" - else Type_void , sigptr - -and sigptr_get_vararg_typs ctxt n numtypars bytes sigptr = - sigptr_foldi (sigptr_get_typ ctxt numtypars) n bytes sigptr - -and sigptr_get_arg_typs ctxt n numtypars bytes sigptr acc = - if n <= 0 then (List.rev acc,None),sigptr - else - let b0,sigptr2 = sigptr_get_byte bytes sigptr - if b0 = et_SENTINEL then - let varargs,sigptr = sigptr_get_vararg_typs ctxt n numtypars bytes sigptr2 - (List.rev acc,Some(varargs)),sigptr - else - let x,sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - sigptr_get_arg_typs ctxt (n-1) numtypars bytes sigptr (x::acc) - -and sigptr_get_local ctxt numtypars bytes sigptr = - let pinned,sigptr = - let b0, sigptr' = sigptr_get_byte bytes sigptr - if b0 = et_PINNED then - true, sigptr' - else - false, sigptr - let typ, sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - { localPinned = pinned; - localType = typ }, sigptr - -and ReadBlobHeap_as_method_sig ctxt numtypars blob_idx = - ctxt.ReadBlobHeap_as_method_sig (BlobAsMethodSigIdx (numtypars,blob_idx)) - -and ReadBlobHeap_as_method_sigUncached ctxtH (BlobAsMethodSigIdx (numtypars,blob_idx)) = - let ctxt = getHole ctxtH - if logging then dprintn ("reading method sig at "^string blob_idx); - let bytes = ReadBlobHeap ctxt blob_idx - let sigptr = 0 - let cc_byte,sigptr = sigptr_get_byte bytes sigptr - let generic,cc = byte_as_callconv cc_byte - let genarity,sigptr = if generic then sigptr_get_z_i32 bytes sigptr else 0x0,sigptr - let numparams,sigptr = sigptr_get_z_i32 bytes sigptr - let retty,sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - let (argtys,varargs),sigptr = sigptr_get_arg_typs ctxt ( numparams) numtypars bytes sigptr [] - generic,genarity,cc,retty,argtys,varargs - -and ReadBlobHeap_as_typ ctxt numtypars blob_idx = - let bytes = ReadBlobHeap ctxt blob_idx - let ty,sigptr = sigptr_get_typ ctxt numtypars bytes 0 - ty - -and ReadBlobHeap_as_field_sig ctxt numtypars blob_idx = - ctxt.ReadBlobHeap_as_field_sig (BlobAsFieldSigIdx (numtypars,blob_idx)) -and ReadBlobHeap_as_field_sigUncached ctxtH (BlobAsFieldSigIdx (numtypars,blob_idx)) = - let ctxt = getHole ctxtH - if logging then dprintn ("reading field sig at "^string blob_idx); - let bytes = ReadBlobHeap ctxt blob_idx - let sigptr = 0 - let cc_byte,sigptr = sigptr_get_byte bytes sigptr - if cc_byte <> e_IMAGE_CEE_CS_CALLCONV_FIELD then dprintn "warning: field sig was not CC_FIELD"; - let retty,sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - retty - - -and ReadBlobHeap_as_property_sig ctxt numtypars blob_idx = - ctxt.ReadBlobHeap_as_property_sig (BlobAsPropSigIdx (numtypars,blob_idx)) -and ReadBlobHeap_as_property_sigUncached ctxtH (BlobAsPropSigIdx (numtypars,blob_idx)) = - let ctxt = getHole ctxtH - let bytes = ReadBlobHeap ctxt blob_idx - let sigptr = 0 - let cc_byte,sigptr = sigptr_get_byte bytes sigptr - let hasthis = byte_as_hasthis cc_byte - let cc_masked = (cc_byte &&& 0x0f) - if cc_masked <> e_IMAGE_CEE_CS_CALLCONV_PROPERTY then dprintn ("warning: property sig was "^string cc_masked^" instead of CC_PROPERTY"); - let numparams,sigptr = sigptr_get_z_i32 bytes sigptr - let retty,sigptr = sigptr_get_typ ctxt numtypars bytes sigptr - let argtys,sigptr = sigptr_foldi (sigptr_get_typ ctxt numtypars) ( numparams) bytes sigptr - hasthis,retty,argtys - -and ReadBlobHeap_as_locals_sig ctxt numtypars blob_idx = - ctxt.ReadBlobHeap_as_locals_sig (BlobAsLocalSigIdx (numtypars,blob_idx)) - -and ReadBlobHeap_as_locals_sigUncached ctxtH (BlobAsLocalSigIdx (numtypars,blob_idx)) = - let ctxt = getHole ctxtH - let bytes = ReadBlobHeap ctxt blob_idx - let sigptr = 0 - let cc_byte,sigptr = sigptr_get_byte bytes sigptr - if cc_byte <> e_IMAGE_CEE_CS_CALLCONV_LOCAL_SIG then dprintn "warning: local sig was not CC_LOCAL"; - let numlocals,sigptr = sigptr_get_z_i32 bytes sigptr - let localtys,sigptr = sigptr_foldi (sigptr_get_local ctxt numtypars) ( numlocals) bytes sigptr - localtys - -and byte_as_hasthis b = - let hasthis_masked = (b &&& 0x60) - if hasthis_masked = e_IMAGE_CEE_CS_CALLCONV_INSTANCE then CC_instance - elif hasthis_masked = e_IMAGE_CEE_CS_CALLCONV_INSTANCE_EXPLICIT then CC_instance_explicit - else CC_static - -and byte_as_callconv b = - let cc = - let cc_masked = (b &&& 0x0f) - if cc_masked = e_IMAGE_CEE_CS_CALLCONV_FASTCALL then CC_fastcall - elif cc_masked = e_IMAGE_CEE_CS_CALLCONV_STDCALL then CC_stdcall - elif cc_masked = e_IMAGE_CEE_CS_CALLCONV_THISCALL then CC_thiscall - elif cc_masked = e_IMAGE_CEE_CS_CALLCONV_CDECL then CC_cdecl - elif cc_masked = e_IMAGE_CEE_CS_CALLCONV_VARARG then CC_vararg - else CC_default - let generic = (b &&& e_IMAGE_CEE_CS_CALLCONV_GENERIC) <> 0x0 - generic, Callconv (byte_as_hasthis b,cc) - -and SeekReadMemberRef_as_mdata ctxt numtypars idx = - ctxt.SeekReadMemberRef_as_mdata (MemberRefAsMspecIdx (numtypars,idx)) -and SeekReadMemberRef_as_mdataUncached ctxtH (MemberRefAsMspecIdx (numtypars,idx)) = - let ctxt = getHole ctxtH - let (mrp_idx,name_idx,type_idx) = SeekReadMemberRefRow ctxt idx - let nm = ReadStringHeap ctxt name_idx - let encl_typ = SeekReadMethodRefParent ctxt numtypars mrp_idx - let generic,genarity,cc,retty,argtys,varargs = ReadBlobHeap_as_method_sig ctxt (List.length (inst_of_typ encl_typ)) type_idx - let minst = List.init genarity (fun n -> mk_tyvar_ty (uint16 (numtypars+n))) - (encl_typ, cc, nm, argtys, varargs,retty,minst) - -and SeekReadMemberRef_as_mdata_no_varargs ctxt numtypars idx = - let (encl_typ, cc, nm, argtys,varargs, retty,minst) = SeekReadMemberRef_as_mdata ctxt numtypars idx - if isSome varargs then dprintf "ignoring sentinel and varargs in ILMethodDef token signature"; - (encl_typ, cc, nm, argtys, retty,minst) - -and SeekReadMethodSpec_as_mdata ctxt numtypars idx = - ctxt.SeekReadMethodSpec_as_mdata (MethodSpecAsMspecIdx (numtypars,idx)) -and SeekReadMethodSpec_as_mdataUncached ctxtH (MethodSpecAsMspecIdx (numtypars,idx)) = - let ctxt = getHole ctxtH - let (mdor_idx,inst_idx) = SeekReadMethodSpecRow ctxt idx - let (encl_typ, cc, nm, argtys, varargs,retty,_) = SeekReadMethodDefOrRef ctxt numtypars mdor_idx - let minst = - let bytes = ReadBlobHeap ctxt inst_idx - let sigptr = 0 - let cc_byte,sigptr = sigptr_get_byte bytes sigptr - if cc_byte <> e_IMAGE_CEE_CS_CALLCONV_GENERICINST then dprintn ("warning: method inst ILCallingConv was "^string cc_byte^" instead of CC_GENERICINST"); - let numgpars,sigptr = sigptr_get_z_i32 bytes sigptr - let argtys,sigptr = sigptr_foldi (sigptr_get_typ ctxt numtypars) ( numgpars) bytes sigptr - argtys - (encl_typ, cc, nm, argtys, varargs,retty, minst) - -and SeekReadMemberRef_as_fspec ctxt numtypars idx = - ctxt.SeekReadMemberRef_as_fspec (MemberRefAsFspecIdx (numtypars,idx)) -and SeekReadMemberRef_as_fspecUncached ctxtH (MemberRefAsFspecIdx (numtypars,idx)) = - let ctxt = getHole ctxtH - let (mrp_idx,name_idx,type_idx) = SeekReadMemberRefRow ctxt idx - let nm = ReadStringHeap ctxt name_idx - let encl_typ = SeekReadMethodRefParent ctxt numtypars mrp_idx - let retty = ReadBlobHeap_as_field_sig ctxt numtypars type_idx - mk_fspec_in_typ(encl_typ, nm, retty) - -// One extremely annoying aspect of the MD format is that given a -// ILMethodDef token it is non-trivial to find which ILTypeDef it belongs -// to. So we do a binary chop through the ILTypeDef table -// looking for which ILTypeDef has the ILMethodDef within its range. -// Although the ILTypeDef table is not "sorted", it is effectively sorted by -// method-range and field-range start/finish indexes -and SeekReadMethodDef_as_mdata ctxt idx = - ctxt.SeekReadMethodDef_as_mdata idx -and SeekReadMethodDef_as_mdataUncached ctxtH idx = - let ctxt = getHole ctxtH - let (code_rva, implflags, flags, name_idx, type_idx, param_idx) = SeekReadMethodRow ctxt idx - let nm = ReadStringHeap ctxt name_idx - // Look for the method def parent. - let tidx = - SeekReadIndexedRow (ctxt.nrows tab_TypeDef, - (fun i -> i, SeekReadTypeDefRow_with_extents ctxt i), - (fun r -> r), - (fun (_,((_, _, _, _, _, methods_idx), - (_, end_methods_idx))) -> - if end_methods_idx <= idx then 1 - elif methods_idx <= idx && idx < end_methods_idx then 0 - else -1), - true,fst) - // Read the method def signature. - let generic,genarity,cc,retty,argtys,varargs = ReadBlobHeap_as_method_sig ctxt 0 type_idx - if varargs <> None then dprintf "ignoring sentinel and varargs in ILMethodDef token signature"; - // Create a formal instantiation if needed - let finst = generalize_gparams (SeekReadGenericParams ctxt 0 (tomd_TypeDef,tidx)) - let minst = generalize_gparams (SeekReadGenericParams ctxt (List.length finst) (tomd_MethodDef,idx)) - // Read the method def parent. - let encl_typ = SeekReadTypeDefAsType ctxt AsObject (* not ok: see note *) finst tidx - // Return the constituent parts: put it together at the place where this is called. - (encl_typ, cc, nm, argtys, retty,minst) - - - (* Similarly for fields. *) -and SeekReadFieldDef_as_fspec ctxt idx = - ctxt.SeekReadFieldDef_as_fspec idx -and SeekReadFieldDef_as_fspecUncached ctxtH idx = - let ctxt = getHole ctxtH - let (flags, name_idx, type_idx) = SeekReadFieldRow ctxt idx - let nm = ReadStringHeap ctxt name_idx - (* Look for the field def parent. *) - let tidx = - SeekReadIndexedRow (ctxt.nrows tab_TypeDef, - (fun i -> i, SeekReadTypeDefRow_with_extents ctxt i), - (fun r -> r), - (fun (_,((_, _, _, _, fields_idx, _),(end_fields_idx, _))) -> - if end_fields_idx <= idx then 1 - elif fields_idx <= idx && idx < end_fields_idx then 0 - else -1), - true,fst) - // Read the field signature. - let retty = ReadBlobHeap_as_field_sig ctxt 0 type_idx - // Create a formal instantiation if needed - let finst = generalize_gparams (SeekReadGenericParams ctxt 0 (tomd_TypeDef,tidx)) - // Read the field def parent. - let encl_typ = SeekReadTypeDefAsType ctxt AsObject (* not ok: see note *) finst tidx - // Put it together. - mk_fspec_in_typ(encl_typ, nm, retty) - -and seek_is_wanted_MethodDef idx = true - -and SeekReadMethod ctxt numtypars (idx:int) = - if logging then dprintn ("reading method "^string idx); - let (code_rva, implflags, flags, name_idx, type_idx, param_idx) = SeekReadMethodRow ctxt idx - let nm = ReadStringHeap ctxt name_idx - if logging then dprintn (" method name = " ^ nm); - let isStatic = (flags &&& 0x0010) <> 0x0 - let final = (flags &&& 0x0020) <> 0x0 - let virt = (flags &&& 0x0040) <> 0x0 - let strict = (flags &&& 0x0200) <> 0x0 - let hidebysig = (flags &&& 0x0080) <> 0x0 - let newslot = (flags &&& 0x0100) <> 0x0 - let abstr = (flags &&& 0x0400) <> 0x0 - let specialname = (flags &&& 0x0800) <> 0x0 - let pinvoke = (flags &&& 0x2000) <> 0x0 - let export = (flags &&& 0x0008) <> 0x0 - let rtspecialname = (flags &&& 0x1000) <> 0x0 - let reqsecobj = (flags &&& 0x8000) <> 0x0 - let hassec = (flags &&& 0x4000) <> 0x0 - let codetype = implflags &&& 0x0003 - let unmanaged = (implflags &&& 0x0004) <> 0x0 - let forwardref = (implflags &&& 0x0010) <> 0x0 - let preservesig = (implflags &&& 0x0080) <> 0x0 - let internalcall = (implflags &&& 0x1000) <> 0x0 - let synchronized = (implflags &&& 0x0020) <> 0x0 - let noinline = (implflags &&& 0x0008) <> 0x0 - let mustrun = (implflags &&& 0x0040) <> 0x0 - let cctor = (nm = ".cctor") - let ctor = (nm = ".ctor") - let generic,genarity,cc,retty,argtys,varargs = ReadBlobHeap_as_method_sig ctxt numtypars type_idx - if varargs <> None then dprintf "ignoring sentinel and varargs in ILMethodDef signature"; - - if logging then dprintn ("finding end param idx"); - let end_param_idx = - if idx >= ctxt.nrows (tab_Method) then - ctxt.nrows (tab_Param) + 1 - else - let (_,_,_,_,_, param_idx) = SeekReadMethodRow ctxt (idx + 1) - param_idx - - if logging then dprintn ("found param range: "^string param_idx^" - "^string end_param_idx); - let ret,ilParams = SeekReadParams ctxt (retty,argtys) param_idx end_param_idx - if logging then dprintn ("read param range: "^string param_idx^" - "^string end_param_idx); - - let res = - { mdName=nm; - mdKind = - (if cctor then MethodKind_cctor - elif ctor then MethodKind_ctor - elif isStatic then MethodKind_static - elif virt then - MethodKind_virtual - { virtFinal=final; - virtNewslot=newslot; - virtStrict=strict; - virtAbstract=abstr; } - else MethodKind_nonvirtual); - mdAccess = member_access_of_flags flags; - mdSecurityDecls=SeekReadSecurityDecls ctxt (TaggedIndex(hds_MethodDef,idx)); - mdHasSecurity=hassec; - mdEntrypoint= (fst ctxt.eptoken = tab_Method && snd ctxt.eptoken = idx); - mdReqSecObj=reqsecobj; - mdHideBySig=hidebysig; - mdSpecialName=specialname; - mdUnmanagedExport=export; - mdSynchronized=synchronized; - mdMustRun=mustrun; - mdPreserveSig=preservesig; - mdManaged = not unmanaged; - mdInternalCall = internalcall; - mdForwardRef = forwardref; - mdCodeKind = (if (codetype = 0x00) then MethodCodeKind_il elif (codetype = 0x01) then MethodCodeKind_native elif (codetype = 0x03) then MethodCodeKind_runtime else (dprintn "unsupported code type"; MethodCodeKind_native)); - mdExport=None; (* REVIEW:VIP *) - mdVtableEntry=None; (* REVIEW:VIP *) - mdGenericParams=SeekReadGenericParams ctxt numtypars (tomd_MethodDef,idx); - mdCustomAttrs=SeekReadCustomAttrs ctxt (TaggedIndex(hca_MethodDef,idx)); - mdParams= ilParams; - mdCallconv=cc; - mdReturn=ret; - mdBody= - if (codetype = 0x01) && pinvoke then - mk_lazy_mbody (notlazy MethodBody_native) - elif pinvoke then - SeekReadImplMap ctxt nm idx - elif internalcall or abstr or unmanaged or (codetype <> 0x00) then - if code_rva <> 0x0 then dprintn "non-IL or abstract method with non-zero RVA"; - mk_lazy_mbody (notlazy MethodBody_abstract) - else - SeekReadMethodRVA ctxt (idx,nm,internalcall,noinline,numtypars) code_rva; - } - if logging then dprintn (" done method = " ^ nm); - res - - -and SeekReadParams ctxt (retty,argtys) pidx1 pidx2 = - let ret_res = ref { returnMarshal=None; - returnType=retty; - returnCustomAttrs=empty_custom_attrs } - let params_res = - argtys - |> Array.of_list - |> Array.map (fun ty -> { paramName=None; - paramDefault=None; - paramMarshal=None; - paramIn=false; - paramOut=false; - paramOptional=false; - paramType=ty; - paramCustomAttrs=empty_custom_attrs }) - for i = pidx1 to pidx2 - 1 do - SeekReadParam_extras ctxt (ret_res,params_res) i - !ret_res, Array.to_list params_res - -and SeekReadParam_extras ctxt (ret_res,params_res) (idx:int) = - let (flags,seq,name_idx) = SeekReadParamRow ctxt idx - if logging then dprintn ("reading param "^string idx^", seq = "^string seq); - let inout_masked = (flags &&& 0x00FF) - let has_marshal = (flags &&& 0x2000) <> 0x0 - let has_default = (flags &&& 0x1000) <> 0x0 - let fm_reader idx = SeekReadIndexedRow (ctxt.nrows tab_FieldMarshal,SeekReadFieldMarshalRow ctxt,fst,hfm_compare idx,is_sorted ctxt tab_FieldMarshal,(snd >> ReadBlobHeapAsNativeType ctxt)) - let cas = SeekReadCustomAttrs ctxt (TaggedIndex(hca_ParamDef,idx)) - if seq = 0 then - - ret_res := { !ret_res with - returnMarshal=(if has_marshal then Some (fm_reader (TaggedIndex(hfm_ParamDef,idx))) else None); - returnCustomAttrs = cas } - elif seq > Array.length params_res then dprintn "bad seq num. for param" - else - params_res.[seq - 1] <- - { params_res.[seq - 1] with - paramMarshal=(if has_marshal then Some (fm_reader (TaggedIndex(hfm_ParamDef,idx))) else None); - paramDefault = (if has_default then Some (SeekReadConstant ctxt (TaggedIndex(hc_ParamDef,idx))) else None); - paramName = ReadStringHeapOption ctxt name_idx; - paramIn = ((inout_masked &&& 0x0001) <> 0x0); - paramOut = ((inout_masked &&& 0x0002) <> 0x0); - paramOptional = ((inout_masked &&& 0x0010) <> 0x0); - paramCustomAttrs =cas } - -and SeekReadMethodImpls ctxt numtypars tidx = - mk_lazy_mimpls - (lazy - begin - let mimpls = SeekReadIndexedRows (ctxt.nrows tab_MethodImpl,SeekReadMethodImplRow ctxt,(fun (a,_,_) -> a),simpleindex_compare tidx,is_sorted ctxt tab_MethodImpl,(fun (_,b,c) -> b,c)) - mimpls |> List.map (fun (b,c) -> - { mimplOverrideBy=(mk_mspec_in_typ (SeekReadMethodDefOrRefNoVarargs ctxt numtypars b)); - mimplOverrides= - (let mspec = (mk_mspec_in_typ (SeekReadMethodDefOrRefNoVarargs ctxt numtypars c)) - OverridesSpec(mspec.MethodRef, mspec.EnclosingType)) }) - end) - -and SeekReadMultipleMethodSemantics ctxt (flags,id) = - SeekReadIndexedRows - (ctxt.nrows tab_MethodSemantics , - SeekReadMethodSemanticsRow ctxt, - (fun (flags,_,c) -> c), - hs_compare id, - is_sorted ctxt tab_MethodSemantics, - (fun (a,b,c) -> a, (mk_mspec_in_typ (SeekReadMethodDef_as_mdata ctxt b)).MethodRef)) - |> List.filter (fun (flags2,_) -> flags = flags2) - |> List.map snd - - -and SeekReadoptional_MethodSemantics ctxt id = - match SeekReadMultipleMethodSemantics ctxt id with - [] -> None - | [h] -> Some h - | h::t -> dprintn "multiple method semantics found"; Some h - -and SeekReadMethodSemantics ctxt id = - match SeekReadoptional_MethodSemantics ctxt id with - | None -> failwith "SeekReadMethodSemantics ctxt: no method found" - | Some x -> x - -and SeekReadEvent ctxt numtypars idx = - let (flags,name_idx,typ_idx) = SeekReadEventRow ctxt idx - { eventName = ReadStringHeap ctxt name_idx; - eventType = SeekReadOptionalTypeDefOrRef ctxt numtypars AsObject typ_idx; - eventSpecialName = (flags &&& 0x0200) <> 0x0; - eventRTSpecialName = (flags &&& 0x0400) <> 0x0; - eventAddOn= SeekReadMethodSemantics ctxt (0x0008,TaggedIndex(hs_Event, idx)); - eventRemoveOn=SeekReadMethodSemantics ctxt (0x0010,TaggedIndex(hs_Event,idx)); - eventFire=SeekReadoptional_MethodSemantics ctxt (0x0020,TaggedIndex(hs_Event,idx)); - eventOther = SeekReadMultipleMethodSemantics ctxt (0x0004, TaggedIndex(hs_Event, idx)); - eventCustomAttrs=SeekReadCustomAttrs ctxt (TaggedIndex(hca_Event,idx)) } - - (* REVIEW: can substantially reduce numbers of EventMap and PropertyMap reads by first checking if the whole table is sorted according to ILTypeDef tokens and then doing a binary chop *) -and SeekReadEvents ctxt numtypars tidx = - mk_lazy_events - (lazy - begin - match SeekReadOptionalIndexedRow (ctxt.nrows tab_EventMap,(fun i -> i, SeekReadEventMapRow ctxt i),(fun (_,row) -> fst row),compare tidx,false,(fun (i,row) -> (i,snd row))) with - | None -> [] - | Some (row_num,begin_event_idx) -> - let end_event_idx = - if row_num >= ctxt.nrows (tab_EventMap) then - ctxt.nrows (tab_Event) + 1 - else - let (_, end_event_idx) = SeekReadEventMapRow ctxt (row_num + 1) - end_event_idx - - [ for i in begin_event_idx .. end_event_idx - 1 do - yield SeekReadEvent ctxt numtypars i ] - end) - -and SeekReadProperty ctxt numtypars idx = - let (flags,name_idx,typ_idx) = SeekReadPropertyRow ctxt idx - let cc,retty,argtys = ReadBlobHeap_as_property_sig ctxt numtypars typ_idx - let setter= SeekReadoptional_MethodSemantics ctxt (0x0001,TaggedIndex(hs_Property,idx)) - let getter = SeekReadoptional_MethodSemantics ctxt (0x0002,TaggedIndex(hs_Property,idx)) -(* NOTE: the "hasthis" value on the property is not reliable: better to look on the getter/setter *) -(* NOTE: e.g. tlbimp on Office msword.olb seems to set this incorrectly *) - let hasthis_of_callconv (Callconv (a,b)) = a - let cc2 = - match getter with - | Some mref -> hasthis_of_callconv mref.CallingConv - | None -> - match setter with - | Some mref -> hasthis_of_callconv mref.CallingConv - | None -> cc - { propName=ReadStringHeap ctxt name_idx; - propCallconv = cc2; - propRTSpecialName=(flags &&& 0x0400) <> 0x0; - propSpecialName= (flags &&& 0x0200) <> 0x0; - propSet=setter; - propGet=getter; - propType=retty; - propInit= if (flags &&& 0x1000) = 0 then None else Some (SeekReadConstant ctxt (TaggedIndex(hc_Property,idx))); - propArgs=argtys; - propCustomAttrs=SeekReadCustomAttrs ctxt (TaggedIndex(hca_Property,idx)) } - -and SeekReadProperties ctxt numtypars tidx = - mk_lazy_properties - (lazy - begin - match SeekReadOptionalIndexedRow (ctxt.nrows tab_PropertyMap,(fun i -> i, SeekReadPropertyMapRow ctxt i),(fun (_,row) -> fst row),compare tidx,false,(fun (i,row) -> (i,snd row))) with - | None -> [] - | Some (row_num,begin_prop_idx) -> - let end_prop_idx = - if row_num >= ctxt.nrows (tab_PropertyMap) then - ctxt.nrows (tab_Property) + 1 - else - let (_, end_prop_idx) = SeekReadPropertyMapRow ctxt (row_num + 1) - end_prop_idx - [ for i in begin_prop_idx .. end_prop_idx - 1 do - yield SeekReadProperty ctxt numtypars i ] - end) - - -and SeekReadCustomAttrs ctxt idx = - mk_computed_custom_attrs - (fun () -> - SeekReadIndexedRows (ctxt.nrows tab_CustomAttribute, - SeekReadCustomAttributeRow ctxt,(fun (a,_,_) -> a), - hca_compare idx, - is_sorted ctxt tab_CustomAttribute, - (fun (_,b,c) -> SeekReadCustomAttr ctxt (b,c)))) - -and SeekReadCustomAttr ctxt (TaggedIndex(cat,idx),b) = - ctxt.SeekReadCustomAttr (CustomAttrIdx (cat,idx,b)) - -and SeekReadCustomAttrUncached ctxtH (CustomAttrIdx (cat,idx,val_idx)) = - let ctxt = getHole ctxtH - { customMethod=SeekReadCustomAttrType ctxt (TaggedIndex(cat,idx)); - customData= - match ReadBlobHeapOption ctxt val_idx with - | Some bytes -> bytes - | None -> Bytes.of_intarray [| |] } - -and SeekReadSecurityDecls ctxt idx = - mk_lazy_security_decls - (lazy - begin - SeekReadIndexedRows (ctxt.nrows tab_Permission, - SeekReadPermissionRow ctxt, - (fun (_,par,_) -> par), - hds_compare idx, - is_sorted ctxt tab_Permission, - (fun (act,_,ty) -> SeekReadSecurityDecl ctxt (act,ty))) - end) - -and SeekReadSecurityDecl ctxt (a,b) = - ctxt.SeekReadSecurityDecl (SecurityDeclIdx (a,b)) - -and SeekReadSecurityDeclUncached ctxtH (SecurityDeclIdx (act,ty)) = - let ctxt = getHole ctxtH - if logging then dprintn "reading SecurityDecl"; - PermissionSet ((if List.mem_assoc (int act) (Lazy.force secaction_rmap) then List.assoc (int act) (Lazy.force secaction_rmap) else failwith "unknown security action"), - ReadBlobHeap ctxt ty) - - -and SeekReadConstant ctxt idx = - let kind,vidx = SeekReadIndexedRow (ctxt.nrows tab_Constant, - SeekReadConstantRow ctxt, - (fun (_,key,_) -> key), - hc_compare idx,is_sorted ctxt tab_Constant,(fun (kind,_,v) -> kind,v)) - match kind with - | x when x = et_STRING -> FieldInit_string (Bytes.unicode_bytes_as_string (ReadBlobHeap ctxt vidx)) | x when x = et_BOOLEAN -> FieldInit_bool (ReadBlobHeap_as_bool ctxt vidx) - | x when x = et_CHAR -> FieldInit_char (ReadBlobHeap_as_u16 ctxt vidx) - | x when x = et_I1 -> FieldInit_int8 (ReadBlobHeap_as_i8 ctxt vidx) - | x when x = et_I2 -> FieldInit_int16 (ReadBlobHeap_as_i16 ctxt vidx) - | x when x = et_I4 -> FieldInit_int32 (ReadBlobHeap_as_i32 ctxt vidx) - | x when x = et_I8 -> FieldInit_int64 (ReadBlobHeap_as_i64 ctxt vidx) - | x when x = et_U1 -> FieldInit_uint8 (ReadBlobHeap_as_u8 ctxt vidx) - | x when x = et_U2 -> FieldInit_uint16 (ReadBlobHeap_as_u16 ctxt vidx) - | x when x = et_U4 -> FieldInit_uint32 (ReadBlobHeap_as_u32 ctxt vidx) - | x when x = et_U8 -> FieldInit_uint64 (ReadBlobHeap_as_u64 ctxt vidx) - | x when x = et_R4 -> FieldInit_single (ReadBlobHeap_as_ieee32 ctxt vidx) - | x when x = et_R8 -> FieldInit_double (ReadBlobHeap_as_ieee64 ctxt vidx) - | x when x = et_CLASS or x = et_OBJECT -> FieldInit_ref - | _ -> FieldInit_ref - -and SeekReadImplMap ctxt nm midx = - mk_lazy_mbody - (lazy - begin - if logging then dprintn ("reading pinvoke map for method "^string midx); - let (flags,name_idx, scope_idx) = SeekReadIndexedRow (ctxt.nrows tab_ImplMap, - SeekReadImplMapRow ctxt, - (fun (_,m,_,_) -> m), - mf_compare (TaggedIndex(mf_MethodDef,midx)), - is_sorted ctxt tab_ImplMap, - (fun (a,_,c,d) -> a,c,d)) - let cc = - let masked = flags &&& 0x0700 - if masked = 0x0000 then PInvokeCallConvNone - elif masked = 0x0200 then PInvokeCallConvCdecl - elif masked = 0x0300 then PInvokeCallConvStdcall - elif masked = 0x0400 then PInvokeCallConvThiscall - elif masked = 0x0500 then PInvokeCallConvFastcall - elif masked = 0x0100 then PInvokeCallConvWinapi - else (dprintn "strange pinvokeCallconv"; PInvokeCallConvNone) - let enc = - let masked = flags &&& 0x0006 - if masked = 0x0000 then PInvokeEncodingNone - elif masked = 0x0002 then PInvokeEncodingAnsi - elif masked = 0x0004 then PInvokeEncodingUnicode - elif masked = 0x0006 then PInvokeEncodingAuto - else (dprintn "strange PInvokeCharEncoding"; PInvokeEncodingNone) - let bestfit = - let masked = flags &&& 0x0030 - if masked = 0x0000 then PInvokeBestFitUseAssem - elif masked = 0x0010 then PInvokeBestFitEnabled - elif masked = 0x0020 then PInvokeBestFitDisabled - else (dprintn "strange PInvokeCharBestFit"; PInvokeBestFitUseAssem) - let unmap = - let masked = flags &&& 0x3000 - if masked = 0x0000 then PInvokeThrowOnUnmappableCharUseAssem - elif masked = 0x1000 then PInvokeThrowOnUnmappableCharEnabled - elif masked = 0x2000 then PInvokeThrowOnUnmappableCharDisabled - else (dprintn "strange PInvokeThrowOnUnmappableChar"; PInvokeThrowOnUnmappableCharUseAssem) - - MethodBody_pinvoke { pinvokeCallconv = cc; - PInvokeCharEncoding = enc; - PInvokeCharBestFit=bestfit; - PInvokeThrowOnUnmappableChar=unmap; - pinvokeNoMangle = (flags &&& 0x0001) <> 0x0; - pinvokeLastErr = (flags &&& 0x0040) <> 0x0; - pinvokeName = - (match ReadStringHeapOption ctxt name_idx with - | None -> nm - | Some nm2 -> nm2); - pinvokeWhere = SeekReadModuleRef ctxt scope_idx } - end) - -and SeekReadTopCode ctxt nm numtypars (sz:int) start seqpoints = - let labels_of_raw_offsets = new Dictionary<_,_>(sz/2) - let ilOffsetsOfLabels = new Dictionary<_,_>(sz/2) - let try_raw2lab raw_offset = - if labels_of_raw_offsets.ContainsKey raw_offset then - Some(labels_of_raw_offsets.[raw_offset]) - else - None - let raw2lab raw_offset = - match try_raw2lab raw_offset with - | Some l -> l - | None -> - let lab = generate_code_label() - labels_of_raw_offsets.[raw_offset] <- lab; - lab - let mark_as_instruction_start raw_offset il_offset = - let lab = raw2lab raw_offset - ilOffsetsOfLabels.[lab] <- il_offset - - let ibuf = new ResizeArray<_>(sz/2) - let curr = ref 0 - let prefixes = { al=Aligned; tl= Normalcall; vol= Nonvolatile;ro=NormalAddress;constrained=None } - let lastb = ref 0x0 - let lastb2 = ref 0x0 - let b = ref 0x0 - let get () = - lastb := SeekReadByteAsInt32 ctxt.is (start + (!curr)); - incr curr; - b := - if !lastb = 0xfe && !curr < sz then - lastb2 := SeekReadByteAsInt32 ctxt.is (start + (!curr)); - incr curr; - !lastb2 - else - !lastb - - let seqpoints_remaining = ref seqpoints - - while !curr < sz do - if logging then dprintn (ctxt.infile ^ ", "^nm^": registering "^string !curr^" as start of an instruction"); - mark_as_instruction_start !curr ibuf.Count; - - (* Insert any sequence points into the instruction sequence *) - - if logging then dprintn ("** #remaining sequence points @ "^string !curr ^ " = "^string (List.length !seqpoints_remaining)); - - - while - (match !seqpoints_remaining with - | (i,tag) :: rest when i <= !curr -> true - | _ -> false) - do - if logging then dprintn ("** Emitting one sequence point ** "); - let (_,tag) = List.hd !seqpoints_remaining - seqpoints_remaining := List.tl !seqpoints_remaining; - ibuf.Add (I_seqpoint tag) - - if logging then dprintn (ctxt.infile ^ ", "^nm^ ": instruction begins at "^string !curr); - (* Read the prefixes. Leave lastb and lastb2 holding the instruction byte(s) *) - begin - prefixes.al <- Aligned; - prefixes.tl <- Normalcall; - prefixes.vol <- Nonvolatile; - prefixes.ro<-NormalAddress; - prefixes.constrained<-None; - get (); - while !curr < sz && - !lastb = 0xfe && - (!b = (i_constrained &&& 0xff) or - !b = (i_readonly &&& 0xff) or - !b = (i_unaligned &&& 0xff) or - !b = (i_volatile &&& 0xff) or - !b = (i_tail &&& 0xff)) do - begin - if !b = (i_unaligned &&& 0xff) then - let unal = SeekReadByteAsInt32 ctxt.is (start + (!curr)) - incr curr; - prefixes.al <- - if unal = 0x1 then Unaligned_1 - elif unal = 0x2 then Unaligned_2 - elif unal = 0x4 then Unaligned_4 - else (dprintn "bad alignment for unaligned"; Aligned) - elif !b = (i_volatile &&& 0xff) then prefixes.vol <- Volatile - elif !b = (i_readonly &&& 0xff) then prefixes.ro <- ReadonlyAddress - elif !b = (i_constrained &&& 0xff) then - let uncoded = SeekReaduncoded_token ctxt.is (start + (!curr)) - curr := !curr + 4; - let typ = SeekReadTypeDefOrRef ctxt numtypars AsObject [] (uncoded_token_to_tdor uncoded) - prefixes.constrained <- Some typ - else prefixes.tl <- Tailcall; - end; - get (); - done; - end; - - if logging then dprintn (ctxt.infile ^ ": data for instruction begins at "^string !curr); - (* Read and decode the instruction *) - if (!curr <= sz) then - let idecoder = - if !lastb = 0xfe then get_two_byte_instr ( !lastb2) - else get_one_byte_instr ( !lastb) - let instr = - match idecoder with - | I_u16_u8_instr f -> - let x = SeekReadByteAsUInt16 ctxt.is (start + (!curr)) - curr := !curr + 1; - f prefixes x - | I_u16_u16_instr f -> - let x = SeekReadUInt16 ctxt.is (start + (!curr)) - curr := !curr + 2; - f prefixes x - | I_none_instr f -> - f prefixes - | I_i64_instr f -> - let x = SeekReadInt64 ctxt.is (start + (!curr)) - curr := !curr + 8; - f prefixes x - | I_i32_i8_instr f -> - let x = SeekReadSByteAsInt32 ctxt.is (start + (!curr)) - curr := !curr + 1; - f prefixes x - | I_i32_i32_instr f -> - let x = SeekReadInt32 ctxt.is (start + (!curr)) - curr := !curr + 4; - f prefixes x - | I_r4_instr f -> - let x = SeekReadSingle ctxt.is (start + (!curr)) - curr := !curr + 4; - f prefixes x - | I_r8_instr f -> - let x = SeekReadDouble ctxt.is (start + (!curr)) - curr := !curr + 8; - f prefixes x - | I_field_instr f -> - let (tab,tok) = SeekReaduncoded_token ctxt.is (start + (!curr)) - curr := !curr + 4; - let fspec = - if tab = tab_Field then - SeekReadFieldDef_as_fspec ctxt tok - elif tab = tab_MemberRef then - SeekReadMemberRef_as_fspec ctxt numtypars tok - else failwith "bad table in FieldDefOrRef" - f prefixes fspec - | I_method_instr f -> - if logging then dprintn (ctxt.infile ^ ": method instruction, curr = "^string !curr); - - let (tab,idx) = SeekReaduncoded_token ctxt.is (start + (!curr)) - curr := !curr + 4; - let (encl_typ, cc, nm, argtys,varargs, retty, minst) = - if tab = tab_Method then - SeekReadMethodDefOrRef ctxt numtypars (TaggedIndex(mdor_MethodDef, idx)) - elif tab = tab_MemberRef then - SeekReadMethodDefOrRef ctxt numtypars (TaggedIndex(mdor_MemberRef, idx)) - elif tab = tab_MethodSpec then - SeekReadMethodSpec_as_mdata ctxt numtypars idx - else failwith "bad table in MethodDefOrRefOrSpec" - if is_array_ty encl_typ then - let (shape,ty) = dest_array_ty encl_typ - match nm with - | "Get" -> I_ldelem_any(shape,ty) - | "Set" -> I_stelem_any(shape,ty) - | "Address" -> I_ldelema(prefixes.ro, shape,ty) - | ".ctor" -> I_newarr(shape,ty) - | _ -> failwith "bad method on array type" - else - let mspec = (mk_mspec_in_typ (encl_typ, cc, nm, argtys, retty, minst)) - f prefixes (mspec,varargs) - | I_type_instr f -> - let uncoded = SeekReaduncoded_token ctxt.is (start + (!curr)) - curr := !curr + 4; - let typ = SeekReadTypeDefOrRef ctxt numtypars AsObject [] (uncoded_token_to_tdor uncoded) - f prefixes typ - | I_string_instr f -> - let (tab,idx) = SeekReaduncoded_token ctxt.is (start + (!curr)) - curr := !curr + 4; - if tab <> tab_UserStrings then dprintn "warning: bad table in user string for ldstr"; - f prefixes (ReadUserStringHeap ctxt (idx)) - - | I_conditional_i32_instr f -> - let offs_dest = (SeekReadInt32 ctxt.is (start + (!curr))) - curr := !curr + 4; - let dest = !curr + offs_dest - let next = !curr - f prefixes (raw2lab dest, raw2lab next) - | I_conditional_i8_instr f -> - let offs_dest = int (SeekReadSByte ctxt.is (start + (!curr))) - curr := !curr + 1; - let dest = !curr + offs_dest - let next = !curr - f prefixes (raw2lab dest, raw2lab next) - | I_unconditional_i32_instr f -> - let offs_dest = (SeekReadInt32 ctxt.is (start + (!curr))) - curr := !curr + 4; - let dest = !curr + offs_dest - f prefixes (raw2lab dest) - | I_unconditional_i8_instr f -> - let offs_dest = int (SeekReadSByte ctxt.is (start + (!curr))) - curr := !curr + 1; - let dest = !curr + offs_dest - f prefixes (raw2lab dest) - | I_invalid_instr -> dprintn ("invalid instruction: "^string !lastb^ (if !lastb = 0xfe then ","^string !lastb2 else "")); I_ret - | I_tok_instr f -> - let (tab,idx) = SeekReaduncoded_token ctxt.is (start + (!curr)) - curr := !curr + 4; - (* REVIEW: this incorrectly labels all MemberRef tokens as Token_method's: we should go look at the MemberRef sig to determine if it ctxt.is a field or method *) - let token_info = - if tab = tab_Method or tab = tab_MemberRef (* REVIEW:generics or tab = tab_MethodSpec *) then - Token_method ((mk_mspec_in_typ (SeekReadMethodDefOrRefNoVarargs ctxt numtypars (uncoded_token_to_mdor (tab,idx))))) - elif tab = tab_Field then - Token_field (SeekReadFieldDef_as_fspec ctxt idx) - elif tab = tab_TypeDef or tab = tab_TypeRef or tab = tab_TypeSpec then - Token_type (SeekReadTypeDefOrRef ctxt numtypars AsObject [] (uncoded_token_to_tdor (tab,idx))) - else failwith "bad token for ldtoken" - f prefixes token_info - | I_sig_instr f -> - let (tab,idx) = SeekReaduncoded_token ctxt.is (start + (!curr)) - curr := !curr + 4; - if tab <> tab_StandAloneSig then dprintn "strange table for callsig token"; - let generic,genarity,cc,retty,argtys,varargs = ReadBlobHeap_as_method_sig ctxt numtypars (SeekReadStandAloneSigRow ctxt idx) - if generic then failwith "bad image: a generic method signature ctxt.is begin used at a calli instruction"; - f prefixes (mk_callsig (cc,argtys,retty), varargs) - | I_switch_instr f -> - let n = (SeekReadInt32 ctxt.is (start + (!curr))) - curr := !curr + 4; - let offsets = - List.init n (fun _ -> - let i = (SeekReadInt32 ctxt.is (start + (!curr))) - curr := !curr + 4; - i) - let dests = List.map (fun offs -> raw2lab (!curr + offs)) offsets - let next = raw2lab !curr - f prefixes (dests,next) - ibuf.Add instr - done; - (* Finished reading instructions - mark the end of the instruction stream in case the PDB information refers to it. *) - mark_as_instruction_start !curr ibuf.Count; - (* Build the function that maps from raw labels (offsets into the bytecode stream) to indexes in the AbsIL instruction stream *) - let lab2pc lab = - try - ilOffsetsOfLabels.[lab] - with Not_found -> failwith ("branch destination "^string_of_code_label lab^" not found in code") - - // Some offsets used in debug info refer to the end of an instruction, rather than the - // start of the subsequent instruction. But all labels refer to instruction starts, - // apart from a final label which refers to the end of the method. This function finds - // the start of the next instruction referred to by the raw offset. - let raw2nextLab raw_offset = - let isInstrStart x = - match try_raw2lab x with - | None -> false - | Some lab -> ilOffsetsOfLabels.ContainsKey lab - if isInstrStart raw_offset then raw2lab raw_offset - elif isInstrStart (raw_offset+1) then raw2lab (raw_offset+1) - else failwith ("the bytecode raw offset "^string raw_offset^" did not refer either to the start or end of an instruction") - let instrs = ibuf |> ResizeArray.to_array - instrs,raw2lab, lab2pc, raw2nextLab - -and SeekReadMethodRVA ctxt (idx,nm,internalcall,noinline,numtypars) rva = - mk_lazy_mbody - (lazy - begin - - // Read any debug information for this method into temporary data structures - // -- a list of locals, marked with the raw offsets (actually closures which accept the resolution function that maps raw offsets to labels) - // -- an overall range for the method - // -- the sequence points for the method - let local_pdb_infos, mrange_pdb_info, seqpoints = - match ctxt.pdb with - | None -> - [], None, [] - | Some (pdbr, get_doc) -> - try - - let pdbm = pdbReaderGetMethod pdbr (uncoded_token tab_Method idx) - let rootScope = pdbMethodGetRootScope pdbm - let sps = pdbMethodGetSequencePoints pdbm - (*dprintf "#sps for 0x%lx = %d\n" (uncoded_token tab_Method idx) (Array.length sps); *) - (* let roota,rootb = pdbScopeGetOffsets rootScope in *) - let seqpoints = - let arr = - sps |> Array.map (fun sp -> - (* It is VERY annoying to have to call GetURL for the document for each sequence point. This appears to be a short coming of the PDB reader API. They should return an index into the array of documents for the reader *) - let sourcedoc = get_doc (pdbDocumentGetURL sp.pdbSeqPointDocument) - let source = - ILSourceMarker.Create(document = sourcedoc, - line = sp.pdbSeqPointLine, - column = sp.pdbSeqPointColumn, - endLine = sp.pdbSeqPointEndLine, - endColumn = sp.pdbSeqPointEndColumn) - (sp.pdbSeqPointOffset,source)) - - Array.sortInPlaceBy fst arr; - - Array.to_list arr - let rec scopes scp = - let a,b = pdbScopeGetOffsets scp - let lvs = pdbScopeGetLocals scp - let ilvs = - lvs - |> Array.to_list - |> List.filter (fun l -> - let k,idx = pdbVariableGetAddressAttributes l - k = 1 (* ADDR_IL_OFFSET *)) - let ilinfos = - ilvs |> List.map (fun ilv -> - let k,idx = pdbVariableGetAddressAttributes ilv - let n = pdbVariableGetName ilv - if logging then dprintn ("local variable debug info: name="^n^", kind = "^string k^", localNum = "^string idx); - { localNum= idx; - localName=n}) - - let this_one = - (fun raw2nextLab -> - { locRange= (raw2nextLab a,raw2nextLab b); - locInfos = ilinfos }) - if logging then dprintn ("this scope covers IL range: "^string a^"-"^string b); - let others = List.foldBack (scopes >> (@)) (Array.to_list (pdbScopeGetChildren scp)) [] - this_one :: others - let local_pdb_infos = [] (* scopes fail for mscorlib scopes rootScope *) - if logging then dprintn ("done local_pdb_infos"); - // REVIEW: look through sps to get ranges? Use GetRanges?? Change AbsIL?? - (local_pdb_infos,None,seqpoints) - with e -> - if logging then dprintn ("* Warning: PDB info for method "^nm^" could not be read and will be ignored: "^e.Message); - [],None,[] - - - let baseRVA = ctxt.anyV2P("method rva",rva) - if logging then dprintn (ctxt.infile ^ ": reading body of method "^nm^" at rva "^string rva^", phys "^string baseRVA); - let b = SeekReadByteAsInt32 ctxt.is baseRVA - if (b &&& e_CorILMethod_FormatMask) = e_CorILMethod_TinyFormat then - let code_base = baseRVA + 1 - let code_size = (b lsr 2) - if logging then dprintn (ctxt.infile ^ ": tiny format for "^nm^", code size = " ^ string code_size); - let instrs,_,lab2pc,raw2nextLab = SeekReadTopCode ctxt nm numtypars code_size code_base seqpoints - (* Convert the linear code format to the nested code format *) - if logging then dprintn ("doing local_pdb_infos2 (tiny format)"); - let local_pdb_infos2 = List.map (fun f -> f raw2nextLab) local_pdb_infos - if logging then dprintn ("done local_pdb_infos2 (tiny format), checking code..."); - let code = check_code (build_code nm lab2pc instrs [] local_pdb_infos2) - if logging then dprintn ("done checking code (tiny format)."); - MethodBody_il - { ilZeroInit=false; - ilMaxStack= 8; - ilNoInlining=noinline; - ilLocals=[]; - ilSource=mrange_pdb_info; - ilCode=code } - - elif (b &&& e_CorILMethod_FormatMask) = e_CorILMethod_FatFormat then - let has_more_sects = (b &&& e_CorILMethod_MoreSects) <> 0x0 - let initlocals = (b &&& e_CorILMethod_InitLocals) <> 0x0 - let maxstack = SeekReadUInt16AsInt32 ctxt.is (baseRVA + 2) - let code_size = SeekReadInt32 ctxt.is (baseRVA + 4) - let locals_tab,localtoken = SeekReaduncoded_token ctxt.is (baseRVA + 8) - let code_base = baseRVA + 12 - let locals = - if localtoken = 0x0 then [] - else - if locals_tab <> tab_StandAloneSig then dprintn "strange table for locals token"; - ReadBlobHeap_as_locals_sig ctxt numtypars (SeekReadStandAloneSigRow ctxt localtoken) - - - if logging then dprintn (ctxt.infile ^ ": fat format for "^nm^", code size = " ^ string code_size^", has_more_sects = "^(if has_more_sects then "true" else "false")^",b = "^string b); - - (* Read the method body *) - let instrs,raw2lab,lab2pc,raw2nextLab = SeekReadTopCode ctxt nm numtypars ( code_size) code_base seqpoints - - (* Read all the sections that follow the method body. *) - (* These contain the exception clauses. *) - let next_sect_base = ref (align 4 (code_base + code_size)) - let more_sects = ref has_more_sects - let seh = ref [] - while !more_sects do - let sect_base = !next_sect_base - let sect_flag = SeekReadByteAsInt32 ctxt.is sect_base - if logging then dprintn (ctxt.infile ^ ": fat format for "^nm^", sect_flag = " ^ string sect_flag); - let sect_size, clauses = - if (sect_flag &&& e_CorILMethod_Sect_FatFormat) <> 0x0 then - let big_size = (SeekReadInt32 ctxt.is sect_base) lsr 8 - if logging then dprintn (nm^": one more section"); - if logging then dprintn (ctxt.infile ^ ": big_size = "^string big_size); - let clauses = - if (sect_flag &&& e_CorILMethod_Sect_EHTable) <> 0x0 then - // WORKAROUND: The ECMA spec says this should be - // let num_clauses = ((big_size - 4) / 24) in - // but the CCI IL generator generates multiples of 24 - let num_clauses = (big_size / 24) - if logging then dprintn (nm^" has "^string num_clauses ^" fat seh clauses"); - - List.init num_clauses (fun i -> - let clause_base = sect_base + 4 + (i * 24) - let kind = SeekReadInt32 ctxt.is (clause_base + 0) - if logging then dprintn ("One fat SEH clause, kind = "^string kind); - let st1 = SeekReadInt32 ctxt.is (clause_base + 4) - let sz1 = SeekReadInt32 ctxt.is (clause_base + 8) - let st2 = SeekReadInt32 ctxt.is (clause_base + 12) - let sz2 = SeekReadInt32 ctxt.is (clause_base + 16) - let extra = SeekReadInt32 ctxt.is (clause_base + 20) - (kind,st1,sz1,st2,sz2,extra)) - else [] - big_size, clauses - else - let small_size = SeekReadByteAsInt32 ctxt.is (sect_base + 0x01) - let clauses = - if (sect_flag &&& e_CorILMethod_Sect_EHTable) <> 0x0 then begin - if logging then dprintn (nm^": small_size = "^string small_size); - (* WORKAROUND: The ECMA spec says this should be *) - (* let num_clauses = ((small_size - 4) / 12) in *) - (* but the C# compiler (or some IL generator) generates multiples of 12 *) - let num_clauses = (small_size / 12) - if logging then dprintn (nm^" has "^string num_clauses ^" tiny seh clauses"); - List.init num_clauses (fun i -> - let clause_base = sect_base + 4 + (i * 12) - let kind = SeekReadUInt16AsInt32 ctxt.is (clause_base + 0) - if logging then dprintn ("One tiny SEH clause, kind = "^string kind); - let st1 = SeekReadUInt16AsInt32 ctxt.is (clause_base + 2) - let sz1 = SeekReadByteAsInt32 ctxt.is (clause_base + 4) - let st2 = SeekReadUInt16AsInt32 ctxt.is (clause_base + 5) - let sz2 = SeekReadByteAsInt32 ctxt.is (clause_base + 7) - let extra = SeekReadInt32 ctxt.is (clause_base + 8) - (kind,st1,sz1,st2,sz2,extra)) - end else [] - small_size, clauses - - (* Morph together clauses that cover the same range *) - let seh_clauses = - let seh_map = Dictionary.create (List.length clauses) - - List.iter - (fun (kind,st1,sz1,st2,sz2,extra) -> - let try_start = raw2lab ( st1) - let try_finish = raw2lab ( (st1 + sz1)) - let handler_start = raw2lab ( st2) - let handler_finish = raw2lab ( (st2 + sz2)) - let clause = - if kind = e_COR_ILEXCEPTION_CLAUSE_EXCEPTION then - SEH_type_catch(SeekReadTypeDefOrRef ctxt numtypars AsObject [] (uncoded_token_to_tdor (i32_to_uncoded_token extra)), (handler_start, handler_finish) ) - elif kind = e_COR_ILEXCEPTION_CLAUSE_FILTER then - let filter_start = raw2lab ( extra) - let filter_finish = handler_start - SEH_filter_catch((filter_start, filter_finish), (handler_start, handler_finish)) - elif kind = e_COR_ILEXCEPTION_CLAUSE_FINALLY then - SEH_finally(handler_start, handler_finish) - elif kind = e_COR_ILEXCEPTION_CLAUSE_FAULT then - SEH_fault(handler_start, handler_finish) - else begin - dprintn (ctxt.infile ^ ": unknown exception handler kind: "^string kind); - SEH_finally(handler_start, handler_finish) - end - - let key = (try_start, try_finish) - if Dictionary.mem seh_map key then - let prev = Dictionary.find seh_map key - Dictionary.replace seh_map key (prev @ [clause]) - else - Dictionary.add seh_map key [clause]) - clauses; - Dictionary.fold (fun key bs acc -> {exnRange=key; exnClauses=bs} :: acc) seh_map [] - seh := seh_clauses; - more_sects := (sect_flag &&& e_CorILMethod_Sect_MoreSects) <> 0x0; - next_sect_base := sect_base + sect_size; - done; (* while *) - - (* Convert the linear code format to the nested code format *) - if logging then dprintn ("doing local_pdb_infos2"); - let local_pdb_infos2 = List.map (fun f -> f raw2nextLab) local_pdb_infos - if logging then dprintn ("done local_pdb_infos2, checking code..."); - let code = check_code (build_code nm lab2pc instrs !seh local_pdb_infos2) - if logging then dprintn ("done checking code."); - MethodBody_il - { ilZeroInit=initlocals; - ilMaxStack= maxstack; - ilNoInlining=noinline; - ilLocals=locals; - ilCode=code; - ilSource=mrange_pdb_info} - else - if logging then failwith "unknown format"; - MethodBody_abstract - end) - -and i32_as_variant_typ ctxt (n:int32) = - if List.mem_assoc n (Lazy.force variant_type_rmap) then - List.assoc n (Lazy.force variant_type_rmap) - elif (n &&& vt_ARRAY) <> 0x0 then VariantType_array (i32_as_variant_typ ctxt (n &&& (~~~ vt_ARRAY))) - elif (n &&& vt_VECTOR) <> 0x0 then VariantType_vector (i32_as_variant_typ ctxt (n &&& (~~~ vt_VECTOR))) - elif (n &&& vt_BYREF) <> 0x0 then VariantType_byref (i32_as_variant_typ ctxt (n &&& (~~~ vt_BYREF))) - else (dprintn (ctxt.infile ^ ": i32_as_variant_typ ctxt: unexpected variant type, n = "^string n) ; VariantType_empty) - -and ReadBlobHeapAsNativeType ctxt blob_idx = - if logging then dprintn (ctxt.infile ^ ": reading native type blob "^string blob_idx); - let bytes = ReadBlobHeap ctxt blob_idx - let res,_ = sigptr_get_native_typ ctxt bytes 0 - res - -and sigptr_get_native_typ ctxt bytes sigptr = - if logging then dprintn (ctxt.infile ^ ": reading native type blob, sigptr= "^string sigptr); - let ntbyte,sigptr = sigptr_get_byte bytes sigptr - if List.mem_assoc ntbyte (Lazy.force native_type_map) then - List.assoc ntbyte (Lazy.force native_type_map), sigptr - elif ntbyte = 0x0 then NativeType_empty, sigptr - elif ntbyte = nt_CUSTOMMARSHALER then - if logging then - for i = 0 to Bytes.length bytes - 1 do - if logging then dprintn (ctxt.infile ^ ": byte "^string i^" = "^string(Bytes.get bytes i)); - if logging then dprintn (ctxt.infile ^ ": reading native type blob (CM1) , sigptr= "^string sigptr^ ", Bytes.length bytes = "^string(Bytes.length bytes)); - let guidLen,sigptr = sigptr_get_z_i32 bytes sigptr - if logging then dprintn (ctxt.infile ^ ": reading native type blob (CM2) , sigptr= "^string sigptr^", guidLen = "^string ( guidLen)); - let guid,sigptr = sigptr_get_bytes ( guidLen) bytes sigptr - if logging then dprintn (ctxt.infile ^ ": reading native type blob (CM3) , sigptr= "^string sigptr); - let nativeTypeNameLen,sigptr = sigptr_get_z_i32 bytes sigptr - if logging then dprintn (ctxt.infile ^ ": reading native type blob (CM4) , sigptr= "^string sigptr^", nativeTypeNameLen = "^string ( nativeTypeNameLen)); - let nativeTypeName,sigptr = sigptr_get_string ( nativeTypeNameLen) bytes sigptr - if logging then dprintn (ctxt.infile ^ ": reading native type blob (CM4) , sigptr= "^string sigptr^", nativeTypeName = "^nativeTypeName); - if logging then dprintn (ctxt.infile ^ ": reading native type blob (CM5) , sigptr= "^string sigptr); - let custMarshallerNameLen,sigptr = sigptr_get_z_i32 bytes sigptr - if logging then dprintn (ctxt.infile ^ ": reading native type blob (CM6) , sigptr= "^string sigptr^", custMarshallerNameLen = "^string ( custMarshallerNameLen)); - let custMarshallerName,sigptr = sigptr_get_string ( custMarshallerNameLen) bytes sigptr - if logging then dprintn (ctxt.infile ^ ": reading native type blob (CM7) , sigptr= "^string sigptr^", custMarshallerName = "^custMarshallerName); - let cookieStringLen,sigptr = sigptr_get_z_i32 bytes sigptr - if logging then dprintn (ctxt.infile ^ ": reading native type blob (CM8) , sigptr= "^string sigptr^", cookieStringLen = "^string ( cookieStringLen)); - let cookieString,sigptr = sigptr_get_bytes ( cookieStringLen) bytes sigptr - if logging then dprintn (ctxt.infile ^ ": reading native type blob (CM9) , sigptr= "^string sigptr); - NativeType_custom (guid,nativeTypeName,custMarshallerName,cookieString), sigptr - elif ntbyte = nt_FIXEDSYSSTRING then - let i,sigptr = sigptr_get_z_i32 bytes sigptr - NativeType_fixed_sysstring i, sigptr - elif ntbyte = nt_FIXEDARRAY then - let i,sigptr = sigptr_get_z_i32 bytes sigptr - NativeType_fixed_array i, sigptr - elif ntbyte = nt_SAFEARRAY then - (if sigptr >= Bytes.length bytes then - NativeType_safe_array(VariantType_empty, None),sigptr - else - let i,sigptr = sigptr_get_z_i32 bytes sigptr - if sigptr >= Bytes.length bytes then - NativeType_safe_array (i32_as_variant_typ ctxt i, None), sigptr - else - let len,sigptr = sigptr_get_z_i32 bytes sigptr - let s,sigptr = sigptr_get_string ( len) bytes sigptr - NativeType_safe_array (i32_as_variant_typ ctxt i, Some s), sigptr) - elif ntbyte = nt_ARRAY then - if sigptr >= Bytes.length bytes then - NativeType_array(None,None),sigptr - else - let nt,sigptr = - let u,sigptr' = sigptr_get_z_i32 bytes sigptr - if (u = nt_MAX) then - NativeType_empty, sigptr' - else - (* note: go back to start and read native type *) - sigptr_get_native_typ ctxt bytes sigptr - if sigptr >= Bytes.length bytes then - NativeType_array (Some nt,None), sigptr - else - let pnum,sigptr = sigptr_get_z_i32 bytes sigptr - if sigptr >= Bytes.length bytes then - NativeType_array (Some nt,Some(pnum,None)), sigptr - else - let additive,sigptr = - if sigptr >= Bytes.length bytes then 0, sigptr - else sigptr_get_z_i32 bytes sigptr - NativeType_array (Some nt,Some(pnum,Some(additive))), sigptr - else (dprintn (ctxt.infile ^ ": unexpected native type, nt = "^string ntbyte); NativeType_empty, sigptr) - -and SeekReadManifestResources ctxt () = - mk_lazy_resources - (lazy - [ for i = 1 to ctxt.nrows (tab_ManifestResource) do - let (offset,flags,name_idx,impl_idx) = SeekReadManifestResourceRow ctxt i - let scoref = SeekReadImplAsScopeRef ctxt impl_idx - let datalab = - match scoref with - | ScopeRef_local -> - let start = ctxt.anyV2P ("resource",offset + ctxt.resources_addr) - let len = SeekReadInt32 ctxt.is start - Resource_local (fun () -> SeekReadBytes ctxt.is (start + 4) len) - | ScopeRef_module mref -> Resource_file (mref,offset) - | ScopeRef_assembly aref -> Resource_assembly aref - - let r = - { resourceName= ReadStringHeap ctxt name_idx; - resourceWhere = datalab; - resourceAccess = (if (flags &&& 0x01) <> 0x0 then Resource_public else Resource_private); - resourceCustomAttrs = SeekReadCustomAttrs ctxt (TaggedIndex(hca_ManifestResource, i)) } - yield r ]) - - -and SeekReadNestedExportedTypes ctxt parent_idx = - mk_lazy_nested_exported_types - (lazy - [ for i = 1 to ctxt.nrows tab_ExportedType do - let (flags,tok,name_idx,namespace_idx,impl_idx) = SeekReadExportedTypeRow ctxt i - if not (seek_is_top_TypeDef flags) then - let (TaggedIndex(tag,idx) ) = impl_idx - //let isTopTypeDef = (idx = 0 || tag <> i_ExportedType) - //if not isTopTypeDef then - match tag with - | tag when tag = i_ExportedType && idx = parent_idx -> - let nm = ReadBlobHeapAsTypeName ctxt (name_idx,namespace_idx) - yield - { nestedExportedTypeName=nm; - nestedExportedTypeAccess=(match type_access_of_flags flags with TypeAccess_nested n -> n | _ -> failwith "non-nested access for a nested type described as being in an auxiliary module"); - nestedExportedTypeNested=SeekReadNestedExportedTypes ctxt i; - nestedExportedTypeCustomAttrs=SeekReadCustomAttrs ctxt (TaggedIndex(hca_ExportedType, i)) } - | _ -> () ]) - -and SeekReadTopExportedTypes ctxt () = - mk_lazy_exported_types - (lazy - begin - let res = ref [] - for i = 1 to ctxt.nrows tab_ExportedType do - let (flags,tok,name_idx,namespace_idx,impl_idx) = SeekReadExportedTypeRow ctxt i - if seek_is_top_TypeDef flags then - //let (TaggedIndex(tag,idx) ) = impl_idx - //let isTopTypeDef = (idx = 0 || tag <> i_ExportedType) - - //if isTopTypeDef then - try - let nm = ReadBlobHeapAsTypeName ctxt (name_idx,namespace_idx) - let scoref = SeekReadImplAsScopeRef ctxt impl_idx - let entry = - { exportedTypeScope=scoref; - exportedTypeName=nm; - exportedTypeForwarder = ((flags &&& 0x00200000) <> 0); - exportedTypeAccess=type_access_of_flags flags; - exportedTypeNested=SeekReadNestedExportedTypes ctxt i; - exportedTypeCustomAttrs=SeekReadCustomAttrs ctxt (TaggedIndex(hca_ExportedType, i)) } - res := entry :: !res; - with _ -> // BUG 3794: Type forwarding is broken for nested types - () - done; - List.rev !res - end) - -let getPDBReader opts infile = - match opts.pdbPath with - | None -> None - | Some pdbpath -> - try - let pdbr = pdbReadOpen infile pdbpath - let pdbdocs = pdbReaderGetDocuments pdbr - - let tab = new Dictionary<_,_>(Array.length pdbdocs) - pdbdocs |> Array.iter (fun pdbdoc -> - let url = pdbDocumentGetURL pdbdoc - tab.[url] <- - ILSourceDocument.Create(language=Some (pdbDocumentGetLanguage pdbdoc), - vendor = Some (pdbDocumentGetLanguageVendor pdbdoc), - documentType = Some (pdbDocumentGetType pdbdoc), - file = url)); - - let docfun url = if tab.ContainsKey url then tab.[url] else failwith ("Document with URL "^url^" not found in list of documents in the PDB file") - Some (pdbr, docfun) - with e -> dprintn ("* Warning: PDB file could not be read and will be ignored: "^e.Message); None - -(*----------------------------------------------------------------------- - * Crack the binary headers, build a reader context and return the lazy - * read of the AbsIL module. - * ----------------------------------------------------------------------*) - -let rec gen_open_binary_reader infile is opts = - - (* MSDOS HEADER *) - let pe_signature_phys_loc = SeekReadInt32 is 0x3c - - (* PE HEADER *) - let pe_file_header_phys_loc = pe_signature_phys_loc + 0x04 - let pe_optional_header_phys_loc = pe_file_header_phys_loc + 0x14 - let pe_signature = SeekReadInt32 is (pe_signature_phys_loc + 0) - if pe_signature <> 0x4550 then failwithf "not a PE file - bad magic PE number 0x%08x, is = %A" pe_signature is; - - - (* PE SIGNATURE *) - let machine = SeekReadUInt16AsInt32 is (pe_file_header_phys_loc + 0) - let num_sections = SeekReadUInt16AsInt32 is (pe_file_header_phys_loc + 2) - let opt_header_size = SeekReadUInt16AsInt32 is (pe_file_header_phys_loc + 16) - if opt_header_size <> 0xe0 && - opt_header_size <> 0xf0 then failwith "not a PE file - bad optional header size"; - let x64adjust = opt_header_size - 0xe0 - let only64 = (opt_header_size = 0xf0) (* May want to read in the optional header Magic number and check that as well... *) - let platform = match machine with | 0x8664 -> Some(AMD64) | 0x200 -> Some(IA64) | _ -> Some(X86) - let section_headers_start_phys_loc = pe_optional_header_phys_loc + opt_header_size - - let flags = SeekReadUInt16AsInt32 is (pe_file_header_phys_loc + 18) - let is_dll = (flags &&& 0x2000) <> 0x0 - - (* OPTIONAL PE HEADER *) - let text_phys_size = SeekReadInt32 is (pe_optional_header_phys_loc + 4) (* Size of the code (text) section, or the sum of all code sections if there are multiple sections. *) - (* x86: 000000a0 *) - let initdata_phys_size = SeekReadInt32 is (pe_optional_header_phys_loc + 8) (* Size of the initialized data section, or the sum of all such sections if there are multiple data sections. *) - let uninitdata_phys_size = SeekReadInt32 is (pe_optional_header_phys_loc + 12) (* Size of the uninitialized data section, or the sum of all such sections if there are multiple data sections. *) - let entrypoint_addr = SeekReadInt32 is (pe_optional_header_phys_loc + 16) (* RVA of entry point , needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 in a section marked execute/read for EXEs or 0 for DLLs e.g. 0x0000b57e *) - let text_addr = SeekReadInt32 is (pe_optional_header_phys_loc + 20) (* e.g. 0x0002000 *) - (* x86: 000000b0 *) - let data_addr = SeekReadInt32 is (pe_optional_header_phys_loc + 24) (* e.g. 0x0000c000 *) - (* REVIEW: For now, we'll use the DWORD at offset 24 for x64. This currently ok since fsc doesn't support true 64-bit image bases, - but we'll have to fix this up when such support is added. *) - let image_base_real = if only64 then data_addr else SeekReadInt32 is (pe_optional_header_phys_loc + 28) (* Image Base Always 0x400000 (see Section 23.1). - QUERY : no it's not always 0x400000, e.g. 0x034f0000 *) - let align_virt = SeekReadInt32 is (pe_optional_header_phys_loc + 32) (* Section Alignment Always 0x2000 (see Section 23.1). *) - let align_phys = SeekReadInt32 is (pe_optional_header_phys_loc + 36) (* File Alignment Either 0x200 or 0x1000. *) - (* x86: 000000c0 *) - let os_major = SeekReadUInt16 is (pe_optional_header_phys_loc + 40) (* OS Major Always 4 (see Section 23.1). *) - let os_minor = SeekReadUInt16 is (pe_optional_header_phys_loc + 42) (* OS Minor Always 0 (see Section 23.1). *) - let user_major = SeekReadUInt16 is (pe_optional_header_phys_loc + 44) (* User Major Always 0 (see Section 23.1). *) - let user_minor = SeekReadUInt16 is (pe_optional_header_phys_loc + 46) (* User Minor Always 0 (see Section 23.1). *) - let subsys_major = SeekReadUInt16 is (pe_optional_header_phys_loc + 48) (* SubSys Major Always 4 (see Section 23.1). *) - let subsys_minor = SeekReadUInt16 is (pe_optional_header_phys_loc + 50) (* SubSys Minor Always 0 (see Section 23.1). *) - (* x86: 000000d0 *) - let image_end_addr = SeekReadInt32 is (pe_optional_header_phys_loc + 56) (* Image Size: Size, in bytes, of image, including all headers and padding; shall be a multiple of Section Alignment. e.g. 0x0000e000 *) - let header_phys_size = SeekReadInt32 is (pe_optional_header_phys_loc + 60) (* Header Size Combined size of MS-DOS Header, PE Header, PE Optional Header and padding; shall be a multiple of the file alignment. *) - let subsys = SeekReadUInt16 is (pe_optional_header_phys_loc + 68) (* SubSystem Subsystem required to run this image. Shall be either IMAGE_SUBSYSTEM_WINDOWS_CE_GUI (!0x3) or IMAGE_SUBSYSTEM_WINDOWS_GUI (!0x2). QUERY: Why is this 3 on the images ILASM produces??? *) - (* x86: 000000e0 *) - - (* WARNING: THESE ARE 64 bit ON x64/ia64 *) - (* REVIEW: If we ever decide that we need these values for x64, we'll have to read them in as 64bit and fix up the rest of the offsets. - Then again, it should suffice to just use the defaults, and still not bother... *) - (* let stack_reserve = SeekReadInt32 is (pe_optional_header_phys_loc + 72) in *) (* Stack Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) - (* let stack_commit = SeekReadInt32 is (pe_optional_header_phys_loc + 76) in *) (* Stack Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) - (* let heap_reserve = SeekReadInt32 is (pe_optional_header_phys_loc + 80) in *) (* Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) - (* let heap_commit = SeekReadInt32 is (pe_optional_header_phys_loc + 84) in *) (* Heap Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) - - (* x86: 000000f0, x64: 00000100 *) - let num_data_directories = SeekReadInt32 is (pe_optional_header_phys_loc + 92 + x64adjust) (* Number of Data Directories: Always 0x10 (see Section 23.1). *) - (* 00000100 - these addresses are for x86 - for the x64 location, add x64adjust (0x10) *) - let import_tab_addr = SeekReadInt32 is (pe_optional_header_phys_loc + 104 + x64adjust) (* Import Table RVA of Import Table, (see clause 24.3.1). e.g. 0000b530 *) - let import_tab_size = SeekReadInt32 is (pe_optional_header_phys_loc + 108 + x64adjust) (* Size of Import Table, (see clause 24.3.1). *) - let native_resources_addr = SeekReadInt32 is (pe_optional_header_phys_loc + 112 + x64adjust) - let native_resources_size = SeekReadInt32 is (pe_optional_header_phys_loc + 116 + x64adjust) - (* 00000110 *) - (* 00000120 *) - (* let base_reloc_tab_addr = SeekReadInt32 is (pe_optional_header_phys_loc + 136) - let base_reloc_tab_size = SeekReadInt32 is (pe_optional_header_phys_loc + 140) in *) - (* 00000130 *) - (* 00000140 *) - (* 00000150 *) - let import_addr_tab_addr = SeekReadInt32 is (pe_optional_header_phys_loc + 192 + x64adjust) (* RVA of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) - let import_addr_tab_size = SeekReadInt32 is (pe_optional_header_phys_loc + 196 + x64adjust) (* Size of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) - (* 00000160 *) - let cli_header_addr = SeekReadInt32 is (pe_optional_header_phys_loc + 208 + x64adjust) - let cli_header_size = SeekReadInt32 is (pe_optional_header_phys_loc + 212 + x64adjust) - (* 00000170 *) - - - (* Crack section headers *) - - let section_headers = - [ for i in 0 .. num_sections-1 do - let pos = section_headers_start_phys_loc + i * 0x28 - let virt_size = SeekReadInt32 is (pos + 8) - let virt_addr = SeekReadInt32 is (pos + 12) - let phys_loc = SeekReadInt32 is (pos + 20) - yield (virt_addr,virt_size,phys_loc) ] - - let find_section_header addr = - let rec look i pos = - if i >= num_sections then 0x0 - else - let virt_size = SeekReadInt32 is (pos + 8) - let virt_addr = SeekReadInt32 is (pos + 12) - if (addr >= virt_addr && addr < virt_addr + virt_size) then pos - else look (i+1) (pos + 0x28) - look 0 section_headers_start_phys_loc - - let text_header_start = find_section_header cli_header_addr - let data_header_start = find_section_header data_addr - (* let reloc_header_start = find_section_header base_reloc_tab_addr in *) - - let text_size = if text_header_start = 0x0 then 0x0 else SeekReadInt32 is (text_header_start + 8) - let text_addr = if text_header_start = 0x0 then 0x0 else SeekReadInt32 is (text_header_start + 12) - let text_phys_size = if text_header_start = 0x0 then 0x0 else SeekReadInt32 is (text_header_start + 16) - let text_phys_loc = if text_header_start = 0x0 then 0x0 else SeekReadInt32 is (text_header_start + 20) - - (* - let reloc_size = if reloc_header_start = 0x0 then 0x0 else SeekReadInt32 is (reloc_header_start + 8) - let reloc_addr = if reloc_header_start = 0x0 then 0x0 else SeekReadInt32 is (reloc_header_start + 12) - let reloc_phys_size = if reloc_header_start = 0x0 then 0x0 else SeekReadInt32 is (reloc_header_start + 16) - let reloc_phys_loc = if reloc_header_start = 0x0 then 0x0 else SeekReadInt32 is (reloc_header_start + 20) - *) - - if logging then dprintn (infile ^ ": text_header_start = "^string text_header_start); - if logging then dprintn (infile ^ ": data_header_start = "^string data_header_start); - if logging then dprintn (infile ^ ": data_addr (pre section crack) = "^string data_addr); - - let data_size = if data_header_start = 0x0 then 0x0 else SeekReadInt32 is (data_header_start + 8) - let data_addr = if data_header_start = 0x0 then 0x0 else SeekReadInt32 is (data_header_start + 12) - let data_phys_size = if data_header_start = 0x0 then 0x0 else SeekReadInt32 is (data_header_start + 16) - let data_phys_loc = if data_header_start = 0x0 then 0x0 else SeekReadInt32 is (data_header_start + 20) - - if logging then dprintn (infile ^ ": data_addr (post section crack) = "^string data_addr); - - let anyV2P (n,v) = - let rec look i pos = - if i >= num_sections then (failwith (infile ^ ": bad "^n^", rva "^string v); 0x0) - else - let virt_size = SeekReadInt32 is (pos + 8) - let virt_addr = SeekReadInt32 is (pos + 12) - let phys_loc = SeekReadInt32 is (pos + 20) - if (v >= virt_addr && (v < virt_addr + virt_size)) then (v - virt_addr) + phys_loc - else look (i+1) (pos + 0x28) - look 0 section_headers_start_phys_loc - - (* let relocV2P v = v - reloc_addr + reloc_phys_loc in *) - - if logging then dprintn (infile ^ ": num_sections = "^string num_sections); - if logging then dprintn (infile ^ ": cli_header_addr = "^string cli_header_addr); - if logging then dprintn (infile ^ ": cli_header_phys = "^string (anyV2P ("cli header",cli_header_addr))); - if logging then dprintn (infile ^ ": data_size = "^string data_size); - if logging then dprintn (infile ^ ": data_addr = "^string data_addr); - - let cli_header_phys_loc = anyV2P ("cli header",cli_header_addr) - - let major_runtime_version = SeekReadUInt16 is (cli_header_phys_loc + 4) - let minor_runtime_version = SeekReadUInt16 is (cli_header_phys_loc + 6) - let metadata_addr = SeekReadInt32 is (cli_header_phys_loc + 8) - let metadata_size = SeekReadInt32 is (cli_header_phys_loc + 12) - let cli_flags = SeekReadInt32 is (cli_header_phys_loc + 16) - - let ilonly = (cli_flags &&& 0x01) <> 0x00 - let only32 = (cli_flags &&& 0x02) <> 0x00 - let strongname_signed = (cli_flags &&& 0x08) <> 0x00 - let trackdebugdata = (cli_flags &&& 0x010000) <> 0x00 - - let eptoken = SeekReaduncoded_token is (cli_header_phys_loc + 20) - let resources_addr = SeekReadInt32 is (cli_header_phys_loc + 24) - let resources_size = SeekReadInt32 is (cli_header_phys_loc + 28) - let strongname_addr = SeekReadInt32 is (cli_header_phys_loc + 32) - let strongname_size = SeekReadInt32 is (cli_header_phys_loc + 36) - let vtable_fixups_addr = SeekReadInt32 is (cli_header_phys_loc + 40) - let vtable_fixups_size = SeekReadInt32 is (cli_header_phys_loc + 44) - - if logging then dprintn (infile ^ ": metadata_addr = "^string metadata_addr); - if logging then dprintn (infile ^ ": resources_addr = "^string resources_addr); - if logging then dprintn (infile ^ ": resources_size = "^string resources_size); - if logging then dprintn (infile ^ ": native_resources_addr = "^string native_resources_addr); - if logging then dprintn (infile ^ ": native_resources_size = "^string native_resources_size); - - let metadata_phys_loc = anyV2P ("metadata",metadata_addr) - let magic = SeekReadUInt16AsInt32 is metadata_phys_loc - if magic <> 0x5342 then failwith (infile ^ ": bad metadata magic number: " ^ string magic); - let magic2 = SeekReadUInt16AsInt32 is (metadata_phys_loc + 2) - if magic2 <> 0x424a then failwith "bad metadata magic number"; - let major_metadata_version = SeekReadUInt16 is (metadata_phys_loc + 4) - let minor_metadata_version = SeekReadUInt16 is (metadata_phys_loc + 6) - - let version_length = SeekReadInt32 is (metadata_phys_loc + 12) - let x = align 0x04 (16 + version_length) - let num_streams = SeekReadUInt16AsInt32 is (metadata_phys_loc + x + 2) - let stream_headers_start = (metadata_phys_loc + x + 4) - - if logging then dprintn (infile ^ ": num_streams = "^string num_streams); - if logging then dprintn (infile ^ ": stream_headers_start = "^string stream_headers_start); - - (* Crack stream headers *) - - let try_find_stream name = - let rec look i pos = - if i >= num_streams then raise Not_found - else - let offset = SeekReadInt32 is (pos + 0) - let length = SeekReadInt32 is (pos + 4) - let res = ref true - let fin = ref false - let n = ref 0 - // read and compare the stream name byte by byte - while (not !fin) do - let c= SeekReadByteAsInt32 is (pos + 8 + (!n)) - if c = 0 then - fin := true - elif !n >= Array.length name or c <> name.[!n] then - res := false; - incr n - if !res then (offset + metadata_phys_loc,length) - else look (i+1) (align 0x04 (pos + 8 + (!n))) - look 0 stream_headers_start - let find_stream name = try try_find_stream name with Not_found -> (0x0, 0x0) - - let (tables_stream_phys_loc, tables_stream_size) = - try try_find_stream [| 0x23; 0x7e |] (* #~ *) - with Not_found -> - try try_find_stream [| 0x23; 0x2d |] (* #-: at least one DLL I've seen uses this! *) - with Not_found -> - dprintf "no metadata tables found under stream names '#~' or '#-', please report this\n"; - let first_stream_offset = SeekReadInt32 is (stream_headers_start + 0) - let first_stream_length = SeekReadInt32 is (stream_headers_start + 4) - first_stream_offset,first_stream_length - let (strings_stream_phys_loc, strings_stream_size) = find_stream [| 0x23; 0x53; 0x74; 0x72; 0x69; 0x6e; 0x67; 0x73; |] (* #Strings *) - let (user_strings_stream_phys_loc, user_strings_stream_size) = find_stream [| 0x23; 0x55; 0x53; |] (* #US *) - let (guids_stream_phys_loc, guids_stream_size) = find_stream [| 0x23; 0x47; 0x55; 0x49; 0x44; |] (* #GUID *) - let (blobs_stream_phys_loc, blobs_stream_size) = find_stream [| 0x23; 0x42; 0x6c; 0x6f; 0x62; |] (* #Blob *) - - if logging then dprintn (infile ^ ": tables_addr = "^string tables_stream_phys_loc); - if logging then dprintn (infile ^ ": tables_size = "^string tables_stream_size); - if logging then dprintn (infile ^ ": strings_addr = "^string strings_stream_phys_loc); - if logging then dprintn (infile ^ ": strings_size = "^string strings_stream_size); - if logging then dprintn (infile ^ ": user_strings_addr = "^string user_strings_stream_phys_loc); - if logging then dprintn (infile ^ ": guids_addr = "^string guids_stream_phys_loc); - if logging then dprintn (infile ^ ": blobs_addr = "^string blobs_stream_phys_loc); - - let tables_stream_major_version = SeekReadByteAsInt32 is (tables_stream_phys_loc + 4) - let tables_stream_minor_version = SeekReadByteAsInt32 is (tables_stream_phys_loc + 5) - - let usingWhidbeyBeta1TableSchemeForGenericParam = (tables_stream_major_version = 1) && (tables_stream_minor_version = 1) - - let table_kinds = - [|kind_Module (* Table 0 *); - kind_TypeRef (* Table 1 *); - kind_TypeDef (* Table 2 *); - kind_Illegal (* kind_FieldPtr *) (* Table 3 *); - kind_FieldDef (* Table 4 *); - kind_Illegal (* kind_MethodPtr *) (* Table 5 *); - kind_MethodDef (* Table 6 *); - kind_Illegal (* kind_ParamPtr *) (* Table 7 *); - kind_Param (* Table 8 *); - kind_InterfaceImpl (* Table 9 *); - kind_MemberRef (* Table 10 *); - kind_Constant (* Table 11 *); - kind_CustomAttribute (* Table 12 *); - kind_FieldMarshal (* Table 13 *); - kind_DeclSecurity (* Table 14 *); - kind_ClassLayout (* Table 15 *); - kind_FieldLayout (* Table 16 *); - kind_StandAloneSig (* Table 17 *); - kind_EventMap (* Table 18 *); - kind_Illegal (* kind_EventPtr *) (* Table 19 *); - kind_Event (* Table 20 *); - kind_PropertyMap (* Table 21 *); - kind_Illegal (* kind_PropertyPtr *) (* Table 22 *); - kind_Property (* Table 23 *); - kind_MethodSemantics (* Table 24 *); - kind_MethodImpl (* Table 25 *); - kind_ModuleRef (* Table 26 *); - kind_TypeSpec (* Table 27 *); - kind_ImplMap (* Table 28 *); - kind_FieldRVA (* Table 29 *); - kind_Illegal (* kind_ENCLog *) (* Table 30 *); - kind_Illegal (* kind_ENCMap *) (* Table 31 *); - kind_Assembly (* Table 32 *); - kind_Illegal (* kind_AssemblyProcessor *) (* Table 33 *); - kind_Illegal (* kind_AssemblyOS *) (* Table 34 *); - kind_AssemblyRef (* Table 35 *); - kind_Illegal (* kind_AssemblyRefProcessor *) (* Table 36 *); - kind_Illegal (* kind_AssemblyRefOS *) (* Table 37 *); - kind_FileRef (* Table 38 *); - kind_ExportedType (* Table 39 *); - kind_ManifestResource (* Table 40 *); - kind_Nested (* Table 41 *); - (if usingWhidbeyBeta1TableSchemeForGenericParam then kind_GenericParam_v1_1 else kind_GenericParam_v2_0); (* Table 42 *) - kind_MethodSpec (* Table 43 *); - kind_GenericParamConstraint (* Table 44 *); - kind_Illegal (* Table 45 *); - kind_Illegal (* Table 46 *); - kind_Illegal (* Table 47 *); - kind_Illegal (* Table 48 *); - kind_Illegal (* Table 49 *); - kind_Illegal (* Table 50 *); - kind_Illegal (* Table 51 *); - kind_Illegal (* Table 52 *); - kind_Illegal (* Table 53 *); - kind_Illegal (* Table 54 *); - kind_Illegal (* Table 55 *); - kind_Illegal (* Table 56 *); - kind_Illegal (* Table 57 *); - kind_Illegal (* Table 58 *); - kind_Illegal (* Table 59 *); - kind_Illegal (* Table 60 *); - kind_Illegal (* Table 61 *); - kind_Illegal (* Table 62 *); - kind_Illegal (* Table 63 *); - |] - - let heap_sizes = SeekReadByteAsInt32 is (tables_stream_phys_loc + 6) - let valid = SeekReadInt64 is (tables_stream_phys_loc + 8) - let sorted = SeekReadInt64 is (tables_stream_phys_loc + 16) - let tables_present, table_num_rows, start_of_tables = - let present = ref [] - let num_rows = Array.create 64 0 - let prev_numrow_idx = ref (tables_stream_phys_loc + 24) - for i = 0 to 63 do - if (valid &&& (int64 1 <<< i)) <> int64 0 then - present := i :: !present; - num_rows.[i] <- (SeekReadInt32 is !prev_numrow_idx); - prev_numrow_idx := !prev_numrow_idx + 4 - List.rev !present, num_rows, !prev_numrow_idx - - let nrows t = table_num_rows.[tag_of_table t] - let num_tables = List.length tables_present - let strings_big = (heap_sizes &&& 1) <> 0 - let guids_big = (heap_sizes &&& 2) <> 0 - let blobs_big = (heap_sizes &&& 4) <> 0 - - if logging then dprintn (infile ^ ": num_tables = "^string num_tables); - if logging && strings_big then dprintn (infile ^ ": strings are big"); - if logging && blobs_big then dprintn (infile ^ ": blobs are big"); - - let table_bignesses = Array.map (fun n -> n >= 0x10000) table_num_rows - - let coded_bigness nbits tab = - let rows = nrows tab - rows >= (0x10000 lsr nbits) - - let tdor_bigness = - coded_bigness 2 tab_TypeDef || - coded_bigness 2 tab_TypeRef || - coded_bigness 2 tab_TypeSpec - - let tomd_bigness = - coded_bigness 1 tab_TypeDef || - coded_bigness 1 tab_Method - - let hc_bigness = - coded_bigness 2 tab_Field || - coded_bigness 2 tab_Param || - coded_bigness 2 tab_Property - - let hca_bigness = - coded_bigness 5 tab_Method || - coded_bigness 5 tab_Field || - coded_bigness 5 tab_TypeRef || - coded_bigness 5 tab_TypeDef || - coded_bigness 5 tab_Param || - coded_bigness 5 tab_InterfaceImpl || - coded_bigness 5 tab_MemberRef || - coded_bigness 5 tab_Module || - coded_bigness 5 tab_Permission || - coded_bigness 5 tab_Property || - coded_bigness 5 tab_Event || - coded_bigness 5 tab_StandAloneSig || - coded_bigness 5 tab_ModuleRef || - coded_bigness 5 tab_TypeSpec || - coded_bigness 5 tab_Assembly || - coded_bigness 5 tab_AssemblyRef || - coded_bigness 5 tab_File || - coded_bigness 5 tab_ExportedType || - coded_bigness 5 tab_ManifestResource || - coded_bigness 5 tab_GenericParam || - coded_bigness 5 tab_GenericParamConstraint || - coded_bigness 5 tab_MethodSpec - - - let hfm_bigness = - coded_bigness 1 tab_Field || - coded_bigness 1 tab_Param - - let hds_bigness = - coded_bigness 2 tab_TypeDef || - coded_bigness 2 tab_Method || - coded_bigness 2 tab_Assembly - - let mrp_bigness = - coded_bigness 3 tab_TypeRef || - coded_bigness 3 tab_ModuleRef || - coded_bigness 3 tab_Method || - coded_bigness 3 tab_TypeSpec - - let hs_bigness = - coded_bigness 1 tab_Event || - coded_bigness 1 tab_Property - - let mdor_bigness = - coded_bigness 1 tab_Method || - coded_bigness 1 tab_MemberRef - - let mf_bigness = - coded_bigness 1 tab_Field || - coded_bigness 1 tab_Method - - let i_bigness = - coded_bigness 2 tab_File || - coded_bigness 2 tab_AssemblyRef || - coded_bigness 2 tab_ExportedType - - let cat_bigness = - coded_bigness 3 tab_Method || - coded_bigness 3 tab_MemberRef - - let rs_bigness = - coded_bigness 2 tab_Module || - coded_bigness 2 tab_ModuleRef || - coded_bigness 2 tab_AssemblyRef || - coded_bigness 2 tab_TypeRef - - let row_kind_size (RowKind kinds) = - List.fold - (fun sofar x -> - sofar + - match x with - | UShort -> 2 - | ULong -> 4 - | Byte -> 1 - | Data -> 4 - | GGuid -> (if guids_big then 4 else 2) - | Blob -> (if blobs_big then 4 else 2) - | SString -> (if strings_big then 4 else 2) - | SimpleIndex (Table tab) -> (if table_bignesses.[tab] then 4 else 2) - | TypeDefOrRefOrSpec -> (if tdor_bigness then 4 else 2) - | TypeOrMethodDef -> (if tomd_bigness then 4 else 2) - | HasConstant -> (if hc_bigness then 4 else 2) - | HasCustomAttribute -> (if hca_bigness then 4 else 2) - | HasFieldMarshal -> (if hfm_bigness then 4 else 2) - | HasDeclSecurity -> (if hds_bigness then 4 else 2) - | MemberRefParent -> (if mrp_bigness then 4 else 2) - | HasSemantics -> (if hs_bigness then 4 else 2) - | MethodDefOrRef -> (if mdor_bigness then 4 else 2) - | MemberForwarded -> (if mf_bigness then 4 else 2) - | Implementation -> (if i_bigness then 4 else 2) - | CustomAttributeType -> (if cat_bigness then 4 else 2) - | ResolutionScope -> (if rs_bigness then 4 else 2)) 0 kinds - - let table_row_sizes = - let res = Array.create 64 0x0 - for i = 0 to 63 do - res.[i] <- (row_kind_size (table_kinds.[i])); - (* dprintf "table_row_sizes.[%d] = %ld\n" i res.[i]; *) - res - - let table_phys_locs = - let res = Array.create 64 0x0 - let prev_table_phys_loc = ref start_of_tables - for i = 0 to 63 do - res.[i] <- !prev_table_phys_loc; - prev_table_phys_loc := !prev_table_phys_loc + ((table_num_rows.[i]) * table_row_sizes.[i]); - if logging then dprintf "table_phys_locs.[%d] = %ld, offset from start_of_tables = 0x%08lx\n" i res.[i] (res.[i] - start_of_tables); - res - - let inbase = System.IO.Path.GetFileName infile^": " - - // All the caches. The sizes are guesstimates for the rough sharing-density of the assembly - // We should also take a parameter that indicates how much of the assembly we actually - // expect to get read at all - let cache_AssemblyRef = mk_cache_int32 opts.optimizeForMemory inbase "ILAssemblyRef" (nrows (tab_AssemblyRef)) - let cache_MethodSpec_as_mdata = mk_cache_gen opts.optimizeForMemory inbase "MethodSpec_as_mdata" (nrows (tab_MethodSpec) / 20 + 1) - let cache_MemberRef_as_mdata = mk_cache_gen opts.optimizeForMemory inbase "MemberRef_as_mdata" (nrows (tab_MemberRef) / 20 + 1) - //let cache_MemberRef_as_fspec = mk_cache_gen opts.optimizeForMemory inbase "MemberRef_as_fspec" (nrows (tab_MemberRef) / 40 + 1) - let cache_CustomAttr = mk_cache_gen opts.optimizeForMemory inbase "CustomAttr" (nrows (tab_CustomAttribute) / 50 + 1) - //let cache_SecurityDecl = mk_cache_gen opts.optimizeForMemory inbase "SecurityDecl" (nrows (tab_Permission) / 20 + 1) - let cache_TypeRef = mk_cache_int32 opts.optimizeForMemory inbase "ILTypeRef" (nrows (tab_TypeRef) / 20 + 1) - let cache_TypeRef_as_typ = mk_cache_gen opts.optimizeForMemory inbase "TypeRef_as_typ" (nrows (tab_TypeRef) / 20 + 1) - let cache_blob_heap_as_property_sig = mk_cache_gen opts.optimizeForMemory inbase "blob_heap_as_property_sig" (nrows (tab_Property) / 20 + 1) - let cache_blob_heap_as_field_sig = mk_cache_gen opts.optimizeForMemory inbase "blob_heap_as_field_sig" (nrows (tab_Field) / 20 + 1) - let cache_blob_heap_as_method_sig = mk_cache_gen opts.optimizeForMemory inbase "blob_heap_as_method_sig" (nrows (tab_Method) / 20 + 1) - //let cache_blob_heap_as_locals_sig = mk_cache_gen opts.optimizeForMemory inbase "blob_heap_as_locals_sig" (nrows (tab_Method) / 20 + 1) - let cache_TypeDef_as_typ = mk_cache_gen opts.optimizeForMemory inbase "TypeDef_as_typ" (nrows (tab_TypeDef) / 20 + 1) - let cache_MethodDef_as_mdata = mk_cache_int32 opts.optimizeForMemory inbase "MethodDef_as_mdata" (nrows (tab_Method) / 20 + 1) - let cache_GenericParams = mk_cache_gen opts.optimizeForMemory inbase "GenericParams" (nrows (tab_GenericParam) / 20 + 1) - let cache_GenericParamConstraints = mk_cache_gen opts.optimizeForMemory inbase "GenericParamConstraints" (nrows (tab_GenericParamConstraint) / 8 + 1) - let cache_FieldDef_as_fspec = mk_cache_int32 opts.optimizeForMemory inbase "FieldDef_as_fspec" (nrows (tab_Field) / 20 + 1) - let cache_user_string_heap = mk_cache_int32 opts.optimizeForMemory inbase "user_string heap" ( user_strings_stream_size / 20 + 1) - (* nb. Lots and lots of cache hits on this cache, hence never optimize cache away *) - let cache_string_heap = mk_cache_int32 false inbase "string heap" ( strings_stream_size / 50 + 1) - let cache_blob_heap = mk_cache_int32 opts.optimizeForMemory inbase "blob heap" ( blobs_stream_size / 50 + 1) - - // These tables are not required to enforce sharing fo the final data - // structure, but are very useful as searching these tables gives rise to many reads - // in standard applications. - - let cache_Nested_row = mk_cache_int32 opts.optimizeForMemory inbase "Nested Table Rows" (nrows (tab_Nested) / 20 + 1) - let cache_Constant_row = mk_cache_int32 opts.optimizeForMemory inbase "Constant Rows" (nrows (tab_Constant) / 20 + 1) - let cache_MethodSemantics_row = mk_cache_int32 opts.optimizeForMemory inbase "MethodSemantics Rows" (nrows (tab_MethodSemantics) / 20 + 1) - let cache_TypeDef_row = mk_cache_int32 opts.optimizeForMemory inbase "ILTypeDef Rows" (nrows (tab_TypeDef) / 20 + 1) - let cache_InterfaceImpl_row = mk_cache_int32 opts.optimizeForMemory inbase "InterfaceImpl Rows" (nrows (tab_InterfaceImpl) / 20 + 1) - let cache_FieldMarshal_row = mk_cache_int32 opts.optimizeForMemory inbase "FieldMarshal Rows" (nrows (tab_FieldMarshal) / 20 + 1) - let cache_PropertyMap_row = mk_cache_int32 opts.optimizeForMemory inbase "PropertyMap Rows" (nrows (tab_PropertyMap) / 20 + 1) - - let mk_row_counter nm = - let count = ref 0 - add_report (fun oc -> if !count <> 0 then output_string oc (inbase^string !count ^ " "^nm^" rows read"^"\n")); - count - - let count_TypeRef = mk_row_counter "ILTypeRef" - let count_TypeDef = mk_row_counter "ILTypeDef" - let count_Field = mk_row_counter "Field" - let count_Method = mk_row_counter "Method" - let count_Param = mk_row_counter "Param" - let count_InterfaceImpl = mk_row_counter "InterfaceImpl" - let count_MemberRef = mk_row_counter "MemberRef" - let count_Constant = mk_row_counter "Constant" - let count_CustomAttribute = mk_row_counter "CustomAttribute" - let count_FieldMarshal = mk_row_counter "FieldMarshal" - let count_Permission = mk_row_counter "Permission" - let count_ClassLayout = mk_row_counter "ClassLayout" - let count_FieldLayout = mk_row_counter "FieldLayout" - let count_StandAloneSig = mk_row_counter "StandAloneSig" - let count_EventMap = mk_row_counter "EventMap" - let count_Event = mk_row_counter "Event" - let count_PropertyMap = mk_row_counter "PropertyMap" - let count_Property = mk_row_counter "Property" - let count_MethodSemantics = mk_row_counter "MethodSemantics" - let count_MethodImpl = mk_row_counter "MethodImpl" - let count_ModuleRef = mk_row_counter "ILModuleRef" - let count_TypeSpec = mk_row_counter "ILTypeSpec" - let count_ImplMap = mk_row_counter "ImplMap" - let count_FieldRVA = mk_row_counter "FieldRVA" - let count_Assembly = mk_row_counter "Assembly" - let count_AssemblyRef = mk_row_counter "ILAssemblyRef" - let count_File = mk_row_counter "File" - let count_ExportedType = mk_row_counter "ILExportedType" - let count_ManifestResource = mk_row_counter "ManifestResource" - let count_Nested = mk_row_counter "Nested" - let count_GenericParam = mk_row_counter "GenericParam" - let count_GenericParamConstraint = mk_row_counter "GenericParamConstraint" - let count_MethodSpec = mk_row_counter "ILMethodSpec" - - - (*----------------------------------------------------------------------- - * Set up the PDB reader so we can read debug info for methods. - * ----------------------------------------------------------------------*) - - let pdb = if runningOnMono then None else getPDBReader opts infile - - let row_addr tab idx = table_phys_locs.[tag_of_table tab] + (idx - 1) * table_row_sizes.[tag_of_table tab] - - - // Build the reader context - // Use an initialization hole - let ctxtH = ref None - let ctxt = { ilg=opts.ilGlobals; - data_end_points = data_end_points ctxtH; - pdb=pdb; - sorted=sorted; - nrows=nrows; - text_phys_loc=text_phys_loc; - text_phys_size=text_phys_size; - data_phys_loc=data_phys_loc; - data_phys_size=data_phys_size; - anyV2P=anyV2P; - metadata_addr=metadata_addr; - section_headers=section_headers; - native_resources_addr=native_resources_addr; - native_resources_size=native_resources_size; - resources_addr=resources_addr; - strongname_addr=strongname_addr; - vtable_fixups_addr=vtable_fixups_addr; - is=is; - infile=infile; - user_strings_stream_phys_loc=user_strings_stream_phys_loc; - strings_stream_phys_loc=strings_stream_phys_loc; - blobs_stream_phys_loc=blobs_stream_phys_loc; - MemoizeString = memoize id; - ReadUserStringHeap = cache_user_string_heap (ReadUserStringHeapUncached ctxtH); - ReadStringHeap = cache_string_heap (ReadStringHeapUncached ctxtH); - ReadBlobHeap = cache_blob_heap (ReadBlobHeapUncached ctxtH); - SeekReadNestedRow = cache_Nested_row (SeekReadNestedRowUncached ctxtH); - SeekReadConstantRow = cache_Constant_row (SeekReadConstantRowUncached ctxtH); - SeekReadMethodSemanticsRow = cache_MethodSemantics_row (SeekReadMethodSemanticsRowUncached ctxtH); - SeekReadTypeDefRow = cache_TypeDef_row (SeekReadTypeDefRowUncached ctxtH); - SeekReadInterfaceImplRow = cache_InterfaceImpl_row (SeekReadInterfaceImplRowUncached ctxtH); - SeekReadFieldMarshalRow = cache_FieldMarshal_row (SeekReadFieldMarshalRowUncached ctxtH); - SeekReadPropertyMapRow = cache_PropertyMap_row (SeekReadPropertyMapRowUncached ctxtH); - SeekReadAssemblyRef = cache_AssemblyRef (SeekReadAssemblyRefUncached ctxtH); - SeekReadMethodSpec_as_mdata = cache_MethodSpec_as_mdata (SeekReadMethodSpec_as_mdataUncached ctxtH); - SeekReadMemberRef_as_mdata = cache_MemberRef_as_mdata (SeekReadMemberRef_as_mdataUncached ctxtH); - SeekReadMemberRef_as_fspec = (* cache_MemberRef_as_fspec *) (SeekReadMemberRef_as_fspecUncached ctxtH); - SeekReadCustomAttr = cache_CustomAttr (SeekReadCustomAttrUncached ctxtH); - SeekReadSecurityDecl = (* cache_SecurityDecl *) (SeekReadSecurityDeclUncached ctxtH); - SeekReadTypeRef = cache_TypeRef (SeekReadTypeRefUncached ctxtH); - ReadBlobHeap_as_property_sig = cache_blob_heap_as_property_sig (ReadBlobHeap_as_property_sigUncached ctxtH); - ReadBlobHeap_as_field_sig = cache_blob_heap_as_field_sig (ReadBlobHeap_as_field_sigUncached ctxtH); - ReadBlobHeap_as_method_sig = cache_blob_heap_as_method_sig (ReadBlobHeap_as_method_sigUncached ctxtH); - ReadBlobHeap_as_locals_sig = (* cache_blob_heap_as_locals_sig *) (ReadBlobHeap_as_locals_sigUncached ctxtH); - SeekReadTypeDefAsType = cache_TypeDef_as_typ (SeekReadTypeDefAsTypeUncached ctxtH); - SeekReadTypeRef_as_typ = cache_TypeRef_as_typ (SeekReadTypeRef_as_typUncached ctxtH); - SeekReadMethodDef_as_mdata = cache_MethodDef_as_mdata (SeekReadMethodDef_as_mdataUncached ctxtH); - SeekReadGenericParams = cache_GenericParams (SeekReadGenericParamsUncached ctxtH); - SeekReadFieldDef_as_fspec = cache_FieldDef_as_fspec (SeekReadFieldDef_as_fspecUncached ctxtH); - guids_stream_phys_loc = guids_stream_phys_loc; - row_addr=row_addr; - eptoken=eptoken; - rs_bigness =rs_bigness; - tdor_bigness =tdor_bigness; - tomd_bigness =tomd_bigness; - hc_bigness =hc_bigness; - hca_bigness =hca_bigness; - hfm_bigness =hfm_bigness; - hds_bigness =hds_bigness; - mrp_bigness =mrp_bigness; - hs_bigness =hs_bigness; - mdor_bigness =mdor_bigness; - mf_bigness =mf_bigness; - i_bigness =i_bigness; - cat_bigness =cat_bigness; - strings_big=strings_big; - guids_big=guids_big; - blobs_big=blobs_big; - table_bignesses=table_bignesses; - count_TypeRef = count_TypeRef; - count_TypeDef = count_TypeDef; - count_Field = count_Field; - count_Method = count_Method; - count_Param = count_Param; - count_InterfaceImpl = count_InterfaceImpl; - count_MemberRef = count_MemberRef; - count_Constant = count_Constant; - count_CustomAttribute = count_CustomAttribute; - count_FieldMarshal = count_FieldMarshal; - count_Permission = count_Permission; - count_ClassLayout = count_ClassLayout; - count_FieldLayout = count_FieldLayout; - count_StandAloneSig = count_StandAloneSig; - count_EventMap = count_EventMap; - count_Event = count_Event; - count_PropertyMap = count_PropertyMap; - count_Property = count_Property; - count_MethodSemantics = count_MethodSemantics; - count_MethodImpl = count_MethodImpl; - count_ModuleRef = count_ModuleRef; - count_TypeSpec = count_TypeSpec; - count_ImplMap = count_ImplMap; - count_FieldRVA = count_FieldRVA; - count_Assembly = count_Assembly; - count_AssemblyRef = count_AssemblyRef; - count_File = count_File; - count_ExportedType = count_ExportedType; - count_ManifestResource = count_ManifestResource; - count_Nested = count_Nested; - count_GenericParam = count_GenericParam; - count_GenericParamConstraint = count_GenericParamConstraint; - count_MethodSpec = count_MethodSpec; } - ctxtH := Some ctxt; - - let ilModule = SeekReadModule ctxt (subsys,ilonly,only32,only64,platform,is_dll, align_virt,align_phys,image_base_real) 1 - let ilAssemblyRefs = lazy [ for i in 1 .. nrows (tab_AssemblyRef) do yield SeekReadAssemblyRef ctxt i ] - - ilModule,ilAssemblyRefs,pdb - -let CloseILModuleReader x = x.dispose() - -let defaults = - { optimizeForMemory=false; - pdbPath= None; - ilGlobals=ecmaILGlobals } - - -let OpenILModuleReader infile opts = - - try - let mmap = MMapChannel.open_in infile - let modul,ilAssemblyRefs,pdb = gen_open_binary_reader infile (MMap mmap) opts - { modul = modul; - ilAssemblyRefs=ilAssemblyRefs; - dispose = (fun () -> - MMapChannel.close mmap; - match pdb with - | Some (pdbr,_) -> pdbReadClose pdbr - | None -> ()) } - with :? System.DllNotFoundException -> - let is = open_in_bin infile - let cell = ref (Some is) - let modul,ilAssemblyRefs,pdb = gen_open_binary_reader infile (Chan (infile,cell)) opts - { modul = modul; - ilAssemblyRefs = ilAssemblyRefs; - dispose = (fun () -> - cell := None; - close_in is; - match pdb with - | Some (pdbr,_) -> pdbReadClose pdbr - | None -> ()) } - -let ilModuleReaderCache = new Internal.Utilities.Collections.AgedLookup<(string * System.DateTime),ILModuleReader>(0) -let OpenILModuleReaderAfterReadingAllBytes infile opts = - // Use GetDirectoryName and GetFileName to pseudo-normalize the paths. - let key,succeeded = - try (Path.GetFullPath(infile), File.GetLastWriteTime(infile)), true - with e -> - System.Diagnostics.Debug.Assert(false, "Failed to compute key in OpenILModuleReaderAfterReadingAllBytes cache. Falling back to uncached.") - ("",System.DateTime.Now), false - let cacheResult = - if not succeeded then None // Fall back to uncached. - else if opts.pdbPath.IsSome then None // can't used a cached entry when reading PDBs, since it makes the returned object IDisposable - else ilModuleReaderCache.TryGet(key) - match cacheResult with - | Some(ilModuleReader) -> ilModuleReader - | None -> - let mc = MemChannel.open_in infile - let modul,ilAssemblyRefs,pdb = gen_open_binary_reader infile (Mem mc) opts - let ilModuleReader = - { modul = modul; - ilAssemblyRefs = ilAssemblyRefs - dispose = (fun () -> - match pdb with - | Some (pdbr,_) -> pdbReadClose pdbr - | None -> ()) } - if isNone pdb && succeeded then - ilModuleReaderCache.Put(key, ilModuleReader) - ilModuleReader - - - diff --git a/tools/FSharp_1.9.6.16/source/absil/ilread.mli b/tools/FSharp_1.9.6.16/source/absil/ilread.mli deleted file mode 100644 index 65906da2..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilread.mli +++ /dev/null @@ -1,77 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. -#light - -/// Binary reader. Read a .NET binary and concert it to Abstract IL data -/// structures. -/// -/// Notes: -/// - The metadata in the loaded modules will be relative to -/// those modules, e.g. ScopeRef_local will mean "local to -/// that module". You must use [rescope_typ] etc. if you want to include -/// (i.e. copy) the metadata into your own module. -/// -/// - PDB (debug info) reading/folding: -/// The PDB reader is invoked if you give a PDB path -/// This indicates if you want to search for PDB files and have the -/// reader fold them in. You cannot currently name the pdb file -/// directly - you can only name the path. Giving "None" says -/// "do not read the PDB file even if one exists" -/// -/// The debug info appears primarily as I_seqpoint annotations in -/// the instruction streams. Unfortunately the PDB information does -/// not, for example, tell you how to map back from a class definition -/// to a source code line number - you will need to explicitly search -/// for a sequence point in the code for one of the methods of the -/// class. That is not particularly satisfactory, and it may be -/// a good idea to build a small library which extracts the information -/// you need. -module internal Microsoft.FSharp.Compiler.AbstractIL.BinaryReader - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open System.IO - -//val read_binary: -// string -> (* Filename of .NET DLL or EXE *) -// string option -> (* PDB path (note: not the PDB file) *) -// ILModuleDef - -type readerOptions = - { pdbPath: string option; - ilGlobals: ILGlobals; - optimizeForMemory: bool (* normally off, i.e. optimize for startup-path speed *) } - -val defaults : readerOptions - -// The non-memory resources (i.e. the file handle) associated with -// the read can be recovered by calling CloseILModuleReader. Any reamining -// lazily-computed items in the metadata graph returned by MetadataOfILModuleReader -// will no longer be valid. -[] -type ILModuleReader = - member ILModuleDef : ILModuleDef - member ILAssemblyRefs : ILAssemblyRef list - -val OpenILModuleReader: string -> readerOptions -> ILModuleReader -val CloseILModuleReader: ILModuleReader -> unit - -/// Open a binary reader, except first copy the entire contents of the binary into -/// memory, close the file and ensure any subsequent reads happen from the in-memory store. -/// PDB files may not be read with this option. -val OpenILModuleReaderAfterReadingAllBytes: string -> readerOptions -> ILModuleReader - -#if STATISTICS -(* report statistics from all reads *) -val report: TextWriter -> unit -#endif - -(* low level functions *) -val sigptr_get_bool : byte[] -> int -> bool * int -val sigptr_get_i8 : byte[] -> int -> sbyte * int -val sigptr_get_i32 : byte[] -> int -> int32 * int -val sigptr_get_z_i32 :byte[] -> int -> int32 * int -val sigptr_get_string : int -> byte[] -> int -> string * int -val sigptr_foldi : (byte[] -> int -> 'a * int) -> int -> byte[] -> int -> ('a list * int) - diff --git a/tools/FSharp_1.9.6.16/source/absil/ilreflect.fs b/tools/FSharp_1.9.6.16/source/absil/ilreflect.fs deleted file mode 100644 index d8a76563..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilreflect.fs +++ /dev/null @@ -1,1711 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -//---------------------------------------------------------------------------- -// Write Abstract IL structures at runtime using Reflection.Emit -//---------------------------------------------------------------------------- - -#light - -module Microsoft.FSharp.Compiler.AbstractIL.RuntimeWriter - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.AbstractIL.Extensions -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -open Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter -open Microsoft.FSharp.Compiler.AbstractIL.IL - -open Microsoft.FSharp.Text.Printf - -open System -open System.Reflection -open System.Reflection.Emit -open System.Runtime.InteropServices -open System.Collections.Generic - -let codeLabelOrder = compare : ILCodeLabel -> ILCodeLabel -> int - -let verbose = false - -//---------------------------------------------------------------------------- -// misc -//---------------------------------------------------------------------------- - -let inline flagsIf b x = if b then x else enum 0 - -module Zmap = - let force x m str = match Zmap.tryfind x m with Some y -> y | None -> failwithf "Zmap.force: %s: x = %A" str x - -let equalTypes (s:Type) (t:Type) = s.Equals(t) -let equalTypeLists ss tt = List.lengthsEqAndForall2 equalTypes ss tt - -let getGenericArgumentsOfType (typT : Type) = - if typT .IsGenericType then typT .GetGenericArguments() else [| |] -let getGenericArgumentsOfMethod (methI : MethodInfo) = - if methI.IsGenericMethod then methI.GetGenericArguments() else [| |] - -let getTypeConstructor (ty: Type) = - if ty.IsGenericType then ty.GetGenericTypeDefinition() else ty - -//---------------------------------------------------------------------------- -// convAssemblyRef -//---------------------------------------------------------------------------- - -let convAssemblyRef (aref:ILAssemblyRef) = - let asmName = new System.Reflection.AssemblyName() - asmName.Name <- aref.Name; - (match aref.PublicKey with - | None -> () - | Some (PublicKey bytes) -> asmName.SetPublicKey(bytes) - | Some (PublicKeyToken bytes) -> asmName.SetPublicKeyToken(bytes)); - let setVersion (major,minor,build,rev) = - asmName.Version <- System.Version (int32 major,int32 minor,int32 build, int32 rev) - Option.iter setVersion aref.Version; - // asmName.ProcessorArchitecture <- System.Reflection.ProcessorArchitecture.MSIL; - //Option.iter (fun name -> asmName.CultureInfo <- System.Globalization.CultureInfo.CreateSpecificCulture(name)) aref.Locale; - asmName.CultureInfo <- System.Globalization.CultureInfo.InvariantCulture; - asmName - - -/// Convert an Abstract IL type reference to Reflection.Emit System.Type value -// REVIEW: This ought to be an adequate substitute for this whole function, but it needs -// to be thoroughly tested. -// Type.GetType(tref.QualifiedName) -// [] ,name -> name -// [ns] ,name -> ns+name -// [ns;typeA;typeB],name -> ns+typeA+typeB+name -let getTRefType (tref:ILTypeRef) = - if verbose then dprintf "- getTRefType: %s\n" tref.Name; - - let prefix = - match tref.Enclosing with - | [] -> "" - | enclosingNames -> String.concat "+" enclosingNames ^ "+" - let qualifiedName = prefix ^ tref.Name (* e.g. Name.Space.Class+NestedClass, assembly *) - if verbose then dprintf "- - qualifiedName = %s\n" qualifiedName; - match tref.Scope with - | ScopeRef_assembly asmref -> - let asmName = convAssemblyRef asmref - let currentDom = System.AppDomain.CurrentDomain - let assembly = currentDom.Load(asmName) - if verbose then dprintf "- - assembly = %s\n" (assembly.ToString()); - let nm = prefix ^ tref.Name - let typT = assembly.GetType(nm) - typT |> nonNull "GetTRefType" // (Printf.sprintf "GetTRefType (assembly %O, ty = %s)" assembly nm) - | ScopeRef_module _ - | ScopeRef_local _ -> - if verbose then dprintf "- - module/local\n"; - let typT = Type.GetType(qualifiedName,true) - if verbose then dprintf "- getTRefType: Got %d\n" (if isNonNull typT then 1 else 0); - typT |> nonNull "GetTRefType" // (Printf.sprintf "GetTRefType (local %s)" qualifiedName) - -/// The global environment -type cenv = - { ilg: ILGlobals; generate_pdb: bool } - -/// The (local) emitter env (state). Some of these fields are effectively global accumulators -/// and could be placed as hash tables in the global environment. -[] -type emEnv = - { emTypMap : Zmap.map ; - emConsMap : Zmap.map; - emMethMap : Zmap.map; - emFieldMap : Zmap.map; - emPropMap : Zmap.map; - emLocals : LocalBuilder array; - emLabels : Zmap.map; - emTyvars : Type array list; // stack - emEntryPts : (TypeBuilder * string) list } - -let type_ref_order = compare : ILTypeRef -> ILTypeRef -> int -let method_ref_order = compare : ILMethodRef -> ILMethodRef -> int -let field_ref_order = compare : ILFieldRef -> ILFieldRef -> int -let property_ref_order = compare : ILPropertyRef -> ILPropertyRef -> int - -let emEnv0 = - { emTypMap = Zmap.empty type_ref_order; - emConsMap = Zmap.empty method_ref_order; - emMethMap = Zmap.empty method_ref_order; - emFieldMap = Zmap.empty field_ref_order; - emPropMap = Zmap.empty property_ref_order; - emLocals = [| |]; - emLabels = Zmap.empty codeLabelOrder; - emTyvars = []; - emEntryPts = []; } - -let envBindTypeRef emEnv (tref:ILTypeRef) (typT,typB,typeDef)= - if verbose then dprintf "- envBindTypeRef: %s\n" tref.Name; - match typT with - | null -> failwithf "binding null type in envBindTypeRef: %s\n" tref.Name; - | _ -> {emEnv with emTypMap = Zmap.add tref (typT,typB,typeDef,None) emEnv.emTypMap} - -let envUpdateCreatedTypeRef emEnv (tref:ILTypeRef) = - // The tref's TypeBuilder has been created, so we have a Type proper. - // Update the tables to include this created type (the typT held prior to this is (i think) actually (TypeBuilder :> Type). - // The (TypeBuilder :> Type) does not implement all the methods that a Type proper does. - if verbose then dprintf "- envBindTypeRef: %s\n" tref.Name; - let typT,typB,typeDef,createdTypOpt = Zmap.force tref emEnv.emTypMap "envGetTypeDef: failed" - if typB.IsCreated() then - {emEnv with emTypMap = Zmap.add tref (typT,typB,typeDef,Some (typB.CreateType())) emEnv.emTypMap} - else -#if DEBUG - printf "envUpdateCreatedTypeRef: expected type to be created\n"; -#endif - emEnv - -let envGetTypT emEnv preferCreated (tref:ILTypeRef) = - if verbose then dprintf "- envGetTypT: %s\n" tref.Name; - match Zmap.tryfind tref emEnv.emTypMap with - | Some (typT,typB,typeDef,Some createdTyp) when preferCreated -> createdTyp |> nonNull "envGetTypT: null create type table?" - | Some (typT,typB,typeDef,_) -> typT |> nonNull "envGetTypT: null type table?" - | None -> getTRefType tref - -let envBindConsRef emEnv (mref:ILMethodRef) consB = - if verbose then dprintf "- envBindConsRef: %s\n" mref.Name; - {emEnv with emConsMap = Zmap.add mref consB emEnv.emConsMap} - -let envGetConsB emEnv (mref:ILMethodRef) = - if verbose then dprintf "- envGetConsB: %s\n" mref.Name; - Zmap.force mref emEnv.emConsMap "envGetConsB: failed" - -let envBindMethodRef emEnv (mref:ILMethodRef) methB = - if verbose then dprintf "- envBindMethodRef: %s\n" mref.Name; - {emEnv with emMethMap = Zmap.add mref methB emEnv.emMethMap} - -let envGetMethB emEnv (mref:ILMethodRef) = - if verbose then dprintf "- envGetMethB: %s\n" mref.Name; - Zmap.force mref emEnv.emMethMap "envGetMethB: failed" - -let envBindFieldRef emEnv fref fieldB = - if verbose then dprintf "- envBindFieldRef: %s\n" fref.frefName; - {emEnv with emFieldMap = Zmap.add fref fieldB emEnv.emFieldMap} - -let envGetFieldB emEnv fref = - Zmap.force fref emEnv.emFieldMap "- envGetMethB: failed" - -let envBindPropRef emEnv (pref:ILPropertyRef) propB = - if verbose then dprintf "- envBindPropRef: %s\n" pref.Name; - {emEnv with emPropMap = Zmap.add pref propB emEnv.emPropMap} - -let envGetPropB emEnv pref = - Zmap.force pref emEnv.emPropMap "- envGetPropB: failed" - -let envGetTypB emEnv (tref:ILTypeRef) = - if verbose then dprintf "- envGetTypB: %s\n" tref.Name; - Zmap.force tref emEnv.emTypMap "envGetTypB: failed" - |> (fun (typT,typB,typeDef,createdTypOpt) -> typB) - -let envGetTypeDef emEnv (tref:ILTypeRef) = - if verbose then dprintf "- envGetTypeDef: %s\n" tref.Name; - Zmap.force tref emEnv.emTypMap "envGetTypeDef: failed" - |> (fun (typT,typB,typeDef,createdTypOpt) -> typeDef) - -let envSetLocals emEnv locs = assert (emEnv.emLocals.Length = 0); // check "locals" is not yet set (scopes once only) - {emEnv with emLocals = locs} -let envGetLocal emEnv i = emEnv.emLocals.[i] // implicit bounds checking - -let envSetLabel emEnv name lab = - assert (not (Zmap.mem name emEnv.emLabels)); - {emEnv with emLabels = Zmap.add name lab emEnv.emLabels} - -let envGetLabel emEnv name = - //if verbose then dprintf "- envGetLabel: %s\n" name; - Zmap.find name emEnv.emLabels - -let envPushTyvars emEnv typs = {emEnv with emTyvars = typs :: emEnv.emTyvars} -let envPopTyvars emEnv = {emEnv with emTyvars = List.tl emEnv.emTyvars} -let envGetTyvar emEnv u16 = - match emEnv.emTyvars with - | [] -> failwith "envGetTyvar: not scope of type vars" - | tvs::_ -> let i = int32 u16 - if i<0 || i>= Array.length tvs then - failwith (Printf.sprintf "want tyvar #%d, but only had %d tyvars" i (Array.length tvs)) - else - (if verbose then dprintf "envGetTyvar %d\n" i; - tvs.[i]) - -let isEmittedTypeRef emEnv tref = Zmap.mem tref emEnv.emTypMap - -let envAddEntryPt emEnv mref = {emEnv with emEntryPts = mref::emEnv.emEntryPts} -let envPopEntryPts emEnv = {emEnv with emEntryPts = []},emEnv.emEntryPts - -//---------------------------------------------------------------------------- -// convCallConv -//---------------------------------------------------------------------------- - -let convCallConv (Callconv (hasThis,basic)) = - if verbose then dprintf "- convCallconv\n"; - let ccA = match hasThis with CC_static -> CallingConventions.Standard - | CC_instance_explicit -> CallingConventions.ExplicitThis - | CC_instance -> CallingConventions.HasThis - let ccB = match basic with CC_default -> enum 0 - | CC_cdecl -> enum 0 - | CC_stdcall -> enum 0 - | CC_thiscall -> enum 0 // XXX: check all these - | CC_fastcall -> enum 0 - | CC_vararg -> CallingConventions.VarArgs - ccA ||| ccB - - -//---------------------------------------------------------------------------- -// convType -//---------------------------------------------------------------------------- - -let rec convTypeSpec emEnv preferCreated (tspec:ILTypeSpec) = - if verbose then dprintf "- convTypeSpec: %s\n" tspec.Name; - let typT = envGetTypT emEnv preferCreated tspec.TypeRef - let tyargs = List.map (convTypeAux emEnv preferCreated) tspec.GenericArgs - match tyargs,typT.IsGenericType with - | tyargs,true -> typT.MakeGenericType(Array.of_list tyargs) |> nonNull "convTypeSpec: generic" - | [] ,false -> typT |> nonNull "convTypeSpec: non generic" - | h::_ ,false -> failwithf "- convTypeSpec: non-generic type '%O' has type instance of length %d and head %O?" typT (List.length tyargs) h - -and convTypeAux emEnv preferCreated typ = - match typ with - | Type_void -> Type.GetType("System.Void",true) - | Type_array (shape,eltType) -> - let baseT = convTypeAux emEnv preferCreated eltType |> nonNull "convType: array base" - let nDims = shape.Rank - // MakeArrayType() returns "eltType[]" - // MakeArrayType(1) returns "eltType[*]" - // MakeArrayType(2) returns "eltType[,]" - // MakeArrayType(3) returns "eltType[,,]" - // All non-equal. - if nDims=1 - then baseT.MakeArrayType() - else baseT.MakeArrayType shape.Rank - | Type_value tspec -> convTypeSpec emEnv preferCreated tspec |> nonNull "convType: value" - | Type_boxed tspec -> convTypeSpec emEnv preferCreated tspec |> nonNull "convType: boxed" - | Type_ptr eltType -> let baseT = convTypeAux emEnv preferCreated eltType |> nonNull "convType: ptr eltType" - baseT.MakePointerType() |> nonNull "convType: ptr" - | Type_byref eltType -> let baseT = convTypeAux emEnv preferCreated eltType |> nonNull "convType: byref eltType" - baseT.MakeByRefType() |> nonNull "convType: byref" - | Type_tyvar tv -> envGetTyvar emEnv tv |> nonNull "convType: tyvar" - // XXX: REVIEW: complete the following cases. - | Type_fptr callsig -> failwith "convType: fptr" - | Type_modified _ -> failwith "convType: modified" - -// [Bug 4063]. -// The convType functions convert AbsIL types into concrete Type values. -// The emitted types have (TypeBuilder:>Type) and (TypeBuilderInstantiation:>Type). -// These can be used to construct the concrete Type for a given AbsIL type. -// This is the convType function. -// Certain functions here, e.g. convMethodRef, convConstructorSpec assume they get the "Builders" for emitted types. -// -// The "lookupType" function (see end of file) provides AbsIL to Type lookup (post emit). -// The external use (reflection and pretty printing) requires the created Type (rather than the builder). -// convCreatedType ensures created types are used where possible. -// Note: typeBuilder.CreateType() freezes the type and makes a proper Type for the collected information. -//------ -// REVIEW: "convType becomes convCreatedType", the functions could be combined. -// If convCreatedType replaced convType functions like convMethodRef, convConstructorSpec, ... (and more?) -// will need to be fixed for emitted types to handle both TypeBuilder and later Type proper. - -/// Uses TypeBuilder/TypeBuilderInstantiation for emitted types -let convType emEnv typ = convTypeAux emEnv false typ - -/// Uses the .CreateType() for emitted type (if available) -let convCreatedType emEnv typ = convTypeAux emEnv true typ - - -//---------------------------------------------------------------------------- -// buildGenParams -//---------------------------------------------------------------------------- - -let buildGenParamsPass1 emEnv defineGenericParameters (gps : ILGenericParameterDefs) = - if verbose then dprintf "buildGenParamsPass1\n"; - match gps with - | [] -> () - | gps -> - let gpsNames = List.map (fun gp -> gp.gpName) gps - defineGenericParameters (Array.of_list gpsNames) |> ignore - - -let buildGenParamsPass1b emEnv (genArgs : Type array) (gps : ILGenericParameterDefs) = - if verbose then dprintf "buildGenParamsPass1b\n"; - let genpBs = genArgs |> Array.map (fun x -> (x :?> GenericTypeParameterBuilder)) - gps |> List.iteri (fun i (gp:ILGenericParameterDef) -> - let gpB = genpBs.[i] - // the Constraints are either the parent (base) type or interfaces. - let constraintTs = List.map (convType emEnv) gp.Constraints - let interfaceTs,baseTs = List.partition (fun (typ:System.Type) -> typ.IsInterface) constraintTs - // set base type constraint - (match baseTs with - [] -> () // Q: should a baseType be set? It is in some samples. Should this be a failure case? - | [baseT] -> gpB.SetBaseTypeConstraint(baseT) - | _ -> failwith "buildGenParam: multiple base types" - ); - // set interface contraints (interfaces that instances of gp must meet) - gpB.SetInterfaceConstraints(Array.of_list interfaceTs); - - let flags = GenericParameterAttributes.None - let flags = - match gp.gpVariance with - | NonVariant -> flags - | CoVariant -> flags ||| GenericParameterAttributes.Covariant - | ContraVariant -> flags ||| GenericParameterAttributes.Contravariant - - let flags = if gp.gpReferenceTypeConstraint then flags ||| GenericParameterAttributes.ReferenceTypeConstraint else flags - let flags = if gp.gpNotNullableValueTypeConstraint then flags ||| GenericParameterAttributes.NotNullableValueTypeConstraint else flags - let flags = if gp.gpDefaultConstructorConstraint then flags ||| GenericParameterAttributes.DefaultConstructorConstraint else flags - - gpB.SetGenericParameterAttributes(flags) - ) - -//---------------------------------------------------------------------------- -// convFieldInit -//---------------------------------------------------------------------------- - -let convFieldInit x = - match x with - | FieldInit_string s -> box s - | FieldInit_bool bool -> box bool - | FieldInit_char u16 -> box (char (int u16)) - | FieldInit_int8 i8 -> box i8 - | FieldInit_int16 i16 -> box i16 - | FieldInit_int32 i32 -> box i32 - | FieldInit_int64 i64 -> box i64 - | FieldInit_uint8 u8 -> box u8 - | FieldInit_uint16 u16 -> box u16 - | FieldInit_uint32 u32 -> box u32 - | FieldInit_uint64 u64 -> box u64 - | FieldInit_single ieee32 -> box ieee32 - | FieldInit_double ieee64 -> box ieee64 - | FieldInit_ref -> (null :> Object) - -//---------------------------------------------------------------------------- -// Some types require hard work... -//---------------------------------------------------------------------------- - -// This is gross. TypeBuilderInstantiation should really be a public type, since we -// have to use alternative means for various Method/Field/Constructor lookups. However since -// it isn't we resort to this technique... -let TypeBuilderInstantiationT = Type.GetType("System.Reflection.Emit.TypeBuilderInstantiation" ) - -let typeIsNotQueryable (typ : Type) = - (typ :? TypeBuilder) || ((typ.GetType()).Equals(TypeBuilderInstantiationT)) - -//---------------------------------------------------------------------------- -// convFieldSpec -//---------------------------------------------------------------------------- - -let queryableTypeGetField emEnv (parentT:Type) fref = - let tyargTs = getGenericArgumentsOfType parentT - parentT.GetField(fref.frefName, BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Instance ||| BindingFlags.Static ) - |> nonNull (sprintf "queryableTypeGetField: %O::%s" parentT fref.frefName) - -let nonQueryableTypeGetField (parentTI:Type) (fieldInfo : FieldInfo) : FieldInfo = - if parentTI.IsGenericType then TypeBuilder.GetField(parentTI,fieldInfo) else fieldInfo - - -let convFieldSpec emEnv fspec = - let fref = fspec.fspecFieldRef - let tref = fref.frefParent - let parentTI = convType emEnv fspec.fspecEnclosingType - if isEmittedTypeRef emEnv tref then - // NOTE: if "convType becomes convCreatedType", then handle queryable types here too. [bug 4063] (necessary? what repro?) - let fieldB = envGetFieldB emEnv fref - nonQueryableTypeGetField parentTI fieldB - else - // Prior type. - if typeIsNotQueryable parentTI then - let parentT = getTypeConstructor parentTI - let fieldInfo = queryableTypeGetField emEnv parentT fref - nonQueryableTypeGetField parentTI fieldInfo - else - queryableTypeGetField emEnv parentTI fspec.fspecFieldRef - -//---------------------------------------------------------------------------- -// convMethodRef -//---------------------------------------------------------------------------- - -let queryableTypeGetMethodBySearch emEnv parentT (mref:ILMethodRef) = - assert(not (typeIsNotQueryable(parentT))); - let cconv = (if mref.CallingConv.IsStatic then BindingFlags.Static else BindingFlags.Instance) - let methInfos = parentT.GetMethods(cconv ||| BindingFlags.Public ||| BindingFlags.NonPublic) |> Array.to_list - (* First, filter on name, if unique, then binding "done" *) - let tyargTs = getGenericArgumentsOfType parentT - let methInfos = methInfos |> List.filter (fun methInfo -> methInfo.Name = mref.Name) - match methInfos with - | [methInfo] -> - if verbose then dprintf "Got '%O::%s' by singluar name match\n" parentT mref.Name; - methInfo - | _ -> - (* Second, type match. Note type erased (non-generic) F# code would not type match but they have unique names *) - let select (methInfo:MethodInfo) = - let tyargTIs = tyargTs - (* mref implied Types *) - let mtyargTIs = getGenericArgumentsOfMethod methInfo - if Array.length mtyargTIs <> mref.GenericArity then false (* method generic arity mismatch *) else - let argTs,resT = - let emEnv = envPushTyvars emEnv (Array.append tyargTs mtyargTIs) - let argTs = List.map (convType emEnv) mref.ArgTypes - let resT = convType emEnv mref.ReturnType - argTs,resT - - (* methInfo implied Types *) - let haveArgTs = - let parameters = Array.to_list (methInfo.GetParameters()) - parameters |> List.map (fun param -> param.ParameterType) - - let haveResT = methInfo.ReturnType - (* check for match *) - if List.length argTs <> List.length haveArgTs then false (* method argument length mismatch *) else - let res = equalTypeLists (resT::argTs) (haveResT::haveArgTs) - res - - match List.tryfind select methInfos with - | None -> failwith "convMethodRef: could not bind to method" - | Some methInfo -> methInfo (* return MethodInfo for (generic) type's (generic) method *) - |> nonNull "convMethodRef" - -let queryableTypeGetMethod emEnv parentT (mref:ILMethodRef) = - assert(not (typeIsNotQueryable(parentT))); - if mref.GenericArity = 0 then - let tyargTs = getGenericArgumentsOfType parentT - let argTs,resT = - let emEnv = envPushTyvars emEnv tyargTs - let argTs = Array.of_list (List.map (convType emEnv) mref.ArgTypes) - let resT = convType emEnv mref.ReturnType - argTs,resT - let stat = mref.CallingConv.IsStatic - if verbose then dprintf "Using GetMethod to get '%O::%s', static = %b, parentT = %s\n" parentT mref.Name stat parentT.AssemblyQualifiedName; - argTs |> Array.iteri (fun i ty -> if verbose then dprintf "arg %d = %O\n" i ty); - let cconv = (if stat then BindingFlags.Static else BindingFlags.Instance) - let methInfo = - try - parentT.GetMethod(mref.Name,cconv ||| BindingFlags.Public ||| BindingFlags.NonPublic, - null, - argTs, - (null:ParameterModifier[])) - // This can fail if there is an ambiguity w.r.t. return type - with _ -> null - if (isNonNull methInfo && equalTypes resT methInfo.ReturnType) then - (if verbose then dprintf "Got method '%O' using GetMethod, resT = %O, haveResT = %O\n" methInfo resT methInfo.ReturnType; - methInfo) - else - (if verbose then dprintf "**** Failed lookup or Incorrect return type for '%O' using GetMethod\n" methInfo; - queryableTypeGetMethodBySearch emEnv parentT mref) - else - if verbose then dprintf "Using queryableTypeGetMethodBySearch to get '%O::%s'\n" parentT mref.Name; - queryableTypeGetMethodBySearch emEnv parentT mref - -let nonQueryableTypeGetMethod (parentTI:Type) (methInfo : MethodInfo) : MethodInfo = - if (parentTI.IsGenericType && - not (equalTypes parentTI (getTypeConstructor parentTI))) - then TypeBuilder.GetMethod(parentTI,methInfo ) - else methInfo - -let convMethodRef emEnv (parentTI:Type) (mref:ILMethodRef) = - if verbose then dprintf "- convMethodRef %s %s\n" mref.EnclosingTypeRef.Name mref.Name; - let parent = mref.EnclosingTypeRef - if isEmittedTypeRef emEnv parent then - // NOTE: if "convType becomes convCreatedType", then handle queryable types here too. [bug 4063] - // Emitted type, can get fully generic MethodBuilder from env. - let methB = envGetMethB emEnv mref - if verbose then dprintf "- convMethodRef, isEmitted = true\n"; - nonQueryableTypeGetMethod parentTI methB - |> nonNull "convMethodRef (emitted)" - else - // Prior type. - if typeIsNotQueryable parentTI then - let parentT = getTypeConstructor parentTI - let methInfo = queryableTypeGetMethod emEnv parentT mref - nonQueryableTypeGetMethod parentTI methInfo - else - queryableTypeGetMethod emEnv parentTI mref - -//---------------------------------------------------------------------------- -// convMethodSpec -//---------------------------------------------------------------------------- - -let convMethodSpec emEnv (mspec:ILMethodSpec) = - if verbose then dprintf "- convMethodSpec %s with inst=%d\n" mspec.Name mspec.GenericArgs.Length; - let typT = convType emEnv mspec.EnclosingType (* (instanced) parent Type *) - let methInfo = convMethodRef emEnv typT mspec.MethodRef (* (generic) method of (generic) parent *) - if verbose then dprintf "- convMethodSpec, methInfo = %A\n" methInfo; - let methInfo = - if mspec.GenericArgs = [] then - methInfo // non generic - else - let minstTs = Array.of_list (List.map (convType emEnv) mspec.GenericArgs) - let methInfo = methInfo.MakeGenericMethod minstTs // instantiate method - if verbose then dprintf "- convMethodSpec (after MakeGenericMethod), methInfo = %A\n" methInfo; - methInfo - methInfo |> nonNull "convMethodSpec" - -//---------------------------------------------------------------------------- -// - QueryableTypeGetConstructors: get a constructor on a non-TypeBuilder type -//---------------------------------------------------------------------------- - -let queryableTypeGetConstructor emEnv (parentT:Type) (mref:ILMethodRef) = - let tyargTs = getGenericArgumentsOfType parentT - let reqArgTs = - let emEnv = envPushTyvars emEnv tyargTs - Array.of_list (List.map (convType emEnv) mref.ArgTypes) - parentT.GetConstructor(BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Instance, - null, - reqArgTs, - null) - -let nonQueryableTypeGetConstructor (parentTI:Type) (consInfo : ConstructorInfo) : ConstructorInfo = - if parentTI.IsGenericType then TypeBuilder.GetConstructor(parentTI,consInfo) else consInfo - -//---------------------------------------------------------------------------- -// convConstructorSpec (like convMethodSpec) -//---------------------------------------------------------------------------- - -let convConstructorSpec emEnv (mspec:ILMethodSpec) = - if verbose then dprintf "- convConstructorSpec %s %s with inst=%d\n" (mspec.MethodRef.EnclosingTypeRef.Name) mspec.Name (List.length mspec.GenericArgs); - let mref = mspec.MethodRef - let parentTI = convType emEnv mspec.EnclosingType - if verbose then dprintf "- convConstructorSpec: prior type, parentTI = %O\n" parentTI; - if isEmittedTypeRef emEnv mref.EnclosingTypeRef then - // NOTE: if "convType becomes convCreatedType", then handle queryable types here too. [bug 4063] - let consB = envGetConsB emEnv mref - nonQueryableTypeGetConstructor parentTI consB |> nonNull "convConstructorSpec: (emitted)" - else - // Prior type. - if typeIsNotQueryable parentTI then - let parentT = getTypeConstructor parentTI - let ctorG = queryableTypeGetConstructor emEnv parentT mref - nonQueryableTypeGetConstructor parentTI ctorG - else - queryableTypeGetConstructor emEnv parentTI mref - -//---------------------------------------------------------------------------- -// emitLabelMark, defineLabel -//---------------------------------------------------------------------------- - -let emitLabelMark emEnv (ilG:ILGenerator) (label:ILCodeLabel) = - //if verbose then dprintf "- emitLabelMark %s\n" (label:string); - let lab = envGetLabel emEnv label - ilG.MarkLabel(lab) - -let defineLabel (ilG:ILGenerator) emEnv (label:ILCodeLabel) = - //if verbose then dprintf "- defineLabel %s\n" (label:string); - let lab = ilG.DefineLabel() - envSetLabel emEnv label lab - -//---------------------------------------------------------------------------- -// emitCustomAttrs -//---------------------------------------------------------------------------- - -let convCustomAttr emEnv cattr = - let methInfo = - match convConstructorSpec emEnv cattr.customMethod with - | null -> failwithf "convCustomAttr: %A" cattr.customMethod - | res -> res - let data = cattr.customData - (methInfo,data) - -let emitCustomAttr emEnv add cattr = add (convCustomAttr emEnv cattr) -let emitCustomAttrs emEnv add cattrs = List.iter (emitCustomAttr emEnv add) (dest_custom_attrs cattrs) - -//---------------------------------------------------------------------------- -// emitInstr cenv - I_arith -//---------------------------------------------------------------------------- - -let rec emitInstrI_arith emEnv (ilG:ILGenerator) x = - match x with - | AI_add -> ilG.Emit(OpCodes.Add) - | AI_add_ovf -> ilG.Emit(OpCodes.Add_Ovf) - | AI_add_ovf_un -> ilG.Emit(OpCodes.Add_Ovf_Un) - | AI_and -> ilG.Emit(OpCodes.And) - | AI_div -> ilG.Emit(OpCodes.Div) - | AI_div_un -> ilG.Emit(OpCodes.Div_Un) - | AI_ceq -> ilG.Emit(OpCodes.Ceq) - | AI_cgt -> ilG.Emit(OpCodes.Cgt) - | AI_cgt_un -> ilG.Emit(OpCodes.Cgt_Un) - | AI_clt -> ilG.Emit(OpCodes.Clt) - | AI_clt_un -> ilG.Emit(OpCodes.Clt_Un) - (* conversion *) - | AI_conv dt -> (match dt with - | DT_I -> ilG.Emit(OpCodes.Conv_I) - | DT_I1 -> ilG.Emit(OpCodes.Conv_I1) - | DT_I2 -> ilG.Emit(OpCodes.Conv_I2) - | DT_I4 -> ilG.Emit(OpCodes.Conv_I4) - | DT_I8 -> ilG.Emit(OpCodes.Conv_I8) - | DT_U -> ilG.Emit(OpCodes.Conv_U) - | DT_U1 -> ilG.Emit(OpCodes.Conv_U1) - | DT_U2 -> ilG.Emit(OpCodes.Conv_U2) - | DT_U4 -> ilG.Emit(OpCodes.Conv_U4) - | DT_U8 -> ilG.Emit(OpCodes.Conv_U8) - | DT_R -> ilG.Emit(OpCodes.Conv_R_Un) - | DT_R4 -> ilG.Emit(OpCodes.Conv_R4) - | DT_R8 -> ilG.Emit(OpCodes.Conv_R8) - | DT_REF -> failwith "AI_conv DT_REF?" // XXX - check - ) - (* conversion - ovf checks *) - | AI_conv_ovf dt -> (match dt with - | DT_I -> ilG.Emit(OpCodes.Conv_Ovf_I) - | DT_I1 -> ilG.Emit(OpCodes.Conv_Ovf_I1) - | DT_I2 -> ilG.Emit(OpCodes.Conv_Ovf_I2) - | DT_I4 -> ilG.Emit(OpCodes.Conv_Ovf_I4) - | DT_I8 -> ilG.Emit(OpCodes.Conv_Ovf_I8) - | DT_U -> ilG.Emit(OpCodes.Conv_Ovf_U) - | DT_U1 -> ilG.Emit(OpCodes.Conv_Ovf_U1) - | DT_U2 -> ilG.Emit(OpCodes.Conv_Ovf_U2) - | DT_U4 -> ilG.Emit(OpCodes.Conv_Ovf_U4) - | DT_U8 -> ilG.Emit(OpCodes.Conv_Ovf_U8) - | DT_R -> failwith "AI_conv_ovf DT_R?" // XXX - check - | DT_R4 -> failwith "AI_conv_ovf DT_R4?" // XXX - check - | DT_R8 -> failwith "AI_conv_ovf DT_R8?" // XXX - check - | DT_REF -> failwith "AI_conv_ovf DT_REF?" // XXX - check - ) - (* conversion - ovf checks and unsigned *) - | AI_conv_ovf_un dt -> (match dt with - | DT_I -> ilG.Emit(OpCodes.Conv_Ovf_I_Un) - | DT_I1 -> ilG.Emit(OpCodes.Conv_Ovf_I1_Un) - | DT_I2 -> ilG.Emit(OpCodes.Conv_Ovf_I2_Un) - | DT_I4 -> ilG.Emit(OpCodes.Conv_Ovf_I4_Un) - | DT_I8 -> ilG.Emit(OpCodes.Conv_Ovf_I8_Un) - | DT_U -> ilG.Emit(OpCodes.Conv_Ovf_U_Un) - | DT_U1 -> ilG.Emit(OpCodes.Conv_Ovf_U1_Un) - | DT_U2 -> ilG.Emit(OpCodes.Conv_Ovf_U2_Un) - | DT_U4 -> ilG.Emit(OpCodes.Conv_Ovf_U4_Un) - | DT_U8 -> ilG.Emit(OpCodes.Conv_Ovf_U8_Un) - | DT_R -> failwith "AI_conv_ovf_un DT_R?" // XXX - check - | DT_R4 -> failwith "AI_conv_ovf_un DT_R4?" // XXX - check - | DT_R8 -> failwith "AI_conv_ovf_un DT_R8?" // XXX - check - | DT_REF -> failwith "AI_conv_ovf_un DT_REF?" // XXX - check - ) - | AI_mul -> ilG.Emit(OpCodes.Mul) - | AI_mul_ovf -> ilG.Emit(OpCodes.Mul_Ovf) - | AI_mul_ovf_un -> ilG.Emit(OpCodes.Mul_Ovf_Un) - | AI_rem -> ilG.Emit(OpCodes.Rem) - | AI_rem_un -> ilG.Emit(OpCodes.Rem_Un) - | AI_shl -> ilG.Emit(OpCodes.Shl) - | AI_shr -> ilG.Emit(OpCodes.Shr) - | AI_shr_un -> ilG.Emit(OpCodes.Shr_Un) - | AI_sub -> ilG.Emit(OpCodes.Sub) - | AI_sub_ovf -> ilG.Emit(OpCodes.Sub_Ovf) - | AI_sub_ovf_un -> ilG.Emit(OpCodes.Sub_Ovf_Un) - | AI_xor -> ilG.Emit(OpCodes.Xor) - | AI_or -> ilG.Emit(OpCodes.Or) - | AI_neg -> ilG.Emit(OpCodes.Neg) - | AI_not -> ilG.Emit(OpCodes.Not) - | AI_ldnull -> ilG.Emit(OpCodes.Ldnull) - | AI_dup -> ilG.Emit(OpCodes.Dup) - | AI_pop -> ilG.Emit(OpCodes.Pop) - | AI_ckfinite -> ilG.Emit(OpCodes.Ckfinite) - | AI_nop -> ilG.Emit(OpCodes.Nop) - | AI_ldc (DT_I4,NUM_I4 i32) -> ilG.Emit(OpCodes.Ldc_I4,i32) - | AI_ldc (DT_I8,NUM_I8 i64) -> ilG.Emit(OpCodes.Ldc_I8,i64) - | AI_ldc (DT_R4,NUM_R4 r32) -> ilG.Emit(OpCodes.Ldc_R4,r32) - | AI_ldc (DT_R8,NUM_R8 r64) -> ilG.Emit(OpCodes.Ldc_R8,r64) - | AI_ldc (_ ,_ ) -> failwith "emitInstrI_arith (AI_ldc (typ,const)) iltyped" - - -///Emit comparison instructions -let emitInstrCompare emEnv (ilG:ILGenerator) comp targ = - match comp with - | BI_beq -> ilG.Emit(OpCodes.Beq ,envGetLabel emEnv targ) - | BI_bge -> ilG.Emit(OpCodes.Bge ,envGetLabel emEnv targ) - | BI_bge_un -> ilG.Emit(OpCodes.Bge_Un ,envGetLabel emEnv targ) - | BI_bgt -> ilG.Emit(OpCodes.Bgt ,envGetLabel emEnv targ) - | BI_bgt_un -> ilG.Emit(OpCodes.Bgt_Un ,envGetLabel emEnv targ) - | BI_ble -> ilG.Emit(OpCodes.Ble ,envGetLabel emEnv targ) - | BI_ble_un -> ilG.Emit(OpCodes.Ble_Un ,envGetLabel emEnv targ) - | BI_blt -> ilG.Emit(OpCodes.Blt ,envGetLabel emEnv targ) - | BI_blt_un -> ilG.Emit(OpCodes.Blt_Un ,envGetLabel emEnv targ) - | BI_bne_un -> ilG.Emit(OpCodes.Bne_Un ,envGetLabel emEnv targ) - | BI_brfalse -> ilG.Emit(OpCodes.Brfalse,envGetLabel emEnv targ) - | BI_brtrue -> ilG.Emit(OpCodes.Brtrue ,envGetLabel emEnv targ) - - -/// Emit the volatile. prefix -let emitInstrVolatile (ilG:ILGenerator) = function - | Volatile -> ilG.Emit(OpCodes.Volatile) - | Nonvolatile -> () - -/// Emit the align. prefix -let emitInstrAlign (ilG:ILGenerator) = function - | Aligned -> () - | Unaligned_1 -> ilG.Emit(OpCodes.Unaligned,1L) // note: doc says use "long" overload! - | Unaligned_2 -> ilG.Emit(OpCodes.Unaligned,2L) - | Unaligned_4 -> ilG.Emit(OpCodes.Unaligned,3L) - -/// Emit the tail. prefix if necessary -let emitInstrTail (ilG:ILGenerator) tail emitTheCall = - match tail with - | Tailcall -> ilG.Emit(OpCodes.Tailcall); emitTheCall(); ilG.Emit(OpCodes.Ret) - | Normalcall -> emitTheCall() - -let emitInstrNewobj emEnv (ilG:ILGenerator) mspec varargs = - match varargs with - | None -> ilG.Emit(OpCodes.Newobj,convConstructorSpec emEnv mspec) - | Some vartyps -> failwith "emit: pending new varargs" // XXX - gap - -let emitInstrCall emEnv (ilG:ILGenerator) opCall tail (mspec:ILMethodSpec) varargs = - if verbose then dprintf "emitInstrCall\n"; - emitInstrTail ilG tail (fun () -> - if mspec.MethodRef.Name = ".ctor" || mspec.MethodRef.Name = ".cctor" then - let cinfo = convConstructorSpec emEnv mspec - match varargs with - | None -> ilG.Emit (opCall,cinfo) - | Some vartyps -> failwith "emitInstrCall: .ctor and varargs" - else - let minfo = convMethodSpec emEnv mspec - match varargs with - | None -> ilG.Emit (opCall,minfo) - | Some vartyps -> ilG.EmitCall (opCall,minfo,Array.of_list (List.map (convType emEnv) vartyps)) - ) - - -//---------------------------------------------------------------------------- -// emitInstr cenv -//---------------------------------------------------------------------------- - -let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = - match instr with - | I_arith ainstr -> emitInstrI_arith emEnv ilG ainstr - | I_ldarg u16 -> ilG.Emit(OpCodes.Ldarg ,int16 u16) - | I_ldarga u16 -> ilG.Emit(OpCodes.Ldarga,int16 u16) - | I_ldind (align,vol,dt) -> emitInstrAlign ilG align; - emitInstrVolatile ilG vol; - (match dt with - | DT_I -> ilG.Emit(OpCodes.Ldind_I) - | DT_I1 -> ilG.Emit(OpCodes.Ldind_I1) - | DT_I2 -> ilG.Emit(OpCodes.Ldind_I2) - | DT_I4 -> ilG.Emit(OpCodes.Ldind_I4) - | DT_I8 -> ilG.Emit(OpCodes.Ldind_I8) - | DT_R -> failwith "emitInstr cenv: ldind R" - | DT_R4 -> ilG.Emit(OpCodes.Ldind_R4) - | DT_R8 -> ilG.Emit(OpCodes.Ldind_R8) - | DT_U -> failwith "emitInstr cenv: ldind U" - | DT_U1 -> ilG.Emit(OpCodes.Ldind_U1) - | DT_U2 -> ilG.Emit(OpCodes.Ldind_U2) - | DT_U4 -> ilG.Emit(OpCodes.Ldind_U4) - | DT_U8 -> failwith "emitInstr cenv: ldind U8" - | DT_REF -> ilG.Emit(OpCodes.Ldind_Ref)) - | I_ldloc u16 -> ilG.Emit(OpCodes.Ldloc ,int16 u16) - | I_ldloca u16 -> ilG.Emit(OpCodes.Ldloca,int16 u16) - | I_starg u16 -> ilG.Emit(OpCodes.Starg ,int16 u16) - | I_stind (align,vol,dt) -> emitInstrAlign ilG align; - emitInstrVolatile ilG vol; - (match dt with - | DT_I -> ilG.Emit(OpCodes.Stind_I) - | DT_I1 -> ilG.Emit(OpCodes.Stind_I1) - | DT_I2 -> ilG.Emit(OpCodes.Stind_I2) - | DT_I4 -> ilG.Emit(OpCodes.Stind_I4) - | DT_I8 -> ilG.Emit(OpCodes.Stind_I8) - | DT_R -> failwith "emitInstr cenv: stind R" - | DT_R4 -> ilG.Emit(OpCodes.Stind_R4) - | DT_R8 -> ilG.Emit(OpCodes.Stind_R8) - | DT_U -> ilG.Emit(OpCodes.Stind_I) // NOTE: unsigned -> int conversion - | DT_U1 -> ilG.Emit(OpCodes.Stind_I1) // NOTE: follows code ilwrite.ml - | DT_U2 -> ilG.Emit(OpCodes.Stind_I2) // NOTE: is it ok? - | DT_U4 -> ilG.Emit(OpCodes.Stind_I4) // NOTE: it is generated by bytearray tests - | DT_U8 -> ilG.Emit(OpCodes.Stind_I8) // NOTE: unsigned -> int conversion - | DT_REF -> ilG.Emit(OpCodes.Stind_Ref)) - | I_stloc u16 -> ilG.Emit(OpCodes.Stloc,int16 u16) - | I_br label -> ilG.Emit(OpCodes.Br,envGetLabel emEnv label) - | I_jmp mspec -> let methInfo = convMethodSpec emEnv mspec - ilG.Emit(OpCodes.Jmp,methInfo) - | I_brcmp (comp,targ,fall) -> emitInstrCompare emEnv ilG comp targ; - ilG.Emit(OpCodes.Br,envGetLabel emEnv fall) // XXX - very likely to be the next instruction... - | I_switch (labels,next) -> ilG.Emit(OpCodes.Switch,Array.of_list (List.map (envGetLabel emEnv) labels)); - ilG.Emit(OpCodes.Br,envGetLabel emEnv next) // XXX - very likely to be the next instruction... - | I_ret -> ilG.Emit(OpCodes.Ret) - | I_call (tail,mspec,varargs) -> emitInstrCall emEnv ilG OpCodes.Call tail mspec varargs - | I_callvirt (tail,mspec,varargs) -> emitInstrCall emEnv ilG OpCodes.Callvirt tail mspec varargs - | I_callconstraint (tail,typ,mspec,varargs) -> ilG.Emit(OpCodes.Constrained,convType emEnv typ); - emitInstrCall emEnv ilG OpCodes.Callvirt tail mspec varargs - | I_calli (tail,callsig,None) -> emitInstrTail ilG tail (fun () -> - ilG.EmitCalli(OpCodes.Calli, - convCallConv callsig.callsigCallconv, - convType emEnv callsig.callsigReturn, - Array.of_list (List.map (convType emEnv) callsig.callsigArgs), - Array.of_list [])) - | I_calli (tail,callsig,Some vartyps) -> emitInstrTail ilG tail (fun () -> - ilG.EmitCalli(OpCodes.Calli, - convCallConv callsig.callsigCallconv, - convType emEnv callsig.callsigReturn, - Array.of_list (List.map (convType emEnv) callsig.callsigArgs), - Array.of_list (List.map (convType emEnv) vartyps))) - | I_ldftn mspec -> ilG.Emit(OpCodes.Ldftn,convMethodSpec emEnv mspec) - | I_newobj (mspec,varargs) -> emitInstrNewobj emEnv ilG mspec varargs - | I_throw -> ilG.Emit(OpCodes.Throw) - | I_endfinally -> ilG.Emit(OpCodes.Endfinally) (* capitalization! *) - | I_endfilter -> () (* ilG.Emit(OpCodes.Endfilter) *) - | I_leave label -> ilG.Emit(OpCodes.Leave,envGetLabel emEnv label) - | I_ldsfld (vol,fspec) -> emitInstrVolatile ilG vol; ilG.Emit(OpCodes.Ldsfld ,convFieldSpec emEnv fspec) - | I_ldfld (align,vol,fspec) -> emitInstrAlign ilG align; emitInstrVolatile ilG vol; ilG.Emit(OpCodes.Ldfld ,convFieldSpec emEnv fspec) - | I_ldsflda fspec -> ilG.Emit(OpCodes.Ldsflda,convFieldSpec emEnv fspec) - | I_ldflda fspec -> ilG.Emit(OpCodes.Ldflda ,convFieldSpec emEnv fspec) - | I_stsfld (vol,fspec) -> emitInstrVolatile ilG vol; ilG.Emit(OpCodes.Stsfld ,convFieldSpec emEnv fspec) - | I_stfld (align,vol,fspec) -> emitInstrAlign ilG align; emitInstrVolatile ilG vol; ilG.Emit(OpCodes.Stfld ,convFieldSpec emEnv fspec) - | I_ldstr s -> ilG.Emit(OpCodes.Ldstr ,s) - | I_isinst typ -> ilG.Emit(OpCodes.Isinst ,convType emEnv typ) - | I_castclass typ -> ilG.Emit(OpCodes.Castclass,convType emEnv typ) - | I_ldtoken (Token_type typ) -> ilG.Emit(OpCodes.Ldtoken ,convType emEnv typ) - | I_ldtoken (Token_method mspec) -> ilG.Emit(OpCodes.Ldtoken ,convMethodSpec emEnv mspec) - | I_ldtoken (Token_field fspec) -> ilG.Emit(OpCodes.Ldtoken ,convFieldSpec emEnv fspec) - | I_ldvirtftn mspec -> ilG.Emit(OpCodes.Ldvirtftn,convMethodSpec emEnv mspec) - (* Value type instructions *) - | I_cpobj typ -> ilG.Emit(OpCodes.Cpobj ,convType emEnv typ) - | I_initobj typ -> ilG.Emit(OpCodes.Initobj ,convType emEnv typ) - | I_ldobj (align,vol,typ) -> emitInstrAlign ilG align; emitInstrVolatile ilG vol; ilG.Emit(OpCodes.Ldobj ,convType emEnv typ) - | I_stobj (align,vol,typ) -> emitInstrAlign ilG align; emitInstrVolatile ilG vol; ilG.Emit(OpCodes.Stobj ,convType emEnv typ) - | I_box typ -> ilG.Emit(OpCodes.Box ,convType emEnv typ) - | I_unbox typ -> ilG.Emit(OpCodes.Unbox ,convType emEnv typ) - | I_unbox_any typ -> ilG.Emit(OpCodes.Unbox_Any,convType emEnv typ) - | I_sizeof typ -> ilG.Emit(OpCodes.Sizeof ,convType emEnv typ) - // Generalized array instructions. - // In AbsIL these instructions include - // both the single-dimensional variants (with ILArrayShape == Rank1ArrayShape) - // and calls to the "special" multi-dimensional "methods" such as - // newobj void string[,]::.ctor(int32, int32) - // call string string[,]::Get(int32, int32) - // call string& string[,]::Address(int32, int32) - // call void string[,]::Set(int32, int32,string) - // The IL reader transforms calls of this form to the corresponding - // generalized instruction with the corresponding ILArrayShape - // argument. This is done to simplify the IL and make it more uniform. - // The IL writer then reverses this when emitting the binary. - | I_ldelem dt -> (match dt with - | DT_I -> ilG.Emit(OpCodes.Ldelem_I) - | DT_I1 -> ilG.Emit(OpCodes.Ldelem_I1) - | DT_I2 -> ilG.Emit(OpCodes.Ldelem_I2) - | DT_I4 -> ilG.Emit(OpCodes.Ldelem_I4) - | DT_I8 -> ilG.Emit(OpCodes.Ldelem_I8) - | DT_R -> failwith "emitInstr cenv: ldelem R" - | DT_R4 -> ilG.Emit(OpCodes.Ldelem_R4) - | DT_R8 -> ilG.Emit(OpCodes.Ldelem_R8) - | DT_U -> failwith "emitInstr cenv: ldelem U" - | DT_U1 -> ilG.Emit(OpCodes.Ldelem_U1) - | DT_U2 -> ilG.Emit(OpCodes.Ldelem_U2) - | DT_U4 -> ilG.Emit(OpCodes.Ldelem_U4) - | DT_U8 -> failwith "emitInstr cenv: ldelem U8" - | DT_REF -> ilG.Emit(OpCodes.Ldelem_Ref)) - | I_stelem dt -> (match dt with - | DT_I -> ilG.Emit(OpCodes.Stelem_I) - | DT_I1 -> ilG.Emit(OpCodes.Stelem_I1) - | DT_I2 -> ilG.Emit(OpCodes.Stelem_I2) - | DT_I4 -> ilG.Emit(OpCodes.Stelem_I4) - | DT_I8 -> ilG.Emit(OpCodes.Stelem_I8) - | DT_R -> failwith "emitInstr cenv: stelem R" - | DT_R4 -> ilG.Emit(OpCodes.Stelem_R4) - | DT_R8 -> ilG.Emit(OpCodes.Stelem_R8) - | DT_U -> failwith "emitInstr cenv: stelem U" - | DT_U1 -> failwith "emitInstr cenv: stelem U1" - | DT_U2 -> failwith "emitInstr cenv: stelem U2" - | DT_U4 -> failwith "emitInstr cenv: stelem U4" - | DT_U8 -> failwith "emitInstr cenv: stelem U8" - | DT_REF -> ilG.Emit(OpCodes.Stelem_Ref)) - | I_ldelema (ro,shape,typ) -> - if (ro = ReadonlyAddress) then ilG.Emit(OpCodes.Readonly); - if (shape = Rank1ArrayShape) - then ilG.Emit(OpCodes.Ldelema,convType emEnv typ) - else - let aty = convType emEnv (Type_array(shape,typ)) - let ety = aty.GetElementType() - let rty = ety.MakeByRefType() - let meth = modB.GetArrayMethod(aty,"Address",System.Reflection.CallingConventions.HasThis,rty,Array.create shape.Rank (typeof) ) - ilG.Emit(OpCodes.Call,meth) - | I_ldelem_any (shape,typ) -> - if (shape = Rank1ArrayShape) then ilG.Emit(OpCodes.Ldelem,convType emEnv typ) - else - let aty = convType emEnv (Type_array(shape,typ)) - let ety = aty.GetElementType() - let meth = modB.GetArrayMethod(aty,"Get",System.Reflection.CallingConventions.HasThis,ety,Array.create shape.Rank (typeof) ) - ilG.Emit(OpCodes.Call,meth) - | I_stelem_any (shape,typ) -> - if (shape = Rank1ArrayShape) then ilG.Emit(OpCodes.Stelem,convType emEnv typ) - else - let aty = convType emEnv (Type_array(shape,typ)) - let ety = aty.GetElementType() - let meth = modB.GetArrayMethod(aty,"Set",System.Reflection.CallingConventions.HasThis,(null:Type),Array.append (Array.create shape.Rank (typeof)) (Array.of_list [ ety ])) - ilG.Emit(OpCodes.Call,meth) - | I_newarr (shape,typ) -> - if (shape = Rank1ArrayShape) - then ilG.Emit(OpCodes.Newarr,convType emEnv typ) - else - let aty = convType emEnv (Type_array(shape,typ)) - let ety = aty.GetElementType() - let meth = modB.GetArrayMethod(aty,".ctor",System.Reflection.CallingConventions.HasThis,(null:Type),Array.create shape.Rank (typeof)) - ilG.Emit(OpCodes.Newobj,meth) - | I_ldlen -> ilG.Emit(OpCodes.Ldlen) - | I_mkrefany typ -> ilG.Emit(OpCodes.Mkrefany,convType emEnv typ) - | I_refanytype -> ilG.Emit(OpCodes.Refanytype) - | I_refanyval typ -> ilG.Emit(OpCodes.Refanyval,convType emEnv typ) - | I_rethrow -> ilG.Emit(OpCodes.Rethrow) - | I_break -> ilG.Emit(OpCodes.Break) - | I_seqpoint src -> - if cenv.generate_pdb && not (src.Document.File.EndsWith("stdin",StringComparison.Ordinal)) then - let guid x = match x with None -> Guid.Empty | Some g -> Guid(g:byte[]) in - let symDoc = modB.DefineDocument(src.Document.File, guid src.Document.Language, guid src.Document.Vendor, guid src.Document.DocumentType) - ilG.MarkSequencePoint(symDoc, src.Line, src.Column, src.EndLine, src.EndColumn) - | I_arglist -> ilG.Emit(OpCodes.Arglist) - | I_localloc -> ilG.Emit(OpCodes.Localloc) - | I_cpblk (align,vol) -> emitInstrAlign ilG align; - emitInstrVolatile ilG vol; - ilG.Emit(OpCodes.Cpblk) - | I_initblk (align,vol) -> emitInstrAlign ilG align; - emitInstrVolatile ilG vol; - ilG.Emit(OpCodes.Initblk) - | EI_ldlen_multi (n,m) -> - emitInstr cenv modB emEnv ilG (mk_ldc_i32 m); - emitInstr cenv modB emEnv ilG (mk_normal_call(mk_nongeneric_mspec_in_typ(cenv.ilg.typ_Array, ILCallingConv.Instance, "GetLength", [cenv.ilg.typ_int32], cenv.ilg.typ_int32))) - | I_other e when is_ilx_ext_instr e -> Printf.failwithf "the ILX instruction %s cannot be emitted" (e.ToString()) - | i -> Printf.failwithf "the IL instruction %s cannot be emitted" (i.ToString()) - -//---------------------------------------------------------------------------- -// emitCode -//---------------------------------------------------------------------------- - -let emitBasicBlock cenv modB emEnv (ilG:ILGenerator) bblock = - if verbose then dprintf "emitBasicBlock cenv\n"; - emitLabelMark emEnv ilG bblock.bblockLabel; - Array.iter (emitInstr cenv modB emEnv ilG) bblock.bblockInstrs; - () - -let emitCode cenv modB emEnv (ilG:ILGenerator) code = - if verbose then dprintf "emitCode cenv\n"; - // pre define labels pending determining their actual marks - let labels = labels_of_code code - //List.iter (fun lab -> if verbose then dprintf "Label %s \n" lab) labels; - let emEnv = List.fold (defineLabel ilG) emEnv labels - let rec emitter = function - | ILBasicBlock bblock -> emitBasicBlock cenv modB emEnv ilG bblock - | GroupBlock (localDebugInfos,codes) -> if verbose then dprintf "emitGroupBlock\n"; - List.iter emitter codes - | RestrictBlock (labels,code) -> if verbose then dprintf "emitRestrictBlock\n"; - emitter code (* restrictions ignorable: code_labels unique *) - | TryBlock (code,seh) -> - if verbose then dprintf "emitTryBlock: start\n"; - let endExBlockL = ilG.BeginExceptionBlock() - emitter code; - //ilG.MarkLabel endExBlockL; - emitHandler seh; - ilG.EndExceptionBlock(); - if verbose then dprintf "emitTryBlock: done\n" - and emitHandler seh = - if verbose then dprintf "emitHandler\n"; - match seh with - | FaultBlock code -> ilG.BeginFaultBlock(); emitter code - | FinallyBlock code -> ilG.BeginFinallyBlock(); emitter code - | FilterCatchBlock fcodes -> - let emitFilter (filter,code) = - match filter with - | TypeFilter typ -> - ilG.BeginCatchBlock (convType emEnv typ); - emitter code - | CodeFilter test -> - ilG.BeginExceptFilterBlock(); - emitter test; - ilG.BeginCatchBlock null; - emitter code - fcodes |> List.iter emitFilter - emitter code - -//---------------------------------------------------------------------------- -// emitILMethodBody -//---------------------------------------------------------------------------- - -let emitLocal emEnv (ilG : ILGenerator) local = - ilG.DeclareLocal(convType emEnv local.localType,local.localPinned) - -let emitILMethodBody cenv modB emEnv (ilG:ILGenerator) ilmbody = - // XXX - REVIEW: - // ilNoInlining: bool; - // ilSource: source option } - if verbose then dprintf "emitILMethodBody cenv: start\n"; - // emit locals and record emEnv - let localBs = List.map (emitLocal emEnv ilG) ilmbody.ilLocals - let emEnv = envSetLocals emEnv (Array.of_list localBs) - emitCode cenv modB emEnv ilG ilmbody.ilCode; - if verbose then dprintf "emitILMethodBody cenv: end\n" - -//---------------------------------------------------------------------------- -// emitMethodBody -//---------------------------------------------------------------------------- - -let emitMethodBody cenv modB emEnv ilG name mbody = - match dest_mbody mbody with - | MethodBody_il ilmbody -> emitILMethodBody cenv modB emEnv (ilG()) ilmbody - | MethodBody_pinvoke pinvoke -> () (* Printf.printf "EMIT: pinvoke method %s\n" name *) (* XXX - check *) - | MethodBody_abstract -> () (* Printf.printf "EMIT: abstract method %s\n" name *) (* XXX - check *) - | MethodBody_native -> failwith "emitMethodBody cenv: native" (* XXX - gap *) - -//---------------------------------------------------------------------------- -// emitParameter -//---------------------------------------------------------------------------- - -let emitParameter emEnv (defineParameter : int * ParameterAttributes * string -> ParameterBuilder) i param = - // -paramType: typ; - // -paramDefault: ILFieldInit option; - // -paramMarshal: NativeType option; (* Marshalling map for parameters. COM Interop only. *) - if verbose then dprintf "emitParameter %s\n" (match param.paramName with Some n -> n | None -> "anon"); - let attrs = flagsIf param.paramIn ParameterAttributes.In ||| - flagsIf param.paramOut ParameterAttributes.Out ||| - flagsIf param.paramOptional ParameterAttributes.Optional - let name = match param.paramName with - | Some name -> name - | None -> "X"^string(i+1) - - let parB = defineParameter(i,attrs,name) - emitCustomAttrs emEnv (fun (x,y) -> parB.SetCustomAttribute(x,y)) param.paramCustomAttrs - -//---------------------------------------------------------------------------- -// convMethodAttributes -//---------------------------------------------------------------------------- - -let convMethodAttributes mdef = - if verbose then dprintf "- convMethodAttributes %s\n" mdef.mdName; - let attrKind = - match mdef.mdKind with - | MethodKind_static -> MethodAttributes.Static - | MethodKind_cctor -> MethodAttributes.Static - | MethodKind_ctor -> enum 0 - | MethodKind_nonvirtual -> enum 0 - | MethodKind_virtual vinfo -> MethodAttributes.Virtual ||| - flagsIf vinfo.virtNewslot MethodAttributes.NewSlot ||| - flagsIf vinfo.virtFinal MethodAttributes.Final ||| - flagsIf vinfo.virtStrict MethodAttributes.CheckAccessOnOverride ||| - flagsIf vinfo.virtAbstract MethodAttributes.Abstract - - let attrAccess = - match mdef.mdAccess with - | MemAccess_assembly -> MethodAttributes.Assembly - | MemAccess_compilercontrolled -> failwith "Method access compiler controled." - | MemAccess_famandassem -> MethodAttributes.FamANDAssem - | MemAccess_famorassem -> MethodAttributes.FamORAssem - | MemAccess_family -> MethodAttributes.Family - | MemAccess_private -> MethodAttributes.Private - | MemAccess_public -> MethodAttributes.Public - - let attrOthers = flagsIf mdef.mdHasSecurity MethodAttributes.HasSecurity ||| - flagsIf mdef.mdSpecialName MethodAttributes.SpecialName ||| - flagsIf mdef.mdHideBySig MethodAttributes.HideBySig ||| - flagsIf mdef.mdReqSecObj MethodAttributes.RequireSecObject - - attrKind ||| attrAccess ||| attrOthers - -let convMethodImplFlags mdef = - if verbose then dprintf "- convMethodImplFlags %s\n" mdef.mdName; - (match mdef.mdCodeKind with - | MethodCodeKind_native -> MethodImplAttributes.Native - | MethodCodeKind_runtime -> MethodImplAttributes.Runtime - | MethodCodeKind_il -> MethodImplAttributes.IL) - ||| flagsIf mdef.mdInternalCall MethodImplAttributes.InternalCall - ||| (if mdef.mdManaged then MethodImplAttributes.Managed else MethodImplAttributes.Unmanaged) - ||| flagsIf mdef.mdForwardRef MethodImplAttributes.ForwardRef - ||| flagsIf mdef.mdPreserveSig MethodImplAttributes.PreserveSig - ||| flagsIf mdef.mdSynchronized MethodImplAttributes.Synchronized - ||| flagsIf (match dest_mbody mdef.mdBody with MethodBody_il b -> b.ilNoInlining | _ -> false) MethodImplAttributes.NoInlining - -//---------------------------------------------------------------------------- -// buildMethodPass2 -//---------------------------------------------------------------------------- - -let rec buildMethodPass2 tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) = - // remaining REVIEW: - // mdCodeKind: MethodCodeKind; - // mdInternalCall: bool; - // mdManaged: bool; - // mdForwardRef: bool; - // mdSecurityDecls: Permissions; - // mdUnmanagedExport: bool; (* -- The method is exported to unmanaged code using COM interop. *) - // mdSynchronized: bool; - // mdPreserveSig: bool; - // mdMustRun: bool; (* Whidbey feature: SafeHandle finalizer must be run *) - // mdExport: (i32 * string option) option; - // mdVtableEntry: (i32 * i32) option; - if verbose then dprintf "buildMethodPass2 %s\n" mdef.mdName; - let attrs = convMethodAttributes mdef - let implflags = convMethodImplFlags mdef - let cconv = convCallConv mdef.mdCallconv - let mref = mk_mref_to_mdef (tref,mdef) - let emEnv = if mdef.mdEntrypoint && mdef.ParameterTypes=[] then - (* Bug 2209: - Here, we collect the entry points generated by ilxgen corresponding to the top-level effects. - Users can (now) annotate their own functions with EntryPoint attributes. - However, these user entry points functions must take string[] argument. - By only adding entry points with no arguments, we only collect the top-level effects. - *) - envAddEntryPt emEnv (typB,mdef.mdName) - else - emEnv - match dest_mbody mdef.mdBody with - | MethodBody_pinvoke p -> - let argtys = Array.of_list (List.map (convType emEnv) mdef.ParameterTypes) - let rty = convType emEnv mdef.Return.Type - - let pcc = - match p.pinvokeCallconv with - | PInvokeCallConvCdecl -> CallingConvention.Cdecl - | PInvokeCallConvStdcall -> CallingConvention.StdCall - | PInvokeCallConvThiscall -> CallingConvention.ThisCall - | PInvokeCallConvFastcall -> CallingConvention.FastCall - | PInvokeCallConvNone - | PInvokeCallConvWinapi -> CallingConvention.Winapi - - let pcs = - match p.PInvokeCharEncoding with - | PInvokeEncodingNone -> CharSet.None - | PInvokeEncodingAnsi -> CharSet.Ansi - | PInvokeEncodingUnicode -> CharSet.Unicode - | PInvokeEncodingAuto -> CharSet.Auto - -(* p.PInvokeThrowOnUnmappableChar *) -(* p.PInvokeCharBestFit *) -(* p.pinvokeNoMangle *) - - let methB = typB.DefinePInvokeMethod(mdef.mdName, - p.pinvokeWhere.Name, - p.pinvokeName, - attrs, - cconv, - rty, - null, null, - argtys, - null, null, - pcc, - pcs) - methB.SetImplementationFlags(implflags); - envBindMethodRef emEnv mref methB - - | _ -> - match mdef.mdName with - | ".cctor" - | ".ctor" -> - let consB = typB.DefineConstructor(attrs, - cconv, - Array.of_list (List.map (convType emEnv) mdef.ParameterTypes)) - consB.SetImplementationFlags(implflags); - envBindConsRef emEnv mref consB - | name -> - // Note the return/argument types may involve the generic parameters - let methB = typB.DefineMethod(mdef.mdName,attrs,cconv) - - // Method generic type parameters - buildGenParamsPass1 emEnv (fun x -> methB.DefineGenericParameters(x)) mdef.GenericParams; - let genArgs = getGenericArgumentsOfMethod methB - let emEnv = envPushTyvars emEnv (Array.append (getGenericArgumentsOfType typB) genArgs) - buildGenParamsPass1b emEnv genArgs mdef.GenericParams; - // set parameter and return types (may depend on generic args) - methB.SetParameters(Array.of_list (List.map (convType emEnv) mdef.ParameterTypes)); - methB.SetReturnType(convType emEnv mdef.Return.Type); - let emEnv = envPopTyvars emEnv - methB.SetImplementationFlags(implflags); - envBindMethodRef emEnv mref methB - - -//---------------------------------------------------------------------------- -// buildMethodPass3 cenv -//---------------------------------------------------------------------------- - -let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMethodDef) = - if verbose then dprintf "buildMethodPass3 cenv %s\n" mdef.mdName; - let mref = mk_mref_to_mdef (tref,mdef) - match dest_mbody mdef.mdBody with - | MethodBody_pinvoke p -> () - | _ -> - match mdef.mdName with - | ".cctor" | ".ctor" -> - let consB = envGetConsB emEnv mref - // Constructors can not have generic parameters - assert (mdef.GenericParams=[]); - // Value parameters - let defineParameter (i,attr,name) = consB.DefineParameter(i+1,attr,name) - mdef.mdParams |> List.iteri (emitParameter emEnv defineParameter); - // Body - emitMethodBody cenv modB emEnv (fun () -> consB.GetILGenerator()) mdef.mdName mdef.mdBody; - emitCustomAttrs emEnv (fun (x,y) -> consB.SetCustomAttribute(x,y)) mdef.mdCustomAttrs; - () - | name -> - let methB = envGetMethB emEnv mref - let emEnv = envPushTyvars emEnv (Array.append - (getGenericArgumentsOfType typB) - (getGenericArgumentsOfMethod methB)) - - begin match (dest_custom_attrs mdef.mdReturn.returnCustomAttrs) with - | [] -> () - | _ -> - let retB = methB.DefineParameter(0,System.Reflection.ParameterAttributes.Retval,null) - emitCustomAttrs emEnv (fun (x,y) -> retB.SetCustomAttribute(x,y)) mdef.mdReturn.returnCustomAttrs - end; - - // Value parameters - let defineParameter (i,attr,name) = methB.DefineParameter(i+1,attr,name) - mdef.mdParams |> List.iteri (emitParameter emEnv defineParameter); - // Body - emitMethodBody cenv modB emEnv (fun () -> methB.GetILGenerator()) mdef.mdName mdef.mdBody; - let emEnv = envPopTyvars emEnv // case fold later... - emitCustomAttrs emEnv (fun (x,y) -> methB.SetCustomAttribute(x,y)) mdef.mdCustomAttrs; - () - -//---------------------------------------------------------------------------- -// buildFieldPass2 -//---------------------------------------------------------------------------- - -let buildFieldPass2 tref (typB:TypeBuilder) emEnv (fdef : ILFieldDef) = - (*{ -fdData: bytes option; - -fdMarshal: NativeType option; *) - if verbose then dprintf "buildFieldPass2 %s\n" fdef.fdName; - let attrsAccess = match fdef.fdAccess with - | MemAccess_assembly -> FieldAttributes.Assembly - | MemAccess_compilercontrolled -> failwith "Field access compiler controled." - | MemAccess_famandassem -> FieldAttributes.FamANDAssem - | MemAccess_famorassem -> FieldAttributes.FamORAssem - | MemAccess_family -> FieldAttributes.Family - | MemAccess_private -> FieldAttributes.Private - | MemAccess_public -> FieldAttributes.Public - let attrsOther = flagsIf fdef.fdStatic FieldAttributes.Static ||| - flagsIf fdef.fdSpecialName FieldAttributes.SpecialName ||| - flagsIf fdef.fdLiteral FieldAttributes.Literal ||| - flagsIf fdef.fdInitOnly FieldAttributes.InitOnly ||| - flagsIf fdef.fdNotSerialized FieldAttributes.NotSerialized - let attrs = attrsAccess ||| attrsOther - let fieldT = convType emEnv fdef.fdType - let fieldB = - match fdef.fdData with - | Some d -> typB.DefineInitializedData(fdef.fdName, d, attrs) - | None -> typB.DefineField(fdef.fdName, - fieldT, - attrs) - - // set default value - fdef.fdInit |> Option.iter (fun initial -> fieldB.SetConstant(convFieldInit initial)); - fdef.fdOffset |> Option.iter (fun offset -> fieldB.SetOffset(offset)); - // assert unsupported: - assert (fdef.fdMarshal=None); - // custom attributes: done on pass 3 as they may reference attribute constructors generated on - // pass 2. - let fref = mk_fref_in_tref (tref,fdef.fdName,fdef.fdType) - envBindFieldRef emEnv fref fieldB - -let buildFieldPass3 tref (typB:TypeBuilder) emEnv (fdef : ILFieldDef) = - if verbose then dprintf "buildFieldPass3 %s\n" fdef.fdName; - let fref = mk_fref_in_tref (tref,fdef.fdName,fdef.fdType) - let fieldB = envGetFieldB emEnv fref - emitCustomAttrs emEnv (fun (x,y) -> fieldB.SetCustomAttribute(x,y)) fdef.fdCustomAttrs - -//---------------------------------------------------------------------------- -// buildPropertyPass2,3 -//---------------------------------------------------------------------------- - -let buildPropertyPass2 tref (typB:TypeBuilder) emEnv (prop : ILPropertyDef) = - (*{ -propCallconv: hasthis; } *) - if verbose then dprintf "buildPropertyPass2 %s\n" prop.propName; - let attrs = flagsIf prop.propRTSpecialName PropertyAttributes.RTSpecialName ||| - flagsIf prop.propSpecialName PropertyAttributes.SpecialName - let propB = typB.DefineProperty(prop.propName, - attrs, - convType emEnv prop.propType, - Array.of_list (List.map (convType emEnv) prop.propArgs)) - - // install get/set methods - let installOp descr setOp opMRef = - if verbose then dprintf "buildPropertyPass2: installing %s" descr; - setOp(envGetMethB emEnv opMRef) - - prop.propSet |> Option.iter (installOp "set" (fun methB -> propB.SetSetMethod(methB))); - prop.propGet |> Option.iter (installOp "get" (fun methB -> propB.SetGetMethod(methB))); - // set default value - prop.propInit |> Option.iter (fun initial -> propB.SetConstant(convFieldInit initial)); - // custom attributes - let pref = mk_pref (tref,prop.propName) - envBindPropRef emEnv pref propB - // XXX - propCallconv ??? - -let buildPropertyPass3 tref (typB:TypeBuilder) emEnv (prop : ILPropertyDef) = - let pref = mk_pref (tref,prop.propName) - let propB = envGetPropB emEnv pref - emitCustomAttrs emEnv (fun (x,y) -> propB.SetCustomAttribute(x,y)) prop.propCustomAttrs - -//---------------------------------------------------------------------------- -// buildMethodImplsPass3 -//---------------------------------------------------------------------------- - -let buildMethodImplsPass3 tref (typB:TypeBuilder) emEnv (mimpl : IL.ILMethodImplDef) = - if verbose then dprintf "buildMethodImplsPass3 %s\n" mimpl.mimplOverrideBy.MethodRef.Name; - let bodyMethInfo = convMethodRef emEnv (typB :> Type) mimpl.mimplOverrideBy.MethodRef // doc: must be MethodBuilder - let (OverridesSpec (mref,dtyp)) = mimpl.mimplOverrides - let declMethTI = convType emEnv dtyp - let declMethInfo = convMethodRef emEnv declMethTI mref - typB.DefineMethodOverride(bodyMethInfo,declMethInfo); - emEnv - -//---------------------------------------------------------------------------- -// typeAttributesOf* -//---------------------------------------------------------------------------- - -let typeAttrbutesOfTypeDefKind x = - match x with - // required for a TypeBuilder - | TypeDef_class -> TypeAttributes.Class - | TypeDef_valuetype -> TypeAttributes.Class - | TypeDef_interface -> TypeAttributes.Interface - | TypeDef_enum -> TypeAttributes.Class - | TypeDef_delegate -> TypeAttributes.Class - | TypeDef_other xtdk -> failwith "typeAttributes of other external" - -let typeAttrbutesOfTypeAccess x = - match x with - | TypeAccess_public -> TypeAttributes.Public - | TypeAccess_private -> TypeAttributes.NotPublic - | TypeAccess_nested macc -> match macc with - | MemAccess_assembly -> TypeAttributes.NestedAssembly - | MemAccess_compilercontrolled -> failwith "Nested compiler controled." - | MemAccess_famandassem -> TypeAttributes.NestedFamANDAssem - | MemAccess_famorassem -> TypeAttributes.NestedFamORAssem - | MemAccess_family -> TypeAttributes.NestedFamily - | MemAccess_private -> TypeAttributes.NestedPrivate - | MemAccess_public -> TypeAttributes.NestedPublic - -let typeAttributesOfTypeEncoding x = - match x with - | TypeEncoding_ansi -> TypeAttributes.AnsiClass - | TypeEncoding_autochar -> TypeAttributes.AutoClass - | TypeEncoding_unicode -> TypeAttributes.UnicodeClass - - -let typeAttributesOfTypeLayout cenv emEnv x = - let attr p = - if p.typeSize =None && p.typePack = None then None - else - Some(convCustomAttr emEnv - (IL.mk_custom_attribute cenv.ilg - (mk_tref (cenv.ilg.mscorlib_scoref,"System.Runtime.InteropServices.StructLayoutAttribute"), - [mk_nongeneric_value_typ (mk_tref (cenv.ilg.mscorlib_scoref,"System.Runtime.InteropServices.LayoutKind")) ], - [ CustomElem_int32 0x02 ], - (p.typePack |> Option.to_list |> List.map (fun x -> ("Pack", cenv.ilg.typ_int32, false, CustomElem_int32 (int32 x)))) @ - (p.typeSize |> Option.to_list |> List.map (fun x -> ("Size", cenv.ilg.typ_int32, false, CustomElem_int32 x)))))) in - match x with - | TypeLayout_auto -> TypeAttributes.AutoLayout,None - | TypeLayout_explicit p -> TypeAttributes.ExplicitLayout,(attr p) - | TypeLayout_sequential p -> TypeAttributes.SequentialLayout, (attr p) - - -//---------------------------------------------------------------------------- -// buildTypeDefPass1 cenv -//---------------------------------------------------------------------------- - -let rec buildTypeDefPass1 cenv emEnv (modB:ModuleBuilder) rootTypeBuilder nesting (tdef : ILTypeDef) = - // -tdComInterop: bool; (* Class or interface generated for COM interop *) - // -tdSecurityDecls: Permissions; - // -tdInitSemantics: ILTypeDefInitSemantics; - // -tdEvents: events; - if verbose then dprintf "buildTypeDefPass1 cenv %s\n" tdef.Name; - // TypeAttributes - let attrsKind = typeAttrbutesOfTypeDefKind tdef.tdKind - let attrsAccess = typeAttrbutesOfTypeAccess tdef.tdAccess - let attrsLayout,cattrsLayout = typeAttributesOfTypeLayout cenv emEnv tdef.tdLayout - let attrsEnc = typeAttributesOfTypeEncoding tdef.tdEncoding - let attrsOther = flagsIf tdef.IsAbstract TypeAttributes.Abstract ||| - flagsIf tdef.IsSealed TypeAttributes.Sealed ||| - flagsIf tdef.IsSerializable TypeAttributes.Serializable ||| - flagsIf tdef.tdSpecialName TypeAttributes.SpecialName ||| - flagsIf tdef.tdHasSecurity TypeAttributes.HasSecurity - - let attrsType = attrsKind ||| attrsAccess ||| attrsLayout ||| attrsEnc ||| attrsOther - - // TypeBuilder from TypeAttributes. - if verbose then dprintf "buildTypeDefPass1 cenv: build name = %s\n" tdef.Name; - let typB : TypeBuilder = rootTypeBuilder (tdef.Name,attrsType) - let typB = typB |> nonNull "buildTypeDefPass1 cenv: typB is null!" - cattrsLayout |> Option.iter (fun (x,y) -> typB.SetCustomAttribute(x,y)); - - buildGenParamsPass1 emEnv (fun x -> typB.DefineGenericParameters(x)) tdef.GenericParams; - // bind tref -> (typT,typB) - let tref = tref_for_nested_tdef ScopeRef_local (nesting,tdef) - let typT = - // Q: would it be ok to use typB :> Type ? - // Maybe not, recall TypeBuilder maybe subtype of Type, but it is not THE Type. - let nameInModule = tref.QualifiedName - if verbose then dprintf "buildTypeDefPass1 cenv: nameInModule= %s\n" nameInModule; - modB.GetType(nameInModule,false,false) - - if verbose then dprintf "buildTypeDefPass1 cenv: null? %d\n" (if typT=null then 0 else 1); - let emEnv = envBindTypeRef emEnv tref (typT,typB,tdef) - // recurse on nested types - let nesting = nesting @ [tdef] - let buildNestedType emEnv tdef = buildTypeTypeDef cenv emEnv modB typB nesting tdef - let emEnv = List.fold buildNestedType emEnv (dest_tdefs tdef.NestedTypes) - emEnv - -and buildTypeTypeDef cenv emEnv modB (typB : TypeBuilder) nesting tdef = - if verbose then dprintf "buildTypeTypeDef cenv\n"; - let rootTypB (name,attrs) = typB.DefineNestedType(name,attrs) - buildTypeDefPass1 cenv emEnv modB rootTypB nesting tdef - -//---------------------------------------------------------------------------- -// buildTypeDefPass1b -//---------------------------------------------------------------------------- - -let rec buildTypeDefPass1b nesting emEnv (tdef : ILTypeDef) = - if verbose then dprintf "buildTypeDefPass1b %s\n" tdef.Name; - let tref = tref_for_nested_tdef ScopeRef_local (nesting,tdef) - let typB = envGetTypB emEnv tref - let genArgs = (getGenericArgumentsOfType typB) - let emEnv = envPushTyvars emEnv genArgs - // Parent may reference types being defined, so has to come after it's Pass1 creation - tdef.Extends |> Option.iter (fun typ -> typB.SetParent(convType emEnv typ)); - // build constraints on ILGenericParameterDefs. Constraints may reference types being defined, - // so have to come after all types are created - buildGenParamsPass1b emEnv genArgs tdef.GenericParams; - let emEnv = envPopTyvars emEnv - let nesting = nesting @ [tdef] - List.iter (buildTypeDefPass1b nesting emEnv) (dest_tdefs tdef.NestedTypes) - -//---------------------------------------------------------------------------- -// buildTypeDefPass2 -//---------------------------------------------------------------------------- - -let rec buildTypeDefPass2 nesting emEnv (tdef : ILTypeDef) = - if verbose then dprintf "buildTypeDefPass2 %s\n" tdef.Name; - let tref = tref_for_nested_tdef ScopeRef_local (nesting,tdef) - let typB = envGetTypB emEnv tref - let emEnv = envPushTyvars emEnv (getGenericArgumentsOfType typB) - // add interface impls - tdef.Implements |> List.map (convType emEnv) |> List.iter (fun implT -> typB.AddInterfaceImplementation(implT)); - // add methods, properties - let emEnv = List.fold (buildMethodPass2 tref typB) emEnv (dest_mdefs tdef.Methods) - let emEnv = List.fold (buildFieldPass2 tref typB) emEnv (dest_fdefs tdef.Fields) - let emEnv = List.fold (buildPropertyPass2 tref typB) emEnv (dest_pdefs tdef.Properties) - let emEnv = envPopTyvars emEnv - // nested types - let nesting = nesting @ [tdef] - let emEnv = List.fold (buildTypeDefPass2 nesting) emEnv (dest_tdefs tdef.NestedTypes) - emEnv - -//---------------------------------------------------------------------------- -// buildTypeDefPass3 cenv -//---------------------------------------------------------------------------- - -let rec buildTypeDefPass3 cenv nesting modB emEnv (tdef : ILTypeDef) = - if verbose then dprintf "buildTypeDefPass3 cenv %s\n" tdef.Name; - let tref = tref_for_nested_tdef ScopeRef_local (nesting,tdef) - let typB = envGetTypB emEnv tref - let emEnv = envPushTyvars emEnv (getGenericArgumentsOfType typB) - // add method bodies, properties - tdef.Methods |> dest_mdefs |> List.iter (buildMethodPass3 cenv tref modB typB emEnv); - tdef.Properties |> dest_pdefs |> List.iter (buildPropertyPass3 tref typB emEnv); - tdef.Fields |> dest_fdefs |> List.iter (buildFieldPass3 tref typB emEnv); - let emEnv = List.fold (buildMethodImplsPass3 tref typB) emEnv (dest_mimpls tdef.tdMethodImpls) - tdef.tdCustomAttrs |> emitCustomAttrs emEnv (fun (x,y) -> typB.SetCustomAttribute(x,y)) ; - // custom attributes - let emEnv = envPopTyvars emEnv - // nested types - let nesting = nesting @ [tdef] - let emEnv = List.fold (buildTypeDefPass3 cenv nesting modB) emEnv (dest_tdefs tdef.NestedTypes) - emEnv - -//---------------------------------------------------------------------------- -// buildTypeDefPass4 - Create the Types -// MSDN says: If this type is a nested type, the CreateType method must -// be called on the enclosing type before it is called on the nested type. -// If the current type derives from an incomplete type or implements -// incomplete interfaces, call the CreateType method on the parent -// type and the interface types before calling it on the current type. -// If the enclosing type contains a field that is a value type -// defined as a nested type (for example, a field that is an -// enumeration defined as a nested type), calling the CreateType method -// on the enclosing type will generate a AppDomain.TypeResolve event. -// This is because the loader cannot determine the size of the enclosing -// type until the nested type has been completed. The caller should define -// a handler for the TypeResolve event to complete the definition of the -// nested type by calling CreateType on the TypeBuilder object that represents -// the nested type. The code example for this topic shows how to define such -// an event handler. -//---------------------------------------------------------------------------- - -let enclosing_trefs_of_tref (tref:ILTypeRef) = - match tref.Enclosing with - | [] -> [] - | h :: t -> List.scan_left (fun tr nm -> mk_tref_in_tref (tr,nm)) (mk_tref(tref.Scope, h)) t - -let rec trefs_of_typ valueTypesOnly typ acc = - match typ with - | Type_void | Type_tyvar _ -> acc - | Type_ptr eltType | Type_byref eltType -> acc - | Type_array (_,eltType) -> if valueTypesOnly then acc else trefs_of_typ valueTypesOnly eltType acc - | Type_value tspec -> tspec.TypeRef :: List.foldBack (trefs_of_typ valueTypesOnly) tspec.GenericArgs acc - | Type_boxed tspec -> if valueTypesOnly then acc else tspec.TypeRef :: List.foldBack (trefs_of_typ valueTypesOnly) tspec.GenericArgs acc - | Type_fptr callsig -> failwith "trefs_of_typ: fptr" - | Type_modified _ -> failwith "trefs_of_typ: modified" - -let verbose2 = false - -let createTypeRef (visited : Dictionary<_,_>, created : Dictionary<_,_>) emEnv tref = - let rec traverseTypeDef priority tref (tdef:ILTypeDef) = - // WORKAROUND (ProductStudio FSharp 1.0 bug 615): the constraints on generic method parameters - // are resolved overly eagerly by reflection emit's CreateType. The priority drops down to 1 here - // because we absolutely have to create these types before attempting to create the enclosing type. - if priority >= 1 then - if verbose2 then dprintf "buildTypeDefPass4: Doing method constraints of %s\n" tdef.Name; - tdef.Methods |> dest_mdefs |> List.iter (fun md -> md.GenericParams |> List.iter (fun gp -> gp.Constraints |> List.iter (traverseType false 1))); - // We have to define all struct types in all methods before a class is defined. This only has any effect when there is a struct type - // being defined simultaneously with this type. - if priority >= 1 then - if verbose2 then dprintf "buildTypeDefPass4: Doing value types in method signautres of %s, #mdefs = %d\n" tdef.Name (List.length (tdef.Methods |> dest_mdefs)); - tdef.Methods |> dest_mdefs |> List.iter (fun md -> md.Parameters |> List.iter (fun p -> p.Type |> (traverseType true 1)) - md.Return.Type |> traverseType true 1); - // We absolutely need the parent type... - if priority >= 1 then - if verbose2 then dprintf "buildTypeDefPass4: Creating Super Class Chain of %s\n" tdef.Name; - tdef.Extends |> Option.iter (traverseType false priority); - - // We absolutely need the interface types... - if priority >= 1 then - if verbose2 then dprintf "buildTypeDefPass4: Creating Interface Chain of %s\n" tdef.Name; - tdef.Implements |> List.iter (traverseType false priority); - - if priority >= 1 then - if verbose2 then dprintf "buildTypeDefPass4: Do value types in fields of %s\n" tdef.Name; - tdef.Fields |> dest_fdefs |> List.iter (fun fd -> traverseType true 1 fd.Type); - - (* There seem to be some types we can create without creating the enclosing types *) - (* Hence only attempt to create the enclosing types when the priority is >= 2 *) - if priority >= 2 then - if verbose2 then dprintf "buildTypeDefPass4: Creating Enclosing Types of %s\n" tdef.Name; - tref |> enclosing_trefs_of_tref |> List.iter (traverseTypeRef priority); - - if verbose2 then dprintf "buildTypeDefPass4: Done with dependencies of %s\n" tdef.Name - and traverseType valueTypesOnly priority typ = - if verbose2 then dprintf "- traverseType %A\n" typ; - trefs_of_typ valueTypesOnly typ [] - |> List.filter (isEmittedTypeRef emEnv) - |> List.iter (traverseTypeRef priority) - - and traverseTypeRef priority tref = - let typB = envGetTypB emEnv tref - if verbose2 then dprintf "- considering reference to type %s\n" typB.FullName; - if not (visited.ContainsKey(tref)) or visited.[tref] > priority then - visited.[tref] <- priority; - let tdef = envGetTypeDef emEnv tref - if verbose2 then dprintf "- traversing type %s\n" typB.FullName; - traverseTypeDef priority tref tdef; - if not (created.ContainsKey(tref)) then - created.[tref] <- true; - if verbose2 then dprintf "- creating type %s\n" typB.FullName; - typB.CreateType() |> ignore - - traverseTypeRef 2 tref - -let rec buildTypeDefPass4 (visited,created) nesting emEnv (tdef : ILTypeDef) = - if verbose2 then dprintf "buildTypeDefPass4 %s\n" tdef.Name; - let tref = tref_for_nested_tdef ScopeRef_local (nesting,tdef) - let typB = envGetTypB emEnv tref - createTypeRef (visited,created) emEnv tref; - // nested types - let nesting = nesting @ [tdef] - tdef.NestedTypes |> dest_tdefs |> List.iter (buildTypeDefPass4 (visited,created) nesting emEnv) - -//---------------------------------------------------------------------------- -// buildModuleType -//---------------------------------------------------------------------------- - -let buildModuleTypePass1 cenv (modB:ModuleBuilder) emEnv (tdef:ILTypeDef) = - if verbose then dprintf "buildModuleTypePass1 cenv, tdef.Name = %s\n" tdef.Name; - let rootTypB (name,attrs) = modB.DefineType(name,attrs) - buildTypeDefPass1 cenv emEnv modB rootTypB [] tdef - -let buildModuleTypePass1b emEnv tdef = buildTypeDefPass1b [] emEnv tdef -let buildModuleTypePass2 emEnv tdef = buildTypeDefPass2 [] emEnv tdef -let buildModuleTypePass3 cenv modB emEnv tdef = buildTypeDefPass3 cenv [] modB emEnv tdef -let buildModuleTypePass4 visited emEnv tdef = buildTypeDefPass4 visited [] emEnv tdef - -//---------------------------------------------------------------------------- -// buildModuleFragment - only the types the fragment get written -//---------------------------------------------------------------------------- - -let buildModuleFragment cenv emEnv (asmB : AssemblyBuilder) (modB : ModuleBuilder) (m: ILModuleDef) = - let tdefs = dest_tdefs m.modulTypeDefs in - - let emEnv = List.fold (buildModuleTypePass1 cenv modB) emEnv tdefs - Array.iter (fun (tyT:Type) -> if verbose then dprintf "fqn = %s\n" tyT.FullName) (modB.GetTypes()); - List.iter (buildModuleTypePass1b emEnv) tdefs - let emEnv = List.fold buildModuleTypePass2 emEnv tdefs - let emEnv = List.fold (buildModuleTypePass3 cenv modB) emEnv tdefs - let visited = new Dictionary<_,_>(10) - let created = new Dictionary<_,_>(10) - List.iter (buildModuleTypePass4 (visited,created) emEnv) tdefs - let emEnv = Seq.fold envUpdateCreatedTypeRef emEnv created.Keys // update typT with the created typT - emitCustomAttrs emEnv (fun (x,y) -> modB.SetCustomAttribute(x,y)) m.modulCustomAttrs; - m.modulResources |> dest_resources |> List.iter (fun r -> - let attribs = (match r.resourceAccess with Resource_public -> ResourceAttributes.Public | Resource_private -> ResourceAttributes.Private) - match r.resourceWhere with - | Resource_local bf -> - modB.DefineManifestResource(r.resourceName, new IO.MemoryStream(bf()), attribs) - | Resource_file (mr,n) -> - asmB.AddResourceFile(r.resourceName, mr.Name, attribs) - | Resource_assembly _ -> - failwith "references to resources other assemblies may not be emitted using System.Reflection"); - emEnv - -//---------------------------------------------------------------------------- -// test hook -//---------------------------------------------------------------------------- - -let mkDynamicAssemblyAndModule assemblyName debugInfo = - let filename = assemblyName ^ ".dll" - let currentDom = System.AppDomain.CurrentDomain - let asmDir = "." - let asmName = new AssemblyName() - asmName.Name <- assemblyName; - let asmB = currentDom.DefineDynamicAssembly(asmName,AssemblyBuilderAccess.RunAndSave,asmDir) - let modB = asmB.DefineDynamicModule(assemblyName,filename,debugInfo) - asmB,modB - -let emitModuleFragment ilg emEnv (asmB : AssemblyBuilder) (modB : ModuleBuilder) (modul : IL.ILModuleDef) (debugInfo : bool) = - let cenv = { ilg = ilg ; generate_pdb = debugInfo } - - let emEnv = buildModuleFragment cenv emEnv asmB modB modul - begin match modul.modulManifest with - | None -> () - | Some mani -> - // REVIEW: remainder of manifest - emitCustomAttrs emEnv (fun (x,y) -> asmB.SetCustomAttribute(x,y)) mani.manifestCustomAttrs; - end; - // invoke entry point methods - let execEntryPtFun ((typB : TypeBuilder),methodName) () = - try - ignore (typB.InvokeMember(methodName, - BindingFlags.InvokeMethod ||| BindingFlags.Public ||| BindingFlags.Static, - null, - null, - Array.of_list [ ], - Globalization.CultureInfo.InvariantCulture)); - None - with - | :? System.Reflection.TargetInvocationException as e -> - Some(e.InnerException) - - let emEnv,entryPts = envPopEntryPts emEnv - let execs = List.map execEntryPtFun entryPts - emEnv,execs - - -//---------------------------------------------------------------------------- -// lookup* allow conversion from AbsIL to their emitted representations -//---------------------------------------------------------------------------- - -// TypeBuilder is a subtype of Type. -// However, casting TypeBuilder to Type is not the same as getting Type proper. -// The builder version does not implement all methods on the parent. -// -// The emEnv stores (typT:Type) for each tref. -// Once the emitted type is created this typT is updated to ensure it is the Type proper. -// So Type lookup will return the proper Type not TypeBuilder. -let lookupTypeRef emEnv tref = Zmap.tryfind tref emEnv.emTypMap |> Option.map (function (typ,_,_,Some createdTyp) -> createdTyp | (typ,_,_,None) -> typ) -let lookupType emEnv typ = convCreatedType emEnv typ - -// Lookups of ILFieldRef and MethodRef may require a similar non-Builder-fixup post Type-creation. -let lookupFieldRef emEnv fref = Zmap.tryfind fref emEnv.emFieldMap |> Option.map (fun fieldBuilder -> fieldBuilder :> FieldInfo) -let lookupMethodRef emEnv mref = Zmap.tryfind mref emEnv.emMethMap |> Option.map (fun methodBuilder -> methodBuilder :> MethodInfo) - - -//---------------------------------------------------------------------------- -// REVIEW: -// [ ] events todo -// [ ] check cust attributes get through, e.g STA. -// [ ] XXX notes (highlight gaps) -//---------------------------------------------------------------------------- diff --git a/tools/FSharp_1.9.6.16/source/absil/ilsupp.ml b/tools/FSharp_1.9.6.16/source/absil/ilsupp.ml deleted file mode 100644 index df4065ef..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilsupp.ml +++ /dev/null @@ -1,1551 +0,0 @@ -#light - -// (c) Microsoft Corporation 2005-2009. -module Microsoft.FSharp.Compiler.AbstractIL.Internal.Support - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -module Ildiag = Microsoft.FSharp.Compiler.AbstractIL.Diagnostics - - -open Ildiag -open Bytes -open System -open System.IO -open System.Text -open System.Reflection -open System.Diagnostics.SymbolStore -open System.Runtime.InteropServices -#if FX_ATLEAST_40 -open System.Runtime.CompilerServices -#endif - -// Force inline, so GetLastWin32Error calls are immediately after interop calls as seen by FxCop under Debug build. -let inline ignore x = () - -// Native Resource linking/unlinking -type IStream = System.Runtime.InteropServices.ComTypes.IStream -type clr_kind = | SSCLI | Microsoft | Mono | Neutral -let supported_configurations = [Microsoft;Mono;Neutral] - -let current_configuration () = Microsoft (* REVIEW: this should detect which CLR we are running *) -let configure k = - if k <> current_configuration() then - dprintn ("configure: cannot change the current configuration for the Abstract IL managed libraries - it is determined by the CLR you are using to run your application") - -let check action (hresult) = - if uint32 hresult >= 0x80000000ul then - System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(hresult) - //Printf.printf "action = %s, hresult = 0x%nx \n" action hresult - -let pdb_suffix_for_configuration = function | Microsoft -> "pdb" | _ -> "ildb" - -type PEFileType = X86 | X64 - -let MAX_PATH = 260 - -let E_FAIL = 0x80004005 - -let bytesToWord ((b0 : byte) , (b1 : byte)) = - (int16)b0 ||| ((int16)b1 <<< 8) -let bytesToDWord ((b0 : byte) , (b1 : byte) , (b2 : byte) , (b3 : byte)) = - (int)b0 ||| ((int)b1 <<< 8) ||| ((int)b2 <<< 16) ||| ((int)b3 <<< 24) -let bytesToQWord ((b0 : byte) , (b1 : byte) , (b2 : byte) , (b3 : byte) , (b4 : byte) , (b5 : byte) , (b6 : byte) , (b7 : byte)) = - (int64)b0 ||| ((int64)b1 <<< 8) ||| ((int64)b2 <<< 16) ||| ((int64)b3 <<< 24) ||| ((int64)b4 <<< 32) ||| ((int64)b5 <<< 40) ||| ((int64)b6 <<< 48) ||| ((int64)b7 <<< 56) - -let dwToBytes n = [| (byte)(n &&& 0xff) ; (byte)((n >>> 8) &&& 0xff) ; (byte)((n >>> 16) &&& 0xff) ; (byte)((n >>> 24) &&& 0xff) |], 4 -let wToBytes (n : int16) = [| (byte)(n &&& 0xffs) ; (byte)((n >>> 8) &&& 0xffs) |], 2 - -// REVIEW: factor these classes under one hierarchy, use reflection for creation from buffer and toBytes() -// Though, everything I'd like to unify is static - metaclasses? -type IMAGE_FILE_HEADER (m:int16, secs:int16, tds:int32, ptst:int32, nos:int32, soh:int16, c:int16) = - let mutable machine = m - let mutable numberOfSections = secs - let mutable timeDateStamp = tds - let mutable pointerToSymbolTable = ptst - let mutable numberOfSymbols = nos - let mutable sizeOfOptionalHeader = soh - let mutable characteristics = c - - member x.Machine - with get() = machine - and set(value) = machine <- value - - member x.NumberOfSections - with get() = numberOfSections - and set(value) = numberOfSections <- value - - member x.TimeDateStamp - with get() = timeDateStamp - and set(value) = timeDateStamp <- value - - member x.PointerToSymbolTable - with get() = pointerToSymbolTable - and set(value) = pointerToSymbolTable <- value - - member x.NumberOfSymbols - with get() = numberOfSymbols - and set(value) = numberOfSymbols <- value - - member x.SizeOfOptionalHeader - with get() = sizeOfOptionalHeader - and set(value) = sizeOfOptionalHeader <- value - - member x.Characteristics - with get() = characteristics - and set(value) = characteristics <- value - - static member Width - with get() = 20 - - member x.toBytes () = - let buf = Bytebuf.create IMAGE_FILE_HEADER.Width - Bytebuf.emit_u16 buf ((uint16)machine) - Bytebuf.emit_u16 buf ((uint16)numberOfSections) - Bytebuf.emit_i32 buf timeDateStamp - Bytebuf.emit_i32 buf pointerToSymbolTable - Bytebuf.emit_i32 buf numberOfSymbols - Bytebuf.emit_u16 buf ((uint16)sizeOfOptionalHeader) - Bytebuf.emit_u16 buf ((uint16)characteristics) - Bytebuf.close buf - -let bytesToIFH (buffer : byte[]) (offset : int) = - if (buffer.Length - offset) < IMAGE_FILE_HEADER.Width then - invalidArg "buffer" "buffer too small to fit an IMAGE_FILE_HEADER" - IMAGE_FILE_HEADER( bytesToWord(buffer.[offset], buffer.[offset+1]), // Machine - bytesToWord(buffer.[offset+2], buffer.[offset+3]), // NumberOfSections - bytesToDWord(buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), // TimeDateStamp - bytesToDWord(buffer.[offset+8], buffer.[offset+9], buffer.[offset+10], buffer.[offset+11]), // PointerToSymbolTable - bytesToDWord(buffer.[offset+12], buffer.[offset+13], buffer.[offset+14], buffer.[offset+15]), // NumberOfSymbols - bytesToWord(buffer.[offset+16], buffer.[offset+17]), // SizeOfOptionalHeader - bytesToWord(buffer.[offset+18], buffer.[offset+19])) // Characteristics - -type IMAGE_SECTION_HEADER(n:int64, ai:int32, va:int32, srd:int32, prd:int32, pr:int32, pln:int32, nr:int16, nl:int16, c:int32) = - let mutable name = n - let mutable addressInfo = ai // PhysicalAddress / VirtualSize - let mutable virtualAddress = va - let mutable sizeOfRawData = srd - let mutable pointerToRawData = prd - let mutable pointerToRelocations = pr - let mutable pointerToLineNumbers = pln - let mutable numberOfRelocations = nr - let mutable numberOfLineNumbers = nl - let mutable characteristics = c - - member x.Name - with get() = name - and set(value) = name <- value - - member x.PhysicalAddress - with get() = addressInfo - and set(value) = addressInfo <- value - - member x.VirtualSize - with get() = addressInfo - and set(value) = addressInfo <- value - - member x.VirtualAddress - with get() = virtualAddress - and set(value) = virtualAddress <- value - - member x.SizeOfRawData - with get() = sizeOfRawData - and set(value) = sizeOfRawData <- value - - member x.PointerToRawData - with get() = pointerToRawData - and set(value) = pointerToRawData <- value - - member x.PointerToRelocations - with get() = pointerToRelocations - and set(value) = pointerToRelocations <- value - - member x.PointerToLineNumbers - with get() = pointerToLineNumbers - and set(value) = pointerToLineNumbers <- value - - member x.NumberOfRelocations - with get() = numberOfRelocations - and set(value) = numberOfRelocations <- value - - member x.NumberOfLineNumbers - with get() = numberOfLineNumbers - and set(value) = numberOfLineNumbers <- value - - member x.Characteristics - with get() = characteristics - and set(value) = characteristics <- value - - static member Width - with get() = 40 - - member x.toBytes () = - let buf = Bytebuf.create IMAGE_SECTION_HEADER.Width - Bytebuf.emit_i64 buf name - Bytebuf.emit_i32 buf addressInfo - Bytebuf.emit_i32 buf virtualAddress - Bytebuf.emit_i32 buf sizeOfRawData - Bytebuf.emit_i32 buf pointerToRawData - Bytebuf.emit_i32 buf pointerToRelocations - Bytebuf.emit_i32 buf pointerToLineNumbers - Bytebuf.emit_u16 buf ((uint16)numberOfRelocations) - Bytebuf.emit_u16 buf ((uint16)numberOfLineNumbers) - Bytebuf.emit_i32 buf characteristics - Bytebuf.close buf - - -let bytesToISH (buffer : byte[]) (offset : int) = - if (buffer.Length - offset) < IMAGE_SECTION_HEADER.Width then - invalidArg "buffer" "buffer too small to fit an IMAGE_SECTION_HEADER" - IMAGE_SECTION_HEADER(bytesToQWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3], buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), // Name - bytesToDWord(buffer.[offset+8], buffer.[offset+9], buffer.[offset+10], buffer.[offset+11]), // AddressInfo - bytesToDWord(buffer.[offset+12], buffer.[offset+13], buffer.[offset+14], buffer.[offset+15]), // VirtualAddress - bytesToDWord(buffer.[offset+16], buffer.[offset+17], buffer.[offset+18], buffer.[offset+19]), // SizeOfRawData - bytesToDWord(buffer.[offset+20], buffer.[offset+21], buffer.[offset+22], buffer.[offset+23]), // PointerToRawData - bytesToDWord(buffer.[offset+24], buffer.[offset+25], buffer.[offset+26], buffer.[offset+27]), // PointerToRelocations - bytesToDWord(buffer.[offset+28], buffer.[offset+29], buffer.[offset+30], buffer.[offset+31]), // PointerToLineNumbers - bytesToWord(buffer.[offset+32], buffer.[offset+33]), // NumberOfRelocations - bytesToWord(buffer.[offset+34], buffer.[offset+35]), // NumberOfLineNumbers - bytesToDWord(buffer.[offset+36], buffer.[offset+37], buffer.[offset+38], buffer.[offset+39])) // Characteristics - -type IMAGE_SYMBOL(n:int64, v:int32, sn:int16, t:int16, sc:byte, nas:byte) = - let mutable name = n - let mutable value = v - let mutable sectionNumber = sn - let mutable stype = t - let mutable storageClass = sc - let mutable numberOfAuxSymbols = nas - - member x.Name - with get() = name - and set(v) = name <- v - - member x.Value - with get() = value - and set(v) = value <- v - - member x.SectionNumber - with get() = sectionNumber - and set(v) = sectionNumber <- v - - member x.Type - with get() = stype - and set(v) = stype <- v - - member x.StorageClass - with get() = storageClass - and set(v) = storageClass <- v - - member x.NumberOfAuxSymbols - with get() = numberOfAuxSymbols - and set(v) = numberOfAuxSymbols <- v - - static member Width - with get() = 18 - - member x.toBytes() = - let buf = Bytebuf.create IMAGE_SYMBOL.Width - Bytebuf.emit_i64 buf name - Bytebuf.emit_i32 buf value - Bytebuf.emit_u16 buf ((uint16)sectionNumber) - Bytebuf.emit_u16 buf ((uint16)stype) - Bytebuf.emit_byte buf storageClass - Bytebuf.emit_byte buf numberOfAuxSymbols - Bytebuf.close buf - -let bytesToIS (buffer : byte[]) (offset : int) = - if (buffer.Length - offset) < IMAGE_SYMBOL.Width then - invalidArg "buffer" "buffer too small to fit an IMAGE_SYMBOL" - IMAGE_SYMBOL( bytesToQWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3], buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), // Name - bytesToDWord(buffer.[offset+8], buffer.[offset+9], buffer.[offset+10], buffer.[offset+11]), // Value - bytesToWord(buffer.[offset+12], buffer.[offset+13]), // SectionNumber - bytesToWord(buffer.[offset+14], buffer.[offset+15]), // Type - buffer.[offset+16], // StorageClass - buffer.[offset+17]) // NumberOfAuxSymbols - -type IMAGE_RELOCATION(va:int32, sti:int32, t:int16) = - let mutable virtualAddress = va // Also RelocCount - let mutable symbolTableIndex = sti - let mutable ty = t // type - - member x.VirtualAddress - with get() = virtualAddress - and set(v) = virtualAddress <- v - - member x.RelocCount - with get() = virtualAddress - and set(v) = virtualAddress <- v - - member x.SymbolTableIndex - with get() = symbolTableIndex - and set(v) = symbolTableIndex <- v - - member x.Type - with get() = ty - and set(v) = ty <- v - - static member Width - with get() = 10 - - member x.toBytes() = - let buf = Bytebuf.create IMAGE_RELOCATION.Width - Bytebuf.emit_i32 buf virtualAddress - Bytebuf.emit_i32 buf symbolTableIndex - Bytebuf.emit_u16 buf ((uint16)ty) - Bytebuf.close buf - -let bytesToIR (buffer : byte[]) (offset : int) = - if (buffer.Length - offset) < IMAGE_RELOCATION.Width then - invalidArg "buffer" "buffer too small to fit an IMAGE_RELOCATION" - IMAGE_RELOCATION( bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), - bytesToDWord(buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), - bytesToWord(buffer.[offset+8], buffer.[offset+9])) - -type IMAGE_RESOURCE_DIRECTORY(c:int32, tds:int32, mjv:int16, mnv:int16, nne:int16, nie:int16) = - let mutable characteristics = c - let mutable timeDateStamp = tds - let mutable majorVersion = mjv - let mutable minorVersion = mnv - let mutable numberOfNamedEntries = nne - let mutable numberOfIdEntries = nie - - member x.Characteristics - with get() = characteristics - and set(v) = characteristics <- v - - member x.TimeDateStamp - with get() = timeDateStamp - and set(v) = timeDateStamp <- v - - member x.MajorVersion - with get() = majorVersion - and set(v) = majorVersion <- v - - member x.MinorVersion - with get() = minorVersion - and set(v) = minorVersion <- v - - member x.NumberOfNamedEntries - with get() = numberOfNamedEntries - and set(v) = numberOfNamedEntries <- v - - member x.NumberOfIdEntries - with get() = numberOfIdEntries - and set(v) = numberOfIdEntries <- v - - static member Width = 16 - - member x.toBytes () = - let buf = Bytebuf.create IMAGE_RESOURCE_DIRECTORY.Width - Bytebuf.emit_i32 buf characteristics - Bytebuf.emit_i32 buf timeDateStamp - Bytebuf.emit_u16 buf ((uint16)majorVersion) - Bytebuf.emit_u16 buf ((uint16)minorVersion) - Bytebuf.emit_u16 buf ((uint16)numberOfNamedEntries) - Bytebuf.emit_u16 buf ((uint16)numberOfIdEntries) - Bytebuf.close buf - -let bytesToIRD (buffer:byte[]) (offset:int) = - if (buffer.Length - offset) < IMAGE_RESOURCE_DIRECTORY.Width then - invalidArg "buffer" "buffer too small to fit an IMAGE_RESOURCE_DIRECTORY" - IMAGE_RESOURCE_DIRECTORY( bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), // Characteristics - bytesToDWord(buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), // TimeDateStamp - bytesToWord(buffer.[offset+8], buffer.[offset+9]), // MajorVersion - bytesToWord(buffer.[offset+10], buffer.[offset+11]), // MinorVersion - bytesToWord(buffer.[offset+12], buffer.[offset+13]), // NumberOfNamedEntries - bytesToWord(buffer.[offset+14], buffer.[offset+15])) // NumberOfIdEntries - -type IMAGE_RESOURCE_DIRECTORY_ENTRY(n:int32, o:int32) = - let mutable name = n - let mutable offset = o - - member x.Name - with get() = name - and set(v) = name <- v - - member x.OffsetToData - with get() = offset - and set(v) = offset <- v - - member x.OffsetToDirectory - with get() = offset &&& 0x7fffffff - - member x.DataIsDirectory - with get() = (offset &&& 0x80000000) <> 0 - - static member Width = 8 - - member x.toBytes () = - let buf = Bytebuf.create IMAGE_RESOURCE_DIRECTORY_ENTRY.Width - Bytebuf.emit_i32 buf name - Bytebuf.emit_i32 buf offset - Bytebuf.close buf - -let bytesToIRDE (buffer:byte[]) (offset:int) = - if (buffer.Length - offset) < IMAGE_RESOURCE_DIRECTORY_ENTRY.Width then - invalidArg "buffer" "buffer too small to fit an IMAGE_RESOURCE_DIRECTORY_ENTRY" - IMAGE_RESOURCE_DIRECTORY_ENTRY( bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), // Name - bytesToDWord(buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7])) // Offset - -type IMAGE_RESOURCE_DATA_ENTRY(o:int32, s:int32, c:int32, r:int32) = - let mutable offsetToData = o - let mutable size = s - let mutable codePage = c - let mutable reserved = r - - member x.OffsetToData - with get() = offsetToData - and set(v) = offsetToData <- v - member x.Size - with get() = size - and set(v) = size <- v - member x.CodePage - with get() = codePage - and set(v) = codePage <- v - member x.Reserved - with get() = reserved - and set(v) = reserved <- v - - static member Width = 16 - - member x.toBytes() = - let buf = Bytebuf.create IMAGE_RESOURCE_DATA_ENTRY.Width - Bytebuf.emit_i32 buf offsetToData - Bytebuf.emit_i32 buf size - Bytebuf.emit_i32 buf codePage - Bytebuf.emit_i32 buf reserved - -let bytesToIRDataE (buffer:byte[]) (offset:int) = - if (buffer.Length - offset) < IMAGE_RESOURCE_DATA_ENTRY.Width then - invalidArg "buffer" "buffer too small to fit an IMAGE_RESOURCE_DATA_ENTRY" - IMAGE_RESOURCE_DATA_ENTRY(bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), // OffsetToData - bytesToDWord(buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), // Size - bytesToDWord(buffer.[offset+8], buffer.[offset+9], buffer.[offset+10], buffer.[offset+11]), // CodePage - bytesToDWord(buffer.[offset+12], buffer.[offset+13], buffer.[offset+14], buffer.[offset+15])) // Reserved - - -type ResFormatHeader() = - let mutable dwDataSize = 0 - let mutable dwHeaderSize = 32 // The eventual supposed size of this structure in memory - let mutable dwTypeID = 0xffff - let mutable dwNameID = 0xffff - let mutable dwDataVersion = 0 - let mutable wMemFlags = 0s - let mutable wLangID = 0s - let mutable dwVersion = 0 - let mutable dwCharacteristics = 0 - - member x.DataSize - with get() = dwDataSize - and set(v) = dwDataSize <- v - member x.HeaderSize - with get() = dwHeaderSize - and set(v) = dwHeaderSize <- v - member x.TypeID - with get() = dwTypeID - and set(v) = dwTypeID <- v - member x.NameID - with get() = dwNameID - and set(v) = dwNameID <- v - member x.DataVersion - with get() = dwDataVersion - and set(v) = dwDataVersion <- v - member x.MemFlags - with get() = wMemFlags - and set(v) = wMemFlags <- v - member x.LangID - with get() = wLangID - and set(v) = wLangID <- v - member x.Version - with get() = dwVersion - and set(v) = dwVersion <- v - member x.Characteristics - with get() = dwCharacteristics - and set(v) = dwCharacteristics <- v - - static member Width = 32 - - member x.toBytes() = - let buf = Bytebuf.create ResFormatHeader.Width - Bytebuf.emit_i32 buf dwDataSize - Bytebuf.emit_i32 buf dwHeaderSize - Bytebuf.emit_i32 buf dwTypeID - Bytebuf.emit_i32 buf dwNameID - Bytebuf.emit_i32 buf dwDataVersion - Bytebuf.emit_u16 buf ((uint16)wMemFlags) - Bytebuf.emit_u16 buf ((uint16)wLangID) - Bytebuf.emit_i32 buf dwVersion - Bytebuf.emit_i32 buf dwCharacteristics - Bytebuf.close buf - -type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedResource:byte[]) = - let mutable resHdr = ResFormatHeader() - let mutable dataEntry = Unchecked.defaultof - let mutable cType = 0 - let mutable wzType = Unchecked.defaultof - let mutable cName = 0 - let mutable wzName = Unchecked.defaultof - - do - if (tid &&& 0x80000000) <> 0 then // REVIEW: Are names and types mutually exclusive? The C++ code didn't seem to think so, but I can't find any documentation - resHdr.TypeID <- 0 ; - let mtid = tid &&& 0x7fffffff - cType <- bytesToDWord(pbLinkedResource.[mtid], pbLinkedResource.[mtid+1], pbLinkedResource.[mtid+2], pbLinkedResource.[mtid+3]) ; - wzType <- Bytes.zero_create ((cType + 1) * 2) ; - Bytes.blit pbLinkedResource 4 wzType 0 (cType * 2) - else - resHdr.TypeID <- (0xffff ||| ((tid &&& 0xffff) <<< 16)) ; - - if (nid &&& 0x80000000) <> 0 then - resHdr.NameID <- 0 ; - let mnid = nid &&& 0x7fffffff - cName <- bytesToDWord(pbLinkedResource.[mnid], pbLinkedResource.[mnid+1], pbLinkedResource.[mnid+2], pbLinkedResource.[mnid+3]) ; - wzName <- Bytes.zero_create ((cName + 1) * 2) ; - Bytes.blit pbLinkedResource 4 wzName 0 (cName * 2) - else - resHdr.NameID <- (0xffff ||| ((nid &&& 0xffff) <<< 16)) - - resHdr.LangID <- (int16)lid ; - dataEntry <- bytesToIRDataE pbLinkedResource dataOffset ; - resHdr.DataSize <- dataEntry.Size - - member x.ResHdr - with get() = resHdr - member x.DataEntry - with get() = dataEntry - member x.Type - with get() = wzType - member x.Name - with get() = wzName - - member x.Save(ulLinkedResourceBaseRVA:int32, pbLinkedResource:byte[], pUnlinkedResource:byte[], offset:int) = - // Dump them to pUnlinkedResource - // For each resource write header and data - let size = ref 0 - let unlinkedResourceOffset = ref 0 - //resHdr.HeaderSize <- 32 - if Unchecked.defaultof <> wzType then - resHdr.HeaderSize <- resHdr.HeaderSize + ((cType + 1) * 2) - 4 - if Unchecked.defaultof <> wzName then - resHdr.HeaderSize <- resHdr.HeaderSize + ((cName + 1) * 2) - 4 - - let SaveChunk(p : byte[], sz : int) = - if Unchecked.defaultof <> pUnlinkedResource then - Bytes.blit p 0 pUnlinkedResource (!unlinkedResourceOffset + offset) sz - unlinkedResourceOffset := !unlinkedResourceOffset + sz ; - size := !size + sz ; - - () - - // ---- Constant part of the header : DWORD, DWORD - SaveChunk(dwToBytes resHdr.DataSize) - SaveChunk(dwToBytes resHdr.HeaderSize) - - let mutable dwFiller = 0 - - if Unchecked.defaultof <> wzType then - SaveChunk(wzType,((cType + 1) * 2)) - dwFiller <- dwFiller + cType + 1 - else - SaveChunk(dwToBytes resHdr.TypeID) - if Unchecked.defaultof <> wzName then - SaveChunk(wzName, ((cName + 1) * 2)) - dwFiller <- dwFiller + cName + 1 - else - SaveChunk(dwToBytes resHdr.NameID) - - let bNil = Bytes.zero_create 3 - - // Align remaining fields on DWORD (nb. poor bit twiddling code taken from ildasm's dres.cpp) - if (dwFiller &&& 0x1) <> 0 then - SaveChunk(bNil, 2) - - //---- Constant part of the header: DWORD,WORD,WORD,DWORD,DWORD - SaveChunk(dwToBytes resHdr.DataVersion) - SaveChunk(wToBytes resHdr.MemFlags) - SaveChunk(wToBytes resHdr.LangID) - SaveChunk(dwToBytes resHdr.Version) - SaveChunk(dwToBytes resHdr.Characteristics) - - //---- Header done, now data - // just copying to make the code a bit cleaner - can blit if this ends up being a liability - let pbData = pbLinkedResource.[(dataEntry.OffsetToData - ulLinkedResourceBaseRVA) ..] - SaveChunk(pbData, dataEntry.Size) - - dwFiller <- dataEntry.Size &&& 0x3 ; - if dwFiller <> 0 then - SaveChunk(bNil, 4 - dwFiller) - - !size - - -let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRVA:int32) (fileType:PEFileType) (outputFilePath:string) = - let nPEFileType = match fileType with X86 -> 0 | X64 -> 2 - let mutable tempResFiles : string list = [] - let mutable objBytes : byte[] = [||] - - let unlinkedResources = unlinkedResources |> List.filter (fun arr -> arr.Length > 0) - if unlinkedResources.Length = 0 then // bail if there's nothing to link - objBytes - else - // Part 1: Write unlinked resources to an object file for linking - // check if the first dword is 0x0 - let firstDWord = bytesToDWord(unlinkedResources.[0].[0], unlinkedResources.[0].[1], unlinkedResources.[0].[2], unlinkedResources.[0].[3]) - if firstDWord = 0 then - // build the command line invocation string for cvtres.exe - let corSystemDir = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() - // We'll use the current dir and a random file name rather than System.IO.Path.GetTempFileName - // to try and prevent the command line invocation string from being > MAX_PATH - - - let outputFilePaths = - if outputFilePath = "" then - [ Path.GetTempPath() ] - else - [ Path.GetTempPath() ; (outputFilePath ^ "\\") ] - - // Get a unique random file - let rec GetUniqueRandomFileName(path) = - let tfn = path ^ System.IO.Path.GetRandomFileName() - if System.IO.File.Exists(tfn) then - GetUniqueRandomFileName(path) - else - tfn - - - let machine = if 2 = nPEFileType then "X64" else "X86" - let cmdLineArgsPreamble = sprintf "/NOLOGO /READONLY /MACHINE:%s" machine - - let cvtres = corSystemDir^"cvtres.exe " - - let create_cvtres_args path = - let tempObjFileName = GetUniqueRandomFileName(path) - let mutable cmdLineArgs = sprintf "%s \"/Out:%s\"" cmdLineArgsPreamble tempObjFileName - let mutable resFiles : string list = [] - - for ulr in unlinkedResources do - let tempResFileName = GetUniqueRandomFileName(path) - resFiles <- tempResFileName :: resFiles ; - cmdLineArgs <- cmdLineArgs ^ " \"" ^ tempResFileName ^ "\"" - let trf = resFiles - let cmd = cmdLineArgs - cmd,tempObjFileName,trf - - let cmdLineArgs,tempObjFileName,tempResFileNames = - let attempts = - outputFilePaths |> - List.map (fun path -> create_cvtres_args path) |> - List.filter (fun ((argstring:string),(t:string),(f:string list)) -> (cvtres.Length + argstring.Length) < MAX_PATH) - match attempts with - | [] -> create_cvtres_args ".\\" // hope for the best... - | (invoc,tmp,files) :: rest -> tempResFiles <- files ; (invoc,tmp,files) // use the first one, since they're listed in order of precedence - - let cvtres_invocation = cvtres ^ cmdLineArgs - - try - let mutable iFiles = 0 - - for ulr in unlinkedResources do - // REVIEW: What can go wrong here? What happens when the various file calls fail - // dump the unlinked resource bytes into the temp file - System.IO.File.WriteAllBytes(tempResFileNames.[iFiles], ulr) ; - iFiles <- iFiles + 1 - - // call cvtres.exe using the full cmd line string we've generated - - // check to see if the generated string is too long - if it is, fail with E_FAIL - if cvtres_invocation.Length >= MAX_PATH then - System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(E_FAIL) - - // REVIEW: We really shouldn't be calling out to cvtres - let mutable psi = System.Diagnostics.ProcessStartInfo(cvtres) - psi.Arguments <- cmdLineArgs ; - psi.CreateNoWindow <- true ; // REVIEW: For some reason, this still creates a window unless WindowStyle is set to hidden - psi.WindowStyle <- System.Diagnostics.ProcessWindowStyle.Hidden ; - let p = System.Diagnostics.Process.Start(psi) - - // Wait for the process to finish - p.WaitForExit() - - check "Process.Start" p.ExitCode // TODO: really need to check against 0 - - // Conversion was successful, so read the object file - objBytes <- System.IO.File.ReadAllBytes(tempObjFileName) ; - //Array.Copy(objBytes, pbUnlinkedResource, pbUnlinkedResource.Length) - System.IO.File.Delete(tempObjFileName) - finally - // clean up the temp files - List.iter (fun tempResFileName -> System.IO.File.Delete(tempResFileName)) tempResFiles - - // Part 2: Read the COFF file held in pbUnlinkedResource, spit it out into pResBuffer and apply the COFF fixups - // pResBuffer will become the .rsrc section of the PE file - if (objBytes = Unchecked.defaultof) then - System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(E_FAIL) - - let hMod = bytesToIFH objBytes 0 - - if hMod.SizeOfOptionalHeader <> 0s then - System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(E_FAIL) - - let rsrc01Name = 0x313024637273722eL // ".rsrc$01" - let rsrc02Name = 0x323024637273722eL // ".rsrc$02" - let nullHdr = Unchecked.defaultof - let mutable rsrc01 = nullHdr - let mutable rsrc02 = nullHdr - - for i = 0 to (int)hMod.NumberOfSections do - let pSection = bytesToISH objBytes (IMAGE_FILE_HEADER.Width + (IMAGE_SECTION_HEADER.Width * i)) - if pSection.Name = rsrc01Name then - rsrc01 <- pSection - else if pSection.Name = rsrc02Name then - rsrc02 <- pSection - - if (nullHdr = rsrc01) || (nullHdr = rsrc02) then - // One of the rsrc sections wasn't found - System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(E_FAIL) - - let size = rsrc01.SizeOfRawData + rsrc02.SizeOfRawData - - - let pResBuffer = Bytes.zero_create size - - // Copy over the raw data - Bytes.blit objBytes rsrc01.PointerToRawData pResBuffer 0 rsrc01.SizeOfRawData - - // map all the relocs in .rsrc$01 using the reloc and symbol tables in the COFF object - let symbolTableHead = hMod.PointerToSymbolTable - let IMAGE_SYM_CLASS_STATIC = 0x3uy - let IMAGE_SYM_TYPE_NULL = 0x0s - - let GetSymbolEntry (buffer : byte[]) (idx : int) = - bytesToIS buffer (symbolTableHead + (idx * IMAGE_SYMBOL.Width) ) - - for iReloc = 0 to (int)(rsrc01.NumberOfRelocations - 1s) do - let pReloc = bytesToIR objBytes (rsrc01.PointerToRelocations + (iReloc * IMAGE_RELOCATION.Width)) - let IdxSymbol = pReloc.SymbolTableIndex - let pSymbolEntry = GetSymbolEntry objBytes IdxSymbol - - // Ensure the symbol entry is valid for a resource - if ((pSymbolEntry.StorageClass <> IMAGE_SYM_CLASS_STATIC) || - (pSymbolEntry.Type <> IMAGE_SYM_TYPE_NULL) || - (pSymbolEntry.SectionNumber <> 3s)) then - System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(E_FAIL) - - // Ensure that RVA is a valid address inside rsrc02 - if pSymbolEntry.Value >= rsrc02.SizeOfRawData then - // pSymbolEntry.Value is too big - System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(E_FAIL) - - // store the value - let vBuff, vSize = dwToBytes (ulLinkedResourceBaseRVA + rsrc01.SizeOfRawData + pSymbolEntry.Value) - //Bytes.blit objBytes rsrc02.PointerToRawData pResBuffer pReloc.VirtualAddress rsrc02.SizeOfRawData - Bytes.blit vBuff 0 pResBuffer pReloc.VirtualAddress vSize - // Copy $02 (resource raw into pResBuffer - Bytes.blit objBytes rsrc02.PointerToRawData pResBuffer rsrc01.SizeOfRawData rsrc02.SizeOfRawData - - // return the buffer - pResBuffer - - -let DateTime1970Jan01 = new System.DateTime(1970,1,1,0,0,0,System.DateTimeKind.Utc) (* ECMA Spec (Oct2002), Part II, 24.2.2 PE File Header. *) -let absilWriteGetTimeStamp () = (System.DateTime.UtcNow - DateTime1970Jan01).TotalSeconds |> int - -let clrInstallationDirectory () = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() -let clrVersion () = System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion() - -let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) = - let mutable nResNodes = 0 - - let pirdType = bytesToIRD pbLinkedResource 0 - let mutable pirdeType = Unchecked.defaultof - let nEntries = pirdType.NumberOfNamedEntries + pirdType.NumberOfIdEntries - - // determine entry buffer size - // TODO: coalesce these two loops - for iEntry = 0 to ((int)nEntries - 1) do - pirdeType <- bytesToIRDE pbLinkedResource (IMAGE_RESOURCE_DIRECTORY.Width + (iEntry * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) ; - - if pirdeType.DataIsDirectory then - let nameBase = pirdeType.OffsetToDirectory - let pirdName = bytesToIRD pbLinkedResource nameBase - let mutable pirdeName = Unchecked.defaultof - let nEntries2 = pirdName.NumberOfNamedEntries + pirdName.NumberOfIdEntries - - for iEntry2 = 0 to ((int)nEntries2 - 1) do - pirdeName <- bytesToIRDE pbLinkedResource (nameBase + (iEntry2 * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) ; - let dwNameID = pirdeName.Name - - if pirdeName.DataIsDirectory then - let langBase = pirdeName.OffsetToDirectory - let pirdLang = bytesToIRD pbLinkedResource langBase - let nEntries3 = pirdLang.NumberOfNamedEntries + pirdLang.NumberOfIdEntries - - nResNodes <- nResNodes + ((int)nEntries3) ; - else - nResNodes <- nResNodes + 1 ; - else - nResNodes <- nResNodes + 1 ; - - let pResNodes : ResFormatNode [] = Array.zeroCreate nResNodes - nResNodes <- 0 ; - - // fill out the entry buffer - for iEntry = 0 to ((int)nEntries - 1) do - pirdeType <- bytesToIRDE pbLinkedResource (IMAGE_RESOURCE_DIRECTORY.Width + (iEntry * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) ; - let dwTypeID = pirdeType.Name - // Need to skip VERSION and RT_MANIFEST resources - // REVIEW: ideally we shouldn't allocate space for these, or rename properly so we don't get the naming conflict - let skipResource = (0x10 = dwTypeID) || (0x18 = dwTypeID) - if pirdeType.DataIsDirectory then - let nameBase = pirdeType.OffsetToDirectory - let pirdName = bytesToIRD pbLinkedResource nameBase - let mutable pirdeName = Unchecked.defaultof - let nEntries2 = pirdName.NumberOfNamedEntries + pirdName.NumberOfIdEntries - - for iEntry2 = 0 to ((int)nEntries2 - 1) do - pirdeName <- bytesToIRDE pbLinkedResource (nameBase + (iEntry2 * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) ; - let dwNameID = pirdeName.Name - - if pirdeName.DataIsDirectory then - let langBase = pirdeName.OffsetToDirectory - let pirdLang = bytesToIRD pbLinkedResource langBase - let mutable pirdeLang = Unchecked.defaultof - let nEntries3 = pirdLang.NumberOfNamedEntries + pirdLang.NumberOfIdEntries - - for iEntry3 = 0 to ((int)nEntries3 - 1) do - pirdeLang <- bytesToIRDE pbLinkedResource (langBase + (iEntry3 * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) ; - let dwLangID = pirdeLang.Name - - if pirdeLang.DataIsDirectory then - // Resource hierarchy exceeds three levels - System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(E_FAIL) - else - if (not skipResource) then - let rfn = ResFormatNode(dwTypeID, dwNameID, dwLangID, pirdeLang.OffsetToData, pbLinkedResource) - pResNodes.[nResNodes] <- rfn ; - nResNodes <- nResNodes + 1 ; - else - if (not skipResource) then - let rfn = ResFormatNode(dwTypeID, dwNameID, 0, pirdeName.OffsetToData, pbLinkedResource) - pResNodes.[nResNodes] <- rfn ; - nResNodes <- nResNodes + 1 ; - else - if (not skipResource) then - let rfn = ResFormatNode(dwTypeID, 0, 0, pirdeType.OffsetToData, pbLinkedResource) // REVIEW: I believe these 0s are what's causing the duplicate res naming problems - pResNodes.[nResNodes] <- rfn ; - nResNodes <- nResNodes + 1 ; - - // Ok, all tree leaves are in ResFormatNode structs, and nResNodes ptrs are in pResNodes - let mutable size = 0 - if nResNodes <> 0 then - size <- size + ResFormatHeader.Width ; // sizeof(ResFormatHeader) - for i = 0 to (nResNodes - 1) do - size <- size + pResNodes.[i].Save(ulLinkedResourceBaseRVA, pbLinkedResource, Unchecked.defaultof, 0) ; - - let pResBuffer = Bytes.zero_create size - - if nResNodes <> 0 then - let mutable resBufferOffset = 0 - - // Write a dummy header - let rfh = ResFormatHeader() - let rfhBytes = rfh.toBytes() - Bytes.blit rfhBytes 0 pResBuffer 0 ResFormatHeader.Width - resBufferOffset <- resBufferOffset + ResFormatHeader.Width ; - - for i = 0 to (nResNodes - 1) do - resBufferOffset <- resBufferOffset + pResNodes.[i].Save(ulLinkedResourceBaseRVA, pbLinkedResource, pResBuffer, resBufferOffset) ; - - pResBuffer - - -// PDB Writing - -[] -[] -[] -type IMetaDataDispenser = - interface - abstract DefineScope : unit -> unit // need this here to fill the first vtable slot - abstract OpenScope : [] szScope : string * [] dwOpenFlags:Int32 * [] riid : System.Guid byref * [] punk:Object byref -> unit - end - -[] -[] -[] -[] -type IMetadataImport = - interface - abstract Placeholder : unit -> unit - end - -[] -[] -[] -[] -type IMetadataEmit = - interface - abstract Placeholder : unit -> unit - end - -[] -[< Guid("B01FAFEB-C450-3A4D-BEEC-B4CEEC01E006") ; InterfaceType(ComInterfaceType.InterfaceIsIUnknown) >] -[< ComVisible(false) >] -type ISymUnmanagedDocumentWriter = - interface - abstract SetSource : sourceSize : int * - source : byte[] -> unit - abstract SetCheckSum : algorithmId : System.Guid * - checkSumSize : int * - checkSum : byte [] -> unit - end - -// Struct used to retrieve info on the debug output -[] // REVIEW - can we infer this from the use of StructLayout? -[] -type ImageDebugDirectory = - struct - val Characteristics : int32 - val TimeDateStamp : int32 - val MajorVersion : int16 - val MinorVersion : int16 - val Type : int32 - val SizeOfData : int32 - val AddressOfRawData : int32 - val PointerToRawData : int32 - end - -[] -[] -[] -type ISymUnmanagedWriter2 = - interface - abstract DefineDocument : [] url : string * - language : System.Guid byref * - languageVendor : System.Guid byref * - documentType : System.Guid byref * - [] RetVal : ISymUnmanagedDocumentWriter byref -> unit - abstract SetUserEntryPoint : entryMethod : uint32 -> unit - abstract OpenMethod : meth : int -> unit - abstract CloseMethod : unit -> unit - abstract OpenScope : startOffset : int * pRetVal : int byref -> unit - abstract CloseScope : endOffset : int -> unit - abstract SetScopeRange : scopeID : int * startOffset : int * endOffset : int -> unit - abstract DefineLocalVariable : [] varname : string * - attributes : int * - cSig : int * - []signature : byte[] * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int * - startOffset : int * - endOffset : int -> unit - abstract DefineParameter : [] paramname : string * - attributes : int * - sequence : int * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int -> unit - abstract DefineField : parent : int * - [] fieldname : string * - attributes : int * - cSig : int * - []signature : byte[] * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int -> unit - abstract DefineGlobalVariable : [] globalvarname : string * - attributes : int * - cSig : int * - []signature : byte[] * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int -> unit - abstract Close : unit -> unit - abstract SetSymAttribute : parent : int * - [] attname : string * - cData : int * - []data : byte[] -> unit - abstract OpenNamespace : [] nsname : string -> unit - abstract CloseNamespace : unit -> unit - abstract UsingNamespace : [] fullName : string -> unit - abstract SetMethodSourceRange : startDoc : ISymUnmanagedDocumentWriter * - startLine : int * - startColumn : int * - endDoc : ISymUnmanagedDocumentWriter * - endLine : int * - endColumn : int -> unit - abstract Initialize : emitter : nativeint * - [] filename : string * - stream : IStream * - fullBuild : bool -> unit - abstract GetDebugInfo : iDD : ImageDebugDirectory byref * - cData : int * - pcData : int byref * - []data : byte[] -> unit - abstract DefineSequencePoints : document : ISymUnmanagedDocumentWriter * - spCount : int * - []offsets : int [] * - []lines : int [] * - []columns : int [] * - []endLines : int [] * - []endColumns : int [] -> unit - abstract RemapToken : oldToken : int * newToken : int -> unit - abstract Initialize2 : emitter : nativeint * - [] tempfilename : string * - stream : IStream * - fullBuild : bool * - [] finalfilename : string -> unit - abstract DefineConstant : [] constname : string * - value : Object * - cSig : int * - []signature : byte[] -> unit - abstract Abort : unit -> unit - abstract DefineLocalVariable2 : [] localvarname2 : string * - attributes : int * - sigToken : int * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int * - startOffset : int * - endOffset : int -> unit - abstract DefineGlobalVariable2 : [] globalvarname2 : string * - attributes : int * - sigToken : int * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int -> unit - abstract DefineConstant2 : [] constantname2 : string * - value : Object * - sigToken : int -> unit - abstract OpenMethod2 : method2 : int * - isect : int * - offset : int -> unit - - end - -type pdb_writer = { symWriter : ISymUnmanagedWriter2 } -type pdb_document_writer = { symDocWriter : ISymUnmanagedDocumentWriter } (* pointer to pDocumentWriter COM object *) - -type idd = - { iddCharacteristics: int32; - iddMajorVersion: int32; (* actually u16 in IMAGE_DEBUG_DIRECTORY *) - iddMinorVersion: int32; (* acutally u16 in IMAGE_DEBUG_DIRECTORY *) - iddType: int32; - iddData: byte[];} - -let pdbInitialize (binaryName:string) (pdbName:string) = - // collect necessary COM types - let CorMetaDataDispenser = System.Type.GetTypeFromProgID("CLRMetaData.CorMetaDataDispenser") - let CorSymWriter = System.Type.GetTypeFromProgID("CorSymWriter_SxS") - - // get the importer pointer - let mdd = System.Activator.CreateInstance(CorMetaDataDispenser) :?> IMetaDataDispenser - let mutable IID_IMetaDataEmit = new Guid("BA3FEE4C-ECB9-4E41-83B7-183FA41CD859"); - let mutable o = Object() - mdd.OpenScope(binaryName, 0x1, &IID_IMetaDataEmit, &o) // 0x1 = ofWrite - let emitterPtr = Marshal.GetComInterfaceForObject(o, typeof) - let writer = - try - let writer = Activator.CreateInstance(System.Type.GetTypeFromProgID("CorSymWriter_SxS")) :?> ISymUnmanagedWriter2 - writer.Initialize(emitterPtr, pdbName, Unchecked.defaultof, true) - writer - finally - // Marshal.GetComInterfaceForObject adds an extra ref for emitterPtr - if IntPtr.Zero <> emitterPtr then - Marshal.Release(emitterPtr) |> ignore - - { symWriter = writer } - - -[] -do() - -[] -let pdbClose (writer:pdb_writer) = - writer.symWriter.Close() - // REVIEW: - // Ok, this is really ugly: - // CorSymWriter objects (ISymUnmanagedWriter) lock the files they're operating - // on (both the pdb and the binary). The locks are released only when their ref - // count reaches zero, but since we're dealing with RCWs, there's no telling when - // that will be. The result is that sometimes, the pdb and object files will - // still be locked well after the call to this function. - // The SymReader class gets around this problem by implementing the ISymUnmanagedDispose - // interface, which the SymWriter class, unfortunately, does not. - // Right now, I'm taking the same approach as mdbg, and manually forcing a collection - // This is ghastly but, it seems at this point, necessary. - - let rc = Marshal.ReleaseComObject(writer.symWriter) - for i = 0 to (rc - 1) do - Marshal.ReleaseComObject(writer.symWriter) |> ignore - - System.GC.Collect(); - System.GC.Collect(); - System.GC.WaitForPendingFinalizers(); - - System.GC.Collect(); - System.GC.Collect(); - System.GC.WaitForPendingFinalizers(); - - System.GC.Collect(); - System.GC.Collect(); - System.GC.WaitForPendingFinalizers() - -let pdbSetUserEntryPoint (writer:pdb_writer) (entryMethodToken:int32) = - writer.symWriter.SetUserEntryPoint((uint32)entryMethodToken) - -let pdbDefineDocument (writer:pdb_writer) (url:string) = - //3F5162F8-07C6-11D3-9053-00C04FA302A1 - let mutable corSymLanguageTypeCSharp = System.Guid(0x3F5162F8u, 0x07C6us, 0x11D3us, 0x90uy, 0x53uy, 0x00uy, 0xC0uy, 0x4Fuy, 0xA3uy, 0x02uy, 0xA1uy) - let mutable corSymLanguageTypeFSharp = System.Guid(0xAB4F38C9u, 0xB6E6us, 0x43baus, 0xBEuy, 0x3Buy, 0x58uy, 0x08uy, 0x0Buy, 0x2Cuy, 0xCCuy, 0xE3uy) - let mutable corSymLanguageVendorMicrosoft = System.Guid(0x994b45c4u, 0xe6e9us, 0x11d2us, 0x90uy, 0x3fuy, 0x00uy, 0xc0uy, 0x4fuy, 0xa3uy, 0x02uy, 0xa1uy) - let mutable corSymDocumentTypeText = System.Guid(0x5a869d0bu, 0x6611us, 0x11d3us, 0xbduy, 0x2auy, 0x0uy, 0x0uy, 0xf8uy, 0x8uy, 0x49uy, 0xbduy) - let mutable docWriter = Unchecked.defaultof - writer.symWriter.DefineDocument(url, &corSymLanguageTypeFSharp, &corSymLanguageVendorMicrosoft, &corSymDocumentTypeText, &docWriter) - { symDocWriter = docWriter } - -let pdbOpenMethod (writer:pdb_writer) (methodToken:int32) = - writer.symWriter.OpenMethod(methodToken) - -let pdbCloseMethod (writer:pdb_writer) = - writer.symWriter.CloseMethod() - -let pdbOpenScope (writer:pdb_writer) (startOffset:int32) = - let mutable retInt = 0 - writer.symWriter.OpenScope(startOffset, &retInt) - check "action" (retInt) - -let pdbCloseScope (writer:pdb_writer) (endOffset:int32) = - writer.symWriter.CloseScope(endOffset) - -let pdbDefineLocalVariable (writer:pdb_writer) (name:string) (signature:byte[]) (addr1:int32) = - writer.symWriter.DefineLocalVariable(name, 0, signature.Length, signature, (int)System.Diagnostics.SymbolStore.SymAddressKind.ILOffset, addr1, 0, 0, 0, 0) - -let pdbSetMethodRange (writer:pdb_writer) (docWriter1: pdb_document_writer) (startLine:int) (startCol:int) (docWriter2: pdb_document_writer) (endLine:int) (endCol:int) = - writer.symWriter.SetMethodSourceRange(docWriter1.symDocWriter, startLine, startCol, docWriter2.symDocWriter, endLine, endCol) - -let pdbDefineSequencePoints (writer:pdb_writer) (docWriter: pdb_document_writer) (pts: (int * int * int * int * int) array) = - let offsets = (Array.map (fun (x,_,_,_,_) -> x) pts) in - let lines = (Array.map (fun (_,x,_,_,_) -> x) pts) in - let columns = (Array.map (fun (_,_,x,_,_) -> x) pts) in - let endLines = (Array.map (fun (_,_,_,x,_) -> x) pts) in - let endColumns = (Array.map (fun (_,_,_,_,x) -> x) pts) in - writer.symWriter.DefineSequencePoints(docWriter.symDocWriter, pts.Length, offsets, lines, columns, endLines, endColumns) - -let pdbGetDebugInfo (writer: pdb_writer) = - let mutable iDD = new ImageDebugDirectory() - let mutable length = 0 - writer.symWriter.GetDebugInfo(&iDD, 0, &length, null) - let mutable data : byte [] = Array.zeroCreate length - writer.symWriter.GetDebugInfo(&iDD, length, &length, data) - - { iddCharacteristics = iDD.Characteristics; - iddMajorVersion = (int32)iDD.MajorVersion; - iddMinorVersion = (int32)iDD.MinorVersion; - iddType = iDD.Type; - iddData = data} - - -// PDB reading -type pdb_reader = { symReader: ISymbolReader } -type pdb_document = { symDocument: ISymbolDocument } -type pdb_method = { symMethod: ISymbolMethod } -type pdb_variable = { symVariable: ISymbolVariable } -type pdb_method_scope = { symScope: ISymbolScope } - -type pdb_sequence_point = - { pdbSeqPointOffset: int; - pdbSeqPointDocument: pdb_document; - pdbSeqPointLine: int; - pdbSeqPointColumn: int; - pdbSeqPointEndLine: int; - pdbSeqPointEndColumn: int; } - -let pdbReadOpen (moduleName:string) (path:string) : pdb_reader = - let CorMetaDataDispenser = System.Type.GetTypeFromProgID("CLRMetaData.CorMetaDataDispenser") - let mutable IID_IMetaDataImport = new Guid("7DAC8207-D3AE-4c75-9B67-92801A497D44"); - let mdd = System.Activator.CreateInstance(CorMetaDataDispenser) :?> IMetaDataDispenser - let mutable o : Object = new Object() - mdd.OpenScope(moduleName, 0, &IID_IMetaDataImport, &o) ; - let importerPtr = Marshal.GetComInterfaceForObject(o, typeof) - try - let symbolBinder = System.Diagnostics.SymbolStore.SymBinder() - { symReader = symbolBinder.GetReader(importerPtr, moduleName, path) } - finally - // Marshal.GetComInterfaceForObject adds an extra ref for importerPtr - if IntPtr.Zero <> importerPtr then - Marshal.Release(importerPtr) |> ignore - -// REVIEW: -// The symbol reader's finalize method will clean up any unmanaged resources. -// If file locks persist, we may want to manually invoke finalize -let pdbReadClose (reader:pdb_reader) : unit = () - -let pdbReaderGetMethod (reader:pdb_reader) (token:int32) : pdb_method = - { symMethod = reader.symReader.GetMethod(System.Diagnostics.SymbolStore.SymbolToken(token)) } - -let pdbReaderGetMethodFromDocumentPosition (reader:pdb_reader) (document:pdb_document) (line:int) (column:int) : pdb_method = - { symMethod = reader.symReader.GetMethodFromDocumentPosition(document.symDocument, line, column) } - -let pdbReaderGetDocuments (reader:pdb_reader) : pdb_document array = - let arr = reader.symReader.GetDocuments() - Array.map (fun i -> { symDocument=i }) arr - -let pdbReaderGetDocument (reader:pdb_reader) (url:string) (language:byte[]) (languageVendor:byte[]) (documentType:byte[]) : pdb_document = - { symDocument = reader.symReader.GetDocument(url, System.Guid(language), System.Guid(languageVendor), System.Guid(documentType)) } - -let pdbDocumentGetURL (document:pdb_document) : string = - document.symDocument.URL - -let pdbDocumentGetType (document:pdb_document) : byte[] (* guid *) = - let guid = document.symDocument.DocumentType - guid.ToByteArray() - -let pdbDocumentGetLanguage (document:pdb_document) : byte[] (* guid *) = - let guid = document.symDocument.Language - guid.ToByteArray() - -let pdbDocumentGetLanguageVendor (document:pdb_document) : byte[] = - let guid = document.symDocument.LanguageVendor - guid.ToByteArray() - -let pdbDocumentFindClosestLine (document:pdb_document) (line:int) : int = - document.symDocument.FindClosestLine(line) - -let pdbMethodGetToken (meth:pdb_method) : int32 = - let token = meth.symMethod.Token - token.GetToken() - -let pdbMethodGetRootScope (meth:pdb_method) : pdb_method_scope = - { symScope = meth.symMethod.RootScope } - -let pdbMethodGetSequencePoints (meth:pdb_method) : pdb_sequence_point array = - let pSize = meth.symMethod.SequencePointCount - let offsets = Array.zeroCreate pSize - let docs = Array.zeroCreate pSize - let lines = Array.zeroCreate pSize - let cols = Array.zeroCreate pSize - let endLines = Array.zeroCreate pSize - let endColumns = Array.zeroCreate pSize - - meth.symMethod.GetSequencePoints(offsets, docs, lines, cols, endLines, endColumns) - - Array.init pSize (fun i -> - { pdbSeqPointOffset = offsets.[i]; - pdbSeqPointDocument = { symDocument = docs.[i] }; - pdbSeqPointLine = lines.[i]; - pdbSeqPointColumn = cols.[i]; - pdbSeqPointEndLine = endLines.[i]; - pdbSeqPointEndColumn = endColumns.[i]; }) - -let pdbScopeGetChildren (scope:pdb_method_scope) : pdb_method_scope array = - let arr = scope.symScope.GetChildren() - Array.map (fun i -> { symScope=i }) arr - -let pdbScopeGetOffsets (scope:pdb_method_scope) : int * int = - (scope.symScope.StartOffset, scope.symScope.EndOffset) - -let pdbScopeGetLocals (scope:pdb_method_scope) : pdb_variable array = - let arr = scope.symScope.GetLocals() - Array.map (fun i -> { symVariable=i }) arr - -let pdbVariableGetName (variable:pdb_variable) : string = - variable.symVariable.Name - -let pdbVariableGetSignature (variable:pdb_variable) : byte[] = - variable.symVariable.GetSignature() - -// the tuple is (AddressKind, AddressField1) -let pdbVariableGetAddressAttributes (variable:pdb_variable) : (int32 * int32) = - ((int32)variable.symVariable.AddressKind,variable.symVariable.AddressField1) - -// Key signing -type keyContainerName = string -type keyPair = byte[] -type pubkey = byte[] - -#if FX_ATLEAST_40 -// new mscoree functionality -// This type represents methods that we don't currently need, so I'm leaving unimplemented -type UnusedCOMMethod = unit -> unit -[] -[] -type ICLRMetaHost = - interface - [] - abstract GetRuntime : - [] version : string * - [] interfaceId : System.Guid -> [] System.Object - - // REVIEW: Methods that we don't need will be stubbed out for now... - abstract GetVersionFromFile : UnusedCOMMethod - abstract EnumerateInstalledRuntimes : UnusedCOMMethod - abstract EnumerateLoadedRuntimes : UnusedCOMMethod - abstract Reserved01 : UnusedCOMMethod - end - -// REVIEW: We don't currently support ComConversionLoss -[] -[] -type ICLRStrongName = - interface - // REVIEW: Methods that we don't need will be stubbed out for now... - abstract GetHashFromAssemblyFile : UnusedCOMMethod - abstract GetHashFromAssemblyFileW : UnusedCOMMethod - abstract GetHashFromBlob : UnusedCOMMethod - abstract GetHashFromFile : UnusedCOMMethod - abstract GetHashFromFileW : UnusedCOMMethod - abstract GetHashFromHandle : UnusedCOMMethod - abstract StrongNameCompareAssemblies : UnusedCOMMethod - - [] - abstract StrongNameFreeBuffer : [] pbMemory : nativeint -> unit - - abstract StrongNameGetBlob : UnusedCOMMethod - abstract StrongNameGetBlobFromImage : UnusedCOMMethod - - [] - abstract StrongNameGetPublicKey : - [] pwzKeyContainer : string * - [] pbKeyBlob : byte[] * - [] cbKeyBlob : uint32 * - [] ppbPublicKeyBlob : nativeint byref * - [] pcbPublicKeyBlob : uint32 byref -> unit - - abstract StrongNameHashSize : UnusedCOMMethod - - [] - abstract StrongNameKeyDelete : [] pwzKeyContainer : string -> unit - - abstract StrongNameKeyGen : UnusedCOMMethod - abstract StrongNameKeyGenEx : UnusedCOMMethod - abstract StrongNameKeyInstall : UnusedCOMMethod - - [] - abstract StrongNameSignatureGeneration : - [] pwzFilePath : string * - [] pwzKeyContainer : string * - [] pbKeyBlob : byte [] * - [] cbKeyBlob : uint32 * - [] ppbSignatureBlob : nativeint byref * - [] pcbSignatureBlob : uint32 byref -> unit - - abstract StrongNameSignatureGenerationEx : UnusedCOMMethod - - [] - abstract StrongNameSignatureSize : - [] pbPublicKeyBlob : byte[] * - [] cbPublicKeyBlob : uint32 * - [] pcbSize : uint32 byref -> unit - - abstract StrongNameSignatureVerification : UnusedCOMMethod - - [] - abstract StrongNameSignatureVerificationEx : - [] pwzFilePath : string * - [] fForceVerification : bool -> [] bool - - abstract StrongNameSignatureVerificationFromImage : UnusedCOMMethod - abstract StrongNameTokenFromAssembly : UnusedCOMMethod - abstract StrongNameTokenFromAssemblyEx : UnusedCOMMethod - abstract StrongNameTokenFromPublicKey : UnusedCOMMethod - end - - -[] -[] -type ICLRRuntimeInfo = - interface - // REVIEW: Methods that we don't need will be stubbed out for now... - abstract GetVersionString : unit -> unit - abstract GetRuntimeDirectory : unit -> unit - abstract IsLoaded : unit -> unit - abstract LoadErrorString : unit -> unit - abstract LoadLibrary : unit -> unit - abstract GetProcAddress : unit -> unit - - [] - abstract GetInterface : - [] coClassId : System.Guid * - [] interfaceId : System.Guid -> []System.Object - end - -[] -[] -let GetCLRMetaHost (([] guid : System.Guid), - ([] metaHost : ICLRMetaHost byref)) : unit = failwith "GetCLRMetaHost" - -#else - -[< DllImport("mscoree.dll", SetLastError = true, CharSet = CharSet.Unicode) >] -let StrongNameGetPublicKey ((wszKeyContainer : string), - (keyBlob : byte[]), - (cbKeyBlob : uint32), - (ppbPublicKeyBlob : nativeint byref), - (pcbPublicKeyBlob : uint32 byref)) : bool = failwith "" - -[< DllImport("mscoree.dll", SetLastError = true, CharSet = CharSet.Unicode) >] -let StrongNameFreeBuffer (pbMemory : nativeint) : bool = failwith "" - -[< DllImport("mscoree.dll", SetLastError = true, CharSet = CharSet.Unicode) >] -let StrongNameKeyDelete (wszKeyContainer : string) : bool = failwith "" - -[< DllImport("mscoree.dll", SetLastError = true, CharSet = CharSet.Unicode) >] -let StrongNameSignatureSize ( (pbPublicKeyBlob : byte []), - (cbPublicKeyBlob : uint32), - (pcbSize : uint32 byref)) : bool = failwith "" - -[< DllImport("mscoree.dll", SetLastError = true, CharSet = CharSet.Unicode) >] -// Review: Should use the "Ex" version? -let StrongNameSignatureGeneration ( (wszFilePath : string), - (wszKeyContainer : string), - (pbKeyBlob : byte []), - (cbKeyBlob : uint32), - (ppbSignatureBlob : nativeint), - (pcbSignatureBlob : uint32 byref)) : bool = failwith "" - -[< DllImport("mscoree.dll", SetLastError = true, CharSet = CharSet.Unicode) >] -let StrongNameSignatureVerificationEx - ( ([] wszFilePath : string), - ([] fForceVerification : bool), - ([] pfWasVerified : bool byref) ) - : [] bool = failwith "" -#endif - -let signerOpenPublicKeyFile filePath = - System.IO.File.ReadAllBytes(filePath) - -let signerOpenKeyPairFile filePath = - System.IO.File.ReadAllBytes(filePath) - -#if FX_ATLEAST_40 -let mutable iclrsn : ICLRStrongName option = None -let getICLRStrongName () = - match iclrsn with - | None -> - let CLSID_CLRStrongName = System.Guid(0xB79B0ACDu, 0xF5CDus, 0x409bus, 0xB5uy, 0xA5uy, 0xA1uy, 0x62uy, 0x44uy, 0x61uy, 0x0Buy, 0x92uy) - let IID_ICLRStrongName = System.Guid(0x9FD93CCFu, 0x3280us, 0x4391us, 0xB3uy, 0xA9uy, 0x96uy, 0xE1uy, 0xCDuy, 0xE7uy, 0x7Cuy, 0x8Duy) - let IID_ICLRMetaHost = System.Guid(0xD332DB9Eu, 0xB9B3us, 0x4125us, 0x82uy, 0x07uy, 0xA1uy, 0x48uy, 0x84uy, 0xF5uy, 0x32uy, 0x15uy) - let clrRuntimeInfoGuid = System.Guid(0xBD39D1D2u, 0xBA2Fus, 0x486aus, 0x89uy, 0xB0uy, 0xB4uy, 0xB0uy, 0xCBuy, 0x46uy, 0x68uy, 0x91uy) - - let runtimeVer = System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion() - let mutable metaHost = Unchecked.defaultof - GetCLRMetaHost(IID_ICLRMetaHost, &metaHost) - if Unchecked.defaultof = metaHost then - failwith "Unable to obtain ICLRMetaHost object - check freshness of mscoree.dll" - let runtimeInfo = metaHost.GetRuntime(runtimeVer, clrRuntimeInfoGuid) :?> ICLRRuntimeInfo - let sn = runtimeInfo.GetInterface(CLSID_CLRStrongName, IID_ICLRStrongName) :?> ICLRStrongName - if Unchecked.defaultof = sn then - failwith "Unable to obtain ICLRStrongName object" - iclrsn <- Some(sn) - sn - | Some(sn) -> sn -#endif - -let signerGetPublicKeyForKeyPair kp = - let mutable pSize = 0u - let mutable pBuffer : nativeint = (nativeint)0 -#if FX_ATLEAST_40 - let iclrSN = getICLRStrongName() - - iclrSN.StrongNameGetPublicKey(Unchecked.defaultof, kp, (uint32) (Bytes.length kp), &pBuffer, &pSize) |> ignore -#else - StrongNameGetPublicKey(Unchecked.defaultof, kp, (uint32) (Bytes.length kp), &pBuffer, &pSize) |> ignore - check "action" (Marshal.GetLastWin32Error()) -#endif - let mutable keybuffer : byte [] = Bytes.zero_create ((int)pSize) - // Copy the marshalled data over - we'll have to free this ourselves - Marshal.Copy(pBuffer, keybuffer, 0, (int)pSize) -#if FX_ATLEAST_40 - iclrSN.StrongNameFreeBuffer(pBuffer) |> ignore -#else - StrongNameFreeBuffer(pBuffer) |> ignore - check "signerGetPublicKeyForKeyPair" (Marshal.GetLastWin32Error()) -#endif - keybuffer - -let signerGetPublicKeyForKeyContainer kc = - let mutable pSize = 0u - let mutable pBuffer : nativeint = (nativeint)0 -#if FX_ATLEAST_40 - let iclrSN = getICLRStrongName() - iclrSN.StrongNameGetPublicKey(kc, Unchecked.defaultof, 0u, &pBuffer, &pSize) |> ignore -#else - StrongNameGetPublicKey(kc, Unchecked.defaultof, 0u, &pBuffer, &pSize) |> ignore - check "action" (Marshal.GetLastWin32Error()) -#endif - let mutable keybuffer : byte [] = Bytes.zero_create ((int)pSize) - // Copy the marshalled data over - we'll have to free this ourselves later - Marshal.Copy(pBuffer, keybuffer, 0, (int)pSize) -#if FX_ATLEAST_40 - iclrSN.StrongNameFreeBuffer(pBuffer) |> ignore -#else - StrongNameFreeBuffer(pBuffer) |> ignore - check "signerGetPublicKeyForKeyContainer" (Marshal.GetLastWin32Error()) -#endif - keybuffer - -let signerCloseKeyContainer kc = -#if FX_ATLEAST_40 - let iclrSN = getICLRStrongName() - iclrSN.StrongNameKeyDelete(kc) |> ignore -#else - StrongNameKeyDelete(kc) |> ignore - check "signerCloseKeyContainer" (Marshal.GetLastWin32Error()) -#endif - -let signerSignatureSize pk = - let mutable pSize = 0u -#if FX_ATLEAST_40 - let iclrSN = getICLRStrongName() - iclrSN.StrongNameSignatureSize(pk, (uint32)(Bytes.length pk), &pSize) |> ignore -#else - StrongNameSignatureSize(pk, (uint32)(Bytes.length pk), &pSize) |> ignore - check "signerSignatureSize" (Marshal.GetLastWin32Error()) -#endif - (int)pSize - -let signerSignFileWithKeyPair fileName kp = - let mutable pcb = 0u - let mutable ppb = (nativeint)0 - let mutable ok = false -#if FX_ATLEAST_40 - let iclrSN = getICLRStrongName() - iclrSN.StrongNameSignatureGeneration(fileName, Unchecked.defaultof, kp, (uint32)(Bytes.length kp), &ppb, &pcb) |> ignore -#else - StrongNameSignatureGeneration(fileName, Unchecked.defaultof, kp, (uint32)(Bytes.length kp), ppb, &pcb) |> ignore - check "action" (Marshal.GetLastWin32Error()) -#endif -#if FX_ATLEAST_40 - iclrSN.StrongNameSignatureVerificationEx(fileName, true) |> ignore -#else - StrongNameSignatureVerificationEx(fileName, true, &ok) |> ignore - check "signerSignFileWithKeyPair" (Marshal.GetLastWin32Error()) -#endif - -let signerSignFileWithKeyContainer fileName kcName = - let mutable pcb = 0u - let mutable ppb = (nativeint)0 - let mutable ok = false -#if FX_ATLEAST_40 - let iclrSN = getICLRStrongName() - iclrSN.StrongNameSignatureGeneration(fileName, kcName, Unchecked.defaultof, 0u, &ppb, &pcb) |> ignore -#else - StrongNameSignatureGeneration(fileName, kcName, Unchecked.defaultof, 0u, ppb, &pcb) |> ignore - check "action" (Marshal.GetLastWin32Error()) -#endif -#if FX_ATLEAST_40 - iclrSN.StrongNameSignatureVerificationEx(fileName, true) |> ignore -#else - StrongNameSignatureVerificationEx(fileName, true, &ok) |> ignore - check "signerSignFileWithKeyPair" (Marshal.GetLastWin32Error()) -#endif diff --git a/tools/FSharp_1.9.6.16/source/absil/ilsupp.mli b/tools/FSharp_1.9.6.16/source/absil/ilsupp.mli deleted file mode 100644 index ab69154c..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilsupp.mli +++ /dev/null @@ -1,152 +0,0 @@ - -/// Functions associated with writing binaries which -/// vary between supported implementations of the CLI Common Language -/// Runtime, e.g. between the SSCLI, Mono and the Microsoft CLR. -/// -/// The implementation of the functions can be found in ilsupp-*.ml -// (c) Microsoft Corporation 2005-2009. -module Microsoft.FSharp.Compiler.AbstractIL.Internal.Support -open System -open System.Runtime.InteropServices -open System.Diagnostics.SymbolStore -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL - -open Il - -type IStream = System.Runtime.InteropServices.ComTypes.IStream - -type clr_kind = - | SSCLI (* all calls allowed *) - | Microsoft (* all calls allowed *) - | Mono (* not investigated *) - | Neutral (* no PDB writing, reading, strong name signing, clrInstallationDirectory calls allowed *) - -/// Globally configure the Abstract IL toolset to use a particular -/// set of auxiliary tools, e.g. debug writer, strong-name signer etc. -/// -/// The configurations available will depend on the flags you've -/// set when compiling the Abstract IL source code, or will depend -/// on the particular binary release you are using. For example, -/// a typical Windows x86 binary release will support all Microsoft -/// CLR implementations and the Rotor SSCLI implementation. -val configure: clr_kind -> unit -val current_configuration: unit -> clr_kind - -/// detect which configurations Abstract IL was compiled to support -val supported_configurations: clr_kind list - -val pdb_suffix_for_configuration: clr_kind -> string - -/// Unmanaged resource file linker - for native resources (not managed ones). -/// The function may be called twice, once with a zero-RVA and -/// arbitrary buffer, and once with the real buffer. The size of the -/// required buffer is returned. -type PEFileType = X86 | X64 - -val linkNativeResources: unlinkedResources:byte[] list -> rva:int32 -> PEFileType -> tempFilePath:string -> byte[] -val unlinkResource: int32 -> byte[] -> byte[] - -/// PDB reader and associated types -type pdb_reader -type pdb_document -type pdb_method -type pdb_variable -type pdb_method_scope - -type pdb_sequence_point = - { pdbSeqPointOffset: int; - pdbSeqPointDocument: pdb_document; - pdbSeqPointLine: int; - pdbSeqPointColumn: int; - pdbSeqPointEndLine: int; - pdbSeqPointEndColumn: int; } - -val pdbReadOpen: string (* module *) -> string (* path *) -> pdb_reader -val pdbReadClose: pdb_reader -> unit -val pdbReaderGetMethod: pdb_reader -> int32 (* token *) -> pdb_method -val pdbReaderGetMethodFromDocumentPosition: pdb_reader -> pdb_document -> int (* line *) -> int (* col *) -> pdb_method -val pdbReaderGetDocuments: pdb_reader -> pdb_document array -val pdbReaderGetDocument: pdb_reader -> string (* url *) -> byte[] (* guid *) -> byte[] (* guid *) -> byte[] (* guid *) -> pdb_document - -val pdbDocumentGetURL: pdb_document -> string -val pdbDocumentGetType: pdb_document -> byte[] (* guid *) -val pdbDocumentGetLanguage: pdb_document -> byte[] (* guid *) -val pdbDocumentGetLanguageVendor: pdb_document -> byte[] (* guid *) -val pdbDocumentFindClosestLine: pdb_document -> int -> int - -val pdbMethodGetToken: pdb_method -> int32 -val pdbMethodGetRootScope: pdb_method -> pdb_method_scope -val pdbMethodGetSequencePoints: pdb_method -> pdb_sequence_point array - -val pdbScopeGetChildren: pdb_method_scope -> pdb_method_scope array -val pdbScopeGetOffsets: pdb_method_scope -> int * int -val pdbScopeGetLocals: pdb_method_scope -> pdb_variable array - -val pdbVariableGetName: pdb_variable -> string -val pdbVariableGetSignature: pdb_variable -> byte[] -val pdbVariableGetAddressAttributes: pdb_variable -> int32 (* kind *) * int32 (* addrField1 *) - -/// Access installation directory. Not actually used by the core -/// Abstract IL libraries but invariably useful to client programs -/// when setting up paths etc. -/// -/// This returns "." is a CLR installation cannot be detected. -val clrInstallationDirectory: unit -> string -val clrVersion: unit -> string - -(*--------------------------------------------------------------------- - * PDB writer. - *---------------------------------------------------------------------*) - -type pdb_writer -type pdb_document_writer - -type idd = - { iddCharacteristics: int32; - iddMajorVersion: int32; (* actually u16 in IMAGE_DEBUG_DIRECTORY *) - iddMinorVersion: int32; (* acutally u16 in IMAGE_DEBUG_DIRECTORY *) - iddType: int32; - iddData: byte[];} - -val pdbInitialize: - string (* .exe/.dll already written and closed *) -> - string (* .pdb to write *) -> - pdb_writer -val pdbClose: pdb_writer -> unit -val pdbSetUserEntryPoint: pdb_writer -> int32 -> unit -val pdbDefineDocument: pdb_writer -> string -> pdb_document_writer -val pdbOpenMethod: pdb_writer -> int32 -> unit -val pdbCloseMethod: pdb_writer -> unit -val pdbOpenScope: pdb_writer -> int -> unit -val pdbCloseScope: pdb_writer -> int -> unit -val pdbDefineLocalVariable: pdb_writer -> string -> byte[] -> int32 -> unit -val pdbSetMethodRange: pdb_writer -> pdb_document_writer -> int -> int -> pdb_document_writer -> int -> int -> unit -val pdbDefineSequencePoints: pdb_writer -> pdb_document_writer -> (int * int * int * int * int) array -> unit -val pdbGetDebugInfo: pdb_writer -> idd - -(*--------------------------------------------------------------------- - * Misc writing support - *---------------------------------------------------------------------*) - -val absilWriteGetTimeStamp: unit -> int32 - -(*--------------------------------------------------------------------- - * Strong name signing - *---------------------------------------------------------------------*) - -type keyContainerName = string -type keyPair = byte[] -type pubkey = byte[] - -val signerOpenPublicKeyFile: string -> pubkey -val signerOpenKeyPairFile: string -> keyPair -val signerGetPublicKeyForKeyPair: keyPair -> pubkey -val signerGetPublicKeyForKeyContainer: string -> pubkey -val signerCloseKeyContainer: keyContainerName -> unit -val signerSignatureSize: pubkey -> int -val signerSignFileWithKeyPair: string -> keyPair -> unit -val signerSignFileWithKeyContainer: string -> keyContainerName -> unit diff --git a/tools/FSharp_1.9.6.16/source/absil/ilwrite.ml b/tools/FSharp_1.9.6.16/source/absil/ilwrite.ml deleted file mode 100644 index 384de4b8..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilwrite.ml +++ /dev/null @@ -1,4528 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - -#light - -module Microsoft.FSharp.Compiler.AbstractIL.BinaryWriter - -open Internal.Utilities -open Internal.Utilities.Pervasives -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open System.Collections.Generic -open Microsoft.FSharp.Compiler.DiagnosticMessage -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Range -open System.IO - -module Ilx = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -module Ilsupp = Microsoft.FSharp.Compiler.AbstractIL.Internal.Support -module Ildiag = Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -module Ilbinary = Microsoft.FSharp.Compiler.AbstractIL.Internal.BinaryConstants -module Ilprint = Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL -module Illib = Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -open Illib -open Ildiag -open Il -open Ilbinary -open Ilsupp - -module Bytebuf = Bytes.Bytebuf - -(*--------------------------------------------------------------------- - * The big writer. - *---------------------------------------------------------------------*) - -let checking = false -let _ = if checking then dprintn "warning : Ilwrite.checking is on" -let logging = false -let showTimes = ref false -#if DEBUG -let showEntryLookups = false -#endif - -(*--------------------------------------------------------------------- - * Library - *---------------------------------------------------------------------*) - -let (@@) = Array.append - -let reportTime = - let tFirst = ref None - let tPrev = ref None - fun descr -> - if !showTimes then - let t = System.Diagnostics.Process.GetCurrentProcess().UserProcessorTime.TotalSeconds - let prev = match !tPrev with None -> 0.0 | Some t -> t - let first = match !tFirst with None -> (tFirst := Some t; t) | Some t -> t - dprintf "ilwrite: TIME %10.3f (total) %10.3f (delta) - %s\n" (t - first) (t - prev) descr; - tPrev := Some t - -(*--------------------------------------------------------------------- - * Byte, byte array fragments and other concrete representations - * manipulations. - *---------------------------------------------------------------------*) - -(* Little-endian encoding of int32 *) -let b0 n = (n &&& 0xFF) -let b1 n = ((n >>> 8) &&& 0xFF) -let b2 n = ((n >>> 16) &&& 0xFF) -let b3 n = ((n >>> 24) &&& 0xFF) - -(* Little-endian encoding of int64 *) -let dw7 n = int32 ((n >>> 56) &&& 0xFFL) -let dw6 n = int32 ((n >>> 48) &&& 0xFFL) -let dw5 n = int32 ((n >>> 40) &&& 0xFFL) -let dw4 n = int32 ((n >>> 32) &&& 0xFFL) -let dw3 n = int32 ((n >>> 24) &&& 0xFFL) -let dw2 n = int32 ((n >>> 16) &&& 0xFFL) -let dw1 n = int32 ((n >>> 8) &&& 0xFFL) -let dw0 n = int32 (n &&& 0xFFL) - -(* REVIEW: get rid of all of these in favour of writing directly to buffers *) -let u8_as_intarray (i:byte) = [| b0 (int i) |] -let u16_as_intarray (x:uint16) = let n = (int x) in [| b0 n; b1 n |] -let i32_as_intarray (i:int32) = [| b0 i; b1 i; b2 i; b3 i |] -let i64_as_intarray (i:int64) = [| dw0 i; dw1 i; dw2 i; dw3 i; dw4 i; dw5 i; dw6 i; dw7 i |] - -let i8_as_intarray (i:sbyte) = u8_as_intarray (byte i) -let i16_as_intarray (i:int16) = u16_as_intarray (uint16 i) -let u32_as_intarray (i:uint32) = i32_as_intarray (int32 i) -let u64_as_intarray (i:uint64) = i64_as_intarray (int64 i) - -let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0) -let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x) - -let ieee32_as_intarray i = i32_as_intarray (bits_of_float32 i) -let ieee64_as_intarray i = i64_as_intarray (bits_of_float i) - -let emit f = let bb = Bytebuf.create 10 in f bb; Bytebuf.close bb - -/// Alignment and padding -let align alignment n = ((n + alignment - 1) / alignment) * alignment - -(*--------------------------------------------------------------------- - * Concrete token representations etc. used in PE files - *---------------------------------------------------------------------*) - -let z_u32_size n = - if n <= 0x7F then 1 - elif n <= 0x3FFF then 2 - else 4 - -let emit_z_u32 bb n = - if n >= 0 && n <= 0x7F then - Bytebuf.emit_int_as_byte bb n - elif n >= 0x80 && n <= 0x3FFF then - Bytebuf.emit_int_as_byte bb (0x80 ||| (n >>> 8)); - Bytebuf.emit_int_as_byte bb (n &&& 0xFF) - else - Bytebuf.emit_int_as_byte bb (0xc0l ||| ((n >>> 24) &&& 0xFF)); - Bytebuf.emit_int_as_byte bb ( (n >>> 16) &&& 0xFF); - Bytebuf.emit_int_as_byte bb ( (n >>> 8) &&& 0xFF); - Bytebuf.emit_int_as_byte bb ( n &&& 0xFF) - -let emit_pad buf n = - for i = 0 to n-1 do - Bytebuf.emit_int_as_byte buf 0x0 - -let bytebuf_emit_z_untagged_index buf big idx = - if big then Bytebuf.emit_i32 buf idx - elif idx > 0xffff then failwith "z_untagged_index: too big for small address or simple index" - else Bytebuf.emit_i32_as_u16 buf idx - -let bytebuf_emit_z_tagged_index buf tag nbits big idx = - let idx2 = (idx <<< nbits) ||| tag - if big then Bytebuf.emit_i32 buf idx2 - else Bytebuf.emit_i32_as_u16 buf idx2 - -let GetUncodedToken tab idx = (((tag_of_table tab) <<< 24) ||| idx) - -(* From ECMA for UserStrings: -This final byte holds the value 1 if and only if any UTF16 character within the string has any bit set in its top byte, or its low byte is any of the following: -0x01–0x08, 0x0E–0x1F, 0x27, 0x2D, -0x7F. Otherwise, it holds 0. The 1 signifies Unicode characters that require handling beyond that normally provided for 8-bit encoding sets. -*) - -let marker_for_unicode_bytes (b:byte[]) = - let len = Bytes.length b - let rec scan i = - i < len/2 && - (let b1 = Bytes.get b (i*2) - let b2 = Bytes.get b (i*2+1) - (b2 <> 0) - || (b1 >= 0x01 && b1 <= 0x08) - || (b1 >= 0xE && b1 <= 0x1F) - || (b1 = 0x27) - || (b1 = 0x2D) - || scan (i+1)) - let marker = if scan 0 then 0x01 else 0x00 - marker - - -(* -------------------------------------------------------------------- - * Fixups - * -------------------------------------------------------------------- *) - -/// Check that the data held at a fixup is some special magic value, as a sanity check -/// to ensure the fixup is being placed at a ood lcoation. -let CheckFixup32 data offset exp = - if Bytes.get data (offset + 3) <> b3 exp then failwith "fixup sanity check failed"; - if Bytes.get data (offset + 2) <> b2 exp then failwith "fixup sanity check failed"; - if Bytes.get data (offset + 1) <> b1 exp then failwith "fixup sanity check failed"; - if Bytes.get data (offset) <> b0 exp then failwith "fixup sanity check failed" - -let ApplyFixup32 data offset v = - Bytes.set data (offset) (b0 v); - Bytes.set data (offset+1) (b1 v); - Bytes.set data (offset+2) (b2 v); - Bytes.set data (offset+3) (b3 v) - -(* -------------------------------------------------------------------- - * PDB data - * -------------------------------------------------------------------- *) - -let NoPDBsOnMonoWarningE = DeclareResourceString("NoPDBsOnMonoWarning","") - -type pdb_document = Il.ILSourceDocument -(* type pdb_namespace = string (* todo: do we need more here? *)*) -type pdb_var = - { pdbVarName: string; - pdbVarSig: byte[]; - pdbVarAttributes: int32 (* this is essentially the local index the name corresponds to *) } - -type pdb_method_scope = - { Children: pdb_method_scope array; - StartOffset: int; - EndOffset: int; - Locals: pdb_var array; - (* REVIEW open_namespaces: pdb_namespace array; *) } - -type PdbSourceLoc = - { Document: int; - Line: int; - Column: int; } - -type PdbSequencePoint = - { Document: int; - Offset: int; - Line: int; - Column: int; - EndLine: int; - EndColumn: int; } - override x.ToString() = sprintf "(%d,%d)-(%d,%d)" x.Line x.Column x.EndLine x.EndColumn - -type PdbMethodData = - { MethToken: int32; - MethName:string; - Params: pdb_var array; - RootScope: pdb_method_scope; - Range: (PdbSourceLoc * PdbSourceLoc) option; - SequencePoints: PdbSequencePoint array; } - -let compare_seqpoints_by_source sp1 sp2 = - let c1 = compare sp1.Document sp2.Document - if c1 <> 0 then c1 else - let c1 = compare sp1.Line sp2.Line - if c1 <> 0 then c1 else - compare sp1.Column sp2.Column - -let compare_seqpoints_by_offset sp1 sp2 = - compare sp1.Offset sp2.Offset - -let sizeof_IMAGE_DEBUG_DIRECTORY = 28 (* 28 is the size of the IMAGE_DEBUG_DIRECTORY in ntimage.h *) - -type pdb_data = - { EntryPoint: int32 option; - Documents: pdb_document array; - Methods: PdbMethodData array } - -//--------------------------------------------------------------------- -// PDB Writer. The function [WritePdbInfo] abstracts the -// imperative calls to the Symbol Writer API. -//--------------------------------------------------------------------- - -let WritePdbInfo fixupOverlappingSequencePoints f fpdb info = - (try System.IO.File.Delete(fpdb) with _ -> ()); - let pdbw = ref Unchecked.defaultof - - try - pdbw := pdbInitialize f fpdb - with _ -> error(Error((sprintf "Unexpected error creating debug information file '%s'" fpdb), rangeCmdArgs)) - - match info.EntryPoint with - | None -> () - | Some x -> pdbSetUserEntryPoint !pdbw x - - let docs = info.Documents |> Array.map (fun doc -> pdbDefineDocument !pdbw doc.File) - let get_doc i = - if i < 0 or i >= Array.length docs then failwith "get_doc: bad doc number"; - docs.[i] - reportTime (Printf.sprintf "PDB: Defined %d documents" info.Documents.Length); - Array.sortInPlaceBy (fun x -> x.MethToken) info.Methods; - - reportTime (Printf.sprintf "PDB: Sorted %d methods" info.Methods.Length); - - (* This next bit is a workaround. The sequence points we get *) - (* from F# (which has nothing to do with this module) are actually expression *) - (* marks, i.e. the source ranges they denote are typically *) - (* nested, and each point indicates where the *) - (* code for an expression with a particular range begins. *) - (* This is in many ways a much more convenient form to emit. *) - (* However, it is not the form that debug tools accept nicely. *) - (* However, sequence points are really a non-overlapping, non-nested *) - (* partition of the source code of a method. So here we shorten the *) - (* length of all sequence point marks so they do not go further than *) - (* the next sequence point in the source. *) - let spCounts = info.Methods |> Array.map (fun x -> x.SequencePoints.Length) - let allSps = Array.concat (Array.map (fun x -> x.SequencePoints) info.Methods |> Array.to_list) - let allSps = Array.mapi (fun i sp -> (i,sp)) allSps - if fixupOverlappingSequencePoints then - // sort the sequence points into source order - Array.sortInPlaceWith (fun (_,sp1) (_,sp2) -> compare_seqpoints_by_source sp1 sp2) allSps; - // shorten the ranges of any that overlap with following sequence points - // sort the sequence points back into offset order - for i = 0 to Array.length allSps - 2 do - let n,sp1 = allSps.[i] - let _,sp2 = allSps.[i+1] - if (sp1.Document = sp2.Document) && - (sp1.EndLine > sp2.Line || - (sp1.EndLine = sp2.Line && - sp1.EndColumn >= sp2.Column)) then - let adjustToPrevLine = (sp1.Line < sp2.Line) - allSps.[i] <- n,{sp1 with EndLine = (if adjustToPrevLine then sp2.Line-1 else sp2.Line); - EndColumn = (if adjustToPrevLine then 80 else sp2.Column); } - Array.sortInPlaceBy fst allSps; - - - - let spOffset = ref 0 - info.Methods |> Array.iteri (fun i minfo -> - - let sps = Array.sub allSps !spOffset spCounts.[i] - spOffset := !spOffset + spCounts.[i]; - begin match minfo.Range with - | None -> () - | Some (a,b) -> - pdbOpenMethod !pdbw minfo.MethToken; - - pdbSetMethodRange !pdbw - (get_doc a.Document) a.Line a.Column - (get_doc b.Document) b.Line b.Column; - - (* Partition the sequence points by document *) - let spsets = - let res = (Map.empty : Map) - let add res (_,sp) = - let k = sp.Document - match Map.tryfind k res with - Some xsR -> xsR := sp :: !xsR; res - | None -> Map.add k (ref [sp]) res - - let res = Array.fold_left add res sps - let res = Map.to_list res in (* ordering may bnot be stable *) - List.map (fun (_,x) -> Array.of_list !x) res - - spsets |> List.iter (fun spset -> - if spset.Length > 0 then - Array.sortInPlaceWith compare_seqpoints_by_offset spset; - let sps = - spset |> Array.map (fun sp -> - (* Ildiag.dprintf "token 0x%08lx has an sp at offset 0x%08x\n" minfo.MethToken sp.Offset; *) - (sp.Offset, sp.Line, sp.Column,sp.EndLine, sp.EndColumn)) - (* Use of alloca in implementation of pdbDefineSequencePoints can give stack overflow here *) - if sps.Length < 5000 then - pdbDefineSequencePoints !pdbw (get_doc spset.[0].Document) sps;); - - (* Write the scopes *) - let rec writePdbScope top sco = - if top or sco.Locals.Length <> 0 or sco.Children.Length <> 0 then - pdbOpenScope !pdbw sco.StartOffset; - sco.Locals |> Array.iter (fun v -> pdbDefineLocalVariable !pdbw v.pdbVarName v.pdbVarSig v.pdbVarAttributes); - sco.Children |> Array.iter (writePdbScope false); - pdbCloseScope !pdbw sco.EndOffset; - writePdbScope true minfo.RootScope; - - pdbCloseMethod !pdbw - end); - reportTime "PDB: Wrote methods"; - let res = pdbGetDebugInfo !pdbw - pdbClose !pdbw; - reportTime "PDB: Closed"; - res - -//--------------------------------------------------------------------- -// Strong name signing -//--------------------------------------------------------------------- - -type signer = - | PublicKeySigner of Ilsupp.pubkey - | KeyPair of keyPair - | KeyContainer of keyContainerName - -let signerOpenPublicKeyFile s = - let pubkey = Ilsupp.signerOpenPublicKeyFile s - PublicKeySigner(pubkey) - -let signerOpenPublicKey pubkey = - PublicKeySigner(pubkey) - -let signerOpenKeyPairFile s = - let keypair = Ilsupp.signerOpenKeyPairFile s - KeyPair(keypair) - -let signerOpenKeyContainer s = - KeyContainer(s) - -let signerClose s = - match s with - | PublicKeySigner _ - | KeyPair _ -> () - | KeyContainer containerName -> Ilsupp.signerCloseKeyContainer(containerName) - -let signerFullySigned s = - match s with - | PublicKeySigner _ -> false - | KeyPair _ | KeyContainer _ -> true - -let signerPublicKey s = - match s with - | PublicKeySigner p -> p - | KeyPair kp -> Ilsupp.signerGetPublicKeyForKeyPair kp - | KeyContainer kn -> Ilsupp.signerGetPublicKeyForKeyContainer kn - -let signerSignatureSize s = - try Ilsupp.signerSignatureSize(signerPublicKey s) - with e -> - failwith ("A call to StrongNameSignatureSize failed ("^e.Message^")"); - 0x80 - -let signerSignFile file s = - match s with - | PublicKeySigner p -> () - | KeyPair kp -> Ilsupp.signerSignFileWithKeyPair file kp - | KeyContainer kn -> Ilsupp.signerSignFileWithKeyContainer file kn - - -//--------------------------------------------------------------------- -// TYPES FOR TABLES -//--------------------------------------------------------------------- - -type RowElement = - | UShort of uint16 - | ULong of int32 - | Data of int * bool (* Index into cenv.data or cenv.resources. Will be adjusted later in writing once we fix an overall location for the data section. flag indicates if offset is relative to cenv.resources. *) - | Guid of int (* pos. in guid array *) - | Blob of int (* pos. in blob array *) - | String of int (* pos. in string array *) - | SimpleIndex of table * int (* pos. in some table *) - | TypeDefOrRefOrSpec of typeDefOrRef_tag * int - | TypeOrMethodDef of typeOrMethodDef_tag * int - | HasConstant of hasConstant_tag * int - | HasCustomAttribute of hasCustomAttribute_tag * int - | HasFieldMarshal of hasFieldMarshal_tag * int - | HasDeclSecurity of hasDeclSecurity_tag * int - | MemberRefParent of memberRefParent_tag * int - | HasSemantics of hasSemantics_tag * int - | MethodDefOrRef of methodDefOrRef_tag * int - | MemberForwarded of memberForwarded_tag * int - | Implementation of implementation_tag * int - | CustomAttributeType of customAttributeType_tag * int - | ResolutionScope of resolutionScope_tag * int - -type BlobIndex = int -type StringIndex = int - -let BlobIndex (x:BlobIndex) : int = x -let StringIndex (x:StringIndex) : int = x - -/// Abstract, general type of metadata table rows -type IGenericRow = - abstract GetGenericRow : unit -> array - -/// Shared rows are used for the ILTypeRef, ILMethodRef, ILMethodSpec, etc. tables -/// where entries can be shared and need to be made unique through hash-cons'ing -type ISharedRow = - inherit IGenericRow - -/// This is the representation of shared rows is used for most shared row types. -/// Rows ILAssemblyRef and ILMethodRef are very common and are given their own -/// representations. -type SimpleSharedRow(elems: array) = - let hashCode = hash elems // precompute to give more efficient hashing and equality comparisons - interface ISharedRow with - member x.GetGenericRow() = elems - member x.GenericRow = elems - override x.GetHashCode() = hashCode - override x.Equals(obj:obj) = - match obj with - | :? SimpleSharedRow as y -> elems = y.GenericRow - | _ -> false - -/// Unshared rows are used for definitional tables where elements do not need to be made unique -/// e.g. ILMethodDef and ILTypeDef. Most tables are like this. We don't precompute a -/// hash code for these rows, and indeed the GetHashCode and Equals should not be needed. -type UnsharedRow(elems: array) = - interface IGenericRow with - member x.GetGenericRow() = elems - member x.GenericRow = elems - override x.GetHashCode() = hash elems - override x.Equals(obj:obj) = - match obj with - | :? UnsharedRow as y -> elems = y.GenericRow - | _ -> false - -let inline combineHash x2 acc = 37 * acc + x2 // (acc <<< 6 + acc >>> 2 + x2 + 0x9e3779b9) - -/// Special representation for ILAssemblyRef rows -type AssemblyRefRow(s1,s2,s3,s4,l1,b1,nameIdx,str2,b2) = - let hashCode = hash nameIdx - let genericRow = [| UShort s1; UShort s2; UShort s3; UShort s4; ULong l1; Blob b1; String nameIdx; String str2; Blob b2 |] - interface ISharedRow with - member x.GetGenericRow() = genericRow - member x.GenericRow = genericRow - override x.GetHashCode() = hashCode - override x.Equals(obj:obj) = - match obj with - | :? AssemblyRefRow as y -> genericRow = y.GenericRow - | _ -> false - -/// Special representation of a very common kind of row -type MemberRefRow(mrp:RowElement,nmIdx:StringIndex,blobIdx:BlobIndex) = - let hash = hash mrp |> combineHash (hash nmIdx) |> combineHash (hash blobIdx) - let genericRow = [| mrp; String nmIdx; Blob blobIdx |] - interface ISharedRow with - member x.GetGenericRow() = genericRow - member x.GenericRow = genericRow - override x.GetHashCode() = hash - override x.Equals(obj:obj) = - match obj with - | :? MemberRefRow as y -> genericRow = y.GenericRow - | _ -> false - -(*===================================================================== - *===================================================================== - * IL --> TABLES+CODE -s *===================================================================== - *=====================================================================*) - -// This environment keeps track of how many generic parameters are in scope. -// This lets us translate AbsIL type variable number to IL type variable numbering -type env = - { envClassFormals: int } -let env_enter_tdef gparams ={envClassFormals=gparams } -let env_enter_msig tgparams mgparams = - { envClassFormals=tgparams } -let env_enter_fspec (fspec:ILFieldSpec) = - { envClassFormals=List.length (inst_of_typ fspec.EnclosingType) } -let env_enter_ospec (ospec:OverridesSpec) = - { envClassFormals=List.length (inst_of_typ ospec.EnclosingType) } - -let env_enter_mref mref = - { envClassFormals=System.Int32.MaxValue } - -let mk_env = { envClassFormals=0 } - -(*--------------------------------------------------------------------- - * TABLES - *---------------------------------------------------------------------*) - -[] -type MetadataTable<'a> = - { name: string; - dict: Dictionary<'a, int>; // given a row, find its entry number -#if DEBUG - mutable lookups: int; -#endif - mutable rows: ResizeArray<'a> ; } - member x.Count = x.rows.Count - -// inline justification: allow hash equality function to be specialized for type of key -let NewTable(nm,hashEq) = - { name=nm; -#if DEBUG - lookups=0; -#endif - dict = new Dictionary<_,_>(100, hashEq); - rows= new ResizeArray<_>(); } - -let GetTableEntries (tbl:MetadataTable<'a>) = -#if DEBUG - if showEntryLookups then dprintf "--> table %s had %d entries and %d lookups\n" tbl.name tbl.Count tbl.lookups; -#endif - tbl.rows |> ResizeArray.to_list - -let AddSharedEntry tbl x = - let n = tbl.rows.Count + 1 - tbl.dict.[x] <- n; - tbl.rows.Add(x); - n - -let AddUnsharedEntry tbl x = - let n = tbl.rows.Count + 1 - tbl.rows.Add(x); - n - -let FindOrAddSharedEntry tbl x = -#if DEBUG - tbl.lookups <- tbl.lookups + 1; -#endif - let mutable res = Unchecked.defaultof<_> - let ok = tbl.dict.TryGetValue(x,&res) - if ok then res - else AddSharedEntry tbl x - - -/// This is only used in one special place - see furthre below. -let SetRowsOfTable tbl t = - tbl.rows <- ResizeArray.of_list t; - let h = tbl.dict - h.Clear(); - t |> List.iteri (fun i x -> - h.[x] <- (i+1)) - -let AddUniqueEntry nm geterr tbl x = - if tbl.dict.ContainsKey x then failwith ("duplicate entry '"^geterr x^"' in "^nm^" table") - else AddSharedEntry tbl x - -let GetTableEntry tbl x = tbl.dict.[x] - -//--------------------------------------------------------------------- -// Keys into some of the tables -//--------------------------------------------------------------------- - -/// We use this key type to help find ILMethodDefs for MethodRefs -type MethodDefKey(tidx:int,garity:int,nm:string,rty:ILType,argtys:ILType list) = - // Precompute the hash. The hash doesn't include the return type or - // argument types (only argument type count). This is very important, since - // hashing these is way too expensive - let hashCode = - hash tidx - |> combineHash (hash garity) - |> combineHash (hash nm) - |> combineHash (hash argtys.Length) - member key.TypeIdx = tidx - member key.GenericArity = garity - member key.Name = nm - member key.ReturnType = rty - member key.ArgTypes = argtys - override x.GetHashCode() = hashCode - override x.Equals(obj:obj) = - match obj with - | :? MethodDefKey as y -> - tidx = y.TypeIdx && - garity = y.GenericArity && - nm = y.Name && - // note: these next two use structural equality on AbstractIL ILType values - rty = y.ReturnType && - argtys = y.ArgTypes - | _ -> false - -/// We use this key type to help find ILFieldDefs for FieldRefs -type FieldDefKey(tidx:int,nm:string,ty:ILType) = - // precompute the hash. hash doesn't include the type - let hashCode = hash tidx |> combineHash (hash nm) - member key.TypeIdx = tidx - member key.Name = nm - member key.Type = ty - override x.GetHashCode() = hashCode - override x.Equals(obj:obj) = - match obj with - | :? FieldDefKey as y -> - tidx = y.TypeIdx && - nm = y.Name && - ty = y.Type - | _ -> false - -type propkey = PropKey of int (* type. def. idx. *) * string * ILType * ILType list -type eventkey = EventKey of int (* type. def. idx. *) * string -type tdkey = TdKey of string list (* enclosing *) * string (* type name *) - -(*--------------------------------------------------------------------- - * The Writer Context - *---------------------------------------------------------------------*) - -[] -type cenv = - { mscorlib: ILScopeRef; - ilg: ILGlobals; - desiredMetadataVersion: ILVersionInfo; - reqd_data_fixups: (int32 * (int * bool)) list ref; - /// References to strings in codestreams: offset of code and a (fixup-location , string token) list) - mutable reqd_string_fixups: (int32 * (int * int) list) list; - code_chunks: Bytebuf.t; - mutable next_code_addr: int32; - generate_pdb: bool; - pdbinfo: ResizeArray; - documents: pdb_document MetadataTable; - /// Raw data, to go into the data section - data: Bytebuf.t; - /// Raw resource data, to go into the data section - resources: Bytebuf.t; - mutable entrypoint: (bool * int) option; - - /// Caches - trefCache: Dictionary; - - /// The following are all used to generate unique items in the output - tables: array>; - AssemblyRefs: MetadataTable; - fieldDefs: MetadataTable; - methodDefIdxsByKey: MetadataTable; - methodDefIdxs: Dictionary; - propertyDefs: MetadataTable; - eventDefs: MetadataTable; - typeDefs: MetadataTable; - guids: MetadataTable; - blobs: MetadataTable; - strings: MetadataTable; - userStrings: MetadataTable; - } - -let table cenv (Table idx) = cenv.tables.[idx] - -let FindOrAddRow cenv tbl (x:IGenericRow) = FindOrAddSharedEntry (table cenv tbl) x - -// Shared rows must be hash-cons'd to be made unique (no duplicates according to contents) -let AddSharedRow cenv tbl (x:ISharedRow) = AddSharedEntry (table cenv tbl) (x :> IGenericRow) - -// Unshared rows correspond to definition elements (e.g. a ILTypeDef or a ILMethodDef) -let AddUnsharedRow cenv tbl (x:UnsharedRow) = AddUnsharedEntry (table cenv tbl) (x :> IGenericRow) - -let metadataSchemaVersionSupportedByCLRVersion v = - (* Whidbey Beta 1 version numbers are between 2.0.40520.0 and 2.0.40607.0 *) - (* Later Whidbey versions are post 2.0.40607.0.. However we assume *) - (* internal builds such as 2.0.x86chk are Whidbey Beta 2 or later *) - if Il.version_compare v (parse_version ("2.0.40520.0")) >= 0 && - Il.version_compare v (parse_version ("2.0.40608.0")) < 0 then 1,1 - elif Il.version_compare v (parse_version ("2.0.0.0")) >= 0 then 2,0 - else 1,0 - -let headerVersionSupportedByCLRVersion v = - (* The COM20HEADER version number *) - (* Whidbey version numbers are 2.5 *) - (* Earlier are 2.0 *) - (* From an email from jeffschw: "Be built with a compiler that marks the COM20HEADER with Major >=2 and Minor >= 5. The V2.0 compilers produce images with 2.5, V1.x produces images with 2.0." *) - if Il.version_compare v (parse_version ("2.0.0.0")) >= 0 then 2,5 - else 2,0 - -let peOptionalHeaderByteByCLRVersion v = - (* A flag in the PE file optional header seems to depend on CLI version *) - (* Whidbey version numbers are 8 *) - (* Earlier are 6 *) - (* Tools are meant to ignore this, but the VS Profiler wants it to have the right value *) - if Il.version_compare v (parse_version ("2.0.0.0")) >= 0 then 8 - else 6 - -(* returned by write_binary_internal *) -[] -type mappings = - { tdefMap: ILTypeDef list * ILTypeDef -> int32; - fdefMap: ILTypeDef list * ILTypeDef -> ILFieldDef -> int32; - mdefMap: ILTypeDef list * ILTypeDef -> ILMethodDef -> int32; - propertyMap: ILTypeDef list * ILTypeDef -> ILPropertyDef -> int32; - eventMap: ILTypeDef list * ILTypeDef -> ILEventDef -> int32 } - -let record_reqd_data_fixup reqd_data_fixups buf pos lab = - reqd_data_fixups := (pos,lab) :: !reqd_data_fixups; - (* Write a special value in that we check later when applying the fixup *) - Bytebuf.emit_i32 buf 0xdeaddddd - - - -(*--------------------------------------------------------------------- - * Utilities Used During Writing - *---------------------------------------------------------------------*) - -let add_code cenv ((reqd_string_fixups_offset,reqd_string_fixups),code) = - if align 4 cenv.next_code_addr <> cenv.next_code_addr then dprintn "warning: code not 4-byte aligned"; - cenv.reqd_string_fixups <- (cenv.next_code_addr + reqd_string_fixups_offset, reqd_string_fixups) :: cenv.reqd_string_fixups; - Bytebuf.emit_bytes cenv.code_chunks code; - cenv.next_code_addr <- cenv.next_code_addr + (Bytes.length code) - -let get_code cenv = Bytebuf.close cenv.code_chunks - -(*--------------------------------------------------------------------- - * Split type names into namespace/name pairs and memoize. - *---------------------------------------------------------------------*) - -let split_name_at nm idx = - let last = (String.length nm) - 1 - (String.sub nm 0 idx), - (if idx < last then String.sub nm (idx + 1) (last - idx) else "") - -let split_namespace_aux nm = - if String.contains nm '.' then - let idx = String.rindex nm '.' - let s1,s2 = split_name_at nm idx - Some s1,s2 - else None, nm - -let memoize_namespace_tab = Dictionary.create 100 - -let split_namespace nm = - if Dictionary.mem memoize_namespace_tab nm then - Dictionary.find memoize_namespace_tab nm - else - let x = split_namespace_aux nm - (Dictionary.add memoize_namespace_tab nm x; x) - -(*--------------------------------------------------------------------- - * The UserString, BlobHeap, GuidHeap tables - *---------------------------------------------------------------------*) - -let string_as_utf8_intarray (s:string) = - Bytes.to_intarray (Bytes.string_as_utf8_bytes s) - -let GetUserStringHeapIdx cenv s = - FindOrAddSharedEntry cenv.userStrings s - -let GetBytesAsBlobIdx cenv bytes = - if Bytes.length bytes = 0 then 0 - else FindOrAddSharedEntry cenv.blobs bytes - -let GetStingHeapIdx cenv s = - if s = "" then 0 - else FindOrAddSharedEntry cenv.strings s - -let GetGuidIdx cenv info = FindOrAddSharedEntry cenv.guids (Bytes.of_intarray info) - -let GetIntArrayAsBlobIdx cenv blob = GetBytesAsBlobIdx cenv (Bytes.of_intarray blob) - -let GetStringHeapIdxOption cenv sopt = - match sopt with - | Some ns -> GetStingHeapIdx cenv ns - | None -> 0 - -let name_as_elem_pair cenv n = - let (n1,n2) = split_namespace n - String (GetStringHeapIdxOption cenv n1), - String (GetStingHeapIdx cenv n2) - -(*===================================================================== - * Pass 1 - allocate indexes for types - *=====================================================================*) - -let name_of_tdkey (TdKey (enc,n)) = n - -let rec tdef_pass1 enc cenv (td:ILTypeDef) = - ignore (AddUniqueEntry "type index" name_of_tdkey cenv.typeDefs (TdKey (enc,td.Name))); - GenTypeDefsPass1 (enc@[td.Name]) cenv (dest_tdefs td.NestedTypes) - -and GenTypeDefsPass1 enc cenv tds = List.iter (tdef_pass1 enc cenv) tds - - -(*===================================================================== - * Pass 2 - allocate indexes for methods and fields and write rows for types - *=====================================================================*) - -let rec GetIdxForTypeDef cenv key = - try GetTableEntry cenv.typeDefs key - with - :? KeyNotFoundException -> - let (TdKey (enc,n) ) = key - failwith ("One of your modules expects the type '"^String.concat "." (enc@[n])^"' to be defined within the module being emitted. You may be missing an input file") - -(* -------------------------------------------------------------------- - * Assembly and module references - * -------------------------------------------------------------------- *) - -let rec GetAssemblyRefAsRow cenv (aref:ILAssemblyRef) = - AssemblyRefRow - ((match aref.Version with None -> 0us | Some (x,y,z,w) -> x), - (match aref.Version with None -> 0us | Some (x,y,z,w) -> y), - (match aref.Version with None -> 0us | Some (x,y,z,w) -> z), - (match aref.Version with None -> 0us | Some (x,y,z,w) -> w), - ((match aref.PublicKey with Some (PublicKey _) -> 0x0001 | _ -> 0x0000) - ||| (if aref.Retargetable then 0x0100 else 0x0000)), - BlobIndex (match aref.PublicKey with - | None -> 0 - | Some (PublicKey b | PublicKeyToken b) -> GetBytesAsBlobIdx cenv b), - StringIndex (GetStingHeapIdx cenv aref.Name), - StringIndex (match aref.Locale with None -> 0 | Some s -> GetStingHeapIdx cenv s), - BlobIndex (match aref.Hash with None -> 0 | Some s -> GetBytesAsBlobIdx cenv s)) - -and GetAssemblyRefAsIdx cenv aref = - FindOrAddRow cenv tab_AssemblyRef (GetAssemblyRefAsRow cenv aref) - -and GetModuleRefAsRow cenv (mref:ILModuleRef) = - SimpleSharedRow - [| String (GetStingHeapIdx cenv mref.Name) |] - -and GetModuleRefAsFileRow cenv (mref:ILModuleRef) = - SimpleSharedRow - [| ULong (if mref.HasMetadata then 0x0000 else 0x0001); - String (GetStingHeapIdx cenv mref.Name); - (match mref.Hash with None -> Blob 0 | Some s -> Blob (GetBytesAsBlobIdx cenv s)); |] - -and GetModuleRefAsIdx cenv mref = - FindOrAddRow cenv tab_ModuleRef (GetModuleRefAsRow cenv mref) - -and GetModuleRefAsFileIdx cenv mref = - FindOrAddRow cenv tab_File (GetModuleRefAsFileRow cenv mref) - -(* -------------------------------------------------------------------- - * Does a ILScopeRef point to this module? - * -------------------------------------------------------------------- *) - -let scoref_is_local scoref = (scoref = ScopeRef_local) - -(* -------------------------------------------------------------------- - * Scopes to Implementation elements. - * -------------------------------------------------------------------- *) - -let scoref_as_Implementation_elem cenv scoref = - match scoref with - | ScopeRef_local -> (i_AssemblyRef, 0) - | ScopeRef_assembly aref -> (i_AssemblyRef, GetAssemblyRefAsIdx cenv aref) - | ScopeRef_module mref -> (i_File, GetModuleRefAsFileIdx cenv mref) - -(* -------------------------------------------------------------------- - * Type references, types etc. - * -------------------------------------------------------------------- *) - -let rec GetTypeRefAsTypeRefRow cenv (tref:ILTypeRef) = - let nselem,nelem = name_as_elem_pair cenv tref.Name - let rs1,rs2 = rscope_as_ResolutionScope_elem cenv (tref.Scope,tref.Enclosing) - SimpleSharedRow [| ResolutionScope (rs1,rs2); nelem; nselem |] - -and GetTypeRefAsTypeRefIdx cenv tref = - let mutable res = 0 - if cenv.trefCache.TryGetValue(tref,&res) then res else - let res = FindOrAddRow cenv tab_TypeRef (GetTypeRefAsTypeRefRow cenv tref) - cenv.trefCache.[tref] <- res; - res - -and GetTypeDescAsTypeRefIdx cenv (scoref,enc,n) = - GetTypeRefAsTypeRefIdx cenv (mk_nested_tref (scoref,enc,n)) - -and rscope_as_ResolutionScope_elem cenv (scoref,enc) = - if isNil enc then - match scoref with - | ScopeRef_local -> (rs_Module, 1) - | ScopeRef_assembly aref -> (rs_AssemblyRef, GetAssemblyRefAsIdx cenv aref) - | ScopeRef_module mref -> (rs_ModuleRef, GetModuleRefAsIdx cenv mref) - else - let enc2,n2 = List.frontAndBack enc - (rs_TypeRef, GetTypeDescAsTypeRefIdx cenv (scoref,enc2,n2)) - - -let emit_tdesc_as_TypeDefOrRefEncoded cenv bb (scoref,enc,nm) = - if scoref_is_local scoref then - let idx = GetIdxForTypeDef cenv (TdKey(enc,nm)) - emit_z_u32 bb (idx <<< 2) (* ECMA 22.2.8 TypeDefOrRefEncoded - ILTypeDef *) - else - let idx = GetTypeDescAsTypeRefIdx cenv (scoref,enc,nm) - emit_z_u32 bb ((idx <<< 2) ||| 0x01) (* ECMA 22.2.8 TypeDefOrRefEncoded - ILTypeRef *) - -let tref_is_local cenv (tref:ILTypeRef) = scoref_is_local tref.Scope - -let typ_is_local cenv typ = - is_tref_typ typ && isNil (inst_of_typ typ) && tref_is_local cenv (tref_of_typ typ) - - -let tdor_as_uncoded (tag,idx) = - let tab = - if tag = tdor_TypeDef then tab_TypeDef - elif tag = tdor_TypeRef then tab_TypeRef - elif tag = tdor_TypeSpec then tab_TypeSpec - else failwith "tdor_as_uncoded" - GetUncodedToken tab idx - -// REVIEW: write into an accumuating buffer -let EmitArrayShape bb (ILArrayShape shape) = - let sized = List.filter (function (_,Some _) -> true | _ -> false) shape - let lobounded = List.filter (function (Some _,_) -> true | _ -> false) shape - emit_z_u32 bb shape.Length; - emit_z_u32 bb sized.Length; - sized |> List.iter (function (_,Some sz) -> emit_z_u32 bb sz | _ -> failwith "?"); - emit_z_u32 bb lobounded.Length; - lobounded |> List.iter (function (Some low,_) -> emit_z_u32 bb low | _ -> failwith "?") - -let hasthis_as_byte hasthis = - match hasthis with - | CC_instance -> e_IMAGE_CEE_CS_CALLCONV_INSTANCE - | CC_instance_explicit -> e_IMAGE_CEE_CS_CALLCONV_INSTANCE_EXPLICIT - | CC_static -> 0x00 - -let callconv_as_byte ntypars (Callconv (hasthis,bcc)) = - hasthis_as_byte hasthis ||| - (if ntypars > 0 then e_IMAGE_CEE_CS_CALLCONV_GENERIC else 0x00) ||| - (match bcc with - | CC_fastcall -> e_IMAGE_CEE_CS_CALLCONV_FASTCALL - | CC_stdcall -> e_IMAGE_CEE_CS_CALLCONV_STDCALL - | CC_thiscall -> e_IMAGE_CEE_CS_CALLCONV_THISCALL - | CC_cdecl -> e_IMAGE_CEE_CS_CALLCONV_CDECL - | CC_default -> 0x00 - | CC_vararg -> e_IMAGE_CEE_CS_CALLCONV_VARARG) - - -// REVIEW: write into an accumuating buffer -let rec emit_tspec cenv env bb (et,tspec:ILTypeSpec) = - if isNil tspec.GenericArgs then - Bytebuf.emit_int_as_byte bb et; - emit_tdesc_as_TypeDefOrRefEncoded cenv bb (tspec.Scope,tspec.Enclosing,tspec.Name) - else - Bytebuf.emit_int_as_byte bb et_WITH; - Bytebuf.emit_int_as_byte bb et; - emit_tdesc_as_TypeDefOrRefEncoded cenv bb (tspec.Scope,tspec.Enclosing,tspec.Name); - emit_z_u32 bb (List.length tspec.GenericArgs); - EmitTypes cenv env bb tspec.GenericArgs - -and GetTypeAsTypeDefOrRef cenv env ty = - if (typ_is_local cenv ty) then - let tref = tref_of_typ ty - (tdor_TypeDef, GetIdxForTypeDef cenv (TdKey(tref.Enclosing,tref.Name))) - elif is_tref_typ ty && isNil (inst_of_typ ty) then - (tdor_TypeRef, GetTypeRefAsTypeRefIdx cenv (tref_of_typ ty)) - else - (tdor_TypeSpec, GetTypeAsTypeSpecIdx cenv env ty) - -and GetTypeAsBytes cenv env ty = emit (fun bb -> EmitType cenv env bb ty) - -and GetTypeAsBlobIdx cenv env (ty:ILType) = - GetBytesAsBlobIdx cenv (GetTypeAsBytes cenv env ty) - -and GetTypeAsTypeSpecRow cenv env (ty:ILType) = - SimpleSharedRow [| Blob (GetTypeAsBlobIdx cenv env ty) |] - -and GetTypeAsTypeSpecIdx cenv env ty = - FindOrAddRow cenv tab_TypeSpec (GetTypeAsTypeSpecRow cenv env ty) - - -and EmitType cenv env bb ty = - let ilg = cenv.ilg - match ty with - (* REVIEW: what are these doing here? *) - | Type_value tspec when tspec.Name = "System.String" -> Bytebuf.emit_int_as_byte bb et_STRING - | Type_value tspec when tspec.Name = "System.Object" -> Bytebuf.emit_int_as_byte bb et_OBJECT - | typ when typ_is_SByte ilg typ -> Bytebuf.emit_int_as_byte bb et_I1 - | typ when typ_is_Int16 ilg typ -> Bytebuf.emit_int_as_byte bb et_I2 - | typ when typ_is_Int32 ilg typ -> Bytebuf.emit_int_as_byte bb et_I4 - | typ when typ_is_Int64 ilg typ -> Bytebuf.emit_int_as_byte bb et_I8 - | typ when typ_is_Byte ilg typ -> Bytebuf.emit_int_as_byte bb et_U1 - | typ when typ_is_UInt16 ilg typ -> Bytebuf.emit_int_as_byte bb et_U2 - | typ when typ_is_UInt32 ilg typ -> Bytebuf.emit_int_as_byte bb et_U4 - | typ when typ_is_UInt64 ilg typ -> Bytebuf.emit_int_as_byte bb et_U8 - | typ when typ_is_Double ilg typ -> Bytebuf.emit_int_as_byte bb et_R8 - | typ when typ_is_Single ilg typ -> Bytebuf.emit_int_as_byte bb et_R4 - | typ when typ_is_Bool ilg typ -> Bytebuf.emit_int_as_byte bb et_BOOLEAN - | typ when typ_is_Char ilg typ -> Bytebuf.emit_int_as_byte bb et_CHAR - | typ when typ_is_String ilg typ -> Bytebuf.emit_int_as_byte bb et_STRING - | typ when typ_is_Object ilg typ -> Bytebuf.emit_int_as_byte bb et_OBJECT - | typ when typ_is_IntPtr ilg typ -> Bytebuf.emit_int_as_byte bb et_I - | typ when typ_is_UIntPtr ilg typ -> Bytebuf.emit_int_as_byte bb et_U - | typ when typ_is_TypedReference ilg typ -> Bytebuf.emit_int_as_byte bb et_TYPEDBYREF - - | Type_boxed tspec -> emit_tspec cenv env bb (et_CLASS,tspec) - | Type_value tspec -> emit_tspec cenv env bb (et_VALUETYPE,tspec) - | Type_array (shape,ty) -> - if shape = Rank1ArrayShape then (Bytebuf.emit_int_as_byte bb et_SZARRAY ; EmitType cenv env bb ty) - else (Bytebuf.emit_int_as_byte bb et_ARRAY; EmitType cenv env bb ty; EmitArrayShape bb shape) - | Type_tyvar tv -> - let cgparams = env.envClassFormals - if int32 tv < cgparams then - Bytebuf.emit_int_as_byte bb et_VAR; - emit_z_u32 bb (int32 tv) - else - Bytebuf.emit_int_as_byte bb et_MVAR; - emit_z_u32 bb (int32 tv - cgparams) - - | Type_byref typ -> - Bytebuf.emit_int_as_byte bb et_BYREF; - EmitType cenv env bb typ - | Type_ptr typ -> - Bytebuf.emit_int_as_byte bb et_PTR; - EmitType cenv env bb typ - | Type_void -> - Bytebuf.emit_int_as_byte bb et_VOID - | Type_fptr x -> - Bytebuf.emit_int_as_byte bb et_FNPTR; - EmitCallsig cenv env bb (x.CallingConv,x.ArgTypes,x.ReturnType,None,0) - | Type_modified (req,tref,ty) -> - Bytebuf.emit_int_as_byte bb (if req then et_CMOD_REQD else et_CMOD_OPT); - emit_tdesc_as_TypeDefOrRefEncoded cenv bb (tref.Scope, tref.Enclosing,tref.Name); - EmitType cenv env bb ty - | _ -> failwith "EmitType" - -// REVIEW: write into an accumuating buffer -and EmitCallsig cenv env bb (callconv,args,ret,(varargs:varargs),genarity) = - Bytebuf.emit_int_as_byte bb (callconv_as_byte genarity callconv); - if genarity > 0 then emit_z_u32 bb (genarity); - emit_z_u32 bb ((List.length args + (match varargs with None -> 0 | Some l -> List.length l))); - EmitType cenv env bb ret; - args |> List.iter (EmitType cenv env bb); - match varargs with - | None | Some [] -> () (* no extra arg = no sentinel *) - | Some tys -> - Bytebuf.emit_int_as_byte bb et_SENTINEL; - List.iter (EmitType cenv env bb) tys - -and GetCallsigAsBytes cenv env x = emit (fun bb -> EmitCallsig cenv env bb x) - -// REVIEW: write into an accumuating buffer -and EmitTypes cenv env bb (inst: ILType list) = - inst |> List.iter (EmitType cenv env bb) - -let GetTypeAsMemberRefParent cenv env ty = - match GetTypeAsTypeDefOrRef cenv env ty with - | (tag,tok) when tag = tdor_TypeDef -> dprintn "GetTypeAsMemberRefParent: mspec should have been encoded as mdtMethodDef?"; MemberRefParent (mrp_TypeRef, 1) - | (tag,tok) when tag = tdor_TypeRef -> MemberRefParent (mrp_TypeRef, tok) - | (tag,tok) when tag = tdor_TypeSpec -> MemberRefParent (mrp_TypeSpec, tok) - | _ -> failwith "GetTypeAsMemberRefParent" - - -(* -------------------------------------------------------------------- - * Native types - * -------------------------------------------------------------------- *) - -let rec GetVariantTypeAsInt32 ty = - if List.mem_assoc ty (Lazy.force variant_type_map) then - (List.assoc ty (Lazy.force variant_type_map )) - else - match ty with - | VariantType_array vt -> vt_ARRAY ||| GetVariantTypeAsInt32 vt - | VariantType_vector vt -> vt_VECTOR ||| GetVariantTypeAsInt32 vt - | VariantType_byref vt -> vt_BYREF ||| GetVariantTypeAsInt32 vt - | _ -> failwith "Unexpected variant type" - -// based on information in ECMA and asmparse.y in the CLR codebase -let rec GetNativeTypeAsBlobIdx cenv (ty:ILNativeType) = - GetBytesAsBlobIdx cenv (GetNativeTypeAsBytes ty) - -and GetNativeTypeAsBytes ty = emit (fun bb -> EmitNativeType bb ty) - -// REVIEW: write into an accumuating buffer -and EmitNativeType bb ty = - if List.mem_assoc ty (Lazy.force native_type_rmap) then - Bytebuf.emit_int_as_byte bb (List.assoc ty (Lazy.force native_type_rmap)) - else - match ty with - | NativeType_empty -> () - | NativeType_custom (guid,nativeTypeName,custMarshallerName,cookieString) -> - let guid = Bytes.to_intarray guid - let u1 = string_as_utf8_intarray nativeTypeName - let u2 = string_as_utf8_intarray custMarshallerName - let u3 = Bytes.to_intarray cookieString - Bytebuf.emit_int_as_byte bb nt_CUSTOMMARSHALER; - emit_z_u32 bb (Array.length guid); - Bytebuf.emit_intarray_as_bytes bb guid; - emit_z_u32 bb (Array.length u1); Bytebuf.emit_intarray_as_bytes bb u1; - emit_z_u32 bb (Array.length u2); Bytebuf.emit_intarray_as_bytes bb u2; - emit_z_u32 bb (Array.length u3); Bytebuf.emit_intarray_as_bytes bb u3 - | NativeType_fixed_sysstring i -> - Bytebuf.emit_int_as_byte bb nt_FIXEDSYSSTRING; - emit_z_u32 bb i - - | NativeType_fixed_array i -> - Bytebuf.emit_int_as_byte bb nt_FIXEDARRAY; - emit_z_u32 bb i - | (* COM interop *) NativeType_safe_array (vt,name) -> - Bytebuf.emit_int_as_byte bb nt_SAFEARRAY; - emit_z_u32 bb (GetVariantTypeAsInt32 vt); - match name with - | None -> () - | Some n -> - let u1 = Bytes.to_intarray (Bytes.string_as_utf8_bytes_null_terminated n) - emit_z_u32 bb (Array.length u1) ; Bytebuf.emit_intarray_as_bytes bb u1 - | NativeType_array (nt,sizeinfo) -> (* REVIEW: check if this corresponds to the ECMA spec *) - Bytebuf.emit_int_as_byte bb nt_ARRAY; - match nt with - | None -> () - | Some ntt -> - (if ntt = NativeType_empty then - emit_z_u32 bb nt_MAX - else - EmitNativeType bb ntt); - match sizeinfo with - | None -> () (* chunk out with zeroes because some crappy tools (e.g. asmmeta) read these poorly and expect further elements. *) - | Some (pnum,additive) -> - (* ParamNum *) - emit_z_u32 bb pnum; - (* ElemMul *) (* z_u32 0x1l *) - match additive with - | None -> () - | Some n -> (* NumElem *) emit_z_u32 bb n - | _ -> failwith "Unexpected native type" - -(* -------------------------------------------------------------------- - * Native types - * -------------------------------------------------------------------- *) - -let rec GetFieldInitAsBlobIdx cenv env (ty:ILFieldInit) = - GetIntArrayAsBlobIdx cenv (GetFieldInitAsIntArray cenv env ty) - -// REVIEW: write into an accumuating buffer -and GetFieldInitAsIntArray cenv env i = - match i with - | FieldInit_string b -> Bytes.to_intarray (Bytes.string_as_unicode_bytes b) - | FieldInit_bool b -> [| if b then 0x01 else 0x00 |] - | FieldInit_char x -> u16_as_intarray x - | FieldInit_int8 x -> i8_as_intarray x - | FieldInit_int16 x -> i16_as_intarray x - | FieldInit_int32 x -> i32_as_intarray x - | FieldInit_int64 x -> i64_as_intarray x - | FieldInit_uint8 x -> u8_as_intarray x - | FieldInit_uint16 x -> u16_as_intarray x - | FieldInit_uint32 x -> u32_as_intarray x - | FieldInit_uint64 x -> u64_as_intarray x - | FieldInit_single x -> ieee32_as_intarray x - | FieldInit_double x -> ieee64_as_intarray x - | FieldInit_ref -> [| 0x00; 0x00; 0x00; 0x00; |] - -and GetFieldInitFlags i = - UShort - (uint16 - (match i with - | FieldInit_string _ -> et_STRING - | FieldInit_bool _ -> et_BOOLEAN - | FieldInit_char _ -> et_CHAR - | FieldInit_int8 _ -> et_I1 - | FieldInit_int16 _ -> et_I2 - | FieldInit_int32 _ -> et_I4 - | FieldInit_int64 _ -> et_I8 - | FieldInit_uint8 _ -> et_U1 - | FieldInit_uint16 _ -> et_U2 - | FieldInit_uint32 _ -> et_U4 - | FieldInit_uint64 _ -> et_U8 - | FieldInit_single _ -> et_R4 - | FieldInit_double _ -> et_R8 - | FieldInit_ref -> et_CLASS)) - -(* -------------------------------------------------------------------- - * Type definitions - * -------------------------------------------------------------------- *) - -let GetMemberAccessFlags access = - match access with - | MemAccess_compilercontrolled -> 0x00000000 - | MemAccess_public -> 0x00000006 - | MemAccess_private -> 0x00000001 - | MemAccess_family -> 0x00000004 - | MemAccess_famandassem -> 0x00000002 - | MemAccess_famorassem -> 0x00000005 - | MemAccess_assembly -> 0x00000003 - -let GetTypeAccessFlags access = - match access with - | TypeAccess_public -> 0x00000001 - | TypeAccess_private -> 0x00000000 - | TypeAccess_nested MemAccess_public -> 0x00000002 - | TypeAccess_nested MemAccess_private -> 0x00000003 - | TypeAccess_nested MemAccess_family -> 0x00000004 - | TypeAccess_nested MemAccess_famandassem -> 0x00000006 - | TypeAccess_nested MemAccess_famorassem -> 0x00000007 - | TypeAccess_nested MemAccess_assembly -> 0x00000005 - | TypeAccess_nested MemAccess_compilercontrolled -> failwith "bad type acccess" - -let rec GetTypeDefAsRow cenv env enc (td:ILTypeDef) = - let nselem,nelem = name_as_elem_pair cenv td.Name - let flags = - if (is_toplevel_tname td.Name) then 0x00000000 - else - - GetTypeAccessFlags td.Access ||| - begin - match td.Layout with - | TypeLayout_auto -> 0x00000000 - | TypeLayout_sequential _ -> 0x00000008 - | TypeLayout_explicit _ -> 0x00000010 - end ||| - begin - match td.tdKind with - | TypeDef_interface -> 0x00000020 - | _ -> 0x00000000 - end ||| - (if td.IsAbstract then 0x00000080l else 0x00000000) ||| - (if td.IsSealed then 0x00000100l else 0x00000000) ||| - (if td.tdComInterop then 0x00001000l else 0x00000000) ||| - (if td.IsSerializable then 0x00002000l else 0x00000000) ||| - begin - match td.Encoding with - | TypeEncoding_ansi -> 0x00000000 - | TypeEncoding_autochar -> 0x00020000 - | TypeEncoding_unicode -> 0x00010000 - end ||| - begin - match td.InitSemantics with - | TypeInit_beforefield when not (match td.tdKind with TypeDef_interface -> true | _ -> false) -> 0x00100000 - | _ -> 0x00000000 - end ||| - (if td.tdSpecialName then 0x00000400 else 0x00000000) ||| - (* @REVIEW (if rtspecialname_of_tdef td then 0x00000800l else 0x00000000) ||| *) - (if td.tdHasSecurity or dest_security_decls td.tdSecurityDecls <> [] then 0x00040000 else 0x00000000) - - let tdor_tag, tdor_row = GetTypeOptionAsTypeDefOrRef cenv env td.Extends - UnsharedRow - [| ULong flags ; - nelem; - nselem; - TypeDefOrRefOrSpec (tdor_tag, tdor_row); - SimpleIndex (tab_Field, cenv.fieldDefs.Count + 1); - SimpleIndex (tab_Method,cenv.methodDefIdxsByKey.Count + 1) |] - -and GetTypeOptionAsTypeDefOrRef cenv env ty_opt = - match ty_opt with - | None -> (tdor_TypeDef, 0) - | Some ty -> (GetTypeAsTypeDefOrRef cenv env ty) - -and GetTypeDefAsPropertyMapRow cenv tidx = - UnsharedRow - [| SimpleIndex (tab_TypeDef, tidx); - SimpleIndex (tab_Property, cenv.propertyDefs.Count + 1) |] - -and GetTypeDefAsEventMapRow cenv tidx = - UnsharedRow - [| SimpleIndex (tab_TypeDef, tidx); - SimpleIndex (tab_Event, cenv.eventDefs.Count + 1) |] - -and GetKeyForFieldDef tidx fd = - FieldDefKey (tidx,fd.fdName, fd.fdType) - -and GenFieldDefPass2 cenv tidx fd = - ignore (AddUniqueEntry "field" (fun (fdkey:FieldDefKey) -> fdkey.Name) cenv.fieldDefs (GetKeyForFieldDef tidx fd)) - -and GetKeyForMethodDef tidx md = - MethodDefKey (tidx,md.mdGenericParams.Length, md.mdName, md.Return.Type, md.ParameterTypes) - -and GenMethodDefPass2 cenv tidx md = - let idx = - AddUniqueEntry "method" - (fun (key:MethodDefKey) -> - dprintn "Duplicate in method table is:"; - dprintn (" Type index: "^string key.TypeIdx); - dprintn (" Method name: "^key.Name); - dprintn (" Method arity (num generic params): "^string key.GenericArity); - key.Name - ) - cenv.methodDefIdxsByKey - (GetKeyForMethodDef tidx md) - - cenv.methodDefIdxs.[md] <- idx - -and GetKeyForPropertyDef tidx x = - PropKey (tidx, x.propName, x.propType, x.propArgs) - -and GenPropertyDefPass2 cenv tidx x = - ignore (AddUniqueEntry "property" (fun (PropKey (_,n,_,_)) -> n) cenv.propertyDefs (GetKeyForPropertyDef tidx x)) - -and GetTypeAsImplementsRow cenv env tidx ty = - let tdor_tag,tdor_row = GetTypeAsTypeDefOrRef cenv env ty - UnsharedRow - [| SimpleIndex (tab_TypeDef, tidx); - TypeDefOrRefOrSpec (tdor_tag,tdor_row) |] - -and GenImplementsPass2 cenv env tidx ty = - AddUnsharedRow cenv tab_InterfaceImpl (GetTypeAsImplementsRow cenv env tidx ty) |> ignore - -and GetKeyForEvent tidx x = - EventKey (tidx, x.eventName) - -and GenEventDefPass2 cenv tidx x = - ignore (AddUniqueEntry "event" (fun (EventKey(a,b)) -> b) cenv.eventDefs (GetKeyForEvent tidx x)) - -and GenTypeDefPass2 pidx enc cenv (td:ILTypeDef) = - try - let env = env_enter_tdef (List.length td.tdGenericParams) - let tidx = GetIdxForTypeDef cenv (TdKey(enc,td.Name)) - let tidx2 = AddUnsharedRow cenv tab_TypeDef (GetTypeDefAsRow cenv env enc td) - if tidx <> tidx2 then failwith "index of typedef on second pass does not match index on first pass"; - - // Add entries to auxiliary mapping tables, e.g. Nested, PropertyMap etc. - // Note Nested is organised differntly to the others... - if nonNil enc then - AddUnsharedRow cenv tab_Nested - (UnsharedRow - [| SimpleIndex (tab_TypeDef, tidx); - SimpleIndex (tab_TypeDef, pidx) |]) |> ignore; - let props = dest_pdefs td.Properties - if nonNil props then - AddUnsharedRow cenv tab_PropertyMap - (GetTypeDefAsPropertyMapRow cenv tidx) |> ignore; - let events = (dest_edefs td.Events) - if nonNil events then - AddUnsharedRow cenv tab_EventMap - (GetTypeDefAsEventMapRow cenv tidx) |> ignore; - - // Now generate or assign index numbers for tables referenced by the maps. - // Don't yet generate contents of these tables - leave that to pass3, as - // code may need to embed these entries. - td.Implements |> List.iter (GenImplementsPass2 cenv env tidx); - props |> List.iter (GenPropertyDefPass2 cenv tidx); - events |> List.iter (GenEventDefPass2 cenv tidx); - td.Fields |> dest_fdefs |> List.iter (GenFieldDefPass2 cenv tidx); - td.Methods |> dest_mdefs |> List.iter (GenMethodDefPass2 cenv tidx); - td.NestedTypes |> dest_tdefs |> GenTypeDefsPass2 tidx (enc@[td.Name]) cenv - with e -> - failwith ("Error in pass2 for type "^td.tdName^", error: "^e.Message); - rethrow(); - raise e - -and GenTypeDefsPass2 pidx enc cenv tds = - List.iter (GenTypeDefPass2 pidx enc cenv) tds - -(*===================================================================== - * Pass 3 - write details of methods, fields, IL code, custom attrs etc. - *=====================================================================*) - -exception MethodDefNotFound -let FindMethodDefIdx cenv mdkey = - try GetTableEntry cenv.methodDefIdxsByKey mdkey - with :? KeyNotFoundException -> - let tname_of_tidx i = - match - (cenv.typeDefs.dict - |> Seq.fold (fun sofar kvp -> - let tkey2 = kvp.Key - let tidx2 = kvp.Value - if i = tidx2 then - if sofar = None then - Some tkey2 - else failwith "mutiple type names map to index" - else sofar) None) with - | Some x -> x - | None -> raise MethodDefNotFound - let (TdKey (tenc,tname)) = tname_of_tidx mdkey.TypeIdx - dprintn ("The local method '"^(String.concat "." (tenc@[tname]))^"'::'"^mdkey.Name^"' was referenced but not declared"); - dprintn ("generic arity: "^string mdkey.GenericArity); - //dprint "return type: "; Ilprint.output_typ stderr rty; dprintn ""; - //List.iter (fun ty -> dprint "arg type: "; Ilprint.output_typ stderr ty; dprintn "") argtys; - cenv.methodDefIdxsByKey.dict |> Seq.iter (fun (KeyValue(mdkey2,_)) -> - if mdkey2.TypeIdx = mdkey.TypeIdx && mdkey.Name = mdkey2.Name then - let (TdKey (tenc2,tname2)) = tname_of_tidx mdkey2.TypeIdx - dprintn ("A method in '"^(String.concat "." (tenc2@[tname2]))^"' had the right name but the wrong signature:"); - dprintn ("generic arity: "^string mdkey2.GenericArity)) ; - raise MethodDefNotFound - - -let rec GetMethodDefIdx cenv md = - cenv.methodDefIdxs.[md] - -and FindFieldDefIdx cenv fdkey = - try GetTableEntry cenv.fieldDefs fdkey - with :? KeyNotFoundException -> - failwith ("The local field "^fdkey.Name^" was referenced but not declared"); - 1 - -and GetFieldDefAsFieldDefIdx cenv tidx fd = - FindFieldDefIdx cenv (GetKeyForFieldDef tidx fd) - -(* -------------------------------------------------------------------- - * ILMethodRef --> ILMethodDef. - * - * Only successfuly converts ILMethodRef's referring to - * methods in the module being emitted. - * -------------------------------------------------------------------- *) - -let GetMethodRefAsMethodDefIdx cenv (mref:ILMethodRef) = - try - let tref = mref.EnclosingTypeRef - if not (tref_is_local cenv tref) then - failwithf "method referred to by method impl, event or property is not in a type defined in this module, method ref is %A" mref; - let tidx = GetIdxForTypeDef cenv (TdKey(tref.Enclosing,tref.Name)) - let mdkey = MethodDefKey (tidx,mref.GenericArity, mref.Name, mref.ReturnType, mref.ArgTypes) - FindMethodDefIdx cenv mdkey - with e -> - failwithf "Error in GetMethodRefAsMethodDefIdx for mref = %A, error: %s" mref.Name e.Message; - rethrow(); - raise e - -let rec MethodRefInfoAsMemberRefRow cenv env fenv (nm,typ,callconv,args,ret,varargs,genarity) = - MemberRefRow(GetTypeAsMemberRefParent cenv env typ, - GetStingHeapIdx cenv nm, - GetMethodRefInfoAsBlobIdx cenv fenv (callconv,args,ret,varargs,genarity)) - -and GetMethodRefInfoAsBlobIdx cenv env info = - GetBytesAsBlobIdx cenv (GetCallsigAsBytes cenv env info) - -let GetMethodRefInfoAsMemberRefIdx cenv env ((nm,typ,cc,args,ret,varargs,genarity) as minfo) = - let fenv = env_enter_msig (if is_array_ty typ then env.envClassFormals else List.length (inst_of_typ typ)) genarity - FindOrAddRow cenv tab_MemberRef - (MethodRefInfoAsMemberRefRow cenv env fenv minfo) - -let GetMethodRefInfoAsMethodRefOrDef always_mdef cenv env ((nm,typ,cc,args,ret,varargs,genarity) as minfo) = - if isNone varargs && (always_mdef or typ_is_local cenv typ) then - if not (is_tref_typ typ) then failwith "GetMethodRefInfoAsMethodRefOrDef: unexpected local tref-typ"; - try (mdor_MethodDef, GetMethodRefAsMethodDefIdx cenv (mk_mref(tref_of_typ typ, cc, nm, genarity, args,ret))) - with MethodDefNotFound -> (mdor_MemberRef, GetMethodRefInfoAsMemberRefIdx cenv env minfo) - else (mdor_MemberRef, GetMethodRefInfoAsMemberRefIdx cenv env minfo) - - -// -------------------------------------------------------------------- -// ILMethodSpec --> ILMethodRef/ILMethodDef/ILMethodSpec -// -------------------------------------------------------------------- - -let rec GetMethodSpecInfoAsMethodSpecIdx cenv env (nm,typ,cc,args,ret,varargs,minst) = - let mdor_tag,mdor_row = GetMethodRefInfoAsMethodRefOrDef false cenv env (nm,typ,cc,args,ret,varargs,List.length minst) - let blob = - emit (fun bb -> - Bytebuf.emit_int_as_byte bb e_IMAGE_CEE_CS_CALLCONV_GENERICINST; - emit_z_u32 bb (List.length minst); - minst |> List.iter (EmitType cenv env bb)) - FindOrAddRow cenv tab_MethodSpec - (SimpleSharedRow - [| MethodDefOrRef (mdor_tag,mdor_row); - Blob (GetBytesAsBlobIdx cenv blob) |]) - -and GetMethodDefOrRefAsUncodedToken (tag,idx) = - let tab = - if tag = mdor_MethodDef then tab_Method - elif tag = mdor_MemberRef then tab_MemberRef - else failwith "GetMethodDefOrRefAsUncodedToken" - GetUncodedToken tab idx - -and GetMethodSpecInfoAsUncodedToken cenv env ((_,_,_,_,_,_,minst) as minfo) = - if minst <> [] then - GetUncodedToken tab_MethodSpec (GetMethodSpecInfoAsMethodSpecIdx cenv env minfo) - else - GetMethodDefOrRefAsUncodedToken (GetMethodRefInfoAsMethodRefOrDef false cenv env (mrefinfo_of_mspecinfo minfo)) - -and GetMethodSpecAsUncodedToken cenv env mspec = - GetMethodSpecInfoAsUncodedToken cenv env (InfoOfMethodSpec mspec) - -and mrefinfo_of_mspecinfo (nm,typ,cc,args,ret,varargs,minst) = - (nm,typ,cc,args,ret,varargs,List.length minst) - -and GetMethodSpecAsMethodDefOrRef cenv env (mspec,varargs) = - GetMethodRefInfoAsMethodRefOrDef false cenv env (mrefinfo_of_mspecinfo (InfoOfMethodSpec (mspec,varargs))) - -and GetMethodSpecAsMethodDef cenv env (mspec,varargs) = - GetMethodRefInfoAsMethodRefOrDef true cenv env (mrefinfo_of_mspecinfo (InfoOfMethodSpec (mspec,varargs))) - -and InfoOfMethodSpec (mspec:ILMethodSpec,varargs) = - (mspec.Name, - mspec.EnclosingType, - mspec.CallingConv, - mspec.FormalArgTypes, - mspec.FormalReturnType, - varargs, - mspec.GenericArgs) - -(* -------------------------------------------------------------------- - * Il.method_in_parent --> ILMethodRef/ILMethodDef - * - * Used for MethodImpls. - * -------------------------------------------------------------------- *) - -let rec GetOverridesSpecAsMemberRefIdx cenv env ospec = - let fenv = env_enter_ospec ospec - let row = - MethodRefInfoAsMemberRefRow cenv env fenv - (ospec.MethodRef.Name, - ospec.EnclosingType, - ospec.MethodRef.CallingConv, - ospec.MethodRef.ArgTypes, - ospec.MethodRef.ReturnType, - None, - ospec.MethodRef.GenericArity) - FindOrAddRow cenv tab_MemberRef row - -and GetOverridesSpecAsMethodDefOrRef cenv env (ospec:OverridesSpec) = - let typ = ospec.EnclosingType - if typ_is_local cenv typ then - if not (is_tref_typ typ) then failwith "GetOverridesSpecAsMethodDefOrRef: unexpected local tref-typ"; - try (mdor_MethodDef, GetMethodRefAsMethodDefIdx cenv ospec.MethodRef) - with MethodDefNotFound -> (mdor_MemberRef, GetOverridesSpecAsMemberRefIdx cenv env ospec) - else - (mdor_MemberRef, GetOverridesSpecAsMemberRefIdx cenv env ospec) - -(* -------------------------------------------------------------------- - * ILMethodRef --> ILMethodRef/ILMethodDef - * - * Used for Custom Attrs. - * -------------------------------------------------------------------- *) - -let rec GetMethodRefAsMemberRefIdx cenv env fenv (mref:ILMethodRef) = - let row = - MethodRefInfoAsMemberRefRow cenv env fenv - (mref.Name, - mk_nongeneric_boxed_typ mref.EnclosingTypeRef, - mref.CallingConv, - mref.ArgTypes, - mref.ReturnType, - None, - mref.GenericArity) - FindOrAddRow cenv tab_MemberRef row - -and GetMethodRefAsCustomAttribType cenv (mref:ILMethodRef) = - let fenv = env_enter_mref mref - let tref = mref.EnclosingTypeRef - if tref_is_local cenv tref then - try (cat_MethodDef, GetMethodRefAsMethodDefIdx cenv mref) - with MethodDefNotFound -> (cat_MemberRef, GetMethodRefAsMemberRefIdx cenv fenv fenv mref) - else - (cat_MemberRef, GetMethodRefAsMemberRefIdx cenv fenv fenv mref) - -(* -------------------------------------------------------------------- - * ILAttributes --> CustomAttribute rows - * -------------------------------------------------------------------- *) - -let rec GetCustomAttrDataAsBlobIdx cenv data = - if Bytes.length data = 0 then 0 else GetBytesAsBlobIdx cenv data - -and GetCustomAttrRow cenv hca attr = - let cat = GetMethodRefAsCustomAttribType cenv attr.customMethod.MethodRef - UnsharedRow - [| HasCustomAttribute (fst hca, snd hca); - CustomAttributeType (fst cat, snd cat); - Blob (GetCustomAttrDataAsBlobIdx cenv attr.customData); |] - -and GenCustomAttrPass3 cenv hca attr = - AddUnsharedRow cenv tab_CustomAttribute (GetCustomAttrRow cenv hca attr) |> ignore - -and GenCustomAttrsPass3 cenv hca attrs = - attrs |> dest_custom_attrs |> List.iter (GenCustomAttrPass3 cenv hca) - -// -------------------------------------------------------------------- -// ILPermissionSet --> DeclSecurity rows -// -------------------------------------------------------------------- *) - -let rec GetSecurityDeclRow cenv hds (PermissionSet (action, s)) = - let bytes = Bytes.to_intarray s - UnsharedRow - [| UShort (uint16 (List.assoc action (Lazy.force secaction_map))); - HasDeclSecurity (fst hds, snd hds); - Blob (GetIntArrayAsBlobIdx cenv bytes); |] - -and GenSecurityDeclPass3 cenv hds attr = - AddUnsharedRow cenv tab_Permission (GetSecurityDeclRow cenv hds attr) |> ignore - -and GenSecurityDeclsPass3 cenv hds attrs = - List.iter (GenSecurityDeclPass3 cenv hds) attrs - -// -------------------------------------------------------------------- -// ILFieldSpec --> FieldRef or ILFieldDef row -// -------------------------------------------------------------------- - -let rec GetFieldSpecAsMemberRefRow cenv env fenv (fspec:ILFieldSpec) = - MemberRefRow (GetTypeAsMemberRefParent cenv env fspec.EnclosingType, - GetStingHeapIdx cenv fspec.Name, - GetFieldSpecSigAsBlobIdx cenv fenv fspec) - -and GetFieldSpecAsMemberRefIdx cenv env fspec = - let fenv = env_enter_fspec fspec - FindOrAddRow cenv tab_MemberRef (GetFieldSpecAsMemberRefRow cenv env fenv fspec) - -// REVIEW: write into an accumuating buffer -and EmitFieldSpecSig cenv env bb (fspec:ILFieldSpec) = - Bytebuf.emit_int_as_byte bb e_IMAGE_CEE_CS_CALLCONV_FIELD; - EmitType cenv env bb fspec.FormalType - -and GetFieldSpecSigAsBytes cenv env x = - emit (fun bb -> EmitFieldSpecSig cenv env bb x) - -and GetFieldSpecSigAsBlobIdx cenv env x = - GetBytesAsBlobIdx cenv (GetFieldSpecSigAsBytes cenv env x) - -and GetFieldSpecAsFieldDefOrRef cenv env (fspec:ILFieldSpec) = - let typ = fspec.EnclosingType - if typ_is_local cenv typ then - if not (is_tref_typ typ) then failwith "GetFieldSpecAsFieldDefOrRef: unexpected local tref-typ"; - let tref = tref_of_typ typ - let tidx = GetIdxForTypeDef cenv (TdKey(tref.Enclosing,tref.Name)) - let fdkey = FieldDefKey (tidx,fspec.Name, fspec.FormalType) - (true, FindFieldDefIdx cenv fdkey) - else - (false, GetFieldSpecAsMemberRefIdx cenv env fspec) - -and GetFieldDefOrRefAsUncodedToken (tag,idx) = - let tab = if tag then tab_Field else tab_MemberRef - GetUncodedToken tab idx - -(* -------------------------------------------------------------------- - * Il.callsig --> StandAloneSig - * -------------------------------------------------------------------- *) - -let GetCallsigAsBlobIdx cenv env (callsig:ILCallingSignature,varargs) = - GetBytesAsBlobIdx cenv - (GetCallsigAsBytes cenv env (callsig.CallingConv, - callsig.ArgTypes, - callsig.ReturnType,varargs,0)) - -let GetCallsigAsStandAloneSigRow cenv env x = - SimpleSharedRow [| Blob (GetCallsigAsBlobIdx cenv env x) |] - -let GetCallsigAsStandAloneSigIdx cenv env info = - FindOrAddRow cenv tab_StandAloneSig (GetCallsigAsStandAloneSigRow cenv env info) - -(* -------------------------------------------------------------------- - * local signatures --> BlobHeap idx - * -------------------------------------------------------------------- *) - -let EmitLocalSig cenv env bb locals = - Bytebuf.emit_int_as_byte bb e_IMAGE_CEE_CS_CALLCONV_LOCAL_SIG; - emit_z_u32 bb (List.length locals); - locals |> List.iter (typ_of_local >> EmitType cenv env bb) - -let GetLocalSigAsBlobHeapIdx cenv env locals = - GetBytesAsBlobIdx cenv (emit (fun bb -> EmitLocalSig cenv env bb locals)) - -let GetLocalSigAsStandAloneSigIdx cenv env locals = - SimpleSharedRow [| Blob ( GetLocalSigAsBlobHeapIdx cenv env locals ); |] - - - -type ExceptionClauseKind = - | FinallyClause - | FaultClause - | TypeFilterClause of int32 - | FilterClause of int - -type ExceptionClauseSpec = (int * int * int * int * ExceptionClauseKind) - -module Codebuf = begin - - (* -------------------------------------------------------------------- - * Buffer to write results of emitting code into. Also record: - * - branch sources (where fixups will occur) - * - possible branch destinations - * - locations of embedded handles into the string table - * - the exception table - * -------------------------------------------------------------------- *) - type t = - { code: Bytebuf.t; - /// (instruction; optional short form); start of instr in code buffer; code loc for the end of the instruction the fixup resides in ; where is the destination of the fixup - mutable reqd_brfixups: ((int * int option) * int * ILCodeLabel list) list; - avail_brfixups: Dictionary.t ; - /// code loc to fixup in code buffer - mutable reqd_string_fixups_in_method: (int * int) list; - /// data for exception handling clauses - mutable seh: ExceptionClauseSpec list; - seqpoints: ResizeArray; - } - - let CreateCodeBuffer nm = - { seh = []; - code= Bytebuf.create 200; - reqd_brfixups=[]; - reqd_string_fixups_in_method=[]; - avail_brfixups = Dictionary.create 0; - seqpoints = new ResizeArray<_>(10) - } - - let emit_seh_clause codebuf seh = codebuf.seh <- seh :: codebuf.seh - - let emit_seqpoint cenv codebuf (m:ILSourceMarker) = - if cenv.generate_pdb then - // table indexes are 1-based, document array indexes are 0-based - let doc = (FindOrAddSharedEntry cenv.documents m.Document) - 1 - codebuf.seqpoints.Add - { Document=doc; - Offset= Bytebuf.length codebuf.code; - Line=m.Line; - Column=m.Column; - EndLine=m.EndLine; - EndColumn=m.EndColumn; } - - let emit_byte codebuf x = Bytebuf.emit_int_as_byte codebuf.code x - let emit_intarray_as_bytes codebuf x = Bytebuf.emit_intarray_as_bytes codebuf.code x - let emit_u16 codebuf x = Bytebuf.emit_u16 codebuf.code x - let emit_i32 codebuf x = Bytebuf.emit_i32 codebuf.code x - let emit_i64 codebuf x = Bytebuf.emit_i64 codebuf.code x - - let emit_uncoded codebuf u = emit_i32 codebuf u - - let record_reqd_stringfixup codebuf stringidx = - codebuf.reqd_string_fixups_in_method <- (Bytebuf.length codebuf.code, stringidx) :: codebuf.reqd_string_fixups_in_method; - // Write a special value in that we check later when applying the fixup - emit_i32 codebuf 0xdeadbeef - - let record_reqd_brfixups codebuf i tgs = - codebuf.reqd_brfixups <- (i, Bytebuf.length codebuf.code, tgs) :: codebuf.reqd_brfixups; - (* Write a special value in that we check later when applying the fixup *) - (* Value is 0x11 {deadbbbb}* where 11 is for the instruction and deadbbbb is for each target *) - emit_byte codebuf 0x11; (* for the instruction *) - (if fst i = i_switch then - emit_i32 codebuf ((List.length tgs))); - List.iter (fun _ -> emit_i32 codebuf 0xdeadbbbb) tgs - - let record_reqd_brfixup codebuf i tg = record_reqd_brfixups codebuf i [tg] - let record_avail_brfixup codebuf tg = - Dictionary.add codebuf.avail_brfixups tg (Bytebuf.length codebuf.code) - - (* -------------------------------------------------------------------- - * Applying branch fixups. Use short versions of instructions - * wherever possible. Sadly we can only determine if we can use a short - * version after we've layed out the code for all other instructions. - * This in turn means that using a short version may change - * the various offsets into the code. - * -------------------------------------------------------------------- *) - - let binchop p (arr: 'a[]) = - let rec go n m = - if n > m then not_found() - else - let i = (n+m)/2 - let c = p arr.[i] in if c = 0 then i elif c < 0 then go n (i-1) else go (i+1) m - go 0 (Array.length arr) - - let apply_brfixups - orig_code - orig_seh - orig_reqd_string_fixups - orig_avail_brfixups - orig_reqd_brfixups - orig_seqpoints - orig_scopes = - let ordered_orig_reqd_brfixups = orig_reqd_brfixups |> List.sortBy (fun (_,fixuploc,_) -> fixuploc) - - let new_code = Bytebuf.create (Bytes.length orig_code) - - (* Copy over all the code, working out whether the branches will be short *) - (* or long and adjusting the branch destinations. Record an adjust function to adjust all the other *) - (* gumpf that refers to fixed offsets in the code stream. *) - let new_code, new_reqd_brfixups,adjuster = - let remaining_reqd_brfixups = ref ordered_orig_reqd_brfixups - let orig_where = ref 0 - let new_where = ref 0 - let done_last = ref false - let new_reqd_brfixups = ref [] - - let adjustments = ref [] - - while (!remaining_reqd_brfixups <> [] or not !done_last) do - let doing_last = isNil !remaining_reqd_brfixups - let orig_start_of_nobranch_block = !orig_where - let new_start_of_nobranch_block = !new_where - - if logging then dprintn ("move chunk, doing_last = "^(if doing_last then "true" else "false")); - - let orig_end_of_nobranch_block = - if doing_last then Bytes.length orig_code - else - let (_,orig_start_of_instr,_) = List.hd !remaining_reqd_brfixups - orig_start_of_instr - - (* Copy over a chunk of non-branching code *) - let nobranch_len = orig_end_of_nobranch_block - orig_start_of_nobranch_block - Bytebuf.emit_bytes new_code (Bytes.sub orig_code orig_start_of_nobranch_block nobranch_len); - - (* Record how to adjust addresses in this range, including the branch instruction *) - (* we write below, or the end of the method if we're doing the last bblock *) - adjustments := (orig_start_of_nobranch_block,orig_end_of_nobranch_block,new_start_of_nobranch_block) :: !adjustments; - - (* Increment locations to the branch instruction we're really interested in *) - orig_where := orig_end_of_nobranch_block; - new_where := !new_where + nobranch_len; - - (* Now do the branch instruction. Decide whether the fixup will be short or long in the new code *) - if doing_last then done_last := true - else begin - let (i,orig_start_of_instr,tgs) = List.hd !remaining_reqd_brfixups - remaining_reqd_brfixups := List.tl !remaining_reqd_brfixups; - if Bytes.get orig_code orig_start_of_instr <> 0x11 then failwith "br fixup sanity check failed (1)"; - let i_length = if fst i = i_switch then 5 else 1 - orig_where := !orig_where + i_length; - - let orig_end_of_instr = orig_start_of_instr + i_length + 4 * List.length tgs - let new_end_of_instr_if_small = !new_where + i_length + 1 - let new_end_of_instr_if_big = !new_where + i_length + 4 * List.length tgs - - let short = - match i,tgs with - | (_,Some i_short),[tg] - when - begin - // Use the original offsets to compute if the branch is small or large. This is - // a safe approximation because code only gets smaller. - if not (Dictionary.mem orig_avail_brfixups tg) then - dprintn ("branch target "^string_of_code_label tg^" not found in code"); - let orig_dest = - match Dictionary.tryfind orig_avail_brfixups tg with - | Some(v) -> v - | None -> 666666 - let orig_rel_offset = orig_dest - orig_end_of_instr - -128 <= orig_rel_offset && orig_rel_offset <= 127 - end - -> - Bytebuf.emit_int_as_byte new_code i_short; - true - | (i_long,_),_ -> - Bytebuf.emit_int_as_byte new_code i_long; - (if i_long = i_switch then - Bytebuf.emit_i32 new_code ((List.length tgs))); - false - - new_where := !new_where + i_length; - if !new_where <> (Bytebuf.length new_code) then dprintn "mismatch between new_where and new_code"; - - tgs |> List.iter - (fun tg -> - let orig_fixuploc = !orig_where - CheckFixup32 orig_code orig_fixuploc 0xdeadbbbb; - - if short then - new_reqd_brfixups := (!new_where, new_end_of_instr_if_small, tg, true) :: !new_reqd_brfixups; - Bytebuf.emit_int_as_byte new_code 0x98; (* sanity check *) - new_where := !new_where + 1; - else - new_reqd_brfixups := (!new_where, new_end_of_instr_if_big, tg, false) :: !new_reqd_brfixups; - Bytebuf.emit_i32 new_code 0xf00dd00fl; (* sanity check *) - new_where := !new_where + 4; - if !new_where <> Bytebuf.length new_code then dprintn "mismatch between new_where and new_code"; - orig_where := !orig_where + 4); - - if !orig_where <> orig_end_of_instr then dprintn "mismatch between orig_where and orig_end_of_instr"; - end; - done; - - let adjuster = - let arr = Array.of_list (List.rev !adjustments) - fun addr -> - let i = - try binchop (fun (a1,a2,_) -> if addr < a1 then -1 elif addr > a2 then 1 else 0) arr - with - :? KeyNotFoundException -> - failwith ("adjuster: address "^string addr^" is out of range") - let (orig_start_of_nobranch_block,orig_end_of_nobranch_block,new_start_of_nobranch_block) = arr.[i] - addr - (orig_start_of_nobranch_block - new_start_of_nobranch_block) - - Bytebuf.close new_code, - !new_reqd_brfixups, - adjuster - - (* Now adjust everything *) - let new_avail_brfixups = - let tab = Dictionary.create 10 - Dictionary.iter (fun tglab orig_brdest -> Dictionary.add tab tglab (adjuster orig_brdest)) orig_avail_brfixups; - tab - let new_reqd_string_fixups = List.map (fun (orig_fixuploc,stok) -> adjuster orig_fixuploc,stok) orig_reqd_string_fixups - let new_seqpoints = Array.map (fun (sp:PdbSequencePoint) -> {sp with Offset=adjuster sp.Offset}) orig_seqpoints - let new_seh = - orig_seh |> List.map (fun (st1,sz1,st2,sz2,kind) -> - (adjuster st1,(adjuster (st1 + sz1) - adjuster st1), - adjuster st2,(adjuster (st2 + sz2) - adjuster st2), - (match kind with - | FinallyClause | FaultClause | TypeFilterClause _ -> kind - | FilterClause n -> FilterClause (adjuster n)))) - - let new_scopes = - let rec remap scope = - {scope with StartOffset = adjuster scope.StartOffset; - EndOffset = adjuster scope.EndOffset; - Children = Array.map remap scope.Children } - List.map remap orig_scopes - - (* Now apply the adjusted fixups in the new code *) - new_reqd_brfixups |> List.iter (fun (new_fixuploc,end_of_instr,tg, small) -> - if not (Dictionary.mem new_avail_brfixups tg) then - failwith ("target "^string_of_code_label tg^" not found in new fixups"); - try - let n = Dictionary.find new_avail_brfixups tg - let rel_offset = (n - end_of_instr) - if small then - if Bytes.get new_code new_fixuploc <> 0x98 then failwith "br fixupsanity check failed"; - Bytes.set new_code new_fixuploc (b0 rel_offset); - else - CheckFixup32 new_code new_fixuploc 0xf00dd00fl; - ApplyFixup32 new_code new_fixuploc rel_offset - with Not_found -> ()); - - new_code, new_reqd_string_fixups, new_seh, new_seqpoints, new_scopes - - - (* -------------------------------------------------------------------- - * Structured residue of emitting instructions: SEH exception handling - * and scopes for local variables. - * -------------------------------------------------------------------- *) - - (* Emitting instructions generates a tree of seh specifications *) - (* We then emit the exception handling specs separately. *) - (* nb. ECMA spec says the SEH blocks must be returned inside-out *) - type seh_tree = - | Tip - | Node of (ExceptionClauseSpec option * seh_tree list) list - - (* Emitting instructions also generates a tree of locals-in-use specifications *) - (* i.e. scopes suitable for use to generate debugging info *) - type scope = pdb_method_scope - - - (* -------------------------------------------------------------------- - * Table of encodings for instructions without arguments, also indexes - * for all instructions. - * -------------------------------------------------------------------- *) - - let encoding_of_noarg_instr_table = Dictionary.create 300 - let _ = - List.iter - (fun (x,mk) -> Dictionary.add encoding_of_noarg_instr_table mk x) - (noarg_instrs.Force()) - let encoding_of_noarg_instr si = Dictionary.find encoding_of_noarg_instr_table si - (* let is_noarg_instr s = Dictionary.mem encoding_of_noarg_instr_table s *) - - - (* -------------------------------------------------------------------- - * Emit instructions - * -------------------------------------------------------------------- *) - - let emit_instr_code codebuf i = - if i > 0xFF then - assert (i >>> 8 = 0xFE); - emit_byte codebuf ( ((i >>> 8) &&& 0xFF)); - emit_byte codebuf ( (i &&& 0xFF)); - else - emit_byte codebuf i - - let emit_typ_instr cenv codebuf env i ty = - emit_instr_code codebuf i; - emit_uncoded codebuf (tdor_as_uncoded (GetTypeAsTypeDefOrRef cenv env ty)) - - let emit_mspecinfo_instr cenv codebuf env i mspecinfo = - emit_instr_code codebuf i; - emit_uncoded codebuf (GetMethodSpecInfoAsUncodedToken cenv env mspecinfo) - - let emit_mspec_instr cenv codebuf env i mspec = - emit_instr_code codebuf i; - emit_uncoded codebuf (GetMethodSpecAsUncodedToken cenv env mspec) - - let emit_fspec_instr cenv codebuf env i fspec = - emit_instr_code codebuf i; - emit_uncoded codebuf (GetFieldDefOrRefAsUncodedToken (GetFieldSpecAsFieldDefOrRef cenv env fspec)) - - let emit_short_u16_instr codebuf (i_short,i) x = - let n = int32 x - if n <= 255 then - emit_instr_code codebuf i_short; - emit_byte codebuf n; - else - emit_instr_code codebuf i; - emit_u16 codebuf x; - - let emit_short_i32_instr codebuf (i_short,i) x = - if x >= (-128) && x <= 127 then - emit_instr_code codebuf i_short; - emit_byte codebuf ( (if x < 0x0 then x + 256 else x)); - else - emit_instr_code codebuf i; - emit_i32 codebuf x; - - let emit_tailness codebuf tl = - if tl = Tailcall && !Ilprint.emit_tailcalls then emit_instr_code codebuf i_tail - - let emit_after_tailcall codebuf tl = - if tl = Tailcall then emit_instr_code codebuf i_ret - - let emit_volatility codebuf tl = - if tl = Volatile then emit_instr_code codebuf i_volatile - - let emit_constrained cenv codebuf env ty = - emit_instr_code codebuf i_constrained; - emit_uncoded codebuf (tdor_as_uncoded (GetTypeAsTypeDefOrRef cenv env ty)) - - let emit_alignment codebuf tl = - match tl with - | Aligned -> () - | Unaligned_1 -> emit_instr_code codebuf i_unaligned; emit_byte codebuf 0x1 - | Unaligned_2 -> emit_instr_code codebuf i_unaligned; emit_byte codebuf 0x2 - | Unaligned_4 -> emit_instr_code codebuf i_unaligned; emit_byte codebuf 0x4 - - let rec EmitInstr cenv codebuf env instr = - match instr with - | si when is_noarg_instr si -> - emit_instr_code codebuf (encoding_of_noarg_instr si) - | I_brcmp (cmp,tg1,tg2) -> - record_reqd_brfixup codebuf ((Lazy.force brcmp_map).[cmp], Some (Lazy.force brcmp_smap).[cmp]) tg1 - | I_br tg -> () - | I_seqpoint s -> emit_seqpoint cenv codebuf s - | I_leave tg -> record_reqd_brfixup codebuf (i_leave,Some i_leave_s) tg - | I_call (tl,mspec,varargs) -> - emit_tailness codebuf tl; - emit_mspec_instr cenv codebuf env i_call (mspec,varargs); - emit_after_tailcall codebuf tl - | I_callvirt (tl,mspec,varargs) -> - emit_tailness codebuf tl; - emit_mspec_instr cenv codebuf env i_callvirt (mspec,varargs); - emit_after_tailcall codebuf tl - | I_callconstraint (tl,ty,mspec,varargs) -> - emit_tailness codebuf tl; - emit_constrained cenv codebuf env ty; - emit_mspec_instr cenv codebuf env i_callvirt (mspec,varargs); - emit_after_tailcall codebuf tl - | I_newobj (mspec,varargs) -> - emit_mspec_instr cenv codebuf env i_newobj (mspec,varargs) - | I_ldftn mspec -> - emit_mspec_instr cenv codebuf env i_ldftn (mspec,None) - | I_ldvirtftn mspec -> - emit_mspec_instr cenv codebuf env i_ldvirtftn (mspec,None) - - | I_calli (tl,callsig,varargs) -> - emit_tailness codebuf tl; - emit_instr_code codebuf i_calli; - emit_uncoded codebuf (GetUncodedToken tab_StandAloneSig (GetCallsigAsStandAloneSigIdx cenv env (callsig,varargs))); - emit_after_tailcall codebuf tl - - | I_ldarg u16 -> emit_short_u16_instr codebuf (i_ldarg_s,i_ldarg) u16 - | I_starg u16 -> emit_short_u16_instr codebuf (i_starg_s,i_starg) u16 - | I_ldarga u16 -> emit_short_u16_instr codebuf (i_ldarga_s,i_ldarga) u16 - | I_ldloc u16 -> emit_short_u16_instr codebuf (i_ldloc_s,i_ldloc) u16 - | I_stloc u16 -> emit_short_u16_instr codebuf (i_stloc_s,i_stloc) u16 - | I_ldloca u16 -> emit_short_u16_instr codebuf (i_ldloca_s,i_ldloca) u16 - - | I_cpblk (al,vol) -> - emit_alignment codebuf al; - emit_volatility codebuf vol; - emit_instr_code codebuf i_cpblk - | I_initblk (al,vol) -> - emit_alignment codebuf al; - emit_volatility codebuf vol; - emit_instr_code codebuf i_initblk - - | I_arith (AI_ldc (DT_I4, NUM_I4 x)) -> - emit_short_i32_instr codebuf (i_ldc_i4_s,i_ldc_i4) x - | I_arith (AI_ldc (DT_I8, NUM_I8 x)) -> - emit_instr_code codebuf i_ldc_i8; - emit_i64 codebuf x; - | I_arith (AI_ldc (dt, NUM_R4 x)) -> - emit_instr_code codebuf i_ldc_r4; - emit_i32 codebuf (bits_of_float32 x) - | I_arith (AI_ldc (dt, NUM_R8 x)) -> - emit_instr_code codebuf i_ldc_r8; - emit_i64 codebuf (bits_of_float x) - - | I_ldind (al,vol,dt) -> - emit_alignment codebuf al; - emit_volatility codebuf vol; - emit_instr_code codebuf - (match dt with - | DT_I -> i_ldind_i - | DT_I1 -> i_ldind_i1 - | DT_I2 -> i_ldind_i2 - | DT_I4 -> i_ldind_i4 - | DT_U1 -> i_ldind_u1 - | DT_U2 -> i_ldind_u2 - | DT_U4 -> i_ldind_u4 - | DT_I8 -> i_ldind_i8 - | DT_R4 -> i_ldind_r4 - | DT_R8 -> i_ldind_r8 - | DT_REF -> i_ldind_ref - | _ -> failwith "ldind") - - | I_stelem dt -> - emit_instr_code codebuf - (match dt with - | DT_I | DT_U -> i_stelem_i - | DT_U1 | DT_I1 -> i_stelem_i1 - | DT_I2 | DT_U2 -> i_stelem_i2 - | DT_I4 | DT_U4 -> i_stelem_i4 - | DT_I8 | DT_U8 -> i_stelem_i8 - | DT_R4 -> i_stelem_r4 - | DT_R8 -> i_stelem_r8 - | DT_REF -> i_stelem_ref - | _ -> failwith "stelem") - - | I_ldelem dt -> - emit_instr_code codebuf - (match dt with - | DT_I -> i_ldelem_i - | DT_I1 -> i_ldelem_i1 - | DT_I2 -> i_ldelem_i2 - | DT_I4 -> i_ldelem_i4 - | DT_I8 -> i_ldelem_i8 - | DT_U1 -> i_ldelem_u1 - | DT_U2 -> i_ldelem_u2 - | DT_U4 -> i_ldelem_u4 - | DT_R4 -> i_ldelem_r4 - | DT_R8 -> i_ldelem_r8 - | DT_REF -> i_ldelem_ref - | _ -> failwith "ldelem") - - | I_stind (al,vol,dt) -> - emit_alignment codebuf al; - emit_volatility codebuf vol; - emit_instr_code codebuf - (match dt with - | DT_U | DT_I -> i_stind_i - | DT_U1 | DT_I1 -> i_stind_i1 - | DT_U2 | DT_I2 -> i_stind_i2 - | DT_U4 | DT_I4 -> i_stind_i4 - | DT_U8 | DT_I8 -> i_stind_i8 - | DT_R4 -> i_stind_r4 - | DT_R8 -> i_stind_r8 - | DT_REF -> i_stind_ref - | _ -> failwith "stelem") - - | I_switch (labs,dflt) -> record_reqd_brfixups codebuf (i_switch,None) labs - - | I_ldfld (al,vol,fspec) -> - emit_alignment codebuf al; - emit_volatility codebuf vol; - emit_fspec_instr cenv codebuf env i_ldfld fspec - | I_ldflda fspec -> - emit_fspec_instr cenv codebuf env i_ldflda fspec - | I_ldsfld (vol,fspec) -> - emit_volatility codebuf vol; - emit_fspec_instr cenv codebuf env i_ldsfld fspec - | I_ldsflda fspec -> - emit_fspec_instr cenv codebuf env i_ldsflda fspec - | I_stfld (al,vol,fspec) -> - emit_alignment codebuf al; - emit_volatility codebuf vol; - emit_fspec_instr cenv codebuf env i_stfld fspec - | I_stsfld (vol,fspec) -> - emit_volatility codebuf vol; - emit_fspec_instr cenv codebuf env i_stsfld fspec - - | I_ldtoken tok -> - emit_instr_code codebuf i_ldtoken; - emit_uncoded codebuf - (match tok with - | Token_type typ -> - match GetTypeAsTypeDefOrRef cenv env typ with - | (tag,idx) when tag = tdor_TypeDef -> GetUncodedToken tab_TypeDef idx - | (tag,idx) when tag = tdor_TypeRef -> GetUncodedToken tab_TypeRef idx - | (tag,idx) when tag = tdor_TypeSpec -> GetUncodedToken tab_TypeSpec idx - | _ -> failwith "?" - | Token_method mspec -> - match GetMethodSpecAsMethodDefOrRef cenv env (mspec,None) with - | (tag,idx) when tag = mdor_MethodDef -> GetUncodedToken tab_Method idx - | (tag,idx) when tag = mdor_MemberRef -> GetUncodedToken tab_MemberRef idx - | _ -> failwith "?" - - | Token_field fspec -> - match GetFieldSpecAsFieldDefOrRef cenv env fspec with - | (tag,idx) when tag -> GetUncodedToken tab_Field idx - | (tag,idx) -> GetUncodedToken tab_MemberRef idx) - | I_ldstr s -> - emit_instr_code codebuf i_ldstr; - record_reqd_stringfixup codebuf (GetUserStringHeapIdx cenv s) - - | I_box ty -> emit_typ_instr cenv codebuf env i_box ty - | I_unbox ty -> emit_typ_instr cenv codebuf env i_unbox ty - | I_unbox_any ty -> emit_typ_instr cenv codebuf env i_unbox_any ty - - | I_newarr (shape,ty) -> - if (shape = Rank1ArrayShape) then - emit_typ_instr cenv codebuf env i_newarr ty - else - let rank = shape.Rank - let args = Array.to_list (Array.create ( rank) (cenv.ilg.typ_int32)) - emit_mspecinfo_instr cenv codebuf env i_newobj (".ctor",mk_array_ty(ty,shape),ILCallingConv.Instance,args,Type_void,None,[]) - - | I_stelem_any (shape,ty) -> - if (shape = Rank1ArrayShape) then - emit_typ_instr cenv codebuf env i_stelem_any ty - else - let rank = shape.Rank - let args = Array.to_list (Array.create ( rank) (cenv.ilg.typ_int32)) @ [ty] - emit_mspecinfo_instr cenv codebuf env i_call ("Set",mk_array_ty(ty,shape),ILCallingConv.Instance,args,Type_void,None,[]) - - | I_ldelem_any (shape,ty) -> - if (shape = Rank1ArrayShape) then - emit_typ_instr cenv codebuf env i_ldelem_any ty - else - let rank = shape.Rank - let args = Array.to_list (Array.create ( rank) (cenv.ilg.typ_int32)) - emit_mspecinfo_instr cenv codebuf env i_call ("Get",mk_array_ty(ty,shape),ILCallingConv.Instance,args,ty,None,[]) - - | I_ldelema (ro,shape,ty) -> - if (ro = ReadonlyAddress) then - emit_instr_code codebuf i_readonly; - if (shape = Rank1ArrayShape) then - emit_typ_instr cenv codebuf env i_ldelema ty - else - let rank = shape.Rank - let args = Array.to_list (Array.create ( rank) (cenv.ilg.typ_int32)) - emit_mspecinfo_instr cenv codebuf env i_call ("Address",mk_array_ty(ty,shape),ILCallingConv.Instance,args,Type_byref ty,None,[]) - - | I_castclass ty -> emit_typ_instr cenv codebuf env i_castclass ty - | I_isinst ty -> emit_typ_instr cenv codebuf env i_isinst ty - | I_refanyval ty -> emit_typ_instr cenv codebuf env i_refanyval ty - | I_mkrefany ty -> emit_typ_instr cenv codebuf env i_mkrefany ty - | I_initobj ty -> emit_typ_instr cenv codebuf env i_initobj ty - | I_ldobj (al,vol,ty) -> - emit_alignment codebuf al; - emit_volatility codebuf vol; - emit_typ_instr cenv codebuf env i_ldobj ty - | I_stobj (al,vol,ty) -> - emit_alignment codebuf al; - emit_volatility codebuf vol; - emit_typ_instr cenv codebuf env i_stobj ty - | I_cpobj ty -> emit_typ_instr cenv codebuf env i_cpobj ty - | I_sizeof ty -> emit_typ_instr cenv codebuf env i_sizeof ty - | EI_ldlen_multi (n,m) -> - emit_short_i32_instr codebuf (i_ldc_i4_s,i_ldc_i4) m; - EmitInstr cenv codebuf env (mk_normal_call(mk_nongeneric_mspec_in_typ(cenv.ilg.typ_Array, ILCallingConv.Instance, "GetLength", [(cenv.ilg.typ_int32)], (cenv.ilg.typ_int32)))) - - (* ILX: REVIEW erase me earlier *) - | I_other e when Ilx.is_ilx_ext_instr e -> - match (Ilx.dest_ilx_ext_instr e) with - | (Ilx.EI_ldftn_then_call (mr1,(tl,mr2,varargs))) -> - EmitInstr cenv codebuf env (I_ldftn mr1); - EmitInstr cenv codebuf env (I_call (tl,mr2,varargs)) - | (Ilx.EI_ld_instance_ftn_then_newobj (mr1,_,(mr2,varargs))) -> - EmitInstr cenv codebuf env (I_ldftn mr1); - EmitInstr cenv codebuf env (I_newobj (mr2,varargs)) - - | _ -> failwith "an ILX instruction cannot be emitted" - | _ -> failwith "an IL instruction cannot be emitted" - - - let mk_scope_node cenv (localSigs: _[]) (a,b,ls,ch) = - if (isNil ls or not cenv.generate_pdb) then ch - else - [ { Children= Array.of_list ch; - StartOffset=a; - EndOffset=b; - Locals= - Array.of_list - (List.map - (fun x -> { pdbVarName=x.localName; - pdbVarSig= (try localSigs.[x.localNum] with _ -> failwith ("local variable index "^string x.localNum^"in debug info does not reference a valid local")); - pdbVarAttributes= x.localNum } ) - (List.filter (fun v -> v.localName <> "") ls)) } ] - - let rec EmitCode cenv localSigs codebuf env (susp,code) = - match code with - | TryBlock (c,seh) -> - commit_susp codebuf susp (unique_entry_of_code c); - let try_start = Bytebuf.length codebuf.code - let susp,child1,scope1 = EmitCode cenv localSigs codebuf env (None,c) - commit_susp_no_dest codebuf susp; - let try_finish = Bytebuf.length codebuf.code - let exn_branches = - match seh with - | FaultBlock flt -> - let handler_start = Bytebuf.length codebuf.code - let susp,child2,scope2 = EmitCode cenv localSigs codebuf env (None,flt) - commit_susp_no_dest codebuf susp; - let handler_finish = Bytebuf.length codebuf.code - [ Some (try_start,(try_finish - try_start), - handler_start,(handler_finish - handler_start), - FaultClause), - [(child2,scope2)] ] - - | FinallyBlock flt -> - let handler_start = Bytebuf.length codebuf.code - let susp,child2,scope2 = EmitCode cenv localSigs codebuf env (None,flt) - commit_susp_no_dest codebuf susp; - let handler_finish = Bytebuf.length codebuf.code - [ Some (try_start,(try_finish - try_start), - handler_start,(handler_finish - handler_start), - FinallyClause), - [(child2,scope2)] ] - - | FilterCatchBlock clauses -> - List.mapi - (fun i (flt,ctch) -> - match flt with - | TypeFilter typ -> - let handler_start = Bytebuf.length codebuf.code - let susp,child2,scope2 = EmitCode cenv localSigs codebuf env (None,ctch) - commit_susp_no_dest codebuf susp; - let handler_finish = Bytebuf.length codebuf.code - Some (try_start,(try_finish - try_start), - handler_start,(handler_finish - handler_start), - TypeFilterClause (tdor_as_uncoded (GetTypeAsTypeDefOrRef cenv env typ))), - [(child2,scope2)] - | CodeFilter fltcode -> - - let filter_start = Bytebuf.length codebuf.code - let susp,child2,scope2 = EmitCode cenv localSigs codebuf env (None,fltcode) - commit_susp_no_dest codebuf susp; - let handler_start = Bytebuf.length codebuf.code - let susp,child3,scope3 = EmitCode cenv localSigs codebuf env (None,ctch) - commit_susp_no_dest codebuf susp; - let handler_finish = Bytebuf.length codebuf.code - - Some (try_start, - (try_finish - try_start), - handler_start, - (handler_finish - handler_start), - FilterClause filter_start), - [(child2,scope2); (child3,scope3)]) - clauses - (None, - Node((None,[child1])::List.map (fun (a,b) -> (a,List.map fst b)) exn_branches), - scope1 @ List.concat ((List.collect (fun (a,b) -> List.map snd b) exn_branches))) - - | RestrictBlock _ | GroupBlock _ -> - // NOTE: ensure tailcalls for critical linear loop using standard continuation technique - let rec EmitCodeLinear (susp,b) cont = - match b with - | RestrictBlock (_,code2) -> - EmitCodeLinear (susp,code2) cont - | GroupBlock (locs,codes) -> - let start = Bytebuf.length codebuf.code - - // Imperative collectors for the sub-blocks - let new_susp = ref susp - let childseh = ref [] - let childscopes = ref [] - // Push the results of collecting one sub-block into the reference cells - let collect (susp,seh,scopes) = - new_susp := susp; - childseh := seh :: !childseh; - childscopes := scopes :: !childscopes - // Close the collection by generating the (susp,node,scope-node) triple - let close () = - let fin = Bytebuf.length codebuf.code - (!new_susp, - Node([(None,(List.rev !childseh))]), - mk_scope_node cenv localSigs (start,fin,locs,List.concat (List.rev !childscopes))) - - begin match codes with - | [c] -> - // EmitCodeLinear sequence of nested blocks - EmitCodeLinear (!new_susp,c) (fun results -> - collect results; - cont (close())) - - | codes -> - // Multiple blocks: leave the linear sequence and process each seperately - codes |> List.iter (fun c -> collect (EmitCode cenv localSigs codebuf env (!new_susp,c))); - cont(close()) - end - | c -> - // leave the linear sequence - cont (EmitCode cenv localSigs codebuf env (susp,c)) - - // OK, process the linear sequence - EmitCodeLinear (susp,code) (fun x -> x) - - | ILBasicBlock bb -> - // Leaf case: one basic block - commit_susp codebuf susp bb.bblockLabel; - record_avail_brfixup codebuf bb.bblockLabel; - let instrs = bb.bblockInstrs - for i = 0 to instrs.Length - 1 do - EmitInstr cenv codebuf env instrs.[i]; - (fallthrough_of_bblock bb), Tip, [] - - and br_to_susp codebuf dest = record_reqd_brfixup codebuf (i_br,Some i_br_s) dest - - and commit_susp codebuf susp lab = - match susp with - | Some dest when dest <> lab -> br_to_susp codebuf dest - | _ -> () - - and commit_susp_no_dest codebuf susp = - match susp with - | Some dest -> br_to_susp codebuf dest - | _ -> () - - (* Flatten the SEH tree *) - let rec EmitExceptionHandlerTree codebuf seh_tree = - match seh_tree with - | Tip -> () - | Node clauses -> List.iter (EmitExceptionHandlerTree2 codebuf) clauses - - and EmitExceptionHandlerTree2 codebuf (x,childseh) = - List.iter (EmitExceptionHandlerTree codebuf) childseh; (* internal first *) - match x with - | None -> () - | Some clause -> emit_seh_clause codebuf clause - - let EmitTopCode cenv localSigs env nm code = - if logging then dprintn ("nm = "^nm); - let codebuf = CreateCodeBuffer nm - let final_susp, seh_tree, orig_scopes = - EmitCode cenv localSigs codebuf env (Some (unique_entry_of_code code),code) - (match final_susp with Some dest -> br_to_susp codebuf dest | _ -> ()); - EmitExceptionHandlerTree codebuf seh_tree; - let orig_code = Bytebuf.close codebuf.code - let orig_seh = List.rev codebuf.seh - let orig_reqd_string_fixups = codebuf.reqd_string_fixups_in_method - let orig_avail_brfixups = codebuf.avail_brfixups - let orig_reqd_brfixups = codebuf.reqd_brfixups - let orig_seqpoints = codebuf.seqpoints |> ResizeArray.to_array - if logging then - dprintn ("length orig_seh = "^string (List.length orig_seh)); - List.iter - (fun (st1,sz1,st2,sz2,kind) -> - dprintn ("st1 = "^string st1); - dprintn ("sz1 = "^string sz1); - dprintn ("st2 = "^string st2); - dprintn ("sz2 = "^string sz2);) orig_seh; - - let new_code, new_reqd_string_fixups, new_seh, new_seqpoints, new_scopes = - apply_brfixups orig_code orig_seh orig_reqd_string_fixups orig_avail_brfixups orig_reqd_brfixups orig_seqpoints orig_scopes - - if logging then - dprintn ("length new_seh = "^string (List.length new_seh)); - List.iter - (fun (st1,sz1,st2,sz2,kind) -> - dprintn ("st1 = "^string st1); - dprintn ("sz1 = "^string sz1); - dprintn ("st2 = "^string st2); - dprintn ("sz2 = "^string sz2);) new_seh; - let rootscope = - { Children= Array.of_list new_scopes; - StartOffset=0; - EndOffset=Bytes.length new_code; - Locals=[| |]; } - - (new_reqd_string_fixups,new_seh, new_code, new_seqpoints, rootscope) - -end - -(* -------------------------------------------------------------------- - * Il.ILMethodBody --> bytes - * -------------------------------------------------------------------- *) -let GetFieldDefTypeAsBlobIdx cenv env ty = - let bytes = - emit (fun bb -> Bytebuf.emit_int_as_byte bb e_IMAGE_CEE_CS_CALLCONV_FIELD; - EmitType cenv env bb ty) - GetBytesAsBlobIdx cenv bytes - -let GenILMethodBody mname cenv env il = - let localSigs = - if cenv.generate_pdb then - il.ilLocals |> Array.of_list |> Array.map (fun l -> - // Write a fake entry for the local signature headed by e_IMAGE_CEE_CS_CALLCONV_FIELD. This is referenced by the PDB file - ignore (FindOrAddRow cenv tab_StandAloneSig (SimpleSharedRow [| Blob (GetFieldDefTypeAsBlobIdx cenv env l.localType) |])); - // Now write the type - GetTypeAsBytes cenv env l.localType) - else [| |] - - let reqd_string_fixups,seh,code,seqpoints, scopes = Codebuf.EmitTopCode cenv localSigs env mname il.ilCode - let code_size = Bytes.length code - let methbuf = Bytebuf.create (code_size * 3) - // Do we use the tiny format? - if isNil il.ilLocals && il.ilMaxStack <= 8 && not il.ilZeroInit && isNil seh && code_size < 64 then - // Use Tiny format - let aligned_code_size = align 4 (code_size + 1) - let code_padding = (aligned_code_size - (code_size + 1)) - let reqd_string_fixups' = (1,reqd_string_fixups) - Bytebuf.emit_int_as_byte methbuf ( (code_size <<< 2 ||| e_CorILMethod_TinyFormat)); - Bytebuf.emit_bytes methbuf code; - emit_pad methbuf code_padding; - (reqd_string_fixups', Bytebuf.close methbuf), seqpoints, scopes - else - // Use Fat format - let flags = - e_CorILMethod_FatFormat ||| - (if seh <> [] then e_CorILMethod_MoreSects else 0x0) ||| - (if il.ilZeroInit then e_CorILMethod_InitLocals else 0x0) - - let localToken = - if isNil il.ilLocals then 0x0 else - GetUncodedToken tab_StandAloneSig - (FindOrAddRow cenv tab_StandAloneSig (GetLocalSigAsStandAloneSigIdx cenv env il.ilLocals)) - - let aligned_code_size = align 0x4 code_size - let code_padding = (aligned_code_size - code_size) - - Bytebuf.emit_int_as_byte methbuf (b0 flags); - Bytebuf.emit_int_as_byte methbuf 0x30; (* last four bits record size of fat header in 4 byte chunks - this is always 12 bytes = 3 four word chunks *) - Bytebuf.emit_u16 methbuf (uint16 il.ilMaxStack); - Bytebuf.emit_i32 methbuf code_size; - Bytebuf.emit_i32 methbuf localToken; - Bytebuf.emit_bytes methbuf code; - emit_pad methbuf code_padding; - - if nonNil seh then - (* Can we use the small exception handling table format? *) - let small_size = (List.length seh * 12 + 4) - let can_use_small = - small_size <= 0xFF && - List.forall - (fun (st1,sz1,st2,sz2,_) -> - st1 <= 0xFFFF && st2 <= 0xFFFF && sz1 <= 0xFF && sz2 <= 0xFF) seh - - let kind_as_i32 k = - match k with - FinallyClause -> e_COR_ILEXCEPTION_CLAUSE_FINALLY - | FaultClause -> e_COR_ILEXCEPTION_CLAUSE_FAULT - | FilterClause _ -> e_COR_ILEXCEPTION_CLAUSE_FILTER - | TypeFilterClause _ -> e_COR_ILEXCEPTION_CLAUSE_EXCEPTION - let kind_as_extra_i32 k = - match k with - FinallyClause |FaultClause -> 0x0 - | FilterClause i -> i - | TypeFilterClause uncoded -> uncoded - - if can_use_small then - if logging then dprintn ("using small SEH format for method "^mname); - Bytebuf.emit_int_as_byte methbuf ( e_CorILMethod_Sect_EHTable); - Bytebuf.emit_int_as_byte methbuf (b0 small_size); - Bytebuf.emit_int_as_byte methbuf 0x00; - Bytebuf.emit_int_as_byte methbuf 0x00; - seh |> List.iter (fun (st1,sz1,st2,sz2,kind) -> - let k32 = kind_as_i32 kind - Bytebuf.emit_i32_as_u16 methbuf k32; - Bytebuf.emit_i32_as_u16 methbuf st1; - Bytebuf.emit_int_as_byte methbuf (b0 sz1); - Bytebuf.emit_i32_as_u16 methbuf st2; - Bytebuf.emit_int_as_byte methbuf (b0 sz2); - Bytebuf.emit_i32 methbuf (kind_as_extra_i32 kind)) - else - if logging then dprintn ("using fat SEH format for method "^mname); - let big_size = (List.length seh * 24 + 4) - Bytebuf.emit_int_as_byte methbuf ( (e_CorILMethod_Sect_EHTable ||| e_CorILMethod_Sect_FatFormat)); - Bytebuf.emit_int_as_byte methbuf (b0 big_size); - Bytebuf.emit_int_as_byte methbuf (b1 big_size); - Bytebuf.emit_int_as_byte methbuf (b2 big_size); - seh |> List.iter (fun (st1,sz1,st2,sz2,kind) -> - let k32 = kind_as_i32 kind - Bytebuf.emit_i32 methbuf k32; - Bytebuf.emit_i32 methbuf st1; - Bytebuf.emit_i32 methbuf sz1; - Bytebuf.emit_i32 methbuf st2; - Bytebuf.emit_i32 methbuf sz2; - Bytebuf.emit_i32 methbuf (kind_as_extra_i32 kind)) - - let reqd_string_fixups' = (12,reqd_string_fixups) - - (reqd_string_fixups', Bytebuf.close methbuf), seqpoints, scopes - -// -------------------------------------------------------------------- -// ILFieldDef --> FieldDef Row -// -------------------------------------------------------------------- - -let rec GetFieldDefAsFieldDefRow cenv env fd = - let flags = - GetMemberAccessFlags fd.fdAccess ||| - (if fd.fdStatic then 0x0010 else 0x0) ||| - (if fd.fdInitOnly then 0x0020 else 0x0) ||| - (if fd.fdLiteral then 0x0040 else 0x0) ||| - (if fd.fdNotSerialized then 0x0080 else 0x0) ||| - (if fd.fdSpecialName then 0x0200 else 0x0) ||| - (if fd.fdSpecialName then 0x0400 else 0x0) ||| (* REVIEW: RTSpecialName *) - (if (fd.fdInit <> None) then 0x8000 else 0x0) ||| - (if (fd.fdMarshal <> None) then 0x1000 else 0x0) ||| - (if (fd.fdData <> None) then 0x0100 else 0x0) - UnsharedRow - [| UShort (uint16 flags); - String (GetStingHeapIdx cenv fd.fdName); - Blob ( GetFieldDefSigAsBlobIdx cenv env fd ); |] - -and GetFieldDefSigAsBlobIdx cenv env fd = GetFieldDefTypeAsBlobIdx cenv env fd.fdType - -and GenFieldDefPass3 cenv env fd = - let fidx = AddUnsharedRow cenv tab_Field (GetFieldDefAsFieldDefRow cenv env fd) - GenCustomAttrsPass3 cenv (hca_FieldDef,fidx) fd.fdCustomAttrs; - // Write FieldRVA table - fixups into data section done later - match fd.fdData with - | None -> () - | Some b -> - if logging then dprintn ("field data: size = "^string (Bytes.length b)); - let offs = Bytebuf.length cenv.data - Bytebuf.emit_bytes cenv.data b; - AddUnsharedRow cenv tab_FieldRVA - (UnsharedRow [| Data (offs, false); - SimpleIndex (tab_Field,fidx) |]) |> ignore - // Write FieldMarshal table - match fd.fdMarshal with - | None -> () - | Some ntyp -> - AddUnsharedRow cenv tab_FieldMarshal - (UnsharedRow [| HasFieldMarshal (hfm_FieldDef, fidx); - Blob (GetNativeTypeAsBlobIdx cenv ntyp) |]) |> ignore - // Write Contant table - match fd.fdInit with - | None -> () - | Some i -> - AddUnsharedRow cenv tab_Constant - (UnsharedRow - [| GetFieldInitFlags i; - HasConstant (hc_FieldDef, fidx); - Blob (GetFieldInitAsBlobIdx cenv env i) |]) |> ignore - // Write FieldLayout table - match fd.fdOffset with - | None -> () - | Some offset -> - AddUnsharedRow cenv tab_FieldLayout - (UnsharedRow [| ULong offset; - SimpleIndex (tab_Field, fidx) |]) |> ignore - - -(* -------------------------------------------------------------------- - * Il.ILGenericParameterDef --> GenericParam Row - * -------------------------------------------------------------------- *) - -let rec GetGenericParamAsGenericParamRow cenv env idx owner gp = - let flags = - (match gp.gpVariance with - | NonVariant -> 0x0000 - | CoVariant -> 0x0001 - | ContraVariant -> 0x0002) ||| - (if gp.gpReferenceTypeConstraint then 0x0004 else 0x0000) ||| - (if gp.gpNotNullableValueTypeConstraint then 0x0008 else 0x0000) ||| - (if gp.gpDefaultConstructorConstraint then 0x0010 else 0x0000) - - let mdVersionMajor,mdVersionMinor = metadataSchemaVersionSupportedByCLRVersion cenv.desiredMetadataVersion - if (mdVersionMajor = 1) then - SimpleSharedRow - [| UShort (uint16 idx); - UShort (uint16 flags); - TypeOrMethodDef (fst owner, snd owner); - String (GetStingHeapIdx cenv gp.gpName); - TypeDefOrRefOrSpec (tdor_TypeDef, 0); (* empty kind field in deprecated metadata *) |] - else - SimpleSharedRow - [| UShort (uint16 idx); - UShort (uint16 flags); - TypeOrMethodDef (fst owner, snd owner); - String (GetStingHeapIdx cenv gp.gpName) |] - -and GenTypeAsGenericParamConstraintRow cenv env gpidx ty = - let tdor_tag,tdor_row = GetTypeAsTypeDefOrRef cenv env ty - UnsharedRow - [| SimpleIndex (tab_GenericParam, gpidx); - TypeDefOrRefOrSpec (tdor_tag,tdor_row) |] - -and GenGenericParamConstraintPass4 cenv env gpidx ty = - AddUnsharedRow cenv tab_GenericParamConstraint (GenTypeAsGenericParamConstraintRow cenv env gpidx ty) |> ignore - -and GenGenericParamPass3 cenv env idx owner gp = - // shared since we look it up again below in GenGenericParamPass4 - AddSharedRow cenv tab_GenericParam (GetGenericParamAsGenericParamRow cenv env idx owner gp) |> ignore - -and GenGenericParamPass4 cenv env idx owner gp = - let gpidx = FindOrAddRow cenv tab_GenericParam (GetGenericParamAsGenericParamRow cenv env idx owner gp) - gp.gpConstraints |> List.iter (GenGenericParamConstraintPass4 cenv env gpidx) - -// -------------------------------------------------------------------- -// Il.param and Il.return --> Param Row -// -------------------------------------------------------------------- - -let rec GetParamAsParamRow cenv env seq param = - let flags = - (if param.paramIn then 0x0001 else 0x0000) ||| - (if param.paramOut then 0x0002 else 0x0000) ||| - (if param.paramOptional then 0x0010 else 0x0000) ||| - (if param.paramDefault <> None then 0x1000 else 0x0000) ||| - (if param.paramMarshal <> None then 0x2000 else 0x0000) - - UnsharedRow - [| UShort (uint16 flags); - UShort (uint16 seq); - String (GetStringHeapIdxOption cenv param.paramName) |] - -and GenParamPass3 cenv env seq param = - if param.paramIn=false && param.paramOut=false && param.paramOptional=false && isNone param.paramDefault && isNone param.paramName && isNone param.paramMarshal - then () - else - let pidx = AddUnsharedRow cenv tab_Param (GetParamAsParamRow cenv env seq param) - GenCustomAttrsPass3 cenv (hca_ParamDef,pidx) param.paramCustomAttrs; - (* Write FieldRVA table - fixups into data section done later *) - match param.paramMarshal with - | None -> () - | Some ntyp -> - AddUnsharedRow cenv tab_FieldMarshal - (UnsharedRow [| HasFieldMarshal (hfm_ParamDef, pidx); - Blob (GetNativeTypeAsBlobIdx cenv ntyp) |]) |> ignore - -(* paramDefault: ILFieldInit option; (* -- Optional parameter *)*) - -let GenReturnAsParamRow cenv env returnv = - let flags = (if returnv.returnMarshal <> None then 0x2000 else 0x0000) - UnsharedRow - [| UShort (uint16 flags); - UShort 0us; (* sequence num. *) - String 0 |] - -let GenReturnPass3 cenv env returnv = - if isSome returnv.returnMarshal || nonNil (dest_custom_attrs returnv.returnCustomAttrs) then - let pidx = AddUnsharedRow cenv tab_Param (GenReturnAsParamRow cenv env returnv) - GenCustomAttrsPass3 cenv (hca_ParamDef,pidx) returnv.returnCustomAttrs; - match returnv.returnMarshal with - | None -> () - | Some ntyp -> - AddUnsharedRow cenv tab_FieldMarshal - (UnsharedRow - [| HasFieldMarshal (hfm_ParamDef, pidx); - Blob (GetNativeTypeAsBlobIdx cenv ntyp) |]) |> ignore - -// -------------------------------------------------------------------- -// ILMethodDef --> ILMethodDef Row -// -------------------------------------------------------------------- - -let GetMethodDefSigAsBytes cenv env mdef = - emit (fun bb -> - Bytebuf.emit_int_as_byte bb (callconv_as_byte mdef.mdGenericParams.Length mdef.mdCallconv); - if List.length mdef.mdGenericParams > 0 then emit_z_u32 bb mdef.mdGenericParams.Length; - emit_z_u32 bb mdef.mdParams.Length; - EmitType cenv env bb mdef.Return.Type; - mdef.ParameterTypes |> List.iter (EmitType cenv env bb)) - -let GenMethodDefSigAsBlobIdx cenv env mdef = - GetBytesAsBlobIdx cenv (GetMethodDefSigAsBytes cenv env mdef) - -let GenMethodDefAsRow cenv env midx md = - let flags = - GetMemberAccessFlags md.mdAccess ||| - (if (match md.mdKind with - | MethodKind_static | MethodKind_cctor -> true - | _ -> false) then 0x0010 else 0x0) ||| - (if (match md.mdKind with MethodKind_virtual vinfo -> vinfo.virtFinal | _ -> false) then 0x0020 else 0x0) ||| - (if (match md.mdKind with MethodKind_virtual _ -> true | _ -> false) then 0x0040 else 0x0) ||| - (if md.mdHideBySig then 0x0080 else 0x0) ||| - (if (match md.mdKind with MethodKind_virtual vinfo -> vinfo.virtStrict | _ -> false) then 0x0200 else 0x0) ||| - (if (match md.mdKind with MethodKind_virtual vinfo -> vinfo.virtNewslot | _ -> false) then 0x0100 else 0x0) ||| - (if (match md.mdKind with MethodKind_virtual vinfo -> vinfo.virtAbstract | _ -> false) then 0x0400 else 0x0) ||| - (if md.mdSpecialName then 0x0800 else 0x0) ||| - (if (match dest_mbody md.mdBody with MethodBody_pinvoke _ -> true | _ -> false) then 0x2000 else 0x0) ||| - (if md.mdUnmanagedExport then 0x0008 else 0x0) ||| - (if - (match md.mdKind with - | MethodKind_ctor | MethodKind_cctor -> true - | _ -> false) then 0x1000 else 0x0) ||| (* RTSpecialName *) - (if md.mdReqSecObj then 0x8000 else 0x0) ||| - (if md.mdHasSecurity or dest_security_decls (md.mdSecurityDecls) <> [] then 0x4000 else 0x0) - let implflags = - (match md.mdCodeKind with - | MethodCodeKind_native -> 0x0001 - | MethodCodeKind_runtime -> 0x0003 - | MethodCodeKind_il -> 0x0000) ||| - (if md.mdInternalCall then 0x1000 else 0x0000) ||| - (if md.mdManaged then 0x0000 else 0x0004) ||| - (if md.mdForwardRef then 0x0010 else 0x0000) ||| - (if md.mdPreserveSig then 0x0080 else 0x0000) ||| - (if md.mdSynchronized then 0x0020 else 0x0000) ||| - (if md.mdMustRun then 0x0040 else 0x0000) ||| - (if (match dest_mbody md.mdBody with MethodBody_il il -> il.ilNoInlining | _ -> false) then 0x0008 else 0x0000) - - if md.mdEntrypoint then - if cenv.entrypoint <> None then failwith "duplicate entrypoint" - else cenv.entrypoint <- Some (true, midx); - let code_addr = - (match dest_mbody md.mdBody with - | MethodBody_il ilmbody -> - let addr = cenv.next_code_addr - if logging then dprintn ("start of code = "^string addr); - let (code, seqpoints, rootscope) = GenILMethodBody md.mdName cenv env ilmbody - - (* Now record the PDB record for this method - we write this out later. *) - if cenv.generate_pdb then - cenv.pdbinfo.Add - { MethToken=GetUncodedToken tab_Method midx; - MethName=md.mdName; - Params= [| |]; (* REVIEW *) - RootScope = rootscope; - Range= - begin match ilmbody.ilSource with - | Some m when cenv.generate_pdb -> - let doc = (FindOrAddSharedEntry cenv.documents m.Document) - 1 in (* table indexes are 1-based, document array indexes are 0-based *) - - Some ({ Document=doc; - Line=m.Line; - Column=m.Column; }, - { Document=doc; - Line=m.EndLine; - Column=m.EndColumn; }) - | _ -> None - end; - SequencePoints=seqpoints; }; - - add_code cenv code; - addr - | MethodBody_native -> - failwith "cannot write body of native method - Abstract IL cannot roundtrip mixed native/managed binaries"; - | _ -> 0x0000) - - UnsharedRow - [| ULong code_addr ; - UShort (uint16 implflags); - UShort (uint16 flags); - String (GetStingHeapIdx cenv md.mdName); - Blob (GenMethodDefSigAsBlobIdx cenv env md); - SimpleIndex(tab_Param,(table cenv tab_Param).Count + 1) |] - -let GenMethodImplPass3 cenv env tgparams tidx mimpl = - let midx_tag, midx_row = GetMethodSpecAsMethodDef cenv env (mimpl.mimplOverrideBy,None) - let midx2_tag, midx2_row = GetOverridesSpecAsMethodDefOrRef cenv env mimpl.mimplOverrides - AddUnsharedRow cenv tab_MethodImpl - (UnsharedRow - [| SimpleIndex (tab_TypeDef, tidx); - MethodDefOrRef (midx_tag, midx_row); - MethodDefOrRef (midx2_tag, midx2_row) |]) |> ignore - -let GenMethodDefPass3 cenv env (md:ILMethodDef) = - let midx = GetMethodDefIdx cenv md - let idx2 = AddUnsharedRow cenv tab_Method (GenMethodDefAsRow cenv env midx md) - if midx <> idx2 then failwith "index of method def on pass 3 does not match index on pass 2"; - GenReturnPass3 cenv env md.mdReturn; - md.Parameters |> List.iteri (fun n param -> GenParamPass3 cenv env (n+1) param) ; - md.CustomAttrs |> GenCustomAttrsPass3 cenv (hca_MethodDef,midx) ; - md.SecurityDecls |> dest_security_decls |> GenSecurityDeclsPass3 cenv (hds_MethodDef,midx); - md.GenericParams |> List.iteri (fun n gp -> GenGenericParamPass3 cenv env n (tomd_MethodDef, midx) gp) ; - match dest_mbody md.mdBody with - | MethodBody_pinvoke attr -> - let flags = - begin match attr.pinvokeCallconv with - | PInvokeCallConvNone -> 0x0000 - | PInvokeCallConvCdecl -> 0x0200 - | PInvokeCallConvStdcall -> 0x0300 - | PInvokeCallConvThiscall -> 0x0400 - | PInvokeCallConvFastcall -> 0x0500 - | PInvokeCallConvWinapi -> 0x0100 - end ||| - begin match attr.PInvokeCharEncoding with - | PInvokeEncodingNone -> 0x0000 - | PInvokeEncodingAnsi -> 0x0002 - | PInvokeEncodingUnicode -> 0x0004 - | PInvokeEncodingAuto -> 0x0006 - end ||| - begin match attr.PInvokeCharBestFit with - | PInvokeBestFitUseAssem -> 0x0000 - | PInvokeBestFitEnabled -> 0x0010 - | PInvokeBestFitDisabled -> 0x0020 - end ||| - begin match attr.PInvokeThrowOnUnmappableChar with - | PInvokeThrowOnUnmappableCharUseAssem -> 0x0000 - | PInvokeThrowOnUnmappableCharEnabled -> 0x1000 - | PInvokeThrowOnUnmappableCharDisabled -> 0x2000 - end ||| - (if attr.pinvokeNoMangle then 0x0001 else 0x0000) ||| - (if attr.pinvokeLastErr then 0x0040 else 0x0000) - AddUnsharedRow cenv tab_ImplMap - (UnsharedRow - [| UShort (uint16 flags); - MemberForwarded (mf_MethodDef,midx); - String (GetStingHeapIdx cenv attr.pinvokeName); - SimpleIndex (tab_ModuleRef, GetModuleRefAsIdx cenv attr.pinvokeWhere); |]) |> ignore - | _ -> () - -let GenMethodDefPass4 cenv env md = - let midx = GetMethodDefIdx cenv md - List.iteri (fun n gp -> GenGenericParamPass4 cenv env n (tomd_MethodDef, midx) gp) md.mdGenericParams - -(* mdExport: (i32 * string option) option; REVIEW *) -(* mdVtableEntry: (i32 * i32) option; REVIEW *) - -let GenPropertyMethodSemanticsPass3 cenv pidx kind mref = - // REVIEW: why are we catching exceptions here? - let midx = try GetMethodRefAsMethodDefIdx cenv mref with MethodDefNotFound -> 1 - AddUnsharedRow cenv tab_MethodSemantics - (UnsharedRow - [| UShort (uint16 kind); - SimpleIndex (tab_Method,midx); - HasSemantics (hs_Property, pidx) |]) |> ignore - -let rec GetPropertySigAsBlobIdx cenv env prop = - GetBytesAsBlobIdx cenv (GetPropertySigAsBytes cenv env prop) - -and GetPropertySigAsBytes cenv env prop = - emit (fun bb -> - let b = ((hasthis_as_byte prop.propCallconv) ||| e_IMAGE_CEE_CS_CALLCONV_PROPERTY) - Bytebuf.emit_int_as_byte bb b; - emit_z_u32 bb (List.length prop.propArgs); - EmitType cenv env bb prop.propType; - prop.propArgs |> List.iter (EmitType cenv env bb)) - -and GetPropertyAsPropertyRow cenv env (prop:ILPropertyDef) = - let flags = - (if prop.propSpecialName then 0x0200 else 0x0) ||| - (if prop.propRTSpecialName then 0x0400 else 0x0) ||| - (if prop.propInit <> None then 0x1000 else 0x0) - UnsharedRow - [| UShort (uint16 flags); - String (GetStingHeapIdx cenv prop.Name); - Blob (GetPropertySigAsBlobIdx cenv env prop); |] - -/// ILPropertyDef --> Property Row + MethodSemantics entries -and GenPropertyPass3 cenv env prop = - let pidx = AddUnsharedRow cenv tab_Property (GetPropertyAsPropertyRow cenv env prop) - prop.propSet |> Option.iter (GenPropertyMethodSemanticsPass3 cenv pidx 0x0001) ; - prop.propGet |> Option.iter (GenPropertyMethodSemanticsPass3 cenv pidx 0x0002) ; - (* Write Constant table *) - match prop.propInit with - | None -> () - | Some i -> - AddUnsharedRow cenv tab_Constant - (UnsharedRow - [| GetFieldInitFlags i; - HasConstant (hc_Property, pidx); - Blob (GetFieldInitAsBlobIdx cenv env i) |]) |> ignore - GenCustomAttrsPass3 cenv (hca_Property,pidx) prop.propCustomAttrs - -let rec GenEventMethodSemanticsPass3 cenv eidx kind mref = - let add_idx = try GetMethodRefAsMethodDefIdx cenv mref with MethodDefNotFound -> 1 - AddUnsharedRow cenv tab_MethodSemantics - (UnsharedRow - [| UShort (uint16 kind); - SimpleIndex (tab_Method,add_idx); - HasSemantics (hs_Event, eidx) |]) |> ignore - -/// Il.ILEventDef --> Event Row + MethodSemantics entries -and GenEventAsEventRow cenv env md = - let flags = - (if md.eventSpecialName then 0x0200 else 0x0) ||| - (if md.eventRTSpecialName then 0x0400 else 0x0) - let tdor_tag, tdor_row = GetTypeOptionAsTypeDefOrRef cenv env md.eventType - UnsharedRow - [| UShort (uint16 flags); - String (GetStingHeapIdx cenv md.eventName); - TypeDefOrRefOrSpec (tdor_tag,tdor_row) |] - -and GenEventPass3 cenv env md = - let eidx = AddUnsharedRow cenv tab_Event (GenEventAsEventRow cenv env md) - md.eventAddOn |> GenEventMethodSemanticsPass3 cenv eidx 0x0008 (* AddMethod *); - md.eventRemoveOn |> GenEventMethodSemanticsPass3 cenv eidx 0x0010 (* RemoveMethod *); - Option.iter (GenEventMethodSemanticsPass3 cenv eidx 0x0020) md.eventFire (* Fire *); - List.iter (GenEventMethodSemanticsPass3 cenv eidx 0x0004 (* Other *)) md.eventOther; - GenCustomAttrsPass3 cenv (hca_Event,eidx) md.eventCustomAttrs - - -(* -------------------------------------------------------------------- - * Il.resource --> generate ... - * -------------------------------------------------------------------- *) - -let rec GetResourceAsManifestResourceRow cenv r = - let data,impl = - match r.resourceWhere with - | Resource_local bf -> - let b = bf() - (* Embedded managed resources must be word-aligned. At least I think so - resource format is not specified in ECMA. But some mscorlib resources appear to be non-aligned - I think it doesn't matter.. *) - if logging then dprintn ("resource data: size = "^string (Bytes.length b)); - let offs = Bytebuf.length cenv.resources - let aligned_offs = (align 0x8 offs) - let pad = aligned_offs - offs - let resource_size = (Bytes.length b) - if logging then dprintn ("resource pad: "^string pad); - emit_pad cenv.resources pad; - Bytebuf.emit_i32 cenv.resources resource_size; - Bytebuf.emit_bytes cenv.resources b; - Data (aligned_offs,true), (i_File, 0) - | Resource_file (mref,offs) -> ULong offs, (i_File, GetModuleRefAsFileIdx cenv mref) - | Resource_assembly aref -> ULong 0x0, (i_AssemblyRef, GetAssemblyRefAsIdx cenv aref) - UnsharedRow - [| data; - ULong (match r.resourceAccess with Resource_public -> 0x01 | Resource_private -> 0x02); - String (GetStingHeapIdx cenv r.resourceName); - Implementation (fst impl, snd impl); |] - -and GenResourcePass3 cenv r = - let idx = AddUnsharedRow cenv tab_ManifestResource (GetResourceAsManifestResourceRow cenv r) - GenCustomAttrsPass3 cenv (hca_ManifestResource,idx) r.resourceCustomAttrs - -// -------------------------------------------------------------------- -// ILTypeDef --> generate ILFieldDef, ILMethodDef, ILPropertyDef etc. rows -// -------------------------------------------------------------------- - -let rec GenTypeDefPass3 enc cenv (td:ILTypeDef) = - try - let env = env_enter_tdef (List.length td.tdGenericParams) - let tidx = GetIdxForTypeDef cenv (TdKey(enc,td.Name)) - td.Properties |> dest_pdefs |> List.iter (GenPropertyPass3 cenv env); - td.Events |> dest_edefs |> List.iter (GenEventPass3 cenv env); - td.Fields |> dest_fdefs |> List.iter (GenFieldDefPass3 cenv env); - td.Methods |> dest_mdefs |> List.iter (GenMethodDefPass3 cenv env); - td.MethodImpls |> dest_mimpls |> List.iter (GenMethodImplPass3 cenv env td.tdGenericParams.Length tidx); - (* ClassLayout entry if needed *) - match td.Layout with - | TypeLayout_auto -> () - | TypeLayout_sequential layout | TypeLayout_explicit layout -> - if isSome layout.typePack || isSome layout.typeSize then - AddUnsharedRow cenv tab_ClassLayout - (UnsharedRow - [| UShort (match layout.typePack with None -> uint16 0x0 | Some p -> p); - ULong (match layout.typeSize with None -> 0x0 | Some p -> p); - SimpleIndex (tab_TypeDef, tidx) |]) |> ignore - - td.tdSecurityDecls |> dest_security_decls |> GenSecurityDeclsPass3 cenv (hds_TypeDef,tidx); - td.CustomAttrs |> GenCustomAttrsPass3 cenv (hca_TypeDef,tidx); - td.GenericParams |> List.iteri (fun n gp -> GenGenericParamPass3 cenv env n (tomd_TypeDef,tidx) gp) ; - td.NestedTypes |> dest_tdefs |> GenTypeDefsPass3 (enc@[td.Name]) cenv; - with e -> - failwith ("Error in pass3 for type "^td.tdName^", error: "^e.Message); - rethrow(); - raise e - -and GenTypeDefsPass3 enc cenv tds = - List.iter (GenTypeDefPass3 enc cenv) tds - -/// ILTypeDef --> generate generic params on ILMethodDef: ensures -/// GenericParam table is built sorted by owner. - -let rec GenTypeDefPass4 enc cenv (td:ILTypeDef) = - try - let env = env_enter_tdef (List.length td.tdGenericParams) - let tidx = GetIdxForTypeDef cenv (TdKey(enc,td.Name)) - List.iter (GenMethodDefPass4 cenv env) (dest_mdefs td.Methods); - List.iteri (fun n gp -> GenGenericParamPass4 cenv env n (tomd_TypeDef,tidx) gp) td.GenericParams; - GenTypeDefsPass4 (enc@[td.Name]) cenv (dest_tdefs td.NestedTypes); - with e -> - failwith ("Error in pass4 for type "^td.tdName^", error: "^e.Message); - rethrow(); - raise e - -and GenTypeDefsPass4 enc cenv tds = - List.iter (GenTypeDefPass4 enc cenv) tds - -(* -------------------------------------------------------------------- - * Il.ILExportedTypes --> ILExportedType table - * -------------------------------------------------------------------- *) - -let rec GenNestedExportedTypePass3 cenv cidx ce = - let flags = GetMemberAccessFlags ce.nestedExportedTypeAccess - let nidx = - AddUnsharedRow cenv tab_ExportedType - (UnsharedRow - [| ULong flags ; - ULong 0x0; - String (GetStingHeapIdx cenv ce.nestedExportedTypeName); - String 0; - Implementation (i_ExportedType, cidx) |]) - GenCustomAttrsPass3 cenv (hca_ExportedType,nidx) ce.nestedExportedTypeCustomAttrs; - GenNestedExportedTypesPass3 cenv nidx ce.nestedExportedTypeNested - -and GenNestedExportedTypesPass3 cenv nidx nce = - nce |> dest_nested_exported_types |> List.iter (GenNestedExportedTypePass3 cenv nidx) - -and exported_type_pass3 cenv ce = - let nselem,nelem = name_as_elem_pair cenv ce.exportedTypeName - let flags = GetTypeAccessFlags ce.exportedTypeAccess - let flags = if ce.exportedTypeForwarder then 0x00200000 ||| flags else flags - let impl = scoref_as_Implementation_elem cenv ce.exportedTypeScope - let cidx = - AddUnsharedRow cenv tab_ExportedType - (UnsharedRow - [| ULong flags ; - ULong 0x0; - nelem; - nselem; - Implementation (fst impl, snd impl); |]) - GenCustomAttrsPass3 cenv (hca_ExportedType,cidx) ce.exportedTypeCustomAttrs; - GenNestedExportedTypesPass3 cenv cidx ce.exportedTypeNested - -and exported_types_pass3 cenv ce = - List.iter (exported_type_pass3 cenv) (dest_exported_types ce); - -(* -------------------------------------------------------------------- - * Il.manifest --> generate Assembly row - * -------------------------------------------------------------------- *) - -and GetManifsetAsAssemblyRow cenv m = - UnsharedRow - [|ULong m.manifestAuxModuleHashAlgorithm; - UShort (match m.manifestVersion with None -> 0us | Some (x,y,z,w) -> x); - UShort (match m.manifestVersion with None -> 0us | Some (x,y,z,w) -> y); - UShort (match m.manifestVersion with None -> 0us | Some (x,y,z,w) -> z); - UShort (match m.manifestVersion with None -> 0us | Some (x,y,z,w) -> w); - ULong - ( begin match m.manifestLongevity with - | LongevityUnspecified -> 0x0000 - | LongevityLibrary -> 0x0002 - | LongevityPlatformAppDomain -> 0x0004 - | LongevityPlatformProcess -> 0x0006 - | LongevityPlatformSystem -> 0x0008 - end ||| - (if m.manifestRetargetable then 0xff else 0x0) ||| - // Setting these causes peverify errors. Hence both ilread and ilwrite ignore them and refuse to set them. - // Any debugging customattributes will automatically propagate - // REVIEW: No longer appears to be the case... - (if m.manifestJitTracking then 0x8000 else 0x0) ||| - (if m.manifestDisableJitOptimizations then 0x4000 else 0x0) ||| - (match m.manifestPublicKey with None -> 0x0000 | Some _ -> 0x0001) ||| - 0x0000); - (match m.manifestPublicKey with None -> Blob 0 | Some x -> Blob (GetBytesAsBlobIdx cenv x)); - String (GetStingHeapIdx cenv m.manifestName); - (match m.manifestLocale with None -> String 0 | Some x -> String (GetStingHeapIdx cenv x)); |] - -and GenManifestPass3 cenv m = - let aidx = AddUnsharedRow cenv tab_Assembly (GetManifsetAsAssemblyRow cenv m) - GenSecurityDeclsPass3 cenv (hds_Assembly,aidx) (dest_security_decls m.manifestSecurityDecls); - GenCustomAttrsPass3 cenv (hca_Assembly,aidx) m.manifestCustomAttrs; - exported_types_pass3 cenv m.manifestExportedTypes; - (* Record the entrypoint decl if needed. *) - match m.manifestEntrypointElsewhere with - | Some mref -> - if cenv.entrypoint <> None then failwith "duplicate entrypoint" - else cenv.entrypoint <- Some (false, GetModuleRefAsIdx cenv mref); - | None -> () - -and new_guid modul = - let n = absilWriteGetTimeStamp () - let m = (hash n) - let m2 = (hash modul.modulName) - [| b0 m; b1 m; b2 m; b3 m; b0 m2; b1 m2; b2 m2; b3 m2; 0xa7; 0x45; 0x03; 0x83; b0 n; b1 n; b2 n; b3 n |] - -and GetModuleAsRow cenv modul = - UnsharedRow - [| UShort (uint16 0x0); - String (GetStingHeapIdx cenv modul.modulName); - Guid (GetGuidIdx cenv (new_guid modul)); - Guid 0; - Guid 0 |] - - -let row_elem_compare e1 e2 = - match e1,e2 with - | SimpleIndex (Table tab1,n1), SimpleIndex(Table tab2,n2) -> - let c1 = compare n1 n2 - if c1 <> 0 then c1 else compare tab1 tab2 - | TypeDefOrRefOrSpec(TypeDefOrRefOrSpecTag tag1,n1), - TypeDefOrRefOrSpec(TypeDefOrRefOrSpecTag tag2,n2) - | TypeOrMethodDef(TypeOrMethodDefTag tag1,n1), - TypeOrMethodDef(TypeOrMethodDefTag tag2,n2) - | HasConstant (HasConstantTag tag1,n1), - HasConstant (HasConstantTag tag2,n2) - | HasCustomAttribute (HasCustomAttributeTag tag1,n1), - HasCustomAttribute (HasCustomAttributeTag tag2,n2) - | HasFieldMarshal (HasFieldMarshalTag tag1,n1), - HasFieldMarshal (HasFieldMarshalTag tag2,n2) - | HasDeclSecurity (HasDeclSecurityTag tag1,n1), - HasDeclSecurity (HasDeclSecurityTag tag2,n2) - | MemberRefParent (MemberRefParentTag tag1,n1), - MemberRefParent (MemberRefParentTag tag2,n2) - | HasSemantics (HasSemanticsTag tag1,n1), - HasSemantics (HasSemanticsTag tag2,n2) - | MethodDefOrRef (MethodDefOrRefTag tag1,n1), - MethodDefOrRef (MethodDefOrRefTag tag2,n2) - | MemberForwarded (MemberForwardedTag tag1,n1), - MemberForwarded (MemberForwardedTag tag2,n2) - | Implementation (ImplementationTag tag1,n1), - Implementation (ImplementationTag tag2,n2) - | CustomAttributeType (CustomAttributeTypeTag tag1,n1), - CustomAttributeType (CustomAttributeTypeTag tag2,n2) - | (ResolutionScope (ResolutionScopeTag tag1,n1), - ResolutionScope (ResolutionScopeTag tag2,n2)) -> - let c1 = compare n1 n2 - if c1 <> 0 then c1 else compare tag1 tag2 - | ULong _,ULong _ - | UShort _, UShort _ - | Guid _,Guid _ - | Blob _, Blob _ - | String _, String _ - | Data _,Data _ -> failwith "should not have to sort tables on this element" - | _ -> failwith "sorting on Column where two rows have different kinds of element in this Column" - -let SortRows tab rows = - if List.mem_assoc tab sorted_table_info then - let rows = rows |> List.map (fun (row:IGenericRow) -> row.GetGenericRow()) - let col = List.assoc tab sorted_table_info - rows - |> List.sortWith (fun r1 r2 -> row_elem_compare r1.[col] r2.[col]) - |> List.map (fun arr -> (SimpleSharedRow arr) :> IGenericRow) - else - rows - -let GenModule cenv modul = - let midx = AddUnsharedRow cenv tab_Module (GetModuleAsRow cenv modul) - List.iter (GenResourcePass3 cenv) (dest_resources modul.modulResources); - let tds = dest_tdefs_with_toplevel_first cenv.ilg modul.modulTypeDefs - reportTime "Module Generation Preparation"; - GenTypeDefsPass1 [] cenv tds; - reportTime "Module Generation Pass 1"; - GenTypeDefsPass2 0 [] cenv tds; - reportTime "Module Generation Pass 2"; - (match modul.modulManifest with None -> () | Some m -> GenManifestPass3 cenv m); - GenTypeDefsPass3 [] cenv tds; - reportTime "Module Generation Pass 3"; - GenCustomAttrsPass3 cenv (hca_Module,midx) modul.modulCustomAttrs; - // GenericParam is the only sorted table indexed by Columns in other tables (GenericParamConstraint). - // Hence we need to sort it before we emit any entries in GenericParamConstraint. - // Note this mutates the rows in a table. 'SetRowsOfTable' clears - // the key --> index map since it is no longer valid - SetRowsOfTable cenv.tables.[tag_of_table tab_GenericParam] (SortRows tab_GenericParam (GetTableEntries (table cenv tab_GenericParam))); - GenTypeDefsPass4 [] cenv tds; - reportTime "Module Generation Pass 4" - -let gen_il reqd_data_fixups (desiredMetadataVersion,generate_pdb,mscorlib) (m : ILModuleDef) cil_addr = - let is_dll = m.modulDLL - if logging then dprintn ("cil_addr = "^string cil_addr); - - let cenv = - { mscorlib=mscorlib; - ilg = mk_ILGlobals mscorlib None; (* assumes mscorlib is Scope_assembly _ ILScopeRef *) - desiredMetadataVersion=desiredMetadataVersion; - reqd_data_fixups= reqd_data_fixups; - reqd_string_fixups = []; - code_chunks=Bytebuf.create 40000; - next_code_addr = cil_addr; - data = Bytebuf.create 200; - resources = Bytebuf.create 200; - tables= Array.init 64 (fun i -> NewTable ("row table "^string i,System.Collections.Generic.EqualityComparer.Default)); - AssemblyRefs = NewTable("ILAssemblyRef",System.Collections.Generic.EqualityComparer.Default); - documents=NewTable("pdbdocs",System.Collections.Generic.EqualityComparer.Default); - trefCache=new Dictionary<_,_>(100); - pdbinfo= new ResizeArray<_>(200); - fieldDefs= NewTable("field defs",System.Collections.Generic.EqualityComparer.Default); - methodDefIdxsByKey = NewTable("method defs",System.Collections.Generic.EqualityComparer.Default); - // This uses reference identity on ILMethodDef objects - methodDefIdxs = new Dictionary<_,_>(100, HashIdentity.Reference); - propertyDefs = NewTable("property defs",System.Collections.Generic.EqualityComparer.Default); - eventDefs = NewTable("event defs",System.Collections.Generic.EqualityComparer.Default); - typeDefs = NewTable("type defs",System.Collections.Generic.EqualityComparer.Default); - entrypoint=None; - generate_pdb=generate_pdb; - // These must use structural comparison since they are keyed by arrays - guids=NewTable("guids",HashIdentity.Structural); - blobs= NewTable("blobs",HashIdentity.Structural); - strings= NewTable("strings",System.Collections.Generic.EqualityComparer.Default); - userStrings= NewTable("user strings",System.Collections.Generic.EqualityComparer.Default); } - - // Now the main compilation step - GenModule cenv m; - - // Fetch out some of the results - let entryPointToken = - match cenv.entrypoint with - | Some (ep_here,tok) -> - if logging then dprintn ("ep idx is "^string tok); - GetUncodedToken (if ep_here then tab_Method else tab_File) tok - | None -> - if not is_dll then dprintn "warning: no entrypoint specified in executable binary"; - 0x0 - - let pdb_data = - { EntryPoint= (if is_dll then None else Some entryPointToken); - Documents = Array.of_list (GetTableEntries cenv.documents); - Methods= cenv.pdbinfo |> ResizeArray.to_array } - - let tidx_for_nested_tdef (tds:ILTypeDef list, td:ILTypeDef) = - let enc = tds |> List.map (fun td -> td.Name) - GetIdxForTypeDef cenv (TdKey(enc, td.Name)) - - let strings = Array.map Bytes.string_as_utf8_bytes_null_terminated (Array.of_list (GetTableEntries cenv.strings)) - let userStrings = Array.of_list (GetTableEntries cenv.userStrings) |> Array.map Bytes.string_as_unicode_bytes - let blobs = Array.of_list (GetTableEntries cenv.blobs) - let guids = Array.of_list (GetTableEntries cenv.guids) - let tables = Array.map GetTableEntries cenv.tables - let code = get_code cenv - (* turn idx tbls into token maps *) - let mappings = - { tdefMap = (fun t -> - GetUncodedToken tab_TypeDef (tidx_for_nested_tdef t)); - fdefMap = (fun t fd -> - let tidx = tidx_for_nested_tdef t - GetUncodedToken tab_Field (GetFieldDefAsFieldDefIdx cenv tidx fd)); - mdefMap = (fun t md -> - let tidx = tidx_for_nested_tdef t - GetUncodedToken tab_Method (FindMethodDefIdx cenv (GetKeyForMethodDef tidx md))); - propertyMap = (fun t pd -> - let tidx = tidx_for_nested_tdef t - GetUncodedToken tab_Property (GetTableEntry cenv.propertyDefs (GetKeyForPropertyDef tidx pd))); - eventMap = (fun t ed -> - let tidx = tidx_for_nested_tdef t - GetUncodedToken tab_Event (GetTableEntry cenv.eventDefs (EventKey (tidx, ed.eventName)))) } - reportTime "Finalize Module Generation Results"; - (* New return the results *) - strings, - userStrings, - blobs, - guids, - tables, - entryPointToken, - code, - cenv.reqd_string_fixups, - Bytebuf.close cenv.data, - Bytebuf.close cenv.resources, - pdb_data, - mappings - - -(*===================================================================== - * TABLES+BLOBS --> PHYSICAL METADATA+BLOBS - *=====================================================================*) - -type chunk = - { size: int32; - addr: int32 } - -let chunk sz next = ({addr=next; size=sz},next + sz) -let nochunk next = ({addr= 0x0;size= 0x0; } ,next) - -let count f arr = - Array.fold_left (fun x y -> x + f y) 0x0 arr - -let write_binary_il (generate_pdb,desiredMetadataVersion,mscorlib) modul cil_addr = - - let is_dll = modul.modulDLL - (* When we know the real RVAs of the data section we fixup the references for the FieldRVA table. *) - (* These references are stored as offsets into the metadata we return from this function *) - let reqd_data_fixups = ref [] - - let next = cil_addr - - let strings,userStrings,blobs,guids,tables,entryPointToken,code,reqd_string_fixups,data,resources,pdb_data,mappings = - gen_il reqd_data_fixups (desiredMetadataVersion,generate_pdb,mscorlib) modul cil_addr - - reportTime "Generated Tables and Code"; - let table_size (Table idx) = List.length tables.[idx] - - (* Compute a minimum version if generics were present: we give warnings if *) - (* the version is not sufficient to support the constructs being emitted *) - let minVersion = - if table_size tab_GenericParam > 0 or - table_size tab_MethodSpec > 0 or - table_size tab_GenericParamConstraint > 0 - then parse_version ("2.0.0.0") (* Whidbey Minumum *) - else parse_version ("1.0.3705.0") - - (* Entrypoint is coded as an uncoded token *) - if logging then dprintn ("ep token is "^string entryPointToken); - - (* Now place the code *) - let code_size = (Bytes.length code) - let aligned_code_size = align 0x4 code_size - let codep,next = chunk code_size next - let code_padding = Array.create ( (aligned_code_size - code_size)) 0x0 - let code_paddingp,next = chunk (Array.length code_padding) next - - if logging then dprintn ("codep.size = "^string codep.size); - - (* Now layout the chunks of metadata and IL *) - let metadata_header_startp,next = chunk 0x10 next - - if logging then dprintn ("metadata_header_startp.addr = "^string metadata_header_startp.addr); - - let num_streams = 0x05 - - let (mdtable_version_major, mdtable_version_minor) = metadataSchemaVersionSupportedByCLRVersion desiredMetadataVersion - - let version = - let (a,b,c,d) = desiredMetadataVersion - string_as_utf8_intarray (Printf.sprintf "v%d.%d.%d" a b c) - - - let padded_version_length = align 0x4 (Array.length version) - - (* Most addresses after this point are measured from the MD root *) - (* Switch to md-rooted addresses *) - let next = metadata_header_startp.size - let metadata_header_versionp,next = chunk padded_version_length next - let metadata_header_endp,next = chunk 0x04 next - let tables_stream_headerp,next = chunk (0x08 + (align 4 ((String.length "#~") + 0x01))) next - let strings_stream_headerp,next = chunk (0x08 + (align 4 ((String.length "#Strings") + 0x01))) next - let userStrings_stream_headerp,next = chunk (0x08 + (align 4 ((String.length "#US") + 0x01))) next - let guids_stream_headerp,next = chunk (0x08 + (align 4 ((String.length "#GUID") + 0x01))) next - let blobs_stream_headerp,next = chunk (0x08 + (align 4 ((String.length "#Blob") + 0x01))) next - - let tables_stream_start = next - - let strings_stream_unpadded_size = count (fun s -> (Bytes.length s)) strings + 1 - let strings_stream_padded_size = align 4 strings_stream_unpadded_size - - let userStrings_stream_unpadded_size = count (fun s -> let n = (Bytes.length s) + 1 in n + z_u32_size n) userStrings + 1 - let userStrings_stream_padded_size = align 4 userStrings_stream_unpadded_size - - let guids_stream_unpadded_size = (Array.length guids) * 0x10 - let guids_stream_padded_size = align 4 guids_stream_unpadded_size - - let blobs_stream_unpadded_size = count (fun blob -> let n = (Bytes.length blob) in n + z_u32_size n) blobs + 1 - let blobs_stream_padded_size = align 4 blobs_stream_unpadded_size - - let guids_big = guids_stream_padded_size >= 0x10000 - let strings_big = strings_stream_padded_size >= 0x10000 - let blobs_big = blobs_stream_padded_size >= 0x10000 - - (* 64bit bitvector indicating which tables are in the metadata. *) - let (valid1,valid2),_ = - Array.fold_left - (fun ((valid1,valid2) as valid,n) rows -> - let valid = - if isNil rows then valid else - ( (if n < 32 then valid1 ||| (1 <<< n ) else valid1), - (if n >= 32 then valid2 ||| (1 <<< (n-32)) else valid2) ) - (valid,n+1)) - ((0,0), 0) - tables - - // 64bit bitvector indicating which tables are sorted. - // Constant - REVIEW: make symbolic! compute from sorted table info! - let sorted1 = 0x3301fa00 - let sorted2 = - // If there are any generic parameters in the binary we're emitting then mark that - // table as sorted, otherwise don't. This maximizes the number of assemblies we emit - // which have an ECMA-v.1. compliant set of sorted tables. - (if table_size (tab_GenericParam) > 0 then 0x00000400 else 0x00000000) ||| - (if table_size (tab_GenericParamConstraint) > 0 then 0x00001000 else 0x00000000) ||| - 0x00000200 - - reportTime "Layout Header of Tables"; - - if logging then dprintn ("building string address table..."); - - let guid_address n = (if n = 0 then 0 else (n - 1) * 0x10 + 0x01) - - let string_address_tab = - let tab = Array.create (Array.length strings + 1) 0 - let pos = ref 1 - for i = 1 to Array.length strings do - tab.[i] <- !pos; - let s = strings.[i - 1] - pos := !pos + (Bytes.length s) - tab - let string_address n = - if n >= Array.length string_address_tab then failwith ("string index "^string n^" out of range"); - string_address_tab.[n] - - let userString_address_tab = - let tab = Array.create (Array.length userStrings + 1) 0 - let pos = ref 1 - for i = 1 to Array.length userStrings do - tab.[i] <- !pos; - let s = userStrings.[i - 1] - let n = (Bytes.length s) + 1 - pos := !pos + n + z_u32_size n - tab - let userString_address n = - if n >= Array.length userString_address_tab then failwith "userString index out of range"; - userString_address_tab.[n] - - let blob_address_tab = - let tab = Array.create (Array.length blobs + 1) 0 - let pos = ref 1 - for i = 1 to Array.length blobs do - tab.[i] <- !pos; - let blob = blobs.[i - 1] - pos := !pos + (Bytes.length blob) + z_u32_size (Bytes.length blob) - tab - let blob_address n = - if n >= Array.length blob_address_tab then failwith "blob index out of range"; - blob_address_tab.[n] - - reportTime "Build String/Blob Address Tables"; - - if logging then dprintn ("done building string/blob address table..."); - - - if logging then dprintn ("sorting tables..."); - - let sortedTables = - Array.init 64 (fun i -> tables.[i] |> SortRows (Table i) |> Array.of_list) - - reportTime "Sort Tables"; - - if logging then dprintn ("encoding tables..."); - - let coded_tables = - - let isTableBig rows = Array.length rows >= 0x10000 - let bigness_tab = Array.map isTableBig sortedTables - let bigness (Table idx) = bigness_tab.[idx] - - let coded_bigness nbits tab = - (table_size tab) >= (0x10000 >>> nbits) - - let tdor_bigness = - coded_bigness 2 tab_TypeDef || - coded_bigness 2 tab_TypeRef || - coded_bigness 2 tab_TypeSpec - - let tomd_bigness = - coded_bigness 1 tab_TypeDef || - coded_bigness 1 tab_Method - - let hc_bigness = - coded_bigness 2 tab_Field || - coded_bigness 2 tab_Param || - coded_bigness 2 tab_Property - - let hca_bigness = - coded_bigness 5 tab_Method || - coded_bigness 5 tab_Field || - coded_bigness 5 tab_TypeRef || - coded_bigness 5 tab_TypeDef || - coded_bigness 5 tab_Param || - coded_bigness 5 tab_InterfaceImpl || - coded_bigness 5 tab_MemberRef || - coded_bigness 5 tab_Module || - coded_bigness 5 tab_Permission || - coded_bigness 5 tab_Property || - coded_bigness 5 tab_Event || - coded_bigness 5 tab_StandAloneSig || - coded_bigness 5 tab_ModuleRef || - coded_bigness 5 tab_TypeSpec || - coded_bigness 5 tab_Assembly || - coded_bigness 5 tab_AssemblyRef || - coded_bigness 5 tab_File || - coded_bigness 5 tab_ExportedType || - coded_bigness 5 tab_ManifestResource || - coded_bigness 5 tab_GenericParam || - coded_bigness 5 tab_GenericParamConstraint || - coded_bigness 5 tab_MethodSpec - - - let hfm_bigness = - coded_bigness 1 tab_Field || - coded_bigness 1 tab_Param - - let hds_bigness = - coded_bigness 2 tab_TypeDef || - coded_bigness 2 tab_Method || - coded_bigness 2 tab_Assembly - - let mrp_bigness = - coded_bigness 3 tab_TypeRef || - coded_bigness 3 tab_ModuleRef || - coded_bigness 3 tab_Method || - coded_bigness 3 tab_TypeSpec - - let hs_bigness = - coded_bigness 1 tab_Event || - coded_bigness 1 tab_Property - - let mdor_bigness = - coded_bigness 1 tab_Method || - coded_bigness 1 tab_MemberRef - - let mf_bigness = - coded_bigness 1 tab_Field || - coded_bigness 1 tab_Method - - let i_bigness = - coded_bigness 2 tab_File || - coded_bigness 2 tab_AssemblyRef || - coded_bigness 2 tab_ExportedType - - let cat_bigness = - coded_bigness 3 tab_Method || - coded_bigness 3 tab_MemberRef - - let rs_bigness = - coded_bigness 2 tab_Module || - coded_bigness 2 tab_ModuleRef || - coded_bigness 2 tab_AssemblyRef || - coded_bigness 2 tab_TypeRef - - let tablesbuf = Bytebuf.create 20000 - - (* Now the coded tables themselves - first the schemata header *) - Bytebuf.emit_intarray_as_bytes tablesbuf - [| 0x00; 0x00; 0x00; 0x00; - mdtable_version_major; (* major version of table schemata *) - mdtable_version_minor; (* minor version of table schemata *) - - ((if strings_big then 0x01 else 0x00) ||| (* bit vector for heap sizes *) - (if guids_big then 0x02 else 0x00) ||| (* bit vector for heap sizes *) - (if blobs_big then 0x04 else 0x00)); - 0x01; (* reserved, always 1 *) |]; - - Bytebuf.emit_i32 tablesbuf valid1; - Bytebuf.emit_i32 tablesbuf valid2; - Bytebuf.emit_i32 tablesbuf sorted1; - Bytebuf.emit_i32 tablesbuf sorted2; - - // Numbers of rows in various tables - for rows in sortedTables do - if rows.Length <> 0 then - Bytebuf.emit_i32 tablesbuf rows.Length - - - let start_of_tables = Bytebuf.length tablesbuf - reportTime "Write Header of tablebuf"; - - (* The tables themselves *) - for rows in sortedTables do - for row in rows do - let row = row.GetGenericRow() - for x in row do - // Emit the coded token for the array element - match x with - | ULong n -> Bytebuf.emit_i32 tablesbuf n - | UShort n -> Bytebuf.emit_u16 tablesbuf n - | Guid n -> bytebuf_emit_z_untagged_index tablesbuf guids_big (guid_address n) - | Blob n -> bytebuf_emit_z_untagged_index tablesbuf blobs_big (blob_address n) - | Data (offset,kind) -> record_reqd_data_fixup reqd_data_fixups tablesbuf (tables_stream_start + (Bytebuf.length tablesbuf)) (offset, kind) - | String n -> bytebuf_emit_z_untagged_index tablesbuf strings_big (string_address n) - | SimpleIndex (tab,n) -> bytebuf_emit_z_untagged_index tablesbuf (bigness tab) n - | TypeDefOrRefOrSpec(TypeDefOrRefOrSpecTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 2 tdor_bigness n - | TypeOrMethodDef(TypeOrMethodDefTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 1 tomd_bigness n - | HasConstant (HasConstantTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 2 hc_bigness n - | HasCustomAttribute (HasCustomAttributeTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 5 hca_bigness n - | HasFieldMarshal (HasFieldMarshalTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 1 hfm_bigness n - | HasDeclSecurity (HasDeclSecurityTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 2 hds_bigness n - | MemberRefParent (MemberRefParentTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 3 mrp_bigness n - | HasSemantics (HasSemanticsTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 1 hs_bigness n - | MethodDefOrRef (MethodDefOrRefTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 1 mdor_bigness n - | MemberForwarded (MemberForwardedTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 1 mf_bigness n - | Implementation (ImplementationTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 2 i_bigness n - | CustomAttributeType (CustomAttributeTypeTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 3 cat_bigness n - | ResolutionScope (ResolutionScopeTag tag,n) -> - bytebuf_emit_z_tagged_index tablesbuf tag 2 rs_bigness n - Bytebuf.close tablesbuf - - reportTime "Write Tables to tablebuf"; - - if logging then dprintn ("laying out final metadata..."); - - let tables_stream_unpadded_size = (Bytes.length coded_tables) - (* QUERY: extra 4 empty bytes in array.exe - why? Include some extra padding after the tables just in case there is a mistake in the ECMA spec. *) - let tables_stream_padded_size = align 4 (tables_stream_unpadded_size + 4) - let tables_streamp,next = chunk tables_stream_padded_size next - let tables_stream_padding = tables_streamp.size - tables_stream_unpadded_size - - let strings_streamp,next = chunk strings_stream_padded_size next - let strings_stream_padding = strings_streamp.size - strings_stream_unpadded_size - let userStrings_streamp,next = chunk userStrings_stream_padded_size next - let userStrings_stream_padding = userStrings_streamp.size - userStrings_stream_unpadded_size - let guids_streamp,next = chunk (0x10 * guids.Length) next - let blobs_streamp,next = chunk blobs_stream_padded_size next - let blobs_stream_padding = blobs_streamp.size - blobs_stream_unpadded_size - - reportTime "Layout Metadata"; - - if logging then dprintn ("producing final metadata..."); - let metadata = - let mdbuf = Bytebuf.create 500000 - Bytebuf.emit_intarray_as_bytes mdbuf - [| 0x42; 0x53; 0x4a; 0x42; (* Magic signature *) - 0x01; 0x00; (* Major version *) - 0x01; 0x00; (* Minor version *) - |]; - Bytebuf.emit_i32 mdbuf 0x0; (* Reservered *) - - Bytebuf.emit_i32 mdbuf padded_version_length; - Bytebuf.emit_intarray_as_bytes mdbuf version; - for i = 1 to ( padded_version_length - Array.length version) do - Bytebuf.emit_int_as_byte mdbuf 0x00; - - Bytebuf.emit_intarray_as_bytes mdbuf - [| 0x00; 0x00; (* flags, reserved *) - b0 num_streams; b1 num_streams; |]; - Bytebuf.emit_i32 mdbuf tables_streamp.addr; - Bytebuf.emit_i32 mdbuf tables_streamp.size; - Bytebuf.emit_intarray_as_bytes mdbuf [| 0x23; 0x7e; 0x00; 0x00; (* #~00 *)|]; - Bytebuf.emit_i32 mdbuf strings_streamp.addr; - Bytebuf.emit_i32 mdbuf strings_streamp.size; - Bytebuf.emit_intarray_as_bytes mdbuf [| 0x23; 0x53; 0x74; 0x72; 0x69; 0x6e; 0x67; 0x73; 0x00; 0x00; 0x00; 0x00 (* "#Strings0000" *)|]; - Bytebuf.emit_i32 mdbuf userStrings_streamp.addr; - Bytebuf.emit_i32 mdbuf userStrings_streamp.size; - Bytebuf.emit_intarray_as_bytes mdbuf [| 0x23; 0x55; 0x53; 0x00; (* #US0*) |]; - Bytebuf.emit_i32 mdbuf guids_streamp.addr; - Bytebuf.emit_i32 mdbuf guids_streamp.size; - Bytebuf.emit_intarray_as_bytes mdbuf [| 0x23; 0x47; 0x55; 0x49; 0x44; 0x00; 0x00; 0x00; (* #GUID000 *)|]; - Bytebuf.emit_i32 mdbuf blobs_streamp.addr; - Bytebuf.emit_i32 mdbuf blobs_streamp.size; - Bytebuf.emit_intarray_as_bytes mdbuf [| 0x23; 0x42; 0x6c; 0x6f; 0x62; 0x00; 0x00; 0x00; (* #Blob000 *)|]; - - reportTime "Write Metadata Header"; - (* Now the coded tables themselves *) - Bytebuf.emit_bytes mdbuf coded_tables; - for i = 1 to tables_stream_padding do - Bytebuf.emit_int_as_byte mdbuf 0x00; - reportTime "Write Metadata Tables"; - - (* The string stream *) - Bytebuf.emit_intarray_as_bytes mdbuf [| 0x00 |]; - for s in strings do - Bytebuf.emit_bytes mdbuf s; - for i = 1 to strings_stream_padding do - Bytebuf.emit_int_as_byte mdbuf 0x00; - reportTime "Write Metadata Strings"; - (* The user string stream *) - Bytebuf.emit_intarray_as_bytes mdbuf [| 0x00 |]; - for s in userStrings do - emit_z_u32 mdbuf (s.Length + 1); - Bytebuf.emit_bytes mdbuf s; - Bytebuf.emit_int_as_byte mdbuf (marker_for_unicode_bytes s) - for i = 1 to userStrings_stream_padding do - Bytebuf.emit_int_as_byte mdbuf 0x00; - - reportTime "Write Metadata User Strings"; - (* The GUID stream *) - Array.iter (Bytebuf.emit_bytes mdbuf) guids; - - (* The blob stream *) - Bytebuf.emit_intarray_as_bytes mdbuf [| 0x00 |]; - for s in blobs do - emit_z_u32 mdbuf s.Length; - Bytebuf.emit_bytes mdbuf s - for i = 1 to blobs_stream_padding do - Bytebuf.emit_int_as_byte mdbuf 0x00; - reportTime "Write Blob Stream"; - (* Done - close the buffer and return the result. *) - Bytebuf.close mdbuf - - - if logging then dprintn ("fixing up strings in final metadata..."); - - (* Now we know the user string tables etc. we can fixup the *) - (* uses of strings in the code *) - for (code_start_addr, l) in reqd_string_fixups do - for (code_offset,userstring_idx) in l do - if code_start_addr < codep.addr or code_start_addr >= codep.addr + codep.size then failwith "strings-in-code fixup: a group of fixups is located outside the code array"; - let loc_in_code = ((code_start_addr + code_offset) - codep.addr) - CheckFixup32 code loc_in_code 0xdeadbeef; - let token = GetUncodedToken tab_UserStrings (userString_address userstring_idx) - if (Bytes.get code (loc_in_code-1) <> i_ldstr) then failwith "strings-in-code fixup: not at ldstr instruction!"; - ApplyFixup32 code loc_in_code token - reportTime "Fixup Metadata"; - - if logging then dprintn ("done metadata/code..."); - entryPointToken, - code, - code_padding, - metadata, - data, - resources, - !reqd_data_fixups, - pdb_data, - mappings - - - -(*--------------------------------------------------------------------- - * PHYSICAL METADATA+BLOBS --> PHYSICAL PE FORMAT - *---------------------------------------------------------------------*) - -(* THIS LAYS OUT A 2-SECTION .NET PE BINARY *) -(* SECTIONS *) -(* TEXT: physical 0x0200 --> RVA 0x00020000 - e.g. raw size 0x9600, - e.g. virt size 0x9584 - RELOC: physical 0x9800 --> RVA 0x0000c000 - i.e. phys_base --> rva_base - where phys_base = text_base + text raw size - phs_rva = roundup(0x2000, 0x0002000 + text virt size) - -*) - - -let msdos_header = - [| 0x4d ; 0x5a ; 0x90 ; 0x00 ; 0x03 ; 0x00 ; 0x00 ; 0x00 - ; 0x04 ; 0x00 ; 0x00 ; 0x00 ; 0xFF ; 0xFF ; 0x00 ; 0x00 - ; 0xb8 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 - ; 0x40 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 - ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 - ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 - ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 - ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x80 ; 0x00 ; 0x00 ; 0x00 - ; 0x0e ; 0x1f ; 0xba ; 0x0e ; 0x00 ; 0xb4 ; 0x09 ; 0xcd - ; 0x21 ; 0xb8 ; 0x01 ; 0x4c ; 0xcd ; 0x21 ; 0x54 ; 0x68 - ; 0x69 ; 0x73 ; 0x20 ; 0x70 ; 0x72 ; 0x6f ; 0x67 ; 0x72 - ; 0x61 ; 0x6d ; 0x20 ; 0x63 ; 0x61 ; 0x6e ; 0x6e ; 0x6f - ; 0x74 ; 0x20 ; 0x62 ; 0x65 ; 0x20 ; 0x72 ; 0x75 ; 0x6e - ; 0x20 ; 0x69 ; 0x6e ; 0x20 ; 0x44 ; 0x4f ; 0x53 ; 0x20 - ; 0x6d ; 0x6f ; 0x64 ; 0x65 ; 0x2e ; 0x0d ; 0x0d ; 0x0a - ; 0x24 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 ; 0x00 |] - -let write_i64_as_i64 os x = - Pervasives.output_byte os (dw0 x); - Pervasives.output_byte os (dw1 x); - Pervasives.output_byte os (dw2 x); - Pervasives.output_byte os (dw3 x); - Pervasives.output_byte os (dw4 x); - Pervasives.output_byte os (dw5 x); - Pervasives.output_byte os (dw6 x); - Pervasives.output_byte os (dw7 x) - -let write_i32_as_i32 os x = - Pervasives.output_byte os (b0 x); - Pervasives.output_byte os (b1 x); - Pervasives.output_byte os (b2 x); - Pervasives.output_byte os (b3 x) - -let write_i32_as_u16 os x = - Pervasives.output_byte os (b0 x); - Pervasives.output_byte os (b1 x) - -let write_directory os dict = - write_i32_as_i32 os (if dict.size = 0x0 then 0x0 else dict.addr); - write_i32_as_i32 os dict.size - -let write_intarray os chunk = - for i = 0 to Array.length chunk - 1 do - let b = chunk.[i] - if checking && (b < 0 or b > 255) then dprintn ("write: "^string b^" is not a byte at offset "^string i); - Pervasives.output_byte os (b % 256) - done - -let write_bytes os chunk = Bytes.output os chunk - -let write_binary_internal outfile mscorlib (pdbfile: string option) (signer: signer option) fixupOverlappingSequencePoints modul = - (* Store the public key from the signer into the manifest. This means it will be written *) - (* to the binary and also acts as an indicator to leave space for delay sign *) - - reportTime "Write Started"; - let is_dll = modul.modulDLL - - let signer = - match signer,modul.modulManifest with - | Some _, _ -> signer - | _, None -> signer - | None, Some {manifestPublicKey=Some pubkey} -> - (dprintn "Note: The output assembly will be delay-signed using the original public"; - dprintn "Note: key. In order to load it you will need to either sign it with"; - dprintn "Note: the original private key or to turn off strong-name verification"; - dprintn "Note: (use sn.exe from the .NET Framework SDK to do this, e.g. 'sn -Vr *')."; - dprintn "Note: Alternatively if this tool supports it you can provide the original"; - dprintn "Note: private key when converting the assembly, assuming you have access to"; - dprintn "Note: it."; - Some (signerOpenPublicKey pubkey)) - | _ -> signer - - let modul = - let pubkey = - match signer with - | None -> None - | Some s -> - try Some (signerPublicKey s) - with e -> - failwith ("A call to StrongNameGetPublicKey failed ("^e.Message^")"); - None - begin match modul.modulManifest with - | None -> () - | Some m -> - if m.manifestPublicKey <> None && m.manifestPublicKey <> pubkey then - dprintn "Warning: The output assembly is being signed or delay-signed with a strong name that is different to the original." - end; - { modul with modulManifest = match modul.modulManifest with None -> None | Some m -> Some {m with manifestPublicKey = pubkey} } - - if logging then dprintf "signerPublicKey (2): %s" outfile; - - let timestamp = absilWriteGetTimeStamp () - - let os = try open_out_bin outfile - with e -> failwith ("Could not open file for writing (binary mode): " ^ outfile) - - let pdb_data,debug_directoryp,debug_datap,textV2P,mappings = - try - - let image_base_real = modul.modulImageBase // FIXED CHOICE - let align_virt = modul.modulVirtAlignment // FIXED CHOICE - let align_phys = modul.modulPhysAlignment // FIXED CHOICE - - let isItanium = modul.Platform = Some(IA64) - - let num_sections = 3 in (* .text, .sdata, .reloc *) - - - (* HEADERS *) - - let next = 0x0 - let header_phys_loc = 0x0 - let header_addr = next - let next = header_addr - - let msdos_header_size = 0x80 - let msdos_headerp,next = chunk msdos_header_size next - - let pe_signature_size = 0x04 - let pe_signaturep,next = chunk pe_signature_size next - - let pe_file_header_size = 0x14 - let pe_file_headerp,next = chunk pe_file_header_size next - - let pe_optional_header_size = if modul.Is64Bit then 0xf0 else 0xe0 - let pe_optional_headerp,next = chunk pe_optional_header_size next - - let text_section_header_size = 0x28 - let text_section_headerp,next = chunk text_section_header_size next - - let data_section_header_size = 0x28 - let data_section_headerp,next = chunk data_section_header_size next - - let reloc_section_header_size = 0x28 - let reloc_section_headerp,next = chunk reloc_section_header_size next - - let header_size = next - header_addr - let next_phys = align align_phys (header_phys_loc + header_size) - let header_phys_size = next_phys - header_phys_loc - let next = align align_virt (header_addr + header_size) - - (* TEXT SECTION: 8 bytes IAT table 72 bytes CLI header *) - - let text_phys_loc = next_phys - let text_addr = next - let next = text_addr - - let import_addr_tabp,next = chunk 0x08 next - let cli_header_padding = (if isItanium then (align 16 next) else next) - next - let next = next + cli_header_padding - let cli_headerp,next = chunk 0x48 next - - let desiredMetadataVersion = - match mscorlib with - | ScopeRef_local -> failwith "Expected mscorlib to be ScopeRef_assembly was ScopeRef_local" - | ScopeRef_module(_) -> failwith "Expected mscorlib to be ScopeRef_assembly was ScopeRef_module" - | ScopeRef_assembly(aref) -> - match aref.Version with - | Some (2us,_,_,_) -> parse_version "2.0.50727.0" - | Some v -> v - | None -> failwith "Expected msorlib to have a version number" - - let entryPointToken,code,code_padding,metadata,data,resources,reqd_data_fixups,pdb_data,mappings = - write_binary_il ((pdbfile <> None), desiredMetadataVersion,mscorlib) modul next - - reportTime "Generated IL and metadata"; - let codep,next = chunk (Bytes.length code) next - let code_paddingp,next = chunk (Array.length code_padding) next - - let metadatap,next = chunk (Bytes.length metadata) next - - let strongnamep,next = - match signer with - | None -> nochunk next - | Some s -> chunk (signerSignatureSize s) next - - let resourcesp,next = chunk (Bytes.length resources) next - - let rawdatap,next = chunk (Bytes.length data) next - - let vtfixupsp,next = nochunk next in (* REVIEW *) - let import_tabp_pre_padding = (if isItanium then (align 16 next) else next) - next - let next = next + import_tabp_pre_padding - let import_tabp,next = chunk 0x28 next - let import_lookup_tabp,next = chunk 0x14 next - let import_name_hint_tabp,next = chunk 0x0e next - let mscoree_stringp,next = chunk 0x0c next - - let next = align 0x10 (next + 0x05) - 0x05 - let import_tabp = { addr=import_tabp.addr; size = next - import_tabp.addr} - let import_tabp_padding = import_tabp.size - (0x28 + 0x14 + 0x0e + 0x0c) - - let next = next + 0x03 - let entrypoint_codep,next = chunk 0x06 next - let globalpointer_codep,next = chunk (if isItanium then 0x8 else 0x0) next - - let debug_directoryp,next = chunk (if pdbfile = None then 0x0 else sizeof_IMAGE_DEBUG_DIRECTORY) next - (* The debug data is given to us by the PDB writer and appears to typically be the type of the data plus the PDB file name. We fill this in after we've written the binary. We approximate the size according to what PDB writers seem to require and leave extra space just in case... *) - let debug_data_just_in_case = 40 - let debug_datap,next = chunk (align 0x4 (match pdbfile with None -> 0x0 | Some f -> (24 + String.length f + debug_data_just_in_case))) next - - - let text_size = next - text_addr - let next_phys = align align_phys (text_phys_loc + text_size) - let text_phys_size = next_phys - text_phys_loc - let next = align align_virt (text_addr + text_size) - - (* .RSRC SECTION (DATA) *) - let data_phys_loc = next_phys - let data_addr = next - let dataV2P v = v - data_addr + data_phys_loc - - let resourceFormat = if modul.Is64Bit then Ilsupp.X64 else Ilsupp.X86 - - let nativeResources = - match modul.modulNativeResources with - | [] -> [||] - | resources -> - if runningOnMono then - [||] - else - let unlinkedResources = List.map Lazy.force resources - begin - try linkNativeResources unlinkedResources next resourceFormat (Path.GetDirectoryName(outfile)) - with e -> failwith ("Linking a native resource failed: "^e.Message^"") - end - - let native_resource_size = nativeResources.Length - - let native_resourcesp,next = chunk native_resource_size next - - let dummydatap,next = chunk (if next = data_addr then 0x01 else 0x0) next - - let data_size = next - data_addr - let next_phys = align align_phys (data_phys_loc + data_size) - let data_phys_size = next_phys - data_phys_loc - let next = align align_virt (data_addr + data_size) - - (* .RELOC SECTION base reloc table: 0x0c size *) - let reloc_phys_loc = next_phys - let reloc_addr = next - let base_reloc_tabp,next = chunk 0x0c next - - let reloc_size = next - reloc_addr - let next_phys = align align_phys (reloc_phys_loc + reloc_size) - let reloc_phys_size = next_phys - reloc_phys_loc - let next = align align_virt (reloc_addr + reloc_size) - - - if logging then dprintn ("fixup references into data section..."); - - (* Now we know where the data section lies we can fix up the *) - (* references into the data section from the metadata tables. *) - begin - reqd_data_fixups |> List.iter - (fun (metadata_offset32,(data_offset,kind)) -> - let metadata_offset = metadata_offset32 - if metadata_offset < 0 or metadata_offset >= Bytes.length metadata - 4 then failwith "data RVA fixup: fixup located outside metadata"; - CheckFixup32 metadata metadata_offset 0xdeaddddd; - let data_rva = - if kind then - let res = data_offset - if res >= resourcesp.size then dprintn ("resource offset bigger than resource data section"); - res - else - let res = rawdatap.addr + data_offset - if res < rawdatap.addr then dprintn ("data rva before data section"); - if res >= rawdatap.addr + rawdatap.size then dprintn ("data rva after end of data section, data_rva = "^string res^", rawdatap.addr = "^string rawdatap.addr^", rawdatap.size = "^string rawdatap.size); - res - ApplyFixup32 metadata metadata_offset data_rva); - end; - - (* IMAGE TOTAL SIZE *) - let image_end_phys_loc = next_phys - let image_end_addr = next - - reportTime "Layout image"; - if logging then dprintn ("writing image..."); - - let write p os chunkName chunk = - match p with - | None -> () - | Some p' -> - if (Pervasives.pos_out os) <> p' then - failwith ("warning: "^chunkName^" not where expected, pos_out = "^string (Pervasives.pos_out os)^", p.addr = "^string p') - write_intarray os chunk - - let write_padding os string sz = - if sz < 0 then failwith "write_padding: size < 0"; - for i = 0 to sz - 1 do - Pervasives.output_byte os 0 - - (* Now we've computed all the offsets, write the image *) - - write (Some msdos_headerp.addr) os "msdos header" msdos_header; - - (* PE HEADER *) - - write (Some pe_signaturep.addr) os "pe_signature" [| |]; - - write_i32_as_i32 os 0x4550; - - write (Some pe_file_headerp.addr) os "pe_file_header" [| |]; - - if (modul.Platform = Some(AMD64)) then - write_i32_as_u16 os 0x8664 (* Machine - IMAGE_FILE_MACHINE_AMD64 *) - elif isItanium then - write_i32_as_u16 os 0x200 - else - write_i32_as_u16 os 0x014c;(* Machine - IMAGE_FILE_MACHINE_I386 *) - - write_i32_as_u16 os num_sections; - write_i32_as_i32 os timestamp; (* date since 1970 *) - write_i32_as_i32 os 0x00; (* Pointer to Symbol Table Always 0 *) - (* 00000090 *) - write_i32_as_i32 os 0x00; (* Number of Symbols Always 0 *) - write_i32_as_u16 os pe_optional_header_size; (* Size of the optional header, the format is described below. *) - - (* - 64bit: IMAGE_FILE_32BIT_MACHINE ||| IMAGE_FILE_LARGE_ADDRESS_AWARE - 32bit: IMAGE_FILE_32BIT_MACHINE - - Yes, 32BIT_MACHINE is set for AMD64... - *) - let imachine_characteristic = match modul.Platform with | Some(IA64) -> 0x20 | Some(AMD64) -> 0x0120 | _ -> 0x0100 - - write_i32_as_u16 os ((if is_dll then 0x2000 else 0x0000) ||| 0x0002 ||| 0x0004 ||| 0x0008 ||| imachine_characteristic); - - (* Now comes optional header *) - - let peOptionalHeaderByte = peOptionalHeaderByteByCLRVersion desiredMetadataVersion - - write (Some pe_optional_headerp.addr) os "pe_optional_header" [| |]; - if modul.Is64Bit then - write_i32_as_u16 os 0x020B (* Magic number is 0x020B for 64-bit *) - else - write_i32_as_u16 os 0x010b; (* Always 0x10B (see Section 23.1). *) - write_i32_as_u16 os peOptionalHeaderByte; (* QUERY: ECMA spec says 6, some binaries, e.g. fscmanaged.exe say 7, Whidbey binaries say 8 *) - write_i32_as_i32 os text_phys_size; (* Size of the code (text) section, or the sum of all code sections if there are multiple sections. *) - (* 000000a0 *) - write_i32_as_i32 os data_phys_size; (* Size of the initialized data section, or the sum of all such sections if there are multiple data sections. *) - write_i32_as_i32 os 0x00; (* Size of the uninitialized data section, or the sum of all such sections if there are multiple unitinitalized data sections. *) - write_i32_as_i32 os entrypoint_codep.addr; (* RVA of entry point , needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 in a section marked execute/read for EXEs or 0 for DLLs e.g. 0x0000b57e *) - write_i32_as_i32 os text_addr; (* e.g. 0x0002000 *) - (* 000000b0 *) - if modul.Is64Bit then - write_i64_as_i64 os ((int64)image_base_real) (* REVIEW: For 64-bit, we should use a 64-bit image base *) - else - (write_i32_as_i32 os data_addr; (* e.g. 0x0000c000 *) - write_i32_as_i32 os image_base_real); (* Image Base Always 0x400000 (see Section 23.1). - QUERY : no it's not always 0x400000, e.g. 0x034f0000 *) - - write_i32_as_i32 os align_virt; (* Section Alignment Always 0x2000 (see Section 23.1). *) - write_i32_as_i32 os align_phys; (* File Alignment Either 0x200 or 0x1000. *) - (* 000000c0 *) - write_i32_as_u16 os 0x04; (* OS Major Always 4 (see Section 23.1). *) - write_i32_as_u16 os 0x00; (* OS Minor Always 0 (see Section 23.1). *) - write_i32_as_u16 os 0x00; (* User Major Always 0 (see Section 23.1). *) - write_i32_as_u16 os 0x00; (* User Minor Always 0 (see Section 23.1). *) - write_i32_as_u16 os 0x04; (* SubSys Major Always 4 (see Section 23.1). *) - write_i32_as_u16 os 0x00; (* SubSys Minor Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Reserved Always 0 (see Section 23.1). *) - (* 000000d0 *) - write_i32_as_i32 os image_end_addr; (* Image Size: Size, in bytes, of image, including all headers and padding; shall be a multiple of Section Alignment. e.g. 0x0000e000 *) - write_i32_as_i32 os header_phys_size; (* Header Size Combined size of MS-DOS Header, PE Header, PE Optional Header and padding; shall be a multiple of the file alignment. *) - write_i32_as_i32 os 0x00; (* File Checksum Always 0 (see Section 23.1). QUERY: NOT ALWAYS ZERO *) - write_i32_as_u16 os modul.modulSubSystem; (* SubSystem Subsystem required to run this image. Shall be either IMAGE_SUBSYSTEM_WINDOWS_CE_GUI (0x3) or IMAGE_SUBSYSTEM_WINDOWS_GUI (0x2). QUERY: Why is this 3 on the images ILASM produces *) - write_i32_as_u16 os (if isItanium then 0x8540 else 0x400); (* DLL Flags Always 0x400 (no unmanaged windows exception handling - see Section 23.1). *) - (* 000000e0 *) - (* Note that the defaults differ between x86 and x64 *) - if modul.Is64Bit then - (write_i64_as_i64 os ((int64)0x400000); (* Stack Reserve Size Always 0x400000 (4Mb) (see Section 23.1). *) - write_i64_as_i64 os ((int64)0x4000); (* Stack Commit Size Always 0x4000 (16Kb) (see Section 23.1). *) - write_i64_as_i64 os ((int64)0x100000); (* Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) - write_i64_as_i64 os ((int64)0x2000)) (* Heap Commit Size Always 0x800 (8Kb) (see Section 23.1). *) - else - (write_i32_as_i32 os 0x100000; (* Stack Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) - write_i32_as_i32 os 0x1000; (* Stack Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) - write_i32_as_i32 os 0x100000; (* Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) - write_i32_as_i32 os 0x1000); (* Heap Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) - (* 000000f0 - x86 location, moving on, for x64, add 0x10 *) - write_i32_as_i32 os 0x00; (* Loader Flags Always 0 (see Section 23.1) *) - write_i32_as_i32 os 0x10; (* Number of Data Directories: Always 0x10 (see Section 23.1). *) - write_i32_as_i32 os 0x00; - write_i32_as_i32 os 0x00; (* Export Table Always 0 (see Section 23.1). *) - (* 00000100 *) - write_directory os import_tabp; (* Import Table RVA of Import Table, (see clause 24.3.1). e.g. 0000b530 *) - (* Native Resource Table: ECMA says Always 0 (see Section 23.1), but mscorlib and other files with resources bound into executable do not. For the moment assume the resources table is always the first resource in the file. *) - write_directory os native_resourcesp; - - (* 00000110 *) - write_i32_as_i32 os 0x00; (* Exception Table Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Exception Table Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Certificate Table Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Certificate Table Always 0 (see Section 23.1). *) - (* 00000120 *) - write_directory os base_reloc_tabp; - write_directory os debug_directoryp; (* Debug Directory *) - (* 00000130 *) - write_i32_as_i32 os 0x00; (* Copyright Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Copyright Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Global Ptr Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Global Ptr Always 0 (see Section 23.1). *) - (* 00000140 *) - write_i32_as_i32 os 0x00; (* Load Config Table Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Load Config Table Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* TLS Table Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* TLS Table Always 0 (see Section 23.1). *) - (* 00000150 *) - write_i32_as_i32 os 0x00; (* Bound Import Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Bound Import Always 0 (see Section 23.1). *) - write_directory os import_addr_tabp; (* Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) - (* 00000160 *) - write_i32_as_i32 os 0x00; (* Delay Import Descriptor Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Delay Import Descriptor Always 0 (see Section 23.1). *) - write_directory os cli_headerp; - (* 00000170 *) - write_i32_as_i32 os 0x00; (* Reserved Always 0 (see Section 23.1). *) - write_i32_as_i32 os 0x00; (* Reserved Always 0 (see Section 23.1). *) - - write (Some text_section_headerp.addr) os "text_section_header" [| |]; - - (* 00000178 *) - write_intarray os [| 0x2e; 0x74; 0x65; 0x78; 0x74; 0x00; 0x00; 0x00; |]; (* ".text\000\000\000" *) - (* 00000180 *) - write_i32_as_i32 os text_size; (* VirtualSize: Total size of the section when loaded into memory in bytes rounded to Section Alignment. If this value is greater than Size of Raw Data, the section is zero-padded. e.g. 0x00009584 *) - write_i32_as_i32 os text_addr; (* VirtualAddress For executable images this is the address of the first byte of the section, when loaded into memory, relative to the image base. e.g. 0x00020000 *) - write_i32_as_i32 os text_phys_size; (* SizeOfRawData Size of the initialized data on disk in bytes, shall be a multiple of FileAlignment from the PE header. If this is less than VirtualSize the remainder of the section is zero filled. Because this field is rounded while the VirtualSize field is not it is possible for this to be greater than VirtualSize as well. When a section contains only uninitialized data, this field should be 0. 0x00009600 *) - write_i32_as_i32 os text_phys_loc; (* PointerToRawData RVA to section’s first page within the PE file. This shall be a multiple of FileAlignment from the optional header. When a section contains only uninitialized data, this field should be 0. e.g. 00000200 *) - (* 00000190 *) - write_i32_as_i32 os 0x00; (* PointerToRelocations RVA of Relocation section. *) - write_i32_as_i32 os 0x00; (* PointerToLinenumbers Always 0 (see Section 23.1). *) - (* 00000198 *) - write_i32_as_u16 os 0x00;(* NumberOfRelocations Number of relocations, set to 0 if unused. *) - write_i32_as_u16 os 0x00; (* NumberOfLinenumbers Always 0 (see Section 23.1). *) - write_intarray os [| 0x20; 0x00; 0x00; 0x60 |]; (* Characteristics Flags describing section’s characteristics, see below. IMAGE_SCN_CNT_CODE || IMAGE_SCN_MEM_EXECUTE || IMAGE_SCN_MEM_READ *) - - write (Some data_section_headerp.addr) os "data_section_header" [| |]; - - (* 000001a0 *) - write_intarray os [| 0x2e; 0x72; 0x73; 0x72; 0x63; 0x00; 0x00; 0x00; |]; (* ".rsrc\000\000\000" *) - (* write_intarray os [| 0x2e; 0x73; 0x64; 0x61; 0x74; 0x61; 0x00; 0x00; |]; (* ".sdata\000\000" *) *) - write_i32_as_i32 os data_size; (* VirtualSize: Total size of the section when loaded into memory in bytes rounded to Section Alignment. If this value is greater than Size of Raw Data, the section is zero-padded. e.g. 0x0000000c *) - write_i32_as_i32 os data_addr; (* VirtualAddress For executable images this is the address of the first byte of the section, when loaded into memory, relative to the image base. e.g. 0x0000c000*) - (* 000001b0 *) - write_i32_as_i32 os data_phys_size; (* SizeOfRawData Size of the initialized data on disk in bytes, shall be a multiple of FileAlignment from the PE header. If this is less than VirtualSize the remainder of the section is zero filled. Because this field is rounded while the VirtualSize field is not it is possible for this to be greater than VirtualSize as well. When a section contains only uninitialized data, this field should be 0. e.g. 0x00000200 *) - write_i32_as_i32 os data_phys_loc; (* PointerToRawData QUERY: Why does ECMA say "RVA" here? Offset to section’s first page within the PE file. This shall be a multiple of FileAlignment from the optional header. When a section contains only uninitialized data, this field should be 0. e.g. 0x00009800 *) - (* 000001b8 *) - write_i32_as_i32 os 0x00; (* PointerToRelocations RVA of Relocation section. *) - write_i32_as_i32 os 0x00; (* PointerToLinenumbers Always 0 (see Section 23.1). *) - (* 000001c0 *) - write_i32_as_u16 os 0x00; (* NumberOfRelocations Number of relocations, set to 0 if unused. *) - write_i32_as_u16 os 0x00; (* NumberOfLinenumbers Always 0 (see Section 23.1). *) - write_intarray os [| 0x40; 0x00; 0x00; 0x40 |]; (* Characteristics Flags: IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_INITIALIZED_DATA *) - - write (Some reloc_section_headerp.addr) os "reloc_section_header" [| |]; - (* 000001a0 *) - write_intarray os [| 0x2e; 0x72; 0x65; 0x6c; 0x6f; 0x63; 0x00; 0x00; |]; (* ".reloc\000\000" *) - write_i32_as_i32 os reloc_size; (* VirtualSize: Total size of the section when loaded into memory in bytes rounded to Section Alignment. If this value is greater than Size of Raw Data, the section is zero-padded. e.g. 0x0000000c *) - write_i32_as_i32 os reloc_addr; (* VirtualAddress For executable images this is the address of the first byte of the section, when loaded into memory, relative to the image base. e.g. 0x0000c000*) - (* 000001b0 *) - write_i32_as_i32 os reloc_phys_size; (* SizeOfRawData Size of the initialized reloc on disk in bytes, shall be a multiple of FileAlignment from the PE header. If this is less than VirtualSize the remainder of the section is zero filled. Because this field is rounded while the VirtualSize field is not it is possible for this to be greater than VirtualSize as well. When a section contains only uninitialized reloc, this field should be 0. e.g. 0x00000200 *) - write_i32_as_i32 os reloc_phys_loc; (* PointerToRawData QUERY: Why does ECMA say "RVA" here? Offset to section’s first page within the PE file. This shall be a multiple of FileAlignment from the optional header. When a section contains only uninitialized reloc, this field should be 0. e.g. 0x00009800 *) - (* 000001b8 *) - write_i32_as_i32 os 0x00; (* b0 relocptr; b1 relocptr; b2 relocptr; b3 relocptr; *) (* PointerToRelocations RVA of Relocation section. *) - write_i32_as_i32 os 0x00; (* PointerToLinenumbers Always 0 (see Section 23.1). *) - (* 000001c0 *) - write_i32_as_u16 os 0x00; (* b0 numreloc; b1 numreloc; *) (* NumberOfRelocations Number of relocations, set to 0 if unused. *) - write_i32_as_u16 os 0x00; (* NumberOfLinenumbers Always 0 (see Section 23.1). *) - write_intarray os [| 0x40; 0x00; 0x00; 0x42 |]; (* Characteristics Flags: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | *) - - write_padding os "pad to text begin" (text_phys_loc - header_size); - - (* TEXT SECTION: e.g. 0x200 *) - - let textV2P v = v - text_addr + text_phys_loc - - (* e.g. 0x0200 *) - write (Some (textV2P import_addr_tabp.addr)) os "import_addr_table" [| |]; - write_i32_as_i32 os import_name_hint_tabp.addr; - write_i32_as_i32 os 0x00; (* QUERY 4 bytes of zeros not 2 like ECMA 24.3.1 says *) - - (* e.g. 0x0208 *) - - let flags = - (if modul.modulILonly then 0x01 else 0x00) ||| - (if modul.modul32bit then 0x02 else 0x00) ||| - (if (match signer with None -> false | Some s -> signerFullySigned s) then 0x08 else 0x00) - - let headerVersionMajor,headerVersionMinor = headerVersionSupportedByCLRVersion desiredMetadataVersion - - write_padding os "pad to cli header" cli_header_padding - write (Some (textV2P cli_headerp.addr)) os "cli_header" [| |]; - write_i32_as_i32 os 0x48; (* size of header *) - write_i32_as_u16 os headerVersionMajor; (* Major part of minimum version of CLR reqd. *) - write_i32_as_u16 os headerVersionMinor; (* Minor part of minimum version of CLR reqd. ... *) - (* e.g. 0x0210 *) - write_directory os metadatap; - write_i32_as_i32 os flags; - - write_i32_as_i32 os entryPointToken; - write None os "rest of cli header" [| |]; - - (* e.g. 0x0220 *) - write_directory os resourcesp; - write_directory os strongnamep; - (* e.g. 0x0230 *) - write_i32_as_i32 os 0x00; (* code manager table, always 0 *) - write_i32_as_i32 os 0x00; (* code manager table, always 0 *) - write_directory os vtfixupsp; - (* e.g. 0x0240 *) - write_i32_as_i32 os 0x00; (* export addr table jumps, always 0 *) - write_i32_as_i32 os 0x00; (* export addr table jumps, always 0 *) - write_i32_as_i32 os 0x00; (* managed native header, always 0 *) - write_i32_as_i32 os 0x00; (* managed native header, always 0 *) - - write_bytes os code; - write None os "code padding" code_padding; - - write_bytes os metadata; - - (* write 0x80 bytes of empty space for encrypted SHA1 hash, written by SN.EXE or call to signing API *) - if signer <> None then - write (Some (textV2P strongnamep.addr)) os "strongname" (Array.create ( strongnamep.size) 0x0); - - write (Some (textV2P resourcesp.addr)) os "raw resources" [| |]; - write_bytes os resources; - write (Some (textV2P rawdatap.addr)) os "raw data" [| |]; - write_bytes os data; - - write_padding os "start of import_table" import_tabp_pre_padding - - (* vtfixups would go here *) - write (Some (textV2P import_tabp.addr)) os "import_table" [| |]; - - write_i32_as_i32 os import_lookup_tabp.addr; - write_i32_as_i32 os 0x00; - write_i32_as_i32 os 0x00; - write_i32_as_i32 os mscoree_stringp.addr; - write_i32_as_i32 os import_addr_tabp.addr; - write_i32_as_i32 os 0x00; - write_i32_as_i32 os 0x00; - write_i32_as_i32 os 0x00; - write_i32_as_i32 os 0x00; - write_i32_as_i32 os 0x00; - - write (Some (textV2P import_lookup_tabp.addr)) os "import_lookup_table" [| |]; - write_i32_as_i32 os import_name_hint_tabp.addr; - write_i32_as_i32 os 0x00; - write_i32_as_i32 os 0x00; - write_i32_as_i32 os 0x00; - write_i32_as_i32 os 0x00; - - - write (Some (textV2P import_name_hint_tabp.addr)) os "import_name_hint_table" [| |]; - // Two zero bytes of hint, then Case sensitive, null-terminated ASCII string containing name to import. - // Shall _CorExeMain a .exe file _CorDllMain for a .dll file. - (if is_dll then - write_intarray os [| 0x00; 0x00; - 0x5f; 0x43 ; 0x6f; 0x72 ; 0x44; 0x6c ; 0x6c; 0x4d ; 0x61; 0x69 ; 0x6e; 0x00 |] - else - write_intarray os [| 0x00; 0x00; - 0x5f; 0x43 ; 0x6f; 0x72 ; 0x45; 0x78 ; 0x65; 0x4d ; 0x61; 0x69 ; 0x6e; 0x00 |]); - - write (Some (textV2P mscoree_stringp.addr)) os "mscoree string" - [| 0x6d; 0x73; - 0x63; 0x6f ; 0x72; 0x65 ; 0x65; 0x2e ; 0x64; 0x6c ; 0x6c; 0x00 ; |]; - - write_padding os "end of import tab" import_tabp_padding; - - write_padding os "head of entrypoint" 0x03; - let ep = (image_base_real + text_addr) - write (Some (textV2P entrypoint_codep.addr)) os " entrypoint code" - [| 0xFF; 0x25; (* x86 Instructions for entry *) b0 ep; b1 ep; b2 ep; b3 ep |]; - if isItanium then - write (Some (textV2P globalpointer_codep.addr)) os " itanium global pointer" - [| 0x0; 0x0; 0x0; 0x0; 0x0; 0x0; 0x0; 0x0 |]; - - if pdbfile <> None then - write (Some (textV2P debug_directoryp.addr)) os "debug directory" (Array.create sizeof_IMAGE_DEBUG_DIRECTORY 0x0); - - if pdbfile <> None then - write (Some (textV2P debug_datap.addr)) os "debug data" (Array.create ( (debug_datap.size)) 0x0); - - write_padding os "end of .text" (data_phys_loc - text_phys_loc - text_size); - - (* DATA SECTION *) - begin match nativeResources with - | [||] -> () - | resources -> - write (Some (dataV2P native_resourcesp.addr)) os "raw native resources" [| |]; - write_bytes os resources; - end; - - if dummydatap.size <> 0x0 then - write (Some (dataV2P dummydatap.addr)) os "dummy data" [| 0x0 |]; - - write_padding os "end of .rsrc" (reloc_phys_loc - data_phys_loc - data_size); - - (* RELOC SECTION *) - - (* See ECMA 24.3.2 *) - - - let relocV2P v = v - reloc_addr + reloc_phys_loc - - let entrypoint_fixup_addr = entrypoint_codep.addr + 0x02 - let entrypoint_fixup_block = (entrypoint_fixup_addr / 4096) * 4096 - let entrypoint_fixup_offset = entrypoint_fixup_addr - entrypoint_fixup_block - let reloc = (if modul.Is64Bit then 0xA000 (* IMAGE_REL_BASED_DIR64 *) else 0x3000 (* IMAGE_REL_BASED_HIGHLOW *)) ||| entrypoint_fixup_offset - // For the itanium, you need to set a relocation entry for the global pointer - let reloc2 = - if not(isItanium) then - 0x0 - else - 0xA000 ||| (globalpointer_codep.addr - ((globalpointer_codep.addr / 4096) * 4096)) - - write (Some (relocV2P base_reloc_tabp.addr)) os "base_reloc_table" - [| b0 entrypoint_fixup_block; b1 entrypoint_fixup_block; b2 entrypoint_fixup_block; b3 entrypoint_fixup_block; - 0x0c; 0x00; 0x00; 0x00; - b0 reloc; b1 reloc; - b0 reloc2; b1 reloc2; |]; - write_padding os "end of .reloc" (image_end_phys_loc - reloc_phys_loc - reloc_size); - - close_out os; - pdb_data,debug_directoryp,debug_datap,textV2P,mappings - - with e -> (try close_out os; System.IO.File.Delete outfile with _ -> ()); rethrow(); raise e - - - reportTime "Writing Image"; - if logging then dprintn ("Finished writing the binary..."); - - (* Now we've done the bulk of the binary, do the PDB file and fixup the binary. *) - begin match pdbfile with - | None -> () - | Some fpdb when runningOnMono -> warning(Error(NoPDBsOnMonoWarningE.Format,rangeCmdArgs)) ; () - | Some fpdb -> - try - if logging then dprintn ("Now write debug info..."); - - let idd = WritePdbInfo fixupOverlappingSequencePoints outfile fpdb pdb_data - reportTime "Generate PDB Info"; - - (* Now we have the debug data we can go back and fill in the debug directory in the image *) - let os2 = open_out_gen [Open_binary; Open_wronly] 0x777 outfile - try - (* write the IMAGE_DEBUG_DIRECTORY *) - seek_out os2 ( (textV2P debug_directoryp.addr)); - write_i32_as_i32 os2 idd.iddCharacteristics; (* IMAGE_DEBUG_DIRECTORY.Characteristics *) - write_i32_as_i32 os2 timestamp; - write_i32_as_u16 os2 idd.iddMajorVersion; - write_i32_as_u16 os2 idd.iddMinorVersion; - write_i32_as_i32 os2 idd.iddType; - write_i32_as_i32 os2 (Bytes.length idd.iddData); (* IMAGE_DEBUG_DIRECTORY.SizeOfData *) - write_i32_as_i32 os2 debug_datap.addr; (* IMAGE_DEBUG_DIRECTORY.AddressOfRawData *) - write_i32_as_i32 os2 (textV2P debug_datap.addr);(* IMAGE_DEBUG_DIRECTORY.PointerToRawData *) - - (* dprintf "idd.iddCharacteristics = %ld\n" idd.iddCharacteristics; - dprintf "iddMajorVersion = %ld\n" idd.iddMajorVersion; - dprintf "iddMinorVersion = %ld\n" idd.iddMinorVersion; - dprintf "iddType = %ld\n" idd.iddType; - dprintf "iddData = (%A) = %s\n" idd.iddData (Bytes.utf8_bytes_as_string idd.iddData); *) - - (* write the debug raw data as given us by the PDB writer *) - seek_out os2 ( (textV2P debug_datap.addr)); - if debug_datap.size < (Bytes.length idd.iddData) then - failwith "Debug data area is not big enough. Debug info may not be usable"; - let len = min ( (debug_datap.size)) (Bytes.length idd.iddData) - write_bytes os2 idd.iddData; - close_out os2; - with e -> - failwith ("Error while writing debug directory entry: "^e.Message); - (try close_out os2; System.IO.File.Delete outfile with _ -> ()); - rethrow() - with e -> - rethrow() - - end; - reportTime "Finalize PDB"; - - (* Sign the binary. No further changes to binary allowed past this point! *) - begin match signer with - | None -> () - | Some s -> - if logging then dprintn ("Now sign the binary..."); - try - signerSignFile outfile s; signerClose s - with e -> - failwith ("Warning: A call to StrongNameSignatureGeneration failed ("^e.Message^")"); - (try signerClose s with _ -> ()); - (try System.IO.File.Delete outfile with _ -> ()); - () - end; - reportTime "Signing Image"; - if logging then dprintn ("Finished writing and signing the binary and debug info..."); - - mappings - - -type options = - { mscorlib: ILScopeRef; - pdbfile: string option; - signer: signer option; - fixupOverlappingSequencePoints: bool } - - -let WriteILBinary outfile args modul = - ignore (write_binary_internal outfile args.mscorlib args.pdbfile args.signer args.fixupOverlappingSequencePoints modul) - - - -(****************************************************** -** Notes on supporting the Itanium (jopamer) ** -******************************************************* -IA64 codegen on the CLR isn’t documented, and getting it working involved a certain amount of reverse-engineering -peverify.exe and various binaries generated by ILAsm and other managed compiles. Here are some lessons learned, -documented for posterity and the 0 other people writing managed compilers for the Itanium: - -- Even if you’re not utilizing the global pointer in your Itanium binary, -you should be setting aside space for it in .text. (Preferably near the native stub.) -- PEVerify checks for two .reloc table entries on the Itanium - one for the native stub, and one -for the global pointer RVA. It doesn’t matter what you set these values to - -their addresses can be zeroed out, but they must have IMAGE_REL_BASED_DIR64 set! -(So, yes, you may find yourself setting this flag on an empty, unnecessary table slot!) -- On the Itanium, it’s best to have your tables qword aligned. (Though, peverify checks for dword alignment.) -- A different, weird set of DLL characteristics are necessary for the Itanium. -I won’t detail them here, but it’s interesting given that this field isn’t supposed to vary between platforms, -and is supposedly marked as deprecated. -- There are two schools to generating CLR binaries on for the Itanium - I’ll call them the “ALink” school -and the “ILAsm” school. - - The ALink school relies on some quirks in the CLR to omit a lot of stuff that, admittedly, isn’t necessary. The binaries are basically IL-only, with some flags set to make them nominally Itanium: - - It omits the .reloc table - - It doesn’t set aside memory for global pointer storage - - There’s no native stub - - There’s no import table, mscoree reference / startup symbol hint - - A manifest is inserted by default. - These omissions are understandable, given the platform/jitting/capabilities of the language, - but they’re basically relying on an idiosyncracy of the runtime to get away with creating a “bad” binary. - - - The ILAsm school actually writes everything out: - - It has a reloc table with the requisite two entries - - It sets aside memory for a global pointer, even if it doesn’t utilize one - - It actually inserts a native stub for the Itanium! (Though, I have no idea what - instructions, specifically, are emitted, and I couldn’t dig up the sources to ILAsm to - find out) - - There’s the requisite mscoree reference, etc. - - No manifest is inserted -*******************************************************) diff --git a/tools/FSharp_1.9.6.16/source/absil/ilwrite.mli b/tools/FSharp_1.9.6.16/source/absil/ilwrite.mli deleted file mode 100644 index d0324e45..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilwrite.mli +++ /dev/null @@ -1,43 +0,0 @@ -(* -------------------------------------------------------------------- - * (c) Microsoft Corporation. All rights reserved - * -------------------------------------------------------------------- *) - -/// The IL Binary writer -module Microsoft.FSharp.Compiler.AbstractIL.BinaryWriter - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL - -open Il - -type signer - -type options = - { mscorlib: ILScopeRef; - pdbfile: string option; - signer : signer option; - fixupOverlappingSequencePoints : bool } - -/// Write a binary to the file system. Extra configuration parameters can also be specified. -val WriteILBinary: - filename: string -> - options: options -> - input: ILModuleDef -> - unit - -val signerPublicKey: signer -> byte[] -val signerOpenPublicKeyFile: string -> signer -val signerOpenPublicKey: byte[] -> signer -val signerOpenKeyPairFile: string -> signer -val signerOpenKeyContainer: string -> signer -val signerClose: signer -> unit -val signerSignatureSize: signer -> int -val signerSignFile: string -> signer -> unit -val signerFullySigned: signer -> bool - -/// If this is set a report of times is sent to the Ildiag diagnostics channel -val showTimes : bool ref - - diff --git a/tools/FSharp_1.9.6.16/source/absil/ilx.ml b/tools/FSharp_1.9.6.16/source/absil/ilx.ml deleted file mode 100644 index 2cdd8e6c..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilx.ml +++ /dev/null @@ -1,212 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. -/// Defines an extension of the IL algebra -module (* internal *) Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL -module Illib = Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -open Illib -open Il - -(* -------------------------------------------------------------------- - * Define an extension of the IL instruction algebra - * -------------------------------------------------------------------- *) - -type IlxUnionAlternative = - { altName: string; - altFields: ILFieldDef array; - altCustomAttrs: ILAttributes } - -and IlxUnionRef = IlxUnionRef of ILTypeRef * IlxUnionAlternative array * bool -and IlxUnionSpec = IlxUnionSpec of IlxUnionRef * ILGenericArgs - -and IlxClosureLambdas = - | Lambdas_forall of ILGenericParameterDef * IlxClosureLambdas - | Lambdas_lambda of ILParameter * IlxClosureLambdas - | Lambdas_return of ILType -and IlxClosureRef = IlxClosureRef of ILTypeRef * IlxClosureLambdas * IlxClosureFreeVar list -and IlxClosureSpec = IlxClosureSpec of IlxClosureRef * ILGenericArgs - -and IlxClosureFreeVar = - { fvName: string ; fvCompilerGenerated:bool; fvType: ILType } -let mk_freevar (name,compgen,ty) = - { fvName=name; - fvCompilerGenerated=compgen; - fvType=ty; } -let typ_of_freevar p = p.fvType -let name_of_freevar p = p.fvName - -type IlxClosureApps = - | Apps_tyapp of ILType * IlxClosureApps - | Apps_app of ILType * IlxClosureApps - | Apps_done of ILType - -type IlxInstr = - // Discriminated unions - | EI_lddata of IlxUnionSpec * int * int - | EI_isdata of IlxUnionSpec * int - | EI_brisdata of IlxUnionSpec * int * ILCodeLabel * ILCodeLabel - | EI_castdata of bool * IlxUnionSpec * int - | EI_stdata of IlxUnionSpec * int * int - | EI_datacase of (bool * IlxUnionSpec * (int * ILCodeLabel) list * ILCodeLabel) (* last label is fallthrough, bool is whether to leave value on the stack for each case *) - | EI_lddatatag of IlxUnionSpec - | EI_newdata of IlxUnionSpec * int - - // Closures - | EI_newclo of IlxClosureSpec - | EI_castclo of IlxClosureSpec - | EI_isclo of IlxClosureSpec - | EI_callclo of Tailcall * IlxClosureSpec * IlxClosureApps - | EI_stclofld of (IlxClosureSpec * int) (* nb. leave these brackets *) - | EI_stenv of int - | EI_ldenv of int - | EI_ldenva of int - | EI_callfunc of Tailcall * IlxClosureApps - | EI_ldftn_then_call of ILMethodSpec * (Tailcall * ILMethodSpec * varargs) (* special: for internal use only *) - | EI_ld_instance_ftn_then_newobj of ILMethodSpec * ILCallingSignature * (ILMethodSpec * varargs) (* special: for internal use only *) - -let destinations_of_IlxInstr i = - match i with - | (EI_brisdata (_,_,l1,l2)) -> [l1; l2] - | (EI_callfunc (Tailcall,_)) | (EI_callclo (Tailcall,_,_)) -> [] - | (EI_datacase (_,_,ls,l)) -> l:: (List.foldBack (fun (_,l) acc -> ListSet.insert l acc) ls []) - | _ -> [] - -let fallthrough_of_IlxInstr i = - match i with - | (EI_brisdata (_,_,_,l)) - | (EI_datacase (_,_,_,l)) -> Some l - | _ -> None - -let IlxInstr_is_tailcall i = - match i with - | (EI_callfunc (Tailcall,_)) | (EI_callclo (Tailcall,_,_)) -> true - | _ -> false - -let remap_ilx_labels lab2cl i = - match i with - | EI_brisdata (a,b,l1,l2) -> EI_brisdata (a,b,lab2cl l1,lab2cl l2) - | EI_datacase (b,x,ls,l) -> EI_datacase (b,x,List.map (fun (y,l) -> (y,lab2cl l)) ls, lab2cl l) - | _ -> i - -let (mk_ilx_ext_instr,is_ilx_ext_instr,dest_ilx_ext_instr) = - define_instr_extension - { instrExtDests=destinations_of_IlxInstr; - instrExtFallthrough=fallthrough_of_IlxInstr; - instrExtIsTailcall=IlxInstr_is_tailcall; - instrExtRelabel=remap_ilx_labels; } - -let mk_IlxInstr i = I_other (mk_ilx_ext_instr i) - -// Define an extension of the IL algebra of type definitions -type IlxClosureInfo = - { cloStructure: IlxClosureLambdas; - cloFreeVars: IlxClosureFreeVar list; - cloCode: (ILMethodBody Lazy.t); - cloSource: ILSourceMarker option} - -and IlxUnionInfo = - { cudReprAccess: ILMemberAccess; (* is the representation public? *) - cudHelpersAccess: ILMemberAccess; (* are the representation public? *) - cudHelpers: bool; (* generate the helpers? *) - cudDebugProxies: bool; (* generate the helpers? *) - cudDebugDisplayAttributes: ILAttribute list; - cudAlternatives: IlxUnionAlternative array; - cudNullPermitted: bool; - (* debug info for generated code for classunions *) - cudWhere: ILSourceMarker option; } - -type IlxTypeDefKind = - | ETypeDef_closure of IlxClosureInfo - | ETypeDef_classunion of IlxUnionInfo - - -let (mk_ilx_ext_type_def_kind,is_ilx_ext_type_def_kind,dest_ilx_ext_type_def_kind) = - (define_type_def_kind_extension Type_def_kind_extension : (IlxTypeDefKind -> IlxExtensionTypeKind) * (IlxExtensionTypeKind -> bool) * (IlxExtensionTypeKind -> IlxTypeDefKind) ) - -let mk_IlxTypeDefKind i = TypeDef_other (mk_ilx_ext_type_def_kind i) - -(* -------------------------------------------------------------------- - * Define these as extensions of the IL types - * -------------------------------------------------------------------- *) - -let dest_func_app = function Apps_app (d,r) -> d,r | _ -> failwith "dest_func_app" -let dest_tyfunc_app = function Apps_tyapp (b,c) -> b,c | _ -> failwith "dest_tyfunc_app" - -let gen_mk_array_ty (shape,ty) = Type_array(shape,ty) - -let gen_is_array_ty ty = - match ty with - Type_array _ -> true - | _ -> false - -let gen_dest_array_ty ty = - match ty with - | Type_array(shape,ty) -> (shape,ty) - | _ -> failwith "gen_dest_array_ty" - - -let mk_array_ty_old (shape,ty) = gen_mk_array_ty (shape,ty) - - -(* -------------------------------------------------------------------- - * MS-ILX: Closures - * -------------------------------------------------------------------- *) - -let rec inst_apps_aux n inst = function - Apps_tyapp (ty,rty) -> Apps_tyapp(inst_typ_aux n inst ty, inst_apps_aux n inst rty) - | Apps_app (dty,rty) -> Apps_app(inst_typ_aux n inst dty, inst_apps_aux n inst rty) - | Apps_done rty -> Apps_done(inst_typ_aux n inst rty) - -let rec inst_lambdas_aux n inst = function - | Lambdas_forall (b,rty) -> - Lambdas_forall(b, inst_lambdas_aux n inst rty) - | Lambdas_lambda (p,rty) -> - Lambdas_lambda({ p with paramType=inst_typ_aux n inst p.paramType},inst_lambdas_aux n inst rty) - | Lambdas_return rty -> Lambdas_return(inst_typ_aux n inst rty) - -let inst_lambdas i t = inst_lambdas_aux 0 i t - -let cloref_of_clospec (IlxClosureSpec(cloref,_)) = cloref - -let tref_of_clospec (IlxClosureSpec(IlxClosureRef(tref,_,_),_)) = tref -let formal_freevar_type_of_cloref (IlxClosureRef(_,_,fvs)) n = - typ_of_freevar (List.nth fvs n) -let formal_freevar_type_of_clospec x n = formal_freevar_type_of_cloref (cloref_of_clospec x) n -let actual_freevar_type_of_clospec (IlxClosureSpec(cloref,inst)) n = - inst_typ inst (formal_freevar_type_of_cloref cloref n) -let actual_freevars_of_clospec (IlxClosureSpec(IlxClosureRef(_,_,fvs),inst)) = - List.map (fun fv -> {fv with fvType = inst_typ inst fv.fvType}) fvs -let formal_freevars_of_clospec (IlxClosureSpec(IlxClosureRef(_,_,fvs),inst)) = fvs -let actual_lambdas_of_clospec (IlxClosureSpec(IlxClosureRef(_,lambdas,_),inst)) = inst_lambdas inst lambdas -let formal_lambdas_of_clospec (IlxClosureSpec(IlxClosureRef(_,lambdas,_),_)) = lambdas -let inst_of_clospec (IlxClosureSpec(_,inst)) = inst -let generalize_cloref gparams csig = IlxClosureSpec(csig, generalize_gparams gparams) - - - -(* -------------------------------------------------------------------- - * MS-ILX: Unions - * -------------------------------------------------------------------- *) - -let objtype_of_cuspec (IlxUnionSpec(IlxUnionRef(tref,_,_),inst)) = mk_boxed_typ tref inst -let tref_of_cuspec (IlxUnionSpec(IlxUnionRef(tref,_,_),inst)) = tref -let inst_of_cuspec (IlxUnionSpec(_,inst)) = inst -let altsarray_of_cuspec (IlxUnionSpec(IlxUnionRef(tref,alts,_),inst)) = alts -let nullPermitted_of_cuspec (IlxUnionSpec(IlxUnionRef(_,_,np),inst)) = np -let alts_of_cuspec cuspec = Array.to_list (altsarray_of_cuspec cuspec) -let alt_of_cuspec cuspec n = (altsarray_of_cuspec cuspec).[n] - -let alt_is_nullary alt = (alt.altFields.Length = 0) -let fdefs_of_alt alt = alt.altFields -let name_of_alt alt = alt.altName -let fdef_of_alt alt fidx = (fdefs_of_alt alt).[fidx] - -let fdef_of_cuspec cuspec idx fidx = fdef_of_alt (alt_of_cuspec cuspec idx) fidx - -let actual_typ_of_cuspec_field cuspec idx fidx = - inst_typ (inst_of_cuspec cuspec) (fdef_of_cuspec cuspec idx fidx).fdType - diff --git a/tools/FSharp_1.9.6.16/source/absil/ilx.mli b/tools/FSharp_1.9.6.16/source/absil/ilx.mli deleted file mode 100644 index ee0096f8..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/ilx.mli +++ /dev/null @@ -1,161 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -/// ILX extensions to Abstract IL types and instructions F# -module (* internal *) Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL - -open Il - -(* -------------------------------------------------------------------- - * Union and closure references - * -------------------------------------------------------------------- *) - -type IlxUnionAlternative = - { altName: string; - altFields: ILFieldDef array; - altCustomAttrs: ILAttributes } - -and IlxUnionRef = IlxUnionRef of ILTypeRef * IlxUnionAlternative array * bool (* cudNullPermitted *) -and IlxUnionSpec = IlxUnionSpec of IlxUnionRef * ILGenericArgs - -and IlxClosureLambdas = - | Lambdas_forall of ILGenericParameterDef * IlxClosureLambdas - | Lambdas_lambda of ILParameter * IlxClosureLambdas - | Lambdas_return of ILType -and IlxClosureRef = IlxClosureRef of ILTypeRef * IlxClosureLambdas * IlxClosureFreeVar list -and IlxClosureSpec = IlxClosureSpec of IlxClosureRef * ILGenericArgs -and IlxClosureFreeVar = - { fvName: string ; - fvCompilerGenerated:bool; - fvType: ILType } - - -/// IlxClosureApps - i.e. types being applied at a callsite -type IlxClosureApps = - | Apps_tyapp of ILType * IlxClosureApps - | Apps_app of ILType * IlxClosureApps - | Apps_done of ILType - -/// ILX extensions to the intruction set -/// - -type IlxInstr = - | EI_lddata of IlxUnionSpec * int * int - | EI_isdata of IlxUnionSpec * int - | EI_brisdata of IlxUnionSpec * int * ILCodeLabel * ILCodeLabel - | EI_castdata of bool * IlxUnionSpec * int - | EI_stdata of IlxUnionSpec * int * int - | EI_datacase of (bool * IlxUnionSpec * (int * ILCodeLabel) list * ILCodeLabel) (* last label is fallthrough, bool is whether to leave value on the stack for each case *) - | EI_lddatatag of IlxUnionSpec - | EI_newdata of IlxUnionSpec * int - | EI_newclo of IlxClosureSpec - | EI_castclo of IlxClosureSpec - | EI_isclo of IlxClosureSpec - | EI_callclo of Tailcall * IlxClosureSpec * IlxClosureApps - | EI_stclofld of (IlxClosureSpec * int) - | EI_stenv of int - | EI_ldenv of int - | EI_ldenva of int - | EI_callfunc of Tailcall * IlxClosureApps - | EI_ldftn_then_call of ILMethodSpec * (Tailcall * ILMethodSpec * varargs) (* special: for internal use only *) - | EI_ld_instance_ftn_then_newobj of ILMethodSpec * ILCallingSignature * (ILMethodSpec * varargs) (* special: for internal use only *) - -val mk_ilx_ext_instr: (IlxInstr -> IlxExtensionInstr) -val is_ilx_ext_instr: (IlxExtensionInstr -> bool) -val dest_ilx_ext_instr: (IlxExtensionInstr -> IlxInstr) - -val mk_IlxInstr: IlxInstr -> ILInstr - -// -------------------------------------------------------------------- -// ILX extensions to the kinds of type definitions available -// -------------------------------------------------------------------- - -type IlxClosureInfo = - { cloStructure: IlxClosureLambdas; - cloFreeVars: IlxClosureFreeVar list; - cloCode: (ILMethodBody Lazy.t); - cloSource: ILSourceMarker option} - -and IlxUnionInfo = - { /// Is the representation public? - cudReprAccess: ILMemberAccess; - /// Are the representation helpers public? - cudHelpersAccess: ILMemberAccess; - /// Generate the helpers? - cudHelpers: bool; - cudDebugProxies: bool; - cudDebugDisplayAttributes: ILAttribute list; - cudAlternatives: IlxUnionAlternative array; - cudNullPermitted: bool; - /// Debug info for generated code for classunions - cudWhere: ILSourceMarker option; - } - -type IlxTypeDefKind = - | ETypeDef_closure of IlxClosureInfo - | ETypeDef_classunion of IlxUnionInfo - -val mk_ilx_ext_type_def_kind: (IlxTypeDefKind -> IlxExtensionTypeKind) -val is_ilx_ext_type_def_kind: (IlxExtensionTypeKind -> bool) -val dest_ilx_ext_type_def_kind: (IlxExtensionTypeKind -> IlxTypeDefKind) - -val mk_IlxTypeDefKind: IlxTypeDefKind -> ILTypeDefKind - -(* -------------------------------------------------------------------- - * These are now obsolete - * -------------------------------------------------------------------- *) - -val mk_array_ty_old: ILArrayShape * ILType -> ILType -val gen_mk_array_ty: ILArrayShape * ILType -> ILType -val gen_is_array_ty: ILType -> bool -val gen_dest_array_ty: ILType -> ILArrayShape * ILType - -(* -------------------------------------------------------------------- - * MS-ILX constructs: Closures, thunks, classunions - * -------------------------------------------------------------------- *) -val inst_apps_aux: int -> ILGenericArgs -> IlxClosureApps -> IlxClosureApps -val dest_func_app: IlxClosureApps -> ILType * IlxClosureApps -val dest_tyfunc_app: IlxClosureApps -> ILType * IlxClosureApps - -val formal_freevar_type_of_cloref : IlxClosureRef -> int -> ILType - -val tref_of_clospec : IlxClosureSpec -> ILTypeRef -val cloref_of_clospec : IlxClosureSpec -> IlxClosureRef -val formal_freevar_type_of_clospec: IlxClosureSpec -> int -> ILType -val actual_freevar_type_of_clospec: IlxClosureSpec -> int -> ILType -val formal_freevars_of_clospec : IlxClosureSpec -> IlxClosureFreeVar list -val actual_freevars_of_clospec : IlxClosureSpec -> IlxClosureFreeVar list -val actual_lambdas_of_clospec : IlxClosureSpec -> IlxClosureLambdas -val formal_lambdas_of_clospec : IlxClosureSpec -> IlxClosureLambdas -val inst_of_clospec : IlxClosureSpec -> ILGenericArgs - -val generalize_cloref: ILGenericParameterDefs -> IlxClosureRef -> IlxClosureSpec - - -(* -------------------------------------------------------------------- - * MS-ILX: Unions - * -------------------------------------------------------------------- *) - -val objtype_of_cuspec : IlxUnionSpec -> ILType -val inst_of_cuspec : IlxUnionSpec -> ILGenericArgs -val alts_of_cuspec : IlxUnionSpec -> IlxUnionAlternative list -val altsarray_of_cuspec : IlxUnionSpec -> IlxUnionAlternative array -val tref_of_cuspec : IlxUnionSpec -> ILTypeRef -val nullPermitted_of_cuspec : IlxUnionSpec -> bool - -val actual_typ_of_cuspec_field: IlxUnionSpec -> int -> int -> ILType -val alt_of_cuspec : IlxUnionSpec -> int -> IlxUnionAlternative -val fdef_of_cuspec : IlxUnionSpec -> int -> int -> ILFieldDef - -val fdefs_of_alt : IlxUnionAlternative -> ILFieldDef array -val fdef_of_alt : IlxUnionAlternative -> int -> ILFieldDef -val name_of_alt : IlxUnionAlternative -> string -val alt_is_nullary: IlxUnionAlternative -> bool - -val mk_freevar: string * bool * ILType -> IlxClosureFreeVar -val name_of_freevar: IlxClosureFreeVar -> string -val typ_of_freevar: IlxClosureFreeVar -> ILType diff --git a/tools/FSharp_1.9.6.16/source/absil/zmap.ml b/tools/FSharp_1.9.6.16/source/absil/zmap.ml deleted file mode 100644 index 214d3e57..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/zmap.ml +++ /dev/null @@ -1,46 +0,0 @@ -(* (c) Microsoft Corporation. All rights reserved *) - -module Microsoft.FSharp.Compiler.AbstractIL.Internal.Zmap - -open Internal.Utilities.Collections.Tagged -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -type 'a order = 'a -> 'a -> int - -type map<'key,'a> = Internal.Utilities.Collections.Tagged.Map<'key,'a> -type ('key,'a) t = map<'key,'a> - -let empty (ord : 'a order) = Internal.Utilities.Collections.Tagged.Map<_,_,_>.Empty(ComparisonIdentity.FromFunction(ord)) -let add k v (m:map<_,_>) = m.Add(k,v) -let find k (m:map<_,_>) = m.[k] -let tryfind k (m:map<_,_>) = m.TryFind(k) -let remove k (m:map<_,_>) = m.Remove(k) -let mem k (m:map<_,_>) = m.ContainsKey(k) -let iter f (m:map<_,_>) = m.Iterate(f) -let first f (m:map<_,_>) = m.First(fun k v -> if f k v then Some (k,v) else None) -let exists f (m:map<_,_>) = m.Exists(f) -let forall f (m:map<_,_>) = m.ForAll(f) -let map f (m:map<_,_>) = m.MapRange(f) -let mapi f (m:map<_,_>) = m.Map(f) -let fold f (m:map<_,_>) x = m.Fold f x -let to_list (m:map<_,_>) = m.ToList() -let fold_section lo hi f (m:map<_,_>) x = m.FoldSection lo hi f x - -let is_empty (m:map<_,_>) = m.IsEmpty - -let fmap f z (m:map<_,_>) = - let m,z = m.FoldAndMap (fun k v z -> let z,v' = f z k v in v',z) z in - z,m - -let choose f (m:map<_,_>) = m.First(f) - -let chooseL f (m:map<_,_>) = - m.Fold (fun k v s -> match f k v with None -> s | Some x -> x::s) [] - -let of_list m xs = List.fold (fun m (k,v) -> add k v m) (empty m) xs -let of_FlatList m xs = FlatList.fold (fun m (k,v) -> add k v m) (empty m) xs - -let keys m = chooseL (fun k v -> Some k) m -let values m = chooseL (fun k v -> Some v) m - -let mem_of m k = mem k m diff --git a/tools/FSharp_1.9.6.16/source/absil/zmap.mli b/tools/FSharp_1.9.6.16/source/absil/zmap.mli deleted file mode 100644 index 735df5d7..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/zmap.mli +++ /dev/null @@ -1,45 +0,0 @@ -(* (c) Microsoft Corporation. All rights reserved *) - -module Microsoft.FSharp.Compiler.AbstractIL.Internal.Zmap - -open Internal.Utilities.Collections.Tagged -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -type 'a order = 'a -> 'a -> int - -/// Maps with a specific comparison function -type ('key,'a) map = Internal.Utilities.Collections.Tagged.Map<'key,'a> -type ('key,'a) t = ('key,'a) map - - -val empty : 'key order -> ('key,'a) t -val is_empty : ('key,'a) t -> bool - -val add : 'key -> 'a -> ('key,'a) t -> ('key,'a) t -val remove : 'key -> ('key,'a) t -> ('key,'a) t -val mem : 'key -> ('key,'a) t -> bool -val mem_of : ('key,'a) t -> 'key -> bool -val tryfind : 'key -> ('key,'a) t -> 'a option -val find : 'key -> ('key,'a) t -> 'a (* or raises Not_found *) - -val map : mapping:('a -> 'b) -> ('key,'a) t -> ('key,'b) t -val mapi : ('key -> 'a -> 'b) -> ('key,'a) t -> ('key,'b) t -val fold : ('key -> 'a -> 'b -> 'b) -> ('key,'a) t -> 'b -> 'b -val fmap : ('z -> 'key -> 'a -> 'z * 'b) -> 'z -> ('key,'a) t -> 'z * ('key,'b) t -val iter : action:('a -> 'b -> unit) -> ('a, 'b) map -> unit - -val fold_section: 'key -> 'key -> ('key -> 'a -> 'b -> 'b) -> ('key,'a) t -> 'b -> 'b - -val first : ('key -> 'a -> bool) -> ('key,'a) t -> ('key * 'a) option -val exists : ('key -> 'a -> bool) -> ('key,'a) t -> bool -val forall : ('key -> 'a -> bool) -> ('key,'a) t -> bool - -val choose : ('key -> 'a -> 'b option) -> ('key,'a) t -> 'b option -val chooseL : ('key -> 'a -> 'b option) -> ('key,'a) t -> 'b list - -val to_list : ('key,'a) t -> ('key * 'a) list -val of_list : 'key order -> ('key * 'a) list -> ('key,'a) t -val of_FlatList : 'key order -> FlatList<'key * 'a> -> ('key,'a) t - -val keys : ('key,'a) t -> 'key list -val values : ('key,'a) t -> 'a list diff --git a/tools/FSharp_1.9.6.16/source/absil/zset.ml b/tools/FSharp_1.9.6.16/source/absil/zset.ml deleted file mode 100644 index 3d5c43b5..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/zset.ml +++ /dev/null @@ -1,42 +0,0 @@ -(* (c) Microsoft Corporation. All rights reserved *) - -module Microsoft.FSharp.Compiler.AbstractIL.Internal.Zset - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Internal.Utilities.Collections.Tagged - -type 'a order = 'a -> 'a -> int - -type set<'a> = Internal.Utilities.Collections.Tagged.Set<'a > -type 'a t = set<'a> - -let empty (ord : 'a order) = Internal.Utilities.Collections.Tagged.Set<_,_>.Empty(ComparisonIdentity.FromFunction ord) - -let is_empty (s:set<_>) = s.IsEmpty - -let mem x (s:set<_>) = s.Contains(x) -let add x (s:set<_>) = s.Add(x) -let addList xs a = List.fold (fun a x -> add x a) a xs -let addFlatList xs a = FlatList.fold (fun a x -> add x a) a xs - -let singleton ord x = add x (empty ord) -let remove x (s:set<_>) = s.Remove(x) - -let fold (f : 'a -> 'b -> 'b) (s:set<_>) b = s.Fold f b -let iter f (s:set<_>) = s.Iterate f -let for_all p (s:set<_>) = s.ForAll p -let count (s:set<_>) = s.Count -let forall p (s:set<_>) = s.ForAll p -let exists p (s:set<_>) = s.Exists p -let subset (s1:set<_>) (s2:set<_>) = s1.IsSubsetOf s2 -let equal (s1:set<_>) (s2:set<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Equality(s1,s2) -let elements (s:set<_>) = s.ToList() -let filter p (s:set<_>) = s.Filter p - -let union (s1:set<_>) (s2:set<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Union(s1,s2) -let inter (s1:set<_>) (s2:set<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Intersection(s1,s2) -let diff (s1:set<_>) (s2:set<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Difference(s1,s2) - -let mem_of m k = mem k m diff --git a/tools/FSharp_1.9.6.16/source/absil/zset.mli b/tools/FSharp_1.9.6.16/source/absil/zset.mli deleted file mode 100644 index 805dc9c1..00000000 --- a/tools/FSharp_1.9.6.16/source/absil/zset.mli +++ /dev/null @@ -1,41 +0,0 @@ -(* (c) Microsoft Corporation. All rights reserved *) - -module Microsoft.FSharp.Compiler.AbstractIL.Internal.Zset - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -type 'a order = 'a -> 'a -> int - -/// Sets with a specific comparison function -type 'a set = Internal.Utilities.Collections.Tagged.Set<'a> -type 'a t = 'a set - -val empty : 'a order -> 'a t -val is_empty : 'a t -> bool -val mem : 'a -> 'a t -> bool -val mem_of : 'a t -> 'a -> bool -val add : 'a -> 'a t -> 'a t -val addList : 'a list -> 'a t -> 'a t -val addFlatList : FlatList<'a> -> 'a t -> 'a t -val singleton : 'a order -> 'a -> 'a t -val remove : 'a -> 'a t -> 'a t - -val count : 'a t -> int -val union : 'a t -> 'a t -> 'a t -val inter : 'a t -> 'a t -> 'a t -val diff : 'a t -> 'a t -> 'a t -val equal : 'a t -> 'a t -> bool -val subset : 'a t -> 'a t -> bool -val for_all : predicate:('a -> bool) -> 'a t -> bool -val forall : predicate:('a -> bool) -> 'a t -> bool -val exists : predicate:('a -> bool) -> 'a t -> bool -val filter : predicate:('a -> bool) -> 'a t -> 'a t - -val fold : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b -val iter : ('a -> unit) -> 'a t -> unit - -val elements : 'a t -> 'a list - - - diff --git a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Build.dll.fs b/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Build.dll.fs deleted file mode 100644 index 51546c13..00000000 --- a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Build.dll.fs +++ /dev/null @@ -1,9 +0,0 @@ -#light -namespace Microsoft.FSharp -open System.Reflection -[] -[] -[] -[] -[] -do() diff --git a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs b/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs deleted file mode 100644 index 4273112f..00000000 --- a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs +++ /dev/null @@ -1,9 +0,0 @@ -#light -namespace Microsoft.FSharp -open System.Reflection -[] -[] -[] -[] -[] -do() diff --git a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Compiler.Server.Shared.dll.fs b/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Compiler.Server.Shared.dll.fs deleted file mode 100644 index 0f600403..00000000 --- a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Compiler.Server.Shared.dll.fs +++ /dev/null @@ -1,18 +0,0 @@ -#light -namespace Microsoft.FSharp -open System.Reflection - -#if NO_STRONG_NAMES -[] -[] -#else -[] -[] -[] -[] -[] - -[] -[] -#endif -do() diff --git a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Compiler.dll.fs b/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Compiler.dll.fs deleted file mode 100644 index 5d69adf0..00000000 --- a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Compiler.dll.fs +++ /dev/null @@ -1,44 +0,0 @@ -#light -namespace Microsoft.FSharp -open System.Reflection -#if NO_STRONG_NAMES -[] -[] -[] -[] -[] -[] -[] -[] - -// Note: internals visible to unit test DLLs in Retail (and all) builds. -[] -[] -[] -#else -[] -[] -[] -[] -[] - -[] -[] -[] -[] -[] -[] -[] -[] - -// Note: internals visible to unit test DLLs in Retail (and all) builds. -[] -[] -[] -#endif - -#if DEBUG -// excluded from Retail -[] -#endif -do() diff --git a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Core.dll.fs b/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Core.dll.fs deleted file mode 100644 index 185d08a6..00000000 --- a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.FSharp.Core.dll.fs +++ /dev/null @@ -1,9 +0,0 @@ -#light -namespace Microsoft.FSharp -open System.Reflection -[] -[] -[] -[] -[] -do() diff --git a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.fsc.exe.fs b/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.fsc.exe.fs deleted file mode 100644 index 58656d50..00000000 --- a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.fsc.exe.fs +++ /dev/null @@ -1,9 +0,0 @@ -#light -namespace Microsoft.FSharp -open System.Reflection -[] -[] -[] -[] -[] -do() diff --git a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.fsi.exe.fs b/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.fsi.exe.fs deleted file mode 100644 index 63c760aa..00000000 --- a/tools/FSharp_1.9.6.16/source/assemblyinfo/assemblyinfo.fsi.exe.fs +++ /dev/null @@ -1,9 +0,0 @@ -#light -namespace Microsoft.FSharp -open System.Reflection -[] -[] -[] -[] -[] -do() diff --git a/tools/FSharp_1.9.6.16/source/fsharp-compiler-build.proj b/tools/FSharp_1.9.6.16/source/fsharp-compiler-build.proj deleted file mode 100644 index 76428761..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp-compiler-build.proj +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp-proto-build.proj b/tools/FSharp_1.9.6.16/source/fsharp-proto-build.proj deleted file mode 100644 index 35ba6a54..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp-proto-build.proj +++ /dev/null @@ -1,23 +0,0 @@ - - - - Proto - - - - - - - - - - - - - - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/ErrorLogger.fs b/tools/FSharp_1.9.6.16/source/fsharp/ErrorLogger.fs deleted file mode 100644 index 22ef3104..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/ErrorLogger.fs +++ /dev/null @@ -1,264 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module (* internal *) Microsoft.FSharp.Compiler.ErrorLogger - -open Internal.Utilities -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Range - -(*------------------------------------------------------------------------ - * General error recovery mechanism - *-----------------------------------------------------------------------*) - -/// Thrown when want to add some range information to some .NET exception -exception WrappedError of exn * range - -/// Thrown when immediate, local error recovery is not possible. This indicates -/// we've reported an error but need to make a non-local transfer of control. -/// Error recovery may catch this and continue (see 'errorRecovery') -exception ReportedError - -/// Thrown when we stop processing the F# Interactive interactive entry or #load. -exception StopProcessing - - -(* common error kinds *) -exception Error of string * range -exception InternalError of string * range -exception OCamlCompatibility of string * range -exception LibraryUseOnly of range -exception Deprecated of string * range -exception Experimental of string * range -exception PossibleUnverifiableCode of range - - -// Range\NoRange Duals -exception UnresolvedReferenceNoRange of (*assemblyname*) string -exception UnresolvedReferenceError of (*assemblyname*) string * range -exception UnresolvedPathReferenceNoRange of (*assemblyname*) string * (*path*) string -exception UnresolvedPathReference of (*assemblyname*) string * (*path*) string * range - -// Attach a range if this is a range dual exception. -let rec AttachRange m (exn:exn) = - if m = range0 then exn - else - match exn with - // Strip TargetInvocationException wrappers - | :? System.Reflection.TargetInvocationException -> AttachRange m exn.InnerException - | UnresolvedReferenceNoRange(a) -> UnresolvedReferenceError(a,m) - | UnresolvedPathReferenceNoRange(a,p) -> UnresolvedPathReference(a,p,m) - | Failure(msg) -> InternalError(msg^" (Failure)",m) - | InvalidArgument(msg) -> InternalError(msg^" (InvalidArgument)",m) - | notARangeDual -> notARangeDual - -//---------------------------------------------------------------------------- -// Error logger interface - -type Exiter = - abstract Exit : int -> 'a - -let QuitProcessExiter = - { new Exiter with - member x.Exit(n) = - try - System.Environment.Exit(n) - with _ -> - () - failwith "System.Environment.Exit did not exit!" } - -type ErrorLogger = - abstract ErrorCount: int; - abstract WarnSink: exn->unit; - abstract ErrorSink: exn->unit - -[] -module ErrorLoggerExtensions = - open System.Reflection - - // Instruct the exception not to reset itself when thrown again. - // Why don’t we just not catch these in the first place? Because we made the design choice to ask the user to send mail to fsbugs@microsoft.com. - // To achieve this, we need to catch the exception, report the email address and stack trace, and then rethrow. - let PreserveStackTrace(exn) = - try - let preserveStackTrace = typeof.GetMethod("InternalPreserveStackTrace", BindingFlags.Instance ||| BindingFlags.NonPublic) - preserveStackTrace.Invoke(exn, null) |> ignore - with e-> - // This is probably only the mono case. - System.Diagnostics.Debug.Assert(false, "Could not preserve stack trace for watson exception.") - () - - - // Reraise an exception if it is one we want to report to Watson. - let ReraiseIfWatsonable(exn) = - match box exn with - // These few SystemExceptions which we don't report to Watson are because we handle these in some way in Build.ml - | :? System.Reflection.TargetInvocationException -> () - | :? System.NotSupportedException -> () - | :? System.IO.IOException -> () // This covers FileNotFoundException and DirectoryNotFoundException - | :? System.UnauthorizedAccessException -> () - | :? FailureException // This gives reports for compiler INTERNAL ERRORs - | :? System.SystemException -> - PreserveStackTrace(exn) - raise exn - | _ -> () - - type ErrorLogger with - member x.ErrorR exn = match exn with StopProcessing | ReportedError -> raise exn | _ -> x.ErrorSink exn - member x.Warning exn = match exn with StopProcessing | ReportedError -> raise exn | _ -> x.WarnSink exn - member x.Error exn = x.ErrorR exn; raise ReportedError - member x.ErrorRecovery (exn:exn) (m:range) = - // Never throws ReportedError. - // Throws StopProcessing and exceptions raised by the ErrorSink(exn) handler. - match exn with - (* Don't send ThreadAbortException down the error channel *) - | :? System.Threading.ThreadAbortException | WrappedError((:? System.Threading.ThreadAbortException),_) -> () - | ReportedError | WrappedError(ReportedError,_) -> () - | StopProcessing | WrappedError(StopProcessing,_) -> raise exn - | e -> - try - x.ErrorR (AttachRange m exn) // may raise exceptions, e.g. an fsi error sink raises StopProcessing. - ReraiseIfWatsonable(exn) - with - | ReportedError | WrappedError(ReportedError,_) -> () - member x.StopProcessingRecovery (exn:exn) (m:range) = - // Do standard error recovery. - // Additionally ignore/catch StopProcessing. [This is the only catch handler for StopProcessing]. - // Additionally ignore/catch ReportedError. - // Can throw other exceptions raised by the ErrorSink(exn) handler. - match exn with - | StopProcessing | WrappedError(StopProcessing,_) -> () // suppress, so skip error recovery. - | e -> - try x.ErrorRecovery exn m - with - | StopProcessing | WrappedError(StopProcessing,_) -> () // catch, e.g. raised by ErrorSink. - | ReportedError | WrappedError(ReportedError,_) -> () // catch, but not expected unless ErrorRecovery is changed. - member x.ErrorRecoveryNoRange (exn:exn) = - x.ErrorRecovery exn range0 - -let mutable private globalErrorLogger = - { new ErrorLogger with - member x.WarnSink (e:exn) = - () - // Ideally we would assert here and in ErrorSink, and explicitly install a GlobalErrorLogger. However - // that would then mean that different threads are using the global error logger which makes - // things tricky. So for the moment we jsut make the default global error logger discard errors. - - // use unwind = InstallGlobalErrorLogger (fun _ -> DiscardErrorsLogger) - //assert false - //dprintf "no warning handler installed\n" - member x.ErrorSink (e:exn) = - () - //assert false - //dprintf "no error handler installed\n" - member x.ErrorCount = 0 } - -let DiscardErrorsLogger = - { new ErrorLogger with - member x.WarnSink (e:exn) = () - member x.ErrorSink (e:exn) = () - member x.ErrorCount = 0 } - -let InstallGlobalErrorLogger(errorLoggerTransformer) = - let oldErrorLogger = globalErrorLogger - globalErrorLogger <- errorLoggerTransformer oldErrorLogger - { new System.IDisposable with - member x.Dispose() = globalErrorLogger <- oldErrorLogger } - - -// Global functions are still used by parser and TAST ops -let errorR exn = globalErrorLogger.ErrorR exn -let warning exn = globalErrorLogger.Warning exn -let error exn = globalErrorLogger.Error exn -let errorRecovery exn m = globalErrorLogger.ErrorRecovery exn m -let stopProcessingRecovery exn m = globalErrorLogger.StopProcessingRecovery exn m -let errorRecoveryNoRange exn = globalErrorLogger.ErrorRecoveryNoRange exn - -let report f = - f() - -let deprecated s m = warning(Deprecated(s,m)) -let deprecatedWithError s m = errorR(Deprecated(s,m)) -let libraryOnlyWarning m = warning(LibraryUseOnly(m)) -let deprecatedOperator m = deprecated "the treatment of this operator is now handled directly by the F# compiler and its meaning may not be redefined" m -let ocamlCompatWarning s m = warning(OCamlCompatibility(s,m)) - -//------------------------------------------------------------------------ -// Errors as data: Sometimes we have to reify errors as data, e.g. if backtracking -// -// REVIEW: consider using F# computation expressions here - -type warning = exn -type error = exn -type OperationResult<'a> = - | OkResult of warning list * 'a - | ErrorResult of warning list * error - -type ImperativeOperationResult = OperationResult - -let ReportWarnings warns = List.iter warning warns - -let CommitOperationResult res = - match res with - | OkResult (warns,res) -> ReportWarnings warns; res - | ErrorResult (warns,err) -> ReportWarnings warns; error err - -let RaiseOperationResult res : unit = CommitOperationResult res - -let ErrorD err = ErrorResult([],err) -let WarnD err = OkResult([err],()) -let CompleteD = OkResult([],()) -let ResultD x = OkResult([],x) -let CheckNoErrorsAndGetWarnings res = match res with OkResult (warns,_) -> Some warns | ErrorResult _ -> None - -/// The bind in the monad. Stop on first error. Accumulate warnings and continue. -let (++) res f = - match res with - | OkResult([],res) -> (* tailcall *) f res - | OkResult(warns,res) -> - begin match f res with - | OkResult(warns2,res2) -> OkResult(warns@warns2, res2) - | ErrorResult(warns2,err) -> ErrorResult(warns@warns2, err) - end - | ErrorResult(warns,err) -> - ErrorResult(warns,err) - -/// Stop on first error. Accumulate warnings and continue. -let rec IterateD f xs = match xs with [] -> CompleteD | h :: t -> f h ++ (fun () -> IterateD f t) -let rec WhileD gd body = if gd() then body() ++ (fun () -> WhileD gd body) else CompleteD -let MapD f xs = let rec loop acc xs = match xs with [] -> ResultD (List.rev acc) | h :: t -> f h ++ (fun x -> loop (x::acc) t) in loop [] xs - -type TrackErrorsBuilder() = - member x.Bind(res,k) = res ++ k - member x.Return(res) = ResultD(res) - member x.For(seq,k) = IterateD k seq - member x.While(gd,k) = WhileD gd k - -let trackErrors = TrackErrorsBuilder() - -/// Stop on first error. Accumulate warnings and continue. -let OptionD f xs = match xs with None -> CompleteD | Some(h) -> f h - -/// Stop on first error. Report index -let IterateIdxD f xs = - let rec loop xs i = match xs with [] -> CompleteD | h :: t -> f i h ++ (fun () -> loop t (i+1)) - loop xs 0 - -/// Stop on first error. Accumulate warnings and continue. -let rec Iterate2D f xs ys = - match xs,ys with - | [],[] -> CompleteD - | h1 :: t1, h2::t2 -> f h1 h2 ++ (fun () -> Iterate2D f t1 t2) - | _ -> failwith "Iterate2D" - -let TryD f g = - match f() with - | ErrorResult(warns,err) -> (OkResult(warns,())) ++ (fun () -> g err) - | res -> res - -let rec RepeatWhileD body = body() ++ (function true -> RepeatWhileD body | false -> CompleteD) -let AtLeastOneD f l = MapD f l ++ (fun res -> ResultD (List.exists id res)) - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSStrings.resx b/tools/FSharp_1.9.6.16/source/fsharp/FSStrings.resx deleted file mode 100644 index 6897f893..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSStrings.resx +++ /dev/null @@ -1,1137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - . See also {0}. - - - The tuples have differing lengths of {0} and {1} - - - The resulting type would be infinite when unifying '{0}' and '{1}' - - - A type parameter is missing a constraint '{0}' - - - The unit of measure '{0}' does not match the unit of measure '{1}' - - - The type '{0}' does not match the type '{1}' - - - The type '{0}' is not compatible with the type '{1}'{2} - - - {0} - - - {0} - - - This expression has type\n\t{0}\nbut is here used with type\n\t{1}{2} - - - Type mismatch. Expecting a\n\t{0}\nbut given a\n\t{1}{2}.\n - - - Type constraint mismatch when applying the default type '{0}' for a type inference variable. - - - Consider adding further type constraints - - - Type constraint mismatch. The type \n\t{0}\nis not compatible with type\n\t{1}{2}\n - - - Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt constructor name. - - - Discriminated union cases and exception labels must be uppercase identifiers - - - {0} - - - \n\nPossible overload: '{0}'. - - - \n\nPossible best overload: '{0}'. - - - This function takes too many arguments, or is used in a context where a function is not expected - - - Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in compilation failures if you attempt to invoke the member constraint from your own code. - - - Note, the OCaml-compatibility exception type Not_found is now mapped to System.Collections.Generic.KeyNotFoundException, rather than System.IndexOutOfRangeException. This means a number of F# functions now raise KeyNotFoundException instead of IndexOutOfRangeException. If you explicitly catch IndexOutOfRangeException in your code you may need to adjust your exception handling accordingly. This change was made because IndexOutOfRangeException is a CLR-reserved exception which should not be raised in user or library code. - - - {0}. - - - A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. - - - Implicit object constructors for structs must take at least one argument - - - The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. - - - This value is not a function and cannot be applied. Did you forget to terminate a declaration? - - - This value is not a function and cannot be applied - - - The type '{0}' expects {1} type argument(s) but is given {2} - - - Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. - - - Duplicate definition of {0} '{1}' - - - The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module - - - Two members called '{0}' have the same argument counts and/or signatures. To overload methods with identical argument counts use an 'OverloadID' attribute. - - - Duplicate definition of {0} '{1}' - - - The {0} '{1}' is not defined. - - - A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. - - - internal error: the type {0} did not contain the {1} '{2}' - - - internal error: the module/namespace '{0}' from compilation unit '{1}' did not contain the {2} '{3}' - - - This field is not mutable - - - The fields '{0}' and '{1}' are from different types - - - '{0}' is bound twice in this pattern - - - A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n\t{1}.\nThe type of the function required at this point of use is\n\t{2}{3}\nThis error may be due to limitations associated with generic recursion, i.e. type inference requires that generic functions and members are instantiated in only one way within their own recursive scope, e.g. within a 'let rec' collection or within a group of classes. Consider splitting these recursive bindings into two groups. - - - Invalid runtime coercion or type test from type {0} to {1}\n{2} - - - This runtime coercion or type test from type\n\t{0}\n to \n\t{1}\ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. - - - The static coercion from type\n\t{0}\nto \n\t{1}\n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. - - - A coercion from the value type \n\t{0}\nto the type \n\t{1}\nwill involve boxing. Consider using 'box' instead - - - This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. - - - This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. - - - This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. - - - This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. - - - identifier - - - integer literal - - - floating point literal - - - decimal literal - - - character literal - - - keyword 'base' - - - symbol '(*)' - - - symbol '$' - - - infix operator - - - infix operator - - - symbol ':>'" " - - - symbol '::' - - - symbol '{0} - - - infix operator - - - infix operator - - - infix operator - - - prefix operator - - - symbol ':?>' - - - infix operator - - - infix operator - - - symbol '&' - - - symbol '&&' - - - symbol '||' - - - symbol '<' - - - symbol '>' - - - symbol '?' - - - symbol '??' - - - symbol ':?' - - - integer.. - - - symbol '..' - - - quote symbol - - - symbol '*' - - - type application - - - symbol ':' - - - symbol ':=' - - - symbol '<-' - - - symbol '=' - - - symbol '>.' - - - symbol '>|]' - - - symbol '-' - - - symbol '+' or '-' - - - operator name - - - symbol ',' - - - symbol '.' - - - symbol '|' - - - symbol # - - - symbol '_' - - - symbol ';' - - - symbol ';;' - - - symbol '(' - - - symbol ')' - - - symbol 'splice' - - - start of quotation - - - symbol '[' - - - symbol '[|' - - - symbol '[<' - - - symbol '{' - - - symbol '{<' - - - symbol '|]' - - - symbol '>}' - - - symbol '>]' - - - end of quotation - - - symbol ']' - - - symbol '}' - - - keyword 'public' - - - keyword 'private' - - - keyword 'internal' - - - keyword 'constraint' - - - keyword 'instance' - - - keyword 'delegate' - - - keyword 'inherit' - - - keyword 'constructor' - - - keyword 'default' - - - keyword 'override' - - - keyword 'abstract' - - - reserved keyword 'virtual' - - - keyword 'class' - - - keyword 'member' - - - keyword 'static' - - - keyword 'namespace' - - - start of structured construct - - - incomplete structured construct at or before this point - - - keyword 'then' - - - keyword 'else' - - - keyword 'let' or 'use' - - - binder keyword - - - keyword 'do' - - - keyword 'with' - - - keyword 'function' - - - keyword 'fun' - - - end of input - - - internal dummy token - - - keyword 'do!' - - - yield - - - yield! - - - keyword 'interface' - - - keyword 'elif' - - - symbol '->' - - - symbol '->>' - - - keyword 'sig' - - - keyword 'struct' - - - keyword 'upcast' - - - keyword 'downcast' - - - keyword 'null' - - - reserved keyword - - - keyword 'module' - - - keyword 'and' - - - keyword 'as' - - - keyword 'assert' - - - keyword 'asr' - - - keyword 'downto' - - - keyword 'exception' - - - keyword 'false' - - - keyword 'for' - - - keyword 'fun' - - - keyword 'function' - - - keyword 'finally' - - - keyword 'lazy' - - - keyword 'match' - - - reserved keyword 'method' - - - keyword 'mutable' - - - keyword 'new' - - - keyword 'of' - - - keyword 'open' - - - keyword 'or' - - - keyword 'void' - - - keyword 'extern' - - - keyword 'interface' - - - keyword 'rec' - - - keyword 'to' - - - keyword 'true' - - - keyword 'try' - - - keyword 'type' - - - keyword 'val' - - - keyword 'inline' - - - keyword 'when' - - - keyword 'while' - - - keyword 'with' - - - keyword 'if' - - - keyword 'do' - - - keyword 'done' - - - keyword 'in' - - - symbol '(' or '[' - - - keyword 'begin' - - - keyword 'end' - - - directive - - - inactive code - - - lex failure - - - whitespace - - - comment - - - line comment - - - string text - - - byte array literal - - - string literal - - - end of input - - - Unexpected end of input - - - Unexpected {0} - - - in interaction - - - in directive - - - in field declaration - - - in discriminated union case declaration - - - in binding - - - in binding - - - in member definition - - - in definitions - - - in member signature - - - in value signature - - - in type signature - - - in lambda expression - - - in union case - - - in extern declaration - - - in object expression - - - in if/then/else expression - - - in open declaration - - - in module or namespace signature - - - in pattern matching - - - in begin/end expression - - - in record expression - - - in type definition - - - in exception definition - - - in type name - - - in attribute list - - - in quotation literal - - - in type constraint - - - in implementation file - - - in definition - - - in signature file - - - in pattern - - - in expression - - - in type - - - in type arguments - - - keyword - - - symbol - - - (due to indentation-aware syntax) - - - . Expected {0} or other token. - - - . Expected {0}, {1} or other token. - - - . Expected {0}, {1}, {2} or other token. - - - The type '{0}' cannot be used as the source of a type test or runtime coercion - - - The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. - - - The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion - - - This upcast is unnecessary - the types are identical - - - This type test or downcast will always hold - - - {0} - - - The member '{0}' does not have the correct type to override any given virtual method - - - The member '{0}' does not have the correct type to override the corresponding abstract method. - - - The required signature is '{0}'. - - - This constructor is applied to {0} argument(s) but expects {1} - - - The two sides of this 'or' pattern bind different sets of variables - - - Module '{0}' contains\n\t{1}\nbut its signature specifies\n\t{2}\n{3}. - - - The module contains the constructor\n\t{0}\nbut its signature specifies\n\t{1}\n{2}. - - - The exception definitions are not compatible because {0}. The module contains the exception definition\n\t{1}\nbut its signature specifies\n\t{2} - - - The module contains the field\n\t{0}\nbut its signature specifies\n\t{1}\n{2}. - - - Module '{0}' requires a {1} '{2}' - - - The address-of operator may result in non-verifiable code. Its use is restricted to passing byrefs to functions that require them - - - {0} - - - Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. - - - This lookup uses a deprecated feature, where a class type is inferred from the use of a class field label. Consider using a type annotation to make it clear which class the field comes from. - - - This expression is a function value, i.e. is missing arguments. Its type is {0}. - - - This expression should have type 'unit', but has type '{0}'. - - - If assigning to a property use the syntax 'obj.Prop <- expr'. - - - This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using #nowarn "40" or --nowarn 40. - - - The value '{0}' will be evaluated as part of its own definition - - - This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. - - - " will evaluate '{0}'" - - - Bindings may be executed out-of-order because of this forward reference. - - - This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using #nowarn "40" or --nowarn 40. - - - Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. - - - Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. - - - The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. - - - The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. - - - The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone - - - . Multiple implemented interfaces have a member with this name and argument count - - - . Consider implementing interfaces '{0}' and '{1}' explicitly. - - - . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using #nowarn "70" or --nowarn 70. - - - {0} - - - parse error - - - parse error: unexpected end of file - - - {0} - - - internal error: {0}\nPlease build a small example that reproduces this problem and report it to fsbugs@microsoft.com. - - - {0} - - - Incomplete pattern matches on this expression. - - - For example, the value '{0}' may indicate a case not covered by the pattern(s). - - - For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. - - - . Sequence expressions involving incomplete matches on 'for' and 'let' constructs are deprecated and will raise an IncompleteMatchFailure exception in a future revision of the F# language. Please use a separate match expression instead, adding '()' for the failing branch. - - - This rule will never be matched - - - This value is not mutable - - - This value is not local - - - This construct is deprecated - - - . {0} - - - {0}. This warning can be disabled using '--nowarn 57' or '#nowarn "57"'. - - - Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn 9' or '#nowarn "9"'. - - - This construct is for compatibility with OCaml. {0}This warning can be disabled using '--mlcompatibility', '--nowarn 62' or '#nowarn "62"'. - - - This construct is deprecated: {0}. - - - This construct is deprecated: it is only for use in the F# library - - - The following fields require values: {0} - - - Value restriction. The value '{0}' has generic type\n\t{1}\nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. - - - Value restriction. The value '{0}' has generic type\n\t{1}\nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. - - - Value restriction. This member has been inferred to have generic type\n\t{0}\nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. - - - Value restriction. The value '{0}' has been inferred to have generic type\n\t{1}\nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. - - - Value restriction. The value '{0}' has been inferred to have generic type\n\t{1}\nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. - - - syntax error - - - {0} - - - {0} - - - Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. - - - Override implementations should be given as part of the initial declaration of a type. - - - Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. - - - Interface implementations should be given on the initial declaration of a type. - - - A required assembly reference is missing. You must add a reference to assembly '{0}'. - - - The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. - - - The command-line option '{0}' has been deprecated. {1} - - - #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. - - - #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-r' compiler option for this reference or delimit the directive with '#if INTERACTIVE'/'#endif'. - - - #R 'copy after compile' references are no longer supported. If using a script file (extensions .fsx or .fsscript), change to '#r', otherwise add a post-compilation build step in your build environment to copy your files locally after the build. - - - This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. - - - Unable to find the file '{0}' in any of\n {1} - - - Assembly reference '{0}' was not found or is invalid - - - One or more warnings in loaded file.\n - - - One or more errors in loaded file.\n - - - Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file - - - Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} - - - Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) - - - Could not load file '{0}' because it does not exist or is inaccessible - - - {0} (Code={1}) - - - internal error: {0}\nPlease build a small example that reproduces this problem and report it to fsbugs@microsoft.com. - - - Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' - - - Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module - - - Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module - - - Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module - - - PDB files cannot be generated when running on Mono - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj deleted file mode 100644 index c9c5a893..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj +++ /dev/null @@ -1,52 +0,0 @@ - - - - ..\.. - Proto - AnyCPU - - - - - Library - FSharp.Build-proto - FSharp.Build-proto.fsi - true - vTip - BUILDING_WITH_LKG;$(DefineConstants) - LKG - {D8BC791F-C1A9-49DC-9432-0F3090537555} - - - - CompilerLocationUtils.fs - - - CreateFSharpManifestResourceName.fsi - - - CreateFSharpManifestResourceName.fs - - - - Fsc.fsi - - - Fsc.fs - - - Microsoft.FSharp-proto.targets - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/CreateFSharpManifestResourceName.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/CreateFSharpManifestResourceName.fs deleted file mode 100644 index ce28b17d..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/CreateFSharpManifestResourceName.fs +++ /dev/null @@ -1,39 +0,0 @@ -#light -namespace Microsoft.FSharp.Build -open System -open System.IO -open System.Text -open Microsoft.Build.Tasks -open Microsoft.Build.Utilities - -type CreateFSharpManifestResourceName public () = - inherit CreateCSharpManifestResourceName() - - override this.CreateManifestName - ((fileName:string), - (linkFileName:string), - (rootNamespace:string), (* may be null *) - (dependentUponFileName:string), (* may be null *) - (binaryStream:System.IO.Stream) (* may be null *)) : string = - let embeddedFileName = - match linkFileName with - | null -> fileName - | _ -> linkFileName - // since we do not support resources dependent on a form, we always pass null for a binary stream - // rootNamespace is always empty - we do not support it - let cSharpResult = - base.CreateManifestName(fileName, linkFileName, "", dependentUponFileName, null) - // Workaround that makes us keep .resources extension on both 3.5 and 3.5SP1 - // 3.5 stripped ".resources", 3.5 SP1 does not. We should do 3.5SP1 thing - let extensionToWorkaround = ".resources" - if embeddedFileName.EndsWith(extensionToWorkaround, StringComparison.OrdinalIgnoreCase) - && not (cSharpResult.EndsWith(extensionToWorkaround, StringComparison.OrdinalIgnoreCase)) then - cSharpResult + extensionToWorkaround - else - cSharpResult - - - override this.IsSourceFile (filename:string) = - let extension = Path.GetExtension(filename) - (String.Equals(extension, ".fs", StringComparison.OrdinalIgnoreCase) or - String.Equals(extension, ".ml", StringComparison.OrdinalIgnoreCase)) \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/CreateFSharpManifestResourceName.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/CreateFSharpManifestResourceName.fsi deleted file mode 100644 index 9d1f9917..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/CreateFSharpManifestResourceName.fsi +++ /dev/null @@ -1,8 +0,0 @@ -#light - -namespace Microsoft.FSharp.Build - -[] -type CreateFSharpManifestResourceName = - inherit Microsoft.Build.Tasks.CreateCSharpManifestResourceName - public new : unit -> CreateFSharpManifestResourceName diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/FSharp.Build.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/FSharp.Build.fsproj deleted file mode 100644 index 02ca730f..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/FSharp.Build.fsproj +++ /dev/null @@ -1,53 +0,0 @@ - - - - ..\.. - - - - - Debug - AnyCPU - Library - FSharp.Build - FSharp.Build.fsi - true - v3.5 - - - {702A7979-BCF9-4C41-853E-3ADFC9897890} - - - - assemblyinfo.FSharp.Build.dll.fs - - - CompilerLocationUtils.fs - - - - - - - Microsoft.FSharp.targets - - - Content - - - - - - - - - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/Fsc.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/Fsc.fs deleted file mode 100644 index d5dd892d..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/Fsc.fs +++ /dev/null @@ -1,491 +0,0 @@ -#light - - -namespace Microsoft.FSharp.Build - -open System -open System.Text -open System.Diagnostics.CodeAnalysis -open System.Reflection -open Microsoft.Build.Framework -open Microsoft.Build.Utilities -open Internal.Utilities - -[] -[] - -[] -[] -do() - - -type FscCommandLineBuilder() = - // In addition to generating a command-line that will be handed to cmd.exe, we also generate - // an array of individual arguments. The former needs to be quoted (and cmd.exe will strip the - // quotes while parsing), whereas the latter is not. See bug 4357 for background; this helper - // class gets us out of the business of unparsing-then-reparsing arguments. - - let builder = new CommandLineBuilder() - let mutable args = [] // in reverse order - let mutable srcs = [] // in reverse order - let mutable alreadyCalledWithFilenames = false - /// Return a list of the arguments (with no quoting for the cmd.exe shell) - member x.CapturedArguments() = - assert(not alreadyCalledWithFilenames) - List.rev args - /// Return a list of the sources (with no quoting for the cmd.exe shell) - member x.CapturedFilenames() = - assert(alreadyCalledWithFilenames) - List.rev srcs - /// Return a full command line (with quoting for the cmd.exe shell) - override x.ToString() = - builder.ToString() - - member x.AppendFileNamesIfNotNull(filenames:ITaskItem array, sep:string) = - builder.AppendFileNamesIfNotNull(filenames, sep) - // do not update "args", not used - for item in filenames do - let tmp = new CommandLineBuilder() - tmp.AppendSwitchUnquotedIfNotNull("", item.ItemSpec) // we don't want to quote the filename, this is a way to get that - let s = tmp.ToString() - if s <> String.Empty then - srcs <- tmp.ToString() :: srcs - alreadyCalledWithFilenames <- true - - member x.AppendSwitchIfNotNull(switch:string, values:string array, sep:string) = - builder.AppendSwitchIfNotNull(switch, values, sep) - let tmp = new CommandLineBuilder() - tmp.AppendSwitchUnquotedIfNotNull(switch, values, sep) - let s = tmp.ToString() - if s <> String.Empty then - args <- s :: args - - member x.AppendSwitchIfNotNull(switch:string, value:string) = - builder.AppendSwitchIfNotNull(switch, value) - let tmp = new CommandLineBuilder() - tmp.AppendSwitchUnquotedIfNotNull(switch, value) - let s = tmp.ToString() - if s <> String.Empty then - args <- s :: args - - member x.AppendSwitchUnquotedIfNotNull(switch:string, value:string) = - assert(switch = "") // we only call this method for "OtherFlags" - // Unfortunately we still need to mimic what cmd.exe does, but only for "OtherFlags". - let ParseCommandLineArgs(commandLine:string) = // returns list in reverse order - let mutable args = [] - let mutable i = 0 // index into commandLine - let len = commandLine.Length - while i < len do - // skip whitespace - while i < len && System.Char.IsWhiteSpace(commandLine, i) do - i <- i + 1 - if i < len then - // parse an argument - let sb = new StringBuilder() - let mutable finished = false - let mutable insideQuote = false - while i < len && not finished do - match commandLine.[i] with - | '"' -> insideQuote <- not insideQuote; i <- i + 1 - | c when not insideQuote && System.Char.IsWhiteSpace(c) -> finished <- true - | c -> sb.Append(c) |> ignore; i <- i + 1 - args <- sb.ToString() :: args - args - builder.AppendSwitchUnquotedIfNotNull(switch, value) - let tmp = new CommandLineBuilder() - tmp.AppendSwitchUnquotedIfNotNull(switch, value) - let s = tmp.ToString() - if s <> String.Empty then - args <- ParseCommandLineArgs(s) @ args - - member x.AppendSwitch(switch:string) = - builder.AppendSwitch(switch) - args <- switch :: args - -// for unit testing (attaching a Logger listener) -[] -type FscCustomBuildEventArgs(commandLine:string) = - inherit CustomBuildEventArgs() - member this.CommandLine = commandLine - -//There are a lot of flags on fsc.exe. -//For now, not all of them are represented in the "Fsc class" object model. -//The goal is to have the most common/important flags available via the Fsc class, and the -//rest can be "backdoored" through the .OtherFlags property. - -type [] Fsc() = - inherit ToolTask() - let mutable baseAddress : string = null - let mutable codePage : string = null - let mutable debugSymbols = false - let mutable debugType : string = null - let mutable defineConstants : ITaskItem[] = [||] - let mutable disabledWarnings : string[] = [||] - let mutable documentationFile : string = null - let mutable generateInterfaceFile : string = null - let mutable keyFile : string = null - let mutable noFramework = false - let mutable optimize : bool = true - let mutable tailcalls : bool = true - let mutable otherFlags : string = null - let mutable outputAssembly : string = null - let mutable pdbFile : string = null - let mutable platform : string = null - let mutable references : ITaskItem[] = [||] - let mutable referencePath : string = null - let mutable resources : ITaskItem[] = [||] - let mutable sources : ITaskItem[] = [||] - let mutable targetType : string = null -#if FX_ATLEAST_35 -#else - let mutable toolExe : string = "fsc.exe" -#endif - let mutable nowarn : string = null - let mutable warningLevel : string = null - let mutable treatWarningsAsErrors : bool = false - let mutable warningsAsErrors : string = null - let mutable toolPath : string = - match FSharpEnvironment.FSharpRunningBinFolder with - | Some(s) -> s - | None -> "" - let mutable versionFile : string = null - let mutable win32res : string = null - let mutable win32manifest : string = null - let mutable vserrors : bool = false - let mutable utf8output : bool = false - - let mutable capturedArguments : string list = [] // list of individual args, to pass to HostObject Compile() - let mutable capturedFilenames : string list = [] // list of individual source filenames, to pass to HostObject Compile() - - // --baseaddress - member fsc.BaseAddress - with get() = baseAddress - and set(s) = baseAddress <- s - // --codepage : Specify the codepage to use when opening source files - member fsc.CodePage - with get() = codePage - and set(s) = codePage <- s - // -g: Produce debug file. Disables optimizations if a -O flag is not given. - member fsc.DebugSymbols - with get() = debugSymbols - and set(b) = debugSymbols <- b - // --debug : Emit debugging information - member fsc.DebugType - with get() = debugType - and set(s) = debugType <- s - // --nowarn : Do not report the given specific warning. - member fsc.DisabledWarnings - with get() = disabledWarnings - and set(a) = disabledWarnings <- a - // --define : Define the given conditional compilation symbol. - member fsc.DefineConstants - with get() = defineConstants - and set(a) = defineConstants <- a - // --doc : Write the xmldoc of the assembly to the given file. - member fsc.DocumentationFile - with get() = documentationFile - and set(s) = documentationFile <- s - // --generate-interface-file : - // Print the inferred interface of the - // assembly to a file. - member fsc.GenerateInterfaceFile - with get() = generateInterfaceFile - and set(s) = generateInterfaceFile <- s - // --keyfile : - // Sign the assembly the given keypair file, as produced - // by the .NET Framework SDK 'sn.exe' tool. This produces - // an assembly with a strong name. This is only relevant if producing - // an assembly to be shared amongst programs from different - // directories, e.g. to be installed in the Global Assembly Cache. - member fsc.KeyFile - with get() = keyFile - and set(s) = keyFile <- s - // --noframework - member fsc.NoFramework - with get() = noFramework - and set(b) = noFramework <- b - // --optimize - member fsc.Optimize - with get() = optimize - and set(p) = optimize <- p - // --tailcalls - member fsc.Tailcalls - with get() = tailcalls - and set(p) = tailcalls <- p - // REVIEW: decide whether to keep this, for now is handy way to deal with as-yet-unimplemented features - member fsc.OtherFlags - with get() = otherFlags - and set(s) = otherFlags <- s - // -o : Name the output file. - member fsc.OutputAssembly - with get() = outputAssembly - and set(s) = outputAssembly <- s - // --pdb : - // Name the debug output file. - member fsc.PdbFile - with get() = pdbFile - and set(s) = pdbFile <- s - // --platform : Limit which platforms this code can run on: - // x86 - // x64 - // Itanium - // anycpu - member fsc.Platform - with get() = platform - and set(s) = platform <- s - // -r : Reference an F# or .NET assembly. - member fsc.References - with get() = references - and set(a) = references <- a - // --lib - member fsc.ReferencePath - with get() = referencePath - and set(s) = referencePath <- s - // --resource : Embed the specified managed resources (.resource). - // Produce .resource files from .resx files using resgen.exe or resxc.exe. - member fsc.Resources - with get() = resources - and set(a) = resources <- a - // source files - member fsc.Sources - with get() = sources - and set(a) = sources <- a - // --target exe: Produce an executable with a console - // --target winexe: Produce an executable which does not have a - // stdin/stdout/stderr - // --target library: Produce a DLL - // --target module: Produce a module that can be added to another assembly - member fsc.TargetType - with get() = targetType - and set(s) = targetType <- s - - // --version-file : - member fsc.VersionFile - with get() = versionFile - and set(s) = versionFile <- s - -#if FX_ATLEAST_35 -#else - // Allow overriding to the executable name "fsc.exe" - member fsc.ToolExe - with get() = toolExe - and set(s) = toolExe<- s -#endif - - // For targeting other folders for "fsc.exe" (or ToolExe if different) - member fsc.ToolPath - with get() = toolPath - and set(s) = toolPath <- s - - // For specifying a win32 native resource file (.res) - member fsc.Win32ResourceFile - with get() = win32res - and set(s) = win32res <- s - - // For specifying a win32 manifest file - member fsc.Win32ManifestFile - with get() = win32manifest - and set(m) = win32manifest <- m - - // For specifying warnings to disable - member fsc.NoWarn - with get() = nowarn - and set(s) = nowarn <- s - - // For specifying the warning level (0-4) - member fsc.WarningLevel - with get() = warningLevel - and set(s) = warningLevel <- s - - member fsc.TreatWarningsAsErrors - with get() = treatWarningsAsErrors - and set(p) = treatWarningsAsErrors <- p - - member fsc.WarningsAsErrors - with get() = warningsAsErrors - and set(s) = warningsAsErrors <- s - - member fsc.VisualStudioStyleErrors - with get() = vserrors - and set(p) = vserrors <- p - - member fsc.Utf8Output - with get() = utf8output - and set(p) = utf8output <- p - - // ToolTask methods - override fsc.ToolName = "fsc.exe" - override fsc.StandardErrorEncoding = if utf8output then System.Text.Encoding.UTF8 else base.StandardErrorEncoding - override fsc.StandardOutputEncoding = if utf8output then System.Text.Encoding.UTF8 else base.StandardOutputEncoding - override fsc.GenerateFullPathToTool() = - if toolPath = "" then - // REVIEW factor out string resource below - raise (new System.InvalidOperationException("ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.")) - System.IO.Path.Combine(toolPath, fsc.ToolExe) - member internal fsc.BaseExecuteTool(pathToTool, responseFileCommands, commandLineCommands) = // F# does not allow protected members to be captured by lambdas, this is the standard workaround - base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands) - /// Intercept the call to ExecuteTool to handle the host compile case. - override fsc.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands) = - let ho = box fsc.HostObject - match ho with - | null -> - base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands) - | _ -> - let sources = sources|>Array.map(fun i->i.ItemSpec) - let baseCall = fun (dummy : int) -> fsc.BaseExecuteTool(pathToTool, responseFileCommands, commandLineCommands) - // We are using a Converter rather than a "unit->int" because it is too hard to - // figure out how to pass an F# function object via reflection. - let baseCallDelegate = new System.Converter(baseCall) - try - let ret = - (ho.GetType()).InvokeMember("Compile", BindingFlags.Public ||| BindingFlags.InvokeMethod ||| BindingFlags.Instance, null, ho, - [| box baseCallDelegate; box (capturedArguments |> List.to_array); box (capturedFilenames |> List.to_array) |], - System.Globalization.CultureInfo.InvariantCulture) - unbox ret - with e -> - System.Diagnostics.Debug.Assert(false, "HostObject received by Fsc task did not have a Compile method or the compile method threw an exception. "^(e.ToString())) - rethrow() - - override fsc.GenerateCommandLineCommands() = - let builder = new FscCommandLineBuilder() - // OutputAssembly - builder.AppendSwitchIfNotNull("-o:", outputAssembly) - // CodePage - builder.AppendSwitchIfNotNull("--codepage:", codePage) - // Debug - if debugSymbols then - builder.AppendSwitch("-g") - // DebugType - builder.AppendSwitchIfNotNull("--debug:", - if debugType = null then null else - match debugType.ToUpperInvariant() with - | "NONE" -> null - | "PDBONLY" -> "pdbonly" - | "FULL" -> "full" - | _ -> null) - // NoFramework - if noFramework then - builder.AppendSwitch("--noframework") - // BaseAddress - builder.AppendSwitchIfNotNull("--baseaddress:", baseAddress) - // DefineConstants - for item in defineConstants do - builder.AppendSwitchIfNotNull("--define:", item.ItemSpec) - // DisabledWarnings - for disabledWarning in disabledWarnings do - builder.AppendSwitchIfNotNull("--nowarn:", disabledWarning) - // DocumentationFile - builder.AppendSwitchIfNotNull("--doc:", documentationFile) - // GenerateInterfaceFile - builder.AppendSwitchIfNotNull("--sig:", generateInterfaceFile) - // KeyFile - builder.AppendSwitchIfNotNull("--keyfile:", keyFile) - // Optimize - if optimize then - builder.AppendSwitch("--optimize+") - else - builder.AppendSwitch("--optimize-") - if not tailcalls then - builder.AppendSwitch("--tailcalls-") - // PdbFile - builder.AppendSwitchIfNotNull("--pdb:", pdbFile) - // Platform - builder.AppendSwitchIfNotNull("--platform:", - if platform = null then null else - match platform.ToUpperInvariant() with - | "ANYCPU" -> "anycpu" - | "X86" -> "x86" - | "X64" -> "x64" - | "ITANIUM" -> "Itanium" - | _ -> null) - // Resources - for item in resources do - builder.AppendSwitchIfNotNull("--resource:", item.ItemSpec) - // VersionFile - builder.AppendSwitchIfNotNull("--versionfile:", versionFile) - // References - for item in references do - builder.AppendSwitchIfNotNull("-r:", item.ItemSpec) - // ReferencePath - let referencePathArray = // create a array of strings - match referencePath with - | null -> null - | _ -> referencePath.Split([|' '; ';'; ','|], StringSplitOptions.RemoveEmptyEntries) - - builder.AppendSwitchIfNotNull("--lib:", referencePathArray, ",") - // TargetType - builder.AppendSwitchIfNotNull("--target:", - if targetType = null then null else - match targetType.ToUpperInvariant() with - | "LIBRARY" -> "library" - | "EXE" -> "exe" - | "WINEXE" -> "winexe" - | "MODULE" -> "module" - | _ -> null) - - // NoWarn - let noWarnArray = // create a array of strings - match nowarn with - | null -> null - | _ -> nowarn.Split([|' '; ';'; ','|], StringSplitOptions.RemoveEmptyEntries) - - builder.AppendSwitchIfNotNull("--nowarn:", noWarnArray, ",") - - // WarningLevel - builder.AppendSwitchIfNotNull("--warn:", warningLevel) - - // TreatWarningsAsErrors - if treatWarningsAsErrors then - builder.AppendSwitch("--warnaserror") - - // WarningsAsErrors - // Change warning 76, HashReferenceCopyAfterCompileNotAllowedInNonScript, into an error - let warningsAsErrorsArray = - match warningsAsErrors with - | null -> [|"76"|] - | _ -> (warningsAsErrors ^ " 76 ").Split([|' '; ';'; ','|], StringSplitOptions.RemoveEmptyEntries) - - builder.AppendSwitchIfNotNull("--warnaserror:", warningsAsErrorsArray, ",") - - - // Win32ResourceFile - builder.AppendSwitchIfNotNull("--win32res:", win32res) - - // Win32ManifestFile - builder.AppendSwitchIfNotNull("--win32manifest:", win32manifest) - - // VisualStudioStyleErrors - if vserrors then - builder.AppendSwitch("--vserrors") - - if utf8output then - builder.AppendSwitch("--utf8output") - - // When building using the fsc task, always emit the "fullpaths" flag to make the output easier - // for the user to parse - builder.AppendSwitch("--fullpaths") - - // When building using the fsc task, also emit "flaterrors" to ensure that multi-line error messages - // aren't trimmed - builder.AppendSwitch("--flaterrors") - - // OtherFlags - must be second-to-last - builder.AppendSwitchUnquotedIfNotNull("", otherFlags) - capturedArguments <- builder.CapturedArguments() - - // Sources - these have to go last - builder.AppendFileNamesIfNotNull(sources, " ") - capturedFilenames <- builder.CapturedFilenames() - let s = builder.ToString() - if fsc.BuildEngine <> null then // when doing simple unit tests using API, no BuildEnginer/Logger is attached - fsc.BuildEngine.LogCustomEvent( new FscCustomBuildEventArgs(s) ) - s - // expose this to internal components (for nunit testing) - member internal fsc.InternalGenerateCommandLineCommands() = - fsc.GenerateCommandLineCommands() - member internal fsc.InternalExecuteTool(pathToTool, responseFileCommands, commandLineCommands) = - fsc.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands) - -module Attributes = - //[] - do() diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/Fsc.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/Fsc.fsi deleted file mode 100644 index ccf54bdb..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Build/Fsc.fsi +++ /dev/null @@ -1,56 +0,0 @@ -#light - -/// This namespace contains FSharp.PowerPack extensions for FSharp.Build.dll. MSBuild tasks for the FsYacc and FsLex tools. -namespace Microsoft.FSharp.Build -type FscCustomBuildEventArgs = class - inherit Microsoft.Build.Framework.CustomBuildEventArgs - new : commandLine:string -> FscCustomBuildEventArgs - member CommandLine : string - end - -type Fsc = class - inherit Microsoft.Build.Utilities.ToolTask - new : unit -> Fsc - override GenerateCommandLineCommands : unit -> System.String - override GenerateFullPathToTool : unit -> System.String - override ToolName : System.String - override StandardErrorEncoding : System.Text.Encoding - override StandardOutputEncoding : System.Text.Encoding - - member internal InternalGenerateCommandLineCommands : unit -> System.String - member BaseAddress : string with get,set - member CodePage : string with get,set - member DebugSymbols : bool with get,set - member DebugType : string with get,set - member DefineConstants : Microsoft.Build.Framework.ITaskItem [] with get,set - member DisabledWarnings : string [] with get,set - member DocumentationFile : string with get,set - member GenerateInterfaceFile : string with get,set - member KeyFile : string with get,set - member NoFramework : bool with get,set - member NoWarn : string with get,set - member Optimize : bool with get,set - member Tailcalls : bool with get,set - member OtherFlags : string with get,set - member OutputAssembly : string with get,set - member PdbFile : string with get,set - member Platform : string with get,set - member VersionFile : string with get,set - member References : Microsoft.Build.Framework.ITaskItem [] with get,set - member ReferencePath : string with get,set - member Resources : Microsoft.Build.Framework.ITaskItem [] with get,set - member Sources : Microsoft.Build.Framework.ITaskItem [] with get,set - member TargetType : string with get,set -#if FX_ATLEAST_35 -#else - member ToolExe : string with get,set -#endif - member ToolPath : string with get,set - member TreatWarningsAsErrors : bool with get,set - member Utf8Output : bool with get,set - member VisualStudioStyleErrors : bool with get,set - member WarningLevel : string with get,set - member WarningsAsErrors : string with get,set - member Win32ResourceFile : string with get,set - member Win32ManifestFile : string with get,set - end diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler-proto/FSharp.Compiler-proto.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler-proto/FSharp.Compiler-proto.fsproj deleted file mode 100644 index 9da38404..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler-proto/FSharp.Compiler-proto.fsproj +++ /dev/null @@ -1,481 +0,0 @@ - - - - ..\.. - Proto - - - - - AnyCPU - {33E0FB8C-93DC-4AD7-9DCD-9FBDA6C2F061} - Library - FSharp.Compiler-proto - INTERNALIZED_POWER_PACK;BUILDING_PROTO;BUILDING_WITH_LKG;COMPILER;INCLUDE_METADATA_READER;INCLUDE_METADATA_WRITER;$(DefineConstants) - TRYING_TO_FIX_4577;$(DefineConstants) - $(DisabledWarnings);35;44;62;9;60;86;47 - LKG - true - v2.0 - FSharp.Compiler-proto.fsi - - - - - --light-off --lexlib Internal.Utilities.Text.Lexing - lex.mll - - - --light-off --lexlib Internal.Utilities.Text.Lexing - illex.mll - - - Microsoft.FSharp.Compiler.Parser - Microsoft.FSharp.Compiler - --light-off --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - pars.mly - - - Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser - Microsoft.FSharp.Compiler.AbstractIL - --light-off --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - ilpars.mly - - - lazy.fsi - - - lazy.fs - - - sformat.fsi - - - sformat.fs - - - sr.fsi - - - sr.fs - - - prim-lexing.fsi - - - prim-lexing.fs - - - prim-parsing.fsi - - - prim-parsing.fs - - - Compat.String.fsi - - - Compat.String.fs - - - Compat.List.fsi - - - Compat.List.fs - - - resizearray.fsi - - - resizearray.fs - - - HashMultiMap.fsi - - - HashMultiMap.fs - - - TaggedCollections.fsi - - - TaggedCollections.fs - - - pervasives.fsi - - - pervasives.fs - - - arg.fsi - - - arg.fs - - - buffer.fsi - - - buffer.fs - - - hashtbl.fsi - - - hashtbl.fs - - - sys.fsi - - - sys.fs - - - filename.fsi - - - filename.fs - - - lexing.fsi - - - lexing.fs - - - illib.ml - - - zmap.mli - - - zmap.ml - - - zset.mli - - - zset.ml - - - bytes.mli - - - bytes.ml - - - ildiag.mli - - - ildiag.ml - - - ReferenceResolution.fs - - - il.mli - - - il.ml - - - ilx.mli - - - ilx.ml - - - ilascii.mli - - - ilascii.ml - - - ilprint.mli - - - ilprint.ml - - - ilmorph.mli - - - ilmorph.ml - - - ilsupp.mli - - - ilsupp.ml - - - - - ilbinary.mli - - - ilbinary.ml - - - lib.ml - - - range.mli - - - range.ml - - - ErrorLogger.fs - - - InternalCollections.fsi - - - InternalCollections.fs - - - - ilread.mli - - - ilread.ml - - - ilwrite.mli - - - ilwrite.ml - - - ilreflect.fs - - - CompilerLocationUtils.fs - - - PrettyNaming.fs - - - ilxsettings.ml - - - ilxconfig.ml - - - msilxlib.ml - - - pubclo.mli - - - pubclo.ml - - - cu_erase.ml - - - ilxerase.ml - - - InternalFileSystemUtils.fsi - - - InternalFileSystemUtils.fs - - - unilex.mli - - - unilex.ml - - - layout.mli - - - layout.ml - - - ast.ml - - - - lexhelp.mli - - - lexhelp.ml - - - - sreflect.mli - - - sreflect.ml - - - tast.ml - - - env.ml - - - tastops.mli - - - tastops.ml - - - augment.mli - - - augment.ml - - - pickle.mli - - - pickle.ml - - - lexfilter.ml - - - import.mli - - - import.ml - - - infos.ml - - - typrelns.ml - - - patcompile.mli - - - patcompile.ml - - - outcome.mli - - - outcome.ml - - - csolve.mli - - - csolve.ml - - - formats.mli - - - formats.ml - - - nameres.mli - - - nameres.ml - - - unsolved.ml - - - creflect.mli - - - creflect.ml - - - check.ml - - - tc.mli - - - tc.ml - - - opt.mli - - - opt.ml - - - detuple.mli - - - detuple.ml - - - tlr.mli - - - tlr.ml - - - lowertop.ml - - - ilxgen.mli - - - ilxgen.ml - - - TraceCall.fs - - - build.mli - - - build.ml - - - fscopts.mli - - - fscopts.ml - - - IncrementalBuild.fsi - - - IncrementalBuild.fs - - - service.mli - - - service.ml - - - - - ISymWrapper - ISymWrapper.dll - ..\..\..\tools\.NET Framework 2.0\ISymWrapper.dll - True - - - - - - - - System.Drawing - System.Drawing.dll - False - - - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj deleted file mode 100644 index 32c01ca7..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj +++ /dev/null @@ -1,46 +0,0 @@ - - - - ..\.. - - - - - Debug - AnyCPU - {649FA588-F02E-457C-9FCF-87E46407481E} - Library - FSharp.Compiler.Interactive.Settings - v2.0 - 512 - $(DisabledWarnings) - - - - assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs - - - fsiaux.fsi - - - fsiaux.fs - - - fsiattrs.fs - - - - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj deleted file mode 100644 index 2ff8b573..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj +++ /dev/null @@ -1,37 +0,0 @@ - - - - ..\.. - - - - - Debug - AnyCPU - {d5870cf0-ed51-4cbc-b3d7-6f56da84ac06} - Library - FSharp.Compiler.Server.Shared - 512 - $(DisabledWarnings) - $(OtherFlags) --publicasinternal - - - - assemblyinfo.FSharp.Compiler.Server.Shared.dll.fs - - - fsiserver.fs - - - - - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj deleted file mode 100644 index 463a99f6..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj +++ /dev/null @@ -1,490 +0,0 @@ - - - - ..\.. - - - - - Debug - AnyCPU - Library - FSharp.Compiler - INTERNALIZED_POWER_PACK;COMPILER;INCLUDE_METADATA_READER;INCLUDE_METADATA_WRITER;$(DefineConstants) - TRYING_TO_FIX_4577;$(DefineConstants) - $(DisabledWarnings);35;44;62;9;60;86;47 - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - true - 0x06800000 - $(OtherFlags) --publicasinternal - v2.0 - FSharp.Compiler.fsi - - - - FSStrings.resx - - - assemblyinfo.FSharp.Compiler.dll.fs - - - --light-off --lexlib Internal.Utilities.Text.Lexing - lex.mll - - - --light-off --lexlib Internal.Utilities.Text.Lexing - illex.mll - - - Microsoft.FSharp.Compiler.Parser - Microsoft.FSharp.Compiler - --light-off --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - pars.mly - - - Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser - Microsoft.FSharp.Compiler.AbstractIL - --light-off --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - ilpars.mly - - - lazy.fsi - - - lazy.fs - - - sformat.fsi - - - sformat.fs - - - sr.fsi - - - sr.fs - - - prim-lexing.fsi - - - prim-lexing.fs - - - prim-parsing.fsi - - - prim-parsing.fs - - - Compat.String.fsi - - - Compat.String.fs - - - Compat.List.fsi - - - Compat.List.fs - - - resizearray.fsi - - - resizearray.fs - - - HashMultiMap.fsi - - - HashMultiMap.fs - - - TaggedCollections.fsi - - - TaggedCollections.fs - - - pervasives.fsi - - - pervasives.fs - - - arg.fsi - - - arg.fs - - - buffer.fsi - - - buffer.fs - - - hashtbl.fsi - - - hashtbl.fs - - - sys.fsi - - - sys.fs - - - filename.fsi - - - filename.fs - - - lexing.fsi - - - lexing.fs - - - illib.ml - - - zmap.mli - - - zmap.ml - - - zset.mli - - - zset.ml - - - bytes.mli - - - bytes.ml - - - ildiag.mli - - - ildiag.ml - - - ReferenceResolution.fs - - - il.mli - - - il.ml - - - ilx.mli - - - ilx.ml - - - ilascii.mli - - - ilascii.ml - - - ilprint.mli - - - ilprint.ml - - - ilmorph.mli - - - ilmorph.ml - - - ilsupp.mli - - - ilsupp.ml - - - - - ilbinary.mli - - - ilbinary.ml - - - lib.ml - - - range.mli - - - range.ml - - - ErrorLogger.fs - - - InternalCollections.fsi - - - InternalCollections.fs - - - ilread.mli - - - ilread.ml - - - ilwrite.mli - - - ilwrite.ml - - - ilreflect.fs - - - CompilerLocationUtils.fs - - - PrettyNaming.fs - - - ilxsettings.ml - - - ilxconfig.ml - - - msilxlib.ml - - - pubclo.mli - - - pubclo.ml - - - cu_erase.ml - - - ilxerase.ml - - - InternalFileSystemUtils.fsi - - - InternalFileSystemUtils.fs - - - unilex.mli - - - unilex.ml - - - layout.mli - - - layout.ml - - - ast.ml - - - - lexhelp.mli - - - lexhelp.ml - - - - sreflect.mli - - - sreflect.ml - - - tast.ml - - - env.ml - - - tastops.mli - - - tastops.ml - - - augment.mli - - - augment.ml - - - pickle.mli - - - pickle.ml - - - lexfilter.ml - - - import.mli - - - import.ml - - - infos.ml - - - typrelns.ml - - - patcompile.mli - - - patcompile.ml - - - outcome.mli - - - outcome.ml - - - csolve.mli - - - csolve.ml - - - formats.mli - - - formats.ml - - - nameres.mli - - - nameres.ml - - - unsolved.ml - - - creflect.mli - - - creflect.ml - - - check.ml - - - tc.mli - - - tc.ml - - - opt.mli - - - opt.ml - - - detuple.mli - - - detuple.ml - - - tlr.mli - - - tlr.ml - - - lowertop.ml - - - ilxgen.mli - - - ilxgen.ml - - - TraceCall.fs - - - build.mli - - - build.ml - - - fscopts.mli - - - fscopts.ml - - - IncrementalBuild.fsi - - - IncrementalBuild.fs - - - service.mli - - - service.ml - - - - - ISymWrapper - ISymWrapper.dll - ..\..\..\tools\.NET Framework 2.0\ISymWrapper.dll - True - - - - - - - - System.Drawing - System.Drawing.dll - False - - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/illex.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/illex.fs deleted file mode 100644 index dabefd9a..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/illex.fs +++ /dev/null @@ -1,749 +0,0 @@ -#light "off" -# 2 "..\..\absil\illex.mll" - -// (c) Microsoft Corporation 2005-2009. - -module Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiLexer - -open Internal.Utilities -open Internal.Utilities.Text -open Internal.Utilities.Text.Lexing -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -module Ildiag = Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -module Ilpars = Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser -module Ilascii = Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiConstants - - -open Ildiag -open Ilpars -open Ilascii - -let lexeme (lexbuf : LexBuffer) = new System.String(lexbuf.Lexeme) - -let unexpected_char lexbuf = - dprintf "Unexpected character '%s'" (lexeme lexbuf); - raise Parsing.RecoverableParseError ;; - -let unquote n m s = - String.sub s n (String.length s-(n+m));; - -(* -------------------------------------------------------------------- - * STRING LITERALS - * -------------------------------------------------------------------- *) - -let string_buffer = Buffer.create 256 -let reset_string_buffer () = Buffer.clear string_buffer -let store_string_char c = Buffer.add_char string_buffer c -let get_stored_string () =Buffer.contents string_buffer - -let escape = function - | 'n' -> '\010' - | 'r' -> '\013' - | 'b' -> '\008' - | 't' -> '\009' - | c -> c - -(* -------------------------------------------------------------------- - * Keywords - * -------------------------------------------------------------------- *) - -let keywords = lazy - -[ - "void",VOID -; "bool",BOOL -; "bytearray",BYTEARRAY -; "cdecl",CDECL -; "char",CHAR -; "class",CLASS -; "default",DEFAULT -; "explicit",EXPLICIT -; "fastcall",FASTCALL -; "float32",FLOAT32 -; "float64",FLOAT64 -; "instance",INSTANCE -; "int",INT -; "int16",INT16 -; "int32",INT32 -; "int64",INT64 -; "int8",INT8 -; "method",METHOD -; "native",NATIVE -; "object", OBJECT -; "stdcall",STDCALL -; "string",STRING -; "thiscall",THISCALL -; "typedref",TYPEDREF -; "uint",UINT -; "uint16",UINT16 -; "uint32",UINT32 -; "uint64",UINT64 -; "uint8",UINT8 -; "unmanaged",UNMANAGED -; "unsigned",UNSIGNED -; "value",VALUE -; "valuetype",VALUETYPE -; "vararg",VARARG - -] - -(* -------------------------------------------------------------------- - * Instructions - * -------------------------------------------------------------------- *) - -let addTable t f l = List.iter (fun (x,i) -> Hashtbl.add t (String.concat "." x) (f i)) (Lazy.force l) - -let kwd_instr_table = - lazy begin - let t = Hashtbl.create 1000 in - List.iter (fun (x,y) -> Hashtbl.add t x y) (Lazy.force keywords); - addTable t (fun i -> INSTR_NONE i) none_instrs; - addTable t (fun i -> INSTR_ARG i) arg_instrs; - addTable t (fun i -> INSTR_LOC i) loc_instrs; - addTable t (fun i -> INSTR_I i) i32_instrs; - addTable t (fun i -> INSTR_I32_I32 i) i32_i32_instrs; - addTable t (fun i -> INSTR_I8 i) i64_instrs; - addTable t (fun i -> INSTR_R i) real_instrs; - addTable t (fun i -> INSTR_METHOD i) method_instrs; - //addTable t (fun i -> INSTR_FIELD i) field_instrs; - addTable t (fun i -> INSTR_TYPE i) type_instrs; - addTable t (fun i -> INSTR_INT_TYPE i) int_type_instrs; - addTable t (fun i -> INSTR_VALUETYPE i) valuetype_instrs; - addTable t (fun i -> INSTR_STRING i) string_instrs; - //addTable t (fun i -> INSTR_SIG i) sig_instrs; - addTable t (fun i -> INSTR_TOK i) tok_instrs; - //addTable t (fun i -> INSTR_SWITCH i) switch_instrs; - t - end - -let kwd_or_instr s = Hashtbl.find (Lazy.force kwd_instr_table) s (* words *) - -let eval = function - | '0' -> 0 | '1' -> 1 | '2' -> 2 | '3' -> 3 | '4' -> 4 | '5' -> 5 - | '6' -> 6 | '7' -> 7 | '8' -> 8 | '9' -> 9 - | 'A' -> 10 | 'B' -> 11 | 'C' -> 12 | 'D' -> 13 | 'E' -> 14 | 'F' -> 15 - | 'a' -> 10 | 'b' -> 11 | 'c' -> 12 | 'd' -> 13 | 'e' -> 14 | 'f' -> 15 - | _ -> failwith "bad hexbyte" - -let kwd_or_instr_or_id s = if Hashtbl.mem (Lazy.force kwd_instr_table) s then kwd_or_instr s else VAL_ID s - - -# 133 "illex.fs" -let trans : uint16[] array = - [| - (* State 0 *) - [| 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 1us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 2us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 128us; 4us; 129us; 4us; 130us; 4us; 131us; 4us; 132us; 4us; 133us; 4us; 134us; 4us; 135us; 4us; 136us; 4us; 137us; 4us; 138us; 4us; 139us; 4us; 140us; 4us; 141us; 4us; 142us; 4us; 143us; 4us; 144us; 4us; 145us; 4us; 146us; 4us; 147us; 4us; 148us; 4us; 149us; 4us; 150us; 4us; 151us; 4us; 152us; 4us; 153us; 4us; 154us; 4us; 155us; 4us; 156us; 4us; 157us; 4us; 158us; 4us; 159us; 4us; 160us; 4us; 161us; 4us; 162us; 4us; 163us; 4us; 164us; 4us; 165us; 4us; 166us; 4us; 167us; 4us; 168us; 4us; 169us; 4us; 170us; 4us; 171us; 4us; 172us; 4us; 173us; 4us; 174us; 4us; 175us; 4us; 176us; 4us; 177us; 4us; 178us; 4us; 179us; 4us; 180us; 4us; 181us; 4us; 182us; 4us; 183us; 4us; 184us; 4us; 185us; 4us; 186us; 4us; 187us; 4us; 188us; 4us; 189us; 4us; 190us; 4us; 191us; 4us; 192us; 4us; 193us; 4us; 194us; 4us; 195us; 4us; 196us; 4us; 197us; 4us; 198us; 4us; 199us; 4us; 200us; 4us; 201us; 4us; 202us; 4us; 203us; 4us; 204us; 4us; 205us; 4us; 206us; 4us; 207us; 4us; 208us; 4us; 209us; 4us; 210us; 4us; 211us; 4us; 212us; 4us; 213us; 4us; 214us; 4us; 215us; 4us; 216us; 4us; 217us; 4us; 218us; 4us; 219us; 4us; 220us; 4us; 221us; 4us; 222us; 4us; 223us; 4us; 224us; 4us; 225us; 4us; 226us; 4us; 227us; 4us; 228us; 4us; 229us; 4us; 230us; 4us; 231us; 4us; 232us; 4us; 233us; 4us; 234us; 4us; 235us; 4us; 236us; 4us; 237us; 4us; 238us; 4us; 239us; 4us; 240us; 4us; 241us; 4us; 242us; 4us; 243us; 4us; 244us; 4us; 245us; 4us; 246us; 4us; 247us; 4us; 248us; 4us; 249us; 4us; 250us; 4us; 251us; 4us; 252us; 4us; 253us; 4us; 254us; 4us; 255us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 4us; 3us; |]; - (* State 1 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 2 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 5us; 65535us; 65535us; 6us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 7us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 7us; 65535us; 65535us; 65535us; 65535us; 65535us; 7us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 7us; 65535us; 65535us; 65535us; 7us; 65535us; 7us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 3 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 4 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 5 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 8us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 8us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 6 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 8us; 5us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 8us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 7 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 8 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 8us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 8us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 9 *) - [| 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 10us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 11us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 128us; 13us; 129us; 13us; 130us; 13us; 131us; 13us; 132us; 13us; 133us; 13us; 134us; 13us; 135us; 13us; 136us; 13us; 137us; 13us; 138us; 13us; 139us; 13us; 140us; 13us; 141us; 13us; 142us; 13us; 143us; 13us; 144us; 13us; 145us; 13us; 146us; 13us; 147us; 13us; 148us; 13us; 149us; 13us; 150us; 13us; 151us; 13us; 152us; 13us; 153us; 13us; 154us; 13us; 155us; 13us; 156us; 13us; 157us; 13us; 158us; 13us; 159us; 13us; 160us; 13us; 161us; 13us; 162us; 13us; 163us; 13us; 164us; 13us; 165us; 13us; 166us; 13us; 167us; 13us; 168us; 13us; 169us; 13us; 170us; 13us; 171us; 13us; 172us; 13us; 173us; 13us; 174us; 13us; 175us; 13us; 176us; 13us; 177us; 13us; 178us; 13us; 179us; 13us; 180us; 13us; 181us; 13us; 182us; 13us; 183us; 13us; 184us; 13us; 185us; 13us; 186us; 13us; 187us; 13us; 188us; 13us; 189us; 13us; 190us; 13us; 191us; 13us; 192us; 13us; 193us; 13us; 194us; 13us; 195us; 13us; 196us; 13us; 197us; 13us; 198us; 13us; 199us; 13us; 200us; 13us; 201us; 13us; 202us; 13us; 203us; 13us; 204us; 13us; 205us; 13us; 206us; 13us; 207us; 13us; 208us; 13us; 209us; 13us; 210us; 13us; 211us; 13us; 212us; 13us; 213us; 13us; 214us; 13us; 215us; 13us; 216us; 13us; 217us; 13us; 218us; 13us; 219us; 13us; 220us; 13us; 221us; 13us; 222us; 13us; 223us; 13us; 224us; 13us; 225us; 13us; 226us; 13us; 227us; 13us; 228us; 13us; 229us; 13us; 230us; 13us; 231us; 13us; 232us; 13us; 233us; 13us; 234us; 13us; 235us; 13us; 236us; 13us; 237us; 13us; 238us; 13us; 239us; 13us; 240us; 13us; 241us; 13us; 242us; 13us; 243us; 13us; 244us; 13us; 245us; 13us; 246us; 13us; 247us; 13us; 248us; 13us; 249us; 13us; 250us; 13us; 251us; 13us; 252us; 13us; 253us; 13us; 254us; 13us; 255us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 13us; 12us; |]; - (* State 10 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 11 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 15us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16us; 65535us; 65535us; 65535us; 65535us; 65535us; 16us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16us; 65535us; 65535us; 65535us; 16us; 65535us; 16us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 12 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 13 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 14 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 15 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17us; 14us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 16 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 17 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 18 *) - [| 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 52us; 52us; 53us; 53us; 52us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 52us; 22us; 43us; 53us; 51us; 53us; 23us; 42us; 24us; 25us; 21us; 32us; 19us; 41us; 20us; 28us; 33us; 34us; 34us; 34us; 34us; 34us; 34us; 34us; 34us; 34us; 31us; 53us; 29us; 53us; 30us; 51us; 51us; 35us; 35us; 35us; 35us; 35us; 36us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 26us; 53us; 27us; 53us; 51us; 51us; 37us; 38us; 39us; 40us; 35us; 35us; 51us; 51us; 50us; 51us; 51us; 44us; 47us; 48us; 51us; 51us; 51us; 46us; 45us; 51us; 49us; 51us; 51us; 51us; 51us; 51us; 53us; 53us; 53us; 53us; 53us; 128us; 51us; 129us; 51us; 130us; 51us; 131us; 51us; 132us; 51us; 133us; 51us; 134us; 51us; 135us; 51us; 136us; 51us; 137us; 51us; 138us; 51us; 139us; 51us; 140us; 51us; 141us; 51us; 142us; 51us; 143us; 51us; 144us; 51us; 145us; 51us; 146us; 51us; 147us; 51us; 148us; 51us; 149us; 51us; 150us; 51us; 151us; 51us; 152us; 51us; 153us; 51us; 154us; 51us; 155us; 51us; 156us; 51us; 157us; 51us; 158us; 51us; 159us; 51us; 160us; 51us; 161us; 51us; 162us; 51us; 163us; 51us; 164us; 51us; 165us; 51us; 166us; 51us; 167us; 51us; 168us; 51us; 169us; 51us; 170us; 51us; 171us; 51us; 172us; 51us; 173us; 51us; 174us; 51us; 175us; 51us; 176us; 51us; 177us; 51us; 178us; 51us; 179us; 51us; 180us; 51us; 181us; 51us; 182us; 51us; 183us; 51us; 184us; 51us; 185us; 51us; 186us; 51us; 187us; 51us; 188us; 51us; 189us; 51us; 190us; 51us; 191us; 51us; 192us; 51us; 193us; 51us; 194us; 51us; 195us; 51us; 196us; 51us; 197us; 51us; 198us; 51us; 199us; 51us; 200us; 51us; 201us; 51us; 202us; 51us; 203us; 51us; 204us; 51us; 205us; 51us; 206us; 51us; 207us; 51us; 208us; 51us; 209us; 51us; 210us; 51us; 211us; 51us; 212us; 51us; 213us; 51us; 214us; 51us; 215us; 51us; 216us; 51us; 217us; 51us; 218us; 51us; 219us; 51us; 220us; 51us; 221us; 51us; 222us; 51us; 223us; 51us; 224us; 51us; 225us; 51us; 226us; 51us; 227us; 51us; 228us; 51us; 229us; 51us; 230us; 51us; 231us; 51us; 232us; 51us; 233us; 51us; 234us; 51us; 235us; 51us; 236us; 51us; 237us; 51us; 238us; 51us; 239us; 51us; 240us; 51us; 241us; 51us; 242us; 51us; 243us; 51us; 244us; 51us; 245us; 51us; 246us; 51us; 247us; 51us; 248us; 51us; 249us; 51us; 250us; 51us; 251us; 51us; 252us; 51us; 253us; 51us; 254us; 51us; 255us; 51us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 53us; 54us; |]; - (* State 19 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 20 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 170us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 171us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 21 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 22 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 23 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 24 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 25 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 26 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 27 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 28 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 29 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 30 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 31 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 169us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 32 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 167us; 167us; 167us; 167us; 167us; 167us; 167us; 167us; 167us; 167us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 33 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 157us; 65535us; 156us; 156us; 156us; 156us; 156us; 156us; 156us; 156us; 156us; 156us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 158us; 158us; 158us; 158us; 159us; 158us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 158us; 158us; 158us; 158us; 159us; 158us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 164us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 34 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 157us; 65535us; 156us; 156us; 156us; 156us; 156us; 156us; 156us; 156us; 156us; 156us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 158us; 158us; 158us; 158us; 159us; 158us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 158us; 158us; 158us; 158us; 159us; 158us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 35 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 127us; 127us; 127us; 127us; 127us; 127us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 127us; 127us; 127us; 127us; 127us; 127us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 36 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 127us; 127us; 127us; 127us; 127us; 149us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 127us; 127us; 127us; 127us; 127us; 127us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 37 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 127us; 127us; 127us; 127us; 127us; 127us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 127us; 127us; 127us; 148us; 127us; 127us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 38 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 127us; 127us; 127us; 127us; 127us; 127us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 127us; 127us; 127us; 127us; 135us; 127us; 138us; 55us; 55us; 55us; 55us; 137us; 55us; 136us; 140us; 55us; 55us; 139us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 39 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 127us; 127us; 127us; 127us; 127us; 127us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 127us; 127us; 127us; 127us; 129us; 127us; 132us; 55us; 55us; 55us; 55us; 131us; 55us; 133us; 130us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 40 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 127us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 127us; 127us; 127us; 127us; 127us; 127us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 127us; 127us; 127us; 127us; 127us; 127us; 55us; 55us; 128us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 41 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 42 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 43 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 44 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 102us; 103us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 45 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 92us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 90us; 91us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 46 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 89us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 47 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 88us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 48 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 84us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 49 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 81us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 50 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 51 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 55us; 129us; 55us; 130us; 55us; 131us; 55us; 132us; 55us; 133us; 55us; 134us; 55us; 135us; 55us; 136us; 55us; 137us; 55us; 138us; 55us; 139us; 55us; 140us; 55us; 141us; 55us; 142us; 55us; 143us; 55us; 144us; 55us; 145us; 55us; 146us; 55us; 147us; 55us; 148us; 55us; 149us; 55us; 150us; 55us; 151us; 55us; 152us; 55us; 153us; 55us; 154us; 55us; 155us; 55us; 156us; 55us; 157us; 55us; 158us; 55us; 159us; 55us; 160us; 55us; 161us; 55us; 162us; 55us; 163us; 55us; 164us; 55us; 165us; 55us; 166us; 55us; 167us; 55us; 168us; 55us; 169us; 55us; 170us; 55us; 171us; 55us; 172us; 55us; 173us; 55us; 174us; 55us; 175us; 55us; 176us; 55us; 177us; 55us; 178us; 55us; 179us; 55us; 180us; 55us; 181us; 55us; 182us; 55us; 183us; 55us; 184us; 55us; 185us; 55us; 186us; 55us; 187us; 55us; 188us; 55us; 189us; 55us; 190us; 55us; 191us; 55us; 192us; 55us; 193us; 55us; 194us; 55us; 195us; 55us; 196us; 55us; 197us; 55us; 198us; 55us; 199us; 55us; 200us; 55us; 201us; 55us; 202us; 55us; 203us; 55us; 204us; 55us; 205us; 55us; 206us; 55us; 207us; 55us; 208us; 55us; 209us; 55us; 210us; 55us; 211us; 55us; 212us; 55us; 213us; 55us; 214us; 55us; 215us; 55us; 216us; 55us; 217us; 55us; 218us; 55us; 219us; 55us; 220us; 55us; 221us; 55us; 222us; 55us; 223us; 55us; 224us; 55us; 225us; 55us; 226us; 55us; 227us; 55us; 228us; 55us; 229us; 55us; 230us; 55us; 231us; 55us; 232us; 55us; 233us; 55us; 234us; 55us; 235us; 55us; 236us; 55us; 237us; 55us; 238us; 55us; 239us; 55us; 240us; 55us; 241us; 55us; 242us; 55us; 243us; 55us; 244us; 55us; 245us; 55us; 246us; 55us; 247us; 55us; 248us; 55us; 249us; 55us; 250us; 55us; 251us; 55us; 252us; 55us; 253us; 55us; 254us; 55us; 255us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 52 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 53 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 54 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 55 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 56 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 57 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 58us; 129us; 58us; 130us; 58us; 131us; 58us; 132us; 58us; 133us; 58us; 134us; 58us; 135us; 58us; 136us; 58us; 137us; 58us; 138us; 58us; 139us; 58us; 140us; 58us; 141us; 58us; 142us; 58us; 143us; 58us; 144us; 58us; 145us; 58us; 146us; 58us; 147us; 58us; 148us; 58us; 149us; 58us; 150us; 58us; 151us; 58us; 152us; 58us; 153us; 58us; 154us; 58us; 155us; 58us; 156us; 58us; 157us; 58us; 158us; 58us; 159us; 58us; 160us; 58us; 161us; 58us; 162us; 58us; 163us; 58us; 164us; 58us; 165us; 58us; 166us; 58us; 167us; 58us; 168us; 58us; 169us; 58us; 170us; 58us; 171us; 58us; 172us; 58us; 173us; 58us; 174us; 58us; 175us; 58us; 176us; 58us; 177us; 58us; 178us; 58us; 179us; 58us; 180us; 58us; 181us; 58us; 182us; 58us; 183us; 58us; 184us; 58us; 185us; 58us; 186us; 58us; 187us; 58us; 188us; 58us; 189us; 58us; 190us; 58us; 191us; 58us; 192us; 58us; 193us; 58us; 194us; 58us; 195us; 58us; 196us; 58us; 197us; 58us; 198us; 58us; 199us; 58us; 200us; 58us; 201us; 58us; 202us; 58us; 203us; 58us; 204us; 58us; 205us; 58us; 206us; 58us; 207us; 58us; 208us; 58us; 209us; 58us; 210us; 58us; 211us; 58us; 212us; 58us; 213us; 58us; 214us; 58us; 215us; 58us; 216us; 58us; 217us; 58us; 218us; 58us; 219us; 58us; 220us; 58us; 221us; 58us; 222us; 58us; 223us; 58us; 224us; 58us; 225us; 58us; 226us; 58us; 227us; 58us; 228us; 58us; 229us; 58us; 230us; 58us; 231us; 58us; 232us; 58us; 233us; 58us; 234us; 58us; 235us; 58us; 236us; 58us; 237us; 58us; 238us; 58us; 239us; 58us; 240us; 58us; 241us; 58us; 242us; 58us; 243us; 58us; 244us; 58us; 245us; 58us; 246us; 58us; 247us; 58us; 248us; 58us; 249us; 58us; 250us; 58us; 251us; 58us; 252us; 58us; 253us; 58us; 254us; 58us; 255us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 58 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 59us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 59us; 65535us; 65535us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 65535us; 65535us; 65535us; 65535us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 59us; 129us; 59us; 130us; 59us; 131us; 59us; 132us; 59us; 133us; 59us; 134us; 59us; 135us; 59us; 136us; 59us; 137us; 59us; 138us; 59us; 139us; 59us; 140us; 59us; 141us; 59us; 142us; 59us; 143us; 59us; 144us; 59us; 145us; 59us; 146us; 59us; 147us; 59us; 148us; 59us; 149us; 59us; 150us; 59us; 151us; 59us; 152us; 59us; 153us; 59us; 154us; 59us; 155us; 59us; 156us; 59us; 157us; 59us; 158us; 59us; 159us; 59us; 160us; 59us; 161us; 59us; 162us; 59us; 163us; 59us; 164us; 59us; 165us; 59us; 166us; 59us; 167us; 59us; 168us; 59us; 169us; 59us; 170us; 59us; 171us; 59us; 172us; 59us; 173us; 59us; 174us; 59us; 175us; 59us; 176us; 59us; 177us; 59us; 178us; 59us; 179us; 59us; 180us; 59us; 181us; 59us; 182us; 59us; 183us; 59us; 184us; 59us; 185us; 59us; 186us; 59us; 187us; 59us; 188us; 59us; 189us; 59us; 190us; 59us; 191us; 59us; 192us; 59us; 193us; 59us; 194us; 59us; 195us; 59us; 196us; 59us; 197us; 59us; 198us; 59us; 199us; 59us; 200us; 59us; 201us; 59us; 202us; 59us; 203us; 59us; 204us; 59us; 205us; 59us; 206us; 59us; 207us; 59us; 208us; 59us; 209us; 59us; 210us; 59us; 211us; 59us; 212us; 59us; 213us; 59us; 214us; 59us; 215us; 59us; 216us; 59us; 217us; 59us; 218us; 59us; 219us; 59us; 220us; 59us; 221us; 59us; 222us; 59us; 223us; 59us; 224us; 59us; 225us; 59us; 226us; 59us; 227us; 59us; 228us; 59us; 229us; 59us; 230us; 59us; 231us; 59us; 232us; 59us; 233us; 59us; 234us; 59us; 235us; 59us; 236us; 59us; 237us; 59us; 238us; 59us; 239us; 59us; 240us; 59us; 241us; 59us; 242us; 59us; 243us; 59us; 244us; 59us; 245us; 59us; 246us; 59us; 247us; 59us; 248us; 59us; 249us; 59us; 250us; 59us; 251us; 59us; 252us; 59us; 253us; 59us; 254us; 59us; 255us; 59us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 59 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 60us; 65535us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 65535us; 65535us; 65535us; 65535us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 61us; 129us; 61us; 130us; 61us; 131us; 61us; 132us; 61us; 133us; 61us; 134us; 61us; 135us; 61us; 136us; 61us; 137us; 61us; 138us; 61us; 139us; 61us; 140us; 61us; 141us; 61us; 142us; 61us; 143us; 61us; 144us; 61us; 145us; 61us; 146us; 61us; 147us; 61us; 148us; 61us; 149us; 61us; 150us; 61us; 151us; 61us; 152us; 61us; 153us; 61us; 154us; 61us; 155us; 61us; 156us; 61us; 157us; 61us; 158us; 61us; 159us; 61us; 160us; 61us; 161us; 61us; 162us; 61us; 163us; 61us; 164us; 61us; 165us; 61us; 166us; 61us; 167us; 61us; 168us; 61us; 169us; 61us; 170us; 61us; 171us; 61us; 172us; 61us; 173us; 61us; 174us; 61us; 175us; 61us; 176us; 61us; 177us; 61us; 178us; 61us; 179us; 61us; 180us; 61us; 181us; 61us; 182us; 61us; 183us; 61us; 184us; 61us; 185us; 61us; 186us; 61us; 187us; 61us; 188us; 61us; 189us; 61us; 190us; 61us; 191us; 61us; 192us; 61us; 193us; 61us; 194us; 61us; 195us; 61us; 196us; 61us; 197us; 61us; 198us; 61us; 199us; 61us; 200us; 61us; 201us; 61us; 202us; 61us; 203us; 61us; 204us; 61us; 205us; 61us; 206us; 61us; 207us; 61us; 208us; 61us; 209us; 61us; 210us; 61us; 211us; 61us; 212us; 61us; 213us; 61us; 214us; 61us; 215us; 61us; 216us; 61us; 217us; 61us; 218us; 61us; 219us; 61us; 220us; 61us; 221us; 61us; 222us; 61us; 223us; 61us; 224us; 61us; 225us; 61us; 226us; 61us; 227us; 61us; 228us; 61us; 229us; 61us; 230us; 61us; 231us; 61us; 232us; 61us; 233us; 61us; 234us; 61us; 235us; 61us; 236us; 61us; 237us; 61us; 238us; 61us; 239us; 61us; 240us; 61us; 241us; 61us; 242us; 61us; 243us; 61us; 244us; 61us; 245us; 61us; 246us; 61us; 247us; 61us; 248us; 61us; 249us; 61us; 250us; 61us; 251us; 61us; 252us; 61us; 253us; 61us; 254us; 61us; 255us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 60 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 62us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 65535us; 65535us; 65535us; 65535us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 62us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 62us; 129us; 62us; 130us; 62us; 131us; 62us; 132us; 62us; 133us; 62us; 134us; 62us; 135us; 62us; 136us; 62us; 137us; 62us; 138us; 62us; 139us; 62us; 140us; 62us; 141us; 62us; 142us; 62us; 143us; 62us; 144us; 62us; 145us; 62us; 146us; 62us; 147us; 62us; 148us; 62us; 149us; 62us; 150us; 62us; 151us; 62us; 152us; 62us; 153us; 62us; 154us; 62us; 155us; 62us; 156us; 62us; 157us; 62us; 158us; 62us; 159us; 62us; 160us; 62us; 161us; 62us; 162us; 62us; 163us; 62us; 164us; 62us; 165us; 62us; 166us; 62us; 167us; 62us; 168us; 62us; 169us; 62us; 170us; 62us; 171us; 62us; 172us; 62us; 173us; 62us; 174us; 62us; 175us; 62us; 176us; 62us; 177us; 62us; 178us; 62us; 179us; 62us; 180us; 62us; 181us; 62us; 182us; 62us; 183us; 62us; 184us; 62us; 185us; 62us; 186us; 62us; 187us; 62us; 188us; 62us; 189us; 62us; 190us; 62us; 191us; 62us; 192us; 62us; 193us; 62us; 194us; 62us; 195us; 62us; 196us; 62us; 197us; 62us; 198us; 62us; 199us; 62us; 200us; 62us; 201us; 62us; 202us; 62us; 203us; 62us; 204us; 62us; 205us; 62us; 206us; 62us; 207us; 62us; 208us; 62us; 209us; 62us; 210us; 62us; 211us; 62us; 212us; 62us; 213us; 62us; 214us; 62us; 215us; 62us; 216us; 62us; 217us; 62us; 218us; 62us; 219us; 62us; 220us; 62us; 221us; 62us; 222us; 62us; 223us; 62us; 224us; 62us; 225us; 62us; 226us; 62us; 227us; 62us; 228us; 62us; 229us; 62us; 230us; 62us; 231us; 62us; 232us; 62us; 233us; 62us; 234us; 62us; 235us; 62us; 236us; 62us; 237us; 62us; 238us; 62us; 239us; 62us; 240us; 62us; 241us; 62us; 242us; 62us; 243us; 62us; 244us; 62us; 245us; 62us; 246us; 62us; 247us; 62us; 248us; 62us; 249us; 62us; 250us; 62us; 251us; 62us; 252us; 62us; 253us; 62us; 254us; 62us; 255us; 62us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 61 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 60us; 65535us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 65535us; 65535us; 65535us; 65535us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 61us; 129us; 61us; 130us; 61us; 131us; 61us; 132us; 61us; 133us; 61us; 134us; 61us; 135us; 61us; 136us; 61us; 137us; 61us; 138us; 61us; 139us; 61us; 140us; 61us; 141us; 61us; 142us; 61us; 143us; 61us; 144us; 61us; 145us; 61us; 146us; 61us; 147us; 61us; 148us; 61us; 149us; 61us; 150us; 61us; 151us; 61us; 152us; 61us; 153us; 61us; 154us; 61us; 155us; 61us; 156us; 61us; 157us; 61us; 158us; 61us; 159us; 61us; 160us; 61us; 161us; 61us; 162us; 61us; 163us; 61us; 164us; 61us; 165us; 61us; 166us; 61us; 167us; 61us; 168us; 61us; 169us; 61us; 170us; 61us; 171us; 61us; 172us; 61us; 173us; 61us; 174us; 61us; 175us; 61us; 176us; 61us; 177us; 61us; 178us; 61us; 179us; 61us; 180us; 61us; 181us; 61us; 182us; 61us; 183us; 61us; 184us; 61us; 185us; 61us; 186us; 61us; 187us; 61us; 188us; 61us; 189us; 61us; 190us; 61us; 191us; 61us; 192us; 61us; 193us; 61us; 194us; 61us; 195us; 61us; 196us; 61us; 197us; 61us; 198us; 61us; 199us; 61us; 200us; 61us; 201us; 61us; 202us; 61us; 203us; 61us; 204us; 61us; 205us; 61us; 206us; 61us; 207us; 61us; 208us; 61us; 209us; 61us; 210us; 61us; 211us; 61us; 212us; 61us; 213us; 61us; 214us; 61us; 215us; 61us; 216us; 61us; 217us; 61us; 218us; 61us; 219us; 61us; 220us; 61us; 221us; 61us; 222us; 61us; 223us; 61us; 224us; 61us; 225us; 61us; 226us; 61us; 227us; 61us; 228us; 61us; 229us; 61us; 230us; 61us; 231us; 61us; 232us; 61us; 233us; 61us; 234us; 61us; 235us; 61us; 236us; 61us; 237us; 61us; 238us; 61us; 239us; 61us; 240us; 61us; 241us; 61us; 242us; 61us; 243us; 61us; 244us; 61us; 245us; 61us; 246us; 61us; 247us; 61us; 248us; 61us; 249us; 61us; 250us; 61us; 251us; 61us; 252us; 61us; 253us; 61us; 254us; 61us; 255us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 62 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 63us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 63us; 65535us; 65535us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 65535us; 65535us; 65535us; 65535us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 63us; 129us; 63us; 130us; 63us; 131us; 63us; 132us; 63us; 133us; 63us; 134us; 63us; 135us; 63us; 136us; 63us; 137us; 63us; 138us; 63us; 139us; 63us; 140us; 63us; 141us; 63us; 142us; 63us; 143us; 63us; 144us; 63us; 145us; 63us; 146us; 63us; 147us; 63us; 148us; 63us; 149us; 63us; 150us; 63us; 151us; 63us; 152us; 63us; 153us; 63us; 154us; 63us; 155us; 63us; 156us; 63us; 157us; 63us; 158us; 63us; 159us; 63us; 160us; 63us; 161us; 63us; 162us; 63us; 163us; 63us; 164us; 63us; 165us; 63us; 166us; 63us; 167us; 63us; 168us; 63us; 169us; 63us; 170us; 63us; 171us; 63us; 172us; 63us; 173us; 63us; 174us; 63us; 175us; 63us; 176us; 63us; 177us; 63us; 178us; 63us; 179us; 63us; 180us; 63us; 181us; 63us; 182us; 63us; 183us; 63us; 184us; 63us; 185us; 63us; 186us; 63us; 187us; 63us; 188us; 63us; 189us; 63us; 190us; 63us; 191us; 63us; 192us; 63us; 193us; 63us; 194us; 63us; 195us; 63us; 196us; 63us; 197us; 63us; 198us; 63us; 199us; 63us; 200us; 63us; 201us; 63us; 202us; 63us; 203us; 63us; 204us; 63us; 205us; 63us; 206us; 63us; 207us; 63us; 208us; 63us; 209us; 63us; 210us; 63us; 211us; 63us; 212us; 63us; 213us; 63us; 214us; 63us; 215us; 63us; 216us; 63us; 217us; 63us; 218us; 63us; 219us; 63us; 220us; 63us; 221us; 63us; 222us; 63us; 223us; 63us; 224us; 63us; 225us; 63us; 226us; 63us; 227us; 63us; 228us; 63us; 229us; 63us; 230us; 63us; 231us; 63us; 232us; 63us; 233us; 63us; 234us; 63us; 235us; 63us; 236us; 63us; 237us; 63us; 238us; 63us; 239us; 63us; 240us; 63us; 241us; 63us; 242us; 63us; 243us; 63us; 244us; 63us; 245us; 63us; 246us; 63us; 247us; 63us; 248us; 63us; 249us; 63us; 250us; 63us; 251us; 63us; 252us; 63us; 253us; 63us; 254us; 63us; 255us; 63us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 63 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 60us; 65535us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 65535us; 65535us; 65535us; 65535us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 64us; 129us; 64us; 130us; 64us; 131us; 64us; 132us; 64us; 133us; 64us; 134us; 64us; 135us; 64us; 136us; 64us; 137us; 64us; 138us; 64us; 139us; 64us; 140us; 64us; 141us; 64us; 142us; 64us; 143us; 64us; 144us; 64us; 145us; 64us; 146us; 64us; 147us; 64us; 148us; 64us; 149us; 64us; 150us; 64us; 151us; 64us; 152us; 64us; 153us; 64us; 154us; 64us; 155us; 64us; 156us; 64us; 157us; 64us; 158us; 64us; 159us; 64us; 160us; 64us; 161us; 64us; 162us; 64us; 163us; 64us; 164us; 64us; 165us; 64us; 166us; 64us; 167us; 64us; 168us; 64us; 169us; 64us; 170us; 64us; 171us; 64us; 172us; 64us; 173us; 64us; 174us; 64us; 175us; 64us; 176us; 64us; 177us; 64us; 178us; 64us; 179us; 64us; 180us; 64us; 181us; 64us; 182us; 64us; 183us; 64us; 184us; 64us; 185us; 64us; 186us; 64us; 187us; 64us; 188us; 64us; 189us; 64us; 190us; 64us; 191us; 64us; 192us; 64us; 193us; 64us; 194us; 64us; 195us; 64us; 196us; 64us; 197us; 64us; 198us; 64us; 199us; 64us; 200us; 64us; 201us; 64us; 202us; 64us; 203us; 64us; 204us; 64us; 205us; 64us; 206us; 64us; 207us; 64us; 208us; 64us; 209us; 64us; 210us; 64us; 211us; 64us; 212us; 64us; 213us; 64us; 214us; 64us; 215us; 64us; 216us; 64us; 217us; 64us; 218us; 64us; 219us; 64us; 220us; 64us; 221us; 64us; 222us; 64us; 223us; 64us; 224us; 64us; 225us; 64us; 226us; 64us; 227us; 64us; 228us; 64us; 229us; 64us; 230us; 64us; 231us; 64us; 232us; 64us; 233us; 64us; 234us; 64us; 235us; 64us; 236us; 64us; 237us; 64us; 238us; 64us; 239us; 64us; 240us; 64us; 241us; 64us; 242us; 64us; 243us; 64us; 244us; 64us; 245us; 64us; 246us; 64us; 247us; 64us; 248us; 64us; 249us; 64us; 250us; 64us; 251us; 64us; 252us; 64us; 253us; 64us; 254us; 64us; 255us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 64 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 60us; 65535us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 65535us; 65535us; 65535us; 65535us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 64us; 129us; 64us; 130us; 64us; 131us; 64us; 132us; 64us; 133us; 64us; 134us; 64us; 135us; 64us; 136us; 64us; 137us; 64us; 138us; 64us; 139us; 64us; 140us; 64us; 141us; 64us; 142us; 64us; 143us; 64us; 144us; 64us; 145us; 64us; 146us; 64us; 147us; 64us; 148us; 64us; 149us; 64us; 150us; 64us; 151us; 64us; 152us; 64us; 153us; 64us; 154us; 64us; 155us; 64us; 156us; 64us; 157us; 64us; 158us; 64us; 159us; 64us; 160us; 64us; 161us; 64us; 162us; 64us; 163us; 64us; 164us; 64us; 165us; 64us; 166us; 64us; 167us; 64us; 168us; 64us; 169us; 64us; 170us; 64us; 171us; 64us; 172us; 64us; 173us; 64us; 174us; 64us; 175us; 64us; 176us; 64us; 177us; 64us; 178us; 64us; 179us; 64us; 180us; 64us; 181us; 64us; 182us; 64us; 183us; 64us; 184us; 64us; 185us; 64us; 186us; 64us; 187us; 64us; 188us; 64us; 189us; 64us; 190us; 64us; 191us; 64us; 192us; 64us; 193us; 64us; 194us; 64us; 195us; 64us; 196us; 64us; 197us; 64us; 198us; 64us; 199us; 64us; 200us; 64us; 201us; 64us; 202us; 64us; 203us; 64us; 204us; 64us; 205us; 64us; 206us; 64us; 207us; 64us; 208us; 64us; 209us; 64us; 210us; 64us; 211us; 64us; 212us; 64us; 213us; 64us; 214us; 64us; 215us; 64us; 216us; 64us; 217us; 64us; 218us; 64us; 219us; 64us; 220us; 64us; 221us; 64us; 222us; 64us; 223us; 64us; 224us; 64us; 225us; 64us; 226us; 64us; 227us; 64us; 228us; 64us; 229us; 64us; 230us; 64us; 231us; 64us; 232us; 64us; 233us; 64us; 234us; 64us; 235us; 64us; 236us; 64us; 237us; 64us; 238us; 64us; 239us; 64us; 240us; 64us; 241us; 64us; 242us; 64us; 243us; 64us; 244us; 64us; 245us; 64us; 246us; 64us; 247us; 64us; 248us; 64us; 249us; 64us; 250us; 64us; 251us; 64us; 252us; 64us; 253us; 64us; 254us; 64us; 255us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 65 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 66us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 66 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 67us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 67 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 68us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 68 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 69us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 69 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 70 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 71us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 71 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 72us; 65535us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 58us; 129us; 58us; 130us; 58us; 131us; 58us; 132us; 58us; 133us; 58us; 134us; 58us; 135us; 58us; 136us; 58us; 137us; 58us; 138us; 58us; 139us; 58us; 140us; 58us; 141us; 58us; 142us; 58us; 143us; 58us; 144us; 58us; 145us; 58us; 146us; 58us; 147us; 58us; 148us; 58us; 149us; 58us; 150us; 58us; 151us; 58us; 152us; 58us; 153us; 58us; 154us; 58us; 155us; 58us; 156us; 58us; 157us; 58us; 158us; 58us; 159us; 58us; 160us; 58us; 161us; 58us; 162us; 58us; 163us; 58us; 164us; 58us; 165us; 58us; 166us; 58us; 167us; 58us; 168us; 58us; 169us; 58us; 170us; 58us; 171us; 58us; 172us; 58us; 173us; 58us; 174us; 58us; 175us; 58us; 176us; 58us; 177us; 58us; 178us; 58us; 179us; 58us; 180us; 58us; 181us; 58us; 182us; 58us; 183us; 58us; 184us; 58us; 185us; 58us; 186us; 58us; 187us; 58us; 188us; 58us; 189us; 58us; 190us; 58us; 191us; 58us; 192us; 58us; 193us; 58us; 194us; 58us; 195us; 58us; 196us; 58us; 197us; 58us; 198us; 58us; 199us; 58us; 200us; 58us; 201us; 58us; 202us; 58us; 203us; 58us; 204us; 58us; 205us; 58us; 206us; 58us; 207us; 58us; 208us; 58us; 209us; 58us; 210us; 58us; 211us; 58us; 212us; 58us; 213us; 58us; 214us; 58us; 215us; 58us; 216us; 58us; 217us; 58us; 218us; 58us; 219us; 58us; 220us; 58us; 221us; 58us; 222us; 58us; 223us; 58us; 224us; 58us; 225us; 58us; 226us; 58us; 227us; 58us; 228us; 58us; 229us; 58us; 230us; 58us; 231us; 58us; 232us; 58us; 233us; 58us; 234us; 58us; 235us; 58us; 236us; 58us; 237us; 58us; 238us; 58us; 239us; 58us; 240us; 58us; 241us; 58us; 242us; 58us; 243us; 58us; 244us; 58us; 245us; 58us; 246us; 58us; 247us; 58us; 248us; 58us; 249us; 58us; 250us; 58us; 251us; 58us; 252us; 58us; 253us; 58us; 254us; 58us; 255us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 72 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 74us; 65535us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 73 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 59us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 59us; 74us; 65535us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 59us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 65535us; 65535us; 65535us; 65535us; 59us; 59us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 59us; 129us; 59us; 130us; 59us; 131us; 59us; 132us; 59us; 133us; 59us; 134us; 59us; 135us; 59us; 136us; 59us; 137us; 59us; 138us; 59us; 139us; 59us; 140us; 59us; 141us; 59us; 142us; 59us; 143us; 59us; 144us; 59us; 145us; 59us; 146us; 59us; 147us; 59us; 148us; 59us; 149us; 59us; 150us; 59us; 151us; 59us; 152us; 59us; 153us; 59us; 154us; 59us; 155us; 59us; 156us; 59us; 157us; 59us; 158us; 59us; 159us; 59us; 160us; 59us; 161us; 59us; 162us; 59us; 163us; 59us; 164us; 59us; 165us; 59us; 166us; 59us; 167us; 59us; 168us; 59us; 169us; 59us; 170us; 59us; 171us; 59us; 172us; 59us; 173us; 59us; 174us; 59us; 175us; 59us; 176us; 59us; 177us; 59us; 178us; 59us; 179us; 59us; 180us; 59us; 181us; 59us; 182us; 59us; 183us; 59us; 184us; 59us; 185us; 59us; 186us; 59us; 187us; 59us; 188us; 59us; 189us; 59us; 190us; 59us; 191us; 59us; 192us; 59us; 193us; 59us; 194us; 59us; 195us; 59us; 196us; 59us; 197us; 59us; 198us; 59us; 199us; 59us; 200us; 59us; 201us; 59us; 202us; 59us; 203us; 59us; 204us; 59us; 205us; 59us; 206us; 59us; 207us; 59us; 208us; 59us; 209us; 59us; 210us; 59us; 211us; 59us; 212us; 59us; 213us; 59us; 214us; 59us; 215us; 59us; 216us; 59us; 217us; 59us; 218us; 59us; 219us; 59us; 220us; 59us; 221us; 59us; 222us; 59us; 223us; 59us; 224us; 59us; 225us; 59us; 226us; 59us; 227us; 59us; 228us; 59us; 229us; 59us; 230us; 59us; 231us; 59us; 232us; 59us; 233us; 59us; 234us; 59us; 235us; 59us; 236us; 59us; 237us; 59us; 238us; 59us; 239us; 59us; 240us; 59us; 241us; 59us; 242us; 59us; 243us; 59us; 244us; 59us; 245us; 59us; 246us; 59us; 247us; 59us; 248us; 59us; 249us; 59us; 250us; 59us; 251us; 59us; 252us; 59us; 253us; 59us; 254us; 59us; 255us; 59us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 74 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 74us; 65535us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 75 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 76us; 65535us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 65535us; 65535us; 65535us; 65535us; 61us; 61us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 61us; 129us; 61us; 130us; 61us; 131us; 61us; 132us; 61us; 133us; 61us; 134us; 61us; 135us; 61us; 136us; 61us; 137us; 61us; 138us; 61us; 139us; 61us; 140us; 61us; 141us; 61us; 142us; 61us; 143us; 61us; 144us; 61us; 145us; 61us; 146us; 61us; 147us; 61us; 148us; 61us; 149us; 61us; 150us; 61us; 151us; 61us; 152us; 61us; 153us; 61us; 154us; 61us; 155us; 61us; 156us; 61us; 157us; 61us; 158us; 61us; 159us; 61us; 160us; 61us; 161us; 61us; 162us; 61us; 163us; 61us; 164us; 61us; 165us; 61us; 166us; 61us; 167us; 61us; 168us; 61us; 169us; 61us; 170us; 61us; 171us; 61us; 172us; 61us; 173us; 61us; 174us; 61us; 175us; 61us; 176us; 61us; 177us; 61us; 178us; 61us; 179us; 61us; 180us; 61us; 181us; 61us; 182us; 61us; 183us; 61us; 184us; 61us; 185us; 61us; 186us; 61us; 187us; 61us; 188us; 61us; 189us; 61us; 190us; 61us; 191us; 61us; 192us; 61us; 193us; 61us; 194us; 61us; 195us; 61us; 196us; 61us; 197us; 61us; 198us; 61us; 199us; 61us; 200us; 61us; 201us; 61us; 202us; 61us; 203us; 61us; 204us; 61us; 205us; 61us; 206us; 61us; 207us; 61us; 208us; 61us; 209us; 61us; 210us; 61us; 211us; 61us; 212us; 61us; 213us; 61us; 214us; 61us; 215us; 61us; 216us; 61us; 217us; 61us; 218us; 61us; 219us; 61us; 220us; 61us; 221us; 61us; 222us; 61us; 223us; 61us; 224us; 61us; 225us; 61us; 226us; 61us; 227us; 61us; 228us; 61us; 229us; 61us; 230us; 61us; 231us; 61us; 232us; 61us; 233us; 61us; 234us; 61us; 235us; 61us; 236us; 61us; 237us; 61us; 238us; 61us; 239us; 61us; 240us; 61us; 241us; 61us; 242us; 61us; 243us; 61us; 244us; 61us; 245us; 61us; 246us; 61us; 247us; 61us; 248us; 61us; 249us; 61us; 250us; 61us; 251us; 61us; 252us; 61us; 253us; 61us; 254us; 61us; 255us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 76 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 62us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 74us; 65535us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 65535us; 65535us; 65535us; 65535us; 65535us; 62us; 62us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 65535us; 65535us; 65535us; 65535us; 62us; 62us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 78us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 62us; 129us; 62us; 130us; 62us; 131us; 62us; 132us; 62us; 133us; 62us; 134us; 62us; 135us; 62us; 136us; 62us; 137us; 62us; 138us; 62us; 139us; 62us; 140us; 62us; 141us; 62us; 142us; 62us; 143us; 62us; 144us; 62us; 145us; 62us; 146us; 62us; 147us; 62us; 148us; 62us; 149us; 62us; 150us; 62us; 151us; 62us; 152us; 62us; 153us; 62us; 154us; 62us; 155us; 62us; 156us; 62us; 157us; 62us; 158us; 62us; 159us; 62us; 160us; 62us; 161us; 62us; 162us; 62us; 163us; 62us; 164us; 62us; 165us; 62us; 166us; 62us; 167us; 62us; 168us; 62us; 169us; 62us; 170us; 62us; 171us; 62us; 172us; 62us; 173us; 62us; 174us; 62us; 175us; 62us; 176us; 62us; 177us; 62us; 178us; 62us; 179us; 62us; 180us; 62us; 181us; 62us; 182us; 62us; 183us; 62us; 184us; 62us; 185us; 62us; 186us; 62us; 187us; 62us; 188us; 62us; 189us; 62us; 190us; 62us; 191us; 62us; 192us; 62us; 193us; 62us; 194us; 62us; 195us; 62us; 196us; 62us; 197us; 62us; 198us; 62us; 199us; 62us; 200us; 62us; 201us; 62us; 202us; 62us; 203us; 62us; 204us; 62us; 205us; 62us; 206us; 62us; 207us; 62us; 208us; 62us; 209us; 62us; 210us; 62us; 211us; 62us; 212us; 62us; 213us; 62us; 214us; 62us; 215us; 62us; 216us; 62us; 217us; 62us; 218us; 62us; 219us; 62us; 220us; 62us; 221us; 62us; 222us; 62us; 223us; 62us; 224us; 62us; 225us; 62us; 226us; 62us; 227us; 62us; 228us; 62us; 229us; 62us; 230us; 62us; 231us; 62us; 232us; 62us; 233us; 62us; 234us; 62us; 235us; 62us; 236us; 62us; 237us; 62us; 238us; 62us; 239us; 62us; 240us; 62us; 241us; 62us; 242us; 62us; 243us; 62us; 244us; 62us; 245us; 62us; 246us; 62us; 247us; 62us; 248us; 62us; 249us; 62us; 250us; 62us; 251us; 62us; 252us; 62us; 253us; 62us; 254us; 62us; 255us; 62us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 77 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 76us; 65535us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 61us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 65535us; 65535us; 65535us; 65535us; 61us; 61us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 77us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 61us; 129us; 61us; 130us; 61us; 131us; 61us; 132us; 61us; 133us; 61us; 134us; 61us; 135us; 61us; 136us; 61us; 137us; 61us; 138us; 61us; 139us; 61us; 140us; 61us; 141us; 61us; 142us; 61us; 143us; 61us; 144us; 61us; 145us; 61us; 146us; 61us; 147us; 61us; 148us; 61us; 149us; 61us; 150us; 61us; 151us; 61us; 152us; 61us; 153us; 61us; 154us; 61us; 155us; 61us; 156us; 61us; 157us; 61us; 158us; 61us; 159us; 61us; 160us; 61us; 161us; 61us; 162us; 61us; 163us; 61us; 164us; 61us; 165us; 61us; 166us; 61us; 167us; 61us; 168us; 61us; 169us; 61us; 170us; 61us; 171us; 61us; 172us; 61us; 173us; 61us; 174us; 61us; 175us; 61us; 176us; 61us; 177us; 61us; 178us; 61us; 179us; 61us; 180us; 61us; 181us; 61us; 182us; 61us; 183us; 61us; 184us; 61us; 185us; 61us; 186us; 61us; 187us; 61us; 188us; 61us; 189us; 61us; 190us; 61us; 191us; 61us; 192us; 61us; 193us; 61us; 194us; 61us; 195us; 61us; 196us; 61us; 197us; 61us; 198us; 61us; 199us; 61us; 200us; 61us; 201us; 61us; 202us; 61us; 203us; 61us; 204us; 61us; 205us; 61us; 206us; 61us; 207us; 61us; 208us; 61us; 209us; 61us; 210us; 61us; 211us; 61us; 212us; 61us; 213us; 61us; 214us; 61us; 215us; 61us; 216us; 61us; 217us; 61us; 218us; 61us; 219us; 61us; 220us; 61us; 221us; 61us; 222us; 61us; 223us; 61us; 224us; 61us; 225us; 61us; 226us; 61us; 227us; 61us; 228us; 61us; 229us; 61us; 230us; 61us; 231us; 61us; 232us; 61us; 233us; 61us; 234us; 61us; 235us; 61us; 236us; 61us; 237us; 61us; 238us; 61us; 239us; 61us; 240us; 61us; 241us; 61us; 242us; 61us; 243us; 61us; 244us; 61us; 245us; 61us; 246us; 61us; 247us; 61us; 248us; 61us; 249us; 61us; 250us; 61us; 251us; 61us; 252us; 61us; 253us; 61us; 254us; 61us; 255us; 61us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 78 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 63us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 63us; 74us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 63us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 63us; 63us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 63us; 129us; 63us; 130us; 63us; 131us; 63us; 132us; 63us; 133us; 63us; 134us; 63us; 135us; 63us; 136us; 63us; 137us; 63us; 138us; 63us; 139us; 63us; 140us; 63us; 141us; 63us; 142us; 63us; 143us; 63us; 144us; 63us; 145us; 63us; 146us; 63us; 147us; 63us; 148us; 63us; 149us; 63us; 150us; 63us; 151us; 63us; 152us; 63us; 153us; 63us; 154us; 63us; 155us; 63us; 156us; 63us; 157us; 63us; 158us; 63us; 159us; 63us; 160us; 63us; 161us; 63us; 162us; 63us; 163us; 63us; 164us; 63us; 165us; 63us; 166us; 63us; 167us; 63us; 168us; 63us; 169us; 63us; 170us; 63us; 171us; 63us; 172us; 63us; 173us; 63us; 174us; 63us; 175us; 63us; 176us; 63us; 177us; 63us; 178us; 63us; 179us; 63us; 180us; 63us; 181us; 63us; 182us; 63us; 183us; 63us; 184us; 63us; 185us; 63us; 186us; 63us; 187us; 63us; 188us; 63us; 189us; 63us; 190us; 63us; 191us; 63us; 192us; 63us; 193us; 63us; 194us; 63us; 195us; 63us; 196us; 63us; 197us; 63us; 198us; 63us; 199us; 63us; 200us; 63us; 201us; 63us; 202us; 63us; 203us; 63us; 204us; 63us; 205us; 63us; 206us; 63us; 207us; 63us; 208us; 63us; 209us; 63us; 210us; 63us; 211us; 63us; 212us; 63us; 213us; 63us; 214us; 63us; 215us; 63us; 216us; 63us; 217us; 63us; 218us; 63us; 219us; 63us; 220us; 63us; 221us; 63us; 222us; 63us; 223us; 63us; 224us; 63us; 225us; 63us; 226us; 63us; 227us; 63us; 228us; 63us; 229us; 63us; 230us; 63us; 231us; 63us; 232us; 63us; 233us; 63us; 234us; 63us; 235us; 63us; 236us; 63us; 237us; 63us; 238us; 63us; 239us; 63us; 240us; 63us; 241us; 63us; 242us; 63us; 243us; 63us; 244us; 63us; 245us; 63us; 246us; 63us; 247us; 63us; 248us; 63us; 249us; 63us; 250us; 63us; 251us; 63us; 252us; 63us; 253us; 63us; 254us; 63us; 255us; 63us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 79 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 76us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 64us; 64us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 64us; 129us; 64us; 130us; 64us; 131us; 64us; 132us; 64us; 133us; 64us; 134us; 64us; 135us; 64us; 136us; 64us; 137us; 64us; 138us; 64us; 139us; 64us; 140us; 64us; 141us; 64us; 142us; 64us; 143us; 64us; 144us; 64us; 145us; 64us; 146us; 64us; 147us; 64us; 148us; 64us; 149us; 64us; 150us; 64us; 151us; 64us; 152us; 64us; 153us; 64us; 154us; 64us; 155us; 64us; 156us; 64us; 157us; 64us; 158us; 64us; 159us; 64us; 160us; 64us; 161us; 64us; 162us; 64us; 163us; 64us; 164us; 64us; 165us; 64us; 166us; 64us; 167us; 64us; 168us; 64us; 169us; 64us; 170us; 64us; 171us; 64us; 172us; 64us; 173us; 64us; 174us; 64us; 175us; 64us; 176us; 64us; 177us; 64us; 178us; 64us; 179us; 64us; 180us; 64us; 181us; 64us; 182us; 64us; 183us; 64us; 184us; 64us; 185us; 64us; 186us; 64us; 187us; 64us; 188us; 64us; 189us; 64us; 190us; 64us; 191us; 64us; 192us; 64us; 193us; 64us; 194us; 64us; 195us; 64us; 196us; 64us; 197us; 64us; 198us; 64us; 199us; 64us; 200us; 64us; 201us; 64us; 202us; 64us; 203us; 64us; 204us; 64us; 205us; 64us; 206us; 64us; 207us; 64us; 208us; 64us; 209us; 64us; 210us; 64us; 211us; 64us; 212us; 64us; 213us; 64us; 214us; 64us; 215us; 64us; 216us; 64us; 217us; 64us; 218us; 64us; 219us; 64us; 220us; 64us; 221us; 64us; 222us; 64us; 223us; 64us; 224us; 64us; 225us; 64us; 226us; 64us; 227us; 64us; 228us; 64us; 229us; 64us; 230us; 64us; 231us; 64us; 232us; 64us; 233us; 64us; 234us; 64us; 235us; 64us; 236us; 64us; 237us; 64us; 238us; 64us; 239us; 64us; 240us; 64us; 241us; 64us; 242us; 64us; 243us; 64us; 244us; 64us; 245us; 64us; 246us; 64us; 247us; 64us; 248us; 64us; 249us; 64us; 250us; 64us; 251us; 64us; 252us; 64us; 253us; 64us; 254us; 64us; 255us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 80 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 76us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 64us; 64us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 64us; 129us; 64us; 130us; 64us; 131us; 64us; 132us; 64us; 133us; 64us; 134us; 64us; 135us; 64us; 136us; 64us; 137us; 64us; 138us; 64us; 139us; 64us; 140us; 64us; 141us; 64us; 142us; 64us; 143us; 64us; 144us; 64us; 145us; 64us; 146us; 64us; 147us; 64us; 148us; 64us; 149us; 64us; 150us; 64us; 151us; 64us; 152us; 64us; 153us; 64us; 154us; 64us; 155us; 64us; 156us; 64us; 157us; 64us; 158us; 64us; 159us; 64us; 160us; 64us; 161us; 64us; 162us; 64us; 163us; 64us; 164us; 64us; 165us; 64us; 166us; 64us; 167us; 64us; 168us; 64us; 169us; 64us; 170us; 64us; 171us; 64us; 172us; 64us; 173us; 64us; 174us; 64us; 175us; 64us; 176us; 64us; 177us; 64us; 178us; 64us; 179us; 64us; 180us; 64us; 181us; 64us; 182us; 64us; 183us; 64us; 184us; 64us; 185us; 64us; 186us; 64us; 187us; 64us; 188us; 64us; 189us; 64us; 190us; 64us; 191us; 64us; 192us; 64us; 193us; 64us; 194us; 64us; 195us; 64us; 196us; 64us; 197us; 64us; 198us; 64us; 199us; 64us; 200us; 64us; 201us; 64us; 202us; 64us; 203us; 64us; 204us; 64us; 205us; 64us; 206us; 64us; 207us; 64us; 208us; 64us; 209us; 64us; 210us; 64us; 211us; 64us; 212us; 64us; 213us; 64us; 214us; 64us; 215us; 64us; 216us; 64us; 217us; 64us; 218us; 64us; 219us; 64us; 220us; 64us; 221us; 64us; 222us; 64us; 223us; 64us; 224us; 64us; 225us; 64us; 226us; 64us; 227us; 64us; 228us; 64us; 229us; 64us; 230us; 64us; 231us; 64us; 232us; 64us; 233us; 64us; 234us; 64us; 235us; 64us; 236us; 64us; 237us; 64us; 238us; 64us; 239us; 64us; 240us; 64us; 241us; 64us; 242us; 64us; 243us; 64us; 244us; 64us; 245us; 64us; 246us; 64us; 247us; 64us; 248us; 64us; 249us; 64us; 250us; 64us; 251us; 64us; 252us; 64us; 253us; 64us; 254us; 64us; 255us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 81 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 82us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 82 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 83us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 83 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 84 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 85us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 85 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 86us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 86 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 87us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 87 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 88 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 89 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 90 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 94us; 56us; 56us; 56us; 96us; 56us; 56us; 56us; 95us; 56us; 56us; 93us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 91 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 92 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 93 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 101us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 94 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 100us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 95 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 99us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 96 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 97us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 97 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 98us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 98 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 99 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 100 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 101 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 102 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 106us; 56us; 70us; 56us; 109us; 56us; 56us; 56us; 108us; 56us; 56us; 107us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 103 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 104us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 104 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 105us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 105 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 106 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 117us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 107 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 115us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 114us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 108 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 113us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 109 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 110us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 110 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 111us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 111 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 112us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 112 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 71us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 113 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 114 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 116us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 115 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 116 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 71us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 117 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 118us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 118 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 71us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 119 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 122us; 65535us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 120 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 122us; 65535us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 121 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 125us; 65535us; 65535us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 122 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 123 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 124 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 125 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 126 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 127 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 128 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 129 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 130 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 134us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 131 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 132 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 133 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 134 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 135 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 136 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 137 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 138 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 139 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 71us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 142us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 141us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 140 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 141 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 146us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 142 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 143us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 143 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 144us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 144 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 145us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 145 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 146 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 147us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 147 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 148 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 70us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 149 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 150us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 150 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 151us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 151 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 152us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 152 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 153us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 153 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 154us; 154us; 154us; 154us; 154us; 154us; 154us; 154us; 154us; 154us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 154us; 154us; 154us; 154us; 154us; 154us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 154us; 154us; 154us; 154us; 154us; 154us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 154 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 155us; 155us; 155us; 155us; 155us; 155us; 155us; 155us; 155us; 155us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 155us; 155us; 155us; 155us; 155us; 155us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 155us; 155us; 155us; 155us; 155us; 155us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 155 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 57us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 56us; 129us; 56us; 130us; 56us; 131us; 56us; 132us; 56us; 133us; 56us; 134us; 56us; 135us; 56us; 136us; 56us; 137us; 56us; 138us; 56us; 139us; 56us; 140us; 56us; 141us; 56us; 142us; 56us; 143us; 56us; 144us; 56us; 145us; 56us; 146us; 56us; 147us; 56us; 148us; 56us; 149us; 56us; 150us; 56us; 151us; 56us; 152us; 56us; 153us; 56us; 154us; 56us; 155us; 56us; 156us; 56us; 157us; 56us; 158us; 56us; 159us; 56us; 160us; 56us; 161us; 56us; 162us; 56us; 163us; 56us; 164us; 56us; 165us; 56us; 166us; 56us; 167us; 56us; 168us; 56us; 169us; 56us; 170us; 56us; 171us; 56us; 172us; 56us; 173us; 56us; 174us; 56us; 175us; 56us; 176us; 56us; 177us; 56us; 178us; 56us; 179us; 56us; 180us; 56us; 181us; 56us; 182us; 56us; 183us; 56us; 184us; 56us; 185us; 56us; 186us; 56us; 187us; 56us; 188us; 56us; 189us; 56us; 190us; 56us; 191us; 56us; 192us; 56us; 193us; 56us; 194us; 56us; 195us; 56us; 196us; 56us; 197us; 56us; 198us; 56us; 199us; 56us; 200us; 56us; 201us; 56us; 202us; 56us; 203us; 56us; 204us; 56us; 205us; 56us; 206us; 56us; 207us; 56us; 208us; 56us; 209us; 56us; 210us; 56us; 211us; 56us; 212us; 56us; 213us; 56us; 214us; 56us; 215us; 56us; 216us; 56us; 217us; 56us; 218us; 56us; 219us; 56us; 220us; 56us; 221us; 56us; 222us; 56us; 223us; 56us; 224us; 56us; 225us; 56us; 226us; 56us; 227us; 56us; 228us; 56us; 229us; 56us; 230us; 56us; 231us; 56us; 232us; 56us; 233us; 56us; 234us; 56us; 235us; 56us; 236us; 56us; 237us; 56us; 238us; 56us; 239us; 56us; 240us; 56us; 241us; 56us; 242us; 56us; 243us; 56us; 244us; 56us; 245us; 56us; 246us; 56us; 247us; 56us; 248us; 56us; 249us; 56us; 250us; 56us; 251us; 56us; 252us; 56us; 253us; 56us; 254us; 56us; 255us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 156 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 122us; 65535us; 162us; 162us; 162us; 162us; 162us; 162us; 162us; 162us; 162us; 162us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 157 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 160us; 65535us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 158 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 159 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 125us; 65535us; 65535us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 160 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 161us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 161 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 162 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 157us; 65535us; 163us; 163us; 163us; 163us; 163us; 163us; 163us; 163us; 163us; 163us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 163 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 157us; 65535us; 163us; 163us; 163us; 163us; 163us; 163us; 163us; 163us; 163us; 163us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 164 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 165us; 165us; 165us; 165us; 165us; 165us; 165us; 165us; 165us; 165us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 165us; 165us; 165us; 165us; 165us; 165us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 165us; 165us; 165us; 165us; 165us; 165us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 165 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 166us; 166us; 166us; 166us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 166us; 166us; 166us; 166us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 166 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 166us; 166us; 166us; 166us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 166us; 166us; 166us; 166us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 167 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 122us; 65535us; 168us; 168us; 168us; 168us; 168us; 168us; 168us; 168us; 168us; 168us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 168 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 122us; 65535us; 168us; 168us; 168us; 168us; 168us; 168us; 168us; 168us; 168us; 168us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 169 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 170 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 179us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 171 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 172us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 173us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 172 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 173 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 174us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 174 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 175us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 175 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 176 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 177us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 177 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 178us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 178 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 179 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 129us; 65535us; 130us; 65535us; 131us; 65535us; 132us; 65535us; 133us; 65535us; 134us; 65535us; 135us; 65535us; 136us; 65535us; 137us; 65535us; 138us; 65535us; 139us; 65535us; 140us; 65535us; 141us; 65535us; 142us; 65535us; 143us; 65535us; 144us; 65535us; 145us; 65535us; 146us; 65535us; 147us; 65535us; 148us; 65535us; 149us; 65535us; 150us; 65535us; 151us; 65535us; 152us; 65535us; 153us; 65535us; 154us; 65535us; 155us; 65535us; 156us; 65535us; 157us; 65535us; 158us; 65535us; 159us; 65535us; 160us; 65535us; 161us; 65535us; 162us; 65535us; 163us; 65535us; 164us; 65535us; 165us; 65535us; 166us; 65535us; 167us; 65535us; 168us; 65535us; 169us; 65535us; 170us; 65535us; 171us; 65535us; 172us; 65535us; 173us; 65535us; 174us; 65535us; 175us; 65535us; 176us; 65535us; 177us; 65535us; 178us; 65535us; 179us; 65535us; 180us; 65535us; 181us; 65535us; 182us; 65535us; 183us; 65535us; 184us; 65535us; 185us; 65535us; 186us; 65535us; 187us; 65535us; 188us; 65535us; 189us; 65535us; 190us; 65535us; 191us; 65535us; 192us; 65535us; 193us; 65535us; 194us; 65535us; 195us; 65535us; 196us; 65535us; 197us; 65535us; 198us; 65535us; 199us; 65535us; 200us; 65535us; 201us; 65535us; 202us; 65535us; 203us; 65535us; 204us; 65535us; 205us; 65535us; 206us; 65535us; 207us; 65535us; 208us; 65535us; 209us; 65535us; 210us; 65535us; 211us; 65535us; 212us; 65535us; 213us; 65535us; 214us; 65535us; 215us; 65535us; 216us; 65535us; 217us; 65535us; 218us; 65535us; 219us; 65535us; 220us; 65535us; 221us; 65535us; 222us; 65535us; 223us; 65535us; 224us; 65535us; 225us; 65535us; 226us; 65535us; 227us; 65535us; 228us; 65535us; 229us; 65535us; 230us; 65535us; 231us; 65535us; 232us; 65535us; 233us; 65535us; 234us; 65535us; 235us; 65535us; 236us; 65535us; 237us; 65535us; 238us; 65535us; 239us; 65535us; 240us; 65535us; 241us; 65535us; 242us; 65535us; 243us; 65535us; 244us; 65535us; 245us; 65535us; 246us; 65535us; 247us; 65535us; 248us; 65535us; 249us; 65535us; 250us; 65535us; 251us; 65535us; 252us; 65535us; 253us; 65535us; 254us; 65535us; 255us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - |] -let actions : uint16[] = [|65535us; 0us; 4us; 3us; 4us; 1us; 1us; 2us; 1us; 65535us; 0us; 4us; 3us; 4us; 1us; 1us; 2us; 1us; 65535us; 0us; 1us; 2us; 3us; 4us; 5us; 6us; 7us; 8us; 9us; 10us; 11us; 30us; 14us; 15us; 15us; 25us; 25us; 25us; 25us; 25us; 25us; 30us; 22us; 23us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 29us; 30us; 31us; 25us; 25us; 65535us; 65535us; 26us; 65535us; 26us; 65535us; 26us; 26us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 20us; 20us; 65535us; 21us; 21us; 21us; 65535us; 21us; 17us; 25us; 17us; 25us; 25us; 25us; 25us; 25us; 17us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 17us; 17us; 25us; 25us; 25us; 25us; 25us; 19us; 17us; 21us; 17us; 17us; 65535us; 16us; 15us; 15us; 65535us; 18us; 18us; 21us; 21us; 13us; 65535us; 65535us; 65535us; 65535us; 65535us; 28us; 65535us; 65535us; 27us; 12us; |] -let _fslex_tables = Internal.Utilities.Text.Lexing.UnicodeTables.Create(trans,actions) -let rec _fslex_dummy () = _fslex_dummy() -(* Rule token *) -and token (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_token 18 lexbuf -and _fslex_token _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 137 "..\..\absil\illex.mll" - COMMA -# 507 "illex.fs" - ) - | 1 -> ( -# 138 "..\..\absil\illex.mll" - DOT -# 512 "illex.fs" - ) - | 2 -> ( -# 139 "..\..\absil\illex.mll" - STAR -# 517 "illex.fs" - ) - | 3 -> ( -# 140 "..\..\absil\illex.mll" - BANG -# 522 "illex.fs" - ) - | 4 -> ( -# 141 "..\..\absil\illex.mll" - AMP -# 527 "illex.fs" - ) - | 5 -> ( -# 142 "..\..\absil\illex.mll" - LPAREN -# 532 "illex.fs" - ) - | 6 -> ( -# 143 "..\..\absil\illex.mll" - RPAREN -# 537 "illex.fs" - ) - | 7 -> ( -# 144 "..\..\absil\illex.mll" - LBRACK -# 542 "illex.fs" - ) - | 8 -> ( -# 145 "..\..\absil\illex.mll" - RBRACK -# 547 "illex.fs" - ) - | 9 -> ( -# 146 "..\..\absil\illex.mll" - SLASH -# 552 "illex.fs" - ) - | 10 -> ( -# 147 "..\..\absil\illex.mll" - LESS -# 557 "illex.fs" - ) - | 11 -> ( -# 148 "..\..\absil\illex.mll" - GREATER -# 562 "illex.fs" - ) - | 12 -> ( -# 149 "..\..\absil\illex.mll" - ELIPSES -# 567 "illex.fs" - ) - | 13 -> ( -# 150 "..\..\absil\illex.mll" - DCOLON -# 572 "illex.fs" - ) - | 14 -> ( -# 151 "..\..\absil\illex.mll" - PLUS -# 577 "illex.fs" - ) - | 15 -> ( -# 153 "..\..\absil\illex.mll" - VAL_INT64(int64(lexeme lexbuf)) -# 582 "illex.fs" - ) - | 16 -> ( -# 162 "..\..\absil\illex.mll" - let b = lexeme lexbuf in - VAL_INT32_ELIPSES(int32(String.sub b 0 (String.length b - 3))) -# 588 "illex.fs" - ) - | 17 -> ( -# 165 "..\..\absil\illex.mll" - let c1 = String.get (lexeme lexbuf) 0 in - let c2 = String.get (lexeme lexbuf) 1 in - if !lexing_bytearray then - VAL_HEXBYTE (16 * eval c1 + eval c2) - else if c1 >= '0' & c1 <= '9' & c2 >= '0' & c2 <= '9' then - VAL_INT64(int64 (10*eval c1 + eval c2) ) - else VAL_ID(lexeme lexbuf) -# 599 "illex.fs" - ) - | 18 -> ( -# 173 "..\..\absil\illex.mll" - VAL_INT64(int64(lexeme lexbuf)) -# 604 "illex.fs" - ) - | 19 -> ( -# 175 "..\..\absil\illex.mll" - let c1 = (lexeme lexbuf).[6] in - let c2 = (lexeme lexbuf).[7] in - if !lexing_bytearray then - VAL_HEXBYTE (16 * eval c1 + eval c2) - else if c1 >= '0' & c1 <= '9' & c2 >= '0' & c2 <= '9' then - VAL_INT64(int64 (10*eval c1 + eval c2)) - else VAL_ID(lexeme lexbuf) -# 615 "illex.fs" - ) - | 20 -> ( -# 184 "..\..\absil\illex.mll" - VAL_INT64(int64(lexeme lexbuf)) -# 620 "illex.fs" - ) - | 21 -> ( -# 186 "..\..\absil\illex.mll" - VAL_FLOAT64( (float (lexeme lexbuf)) ) -# 625 "illex.fs" - ) - | 22 -> ( -# 189 "..\..\absil\illex.mll" - reset_string_buffer(); - singleQuoteString lexbuf; - VAL_SQSTRING (get_stored_string()) -# 632 "illex.fs" - ) - | 23 -> ( -# 193 "..\..\absil\illex.mll" - reset_string_buffer(); - stringToken lexbuf; - VAL_QSTRING (get_stored_string()) -# 639 "illex.fs" - ) - | 24 -> ( -# 198 "..\..\absil\illex.mll" - let s = (lexeme lexbuf) in kwd_or_instr s -# 644 "illex.fs" - ) - | 25 -> ( -# 200 "..\..\absil\illex.mll" - kwd_or_instr_or_id (lexeme lexbuf) -# 649 "illex.fs" - ) - | 26 -> ( -# 203 "..\..\absil\illex.mll" - VAL_DOTTEDNAME(lexeme lexbuf) -# 654 "illex.fs" - ) - | 27 -> ( -# 204 "..\..\absil\illex.mll" - DOT_CCTOR -# 659 "illex.fs" - ) - | 28 -> ( -# 205 "..\..\absil\illex.mll" - DOT_CTOR -# 664 "illex.fs" - ) - | 29 -> ( -# 208 "..\..\absil\illex.mll" - token lexbuf -# 669 "illex.fs" - ) - | 30 -> ( -# 210 "..\..\absil\illex.mll" - unexpected_char lexbuf -# 674 "illex.fs" - ) - | 31 -> ( -# 212 "..\..\absil\illex.mll" - EOF -# 679 "illex.fs" - ) - | _ -> failwith "token" -(* Rule singleQuoteString *) -and singleQuoteString (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_singleQuoteString 9 lexbuf -and _fslex_singleQuoteString _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 216 "..\..\absil\illex.mll" - () -# 689 "illex.fs" - ) - | 1 -> ( -# 218 "..\..\absil\illex.mll" - singleQuoteString lexbuf -# 694 "illex.fs" - ) - | 2 -> ( -# 220 "..\..\absil\illex.mll" - store_string_char(escape(String.get (lexeme lexbuf) 1)); - singleQuoteString lexbuf -# 700 "illex.fs" - ) - | 3 -> ( -# 223 "..\..\absil\illex.mll" - failwith "unterminated string" -# 705 "illex.fs" - ) - | 4 -> ( -# 225 "..\..\absil\illex.mll" - store_string_char(String.get (lexeme lexbuf) 0); - singleQuoteString lexbuf -# 711 "illex.fs" - ) - | _ -> failwith "singleQuoteString" -(* Rule stringToken *) -and stringToken (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_stringToken 0 lexbuf -and _fslex_stringToken _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 230 "..\..\absil\illex.mll" - () -# 721 "illex.fs" - ) - | 1 -> ( -# 232 "..\..\absil\illex.mll" - stringToken lexbuf -# 726 "illex.fs" - ) - | 2 -> ( -# 234 "..\..\absil\illex.mll" - store_string_char(escape(String.get (lexeme lexbuf) 1)); - stringToken lexbuf -# 732 "illex.fs" - ) - | 3 -> ( -# 237 "..\..\absil\illex.mll" - failwith "unterminated string" -# 737 "illex.fs" - ) - | 4 -> ( -# 239 "..\..\absil\illex.mll" - store_string_char(String.get (lexeme lexbuf) 0); - stringToken lexbuf -# 743 "illex.fs" - ) - | _ -> failwith "stringToken" - -# 241 "..\..\absil\illex.mll" - -# 3000000 "illex.fs" diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/ilpars.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/ilpars.fs deleted file mode 100644 index f3c197dd..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/ilpars.fs +++ /dev/null @@ -1,1963 +0,0 @@ -// Implementation file for parser generated by fsyacc -#light "off" -module Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser -#nowarn "64";; // turn off warnings that type variables used in production annotations are instantiated to concrete type -open Microsoft.FSharp.Compiler.AbstractIL -open Internal.Utilities.Text.Lexing -open Internal.Utilities.Text.Parsing.ParseHelpers -# 1 "..\..\absil\ilpars.mly" - -// (c) Microsoft Corporation 2005-2009. - -open Internal.Utilities -open Internal.Utilities.Text - -open Microsoft.FSharp.Text -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -module Ilascii = Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiConstants -module Ildiag = Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL -module Ilx = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL -module Illib = Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -open Illib -open Ildiag -open Il -open Ilascii -open Ilx - -let pfailwith s = - stderr.WriteLine ("*** error: "^s); - raise Parsing.RecoverableParseError - -/// vararg sentinels -type sig_arg = SigArg of (string option * ILType) | Sentinel - -let decode_varargs args = - let rec normals = function - | [] -> ([],None) - | Sentinel :: t -> ([],Some (varargs t)) - | SigArg (_,p)::t -> let (n,r) = normals t in (p::n, r) - and varargs = function - | [] -> [] - | SigArg (_,ty):: t -> let l = varargs t in ty::l - | Sentinel :: t -> pfailwith "two sentinels in vararg call" in - normals args;; - - -type 'a resolved_at_mspec_scope = - ResolvedAtMethodSpecScope of (ILGenericParameterDefs -> 'a) - -let no_mspec_scope x = ResolvedAtMethodSpecScope (fun cgparams -> x) -let resolve_mspec_scope (ResolvedAtMethodSpecScope f) x = f x -let resolve_mspec_scope_then (ResolvedAtMethodSpecScope f) g = - ResolvedAtMethodSpecScope (fun x -> resolve_mspec_scope (g(f x)) x) - -let resolve_mspec_scope_to_formal_scope tspeco obj = - match tspeco with - None -> resolve_mspec_scope obj mk_empty_gparams - | Some (tspec:ILTypeSpec) -> resolve_mspec_scope obj (gparams_of_inst tspec.GenericArgs) - -let resolve_mspec_scope_to_current_scope obj = - resolve_mspec_scope obj mk_empty_gparams - - -let find_mscorlib_aref() = - match (!parse_ilGlobals).mscorlib_scoref with - | ScopeRef_assembly aref -> aref - | _ -> pfailwith "mscorlib_scoref not set to valid assembly reference in parse_ilGlobals" - -let find_aref nm = - if nm = "mscorlib" then find_mscorlib_aref() else - pfailwith ("Undefined assembly ref '" ^ nm ^ "'") - - -# 78 "ilpars.fs" -// This type is the type of tokens accepted by the parser -type token = - | VOID - | VARARG - | VALUETYPE - | VALUE - | UNSIGNED - | UNMANAGED - | UINT8 - | UINT64 - | UINT32 - | UINT16 - | UINT - | TYPEDREF - | THISCALL - | STRING - | STDCALL - | STAR - | SLASH - | RPAREN - | RBRACK - | PLUS - | OBJECT - | NATIVE - | METHOD - | LPAREN - | LESS - | LBRACK - | INT8 - | INT64 - | INT32 - | INT16 - | INT - | INSTANCE - | GREATER - | FLOAT64 - | FLOAT32 - | FIELD - | FASTCALL - | EXPLICIT - | EOF - | ELIPSES - | DOT_CTOR - | DOT_CCTOR - | DOT - | DEFAULT - | DCOLON - | COMMA - | CLASS - | CHAR - | CDECL - | BYTEARRAY - | BOOL - | BANG - | AMP - | VAL_SQSTRING of (string) - | VAL_QSTRING of (string) - | VAL_DOTTEDNAME of (string) - | VAL_ID of (string) - | VAL_HEXBYTE of (int) - | INSTR_VALUETYPE of (Ilascii.valuetype_instr) - | INSTR_INT_TYPE of (Ilascii.int_type_instr) - | INSTR_TYPE of (Ilascii.type_instr) - | INSTR_TOK of (Ilascii.tok_instr) - | INSTR_SWITCH of (Ilascii.switch_instr) - | INSTR_STRING of (Ilascii.string_instr) - | INSTR_NONE of (Ilascii.none_instr) - | INSTR_METHOD of (Ilascii.method_instr) - | INSTR_LOC of (Ilascii.loc_instr) - | INSTR_R of (Ilascii.real_instr) - | INSTR_I8 of (Ilascii.i64_instr) - | INSTR_I32_I32 of (Ilascii.i32_i32_instr) - | INSTR_I of (Ilascii.i32_instr) - | INSTR_ARG of (Ilascii.arg_instr) - | VAL_FLOAT64 of (double) - | VAL_INT32_ELIPSES of (int32) - | VAL_INT64 of (int64) -// This type is used to give symbolic names to token indexes, useful for error messages -type tokenId = - | TOKEN_VOID - | TOKEN_VARARG - | TOKEN_VALUETYPE - | TOKEN_VALUE - | TOKEN_UNSIGNED - | TOKEN_UNMANAGED - | TOKEN_UINT8 - | TOKEN_UINT64 - | TOKEN_UINT32 - | TOKEN_UINT16 - | TOKEN_UINT - | TOKEN_TYPEDREF - | TOKEN_THISCALL - | TOKEN_STRING - | TOKEN_STDCALL - | TOKEN_STAR - | TOKEN_SLASH - | TOKEN_RPAREN - | TOKEN_RBRACK - | TOKEN_PLUS - | TOKEN_OBJECT - | TOKEN_NATIVE - | TOKEN_METHOD - | TOKEN_LPAREN - | TOKEN_LESS - | TOKEN_LBRACK - | TOKEN_INT8 - | TOKEN_INT64 - | TOKEN_INT32 - | TOKEN_INT16 - | TOKEN_INT - | TOKEN_INSTANCE - | TOKEN_GREATER - | TOKEN_FLOAT64 - | TOKEN_FLOAT32 - | TOKEN_FIELD - | TOKEN_FASTCALL - | TOKEN_EXPLICIT - | TOKEN_EOF - | TOKEN_ELIPSES - | TOKEN_DOT_CTOR - | TOKEN_DOT_CCTOR - | TOKEN_DOT - | TOKEN_DEFAULT - | TOKEN_DCOLON - | TOKEN_COMMA - | TOKEN_CLASS - | TOKEN_CHAR - | TOKEN_CDECL - | TOKEN_BYTEARRAY - | TOKEN_BOOL - | TOKEN_BANG - | TOKEN_AMP - | TOKEN_VAL_SQSTRING - | TOKEN_VAL_QSTRING - | TOKEN_VAL_DOTTEDNAME - | TOKEN_VAL_ID - | TOKEN_VAL_HEXBYTE - | TOKEN_INSTR_VALUETYPE - | TOKEN_INSTR_INT_TYPE - | TOKEN_INSTR_TYPE - | TOKEN_INSTR_TOK - | TOKEN_INSTR_SWITCH - | TOKEN_INSTR_STRING - | TOKEN_INSTR_NONE - | TOKEN_INSTR_METHOD - | TOKEN_INSTR_LOC - | TOKEN_INSTR_R - | TOKEN_INSTR_I8 - | TOKEN_INSTR_I32_I32 - | TOKEN_INSTR_I - | TOKEN_INSTR_ARG - | TOKEN_VAL_FLOAT64 - | TOKEN_VAL_INT32_ELIPSES - | TOKEN_VAL_INT64 - | TOKEN_end_of_input - | TOKEN_error -// This type is used to give symbolic names to token indexes, useful for error messages -type nonTerminalId = - | NONTERM__starttop_instrs - | NONTERM__starttop_typ - | NONTERM_top_typ - | NONTERM_top_instrs - | NONTERM_compQstring - | NONTERM_methodName - | NONTERM_instrs2 - | NONTERM_methodSpec - | NONTERM_methodSpecMaybeArrayMethod - | NONTERM_instr_r_head - | NONTERM_instr - | NONTERM_sigArgs0 - | NONTERM_sigArgs1 - | NONTERM_sigArgs1a - | NONTERM_sigArg - | NONTERM_opt_id - | NONTERM_name1 - | NONTERM_className - | NONTERM_slashedName - | NONTERM_typeNameInst - | NONTERM_typeName - | NONTERM_typSpec - | NONTERM_callConv - | NONTERM_callKind - | NONTERM_typ - | NONTERM_bounds1 - | NONTERM_bound - | NONTERM_id - | NONTERM_int32 - | NONTERM_int64 - | NONTERM_float64 - | NONTERM_opt_actual_tyargs - | NONTERM_actual_tyargs - | NONTERM_actualTypSpecs - -// This function maps tokens to integers indexes -let tagOfToken (t:token) = - match t with - | VOID -> 0 - | VARARG -> 1 - | VALUETYPE -> 2 - | VALUE -> 3 - | UNSIGNED -> 4 - | UNMANAGED -> 5 - | UINT8 -> 6 - | UINT64 -> 7 - | UINT32 -> 8 - | UINT16 -> 9 - | UINT -> 10 - | TYPEDREF -> 11 - | THISCALL -> 12 - | STRING -> 13 - | STDCALL -> 14 - | STAR -> 15 - | SLASH -> 16 - | RPAREN -> 17 - | RBRACK -> 18 - | PLUS -> 19 - | OBJECT -> 20 - | NATIVE -> 21 - | METHOD -> 22 - | LPAREN -> 23 - | LESS -> 24 - | LBRACK -> 25 - | INT8 -> 26 - | INT64 -> 27 - | INT32 -> 28 - | INT16 -> 29 - | INT -> 30 - | INSTANCE -> 31 - | GREATER -> 32 - | FLOAT64 -> 33 - | FLOAT32 -> 34 - | FIELD -> 35 - | FASTCALL -> 36 - | EXPLICIT -> 37 - | EOF -> 38 - | ELIPSES -> 39 - | DOT_CTOR -> 40 - | DOT_CCTOR -> 41 - | DOT -> 42 - | DEFAULT -> 43 - | DCOLON -> 44 - | COMMA -> 45 - | CLASS -> 46 - | CHAR -> 47 - | CDECL -> 48 - | BYTEARRAY -> 49 - | BOOL -> 50 - | BANG -> 51 - | AMP -> 52 - | VAL_SQSTRING _ -> 53 - | VAL_QSTRING _ -> 54 - | VAL_DOTTEDNAME _ -> 55 - | VAL_ID _ -> 56 - | VAL_HEXBYTE _ -> 57 - | INSTR_VALUETYPE _ -> 58 - | INSTR_INT_TYPE _ -> 59 - | INSTR_TYPE _ -> 60 - | INSTR_TOK _ -> 61 - | INSTR_SWITCH _ -> 62 - | INSTR_STRING _ -> 63 - | INSTR_NONE _ -> 64 - | INSTR_METHOD _ -> 65 - | INSTR_LOC _ -> 66 - | INSTR_R _ -> 67 - | INSTR_I8 _ -> 68 - | INSTR_I32_I32 _ -> 69 - | INSTR_I _ -> 70 - | INSTR_ARG _ -> 71 - | VAL_FLOAT64 _ -> 72 - | VAL_INT32_ELIPSES _ -> 73 - | VAL_INT64 _ -> 74 - -// This function maps integers indexes to symbolic token ids -let tokenTagToTokenId (tokenIdx:int) = - match tokenIdx with - | 0 -> TOKEN_VOID - | 1 -> TOKEN_VARARG - | 2 -> TOKEN_VALUETYPE - | 3 -> TOKEN_VALUE - | 4 -> TOKEN_UNSIGNED - | 5 -> TOKEN_UNMANAGED - | 6 -> TOKEN_UINT8 - | 7 -> TOKEN_UINT64 - | 8 -> TOKEN_UINT32 - | 9 -> TOKEN_UINT16 - | 10 -> TOKEN_UINT - | 11 -> TOKEN_TYPEDREF - | 12 -> TOKEN_THISCALL - | 13 -> TOKEN_STRING - | 14 -> TOKEN_STDCALL - | 15 -> TOKEN_STAR - | 16 -> TOKEN_SLASH - | 17 -> TOKEN_RPAREN - | 18 -> TOKEN_RBRACK - | 19 -> TOKEN_PLUS - | 20 -> TOKEN_OBJECT - | 21 -> TOKEN_NATIVE - | 22 -> TOKEN_METHOD - | 23 -> TOKEN_LPAREN - | 24 -> TOKEN_LESS - | 25 -> TOKEN_LBRACK - | 26 -> TOKEN_INT8 - | 27 -> TOKEN_INT64 - | 28 -> TOKEN_INT32 - | 29 -> TOKEN_INT16 - | 30 -> TOKEN_INT - | 31 -> TOKEN_INSTANCE - | 32 -> TOKEN_GREATER - | 33 -> TOKEN_FLOAT64 - | 34 -> TOKEN_FLOAT32 - | 35 -> TOKEN_FIELD - | 36 -> TOKEN_FASTCALL - | 37 -> TOKEN_EXPLICIT - | 38 -> TOKEN_EOF - | 39 -> TOKEN_ELIPSES - | 40 -> TOKEN_DOT_CTOR - | 41 -> TOKEN_DOT_CCTOR - | 42 -> TOKEN_DOT - | 43 -> TOKEN_DEFAULT - | 44 -> TOKEN_DCOLON - | 45 -> TOKEN_COMMA - | 46 -> TOKEN_CLASS - | 47 -> TOKEN_CHAR - | 48 -> TOKEN_CDECL - | 49 -> TOKEN_BYTEARRAY - | 50 -> TOKEN_BOOL - | 51 -> TOKEN_BANG - | 52 -> TOKEN_AMP - | 53 -> TOKEN_VAL_SQSTRING - | 54 -> TOKEN_VAL_QSTRING - | 55 -> TOKEN_VAL_DOTTEDNAME - | 56 -> TOKEN_VAL_ID - | 57 -> TOKEN_VAL_HEXBYTE - | 58 -> TOKEN_INSTR_VALUETYPE - | 59 -> TOKEN_INSTR_INT_TYPE - | 60 -> TOKEN_INSTR_TYPE - | 61 -> TOKEN_INSTR_TOK - | 62 -> TOKEN_INSTR_SWITCH - | 63 -> TOKEN_INSTR_STRING - | 64 -> TOKEN_INSTR_NONE - | 65 -> TOKEN_INSTR_METHOD - | 66 -> TOKEN_INSTR_LOC - | 67 -> TOKEN_INSTR_R - | 68 -> TOKEN_INSTR_I8 - | 69 -> TOKEN_INSTR_I32_I32 - | 70 -> TOKEN_INSTR_I - | 71 -> TOKEN_INSTR_ARG - | 72 -> TOKEN_VAL_FLOAT64 - | 73 -> TOKEN_VAL_INT32_ELIPSES - | 74 -> TOKEN_VAL_INT64 - | 77 -> TOKEN_end_of_input - | 75 -> TOKEN_error - | _ -> failwith "tokenTagToTokenId: bad token" - -/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production -let prodIdxToNonTerminal (prodIdx:int) = - match prodIdx with - | 0 -> NONTERM__starttop_instrs - | 1 -> NONTERM__starttop_typ - | 2 -> NONTERM_top_typ - | 3 -> NONTERM_top_instrs - | 4 -> NONTERM_compQstring - | 5 -> NONTERM_compQstring - | 6 -> NONTERM_methodName - | 7 -> NONTERM_methodName - | 8 -> NONTERM_methodName - | 9 -> NONTERM_instrs2 - | 10 -> NONTERM_instrs2 - | 11 -> NONTERM_methodSpec - | 12 -> NONTERM_methodSpecMaybeArrayMethod - | 13 -> NONTERM_instr_r_head - | 14 -> NONTERM_instr - | 15 -> NONTERM_instr - | 16 -> NONTERM_instr - | 17 -> NONTERM_instr - | 18 -> NONTERM_instr - | 19 -> NONTERM_instr - | 20 -> NONTERM_instr - | 21 -> NONTERM_instr - | 22 -> NONTERM_instr - | 23 -> NONTERM_instr - | 24 -> NONTERM_instr - | 25 -> NONTERM_instr - | 26 -> NONTERM_instr - | 27 -> NONTERM_sigArgs0 - | 28 -> NONTERM_sigArgs0 - | 29 -> NONTERM_sigArgs1 - | 30 -> NONTERM_sigArgs1a - | 31 -> NONTERM_sigArgs1a - | 32 -> NONTERM_sigArg - | 33 -> NONTERM_sigArg - | 34 -> NONTERM_opt_id - | 35 -> NONTERM_opt_id - | 36 -> NONTERM_name1 - | 37 -> NONTERM_name1 - | 38 -> NONTERM_name1 - | 39 -> NONTERM_className - | 40 -> NONTERM_className - | 41 -> NONTERM_slashedName - | 42 -> NONTERM_slashedName - | 43 -> NONTERM_typeNameInst - | 44 -> NONTERM_typeName - | 45 -> NONTERM_typSpec - | 46 -> NONTERM_typSpec - | 47 -> NONTERM_typSpec - | 48 -> NONTERM_callConv - | 49 -> NONTERM_callConv - | 50 -> NONTERM_callConv - | 51 -> NONTERM_callKind - | 52 -> NONTERM_callKind - | 53 -> NONTERM_callKind - | 54 -> NONTERM_callKind - | 55 -> NONTERM_callKind - | 56 -> NONTERM_callKind - | 57 -> NONTERM_callKind - | 58 -> NONTERM_typ - | 59 -> NONTERM_typ - | 60 -> NONTERM_typ - | 61 -> NONTERM_typ - | 62 -> NONTERM_typ - | 63 -> NONTERM_typ - | 64 -> NONTERM_typ - | 65 -> NONTERM_typ - | 66 -> NONTERM_typ - | 67 -> NONTERM_typ - | 68 -> NONTERM_typ - | 69 -> NONTERM_typ - | 70 -> NONTERM_typ - | 71 -> NONTERM_typ - | 72 -> NONTERM_typ - | 73 -> NONTERM_typ - | 74 -> NONTERM_typ - | 75 -> NONTERM_typ - | 76 -> NONTERM_typ - | 77 -> NONTERM_typ - | 78 -> NONTERM_typ - | 79 -> NONTERM_typ - | 80 -> NONTERM_typ - | 81 -> NONTERM_typ - | 82 -> NONTERM_typ - | 83 -> NONTERM_typ - | 84 -> NONTERM_typ - | 85 -> NONTERM_typ - | 86 -> NONTERM_typ - | 87 -> NONTERM_typ - | 88 -> NONTERM_typ - | 89 -> NONTERM_bounds1 - | 90 -> NONTERM_bounds1 - | 91 -> NONTERM_bound - | 92 -> NONTERM_bound - | 93 -> NONTERM_bound - | 94 -> NONTERM_bound - | 95 -> NONTERM_bound - | 96 -> NONTERM_bound - | 97 -> NONTERM_id - | 98 -> NONTERM_id - | 99 -> NONTERM_int32 - | 100 -> NONTERM_int64 - | 101 -> NONTERM_float64 - | 102 -> NONTERM_float64 - | 103 -> NONTERM_opt_actual_tyargs - | 104 -> NONTERM_opt_actual_tyargs - | 105 -> NONTERM_actual_tyargs - | 106 -> NONTERM_actualTypSpecs - | 107 -> NONTERM_actualTypSpecs - | _ -> failwith "prodIdxToNonTerminal: bad production index" - -let _fsyacc_endOfInputTag = 77 -let _fsyacc_tagOfErrorTerminal = 75 - -// This function gets the name of a token as a string -let token_to_string (t:token) = - match t with - | VOID -> "VOID" - | VARARG -> "VARARG" - | VALUETYPE -> "VALUETYPE" - | VALUE -> "VALUE" - | UNSIGNED -> "UNSIGNED" - | UNMANAGED -> "UNMANAGED" - | UINT8 -> "UINT8" - | UINT64 -> "UINT64" - | UINT32 -> "UINT32" - | UINT16 -> "UINT16" - | UINT -> "UINT" - | TYPEDREF -> "TYPEDREF" - | THISCALL -> "THISCALL" - | STRING -> "STRING" - | STDCALL -> "STDCALL" - | STAR -> "STAR" - | SLASH -> "SLASH" - | RPAREN -> "RPAREN" - | RBRACK -> "RBRACK" - | PLUS -> "PLUS" - | OBJECT -> "OBJECT" - | NATIVE -> "NATIVE" - | METHOD -> "METHOD" - | LPAREN -> "LPAREN" - | LESS -> "LESS" - | LBRACK -> "LBRACK" - | INT8 -> "INT8" - | INT64 -> "INT64" - | INT32 -> "INT32" - | INT16 -> "INT16" - | INT -> "INT" - | INSTANCE -> "INSTANCE" - | GREATER -> "GREATER" - | FLOAT64 -> "FLOAT64" - | FLOAT32 -> "FLOAT32" - | FIELD -> "FIELD" - | FASTCALL -> "FASTCALL" - | EXPLICIT -> "EXPLICIT" - | EOF -> "EOF" - | ELIPSES -> "ELIPSES" - | DOT_CTOR -> "DOT_CTOR" - | DOT_CCTOR -> "DOT_CCTOR" - | DOT -> "DOT" - | DEFAULT -> "DEFAULT" - | DCOLON -> "DCOLON" - | COMMA -> "COMMA" - | CLASS -> "CLASS" - | CHAR -> "CHAR" - | CDECL -> "CDECL" - | BYTEARRAY -> "BYTEARRAY" - | BOOL -> "BOOL" - | BANG -> "BANG" - | AMP -> "AMP" - | VAL_SQSTRING _ -> "VAL_SQSTRING" - | VAL_QSTRING _ -> "VAL_QSTRING" - | VAL_DOTTEDNAME _ -> "VAL_DOTTEDNAME" - | VAL_ID _ -> "VAL_ID" - | VAL_HEXBYTE _ -> "VAL_HEXBYTE" - | INSTR_VALUETYPE _ -> "INSTR_VALUETYPE" - | INSTR_INT_TYPE _ -> "INSTR_INT_TYPE" - | INSTR_TYPE _ -> "INSTR_TYPE" - | INSTR_TOK _ -> "INSTR_TOK" - | INSTR_SWITCH _ -> "INSTR_SWITCH" - | INSTR_STRING _ -> "INSTR_STRING" - | INSTR_NONE _ -> "INSTR_NONE" - | INSTR_METHOD _ -> "INSTR_METHOD" - | INSTR_LOC _ -> "INSTR_LOC" - | INSTR_R _ -> "INSTR_R" - | INSTR_I8 _ -> "INSTR_I8" - | INSTR_I32_I32 _ -> "INSTR_I32_I32" - | INSTR_I _ -> "INSTR_I" - | INSTR_ARG _ -> "INSTR_ARG" - | VAL_FLOAT64 _ -> "VAL_FLOAT64" - | VAL_INT32_ELIPSES _ -> "VAL_INT32_ELIPSES" - | VAL_INT64 _ -> "VAL_INT64" - -// This function gets the data carried by a token as an object -let _fsyacc_dataOfToken (t:token) = - match t with - | VOID -> (null : System.Object) - | VARARG -> (null : System.Object) - | VALUETYPE -> (null : System.Object) - | VALUE -> (null : System.Object) - | UNSIGNED -> (null : System.Object) - | UNMANAGED -> (null : System.Object) - | UINT8 -> (null : System.Object) - | UINT64 -> (null : System.Object) - | UINT32 -> (null : System.Object) - | UINT16 -> (null : System.Object) - | UINT -> (null : System.Object) - | TYPEDREF -> (null : System.Object) - | THISCALL -> (null : System.Object) - | STRING -> (null : System.Object) - | STDCALL -> (null : System.Object) - | STAR -> (null : System.Object) - | SLASH -> (null : System.Object) - | RPAREN -> (null : System.Object) - | RBRACK -> (null : System.Object) - | PLUS -> (null : System.Object) - | OBJECT -> (null : System.Object) - | NATIVE -> (null : System.Object) - | METHOD -> (null : System.Object) - | LPAREN -> (null : System.Object) - | LESS -> (null : System.Object) - | LBRACK -> (null : System.Object) - | INT8 -> (null : System.Object) - | INT64 -> (null : System.Object) - | INT32 -> (null : System.Object) - | INT16 -> (null : System.Object) - | INT -> (null : System.Object) - | INSTANCE -> (null : System.Object) - | GREATER -> (null : System.Object) - | FLOAT64 -> (null : System.Object) - | FLOAT32 -> (null : System.Object) - | FIELD -> (null : System.Object) - | FASTCALL -> (null : System.Object) - | EXPLICIT -> (null : System.Object) - | EOF -> (null : System.Object) - | ELIPSES -> (null : System.Object) - | DOT_CTOR -> (null : System.Object) - | DOT_CCTOR -> (null : System.Object) - | DOT -> (null : System.Object) - | DEFAULT -> (null : System.Object) - | DCOLON -> (null : System.Object) - | COMMA -> (null : System.Object) - | CLASS -> (null : System.Object) - | CHAR -> (null : System.Object) - | CDECL -> (null : System.Object) - | BYTEARRAY -> (null : System.Object) - | BOOL -> (null : System.Object) - | BANG -> (null : System.Object) - | AMP -> (null : System.Object) - | VAL_SQSTRING _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | VAL_QSTRING _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | VAL_DOTTEDNAME _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | VAL_ID _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | VAL_HEXBYTE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_VALUETYPE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_INT_TYPE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_TYPE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_TOK _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_SWITCH _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_STRING _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_NONE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_METHOD _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_LOC _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_R _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_I8 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_I32_I32 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_I _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INSTR_ARG _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | VAL_FLOAT64 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | VAL_INT32_ELIPSES _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | VAL_INT64 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x -let _fsyacc_gotos = [| 0us; 65535us; 0us; 65535us; 1us; 65535us; 2us; 3us; 1us; 65535us; 0us; 1us; 0us; 65535us; 1us; 65535us; 16us; 17us; 2us; 65535us; 0us; 6us; 11us; 12us; 0us; 65535us; 1us; 65535us; 37us; 38us; 0us; 65535us; 2us; 65535us; 0us; 11us; 11us; 11us; 1us; 65535us; 19us; 20us; 1us; 65535us; 19us; 48us; 1us; 65535us; 19us; 49us; 2us; 65535us; 19us; 50us; 51us; 52us; 1us; 65535us; 54us; 55us; 15us; 65535us; 14us; 60us; 16us; 10us; 39us; 60us; 42us; 60us; 44us; 60us; 46us; 60us; 63us; 59us; 64us; 59us; 65us; 60us; 68us; 60us; 92us; 60us; 95us; 60us; 97us; 60us; 149us; 60us; 153us; 60us; 10us; 65535us; 14us; 72us; 39us; 72us; 42us; 72us; 44us; 72us; 46us; 72us; 92us; 70us; 95us; 70us; 97us; 70us; 149us; 72us; 153us; 72us; 12us; 65535us; 14us; 67us; 39us; 67us; 42us; 67us; 44us; 67us; 46us; 67us; 65us; 66us; 68us; 69us; 92us; 67us; 95us; 67us; 97us; 67us; 149us; 67us; 153us; 67us; 3us; 65535us; 92us; 93us; 95us; 96us; 97us; 98us; 7us; 65535us; 14us; 73us; 39us; 73us; 42us; 73us; 44us; 73us; 46us; 73us; 149us; 73us; 153us; 73us; 7us; 65535us; 14us; 15us; 39us; 40us; 42us; 43us; 44us; 45us; 46us; 47us; 149us; 152us; 153us; 154us; 1us; 65535us; 37us; 13us; 3us; 65535us; 37us; 82us; 78us; 79us; 80us; 81us; 12us; 65535us; 2us; 4us; 13us; 14us; 14us; 74us; 19us; 54us; 39us; 74us; 42us; 74us; 44us; 74us; 46us; 74us; 51us; 54us; 75us; 76us; 149us; 74us; 153us; 74us; 2us; 65535us; 64us; 101us; 99us; 101us; 3us; 65535us; 64us; 131us; 99us; 131us; 132us; 133us; 17us; 65535us; 14us; 57us; 16us; 57us; 39us; 57us; 42us; 57us; 44us; 57us; 46us; 57us; 54us; 56us; 61us; 62us; 63us; 57us; 64us; 57us; 65us; 57us; 68us; 57us; 92us; 57us; 95us; 57us; 97us; 57us; 149us; 57us; 153us; 57us; 12us; 65535us; 23us; 24us; 25us; 26us; 27us; 28us; 29us; 30us; 30us; 31us; 41us; 42us; 64us; 134us; 99us; 134us; 129us; 130us; 132us; 134us; 135us; 136us; 137us; 138us; 3us; 65535us; 32us; 33us; 34us; 36us; 145us; 146us; 1us; 65535us; 34us; 35us; 2us; 65535us; 17us; 18us; 70us; 71us; 2us; 65535us; 17us; 148us; 70us; 148us; 1us; 65535us; 149us; 150us; |] -let _fsyacc_sparseGotoTableRowOffsets = [|0us; 1us; 2us; 4us; 6us; 7us; 9us; 12us; 13us; 15us; 16us; 19us; 21us; 23us; 25us; 28us; 30us; 46us; 57us; 70us; 74us; 82us; 90us; 92us; 96us; 109us; 112us; 116us; 134us; 147us; 151us; 153us; 156us; 159us; |] -let _fsyacc_stateToProdIdxsTableElements = [| 1us; 0us; 1us; 0us; 1us; 1us; 1us; 1us; 5us; 2us; 63us; 64us; 65us; 66us; 1us; 2us; 1us; 3us; 1us; 3us; 1us; 6us; 1us; 7us; 2us; 8us; 38us; 1us; 9us; 1us; 9us; 1us; 12us; 5us; 12us; 63us; 64us; 65us; 66us; 1us; 12us; 1us; 12us; 1us; 12us; 1us; 12us; 1us; 12us; 1us; 12us; 1us; 12us; 1us; 14us; 1us; 15us; 1us; 15us; 1us; 16us; 1us; 16us; 1us; 17us; 1us; 17us; 1us; 18us; 1us; 18us; 1us; 18us; 1us; 19us; 1us; 19us; 2us; 20us; 21us; 1us; 20us; 1us; 21us; 1us; 22us; 1us; 22us; 1us; 23us; 1us; 23us; 1us; 24us; 1us; 24us; 1us; 24us; 1us; 25us; 1us; 25us; 1us; 26us; 1us; 26us; 1us; 28us; 2us; 29us; 31us; 1us; 30us; 1us; 31us; 1us; 31us; 1us; 32us; 5us; 33us; 63us; 64us; 65us; 66us; 1us; 33us; 1us; 35us; 1us; 36us; 1us; 37us; 2us; 38us; 39us; 3us; 38us; 41us; 42us; 1us; 38us; 1us; 38us; 1us; 39us; 3us; 39us; 63us; 64us; 1us; 39us; 1us; 39us; 1us; 40us; 1us; 42us; 1us; 42us; 1us; 43us; 1us; 43us; 1us; 44us; 1us; 45us; 5us; 46us; 63us; 64us; 65us; 66us; 1us; 47us; 5us; 47us; 63us; 64us; 65us; 66us; 1us; 47us; 1us; 48us; 1us; 48us; 1us; 49us; 1us; 49us; 1us; 50us; 1us; 52us; 1us; 53us; 4us; 54us; 55us; 56us; 57us; 1us; 54us; 1us; 55us; 1us; 56us; 1us; 57us; 1us; 58us; 1us; 59us; 1us; 60us; 1us; 60us; 1us; 61us; 1us; 61us; 1us; 61us; 1us; 62us; 1us; 62us; 2us; 63us; 64us; 1us; 63us; 2us; 64us; 90us; 1us; 64us; 1us; 65us; 1us; 66us; 1us; 67us; 1us; 68us; 1us; 69us; 1us; 70us; 1us; 71us; 1us; 72us; 1us; 73us; 1us; 74us; 1us; 75us; 1us; 76us; 4us; 77us; 78us; 79us; 80us; 1us; 77us; 1us; 78us; 1us; 79us; 1us; 80us; 1us; 81us; 1us; 82us; 1us; 83us; 1us; 84us; 3us; 85us; 86us; 87us; 1us; 85us; 1us; 86us; 1us; 86us; 1us; 87us; 1us; 88us; 1us; 88us; 1us; 89us; 1us; 90us; 1us; 90us; 3us; 92us; 93us; 94us; 2us; 93us; 94us; 1us; 93us; 2us; 95us; 96us; 1us; 95us; 1us; 97us; 1us; 98us; 1us; 99us; 1us; 100us; 1us; 101us; 1us; 102us; 1us; 102us; 1us; 102us; 1us; 102us; 1us; 104us; 1us; 105us; 2us; 105us; 107us; 1us; 105us; 1us; 106us; 1us; 107us; 1us; 107us; |] -let _fsyacc_stateToProdIdxsTableRowOffsets = [|0us; 2us; 4us; 6us; 8us; 14us; 16us; 18us; 20us; 22us; 24us; 27us; 29us; 31us; 33us; 39us; 41us; 43us; 45us; 47us; 49us; 51us; 53us; 55us; 57us; 59us; 61us; 63us; 65us; 67us; 69us; 71us; 73us; 75us; 77us; 80us; 82us; 84us; 86us; 88us; 90us; 92us; 94us; 96us; 98us; 100us; 102us; 104us; 106us; 108us; 111us; 113us; 115us; 117us; 119us; 125us; 127us; 129us; 131us; 133us; 136us; 140us; 142us; 144us; 146us; 150us; 152us; 154us; 156us; 158us; 160us; 162us; 164us; 166us; 168us; 174us; 176us; 182us; 184us; 186us; 188us; 190us; 192us; 194us; 196us; 198us; 203us; 205us; 207us; 209us; 211us; 213us; 215us; 217us; 219us; 221us; 223us; 225us; 227us; 229us; 232us; 234us; 237us; 239us; 241us; 243us; 245us; 247us; 249us; 251us; 253us; 255us; 257us; 259us; 261us; 263us; 268us; 270us; 272us; 274us; 276us; 278us; 280us; 282us; 284us; 288us; 290us; 292us; 294us; 296us; 298us; 300us; 302us; 304us; 306us; 310us; 313us; 315us; 318us; 320us; 322us; 324us; 326us; 328us; 330us; 332us; 334us; 336us; 338us; 340us; 342us; 345us; 347us; 349us; 351us; |] -let _fsyacc_action_rows = 155 -let _fsyacc_actionTableElements = [|12us; 16394us; 58us; 44us; 59us; 41us; 60us; 39us; 61us; 46us; 64us; 22us; 65us; 37us; 66us; 25us; 67us; 34us; 68us; 32us; 69us; 29us; 70us; 27us; 71us; 23us; 0us; 49152us; 22us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 0us; 49152us; 4us; 32768us; 15us; 104us; 25us; 99us; 38us; 5us; 52us; 103us; 0us; 16386us; 1us; 32768us; 38us; 7us; 0us; 16387us; 0us; 16390us; 0us; 16391us; 1us; 16392us; 42us; 61us; 12us; 16394us; 58us; 44us; 59us; 41us; 60us; 39us; 61us; 46us; 64us; 22us; 65us; 37us; 66us; 25us; 67us; 34us; 68us; 32us; 69us; 29us; 70us; 27us; 71us; 23us; 0us; 16393us; 22us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 29us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 15us; 104us; 20us; 91us; 21us; 124us; 23us; 75us; 25us; 64us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 52us; 103us; 53us; 140us; 55us; 58us; 56us; 139us; 1us; 32768us; 44us; 16us; 5us; 32768us; 40us; 8us; 41us; 9us; 53us; 140us; 55us; 58us; 56us; 139us; 1us; 16487us; 24us; 149us; 1us; 32768us; 23us; 19us; 23us; 16411us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 39us; 53us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 1us; 32768us; 17us; 21us; 0us; 16396us; 0us; 16398us; 1us; 32768us; 74us; 141us; 0us; 16399us; 1us; 32768us; 74us; 141us; 0us; 16400us; 1us; 32768us; 74us; 141us; 0us; 16401us; 1us; 32768us; 74us; 141us; 1us; 32768us; 74us; 141us; 0us; 16402us; 1us; 32768us; 74us; 142us; 0us; 16403us; 3us; 32768us; 33us; 144us; 72us; 143us; 74us; 142us; 0us; 16404us; 0us; 16405us; 5us; 16435us; 1us; 84us; 5us; 85us; 31us; 78us; 37us; 80us; 43us; 83us; 0us; 16406us; 27us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 23us; 75us; 25us; 63us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 53us; 140us; 55us; 58us; 56us; 139us; 0us; 16407us; 1us; 32768us; 74us; 141us; 27us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 23us; 75us; 25us; 63us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 53us; 140us; 55us; 58us; 56us; 139us; 0us; 16408us; 27us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 23us; 75us; 25us; 63us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 53us; 140us; 55us; 58us; 56us; 139us; 0us; 16409us; 27us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 23us; 75us; 25us; 63us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 53us; 140us; 55us; 58us; 56us; 139us; 0us; 16410us; 0us; 16412us; 1us; 16413us; 45us; 51us; 0us; 16414us; 23us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 39us; 53us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 0us; 16415us; 0us; 16416us; 5us; 16418us; 15us; 104us; 25us; 99us; 52us; 103us; 53us; 140us; 56us; 139us; 0us; 16417us; 0us; 16419us; 0us; 16420us; 0us; 16421us; 2us; 32768us; 18us; 65us; 42us; 61us; 2us; 16425us; 16us; 68us; 42us; 61us; 2us; 32768us; 53us; 140us; 56us; 139us; 0us; 16422us; 3us; 32768us; 53us; 140us; 55us; 58us; 56us; 139us; 6us; 16475us; 18us; 100us; 53us; 140us; 55us; 58us; 56us; 139us; 73us; 137us; 74us; 141us; 3us; 32768us; 53us; 140us; 55us; 58us; 56us; 139us; 0us; 16423us; 0us; 16424us; 3us; 32768us; 53us; 140us; 55us; 58us; 56us; 139us; 0us; 16426us; 1us; 16487us; 24us; 149us; 0us; 16427us; 0us; 16428us; 0us; 16429us; 3us; 16430us; 15us; 104us; 25us; 99us; 52us; 103us; 22us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 4us; 32768us; 15us; 104us; 17us; 77us; 25us; 99us; 52us; 103us; 0us; 16431us; 3us; 16435us; 1us; 84us; 5us; 85us; 43us; 83us; 0us; 16432us; 3us; 16435us; 1us; 84us; 5us; 85us; 43us; 83us; 0us; 16433us; 0us; 16434us; 0us; 16436us; 0us; 16437us; 4us; 32768us; 12us; 88us; 14us; 87us; 36us; 89us; 48us; 86us; 0us; 16438us; 0us; 16439us; 0us; 16440us; 0us; 16441us; 0us; 16442us; 0us; 16443us; 4us; 32768us; 25us; 63us; 53us; 140us; 55us; 58us; 56us; 139us; 0us; 16444us; 1us; 32768us; 46us; 95us; 4us; 32768us; 25us; 63us; 53us; 140us; 55us; 58us; 56us; 139us; 0us; 16445us; 4us; 32768us; 25us; 63us; 53us; 140us; 55us; 58us; 56us; 139us; 0us; 16446us; 3us; 16475us; 18us; 100us; 73us; 137us; 74us; 141us; 0us; 16447us; 2us; 32768us; 18us; 102us; 45us; 132us; 0us; 16448us; 0us; 16449us; 0us; 16450us; 0us; 16451us; 0us; 16452us; 0us; 16453us; 0us; 16454us; 0us; 16455us; 0us; 16456us; 0us; 16457us; 0us; 16458us; 0us; 16459us; 0us; 16460us; 4us; 32768us; 26us; 116us; 27us; 119us; 28us; 118us; 29us; 117us; 0us; 16461us; 0us; 16462us; 0us; 16463us; 0us; 16464us; 0us; 16465us; 0us; 16466us; 0us; 16467us; 0us; 16468us; 3us; 32768us; 4us; 126us; 10us; 128us; 30us; 125us; 0us; 16469us; 1us; 32768us; 30us; 127us; 0us; 16470us; 0us; 16471us; 1us; 32768us; 74us; 141us; 0us; 16472us; 0us; 16473us; 2us; 16475us; 73us; 137us; 74us; 141us; 0us; 16474us; 1us; 16476us; 39us; 135us; 1us; 16478us; 74us; 141us; 0us; 16477us; 1us; 16480us; 74us; 141us; 0us; 16479us; 0us; 16481us; 0us; 16482us; 0us; 16483us; 0us; 16484us; 0us; 16485us; 1us; 32768us; 23us; 145us; 1us; 32768us; 74us; 142us; 1us; 32768us; 17us; 147us; 0us; 16486us; 0us; 16488us; 27us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 23us; 75us; 25us; 63us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 53us; 140us; 55us; 58us; 56us; 139us; 2us; 32768us; 32us; 151us; 45us; 153us; 0us; 16489us; 0us; 16490us; 27us; 32768us; 0us; 107us; 2us; 97us; 3us; 94us; 4us; 115us; 6us; 120us; 7us; 123us; 8us; 122us; 9us; 121us; 11us; 105us; 13us; 90us; 20us; 91us; 21us; 124us; 23us; 75us; 25us; 63us; 26us; 109us; 27us; 112us; 28us; 111us; 29us; 110us; 33us; 114us; 34us; 113us; 46us; 92us; 47us; 106us; 50us; 108us; 51us; 129us; 53us; 140us; 55us; 58us; 56us; 139us; 0us; 16491us; |] -let _fsyacc_actionTableRowOffsets = [|0us; 13us; 14us; 37us; 38us; 43us; 44us; 46us; 47us; 48us; 49us; 51us; 64us; 65us; 88us; 118us; 120us; 126us; 128us; 130us; 154us; 156us; 157us; 158us; 160us; 161us; 163us; 164us; 166us; 167us; 169us; 171us; 172us; 174us; 175us; 179us; 180us; 181us; 187us; 188us; 216us; 217us; 219us; 247us; 248us; 276us; 277us; 305us; 306us; 307us; 309us; 310us; 334us; 335us; 336us; 342us; 343us; 344us; 345us; 346us; 349us; 352us; 355us; 356us; 360us; 367us; 371us; 372us; 373us; 377us; 378us; 380us; 381us; 382us; 383us; 387us; 410us; 415us; 416us; 420us; 421us; 425us; 426us; 427us; 428us; 429us; 434us; 435us; 436us; 437us; 438us; 439us; 440us; 445us; 446us; 448us; 453us; 454us; 459us; 460us; 464us; 465us; 468us; 469us; 470us; 471us; 472us; 473us; 474us; 475us; 476us; 477us; 478us; 479us; 480us; 481us; 486us; 487us; 488us; 489us; 490us; 491us; 492us; 493us; 494us; 498us; 499us; 501us; 502us; 503us; 505us; 506us; 507us; 510us; 511us; 513us; 515us; 516us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 526us; 528us; 530us; 531us; 532us; 560us; 563us; 564us; 565us; 593us; |] -let _fsyacc_reductionSymbolCounts = [|1us; 1us; 2us; 2us; 1us; 3us; 1us; 1us; 1us; 2us; 0us; 1us; 9us; 2us; 1us; 2us; 2us; 2us; 3us; 2us; 2us; 2us; 2us; 2us; 3us; 2us; 2us; 0us; 1us; 1us; 1us; 3us; 1us; 2us; 0us; 1us; 1us; 1us; 3us; 4us; 1us; 1us; 3us; 2us; 1us; 1us; 1us; 3us; 2us; 2us; 1us; 0us; 1us; 1us; 2us; 2us; 2us; 2us; 1us; 1us; 2us; 3us; 2us; 3us; 4us; 2us; 2us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 2us; 2us; 2us; 2us; 1us; 1us; 1us; 1us; 2us; 3us; 2us; 2us; 1us; 3us; 0us; 1us; 3us; 2us; 2us; 1us; 1us; 1us; 1us; 1us; 1us; 4us; 0us; 1us; 3us; 1us; 3us; |] -let _fsyacc_productionToNonTerminalTable = [|0us; 1us; 2us; 3us; 4us; 4us; 5us; 5us; 5us; 6us; 6us; 7us; 8us; 9us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 11us; 11us; 12us; 13us; 13us; 14us; 14us; 15us; 15us; 16us; 16us; 16us; 17us; 17us; 18us; 18us; 19us; 20us; 21us; 21us; 21us; 22us; 22us; 22us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 25us; 25us; 26us; 26us; 26us; 26us; 26us; 26us; 27us; 27us; 28us; 29us; 30us; 30us; 31us; 31us; 32us; 33us; 33us; |] -let _fsyacc_immediateActions = [|65535us; 49152us; 65535us; 49152us; 65535us; 16386us; 65535us; 16387us; 16390us; 16391us; 65535us; 65535us; 16393us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16396us; 16398us; 65535us; 16399us; 65535us; 16400us; 65535us; 16401us; 65535us; 65535us; 16402us; 65535us; 16403us; 65535us; 16404us; 16405us; 65535us; 16406us; 65535us; 16407us; 65535us; 65535us; 16408us; 65535us; 16409us; 65535us; 16410us; 16412us; 65535us; 16414us; 65535us; 16415us; 16416us; 65535us; 16417us; 16419us; 16420us; 16421us; 65535us; 65535us; 65535us; 16422us; 65535us; 65535us; 65535us; 16423us; 16424us; 65535us; 16426us; 65535us; 16427us; 16428us; 16429us; 65535us; 65535us; 65535us; 16431us; 65535us; 16432us; 65535us; 16433us; 16434us; 16436us; 16437us; 65535us; 16438us; 16439us; 16440us; 16441us; 16442us; 16443us; 65535us; 16444us; 65535us; 65535us; 16445us; 65535us; 16446us; 65535us; 16447us; 65535us; 16448us; 16449us; 16450us; 16451us; 16452us; 16453us; 16454us; 16455us; 16456us; 16457us; 16458us; 16459us; 16460us; 65535us; 16461us; 16462us; 16463us; 16464us; 16465us; 16466us; 16467us; 16468us; 65535us; 16469us; 65535us; 16470us; 16471us; 65535us; 16472us; 16473us; 65535us; 16474us; 65535us; 65535us; 16477us; 65535us; 16479us; 16481us; 16482us; 16483us; 16484us; 16485us; 65535us; 65535us; 65535us; 16486us; 16488us; 65535us; 65535us; 16489us; 16490us; 65535us; 16491us; |] -let _fsyacc_reductions () = [| -# 717 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : ILInstr array)) in - Microsoft.FSharp.Core.Operators.box - ( - ( - raise (Internal.Utilities.Text.Parsing.Accept(Microsoft.FSharp.Core.Operators.box _1)) - ) - : '_starttop_instrs)); -# 726 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : ILType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( - raise (Internal.Utilities.Text.Parsing.Accept(Microsoft.FSharp.Core.Operators.box _1)) - ) - : '_starttop_typ)); -# 735 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : ILType resolved_at_mspec_scope)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 163 "..\..\absil\ilpars.mly" - resolve_mspec_scope _1 [] - ) -# 163 "..\..\absil\ilpars.mly" - : ILType)); -# 746 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'instrs2)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 167 "..\..\absil\ilpars.mly" - Array.of_list _1 - ) -# 167 "..\..\absil\ilpars.mly" - : ILInstr array)); -# 757 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 171 "..\..\absil\ilpars.mly" - _1 - ) -# 171 "..\..\absil\ilpars.mly" - : 'compQstring)); -# 768 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'compQstring)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 172 "..\..\absil\ilpars.mly" - _1 ^ _3 - ) -# 172 "..\..\absil\ilpars.mly" - : 'compQstring)); -# 780 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 176 "..\..\absil\ilpars.mly" - ".ctor" - ) -# 176 "..\..\absil\ilpars.mly" - : 'methodName)); -# 790 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 178 "..\..\absil\ilpars.mly" - ".cctor" - ) -# 178 "..\..\absil\ilpars.mly" - : 'methodName)); -# 800 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 180 "..\..\absil\ilpars.mly" - _1 - ) -# 180 "..\..\absil\ilpars.mly" - : 'methodName)); -# 811 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'instrs2)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 184 "..\..\absil\ilpars.mly" - _1 [] :: _2 - ) -# 184 "..\..\absil\ilpars.mly" - : 'instrs2)); -# 823 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 185 "..\..\absil\ilpars.mly" - [] - ) -# 185 "..\..\absil\ilpars.mly" - : 'instrs2)); -# 833 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'methodSpecMaybeArrayMethod)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 189 "..\..\absil\ilpars.mly" - let data,varargs = _1 in - mk_mspec_in_typ data,varargs - ) -# 189 "..\..\absil\ilpars.mly" - : 'methodSpec)); -# 845 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'callConv)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : ILType resolved_at_mspec_scope)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typSpec)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'methodName)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_actual_tyargs)) in - let _8 = (let data = parseState.GetInput(8) in (Microsoft.FSharp.Core.Operators.unbox data : 'sigArgs0)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 195 "..\..\absil\ilpars.mly" - let callee_class_typ = resolve_mspec_scope_to_current_scope _3 in - let gscope = (if Ilx.gen_is_array_ty callee_class_typ then None else Some (tspec_of_typ callee_class_typ)) in - let argtys_n_varargs = resolve_mspec_scope_to_formal_scope gscope _8 in - let (argtys,varargs) = decode_varargs argtys_n_varargs in - let minst = resolve_mspec_scope_to_current_scope _6 in - let callee_retty = resolve_mspec_scope_to_formal_scope gscope _2 in - (callee_class_typ, _1, _5, argtys, callee_retty, minst), varargs - ) -# 195 "..\..\absil\ilpars.mly" - : 'methodSpecMaybeArrayMethod)); -# 867 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.real_instr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 205 "..\..\absil\ilpars.mly" - lexing_bytearray := true; _1 - ) -# 205 "..\..\absil\ilpars.mly" - : 'instr_r_head)); -# 878 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.none_instr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 209 "..\..\absil\ilpars.mly" - (_1 ()) - ) -# 209 "..\..\absil\ilpars.mly" - : 'instr)); -# 889 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.arg_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 211 "..\..\absil\ilpars.mly" - (_1 (uint16 ( ( _2)))) - ) -# 211 "..\..\absil\ilpars.mly" - : 'instr)); -# 901 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.loc_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 213 "..\..\absil\ilpars.mly" - (_1 (uint16 ( ( _2)))) - ) -# 213 "..\..\absil\ilpars.mly" - : 'instr)); -# 913 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.i32_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 215 "..\..\absil\ilpars.mly" - (_1 _2) - ) -# 215 "..\..\absil\ilpars.mly" - : 'instr)); -# 925 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.i32_i32_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 217 "..\..\absil\ilpars.mly" - (_1 (_2,_3)) - ) -# 217 "..\..\absil\ilpars.mly" - : 'instr)); -# 938 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.i64_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'int64)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 219 "..\..\absil\ilpars.mly" - (_1 _2) - ) -# 219 "..\..\absil\ilpars.mly" - : 'instr)); -# 950 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.real_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'float64)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 221 "..\..\absil\ilpars.mly" - (_1 (NUM_R8 _2)) - ) -# 221 "..\..\absil\ilpars.mly" - : 'instr)); -# 962 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.real_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'int64)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 223 "..\..\absil\ilpars.mly" - (_1 (NUM_R8 (float _2))) - ) -# 223 "..\..\absil\ilpars.mly" - : 'instr)); -# 974 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.method_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'methodSpecMaybeArrayMethod)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 225 "..\..\absil\ilpars.mly" - - begin - let ((encl_typ, cc, nm, argtys, retty, minst) as data),varargs = _2 in - if Ilx.gen_is_array_ty encl_typ then - (fun prefixes -> - let (shape,ty) = gen_dest_array_ty encl_typ in - begin match nm with - | "Get" -> I_ldelem_any(shape,ty) - | "Set" -> I_stelem_any(shape,ty) - | "Address" -> I_ldelema((if prefixes=[Prefix_Readonly] then ReadonlyAddress else NormalAddress), shape,ty) - | ".ctor" -> I_newarr(shape,ty) - | _ -> failwith "bad method on array type" - end) - else - - _1 (mk_mspec_in_typ data, varargs) - end - ) -# 225 "..\..\absil\ilpars.mly" - : 'instr)); -# 1002 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.type_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 243 "..\..\absil\ilpars.mly" - (_1 (resolve_mspec_scope_to_current_scope _2)) - ) -# 243 "..\..\absil\ilpars.mly" - : 'instr)); -# 1014 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.int_type_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 245 "..\..\absil\ilpars.mly" - (_1 ( _2,resolve_mspec_scope_to_current_scope _3)) - ) -# 245 "..\..\absil\ilpars.mly" - : 'instr)); -# 1027 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.valuetype_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 247 "..\..\absil\ilpars.mly" - let vtr = - match resolve_mspec_scope_to_current_scope _2 with - (* Type_boxed tr -> Type_value tr - | Type_value vtr as typ -> typ - | *) typ -> typ in - (_1 vtr) - ) -# 247 "..\..\absil\ilpars.mly" - : 'instr)); -# 1044 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ilascii.tok_instr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 254 "..\..\absil\ilpars.mly" - (_1 (Token_type (resolve_mspec_scope_to_current_scope _2))) - ) -# 254 "..\..\absil\ilpars.mly" - : 'instr)); -# 1056 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 261 "..\..\absil\ilpars.mly" - no_mspec_scope [] - ) -# 261 "..\..\absil\ilpars.mly" - : 'sigArgs0)); -# 1066 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'sigArgs1)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 262 "..\..\absil\ilpars.mly" - _1 - ) -# 262 "..\..\absil\ilpars.mly" - : 'sigArgs0)); -# 1077 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'sigArgs1a)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 266 "..\..\absil\ilpars.mly" - ResolvedAtMethodSpecScope (fun c -> List.map (fun obj -> resolve_mspec_scope obj c) (List.rev _1)) - ) -# 266 "..\..\absil\ilpars.mly" - : 'sigArgs1)); -# 1088 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'sigArg)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 270 "..\..\absil\ilpars.mly" - [_1] - ) -# 270 "..\..\absil\ilpars.mly" - : 'sigArgs1a)); -# 1099 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'sigArgs1a)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'sigArg)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 272 "..\..\absil\ilpars.mly" - _3:: _1 - ) -# 272 "..\..\absil\ilpars.mly" - : 'sigArgs1a)); -# 1111 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 276 "..\..\absil\ilpars.mly" - no_mspec_scope Sentinel - ) -# 276 "..\..\absil\ilpars.mly" - : 'sigArg)); -# 1121 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : ILType resolved_at_mspec_scope)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_id)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 278 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _1 (fun ty -> - no_mspec_scope (SigArg(_2, ty))) - ) -# 278 "..\..\absil\ilpars.mly" - : 'sigArg)); -# 1134 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 283 "..\..\absil\ilpars.mly" - None - ) -# 283 "..\..\absil\ilpars.mly" - : 'opt_id)); -# 1144 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'id)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 283 "..\..\absil\ilpars.mly" - Some _1 - ) -# 283 "..\..\absil\ilpars.mly" - : 'opt_id)); -# 1155 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'id)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 291 "..\..\absil\ilpars.mly" - _1 - ) -# 291 "..\..\absil\ilpars.mly" - : string)); -# 1166 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 293 "..\..\absil\ilpars.mly" - _1 - ) -# 293 "..\..\absil\ilpars.mly" - : string)); -# 1177 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'id)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 295 "..\..\absil\ilpars.mly" - _1 ^"."^ _3 - ) -# 295 "..\..\absil\ilpars.mly" - : string)); -# 1189 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'slashedName)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 299 "..\..\absil\ilpars.mly" - let (enc,nm) = _4 in - let aref = find_aref _2 in - ScopeRef_assembly aref, enc, nm - ) -# 299 "..\..\absil\ilpars.mly" - : 'className)); -# 1203 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'slashedName)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 303 "..\..\absil\ilpars.mly" - let enc, nm = _1 in (ScopeRef_local, enc, nm) - ) -# 303 "..\..\absil\ilpars.mly" - : 'className)); -# 1214 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 307 "..\..\absil\ilpars.mly" - ([],_1) - ) -# 307 "..\..\absil\ilpars.mly" - : 'slashedName)); -# 1225 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'slashedName)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 309 "..\..\absil\ilpars.mly" - let (enc,nm) = _3 in (_1::enc, nm) - ) -# 309 "..\..\absil\ilpars.mly" - : 'slashedName)); -# 1237 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'className)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_actual_tyargs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 313 "..\..\absil\ilpars.mly" - let (a,b,c) = _1 in - resolve_mspec_scope_then _2 (fun inst -> - no_mspec_scope ( (mk_tspec ( (mk_nested_tref (a,b,c)), inst)))) - ) -# 313 "..\..\absil\ilpars.mly" - : 'typeNameInst)); -# 1251 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'className)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 320 "..\..\absil\ilpars.mly" - let (a,b,c) = _1 in - no_mspec_scope ( (mk_tspec ( (mk_nested_tref (a,b,c)), mk_empty_gactuals))) - ) -# 320 "..\..\absil\ilpars.mly" - : 'typeName)); -# 1263 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeName)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 326 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _1 (fun tref -> - no_mspec_scope (Type_boxed tref)) - ) -# 326 "..\..\absil\ilpars.mly" - : 'typSpec)); -# 1275 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : ILType resolved_at_mspec_scope)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 329 "..\..\absil\ilpars.mly" - _1 - ) -# 329 "..\..\absil\ilpars.mly" - : 'typSpec)); -# 1286 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : ILType resolved_at_mspec_scope)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 331 "..\..\absil\ilpars.mly" - _2 - ) -# 331 "..\..\absil\ilpars.mly" - : 'typSpec)); -# 1297 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'callKind)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 336 "..\..\absil\ilpars.mly" - Callconv (CC_instance,_2) - ) -# 336 "..\..\absil\ilpars.mly" - : 'callConv)); -# 1308 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'callKind)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 338 "..\..\absil\ilpars.mly" - Callconv (CC_instance_explicit,_2) - ) -# 338 "..\..\absil\ilpars.mly" - : 'callConv)); -# 1319 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'callKind)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 340 "..\..\absil\ilpars.mly" - Callconv (CC_static,_1) - ) -# 340 "..\..\absil\ilpars.mly" - : 'callConv)); -# 1330 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 344 "..\..\absil\ilpars.mly" - CC_default - ) -# 344 "..\..\absil\ilpars.mly" - : 'callKind)); -# 1340 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 346 "..\..\absil\ilpars.mly" - CC_default - ) -# 346 "..\..\absil\ilpars.mly" - : 'callKind)); -# 1350 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 348 "..\..\absil\ilpars.mly" - CC_vararg - ) -# 348 "..\..\absil\ilpars.mly" - : 'callKind)); -# 1360 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 350 "..\..\absil\ilpars.mly" - CC_cdecl - ) -# 350 "..\..\absil\ilpars.mly" - : 'callKind)); -# 1370 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 352 "..\..\absil\ilpars.mly" - CC_stdcall - ) -# 352 "..\..\absil\ilpars.mly" - : 'callKind)); -# 1380 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 354 "..\..\absil\ilpars.mly" - CC_thiscall - ) -# 354 "..\..\absil\ilpars.mly" - : 'callKind)); -# 1390 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 356 "..\..\absil\ilpars.mly" - CC_fastcall - ) -# 356 "..\..\absil\ilpars.mly" - : 'callKind)); -# 1400 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 365 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_String - ) -# 365 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1410 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 367 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_Object - ) -# 367 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1420 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeNameInst)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 369 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _2 (fun tspec -> - no_mspec_scope (Type_boxed tspec)) - ) -# 369 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1432 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeNameInst)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 372 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _3 (fun tspec -> - no_mspec_scope (Type_value tspec)) - ) -# 372 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1444 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeNameInst)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 375 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _2 (fun tspec -> - no_mspec_scope (Type_value tspec)) - ) -# 375 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1456 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : ILType resolved_at_mspec_scope)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 378 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _1 (fun ty -> no_mspec_scope (mk_sdarray_ty ty)) - ) -# 378 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1467 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : ILType resolved_at_mspec_scope)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'bounds1)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 380 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _1 (fun ty -> no_mspec_scope (mk_array_ty (ty,ILArrayShape _3))) - ) -# 380 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1479 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : ILType resolved_at_mspec_scope)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 382 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _1 (fun ty -> no_mspec_scope (Type_byref ty)) - ) -# 382 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1490 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : ILType resolved_at_mspec_scope)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 384 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _1 (fun ty -> no_mspec_scope (Type_ptr ty)) - ) -# 384 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1501 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 387 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_TypedReference - ) -# 387 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1511 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 389 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_char - ) -# 389 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1521 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 391 "..\..\absil\ilpars.mly" - no_mspec_scope Type_void - ) -# 391 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1531 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 393 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_bool - ) -# 393 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1541 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 395 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_int8 - ) -# 395 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1551 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 397 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_int16 - ) -# 397 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1561 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 399 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_int32 - ) -# 399 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1571 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 401 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_int64 - ) -# 401 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1581 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 403 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_float32 - ) -# 403 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1591 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 405 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_float64 - ) -# 405 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1601 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 407 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_uint8 - ) -# 407 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1611 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 409 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_uint16 - ) -# 409 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1621 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 411 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_uint32 - ) -# 411 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1631 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 413 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_uint64 - ) -# 413 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1641 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 415 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_uint8 - ) -# 415 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1651 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 417 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_uint16 - ) -# 417 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1661 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 419 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_uint32 - ) -# 419 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1671 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 421 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_uint64 - ) -# 421 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1681 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 423 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_IntPtr - ) -# 423 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1691 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 425 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_UIntPtr - ) -# 425 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1701 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 427 "..\..\absil\ilpars.mly" - no_mspec_scope (!parse_ilGlobals).typ_UIntPtr - ) -# 427 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1711 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 430 "..\..\absil\ilpars.mly" - no_mspec_scope (Type_tyvar (uint16 ( _2))) - ) -# 430 "..\..\absil\ilpars.mly" - : ILType resolved_at_mspec_scope)); -# 1722 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'bound)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 435 "..\..\absil\ilpars.mly" - [_1] - ) -# 435 "..\..\absil\ilpars.mly" - : 'bounds1)); -# 1733 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'bounds1)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'bound)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 437 "..\..\absil\ilpars.mly" - _1 @ [_3] - ) -# 437 "..\..\absil\ilpars.mly" - : 'bounds1)); -# 1745 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 441 "..\..\absil\ilpars.mly" - (None, None) - ) -# 441 "..\..\absil\ilpars.mly" - : 'bound)); -# 1755 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 443 "..\..\absil\ilpars.mly" - (None, Some _1) - ) -# 443 "..\..\absil\ilpars.mly" - : 'bound)); -# 1766 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 445 "..\..\absil\ilpars.mly" - (Some _1, Some (_3 - _1 + 1)) - ) -# 445 "..\..\absil\ilpars.mly" - : 'bound)); -# 1778 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 447 "..\..\absil\ilpars.mly" - (Some _1, None) - ) -# 447 "..\..\absil\ilpars.mly" - : 'bound)); -# 1789 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int32)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'int32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 454 "..\..\absil\ilpars.mly" - (Some _1, Some (_2 - _1 + 1)) - ) -# 454 "..\..\absil\ilpars.mly" - : 'bound)); -# 1801 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 456 "..\..\absil\ilpars.mly" - (Some _1, None) - ) -# 456 "..\..\absil\ilpars.mly" - : 'bound)); -# 1812 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 460 "..\..\absil\ilpars.mly" - _1 - ) -# 460 "..\..\absil\ilpars.mly" - : 'id)); -# 1823 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 462 "..\..\absil\ilpars.mly" - _1 - ) -# 462 "..\..\absil\ilpars.mly" - : 'id)); -# 1834 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int64)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 466 "..\..\absil\ilpars.mly" - int32 _1 - ) -# 466 "..\..\absil\ilpars.mly" - : 'int32)); -# 1845 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int64)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 470 "..\..\absil\ilpars.mly" - _1 - ) -# 470 "..\..\absil\ilpars.mly" - : 'int64)); -# 1856 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : double)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 474 "..\..\absil\ilpars.mly" - _1 - ) -# 474 "..\..\absil\ilpars.mly" - : 'float64)); -# 1867 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'int64)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 476 "..\..\absil\ilpars.mly" - System.BitConverter.Int64BitsToDouble _3 - ) -# 476 "..\..\absil\ilpars.mly" - : 'float64)); -# 1878 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 480 "..\..\absil\ilpars.mly" - no_mspec_scope mk_empty_gactuals - ) -# 480 "..\..\absil\ilpars.mly" - : 'opt_actual_tyargs)); -# 1888 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'actual_tyargs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 482 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _1 (fun res -> - no_mspec_scope res) - ) -# 482 "..\..\absil\ilpars.mly" - : 'opt_actual_tyargs)); -# 1900 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'actualTypSpecs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 487 "..\..\absil\ilpars.mly" - _2 - ) -# 487 "..\..\absil\ilpars.mly" - : 'actual_tyargs)); -# 1911 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 491 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _1 (fun res -> - no_mspec_scope [ res]) - ) -# 491 "..\..\absil\ilpars.mly" - : 'actualTypSpecs)); -# 1923 "ilpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'actualTypSpecs)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 494 "..\..\absil\ilpars.mly" - resolve_mspec_scope_then _1 (fun x -> - resolve_mspec_scope_then _3 (fun y -> - no_mspec_scope (x @ [ y]))) - ) -# 494 "..\..\absil\ilpars.mly" - : 'actualTypSpecs)); -|] -# 1938 "ilpars.fs" -let tables () : Internal.Utilities.Text.Parsing.Tables<_> = - { reductions= _fsyacc_reductions (); - endOfInputTag = _fsyacc_endOfInputTag; - tagOfToken = tagOfToken; - dataOfToken = _fsyacc_dataOfToken; - actionTableElements = _fsyacc_actionTableElements; - actionTableRowOffsets = _fsyacc_actionTableRowOffsets; - stateToProdIdxsTableElements = _fsyacc_stateToProdIdxsTableElements; - stateToProdIdxsTableRowOffsets = _fsyacc_stateToProdIdxsTableRowOffsets; - reductionSymbolCounts = _fsyacc_reductionSymbolCounts; - immediateActions = _fsyacc_immediateActions; - gotos = _fsyacc_gotos; - sparseGotoTableRowOffsets = _fsyacc_sparseGotoTableRowOffsets; - tagOfErrorTerminal = _fsyacc_tagOfErrorTerminal; - parseError = (fun (ctxt:Internal.Utilities.Text.Parsing.ParseErrorContext<_>) -> - match parse_error_rich with - | Some f -> f ctxt - | None -> parse_error ctxt.Message); - numTerminals = 78; - productionToNonTerminalTable = _fsyacc_productionToNonTerminalTable } -let engine lexer lexbuf startState = (tables ()).Interpret(lexer, lexbuf, startState) -let top_instrs lexer lexbuf : ILInstr array = - Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, 0)) -let top_typ lexer lexbuf : ILType = - Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, 2)) diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/lex.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/lex.fs deleted file mode 100644 index bfa2f905..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/lex.fs +++ /dev/null @@ -1,2775 +0,0 @@ -#light "off" -# 1 "..\lex.mll" - - -module Microsoft.FSharp.Compiler.Lexer - -(*------------------------------------------------------------------------ - * The Lexer. Some of the complication arises from the fact it is - * reused by the Visual Studio mode to do partial lexing reporting - * whitespace etc. - * (c) Microsoft Corporation. All rights reserved - *-----------------------------------------------------------------------*) - -open System.Text -open Internal.Utilities -open Internal.Utilities.Pervasives - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler - -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Parser -open Microsoft.FSharp.Compiler.Lexhelp -open Microsoft.FSharp.Compiler.Lib -open Internal.Utilities.Text.Lexing - -let lexeme (lexbuf : UnicodeLexing.Lexbuf) = - UnicodeLexing.Lexbuf.LexemeString(lexbuf) -let ulexeme lexbuf = lexeme lexbuf - - -let adjust_lexbuf_start_pos (lexbuf:UnicodeLexing.Lexbuf) p = lexbuf.StartPos <- p - -let string_trim_both s n m = String.sub s n (String.length s - (n+m)) -let trim_both lexbuf n m = string_trim_both (ulexeme lexbuf) n m -let trim_right lexbuf n = trim_both lexbuf 0 n -let trim_left lexbuf n = trim_both lexbuf n 0 - -let fail args lexbuf msg dflt = - let m = GetLexerRange lexbuf in - args.errorLogger.ErrorR(Error(msg,m)); - dflt - -let trim_to_i32 args lexbuf n = - try int32 (trim_right lexbuf n) - with _ -> fail args lexbuf "This number is outside the allowable range for this integer type" 0 - -let CheckExprOp lexbuf = - if String.contains (ulexeme lexbuf) ':' then - deprecated "':' is no longer permitted as a character in operator names" (GetLexerRange lexbuf) - -let quote_op_is_raw s = String.length s >= 1 && s.[0] = '@' - -let rev_string s = - let n = String.length s in - let res = Buffer.create n in - for i = n - 1 downto 0 do Buffer.add_char res s.[i] done; - Buffer.contents res - -let unexpected_char lexbuf = - LEX_FAILURE ("Unexpected character '"^(lexeme lexbuf)^"'") - -let start_string args (lexbuf: UnicodeLexing.Lexbuf) = - let buf = Bytes.Bytebuf.create 100 in - let m = GetLexerRange lexbuf in - let startp = lexbuf.StartPos in - let fin = (fun m2 b s -> - let endp = lexbuf.EndPos in - (* Adjust the start-of-token mark back to the true start of the token *) - adjust_lexbuf_start_pos lexbuf startp; - if b then - if Lexhelp.stringbuf_is_bytes buf then - BYTEARRAY (Lexhelp.stringbuf_as_bytes buf) - else ( - fail args lexbuf "This byte array literal contains characters that do not encode as a single byte" (); - BYTEARRAY (Lexhelp.stringbuf_as_bytes buf) - ) - else - STRING (Bytes.unicode_bytes_as_string s)) in - buf,fin,m - -(* Utility functions for processing XML documentation *) - -let trySaveXmlDoc lexbuf (buff:option) = - match buff with - | None -> () - | Some(sb) -> LexbufLocalXmlDocStore.SaveXmlDoc lexbuf (sb.ToString(), pos_of_lexpos lexbuf.StartPos) - -let tryAppendXmlDoc (buff:option) (s:string) = - match buff with - | None -> () - | Some(sb) -> ignore(sb.Append(s)) - -(* Utilities for parsing #if/#else/#endif *) - -let shouldStartLine args lexbuf m err tok = - if (start_col_of_range m <> 0) then fail args lexbuf err tok - else tok - -let extractIdentFromHashIf (lexed:string) = - // Skip the '#if' token, then trim whitespace, then find the end of the identifier - let lexed = lexed.Trim() in - let trimIf = lexed.Substring(3).Trim() in - let identEnd = trimIf.IndexOfAny([| ' '; '\t'; '/' |]) in - let identEnd = (if identEnd = -1 then trimIf.Length else identEnd) in - trimIf.Substring(0, identEnd) - -# 111 "lex.fs" -let trans : uint16[] array = - [| - (* State 0 *) - [| 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 2us; 5us; 5us; 3us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 1us; 5us; 5us; 5us; 5us; 5us; 4us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 5us; 6us; |]; - (* State 1 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 2 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 3 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 28us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 4 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 8us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 5 *) - [| 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 65535us; 7us; 7us; 65535us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 65535us; 7us; 7us; 7us; 7us; 7us; 65535us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 65535us; |]; - (* State 6 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 7 *) - [| 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 65535us; 7us; 7us; 65535us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 65535us; 7us; 7us; 7us; 7us; 7us; 65535us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 7us; 65535us; |]; - (* State 8 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 9us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 9 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 10us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 10 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 11us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 11 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 12us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 12 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 13us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 13 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 14 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 15us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 15 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 23us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 16 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 17 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 18us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 18 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 19us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 19 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 20 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 21us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 21 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 22us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 22 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 23 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 24us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 24 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 25 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 26us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 26 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 27us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 27 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 28 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 29 *) - [| 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 34us; 35us; 38us; 38us; 36us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 34us; 38us; 30us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 33us; 32us; 32us; 32us; 32us; 32us; 32us; 32us; 32us; 32us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 38us; 38us; 38us; 38us; 31us; 38us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 31us; 38us; 38us; 38us; 38us; 38us; 31us; 31us; 31us; 31us; 31us; 38us; 38us; 38us; 32us; 31us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 37us; |]; - (* State 30 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 31 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 65535us; 65535us; 65535us; 65535us; 51us; 65535us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 65535us; 51us; 51us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 65535us; 65535us; 51us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 32 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 33 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 44us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 43us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 42us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 44us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 43us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 42us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 34 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 40us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 40us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 35 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 36 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 39us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 37 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 38 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 39 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 40 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 40us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 40us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 41 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 42 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 49us; 49us; 49us; 49us; 49us; 49us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 49us; 49us; 49us; 49us; 49us; 49us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 43 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 47us; 47us; 47us; 47us; 47us; 47us; 47us; 47us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 44 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 45us; 45us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 45 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 46us; 46us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 46 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 46us; 46us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 47 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 48us; 48us; 48us; 48us; 48us; 48us; 48us; 48us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 48 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 48us; 48us; 48us; 48us; 48us; 48us; 48us; 48us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 49 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 50us; 50us; 50us; 50us; 50us; 50us; 50us; 50us; 50us; 50us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 50us; 50us; 50us; 50us; 50us; 50us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 50us; 50us; 50us; 50us; 50us; 50us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 50 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 50us; 50us; 50us; 50us; 50us; 50us; 50us; 50us; 50us; 50us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 50us; 50us; 50us; 50us; 50us; 50us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 50us; 50us; 50us; 50us; 50us; 50us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 51 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 65535us; 65535us; 65535us; 65535us; 51us; 65535us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 65535us; 51us; 51us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 65535us; 65535us; 51us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 52 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 53 *) - [| 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 58us; 60us; 63us; 63us; 61us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 58us; 63us; 59us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 57us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 56us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 63us; 54us; 63us; 63us; 55us; 63us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 55us; 63us; 63us; 63us; 63us; 63us; 55us; 55us; 55us; 55us; 55us; 63us; 63us; 63us; 56us; 55us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 63us; 62us; |]; - (* State 54 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 77us; 65535us; 65535us; 78us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 65535us; 65535us; 65535us; 65535us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 83us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 65535us; 65535us; 65535us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 65535us; 65535us; 65535us; 79us; 65535us; 79us; 82us; 79us; 65535us; 81us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 55 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 76us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 65535us; 65535us; 65535us; 65535us; 76us; 65535us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 65535us; 65535us; 65535us; 65535us; 65535us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 65535us; 76us; 76us; 65535us; 65535us; 65535us; 65535us; 65535us; 76us; 65535us; 65535us; 76us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 56 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 66us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 57 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 69us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 68us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 67us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 69us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 68us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 67us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 66us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 58 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 59 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 60 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 61 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 64us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 62 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 63 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 64 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 65 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 66 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 66us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 66us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 67 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 74us; 74us; 74us; 74us; 74us; 74us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 74us; 74us; 74us; 74us; 74us; 74us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 68 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 69 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 70us; 70us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 70 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 71us; 71us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 71 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 71us; 71us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 72 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 73 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 73us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 74 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 75us; 75us; 75us; 75us; 75us; 75us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 75us; 75us; 75us; 75us; 75us; 75us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 75 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 75us; 75us; 75us; 75us; 75us; 75us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 75us; 75us; 75us; 75us; 75us; 75us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 76 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 76us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 65535us; 65535us; 65535us; 65535us; 76us; 65535us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 65535us; 65535us; 65535us; 65535us; 65535us; 76us; 76us; 76us; 76us; 76us; 76us; 76us; 65535us; 76us; 76us; 65535us; 65535us; 65535us; 65535us; 65535us; 76us; 65535us; 65535us; 76us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 77 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 96us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 96us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 78 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 77us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 79 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 80 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 95us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 81 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 94us; 94us; 94us; 94us; 94us; 94us; 94us; 94us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 94us; 94us; 94us; 94us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 94us; 94us; 94us; 94us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 82 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 91us; 91us; 91us; 91us; 91us; 91us; 91us; 91us; 91us; 91us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 91us; 91us; 91us; 91us; 91us; 91us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 91us; 91us; 91us; 91us; 91us; 91us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 83 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 84 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 85us; 85us; 85us; 85us; 85us; 85us; 85us; 85us; 85us; 85us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 85us; 85us; 85us; 85us; 85us; 85us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 85us; 85us; 85us; 85us; 85us; 85us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 85 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 86us; 86us; 86us; 86us; 86us; 86us; 86us; 86us; 86us; 86us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 86us; 86us; 86us; 86us; 86us; 86us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 86us; 86us; 86us; 86us; 86us; 86us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 86 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 87us; 87us; 87us; 87us; 87us; 87us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 87us; 87us; 87us; 87us; 87us; 87us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 87 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 88us; 88us; 88us; 88us; 88us; 88us; 88us; 88us; 88us; 88us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 88us; 88us; 88us; 88us; 88us; 88us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 88us; 88us; 88us; 88us; 88us; 88us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 88 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 89us; 89us; 89us; 89us; 89us; 89us; 89us; 89us; 89us; 89us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 89us; 89us; 89us; 89us; 89us; 89us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 89us; 89us; 89us; 89us; 89us; 89us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 89 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 90 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 91 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 92 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 93us; 93us; 93us; 93us; 93us; 93us; 93us; 93us; 93us; 93us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 93us; 93us; 93us; 93us; 93us; 93us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 93us; 93us; 93us; 93us; 93us; 93us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 93 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 94 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 95 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 79us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 96 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 96us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 96us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 97 *) - [| 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 105us; 102us; 106us; 106us; 103us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 105us; 106us; 99us; 106us; 106us; 106us; 106us; 98us; 101us; 108us; 104us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 100us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 107us; |]; - (* State 98 *) - [| 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 65535us; 65535us; 65535us; 115us; 115us; 65535us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 116us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 65535us; |]; - (* State 99 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 100 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 114us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 101 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 113us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 102 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 103 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 112us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 104 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 111us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 105 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 106 *) - [| 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 65535us; 109us; 109us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 109us; 65535us; 109us; 109us; 109us; 109us; 65535us; 65535us; 65535us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; |]; - (* State 107 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 108 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 109 *) - [| 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 65535us; 109us; 109us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 109us; 65535us; 109us; 109us; 109us; 109us; 65535us; 65535us; 65535us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; |]; - (* State 110 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 111 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 112 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 113 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 114 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 115 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 117us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 116 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 65535us; 65535us; 65535us; 65535us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 65535us; 65535us; 65535us; 65535us; 115us; 115us; 65535us; 65535us; 65535us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 65535us; 65535us; 65535us; 115us; 65535us; 115us; 65535us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 117 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 118 *) - [| 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 123us; 119us; 122us; 122us; 120us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 124us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 121us; |]; - (* State 119 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 120 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 121 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 122 *) - [| 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 65535us; 126us; 126us; 65535us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 65535us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 65535us; |]; - (* State 123 *) - [| 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 127us; 65535us; 126us; 126us; 65535us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 125us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 65535us; |]; - (* State 124 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 125 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 126 *) - [| 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 65535us; 126us; 126us; 65535us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 65535us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 65535us; |]; - (* State 127 *) - [| 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 127us; 65535us; 126us; 126us; 65535us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 125us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 126us; 65535us; |]; - (* State 128 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 129 *) - [| 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 136us; 131us; 138us; 138us; 132us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 136us; 138us; 130us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 135us; 134us; 134us; 134us; 134us; 134us; 134us; 134us; 134us; 134us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 138us; 138us; 138us; 138us; 133us; 138us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 133us; 138us; 138us; 138us; 138us; 138us; 133us; 133us; 133us; 133us; 133us; 138us; 138us; 138us; 134us; 133us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 138us; 137us; |]; - (* State 130 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 152us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 153us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 131 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 132 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 151us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 133 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 150us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 65535us; 65535us; 65535us; 65535us; 150us; 65535us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 65535us; 65535us; 65535us; 65535us; 65535us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 65535us; 150us; 150us; 65535us; 65535us; 65535us; 65535us; 65535us; 150us; 65535us; 65535us; 150us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 134 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 140us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 135 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 143us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 142us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 141us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 143us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 142us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 141us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 140us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 136 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 139us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 139us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 137 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 138 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 139 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 139us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 139us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 140 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 140us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 140us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 141 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 148us; 148us; 148us; 148us; 148us; 148us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 148us; 148us; 148us; 148us; 148us; 148us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 142 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 146us; 146us; 146us; 146us; 146us; 146us; 146us; 146us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 143 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 144us; 144us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 144 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 145us; 145us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 145 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 145us; 145us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 146 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 147us; 147us; 147us; 147us; 147us; 147us; 147us; 147us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 147 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 147us; 147us; 147us; 147us; 147us; 147us; 147us; 147us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 148 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 149us; 149us; 149us; 149us; 149us; 149us; 149us; 149us; 149us; 149us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 149us; 149us; 149us; 149us; 149us; 149us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 149us; 149us; 149us; 149us; 149us; 149us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 149 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 149us; 149us; 149us; 149us; 149us; 149us; 149us; 149us; 149us; 149us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 149us; 149us; 149us; 149us; 149us; 149us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 149us; 149us; 149us; 149us; 149us; 149us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 150 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 150us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 65535us; 65535us; 65535us; 65535us; 150us; 65535us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 65535us; 65535us; 65535us; 65535us; 65535us; 150us; 150us; 150us; 150us; 150us; 150us; 150us; 65535us; 150us; 150us; 65535us; 65535us; 65535us; 65535us; 65535us; 150us; 65535us; 65535us; 150us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 151 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 152 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 153 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 154 *) - [| 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 162us; 157us; 164us; 164us; 158us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 162us; 164us; 156us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 161us; 160us; 160us; 160us; 160us; 160us; 160us; 160us; 160us; 160us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 164us; 155us; 164us; 164us; 159us; 164us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 164us; 164us; 164us; 164us; 164us; 159us; 159us; 159us; 159us; 159us; 164us; 164us; 164us; 160us; 159us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 164us; 163us; |]; - (* State 155 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 179us; 65535us; 65535us; 180us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 181us; 65535us; 65535us; 65535us; 65535us; 181us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 182us; 182us; 182us; 182us; 182us; 182us; 182us; 182us; 182us; 182us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 185us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 181us; 65535us; 65535us; 65535us; 65535us; 181us; 181us; 65535us; 65535us; 65535us; 181us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 181us; 65535us; 65535us; 65535us; 181us; 65535us; 181us; 184us; 181us; 65535us; 183us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 182us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 156 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 178us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 157 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 158 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 177us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 159 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 65535us; 65535us; 65535us; 65535us; 176us; 65535us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 65535us; 176us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 65535us; 65535us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 160 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 161 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 169us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 168us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 167us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 169us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 168us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 167us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 162 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 165us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 165us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 163 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 164 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 165 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 165us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 165us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 166 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 166us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 167 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 174us; 174us; 174us; 174us; 174us; 174us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 174us; 174us; 174us; 174us; 174us; 174us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 168 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 172us; 172us; 172us; 172us; 172us; 172us; 172us; 172us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 169 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 170us; 170us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 170 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 171us; 171us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 171 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 171us; 171us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 172 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 173us; 173us; 173us; 173us; 173us; 173us; 173us; 173us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 173 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 173us; 173us; 173us; 173us; 173us; 173us; 173us; 173us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 174 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 175us; 175us; 175us; 175us; 175us; 175us; 175us; 175us; 175us; 175us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 175us; 175us; 175us; 175us; 175us; 175us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 175us; 175us; 175us; 175us; 175us; 175us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 175 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 175us; 175us; 175us; 175us; 175us; 175us; 175us; 175us; 175us; 175us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 175us; 175us; 175us; 175us; 175us; 175us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 175us; 175us; 175us; 175us; 175us; 175us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 176 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 65535us; 65535us; 65535us; 65535us; 176us; 65535us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 176us; 176us; 176us; 176us; 176us; 176us; 65535us; 176us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 176us; 65535us; 65535us; 176us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 177 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 178 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 179 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 202us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 202us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 180 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 179us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 181 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 182 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 200us; 200us; 200us; 200us; 200us; 200us; 200us; 200us; 200us; 200us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 200us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 183 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 198us; 198us; 198us; 198us; 198us; 198us; 198us; 198us; 198us; 198us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 198us; 198us; 198us; 198us; 198us; 198us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 198us; 198us; 198us; 198us; 198us; 198us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 184 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 194us; 194us; 194us; 194us; 194us; 194us; 194us; 194us; 194us; 194us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 194us; 194us; 194us; 194us; 194us; 194us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 194us; 194us; 194us; 194us; 194us; 194us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 185 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 186us; 186us; 186us; 186us; 186us; 186us; 186us; 186us; 186us; 186us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 186us; 186us; 186us; 186us; 186us; 186us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 186us; 186us; 186us; 186us; 186us; 186us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 186 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 187us; 187us; 187us; 187us; 187us; 187us; 187us; 187us; 187us; 187us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 187us; 187us; 187us; 187us; 187us; 187us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 187us; 187us; 187us; 187us; 187us; 187us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 187 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 188us; 188us; 188us; 188us; 188us; 188us; 188us; 188us; 188us; 188us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 188us; 188us; 188us; 188us; 188us; 188us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 188us; 188us; 188us; 188us; 188us; 188us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 188 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 189us; 189us; 189us; 189us; 189us; 189us; 189us; 189us; 189us; 189us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 189us; 189us; 189us; 189us; 189us; 189us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 189us; 189us; 189us; 189us; 189us; 189us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 189 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 190us; 190us; 190us; 190us; 190us; 190us; 190us; 190us; 190us; 190us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 190us; 190us; 190us; 190us; 190us; 190us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 190us; 190us; 190us; 190us; 190us; 190us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 190 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 191us; 191us; 191us; 191us; 191us; 191us; 191us; 191us; 191us; 191us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 191us; 191us; 191us; 191us; 191us; 191us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 191us; 191us; 191us; 191us; 191us; 191us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 191 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 192us; 192us; 192us; 192us; 192us; 192us; 192us; 192us; 192us; 192us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 192us; 192us; 192us; 192us; 192us; 192us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 192us; 192us; 192us; 192us; 192us; 192us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 192 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 193us; 193us; 193us; 193us; 193us; 193us; 193us; 193us; 193us; 193us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 193us; 193us; 193us; 193us; 193us; 193us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 193us; 193us; 193us; 193us; 193us; 193us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 193 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 194 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 195us; 195us; 195us; 195us; 195us; 195us; 195us; 195us; 195us; 195us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 195us; 195us; 195us; 195us; 195us; 195us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 195us; 195us; 195us; 195us; 195us; 195us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 195 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 196us; 196us; 196us; 196us; 196us; 196us; 196us; 196us; 196us; 196us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 196us; 196us; 196us; 196us; 196us; 196us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 196us; 196us; 196us; 196us; 196us; 196us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 196 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 197us; 197us; 197us; 197us; 197us; 197us; 197us; 197us; 197us; 197us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 197us; 197us; 197us; 197us; 197us; 197us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 197us; 197us; 197us; 197us; 197us; 197us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 197 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 198 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 199us; 199us; 199us; 199us; 199us; 199us; 199us; 199us; 199us; 199us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 199us; 199us; 199us; 199us; 199us; 199us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 199us; 199us; 199us; 199us; 199us; 199us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 199 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 200 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 201us; 201us; 201us; 201us; 201us; 201us; 201us; 201us; 201us; 201us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 201us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 201 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 202 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 202us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 202us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 203 *) - [| 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 204us; 207us; 207us; 205us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 207us; 206us; |]; - (* State 204 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 205 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 209us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 206 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 207 *) - [| 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 65535us; 208us; 208us; 65535us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 65535us; |]; - (* State 208 *) - [| 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 65535us; 208us; 208us; 65535us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 208us; 65535us; |]; - (* State 209 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 210 *) - [| 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 213us; 214us; 216us; 216us; 215us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 212us; 216us; 216us; 211us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 216us; 217us; |]; - (* State 211 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 251us; 218us; 218us; 218us; 250us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 212 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 221us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 221us; 65535us; 65535us; 223us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 213 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 222us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 221us; 218us; 218us; 220us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 214 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 215 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 219us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 216 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 217 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 218 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 219 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 220 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 251us; 218us; 218us; 218us; 250us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 221 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 221us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 221us; 65535us; 65535us; 223us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 222 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 222us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 221us; 218us; 218us; 220us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 223 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 225us; 65535us; 65535us; 65535us; 224us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 224 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 241us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 225 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 226us; 65535us; 227us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 226 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 235us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 227 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 228us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 228 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 229us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 229 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 230us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 230 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 232us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 232us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 231us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 231 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 233us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 232 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 232us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 232us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 231us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 233 *) - [| 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 65535us; 234us; 234us; 65535us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 65535us; |]; - (* State 234 *) - [| 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 65535us; 234us; 234us; 65535us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 234us; 65535us; |]; - (* State 235 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 236us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 236 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 238us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 238us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 237us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 237 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 239us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 238 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 238us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 238us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 237us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 239 *) - [| 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 65535us; 240us; 240us; 65535us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 65535us; |]; - (* State 240 *) - [| 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 65535us; 240us; 240us; 65535us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 240us; 65535us; |]; - (* State 241 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 242us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 242us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 242 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 244us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 244us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 65535us; 65535us; 65535us; 65535us; 243us; 65535us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 65535us; 65535us; 65535us; 65535us; 65535us; 243us; 243us; 243us; 243us; 243us; 65535us; 65535us; 65535us; 65535us; 243us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 243 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 246us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 246us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 247us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 245us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 65535us; 65535us; 65535us; 65535us; 247us; 65535us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 65535us; 65535us; 65535us; 65535us; 65535us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 65535us; 247us; 247us; 65535us; 65535us; 65535us; 65535us; 65535us; 247us; 65535us; 65535us; 247us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 244 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 244us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 244us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 65535us; 65535us; 65535us; 65535us; 243us; 65535us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 243us; 65535us; 65535us; 65535us; 65535us; 65535us; 243us; 243us; 243us; 243us; 243us; 65535us; 65535us; 65535us; 65535us; 243us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 245 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 248us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 246 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 246us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 246us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 245us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 247 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 246us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 246us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 247us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 245us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 65535us; 65535us; 65535us; 65535us; 247us; 65535us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 65535us; 65535us; 65535us; 65535us; 65535us; 247us; 247us; 247us; 247us; 247us; 247us; 247us; 65535us; 247us; 247us; 65535us; 65535us; 65535us; 65535us; 65535us; 247us; 65535us; 65535us; 247us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 248 *) - [| 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 65535us; 249us; 249us; 65535us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 65535us; |]; - (* State 249 *) - [| 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 65535us; 249us; 249us; 65535us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 249us; 65535us; |]; - (* State 250 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 267us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 251 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 252us; 218us; 253us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 252 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 261us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 253 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 254us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 254 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 255us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 255 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 256us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 256 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 258us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 232us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 257us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 257 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 259us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 258 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 258us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 232us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 257us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 259 *) - [| 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 65535us; 260us; 260us; 65535us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 234us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 65535us; |]; - (* State 260 *) - [| 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 65535us; 260us; 260us; 65535us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 234us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 260us; 65535us; |]; - (* State 261 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 262us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 262 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 264us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 238us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 263us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 263 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 265us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 264 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 264us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 238us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 263us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 265 *) - [| 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 65535us; 266us; 266us; 65535us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 240us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 65535us; |]; - (* State 266 *) - [| 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 65535us; 266us; 266us; 65535us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 240us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 266us; 65535us; |]; - (* State 267 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 268us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 242us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 268 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 270us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 244us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 218us; 218us; 218us; 218us; 269us; 218us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 218us; 218us; 218us; 218us; 218us; 269us; 269us; 269us; 269us; 269us; 218us; 218us; 218us; 218us; 269us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 269 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 272us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 246us; 218us; 218us; 218us; 218us; 218us; 218us; 273us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 271us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 218us; 218us; 218us; 218us; 273us; 218us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 218us; 218us; 218us; 218us; 218us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 218us; 273us; 273us; 218us; 218us; 218us; 218us; 218us; 273us; 218us; 218us; 273us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 270 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 270us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 244us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 218us; 218us; 218us; 218us; 269us; 218us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 269us; 218us; 218us; 218us; 218us; 218us; 269us; 269us; 269us; 269us; 269us; 218us; 218us; 218us; 218us; 269us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 271 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 274us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 272 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 272us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 246us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 271us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 273 *) - [| 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 272us; 65535us; 218us; 218us; 65535us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 246us; 218us; 218us; 218us; 218us; 218us; 218us; 273us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 271us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 218us; 218us; 218us; 218us; 273us; 218us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 218us; 218us; 218us; 218us; 218us; 273us; 273us; 273us; 273us; 273us; 273us; 273us; 218us; 273us; 273us; 218us; 218us; 218us; 218us; 218us; 273us; 218us; 218us; 273us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 218us; 65535us; |]; - (* State 274 *) - [| 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 65535us; 275us; 275us; 65535us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 249us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 65535us; |]; - (* State 275 *) - [| 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 65535us; 275us; 275us; 65535us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 249us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 275us; 65535us; |]; - (* State 276 *) - [| 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 290us; 292us; 319us; 319us; 293us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 289us; 297us; 287us; 295us; 298us; 299us; 300us; 285us; 286us; 312us; 301us; 302us; 313us; 303us; 304us; 291us; 284us; 283us; 283us; 283us; 283us; 283us; 283us; 283us; 283us; 283us; 311us; 314us; 296us; 305us; 306us; 307us; 288us; 277us; 277us; 277us; 277us; 278us; 279us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 315us; 319us; 316us; 308us; 277us; 294us; 277us; 277us; 277us; 280us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 277us; 281us; 277us; 277us; 277us; 277us; 277us; 277us; 282us; 277us; 317us; 309us; 318us; 310us; 319us; 277us; 277us; 277us; 277us; 277us; 319us; 319us; 319us; 283us; 277us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 319us; 320us; |]; - (* State 277 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 278 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 673us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 279 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 670us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 280 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 668us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 281 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 662us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 282 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 657us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 283 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 602us; 65535us; 599us; 599us; 599us; 599us; 599us; 599us; 599us; 599us; 599us; 599us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 610us; 610us; 610us; 607us; 610us; 609us; 610us; 609us; 610us; 610us; 604us; 608us; 609us; 610us; 610us; 609us; 609us; 610us; 610us; 605us; 610us; 610us; 610us; 610us; 609us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 610us; 610us; 610us; 610us; 607us; 610us; 610us; 610us; 610us; 610us; 610us; 603us; 608us; 606us; 610us; 610us; 610us; 610us; 601us; 610us; 600us; 610us; 610us; 610us; 598us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 65535us; 599us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 65535us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 284 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 602us; 65535us; 599us; 599us; 599us; 599us; 599us; 599us; 599us; 599us; 599us; 599us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 641us; 610us; 610us; 607us; 610us; 609us; 610us; 609us; 610us; 610us; 604us; 608us; 609us; 640us; 610us; 609us; 609us; 610us; 610us; 605us; 610us; 610us; 639us; 610us; 609us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 610us; 641us; 610us; 610us; 607us; 610us; 610us; 610us; 610us; 610us; 610us; 603us; 608us; 606us; 640us; 610us; 610us; 610us; 601us; 610us; 600us; 610us; 610us; 639us; 598us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 65535us; 599us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 65535us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 285 *) - [| 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 65535us; 65535us; 65535us; 568us; 568us; 65535us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 569us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 568us; 65535us; |]; - (* State 286 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 543us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 287 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 288 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 537us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 538us; 341us; 539us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 289 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 533us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 536us; 65535us; 65535us; 532us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 290 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 531us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 533us; 65535us; 65535us; 532us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 291 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 391us; 391us; 65535us; 391us; 391us; 519us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 391us; 391us; 391us; 390us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 292 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 293 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 518us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 294 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 512us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 295 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 450us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 450us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 453us; 65535us; 65535us; 65535us; 452us; 65535us; 65535us; 451us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 449us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 296 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 445us; 345us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 345us; 345us; 444us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 297 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 333us; 333us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 439us; 333us; 333us; 332us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 298 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 405us; 65535us; 65535us; 406us; 407us; 408us; 65535us; 65535us; 65535us; 409us; 410us; 65535us; 410us; 411us; 407us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 412us; 412us; 412us; 413us; 404us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 414us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 415us; 65535us; 413us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 299 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 391us; 443us; 391us; 65535us; 65535us; 65535us; 391us; 391us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 391us; 391us; 391us; 390us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 300 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 402us; 402us; 442us; 65535us; 65535us; 65535us; 402us; 402us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 402us; 402us; 402us; 401us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 301 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 397us; 391us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 391us; 391us; 391us; 390us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 302 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 395us; 395us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 395us; 395us; 395us; 394us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 303 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 395us; 395us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 395us; 440us; 395us; 394us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 304 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 352us; 65535us; 65535us; 353us; 354us; 355us; 65535us; 364us; 65535us; 356us; 357us; 65535us; 357us; 358us; 354us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 359us; 359us; 359us; 360us; 351us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 363us; 65535us; 65535us; 361us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 362us; 65535us; 360us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 305 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 345us; 345us; 344us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 306 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 345us; 346us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 345us; 345us; 344us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 348us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 347us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 307 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 333us; 333us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 333us; 333us; 343us; 332us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 308 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 341us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 309 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 336us; 336us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 336us; 336us; 336us; 335us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 338us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 337us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 310 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 333us; 333us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 333us; 333us; 333us; 332us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 311 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 325us; 325us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 329us; 65535us; 325us; 326us; 327us; 328us; 324us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 312 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 313 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 314 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 323us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 315 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 322us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 321us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 316 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 317 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 318 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 319 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 320 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 321 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 322 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 323 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 324 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 325us; 325us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 325us; 330us; 325us; 324us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 325 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 325us; 325us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 325us; 325us; 325us; 324us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 326 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 325us; 325us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 325us; 325us; 325us; 324us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 327 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 325us; 325us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 325us; 325us; 325us; 324us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 328 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 325us; 325us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 325us; 331us; 325us; 324us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 329 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 325us; 325us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 325us; 325us; 325us; 324us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 330 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 325us; 325us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 325us; 325us; 325us; 324us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 331 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 325us; 325us; 65535us; 325us; 325us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 325us; 325us; 325us; 324us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 325us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 332 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 333us; 333us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 333us; 334us; 333us; 332us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 333 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 333us; 333us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 333us; 333us; 333us; 332us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 334 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 333us; 333us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 333us; 333us; 333us; 332us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 335 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 336us; 336us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 336us; 339us; 336us; 335us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 336 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 336us; 336us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 336us; 336us; 336us; 335us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 337 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 336us; 336us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 336us; 336us; 336us; 335us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 338 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 339 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 336us; 336us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 336us; 336us; 336us; 335us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 340 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 342us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 341 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 341us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 342 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 341us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 343 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 333us; 333us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 333us; 333us; 333us; 332us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 344 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 349us; 345us; 344us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 345 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 345us; 345us; 344us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 346 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 345us; 345us; 344us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 347 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 345us; 345us; 344us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 350us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 348 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 349 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 345us; 345us; 344us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 350 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 351 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 342us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 352 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 333us; 333us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 439us; 333us; 333us; 332us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 353 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 405us; 65535us; 65535us; 406us; 407us; 408us; 65535us; 65535us; 65535us; 409us; 410us; 65535us; 410us; 411us; 407us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 412us; 412us; 412us; 413us; 404us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 414us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 415us; 65535us; 413us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 354 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 391us; 391us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 391us; 391us; 391us; 390us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 355 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 402us; 402us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 402us; 402us; 402us; 401us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 356 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 397us; 391us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 391us; 391us; 391us; 390us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 357 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 395us; 395us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 395us; 395us; 395us; 394us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 358 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 352us; 65535us; 65535us; 353us; 354us; 355us; 65535us; 65535us; 65535us; 356us; 357us; 65535us; 357us; 393us; 354us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 359us; 359us; 359us; 360us; 351us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 361us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 362us; 65535us; 360us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 359 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 345us; 345us; 344us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 360 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 333us; 333us; 65535us; 333us; 333us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 333us; 333us; 333us; 332us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 333us; 65535us; 333us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 361 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 341us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 362 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 336us; 336us; 65535us; 336us; 336us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 336us; 336us; 336us; 335us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 336us; 65535us; 336us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 363 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 369us; 65535us; 370us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 368us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 364 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 365us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 365 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 366us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 366 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 367us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 367 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 368 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 389us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 369 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 382us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 381us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 370 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 371us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 371 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 372us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 367us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 372 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 373us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 373 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 374us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 374 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 375us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 367us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 375 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 376us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 376 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 377us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 377 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 378us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 367us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 378 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 379us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 379 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 380us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 380 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 367us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 381 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 388us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 382 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 384us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 383us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 383 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 387us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 384 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 385us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 385 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 386us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 386 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 367us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 387 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 367us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 388 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 367us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 389 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 367us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 390 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 391us; 391us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 391us; 392us; 391us; 390us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 391 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 391us; 391us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 391us; 391us; 391us; 390us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 392 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 391us; 391us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 391us; 391us; 391us; 390us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 393 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 352us; 65535us; 65535us; 353us; 354us; 355us; 65535us; 65535us; 65535us; 356us; 357us; 65535us; 357us; 393us; 354us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 325us; 65535us; 359us; 359us; 359us; 360us; 351us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 361us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 362us; 65535us; 360us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 394 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 395us; 395us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 395us; 396us; 395us; 394us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 395 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 395us; 395us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 395us; 395us; 395us; 394us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 396 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 395us; 395us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 395us; 395us; 395us; 394us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 397 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 65535us; 399us; 399us; 399us; 65535us; 65535us; 65535us; 399us; 399us; 65535us; 399us; 399us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 399us; 399us; 399us; 399us; 398us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 398 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 65535us; 399us; 399us; 399us; 65535us; 65535us; 65535us; 399us; 399us; 65535us; 399us; 399us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 399us; 399us; 400us; 399us; 398us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 399 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 65535us; 399us; 399us; 399us; 65535us; 65535us; 65535us; 399us; 399us; 65535us; 399us; 399us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 399us; 399us; 399us; 399us; 398us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 400 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 65535us; 399us; 399us; 399us; 65535us; 65535us; 65535us; 399us; 399us; 65535us; 399us; 399us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 399us; 399us; 399us; 399us; 398us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 399us; 65535us; 399us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 401 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 402us; 402us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 402us; 403us; 402us; 401us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 402 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 402us; 402us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 402us; 402us; 402us; 401us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 403 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 402us; 402us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 402us; 402us; 402us; 401us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 404 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 65535us; 423us; 423us; 423us; 65535us; 65535us; 65535us; 423us; 423us; 65535us; 423us; 423us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 423us; 423us; 424us; 423us; 422us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 405 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 417us; 417us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 438us; 417us; 417us; 416us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 406 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 405us; 65535us; 65535us; 406us; 407us; 408us; 65535us; 65535us; 65535us; 409us; 410us; 65535us; 410us; 411us; 407us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 412us; 412us; 412us; 413us; 404us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 414us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 415us; 65535us; 413us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 407 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 65535us; 426us; 426us; 426us; 65535us; 65535us; 65535us; 426us; 426us; 65535us; 426us; 426us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 426us; 426us; 426us; 426us; 425us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 408 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 65535us; 436us; 436us; 436us; 65535us; 65535us; 65535us; 436us; 436us; 65535us; 436us; 436us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 436us; 436us; 436us; 436us; 435us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 409 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 65535us; 426us; 426us; 426us; 65535us; 65535us; 65535us; 431us; 426us; 65535us; 426us; 426us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 426us; 426us; 426us; 426us; 425us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 410 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 65535us; 429us; 429us; 429us; 65535us; 65535us; 65535us; 429us; 429us; 65535us; 429us; 429us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 429us; 429us; 429us; 429us; 428us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 411 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 405us; 65535us; 65535us; 406us; 407us; 408us; 65535us; 65535us; 65535us; 409us; 410us; 65535us; 410us; 411us; 407us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 412us; 412us; 412us; 413us; 404us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 414us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 415us; 65535us; 413us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 412 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 345us; 345us; 344us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 413 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 417us; 417us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 417us; 417us; 417us; 416us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 414 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 65535us; 423us; 423us; 423us; 65535us; 65535us; 65535us; 423us; 423us; 65535us; 423us; 423us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 423us; 423us; 423us; 423us; 422us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 415 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 65535us; 420us; 420us; 420us; 65535us; 65535us; 65535us; 420us; 420us; 65535us; 420us; 420us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 420us; 420us; 420us; 420us; 419us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 416 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 417us; 417us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 417us; 418us; 417us; 416us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 417 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 417us; 417us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 417us; 417us; 417us; 416us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 418 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 417us; 417us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 417us; 417us; 417us; 416us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 419 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 65535us; 420us; 420us; 420us; 65535us; 65535us; 65535us; 420us; 420us; 65535us; 420us; 420us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 420us; 420us; 421us; 420us; 419us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 420 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 65535us; 420us; 420us; 420us; 65535us; 65535us; 65535us; 420us; 420us; 65535us; 420us; 420us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 420us; 420us; 420us; 420us; 419us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 421 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 65535us; 420us; 420us; 420us; 65535us; 65535us; 65535us; 420us; 420us; 65535us; 420us; 420us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 420us; 420us; 420us; 420us; 419us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 420us; 65535us; 420us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 422 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 65535us; 423us; 423us; 423us; 65535us; 65535us; 65535us; 423us; 423us; 65535us; 423us; 423us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 423us; 423us; 424us; 423us; 422us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 423 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 65535us; 423us; 423us; 423us; 65535us; 65535us; 65535us; 423us; 423us; 65535us; 423us; 423us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 423us; 423us; 423us; 423us; 422us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 424 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 65535us; 423us; 423us; 423us; 65535us; 65535us; 65535us; 423us; 423us; 65535us; 423us; 423us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 423us; 423us; 423us; 423us; 422us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 423us; 65535us; 423us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 425 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 65535us; 426us; 426us; 426us; 65535us; 65535us; 65535us; 426us; 426us; 65535us; 426us; 426us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 426us; 426us; 427us; 426us; 425us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 426 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 65535us; 426us; 426us; 426us; 65535us; 65535us; 65535us; 426us; 426us; 65535us; 426us; 426us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 426us; 426us; 426us; 426us; 425us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 427 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 65535us; 426us; 426us; 426us; 65535us; 65535us; 65535us; 426us; 426us; 65535us; 426us; 426us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 426us; 426us; 426us; 426us; 425us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 426us; 65535us; 426us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 428 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 65535us; 429us; 429us; 429us; 65535us; 65535us; 65535us; 429us; 429us; 65535us; 429us; 429us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 429us; 429us; 430us; 429us; 428us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 429 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 65535us; 429us; 429us; 429us; 65535us; 65535us; 65535us; 429us; 429us; 65535us; 429us; 429us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 429us; 429us; 429us; 429us; 428us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 430 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 65535us; 429us; 429us; 429us; 65535us; 65535us; 65535us; 429us; 429us; 65535us; 429us; 429us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 429us; 429us; 429us; 429us; 428us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 429us; 65535us; 429us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 431 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 65535us; 433us; 433us; 433us; 65535us; 65535us; 65535us; 433us; 433us; 65535us; 433us; 433us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 433us; 433us; 433us; 433us; 432us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 432 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 65535us; 433us; 433us; 433us; 65535us; 65535us; 65535us; 433us; 433us; 65535us; 433us; 433us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 433us; 433us; 434us; 433us; 432us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 433 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 65535us; 433us; 433us; 433us; 65535us; 65535us; 65535us; 433us; 433us; 65535us; 433us; 433us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 433us; 433us; 433us; 433us; 432us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 434 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 65535us; 433us; 433us; 433us; 65535us; 65535us; 65535us; 433us; 433us; 65535us; 433us; 433us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 433us; 433us; 433us; 433us; 432us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 433us; 65535us; 433us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 435 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 65535us; 436us; 436us; 436us; 65535us; 65535us; 65535us; 436us; 436us; 65535us; 436us; 436us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 436us; 436us; 437us; 436us; 435us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 436 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 65535us; 436us; 436us; 436us; 65535us; 65535us; 65535us; 436us; 436us; 65535us; 436us; 436us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 436us; 436us; 436us; 436us; 435us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 437 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 65535us; 436us; 436us; 436us; 65535us; 65535us; 65535us; 436us; 436us; 65535us; 436us; 436us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 436us; 436us; 436us; 436us; 435us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 436us; 65535us; 436us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 438 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 417us; 417us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 417us; 417us; 417us; 416us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 439 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 417us; 417us; 65535us; 417us; 417us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 417us; 417us; 417us; 416us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 417us; 65535us; 417us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 440 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 395us; 395us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 395us; 441us; 395us; 394us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 441 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 395us; 395us; 65535us; 395us; 395us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 395us; 395us; 395us; 394us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 395us; 65535us; 395us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 442 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 402us; 402us; 65535us; 402us; 402us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 402us; 402us; 402us; 401us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 402us; 65535us; 402us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 443 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 391us; 391us; 65535us; 391us; 391us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 391us; 391us; 391us; 390us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 391us; 65535us; 391us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 444 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 65535us; 446us; 446us; 446us; 65535us; 65535us; 65535us; 446us; 446us; 65535us; 446us; 446us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 446us; 446us; 447us; 446us; 448us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 445 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 345us; 345us; 65535us; 345us; 345us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 345us; 345us; 345us; 344us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 345us; 65535us; 345us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 446 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 65535us; 446us; 446us; 446us; 65535us; 65535us; 65535us; 446us; 446us; 65535us; 446us; 446us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 446us; 446us; 446us; 446us; 448us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 447 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 65535us; 446us; 446us; 446us; 65535us; 65535us; 65535us; 446us; 446us; 65535us; 446us; 446us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 446us; 446us; 446us; 446us; 448us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 448 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 65535us; 446us; 446us; 446us; 65535us; 65535us; 65535us; 446us; 446us; 65535us; 446us; 446us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 446us; 446us; 447us; 446us; 448us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 446us; 65535us; 446us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 449 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 504us; 502us; 65535us; 65535us; 503us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 504us; 65535us; 505us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 507us; 507us; 507us; 507us; 507us; 507us; 507us; 507us; 507us; 507us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 506us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 507us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 450 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 450us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 450us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 449us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 451 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 492us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 452 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 470us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 469us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 453 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 454us; 65535us; 455us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 454 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 463us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 455 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 456us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 456 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 457us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 457 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 458us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 458 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 460us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 460us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 459us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 459 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 461us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 460 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 460us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 460us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 459us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 461 *) - [| 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 65535us; 462us; 462us; 65535us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 65535us; |]; - (* State 462 *) - [| 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 65535us; 462us; 462us; 65535us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 462us; 65535us; |]; - (* State 463 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 464us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 464 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 466us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 466us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 465us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 465 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 467us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 466 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 466us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 466us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 465us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 467 *) - [| 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 65535us; 468us; 468us; 65535us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 65535us; |]; - (* State 468 *) - [| 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 65535us; 468us; 468us; 65535us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 468us; 65535us; |]; - (* State 469 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 479us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 470 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 471us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 471us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 471 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 473us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 473us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 65535us; 65535us; 65535us; 65535us; 472us; 65535us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 65535us; 65535us; 65535us; 65535us; 65535us; 472us; 472us; 472us; 472us; 472us; 65535us; 65535us; 65535us; 65535us; 472us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 472 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 475us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 475us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 476us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 474us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 65535us; 65535us; 65535us; 65535us; 476us; 65535us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 65535us; 65535us; 65535us; 65535us; 65535us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 65535us; 476us; 476us; 65535us; 65535us; 65535us; 65535us; 65535us; 476us; 65535us; 65535us; 476us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 473 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 473us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 473us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 65535us; 65535us; 65535us; 65535us; 472us; 65535us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 472us; 65535us; 65535us; 65535us; 65535us; 65535us; 472us; 472us; 472us; 472us; 472us; 65535us; 65535us; 65535us; 65535us; 472us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 474 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 477us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 475 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 475us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 475us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 474us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 476 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 475us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 475us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 476us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 474us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 65535us; 65535us; 65535us; 65535us; 476us; 65535us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 65535us; 65535us; 65535us; 65535us; 65535us; 476us; 476us; 476us; 476us; 476us; 476us; 476us; 65535us; 476us; 476us; 65535us; 65535us; 65535us; 65535us; 65535us; 476us; 65535us; 65535us; 476us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 477 *) - [| 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 65535us; 478us; 478us; 65535us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 65535us; |]; - (* State 478 *) - [| 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 65535us; 478us; 478us; 65535us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 478us; 65535us; |]; - (* State 479 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 480us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 480 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 481us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 481 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 482us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 482 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 483us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 483us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 483 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 485us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 485us; 65535us; 484us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 484 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 486us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 485 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 485us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 485us; 65535us; 484us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 486 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 487us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 488us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 487 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 490us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 488 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 489us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 489 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 490 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 491us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 491 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 492 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 494us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 493us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 493 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 499us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 494 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 495us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 495 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 496us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 496 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 497us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 497us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 497 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 498us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 498us; 65535us; 484us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 498 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 498us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 498us; 65535us; 484us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 499 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 500us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 500us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 500 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 501us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 501us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 449us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 501 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 501us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 501us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 449us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 449us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 502 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 503 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 502us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 504 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 504us; 502us; 65535us; 65535us; 503us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 504us; 65535us; 505us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 506us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 505 *) - [| 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 65535us; 508us; 508us; 65535us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 65535us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 508us; 65535us; |]; - (* State 506 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 505us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 507 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 504us; 502us; 65535us; 65535us; 503us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 504us; 65535us; 505us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 507us; 507us; 507us; 507us; 507us; 507us; 507us; 507us; 507us; 507us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 506us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 507us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 508 *) - [| 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 65535us; 510us; 510us; 65535us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 509us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 65535us; |]; - (* State 509 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 511us; 502us; 65535us; 65535us; 503us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 511us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 510 *) - [| 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 65535us; 510us; 510us; 65535us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 509us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 510us; 65535us; |]; - (* State 511 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 511us; 502us; 65535us; 65535us; 503us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 511us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 512 *) - [| 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 65535us; 65535us; 513us; 513us; 65535us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 514us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 65535us; |]; - (* State 513 *) - [| 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 65535us; 65535us; 516us; 516us; 65535us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 515us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 65535us; |]; - (* State 514 *) - [| 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 65535us; 65535us; 513us; 513us; 65535us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 65535us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 513us; 65535us; |]; - (* State 515 *) - [| 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 65535us; 65535us; 516us; 516us; 65535us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 517us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 65535us; |]; - (* State 516 *) - [| 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 65535us; 65535us; 516us; 516us; 65535us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 515us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 516us; 65535us; |]; - (* State 517 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 518 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 519 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 65535us; 521us; 521us; 521us; 65535us; 65535us; 65535us; 521us; 521us; 65535us; 521us; 521us; 520us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 521us; 521us; 521us; 521us; 522us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 520 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 65535us; 525us; 525us; 525us; 65535us; 65535us; 65535us; 525us; 525us; 65535us; 525us; 525us; 524us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 525us; 525us; 525us; 525us; 526us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 521 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 65535us; 521us; 521us; 521us; 65535us; 65535us; 65535us; 521us; 521us; 65535us; 521us; 521us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 521us; 521us; 521us; 521us; 522us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 522 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 65535us; 521us; 521us; 521us; 65535us; 65535us; 65535us; 521us; 521us; 65535us; 521us; 521us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 521us; 521us; 523us; 521us; 522us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 523 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 65535us; 521us; 521us; 521us; 65535us; 65535us; 65535us; 521us; 521us; 65535us; 521us; 521us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 521us; 521us; 521us; 521us; 522us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 521us; 65535us; 521us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 524 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 65535us; 528us; 528us; 528us; 65535us; 65535us; 65535us; 528us; 528us; 65535us; 528us; 528us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 528us; 528us; 528us; 528us; 529us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 525 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 65535us; 525us; 525us; 525us; 65535us; 65535us; 65535us; 525us; 525us; 65535us; 525us; 525us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 525us; 525us; 525us; 525us; 526us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 526 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 65535us; 525us; 525us; 525us; 65535us; 65535us; 65535us; 525us; 525us; 65535us; 525us; 525us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 525us; 525us; 527us; 525us; 526us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 527 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 65535us; 525us; 525us; 525us; 65535us; 65535us; 65535us; 525us; 525us; 65535us; 525us; 525us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 525us; 525us; 525us; 525us; 526us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 525us; 65535us; 525us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 528 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 65535us; 528us; 528us; 528us; 65535us; 65535us; 65535us; 528us; 528us; 65535us; 528us; 528us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 528us; 528us; 528us; 528us; 529us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 529 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 65535us; 528us; 528us; 528us; 65535us; 65535us; 65535us; 528us; 528us; 65535us; 528us; 528us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 528us; 528us; 530us; 528us; 529us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 530 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 65535us; 528us; 528us; 528us; 65535us; 65535us; 65535us; 528us; 528us; 65535us; 528us; 528us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 528us; 528us; 528us; 528us; 529us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 528us; 65535us; 528us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 531 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 531us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 533us; 65535us; 65535us; 532us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 532 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 453us; 65535us; 65535us; 65535us; 534us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 533 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 533us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 533us; 65535us; 65535us; 532us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 534 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 535 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 471us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 471us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 536 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 533us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 536us; 65535us; 65535us; 532us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 537 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 538 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 542us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 341us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 539 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 540us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 540 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 541us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 341us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 541 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 341us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 542 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 341us; 341us; 65535us; 341us; 341us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 341us; 341us; 341us; 340us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 341us; 65535us; 341us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 543 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 546us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 545us; 65535us; 65535us; 544us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 544 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 548us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 545 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 547us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 546 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 547 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 548 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 549us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 549 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 551us; 65535us; 65535us; 550us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 552us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 550 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 563us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 551 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 559us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 552 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 553us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 553 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 554us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 554 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 555us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 555 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 556us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 556 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 557us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 557 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 558us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 558 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 559 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 560us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 560 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 561us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 561 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 562us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 562 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 558us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 563 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 564us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 564 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 565us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 565 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 566us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 566 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 567us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 567 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 568 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 596us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 569 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 568us; 65535us; 65535us; 65535us; 65535us; 568us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 570us; 570us; 570us; 570us; 570us; 570us; 570us; 570us; 570us; 570us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 573us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 568us; 65535us; 65535us; 65535us; 65535us; 568us; 568us; 65535us; 65535us; 65535us; 568us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 568us; 65535us; 65535us; 65535us; 568us; 65535us; 568us; 571us; 568us; 65535us; 572us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 570us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 570 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 592us; 592us; 592us; 592us; 592us; 592us; 592us; 592us; 592us; 592us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 592us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 571 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 586us; 586us; 586us; 586us; 586us; 586us; 586us; 586us; 586us; 586us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 586us; 586us; 586us; 586us; 586us; 586us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 586us; 586us; 586us; 586us; 586us; 586us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 572 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 583us; 583us; 583us; 583us; 583us; 583us; 583us; 583us; 583us; 583us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 583us; 583us; 583us; 583us; 583us; 583us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 583us; 583us; 583us; 583us; 583us; 583us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 573 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 574us; 574us; 574us; 574us; 574us; 574us; 574us; 574us; 574us; 574us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 574us; 574us; 574us; 574us; 574us; 574us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 574us; 574us; 574us; 574us; 574us; 574us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 574 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 575us; 575us; 575us; 575us; 575us; 575us; 575us; 575us; 575us; 575us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 575us; 575us; 575us; 575us; 575us; 575us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 575us; 575us; 575us; 575us; 575us; 575us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 575 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 576us; 576us; 576us; 576us; 576us; 576us; 576us; 576us; 576us; 576us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 576us; 576us; 576us; 576us; 576us; 576us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 576us; 576us; 576us; 576us; 576us; 576us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 576 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 577us; 577us; 577us; 577us; 577us; 577us; 577us; 577us; 577us; 577us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 577us; 577us; 577us; 577us; 577us; 577us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 577us; 577us; 577us; 577us; 577us; 577us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 577 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 578us; 578us; 578us; 578us; 578us; 578us; 578us; 578us; 578us; 578us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 578us; 578us; 578us; 578us; 578us; 578us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 578us; 578us; 578us; 578us; 578us; 578us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 578 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 579us; 579us; 579us; 579us; 579us; 579us; 579us; 579us; 579us; 579us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 579us; 579us; 579us; 579us; 579us; 579us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 579us; 579us; 579us; 579us; 579us; 579us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 579 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 580us; 580us; 580us; 580us; 580us; 580us; 580us; 580us; 580us; 580us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 580us; 580us; 580us; 580us; 580us; 580us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 580us; 580us; 580us; 580us; 580us; 580us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 580 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 581us; 581us; 581us; 581us; 581us; 581us; 581us; 581us; 581us; 581us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 581us; 581us; 581us; 581us; 581us; 581us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 581us; 581us; 581us; 581us; 581us; 581us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 581 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 582us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 582 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 583 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 584us; 584us; 584us; 584us; 584us; 584us; 584us; 584us; 584us; 584us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 584us; 584us; 584us; 584us; 584us; 584us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 584us; 584us; 584us; 584us; 584us; 584us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 584 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 585us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 585 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 586 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 587us; 587us; 587us; 587us; 587us; 587us; 587us; 587us; 587us; 587us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 587us; 587us; 587us; 587us; 587us; 587us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 587us; 587us; 587us; 587us; 587us; 587us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 587 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 588us; 588us; 588us; 588us; 588us; 588us; 588us; 588us; 588us; 588us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 588us; 588us; 588us; 588us; 588us; 588us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 588us; 588us; 588us; 588us; 588us; 588us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 588 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 589us; 589us; 589us; 589us; 589us; 589us; 589us; 589us; 589us; 589us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 589us; 589us; 589us; 589us; 589us; 589us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 589us; 589us; 589us; 589us; 589us; 589us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 589 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 590us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 590 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 591us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 591 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 592 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 593us; 593us; 593us; 593us; 593us; 593us; 593us; 593us; 593us; 593us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 593us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 593 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 594us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 594 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 595us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 595 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 596 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 597us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 597 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 598 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 599 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 602us; 65535us; 631us; 631us; 631us; 631us; 631us; 631us; 631us; 631us; 631us; 631us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 625us; 620us; 638us; 620us; 638us; 620us; 620us; 635us; 619us; 638us; 620us; 620us; 638us; 638us; 620us; 620us; 636us; 620us; 620us; 620us; 620us; 638us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 625us; 620us; 620us; 620us; 620us; 620us; 620us; 634us; 619us; 637us; 620us; 620us; 620us; 620us; 633us; 620us; 632us; 620us; 620us; 620us; 630us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 631us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 600 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 621us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 628us; 611us; 629us; 611us; 611us; 611us; 611us; 627us; 611us; 611us; 611us; 611us; 611us; 626us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 601 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 602 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 622us; 65535us; 623us; 623us; 623us; 623us; 623us; 623us; 623us; 623us; 623us; 623us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 610us; 610us; 610us; 607us; 615us; 610us; 610us; 610us; 610us; 610us; 610us; 608us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 610us; 610us; 610us; 610us; 607us; 615us; 610us; 610us; 610us; 610us; 610us; 610us; 608us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 65535us; 623us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 65535us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 603 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 604 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 605 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 621us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 606 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 607 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 613us; 65535us; 613us; 65535us; 65535us; 612us; 612us; 612us; 612us; 612us; 612us; 612us; 612us; 612us; 612us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 612us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 608 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 609 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 610 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 611 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 612 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 617us; 620us; 620us; 620us; 620us; 620us; 620us; 619us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 620us; 617us; 620us; 620us; 620us; 620us; 620us; 620us; 619us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 618us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 613 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 614us; 614us; 614us; 614us; 614us; 614us; 614us; 614us; 614us; 614us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 614us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 614 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 616us; 616us; 616us; 616us; 616us; 616us; 616us; 616us; 616us; 616us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 610us; 610us; 610us; 610us; 615us; 610us; 610us; 610us; 610us; 610us; 610us; 608us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 610us; 610us; 610us; 610us; 610us; 615us; 610us; 610us; 610us; 610us; 610us; 610us; 608us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 610us; 610us; 610us; 610us; 610us; 610us; 65535us; 616us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 610us; 65535us; 65535us; 610us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 615 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 616 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 617us; 620us; 620us; 620us; 620us; 620us; 620us; 619us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 620us; 617us; 620us; 620us; 620us; 620us; 620us; 620us; 619us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 618us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 617 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 618 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 618us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 617us; 620us; 620us; 620us; 620us; 620us; 620us; 619us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 620us; 617us; 620us; 620us; 620us; 620us; 620us; 620us; 619us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 618us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 619 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 620 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 621 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 622 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 623 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 624us; 624us; 624us; 624us; 624us; 624us; 624us; 624us; 624us; 624us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 625us; 617us; 620us; 620us; 620us; 620us; 620us; 620us; 619us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 625us; 617us; 620us; 620us; 620us; 620us; 620us; 620us; 619us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 624us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 624 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 624us; 624us; 624us; 624us; 624us; 624us; 624us; 624us; 624us; 624us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 625us; 617us; 620us; 620us; 620us; 620us; 620us; 620us; 619us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 625us; 617us; 620us; 620us; 620us; 620us; 620us; 620us; 619us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 624us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 625 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 613us; 65535us; 613us; 65535us; 65535us; 612us; 612us; 612us; 612us; 612us; 612us; 612us; 612us; 612us; 612us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 612us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 626 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 627 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 628 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 629 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 630 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 631 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 602us; 65535us; 631us; 631us; 631us; 631us; 631us; 631us; 631us; 631us; 631us; 631us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 625us; 620us; 638us; 620us; 638us; 620us; 620us; 635us; 619us; 638us; 620us; 620us; 638us; 638us; 620us; 620us; 636us; 620us; 620us; 620us; 620us; 638us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 625us; 620us; 620us; 620us; 620us; 620us; 620us; 634us; 619us; 637us; 620us; 620us; 620us; 620us; 633us; 620us; 632us; 620us; 620us; 620us; 630us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 631us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 632 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 621us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 628us; 611us; 629us; 611us; 611us; 611us; 611us; 627us; 611us; 611us; 611us; 611us; 611us; 626us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 633 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 634 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 635 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 636 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 621us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 637 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 638 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 639 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 652us; 652us; 652us; 652us; 652us; 652us; 652us; 652us; 652us; 652us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 652us; 652us; 652us; 652us; 652us; 652us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 652us; 652us; 652us; 652us; 652us; 652us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 640 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 650us; 650us; 650us; 650us; 650us; 650us; 650us; 650us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 641 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 642us; 642us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 642 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 644us; 644us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 647us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 636us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 646us; 620us; 637us; 620us; 620us; 620us; 620us; 645us; 620us; 632us; 620us; 620us; 620us; 643us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 643 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 644 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 644us; 644us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 647us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 636us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 646us; 620us; 637us; 620us; 620us; 620us; 620us; 645us; 620us; 632us; 620us; 620us; 620us; 643us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 645 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 646 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 649us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 647 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 648us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 648 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 649 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 611us; 611us; 611us; 611us; 611us; 611us; 65535us; 611us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 611us; 65535us; 65535us; 611us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 650 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 651us; 651us; 651us; 651us; 651us; 651us; 651us; 651us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 647us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 636us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 646us; 620us; 637us; 620us; 620us; 620us; 620us; 645us; 620us; 632us; 620us; 620us; 620us; 643us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 651 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 651us; 651us; 651us; 651us; 651us; 651us; 651us; 651us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 647us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 636us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 646us; 620us; 637us; 620us; 620us; 620us; 620us; 645us; 620us; 632us; 620us; 620us; 620us; 643us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 652 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 653us; 653us; 653us; 653us; 653us; 653us; 653us; 653us; 653us; 653us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 653us; 653us; 653us; 653us; 653us; 653us; 620us; 620us; 620us; 620us; 620us; 647us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 636us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 653us; 653us; 653us; 653us; 653us; 653us; 620us; 620us; 620us; 620us; 620us; 646us; 620us; 637us; 620us; 620us; 620us; 620us; 645us; 620us; 632us; 620us; 620us; 620us; 643us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 653 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 653us; 653us; 653us; 653us; 653us; 653us; 653us; 653us; 653us; 653us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 653us; 653us; 653us; 653us; 653us; 653us; 620us; 620us; 620us; 620us; 620us; 647us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 636us; 620us; 620us; 620us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 653us; 653us; 653us; 653us; 653us; 653us; 620us; 620us; 620us; 620us; 620us; 646us; 620us; 637us; 620us; 620us; 620us; 620us; 645us; 620us; 632us; 620us; 620us; 620us; 643us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 620us; 620us; 620us; 620us; 620us; 620us; 65535us; 620us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 620us; 65535us; 65535us; 620us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 654 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 655 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 656 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 657 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 658us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 658 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 659us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 659 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 660us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 660 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 661us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 661 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 662 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 663us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 663 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 664us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 664 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 665us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 665 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 666us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 666 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 667us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 667 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 668 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 669us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 669 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 670 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 671us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 671 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 672us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 672 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 673 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 674us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 674 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 675us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 675 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 676us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 676 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 655us; 65535us; 656us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 677us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 654us; 654us; 654us; 654us; 654us; 654us; 65535us; 654us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 654us; 65535us; 65535us; 654us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 677 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 678us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 678 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 679us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 679 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 680us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 680 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 681us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 681 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 682us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 682 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 683us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 683 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 684us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 684 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 685us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 685 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - |] -let actions : uint16[] = [|65535us; 0us; 1us; 6us; 6us; 4us; 5us; 4us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 3us; 65535us; 65535us; 65535us; 65535us; 2us; 1us; 65535us; 1us; 2us; 2us; 2us; 2us; 3us; 5us; 4us; 5us; 3us; 2us; 2us; 65535us; 65535us; 65535us; 2us; 2us; 2us; 2us; 2us; 2us; 2us; 0us; 65535us; 5us; 1us; 1us; 1us; 1us; 2us; 3us; 5us; 4us; 5us; 3us; 1us; 1us; 65535us; 65535us; 65535us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 0us; 65535us; 1us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 0us; 65535us; 8us; 1us; 8us; 8us; 4us; 8us; 8us; 6us; 6us; 7us; 8us; 6us; 6us; 5us; 4us; 3us; 2us; 65535us; 65535us; 0us; 65535us; 0us; 3us; 1us; 2us; 2us; 2us; 2us; 2us; 2us; 0us; 65535us; 1us; 3us; 8us; 4us; 5us; 5us; 6us; 7us; 8us; 6us; 5us; 65535us; 65535us; 65535us; 5us; 5us; 5us; 5us; 5us; 5us; 4us; 3us; 0us; 2us; 65535us; 13us; 6us; 8us; 13us; 9us; 10us; 10us; 11us; 12us; 13us; 11us; 10us; 65535us; 65535us; 65535us; 10us; 10us; 10us; 10us; 10us; 10us; 9us; 8us; 7us; 0us; 65535us; 1us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 5us; 65535us; 65535us; 65535us; 4us; 65535us; 3us; 65535us; 2us; 0us; 65535us; 0us; 2us; 1us; 2us; 2us; 0us; 65535us; 4us; 4us; 4us; 3us; 4us; 4us; 5us; 4us; 3us; 4us; 4us; 4us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 2us; 65535us; 2us; 2us; 2us; 65535us; 1us; 65535us; 1us; 1us; 1us; 65535us; 65535us; 0us; 65535us; 65535us; 0us; 0us; 0us; 0us; 4us; 4us; 4us; 4us; 4us; 4us; 2us; 4us; 2us; 2us; 2us; 4us; 1us; 4us; 1us; 1us; 1us; 4us; 4us; 0us; 4us; 4us; 0us; 0us; 0us; 0us; 65535us; 0us; 0us; 0us; 0us; 0us; 0us; 13us; 13us; 59us; 60us; 43us; 104us; 45us; 46us; 102us; 50us; 117us; 100us; 55us; 86us; 108us; 95us; 96us; 56us; 62us; 103us; 98us; 69us; 83us; 87us; 66us; 104us; 93us; 99us; 70us; 61us; 63us; 81us; 84us; 89us; 92us; 94us; 117us; 118us; 85us; 88us; 80us; 65535us; 65535us; 79us; 72us; 78us; 71us; 54us; 77us; 108us; 108us; 54us; 107us; 107us; 58us; 90us; 54us; 104us; 104us; 54us; 67us; 105us; 105us; 73us; 105us; 91us; 54us; 76us; 104us; 108us; 105us; 102us; 106us; 102us; 103us; 68us; 105us; 108us; 104us; 107us; 65535us; 65535us; 109us; 65535us; 109us; 109us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 109us; 65535us; 109us; 65535us; 109us; 65535us; 65535us; 65535us; 65535us; 102us; 102us; 54us; 65535us; 103us; 103us; 54us; 101us; 101us; 101us; 54us; 106us; 106us; 54us; 104us; 105us; 105us; 102us; 105us; 102us; 103us; 105us; 105us; 105us; 104us; 105us; 105us; 105us; 54us; 105us; 105us; 54us; 104us; 104us; 54us; 102us; 102us; 54us; 103us; 103us; 54us; 101us; 101us; 101us; 54us; 105us; 105us; 54us; 105us; 105us; 64us; 65us; 57us; 97us; 53us; 82us; 53us; 53us; 53us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 65535us; 115us; 115us; 115us; 65535us; 114us; 65535us; 114us; 114us; 114us; 65535us; 116us; 65535us; 113us; 65535us; 65535us; 113us; 113us; 113us; 113us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 112us; 65535us; 111us; 65535us; 65535us; 65535us; 65535us; 110us; 110us; 110us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 51us; 50us; 49us; 48us; 49us; 49us; 49us; 47us; 48us; 48us; 48us; 47us; 47us; 47us; 46us; 65535us; 65535us; 65535us; 65535us; 45us; 44us; 54us; 104us; 54us; 75us; 74us; 41us; 65535us; 65535us; 40us; 37us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 42us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 35us; 65535us; 65535us; 33us; 65535us; 65535us; 65535us; 65535us; 34us; 32us; 65535us; 65535us; 30us; 31us; 28us; 29us; 6us; 13us; 15us; 9us; 22us; 14us; 17us; 27us; 19us; 27us; 23us; 26us; 27us; 27us; 22us; 65535us; 22us; 21us; 22us; 21us; 22us; 23us; 27us; 18us; 12us; 22us; 22us; 27us; 8us; 11us; 16us; 20us; 6us; 13us; 15us; 9us; 14us; 17us; 27us; 19us; 26us; 27us; 27us; 27us; 13us; 7us; 13us; 10us; 14us; 17us; 25us; 24us; 13us; 13us; 13us; 13us; 0us; 4us; 5us; 0us; 0us; 0us; 0us; 2us; 0us; 0us; 0us; 0us; 0us; 3us; 0us; 1us; 5us; 65535us; 39us; 0us; 0us; 0us; 0us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 38us; |] -let _fslex_tables = Internal.Utilities.Text.Lexing.UnicodeTables.Create(trans,actions) -let rec _fslex_dummy () = _fslex_dummy() -(* Rule token *) -and token args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_token args skip 276 lexbuf -and _fslex_token args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 176 "..\lex.mll" - Keywords.KeywordOrIdentifierToken args lexbuf (ulexeme lexbuf) -# 1497 "lex.fs" - ) - | 1 -> ( -# 178 "..\lex.mll" - DO_BANG -# 1502 "lex.fs" - ) - | 2 -> ( -# 180 "..\lex.mll" - YIELD_BANG(true) -# 1507 "lex.fs" - ) - | 3 -> ( -# 182 "..\lex.mll" - YIELD_BANG(false) -# 1512 "lex.fs" - ) - | 4 -> ( -# 184 "..\lex.mll" - let tok = Keywords.KeywordOrIdentifierToken args lexbuf (trim_right lexbuf 1) in - match tok with - | LET _ -> BINDER (trim_right lexbuf 1) - | _ -> fail args lexbuf "Identifiers followed by '!' are reserved for future use" (Keywords.KeywordOrIdentifierToken args lexbuf (ulexeme lexbuf)) -# 1520 "lex.fs" - ) - | 5 -> ( -# 189 "..\lex.mll" - fail args lexbuf "Identifiers followed by '?' or '#' are reserved for future use" (Keywords.KeywordOrIdentifierToken args lexbuf (ulexeme lexbuf)) -# 1525 "lex.fs" - ) - | 6 -> ( -# 191 "..\lex.mll" - let n = trim_to_i32 args lexbuf 1 in - if n > 0x80 or n < -0x80 then fail args lexbuf "This number is outside the allowable range for 8-bit signed integers" (INT8(0y,false)) - (* Allow to parse as min_int. Allowed only because we parse '-' as an operator. *) - else if n = 0x80 then INT8(sbyte(-0x80), true (* 'true' = 'bad'*) ) - else INT8(sbyte n,false) -# 1534 "lex.fs" - ) - | 7 -> ( -# 197 "..\lex.mll" - let n = trim_to_i32 args lexbuf 1 in - if n > 0xFF or n < 0 then fail args lexbuf "This number is outside the allowable range for hexadecimal 8-bit signed integers" (INT8(0y,false)) - else INT8(sbyte(byte(n)),false) -# 1541 "lex.fs" - ) - | 8 -> ( -# 201 "..\lex.mll" - let n = trim_to_i32 args lexbuf 2 in - if n > 0xFF or n < 0 then fail args lexbuf "This number is outside the allowable range for 8-bit unsigned integers" (UINT8(0uy)) - else UINT8(byte n) -# 1548 "lex.fs" - ) - | 9 -> ( -# 205 "..\lex.mll" - let n = trim_to_i32 args lexbuf 1 in - if n > 0x8000 or n < -0x8000 then fail args lexbuf "This number is outside the allowable range for 16-bit signed integers" (INT16(0s,false)) - (* Allow to parse as min_int. Allowed only because we parse '-' as an operator. *) - else if n = 0x8000 then INT16(-0x8000s,true) - else INT16(int16 n,false) -# 1557 "lex.fs" - ) - | 10 -> ( -# 211 "..\lex.mll" - let n = trim_to_i32 args lexbuf 1 in - if n > 0xFFFF or n < 0 then fail args lexbuf "This number is outside the allowable range for 16-bit signed integers" (INT16(0s,false)) - else INT16(int16(uint16(n)),false) -# 1564 "lex.fs" - ) - | 11 -> ( -# 215 "..\lex.mll" - let n = trim_to_i32 args lexbuf 2 in - if n > 0xFFFF or n < 0 then fail args lexbuf "This number is outside the allowable range for 16-bit unsigned integers" (UINT16(0us)) - else UINT16(uint16 n) -# 1571 "lex.fs" - ) - | 12 -> ( -# 219 "..\lex.mll" - let s = trim_right lexbuf 2 in - (* Allow to parse as min_int. Allowed only because we parse '-' as an operator. *) - if s = "2147483648" then INT32_DOT_DOT(-2147483648,true) else - let n = try int32 s with _ -> fail args lexbuf "This number is outside the allowable range for 32-bit signed integers" 0 in - INT32_DOT_DOT(n,false) - -# 1581 "lex.fs" - ) - | 13 -> ( -# 227 "..\lex.mll" - let s = ulexeme lexbuf in - (* Allow to parse as min_int. Allowed only because we parse '-' as an operator. *) - if s = "2147483648" then INT32(-2147483648,true) else - let n = - try int32 s with _ -> fail args lexbuf "This number is outside the allowable range for 32-bit signed integers" 0 - in - INT32(n,false) - -# 1593 "lex.fs" - ) - | 14 -> ( -# 237 "..\lex.mll" - let s = trim_right lexbuf 1 in - (* Allow to parse as min_int. Allowed only because we parse '-' as an operator. *) - if s = "2147483648" then INT32(-2147483648,true) else - let n = - try int32 s with _ -> fail args lexbuf "This number is outside the allowable range for 32-bit signed integers" 0 - in - INT32(n,false) - -# 1605 "lex.fs" - ) - | 15 -> ( -# 247 "..\lex.mll" - - let s = trim_right lexbuf 1 in - let n = - try int64 s with _ -> fail args lexbuf "This number is outside the allowable range for 32-bit unsigned integers" 0L - in - if n > 0xFFFFFFFFL or n < 0L then fail args lexbuf "This number is outside the allowable range for 32-bit unsigned integers" (UINT32(0u)) else - UINT32(uint32 (uint64 n)) -# 1616 "lex.fs" - ) - | 16 -> ( -# 256 "..\lex.mll" - - let s = trim_right lexbuf 2 in - let n = - try int64 s with _ -> fail args lexbuf "This number is outside the allowable range for 32-bit unsigned integers" 0L - in - if n > 0xFFFFFFFFL or n < 0L then fail args lexbuf "This number is outside the allowable range for 32-bit unsigned integers" (UINT32(0u)) else - UINT32(uint32 (uint64 n)) -# 1627 "lex.fs" - ) - | 17 -> ( -# 265 "..\lex.mll" - let s = trim_right lexbuf 1 in - (* Allow to parse as min_int. Stupid but allowed because we parse '-' as an operator. *) - if s = "9223372036854775808" then INT64(-9223372036854775808L,true) else - let n = - try int64 s with _ -> fail args lexbuf "This number is outside the allowable range for 64-bit signed integers" 0L - in - INT64(n,false) - -# 1639 "lex.fs" - ) - | 18 -> ( -# 275 "..\lex.mll" - let s = trim_right lexbuf 2 in - let n = - try uint64 s with _ -> fail args lexbuf "This number is outside the allowable range for 64-bit unsigned integers" 0UL - in - UINT64(n) -# 1648 "lex.fs" - ) - | 19 -> ( -# 282 "..\lex.mll" - try - NATIVEINT(int64 (trim_right lexbuf 1)) - with _ -> fail args lexbuf "This number is outside the allowable range for native integers" (NATIVEINT(0L)) -# 1655 "lex.fs" - ) - | 20 -> ( -# 287 "..\lex.mll" - try - UNATIVEINT(uint64 (trim_right lexbuf 2)) - with _ -> fail args lexbuf "This number is outside the allowable range for unsigned native integers" (UNATIVEINT(0UL)) -# 1662 "lex.fs" - ) - | 21 -> ( -# 292 "..\lex.mll" - IEEE32 (try float32(trim_right lexbuf 1) with _ -> fail args lexbuf "Invalid floating point number" 0.0f) -# 1667 "lex.fs" - ) - | 22 -> ( -# 294 "..\lex.mll" - IEEE64 (try float(ulexeme lexbuf) with _ -> fail args lexbuf "Invalid floating point number" 0.0) -# 1672 "lex.fs" - ) - | 23 -> ( -# 298 "..\lex.mll" - try - let s = trim_right lexbuf 1 in - (* This implements a range check for decimal literals *) - let d = System.Decimal.Parse(s,System.Globalization.NumberStyles.AllowExponent ||| System.Globalization.NumberStyles.Number,System.Globalization.CultureInfo.InvariantCulture) in - DECIMAL d - with - e -> fail args lexbuf "This number is outside the allowable range for decimal literals" (DECIMAL (decimal 0)) - -# 1684 "lex.fs" - ) - | 24 -> ( -# 307 "..\lex.mll" - - let s = trim_right lexbuf 2 in - let n64 = int64 s in - if n64 > 0xFFFFFFFFL or n64 < 0L then fail args lexbuf "This number is outside the allowable range for 32-bit floats" (IEEE32 0.0f) else - IEEE32 (System.BitConverter.ToSingle(System.BitConverter.GetBytes(int32 (uint32 (uint64 n64))),0)) -# 1693 "lex.fs" - ) - | 25 -> ( -# 314 "..\lex.mll" - - let n64 = int64 (trim_right lexbuf 2) in - IEEE64 (System.BitConverter.Int64BitsToDouble(n64)) -# 1700 "lex.fs" - ) - | 26 -> ( -# 319 "..\lex.mll" - let s = ulexeme lexbuf in - BIGNUM (trim_right lexbuf 1, s.[s.Length-1..s.Length-1]) -# 1706 "lex.fs" - ) - | 27 -> ( -# 323 "..\lex.mll" - fail args lexbuf "This is not a valid numeric literal. Sample formats include 4, 0x4, 0b0100, 4L, 4UL, 4u, 4s, 4us, 4y, 4uy, 4.0, 4.0f, 4I" (INT32(0,false)) -# 1711 "lex.fs" - ) - | 28 -> ( -# 326 "..\lex.mll" - let s = ulexeme lexbuf in - CHAR (if s.[1] = '\\' then escape s.[2] else s.[1]) -# 1717 "lex.fs" - ) - | 29 -> ( -# 330 "..\lex.mll" - let s = ulexeme lexbuf in - let x = int32 (if s.[1] = '\\' then escape s.[2] else s.[1]) in - if x < 0 || x > 127 then - fail args lexbuf "This is not a valid byte literal" (UINT8(byte 0)) - else - UINT8 (byte(x)) -# 1727 "lex.fs" - ) - | 30 -> ( -# 338 "..\lex.mll" - let s = ulexeme lexbuf in - let c = trigraph s.[2] s.[3] s.[4] in - let x = int32 c in - if x < 0 || x > 255 then - fail args lexbuf "This is not a valid character literal" (CHAR c) - else - CHAR c -# 1738 "lex.fs" - ) - | 31 -> ( -# 347 "..\lex.mll" - let s = ulexeme lexbuf in - let x = int32 (trigraph s.[2] s.[3] s.[4]) in - if x < 0 || x > 255 then - fail args lexbuf "This is not a valid byte literal" (UINT8(byte 0)) - else - UINT8 (byte(x)) -# 1748 "lex.fs" - ) - | 32 -> ( -# 355 "..\lex.mll" - let x = int32 (unicodegraph_short (trim_both lexbuf 3 2)) in - if x < 0 || x > 127 then - fail args lexbuf "This is not a valid byte literal" (UINT8(byte 0)) - else - UINT8 (byte(x)) -# 1757 "lex.fs" - ) - | 33 -> ( -# 361 "..\lex.mll" - CHAR (char (int32 (hexgraph_short (trim_both lexbuf 3 1)))) -# 1762 "lex.fs" - ) - | 34 -> ( -# 362 "..\lex.mll" - CHAR (char (int32 (unicodegraph_short (trim_both lexbuf 3 1)))) -# 1767 "lex.fs" - ) - | 35 -> ( -# 364 "..\lex.mll" - let hi,lo = unicodegraph_long (trim_both lexbuf 3 1) in - match hi with - | None -> CHAR (char lo) - | Some _ -> fail args lexbuf "This unicode encoding is only valid in string literals" (CHAR (char lo)) -# 1775 "lex.fs" - ) - | 36 -> ( -# 368 "..\lex.mll" - skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf -# 1780 "lex.fs" - ) - | 37 -> ( -# 369 "..\lex.mll" - skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf -# 1785 "lex.fs" - ) - | 38 -> ( -# 370 "..\lex.mll" - skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf -# 1790 "lex.fs" - ) - | 39 -> ( -# 371 "..\lex.mll" - skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf -# 1795 "lex.fs" - ) - | 40 -> ( -# 373 "..\lex.mll" - LPAREN_STAR_RPAREN -# 1800 "lex.fs" - ) - | 41 -> ( -# 376 "..\lex.mll" - let m = GetLexerRange lexbuf in - skipToken skip (COMMENT (AT_comment(!args.ifdefStack,1,m))) (comment(1,m,args)) lexbuf -# 1806 "lex.fs" - ) - | 42 -> ( -# 380 "..\lex.mll" - let m = GetLexerRange lexbuf in - skipToken skip (COMMENT (AT_camlonly(!args.ifdefStack,m))) (camlonly m args) lexbuf -# 1812 "lex.fs" - ) - | 43 -> ( -# 384 "..\lex.mll" - let buf,fin,m = start_string args lexbuf in - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string (buf,fin,m,args)) lexbuf -# 1818 "lex.fs" - ) - | 44 -> ( -# 388 "..\lex.mll" - let buf,fin,m = start_string args lexbuf in - skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m))) (vstring (buf,fin,m,args)) lexbuf -# 1824 "lex.fs" - ) - | 45 -> ( -# 392 "..\lex.mll" - if skip then token args skip lexbuf - else WHITESPACE (AT_token !args.ifdefStack) -# 1830 "lex.fs" - ) - | 46 -> ( -# 396 "..\lex.mll" - if args.lightSyntaxStatus.Status then errorR(Error("TABs are not allowed in #light code",GetLexerRange lexbuf)); - skipToken skip (WHITESPACE (AT_token !args.ifdefStack)) (token args) lexbuf -# 1836 "lex.fs" - ) - | 47 -> ( -# 400 "..\lex.mll" - (* 4+ slash are 1-line comments, online 3 slash are XmlDoc *) - let m = GetLexerRange lexbuf in - skipToken skip (LINE_COMMENT (AT_tokenized_comment(!args.ifdefStack,1,m))) (tokenized_comment(None,1,m,args)) lexbuf -# 1843 "lex.fs" - ) - | 48 -> ( -# 405 "..\lex.mll" - (* Match exactly 3 slash, 4+ slash caught by preceding rule *) - let m = GetLexerRange lexbuf in - let doc = trim_left lexbuf 3 in - let sb = (new StringBuilder(100)).Append(doc) in - skipToken skip (LINE_COMMENT (AT_tokenized_comment(!args.ifdefStack,1,m))) (tokenized_comment(Some(sb),1,m,args)) lexbuf -# 1852 "lex.fs" - ) - | 49 -> ( -# 412 "..\lex.mll" - (* Need to read all operator symbols too, otherwise it might be parsed by a rule below *) - let m = GetLexerRange lexbuf in - skipToken skip (LINE_COMMENT (AT_tokenized_comment(!args.ifdefStack,1,m))) (tokenized_comment(None,1,m,args)) lexbuf -# 1859 "lex.fs" - ) - | 50 -> ( -# 417 "..\lex.mll" - newline lexbuf; skipToken skip (WHITESPACE (AT_token !args.ifdefStack)) (token args) lexbuf -# 1864 "lex.fs" - ) - | 51 -> ( -# 420 "..\lex.mll" - Keywords.IdentifierToken args lexbuf (trim_both lexbuf 2 2) -# 1869 "lex.fs" - ) - | 52 -> ( -# 423 "..\lex.mll" - let pos = lexbuf.EndPos in - let lnum = pos.Line in - if skip then - let s = ulexeme lexbuf in - let rec parseLeadingDirective n = - match s.[n] with - | c when c >= 'a' && c <= 'z' -> parseLeadingDirective (n+1) - | _ -> parseLeadingWhitespace n // goto the next state - - and parseLeadingWhitespace n = - match s.[n] with - | ' ' | '\t' -> parseLeadingWhitespace (n+1) - | _ -> parseLineNumber n n // goto the next state - - and parseLineNumber start n = - match s.[n] with - | c when c >= '0' && c <= '9' -> parseLineNumber start (n+1) - | _ -> let text = (String.sub s start (n-start)) in - let lineNumber = - try int32 text - with err -> errorR(Error("invalid line number: '"^text^"'",GetLexerRange lexbuf)); 0 in - lineNumber, parseWhitespaceBeforeFile n // goto the next state - - and parseWhitespaceBeforeFile n = - match s.[n] with - | ' ' | '\t' | '@' -> parseWhitespaceBeforeFile (n+1) - | '"' -> Some (parseFile (n+1) (n+1)) - | _ -> None - - and parseFile start n = - match s.[n] with - | '"' -> String.sub s start (n-start) - | _ -> parseFile start (n+1) in - // Call the parser - let line,file = parseLeadingDirective 1 in - // Construct the new position - set_pos lexbuf {pos with - pos_fname = (match file with Some f -> encode_file f | None -> pos.pos_fname); - pos_bol= pos.pos_cnum; - pos_lnum=line }; - token args skip lexbuf - else - skipToken skip (HASH_LINE (AT_token !args.ifdefStack)) (token args) lexbuf -# 1916 "lex.fs" - ) - | 53 -> ( -# 469 "..\lex.mll" - CheckExprOp lexbuf; let s = trim_left lexbuf 2 in LQUOTE (Printf.sprintf "<@%s %s@>" s (rev_string s), quote_op_is_raw s) -# 1921 "lex.fs" - ) - | 54 -> ( -# 470 "..\lex.mll" - CheckExprOp lexbuf; let s = trim_right lexbuf 2 in RQUOTE (Printf.sprintf "<@%s %s@>" (rev_string s) s, quote_op_is_raw (rev_string s)) -# 1926 "lex.fs" - ) - | 55 -> ( -# 471 "..\lex.mll" - HASH -# 1931 "lex.fs" - ) - | 56 -> ( -# 472 "..\lex.mll" - AMP -# 1936 "lex.fs" - ) - | 57 -> ( -# 473 "..\lex.mll" - AMP_AMP -# 1941 "lex.fs" - ) - | 58 -> ( -# 474 "..\lex.mll" - BAR_BAR -# 1946 "lex.fs" - ) - | 59 -> ( -# 475 "..\lex.mll" - QUOTE -# 1951 "lex.fs" - ) - | 60 -> ( -# 476 "..\lex.mll" - LPAREN -# 1956 "lex.fs" - ) - | 61 -> ( -# 477 "..\lex.mll" - RPAREN -# 1961 "lex.fs" - ) - | 62 -> ( -# 478 "..\lex.mll" - STAR -# 1966 "lex.fs" - ) - | 63 -> ( -# 479 "..\lex.mll" - COMMA -# 1971 "lex.fs" - ) - | 64 -> ( -# 480 "..\lex.mll" - RARROW -# 1976 "lex.fs" - ) - | 65 -> ( -# 481 "..\lex.mll" - RARROW2 -# 1981 "lex.fs" - ) - | 66 -> ( -# 482 "..\lex.mll" - QMARK -# 1986 "lex.fs" - ) - | 67 -> ( -# 483 "..\lex.mll" - QMARK_QMARK -# 1991 "lex.fs" - ) - | 68 -> ( -# 484 "..\lex.mll" - DOT_DOT -# 1996 "lex.fs" - ) - | 69 -> ( -# 485 "..\lex.mll" - DOT -# 2001 "lex.fs" - ) - | 70 -> ( -# 486 "..\lex.mll" - COLON -# 2006 "lex.fs" - ) - | 71 -> ( -# 487 "..\lex.mll" - COLON_COLON -# 2011 "lex.fs" - ) - | 72 -> ( -# 488 "..\lex.mll" - COLON_GREATER -# 2016 "lex.fs" - ) - | 73 -> ( -# 489 "..\lex.mll" - GREATER_DOT -# 2021 "lex.fs" - ) - | 74 -> ( -# 490 "..\lex.mll" - RQUOTE_DOT ("<@ @>",false) -# 2026 "lex.fs" - ) - | 75 -> ( -# 491 "..\lex.mll" - RQUOTE_DOT ("<@@ @@>",true) -# 2031 "lex.fs" - ) - | 76 -> ( -# 492 "..\lex.mll" - GREATER_BAR_RBRACK -# 2036 "lex.fs" - ) - | 77 -> ( -# 493 "..\lex.mll" - COLON_QMARK_GREATER -# 2041 "lex.fs" - ) - | 78 -> ( -# 494 "..\lex.mll" - COLON_QMARK -# 2046 "lex.fs" - ) - | 79 -> ( -# 495 "..\lex.mll" - COLON_EQUALS -# 2051 "lex.fs" - ) - | 80 -> ( -# 496 "..\lex.mll" - SEMICOLON_SEMICOLON -# 2056 "lex.fs" - ) - | 81 -> ( -# 497 "..\lex.mll" - SEMICOLON -# 2061 "lex.fs" - ) - | 82 -> ( -# 498 "..\lex.mll" - LARROW -# 2066 "lex.fs" - ) - | 83 -> ( -# 499 "..\lex.mll" - EQUALS -# 2071 "lex.fs" - ) - | 84 -> ( -# 500 "..\lex.mll" - LBRACK -# 2076 "lex.fs" - ) - | 85 -> ( -# 501 "..\lex.mll" - LBRACK_BAR -# 2081 "lex.fs" - ) - | 86 -> ( -# 502 "..\lex.mll" - LESS -# 2086 "lex.fs" - ) - | 87 -> ( -# 503 "..\lex.mll" - GREATER -# 2091 "lex.fs" - ) - | 88 -> ( -# 504 "..\lex.mll" - LBRACK_LESS -# 2096 "lex.fs" - ) - | 89 -> ( -# 505 "..\lex.mll" - RBRACK -# 2101 "lex.fs" - ) - | 90 -> ( -# 506 "..\lex.mll" - BAR_RBRACK -# 2106 "lex.fs" - ) - | 91 -> ( -# 507 "..\lex.mll" - GREATER_RBRACK -# 2111 "lex.fs" - ) - | 92 -> ( -# 508 "..\lex.mll" - LBRACE -# 2116 "lex.fs" - ) - | 93 -> ( -# 509 "..\lex.mll" - BAR -# 2121 "lex.fs" - ) - | 94 -> ( -# 510 "..\lex.mll" - RBRACE -# 2126 "lex.fs" - ) - | 95 -> ( -# 511 "..\lex.mll" - DOLLAR -# 2131 "lex.fs" - ) - | 96 -> ( -# 512 "..\lex.mll" - PERCENT_OP("%") -# 2136 "lex.fs" - ) - | 97 -> ( -# 513 "..\lex.mll" - PERCENT_OP("%%") -# 2141 "lex.fs" - ) - | 98 -> ( -# 514 "..\lex.mll" - MINUS -# 2146 "lex.fs" - ) - | 99 -> ( -# 515 "..\lex.mll" - RESERVED -# 2151 "lex.fs" - ) - | 100 -> ( -# 516 "..\lex.mll" - RESERVED -# 2156 "lex.fs" - ) - | 101 -> ( -# 517 "..\lex.mll" - CheckExprOp lexbuf; INFIX_STAR_STAR_OP(ulexeme lexbuf) -# 2161 "lex.fs" - ) - | 102 -> ( -# 518 "..\lex.mll" - CheckExprOp lexbuf; INFIX_STAR_DIV_MOD_OP(ulexeme lexbuf) -# 2166 "lex.fs" - ) - | 103 -> ( -# 519 "..\lex.mll" - CheckExprOp lexbuf; PLUS_MINUS_OP(ulexeme lexbuf) -# 2171 "lex.fs" - ) - | 104 -> ( -# 520 "..\lex.mll" - CheckExprOp lexbuf; INFIX_AT_HAT_OP(ulexeme lexbuf) -# 2176 "lex.fs" - ) - | 105 -> ( -# 521 "..\lex.mll" - CheckExprOp lexbuf; INFIX_COMPARE_OP(ulexeme lexbuf) -# 2181 "lex.fs" - ) - | 106 -> ( -# 522 "..\lex.mll" - CheckExprOp lexbuf; INFIX_AMP_OP(ulexeme lexbuf) -# 2186 "lex.fs" - ) - | 107 -> ( -# 523 "..\lex.mll" - CheckExprOp lexbuf; INFIX_BAR_OP(ulexeme lexbuf) -# 2191 "lex.fs" - ) - | 108 -> ( -# 524 "..\lex.mll" - CheckExprOp lexbuf; PREFIX_OP(ulexeme lexbuf) -# 2196 "lex.fs" - ) - | 109 -> ( -# 526 "..\lex.mll" - FUNKY_OPERATOR_NAME(ulexeme lexbuf) -# 2201 "lex.fs" - ) - | 110 -> ( -# 529 "..\lex.mll" - if args.lightSyntaxStatus.ExplicitlySet && args.lightSyntaxStatus.WarnOnMultipleTokens then - warning(Error("#light should only occur as the first non-comment text in an F# source file",GetLexerRange lexbuf)); - args.lightSyntaxStatus.Status <- true; - skipToken skip (HASH_LIGHT (AT_token !args.ifdefStack)) (token args) lexbuf -# 2209 "lex.fs" - ) - | 111 -> ( -# 535 "..\lex.mll" - args.lightSyntaxStatus.Status <- false; - skipToken skip (HASH_LIGHT (AT_token !args.ifdefStack)) (token args) lexbuf -# 2215 "lex.fs" - ) - | 112 -> ( -# 539 "..\lex.mll" - args.lightSyntaxStatus.Status <- true; - skipToken skip (HASH_LIGHT (AT_token !args.ifdefStack)) (token args) lexbuf -# 2221 "lex.fs" - ) - | 113 -> ( -# 543 "..\lex.mll" - let m = GetLexerRange lexbuf in - let lexed = (ulexeme lexbuf) in - let id = extractIdentFromHashIf lexed in - args.ifdefStack := (IfDefIf,m) :: !(args.ifdefStack); - - // Get the token; make sure it starts at zero position & return - let cont, f = - ( if List.mem id args.defines then (AT_endline(ENDL_token(!args.ifdefStack)), endline (ENDL_token !args.ifdefStack) args) - else (AT_endline(ENDL_skip(!args.ifdefStack,0,m)), endline (ENDL_skip(!args.ifdefStack,0,m)) args) ) in - let tok = shouldStartLine args lexbuf m "#if directive must appear as the first non-whitespace character on a line" (HASH_IF(m,lexed,cont)) in - skipToken skip tok f lexbuf -# 2236 "lex.fs" - ) - | 114 -> ( -# 556 "..\lex.mll" - let lexed = (ulexeme lexbuf) in - let m = GetLexerRange lexbuf in - match !(args.ifdefStack) with - | [] -> LEX_FAILURE "#else has no matching #if" - | (IfDefElse,_) :: rest -> LEX_FAILURE "#endif required for #else" - | (IfDefIf,_) :: rest -> - let m = GetLexerRange lexbuf in - args.ifdefStack := (IfDefElse,m) :: rest; - let tok = HASH_ELSE(m,lexed, AT_endline(ENDL_skip(!args.ifdefStack,0,m))) in - let tok = shouldStartLine args lexbuf m "#else directive must appear as the first non-whitespace character on a line" tok in - skipToken skip tok (endline (ENDL_skip(!args.ifdefStack,0,m)) args) lexbuf -# 2251 "lex.fs" - ) - | 115 -> ( -# 569 "..\lex.mll" - let lexed = (ulexeme lexbuf) in - let m = GetLexerRange lexbuf in - match !(args.ifdefStack) with - | []-> LEX_FAILURE "#endif has no matching #if" - | _ :: rest -> - args.ifdefStack := rest; - let tok = HASH_ENDIF(m,lexed,AT_endline(ENDL_token(!args.ifdefStack))) in - let tok = shouldStartLine args lexbuf m "#endif directive must appear as the first non-whitespace character on a line" tok in - skipToken skip tok (endline (ENDL_token(!args.ifdefStack)) args) lexbuf -# 2264 "lex.fs" - ) - | 116 -> ( -# 580 "..\lex.mll" - let tok = fail args lexbuf "#if directive should be immediately followed by an identifier" (WHITESPACE (AT_token !args.ifdefStack)) in - skipToken skip tok (token args) lexbuf -# 2270 "lex.fs" - ) - | 117 -> ( -# 584 "..\lex.mll" - unexpected_char lexbuf -# 2275 "lex.fs" - ) - | 118 -> ( -# 586 "..\lex.mll" - EOF (AT_token !args.ifdefStack) -# 2280 "lex.fs" - ) - | _ -> failwith "token" -(* Rule ifdef_skip *) -and ifdef_skip n m args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_ifdef_skip n m args skip 210 lexbuf -and _fslex_ifdef_skip n m args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 592 "..\lex.mll" - let m = GetLexerRange lexbuf in - let id = extractIdentFromHashIf (ulexeme lexbuf) in - - // If #if is the first thing on the line then increase depth, otherwise skip, because it is invalid (e.g. "(**) #if ...") - if (start_col_of_range m <> 0) then - skipToken skip (INACTIVECODE (AT_ifdef_skip(!args.ifdefStack,n,m))) (ifdef_skip n m args) lexbuf - else - let tok = INACTIVECODE(AT_endline(ENDL_skip(!args.ifdefStack,n+1,m))) in - skipToken skip tok (endline (ENDL_skip(!args.ifdefStack,n+1,m)) args) lexbuf -# 2298 "lex.fs" - ) - | 1 -> ( -# 603 "..\lex.mll" - let lexed = (ulexeme lexbuf) in - let m = GetLexerRange lexbuf in - - // If #else is the first thing on the line then process it, otherwise ignore, because it is invalid (e.g. "(**) #else ...") - if (start_col_of_range m <> 0) then - skipToken skip (INACTIVECODE (AT_ifdef_skip(!args.ifdefStack,n,m))) (ifdef_skip n m args) lexbuf - elif n = 0 then - match !(args.ifdefStack) with - | []-> LEX_FAILURE "#else has no matching #if" - | (IfDefElse,_) :: rest -> LEX_FAILURE "#endif required for #else" - | (IfDefIf,_) :: rest -> - let m = GetLexerRange lexbuf in - args.ifdefStack := (IfDefElse,m) :: rest; - skipToken skip (HASH_ELSE(m,lexed,AT_endline(ENDL_token(!args.ifdefStack)))) (endline (ENDL_token(!args.ifdefStack)) args) lexbuf - else - skipToken skip (INACTIVECODE(AT_endline(ENDL_skip(!args.ifdefStack,n,m)))) (endline (ENDL_skip(!args.ifdefStack,n,m)) args) lexbuf -# 2318 "lex.fs" - ) - | 2 -> ( -# 621 "..\lex.mll" - let lexed = (ulexeme lexbuf) in - let m = GetLexerRange lexbuf in - - // If #endif is the first thing on the line then process it, otherwise ignore, because it is invalid (e.g. "(**) #endif ...") - if (start_col_of_range m <> 0) then - skipToken skip (INACTIVECODE (AT_ifdef_skip(!args.ifdefStack,n,m))) (ifdef_skip n m args) lexbuf - elif n = 0 then - match !(args.ifdefStack) with - | [] -> LEX_FAILURE "#endif has no matching #if" - | _ :: rest -> - args.ifdefStack := rest; - skipToken skip (HASH_ENDIF(m,lexed,AT_endline(ENDL_token(!args.ifdefStack)))) (endline (ENDL_token(!args.ifdefStack)) args) lexbuf - else - let tok = INACTIVECODE(AT_endline(ENDL_skip(!args.ifdefStack,n-1,m))) in - let tok = shouldStartLine args lexbuf m "Syntax error. wrong nested #endif, unexpected tokens before it" tok in - skipToken skip tok (endline (ENDL_skip(!args.ifdefStack,(n-1),m)) args) lexbuf -# 2338 "lex.fs" - ) - | 3 -> ( -# 639 "..\lex.mll" - newline lexbuf; ifdef_skip n m args skip lexbuf -# 2343 "lex.fs" - ) - | 4 -> ( -# 644 "..\lex.mll" - // This tries to be nice and get tokens as 'words' because VS uses this when selecting stuff - skipToken skip (INACTIVECODE (AT_ifdef_skip(!args.ifdefStack,n,m))) (ifdef_skip n m args) lexbuf -# 2349 "lex.fs" - ) - | 5 -> ( -# 647 "..\lex.mll" - EOF (AT_ifdef_skip(!args.ifdefStack,n,m)) -# 2354 "lex.fs" - ) - | _ -> failwith "ifdef_skip" -(* Rule endline *) -and endline cont args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_endline cont args skip 203 lexbuf -and _fslex_endline cont args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 653 "..\lex.mll" - newline lexbuf; - match cont with - | ENDL_token(ifdefStack) -> skipToken skip (WHITESPACE(AT_token ifdefStack)) (token args) lexbuf - | ENDL_skip(ifdefStack, n, m) -> skipToken skip (INACTIVECODE (AT_ifdef_skip(ifdefStack,n,m))) (ifdef_skip n m args) lexbuf - -# 2368 "lex.fs" - ) - | 1 -> ( -# 659 "..\lex.mll" - match cont with - | ENDL_token(ifdefStack) -> (EOF(AT_token ifdefStack)) - | ENDL_skip(ifdefStack, n, m) -> (EOF(AT_ifdef_skip(ifdefStack,n,m))) - -# 2376 "lex.fs" - ) - | 2 -> ( -# 665 "..\lex.mll" - let tok = fail args lexbuf "Expected single line comment or end of line" (WHITESPACE (AT_token !args.ifdefStack)) in - skipToken skip tok (token args) lexbuf -# 2382 "lex.fs" - ) - | _ -> failwith "endline" -(* Rule string *) -and string sargs skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_string sargs skip 154 lexbuf -and _fslex_string sargs skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 673 "..\lex.mll" - let (buf,fin,m,args) = sargs in - newline lexbuf; - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2394 "lex.fs" - ) - | 1 -> ( -# 678 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_byte_char buf (escape (lexeme lexbuf).[1]); - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2401 "lex.fs" - ) - | 2 -> ( -# 685 "..\lex.mll" - let (buf,fin,m,args) = sargs in - let s = ulexeme lexbuf in - add_byte_char buf (trigraph s.[1] s.[2] s.[3]); - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2409 "lex.fs" - ) - | 3 -> ( -# 691 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_unichar buf (int (hexgraph_short (trim_left lexbuf 2))); - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2416 "lex.fs" - ) - | 4 -> ( -# 697 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_unichar buf (int (unicodegraph_short (trim_left lexbuf 2))); - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2423 "lex.fs" - ) - | 5 -> ( -# 702 "..\lex.mll" - let (buf,fin,m,args) = sargs in - let hi,lo = unicodegraph_long (trim_left lexbuf 2) in - (match hi with | None -> () | Some c -> add_unichar buf (int c)); - add_unichar buf (int lo); - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2432 "lex.fs" - ) - | 6 -> ( -# 709 "..\lex.mll" - let (buf,fin,m,args) = sargs in - let m2 = GetLexerRange lexbuf in - call_string_finish fin buf m2 false -# 2439 "lex.fs" - ) - | 7 -> ( -# 714 "..\lex.mll" - let (buf,fin,m,args) = sargs in - let m2 = GetLexerRange lexbuf in - call_string_finish fin buf m2 true -# 2446 "lex.fs" - ) - | 8 -> ( -# 719 "..\lex.mll" - let (buf,fin,m,args) = sargs in - newline lexbuf; - add_string buf (ulexeme lexbuf); - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2454 "lex.fs" - ) - | 9 -> ( -# 725 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_string buf (ulexeme lexbuf); - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2461 "lex.fs" - ) - | 10 -> ( -# 731 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_string buf (ulexeme lexbuf); - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2468 "lex.fs" - ) - | 11 -> ( -# 736 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_string buf (ulexeme lexbuf); - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2475 "lex.fs" - ) - | 12 -> ( -# 741 "..\lex.mll" - let (buf,fin,m,args) = sargs in - EOF (AT_string(!args.ifdefStack,m)) -# 2481 "lex.fs" - ) - | 13 -> ( -# 744 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_string buf (lexeme lexbuf); - skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf -# 2488 "lex.fs" - ) - | _ -> failwith "string" -(* Rule vstring *) -and vstring sargs skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_vstring sargs skip 129 lexbuf -and _fslex_vstring sargs skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 751 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_byte_char buf '\"'; - skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m))) (vstring sargs) lexbuf -# 2500 "lex.fs" - ) - | 1 -> ( -# 756 "..\lex.mll" - let (buf,fin,m,args) = sargs in - let m2 = GetLexerRange lexbuf in - call_string_finish fin buf m2 false -# 2507 "lex.fs" - ) - | 2 -> ( -# 761 "..\lex.mll" - let (buf,fin,m,args) = sargs in - let m2 = GetLexerRange lexbuf in - call_string_finish fin buf m2 true -# 2514 "lex.fs" - ) - | 3 -> ( -# 766 "..\lex.mll" - let (buf,fin,m,args) = sargs in - newline lexbuf; - add_string buf (ulexeme lexbuf); - skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m))) (vstring sargs) lexbuf -# 2522 "lex.fs" - ) - | 4 -> ( -# 772 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_string buf (ulexeme lexbuf); - skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m))) (vstring sargs) lexbuf -# 2529 "lex.fs" - ) - | 5 -> ( -# 778 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_string buf (ulexeme lexbuf); - skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m))) (vstring sargs) lexbuf -# 2536 "lex.fs" - ) - | 6 -> ( -# 783 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_string buf (ulexeme lexbuf); - skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m))) (vstring sargs) lexbuf -# 2543 "lex.fs" - ) - | 7 -> ( -# 788 "..\lex.mll" - let (buf,fin,m,args) = sargs in - EOF (AT_vstring(!args.ifdefStack,m)) -# 2549 "lex.fs" - ) - | 8 -> ( -# 791 "..\lex.mll" - let (buf,fin,m,args) = sargs in - add_string buf (lexeme lexbuf); - skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m))) (vstring sargs) lexbuf -# 2556 "lex.fs" - ) - | _ -> failwith "vstring" -(* Rule tokenized_comment *) -and tokenized_comment cargs skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_tokenized_comment cargs skip 118 lexbuf -and _fslex_tokenized_comment cargs skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 798 "..\lex.mll" - let buff,n,m,args = cargs in - trySaveXmlDoc lexbuf buff; - newline lexbuf; - (* saves the documentation (if we're collecting any) into a buffer-local variable *) - skipToken skip (LINE_COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf -# 2570 "lex.fs" - ) - | 1 -> ( -# 805 "..\lex.mll" - let _, n,m,args = cargs in - EOF (AT_token !args.ifdefStack) -# 2576 "lex.fs" - ) - | 2 -> ( -# 810 "..\lex.mll" - let buff,n,m,args = cargs in - (* Append the current token to the XML documentation if we're collecting it *) - tryAppendXmlDoc buff (ulexeme lexbuf); - skipToken skip (LINE_COMMENT (AT_tokenized_comment(!args.ifdefStack,n,m))) (tokenized_comment(buff,n,m,args)) lexbuf -# 2584 "lex.fs" - ) - | 3 -> ( -# 815 "..\lex.mll" - let _, n,m,args = cargs in - skipToken skip (LINE_COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf -# 2590 "lex.fs" - ) - | _ -> failwith "tokenized_comment" -(* Rule comment *) -and comment cargs skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_comment cargs skip 97 lexbuf -and _fslex_comment cargs skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 823 "..\lex.mll" - let n,m,args = cargs in - skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment(n,m,args)) lexbuf -# 2601 "lex.fs" - ) - | 1 -> ( -# 827 "..\lex.mll" - let n,m,args = cargs in - skipToken skip (COMMENT (AT_comment_string(!args.ifdefStack,n,m))) (comment_string n m args) lexbuf -# 2607 "lex.fs" - ) - | 2 -> ( -# 831 "..\lex.mll" - let n,m,args = cargs in - skipToken skip (COMMENT (AT_comment_vstring(!args.ifdefStack,n,m))) (comment_vstring n m args) lexbuf -# 2613 "lex.fs" - ) - | 3 -> ( -# 835 "..\lex.mll" - let n,m,args = cargs in - skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n+1,m))) (comment (n+1,m,args)) lexbuf -# 2619 "lex.fs" - ) - | 4 -> ( -# 839 "..\lex.mll" - let n,m,args = cargs in - newline lexbuf; - skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment cargs) lexbuf -# 2626 "lex.fs" - ) - | 5 -> ( -# 843 "..\lex.mll" - - let n,m,args = cargs in - if n > 1 then skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n-1,m))) (comment (n-1,m,args)) lexbuf - else skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf -# 2634 "lex.fs" - ) - | 6 -> ( -# 850 "..\lex.mll" - - let n,m,args = cargs in - skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment cargs) lexbuf -# 2641 "lex.fs" - ) - | 7 -> ( -# 855 "..\lex.mll" - let n,m,args = cargs in - EOF (AT_comment(!args.ifdefStack,n,m)) -# 2647 "lex.fs" - ) - | 8 -> ( -# 858 "..\lex.mll" - let n,m,args = cargs in - skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment(n,m,args)) lexbuf -# 2653 "lex.fs" - ) - | _ -> failwith "comment" -(* Rule comment_string *) -and comment_string n m args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_comment_string n m args skip 53 lexbuf -and _fslex_comment_string n m args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 864 "..\lex.mll" - newline lexbuf; - skipToken skip (COMMENT (AT_comment_string(!args.ifdefStack,n,m))) (comment_string n m args) lexbuf -# 2664 "lex.fs" - ) - | 1 -> ( -# 876 "..\lex.mll" - skipToken skip (COMMENT (AT_comment_string(!args.ifdefStack,n,m))) (comment_string n m args) lexbuf -# 2669 "lex.fs" - ) - | 2 -> ( -# 880 "..\lex.mll" - skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment(n,m,args)) lexbuf -# 2674 "lex.fs" - ) - | 3 -> ( -# 883 "..\lex.mll" - newline lexbuf; - skipToken skip (COMMENT (AT_comment_string(!args.ifdefStack,n,m))) (comment_string n m args) lexbuf -# 2680 "lex.fs" - ) - | 4 -> ( -# 887 "..\lex.mll" - EOF (AT_comment_string(!args.ifdefStack,n,m)) -# 2685 "lex.fs" - ) - | 5 -> ( -# 890 "..\lex.mll" - skipToken skip (COMMENT (AT_comment_string(!args.ifdefStack,n,m))) (comment_string n m args) lexbuf -# 2690 "lex.fs" - ) - | _ -> failwith "comment_string" -(* Rule comment_vstring *) -and comment_vstring n m args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_comment_vstring n m args skip 29 lexbuf -and _fslex_comment_vstring n m args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 895 "..\lex.mll" - skipToken skip (COMMENT (AT_comment_vstring(!args.ifdefStack,n,m))) (comment_vstring n m args) lexbuf -# 2700 "lex.fs" - ) - | 1 -> ( -# 898 "..\lex.mll" - skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment(n,m,args)) lexbuf -# 2705 "lex.fs" - ) - | 2 -> ( -# 904 "..\lex.mll" - skipToken skip (COMMENT (AT_comment_vstring(!args.ifdefStack,n,m))) (comment_vstring n m args) lexbuf -# 2710 "lex.fs" - ) - | 3 -> ( -# 907 "..\lex.mll" - newline lexbuf; - skipToken skip (COMMENT (AT_comment_vstring(!args.ifdefStack,n,m))) (comment_vstring n m args) lexbuf -# 2716 "lex.fs" - ) - | 4 -> ( -# 911 "..\lex.mll" - EOF (AT_comment_vstring(!args.ifdefStack,n,m)) -# 2721 "lex.fs" - ) - | 5 -> ( -# 914 "..\lex.mll" - skipToken skip (COMMENT (AT_comment_vstring(!args.ifdefStack,n,m))) (comment_vstring n m args) lexbuf -# 2726 "lex.fs" - ) - | _ -> failwith "comment_vstring" -(* Rule camlonly *) -and camlonly m args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_camlonly m args skip 0 lexbuf -and _fslex_camlonly m args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 918 "..\lex.mll" - let buf = Bytes.Bytebuf.create 100 in - let m2 = GetLexerRange lexbuf in - let _ = string (buf,default_string_finish,m2,args) skip lexbuf in - skipToken skip (COMMENT (AT_camlonly(!args.ifdefStack,m))) (camlonly m args) lexbuf -# 2739 "lex.fs" - ) - | 1 -> ( -# 922 "..\lex.mll" - newline lexbuf; skipToken skip (COMMENT (AT_camlonly(!args.ifdefStack,m))) (camlonly m args) lexbuf -# 2744 "lex.fs" - ) - | 2 -> ( -# 923 "..\lex.mll" - skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf -# 2749 "lex.fs" - ) - | 3 -> ( -# 924 "..\lex.mll" - skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf -# 2754 "lex.fs" - ) - | 4 -> ( -# 925 "..\lex.mll" - skipToken skip (COMMENT (AT_camlonly(!args.ifdefStack,m))) (camlonly m args) lexbuf -# 2759 "lex.fs" - ) - | 5 -> ( -# 926 "..\lex.mll" - EOF (AT_camlonly(!args.ifdefStack,m)) -# 2764 "lex.fs" - ) - | 6 -> ( -# 927 "..\lex.mll" - skipToken skip (COMMENT (AT_camlonly(!args.ifdefStack,m))) (camlonly m args) lexbuf -# 2769 "lex.fs" - ) - | _ -> failwith "camlonly" - -# 928 "..\lex.mll" - -# 3000000 "lex.fs" diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/pars.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/pars.fs deleted file mode 100644 index 3b266071..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Compiler/pars.fs +++ /dev/null @@ -1,13248 +0,0 @@ -// Implementation file for parser generated by fsyacc -#light "off" -module Microsoft.FSharp.Compiler.Parser -#nowarn "64";; // turn off warnings that type variables used in production annotations are instantiated to concrete type -open Microsoft.FSharp.Compiler -open Internal.Utilities.Text.Lexing -open Internal.Utilities.Text.Parsing.ParseHelpers -# 1 "..\pars.mly" - -// (c) Microsoft Corporation. All rights reserved - -open Internal.Utilities -open Internal.Utilities.Pervasives - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler -open Internal.Utilities.Text.Parsing - -open System -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.PrettyNaming -open Microsoft.FSharp.Compiler.ErrorLogger - -let mk_optional m xopt = - match xopt with - | None -> mksyn_lid_get m Ast.lib_MFCore_path "None" - | Some x -> Expr_app(ExprAtomicFlag.NonAtomic, mksyn_lid_get m Ast.lib_MFCore_path "Some",x,m) - -let mk_Do (vis,strict,expr,m) = - if isSome vis then errorR(Error("Visibility declarations are not permitted on 'do' bindings",m)); - Binding (None, - (if strict then DoBinding else StandaloneExpression), - false,false,[],emptyPreXmlDoc,SynInfo.emptyValSynData, - (if strict then Pat_const(Const_unit,m) else Pat_wild m), - BindingRhs([],None,expr),m,NoSequencePointAtDoBinding) - -let mk_Def_expr (e,m) = - let spExpr = if IsControlFlowExpression e then NoSequencePointAtDoBinding else SequencePointAtBinding (range_of_synexpr e) in - Def_expr(spExpr,e,m) - -let addAttribs attrs p = Pat_attrib(p,attrs,range_of_synpat p) - -let computeOverloadQualifier attrs = - let attrs = - attrs |> List.choose (fun attr -> - match attr with - | (Attr(lid,(Expr_const(Const_string (s,_),_) | Expr_paren(Expr_const(Const_string (s,_),_),_)),_,_)) -> - begin match List.frontAndBack lid with - | (_,id) when id.idText = "OverloadID" or id.idText = "OverloadIDAttribute" -> Some(s) - | _ -> None - end - | _ -> None) in - match attrs with - | [x] -> Some x - | [] -> None - | _ -> failwith "Multiple OverloadID attributes" - -(* error recovery*) -let arbExpr(parseState) = Expr_arb(lhs(parseState)) - -let mksyn_anon_constraint ty m = Type_anon_constraint(ty,m) - -(* This function is called by the generated parser code. Returning initiates error recovery *) -let parse_error_rich = Some (fun (ctxt: ParseErrorContext<_>) -> - errorR(SyntaxError(box(ctxt), GetLexerRange (GetParserLexbuf ctxt.ParseState)))) - -let reportParseErrorAt m s = errorR(Error(s,m)) - -let reportParseWarningAt m s = warning(Error(s,m)) - -let raiseParseErrorAt m s = - reportParseErrorAt m s; - // This initiates error recovery - raise RecoverableParseError - -let checkEndOfFileError t = - match t with - | AT_ifdef_skip(_,_,m) -> reportParseErrorAt m "end of file in #if section begun at or after here" - | AT_string (_,m) -> reportParseErrorAt m "end of file in string begun at or before here" - | AT_vstring (_,m) -> reportParseErrorAt m "end of file in verbatim string begun at or before here" - | AT_comment (_,_,m) -> reportParseErrorAt m "end of file in comment begun at or before here" - | AT_tokenized_comment (_,_,m) -> reportParseErrorAt m "end of file in comment begun at or before here" - | AT_comment_string (_,_,m) -> reportParseErrorAt m "end of file in string embedded in comment begun at or before here" - | AT_comment_vstring (_,_,m) -> reportParseErrorAt m "end of file in verbatim string embedded in comment begun at or before here" - | AT_camlonly (_,m) -> reportParseErrorAt m "end of file in IF-OCAML section begun at or before here" - | AT_endline(ENDL_skip(_,_,m)) -> reportParseErrorAt m "end of file in directive begun at or before here" - | AT_endline(ENDL_token(stack)) - | AT_token(stack) -> - match stack with - | [] -> () - | (_,m) :: _ -> reportParseErrorAt m "no #endif found for #if or #else" - -type BindingSet = BindingSetPreAttrs of range * bool * bool * (SynAttributes -> access option -> SynAttributes * SynBinding list) - -let mkClassMemberLocalBindings(isStatic,wholem,attrs,vis,BindingSetPreAttrs(_,isRec,isUse,declsPreAttrs)) = - let ignoredFreeAttrs,decls = declsPreAttrs attrs vis in - if nonNil ignoredFreeAttrs then warning(Error("attributes have been ignored in this construct",wholem)); - if isUse then errorR(Error("'use' bindings are not permitted in implicit class constructors",wholem)); - ClassMemberDefn_let_bindings (decls,isStatic,isRec,wholem) - -let mkLocalBindings (wholem,BindingSetPreAttrs(_,isRec,isUse,declsPreAttrs),body) = - let ignoredFreeAttrs,decls = declsPreAttrs [] None in - if nonNil ignoredFreeAttrs then warning(Error("attributes have been ignored in this construct",wholem)); - Expr_let (isRec,isUse,decls,body,wholem) - -let mkDefnBindings (wholem,BindingSetPreAttrs(_,isRec,isUse,declsPreAttrs),attrs,vis,attrsm) = - if isUse then errorR(Error("'use' bindings are not permitted in modules",wholem)); - let freeAttrs,decls = declsPreAttrs attrs vis in - let letDecls = [ Def_let (isRec,decls,wholem) ] in - let attrDecls = if nonNil freeAttrs then [ Def_attributes (freeAttrs,attrsm) ] else [] in - attrDecls @ letDecls - -let id_of_pat m p = - match p with - | Pat_as (Pat_wild _,id,false,_,_) -> id - | _ -> raiseParseErrorAt m "an integer for loop must use a simple identifier" - -let checkForMultipleAugmentations m a1 a2 = - if nonNil a1 && nonNil a2 then raiseParseErrorAt m "at most one 'with' augmentation is permitted"; - a1 @ a2 - -let grabXmlDoc(parseState,elemIdx) = - LexbufLocalXmlDocStore.GrabXML(GetParserLexbuf parseState,rhs parseState elemIdx) - - - -# 131 "pars.fs" -// This type is the type of tokens accepted by the parser -type token = - | HASH_IF of (range * string * Ast.lexcont) - | HASH_ELSE of (range * string * Ast.lexcont) - | HASH_ENDIF of (range * string * Ast.lexcont) - | COMMENT of (Ast.lexcont) - | WHITESPACE of (Ast.lexcont) - | HASH_LINE of (Ast.lexcont) - | HASH_LIGHT of (Ast.lexcont) - | INACTIVECODE of (Ast.lexcont) - | LINE_COMMENT of (Ast.lexcont) - | STRING_TEXT of (Ast.lexcont) - | EOF of (Ast.lexcont) - | LEX_FAILURE of (string) - | ODUMMY of (token) - | OINTERFACE_MEMBER - | OBLOCKEND - | ORIGHT_BLOCK_END - | ODECLEND - | OEND - | OBLOCKSEP - | OBLOCKBEGIN - | ORESET - | OFUN - | OFUNCTION - | OWITH - | OELSE - | OTHEN - | ODO_BANG - | ODO - | OBINDER of (string) - | OLET of (bool) - | HIGH_PRECEDENCE_TYAPP - | HIGH_PRECEDENCE_APP - | EXTERN - | VOID - | PUBLIC - | PRIVATE - | INTERNAL - | STATIC - | MEMBER - | CLASS - | VIRTUAL - | ABSTRACT - | OVERRIDE - | DEFAULT - | CONSTRUCTOR - | INHERIT - | GREATER_RBRACK - | STRUCT - | SIG - | BAR - | RBRACK - | RBRACE - | MINUS - | DOLLAR - | LBRACE_LESS - | BAR_RBRACK - | GREATER_RBRACE - | UNDERSCORE - | SEMICOLON_SEMICOLON - | LARROW - | EQUALS - | LBRACK - | LBRACK_BAR - | LBRACK_LESS - | LBRACE - | QMARK - | QMARK_QMARK - | DOT - | COLON - | COLON_COLON - | COLON_GREATER - | COLON_QMARK_GREATER - | COLON_QMARK - | COLON_EQUALS - | SEMICOLON - | WHEN - | WHILE - | WITH - | HASH - | AMP - | AMP_AMP - | QUOTE - | LPAREN - | RPAREN - | STAR - | COMMA - | RARROW - | RARROW2 - | GREATER_DOT - | GREATER_BAR_RBRACK - | LPAREN_STAR_RPAREN - | OPEN - | OR - | REC - | THEN - | TO - | TRUE - | TRY - | TYPE - | VAL - | INLINE - | INTERFACE - | INSTANCE - | LAZY - | MATCH - | METHOD - | MUTABLE - | NEW - | OF - | EXCEPTION - | FALSE - | FOR - | FUN - | FUNCTION - | IF - | IN - | FINALLY - | DO_BANG - | AND - | AS - | ASSERT - | ASR - | BEGIN - | DO - | DONE - | DOWNTO - | ELSE - | ELIF - | END - | DOT_DOT - | BAR_BAR - | LESS - | GREATER - | UPCAST - | DOWNCAST - | NULL - | RESERVED - | MODULE - | NAMESPACE - | DELEGATE - | CONSTRAINT - | BASE - | LQUOTE of (string * bool) - | RQUOTE of (string * bool) - | RQUOTE_DOT of (string * bool) - | SPLICE_SYMBOL of (string) - | PERCENT_OP of (string) - | BINDER of (string) - | LET of (bool) - | YIELD of (bool) - | YIELD_BANG of (bool) - | BIGNUM of ((string * string)) - | DECIMAL of (System.Decimal) - | CHAR of (char) - | IEEE64 of (double) - | IEEE32 of (single) - | NATIVEINT of (int64) - | UNATIVEINT of (uint64) - | UINT64 of (uint64) - | UINT32 of (uint32) - | UINT16 of (uint16) - | UINT8 of (byte) - | INT64 of (int64 * bool) - | INT32 of (int32 * bool) - | INT32_DOT_DOT of (int32 * bool) - | INT16 of (int16 * bool) - | INT8 of (sbyte * bool) - | FUNKY_OPERATOR_NAME of (string) - | ADJACENT_PREFIX_PLUS_MINUS_OP of (string) - | PLUS_MINUS_OP of (string) - | INFIX_AMP_OP of (string) - | INFIX_STAR_DIV_MOD_OP of (string) - | PREFIX_OP of (string) - | INFIX_BAR_OP of (string) - | INFIX_AT_HAT_OP of (string) - | INFIX_COMPARE_OP of (string) - | INFIX_STAR_STAR_OP of (string) - | IDENT of (string) - | STRING of (string) - | BYTEARRAY of (byte[]) -// This type is used to give symbolic names to token indexes, useful for error messages -type tokenId = - | TOKEN_HASH_IF - | TOKEN_HASH_ELSE - | TOKEN_HASH_ENDIF - | TOKEN_COMMENT - | TOKEN_WHITESPACE - | TOKEN_HASH_LINE - | TOKEN_HASH_LIGHT - | TOKEN_INACTIVECODE - | TOKEN_LINE_COMMENT - | TOKEN_STRING_TEXT - | TOKEN_EOF - | TOKEN_LEX_FAILURE - | TOKEN_ODUMMY - | TOKEN_OINTERFACE_MEMBER - | TOKEN_OBLOCKEND - | TOKEN_ORIGHT_BLOCK_END - | TOKEN_ODECLEND - | TOKEN_OEND - | TOKEN_OBLOCKSEP - | TOKEN_OBLOCKBEGIN - | TOKEN_ORESET - | TOKEN_OFUN - | TOKEN_OFUNCTION - | TOKEN_OWITH - | TOKEN_OELSE - | TOKEN_OTHEN - | TOKEN_ODO_BANG - | TOKEN_ODO - | TOKEN_OBINDER - | TOKEN_OLET - | TOKEN_HIGH_PRECEDENCE_TYAPP - | TOKEN_HIGH_PRECEDENCE_APP - | TOKEN_EXTERN - | TOKEN_VOID - | TOKEN_PUBLIC - | TOKEN_PRIVATE - | TOKEN_INTERNAL - | TOKEN_STATIC - | TOKEN_MEMBER - | TOKEN_CLASS - | TOKEN_VIRTUAL - | TOKEN_ABSTRACT - | TOKEN_OVERRIDE - | TOKEN_DEFAULT - | TOKEN_CONSTRUCTOR - | TOKEN_INHERIT - | TOKEN_GREATER_RBRACK - | TOKEN_STRUCT - | TOKEN_SIG - | TOKEN_BAR - | TOKEN_RBRACK - | TOKEN_RBRACE - | TOKEN_MINUS - | TOKEN_DOLLAR - | TOKEN_LBRACE_LESS - | TOKEN_BAR_RBRACK - | TOKEN_GREATER_RBRACE - | TOKEN_UNDERSCORE - | TOKEN_SEMICOLON_SEMICOLON - | TOKEN_LARROW - | TOKEN_EQUALS - | TOKEN_LBRACK - | TOKEN_LBRACK_BAR - | TOKEN_LBRACK_LESS - | TOKEN_LBRACE - | TOKEN_QMARK - | TOKEN_QMARK_QMARK - | TOKEN_DOT - | TOKEN_COLON - | TOKEN_COLON_COLON - | TOKEN_COLON_GREATER - | TOKEN_COLON_QMARK_GREATER - | TOKEN_COLON_QMARK - | TOKEN_COLON_EQUALS - | TOKEN_SEMICOLON - | TOKEN_WHEN - | TOKEN_WHILE - | TOKEN_WITH - | TOKEN_HASH - | TOKEN_AMP - | TOKEN_AMP_AMP - | TOKEN_QUOTE - | TOKEN_LPAREN - | TOKEN_RPAREN - | TOKEN_STAR - | TOKEN_COMMA - | TOKEN_RARROW - | TOKEN_RARROW2 - | TOKEN_GREATER_DOT - | TOKEN_GREATER_BAR_RBRACK - | TOKEN_LPAREN_STAR_RPAREN - | TOKEN_OPEN - | TOKEN_OR - | TOKEN_REC - | TOKEN_THEN - | TOKEN_TO - | TOKEN_TRUE - | TOKEN_TRY - | TOKEN_TYPE - | TOKEN_VAL - | TOKEN_INLINE - | TOKEN_INTERFACE - | TOKEN_INSTANCE - | TOKEN_LAZY - | TOKEN_MATCH - | TOKEN_METHOD - | TOKEN_MUTABLE - | TOKEN_NEW - | TOKEN_OF - | TOKEN_EXCEPTION - | TOKEN_FALSE - | TOKEN_FOR - | TOKEN_FUN - | TOKEN_FUNCTION - | TOKEN_IF - | TOKEN_IN - | TOKEN_FINALLY - | TOKEN_DO_BANG - | TOKEN_AND - | TOKEN_AS - | TOKEN_ASSERT - | TOKEN_ASR - | TOKEN_BEGIN - | TOKEN_DO - | TOKEN_DONE - | TOKEN_DOWNTO - | TOKEN_ELSE - | TOKEN_ELIF - | TOKEN_END - | TOKEN_DOT_DOT - | TOKEN_BAR_BAR - | TOKEN_LESS - | TOKEN_GREATER - | TOKEN_UPCAST - | TOKEN_DOWNCAST - | TOKEN_NULL - | TOKEN_RESERVED - | TOKEN_MODULE - | TOKEN_NAMESPACE - | TOKEN_DELEGATE - | TOKEN_CONSTRAINT - | TOKEN_BASE - | TOKEN_LQUOTE - | TOKEN_RQUOTE - | TOKEN_RQUOTE_DOT - | TOKEN_SPLICE_SYMBOL - | TOKEN_PERCENT_OP - | TOKEN_BINDER - | TOKEN_LET - | TOKEN_YIELD - | TOKEN_YIELD_BANG - | TOKEN_BIGNUM - | TOKEN_DECIMAL - | TOKEN_CHAR - | TOKEN_IEEE64 - | TOKEN_IEEE32 - | TOKEN_NATIVEINT - | TOKEN_UNATIVEINT - | TOKEN_UINT64 - | TOKEN_UINT32 - | TOKEN_UINT16 - | TOKEN_UINT8 - | TOKEN_INT64 - | TOKEN_INT32 - | TOKEN_INT32_DOT_DOT - | TOKEN_INT16 - | TOKEN_INT8 - | TOKEN_FUNKY_OPERATOR_NAME - | TOKEN_ADJACENT_PREFIX_PLUS_MINUS_OP - | TOKEN_PLUS_MINUS_OP - | TOKEN_INFIX_AMP_OP - | TOKEN_INFIX_STAR_DIV_MOD_OP - | TOKEN_PREFIX_OP - | TOKEN_INFIX_BAR_OP - | TOKEN_INFIX_AT_HAT_OP - | TOKEN_INFIX_COMPARE_OP - | TOKEN_INFIX_STAR_STAR_OP - | TOKEN_IDENT - | TOKEN_STRING - | TOKEN_BYTEARRAY - | TOKEN_end_of_input - | TOKEN_error -// This type is used to give symbolic names to token indexes, useful for error messages -type nonTerminalId = - | NONTERM__startsignatureFile - | NONTERM__startimplementationFile - | NONTERM__startinteraction - | NONTERM_interaction - | NONTERM_hashDirective - | NONTERM_hashDirectiveArg - | NONTERM_hashDirectiveArgs - | NONTERM_interactiveTerminator - | NONTERM_interactiveItemsTerminator - | NONTERM_interactiveModuleDefns - | NONTERM_interactiveExpr - | NONTERM_interactiveHash - | NONTERM_signatureFile - | NONTERM_implementationFile - | NONTERM_moduleIntro - | NONTERM_namespaceIntro - | NONTERM_fileNamespaceSpecs - | NONTERM_fileNamespaceSpecList - | NONTERM_fileNamespaceSpec - | NONTERM_fileNamespaceImpls - | NONTERM_fileNamespaceImplList - | NONTERM_fileNamespaceImpl - | NONTERM_fileModuleSpec - | NONTERM_fileModuleImpl - | NONTERM_moduleSpfnsPossiblyEmpty - | NONTERM_moduleSpfns - | NONTERM_moduleDefnsOrExprPossiblyEmpty - | NONTERM_moduleDefnsOrExpr - | NONTERM_moduleDefns - | NONTERM_moduleDefnOrDirective - | NONTERM_moduleDefn - | NONTERM_namedModuleAbbrevBlock - | NONTERM_namedModuleDefnBlock - | NONTERM_wrappedNamedModuleDefn - | NONTERM_opt_signature - | NONTERM_tyconDefnAugmentation - | NONTERM_moduleSpfn - | NONTERM_valSpfn - | NONTERM_opt_literalValue - | NONTERM_moduleSpecBlock - | NONTERM_opt_attributes - | NONTERM_attributes - | NONTERM_attributeList - | NONTERM_attributeListElements - | NONTERM_attribute - | NONTERM_attributeTarget - | NONTERM_tyconSpfns - | NONTERM_tyconSpfn_list - | NONTERM_tyconSpfn - | NONTERM_tyconSpfnRhsBlock - | NONTERM_tyconSpfnRhs - | NONTERM_tyconClassSpfn - | NONTERM_classSpfnBlockKindUnspecified - | NONTERM_classSpfnBlock - | NONTERM_classSpfnMembers - | NONTERM_memberFlags - | NONTERM_memberSpecFlags - | NONTERM_classMemberSpfnGetSet - | NONTERM_classMemberSpfnGetSetElements - | NONTERM_classMemberSpfn - | NONTERM_typeNameInfo - | NONTERM_tyconDefnList - | NONTERM_tyconDefn - | NONTERM_tyconDefnRhsBlock - | NONTERM_tyconDefnRhs - | NONTERM_tyconClassDefn - | NONTERM_classDefnBlockKindUnspecified - | NONTERM_classDefnBlock - | NONTERM_classDefnMembers - | NONTERM_classDefnMemberGetSet - | NONTERM_classDefnMemberGetSetElements - | NONTERM_classDefnMemberGetSetElement - | NONTERM_memberCore - | NONTERM_abstractMemberFlags - | NONTERM_classDefnMember - | NONTERM_atomicPatternLongIdent - | NONTERM_opt_access - | NONTERM_access - | NONTERM_opt_decl_visibility - | NONTERM_opt_interfaceImplDefn - | NONTERM_opt_classDefn - | NONTERM_opt_classSpfn - | NONTERM_inheritsDefn - | NONTERM_optAsSpec - | NONTERM_asSpec - | NONTERM_optBaseSpec - | NONTERM_baseSpec - | NONTERM_objectImplementationBlock - | NONTERM_objectImplementationMembers - | NONTERM_objectImplementationMember - | NONTERM_memberOrOverride - | NONTERM_tyconDefnOrSpfnSimpleRepr - | NONTERM_braceFieldDeclList - | NONTERM_inlineAssemblyTyconRepr - | NONTERM_classOrInterfaceOrStruct - | NONTERM_interfaceMember - | NONTERM_tyconNameAndTyparDecls - | NONTERM_prefixTyparDecls - | NONTERM_prefixTyparDeclList - | NONTERM_typarDecl - | NONTERM_postfixTyparDecls - | NONTERM_explicitValTyparDeclsCore - | NONTERM_explicitValTyparDecls - | NONTERM_opt_explicitValTyparDecls - | NONTERM_opt_explicitValTyparDecls2 - | NONTERM_opt_typeConstraints - | NONTERM_typeConstraints - | NONTERM_typeConstraint - | NONTERM_unionRepr - | NONTERM_barAndgrabXmlDoc - | NONTERM_attrUnionCaseDecls - | NONTERM_attrUnionCaseDecl - | NONTERM_unionCaseName - | NONTERM_firstUnionCaseDeclOfMany - | NONTERM_firstUnionCaseDecl - | NONTERM_unionCaseRepr - | NONTERM_recdFieldDeclList - | NONTERM_recdFieldDecl - | NONTERM_fieldDecl - | NONTERM_exconDefn - | NONTERM_exconSpfn - | NONTERM_exceptionAndGrabDoc - | NONTERM_exconCore - | NONTERM_exconIntro - | NONTERM_exconRepr - | NONTERM_openDecl - | NONTERM_defnBindings - | NONTERM_doBinding - | NONTERM_hardwhiteLetBindings - | NONTERM_hardwhiteDoBinding - | NONTERM_classDefnBindings - | NONTERM_hardwhiteDefnBindingsTerminator - | NONTERM_cPrototype - | NONTERM_cArgs - | NONTERM_cMoreArgs - | NONTERM_cArg - | NONTERM_cType - | NONTERM_cRetType - | NONTERM_localBindings - | NONTERM_more_localBindings - | NONTERM_attr_localBinding - | NONTERM_localBinding - | NONTERM_typedExprWithStaticOptimizationsBlock - | NONTERM_typedExprWithStaticOptimizations - | NONTERM_opt_staticOptimizations - | NONTERM_staticOptimization - | NONTERM_staticOptimizationConditions - | NONTERM_staticOptimizationCondition - | NONTERM_rawconstant - | NONTERM_constant - | NONTERM_bindingPattern - | NONTERM_simplePattern - | NONTERM_simplePatternCommaList - | NONTERM_simplePatterns - | NONTERM_headBindingPattern - | NONTERM_tuplePatternElements - | NONTERM_conjPatternElements - | NONTERM_constrPattern - | NONTERM_atomicPatterns - | NONTERM_atomicPattern - | NONTERM_parenPatternBody - | NONTERM_parenPattern - | NONTERM_tupleParenPatternElements - | NONTERM_conjParenPatternElements - | NONTERM_recordPatternElements - | NONTERM_recordPatternElementsAux - | NONTERM_recordPatternElement - | NONTERM_listPatternElements - | NONTERM_typedSeqExprBlock - | NONTERM_declExprBlock - | NONTERM_typedSeqExprBlockR - | NONTERM_typedSeqExpr - | NONTERM_seqExpr - | NONTERM_recover - | NONTERM_declExpr - | NONTERM_dynamicArg - | NONTERM_monadicWhenCondition - | NONTERM_withClauses - | NONTERM_withPatternClauses - | NONTERM_patternAndGuard - | NONTERM_patternClauses - | NONTERM_patternGuard - | NONTERM_patternResult - | NONTERM_ifExprCases - | NONTERM_ifExprThen - | NONTERM_ifExprElifs - | NONTERM_tupleExpr - | NONTERM_minusExpr - | NONTERM_appExpr - | NONTERM_argExpr - | NONTERM_atomicExpr - | NONTERM_atomicExprQualification - | NONTERM_optRange - | NONTERM_atomicExprAfterType - | NONTERM_beginEndExpr - | NONTERM_quoteExpr - | NONTERM_arrayExpr - | NONTERM_parenExpr - | NONTERM_parenExprBody - | NONTERM_staticallyKnownHeadTypars - | NONTERM_braceExpr - | NONTERM_braceExprBody - | NONTERM_listExprElements - | NONTERM_monadicExprInitial - | NONTERM_rangeSequenceExpr - | NONTERM_monadicSingleLineQualifiersThenArrowThenExprR - | NONTERM_forLoopBinder - | NONTERM_forLoopRange - | NONTERM_inlineAssemblyExpr - | NONTERM_opt_curriedArgExprs - | NONTERM_opt_atomicExprAfterType - | NONTERM_opt_inlineAssemblyTypeArg - | NONTERM_opt_inlineAssemblyReturnTypes - | NONTERM_recdExpr - | NONTERM_recdExprBindings - | NONTERM_objExpr - | NONTERM_objExprBaseCall - | NONTERM_opt_objExprBindings - | NONTERM_objExprBindings - | NONTERM_objExprInterfaces - | NONTERM_opt_objExprInterfaces - | NONTERM_objExprInterface - | NONTERM_direction - | NONTERM_anonLambdaExpr - | NONTERM_anonMatchingExpr - | NONTERM_typeWithTypeConstraints - | NONTERM_topTypeWithTypeConstraints - | NONTERM_opt_topReturnTypeWithTypeConstraints - | NONTERM_topType - | NONTERM_topTupleType - | NONTERM_topTupleTypeElements - | NONTERM_topAppType - | NONTERM_polyType - | NONTERM_typ - | NONTERM_tupleType - | NONTERM_tupleOrQuotTypeElements - | NONTERM_tupleTypeElements - | NONTERM_appTypeCon - | NONTERM_appTypeConPower - | NONTERM_appType - | NONTERM_arrayTypeSuffix - | NONTERM_appTypePrexifArguments - | NONTERM_typeListElements - | NONTERM_powerType - | NONTERM_atomType - | NONTERM_typeArgs - | NONTERM_typeArgsActual - | NONTERM_measurearg - | NONTERM_measureatom - | NONTERM_measurepower - | NONTERM_measureseq - | NONTERM_measure - | NONTERM_typar - | NONTERM_staticallyKnownHeadTypar - | NONTERM_ident - | NONTERM_path - | NONTERM_opname - | NONTERM_operatorName - | NONTERM_barName - | NONTERM_barNames - | NONTERM_identop - | NONTERM_pathop - | NONTERM_nameop - | NONTERM_top_sep - | NONTERM_top_seps - | NONTERM_itop_sep - | NONTERM_itop_seps - | NONTERM_opt_itop_seps - | NONTERM_opt_top_seps - | NONTERM_seps - | NONTERM_decl_end - | NONTERM_opt_decl_end - | NONTERM_opt_ODECLEND - | NONTERM_deprecated_opt_equals - | NONTERM_opt_OBLOCKSEP - | NONTERM_opt_seps - | NONTERM_opt_rec - | NONTERM_opt_bar - | NONTERM_opt_inline - | NONTERM_opt_mutable - | NONTERM_do_or_odo - | NONTERM_done_term - | NONTERM_structOrBegin - | NONTERM_sigOrBegin - | NONTERM_colonOrEquals - | NONTERM_opt_HASH - | NONTERM_opt_HIGH_PRECEDENCE_APP - | NONTERM_opt_HIGH_PRECEDENCE_TYAPP - -// This function maps tokens to integers indexes -let tagOfToken (t:token) = - match t with - | HASH_IF _ -> 0 - | HASH_ELSE _ -> 1 - | HASH_ENDIF _ -> 2 - | COMMENT _ -> 3 - | WHITESPACE _ -> 4 - | HASH_LINE _ -> 5 - | HASH_LIGHT _ -> 6 - | INACTIVECODE _ -> 7 - | LINE_COMMENT _ -> 8 - | STRING_TEXT _ -> 9 - | EOF _ -> 10 - | LEX_FAILURE _ -> 11 - | ODUMMY _ -> 12 - | OINTERFACE_MEMBER -> 13 - | OBLOCKEND -> 14 - | ORIGHT_BLOCK_END -> 15 - | ODECLEND -> 16 - | OEND -> 17 - | OBLOCKSEP -> 18 - | OBLOCKBEGIN -> 19 - | ORESET -> 20 - | OFUN -> 21 - | OFUNCTION -> 22 - | OWITH -> 23 - | OELSE -> 24 - | OTHEN -> 25 - | ODO_BANG -> 26 - | ODO -> 27 - | OBINDER _ -> 28 - | OLET _ -> 29 - | HIGH_PRECEDENCE_TYAPP -> 30 - | HIGH_PRECEDENCE_APP -> 31 - | EXTERN -> 32 - | VOID -> 33 - | PUBLIC -> 34 - | PRIVATE -> 35 - | INTERNAL -> 36 - | STATIC -> 37 - | MEMBER -> 38 - | CLASS -> 39 - | VIRTUAL -> 40 - | ABSTRACT -> 41 - | OVERRIDE -> 42 - | DEFAULT -> 43 - | CONSTRUCTOR -> 44 - | INHERIT -> 45 - | GREATER_RBRACK -> 46 - | STRUCT -> 47 - | SIG -> 48 - | BAR -> 49 - | RBRACK -> 50 - | RBRACE -> 51 - | MINUS -> 52 - | DOLLAR -> 53 - | LBRACE_LESS -> 54 - | BAR_RBRACK -> 55 - | GREATER_RBRACE -> 56 - | UNDERSCORE -> 57 - | SEMICOLON_SEMICOLON -> 58 - | LARROW -> 59 - | EQUALS -> 60 - | LBRACK -> 61 - | LBRACK_BAR -> 62 - | LBRACK_LESS -> 63 - | LBRACE -> 64 - | QMARK -> 65 - | QMARK_QMARK -> 66 - | DOT -> 67 - | COLON -> 68 - | COLON_COLON -> 69 - | COLON_GREATER -> 70 - | COLON_QMARK_GREATER -> 71 - | COLON_QMARK -> 72 - | COLON_EQUALS -> 73 - | SEMICOLON -> 74 - | WHEN -> 75 - | WHILE -> 76 - | WITH -> 77 - | HASH -> 78 - | AMP -> 79 - | AMP_AMP -> 80 - | QUOTE -> 81 - | LPAREN -> 82 - | RPAREN -> 83 - | STAR -> 84 - | COMMA -> 85 - | RARROW -> 86 - | RARROW2 -> 87 - | GREATER_DOT -> 88 - | GREATER_BAR_RBRACK -> 89 - | LPAREN_STAR_RPAREN -> 90 - | OPEN -> 91 - | OR -> 92 - | REC -> 93 - | THEN -> 94 - | TO -> 95 - | TRUE -> 96 - | TRY -> 97 - | TYPE -> 98 - | VAL -> 99 - | INLINE -> 100 - | INTERFACE -> 101 - | INSTANCE -> 102 - | LAZY -> 103 - | MATCH -> 104 - | METHOD -> 105 - | MUTABLE -> 106 - | NEW -> 107 - | OF -> 108 - | EXCEPTION -> 109 - | FALSE -> 110 - | FOR -> 111 - | FUN -> 112 - | FUNCTION -> 113 - | IF -> 114 - | IN -> 115 - | FINALLY -> 116 - | DO_BANG -> 117 - | AND -> 118 - | AS -> 119 - | ASSERT -> 120 - | ASR -> 121 - | BEGIN -> 122 - | DO -> 123 - | DONE -> 124 - | DOWNTO -> 125 - | ELSE -> 126 - | ELIF -> 127 - | END -> 128 - | DOT_DOT -> 129 - | BAR_BAR -> 130 - | LESS -> 131 - | GREATER -> 132 - | UPCAST -> 133 - | DOWNCAST -> 134 - | NULL -> 135 - | RESERVED -> 136 - | MODULE -> 137 - | NAMESPACE -> 138 - | DELEGATE -> 139 - | CONSTRAINT -> 140 - | BASE -> 141 - | LQUOTE _ -> 142 - | RQUOTE _ -> 143 - | RQUOTE_DOT _ -> 144 - | SPLICE_SYMBOL _ -> 145 - | PERCENT_OP _ -> 146 - | BINDER _ -> 147 - | LET _ -> 148 - | YIELD _ -> 149 - | YIELD_BANG _ -> 150 - | BIGNUM _ -> 151 - | DECIMAL _ -> 152 - | CHAR _ -> 153 - | IEEE64 _ -> 154 - | IEEE32 _ -> 155 - | NATIVEINT _ -> 156 - | UNATIVEINT _ -> 157 - | UINT64 _ -> 158 - | UINT32 _ -> 159 - | UINT16 _ -> 160 - | UINT8 _ -> 161 - | INT64 _ -> 162 - | INT32 _ -> 163 - | INT32_DOT_DOT _ -> 164 - | INT16 _ -> 165 - | INT8 _ -> 166 - | FUNKY_OPERATOR_NAME _ -> 167 - | ADJACENT_PREFIX_PLUS_MINUS_OP _ -> 168 - | PLUS_MINUS_OP _ -> 169 - | INFIX_AMP_OP _ -> 170 - | INFIX_STAR_DIV_MOD_OP _ -> 171 - | PREFIX_OP _ -> 172 - | INFIX_BAR_OP _ -> 173 - | INFIX_AT_HAT_OP _ -> 174 - | INFIX_COMPARE_OP _ -> 175 - | INFIX_STAR_STAR_OP _ -> 176 - | IDENT _ -> 177 - | STRING _ -> 178 - | BYTEARRAY _ -> 179 - -// This function maps integers indexes to symbolic token ids -let tokenTagToTokenId (tokenIdx:int) = - match tokenIdx with - | 0 -> TOKEN_HASH_IF - | 1 -> TOKEN_HASH_ELSE - | 2 -> TOKEN_HASH_ENDIF - | 3 -> TOKEN_COMMENT - | 4 -> TOKEN_WHITESPACE - | 5 -> TOKEN_HASH_LINE - | 6 -> TOKEN_HASH_LIGHT - | 7 -> TOKEN_INACTIVECODE - | 8 -> TOKEN_LINE_COMMENT - | 9 -> TOKEN_STRING_TEXT - | 10 -> TOKEN_EOF - | 11 -> TOKEN_LEX_FAILURE - | 12 -> TOKEN_ODUMMY - | 13 -> TOKEN_OINTERFACE_MEMBER - | 14 -> TOKEN_OBLOCKEND - | 15 -> TOKEN_ORIGHT_BLOCK_END - | 16 -> TOKEN_ODECLEND - | 17 -> TOKEN_OEND - | 18 -> TOKEN_OBLOCKSEP - | 19 -> TOKEN_OBLOCKBEGIN - | 20 -> TOKEN_ORESET - | 21 -> TOKEN_OFUN - | 22 -> TOKEN_OFUNCTION - | 23 -> TOKEN_OWITH - | 24 -> TOKEN_OELSE - | 25 -> TOKEN_OTHEN - | 26 -> TOKEN_ODO_BANG - | 27 -> TOKEN_ODO - | 28 -> TOKEN_OBINDER - | 29 -> TOKEN_OLET - | 30 -> TOKEN_HIGH_PRECEDENCE_TYAPP - | 31 -> TOKEN_HIGH_PRECEDENCE_APP - | 32 -> TOKEN_EXTERN - | 33 -> TOKEN_VOID - | 34 -> TOKEN_PUBLIC - | 35 -> TOKEN_PRIVATE - | 36 -> TOKEN_INTERNAL - | 37 -> TOKEN_STATIC - | 38 -> TOKEN_MEMBER - | 39 -> TOKEN_CLASS - | 40 -> TOKEN_VIRTUAL - | 41 -> TOKEN_ABSTRACT - | 42 -> TOKEN_OVERRIDE - | 43 -> TOKEN_DEFAULT - | 44 -> TOKEN_CONSTRUCTOR - | 45 -> TOKEN_INHERIT - | 46 -> TOKEN_GREATER_RBRACK - | 47 -> TOKEN_STRUCT - | 48 -> TOKEN_SIG - | 49 -> TOKEN_BAR - | 50 -> TOKEN_RBRACK - | 51 -> TOKEN_RBRACE - | 52 -> TOKEN_MINUS - | 53 -> TOKEN_DOLLAR - | 54 -> TOKEN_LBRACE_LESS - | 55 -> TOKEN_BAR_RBRACK - | 56 -> TOKEN_GREATER_RBRACE - | 57 -> TOKEN_UNDERSCORE - | 58 -> TOKEN_SEMICOLON_SEMICOLON - | 59 -> TOKEN_LARROW - | 60 -> TOKEN_EQUALS - | 61 -> TOKEN_LBRACK - | 62 -> TOKEN_LBRACK_BAR - | 63 -> TOKEN_LBRACK_LESS - | 64 -> TOKEN_LBRACE - | 65 -> TOKEN_QMARK - | 66 -> TOKEN_QMARK_QMARK - | 67 -> TOKEN_DOT - | 68 -> TOKEN_COLON - | 69 -> TOKEN_COLON_COLON - | 70 -> TOKEN_COLON_GREATER - | 71 -> TOKEN_COLON_QMARK_GREATER - | 72 -> TOKEN_COLON_QMARK - | 73 -> TOKEN_COLON_EQUALS - | 74 -> TOKEN_SEMICOLON - | 75 -> TOKEN_WHEN - | 76 -> TOKEN_WHILE - | 77 -> TOKEN_WITH - | 78 -> TOKEN_HASH - | 79 -> TOKEN_AMP - | 80 -> TOKEN_AMP_AMP - | 81 -> TOKEN_QUOTE - | 82 -> TOKEN_LPAREN - | 83 -> TOKEN_RPAREN - | 84 -> TOKEN_STAR - | 85 -> TOKEN_COMMA - | 86 -> TOKEN_RARROW - | 87 -> TOKEN_RARROW2 - | 88 -> TOKEN_GREATER_DOT - | 89 -> TOKEN_GREATER_BAR_RBRACK - | 90 -> TOKEN_LPAREN_STAR_RPAREN - | 91 -> TOKEN_OPEN - | 92 -> TOKEN_OR - | 93 -> TOKEN_REC - | 94 -> TOKEN_THEN - | 95 -> TOKEN_TO - | 96 -> TOKEN_TRUE - | 97 -> TOKEN_TRY - | 98 -> TOKEN_TYPE - | 99 -> TOKEN_VAL - | 100 -> TOKEN_INLINE - | 101 -> TOKEN_INTERFACE - | 102 -> TOKEN_INSTANCE - | 103 -> TOKEN_LAZY - | 104 -> TOKEN_MATCH - | 105 -> TOKEN_METHOD - | 106 -> TOKEN_MUTABLE - | 107 -> TOKEN_NEW - | 108 -> TOKEN_OF - | 109 -> TOKEN_EXCEPTION - | 110 -> TOKEN_FALSE - | 111 -> TOKEN_FOR - | 112 -> TOKEN_FUN - | 113 -> TOKEN_FUNCTION - | 114 -> TOKEN_IF - | 115 -> TOKEN_IN - | 116 -> TOKEN_FINALLY - | 117 -> TOKEN_DO_BANG - | 118 -> TOKEN_AND - | 119 -> TOKEN_AS - | 120 -> TOKEN_ASSERT - | 121 -> TOKEN_ASR - | 122 -> TOKEN_BEGIN - | 123 -> TOKEN_DO - | 124 -> TOKEN_DONE - | 125 -> TOKEN_DOWNTO - | 126 -> TOKEN_ELSE - | 127 -> TOKEN_ELIF - | 128 -> TOKEN_END - | 129 -> TOKEN_DOT_DOT - | 130 -> TOKEN_BAR_BAR - | 131 -> TOKEN_LESS - | 132 -> TOKEN_GREATER - | 133 -> TOKEN_UPCAST - | 134 -> TOKEN_DOWNCAST - | 135 -> TOKEN_NULL - | 136 -> TOKEN_RESERVED - | 137 -> TOKEN_MODULE - | 138 -> TOKEN_NAMESPACE - | 139 -> TOKEN_DELEGATE - | 140 -> TOKEN_CONSTRAINT - | 141 -> TOKEN_BASE - | 142 -> TOKEN_LQUOTE - | 143 -> TOKEN_RQUOTE - | 144 -> TOKEN_RQUOTE_DOT - | 145 -> TOKEN_SPLICE_SYMBOL - | 146 -> TOKEN_PERCENT_OP - | 147 -> TOKEN_BINDER - | 148 -> TOKEN_LET - | 149 -> TOKEN_YIELD - | 150 -> TOKEN_YIELD_BANG - | 151 -> TOKEN_BIGNUM - | 152 -> TOKEN_DECIMAL - | 153 -> TOKEN_CHAR - | 154 -> TOKEN_IEEE64 - | 155 -> TOKEN_IEEE32 - | 156 -> TOKEN_NATIVEINT - | 157 -> TOKEN_UNATIVEINT - | 158 -> TOKEN_UINT64 - | 159 -> TOKEN_UINT32 - | 160 -> TOKEN_UINT16 - | 161 -> TOKEN_UINT8 - | 162 -> TOKEN_INT64 - | 163 -> TOKEN_INT32 - | 164 -> TOKEN_INT32_DOT_DOT - | 165 -> TOKEN_INT16 - | 166 -> TOKEN_INT8 - | 167 -> TOKEN_FUNKY_OPERATOR_NAME - | 168 -> TOKEN_ADJACENT_PREFIX_PLUS_MINUS_OP - | 169 -> TOKEN_PLUS_MINUS_OP - | 170 -> TOKEN_INFIX_AMP_OP - | 171 -> TOKEN_INFIX_STAR_DIV_MOD_OP - | 172 -> TOKEN_PREFIX_OP - | 173 -> TOKEN_INFIX_BAR_OP - | 174 -> TOKEN_INFIX_AT_HAT_OP - | 175 -> TOKEN_INFIX_COMPARE_OP - | 176 -> TOKEN_INFIX_STAR_STAR_OP - | 177 -> TOKEN_IDENT - | 178 -> TOKEN_STRING - | 179 -> TOKEN_BYTEARRAY - | 182 -> TOKEN_end_of_input - | 180 -> TOKEN_error - | _ -> failwith "tokenTagToTokenId: bad token" - -/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production -let prodIdxToNonTerminal (prodIdx:int) = - match prodIdx with - | 0 -> NONTERM__startsignatureFile - | 1 -> NONTERM__startimplementationFile - | 2 -> NONTERM__startinteraction - | 3 -> NONTERM_interaction - | 4 -> NONTERM_interaction - | 5 -> NONTERM_interaction - | 6 -> NONTERM_hashDirective - | 7 -> NONTERM_hashDirectiveArg - | 8 -> NONTERM_hashDirectiveArgs - | 9 -> NONTERM_hashDirectiveArgs - | 10 -> NONTERM_interactiveTerminator - | 11 -> NONTERM_interactiveTerminator - | 12 -> NONTERM_interactiveItemsTerminator - | 13 -> NONTERM_interactiveItemsTerminator - | 14 -> NONTERM_interactiveItemsTerminator - | 15 -> NONTERM_interactiveItemsTerminator - | 16 -> NONTERM_interactiveItemsTerminator - | 17 -> NONTERM_interactiveItemsTerminator - | 18 -> NONTERM_interactiveItemsTerminator - | 19 -> NONTERM_interactiveModuleDefns - | 20 -> NONTERM_interactiveModuleDefns - | 21 -> NONTERM_interactiveExpr - | 22 -> NONTERM_interactiveHash - | 23 -> NONTERM_signatureFile - | 24 -> NONTERM_signatureFile - | 25 -> NONTERM_signatureFile - | 26 -> NONTERM_implementationFile - | 27 -> NONTERM_implementationFile - | 28 -> NONTERM_implementationFile - | 29 -> NONTERM_moduleIntro - | 30 -> NONTERM_namespaceIntro - | 31 -> NONTERM_fileNamespaceSpecs - | 32 -> NONTERM_fileNamespaceSpecs - | 33 -> NONTERM_fileNamespaceSpecList - | 34 -> NONTERM_fileNamespaceSpecList - | 35 -> NONTERM_fileNamespaceSpec - | 36 -> NONTERM_fileNamespaceImpls - | 37 -> NONTERM_fileNamespaceImpls - | 38 -> NONTERM_fileNamespaceImplList - | 39 -> NONTERM_fileNamespaceImplList - | 40 -> NONTERM_fileNamespaceImpl - | 41 -> NONTERM_fileModuleSpec - | 42 -> NONTERM_fileModuleSpec - | 43 -> NONTERM_fileModuleImpl - | 44 -> NONTERM_fileModuleImpl - | 45 -> NONTERM_moduleSpfnsPossiblyEmpty - | 46 -> NONTERM_moduleSpfnsPossiblyEmpty - | 47 -> NONTERM_moduleSpfnsPossiblyEmpty - | 48 -> NONTERM_moduleSpfns - | 49 -> NONTERM_moduleSpfns - | 50 -> NONTERM_moduleSpfns - | 51 -> NONTERM_moduleDefnsOrExprPossiblyEmpty - | 52 -> NONTERM_moduleDefnsOrExprPossiblyEmpty - | 53 -> NONTERM_moduleDefnsOrExpr - | 54 -> NONTERM_moduleDefnsOrExpr - | 55 -> NONTERM_moduleDefnsOrExpr - | 56 -> NONTERM_moduleDefnsOrExpr - | 57 -> NONTERM_moduleDefnsOrExpr - | 58 -> NONTERM_moduleDefns - | 59 -> NONTERM_moduleDefns - | 60 -> NONTERM_moduleDefns - | 61 -> NONTERM_moduleDefns - | 62 -> NONTERM_moduleDefns - | 63 -> NONTERM_moduleDefnOrDirective - | 64 -> NONTERM_moduleDefnOrDirective - | 65 -> NONTERM_moduleDefn - | 66 -> NONTERM_moduleDefn - | 67 -> NONTERM_moduleDefn - | 68 -> NONTERM_moduleDefn - | 69 -> NONTERM_moduleDefn - | 70 -> NONTERM_moduleDefn - | 71 -> NONTERM_moduleDefn - | 72 -> NONTERM_moduleDefn - | 73 -> NONTERM_namedModuleAbbrevBlock - | 74 -> NONTERM_namedModuleAbbrevBlock - | 75 -> NONTERM_namedModuleDefnBlock - | 76 -> NONTERM_namedModuleDefnBlock - | 77 -> NONTERM_namedModuleDefnBlock - | 78 -> NONTERM_namedModuleDefnBlock - | 79 -> NONTERM_namedModuleDefnBlock - | 80 -> NONTERM_namedModuleDefnBlock - | 81 -> NONTERM_wrappedNamedModuleDefn - | 82 -> NONTERM_wrappedNamedModuleDefn - | 83 -> NONTERM_wrappedNamedModuleDefn - | 84 -> NONTERM_opt_signature - | 85 -> NONTERM_opt_signature - | 86 -> NONTERM_opt_signature - | 87 -> NONTERM_tyconDefnAugmentation - | 88 -> NONTERM_moduleSpfn - | 89 -> NONTERM_moduleSpfn - | 90 -> NONTERM_moduleSpfn - | 91 -> NONTERM_moduleSpfn - | 92 -> NONTERM_moduleSpfn - | 93 -> NONTERM_moduleSpfn - | 94 -> NONTERM_moduleSpfn - | 95 -> NONTERM_valSpfn - | 96 -> NONTERM_opt_literalValue - | 97 -> NONTERM_opt_literalValue - | 98 -> NONTERM_moduleSpecBlock - | 99 -> NONTERM_moduleSpecBlock - | 100 -> NONTERM_moduleSpecBlock - | 101 -> NONTERM_opt_attributes - | 102 -> NONTERM_opt_attributes - | 103 -> NONTERM_attributes - | 104 -> NONTERM_attributes - | 105 -> NONTERM_attributeList - | 106 -> NONTERM_attributeListElements - | 107 -> NONTERM_attributeListElements - | 108 -> NONTERM_attribute - | 109 -> NONTERM_attribute - | 110 -> NONTERM_attributeTarget - | 111 -> NONTERM_attributeTarget - | 112 -> NONTERM_attributeTarget - | 113 -> NONTERM_attributeTarget - | 114 -> NONTERM_tyconSpfns - | 115 -> NONTERM_tyconSpfn_list - | 116 -> NONTERM_tyconSpfn_list - | 117 -> NONTERM_tyconSpfn - | 118 -> NONTERM_tyconSpfn - | 119 -> NONTERM_tyconSpfnRhsBlock - | 120 -> NONTERM_tyconSpfnRhsBlock - | 121 -> NONTERM_tyconSpfnRhs - | 122 -> NONTERM_tyconSpfnRhs - | 123 -> NONTERM_tyconSpfnRhs - | 124 -> NONTERM_tyconClassSpfn - | 125 -> NONTERM_tyconClassSpfn - | 126 -> NONTERM_tyconClassSpfn - | 127 -> NONTERM_tyconClassSpfn - | 128 -> NONTERM_classSpfnBlockKindUnspecified - | 129 -> NONTERM_classSpfnBlockKindUnspecified - | 130 -> NONTERM_classSpfnBlockKindUnspecified - | 131 -> NONTERM_classSpfnBlockKindUnspecified - | 132 -> NONTERM_classSpfnBlock - | 133 -> NONTERM_classSpfnBlock - | 134 -> NONTERM_classSpfnBlock - | 135 -> NONTERM_classSpfnMembers - | 136 -> NONTERM_classSpfnMembers - | 137 -> NONTERM_memberFlags - | 138 -> NONTERM_memberFlags - | 139 -> NONTERM_memberFlags - | 140 -> NONTERM_memberFlags - | 141 -> NONTERM_memberFlags - | 142 -> NONTERM_memberFlags - | 143 -> NONTERM_memberSpecFlags - | 144 -> NONTERM_memberSpecFlags - | 145 -> NONTERM_memberSpecFlags - | 146 -> NONTERM_classMemberSpfnGetSet - | 147 -> NONTERM_classMemberSpfnGetSet - | 148 -> NONTERM_classMemberSpfnGetSet - | 149 -> NONTERM_classMemberSpfnGetSet - | 150 -> NONTERM_classMemberSpfnGetSetElements - | 151 -> NONTERM_classMemberSpfnGetSetElements - | 152 -> NONTERM_classMemberSpfn - | 153 -> NONTERM_classMemberSpfn - | 154 -> NONTERM_classMemberSpfn - | 155 -> NONTERM_classMemberSpfn - | 156 -> NONTERM_classMemberSpfn - | 157 -> NONTERM_classMemberSpfn - | 158 -> NONTERM_classMemberSpfn - | 159 -> NONTERM_typeNameInfo - | 160 -> NONTERM_tyconDefnList - | 161 -> NONTERM_tyconDefnList - | 162 -> NONTERM_tyconDefn - | 163 -> NONTERM_tyconDefn - | 164 -> NONTERM_tyconDefn - | 165 -> NONTERM_tyconDefnRhsBlock - | 166 -> NONTERM_tyconDefnRhsBlock - | 167 -> NONTERM_tyconDefnRhs - | 168 -> NONTERM_tyconDefnRhs - | 169 -> NONTERM_tyconDefnRhs - | 170 -> NONTERM_tyconClassDefn - | 171 -> NONTERM_tyconClassDefn - | 172 -> NONTERM_tyconClassDefn - | 173 -> NONTERM_tyconClassDefn - | 174 -> NONTERM_classDefnBlockKindUnspecified - | 175 -> NONTERM_classDefnBlockKindUnspecified - | 176 -> NONTERM_classDefnBlock - | 177 -> NONTERM_classDefnBlock - | 178 -> NONTERM_classDefnBlock - | 179 -> NONTERM_classDefnMembers - | 180 -> NONTERM_classDefnMembers - | 181 -> NONTERM_classDefnMembers - | 182 -> NONTERM_classDefnMemberGetSet - | 183 -> NONTERM_classDefnMemberGetSet - | 184 -> NONTERM_classDefnMemberGetSet - | 185 -> NONTERM_classDefnMemberGetSetElements - | 186 -> NONTERM_classDefnMemberGetSetElements - | 187 -> NONTERM_classDefnMemberGetSetElement - | 188 -> NONTERM_memberCore - | 189 -> NONTERM_memberCore - | 190 -> NONTERM_abstractMemberFlags - | 191 -> NONTERM_abstractMemberFlags - | 192 -> NONTERM_classDefnMember - | 193 -> NONTERM_classDefnMember - | 194 -> NONTERM_classDefnMember - | 195 -> NONTERM_classDefnMember - | 196 -> NONTERM_classDefnMember - | 197 -> NONTERM_classDefnMember - | 198 -> NONTERM_classDefnMember - | 199 -> NONTERM_classDefnMember - | 200 -> NONTERM_classDefnMember - | 201 -> NONTERM_classDefnMember - | 202 -> NONTERM_atomicPatternLongIdent - | 203 -> NONTERM_atomicPatternLongIdent - | 204 -> NONTERM_opt_access - | 205 -> NONTERM_opt_access - | 206 -> NONTERM_access - | 207 -> NONTERM_access - | 208 -> NONTERM_access - | 209 -> NONTERM_opt_decl_visibility - | 210 -> NONTERM_opt_decl_visibility - | 211 -> NONTERM_opt_interfaceImplDefn - | 212 -> NONTERM_opt_interfaceImplDefn - | 213 -> NONTERM_opt_classDefn - | 214 -> NONTERM_opt_classDefn - | 215 -> NONTERM_opt_classSpfn - | 216 -> NONTERM_opt_classSpfn - | 217 -> NONTERM_inheritsDefn - | 218 -> NONTERM_inheritsDefn - | 219 -> NONTERM_optAsSpec - | 220 -> NONTERM_optAsSpec - | 221 -> NONTERM_asSpec - | 222 -> NONTERM_optBaseSpec - | 223 -> NONTERM_optBaseSpec - | 224 -> NONTERM_baseSpec - | 225 -> NONTERM_baseSpec - | 226 -> NONTERM_objectImplementationBlock - | 227 -> NONTERM_objectImplementationBlock - | 228 -> NONTERM_objectImplementationBlock - | 229 -> NONTERM_objectImplementationMembers - | 230 -> NONTERM_objectImplementationMembers - | 231 -> NONTERM_objectImplementationMember - | 232 -> NONTERM_objectImplementationMember - | 233 -> NONTERM_memberOrOverride - | 234 -> NONTERM_memberOrOverride - | 235 -> NONTERM_tyconDefnOrSpfnSimpleRepr - | 236 -> NONTERM_tyconDefnOrSpfnSimpleRepr - | 237 -> NONTERM_tyconDefnOrSpfnSimpleRepr - | 238 -> NONTERM_tyconDefnOrSpfnSimpleRepr - | 239 -> NONTERM_braceFieldDeclList - | 240 -> NONTERM_braceFieldDeclList - | 241 -> NONTERM_braceFieldDeclList - | 242 -> NONTERM_inlineAssemblyTyconRepr - | 243 -> NONTERM_classOrInterfaceOrStruct - | 244 -> NONTERM_classOrInterfaceOrStruct - | 245 -> NONTERM_classOrInterfaceOrStruct - | 246 -> NONTERM_interfaceMember - | 247 -> NONTERM_interfaceMember - | 248 -> NONTERM_tyconNameAndTyparDecls - | 249 -> NONTERM_tyconNameAndTyparDecls - | 250 -> NONTERM_tyconNameAndTyparDecls - | 251 -> NONTERM_prefixTyparDecls - | 252 -> NONTERM_prefixTyparDecls - | 253 -> NONTERM_prefixTyparDeclList - | 254 -> NONTERM_prefixTyparDeclList - | 255 -> NONTERM_typarDecl - | 256 -> NONTERM_postfixTyparDecls - | 257 -> NONTERM_explicitValTyparDeclsCore - | 258 -> NONTERM_explicitValTyparDeclsCore - | 259 -> NONTERM_explicitValTyparDeclsCore - | 260 -> NONTERM_explicitValTyparDeclsCore - | 261 -> NONTERM_explicitValTyparDecls - | 262 -> NONTERM_opt_explicitValTyparDecls - | 263 -> NONTERM_opt_explicitValTyparDecls - | 264 -> NONTERM_opt_explicitValTyparDecls2 - | 265 -> NONTERM_opt_explicitValTyparDecls2 - | 266 -> NONTERM_opt_typeConstraints - | 267 -> NONTERM_opt_typeConstraints - | 268 -> NONTERM_typeConstraints - | 269 -> NONTERM_typeConstraints - | 270 -> NONTERM_typeConstraint - | 271 -> NONTERM_typeConstraint - | 272 -> NONTERM_typeConstraint - | 273 -> NONTERM_typeConstraint - | 274 -> NONTERM_typeConstraint - | 275 -> NONTERM_typeConstraint - | 276 -> NONTERM_typeConstraint - | 277 -> NONTERM_typeConstraint - | 278 -> NONTERM_typeConstraint - | 279 -> NONTERM_unionRepr - | 280 -> NONTERM_unionRepr - | 281 -> NONTERM_unionRepr - | 282 -> NONTERM_barAndgrabXmlDoc - | 283 -> NONTERM_attrUnionCaseDecls - | 284 -> NONTERM_attrUnionCaseDecls - | 285 -> NONTERM_attrUnionCaseDecl - | 286 -> NONTERM_attrUnionCaseDecl - | 287 -> NONTERM_attrUnionCaseDecl - | 288 -> NONTERM_attrUnionCaseDecl - | 289 -> NONTERM_unionCaseName - | 290 -> NONTERM_unionCaseName - | 291 -> NONTERM_unionCaseName - | 292 -> NONTERM_firstUnionCaseDeclOfMany - | 293 -> NONTERM_firstUnionCaseDeclOfMany - | 294 -> NONTERM_firstUnionCaseDeclOfMany - | 295 -> NONTERM_firstUnionCaseDecl - | 296 -> NONTERM_firstUnionCaseDecl - | 297 -> NONTERM_unionCaseRepr - | 298 -> NONTERM_unionCaseRepr - | 299 -> NONTERM_unionCaseRepr - | 300 -> NONTERM_recdFieldDeclList - | 301 -> NONTERM_recdFieldDeclList - | 302 -> NONTERM_recdFieldDecl - | 303 -> NONTERM_fieldDecl - | 304 -> NONTERM_exconDefn - | 305 -> NONTERM_exconSpfn - | 306 -> NONTERM_exceptionAndGrabDoc - | 307 -> NONTERM_exconCore - | 308 -> NONTERM_exconIntro - | 309 -> NONTERM_exconIntro - | 310 -> NONTERM_exconRepr - | 311 -> NONTERM_exconRepr - | 312 -> NONTERM_openDecl - | 313 -> NONTERM_defnBindings - | 314 -> NONTERM_defnBindings - | 315 -> NONTERM_doBinding - | 316 -> NONTERM_hardwhiteLetBindings - | 317 -> NONTERM_hardwhiteDoBinding - | 318 -> NONTERM_classDefnBindings - | 319 -> NONTERM_classDefnBindings - | 320 -> NONTERM_classDefnBindings - | 321 -> NONTERM_classDefnBindings - | 322 -> NONTERM_hardwhiteDefnBindingsTerminator - | 323 -> NONTERM_hardwhiteDefnBindingsTerminator - | 324 -> NONTERM_cPrototype - | 325 -> NONTERM_cArgs - | 326 -> NONTERM_cArgs - | 327 -> NONTERM_cArgs - | 328 -> NONTERM_cMoreArgs - | 329 -> NONTERM_cMoreArgs - | 330 -> NONTERM_cArg - | 331 -> NONTERM_cArg - | 332 -> NONTERM_cType - | 333 -> NONTERM_cType - | 334 -> NONTERM_cType - | 335 -> NONTERM_cType - | 336 -> NONTERM_cType - | 337 -> NONTERM_cRetType - | 338 -> NONTERM_cRetType - | 339 -> NONTERM_localBindings - | 340 -> NONTERM_more_localBindings - | 341 -> NONTERM_more_localBindings - | 342 -> NONTERM_attr_localBinding - | 343 -> NONTERM_attr_localBinding - | 344 -> NONTERM_attr_localBinding - | 345 -> NONTERM_localBinding - | 346 -> NONTERM_localBinding - | 347 -> NONTERM_typedExprWithStaticOptimizationsBlock - | 348 -> NONTERM_typedExprWithStaticOptimizationsBlock - | 349 -> NONTERM_typedExprWithStaticOptimizationsBlock - | 350 -> NONTERM_typedExprWithStaticOptimizations - | 351 -> NONTERM_opt_staticOptimizations - | 352 -> NONTERM_opt_staticOptimizations - | 353 -> NONTERM_staticOptimization - | 354 -> NONTERM_staticOptimizationConditions - | 355 -> NONTERM_staticOptimizationConditions - | 356 -> NONTERM_staticOptimizationCondition - | 357 -> NONTERM_staticOptimizationCondition - | 358 -> NONTERM_rawconstant - | 359 -> NONTERM_rawconstant - | 360 -> NONTERM_rawconstant - | 361 -> NONTERM_rawconstant - | 362 -> NONTERM_rawconstant - | 363 -> NONTERM_rawconstant - | 364 -> NONTERM_rawconstant - | 365 -> NONTERM_rawconstant - | 366 -> NONTERM_rawconstant - | 367 -> NONTERM_rawconstant - | 368 -> NONTERM_rawconstant - | 369 -> NONTERM_rawconstant - | 370 -> NONTERM_rawconstant - | 371 -> NONTERM_rawconstant - | 372 -> NONTERM_rawconstant - | 373 -> NONTERM_rawconstant - | 374 -> NONTERM_rawconstant - | 375 -> NONTERM_constant - | 376 -> NONTERM_constant - | 377 -> NONTERM_bindingPattern - | 378 -> NONTERM_simplePattern - | 379 -> NONTERM_simplePattern - | 380 -> NONTERM_simplePattern - | 381 -> NONTERM_simplePattern - | 382 -> NONTERM_simplePatternCommaList - | 383 -> NONTERM_simplePatternCommaList - | 384 -> NONTERM_simplePatterns - | 385 -> NONTERM_simplePatterns - | 386 -> NONTERM_simplePatterns - | 387 -> NONTERM_simplePatterns - | 388 -> NONTERM_simplePatterns - | 389 -> NONTERM_headBindingPattern - | 390 -> NONTERM_headBindingPattern - | 391 -> NONTERM_headBindingPattern - | 392 -> NONTERM_headBindingPattern - | 393 -> NONTERM_headBindingPattern - | 394 -> NONTERM_headBindingPattern - | 395 -> NONTERM_tuplePatternElements - | 396 -> NONTERM_tuplePatternElements - | 397 -> NONTERM_conjPatternElements - | 398 -> NONTERM_conjPatternElements - | 399 -> NONTERM_constrPattern - | 400 -> NONTERM_constrPattern - | 401 -> NONTERM_constrPattern - | 402 -> NONTERM_constrPattern - | 403 -> NONTERM_constrPattern - | 404 -> NONTERM_atomicPatterns - | 405 -> NONTERM_atomicPatterns - | 406 -> NONTERM_atomicPatterns - | 407 -> NONTERM_atomicPattern - | 408 -> NONTERM_atomicPattern - | 409 -> NONTERM_atomicPattern - | 410 -> NONTERM_atomicPattern - | 411 -> NONTERM_atomicPattern - | 412 -> NONTERM_atomicPattern - | 413 -> NONTERM_atomicPattern - | 414 -> NONTERM_atomicPattern - | 415 -> NONTERM_atomicPattern - | 416 -> NONTERM_atomicPattern - | 417 -> NONTERM_atomicPattern - | 418 -> NONTERM_atomicPattern - | 419 -> NONTERM_atomicPattern - | 420 -> NONTERM_atomicPattern - | 421 -> NONTERM_atomicPattern - | 422 -> NONTERM_atomicPattern - | 423 -> NONTERM_parenPatternBody - | 424 -> NONTERM_parenPatternBody - | 425 -> NONTERM_parenPattern - | 426 -> NONTERM_parenPattern - | 427 -> NONTERM_parenPattern - | 428 -> NONTERM_parenPattern - | 429 -> NONTERM_parenPattern - | 430 -> NONTERM_parenPattern - | 431 -> NONTERM_parenPattern - | 432 -> NONTERM_parenPattern - | 433 -> NONTERM_parenPattern - | 434 -> NONTERM_tupleParenPatternElements - | 435 -> NONTERM_tupleParenPatternElements - | 436 -> NONTERM_conjParenPatternElements - | 437 -> NONTERM_conjParenPatternElements - | 438 -> NONTERM_recordPatternElements - | 439 -> NONTERM_recordPatternElementsAux - | 440 -> NONTERM_recordPatternElementsAux - | 441 -> NONTERM_recordPatternElement - | 442 -> NONTERM_listPatternElements - | 443 -> NONTERM_listPatternElements - | 444 -> NONTERM_listPatternElements - | 445 -> NONTERM_typedSeqExprBlock - | 446 -> NONTERM_typedSeqExprBlock - | 447 -> NONTERM_typedSeqExprBlock - | 448 -> NONTERM_declExprBlock - | 449 -> NONTERM_declExprBlock - | 450 -> NONTERM_typedSeqExprBlockR - | 451 -> NONTERM_typedSeqExprBlockR - | 452 -> NONTERM_typedSeqExpr - | 453 -> NONTERM_typedSeqExpr - | 454 -> NONTERM_typedSeqExpr - | 455 -> NONTERM_typedSeqExpr - | 456 -> NONTERM_typedSeqExpr - | 457 -> NONTERM_seqExpr - | 458 -> NONTERM_seqExpr - | 459 -> NONTERM_seqExpr - | 460 -> NONTERM_seqExpr - | 461 -> NONTERM_seqExpr - | 462 -> NONTERM_recover - | 463 -> NONTERM_recover - | 464 -> NONTERM_declExpr - | 465 -> NONTERM_declExpr - | 466 -> NONTERM_declExpr - | 467 -> NONTERM_declExpr - | 468 -> NONTERM_declExpr - | 469 -> NONTERM_declExpr - | 470 -> NONTERM_declExpr - | 471 -> NONTERM_declExpr - | 472 -> NONTERM_declExpr - | 473 -> NONTERM_declExpr - | 474 -> NONTERM_declExpr - | 475 -> NONTERM_declExpr - | 476 -> NONTERM_declExpr - | 477 -> NONTERM_declExpr - | 478 -> NONTERM_declExpr - | 479 -> NONTERM_declExpr - | 480 -> NONTERM_declExpr - | 481 -> NONTERM_declExpr - | 482 -> NONTERM_declExpr - | 483 -> NONTERM_declExpr - | 484 -> NONTERM_declExpr - | 485 -> NONTERM_declExpr - | 486 -> NONTERM_declExpr - | 487 -> NONTERM_declExpr - | 488 -> NONTERM_declExpr - | 489 -> NONTERM_declExpr - | 490 -> NONTERM_declExpr - | 491 -> NONTERM_declExpr - | 492 -> NONTERM_declExpr - | 493 -> NONTERM_declExpr - | 494 -> NONTERM_declExpr - | 495 -> NONTERM_declExpr - | 496 -> NONTERM_declExpr - | 497 -> NONTERM_declExpr - | 498 -> NONTERM_declExpr - | 499 -> NONTERM_declExpr - | 500 -> NONTERM_declExpr - | 501 -> NONTERM_declExpr - | 502 -> NONTERM_declExpr - | 503 -> NONTERM_declExpr - | 504 -> NONTERM_declExpr - | 505 -> NONTERM_declExpr - | 506 -> NONTERM_declExpr - | 507 -> NONTERM_declExpr - | 508 -> NONTERM_declExpr - | 509 -> NONTERM_declExpr - | 510 -> NONTERM_declExpr - | 511 -> NONTERM_declExpr - | 512 -> NONTERM_declExpr - | 513 -> NONTERM_declExpr - | 514 -> NONTERM_declExpr - | 515 -> NONTERM_declExpr - | 516 -> NONTERM_declExpr - | 517 -> NONTERM_declExpr - | 518 -> NONTERM_declExpr - | 519 -> NONTERM_declExpr - | 520 -> NONTERM_declExpr - | 521 -> NONTERM_declExpr - | 522 -> NONTERM_declExpr - | 523 -> NONTERM_declExpr - | 524 -> NONTERM_declExpr - | 525 -> NONTERM_declExpr - | 526 -> NONTERM_declExpr - | 527 -> NONTERM_declExpr - | 528 -> NONTERM_declExpr - | 529 -> NONTERM_declExpr - | 530 -> NONTERM_dynamicArg - | 531 -> NONTERM_dynamicArg - | 532 -> NONTERM_monadicWhenCondition - | 533 -> NONTERM_withClauses - | 534 -> NONTERM_withClauses - | 535 -> NONTERM_withClauses - | 536 -> NONTERM_withPatternClauses - | 537 -> NONTERM_withPatternClauses - | 538 -> NONTERM_withPatternClauses - | 539 -> NONTERM_withPatternClauses - | 540 -> NONTERM_patternAndGuard - | 541 -> NONTERM_patternClauses - | 542 -> NONTERM_patternClauses - | 543 -> NONTERM_patternClauses - | 544 -> NONTERM_patternClauses - | 545 -> NONTERM_patternGuard - | 546 -> NONTERM_patternGuard - | 547 -> NONTERM_patternResult - | 548 -> NONTERM_ifExprCases - | 549 -> NONTERM_ifExprThen - | 550 -> NONTERM_ifExprThen - | 551 -> NONTERM_ifExprThen - | 552 -> NONTERM_ifExprElifs - | 553 -> NONTERM_ifExprElifs - | 554 -> NONTERM_ifExprElifs - | 555 -> NONTERM_ifExprElifs - | 556 -> NONTERM_ifExprElifs - | 557 -> NONTERM_tupleExpr - | 558 -> NONTERM_tupleExpr - | 559 -> NONTERM_minusExpr - | 560 -> NONTERM_minusExpr - | 561 -> NONTERM_minusExpr - | 562 -> NONTERM_minusExpr - | 563 -> NONTERM_minusExpr - | 564 -> NONTERM_minusExpr - | 565 -> NONTERM_minusExpr - | 566 -> NONTERM_minusExpr - | 567 -> NONTERM_minusExpr - | 568 -> NONTERM_minusExpr - | 569 -> NONTERM_minusExpr - | 570 -> NONTERM_minusExpr - | 571 -> NONTERM_appExpr - | 572 -> NONTERM_appExpr - | 573 -> NONTERM_argExpr - | 574 -> NONTERM_argExpr - | 575 -> NONTERM_atomicExpr - | 576 -> NONTERM_atomicExpr - | 577 -> NONTERM_atomicExpr - | 578 -> NONTERM_atomicExpr - | 579 -> NONTERM_atomicExpr - | 580 -> NONTERM_atomicExpr - | 581 -> NONTERM_atomicExpr - | 582 -> NONTERM_atomicExpr - | 583 -> NONTERM_atomicExpr - | 584 -> NONTERM_atomicExpr - | 585 -> NONTERM_atomicExpr - | 586 -> NONTERM_atomicExpr - | 587 -> NONTERM_atomicExprQualification - | 588 -> NONTERM_atomicExprQualification - | 589 -> NONTERM_atomicExprQualification - | 590 -> NONTERM_atomicExprQualification - | 591 -> NONTERM_atomicExprQualification - | 592 -> NONTERM_atomicExprQualification - | 593 -> NONTERM_atomicExprQualification - | 594 -> NONTERM_atomicExprQualification - | 595 -> NONTERM_atomicExprQualification - | 596 -> NONTERM_atomicExprQualification - | 597 -> NONTERM_optRange - | 598 -> NONTERM_optRange - | 599 -> NONTERM_optRange - | 600 -> NONTERM_optRange - | 601 -> NONTERM_atomicExprAfterType - | 602 -> NONTERM_atomicExprAfterType - | 603 -> NONTERM_atomicExprAfterType - | 604 -> NONTERM_atomicExprAfterType - | 605 -> NONTERM_atomicExprAfterType - | 606 -> NONTERM_atomicExprAfterType - | 607 -> NONTERM_atomicExprAfterType - | 608 -> NONTERM_atomicExprAfterType - | 609 -> NONTERM_atomicExprAfterType - | 610 -> NONTERM_beginEndExpr - | 611 -> NONTERM_beginEndExpr - | 612 -> NONTERM_beginEndExpr - | 613 -> NONTERM_beginEndExpr - | 614 -> NONTERM_quoteExpr - | 615 -> NONTERM_quoteExpr - | 616 -> NONTERM_quoteExpr - | 617 -> NONTERM_arrayExpr - | 618 -> NONTERM_arrayExpr - | 619 -> NONTERM_arrayExpr - | 620 -> NONTERM_parenExpr - | 621 -> NONTERM_parenExpr - | 622 -> NONTERM_parenExpr - | 623 -> NONTERM_parenExpr - | 624 -> NONTERM_parenExprBody - | 625 -> NONTERM_parenExprBody - | 626 -> NONTERM_parenExprBody - | 627 -> NONTERM_parenExprBody - | 628 -> NONTERM_parenExprBody - | 629 -> NONTERM_staticallyKnownHeadTypars - | 630 -> NONTERM_staticallyKnownHeadTypars - | 631 -> NONTERM_braceExpr - | 632 -> NONTERM_braceExpr - | 633 -> NONTERM_braceExpr - | 634 -> NONTERM_braceExprBody - | 635 -> NONTERM_braceExprBody - | 636 -> NONTERM_braceExprBody - | 637 -> NONTERM_listExprElements - | 638 -> NONTERM_listExprElements - | 639 -> NONTERM_monadicExprInitial - | 640 -> NONTERM_monadicExprInitial - | 641 -> NONTERM_rangeSequenceExpr - | 642 -> NONTERM_rangeSequenceExpr - | 643 -> NONTERM_rangeSequenceExpr - | 644 -> NONTERM_monadicSingleLineQualifiersThenArrowThenExprR - | 645 -> NONTERM_monadicSingleLineQualifiersThenArrowThenExprR - | 646 -> NONTERM_monadicSingleLineQualifiersThenArrowThenExprR - | 647 -> NONTERM_monadicSingleLineQualifiersThenArrowThenExprR - | 648 -> NONTERM_forLoopBinder - | 649 -> NONTERM_forLoopBinder - | 650 -> NONTERM_forLoopBinder - | 651 -> NONTERM_forLoopRange - | 652 -> NONTERM_inlineAssemblyExpr - | 653 -> NONTERM_opt_curriedArgExprs - | 654 -> NONTERM_opt_curriedArgExprs - | 655 -> NONTERM_opt_atomicExprAfterType - | 656 -> NONTERM_opt_atomicExprAfterType - | 657 -> NONTERM_opt_inlineAssemblyTypeArg - | 658 -> NONTERM_opt_inlineAssemblyTypeArg - | 659 -> NONTERM_opt_inlineAssemblyReturnTypes - | 660 -> NONTERM_opt_inlineAssemblyReturnTypes - | 661 -> NONTERM_opt_inlineAssemblyReturnTypes - | 662 -> NONTERM_recdExpr - | 663 -> NONTERM_recdExpr - | 664 -> NONTERM_recdExpr - | 665 -> NONTERM_recdExpr - | 666 -> NONTERM_recdExpr - | 667 -> NONTERM_recdExprBindings - | 668 -> NONTERM_recdExprBindings - | 669 -> NONTERM_objExpr - | 670 -> NONTERM_objExpr - | 671 -> NONTERM_objExpr - | 672 -> NONTERM_objExprBaseCall - | 673 -> NONTERM_objExprBaseCall - | 674 -> NONTERM_objExprBaseCall - | 675 -> NONTERM_opt_objExprBindings - | 676 -> NONTERM_opt_objExprBindings - | 677 -> NONTERM_objExprBindings - | 678 -> NONTERM_objExprBindings - | 679 -> NONTERM_objExprBindings - | 680 -> NONTERM_objExprInterfaces - | 681 -> NONTERM_opt_objExprInterfaces - | 682 -> NONTERM_opt_objExprInterfaces - | 683 -> NONTERM_opt_objExprInterfaces - | 684 -> NONTERM_objExprInterface - | 685 -> NONTERM_direction - | 686 -> NONTERM_direction - | 687 -> NONTERM_anonLambdaExpr - | 688 -> NONTERM_anonLambdaExpr - | 689 -> NONTERM_anonLambdaExpr - | 690 -> NONTERM_anonLambdaExpr - | 691 -> NONTERM_anonLambdaExpr - | 692 -> NONTERM_anonMatchingExpr - | 693 -> NONTERM_anonMatchingExpr - | 694 -> NONTERM_anonMatchingExpr - | 695 -> NONTERM_typeWithTypeConstraints - | 696 -> NONTERM_typeWithTypeConstraints - | 697 -> NONTERM_topTypeWithTypeConstraints - | 698 -> NONTERM_topTypeWithTypeConstraints - | 699 -> NONTERM_opt_topReturnTypeWithTypeConstraints - | 700 -> NONTERM_opt_topReturnTypeWithTypeConstraints - | 701 -> NONTERM_topType - | 702 -> NONTERM_topType - | 703 -> NONTERM_topTupleType - | 704 -> NONTERM_topTupleType - | 705 -> NONTERM_topTupleTypeElements - | 706 -> NONTERM_topTupleTypeElements - | 707 -> NONTERM_topAppType - | 708 -> NONTERM_topAppType - | 709 -> NONTERM_topAppType - | 710 -> NONTERM_topAppType - | 711 -> NONTERM_topAppType - | 712 -> NONTERM_topAppType - | 713 -> NONTERM_polyType - | 714 -> NONTERM_polyType - | 715 -> NONTERM_typ - | 716 -> NONTERM_typ - | 717 -> NONTERM_tupleType - | 718 -> NONTERM_tupleType - | 719 -> NONTERM_tupleType - | 720 -> NONTERM_tupleType - | 721 -> NONTERM_tupleOrQuotTypeElements - | 722 -> NONTERM_tupleOrQuotTypeElements - | 723 -> NONTERM_tupleOrQuotTypeElements - | 724 -> NONTERM_tupleTypeElements - | 725 -> NONTERM_tupleTypeElements - | 726 -> NONTERM_appTypeCon - | 727 -> NONTERM_appTypeCon - | 728 -> NONTERM_appTypeConPower - | 729 -> NONTERM_appTypeConPower - | 730 -> NONTERM_appType - | 731 -> NONTERM_appType - | 732 -> NONTERM_appType - | 733 -> NONTERM_appType - | 734 -> NONTERM_appType - | 735 -> NONTERM_appType - | 736 -> NONTERM_appType - | 737 -> NONTERM_appType - | 738 -> NONTERM_arrayTypeSuffix - | 739 -> NONTERM_arrayTypeSuffix - | 740 -> NONTERM_arrayTypeSuffix - | 741 -> NONTERM_arrayTypeSuffix - | 742 -> NONTERM_appTypePrexifArguments - | 743 -> NONTERM_typeListElements - | 744 -> NONTERM_typeListElements - | 745 -> NONTERM_powerType - | 746 -> NONTERM_powerType - | 747 -> NONTERM_powerType - | 748 -> NONTERM_atomType - | 749 -> NONTERM_atomType - | 750 -> NONTERM_atomType - | 751 -> NONTERM_atomType - | 752 -> NONTERM_atomType - | 753 -> NONTERM_atomType - | 754 -> NONTERM_atomType - | 755 -> NONTERM_atomType - | 756 -> NONTERM_atomType - | 757 -> NONTERM_atomType - | 758 -> NONTERM_typeArgs - | 759 -> NONTERM_typeArgs - | 760 -> NONTERM_typeArgsActual - | 761 -> NONTERM_typeArgsActual - | 762 -> NONTERM_typeArgsActual - | 763 -> NONTERM_measurearg - | 764 -> NONTERM_measurearg - | 765 -> NONTERM_measureatom - | 766 -> NONTERM_measureatom - | 767 -> NONTERM_measureatom - | 768 -> NONTERM_measurepower - | 769 -> NONTERM_measurepower - | 770 -> NONTERM_measurepower - | 771 -> NONTERM_measurepower - | 772 -> NONTERM_measureseq - | 773 -> NONTERM_measureseq - | 774 -> NONTERM_measure - | 775 -> NONTERM_measure - | 776 -> NONTERM_measure - | 777 -> NONTERM_measure - | 778 -> NONTERM_typar - | 779 -> NONTERM_typar - | 780 -> NONTERM_staticallyKnownHeadTypar - | 781 -> NONTERM_ident - | 782 -> NONTERM_path - | 783 -> NONTERM_path - | 784 -> NONTERM_path - | 785 -> NONTERM_opname - | 786 -> NONTERM_opname - | 787 -> NONTERM_opname - | 788 -> NONTERM_opname - | 789 -> NONTERM_operatorName - | 790 -> NONTERM_operatorName - | 791 -> NONTERM_operatorName - | 792 -> NONTERM_operatorName - | 793 -> NONTERM_operatorName - | 794 -> NONTERM_operatorName - | 795 -> NONTERM_operatorName - | 796 -> NONTERM_operatorName - | 797 -> NONTERM_operatorName - | 798 -> NONTERM_operatorName - | 799 -> NONTERM_operatorName - | 800 -> NONTERM_operatorName - | 801 -> NONTERM_operatorName - | 802 -> NONTERM_operatorName - | 803 -> NONTERM_operatorName - | 804 -> NONTERM_operatorName - | 805 -> NONTERM_operatorName - | 806 -> NONTERM_operatorName - | 807 -> NONTERM_operatorName - | 808 -> NONTERM_operatorName - | 809 -> NONTERM_operatorName - | 810 -> NONTERM_operatorName - | 811 -> NONTERM_operatorName - | 812 -> NONTERM_operatorName - | 813 -> NONTERM_operatorName - | 814 -> NONTERM_operatorName - | 815 -> NONTERM_operatorName - | 816 -> NONTERM_barName - | 817 -> NONTERM_barNames - | 818 -> NONTERM_barNames - | 819 -> NONTERM_identop - | 820 -> NONTERM_identop - | 821 -> NONTERM_pathop - | 822 -> NONTERM_pathop - | 823 -> NONTERM_pathop - | 824 -> NONTERM_pathop - | 825 -> NONTERM_nameop - | 826 -> NONTERM_top_sep - | 827 -> NONTERM_top_sep - | 828 -> NONTERM_top_sep - | 829 -> NONTERM_top_seps - | 830 -> NONTERM_top_seps - | 831 -> NONTERM_itop_sep - | 832 -> NONTERM_itop_sep - | 833 -> NONTERM_itop_seps - | 834 -> NONTERM_itop_seps - | 835 -> NONTERM_opt_itop_seps - | 836 -> NONTERM_opt_itop_seps - | 837 -> NONTERM_opt_top_seps - | 838 -> NONTERM_opt_top_seps - | 839 -> NONTERM_seps - | 840 -> NONTERM_seps - | 841 -> NONTERM_seps - | 842 -> NONTERM_seps - | 843 -> NONTERM_decl_end - | 844 -> NONTERM_decl_end - | 845 -> NONTERM_decl_end - | 846 -> NONTERM_opt_decl_end - | 847 -> NONTERM_opt_decl_end - | 848 -> NONTERM_opt_decl_end - | 849 -> NONTERM_opt_decl_end - | 850 -> NONTERM_opt_ODECLEND - | 851 -> NONTERM_opt_ODECLEND - | 852 -> NONTERM_deprecated_opt_equals - | 853 -> NONTERM_deprecated_opt_equals - | 854 -> NONTERM_opt_OBLOCKSEP - | 855 -> NONTERM_opt_OBLOCKSEP - | 856 -> NONTERM_opt_seps - | 857 -> NONTERM_opt_seps - | 858 -> NONTERM_opt_rec - | 859 -> NONTERM_opt_rec - | 860 -> NONTERM_opt_bar - | 861 -> NONTERM_opt_bar - | 862 -> NONTERM_opt_inline - | 863 -> NONTERM_opt_inline - | 864 -> NONTERM_opt_mutable - | 865 -> NONTERM_opt_mutable - | 866 -> NONTERM_do_or_odo - | 867 -> NONTERM_do_or_odo - | 868 -> NONTERM_done_term - | 869 -> NONTERM_done_term - | 870 -> NONTERM_structOrBegin - | 871 -> NONTERM_structOrBegin - | 872 -> NONTERM_sigOrBegin - | 873 -> NONTERM_sigOrBegin - | 874 -> NONTERM_colonOrEquals - | 875 -> NONTERM_colonOrEquals - | 876 -> NONTERM_opt_HASH - | 877 -> NONTERM_opt_HIGH_PRECEDENCE_APP - | 878 -> NONTERM_opt_HIGH_PRECEDENCE_APP - | 879 -> NONTERM_opt_HIGH_PRECEDENCE_TYAPP - | 880 -> NONTERM_opt_HIGH_PRECEDENCE_TYAPP - | _ -> failwith "prodIdxToNonTerminal: bad production index" - -let _fsyacc_endOfInputTag = 182 -let _fsyacc_tagOfErrorTerminal = 180 - -// This function gets the name of a token as a string -let token_to_string (t:token) = - match t with - | HASH_IF _ -> "HASH_IF" - | HASH_ELSE _ -> "HASH_ELSE" - | HASH_ENDIF _ -> "HASH_ENDIF" - | COMMENT _ -> "COMMENT" - | WHITESPACE _ -> "WHITESPACE" - | HASH_LINE _ -> "HASH_LINE" - | HASH_LIGHT _ -> "HASH_LIGHT" - | INACTIVECODE _ -> "INACTIVECODE" - | LINE_COMMENT _ -> "LINE_COMMENT" - | STRING_TEXT _ -> "STRING_TEXT" - | EOF _ -> "EOF" - | LEX_FAILURE _ -> "LEX_FAILURE" - | ODUMMY _ -> "ODUMMY" - | OINTERFACE_MEMBER -> "OINTERFACE_MEMBER" - | OBLOCKEND -> "OBLOCKEND" - | ORIGHT_BLOCK_END -> "ORIGHT_BLOCK_END" - | ODECLEND -> "ODECLEND" - | OEND -> "OEND" - | OBLOCKSEP -> "OBLOCKSEP" - | OBLOCKBEGIN -> "OBLOCKBEGIN" - | ORESET -> "ORESET" - | OFUN -> "OFUN" - | OFUNCTION -> "OFUNCTION" - | OWITH -> "OWITH" - | OELSE -> "OELSE" - | OTHEN -> "OTHEN" - | ODO_BANG -> "ODO_BANG" - | ODO -> "ODO" - | OBINDER _ -> "OBINDER" - | OLET _ -> "OLET" - | HIGH_PRECEDENCE_TYAPP -> "HIGH_PRECEDENCE_TYAPP" - | HIGH_PRECEDENCE_APP -> "HIGH_PRECEDENCE_APP" - | EXTERN -> "EXTERN" - | VOID -> "VOID" - | PUBLIC -> "PUBLIC" - | PRIVATE -> "PRIVATE" - | INTERNAL -> "INTERNAL" - | STATIC -> "STATIC" - | MEMBER -> "MEMBER" - | CLASS -> "CLASS" - | VIRTUAL -> "VIRTUAL" - | ABSTRACT -> "ABSTRACT" - | OVERRIDE -> "OVERRIDE" - | DEFAULT -> "DEFAULT" - | CONSTRUCTOR -> "CONSTRUCTOR" - | INHERIT -> "INHERIT" - | GREATER_RBRACK -> "GREATER_RBRACK" - | STRUCT -> "STRUCT" - | SIG -> "SIG" - | BAR -> "BAR" - | RBRACK -> "RBRACK" - | RBRACE -> "RBRACE" - | MINUS -> "MINUS" - | DOLLAR -> "DOLLAR" - | LBRACE_LESS -> "LBRACE_LESS" - | BAR_RBRACK -> "BAR_RBRACK" - | GREATER_RBRACE -> "GREATER_RBRACE" - | UNDERSCORE -> "UNDERSCORE" - | SEMICOLON_SEMICOLON -> "SEMICOLON_SEMICOLON" - | LARROW -> "LARROW" - | EQUALS -> "EQUALS" - | LBRACK -> "LBRACK" - | LBRACK_BAR -> "LBRACK_BAR" - | LBRACK_LESS -> "LBRACK_LESS" - | LBRACE -> "LBRACE" - | QMARK -> "QMARK" - | QMARK_QMARK -> "QMARK_QMARK" - | DOT -> "DOT" - | COLON -> "COLON" - | COLON_COLON -> "COLON_COLON" - | COLON_GREATER -> "COLON_GREATER" - | COLON_QMARK_GREATER -> "COLON_QMARK_GREATER" - | COLON_QMARK -> "COLON_QMARK" - | COLON_EQUALS -> "COLON_EQUALS" - | SEMICOLON -> "SEMICOLON" - | WHEN -> "WHEN" - | WHILE -> "WHILE" - | WITH -> "WITH" - | HASH -> "HASH" - | AMP -> "AMP" - | AMP_AMP -> "AMP_AMP" - | QUOTE -> "QUOTE" - | LPAREN -> "LPAREN" - | RPAREN -> "RPAREN" - | STAR -> "STAR" - | COMMA -> "COMMA" - | RARROW -> "RARROW" - | RARROW2 -> "RARROW2" - | GREATER_DOT -> "GREATER_DOT" - | GREATER_BAR_RBRACK -> "GREATER_BAR_RBRACK" - | LPAREN_STAR_RPAREN -> "LPAREN_STAR_RPAREN" - | OPEN -> "OPEN" - | OR -> "OR" - | REC -> "REC" - | THEN -> "THEN" - | TO -> "TO" - | TRUE -> "TRUE" - | TRY -> "TRY" - | TYPE -> "TYPE" - | VAL -> "VAL" - | INLINE -> "INLINE" - | INTERFACE -> "INTERFACE" - | INSTANCE -> "INSTANCE" - | LAZY -> "LAZY" - | MATCH -> "MATCH" - | METHOD -> "METHOD" - | MUTABLE -> "MUTABLE" - | NEW -> "NEW" - | OF -> "OF" - | EXCEPTION -> "EXCEPTION" - | FALSE -> "FALSE" - | FOR -> "FOR" - | FUN -> "FUN" - | FUNCTION -> "FUNCTION" - | IF -> "IF" - | IN -> "IN" - | FINALLY -> "FINALLY" - | DO_BANG -> "DO_BANG" - | AND -> "AND" - | AS -> "AS" - | ASSERT -> "ASSERT" - | ASR -> "ASR" - | BEGIN -> "BEGIN" - | DO -> "DO" - | DONE -> "DONE" - | DOWNTO -> "DOWNTO" - | ELSE -> "ELSE" - | ELIF -> "ELIF" - | END -> "END" - | DOT_DOT -> "DOT_DOT" - | BAR_BAR -> "BAR_BAR" - | LESS -> "LESS" - | GREATER -> "GREATER" - | UPCAST -> "UPCAST" - | DOWNCAST -> "DOWNCAST" - | NULL -> "NULL" - | RESERVED -> "RESERVED" - | MODULE -> "MODULE" - | NAMESPACE -> "NAMESPACE" - | DELEGATE -> "DELEGATE" - | CONSTRAINT -> "CONSTRAINT" - | BASE -> "BASE" - | LQUOTE _ -> "LQUOTE" - | RQUOTE _ -> "RQUOTE" - | RQUOTE_DOT _ -> "RQUOTE_DOT" - | SPLICE_SYMBOL _ -> "SPLICE_SYMBOL" - | PERCENT_OP _ -> "PERCENT_OP" - | BINDER _ -> "BINDER" - | LET _ -> "LET" - | YIELD _ -> "YIELD" - | YIELD_BANG _ -> "YIELD_BANG" - | BIGNUM _ -> "BIGNUM" - | DECIMAL _ -> "DECIMAL" - | CHAR _ -> "CHAR" - | IEEE64 _ -> "IEEE64" - | IEEE32 _ -> "IEEE32" - | NATIVEINT _ -> "NATIVEINT" - | UNATIVEINT _ -> "UNATIVEINT" - | UINT64 _ -> "UINT64" - | UINT32 _ -> "UINT32" - | UINT16 _ -> "UINT16" - | UINT8 _ -> "UINT8" - | INT64 _ -> "INT64" - | INT32 _ -> "INT32" - | INT32_DOT_DOT _ -> "INT32_DOT_DOT" - | INT16 _ -> "INT16" - | INT8 _ -> "INT8" - | FUNKY_OPERATOR_NAME _ -> "FUNKY_OPERATOR_NAME" - | ADJACENT_PREFIX_PLUS_MINUS_OP _ -> "ADJACENT_PREFIX_PLUS_MINUS_OP" - | PLUS_MINUS_OP _ -> "PLUS_MINUS_OP" - | INFIX_AMP_OP _ -> "INFIX_AMP_OP" - | INFIX_STAR_DIV_MOD_OP _ -> "INFIX_STAR_DIV_MOD_OP" - | PREFIX_OP _ -> "PREFIX_OP" - | INFIX_BAR_OP _ -> "INFIX_BAR_OP" - | INFIX_AT_HAT_OP _ -> "INFIX_AT_HAT_OP" - | INFIX_COMPARE_OP _ -> "INFIX_COMPARE_OP" - | INFIX_STAR_STAR_OP _ -> "INFIX_STAR_STAR_OP" - | IDENT _ -> "IDENT" - | STRING _ -> "STRING" - | BYTEARRAY _ -> "BYTEARRAY" - -// This function gets the data carried by a token as an object -let _fsyacc_dataOfToken (t:token) = - match t with - | HASH_IF _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | HASH_ELSE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | HASH_ENDIF _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | COMMENT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | WHITESPACE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | HASH_LINE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | HASH_LIGHT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INACTIVECODE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | LINE_COMMENT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | STRING_TEXT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | EOF _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | LEX_FAILURE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | ODUMMY _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | OINTERFACE_MEMBER -> (null : System.Object) - | OBLOCKEND -> (null : System.Object) - | ORIGHT_BLOCK_END -> (null : System.Object) - | ODECLEND -> (null : System.Object) - | OEND -> (null : System.Object) - | OBLOCKSEP -> (null : System.Object) - | OBLOCKBEGIN -> (null : System.Object) - | ORESET -> (null : System.Object) - | OFUN -> (null : System.Object) - | OFUNCTION -> (null : System.Object) - | OWITH -> (null : System.Object) - | OELSE -> (null : System.Object) - | OTHEN -> (null : System.Object) - | ODO_BANG -> (null : System.Object) - | ODO -> (null : System.Object) - | OBINDER _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | OLET _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | HIGH_PRECEDENCE_TYAPP -> (null : System.Object) - | HIGH_PRECEDENCE_APP -> (null : System.Object) - | EXTERN -> (null : System.Object) - | VOID -> (null : System.Object) - | PUBLIC -> (null : System.Object) - | PRIVATE -> (null : System.Object) - | INTERNAL -> (null : System.Object) - | STATIC -> (null : System.Object) - | MEMBER -> (null : System.Object) - | CLASS -> (null : System.Object) - | VIRTUAL -> (null : System.Object) - | ABSTRACT -> (null : System.Object) - | OVERRIDE -> (null : System.Object) - | DEFAULT -> (null : System.Object) - | CONSTRUCTOR -> (null : System.Object) - | INHERIT -> (null : System.Object) - | GREATER_RBRACK -> (null : System.Object) - | STRUCT -> (null : System.Object) - | SIG -> (null : System.Object) - | BAR -> (null : System.Object) - | RBRACK -> (null : System.Object) - | RBRACE -> (null : System.Object) - | MINUS -> (null : System.Object) - | DOLLAR -> (null : System.Object) - | LBRACE_LESS -> (null : System.Object) - | BAR_RBRACK -> (null : System.Object) - | GREATER_RBRACE -> (null : System.Object) - | UNDERSCORE -> (null : System.Object) - | SEMICOLON_SEMICOLON -> (null : System.Object) - | LARROW -> (null : System.Object) - | EQUALS -> (null : System.Object) - | LBRACK -> (null : System.Object) - | LBRACK_BAR -> (null : System.Object) - | LBRACK_LESS -> (null : System.Object) - | LBRACE -> (null : System.Object) - | QMARK -> (null : System.Object) - | QMARK_QMARK -> (null : System.Object) - | DOT -> (null : System.Object) - | COLON -> (null : System.Object) - | COLON_COLON -> (null : System.Object) - | COLON_GREATER -> (null : System.Object) - | COLON_QMARK_GREATER -> (null : System.Object) - | COLON_QMARK -> (null : System.Object) - | COLON_EQUALS -> (null : System.Object) - | SEMICOLON -> (null : System.Object) - | WHEN -> (null : System.Object) - | WHILE -> (null : System.Object) - | WITH -> (null : System.Object) - | HASH -> (null : System.Object) - | AMP -> (null : System.Object) - | AMP_AMP -> (null : System.Object) - | QUOTE -> (null : System.Object) - | LPAREN -> (null : System.Object) - | RPAREN -> (null : System.Object) - | STAR -> (null : System.Object) - | COMMA -> (null : System.Object) - | RARROW -> (null : System.Object) - | RARROW2 -> (null : System.Object) - | GREATER_DOT -> (null : System.Object) - | GREATER_BAR_RBRACK -> (null : System.Object) - | LPAREN_STAR_RPAREN -> (null : System.Object) - | OPEN -> (null : System.Object) - | OR -> (null : System.Object) - | REC -> (null : System.Object) - | THEN -> (null : System.Object) - | TO -> (null : System.Object) - | TRUE -> (null : System.Object) - | TRY -> (null : System.Object) - | TYPE -> (null : System.Object) - | VAL -> (null : System.Object) - | INLINE -> (null : System.Object) - | INTERFACE -> (null : System.Object) - | INSTANCE -> (null : System.Object) - | LAZY -> (null : System.Object) - | MATCH -> (null : System.Object) - | METHOD -> (null : System.Object) - | MUTABLE -> (null : System.Object) - | NEW -> (null : System.Object) - | OF -> (null : System.Object) - | EXCEPTION -> (null : System.Object) - | FALSE -> (null : System.Object) - | FOR -> (null : System.Object) - | FUN -> (null : System.Object) - | FUNCTION -> (null : System.Object) - | IF -> (null : System.Object) - | IN -> (null : System.Object) - | FINALLY -> (null : System.Object) - | DO_BANG -> (null : System.Object) - | AND -> (null : System.Object) - | AS -> (null : System.Object) - | ASSERT -> (null : System.Object) - | ASR -> (null : System.Object) - | BEGIN -> (null : System.Object) - | DO -> (null : System.Object) - | DONE -> (null : System.Object) - | DOWNTO -> (null : System.Object) - | ELSE -> (null : System.Object) - | ELIF -> (null : System.Object) - | END -> (null : System.Object) - | DOT_DOT -> (null : System.Object) - | BAR_BAR -> (null : System.Object) - | LESS -> (null : System.Object) - | GREATER -> (null : System.Object) - | UPCAST -> (null : System.Object) - | DOWNCAST -> (null : System.Object) - | NULL -> (null : System.Object) - | RESERVED -> (null : System.Object) - | MODULE -> (null : System.Object) - | NAMESPACE -> (null : System.Object) - | DELEGATE -> (null : System.Object) - | CONSTRAINT -> (null : System.Object) - | BASE -> (null : System.Object) - | LQUOTE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | RQUOTE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | RQUOTE_DOT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | SPLICE_SYMBOL _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | PERCENT_OP _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | BINDER _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | LET _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | YIELD _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | YIELD_BANG _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | BIGNUM _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | DECIMAL _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | CHAR _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | IEEE64 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | IEEE32 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | NATIVEINT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | UNATIVEINT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | UINT64 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | UINT32 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | UINT16 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | UINT8 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INT64 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INT32 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INT32_DOT_DOT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INT16 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INT8 _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | FUNKY_OPERATOR_NAME _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | ADJACENT_PREFIX_PLUS_MINUS_OP _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | PLUS_MINUS_OP _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INFIX_AMP_OP _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INFIX_STAR_DIV_MOD_OP _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | PREFIX_OP _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INFIX_BAR_OP _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INFIX_AT_HAT_OP _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INFIX_COMPARE_OP _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | INFIX_STAR_STAR_OP _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | IDENT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | STRING _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | BYTEARRAY _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x -let _fsyacc_gotos = [| 0us; 65535us; 0us; 65535us; 0us; 65535us; 1us; 65535us; 4us; 5us; 22us; 65535us; 0us; 147us; 2us; 104us; 4us; 34us; 23us; 34us; 25us; 34us; 27us; 34us; 58us; 147us; 66us; 104us; 70us; 147us; 75us; 104us; 81us; 147us; 84us; 147us; 90us; 104us; 96us; 104us; 98us; 104us; 101us; 104us; 123us; 147us; 127us; 104us; 136us; 104us; 171us; 147us; 174us; 147us; 178us; 147us; 1us; 65535us; 11us; 13us; 1us; 65535us; 10us; 11us; 7us; 65535us; 4us; 16us; 17us; 18us; 19us; 20us; 21us; 22us; 23us; 16us; 25us; 16us; 27us; 16us; 4us; 65535us; 4us; 6us; 23us; 24us; 25us; 26us; 27us; 28us; 5us; 65535us; 4us; 17us; 23us; 17us; 25us; 17us; 27us; 17us; 29us; 30us; 4us; 65535us; 4us; 19us; 23us; 19us; 25us; 19us; 27us; 19us; 4us; 65535us; 4us; 21us; 23us; 21us; 25us; 21us; 27us; 21us; 1us; 65535us; 0us; 1us; 1us; 65535us; 2us; 3us; 6us; 65535us; 32us; 118us; 69us; 70us; 74us; 75us; 88us; 118us; 106us; 118us; 150us; 151us; 2us; 65535us; 56us; 57us; 64us; 65us; 1us; 65535us; 0us; 35us; 2us; 65535us; 52us; 53us; 54us; 55us; 2us; 65535us; 52us; 54us; 54us; 54us; 1us; 65535us; 2us; 41us; 2us; 65535us; 60us; 61us; 62us; 63us; 2us; 65535us; 60us; 62us; 62us; 62us; 2us; 65535us; 0us; 52us; 58us; 59us; 2us; 65535us; 2us; 60us; 66us; 67us; 5us; 65535us; 0us; 72us; 58us; 72us; 70us; 71us; 174us; 175us; 178us; 179us; 9us; 65535us; 0us; 78us; 58us; 78us; 70us; 78us; 81us; 82us; 84us; 85us; 123us; 172us; 171us; 172us; 174us; 78us; 178us; 78us; 4us; 65535us; 2us; 77us; 66us; 77us; 75us; 76us; 136us; 137us; 8us; 65535us; 2us; 86us; 66us; 86us; 75us; 86us; 90us; 91us; 98us; 99us; 101us; 102us; 127us; 130us; 136us; 86us; 9us; 65535us; 2us; 92us; 66us; 92us; 75us; 92us; 90us; 92us; 96us; 97us; 98us; 92us; 101us; 92us; 127us; 92us; 136us; 92us; 9us; 65535us; 2us; 96us; 66us; 96us; 75us; 96us; 90us; 96us; 96us; 96us; 98us; 96us; 101us; 96us; 127us; 96us; 136us; 96us; 14us; 65535us; 2us; 103us; 4us; 29us; 23us; 29us; 25us; 29us; 27us; 29us; 29us; 29us; 66us; 103us; 75us; 103us; 90us; 103us; 96us; 103us; 98us; 103us; 101us; 103us; 127us; 103us; 136us; 103us; 1us; 65535us; 152us; 153us; 1us; 65535us; 120us; 121us; 2us; 65535us; 120us; 134us; 127us; 128us; 2us; 65535us; 75us; 119us; 118us; 119us; 1us; 65535us; 115us; 116us; 9us; 65535us; 0us; 80us; 58us; 80us; 70us; 80us; 81us; 80us; 84us; 80us; 123us; 80us; 171us; 80us; 174us; 80us; 178us; 80us; 9us; 65535us; 0us; 148us; 58us; 148us; 70us; 148us; 81us; 148us; 84us; 148us; 123us; 148us; 171us; 148us; 174us; 148us; 178us; 148us; 2us; 65535us; 167us; 168us; 281us; 282us; 2us; 65535us; 141us; 142us; 152us; 154us; 83us; 65535us; 0us; 68us; 2us; 73us; 4us; 31us; 23us; 31us; 25us; 31us; 27us; 31us; 29us; 105us; 52us; 56us; 54us; 56us; 58us; 68us; 60us; 64us; 62us; 64us; 66us; 73us; 70us; 149us; 75us; 87us; 81us; 149us; 84us; 149us; 90us; 87us; 96us; 105us; 98us; 87us; 101us; 87us; 112us; 296us; 115us; 305us; 123us; 149us; 127us; 87us; 136us; 87us; 144us; 369us; 159us; 160us; 171us; 149us; 174us; 149us; 178us; 149us; 204us; 296us; 207us; 296us; 210us; 448us; 213us; 271us; 215us; 270us; 228us; 270us; 234us; 270us; 238us; 270us; 242us; 270us; 248us; 270us; 291us; 296us; 299us; 296us; 302us; 305us; 303us; 448us; 310us; 448us; 312us; 370us; 314us; 369us; 327us; 369us; 331us; 369us; 333us; 369us; 337us; 369us; 343us; 369us; 345us; 369us; 400us; 296us; 410us; 440us; 413us; 369us; 416us; 270us; 432us; 440us; 438us; 440us; 456us; 580us; 476us; 485us; 481us; 485us; 482us; 485us; 488us; 485us; 494us; 485us; 519us; 270us; 528us; 270us; 534us; 544us; 537us; 544us; 542us; 544us; 577us; 580us; 592us; 593us; 605us; 658us; 611us; 658us; 623us; 650us; 628us; 637us; 633us; 637us; 635us; 637us; 653us; 658us; 1195us; 270us; 1284us; 441us; 1286us; 658us; 118us; 65535us; 0us; 181us; 2us; 181us; 4us; 181us; 23us; 181us; 25us; 181us; 27us; 181us; 29us; 181us; 52us; 181us; 54us; 181us; 58us; 181us; 60us; 181us; 62us; 181us; 66us; 181us; 70us; 181us; 75us; 181us; 81us; 181us; 84us; 181us; 90us; 181us; 96us; 181us; 98us; 181us; 101us; 181us; 112us; 181us; 115us; 181us; 123us; 181us; 127us; 181us; 136us; 181us; 144us; 181us; 159us; 181us; 166us; 1341us; 171us; 181us; 174us; 181us; 178us; 181us; 182us; 183us; 204us; 181us; 207us; 181us; 210us; 181us; 213us; 181us; 215us; 181us; 225us; 1341us; 228us; 181us; 234us; 181us; 238us; 181us; 242us; 181us; 248us; 181us; 279us; 1341us; 291us; 181us; 294us; 1341us; 299us; 181us; 302us; 181us; 303us; 181us; 310us; 181us; 312us; 181us; 314us; 181us; 324us; 1341us; 327us; 181us; 331us; 181us; 333us; 181us; 337us; 181us; 343us; 181us; 345us; 181us; 385us; 1341us; 400us; 181us; 410us; 181us; 413us; 181us; 416us; 181us; 432us; 181us; 438us; 181us; 456us; 181us; 476us; 181us; 481us; 181us; 482us; 181us; 488us; 181us; 494us; 181us; 519us; 181us; 528us; 181us; 534us; 181us; 537us; 181us; 542us; 181us; 551us; 1341us; 577us; 181us; 592us; 181us; 605us; 181us; 611us; 181us; 623us; 181us; 628us; 181us; 633us; 181us; 635us; 181us; 653us; 181us; 716us; 716us; 717us; 716us; 719us; 716us; 764us; 806us; 767us; 806us; 779us; 806us; 801us; 806us; 806us; 806us; 807us; 806us; 811us; 806us; 812us; 806us; 813us; 806us; 814us; 806us; 821us; 806us; 823us; 806us; 903us; 806us; 1022us; 806us; 1024us; 806us; 1029us; 806us; 1036us; 806us; 1195us; 181us; 1225us; 806us; 1284us; 181us; 1286us; 181us; 1318us; 806us; 1321us; 806us; 1330us; 1341us; 1333us; 1341us; 1336us; 1341us; 1339us; 1341us; 118us; 65535us; 0us; 182us; 2us; 182us; 4us; 182us; 23us; 182us; 25us; 182us; 27us; 182us; 29us; 182us; 52us; 182us; 54us; 182us; 58us; 182us; 60us; 182us; 62us; 182us; 66us; 182us; 70us; 182us; 75us; 182us; 81us; 182us; 84us; 182us; 90us; 182us; 96us; 182us; 98us; 182us; 101us; 182us; 112us; 182us; 115us; 182us; 123us; 182us; 127us; 182us; 136us; 182us; 144us; 182us; 159us; 182us; 166us; 182us; 171us; 182us; 174us; 182us; 178us; 182us; 182us; 182us; 204us; 182us; 207us; 182us; 210us; 182us; 213us; 182us; 215us; 182us; 225us; 182us; 228us; 182us; 234us; 182us; 238us; 182us; 242us; 182us; 248us; 182us; 279us; 182us; 291us; 182us; 294us; 182us; 299us; 182us; 302us; 182us; 303us; 182us; 310us; 182us; 312us; 182us; 314us; 182us; 324us; 182us; 327us; 182us; 331us; 182us; 333us; 182us; 337us; 182us; 343us; 182us; 345us; 182us; 385us; 182us; 400us; 182us; 410us; 182us; 413us; 182us; 416us; 182us; 432us; 182us; 438us; 182us; 456us; 182us; 476us; 182us; 481us; 182us; 482us; 182us; 488us; 182us; 494us; 182us; 519us; 182us; 528us; 182us; 534us; 182us; 537us; 182us; 542us; 182us; 551us; 182us; 577us; 182us; 592us; 182us; 605us; 182us; 611us; 182us; 623us; 182us; 628us; 182us; 633us; 182us; 635us; 182us; 653us; 182us; 716us; 182us; 717us; 182us; 719us; 182us; 764us; 182us; 767us; 182us; 779us; 182us; 801us; 182us; 806us; 182us; 807us; 182us; 811us; 182us; 812us; 182us; 813us; 182us; 814us; 182us; 821us; 182us; 823us; 182us; 903us; 182us; 1022us; 182us; 1024us; 182us; 1029us; 182us; 1036us; 182us; 1195us; 182us; 1225us; 182us; 1284us; 182us; 1286us; 182us; 1318us; 182us; 1321us; 182us; 1330us; 182us; 1333us; 182us; 1336us; 182us; 1339us; 182us; 1us; 65535us; 184us; 185us; 2us; 65535us; 184us; 189us; 190us; 191us; 2us; 65535us; 184us; 195us; 190us; 195us; 2us; 65535us; 69us; 155us; 150us; 155us; 2us; 65535us; 204us; 205us; 207us; 208us; 3us; 65535us; 204us; 206us; 207us; 206us; 291us; 292us; 1us; 65535us; 210us; 211us; 2us; 65535us; 210us; 220us; 213us; 214us; 2us; 65535us; 210us; 223us; 213us; 223us; 2us; 65535us; 210us; 227us; 213us; 227us; 3us; 65535us; 228us; 229us; 238us; 239us; 416us; 417us; 8us; 65535us; 213us; 235us; 215us; 216us; 228us; 246us; 234us; 235us; 238us; 246us; 242us; 243us; 248us; 249us; 416us; 246us; 4us; 65535us; 272us; 258us; 273us; 258us; 371us; 375us; 372us; 375us; 2us; 65535us; 272us; 274us; 273us; 274us; 2us; 65535us; 280us; 281us; 386us; 387us; 2us; 65535us; 261us; 262us; 263us; 264us; 11us; 65535us; 213us; 247us; 215us; 247us; 228us; 247us; 234us; 247us; 238us; 247us; 242us; 247us; 248us; 247us; 416us; 247us; 519us; 520us; 528us; 529us; 1195us; 1196us; 6us; 65535us; 112us; 115us; 204us; 209us; 207us; 209us; 291us; 209us; 299us; 302us; 400us; 302us; 2us; 65535us; 113us; 114us; 300us; 301us; 3us; 65535us; 112us; 113us; 299us; 300us; 400us; 401us; 2us; 65535us; 303us; 304us; 310us; 311us; 3us; 65535us; 303us; 319us; 310us; 319us; 312us; 313us; 3us; 65535us; 303us; 322us; 310us; 322us; 312us; 322us; 3us; 65535us; 303us; 326us; 310us; 326us; 312us; 326us; 3us; 65535us; 144us; 145us; 327us; 328us; 413us; 414us; 10us; 65535us; 144us; 341us; 312us; 334us; 314us; 315us; 327us; 341us; 331us; 346us; 333us; 334us; 337us; 338us; 343us; 344us; 345us; 346us; 413us; 341us; 1us; 65535us; 363us; 366us; 2us; 65535us; 347us; 348us; 349us; 350us; 3us; 65535us; 347us; 353us; 349us; 353us; 354us; 355us; 2us; 65535us; 375us; 376us; 442us; 443us; 2us; 65535us; 371us; 381us; 372us; 381us; 10us; 65535us; 144us; 342us; 312us; 342us; 314us; 342us; 327us; 342us; 331us; 342us; 333us; 342us; 337us; 342us; 343us; 342us; 345us; 342us; 413us; 342us; 38us; 65535us; 356us; 746us; 361us; 746us; 394us; 774us; 662us; 746us; 737us; 746us; 738us; 746us; 742us; 746us; 743us; 746us; 744us; 746us; 745us; 746us; 747us; 774us; 749us; 774us; 754us; 774us; 756us; 774us; 764us; 746us; 767us; 746us; 779us; 746us; 801us; 746us; 806us; 746us; 807us; 746us; 811us; 746us; 812us; 746us; 813us; 746us; 814us; 746us; 821us; 746us; 823us; 746us; 903us; 746us; 928us; 746us; 934us; 746us; 1022us; 746us; 1024us; 746us; 1029us; 746us; 1036us; 746us; 1225us; 746us; 1304us; 774us; 1309us; 774us; 1318us; 746us; 1321us; 746us; 8us; 65535us; 47us; 48us; 162us; 163us; 275us; 276us; 296us; 470us; 544us; 545us; 582us; 583us; 593us; 594us; 624us; 625us; 58us; 65535us; 31us; 409us; 47us; 405us; 68us; 409us; 73us; 409us; 87us; 409us; 105us; 409us; 149us; 409us; 162us; 405us; 270us; 409us; 271us; 409us; 275us; 405us; 296us; 405us; 305us; 409us; 356us; 403us; 361us; 403us; 369us; 409us; 370us; 409us; 394us; 403us; 448us; 409us; 544us; 405us; 582us; 405us; 593us; 405us; 624us; 405us; 662us; 403us; 737us; 403us; 738us; 403us; 742us; 403us; 743us; 403us; 744us; 403us; 745us; 403us; 747us; 403us; 749us; 403us; 754us; 403us; 756us; 403us; 764us; 403us; 767us; 403us; 779us; 403us; 801us; 403us; 806us; 403us; 807us; 403us; 811us; 403us; 812us; 403us; 813us; 403us; 814us; 403us; 821us; 403us; 823us; 403us; 903us; 403us; 928us; 403us; 934us; 403us; 1022us; 403us; 1024us; 403us; 1029us; 403us; 1036us; 403us; 1225us; 403us; 1304us; 403us; 1309us; 403us; 1318us; 403us; 1321us; 403us; 12us; 65535us; 31us; 32us; 68us; 69us; 73us; 74us; 87us; 88us; 105us; 106us; 149us; 150us; 270us; 272us; 271us; 273us; 305us; 306us; 369us; 371us; 370us; 372us; 448us; 449us; 1us; 65535us; 379us; 380us; 4us; 65535us; 315us; 316us; 317us; 318us; 319us; 320us; 587us; 588us; 5us; 65535us; 209us; 212us; 216us; 217us; 218us; 219us; 220us; 221us; 589us; 590us; 2us; 65535us; 371us; 389us; 372us; 389us; 2us; 65535us; 308us; 309us; 395us; 396us; 2us; 65535us; 308us; 425us; 395us; 425us; 2us; 65535us; 420us; 421us; 423us; 424us; 3us; 65535us; 420us; 428us; 423us; 428us; 1089us; 1282us; 2us; 65535us; 410us; 411us; 1284us; 1289us; 4us; 65535us; 410us; 436us; 432us; 433us; 438us; 439us; 1284us; 436us; 4us; 65535us; 410us; 437us; 432us; 437us; 438us; 437us; 1284us; 437us; 2us; 65535us; 440us; 442us; 441us; 442us; 5us; 65535us; 210us; 222us; 213us; 222us; 303us; 321us; 310us; 321us; 312us; 321us; 6us; 65535us; 273us; 452us; 372us; 452us; 449us; 452us; 548us; 572us; 570us; 572us; 598us; 572us; 1us; 65535us; 453us; 454us; 5us; 65535us; 210us; 228us; 213us; 228us; 303us; 327us; 310us; 327us; 312us; 327us; 9us; 65535us; 272us; 283us; 273us; 283us; 371us; 378us; 372us; 378us; 1278us; 1297us; 1280us; 1297us; 1291us; 1297us; 1293us; 1297us; 1295us; 1297us; 1us; 65535us; 296us; 297us; 1us; 65535us; 470us; 472us; 3us; 65535us; 476us; 477us; 488us; 479us; 494us; 480us; 5us; 65535us; 476us; 484us; 481us; 483us; 482us; 483us; 488us; 484us; 494us; 484us; 1us; 65535us; 471us; 474us; 1us; 65535us; 494us; 495us; 4us; 65535us; 164us; 498us; 277us; 498us; 383us; 498us; 746us; 499us; 3us; 65535us; 164us; 165us; 277us; 278us; 383us; 384us; 1us; 65535us; 746us; 747us; 3us; 65535us; 297us; 298us; 479us; 489us; 495us; 496us; 3us; 65535us; 500us; 501us; 1327us; 502us; 1329us; 503us; 4us; 65535us; 500us; 506us; 504us; 505us; 1327us; 506us; 1329us; 506us; 3us; 65535us; 273us; 451us; 372us; 451us; 449us; 451us; 5us; 65535us; 273us; 534us; 372us; 534us; 449us; 534us; 536us; 537us; 541us; 542us; 3us; 65535us; 534us; 535us; 537us; 538us; 542us; 543us; 3us; 65535us; 534us; 541us; 537us; 541us; 542us; 541us; 1us; 65535us; 545us; 546us; 3us; 65535us; 273us; 536us; 372us; 536us; 449us; 536us; 3us; 65535us; 273us; 539us; 372us; 539us; 449us; 539us; 3us; 65535us; 548us; 549us; 570us; 571us; 598us; 599us; 2us; 65535us; 456us; 457us; 577us; 578us; 2us; 65535us; 456us; 576us; 577us; 576us; 5us; 65535us; 287us; 288us; 289us; 290us; 390us; 391us; 392us; 393us; 580us; 581us; 4us; 65535us; 32us; 117us; 74us; 117us; 88us; 117us; 106us; 117us; 2us; 65535us; 69us; 156us; 150us; 156us; 6us; 65535us; 32us; 592us; 69us; 592us; 74us; 592us; 88us; 592us; 106us; 592us; 150us; 592us; 6us; 65535us; 32us; 587us; 69us; 589us; 74us; 587us; 88us; 587us; 106us; 587us; 150us; 589us; 1us; 65535us; 594us; 595us; 1us; 65535us; 595us; 596us; 14us; 65535us; 2us; 122us; 4us; 122us; 23us; 122us; 25us; 122us; 27us; 122us; 29us; 122us; 66us; 122us; 75us; 122us; 90us; 122us; 96us; 122us; 98us; 122us; 101us; 122us; 127us; 122us; 136us; 122us; 110us; 65535us; 32us; 108us; 74us; 108us; 88us; 108us; 106us; 107us; 110us; 859us; 169us; 859us; 251us; 617us; 359us; 859us; 364us; 859us; 371us; 617us; 372us; 617us; 397us; 859us; 608us; 859us; 614us; 859us; 656us; 859us; 665us; 859us; 668us; 859us; 678us; 859us; 825us; 859us; 830us; 859us; 848us; 859us; 850us; 859us; 853us; 859us; 860us; 859us; 864us; 859us; 867us; 859us; 873us; 859us; 877us; 859us; 881us; 859us; 883us; 859us; 888us; 859us; 890us; 859us; 892us; 859us; 894us; 859us; 905us; 859us; 912us; 859us; 919us; 859us; 924us; 859us; 926us; 859us; 929us; 859us; 932us; 859us; 935us; 859us; 938us; 859us; 941us; 859us; 944us; 859us; 946us; 859us; 951us; 859us; 993us; 859us; 995us; 859us; 998us; 859us; 999us; 859us; 1000us; 859us; 1001us; 859us; 1002us; 859us; 1003us; 859us; 1004us; 859us; 1005us; 859us; 1006us; 859us; 1007us; 859us; 1008us; 859us; 1009us; 859us; 1010us; 859us; 1011us; 859us; 1012us; 859us; 1013us; 859us; 1014us; 859us; 1015us; 859us; 1016us; 859us; 1018us; 859us; 1021us; 859us; 1040us; 859us; 1041us; 859us; 1045us; 859us; 1047us; 859us; 1051us; 859us; 1053us; 859us; 1057us; 859us; 1059us; 859us; 1060us; 859us; 1120us; 859us; 1130us; 859us; 1137us; 859us; 1142us; 859us; 1145us; 859us; 1148us; 859us; 1151us; 859us; 1152us; 859us; 1163us; 859us; 1170us; 859us; 1171us; 859us; 1177us; 859us; 1183us; 859us; 1184us; 859us; 1185us; 859us; 1197us; 859us; 1206us; 859us; 1218us; 859us; 1219us; 859us; 1220us; 859us; 1221us; 859us; 1223us; 859us; 1232us; 859us; 1235us; 859us; 1236us; 859us; 1259us; 859us; 1264us; 859us; 1269us; 859us; 1275us; 859us; 1306us; 859us; 1311us; 859us; 7us; 65535us; 32us; 111us; 74us; 111us; 88us; 111us; 106us; 111us; 251us; 618us; 371us; 618us; 372us; 618us; 110us; 65535us; 32us; 110us; 74us; 110us; 88us; 110us; 106us; 109us; 110us; 864us; 169us; 864us; 251us; 619us; 359us; 864us; 364us; 864us; 371us; 619us; 372us; 619us; 397us; 864us; 608us; 864us; 614us; 864us; 656us; 864us; 665us; 864us; 668us; 864us; 678us; 864us; 825us; 864us; 830us; 864us; 848us; 864us; 850us; 864us; 853us; 864us; 860us; 864us; 864us; 864us; 867us; 864us; 873us; 864us; 877us; 864us; 881us; 864us; 883us; 864us; 888us; 864us; 890us; 864us; 892us; 864us; 894us; 864us; 905us; 864us; 912us; 864us; 919us; 864us; 924us; 864us; 926us; 864us; 929us; 864us; 932us; 864us; 935us; 864us; 938us; 864us; 941us; 864us; 944us; 864us; 946us; 864us; 951us; 864us; 993us; 864us; 995us; 864us; 998us; 864us; 999us; 864us; 1000us; 864us; 1001us; 864us; 1002us; 864us; 1003us; 864us; 1004us; 864us; 1005us; 864us; 1006us; 864us; 1007us; 864us; 1008us; 864us; 1009us; 864us; 1010us; 864us; 1011us; 864us; 1012us; 864us; 1013us; 864us; 1014us; 864us; 1015us; 864us; 1016us; 864us; 1018us; 864us; 1021us; 864us; 1040us; 864us; 1041us; 864us; 1045us; 864us; 1047us; 864us; 1051us; 864us; 1053us; 864us; 1057us; 864us; 1059us; 864us; 1060us; 864us; 1120us; 864us; 1130us; 864us; 1137us; 864us; 1142us; 864us; 1145us; 864us; 1148us; 864us; 1151us; 864us; 1152us; 864us; 1163us; 864us; 1170us; 864us; 1171us; 864us; 1177us; 864us; 1183us; 864us; 1184us; 864us; 1185us; 864us; 1197us; 864us; 1206us; 864us; 1218us; 864us; 1219us; 864us; 1220us; 864us; 1221us; 864us; 1223us; 864us; 1232us; 864us; 1235us; 864us; 1236us; 864us; 1259us; 864us; 1264us; 864us; 1269us; 864us; 1275us; 864us; 1306us; 864us; 1311us; 864us; 109us; 65535us; 32us; 870us; 74us; 870us; 88us; 870us; 110us; 870us; 169us; 870us; 251us; 620us; 359us; 870us; 364us; 870us; 371us; 620us; 372us; 620us; 397us; 870us; 608us; 870us; 614us; 870us; 656us; 870us; 665us; 870us; 668us; 870us; 678us; 870us; 825us; 870us; 830us; 870us; 848us; 870us; 850us; 870us; 853us; 870us; 860us; 870us; 864us; 870us; 867us; 870us; 873us; 870us; 877us; 870us; 881us; 870us; 883us; 870us; 888us; 870us; 890us; 870us; 892us; 870us; 894us; 870us; 905us; 870us; 912us; 870us; 919us; 870us; 924us; 870us; 926us; 870us; 929us; 870us; 932us; 870us; 935us; 870us; 938us; 870us; 941us; 870us; 944us; 870us; 946us; 870us; 951us; 870us; 993us; 870us; 995us; 870us; 998us; 870us; 999us; 870us; 1000us; 870us; 1001us; 870us; 1002us; 870us; 1003us; 870us; 1004us; 870us; 1005us; 870us; 1006us; 870us; 1007us; 870us; 1008us; 870us; 1009us; 870us; 1010us; 870us; 1011us; 870us; 1012us; 870us; 1013us; 870us; 1014us; 870us; 1015us; 870us; 1016us; 870us; 1018us; 870us; 1021us; 870us; 1040us; 870us; 1041us; 870us; 1045us; 870us; 1047us; 870us; 1051us; 870us; 1053us; 870us; 1057us; 870us; 1059us; 870us; 1060us; 870us; 1120us; 870us; 1130us; 870us; 1137us; 870us; 1142us; 870us; 1145us; 870us; 1148us; 870us; 1151us; 870us; 1152us; 870us; 1163us; 870us; 1170us; 870us; 1171us; 870us; 1177us; 870us; 1183us; 870us; 1184us; 870us; 1185us; 870us; 1197us; 870us; 1206us; 870us; 1218us; 870us; 1219us; 870us; 1220us; 870us; 1221us; 870us; 1223us; 870us; 1232us; 870us; 1235us; 870us; 1236us; 870us; 1259us; 870us; 1264us; 870us; 1269us; 870us; 1275us; 870us; 1306us; 870us; 1311us; 870us; 3us; 65535us; 251us; 374us; 371us; 373us; 372us; 373us; 4us; 65535us; 612us; 613us; 615us; 616us; 936us; 937us; 947us; 948us; 110us; 65535us; 32us; 607us; 74us; 607us; 88us; 607us; 106us; 607us; 110us; 607us; 169us; 607us; 251us; 607us; 359us; 607us; 364us; 607us; 371us; 607us; 372us; 607us; 397us; 607us; 608us; 607us; 614us; 607us; 656us; 607us; 665us; 607us; 668us; 607us; 678us; 607us; 825us; 607us; 830us; 607us; 848us; 607us; 850us; 607us; 853us; 607us; 860us; 607us; 864us; 607us; 867us; 607us; 873us; 607us; 877us; 607us; 881us; 607us; 883us; 607us; 888us; 607us; 890us; 607us; 892us; 607us; 894us; 607us; 905us; 607us; 912us; 607us; 919us; 607us; 924us; 607us; 926us; 607us; 929us; 607us; 932us; 607us; 935us; 607us; 938us; 607us; 941us; 607us; 944us; 607us; 946us; 607us; 951us; 607us; 993us; 607us; 995us; 607us; 998us; 607us; 999us; 607us; 1000us; 607us; 1001us; 607us; 1002us; 607us; 1003us; 607us; 1004us; 607us; 1005us; 607us; 1006us; 607us; 1007us; 607us; 1008us; 607us; 1009us; 607us; 1010us; 607us; 1011us; 607us; 1012us; 607us; 1013us; 607us; 1014us; 607us; 1015us; 607us; 1016us; 607us; 1018us; 607us; 1021us; 607us; 1040us; 607us; 1041us; 607us; 1045us; 607us; 1047us; 607us; 1051us; 607us; 1053us; 607us; 1057us; 607us; 1059us; 607us; 1060us; 607us; 1120us; 607us; 1130us; 607us; 1137us; 607us; 1142us; 607us; 1145us; 607us; 1148us; 607us; 1151us; 607us; 1152us; 607us; 1163us; 607us; 1170us; 607us; 1171us; 607us; 1177us; 607us; 1183us; 607us; 1184us; 607us; 1185us; 607us; 1197us; 607us; 1206us; 607us; 1218us; 607us; 1219us; 607us; 1220us; 607us; 1221us; 607us; 1223us; 607us; 1232us; 607us; 1235us; 607us; 1236us; 607us; 1259us; 607us; 1264us; 607us; 1269us; 607us; 1275us; 607us; 1306us; 607us; 1311us; 607us; 1us; 65535us; 628us; 629us; 1us; 65535us; 628us; 631us; 3us; 65535us; 628us; 632us; 633us; 634us; 635us; 636us; 2us; 65535us; 637us; 638us; 650us; 641us; 1us; 65535us; 623us; 624us; 4us; 65535us; 605us; 606us; 611us; 612us; 1284us; 1285us; 1286us; 1287us; 2us; 65535us; 651us; 652us; 654us; 655us; 5us; 65535us; 605us; 651us; 611us; 651us; 653us; 654us; 1284us; 651us; 1286us; 651us; 2us; 65535us; 441us; 659us; 658us; 659us; 1us; 65535us; 665us; 666us; 2us; 65535us; 665us; 672us; 668us; 669us; 1us; 65535us; 673us; 674us; 1us; 65535us; 674us; 675us; 1us; 65535us; 676us; 677us; 2us; 65535us; 676us; 682us; 680us; 681us; 175us; 65535us; 32us; 705us; 74us; 705us; 88us; 705us; 110us; 705us; 169us; 705us; 193us; 705us; 198us; 705us; 356us; 705us; 359us; 705us; 361us; 705us; 364us; 705us; 394us; 705us; 397us; 705us; 422us; 705us; 554us; 705us; 566us; 705us; 608us; 705us; 614us; 705us; 656us; 705us; 662us; 705us; 665us; 705us; 668us; 705us; 678us; 705us; 737us; 705us; 738us; 705us; 742us; 705us; 743us; 705us; 744us; 705us; 745us; 705us; 747us; 705us; 749us; 705us; 754us; 705us; 756us; 705us; 764us; 705us; 767us; 705us; 779us; 705us; 801us; 705us; 806us; 705us; 807us; 705us; 811us; 705us; 812us; 705us; 813us; 705us; 814us; 705us; 821us; 705us; 823us; 705us; 825us; 705us; 830us; 705us; 848us; 705us; 850us; 705us; 853us; 705us; 860us; 705us; 864us; 705us; 867us; 705us; 873us; 705us; 877us; 705us; 881us; 705us; 883us; 705us; 888us; 705us; 890us; 705us; 892us; 705us; 894us; 705us; 903us; 705us; 905us; 705us; 912us; 705us; 919us; 705us; 924us; 705us; 926us; 705us; 928us; 705us; 929us; 705us; 932us; 705us; 934us; 705us; 935us; 705us; 938us; 705us; 941us; 705us; 944us; 705us; 946us; 705us; 951us; 705us; 993us; 705us; 995us; 705us; 998us; 705us; 999us; 705us; 1000us; 705us; 1001us; 705us; 1002us; 705us; 1003us; 705us; 1004us; 705us; 1005us; 705us; 1006us; 705us; 1007us; 705us; 1008us; 705us; 1009us; 705us; 1010us; 705us; 1011us; 705us; 1012us; 705us; 1013us; 705us; 1014us; 705us; 1015us; 705us; 1016us; 705us; 1018us; 705us; 1021us; 705us; 1022us; 705us; 1024us; 705us; 1029us; 705us; 1036us; 705us; 1040us; 705us; 1041us; 705us; 1045us; 705us; 1047us; 705us; 1051us; 705us; 1053us; 705us; 1057us; 705us; 1059us; 705us; 1060us; 705us; 1061us; 705us; 1062us; 705us; 1064us; 705us; 1065us; 705us; 1067us; 705us; 1068us; 705us; 1070us; 705us; 1071us; 705us; 1073us; 705us; 1074us; 705us; 1076us; 705us; 1077us; 705us; 1079us; 705us; 1080us; 705us; 1086us; 705us; 1087us; 705us; 1091us; 705us; 1093us; 705us; 1095us; 705us; 1096us; 705us; 1099us; 705us; 1104us; 705us; 1107us; 705us; 1108us; 705us; 1120us; 705us; 1130us; 705us; 1137us; 705us; 1142us; 705us; 1145us; 705us; 1148us; 705us; 1151us; 705us; 1152us; 705us; 1163us; 705us; 1170us; 705us; 1171us; 705us; 1177us; 705us; 1183us; 705us; 1184us; 705us; 1185us; 705us; 1197us; 705us; 1206us; 705us; 1218us; 705us; 1219us; 705us; 1220us; 705us; 1221us; 705us; 1223us; 705us; 1225us; 705us; 1232us; 705us; 1235us; 705us; 1236us; 705us; 1240us; 705us; 1255us; 705us; 1259us; 705us; 1264us; 705us; 1269us; 705us; 1275us; 705us; 1304us; 705us; 1306us; 705us; 1309us; 705us; 1311us; 705us; 1318us; 705us; 1321us; 705us; 175us; 65535us; 32us; 1154us; 74us; 1154us; 88us; 1154us; 110us; 1154us; 169us; 1154us; 193us; 1154us; 198us; 1154us; 356us; 775us; 359us; 1154us; 361us; 775us; 364us; 1154us; 394us; 775us; 397us; 1154us; 422us; 1154us; 554us; 555us; 566us; 567us; 608us; 1154us; 614us; 1154us; 656us; 1154us; 662us; 775us; 665us; 1154us; 668us; 1154us; 678us; 1154us; 737us; 775us; 738us; 775us; 742us; 775us; 743us; 775us; 744us; 775us; 745us; 775us; 747us; 775us; 749us; 775us; 754us; 775us; 756us; 775us; 764us; 775us; 767us; 775us; 779us; 775us; 801us; 775us; 806us; 775us; 807us; 775us; 811us; 775us; 812us; 775us; 813us; 775us; 814us; 775us; 821us; 775us; 823us; 775us; 825us; 1154us; 830us; 1154us; 848us; 1154us; 850us; 1154us; 853us; 1154us; 860us; 1154us; 864us; 1154us; 867us; 1154us; 873us; 1154us; 877us; 1154us; 881us; 1154us; 883us; 1154us; 888us; 1154us; 890us; 1154us; 892us; 1154us; 894us; 1154us; 903us; 775us; 905us; 1154us; 912us; 1154us; 919us; 1154us; 924us; 1154us; 926us; 1154us; 928us; 775us; 929us; 1154us; 932us; 1154us; 934us; 775us; 935us; 1154us; 938us; 1154us; 941us; 1154us; 944us; 1154us; 946us; 1154us; 951us; 1154us; 993us; 1154us; 995us; 1154us; 998us; 1154us; 999us; 1154us; 1000us; 1154us; 1001us; 1154us; 1002us; 1154us; 1003us; 1154us; 1004us; 1154us; 1005us; 1154us; 1006us; 1154us; 1007us; 1154us; 1008us; 1154us; 1009us; 1154us; 1010us; 1154us; 1011us; 1154us; 1012us; 1154us; 1013us; 1154us; 1014us; 1154us; 1015us; 1154us; 1016us; 1154us; 1018us; 1154us; 1021us; 1154us; 1022us; 775us; 1024us; 775us; 1029us; 775us; 1036us; 775us; 1040us; 1154us; 1041us; 1154us; 1045us; 1154us; 1047us; 1154us; 1051us; 1154us; 1053us; 1154us; 1057us; 1154us; 1059us; 1154us; 1060us; 1154us; 1061us; 1154us; 1062us; 1154us; 1064us; 1154us; 1065us; 1154us; 1067us; 1154us; 1068us; 1154us; 1070us; 1154us; 1071us; 1154us; 1073us; 1154us; 1074us; 1154us; 1076us; 1154us; 1077us; 1154us; 1079us; 1154us; 1080us; 1154us; 1086us; 1154us; 1087us; 1154us; 1091us; 1154us; 1093us; 1154us; 1095us; 1154us; 1096us; 1154us; 1099us; 1154us; 1104us; 1154us; 1107us; 1154us; 1108us; 1154us; 1120us; 1154us; 1130us; 1154us; 1137us; 1154us; 1142us; 1154us; 1145us; 1154us; 1148us; 1154us; 1151us; 1154us; 1152us; 1154us; 1163us; 1154us; 1170us; 1154us; 1171us; 1154us; 1177us; 1154us; 1183us; 1154us; 1184us; 1154us; 1185us; 1154us; 1197us; 1154us; 1206us; 1154us; 1218us; 1154us; 1219us; 1154us; 1220us; 1154us; 1221us; 1154us; 1223us; 1154us; 1225us; 775us; 1232us; 1154us; 1235us; 1154us; 1236us; 1154us; 1240us; 1154us; 1255us; 1154us; 1259us; 1154us; 1264us; 1154us; 1269us; 1154us; 1275us; 1154us; 1304us; 775us; 1306us; 1154us; 1309us; 775us; 1311us; 1154us; 1318us; 775us; 1321us; 775us; 3us; 65535us; 356us; 357us; 361us; 362us; 662us; 663us; 3us; 65535us; 716us; 712us; 717us; 713us; 719us; 713us; 2us; 65535us; 717us; 718us; 719us; 720us; 1us; 65535us; 307us; 308us; 11us; 65535us; 356us; 708us; 361us; 708us; 662us; 708us; 737us; 727us; 738us; 728us; 742us; 729us; 743us; 730us; 744us; 731us; 745us; 732us; 928us; 733us; 934us; 734us; 11us; 65535us; 356us; 739us; 361us; 739us; 662us; 739us; 737us; 739us; 738us; 739us; 742us; 739us; 743us; 739us; 744us; 739us; 745us; 739us; 928us; 739us; 934us; 739us; 11us; 65535us; 356us; 740us; 361us; 740us; 662us; 740us; 737us; 740us; 738us; 740us; 742us; 740us; 743us; 740us; 744us; 740us; 745us; 740us; 928us; 740us; 934us; 740us; 31us; 65535us; 356us; 741us; 361us; 741us; 662us; 741us; 737us; 741us; 738us; 741us; 742us; 741us; 743us; 741us; 744us; 741us; 745us; 741us; 764us; 810us; 767us; 810us; 779us; 810us; 801us; 810us; 806us; 810us; 807us; 810us; 811us; 810us; 812us; 810us; 813us; 810us; 814us; 810us; 821us; 810us; 823us; 810us; 903us; 810us; 928us; 741us; 934us; 741us; 1022us; 810us; 1024us; 810us; 1029us; 810us; 1036us; 810us; 1225us; 810us; 1318us; 810us; 1321us; 810us; 6us; 65535us; 747us; 748us; 749us; 750us; 754us; 755us; 756us; 757us; 1304us; 1305us; 1309us; 1310us; 38us; 65535us; 356us; 753us; 361us; 753us; 394us; 395us; 662us; 753us; 737us; 753us; 738us; 753us; 742us; 753us; 743us; 753us; 744us; 753us; 745us; 753us; 747us; 754us; 749us; 754us; 754us; 754us; 756us; 754us; 764us; 753us; 767us; 753us; 779us; 753us; 801us; 753us; 806us; 753us; 807us; 753us; 811us; 753us; 812us; 753us; 813us; 753us; 814us; 753us; 821us; 753us; 823us; 753us; 903us; 753us; 928us; 753us; 934us; 753us; 1022us; 753us; 1024us; 753us; 1029us; 753us; 1036us; 753us; 1225us; 753us; 1304us; 754us; 1309us; 754us; 1318us; 753us; 1321us; 753us; 1us; 65535us; 779us; 780us; 20us; 65535us; 764us; 795us; 767us; 795us; 779us; 786us; 801us; 787us; 806us; 788us; 807us; 789us; 811us; 790us; 812us; 791us; 813us; 792us; 814us; 793us; 821us; 794us; 823us; 795us; 903us; 796us; 1022us; 797us; 1024us; 797us; 1029us; 797us; 1036us; 797us; 1225us; 798us; 1318us; 797us; 1321us; 797us; 20us; 65535us; 764us; 802us; 767us; 802us; 779us; 802us; 801us; 802us; 806us; 802us; 807us; 802us; 811us; 802us; 812us; 802us; 813us; 802us; 814us; 802us; 821us; 802us; 823us; 802us; 903us; 802us; 1022us; 802us; 1024us; 802us; 1029us; 802us; 1036us; 802us; 1225us; 802us; 1318us; 802us; 1321us; 802us; 20us; 65535us; 764us; 803us; 767us; 803us; 779us; 803us; 801us; 803us; 806us; 803us; 807us; 803us; 811us; 803us; 812us; 803us; 813us; 803us; 814us; 803us; 821us; 803us; 823us; 803us; 903us; 803us; 1022us; 803us; 1024us; 803us; 1029us; 803us; 1036us; 803us; 1225us; 803us; 1318us; 803us; 1321us; 803us; 1us; 65535us; 761us; 762us; 2us; 65535us; 761us; 815us; 818us; 819us; 2us; 65535us; 761us; 816us; 818us; 816us; 3us; 65535us; 764us; 765us; 767us; 768us; 823us; 824us; 22us; 65535us; 110us; 865us; 359us; 360us; 364us; 365us; 397us; 398us; 608us; 609us; 614us; 615us; 656us; 657us; 678us; 679us; 864us; 865us; 867us; 868us; 881us; 882us; 894us; 895us; 905us; 906us; 912us; 913us; 919us; 920us; 929us; 930us; 932us; 933us; 935us; 936us; 938us; 939us; 944us; 945us; 946us; 947us; 1306us; 1307us; 1us; 65535us; 995us; 996us; 6us; 65535us; 877us; 878us; 951us; 952us; 1041us; 1042us; 1221us; 1222us; 1223us; 1224us; 1311us; 1312us; 48us; 65535us; 110us; 829us; 359us; 829us; 364us; 829us; 397us; 829us; 608us; 829us; 614us; 829us; 656us; 829us; 665us; 673us; 668us; 673us; 678us; 829us; 825us; 826us; 830us; 831us; 853us; 854us; 860us; 861us; 864us; 829us; 867us; 829us; 873us; 874us; 877us; 834us; 881us; 829us; 894us; 829us; 905us; 829us; 912us; 829us; 919us; 829us; 929us; 829us; 932us; 829us; 935us; 829us; 938us; 829us; 941us; 942us; 944us; 829us; 946us; 829us; 951us; 834us; 1018us; 1019us; 1041us; 834us; 1047us; 1048us; 1053us; 1054us; 1130us; 1135us; 1137us; 1138us; 1163us; 1164us; 1170us; 1172us; 1171us; 1172us; 1183us; 1199us; 1184us; 1199us; 1185us; 1199us; 1197us; 1198us; 1221us; 834us; 1223us; 834us; 1306us; 829us; 1311us; 834us; 53us; 65535us; 110us; 836us; 359us; 836us; 364us; 836us; 397us; 836us; 608us; 836us; 614us; 836us; 656us; 836us; 665us; 836us; 668us; 836us; 678us; 836us; 825us; 836us; 830us; 836us; 848us; 849us; 850us; 851us; 853us; 836us; 860us; 836us; 864us; 836us; 867us; 836us; 873us; 836us; 877us; 836us; 881us; 836us; 894us; 836us; 905us; 836us; 912us; 836us; 919us; 836us; 929us; 836us; 932us; 836us; 935us; 836us; 938us; 836us; 941us; 836us; 944us; 836us; 946us; 836us; 951us; 836us; 1018us; 836us; 1041us; 836us; 1047us; 836us; 1053us; 836us; 1120us; 1216us; 1130us; 836us; 1137us; 836us; 1163us; 836us; 1170us; 836us; 1171us; 836us; 1177us; 1216us; 1183us; 836us; 1184us; 836us; 1185us; 836us; 1197us; 836us; 1206us; 1216us; 1221us; 836us; 1223us; 836us; 1306us; 836us; 1311us; 836us; 47us; 65535us; 130us; 132us; 137us; 139us; 229us; 231us; 235us; 237us; 239us; 241us; 243us; 245us; 328us; 330us; 334us; 335us; 338us; 339us; 433us; 435us; 457us; 459us; 612us; 622us; 615us; 622us; 669us; 671us; 719us; 726us; 720us; 723us; 779us; 785us; 780us; 782us; 826us; 828us; 874us; 876us; 878us; 880us; 883us; 887us; 884us; 886us; 893us; 900us; 895us; 897us; 904us; 908us; 913us; 915us; 936us; 622us; 947us; 622us; 1025us; 1027us; 1048us; 1050us; 1054us; 1056us; 1109us; 1128us; 1112us; 1128us; 1121us; 1123us; 1164us; 1166us; 1172us; 1174us; 1178us; 1180us; 1183us; 1190us; 1184us; 1190us; 1185us; 1190us; 1186us; 1188us; 1207us; 1209us; 1232us; 1234us; 1311us; 1316us; 1409us; 1428us; 1426us; 1428us; 106us; 65535us; 32us; 33us; 74us; 89us; 88us; 89us; 110us; 845us; 169us; 170us; 359us; 845us; 364us; 845us; 397us; 845us; 608us; 845us; 614us; 845us; 656us; 845us; 665us; 845us; 668us; 845us; 678us; 845us; 825us; 845us; 830us; 845us; 848us; 845us; 850us; 845us; 853us; 845us; 860us; 845us; 864us; 845us; 867us; 845us; 873us; 845us; 877us; 845us; 881us; 845us; 883us; 884us; 888us; 889us; 890us; 891us; 892us; 893us; 894us; 845us; 905us; 845us; 912us; 845us; 919us; 845us; 924us; 925us; 926us; 927us; 929us; 845us; 932us; 845us; 935us; 845us; 938us; 845us; 941us; 845us; 944us; 845us; 946us; 845us; 951us; 845us; 993us; 953us; 995us; 833us; 998us; 954us; 999us; 955us; 1000us; 956us; 1001us; 957us; 1002us; 958us; 1003us; 959us; 1004us; 960us; 1005us; 961us; 1006us; 962us; 1007us; 963us; 1008us; 964us; 1009us; 965us; 1010us; 966us; 1011us; 967us; 1012us; 968us; 1013us; 969us; 1014us; 970us; 1015us; 971us; 1016us; 972us; 1018us; 845us; 1021us; 973us; 1040us; 974us; 1041us; 845us; 1045us; 975us; 1047us; 845us; 1051us; 976us; 1053us; 845us; 1057us; 977us; 1059us; 978us; 1060us; 979us; 1120us; 847us; 1130us; 845us; 1137us; 846us; 1142us; 980us; 1145us; 980us; 1148us; 980us; 1151us; 981us; 1152us; 982us; 1163us; 845us; 1170us; 845us; 1171us; 845us; 1177us; 847us; 1183us; 845us; 1184us; 845us; 1185us; 845us; 1197us; 845us; 1206us; 847us; 1218us; 984us; 1219us; 985us; 1220us; 986us; 1221us; 845us; 1223us; 845us; 1232us; 983us; 1235us; 987us; 1236us; 988us; 1259us; 989us; 1264us; 990us; 1269us; 991us; 1275us; 992us; 1306us; 845us; 1311us; 845us; 1us; 65535us; 1117us; 1118us; 3us; 65535us; 949us; 1229us; 1227us; 1229us; 1230us; 1229us; 2us; 65535us; 874us; 875us; 878us; 879us; 2us; 65535us; 1022us; 1023us; 1024us; 1025us; 6us; 65535us; 1022us; 1034us; 1024us; 1034us; 1029us; 1034us; 1036us; 1034us; 1318us; 1034us; 1321us; 1034us; 6us; 65535us; 1022us; 1028us; 1024us; 1028us; 1029us; 1030us; 1036us; 1037us; 1318us; 1319us; 1321us; 1322us; 1us; 65535us; 797us; 1033us; 1us; 65535us; 1034us; 1035us; 2us; 65535us; 884us; 885us; 977us; 1058us; 2us; 65535us; 884us; 1043us; 977us; 1043us; 1us; 65535us; 1043us; 1044us; 106us; 65535us; 32us; 997us; 74us; 997us; 88us; 997us; 110us; 997us; 169us; 997us; 359us; 997us; 364us; 997us; 397us; 997us; 608us; 997us; 614us; 997us; 656us; 997us; 665us; 997us; 668us; 997us; 678us; 997us; 825us; 997us; 830us; 997us; 848us; 997us; 850us; 997us; 853us; 997us; 860us; 997us; 864us; 997us; 867us; 997us; 873us; 997us; 877us; 997us; 881us; 997us; 883us; 997us; 888us; 997us; 890us; 997us; 892us; 997us; 894us; 997us; 905us; 997us; 912us; 997us; 919us; 997us; 924us; 997us; 926us; 997us; 929us; 997us; 932us; 997us; 935us; 997us; 938us; 997us; 941us; 997us; 944us; 997us; 946us; 997us; 951us; 997us; 993us; 997us; 995us; 997us; 998us; 997us; 999us; 997us; 1000us; 997us; 1001us; 997us; 1002us; 997us; 1003us; 997us; 1004us; 997us; 1005us; 997us; 1006us; 997us; 1007us; 997us; 1008us; 997us; 1009us; 997us; 1010us; 997us; 1011us; 997us; 1012us; 997us; 1013us; 997us; 1014us; 997us; 1015us; 997us; 1016us; 997us; 1018us; 997us; 1021us; 997us; 1040us; 997us; 1041us; 997us; 1045us; 997us; 1047us; 997us; 1051us; 997us; 1053us; 997us; 1057us; 997us; 1059us; 997us; 1060us; 997us; 1120us; 997us; 1130us; 997us; 1137us; 997us; 1142us; 997us; 1145us; 997us; 1148us; 997us; 1151us; 997us; 1152us; 997us; 1163us; 997us; 1170us; 997us; 1171us; 997us; 1177us; 997us; 1183us; 997us; 1184us; 997us; 1185us; 997us; 1197us; 997us; 1206us; 997us; 1218us; 997us; 1219us; 997us; 1220us; 997us; 1221us; 997us; 1223us; 997us; 1232us; 997us; 1235us; 997us; 1236us; 997us; 1259us; 997us; 1264us; 997us; 1269us; 997us; 1275us; 997us; 1306us; 997us; 1311us; 997us; 122us; 65535us; 32us; 994us; 74us; 994us; 88us; 994us; 110us; 994us; 169us; 994us; 359us; 994us; 364us; 994us; 397us; 994us; 608us; 994us; 614us; 994us; 656us; 994us; 665us; 994us; 668us; 994us; 678us; 994us; 825us; 994us; 830us; 994us; 848us; 994us; 850us; 994us; 853us; 994us; 860us; 994us; 864us; 994us; 867us; 994us; 873us; 994us; 877us; 994us; 881us; 994us; 883us; 994us; 888us; 994us; 890us; 994us; 892us; 994us; 894us; 994us; 905us; 994us; 912us; 994us; 919us; 994us; 924us; 994us; 926us; 994us; 929us; 994us; 932us; 994us; 935us; 994us; 938us; 994us; 941us; 994us; 944us; 994us; 946us; 994us; 951us; 994us; 993us; 994us; 995us; 994us; 998us; 994us; 999us; 994us; 1000us; 994us; 1001us; 994us; 1002us; 994us; 1003us; 994us; 1004us; 994us; 1005us; 994us; 1006us; 994us; 1007us; 994us; 1008us; 994us; 1009us; 994us; 1010us; 994us; 1011us; 994us; 1012us; 994us; 1013us; 994us; 1014us; 994us; 1015us; 994us; 1016us; 994us; 1018us; 994us; 1021us; 994us; 1040us; 994us; 1041us; 994us; 1045us; 994us; 1047us; 994us; 1051us; 994us; 1053us; 994us; 1057us; 994us; 1059us; 994us; 1060us; 994us; 1061us; 1063us; 1062us; 1063us; 1064us; 1066us; 1065us; 1066us; 1067us; 1069us; 1068us; 1069us; 1070us; 1072us; 1071us; 1072us; 1073us; 1075us; 1074us; 1075us; 1076us; 1078us; 1077us; 1078us; 1079us; 1081us; 1080us; 1081us; 1091us; 1092us; 1093us; 1094us; 1120us; 994us; 1130us; 994us; 1137us; 994us; 1142us; 994us; 1145us; 994us; 1148us; 994us; 1151us; 994us; 1152us; 994us; 1163us; 994us; 1170us; 994us; 1171us; 994us; 1177us; 994us; 1183us; 994us; 1184us; 994us; 1185us; 994us; 1197us; 994us; 1206us; 994us; 1218us; 994us; 1219us; 994us; 1220us; 994us; 1221us; 994us; 1223us; 994us; 1232us; 994us; 1235us; 994us; 1236us; 994us; 1259us; 994us; 1264us; 994us; 1269us; 994us; 1275us; 994us; 1306us; 994us; 1311us; 994us; 122us; 65535us; 32us; 1095us; 74us; 1095us; 88us; 1095us; 110us; 1095us; 169us; 1095us; 359us; 1095us; 364us; 1095us; 397us; 1095us; 608us; 1095us; 614us; 1095us; 656us; 1095us; 665us; 1095us; 668us; 1095us; 678us; 1095us; 825us; 1095us; 830us; 1095us; 848us; 1095us; 850us; 1095us; 853us; 1095us; 860us; 1095us; 864us; 1095us; 867us; 1095us; 873us; 1095us; 877us; 1095us; 881us; 1095us; 883us; 1095us; 888us; 1095us; 890us; 1095us; 892us; 1095us; 894us; 1095us; 905us; 1095us; 912us; 1095us; 919us; 1095us; 924us; 1095us; 926us; 1095us; 929us; 1095us; 932us; 1095us; 935us; 1095us; 938us; 1095us; 941us; 1095us; 944us; 1095us; 946us; 1095us; 951us; 1095us; 993us; 1095us; 995us; 1095us; 998us; 1095us; 999us; 1095us; 1000us; 1095us; 1001us; 1095us; 1002us; 1095us; 1003us; 1095us; 1004us; 1095us; 1005us; 1095us; 1006us; 1095us; 1007us; 1095us; 1008us; 1095us; 1009us; 1095us; 1010us; 1095us; 1011us; 1095us; 1012us; 1095us; 1013us; 1095us; 1014us; 1095us; 1015us; 1095us; 1016us; 1095us; 1018us; 1095us; 1021us; 1095us; 1040us; 1095us; 1041us; 1095us; 1045us; 1095us; 1047us; 1095us; 1051us; 1095us; 1053us; 1095us; 1057us; 1095us; 1059us; 1095us; 1060us; 1095us; 1061us; 1095us; 1062us; 1095us; 1064us; 1095us; 1065us; 1095us; 1067us; 1095us; 1068us; 1095us; 1070us; 1095us; 1071us; 1095us; 1073us; 1095us; 1074us; 1095us; 1076us; 1095us; 1077us; 1095us; 1079us; 1095us; 1080us; 1095us; 1091us; 1095us; 1093us; 1095us; 1120us; 1095us; 1130us; 1095us; 1137us; 1095us; 1142us; 1095us; 1145us; 1095us; 1148us; 1095us; 1151us; 1095us; 1152us; 1095us; 1163us; 1095us; 1170us; 1095us; 1171us; 1095us; 1177us; 1095us; 1183us; 1095us; 1184us; 1095us; 1185us; 1095us; 1197us; 1095us; 1206us; 1096us; 1218us; 1095us; 1219us; 1095us; 1220us; 1095us; 1221us; 1095us; 1223us; 1095us; 1232us; 1095us; 1235us; 1095us; 1236us; 1095us; 1259us; 1095us; 1264us; 1095us; 1269us; 1095us; 1275us; 1095us; 1306us; 1095us; 1311us; 1095us; 3us; 65535us; 1095us; 1097us; 1096us; 1097us; 1240us; 1243us; 129us; 65535us; 32us; 1098us; 74us; 1098us; 88us; 1098us; 110us; 1098us; 169us; 1098us; 359us; 1098us; 364us; 1098us; 397us; 1098us; 608us; 1098us; 614us; 1098us; 656us; 1098us; 665us; 1098us; 668us; 1098us; 678us; 1098us; 825us; 1098us; 830us; 1098us; 848us; 1098us; 850us; 1098us; 853us; 1098us; 860us; 1098us; 864us; 1098us; 867us; 1098us; 873us; 1098us; 877us; 1098us; 881us; 1098us; 883us; 1098us; 888us; 1098us; 890us; 1098us; 892us; 1098us; 894us; 1098us; 905us; 1098us; 912us; 1098us; 919us; 1098us; 924us; 1098us; 926us; 1098us; 929us; 1098us; 932us; 1098us; 935us; 1098us; 938us; 1098us; 941us; 1098us; 944us; 1098us; 946us; 1098us; 951us; 1098us; 993us; 1098us; 995us; 1098us; 998us; 1098us; 999us; 1098us; 1000us; 1098us; 1001us; 1098us; 1002us; 1098us; 1003us; 1098us; 1004us; 1098us; 1005us; 1098us; 1006us; 1098us; 1007us; 1098us; 1008us; 1098us; 1009us; 1098us; 1010us; 1098us; 1011us; 1098us; 1012us; 1098us; 1013us; 1098us; 1014us; 1098us; 1015us; 1098us; 1016us; 1098us; 1018us; 1098us; 1021us; 1098us; 1040us; 1098us; 1041us; 1098us; 1045us; 1098us; 1047us; 1098us; 1051us; 1098us; 1053us; 1098us; 1057us; 1098us; 1059us; 1098us; 1060us; 1098us; 1061us; 1098us; 1062us; 1098us; 1064us; 1098us; 1065us; 1098us; 1067us; 1098us; 1068us; 1098us; 1070us; 1098us; 1071us; 1098us; 1073us; 1098us; 1074us; 1098us; 1076us; 1098us; 1077us; 1098us; 1079us; 1098us; 1080us; 1098us; 1091us; 1098us; 1093us; 1098us; 1095us; 1101us; 1096us; 1101us; 1099us; 1100us; 1104us; 1102us; 1107us; 1103us; 1108us; 1103us; 1120us; 1098us; 1130us; 1098us; 1137us; 1098us; 1142us; 1098us; 1145us; 1098us; 1148us; 1098us; 1151us; 1098us; 1152us; 1098us; 1163us; 1098us; 1170us; 1098us; 1171us; 1098us; 1177us; 1098us; 1183us; 1098us; 1184us; 1098us; 1185us; 1098us; 1197us; 1098us; 1206us; 1098us; 1218us; 1098us; 1219us; 1098us; 1220us; 1098us; 1221us; 1098us; 1223us; 1098us; 1232us; 1098us; 1235us; 1098us; 1236us; 1098us; 1240us; 1101us; 1259us; 1098us; 1264us; 1098us; 1269us; 1098us; 1275us; 1098us; 1306us; 1098us; 1311us; 1098us; 2us; 65535us; 1109us; 1110us; 1112us; 1113us; 4us; 65535us; 1137us; 1140us; 1142us; 1143us; 1145us; 1146us; 1148us; 1149us; 135us; 65535us; 32us; 1126us; 74us; 1126us; 88us; 1126us; 110us; 1126us; 169us; 1126us; 193us; 1244us; 198us; 1244us; 359us; 1126us; 364us; 1126us; 397us; 1126us; 422us; 423us; 608us; 1126us; 614us; 1126us; 656us; 1126us; 665us; 1126us; 668us; 1126us; 678us; 1126us; 825us; 1126us; 830us; 1126us; 848us; 1126us; 850us; 1126us; 853us; 1126us; 860us; 1126us; 864us; 1126us; 867us; 1126us; 873us; 1126us; 877us; 1126us; 881us; 1126us; 883us; 1126us; 888us; 1126us; 890us; 1126us; 892us; 1126us; 894us; 1126us; 905us; 1126us; 912us; 1126us; 919us; 1126us; 924us; 1126us; 926us; 1126us; 929us; 1126us; 932us; 1126us; 935us; 1126us; 938us; 1126us; 941us; 1126us; 944us; 1126us; 946us; 1126us; 951us; 1126us; 993us; 1126us; 995us; 1126us; 998us; 1126us; 999us; 1126us; 1000us; 1126us; 1001us; 1126us; 1002us; 1126us; 1003us; 1126us; 1004us; 1126us; 1005us; 1126us; 1006us; 1126us; 1007us; 1126us; 1008us; 1126us; 1009us; 1126us; 1010us; 1126us; 1011us; 1126us; 1012us; 1126us; 1013us; 1126us; 1014us; 1126us; 1015us; 1126us; 1016us; 1126us; 1018us; 1126us; 1021us; 1126us; 1040us; 1126us; 1041us; 1126us; 1045us; 1126us; 1047us; 1126us; 1051us; 1126us; 1053us; 1126us; 1057us; 1126us; 1059us; 1126us; 1060us; 1126us; 1061us; 1126us; 1062us; 1126us; 1064us; 1126us; 1065us; 1126us; 1067us; 1126us; 1068us; 1126us; 1070us; 1126us; 1071us; 1126us; 1073us; 1126us; 1074us; 1126us; 1076us; 1126us; 1077us; 1126us; 1079us; 1126us; 1080us; 1126us; 1086us; 1088us; 1087us; 1089us; 1091us; 1126us; 1093us; 1126us; 1095us; 1126us; 1096us; 1126us; 1099us; 1126us; 1104us; 1126us; 1107us; 1126us; 1108us; 1126us; 1120us; 1126us; 1130us; 1126us; 1137us; 1126us; 1142us; 1126us; 1145us; 1126us; 1148us; 1126us; 1151us; 1126us; 1152us; 1126us; 1163us; 1126us; 1170us; 1126us; 1171us; 1126us; 1177us; 1126us; 1183us; 1126us; 1184us; 1126us; 1185us; 1126us; 1197us; 1126us; 1206us; 1126us; 1218us; 1126us; 1219us; 1126us; 1220us; 1126us; 1221us; 1126us; 1223us; 1126us; 1232us; 1126us; 1235us; 1126us; 1236us; 1126us; 1240us; 1126us; 1255us; 1244us; 1259us; 1126us; 1264us; 1126us; 1269us; 1126us; 1275us; 1126us; 1306us; 1126us; 1311us; 1126us; 135us; 65535us; 32us; 1162us; 74us; 1162us; 88us; 1162us; 110us; 1162us; 169us; 1162us; 193us; 1162us; 198us; 1162us; 359us; 1162us; 364us; 1162us; 397us; 1162us; 422us; 1162us; 608us; 1162us; 614us; 1162us; 656us; 1162us; 665us; 1162us; 668us; 1162us; 678us; 1162us; 825us; 1162us; 830us; 1162us; 848us; 1162us; 850us; 1162us; 853us; 1162us; 860us; 1162us; 864us; 1162us; 867us; 1162us; 873us; 1162us; 877us; 1162us; 881us; 1162us; 883us; 1162us; 888us; 1162us; 890us; 1162us; 892us; 1162us; 894us; 1162us; 905us; 1162us; 912us; 1162us; 919us; 1162us; 924us; 1162us; 926us; 1162us; 929us; 1162us; 932us; 1162us; 935us; 1162us; 938us; 1162us; 941us; 1162us; 944us; 1162us; 946us; 1162us; 951us; 1162us; 993us; 1162us; 995us; 1162us; 998us; 1162us; 999us; 1162us; 1000us; 1162us; 1001us; 1162us; 1002us; 1162us; 1003us; 1162us; 1004us; 1162us; 1005us; 1162us; 1006us; 1162us; 1007us; 1162us; 1008us; 1162us; 1009us; 1162us; 1010us; 1162us; 1011us; 1162us; 1012us; 1162us; 1013us; 1162us; 1014us; 1162us; 1015us; 1162us; 1016us; 1162us; 1018us; 1162us; 1021us; 1162us; 1040us; 1162us; 1041us; 1162us; 1045us; 1162us; 1047us; 1162us; 1051us; 1162us; 1053us; 1162us; 1057us; 1162us; 1059us; 1162us; 1060us; 1162us; 1061us; 1162us; 1062us; 1162us; 1064us; 1162us; 1065us; 1162us; 1067us; 1162us; 1068us; 1162us; 1070us; 1162us; 1071us; 1162us; 1073us; 1162us; 1074us; 1162us; 1076us; 1162us; 1077us; 1162us; 1079us; 1162us; 1080us; 1162us; 1086us; 1162us; 1087us; 1162us; 1091us; 1162us; 1093us; 1162us; 1095us; 1162us; 1096us; 1162us; 1099us; 1162us; 1104us; 1162us; 1107us; 1162us; 1108us; 1162us; 1120us; 1162us; 1130us; 1162us; 1137us; 1162us; 1142us; 1162us; 1145us; 1162us; 1148us; 1162us; 1151us; 1162us; 1152us; 1162us; 1163us; 1162us; 1170us; 1162us; 1171us; 1162us; 1177us; 1162us; 1183us; 1162us; 1184us; 1162us; 1185us; 1162us; 1197us; 1162us; 1206us; 1162us; 1218us; 1162us; 1219us; 1162us; 1220us; 1162us; 1221us; 1162us; 1223us; 1162us; 1232us; 1162us; 1235us; 1162us; 1236us; 1162us; 1240us; 1162us; 1255us; 1162us; 1259us; 1162us; 1264us; 1162us; 1269us; 1162us; 1275us; 1162us; 1306us; 1162us; 1311us; 1162us; 173us; 65535us; 32us; 1160us; 74us; 1160us; 88us; 1160us; 110us; 1160us; 169us; 1160us; 193us; 1160us; 198us; 1160us; 356us; 758us; 359us; 1160us; 361us; 758us; 364us; 1160us; 394us; 758us; 397us; 1160us; 422us; 1160us; 608us; 1160us; 614us; 1160us; 656us; 1160us; 662us; 758us; 665us; 1160us; 668us; 1160us; 678us; 1160us; 737us; 758us; 738us; 758us; 742us; 758us; 743us; 758us; 744us; 758us; 745us; 758us; 747us; 758us; 749us; 758us; 754us; 758us; 756us; 758us; 764us; 758us; 767us; 758us; 779us; 758us; 801us; 758us; 806us; 758us; 807us; 758us; 811us; 758us; 812us; 758us; 813us; 758us; 814us; 758us; 821us; 758us; 823us; 758us; 825us; 1160us; 830us; 1160us; 848us; 1160us; 850us; 1160us; 853us; 1160us; 860us; 1160us; 864us; 1160us; 867us; 1160us; 873us; 1160us; 877us; 1160us; 881us; 1160us; 883us; 1160us; 888us; 1160us; 890us; 1160us; 892us; 1160us; 894us; 1160us; 903us; 758us; 905us; 1160us; 912us; 1160us; 919us; 1160us; 924us; 1160us; 926us; 1160us; 928us; 758us; 929us; 1160us; 932us; 1160us; 934us; 758us; 935us; 1160us; 938us; 1160us; 941us; 1160us; 944us; 1160us; 946us; 1160us; 951us; 1160us; 993us; 1160us; 995us; 1160us; 998us; 1160us; 999us; 1160us; 1000us; 1160us; 1001us; 1160us; 1002us; 1160us; 1003us; 1160us; 1004us; 1160us; 1005us; 1160us; 1006us; 1160us; 1007us; 1160us; 1008us; 1160us; 1009us; 1160us; 1010us; 1160us; 1011us; 1160us; 1012us; 1160us; 1013us; 1160us; 1014us; 1160us; 1015us; 1160us; 1016us; 1160us; 1018us; 1160us; 1021us; 1160us; 1022us; 758us; 1024us; 758us; 1029us; 758us; 1036us; 758us; 1040us; 1160us; 1041us; 1160us; 1045us; 1160us; 1047us; 1160us; 1051us; 1160us; 1053us; 1160us; 1057us; 1160us; 1059us; 1160us; 1060us; 1160us; 1061us; 1160us; 1062us; 1160us; 1064us; 1160us; 1065us; 1160us; 1067us; 1160us; 1068us; 1160us; 1070us; 1160us; 1071us; 1160us; 1073us; 1160us; 1074us; 1160us; 1076us; 1160us; 1077us; 1160us; 1079us; 1160us; 1080us; 1160us; 1086us; 1160us; 1087us; 1160us; 1091us; 1160us; 1093us; 1160us; 1095us; 1160us; 1096us; 1160us; 1099us; 1160us; 1104us; 1160us; 1107us; 1160us; 1108us; 1160us; 1120us; 1160us; 1130us; 1160us; 1137us; 1160us; 1142us; 1160us; 1145us; 1160us; 1148us; 1160us; 1151us; 1160us; 1152us; 1160us; 1163us; 1160us; 1170us; 1160us; 1171us; 1160us; 1177us; 1160us; 1183us; 1160us; 1184us; 1160us; 1185us; 1160us; 1197us; 1160us; 1206us; 1160us; 1218us; 1160us; 1219us; 1160us; 1220us; 1160us; 1221us; 1160us; 1223us; 1160us; 1225us; 758us; 1232us; 1160us; 1235us; 1160us; 1236us; 1160us; 1240us; 1160us; 1255us; 1160us; 1259us; 1160us; 1264us; 1160us; 1269us; 1160us; 1275us; 1160us; 1304us; 758us; 1306us; 1160us; 1309us; 758us; 1311us; 1160us; 1318us; 758us; 1321us; 758us; 135us; 65535us; 32us; 1161us; 74us; 1161us; 88us; 1161us; 110us; 1161us; 169us; 1161us; 193us; 1161us; 198us; 1161us; 359us; 1161us; 364us; 1161us; 397us; 1161us; 422us; 1161us; 608us; 1161us; 614us; 1161us; 656us; 1161us; 665us; 1161us; 668us; 1161us; 678us; 1161us; 825us; 1161us; 830us; 1161us; 848us; 1161us; 850us; 1161us; 853us; 1161us; 860us; 1161us; 864us; 1161us; 867us; 1161us; 873us; 1161us; 877us; 1161us; 881us; 1161us; 883us; 1161us; 888us; 1161us; 890us; 1161us; 892us; 1161us; 894us; 1161us; 905us; 1161us; 912us; 1161us; 919us; 1161us; 924us; 1161us; 926us; 1161us; 929us; 1161us; 932us; 1161us; 935us; 1161us; 938us; 1161us; 941us; 1161us; 944us; 1161us; 946us; 1161us; 951us; 1161us; 993us; 1161us; 995us; 1161us; 998us; 1161us; 999us; 1161us; 1000us; 1161us; 1001us; 1161us; 1002us; 1161us; 1003us; 1161us; 1004us; 1161us; 1005us; 1161us; 1006us; 1161us; 1007us; 1161us; 1008us; 1161us; 1009us; 1161us; 1010us; 1161us; 1011us; 1161us; 1012us; 1161us; 1013us; 1161us; 1014us; 1161us; 1015us; 1161us; 1016us; 1161us; 1018us; 1161us; 1021us; 1161us; 1040us; 1161us; 1041us; 1161us; 1045us; 1161us; 1047us; 1161us; 1051us; 1161us; 1053us; 1161us; 1057us; 1161us; 1059us; 1161us; 1060us; 1161us; 1061us; 1161us; 1062us; 1161us; 1064us; 1161us; 1065us; 1161us; 1067us; 1161us; 1068us; 1161us; 1070us; 1161us; 1071us; 1161us; 1073us; 1161us; 1074us; 1161us; 1076us; 1161us; 1077us; 1161us; 1079us; 1161us; 1080us; 1161us; 1086us; 1161us; 1087us; 1161us; 1091us; 1161us; 1093us; 1161us; 1095us; 1161us; 1096us; 1161us; 1099us; 1161us; 1104us; 1161us; 1107us; 1161us; 1108us; 1161us; 1120us; 1161us; 1130us; 1161us; 1137us; 1161us; 1142us; 1161us; 1145us; 1161us; 1148us; 1161us; 1151us; 1161us; 1152us; 1161us; 1163us; 1161us; 1170us; 1161us; 1171us; 1161us; 1177us; 1161us; 1183us; 1161us; 1184us; 1161us; 1185us; 1161us; 1197us; 1161us; 1206us; 1161us; 1218us; 1161us; 1219us; 1161us; 1220us; 1161us; 1221us; 1161us; 1223us; 1161us; 1232us; 1161us; 1235us; 1161us; 1236us; 1161us; 1240us; 1161us; 1255us; 1161us; 1259us; 1161us; 1264us; 1161us; 1269us; 1161us; 1275us; 1161us; 1306us; 1161us; 1311us; 1161us; 135us; 65535us; 32us; 1155us; 74us; 1155us; 88us; 1155us; 110us; 1155us; 169us; 1155us; 193us; 1155us; 198us; 1155us; 359us; 1155us; 364us; 1155us; 397us; 1155us; 422us; 1155us; 608us; 1155us; 614us; 1155us; 656us; 1155us; 665us; 1155us; 668us; 1155us; 678us; 1155us; 825us; 1155us; 830us; 1155us; 848us; 1155us; 850us; 1155us; 853us; 1155us; 860us; 1155us; 864us; 1155us; 867us; 1155us; 873us; 1155us; 877us; 1155us; 881us; 1155us; 883us; 1155us; 888us; 1155us; 890us; 1155us; 892us; 1155us; 894us; 1155us; 905us; 1155us; 912us; 1155us; 919us; 1155us; 924us; 1155us; 926us; 1155us; 929us; 1155us; 932us; 1155us; 935us; 1155us; 938us; 1155us; 941us; 1155us; 944us; 1155us; 946us; 1155us; 951us; 1155us; 993us; 1155us; 995us; 1155us; 998us; 1155us; 999us; 1155us; 1000us; 1155us; 1001us; 1155us; 1002us; 1155us; 1003us; 1155us; 1004us; 1155us; 1005us; 1155us; 1006us; 1155us; 1007us; 1155us; 1008us; 1155us; 1009us; 1155us; 1010us; 1155us; 1011us; 1155us; 1012us; 1155us; 1013us; 1155us; 1014us; 1155us; 1015us; 1155us; 1016us; 1155us; 1018us; 1155us; 1021us; 1155us; 1040us; 1155us; 1041us; 1155us; 1045us; 1155us; 1047us; 1155us; 1051us; 1155us; 1053us; 1155us; 1057us; 1155us; 1059us; 1155us; 1060us; 1155us; 1061us; 1155us; 1062us; 1155us; 1064us; 1155us; 1065us; 1155us; 1067us; 1155us; 1068us; 1155us; 1070us; 1155us; 1071us; 1155us; 1073us; 1155us; 1074us; 1155us; 1076us; 1155us; 1077us; 1155us; 1079us; 1155us; 1080us; 1155us; 1086us; 1155us; 1087us; 1155us; 1091us; 1155us; 1093us; 1155us; 1095us; 1155us; 1096us; 1155us; 1099us; 1155us; 1104us; 1155us; 1107us; 1155us; 1108us; 1155us; 1120us; 1155us; 1130us; 1155us; 1137us; 1155us; 1142us; 1155us; 1145us; 1155us; 1148us; 1155us; 1151us; 1155us; 1152us; 1155us; 1163us; 1155us; 1170us; 1155us; 1171us; 1155us; 1177us; 1155us; 1183us; 1155us; 1184us; 1155us; 1185us; 1155us; 1197us; 1155us; 1206us; 1155us; 1218us; 1155us; 1219us; 1155us; 1220us; 1155us; 1221us; 1155us; 1223us; 1155us; 1232us; 1155us; 1235us; 1155us; 1236us; 1155us; 1240us; 1155us; 1255us; 1155us; 1259us; 1155us; 1264us; 1155us; 1269us; 1155us; 1275us; 1155us; 1306us; 1155us; 1311us; 1155us; 3us; 65535us; 1183us; 1186us; 1184us; 1186us; 1185us; 1186us; 3us; 65535us; 1183us; 1193us; 1184us; 1193us; 1185us; 1193us; 135us; 65535us; 32us; 1156us; 74us; 1156us; 88us; 1156us; 110us; 1156us; 169us; 1156us; 193us; 1156us; 198us; 1156us; 359us; 1156us; 364us; 1156us; 397us; 1156us; 422us; 1156us; 608us; 1156us; 614us; 1156us; 656us; 1156us; 665us; 1156us; 668us; 1156us; 678us; 1156us; 825us; 1156us; 830us; 1156us; 848us; 1156us; 850us; 1156us; 853us; 1156us; 860us; 1156us; 864us; 1156us; 867us; 1156us; 873us; 1156us; 877us; 1156us; 881us; 1156us; 883us; 1156us; 888us; 1156us; 890us; 1156us; 892us; 1156us; 894us; 1156us; 905us; 1156us; 912us; 1156us; 919us; 1156us; 924us; 1156us; 926us; 1156us; 929us; 1156us; 932us; 1156us; 935us; 1156us; 938us; 1156us; 941us; 1156us; 944us; 1156us; 946us; 1156us; 951us; 1156us; 993us; 1156us; 995us; 1156us; 998us; 1156us; 999us; 1156us; 1000us; 1156us; 1001us; 1156us; 1002us; 1156us; 1003us; 1156us; 1004us; 1156us; 1005us; 1156us; 1006us; 1156us; 1007us; 1156us; 1008us; 1156us; 1009us; 1156us; 1010us; 1156us; 1011us; 1156us; 1012us; 1156us; 1013us; 1156us; 1014us; 1156us; 1015us; 1156us; 1016us; 1156us; 1018us; 1156us; 1021us; 1156us; 1040us; 1156us; 1041us; 1156us; 1045us; 1156us; 1047us; 1156us; 1051us; 1156us; 1053us; 1156us; 1057us; 1156us; 1059us; 1156us; 1060us; 1156us; 1061us; 1156us; 1062us; 1156us; 1064us; 1156us; 1065us; 1156us; 1067us; 1156us; 1068us; 1156us; 1070us; 1156us; 1071us; 1156us; 1073us; 1156us; 1074us; 1156us; 1076us; 1156us; 1077us; 1156us; 1079us; 1156us; 1080us; 1156us; 1086us; 1156us; 1087us; 1156us; 1091us; 1156us; 1093us; 1156us; 1095us; 1156us; 1096us; 1156us; 1099us; 1156us; 1104us; 1156us; 1107us; 1156us; 1108us; 1156us; 1120us; 1156us; 1130us; 1156us; 1137us; 1156us; 1142us; 1156us; 1145us; 1156us; 1148us; 1156us; 1151us; 1156us; 1152us; 1156us; 1163us; 1156us; 1170us; 1156us; 1171us; 1156us; 1177us; 1156us; 1183us; 1156us; 1184us; 1156us; 1185us; 1156us; 1197us; 1156us; 1206us; 1156us; 1218us; 1156us; 1219us; 1156us; 1220us; 1156us; 1221us; 1156us; 1223us; 1156us; 1232us; 1156us; 1235us; 1156us; 1236us; 1156us; 1240us; 1156us; 1255us; 1156us; 1259us; 1156us; 1264us; 1156us; 1269us; 1156us; 1275us; 1156us; 1306us; 1156us; 1311us; 1156us; 1us; 65535us; 1206us; 1207us; 2us; 65535us; 1120us; 1121us; 1177us; 1178us; 3us; 65535us; 1120us; 1215us; 1177us; 1215us; 1206us; 1214us; 4us; 65535us; 1120us; 1217us; 1177us; 1217us; 1206us; 1217us; 1232us; 1233us; 3us; 65535us; 949us; 950us; 1227us; 1228us; 1230us; 1231us; 2us; 65535us; 903us; 904us; 1225us; 1226us; 1us; 65535us; 903us; 911us; 3us; 65535us; 1183us; 1200us; 1184us; 1200us; 1185us; 1200us; 1us; 65535us; 1239us; 1240us; 3us; 65535us; 193us; 194us; 198us; 199us; 1255us; 1256us; 1us; 65535us; 1238us; 1239us; 1us; 65535us; 1240us; 1241us; 1us; 65535us; 1206us; 1212us; 4us; 65535us; 989us; 1260us; 990us; 1265us; 991us; 1270us; 1256us; 1257us; 1us; 65535us; 1206us; 1213us; 1us; 65535us; 1206us; 1276us; 1us; 65535us; 1298us; 1299us; 2us; 65535us; 1276us; 1277us; 1298us; 1283us; 1us; 65535us; 1280us; 1281us; 4us; 65535us; 1278us; 1279us; 1291us; 1292us; 1293us; 1294us; 1295us; 1296us; 5us; 65535us; 1278us; 1293us; 1280us; 1291us; 1291us; 1293us; 1293us; 1293us; 1295us; 1293us; 1us; 65535us; 987us; 1236us; 106us; 65535us; 32us; 872us; 74us; 872us; 88us; 872us; 110us; 872us; 169us; 872us; 359us; 872us; 364us; 872us; 397us; 872us; 608us; 872us; 614us; 872us; 656us; 872us; 665us; 872us; 668us; 872us; 678us; 872us; 825us; 872us; 830us; 872us; 848us; 872us; 850us; 872us; 853us; 872us; 860us; 872us; 864us; 872us; 867us; 872us; 873us; 872us; 877us; 872us; 881us; 872us; 883us; 872us; 888us; 872us; 890us; 872us; 892us; 872us; 894us; 872us; 905us; 872us; 912us; 872us; 919us; 872us; 924us; 872us; 926us; 872us; 929us; 872us; 932us; 872us; 935us; 872us; 938us; 872us; 941us; 872us; 944us; 872us; 946us; 872us; 951us; 872us; 993us; 872us; 995us; 872us; 998us; 872us; 999us; 872us; 1000us; 872us; 1001us; 872us; 1002us; 872us; 1003us; 872us; 1004us; 872us; 1005us; 872us; 1006us; 872us; 1007us; 872us; 1008us; 872us; 1009us; 872us; 1010us; 872us; 1011us; 872us; 1012us; 872us; 1013us; 872us; 1014us; 872us; 1015us; 872us; 1016us; 872us; 1018us; 872us; 1021us; 872us; 1040us; 872us; 1041us; 872us; 1045us; 872us; 1047us; 872us; 1051us; 872us; 1053us; 872us; 1057us; 872us; 1059us; 872us; 1060us; 872us; 1120us; 872us; 1130us; 872us; 1137us; 872us; 1142us; 872us; 1145us; 872us; 1148us; 872us; 1151us; 872us; 1152us; 872us; 1163us; 872us; 1170us; 872us; 1171us; 872us; 1177us; 872us; 1183us; 872us; 1184us; 872us; 1185us; 872us; 1197us; 872us; 1206us; 872us; 1218us; 872us; 1219us; 872us; 1220us; 872us; 1221us; 872us; 1223us; 872us; 1232us; 872us; 1235us; 872us; 1236us; 872us; 1259us; 872us; 1264us; 872us; 1269us; 872us; 1275us; 872us; 1306us; 872us; 1311us; 872us; 106us; 65535us; 32us; 871us; 74us; 871us; 88us; 871us; 110us; 871us; 169us; 871us; 359us; 871us; 364us; 871us; 397us; 871us; 608us; 871us; 614us; 871us; 656us; 871us; 665us; 871us; 668us; 871us; 678us; 871us; 825us; 871us; 830us; 871us; 848us; 871us; 850us; 871us; 853us; 871us; 860us; 871us; 864us; 871us; 867us; 871us; 873us; 871us; 877us; 871us; 881us; 871us; 883us; 871us; 888us; 871us; 890us; 871us; 892us; 871us; 894us; 871us; 905us; 871us; 912us; 871us; 919us; 871us; 924us; 871us; 926us; 871us; 929us; 871us; 932us; 871us; 935us; 871us; 938us; 871us; 941us; 871us; 944us; 871us; 946us; 871us; 951us; 871us; 993us; 871us; 995us; 871us; 998us; 871us; 999us; 871us; 1000us; 871us; 1001us; 871us; 1002us; 871us; 1003us; 871us; 1004us; 871us; 1005us; 871us; 1006us; 871us; 1007us; 871us; 1008us; 871us; 1009us; 871us; 1010us; 871us; 1011us; 871us; 1012us; 871us; 1013us; 871us; 1014us; 871us; 1015us; 871us; 1016us; 871us; 1018us; 871us; 1021us; 871us; 1040us; 871us; 1041us; 871us; 1045us; 871us; 1047us; 871us; 1051us; 871us; 1053us; 871us; 1057us; 871us; 1059us; 871us; 1060us; 871us; 1120us; 871us; 1130us; 871us; 1137us; 871us; 1142us; 871us; 1145us; 871us; 1148us; 871us; 1151us; 871us; 1152us; 871us; 1163us; 871us; 1170us; 871us; 1171us; 871us; 1177us; 871us; 1183us; 871us; 1184us; 871us; 1185us; 871us; 1197us; 871us; 1206us; 871us; 1218us; 871us; 1219us; 871us; 1220us; 871us; 1221us; 871us; 1223us; 871us; 1232us; 871us; 1235us; 871us; 1236us; 871us; 1259us; 871us; 1264us; 871us; 1269us; 871us; 1275us; 871us; 1306us; 871us; 1311us; 871us; 3us; 65535us; 714us; 715us; 804us; 805us; 837us; 838us; 5us; 65535us; 166us; 167us; 279us; 280us; 294us; 295us; 385us; 386us; 1330us; 1331us; 3us; 65535us; 357us; 358us; 362us; 363us; 663us; 664us; 9us; 65535us; 166us; 1328us; 225us; 226us; 279us; 1328us; 294us; 1328us; 324us; 325us; 385us; 1328us; 551us; 552us; 1330us; 1328us; 1333us; 1334us; 9us; 65535us; 166us; 1332us; 225us; 1332us; 279us; 1332us; 294us; 1332us; 324us; 1332us; 385us; 1332us; 551us; 1332us; 1330us; 1332us; 1333us; 1332us; 2us; 65535us; 1336us; 1337us; 1339us; 1340us; 11us; 65535us; 166us; 1335us; 225us; 1335us; 279us; 1335us; 294us; 1335us; 324us; 1335us; 385us; 1335us; 551us; 1335us; 1330us; 1335us; 1333us; 1335us; 1336us; 1338us; 1339us; 1338us; 1us; 65535us; 585us; 586us; 29us; 65535us; 273us; 450us; 372us; 450us; 449us; 450us; 453us; 1409us; 509us; 510us; 512us; 513us; 585us; 1359us; 684us; 685us; 714us; 1326us; 804us; 1326us; 808us; 809us; 837us; 1326us; 839us; 840us; 841us; 842us; 843us; 844us; 1191us; 1192us; 1246us; 1247us; 1249us; 1250us; 1251us; 1409us; 1357us; 1358us; 1361us; 1362us; 1391us; 1409us; 1396us; 1397us; 1399us; 1400us; 1410us; 1411us; 1414us; 1415us; 1425us; 1426us; 1439us; 1441us; 1443us; 1444us; 29us; 65535us; 273us; 1360us; 372us; 1360us; 449us; 1360us; 453us; 1360us; 509us; 1360us; 512us; 1360us; 585us; 1360us; 684us; 1360us; 714us; 1360us; 804us; 1360us; 808us; 1360us; 837us; 1360us; 839us; 1360us; 841us; 1360us; 843us; 1360us; 1191us; 1360us; 1246us; 1360us; 1249us; 1360us; 1251us; 1360us; 1357us; 1360us; 1361us; 1360us; 1391us; 1360us; 1396us; 1360us; 1399us; 1360us; 1410us; 1360us; 1414us; 1360us; 1425us; 1360us; 1439us; 1360us; 1443us; 1360us; 5us; 65535us; 1364us; 1365us; 1366us; 1367us; 1368us; 1369us; 1371us; 1372us; 1373us; 1374us; 2us; 65535us; 574us; 575us; 1376us; 1377us; 85us; 65535us; 166us; 1382us; 225us; 1382us; 273us; 1382us; 279us; 1382us; 283us; 1382us; 284us; 1381us; 285us; 1382us; 286us; 1381us; 294us; 1382us; 324us; 1382us; 372us; 1382us; 378us; 1382us; 379us; 1381us; 385us; 1382us; 419us; 1382us; 420us; 1381us; 449us; 1382us; 453us; 1382us; 462us; 1382us; 509us; 1382us; 512us; 1382us; 548us; 1382us; 551us; 1382us; 570us; 1382us; 573us; 1381us; 574us; 1382us; 585us; 1382us; 598us; 1382us; 684us; 1382us; 714us; 1382us; 751us; 1382us; 804us; 1382us; 808us; 1382us; 837us; 1382us; 839us; 1382us; 841us; 1382us; 843us; 1382us; 1082us; 1382us; 1083us; 1382us; 1084us; 1381us; 1085us; 1381us; 1191us; 1382us; 1246us; 1382us; 1249us; 1382us; 1251us; 1382us; 1253us; 1382us; 1254us; 1381us; 1297us; 1382us; 1298us; 1381us; 1330us; 1382us; 1333us; 1382us; 1336us; 1382us; 1339us; 1382us; 1341us; 1382us; 1342us; 1381us; 1343us; 1382us; 1344us; 1381us; 1347us; 1382us; 1348us; 1381us; 1349us; 1381us; 1350us; 1382us; 1351us; 1381us; 1354us; 1382us; 1355us; 1381us; 1357us; 1382us; 1361us; 1382us; 1363us; 1381us; 1364us; 1382us; 1366us; 1382us; 1368us; 1382us; 1370us; 1381us; 1371us; 1382us; 1373us; 1382us; 1375us; 1381us; 1376us; 1382us; 1391us; 1382us; 1393us; 1381us; 1396us; 1382us; 1399us; 1382us; 1410us; 1382us; 1414us; 1382us; 1421us; 1382us; 1425us; 1382us; 1439us; 1382us; 1443us; 1382us; 85us; 65535us; 166us; 1423us; 225us; 1423us; 273us; 1423us; 279us; 1423us; 283us; 1423us; 284us; 1389us; 285us; 1423us; 286us; 1389us; 294us; 1423us; 324us; 1423us; 372us; 1423us; 378us; 1423us; 379us; 1389us; 385us; 1423us; 419us; 1423us; 420us; 1389us; 449us; 1423us; 453us; 1423us; 462us; 1423us; 509us; 1423us; 512us; 1423us; 548us; 1423us; 551us; 1423us; 570us; 1423us; 573us; 1389us; 574us; 1423us; 585us; 1423us; 598us; 1423us; 684us; 1423us; 714us; 1423us; 751us; 1423us; 804us; 1423us; 808us; 1423us; 837us; 1423us; 839us; 1423us; 841us; 1423us; 843us; 1423us; 1082us; 1423us; 1083us; 1423us; 1084us; 1389us; 1085us; 1389us; 1191us; 1423us; 1246us; 1423us; 1249us; 1423us; 1251us; 1423us; 1253us; 1423us; 1254us; 1389us; 1297us; 1423us; 1298us; 1389us; 1330us; 1423us; 1333us; 1423us; 1336us; 1423us; 1339us; 1423us; 1341us; 1423us; 1342us; 1389us; 1343us; 1423us; 1344us; 1389us; 1347us; 1423us; 1348us; 1389us; 1349us; 1389us; 1350us; 1423us; 1351us; 1389us; 1354us; 1423us; 1355us; 1389us; 1357us; 1423us; 1361us; 1423us; 1363us; 1389us; 1364us; 1423us; 1366us; 1423us; 1368us; 1423us; 1370us; 1389us; 1371us; 1423us; 1373us; 1423us; 1375us; 1389us; 1376us; 1423us; 1391us; 1423us; 1393us; 1394us; 1396us; 1423us; 1399us; 1423us; 1410us; 1423us; 1414us; 1423us; 1421us; 1423us; 1425us; 1423us; 1439us; 1423us; 1443us; 1423us; 63us; 65535us; 166us; 1349us; 225us; 1349us; 273us; 1363us; 279us; 1349us; 283us; 284us; 285us; 286us; 294us; 1349us; 324us; 1349us; 372us; 1363us; 378us; 379us; 385us; 1349us; 419us; 420us; 449us; 1363us; 453us; 1363us; 509us; 1363us; 512us; 1363us; 548us; 573us; 551us; 1349us; 570us; 573us; 574us; 1375us; 585us; 1363us; 598us; 573us; 684us; 1363us; 714us; 1363us; 804us; 1363us; 808us; 1363us; 837us; 1363us; 839us; 1363us; 841us; 1363us; 843us; 1363us; 1082us; 1085us; 1083us; 1084us; 1191us; 1363us; 1246us; 1363us; 1249us; 1363us; 1251us; 1363us; 1253us; 1254us; 1297us; 1298us; 1330us; 1349us; 1333us; 1349us; 1336us; 1349us; 1339us; 1349us; 1341us; 1342us; 1343us; 1344us; 1347us; 1348us; 1350us; 1351us; 1354us; 1355us; 1357us; 1363us; 1361us; 1363us; 1364us; 1370us; 1366us; 1370us; 1368us; 1370us; 1371us; 1370us; 1373us; 1370us; 1376us; 1375us; 1391us; 1363us; 1396us; 1363us; 1399us; 1363us; 1410us; 1363us; 1414us; 1363us; 1425us; 1363us; 1439us; 1363us; 1443us; 1363us; 20us; 65535us; 284us; 1385us; 286us; 1385us; 379us; 1385us; 420us; 1385us; 573us; 1385us; 1084us; 1385us; 1085us; 1385us; 1254us; 1385us; 1298us; 1385us; 1342us; 1385us; 1344us; 1385us; 1348us; 1385us; 1349us; 1385us; 1351us; 1385us; 1355us; 1385us; 1363us; 1385us; 1370us; 1385us; 1375us; 1385us; 1386us; 1388us; 1387us; 1388us; 3us; 65535us; 453us; 1392us; 1251us; 1392us; 1391us; 1392us; 2us; 65535us; 1411us; 1412us; 1444us; 1413us; 63us; 65535us; 166us; 1395us; 225us; 1395us; 273us; 1395us; 279us; 1395us; 283us; 1395us; 285us; 1395us; 294us; 1395us; 324us; 1395us; 372us; 1395us; 378us; 1395us; 385us; 1395us; 419us; 1395us; 449us; 1395us; 453us; 1395us; 509us; 1395us; 512us; 1395us; 548us; 1395us; 551us; 1395us; 570us; 1395us; 574us; 1395us; 585us; 1395us; 598us; 1395us; 684us; 1395us; 714us; 1395us; 804us; 1395us; 808us; 1395us; 837us; 1395us; 839us; 1395us; 841us; 1395us; 843us; 1395us; 1082us; 1395us; 1083us; 1395us; 1191us; 1395us; 1246us; 1395us; 1249us; 1395us; 1251us; 1395us; 1253us; 1395us; 1297us; 1395us; 1330us; 1395us; 1333us; 1395us; 1336us; 1395us; 1339us; 1395us; 1341us; 1395us; 1343us; 1395us; 1347us; 1395us; 1350us; 1395us; 1354us; 1395us; 1357us; 1395us; 1361us; 1395us; 1364us; 1395us; 1366us; 1395us; 1368us; 1395us; 1371us; 1395us; 1373us; 1395us; 1376us; 1395us; 1391us; 1395us; 1396us; 1395us; 1399us; 1395us; 1410us; 1395us; 1414us; 1395us; 1425us; 1395us; 1439us; 1395us; 1443us; 1395us; 66us; 65535us; 166us; 1416us; 225us; 1416us; 273us; 1416us; 279us; 1416us; 283us; 1416us; 285us; 1416us; 294us; 1416us; 324us; 1416us; 372us; 1416us; 378us; 1416us; 385us; 1416us; 419us; 1416us; 449us; 1416us; 453us; 1416us; 462us; 1422us; 509us; 1416us; 512us; 1416us; 548us; 1416us; 551us; 1416us; 570us; 1416us; 574us; 1416us; 585us; 1416us; 598us; 1416us; 684us; 1416us; 714us; 1416us; 751us; 752us; 804us; 1416us; 808us; 1416us; 837us; 1416us; 839us; 1416us; 841us; 1416us; 843us; 1416us; 1082us; 1416us; 1083us; 1416us; 1191us; 1416us; 1246us; 1416us; 1249us; 1416us; 1251us; 1416us; 1253us; 1416us; 1297us; 1416us; 1330us; 1416us; 1333us; 1416us; 1336us; 1416us; 1339us; 1416us; 1341us; 1416us; 1343us; 1416us; 1347us; 1416us; 1350us; 1416us; 1354us; 1416us; 1357us; 1416us; 1361us; 1416us; 1364us; 1416us; 1366us; 1416us; 1368us; 1416us; 1371us; 1416us; 1373us; 1416us; 1376us; 1416us; 1391us; 1416us; 1396us; 1416us; 1399us; 1416us; 1410us; 1416us; 1414us; 1416us; 1421us; 1422us; 1425us; 1416us; 1439us; 1416us; 1443us; 1416us; 4us; 65535us; 516us; 533us; 531us; 532us; 1382us; 1432us; 1434us; 1435us; 6us; 65535us; 516us; 1436us; 531us; 1436us; 1105us; 1106us; 1382us; 1436us; 1434us; 1436us; 1437us; 1438us; 1us; 65535us; 706us; 707us; 6us; 65535us; 1446us; 1456us; 1453us; 1456us; 1462us; 1456us; 1468us; 1456us; 1469us; 1456us; 1470us; 1456us; 6us; 65535us; 1446us; 1462us; 1453us; 1462us; 1462us; 1462us; 1468us; 1462us; 1469us; 1462us; 1470us; 1462us; 6us; 65535us; 1446us; 1464us; 1453us; 1464us; 1462us; 1463us; 1468us; 1464us; 1469us; 1464us; 1470us; 1464us; 5us; 65535us; 1446us; 1447us; 1453us; 1454us; 1468us; 1465us; 1469us; 1466us; 1470us; 1467us; 102us; 65535us; 166us; 1380us; 225us; 1380us; 273us; 1380us; 279us; 1380us; 283us; 1380us; 284us; 1379us; 285us; 1380us; 286us; 1379us; 294us; 1380us; 324us; 1380us; 372us; 1380us; 378us; 1380us; 379us; 1379us; 385us; 1380us; 419us; 1380us; 420us; 1379us; 449us; 1380us; 453us; 1380us; 462us; 1379us; 470us; 475us; 485us; 486us; 500us; 511us; 504us; 511us; 507us; 508us; 509us; 1380us; 512us; 1380us; 522us; 523us; 524us; 525us; 548us; 1380us; 551us; 1380us; 570us; 1380us; 573us; 1379us; 574us; 1380us; 585us; 1356us; 598us; 1380us; 676us; 683us; 680us; 683us; 684us; 1380us; 714us; 1380us; 751us; 1379us; 804us; 1380us; 808us; 1380us; 837us; 1380us; 839us; 1380us; 841us; 1380us; 843us; 1380us; 1082us; 1380us; 1083us; 1380us; 1084us; 1379us; 1085us; 1379us; 1191us; 1380us; 1246us; 1380us; 1249us; 1380us; 1251us; 1380us; 1253us; 1380us; 1254us; 1379us; 1297us; 1380us; 1298us; 1379us; 1327us; 511us; 1329us; 511us; 1330us; 1380us; 1333us; 1380us; 1336us; 1380us; 1339us; 1380us; 1341us; 1380us; 1342us; 1379us; 1343us; 1380us; 1344us; 1379us; 1347us; 1380us; 1348us; 1379us; 1349us; 1379us; 1350us; 1380us; 1351us; 1379us; 1354us; 1380us; 1355us; 1379us; 1357us; 1380us; 1361us; 1380us; 1363us; 1379us; 1364us; 1380us; 1366us; 1380us; 1368us; 1380us; 1370us; 1379us; 1371us; 1380us; 1373us; 1380us; 1375us; 1379us; 1376us; 1380us; 1391us; 1380us; 1393us; 1379us; 1396us; 1380us; 1399us; 1380us; 1410us; 1380us; 1414us; 1380us; 1421us; 1379us; 1425us; 1380us; 1439us; 1380us; 1443us; 1380us; 1446us; 1452us; 1453us; 1452us; 1462us; 1452us; 1468us; 1452us; 1469us; 1452us; 1470us; 1452us; 106us; 65535us; 166us; 1473us; 225us; 1473us; 273us; 1473us; 279us; 1473us; 283us; 1473us; 284us; 1473us; 285us; 1473us; 286us; 1473us; 294us; 1473us; 324us; 1473us; 372us; 1473us; 378us; 1473us; 379us; 1473us; 385us; 1473us; 419us; 1473us; 420us; 1473us; 449us; 1473us; 453us; 1473us; 462us; 1473us; 470us; 1473us; 485us; 1473us; 500us; 1473us; 504us; 1473us; 507us; 1473us; 509us; 1473us; 512us; 1473us; 522us; 1473us; 524us; 1473us; 548us; 1473us; 551us; 1473us; 570us; 1473us; 573us; 1473us; 574us; 1473us; 585us; 1473us; 598us; 1473us; 676us; 1473us; 680us; 1473us; 684us; 1473us; 714us; 1473us; 751us; 1473us; 804us; 1473us; 808us; 1473us; 837us; 1473us; 839us; 1473us; 841us; 1473us; 843us; 1473us; 1082us; 1473us; 1083us; 1473us; 1084us; 1473us; 1085us; 1473us; 1183us; 1201us; 1184us; 1202us; 1185us; 1201us; 1191us; 1473us; 1203us; 1204us; 1246us; 1473us; 1249us; 1473us; 1251us; 1473us; 1253us; 1473us; 1254us; 1473us; 1297us; 1473us; 1298us; 1473us; 1327us; 1473us; 1329us; 1473us; 1330us; 1473us; 1333us; 1473us; 1336us; 1473us; 1339us; 1473us; 1341us; 1473us; 1342us; 1473us; 1343us; 1473us; 1344us; 1473us; 1347us; 1473us; 1348us; 1473us; 1349us; 1473us; 1350us; 1473us; 1351us; 1473us; 1354us; 1473us; 1355us; 1473us; 1357us; 1473us; 1361us; 1473us; 1363us; 1473us; 1364us; 1473us; 1366us; 1473us; 1368us; 1473us; 1370us; 1473us; 1371us; 1473us; 1373us; 1473us; 1375us; 1473us; 1376us; 1473us; 1391us; 1473us; 1393us; 1473us; 1396us; 1473us; 1399us; 1473us; 1410us; 1473us; 1414us; 1473us; 1421us; 1473us; 1425us; 1473us; 1439us; 1473us; 1443us; 1473us; 1446us; 1473us; 1453us; 1473us; 1462us; 1473us; 1468us; 1473us; 1469us; 1473us; 1470us; 1473us; 313us; 65535us; 32us; 1524us; 48us; 1478us; 50us; 1478us; 74us; 1524us; 88us; 1524us; 110us; 1524us; 120us; 1478us; 123us; 1478us; 141us; 1478us; 152us; 1478us; 157us; 1478us; 163us; 1524us; 166us; 1478us; 169us; 1524us; 184us; 202us; 190us; 202us; 196us; 1478us; 225us; 1478us; 261us; 1524us; 263us; 1524us; 268us; 1524us; 273us; 564us; 276us; 1524us; 279us; 1478us; 283us; 1478us; 284us; 1478us; 285us; 1478us; 286us; 1478us; 294us; 1478us; 324us; 1478us; 356us; 1526us; 359us; 1524us; 361us; 1526us; 364us; 1524us; 372us; 564us; 378us; 1478us; 379us; 1478us; 382us; 1524us; 385us; 1478us; 394us; 1526us; 397us; 1524us; 403us; 1526us; 419us; 1478us; 420us; 1478us; 426us; 427us; 429us; 430us; 449us; 564us; 453us; 1478us; 462us; 1478us; 470us; 1478us; 472us; 1478us; 509us; 1478us; 512us; 1478us; 545us; 1524us; 548us; 1478us; 551us; 1478us; 570us; 1478us; 573us; 1478us; 574us; 1478us; 583us; 584us; 585us; 1478us; 594us; 597us; 598us; 1478us; 600us; 1478us; 602us; 1478us; 608us; 1524us; 614us; 1524us; 625us; 626us; 637us; 1478us; 638us; 639us; 650us; 1478us; 656us; 1524us; 662us; 1526us; 665us; 1524us; 668us; 1524us; 678us; 1524us; 684us; 1478us; 710us; 711us; 714us; 1478us; 716us; 709us; 717us; 709us; 719us; 709us; 735us; 736us; 737us; 1526us; 738us; 1526us; 742us; 1526us; 743us; 1526us; 744us; 1526us; 745us; 1526us; 747us; 1526us; 749us; 1526us; 751us; 1478us; 754us; 1526us; 756us; 1526us; 761us; 1478us; 764us; 1526us; 767us; 1526us; 771us; 773us; 772us; 773us; 779us; 1526us; 799us; 800us; 801us; 1526us; 804us; 1478us; 806us; 1526us; 807us; 1526us; 808us; 1478us; 811us; 1526us; 812us; 1526us; 813us; 1526us; 814us; 1526us; 818us; 1478us; 821us; 1526us; 823us; 1526us; 825us; 1524us; 830us; 1524us; 837us; 1478us; 839us; 1478us; 841us; 1478us; 843us; 1478us; 848us; 1524us; 850us; 1524us; 853us; 1524us; 860us; 1524us; 864us; 1524us; 867us; 1524us; 873us; 1524us; 877us; 1524us; 881us; 1524us; 883us; 1524us; 888us; 1524us; 890us; 1524us; 892us; 1524us; 894us; 1524us; 903us; 1526us; 905us; 1524us; 912us; 1524us; 919us; 1524us; 924us; 1524us; 926us; 1524us; 928us; 1526us; 929us; 1524us; 932us; 1524us; 934us; 1526us; 935us; 1524us; 938us; 1524us; 941us; 1524us; 944us; 1524us; 946us; 1524us; 951us; 1524us; 993us; 1524us; 995us; 1524us; 998us; 1524us; 999us; 1524us; 1000us; 1524us; 1001us; 1524us; 1002us; 1524us; 1003us; 1524us; 1004us; 1524us; 1005us; 1524us; 1006us; 1524us; 1007us; 1524us; 1008us; 1524us; 1009us; 1524us; 1010us; 1524us; 1011us; 1524us; 1012us; 1524us; 1013us; 1524us; 1014us; 1524us; 1015us; 1524us; 1016us; 1524us; 1018us; 1524us; 1021us; 1524us; 1022us; 1526us; 1024us; 1526us; 1029us; 1526us; 1036us; 1526us; 1040us; 1524us; 1041us; 1524us; 1045us; 1524us; 1047us; 1524us; 1051us; 1524us; 1053us; 1524us; 1057us; 1524us; 1059us; 1524us; 1060us; 1524us; 1061us; 1524us; 1062us; 1524us; 1064us; 1524us; 1065us; 1524us; 1067us; 1524us; 1068us; 1524us; 1070us; 1524us; 1071us; 1524us; 1073us; 1524us; 1074us; 1524us; 1076us; 1524us; 1077us; 1524us; 1079us; 1524us; 1080us; 1524us; 1082us; 1478us; 1083us; 1478us; 1084us; 1478us; 1085us; 1478us; 1091us; 1524us; 1093us; 1524us; 1095us; 1524us; 1096us; 1524us; 1099us; 1524us; 1104us; 1524us; 1107us; 1524us; 1108us; 1524us; 1109us; 1524us; 1112us; 1524us; 1114us; 1524us; 1115us; 1524us; 1120us; 1524us; 1130us; 1524us; 1137us; 1524us; 1142us; 1524us; 1145us; 1524us; 1148us; 1524us; 1151us; 1524us; 1152us; 1524us; 1163us; 1524us; 1170us; 1524us; 1171us; 1524us; 1177us; 1524us; 1183us; 1524us; 1184us; 1524us; 1185us; 1524us; 1191us; 1478us; 1197us; 1524us; 1206us; 1524us; 1218us; 1524us; 1219us; 1524us; 1220us; 1524us; 1221us; 1524us; 1223us; 1524us; 1225us; 1526us; 1232us; 1524us; 1235us; 1524us; 1236us; 1524us; 1240us; 1524us; 1246us; 1478us; 1249us; 1478us; 1251us; 1478us; 1253us; 1478us; 1254us; 1478us; 1259us; 1524us; 1262us; 1478us; 1264us; 1524us; 1267us; 1478us; 1269us; 1524us; 1273us; 1478us; 1275us; 1524us; 1297us; 1478us; 1298us; 1478us; 1304us; 1526us; 1306us; 1524us; 1309us; 1526us; 1311us; 1524us; 1318us; 1526us; 1321us; 1526us; 1330us; 1478us; 1333us; 1478us; 1336us; 1478us; 1339us; 1478us; 1341us; 1478us; 1342us; 1478us; 1343us; 1478us; 1344us; 1478us; 1345us; 1346us; 1347us; 1478us; 1348us; 1478us; 1349us; 1478us; 1350us; 1478us; 1351us; 1478us; 1352us; 1353us; 1354us; 1478us; 1355us; 1478us; 1357us; 1478us; 1361us; 1478us; 1363us; 1478us; 1364us; 1478us; 1366us; 1478us; 1368us; 1478us; 1370us; 1478us; 1371us; 1478us; 1373us; 1478us; 1375us; 1478us; 1376us; 1478us; 1391us; 1478us; 1393us; 1478us; 1396us; 1478us; 1399us; 1478us; 1410us; 1478us; 1414us; 1478us; 1421us; 1478us; 1425us; 1478us; 1433us; 1478us; 1439us; 1478us; 1443us; 1478us; 1446us; 1478us; 1453us; 1478us; 1462us; 1478us; 1468us; 1478us; 1469us; 1478us; 1470us; 1478us; 1471us; 1472us; 1474us; 1476us; 1475us; 1476us; 1479us; 1480us; 1528us; 1526us; 113us; 65535us; 48us; 49us; 50us; 51us; 120us; 135us; 123us; 124us; 141us; 143us; 152us; 126us; 157us; 158us; 166us; 1378us; 184us; 192us; 190us; 192us; 196us; 197us; 225us; 1378us; 273us; 1378us; 279us; 1378us; 283us; 1378us; 284us; 1378us; 285us; 1378us; 286us; 1378us; 294us; 1378us; 324us; 1378us; 372us; 1378us; 378us; 1378us; 379us; 1378us; 385us; 1378us; 419us; 1378us; 420us; 1378us; 449us; 1378us; 453us; 1378us; 462us; 1378us; 470us; 471us; 472us; 473us; 509us; 1378us; 512us; 1378us; 548us; 1378us; 551us; 1378us; 570us; 1378us; 573us; 1378us; 574us; 1378us; 585us; 1378us; 598us; 1378us; 600us; 601us; 602us; 603us; 637us; 640us; 650us; 640us; 684us; 1378us; 714us; 1378us; 751us; 1378us; 761us; 820us; 804us; 1378us; 808us; 1378us; 818us; 820us; 837us; 1378us; 839us; 1378us; 841us; 1378us; 843us; 1378us; 1082us; 1378us; 1083us; 1378us; 1084us; 1378us; 1085us; 1378us; 1191us; 1378us; 1246us; 1378us; 1249us; 1378us; 1251us; 1378us; 1253us; 1378us; 1254us; 1378us; 1262us; 1263us; 1267us; 1268us; 1273us; 1274us; 1297us; 1378us; 1298us; 1378us; 1330us; 1378us; 1333us; 1378us; 1336us; 1378us; 1339us; 1378us; 1341us; 1378us; 1342us; 1378us; 1343us; 1378us; 1344us; 1378us; 1347us; 1378us; 1348us; 1378us; 1349us; 1378us; 1350us; 1378us; 1351us; 1378us; 1354us; 1378us; 1355us; 1378us; 1357us; 1378us; 1361us; 1378us; 1363us; 1378us; 1364us; 1378us; 1366us; 1378us; 1368us; 1378us; 1370us; 1378us; 1371us; 1378us; 1373us; 1378us; 1375us; 1378us; 1376us; 1378us; 1391us; 1378us; 1393us; 1378us; 1396us; 1378us; 1399us; 1378us; 1410us; 1378us; 1414us; 1378us; 1421us; 1378us; 1425us; 1378us; 1433us; 1434us; 1439us; 1378us; 1443us; 1378us; 1446us; 1451us; 1453us; 1451us; 1462us; 1451us; 1468us; 1451us; 1469us; 1451us; 1470us; 1451us; 180us; 65535us; 32us; 1525us; 74us; 1525us; 88us; 1525us; 110us; 1525us; 163us; 1525us; 169us; 1525us; 261us; 1525us; 263us; 1525us; 268us; 1525us; 276us; 1525us; 356us; 1527us; 359us; 1525us; 361us; 1527us; 364us; 1525us; 382us; 1525us; 394us; 1527us; 397us; 1525us; 403us; 1527us; 545us; 1525us; 608us; 1525us; 614us; 1525us; 656us; 1525us; 662us; 1527us; 665us; 1525us; 668us; 1525us; 678us; 1525us; 737us; 1527us; 738us; 1527us; 742us; 1527us; 743us; 1527us; 744us; 1527us; 745us; 1527us; 747us; 1527us; 749us; 1527us; 754us; 1527us; 756us; 1527us; 764us; 1527us; 767us; 1527us; 779us; 1527us; 801us; 1527us; 806us; 1527us; 807us; 1527us; 811us; 1527us; 812us; 1527us; 813us; 1527us; 814us; 1527us; 821us; 1527us; 823us; 1527us; 825us; 1525us; 830us; 1525us; 848us; 1525us; 850us; 1525us; 853us; 1525us; 860us; 1525us; 864us; 1525us; 867us; 1525us; 873us; 1525us; 877us; 1525us; 881us; 1525us; 883us; 1525us; 888us; 1525us; 890us; 1525us; 892us; 1525us; 894us; 1525us; 903us; 1527us; 905us; 1525us; 912us; 1525us; 919us; 1525us; 924us; 1525us; 926us; 1525us; 928us; 1527us; 929us; 1525us; 932us; 1525us; 934us; 1527us; 935us; 1525us; 938us; 1525us; 941us; 1525us; 944us; 1525us; 946us; 1525us; 951us; 1525us; 993us; 1525us; 995us; 1525us; 998us; 1525us; 999us; 1525us; 1000us; 1525us; 1001us; 1525us; 1002us; 1525us; 1003us; 1525us; 1004us; 1525us; 1005us; 1525us; 1006us; 1525us; 1007us; 1525us; 1008us; 1525us; 1009us; 1525us; 1010us; 1525us; 1011us; 1525us; 1012us; 1525us; 1013us; 1525us; 1014us; 1525us; 1015us; 1525us; 1016us; 1525us; 1018us; 1525us; 1021us; 1525us; 1022us; 1527us; 1024us; 1527us; 1029us; 1527us; 1036us; 1527us; 1040us; 1525us; 1041us; 1525us; 1045us; 1525us; 1047us; 1525us; 1051us; 1525us; 1053us; 1525us; 1057us; 1525us; 1059us; 1525us; 1060us; 1525us; 1061us; 1525us; 1062us; 1525us; 1064us; 1525us; 1065us; 1525us; 1067us; 1525us; 1068us; 1525us; 1070us; 1525us; 1071us; 1525us; 1073us; 1525us; 1074us; 1525us; 1076us; 1525us; 1077us; 1525us; 1079us; 1525us; 1080us; 1525us; 1091us; 1525us; 1093us; 1525us; 1095us; 1525us; 1096us; 1525us; 1099us; 1525us; 1104us; 1525us; 1107us; 1525us; 1108us; 1525us; 1109us; 1525us; 1112us; 1525us; 1114us; 1525us; 1115us; 1525us; 1120us; 1525us; 1130us; 1525us; 1137us; 1525us; 1142us; 1525us; 1145us; 1525us; 1148us; 1525us; 1151us; 1525us; 1152us; 1525us; 1163us; 1525us; 1170us; 1525us; 1171us; 1525us; 1177us; 1525us; 1183us; 1525us; 1184us; 1525us; 1185us; 1525us; 1197us; 1525us; 1206us; 1525us; 1218us; 1525us; 1219us; 1525us; 1220us; 1525us; 1221us; 1525us; 1223us; 1525us; 1225us; 1527us; 1232us; 1525us; 1235us; 1525us; 1236us; 1525us; 1240us; 1525us; 1259us; 1525us; 1264us; 1525us; 1269us; 1525us; 1275us; 1525us; 1304us; 1527us; 1306us; 1525us; 1309us; 1527us; 1311us; 1525us; 1318us; 1527us; 1321us; 1527us; 1528us; 1527us; 6us; 65535us; 558us; 1483us; 779us; 1483us; 1130us; 1483us; 1184us; 1483us; 1185us; 1483us; 1482us; 1483us; 2us; 65535us; 1487us; 1523us; 1521us; 1522us; 6us; 65535us; 558us; 1486us; 779us; 1486us; 1130us; 1486us; 1184us; 1486us; 1185us; 1486us; 1482us; 1486us; 140us; 65535us; 32us; 1531us; 74us; 1531us; 88us; 1531us; 110us; 1531us; 163us; 1531us; 169us; 1531us; 261us; 1531us; 263us; 1531us; 268us; 1531us; 276us; 1531us; 359us; 1531us; 364us; 1531us; 382us; 1531us; 397us; 1531us; 545us; 1531us; 608us; 1531us; 614us; 1531us; 656us; 1531us; 665us; 1531us; 668us; 1531us; 678us; 1531us; 825us; 1531us; 830us; 1531us; 848us; 1531us; 850us; 1531us; 853us; 1531us; 860us; 1531us; 864us; 1531us; 867us; 1531us; 873us; 1531us; 877us; 1531us; 881us; 1531us; 883us; 1531us; 888us; 1531us; 890us; 1531us; 892us; 1531us; 894us; 1531us; 905us; 1531us; 912us; 1531us; 919us; 1531us; 924us; 1531us; 926us; 1531us; 929us; 1531us; 932us; 1531us; 935us; 1531us; 938us; 1531us; 941us; 1531us; 944us; 1531us; 946us; 1531us; 951us; 1531us; 993us; 1531us; 995us; 1531us; 998us; 1531us; 999us; 1531us; 1000us; 1531us; 1001us; 1531us; 1002us; 1531us; 1003us; 1531us; 1004us; 1531us; 1005us; 1531us; 1006us; 1531us; 1007us; 1531us; 1008us; 1531us; 1009us; 1531us; 1010us; 1531us; 1011us; 1531us; 1012us; 1531us; 1013us; 1531us; 1014us; 1531us; 1015us; 1531us; 1016us; 1531us; 1018us; 1531us; 1021us; 1531us; 1040us; 1531us; 1041us; 1531us; 1045us; 1531us; 1047us; 1531us; 1051us; 1531us; 1053us; 1531us; 1057us; 1531us; 1059us; 1531us; 1060us; 1531us; 1061us; 1531us; 1062us; 1531us; 1064us; 1531us; 1065us; 1531us; 1067us; 1531us; 1068us; 1531us; 1070us; 1531us; 1071us; 1531us; 1073us; 1531us; 1074us; 1531us; 1076us; 1531us; 1077us; 1531us; 1079us; 1531us; 1080us; 1531us; 1091us; 1531us; 1093us; 1531us; 1095us; 1531us; 1096us; 1531us; 1099us; 1531us; 1104us; 1531us; 1107us; 1531us; 1108us; 1531us; 1109us; 1127us; 1112us; 1127us; 1114us; 1531us; 1115us; 1531us; 1120us; 1531us; 1130us; 1531us; 1137us; 1531us; 1142us; 1531us; 1145us; 1531us; 1148us; 1531us; 1151us; 1531us; 1152us; 1531us; 1163us; 1531us; 1170us; 1531us; 1171us; 1531us; 1177us; 1531us; 1183us; 1531us; 1184us; 1531us; 1185us; 1531us; 1197us; 1531us; 1206us; 1531us; 1218us; 1531us; 1219us; 1531us; 1220us; 1531us; 1221us; 1531us; 1223us; 1531us; 1232us; 1531us; 1235us; 1531us; 1236us; 1531us; 1240us; 1531us; 1259us; 1531us; 1264us; 1531us; 1269us; 1531us; 1275us; 1531us; 1306us; 1531us; 1311us; 1531us; 40us; 65535us; 356us; 402us; 361us; 402us; 394us; 402us; 403us; 404us; 662us; 402us; 737us; 402us; 738us; 402us; 742us; 402us; 743us; 402us; 744us; 402us; 745us; 402us; 747us; 402us; 749us; 402us; 754us; 402us; 756us; 402us; 764us; 402us; 767us; 402us; 779us; 402us; 801us; 402us; 806us; 402us; 807us; 402us; 811us; 402us; 812us; 402us; 813us; 402us; 814us; 402us; 821us; 402us; 823us; 402us; 903us; 402us; 928us; 402us; 934us; 402us; 1022us; 402us; 1024us; 402us; 1029us; 402us; 1036us; 402us; 1225us; 402us; 1304us; 402us; 1309us; 402us; 1318us; 402us; 1321us; 402us; 1528us; 1529us; 138us; 65535us; 32us; 1119us; 74us; 1119us; 88us; 1119us; 110us; 1119us; 163us; 164us; 169us; 1119us; 261us; 267us; 263us; 267us; 268us; 269us; 276us; 277us; 359us; 1119us; 364us; 1119us; 382us; 383us; 397us; 1119us; 545us; 557us; 608us; 1119us; 614us; 1119us; 656us; 1119us; 665us; 1119us; 668us; 1119us; 678us; 1119us; 825us; 1119us; 830us; 1119us; 848us; 1119us; 850us; 1119us; 853us; 1119us; 860us; 1119us; 864us; 1119us; 867us; 1119us; 873us; 1119us; 877us; 1119us; 881us; 1119us; 883us; 1119us; 888us; 1119us; 890us; 1119us; 892us; 1119us; 894us; 1119us; 905us; 1119us; 912us; 1119us; 919us; 1119us; 924us; 1119us; 926us; 1119us; 929us; 1119us; 932us; 1119us; 935us; 1119us; 938us; 1119us; 941us; 1119us; 944us; 1119us; 946us; 1119us; 951us; 1119us; 993us; 1119us; 995us; 1119us; 998us; 1119us; 999us; 1119us; 1000us; 1119us; 1001us; 1119us; 1002us; 1119us; 1003us; 1119us; 1004us; 1119us; 1005us; 1119us; 1006us; 1119us; 1007us; 1119us; 1008us; 1119us; 1009us; 1119us; 1010us; 1119us; 1011us; 1119us; 1012us; 1119us; 1013us; 1119us; 1014us; 1119us; 1015us; 1119us; 1016us; 1119us; 1018us; 1119us; 1021us; 1119us; 1040us; 1119us; 1041us; 1119us; 1045us; 1119us; 1047us; 1119us; 1051us; 1119us; 1053us; 1119us; 1057us; 1119us; 1059us; 1119us; 1060us; 1119us; 1061us; 1119us; 1062us; 1119us; 1064us; 1119us; 1065us; 1119us; 1067us; 1119us; 1068us; 1119us; 1070us; 1119us; 1071us; 1119us; 1073us; 1119us; 1074us; 1119us; 1076us; 1119us; 1077us; 1119us; 1079us; 1119us; 1080us; 1119us; 1091us; 1119us; 1093us; 1119us; 1095us; 1119us; 1096us; 1119us; 1099us; 1119us; 1104us; 1119us; 1107us; 1119us; 1108us; 1119us; 1114us; 1116us; 1115us; 1116us; 1120us; 1119us; 1130us; 1119us; 1137us; 1119us; 1142us; 1119us; 1145us; 1119us; 1148us; 1119us; 1151us; 1119us; 1152us; 1119us; 1163us; 1119us; 1170us; 1119us; 1171us; 1119us; 1177us; 1119us; 1183us; 1119us; 1184us; 1119us; 1185us; 1119us; 1197us; 1119us; 1206us; 1119us; 1218us; 1119us; 1219us; 1119us; 1220us; 1119us; 1221us; 1119us; 1223us; 1119us; 1232us; 1119us; 1235us; 1119us; 1236us; 1119us; 1240us; 1119us; 1259us; 1119us; 1264us; 1119us; 1269us; 1119us; 1275us; 1119us; 1306us; 1119us; 1311us; 1119us; 13us; 65535us; 39us; 1535us; 45us; 1535us; 79us; 1535us; 80us; 1541us; 83us; 1535us; 89us; 1535us; 93us; 1535us; 94us; 1535us; 95us; 1535us; 96us; 1535us; 100us; 1535us; 1535us; 1535us; 1541us; 1541us; 11us; 65535us; 39us; 84us; 45us; 101us; 79us; 84us; 83us; 84us; 89us; 90us; 93us; 101us; 94us; 101us; 95us; 101us; 96us; 98us; 100us; 101us; 1535us; 1536us; 4us; 65535us; 17us; 1539us; 19us; 1539us; 21us; 1539us; 1539us; 1539us; 4us; 65535us; 17us; 23us; 19us; 25us; 21us; 27us; 1539us; 1540us; 0us; 65535us; 2us; 65535us; 80us; 81us; 1541us; 1542us; 14us; 65535us; 185us; 190us; 247us; 1556us; 342us; 1556us; 437us; 1556us; 576us; 577us; 795us; 823us; 816us; 818us; 845us; 848us; 846us; 848us; 847us; 848us; 1257us; 1273us; 1260us; 1273us; 1265us; 1273us; 1270us; 1273us; 4us; 65535us; 145us; 146us; 411us; 412us; 414us; 415us; 417us; 418us; 2us; 65535us; 1289us; 1290us; 1299us; 1300us; 4us; 65535us; 376us; 377us; 387us; 388us; 398us; 399us; 443us; 444us; 2us; 65535us; 57us; 58us; 65us; 66us; 19us; 65535us; 187us; 188us; 214us; 215us; 313us; 314us; 539us; 569us; 546us; 547us; 549us; 550us; 552us; 553us; 555us; 556us; 564us; 565us; 567us; 568us; 904us; 949us; 931us; 932us; 937us; 938us; 943us; 944us; 1226us; 1227us; 1229us; 1230us; 1276us; 1280us; 1277us; 1278us; 1300us; 1301us; 11us; 65535us; 185us; 186us; 247us; 248us; 342us; 343us; 437us; 438us; 576us; 579us; 795us; 822us; 816us; 817us; 1257us; 1258us; 1260us; 1261us; 1265us; 1266us; 1270us; 1271us; 2us; 65535us; 604us; 605us; 610us; 611us; 2us; 65535us; 1317us; 1318us; 1320us; 1321us; 10us; 65535us; 160us; 161us; 274us; 275us; 347us; 356us; 349us; 356us; 354us; 356us; 375us; 361us; 381us; 382us; 441us; 661us; 442us; 361us; 658us; 661us; 7us; 65535us; 161us; 162us; 287us; 582us; 289us; 582us; 390us; 582us; 392us; 582us; 580us; 582us; 661us; 662us; 4us; 65535us; 893us; 894us; 904us; 905us; 911us; 912us; 918us; 919us; 9us; 65535us; 895us; 896us; 898us; 899us; 901us; 902us; 906us; 907us; 909us; 910us; 913us; 914us; 916us; 917us; 920us; 921us; 922us; 923us; 2us; 65535us; 120us; 136us; 127us; 136us; 4us; 65535us; 123us; 174us; 141us; 178us; 152us; 178us; 171us; 174us; 2us; 65535us; 70us; 152us; 151us; 152us; 2us; 65535us; 463us; 464us; 1241us; 1242us; 10us; 65535us; 192us; 193us; 197us; 198us; 306us; 307us; 420us; 422us; 626us; 627us; 638us; 642us; 641us; 642us; 1084us; 1087us; 1085us; 1086us; 1254us; 1255us; 5us; 65535us; 164us; 493us; 277us; 493us; 383us; 493us; 471us; 487us; 746us; 493us; |] -let _fsyacc_sparseGotoTableRowOffsets = [|0us; 1us; 2us; 3us; 5us; 28us; 30us; 32us; 40us; 45us; 51us; 56us; 61us; 63us; 65us; 72us; 75us; 77us; 80us; 83us; 85us; 88us; 91us; 94us; 97us; 103us; 113us; 118us; 127us; 137us; 147us; 162us; 164us; 166us; 169us; 172us; 174us; 184us; 194us; 197us; 200us; 284us; 403us; 522us; 524us; 527us; 530us; 533us; 536us; 540us; 542us; 545us; 548us; 551us; 555us; 564us; 569us; 572us; 575us; 578us; 590us; 597us; 600us; 604us; 607us; 611us; 615us; 619us; 623us; 634us; 636us; 639us; 643us; 646us; 649us; 660us; 699us; 708us; 767us; 780us; 782us; 787us; 793us; 796us; 799us; 802us; 805us; 809us; 812us; 817us; 822us; 825us; 831us; 838us; 840us; 846us; 856us; 858us; 860us; 864us; 870us; 872us; 874us; 879us; 883us; 885us; 889us; 893us; 898us; 902us; 908us; 912us; 916us; 918us; 922us; 926us; 930us; 933us; 936us; 942us; 947us; 950us; 957us; 964us; 966us; 968us; 983us; 1094us; 1102us; 1213us; 1323us; 1327us; 1332us; 1443us; 1445us; 1447us; 1451us; 1454us; 1456us; 1461us; 1464us; 1470us; 1473us; 1475us; 1478us; 1480us; 1482us; 1484us; 1487us; 1663us; 1839us; 1843us; 1847us; 1850us; 1852us; 1864us; 1876us; 1888us; 1920us; 1927us; 1966us; 1968us; 1989us; 2010us; 2031us; 2033us; 2036us; 2039us; 2043us; 2066us; 2068us; 2075us; 2124us; 2178us; 2226us; 2333us; 2335us; 2339us; 2342us; 2345us; 2352us; 2359us; 2361us; 2363us; 2366us; 2369us; 2371us; 2478us; 2601us; 2724us; 2728us; 2858us; 2861us; 2866us; 3002us; 3138us; 3312us; 3448us; 3584us; 3588us; 3592us; 3728us; 3730us; 3733us; 3737us; 3742us; 3746us; 3749us; 3751us; 3755us; 3757us; 3761us; 3763us; 3765us; 3767us; 3772us; 3774us; 3776us; 3778us; 3781us; 3783us; 3788us; 3794us; 3796us; 3903us; 4010us; 4014us; 4020us; 4024us; 4034us; 4044us; 4047us; 4059us; 4061us; 4091us; 4121us; 4127us; 4130us; 4216us; 4302us; 4366us; 4387us; 4391us; 4394us; 4458us; 4525us; 4530us; 4537us; 4539us; 4546us; 4553us; 4560us; 4566us; 4669us; 4776us; 5090us; 5204us; 5385us; 5392us; 5395us; 5402us; 5543us; 5584us; 5723us; 5737us; 5749us; 5754us; 5759us; 5760us; 5763us; 5778us; 5783us; 5786us; 5791us; 5794us; 5814us; 5826us; 5829us; 5832us; 5843us; 5851us; 5856us; 5866us; 5869us; 5874us; 5877us; 5880us; 5891us; |] -let _fsyacc_stateToProdIdxsTableElements = [| 1us; 0us; 1us; 0us; 1us; 1us; 1us; 1us; 1us; 2us; 1us; 2us; 1us; 3us; 1us; 4us; 1us; 5us; 1us; 6us; 1us; 6us; 2us; 6us; 9us; 1us; 7us; 1us; 9us; 1us; 10us; 1us; 11us; 1us; 12us; 2us; 13us; 16us; 1us; 13us; 2us; 14us; 17us; 1us; 14us; 2us; 15us; 18us; 1us; 15us; 1us; 16us; 1us; 16us; 1us; 17us; 1us; 17us; 1us; 18us; 1us; 18us; 2us; 19us; 20us; 1us; 20us; 8us; 21us; 65us; 66us; 67us; 68us; 69us; 70us; 71us; 8us; 21us; 65us; 66us; 67us; 68us; 69us; 70us; 71us; 22us; 21us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 1us; 22us; 2us; 23us; 24us; 1us; 23us; 1us; 24us; 1us; 24us; 3us; 25us; 46us; 49us; 1us; 25us; 2us; 26us; 27us; 1us; 26us; 1us; 27us; 1us; 27us; 3us; 28us; 57us; 62us; 1us; 28us; 1us; 29us; 1us; 29us; 3us; 29us; 783us; 784us; 1us; 30us; 3us; 30us; 783us; 784us; 2us; 31us; 32us; 1us; 32us; 2us; 33us; 34us; 1us; 33us; 1us; 35us; 1us; 35us; 1us; 35us; 1us; 35us; 2us; 36us; 37us; 1us; 37us; 2us; 38us; 39us; 1us; 38us; 1us; 40us; 1us; 40us; 1us; 40us; 1us; 40us; 6us; 41us; 90us; 91us; 92us; 93us; 95us; 6us; 41us; 90us; 91us; 92us; 93us; 95us; 3us; 41us; 90us; 91us; 1us; 41us; 1us; 42us; 11us; 43us; 53us; 54us; 55us; 65us; 66us; 67us; 68us; 69us; 70us; 71us; 11us; 43us; 53us; 54us; 55us; 65us; 66us; 67us; 68us; 69us; 70us; 71us; 2us; 43us; 71us; 1us; 43us; 1us; 44us; 1us; 45us; 2us; 46us; 49us; 2us; 48us; 50us; 2us; 48us; 50us; 1us; 48us; 1us; 49us; 1us; 49us; 1us; 49us; 1us; 51us; 10us; 53us; 54us; 55us; 65us; 66us; 67us; 68us; 69us; 70us; 71us; 10us; 53us; 54us; 55us; 65us; 66us; 67us; 68us; 69us; 70us; 71us; 24us; 53us; 54us; 55us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 2us; 53us; 54us; 1us; 53us; 1us; 56us; 2us; 57us; 62us; 3us; 57us; 62us; 78us; 3us; 57us; 62us; 83us; 4us; 58us; 59us; 60us; 61us; 1us; 58us; 2us; 59us; 61us; 1us; 59us; 1us; 62us; 1us; 62us; 1us; 62us; 1us; 63us; 1us; 64us; 7us; 65us; 66us; 67us; 68us; 69us; 70us; 71us; 7us; 65us; 66us; 67us; 68us; 69us; 70us; 71us; 1us; 65us; 4us; 65us; 464us; 465us; 466us; 1us; 66us; 5us; 66us; 467us; 468us; 469us; 470us; 1us; 67us; 2us; 68us; 69us; 1us; 68us; 1us; 68us; 4us; 69us; 162us; 163us; 164us; 1us; 69us; 1us; 70us; 1us; 71us; 1us; 71us; 1us; 71us; 1us; 71us; 1us; 72us; 3us; 73us; 98us; 99us; 3us; 73us; 783us; 784us; 1us; 73us; 3us; 74us; 783us; 784us; 4us; 75us; 76us; 77us; 78us; 1us; 75us; 1us; 75us; 2us; 76us; 77us; 1us; 76us; 1us; 77us; 1us; 78us; 1us; 79us; 3us; 80us; 783us; 784us; 3us; 81us; 82us; 83us; 2us; 81us; 82us; 1us; 81us; 1us; 82us; 1us; 83us; 2us; 85us; 86us; 1us; 85us; 3us; 86us; 783us; 784us; 1us; 87us; 1us; 87us; 1us; 87us; 1us; 88us; 1us; 89us; 5us; 90us; 91us; 92us; 93us; 95us; 5us; 90us; 91us; 92us; 93us; 95us; 2us; 90us; 91us; 2us; 90us; 91us; 1us; 90us; 1us; 91us; 1us; 92us; 1us; 93us; 1us; 94us; 3us; 94us; 783us; 784us; 1us; 95us; 1us; 95us; 1us; 95us; 1us; 95us; 1us; 95us; 1us; 95us; 1us; 95us; 1us; 95us; 1us; 95us; 1us; 95us; 1us; 97us; 22us; 97us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 2us; 98us; 99us; 1us; 98us; 1us; 98us; 1us; 99us; 1us; 99us; 1us; 99us; 1us; 99us; 1us; 100us; 1us; 100us; 1us; 100us; 1us; 101us; 2us; 103us; 104us; 1us; 104us; 1us; 105us; 2us; 105us; 107us; 1us; 105us; 1us; 105us; 1us; 105us; 1us; 106us; 2us; 107us; 856us; 1us; 107us; 3us; 108us; 783us; 784us; 1us; 108us; 1us; 108us; 1us; 109us; 1us; 109us; 3us; 109us; 783us; 784us; 1us; 109us; 1us; 109us; 1us; 110us; 1us; 111us; 2us; 112us; 782us; 1us; 113us; 1us; 114us; 1us; 114us; 2us; 115us; 116us; 1us; 115us; 1us; 115us; 2us; 117us; 118us; 1us; 117us; 1us; 117us; 1us; 118us; 3us; 119us; 128us; 129us; 1us; 119us; 1us; 119us; 1us; 119us; 1us; 119us; 1us; 119us; 1us; 119us; 1us; 120us; 1us; 120us; 1us; 121us; 1us; 122us; 1us; 123us; 1us; 123us; 1us; 123us; 1us; 124us; 3us; 125us; 126us; 127us; 2us; 125us; 126us; 1us; 125us; 1us; 126us; 1us; 127us; 1us; 127us; 2us; 128us; 129us; 2us; 128us; 129us; 1us; 128us; 1us; 129us; 2us; 130us; 131us; 2us; 130us; 131us; 1us; 130us; 1us; 131us; 2us; 132us; 133us; 2us; 132us; 133us; 1us; 132us; 1us; 133us; 1us; 134us; 1us; 135us; 1us; 135us; 1us; 135us; 3us; 137us; 156us; 157us; 4us; 137us; 193us; 199us; 201us; 1us; 137us; 1us; 138us; 1us; 139us; 1us; 140us; 1us; 141us; 1us; 142us; 1us; 143us; 2us; 144us; 145us; 1us; 145us; 1us; 147us; 1us; 147us; 2us; 148us; 149us; 2us; 148us; 149us; 1us; 148us; 1us; 149us; 2us; 150us; 151us; 1us; 151us; 1us; 151us; 7us; 152us; 153us; 154us; 155us; 156us; 157us; 158us; 11us; 152us; 153us; 154us; 155us; 156us; 157us; 158us; 235us; 236us; 237us; 238us; 7us; 152us; 153us; 154us; 155us; 156us; 157us; 158us; 11us; 152us; 153us; 154us; 155us; 156us; 157us; 158us; 235us; 236us; 237us; 238us; 1us; 152us; 1us; 152us; 1us; 152us; 1us; 152us; 1us; 152us; 1us; 152us; 1us; 152us; 1us; 152us; 1us; 152us; 1us; 153us; 5us; 153us; 730us; 731us; 732us; 733us; 1us; 154us; 5us; 154us; 730us; 731us; 732us; 733us; 1us; 155us; 1us; 155us; 1us; 156us; 1us; 156us; 1us; 157us; 1us; 157us; 1us; 158us; 1us; 158us; 1us; 158us; 1us; 159us; 1us; 159us; 1us; 159us; 1us; 160us; 1us; 160us; 1us; 160us; 3us; 162us; 163us; 164us; 1us; 163us; 1us; 163us; 1us; 164us; 1us; 164us; 1us; 164us; 1us; 164us; 1us; 164us; 1us; 164us; 1us; 164us; 3us; 165us; 174us; 175us; 1us; 165us; 1us; 165us; 1us; 165us; 1us; 165us; 1us; 165us; 1us; 165us; 1us; 166us; 1us; 166us; 1us; 167us; 1us; 168us; 1us; 169us; 1us; 169us; 1us; 169us; 1us; 170us; 3us; 171us; 172us; 173us; 2us; 171us; 172us; 1us; 171us; 1us; 172us; 2us; 173us; 180us; 1us; 173us; 2us; 174us; 175us; 2us; 174us; 175us; 1us; 174us; 1us; 175us; 2us; 176us; 177us; 2us; 176us; 177us; 1us; 176us; 1us; 177us; 1us; 178us; 1us; 179us; 1us; 179us; 1us; 179us; 1us; 180us; 1us; 180us; 1us; 182us; 1us; 182us; 2us; 183us; 184us; 2us; 183us; 184us; 1us; 183us; 1us; 184us; 2us; 185us; 186us; 1us; 186us; 1us; 186us; 1us; 187us; 1us; 187us; 1us; 187us; 1us; 187us; 1us; 187us; 2us; 188us; 189us; 2us; 188us; 189us; 2us; 188us; 189us; 1us; 188us; 1us; 188us; 1us; 189us; 2us; 190us; 191us; 1us; 191us; 10us; 192us; 193us; 194us; 195us; 196us; 197us; 198us; 199us; 200us; 201us; 14us; 192us; 193us; 194us; 195us; 196us; 197us; 198us; 199us; 200us; 201us; 235us; 236us; 237us; 238us; 10us; 192us; 193us; 194us; 195us; 196us; 197us; 198us; 199us; 200us; 201us; 14us; 192us; 193us; 194us; 195us; 196us; 197us; 198us; 199us; 200us; 201us; 235us; 236us; 237us; 238us; 1us; 192us; 1us; 193us; 1us; 194us; 1us; 194us; 1us; 194us; 1us; 195us; 5us; 195us; 730us; 731us; 732us; 733us; 1us; 195us; 1us; 196us; 1us; 196us; 1us; 196us; 1us; 196us; 1us; 196us; 1us; 196us; 1us; 196us; 1us; 196us; 1us; 197us; 1us; 198us; 1us; 198us; 1us; 199us; 1us; 199us; 1us; 200us; 1us; 200us; 1us; 200us; 1us; 200us; 1us; 200us; 1us; 200us; 1us; 201us; 1us; 201us; 1us; 202us; 1us; 203us; 1us; 203us; 1us; 205us; 1us; 206us; 1us; 207us; 1us; 208us; 1us; 209us; 1us; 211us; 1us; 211us; 1us; 211us; 1us; 213us; 1us; 213us; 1us; 213us; 1us; 215us; 1us; 215us; 1us; 215us; 2us; 217us; 218us; 6us; 217us; 218us; 730us; 731us; 732us; 733us; 1us; 217us; 1us; 218us; 1us; 218us; 1us; 218us; 1us; 219us; 1us; 221us; 1us; 221us; 1us; 222us; 2us; 224us; 225us; 1us; 224us; 1us; 225us; 2us; 226us; 227us; 2us; 226us; 227us; 1us; 226us; 1us; 227us; 1us; 228us; 2us; 229us; 230us; 2us; 229us; 230us; 1us; 229us; 2us; 231us; 232us; 3us; 231us; 232us; 343us; 2us; 231us; 232us; 1us; 231us; 1us; 231us; 1us; 232us; 1us; 233us; 1us; 234us; 4us; 235us; 236us; 237us; 238us; 4us; 235us; 236us; 237us; 238us; 1us; 235us; 1us; 236us; 1us; 237us; 5us; 238us; 734us; 751us; 752us; 754us; 1us; 238us; 1us; 238us; 3us; 239us; 240us; 241us; 2us; 239us; 240us; 1us; 239us; 1us; 240us; 1us; 241us; 1us; 241us; 2us; 242us; 748us; 1us; 242us; 1us; 242us; 1us; 243us; 1us; 244us; 1us; 245us; 1us; 246us; 1us; 247us; 3us; 248us; 249us; 250us; 4us; 248us; 250us; 783us; 784us; 1us; 249us; 3us; 249us; 783us; 784us; 1us; 250us; 1us; 251us; 1us; 252us; 2us; 252us; 253us; 1us; 252us; 2us; 253us; 256us; 3us; 253us; 257us; 259us; 1us; 253us; 2us; 253us; 257us; 1us; 253us; 1us; 254us; 1us; 255us; 1us; 255us; 1us; 256us; 1us; 256us; 1us; 256us; 1us; 256us; 1us; 257us; 1us; 258us; 1us; 261us; 1us; 261us; 1us; 261us; 1us; 261us; 1us; 261us; 1us; 262us; 2us; 264us; 399us; 1us; 267us; 2us; 267us; 268us; 2us; 268us; 696us; 2us; 268us; 698us; 1us; 268us; 1us; 268us; 1us; 269us; 1us; 270us; 1us; 270us; 1us; 270us; 1us; 270us; 7us; 271us; 272us; 273us; 274us; 275us; 277us; 278us; 1us; 271us; 1us; 271us; 6us; 272us; 273us; 274us; 275us; 277us; 278us; 1us; 272us; 2us; 273us; 278us; 1us; 273us; 1us; 274us; 1us; 275us; 1us; 275us; 1us; 275us; 1us; 276us; 1us; 276us; 1us; 276us; 1us; 276us; 1us; 276us; 1us; 276us; 1us; 276us; 1us; 276us; 1us; 276us; 1us; 277us; 1us; 277us; 1us; 278us; 1us; 279us; 1us; 279us; 1us; 280us; 1us; 280us; 1us; 280us; 2us; 281us; 294us; 1us; 282us; 2us; 283us; 284us; 1us; 283us; 1us; 283us; 4us; 285us; 286us; 287us; 288us; 4us; 285us; 286us; 287us; 288us; 4us; 285us; 286us; 287us; 288us; 1us; 285us; 1us; 286us; 1us; 286us; 1us; 286us; 1us; 287us; 1us; 287us; 1us; 287us; 1us; 288us; 1us; 288us; 1us; 288us; 1us; 289us; 5us; 290us; 291us; 785us; 787us; 788us; 1us; 290us; 1us; 290us; 1us; 291us; 1us; 291us; 1us; 291us; 5us; 292us; 293us; 295us; 296us; 782us; 1us; 292us; 2us; 293us; 296us; 2us; 293us; 296us; 2us; 293us; 296us; 1us; 294us; 1us; 295us; 1us; 295us; 1us; 297us; 6us; 298us; 299us; 730us; 731us; 732us; 733us; 1us; 298us; 1us; 298us; 2us; 300us; 301us; 2us; 300us; 856us; 1us; 300us; 1us; 301us; 1us; 302us; 1us; 302us; 1us; 303us; 1us; 303us; 1us; 303us; 1us; 303us; 1us; 303us; 1us; 304us; 1us; 304us; 1us; 305us; 1us; 305us; 1us; 306us; 1us; 307us; 1us; 307us; 1us; 307us; 1us; 307us; 1us; 307us; 2us; 308us; 309us; 1us; 309us; 1us; 309us; 1us; 311us; 3us; 311us; 783us; 784us; 1us; 312us; 3us; 312us; 783us; 784us; 1us; 313us; 1us; 313us; 1us; 313us; 1us; 314us; 1us; 315us; 1us; 315us; 1us; 316us; 1us; 316us; 1us; 316us; 1us; 316us; 1us; 317us; 1us; 317us; 1us; 317us; 1us; 318us; 1us; 319us; 1us; 320us; 1us; 321us; 1us; 322us; 1us; 323us; 1us; 324us; 1us; 324us; 1us; 324us; 1us; 324us; 1us; 324us; 1us; 324us; 1us; 324us; 1us; 324us; 2us; 325us; 328us; 2us; 326us; 329us; 1us; 328us; 1us; 328us; 1us; 329us; 1us; 329us; 2us; 330us; 331us; 5us; 330us; 331us; 333us; 334us; 335us; 1us; 331us; 3us; 332us; 783us; 784us; 4us; 333us; 334us; 335us; 337us; 1us; 333us; 1us; 333us; 1us; 333us; 1us; 334us; 1us; 335us; 1us; 336us; 2us; 336us; 338us; 1us; 336us; 2us; 337us; 338us; 1us; 339us; 1us; 339us; 1us; 340us; 1us; 340us; 1us; 340us; 1us; 342us; 1us; 342us; 1us; 343us; 1us; 343us; 1us; 344us; 2us; 345us; 346us; 2us; 345us; 346us; 2us; 345us; 346us; 2us; 345us; 346us; 2us; 345us; 346us; 1us; 345us; 1us; 346us; 2us; 347us; 348us; 2us; 347us; 348us; 1us; 347us; 1us; 348us; 1us; 349us; 1us; 350us; 2us; 350us; 351us; 1us; 351us; 1us; 353us; 2us; 353us; 354us; 1us; 353us; 1us; 353us; 1us; 354us; 1us; 354us; 1us; 355us; 1us; 356us; 1us; 356us; 1us; 356us; 1us; 357us; 1us; 358us; 1us; 359us; 1us; 360us; 1us; 361us; 1us; 362us; 1us; 363us; 1us; 364us; 1us; 365us; 1us; 366us; 1us; 367us; 1us; 368us; 1us; 369us; 1us; 370us; 2us; 370us; 408us; 1us; 371us; 1us; 372us; 1us; 373us; 1us; 374us; 2us; 375us; 376us; 1us; 376us; 1us; 376us; 6us; 377us; 389us; 390us; 391us; 396us; 398us; 1us; 378us; 1us; 379us; 1us; 379us; 2us; 380us; 381us; 3us; 380us; 382us; 383us; 1us; 380us; 1us; 380us; 1us; 381us; 1us; 383us; 1us; 383us; 5us; 384us; 385us; 386us; 387us; 388us; 2us; 384us; 386us; 1us; 384us; 1us; 385us; 1us; 386us; 2us; 387us; 462us; 1us; 387us; 1us; 388us; 6us; 389us; 390us; 390us; 391us; 396us; 398us; 6us; 389us; 390us; 391us; 391us; 396us; 398us; 6us; 389us; 390us; 391us; 395us; 396us; 398us; 6us; 389us; 390us; 391us; 396us; 396us; 398us; 6us; 389us; 390us; 391us; 396us; 397us; 398us; 6us; 389us; 390us; 391us; 396us; 398us; 398us; 6us; 389us; 390us; 391us; 396us; 398us; 500us; 7us; 389us; 390us; 391us; 396us; 398us; 501us; 502us; 1us; 389us; 1us; 389us; 1us; 390us; 1us; 391us; 2us; 392us; 395us; 2us; 393us; 397us; 1us; 394us; 1us; 395us; 1us; 396us; 1us; 397us; 1us; 398us; 4us; 399us; 400us; 401us; 414us; 2us; 400us; 401us; 1us; 400us; 1us; 401us; 1us; 401us; 1us; 402us; 3us; 402us; 756us; 757us; 1us; 403us; 3us; 404us; 405us; 406us; 1us; 404us; 1us; 405us; 1us; 405us; 1us; 407us; 1us; 408us; 1us; 408us; 1us; 409us; 1us; 409us; 1us; 409us; 1us; 410us; 1us; 410us; 1us; 410us; 1us; 411us; 1us; 411us; 1us; 411us; 1us; 412us; 1us; 413us; 2us; 413us; 805us; 1us; 413us; 1us; 414us; 1us; 415us; 1us; 416us; 1us; 417us; 1us; 418us; 7us; 419us; 420us; 421us; 422us; 785us; 787us; 788us; 2us; 419us; 420us; 1us; 419us; 1us; 420us; 2us; 421us; 462us; 1us; 421us; 1us; 422us; 8us; 423us; 425us; 426us; 429us; 431us; 432us; 435us; 437us; 8us; 425us; 426us; 426us; 429us; 431us; 432us; 435us; 437us; 8us; 425us; 426us; 429us; 430us; 431us; 432us; 435us; 437us; 8us; 425us; 426us; 429us; 431us; 431us; 432us; 435us; 437us; 8us; 425us; 426us; 429us; 431us; 432us; 434us; 435us; 437us; 8us; 425us; 426us; 429us; 431us; 432us; 435us; 435us; 437us; 8us; 425us; 426us; 429us; 431us; 432us; 435us; 436us; 437us; 8us; 425us; 426us; 429us; 431us; 432us; 435us; 437us; 437us; 8us; 425us; 426us; 429us; 431us; 432us; 435us; 437us; 441us; 9us; 425us; 426us; 429us; 431us; 432us; 435us; 437us; 443us; 444us; 12us; 425us; 426us; 429us; 431us; 432us; 435us; 437us; 497us; 648us; 649us; 650us; 651us; 8us; 425us; 426us; 429us; 431us; 432us; 435us; 437us; 540us; 10us; 425us; 426us; 429us; 431us; 432us; 435us; 437us; 648us; 649us; 650us; 1us; 425us; 1us; 425us; 1us; 426us; 2us; 427us; 434us; 2us; 428us; 436us; 1us; 429us; 1us; 429us; 1us; 430us; 1us; 431us; 1us; 432us; 1us; 432us; 1us; 433us; 1us; 434us; 1us; 435us; 1us; 436us; 1us; 437us; 1us; 438us; 2us; 439us; 440us; 1us; 439us; 2us; 440us; 856us; 1us; 440us; 3us; 441us; 783us; 784us; 1us; 441us; 1us; 443us; 2us; 444us; 856us; 1us; 444us; 2us; 445us; 446us; 2us; 445us; 446us; 1us; 445us; 1us; 446us; 1us; 447us; 1us; 448us; 1us; 448us; 1us; 448us; 22us; 449us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 2us; 450us; 451us; 1us; 450us; 5us; 452us; 453us; 454us; 455us; 456us; 1us; 452us; 1us; 452us; 1us; 453us; 1us; 453us; 1us; 454us; 1us; 454us; 1us; 455us; 1us; 455us; 26us; 457us; 458us; 459us; 460us; 461us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 28us; 457us; 458us; 459us; 460us; 461us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 597us; 598us; 29us; 457us; 458us; 459us; 460us; 461us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 641us; 642us; 643us; 2us; 457us; 458us; 1us; 457us; 1us; 460us; 1us; 460us; 1us; 461us; 1us; 461us; 1us; 461us; 1us; 461us; 1us; 462us; 2us; 462us; 622us; 1us; 463us; 3us; 464us; 465us; 466us; 2us; 464us; 465us; 1us; 464us; 1us; 465us; 1us; 466us; 4us; 467us; 468us; 469us; 470us; 1us; 467us; 1us; 468us; 2us; 469us; 470us; 1us; 469us; 1us; 470us; 1us; 471us; 1us; 472us; 1us; 473us; 2us; 474us; 475us; 2us; 474us; 475us; 1us; 474us; 1us; 475us; 3us; 476us; 477us; 478us; 3us; 476us; 477us; 478us; 1us; 476us; 1us; 477us; 1us; 478us; 1us; 478us; 3us; 479us; 480us; 481us; 23us; 479us; 480us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 1us; 479us; 1us; 480us; 1us; 481us; 1us; 482us; 22us; 482us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 2us; 483us; 484us; 22us; 483us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 5us; 485us; 486us; 487us; 488us; 489us; 25us; 485us; 486us; 487us; 488us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 3us; 485us; 486us; 487us; 2us; 485us; 486us; 1us; 485us; 1us; 486us; 1us; 487us; 1us; 487us; 1us; 488us; 1us; 489us; 1us; 489us; 9us; 490us; 491us; 492us; 493us; 494us; 495us; 496us; 497us; 505us; 4us; 490us; 491us; 492us; 505us; 2us; 490us; 492us; 1us; 490us; 1us; 490us; 1us; 491us; 1us; 492us; 1us; 492us; 3us; 493us; 494us; 495us; 3us; 493us; 494us; 495us; 2us; 493us; 494us; 1us; 493us; 1us; 494us; 1us; 495us; 1us; 495us; 1us; 496us; 1us; 496us; 1us; 496us; 1us; 496us; 1us; 497us; 1us; 497us; 1us; 498us; 22us; 498us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 1us; 499us; 22us; 499us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 1us; 500us; 1us; 500us; 1us; 500us; 1us; 500us; 1us; 500us; 1us; 500us; 2us; 501us; 502us; 2us; 501us; 502us; 2us; 501us; 502us; 2us; 501us; 502us; 2us; 501us; 502us; 1us; 501us; 1us; 502us; 1us; 503us; 1us; 503us; 1us; 503us; 1us; 503us; 1us; 503us; 1us; 504us; 1us; 504us; 1us; 504us; 1us; 505us; 1us; 505us; 1us; 506us; 1us; 506us; 22us; 507us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 524us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 525us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 526us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 527us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 528us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 532us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 545us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 549us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 553us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 556us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 557us; 558us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 558us; 23us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 597us; 598us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 597us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 599us; 25us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 641us; 642us; 643us; 648us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 641us; 23us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 642us; 643us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 643us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 651us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 651us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 664us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 665us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 666us; 22us; 507us; 510us; 511us; 512us; 513us; 514us; 515us; 516us; 517us; 518us; 519us; 520us; 521us; 522us; 523us; 524us; 525us; 526us; 527us; 528us; 558us; 667us; 1us; 507us; 2us; 508us; 529us; 1us; 508us; 1us; 508us; 2us; 509us; 557us; 1us; 510us; 1us; 511us; 1us; 512us; 1us; 513us; 1us; 514us; 1us; 515us; 1us; 516us; 1us; 517us; 1us; 518us; 1us; 519us; 1us; 520us; 1us; 521us; 1us; 522us; 1us; 523us; 1us; 524us; 1us; 525us; 1us; 526us; 1us; 527us; 1us; 528us; 1us; 530us; 1us; 531us; 1us; 531us; 1us; 531us; 1us; 532us; 1us; 533us; 1us; 533us; 2us; 534us; 535us; 2us; 534us; 535us; 1us; 534us; 1us; 535us; 1us; 536us; 2us; 537us; 538us; 1us; 537us; 1us; 538us; 1us; 539us; 1us; 540us; 4us; 541us; 542us; 543us; 544us; 4us; 541us; 542us; 543us; 544us; 2us; 542us; 543us; 1us; 542us; 1us; 543us; 1us; 544us; 1us; 545us; 1us; 547us; 1us; 547us; 1us; 548us; 1us; 548us; 1us; 549us; 2us; 550us; 551us; 2us; 550us; 551us; 2us; 550us; 551us; 1us; 550us; 1us; 551us; 1us; 553us; 2us; 554us; 555us; 2us; 554us; 555us; 2us; 554us; 555us; 1us; 554us; 1us; 555us; 1us; 556us; 1us; 556us; 1us; 557us; 1us; 558us; 1us; 559us; 2us; 559us; 799us; 1us; 559us; 1us; 560us; 2us; 560us; 795us; 1us; 560us; 1us; 561us; 2us; 561us; 798us; 1us; 561us; 1us; 562us; 2us; 562us; 811us; 1us; 562us; 1us; 563us; 2us; 563us; 812us; 1us; 563us; 1us; 564us; 2us; 564us; 806us; 1us; 564us; 1us; 565us; 2us; 565us; 807us; 1us; 565us; 2us; 566us; 567us; 6us; 566us; 567us; 671us; 672us; 673us; 674us; 10us; 566us; 567us; 671us; 672us; 673us; 674us; 730us; 731us; 732us; 733us; 6us; 566us; 567us; 730us; 731us; 732us; 733us; 2us; 566us; 567us; 4us; 566us; 567us; 672us; 673us; 1us; 566us; 3us; 566us; 672us; 673us; 1us; 567us; 1us; 568us; 1us; 568us; 1us; 569us; 1us; 569us; 2us; 570us; 571us; 5us; 570us; 571us; 664us; 665us; 666us; 1us; 571us; 5us; 572us; 575us; 576us; 578us; 581us; 1us; 573us; 5us; 573us; 575us; 576us; 578us; 581us; 5us; 574us; 575us; 576us; 578us; 581us; 5us; 575us; 575us; 576us; 578us; 581us; 5us; 575us; 576us; 577us; 578us; 581us; 1us; 575us; 1us; 576us; 1us; 576us; 1us; 577us; 2us; 577us; 789us; 1us; 578us; 1us; 578us; 1us; 579us; 1us; 579us; 1us; 579us; 1us; 580us; 2us; 580us; 805us; 1us; 580us; 1us; 581us; 1us; 581us; 1us; 582us; 3us; 583us; 584us; 585us; 2us; 583us; 584us; 1us; 583us; 1us; 584us; 1us; 585us; 1us; 585us; 1us; 586us; 1us; 587us; 1us; 588us; 1us; 589us; 5us; 590us; 591us; 785us; 787us; 788us; 1us; 590us; 1us; 590us; 1us; 590us; 1us; 590us; 1us; 591us; 1us; 591us; 5us; 592us; 593us; 594us; 595us; 596us; 1us; 592us; 1us; 592us; 4us; 593us; 594us; 595us; 596us; 1us; 593us; 3us; 594us; 595us; 596us; 3us; 594us; 595us; 596us; 1us; 594us; 2us; 595us; 596us; 2us; 595us; 596us; 1us; 595us; 1us; 596us; 1us; 596us; 1us; 596us; 2us; 597us; 598us; 1us; 599us; 1us; 600us; 1us; 601us; 1us; 602us; 1us; 603us; 1us; 604us; 1us; 605us; 1us; 606us; 1us; 607us; 1us; 608us; 1us; 609us; 4us; 610us; 611us; 612us; 613us; 2us; 610us; 611us; 1us; 610us; 1us; 611us; 1us; 612us; 1us; 612us; 1us; 613us; 3us; 614us; 615us; 616us; 4us; 614us; 615us; 616us; 815us; 2us; 614us; 615us; 1us; 614us; 1us; 615us; 1us; 616us; 1us; 616us; 3us; 617us; 618us; 619us; 2us; 617us; 618us; 1us; 617us; 1us; 618us; 1us; 619us; 1us; 619us; 4us; 620us; 621us; 622us; 623us; 8us; 620us; 621us; 622us; 623us; 630us; 785us; 787us; 788us; 7us; 620us; 621us; 622us; 623us; 785us; 787us; 788us; 2us; 620us; 621us; 1us; 620us; 1us; 621us; 1us; 622us; 1us; 623us; 1us; 625us; 1us; 625us; 1us; 626us; 1us; 626us; 1us; 626us; 1us; 626us; 1us; 626us; 1us; 626us; 1us; 627us; 1us; 628us; 1us; 629us; 2us; 629us; 630us; 1us; 630us; 1us; 630us; 1us; 630us; 3us; 631us; 632us; 633us; 2us; 631us; 632us; 1us; 631us; 1us; 632us; 1us; 633us; 1us; 633us; 1us; 634us; 1us; 635us; 1us; 636us; 1us; 637us; 1us; 639us; 1us; 640us; 1us; 641us; 2us; 642us; 643us; 1us; 643us; 1us; 644us; 1us; 644us; 1us; 645us; 1us; 645us; 1us; 646us; 1us; 646us; 1us; 646us; 1us; 646us; 1us; 647us; 1us; 647us; 1us; 647us; 3us; 648us; 649us; 650us; 1us; 649us; 1us; 650us; 1us; 651us; 1us; 651us; 1us; 652us; 1us; 652us; 1us; 652us; 2us; 652us; 653us; 1us; 652us; 1us; 652us; 1us; 653us; 1us; 656us; 1us; 658us; 1us; 658us; 1us; 658us; 1us; 658us; 2us; 660us; 661us; 1us; 660us; 5us; 661us; 734us; 751us; 752us; 754us; 1us; 661us; 1us; 663us; 5us; 663us; 730us; 731us; 732us; 733us; 1us; 663us; 1us; 663us; 2us; 663us; 667us; 1us; 663us; 1us; 664us; 2us; 664us; 667us; 1us; 664us; 1us; 665us; 3us; 665us; 783us; 784us; 1us; 665us; 2us; 665us; 667us; 1us; 665us; 1us; 666us; 3us; 666us; 783us; 784us; 1us; 666us; 2us; 666us; 667us; 1us; 666us; 1us; 666us; 2us; 667us; 856us; 3us; 667us; 783us; 784us; 1us; 667us; 2us; 669us; 670us; 1us; 669us; 1us; 669us; 1us; 669us; 1us; 670us; 1us; 670us; 1us; 672us; 1us; 675us; 2us; 677us; 679us; 1us; 677us; 1us; 678us; 1us; 678us; 1us; 678us; 1us; 679us; 1us; 679us; 1us; 680us; 1us; 680us; 1us; 682us; 1us; 682us; 1us; 683us; 1us; 683us; 1us; 684us; 5us; 684us; 730us; 731us; 732us; 733us; 1us; 684us; 1us; 684us; 1us; 684us; 1us; 685us; 1us; 686us; 2us; 687us; 688us; 2us; 687us; 688us; 2us; 687us; 688us; 1us; 687us; 1us; 688us; 3us; 689us; 690us; 691us; 3us; 689us; 690us; 691us; 3us; 689us; 690us; 691us; 1us; 689us; 1us; 689us; 1us; 690us; 1us; 690us; 1us; 691us; 1us; 692us; 1us; 692us; 1us; 692us; 2us; 693us; 694us; 2us; 693us; 694us; 2us; 693us; 694us; 1us; 693us; 1us; 694us; 1us; 694us; 2us; 695us; 696us; 1us; 696us; 2us; 697us; 698us; 1us; 698us; 1us; 700us; 1us; 700us; 2us; 701us; 702us; 1us; 701us; 1us; 701us; 2us; 703us; 704us; 1us; 703us; 1us; 703us; 2us; 705us; 706us; 1us; 705us; 1us; 705us; 3us; 707us; 708us; 709us; 6us; 707us; 709us; 730us; 731us; 732us; 733us; 1us; 707us; 5us; 707us; 730us; 731us; 732us; 733us; 1us; 708us; 1us; 708us; 1us; 708us; 5us; 708us; 730us; 731us; 732us; 733us; 6us; 710us; 712us; 730us; 731us; 732us; 733us; 1us; 710us; 5us; 710us; 730us; 731us; 732us; 733us; 1us; 711us; 1us; 711us; 1us; 711us; 5us; 711us; 730us; 731us; 732us; 733us; 3us; 713us; 727us; 736us; 1us; 713us; 1us; 713us; 1us; 714us; 2us; 715us; 716us; 1us; 715us; 1us; 715us; 7us; 717us; 719us; 720us; 730us; 731us; 732us; 733us; 1us; 717us; 1us; 717us; 1us; 718us; 1us; 718us; 1us; 719us; 1us; 719us; 7us; 721us; 722us; 723us; 730us; 731us; 732us; 733us; 1us; 721us; 1us; 721us; 1us; 722us; 1us; 722us; 6us; 724us; 725us; 730us; 731us; 732us; 733us; 1us; 724us; 1us; 724us; 3us; 726us; 783us; 784us; 1us; 727us; 2us; 727us; 736us; 2us; 728us; 729us; 3us; 728us; 729us; 755us; 1us; 728us; 1us; 728us; 1us; 730us; 1us; 731us; 2us; 731us; 877us; 1us; 731us; 1us; 732us; 1us; 733us; 4us; 734us; 751us; 752us; 754us; 1us; 734us; 1us; 734us; 1us; 734us; 1us; 735us; 1us; 736us; 1us; 736us; 2us; 737us; 750us; 1us; 737us; 1us; 737us; 4us; 738us; 739us; 740us; 741us; 1us; 738us; 3us; 739us; 740us; 741us; 1us; 739us; 2us; 740us; 741us; 1us; 740us; 1us; 741us; 1us; 741us; 3us; 742us; 751us; 752us; 1us; 742us; 1us; 742us; 2us; 742us; 743us; 2us; 743us; 762us; 1us; 743us; 1us; 743us; 5us; 745us; 746us; 747us; 756us; 757us; 2us; 746us; 747us; 1us; 746us; 1us; 747us; 1us; 747us; 1us; 748us; 3us; 748us; 756us; 757us; 1us; 749us; 1us; 750us; 3us; 751us; 752us; 754us; 2us; 751us; 752us; 1us; 751us; 1us; 752us; 1us; 753us; 1us; 754us; 1us; 754us; 1us; 755us; 2us; 756us; 757us; 4us; 756us; 757us; 783us; 784us; 1us; 757us; 1us; 758us; 1us; 759us; 1us; 759us; 3us; 760us; 761us; 762us; 1us; 760us; 2us; 761us; 762us; 1us; 761us; 1us; 762us; 1us; 762us; 1us; 762us; 2us; 763us; 764us; 3us; 763us; 775us; 776us; 1us; 763us; 1us; 764us; 1us; 764us; 3us; 765us; 783us; 784us; 1us; 766us; 1us; 767us; 3us; 767us; 775us; 776us; 1us; 767us; 3us; 768us; 769us; 770us; 2us; 769us; 770us; 1us; 769us; 1us; 770us; 1us; 770us; 1us; 771us; 2us; 772us; 773us; 1us; 773us; 1us; 774us; 3us; 775us; 775us; 776us; 3us; 775us; 776us; 776us; 3us; 775us; 776us; 777us; 1us; 775us; 1us; 776us; 1us; 777us; 1us; 778us; 1us; 778us; 1us; 779us; 1us; 780us; 2us; 780us; 792us; 1us; 780us; 1us; 781us; 1us; 782us; 2us; 783us; 784us; 1us; 783us; 1us; 784us; 3us; 785us; 787us; 788us; 1us; 785us; 1us; 785us; 1us; 786us; 3us; 787us; 788us; 818us; 3us; 787us; 788us; 818us; 1us; 787us; 1us; 788us; 1us; 788us; 1us; 788us; 1us; 789us; 1us; 790us; 1us; 791us; 1us; 792us; 1us; 793us; 1us; 794us; 1us; 795us; 1us; 796us; 1us; 797us; 1us; 798us; 1us; 799us; 1us; 800us; 1us; 801us; 1us; 802us; 1us; 803us; 1us; 804us; 1us; 805us; 1us; 806us; 1us; 807us; 1us; 808us; 1us; 809us; 1us; 810us; 1us; 811us; 1us; 812us; 2us; 813us; 814us; 1us; 814us; 1us; 815us; 1us; 815us; 1us; 816us; 1us; 817us; 1us; 817us; 1us; 818us; 1us; 819us; 1us; 820us; 3us; 821us; 823us; 824us; 1us; 822us; 2us; 823us; 824us; 1us; 823us; 1us; 824us; 1us; 825us; 1us; 826us; 1us; 827us; 1us; 828us; 2us; 829us; 830us; 1us; 830us; 1us; 831us; 1us; 832us; 2us; 833us; 834us; 1us; 834us; 1us; 837us; 1us; 837us; 2us; 839us; 841us; 2us; 840us; 842us; 1us; 841us; 1us; 842us; 1us; 843us; 1us; 844us; 1us; 845us; 1us; 846us; 1us; 847us; 1us; 848us; 1us; 850us; 1us; 852us; 1us; 854us; 1us; 856us; 1us; 858us; 1us; 860us; 1us; 862us; 1us; 864us; 1us; 866us; 1us; 867us; 1us; 868us; 1us; 869us; 1us; 870us; 1us; 871us; 1us; 872us; 1us; 873us; 1us; 874us; 1us; 875us; 1us; 876us; 1us; 877us; 1us; 879us; |] -let _fsyacc_stateToProdIdxsTableRowOffsets = [|0us; 2us; 4us; 6us; 8us; 10us; 12us; 14us; 16us; 18us; 20us; 22us; 25us; 27us; 29us; 31us; 33us; 35us; 38us; 40us; 43us; 45us; 48us; 50us; 52us; 54us; 56us; 58us; 60us; 62us; 65us; 67us; 76us; 85us; 108us; 110us; 113us; 115us; 117us; 119us; 123us; 125us; 128us; 130us; 132us; 134us; 138us; 140us; 142us; 144us; 148us; 150us; 154us; 157us; 159us; 162us; 164us; 166us; 168us; 170us; 172us; 175us; 177us; 180us; 182us; 184us; 186us; 188us; 190us; 197us; 204us; 208us; 210us; 212us; 224us; 236us; 239us; 241us; 243us; 245us; 248us; 251us; 254us; 256us; 258us; 260us; 262us; 264us; 275us; 286us; 311us; 314us; 316us; 318us; 321us; 325us; 329us; 334us; 336us; 339us; 341us; 343us; 345us; 347us; 349us; 351us; 359us; 367us; 369us; 374us; 376us; 382us; 384us; 387us; 389us; 391us; 396us; 398us; 400us; 402us; 404us; 406us; 408us; 410us; 414us; 418us; 420us; 424us; 429us; 431us; 433us; 436us; 438us; 440us; 442us; 444us; 448us; 452us; 455us; 457us; 459us; 461us; 464us; 466us; 470us; 472us; 474us; 476us; 478us; 480us; 486us; 492us; 495us; 498us; 500us; 502us; 504us; 506us; 508us; 512us; 514us; 516us; 518us; 520us; 522us; 524us; 526us; 528us; 530us; 532us; 534us; 557us; 560us; 562us; 564us; 566us; 568us; 570us; 572us; 574us; 576us; 578us; 580us; 583us; 585us; 587us; 590us; 592us; 594us; 596us; 598us; 601us; 603us; 607us; 609us; 611us; 613us; 615us; 619us; 621us; 623us; 625us; 627us; 630us; 632us; 634us; 636us; 639us; 641us; 643us; 646us; 648us; 650us; 652us; 656us; 658us; 660us; 662us; 664us; 666us; 668us; 670us; 672us; 674us; 676us; 678us; 680us; 682us; 684us; 688us; 691us; 693us; 695us; 697us; 699us; 702us; 705us; 707us; 709us; 712us; 715us; 717us; 719us; 722us; 725us; 727us; 729us; 731us; 733us; 735us; 737us; 741us; 746us; 748us; 750us; 752us; 754us; 756us; 758us; 760us; 763us; 765us; 767us; 769us; 772us; 775us; 777us; 779us; 782us; 784us; 786us; 794us; 806us; 814us; 826us; 828us; 830us; 832us; 834us; 836us; 838us; 840us; 842us; 844us; 846us; 852us; 854us; 860us; 862us; 864us; 866us; 868us; 870us; 872us; 874us; 876us; 878us; 880us; 882us; 884us; 886us; 888us; 890us; 894us; 896us; 898us; 900us; 902us; 904us; 906us; 908us; 910us; 912us; 916us; 918us; 920us; 922us; 924us; 926us; 928us; 930us; 932us; 934us; 936us; 938us; 940us; 942us; 944us; 948us; 951us; 953us; 955us; 958us; 960us; 963us; 966us; 968us; 970us; 973us; 976us; 978us; 980us; 982us; 984us; 986us; 988us; 990us; 992us; 994us; 996us; 999us; 1002us; 1004us; 1006us; 1009us; 1011us; 1013us; 1015us; 1017us; 1019us; 1021us; 1023us; 1026us; 1029us; 1032us; 1034us; 1036us; 1038us; 1041us; 1043us; 1054us; 1069us; 1080us; 1095us; 1097us; 1099us; 1101us; 1103us; 1105us; 1107us; 1113us; 1115us; 1117us; 1119us; 1121us; 1123us; 1125us; 1127us; 1129us; 1131us; 1133us; 1135us; 1137us; 1139us; 1141us; 1143us; 1145us; 1147us; 1149us; 1151us; 1153us; 1155us; 1157us; 1159us; 1161us; 1163us; 1165us; 1167us; 1169us; 1171us; 1173us; 1175us; 1177us; 1179us; 1181us; 1183us; 1185us; 1187us; 1189us; 1191us; 1194us; 1201us; 1203us; 1205us; 1207us; 1209us; 1211us; 1213us; 1215us; 1217us; 1220us; 1222us; 1224us; 1227us; 1230us; 1232us; 1234us; 1236us; 1239us; 1242us; 1244us; 1247us; 1251us; 1254us; 1256us; 1258us; 1260us; 1262us; 1264us; 1269us; 1274us; 1276us; 1278us; 1280us; 1286us; 1288us; 1290us; 1294us; 1297us; 1299us; 1301us; 1303us; 1305us; 1308us; 1310us; 1312us; 1314us; 1316us; 1318us; 1320us; 1322us; 1326us; 1331us; 1333us; 1337us; 1339us; 1341us; 1343us; 1346us; 1348us; 1351us; 1355us; 1357us; 1360us; 1362us; 1364us; 1366us; 1368us; 1370us; 1372us; 1374us; 1376us; 1378us; 1380us; 1382us; 1384us; 1386us; 1388us; 1390us; 1392us; 1395us; 1397us; 1400us; 1403us; 1406us; 1408us; 1410us; 1412us; 1414us; 1416us; 1418us; 1420us; 1428us; 1430us; 1432us; 1439us; 1441us; 1444us; 1446us; 1448us; 1450us; 1452us; 1454us; 1456us; 1458us; 1460us; 1462us; 1464us; 1466us; 1468us; 1470us; 1472us; 1474us; 1476us; 1478us; 1480us; 1482us; 1484us; 1486us; 1488us; 1491us; 1493us; 1496us; 1498us; 1500us; 1505us; 1510us; 1515us; 1517us; 1519us; 1521us; 1523us; 1525us; 1527us; 1529us; 1531us; 1533us; 1535us; 1537us; 1543us; 1545us; 1547us; 1549us; 1551us; 1553us; 1559us; 1561us; 1564us; 1567us; 1570us; 1572us; 1574us; 1576us; 1578us; 1585us; 1587us; 1589us; 1592us; 1595us; 1597us; 1599us; 1601us; 1603us; 1605us; 1607us; 1609us; 1611us; 1613us; 1615us; 1617us; 1619us; 1621us; 1623us; 1625us; 1627us; 1629us; 1631us; 1633us; 1636us; 1638us; 1640us; 1642us; 1646us; 1648us; 1652us; 1654us; 1656us; 1658us; 1660us; 1662us; 1664us; 1666us; 1668us; 1670us; 1672us; 1674us; 1676us; 1678us; 1680us; 1682us; 1684us; 1686us; 1688us; 1690us; 1692us; 1694us; 1696us; 1698us; 1700us; 1702us; 1704us; 1706us; 1709us; 1712us; 1714us; 1716us; 1718us; 1720us; 1723us; 1729us; 1731us; 1735us; 1740us; 1742us; 1744us; 1746us; 1748us; 1750us; 1752us; 1755us; 1757us; 1760us; 1762us; 1764us; 1766us; 1768us; 1770us; 1772us; 1774us; 1776us; 1778us; 1780us; 1783us; 1786us; 1789us; 1792us; 1795us; 1797us; 1799us; 1802us; 1805us; 1807us; 1809us; 1811us; 1813us; 1816us; 1818us; 1820us; 1823us; 1825us; 1827us; 1829us; 1831us; 1833us; 1835us; 1837us; 1839us; 1841us; 1843us; 1845us; 1847us; 1849us; 1851us; 1853us; 1855us; 1857us; 1859us; 1861us; 1863us; 1865us; 1867us; 1870us; 1872us; 1874us; 1876us; 1878us; 1881us; 1883us; 1885us; 1892us; 1894us; 1896us; 1898us; 1901us; 1905us; 1907us; 1909us; 1911us; 1913us; 1915us; 1921us; 1924us; 1926us; 1928us; 1930us; 1933us; 1935us; 1937us; 1944us; 1951us; 1958us; 1965us; 1972us; 1979us; 1986us; 1994us; 1996us; 1998us; 2000us; 2002us; 2005us; 2008us; 2010us; 2012us; 2014us; 2016us; 2018us; 2023us; 2026us; 2028us; 2030us; 2032us; 2034us; 2038us; 2040us; 2044us; 2046us; 2048us; 2050us; 2052us; 2054us; 2056us; 2058us; 2060us; 2062us; 2064us; 2066us; 2068us; 2070us; 2072us; 2074us; 2076us; 2078us; 2081us; 2083us; 2085us; 2087us; 2089us; 2091us; 2093us; 2101us; 2104us; 2106us; 2108us; 2111us; 2113us; 2115us; 2124us; 2133us; 2142us; 2151us; 2160us; 2169us; 2178us; 2187us; 2196us; 2206us; 2219us; 2228us; 2239us; 2241us; 2243us; 2245us; 2248us; 2251us; 2253us; 2255us; 2257us; 2259us; 2261us; 2263us; 2265us; 2267us; 2269us; 2271us; 2273us; 2275us; 2278us; 2280us; 2283us; 2285us; 2289us; 2291us; 2293us; 2296us; 2298us; 2301us; 2304us; 2306us; 2308us; 2310us; 2312us; 2314us; 2316us; 2339us; 2342us; 2344us; 2350us; 2352us; 2354us; 2356us; 2358us; 2360us; 2362us; 2364us; 2366us; 2393us; 2422us; 2452us; 2455us; 2457us; 2459us; 2461us; 2463us; 2465us; 2467us; 2469us; 2471us; 2474us; 2476us; 2480us; 2483us; 2485us; 2487us; 2489us; 2494us; 2496us; 2498us; 2501us; 2503us; 2505us; 2507us; 2509us; 2511us; 2514us; 2517us; 2519us; 2521us; 2525us; 2529us; 2531us; 2533us; 2535us; 2537us; 2541us; 2565us; 2567us; 2569us; 2571us; 2573us; 2596us; 2599us; 2622us; 2628us; 2654us; 2658us; 2661us; 2663us; 2665us; 2667us; 2669us; 2671us; 2673us; 2675us; 2685us; 2690us; 2693us; 2695us; 2697us; 2699us; 2701us; 2703us; 2707us; 2711us; 2714us; 2716us; 2718us; 2720us; 2722us; 2724us; 2726us; 2728us; 2730us; 2732us; 2734us; 2736us; 2759us; 2761us; 2784us; 2786us; 2788us; 2790us; 2792us; 2794us; 2796us; 2799us; 2802us; 2805us; 2808us; 2811us; 2813us; 2815us; 2817us; 2819us; 2821us; 2823us; 2825us; 2827us; 2829us; 2831us; 2833us; 2835us; 2837us; 2839us; 2862us; 2885us; 2908us; 2931us; 2954us; 2977us; 3000us; 3023us; 3046us; 3069us; 3092us; 3115us; 3138us; 3161us; 3184us; 3207us; 3230us; 3253us; 3276us; 3299us; 3322us; 3345us; 3368us; 3391us; 3414us; 3437us; 3460us; 3484us; 3507us; 3530us; 3556us; 3579us; 3603us; 3626us; 3649us; 3672us; 3695us; 3718us; 3741us; 3764us; 3766us; 3769us; 3771us; 3773us; 3776us; 3778us; 3780us; 3782us; 3784us; 3786us; 3788us; 3790us; 3792us; 3794us; 3796us; 3798us; 3800us; 3802us; 3804us; 3806us; 3808us; 3810us; 3812us; 3814us; 3816us; 3818us; 3820us; 3822us; 3824us; 3826us; 3828us; 3831us; 3834us; 3836us; 3838us; 3840us; 3843us; 3845us; 3847us; 3849us; 3851us; 3856us; 3861us; 3864us; 3866us; 3868us; 3870us; 3872us; 3874us; 3876us; 3878us; 3880us; 3882us; 3885us; 3888us; 3891us; 3893us; 3895us; 3897us; 3900us; 3903us; 3906us; 3908us; 3910us; 3912us; 3914us; 3916us; 3918us; 3920us; 3923us; 3925us; 3927us; 3930us; 3932us; 3934us; 3937us; 3939us; 3941us; 3944us; 3946us; 3948us; 3951us; 3953us; 3955us; 3958us; 3960us; 3962us; 3965us; 3967us; 3970us; 3977us; 3988us; 3995us; 3998us; 4003us; 4005us; 4009us; 4011us; 4013us; 4015us; 4017us; 4019us; 4022us; 4028us; 4030us; 4036us; 4038us; 4044us; 4050us; 4056us; 4062us; 4064us; 4066us; 4068us; 4070us; 4073us; 4075us; 4077us; 4079us; 4081us; 4083us; 4085us; 4088us; 4090us; 4092us; 4094us; 4096us; 4100us; 4103us; 4105us; 4107us; 4109us; 4111us; 4113us; 4115us; 4117us; 4119us; 4125us; 4127us; 4129us; 4131us; 4133us; 4135us; 4137us; 4143us; 4145us; 4147us; 4152us; 4154us; 4158us; 4162us; 4164us; 4167us; 4170us; 4172us; 4174us; 4176us; 4178us; 4181us; 4183us; 4185us; 4187us; 4189us; 4191us; 4193us; 4195us; 4197us; 4199us; 4201us; 4203us; 4208us; 4211us; 4213us; 4215us; 4217us; 4219us; 4221us; 4225us; 4230us; 4233us; 4235us; 4237us; 4239us; 4241us; 4245us; 4248us; 4250us; 4252us; 4254us; 4256us; 4261us; 4270us; 4278us; 4281us; 4283us; 4285us; 4287us; 4289us; 4291us; 4293us; 4295us; 4297us; 4299us; 4301us; 4303us; 4305us; 4307us; 4309us; 4311us; 4314us; 4316us; 4318us; 4320us; 4324us; 4327us; 4329us; 4331us; 4333us; 4335us; 4337us; 4339us; 4341us; 4343us; 4345us; 4347us; 4349us; 4352us; 4354us; 4356us; 4358us; 4360us; 4362us; 4364us; 4366us; 4368us; 4370us; 4372us; 4374us; 4376us; 4380us; 4382us; 4384us; 4386us; 4388us; 4390us; 4392us; 4394us; 4397us; 4399us; 4401us; 4403us; 4405us; 4407us; 4409us; 4411us; 4413us; 4416us; 4418us; 4424us; 4426us; 4428us; 4434us; 4436us; 4438us; 4441us; 4443us; 4445us; 4448us; 4450us; 4452us; 4456us; 4458us; 4461us; 4463us; 4465us; 4469us; 4471us; 4474us; 4476us; 4478us; 4481us; 4485us; 4487us; 4490us; 4492us; 4494us; 4496us; 4498us; 4500us; 4502us; 4504us; 4507us; 4509us; 4511us; 4513us; 4515us; 4517us; 4519us; 4521us; 4523us; 4525us; 4527us; 4529us; 4531us; 4533us; 4539us; 4541us; 4543us; 4545us; 4547us; 4549us; 4552us; 4555us; 4558us; 4560us; 4562us; 4566us; 4570us; 4574us; 4576us; 4578us; 4580us; 4582us; 4584us; 4586us; 4588us; 4590us; 4593us; 4596us; 4599us; 4601us; 4603us; 4605us; 4608us; 4610us; 4613us; 4615us; 4617us; 4619us; 4622us; 4624us; 4626us; 4629us; 4631us; 4633us; 4636us; 4638us; 4640us; 4644us; 4651us; 4653us; 4659us; 4661us; 4663us; 4665us; 4671us; 4678us; 4680us; 4686us; 4688us; 4690us; 4692us; 4698us; 4702us; 4704us; 4706us; 4708us; 4711us; 4713us; 4715us; 4723us; 4725us; 4727us; 4729us; 4731us; 4733us; 4735us; 4743us; 4745us; 4747us; 4749us; 4751us; 4758us; 4760us; 4762us; 4766us; 4768us; 4771us; 4774us; 4778us; 4780us; 4782us; 4784us; 4786us; 4789us; 4791us; 4793us; 4795us; 4800us; 4802us; 4804us; 4806us; 4808us; 4810us; 4812us; 4815us; 4817us; 4819us; 4824us; 4826us; 4830us; 4832us; 4835us; 4837us; 4839us; 4841us; 4845us; 4847us; 4849us; 4852us; 4855us; 4857us; 4859us; 4865us; 4868us; 4870us; 4872us; 4874us; 4876us; 4880us; 4882us; 4884us; 4888us; 4891us; 4893us; 4895us; 4897us; 4899us; 4901us; 4903us; 4906us; 4911us; 4913us; 4915us; 4917us; 4919us; 4923us; 4925us; 4928us; 4930us; 4932us; 4934us; 4936us; 4939us; 4943us; 4945us; 4947us; 4949us; 4953us; 4955us; 4957us; 4961us; 4963us; 4967us; 4970us; 4972us; 4974us; 4976us; 4978us; 4981us; 4983us; 4985us; 4989us; 4993us; 4997us; 4999us; 5001us; 5003us; 5005us; 5007us; 5009us; 5011us; 5014us; 5016us; 5018us; 5020us; 5023us; 5025us; 5027us; 5031us; 5033us; 5035us; 5037us; 5041us; 5045us; 5047us; 5049us; 5051us; 5053us; 5055us; 5057us; 5059us; 5061us; 5063us; 5065us; 5067us; 5069us; 5071us; 5073us; 5075us; 5077us; 5079us; 5081us; 5083us; 5085us; 5087us; 5089us; 5091us; 5093us; 5095us; 5097us; 5099us; 5101us; 5104us; 5106us; 5108us; 5110us; 5112us; 5114us; 5116us; 5118us; 5120us; 5122us; 5126us; 5128us; 5131us; 5133us; 5135us; 5137us; 5139us; 5141us; 5143us; 5146us; 5148us; 5150us; 5152us; 5155us; 5157us; 5159us; 5161us; 5164us; 5167us; 5169us; 5171us; 5173us; 5175us; 5177us; 5179us; 5181us; 5183us; 5185us; 5187us; 5189us; 5191us; 5193us; 5195us; 5197us; 5199us; 5201us; 5203us; 5205us; 5207us; 5209us; 5211us; 5213us; 5215us; 5217us; 5219us; 5221us; 5223us; |] -let _fsyacc_action_rows = 1574 -let _fsyacc_actionTableElements = [|11us; 16431us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 63us; 184us; 78us; 9us; 91us; 157us; 98us; 16486us; 99us; 16486us; 109us; 16486us; 137us; 16486us; 180us; 39us; 0us; 49152us; 74us; 16436us; 21us; 16486us; 22us; 16486us; 26us; 16486us; 27us; 16486us; 28us; 16486us; 29us; 16486us; 32us; 16486us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 52us; 16486us; 61us; 16486us; 62us; 16486us; 63us; 184us; 64us; 16486us; 65us; 16486us; 76us; 16486us; 78us; 9us; 79us; 16486us; 80us; 16486us; 82us; 16486us; 86us; 16486us; 90us; 16486us; 91us; 602us; 96us; 16486us; 97us; 16486us; 98us; 16486us; 103us; 16486us; 104us; 16486us; 107us; 16486us; 109us; 16486us; 110us; 16486us; 111us; 16486us; 112us; 16486us; 113us; 16486us; 114us; 16486us; 117us; 16486us; 120us; 16486us; 122us; 16486us; 123us; 16486us; 133us; 16486us; 134us; 16486us; 135us; 16486us; 137us; 16486us; 141us; 16486us; 142us; 16486us; 145us; 16486us; 146us; 16486us; 147us; 16486us; 148us; 16486us; 149us; 16486us; 150us; 16486us; 151us; 16486us; 152us; 16486us; 153us; 16486us; 154us; 16486us; 155us; 16486us; 156us; 16486us; 157us; 16486us; 158us; 16486us; 159us; 16486us; 160us; 16486us; 161us; 16486us; 162us; 16486us; 163us; 16486us; 165us; 16486us; 166us; 16486us; 168us; 16486us; 169us; 16486us; 172us; 16486us; 177us; 16486us; 178us; 16486us; 179us; 16486us; 180us; 45us; 0us; 49152us; 7us; 16486us; 10us; 15us; 18us; 8us; 58us; 14us; 63us; 184us; 74us; 7us; 78us; 9us; 91us; 602us; 0us; 49152us; 0us; 16387us; 0us; 16388us; 0us; 16389us; 1us; 32768us; 177us; 10us; 0us; 16392us; 1us; 16390us; 178us; 12us; 0us; 16391us; 0us; 16393us; 0us; 16394us; 0us; 16395us; 0us; 16396us; 4us; 32768us; 10us; 15us; 18us; 1538us; 58us; 14us; 74us; 1537us; 0us; 16397us; 4us; 32768us; 10us; 15us; 18us; 1538us; 58us; 14us; 74us; 1537us; 0us; 16398us; 4us; 32768us; 10us; 15us; 18us; 1538us; 58us; 14us; 74us; 1537us; 0us; 16399us; 5us; 16486us; 10us; 15us; 58us; 14us; 63us; 184us; 78us; 9us; 91us; 602us; 0us; 16400us; 5us; 16486us; 10us; 15us; 58us; 14us; 63us; 184us; 78us; 9us; 91us; 602us; 0us; 16401us; 5us; 16486us; 10us; 15us; 58us; 14us; 63us; 184us; 78us; 9us; 91us; 602us; 0us; 16402us; 12us; 16403us; 29us; 16486us; 32us; 16486us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 63us; 184us; 91us; 602us; 98us; 16486us; 109us; 16486us; 123us; 16486us; 137us; 16486us; 148us; 16486us; 0us; 16404us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 67us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 98us; 112us; 103us; 888us; 104us; 873us; 107us; 1082us; 109us; 591us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 123us; 608us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 137us; 47us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 21us; 16405us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 0us; 16406us; 2us; 32768us; 10us; 36us; 180us; 37us; 0us; 16407us; 1us; 32768us; 10us; 38us; 0us; 16408us; 4us; 16430us; 10us; 40us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 0us; 16409us; 2us; 32768us; 10us; 42us; 180us; 43us; 0us; 16410us; 1us; 32768us; 10us; 44us; 0us; 16411us; 4us; 16441us; 10us; 46us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 0us; 16412us; 3us; 16588us; 34us; 407us; 35us; 406us; 36us; 408us; 1us; 32768us; 177us; 1477us; 1us; 16413us; 67us; 1479us; 1us; 32768us; 177us; 1477us; 1us; 16414us; 67us; 1479us; 2us; 16415us; 63us; 184us; 138us; 16486us; 0us; 16416us; 2us; 16418us; 63us; 184us; 138us; 16486us; 0us; 16417us; 1us; 32768us; 138us; 50us; 1us; 17237us; 60us; 1554us; 11us; 16431us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 63us; 184us; 78us; 9us; 91us; 157us; 98us; 16486us; 99us; 16486us; 109us; 16486us; 137us; 16486us; 180us; 79us; 0us; 16419us; 2us; 16420us; 63us; 184us; 138us; 16486us; 0us; 16421us; 2us; 16423us; 63us; 184us; 138us; 16486us; 0us; 16422us; 1us; 32768us; 138us; 50us; 1us; 17237us; 60us; 1554us; 74us; 16436us; 21us; 16486us; 22us; 16486us; 26us; 16486us; 27us; 16486us; 28us; 16486us; 29us; 16486us; 32us; 16486us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 52us; 16486us; 61us; 16486us; 62us; 16486us; 63us; 184us; 64us; 16486us; 65us; 16486us; 76us; 16486us; 78us; 9us; 79us; 16486us; 80us; 16486us; 82us; 16486us; 86us; 16486us; 90us; 16486us; 91us; 602us; 96us; 16486us; 97us; 16486us; 98us; 16486us; 103us; 16486us; 104us; 16486us; 107us; 16486us; 109us; 16486us; 110us; 16486us; 111us; 16486us; 112us; 16486us; 113us; 16486us; 114us; 16486us; 117us; 16486us; 120us; 16486us; 122us; 16486us; 123us; 16486us; 133us; 16486us; 134us; 16486us; 135us; 16486us; 137us; 16486us; 141us; 16486us; 142us; 16486us; 145us; 16486us; 146us; 16486us; 147us; 16486us; 148us; 16486us; 149us; 16486us; 150us; 16486us; 151us; 16486us; 152us; 16486us; 153us; 16486us; 154us; 16486us; 155us; 16486us; 156us; 16486us; 157us; 16486us; 158us; 16486us; 159us; 16486us; 160us; 16486us; 161us; 16486us; 162us; 16486us; 163us; 16486us; 165us; 16486us; 166us; 16486us; 168us; 16486us; 169us; 16486us; 172us; 16486us; 177us; 16486us; 178us; 16486us; 179us; 16486us; 180us; 93us; 0us; 16424us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 4us; 32768us; 98us; 204us; 99us; 159us; 109us; 591us; 137us; 47us; 13us; 16431us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 60us; 1570us; 63us; 184us; 68us; 1569us; 78us; 9us; 91us; 157us; 98us; 16486us; 99us; 16486us; 109us; 16486us; 137us; 16486us; 180us; 79us; 0us; 16425us; 0us; 16426us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 67us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 98us; 112us; 103us; 888us; 104us; 873us; 107us; 1082us; 109us; 591us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 123us; 608us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 137us; 47us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 76us; 16436us; 21us; 16486us; 22us; 16486us; 26us; 16486us; 27us; 16486us; 28us; 16486us; 29us; 16486us; 32us; 16486us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 52us; 16486us; 60us; 16468us; 61us; 16486us; 62us; 16486us; 63us; 184us; 64us; 16486us; 65us; 16486us; 68us; 141us; 76us; 16486us; 78us; 9us; 79us; 16486us; 80us; 16486us; 82us; 16486us; 86us; 16486us; 90us; 16486us; 91us; 602us; 96us; 16486us; 97us; 16486us; 98us; 16486us; 103us; 16486us; 104us; 16486us; 107us; 16486us; 109us; 16486us; 110us; 16486us; 111us; 16486us; 112us; 16486us; 113us; 16486us; 114us; 16486us; 117us; 16486us; 120us; 16486us; 122us; 16486us; 123us; 16486us; 133us; 16486us; 134us; 16486us; 135us; 16486us; 137us; 16486us; 141us; 16486us; 142us; 16486us; 145us; 16486us; 146us; 16486us; 147us; 16486us; 148us; 16486us; 149us; 16486us; 150us; 16486us; 151us; 16486us; 152us; 16486us; 153us; 16486us; 154us; 16486us; 155us; 16486us; 156us; 16486us; 157us; 16486us; 158us; 16486us; 159us; 16486us; 160us; 16486us; 161us; 16486us; 162us; 16486us; 163us; 16486us; 165us; 16486us; 166us; 16486us; 168us; 16486us; 169us; 16486us; 172us; 16486us; 177us; 16486us; 178us; 16486us; 179us; 16486us; 180us; 93us; 0us; 16427us; 0us; 16428us; 0us; 16429us; 3us; 16430us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 3us; 17222us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 11us; 16434us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 63us; 184us; 78us; 9us; 91us; 157us; 98us; 16486us; 99us; 16486us; 109us; 16486us; 137us; 16486us; 180us; 83us; 0us; 16432us; 3us; 32768us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 4us; 16486us; 63us; 184us; 78us; 9us; 91us; 157us; 180us; 83us; 0us; 16433us; 0us; 16435us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 67us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 98us; 112us; 103us; 888us; 104us; 873us; 107us; 1082us; 109us; 591us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 123us; 608us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 137us; 47us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 24us; 16439us; 18us; 1534us; 52us; 1013us; 53us; 1006us; 58us; 1533us; 60us; 1004us; 69us; 1011us; 73us; 993us; 74us; 1532us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 74us; 16438us; 21us; 16486us; 22us; 16486us; 26us; 16486us; 27us; 16486us; 28us; 16486us; 29us; 16486us; 32us; 16486us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 52us; 16486us; 61us; 16486us; 62us; 16486us; 63us; 184us; 64us; 16486us; 65us; 16486us; 76us; 16486us; 78us; 9us; 79us; 16486us; 80us; 16486us; 82us; 16486us; 86us; 16486us; 90us; 16486us; 91us; 602us; 96us; 16486us; 97us; 16486us; 98us; 16486us; 103us; 16486us; 104us; 16486us; 107us; 16486us; 109us; 16486us; 110us; 16486us; 111us; 16486us; 112us; 16486us; 113us; 16486us; 114us; 16486us; 117us; 16486us; 120us; 16486us; 122us; 16486us; 123us; 16486us; 133us; 16486us; 134us; 16486us; 135us; 16486us; 137us; 16486us; 141us; 16486us; 142us; 16486us; 145us; 16486us; 146us; 16486us; 147us; 16486us; 148us; 16486us; 149us; 16486us; 150us; 16486us; 151us; 16486us; 152us; 16486us; 153us; 16486us; 154us; 16486us; 155us; 16486us; 156us; 16486us; 157us; 16486us; 158us; 16486us; 159us; 16486us; 160us; 16486us; 161us; 16486us; 162us; 16486us; 163us; 16486us; 165us; 16486us; 166us; 16486us; 168us; 16486us; 169us; 16486us; 172us; 16486us; 177us; 16486us; 178us; 16486us; 179us; 16486us; 180us; 93us; 0us; 16437us; 0us; 16440us; 3us; 16441us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 4us; 16441us; 14us; 133us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 4us; 16441us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 128us; 140us; 17us; 16444us; 18us; 1534us; 29us; 16486us; 32us; 16486us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 58us; 1533us; 63us; 184us; 74us; 1532us; 78us; 9us; 91us; 602us; 98us; 16486us; 109us; 16486us; 123us; 16486us; 137us; 16486us; 148us; 16486us; 180us; 100us; 0us; 16442us; 74us; 16445us; 21us; 16486us; 22us; 16486us; 26us; 16486us; 27us; 16486us; 28us; 16486us; 29us; 16486us; 32us; 16486us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 52us; 16486us; 61us; 16486us; 62us; 16486us; 63us; 184us; 64us; 16486us; 65us; 16486us; 76us; 16486us; 78us; 9us; 79us; 16486us; 80us; 16486us; 82us; 16486us; 86us; 16486us; 90us; 16486us; 91us; 602us; 96us; 16486us; 97us; 16486us; 98us; 16486us; 103us; 16486us; 104us; 16486us; 107us; 16486us; 109us; 16486us; 110us; 16486us; 111us; 16486us; 112us; 16486us; 113us; 16486us; 114us; 16486us; 117us; 16486us; 120us; 16486us; 122us; 16486us; 123us; 16486us; 133us; 16486us; 134us; 16486us; 135us; 16486us; 137us; 16486us; 141us; 16486us; 142us; 16486us; 145us; 16486us; 146us; 16486us; 147us; 16486us; 148us; 16486us; 149us; 16486us; 150us; 16486us; 151us; 16486us; 152us; 16486us; 153us; 16486us; 154us; 16486us; 155us; 16486us; 156us; 16486us; 157us; 16486us; 158us; 16486us; 159us; 16486us; 160us; 16486us; 161us; 16486us; 162us; 16486us; 163us; 16486us; 165us; 16486us; 166us; 16486us; 168us; 16486us; 169us; 16486us; 172us; 16486us; 177us; 16486us; 178us; 16486us; 179us; 16486us; 180us; 93us; 0us; 16443us; 3us; 32768us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 4us; 16486us; 63us; 184us; 78us; 9us; 91us; 602us; 180us; 93us; 0us; 16446us; 0us; 16447us; 0us; 16448us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 7us; 32768us; 29us; 610us; 32us; 623us; 98us; 112us; 109us; 591us; 123us; 608us; 137us; 47us; 148us; 604us; 0us; 16449us; 2us; 16449us; 115us; 860us; 180us; 863us; 0us; 16450us; 64us; 16450us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 866us; 0us; 16451us; 1us; 16486us; 63us; 184us; 1us; 16545us; 118us; 299us; 0us; 16452us; 21us; 16486us; 10us; 16546us; 14us; 16546us; 18us; 16546us; 29us; 16546us; 32us; 16546us; 58us; 16546us; 60us; 303us; 63us; 184us; 74us; 16546us; 77us; 144us; 78us; 16546us; 91us; 16546us; 98us; 16546us; 109us; 16546us; 118us; 16546us; 123us; 16546us; 128us; 16546us; 137us; 16546us; 138us; 16546us; 148us; 16546us; 180us; 16546us; 0us; 16453us; 0us; 16454us; 1us; 16468us; 68us; 141us; 1us; 32768us; 60us; 120us; 4us; 32768us; 19us; 127us; 47us; 1565us; 122us; 1566us; 177us; 1477us; 0us; 16455us; 0us; 16456us; 7us; 16486us; 48us; 1567us; 63us; 184us; 78us; 9us; 91us; 157us; 122us; 1568us; 177us; 1477us; 180us; 83us; 2us; 32768us; 14us; 125us; 67us; 1479us; 0us; 16457us; 1us; 16458us; 67us; 1479us; 6us; 16486us; 47us; 1565us; 63us; 184us; 78us; 9us; 91us; 602us; 122us; 1566us; 180us; 94us; 1us; 32768us; 14us; 129us; 0us; 16459us; 3us; 32768us; 10us; 858us; 14us; 131us; 180us; 856us; 0us; 16460us; 0us; 16461us; 0us; 16462us; 0us; 16463us; 1us; 16464us; 67us; 1479us; 74us; 16436us; 21us; 16486us; 22us; 16486us; 26us; 16486us; 27us; 16486us; 28us; 16486us; 29us; 16486us; 32us; 16486us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 52us; 16486us; 61us; 16486us; 62us; 16486us; 63us; 184us; 64us; 16486us; 65us; 16486us; 76us; 16486us; 78us; 9us; 79us; 16486us; 80us; 16486us; 82us; 16486us; 86us; 16486us; 90us; 16486us; 91us; 602us; 96us; 16486us; 97us; 16486us; 98us; 16486us; 103us; 16486us; 104us; 16486us; 107us; 16486us; 109us; 16486us; 110us; 16486us; 111us; 16486us; 112us; 16486us; 113us; 16486us; 114us; 16486us; 117us; 16486us; 120us; 16486us; 122us; 16486us; 123us; 16486us; 133us; 16486us; 134us; 16486us; 135us; 16486us; 137us; 16486us; 141us; 16486us; 142us; 16486us; 145us; 16486us; 146us; 16486us; 147us; 16486us; 148us; 16486us; 149us; 16486us; 150us; 16486us; 151us; 16486us; 152us; 16486us; 153us; 16486us; 154us; 16486us; 155us; 16486us; 156us; 16486us; 157us; 16486us; 158us; 16486us; 159us; 16486us; 160us; 16486us; 161us; 16486us; 162us; 16486us; 163us; 16486us; 165us; 16486us; 166us; 16486us; 168us; 16486us; 169us; 16486us; 172us; 16486us; 177us; 16486us; 178us; 16486us; 179us; 16486us; 180us; 95us; 3us; 32768us; 10us; 858us; 128us; 138us; 180us; 856us; 0us; 16465us; 0us; 16466us; 0us; 16467us; 4us; 32768us; 19us; 171us; 48us; 1567us; 122us; 1568us; 177us; 1477us; 0us; 16469us; 1us; 16470us; 67us; 1479us; 6us; 16486us; 16us; 16565us; 17us; 16565us; 19us; 337us; 63us; 184us; 128us; 16565us; 180us; 345us; 3us; 32768us; 16us; 1547us; 17us; 1548us; 128us; 1549us; 0us; 16471us; 0us; 16472us; 0us; 16473us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 4us; 32768us; 98us; 204us; 99us; 159us; 109us; 591us; 137us; 47us; 2us; 32768us; 60us; 1570us; 68us; 1569us; 4us; 32768us; 19us; 123us; 48us; 1567us; 122us; 1568us; 177us; 1477us; 0us; 16474us; 0us; 16475us; 0us; 16476us; 0us; 16477us; 1us; 32768us; 177us; 1477us; 1us; 16478us; 67us; 1479us; 1us; 16486us; 63us; 184us; 1us; 17247us; 100us; 1559us; 1us; 17249us; 106us; 1560us; 3us; 16588us; 34us; 407us; 35us; 406us; 36us; 408us; 3us; 32768us; 82us; 1482us; 90us; 1485us; 177us; 1477us; 2us; 16647us; 30us; 1573us; 131us; 17264us; 1us; 32768us; 68us; 166us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 1us; 16480us; 60us; 169us; 0us; 16479us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 21us; 16481us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 6us; 16486us; 48us; 1567us; 63us; 184us; 78us; 9us; 91us; 157us; 122us; 1568us; 180us; 83us; 1us; 32768us; 14us; 173us; 0us; 16482us; 11us; 16431us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 63us; 184us; 78us; 9us; 91us; 157us; 98us; 16486us; 99us; 16486us; 109us; 16486us; 137us; 16486us; 180us; 79us; 1us; 32768us; 128us; 176us; 1us; 32768us; 14us; 177us; 0us; 16483us; 11us; 16431us; 34us; 16486us; 35us; 16486us; 36us; 16486us; 63us; 184us; 78us; 9us; 91us; 157us; 98us; 16486us; 99us; 16486us; 109us; 16486us; 137us; 16486us; 180us; 79us; 1us; 32768us; 128us; 180us; 0us; 16484us; 0us; 16485us; 1us; 16487us; 63us; 184us; 0us; 16488us; 4us; 32768us; 98us; 201us; 137us; 200us; 149us; 203us; 177us; 1477us; 2us; 17241us; 18us; 1543us; 74us; 1544us; 1us; 32768us; 46us; 187us; 1us; 17239us; 18us; 1555us; 0us; 16489us; 0us; 16490us; 4us; 17240us; 98us; 201us; 137us; 200us; 149us; 203us; 177us; 1477us; 0us; 16491us; 2us; 17262us; 31us; 1572us; 67us; 1479us; 25us; 17039us; 62us; 1177us; 64us; 1206us; 82us; 1183us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 178us; 703us; 179us; 704us; 0us; 16492us; 1us; 32768us; 68us; 196us; 1us; 32768us; 177us; 1477us; 2us; 17262us; 31us; 1572us; 67us; 1479us; 25us; 17039us; 62us; 1177us; 64us; 1206us; 82us; 1183us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 178us; 703us; 179us; 704us; 0us; 16493us; 0us; 16494us; 0us; 16495us; 30us; 16496us; 18us; 17166us; 31us; 17166us; 46us; 17166us; 62us; 17166us; 64us; 17166us; 67us; 17166us; 74us; 17166us; 82us; 17166us; 96us; 17166us; 110us; 17166us; 122us; 17166us; 135us; 17166us; 142us; 17166us; 151us; 17166us; 152us; 17166us; 153us; 17166us; 154us; 17166us; 155us; 17166us; 156us; 17166us; 157us; 17166us; 158us; 17166us; 159us; 17166us; 160us; 17166us; 161us; 17166us; 162us; 17166us; 163us; 17166us; 165us; 17166us; 166us; 17166us; 178us; 17166us; 179us; 17166us; 0us; 16497us; 1us; 16486us; 63us; 184us; 0us; 16498us; 1us; 16500us; 118us; 207us; 1us; 16486us; 63us; 184us; 0us; 16499us; 2us; 16600us; 60us; 210us; 77us; 416us; 7us; 16486us; 19us; 213us; 39us; 465us; 47us; 467us; 63us; 184us; 101us; 466us; 122us; 238us; 139us; 224us; 0us; 16501us; 0us; 16502us; 10us; 16486us; 10us; 16520us; 14us; 16520us; 19us; 234us; 39us; 465us; 47us; 467us; 63us; 184us; 101us; 466us; 122us; 238us; 139us; 224us; 180us; 16520us; 1us; 17239us; 18us; 1555us; 3us; 16486us; 14us; 16520us; 63us; 184us; 77us; 16520us; 1us; 16600us; 77us; 416us; 1us; 32768us; 14us; 218us; 1us; 16600us; 77us; 416us; 0us; 16503us; 1us; 16600us; 77us; 416us; 0us; 16504us; 0us; 16505us; 0us; 16506us; 1us; 32768us; 108us; 225us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 16507us; 0us; 16508us; 5us; 16486us; 10us; 16520us; 19us; 242us; 63us; 184us; 128us; 16520us; 180us; 232us; 3us; 32768us; 10us; 858us; 128us; 230us; 180us; 856us; 0us; 16509us; 0us; 16510us; 1us; 32768us; 128us; 233us; 0us; 16511us; 4us; 16486us; 10us; 16520us; 14us; 16520us; 63us; 184us; 180us; 16520us; 3us; 32768us; 10us; 858us; 14us; 236us; 180us; 856us; 0us; 16512us; 0us; 16513us; 5us; 16486us; 10us; 16520us; 19us; 242us; 63us; 184us; 128us; 16520us; 180us; 16520us; 3us; 32768us; 10us; 858us; 128us; 240us; 180us; 856us; 0us; 16514us; 0us; 16515us; 4us; 16486us; 10us; 16520us; 14us; 16520us; 63us; 184us; 180us; 16520us; 3us; 32768us; 10us; 858us; 14us; 244us; 180us; 856us; 0us; 16516us; 0us; 16517us; 0us; 16518us; 2us; 17241us; 18us; 1543us; 74us; 1544us; 8us; 16486us; 10us; 16520us; 14us; 16520us; 16us; 16520us; 17us; 16520us; 63us; 184us; 77us; 16520us; 128us; 16520us; 180us; 16520us; 0us; 16519us; 3us; 32768us; 38us; 252us; 98us; 291us; 99us; 289us; 8us; 32768us; 27us; 614us; 29us; 610us; 32us; 623us; 38us; 252us; 98us; 400us; 99us; 392us; 123us; 608us; 148us; 604us; 0us; 16521us; 0us; 16522us; 0us; 16523us; 0us; 16524us; 0us; 16525us; 0us; 16526us; 0us; 16527us; 1us; 16528us; 38us; 260us; 0us; 16529us; 3us; 32768us; 82us; 1482us; 90us; 1485us; 177us; 1477us; 0us; 16531us; 3us; 32768us; 82us; 1482us; 90us; 1485us; 177us; 1477us; 2us; 32768us; 17us; 265us; 180us; 266us; 0us; 16532us; 0us; 16533us; 1us; 16534us; 85us; 268us; 3us; 32768us; 82us; 1482us; 90us; 1485us; 177us; 1477us; 0us; 16535us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 12us; 32768us; 13us; 469us; 37us; 250us; 38us; 253us; 40us; 255us; 41us; 259us; 42us; 256us; 43us; 257us; 45us; 285us; 99us; 287us; 101us; 468us; 105us; 254us; 107us; 293us; 22us; 32768us; 13us; 469us; 37us; 250us; 38us; 253us; 40us; 255us; 41us; 259us; 42us; 256us; 43us; 257us; 45us; 285us; 49us; 540us; 57us; 1398us; 64us; 456us; 78us; 1421us; 81us; 1471us; 82us; 453us; 99us; 287us; 101us; 468us; 105us; 254us; 107us; 293us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 1us; 17247us; 100us; 1559us; 3us; 16588us; 34us; 407us; 35us; 406us; 36us; 408us; 3us; 32768us; 82us; 1482us; 90us; 1485us; 177us; 1477us; 2us; 16647us; 30us; 1573us; 131us; 17264us; 1us; 32768us; 68us; 279us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 2us; 16530us; 23us; 263us; 77us; 261us; 1us; 16480us; 60us; 169us; 0us; 16536us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 6us; 16537us; 31us; 1386us; 61us; 1401us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 6us; 16538us; 31us; 1386us; 61us; 1401us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 1us; 17249us; 106us; 1560us; 0us; 16539us; 1us; 17249us; 106us; 1560us; 0us; 16540us; 1us; 16486us; 63us; 184us; 0us; 16541us; 1us; 32768us; 68us; 294us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 16542us; 3us; 16588us; 34us; 407us; 35us; 406us; 36us; 408us; 1us; 16650us; 75us; 500us; 0us; 16543us; 1us; 16486us; 63us; 184us; 1us; 16545us; 118us; 299us; 0us; 16544us; 36us; 16486us; 10us; 16546us; 13us; 16546us; 14us; 16546us; 16us; 16546us; 17us; 16546us; 18us; 16546us; 27us; 16546us; 29us; 16546us; 32us; 16546us; 37us; 16546us; 38us; 16546us; 40us; 16546us; 41us; 16546us; 42us; 16546us; 43us; 16546us; 45us; 16546us; 58us; 16546us; 60us; 303us; 63us; 184us; 74us; 16546us; 77us; 16546us; 78us; 16546us; 91us; 16546us; 98us; 16546us; 99us; 16546us; 101us; 16546us; 105us; 16546us; 107us; 16546us; 109us; 16546us; 118us; 16546us; 123us; 16546us; 128us; 16546us; 137us; 16546us; 138us; 16546us; 148us; 16546us; 180us; 16546us; 6us; 16486us; 19us; 312us; 39us; 465us; 47us; 467us; 63us; 184us; 101us; 466us; 139us; 323us; 0us; 16547us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 1us; 17262us; 31us; 1572us; 1us; 32768us; 82us; 719us; 1us; 16604us; 119us; 426us; 1us; 32768us; 60us; 310us; 6us; 16486us; 19us; 312us; 39us; 465us; 47us; 467us; 63us; 184us; 101us; 466us; 139us; 323us; 0us; 16548us; 9us; 16486us; 10us; 16565us; 14us; 16565us; 19us; 333us; 39us; 465us; 47us; 467us; 63us; 184us; 101us; 466us; 139us; 323us; 180us; 345us; 1us; 17239us; 18us; 1555us; 4us; 16486us; 14us; 16565us; 63us; 184us; 77us; 16565us; 180us; 345us; 1us; 16598us; 77us; 413us; 1us; 32768us; 14us; 317us; 1us; 16598us; 77us; 413us; 0us; 16549us; 1us; 16598us; 77us; 413us; 0us; 16550us; 0us; 16551us; 0us; 16552us; 1us; 32768us; 108us; 324us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 16553us; 0us; 16554us; 5us; 16486us; 10us; 16565us; 19us; 337us; 63us; 184us; 128us; 16565us; 180us; 331us; 3us; 32768us; 10us; 858us; 128us; 329us; 180us; 856us; 0us; 16555us; 0us; 16556us; 4us; 16486us; 10us; 16565us; 63us; 184us; 128us; 332us; 180us; 345us; 0us; 16557us; 4us; 16486us; 10us; 16565us; 14us; 16565us; 63us; 184us; 180us; 345us; 3us; 32768us; 10us; 858us; 14us; 336us; 180us; 856us; 0us; 16558us; 0us; 16559us; 4us; 16486us; 10us; 16565us; 14us; 16565us; 63us; 184us; 180us; 345us; 3us; 32768us; 10us; 858us; 14us; 340us; 180us; 856us; 0us; 16560us; 0us; 16561us; 0us; 16562us; 2us; 17241us; 18us; 1543us; 74us; 1544us; 8us; 16486us; 10us; 16565us; 14us; 16565us; 16us; 16565us; 17us; 16565us; 63us; 184us; 77us; 16565us; 128us; 16565us; 180us; 345us; 0us; 16563us; 8us; 16486us; 10us; 16565us; 14us; 16565us; 16us; 16565us; 17us; 16565us; 63us; 184us; 77us; 16565us; 128us; 16565us; 180us; 345us; 0us; 16564us; 1us; 17247us; 100us; 1559us; 0us; 16566us; 1us; 17247us; 100us; 1559us; 2us; 32768us; 17us; 351us; 180us; 352us; 0us; 16567us; 0us; 16568us; 1us; 16569us; 118us; 354us; 1us; 17247us; 100us; 1559us; 0us; 16570us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 17083us; 68us; 1330us; 1us; 32768us; 60us; 359us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16571us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 17083us; 68us; 1330us; 3us; 32768us; 23us; 349us; 60us; 364us; 77us; 347us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16572us; 0us; 16573us; 1us; 16574us; 38us; 368us; 0us; 16575us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 17us; 32768us; 13us; 469us; 27us; 614us; 29us; 610us; 32us; 623us; 37us; 251us; 38us; 253us; 40us; 255us; 41us; 367us; 42us; 256us; 43us; 257us; 45us; 419us; 99us; 390us; 101us; 468us; 105us; 254us; 107us; 394us; 123us; 608us; 148us; 604us; 27us; 32768us; 13us; 469us; 27us; 614us; 29us; 610us; 32us; 623us; 37us; 251us; 38us; 253us; 40us; 255us; 41us; 367us; 42us; 256us; 43us; 257us; 45us; 419us; 49us; 540us; 57us; 1398us; 64us; 456us; 78us; 1421us; 81us; 1471us; 82us; 453us; 99us; 390us; 101us; 468us; 105us; 254us; 107us; 394us; 123us; 608us; 148us; 604us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16576us; 0us; 16577us; 1us; 17247us; 100us; 1559us; 1us; 17235us; 16us; 1553us; 0us; 16578us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 7us; 16596us; 31us; 1386us; 61us; 1401us; 77us; 410us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 0us; 16579us; 1us; 17247us; 100us; 1559us; 3us; 32768us; 82us; 1482us; 90us; 1485us; 177us; 1477us; 2us; 16647us; 30us; 1573us; 131us; 17264us; 1us; 32768us; 68us; 385us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 2us; 16530us; 23us; 263us; 77us; 261us; 1us; 17235us; 16us; 1553us; 0us; 16580us; 0us; 16581us; 1us; 17249us; 106us; 1560us; 0us; 16582us; 1us; 17249us; 106us; 1560us; 0us; 16583us; 32us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 16604us; 119us; 426us; 1us; 32768us; 60us; 397us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 17235us; 16us; 1553us; 0us; 16584us; 1us; 16486us; 63us; 184us; 0us; 16585us; 0us; 16586us; 3us; 32768us; 82us; 1482us; 90us; 1485us; 177us; 1477us; 0us; 16587us; 0us; 16589us; 0us; 16590us; 0us; 16591us; 0us; 16592us; 0us; 16593us; 2us; 16486us; 19us; 432us; 63us; 184us; 3us; 32768us; 16us; 1547us; 17us; 1548us; 128us; 1549us; 0us; 16595us; 6us; 16486us; 16us; 16565us; 17us; 16565us; 19us; 337us; 63us; 184us; 128us; 16565us; 180us; 345us; 3us; 32768us; 16us; 1547us; 17us; 1548us; 128us; 1549us; 0us; 16597us; 5us; 16486us; 16us; 16520us; 17us; 16520us; 19us; 242us; 63us; 184us; 128us; 16520us; 3us; 32768us; 16us; 1547us; 17us; 1548us; 128us; 1549us; 0us; 16599us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 32us; 16607us; 31us; 1387us; 61us; 1401us; 62us; 17262us; 64us; 17262us; 81us; 1471us; 82us; 17262us; 96us; 17262us; 103us; 1390us; 110us; 17262us; 119us; 429us; 122us; 17262us; 135us; 17262us; 142us; 17262us; 151us; 17262us; 152us; 17262us; 153us; 17262us; 154us; 17262us; 155us; 17262us; 156us; 17262us; 157us; 17262us; 158us; 17262us; 159us; 17262us; 160us; 17262us; 161us; 17262us; 162us; 17262us; 163us; 17262us; 165us; 17262us; 166us; 17262us; 174us; 1474us; 177us; 1477us; 178us; 17262us; 179us; 17262us; 0us; 16601us; 25us; 32768us; 62us; 1177us; 64us; 1206us; 82us; 1183us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 178us; 703us; 179us; 704us; 1us; 16607us; 119us; 429us; 0us; 16602us; 0us; 16603us; 1us; 32768us; 177us; 1477us; 0us; 16605us; 0us; 16606us; 2us; 32768us; 141us; 431us; 177us; 1477us; 0us; 16608us; 0us; 16609us; 1us; 16486us; 63us; 184us; 3us; 32768us; 10us; 858us; 14us; 434us; 180us; 856us; 0us; 16610us; 0us; 16611us; 0us; 16612us; 2us; 17241us; 18us; 1543us; 74us; 1544us; 11us; 16486us; 10us; 16614us; 13us; 16614us; 14us; 16614us; 16us; 16614us; 17us; 16614us; 18us; 16614us; 51us; 16614us; 63us; 184us; 101us; 16614us; 128us; 16614us; 180us; 16614us; 0us; 16613us; 2us; 32768us; 38us; 446us; 42us; 447us; 3us; 17247us; 38us; 446us; 42us; 447us; 100us; 1559us; 2us; 17247us; 100us; 1559us; 180us; 445us; 1us; 17235us; 16us; 1553us; 0us; 16615us; 0us; 16616us; 0us; 16617us; 0us; 16618us; 3us; 16594us; 34us; 407us; 35us; 406us; 36us; 408us; 10us; 32768us; 49us; 540us; 57us; 1398us; 64us; 456us; 78us; 1421us; 81us; 1471us; 82us; 453us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16619us; 0us; 16620us; 0us; 16621us; 9us; 32768us; 57us; 1398us; 78us; 462us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 180us; 1430us; 1us; 32768us; 83us; 455us; 0us; 16622us; 2us; 16486us; 63us; 184us; 180us; 460us; 3us; 32768us; 10us; 858us; 51us; 458us; 180us; 856us; 0us; 16623us; 0us; 16624us; 1us; 32768us; 51us; 461us; 0us; 16625us; 8us; 32768us; 57us; 1424us; 78us; 1421us; 81us; 1471us; 82us; 1425us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 178us; 463us; 1us; 32768us; 78us; 1571us; 0us; 16626us; 0us; 16627us; 0us; 16628us; 0us; 16629us; 0us; 16630us; 0us; 16631us; 4us; 32768us; 81us; 1471us; 82us; 476us; 174us; 1474us; 177us; 1477us; 3us; 16632us; 30us; 1573us; 67us; 1479us; 131us; 17264us; 1us; 32768us; 177us; 1477us; 1us; 16633us; 67us; 1479us; 0us; 16634us; 0us; 16635us; 1us; 16486us; 63us; 184us; 2us; 32768us; 83us; 478us; 85us; 481us; 0us; 16636us; 2us; 16650us; 75us; 500us; 85us; 481us; 1us; 16643us; 85us; 482us; 1us; 16486us; 63us; 184us; 2us; 16486us; 63us; 184us; 129us; 491us; 0us; 16637us; 0us; 16638us; 2us; 32768us; 81us; 1471us; 174us; 1474us; 0us; 16639us; 1us; 32768us; 131us; 488us; 1us; 16486us; 63us; 184us; 1us; 32768us; 132us; 490us; 0us; 16640us; 0us; 16641us; 0us; 16642us; 1us; 32768us; 131us; 494us; 4us; 16486us; 63us; 184us; 75us; 16644us; 129us; 492us; 132us; 16644us; 1us; 16650us; 75us; 500us; 1us; 32768us; 132us; 497us; 0us; 16645us; 0us; 16646us; 21us; 16648us; 10us; 16783us; 18us; 16783us; 23us; 16783us; 49us; 16783us; 50us; 16783us; 51us; 16783us; 55us; 16783us; 60us; 16783us; 68us; 16783us; 69us; 16783us; 70us; 16783us; 74us; 16783us; 75us; 16783us; 77us; 16783us; 79us; 16783us; 83us; 16783us; 85us; 16783us; 86us; 16783us; 115us; 16783us; 119us; 16783us; 180us; 16783us; 4us; 32768us; 43us; 507us; 81us; 1471us; 82us; 522us; 174us; 1474us; 1us; 16651us; 118us; 504us; 1us; 17080us; 118us; 504us; 1us; 17082us; 118us; 504us; 4us; 32768us; 43us; 507us; 81us; 1471us; 82us; 522us; 174us; 1474us; 0us; 16652us; 0us; 16653us; 2us; 32768us; 81us; 1471us; 174us; 1474us; 1us; 32768us; 68us; 509us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16654us; 2us; 32768us; 68us; 514us; 70us; 512us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16655us; 5us; 32768us; 47us; 515us; 82us; 519us; 135us; 518us; 139us; 531us; 177us; 516us; 0us; 16656us; 3us; 32768us; 30us; 1437us; 47us; 517us; 131us; 1439us; 0us; 16657us; 0us; 16658us; 1us; 16486us; 63us; 184us; 1us; 32768us; 83us; 521us; 0us; 16659us; 2us; 32768us; 81us; 1471us; 174us; 1474us; 1us; 32768us; 92us; 524us; 2us; 32768us; 81us; 1471us; 174us; 1474us; 1us; 32768us; 83us; 526us; 1us; 32768us; 68us; 527us; 1us; 32768us; 82us; 528us; 1us; 16486us; 63us; 184us; 1us; 32768us; 83us; 530us; 0us; 16660us; 2us; 32768us; 30us; 1437us; 131us; 1439us; 0us; 16661us; 0us; 16662us; 1us; 16486us; 63us; 184us; 0us; 16663us; 1us; 32768us; 49us; 540us; 1us; 16486us; 63us; 184us; 0us; 16664us; 2us; 16665us; 18us; 1555us; 49us; 17239us; 0us; 16666us; 1us; 16668us; 49us; 540us; 1us; 16486us; 63us; 184us; 0us; 16667us; 3us; 16588us; 34us; 407us; 35us; 406us; 36us; 408us; 3us; 32768us; 82us; 558us; 90us; 1485us; 177us; 1477us; 4us; 17239us; 18us; 1555us; 60us; 554us; 68us; 551us; 108us; 548us; 0us; 16669us; 8us; 32768us; 57us; 1398us; 64us; 456us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 1us; 17239us; 18us; 1555us; 0us; 16670us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 1us; 17239us; 18us; 1555us; 0us; 16671us; 17us; 32768us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 178us; 703us; 179us; 704us; 1us; 17239us; 18us; 1555us; 0us; 16672us; 0us; 16673us; 29us; 32768us; 49us; 1521us; 52us; 1502us; 53us; 1500us; 60us; 1504us; 61us; 561us; 65us; 1508us; 69us; 559us; 73us; 1512us; 79us; 1509us; 80us; 1510us; 84us; 1503us; 92us; 1505us; 129us; 1516us; 130us; 1511us; 131us; 1506us; 132us; 1507us; 142us; 1518us; 145us; 1514us; 146us; 1515us; 167us; 1513us; 168us; 1501us; 169us; 1498us; 170us; 1497us; 171us; 1499us; 172us; 1492us; 173us; 1496us; 174us; 1495us; 175us; 1494us; 176us; 1493us; 1us; 32768us; 83us; 560us; 0us; 16674us; 1us; 32768us; 50us; 562us; 1us; 32768us; 83us; 563us; 0us; 16675us; 4us; 17166us; 18us; 1555us; 49us; 17239us; 60us; 566us; 108us; 570us; 0us; 16676us; 17us; 32768us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 178us; 703us; 179us; 704us; 1us; 17239us; 18us; 1555us; 39us; 16677us; 10us; 16680us; 13us; 16680us; 14us; 16680us; 16us; 16680us; 17us; 16680us; 18us; 16680us; 27us; 16680us; 29us; 16680us; 32us; 16680us; 34us; 16680us; 35us; 16680us; 36us; 16680us; 37us; 16680us; 38us; 16680us; 40us; 16680us; 41us; 16680us; 42us; 16680us; 43us; 16680us; 45us; 16680us; 58us; 16680us; 63us; 16680us; 74us; 16680us; 77us; 16680us; 78us; 16680us; 83us; 16680us; 91us; 16680us; 98us; 16680us; 99us; 16680us; 101us; 16680us; 105us; 16680us; 107us; 16680us; 109us; 16680us; 118us; 16680us; 123us; 16680us; 128us; 16680us; 137us; 16680us; 138us; 16680us; 148us; 16680us; 180us; 16680us; 0us; 16678us; 8us; 32768us; 57us; 1398us; 64us; 456us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 16679us; 0us; 16681us; 7us; 16683us; 31us; 1386us; 61us; 1401us; 81us; 1471us; 84us; 574us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 16682us; 2us; 17241us; 18us; 1543us; 74us; 1544us; 4us; 16486us; 10us; 17240us; 51us; 17240us; 63us; 184us; 180us; 17240us; 0us; 16684us; 0us; 16685us; 1us; 17249us; 106us; 1560us; 0us; 16686us; 3us; 16588us; 34us; 407us; 35us; 406us; 36us; 408us; 1us; 32768us; 177us; 1477us; 1us; 32768us; 68us; 585us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16687us; 1us; 16598us; 77us; 413us; 0us; 16688us; 1us; 16600us; 77us; 416us; 0us; 16689us; 0us; 16690us; 1us; 16486us; 63us; 184us; 3us; 16588us; 34us; 407us; 35us; 406us; 36us; 408us; 1us; 32768us; 177us; 1477us; 1us; 16694us; 60us; 600us; 0us; 16691us; 1us; 16692us; 108us; 598us; 8us; 32768us; 57us; 1398us; 64us; 456us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 16693us; 1us; 32768us; 177us; 1477us; 1us; 16695us; 67us; 1479us; 1us; 32768us; 177us; 1477us; 1us; 16696us; 67us; 1479us; 1us; 17243us; 93us; 1557us; 3us; 16486us; 63us; 184us; 123us; 656us; 180us; 660us; 0us; 16697us; 0us; 16698us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16699us; 1us; 17243us; 93us; 1557us; 3us; 16486us; 63us; 184us; 123us; 656us; 180us; 660us; 3us; 32768us; 10us; 858us; 16us; 621us; 180us; 856us; 0us; 16700us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 3us; 32768us; 10us; 858us; 16us; 621us; 180us; 856us; 0us; 16701us; 0us; 16702us; 0us; 16703us; 0us; 16704us; 0us; 16705us; 0us; 16706us; 0us; 16707us; 1us; 16486us; 63us; 184us; 3us; 16588us; 34us; 407us; 35us; 406us; 36us; 408us; 1us; 32768us; 177us; 1477us; 1us; 17262us; 31us; 1572us; 1us; 32768us; 82us; 628us; 2us; 16486us; 63us; 184us; 83us; 16711us; 1us; 32768us; 83us; 630us; 0us; 16708us; 1us; 16709us; 85us; 633us; 1us; 16710us; 85us; 635us; 1us; 16486us; 63us; 184us; 0us; 16712us; 1us; 16486us; 63us; 184us; 0us; 16713us; 2us; 32768us; 33us; 647us; 177us; 1477us; 5us; 16714us; 31us; 1572us; 61us; 17262us; 79us; 646us; 84us; 645us; 177us; 1477us; 0us; 16715us; 1us; 16716us; 67us; 1479us; 4us; 16721us; 31us; 1572us; 61us; 17262us; 79us; 646us; 84us; 645us; 1us; 32768us; 61us; 643us; 1us; 32768us; 50us; 644us; 0us; 16717us; 0us; 16718us; 0us; 16719us; 1us; 32768us; 84us; 649us; 1us; 16722us; 84us; 649us; 0us; 16720us; 2us; 32768us; 33us; 648us; 177us; 1477us; 1us; 16725us; 118us; 653us; 0us; 16723us; 3us; 16486us; 63us; 184us; 123us; 656us; 180us; 660us; 1us; 16725us; 118us; 653us; 0us; 16724us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16726us; 1us; 17247us; 100us; 1559us; 0us; 16727us; 0us; 16728us; 1us; 17249us; 106us; 1560us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 17083us; 68us; 1330us; 1us; 32768us; 60us; 665us; 65us; 32768us; 19us; 668us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 667us; 0us; 16729us; 0us; 16730us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 3us; 32768us; 10us; 858us; 14us; 670us; 180us; 856us; 0us; 16731us; 0us; 16732us; 0us; 16733us; 0us; 16736us; 1us; 16734us; 75us; 676us; 0us; 16735us; 3us; 32768us; 81us; 1471us; 96us; 686us; 174us; 1474us; 2us; 32768us; 60us; 678us; 118us; 680us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16737us; 3us; 32768us; 81us; 1471us; 96us; 686us; 174us; 1474us; 0us; 16738us; 0us; 16739us; 1us; 32768us; 68us; 684us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16740us; 0us; 16741us; 0us; 16742us; 0us; 16743us; 0us; 16744us; 0us; 16745us; 0us; 16746us; 0us; 16747us; 0us; 16748us; 0us; 16749us; 0us; 16750us; 0us; 16751us; 0us; 16752us; 0us; 16753us; 0us; 16754us; 1us; 16754us; 129us; 759us; 0us; 16755us; 0us; 16756us; 0us; 16757us; 0us; 16758us; 1us; 16759us; 30us; 706us; 1us; 32768us; 131us; 1446us; 0us; 16760us; 5us; 16761us; 49us; 737us; 69us; 738us; 79us; 745us; 85us; 743us; 119us; 735us; 0us; 16762us; 1us; 32768us; 177us; 1477us; 0us; 16763us; 1us; 16765us; 68us; 714us; 2us; 16766us; 68us; 714us; 85us; 717us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16764us; 3us; 32768us; 63us; 184us; 65us; 710us; 177us; 1477us; 3us; 32768us; 63us; 184us; 65us; 710us; 177us; 1477us; 0us; 16767us; 6us; 32768us; 10us; 858us; 63us; 184us; 65us; 710us; 83us; 722us; 177us; 1477us; 180us; 724us; 3us; 32768us; 10us; 858us; 83us; 721us; 180us; 856us; 0us; 16768us; 0us; 16769us; 0us; 16770us; 1us; 16846us; 83us; 725us; 0us; 16771us; 0us; 16772us; 3us; 16774us; 69us; 738us; 79us; 745us; 85us; 743us; 1us; 16775us; 69us; 738us; 2us; 16779us; 69us; 738us; 79us; 745us; 2us; 16780us; 69us; 738us; 79us; 745us; 1us; 16781us; 69us; 738us; 1us; 16782us; 69us; 738us; 6us; 32768us; 49us; 737us; 60us; 929us; 69us; 738us; 79us; 745us; 85us; 743us; 119us; 735us; 6us; 32768us; 49us; 737us; 60us; 935us; 69us; 738us; 79us; 745us; 85us; 743us; 119us; 735us; 1us; 32768us; 177us; 1477us; 0us; 16773us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 16776us; 85us; 742us; 0us; 16777us; 0us; 16778us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 23us; 16649us; 10us; 16798us; 18us; 16798us; 23us; 16798us; 30us; 1573us; 49us; 16798us; 50us; 16798us; 51us; 16798us; 55us; 16798us; 60us; 16798us; 68us; 16798us; 69us; 16798us; 70us; 16798us; 74us; 16798us; 75us; 16798us; 77us; 16798us; 79us; 16798us; 83us; 16798us; 85us; 16798us; 86us; 16798us; 115us; 16798us; 119us; 16798us; 131us; 17264us; 180us; 16798us; 33us; 32768us; 31us; 749us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16784us; 32us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16785us; 7us; 32768us; 57us; 1424us; 78us; 1421us; 81us; 1471us; 82us; 1425us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 1us; 16786us; 67us; 1433us; 0us; 16787us; 33us; 16790us; 31us; 756us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16788us; 32us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16789us; 0us; 16791us; 1us; 32768us; 153us; 760us; 0us; 16792us; 1us; 32768us; 177us; 1477us; 1us; 32768us; 51us; 763us; 0us; 16793us; 34us; 16826us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 50us; 766us; 0us; 16794us; 34us; 16826us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 55us; 769us; 0us; 16795us; 0us; 16796us; 1us; 32768us; 177us; 1477us; 1us; 17189us; 177us; 1477us; 0us; 16797us; 0us; 16798us; 0us; 16799us; 0us; 16800us; 0us; 16801us; 0us; 16802us; 61us; 16808us; 10us; 858us; 34us; 407us; 35us; 406us; 36us; 408us; 49us; 1521us; 52us; 1502us; 53us; 1500us; 57us; 770us; 60us; 1504us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 772us; 72us; 751us; 73us; 1512us; 79us; 1509us; 80us; 1510us; 82us; 779us; 84us; 1503us; 90us; 1485us; 92us; 1505us; 96us; 777us; 110us; 776us; 129us; 1516us; 130us; 1511us; 131us; 1506us; 132us; 1507us; 135us; 778us; 142us; 1171us; 145us; 1514us; 146us; 1515us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 167us; 1513us; 168us; 1501us; 169us; 1498us; 170us; 1497us; 171us; 1499us; 172us; 1492us; 173us; 1496us; 174us; 1495us; 175us; 1494us; 176us; 1493us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 783us; 3us; 32768us; 10us; 858us; 83us; 781us; 180us; 856us; 0us; 16803us; 0us; 16804us; 1us; 16846us; 83us; 784us; 0us; 16805us; 0us; 16806us; 7us; 16807us; 49us; 801us; 68us; 804us; 69us; 807us; 70us; 808us; 79us; 814us; 85us; 812us; 119us; 799us; 5us; 16810us; 68us; 804us; 69us; 807us; 70us; 808us; 79us; 814us; 85us; 812us; 4us; 16814us; 68us; 804us; 69us; 807us; 70us; 808us; 79us; 814us; 3us; 16815us; 68us; 804us; 69us; 807us; 70us; 808us; 4us; 16818us; 68us; 804us; 69us; 807us; 70us; 808us; 79us; 814us; 4us; 16819us; 68us; 804us; 69us; 807us; 70us; 808us; 79us; 814us; 3us; 16820us; 68us; 804us; 69us; 807us; 70us; 808us; 3us; 16821us; 68us; 804us; 69us; 807us; 70us; 808us; 7us; 16825us; 49us; 801us; 68us; 804us; 69us; 807us; 70us; 808us; 79us; 814us; 85us; 812us; 119us; 799us; 9us; 17241us; 18us; 1543us; 49us; 801us; 68us; 804us; 69us; 807us; 70us; 808us; 74us; 1544us; 79us; 814us; 85us; 812us; 119us; 799us; 10us; 32768us; 49us; 801us; 60us; 1235us; 68us; 804us; 69us; 807us; 70us; 808us; 79us; 814us; 85us; 812us; 115us; 1232us; 119us; 799us; 180us; 922us; 8us; 16930us; 49us; 801us; 68us; 804us; 69us; 807us; 70us; 808us; 75us; 1040us; 79us; 814us; 85us; 812us; 119us; 799us; 8us; 32768us; 49us; 801us; 68us; 804us; 69us; 807us; 70us; 808us; 79us; 814us; 85us; 812us; 115us; 1232us; 119us; 799us; 1us; 32768us; 177us; 1477us; 0us; 16809us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 16811us; 85us; 811us; 1us; 16812us; 79us; 813us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16813us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16816us; 0us; 16817us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16822us; 2us; 17241us; 18us; 1543us; 74us; 1544us; 0us; 16823us; 1us; 17240us; 177us; 1477us; 0us; 16824us; 2us; 32768us; 60us; 821us; 67us; 1479us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16827us; 34us; 16826us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16828us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 3us; 32768us; 10us; 858us; 14us; 827us; 180us; 856us; 0us; 16829us; 0us; 16830us; 0us; 16831us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 14us; 832us; 0us; 16832us; 21us; 16833us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 1us; 16835us; 15us; 835us; 0us; 16834us; 4us; 16840us; 68us; 837us; 70us; 841us; 71us; 843us; 72us; 839us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16836us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16837us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16838us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 16839us; 25us; 16843us; 18us; 1543us; 25us; 852us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 74us; 1544us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 94us; 850us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 26us; 16843us; 18us; 1543us; 25us; 852us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 74us; 1544us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 94us; 850us; 129us; 1151us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 27us; 16843us; 18us; 1543us; 25us; 852us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 74us; 1544us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 94us; 850us; 95us; 1218us; 129us; 1219us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 63us; 16842us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16841us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16844us; 1us; 32768us; 19us; 853us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 14us; 855us; 0us; 16845us; 0us; 16846us; 1us; 16846us; 83us; 1189us; 0us; 16847us; 2us; 32768us; 115us; 860us; 180us; 863us; 64us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 862us; 0us; 16848us; 0us; 16849us; 0us; 16850us; 66us; 32768us; 18us; 867us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 866us; 0us; 16851us; 0us; 16852us; 65us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 869us; 0us; 16853us; 0us; 16854us; 0us; 16855us; 0us; 16856us; 0us; 16857us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 4us; 32768us; 10us; 858us; 23us; 1024us; 77us; 1022us; 180us; 856us; 0us; 16858us; 0us; 16859us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 5us; 32768us; 10us; 858us; 23us; 1024us; 77us; 1022us; 116us; 881us; 180us; 856us; 0us; 16860us; 0us; 16861us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16862us; 65us; 32768us; 10us; 858us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 856us; 25us; 32768us; 10us; 858us; 25us; 1046us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 94us; 1045us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 180us; 856us; 0us; 16863us; 0us; 16864us; 0us; 16865us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16866us; 55us; 16868us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 147us; 928us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16867us; 64us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 901us; 25us; 32768us; 10us; 858us; 27us; 1562us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 123us; 1561us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 180us; 856us; 65us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 898us; 4us; 32768us; 10us; 858us; 16us; 1564us; 124us; 1563us; 180us; 856us; 0us; 16869us; 0us; 16870us; 2us; 32768us; 16us; 1564us; 124us; 1563us; 0us; 16871us; 0us; 16872us; 2us; 32768us; 16us; 1564us; 124us; 1563us; 0us; 16873us; 35us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 918us; 5us; 17239us; 10us; 858us; 18us; 1555us; 27us; 1562us; 123us; 1561us; 180us; 856us; 65us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 909us; 2us; 32768us; 16us; 1564us; 124us; 1563us; 0us; 16874us; 0us; 16875us; 2us; 32768us; 16us; 1564us; 124us; 1563us; 0us; 16876us; 2us; 32768us; 27us; 1562us; 123us; 1561us; 65us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 916us; 4us; 32768us; 10us; 858us; 16us; 1564us; 124us; 1563us; 180us; 856us; 0us; 16877us; 0us; 16878us; 2us; 32768us; 16us; 1564us; 124us; 1563us; 0us; 16879us; 2us; 32768us; 27us; 1562us; 123us; 1561us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 2us; 32768us; 16us; 1564us; 124us; 1563us; 0us; 16880us; 2us; 32768us; 16us; 1564us; 124us; 1563us; 0us; 16881us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 21us; 16882us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 21us; 16883us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 115us; 931us; 1us; 17239us; 18us; 1555us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16884us; 33us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 3us; 32768us; 10us; 858us; 16us; 621us; 180us; 856us; 1us; 17239us; 18us; 1555us; 65us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 940us; 0us; 16885us; 0us; 16886us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 115us; 943us; 1us; 17239us; 18us; 1555us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16887us; 64us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 3us; 32768us; 10us; 858us; 16us; 621us; 180us; 856us; 0us; 16888us; 4us; 32768us; 75us; 1021us; 86us; 1221us; 87us; 1223us; 111us; 1225us; 0us; 16889us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16890us; 21us; 16891us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 17us; 16894us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 8us; 16895us; 52us; 1013us; 69us; 1011us; 84us; 1014us; 146us; 1010us; 169us; 1012us; 171us; 1015us; 174us; 1009us; 176us; 1016us; 17us; 16896us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 15us; 16897us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 84us; 1014us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 15us; 16898us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 84us; 1014us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 8us; 16899us; 52us; 1013us; 69us; 1011us; 84us; 1014us; 146us; 1010us; 169us; 1012us; 171us; 1015us; 174us; 1009us; 176us; 1016us; 8us; 16900us; 52us; 1013us; 69us; 1011us; 84us; 1014us; 146us; 1010us; 169us; 1012us; 171us; 1015us; 174us; 1009us; 176us; 1016us; 8us; 16901us; 52us; 1013us; 69us; 1011us; 84us; 1014us; 146us; 1010us; 169us; 1012us; 171us; 1015us; 174us; 1009us; 176us; 1016us; 8us; 16902us; 52us; 1013us; 69us; 1011us; 84us; 1014us; 146us; 1010us; 169us; 1012us; 171us; 1015us; 174us; 1009us; 176us; 1016us; 8us; 16903us; 52us; 1013us; 69us; 1011us; 84us; 1014us; 146us; 1010us; 169us; 1012us; 171us; 1015us; 174us; 1009us; 176us; 1016us; 8us; 16904us; 52us; 1013us; 69us; 1011us; 84us; 1014us; 146us; 1010us; 169us; 1012us; 171us; 1015us; 174us; 1009us; 176us; 1016us; 8us; 16905us; 52us; 1013us; 69us; 1011us; 84us; 1014us; 146us; 1010us; 169us; 1012us; 171us; 1015us; 174us; 1009us; 176us; 1016us; 1us; 16906us; 176us; 1016us; 7us; 16907us; 52us; 1013us; 69us; 1011us; 84us; 1014us; 146us; 1010us; 169us; 1012us; 171us; 1015us; 176us; 1016us; 4us; 16908us; 84us; 1014us; 146us; 1010us; 171us; 1015us; 176us; 1016us; 4us; 16909us; 84us; 1014us; 146us; 1010us; 171us; 1015us; 176us; 1016us; 1us; 16910us; 176us; 1016us; 1us; 16911us; 176us; 1016us; 1us; 16912us; 176us; 1016us; 21us; 16916us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 21us; 16929us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 21us; 16933us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 21us; 16937us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 23us; 32768us; 25us; 1046us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 94us; 1045us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 19us; 16941us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 19us; 16942us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 22us; 32768us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 129us; 1151us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 20us; 16981us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 20us; 16983us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 23us; 17032us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 95us; 1218us; 129us; 1219us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 21us; 17025us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 22us; 17026us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 129us; 1220us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 21us; 17027us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 23us; 32768us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 95us; 1302us; 125us; 1303us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 21us; 17035us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 21us; 17052us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 21us; 17052us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 21us; 17052us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 21us; 17051us; 52us; 1013us; 53us; 1006us; 60us; 1004us; 69us; 1011us; 73us; 993us; 79us; 1001us; 80us; 1002us; 84us; 1014us; 85us; 1060us; 92us; 1000us; 130us; 998us; 131us; 1007us; 132us; 1008us; 146us; 1010us; 169us; 1012us; 170us; 1003us; 171us; 1015us; 173us; 999us; 174us; 1009us; 175us; 1005us; 176us; 1016us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 16913us; 59us; 995us; 64us; 32768us; 19us; 830us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16892us; 1us; 16893us; 85us; 1059us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16914us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 83us; 1020us; 0us; 16915us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 36us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 49us; 1029us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1032us; 0us; 16917us; 36us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 49us; 1029us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1032us; 3us; 32768us; 10us; 858us; 17us; 1026us; 180us; 856us; 0us; 16918us; 0us; 16919us; 0us; 16920us; 35us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1031us; 0us; 16921us; 0us; 16922us; 0us; 16923us; 0us; 16924us; 1us; 32768us; 86us; 1041us; 2us; 16925us; 49us; 1036us; 180us; 1039us; 35us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1038us; 0us; 16926us; 0us; 16927us; 0us; 16928us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16931us; 3us; 16936us; 24us; 1052us; 126us; 1051us; 127us; 1057us; 0us; 16932us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 19us; 1047us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 3us; 32768us; 10us; 858us; 14us; 1049us; 180us; 856us; 0us; 16934us; 0us; 16935us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 19us; 1053us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 3us; 32768us; 10us; 858us; 14us; 1055us; 180us; 856us; 0us; 16938us; 0us; 16939us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16940us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 41us; 32768us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 41us; 17183us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16943us; 41us; 32768us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 41us; 17179us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16944us; 41us; 32768us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 41us; 17182us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16945us; 41us; 32768us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 41us; 17195us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16946us; 41us; 32768us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 41us; 17196us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16947us; 41us; 32768us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 41us; 17190us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16948us; 41us; 32768us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 41us; 17191us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16949us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 36us; 17055us; 13us; 17058us; 18us; 17058us; 23us; 17058us; 31us; 1387us; 61us; 1401us; 62us; 17262us; 64us; 17262us; 77us; 17058us; 81us; 1471us; 82us; 17262us; 96us; 17262us; 101us; 17058us; 103us; 1390us; 110us; 17262us; 122us; 17262us; 135us; 17262us; 142us; 17262us; 151us; 17262us; 152us; 17262us; 153us; 17262us; 154us; 17262us; 155us; 17262us; 156us; 17262us; 157us; 17262us; 158us; 17262us; 159us; 17262us; 160us; 17262us; 161us; 17262us; 162us; 17262us; 163us; 17262us; 165us; 17262us; 166us; 17262us; 174us; 1474us; 177us; 1477us; 178us; 17262us; 179us; 17262us; 6us; 17262us; 31us; 1387us; 61us; 1401us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 26us; 32768us; 62us; 1177us; 64us; 1206us; 82us; 1183us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 178us; 703us; 179us; 704us; 180us; 1090us; 26us; 32768us; 62us; 1177us; 64us; 1206us; 82us; 1183us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 178us; 703us; 179us; 704us; 180us; 1090us; 0us; 16950us; 5us; 16950us; 13us; 17057us; 23us; 17057us; 77us; 17057us; 101us; 17057us; 119us; 429us; 0us; 16951us; 41us; 32768us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16952us; 41us; 32768us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 107us; 1082us; 110us; 1158us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16953us; 32us; 16954us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1099us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 35us; 16954us; 23us; 1267us; 60us; 1259us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 77us; 1262us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1099us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16955us; 4us; 16956us; 30us; 1105us; 31us; 1104us; 65us; 1117us; 67us; 1109us; 31us; 32768us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 4us; 16957us; 30us; 1105us; 31us; 1104us; 65us; 1117us; 67us; 1109us; 4us; 16958us; 30us; 1105us; 31us; 1104us; 65us; 1117us; 67us; 1109us; 1us; 16959us; 30us; 1105us; 4us; 16961us; 30us; 1105us; 31us; 1104us; 65us; 1117us; 67us; 1109us; 31us; 32768us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 131us; 1439us; 0us; 16960us; 31us; 32768us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 31us; 17173us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 7us; 32768us; 10us; 858us; 61us; 1137us; 82us; 1130us; 90us; 1485us; 163us; 1129us; 177us; 1477us; 180us; 856us; 0us; 16962us; 1us; 32768us; 67us; 1112us; 7us; 32768us; 10us; 858us; 61us; 1137us; 82us; 1130us; 90us; 1485us; 163us; 1129us; 177us; 1477us; 180us; 856us; 0us; 16963us; 3us; 32768us; 82us; 1482us; 90us; 1485us; 177us; 1477us; 3us; 17189us; 82us; 1482us; 90us; 1485us; 177us; 1477us; 0us; 16964us; 2us; 32768us; 82us; 1018us; 177us; 1017us; 0us; 16965us; 0us; 16966us; 64us; 17022us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1124us; 3us; 32768us; 10us; 858us; 50us; 1122us; 180us; 856us; 0us; 16967us; 0us; 16968us; 1us; 32768us; 50us; 1125us; 0us; 16969us; 0us; 16970us; 0us; 16971us; 0us; 16972us; 0us; 16973us; 81us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 49us; 1521us; 52us; 1062us; 53us; 1500us; 60us; 1504us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1115us; 69us; 1131us; 73us; 1512us; 76us; 892us; 79us; 1077us; 80us; 1080us; 82us; 1185us; 84us; 1503us; 86us; 951us; 90us; 1485us; 92us; 1505us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 129us; 1516us; 130us; 1511us; 131us; 1506us; 132us; 1507us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1171us; 145us; 1071us; 146us; 1074us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 167us; 1513us; 168us; 1068us; 169us; 1065us; 170us; 1497us; 171us; 1499us; 172us; 1108us; 173us; 1496us; 174us; 1495us; 175us; 1494us; 176us; 1493us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 83us; 1132us; 1us; 32768us; 67us; 1133us; 1us; 32768us; 163us; 1134us; 0us; 16974us; 1us; 32768us; 83us; 1136us; 0us; 16975us; 65us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 84us; 1153us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 129us; 1152us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 50us; 1139us; 0us; 16976us; 2us; 32768us; 50us; 1141us; 85us; 1142us; 0us; 16977us; 65us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 84us; 1153us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 129us; 1152us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 2us; 32768us; 50us; 1144us; 85us; 1145us; 0us; 16978us; 65us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 84us; 1153us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 129us; 1152us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 2us; 32768us; 50us; 1147us; 85us; 1148us; 0us; 16979us; 65us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 84us; 1153us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 129us; 1152us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 50us; 1150us; 0us; 16980us; 63us; 16982us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 16984us; 0us; 16985us; 0us; 16986us; 0us; 16987us; 0us; 16988us; 0us; 16989us; 0us; 16990us; 0us; 16991us; 0us; 16992us; 0us; 16993us; 65us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 128us; 1169us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1167us; 3us; 32768us; 10us; 858us; 128us; 1165us; 180us; 856us; 0us; 16994us; 0us; 16995us; 1us; 32768us; 128us; 1168us; 0us; 16996us; 0us; 16997us; 64us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1175us; 65us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 143us; 1519us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1175us; 3us; 32768us; 10us; 858us; 143us; 1173us; 180us; 856us; 0us; 16998us; 0us; 16999us; 1us; 32768us; 143us; 1176us; 0us; 17000us; 64us; 17022us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1181us; 3us; 32768us; 10us; 858us; 55us; 1179us; 180us; 856us; 0us; 17001us; 0us; 17002us; 1us; 32768us; 55us; 1182us; 0us; 17003us; 68us; 17008us; 10us; 858us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 78us; 1237us; 79us; 1076us; 80us; 1079us; 82us; 1184us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 98us; 1191us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 174us; 1474us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 857us; 84us; 17008us; 10us; 858us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 49us; 1521us; 52us; 1062us; 53us; 1500us; 60us; 1504us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1115us; 73us; 1512us; 76us; 892us; 78us; 1237us; 79us; 1077us; 80us; 1080us; 82us; 1184us; 84us; 1503us; 86us; 951us; 90us; 1485us; 92us; 1505us; 96us; 1159us; 97us; 877us; 98us; 1191us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 129us; 1516us; 130us; 1511us; 131us; 1506us; 132us; 1507us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1171us; 145us; 1071us; 146us; 1074us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 167us; 1513us; 168us; 1068us; 169us; 1065us; 170us; 1497us; 171us; 1499us; 172us; 1108us; 173us; 1496us; 174us; 1475us; 175us; 1494us; 176us; 1493us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 857us; 84us; 17008us; 10us; 858us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 49us; 1521us; 52us; 1062us; 53us; 1500us; 60us; 1504us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1115us; 73us; 1512us; 76us; 892us; 78us; 1237us; 79us; 1077us; 80us; 1080us; 82us; 1184us; 84us; 1503us; 86us; 951us; 90us; 1485us; 92us; 1505us; 96us; 1159us; 97us; 877us; 98us; 1191us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 129us; 1516us; 130us; 1511us; 131us; 1506us; 132us; 1507us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1171us; 145us; 1071us; 146us; 1074us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 167us; 1513us; 168us; 1068us; 169us; 1065us; 170us; 1497us; 171us; 1499us; 172us; 1108us; 173us; 1496us; 174us; 1475us; 175us; 1494us; 176us; 1493us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 857us; 3us; 32768us; 10us; 858us; 83us; 1187us; 180us; 856us; 0us; 17004us; 0us; 17005us; 0us; 17006us; 0us; 17007us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 17009us; 1us; 32768us; 68us; 1194us; 1us; 32768us; 82us; 1195us; 1us; 16486us; 63us; 184us; 1us; 32768us; 83us; 1197us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 17010us; 0us; 17011us; 0us; 17012us; 0us; 17013us; 1us; 17013us; 92us; 1203us; 1us; 32768us; 174us; 1474us; 1us; 32768us; 83us; 1205us; 0us; 17014us; 65us; 17046us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 45us; 1253us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1083us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1210us; 3us; 32768us; 10us; 858us; 51us; 1208us; 180us; 856us; 0us; 17015us; 0us; 17016us; 1us; 32768us; 51us; 1211us; 0us; 17017us; 0us; 17018us; 0us; 17019us; 0us; 17020us; 0us; 17021us; 0us; 17023us; 0us; 17024us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 17028us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 17029us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 17239us; 18us; 1555us; 4us; 32768us; 75us; 1021us; 86us; 1221us; 87us; 1223us; 111us; 1225us; 0us; 17030us; 1us; 17239us; 18us; 1555us; 4us; 32768us; 75us; 1021us; 86us; 1221us; 87us; 1223us; 111us; 1225us; 0us; 17031us; 65us; 32768us; 10us; 858us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 856us; 0us; 17033us; 0us; 17034us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 178us; 1238us; 1us; 17041us; 98us; 1245us; 0us; 17038us; 33us; 17043us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 68us; 1249us; 82us; 1185us; 90us; 1485us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1099us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 78us; 1571us; 0us; 17036us; 0us; 17037us; 0us; 17040us; 1us; 32768us; 82us; 1246us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 1us; 32768us; 83us; 1248us; 0us; 17042us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1251us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 17044us; 10us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 83us; 1252us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 180us; 1430us; 0us; 17045us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 6us; 17262us; 31us; 1387us; 61us; 1401us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 25us; 17039us; 62us; 1177us; 64us; 1206us; 82us; 1183us; 96us; 1159us; 110us; 1158us; 122us; 1163us; 135us; 1157us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 178us; 703us; 179us; 704us; 0us; 17052us; 2us; 17241us; 18us; 1543us; 74us; 1544us; 0us; 17047us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 2us; 17241us; 18us; 1543us; 74us; 1544us; 0us; 17048us; 1us; 32768us; 177us; 1477us; 2us; 32768us; 60us; 1264us; 67us; 1479us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 2us; 17241us; 18us; 1543us; 74us; 1544us; 0us; 17049us; 1us; 32768us; 177us; 1477us; 2us; 32768us; 60us; 1269us; 67us; 1479us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 2us; 17241us; 18us; 1543us; 74us; 1544us; 1us; 32768us; 17us; 1272us; 0us; 17050us; 1us; 17240us; 177us; 1477us; 2us; 32768us; 60us; 1275us; 67us; 1479us; 63us; 32768us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 3us; 17239us; 18us; 1555us; 23us; 1286us; 77us; 1284us; 1us; 17239us; 18us; 1555us; 3us; 17065us; 13us; 469us; 101us; 468us; 180us; 1295us; 0us; 17053us; 2us; 32768us; 13us; 469us; 101us; 468us; 0us; 17054us; 0us; 17056us; 0us; 17059us; 4us; 16486us; 19us; 432us; 63us; 184us; 123us; 656us; 180us; 660us; 0us; 17061us; 3us; 16486us; 63us; 184us; 123us; 656us; 180us; 660us; 1us; 32768us; 17us; 1288us; 0us; 17062us; 3us; 17233us; 16us; 1550us; 17us; 1551us; 128us; 1552us; 0us; 17063us; 3us; 17065us; 13us; 469us; 101us; 468us; 180us; 1295us; 0us; 17064us; 3us; 17065us; 13us; 469us; 101us; 468us; 180us; 1295us; 0us; 17066us; 3us; 17065us; 13us; 469us; 101us; 468us; 180us; 1295us; 0us; 17067us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 8us; 17060us; 23us; 1286us; 31us; 1386us; 61us; 1401us; 77us; 1284us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 3us; 17233us; 16us; 1550us; 17us; 1551us; 128us; 1552us; 1us; 17239us; 18us; 1555us; 0us; 17068us; 0us; 17069us; 0us; 17070us; 32us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 86us; 1306us; 65us; 32768us; 19us; 825us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 1308us; 0us; 17071us; 0us; 17072us; 32us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 64us; 761us; 65us; 771us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 1us; 32768us; 86us; 1311us; 66us; 32768us; 10us; 858us; 15us; 1314us; 21us; 1309us; 22us; 1320us; 26us; 946us; 27us; 614us; 28us; 934us; 29us; 610us; 32us; 623us; 52us; 1061us; 61us; 1120us; 62us; 1177us; 64us; 1206us; 65us; 1114us; 76us; 892us; 79us; 1076us; 80us; 1079us; 82us; 1185us; 86us; 951us; 90us; 1485us; 96us; 1159us; 97us; 877us; 103us; 888us; 104us; 873us; 107us; 1082us; 110us; 1158us; 111us; 903us; 112us; 1304us; 113us; 1317us; 114us; 883us; 117us; 941us; 120us; 890us; 122us; 1163us; 133us; 1091us; 134us; 1093us; 135us; 1157us; 141us; 1111us; 142us; 1170us; 145us; 1070us; 146us; 1073us; 147us; 928us; 148us; 604us; 149us; 924us; 150us; 926us; 151us; 702us; 152us; 701us; 153us; 699us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 168us; 1067us; 169us; 1064us; 172us; 1107us; 177us; 1477us; 178us; 703us; 179us; 704us; 180us; 856us; 1us; 32768us; 17us; 1313us; 0us; 17073us; 1us; 32768us; 17us; 1315us; 0us; 17074us; 0us; 17075us; 1us; 17245us; 49us; 1558us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 0us; 17076us; 1us; 17245us; 49us; 1558us; 34us; 32768us; 34us; 407us; 35us; 406us; 36us; 408us; 57us; 770us; 61us; 764us; 62us; 767us; 63us; 184us; 64us; 761us; 65us; 771us; 72us; 751us; 82us; 779us; 90us; 1485us; 96us; 777us; 110us; 776us; 135us; 778us; 142us; 1170us; 151us; 702us; 152us; 701us; 153us; 700us; 154us; 698us; 155us; 697us; 156us; 695us; 157us; 696us; 158us; 694us; 159us; 692us; 160us; 690us; 161us; 688us; 162us; 693us; 163us; 691us; 165us; 689us; 166us; 687us; 177us; 1477us; 178us; 703us; 179us; 704us; 2us; 32768us; 17us; 1323us; 180us; 1324us; 0us; 17077us; 1us; 32768us; 17us; 1325us; 0us; 17078us; 1us; 17079us; 75us; 1327us; 4us; 32768us; 43us; 507us; 81us; 1471us; 82us; 522us; 174us; 1474us; 1us; 17081us; 75us; 1329us; 4us; 32768us; 43us; 507us; 81us; 1471us; 82us; 522us; 174us; 1474us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 17084us; 1us; 17086us; 86us; 1333us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 17085us; 1us; 17088us; 84us; 1336us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 17087us; 1us; 17090us; 84us; 1339us; 9us; 32768us; 57us; 1398us; 63us; 184us; 65us; 1352us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 17089us; 8us; 32768us; 57us; 1398us; 65us; 1345us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 7us; 17093us; 31us; 1386us; 61us; 1401us; 68us; 1343us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 6us; 17091us; 31us; 1386us; 61us; 1401us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 1us; 32768us; 177us; 1477us; 1us; 32768us; 68us; 1347us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 6us; 17092us; 31us; 1386us; 61us; 1401us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 7us; 17096us; 31us; 1386us; 61us; 1401us; 68us; 1350us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 6us; 17094us; 31us; 1386us; 61us; 1401us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 1us; 32768us; 177us; 1477us; 1us; 32768us; 68us; 1354us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 6us; 17095us; 31us; 1386us; 61us; 1401us; 81us; 1471us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 2us; 17111us; 67us; 1357us; 70us; 1396us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 17097us; 0us; 17098us; 1us; 17100us; 86us; 1361us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 17099us; 8us; 17104us; 31us; 1386us; 61us; 1401us; 81us; 1471us; 84us; 1364us; 103us; 1390us; 171us; 1368us; 174us; 1474us; 177us; 1477us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 17101us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 17102us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 17103us; 8us; 17107us; 31us; 1386us; 61us; 1401us; 81us; 1471us; 84us; 1371us; 103us; 1390us; 171us; 1373us; 174us; 1474us; 177us; 1477us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 17105us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 17106us; 7us; 17109us; 31us; 1386us; 61us; 1401us; 81us; 1471us; 84us; 1376us; 103us; 1390us; 174us; 1474us; 177us; 1477us; 7us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 0us; 17108us; 1us; 17110us; 67us; 1479us; 0us; 17111us; 1us; 17111us; 70us; 1396us; 1us; 17113us; 174us; 1383us; 3us; 17113us; 30us; 1437us; 131us; 1439us; 174us; 1383us; 1us; 32768us; 163us; 1384us; 0us; 17112us; 0us; 17114us; 1us; 32768us; 61us; 1401us; 1us; 17261us; 61us; 1401us; 0us; 17115us; 0us; 17116us; 0us; 17117us; 9us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 180us; 1430us; 1us; 32768us; 83us; 1393us; 3us; 32768us; 81us; 1471us; 174us; 1474us; 177us; 1477us; 0us; 17118us; 0us; 17119us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 17120us; 1us; 17134us; 70us; 1399us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 17121us; 2us; 32768us; 50us; 1402us; 85us; 1403us; 0us; 17122us; 2us; 32768us; 50us; 1404us; 85us; 1405us; 0us; 17123us; 2us; 32768us; 50us; 1406us; 85us; 1407us; 0us; 17124us; 1us; 32768us; 50us; 1408us; 0us; 17125us; 4us; 32768us; 10us; 858us; 83us; 1427us; 85us; 1410us; 180us; 856us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 17128us; 1us; 17126us; 85us; 1414us; 2us; 32768us; 85us; 1414us; 132us; 1445us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 17127us; 2us; 17129us; 67us; 1433us; 174us; 1417us; 2us; 32768us; 52us; 1419us; 163us; 1418us; 0us; 17130us; 1us; 32768us; 163us; 1420us; 0us; 17131us; 7us; 32768us; 57us; 1424us; 78us; 1421us; 81us; 1471us; 82us; 1425us; 163us; 1429us; 174us; 1474us; 177us; 1477us; 1us; 17132us; 67us; 1433us; 0us; 17133us; 0us; 17134us; 9us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 180us; 1430us; 3us; 32768us; 10us; 858us; 83us; 1427us; 180us; 856us; 0us; 17135us; 0us; 17136us; 0us; 17137us; 1us; 32768us; 83us; 1431us; 0us; 17138us; 0us; 17139us; 1us; 32768us; 177us; 1477us; 3us; 17140us; 30us; 1437us; 67us; 1479us; 131us; 1439us; 0us; 17141us; 0us; 17142us; 1us; 32768us; 131us; 1439us; 0us; 17143us; 9us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 132us; 1440us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 17144us; 2us; 32768us; 85us; 1443us; 132us; 1442us; 0us; 17145us; 8us; 32768us; 57us; 1398us; 78us; 1421us; 81us; 1471us; 82us; 1391us; 163us; 1429us; 171us; 1366us; 174us; 1474us; 177us; 1477us; 0us; 17128us; 0us; 17146us; 7us; 32768us; 57us; 1449us; 81us; 1471us; 82us; 1453us; 163us; 1461us; 171us; 1470us; 174us; 1474us; 177us; 1477us; 3us; 32768us; 84us; 1468us; 132us; 1448us; 171us; 1469us; 0us; 17147us; 1us; 32768us; 132us; 1450us; 0us; 17148us; 1us; 17149us; 67us; 1479us; 0us; 17150us; 6us; 32768us; 81us; 1471us; 82us; 1453us; 163us; 1461us; 171us; 1470us; 174us; 1474us; 177us; 1477us; 3us; 32768us; 83us; 1455us; 84us; 1468us; 171us; 1469us; 0us; 17151us; 1us; 17152us; 174us; 1457us; 2us; 32768us; 52us; 1459us; 163us; 1458us; 0us; 17153us; 1us; 32768us; 163us; 1460us; 0us; 17154us; 0us; 17155us; 5us; 17156us; 81us; 1471us; 82us; 1453us; 163us; 1461us; 174us; 1474us; 177us; 1477us; 0us; 17157us; 0us; 17158us; 0us; 17159us; 0us; 17160us; 0us; 17161us; 6us; 32768us; 81us; 1471us; 82us; 1453us; 163us; 1461us; 171us; 1470us; 174us; 1474us; 177us; 1477us; 6us; 32768us; 81us; 1471us; 82us; 1453us; 163us; 1461us; 171us; 1470us; 174us; 1474us; 177us; 1477us; 6us; 32768us; 81us; 1471us; 82us; 1453us; 163us; 1461us; 171us; 1470us; 174us; 1474us; 177us; 1477us; 1us; 32768us; 177us; 1477us; 0us; 17162us; 0us; 17163us; 1us; 32768us; 177us; 1477us; 1us; 17176us; 177us; 1477us; 0us; 17164us; 0us; 17165us; 0us; 17166us; 2us; 32768us; 177us; 1477us; 180us; 1481us; 0us; 17167us; 0us; 17168us; 27us; 32768us; 49us; 1521us; 52us; 1502us; 53us; 1500us; 60us; 1504us; 65us; 1508us; 73us; 1512us; 79us; 1509us; 80us; 1510us; 84us; 1503us; 92us; 1505us; 129us; 1516us; 130us; 1511us; 131us; 1506us; 132us; 1507us; 142us; 1518us; 145us; 1514us; 146us; 1515us; 167us; 1513us; 168us; 1501us; 169us; 1498us; 170us; 1497us; 171us; 1499us; 172us; 1492us; 173us; 1496us; 174us; 1495us; 175us; 1494us; 176us; 1493us; 1us; 32768us; 83us; 1484us; 0us; 17169us; 0us; 17170us; 1us; 32768us; 49us; 1487us; 3us; 32768us; 57us; 1489us; 83us; 1488us; 177us; 1520us; 0us; 17171us; 1us; 32768us; 49us; 1490us; 1us; 32768us; 83us; 1491us; 0us; 17172us; 0us; 17173us; 0us; 17174us; 0us; 17175us; 0us; 17176us; 0us; 17177us; 0us; 17178us; 0us; 17179us; 0us; 17180us; 0us; 17181us; 0us; 17182us; 0us; 17183us; 0us; 17184us; 0us; 17185us; 0us; 17186us; 0us; 17187us; 0us; 17188us; 0us; 17189us; 0us; 17190us; 0us; 17191us; 0us; 17192us; 0us; 17193us; 0us; 17194us; 0us; 17195us; 0us; 17196us; 1us; 17197us; 129us; 1517us; 0us; 17198us; 1us; 32768us; 143us; 1519us; 0us; 17199us; 0us; 17200us; 1us; 32768us; 177us; 1520us; 0us; 17201us; 0us; 17202us; 0us; 17203us; 0us; 17204us; 1us; 17205us; 67us; 1528us; 0us; 17206us; 4us; 32768us; 82us; 1482us; 90us; 1485us; 177us; 1477us; 180us; 1530us; 0us; 17207us; 0us; 17208us; 0us; 17209us; 0us; 17210us; 0us; 17211us; 0us; 17212us; 3us; 17213us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 0us; 17214us; 0us; 17215us; 0us; 17216us; 2us; 17217us; 18us; 1538us; 74us; 1537us; 0us; 17218us; 3us; 17222us; 18us; 1534us; 58us; 1533us; 74us; 1532us; 0us; 17221us; 1us; 17223us; 74us; 1545us; 1us; 17224us; 18us; 1546us; 0us; 17225us; 0us; 17226us; 0us; 17227us; 0us; 17228us; 0us; 17229us; 0us; 17230us; 0us; 17231us; 0us; 17232us; 0us; 17234us; 0us; 17236us; 0us; 17238us; 0us; 17240us; 0us; 17242us; 0us; 17244us; 0us; 17246us; 0us; 17248us; 0us; 17250us; 0us; 17251us; 0us; 17252us; 0us; 17253us; 0us; 17254us; 0us; 17255us; 0us; 17256us; 0us; 17257us; 0us; 17258us; 0us; 17259us; 0us; 17260us; 0us; 17261us; 0us; 17263us; |] -let _fsyacc_actionTableRowOffsets = [|0us; 12us; 13us; 88us; 89us; 97us; 98us; 99us; 100us; 101us; 103us; 104us; 106us; 107us; 108us; 109us; 110us; 111us; 116us; 117us; 122us; 123us; 128us; 129us; 135us; 136us; 142us; 143us; 149us; 150us; 163us; 164us; 168us; 236us; 258us; 259us; 262us; 263us; 265us; 266us; 271us; 272us; 275us; 276us; 278us; 279us; 284us; 285us; 289us; 291us; 293us; 295us; 297us; 300us; 301us; 304us; 305us; 307us; 309us; 321us; 322us; 325us; 326us; 329us; 330us; 332us; 334us; 409us; 410us; 414us; 419us; 433us; 434us; 435us; 439us; 507us; 584us; 585us; 586us; 587us; 591us; 595us; 607us; 608us; 612us; 617us; 618us; 619us; 623us; 691us; 716us; 791us; 792us; 793us; 797us; 802us; 807us; 825us; 826us; 901us; 902us; 906us; 911us; 912us; 913us; 914us; 918us; 926us; 927us; 930us; 931us; 996us; 997us; 999us; 1001us; 1002us; 1024us; 1025us; 1026us; 1028us; 1030us; 1035us; 1036us; 1037us; 1045us; 1048us; 1049us; 1051us; 1058us; 1060us; 1061us; 1065us; 1066us; 1067us; 1068us; 1069us; 1071us; 1146us; 1150us; 1151us; 1152us; 1153us; 1158us; 1159us; 1161us; 1168us; 1172us; 1173us; 1174us; 1175us; 1179us; 1184us; 1187us; 1192us; 1193us; 1194us; 1195us; 1196us; 1198us; 1200us; 1202us; 1204us; 1206us; 1210us; 1214us; 1217us; 1219us; 1229us; 1231us; 1232us; 1296us; 1318us; 1325us; 1327us; 1328us; 1340us; 1342us; 1344us; 1345us; 1357us; 1359us; 1360us; 1361us; 1363us; 1364us; 1369us; 1372us; 1374us; 1376us; 1377us; 1378us; 1383us; 1384us; 1387us; 1413us; 1414us; 1416us; 1418us; 1421us; 1447us; 1448us; 1449us; 1450us; 1481us; 1482us; 1484us; 1485us; 1487us; 1489us; 1490us; 1493us; 1501us; 1502us; 1503us; 1514us; 1516us; 1520us; 1522us; 1524us; 1526us; 1527us; 1529us; 1530us; 1531us; 1532us; 1534us; 1544us; 1545us; 1546us; 1552us; 1556us; 1557us; 1558us; 1560us; 1561us; 1566us; 1570us; 1571us; 1572us; 1578us; 1582us; 1583us; 1584us; 1589us; 1593us; 1594us; 1595us; 1596us; 1599us; 1608us; 1609us; 1613us; 1622us; 1623us; 1624us; 1625us; 1626us; 1627us; 1628us; 1629us; 1631us; 1632us; 1636us; 1637us; 1641us; 1644us; 1645us; 1646us; 1648us; 1652us; 1653us; 1657us; 1661us; 1674us; 1697us; 1699us; 1703us; 1707us; 1710us; 1712us; 1722us; 1725us; 1727us; 1728us; 1736us; 1743us; 1751us; 1758us; 1760us; 1761us; 1763us; 1764us; 1766us; 1767us; 1769us; 1779us; 1780us; 1784us; 1786us; 1787us; 1789us; 1791us; 1792us; 1829us; 1836us; 1837us; 1841us; 1843us; 1845us; 1847us; 1849us; 1856us; 1857us; 1867us; 1869us; 1874us; 1876us; 1878us; 1880us; 1881us; 1883us; 1884us; 1885us; 1886us; 1888us; 1898us; 1899us; 1900us; 1906us; 1910us; 1911us; 1912us; 1917us; 1918us; 1923us; 1927us; 1928us; 1929us; 1934us; 1938us; 1939us; 1940us; 1941us; 1944us; 1953us; 1954us; 1963us; 1964us; 1966us; 1967us; 1969us; 1972us; 1973us; 1974us; 1976us; 1978us; 1979us; 2013us; 2015us; 2017us; 2082us; 2083us; 2117us; 2119us; 2123us; 2188us; 2189us; 2190us; 2192us; 2193us; 2197us; 2201us; 2219us; 2247us; 2248us; 2249us; 2251us; 2253us; 2254us; 2262us; 2270us; 2271us; 2273us; 2277us; 2280us; 2282us; 2292us; 2295us; 2297us; 2298us; 2299us; 2301us; 2302us; 2304us; 2305us; 2338us; 2340us; 2342us; 2407us; 2409us; 2410us; 2412us; 2413us; 2414us; 2418us; 2419us; 2420us; 2421us; 2422us; 2423us; 2424us; 2427us; 2431us; 2432us; 2439us; 2443us; 2444us; 2450us; 2454us; 2455us; 2463us; 2496us; 2497us; 2523us; 2525us; 2526us; 2527us; 2529us; 2530us; 2531us; 2534us; 2535us; 2536us; 2538us; 2542us; 2543us; 2544us; 2545us; 2548us; 2560us; 2561us; 2564us; 2568us; 2571us; 2573us; 2574us; 2575us; 2576us; 2577us; 2581us; 2592us; 2593us; 2594us; 2595us; 2605us; 2607us; 2608us; 2611us; 2615us; 2616us; 2617us; 2619us; 2620us; 2629us; 2631us; 2632us; 2633us; 2634us; 2635us; 2636us; 2637us; 2642us; 2646us; 2648us; 2650us; 2651us; 2652us; 2654us; 2657us; 2658us; 2661us; 2663us; 2665us; 2668us; 2669us; 2670us; 2673us; 2674us; 2676us; 2678us; 2680us; 2681us; 2682us; 2683us; 2685us; 2690us; 2692us; 2694us; 2695us; 2696us; 2718us; 2723us; 2725us; 2727us; 2729us; 2734us; 2735us; 2736us; 2739us; 2741us; 2750us; 2751us; 2754us; 2763us; 2764us; 2770us; 2771us; 2775us; 2776us; 2777us; 2779us; 2781us; 2782us; 2785us; 2787us; 2790us; 2792us; 2794us; 2796us; 2798us; 2800us; 2801us; 2804us; 2805us; 2806us; 2808us; 2809us; 2811us; 2813us; 2814us; 2817us; 2818us; 2820us; 2822us; 2823us; 2827us; 2831us; 2836us; 2837us; 2846us; 2848us; 2849us; 2859us; 2861us; 2862us; 2880us; 2882us; 2883us; 2884us; 2914us; 2916us; 2917us; 2919us; 2921us; 2922us; 2927us; 2928us; 2946us; 2948us; 2988us; 2989us; 2998us; 2999us; 3000us; 3008us; 3016us; 3017us; 3020us; 3025us; 3026us; 3027us; 3029us; 3030us; 3034us; 3036us; 3038us; 3047us; 3048us; 3050us; 3051us; 3053us; 3054us; 3055us; 3057us; 3061us; 3063us; 3065us; 3066us; 3068us; 3077us; 3078us; 3080us; 3082us; 3084us; 3086us; 3088us; 3092us; 3093us; 3094us; 3159us; 3160us; 3162us; 3166us; 3170us; 3171us; 3236us; 3240us; 3241us; 3242us; 3243us; 3244us; 3245us; 3246us; 3247us; 3249us; 3253us; 3255us; 3257us; 3259us; 3262us; 3264us; 3265us; 3267us; 3269us; 3271us; 3272us; 3274us; 3275us; 3278us; 3284us; 3285us; 3287us; 3292us; 3294us; 3296us; 3297us; 3298us; 3299us; 3301us; 3303us; 3304us; 3307us; 3309us; 3310us; 3314us; 3316us; 3317us; 3382us; 3383us; 3385us; 3386us; 3387us; 3389us; 3423us; 3425us; 3427us; 3493us; 3494us; 3495us; 3559us; 3563us; 3564us; 3565us; 3566us; 3567us; 3569us; 3570us; 3574us; 3577us; 3642us; 3643us; 3647us; 3648us; 3649us; 3651us; 3660us; 3661us; 3662us; 3663us; 3664us; 3665us; 3666us; 3667us; 3668us; 3669us; 3670us; 3671us; 3672us; 3673us; 3674us; 3675us; 3677us; 3678us; 3679us; 3680us; 3681us; 3683us; 3685us; 3686us; 3692us; 3693us; 3695us; 3696us; 3698us; 3701us; 3710us; 3711us; 3715us; 3719us; 3720us; 3727us; 3731us; 3732us; 3733us; 3734us; 3736us; 3737us; 3738us; 3742us; 3744us; 3747us; 3750us; 3752us; 3754us; 3761us; 3768us; 3770us; 3771us; 3805us; 3839us; 3841us; 3842us; 3843us; 3877us; 3911us; 3945us; 3979us; 4003us; 4037us; 4038us; 4071us; 4072us; 4080us; 4082us; 4083us; 4117us; 4118us; 4151us; 4152us; 4153us; 4155us; 4156us; 4158us; 4160us; 4161us; 4196us; 4198us; 4199us; 4234us; 4236us; 4237us; 4238us; 4240us; 4242us; 4243us; 4244us; 4245us; 4246us; 4247us; 4248us; 4310us; 4314us; 4315us; 4316us; 4318us; 4319us; 4320us; 4328us; 4334us; 4339us; 4343us; 4348us; 4353us; 4357us; 4361us; 4369us; 4379us; 4390us; 4399us; 4408us; 4410us; 4411us; 4446us; 4448us; 4450us; 4459us; 4460us; 4495us; 4530us; 4539us; 4540us; 4541us; 4576us; 4611us; 4646us; 4681us; 4682us; 4685us; 4686us; 4688us; 4689us; 4692us; 4727us; 4728us; 4763us; 4764us; 4828us; 4832us; 4833us; 4834us; 4835us; 4899us; 4901us; 4902us; 4924us; 4926us; 4927us; 4932us; 4941us; 4942us; 4951us; 4952us; 4961us; 4962us; 4971us; 4972us; 4998us; 5025us; 5053us; 5117us; 5118us; 5182us; 5183us; 5185us; 5249us; 5251us; 5252us; 5253us; 5255us; 5256us; 5259us; 5324us; 5325us; 5326us; 5327us; 5394us; 5395us; 5396us; 5462us; 5463us; 5464us; 5465us; 5466us; 5467us; 5531us; 5536us; 5537us; 5538us; 5602us; 5608us; 5609us; 5610us; 5675us; 5676us; 5742us; 5768us; 5769us; 5770us; 5771us; 5835us; 5836us; 5892us; 5893us; 5958us; 5984us; 6050us; 6055us; 6056us; 6057us; 6060us; 6061us; 6062us; 6065us; 6066us; 6102us; 6108us; 6174us; 6177us; 6178us; 6179us; 6182us; 6183us; 6186us; 6252us; 6257us; 6258us; 6259us; 6262us; 6263us; 6266us; 6331us; 6334us; 6335us; 6338us; 6339us; 6403us; 6425us; 6489us; 6511us; 6545us; 6610us; 6612us; 6614us; 6679us; 6680us; 6714us; 6779us; 6783us; 6785us; 6851us; 6852us; 6853us; 6917us; 6919us; 6921us; 6986us; 6987us; 7052us; 7056us; 7057us; 7062us; 7063us; 7127us; 7128us; 7150us; 7168us; 7177us; 7195us; 7211us; 7227us; 7236us; 7245us; 7254us; 7263us; 7272us; 7281us; 7290us; 7292us; 7300us; 7305us; 7310us; 7312us; 7314us; 7316us; 7338us; 7360us; 7382us; 7404us; 7428us; 7448us; 7468us; 7491us; 7512us; 7533us; 7557us; 7579us; 7602us; 7624us; 7648us; 7670us; 7692us; 7714us; 7736us; 7758us; 7822us; 7824us; 7889us; 7890us; 7892us; 7956us; 8020us; 8084us; 8148us; 8212us; 8276us; 8340us; 8404us; 8468us; 8532us; 8596us; 8660us; 8724us; 8788us; 8852us; 8916us; 8980us; 9044us; 9108us; 9109us; 9173us; 9175us; 9176us; 9240us; 9277us; 9278us; 9315us; 9319us; 9320us; 9321us; 9322us; 9358us; 9359us; 9360us; 9361us; 9362us; 9364us; 9367us; 9403us; 9404us; 9405us; 9406us; 9470us; 9534us; 9535us; 9539us; 9540us; 9604us; 9606us; 9670us; 9674us; 9675us; 9676us; 9740us; 9742us; 9806us; 9810us; 9811us; 9812us; 9876us; 9877us; 9941us; 10005us; 10047us; 10089us; 10090us; 10132us; 10174us; 10175us; 10217us; 10259us; 10260us; 10302us; 10344us; 10345us; 10387us; 10429us; 10430us; 10472us; 10514us; 10515us; 10557us; 10599us; 10600us; 10608us; 10616us; 10653us; 10660us; 10687us; 10714us; 10715us; 10721us; 10722us; 10764us; 10765us; 10807us; 10808us; 10841us; 10877us; 10878us; 10883us; 10915us; 10920us; 10925us; 10927us; 10932us; 10964us; 10966us; 10967us; 10999us; 11031us; 11039us; 11040us; 11042us; 11050us; 11051us; 11055us; 11059us; 11060us; 11063us; 11064us; 11065us; 11130us; 11134us; 11135us; 11136us; 11138us; 11139us; 11140us; 11141us; 11142us; 11143us; 11225us; 11227us; 11229us; 11231us; 11232us; 11234us; 11235us; 11301us; 11303us; 11304us; 11307us; 11308us; 11374us; 11377us; 11378us; 11444us; 11447us; 11448us; 11514us; 11516us; 11517us; 11581us; 11645us; 11646us; 11647us; 11648us; 11649us; 11650us; 11651us; 11652us; 11653us; 11654us; 11655us; 11721us; 11725us; 11726us; 11727us; 11729us; 11730us; 11731us; 11796us; 11862us; 11866us; 11867us; 11868us; 11870us; 11871us; 11936us; 11940us; 11941us; 11942us; 11944us; 11945us; 12014us; 12099us; 12184us; 12188us; 12189us; 12190us; 12191us; 12192us; 12201us; 12202us; 12204us; 12206us; 12208us; 12210us; 12274us; 12275us; 12276us; 12277us; 12278us; 12280us; 12282us; 12284us; 12285us; 12351us; 12355us; 12356us; 12357us; 12359us; 12360us; 12361us; 12362us; 12363us; 12364us; 12365us; 12366us; 12430us; 12494us; 12558us; 12622us; 12623us; 12687us; 12688us; 12723us; 12725us; 12730us; 12731us; 12733us; 12738us; 12739us; 12805us; 12806us; 12807us; 12871us; 12935us; 12937us; 12939us; 12940us; 12974us; 12976us; 12977us; 12978us; 12979us; 12981us; 12990us; 12992us; 12993us; 13002us; 13003us; 13014us; 13015us; 13023us; 13030us; 13056us; 13057us; 13060us; 13061us; 13125us; 13128us; 13129us; 13131us; 13134us; 13198us; 13201us; 13202us; 13204us; 13207us; 13271us; 13274us; 13276us; 13277us; 13279us; 13282us; 13346us; 13350us; 13352us; 13356us; 13357us; 13360us; 13361us; 13362us; 13363us; 13368us; 13369us; 13373us; 13375us; 13376us; 13380us; 13381us; 13385us; 13386us; 13390us; 13391us; 13395us; 13396us; 13404us; 13413us; 13417us; 13419us; 13420us; 13421us; 13422us; 13455us; 13457us; 13523us; 13524us; 13525us; 13558us; 13560us; 13627us; 13629us; 13630us; 13632us; 13633us; 13634us; 13636us; 13671us; 13672us; 13674us; 13709us; 13712us; 13713us; 13715us; 13716us; 13718us; 13723us; 13725us; 13730us; 13740us; 13741us; 13743us; 13753us; 13754us; 13756us; 13766us; 13767us; 13769us; 13779us; 13780us; 13789us; 13797us; 13805us; 13812us; 13814us; 13816us; 13824us; 13831us; 13839us; 13847us; 13854us; 13856us; 13858us; 13866us; 13873us; 13876us; 13885us; 13886us; 13887us; 13889us; 13898us; 13899us; 13908us; 13916us; 13917us; 13925us; 13926us; 13934us; 13935us; 13944us; 13952us; 13953us; 13961us; 13962us; 13970us; 13978us; 13979us; 13981us; 13982us; 13984us; 13986us; 13990us; 13992us; 13993us; 13994us; 13996us; 13998us; 13999us; 14000us; 14001us; 14011us; 14013us; 14017us; 14018us; 14019us; 14028us; 14029us; 14031us; 14040us; 14041us; 14044us; 14045us; 14048us; 14049us; 14052us; 14053us; 14055us; 14056us; 14061us; 14070us; 14071us; 14073us; 14076us; 14085us; 14086us; 14089us; 14092us; 14093us; 14095us; 14096us; 14104us; 14106us; 14107us; 14108us; 14118us; 14122us; 14123us; 14124us; 14125us; 14127us; 14128us; 14129us; 14131us; 14135us; 14136us; 14137us; 14139us; 14140us; 14150us; 14151us; 14154us; 14155us; 14164us; 14165us; 14166us; 14174us; 14178us; 14179us; 14181us; 14182us; 14184us; 14185us; 14192us; 14196us; 14197us; 14199us; 14202us; 14203us; 14205us; 14206us; 14207us; 14213us; 14214us; 14215us; 14216us; 14217us; 14218us; 14225us; 14232us; 14239us; 14241us; 14242us; 14243us; 14245us; 14247us; 14248us; 14249us; 14250us; 14253us; 14254us; 14255us; 14283us; 14285us; 14286us; 14287us; 14289us; 14293us; 14294us; 14296us; 14298us; 14299us; 14300us; 14301us; 14302us; 14303us; 14304us; 14305us; 14306us; 14307us; 14308us; 14309us; 14310us; 14311us; 14312us; 14313us; 14314us; 14315us; 14316us; 14317us; 14318us; 14319us; 14320us; 14321us; 14322us; 14323us; 14325us; 14326us; 14328us; 14329us; 14330us; 14332us; 14333us; 14334us; 14335us; 14336us; 14338us; 14339us; 14344us; 14345us; 14346us; 14347us; 14348us; 14349us; 14350us; 14354us; 14355us; 14356us; 14357us; 14360us; 14361us; 14365us; 14366us; 14368us; 14370us; 14371us; 14372us; 14373us; 14374us; 14375us; 14376us; 14377us; 14378us; 14379us; 14380us; 14381us; 14382us; 14383us; 14384us; 14385us; 14386us; 14387us; 14388us; 14389us; 14390us; 14391us; 14392us; 14393us; 14394us; 14395us; 14396us; 14397us; 14398us; |] -let _fsyacc_reductionSymbolCounts = [|1us; 1us; 1us; 1us; 1us; 1us; 3us; 1us; 0us; 2us; 1us; 1us; 1us; 2us; 2us; 2us; 3us; 3us; 3us; 1us; 2us; 3us; 1us; 2us; 3us; 2us; 2us; 3us; 2us; 3us; 2us; 1us; 2us; 2us; 1us; 4us; 1us; 2us; 2us; 1us; 4us; 4us; 1us; 4us; 1us; 1us; 1us; 0us; 3us; 3us; 2us; 1us; 0us; 5us; 4us; 3us; 1us; 1us; 2us; 3us; 1us; 2us; 3us; 1us; 1us; 3us; 3us; 3us; 5us; 5us; 3us; 6us; 1us; 3us; 1us; 3us; 3us; 3us; 3us; 1us; 1us; 3us; 3us; 3us; 0us; 2us; 2us; 3us; 1us; 1us; 5us; 5us; 3us; 3us; 2us; 12us; 0us; 2us; 3us; 5us; 3us; 1us; 0us; 1us; 2us; 5us; 1us; 3us; 3us; 5us; 1us; 1us; 1us; 1us; 2us; 3us; 1us; 3us; 2us; 7us; 2us; 1us; 1us; 3us; 1us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 1us; 3us; 0us; 2us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 2us; 0us; 2us; 3us; 3us; 1us; 3us; 11us; 4us; 4us; 4us; 5us; 5us; 5us; 3us; 3us; 0us; 1us; 3us; 8us; 7us; 2us; 1us; 1us; 3us; 1us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 1us; 3us; 2us; 0us; 2us; 3us; 3us; 1us; 3us; 5us; 5us; 4us; 1us; 2us; 3us; 4us; 5us; 5us; 10us; 3us; 4us; 5us; 8us; 5us; 1us; 2us; 0us; 1us; 1us; 1us; 1us; 1us; 0us; 3us; 0us; 3us; 0us; 3us; 0us; 3us; 5us; 1us; 0us; 2us; 1us; 0us; 2us; 2us; 3us; 3us; 1us; 3us; 2us; 4us; 3us; 1us; 1us; 3us; 3us; 3us; 5us; 3us; 3us; 3us; 3us; 1us; 1us; 1us; 1us; 1us; 2us; 3us; 3us; 1us; 3us; 3us; 1us; 2us; 5us; 3us; 1us; 1us; 0us; 5us; 1us; 0us; 1us; 0us; 0us; 2us; 3us; 1us; 4us; 3us; 3us; 4us; 3us; 5us; 9us; 4us; 4us; 2us; 3us; 1us; 1us; 3us; 1us; 4us; 6us; 6us; 6us; 1us; 3us; 4us; 2us; 4us; 2us; 3us; 4us; 1us; 3us; 1us; 3us; 2us; 2us; 5us; 2us; 2us; 1us; 5us; 1us; 3us; 0us; 2us; 2us; 3us; 1us; 2us; 4us; 3us; 1us; 1us; 1us; 1us; 1us; 1us; 8us; 1us; 1us; 0us; 3us; 3us; 2us; 3us; 1us; 4us; 2us; 2us; 2us; 2us; 2us; 2us; 3us; 0us; 2us; 2us; 1us; 6us; 6us; 3us; 3us; 1us; 2us; 2us; 0us; 4us; 3us; 1us; 3us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 3us; 1us; 1us; 2us; 3us; 2us; 1us; 3us; 3us; 2us; 3us; 3us; 2us; 3us; 3us; 3us; 1us; 1us; 1us; 3us; 3us; 3us; 3us; 2us; 3us; 4us; 2us; 1us; 2us; 3us; 1us; 1us; 3us; 3us; 3us; 3us; 1us; 2us; 1us; 1us; 1us; 1us; 1us; 3us; 3us; 3us; 2us; 1us; 0us; 3us; 3us; 1us; 1us; 3us; 2us; 3us; 3us; 1us; 3us; 3us; 3us; 3us; 1us; 2us; 3us; 3us; 0us; 2us; 3us; 3us; 3us; 1us; 3us; 1us; 2us; 1us; 3us; 3us; 3us; 3us; 1us; 3us; 2us; 1us; 3us; 5us; 1us; 1us; 3us; 3us; 2us; 2us; 2us; 3us; 3us; 1us; 1us; 1us; 3us; 3us; 3us; 3us; 4us; 3us; 3us; 2us; 2us; 2us; 1us; 5us; 5us; 5us; 3us; 3us; 5us; 3us; 5us; 5us; 5us; 5us; 5us; 4us; 2us; 2us; 7us; 7us; 7us; 5us; 3us; 4us; 2us; 3us; 3us; 1us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 1us; 1us; 3us; 2us; 2us; 3us; 3us; 1us; 2us; 2us; 1us; 2us; 2us; 4us; 4us; 3us; 2us; 0us; 2us; 2us; 2us; 4us; 4us; 0us; 2us; 4us; 4us; 3us; 3us; 3us; 2us; 2us; 2us; 2us; 2us; 2us; 2us; 4us; 4us; 2us; 2us; 1us; 2us; 1us; 2us; 1us; 3us; 3us; 2us; 3us; 3us; 2us; 3us; 1us; 3us; 3us; 3us; 1us; 1us; 1us; 1us; 5us; 3us; 3us; 3us; 5us; 7us; 9us; 3us; 2us; 2us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 3us; 3us; 3us; 2us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 3us; 2us; 0us; 2us; 6us; 1us; 1us; 1us; 5us; 3us; 3us; 3us; 1us; 1us; 1us; 1us; 0us; 1us; 1us; 3us; 3us; 5us; 2us; 2us; 4us; 3us; 3us; 3us; 3us; 5us; 6us; 2us; 0us; 0us; 1us; 0us; 4us; 0us; 2us; 3us; 0us; 6us; 5us; 7us; 8us; 5us; 0us; 4us; 3us; 2us; 5us; 4us; 2us; 1us; 0us; 2us; 3us; 3us; 2us; 0us; 2us; 2us; 5us; 1us; 1us; 4us; 4us; 5us; 5us; 4us; 3us; 4us; 5us; 1us; 3us; 1us; 3us; 0us; 2us; 3us; 1us; 3us; 1us; 3us; 1us; 4us; 5us; 2us; 3us; 4us; 1us; 3us; 1us; 3us; 1us; 3us; 2us; 3us; 1us; 3us; 3us; 1us; 3us; 1us; 1us; 1us; 3us; 1us; 2us; 3us; 2us; 2us; 4us; 1us; 3us; 3us; 2us; 3us; 4us; 5us; 4us; 3us; 0us; 1us; 3us; 4us; 2us; 1us; 1us; 3us; 3us; 1us; 3us; 2us; 3us; 4us; 1us; 2us; 2us; 3us; 6us; 3us; 3us; 1us; 1us; 3us; 1us; 3us; 4us; 1us; 1us; 2us; 1us; 3us; 3us; 2us; 2us; 1us; 2us; 1us; 1us; 3us; 3us; 3us; 1us; 4us; 6us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 2us; 2us; 1us; 2us; 3us; 1us; 1us; 1us; 1us; 3us; 3us; 1us; 1us; 1us; 1us; 1us; 2us; 1us; 1us; 1us; 2us; 2us; 0us; 2us; 0us; 1us; 1us; 2us; 2us; 1us; 1us; 1us; 1us; 1us; 1us; 0us; 1us; 0us; 1us; 0us; 1us; 0us; 1us; 0us; 1us; 0us; 1us; 0us; 1us; 0us; 1us; 0us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 0us; 1us; 0us; |] -let _fsyacc_productionToNonTerminalTable = [|0us; 1us; 2us; 3us; 3us; 3us; 4us; 5us; 6us; 6us; 7us; 7us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 9us; 9us; 10us; 11us; 12us; 12us; 12us; 13us; 13us; 13us; 14us; 15us; 16us; 16us; 17us; 17us; 18us; 19us; 19us; 20us; 20us; 21us; 22us; 22us; 23us; 23us; 24us; 24us; 24us; 25us; 25us; 25us; 26us; 26us; 27us; 27us; 27us; 27us; 27us; 28us; 28us; 28us; 28us; 28us; 29us; 29us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 31us; 31us; 32us; 32us; 32us; 32us; 32us; 32us; 33us; 33us; 33us; 34us; 34us; 34us; 35us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 37us; 38us; 38us; 39us; 39us; 39us; 40us; 40us; 41us; 41us; 42us; 43us; 43us; 44us; 44us; 45us; 45us; 45us; 45us; 46us; 47us; 47us; 48us; 48us; 49us; 49us; 50us; 50us; 50us; 51us; 51us; 51us; 51us; 52us; 52us; 52us; 52us; 53us; 53us; 53us; 54us; 54us; 55us; 55us; 55us; 55us; 55us; 55us; 56us; 56us; 56us; 57us; 57us; 57us; 57us; 58us; 58us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 60us; 61us; 61us; 62us; 62us; 62us; 63us; 63us; 64us; 64us; 64us; 65us; 65us; 65us; 65us; 66us; 66us; 67us; 67us; 67us; 68us; 68us; 68us; 69us; 69us; 69us; 70us; 70us; 71us; 72us; 72us; 73us; 73us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 74us; 75us; 75us; 76us; 76us; 77us; 77us; 77us; 78us; 78us; 79us; 79us; 80us; 80us; 81us; 81us; 82us; 82us; 83us; 83us; 84us; 85us; 85us; 86us; 86us; 87us; 87us; 87us; 88us; 88us; 89us; 89us; 90us; 90us; 91us; 91us; 91us; 91us; 92us; 92us; 92us; 93us; 94us; 94us; 94us; 95us; 95us; 96us; 96us; 96us; 97us; 97us; 98us; 98us; 99us; 100us; 101us; 101us; 101us; 101us; 102us; 103us; 103us; 104us; 104us; 105us; 105us; 106us; 106us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 108us; 108us; 108us; 109us; 110us; 110us; 111us; 111us; 111us; 111us; 112us; 112us; 112us; 113us; 113us; 113us; 114us; 114us; 115us; 115us; 115us; 116us; 116us; 117us; 118us; 119us; 120us; 121us; 122us; 123us; 123us; 124us; 124us; 125us; 126us; 126us; 127us; 128us; 129us; 130us; 130us; 130us; 130us; 131us; 131us; 132us; 133us; 133us; 133us; 134us; 134us; 135us; 135us; 136us; 136us; 136us; 136us; 136us; 137us; 137us; 138us; 139us; 139us; 140us; 140us; 140us; 141us; 141us; 142us; 142us; 142us; 143us; 144us; 144us; 145us; 146us; 146us; 147us; 147us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 148us; 149us; 149us; 150us; 151us; 151us; 151us; 151us; 152us; 152us; 153us; 153us; 153us; 153us; 153us; 154us; 154us; 154us; 154us; 154us; 154us; 155us; 155us; 156us; 156us; 157us; 157us; 157us; 157us; 157us; 158us; 158us; 158us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 159us; 160us; 160us; 161us; 161us; 161us; 161us; 161us; 161us; 161us; 161us; 161us; 162us; 162us; 163us; 163us; 164us; 165us; 165us; 166us; 167us; 167us; 167us; 168us; 168us; 168us; 169us; 169us; 170us; 170us; 171us; 171us; 171us; 171us; 171us; 172us; 172us; 172us; 172us; 172us; 173us; 173us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 174us; 175us; 175us; 176us; 177us; 177us; 177us; 178us; 178us; 178us; 178us; 179us; 180us; 180us; 180us; 180us; 181us; 181us; 182us; 183us; 184us; 184us; 184us; 185us; 185us; 185us; 185us; 185us; 186us; 186us; 187us; 187us; 187us; 187us; 187us; 187us; 187us; 187us; 187us; 187us; 187us; 187us; 188us; 188us; 189us; 189us; 190us; 190us; 190us; 190us; 190us; 190us; 190us; 190us; 190us; 190us; 190us; 190us; 191us; 191us; 191us; 191us; 191us; 191us; 191us; 191us; 191us; 191us; 192us; 192us; 192us; 192us; 193us; 193us; 193us; 193us; 193us; 193us; 193us; 193us; 193us; 194us; 194us; 194us; 194us; 195us; 195us; 195us; 196us; 196us; 196us; 197us; 197us; 197us; 197us; 198us; 198us; 198us; 198us; 198us; 199us; 199us; 200us; 200us; 200us; 201us; 201us; 201us; 202us; 202us; 203us; 203us; 204us; 204us; 204us; 205us; 205us; 205us; 205us; 206us; 206us; 206us; 207us; 208us; 209us; 209us; 210us; 210us; 211us; 211us; 212us; 212us; 212us; 213us; 213us; 213us; 213us; 213us; 214us; 214us; 215us; 215us; 215us; 216us; 216us; 216us; 217us; 217us; 218us; 218us; 218us; 219us; 220us; 220us; 220us; 221us; 222us; 222us; 223us; 223us; 223us; 223us; 223us; 224us; 224us; 224us; 225us; 225us; 226us; 226us; 227us; 227us; 228us; 228us; 229us; 229us; 230us; 230us; 231us; 231us; 231us; 231us; 231us; 231us; 232us; 232us; 233us; 233us; 234us; 234us; 234us; 234us; 235us; 235us; 235us; 236us; 236us; 237us; 237us; 238us; 238us; 239us; 239us; 239us; 239us; 239us; 239us; 239us; 239us; 240us; 240us; 240us; 240us; 241us; 242us; 242us; 243us; 243us; 243us; 244us; 244us; 244us; 244us; 244us; 244us; 244us; 244us; 244us; 244us; 245us; 245us; 246us; 246us; 246us; 247us; 247us; 248us; 248us; 248us; 249us; 249us; 249us; 249us; 250us; 250us; 251us; 251us; 251us; 251us; 252us; 252us; 253us; 254us; 255us; 255us; 255us; 256us; 256us; 256us; 256us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 257us; 258us; 259us; 259us; 260us; 260us; 261us; 261us; 261us; 261us; 262us; 263us; 263us; 263us; 264us; 264us; 265us; 265us; 266us; 266us; 267us; 267us; 268us; 268us; 269us; 269us; 269us; 269us; 270us; 270us; 270us; 271us; 271us; 271us; 271us; 272us; 272us; 273us; 273us; 274us; 274us; 275us; 275us; 276us; 276us; 277us; 277us; 278us; 278us; 279us; 279us; 280us; 280us; 281us; 281us; 282us; 282us; 283us; 283us; 284us; 284us; 285us; 286us; 286us; 287us; 287us; |] -let _fsyacc_immediateActions = [|65535us; 49152us; 65535us; 49152us; 65535us; 49152us; 16387us; 16388us; 16389us; 65535us; 65535us; 65535us; 16391us; 16393us; 16394us; 16395us; 16396us; 65535us; 16397us; 65535us; 16398us; 65535us; 16399us; 65535us; 16400us; 65535us; 16401us; 65535us; 16402us; 65535us; 16404us; 65535us; 65535us; 65535us; 16406us; 65535us; 16407us; 65535us; 16408us; 65535us; 16409us; 65535us; 16410us; 65535us; 16411us; 65535us; 16412us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16416us; 65535us; 16417us; 65535us; 65535us; 65535us; 16419us; 65535us; 16421us; 65535us; 16422us; 65535us; 65535us; 65535us; 16424us; 65535us; 65535us; 65535us; 16425us; 16426us; 65535us; 65535us; 65535us; 16427us; 16428us; 16429us; 65535us; 65535us; 65535us; 16432us; 65535us; 65535us; 16433us; 16435us; 65535us; 65535us; 65535us; 65535us; 16437us; 16440us; 65535us; 65535us; 65535us; 65535us; 16442us; 65535us; 16443us; 65535us; 65535us; 16446us; 16447us; 16448us; 65535us; 65535us; 16449us; 65535us; 16450us; 65535us; 16451us; 65535us; 65535us; 16452us; 65535us; 16453us; 16454us; 65535us; 65535us; 65535us; 16455us; 16456us; 65535us; 65535us; 16457us; 65535us; 65535us; 65535us; 16459us; 65535us; 16460us; 16461us; 16462us; 16463us; 65535us; 65535us; 65535us; 16465us; 16466us; 16467us; 65535us; 16469us; 65535us; 65535us; 65535us; 16471us; 16472us; 16473us; 65535us; 65535us; 65535us; 65535us; 16474us; 16475us; 16476us; 16477us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16479us; 65535us; 65535us; 65535us; 65535us; 16482us; 65535us; 65535us; 65535us; 16483us; 65535us; 65535us; 16484us; 16485us; 65535us; 16488us; 65535us; 65535us; 65535us; 65535us; 16489us; 16490us; 65535us; 16491us; 65535us; 65535us; 16492us; 65535us; 65535us; 65535us; 65535us; 16493us; 16494us; 16495us; 65535us; 16497us; 65535us; 16498us; 65535us; 65535us; 16499us; 65535us; 65535us; 16501us; 16502us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16503us; 65535us; 16504us; 16505us; 16506us; 65535us; 65535us; 16507us; 16508us; 65535us; 65535us; 16509us; 16510us; 65535us; 16511us; 65535us; 65535us; 16512us; 16513us; 65535us; 65535us; 16514us; 16515us; 65535us; 65535us; 16516us; 16517us; 16518us; 65535us; 65535us; 16519us; 65535us; 65535us; 16521us; 16522us; 16523us; 16524us; 16525us; 16526us; 16527us; 65535us; 16529us; 65535us; 16531us; 65535us; 65535us; 16532us; 16533us; 65535us; 65535us; 16535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16536us; 65535us; 65535us; 65535us; 65535us; 65535us; 16539us; 65535us; 16540us; 65535us; 16541us; 65535us; 65535us; 16542us; 65535us; 65535us; 16543us; 65535us; 65535us; 16544us; 65535us; 65535us; 16547us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16548us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16549us; 65535us; 16550us; 16551us; 16552us; 65535us; 65535us; 16553us; 16554us; 65535us; 65535us; 16555us; 16556us; 65535us; 16557us; 65535us; 65535us; 16558us; 16559us; 65535us; 65535us; 16560us; 16561us; 16562us; 65535us; 65535us; 16563us; 65535us; 16564us; 65535us; 16566us; 65535us; 65535us; 16567us; 16568us; 65535us; 65535us; 16570us; 65535us; 65535us; 65535us; 65535us; 16571us; 65535us; 65535us; 65535us; 65535us; 16572us; 16573us; 65535us; 16575us; 65535us; 65535us; 65535us; 65535us; 16576us; 16577us; 65535us; 65535us; 16578us; 65535us; 65535us; 16579us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16580us; 16581us; 65535us; 16582us; 65535us; 16583us; 65535us; 65535us; 65535us; 65535us; 65535us; 16584us; 65535us; 16585us; 16586us; 65535us; 16587us; 16589us; 16590us; 16591us; 16592us; 16593us; 65535us; 65535us; 16595us; 65535us; 65535us; 16597us; 65535us; 65535us; 16599us; 65535us; 65535us; 16601us; 65535us; 65535us; 16602us; 16603us; 65535us; 16605us; 16606us; 65535us; 16608us; 16609us; 65535us; 65535us; 16610us; 16611us; 16612us; 65535us; 65535us; 16613us; 65535us; 65535us; 65535us; 65535us; 16615us; 16616us; 16617us; 16618us; 65535us; 65535us; 16619us; 16620us; 16621us; 65535us; 65535us; 16622us; 65535us; 65535us; 16623us; 16624us; 65535us; 16625us; 65535us; 65535us; 16626us; 16627us; 16628us; 16629us; 16630us; 16631us; 65535us; 65535us; 65535us; 65535us; 16634us; 16635us; 65535us; 65535us; 16636us; 65535us; 65535us; 65535us; 65535us; 16637us; 16638us; 65535us; 16639us; 65535us; 65535us; 65535us; 16640us; 16641us; 16642us; 65535us; 65535us; 65535us; 65535us; 16645us; 16646us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16652us; 16653us; 65535us; 65535us; 65535us; 16654us; 65535us; 65535us; 16655us; 65535us; 16656us; 65535us; 16657us; 16658us; 65535us; 65535us; 16659us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16660us; 65535us; 16661us; 16662us; 65535us; 16663us; 65535us; 65535us; 16664us; 65535us; 16666us; 65535us; 65535us; 16667us; 65535us; 65535us; 65535us; 16669us; 65535us; 65535us; 16670us; 65535us; 65535us; 16671us; 65535us; 65535us; 16672us; 16673us; 65535us; 65535us; 16674us; 65535us; 65535us; 16675us; 65535us; 16676us; 65535us; 65535us; 65535us; 16678us; 65535us; 16679us; 16681us; 65535us; 65535us; 16682us; 65535us; 65535us; 16684us; 16685us; 65535us; 16686us; 65535us; 65535us; 65535us; 65535us; 16687us; 65535us; 16688us; 65535us; 16689us; 16690us; 65535us; 65535us; 65535us; 65535us; 16691us; 65535us; 65535us; 16693us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16697us; 16698us; 65535us; 16699us; 65535us; 65535us; 65535us; 16700us; 65535us; 65535us; 16701us; 16702us; 16703us; 16704us; 16705us; 16706us; 16707us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16708us; 65535us; 65535us; 65535us; 16712us; 65535us; 16713us; 65535us; 65535us; 16715us; 65535us; 65535us; 65535us; 65535us; 16717us; 16718us; 16719us; 65535us; 65535us; 16720us; 65535us; 65535us; 16723us; 65535us; 65535us; 16724us; 65535us; 16726us; 65535us; 16727us; 16728us; 65535us; 65535us; 65535us; 65535us; 65535us; 16729us; 16730us; 65535us; 65535us; 16731us; 16732us; 16733us; 65535us; 65535us; 16735us; 65535us; 65535us; 65535us; 16737us; 65535us; 16738us; 16739us; 65535us; 65535us; 16740us; 16741us; 16742us; 16743us; 16744us; 16745us; 16746us; 16747us; 16748us; 16749us; 16750us; 16751us; 16752us; 16753us; 16754us; 65535us; 16755us; 16756us; 16757us; 16758us; 65535us; 65535us; 16760us; 65535us; 16762us; 65535us; 16763us; 65535us; 65535us; 65535us; 16764us; 65535us; 65535us; 16767us; 65535us; 65535us; 16768us; 16769us; 16770us; 65535us; 16771us; 16772us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16773us; 65535us; 65535us; 65535us; 65535us; 16778us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16784us; 65535us; 16785us; 65535us; 65535us; 16787us; 65535us; 16788us; 65535us; 16789us; 16791us; 65535us; 16792us; 65535us; 65535us; 16793us; 65535us; 65535us; 16794us; 65535us; 65535us; 16795us; 16796us; 65535us; 65535us; 16797us; 16798us; 16799us; 16800us; 16801us; 16802us; 65535us; 65535us; 16803us; 16804us; 65535us; 16805us; 16806us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16809us; 65535us; 65535us; 65535us; 65535us; 16813us; 65535us; 65535us; 65535us; 16816us; 16817us; 65535us; 65535us; 65535us; 65535us; 16822us; 65535us; 16823us; 65535us; 16824us; 65535us; 65535us; 16827us; 65535us; 16828us; 65535us; 65535us; 16829us; 16830us; 16831us; 65535us; 65535us; 16832us; 65535us; 65535us; 16834us; 65535us; 65535us; 16836us; 65535us; 16837us; 65535us; 16838us; 65535us; 16839us; 65535us; 65535us; 65535us; 65535us; 16841us; 65535us; 16844us; 65535us; 65535us; 65535us; 16845us; 16846us; 65535us; 16847us; 65535us; 65535us; 16848us; 16849us; 16850us; 65535us; 16851us; 16852us; 65535us; 16853us; 16854us; 16855us; 16856us; 16857us; 65535us; 65535us; 16858us; 16859us; 65535us; 65535us; 16860us; 16861us; 65535us; 16862us; 65535us; 65535us; 16863us; 16864us; 16865us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16869us; 16870us; 65535us; 16871us; 16872us; 65535us; 16873us; 65535us; 65535us; 65535us; 65535us; 16874us; 16875us; 65535us; 16876us; 65535us; 65535us; 65535us; 16877us; 16878us; 65535us; 16879us; 65535us; 65535us; 65535us; 16880us; 65535us; 16881us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16884us; 65535us; 65535us; 65535us; 65535us; 65535us; 16885us; 16886us; 65535us; 65535us; 65535us; 65535us; 16887us; 65535us; 65535us; 16888us; 65535us; 16889us; 65535us; 16890us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16892us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16914us; 65535us; 65535us; 16915us; 65535us; 65535us; 16917us; 65535us; 65535us; 16918us; 16919us; 16920us; 65535us; 16921us; 16922us; 16923us; 16924us; 65535us; 65535us; 65535us; 16926us; 16927us; 16928us; 65535us; 65535us; 16931us; 65535us; 16932us; 65535us; 65535us; 65535us; 65535us; 16934us; 16935us; 65535us; 65535us; 65535us; 65535us; 16938us; 16939us; 65535us; 16940us; 65535us; 65535us; 65535us; 65535us; 16943us; 65535us; 65535us; 16944us; 65535us; 65535us; 16945us; 65535us; 65535us; 16946us; 65535us; 65535us; 16947us; 65535us; 65535us; 16948us; 65535us; 65535us; 16949us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16950us; 65535us; 16951us; 65535us; 16952us; 65535us; 16953us; 65535us; 65535us; 16955us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16960us; 65535us; 65535us; 65535us; 16962us; 65535us; 65535us; 16963us; 65535us; 65535us; 16964us; 65535us; 16965us; 16966us; 65535us; 65535us; 16967us; 16968us; 65535us; 16969us; 16970us; 16971us; 16972us; 16973us; 65535us; 65535us; 65535us; 65535us; 16974us; 65535us; 16975us; 65535us; 65535us; 16976us; 65535us; 16977us; 65535us; 65535us; 16978us; 65535us; 65535us; 16979us; 65535us; 65535us; 16980us; 65535us; 65535us; 16984us; 16985us; 16986us; 16987us; 16988us; 16989us; 16990us; 16991us; 16992us; 16993us; 65535us; 65535us; 16994us; 16995us; 65535us; 16996us; 16997us; 65535us; 65535us; 65535us; 16998us; 16999us; 65535us; 17000us; 65535us; 65535us; 17001us; 17002us; 65535us; 17003us; 65535us; 65535us; 65535us; 65535us; 17004us; 17005us; 17006us; 17007us; 65535us; 17009us; 65535us; 65535us; 65535us; 65535us; 65535us; 17010us; 17011us; 17012us; 17013us; 65535us; 65535us; 65535us; 17014us; 65535us; 65535us; 17015us; 17016us; 65535us; 17017us; 17018us; 17019us; 17020us; 17021us; 17023us; 17024us; 65535us; 65535us; 65535us; 65535us; 17028us; 65535us; 17029us; 65535us; 65535us; 65535us; 17030us; 65535us; 65535us; 17031us; 65535us; 17033us; 17034us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17036us; 17037us; 17040us; 65535us; 65535us; 65535us; 17042us; 65535us; 17044us; 65535us; 17045us; 65535us; 65535us; 65535us; 65535us; 65535us; 17047us; 65535us; 65535us; 17048us; 65535us; 65535us; 65535us; 65535us; 17049us; 65535us; 65535us; 65535us; 65535us; 65535us; 17050us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17053us; 65535us; 17054us; 17056us; 17059us; 65535us; 17061us; 65535us; 65535us; 17062us; 65535us; 17063us; 65535us; 17064us; 65535us; 17066us; 65535us; 17067us; 65535us; 65535us; 65535us; 65535us; 17068us; 17069us; 17070us; 65535us; 65535us; 65535us; 17071us; 17072us; 65535us; 65535us; 65535us; 65535us; 17073us; 65535us; 17074us; 17075us; 65535us; 65535us; 17076us; 65535us; 65535us; 65535us; 17077us; 65535us; 17078us; 65535us; 65535us; 65535us; 65535us; 65535us; 17084us; 65535us; 65535us; 17085us; 65535us; 65535us; 17087us; 65535us; 65535us; 17089us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17097us; 17098us; 65535us; 65535us; 17099us; 65535us; 65535us; 17101us; 65535us; 17102us; 65535us; 17103us; 65535us; 65535us; 17105us; 65535us; 17106us; 65535us; 65535us; 17108us; 65535us; 17111us; 65535us; 65535us; 65535us; 65535us; 17112us; 17114us; 65535us; 65535us; 17115us; 17116us; 17117us; 65535us; 65535us; 65535us; 17118us; 17119us; 65535us; 17120us; 65535us; 65535us; 17121us; 65535us; 17122us; 65535us; 17123us; 65535us; 17124us; 65535us; 17125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17127us; 65535us; 65535us; 17130us; 65535us; 17131us; 65535us; 65535us; 17133us; 17134us; 65535us; 65535us; 17135us; 17136us; 17137us; 65535us; 17138us; 17139us; 65535us; 65535us; 17141us; 17142us; 65535us; 17143us; 65535us; 17144us; 65535us; 17145us; 65535us; 65535us; 17146us; 65535us; 65535us; 17147us; 65535us; 17148us; 65535us; 17150us; 65535us; 65535us; 17151us; 65535us; 65535us; 17153us; 65535us; 17154us; 17155us; 65535us; 17157us; 17158us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 17162us; 17163us; 65535us; 65535us; 17164us; 17165us; 17166us; 65535us; 17167us; 17168us; 65535us; 65535us; 17169us; 17170us; 65535us; 65535us; 17171us; 65535us; 65535us; 17172us; 17173us; 17174us; 17175us; 17176us; 17177us; 17178us; 17179us; 17180us; 17181us; 17182us; 17183us; 17184us; 17185us; 17186us; 17187us; 17188us; 17189us; 17190us; 17191us; 17192us; 17193us; 17194us; 17195us; 17196us; 65535us; 17198us; 65535us; 17199us; 17200us; 65535us; 17201us; 17202us; 17203us; 17204us; 65535us; 17206us; 65535us; 17207us; 17208us; 17209us; 17210us; 17211us; 17212us; 65535us; 17214us; 17215us; 17216us; 65535us; 17218us; 65535us; 17221us; 65535us; 65535us; 17225us; 17226us; 17227us; 17228us; 17229us; 17230us; 17231us; 17232us; 17234us; 17236us; 17238us; 17240us; 17242us; 17244us; 17246us; 17248us; 17250us; 17251us; 17252us; 17253us; 17254us; 17255us; 17256us; 17257us; 17258us; 17259us; 17260us; 17261us; 17263us; |] -let _fsyacc_reductions () = [| -# 2427 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ParsedSigFile)) in - Microsoft.FSharp.Core.Operators.box - ( - ( - raise (Internal.Utilities.Text.Parsing.Accept(Microsoft.FSharp.Core.Operators.box _1)) - ) - : '_startsignatureFile)); -# 2436 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ParsedImplFile)) in - Microsoft.FSharp.Core.Operators.box - ( - ( - raise (Internal.Utilities.Text.Parsing.Accept(Microsoft.FSharp.Core.Operators.box _1)) - ) - : '_startimplementationFile)); -# 2445 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.interaction)) in - Microsoft.FSharp.Core.Operators.box - ( - ( - raise (Internal.Utilities.Text.Parsing.Accept(Microsoft.FSharp.Core.Operators.box _1)) - ) - : '_startinteraction)); -# 2454 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveItemsTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 426 "..\pars.mly" - IDefns (_1,lhs(parseState)) - ) -# 426 "..\pars.mly" - : Ast.interaction)); -# 2465 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 428 "..\pars.mly" - warning(Error("A semicolon is not expected at this point",rhs parseState 1)); - IDefns ([],lhs(parseState)) - ) -# 428 "..\pars.mly" - : Ast.interaction)); -# 2476 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 431 "..\pars.mly" - IDefns ([],lhs(parseState)) - ) -# 431 "..\pars.mly" - : Ast.interaction)); -# 2486 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'hashDirectiveArgs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 435 "..\pars.mly" - HashDirective (_2,_3,lhs(parseState)) - ) -# 435 "..\pars.mly" - : 'hashDirective)); -# 2498 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 439 "..\pars.mly" - _1 - ) -# 439 "..\pars.mly" - : 'hashDirectiveArg)); -# 2509 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 443 "..\pars.mly" - [] - ) -# 443 "..\pars.mly" - : 'hashDirectiveArgs)); -# 2519 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hashDirectiveArgs)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'hashDirectiveArg)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 445 "..\pars.mly" - _1 @ [_2] - ) -# 445 "..\pars.mly" - : 'hashDirectiveArgs)); -# 2531 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 448 "..\pars.mly" - ) -# 448 "..\pars.mly" - : 'interactiveTerminator)); -# 2540 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.lexcont)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 449 "..\pars.mly" - ) -# 449 "..\pars.mly" - : 'interactiveTerminator)); -# 2550 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 461 "..\pars.mly" - [] - ) -# 461 "..\pars.mly" - : 'interactiveItemsTerminator)); -# 2561 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveModuleDefns)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 462 "..\pars.mly" - _1 - ) -# 462 "..\pars.mly" - : 'interactiveItemsTerminator)); -# 2573 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 463 "..\pars.mly" - _1 - ) -# 463 "..\pars.mly" - : 'interactiveItemsTerminator)); -# 2585 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveHash)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 464 "..\pars.mly" - _1 - ) -# 464 "..\pars.mly" - : 'interactiveItemsTerminator)); -# 2597 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveModuleDefns)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'itop_seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveItemsTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 465 "..\pars.mly" - _1 @ _3 - ) -# 465 "..\pars.mly" - : 'interactiveItemsTerminator)); -# 2610 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'itop_seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveItemsTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 466 "..\pars.mly" - _1 @ _3 - ) -# 466 "..\pars.mly" - : 'interactiveItemsTerminator)); -# 2623 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveHash)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'itop_seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveItemsTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 467 "..\pars.mly" - _1 @ _3 - ) -# 467 "..\pars.mly" - : 'interactiveItemsTerminator)); -# 2636 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 471 "..\pars.mly" - _1 - ) -# 471 "..\pars.mly" - : 'interactiveModuleDefns)); -# 2647 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefn)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'interactiveModuleDefns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 472 "..\pars.mly" - _1 @ _2 - ) -# 472 "..\pars.mly" - : 'interactiveModuleDefns)); -# 2659 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 476 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations are not permitted here",rhs parseState 3)); - let attrDecls = if nonNil _1 then [ Def_attributes (_1,rhs parseState 1) ] else [] in - attrDecls @ [ mk_Def_expr(_3,rhs parseState 3)] - ) -# 476 "..\pars.mly" - : 'interactiveExpr)); -# 2674 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hashDirective)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 481 "..\pars.mly" - [Def_hash(_1,rhs parseState 1)] - ) -# 481 "..\pars.mly" - : 'interactiveHash)); -# 2685 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceSpecs)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.lexcont)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 487 "..\pars.mly" - checkEndOfFileError _2; _1 - ) -# 487 "..\pars.mly" - : Ast.ParsedSigFile)); -# 2697 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceSpecs)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.lexcont)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 489 "..\pars.mly" - _1 - ) -# 489 "..\pars.mly" - : Ast.ParsedSigFile)); -# 2709 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.lexcont)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 495 "..\pars.mly" - let emptySigFileFrag = AnonTopModuleSpec([],rhs parseState 1) in - ParsedSigFile([],[emptySigFileFrag]) - ) -# 495 "..\pars.mly" - : Ast.ParsedSigFile)); -# 2721 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceImpls)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.lexcont)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 500 "..\pars.mly" - checkEndOfFileError _2; _1 - ) -# 500 "..\pars.mly" - : Ast.ParsedImplFile)); -# 2733 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceImpls)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.lexcont)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 502 "..\pars.mly" - _1 - ) -# 502 "..\pars.mly" - : Ast.ParsedImplFile)); -# 2745 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.lexcont)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 508 "..\pars.mly" - let emptyImplFileFrag = AnonTopModuleImpl([],rhs parseState 1) in - ParsedImplFile([],[emptyImplFileFrag]) - ) -# 508 "..\pars.mly" - : Ast.ParsedImplFile)); -# 2757 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 512 "..\pars.mly" - _3,true,grabXmlDoc(parseState,1),_2 - ) -# 512 "..\pars.mly" - : 'moduleIntro)); -# 2769 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 515 "..\pars.mly" - _2,false,grabXmlDoc(parseState,1) - ) -# 515 "..\pars.mly" - : 'namespaceIntro)); -# 2780 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileModuleSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 519 "..\pars.mly" - ParsedSigFile([],[ (_1 ([],emptyPreXmlDoc)) ]) - ) -# 519 "..\pars.mly" - : 'fileNamespaceSpecs)); -# 2791 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileModuleSpec)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceSpecList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 521 "..\pars.mly" - (* If there are namespaces, the first fileModuleImpl may only contain # directives *) - let decls = - match (_1 ([],emptyPreXmlDoc)) with - | AnonTopModuleSpec(decls,m) -> decls - | AnonNamespaceFragmentSpec(_,_, decls, _,_,_) -> decls - | NamedTopModuleSpec(ModuleOrNamespaceSpec(_,_,_,_,_,_,m)) -> - raiseParseErrorAt m "only '#' compiler directives may occur prior to the first 'namespace' declaration" in - let decls = - decls |> List.collect (function - | (Spec_hash (hd,_)) -> [hd] - | d -> - reportParseErrorAt (range_of_synspec d) "only '#' compiler directives may occur prior to the first 'namespace' declaration"; - []) in - ParsedSigFile(decls, _2) - ) -# 521 "..\pars.mly" - : 'fileNamespaceSpecs)); -# 2816 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceSpec)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceSpecList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 537 "..\pars.mly" - _1 :: _2 - ) -# 537 "..\pars.mly" - : 'fileNamespaceSpecList)); -# 2828 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 538 "..\pars.mly" - [_1] - ) -# 538 "..\pars.mly" - : 'fileNamespaceSpecList)); -# 2839 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'namespaceIntro)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'deprecated_opt_equals)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileModuleSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 542 "..\pars.mly" - let path,_,xml = _2 in (_4 (path,xml)) - ) -# 542 "..\pars.mly" - : 'fileNamespaceSpec)); -# 2853 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileModuleImpl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 546 "..\pars.mly" - ParsedImplFile([], [ (_1 ([],emptyPreXmlDoc)) ]) - ) -# 546 "..\pars.mly" - : 'fileNamespaceImpls)); -# 2864 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileModuleImpl)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceImplList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 548 "..\pars.mly" - (* If there are namespaces, the first fileModuleImpl may only contain # directives *) - let decls = - match (_1 ([],emptyPreXmlDoc)) with - | AnonTopModuleImpl(decls,m) -> decls - | AnonNamespaceFragmentImpl(_,_, decls, _,_,_) -> decls - | NamedTopModuleImpl(ModuleOrNamespaceImpl(_,_,_,_,_,_,m)) -> - raiseParseErrorAt m "only '#' compiler directives may occur prior to the first 'namespace' declaration" in - let decls = - decls |> List.collect (function - | (Def_hash (hd,_)) -> [hd] - | d -> - reportParseErrorAt (range_of_syndecl d) "only '#' compiler directives may occur prior to the first 'namespace' declaration"; - []) in - ParsedImplFile(decls, _2) - ) -# 548 "..\pars.mly" - : 'fileNamespaceImpls)); -# 2889 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceImpl)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceImplList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 565 "..\pars.mly" - _1 :: _2 - ) -# 565 "..\pars.mly" - : 'fileNamespaceImplList)); -# 2901 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileNamespaceImpl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 566 "..\pars.mly" - [_1] - ) -# 566 "..\pars.mly" - : 'fileNamespaceImplList)); -# 2912 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'namespaceIntro)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'deprecated_opt_equals)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'fileModuleImpl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 570 "..\pars.mly" - let path,_,xml = _2 in (_4 (path,xml)) - ) -# 570 "..\pars.mly" - : 'fileNamespaceImpl)); -# 2926 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleIntro)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpfnsPossiblyEmpty)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 574 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let m = (rhs2 parseState 3 4) in - (fun (path,_) -> - let path2,_,xml,vis = _3 in - let lid = path@path2 in - NamedTopModuleSpec(ModuleOrNamespaceSpec(lid,true, _4, xml,_1,vis,m))) - ) -# 574 "..\pars.mly" - : 'fileModuleSpec)); -# 2945 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpfnsPossiblyEmpty)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 581 "..\pars.mly" - let m = (rhs parseState 1) in - (fun (path,xml) -> - match path with - | [] -> AnonTopModuleSpec(_1, m) - | _ -> AnonNamespaceFragmentSpec(path,false, _1, xml,[],m)) - ) -# 581 "..\pars.mly" - : 'fileModuleSpec)); -# 2960 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleIntro)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnsOrExprPossiblyEmpty)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 589 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let m = (rhs2 parseState 3 4) in - (fun (path,_) -> - let path2,isModule,xml,vis = _3 in - let lid = path@path2 in - NamedTopModuleImpl(ModuleOrNamespaceImpl(lid,isModule, _4, xml,_1,vis,m))) - ) -# 589 "..\pars.mly" - : 'fileModuleImpl)); -# 2979 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnsOrExprPossiblyEmpty)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 596 "..\pars.mly" - let m = (rhs parseState 1) in - (fun (path,xml) -> - match path with - | [] -> AnonTopModuleImpl(_1,m) - | _ -> AnonNamespaceFragmentImpl(path,false, _1, xml,[],m)) - ) -# 596 "..\pars.mly" - : 'fileModuleImpl)); -# 2994 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpfns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 604 "..\pars.mly" - _1 - ) -# 604 "..\pars.mly" - : 'moduleSpfnsPossiblyEmpty)); -# 3005 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 606 "..\pars.mly" - [] - ) -# 606 "..\pars.mly" - : 'moduleSpfnsPossiblyEmpty)); -# 3015 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 608 "..\pars.mly" - [] - ) -# 608 "..\pars.mly" - : 'moduleSpfnsPossiblyEmpty)); -# 3025 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpfn)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_top_seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpfns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 612 "..\pars.mly" - _1 :: _3 - ) -# 612 "..\pars.mly" - : 'moduleSpfns)); -# 3038 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'top_seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpfns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 614 "..\pars.mly" - (* silent recovery *) _3 - ) -# 614 "..\pars.mly" - : 'moduleSpfns)); -# 3050 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpfn)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_top_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 616 "..\pars.mly" - [_1] - ) -# 616 "..\pars.mly" - : 'moduleSpfns)); -# 3062 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnsOrExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 621 "..\pars.mly" - _1 - ) -# 621 "..\pars.mly" - : 'moduleDefnsOrExprPossiblyEmpty)); -# 3073 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 623 "..\pars.mly" - [] - ) -# 623 "..\pars.mly" - : 'moduleDefnsOrExprPossiblyEmpty)); -# 3083 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'top_seps)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnsOrExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 628 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations are not permitted here",rhs parseState 3)); - let attrDecls = if nonNil _1 then [ Def_attributes (_1,rhs parseState 1) ] else [] in - attrDecls @ mk_Def_expr (_3,rhs parseState 3) :: _5 - ) -# 628 "..\pars.mly" - : 'moduleDefnsOrExpr)); -# 3100 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'top_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 632 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations are not permitted here",rhs parseState 3)); - let attrDecls = if nonNil _1 then [ Def_attributes (_1,rhs parseState 1) ] else [] in - attrDecls @ [ mk_Def_expr(_3,rhs parseState 3) ] - ) -# 632 "..\pars.mly" - : 'moduleDefnsOrExpr)); -# 3116 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 636 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations are not permitted here",rhs parseState 3)); - let attrDecls = if nonNil _1 then [ Def_attributes (_1,rhs parseState 1) ] else [] in - attrDecls @ [ mk_Def_expr(_3,rhs parseState 3) ] - ) -# 636 "..\pars.mly" - : 'moduleDefnsOrExpr)); -# 3131 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 640 "..\pars.mly" - _1 - ) -# 640 "..\pars.mly" - : 'moduleDefnsOrExpr)); -# 3142 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 642 "..\pars.mly" - [] - ) -# 642 "..\pars.mly" - : 'moduleDefnsOrExpr)); -# 3152 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnOrDirective)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 646 "..\pars.mly" - _1 @ _2 - ) -# 646 "..\pars.mly" - : 'moduleDefns)); -# 3164 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnOrDirective)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'top_seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnsOrExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 648 "..\pars.mly" - _1 @ _3 - ) -# 648 "..\pars.mly" - : 'moduleDefns)); -# 3177 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnOrDirective)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 650 "..\pars.mly" - _1 - ) -# 650 "..\pars.mly" - : 'moduleDefns)); -# 3188 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnOrDirective)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'top_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 652 "..\pars.mly" - _1 - ) -# 652 "..\pars.mly" - : 'moduleDefns)); -# 3200 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'top_seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnsOrExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 654 "..\pars.mly" - _3 - ) -# 654 "..\pars.mly" - : 'moduleDefns)); -# 3212 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 658 "..\pars.mly" - _1 - ) -# 658 "..\pars.mly" - : 'moduleDefnOrDirective)); -# 3223 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hashDirective)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 660 "..\pars.mly" - [ Def_hash (_1,rhs2 parseState 1 1) ] - ) -# 660 "..\pars.mly" - : 'moduleDefnOrDirective)); -# 3234 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'defnBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 669 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - new_arg_uniq_ref := 0; - mkDefnBindings (rhs parseState 3,_3,_1,_2,rhs parseState 3) - ) -# 669 "..\pars.mly" - : 'moduleDefn)); -# 3249 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteLetBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 674 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - new_arg_uniq_ref := 0; - mkDefnBindings (rhs parseState 3,_3,_1,_2,rhs parseState 3) - ) -# 674 "..\pars.mly" - : 'moduleDefn)); -# 3264 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'doBinding)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 679 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let letm = rhs parseState 3 in - mkDefnBindings (letm,_3,_1,_2,rhs parseState 3) - ) -# 679 "..\pars.mly" - : 'moduleDefn)); -# 3279 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefn)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefnList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 684 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let (TyconDefn(ComponentInfo(cas ,kind ,a,cs,b,c,d,d2,d3),e,f,g)) = _4 in - let tc = (TyconDefn(ComponentInfo(_1@cas,TMK_Tycon,a,cs,b,c,d,d2,d3),e,f,g)) in - [ Def_tycons(tc :: _5,rhs2 parseState 3 5) ] - ) -# 684 "..\pars.mly" - : 'moduleDefn)); -# 3296 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeNameInfo)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefnAugmentation)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 690 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - if nonNil _1 then warning(Error("Attributes on augmentations are ignored, they must be placed on the original declaration",rhs parseState 1)); - [ Def_partial_tycon(_4,_5,rhs2 parseState 3 5) ] - ) -# 690 "..\pars.mly" - : 'moduleDefn)); -# 3312 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'exconDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 695 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let (ExconDefn(ExconCore(cas,a,b,c,d,d2),e,f)) = _3 in - let ec = (ExconDefn(ExconCore(_1@cas,a,b,c,d,d2),e,f)) in - [ Def_exn(ec, rhs2 parseState 3 3) ] - ) -# 695 "..\pars.mly" - : 'moduleDefn)); -# 3328 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleIntro)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_signature)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'namedModuleDefnBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 702 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let attribs,(path,isModule,xml,vis),mty = _1,_3,_4 in - if not isModule then raiseParseErrorAt (rhs parseState 3) "namespaces must be declared at the head of a file"; - match _6 with - | Choice1Of2 eqn -> - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - if isSome mty then raiseParseErrorAt (rhs parseState 3) "a module abbreviation may not be given a constraint"; - if List.length path <> 1 then raiseParseErrorAt (rhs parseState 3) "a module abbreviation must be a simple name, not a path"; - if List.length _1 <> 0 then raiseParseErrorAt (rhs parseState 1) "ignorning attributes on module abbreviation"; - if isSome vis then raiseParseErrorAt (rhs parseState 1) "ignorning accessibility attribute on module abbreviation. Module abbreviations are always private"; - [ Def_module_abbrev(List.hd path,eqn,rhs2 parseState 3 6) ] - | Choice2Of2 def -> - if List.length path <> 1 then raiseParseErrorAt (rhs parseState 3) "a module definition must be a simple name, not a path"; - let info = ComponentInfo(attribs,TMK_Module,[],[],path,xml,false,vis,rhs parseState 3) in - [ Def_module(info,def,mty,rhs2 parseState 3 6) ] - ) -# 702 "..\pars.mly" - : 'moduleDefn)); -# 3357 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'openDecl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 719 "..\pars.mly" - [Def_open(_1,rhs parseState 1)] - ) -# 719 "..\pars.mly" - : 'moduleDefn)); -# 3368 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 725 "..\pars.mly" - _2 - ) -# 725 "..\pars.mly" - : 'namedModuleAbbrevBlock)); -# 3379 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 727 "..\pars.mly" - _1 - ) -# 727 "..\pars.mly" - : 'namedModuleAbbrevBlock)); -# 3390 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'wrappedNamedModuleDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 731 "..\pars.mly" - - Choice2Of2 _2 - - ) -# 731 "..\pars.mly" - : 'namedModuleDefnBlock)); -# 3403 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnsOrExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 735 "..\pars.mly" - // BUG 2644 FSharp 1.0: - // There is an ambiguity here - // In particular, consider the following two: - // module M2 = - // System.DateTime.Now - // module M2 = - // Microsoft.FSharp.Core.List - // The second is a module abbreviation , the first a module containing a single expression. - // This is a bit unfortunate. For F# v1 the resolution is in favour of - // the module abbreviation, i.e. anything of the form - // module M2 = ID.ID.ID.ID - // will be taken as a module abbreviation, regardles of the identifiers themselves. - // In a later version (Dev11) we could actually try resolving the names - // to both expressions and module identifiers and base the resolution of that semantic lookup - // - // This is similar to the ambiguitty between - // type X = int - // and - // type X = OneValue - // However in that case we do use type name lookup to make the resolution. - match _2 with - | [ Def_expr (_,Expr_lid_or_id_get(false,path,_),_) ] -> - Choice1Of2 path - | _ -> - Choice2Of2 _2 - - ) -# 735 "..\pars.mly" - : 'namedModuleDefnBlock)); -# 3439 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnsOrExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 764 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unclosed block in #light syntax"; - Choice2Of2 _2 - - ) -# 764 "..\pars.mly" - : 'namedModuleDefnBlock)); -# 3453 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 768 "..\pars.mly" - - Choice2Of2 [] - - ) -# 768 "..\pars.mly" - : 'namedModuleDefnBlock)); -# 3465 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'wrappedNamedModuleDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 772 "..\pars.mly" - Choice2Of2 _1 - - ) -# 772 "..\pars.mly" - : 'namedModuleDefnBlock)); -# 3477 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 776 "..\pars.mly" - Choice1Of2 _1 - - ) -# 776 "..\pars.mly" - : 'namedModuleDefnBlock)); -# 3489 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'structOrBegin)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnsOrExprPossiblyEmpty)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 782 "..\pars.mly" - _2 - ) -# 782 "..\pars.mly" - : 'wrappedNamedModuleDefn)); -# 3501 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'structOrBegin)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleDefnsOrExprPossiblyEmpty)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 784 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched 'begin' or 'struct'"; - _2 - ) -# 784 "..\pars.mly" - : 'wrappedNamedModuleDefn)); -# 3515 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'structOrBegin)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 787 "..\pars.mly" - [] - ) -# 787 "..\pars.mly" - : 'wrappedNamedModuleDefn)); -# 3526 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 791 "..\pars.mly" - None - ) -# 791 "..\pars.mly" - : 'opt_signature)); -# 3536 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpecBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 793 "..\pars.mly" - deprecatedWithError "Signature types must be given in a .fsi or .mli file" (lhs(parseState)); - Some(Sign_explicit(_2)) - ) -# 793 "..\pars.mly" - : 'opt_signature)); -# 3548 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 796 "..\pars.mly" - deprecatedWithError "Signature types must be given in a .fsi or .mli file" (lhs(parseState)); - Some(Sign_named(_2)) - ) -# 796 "..\pars.mly" - : 'opt_signature)); -# 3560 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnBlock)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'decl_end)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 801 "..\pars.mly" - _2 - ) -# 801 "..\pars.mly" - : 'tyconDefnAugmentation)); -# 3572 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hashDirective)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 806 "..\pars.mly" - Spec_hash (_1,rhs2 parseState 1 1) - ) -# 806 "..\pars.mly" - : 'moduleSpfn)); -# 3583 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'valSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 808 "..\pars.mly" - _1 - ) -# 808 "..\pars.mly" - : 'moduleSpfn)); -# 3594 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleIntro)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'colonOrEquals)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'namedModuleAbbrevBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 811 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let path,isModule,xml,vis = _3 in - if not isModule then raiseParseErrorAt (rhs parseState 3) "namespaces must be declared at the head of a file"; - if List.length path <> 1 then raiseParseErrorAt (rhs parseState 3) "a module abbreviation must be a simple name, not a path"; - if List.length _1 <> 0 then raiseParseErrorAt (rhs parseState 1) "ignorning attributes on module abbreviation"; - if isSome(vis) then raiseParseErrorAt (rhs parseState 1) "ignorning visibility attribute on module abbreviation. Module abbreviations are always private"; - Spec_module_abbrev(List.hd path,_5,rhs2 parseState 3 5) - ) -# 811 "..\pars.mly" - : 'moduleSpfn)); -# 3615 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleIntro)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'colonOrEquals)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpecBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 820 "..\pars.mly" - let path,isModule,xml,vis = _3 in - if not isModule then raiseParseErrorAt (rhs parseState 3) "namespaces must be declared at the head of a file"; - if List.length path <> 1 then raiseParseErrorAt (rhs parseState 3) "a module moduleDefn must be a simple name, not a path"; - let info = ComponentInfo(_1,TMK_Module,[],[],path,xml,false,vis,rhs parseState 3) in - if isSome(_2) then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - Spec_module(info,_5,rhs2 parseState 3 5) - ) -# 820 "..\pars.mly" - : 'moduleSpfn)); -# 3635 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynTyconSpfn list)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 828 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let (TyconSpfn(ComponentInfo(cas,k,a,cs,b,c,d,d2,d3),e,f,g)),rest = - match _3 with - | [] -> raiseParseErrorAt (rhs parseState 3) "Unexpected empty type moduleDefn list" - | h::t -> h,t in - let tc = (TyconSpfn(ComponentInfo(_1@cas,k,a,cs,b,c,d,d2,d3),e,f,g))in - Spec_tycon (tc::rest,rhs parseState 3) - ) -# 828 "..\pars.mly" - : 'moduleSpfn)); -# 3654 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'exconSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 837 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let (ExconSpfn(ExconCore(cas,a,b,c,d,d2),e,f)) = _3 in - let ec = (ExconSpfn(ExconCore(_1@cas,a,b,c,d,d2),e,f)) in - Spec_exn(ec, rhs parseState 3) - ) -# 837 "..\pars.mly" - : 'moduleSpfn)); -# 3670 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 842 "..\pars.mly" - Spec_open (_2, rhs2 parseState 1 2) - ) -# 842 "..\pars.mly" - : 'moduleSpfn)); -# 3681 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_inline)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_mutable)) in - let _7 = (let data = parseState.GetInput(7) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _8 = (let data = parseState.GetInput(8) in (Microsoft.FSharp.Core.Operators.unbox data : 'nameop)) in - let _9 = (let data = parseState.GetInput(9) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_explicitValTyparDecls)) in - let _11 = (let data = parseState.GetInput(11) in (Microsoft.FSharp.Core.Operators.unbox data : 'topTypeWithTypeConstraints)) in - let _12 = (let data = parseState.GetInput(12) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_literalValue)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 846 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - (let attr1,attr2,inlineFlag,mutableFlag,vis2,id,doc,explicitValTyparDecls,(ty,arity),konst = (_1),(_4),(_5),(_6),(_7),(_8),grabXmlDoc(parseState,3),(_9),(_11),(_12) in - if nonNil attr2 then errorR(Deprecated("Attributes should be placed before 'val'",rhs parseState 4)); - let m = rhs2 parseState 3 11 in - let valSpfn = ValSpfn((attr1@attr2),id,explicitValTyparDecls,ty,arity,inlineFlag,mutableFlag,doc, vis2,konst,m) in - Spec_val(valSpfn,m)) - - ) -# 846 "..\pars.mly" - : 'valSpfn)); -# 3707 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 855 "..\pars.mly" - None - ) -# 855 "..\pars.mly" - : 'opt_literalValue)); -# 3717 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 856 "..\pars.mly" - Some(_2) - ) -# 856 "..\pars.mly" - : 'opt_literalValue)); -# 3728 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpfns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 860 "..\pars.mly" - _2 - ) -# 860 "..\pars.mly" - : 'moduleSpecBlock)); -# 3739 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'sigOrBegin)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpfnsPossiblyEmpty)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 861 "..\pars.mly" - _3 - ) -# 861 "..\pars.mly" - : 'moduleSpecBlock)); -# 3751 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'sigOrBegin)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'moduleSpfnsPossiblyEmpty)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 862 "..\pars.mly" - _2 - ) -# 862 "..\pars.mly" - : 'moduleSpecBlock)); -# 3763 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributes)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 865 "..\pars.mly" - _1 - ) -# 865 "..\pars.mly" - : 'opt_attributes)); -# 3774 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 866 "..\pars.mly" - [] - ) -# 866 "..\pars.mly" - : 'opt_attributes)); -# 3784 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributeList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 870 "..\pars.mly" - _1 - ) -# 870 "..\pars.mly" - : 'attributes)); -# 3795 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributeList)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributes)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 872 "..\pars.mly" - _1 @ _2 - ) -# 872 "..\pars.mly" - : 'attributes)); -# 3807 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributeListElements)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 875 "..\pars.mly" - MatchPair parseState 1 4; _2 - ) -# 875 "..\pars.mly" - : 'attributeList)); -# 3820 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attribute)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 879 "..\pars.mly" - [_1] - ) -# 879 "..\pars.mly" - : 'attributeListElements)); -# 3831 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributeListElements)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'attribute)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 881 "..\pars.mly" - _1 @ [_3] - ) -# 881 "..\pars.mly" - : 'attributeListElements)); -# 3844 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_atomicExprAfterType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 885 "..\pars.mly" - let arg = match _3 with None -> mksyn_unit (range_of_lid _1) | Some e -> e in - Attr(_1,arg,None,range_of_lid _1) - ) -# 885 "..\pars.mly" - : 'attribute)); -# 3858 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributeTarget)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_atomicExprAfterType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 888 "..\pars.mly" - let arg = match _5 with None -> mksyn_unit (range_of_lid _3) | Some e -> e in - Attr(_3,arg,Some _1,range_of_lid _3) - ) -# 888 "..\pars.mly" - : 'attribute)); -# 3873 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 892 "..\pars.mly" - ident("module",lhs(parseState)) - ) -# 892 "..\pars.mly" - : 'attributeTarget)); -# 3883 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 893 "..\pars.mly" - ident("type",lhs(parseState)) - ) -# 893 "..\pars.mly" - : 'attributeTarget)); -# 3893 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 894 "..\pars.mly" - _1 - ) -# 894 "..\pars.mly" - : 'attributeTarget)); -# 3904 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 895 "..\pars.mly" - if _1 then reportParseErrorAt (rhs parseState 1) "syntax error"; - ident("return",lhs(parseState)) - ) -# 895 "..\pars.mly" - : 'attributeTarget)); -# 3916 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconSpfn_list)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 901 "..\pars.mly" - _2 - ) -# 901 "..\pars.mly" - : Ast.SynTyconSpfn list)); -# 3927 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconSpfn)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconSpfn_list)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 905 "..\pars.mly" - _1 :: _3 - ) -# 905 "..\pars.mly" - : 'tyconSpfn_list)); -# 3939 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 907 "..\pars.mly" - [_1] - ) -# 907 "..\pars.mly" - : 'tyconSpfn_list)); -# 3950 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeNameInfo)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconSpfnRhsBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 911 "..\pars.mly" - _3 _1 - ) -# 911 "..\pars.mly" - : 'tyconSpfn)); -# 3962 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeNameInfo)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_classSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 913 "..\pars.mly" - TyconSpfn(_1,TyconSpfnRepr_simple (TyconCore_no_repr (lhs(parseState)),lhs(parseState)),_2,lhs(parseState)) - ) -# 913 "..\pars.mly" - : 'tyconSpfn)); -# 3974 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconSpfnRhs)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnMembers)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_classSpfn)) in - let _7 = (let data = parseState.GetInput(7) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_classSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 925 "..\pars.mly" - let m = lhs(parseState) in - (fun nameInfo -> - _2 nameInfo (checkForMultipleAugmentations m (_4 @ _5) _7)) - ) -# 925 "..\pars.mly" - : 'tyconSpfnRhsBlock)); -# 3991 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconSpfnRhs)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_classSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 929 "..\pars.mly" - let m = lhs(parseState) in - (fun nameInfo -> - _1 nameInfo _2) - ) -# 929 "..\pars.mly" - : 'tyconSpfnRhsBlock)); -# 4005 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefnOrSpfnSimpleRepr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 935 "..\pars.mly" - let m = lhs(parseState) in - (fun nameInfo augmentation -> - TyconSpfn(nameInfo,TyconSpfnRepr_simple (_1,m),augmentation,m)) - ) -# 935 "..\pars.mly" - : 'tyconSpfnRhs)); -# 4018 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconClassSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 939 "..\pars.mly" - let m = lhs(parseState) in - (fun nameInfo augmentation -> - TyconSpfn(nameInfo,TyconSpfnRepr_class (fst _1,snd _1,m),augmentation,m)) - ) -# 939 "..\pars.mly" - : 'tyconSpfnRhs)); -# 4031 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'topType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 943 "..\pars.mly" - let m = lhs(parseState) in - let ty,arity = _3 in - let invoke = ClassMemberSpfn_binding(ValSpfn([],mksyn_id m "Invoke",inferredTyparDecls,ty,arity,false,false,emptyPreXmlDoc,None,None,m),AbstractMemberFlags None MemberKindMember,m) in - (fun nameInfo augmentation -> - if nonNil augmentation then raiseParseErrorAt m "augmentations are not permitted on delegate type moduleDefns"; - TyconSpfn(nameInfo,TyconSpfnRepr_class (TyconDelegate (ty,arity),[invoke],m),[],m)) - ) -# 943 "..\pars.mly" - : 'tyconSpfnRhs)); -# 4047 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnBlockKindUnspecified)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 952 "..\pars.mly" - (TyconUnspecified, _1) - ) -# 952 "..\pars.mly" - : 'tyconClassSpfn)); -# 4058 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classOrInterfaceOrStruct)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 954 "..\pars.mly" - (_1,_2) - ) -# 954 "..\pars.mly" - : 'tyconClassSpfn)); -# 4070 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classOrInterfaceOrStruct)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnBlock)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 956 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched 'class', 'interface' or 'struct'"; - (_1,_2) - ) -# 956 "..\pars.mly" - : 'tyconClassSpfn)); -# 4084 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classOrInterfaceOrStruct)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 959 "..\pars.mly" - (* silent recovery *) (_1,[]) - ) -# 959 "..\pars.mly" - : 'tyconClassSpfn)); -# 4095 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 963 "..\pars.mly" - _2 - ) -# 963 "..\pars.mly" - : 'classSpfnBlockKindUnspecified)); -# 4106 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnMembers)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 965 "..\pars.mly" - _2 - ) -# 965 "..\pars.mly" - : 'classSpfnBlockKindUnspecified)); -# 4118 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 968 "..\pars.mly" - _2 - ) -# 968 "..\pars.mly" - : 'classSpfnBlockKindUnspecified)); -# 4129 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnBlock)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 970 "..\pars.mly" - _2 - ) -# 970 "..\pars.mly" - : 'classSpfnBlockKindUnspecified)); -# 4141 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 975 "..\pars.mly" - _2 - ) -# 975 "..\pars.mly" - : 'classSpfnBlock)); -# 4152 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnMembers)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 976 "..\pars.mly" - _2 - ) -# 976 "..\pars.mly" - : 'classSpfnBlock)); -# 4164 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 977 "..\pars.mly" - _1 - ) -# 977 "..\pars.mly" - : 'classSpfnBlock)); -# 4175 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classMemberSpfn)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 981 "..\pars.mly" - _1 :: _3 - ) -# 981 "..\pars.mly" - : 'classSpfnMembers)); -# 4188 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 983 "..\pars.mly" - [] - ) -# 983 "..\pars.mly" - : 'classSpfnMembers)); -# 4198 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 987 "..\pars.mly" - StaticMemberFlags - ) -# 987 "..\pars.mly" - : 'memberFlags)); -# 4208 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 988 "..\pars.mly" - NonVirtualMemberFlags - ) -# 988 "..\pars.mly" - : 'memberFlags)); -# 4218 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 989 "..\pars.mly" - raiseParseErrorAt (rhs parseState 1) "use 'member x.MyMethod(arg) = ...' to declare a new method" - ) -# 989 "..\pars.mly" - : 'memberFlags)); -# 4228 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 990 "..\pars.mly" - raiseParseErrorAt (rhs parseState 1) "use 'abstract' to declare a new virtual method slot, and 'default' or 'override' to specify the default implemenation for that slot" - ) -# 990 "..\pars.mly" - : 'memberFlags)); -# 4238 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 991 "..\pars.mly" - OverrideMemberFlags - ) -# 991 "..\pars.mly" - : 'memberFlags)); -# 4248 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 992 "..\pars.mly" - OverrideMemberFlags - ) -# 992 "..\pars.mly" - : 'memberFlags)); -# 4258 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'memberFlags)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 995 "..\pars.mly" - _1 - ) -# 995 "..\pars.mly" - : 'memberSpecFlags)); -# 4269 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 996 "..\pars.mly" - AbstractMemberFlags - ) -# 996 "..\pars.mly" - : 'memberSpecFlags)); -# 4279 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 997 "..\pars.mly" - AbstractMemberFlags - ) -# 997 "..\pars.mly" - : 'memberSpecFlags)); -# 4289 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1001 "..\pars.mly" - (fun arity -> (match arity with ValSynInfo([],_) -> MemberKindPropertyGet | _ -> MemberKindMember)) - ) -# 1001 "..\pars.mly" - : 'classMemberSpfnGetSet)); -# 4299 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classMemberSpfnGetSetElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1003 "..\pars.mly" - (fun arity -> _2) - ) -# 1003 "..\pars.mly" - : 'classMemberSpfnGetSet)); -# 4310 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classMemberSpfnGetSetElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1005 "..\pars.mly" - (fun arity -> _2) - ) -# 1005 "..\pars.mly" - : 'classMemberSpfnGetSet)); -# 4321 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classMemberSpfnGetSetElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1007 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched 'with' or badly formatted 'with' block"; - (fun arity -> _2) - ) -# 1007 "..\pars.mly" - : 'classMemberSpfnGetSet)); -# 4333 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'nameop)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1013 "..\pars.mly" - (let (id:ident) = _1 in - if id.idText = "get" then MemberKindPropertyGet - else if id.idText = "set" then MemberKindPropertySet - else raiseParseErrorAt (rhs parseState 1) "'get', 'set' or 'get,set' required") - ) -# 1013 "..\pars.mly" - : 'classMemberSpfnGetSetElements)); -# 4347 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'nameop)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'nameop)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1018 "..\pars.mly" - let (id:ident) = _1 in - if not ((id.idText = "get" && _3.idText = "set") or - (id.idText = "set" && _3.idText = "get")) then - raiseParseErrorAt (rhs2 parseState 1 3) "'get', 'set' or 'get,set' required"; - MemberKindPropertyGetSet - ) -# 1018 "..\pars.mly" - : 'classMemberSpfnGetSetElements)); -# 4363 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'memberSpecFlags)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_inline)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'nameop)) in - let _7 = (let data = parseState.GetInput(7) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_explicitValTyparDecls)) in - let _9 = (let data = parseState.GetInput(9) in (Microsoft.FSharp.Core.Operators.unbox data : 'topTypeWithTypeConstraints)) in - let _10 = (let data = parseState.GetInput(10) in (Microsoft.FSharp.Core.Operators.unbox data : 'classMemberSpfnGetSet)) in - let _11 = (let data = parseState.GetInput(11) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_literalValue)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1026 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let inlineFlag,doc,vis2,id,explicitValTyparDecls,(ty,arity),optLiteralValue = _4,grabXmlDoc(parseState,3),_5,_6,_7,_9,_11 in - let m = rhs2 parseState 3 10 in - let valSpfn = ValSpfn(_1,id,explicitValTyparDecls,ty,arity, inlineFlag,false,doc, vis2,optLiteralValue,m) in - ClassMemberSpfn_binding(valSpfn, _3 (computeOverloadQualifier _1) (_10 arity),m) - ) -# 1026 "..\pars.mly" - : 'classMemberSpfn)); -# 4387 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'interfaceMember)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1032 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - ClassMemberSpfn_interface (_4,union_ranges (rhs parseState 3) (range_of_syntype _4)) - ) -# 1032 "..\pars.mly" - : 'classMemberSpfn)); -# 4402 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1035 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - ClassMemberSpfn_inherit (_4,union_ranges (rhs parseState 3) (range_of_syntype _4)) - ) -# 1035 "..\pars.mly" - : 'classMemberSpfn)); -# 4416 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'fieldDecl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1038 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - let fld = _4 _1 false in - ClassMemberSpfn_field(fld,rhs2 parseState 3 4) - ) -# 1038 "..\pars.mly" - : 'classMemberSpfn)); -# 4431 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'fieldDecl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1042 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - ClassMemberSpfn_field(_5 _1 true,rhs2 parseState 3 5) - ) -# 1042 "..\pars.mly" - : 'classMemberSpfn)); -# 4445 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1045 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - ClassMemberSpfn_tycon(_5,rhs2 parseState 3 5) - ) -# 1045 "..\pars.mly" - : 'classMemberSpfn)); -# 4459 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'topTypeWithTypeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1048 "..\pars.mly" - let vis,doc,(ty,arity) = _2,grabXmlDoc(parseState,3),_5 in - let m = union_ranges (rhs parseState 3) (range_of_syntype ty) in - let inlineFlag = false in - let valSpfn = ValSpfn(_1,mksyn_id (rhs parseState 3) "new",noInferredTypars,ty,arity,inlineFlag,false, doc, vis,None,m) in - ClassMemberSpfn_binding(valSpfn, CtorMemberFlags (computeOverloadQualifier _1),m) - ) -# 1048 "..\pars.mly" - : 'classMemberSpfn)); -# 4476 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconNameAndTyparDecls)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_typeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1056 "..\pars.mly" - let typars,lid,fixity,tpcs1,vis,xmlDoc = _2 in - let tpcs2 = _3 in - ComponentInfo(_1,TMK_Tycon,typars,(tpcs1 @ tpcs2),lid,xmlDoc,fixity,vis,range_of_lid lid) - ) -# 1056 "..\pars.mly" - : 'typeNameInfo)); -# 4491 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefn)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefnList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1062 "..\pars.mly" - _2 :: _3 - ) -# 1062 "..\pars.mly" - : 'tyconDefnList)); -# 4503 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1064 "..\pars.mly" - [] - ) -# 1064 "..\pars.mly" - : 'tyconDefnList)); -# 4513 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeNameInfo)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1068 "..\pars.mly" - TyconDefn(_1,TyconDefnRepr_simple(TyconCore_no_repr(lhs(parseState)),lhs(parseState)),[],lhs(parseState)) - ) -# 1068 "..\pars.mly" - : 'tyconDefn)); -# 4524 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeNameInfo)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefnRhsBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1070 "..\pars.mly" - let tcDefRepr,members = _3 in - TyconDefn(_1,tcDefRepr,members,lhs(parseState)) - ) -# 1070 "..\pars.mly" - : 'tyconDefn)); -# 4537 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeNameInfo)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'simplePatterns)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'optAsSpec)) in - let _8 = (let data = parseState.GetInput(8) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefnRhsBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1073 "..\pars.mly" - let vis,spats, az,(tcDefRepr,members) = _3,_5,_6,_8 in - let (ComponentInfo(_,_,_,_,lid,_,_,_,_)) = _1 in - let memberCtorPattern = ClassMemberDefn_implicit_ctor (vis,_2,spats,az,range_of_lid lid) in - let tcDefRepr = - match tcDefRepr with - | TyconDefnRepr_class (k,cspec,m) -> TyconDefnRepr_class (k,memberCtorPattern::cspec,m) - | _ -> reportParseErrorAt (rhs2 parseState 1 5) "Only class types may take value arguments"; tcDefRepr - in - TyconDefn(_1,tcDefRepr,members,lhs(parseState)) - ) -# 1073 "..\pars.mly" - : 'tyconDefn)); -# 4562 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefnRhs)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMembers)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_classDefn)) in - let _7 = (let data = parseState.GetInput(7) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_classDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1093 "..\pars.mly" - let m = lhs(parseState) in - _2 (checkForMultipleAugmentations m (_4 @ _5) _7) - ) -# 1093 "..\pars.mly" - : 'tyconDefnRhsBlock)); -# 4578 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefnRhs)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_classDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1096 "..\pars.mly" - let m = lhs(parseState) in - _1 _2 - ) -# 1096 "..\pars.mly" - : 'tyconDefnRhsBlock)); -# 4591 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefnOrSpfnSimpleRepr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1101 "..\pars.mly" - let m = lhs(parseState) in (fun augmentation -> TyconDefnRepr_simple (_1,m),augmentation) - ) -# 1101 "..\pars.mly" - : 'tyconDefnRhs)); -# 4602 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconClassDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1103 "..\pars.mly" - let m = lhs(parseState) in (fun augmentation -> TyconDefnRepr_class (fst _1,snd _1,m),augmentation) - ) -# 1103 "..\pars.mly" - : 'tyconDefnRhs)); -# 4613 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'topType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1105 "..\pars.mly" - let m = lhs(parseState) in - let ty,arity = _3 in - (fun augmentation -> - let valSpfn = ValSpfn([],mksyn_id m "Invoke",inferredTyparDecls,ty,arity,false,false,emptyPreXmlDoc,None,None,m) in - let invoke = ClassMemberDefn_slotsig(valSpfn,AbstractMemberFlags None MemberKindMember,m) in - if nonNil augmentation then raiseParseErrorAt m "augmentations are not permitted on delegate type moduleDefns"; - TyconDefnRepr_class (TyconDelegate (ty,arity),[invoke],m),[]) - ) -# 1105 "..\pars.mly" - : 'tyconDefnRhs)); -# 4630 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnBlockKindUnspecified)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1115 "..\pars.mly" - (TyconUnspecified, _1) - ) -# 1115 "..\pars.mly" - : 'tyconClassDefn)); -# 4641 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classOrInterfaceOrStruct)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1117 "..\pars.mly" - (_1,_2) - ) -# 1117 "..\pars.mly" - : 'tyconClassDefn)); -# 4653 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classOrInterfaceOrStruct)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnBlock)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1119 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched 'class', 'interface' or 'struct'"; - (_1,_2) - ) -# 1119 "..\pars.mly" - : 'tyconClassDefn)); -# 4667 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classOrInterfaceOrStruct)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1122 "..\pars.mly" - (* silent recovery *) (_1,[]) - ) -# 1122 "..\pars.mly" - : 'tyconClassDefn)); -# 4678 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMembers)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1126 "..\pars.mly" - (* silent recovery *) _2 - ) -# 1126 "..\pars.mly" - : 'classDefnBlockKindUnspecified)); -# 4690 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1128 "..\pars.mly" - _2 - ) -# 1128 "..\pars.mly" - : 'classDefnBlockKindUnspecified)); -# 4701 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMembers)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1141 "..\pars.mly" - (* silent recovery *) _2 - ) -# 1141 "..\pars.mly" - : 'classDefnBlock)); -# 4713 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1142 "..\pars.mly" - _2 - ) -# 1142 "..\pars.mly" - : 'classDefnBlock)); -# 4724 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1143 "..\pars.mly" - _1 - ) -# 1143 "..\pars.mly" - : 'classDefnBlock)); -# 4735 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMember)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1147 "..\pars.mly" - _1 @ _3 - ) -# 1147 "..\pars.mly" - : 'classDefnMembers)); -# 4748 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1150 "..\pars.mly" - _2 - ) -# 1150 "..\pars.mly" - : 'classDefnMembers)); -# 4759 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1152 "..\pars.mly" - [] - ) -# 1152 "..\pars.mly" - : 'classDefnMembers)); -# 4769 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMemberGetSetElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1156 "..\pars.mly" - _2 - ) -# 1156 "..\pars.mly" - : 'classDefnMemberGetSet)); -# 4780 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMemberGetSetElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1158 "..\pars.mly" - _2 - ) -# 1158 "..\pars.mly" - : 'classDefnMemberGetSet)); -# 4791 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMemberGetSetElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1160 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched 'with' or badly formatted 'with' block"; - _2 - ) -# 1160 "..\pars.mly" - : 'classDefnMemberGetSet)); -# 4803 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMemberGetSetElement)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1165 "..\pars.mly" - [_1] - ) -# 1165 "..\pars.mly" - : 'classDefnMemberGetSetElements)); -# 4814 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMemberGetSetElement)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMemberGetSetElement)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1167 "..\pars.mly" - [_1;_3] - ) -# 1167 "..\pars.mly" - : 'classDefnMemberGetSetElements)); -# 4826 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_inline)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'bindingPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_topReturnTypeWithTypeConstraints)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1171 "..\pars.mly" - let rhsm = (range_of_synexpr _5) in - (_1,_2,_3,_5,rhsm) - ) -# 1171 "..\pars.mly" - : 'classDefnMemberGetSetElement)); -# 4841 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_inline)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'bindingPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_topReturnTypeWithTypeConstraints)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1177 "..\pars.mly" - let rhsm = (range_of_synexpr _5) in - let wholem = union_ranges (rhs2 parseState 3 4) rhsm in - let mpat = rhs parseState 2 in - let optReturnType = _3 in - let bindingBuilder,bindm = _2 in - (fun vis memFlagsBuilder attrs -> - [ ClassMemberDefn_member_binding (bindingBuilder (vis,_1,false,bindm,NoSequencePointAtInvisibleBinding,wholem,optReturnType,_5,rhsm,[],attrs,Some(memFlagsBuilder (computeOverloadQualifier attrs) MemberKindMember)),bindm) ]) - ) -# 1177 "..\pars.mly" - : 'memberCore)); -# 4861 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_inline)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'bindingPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_topReturnTypeWithTypeConstraints)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnMemberGetSet)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1187 "..\pars.mly" - let wholem = rhs2 parseState 2 4 in - let propertyNameBindingBuilder,_ = _2 in - let optPropertyType = _3 in - let mutableFlag = false in - (fun visNoLongerUsed memFlagsBuilder attrs -> - _4 |> List.map (fun (optInline,(bindingBuilder,bindm),optReturnType,expr,exprm) -> - let optInline = _1 || optInline in - let overloadQualifier = (computeOverloadQualifier attrs) in - - let binding = bindingBuilder (visNoLongerUsed,optInline,mutableFlag,bindm,NoSequencePointAtInvisibleBinding,wholem,optReturnType,expr,exprm,[],attrs,Some (memFlagsBuilder overloadQualifier MemberKindMember)) in - let (Binding (vis,_,pseudo,_,attrs,doc,valSynData,pv,_,bindm,spBind)) = binding in - let memberKind = - let getset = - let rec go p = - match p with - | Pat_lid ([id],_,_,_,_) -> id.idText - | Pat_as (_,nm,_,_,_) -> nm.idText - | Pat_typed (p,_,_) -> go p - | Pat_attrib (p,_,_) -> go p - | _ -> raiseParseErrorAt bindm "invalid declaration syntax" in - go pv in - if getset = "get" then MemberKindPropertyGet - else if getset = "set" then MemberKindPropertySet - else raiseParseErrorAt bindm "get and/or set required" in - // REVIEW: It's hard not to ignore the optPropertyType type annotation for 'set' properties. To apply it, - // we should apply it to the last argument, but at this point we've already pushed the patterns that - // make up the arguments onto the RHS. So we just always give a warning. - begin match optPropertyType with - | Some _ -> errorR(Error("type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...'",bindm)) - | None -> () - end; - - let optReturnType = - match (memberKind, optReturnType) with - | MemberKindPropertySet,_ -> optReturnType - | _, None -> optPropertyType - | _ -> optReturnType in - (* REDO with the correct member kind *) - let binding = bindingBuilder(vis,pseudo,mutableFlag,bindm,NoSequencePointAtInvisibleBinding,wholem,optReturnType,expr,exprm,[],attrs,Some(memFlagsBuilder overloadQualifier memberKind)) in - let (Binding (vis,_,pseudo,_,attrs,doc,valSynData,pv,rhsAfterPats,bindm,spBind)) = binding in - - let (ValSynData(_,valSynInfo,_)) = valSynData in - // Setters have all arguments tupled in their internal TAST form, though they don't appear to be tupled from the syntax - let memFlags = memFlagsBuilder overloadQualifier memberKind in - let valSynInfo = - match memberKind, valSynInfo with - | MemberKindPropertyGet,ValSynInfo ([],_) when not memFlags.MemberIsInstance -> raiseParseErrorAt bindm "A getter property must at least have one argument, e.g. 'with get() = ...'" - | MemberKindPropertyGet,ValSynInfo ([thisArg],_) when memFlags.MemberIsInstance -> raiseParseErrorAt bindm "A getter property must at least have one argument, e.g. 'with get() = ...'" - | MemberKindPropertySet,ValSynInfo (thisArg::indexAndValueArgs,ret) when memFlags.MemberIsInstance -> ValSynInfo ([thisArg;List.concat indexAndValueArgs],ret) - | MemberKindPropertySet,ValSynInfo (indexAndValueArgs,ret) when not memFlags.MemberIsInstance -> ValSynInfo ([List.concat indexAndValueArgs],ret) - | _ -> valSynInfo in - let valSynData = ValSynData(Some(memFlags), valSynInfo,None) in - // Create the binding from the first lambda pattern in order to extract out the pattern of the - // 'this' variable and put it into the pattern for the get/set binding, replacing the get/set part - // A little gross. - let pv',doc' = - let bindingOuter = propertyNameBindingBuilder(vis,optInline,mutableFlag,bindm,spBind,bindm,optReturnType,expr,exprm,[],attrs,Some(memFlagsBuilder overloadQualifier MemberKindMember)) in - let (Binding (_,_,_,_,_,doc2,_,pvOuter,_,_,_)) = bindingOuter in - - - let lidOuter,lidVisOuter = - match pvOuter with - | Pat_lid (lid,None,[],lidVisOuter,m) -> lid,lidVisOuter - | p -> raiseParseErrorAt bindm "invalid declaration syntax" in - // Merge the visibility from the outer point with the inner point, e.g. - // member this.Size with get () = m_size - - let mergeLidVisOuter lidVisInner = - match lidVisInner,lidVisOuter with - | None,None -> None - | Some lidVisInner,None | None,Some lidVisInner -> Some lidVisInner - | Some _, Some _ -> - errorR(Error("multiple accessibilities given for property getter or setter",bindm)); - lidVisInner in - - // Replace the "get" or the "set" with the right name - let rec go p = - match p with - | Pat_lid ([id],tyargs,args,lidVisInner,m) -> - // Setters have all arguments tupled in their internal form, though they don't - // appear to be tupled from the syntax. Somewhat unfortunate - let args = - if id.idText = "set" then - match args with - | [Pat_paren(Pat_tuple (indexPats,_),indexPatRange);valuePat] when id.idText = "set" -> - [Pat_tuple(indexPats@[valuePat],union_ranges indexPatRange (range_of_synpat valuePat))] - | [indexPat;valuePat] -> - [Pat_tuple(args,union_ranges (range_of_synpat indexPat) (range_of_synpat valuePat))] - | [valuePat] -> - [valuePat] - | _ -> - raiseParseErrorAt m "property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... '" - else - args in - Pat_lid (lidOuter,tyargs,args,mergeLidVisOuter lidVisInner,m) - | Pat_as (_,nm,_,lidVisInner,m) -> Pat_lid (lidOuter,None,[],mergeLidVisOuter lidVisInner,m) - | Pat_typed (p,ty,m) -> Pat_typed(go p,ty,m) - | Pat_attrib (p,attribs,m) -> Pat_attrib(go p,attribs,m) - | Pat_wild(m) -> Pat_wild(m) - | _ -> raiseParseErrorAt bindm "invalid declaration syntax" in - go pv,MergePreXmlDoc doc2 doc in - ClassMemberDefn_member_binding (Binding (vis,NormalBinding,pseudo,mutableFlag,attrs,doc',valSynData,pv',rhsAfterPats,bindm,spBind),bindm))) - - ) -# 1187 "..\pars.mly" - : 'memberCore)); -# 4977 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1303 "..\pars.mly" - ) -# 1303 "..\pars.mly" - : 'abstractMemberFlags)); -# 4986 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1304 "..\pars.mly" - ) -# 1304 "..\pars.mly" - : 'abstractMemberFlags)); -# 4995 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1308 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - [mkClassMemberLocalBindings(false,rhs2 parseState 3 3,_1,_2,_3)] - ) -# 1308 "..\pars.mly" - : 'classDefnMember)); -# 5009 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1312 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - [mkClassMemberLocalBindings(true,rhs2 parseState 3 4,_1,_2,_4)] - ) -# 1312 "..\pars.mly" - : 'classDefnMember)); -# 5023 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'memberFlags)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'memberCore)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_ODECLEND)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1322 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - _4 _2 _3 _1 - ) -# 1322 "..\pars.mly" - : 'classDefnMember)); -# 5039 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'interfaceMember)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_interfaceImplDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1326 "..\pars.mly" - if nonNil _1 then errorR(Error("attributes are not permitted on interface implementations",rhs parseState 1)); - if isSome _2 then errorR(Error("interfaces always have the same visibility as the enclosing type",rhs parseState 3)); - [ ClassMemberDefn_interface (_4, _5,rhs2 parseState 3 5) ] - ) -# 1326 "..\pars.mly" - : 'classDefnMember)); -# 5056 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'abstractMemberFlags)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_inline)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'nameop)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_explicitValTyparDecls)) in - let _8 = (let data = parseState.GetInput(8) in (Microsoft.FSharp.Core.Operators.unbox data : 'topTypeWithTypeConstraints)) in - let _9 = (let data = parseState.GetInput(9) in (Microsoft.FSharp.Core.Operators.unbox data : 'classMemberSpfnGetSet)) in - let _10 = (let data = parseState.GetInput(10) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_ODECLEND)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1331 "..\pars.mly" - let ty,arity = _8 in - let inlineFlag,doc,id,explicitValTyparDecls = _4,grabXmlDoc(parseState,3),_5,_6 in - let m = rhs2 parseState 3 9 in - if isSome _2 then errorR(Error("Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type",m)); - let valSpfn = ValSpfn(_1,id,explicitValTyparDecls,ty,arity, inlineFlag,false,doc, None,None,m) in - [ ClassMemberDefn_slotsig(valSpfn,AbstractMemberFlags (computeOverloadQualifier _1) (_9 arity), m) ] - ) -# 1331 "..\pars.mly" - : 'classDefnMember)); -# 5080 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'inheritsDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1339 "..\pars.mly" - if nonNil _1 then errorR(Error("attributes are not permitted on 'inherit' declarations",rhs parseState 1)); - if isSome _2 then errorR(Error("Visibility declarations are not permitted on an 'inherits' declaration",rhs parseState 1)); - [ _3 ] - ) -# 1339 "..\pars.mly" - : 'classDefnMember)); -# 5095 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'fieldDecl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1344 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - [ ClassMemberDefn_field(_4 _1 false,rhs2 parseState 3 4) ] - ) -# 1344 "..\pars.mly" - : 'classDefnMember)); -# 5109 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'fieldDecl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1348 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - [ ClassMemberDefn_field(_5 _1 true,rhs2 parseState 3 5) ] - ) -# 1348 "..\pars.mly" - : 'classDefnMember)); -# 5123 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPattern)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'optAsSpec)) in - let _7 = (let data = parseState.GetInput(7) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _8 = (let data = parseState.GetInput(8) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_ODECLEND)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1352 "..\pars.mly" - let m = union_ranges (rhs2 parseState 3 6) (range_of_synexpr _7) in - let expr = _7 in - let valSynData = ValSynData (Some(CtorMemberFlags (computeOverloadQualifier _1)), ValSynInfo([SynInfo.InferArgSynInfoFromPat _4],SynInfo.unnamedRetVal), _5) in - let vis = _2 in - [ ClassMemberDefn_member_binding(Binding (None,NormalBinding,false,false,_1,grabXmlDoc(parseState,3),valSynData, Pat_lid ([mksyn_id (rhs parseState 3) "new"],Some noInferredTypars,[_4],vis,rhs parseState 3),BindingRhs([],None,expr),m,NoSequencePointAtInvisibleBinding),m) ] - ) -# 1352 "..\pars.mly" - : 'classDefnMember)); -# 5143 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'tyconDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1359 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2)); - [ ClassMemberDefn_tycon(_5,None,rhs2 parseState 3 5) ] - ) -# 1359 "..\pars.mly" - : 'classDefnMember)); -# 5157 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'pathop)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1363 "..\pars.mly" - (None,_1) - ) -# 1363 "..\pars.mly" - : 'atomicPatternLongIdent)); -# 5168 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'access)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'pathop)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1364 "..\pars.mly" - (Some(_1), _2) - ) -# 1364 "..\pars.mly" - : 'atomicPatternLongIdent)); -# 5180 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1367 "..\pars.mly" - None - ) -# 1367 "..\pars.mly" - : 'opt_access)); -# 5190 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'access)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1368 "..\pars.mly" - Some(_1) - ) -# 1368 "..\pars.mly" - : 'opt_access)); -# 5201 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1371 "..\pars.mly" - accessPrivate - ) -# 1371 "..\pars.mly" - : 'access)); -# 5211 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1372 "..\pars.mly" - accessPublic - ) -# 1372 "..\pars.mly" - : 'access)); -# 5221 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1373 "..\pars.mly" - accessInternal - ) -# 1373 "..\pars.mly" - : 'access)); -# 5231 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'access)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1377 "..\pars.mly" - Some(_1) - ) -# 1377 "..\pars.mly" - : 'opt_decl_visibility)); -# 5242 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1378 "..\pars.mly" - None - ) -# 1378 "..\pars.mly" - : 'opt_decl_visibility)); -# 5252 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'objectImplementationBlock)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'decl_end)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1381 "..\pars.mly" - Some(_2) - ) -# 1381 "..\pars.mly" - : 'opt_interfaceImplDefn)); -# 5264 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1382 "..\pars.mly" - None - ) -# 1382 "..\pars.mly" - : 'opt_interfaceImplDefn)); -# 5274 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classDefnBlock)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'decl_end)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1385 "..\pars.mly" - _2 - ) -# 1385 "..\pars.mly" - : 'opt_classDefn)); -# 5286 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1386 "..\pars.mly" - [] - ) -# 1386 "..\pars.mly" - : 'opt_classDefn)); -# 5296 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'classSpfnBlock)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'decl_end)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1389 "..\pars.mly" - _2 - ) -# 1389 "..\pars.mly" - : 'opt_classSpfn)); -# 5308 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1390 "..\pars.mly" - [] - ) -# 1390 "..\pars.mly" - : 'opt_classSpfn)); -# 5318 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'optBaseSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1395 "..\pars.mly" - let mDecl = union_ranges (rhs parseState 1) (range_of_syntype _2) in - ClassMemberDefn_inherit(_2,_3,mDecl) - ) -# 1395 "..\pars.mly" - : 'inheritsDefn)); -# 5331 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExprAfterType)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'optBaseSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1398 "..\pars.mly" - let mDecl = union_ranges (rhs parseState 1) (range_of_synexpr _4) in - ClassMemberDefn_implicit_inherit(_2,_4,_5,mDecl) - ) -# 1398 "..\pars.mly" - : 'inheritsDefn)); -# 5346 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'asSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1402 "..\pars.mly" - Some(_1) - ) -# 1402 "..\pars.mly" - : 'optAsSpec)); -# 5357 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1403 "..\pars.mly" - None - ) -# 1403 "..\pars.mly" - : 'optAsSpec)); -# 5367 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1406 "..\pars.mly" - _2 - ) -# 1406 "..\pars.mly" - : 'asSpec)); -# 5378 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'baseSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1409 "..\pars.mly" - Some(_1) - ) -# 1409 "..\pars.mly" - : 'optBaseSpec)); -# 5389 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1410 "..\pars.mly" - None - ) -# 1410 "..\pars.mly" - : 'optBaseSpec)); -# 5399 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1414 "..\pars.mly" - if (_2).idText <> "base" then - errorR(Error("'inherit' declarations may not have 'as' bindings. The keyword 'base' may be used instead. Remove this 'as' binding",rhs2 parseState 1 2)); - ident("base",rhs parseState 2) - ) -# 1414 "..\pars.mly" - : 'baseSpec)); -# 5412 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1419 "..\pars.mly" - errorR(Error("'inherit' declarations may not have 'as' bindings. The keyword 'base' may be used instead. Remove this 'as' binding",rhs2 parseState 1 2)); - ident("base",rhs parseState 2) - ) -# 1419 "..\pars.mly" - : 'baseSpec)); -# 5423 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'objectImplementationMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1424 "..\pars.mly" - _2 - ) -# 1424 "..\pars.mly" - : 'objectImplementationBlock)); -# 5434 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'objectImplementationMembers)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1425 "..\pars.mly" - _2 - ) -# 1425 "..\pars.mly" - : 'objectImplementationBlock)); -# 5446 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'objectImplementationMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1426 "..\pars.mly" - _1 - ) -# 1426 "..\pars.mly" - : 'objectImplementationBlock)); -# 5457 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'objectImplementationMember)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'objectImplementationMembers)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1429 "..\pars.mly" - _1 @ _3 - ) -# 1429 "..\pars.mly" - : 'objectImplementationMembers)); -# 5470 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'objectImplementationMember)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1430 "..\pars.mly" - _1 - ) -# 1430 "..\pars.mly" - : 'objectImplementationMembers)); -# 5482 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'memberOrOverride)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'memberCore)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_ODECLEND)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1434 "..\pars.mly" - _3 None OverrideMemberFlags _1 - ) -# 1434 "..\pars.mly" - : 'objectImplementationMember)); -# 5496 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'memberOrOverride)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1435 "..\pars.mly" - [] - ) -# 1435 "..\pars.mly" - : 'objectImplementationMember)); -# 5508 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1438 "..\pars.mly" - ) -# 1438 "..\pars.mly" - : 'memberOrOverride)); -# 5517 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1439 "..\pars.mly" - ) -# 1439 "..\pars.mly" - : 'memberOrOverride)); -# 5526 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1444 "..\pars.mly" - if nonNil _1 then errorR(Error("Attributes are not allowed here",rhs parseState 1)); - if isSome _2 then errorR(Error("Visibility declarations are not permitted on type abbreviations",rhs parseState 2)); - TyconCore_abbrev (_3, lhs(parseState)) - ) -# 1444 "..\pars.mly" - : 'tyconDefnOrSpfnSimpleRepr)); -# 5541 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'unionRepr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1448 "..\pars.mly" - if nonNil _1 then errorR(Error("Attributes are not allowed here",rhs parseState 1)); - if _3 |> List.exists (function Choice1Of2 _ -> true | _ -> false) then ( - if isSome _2 then errorR(Error("Visibility declarations are not permitted on enum types",rhs parseState 2)); - TyconCore_enum (_3 |> List.choose (function - | Choice1Of2 data -> - Some(data) - | Choice2Of2(UnionCase(_,_,_,_,_,m)) -> - errorR(Error("All enum fields must be given values",m)); None), - lhs(parseState)) - ) else - TyconCore_union (_2, - _3 |> List.choose (function Choice2Of2 data -> Some(data) | Choice1Of2 _ -> failwith "huh?"), - lhs(parseState)) - ) -# 1448 "..\pars.mly" - : 'tyconDefnOrSpfnSimpleRepr)); -# 5566 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'braceFieldDeclList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1462 "..\pars.mly" - if nonNil _1 then errorR(Error("Attributes are not allowed here",rhs parseState 1)); - TyconCore_recd (_2,_3,lhs(parseState)) - ) -# 1462 "..\pars.mly" - : 'tyconDefnOrSpfnSimpleRepr)); -# 5580 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_visibility)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'inlineAssemblyTyconRepr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1465 "..\pars.mly" - if nonNil _1 then errorR(Error("Attributes are not allowed here",rhs parseState 1)); - libraryOnlyWarning (lhs(parseState)); - if isSome _2 then errorR(Error("Visibility declarations are not permitted on inline assembly code types",rhs parseState 2)); - MatchPair parseState 3 5; - _4 - ) -# 1465 "..\pars.mly" - : 'tyconDefnOrSpfnSimpleRepr)); -# 5597 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdFieldDeclList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1474 "..\pars.mly" - MatchPair parseState 1 3; _2 - ) -# 1474 "..\pars.mly" - : 'braceFieldDeclList)); -# 5608 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdFieldDeclList)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1476 "..\pars.mly" - _2 - ) -# 1476 "..\pars.mly" - : 'braceFieldDeclList)); -# 5620 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1478 "..\pars.mly" - MatchPair parseState 1 3; [] - ) -# 1478 "..\pars.mly" - : 'braceFieldDeclList)); -# 5630 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HASH)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1482 "..\pars.mly" - libraryOnlyWarning (lhs(parseState)); - let lhsm = lhs(parseState) in - TyconCore_asm (ParseAssemblyCodeType _2 (rhs parseState 2),lhsm) - ) -# 1482 "..\pars.mly" - : 'inlineAssemblyTyconRepr)); -# 5644 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1487 "..\pars.mly" - TyconClass - ) -# 1487 "..\pars.mly" - : 'classOrInterfaceOrStruct)); -# 5654 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1488 "..\pars.mly" - TyconInterface - ) -# 1488 "..\pars.mly" - : 'classOrInterfaceOrStruct)); -# 5664 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1489 "..\pars.mly" - TyconStruct - ) -# 1489 "..\pars.mly" - : 'classOrInterfaceOrStruct)); -# 5674 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1492 "..\pars.mly" - - ) -# 1492 "..\pars.mly" - : 'interfaceMember)); -# 5684 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1493 "..\pars.mly" - - ) -# 1493 "..\pars.mly" - : 'interfaceMember)); -# 5694 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1497 "..\pars.mly" - [], _2,false,[],_1,grabXmlDoc(parseState,2) - ) -# 1497 "..\pars.mly" - : 'tyconNameAndTyparDecls)); -# 5706 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'prefixTyparDecls)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1499 "..\pars.mly" - _2, _3,false,[],_1,grabXmlDoc(parseState,2) - ) -# 1499 "..\pars.mly" - : 'tyconNameAndTyparDecls)); -# 5719 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'postfixTyparDecls)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1501 "..\pars.mly" - let tps,tpcs = _3 in - tps, _2,true,tpcs,_1,grabXmlDoc(parseState,2) - ) -# 1501 "..\pars.mly" - : 'tyconNameAndTyparDecls)); -# 5733 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1505 "..\pars.mly" - [ TyparDecl([],_1) ] - ) -# 1505 "..\pars.mly" - : 'prefixTyparDecls)); -# 5744 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'prefixTyparDeclList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1506 "..\pars.mly" - MatchPair parseState 1 3; List.rev _2 - ) -# 1506 "..\pars.mly" - : 'prefixTyparDecls)); -# 5755 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'prefixTyparDeclList)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typarDecl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1509 "..\pars.mly" - _3 :: _1 - ) -# 1509 "..\pars.mly" - : 'prefixTyparDeclList)); -# 5767 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typarDecl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1510 "..\pars.mly" - [_1] - ) -# 1510 "..\pars.mly" - : 'prefixTyparDeclList)); -# 5778 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1513 "..\pars.mly" - TyparDecl(_1,_2) - ) -# 1513 "..\pars.mly" - : 'typarDecl)); -# 5790 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_TYAPP)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'prefixTyparDeclList)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_typeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1516 "..\pars.mly" - List.rev _3, _4 - ) -# 1516 "..\pars.mly" - : 'postfixTyparDecls)); -# 5803 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'prefixTyparDeclList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1520 "..\pars.mly" - (List.rev _1,true) - ) -# 1520 "..\pars.mly" - : 'explicitValTyparDeclsCore)); -# 5814 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1522 "..\pars.mly" - deprecatedWithError "Either specify all relevant type parameters or none" (lhs(parseState)); - ([],true) - ) -# 1522 "..\pars.mly" - : 'explicitValTyparDeclsCore)); -# 5825 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'prefixTyparDeclList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1525 "..\pars.mly" - (List.rev _1,false) - ) -# 1525 "..\pars.mly" - : 'explicitValTyparDeclsCore)); -# 5836 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1527 "..\pars.mly" - ([],false) - ) -# 1527 "..\pars.mly" - : 'explicitValTyparDeclsCore)); -# 5846 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_TYAPP)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'explicitValTyparDeclsCore)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_typeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1531 "..\pars.mly" - let tps,flex = _3 in - SynValTyparDecls(tps,flex,_4) - ) -# 1531 "..\pars.mly" - : 'explicitValTyparDecls)); -# 5860 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'explicitValTyparDecls)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1536 "..\pars.mly" - _1 - ) -# 1536 "..\pars.mly" - : 'opt_explicitValTyparDecls)); -# 5871 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1538 "..\pars.mly" - SynValTyparDecls([],true,[]) - ) -# 1538 "..\pars.mly" - : 'opt_explicitValTyparDecls)); -# 5881 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'explicitValTyparDecls)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1542 "..\pars.mly" - Some _1 - ) -# 1542 "..\pars.mly" - : 'opt_explicitValTyparDecls2)); -# 5892 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1544 "..\pars.mly" - None - ) -# 1544 "..\pars.mly" - : 'opt_explicitValTyparDecls2)); -# 5902 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1548 "..\pars.mly" - [] - ) -# 1548 "..\pars.mly" - : 'opt_typeConstraints)); -# 5912 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1550 "..\pars.mly" - List.rev _2 - ) -# 1550 "..\pars.mly" - : 'opt_typeConstraints)); -# 5923 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeConstraints)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeConstraint)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1553 "..\pars.mly" - _3 :: _1 - ) -# 1553 "..\pars.mly" - : 'typeConstraints)); -# 5935 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeConstraint)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1554 "..\pars.mly" - [_1] - ) -# 1554 "..\pars.mly" - : 'typeConstraints)); -# 5946 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1558 "..\pars.mly" - libraryOnlyWarning (lhs(parseState)); WhereTyparDefaultsToType(_2,_4,lhs(parseState)) - ) -# 1558 "..\pars.mly" - : 'typeConstraint)); -# 5958 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1560 "..\pars.mly" - WhereTyparSubtypeOfType(_1,_3,lhs(parseState)) - ) -# 1560 "..\pars.mly" - : 'typeConstraint)); -# 5970 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1562 "..\pars.mly" - WhereTyparIsValueType(_1,lhs(parseState)) - ) -# 1562 "..\pars.mly" - : 'typeConstraint)); -# 5981 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1564 "..\pars.mly" - if _3 <> "not" then reportParseErrorAt (rhs parseState 3) ("Unexpected identifier: '"^ _3 ^"'"); - WhereTyparIsReferenceType(_1,lhs(parseState)) - ) -# 1564 "..\pars.mly" - : 'typeConstraint)); -# 5994 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1567 "..\pars.mly" - WhereTyparSupportsNull(_1,lhs(parseState)) - ) -# 1567 "..\pars.mly" - : 'typeConstraint)); -# 6005 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'classMemberSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1569 "..\pars.mly" - WhereTyparSupportsMember([ _1 ],_4,lhs(parseState)) - ) -# 1569 "..\pars.mly" - : 'typeConstraint)); -# 6017 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _8 = (let data = parseState.GetInput(8) in (Microsoft.FSharp.Core.Operators.unbox data : 'classMemberSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1571 "..\pars.mly" - WhereTyparSupportsMember([ _2 ; _4 ],_8,lhs(parseState)) - ) -# 1571 "..\pars.mly" - : 'typeConstraint)); -# 6030 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeArgs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1573 "..\pars.mly" - WhereTyparIsDelegate(_1,_4,lhs(parseState)) - ) -# 1573 "..\pars.mly" - : 'typeConstraint)); -# 6042 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeArgs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1575 "..\pars.mly" - match _3 with - | "enum" -> WhereTyparIsEnum(_1,_4,lhs(parseState)) - | nm -> raiseParseErrorAt (rhs parseState 3) ("Unexpected identifier: '"^ nm ^"'") - ) -# 1575 "..\pars.mly" - : 'typeConstraint)); -# 6057 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'barAndgrabXmlDoc)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'attrUnionCaseDecls)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1583 "..\pars.mly" - _2 _1 - ) -# 1583 "..\pars.mly" - : 'unionRepr)); -# 6069 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'firstUnionCaseDeclOfMany)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'barAndgrabXmlDoc)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'attrUnionCaseDecls)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1585 "..\pars.mly" - _1 :: _3 _2 - ) -# 1585 "..\pars.mly" - : 'unionRepr)); -# 6082 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'firstUnionCaseDecl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1587 "..\pars.mly" - [_1] - ) -# 1587 "..\pars.mly" - : 'unionRepr)); -# 6093 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1590 "..\pars.mly" - grabXmlDoc(parseState,1) - ) -# 1590 "..\pars.mly" - : 'barAndgrabXmlDoc)); -# 6103 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attrUnionCaseDecl)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'barAndgrabXmlDoc)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'attrUnionCaseDecls)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1593 "..\pars.mly" - (fun xmlDoc -> _1 xmlDoc :: _3 _2) - ) -# 1593 "..\pars.mly" - : 'attrUnionCaseDecls)); -# 6116 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attrUnionCaseDecl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1594 "..\pars.mly" - (fun xmlDoc -> [ _1 xmlDoc ]) - ) -# 1594 "..\pars.mly" - : 'attrUnionCaseDecls)); -# 6127 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'unionCaseName)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1598 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation",rhs parseState 2)); - let mDecl = rhs parseState 3 in - (fun xmlDoc -> Choice2Of2 (UnionCase ( _1, _3,UnionCaseFields [],xmlDoc,None,mDecl))) - - ) -# 1598 "..\pars.mly" - : 'attrUnionCaseDecl)); -# 6144 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'unionCaseName)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'unionCaseRepr)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1603 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation",rhs parseState 2)); - let mDecl = rhs2 parseState 3 5 in - (fun xmlDoc -> Choice2Of2 (UnionCase ( _1, _3,UnionCaseFields _5,xmlDoc,None,mDecl))) - - ) -# 1603 "..\pars.mly" - : 'attrUnionCaseDecl)); -# 6162 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'unionCaseName)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'topType)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1608 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation",rhs parseState 2)); - libraryOnlyWarning(lhs(parseState)); - let mDecl = rhs2 parseState 3 5 in - (fun xmlDoc -> Choice2Of2 (UnionCase ( _1, _3,UnionCaseFullType _5,xmlDoc,None,mDecl))) - - ) -# 1608 "..\pars.mly" - : 'attrUnionCaseDecl)); -# 6181 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'unionCaseName)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'constant)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1614 "..\pars.mly" - if isSome _2 then errorR(Error("Visibility declarations are not permitted on enumeration fields",rhs parseState 2)); - let mDecl = rhs2 parseState 3 5 in - (fun xmlDoc -> Choice1Of2 (EnumCase ( _1, _3,_5,xmlDoc,mDecl))) - - ) -# 1614 "..\pars.mly" - : 'attrUnionCaseDecl)); -# 6199 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'nameop)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1622 "..\pars.mly" - _1 - ) -# 1622 "..\pars.mly" - : 'unionCaseName)); -# 6210 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1624 "..\pars.mly" - MatchPair parseState 1 3; ident(opname_Cons,rhs parseState 2) - ) -# 1624 "..\pars.mly" - : 'unionCaseName)); -# 6220 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1626 "..\pars.mly" - MatchPair parseState 1 4; ident(opname_Nil,rhs2 parseState 2 3) - ) -# 1626 "..\pars.mly" - : 'unionCaseName)); -# 6230 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1630 "..\pars.mly" - - Choice2Of2 (UnionCase ( [], _1,UnionCaseFields [],emptyPreXmlDoc,None,rhs parseState 1)) - - ) -# 1630 "..\pars.mly" - : 'firstUnionCaseDeclOfMany)); -# 6244 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'constant)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1634 "..\pars.mly" - - Choice1Of2 (EnumCase ([],_1,_3,emptyPreXmlDoc,rhs2 parseState 1 3)) - - ) -# 1634 "..\pars.mly" - : 'firstUnionCaseDeclOfMany)); -# 6259 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'firstUnionCaseDecl)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1638 "..\pars.mly" - _1 - ) -# 1638 "..\pars.mly" - : 'firstUnionCaseDeclOfMany)); -# 6271 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'unionCaseRepr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1642 "..\pars.mly" - - Choice2Of2 (UnionCase ( [],_1,UnionCaseFields _3,emptyPreXmlDoc,None,rhs2 parseState 1 3)) - - ) -# 1642 "..\pars.mly" - : 'firstUnionCaseDecl)); -# 6285 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'constant)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1646 "..\pars.mly" - - Choice1Of2 (EnumCase ([],_1,_3,emptyPreXmlDoc,rhs2 parseState 1 3)) - - ) -# 1646 "..\pars.mly" - : 'firstUnionCaseDecl)); -# 6300 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'braceFieldDeclList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1652 "..\pars.mly" - errorR(Deprecated("Consider using a separate record type instead",lhs(parseState))); - _1 - ) -# 1652 "..\pars.mly" - : 'unionCaseRepr)); -# 6312 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleTypeElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1655 "..\pars.mly" - List.map anon_field_of_typ (_1 :: _3) - ) -# 1655 "..\pars.mly" - : 'unionCaseRepr)); -# 6324 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1657 "..\pars.mly" - [anon_field_of_typ _1] - ) -# 1657 "..\pars.mly" - : 'unionCaseRepr)); -# 6335 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdFieldDecl)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdFieldDeclList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1661 "..\pars.mly" - _1 :: _3 - ) -# 1661 "..\pars.mly" - : 'recdFieldDeclList)); -# 6348 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdFieldDecl)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1663 "..\pars.mly" - [_1] - ) -# 1663 "..\pars.mly" - : 'recdFieldDeclList)); -# 6360 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'fieldDecl)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1667 "..\pars.mly" - let fld = _2 _1 false in - let (Field(a,b,c,d,e,f,vis,g)) = fld in - if isSome vis then errorR(Error("Visibility declarations are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation",rhs parseState 2)); - Field(a,b,c,d,e,f,None,g) - ) -# 1667 "..\pars.mly" - : 'recdFieldDecl)); -# 6375 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_mutable)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'polyType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1674 "..\pars.mly" - let rhsm = rhs2 parseState 3 5 in - (fun attrs stat -> Field(attrs, stat,Some _3,_5,_1,grabXmlDoc(parseState,3),_2,rhsm)) - ) -# 1674 "..\pars.mly" - : 'fieldDecl)); -# 6390 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'exconCore)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_classDefn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1680 "..\pars.mly" - ExconDefn(_1,_2, lhs(parseState)) - ) -# 1680 "..\pars.mly" - : 'exconDefn)); -# 6402 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'exconCore)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_classSpfn)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1684 "..\pars.mly" - ExconSpfn(_1,_2,lhs(parseState)) - ) -# 1684 "..\pars.mly" - : 'exconSpfn)); -# 6414 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1687 "..\pars.mly" - grabXmlDoc(parseState,1) - ) -# 1687 "..\pars.mly" - : 'exceptionAndGrabDoc)); -# 6424 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'exceptionAndGrabDoc)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'exconIntro)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'exconRepr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1691 "..\pars.mly" - ExconCore(_2,_4, _5,_1,_3,lhs(parseState)) - ) -# 1691 "..\pars.mly" - : 'exconCore)); -# 6439 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1695 "..\pars.mly" - UnionCase ( [], _1,UnionCaseFields [],emptyPreXmlDoc,None,lhs(parseState)) - ) -# 1695 "..\pars.mly" - : 'exconIntro)); -# 6450 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'unionCaseRepr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1697 "..\pars.mly" - UnionCase ( [], _1,UnionCaseFields _3,emptyPreXmlDoc,None,lhs(parseState)) - ) -# 1697 "..\pars.mly" - : 'exconIntro)); -# 6462 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1700 "..\pars.mly" - None - ) -# 1700 "..\pars.mly" - : 'exconRepr)); -# 6472 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1701 "..\pars.mly" - Some (_2) - ) -# 1701 "..\pars.mly" - : 'exconRepr)); -# 6483 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1704 "..\pars.mly" - _2 - ) -# 1704 "..\pars.mly" - : 'openDecl)); -# 6494 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : bool)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_rec)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'localBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1708 "..\pars.mly" - let letm = rhs parseState 1 in - let isUse,isRec,bindingsPreAttrs = _1,_2,_3 in - (* the first binding swallow any attributes prior to the 'let' *) - BindingSetPreAttrs(rhs parseState 1,isRec,isUse,(fun attrs vis -> - let binds = bindingsPreAttrs attrs vis letm in - if not isRec && List.length binds > 1 then - ocamlCompatWarning "The declaration form 'let ... and ...' for non-recursive bindings is deprecated in F# code. In F# code simply use multiple 'let' bindings" letm; - [],binds)) - ) -# 1708 "..\pars.mly" - : 'defnBindings)); -# 6514 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'cPrototype)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1717 "..\pars.mly" - BindingSetPreAttrs(lhs(parseState), false,false,_1) - ) -# 1717 "..\pars.mly" - : 'defnBindings)); -# 6525 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1721 "..\pars.mly" - let letm = rhs parseState 1 in - let wholem = rhs2 parseState 1 2 in - // any attributes prior to the 'let' are left free, e.g. become top-level attributes - // associated with the module, 'main' function or assembly depending on their target - BindingSetPreAttrs(letm,false,false,(fun attrs vis -> attrs,[mk_Do (vis,true,_2,wholem)])) - ) -# 1721 "..\pars.mly" - : 'doBinding)); -# 6540 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : bool)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_rec)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'localBindings)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteDefnBindingsTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1730 "..\pars.mly" - _4 (rhs parseState 1); (* report unterminated error *) - let letm = rhs parseState 1 in - let isUse,isRec,bindingsPreAttrs = _1,_2,_3 in - - (* the first binding swallow any attributes prior to the 'let' *) - BindingSetPreAttrs(letm,isRec,isUse,(fun attrs vis -> - let binds = bindingsPreAttrs attrs vis letm in - if not isRec && List.length binds > 1 then - ocamlCompatWarning "The declaration form 'let ... and ...' for non-recursive bindings is deprecated in F# code. In F# code simply use multiple 'let' bindings" letm; - [],bindingsPreAttrs attrs vis letm)) - ) -# 1730 "..\pars.mly" - : 'hardwhiteLetBindings)); -# 6563 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteDefnBindingsTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1743 "..\pars.mly" - _3 (rhs parseState 1); (* report unterminated error *) - let letm = rhs parseState 1 in - let wholem = union_ranges letm (range_of_synexpr _2) in - let seqPt = NoSequencePointAtDoBinding in - // any attributes prior to the 'let' are left free, e.g. become top-level attributes - // associated with the module, 'main' function or assembly depending on their target - BindingSetPreAttrs(letm,false,false,(fun attrs vis -> attrs,[mk_Do (vis,true,_2,wholem)])), _2 - ) -# 1743 "..\pars.mly" - : 'hardwhiteDoBinding)); -# 6581 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'defnBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1752 "..\pars.mly" - _1 - ) -# 1752 "..\pars.mly" - : 'classDefnBindings)); -# 6592 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'doBinding)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1753 "..\pars.mly" - _1 - ) -# 1753 "..\pars.mly" - : 'classDefnBindings)); -# 6603 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteLetBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1754 "..\pars.mly" - _1 - ) -# 1754 "..\pars.mly" - : 'classDefnBindings)); -# 6614 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteDoBinding)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1755 "..\pars.mly" - fst _1 - ) -# 1755 "..\pars.mly" - : 'classDefnBindings)); -# 6625 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1760 "..\pars.mly" - (fun m -> ()) - ) -# 1760 "..\pars.mly" - : 'hardwhiteDefnBindingsTerminator)); -# 6635 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1762 "..\pars.mly" - (fun m -> reportParseErrorAt m "unmatched 'let' or 'do'") - ) -# 1762 "..\pars.mly" - : 'hardwhiteDefnBindingsTerminator)); -# 6646 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'cRetType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_access)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - let _7 = (let data = parseState.GetInput(7) in (Microsoft.FSharp.Core.Operators.unbox data : 'cArgs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1766 "..\pars.mly" - let rty,vis,nm,args = _2,_3,_4,_7 in - let xmlDoc = grabXmlDoc(parseState,1) in - let nmm = rhs parseState 3 in - let argsm = rhs parseState 6 in - let bindm = lhs(parseState) in - let wholem = lhs(parseState) in - let rhsm = lhs(parseState) in - let rhsExpr = Expr_app(ExprAtomicFlag.NonAtomic, Expr_id_get(ident("failwith",rhsm)),Expr_const(Const_string("extern was not given a DllImport attribute",rhsm),rhsm),rhsm) in - (fun attrs vis -> - let binding = mksyn_binding (xmlDoc,Pat_lid ([nm],Some(noInferredTypars),[Pat_tuple(args,argsm)],vis,nmm)) (vis,false,false,bindm,NoSequencePointAtInvisibleBinding,wholem,Some(rty),rhsExpr,rhsm,[],attrs,None) in - [], [binding]) - ) -# 1766 "..\pars.mly" - : 'cPrototype)); -# 6671 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'cMoreArgs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1780 "..\pars.mly" - List.rev _1 - ) -# 1780 "..\pars.mly" - : 'cArgs)); -# 6682 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'cArg)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1782 "..\pars.mly" - [_1] - ) -# 1782 "..\pars.mly" - : 'cArgs)); -# 6693 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1784 "..\pars.mly" - [] - ) -# 1784 "..\pars.mly" - : 'cArgs)); -# 6703 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'cMoreArgs)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'cArg)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1788 "..\pars.mly" - _3 :: _1 - ) -# 1788 "..\pars.mly" - : 'cMoreArgs)); -# 6715 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'cArg)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'cArg)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1790 "..\pars.mly" - [_3; _1] - ) -# 1790 "..\pars.mly" - : 'cMoreArgs)); -# 6727 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'cType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1794 "..\pars.mly" - let m = lhs(parseState) in Pat_typed(Pat_wild m,_2,m) |> addAttribs _1 - ) -# 1794 "..\pars.mly" - : 'cArg)); -# 6739 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'cType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1796 "..\pars.mly" - let m = lhs(parseState) in Pat_typed(Pat_as (Pat_wild m,_3,false,None,m),_2,m) |> addAttribs _1 - ) -# 1796 "..\pars.mly" - : 'cArg)); -# 6752 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1800 "..\pars.mly" - let m = lhs(parseState) in - Type_app(Type_lid(_1,m),[],false,m) - ) -# 1800 "..\pars.mly" - : 'cType)); -# 6764 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'cType)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1804 "..\pars.mly" - let m = lhs(parseState) in - Type_app(Type_lid([ident("[]",m)],m),[_1],true,m) - ) -# 1804 "..\pars.mly" - : 'cType)); -# 6777 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'cType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1808 "..\pars.mly" - let m = lhs(parseState) in - Type_app(Type_lid([ident("nativeptr",m)],m),[_1],true,m) - ) -# 1808 "..\pars.mly" - : 'cType)); -# 6789 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'cType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1812 "..\pars.mly" - let m = lhs(parseState) in - Type_app(Type_lid([ident("byref",m)],m),[_1],true,m) - ) -# 1812 "..\pars.mly" - : 'cType)); -# 6801 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1816 "..\pars.mly" - let m = lhs(parseState) in - Type_app(Type_lid([ident("nativeint",m)],m),[],true,m) - ) -# 1816 "..\pars.mly" - : 'cType)); -# 6812 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'cType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1821 "..\pars.mly" - (_2,ArgSynInfo(_1,false,None)),rhs parseState 2 - ) -# 1821 "..\pars.mly" - : 'cRetType)); -# 6824 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1823 "..\pars.mly" - let m = rhs parseState 2 in - (Type_app(Type_lid([ident("unit",m)],m),[],false,m),ArgSynInfo(_1,false,None)),m - ) -# 1823 "..\pars.mly" - : 'cRetType)); -# 6836 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attr_localBinding)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'more_localBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1829 "..\pars.mly" - (fun attrs vis letm -> - match _1 with - | Some f -> (f attrs vis letm true :: _2) - | None -> _2) - ) -# 1829 "..\pars.mly" - : 'localBindings)); -# 6851 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'attr_localBinding)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'more_localBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1836 "..\pars.mly" - let letm = (rhs parseState 1) in - (match _2 with - | Some f -> f [] None letm false :: _3 - | None -> _3) - ) -# 1836 "..\pars.mly" - : 'more_localBindings)); -# 6866 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1841 "..\pars.mly" - [] - ) -# 1841 "..\pars.mly" - : 'more_localBindings)); -# 6876 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1845 "..\pars.mly" - let m = union_ranges (rhs parseState 1) (range_of_synexpr _2) in - Some(fun attrs vis _ isFirst -> - deprecatedWithError "The declaration form 'let do ...' and 'and do ...' has been removed from the F# language" m; - mk_Do (vis,true,_2,m)) - ) -# 1845 "..\pars.mly" - : 'attr_localBinding)); -# 6890 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'localBinding)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1850 "..\pars.mly" - Some(fun attrs vis letm _ -> - _2 (attrs@_1) vis letm) - ) -# 1850 "..\pars.mly" - : 'attr_localBinding)); -# 6903 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1853 "..\pars.mly" - None - ) -# 1853 "..\pars.mly" - : 'attr_localBinding)); -# 6913 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_inline)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_mutable)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'bindingPattern)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_topReturnTypeWithTypeConstraints)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedExprWithStaticOptimizationsBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1857 "..\pars.mly" - let expr,opts = _6 in - let eqm = rhs parseState 5 in - let rhsm = range_of_synexpr expr in - let optReturnType = _4 in - let bindingBuilder,bindm = _3 in - (fun attrs vis letm -> - let wholem = union_ranges letm rhsm in - let spBind = if IsControlFlowExpression expr then NoSequencePointAtLetBinding else SequencePointAtBinding(wholem) in - bindingBuilder (vis,_1,_2,bindm,spBind,wholem,optReturnType,expr,rhsm,opts,attrs,None)) - ) -# 1857 "..\pars.mly" - : 'localBinding)); -# 6936 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_inline)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_mutable)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'bindingPattern)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_topReturnTypeWithTypeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1867 "..\pars.mly" - let wholem = rhs2 parseState 3 5 in - let rhsm = rhs parseState 5 in - let optReturnType = _4 in - let bindingBuilder,bindm = _3 in - (fun attrs vis letm -> - let spBind = SequencePointAtBinding(union_ranges letm rhsm) in - bindingBuilder (vis,_1,_2,bindm,spBind,wholem,optReturnType,arbExpr(parseState),rhsm,[],attrs,None)) - ) -# 1867 "..\pars.mly" - : 'localBinding)); -# 6956 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedExprWithStaticOptimizations)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1877 "..\pars.mly" - _2 - ) -# 1877 "..\pars.mly" - : 'typedExprWithStaticOptimizationsBlock)); -# 6967 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedExprWithStaticOptimizations)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1878 "..\pars.mly" - _2 (* silent recovery *) - ) -# 1878 "..\pars.mly" - : 'typedExprWithStaticOptimizationsBlock)); -# 6979 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedExprWithStaticOptimizations)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1879 "..\pars.mly" - _1 - ) -# 1879 "..\pars.mly" - : 'typedExprWithStaticOptimizationsBlock)); -# 6990 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_staticOptimizations)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1882 "..\pars.mly" - _1, List.rev _2 - ) -# 1882 "..\pars.mly" - : 'typedExprWithStaticOptimizations)); -# 7002 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_staticOptimizations)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'staticOptimization)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1885 "..\pars.mly" - _2 :: _1 - ) -# 1885 "..\pars.mly" - : 'opt_staticOptimizations)); -# 7014 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1886 "..\pars.mly" - [] - ) -# 1886 "..\pars.mly" - : 'opt_staticOptimizations)); -# 7024 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'staticOptimizationConditions)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1889 "..\pars.mly" - (_2,_4) - ) -# 1889 "..\pars.mly" - : 'staticOptimization)); -# 7036 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'staticOptimizationConditions)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'staticOptimizationCondition)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1892 "..\pars.mly" - _3 :: _1 - ) -# 1892 "..\pars.mly" - : 'staticOptimizationConditions)); -# 7048 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'staticOptimizationCondition)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1893 "..\pars.mly" - [_1 ] - ) -# 1893 "..\pars.mly" - : 'staticOptimizationConditions)); -# 7059 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1896 "..\pars.mly" - WhenTyparTyconEqualsTycon(_1,_3,lhs(parseState)) - ) -# 1896 "..\pars.mly" - : 'staticOptimizationCondition)); -# 7071 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1897 "..\pars.mly" - WhenInlined(rhs parseState 1) - ) -# 1897 "..\pars.mly" - : 'staticOptimizationCondition)); -# 7081 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : sbyte * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1900 "..\pars.mly" - if snd _1 then errorR(Error("This number is outside the allowable range for 8-bit signed integers", lhs(parseState))); - Const_int8 (fst _1) - ) -# 1900 "..\pars.mly" - : 'rawconstant)); -# 7093 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : byte)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1902 "..\pars.mly" - Const_uint8 _1 - ) -# 1902 "..\pars.mly" - : 'rawconstant)); -# 7104 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int16 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1903 "..\pars.mly" - if snd _1 then errorR(Error("This number is outside the allowable range for 16-bit signed integers", lhs(parseState))); - Const_int16 (fst _1) - ) -# 1903 "..\pars.mly" - : 'rawconstant)); -# 7116 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : uint16)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1905 "..\pars.mly" - Const_uint16 _1 - ) -# 1905 "..\pars.mly" - : 'rawconstant)); -# 7127 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int32 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1906 "..\pars.mly" - if snd _1 then errorR(Error("This number is outside the allowable range for 32-bit signed integers", lhs(parseState))); - Const_int32 (fst _1) - ) -# 1906 "..\pars.mly" - : 'rawconstant)); -# 7139 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : uint32)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1908 "..\pars.mly" - Const_uint32 _1 - ) -# 1908 "..\pars.mly" - : 'rawconstant)); -# 7150 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int64 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1909 "..\pars.mly" - if snd _1 then errorR(Error("This number is outside the allowable range for 64-bit signed integers", lhs(parseState))); - Const_int64 (fst _1) - ) -# 1909 "..\pars.mly" - : 'rawconstant)); -# 7162 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : uint64)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1911 "..\pars.mly" - Const_uint64 _1 - ) -# 1911 "..\pars.mly" - : 'rawconstant)); -# 7173 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int64)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1912 "..\pars.mly" - Const_nativeint _1 - ) -# 1912 "..\pars.mly" - : 'rawconstant)); -# 7184 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : uint64)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1913 "..\pars.mly" - Const_unativeint _1 - ) -# 1913 "..\pars.mly" - : 'rawconstant)); -# 7195 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : single)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1914 "..\pars.mly" - Const_float32 _1 - ) -# 1914 "..\pars.mly" - : 'rawconstant)); -# 7206 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : double)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1915 "..\pars.mly" - Const_float _1 - ) -# 1915 "..\pars.mly" - : 'rawconstant)); -# 7217 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1916 "..\pars.mly" - Const_char _1 - ) -# 1916 "..\pars.mly" - : 'rawconstant)); -# 7228 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : System.Decimal)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1917 "..\pars.mly" - Const_decimal _1 - ) -# 1917 "..\pars.mly" - : 'rawconstant)); -# 7239 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : (string * string))) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1918 "..\pars.mly" - Const_bignum _1 - ) -# 1918 "..\pars.mly" - : 'rawconstant)); -# 7250 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1919 "..\pars.mly" - Const_string (_1,lhs(parseState)) - ) -# 1919 "..\pars.mly" - : 'rawconstant)); -# 7261 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : byte[])) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1920 "..\pars.mly" - Const_bytearray (_1,lhs(parseState)) - ) -# 1920 "..\pars.mly" - : 'rawconstant)); -# 7272 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rawconstant)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1923 "..\pars.mly" - _1 - ) -# 1923 "..\pars.mly" - : 'constant)); -# 7283 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rawconstant)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'measurearg)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1924 "..\pars.mly" - Const_measure(_1, _3) - ) -# 1924 "..\pars.mly" - : 'constant)); -# 7295 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1928 "..\pars.mly" - let xmlDoc = grabXmlDoc(parseState,1) in - mksyn_binding (xmlDoc,_1), rhs parseState 1 - ) -# 1928 "..\pars.mly" - : 'bindingPattern)); -# 7307 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1934 "..\pars.mly" - SPat_as (_1,false,false,false,rhs parseState 1) - ) -# 1934 "..\pars.mly" - : 'simplePattern)); -# 7318 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1936 "..\pars.mly" - SPat_as (_2,false,false,true,rhs parseState 2) - ) -# 1936 "..\pars.mly" - : 'simplePattern)); -# 7329 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'simplePattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeWithTypeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1938 "..\pars.mly" - let lhsm = lhs(parseState) in - SPat_typed(_1,_3,lhsm) - ) -# 1938 "..\pars.mly" - : 'simplePattern)); -# 7342 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'simplePattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1941 "..\pars.mly" - let lhsm = lhs(parseState) in - SPat_attrib(_2,_1,lhsm) - ) -# 1941 "..\pars.mly" - : 'simplePattern)); -# 7355 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'simplePattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1945 "..\pars.mly" - [_1] - ) -# 1945 "..\pars.mly" - : 'simplePatternCommaList)); -# 7366 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'simplePattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'simplePatternCommaList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1946 "..\pars.mly" - _1 :: _3 - ) -# 1946 "..\pars.mly" - : 'simplePatternCommaList)); -# 7378 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'simplePatternCommaList)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1949 "..\pars.mly" - _2 - ) -# 1949 "..\pars.mly" - : 'simplePatterns)); -# 7389 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1950 "..\pars.mly" - [] - ) -# 1950 "..\pars.mly" - : 'simplePatterns)); -# 7399 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'simplePatternCommaList)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1951 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched '('"; [] - ) -# 1951 "..\pars.mly" - : 'simplePatterns)); -# 7411 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1952 "..\pars.mly" - (* silent recovery *) [] - ) -# 1952 "..\pars.mly" - : 'simplePatterns)); -# 7421 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1953 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched '('"; [] - ) -# 1953 "..\pars.mly" - : 'simplePatterns)); -# 7432 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1958 "..\pars.mly" - Pat_as (_1,_3,false,None,rhs2 parseState 1 3) - ) -# 1958 "..\pars.mly" - : Ast.SynPat)); -# 7444 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1960 "..\pars.mly" - Pat_disj(_1,_3,rhs2 parseState 1 3) - ) -# 1960 "..\pars.mly" - : Ast.SynPat)); -# 7456 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1962 "..\pars.mly" - Pat_lid (mksyn_constr (rhs parseState 2) opname_Cons, None,[Pat_tuple ([_1;_3],rhs2 parseState 1 3)],None,lhs(parseState)) - ) -# 1962 "..\pars.mly" - : Ast.SynPat)); -# 7468 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tuplePatternElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1964 "..\pars.mly" - Pat_tuple(List.rev _1, lhs(parseState)) - ) -# 1964 "..\pars.mly" - : Ast.SynPat)); -# 7479 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'conjPatternElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1966 "..\pars.mly" - Pat_conjs(List.rev _1, lhs(parseState)) - ) -# 1966 "..\pars.mly" - : Ast.SynPat)); -# 7490 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'constrPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1968 "..\pars.mly" - _1 - ) -# 1968 "..\pars.mly" - : Ast.SynPat)); -# 7501 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tuplePatternElements)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1971 "..\pars.mly" - _3 :: _1 - ) -# 1971 "..\pars.mly" - : 'tuplePatternElements)); -# 7513 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1972 "..\pars.mly" - _3 :: _1 :: [] - ) -# 1972 "..\pars.mly" - : 'tuplePatternElements)); -# 7525 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'conjPatternElements)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1975 "..\pars.mly" - _3 :: _1 - ) -# 1975 "..\pars.mly" - : 'conjPatternElements)); -# 7537 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1976 "..\pars.mly" - _3 :: _1 :: [] - ) -# 1976 "..\pars.mly" - : 'conjPatternElements)); -# 7549 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatternLongIdent)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'explicitValTyparDecls)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1979 "..\pars.mly" - let vis,lid = _1 in Pat_lid (lid,Some _2,[],vis,lhs(parseState)) - ) -# 1979 "..\pars.mly" - : 'constrPattern)); -# 7561 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatternLongIdent)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_explicitValTyparDecls2)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatterns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1980 "..\pars.mly" - let vis,lid = _1 in Pat_lid (lid,_2,_3,vis,lhs(parseState)) - ) -# 1980 "..\pars.mly" - : 'constrPattern)); -# 7574 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatternLongIdent)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_explicitValTyparDecls2)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatterns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1981 "..\pars.mly" - let vis,lid = _1 in Pat_lid (lid,_2,_4,vis,lhs(parseState)) - ) -# 1981 "..\pars.mly" - : 'constrPattern)); -# 7587 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1982 "..\pars.mly" - Pat_isinst(_2,lhs(parseState)) - ) -# 1982 "..\pars.mly" - : 'constrPattern)); -# 7598 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1983 "..\pars.mly" - _1 - ) -# 1983 "..\pars.mly" - : 'constrPattern)); -# 7609 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPattern)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatterns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1986 "..\pars.mly" - _1 :: _2 - ) -# 1986 "..\pars.mly" - : 'atomicPatterns)); -# 7621 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatterns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1988 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "Successive patterns should be separated by spaces or tupled"; - _1 :: _3 - ) -# 1988 "..\pars.mly" - : 'atomicPatterns)); -# 7634 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1990 "..\pars.mly" - [_1] - ) -# 1990 "..\pars.mly" - : 'atomicPatterns)); -# 7645 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'quoteExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1995 "..\pars.mly" - Pat_expr(_1,lhs(parseState)) - ) -# 1995 "..\pars.mly" - : 'atomicPattern)); -# 7656 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1996 "..\pars.mly" - Pat_range (_1,_3,rhs2 parseState 1 3) - ) -# 1996 "..\pars.mly" - : 'atomicPattern)); -# 7668 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'recordPatternElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 1998 "..\pars.mly" - _2 - ) -# 1998 "..\pars.mly" - : 'atomicPattern)); -# 7679 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'listPatternElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2000 "..\pars.mly" - MatchPair parseState 1 3; Pat_array_or_list(false,_2,lhs(parseState)) - ) -# 2000 "..\pars.mly" - : 'atomicPattern)); -# 7690 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'listPatternElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2002 "..\pars.mly" - MatchPair parseState 1 3; Pat_array_or_list(true,_2, lhs(parseState)) - ) -# 2002 "..\pars.mly" - : 'atomicPattern)); -# 7701 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2003 "..\pars.mly" - Pat_wild (lhs(parseState)) - ) -# 2003 "..\pars.mly" - : 'atomicPattern)); -# 7711 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2004 "..\pars.mly" - Pat_opt_var(_2,lhs(parseState)) - ) -# 2004 "..\pars.mly" - : 'atomicPattern)); -# 7722 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatternLongIdent)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2006 "..\pars.mly" - let vis,lid = _1 in - if List.length lid > 1 || (let c = (List.hd lid).idText.[0] in Char.IsUpper(c) && not (Char.IsLower c)) - then mksyn_pat_maybe_var lid vis (lhs(parseState)) - else mksyn_pat_var vis (List.hd lid) - ) -# 2006 "..\pars.mly" - : 'atomicPattern)); -# 7736 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'constant)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2010 "..\pars.mly" - Pat_const (_1,range_of_synconst _1 (lhs(parseState))) - ) -# 2010 "..\pars.mly" - : 'atomicPattern)); -# 7747 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2011 "..\pars.mly" - Pat_const(Const_bool false,lhs(parseState)) - ) -# 2011 "..\pars.mly" - : 'atomicPattern)); -# 7757 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2012 "..\pars.mly" - Pat_const(Const_bool true,lhs(parseState)) - ) -# 2012 "..\pars.mly" - : 'atomicPattern)); -# 7767 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2013 "..\pars.mly" - Pat_null(lhs(parseState)) - ) -# 2013 "..\pars.mly" - : 'atomicPattern)); -# 7777 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPatternBody)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2014 "..\pars.mly" - MatchPair parseState 1 3; let m = (lhs(parseState)) in Pat_paren(_2 m,m) - ) -# 2014 "..\pars.mly" - : 'atomicPattern)); -# 7788 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPatternBody)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2015 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched '('"; _2 (rhs2 parseState 1 2) - ) -# 2015 "..\pars.mly" - : 'atomicPattern)); -# 7800 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2016 "..\pars.mly" - (* silent recovery *) Pat_wild (lhs(parseState)) - ) -# 2016 "..\pars.mly" - : 'atomicPattern)); -# 7810 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2017 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched '('"; Pat_wild (lhs(parseState)) - ) -# 2017 "..\pars.mly" - : 'atomicPattern)); -# 7821 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2023 "..\pars.mly" - (fun m -> _1) - ) -# 2023 "..\pars.mly" - : 'parenPatternBody)); -# 7832 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2025 "..\pars.mly" - (fun m -> Pat_const(Const_unit,m)) - ) -# 2025 "..\pars.mly" - : 'parenPatternBody)); -# 7842 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2054 "..\pars.mly" - Pat_as (_1,_3,false,None,rhs2 parseState 1 3) - ) -# 2054 "..\pars.mly" - : 'parenPattern)); -# 7854 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2056 "..\pars.mly" - Pat_disj(_1,_3,rhs2 parseState 1 3) - ) -# 2056 "..\pars.mly" - : 'parenPattern)); -# 7866 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleParenPatternElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2058 "..\pars.mly" - Pat_tuple(List.rev _1,lhs(parseState)) - ) -# 2058 "..\pars.mly" - : 'parenPattern)); -# 7877 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'conjParenPatternElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2060 "..\pars.mly" - Pat_conjs(List.rev _1,rhs2 parseState 1 3) - ) -# 2060 "..\pars.mly" - : 'parenPattern)); -# 7888 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeWithTypeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2062 "..\pars.mly" - let lhsm = lhs(parseState) in - Pat_typed(_1,_3,lhsm) - ) -# 2062 "..\pars.mly" - : 'parenPattern)); -# 7901 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2065 "..\pars.mly" - let lhsm = lhs(parseState) in - Pat_attrib(_2,_1,lhsm) - ) -# 2065 "..\pars.mly" - : 'parenPattern)); -# 7914 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2068 "..\pars.mly" - Pat_lid (mksyn_constr (rhs parseState 2) opname_Cons, None, [ Pat_tuple ([_1;_3],rhs2 parseState 1 3) ],None,lhs(parseState)) - ) -# 2068 "..\pars.mly" - : 'parenPattern)); -# 7926 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2070 "..\pars.mly" - let lhsm = lhs(parseState) in - deprecatedWithError "Patterns of the form 'pat :> type' have been removed from the F# language. Consider using just 'pat : type' instead" lhsm; - Pat_typed(_1, mksyn_anon_constraint _3 lhsm,lhsm) - ) -# 2070 "..\pars.mly" - : 'parenPattern)); -# 7940 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'constrPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2073 "..\pars.mly" - _1 - ) -# 2073 "..\pars.mly" - : 'parenPattern)); -# 7951 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleParenPatternElements)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2076 "..\pars.mly" - _3 :: _1 - ) -# 2076 "..\pars.mly" - : 'tupleParenPatternElements)); -# 7963 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2077 "..\pars.mly" - _3 :: _1 :: [] - ) -# 2077 "..\pars.mly" - : 'tupleParenPatternElements)); -# 7975 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'conjParenPatternElements)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2080 "..\pars.mly" - _3 :: _1 - ) -# 2080 "..\pars.mly" - : 'conjParenPatternElements)); -# 7987 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2081 "..\pars.mly" - _3 :: _1 :: [] - ) -# 2081 "..\pars.mly" - : 'conjParenPatternElements)); -# 7999 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'recordPatternElementsAux)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2084 "..\pars.mly" - let rs,m = _1 in Pat_recd (rs,m) - ) -# 2084 "..\pars.mly" - : 'recordPatternElements)); -# 8010 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'recordPatternElement)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2087 "..\pars.mly" - [_1],lhs(parseState) - ) -# 2087 "..\pars.mly" - : 'recordPatternElementsAux)); -# 8022 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'recordPatternElement)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recordPatternElementsAux)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2088 "..\pars.mly" - let r = _1 in let (rs,dropMark) = _3 in (r :: rs),lhs(parseState) - ) -# 2088 "..\pars.mly" - : 'recordPatternElementsAux)); -# 8035 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2091 "..\pars.mly" - (List.frontAndBack _1,_3) - ) -# 2091 "..\pars.mly" - : 'recordPatternElement)); -# 8047 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2094 "..\pars.mly" - [] - ) -# 2094 "..\pars.mly" - : 'listPatternElements)); -# 8057 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2095 "..\pars.mly" - [_1] - ) -# 2095 "..\pars.mly" - : 'listPatternElements)); -# 8069 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'listPatternElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2096 "..\pars.mly" - _1 :: _3 - ) -# 2096 "..\pars.mly" - : 'listPatternElements)); -# 8082 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2100 "..\pars.mly" - _2 - ) -# 2100 "..\pars.mly" - : 'typedSeqExprBlock)); -# 8093 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2101 "..\pars.mly" - _2 - ) -# 2101 "..\pars.mly" - : 'typedSeqExprBlock)); -# 8105 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2102 "..\pars.mly" - _1 - ) -# 2102 "..\pars.mly" - : 'typedSeqExprBlock)); -# 8116 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2106 "..\pars.mly" - _2 - ) -# 2106 "..\pars.mly" - : 'declExprBlock)); -# 8127 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2107 "..\pars.mly" - _1 - ) -# 2107 "..\pars.mly" - : 'declExprBlock)); -# 8138 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2112 "..\pars.mly" - _1 - ) -# 2112 "..\pars.mly" - : 'typedSeqExprBlockR)); -# 8149 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2113 "..\pars.mly" - _1 - ) -# 2113 "..\pars.mly" - : 'typedSeqExprBlockR)); -# 8160 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'seqExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeWithTypeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2116 "..\pars.mly" - Expr_typed (_1,_3, union_ranges (range_of_synexpr _1) (range_of_syntype _3)) - ) -# 2116 "..\pars.mly" - : 'typedSeqExpr)); -# 8172 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'seqExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2117 "..\pars.mly" - Expr_isinst(_1,_3, union_ranges (range_of_synexpr _1) (range_of_syntype _3)) - ) -# 2117 "..\pars.mly" - : 'typedSeqExpr)); -# 8184 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'seqExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2118 "..\pars.mly" - Expr_upcast(_1,_3, union_ranges (range_of_synexpr _1) (range_of_syntype _3)) - ) -# 2118 "..\pars.mly" - : 'typedSeqExpr)); -# 8196 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'seqExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2119 "..\pars.mly" - Expr_downcast(_1,_3, union_ranges (range_of_synexpr _1) (range_of_syntype _3)) - ) -# 2119 "..\pars.mly" - : 'typedSeqExpr)); -# 8208 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'seqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2120 "..\pars.mly" - _1 - ) -# 2120 "..\pars.mly" - : 'typedSeqExpr)); -# 8219 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'seqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2123 "..\pars.mly" - Expr_seq(SequencePointsAtSeq,true,_1,_3,union_ranges (range_of_synexpr _1) (range_of_synexpr _3)) - ) -# 2123 "..\pars.mly" - : 'seqExpr)); -# 8232 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2124 "..\pars.mly" - _1 - ) -# 2124 "..\pars.mly" - : 'seqExpr)); -# 8244 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2125 "..\pars.mly" - _1 - ) -# 2125 "..\pars.mly" - : 'seqExpr)); -# 8255 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'seqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2126 "..\pars.mly" - Expr_seq(SequencePointsAtSeq,false,_1,_3,union_ranges (range_of_synexpr _1) (range_of_synexpr _3) ) - ) -# 2126 "..\pars.mly" - : 'seqExpr)); -# 8267 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2127 "..\pars.mly" - Expr_seq(SequencePointsAtSeq,false,_1,_4,union_ranges (range_of_synexpr _1) (range_of_synexpr _4)) - ) -# 2127 "..\pars.mly" - : 'seqExpr)); -# 8279 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2133 "..\pars.mly" - - ) -# 2133 "..\pars.mly" - : 'recover)); -# 8289 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.lexcont)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2134 "..\pars.mly" - - ) -# 2134 "..\pars.mly" - : 'recover)); -# 8300 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'defnBindings)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2138 "..\pars.mly" - mkLocalBindings (rhs2 parseState 1 3,_1,_3) - ) -# 2138 "..\pars.mly" - : Ast.SynExpr)); -# 8312 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'defnBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2140 "..\pars.mly" - mkLocalBindings (rhs2 parseState 1 2,_1,arbExpr(parseState)) - ) -# 2140 "..\pars.mly" - : Ast.SynExpr)); -# 8323 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'defnBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2142 "..\pars.mly" - reportParseErrorAt (match _1 with (BindingSetPreAttrs(m,_,_,_)) -> m) "no matching 'in' found for this 'let'"; - mkLocalBindings (rhs parseState 1,_1,arbExpr(parseState)) - ) -# 2142 "..\pars.mly" - : Ast.SynExpr)); -# 8335 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteLetBindings)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2146 "..\pars.mly" - mkLocalBindings (union_ranges (rhs parseState 1) (range_of_synexpr _2),_1,_2) - ) -# 2146 "..\pars.mly" - : Ast.SynExpr)); -# 8347 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteLetBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2148 "..\pars.mly" - reportParseErrorAt (match _1 with (BindingSetPreAttrs(m,_,_,_)) -> m) "error in the return expression for this 'let'. Possible incorrect indentation"; - mkLocalBindings (rhs2 parseState 1 2,_1,arbExpr(parseState)) - ) -# 2148 "..\pars.mly" - : Ast.SynExpr)); -# 8359 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteLetBindings)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2151 "..\pars.mly" - mkLocalBindings (union_ranges (rhs2 parseState 1 2) (range_of_synexpr _3) ,_1,_3) - ) -# 2151 "..\pars.mly" - : Ast.SynExpr)); -# 8371 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteLetBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2153 "..\pars.mly" - //reportParseErrorAt (match _1 with (BindingSetPreAttrs(m,_,_,_)) -> m) "error in the return expression for this 'let'. Possible incorrect indentation"; - mkLocalBindings (rhs2 parseState 1 2,_1,arbExpr(parseState)) - ) -# 2153 "..\pars.mly" - : Ast.SynExpr)); -# 8383 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteDoBinding)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2157 "..\pars.mly" - let e = snd _1 in - Expr_do(e,range_of_synexpr e) - ) -# 2157 "..\pars.mly" - : Ast.SynExpr)); -# 8395 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'anonMatchingExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2161 "..\pars.mly" - _1 - ) -# 2161 "..\pars.mly" - : Ast.SynExpr)); -# 8406 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'anonLambdaExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2162 "..\pars.mly" - _1 - ) -# 2162 "..\pars.mly" - : Ast.SynExpr)); -# 8417 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'withClauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2165 "..\pars.mly" - let mMatch = (rhs parseState 1) in - let mWith,(clauses,mLast) = _3 in - let spBind = SequencePointAtBinding(union_ranges mMatch mWith) in - Expr_match(spBind, _2,clauses,false,union_ranges mMatch mLast) - ) -# 2165 "..\pars.mly" - : Ast.SynExpr)); -# 8432 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2171 "..\pars.mly" - (* Produce approximate expression during error recovery *) - Expr_throwaway(_2,rhs2 parseState 1 2) - ) -# 2171 "..\pars.mly" - : Ast.SynExpr)); -# 8445 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlockR)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'withClauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2175 "..\pars.mly" - let mTry = (rhs parseState 1) in - let spTry = SequencePointAtTry(mTry) in - let mWith,(clauses,mLast) = _3 in - let spWith = SequencePointAtWith(mWith) in - let mTryToWith = union_ranges mTry mWith in - let mWithToLast = union_ranges mWith mLast in - let mTryToLast = union_ranges mTry mLast in - Expr_try_catch(_2, mTryToWith, clauses,mWithToLast, mTryToLast,spTry,spWith) - ) -# 2175 "..\pars.mly" - : Ast.SynExpr)); -# 8464 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlockR)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2185 "..\pars.mly" - (* Produce approximate expression during error recovery *) - (* Include any expressions to make sure they gets type checked in case that generates useful results for intellisense *) - _2 - ) -# 2185 "..\pars.mly" - : Ast.SynExpr)); -# 8478 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlockR)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2190 "..\pars.mly" - let mTry = rhs parseState 1 in - let spTry = SequencePointAtTry(mTry) in - let spFinally = SequencePointAtFinally(rhs parseState 3) in - let mTryToLast = union_ranges mTry (range_of_synexpr _4) in - Expr_try_finally(_2, _4,mTryToLast,spTry,spFinally) - ) -# 2190 "..\pars.mly" - : Ast.SynExpr)); -# 8494 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'ifExprCases)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2197 "..\pars.mly" - let mIf = (rhs parseState 1) in - _3 _2 mIf - ) -# 2197 "..\pars.mly" - : Ast.SynExpr)); -# 8507 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2201 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched 'if'"; - (* Produce an approximate expression during error recovery. *) - (* Include expressions to make sure they get type checked in case that generates useful results for intellisense. *) - (* Generate a throwAway for the expression so it isn't forced to have a type 'bool' *) - (* from the context it is used in. *) - Expr_throwaway(_2, rhs2 parseState 1 2) - ) -# 2201 "..\pars.mly" - : Ast.SynExpr)); -# 8524 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2209 "..\pars.mly" - arbExpr parseState - ) -# 2209 "..\pars.mly" - : Ast.SynExpr)); -# 8535 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2212 "..\pars.mly" - Expr_lazy(_2,union_ranges (rhs parseState 1) (range_of_synexpr _2)) - ) -# 2212 "..\pars.mly" - : Ast.SynExpr)); -# 8546 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2214 "..\pars.mly" - Expr_assert(_2, union_ranges (rhs parseState 1) (range_of_synexpr _2)) - ) -# 2214 "..\pars.mly" - : Ast.SynExpr)); -# 8557 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2215 "..\pars.mly" - raiseParseErrorAt (rhs parseState 1) "'assert' may no longer be used as a first class value. Use 'assert ' instead" - ) -# 2215 "..\pars.mly" - : Ast.SynExpr)); -# 8567 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'do_or_odo)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'done_term)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2218 "..\pars.mly" - let mWhile = union_ranges (rhs parseState 1) (range_of_synexpr _2) in - let spWhile = SequencePointAtWhileLoop(mWhile) in - Expr_while(spWhile,_2,_4,union_ranges (rhs parseState 1) (range_of_synexpr _4)) - ) -# 2218 "..\pars.mly" - : Ast.SynExpr)); -# 8583 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'do_or_odo)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2222 "..\pars.mly" - reportParseErrorAt (rhs parseState 4) "'done' expected after this expression" ; arbExpr(parseState) - ) -# 2222 "..\pars.mly" - : Ast.SynExpr)); -# 8597 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'do_or_odo)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'done_term)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2223 "..\pars.mly" - (* silent recovery *) arbExpr(parseState) - ) -# 2223 "..\pars.mly" - : Ast.SynExpr)); -# 8610 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2224 "..\pars.mly" - reportParseErrorAt (rhs parseState 2) "'do' expected after this expression" ; arbExpr(parseState) - ) -# 2224 "..\pars.mly" - : Ast.SynExpr)); -# 8622 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'done_term)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2225 "..\pars.mly" - (* silent recovery *) arbExpr(parseState) - ) -# 2225 "..\pars.mly" - : Ast.SynExpr)); -# 8633 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'forLoopBinder)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'do_or_odo)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'done_term)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2228 "..\pars.mly" - let spBind = SequencePointAtForLoop(rhs2 parseState 1 3) in - let (a,b) = _2 in Expr_foreach(spBind,SeqExprOnly(false),a,b,_4,union_ranges (rhs parseState 1) (range_of_synexpr _4)) - ) -# 2228 "..\pars.mly" - : Ast.SynExpr)); -# 8648 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'forLoopBinder)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2232 "..\pars.mly" - let spBind = SequencePointAtForLoop(rhs2 parseState 1 2) in - let (a,b) = _2 in Expr_foreach(spBind,SeqExprOnly(false),a,b,arbExpr(parseState),lhs(parseState)) - ) -# 2232 "..\pars.mly" - : Ast.SynExpr)); -# 8661 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'forLoopBinder)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'do_or_odo)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'done_term)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2236 "..\pars.mly" - let spBind = SequencePointAtForLoop(rhs2 parseState 1 3) in - let (a,b) = _2 in Expr_foreach(spBind,SeqExprOnly(false),a,b,arbExpr(parseState),rhs2 parseState 1 3) - ) -# 2236 "..\pars.mly" - : Ast.SynExpr)); -# 8675 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'forLoopRange)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'do_or_odo)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'done_term)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2240 "..\pars.mly" - let spBind = SequencePointAtForLoop(rhs2 parseState 1 3) in - let (a,b,c,d) = _2 in Expr_for(spBind,a,b,c,d,_4,union_ranges (rhs parseState 1) (range_of_synexpr _4)) - ) -# 2240 "..\pars.mly" - : Ast.SynExpr)); -# 8690 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'forLoopRange)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'do_or_odo)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2244 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unclosed 'for', e.g. no 'done' found to match this 'for'" ; arbExpr(parseState) - ) -# 2244 "..\pars.mly" - : Ast.SynExpr)); -# 8704 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'forLoopRange)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'do_or_odo)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'done_term)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2247 "..\pars.mly" - (* silent recovery *) arbExpr(parseState) - ) -# 2247 "..\pars.mly" - : Ast.SynExpr)); -# 8717 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'do_or_odo)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'done_term)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2250 "..\pars.mly" - (* silent recovery *) _4 - ) -# 2250 "..\pars.mly" - : Ast.SynExpr)); -# 8730 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'done_term)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2265 "..\pars.mly" - reportParseErrorAt (rhs parseState 3) "'=' expected"; arbExpr(parseState) - ) -# 2265 "..\pars.mly" - : Ast.SynExpr)); -# 8742 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : bool)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2269 "..\pars.mly" - Comp_yield((_1,not _1),_2, union_ranges (rhs parseState 1) (range_of_synexpr _2)) - ) -# 2269 "..\pars.mly" - : Ast.SynExpr)); -# 8754 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : bool)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2271 "..\pars.mly" - Comp_yieldm((_1,not _1), _2, union_ranges (rhs parseState 1) (range_of_synexpr _2)) - ) -# 2271 "..\pars.mly" - : Ast.SynExpr)); -# 8766 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - let _7 = (let data = parseState.GetInput(7) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2274 "..\pars.mly" - let spBind = SequencePointAtBinding(rhs2 parseState 1 5) in - let m = rhs parseState 1 in - Comp_bind(spBind,(_1 = "use"),_2,_4,_7, lhs parseState) - ) -# 2274 "..\pars.mly" - : Ast.SynExpr)); -# 8783 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteDefnBindingsTerminator)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - let _7 = (let data = parseState.GetInput(7) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2279 "..\pars.mly" - let spBind = SequencePointAtBinding(union_ranges (rhs parseState 1) (range_of_synexpr _4)) in - let m = rhs parseState 1 in - Comp_bind(spBind,(_1 = "use"),_2,_4,_7, lhs parseState) - ) -# 2279 "..\pars.mly" - : Ast.SynExpr)); -# 8801 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynPat)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteDefnBindingsTerminator)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2284 "..\pars.mly" - (* error recovery that allows intellisense when writing incomplete computation expressions *) - let spBind = SequencePointAtBinding(union_ranges (rhs parseState 1) (range_of_synexpr _4)) in - let m = rhs parseState 1 in - Comp_bind(spBind,(_1 = "use"),_2,_4, (Comp_zero(m)) , lhs parseState) - ) -# 2284 "..\pars.mly" - : Ast.SynExpr)); -# 8819 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2290 "..\pars.mly" - let spBind = NoSequencePointAtDoBinding in - Comp_bind(spBind,false,Pat_const(Const_unit,range_of_synexpr _2),_2,_5, union_ranges (rhs parseState 1) (range_of_synexpr _5)) - ) -# 2290 "..\pars.mly" - : Ast.SynExpr)); -# 8833 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'hardwhiteDefnBindingsTerminator)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2294 "..\pars.mly" - Comp_do_bind(_2, union_ranges (rhs parseState 1) (range_of_synexpr _2)) - ) -# 2294 "..\pars.mly" - : Ast.SynExpr)); -# 8845 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'forLoopBinder)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'monadicSingleLineQualifiersThenArrowThenExprR)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2297 "..\pars.mly" - let spBind = SequencePointAtForLoop(rhs2 parseState 1 2) in - let a,b= _2 in Expr_foreach(spBind,SeqExprOnly(true),a,b,_4 (rhs parseState 3),rhs2 parseState 1 3) - ) -# 2297 "..\pars.mly" - : Ast.SynExpr)); -# 8859 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlockR)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2301 "..\pars.mly" - errorR(Error("The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions",lhs parseState)); - Comp_yield((true,true),_2, lhs parseState) - ) -# 2301 "..\pars.mly" - : Ast.SynExpr)); -# 8871 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2307 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 ":=" _3 - ) -# 2307 "..\pars.mly" - : Ast.SynExpr)); -# 8883 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'declExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2308 "..\pars.mly" - mksyn_assign (union_ranges (range_of_synexpr _1) (range_of_synexpr _3)) _1 _3 - ) -# 2308 "..\pars.mly" - : Ast.SynExpr)); -# 8895 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2309 "..\pars.mly" - Expr_tuple( List.rev _1,lhs(parseState)) - ) -# 2309 "..\pars.mly" - : Ast.SynExpr)); -# 8906 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2310 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 "||" _3 - ) -# 2310 "..\pars.mly" - : Ast.SynExpr)); -# 8918 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2311 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 _2 _3 - ) -# 2311 "..\pars.mly" - : Ast.SynExpr)); -# 8931 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2312 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 "or" _3 - ) -# 2312 "..\pars.mly" - : Ast.SynExpr)); -# 8943 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2313 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 "&" _3 - ) -# 2313 "..\pars.mly" - : Ast.SynExpr)); -# 8955 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2314 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 "&&" _3 - ) -# 2314 "..\pars.mly" - : Ast.SynExpr)); -# 8967 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2315 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 _2 _3 - ) -# 2315 "..\pars.mly" - : Ast.SynExpr)); -# 8980 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2316 "..\pars.mly" - mksyn_infix (rhs parseState 2) (union_ranges (range_of_synexpr _1) (range_of_synexpr _3)) _1 "=" _3 - ) -# 2316 "..\pars.mly" - : Ast.SynExpr)); -# 8992 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2317 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 _2 _3 - ) -# 2317 "..\pars.mly" - : Ast.SynExpr)); -# 9005 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2318 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 "$" _3 - ) -# 2318 "..\pars.mly" - : Ast.SynExpr)); -# 9017 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2319 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 "<" _3 - ) -# 2319 "..\pars.mly" - : Ast.SynExpr)); -# 9029 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2320 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 ">" _3 - ) -# 2320 "..\pars.mly" - : Ast.SynExpr)); -# 9041 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2321 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 _2 _3 - ) -# 2321 "..\pars.mly" - : Ast.SynExpr)); -# 9054 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2322 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 _2 _3 - ) -# 2322 "..\pars.mly" - : Ast.SynExpr)); -# 9067 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2323 "..\pars.mly" - Expr_app (ExprAtomicFlag.NonAtomic, mksyn_item (rhs parseState 2) opname_Cons,Expr_tuple ([_1;_3],lhs(parseState)),lhs(parseState)) - ) -# 2323 "..\pars.mly" - : Ast.SynExpr)); -# 9079 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2324 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 _2 _3 - ) -# 2324 "..\pars.mly" - : Ast.SynExpr)); -# 9092 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2325 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 "-" _3 - ) -# 2325 "..\pars.mly" - : Ast.SynExpr)); -# 9104 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2326 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 "*" _3 - ) -# 2326 "..\pars.mly" - : Ast.SynExpr)); -# 9116 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2327 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 _2 _3 - ) -# 2327 "..\pars.mly" - : Ast.SynExpr)); -# 9129 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2328 "..\pars.mly" - mksyn_infix (rhs parseState 2) (lhs(parseState)) _1 _2 _3 - ) -# 2328 "..\pars.mly" - : Ast.SynExpr)); -# 9142 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2329 "..\pars.mly" - _1 - ) -# 2329 "..\pars.mly" - : Ast.SynExpr)); -# 9153 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2333 "..\pars.mly" - let con = Const_string (_1,rhs parseState 1) in - let arg2 = Expr_const (con,range_of_synconst con (rhs parseState 1)) in - arg2 - ) -# 2333 "..\pars.mly" - : 'dynamicArg)); -# 9166 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2337 "..\pars.mly" - _2 - ) -# 2337 "..\pars.mly" - : 'dynamicArg)); -# 9177 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2341 "..\pars.mly" - _2 - ) -# 2341 "..\pars.mly" - : 'monadicWhenCondition)); -# 9188 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'withPatternClauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2344 "..\pars.mly" - rhs parseState 1, _2 - ) -# 2344 "..\pars.mly" - : 'withClauses)); -# 9199 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'withPatternClauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2345 "..\pars.mly" - rhs parseState 1, _2 - ) -# 2345 "..\pars.mly" - : 'withClauses)); -# 9210 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'withPatternClauses)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2346 "..\pars.mly" - rhs parseState 1, _2 - ) -# 2346 "..\pars.mly" - : 'withClauses)); -# 9222 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternClauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2350 "..\pars.mly" - _1 - ) -# 2350 "..\pars.mly" - : 'withPatternClauses)); -# 9233 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternClauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2352 "..\pars.mly" - _2 - ) -# 2352 "..\pars.mly" - : 'withPatternClauses)); -# 9244 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2354 "..\pars.mly" - (* silent recovery *) - let mLast = rhs parseState 1 in - [], mLast - ) -# 2354 "..\pars.mly" - : 'withPatternClauses)); -# 9256 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2358 "..\pars.mly" - (* silent recovery *) - let mLast = rhs parseState 1 in - [], mLast - ) -# 2358 "..\pars.mly" - : 'withPatternClauses)); -# 9268 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternGuard)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2365 "..\pars.mly" - _1, _2, rhs parseState 1 - ) -# 2365 "..\pars.mly" - : 'patternAndGuard)); -# 9280 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternAndGuard)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternResult)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2369 "..\pars.mly" - let pat,guard,patm = _1 in - let mLast = range_of_synexpr _2 in - [Clause(pat,guard,_2,patm,SequencePointAtTarget)], mLast - ) -# 2369 "..\pars.mly" - : 'patternClauses)); -# 9294 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternAndGuard)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternResult)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternClauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2373 "..\pars.mly" - let pat,guard,patm = _1 in - let clauses,mLast = _4 in - (Clause(pat,guard,_2,patm,SequencePointAtTarget) :: clauses), mLast - ) -# 2373 "..\pars.mly" - : 'patternClauses)); -# 9309 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternAndGuard)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternResult)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2377 "..\pars.mly" - let pat,guard,patm = _1 in - let mLast = rhs parseState 3 in - (* silent recovery *) - [Clause(pat,guard,_2,patm,SequencePointAtTarget)], mLast - ) -# 2377 "..\pars.mly" - : 'patternClauses)); -# 9324 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternAndGuard)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternResult)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2382 "..\pars.mly" - let pat,guard,patm = _1 in - let mLast = range_of_synexpr _2 in - (* silent recovery *) - [Clause(pat,guard,_2,patm,SequencePointAtTarget)], mLast - ) -# 2382 "..\pars.mly" - : 'patternClauses)); -# 9339 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2389 "..\pars.mly" - Some _2 - ) -# 2389 "..\pars.mly" - : 'patternGuard)); -# 9350 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2391 "..\pars.mly" - None - ) -# 2391 "..\pars.mly" - : 'patternGuard)); -# 9360 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlockR)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2395 "..\pars.mly" - _2 - ) -# 2395 "..\pars.mly" - : 'patternResult)); -# 9371 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'ifExprThen)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'ifExprElifs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2399 "..\pars.mly" - let exprThen,mThen = _1 in - (fun exprGuard mIf -> - let mIfToThen = union_ranges mIf mThen in - let mIfToEndOfElseBranch = union_ranges mIf (range_of_synexpr (match _2 with None -> exprThen | Some e -> e)) in - let spIfToThen = SequencePointAtBinding(mIfToThen) in - Expr_cond(exprGuard,exprThen,_2,spIfToThen,mIfToThen,mIfToEndOfElseBranch)) - ) -# 2399 "..\pars.mly" - : 'ifExprCases)); -# 9388 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2407 "..\pars.mly" - _2, rhs parseState 1 - ) -# 2407 "..\pars.mly" - : 'ifExprThen)); -# 9399 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2408 "..\pars.mly" - _3,rhs parseState 1 - ) -# 2408 "..\pars.mly" - : 'ifExprThen)); -# 9410 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2409 "..\pars.mly" - _3,rhs parseState 1 - ) -# 2409 "..\pars.mly" - : 'ifExprThen)); -# 9422 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2413 "..\pars.mly" - None - ) -# 2413 "..\pars.mly" - : 'ifExprElifs)); -# 9432 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2415 "..\pars.mly" - Some _2 - ) -# 2415 "..\pars.mly" - : 'ifExprElifs)); -# 9443 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2417 "..\pars.mly" - Some _3 - ) -# 2417 "..\pars.mly" - : 'ifExprElifs)); -# 9454 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2419 "..\pars.mly" - Some _3 - ) -# 2419 "..\pars.mly" - : 'ifExprElifs)); -# 9466 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'ifExprCases)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2421 "..\pars.mly" - let mElif = rhs parseState 1 in - Some (_3 _2 mElif) - ) -# 2421 "..\pars.mly" - : 'ifExprElifs)); -# 9479 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2426 "..\pars.mly" - _3 :: _1 - ) -# 2426 "..\pars.mly" - : 'tupleExpr)); -# 9491 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2428 "..\pars.mly" - _3 :: _1 :: [] - ) -# 2428 "..\pars.mly" - : 'tupleExpr)); -# 9503 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2432 "..\pars.mly" - mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr _2)) "~-" _2 - ) -# 2432 "..\pars.mly" - : 'minusExpr)); -# 9514 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2434 "..\pars.mly" - mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr _2)) ("~"^(_1)) _2 - ) -# 2434 "..\pars.mly" - : 'minusExpr)); -# 9526 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2436 "..\pars.mly" - mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr _2)) ("~"^(_1)) _2 - ) -# 2436 "..\pars.mly" - : 'minusExpr)); -# 9538 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2438 "..\pars.mly" - mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr _2)) _1 _2 - ) -# 2438 "..\pars.mly" - : 'minusExpr)); -# 9550 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2440 "..\pars.mly" - mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr _2)) ("~"^(_1)) _2 - ) -# 2440 "..\pars.mly" - : 'minusExpr)); -# 9562 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2442 "..\pars.mly" - Expr_addrof(true,_2,rhs parseState 1,union_ranges (rhs parseState 1) (range_of_synexpr _2)) - ) -# 2442 "..\pars.mly" - : 'minusExpr)); -# 9573 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2444 "..\pars.mly" - Expr_addrof(false,_2,rhs parseState 1, union_ranges (rhs parseState 1) (range_of_synexpr _2)) - ) -# 2444 "..\pars.mly" - : 'minusExpr)); -# 9584 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExprAfterType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2446 "..\pars.mly" - Expr_new(false,_2,_4,union_ranges (rhs parseState 1) (range_of_synexpr _4)) - ) -# 2446 "..\pars.mly" - : 'minusExpr)); -# 9597 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2448 "..\pars.mly" - Expr_new(false,_2,arbExpr(parseState),union_ranges (rhs parseState 1) (range_of_syntype _2)) - ) -# 2448 "..\pars.mly" - : 'minusExpr)); -# 9609 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2450 "..\pars.mly" - Expr_inferred_upcast(_2,union_ranges (rhs parseState 1) (range_of_synexpr _2)) - ) -# 2450 "..\pars.mly" - : 'minusExpr)); -# 9620 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'minusExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2452 "..\pars.mly" - Expr_inferred_downcast(_2,union_ranges (rhs parseState 1) (range_of_synexpr _2)) - ) -# 2452 "..\pars.mly" - : 'minusExpr)); -# 9631 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2454 "..\pars.mly" - _1 - ) -# 2454 "..\pars.mly" - : 'minusExpr)); -# 9642 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appExpr)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'argExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2458 "..\pars.mly" - Expr_app (ExprAtomicFlag.NonAtomic, _1,_2,union_ranges (range_of_synexpr _1) (range_of_synexpr _2)) - ) -# 2458 "..\pars.mly" - : 'appExpr)); -# 9654 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2460 "..\pars.mly" - let arg,_ = _1 in - arg - ) -# 2460 "..\pars.mly" - : 'appExpr)); -# 9666 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2465 "..\pars.mly" - let arg2,hpa2 = _2 in - if hpa2 then reportParseErrorAt (rhs parseState 1) "Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized"; - mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr arg2)) ("~"^(_1)) arg2 - ) -# 2465 "..\pars.mly" - : 'argExpr)); -# 9680 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2469 "..\pars.mly" - let arg,hpa = _1 in - if hpa then reportParseErrorAt (range_of_synexpr arg) "Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized"; - arg - ) -# 2469 "..\pars.mly" - : 'argExpr)); -# 9693 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2476 "..\pars.mly" - let arg1,_ = _1 in - let arg2,_ = _3 in - Expr_app (ExprAtomicFlag.Atomic, arg1,arg2,union_ranges (range_of_synexpr arg1) (range_of_synexpr arg2)),true - ) -# 2476 "..\pars.mly" - : 'atomicExpr)); -# 9707 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeArgsActual)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2481 "..\pars.mly" - let arg1,_ = _1 in - Expr_tyapp (arg1,_3,lhs(parseState)),false - ) -# 2481 "..\pars.mly" - : 'atomicExpr)); -# 9720 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2485 "..\pars.mly" - let arg2,hpa2 = _2 in - mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr arg2)) _1 arg2,hpa2 - ) -# 2485 "..\pars.mly" - : 'atomicExpr)); -# 9733 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExprQualification)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2488 "..\pars.mly" - let arg1,hpa1 = _1 in - _3 arg1 (lhs(parseState)) (rhs parseState 2),hpa1 - ) -# 2488 "..\pars.mly" - : 'atomicExpr)); -# 9746 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExprQualification)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2491 "..\pars.mly" - let arg1 = Expr_id_get(ident("base",rhs parseState 1)) in - _3 arg1 (lhs(parseState)) (rhs parseState 2),false - ) -# 2491 "..\pars.mly" - : 'atomicExpr)); -# 9758 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'nameop)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2494 "..\pars.mly" - Expr_lid_get (true,[_2],rhs parseState 2),false - ) -# 2494 "..\pars.mly" - : 'atomicExpr)); -# 9769 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'dynamicArg)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2496 "..\pars.mly" - let arg1,hpa1 = _1 in - mksyn_infix (rhs parseState 2) (lhs(parseState)) arg1 "?" _3, hpa1 - ) -# 2496 "..\pars.mly" - : 'atomicExpr)); -# 9782 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'nameop)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2499 "..\pars.mly" - Expr_id_get (_1),false - ) -# 2499 "..\pars.mly" - : 'atomicExpr)); -# 9793 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'listExprElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2501 "..\pars.mly" - MatchPair parseState 1 3; - _2 (lhs(parseState)) false,false - ) -# 2501 "..\pars.mly" - : 'atomicExpr)); -# 9805 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'listExprElements)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2504 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched '['"; - _2 (rhs2 parseState 1 2) false, false - ) -# 2504 "..\pars.mly" - : 'atomicExpr)); -# 9818 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2507 "..\pars.mly" - MatchPair parseState 1 3; - (* silent recovery *) - Expr_array_or_list(false,[ ], lhs(parseState)),false - ) -# 2507 "..\pars.mly" - : 'atomicExpr)); -# 9830 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExprAfterType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2511 "..\pars.mly" - _1,false - ) -# 2511 "..\pars.mly" - : 'atomicExpr)); -# 9841 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'identop)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2515 "..\pars.mly" - let idm = rhs parseState 1 in - (fun e lhsm dotm -> mksyn_dot lhsm e _1) - ) -# 2515 "..\pars.mly" - : 'atomicExprQualification)); -# 9853 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2518 "..\pars.mly" - (fun e lhsm dotm -> - reportParseErrorAt dotm "missing qualification after '.'"; - // Include 'e' in the returned expression but throw it away - Expr_throwaway(e,lhsm)) - ) -# 2518 "..\pars.mly" - : 'atomicExprQualification)); -# 9867 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int32 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2523 "..\pars.mly" - (fun e lhsm dotm -> - libraryOnlyWarning (lhs(parseState)); - mksyn_dotn lhsm e (fst _1)) - ) -# 2523 "..\pars.mly" - : 'atomicExprQualification)); -# 9880 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : int32 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2527 "..\pars.mly" - (fun e lhsm dotm -> - libraryOnlyWarning(lhs(parseState)); - Expr_constr_field_get (e,mksyn_constr lhsm opname_Cons,(fst _5),lhsm)) - ) -# 2527 "..\pars.mly" - : 'atomicExprQualification)); -# 9893 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2531 "..\pars.mly" - MatchPair parseState 1 3; - (fun e lhsm dotm -> - ocamlCompatWarning "The expression form 'expr.(expr)' is for use when OCaml compatibility is enabled. In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array" (lhs(parseState)); - mksyn_dot_lparen_get lhsm e _2) - ) -# 2531 "..\pars.mly" - : 'atomicExprQualification)); -# 9907 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2536 "..\pars.mly" - MatchPair parseState 1 3; - (fun e lhsm dotm -> mksyn_dot_lbrack_get lhsm dotm e _2) - ) -# 2536 "..\pars.mly" - : 'atomicExprQualification)); -# 9919 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'optRange)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2540 "..\pars.mly" - MatchPair parseState 1 3; - (fun e lhsm dotm -> mksyn_dot_lbrack_slice_get lhsm dotm e _2) - ) -# 2540 "..\pars.mly" - : 'atomicExprQualification)); -# 9931 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'optRange)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'optRange)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2543 "..\pars.mly" - MatchPair parseState 1 5; - (fun e lhsm dotm -> mksyn_dot_lbrack_slice2_get lhsm dotm e _2 _4) - ) -# 2543 "..\pars.mly" - : 'atomicExprQualification)); -# 9944 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'optRange)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'optRange)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'optRange)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2546 "..\pars.mly" - MatchPair parseState 1 7; - (fun e lhsm dotm -> mksyn_dot_lbrack_slice3_get lhsm dotm e _2 _4 _6) - ) -# 2546 "..\pars.mly" - : 'atomicExprQualification)); -# 9958 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'optRange)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'optRange)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'optRange)) in - let _8 = (let data = parseState.GetInput(8) in (Microsoft.FSharp.Core.Operators.unbox data : 'optRange)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2549 "..\pars.mly" - MatchPair parseState 1 9; - (fun e lhsm dotm -> mksyn_dot_lbrack_slice4_get lhsm dotm e _2 _4 _6 _8) - ) -# 2549 "..\pars.mly" - : 'atomicExprQualification)); -# 9973 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2553 "..\pars.mly" - mk_optional (rhs parseState 1) (Some _1), mk_optional (rhs parseState 3) (Some _3) - ) -# 2553 "..\pars.mly" - : 'optRange)); -# 9985 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2554 "..\pars.mly" - mk_optional (rhs parseState 1) (Some _1), mk_optional (rhs parseState 2) None - ) -# 2554 "..\pars.mly" - : 'optRange)); -# 9996 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2555 "..\pars.mly" - mk_optional (rhs parseState 1) None, mk_optional (rhs parseState 2) (Some _2) - ) -# 2555 "..\pars.mly" - : 'optRange)); -# 10007 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2556 "..\pars.mly" - mk_optional (rhs parseState 1) None, mk_optional (rhs parseState 1) None - ) -# 2556 "..\pars.mly" - : 'optRange)); -# 10017 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'constant)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2562 "..\pars.mly" - Expr_const (_1,range_of_synconst _1 (lhs(parseState))) - ) -# 2562 "..\pars.mly" - : 'atomicExprAfterType)); -# 10028 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2564 "..\pars.mly" - _1 - ) -# 2564 "..\pars.mly" - : 'atomicExprAfterType)); -# 10039 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'braceExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2566 "..\pars.mly" - _1 - ) -# 2566 "..\pars.mly" - : 'atomicExprAfterType)); -# 10050 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2568 "..\pars.mly" - Expr_null(lhs(parseState)) - ) -# 2568 "..\pars.mly" - : 'atomicExprAfterType)); -# 10060 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2570 "..\pars.mly" - Expr_const(Const_bool false,lhs(parseState)) - ) -# 2570 "..\pars.mly" - : 'atomicExprAfterType)); -# 10070 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2572 "..\pars.mly" - Expr_const(Const_bool true,lhs(parseState)) - ) -# 2572 "..\pars.mly" - : 'atomicExprAfterType)); -# 10080 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'quoteExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2574 "..\pars.mly" - _1 - ) -# 2574 "..\pars.mly" - : 'atomicExprAfterType)); -# 10091 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'arrayExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2576 "..\pars.mly" - _1 - ) -# 2576 "..\pars.mly" - : 'atomicExprAfterType)); -# 10102 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'beginEndExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2578 "..\pars.mly" - _1 - ) -# 2578 "..\pars.mly" - : 'atomicExprAfterType)); -# 10113 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2582 "..\pars.mly" - Expr_paren(_2,rhs2 parseState 1 3) - ) -# 2582 "..\pars.mly" - : 'beginEndExpr)); -# 10124 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2584 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched 'begin'"; _2 - ) -# 2584 "..\pars.mly" - : 'beginEndExpr)); -# 10136 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2586 "..\pars.mly" - (* silent recovery *) arbExpr(parseState) - ) -# 2586 "..\pars.mly" - : 'beginEndExpr)); -# 10146 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2588 "..\pars.mly" - mksyn_unit (lhs(parseState)) - ) -# 2588 "..\pars.mly" - : 'beginEndExpr)); -# 10156 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string * bool)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : string * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2592 "..\pars.mly" - MatchPair parseState 1 3; - if _1 <> _3 then reportParseErrorAt (rhs parseState 1) ("mismatched quotation, beginning with '"^ fst _1 ^ "'"); - (Expr_quote(mksyn_item (lhs(parseState)) (CompileOpName (fst _1)), snd _1, _2,lhs(parseState))) - ) -# 2592 "..\pars.mly" - : 'quoteExpr)); -# 10171 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string * bool)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2596 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) ("unmatched '"^fst _1^"'"); - // Note: deliberately use this smaller range for the expression: see FSHarp 1.0 bug 3225 - let mExpr = rhs2 parseState 1 1 in - Expr_quote(mksyn_item (lhs(parseState)) (CompileOpName (fst _1)),snd _1, _2,mExpr) - ) -# 2596 "..\pars.mly" - : 'quoteExpr)); -# 10187 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string * bool)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : string * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2601 "..\pars.mly" - MatchPair parseState 1 3; (* silent recovery *) Expr_quote(mksyn_item (lhs(parseState)) (CompileOpName (fst _1)),snd _1, arbExpr(parseState),lhs(parseState)) - ) -# 2601 "..\pars.mly" - : 'quoteExpr)); -# 10199 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'listExprElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2605 "..\pars.mly" - MatchPair parseState 1 3; _2 (lhs(parseState)) true - ) -# 2605 "..\pars.mly" - : 'arrayExpr)); -# 10210 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'listExprElements)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2607 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched '[|'"; - _2 (rhs2 parseState 1 2) true - ) -# 2607 "..\pars.mly" - : 'arrayExpr)); -# 10223 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2610 "..\pars.mly" - MatchPair parseState 1 3; (* silent recovery *) Expr_array_or_list(true,[ ], lhs(parseState)) - ) -# 2610 "..\pars.mly" - : 'arrayExpr)); -# 10233 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenExprBody)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2614 "..\pars.mly" - MatchPair parseState 1 3; _2 (rhs2 parseState 1 3) - ) -# 2614 "..\pars.mly" - : 'parenExpr)); -# 10244 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenExprBody)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2616 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched '('"; let lhsm = rhs2 parseState 1 2 in Expr_paren(_2 lhsm,lhsm) - ) -# 2616 "..\pars.mly" - : 'parenExpr)); -# 10256 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2618 "..\pars.mly" - MatchPair parseState 1 3; (* silent recovery *) arbExpr(parseState) - ) -# 2618 "..\pars.mly" - : 'parenExpr)); -# 10266 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2620 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched '('"; arbExpr(parseState) - ) -# 2620 "..\pars.mly" - : 'parenExpr)); -# 10277 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2624 "..\pars.mly" - (fun m -> Expr_const(Const_unit,m)) - ) -# 2624 "..\pars.mly" - : 'parenExprBody)); -# 10287 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2626 "..\pars.mly" - (fun m -> Expr_typeof(_2,m)) - ) -# 2626 "..\pars.mly" - : 'parenExprBody)); -# 10298 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'staticallyKnownHeadTypars)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'classMemberSpfn)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2628 "..\pars.mly" - MatchPair parseState 3 5; - MatchPair parseState 6 8; - (fun m -> Expr_trait_call(_1,_4,_6,m)) - ) -# 2628 "..\pars.mly" - : 'parenExprBody)); -# 10313 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2632 "..\pars.mly" - (fun m -> Expr_paren(_1,m)) - ) -# 2632 "..\pars.mly" - : 'parenExprBody)); -# 10324 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'inlineAssemblyExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2634 "..\pars.mly" - _1 - ) -# 2634 "..\pars.mly" - : 'parenExprBody)); -# 10335 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'staticallyKnownHeadTypar)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2637 "..\pars.mly" - [_1] - ) -# 2637 "..\pars.mly" - : 'staticallyKnownHeadTypars)); -# 10346 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'staticallyKnownHeadTypar)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'staticallyKnownHeadTypar)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2638 "..\pars.mly" - [_2 ; _4 ] - ) -# 2638 "..\pars.mly" - : 'staticallyKnownHeadTypars)); -# 10358 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'braceExprBody)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2642 "..\pars.mly" - MatchPair parseState 1 3; _2 (lhs(parseState)) - ) -# 2642 "..\pars.mly" - : 'braceExpr)); -# 10369 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'braceExprBody)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2644 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched '{'" ; _2 (lhs(parseState)) - ) -# 2644 "..\pars.mly" - : 'braceExpr)); -# 10381 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2646 "..\pars.mly" - MatchPair parseState 1 3; (* silent recovery *) arbExpr(parseState) - ) -# 2646 "..\pars.mly" - : 'braceExpr)); -# 10391 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2650 "..\pars.mly" - (fun m -> let a,b,c = _1 in Expr_recd(a,b,c,m)) - ) -# 2650 "..\pars.mly" - : 'braceExprBody)); -# 10402 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'objExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2652 "..\pars.mly" - _1 - ) -# 2652 "..\pars.mly" - : 'braceExprBody)); -# 10413 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'monadicExprInitial)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2654 "..\pars.mly" - _1 false - ) -# 2654 "..\pars.mly" - : 'braceExprBody)); -# 10424 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'monadicExprInitial)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2658 "..\pars.mly" - (fun lhsm isArray -> Expr_array_or_list_of_seq(isArray, _1 true lhsm,lhsm)) - ) -# 2658 "..\pars.mly" - : 'listExprElements)); -# 10435 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2660 "..\pars.mly" - (fun lhsm isArray -> Expr_array_or_list(isArray,[ ], lhsm)) - ) -# 2660 "..\pars.mly" - : 'listExprElements)); -# 10445 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'seqExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2664 "..\pars.mly" - (fun isArrayOrList lhsm -> Expr_comprehension(isArrayOrList,ref(isArrayOrList),_1,lhsm)) - ) -# 2664 "..\pars.mly" - : 'monadicExprInitial)); -# 10456 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rangeSequenceExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2666 "..\pars.mly" - _1 - ) -# 2666 "..\pars.mly" - : 'monadicExprInitial)); -# 10467 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2670 "..\pars.mly" - deprecatedWithError "use 'expr .. expr' instead" (lhs(parseState)); (fun _ m -> mksyn_infix m m _1 ".." _3) - ) -# 2670 "..\pars.mly" - : 'rangeSequenceExpr)); -# 10479 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2672 "..\pars.mly" - (fun _ m -> mksyn_infix m m _1 ".." _3) - ) -# 2672 "..\pars.mly" - : 'rangeSequenceExpr)); -# 10491 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2674 "..\pars.mly" - (fun _ m -> mksyn_trifix m ".. .." _1 _3 _5) - ) -# 2674 "..\pars.mly" - : 'rangeSequenceExpr)); -# 10504 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlockR)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2682 "..\pars.mly" - (fun m -> Comp_yield((true,false),_2,m)) - ) -# 2682 "..\pars.mly" - : 'monadicSingleLineQualifiersThenArrowThenExprR)); -# 10515 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlockR)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2684 "..\pars.mly" - let mAll = union_ranges (rhs parseState 1) (range_of_synexpr _2) in - deprecatedWithError "The expression form '->>' in sequence expressions has been removed from the F# language. Use the syntax 'yield! ...' to generate multiple elements in sequence expressions" mAll; - (fun m -> Comp_yieldm((true,false),_2,m)) - ) -# 2684 "..\pars.mly" - : 'monadicSingleLineQualifiersThenArrowThenExprR)); -# 10528 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'forLoopBinder)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'monadicSingleLineQualifiersThenArrowThenExprR)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2689 "..\pars.mly" - deprecatedWithError "Nested 'for' loops in sequence expressions should be written 'for x in do for y in do ...yield " (rhs2 parseState 1 2); - let spBind = SequencePointAtForLoop(rhs2 parseState 1 2) in - let a2,b2= _2 in - (fun m -> - Expr_foreach(spBind,SeqExprOnly(true),a2,b2,_4 m,m)) - ) -# 2689 "..\pars.mly" - : 'monadicSingleLineQualifiersThenArrowThenExprR)); -# 10545 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'monadicWhenCondition)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'monadicSingleLineQualifiersThenArrowThenExprR)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2696 "..\pars.mly" - let mWhenAndGuard = range_of_synexpr _1 in - deprecatedWithError "'when' conditions in sequence expressions have been removed from the F# language. Use 'for x in do if then ...yield " mWhenAndGuard; - let spWhenAndGuard = SequencePointAtBinding(mWhenAndGuard) in - (fun m -> - Expr_cond(_1,_3 m,None,spWhenAndGuard,mWhenAndGuard,m)) - ) -# 2696 "..\pars.mly" - : 'monadicSingleLineQualifiersThenArrowThenExprR)); -# 10562 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2705 "..\pars.mly" - (_1, _3) - ) -# 2705 "..\pars.mly" - : 'forLoopBinder)); -# 10574 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'rangeSequenceExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2707 "..\pars.mly" - (_1, _3 false (rhs parseState 3)) - ) -# 2707 "..\pars.mly" - : 'forLoopBinder)); -# 10586 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2709 "..\pars.mly" - (_1, arbExpr(parseState)) - ) -# 2709 "..\pars.mly" - : 'forLoopBinder)); -# 10598 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'parenPattern)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'direction)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2712 "..\pars.mly" - id_of_pat (rhs parseState 1) _1,_3,_4,_5 - ) -# 2712 "..\pars.mly" - : 'forLoopRange)); -# 10612 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_inlineAssemblyTypeArg)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_curriedArgExprs)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_inlineAssemblyReturnTypes)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HASH)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2716 "..\pars.mly" - libraryOnlyWarning (lhs(parseState)); - let s,sm = _2,rhs parseState 2 in - (fun m -> Expr_asm (ParseAssemblyCodeInstructions s sm,_3,List.rev _4,_5,m)) - ) -# 2716 "..\pars.mly" - : 'inlineAssemblyExpr)); -# 10629 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_curriedArgExprs)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'argExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2721 "..\pars.mly" - _2 :: _1 - ) -# 2721 "..\pars.mly" - : 'opt_curriedArgExprs)); -# 10641 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2722 "..\pars.mly" - [] - ) -# 2722 "..\pars.mly" - : 'opt_curriedArgExprs)); -# 10651 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2725 "..\pars.mly" - None - ) -# 2725 "..\pars.mly" - : 'opt_atomicExprAfterType)); -# 10661 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExprAfterType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2726 "..\pars.mly" - Some(_1) - ) -# 2726 "..\pars.mly" - : 'opt_atomicExprAfterType)); -# 10672 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2729 "..\pars.mly" - [] - ) -# 2729 "..\pars.mly" - : 'opt_inlineAssemblyTypeArg)); -# 10682 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2730 "..\pars.mly" - MatchPair parseState 2 4; [_3] - ) -# 2730 "..\pars.mly" - : 'opt_inlineAssemblyTypeArg)); -# 10693 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2734 "..\pars.mly" - [] - ) -# 2734 "..\pars.mly" - : 'opt_inlineAssemblyReturnTypes)); -# 10703 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2736 "..\pars.mly" - [_2] - ) -# 2736 "..\pars.mly" - : 'opt_inlineAssemblyReturnTypes)); -# 10714 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2738 "..\pars.mly" - MatchPair parseState 2 3; [] - ) -# 2738 "..\pars.mly" - : 'opt_inlineAssemblyReturnTypes)); -# 10724 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2742 "..\pars.mly" - (None,None, []) - ) -# 2742 "..\pars.mly" - : 'recdExpr)); -# 10734 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_atomicExprAfterType)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdExprBindings)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2744 "..\pars.mly" - let arg = match _4 with None -> mksyn_unit (lhs(parseState)) | Some e -> e in - (Some(_2,arg,rhs2 parseState 2 4),None, _5) - ) -# 2744 "..\pars.mly" - : 'recdExpr)); -# 10750 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdExprBindings)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2749 "..\pars.mly" - match _1 with - | Expr_lid_or_id_get(false,v,m) -> (None,None, (List.frontAndBack v,_3) :: List.rev _4) - | _ -> raiseParseErrorAt (rhs parseState 2) "field bindings must have the form 'id = expr;'" - ) -# 2749 "..\pars.mly" - : 'recdExpr)); -# 10766 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdExprBindings)) in - let _7 = (let data = parseState.GetInput(7) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2753 "..\pars.mly" - (None,Some _1,(List.frontAndBack _3,_5):: List.rev _6) - ) -# 2753 "..\pars.mly" - : 'recdExpr)); -# 10781 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appExpr)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdExprBindings)) in - let _7 = (let data = parseState.GetInput(7) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2755 "..\pars.mly" - (None,Some _1,(List.frontAndBack _3,_5):: List.rev _6) - ) -# 2755 "..\pars.mly" - : 'recdExpr)); -# 10796 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'recdExprBindings)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'seps)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynExpr)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2758 "..\pars.mly" - (List.frontAndBack _3,_5) :: _1 - ) -# 2758 "..\pars.mly" - : 'recdExprBindings)); -# 10810 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2759 "..\pars.mly" - [] - ) -# 2759 "..\pars.mly" - : 'recdExprBindings)); -# 10820 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'objExprBaseCall)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'objExprBindings)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_objExprInterfaces)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2769 "..\pars.mly" - (fun m -> let (a,b) = _1 in Expr_impl(a,b,_2,_4, m)) - ) -# 2769 "..\pars.mly" - : 'objExpr)); -# 10834 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'objExprBaseCall)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'objExprInterfaces)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2771 "..\pars.mly" - (fun m -> let (a,b) = _1 in Expr_impl(a,b,[],_3, m)) - ) -# 2771 "..\pars.mly" - : 'objExpr)); -# 10847 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2773 "..\pars.mly" - (fun m -> let (a,b) = _2,None in Expr_impl(a,b,[],[], m)) - ) -# 2773 "..\pars.mly" - : 'objExpr)); -# 10858 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExprAfterType)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'baseSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2777 "..\pars.mly" - (_2, Some(_4,Some(_5))) - ) -# 2777 "..\pars.mly" - : 'objExprBaseCall)); -# 10872 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_HIGH_PRECEDENCE_APP)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicExprAfterType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2779 "..\pars.mly" - (_2, Some(_4,None)) - ) -# 2779 "..\pars.mly" - : 'objExprBaseCall)); -# 10885 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2781 "..\pars.mly" - _2,None - ) -# 2781 "..\pars.mly" - : 'objExprBaseCall)); -# 10896 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'objExprBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2786 "..\pars.mly" - _1 - ) -# 2786 "..\pars.mly" - : 'opt_objExprBindings)); -# 10907 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2787 "..\pars.mly" - [] - ) -# 2787 "..\pars.mly" - : 'opt_objExprBindings)); -# 10917 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'localBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2791 "..\pars.mly" - let letm = (rhs parseState 1) in - (_2 [] None letm) - ) -# 2791 "..\pars.mly" - : 'objExprBindings)); -# 10929 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'localBindings)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2794 "..\pars.mly" - let letm = (rhs parseState 1) in - (_2 [] None letm) - ) -# 2794 "..\pars.mly" - : 'objExprBindings)); -# 10941 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'objectImplementationBlock)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_end)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2797 "..\pars.mly" - _2 |> - (List.choose (function ClassMemberDefn_member_binding(b,m) -> Some b - | ClassMemberDefn_implicit_inherit (_, _, _, m) - | ClassMemberDefn_implicit_ctor (_,_,_, _, m) - | ClassMemberDefn_let_bindings(_,_,_,m) - | ClassMemberDefn_slotsig(_,_,m) - | ClassMemberDefn_interface(_,_,m) - | ClassMemberDefn_inherit(_,_,m) - | ClassMemberDefn_field(_,m) - | ClassMemberDefn_open(_,m) - | ClassMemberDefn_tycon(_,_,m) -> errorR(Error("This member is not permitted in an object implementation",m)); None)) - ) -# 2797 "..\pars.mly" - : 'objExprBindings)); -# 10963 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'objExprInterface)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_objExprInterfaces)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2810 "..\pars.mly" - _1 :: _2 - ) -# 2810 "..\pars.mly" - : 'objExprInterfaces)); -# 10975 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2813 "..\pars.mly" - [] - ) -# 2813 "..\pars.mly" - : 'opt_objExprInterfaces)); -# 10985 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'objExprInterface)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_objExprInterfaces)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2814 "..\pars.mly" - _1 :: _2 - ) -# 2814 "..\pars.mly" - : 'opt_objExprInterfaces)); -# 10997 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_objExprInterfaces)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2815 "..\pars.mly" - (* silent recovery *) _2 - ) -# 2815 "..\pars.mly" - : 'opt_objExprInterfaces)); -# 11008 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'interfaceMember)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_objExprBindings)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_decl_end)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_OBLOCKSEP)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2819 "..\pars.mly" - InterfaceImpl(_2, _3, lhs(parseState)) - ) -# 2819 "..\pars.mly" - : 'objExprInterface)); -# 11023 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2822 "..\pars.mly" - true - ) -# 2822 "..\pars.mly" - : 'direction)); -# 11033 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2823 "..\pars.mly" - false - ) -# 2823 "..\pars.mly" - : 'direction)); -# 11043 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatterns)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlock)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2828 "..\pars.mly" - let mAll = union_ranges (rhs parseState 1) (range_of_synexpr _4) in - mksyn_fun_match_lambdas false mAll _2 _4 - ) -# 2828 "..\pars.mly" - : 'anonLambdaExpr)); -# 11056 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatterns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2831 "..\pars.mly" - let mAll = rhs2 parseState 1 3 in - mksyn_fun_match_lambdas false mAll _2 (arbExpr(parseState)) - ) -# 2831 "..\pars.mly" - : 'anonLambdaExpr)); -# 11068 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatterns)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typedSeqExprBlockR)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2834 "..\pars.mly" - let mAll = union_ranges (rhs parseState 1) (range_of_synexpr _4) in - mksyn_fun_match_lambdas false mAll _2 _4 - ) -# 2834 "..\pars.mly" - : 'anonLambdaExpr)); -# 11081 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatterns)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2837 "..\pars.mly" - reportParseErrorAt (rhs2 parseState 1 3) "missing function body" ; - mksyn_fun_match_lambdas false (rhs2 parseState 1 3) _2 (arbExpr(parseState)) - ) -# 2837 "..\pars.mly" - : 'anonLambdaExpr)); -# 11093 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomicPatterns)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2841 "..\pars.mly" - reportParseErrorAt (rhs2 parseState 1 3) "missing function body" ; - mksyn_fun_match_lambdas false (rhs2 parseState 1 3) _2 (arbExpr(parseState)) - ) -# 2841 "..\pars.mly" - : 'anonLambdaExpr)); -# 11106 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_bar)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternClauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2846 "..\pars.mly" - let clauses,mLast = _3 in - let mAll = union_ranges (rhs parseState 1) mLast in - mksyn_match_lambda(false,false,mAll,clauses,NoSequencePointAtInvisibleBinding) - ) -# 2846 "..\pars.mly" - : 'anonMatchingExpr)); -# 11120 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_bar)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternClauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2850 "..\pars.mly" - let clauses,mLast = _3 in - let mAll = union_ranges (rhs parseState 1) mLast in - mksyn_match_lambda(false,false,mAll,clauses,NoSequencePointAtInvisibleBinding) - ) -# 2850 "..\pars.mly" - : 'anonMatchingExpr)); -# 11134 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_bar)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'patternClauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2854 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "error in 'function' block"; - let clauses,mLast = _3 in - let mAll = union_ranges (rhs parseState 1) mLast in - mksyn_match_lambda(false,false,mAll,clauses,NoSequencePointAtInvisibleBinding) - ) -# 2854 "..\pars.mly" - : 'anonMatchingExpr)); -# 11149 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2863 "..\pars.mly" - _1 - ) -# 2863 "..\pars.mly" - : 'typeWithTypeConstraints)); -# 11160 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2865 "..\pars.mly" - Type_with_global_constraints(_1, List.rev _3,lhs(parseState)) - ) -# 2865 "..\pars.mly" - : 'typeWithTypeConstraints)); -# 11172 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'topType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2869 "..\pars.mly" - _1 - ) -# 2869 "..\pars.mly" - : 'topTypeWithTypeConstraints)); -# 11183 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'topType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2871 "..\pars.mly" - let ty,arity = _1 in - (* nb. it doesn't matter where the constraints go in the structure of the type. *) - Type_with_global_constraints(ty,List.rev _3,lhs(parseState)), arity - ) -# 2871 "..\pars.mly" - : 'topTypeWithTypeConstraints)); -# 11197 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2877 "..\pars.mly" - None - ) -# 2877 "..\pars.mly" - : 'opt_topReturnTypeWithTypeConstraints)); -# 11207 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'topTypeWithTypeConstraints)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2879 "..\pars.mly" - let ty,arity = _2 in - let arity = (match arity with ValSynInfo([],rmdata)-> rmdata | _ -> SynInfo.unnamedRetVal) in - Some ((ty,arity),rhs parseState 2) - ) -# 2879 "..\pars.mly" - : 'opt_topReturnTypeWithTypeConstraints)); -# 11220 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'topTupleType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'topType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2885 "..\pars.mly" - let dty,dmdata= _1 in - let rty,(ValSynInfo(dmdatas,rmdata)) = _3 in - Type_fun(dty,rty,lhs(parseState)), (ValSynInfo(dmdata::dmdatas, rmdata)) - ) -# 2885 "..\pars.mly" - : 'topType)); -# 11234 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'topTupleType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2889 "..\pars.mly" - let ty,rmdata = _1 in ty, (ValSynInfo([],(match rmdata with [md] -> md | _ -> SynInfo.unnamedRetVal))) - ) -# 2889 "..\pars.mly" - : 'topType)); -# 11245 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'topAppType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'topTupleTypeElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2893 "..\pars.mly" - let ty,mdata = _1 in let tys,mdatas = List.unzip _3 in (Type_tuple(List.map (fun ty -> (false,ty)) (ty ::tys), lhs(parseState))),(mdata :: mdatas) - ) -# 2893 "..\pars.mly" - : 'topTupleType)); -# 11257 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'topAppType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2895 "..\pars.mly" - let ty,mdata = _1 in ty,[mdata] - ) -# 2895 "..\pars.mly" - : 'topTupleType)); -# 11268 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'topAppType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'topTupleTypeElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2898 "..\pars.mly" - _1 :: _3 - ) -# 2898 "..\pars.mly" - : 'topTupleTypeElements)); -# 11280 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'topAppType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2899 "..\pars.mly" - [_1] - ) -# 2899 "..\pars.mly" - : 'topTupleTypeElements)); -# 11291 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2904 "..\pars.mly" - match _2 with - | Type_lid([id],_) -> _4,ArgSynInfo(_1,false,Some id) - | _ -> raiseParseErrorAt (rhs parseState 2) "syntax error in labelled type argument" - ) -# 2904 "..\pars.mly" - : 'topAppType)); -# 11306 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributes)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2908 "..\pars.mly" - _5,ArgSynInfo(_1,true,Some _3) - ) -# 2908 "..\pars.mly" - : 'topAppType)); -# 11319 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'attributes)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2910 "..\pars.mly" - (_2,ArgSynInfo(_1,false,None)) - ) -# 2910 "..\pars.mly" - : 'topAppType)); -# 11331 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2912 "..\pars.mly" - match _1 with - | Type_lid([id],_) -> _3,ArgSynInfo([],false,Some id) - | _ -> raiseParseErrorAt (rhs parseState 2) "syntax error in labelled type argument" - ) -# 2912 "..\pars.mly" - : 'topAppType)); -# 11345 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2916 "..\pars.mly" - _4,ArgSynInfo([],true,Some _2) - ) -# 2916 "..\pars.mly" - : 'topAppType)); -# 11357 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2918 "..\pars.mly" - _1,ArgSynInfo([],false,None) - ) -# 2918 "..\pars.mly" - : 'topAppType)); -# 11368 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2922 "..\pars.mly" - deprecatedWithError "OCaml-style polymorphic record fields are deprecated and will be removed in a future release of the language. Consider using an interface type with a generic method instead" (lhs(parseState)); - Type_forall(TyparDecl([],_1),_3,lhs(parseState)) - ) -# 2922 "..\pars.mly" - : 'polyType)); -# 11381 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2924 "..\pars.mly" - _1 - ) -# 2924 "..\pars.mly" - : 'polyType)); -# 11392 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2927 "..\pars.mly" - Type_fun(_1,_3,lhs(parseState)) - ) -# 2927 "..\pars.mly" - : Ast.SynType)); -# 11404 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2928 "..\pars.mly" - _1 - ) -# 2928 "..\pars.mly" - : Ast.SynType)); -# 11415 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleOrQuotTypeElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2932 "..\pars.mly" - Type_tuple((false,_1) :: _3,lhs(parseState)) - ) -# 2932 "..\pars.mly" - : 'tupleType)); -# 11427 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleOrQuotTypeElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2935 "..\pars.mly" - if _1 <> "/" then reportParseErrorAt (rhs parseState 1) "Unexpected infix operator in type expression"; - Type_tuple((true, Type_dimensionless (lhs(parseState))):: _2, lhs(parseState)) - ) -# 2935 "..\pars.mly" - : 'tupleType)); -# 11440 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleOrQuotTypeElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2939 "..\pars.mly" - if _2 <> "/" then reportParseErrorAt (rhs parseState 1) "Unexpected infix operator in type expression"; - Type_tuple((true,_1) :: _3, lhs(parseState)) - ) -# 2939 "..\pars.mly" - : 'tupleType)); -# 11454 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2941 "..\pars.mly" - _1 - ) -# 2941 "..\pars.mly" - : 'tupleType)); -# 11465 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleOrQuotTypeElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2944 "..\pars.mly" - (false,_1) :: _3 - ) -# 2944 "..\pars.mly" - : 'tupleOrQuotTypeElements)); -# 11477 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleOrQuotTypeElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2946 "..\pars.mly" - if _2 <> "/" then reportParseErrorAt (rhs parseState 1) "Unexpected infix operator in type expression"; - (true,_1) :: _3 - ) -# 2946 "..\pars.mly" - : 'tupleOrQuotTypeElements)); -# 11491 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2948 "..\pars.mly" - [(false,_1)] - ) -# 2948 "..\pars.mly" - : 'tupleOrQuotTypeElements)); -# 11502 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'tupleTypeElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2951 "..\pars.mly" - _1 :: _3 - ) -# 2951 "..\pars.mly" - : 'tupleTypeElements)); -# 11514 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2952 "..\pars.mly" - [_1] - ) -# 2952 "..\pars.mly" - : 'tupleTypeElements)); -# 11525 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2956 "..\pars.mly" - Type_lid(_1, lhs(parseState)) - ) -# 2956 "..\pars.mly" - : 'appTypeCon)); -# 11536 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2959 "..\pars.mly" - Type_var(_1, lhs(parseState)) - ) -# 2959 "..\pars.mly" - : 'appTypeCon)); -# 11547 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appTypeCon)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : int32 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2963 "..\pars.mly" - if _2 = "^-" then Type_power(_1, -(fst _3), lhs(parseState)) - else Type_power(_1, fst _3, lhs(parseState)) - ) -# 2963 "..\pars.mly" - : 'appTypeConPower)); -# 11561 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appTypeCon)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2966 "..\pars.mly" - _1 - ) -# 2966 "..\pars.mly" - : 'appTypeConPower)); -# 11572 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'arrayTypeSuffix)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2970 "..\pars.mly" - Type_arr(_2,_1,lhs(parseState)) - ) -# 2970 "..\pars.mly" - : 'appType)); -# 11584 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'arrayTypeSuffix)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2972 "..\pars.mly" - Type_arr(_3,_1,lhs(parseState)) - ) -# 2972 "..\pars.mly" - : 'appType)); -# 11596 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appTypeConPower)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2974 "..\pars.mly" - Type_app(_2,[_1],true,lhs(parseState)) - ) -# 2974 "..\pars.mly" - : 'appType)); -# 11608 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2976 "..\pars.mly" - deprecatedWithError "The use of 'typ lazy' as a type is deprecated. Use 'Lazy' instead" (rhs parseState 2); - Type_lazy(_1,lhs(parseState)) - ) -# 2976 "..\pars.mly" - : 'appType)); -# 11620 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'appTypePrexifArguments)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'appTypeConPower)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2979 "..\pars.mly" - ocamlCompatWarning "The syntax '(typ,...,typ) ident' for multi-argument generic type instantiations is only recommended if OCaml compatibility is enabled. Consider using 'ident' instead" (lhs(parseState)); - MatchPair parseState 1 3; - Type_app(_4,_2, true, lhs(parseState)) - ) -# 2979 "..\pars.mly" - : 'appType)); -# 11634 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'powerType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2983 "..\pars.mly" - _1 - ) -# 2983 "..\pars.mly" - : 'appType)); -# 11645 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2985 "..\pars.mly" - let tp,typ = _1,_3 in - let m = lhs(parseState) in - Type_with_global_constraints(Type_var (tp, rhs parseState 1), [WhereTyparSubtypeOfType(tp,typ,m)],m) - ) -# 2985 "..\pars.mly" - : 'appType)); -# 11659 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2989 "..\pars.mly" - MatchPair parseState 1 3; mksyn_anon_constraint _3 (lhs(parseState)) - ) -# 2989 "..\pars.mly" - : 'appType)); -# 11670 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2993 "..\pars.mly" - MatchPair parseState 1 2; 1 - ) -# 2993 "..\pars.mly" - : 'arrayTypeSuffix)); -# 11680 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2995 "..\pars.mly" - MatchPair parseState 1 3; 2 - ) -# 2995 "..\pars.mly" - : 'arrayTypeSuffix)); -# 11690 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2997 "..\pars.mly" - MatchPair parseState 1 4; 3 - ) -# 2997 "..\pars.mly" - : 'arrayTypeSuffix)); -# 11700 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 2999 "..\pars.mly" - MatchPair parseState 1 5; 4 - ) -# 2999 "..\pars.mly" - : 'arrayTypeSuffix)); -# 11710 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeListElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3002 "..\pars.mly" - _1 :: _3 :: List.rev _4 - ) -# 3002 "..\pars.mly" - : 'appTypePrexifArguments)); -# 11723 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeListElements)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3005 "..\pars.mly" - _3 :: _1 - ) -# 3005 "..\pars.mly" - : 'typeListElements)); -# 11735 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3006 "..\pars.mly" - [] - ) -# 3006 "..\pars.mly" - : 'typeListElements)); -# 11745 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3010 "..\pars.mly" - _1 - ) -# 3010 "..\pars.mly" - : 'powerType)); -# 11756 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomType)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : int32 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3012 "..\pars.mly" - if _2 <> "^" && _2 <> "^-" then reportParseErrorAt (rhs parseState 2) "Unexpected infix operator in type expression"; - if _2 = "^-" then Type_power(_1, - (fst _3), lhs(parseState)) - else Type_power(_1, fst _3, lhs(parseState)) - ) -# 3012 "..\pars.mly" - : 'powerType)); -# 11771 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomType)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : int32 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3016 "..\pars.mly" - if _2 <> "^" then reportParseErrorAt (rhs parseState 2) "Unexpected infix operator in type expression"; - Type_power(_1, - (fst _4), lhs(parseState)) - ) -# 3016 "..\pars.mly" - : 'powerType)); -# 11785 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3021 "..\pars.mly" - mksyn_anon_constraint _2 (lhs(parseState)) - ) -# 3021 "..\pars.mly" - : 'atomType)); -# 11796 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appTypeConPower)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3023 "..\pars.mly" - _1 - ) -# 3023 "..\pars.mly" - : 'atomType)); -# 11807 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3025 "..\pars.mly" - Type_anon (lhs(parseState)) - ) -# 3025 "..\pars.mly" - : 'atomType)); -# 11817 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3027 "..\pars.mly" - MatchPair parseState 1 3; _2 - ) -# 3027 "..\pars.mly" - : 'atomType)); -# 11828 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'recover)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3029 "..\pars.mly" - reportParseErrorAt (rhs parseState 1) "unmatched '('" ; _2 - ) -# 3029 "..\pars.mly" - : 'atomType)); -# 11840 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int32 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3031 "..\pars.mly" - if fst _1 <> 1 then reportParseErrorAt (rhs parseState 1) "Unexpected integer literal in type expression"; - Type_dimensionless (lhs(parseState)) - - ) -# 3031 "..\pars.mly" - : 'atomType)); -# 11853 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3035 "..\pars.mly" - (* silent recovery *) Type_anon (lhs(parseState)) - ) -# 3035 "..\pars.mly" - : 'atomType)); -# 11863 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'appTypeCon)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeArgs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3037 "..\pars.mly" - Type_app(_1,_2,false,lhs(parseState)) - ) -# 3037 "..\pars.mly" - : 'atomType)); -# 11875 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3039 "..\pars.mly" - Type_proj_then_app(_1,_3,[],lhs(parseState)) - ) -# 3039 "..\pars.mly" - : 'atomType)); -# 11887 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'atomType)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeArgs)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3041 "..\pars.mly" - Type_proj_then_app(_1,_3,_4,lhs(parseState)) - ) -# 3041 "..\pars.mly" - : 'atomType)); -# 11900 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeArgsActual)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3046 "..\pars.mly" - _1 - ) -# 3046 "..\pars.mly" - : 'typeArgs)); -# 11911 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeArgsActual)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3048 "..\pars.mly" - _2 - ) -# 3048 "..\pars.mly" - : 'typeArgs)); -# 11922 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3052 "..\pars.mly" - [] - ) -# 3052 "..\pars.mly" - : 'typeArgsActual)); -# 11932 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3054 "..\pars.mly" - [_2] - ) -# 3054 "..\pars.mly" - : 'typeArgsActual)); -# 11943 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.SynType)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'typeListElements)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3056 "..\pars.mly" - _2 :: _4 :: List.rev _5 - ) -# 3056 "..\pars.mly" - : 'typeArgsActual)); -# 11956 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'measure)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3060 "..\pars.mly" - _2 - ) -# 3060 "..\pars.mly" - : 'measurearg)); -# 11967 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3062 "..\pars.mly" - Measure_Anon (lhs(parseState)) - ) -# 3062 "..\pars.mly" - : 'measurearg)); -# 11977 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3066 "..\pars.mly" - Measure_Con(_1, lhs(parseState)) - ) -# 3066 "..\pars.mly" - : 'measureatom)); -# 11988 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'typar)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3069 "..\pars.mly" - Measure_Var(_1, lhs(parseState)) - ) -# 3069 "..\pars.mly" - : 'measureatom)); -# 11999 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'measure)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3072 "..\pars.mly" - _2 - ) -# 3072 "..\pars.mly" - : 'measureatom)); -# 12010 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'measureatom)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3076 "..\pars.mly" - _1 - ) -# 3076 "..\pars.mly" - : 'measurepower)); -# 12021 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'measureatom)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : int32 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3079 "..\pars.mly" - if _2 <> "^" && _2 <> "^-" then reportParseErrorAt (rhs parseState 2) "Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'"; - if _2 = "^-" then Measure_Power(_1, - (fst _3), lhs(parseState)) - else Measure_Power(_1, fst _3, lhs(parseState)) - ) -# 3079 "..\pars.mly" - : 'measurepower)); -# 12036 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'measureatom)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : int32 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3084 "..\pars.mly" - if _2 <> "^" then reportParseErrorAt (rhs parseState 2) "Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'"; - Measure_Power(_1, - (fst _4), lhs(parseState)) - ) -# 3084 "..\pars.mly" - : 'measurepower)); -# 12050 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : int32 * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3088 "..\pars.mly" - if fst _1 <> 1 then reportParseErrorAt (rhs parseState 1) "Unexpected integer literal in unit-of-measure expression"; - Measure_One - ) -# 3088 "..\pars.mly" - : 'measurepower)); -# 12062 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'measurepower)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3093 "..\pars.mly" - [_1] - ) -# 3093 "..\pars.mly" - : 'measureseq)); -# 12073 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'measurepower)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'measureseq)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3095 "..\pars.mly" - _1 :: _2 - ) -# 3095 "..\pars.mly" - : 'measureseq)); -# 12085 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'measureseq)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3099 "..\pars.mly" - Measure_Seq(_1, lhs(parseState)) - ) -# 3099 "..\pars.mly" - : 'measure)); -# 12096 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'measure)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'measure)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3101 "..\pars.mly" - Measure_Prod(_1, _3, lhs(parseState)) - ) -# 3101 "..\pars.mly" - : 'measure)); -# 12108 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'measure)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'measure)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3103 "..\pars.mly" - if _2 <> "*" && _2 <> "/" then reportParseErrorAt (rhs parseState 2) "Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'"; - if _2 = "*" then Measure_Prod(_1, _3, lhs(parseState)) - else Measure_Quot(_1, _3, lhs(parseState)) - ) -# 3103 "..\pars.mly" - : 'measure)); -# 12123 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'measure)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3107 "..\pars.mly" - if _1 <> "/" then reportParseErrorAt (rhs parseState 1) "Unexpected operator in unit-of-measure expression. Legal operators are '*', '/' and '^'"; - Measure_Quot(Measure_One, _2, lhs(parseState)) - ) -# 3107 "..\pars.mly" - : 'measure)); -# 12136 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3112 "..\pars.mly" - let id = mksyn_id (lhs(parseState)) (_2).idText in - Typar(id ,NoStaticReq,false) - ) -# 3112 "..\pars.mly" - : 'typar)); -# 12148 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'staticallyKnownHeadTypar)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3121 "..\pars.mly" - _1 - ) -# 3121 "..\pars.mly" - : 'typar)); -# 12159 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3125 "..\pars.mly" - if _1 <> "^" then reportParseErrorAt (rhs parseState 1) "syntax error: unexpeced type paramter specification"; - Typar(_2,HeadTypeStaticReq,false) - ) -# 3125 "..\pars.mly" - : 'staticallyKnownHeadTypar)); -# 12172 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3132 "..\pars.mly" - ident(_1,rhs parseState 1) - ) -# 3132 "..\pars.mly" - : Ast.ident)); -# 12183 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3136 "..\pars.mly" - [_1] - ) -# 3136 "..\pars.mly" - : 'path)); -# 12194 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3138 "..\pars.mly" - (* silent recovery *) _1 @ [_3] - ) -# 3138 "..\pars.mly" - : 'path)); -# 12206 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'path)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3140 "..\pars.mly" - (* silent recovery *) _1 - ) -# 3140 "..\pars.mly" - : 'path)); -# 12217 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'operatorName)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3144 "..\pars.mly" - MatchPair parseState 1 3; - ident(CompileOpName _2,rhs parseState 2) - ) -# 3144 "..\pars.mly" - : 'opname)); -# 12229 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3147 "..\pars.mly" - MatchPair parseState 1 1; - ident(CompileOpName "*",rhs parseState 1) - ) -# 3147 "..\pars.mly" - : 'opname)); -# 12240 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'barNames)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3152 "..\pars.mly" - let text = ("|"^String.concat "|" (List.rev _2) ^ "|") in - ident(text,rhs2 parseState 2 3) - ) -# 3152 "..\pars.mly" - : 'opname)); -# 12252 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'barNames)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3156 "..\pars.mly" - let text = ("|"^String.concat "|" (List.rev _2) ^ "|_|" ) in - ident(text,rhs2 parseState 2 5) - ) -# 3156 "..\pars.mly" - : 'opname)); -# 12264 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3160 "..\pars.mly" - _1 - ) -# 3160 "..\pars.mly" - : 'operatorName)); -# 12275 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3161 "..\pars.mly" - _1 - ) -# 3161 "..\pars.mly" - : 'operatorName)); -# 12286 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3162 "..\pars.mly" - _1 - ) -# 3162 "..\pars.mly" - : 'operatorName)); -# 12297 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3163 "..\pars.mly" - _1 - ) -# 3163 "..\pars.mly" - : 'operatorName)); -# 12308 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3164 "..\pars.mly" - _1 - ) -# 3164 "..\pars.mly" - : 'operatorName)); -# 12319 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3165 "..\pars.mly" - _1 - ) -# 3165 "..\pars.mly" - : 'operatorName)); -# 12330 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3166 "..\pars.mly" - _1 - ) -# 3166 "..\pars.mly" - : 'operatorName)); -# 12341 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3167 "..\pars.mly" - _1 - ) -# 3167 "..\pars.mly" - : 'operatorName)); -# 12352 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3168 "..\pars.mly" - "$" - ) -# 3168 "..\pars.mly" - : 'operatorName)); -# 12362 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3169 "..\pars.mly" - _1 - ) -# 3169 "..\pars.mly" - : 'operatorName)); -# 12373 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3170 "..\pars.mly" - "-" - ) -# 3170 "..\pars.mly" - : 'operatorName)); -# 12383 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3171 "..\pars.mly" - "*" - ) -# 3171 "..\pars.mly" - : 'operatorName)); -# 12393 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3172 "..\pars.mly" - "=" - ) -# 3172 "..\pars.mly" - : 'operatorName)); -# 12403 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3173 "..\pars.mly" - "or" - ) -# 3173 "..\pars.mly" - : 'operatorName)); -# 12413 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3174 "..\pars.mly" - "<" - ) -# 3174 "..\pars.mly" - : 'operatorName)); -# 12423 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3175 "..\pars.mly" - ">" - ) -# 3175 "..\pars.mly" - : 'operatorName)); -# 12433 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3176 "..\pars.mly" - "?" - ) -# 3176 "..\pars.mly" - : 'operatorName)); -# 12443 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3177 "..\pars.mly" - "&" - ) -# 3177 "..\pars.mly" - : 'operatorName)); -# 12453 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3178 "..\pars.mly" - "&&" - ) -# 3178 "..\pars.mly" - : 'operatorName)); -# 12463 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3179 "..\pars.mly" - "||" - ) -# 3179 "..\pars.mly" - : 'operatorName)); -# 12473 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3180 "..\pars.mly" - ":=" - ) -# 3180 "..\pars.mly" - : 'operatorName)); -# 12483 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3182 "..\pars.mly" - if _1 <> ".[]" then - deprecatedOperator (lhs(parseState)); - _1 - ) -# 3182 "..\pars.mly" - : 'operatorName)); -# 12496 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3185 "..\pars.mly" - _1 - ) -# 3185 "..\pars.mly" - : 'operatorName)); -# 12507 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3186 "..\pars.mly" - _1 - ) -# 3186 "..\pars.mly" - : 'operatorName)); -# 12518 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3187 "..\pars.mly" - (* deprecatedOperator (lhs(parseState)); *) ".." - ) -# 3187 "..\pars.mly" - : 'operatorName)); -# 12528 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3188 "..\pars.mly" - (* deprecatedOperator (lhs(parseState)); *) ".. .." - ) -# 3188 "..\pars.mly" - : 'operatorName)); -# 12538 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string * bool)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string * bool)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3190 "..\pars.mly" - if _1 <> _2 then reportParseErrorAt (rhs parseState 1) ("mismatched quotation operator name, beginning with '"^fst _1^"'"); - fst _1 - ) -# 3190 "..\pars.mly" - : 'operatorName)); -# 12551 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3195 "..\pars.mly" - if not (String.isUpper _1) then reportParseErrorAt (rhs parseState 1) ("active pattern case identifiers must begin with an uppercase letter"); - _1 - ) -# 3195 "..\pars.mly" - : 'barName)); -# 12563 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'barName)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3200 "..\pars.mly" - [_2] - ) -# 3200 "..\pars.mly" - : 'barNames)); -# 12574 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'barNames)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'barName)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3202 "..\pars.mly" - _3 :: _1 - ) -# 3202 "..\pars.mly" - : 'barNames)); -# 12586 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3206 "..\pars.mly" - _1 - ) -# 3206 "..\pars.mly" - : 'identop)); -# 12597 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opname)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3208 "..\pars.mly" - _1 - ) -# 3208 "..\pars.mly" - : 'identop)); -# 12608 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3213 "..\pars.mly" - [_1] - ) -# 3213 "..\pars.mly" - : 'pathop)); -# 12619 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'opname)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3215 "..\pars.mly" - [_1] - ) -# 3215 "..\pars.mly" - : 'pathop)); -# 12630 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'pathop)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3217 "..\pars.mly" - _1 :: _3 - ) -# 3217 "..\pars.mly" - : 'pathop)); -# 12642 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Ast.ident)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3219 "..\pars.mly" - (* silent recovery *) [_1] - ) -# 3219 "..\pars.mly" - : 'pathop)); -# 12653 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'identop)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3224 "..\pars.mly" - _1 - ) -# 3224 "..\pars.mly" - : 'nameop)); -# 12664 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3227 "..\pars.mly" - - ) -# 3227 "..\pars.mly" - : 'top_sep)); -# 12674 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3228 "..\pars.mly" - - ) -# 3228 "..\pars.mly" - : 'top_sep)); -# 12684 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3229 "..\pars.mly" - - ) -# 3229 "..\pars.mly" - : 'top_sep)); -# 12694 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'top_sep)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3232 "..\pars.mly" - - ) -# 3232 "..\pars.mly" - : 'top_seps)); -# 12705 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'top_sep)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'top_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3233 "..\pars.mly" - - ) -# 3233 "..\pars.mly" - : 'top_seps)); -# 12717 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3236 "..\pars.mly" - - ) -# 3236 "..\pars.mly" - : 'itop_sep)); -# 12727 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3237 "..\pars.mly" - - ) -# 3237 "..\pars.mly" - : 'itop_sep)); -# 12737 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'itop_sep)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3240 "..\pars.mly" - - ) -# 3240 "..\pars.mly" - : 'itop_seps)); -# 12748 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'itop_sep)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'itop_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3241 "..\pars.mly" - - ) -# 3241 "..\pars.mly" - : 'itop_seps)); -# 12760 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'itop_sep)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_itop_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3244 "..\pars.mly" - - ) -# 3244 "..\pars.mly" - : 'opt_itop_seps)); -# 12772 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3245 "..\pars.mly" - - ) -# 3245 "..\pars.mly" - : 'opt_itop_seps)); -# 12782 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'top_sep)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'opt_top_seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3248 "..\pars.mly" - - ) -# 3248 "..\pars.mly" - : 'opt_top_seps)); -# 12794 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3249 "..\pars.mly" - - ) -# 3249 "..\pars.mly" - : 'opt_top_seps)); -# 12804 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3252 "..\pars.mly" - - ) -# 3252 "..\pars.mly" - : 'seps)); -# 12814 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3253 "..\pars.mly" - - ) -# 3253 "..\pars.mly" - : 'seps)); -# 12824 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3254 "..\pars.mly" - - ) -# 3254 "..\pars.mly" - : 'seps)); -# 12834 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3255 "..\pars.mly" - - ) -# 3255 "..\pars.mly" - : 'seps)); -# 12844 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3260 "..\pars.mly" - - ) -# 3260 "..\pars.mly" - : 'decl_end)); -# 12854 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3262 "..\pars.mly" - (* reportParseWarningAt (rhs parseState 2) "this 'end' token is not needed in #light syntax and should be omitted. A future release of the language may require this"; *) - ) -# 3262 "..\pars.mly" - : 'decl_end)); -# 12864 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3264 "..\pars.mly" - ) -# 3264 "..\pars.mly" - : 'decl_end)); -# 12873 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3269 "..\pars.mly" - ) -# 3269 "..\pars.mly" - : 'opt_decl_end)); -# 12882 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3271 "..\pars.mly" - (* reportParseWarningAt (rhs parseState 2) "this 'end' token is not needed in #light syntax and should be omitted. A future release of the language may require this"; *) - ) -# 3271 "..\pars.mly" - : 'opt_decl_end)); -# 12892 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3273 "..\pars.mly" - ) -# 3273 "..\pars.mly" - : 'opt_decl_end)); -# 12901 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3275 "..\pars.mly" - ) -# 3275 "..\pars.mly" - : 'opt_decl_end)); -# 12910 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3278 "..\pars.mly" - - ) -# 3278 "..\pars.mly" - : 'opt_ODECLEND)); -# 12920 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3279 "..\pars.mly" - - ) -# 3279 "..\pars.mly" - : 'opt_ODECLEND)); -# 12930 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3282 "..\pars.mly" - deprecatedWithError "No '=' symbol should follow a 'namespace' declaration" (lhs(parseState)) - ) -# 3282 "..\pars.mly" - : 'deprecated_opt_equals)); -# 12940 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3283 "..\pars.mly" - - ) -# 3283 "..\pars.mly" - : 'deprecated_opt_equals)); -# 12950 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3286 "..\pars.mly" - - ) -# 3286 "..\pars.mly" - : 'opt_OBLOCKSEP)); -# 12960 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3287 "..\pars.mly" - - ) -# 3287 "..\pars.mly" - : 'opt_OBLOCKSEP)); -# 12970 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'seps)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3290 "..\pars.mly" - - ) -# 3290 "..\pars.mly" - : 'opt_seps)); -# 12981 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3291 "..\pars.mly" - - ) -# 3291 "..\pars.mly" - : 'opt_seps)); -# 12991 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3294 "..\pars.mly" - true - ) -# 3294 "..\pars.mly" - : 'opt_rec)); -# 13001 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3295 "..\pars.mly" - false - ) -# 3295 "..\pars.mly" - : 'opt_rec)); -# 13011 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3298 "..\pars.mly" - - ) -# 3298 "..\pars.mly" - : 'opt_bar)); -# 13021 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3299 "..\pars.mly" - - ) -# 3299 "..\pars.mly" - : 'opt_bar)); -# 13031 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3302 "..\pars.mly" - true - ) -# 3302 "..\pars.mly" - : 'opt_inline)); -# 13041 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3303 "..\pars.mly" - false - ) -# 3303 "..\pars.mly" - : 'opt_inline)); -# 13051 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3306 "..\pars.mly" - true - ) -# 3306 "..\pars.mly" - : 'opt_mutable)); -# 13061 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3307 "..\pars.mly" - false - ) -# 3307 "..\pars.mly" - : 'opt_mutable)); -# 13071 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3310 "..\pars.mly" - - ) -# 3310 "..\pars.mly" - : 'do_or_odo)); -# 13081 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3311 "..\pars.mly" - - ) -# 3311 "..\pars.mly" - : 'do_or_odo)); -# 13091 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3314 "..\pars.mly" - - ) -# 3314 "..\pars.mly" - : 'done_term)); -# 13101 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3315 "..\pars.mly" - - ) -# 3315 "..\pars.mly" - : 'done_term)); -# 13111 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3318 "..\pars.mly" - ocamlCompatWarning "The syntax 'module ... = struct .. end' is deprecated unless OCaml compatibility is enabled. Consider using 'module ... = begin .. end'" (lhs(parseState)); - ) -# 3318 "..\pars.mly" - : 'structOrBegin)); -# 13121 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3319 "..\pars.mly" - - ) -# 3319 "..\pars.mly" - : 'structOrBegin)); -# 13131 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3322 "..\pars.mly" - ocamlCompatWarning "The syntax 'module ... : sig .. end' is deprecated unless OCaml compatibility is enabled. Consider using 'module ... = begin .. end'" (lhs(parseState)); - ) -# 3322 "..\pars.mly" - : 'sigOrBegin)); -# 13141 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3323 "..\pars.mly" - - ) -# 3323 "..\pars.mly" - : 'sigOrBegin)); -# 13151 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3326 "..\pars.mly" - ocamlCompatWarning "The syntax 'module ... : sig .. end' is deprecated unless OCaml compatibility is enabled. Consider using 'module ... = begin .. end'" (lhs(parseState)); - ) -# 3326 "..\pars.mly" - : 'colonOrEquals)); -# 13161 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3327 "..\pars.mly" - - ) -# 3327 "..\pars.mly" - : 'colonOrEquals)); -# 13171 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3330 "..\pars.mly" - ) -# 3330 "..\pars.mly" - : 'opt_HASH)); -# 13180 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3333 "..\pars.mly" - - ) -# 3333 "..\pars.mly" - : 'opt_HIGH_PRECEDENCE_APP)); -# 13190 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3334 "..\pars.mly" - - ) -# 3334 "..\pars.mly" - : 'opt_HIGH_PRECEDENCE_APP)); -# 13200 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3337 "..\pars.mly" - - ) -# 3337 "..\pars.mly" - : 'opt_HIGH_PRECEDENCE_TYAPP)); -# 13210 "pars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 3338 "..\pars.mly" - - ) -# 3338 "..\pars.mly" - : 'opt_HIGH_PRECEDENCE_TYAPP)); -|] -# 13221 "pars.fs" -let tables () : Internal.Utilities.Text.Parsing.Tables<_> = - { reductions= _fsyacc_reductions (); - endOfInputTag = _fsyacc_endOfInputTag; - tagOfToken = tagOfToken; - dataOfToken = _fsyacc_dataOfToken; - actionTableElements = _fsyacc_actionTableElements; - actionTableRowOffsets = _fsyacc_actionTableRowOffsets; - stateToProdIdxsTableElements = _fsyacc_stateToProdIdxsTableElements; - stateToProdIdxsTableRowOffsets = _fsyacc_stateToProdIdxsTableRowOffsets; - reductionSymbolCounts = _fsyacc_reductionSymbolCounts; - immediateActions = _fsyacc_immediateActions; - gotos = _fsyacc_gotos; - sparseGotoTableRowOffsets = _fsyacc_sparseGotoTableRowOffsets; - tagOfErrorTerminal = _fsyacc_tagOfErrorTerminal; - parseError = (fun (ctxt:Internal.Utilities.Text.Parsing.ParseErrorContext<_>) -> - match parse_error_rich with - | Some f -> f ctxt - | None -> parse_error ctxt.Message); - numTerminals = 183; - productionToNonTerminalTable = _fsyacc_productionToNonTerminalTable } -let engine lexer lexbuf startState = (tables ()).Interpret(lexer, lexbuf, startState) -let signatureFile lexer lexbuf : Ast.ParsedSigFile = - Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, 0)) -let implementationFile lexer lexbuf : Ast.ParsedImplFile = - Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, 2)) -let interaction lexer lexbuf : Ast.interaction = - Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, 4)) diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/FSharp.Core.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/FSharp.Core.fsproj deleted file mode 100644 index 6a5872f2..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/FSharp.Core.fsproj +++ /dev/null @@ -1,182 +0,0 @@ - - - - ..\.. - - - - - Debug - AnyCPU - {DED3BBD7-53F4-428A-8C9F-27968E768605} - Library - FSharp.Core - RUNTIME;$(DefineConstants) - 9;35;40;44;51;57;58;60;62;65;76;77;56 - 0x05000000 - true - true - v2.0 - $(OtherFlags) --compiling-fslib --optimize --maxerrors:20 --extraoptimizationloops:1 - - - $(OtherFlags) --generatehtml --htmloutputdir:..\..\..\src\WWW\microsoft.com\projects\fsharp\manual --htmlnamespacefile:namespaces.html - - - - false - - - prim-types.fsi - - - prim-types.fs - - - local.fsi - - - local.fs - - - array2.fsi - - - array2.fs - - - option.fsi - - - option.fs - - - collections.fsi - - - collections.fs - - - seq.fsi - - - seq.fs - - - string.fsi - - - string.fs - - - list.fsi - - - list.fs - - - array.fsi - - - array.fs - - - array3.fsi - - - array3.fs - - - map.fsi - - - map.fs - - - set.fsi - - - set.fs - - - reflect.fsi - - - reflect.fs - - - event.fsi - - - event.fs - - - n.fsi - - - n.fs - - - z.fsi - - - z.fs - - - sformat.fsi - - - sformat.fs - - - printf.fsi - - - printf.fs - - - quotations.fsi - - - quotations.fs - - - nativeptr.fsi - - - nativeptr.fs - - - control.fsi - - - control.fs - - - fslib-extra-pervasives.fsi - - - fslib-extra-pervasives.fs - - - assemblyinfo.FSharp.Core.dll.fs - - - - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array.fs deleted file mode 100644 index 6117a9cb..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array.fs +++ /dev/null @@ -1,754 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open System.Diagnostics - open System.Collections.Generic - open System.Diagnostics.CodeAnalysis - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Primitives.Basics - - /// Basic operations on arrays - [] - [] - module Array = - - [] - let length (array: array<_>) = array.Length - - [] - let init n f = Microsoft.FSharp.Primitives.Basics.Array.init n f - - [] - let zeroCreate n = Microsoft.FSharp.Primitives.Basics.Array.zeroCreate n - - [] - let create (n:int) (x:'T) = - let array = (zeroCreate n : array<'T>) - for i = 0 to n - 1 do - array.[i] <- x - array - - - [] - let isEmpty (array: array<'T>) = (array.Length = 0) - - [] - let empty<'T> = ([| |] : 'T []) - - [] - let blit (array1 : array<'T>) sourceIndex (array2: array<'T>) targetIndex count = - if sourceIndex < 0 then invalidArg "sourceIndex" "index must be positive" - if count < 0 then invalidArg "count" "length must be positive" - if targetIndex < 0 then invalidArg "targetIndex" "index must be positive" - if sourceIndex + count > array1.Length then invalidArg "sourceIndex" "out of range" - if targetIndex + count > array2.Length then invalidArg "targetIndex" "out of range" - for i = 0 to count - 1 do - array2.[targetIndex+i] <- array1.[sourceIndex + i] - - let rec concatAddLengths (arrs:array<'T> array) i acc = - if i >= arrs.Length then acc - else concatAddLengths arrs (i+1) (acc + arrs.[i].Length) - - let rec concatBlit (arrs:array>) i j (tgt:array<'T>) = - if i < arrs.Length then - let h = arrs.[i] - let len = h.Length in - for i = 0 to len - 1 do - tgt.[j+i] <- h.[i] - concatBlit arrs (i+1) (j+len) tgt - - [] - let concatArrays (arrs : array>) = - let res = zeroCreate (concatAddLengths arrs 0 0) - concatBlit arrs 0 0 res ; - res - - [] - let concat (arrs: seq>) = - let arrs = Seq.to_array arrs in - concatArrays arrs - - [] - let collect (f : 'T -> array<'U>) (input : array<'T>) : array<'U>= - let inputLength = input.Length - let result = Array.zeroCreate> inputLength - for i = 0 to inputLength - 1 do - result.[i] <- f input.[i] - concatArrays result - - [] - let append (array1:array<'T>) (array2:array<'T>) = - let n1 = array1.Length - let n2 = array2.Length - let res = zeroCreate (n1 + n2) - for i = 0 to n1 - 1 do - res.[i] <- array1.[i] - for i = 0 to n2 - 1 do - res.[i+n1] <- array2.[i] - res - - [] - let copy (array: array<'T>) = - let len = array.Length - let res = zeroCreate len - for i = 0 to len - 1 do - res.[i] <- array.[i] - res - - [] - let to_list array = Microsoft.FSharp.Primitives.Basics.List.of_array array - - [] - let of_list xs = Microsoft.FSharp.Primitives.Basics.List.to_array xs - - [] - let iter f (array: array<'T>) = - let len = array.Length - for i = 0 to len - 1 do - f array.[i] - - [] - let map (f: 'T -> 'U) (array:array<'T>) = - let len = array.Length - let res = (zeroCreate len : array<'U>) - for i = 0 to len - 1 do - res.[i] <- f array.[i] - res - - [] - let iter2 f (array1: array<'T>) (array2: array<'U>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths"; - for i = 0 to len1 - 1 do - f.Invoke(array1.[i], array2.[i]) - - [] - let map2 f (array1: array<'T>) (array2: array<'U>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths"; - let res = zeroCreate len1 - for i = 0 to len1 - 1 do - res.[i] <- f.Invoke(array1.[i], array2.[i]) - res - - [] - let mapi2 f (array1: array<'T>) (array2: array<'U>) = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths"; - let res = zeroCreate len1 - for i = 0 to len1 - 1 do - res.[i] <- f.Invoke(i,array1.[i], array2.[i]) - res - - [] - let iteri f (array:array<'T>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len = array.Length - for i = 0 to len - 1 do - f.Invoke(i, array.[i]) - - [] - let iteri2 f (array1: array<'T>) (array2: array<'U>) = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths"; - for i = 0 to len1 - 1 do - f.Invoke(i,array1.[i], array2.[i]) - - [] - let mapi (f : int -> 'T -> 'U) (array: array<'T>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len = array.Length - let res = zeroCreate<'U> len - for i = 0 to len - 1 do - res.[i] <- f.Invoke(i,array.[i]) - res - - [] - let exists (f: 'T -> bool) (array:array<'T>) = - let len = array.Length - let rec loop i = i < len && (f array.[i] || loop (i+1)) - loop 0 - - [] - let exists2 f (array1: array<_>) (array2: array<_>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths" - let rec loop i = i < len1 && (f.Invoke(array1.[i], array2.[i]) || loop (i+1)) - loop 0 - - [] - let forall (f: 'T -> bool) (array:array<'T>) = - let len = array.Length - let rec loop i = i >= len || (f array.[i] && loop (i+1)) - loop 0 - - [] - let forall2 f (array1: array<_>) (array2: array<_>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths" - let rec loop i = i >= len1 || (f.Invoke(array1.[i], array2.[i]) && loop (i+1)) - loop 0 - - [] - let pick f (array: array<_>) = - let rec loop i = - if i >= array.Length then raise (System.Collections.Generic.KeyNotFoundException()) else - match f array.[i] with - | None -> loop(i+1) - | Some res -> res - loop 0 - - [] - let tryPick f (array: array<_>) = - let rec loop i = - if i >= array.Length then None else - match f array.[i] with - | None -> loop(i+1) - | res -> res - loop 0 - - [] - let choose f (array: array<_>) = - let res = new System.Collections.Generic.List<_>() // ResizeArray - for i = 0 to array.Length - 1 do - match f array.[i] with - | None -> () - | Some b -> res.Add(b) - res.ToArray() - - [] - let filter f (array: array<_>) = - let res = new System.Collections.Generic.List<_>() // ResizeArray - for i = 0 to array.Length - 1 do - let x = array.[i] - if f x then res.Add(x) - res.ToArray() - - [] - let partition f (array: array<_>) = - let res1 = new System.Collections.Generic.List<_>() // ResizeArray - let res2 = new System.Collections.Generic.List<_>() // ResizeArray - for i = 0 to array.Length - 1 do - let x = array.[i] - if f x then res1.Add(x) else res2.Add(x) - res1.ToArray(), res2.ToArray() - - [] - let find f (array: array<_>) = - let rec loop i = - if i >= array.Length then raise (System.Collections.Generic.KeyNotFoundException()) else - if f array.[i] then array.[i] else loop (i+1) - loop 0 - - [] - let tryFind f (array: array<_>) = - let rec loop i = - if i >= array.Length then None else - if f array.[i] then Some array.[i] else loop (i+1) - loop 0 - - [] - let zip (array1: array<_>) (array2: array<_>) = - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths" - let res = zeroCreate len1 - for i = 0 to len1 - 1 do - res.[i] <- (array1.[i],array2.[i]) - res - - [] - let zip3 (array1: array<_>) (array2: array<_>) (array3: array<_>) = - let len1 = array1.Length - if len1 <> array2.Length then invalidArg "array2" "the arrays have different lengths" - if len1 <> array3.Length then invalidArg "array3" "the arrays have different lengths" - let res = zeroCreate len1 - for i = 0 to len1 - 1 do - res.[i] <- (array1.[i],array2.[i],array3.[i]) - res - - [] - let unzip (array: array<_>) = - let len = array.Length - let res1 = zeroCreate len - let res2 = zeroCreate len - for i = 0 to len - 1 do - let x,y = array.[i] - res1.[i] <- x; - res2.[i] <- y; - res1,res2 - - [] - let unzip3 (array: array<_>) = - let len = array.Length - let res1 = zeroCreate len - let res2 = zeroCreate len - let res3 = zeroCreate len - for i = 0 to len - 1 do - let x,y,z = array.[i] - res1.[i] <- x; - res2.[i] <- y; - res3.[i] <- z; - res1,res2,res3 - - [] - let rev (array: array<_>) = - let len = array.Length - let res = zeroCreate len - for i = 0 to len - 1 do - res.[(len - i) - 1] <- array.[i] - res - - [] - let fold (f : 'T -> 'U -> 'T) (acc: 'T) (array:array<'U>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable state = acc - let len = array.Length - for i = 0 to len - 1 do - state <- f.Invoke(state,array.[i]) - state - - [] - let foldBack (f : 'T -> 'U -> 'U) (array:array<'T>) (acc: 'U) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable res = acc - let len = array.Length - for i = len - 1 downto 0 do - res <- f.Invoke(array.[i],res) - res - - - [] - let foldBack2 f (array1:'T1[]) (array2:'T2 []) (acc: 'U) = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let mutable res = acc - let len = array1.Length - if len <> array2.Length then invalidArg "array2" "the arrays have different lengths" - for i = len - 1 downto 0 do - res <- f.Invoke(array1.[i],array2.[i],res) - res - - [] - let fold2 f (acc: 'T) (array1:'T1[]) (array2:'T2 []) = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let mutable state = acc - let len = array1.Length - if len <> array2.Length then invalidArg "array2" "the arrays have different lengths" - for i = 0 to len - 1 do - state <- f.Invoke(state,array1.[i],array2.[i]) - state - - - [] - let foldSubLeft f acc (array : array<_>) start fin = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable res = acc - for i = start to fin do - res <- f.Invoke(res,array.[i]) - res - - [] - let foldSubRight f (array : array<_>) start fin acc = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable res = acc - for i = fin downto start do - res <- f.Invoke(array.[i],res) - res - - [] - let scanSubRight f (array : array<_>) start fin initState = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable state = initState - let res = create (2+fin-start) initState - for i = fin downto start do - state <- f.Invoke(array.[i],state); - res.[i - start] <- state - res - - [] - let scanSubLeft f initState (array : array<_>) start fin = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let mutable state = initState - let res = create (2+fin-start) initState - for i = start to fin do - state <- f.Invoke(state,array.[i]); - res.[i - start+1] <- state - res - - [] - let scan f acc (array : array<_>) = - let arrn = array.Length - scanSubLeft f acc array 0 (arrn - 1) - - [] - let scanBack f (array : array<_>) acc = - let arrn = array.Length - scanSubRight f array 0 (arrn - 1) acc - - [] - let reduce f (array : array<_>) = - let arrn = array.Length - if arrn = 0 then invalidArg "array" "the input array may not be empty" - else foldSubLeft f array.[0] array 1 (arrn - 1) - - [] - let reduceBack f (array : array<_>) = - let arrn = array.Length - if arrn = 0 then invalidArg "array" "the input array may not be empty" - else foldSubRight f array 0 (arrn - 2) array.[arrn - 1] - - [] - let sortInPlaceWith f (array : array<'T>) = - let len = array.Length - if len < 2 then () - elif len = 2 then - let c = f array.[0] array.[1] - if c > 0 then - let tmp = array.[0] - array.[0] <- array.[1]; - array.[1] <- tmp - else - System.Array.Sort(array, ComparisonIdentity.FromFunction(f)) - - [] - let sortInPlaceBy (f: 'T -> 'U) (array : array<'T>) = - let len = array.Length - if len < 2 then () - elif len = 2 then - let c = Operators.compare (f array.[0]) (f array.[1]) - if c > 0 then - let tmp = array.[0] - array.[0] <- array.[1]; - array.[1] <- tmp - else - System.Array.Sort(array, ComparisonIdentity.FromFunction(fun x y -> Operators.compare (f x) (f y))) - - [] - let sortWith (f: 'T -> 'T -> int) (array : array<'T>) = - let array = copy array - sortInPlaceWith f array; - array - - [] - let sortBy f array = - let array = copy array - sortInPlaceBy f array; - array - - [] - let sort array = - sortWith Operators.compare array - - [] - let sortInPlace array = - sortInPlaceWith Operators.compare array - - [] - let to_seq a = Seq.of_array a - - [] - let of_seq ie = Seq.to_array ie - - [] - let findIndex f (array : array<_>) = - let len = array.Length - let rec go n = if n >= len then raise (System.Collections.Generic.KeyNotFoundException()) elif f array.[n] then n else go (n+1) - go 0 - - [] - let tryFindIndex f (array : array<_>) = - let len = array.Length - let rec go n = if n >= len then None elif f array.[n] then Some n else go (n+1) - go 0 - - [] - let permute p (array : array<_>) = Microsoft.FSharp.Primitives.Basics.Array.permute p array - - [] - let inline sum (array:array< (^T) >) : ^T = - let mutable acc = LanguagePrimitives.GenericZero< (^T) > - for i = 0 to array.Length - 1 do - acc <- Checked.(+) acc array.[i] - acc - - [] - let inline sumBy (f: 'T -> ^U) (array:array<'T>) : ^U = - let mutable acc = LanguagePrimitives.GenericZero< (^U) > - for i = 0 to array.Length - 1 do - acc <- Checked.(+) acc (f array.[i]) - acc - - [] - let min (array:array<_>) = - if array.Length = 0 then invalidArg "array" "the array is empty" - let mutable acc = array.[0] - for i = 1 to array.Length - 1 do - acc <- Operators.min acc array.[i] - acc - - [] - let minBy f (array:array<_>) = - if array.Length = 0 then invalidArg "array" "the array is empty" - let mutable acc = f array.[0] - let mutable acc_v = array.[0] - for i = 1 to array.Length - 1 do - let cur = f array.[i] - if cur < acc then - acc <- cur - acc_v <- array.[i] - acc_v - - [] - let max (array:array<_>) = - if array.Length = 0 then invalidArg "array" "the array is empty" - let mutable acc = array.[0] - for i = 1 to array.Length - 1 do - acc <- Operators.max acc array.[i] - acc - - [] - let maxBy f (array:array<_>) = - if array.Length = 0 then invalidArg "array" "the array is empty" - let mutable acc = f array.[0] - let mutable acc_v = array.[0] - for i = 1 to array.Length - 1 do - let cur = f array.[i] - if cur > acc then - acc <- cur - acc_v <- array.[i] - acc_v - - [] - let inline average (array:array<_>) = Seq.average array - - [] - let inline averageBy f (array:array<_>) = Seq.averageBy f array - - [] - let sub (array:array<'T>) (startIndex:int) (count:int) = - if startIndex < 0 then invalidArg "startIndex" "index must be positive" - if count < 0 then invalidArg "count" "length must be positive" - if startIndex + count > array.Length then invalidArg "count" "out of range" - - let res = (zeroCreate count : array<'T>) - for i = 0 to count - 1 do - res.[i] <- array.[startIndex + i] - res - - - [] - let is_empty array = isEmpty array - - [] - let get (array:array<_>) n = array.[n] - - [] - let set (array:array<_>) n v = array.[n] <- v - - [] - let zero_create n = Array.zeroCreate n - - [] - let fill (array:array<'T>) (startIndex:int) (count:int) (x:'T) = - if startIndex < 0 then invalidArg "startIndex" "index must be positive" - if count < 0 then invalidArg "count" "length must be positive" - for i = startIndex to startIndex + count - 1 do - array.[i] <- x - - [] - let fold_left f z array = fold f z array - - [] - let fold_right f array z = foldBack f array z - - [] - let fold_left2 f z array1 array2 = fold2 f z array1 array2 - - [] - let fold_right2 f array1 array2 z = foldBack2 f array1 array2 z - - [] - let reduce_left f array = reduce f array - - [] - let reduce_right f array = reduceBack f array - - [] - let scan_left f z array = scan f z array - - [] - let scan_right f array z = scanBack f array z - - [] - let for_all f array = forall f array - - [] - let for_all2 f array1 array2 = forall2 f array1 array2 - - [] - let tryfind f array = tryFind f array - - [] - let find_index f array = findIndex f array - - [] - let tryfind_index f array = tryFindIndex f array - - [] - let first f array = tryPick f array - -(* - [] - let sort f array = sortInPlaceWith f array -*) - - [] - let sort_by f array = sortInPlaceBy f array - - [] - let inline sum_by f array = sumBy f array - - [] - let inline average_by f array = averageBy f array - - [] - let min_by f array = minBy f array - - [] - let max_by f array = maxBy f array - - [] - let find_indexi f (array : array<_>) = - let len = array.Length - let rec go n = if n >= len then raise (System.Collections.Generic.KeyNotFoundException()) elif f n array.[n] then n else go (n+1) - go 0 - - [] - let tryfind_indexi f (array : array<_>) = - let len = array.Length - let rec go n = if n >= len then None elif f n array.[n] then Some n else go (n+1) - go 0 - - - [] - let split array = unzip array - - [] - let combine array1 array2 = zip array1 array2 - - [] - let make (n:int) (x:'T) = create n x - -#if FX_ATLEAST_40 - module Parallel = - open System.Threading - - [] - let choose f (c: array<'T>) = - let inputLength = c.Length - let lastInputIndex = inputLength - 1 - - let isChosen = zeroCreate inputLength - let results = zeroCreate<'U> inputLength - - Parallel.For(0, inputLength, (fun i -> - match f c.[i] with - | None -> () - | Some v -> - isChosen.[i] <- true; - results.[i] <- v - )) |> ignore - - let mutable outputLength = 0 - for i = 0 to lastInputIndex do - if isChosen.[i] then - outputLength <- outputLength + 1 - - let output = zeroCreate<'U> outputLength - let mutable curr = 0 - for i = 0 to lastInputIndex do - if isChosen.[i] then - output.[curr] <- results.[i] - curr <- curr + 1 - output - - [] - let collect (f : 'T -> array<'U>) (input : array<'T>) : array<'U>= - let inputLength = input.Length - let result = zeroCreate> inputLength - Parallel.For(0, inputLength, - (fun i -> result.[i] <- f input.[i])) |> ignore - concatArrays result - - [] - let map (f: 'T -> 'U) (input : array<'T>) : array<'U>= - let inputLength = input.Length - let result = zeroCreate<'U> inputLength - Parallel.For(0, inputLength, fun i -> - result.[i] <- f input.[i]) |> ignore - result - - [] - let mapi f (input: array<'T>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let inputLength = input.Length - let result = zeroCreate inputLength - Parallel.For(0, inputLength, fun i -> - result.[i] <- f.Invoke (i, input.[i])) |> ignore - result - - [] - let iter f (input : array<'T>) = - Parallel.For (0, input.Length, fun i -> f input.[i]) |> ignore - - [] - let iteri f (input : array<'T>) = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - Parallel.For (0, input.Length, fun i -> f.Invoke(i, input.[i])) |> ignore - - [] - let init count f = - let result = zeroCreate count - Parallel.For (0, count, fun i -> result.[i] <- f i) |> ignore - result - - [] - let partition predicate (array : array<'T>) = - let inputLength = array.Length - let lastInputIndex = inputLength - 1 - - let isTrue = zeroCreate inputLength - Parallel.For(0, inputLength, - fun i -> isTrue.[i] <- predicate array.[i] - ) |> ignore - - let mutable trueLength = 0 - for i in 0 .. lastInputIndex do - if isTrue.[i] then trueLength <- trueLength + 1 - - let trueResult = zeroCreate<'T> trueLength - let falseResult = zeroCreate<'T> (inputLength - trueLength) - let mutable iTrue = 0 - let mutable iFalse = 0 - for i = 0 to lastInputIndex do - if isTrue.[i] then - trueResult.[iTrue] <- array.[i] - iTrue <- iTrue + 1 - else - falseResult.[iFalse] <- array.[i] - iFalse <- iFalse + 1 - - (trueResult, falseResult) -#endif \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array.fsi deleted file mode 100644 index 9381fdd9..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array.fsi +++ /dev/null @@ -1,463 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - open System.Collections.Generic - - /// Basic operations on arrays - [] - [] - module Array = - - /// Build a new array that contains the elements of the first array followed by the elements of the second array - val append: array1:array<'T> -> array2:array<'T> -> array<'T> - - /// Return the average of the elements in the array. If the array is empty an ArgumentException is thrown. - val inline average : array:^T array -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member DivideByInt : ^T*int -> ^T) - and ^T : (static member Zero : ^T) - - - /// Return the average of the elements generated by applying the function to each element of the array. - /// If the array is empty an ArgumentException is thrown. - val inline averageBy : projection:('T -> ^U) -> array:array<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U*int -> ^U) - and ^U : (static member Zero : ^U) - - /// Read a range of elements from the first array and write them into the second. - val blit: source:array<'T> -> sourceIndex:int -> target:array<'T> -> targetIndex:int -> count:int -> unit - - /// For each element of the array, apply the given function. Concatenate all the results and return the combined array. - val collect : mapping:('T -> array<'U>) -> array:array<'T> -> array<'U> - - /// Build a new array that contains the elements of each of the given sequence of arrays - val concat: arrays:seq> -> array<'T> - - /// Build a new array that contains the elements of the given array - val copy: array:array<'T> -> array<'T> - - /// Create an array whose elements are all initially the given value. - val create: count:int -> value:'T -> array<'T> - - /// Apply 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:array<'T> -> 'U option - - /// Fill a range of elements of the array with the given value. - val fill: target:array<'T> -> targetIndex:int -> count:int -> value:'T -> unit - - /// Apply 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:array<'T> -> 'U - - /// 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:array<'T> -> 'U array - - /// Return an empty array of the given type - [] - val empty<'T> : array<'T> - - /// Test if any element of the array satisfies the given predicate. - /// - /// The predicate is applied to the elements of the input array. If any application - /// returns true then the overall result is true and no further elements are tested. - /// Otherwise, false is returned. - val exists: predicate:('T -> bool) -> array:array<'T> -> bool - - /// Test if any pair of corresponding elements of the arrays satisfies the given predicate. - /// - /// The predicate is applied to matching elements in the two collections up to the lesser of the - /// two lengths of the collections. If any application returns true then the overall result is - /// true and no further elements are tested. Otherwise, if one collections is longer - /// than the other then the ArgumentException exception is raised. - /// Otherwise, false is returned. - val exists2: predicate:('T1 -> 'T2 -> bool) -> array1:'T1 array -> array2:'T2 array -> bool - - /// Return a new collection containing only the elements of the collection - /// for which the given predicate returns "true" - val filter: predicate:('T -> bool) -> array:array<'T> -> array<'T> - - /// Return the first element for which the given function returns 'true'. - /// Raise KeyNotFoundException if no such element exists. - val find: predicate:('T -> bool) -> array:array<'T> -> 'T - - /// Return 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:array<'T> -> int - - /// Test if all elements of the array satisfy the given predicate. - /// - /// The predicate is applied to the elements of the input collection. If any application - /// returns false then the overall result is false and no further elements are tested. - /// Otherwise, true is returned. - val forall: predicate:('T -> bool) -> array:array<'T> -> bool - - - /// Test if all corresponding elements of the array satisfy the given predicate pairwise. - /// - /// The predicate is applied to matching elements in the two collections up to the lesser of the - /// two lengths of the collections. If any application returns false then the overall result is - /// false and no further elements are tested. Otherwise, if one collection is longer - /// than the other then the ArgumentException exception is raised. - /// Otherwise, true is returned. - val forall2: predicate:('T1 -> 'T2 -> bool) -> array1:'T1 array -> array2:'T2 array -> bool - - /// Apply 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: array<'T> -> 'State - - /// Apply 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:array<'T> -> state:'State -> 'State - - /// Apply 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 array -> array2:'T2 array -> '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 array -> array2:'T2 array -> state:'State -> 'State - - /// Get an element from an array - val get: array:array<'T> -> index:int -> 'T - - /// Create an array given the dimension and a generator function to compute the elements. - val init: count:int -> initializer:(int -> 'T) -> array<'T> - - /// Create an array where the entries are initially the default value Unchecked.defaultof<'T>. - val zeroCreate: count:int -> array<'T> - - /// Return true if the given array is empty, otherwise false - val isEmpty: array:array<'T> -> bool - - /// Apply the given function to each element of the array. - val iter: action:('T -> unit) -> array:array<'T> -> unit - - /// Apply 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 array -> array2:'T2 array -> 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:array<'T> -> unit - - /// Apply 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 array -> array2:'T2 array -> unit - - /// Return the length of an array. You can also use property arr.Length. - val length: array:array<'T> -> int - - /// 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:array<'T> -> 'U array - - /// Build 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 array -> array2:'T2 array -> 'U array - - /// Build 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 array -> array2:'T2 array -> 'U array - - /// 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:array<'T> -> 'U array - - /// Return the greatest of all elements of the array, compared via Operators.max on the function result - val max : array:array<'T> -> 'T - - /// Return the greatest of all elements of the array, compared via Operators.max on the function result - val maxBy : projection:('T -> 'U) -> array:array<'T> -> 'T - - /// Return the lowest of all elements of the array, compared via Operators.min - val min : array:array<'T> -> 'T - - /// Return the lowest of all elements of the array, compared via Operators.min on the function result - val minBy : projection:('T -> 'U) -> array:array<'T> -> 'T - - /// Build an array from the given list - val of_list: elements:'T list -> array<'T> - - /// Build a new array from the given enumerable object - val of_seq: elements:seq<'T> -> array<'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:array<'T> -> array<'T> * array<'T> - - /// Returns an array with all elements permuted according to the - /// specified permutation - val permute : indexMap:(int -> int) -> array:array<'T> -> array<'T> - - /// Apply 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:array<'T> -> 'T - - /// Apply 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:array<'T> -> 'T - - /// Return a new array with the elements in reverse order - val rev: array:array<'T> -> array<'T> - - /// Like fold_left, but return the intermediary and final results - val scan : folder:('State -> 'T -> 'State) -> state:'State -> array:array<'T> -> 'State array - - /// Like fold_right, but return both the intermediary and final results - val scanBack : folder:('T -> 'State -> 'State) -> array:array<'T> -> state:'State -> 'State array - - /// Set an element of an array - val set: array:array<'T> -> index:int -> value:'T -> unit - - /// Build a new array that contains the given subrange specified by - /// starting index and length. - val sub: array:array<'T> -> startIndex:int -> count:int -> array<'T> - - /// Sort the elements of an array, returning a new array. Elements are compared using Operators.compare. - val sort: array:array<'T> -> array<'T> - - /// Sort 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 -> 'U) -> array:array<'T> -> array<'T> - - /// Sort the elements of an array, using the given comparison function as the order, returning a new array - val sortWith: comparer:('T -> 'T -> int) -> array:array<'T> -> array<'T> - - /// Sort 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 -> 'U) -> array:array<'T> -> unit - - - /// Sort 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:array<'T> -> unit - - /// Sort 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:array<'T> -> unit - - /// Return the sum of the elements in the array - val inline sum : array: ^T array -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member Zero : ^T) - - - /// Return the sum of the results generated by applying the function to each element of the array. - val inline sumBy : projection:('T -> ^U) -> array:array<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - /// Build a list from the given array - val to_list: array:array<'T> -> 'T list - - /// View the given array as a sequence - val to_seq: array:array<'T> -> seq<'T> - - /// Return the first element for which the given function returns true. - /// Return None if no such element exists. - val tryFind: predicate:('T -> bool) -> array:array<'T> -> 'T option - - /// Return the index of the first element in the array - /// that satisfies the given predicate. - val tryFindIndex : predicate:('T -> bool) -> array:array<'T> -> int option - - /// Split an array of pairs into two arrays - val unzip: array:('T1 * 'T2) array -> ('T1 array * 'T2 array) - - /// Split an array of triples into three arrays - val unzip3: array:('T1 * 'T2 * 'T3) array -> ('T1 array * 'T2 array * 'T3 array) - - /// Combine the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is - /// raised. - val zip: array1:'T1 array -> array2:'T2 array -> ('T1 * 'T2) array - - /// Combine three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException is - /// raised. - val zip3: array1:'T1 array -> array2:'T2 array -> array3:'T3 array -> ('T1 * 'T2 * 'T3) array - -#if FX_ATLEAST_40 - /// 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). - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val choose: chooser:('T -> 'U option) -> array:'T array -> 'U array - - /// For each element of the array, apply the given function. Concatenate all the results and return the combined array. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val collect : mapping:('T -> array<'U>) -> array:array<'T> -> array<'U> - - /// Build a new array whose elements are the results of applying the given function - /// to each of the elements of the array. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val map : mapping:('T -> 'U) -> array:array<'T> -> array<'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. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val mapi: mapping:(int -> 'T -> 'U) -> array:'T array -> 'U array - - /// Apply the given function to each element of the array. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val iter : action:('T -> unit) -> array:array<'T> -> unit - - /// Apply the given function to each element of the array. The integer passed to the - /// function indicates the index of element. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to elements of the input array is not specified. - val iteri: action:(int -> 'T -> unit) -> array:'T array -> unit - - /// Create an array given the dimension and a generator function to compute the elements. - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to indicies is not specified. - val init : count:int -> initializer:(int -> 'T) -> array<'T> - - /// Split the collection into two collections, containing the - /// elements for which the given predicate returns "true" and "false" - /// respectively - /// - /// Performs the operation in parallel using System.Threading.Parallel.For. - /// The order in which the given function is applied to indicies is not specified. - val partition : predicate:('T -> bool) -> array:array<'T> -> array<'T> * array<'T> -#endif - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val combine: array1:'T1 array -> array2:'T2 array -> ('T1 * 'T2) array - - [] - val split: array:('T1 * 'T2) array -> ('T1 array * 'T2 array) - - [] - val inline average_by : projection:('T -> ^U) -> array:array<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U*int -> ^U) - and ^U : (static member Zero : ^U) - - [] - val find_index: predicate:('T -> bool) -> array:array<'T> -> int - - [] - val for_all: predicate:('T -> bool) -> array:array<'T> -> bool - - [] - val make: count:int -> value:'T -> array<'T> - - [] - val first: chooser:('T -> 'U option) -> array:array<'T> -> 'U option - - [] - val for_all2: predicate:('T1 -> 'T2 -> bool) -> array1:'T1 array -> array2:'T2 array -> bool - - [] - val fold_left: folder:('State -> 'T -> 'State) -> state:'State -> array: array<'T> -> 'State - - /// Apply 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 fold_right: folder:('T -> 'State -> 'State) -> array:array<'T> -> state:'State -> 'State - - /// Apply 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 fold_left2: folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> array1:'T1 array -> array2:'T2 array -> 'State - - [] - val fold_right2: folder:('T1 -> 'T2 -> 'State -> 'State) -> array1:'T1 array -> array2:'T2 array -> state:'State -> 'State - - /// Create an array where the entries are initially the default value Unchecked.defaultof<'T>. - [] - val zero_create: count:int -> array<'T> - - [] - val is_empty: array:array<'T> -> bool - - [] - val max_by : projection:('T -> 'U) -> array:array<'T> -> 'T - - [] - val min_by : projection:('T -> 'U) -> array:array<'T> -> 'T - - [] - val reduce_left: reduction:('T -> 'T -> 'T) -> array:array<'T> -> 'T - - [] - val reduce_right: reduction:('T -> 'T -> 'T) -> array:array<'T> -> 'T - - [] - val scan_left : folder:('State -> 'T -> 'State) -> state:'State -> array:array<'T> -> 'State array - - [] - val scan_right : folder:('T -> 'State -> 'State) -> array:array<'T> -> state:'State -> 'State array - - /// Sort the elements of an array, using the given projection for the keys. Elements are compared using Operators.compare. - [] - val sort_by: projection:('T -> 'U) -> array:array<'T> -> unit - - [] - val inline sum_by : projection:('T -> ^U) -> array:array<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - - [] - val tryfind: predicate:('T -> bool) -> array:array<'T> -> 'T option - - [] - val tryfind_index: predicate:('T -> bool) -> array:array<'T> -> int option - - [] - val tryfind_indexi: predicate:(int -> 'T -> bool) -> array:array<'T> -> int option - - [] - val find_indexi: predicate:(int -> 'T -> bool) -> array:array<'T> -> int - -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array2.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array2.fs deleted file mode 100644 index 596f5b70..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array2.fs +++ /dev/null @@ -1,160 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System.Diagnostics - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Primitives.Basics - - [] - [] - module Array2D = - - // Define the primitive operations. - // Note: the "type" syntax is for the type parameter for inline - // polymorphic IL. This helps the compiler inline these fragments, - // i.e. work out the correspondence between IL and F# type variables. - - [] - let length1 (arr: 'a[,]) = (# "ldlen.multi 2 0" arr : int #) - [] - let length2 (arr: 'a[,]) = (# "ldlen.multi 2 1" arr : int #) - [] - let base1 (arr: 'a[,]) = arr.GetLowerBound(0) - [] - let base2 (arr: 'a[,]) = arr.GetLowerBound(1) - [] - let get (arr: 'a[,]) (n:int) (m:int) = (# "ldelem.multi 2 !0" type ('a) arr n m : 'a #) - [] - let set (arr: 'a[,]) (n:int) (m:int) (x:'a) = (# "stelem.multi 2 !0" type ('a) arr n m x #) - - [] - let zeroCreate (n:int) (m:int) = (# "newarr.multi 2 !0" type ('a) n m : 'a[,] #) - - let zeroCreateBased (b1:int) (b2:int) (n1:int) (n2:int) = - if (b1 = 0 && b2 = 0) then - // Note: this overload is available on Compact Framework and Silverlight - (System.Array.CreateInstance(typeof<'a>, [|n1;n2|]) :?> 'a[,]) - else -#if FX_NO_BASED_ARRAYS - raise (new System.NotSupportedException("arrays with non-zero base may not be created on this platform")) -#else - (System.Array.CreateInstance(typeof<'a>, [|n1;n2|],[|b1;b2|]) :?> 'a[,]) -#endif - - [] - let zero_create_based b1 b2 n1 n2 = zeroCreateBased b1 b2 n1 n2 - - [] - let createBased b1 b2 n m (x:'a) = - let arr = (zeroCreateBased b1 b2 n m : 'a[,]) - for i = b1 to b1+n - 1 do - for j = b2 to b2+m - 1 do - arr.[i,j] <- x - arr - - [] - let initBased b1 b2 n m f = - let arr = (zeroCreateBased b1 b2 n m : 'a[,]) - for i = b1 to b1+n - 1 do - for j = b2 to b2+m - 1 do - arr.[i,j] <- f i j - arr - - - [] - let create n m (x:'a) = - createBased 0 0 n m x - - [] - let init n m f = - initBased 0 0 n m f - - [] - let iter f arr = - let count1 = length1 arr - let count2 = length2 arr - let b1 = base1 arr - let b2 = base2 arr - for i = b1 to b1+count1 - 1 do - for j = b1 to b2+count2 - 1 do - f arr.[i,j] - - [] - let iteri (f : int -> int -> 'a -> unit) (arr:'a[,]) = - let count1 = length1 arr - let count2 = length2 arr - let b1 = base1 arr - let b2 = base2 arr - for i = b1 to b1+count1 - 1 do - for j = b1 to b2+count2 - 1 do - f i j arr.[i,j] - - [] - let map f arr = - initBased (base1 arr) (base2 arr) (length1 arr) (length2 arr) (fun i j -> f arr.[i,j]) - - [] - let mapi f arr = - initBased (base1 arr) (base2 arr) (length1 arr) (length2 arr) (fun i j -> f i j arr.[i,j]) - - [] - let copy arr = - initBased (base1 arr) (base2 arr) (length1 arr) (length2 arr) (fun i j -> arr.[i,j]) - - [] - let rebase arr = - let b1 = base1 arr - let b2 = base2 arr - init (length1 arr) (length2 arr) (fun i j -> arr.[b1+i,b2+j]) - - - [] - let copyTo(source: 'a[,],sourceIndex1,sourceIndex2,target: 'a[,],targetIndex1,targetIndex2,count1,count2) = - if sourceIndex1 < 0 then invalidArg "sourceIndex1" "index must be positive" - if sourceIndex2 < 0 then invalidArg "sourceIndex2" "index must be positive" - if targetIndex1 < 0 then invalidArg "targetIndex1" "index must be positive" - if targetIndex2 < 0 then invalidArg "targetIndex2" "index must be positive" - if sourceIndex1 + count1 > length1 source then invalidArg "count1" "out of range" - if sourceIndex2 + count2 > length2 source then invalidArg "count2" "out of range" - if targetIndex1 + count1 > length1 target then invalidArg "count1" "out of range" - if targetIndex2 + count2 > length2 target then invalidArg "count2" "out of range" - - for i = 0 to count1 - 1 do - for j = 0 to count2 - 1 do - target.[targetIndex1+i,targetIndex2+j] <- source.[sourceIndex1+i,sourceIndex2+j] - - - [] - let zero_create count1 count2 = zeroCreate count1 count2 - - [] - let create_based base1 base2 count1 count2 initial = createBased base1 base2 count1 count2 initial - - [] - let init_based base1 base2 count1 count2 f = initBased base1 base2 count1 count2 f - - [] - let sub (source : 'a[,]) sourceIndex1 sourceIndex2 count1 count2 = - if sourceIndex1 < 0 then invalidArg "sourceIndex1" "index must be positive" - if sourceIndex2 < 0 then invalidArg "sourceIndex2" "index must be positive" - if count1 < 0 then invalidArg "count1" "length must be positive" - if count2 < 0 then invalidArg "count2" "length must be positive" - if sourceIndex1 + count1 > length1 source then invalidArg "count1" "out of range" - if sourceIndex2 + count2 > length2 source then invalidArg "count2" "out of range" - - let res = zeroCreate count1 count2 - for i = 0 to count1 - 1 do - for j = 0 to count2 - 1 do - res.[i,j] <- source.[sourceIndex1 + i,sourceIndex2 + j] - res - - [] - let blit (source : 'a[,]) sourceIndex1 sourceIndex2 target targetIndex1 targetIndex2 count1 count2 = - copyTo(source,sourceIndex1,sourceIndex2,target,targetIndex1,targetIndex2,count1,count2) - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array2.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array2.fsi deleted file mode 100644 index 8e1f3c11..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array2.fsi +++ /dev/null @@ -1,121 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - - [] - [] - /// Basic operations on 2-dimensional arrays. - /// - /// F# and .NET multi-dimensional arrays are typically zero-based. - /// However, .NET multi-dimensional arrays used in conjunction with external - /// libraries (e.g. libraries associated with Visual Basic) be - /// non-zero based, using a potentially different base for each dimension. - /// The operations in this module will accept such arrays, and - /// the basing on an input array will be propogated to a matching output - /// array on the Array2D.map and Array2D.mapi operations. - /// Non-zero-based arrays can also be created using Array2D.zero_create_based, - /// Array2D.create_based and Array2D.init_based. - module Array2D = - - /// Fetch the base-index for the first dimension of the array. - /// - /// See notes on the Array2D module re. zero-basing. - val base1: array:'T[,] -> int - - /// Fetch the base-index for the second dimension of the array. - /// - /// See notes on the Array2D module re. zero-basing. - val base2: array:'T[,] -> int - - /// Build a new array whose elements are the same as the input array. - /// - /// For non-zero-based arrays the basing on an input array will be propogated to the output - /// array. - val copy: array:'T[,] -> 'T[,] - - /// Read a range of elements from the first array and write them into the second. - val blit: source:'T[,] -> sourceIndex1:int -> sourceIndex2:int -> target:'T[,] -> targetIndex1:int -> targetIndex2:int -> length1:int -> length2:int -> unit - - /// Create an array given the dimensions and a generator function to compute the elements. - val init: length1:int -> length2:int -> initializer:(int -> int -> 'T) -> 'T[,] - - /// Create an array whose elements are all initially the given value - val create: length1:int -> length2:int -> value:'T -> 'T[,] - - /// Create an array where the entries are initially Unchecked.defaultof<'T>. - val zeroCreate : length1:int -> length2:int -> 'T[,] - -#if FX_NO_BASED_ARRAYS -#else - /// Create a based array given the dimensions and a generator function to compute the elements. - val initBased: base1:int -> base2:int -> length1:int -> length2:int -> initializer:(int -> int -> 'T) -> 'T[,] - - /// Create a based array whose elements are all initially the given value - val createBased: base1:int -> base2:int -> length1:int -> length2:int -> initial: 'T -> 'T[,] - - /// Create a based array where the entries are initially Unchecked.defaultof<'T>. - val zeroCreateBased : base1:int -> base2:int -> length1:int -> length2:int -> 'T[,] -#endif - - /// 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 indicies passed to the - /// function indicates the index of element. - val iteri: action:(int -> int -> 'T -> unit) -> array:'T[,] -> unit - - /// Return the length of an array in the first dimension - val length1: array:'T[,] -> int - - /// Return the length of an array in the second dimension - val length2: array:'T[,] -> int - /// Build a new array whose elements are the results of applying the given function - /// to each of the elements of the array. - /// - /// For non-zero-based arrays the basing on an input array will be propogated to the output - /// 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 indices passed to the - /// function indicates the element being transformed. - /// - /// For non-zero-based arrays the basing on an input array will be propogated to the output - /// array. - val mapi: mapping:(int -> int -> 'T -> 'U) -> array:'T[,] -> 'U[,] - - - /// Build a new array whose elements are the same as the input array but - /// where a non-zero-based input array generates a corresponding zero-based - /// output array. - val rebase: array:'T[,] -> 'T[,] - - /// Set the value of an element in an array. You can also use the syntax 'array.[index1,index2] <- value' - val set: array:'T[,] -> index1:int -> index2:int -> value:'T -> unit - - /// Fetch an element from a 2D array. You can also use the syntax 'array.[index1,index2]' - val get: array:'T[,] -> index1:int -> index2:int -> 'T - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val init_based: base1:int -> base2:int -> length1:int -> length2:int -> initializer:(int -> int -> 'T) -> 'T[,] - - [] - val create_based: base1:int -> base2:int -> length1:int -> length2:int -> initial: 'T -> 'T[,] - - [] - val zero_create : length1:int -> length2:int -> 'T[,] - - [] - val zero_create_based : base1:int -> base2:int -> length1:int -> length2:int -> 'T[,] - - [] - val sub: source:'T[,] -> sourceIndex1:int -> sourceIndex2:int -> count1:int -> count2:int -> 'T[,] -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array3.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array3.fs deleted file mode 100644 index 04309231..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array3.fs +++ /dev/null @@ -1,145 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System.Diagnostics - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - - [] - [] - module Array3D = - - [] - let length1 (arr: 'a[,,]) = (# "ldlen.multi 3 0" arr : int #) - - [] - let length2 (arr: 'a[,,]) = (# "ldlen.multi 3 1" arr : int #) - - [] - let length3 (arr: 'a[,,]) = (# "ldlen.multi 3 2" arr : int #) - - [] - let get (arr: 'a[,,]) (n1:int) (n2:int) (n3:int) = (# "ldelem.multi 3 !0" type ('a) arr n1 n2 n3 : 'a #) - - [] - let set (arr: 'a[,,]) (n1:int) (n2:int) (n3:int) (x:'a) = (# "stelem.multi 3 !0" type ('a) arr n1 n2 n3 x #) - - [] - let zeroCreate (n1:int) (n2:int) (n3:int) = (# "newarr.multi 3 !0" type ('a) n1 n2 n3 : 'a[,,] #) - - [] - let create (n1:int) (n2:int) (n3:int) (x:'a) = - let arr = (zeroCreate n1 n2 n3 : 'a[,,]) - for i = 0 to n1 - 1 do - for j = 0 to n2 - 1 do - for k = 0 to n3 - 1 do - arr.[i,j,k] <- x - arr - - [] - let init n1 n2 n3 f = - let arr = (zeroCreate n1 n2 n3 : 'a[,,]) - for i = 0 to n1 - 1 do - for j = 0 to n2 - 1 do - for k = 0 to n3 - 1 do - arr.[i,j,k] <- f i j k - arr - - [] - let iter f arr = - let len1 = length1 arr - let len2 = length2 arr - let len3 = length3 arr - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - f arr.[i,j,k] - - [] - let map f arr = - let len1 = length1 arr - let len2 = length2 arr - let len3 = length3 arr - let res = (zeroCreate len1 len2 len3 : 'b[,,]) - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - res.[i,j,k] <- f arr.[i,j,k] - res - - [] - let iteri f arr = - let len1 = length1 arr - let len2 = length2 arr - let len3 = length3 arr - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - f i j k arr.[i,j,k] - - [] - let mapi f arr = - let len1 = length1 arr - let len2 = length2 arr - let len3 = length3 arr - let res = (zeroCreate len1 len2 len3 : 'b[,,]) - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - res.[i,j,k] <- f i j k arr.[i,j,k] - res - - [] - let zero_create n1 n2 n3 = zeroCreate n1 n2 n3 - - [] - [] - module Array4D = - - [] - let length1 (arr: 'a[,,,]) = (# "ldlen.multi 4 0" arr : int #) - - [] - let length2 (arr: 'a[,,,]) = (# "ldlen.multi 4 1" arr : int #) - - [] - let length3 (arr: 'a[,,,]) = (# "ldlen.multi 4 2" arr : int #) - - [] - let length4 (arr: 'a[,,,]) = (# "ldlen.multi 4 3" arr : int #) - - [] - let zeroCreate (n1:int) (n2:int) (n3:int) (n4:int) = (# "newarr.multi 4 !0" type ('a) n1 n2 n3 n4 : 'a[,,,] #) - - [] - let create n1 n2 n3 n4 (x:'a) = - let arr = (zeroCreate n1 n2 n3 n4 : 'a[,,,]) - for i = 0 to n1 - 1 do - for j = 0 to n2 - 1 do - for k = 0 to n3 - 1 do - for m = 0 to n4 - 1 do - arr.[i,j,k,m] <- x - arr - - [] - let init n1 n2 n3 n4 f = - let arr = (zeroCreate n1 n2 n3 n4 : 'a[,,,]) - for i = 0 to n1 - 1 do - for j = 0 to n2 - 1 do - for k = 0 to n3 - 1 do - for m = 0 to n4 - 1 do - arr.[i,j,k,m] <- f i j k m - arr - - - [] - let get (arr: 'a[,,,]) (n1:int) (n2:int) (n3:int) (n4:int) = (# "ldelem.multi 4 !0" type ('a) arr n1 n2 n3 n4 : 'a #) - - [] - let set (arr: 'a[,,,]) (n1:int) (n2:int) (n3:int) (n4:int) (x:'a) = (# "stelem.multi 4 !0" type ('a) arr n1 n2 n3 n4 x #) - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array3.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array3.fsi deleted file mode 100644 index 769c6891..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/array3.fsi +++ /dev/null @@ -1,103 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - - [] - [] - /// Basic operations on rank 3 arrays. - module Array3D = - - /// Create an array whose elements are all initially the given value - val create: length1:int -> length2:int -> length3:int -> initial:'T -> 'T[,,] - - /// Create an array given the dimensions and a generator function to compute the elements. - val init: length1:int -> length2:int -> length3:int -> initializer:(int -> int -> int -> 'T) -> 'T[,,] - - /// Fetch an element from a 3D array. You can also use the syntax 'array.[index1,index2,index3]' - val get: array:'T[,,] -> index1:int -> index2:int -> index3:int -> 'T - - /// 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 indicies passed to the - /// function indicates the index of element. - val iteri: action:(int -> int -> int -> 'T -> unit) -> array:'T[,,] -> unit - - /// Return the length of an array in the first dimension - val length1: array:'T[,,] -> int - - /// Return the length of an array in the second dimension - val length2: array:'T[,,] -> int - - /// Return the length of an array in the third dimension - val length3: array:'T[,,] -> int - - /// Build a new array whose elements are the results of applying the given function - /// to each of the elements of the array. - /// - /// For non-zero-based arrays the basing on an input array will be propogated to the output - /// 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 indices passed to the - /// function indicates the element being transformed. - /// - /// For non-zero-based arrays the basing on an input array will be propogated to the output - /// array. - val mapi: mapping:(int -> int -> int -> 'T -> 'U) -> array:'T[,,] -> 'U[,,] - - /// Set the value of an element in an array. You can also - /// use the syntax 'array.[index1,index2,index3] <- value'. - val set: array:'T[,,] -> index1:int -> index2:int -> index3:int -> value:'T -> unit - - /// Create an array where the entries are initially the "default" value. - val zeroCreate: length1:int -> length2:int -> length3:int -> 'T[,,] - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val zero_create: length1:int -> length2:int -> length3:int -> 'T[,,] -#endif - - - [] - [] - /// Basic operations on rank 4 arrays. - module Array4D = - - /// Create an array whose elements are all initially the given value - val create: length1:int -> length2:int -> length3:int -> length4:int -> initial:'T -> 'T[,,,] - - /// Create an array given the dimensions and a generator function to compute the elements. - val init: length1:int -> length2:int -> length3:int -> length4:int -> initializer:(int -> int -> int -> int -> 'T) -> 'T[,,,] - - /// Return the length of an array in the first dimension - val length1: array:'T[,,,] -> int - - /// Return the length of an array in the second dimension - val length2: array:'T[,,,] -> int - - /// Return the length of an array in the third dimension - val length3: array:'T[,,,] -> int - - /// Return the length of an array in the fourth dimension - val length4: array:'T[,,,] -> int - - /// Create an array where the entries are initially the "default" value. - val zeroCreate: length1:int -> length2:int -> length3:int -> length4:int -> 'T[,,,] - - /// Fetch an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' - val get: array:'T[,,,] -> index1:int -> index2:int -> index3:int -> index4:int -> 'T - - /// Set the value of an element in an array. You can also - /// use the syntax 'array.[index1,index2,index3,index4] <- value'. - val set: array:'T[,,,] -> index1:int -> index2:int -> index3:int -> index4:int -> value:'T -> unit - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/collections.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/collections.fs deleted file mode 100644 index b024633a..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/collections.fs +++ /dev/null @@ -1,113 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - #nowarn "51" - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - open System - open System.Diagnostics - open System.Collections - open System.Collections.Generic - - module HashIdentity = - - let inline Structural<'a> : IEqualityComparer<'a> = - // type-specialize some common cases to generate more efficient functions - { new IEqualityComparer<'a> with - member self.GetHashCode(x) = LanguagePrimitives.GenericHash(x) - member self.Equals(x,y) = LanguagePrimitives.GenericEquality x y } - - let LimitedStructural<'T>(limit) : IEqualityComparer<'T> = - LanguagePrimitives.FastLimitedGenericEqualityComparer<'T>(limit) - - let Reference<'T> : IEqualityComparer<'T> = - { new IEqualityComparer<'T> with - member self.GetHashCode(x) = LanguagePrimitives.PhysicalHash(x) - member self.Equals(x,y) = LanguagePrimitives.PhysicalEquality x y } - - let inline FromFunctions hash eq : IEqualityComparer<'a> = - let eq = OptimizedClosures.FastFunc2<_,_,_>.Adapt(eq) - { new IEqualityComparer<'a> with - member self.GetHashCode(x) = hash x - member self.Equals(x,y) = eq.Invoke(x,y) } - - - module ComparisonIdentity = - - let inline MakeFastStructuralComparisonFunction<'a>() : OptimizedClosures.FastFunc2<'a,'a,int> = - OptimizedClosures.FastFunc2<'a,'a,int>.Adapt(LanguagePrimitives.GenericComparison) - - let Char = MakeFastStructuralComparisonFunction() - let String = MakeFastStructuralComparisonFunction() - let SByte = MakeFastStructuralComparisonFunction() - let Int16 = MakeFastStructuralComparisonFunction() - let Int32 = MakeFastStructuralComparisonFunction() - let Int64 = MakeFastStructuralComparisonFunction() - let IntPtr = MakeFastStructuralComparisonFunction() - let Byte = MakeFastStructuralComparisonFunction() - let UInt16 = MakeFastStructuralComparisonFunction() - let UInt32 = MakeFastStructuralComparisonFunction() - let UInt64 = MakeFastStructuralComparisonFunction() - let UIntPtr = MakeFastStructuralComparisonFunction() - - /// Use a type-indexed table to ensure we only create a single FastStructuralComparison function - /// for each type - [] - type FastStructuralComparisonTable<'a>() = - static let f : OptimizedClosures.FastFunc2<'a,'a,int> = - match typeof<'a> with - | ty when ty.Equals(typeof) -> unbox (box Byte) - | ty when ty.Equals(typeof) -> unbox (box Char) - | ty when ty.Equals(typeof) -> unbox (box SByte) - | ty when ty.Equals(typeof) -> unbox (box Int16) - | ty when ty.Equals(typeof) -> unbox (box Int32) - | ty when ty.Equals(typeof) -> unbox (box Int64) - | ty when ty.Equals(typeof) -> unbox (box IntPtr) - | ty when ty.Equals(typeof) -> unbox (box UInt16) - | ty when ty.Equals(typeof) -> unbox (box UInt32) - | ty when ty.Equals(typeof) -> unbox (box UInt64) - | ty when ty.Equals(typeof) -> unbox (box UIntPtr) - | ty when ty.Equals(typeof) -> unbox (box String) - | _ -> MakeFastStructuralComparisonFunction<'a>() - static member Function : OptimizedClosures.FastFunc2<'a,'a,int> = f - - let GetFastStructuralComparisonFunction<'a>() : OptimizedClosures.FastFunc2<'a,'a,int> = - FastStructuralComparisonTable<'a>.Function - - /// If an IComparer also implements this interface then library implementations - /// have the option of using the given FastComparisonFunction - /// for implementing comparison semantics. Calling the FastFunc2 implementation - /// tends to be faster than calling IComparer. Furthermore most F# comparers are - /// ultimately specified using FastFunc2 values, hence making a direct call to - /// a FastFunc2 value avoids a double indirection. - type IHasFastComparisonFunction<'a> = - interface IComparer<'a> - abstract FastComparisonFunction : OptimizedClosures.FastFunc2<'a,'a,int> - - let GetFastComparisonFunction(icomparer : IComparer<'a>) : OptimizedClosures.FastFunc2<'a,'a,int> = - match box icomparer with - | :? IHasFastComparisonFunction<'a> as x -> x.FastComparisonFunction - | _ -> OptimizedClosures.FastFunc2<_,_,_>.Adapt(fun x y -> icomparer.Compare(x,y)) - - let Structural<'a> : IComparer<'a> = - let comparer = MakeFastStructuralComparisonFunction<'a>() - { new IComparer<'a> with - member self.Compare(x,y) = LanguagePrimitives.GenericComparison x y - interface IHasFastComparisonFunction<'a> with - member self.FastComparisonFunction = comparer } - - let FromFunction comparer = - let comparer = OptimizedClosures.FastFunc2<'a,'a,int>.Adapt(comparer) - { new IComparer<'a> with - member self.Compare(x,y) = comparer.Invoke(x,y) - interface IHasFastComparisonFunction<'a> with - member self.FastComparisonFunction = comparer } - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/collections.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/collections.fsi deleted file mode 100644 index c74732cb..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/collections.fsi +++ /dev/null @@ -1,55 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// This namespace contains some common collections in a style primarily designed for use from F#. - -namespace Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - open System - open System.Collections.Generic - - /// Common notions of comparison identity used with sorted data structures. - module ComparisonIdentity = - - /// Structural comparison. Compare using Operators.compare. - val Structural<'T> : IComparer<'T> - - /// Convert an existing IComparer object into a comparison function with a fast entry point - /// If comparer was originally built using ComparisonIdentity.FromFunction then the original function will be - /// returned - val GetFastComparisonFunction : comparer:IComparer<'T> -> OptimizedClosures.FastFunc2<'T,'T,int> - - /// Convert an existing IComparer object into a comparison function with a fast entry point - val GetFastStructuralComparisonFunction : unit -> OptimizedClosures.FastFunc2<'T,'T,int> - - /// Compare using the given comparer function - val FromFunction : comparer:('T -> 'T -> int) -> IComparer<'T> - - /// Common notions of value identity used with hash tables. - module HashIdentity = - - /// Structural hashing. Hash using Operators.(=) and Operators.hash. - - // inline justification: allows specialization of structural hash functions based on type - val inline Structural<'T> : IEqualityComparer<'T> - - val LimitedStructural<'T> : limit: int -> IEqualityComparer<'T> - - /// Physical hashing (hash on reference identity of objects, and the contents of value types). - /// Hash using LanguagePrimitives.PhysicalEquality and LanguagePrimitives.PhysicalHash, - /// That is, for value types use GetHashCode and Object.Equals (if no other optimization available), - /// and for reference types use System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode and - /// reference equality. - // - // inline justification: allows specialization of reference hash functions based on type - val Reference<'T> : IEqualityComparer<'T> - - /// Hash using the given hashing and equality functions - // - // inline justification: allows inlining of hash functions - val inline FromFunctions<'T> : hasher:('T -> int) -> equality:('T -> 'T -> bool) -> IEqualityComparer<'T> - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/control.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/control.fs deleted file mode 100644 index 663a3cae..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/control.fs +++ /dev/null @@ -1,1247 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Control - - #nowarn "44" // This construct is deprecated. This method will be removed in the next version of F# and may no longer be used. Consider using Async.RunWithContinuations - #nowarn "67" // This type test or downcast will always hold - - open System - open System.Diagnostics - open System.Diagnostics.CodeAnalysis - open System.Threading - open System.IO - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Control - open Microsoft.FSharp.Collections - -#if FX_ATLEAST_40 - open System.Threading.Tasks -#endif - -#if FX_NO_OPERATION_CANCELLED - type OperationCanceledException(s : System.String) = - inherit System.Exception(s) -#endif - - /// We use our own internal implementation of queues to avoid a dependency on System.dll - type Queue<'T>() = //: IEnumerable, ICollection, IEnumerable - - let mutable array = [| |] - let mutable head = 0 - let mutable size = 0 - let mutable tail = 0 - - let SetCapacity(capacity) = - let destinationArray = Array.zeroCreate(capacity); - if (size > 0) then - if (head < tail) then - System.Array.Copy(array, head, destinationArray, 0, size); - else - System.Array.Copy(array, head, destinationArray, 0, array.Length - head); - System.Array.Copy(array, 0, destinationArray, array.Length - head, tail); - array <- destinationArray; - head <- 0; - tail <- if (size = capacity) then 0 else size; - - member x.Dequeue() = - if (size = 0) then - failwith "Dequeue" - let local = array.[head]; - array.[head] <- Unchecked.defaultof<'T> - head <- (head + 1) % array.Length; - size <- size - 1; - local - - member this.Enqueue(item) = - if (size = array.Length) then - let capacity = int ((int64 array.Length * 200L) / 100L); - let capacity = max capacity (array.Length + 4) - SetCapacity(capacity); - array.[tail] <- item; - tail <- (tail + 1) % array.Length; - size <- size + 1 - - member x.Count = size - - - - [] - type Unexpected = - /// cases that should never occur except due to bad code in this file - static member Fail msg = - //System.Diagnostics.Debug.Assert(false, msg) - raise <| new InvalidOperationException(msg) - - [] - type AsyncGroup() = - let mutable cancellationFlag = false - let mutable cancellationMessage = None - let cancelEvent = new Event<_>() - member x.TriggerCancel(?message:string) = - let message = defaultArg message "an exception happened on another parallel process" - //Console.WriteLine(" ** TriggerCancel on group {0}", x.GetHashCode()) - cancellationMessage <- Some message - cancellationFlag <- true; cancelEvent.Trigger(message) - - member x.Cancel = cancelEvent.Publish - - [] // inlined - member x.Test() = cancellationFlag - - [] // inlined - member x.GetMessage() = cancellationMessage - - member x.CreateSubGroup() = - let innerAsyncGroup = new AsyncGroup() - let handler = Handler(fun _ msg -> innerAsyncGroup.TriggerCancel(msg)) - //Console.WriteLine(" ** AddHandler for subgroup {0} to group {1}", innerAsyncGroup.GetHashCode(), x.GetHashCode); - x.Cancel.AddHandler(handler); - innerAsyncGroup, (fun () -> x.Cancel.RemoveHandler(handler)) - // Some versions of F# don't always take tailcalls to functions returning 'unit' because this - // is represented as type 'void' in the underlying IL. - // Hence we don't use the 'unit' return type here, and instead invent our own type. - type FakeUnitValue = - | FakeUnit - - - type cont<'T> = ('T -> FakeUnitValue) - type econt = (exn -> FakeUnitValue) - type ccont = (OperationCanceledException -> FakeUnitValue) - - [] - type AsyncParams<'T> = - { group : AsyncGroup; - cont : cont<'T>; - econt : econt; - ccont : ccont; - blocked : System.Threading.Thread; - } - - [] - type Async<'T> = - P of (AsyncParams<'T> -> FakeUnitValue) - - module AsyncBuilderImpl = - // To consider: augment with more exception traceability information - // To consider: add the ability to suspend running ps in debug mode - // To consider: add the ability to trace running ps in debug mode - open System - open System.Threading - open System.IO - - let fake () = FakeUnit - let unfake FakeUnit = () - let ignoreFake _ = FakeUnit - - - let defaultAsyncGroup = ref (AsyncGroup()) - - type Result<'T> = - | Error of exn - | Ok of 'T - - // Apply f to x and call either the continuation or exception continuation depending what happens - let inline protect econt f x (cont : 'T -> FakeUnitValue) : FakeUnitValue = - // This is deliberately written in a completely allocation-free style - let mutable res = Unchecked.defaultof<_> - let mutable exn = null - try - res <- f x - with - // Note: using a :? catch keeps FxCop happy - | :? System.Exception as e -> - exn <- e - match exn with - | null -> - // NOTE: this must be a tailcall - cont res - | exn -> - // NOTE: this must be a tailcall - econt exn - - type TailCallCount = -#if FX_NO_THREAD_STATIC // no thread static on .NET CF 2.0. The hijack implementation is still a reasonable approximation without this - hijacks are just aken more often -#else - [] -#endif - [] - static val mutable count : int - - let tailcallLim = 300 - - //if sizeof = 8 then - // Hijack every so often - //else - // f() - - // Reify exceptional results as exceptions - let commit res = - match res with - | Ok res -> res - | Error exn -> raise exn - - // Reify exceptional results as exceptions - let commitWithPossibleTimeout res = - match res with - | None -> raise (System.TimeoutException()) - | Some res -> commit res - - let cancelT (args:AsyncParams<_>) = - let msg = args.group.GetMessage() |> Option.get - args.ccont (new OperationCanceledException(msg)) - - - // Generate async computation which calls its continuation with the given result - let resultA x = - P (fun args -> - if args.group.Test() then - cancelT args - else - args.cont x) - - // Apply the underlying implementation of an async computation to its inputs - let inline invokeA (P pf) args = pf args - - // The primitive bind operation. Generate a process that runs the first process, takes - // its result, applies f and then runs the new process produced. Hijack if necessary and - // run 'f' with exception protection - let bindA p1 f = - P (fun args -> - if args.group.Test() then - cancelT args - else - - let bind() = - let cont a = protect args.econt f a (fun p2 -> invokeA p2 args) - invokeA p1 { cont=cont;ccont=args.ccont;econt=args.econt;blocked=args.blocked;group=args.group } - - // .NET 2.0 JIT 64 doesn't always take tailcalls correctly. Hence hijack the continuation onto a new work item - // every so often by counting the number of tailcalls we make from each particular O/S thread. - // Note this also gives more interleaving of I/O. - TailCallCount.count <- TailCallCount.count + 1 - if TailCallCount.count >= tailcallLim then - TailCallCount.count <- 0 -#if FX_NO_SYNC_CONTEXT - //if not (ExecutionContext.IsFlowSuppressed()) then ExecutionContext.SuppressFlow() |> ignore - if ThreadPool.QueueUserWorkItem(fun _ -> bind() |> unfake) then - FakeUnit - else - bind() -#else - let ctxt = System.Threading.SynchronizationContext.Current - if (match ctxt with null -> true | _ -> false) - || (match args.blocked with - | null -> false - | t -> t = System.Threading.Thread.CurrentThread) then - - //if not (ExecutionContext.IsFlowSuppressed()) then ExecutionContext.SuppressFlow() |> ignore - if ThreadPool.QueueUserWorkItem(fun _ -> bind() |> unfake) then - FakeUnit - else - bind() - else - // Reschedule in the same synchronization context if one is available - ctxt.Post(SendOrPostCallback(fun _ -> bind() |> unfake),null) - FakeUnit -#endif - else - // NOTE: this must be a tailcall - bind()) - - - - // callA = "bindA (return x) f", though no hijack check - let callA f x = - P (fun args -> - if args.group.Test() then - cancelT args - else - protect args.econt f x (fun p2 -> invokeA p2 args)) - - // delayPrim = "bindA (return ()) f", though no hijack check - let delayA f = callA f () - - // Call p but augment the normal, exception and cancel continuations with a call to finallyFunction. - // If the finallyFunction raises an exception then call the original exception continuation - // with the new exception. If exception is raised after a cancellation, exception is ignored - // and cancel continuation is called. - let tryFinallyA finallyFunction p = - P (fun args -> - if args.group.Test() then - cancelT args - else - // The new continuation runs the finallyFunction and resumes the old continuation - // If an exception is thrown we continue with the previous exception continuation. - let cont b = protect args.econt finallyFunction () (fun () -> args.cont b) - // The new exception continuation runs the finallyFunction and then runs the previous exception continuation. - // If an exception is thrown we continue with the previous exception continuation. - let econt exn = protect args.econt finallyFunction () (fun () -> args.econt exn) - // The cancellation continuation runs the finallyFunction and then runs the previous cancellation continuation. - // If an exception is thrown we continue with the previous cancellation continuation (the exception is lost) - let ccont cexn = protect (fun _ -> args.ccont cexn) finallyFunction () (fun () -> args.ccont cexn) - invokeA p { args with cont = cont; econt = econt; ccont = ccont } ) - - let protectedPrimitive f = - P (fun args -> - if args.group.Test() then - cancelT args - else - try f args - with exn -> args.econt exn) - - // Re-rout the exception continuation to call to catchFunction. This generates - // a new process. If catchFunction or the new process fail - // then call the original exception continuation with the failure. - let tryWithPrimA catchFunction p = - P (fun args -> - if args.group.Test() then - cancelT args - else - let econt exn = invokeA (callA catchFunction exn) args - invokeA p { args with econt = econt }) - - let tryWithA f p = tryWithPrimA f p - let doneA = resultA() - let fakeUnitA = resultA FakeUnit - let usingA (r:'T :> IDisposable) f = tryFinallyA (fun () -> r.Dispose()) (callA f r) - let raiseA exn = P (fun args -> args.econt (exn :> Exception)) - let ignoreA p = bindA p (fun _ -> doneA) - - let catchA p = - P (fun args -> - invokeA p { group = args.group; - blocked = args.blocked; - cont = (Ok >> args.cont); - ccont = args.ccont; - econt = (Error >> args.cont) }) - - let whenCancelledA finallyFunction p = - P (fun args -> - invokeA p { args with ccont = (fun exn -> finallyFunction(exn); args.ccont(exn)) }) - - let primitiveA f = - protectedPrimitive (fun args -> f (args.cont,args.econt, args.ccont)) - - // Start on the current thread. Only Async.Run uses this. - let startA blocked asyncGroup cont econt ccont p = - invokeA p { group = asyncGroup; cont = cont; econt = econt; ccont = ccont; blocked = blocked } - |> unfake - - // Start as a work item in the thread pool - let queueWorkItem asyncGroup cont econt ccont p = - let args = { group = asyncGroup; cont = cont; econt = econt; ccont = ccont; blocked = null } - //if not (ExecutionContext.IsFlowSuppressed()) then ExecutionContext.SuppressFlow() |> ignore - if not (ThreadPool.QueueUserWorkItem(fun _ -> invokeA p args |> unfake)) then - Unexpected.Fail "failed to queue user work item" - - let getAsyncGroup() = - P (fun args -> args.cont args.group) - - let rec whileA gd prog = - if gd() then bindA prog (fun () -> whileA gd prog) else doneA - - open AsyncBuilderImpl - - [] - type AsyncBuilder() = - member b.Zero() = doneA - member b.Delay(f) = delayA(f) - member b.Return(x) = resultA(x) - member b.Bind(p1,p2) = bindA p1 p2 - member b.Using(g,p) = usingA g p - member b.While(gd,prog) = whileA gd prog - member b.For(e:seq<_>,prog) = - usingA (e.GetEnumerator()) (fun ie -> - whileA - (fun () -> ie.MoveNext()) - (delayA(fun () -> prog ie.Current))) - - member b.Combine(p1,p2) = bindA p1 (fun () -> p2) - member b.TryFinally(p,cf) = tryFinallyA cf p - member b.TryWith(p,cf) = tryWithA cf p - - module AsyncImpl = - let async = AsyncBuilder() - -#if FX_NO_SYNC_CONTEXT -#else - let post (syncContext : SynchronizationContext) trigger args = - match syncContext with - | null -> () - | ctxt -> ctxt.Post(SendOrPostCallback(fun _ -> trigger args),state=null) -#endif - - - let boxed(a:Async<'b>) : Async = async { let! res = a in return box res } - - // A utility type to provide a synchronization point between an asynchronous computation and callers waiting - // on the result of that computation. - [] - [] - type ResultCell<'T>() = - // Use the reference cell as a lock - let mutable result = None - // The WaitHandle event for the result. Only created if needed, and set to None when disposed. - let mutable resEvent = null - let mutable disposed = false - // All writers of result are protected by lock on syncRoot. - // Note: don't use 'resEvent' as a lock - it is option-valued. Option values use 'null' as a representation. - let syncRoot = new Object() - - member x.GetWaitHandle() = - lock syncRoot (fun () -> - if disposed then - raise (System.ObjectDisposedException("ResultCell")); - match resEvent with - | null -> - // Start in signalled state if a result is already present. - let ev = new ManualResetEvent(result.IsSome) - resEvent <- ev - (ev :> WaitHandle) - | ev -> - (ev :> WaitHandle)) - - member x.Close() = - lock syncRoot (fun () -> - if not disposed then - disposed <- true; - match resEvent with - | null -> () - | ev -> - ev.Close(); - resEvent <- null) - - interface IDisposable with - member x.Dispose() = x.Close() // ; System.GC.SuppressFinalize(x) - - - member x.GrabResult() = - match result with - | Some res -> res - | None -> Unexpected.Fail "Unexpected no result" - - - // Record the result in the ResultCell. - member x.RegisterResult (res:'T) = - lock syncRoot (fun () -> - // In this case the ResultCell has already been disposed, e.g. due to a timeout. - // The result is dropped on the floor. - if disposed then - () - else - result <- Some res; - // If the resEvent exists then set it. If not we can skip setting it altogether and it won't be - // created - match resEvent with - | null -> - () - | ev -> - // If the resEvent exists then set it. If not we can skip setting it altogether and it won't be - // created. - ev.Set() |> ignore) - - /// Wait until a result is available in the ResultCell. Should be called at most once. - - member x.ResultAvailable = result.IsSome - - member x.TryWaitForResult (?timeout) : 'T option = - // Check if a result is available. - match result with - | Some res as r -> - r - | None -> - // Force the creation of the WaitHandle - let resHandle = x.GetWaitHandle() - // Check again. While we were in GetWaitHandle, a call to RegisterResult may have set result then skipped the - // Set because the resHandle wasn't forced. - match result with - | Some res as r -> - r - | None -> - // OK, let's really wait for the Set signal. This may block. - let timeout = defaultArg timeout Threading.Timeout.Infinite -#if FX_NO_EXIT_CONTEXT_FLAGS - let ok = resHandle.WaitOne(millisecondsTimeout= timeout) -#else - let ok = resHandle.WaitOne(millisecondsTimeout= timeout,exitContext=true) -#endif - if ok then - // Now the result really must be available - result - else - // timed out - None - - open AsyncImpl - - - type TaskResult<'T> = - | TaskOk of 'T - | TaskExn of exn - | TaskCancelled of string - - type AsyncGroup with - /// Run the asynchronous workflow and wait for its result. - member g.RunSynchronously (p,?timeout) = - let innerAsyncGroup, disposeFct = g.CreateSubGroup() - use resultCell = new ResultCell>() - let blocked = System.Threading.Thread.CurrentThread - startA - blocked - innerAsyncGroup - (fun res -> - // Note the ResultCell may have been disposed if the operation - // timed out. In this case RegisterResult drops the result on the floor. - resultCell.RegisterResult(Ok(res)); - FakeUnit) - (fun exn -> resultCell.RegisterResult(Error(exn)); FakeUnit) - (fun exn -> resultCell.RegisterResult(Error(exn :> Exception)); FakeUnit) - p - let res = resultCell.TryWaitForResult(?timeout = timeout) in - match res with - | None -> - innerAsyncGroup.TriggerCancel(); - disposeFct() - raise (System.TimeoutException()) - | Some res -> - disposeFct() - commit res - - member g.Start (computation) = - queueWorkItem - g - (fun () -> FakeUnit) // nothing to do on success - (fun _ -> FakeUnit) // ignore exception in child - (fun _ -> FakeUnit) // ignore cancellation in child - computation - - member g.RunWithContinuations(cont,econt,ccont,a:Async<'T>) : unit = - let (P(f)) = a - let args = { cont = (cont >> fake); econt = (econt >> fake); ccont = (ccont >> fake); blocked = null; group = g } - f args |> unfake -#if FX_ATLEAST_40 - member g.CreateTask (computation,?taskCreationOptions) = - let taskCreationOptions = defaultArg taskCreationOptions TaskCreationOptions.None - let task = ref Unchecked.defaultof> - let action () = - use resultCell = new ResultCell>() - startA - [] - g - (fun r -> resultCell.RegisterResult(TaskOk r) |> fake) - (fun exn -> resultCell.RegisterResult(TaskExn exn) |> fake) - (fun exn -> - resultCell.RegisterResult(TaskCancelled exn.Message); - (!task).Cancel() // wire group cancelation to task cancelation - FakeUnit) - computation - let res = resultCell.TryWaitForResult() - match res with - | None -> - // None case shouldn't happen - there is not timeout in TryWaitForResult - g.TriggerCancel() - raise (System.TimeoutException()) - | Some r -> - (match r with - | TaskOk r -> r - | TaskCancelled _ -> - (!task).AcknowledgeCancellation() - Unchecked.defaultof<_> - | TaskExn exn -> raise exn) - task := new Task<_>(Func<_>(action), taskCreationOptions) - - // Wire task cancelation to group cancelation - let onTaskCanceled canceledTask = - if not(g.Test()) then - g.TriggerCancel() - - let cancelationTask = (!task).ContinueWith(Action>(onTaskCanceled), TaskContinuationOptions.OnlyOnCanceled) - !task - - member g.StartAsTask (computation,?taskCreationOptions) = - let t = g.CreateTask(computation,?taskCreationOptions=taskCreationOptions) - t.Start() - t -#endif - -#if DONT_INCLUDE_DEPRECATED -#else - member g.Spawn computation = - g.Start computation - - member g.Run (computation,?timeout) = - g.RunSynchronously(computation,?timeout=timeout) -#endif - - [] - type Async = - - static member CancelCheck () = doneA - - [] - static member Primitive (f : ('T -> unit) * (exn -> unit) -> unit): Async<'T> = - primitiveA (fun (cont:cont<_>,econt:econt,_:ccont) -> - f (cont >> unfake, econt >> unfake) |> fake) - - [] - static member Primitive (f : ('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) : Async<'T> = - primitiveA (fun (cont:cont<_>,econt:econt,ccont:ccont) -> - f (cont >> unfake, econt >> unfake,ccont >> unfake) |> fake) - - static member CancelDefaultGroup(?message) = - let asyncGroup = !defaultAsyncGroup - asyncGroup.TriggerCancel(?message=message) - defaultAsyncGroup := new AsyncGroup() - - static member DefaultGroup = !defaultAsyncGroup - - static member Catch (p: Async<'T>) = - P (fun args -> - invokeA p { group = args.group; - cont = (Choice1Of2 >> args.cont); - blocked=args.blocked; - econt=(Choice2Of2 >> args.cont); - ccont=args.ccont}) - - static member RunSynchronously (p: Async<'T>,?timeout) = - (!defaultAsyncGroup).RunSynchronously(p, ?timeout=timeout) - - static member Start (computation) = - (!defaultAsyncGroup).Start computation - -#if FX_ATLEAST_40 - static member CreateTask (computation,?taskCreationOptions)= - (!defaultAsyncGroup).CreateTask(computation,?taskCreationOptions=taskCreationOptions) - - static member StartAsTask (computation,?taskCreationOptions)= - (!defaultAsyncGroup).StartAsTask(computation,?taskCreationOptions=taskCreationOptions) - -#endif - -#if DONT_INCLUDE_DEPRECATED -#else - static member Run (p: Async<'T>,?timeout) = - Async.RunSynchronously(p,?timeout = timeout) - - static member Spawn (computation) = - Async.Start computation -#endif - -#if FX_ATLEAST_40 - type AsyncGroup with - member g.StartChildAsTask (computation,?taskCreationOptions) = - async { return g.StartAsTask(computation, ?taskCreationOptions=taskCreationOptions) } - - type Async with - static member StartChildAsTask (computation,?taskCreationOptions) = - (!defaultAsyncGroup).StartChildAsTask(computation, ?taskCreationOptions=taskCreationOptions) - -#endif - type Async with - static member Parallel (l: seq>) = - protectedPrimitive (fun args -> - let tasks = Seq.to_array l - if tasks.Length = 0 then args.cont [| |] else - let count = ref tasks.Length - let firstExn = ref None - let results = Array.zeroCreate tasks.Length - // Attept to cancel the individual operations if an exception happens on any the other threads - let innerAsyncGroup, disposeFct = args.group.CreateSubGroup() - let finishTask(remaining) = - if (remaining=0) then - disposeFct(); - match (!firstExn) with - | None -> args.cont results - | Some (Choice1Of2 exn) -> args.econt exn - | Some (Choice2Of2 cexn) -> args.ccont cexn - else - FakeUnit - - let recordSuccess i res = - results.[i] <- res; - let remaining = lock count (fun () -> decr count; !count) - finishTask(remaining) - - let recordFailure exn = - let remaining = - lock count (fun () -> - decr count; - match !firstExn with - | None -> firstExn := Some exn // save the cancellation as the first exception - | _ -> () - !count) - if (remaining>0) then - innerAsyncGroup.TriggerCancel() - finishTask(remaining) - - tasks |> Array.iteri (fun i p -> - queueWorkItem - innerAsyncGroup - // on success, record the result - (fun res -> recordSuccess i res) - // on exception... - (fun exn -> recordFailure (Choice1Of2 exn)) - // on cancellation... - (fun cexn -> recordFailure (Choice2Of2 cexn)) - p); - FakeUnit) - - type Async with - - static member Parallel2 (a:Async<'T1>,b:Async<'T2>) = - async { let! res = Async.Parallel [boxed a; boxed b] - return (unbox<'T1>(res.[0]), unbox<'T2>(res.[1])) } - - static member Parallel3 (a:Async<'T1>,b:Async<'T2>,c:Async<'T3>) = - async { let! res = Async.Parallel [boxed a; boxed b; boxed c] - return (unbox<'T1>(res.[0]), unbox<'T2>(res.[1]), unbox<'T3>(res.[2])) } - - static member RunWithContinuations(cont,econt,ccont,a:Async<'T>) : unit = - (!defaultAsyncGroup).RunWithContinuations(cont,econt,ccont,a) - -#if FX_NO_REGISTERED_WAIT_HANDLES - static member WaitOne(waitHandle:WaitHandle,?millisecondsTimeout:int) = - protectedPrimitive(fun args -> - let millisecondsTimeout = defaultArg millisecondsTimeout Threading.Timeout.Infinite - if millisecondsTimeout = 0 then - let ok = waitHandle.WaitOne(0,exitContext=false) - args.cont ok - else - // The .NET Compact Framework doesn't support RegisterWaitForSingleObject - // Hence we unblock the condition byusing a new thread pool work item. - // This is sub-optimal. - if ThreadPool.QueueUserWorkItem(fun _ -> - let ok = waitHandle.WaitOne(millisecondsTimeout,exitContext=false) - args.cont ok |> ignore) then - FakeUnit - else - // If we couldn't queue in the thread pool, try a new thread - (new Thread(ThreadStart(fun () -> - let ok = waitHandle.WaitOne(millisecondsTimeout,exitContext=false) - args.cont ok |> ignore),IsBackground=true)).Start(); - FakeUnit) - -#else - static member WaitOne(waitHandle:WaitHandle,?millisecondsTimeout:int) = - protectedPrimitive(fun args -> - let millisecondsTimeout = defaultArg millisecondsTimeout Threading.Timeout.Infinite - if millisecondsTimeout = 0 then -#if FX_NO_EXIT_CONTEXT_FLAGS - let ok = waitHandle.WaitOne(0) -#else - let ok = waitHandle.WaitOne(0,exitContext=false) -#endif - args.cont ok - else - - let rwh = ref (None : RegisteredWaitHandle option) - - let cancelHandler = - Handler(fun obj (msg:string) -> - match !rwh with - | None -> () - | Some rwh -> - // If we successfully Unregister the operation then - // the callback below will never get called. So we call the cancel - // continuation directly in a new work item. - let succeeded = rwh.Unregister(waitHandle) - if succeeded then - Async.Start (async { do (args.ccont (new OperationCanceledException(msg)) |> unfake) })) - - rwh := Some(ThreadPool.RegisterWaitForSingleObject - (waitObject=waitHandle, - callBack=WaitOrTimerCallback(fun _ timeOut -> - rwh := None; - args.group.Cancel.RemoveHandler(cancelHandler); - args.cont (not timeOut) |> ignore), - state=null, - millisecondsTimeOutInterval=millisecondsTimeout, - executeOnlyOnce=true)); - - args.group.Cancel.AddHandler(cancelHandler); - FakeUnit) -#endif - - [] - static member WaitIAsyncResult(iar: IAsyncResult,endFunc): Async<'T> = - async { if iar.CompletedSynchronously then - return endFunc iar - else - let! ok = Async.WaitOne(iar.AsyncWaitHandle) - return endFunc iar } - - [] - static member BuildPrimitive(beginFunc,endFunc): Async<'T> = - async { let iar : IAsyncResult = beginFunc((null : System.AsyncCallback),(null:obj)) - return! Async.WaitIAsyncResult(iar,endFunc) } - - [] - static member BuildPrimitive(arg1,beginFunc,endFunc): Async<'T> = - async { let iar : IAsyncResult = beginFunc(arg1,(null : System.AsyncCallback),(null:obj)) - return! Async.WaitIAsyncResult(iar,endFunc) } - - [] - static member BuildPrimitive(arg1,arg2,beginFunc,endFunc): Async<'T> = - async { let iar : IAsyncResult = beginFunc(arg1,arg2,(null : System.AsyncCallback),(null:obj)) - return! Async.WaitIAsyncResult(iar,endFunc) } - - [] - static member BuildPrimitive(arg1,arg2,arg3,beginFunc,endFunc): Async<'T> = - async { let iar : IAsyncResult = beginFunc(arg1,arg2,arg3,(null : System.AsyncCallback),(null:obj)) - return! Async.WaitIAsyncResult(iar,endFunc) } - - type Async with -#if DONT_INCLUDE_DEPRECATED -#else - static member Generate (n,f, ?numChunks) : Async<'T array> = - async { let procs = defaultArg numChunks System.Environment.ProcessorCount - let resArray = Array.zeroCreate n - let! res = Async.Parallel - [ for pid in 0 .. procs-1 -> - async { for i in 0 .. (n/procs+(if n%procs > pid then 1 else 0)) - 1 do - let elem = (i + pid * (n/procs) + min (n%procs) pid) - let! res = f elem - do resArray.[elem] <- res; } ] - return resArray } -#endif - - static member Ignore (p: Async<'T>) = bindA p (fun _ -> doneA) - static member SwitchToNewThread() = - protectedPrimitive(fun args -> - (new Thread(ThreadStart(fun () -> args.cont () |> ignore),IsBackground=true)).Start(); FakeUnit) - - static member SwitchToThreadPool() = - protectedPrimitive(fun args -> - //if not (ExecutionContext.IsFlowSuppressed()) then ExecutionContext.SuppressFlow() |> ignore - if not (ThreadPool.QueueUserWorkItem(fun _ -> args.cont () |> ignore)) then - args.econt (Failure "SwitchToThreadPool: failed to queue user work item") - else - FakeUnit) - - type Async with - - static member StartChild (p:Async<'T>,?millisecondsTimeout) = - async { let resultCell = new ResultCell<_>() - let! asyncGroup = getAsyncGroup() - do queueWorkItem asyncGroup - (fun res -> resultCell.RegisterResult (Ok res); FakeUnit) - (fun err -> resultCell.RegisterResult (Error err); FakeUnit) - (fun err -> resultCell.RegisterResult (Error err); FakeUnit) - p - - return async { try - if resultCell.ResultAvailable then - return commit (resultCell.GrabResult()) - else - let! ok = Async.WaitOne(resultCell.GetWaitHandle(),?millisecondsTimeout=millisecondsTimeout) - return commitWithPossibleTimeout (if ok then Some(resultCell.GrabResult()) else None) - finally - resultCell.Close() } } - -#if DONT_INCLUDE_DEPRECATED -#else - static member SpawnChild p = - async { let! asyncGroup = getAsyncGroup() - do queueWorkItem asyncGroup - (fun () -> FakeUnit) // nothing to do on success - (fun _ -> FakeUnit) // ignore exception in child - (fun _ -> FakeUnit) // ignore cancellation in child - p } -#endif - -#if FX_NO_SYNC_CONTEXT -#else - static member SpawnThenPostBack (computation: Async<'T>,postBack) = - let syncContext = SynchronizationContext.Current - match syncContext with - | null -> raise <| new System.InvalidOperationException("The System.Threading.SynchronizationContext.Current of the calling thread is null") - | _ -> - Async.Start (async { let! res = catchA(computation) in - do post syncContext (fun () -> postBack (commit res)) () }) - - static member SwitchToGuiThread syncContext = - async { match syncContext with - | null -> - // no synchronization context, just switch to the thread pool - do! Async.SwitchToThreadPool() - | ctxt -> - // post the continuation to the synchronization context - do! Async.Primitive (fun (cont,econt) -> post ctxt (fun () -> cont()) ()) } -#endif - - static member OnCancel action = - async { let h = new Handler<_>(fun sender x -> try action x with _ -> ()) - let! asyncGroup = getAsyncGroup () - do asyncGroup.Cancel.AddHandler(h); - return { new IDisposable with - member x.Dispose() = asyncGroup.Cancel.RemoveHandler(h) } } - - static member TryCancelled (p: Async<'T>,f) = - whenCancelledA f p - -#if FX_ATLEAST_40 - static member WaitTask (task:Task<'T>) : Async<'T> = - protectedPrimitive(fun args -> - let continuation (completedTask : Task<_>) = - if completedTask.IsCanceled then - args.group.TriggerCancel() - args.ccont (new OperationCanceledException()) - elif completedTask.IsFaulted then - args.econt completedTask.Exception - else - args.cont completedTask.Result - - task.ContinueWith(Action>(continuation >> unfake), TaskContinuationOptions.None) |> ignore |> fake - ) -#endif - - module CommonExtensions = - open AsyncBuilderImpl - - type System.IO.Stream with - - member stream.AsyncRead(buffer: byte[],?offset,?count) = - let offset = defaultArg offset 0 - let count = defaultArg count buffer.Length - Async.BuildPrimitive (buffer,offset,count,stream.BeginRead,stream.EndRead) - - member stream.AsyncRead(count) = - async { let buffer = Array.zeroCreate count - let i = ref 0 - while !i < count do - let! n = stream.AsyncRead(buffer,!i,count - !i) - i := !i + n - if n = 0 then - raise(System.IO.EndOfStreamException("failed to read enough bytes from stream")) - return buffer } - - member stream.AsyncWrite(buffer:byte[], ?offset:int, ?count:int) = - let offset = defaultArg offset 0 - let count = defaultArg count buffer.Length - Async.BuildPrimitive (buffer,offset,count,stream.BeginWrite,stream.EndWrite) - - type System.Threading.WaitHandle with - member waitHandle.AsyncWaitOne(?millisecondsTimeout:int) = - Async.WaitOne(waitHandle,?millisecondsTimeout=millisecondsTimeout) - - type System.Threading.Thread with - - static member AsyncSleep(dueTime) = - Async.Primitive (fun (cont,econt) -> - let timer = ref None - timer := Some (new Timer((fun _ -> - // Try to Dispose of the TImer. - // Note: there is a race here: the System.Threading.Timer time very occasionally - // calls the callback _before_ the timer object has been recorded anywhere. This makes it difficult to dispose the - // timer in this situation. In this case we just let the timer be collected by finalization. - (match !timer with - | None -> () - | Some t -> t.Dispose()); - // Now we're done, so call the continuation - cont() |> ignore), - null, dueTime=dueTime, period = -1))) - -#if FX_ATLEAST_40 - type System.Threading.Tasks.Task<'T> with - member this.AsyncValue - with get () = - Async.WaitTask(this) -#endif - - open CommonExtensions - -#if DONT_INCLUDE_DEPRECATED -#else - [] - [] - [] - type AsyncFuture<'T>(resultCell:ResultCell>) = - [] - member x.Value = commitWithPossibleTimeout (resultCell.TryWaitForResult()) - - interface IAsyncResult with - member iar.IsCompleted= resultCell.ResultAvailable - member iar.AsyncState=null - member iar.CompletedSynchronously=false - member iar.AsyncWaitHandle = resultCell.GetWaitHandle() - interface IDisposable with - member x.Dispose() = resultCell.Close() - - - type AsyncGroup with - [] - member g.SpawnFuture p = - let resultCell = new ResultCell<_>() - - // OK, queueWorkItem the async computation and when it's done register completion - queueWorkItem - g - // on success, record the result - (fun res -> resultCell.RegisterResult (Ok res); FakeUnit) - // on exception... - (fun exn -> resultCell.RegisterResult (Error(exn)); FakeUnit) - // on cancellation... - (fun exn -> resultCell.RegisterResult (Error(exn :> Exception)); FakeUnit) - p - new AsyncFuture<_>(resultCell) - - type Async with - - [] - static member SpawnFuture (p: Async<'T>) = - (!defaultAsyncGroup).SpawnFuture p - -#endif - - [] - [] - type Mailbox<'Msg>() = - let mutable inbox_store = null - let mutable arrivals = new Queue<'Msg>() - let syncRoot = arrivals - - // Control elements indicating the state of the reader. When the reader is "blocked" at an - // asynchronous receive, either - // -- "cont" is non-null and the reader is "activated" by re-scheduling cont in the thread pool; or - // -- "pulse" is non-null and the reader is "activated" by setting this event - let mutable cont : (bool -> FakeUnitValue) = Unchecked.defaultof<_> - let mutable pulse : AutoResetEvent = null - let ensurePulse() = - match pulse with - | null -> - pulse <- new AutoResetEvent(false); - | ev -> - () - pulse - - let waitOneNoTimeout = - P (fun args -> - match box cont with - | null -> - let descheduled = - // An arrival may have happened while we're preparing to deschedule - lock syncRoot (fun () -> - if arrivals.Count = 0 then - // OK, no arrival so deschedule - cont <- args.cont; - true - else - false) - if descheduled then - FakeUnit - else - // If we didn't deschedule then run the continuation immediately - args.cont true - | _ -> - failwith "multiple waiting reader continuations for mailbox") - - let waitOne(timeout) = - if timeout < 0 then - waitOneNoTimeout - else - ensurePulse().AsyncWaitOne(millisecondsTimeout=timeout) - - member x.inbox = - match inbox_store with - | null -> inbox_store <- new System.Collections.Generic.List<'Msg>(1) // ResizeArray - | _ -> () - inbox_store - - member x.scanArrivalsUnsafe(f) = - if arrivals.Count = 0 then None - else let msg = arrivals.Dequeue() - match f msg with - | None -> - x.inbox.Add(msg); - x.scanArrivalsUnsafe(f) - | res -> res - // Lock the arrivals queue while we scan that - member x.scanArrivals(f) = lock syncRoot (fun () -> x.scanArrivalsUnsafe(f)) - - member x.scanInbox(f,n) = - match inbox_store with - | null -> None - | inbox -> - if n >= inbox.Count - then None - else - let msg = inbox.[n] - match f msg with - | None -> x.scanInbox (f,n+1) - | res -> inbox.RemoveAt(n); res - - member x.receiveFromArrivalsUnsafe() = - if arrivals.Count = 0 then None - else Some(arrivals.Dequeue()) - - member x.receiveFromArrivals() = - lock syncRoot (fun () -> x.receiveFromArrivalsUnsafe()) - - member x.receiveFromInbox() = - match inbox_store with - | null -> None - | inbox -> - if inbox.Count = 0 - then None - else - let x = inbox.[0] - inbox.RemoveAt(0); - Some(x) - - member x.Post(msg) = - lock syncRoot (fun () -> - arrivals.Enqueue(msg); - // This is called when we enqueue a message, within a lock - // We cooperatively unblock any waiting reader. If there is no waiting - // reader we just leave the message in the incoming queue - match box cont with - | null -> - match pulse with - | null -> - () // no one waiting, leaving the message in the queue is sufficient - | ev -> - // someone is waiting on the wait handle - ev.Set() |> ignore - | _ -> - let c = cont - cont <- Unchecked.defaultof<_> - //if not (ExecutionContext.IsFlowSuppressed()) then ExecutionContext.SuppressFlow() |> ignore - ThreadPool.QueueUserWorkItem(fun _ -> c true |> unfake) |> ignore) - - member x.TryScan ((f: 'Msg -> (Async<'T>) option), timeout) : Async<'T option> = - let rec scan() = - async { match x.scanArrivals(f) with - | None -> // Deschedule and wait for a message. When it comes, rescan the arrivals - let! ok = waitOne(timeout) - if ok then return! scan() else return None - | Some resP -> let! res = resP - return Some(res) } - // Look in the inbox first - async { match x.scanInbox(f,0) with - | None -> return! scan() - | Some resP -> let! res = resP - return Some(res) } - - member x.Scan((f: 'Msg -> (Async<'T>) option), timeout) = - async { let! resOpt = x.TryScan(f,timeout) - match resOpt with - | None -> return raise(TimeoutException("Mailbox.Scan timed out")) - | Some res -> return res } - - - member x.TryReceive(timeout) = - let rec processFirstArrival() = - async { match x.receiveFromArrivals() with - | None -> - // Wait until we have been notified about a message. When that happens, rescan the arrivals - let! ok = waitOne(timeout) - if ok then return! processFirstArrival() - else return None - | res -> return res } - // look in the inbox first - async { match x.receiveFromInbox() with - | None -> return! processFirstArrival() - | res -> return res } - - member x.Receive(timeout) = - - let rec processFirstArrival() = - async { match x.receiveFromArrivals() with - | None -> - // Wait until we have been notified about a message. When that happens, rescan the arrivals - let! ok = waitOne(timeout) - if ok then return! processFirstArrival() - else return raise(TimeoutException("Mailbox.Receive timed out")) - | Some res -> return res } - // look in the inbox first - async { match x.receiveFromInbox() with - | None -> return! processFirstArrival() - | Some res -> return res } - - interface System.IDisposable with - member x.Dispose() = - if pulse <> null then (pulse :> IDisposable).Dispose() - -#if DEBUG - member x.UnsafeContents = - (x.inbox,arrivals,pulse,cont) |> box -#endif - - - [] - type AsyncReplyChannel<'Reply>(replyf : 'Reply -> unit) = - member x.Reply(reply) = replyf(reply) - - [] - [] - type MailboxProcessor<'Msg>(initialState,?asyncGroup) = - let asyncGroup = defaultArg asyncGroup !defaultAsyncGroup - let mailbox = new Mailbox<'Msg>() - let mutable defaultTimeout = Threading.Timeout.Infinite - let mutable started = false - - member x.DefaultTimeout with get() = defaultTimeout and set(v) = defaultTimeout <- v -#if DEBUG - member x.UnsafeMessageQueueContents = mailbox.UnsafeContents -#endif - member x.Start() = - if started then - raise (new InvalidOperationException("the mailbox has already been started")) - else - started <- true - asyncGroup.Start(computation=initialState(x)) - member x.Post(msg) = mailbox.Post(msg) - - member x.TryPostAndReply(msgf : (_ -> 'Msg), ?timeout) : 'Reply option = - let timeout = defaultArg timeout defaultTimeout - use resultCell = new ResultCell<_>() - let msg = msgf (AsyncReplyChannel<_>(fun reply -> - // Note the ResultCell may have been disposed if the operation - // timed out. In this case RegisterResult drops the result on the floor. - resultCell.RegisterResult(reply))) - mailbox.Post(msg) - resultCell.TryWaitForResult(timeout=timeout) - - member x.PostAndReply(msgf, ?timeout) : 'Reply = - match x.TryPostAndReply(msgf,?timeout=timeout) with - | None -> raise (TimeoutException("PostAndReply timed out")) - | Some res -> res - - member x.AsyncTryPostAndReply(msgf, ?timeout) : Async<'Reply option> = - let timeout = defaultArg timeout defaultTimeout - let resultCell = new ResultCell<_>() - let msg = msgf (AsyncReplyChannel<_>(fun reply -> - // Note the ResultCell may have been disposed if the operation - // timed out. In this case RegisterResult drops the result on the floor. - resultCell.RegisterResult(reply))) - mailbox.Post(msg) - async { use disposeCell = resultCell - let! ok = resultCell.GetWaitHandle().AsyncWaitOne(millisecondsTimeout=timeout) - let res = (if ok then Some(resultCell.GrabResult()) else None) - return res } - - member x.AsyncPostAndReply(msgf, ?timeout) = - let timeout = defaultArg timeout defaultTimeout - let asyncReply = x.AsyncTryPostAndReply(msgf,timeout=timeout) - async { let! res = asyncReply - match res with - | None -> return! raise (TimeoutException("AsyncPostAndReply timed out")) - | Some res -> return res } - - member x.Receive(?timeout) = mailbox.Receive(timeout=defaultArg timeout defaultTimeout) - member x.TryReceive(?timeout) = mailbox.TryReceive(timeout=defaultArg timeout defaultTimeout) - member x.Scan(f: 'Msg -> (Async<'T>) option,?timeout) = mailbox.Scan(f,timeout=defaultArg timeout defaultTimeout) - member x.TryScan(f: 'Msg -> (Async<'T>) option,?timeout) = mailbox.TryScan(f,timeout=defaultArg timeout defaultTimeout) - - interface System.IDisposable with - member x.Dispose() = (mailbox :> IDisposable).Dispose() - - static member Start(initialState,?asyncGroup) = - let mb = new MailboxProcessor<'Msg>(initialState,?asyncGroup=asyncGroup) - mb.Start(); - mb - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/control.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/control.fsi deleted file mode 100644 index 6095c982..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/control.fsi +++ /dev/null @@ -1,508 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// This namespace contains types for derived control constructs including -/// on-demand and asynchronous computations. -namespace Microsoft.FSharp.Control - - #nowarn "44" // This construct is deprecated. This method will be removed in the next version of F# and may no longer be used. Consider using Async.RunWithContinuations - - open System - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Control - open Microsoft.FSharp.Collections - -#if FX_ATLEAST_40 - open System.Threading.Tasks -#endif - -#if FX_NO_OPERATION_CANCELLED - - type OperationCanceledException = - inherit System.Exception - new : System.String -> OperationCanceledException -#endif - -#if DONT_INCLUDE_DEPRECATED - type -#else - [] - [] - [] - type AsyncFuture<'T> = - interface System.IDisposable - interface System.IAsyncResult - /// Wait for the completion of the operation and get its result - member Value : 'T - - - /// A handle to a capability to cancel a set of asynchronous computations. - and -#endif - - [] - AsyncGroup = - /// Generate a new asynchronous group - new : unit -> AsyncGroup - /// Raise the cancellation condition for this group of computations - member TriggerCancel : ?message:string -> unit - - /// Run the asynchronous computation and await its result. - /// - /// If an exception occurs in the asynchronous computation then an exception is re-raised by this - /// function. - member RunSynchronously : computation:Async<'T> * ?timeout : int -> 'T - - /// Start the asynchronous computation as a work item. Do not await its result. - member Start : computation:Async -> unit - -#if FX_ATLEAST_40 - /// Creates a System.Threading.Tasks.Task that executes asynchronous computation. - /// The task is not started. - member CreateTask : computation:Async<'T> * ?taskCreationOptions : TaskCreationOptions -> Task<'T> - - /// Starts a System.Threading.Tasks.Task that executes asynchronous computation. - member StartAsTask : computation:Async<'T> * ?taskCreationOptions : TaskCreationOptions -> Task<'T> - - /// Creates an asynchronous computation which starts given computation as System.Threading.Tasks.Task - member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions : TaskCreationOptions -> Async> -#endif - -#if DONT_INCLUDE_DEPRECATED -#else - [] - member Run : computation:Async<'T> * ?timeout : int -> 'T - - [] - member Spawn : computation:Async -> unit - - [] - member SpawnFuture : computation:Async<'T> -> AsyncFuture<'T> -#endif - - /// Start the asynchronous computation as a work item. - /// Return a handle to the computation as an AsyncFuture. - member RunWithContinuations: continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * computation:Async<'T> -> unit - - /// An asynchronous computation, which, when run, will eventually produce a value - /// of the given type, or else raise an exception. The value and/or exception is not returned - /// to the caller immediately, but is rather passed to a success continuation, exception continuation - /// or cancellation continuation. - /// - /// Asynchronous computations are normally specified using the F# 'workflow' syntax for building - /// computations. - /// - /// When run, asynchronous computations can normally be thought of as running run in one of - /// two modes: 'work item mode' or 'waiting mode'. - /// - /// - 'work item mode' indicates that the computation is executing as a work item, - /// e.g. in the .NET Thread Pool via ThreadPool.QueueUserWorkItem, or is running - /// a brief event-response action on the GUI thread. - /// - /// - 'waiting mode' indicates the computations a waiting for asynchronous I/O completions, - /// typically suspended as thunks using ThreadPool.RegisterWaitForSingleObject. - /// - /// Asynchronous computations running as 'work items' should not generally perform blocking - /// operations, e.g. long running synchronous loops. However, some asynchronous - /// computations may, out of necessity, need to execute blocking I/O operations: - /// these should be run on new threads or a user-managed pool of threads specifically - /// dedicated to resolving blocking conditions. For example, System.IO.OpenFile is, by - /// design, a blocking operation. However frequently it is important to code as - /// if this is asynchronous. This can be done by executing Async.SwitchToNewThread - /// as part of the workflow. - /// - /// When run, asynchronous computations belong to an AsyncGroup. This can usually be specified - /// when the async computation is started. The only action on an AsyncGroup is to raise a cancellation - /// condition for the AsyncGroup. Async values check the cancellation condition for their AsyncGroup - /// regularly, though synchronous computations within an asynchronous computation will not automatically - /// check this condition. This gives a user-level cooperative cancellation protocol. - and - [] - [] - Async<'T> - - /// This static class holds members for creating and manipulating asynchronous computations - and - [] - Async = - - /// Run the asynchronous computation and await its result. - /// - /// If an exception occurs in the asynchronous computation then an exception is re-raised by this - /// function. - /// - /// Run as part of the default AsyncGroup - static member RunSynchronously : computation:Async<'T> * ?timeout : int -> 'T - -#if DONT_INCLUDE_DEPRECATED -#else - [] - static member Run : computation:Async<'T> * ?timeout : int -> 'T - -#if FX_NO_SYNC_CONTEXT -#else - [] - static member SpawnThenPostBack : computation:Async<'T> * postBack:('T -> unit) -> unit -#endif -#endif - - /// Start the asynchronous computation in the thread pool. Do not await its result. - /// - /// Run as part of the default AsyncGroup - static member Start : computation:Async -> unit - -#if DONT_INCLUDE_DEPRECATED -#else - [] - static member Spawn : computation:Async -> unit - - [] - static member SpawnFuture : computation:Async<'T> -> AsyncFuture<'T> -#endif - -#if FX_ATLEAST_40 - /// Creates a System.Threading.Tasks.Task that executes asynchronous computation. - /// The task is not started. - static member CreateTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Task<'T> - - /// Starts a System.Threading.Tasks.Task that executes asynchronous computation. - static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Task<'T> - - /// Creates an asynchronous computation which starts given computation as System.Threading.Tasks.Task - static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Async> -#endif - - /// Run an asynchronous computation, initially as a work item. - /// - /// Run as part of the default AsyncGroup - static member RunWithContinuations: continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * computation:Async<'T> -> unit - - //---------- Exceptions - - /// Get the default group for executing asynchronous computations - static member Catch : computation:Async<'T> -> Async> - - /// Specify an asynchronous computation that, when run, executes computation, - /// If p is effectively cancelled before its termination then - /// the process f exn is executed. - static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T> - - //---------- Cancellation checking and performing actions on cancellation. - -#if DONT_INCLUDE_DEPRECATED -#else - [] - static member CancelCheck : unit -> Async -#endif - - /// Generate a scoped, cooperative cancellation handler for use within an asynchronous workflow. - /// - /// async { use! holder = Async.OnCancel f ... } generates an asynchronous computation where, - /// if a cancellation happens any time during the execution of the asynchronous computation in the scope of 'holder', - /// then action 'f' is executed on the thread that is performing the cancellation. You can use - /// this to arrange for your own computation to be asynchronously notified that a cancellation has occurred, e.g. - /// by setting a flag, or deregistering a pending I/O action. - static member OnCancel : compensation: (string -> unit) -> Async - - /// Raise the cancellation condition for the most recent set of Async computations started without any specific AsyncGroup. - /// Replace the global group with a new global group for any asynchronous computations created after this point without - /// any specific AsyncGroup. - static member CancelDefaultGroup : ?message:string -> unit - - /// Get the default group for executing asynchronous computations - static member DefaultGroup : AsyncGroup - - //---------- Parallelism - - /// Start a child computation within an asynchronous workflow. - /// This allows multiple asynchronous computations to be executed simultaneously. - /// - /// This method should normally be used as the immediate - /// right-hand-side of a 'let!' binding in an F# asynchronous workflow, i.e., - /// - /// async { ... - /// let! completor1 = childComputation1 |> Async.StartChild - /// let! completor2 = childComputation2 |> Async.StartChild - /// ... - /// let! result1 = completor1 - /// let! result2 = completor2 - /// ... } - /// - /// When used in this way, each use of StartChild starts an instance of childComputation - /// and returns a completor object representing a computation to wait for the completion of the operation. - /// When executed, the completor awaits the completion of childComputation. - static member StartChild : computation:Async<'T> * ?millisecondsTimeout : int -> Async> - - -#if DONT_INCLUDE_DEPRECATED -#else - [Async.StartChild(computation) |> Async.Ignore or let! _ = Async.StartChild(computation). This indicates that results and errors from the child computation are ignored")>] - static member SpawnChild : computation:Async -> Async - - [] - static member Generate : itemCount:int * generator: (int -> Async<'T>) * ?groupCount: int -> Async<'T array> -#endif - - /// Specify an asynchronous computation that, when run, executes all the given asynchronous computations, initially - /// queueing each as work items and using a fork/join pattern. If any raise an exception then the - /// overall computation will raise the first detected exception, and attempt to cancel the others. - /// All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. - static member Parallel : computationList:seq> -> Async<'T array> - - /// Specify an asynchronous computation that, when run, executes the two asynchronous computations, starting each in the thread pool. - /// If any raise an exception then the overall computation will raise an exception, and attempt to cancel the others. - /// All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. - static member Parallel2 : computation1:Async<'T1> * computation2:Async<'T2> -> Async<'T1 * 'T2> - - /// Specify an asynchronous computation that, when run, executese the three asynchronous computations, starting each in the thread pool. - /// If any raise an exception then the overall computation will raise an exception, and attempt to cancel the others. - /// All the sub-computations belong to an AsyncGroup that is a subsidiary of the AsyncGroup of the outer computations. - static member Parallel3 : computation1:Async<'T1> * computation2:Async<'T2> * computation3:Async<'T3> -> Async<'T1 * 'T2 * 'T3> - - //---------- Thread Control - - /// Specify an asynchronous computation that, when run, creates a new thread and runs - /// its continutation in that thread - static member SwitchToNewThread : unit -> Async - - /// Specify an asynchronous computation that, when run, queues a CPU-intensive work in the thread pool item that runs - /// its continutation. - static member SwitchToThreadPool : unit -> Async - -#if FX_NO_SYNC_CONTEXT -#else - /// Specify an asynchronous computation that, when run, runs - /// its continuation using syncContext.Post. If syncContext is null - /// then the asynchronous computation is equivalent to SwitchToThreadPool(). - static member SwitchToGuiThread : syncContext:System.Threading.SynchronizationContext -> Async -#endif - - - //---------- Building new primitive Async values - -#if DONT_INCLUDE_DEPRECATED -#else - [] - [] - static member Primitive : callback:(('T -> unit) * (exn -> unit) -> unit) -> Async<'T> -#endif - - /// Specify an asynchronous computation that, when run, executes the given callback. - /// The callback must eventually call either the continuation, - /// the exception continuation or the cancel exception. - [] - static member Primitive : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> - - /// Specify an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in .NET APIs where the overall operation is not qualified by any arguments. For example, - /// Async.BuildPrimitive(ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, the 'Begin' half of the operation is executed, and - /// an asynchronous computation is returned that, when run, awaits the completion - /// of the computation and fetches its overall result using the 'End' operation. - [] - static member BuildPrimitive : beginAction:(System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) -> Async<'T> - - /// Specify an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in .NET APIs where the - /// overall operation is qualified by one argument. For example, - /// Async.BuildPrimitive(place,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, the 'Begin' half of the operation is executed, and - /// an asynchronous computation is returned that, when run, awaits the completion - /// of the computation and fetches its overall result using the 'End' operation. - [] - static member BuildPrimitive : arg:'Arg1 * beginAction:('Arg1 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) -> Async<'T> - - /// Specify an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in .NET APIs where the - /// overall operation is qualified by two arguments. For example, - /// Async.BuildPrimitive(arg1,arg2,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, the 'Begin' half of the operation is executed, and - /// an asynchronous computation is returned that, when run, awaits the completion - /// of the computation and fetches its overall result using the 'End' operation. - [] - static member BuildPrimitive : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) -> Async<'T> - - /// Specify an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in .NET APIs where the overall operation is qualified by three arguments. For example, - /// Async.BuildPrimitive(arg1,arg2,arg3,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, the 'Begin' half of the operation is executed, and - /// an asynchronous computation is returned that, when run, awaits the completion - /// of the computation and fetches its overall result using the 'End' operation. - [] - static member BuildPrimitive : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) -> Async<'T> - - /// Specify an asynchronous computation that, when run, runs 'p', ignoring the result and - /// returning the result '()'. - static member Ignore : computation: Async<'T> -> Async - - - [] - /// The type of the 'async' operator, used to build workflows for asynchronous computations. - type AsyncBuilder = - /// Specify an asynchronous computation that, when run, enumerates the sequence 'seq' - /// on demand and runs 'f' for each element. - member For: sequence:seq<'T> * body:('T -> Async) -> Async - - /// Specify an asynchronous computation that, when run, just returns '()' - member Zero : unit -> Async - - /// Specify an asynchronous computation that, when run, first runs 'p1' and then runs 'p2', returning the result of 'p2'. - member Combine : computation1:Async * computation2:Async<'T> -> Async<'T> - - /// Specify an asynchronous computation that, when run, runs 'p' repeatedly - /// until 'gd()' becomes false. - member While : guard:(unit -> bool) * computation:Async -> Async - - /// Specify an asynchronous computation that, when run, returns the result 'v' - member Return : value:'T -> Async<'T> - - /// Specify an asynchronous computation that, when run, runs 'f()' - member Delay : generator:(unit -> Async<'T>) -> Async<'T> - - /// Specify an asynchronous computation that, when run, runs 'f(resource)'. - /// The action 'resource.Dispose()' is executed as this computation yields its result - /// or if the asynchronous computation exits by an exception or by cancellation. - member Using: resource:'T * binder:('T -> Async<'U>) -> Async<'U> when 'T :> System.IDisposable - - /// Specify an asynchronous computation that, when run, runs 'p', and when - /// 'p' generates a result 'T', runs 'f res'. - member Bind: computation: Async<'T> * binder: ('T -> Async<'U>) -> Async<'U> - - /// Specify an asynchronous computation that, when run, runs 'p'. The action 'f' is executed - /// after 'p' completes, whether 'p' exits normally or by an exception. If 'f' raises an exception itself - /// the original exception is discarded and the new exception becomes the overall result of the computation. - member TryFinally : computation:Async<'T> * compensation:(unit -> unit) -> Async<'T> - - /// Specify an asynchronous computation that, when run, runs 'p' and returns its result. - /// If an exception happens then 'f(exn)' is called and the resulting computation executed instead. - member TryWith : computation:Async<'T> * catchHandler:(exn -> Async<'T>) -> Async<'T> - - /// Generate an object used to build asynchronous computations using F# computation expressions. The value - /// 'async' is a pre-defined instance of this type. - internal new : unit -> AsyncBuilder - - - [] - /// A module of extension members that provide asynchronous operations for some basic .NET types related to concurrency and I/O. - module CommonExtensions = - open System.IO - - type System.IO.Stream with - - /// Return an asynchronous computation that will read from the stream into the given buffer. - member AsyncRead : buffer:byte[] * ?offset:int * ?count:int -> Async - - /// Return an asynchronous computation that will read the given number of bytes from the stream - member AsyncRead : count:int -> Async - - /// Return an asynchronous computation that will write the given bytes to the stream - member AsyncWrite : buffer:byte[] * ?offset:int * ?count:int -> Async - - type System.Threading.WaitHandle with - /// Return an asynchronous computation that will wait on the given WaitHandle. This is scheduled - /// as a wait-item in the .NET thread pool using RegisterWaitForSingleObject, - /// meaning that the operation will not block any .NET threads for - /// the duration of the wait. - member AsyncWaitOne: ?millisecondsTimeout:int -> Async - - type System.Threading.Thread with - /// Return an asynchronous computation that will sleep for the given time. This is scheduled - /// using a System.Threading.Timer object, meaning that the operation will not block any threads - /// for the duration of the wait. - static member AsyncSleep : millisecondsDueTime:int -> Async - -#if FX_ATLEAST_40 - type System.Threading.Tasks.Task<'T> with - member AsyncValue : Async<'T> -#endif - - - [] - /// A handle to a capability to reply to a PostAndReply message - type AsyncReplyChannel<'Reply> = - /// Send a reply to a PostAndReply message - member Reply : value:'Reply -> unit - - /// A MailboxProcessor is a message-processing agent defined using an asynchronous workflow. - /// The agent encapsulates a message queue that supports multiple-writers and the single reader agent. - /// Writers send messages to the agent by using the Post, PostAndReply or AsyncPostAndReply methods. - /// - /// The reader agent is specified when creating the MailboxProcessor. The - /// agent is usually an asychronous workflow that waits for messages - /// by using the Receive or TryReceive methods. - /// A MailboxProcessor may also scan through all available messages by using the - /// Scan or TryScan method. The encapsulated message queue only - /// supports a single active reader, thus at most one concurrent call to Receive, TryReceive, - /// Scan and/or TryScan may be active at any one time. - - [] - [] - type MailboxProcessor<'Msg> = - - /// Create an instance of a MailboxProcessor. The asynchronous computation executed by the - /// processor is the one returned by the 'initial' function. This function is not executed until - /// 'Start' is called. - new : initial:(MailboxProcessor<'Msg> -> Async) * ?asyncGroup: AsyncGroup -> MailboxProcessor<'Msg> - - /// Create and start an instance of a MailboxProcessor. The asynchronous computation executed by the - /// processor is the one returned by the 'initial' function. - static member Start : initial:(MailboxProcessor<'Msg> -> Async) * ?asyncGroup: AsyncGroup -> MailboxProcessor<'Msg> - - /// Post a message to the message queue of the MailboxProcessor, asynchronously - member Post : message:'Msg -> unit - - /// Post a message to the message queue of the MailboxProcessor and await a reply on the channel synchronously. - /// The message is produced by a single call to the first function which must build a message - /// containing the reply channel. The receiving MailboxProcessor must process this message and - /// invoke the Reply method on the reply channel precisly once. - member PostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply - - /// Post a message to the message queue of the MailboxProcessor and await a reply on the channel asynchronously. - /// The message is produced by a single call to the first function which must build a message - /// containing the reply channel. The receiving MailboxProcessor must process this message and - /// invoke the Reply method on the reply channel precisly once. - member AsyncPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply> - - /// Like PostAndReply, but return None if no reply within the timeout period. - member TryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply option - - /// Like AsyncPostAndReply, but return None if no reply within the timeout period. - member AsyncTryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply option> - - /// Return an asynchronous computation which will - /// consume the first message in arrival order. No thread - /// is blocked while waiting for further messages. Raise a TimeoutException - /// if the timeout is exceeded. - member Receive : ?timeout:int -> Async<'Msg> - - /// Return an asynchronous computation which will - /// consume the first message in arrival order. No thread - /// is blocked while waiting for further messages. Return None - /// if the timeout is exceeded. - member TryReceive : ?timeout:int -> Async<'Msg option> - - /// Return an asynchronous computation which will - /// look through messages in arrival order until 'scanner' returns a Some value. No thread - /// is blocked while waiting for further messages. Raise a TimeoutException - /// if the timeout is exceeded. - member Scan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T> - - /// Return an asynchronous computation which will - /// look through messages in arrival order until 'scanner' returns a Some value. No thread - /// is blocked while waiting for further messages. Return None - /// if the timeout is exceeded. - member TryScan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T option> - -#if DEBUG - member UnsafeMessageQueueContents : obj -#endif - - /// Start the MailboxProcessor - member Start : unit -> unit - - /// Raise a timeout exception if a message not received in this amount of time. Default infinite. - member DefaultTimeout : int with get, set - - interface System.IDisposable diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/event.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/event.fs deleted file mode 100644 index 770aa954..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/event.fs +++ /dev/null @@ -1,158 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Control - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Control - open System.Reflection - open System.Diagnostics - -#if FX_NO_DELEGATE_DYNAMIC_METHOD -#else - -#if FX_NO_DELEGATE_DYNAMIC_INVOKE - module Impl = - type System.Delegate with - member d.DynamicInvoke(args: obj[]) = - d.Method.Invoke(d.Target, BindingFlags.Default ||| BindingFlags.Public ||| BindingFlags.NonPublic , null, args, null) - - open Impl -#endif - - type DelegateEvent<'Del when 'Del :> System.Delegate>() = - let mutable multicast : System.Delegate = null - member x.Trigger(args:obj[]) = - match multicast with - | null -> () - | d -> d.DynamicInvoke(args) |> ignore - member x.Publish = - { new IDelegateEvent<'Del> with - member x.AddHandler(d) = - multicast <- System.Delegate.Combine(multicast, d) - member x.RemoveHandler(d) = - multicast <- System.Delegate.Remove(multicast, d) } - - [] - type Event<'Del,'Args when 'Del : delegate<'Args,unit> and 'Del :> System.Delegate >() = - let mutable multicast : System.Delegate = null - static let argTypes = - let instanceBindingFlags = BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly - let mi = typeof<'Del>.GetMethod("Invoke",instanceBindingFlags) - mi.GetParameters() |> (fun arr -> arr.[1..]) |> Array.map (fun p -> p.ParameterType) - - member x.Trigger(sender:obj,args:'Args) = - match multicast with - | null -> () - | d -> - if argTypes.Length = 1 then - d.DynamicInvoke([| sender; box args |]) |> ignore - else - d.DynamicInvoke(Array.append [| sender |] (Microsoft.FSharp.Reflection.FSharpValue.GetTupleFields(box args))) |> ignore - member x.Publish = - { new IEvent<'Del,'Args> with - member x.Add(f) = - multicast <- System.Delegate.Combine(multicast, new Handler<'Args>(fun sender arg -> f arg)) - member x.AddHandler(d) = - multicast <- System.Delegate.Combine(multicast, d) - member x.RemoveHandler(d) = - multicast <- System.Delegate.Remove(multicast, d) } -#endif - - [] - type Event<'T>() = - let mutable multicast : Handler<'T> option = None - member x.Delegate - with get () = match multicast with None -> null | Some(d) -> (d :> System.Delegate) - and set v = multicast <- (match v with null -> None | d -> Some d) - member x.Trigger(arg:'T) = - match multicast with - | None -> () - | Some d -> d.Invoke(null,arg) |> ignore - member x.Publish = - { new IEvent<'T> with - member e.AddHandler(d) = - x.Delegate <- (System.Delegate.Combine(x.Delegate, d) :?> Handler<'T>) - member e.RemoveHandler(d) = - x.Delegate <- (System.Delegate.Remove(x.Delegate, d) :?> Handler<'T>) - member e.Add(f:'T -> unit) = - x.Delegate <- (System.Delegate.Combine(x.Delegate, new Handler<'T>(fun sender arg -> f arg)) :?> Handler<'T>) } - - [] - [] - module Event = - [] - let create<'T>() = - let ev = new Event<'T>() - ev.Trigger, ev.Publish - - [] - let map f (w: IEvent<'Del,'T>) = - let ev = new Event<_>() - w.Add(fun x -> ev.Trigger(f x)); - ev.Publish - - [] - let filter f (w: IEvent<'Del,'T>) = - let ev = new Event<_>() - w.Add(fun x -> if f x then ev.Trigger x); - ev.Publish - - [] - let partition f (w: IEvent<'Del,'T>) = - let ev1 = new Event<_>() - let ev2 = new Event<_>() - w.Add(fun x -> if f x then ev1.Trigger x else ev2.Trigger x); - ev1.Publish,ev2.Publish - - [] - let choose f (w: IEvent<'Del,'T>) = - let ev = new Event<_>() - w.Add(fun x -> match f x with None -> () | Some r -> ev.Trigger r); - ev.Publish - - [] - let scan f z (w: IEvent<'Del,'T>) = - let state = ref z - let ev = new Event<_>() - w.Add(fun msg -> - let z = !state - let z = f z msg - state := z; - ev.Trigger(z)); - ev.Publish - - [] - let listen f (w: IEvent<'Del,'T>) = w.Add(f) - - [] - let pairwise (inp : IEvent<'Del,'T>) : IEvent<'T * 'T> = - let ev = new Event<'T * 'T>() - let lastArgs = ref None - inp.Add(fun args2 -> - (match !lastArgs with - | None -> () - | Some args1 -> ev.Trigger(args1,args2)); - lastArgs := Some args2); - - ev.Publish - - [] - let merge (w1: IEvent<'Del1,'T>) (w2: IEvent<'Del2,'T>) = - let ev = new Event<_>() - w1.Add(fun x -> ev.Trigger(x)); - w2.Add(fun x -> ev.Trigger(x)); - ev.Publish - - [] - let split (f : 'T -> Choice<'U1,'U2>) (w: IEvent<'Del,'T>) = - let ev1 = new Event<_>() - let ev2 = new Event<_>() - w.Add(fun x -> match f x with Choice1Of2 y -> ev1.Trigger(y) | Choice2Of2 z -> ev2.Trigger(z)); - ev1.Publish,ev2.Publish - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/event.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/event.fsi deleted file mode 100644 index cee7cdec..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/event.fsi +++ /dev/null @@ -1,99 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Control - - open System - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Control - open Microsoft.FSharp.Collections - -#if FX_NO_DELEGATE_DYNAMIC_METHOD // not available on CompactFramework 2.0 -#else - /// Event implementations for an arbitrary type of delegate - type DelegateEvent<'Del when 'Del :> System.Delegate> = - /// Create an event object suitable for implementing an arbitrary type of delegate - new : unit -> DelegateEvent<'Del> - /// Trigger the event using the given parameters - member Trigger : args:obj[] -> unit - /// Publish the event as a first class event value - member Publish : IDelegateEvent<'Del> - - /// Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument - type Event<'Del,'Args when 'Del : delegate<'Args,unit> and 'Del :> System.Delegate > = - /// Create an event object suitable for delegate types following the standard .NET Framework convention of a first 'sender' argument - new : unit -> Event<'Del,'Args> - /// Trigger the event using the given sender object and parameters. The sender object may be null. - member Trigger : sender:obj * args:'Args -> unit - /// Publish the event as a first class event value - member Publish : IEvent<'Del,'Args> - -#endif - /// Event implementations for the IEvent<_> type - type Event<'T> = - /// Create an event object suitable for implementing for the IEvent<_> type - new : unit -> Event<'T> - /// Trigger the event using the given parameters - member Trigger : arg:'T -> unit - /// Publish the event as a first class event value - member Publish : IEvent<'T> - - - [] - [] - /// Basic operations on first class event objects. - module Event = - - /// Create an IEvent with no initial listeners. Two items are returned: - /// a function to invoke (trigger) the event, and the event that clients - /// can plug listeners into. - val create : unit -> ('T -> unit) * IEvent<'T> - - /// Fire the output event when either of the input events fire - val merge: event1:IEvent<'del1,'T> -> event2:IEvent<'del2,'T> -> IEvent<'T> - - /// Return a new event that passes values transformed by the given function - val map: mapping:('T -> 'U) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> - - /// Return a new event that listens to the original event and triggers the resulting - /// event only when the argument to the event passes the given function - val filter: predicate:('T -> bool) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'T> - - /// Return a new event that listens to the original event and triggers the - /// first resulting event if the application of the predicate to the event arguments - /// returned true, and the second event if it returned false - val partition: predicate:('T -> bool) -> sourceEvent:IEvent<'Del,'T> -> (IEvent<'T> * IEvent<'T>) - - /// Return a new event that listens to the original event and triggers the - /// first resulting event if the application of the function to the event arguments - /// returned a Choice1Of2, and the second event if it returns a Choice2Of2 - val split: splitter:('T -> Choice<'U1,'U2>) -> sourceEvent:IEvent<'Del,'T> -> (IEvent<'U1> * IEvent<'U2>) - - /// Return a new event which fires on a selection of messages from the original event. - /// The selection function takes an original message to an optional new message. - val choose: chooser:('T -> 'U option) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> - - /// Return a new event consisting of the results of applying the given accumulating function - /// to successive values triggered on the input event. An item of internal state - /// records the current value of the state parameter. The internal state is not locked during the - /// execution of the accumulation function, so care should be taken that the - /// input IEvent not triggered by multiple threads simultaneously. - val scan: collector:('U -> 'T -> 'U) -> state:'U -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> - - /// Run the given function each time the given event is triggered. - val listen : callback:('T -> unit) -> sourceEvent:IEvent<'Del,'T> -> unit - - /// Return a new event that triggers on the second and subsequent triggerings of the input event. - /// The Nth triggering of the input event passes the arguments from the N-1th and Nth triggering as - /// a pair. The argument passed to the N-1th triggering is held in hidden internal state until the - /// Nth triggering occurs. - /// - /// You should ensure that the contents of the values being sent down the event are - /// not mutable. Note that many EventArgs types are mutable, e.g. MouseEventArgs, and - /// each firing of an event using this argument type may reuse the same physical - /// argument obejct with different values. In this case you should extract the necessary - /// information from the argument before using this combinator. - val pairwise: sourceEvent:IEvent<'Del,'T> -> IEvent<'T * 'T> - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/fslib-extra-pervasives.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/fslib-extra-pervasives.fs deleted file mode 100644 index 8fc58b67..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/fslib-extra-pervasives.fs +++ /dev/null @@ -1,152 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -module Microsoft.FSharp.Core.ExtraTopLevelOperators - -open System -open System.Collections.Generic -open System.IO -open System.Diagnostics -open Microsoft.FSharp -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Text -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Control -open Microsoft.FSharp.Primitives.Basics - -[] -let seq (x : seq<_>) = (x :> seq<_>) - -[] -let set l = Collections.Set.of_seq l - -[] -let dict l = - // Use a dictionary (this requires hashing and equality on the key type) - // Wrap keys in an Some(_) option in case they are null (when System.Collections.Generic.Dictionary fails). Sad but true. - let t = new Dictionary,_>(HashIdentity.Structural) - for (k,v) in l do - t.[Some(k)] <- v - let d = (t :> IDictionary<_,_>) - let c = (t :> ICollection<_>) - let ieg = (t :> IEnumerable<_>) - let ie = (t :> System.Collections.IEnumerable) - // Give a read-only view of the dictionary - { new IDictionary<'key, 'a> with - member s.Item - with get x = d.[Some(x)] - and set (x,v) = raise (NotSupportedException("This value may not be mutated")) - member s.Keys = - let keys = d.Keys - { new ICollection<'key> with - member s.Add(x) = raise (NotSupportedException("This value may not be mutated")); - member s.Clear() = raise (NotSupportedException("This value may not be mutated")); - member s.Remove(x) = raise (NotSupportedException("This value may not be mutated")); - member s.Contains(x) = keys.Contains(Some(x)) - member s.CopyTo(arr,i) = - let mutable n = 0 - for k in keys do - arr.[i+n] <- k.Value - n <- n + 1 - member s.IsReadOnly = true - member s.Count = keys.Count - interface IEnumerable<'key> with - member s.GetEnumerator() = (keys |> Seq.map (fun v -> v.Value)).GetEnumerator() - interface System.Collections.IEnumerable with - member s.GetEnumerator() = ((keys |> Seq.map (fun v -> v.Value)) :> System.Collections.IEnumerable).GetEnumerator() } - - member s.Values = d.Values - member s.Add(k,v) = raise (NotSupportedException("This value may not be mutated")) - member s.ContainsKey(k) = d.ContainsKey(Some(k)) - member s.TryGetValue(k,r) = - let key = Some(k) - if d.ContainsKey(key) then (r <- d.[key]; true) else false - member s.Remove(k : 'key) = (raise (NotSupportedException("This value may not be mutated")) : bool) - interface ICollection> with - member s.Add(x) = raise (NotSupportedException("This value may not be mutated")); - member s.Clear() = raise (NotSupportedException("This value may not be mutated")); - member s.Remove(x) = raise (NotSupportedException("This value may not be mutated")); - member s.Contains(KeyValue(k,v)) = c.Contains(KeyValuePair<_,_>(Some(k),v)) - member s.CopyTo(arr,i) = - let mutable n = 0 - for (KeyValue(k,v)) in c do - arr.[i+n] <- KeyValuePair<_,_>(k.Value,v) - n <- n + 1 - member s.IsReadOnly = true - member s.Count = c.Count - interface IEnumerable> with - member s.GetEnumerator() = - (c |> Seq.map (fun (KeyValue(k,v)) -> KeyValuePair<_,_>(k.Value,v))).GetEnumerator() - interface System.Collections.IEnumerable with - member s.GetEnumerator() = - ((c |> Seq.map (fun (KeyValue(k,v)) -> KeyValuePair<_,_>(k.Value,v))) :> System.Collections.IEnumerable).GetEnumerator() } - -// -------------------------------------------------------------------- -// Printf -// -------------------------------------------------------------------- - -[] -let sprintf fp = Printf.sprintf fp - -[] -let failwithf fp = Printf.failwithf fp - -[] -let fprintf (os:TextWriter) fp = Printf.fprintf os fp - -[] -let printf fp = Printf.printf fp - -[] -let eprintf fp = Printf.eprintf fp - -[] -let fprintfn (os:TextWriter) fp = Printf.fprintfn os fp - -[] -let printfn fp = Printf.printfn fp - -[] -let eprintfn fp = Printf.eprintfn fp - - -[] -let failwith s = raise (Failure s) - -[] -let output_any (oc: System.IO.TextWriter) x = Printf.fprintf oc "%A" x - -[] -let any_to_string x = Printf.sprintf "%A" x - -[] -let print_any x = Printf.printf "%A" x - - -[] -let async = new Microsoft.FSharp.Control.AsyncBuilder() - -#if FX_MINIMAL_REFLECTION // not on Compact Framework -#else -let (~%) (x:Microsoft.FSharp.Quotations.Expr<'a>) : 'a = failwith "first class uses of '%' are not permitted" - -let (~%%) (x: Microsoft.FSharp.Quotations.Expr) : 'a = failwith "first class uses of '%' are not permitted" -#endif - -[] -[] -[] -[] -[] -[] -[] -[] -do() - -let Array2 = 1 -let Array3 = 1 -let IEvent = 1 - -let (|Lazy|) (x:Lazy<_>) = x.SynchronizedForce() diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/fslib-extra-pervasives.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/fslib-extra-pervasives.fsi deleted file mode 100644 index d1402bac..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/fslib-extra-pervasives.fsi +++ /dev/null @@ -1,79 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -///Pervasives: Additional bindings available at the top level -module Microsoft.FSharp.Core.ExtraTopLevelOperators - -open System -open Microsoft.FSharp.Core -open Microsoft.FSharp.Control -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Text -open Microsoft.FSharp.Math - -#if DONT_INCLUDE_DEPRECATED -#else -[] -val any_to_string: 'T -> string - -[] -val output_any: System.IO.TextWriter -> 'T -> unit - -[] -val print_any : 'T -> unit -#endif - -/// 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,'d> -> '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 key objects are indexed using generic comparison -val set : elements:seq<'T> -> Set<'T> - -/// Build an aysnchronous workflow using computation expression syntax -val async : Microsoft.FSharp.Control.AsyncBuilder - -/// Builds a lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. -val dict : keyValuePairs:seq<'K * 'V> -> System.Collections.Generic.IDictionary <'K,'V> - -/// Builds a sequence using sequence expression syntax -val seq : sequence:seq<'T> -> seq<'T> - -#if FX_MINIMAL_REFLECTION // not on Compact Framework -#else -/// Special prefix operator for splicing typed expressions into quotation holes -val (~%) : expression:Microsoft.FSharp.Quotations.Expr<'T> -> 'T - -/// Special prefix operator for splicing untyped expressions into quotation holes -val (~%%) : expression:Microsoft.FSharp.Quotations.Expr -> 'T -#endif - -/// An active pattern to force the execution of values of type Lazy<_> -val (|Lazy|) : input:Lazy<'T> -> 'T - -#if DONT_INCLUDE_DEPRECATED -#else -[] -val Array2 : int - -[] -val Array3 : int - -[] -val IEvent : int -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/list.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/list.fs deleted file mode 100644 index b8d2b5f8..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/list.fs +++ /dev/null @@ -1,459 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Core.LanguagePrimitives - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - open System.Collections.Generic - - [] - [] - module List = - - [] - let length (list: 'a list) = list.Length - - [] - let rev list = Microsoft.FSharp.Primitives.Basics.List.rev list - - [] - let concat list = Microsoft.FSharp.Primitives.Basics.List.concat list - - [] - let map f list = Microsoft.FSharp.Primitives.Basics.List.map f list - - [] - let mapi f list = Microsoft.FSharp.Primitives.Basics.List.mapi f list - - [] - let iter f list = Microsoft.FSharp.Primitives.Basics.List.iter f list - - [] - let of_array (arr:'a array) = Microsoft.FSharp.Primitives.Basics.List.of_array arr - - [] - let to_array (list:'a list) = Microsoft.FSharp.Primitives.Basics.List.to_array list - - [] - let empty<'a> = ([ ] : 'a list) - - [] - let hd list = match list with (x:: _) -> x | [] -> invalidArg "list" "the input list was Empty" - - [] - let tl list = match list with (_ :: t) -> t | [] -> invalidArg "list" "the input list was Empty" - - [] - let isEmpty list = match list with [] -> true | _ -> false - - [] - let append list1 list2 = list1 @ list2 - - [] - let rec nth list index = - match list with - | h::t when index >= 0 -> - if index = 0 then h else nth t (index - 1) - | _ -> - invalidArg "index" "the index was outside the range of elements in the list" - - [] - let rec chooseAllAcc f xs acc = - match xs with - | [] -> rev acc - | h :: t -> - match f h with - | None -> chooseAllAcc f t acc - | Some x -> chooseAllAcc f t (x::acc) - - [] - let choose f xs = chooseAllAcc f xs [] - - [] - let iteri f list = Microsoft.FSharp.Primitives.Basics.List.iteri f list - - [] - let init n f = Microsoft.FSharp.Primitives.Basics.List.init n f - - [] - let rec initConstAcc n x acc = - if n <= 0 then acc else initConstAcc (n-1) x (x::acc) - - [] - let replicate count x = - if count < 0 then invalidArg "count" "the element count must be non-negative" - initConstAcc count x [] - - [] - let iter2 f list1 list2 = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let rec loop list1 list2 = - match list1,list2 with - | [],[] -> () - | (h1::t1), (h2::t2) -> f.Invoke(h1,h2); loop t1 t2 - | _ -> invalidArg "list2" "the lists had different lengths" - loop list1 list2 - - [] - let iteri2 f list1 list2 = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let rec loop n list1 list2 = - match list1,list2 with - | [],[] -> () - | (h1::t1), (h2::t2) -> f.Invoke(n,h1,h2); loop (n+1) t1 t2 - | _ -> invalidArg "list2" "the lists had different lengths" - loop 0 list1 list2 - - [] - let rec map3aux (f:OptimizedClosures.FastFunc3<_,_,_,_>) list1 list2 list3 acc = - match list1,list2,list3 with - | [],[],[] -> rev acc - | (h1::t1), (h2::t2),(h3::t3) -> let x = f.Invoke(h1,h2,h3) in map3aux f t1 t2 t3 (x :: acc) - | _ -> invalidArg "list3" "the lists had different lengths" - - [] - let map3 f list1 list2 list3 = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - map3aux f list1 list2 list3 [] - - [] - let rec mapi2aux n (f:OptimizedClosures.FastFunc3<_,_,_,_>) list1 list2 acc = - match list1,list2 with - | [],[] -> rev acc - | (h1::t1), (h2::t2) -> let x = f.Invoke(n,h1,h2) in mapi2aux (n+1) f t1 t2 (x :: acc) - | _ -> invalidArg "list2" "the lists had different lengths" - - [] - let mapi2 f list1 list2 = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - mapi2aux 0 f list1 list2 [] - - [] - let map2 f list1 list2 = Microsoft.FSharp.Primitives.Basics.List.map2 f list1 list2 - - [] - let fold f s list = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let rec loop s list = - match list with - | [] -> s - | (h::t) -> loop (f.Invoke(s,h)) t - loop s list - - [] - let reduce f list = - match list with - | [] -> invalidArg "list" "the input list was Empty" - | (h::t) -> fold f h t - - [] - let scan f s list = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let rec loop s list acc = - match list with - | [] -> rev acc - | (h::t) -> let s = f.Invoke(s,h) in loop s t (s :: acc) - loop s list [s] - - [] - let fold2 f acc list1 list2 = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - let rec loop acc list1 list2 = - match list1,list2 with - | [],[] -> acc - | (h1::t1),(h2::t2) -> loop (f.Invoke(acc,h1,h2)) t1 t2 - | _ -> invalidArg "list2" "the lists had different lengths" - loop acc list1 list2 - - [] - let foldArraySubRight (f:OptimizedClosures.FastFunc2<'a,_,_>) (arr: 'a[]) start fin acc = - let mutable state = acc - for i = fin downto start do - state <- f.Invoke(arr.[i], state) - state - - (* this version doesn't causes stack overflow - it uses a private stack *) - [] - let foldBack f list acc = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - match list with - | [] -> acc - | [h] -> f.Invoke(h,acc) - | [h1;h2] -> f.Invoke(h1,f.Invoke(h2,acc)) - | [h1;h2;h3] -> f.Invoke(h1,f.Invoke(h2,f.Invoke(h3,acc))) - | [h1;h2;h3;h4] -> f.Invoke(h1,f.Invoke(h2,f.Invoke(h3,f.Invoke(h4,acc)))) - | _ -> - // It is faster to allocate and iterate an array than to create all those - // highly nested stacks. It also means we won't get stack overflows here. - let arr = to_array list - let arrn = arr.Length - foldArraySubRight f arr 0 (arrn - 1) acc - - [] - let reduceBack f list = - match list with - | [] -> invalidArg "list" "the input list was Empty" - | _ -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let arr = to_array list - let arrn = arr.Length - foldArraySubRight f arr 0 (arrn - 2) arr.[arrn - 1] - - [] - let scanArraySubRight<'a,'b> (f:OptimizedClosures.FastFunc2<'a,'b,'b>) (arr:_[]) start fin initState = - let mutable state = initState - let mutable res = [state] - for i = fin downto start do - state <- f.Invoke(arr.[i], state); - res <- state :: res - res - - [] - let scanBack f list s = - match list with - | [] -> [s] - | [h] -> - [f h s; s] - | _ -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - // It is faster to allocate and iterate an array than to create all those - // highly nested stacks. It also means we won't get stack overflows here. - let arr = to_array list - let arrn = arr.Length - scanArraySubRight f arr 0 (arrn - 1) s - - [] - let rec foldBack2UsingArrays (f:OptimizedClosures.FastFunc3<_,_,_,_>) list1 list2 acc = - let arr1 = to_array list1 - let arr2 = to_array list2 - let n1 = arr1.Length - let n2 = arr2.Length - if n1 <> n2 then invalidArg "list2" "the input lists had different lengths"; - let mutable res = acc - for i = n1 - 1 downto 0 do - res <- f.Invoke(arr1.[i],arr2.[i],res) - res - - [] - let rec foldBack2 f list1 list2 acc = - match list1,list2 with - | [],[] -> acc - | h1::rest1, k1::rest2 -> - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - match rest1, rest2 with - | [],[] -> f.Invoke(h1,k1,acc) - | [h2],[k2] -> f.Invoke(h1,k1,f.Invoke(h2,k2,acc)) - | [h2;h3],[k2;k3] -> f.Invoke(h1,k1,f.Invoke(h2,k2,f.Invoke(h3,k3,acc))) - | [h2;h3;h4],[k2;k3;k4] -> f.Invoke(h1,k1,f.Invoke(h2,k2,f.Invoke(h3,k3,f.Invoke(h4,k4,acc)))) - | _ -> foldBack2UsingArrays f list1 list2 acc - | _ -> invalidArg "list2" "the input lists had different lengths" - - [] - let rec forall2aux (f:OptimizedClosures.FastFunc2<_,_,_>) list1 list2 = - match list1,list2 with - | [],[] -> true - | (h1::t1),(h2::t2) -> f.Invoke(h1,h2) && forall2aux f t1 t2 - | _ -> invalidArg "list2" "the input lists had different lengths" - - [] - let forall2 f list1 list2 = - match list1,list2 with - | [],[] -> true - | _ -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - forall2aux f list1 list2 - - [] - let forall f list1 = Microsoft.FSharp.Primitives.Basics.List.forall f list1 - - [] - let exists f list1 = Microsoft.FSharp.Primitives.Basics.List.exists f list1 - - [] - let rec exists2aux (f:OptimizedClosures.FastFunc2<_,_,_>) list1 list2 = - match list1,list2 with - | [],[] -> false - | (h1::t1),(h2::t2) ->f.Invoke(h1,h2) || exists2aux f t1 t2 - | _ -> invalidArg "list2" "the input lists had different lengths" - - [] - let rec exists2 f list1 list2 = - match list1,list2 with - | [],[] -> false - | _ -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - exists2aux f list1 list2 - - [] - let rec find f list = match list with [] -> raise (System.Collections.Generic.KeyNotFoundException()) | h::t -> if f h then h else find f t - - [] - let rec tryFind f list = match list with [] -> None | h::t -> if f h then Some h else tryFind f t - - [] - let rec tryPick f list = match list with [] -> None | h::t -> match f h with None -> tryPick f t | r -> r - - [] - let rec pick f list = match list with [] -> raise (System.Collections.Generic.KeyNotFoundException()) | h::t -> match f h with None -> pick f t | Some r -> r - - [] - let filter f x = Microsoft.FSharp.Primitives.Basics.List.filter f x - - [] - let partition p x = Microsoft.FSharp.Primitives.Basics.List.partition p x - - [] - let unzip x = Microsoft.FSharp.Primitives.Basics.List.unzip x - - [] - let unzip3 x = Microsoft.FSharp.Primitives.Basics.List.unzip3 x - - [] - let zip x1 x2 = Microsoft.FSharp.Primitives.Basics.List.zip x1 x2 - - [] - let zip3 x1 x2 x3 = Microsoft.FSharp.Primitives.Basics.List.zip3 x1 x2 x3 - - [] - let sortWith cmp xs = Microsoft.FSharp.Primitives.Basics.List.sortWith cmp xs - - [] - let sortBy f list = sortWith (fun x y -> Operators.compare (f x) (f y)) list - - [] - let sort list = sortWith Operators.compare list - - [] - let of_list list = Seq.of_list list - - [] - let of_seq ie = Seq.to_list ie - - [] - let to_seq ie = Seq.of_list ie - - [] - let findIndex f list = - let rec loop n = function[] -> raise (System.Collections.Generic.KeyNotFoundException()) | h::t -> if f h then n else loop (n+1) t - loop 0 list - - [] - let tryFindIndex f list = - let rec loop n = function[] -> None | h::t -> if f h then Some n else loop (n+1) t - loop 0 list - - [] - let inline sum (list:list<_>) = Seq.sum list - - [] - let inline sumBy f (list:list<_>) = Seq.sumBy f list - - [] - let max (list:list<_>) = Seq.max list - - [] - let maxBy f (list:list<_>) = Seq.maxBy f list - - [] - let min (list:list<_>) = Seq.min list - - [] - let minBy f (list:list<_>) = Seq.minBy f list - - [] - let inline average (list:list<_>) = Seq.average list - - [] - let inline averageBy f (list:list<_>) = Seq.averageBy f list - - [] - let collect f list = Microsoft.FSharp.Primitives.Basics.List.collect f list - - [] - let permute indexMap list = list |> to_array |> Array.permute indexMap |> of_array - - [] - let is_empty xs = isEmpty xs - - [] - let fold_left f z xs = fold f z xs - - [] - let fold_left2 f z xs1 xs2 = fold2 f z xs1 xs2 - - [] - let fold_right f xs z = foldBack f xs z - - [] - let fold_right2 f xs1 xs2 z = foldBack2 f xs1 xs2 z - - [] - let reduce_left f xs = reduce f xs - - [] - let reduce_right f xs = reduceBack f xs - - [] - let scan_left f z xs = scan f z xs - - [] - let scan_right f xs z = scanBack f xs z - - [] - let for_all f xs = forall f xs - - [] - let for_all2 f xs1 xs2 = forall2 f xs1 xs2 - - [] - let first f xs = tryPick f xs - - [] - let find_index f xs = findIndex f xs - - [] - let tryfind f xs = tryFind f xs - - [] - let tryfind_index f xs = tryFindIndex f xs - - [] - let sort_by f xs = sortBy f xs - - [] - let inline sum_by f xs = sumBy f xs - - [] - let inline average_by f xs = averageBy f xs - - [] - let min_by f xs = minBy f xs - - [] - let max_by f xs = maxBy f xs - - [] - let map_concat f xs = collect f xs - - [] - let stable_sort f xs = sortWith f xs - - [] - let split x = unzip x - - [] - let combine x1 x2 = zip x1 x2 - - [] - let find_all f x = filter f x - - [] - let flatten (list:seq>) = concat list - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/list.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/list.fsi deleted file mode 100644 index 4058e14b..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/list.fsi +++ /dev/null @@ -1,372 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - /// Basic operations on lists. - [] - [] - module List = - - /// Return a new list that contains the elements of the first list - /// followed by elements of the second - val append: list1:'T list -> list2:'T list -> 'T list - - /// Return the average of the elements in the list. - /// If the list is empty an ArgumentException is thrown. - val inline average : list:^T list -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member DivideByInt : ^T*int -> ^T) - and ^T : (static member Zero : ^T) - - /// Return the average of the elements generated by applying the function to each element of the list. - /// If the list is empty an ArgumentException is thrown. - val inline averageBy : projection:('T -> ^U) -> list:'T list -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U*int -> ^U) - and ^U : (static member Zero : ^U) - - /// Apply the given function to each element of the list. Return - /// the list comprised of the results x for each element where - /// the function returns Some(x) - val choose: chooser:('T -> 'U option) -> list:'T list -> 'U list - - /// For each element of the list, apply the given function. Concatenate all the results and return the combined list. - val collect: mapping:('T -> 'U list) -> list:'T list -> 'U list - - /// Return a new list that contains the elements of each the lists in order - val concat: lists:seq<'T list> -> 'T list - - /// Return an empty list of the given type - [] - val empty<'T> : 'T list - - /// Test if any element of the list satisfies the given predicate. - /// - /// The predicate is applied to the elements of the input list. If any application - /// returns true then the overall result is true and no further elements are tested. - /// Otherwise, false is returned. - val exists: predicate:('T -> bool) -> list:'T list -> bool - - /// Test if any pair of corresponding elements of the lists satisfies the given predicate. - /// - /// The predicate is applied to matching elements in the two collections up to the lesser of the - /// two lengths of the collections. If any application returns true then the overall result is - /// true and no further elements are tested. Otherwise, if one collections is longer - /// than the other then the ArgumentException exception is raised. - /// Otherwise, false is returned. - val exists2: predicate:('T1 -> 'T2 -> bool) -> list1:'T1 list -> list2:'T2 list -> bool - - /// Return the first element for which the given function returns true. - /// Raise KeyNotFoundException if no such element exists. - val find: predicate:('T -> bool) -> list:'T list -> 'T - - /// Return the index of the first element in the list - /// that satisfies the given predicate. - /// Raise KeyNotFoundException if no such element exists. - val findIndex: predicate:('T -> bool) -> list:'T list -> int - - /// Return a new collection containing only the elements of the collection - /// for which the given predicate returns "true" - val filter: predicate:('T -> bool) -> list:'T list -> 'T list - - /// Apply a function to each element of the collection, threading an accumulator argument - /// through the computation. Take the second argument, and apply the function to it - /// and the first element of the list. Then feed this result into the function along - /// with the second element and so on. Return the final result. - /// If the input function is f and the elements are i0...iN then - /// computes f (... (f s i0) i1 ...) iN - val fold: folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State - - /// Apply a function to corresponding elements of two collections, threading an accumulator argument - /// through the computation. The collections must have identical sizes. - /// If the input function is f and the elements are i0...iN and j0...jN - /// then computes f (... (f s i0 j0)...) iN jN. - val fold2: folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> list1:'T1 list -> list2:'T2 list -> 'State - - /// Apply 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 i0 (...(f iN s)). - val foldBack: folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State - - /// Apply a function to corresponding elements of two collections, threading an accumulator argument - /// through the computation. The collections must have identical sizes. - /// If the input function is f and the elements are i0...iN and j0...jN - /// then computes f i0 j0 (...(f iN jN s)). - val foldBack2: folder:('T1 -> 'T2 -> 'State -> 'State) -> list1:'T1 list -> list2:'T2 list -> state:'State -> 'State - - /// Test if all elements of the collection satisfy the given predicate. - /// - /// The predicate is applied to the elements of the input list. If any application - /// returns false then the overall result is false and no further elements are tested. - /// Otherwise, true is returned. - val forall: predicate:('T -> bool) -> list:'T list -> bool - - /// Test if all corresponding elements of the collection satisfy the given predicate pairwise. - /// - /// The predicate is applied to matching elements in the two collections up to the lesser of the - /// two lengths of the collections. If any application returns false then the overall result is - /// false and no further elements are tested. Otherwise, if one collection is longer - /// than the other then the ArgumentException exception is raised. - /// Otherwise, true is returned. - val forall2: predicate:('T1 -> 'T2 -> bool) -> list1:'T1 list -> list2:'T2 list -> bool - - /// Return the first element of the list. Raise (Invalid_argument "hd") if undefined. - val hd: list:'T list -> 'T - - /// Create a list by calling the given generator on each index - val init: length:int -> initializer:(int -> 'T) -> 'T list - - /// Return true if the list contains no elements, false otherwise - val isEmpty: list:'T list -> bool - - /// Apply the given function to each element of the collection. - val iter: action:('T -> unit) -> list:'T list -> unit - - /// Apply the given function to two collections simultaneously. The - /// collections must have identical size. - val iter2: action:('T1 -> 'T2 -> unit) -> list1:'T1 list -> list2:'T2 list -> unit - - /// Apply the given function to each element of the collection. The integer passed to the - /// function indicates the index of element. - val iteri: action:(int -> 'T -> unit) -> list:'T list -> unit - - /// Apply the given function to two collections simultaneously. The - /// collections must have identical size. The integer passed to the - /// function indicates the index of element. - val iteri2: action:(int -> 'T1 -> 'T2 -> unit) -> list1:'T1 list -> list2:'T2 list -> unit - - /// Return the length of the list - val length: list:'T list -> int - - /// Build a new collection whose elements are the results of applying the given function - /// to each of the elements of the collection. - val map: mapping:('T -> 'U) -> list:'T list -> 'U list - - /// Build a new collection whose elements are the results of applying the given function - /// to the corresponding elements of the two collections pairwise. - val map2: mapping:('T1 -> 'T2 -> 'U) -> list1:'T1 list -> list2:'T2 list -> 'U list - - /// Build a new collection whose elements are the results of applying the given function - /// to the corresponding elements of the three collections simultaneously. - val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> list1:'T1 list -> list2:'T2 list -> list3:'T3 list -> 'U list - - /// Build a new collection whose elements are the results of applying the given function - /// to each of the elements of the collection. The integer index passed to the - /// function indicates the index (from 0) of element being transformed. - val mapi: mapping:(int -> 'T -> 'U) -> list:'T list -> 'U list - - /// Like mapi, but mapping corresponding elements from two lists of equal length. - val mapi2: mapping:(int -> 'T1 -> 'T2 -> 'U) -> list1:'T1 list -> list2:'T2 list -> 'U list - - /// Return the greatest of all elements of the list, compared via Operators.max - val max : list:'T list -> 'T - - /// Return the greatest of all elements of the array, compared via Operators.max on the function result - val maxBy : projection:('T -> 'U) -> list:'T list -> 'T - - /// Return the lowest of all elements of the list, compared via Operators.min - val min : list:'T list -> 'T - - /// Return the lowest of all elements of the array, compared via Operators.min on the function result - val minBy : projection:('T -> 'U) -> list:'T list -> 'T - - /// Index into the list. The first element has index 0. - val nth: list:'T list -> index:int -> 'T - - /// Build a collection from the given array - val of_array : array:'T array -> 'T list - - /// Build a new collection from the given enumerable object - val of_seq: elements:seq<'T> -> 'T list - - /// Split the collection into two collections, containing the - /// elements for which the given predicate returns true and false - /// respectively - val partition: predicate:('T -> bool) -> list:'T list -> ('T list * 'T list) - - /// Apply the given function to successive elements, returning the first - /// result where function returns Some(x) for some x. If no such - /// element exists then raise System.Collections.Generic.KeyNotFoundException - val pick: chooser:('T -> 'U option) -> list:'T list -> 'U - - /// Returns a list with all elements permuted according to the - /// specified permutation - val permute : indexMap:(int -> int) -> list:'T list -> 'T list - - /// Apply a function to each element of the collection, threading an accumulator argument - /// through the computation. Apply the function to the first two elements of the list. - /// Then feed this result into the function along with the third element and so on. - /// Return the final result. If the input function is f and the elements are i0...iN then computes - /// f (... (f i0 i1) i2 ...) iN. - /// Raises ArgumentException if the list has no elements. - val reduce: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T - - /// Apply 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 i0 (...(f iN-1 iN)). - /// Raises ArgumentException if the list has no elements. - val reduceBack: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T - - /// Create a list by calling the given generator on each index - val replicate: count:int -> initial:'T -> 'T list - - /// Return a new list with the elements in reverse order - val rev: list:'T list -> 'T list - - /// Apply a function to each element of the collection, threading an accumulator argument - /// through the computation. Take the second argument, and apply the function to it - /// and the first element of the list. Then feed this result into the function along - /// with the second element and so on. Return the list of intermediate results and the final result. - val scan : folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State list - - /// Like foldBack, but return both the intermediary and final results - val scanBack : folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State list - - /// Sort the given list using the given comparison function - val sortWith: comparer:('T -> 'T -> int) -> list:'T list -> 'T list - - /// Sort the given list using keys given by the given projection. Keys are compared using Operators.compare. - val sortBy: projection:('T -> 'U) -> list:'T list -> 'T list - - /// Sort the given list using the given comparison function - val sort: list:'T list -> 'T list - - /// Return the sum of the elements in the list - val inline sum : list:^T list -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member Zero : ^T) - - /// Return the sum of the results generated by applying the function to each element of the list. - val inline sumBy : projection:('T -> ^U) -> list:'T list -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - /// Return the tail of the list. Raise (Invalid_argument "tl") if undefined. - val tl: list:'T list -> 'T list - - /// Build an array from the given collection - val to_array: list:'T list -> 'T array - - /// Build a new collection from the given enumerable object - val to_seq: list:list<'T> -> seq<'T> - - /// Apply the given function to successive elements, returning Some(x) the first - /// result where function returns Some(x) for some x. If no such element - /// exists then return None - val tryPick: chooser:('T -> 'U option) -> list:'T list -> 'U option - - /// Return the first element for which the given function returns true. - /// Return None if no such element exists. - val tryFind: predicate:('T -> bool) -> list:'T list -> 'T option - - /// Return the index of the first element in the list - /// that satisfies the given predicate. - /// Return None if no such element exists. - val tryFindIndex: predicate:('T -> bool) -> list:'T list -> int option - - /// Split a list of pairs into two lists - val unzip: list:('T1 * 'T2) list -> ('T1 list * 'T2 list) - - /// Split a list of triples into three lists - val unzip3: list:('T1 * 'T2 * 'T3) list -> ('T1 list * 'T2 list * 'T3 list) - - /// Combine the two lists into a list of pairs. The two lists must have equal lengths. - val zip: list1:'T1 list -> list2:'T2 list -> ('T1 * 'T2) list - - /// Combine the three lists into a list of triples. The lists must have equal lengths. - val zip3: list1:'T1 list -> list2:'T2 list -> list3:'T3 list -> ('T1 * 'T2 * 'T3) list - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val inline average_by : projection:('T -> ^U) -> list:'T list -> ^U when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U*int -> ^U) - and ^U : (static member Zero : ^U) - - [] - val map_concat: mapping:('T -> 'U list) -> list:'T list -> 'U list - - [] - val flatten: lists:seq<'T list> -> 'T list - - [] - val find_index: predicate:('T -> bool) -> list:'T list -> int - - [] - val find_all: predicate:('T -> bool) -> list:'T list -> 'T list - - [] - val fold_left: folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State - - [] - val fold_left2: folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> list1:'T1 list -> list2:'T2 list -> 'State - - [] - val fold_right: folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State - - [] - val fold_right2: folder:('T1 -> 'T2 -> 'State -> 'State) -> list1:'T1 list -> list2:'T2 list -> state:'State -> 'State - - [] - val for_all: predicate:('T -> bool) -> list:'T list -> bool - - [] - val for_all2: predicate:('T1 -> 'T2 -> bool) -> list1:'T1 list -> list2:'T2 list -> bool - - [] - val is_empty: list:'T list -> bool - - [] - val max_by : projection:('T -> 'U) -> list:'T list -> 'T - - [] - val min_by : projection:('T -> 'U) -> list:'T list -> 'T - - [] - val reduce_left: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T - - [] - val reduce_right: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T - - [] - val scan_left : folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State list - - [] - val scan_right : folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State list - - [] - val sort_by: projection:('T -> 'U) -> list:'T list -> 'T list - - [] - val stable_sort: list: ('T -> 'T -> int) -> 'T list -> 'T list - - [] - val inline sum_by : projection:('T -> ^U) -> list:'T list -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - [] - val first: chooser:('T -> 'U option) -> list:'T list -> 'U option - - [] - val tryfind: predicate:('T -> bool) -> list:'T list -> 'T option - - [] - val tryfind_index: predicate:('T -> bool) -> list:'T list -> int option - - [] - val split: list:('T1 * 'T2) list -> ('T1 list * 'T2 list) - - [] - val combine: list1:'T1 list -> list2:'T2 list -> ('T1 * 'T2) list - -#endif - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/local.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/local.fs deleted file mode 100644 index 11ace054..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/local.fs +++ /dev/null @@ -1,483 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Primitives.Basics - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Core.Operators -open System.Diagnostics.CodeAnalysis -open System.Collections.Generic -open System.Runtime.InteropServices - - -module internal List = - - let arrayZeroCreate (n:int) = (# "newarr !0" type ('a) n : 'a array #) - - [] - let nonempty x = match x with [] -> false | _ -> true - - let rec iter f x = match x with [] -> () | (h::t) -> f h; iter f t - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let inline setFreshConsTail cons t = cons.(::).1 <- t - let inline freshConsNoTail h = h :: (# "ldnull" : 'a list #) - - - let rec mapToFreshConsTail cons f x = - match x with - | [] -> - setFreshConsTail cons []; - | (h::t) -> - let cons2 = freshConsNoTail (f h) - setFreshConsTail cons cons2; - mapToFreshConsTail cons2 f t - - let map f x = - match x with - | [] -> [] - | [h] -> [f h] - | (h::t) -> - let cons = freshConsNoTail (f h) - mapToFreshConsTail cons f t - cons - - let rec mapiToFreshConsTail cons (f:OptimizedClosures.FastFunc2<_,_,_>) x i = - match x with - | [] -> - setFreshConsTail cons []; - | (h::t) -> - let cons2 = freshConsNoTail (f.Invoke(i,h)) - setFreshConsTail cons cons2; - mapiToFreshConsTail cons2 f t (i+1) - - let mapi f x = - match x with - | [] -> [] - | [h] -> [f 0 h] - | (h::t) -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let cons = freshConsNoTail (f.Invoke(0,h)) - mapiToFreshConsTail cons f t 1 - cons - - let rec map2ToFreshConsTail cons (f:OptimizedClosures.FastFunc2<_,_,_>) xs1 xs2 = - match xs1,xs2 with - | [],[] -> - setFreshConsTail cons []; - | (h1::t1),(h2::t2) -> - let cons2 = freshConsNoTail (f.Invoke(h1,h2)) - setFreshConsTail cons cons2; - map2ToFreshConsTail cons2 f t1 t2 - | _ -> invalidArg "xs2" "the lists had different lengths" - - let map2 f xs1 xs2 = - match xs1,xs2 with - | [],[] -> [] - | (h1::t1),(h2::t2) -> - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let cons = freshConsNoTail (f.Invoke(h1,h2)) - map2ToFreshConsTail cons f t1 t2 - cons - | _ -> invalidArg "xs2" "the lists had different lengths" - - let rec forall f xs1 = - match xs1 with - | [] -> true - | (h1::t1) -> f h1 && forall f t1 - - let rec exists f xs1 = - match xs1 with - | [] -> false - | (h1::t1) -> f h1 || exists f t1 - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec revAcc xs acc = - match xs with - | [] -> acc - | h::t -> revAcc t (h::acc) - - let rev xs = - match xs with - | [] -> xs - | [h] -> xs - | h1::h2::t -> revAcc t [h2;h1] - - // return the last cons it the chain - let rec appendToFreshConsTail cons xs = - match xs with - | [] -> - setFreshConsTail cons [] - cons - | h::t -> - let cons2 = freshConsNoTail h - setFreshConsTail cons cons2 - appendToFreshConsTail cons2 t - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec collectToFreshConsTail (f:'a -> 'b list) (list:'a list) cons = - match list with - | [] -> - setFreshConsTail cons [] - | h::t -> - collectToFreshConsTail f t (appendToFreshConsTail cons (f h)) - - let rec collect (f:'a -> 'b list) (list:'a list) = - match list with - | [] -> [] - | [h] -> f h - | _ -> - let cons = freshConsNoTail (Unchecked.defaultof<'b>) - collectToFreshConsTail f list cons - cons.Tail - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec filterToFreshConsTail cons f l = - match l with - | [] -> - setFreshConsTail cons []; - | h::t -> - if f h then - let cons2 = freshConsNoTail h - setFreshConsTail cons cons2; - filterToFreshConsTail cons2 f t - else - filterToFreshConsTail cons f t - - let rec filter f l = - match l with - | [] -> [] - | [h] -> if f h then l else [] - | h::t -> - if f h then - let cons = freshConsNoTail h - filterToFreshConsTail cons f t; - cons - else - filter f t - - let iteri f x = - let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f) - let rec loop n x = match x with [] -> () | (h::t) -> f.Invoke(n,h); loop (n+1) t - loop 0 x - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec concatToFreshConsTail cons h1 l = - match l with - | [] -> setFreshConsTail cons h1 - | h2::t -> concatToFreshConsTail (appendToFreshConsTail cons h1) h2 t - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec concatToEmpty l = - match l with - | [] -> [] - | []::t -> concatToEmpty t - | (h::t1)::tt2 -> - let res = freshConsNoTail h - concatToFreshConsTail res t1 tt2; - res - - let seqToList (e : IEnumerable<'T>) = - match e with - | :? list<'T> as l -> l - | _ -> - use ie = e.GetEnumerator() - let mutable res = [] - while ie.MoveNext() do - res <- ie.Current :: res - rev res - - let concat (l : seq<_>) = - match seqToList l with - | [] -> [] - | [h] -> h - | [h1;h2] -> h1 @ h2 - | l -> concatToEmpty l - - let rec initToFreshConsTail cons i n f = - if i < n then - let cons2 = freshConsNoTail (f i) - setFreshConsTail cons cons2; - initToFreshConsTail cons2 (i+1) n f - else - setFreshConsTail cons [] - - - let init n f = - if n < 0 then invalidArg "n" "the length may not be negative" - if n = 0 then [] - else - let res = freshConsNoTail (f 0) - initToFreshConsTail res 1 n f - res - - - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec partitionToFreshConsTails consL consR p l = - match l with - | [] -> - setFreshConsTail consL []; - setFreshConsTail consR []; - - | h::t -> - let cons' = freshConsNoTail h - if p h then - setFreshConsTail consL cons'; - partitionToFreshConsTails cons' consR p t - else - setFreshConsTail consR cons'; - partitionToFreshConsTails consL cons' p t - - let rec partitionToFreshConsTailLeft consL p l = - match l with - | [] -> - setFreshConsTail consL []; - [] - | h::t -> - let cons' = freshConsNoTail h - if p h then - setFreshConsTail consL cons'; - partitionToFreshConsTailLeft cons' p t - else - partitionToFreshConsTails consL cons' p t; - cons' - - let rec partitionToFreshConsTailRight consR p l = - match l with - | [] -> - setFreshConsTail consR []; - [] - | h::t -> - let cons' = freshConsNoTail h - if p h then - partitionToFreshConsTails cons' consR p t; - cons' - else - setFreshConsTail consR cons'; - partitionToFreshConsTailRight cons' p t - - let partition p l = - match l with - | [] -> [],[] - | [h] -> if p h then l,[] else [],l - | h::t -> - let cons = freshConsNoTail h - if p h - then cons, (partitionToFreshConsTailLeft cons p t) - else (partitionToFreshConsTailRight cons p t), cons - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec unzipToFreshConsTail cons1a cons1b x = - match x with - | [] -> - setFreshConsTail cons1a [] - setFreshConsTail cons1b [] - | ((h1,h2)::t) -> - let cons2a = freshConsNoTail h1 - let cons2b = freshConsNoTail h2 - setFreshConsTail cons1a cons2a; - setFreshConsTail cons1b cons2b; - unzipToFreshConsTail cons2a cons2b t - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let unzip x = - match x with - | [] -> - [],[] - | ((h1,h2)::t) -> - let res1a = freshConsNoTail h1 - let res1b = freshConsNoTail h2 - unzipToFreshConsTail res1a res1b t; - res1a,res1b - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec unzip3ToFreshConsTail cons1a cons1b cons1c x = - match x with - | [] -> - setFreshConsTail cons1a []; - setFreshConsTail cons1b []; - setFreshConsTail cons1c []; - | ((h1,h2,h3)::t) -> - let cons2a = freshConsNoTail h1 - let cons2b = freshConsNoTail h2 - let cons2c = freshConsNoTail h3 - setFreshConsTail cons1a cons2a; - setFreshConsTail cons1b cons2b; - setFreshConsTail cons1c cons2c; - unzip3ToFreshConsTail cons2a cons2b cons2c t - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let unzip3 x = - match x with - | [] -> - [],[],[] - | ((h1,h2,h3)::t) -> - let res1a = freshConsNoTail h1 - let res1b = freshConsNoTail h2 - let res1c = freshConsNoTail h3 - unzip3ToFreshConsTail res1a res1b res1c t; - res1a,res1b,res1c - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec zipToFreshConsTail cons xs1 xs2 = - match xs1,xs2 with - | [],[] -> - setFreshConsTail cons [] - | (h1::t1),(h2::t2) -> - let cons2 = freshConsNoTail (h1,h2) - setFreshConsTail cons cons2; - zipToFreshConsTail cons2 t1 t2 - | _ -> - invalidArg "xs2" "the input lists had different lengths" - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let zip xs1 xs2 = - match xs1,xs2 with - | [],[] -> [] - | (h1::t1),(h2::t2) -> - let res = freshConsNoTail (h1,h2) - zipToFreshConsTail res t1 t2; - res - | _ -> - invalidArg "xs2" "the input lists had different lengths" - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let rec zip3ToFreshConsTail cons xs1 xs2 xs3 = - match xs1,xs2,xs3 with - | [],[],[] -> - setFreshConsTail cons []; - | (h1::t1),(h2::t2),(h3::t3) -> - let cons2 = freshConsNoTail (h1,h2,h3) - setFreshConsTail cons cons2; - zip3ToFreshConsTail cons2 t1 t2 t3 - | _ -> - invalidArg "xs1" "the input lists had different lengths" - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let zip3 xs1 xs2 xs3 = - match xs1,xs2,xs3 with - | [],[],[] -> - [] - | (h1::t1),(h2::t2),(h3::t3) -> - let res = freshConsNoTail (h1,h2,h3) - zip3ToFreshConsTail res t1 t2 t3; - res - | _ -> - invalidArg "xs1" "the input lists had different lengths" - - let to_array (l:'a list) = - let len = l.Length - let res = (arrayZeroCreate len : 'a array) - let mutable lref = l - for i = 0 to len - 1 do - res.[i] <- lref.(::).0; - lref <- lref.(::).1 - res - - let of_array (arr:'a array) = - let len = arr.Length - let mutable res = ([]: 'a list) - for i = len - 1 downto 0 do - res <- arr.[i] :: res - res - - module StableSortImplementation = - // Internal copy of stable sort - let rec revAppend xs1 xs2 = - match xs1 with - | [] -> xs2 - | h::t -> revAppend t (h::xs2) - let half x = x >>> 1 - - let rec merge cmp a b acc = - match a,b with - | [], a | a,[] -> revAppend acc a - | x::a', y::b' -> if cmp x y > 0 then merge cmp a b' (y::acc) else merge cmp a' b (x::acc) - - let sort2 cmp x y = - if cmp x y > 0 then [y;x] else [x;y] - - let sort3 cmp x y z = - let cxy = cmp x y - let cyz = cmp y z - if cxy > 0 && cyz < 0 then - if cmp x z > 0 then [y;z;x] else [y;x;z] - elif cxy < 0 && cyz > 0 then - if cmp x z > 0 then [z;x;y] else [x;z;y] - elif cxy > 0 then - if cyz > 0 then [z;y;x] - else [y;z;x] - else - if cyz > 0 then [z;x;y] - else [x;y;z] - - let trivial a = match a with [] | [_] -> true | _ -> false - - (* tail recursive using a ref *) - - let rec stableSortInner cmp la ar = - if la < 4 then (* sort two || three new entries *) - match !ar with - | x::y::b -> - if la = 2 then ( ar := b; sort2 cmp x y ) - else begin - match b with - | z::c -> ( ar := c; sort3 cmp x y z ) - | _ -> failwith "never" - end - | _ -> failwith "never" - else (* divide *) - let lb = half la - let sb = stableSortInner cmp lb ar - let sc = stableSortInner cmp (la - lb) ar - merge cmp sb sc [] - - let stableSort cmp (a: 'a list) = - if trivial a then a else - let ar = ref a - stableSortInner cmp a.Length ar - - let sortWith cmp a = StableSortImplementation.stableSort cmp a - -module internal Array = - - let inline zeroCreate (n:int) = (# "newarr !0" type ('a) n : 'a array #) - - let init (n:int) (f: int -> 'a) = - let arr = (zeroCreate n : 'a array) - for i = 0 to n - 1 do - arr.[i] <- f i - arr - - let permute indexMap (arr : _[]) = - let res = zeroCreate arr.Length - let inv = zeroCreate arr.Length - for i = 0 to arr.Length - 1 do - let j = indexMap i - if j < 0 or j >= arr.Length then invalidArg "indexMap" "the function did not compute a permutation" - res.[j] <- arr.[i] - inv.[j] <- 1uy - for i = 0 to arr.Length - 1 do - if inv.[i] <> 1uy then invalidArg "indexMap" "the function did not compute a permutation" - res - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/local.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/local.fsi deleted file mode 100644 index ba2817e3..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/local.fsi +++ /dev/null @@ -1,38 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// Definitions internal for this library. -namespace Microsoft.FSharp.Primitives.Basics - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections - -module internal List = - val init : int -> (int -> 'a) -> 'a list - val iter : ('a -> unit) -> 'a list -> unit - val filter : predicate:('a -> bool) -> 'a list -> 'a list - val collect : ('a -> 'b list) -> 'a list -> 'b list - val partition : predicate:('a -> bool) -> 'a list -> 'a list * 'a list - val map : mapping:('a -> 'b) -> 'a list -> 'b list - val map2 : mapping:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list - val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list - val forall : predicate:('a -> bool) -> 'a list -> bool - val exists : predicate:('a -> bool) -> 'a list -> bool - val rev: 'a list -> 'a list - val concat : seq<'a list> -> 'a list - val iteri : action:(int -> 'a -> unit) -> 'a list -> unit - val unzip : ('a * 'b) list -> 'a list * 'b list - val unzip3 : ('a * 'b * 'c) list -> 'a list * 'b list * 'c list - val zip : 'a list -> 'b list -> ('a * 'b) list - val zip3 : 'a list -> 'b list -> 'c list -> ('a * 'b * 'c) list - val of_array : 'a[] -> 'a list - val to_array : 'a list -> 'a[] - val sortWith : ('a -> 'a -> int) -> 'a list -> 'a list - -module internal Array = - val inline zeroCreate : int -> 'a[] - val init : int -> (int -> 'a) -> 'a[] - val permute : indexMap:(int -> int) -> 'a[] -> 'a[] - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/map.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/map.fs deleted file mode 100644 index d74136af..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/map.fs +++ /dev/null @@ -1,626 +0,0 @@ -// (c) Microsoft Corporation 2005-2008. - -#light - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - - [] - type MapTree<'Key,'Value> = - | MapEmpty - | MapOne of 'Key * 'Value - | MapNode of 'Key * 'Value * MapTree<'Key,'Value> * MapTree<'Key,'Value> * int - // REVIEW: performance rumour has it that the data held in MapNode and MapOne should be - // exactly one cache line. It is currently ~7 and 4 words respectively. - - [] - module MapTree = - - let empty = MapEmpty - - let height = function - | MapEmpty -> 0 - | MapOne _ -> 1 - | MapNode(_,_,_,_,h) -> h - - let is_empty m = - match m with - | MapEmpty -> true - | _ -> false - - let mk l k v r = - match l,r with - | MapEmpty,MapEmpty -> MapOne(k,v) - | _ -> - let hl = height l - let hr = height r - let m = if hl < hr then hr else hl - MapNode(k,v,l,r,m+1) - - let rebalance t1 k v t2 = - let t1h = height t1 - let t2h = height t2 - if t2h > t1h + 2 then (* right is heavier than left *) - match t2 with - | MapNode(t2k,t2v,t2l,t2r,t2h) -> - (* one of the nodes must have height > height t1 + 1 *) - if height t2l > t1h + 1 then (* balance left: combination *) - match t2l with - | MapNode(t2lk,t2lv,t2ll,t2lr,t2lh) -> - mk (mk t1 k v t2ll) t2lk t2lv (mk t2lr t2k t2v t2r) - | _ -> failwith "rebalance" - else (* rotate left *) - mk (mk t1 k v t2l) t2k t2v t2r - | _ -> failwith "rebalance" - else - if t1h > t2h + 2 then (* left is heavier than right *) - match t1 with - | MapNode(t1k,t1v,t1l,t1r,t1h) -> - (* one of the nodes must have height > height t2 + 1 *) - if height t1r > t2h + 1 then - (* balance right: combination *) - match t1r with - | MapNode(t1rk,t1rv,t1rl,t1rr,t1rh) -> - mk (mk t1l t1k t1v t1rl) t1rk t1rv (mk t1rr k v t2) - | _ -> failwith "rebalance" - else - mk t1l t1k t1v (mk t1r k v t2) - | _ -> failwith "rebalance" - else mk t1 k v t2 - - let rec sizeAux acc m = - match m with - | MapEmpty -> acc - | MapOne _ -> acc + 1 - | MapNode(k2,v2,l,r,h) -> sizeAux (sizeAux (acc+1) l) r - - let size x = sizeAux 0 x - - let rec add (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) k v m = - match m with - | MapEmpty -> MapOne(k,v) - | MapOne(k2,v2) -> - let c = comparer.Invoke(k,k2) - if c < 0 then MapNode (k,v,MapEmpty,m,2) - elif c = 0 then MapOne(k,v) - else MapNode (k,v,m,MapEmpty,2) - | MapNode(k2,v2,l,r,h) -> - let c = comparer.Invoke(k,k2) - if c < 0 then rebalance (add comparer k v l) k2 v2 r - elif c = 0 then MapNode(k,v,l,r,h) - else rebalance l k2 v2 (add comparer k v r) - - let rec find (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) k m = - match m with - | MapEmpty -> raise (System.Collections.Generic.KeyNotFoundException()) - | MapOne(k2,v2) -> - let c = comparer.Invoke(k,k2) - if c = 0 then v2 - else raise (System.Collections.Generic.KeyNotFoundException()) - | MapNode(k2,v2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then find comparer k l - elif c = 0 then v2 - else find comparer k r - - let rec tryfind (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) k m = - match m with - | MapEmpty -> None - | MapOne(k2,v2) -> - let c = comparer.Invoke(k,k2) - if c = 0 then Some v2 - else None - | MapNode(k2,v2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then tryfind comparer k l - elif c = 0 then Some v2 - else tryfind comparer k r - - let partition1 (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f k v (acc1,acc2) = - if f k v then (add comparer k v acc1,acc2) else (acc1,add comparer k v acc2) - - let rec partitionAux (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f s acc = - match s with - | MapEmpty -> acc - | MapOne(k,v) -> partition1 comparer f k v acc - | MapNode(k,v,l,r,_) -> - let acc = partitionAux comparer f r acc - let acc = partition1 comparer f k v acc - partitionAux comparer f l acc - - let partition (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f s = partitionAux comparer f s (empty,empty) - - let filter1 (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f k v acc = if f k v then add comparer k v acc else acc - - let rec filterAux (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f s acc = - match s with - | MapEmpty -> acc - | MapOne(k,v) -> filter1 comparer f k v acc - | MapNode(k,v,l,r,_) -> - let acc = filterAux comparer f l acc - let acc = filter1 comparer f k v acc - filterAux comparer f r acc - - let filter (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) f s = filterAux comparer f s empty - - let rec spliceOutSuccessor m = - match m with - | MapEmpty -> failwith "internal error: Map.splice_out_succ_or_pred" - | MapOne(k2,v2) -> k2,v2,MapEmpty - | MapNode(k2,v2,l,r,_) -> - match l with - | MapEmpty -> k2,v2,r - | _ -> let k3,v3,l' = spliceOutSuccessor l in k3,v3,mk l' k2 v2 r - - let rec remove (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) k m = - match m with - | MapEmpty -> empty - | MapOne(k2,v2) -> - let c = comparer.Invoke(k,k2) - if c = 0 then MapEmpty else m - | MapNode(k2,v2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then rebalance (remove comparer k l) k2 v2 r - elif c = 0 then - match l,r with - | MapEmpty,_ -> r - | _,MapEmpty -> l - | _ -> - let sk,sv,r' = spliceOutSuccessor r - mk l sk sv r' - else rebalance l k2 v2 (remove comparer k r) - - let rec mem (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) k m = - match m with - | MapEmpty -> false - | MapOne(k2,v2) -> (comparer.Invoke(k,k2) = 0) - | MapNode(k2,v2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then mem comparer k l - else (c = 0 || mem comparer k r) - - let rec iter f m = - match m with - | MapEmpty -> () - | MapOne(k2,v2) -> f k2 v2 - | MapNode(k2,v2,l,r,_) -> iter f l; f k2 v2; iter f r - - let rec tryPick f m = - match m with - | MapEmpty -> None - | MapOne(k2,v2) -> f k2 v2 - | MapNode(k2,v2,l,r,_) -> - match tryPick f l with - | Some x as res -> res - | None -> - match f k2 v2 with - | Some x as res -> res - | None -> - tryPick f r - - let rec exists f m = - match m with - | MapEmpty -> false - | MapOne(k2,v2) -> f k2 v2 - | MapNode(k2,v2,l,r,_) -> exists f l || f k2 v2 || exists f r - - let rec for_all f m = - match m with - | MapEmpty -> true - | MapOne(k2,v2) -> f k2 v2 - | MapNode(k2,v2,l,r,_) -> for_all f l && f k2 v2 && for_all f r - - let rec map f m = - match m with - | MapEmpty -> empty - | MapOne(k,v) -> MapOne(k,f v) - | MapNode(k,v,l,r,h) -> - let l2 = map f l - let v2 = f v - let r2 = map f r - MapNode(k,v2,l2, r2,h) - - let rec mapi f m = - match m with - | MapEmpty -> empty - | MapOne(k,v) -> MapOne(k,f k v) - | MapNode(k,v,l,r,h) -> - let l2 = mapi f l - let v2 = f k v - let r2 = mapi f r - MapNode(k,v2, l2, r2,h) - - let rec foldBack (f:OptimizedClosures.FastFunc3<_,_,_,_>) m x = - match m with - | MapEmpty -> x - | MapOne(k,v) -> f.Invoke(k,v,x) - | MapNode(k,v,l,r,h) -> - let x = foldBack f r x - let x = f.Invoke(k,v,x) - foldBack f l x - - let rec fold (f:OptimizedClosures.FastFunc3<_,_,_,_>) x m = - match m with - | MapEmpty -> x - | MapOne(k,v) -> f.Invoke(x,k,v) - | MapNode(k,v,l,r,h) -> - let x = fold f x l - let x = f.Invoke(x,k,v) - fold f x r - - let foldSection (comparer: OptimizedClosures.FastFunc2<'Value,'Value,int>) lo hi f m x = - let rec fold_from_to f m x = - match m with - | MapEmpty -> x - | MapOne(k,v) -> - let clo_k = comparer.Invoke(lo,k) - let ck_hi = comparer.Invoke(k,hi) - let x = if clo_k <= 0 && ck_hi <= 0 then f k v x else x - x - | MapNode(k,v,l,r,h) -> - let clo_k = comparer.Invoke(lo,k) - let ck_hi = comparer.Invoke(k,hi) - let x = if clo_k < 0 then fold_from_to f l x else x - let x = if clo_k <= 0 && ck_hi <= 0 then f k v x else x - let x = if ck_hi < 0 then fold_from_to f r x else x - x - - if comparer.Invoke(lo,hi) = 1 then x else fold_from_to f m x - - - let to_list m = - let rec loop m acc = - match m with - | MapEmpty -> acc - | MapOne(k,v) -> (k,v)::acc - | MapNode(k,v,l,r,h) -> loop l ((k,v)::loop r acc) - loop m [] - let to_array m = m |> to_list |> Array.of_list - let of_list comparer l = List.fold (fun acc (k,v) -> add comparer k v acc) empty l - - let rec mkFromEnumerator comparer acc (e : IEnumerator<_>) = - if e.MoveNext() then - let (x,y) = e.Current - mkFromEnumerator comparer (add comparer x y acc) e - else acc - - let of_seq comparer (c : seq<_>) = - use ie = c.GetEnumerator() - mkFromEnumerator comparer empty ie - - let copyToArray s (arr: _[]) i = - let j = ref i - s |> iter (fun x y -> arr.[!j] <- KeyValuePair(x,y); j := !j + 1) - - - /// Imperative left-to-right iterators. - [] - type iterator<'Key,'Value> = - { /// invariant: always collapseLHS result - mutable stack: MapTree<'Key,'Value> list; - /// true when MoveNext has been called - mutable started : bool } - - // collapseLHS: - // a) Always returns either [] or a list starting with SetOne. - // b) The "fringe" of the set stack is unchanged. - let rec collapseLHS stack = - match stack with - | [] -> [] - | MapEmpty :: rest -> collapseLHS rest - | MapOne (k,v) :: rest -> stack - | (MapNode(k,v,l,r,h)) :: rest -> collapseLHS (l :: MapOne (k,v) :: r :: rest) - - let mkIterator s = { stack = collapseLHS [s]; started = false } - - let not_started() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext.")) - let already_finished() = raise (new System.InvalidOperationException("Enumeration already finished.")) - - let current i = - if i.started then - match i.stack with - | MapOne (k,v) :: _ -> new KeyValuePair<_,_>(k,v) - | [] -> already_finished() - | _ -> failwith "Please report error: Map iterator, unexpected stack for current" - else - not_started() - - let rec moveNext i = - if i.started then - match i.stack with - | MapOne _ :: rest -> i.stack <- collapseLHS rest; - i.stack <> [] - | [] -> false - | _ -> failwith "Please report error: Map iterator, unexpected stack for moveNext" - else - i.started <- true; (* The first call to MoveNext "starts" the enumeration. *) - i.stack <> [] - - let mkIEnumerator s = - let i = ref (mkIterator s) - { new IEnumerator<_> with - member self.Current = current !i - interface System.Collections.IEnumerator with - member self.Current = box (current !i) - member self.MoveNext() = moveNext !i - member self.Reset() = i := mkIterator s - interface System.IDisposable with - member self.Dispose() = ()} - - - -#if FX_NO_DEBUG_PROXIES -#else - [>)>] -#endif -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - [] - [] - type Map<'Key,'Value>(comparer: OptimizedClosures.FastFunc2<'Key,'Key,int>, tree: MapTree<'Key,'Value>) = - - static let empty = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'Key>() - new Map<'Key,'Value>(comparer,MapTree<_,_>.MapEmpty) - - static member Empty : Map<'Key,'Value> = empty - - static member Create(ie : IEnumerable<_>) : Map<'Key,'Value> = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'Key>() - Map<_,_>(comparer,MapTree.of_seq comparer ie) - - static member Create() : Map<'Key,'Value> = empty - - new(ie : seq<_>) = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'Key>() - Map<_,_>(comparer,MapTree.of_seq comparer ie) - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member internal m.Comparer = comparer - //[] - member internal m.Tree = tree - member m.Add(k,v) : Map<'Key,'Value> = Map<'Key,'Value>(comparer,MapTree.add comparer k v tree) -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member m.IsEmpty = MapTree.is_empty tree - member m.Item with get(k : 'Key) = MapTree.find comparer k tree - member m.TryPick(f) = MapTree.tryPick f tree - member m.Exists(f) = MapTree.exists f tree - member m.Filter(f) : Map<'Key,'Value> = Map<'Key,'Value>(comparer ,MapTree.filter comparer f tree) - member m.ForAll(f) = MapTree.for_all f tree - member m.Fold f acc = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - MapTree.foldBack f tree acc - member m.FoldSection (lo:'Key) (hi:'Key) f (acc:'z) = MapTree.foldSection comparer lo hi f tree acc - member m.Iterate f = MapTree.iter f tree - member m.MapRange f = Map<'Key,'b>(comparer,MapTree.map f tree) - member m.Map f = Map<'Key,'b>(comparer,MapTree.mapi f tree) - member m.Partition(f) : Map<'Key,'Value> * Map<'Key,'Value> = - let r1,r2 = MapTree.partition comparer f tree in - Map<'Key,'Value>(comparer,r1), Map<'Key,'Value>(comparer,r2) - member m.Count = MapTree.size tree - member m.ContainsKey(k) = MapTree.mem comparer k tree - member m.Remove(k) : Map<'Key,'Value> = Map<'Key,'Value>(comparer,MapTree.remove comparer k tree) - member m.TryFind(k) = MapTree.tryfind comparer k tree - member m.ToList() = MapTree.to_list tree - member m.ToArray() = MapTree.to_array tree - - static member of_list(l) : Map<'Key,'Value> = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'Key>() - Map<_,_>(comparer,MapTree.of_list comparer l) - - member this.ComputeHashCode() = - let combineHash x y = (x <<< 1) + y + 631 - let mutable res = 0 - for (KeyValue(x,y)) in this do - res <- combineHash res (hash x) - res <- combineHash res (hash y) - abs res - - override this.Equals(that) = - match that with - | :? Map<'Key,'Value> -> - ((this :> System.IComparable).CompareTo(that) = 0) - | _ -> false - - override this.GetHashCode() = this.ComputeHashCode() - - interface IEnumerable> with - member s.GetEnumerator() = MapTree.mkIEnumerator tree - - interface System.Collections.IEnumerable with - member s.GetEnumerator() = (MapTree.mkIEnumerator tree :> System.Collections.IEnumerator) - - interface IDictionary<'Key, 'Value> with - member s.Item - with get x = s.[x] - and set x v = raise (NotSupportedException("Map values may not be mutated")) - - // REVIEW: this implementation could avoid copying the Values to an array - member s.Keys = ([| for kvp in s -> kvp.Key |] :> ICollection<'Key>) - - // REVIEW: this implementation could avoid copying the Values to an array - member s.Values = ([| for kvp in s -> kvp.Value |] :> ICollection<'Value>) - - member s.Add(k,v) = raise (NotSupportedException("Map values may not be mutated")) - member s.ContainsKey(k) = s.ContainsKey(k) - member s.TryGetValue(k,r) = if s.ContainsKey(k) then (r <- s.[k]; true) else false - member s.Remove(k : 'Key) = (raise (NotSupportedException("Map values may not be mutated")) : bool) - - interface ICollection> with - member s.Add(x) = raise (NotSupportedException("Map values may not be mutated")); - member s.Clear() = raise (NotSupportedException("Map values may not be mutated")); - member s.Remove(x) = raise (NotSupportedException("Map values may not be mutated")); - member s.Contains(x) = s.ContainsKey(x.Key) && s.[x.Key] = x.Value - member s.CopyTo(arr,i) = MapTree.copyToArray tree arr i - member s.IsReadOnly = true - member s.Count = s.Count - - interface System.IComparable with - member m.CompareTo(obj: obj) = - match obj with - | :? Map<'Key,'Value> as m2-> - Seq.compare - (fun (kvp1 : KeyValuePair<_,_>) (kvp2 : KeyValuePair<_,_>)-> - let c = comparer.Invoke(kvp1.Key,kvp2.Key) in - if c <> 0 then c else Operators.compare kvp1.Value kvp2.Value) - m m2 - | _ -> - invalidArg "obj" "the two obejcts have different types and are not comparable" -#if FX_NO_DEBUG_PROXIES -#else - and - [] - MapDebugView<'Key,'Value>(v: Map<'Key,'Value>) = - - [] - member x.Items = v |> Seq.truncate 1000 |> Seq.map (fun kvp -> { key = kvp.Key; value=kvp.Value}) |> Seq.to_array - - and - [] - MapDebugViewKeyValuePair = { key:obj; value:obj } - -#endif - - -namespace Microsoft.FSharp.Collections - - open System - open System.Diagnostics - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - - [] - [] - module Map = - - [] - let isEmpty (m:Map<_,_>) = m.IsEmpty - [] - let is_empty (m:Map<_,_>) = m.IsEmpty - - [] - let add k v (m:Map<_,_>) = m.Add(k,v) - - [] - let find k (m:Map<_,_>) = m.[k] - - [] - let tryFind k (m:Map<_,_>) = m.TryFind(k) - - [] - let tryfind k (m:Map<_,_>) = m.TryFind(k) - - [] - let remove k (m:Map<_,_>) = m.Remove(k) - - [] - let contains k (m:Map<_,_>) = m.ContainsKey(k) - - [] - let iter f (m:Map<_,_>) = m.Iterate(f) - - [] - let tryPick f (m:Map<_,_>) = m.TryPick(f) - - [] - let first f (m:Map<_,_>) = m.TryPick(f) - - [] - let pick f (m:Map<_,_>) = match tryPick f m with None -> raise (System.Collections.Generic.KeyNotFoundException()) | Some res -> res - - [] - let exists f (m:Map<_,_>) = m.Exists(f) - - [] - let filter f (m:Map<_,_>) = m.Filter(f) - - [] - let partition f (m:Map<_,_>) = m.Partition(f) - - [] - let forall f (m:Map<_,_>) = m.ForAll(f) - - [] - let for_all f m = forall f m - - [] - let mapRange f (m:Map<_,_>) = m.MapRange(f) - - [] - let mapi f (m:Map<_,_>) = m.Map(f) - - [] - let map f (m:Map<_,_>) = m.Map(f) - - [] - let fold f z (m:Map<_,_>) = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - MapTree.fold f z m.Tree - - [] - let fold_left f z m = fold f z m - - [] - let foldBack f (m:Map<_,_>) z = - let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f) - MapTree.foldBack f m.Tree z - - [] - let fold_right f m z = foldBack f m z - - [] - let to_seq (m:Map<_,_>) = m |> Seq.map (fun kvp -> kvp.Key, kvp.Value) - - [] - let findIndex f (m : Map<_,_>) = m |> to_seq |> Seq.pick (fun (k,v) -> if f k v then Some(k) else None) - - [] - let find_index f m = findIndex f m - - [] - let tryFindIndex f (m : Map<_,_>) = m |> to_seq |> Seq.tryPick (fun (k,v) -> if f k v then Some(k) else None) - - [] - let tryfind_index f m = tryFindIndex f m - - [] - let of_list (l: ('Key * 'Value) list) = Map<_,_>.of_list(l) - - [] - let of_seq l = Map<_,_>.Create(l) - - [] - let of_array (l: ('Key * 'Value) array) = of_seq l - - [] - let to_list (m:Map<_,_>) = m.ToList() - - [] - let to_array (m:Map<_,_>) = m.ToArray() - - [] - let empty<'Key,'Value> = Map<'Key,'Value>.Empty - - [] - let mem k (m:Map<_,_>) = m.ContainsKey(k) - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/map.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/map.fsi deleted file mode 100644 index 8c08d7a3..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/map.fsi +++ /dev/null @@ -1,186 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - /// Immutable maps. Keys are ordered by F# generic comparison. - /// - /// - /// Maps based on generic comparison are efficient for small keys. They are not a suitable choice if keys are recursive data structures - /// or if keys require bespoke comparison semantics. - /// - [] - type Map<'Key,'Value> = - /// Return a new map with the binding added to the given map. - member Add: key:'Key * value:'Value -> Map<'Key,'Value> - - /// Return true if there are no bindings in the map. - member IsEmpty: bool - - /// Build a map that contains the bindings of the given IEnumerable - new : elements:seq<'Key * 'Value> -> Map<'Key,'Value> - - /// The empty map - static member Empty: Map<'Key,'Value> - - /// Test if an element is in the domain of the map - member ContainsKey: key:'Key -> bool - - /// The number of bindings in the map - member Count: int - - /// Lookup an element in the map. Raise KeyNotFoundException if no binding - /// exists in the map. - member Item : key:'Key -> 'Value with get - - /// Remove an element from the domain of the map. No exception is raised if the element is not present. - member Remove: key:'Key -> Map<'Key,'Value> - - /// Lookup an element in the map, returning a Some value if the element is in the domain - /// of the map and None if not. - member TryFind: key:'Key -> 'Value option - - interface IDictionary<'Key, 'Value> - interface ICollection> - interface IEnumerable> - interface System.IComparable - interface System.Collections.IEnumerable - override Equals : obj -> bool - - /// Functional programming operators related to the Map<_,_> type. - [] - [] - module Map = - - /// Return a new map with the binding added to the given map. - val add: key:'Key -> value:'T -> table:Map<'Key,'T> -> Map<'Key,'T> - - /// Return a new map made from the given bindings - val of_list: elements:('Key * 'T) list -> Map<'Key,'T> - - /// Return a new map made from the given bindings - val of_array: elements:('Key * 'T) array -> Map<'Key,'T> - - /// Return a new map made from the given bindings - val of_seq: elements:seq<'Key * 'T> -> Map<'Key,'T> - - /// View the collection as an enumerable sequence. This collection - /// type is also directly compatible with 'seq<KeyValuePair<_,_> >'. - /// - /// Note this function returns a sequence of tuples, whereas the collection - /// itself is compatible with the logically equivalent sequence of KeyValuePairs. - /// Using sequences of tuples tends to be more convenient in F#, however the - /// collection itself must enumerate KeyValuePairs to conform to the .NET - /// design guidelines and the IDictionary interface. - val to_seq: table:Map<'Key,'T> -> seq<'Key * 'T> - - /// Returns a list of all key-value pairs in the mappinng - val to_list: table:Map<'Key,'T> -> list<'Key * 'T> - - /// Returns an array of all key-value pairs in the mappinng - val to_array: table:Map<'Key,'T> -> ('Key * 'T) array - - /// Is the map empty? - val isEmpty: table:Map<'Key,'T> -> bool - - [] - val is_empty: table:Map<'Key,'T> -> bool - - /// The empty map - [] - val empty<'Key,'T> : Map<'Key,'T> - - /// Lookup an element in the map, raising KeyNotFoundException if no binding - /// exists in the map. - val find: key:'Key -> table:Map<'Key,'T> -> 'T - - /// Search the map looking for the first element where the given function returns a Some value - val tryPick: chooser:('Key -> 'T -> 'U option) -> table:Map<'Key,'T> -> 'U option - - /// Search the map looking for the first element where the given function returns a Some value - val pick: chooser:('Key -> 'T -> 'U option) -> table:Map<'Key,'T> -> 'U - - /// Fold over the bindings in the map - val foldBack: folder:('Key -> 'T -> 'State -> 'State) -> table:Map<'Key,'T> -> state:'State -> 'State - - /// Fold over the bindings in the map - val fold: folder:('State -> 'Key -> 'T -> 'State) -> state:'State -> table:Map<'Key,'T> -> 'State - - /// Apply the given function to each binding in the dictionary - val iter: action:('Key -> 'T -> unit) -> table:Map<'Key,'T> -> unit - - /// Return true if the given predicate returns true for one of the - /// bindings in the map. - val exists: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> bool - - /// Build a new map containing only the bindings for which the given predicate returns 'true' - val filter: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> Map<'Key, 'T> - - /// Return true if the given predicate returns true for all of the - /// bindings in the map. - val forall: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> bool - - /// Build a new collection whose elements are the results of applying the given function - /// to each of the elements of the collection. The index passed to the - /// function indicates the index of element being transformed. - val map: mapping:('Key -> 'T -> 'U) -> table:Map<'Key,'T> -> Map<'Key,'U> - - /// Test is an element is in the domain of the map - val contains: key:'Key -> table:Map<'Key,'T> -> bool - - /// Build two new maps, one containing the bindings for which the given predicate returns 'true', - /// and the other the remaining bindings. - val partition: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> Map<'Key, 'T> * Map<'Key, 'T> - - /// Remove an element from the domain of the map. No exception is raised if the element is not present. - val remove: key:'Key -> table:Map<'Key,'T> -> Map<'Key,'T> - - /// Lookup an element in the map, returning a Some value if the element is in the domain - /// of the map and None if not. - val tryFind: key:'Key -> table:Map<'Key,'T> -> 'T option - - /// Evaluates the function on each mapping in the collection. Returns the key for the first mapping - /// where the function returns 'true'. Raise KeyNotFoundException if no such element exists. - val findIndex: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key - - /// Return the key of the first mapping in the collection that satisfies the given predicate. - /// Return 'None' if no such element exists. - val tryFindIndex: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key option - -#if DONT_INCLUDE_DEPRECATED -#else - /// Search the map looking for the first element where the given function returns a Some value - [] - val first: chooser:('Key -> 'T -> 'U option) -> table:Map<'Key,'T> -> 'U option - - [] - val fold_right: folder:('Key -> 'T -> 'State -> 'State) -> table:Map<'Key,'T> -> state:'State -> 'State - - [] - val fold_left: folder:('State -> 'Key -> 'T -> 'State) -> state:'State -> table:Map<'Key,'T> -> 'State - - [] - val for_all: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> bool - - [] - val mapi: mapping:('Key -> 'T -> 'U) -> table:Map<'Key,'T> -> Map<'Key,'U> - - [] - val mem: key:'Key -> table:Map<'Key,'T> -> bool - - [] - val tryfind: key:'Key -> table:Map<'Key,'T> -> 'T option - - [] - val find_index: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key - - [] - val tryfind_index: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key option - -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/n.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/n.fs deleted file mode 100644 index 44935af8..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/n.fs +++ /dev/null @@ -1,1604 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -namespace Microsoft.FSharp.Math - -#if FX_ATLEAST_40 -#else -open System -open System.Diagnostics.CodeAnalysis -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Primitives.Basics - -type ints = int array - -type internal BigNat = - - // Have n = sum (from i=0 to bound) a.[i] * baseN ^ i - // Have 0 <= a.[i] < baseN. - //------ - // Invariant: bound is least such, i.e. bound=0 or (a.[bound-1] is highest coeff). - // Zero is {bound=0,a=...}. - // Naturals are a normal form, - // but not structurally so, - // since arrays may have non-contributing cells at a.[bound] and beyond. - // - { mutable bound : int; // non-zero coeff must be 0...(bound-1) - digits : ints // must have at least elts 0...(bound-1), - // maybe more (which should be zero!). - // Actually, the "zero" condition may be relaxed. - // - } - - -module internal BigNatModule = - - //------------------------------------------------------------------------- - // misc - //----------------------------------------------------------------------- - - #if SELFTEST - let check b = if not b then failwith "assertion failwith" - #endif - - module FFT = - let rec pow32 x n = - if n=0 then 1 - elif n % 2 = 0 then pow32 (x*x) (n / 2) - else x* pow32 (x*x) (n / 2) - - let leastBounding2Power b = - let rec findBounding2Power b tp i = if b<=tp then tp,i else findBounding2Power b (tp*2) (i+1) in - findBounding2Power b 1 0 - - //------------------------------------------------------------------------- - // p = 2^k.m + 1 prime and w primitive 2^k root of 1 mod p - //----------------------------------------------------------------------- - - // Given p = 2^k.m + 1 prime and w a primitive 2^k root of unity (mod p). - // Required to define arithmetic ops for Fp = field modulo p. - // The following are possible choices for p. - - // p, k, m, g, w - // let p,k,m,g,w = 97L, 4, 6, 5, 8 // p is 7 bit - // let p,k,m,g,w = 769L, 8, 3, 7, 7 // p is 10 bit - // let p,k,m,g,w = 7681L, 8, 30, 13, 198 // p is 13 bit - // let p,k,m,g,w = 12289L, 10, 12, 11, 49 // p is 14 bit - // let p,k,m,g,w = 167772161L, 25, 5, 557092, 39162105 // p is 28 bit - // let p,k,m,g,w = 469762049L, 26, 7, 1226571, 288772249 // p is 29 bit - - - let p,k,m,g,w = 2013265921L, 27, 15, 31, 440564289 // p is 31 bit - let primeP = p - - let max_bits_inside_p = 30 - - - //------------------------------------------------------------------------- - // Fp = finite field mod p - rep is uint32 - //----------------------------------------------------------------------- - - - type fp = uint32 - // operations in Fp (finite field size p) - module Fp = - //module I = UInt32 - let p = 2013265921ul : fp - let p64 = 2013265921UL : uint64 - let to_int (x:fp) : int = int32 x - let of_int (x:int) : fp = uint32 x - - let mzero : fp = 0ul - let mone : fp = 1ul - let mtwo : fp = 2ul - let inline madd (x:fp) (y:fp) : fp = (x + y) % p - let inline msub (x:fp) (y:fp) : fp = (x + p - y) % p - let inline mmul (x:fp) (y:fp) : fp = uint32 ((uint64 x * uint64 y) % p64) - - let rec mpow x n = - if n=0 then mone - elif n % 2=0 then mpow (mmul x x) (n / 2) - else mmul x (mpow (mmul x x) (n / 2)) - - let rec mpowL x n = - if n = 0L then mone - elif n % 2L = 0L then mpowL (mmul x x) (n / 2L) - else mmul x (mpowL (mmul x x) (n / 2L)) - - // Have the w is primitive 2^kth root of 1 in Zp - let m2PowNthRoot n = - // Find x s.t. x is (2^n)th root of unity. - // - // pow w (pow 2 k) = 1 primitively. - // = pow w (pow 2 ((k-n)+n)) - // = pow w (pow 2 (k-n) * pow 2 n) - // = pow (pow w (pow 2 (k-n))) (pow 2 n) - // - // Take wn = pow (pow w (pow 2 (k-n))) - - mpow (uint32 w) (pow32 2 (k-n)) - - let minv x = mpowL x (primeP - 2L) - - - //------------------------------------------------------------------------- - // FFT - in place low garbage - //----------------------------------------------------------------------- - - open Fp - let rec computeFFT lambda mu n w (u: _[]) (res: _[]) offset = - // Given n a 2-power, - // w an nth root of 1 in Fp, and - // lambda, mu and u(x) defining - // poly(lambda,mu,x) = sum(i pow32 2 i) - - let computeFftPaddedPolynomialProduct bigK k u v = - // REQUIRES: bigK = 2^k - // REQUIRES: Array lengths of u and v = bigK. - // REQUIRES: degree(uv) <= bigK-1 - // --- - // Given u,v polynomials. - // Computes the product polynomial by FFT. - // For correctness, - // require the result coeff to be in range [0,p-1], for p defining Fp above. - - #if SELFTEST - check ( k <= maxTwoPower ); - check ( bigK = twoPowerTable.[k] ); - check ( u.Length = bigK ); - check ( v.Length = bigK ); - #endif - // Find 2^k primitive root of 1 - let w = m2PowNthRoot k - // FFT - let n = bigK - let uT = computFftInPlace n w u - let vT = computFftInPlace n w v - // Evaluate - let rT = Array.init n (fun i -> mmul uT.[i] vT.[i]) - // INV FFT - let r = computeInverseFftInPlace n w rT - r - - let padTo n (u: _ array) = - let uBound = u.Length - Array.init n (fun i -> if i mmul uT.[i] vT.[i]) - // INV FFT - let r = computeInverseFftInPlace n w rT - Array.map Fp.to_int r - - - //------------------------------------------------------------------------- - // fp exports - //----------------------------------------------------------------------- - - open Fp - let mzero = mzero - let mone = mone - let max_fp = msub Fp.p mone - let fp_of_int x = Fp.of_int x - let int_of_fp x = Fp.to_int x - let max_bits_inside_fp = max_bits_inside_p - - //------------------------------------------------------------------------- - // FFT - reference implementation - //----------------------------------------------------------------------- - - #if SELFTEST - open Fp - let rec computeFftReference n w u = - // Given n a 2-power, - // w an nth root of 1 in Fp, and - // u(x) = sum(i u.[2*i]) - let uodd = Array.init (n/2) (fun i -> u.[2*i+1]) - let uevenFT = computeFftReference (n/2) (mmul w w) ueven - let uoddFT = computeFftReference (n/2) (mmul w w) uodd - Array.init n - (fun j -> - if j < n/2 then - madd - (uevenFT.[j]) - (mmul - (mpow w j) - (uoddFT.[j])) - else - let j = j - (n/2) - msub - (uevenFT.[j]) - (mmul - (mpow w j) - (uoddFT.[j]))) - #endif - - open FFT - - type n = BigNat - - let string_of_int (i:int) = i.ToString() - - let bound (n: n) = n.bound - let setBound (n: n) (v:int32) = n.bound <- v - let coeff (n:n) i = n.digits.[i] - let coeff64 (n:n) i = int64 (coeff n i) - let setCoeff (n:n) i v = n.digits.[i] <- v - - let rec pow64 x n = - if n=0 then 1L - elif n % 2 = 0 then pow64 (x * x) (n / 2) - else x * (pow64 (x * x) (n / 2)) - - let rec pow32 x n = - if n=0 then 1 - elif n % 2 = 0 then pow32 (x*x) (n / 2) - else x* pow32 (x*x) (n / 2) - - let hash(n) = - let mutable res = 0 - for i = 0 to n.bound - 1 do // could stop soon, it's "hash" - res <- n.digits.[i] + (res <<< 3) - done; - res - - //---------------------------------------------------------------------------- - // misc - //-------------------------------------------------------------------------- - -#if CHECKED - let check b str = if not b then failwith ("check failed: " + str) -#endif - let max_int a b = if a int32 - let inline div64base (x:int64) = int64 (uint64 x >>> baseBits) - - let divbase x = int32 (uint32 x >>> baseBits) - let modbase x = (x &&& baseMask) - - let inline index z i = if i < z.bound then z.digits.[i] else 0 - - let createN b = { bound = b; - digits = Array.zeroCreate b } - let copyN x = { bound = x.bound; - digits = Array.copy x.digits } // could copy just enough... - - let normN n = - // normalises bound - let rec findLeastBound (na:ints) i = if i = -1 || na.[i]<>0 then i+1 else findLeastBound na (i-1) - let bound = findLeastBound n.digits (n.bound-1) - n.bound <- bound; - n - - let boundInt = 2 // int will fit with bound=2 - let boundInt64 = 3 // int64 will fit with bound=3 - let boundBase = 1 // base will fit with bound=1 - obviously! - -//---------------------------------------------------------------------------- -// base, coefficients, poly -//-------------------------------------------------------------------------- - - let embed x = - let x = if x<0 then 0 else x // no -ve naturals - if x < baseN then - let r = createN 1 - r.digits.[0] <- x; - normN r - else - let r = createN boundInt - for i = 0 to boundInt - 1 do - r.digits.[i] <- (x / pow32 baseN i) % baseN - done; - normN r - - let embed64 x = - let x = if x<0L then 0L else x // no -ve naturals - let r = createN boundInt64 - for i = 0 to boundInt64-1 do - r.digits.[i] <- int32 ( (x / pow64 baseNi64 i) % baseNi64) - done; - normN r - - let eval n = - if n.bound = 1 - then n.digits.[0] - else - let mutable acc = 0 - for i = n.bound-1 downto 0 do - acc <- n.digits.[i] + baseN * acc - done; - acc - - let eval64 n = - if n.bound = 1 - then int64 n.digits.[0] - else - let mutable acc = 0L - for i = n.bound-1 downto 0 do - acc <- int64 (n.digits.[i]) + baseNi64 * acc - done; - acc - - let one = embed 1 - let zero = embed 0 - - let restrictTo d n = - { bound = min_int d n.bound; digits = n.digits} - - let shiftUp d n = - let m = createN (n.bound+d) - for i = 0 to n.bound-1 do - m.digits.[i+d] <- n.digits.[i] - done; - m - - let shiftDown d n = - if n.bound-d<=0 then - zero - else - let m = createN (n.bound-d) - for i = 0 to m.bound-1 do - m.digits.[i] <- n.digits.[i+d] - done; - m - - let degree n = n.bound-1 - - -//---------------------------------------------------------------------------- -// add, sub -//-------------------------------------------------------------------------- - - // addition - let rec addP i n c p q r = // p+q + c - if i0 then - r.digits.[i] <- modbase x; - let c = divbase x - // if p (or q) exhausted and c zero could switch to copying mode - subP (i+1) n c p q r - else - let x = x + baseN // add baseN - r.digits.[i] <- modbase x; - let c = divbase x - 1 // sub baseN - // if p (or q) exhausted and c zero could switch to copying mode - subP (i+1) n c p q r - else - let underflow = c<>0 - underflow - - let sub p q = - // NOTE: x-y=0 when x<=y, it is natural subtraction - let rbound = max_int p.bound q.bound - let r = createN rbound - let carry = 0 - let underflow = subP 0 rbound carry p q r - if underflow then - embed 0 - else - normN r - - -//---------------------------------------------------------------------------- -// isZero, equal, ordering, sign, min, max -//-------------------------------------------------------------------------- - - let isZero p = p.bound=0 - let IsZero p = isZero p - let isOne p = p.bound=1 && p.digits.[0] = 1 - - let equal p q = - (p.bound = q.bound) && - (let rec check (pa:ints) (qa:ints) i = - // HAVE: pa.[j] = qa.[j] for i < j < p.bound - (i = -1) || (pa.[i]=qa.[i] && check pa qa (i-1)) - - check p.digits q.digits (p.bound-1)) - - let shiftCompare p pn q qn = - if p.bound + pn < q.bound + qn then -1 - elif p.bound + pn > q.bound + pn then 1 - else - let rec check (pa:ints) (qa:ints) i = - // HAVE: pa.[j-pn] = qa.[j-qn] for i < j < p.bound - // Looking for most significant differing coeffs to determine ordering - if i = -1 then - 0 - else - let pai = if i < pn then 0 else pa.[i-pn] - let qai = if i < qn then 0 else qa.[i-qn] - if pai = qai then check pa qa (i-1) - elif pai < qai then -1 - else 1 - - check p.digits q.digits (p.bound + pn - 1) - - let compare p q = - if p.bound < q.bound then -1 - elif p.bound > q.bound then 1 - else - let rec check (pa:ints) (qa:ints) i = - // HAVE: pa.[j] = qa.[j] for i < j < p.bound - // Looking for most significant differing coeffs to determine ordering - if i = -1 then 0 - elif pa.[i]=qa.[i] then check pa qa (i-1) - elif pa.[i]] - let lt p q = compare p q = -1 - [] - let gt p q = compare p q = 1 - [] - let lte p q = compare p q <> 1 - [] - let gte p q = compare p q <> -1 - - [] - let min a b = if lt a b then a else b - [] - let max a b = if lt a b then b else a - - -//---------------------------------------------------------------------------- -// scale -//-------------------------------------------------------------------------- - - // REQUIRE: baseN + baseN.2^32 < Int64.max_int - let rec contributeArr (a:ints) i (c:int64) = - // Given c and require c < baseN.2^32 - // Compute: r <- r + c . B^i - // via r.digits.[i] <- r.digits.[i] + c and normalised - let x = int64 a.[i] + c - // HAVE: x < baseN + baseN.2^32 - let c = div64base x - let x = mod64base x - // HAVE: c < 1 + 2^32 < baseN.2^32, recursive call ok - // HAVE: x < baseN - a.[i] <- x; // store residue x - if c>0L then - contributeArr a (i+1) c // contribute carry next position - - let inline contribute r i c = contributeArr r.digits i c - - // REQUIRE: max_int < 2^32 - [] - let rec scale (k:int) (p:n) = - // Given k and p and require k < 2^32 - // Computes "scalar" product k.p - // - let rbound = p.bound + boundInt - let r = createN rbound - let k = int64 k - for i = 0 to p.bound-1 do - let kpi = k * int64 p.digits.[i] - // HAVE: kpi < 2^32 * baseN which meets "contribute" requirement - contribute r i kpi - done; - normN r - - -//---------------------------------------------------------------------------- -// mulSchoolBook -//-------------------------------------------------------------------------- - - // multiplication: naively O(n^2) -(* - let mulSchoolBook' p q = - let rbound = p.bound + q.bound + boundBase*2 - let r = createN rbound - let pa = p.digits - let qa = q.digits - for i = 0 to p.bound-1 do - for j = 0 to q.bound-1 do - contribute r (i+j) (int64 pa.[i] * int64 qa.[j]) - done - done; - normN r -*) - - let mulSchoolBookBothSmall p q = - let r = createN 2 - let rak = int64 p * int64 q - setCoeff r 0 (mod64base rak); - setCoeff r 1 (int32 (div64base rak)) - normN r - - let rec mulSchoolBookCarry r c k = - if ( c > 0L ) then - // ToAdd = c.B^k - let rak = (coeff64 r k) + c - setCoeff r k (mod64base rak); - mulSchoolBookCarry r (div64base rak) (k + 1) - - let mulSchoolBookOneSmall p q = - let bp = bound(p) - let rbound = bp + 1 - let r = createN rbound - let q = int64 q - let mutable c = 0L - for i = 0 to bp-1 do - let rak = c + (coeff64 r i) + (coeff64 p i) * q - setCoeff r i (mod64base rak); - c <- div64base rak; - mulSchoolBookCarry r c bp - normN r - - - // multiplication: naively O(n^2) -- this version - unchecked - is faster - let mulSchoolBookNeitherSmall p q = - let rbound = p.bound + q.bound - let r = createN rbound - let ra = r.digits - let pa = p.digits - let qa = q.digits - // ToAdd p*q - for i = 0 to p.bound-1 do - // ToAdd p.[i] * q * B^i - let pai = int64 pa.[i] - let mutable c = 0L - let mutable k = i // k = i + j - // ToAdd = pi.qj.B^(i+j) for j = 0,j+1... - for j = 0 to q.bound-1 do - // ToAdd = c.B^k + pi.qj.B^(i+j) for j = j,j+1... and k = i+j - let qaj = int64 qa.[j] - let rak = int64 ra.[k] + c + pai * qaj - ra.[k] <- int32 (mod64base rak); - c <- div64base rak; - k <- k + 1; - mulSchoolBookCarry r c k - normN r - - let mulSchoolBook p q = - let pSmall = (bound(p) = 1) - let qSmall = (bound(q) = 1) - if (pSmall && qSmall) then mulSchoolBookBothSmall (coeff p 0) (coeff q 0) - elif pSmall then mulSchoolBookOneSmall q (coeff p 0) - elif qSmall then mulSchoolBookOneSmall p (coeff q 0) - else mulSchoolBookNeitherSmall p q - - -//---------------------------------------------------------------------------- -// quickMulUsingFft -//-------------------------------------------------------------------------- - - // The FFT polynomial multiplier requires the result coeffs fit inside Fp. - // - // OVERVIEW: - // The numbers are recoded as polynomials to be evaluated at (x=2^bigL). - // The polynomials are FFT multiplied, requiring result coeff to fit Fp. - // The result product is recovered by evaluating the poly at (x=2^bigL). - // - // REF: - // QuickMul: Practical FFT-base Integer Multiplication, - // Chee Yap and Chen Yi. - // - // There is choice of how to encode the nats polynomials. - // The choice is the (2^bigL) base to use. - // For bigL=1, the FFT will cater for a product of upto 256M bits. - // Larger bigL have less reach, but compute faster. - // So plan to choose bigL depending on the number of bits product. - // - // DETERMINING THE K,L BOUNDS. - // - // Given representing using K-vectors, K a power of 2, K=2^k, and - // If choosing inputs to have L-bit coefficients. - // - // The result coeff are: - // - // res(i) = sum (j pow32 2 (bigL*i)) - } - - let table = - [| // bigL , k , bigK , bigN // - mkEncoding ( 1 , 28 , 268435456 , 268435456 ) ; - mkEncoding ( 2 , 26 , 67108864 , 134217728 ) ; - mkEncoding ( 3 , 24 , 16777216 , 50331648 ) ; - mkEncoding ( 4 , 22 , 4194304 , 16777216 ) ; - mkEncoding ( 5 , 20 , 1048576 , 5242880 ) ; - mkEncoding ( 6 , 18 , 262144 , 1572864 ) ; - mkEncoding ( 7 , 16 , 65536 , 458752 ) ; - mkEncoding ( 8 , 14 , 16384 , 131072 ) ; - mkEncoding ( 9 , 12 , 4096 , 36864 ) ; - mkEncoding ( 10 , 10 , 1024 , 10240 ) ; - mkEncoding ( 11 , 8 , 256 , 2816 ) ; - mkEncoding ( 12 , 6 , 64 , 768 ) ; - mkEncoding ( 13 , 4 , 16 , 208 ) ; - |] - - let calculateTableTow bigL = - // Given L. - // Have L via "log2 K <= max_bits_inside_fp - 2L". - // Have N via "N = K.L" - // - let k = max_bits_inside_fp - 2*bigL - let bigK = pow64 2L k - let N = bigK * int64 bigL - bigL,k,bigK,N - - let encodingGivenResultBits bitsRes = - // choose maximum bigL s.t. bitsRes < bigN - // EXCEPTION: fails is bitsRes exceeds 2^28 (largest bigN table) - let rec selectFrom i = - if i+1 < table.Length && bitsRes < table.[i+1].bigN then - selectFrom (i+1) - else - table.[i] - - if bitsRes >= table.[0].bigN then - failwith "Product is huge, around 268435456 bits, beyond quickmul" - else - selectFrom 0 - - let bitmask = Array.init baseBits (fun i -> (pow32 2 i - 1)) - let twopowers = Array.init baseBits (fun i -> (pow32 2 i)) - let twopowersI64 = Array.init baseBits (fun i -> (pow64 2L i)) - // bitmask(k) = 2^k - 1 - // twopowers(k) = 2^k // - - let wordBits word = - let rec hi k = - if k=0 then 0 - elif (word &&& twopowers.[k-1]) <> 0 then k - else hi (k-1) - - hi baseBits - - let bits u = - if u.bound=0 then 0 - else degree u * baseBits + wordBits u.digits.[degree u] - - let extractBits n enc bi = - let bj = bi + enc.bigL - 1 // the last bit (inclusive) - let biw = bi / baseBits // first bit is this index pos - let bjw = bj / baseBits // last bit is this index pos - if biw <> bjw then - // two words - let x = index n biw - let y = index n bjw // bjw = biw+1 - let xbit = bi % baseBits // start bit x - let nxbits = baseBits - xbit // number of bitsin x - let x = x >>> xbit // shift down x so bit0 is first - let y = y <<< nxbits // shift up y so it starts where x finished - let x = x ||| y // combine them - let x = x &&& bitmask.[enc.bigL] // mask out (high y bits) to get required bits - x - else - // one word - let x = index n biw - let xbit = bi % baseBits // start bit x - let x = x >>> xbit - let x = x &&& bitmask.[enc.bigL] - x - - let encodePoly enc n = - // Find poly s.t. n = poly evaluated at x=2^bigL - // with 0 <= pi < 2^bigL. - // - let poly = Array.create enc.bigK (fp_of_int 0) - let biMax = n.bound * baseBits - let rec encoder i bi = - // bi = i * bigL - if i=enc.bigK || bi > biMax then - () // done - else - ( let pi = extractBits n enc bi - poly.[i] <- fp_of_int pi; - let i = i + 1 - let bi = bi + enc.bigL - encoder i bi - ) - - encoder 0 0; - poly - - let decodeResultBits enc (poly : fp array) = - // Decoding evaluates poly(x) (coeff Fp) at X = 2^bigL. - // A bound on number of result bits is "enc.bigN + boundInt", but that takes HUGE STEPS. - // Garbage has a cost, so we minimize it by working out a tight bound. - // - // poly(X) = sum i=0..n coeff_i * X^i where n is highest non-zero coeff. - // <= 2^max_bits_inside_fp * (1 + X + ... X^n) - // <= 2^max_bits_inside_fp * (X^(n+1) - 1) / (X - 1) - // <= 2^max_bits_inside_fp * X^(n+1) / (X - 1) - // <= 2^max_bits_inside_fp * X^(n+1) / (X/2) provided X/2 <= X-1 - // <= 2^max_bits_inside_fp * X^n * 2 - // <= 2^max_bits_inside_fp * (2^bigL)^n * 2 - // <= 2^(max_bits_inside_fp + bigL.n + 1) - // - let mutable n = 0 - for i = 0 to poly.Length-1 do - if poly.[i] <> mzero then n <- i - done; - let rbits = max_bits_inside_fp + enc.bigL * n + 1 - rbits + 1 // +1 since 2^1 requires 2 bits not 1 - - // REQUIRE: bigL <= baseBits - let decodePoly enc poly = - // Find n = poly evaluated at x=2^bigL - // Note, 0 <= pi < max_fp. - // - let rbound = enc.bigN + boundInt // gross bound - let rbound = (decodeResultBits enc poly) / baseBits + 1 - let r = createN rbound - let rec evaluate i j d = - // HAVE: bigL.i = j * baseBits + d and d= rbound then -#if CHECKED - check (poly.[i] = mzero) "decodePoly"; -#endif - () - else ( - let x = int64 (int_of_fp poly.[i]) * twopowersI64.[d] - // HAVE: x < 2^32 . 2^baseBits = 2^32.baseN - contribute r j x - ); - let i = i + 1 - let d = d + enc.bigL - let j,d = if d >= baseBits then j+1 , d-baseBits else j,d - // HAVE: d < baseBits, note: bigL minDigitsKaratsuba then - let k = bmax / 2 - let a0 = restrictTo k p - let a1 = shiftDown k p - let b0 = restrictTo k q - let b1 = shiftDown k q - let q0 = mul a0 b0 - let q1 = mul (add a0 a1) (add b0 b1) - let q2 = mul a1 b1 - let p0 = q0 - let p1 = sub q1 (add q0 q2) - let p2 = q2 - let r = add p0 (shiftUp k (add p1 (shiftUp k p2))) - r - else - mulSchoolBook p q - - let rec mulKaratsuba x y = recMulKaratsuba mulKaratsuba x y - - -//---------------------------------------------------------------------------- -// mul - composite -//-------------------------------------------------------------------------- - - let productDigitsUpperSchoolBook = (64000 / baseBits) - // When is it worth switching away from SchoolBook? - // SchoolBook overhead is low, so although it's O(n^2) it remains competitive. - // - // 28/3/2006: - // The FFT can take over from SchoolBook at around 64000 bits. - // Note, FFT performance is stepwise, according to enc from table. - // The steps are big steps (meaning sudden jumps/drops perf). - // - - let singleDigitForceSchoolBook = (32000 / baseBits) - // If either argument is "small" then stay with SchoolBook. - // - - let productDigitsUpperFft = (table.[0].bigN / baseBits) - // QuickMul is good upto a finite (but huge) limit: - // Limit 268,435,456 bits product. - // - // From the code: - // let bitsRes = bits u + bits v - // fails when bitsRes >= table.[0].bigN - // So, not applicable when: - // P1: table.[0].bigN <= bits(u) + bits(v) - // P2: table.[0].bigN <= .. <= baseBits * (u.bound + v.bound) - // P3: table.[0].bigN <= .. <= baseBits * (u.bound + v.bound) - // P4: table.[0].bigN / baseBits <= u.bound + v.bound - // - - // Summary of mul algorithm choice: - // 0 <= uv_bound < upper_school_book - Schoolbook - // upper_school_book <= uv_bound < upper_fft - QuickMul - // upper_fft <= uv_bound < ... - Karatsuba - // - // NOTE: - // - Karatsuba current implementation has high garbage cost. - // - However, a linear space cost is possible... - // - Meantime, switch to Karatsuba only beyond FFT range. - // - - let rec mul p q = - let pq_bound = p.bound + q.bound - if pq_bound < productDigitsUpperSchoolBook || - p.bound < singleDigitForceSchoolBook || - q.bound < singleDigitForceSchoolBook - then - // Within school-book initial range: - mulSchoolBook p q - else - if pq_bound < productDigitsUpperFft then - // Inside QuickMul FFT range: - quickMulUsingFft p q - else - // Beyond QuickMul FFT range, or maybe between Schoolbook and QuickMul (no!): - // Use karatsuba method, with "mul" as recursive multiplier, - // so will reduce sizes of products on recursive calls, - // and QuickMul will take over if they fall within it's range. - // - recMulKaratsuba mul p q - - -//---------------------------------------------------------------------------- -// division - scaleSubInPlace -//-------------------------------------------------------------------------- - - let scaleSubInPlace x f a n = - // Have x = sumR 0 xd (\i.xi.B^i) where xd = degree x - // a = sumR 0 ad (\i.digitsi.B^i) where ad = degree a - // f < B - // n < xd - // Assumes "f.digits.B^n < x". - // Required to remove f.digits.B^n from x place. - //------ - // Result = x_initial - f.digits.B^n - // = x_initial - f.[sumR 0 ad (\i.digitsi.B^(i+n))] - // State: j = 0 - // z = f * a0 - // Invariant(x,z,j,n): - // P1: x_result = x - z.B^(j+n) - f.[sumR (j+1) ad (\i.digitsi.B^i+n)] - // P2: z < B^2 - 1, and so has form z = zHi.B + zLo for zHi,zLo < B. - // Base: Invariant holds initially. - // Step: (a) Remove zLo from x: - // If zLo <= x_(j+n) then zLo <- 0 - // x_(j+n) <- x_(j+n) - zLo - // else zLo <- 0 - // x_(j+n) <- x_(j+n) + (B - zLo) - // = x_(j+n) - zLo + B - // zHi <- zHi + 1 - // Here, invariant P1 still holds, P2 may break. - // (b) Advance j: - // Have z = zHi.B since zLo = 0. - // j <- j + 1 - // z <- zHi + f * a_(j+1) - // P2 holds: - // Have z <= B + (B-1)*(B-1) = B + B^2 - 2B + 1 = B^2 - B + 1 - // Have z <= B^2 - 1 when B >= 2 which is required for B being a base. - // P1 holds, - // moved f.digits_(j+1).B^(j+1+n) factor over. - // - // Once j+1 exceeds ad, summation is zero and it contributes no more terms (b). - // Continue until z = 0, which happens since z decreases towards 0. - // Done. - // - let invariant (z,j,n) = () - #if CHECKED - let x_initial = copyN x - let x_result = sub x_initial (shiftUp n (scale f a)) - let invariant (z,j,n) = - let P1 = - equal - x_result - (sub x (add (shiftUp (j+n) (embed64 z)) - (mul (embed f) - (shiftUp (j+1+n) (shiftDown (j+1) a))))) - let P2 = z < baseNi64 * baseNi64 - 1L - check P1 "P1"; - check P2 "P2" - - #endif - let xres = x - let x,xd = x.digits,degree x - let a,ad = a.digits,degree a - let f = int64 f - let mutable j = 0 - let mutable z = f * int64 a.[0] - while( z > 0L || j < ad ) do - if j > xd then failwith "scaleSubInPlace: pre-condition did not apply, result would be -ve"; - invariant(z,j,n); // P1,P2 hold - let mutable zLo = mod64base z |> int32 - let mutable zHi = div64base z - if zLo <= x.[j+n] then - x.[j+n] <- x.[j+n] - zLo - else ( - x.[j+n] <- x.[j+n] + (baseN - zLo); - zHi <- zHi + 1L - ); - // P1 holds - if j < ad then - z <- zHi + f * int64 a.[j+1] - else - z <- zHi; - j <- j + 1; - // P1,P2 hold - done; - ignore (normN xres) - - // - let scaleSub x f a n = - let freshx = add x zero - scaleSubInPlace freshx f a n; - normN freshx -(* - - let scaleSub2 x f a n = sub x (shiftUp n (mul (embed f) a)) - - let x = (mul (embed 234234234) (pow (embed 10) (embed 20))) - let f = 2 - let a = (embed 1231231231) - let n = 2 - let res = scaleSub x f a n - let res2 = scaleSub2 x f a n - - let x, xd, f, a, ad, n = freshx.digits, freshx.bound, f, a.digits, a.bound, n - *) - - -//---------------------------------------------------------------------------- -// division - scaleAddInPlace -//-------------------------------------------------------------------------- - - let scaleAddInPlace x f a n = - // Have x = sumR 0 xd (\i.xi.B^i) - // a = sumR 0 ad (\i.digitsi.B^i) - // f < B - // n < xd - // Required to add f.digits.B^n to x place. - // Assumes result will fit with x (0...xd). - //------ - // Result = x_initial + f.digits.B^n - // = x_initial + f.[sumR 0 ad (\i.digitsi.B^i+n)] - // State: j = 0 - // z = f * a0 - // Invariant(x,z,j,n): - // P1: x_result = x + z.B^(j+n) + f.[sumR (j+1) ad (\i.digitsi.B^i+n)] - // P2: z < B^2 - 1, and so has form z = zHi.B + zLo for zHi,zLo < B. - // Base: Invariant holds initially. - // Step: (a) Add zLo to x: - // If zLo < B - x_(j+n) then zLo <- 0 - // x_(j+n) <- x_(j+n) + zLo - // else zLo <- 0 - // x_(j+n) <- zLo - (B - x_(j+n)) - // = x_(j+n) + zLo - B - // zHi <- zHi + 1 - // Here, invariant P1 still holds, P2 may break. - // (b) Advance j: - // Have z = zHi.B since zLo = 0. - // j <- j + 1 - // z <- zHi + f * a_(j+1) - // P2 holds: - // Have z <= B + (B-1)*(B-1) = B + B^2 - 2B + 1 = B^2 - B + 1 - // Have z <= B^2 - 1 when B >= 2 which is required for B being a base. - // P1 holds, - // moved f.digits_(j+1).B^(j+1+n) factor over. - // - // Once j+1 exceeds ad, summation is zero and it contributes no more terms (b). - // Continue until z = 0, which happens since z decreases towards 0. - // Done. - // - let invariant (z,j,n) = () -#if CHECKED - let x_initial = copyN x - let x_result = add x_initial (shiftUp n (scale f a)) - let invariant (z,j,n) = - let P1 = - equal - x_result - (add x (add (shiftUp (j+n) (embed64 z)) - (mul (embed f) - (shiftUp (j+1+n) (shiftDown (j+1) a))))) - let P2 = z < baseNi64 * baseNi64 - 1L - check P1 "P1"; - check P2 "P2" - -#endif - let xres = x - let x,xd = x.digits,degree x - let a,ad = a.digits,degree a - let f = int64 f - let mutable j = 0 - let mutable z = f * int64 a.[0] - while( z > 0L || j < ad ) do - if j > xd then failwith "scaleSubInPlace: pre-condition did not apply, result would be -ve"; - invariant(z,j,n); // P1,P2 hold - let mutable zLo = mod64base z |> int32 - let mutable zHi = div64base z - if zLo < baseN - x.[j+n] then - x.[j+n] <- x.[j+n] + zLo - else ( - x.[j+n] <- zLo - (baseN - x.[j+n]); - zHi <- zHi + 1L - ); - // P1 holds - if j < ad then - z <- zHi + f * int64 a.[j+1] - else - z <- zHi; - j <- j + 1; - // P1,P2 hold - done; - ignore (normN xres) - - // - let scaleAdd x f a n = - let freshx = add x zero - scaleAddInPlace freshx f a n; - normN freshx - -(* - let scaleAdd2 x f a n = add x (shiftUp n (mul (embed f) a)) - - let x = (mul (embed 234234234) (pow (embed 10) (embed 20))) - let f = 2 - let a = (embed 1231231231) - let n = 2 - let res = scaleAdd x f a n - let res2 = scaleAdd2 x f a n - - let x, xd, f, a, ad, n = freshx.digits, freshx.bound, f, a.digits, a.bound, n -*) - -//---------------------------------------------------------------------------- -// division - removeFactor -//-------------------------------------------------------------------------- - - (* - let removeFactorReference x a n = - let ff = div x (shiftUp n a) - to_int ff - *) - - let removeFactor x a n = - // Assumes x < a.B^(n+1) - // Choose f s.t. - // (a) f.digits.B^n <= x - // (b) f=0 iff x < a.B^n - // - let dega,degx = degree a,degree x - if degx < dega + n then 0 else // possible with "normalisation" - let aa,xa = a.digits,x.digits - let f = - if dega = 0 then // a = a0 - if degx = n then - xa.[n] / aa.[0] - else ( -#if CHECKED - check (degx = n+1) "removeFactor degx#1"; -#endif - let f64 = (int64 xa.[degx] * baseNi64 + int64 xa.[degx-1]) / int64 aa.[0] - int32 f64 - ) - else // a = sumR 0 dega (\i.digitsi.B^i) - if degx = dega + n then - xa.[degx] / (aa.[dega] + 1) // +1 to bound above a - else ( -#if CHECKED - check (degx = dega+n+1) "removeFactor degx#2"; -#endif - let f64 = (int64 xa.[degx] * baseNi64 + int64 xa.[degx-1]) - / (int64 aa.[dega] + 1L) // +1 to bound above a - int32 f64 - ) - - if f = 0 then - let lte = (shiftCompare a n x 0) <> 1 - if lte then 1 else 0 - else - f - - -//---------------------------------------------------------------------------- -// division - divmod -//-------------------------------------------------------------------------- - - let divmod b a = - // Returns d,r where b = d.digits + r and r0 then - scaleSubInPlace x f a n; - scaleAddInPlace d f one n; - Invariant(d,x,n,p) - else - finished <- f=0 && n=0; - if not finished then - if p = m+n then - Invariant(d,x,n-1,p); - n <- n-1 - else - Invariant(d,x,n-1,p-1); - n <- n-1; - p <- p-1 - // Have: "b = d.digits + x" return d,x - normN d,normN x - - //---------------------------------------------------------------------------- - // div, mod - //-------------------------------------------------------------------------- - - [] - let div b a = fst (divmod b a) - [] - let rem b a = snd (divmod b a) - // rem b a, for small a can do (base mod a) trick - O(N) - - - //---------------------------------------------------------------------------- - // hcf - //-------------------------------------------------------------------------- - - let hcf a b = - // Have: 0 <= a,b since naturals - let rec hcfloop a b = // Require: 0 <= a <= b - if equal zero a then b - else - // Have: 0 < a <= b - let d,r = divmod b a - // Have: r < a from divmod - hcfloop r a // Have: 0 <= r < a - - if lt a b then hcfloop a b // Have: 0 <= a < b - else hcfloop b a // Have: 0 <= b <= a - - //---------------------------------------------------------------------------- - // pow - //-------------------------------------------------------------------------- - - let two = embed 2 - let powi x n = - let rec power acc x n = - if n=0 then acc - elif n % 2=0 then power acc (mul x x) (n / 2) - else power (mul x acc) (mul x x) (n / 2) - - power one x n - - let pow x n = - let rec power acc x n = - if isZero n then acc - else - let ndiv2,nmod2 = divmod n two // use: intdivmod when available - if isZero nmod2 then power acc (mul x x) ndiv2 - else power (mul x acc) (mul x x) ndiv2 - - power one x n - -//---------------------------------------------------------------------------- -// float n -//-------------------------------------------------------------------------- - - let to_float n = - let basef = float baseN - let rec evalFloat acc k i = - if i = n.bound then - acc - else - evalFloat (acc + k * float n.digits.[i]) (k * basef) (i+1) - evalFloat 0.0 1.0 0 - -//---------------------------------------------------------------------------- -// n <-> int -//-------------------------------------------------------------------------- - - let of_int n = embed n - let of_int64 n = embed64 n - - /// Convert BigNat to uint32 otherwise OverflowException. - let to_uint32 n = - match n.bound with - | 0 -> 0u - | 1 -> n.digits.[0] |> uint32 - | 2 -> let xA,xB = n.digits.[0],n.digits.[1] - if xB > baseMask32B then raise (System.OverflowException()) - ( uint32 (xA &&& baseMask32A)) + - ((uint32 (xB &&& baseMask32B)) <<< baseShift32B) - | _ -> raise (System.OverflowException()) - - /// Convert BigNat to uint64 otherwise OverflowException. - let to_uint64 n = - match n.bound with - | 0 -> 0UL - | 1 -> n.digits.[0] |> uint64 - | 2 -> let xA,xB = n.digits.[0],n.digits.[1] - ( uint64 (xA &&& baseMask64A)) + - ((uint64 (xB &&& baseMask64B)) <<< baseShift64B) - | 3 -> let xA,xB,xC = n.digits.[0],n.digits.[1],n.digits.[2] - if xC > baseMask64C then raise (System.OverflowException()) - ( uint64 (xA &&& baseMask64A)) + - ((uint64 (xB &&& baseMask64B)) <<< baseShift64B) + - ((uint64 (xC &&& baseMask64C)) <<< baseShift64C) - | _ -> raise (System.OverflowException()) - - -//---------------------------------------------------------------------------- -// n -> string -//-------------------------------------------------------------------------- - - -#if CHECKED - let checks = false -#endif - let to_string n = - // Much better complexity than naive_string_of_z. - // It still does "nDigit" calls to (int)divmod, - // but the degree on which it is called halves (not decrements) each time. - // - let degn = degree n - let rec route prior k ten2k = - if degree ten2k > degn - then (k,ten2k)::prior - else route ((k,ten2k)::prior) (k+1) (mul ten2k ten2k) - let kten2ks = route [] 0 (embed 10) - let rec collect isLeading digits n = function - | [] -> - // Have 0 <= n < 10^1, so collect a single digit (if needed) - let n = eval n -#if CHECKED - if checks then check (0 <= n) "to_string: digit0"; - if checks then check (n <= 9) "to_string: digit9"; -#endif - if isLeading && n=0 then digits // suppress leading 0 - else string_of_int n :: digits - | (k,ten2k)::prior -> -#if CHECKED - if checks then check (lt n (mul ten2k ten2k)) "string_of_int: bound n"; -#endif - // Have 0 <= n < (ten2k)^2 and ten2k = 10^(2^k) - let nH,nL = divmod n ten2k -#if CHECKED - if checks then check (lt nH ten2k) "string_of_int: bound nH"; - if checks then check (lt nL ten2k) "string_of_int: bound nL"; -#endif - // Have 0 <= nH,nL < (ten2k) and ten2k = 10^(2^k) - if isLeading && isZero nH then - // suppress leading 0s - let digits = collect isLeading digits nL prior - digits - else - let digits = collect false digits nL prior - let digits = collect isLeading digits nH prior - digits - - let prior = kten2ks - let digits = collect true [] n prior - match digits with - | [] -> "0" - | _ -> digits |> Array.of_list |> System.String.Concat - -//---------------------------------------------------------------------------- -// n <- string -//-------------------------------------------------------------------------- - - let of_string (str:string) = - // Would it be better to split string half and combine results? - let len = str.Length - if System.String.IsNullOrEmpty str then invalidArg "str" "empty string"; - let ten = embed 10 - let rec build acc i = - if i=len then - acc - else - let c = str.[i] - let d = int c - int '0' - if 0 <= d && d <= 9 then - build (add (mul ten acc) (embed d)) (i+1) - else - invalidArg "str" "the string was not a valid number" - - build (embed 0) 0 - - let is_small n = (n.bound <= 1) - let get_small n = index n 0 - - //---------------------------------------------------------------------------- - // factorial - //-------------------------------------------------------------------------- - - let factorial n = - //***** - // Factorial(n) = 1.2.3.....(n-1).n - // - // Factorial is sometimes used as a test for multiplication. - // The QuickMul FFT multiplier takes over only when both operands reach a given size. - // How to compute factorial? - // - // (a) Factorial(n) = factorial(n-1).n - // This is unlikely to make use of the FFT (n never large enough). - // (b) Factorial(n) = (1.2.3.4....k) . (k.[k+1]...(n-1).n) - // Applied recursively QuickMul FFT will take over on large products. - // - //**** - let rec productR a b = - if equal a b then a - else - let m = div (add a b) (of_int 2) - mul (productR a m) (productR (add m one) b) - - productR one n - - -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/n.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/n.fsi deleted file mode 100644 index e3abc15b..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/n.fsi +++ /dev/null @@ -1,61 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Math - -#if FX_ATLEAST_40 -#else -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Core - -/// Abstract internal type -type internal BigNat - -module internal BigNatModule = - - val zero : BigNat - val one : BigNat - val two : BigNat - - val add : BigNat -> BigNat -> BigNat - val sub : BigNat -> BigNat -> BigNat - val mul : BigNat -> BigNat -> BigNat - val divmod : BigNat -> BigNat -> BigNat * BigNat - val div : BigNat -> BigNat -> BigNat - val rem : BigNat -> BigNat -> BigNat - val hcf : BigNat -> BigNat -> BigNat - - val min : BigNat -> BigNat -> BigNat - val max : BigNat -> BigNat -> BigNat - val scale : int -> BigNat -> BigNat - val powi : BigNat -> int -> BigNat - val pow : BigNat -> BigNat -> BigNat - - val IsZero : BigNat -> bool - val isZero : BigNat -> bool - val isOne : BigNat -> bool - val equal : BigNat -> BigNat -> bool - val compare : BigNat -> BigNat -> int - val lt : BigNat -> BigNat -> bool - val gt : BigNat -> BigNat -> bool - val lte : BigNat -> BigNat -> bool - val gte : BigNat -> BigNat -> bool - - val hash : BigNat -> int - val to_float : BigNat -> float - val of_int : int -> BigNat - val of_int64 : int64 -> BigNat - val to_string : BigNat -> string - val of_string : string -> BigNat - - val to_uint32 : BigNat -> uint32 - val to_uint64 : BigNat -> uint64 - - val factorial : BigNat -> BigNat - // val randomBits : int -> BigNat - val bits : BigNat -> int - val is_small : BigNat -> bool (* will fit in int32 (but not nec all int32) *) - val get_small : BigNat -> int32 (* get the value, if it satisfies is_small *) - -#endif \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/z.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/z.fs deleted file mode 100644 index f8838266..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/z.fs +++ /dev/null @@ -1,433 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#nowarn "44" // This construct is deprecated. This function is for use by compiled F# code and should not be used directly - -namespace Microsoft.FSharp.Math - -#if FX_ATLEAST_40 - type BigInt = System.Numerics.BigInteger - type bigint = System.Numerics.BigInteger -#else - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Primitives.Basics - open Microsoft.FSharp.Math - open System - open System.Globalization - - - // INVARIANT: signInt = 1 or -1 - // value(z) = signInt * v - // NOTE: 0 has two repns (+1,0) or (-1,0). - [] - [] - [] - type BigInt(signInt:int, v : BigNat) = - - //new() = new BigInt(0,0) - - static let smallLim = 4096 - static let smallPosTab = Array.init smallLim BigNatModule.of_int - static let one = BigInt(1) - static let zero = BigInt(0) - - static member internal nat n = - if BigNatModule.is_small n && BigNatModule.get_small n < smallLim - then smallPosTab.[BigNatModule.get_small n] - else n - static member internal create (s,n) = BigInt(s,BigInt.nat n) - static member internal posn n = BigInt(1,BigInt.nat n) - static member internal negn n = BigInt(-1,BigInt.nat n) - - - member x.Sign = if x.IsZero then 0 else signInt - member x.SignInt = signInt - member internal x.V = v - - static member op_Equality (x:BigInt, y:BigInt) = - //System.Console.WriteLine("x = {0}",box x) - //System.Console.WriteLine("y = {0}",box y) - match x.SignInt,y.SignInt with - | 1, 1 -> BigNatModule.equal x.V y.V // +1.xv = +1.yv iff xv = yv - | -1, -1 -> BigNatModule.equal x.V y.V // -1.xv = -1.yv iff xv = yv - | 1,-1 -> BigNatModule.isZero x.V && BigNatModule.isZero y.V // 1.xv = -1.yv iff xv=0 and yv=0 - | -1, 1 -> BigNatModule.isZero x.V && BigNatModule.isZero y.V // -1.xv = 1.yv iff xv=0 and yv=0 - | _ -> invalidArg "x" "signs should be +/- 1" - - static member op_Inequality (x:BigInt, y:BigInt) = not (BigInt.op_Equality(x,y)) // CA2226: OperatorsShouldHaveSymmetricalOverloads - - static member op_LessThan (x:BigInt, y:BigInt) = - match x.SignInt,y.SignInt with - | 1, 1 -> BigNatModule.lt x.V y.V // 1.xv < 1.yv iff xv < yv - | -1,-1 -> BigNatModule.lt y.V x.V // -1.xv < -1.yv iff yv < xv - | 1,-1 -> false // 1.xv < -1.yv iff 0 <= 1.xv < -1.yv <= 0 iff false - | -1, 1 -> not (BigNatModule.isZero x.V) || not (BigNatModule.isZero y.V) - // -1.xv < 1.yv - // (a) xv=0 and yv=0, then false - // (b) xv<>0, -1.xv < 0 <= 1.yv, so true - // (c) yv<>0, -1.xv <= 0 < 1.yv, so true - | _ -> invalidArg "x" "signs should be +/- 1" - - static member op_GreaterThan (x:BigInt, y:BigInt) = // Follow lt by +/- symmetry - match x.SignInt,y.SignInt with - | 1, 1 -> BigNatModule.gt x.V y.V - | -1,-1 -> BigNatModule.gt y.V x.V - | 1,-1 -> not (BigNatModule.isZero x.V) || not (BigNatModule.isZero y.V) - | -1, 1 -> false - | _ -> invalidArg "x" "signs should be +/- 1" - - static member internal compare(n,nn) = if BigInt.op_LessThan(n,nn) then -1 elif BigInt.op_Equality(n,nn) then 0 else 1 - static member internal hash (z:BigInt) = z.SignInt + BigNatModule.hash(z.V) - - override x.ToString() = - match x.SignInt with - | 1 -> BigNatModule.to_string x.V // positive - | -1 -> - if BigNatModule.isZero x.V - then "0" // not negative infact, but zero. - else "-" + BigNatModule.to_string x.V // negative - | _ -> invalidArg "x" "signs should be +/- 1" - - member x.StructuredDisplayString = x.ToString() - - interface System.IComparable with - member this.CompareTo(obj:obj) = - match obj with - | :? BigInt as that -> BigInt.compare(this,that) - | _ -> invalidArg "obj" "the objects are not comparable" - - override this.Equals(obj) = - match obj with - | :? BigInt as that -> BigInt.op_Equality(this, that) - | _ -> false - - override x.GetHashCode() = BigInt.hash(x) - - - [] - new (n:int) = - if n>=0 - then BigInt (1,BigInt.nat(BigNatModule.of_int n)) - elif (n = System.Int32.MinValue) - then BigInt(-1,BigInt.nat(BigNatModule.of_int64 (-(int64 n)))) - else BigInt(-1,BigInt.nat(BigNatModule.of_int (-n))) - - static member ToInt32(z:BigInt) = - let u = BigNatModule.to_uint32 z.V - if u <= uint32 System.Int32.MaxValue then - (* Handle range [-MaxValue,MaxValue] *) - z.SignInt * int32 u - elif z.SignInt = -1 && u = uint32 (System.Int32.MaxValue + 1) then - //assert(System.Int32.MinValue = 0 - System.Int32.MaxValue - 1) - (* Handle MinValue = -(MaxValue+1) special case not covered by the above *) - System.Int32.MinValue - else - raise (System.OverflowException()) - - [] - new (n:int64) = - if n>=0L - then BigInt(1,BigInt.nat (BigNatModule.of_int64 n)) - elif (n = System.Int64.MinValue) - then BigInt(-1,BigInt.nat (BigNatModule.add (BigNatModule.of_int64 System.Int64.MaxValue) BigNatModule.one) ) - else BigInt(-1,BigInt.nat (BigNatModule.of_int64 (-n))) - - static member ToInt64(z:BigInt) = - let u = BigNatModule.to_uint64 z.V - if u <= uint64 System.Int64.MaxValue then - (* Handle range [-MaxValue,MaxValue] *) - int64 z.SignInt * int64 u - elif z.SignInt = -1 && u = uint64 (System.Int64.MaxValue + 1L) then - //assert(System.Int64.MinValue = 0 - System.Int64.MaxValue - 1L) - (* Handle MinValue = -(MaxValue+1) special case not covered by the above *) - System.Int64.MinValue - else - raise (System.OverflowException()) - - static member One = one - static member Zero = zero - static member (~-) (z:BigInt) = BigInt.create(-1 * z.SignInt,z.V) - static member Scale(k,z:BigInt) = - if k<0 - then BigInt.create(-z.SignInt, (BigNatModule.scale (-k) z.V)) // k.zsign.zv = -zsign.(-k.zv) - else BigInt.create(z.SignInt, (BigNatModule.scale k z.V)) // k.zsign.zv = zsign.k.zv - - // Result: 1.nx - 1.ny (integer subtraction) - static member internal subnn (nx,ny) = - if BigNatModule.gte nx ny - then BigInt.posn (BigNatModule.sub nx ny) // nx >= ny, result +ve, +1.(nx - ny) - else BigInt.negn (BigNatModule.sub ny nx) // nx < ny, result -ve, -1.(ny - nx) - - static member internal addnn (nx,ny) = - BigInt.posn (BigNatModule.add nx ny) // Compute "nx + ny" to be integer - - member x.IsZero = BigNatModule.isZero x.V // signx.xv = 0 iff xv=0, since signx is +1,-1 - member x.IsOne = (x.SignInt = 1) && BigNatModule.isOne x.V // signx.xv = 1 iff signx = +1 and xv = 1 - static member (+) (x:BigInt,y:BigInt) = - if y.IsZero then x else - if x.IsZero then y else - match x.SignInt,y.SignInt with - | 1, 1 -> BigInt.addnn(x.V,y.V) // 1.xv + 1.yv = (xv + yv) - | -1,-1 -> -(BigInt.addnn(x.V,y.V)) // -1.xv + -1.yv = -(xv + yv) - | 1,-1 -> BigInt.subnn (x.V,y.V) // 1.xv + -1.yv = (xv - yv) - | -1, 1 -> BigInt.subnn(y.V,x.V) // -1.xv + 1.yv = (yv - xv) - | _ -> invalidArg "x" "signs should be +/- 1" - - static member (-) (x:BigInt,y:BigInt) = - if y.IsZero then x else - match x.SignInt,y.SignInt with - | 1, 1 -> BigInt.subnn(x.V,y.V) // 1.xv - 1.yv = (xv - yv) - | -1,-1 -> BigInt.subnn(y.V,x.V) // -1.xv - -1.yv = (yv - xv) - | 1,-1 -> BigInt.addnn(x.V,y.V) // 1.xv - -1.yv = (xv + yv) - | -1, 1 -> -(BigInt.addnn(x.V,y.V)) // -1.xv - 1.yv = -(xv + yv) - | _ -> invalidArg "x" "signs should be +/- 1" - - static member ( * ) (x:BigInt,y:BigInt) = - if x.IsZero then x - elif y.IsZero then y - elif x.IsOne then y - elif y.IsOne then x - else - let m = (BigNatModule.mul x.V y.V) -// sample "smallMulResult" (BigNatModule.is_small m) smallMulResult - BigInt.create (x.SignInt * y.SignInt,m) // xsign.xv * ysign.yv = (xsign.ysign).(xv.yv) - - static member DivRem (x:BigInt,y:BigInt) = - let d,r = BigNatModule.divmod x.V y.V - // HAVE: |x| = d.|y| + r and 0 <= r < |y| - // HAVE: xv = d.yv + r and 0 <= r < yv - match x.SignInt,y.SignInt with - | 1, 1 -> BigInt.posn d,BigInt.posn r // 1.xv = 1.d.( 1.yv) + ( 1.r) - | -1,-1 -> BigInt.posn d,BigInt.negn r // -1.xv = 1.d.(-1.yv) + (-1.r) - | 1,-1 -> BigInt.negn d,BigInt.posn r // 1.xv = -1.d.(-1.yv) + ( 1.r) - | -1, 1 -> BigInt.negn d,BigInt.negn r // -1.xv = -1.d.( 1.yv) + (-1.r) - | _ -> invalidArg "x" "signs should be +/- 1" - - static member (/) (x:BigInt,y:BigInt) = fst (BigInt.DivRem(x,y)) - static member (%) (x:BigInt,y:BigInt) = snd (BigInt.DivRem(x,y)) - static member Gcd (x:BigInt,y:BigInt) = BigInt.posn (BigNatModule.hcf x.V y.V) // hcf (xsign.xv,ysign.yv) = hcf (xv,yv) - -(* - let min (x:BigInt) (y:BigInt) = - match x.SignInt,y.SignInt with - | 1, 1 -> if BigNatModule.lte(x.V,y.V) then x else y // if xv <= yv then 1.xv <= 1.yv - | -1,-1 -> if BigNatModule.lte(x.V,y.V) then y else x // if xv <= yv then -1.yv <= -1.xv - | 1,-1 -> y // -1.yv <= 1.xv - | -1, 1 -> x // -1.xv <= 1.yv - | _ -> invalidArg "x" "signs should be +/- 1" - - let max (x:BigInt) (y:BigInt) = - match x.SignInt,y.SignInt with - | 1, 1 -> if BigNatModule.gte(x.V,y.V) then x else y // if xv >= yv then 1.xv >= 1.yv - | -1,-1 -> if BigNatModule.gte(x.V,y.V) then y else x // if xv >= yv then -1.yv >= -1.xv - | 1,-1 -> x // 1.xv >= -1.yv - | -1, 1 -> y // 1.yv >= -1.xv - | _ -> invalidArg "x" "signs should be +/- 1" -*) - member x.IsNegative = x.SignInt = -1 && not (x.IsZero) // signx.xv < 0 iff signx = -1 and xv<>0 - member x.IsPositive = x.SignInt = 1 && not (x.IsZero) // signx.xv > 0 iff signx = +1 and xv<>0 - static member Abs (x:BigInt) = if x.SignInt = -1 then -x else x - - static member op_LessThanOrEqual (x:BigInt,y:BigInt) = - match x.SignInt,y.SignInt with - | 1, 1 -> BigNatModule.lte x.V y.V // 1.xv <= 1.yv iff xv <= yv - | -1,-1 -> BigNatModule.lte y.V x.V // -1.xv <= -1.yv iff yv <= xv - | 1,-1 -> BigNatModule.isZero x.V && BigNatModule.isZero y.V // 1.xv <= -1.yv, - // (a) if xv=0 and yv=0 then true - // (b) otherwise false, only meet at zero. - - | -1, 1 -> true // -1.xv <= 1.yv, true - | _ -> invalidArg "x" "signs should be +/- 1" - - static member op_GreaterThanOrEqual (x:BigInt,y:BigInt) = // Follow lte by +/- symmetry - match x.SignInt,y.SignInt with - | 1, 1 -> BigNatModule.gte x.V y.V - | -1,-1 -> BigNatModule.gte y.V x.V - | 1,-1 -> true - | -1, 1 -> BigNatModule.isZero x.V && BigNatModule.isZero y.V - | _ -> invalidArg "x" "signs should be +/- 1" - - static member internal powi (z:BigInt,i) = - if i>=0 then - // (signz.zv)^i = (signz^i) .(zv^i) - // = (signz^(i mod 2)).(zv^i) since signInt is 1,-1 - // = either 1.zv^i when i mod 2 = 0 (even power kills signInt) - // or signz.zv^i when i mod 2 = 1 (odd power keeps signInt) - - BigInt.create ((if i % 2 = 0 then 1 else z.SignInt), BigNatModule.powi z.V i) - else - invalidArg "i" "unexpected negative exponent" - - static member Pow (z:BigInt,i:BigInt) = - if not i.IsNegative then - BigInt.create ((if BigNatModule.isZero (BigNatModule.rem i.V BigNatModule.two) then 1 else z.SignInt), BigNatModule.pow z.V i.V) - else - invalidArg "i" "unexpected negative exponent" - - static member ToDouble(x:BigInt) = - match x.SignInt with - | 1 -> BigNatModule.to_float x.V // float (1.xv) = float (xv) - | -1 -> - (BigNatModule.to_float x.V) // float (-1.xv) = - float (xv) - | _ -> invalidArg "x" "signs should be +/- 1" - - static member Parse(str:string) = - let len = str.Length - if len = 0 then invalidArg "str" "empty string"; - if str.[0..0] = "-" then - BigInt.negn (BigNatModule.of_string str.[1..len-1]) - else - BigInt.posn (BigNatModule.of_string str) - - member internal x.IsSmall = BigNatModule.is_small (x.V) - static member Factorial (x:BigInt) = - if x.IsNegative then invalidArg "x" "the input was negative" - elif x.IsPositive then BigInt.posn (BigNatModule.factorial x.V) - else BigInt.One - - static member ( ~+ )(n1:BigInt) = n1 - static member (..) (n1:BigInt,n2:BigInt) = OperatorIntrinsics.RangeStepGeneric(BigInt.Zero,(+),n1,BigInt.One,n2) - static member (.. ..) (n1:BigInt,step:BigInt,n2:BigInt) = OperatorIntrinsics.RangeStepGeneric(BigInt.Zero,(+),n1,step,n2) - - static member FromInt64(x:int64) = new BigInt(x) - static member FromInt32(x:int32) = new BigInt(x) - - type bigint = BigInt - -namespace Microsoft.FSharp.Core - -#if FX_ATLEAST_40 - // The "bigint" type alias is not defined in the FSharp.Core namespace in Dev10. - type bigint = - | NotDefined -#else - type bigint = Microsoft.FSharp.Math.BigInt -#endif - open System - open System.Diagnostics.CodeAnalysis - open System.Globalization - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Math - -#if FX_ATLEAST_40 - // No need for FxCop suppressions on Dev10 -#else - // FxCop suppressions - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - do() -#endif - - [] - module NumericLiterals = - -#if FX_ATLEAST_40 - module NumericLiteralI = - let numTy = System.Reflection.Assembly.Load("System").GetType("System.Numerics.BigInteger") - let meth64 = numTy.GetConstructor([|typeof|]) - let methString = numTy.GetMethod("Parse",[|typeof; typeof; typeof |]) - - let tab64 = new System.Collections.Generic.Dictionary() - let tabParse = new System.Collections.Generic.Dictionary() - let FromInt64Dynamic (x64:int64) : obj = - lock tab64 (fun () -> - let mutable res = Unchecked.defaultof<_> - let ok = tab64.TryGetValue(x64,&res) - if ok then res else - res <- meth64.Invoke [| box x64 |] - tab64.[x64] <- res - res) - - let inline get32 (x32:int32) = FromInt64Dynamic (int64 x32) - - let inline isOX s = not (System.String.IsNullOrEmpty(s)) && s.Length > 2 && s.[0] = '0' && s.[1] = 'x' - - let FromStringDynamic (s:string) : obj = - lock tabParse (fun () -> - let mutable res = Unchecked.defaultof<_> - let ok = tabParse.TryGetValue(s,&res) - if ok then res else - res <- - if isOX s then - methString.Invoke(null,[| box s; box NumberStyles.AllowHexSpecifier; box CultureInfo.InvariantCulture |] ) - else - methString.Invoke(null,[| box s; box NumberStyles.AllowLeadingSign; box CultureInfo.InvariantCulture |] ) - - tabParse.[s] <- res - res) - - let inline FromZero () : 'T = - (get32 0 :?> 'T) - when 'T : bigint = BigInt.Zero - - let inline FromOne () : 'T = - (get32 1 :?> 'T) - when 'T : bigint = BigInt.One - - let inline FromInt32 (i:int32): 'T = - (get32 i :?> 'T) - when 'T : bigint = new BigInt(i) - - let inline FromInt64 (i:int64): 'T = - (FromInt64Dynamic i :?> 'T) - when 'T : bigint = new BigInt(i) - - let inline FromString (s:string) : 'T = - (FromStringDynamic s :?> 'T) - when 'T : bigint = - if isOX s then - BigInt.Parse (s.[2..],NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture) - else - BigInt.Parse (s,NumberStyles.AllowLeadingSign,CultureInfo.InvariantCulture) - -#else - module NumericLiteralI = - let tab64 = new System.Collections.Generic.Dictionary() - let get64 (x64:int64) = - lock tab64 (fun () -> - let mutable res = Unchecked.defaultof<_> - let ok = tab64.TryGetValue(x64,&res) - if ok then res else - res <- BigInt.FromInt64 x64 - tab64.[x64] <- res - res) - - let get32 (x32:int32) = get64 (int64 x32) - - let tabParse = new System.Collections.Generic.Dictionary() - let getParse s = - lock tabParse (fun () -> - let mutable res = Unchecked.defaultof<_> - let ok = tabParse.TryGetValue(s,&res) - if ok then res else - res <- BigInt.Parse s - tabParse.[s] <- res - res) - - let FromZero () = BigInt.Zero - let FromOne () = BigInt.One - let FromInt32 i = get32 i - let FromInt64 i = get64 i - let FromString s = getParse s - - module NumericLiteralN = - let FromZero () = failwith "this code should not be reachable" - let FromOne () = failwith "this code should not be reachable" - let FromInt32 (i:int32) = failwith "this code should not be reachable" - let FromInt64 (i64:int64) = failwith "this code should not be reachable" - let FromString (s:string) = failwith "this code should not be reachable" -#endif // FX_ATLEAST_40 - -#endif - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/z.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/z.fsi deleted file mode 100644 index 0334050b..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/math/z.fsi +++ /dev/null @@ -1,158 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// This namespace contains numerical and mathematical types such as arbitrarily sized integers -namespace Microsoft.FSharp.Math - - open System - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core - -#if FX_ATLEAST_40 - type BigInt = System.Numerics.BigInteger - type bigint = System.Numerics.BigInteger -#else - /// The type of arbitrary-sized integers - [] - [] - type BigInt = - /// Return the sum of two big integers - static member ( + ) : x:BigInt * y:BigInt -> BigInt - /// Return the modulus of big integers - static member ( % ) : x:BigInt * y:BigInt -> BigInt - /// Return the product of big integers - static member ( * ) : x:BigInt * y:BigInt -> BigInt - /// Return the difference of big integers - static member ( - ) : x:BigInt * y:BigInt -> BigInt - /// Return the ratio of big integers - static member ( / ) : x:BigInt * y:BigInt -> BigInt - /// Return the negation of a big integer - static member (~-) : x:BigInt -> BigInt - /// Return the given big integer - static member (~+) : x:BigInt -> BigInt - /// Generate a range of big integers - static member (..) : start:BigInt * finish:BigInt -> seq - /// Generate a range of big integers, with a step - static member (.. ..) : start:BigInt * step:BigInt * finish:BigInt -> seq - /// Convert a big integer to a floating point number - static member ToDouble : x:BigInt -> float - /// Convert a big integer to a 64-bit signed integer - static member ToInt64 : x:BigInt -> int64 - /// Convert a big integer to a 32-bit signed integer - static member ToInt32 : x:BigInt -> int32 - /// Parse a big integer from a string format - static member Parse : text:string -> BigInt - /// Return the sign of a big integer: 0, +1 or -1 - member Sign : int - /// Compute the factorial function as a big integer - static member Factorial : x:BigInt -> BigInt - /// Compute the ratio and remainder of two big integers - static member DivRem : x:BigInt * y:BigInt -> BigInt * BigInt - - /// This operator is for use from other .NET languages - static member op_LessThan : x:BigInt * y:BigInt -> bool - /// This operator is for use from other .NET languages - static member op_LessThanOrEqual : x:BigInt * y:BigInt -> bool - /// This operator is for use from other .NET languages - static member op_GreaterThan : x:BigInt * y:BigInt -> bool - /// This operator is for use from other .NET languages - static member op_GreaterThanOrEqual : x:BigInt * y:BigInt -> bool - /// This operator is for use from other .NET languages - static member op_Equality : x:BigInt * y:BigInt -> bool - /// This operator is for use from other .NET languages - static member op_Inequality : x:BigInt * y:BigInt -> bool - - /// Return the greatest common divisor of two big integers - static member Gcd : x:BigInt * y:BigInt -> BigInt - /// Return n^m for two big integers - static member Pow : x:BigInt * y:BigInt -> BigInt - /// Compute the absolute value of a big integer - static member Abs : x:BigInt -> BigInt - /// Get the big integer for zero - static member Zero : BigInt - /// Get the big integer for one - static member One : BigInt - - - /// Return true if a big integer is 'zero' - member IsZero : bool - /// Return true if a big integer is 'one' - member IsOne : bool - interface System.IComparable - override Equals : obj -> bool - override GetHashCode : unit -> int - override ToString : unit -> string - - [] - /// Construct a BigInt value for the given integer - new : x:int -> BigInt - [] - /// Construct a BigInt value for the given 64-bit integer - new : x:int64 -> BigInt - - type bigint = BigInt - -namespace Microsoft.FSharp.Core - - open Microsoft.FSharp.Math - -#if FX_ATLEAST_40 - [] - type bigint -#else - /// An abbreviation for the type Microsoft.FSharp.Math.BigInt - [] - type bigint = Microsoft.FSharp.Math.BigInt -#endif - - [] - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - module NumericLiterals = - - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - module NumericLiteralI = -#if FX_ATLEAST_40 - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val inline FromZero : value:unit -> 'T - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val inline FromOne : value:unit -> 'T - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val inline FromInt32 : value:int32 -> 'T - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val inline FromInt64 : value:int64 -> 'T - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val inline FromString : text:string -> 'T - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromInt64Dynamic : value:int64 -> obj - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromStringDynamic : text:string -> obj -#else - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromZero : unit -> bigint - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromOne : unit -> bigint - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromInt32 : value:int32 -> bigint - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromInt64 : value:int64 -> bigint - /// Provides a default implementations of F# numeric literal syntax for literals fo the form 'dddI' - val FromString : text:string -> bigint - - - /// Provide a default implementation of the F# numeric literal syntax 'dddN' - module NumericLiteralN = - [] - val FromZero : unit -> 'a - [] - val FromOne : unit -> 'a - [] - val FromInt32 : int32 -> 'a - [] - val FromInt64 : int64 -> 'a - [] - val FromString : string -> 'a -#endif - -#endif - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/nativeptr.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/nativeptr.fs deleted file mode 100644 index d7ae31a4..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/nativeptr.fs +++ /dev/null @@ -1,57 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.NativeInterop - -#nowarn "44";; -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -open Microsoft.FSharp.Primitives.Basics -open Microsoft.FSharp.Core.Operators - -open System -open System.Diagnostics -open System.Runtime.InteropServices - -[] -[] -module NativePtr = - - [] - [] - let inline of_nativeint (x:nativeint) = (# "" x : nativeptr<'T> #) - - [] - [] - let inline to_nativeint (x: nativeptr<'T>) = (# "" x : nativeint #) - - [] - [] - let inline add (x : nativeptr<'T>) (n:int) : nativeptr<'T> = to_nativeint x + nativeint n * (# "sizeof !0" type('T) : nativeint #) |> of_nativeint - - [] - [] - let inline get (p : nativeptr<'T>) n = (# "ldobj !0" type ('T) (add p n) : 'T #) - - [] - [] - let inline set (p : nativeptr<'T>) n (x : 'T) = (# "stobj !0" type ('T) (add p n) x #) - - [] - [] - let inline read (p : nativeptr<'T>) = (# "ldobj !0" type ('T) p : 'T #) - - [] - [] - let inline write (p : nativeptr<'T>) (x : 'T) = (# "stobj !0" type ('T) p x #) - - [] - [] - let inline of_array (arr: 'T[]) (m:int) : nativeptr<'T> = (# "ldelema !0" type('T) arr m : nativeptr<'T> #) - - [] - [] - let inline of_array2 (arr: 'T[,]) (n:int) (m:int) : nativeptr<'T> = (# "ldelema.multi 2 !0" type('T) arr n m : nativeptr<'T> #) - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/nativeptr.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/nativeptr.fsi deleted file mode 100644 index c6d3a311..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/nativeptr.fsi +++ /dev/null @@ -1,63 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - - -namespace Microsoft.FSharp.NativeInterop - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - [] - [] - /// Contains operations on native pointers. Use of these operators may - /// result in the generation of unverifiable code. - module NativePtr = - - [] - [] - /// Return a typed native pointer for a given machine address - val inline of_nativeint : address:nativeint -> nativeptr<'T> - - [] - [] - /// Return a machine address for a given typed native pointer - val inline to_nativeint : address:nativeptr<'T> -> nativeint - - [] - [] - /// Return a typed native pointer by adding index * sizeof<'T> to the - /// given input pointer - val inline add : address:nativeptr<'T> -> index:int -> nativeptr<'T> - - [] - [] - /// Dereference the typed native pointer computed by adding index * sizeof<'T> to the - /// given input pointer - val inline get : address:nativeptr<'T> -> index:int -> 'T - - [] - [] - /// Dereference the given typed native pointer - val inline read : address:nativeptr<'T> -> 'T - - [] - [] - /// Assign the value into the memory location referenced by the given typed native pointer - val inline write : address:nativeptr<'T> -> value:'T -> unit - - [] - [] - /// Assign the value into the memory location referenced by the typed native - /// pointer computed by adding index * sizeof<'T> to the given input pointer - val inline set : address:nativeptr<'T> -> index:int -> value:'T -> unit - - /// Get the address of an element of a pinned array - [] - [] - val inline of_array: array:'T[] -> index:int -> nativeptr<'T> - - /// Get the address of an element of a pinned 2-dimensional array - [] - [] - val inline of_array2 : array:'T[,] -> index1:int -> index2:int -> nativeptr<'T> diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/option.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/option.fs deleted file mode 100644 index 487c30c2..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/option.fs +++ /dev/null @@ -1,79 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - - -namespace Microsoft.FSharp.Core - - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core.Operators - - [] - module Option = - - [] - let get option = match option with None -> invalidArg "option" "The option value was None" | Some x -> x - - [] - let isSome option = match option with None -> false | Some _ -> true - - [] - let is_some option = match option with None -> false | Some _ -> true - - [] - let isNone option = match option with None -> true | Some _ -> false - - [] - let is_none option = match option with None -> true | Some _ -> false - - [] - let count option = match option with None -> 0 | Some _ -> 1 - - [] - let fold f s inp = match inp with None -> s | Some x -> f s x - - [] - let foldBack f inp s = match inp with None -> s | Some x -> f x s - - [] - let fold_left f s inp = match inp with None -> s | Some x -> f s x - - [] - let fold_right f inp s = match inp with None -> s | Some x -> f x s - - [] - let exists p inp = match inp with None -> false | Some x -> p x - - [] - let forall p inp = match inp with None -> true | Some x -> p x - - [] - let filter p inp = match inp with None -> None | Some x -> if p x then inp else None - - [] - let partition p inp = match inp with None -> None,None | Some x -> if p x then inp,None else None,inp - - [] - let iter f inp = match inp with None -> () | Some x -> f x - - [] - let map f inp = match inp with None -> None | Some x -> Some (f x) - - [] - let bind f inp = match inp with None -> None | Some x -> f x - - [] - let to_array option = match option with None -> [| |] | Some x -> [| x |] - - [] - let to_list option = match option with None -> [ ] | Some x -> [ x ] - - [] - let length option = match option with None -> 0 | Some _ -> 1 - - [] - let for_all p inp = match inp with None -> true | Some x -> p x - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/option.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/option.fsi deleted file mode 100644 index 268c23be..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/option.fsi +++ /dev/null @@ -1,87 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Core - - open System - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - - [] - /// Basic operations on options. - module Option = - - /// Returns true if the option is not None - val isSome: option:'T option -> bool - - /// Returns true if the option is None - val isNone: option:'T option -> bool - - /// Gets the value associated with the option. If the option is None then - /// raises ArgumentException - val get: option:'T option -> 'T - - /// length inp evaluates to match inp with None -> 0 | Some _ -> 1 - val count: option:'T option -> int - - /// fold_left f s inp evaluates to match inp with None -> s | Some x -> f s x - val fold: folder:('State -> 'T -> 'State) -> state:'State -> option:'T option -> 'State - - /// fold_right f inp s evaluates to "match inp with None -> s | Some x -> f x s" - val foldBack: folder:('T -> 'State -> 'State) -> option:'T option -> state:'State -> 'State - - /// exists p inp evaluates to match inp with None -> false | Some x -> p x - val exists: predicate:('T -> bool) -> option:'T option -> bool - - /// forall p inp" evaluates to "match inp with None -> true | Some x -> p x - val forall: predicate:('T -> bool) -> option:'T option -> bool - - /// iter f inp executes match inp with None -> () | Some x -> f x - val iter: action:('T -> unit) -> option:'T option -> unit - - /// map f inp evaluates to match inp with None -> None | Some x -> Some (f x) - val map: mapping:('T -> 'U) -> option:'T option -> 'U option - - /// bind f inp evaluates to match inp with None -> None | Some x -> f x - val bind: binder:('T -> 'U option) -> option:'T option -> 'U option - - /// Convert the option to an array of length 0 or 1 - val to_array: option:'T option -> 'T array - - /// Convert the option to a list of length 0 or 1 - val to_list: option:'T option -> 'T list - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val is_some: option:'T option -> bool - - [] - val is_none: option:'T option -> bool - - [] - val fold_left: folder:('State -> 'T -> 'State) -> state:'State -> option:'T option -> 'State - - [] - val fold_right: folder:('T -> 'State -> 'State) -> option:'T option -> state:'State -> 'State - - [] - val for_all: predicate:('T -> bool) -> option:'T option -> bool - - /// filter p inp evaluates to match inp with None -> None | Some x -> if p x then inp else None - [] - val filter: predicate:('T -> bool) -> option:'T option -> 'T option - - /// filter p inp evaluates to match inp with None -> None | Some x -> if p x then inp else None - [] - val length: option:'T option -> int - - /// partition p inp evaluates to - /// match inp with None -> None,None | Some x -> if p x then inp,None else None,inp - [] - val partition: predicate:('T -> bool) -> option:'T option -> ('T option * 'T option) - -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/prim-types.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/prim-types.fs deleted file mode 100644 index c5c42b65..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/prim-types.fs +++ /dev/null @@ -1,5423 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -#nowarn "25" // Incomplete match expressions -#nowarn "35" // This construct is deprecated: the treatment of this operator is now handled directly by the F# compiler and its meaning may not be redefined. -#nowarn "44" // This construct is deprecated. This function is for use by compiled F# code and should not be used directly -#nowarn "52" // The value has been copied to ensure the original is not mutated by this operation -#nowarn "61" // The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. -#nowarn "62" // This construct is for compatibility with OCaml. The syntax 'module ... : sig .. end' is deprecated unless OCaml compatibility is enabled. Consider using 'module ... = begin .. end'. -#nowarn "69" // Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. -#nowarn "77" // Member constraints with the name 'Exp' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in compilation failures if you attempt to invoke the member constraint from your own code. - -namespace Microsoft.FSharp.Core - - //------------------------------------------------------------------------- - // Basic type abbreviations - - open System - open System.Collections - open System.Collections.Generic - open System.Diagnostics - open System.Globalization - open System.Text - - - type obj = System.Object - type exn = System.Exception - type nativeint = System.IntPtr - type unativeint = System.UIntPtr - type string = System.String - type float32 = System.Single - type float = System.Double - type single = System.Single - type double = System.Double - type sbyte = System.SByte - type byte = System.Byte - type int8 = System.SByte - type uint8 = System.Byte - type int16 = System.Int16 - type uint16 = System.UInt16 - type int32 = System.Int32 - type uint32 = System.UInt32 - type int64 = System.Int64 - type uint64 = System.UInt64 - type char = System.Char - type bool = System.Boolean - type decimal = System.Decimal - type int = int32 - - type ``[]``<'T> = (# "!0[]" #) - type ``[,]``<'T> = (# "!0[0 ...,0 ...]" #) - type ``[,,]``<'T> = (# "!0[0 ...,0 ...,0 ...]" #) - type ``[,,,]``<'T> = (# "!0[0 ...,0 ...,0 ...,0 ...]" #) - - type array<'T> = 'T[] - - type byref<'T> = (# "!0&" #) - - type nativeptr<'T> = (# "native int" #) - type ilsigptr<'T> = (# "!0*" #) - - - - -#if FX_ATLEAST_40 - type IStructuralEquatable = System.Collections.IStructuralEquatable - type IStructuralComparable = System.Collections.IStructuralComparable -#else - //------------------------------------------------------------------------- - // Structural equality - type IStructuralEquatable = - interface - abstract Equals: o:obj * comp:System.Collections.IEqualityComparer -> bool - abstract GetHashCode: comp:System.Collections.IEqualityComparer -> int - end - - //------------------------------------------------------------------------- - // Structural comparison - and IStructuralComparable = - interface - abstract CompareTo: o:obj * comp:System.Collections.IComparer -> int - end -#endif - - //------------------------------------------------------------------------- - // Unit - - and [] // No op_equality on unit - Unit = - { dummy:int } - override x.GetHashCode() = 0 - override x.Equals(obj:obj) = - match obj with null -> true | :? Unit -> true | _ -> false - interface System.IComparable with - member x.CompareTo(obj:obj) = 0 - - and unit = Unit - - //------------------------------------------------------------------------- - // .NET enumerations - - type SourceConstructFlags = - | None = 0 - | SumType = 1 - | RecordType = 2 - | ObjectType = 3 - | Field = 4 - | Exception = 5 - | Closure = 6 - | Module = 7 - | UnionCase = 8 - | Value = 9 - | KindMask = 31 - | NonpublicRepresentation = 32 - - [] - type CompilationRepresentationFlags = - | None = 0 - | Static = 1 - | Instance = 2 - | ModuleSuffix = 4 // append 'Module' to the end of a non-unique module - | UseNullAsTrueValue = 8 // Note if you change this then change CompilationRepresentationFlags_PermitNull further below - | Event = 16 - - - [] - type SealedAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - new() = new SealedAttribute(true) - - [] - [] - type AbstractClassAttribute() = - inherit System.Attribute() - - [] - [] - type DefaultAugmentationAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - - [] - [] - type CLIEventAttribute() = - inherit System.Attribute() - - [] - [] - type AutoSerializableAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - - [] - [] - type DefaultValueAttribute(check:bool) = - inherit System.Attribute() - member x.Check = check - new() = new DefaultValueAttribute(true) - - [] - [] - type EntryPointAttribute() = - inherit System.Attribute() - - [] - [] - type ReferenceEqualityAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - new() = ReferenceEqualityAttribute(true) - - [] - [] - type StructuralComparisonAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - new() = StructuralComparisonAttribute(true) - - [] - [] - type StructuralEqualityAttribute(value:bool) = - inherit System.Attribute() - member x.Value = value - new() = StructuralEqualityAttribute(true) - - [] - [] - type OverloadIDAttribute(uniqueName:string) = - inherit System.Attribute() - member x.UniqueName = uniqueName - - [] - [] - type ReflectedDefinitionAttribute() = - inherit System.Attribute() - - [] - [] - type StructAttribute() = - inherit System.Attribute() - - [] - [] - type MeasureAttribute() = - inherit System.Attribute() - - [] - [] - type MeasureAnnotatedAbbreviationAttribute() = - inherit System.Attribute() - - [] - [] - type InterfaceAttribute() = - inherit System.Attribute() - - [] - [] - type ClassAttribute() = - inherit System.Attribute() - - [] - [] - type LiteralAttribute() = - inherit System.Attribute() - - [] - [] - type FSharpInterfaceDataVersionAttribute(major:int,minor:int,release:int) = - inherit System.Attribute() - member x.Major = major - member x.Minor = minor - member x.Release = release - - [] - [] - type CompilationMappingAttribute(sourceConstructFlags:SourceConstructFlags, - variantNumber:int, - sequenceNumber:int) = - inherit System.Attribute() - member x.SourceConstructFlags = sourceConstructFlags - member x.SequenceNumber = sequenceNumber - member x.VariantNumber = variantNumber - new(sourceConstructFlags) = CompilationMappingAttribute(sourceConstructFlags,0,0) - new(sourceConstructFlags,sequenceNumber) = CompilationMappingAttribute(sourceConstructFlags,0,sequenceNumber) - - //------------------------------------------------------------------------- - [] - [] - type CompilationRepresentationAttribute (flags : CompilationRepresentationFlags) = - inherit System.Attribute() - member x.Flags = flags - - [] - [] - type ExperimentalAttribute(message:string) = - inherit System.Attribute() - member x.Message = message - - [] - [] - type StructuredFormatDisplayAttribute(value:string) = - inherit System.Attribute() - member x.Value = value - - [] - [] - type OCamlCompatibilityAttribute(message:string) = - inherit System.Attribute() - member x.Message = message - new() = OCamlCompatibilityAttribute(null) - - [] - [] - type UnverifiableAttribute() = - inherit System.Attribute() - - [] - [] - type NoDynamicInvocationAttribute() = - inherit System.Attribute() - - [] - [] - type OptionalArgumentAttribute() = - inherit System.Attribute() - - [] - [] - type GeneralizableValueAttribute() = - inherit System.Attribute() - - [] - [] - type RequiresExplicitTypeArgumentsAttribute() = - inherit System.Attribute() - - [] - [] - type RequireQualifiedAccessAttribute() = - inherit System.Attribute() - - [] - [] - type AutoOpenAttribute(path:string) = - inherit System.Attribute() - member x.Path = path - new() = AutoOpenAttribute("") - - [] type float<[] 'u> = float - [] type float32<[] 'u> = float32 - [] type decimal<[] 'u> = decimal - [] type int<[] 'u> = int - [] type int8<[] 'u> = int8 - [] type int16<[] 'u> = int16 - [] type int64<[] 'u> = int64 - - - module BasicInlinedOperations = - let inline unboxPrim<'T>(x:obj) = (# "unbox.any !0" type ('T) x : 'T #) - let inline box (x:'T) = (# "box !0" type ('T) x : obj #) - let inline not (b:bool) = (# "ceq" b false : bool #) - let inline (=) (x:int) (y:int) = (# "ceq" x y : bool #) - let inline (<>) (x:int) (y:int) = not(# "ceq" x y : bool #) - let inline (>=) (x:int) (y:int) = not(# "clt" x y : bool #) - let inline (>=.) (x:int64) (y:int64) = not(# "clt" x y : bool #) - let inline (>=...) (x:char) (y:char) = not(# "clt" x y : bool #) - let inline (<=...) (x:char) (y:char) = not(# "cgt" x y : bool #) - - let inline (/) (x:int) (y:int) = (# "div" x y : int #) - let inline (+) (x:int) (y:int) = (# "add" x y : int #) - let inline (+.) (x:int64) (y:int64) = (# "add" x y : int64 #) - let inline (+..) (x:uint64) (y:uint64) = (# "add" x y : uint64 #) - let inline ( *. ) (x:int64) (y:int64) = (# "mul" x y : int64 #) - let inline ( *.. ) (x:uint64) (y:uint64) = (# "mul" x y : uint64 #) - let inline (^) (x:string) (y:string) = System.String.Concat(x,y) - let inline (<<<) (x:int) (y:int) = (# "shl" x y : int #) - let inline ( * ) (x:int) (y:int) = (# "mul" x y : int #) - let inline (-) (x:int) (y:int) = (# "sub" x y : int #) - let inline (-.) (x:int64) (y:int64) = (# "sub" x y : int64 #) - let inline (-..) (x:uint64) (y:uint64) = (# "sub" x y : uint64 #) - let inline (>) (x:int) (y:int) = (# "cgt" x y : bool #) - let inline (<) (x:int) (y:int) = (# "clt" x y : bool #) - - [] - let inline rethrow() = unboxPrim(# "rethrow ldnull" : System.Object #) - - let inline int_of_byte (b:byte) = (# "" b : int #) - let inline raise (e: System.Exception) = (# "throw" e : 'U #) - let inline length (x: 'T[]) = (# "ldlen conv.i4" x : int #) - let inline zero_create (n:int) = (# "newarr !0" type ('T) n : 'T[] #) - let inline get (arr: 'T[]) (n:int) = (# "ldelem.any !0" type ('T) arr n : 'T #) - let set (arr: 'T[]) (n:int) (x:'T) = (# "stelem.any !0" type ('T) arr n x #) - - - let inline objEq (xobj:obj) (yobj:obj) = (# "ceq" xobj yobj : bool #) - let inline int64Eq (x:int64) (y:int64) = (# "ceq" x y : bool #) - let inline int32Eq (x:int32) (y:int32) = (# "ceq" x y : bool #) - let inline floatEq (x:float) (y:float) = (# "ceq" x y : bool #) - let inline float32Eq (x:float32) (y:float32) = (# "ceq" x y : bool #) - let inline charEq (x:char) (y:char) = (# "ceq" x y : bool #) - let inline intOrder (x:int) (y:int) = if (# "clt" x y : bool #) then (0-1) else (# "cgt" x y : int #) - let inline int64Order (x:int64) (y:int64) = if (# "clt" x y : bool #) then (0-1) else (# "cgt" x y : int #) - let inline byteOrder (x:byte) (y:byte) = if (# "clt" x y : bool #) then (0-1) else (# "cgt" x y : int #) - let inline byteEq (x:byte) (y:byte) = (# "ceq" x y : bool #) - let inline int64 (x:int) = (# "conv.i8" x : int64 #) - let inline int32 (x:int64) = (# "conv.i4" x : int32 #) - - let inline typeof<'T> = - let tok = (# "ldtoken !0" type('T) : System.RuntimeTypeHandle #) - System.Type.GetTypeFromHandle(tok) - - let inline typedefof<'T> = - let ty = typeof<'T> - if ty.IsGenericType then ty.GetGenericTypeDefinition() else ty - - let inline sizeof<'T> = - (# "sizeof !0" type('T) : int #) - - let inline unsafeDefault<'T> : 'T = (# "ilzero !0" type ('T) : 'T #) - let inline isinstPrim<'T>(x:obj) = (# "isinst !0" type ('T) x : obj #) - let inline castclassPrim<'T>(x:obj) = (# "castclass !0" type ('T) x : 'T #) - let inline notnullPrim<'T when 'T : not struct>(x:'T) = (# "ldnull cgt.un" x : bool #) - let inline iscastPrim<'T when 'T : not struct>(x:obj) = (# "isinst !0" type ('T) x : 'T #) - - - open BasicInlinedOperations - -#if FX_ATLEAST_40 -#else - module TupleUtils = - - open BasicInlinedOperations - - // adapted from System.Tuple::CombineHashCodes - let inline mask (n:int) (m:int) = (# "and" n m : int #) - let inline opshl (x:int) (n:int) : int = (# "shl" x (mask n 31) : int #) - let inline opxor (x:int) (y:int) : int = (# "xor" x y : int32 #) - let inline combine_tuple_hashes (h1 : int) (h2 : int) = (opxor ((opshl h1 5) + h1) h2) - - let combine_tuple_hash_codes (codes : int []) = - let mutable (num : int32) = codes.Length - 1 - - while (num > 1) do - let mutable i = 0 - while ((i * 2) < (num+1)) do - let index = i * 2 - let num' = index + 1 - if index = num then - set codes i (get codes index) - num <- i - else - set codes i (combine_tuple_hashes (get codes index) (get codes num)) - if num' = num then - num <- i - i <- i + 1 - combine_tuple_hashes (get codes 0) (get codes 1) - - - type Tuple<'T1>(t1:'T1) = - member t.Item1 = t1 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if TUPLE_STRUXT - // NOTE: Tuple`2 is a struct type. - // WARNING: If you change additional tuple types to be structs then you must change 'highestTupleStructType' in tastops.ml -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - [] - type Tuple<'T1,'T2> = - new (v1,v2) = { Item1 = v1; Item2 = v2 } - val Item1 : 'T1 - val Item2 : 'T2 -#else - type Tuple<'T1,'T2>(t1:'T1, t2:'T2) = - member t.Item1 = t1 - member t.Item2 = t2 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable -#endif - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3>(t1:'T1,t2:'T2,t3:'T3) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3,'T4>(t1:'T1,t2:'T2,t3:'T3,t4:'T4) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - member t.Item4 = t4 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3,'T4,'T5>(t1:'T1,t2:'T2,t3:'T3,t4:'T4,t5:'T5) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - member t.Item4 = t4 - member t.Item5 = t5 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6>(t1:'T1,t2:'T2,t3:'T3,t4:'T4,t5:'T5,t6:'T6) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - member t.Item4 = t4 - member t.Item5 = t5 - member t.Item6 = t6 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7>(t1:'T1,t2:'T2,t3:'T3,t4:'T4,t5:'T5,t6:'T6,t7:'T7) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - member t.Item4 = t4 - member t.Item5 = t5 - member t.Item6 = t6 - member t.Item7 = t7 - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest>(t1:'T1,t2:'T2,t3:'T3,t4:'T4,t5:'T5,t6:'T6,t7:'T7,rest:'TRest) = - member t.Item1 = t1 - member t.Item2 = t2 - member t.Item3 = t3 - member t.Item4 = t4 - member t.Item5 = t5 - member t.Item6 = t6 - member t.Item7 = t7 - member t.Rest = rest - interface IStructuralComparable - interface IStructuralEquatable - interface IComparable -#endif - - - //------------------------------------------------------------------------- - // The main aim here is to bootsrap the definition of structural hashing - // and comparison. Calls to these form part of the auto-generated - // code for each new datatype. - - module LanguagePrimitives = - - - let inline DefaultValue<'T when 'T : null> = unsafeDefault<'T> - - [] // nested module OK - module IntrinsicOperators = - //------------------------------------------------------------------------- - // Lazy and/or. Laziness added by the F# compiler. - - let (&) x y = if x then y else false - let (&&) x y = if x then y else false - let (or) x y = if x then true else y - let (||) x y = if x then true else y - - //------------------------------------------------------------------------- - // Address-of - // Note, "raise<'T> : exn -> 'T" is manually inlined below. - // Byref usage checks prohibit type instantiations involving byrefs. - - [] - let inline (~&) (x : 'T) : 'T byref = - let e = new System.ArgumentException("first class uses of address-of operators are not permitted") in - (# "throw" (e :> System.Exception) : 'T byref #) - - [] - let inline (~&&) (x : 'T) : nativeptr<'T> = - let e = new System.ArgumentException("first class uses of address-of operators are not permitted") in - (# "throw" (e :> System.Exception) : nativeptr<'T> #) - - - open IntrinsicOperators - [] // nested module OK - module IntrinsicFunctions = - - //------------------------------------------------------------------------- - // Unboxing, type casts, type tests - - type TypeNullnessSemantics = int - // .NET reference types - let TypeNullnessSemantics_NullIsExtraValue = 1 - // F# types with [] - let TypeNullnessSemantics_NullTrueValue = 2 - // F# record, union, tuple, function types - let TypeNullnessSemantics_NullNotLiked = 3 - // structs - let TypeNullnessSemantics_NullNever = 4 - - // duplicated from above since we're using integers in this section - let CompilationRepresentationFlags_PermitNull = 8 - - [] - type TypeInfo<'T>() = - // Compute an on-demand per-instantiation static field - static let info = - let ty = typeof<'T> - if ty.IsValueType - then TypeNullnessSemantics_NullNever else - let mappingAttrs = ty.GetCustomAttributes(typeof,false) - if mappingAttrs.Length = 0 - then TypeNullnessSemantics_NullIsExtraValue - elif ty.Equals(typeof) then - TypeNullnessSemantics_NullTrueValue - else - let reprAttrs = ty.GetCustomAttributes(typeof,false) - if reprAttrs.Length = 0 - then TypeNullnessSemantics_NullNotLiked - else - let reprAttr = get reprAttrs 0 - let reprAttr = (# "unbox.any !0" type (CompilationRepresentationAttribute) reprAttr : CompilationRepresentationAttribute #) - if (# "and" reprAttr.Flags CompilationRepresentationFlags_PermitNull : int #) = 0 - then TypeNullnessSemantics_NullNotLiked - else TypeNullnessSemantics_NullTrueValue - - // Publish the results of that compuation - static member TypeInfo = info - - - // Note: cheap nullness test for generic value: - // IL_0000: ldarg.1 - // IL_0001: box !TKey - // IL_0006: brtrue.s IL_000e - - // worst case: nothing known about source or destination - let UnboxGeneric<'T>(x:obj) = - if notnullPrim(x) or TypeInfo<'T>.TypeInfo <> TypeNullnessSemantics_NullNotLiked then - unboxPrim<'T>(x) - else - //System.Console.WriteLine("UnboxGeneric, x = {0}, 'T = {1}", x, typeof<'T>) - raise (System.NullReferenceException()) - - // better: source is NOT TypeNullnessSemantics_NullNotLiked - let inline UnboxFast<'T>(x:obj) = - // assert not(TypeInfo<'T>.TypeInfo = TypeNullnessSemantics_NullNotLiked) - unboxPrim<'T>(x) - - - // worst case: nothing known about source or destination - let TypeTestGeneric<'T>(x:obj) = - if notnullPrim(isinstPrim<'T>(x)) then true - elif notnullPrim(x) then false - else (TypeInfo<'T>.TypeInfo = TypeNullnessSemantics_NullTrueValue) - - // quick entry: source is NOT TypeNullnessSemantics_NullTrueValue - let inline TypeTestFast<'T>(x:obj) = - //assert not(TypeInfo<'T>.TypeInfo = TypeNullnessSemantics_NullTrueValue) - notnullPrim(isinstPrim<'T>(x)) - - let Dispose<'T when 'T :> System.IDisposable >(x:'T) = - match box x with - | null -> () - | _ -> x.Dispose() - - let inline MakeDecimal lo med hi isNegative scale = new System.Decimal(lo,med,hi,isNegative,scale) - - let inline GetString (s: string) (n:int) = s.Chars(n) - - let inline CreateInstance<'T when 'T : (new : unit -> 'T) >() = - (System.Activator.CreateInstance() : 'T) - - [] - let inline retype (x:'T) : 'U = (# "" x : 'U #) - - let inline GetArray (arr: 'T array) (n:int) = (# "ldelem.any !0" type ('T) arr n : 'T #) - let inline SetArray (arr: 'T array) (n:int,x:'T) = (# "stelem.any !0" type ('T) arr n x #) - - - let inline GetArraySub arr (start:int) (len:int) = - let len1 = (if len < 0 then 0 else len) - let dst = zero_create len - for i = 0 to len - 1 do - SetArray dst (i,GetArray arr (start + i)) - dst - - let inline SetArraySub arr (start:int) (len:int) (src:_[]) = - for i = 0 to len - 1 do - SetArray arr (start+i,GetArray src i) - - - let inline GetArray2D (arr: 'T[,]) (n1:int,n2:int) = (# "ldelem.multi 2 !0" type ('T) arr n1 n2 : 'T #) - let inline SetArray2D (arr: 'T[,]) (n1:int,n2:int,x:'T) = (# "stelem.multi 2 !0" type ('T) arr n1 n2 x #) - let inline GetArray2DLength1 (arr: 'T[,]) = (# "ldlen.multi 2 0" arr : int #) - let inline GetArray2DLength2 (arr: 'T[,]) = (# "ldlen.multi 2 1" arr : int #) - - let inline Array2DZeroCreate (n:int) (m:int) = (# "newarr.multi 2 !0" type ('T) n m : 'T[,] #) - let GetArray2DSub (src: 'T[,]) src1 src2 len1 len2 = - let len1 = (if len1 < 0 then 0 else len1) - let len2 = (if len2 < 0 then 0 else len2) - let dst = Array2DZeroCreate len1 len2 - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - SetArray2D dst (i,j,GetArray2D src (src1 + i,src2 + j)) - dst - - let SetArray2DSub (dst: 'T[,]) src1 src2 len1 len2 src = - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - SetArray2D dst (src1+i,src2+j,GetArray2D src (i,j)) - - - let inline GetArray3D (arr: 'T[,,]) (n1:int,n2:int,n3:int) = (# "ldelem.multi 3 !0" type ('T) arr n1 n2 n3 : 'T #) - let inline SetArray3D (arr: 'T[,,]) (n1:int,n2:int,n3:int,x:'T) = (# "stelem.multi 3 !0" type ('T) arr n1 n2 n3 x #) - let inline GetArray3DLength1 (arr: 'T[,,]) = (# "ldlen.multi 3 0" arr : int #) - let inline GetArray3DLength2 (arr: 'T[,,]) = (# "ldlen.multi 3 1" arr : int #) - let inline GetArray3DLength3 (arr: 'T[,,]) = (# "ldlen.multi 3 2" arr : int #) - - let inline Array3DZeroCreate (n1:int) (n2:int) (n3:int) = (# "newarr.multi 3 !0" type ('T) n1 n2 n3 : 'T[,,] #) - - let GetArray3DSub (src: 'T[,,]) src1 src2 src3 len1 len2 len3 = - let len1 = (if len1 < 0 then 0 else len1) - let len2 = (if len2 < 0 then 0 else len2) - let len3 = (if len3 < 0 then 0 else len3) - let dst = Array3DZeroCreate len1 len2 len3 - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - SetArray3D dst (i,j,k,GetArray3D src (src1+i,src2+j,src3+k)) - dst - - let SetArray3DSub (dst: 'T[,,]) src1 src2 src3 len1 len2 len3 src = - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - SetArray3D dst (src1+i,src2+j,src3+k,GetArray3D src (i,j,k)) - - - - let inline GetArray4D (arr: 'T[,,,]) (n1:int,n2:int,n3:int,n4:int) = (# "ldelem.multi 4 !0" type ('T) arr n1 n2 n3 n4 : 'T #) - let inline SetArray4D (arr: 'T[,,,]) (n1:int,n2:int,n3:int,n4:int,x:'T) = (# "stelem.multi 4 !0" type ('T) arr n1 n2 n3 n4 x #) - let inline Array4DLength1 (arr: 'T[,,,]) = (# "ldlen.multi 4 0" arr : int #) - let inline Array4DLength2 (arr: 'T[,,,]) = (# "ldlen.multi 4 1" arr : int #) - let inline Array4DLength3 (arr: 'T[,,,]) = (# "ldlen.multi 4 2" arr : int #) - let inline Array4DLength4 (arr: 'T[,,,]) = (# "ldlen.multi 4 3" arr : int #) - - let inline Array4DZeroCreate (n1:int) (n2:int) (n3:int) (n4:int) = (# "newarr.multi 4 !0" type ('T) n1 n2 n3 n4 : 'T[,,,] #) - - let GetArray4DSub (src: 'T[,,,]) src1 src2 src3 src4 len1 len2 len3 len4 = - let len1 = (if len1 < 0 then 0 else len1) - let len2 = (if len2 < 0 then 0 else len2) - let len3 = (if len3 < 0 then 0 else len3) - let len4 = (if len4 < 0 then 0 else len4) - let dst = Array4DZeroCreate len1 len2 len3 len4 - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - for m = 0 to len4 - 1 do - SetArray4D dst (i,j,k,m,GetArray4D src (src1+i,src2+j,src3+k,src3+m)) - dst - - let SetArray4DSub (dst: 'T[,,,]) src1 src2 src3 src4 len1 len2 len3 len4 src = - for i = 0 to len1 - 1 do - for j = 0 to len2 - 1 do - for k = 0 to len3 - 1 do - for m = 0 to len4 - 1 do - SetArray4D dst (src1+i,src2+j,src3+k,src4+m,GetArray4D src (i,j,k,m)) - - - module HashCompare = - - let PhysicalEqualityObj (xobj:obj) (yobj:obj) = - objEq xobj yobj - || (match xobj with - | null -> false - | :? System.ValueType -> xobj.Equals(yobj) - | _ -> false) - - // NOTE: compiler/optimizer is aware of this function and optimizes calls to it in many situations - // where it is known that PhysicalEqualityObj is identical to reference comparison - let PhysicalEqualityIntrinsic (x:'T) (y:'T) = - PhysicalEqualityObj (box x) (box y) - - let rec inline PhysicalEqualityFast (x:'T) (y:'T) = - PhysicalEqualityIntrinsic x y - when 'T : bool = (# "ceq" x y : bool #) - when 'T : int = (# "ceq" x y : bool #) - when 'T : sbyte = (# "ceq" x y : bool #) - when 'T : int16 = (# "ceq" x y : bool #) - when 'T : int32 = (# "ceq" x y : bool #) - when 'T : int64 = (# "ceq" x y : bool #) - when 'T : byte = (# "ceq" x y : bool #) - when 'T : uint16 = (# "ceq" x y : bool #) - when 'T : uint32 = (# "ceq" x y : bool #) - when 'T : uint64 = (# "ceq" x y : bool #) - when 'T : float = (# "ceq" x y : bool #) - when 'T : char = (# "ceq" x y : bool #) - - let PhysicalHashObj (xobj: obj) = -#if FX_NO_GET_HASH_CODE_HELPER - xobj.GetHashCode() -#else - match xobj with - | :? System.ValueType as v -> v.GetHashCode() - | _ -> - System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(xobj) -#endif - - let PhysicalHashIntrinsic (x: 'T) = PhysicalHashObj (box x) - - let inline PhysicalHashFast (x: 'T) = - PhysicalHashIntrinsic x - // NOTE: only specialziations on value types are allowed, and - // any type specializations on value types must return identical values to - // the mscorlib implementations of the ::GetHashCode methods on the given types. - when 'T : bool = (# "" x : int #) - when 'T : int = (# "" x : int #) - when 'T : int32 = (# "" x : int #) - when 'T : byte = (# "" x : int #) - when 'T : uint32 = (# "" x : int #) - - - //------------------------------------------------------------------------- - // Bi-modal generic comparison helper implementation. - // - // For structured data (records, tuples, unions) the IComparable implementation on - // types is run in either Equivalence Relation or Partial Equivalence Relation (PER) mode. - // - // In the second mode, generic comparison of two NaN values is recorded by clearing - // the PERMode.mode variable. PER mode can also be thought of as "no pair of NaNs detected yet" mode. - // Entry points that care about NaN pairs set the PERMode.mode variable and if it remains un-set by - // the end of their execution then no NaN pair was detected. - // - // From the library spec point of view: - // - GenericComparisonWithComparer will (a) make IComparable calls in the same mode as - // called and (b) if in PER node then a NaN pair will cause the outer operation that entered - // PER mode to return false. - // - // - GenericLessThan, GenericGreaterThan etc. enters PER mode and retores the previous PER mode on exit - // - // - GenericComparison clears PER mode and retores the previous PER mode on exit - // - // - GenericEquality is implemented via obj.Equals and always has PER semantics - // - // Note that some representations chosen by F# are legitimately allowed to be null, e.g. the empty list. - // However, because null values don't support the polymorphic virtual comparison operation CompareTo - // the test for nullness must be made on the caller side. - //------------------------------------------------------------------------- - - - let FailGenericComparison (obj: obj) = - raise (new System.ArgumentException("Failure during generic comparison: the type "^obj.GetType().ToString()^" does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type")) - - type GenericComparer(throwsOnPER:bool) = - - member c.ThrowsOnPER() = throwsOnPER - abstract CompareC : obj * obj -> int - - interface System.Collections.IComparer - - type NaNException(s) = - inherit System.ArgumentException(s) - - let rec GenericCompare (comp:GenericComparer) (xobj:obj,yobj:obj) = - (*if objEq xobj yobj then 0 else *) - //System.Console.WriteLine("xobj = {0}, yobj = {1}, NaNs = {2}, PERMode.mode = {3}", [| xobj; yobj; box PER_NAN_PAIR_DETECTED; box PERMode.mode |]) - match xobj,yobj with - | null,null -> 0 - | null,_ -> -1 - | _,null -> 1 -#if INVARIANT_CULTURE_STRING_COMPARISON - // Use invariant culture comparison for strings - | (:? string as x),(:? string as y) -> System.String.Compare(x, y, false, CultureInfo.InvariantCulture) -#else - // Use Ordinal comparison for strings - | (:? string as x),(:? string as y) -> System.String.CompareOrdinal(x, y) -#endif - // Permit structural comparison on arrays - | (:? System.Array as arr1),_ -> - match arr1,yobj with - // Fast path - | (:? (obj[]) as arr1) , (:? (obj[]) as arr2) -> GenericComparisonObjArrayWithComparer comp arr1 arr2 - // Fast path - | (:? (byte[]) as arr1), (:? (byte[]) as arr2) -> GenericComparisonByteArray arr1 arr2 - | _ , (:? System.Array as arr2) -> GenericComparisonArbArrayWithComparer comp arr1 arr2 - | _ -> FailGenericComparison xobj - // Check for IStructuralComparable - | (:? IStructuralComparable as x),_ -> - x.CompareTo(yobj,comp) - // Check for IComparable - | (:? System.IComparable as x),_ -> - match xobj,yobj with - | (:? float as x),(:? float as y) -> - if System.Double.IsNaN x && System.Double.IsNaN y && (comp.ThrowsOnPER()) then - raise (NaNException("float NaN Comparison")) - | (:? float32 as x),(:? float32 as y) -> - if System.Single.IsNaN x && System.Single.IsNaN y && (comp.ThrowsOnPER()) then - raise (NaNException("float32 NaN Comparison")) - | _ -> () - x.CompareTo(yobj) - | (:? nativeint as x),(:? nativeint as y) -> if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - | (:? unativeint as x),(:? unativeint as y) -> if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - | _,(:? IStructuralComparable as yc) -> - let res = yc.CompareTo(xobj,comp) - if res < 0 then 1 elif res > 0 then -1 else 0 - | _,(:? System.IComparable as yc) -> - // Note -c doesn't work here: be careful of comparison function returning minint - let c = yc.CompareTo(xobj) in - if c < 0 then 1 elif c > 0 then -1 else 0 - | _ -> FailGenericComparison xobj - - /// specialcase: Core implementation of structural comparison on arbitrary arrays. - and GenericComparisonArbArrayWithComparer (comp:GenericComparer) (x:System.Array) (y:System.Array) : int = -#if FX_NO_ARRAY_LONG_LENGTH - if x.Rank = 1 && y.Rank = 1 then - let lenx = x.Length - let leny = y.Length - let c = intOrder lenx leny - if c <> 0 then c else - let rec check i = - if i >= lenx then 0 else - let c = GenericCompare comp ((x.GetValue(i)),(y.GetValue(i))) - if c <> 0 then c else check (i + 1) - check 0 - elif x.Rank = 2 && y.Rank = 2 then - let lenx0 = x.GetLength(0) - let leny0 = y.GetLength(0) - let c = intOrder lenx0 leny0 - if c <> 0 then c else - let lenx1 = x.GetLength(1) - let leny1 = y.GetLength(1) - let c = intOrder lenx1 leny1 - if c <> 0 then c else - let basex0 = (x.GetLowerBound(0)) - let basex1 = (x.GetLowerBound(1)) - let basey0 = (y.GetLowerBound(0)) - let basey1 = (y.GetLowerBound(1)) - let c = intOrder basex0 basey0 - if c <> 0 then c else - let c = intOrder basex1 basey1 - if c <> 0 then c else - let rec check0 i = - let rec check1 j = - if j >= lenx1 then 0 else - let c = GenericCompare comp ((x.GetValue(i + basex0,j + basex1)), (y.GetValue(i + basey0,j + basey1))) - if c <> 0 then c else check1 (j + 1) - if i >= lenx0 then 0 else - let c = check1 0 - if c <> 0 then c else - check0 (i + 1) - check0 0 - else - let c = intOrder x.Rank y.Rank - if c <> 0 then c else - let ndims = x.Rank - // check lengths - let rec precheck k = - if k >= ndims then 0 else - let c = intOrder (x.GetLength(k)) (y.GetLength(k)) - if c <> 0 then c else - let c = intOrder (x.GetLowerBound(k)) (y.GetLowerBound(k)) - if c <> 0 then c else - precheck (k+1) - let c = precheck 0 - if c <> 0 then c else - let idxs : int[] = zero_create ndims - let rec checkN k baseIdx i lim = - if i >= lim then 0 else - set idxs k (baseIdx + i) - let c = - if k = ndims - 1 - then GenericCompare comp ((x.GetValue(idxs)), (y.GetValue(idxs))) - else check (k+1) - if c <> 0 then c else - checkN k baseIdx (i + 1) lim - and check k = - if k >= ndims then 0 else - let baseIdx = x.GetLowerBound(k) - checkN k baseIdx 0 (x.GetLength(k)) - check 0 -#else - if x.Rank = 1 && y.Rank = 1 then - let lenx = x.LongLength - let leny = y.LongLength - let c = int64Order lenx leny - if c <> 0 then c else - let rec check i = - if i >=. lenx then 0 else - let c = GenericCompare comp ((x.GetValue(i)), (y.GetValue(i))) - if c <> 0 then c else check (i +. 1L) - check 0L - elif x.Rank = 2 && y.Rank = 2 then - let lenx0 = x.GetLongLength(0) - let leny0 = y.GetLongLength(0) - let c = int64Order lenx0 leny0 - if c <> 0 then c else - let lenx1 = x.GetLongLength(1) - let leny1 = y.GetLongLength(1) - let c = int64Order lenx1 leny1 - if c <> 0 then c else - let basex0 = int64 (x.GetLowerBound(0)) - let basex1 = int64 (x.GetLowerBound(1)) - let basey0 = int64 (y.GetLowerBound(0)) - let basey1 = int64 (y.GetLowerBound(1)) - let c = int64Order basex0 basey0 - if c <> 0 then c else - let c = int64Order basex1 basey1 - if c <> 0 then c else - let rec check0 i = - let rec check1 j = - if j >=. lenx1 then 0 else - let c = GenericCompare comp ((x.GetValue(i +. basex0,j +. basex1)), (y.GetValue(i +. basey0,j +. basey1))) - if c <> 0 then c else check1 (j +. 1L) - if i >=. lenx0 then 0 else - let c = check1 0L - if c <> 0 then c else - check0 (i +. 1L) - check0 0L - else - let c = intOrder x.Rank y.Rank - if c <> 0 then c else - let ndims = x.Rank - // check lengths - let rec precheck k = - if k >= ndims then 0 else - let c = int64Order (x.GetLongLength(k)) (y.GetLongLength(k)) - if c <> 0 then c else - let c = intOrder (x.GetLowerBound(k)) (y.GetLowerBound(k)) - if c <> 0 then c else - precheck (k+1) - let c = precheck 0 - if c <> 0 then c else - let idxs : int64[] = zero_create ndims - let rec checkN k baseIdx i lim = - if i >=. lim then 0 else - set idxs k (baseIdx +. i) - let c = - if k = ndims - 1 - then GenericCompare comp ((x.GetValue(idxs)), (y.GetValue(idxs))) - else check (k+1) - if c <> 0 then c else - checkN k baseIdx (i +. 1L) lim - and check k = - if k >= ndims then 0 else - let baseIdx = x.GetLowerBound(k) - checkN k (int64 baseIdx) 0L (x.GetLongLength(k)) - check 0 -#endif - - /// optimized case: Core implementation of structural comparison on object arrays. - and GenericComparisonObjArrayWithComparer (comp:GenericComparer) (x:obj[]) (y:obj[]) : int = - let lenx = x.Length - let leny = y.Length - let c = intOrder lenx leny - if c <> 0 then c - else - let mutable i = 0 - let mutable res = 0 - while i < lenx do - let c = GenericCompare comp ((get x i), (get y i)) - if c <> 0 then (res <- c; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural comparison on arrays. - and GenericComparisonByteArray (x:byte[]) (y:byte[]) : int = - let lenx = x.Length - let leny = y.Length - let c = intOrder lenx leny - if c <> 0 then c - else - let mutable i = 0 - let mutable res = 0 - while i < lenx do - let c = byteOrder (get x i) (get y i) - if c <> 0 then (res <- c; i <- lenx) - else i <- i + 1 - res - - type GenericComparer with - - interface System.Collections.IComparer with - override c.Compare(x:obj,y:obj) = GenericCompare c (x,y) - override c.CompareC(x:obj,y:obj) = GenericCompare c (x,y) - - let fsComparer = GenericComparer(true) - let fsComparerNoThrow = GenericComparer(false) - - // NOTE: compiler/optimizer is aware of this function and optimizes calls to it in many situations - // where it is known how GenericComparisonObjBimodal will dispatch via IComparable. - let GenericComparisonWithComparerIntrinsic<'T> (comp:System.Collections.IComparer) (x:'T) (y:'T) : int = - // if 'T = float then x.CompareTo(y) - // if 'T = float32 then x.CompareTo(y) - comp.Compare(box x, box y) - - let inline GenericComparisonWithComparerFast<'T> (comp:System.Collections.IComparer) (x:'T) (y:'T) : int = - GenericComparisonWithComparerIntrinsic comp x y - when 'T : bool = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : sbyte = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int16 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int32 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int64 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : nativeint = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : byte = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint16 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint32 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint64 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : unativeint = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - // Multi-modal direct implementation for float/float32 all of "clt", "cgt" and "ceq" may fail on NaN. In this case we must detect our mode - // and possibly change PERMode.mode. We do this by bailing out to call GenericComparisonWithComparerIntrinsic - when 'T : float = if (# "clt" x y : bool #) then (-1) else if (# "cgt" x y : bool #) then 1 else if (# "ceq" x y : bool #) then 0 else GenericComparisonWithComparerIntrinsic comp x y - when 'T : float32 = if (# "clt" x y : bool #) then (-1) else if (# "cgt" x y : bool #) then 1 else if (# "ceq" x y : bool #) then 0 else GenericComparisonWithComparerIntrinsic comp x y - when 'T : char = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : string = -#if INVARIANT_CULTURE_STRING_COMPARISON - // NOTE: we don't have to null check here because System.String.Compare - // gives reliable results on null values. - System.String.Compare((# "" x : string #) ,(# "" y : string #), false, CultureInfo.InvariantCulture) -#else - // NOTE: we don't have to null check here because System.String.CompareOrdinal - // gives reliable results on null values. - System.String.CompareOrdinal((# "" x : string #) ,(# "" y : string #)) -#endif - - - let GenericComparisonIntrinsic<'T> (x:'T) (y:'T) : int = - GenericComparisonWithComparerIntrinsic (fsComparerNoThrow :> System.Collections.IComparer) x y - - - // Check for 'T = float or 'T = float32 (in case we didn't resolve this statically). - // In these cases we must use the right "clt" to cope with NaN. Note "<" etc. take - // on a different meaning for floats nested inside data structures than when immediately - // applied to type float. This gives us the IEEE semantics when "<" etc. are used on - // floats, and a sound structural semantics when used on structured data, though - // comparisons on structural data containing floats do not get optimized. - let GenericLessThanIntrinsic (x:'T) (y:'T) = - try - (# "clt" (GenericComparisonWithComparerIntrinsic fsComparer x y) 0 : bool #) - with - | :? NaNException -> false - - - let GenericGreaterThanIntrinsic (x:'T) (y:'T) = - try - (# "cgt" (GenericComparisonWithComparerIntrinsic fsComparer x y) 0 : bool #) - with - | :? NaNException -> false - - - let GenericGreaterOrEqualIntrinsic (x:'T) (y:'T) = - try - (# "cgt" (GenericComparisonWithComparerIntrinsic fsComparer x y) (-1) : bool #) - with - | :? NaNException -> false - - - - let GenericLessOrEqualIntrinsic (x:'T) (y:'T) = - try - (# "clt" (GenericComparisonWithComparerIntrinsic fsComparer x y) 1 : bool #) - with - | :? NaNException -> false - - - /// Core implementation of structural comparison on arbitrary values. - let inline GenericComparisonFast<'T> (x:'T) (y:'T) : int = - GenericComparisonIntrinsic x y - when 'T : bool = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : sbyte = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int16 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int32 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : int64 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : nativeint = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : byte = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint16 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint32 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : uint64 = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : unativeint = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : float = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : float32 = if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #) - when 'T : char = if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #) - when 'T : string = -#if INVARIANT_CULTURE_STRING_COMPARISON - // NOTE: we don't have to null check here because System.String.Compare - // gives reliable results on null values. - System.String.Compare((# "" x : string #) ,(# "" y : string #), false, CultureInfo.InvariantCulture) -#else - // NOTE: we don't have to null check here because System.String.CompareOrdinal - // gives reliable results on null values. - System.String.CompareOrdinal((# "" x : string #) ,(# "" y : string #)) -#endif - - - let inline GenericLessThanFast (x:'T) (y:'T) = - GenericLessThanIntrinsic x y - when 'T : bool = (# "clt" x y : bool #) - when 'T : int = (# "clt" x y : bool #) - when 'T : sbyte = (# "clt" x y : bool #) - when 'T : int16 = (# "clt" x y : bool #) - when 'T : int32 = (# "clt" x y : bool #) - when 'T : int64 = (# "clt" x y : bool #) - when 'T : byte = (# "clt.un" x y : bool #) - when 'T : uint16 = (# "clt.un" x y : bool #) - when 'T : uint32 = (# "clt.un" x y : bool #) - when 'T : uint64 = (# "clt.un" x y : bool #) - when 'T : unativeint = (# "clt.un" x y : bool #) - when 'T : nativeint = (# "clt" x y : bool #) - when 'T : float = (# "clt" x y : bool #) - when 'T : float32= (# "clt" x y : bool #) - when 'T : char = (# "clt" x y : bool #) - - let inline GenericGreaterThanFast (x:'T) (y:'T) = - GenericGreaterThanIntrinsic x y - when 'T : bool = (# "cgt" x y : bool #) - when 'T : int = (# "cgt" x y : bool #) - when 'T : sbyte = (# "cgt" x y : bool #) - when 'T : int16 = (# "cgt" x y : bool #) - when 'T : int32 = (# "cgt" x y : bool #) - when 'T : int64 = (# "cgt" x y : bool #) - when 'T : nativeint = (# "cgt" x y : bool #) - when 'T : byte = (# "cgt.un" x y : bool #) - when 'T : uint16 = (# "cgt.un" x y : bool #) - when 'T : uint32 = (# "cgt.un" x y : bool #) - when 'T : uint64 = (# "cgt.un" x y : bool #) - when 'T : unativeint = (# "cgt.un" x y : bool #) - when 'T : float = (# "cgt" x y : bool #) - when 'T : float32 = (# "cgt" x y : bool #) - when 'T : char = (# "cgt" x y : bool #) - - let inline GenericLessOrEqualFast (x:'T) (y:'T) = - GenericLessOrEqualIntrinsic x y - when 'T : bool = not (# "cgt" x y : bool #) - when 'T : int = not (# "cgt" x y : bool #) - when 'T : sbyte = not (# "cgt" x y : bool #) - when 'T : int16 = not (# "cgt" x y : bool #) - when 'T : int32 = not (# "cgt" x y : bool #) - when 'T : int64 = not (# "cgt" x y : bool #) - when 'T : nativeint = not (# "cgt" x y : bool #) - when 'T : byte = not (# "cgt.un" x y : bool #) - when 'T : uint16 = not (# "cgt.un" x y : bool #) - when 'T : uint32 = not (# "cgt.un" x y : bool #) - when 'T : uint64 = not (# "cgt.un" x y : bool #) - when 'T : unativeint = not (# "cgt.un" x y : bool #) - when 'T : float = not (# "cgt.un" x y : bool #) - when 'T : float32 = not (# "cgt.un" x y : bool #) - when 'T : char = not(# "cgt" x y : bool #) - - let inline GenericGreaterOrEqualFast (x:'T) (y:'T) = - GenericGreaterOrEqualIntrinsic x y - when 'T : bool = not (# "clt" x y : bool #) - when 'T : int = not (# "clt" x y : bool #) - when 'T : sbyte = not (# "clt" x y : bool #) - when 'T : int16 = not (# "clt" x y : bool #) - when 'T : int32 = not (# "clt" x y : bool #) - when 'T : int64 = not (# "clt" x y : bool #) - when 'T : nativeint = not (# "clt" x y : bool #) - when 'T : byte = not (# "clt.un" x y : bool #) - when 'T : uint16 = not (# "clt.un" x y : bool #) - when 'T : uint32 = not (# "clt.un" x y : bool #) - when 'T : uint64 = not (# "clt.un" x y : bool #) - when 'T : unativeint = not (# "clt.un" x y : bool #) - when 'T : float = not (# "clt.un" x y : bool #) - when 'T : float32 = not (# "clt.un" x y : bool #) - when 'T : char = not (# "clt" x y : bool #) - - let GenericMinimumFast x y = if GenericLessThanFast x y then x else y - let GenericMaximumFast x y = if GenericLessThanFast x y then y else x - - - //------------------------------------------------------------------------- - // EQUALITY - //------------------------------------------------------------------------- - - - /// optimized case: Core implementation of structural equality on arrays. - let GenericEqualityByteArray (x:byte[]) (y:byte[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = byteEq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural equality on arrays. - let GenericEqualityInt32Array (x:int[]) (y:int[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = int32Eq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural equality on arrays - let GenericEqualitySingleArray (x:float32[]) (y:float32[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = float32Eq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural equality on arrays. - let GenericEqualityDoubleArray (x:float[]) (y:float[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = floatEq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural equality on arrays. - let GenericEqualityCharArray (x:char[]) (y:char[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = charEq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - /// optimized case: Core implementation of structural equality on arrays. - let GenericEqualityInt64Array (x:int64[]) (y:int64[]) : bool= - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = int64Eq (get x i) (get y i) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - - - let rec GenericEqualityObj (iec:System.Collections.IEqualityComparer) ((xobj:obj),(yobj:obj)) : bool = - (*if objEq xobj yobj then true else *) - match xobj,yobj with - | null,null -> true - | null,_ -> false - | _,null -> false - | (:? string as xs),(:? string as ys) -> System.String.Equals(xs,ys) - // Permit structural equality on arrays - | (:? System.Array as arr1),_ -> - match arr1,yobj with - // Fast path - | (:? (obj[]) as arr1) , (:? (obj[]) as arr2) -> GenericEqualityObjArray iec arr1 arr2 - // Fast path - | (:? (byte[]) as arr1), (:? (byte[]) as arr2) -> GenericEqualityByteArray arr1 arr2 - | (:? (int32[]) as arr1), (:? (int32[]) as arr2) -> GenericEqualityInt32Array arr1 arr2 - | (:? (int64[]) as arr1), (:? (int64[]) as arr2) -> GenericEqualityInt64Array arr1 arr2 - | (:? (char[]) as arr1), (:? (char[]) as arr2) -> GenericEqualityCharArray arr1 arr2 - | (:? (float32[]) as arr1), (:? (float32[]) as arr2) -> GenericEqualitySingleArray arr1 arr2 - | (:? (float[]) as arr1), (:? (float[]) as arr2) -> GenericEqualityDoubleArray arr1 arr2 - | _ , (:? System.Array as arr2) -> GenericEqualityArbArray iec arr1 arr2 - | _ -> xobj.Equals(yobj) - | (:? IStructuralEquatable as x1),_ -> x1.Equals(yobj,iec) - // Ensure NaN semantics on recursive calls - | (:? float as f1), (:? float as f2) -> (# "ceq" f1 f2 : bool #) - | (:? float32 as f1), (:? float32 as f2) -> (# "ceq" f1 f2 : bool #) - | _ -> xobj.Equals(yobj) - - /// specialcase: Core implementation of structural equality on arbitrary arrays. - and GenericEqualityArbArray (iec:System.Collections.IEqualityComparer) (x:System.Array) (y:System.Array) : bool = -#if FX_NO_ARRAY_LONG_LENGTH - if x.Rank = 1 && y.Rank = 1 then - // check lengths - let lenx = x.Length - let leny = y.Length - (int32Eq lenx leny) && - // check contents - let rec check i = (i >= lenx) || (GenericEqualityObj iec ((x.GetValue(i)),(y.GetValue(i))) && check (i + 1)) - check 0 - elif x.Rank = 2 && y.Rank = 2 then - // check lengths - let lenx0 = x.GetLength(0) - let leny0 = y.GetLength(0) - (int32Eq lenx0 leny0) && - let lenx1 = x.GetLength(1) - let leny1 = y.GetLength(1) - (int32Eq lenx1 leny1) && - let basex0 = x.GetLowerBound(0) - let basex1 = x.GetLowerBound(1) - let basey0 = y.GetLowerBound(0) - let basey1 = y.GetLowerBound(1) - (int32Eq basex0 basey0) && - (int32Eq basex1 basey1) && - // check contents - let rec check0 i = - let rec check1 j = (j >= lenx1) || (GenericEqualityObj iec ((x.GetValue(basex0 + i,basex1 + j)), (y.GetValue(basey0 + i,basey1 + j))) && check1 (j + 1)) - (i >= lenx0) || (check1 0 && check0 (i + 1)) - check0 0 - else - (x.Rank = y.Rank) && - let ndims = x.Rank - // check lengths - let rec precheck k = - (k >= ndims) || - (int32Eq (x.GetLength(k)) (y.GetLength(k)) && - int32Eq (x.GetLowerBound(k)) (y.GetLowerBound(k)) && - precheck (k+1)) - precheck 0 && - let idxs : int32[] = zero_create ndims - // check contents - let rec checkN k baseIdx i lim = - (i >= lim) || - (set idxs k (baseIdx + i); - (if k = ndims - 1 - then GenericEqualityObj iec ((x.GetValue(idxs)),(y.GetValue(idxs))) - else check (k+1)) && - checkN k baseIdx (i + 1) lim) - and check k = - (k >= ndims) || - (let baseIdx = x.GetLowerBound(k) - checkN k baseIdx 0 (x.GetLength(k))) - - check 0 -#else - if x.Rank = 1 && y.Rank = 1 then - // check lengths - let lenx = x.LongLength - let leny = y.LongLength - (int64Eq lenx leny) && - // check contents - let rec check i = (i >=. lenx) || (GenericEqualityObj iec ((x.GetValue(i)),(y.GetValue(i))) && check (i +. 1L)) - check 0L - elif x.Rank = 2 && y.Rank = 2 then - // check lengths - let lenx0 = x.GetLongLength(0) - let leny0 = y.GetLongLength(0) - (int64Eq lenx0 leny0) && - let lenx1 = x.GetLongLength(1) - let leny1 = y.GetLongLength(1) - (int64Eq lenx1 leny1) && - let basex0 = int64 (x.GetLowerBound(0)) - let basex1 = int64 (x.GetLowerBound(1)) - let basey0 = int64 (y.GetLowerBound(0)) - let basey1 = int64 (y.GetLowerBound(1)) - (int64Eq basex0 basey0) && - (int64Eq basex1 basey1) && - // check contents - let rec check0 i = - let rec check1 j = (j >=. lenx1) || (GenericEqualityObj iec ((x.GetValue(basex0 +. i,basex1 +. j)),(y.GetValue(basey0 +. i,basey1 +. j))) && check1 (j +. 1L)) - (i >=. lenx0) || (check1 0L && check0 (i +. 1L)) - check0 0L - else - (x.Rank = y.Rank) && - let ndims = x.Rank - // check lengths - let rec precheck k = - (k >= ndims) || - (int64Eq (x.GetLongLength(k)) (y.GetLongLength(k)) && - int32Eq (x.GetLowerBound(k)) (y.GetLowerBound(k)) && - precheck (k+1)) - precheck 0 && - let idxs : int64[] = zero_create ndims - // check contents - let rec checkN k baseIdx i lim = - (i >=. lim) || - (set idxs k (baseIdx +. i); - (if k = ndims - 1 - then GenericEqualityObj iec ((x.GetValue(idxs)),(y.GetValue(idxs))) - else check (k+1)) && - checkN k baseIdx (i +. 1L) lim) - and check k = - (k >= ndims) || - (let baseIdx = x.GetLowerBound(k) - checkN k (int64 baseIdx) 0L (x.GetLongLength(k))) - - check 0 -#endif - - /// optimized case: Core implementation of structural equality on object arrays. - and GenericEqualityObjArray iec (x:obj[]) (y:obj[]) : bool = - let lenx = x.Length - let leny = y.Length - let c = (lenx = leny ) - if not c then c - else - let mutable i = 0 - let mutable res = true - while i < lenx do - let c = GenericEqualityObj iec ((get x i),(get y i)) - if not c then (res <- false; i <- lenx) - else i <- i + 1 - res - - - let fsEqualityComparer = - { new System.Collections.IEqualityComparer with - override iec.Equals(x:obj,y:obj) = GenericEqualityObj iec (x,y) - override iec.GetHashCode(x:obj) = raise (InvalidOperationException "this object is for recursive equality calls and may not be used for hashing") } - - let rec GenericEqualityIntrinsic (x : 'T) (y : 'T) : bool = - fsEqualityComparer.Equals((box x), (box y)) - - let rec GenericEqualityWithComparerIntrinsic (comp : System.Collections.IEqualityComparer) (x : 'T) (y : 'T) : bool = - //comp.Equals((box x),(box y)) - GenericEqualityObj comp ((box x),(box y)) - - - let inline GenericEqualityFast (x : 'T) (y : 'T) : bool = - GenericEqualityIntrinsic x y - when 'T : bool = (# "ceq" x y : bool #) - when 'T : int = (# "ceq" x y : bool #) - when 'T : sbyte = (# "ceq" x y : bool #) - when 'T : int16 = (# "ceq" x y : bool #) - when 'T : int32 = (# "ceq" x y : bool #) - when 'T : int64 = (# "ceq" x y : bool #) - when 'T : byte = (# "ceq" x y : bool #) - when 'T : uint16 = (# "ceq" x y : bool #) - when 'T : uint32 = (# "ceq" x y : bool #) - when 'T : uint64 = (# "ceq" x y : bool #) - when 'T : float = (# "ceq" x y : bool #) - when 'T : float32 = (# "ceq" x y : bool #) - when 'T : char = (# "ceq" x y : bool #) - when 'T : string = System.String.Equals((# "" x : string #),(# "" y : string #)) - - let inline GenericEqualityWithComparerFast (comp : System.Collections.IEqualityComparer) (x : 'T) (y : 'T) : bool = - GenericEqualityWithComparerIntrinsic comp x y - when 'T : bool = (# "ceq" x y : bool #) - when 'T : int = (# "ceq" x y : bool #) - when 'T : sbyte = (# "ceq" x y : bool #) - when 'T : int16 = (# "ceq" x y : bool #) - when 'T : int32 = (# "ceq" x y : bool #) - when 'T : int64 = (# "ceq" x y : bool #) - when 'T : byte = (# "ceq" x y : bool #) - when 'T : uint16 = (# "ceq" x y : bool #) - when 'T : uint32 = (# "ceq" x y : bool #) - when 'T : uint64 = (# "ceq" x y : bool #) - when 'T : float = (# "ceq" x y : bool #) - when 'T : float32 = (# "ceq" x y : bool #) - when 'T : char = (# "ceq" x y : bool #) - when 'T : string = System.String.Equals((# "" x : string #),(# "" y : string #)) - - - let inline GenericInequalityFast (x:'T) (y:'T) = (not(GenericEqualityFast x y) : bool) - - - //------------------------------------------------------------------------- - // HASHING - //------------------------------------------------------------------------- - - - - let defaultHashNodes = 18 - - type CountLimitedHasher(sz:int) = - [] - val mutable nodeCount : int - - member x.Fresh() = - if (System.Threading.Interlocked.CompareExchange(&(x.nodeCount), sz, 0) = 0) then - x - else - new CountLimitedHasher(sz) - - interface IEqualityComparer - - - type UnlimitedHasher() = - - interface IEqualityComparer - - - let fsUnlimitedHasher = UnlimitedHasher() - - let inline HashCombine nr x y = (x <<< 1) + y + 631 * nr - - let GenericHashObjArray (iec : System.Collections.IEqualityComparer) (x: obj[]) : int = - let len = x.Length - let mutable i = len - 1 - if i > defaultHashNodes then i <- defaultHashNodes // limit the hash - let mutable acc = 0 - while (i >= 0) do - // NOTE: GenericHash* call decreases nr - acc <- HashCombine i acc (iec.GetHashCode(x.GetValue(i))); - i <- i - 1 - acc - - // optimized case - byte arrays - let GenericHashByteArray (iec : System.Collections.IEqualityComparer) (x: byte[]) : int = - let len = length x - let mutable i = len - 1 - if i > defaultHashNodes then i <- defaultHashNodes // limit the hash - let mutable acc = 0 - while (i >= 0) do - acc <- HashCombine i acc (int_of_byte (get x i)); - i <- i - 1 - acc - - // optimized case - int arrays - let GenericHashInt32Array (iec : System.Collections.IEqualityComparer) (x: int[]) : int = - let len = length x - let mutable i = len - 1 - if i > defaultHashNodes then i <- defaultHashNodes // limit the hash - let mutable acc = 0 - while (i >= 0) do - acc <- HashCombine i acc (get x i); - i <- i - 1 - acc - - // optimized case - int arrays - let GenericHashInt64Array (iec : System.Collections.IEqualityComparer) (x: int64[]) : int = - let len = length x - let mutable i = len - 1 - if i > defaultHashNodes then i <- defaultHashNodes // limit the hash - let mutable acc = 0 - while (i >= 0) do - acc <- HashCombine i acc (int32 (get x i)); - i <- i - 1 - acc - - // special case - arrays do not by default have a decent structural hashing function - let GenericHashArbArray (iec : System.Collections.IEqualityComparer) (x: System.Array) : int = - match x.Rank with - | 1 -> - let b = x.GetLowerBound(0) - let len = x.Length - let mutable i = b + len - 1 - if i > b + defaultHashNodes then i <- b + defaultHashNodes // limit the hash - let mutable acc = 0 - while (i >= b) do - // NOTE: GenericHash* call decreases nr - acc <- HashCombine i acc (iec.GetHashCode(x.GetValue(i))); - i <- i - 1 - acc - | n -> - HashCombine 10 (x.GetLength(0)) (x.GetLength(1)) - - // Core implementation of structural hashing. Search for the IStructuralHash interface. - // Arrays and strings are structurally hashed through a separate technique. - // Objects which do not support this interface get hashed using a virtual - // call to the standard Object::GetStructuralHashCode(). - let rec GenericHashParamObj (iec : System.Collections.IEqualityComparer) (x: obj) : int = - match x with - | null -> 0 - | (:? System.Array as a) -> - match a with - | :? (obj[]) as oa -> GenericHashObjArray iec oa - | :? (byte[]) as ba -> GenericHashByteArray iec ba - | :? (int[]) as ba -> GenericHashInt32Array iec ba - | :? (int64[]) as ba -> GenericHashInt64Array iec ba - | _ -> GenericHashArbArray iec a - // REVIEW: System.Array implements IStructuralEquatable in Dev10 - | :? IStructuralEquatable as a -> - a.GetHashCode(iec) - | _ -> - x.GetHashCode() - - - // optimized case - hash on things compatible with obj[] - - - type CountLimitedHasher with - - interface System.Collections.IEqualityComparer with - override iec.Equals(x:obj,y:obj) = - GenericEqualityObj iec (x,y) - override iec.GetHashCode(x:obj) = - iec.nodeCount <- iec.nodeCount - 1 - if iec.nodeCount > 0 then - GenericHashParamObj iec x - else - -1 - - type UnlimitedHasher with - - interface System.Collections.IEqualityComparer with - override iec.Equals(x:obj,y:obj) = GenericEqualityObj iec (x,y) - override iec.GetHashCode(x:obj) = GenericHashParamObj iec x - - // Represents an call to structural hashing that was not optimized by static conditionals. - // NOTE: compiler/optimizer is aware of this function and optimizes calls to it in many situations - let GenericHashIntrinsic x = GenericHashParamObj fsUnlimitedHasher (box(x)) - - let LimitedGenericHashIntrinsic limit x = GenericHashParamObj (CountLimitedHasher(limit)) (box(x)) - - // Represents a recursive call to structural hashing that was not optimized by static conditionals. - // For unoptimized recursive calls we fetch the generic hasher - let GenericHashWithComparerIntrinsic<'T> (comp : System.Collections.IEqualityComparer) (x : 'T) : int = - GenericHashParamObj comp (box(x)) - - - /// Core entry into structural hashing. Hash to a given depth limit. - let inline GenericHashWithComparerFast (comp : System.Collections.IEqualityComparer) (x:'T) : int = - GenericHashWithComparerIntrinsic comp x - when 'T : bool = (# "" x : int #) - when 'T : int = (# "" x : int #) - when 'T : int32 = (# "" x : int #) - when 'T : byte = (# "" x : int #) - when 'T : uint32 = (# "" x : int #) - when 'T : string = - match (# "" x : obj #) with - | null -> 0 - | _ -> (# "call instance int32 [mscorlib]System.String:: GetHashCode()" x : int #) - - /// Core entry into structural hashing. Hash to a given depth limit. - let inline GenericHashFast (x:'T) : int = - GenericHashIntrinsic x - when 'T : bool = (# "" x : int #) - when 'T : int = (# "" x : int #) - when 'T : int32 = (# "" x : int #) - when 'T : byte = (# "" x : int #) - when 'T : uint32 = (# "" x : int #) - when 'T : string = - match (# "" x : obj #) with - | null -> 0 - | _ -> (# "call instance int32 [mscorlib]System.String:: GetHashCode()" x : int #) - - /// Core entry into structural hashing. Hash to a given depth limit. - let inline GenericLimitedHashFast (limit:int) (x:'T) : int = - LimitedGenericHashIntrinsic limit x - when 'T : bool = (# "" x : int #) - when 'T : int = (# "" x : int #) - when 'T : int32 = (# "" x : int #) - when 'T : byte = (# "" x : int #) - when 'T : uint32 = (# "" x : int #) - when 'T : string = - match (# "" x : obj #) with - | null -> 0 - | _ -> (# "call instance int32 [mscorlib]System.String:: GetHashCode()" x : int #) - - - let inline FastHashTuple2 (comparer:System.Collections.IEqualityComparer) (x1,x2) = - TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x1) (GenericHashWithComparerFast comparer x2) - - let inline FastHashTuple3 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3) = - TupleUtils.combine_tuple_hashes (TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x1) (GenericHashWithComparerFast comparer x2)) (GenericHashWithComparerFast comparer x3) - - let inline FastHashTuple4 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3,x4) = - TupleUtils.combine_tuple_hashes (TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x1) (GenericHashWithComparerFast comparer x2)) (TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x3) (GenericHashWithComparerFast comparer x4)) - - let inline FastHashTuple5 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3,x4,x5) = - TupleUtils.combine_tuple_hashes (TupleUtils.combine_tuple_hashes (TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x1) (GenericHashWithComparerFast comparer x2)) (TupleUtils.combine_tuple_hashes (GenericHashWithComparerFast comparer x3) (GenericHashWithComparerFast comparer x4))) (GenericHashWithComparerFast comparer x5) - - let inline FastEqualsTuple2 (comparer:System.Collections.IEqualityComparer) (x1,x2) (y1,y2) = - GenericEqualityWithComparerFast comparer x1 y1 && - GenericEqualityWithComparerFast comparer x2 y2 - - let inline FastEqualsTuple3 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3) (y1,y2,y3) = - GenericEqualityWithComparerFast comparer x1 y1 && - GenericEqualityWithComparerFast comparer x2 y2 && - GenericEqualityWithComparerFast comparer x3 y3 - - let inline FastEqualsTuple4 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3,x4) (y1,y2,y3,y4) = - GenericEqualityWithComparerFast comparer x1 y1 && - GenericEqualityWithComparerFast comparer x2 y2 && - GenericEqualityWithComparerFast comparer x3 y3 && - GenericEqualityWithComparerFast comparer x4 y4 - - let inline FastEqualsTuple5 (comparer:System.Collections.IEqualityComparer) (x1,x2,x3,x4,x5) (y1,y2,y3,y4,y5) = - GenericEqualityWithComparerFast comparer x1 y1 && - GenericEqualityWithComparerFast comparer x2 y2 && - GenericEqualityWithComparerFast comparer x3 y3 && - GenericEqualityWithComparerFast comparer x4 y4 && - GenericEqualityWithComparerFast comparer x5 y5 - - let inline FastCompareTuple2 (comparer:System.Collections.IComparer) (x1,x2) (y1,y2) = - let n = GenericComparisonWithComparerFast comparer x1 y1 - if n <> 0 then n else - GenericComparisonWithComparerFast comparer x2 y2 - - let inline FastCompareTuple3 (comparer:System.Collections.IComparer) (x1,x2,x3) (y1,y2,y3) = - let n = GenericComparisonWithComparerFast comparer x1 y1 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x2 y2 - if n <> 0 then n else - GenericComparisonWithComparerFast comparer x3 y3 - - let inline FastCompareTuple4 (comparer:System.Collections.IComparer) (x1,x2,x3,x4) (y1,y2,y3,y4) = - let n = GenericComparisonWithComparerFast comparer x1 y1 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x2 y2 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x3 y3 - if n <> 0 then n else - GenericComparisonWithComparerFast comparer x4 y4 - - let inline FastCompareTuple5 (comparer:System.Collections.IComparer) (x1,x2,x3,x4,x5) (y1,y2,y3,y4,y5) = - let n = GenericComparisonWithComparerFast comparer x1 y1 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x2 y2 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x3 y3 - if n <> 0 then n else - let n = GenericComparisonWithComparerFast comparer x4 y4 - if n <> 0 then n else - GenericComparisonWithComparerFast comparer x5 y5 - - - - let inline GenericEquality x y = HashCompare.GenericEqualityFast x y - let inline GenericEqualityWithComparer comp x y = HashCompare.GenericEqualityWithComparerFast comp x y - let inline GenericComparison x y = HashCompare.GenericComparisonFast x y - let inline GenericComparisonWithComparer comp x y = HashCompare.GenericComparisonWithComparerFast comp x y - let inline GenericLessThan x y = HashCompare.GenericLessThanFast x y - let inline GenericGreaterThan x y = HashCompare.GenericGreaterThanFast x y - let inline GenericLessOrEqual x y = HashCompare.GenericLessOrEqualFast x y - let inline GenericGreaterOrEqual x y = HashCompare.GenericGreaterOrEqualFast x y - let inline GenericMinimum x y = if HashCompare.GenericLessThanFast x y then x else y - let inline GenericMaximum x y = if HashCompare.GenericLessThanFast x y then y else x - - let inline PhysicalEquality x y = HashCompare.PhysicalEqualityFast x y - let inline PhysicalHash x = HashCompare.PhysicalHashFast x - let FSharpComparer() = HashCompare.fsComparer :> System.Collections.IComparer - let FSharpEqualityComparer() = HashCompare.fsUnlimitedHasher :> System.Collections.IEqualityComparer - - let inline GenericHash x = HashCompare.GenericHashFast x - let inline GenericLimitedHash limit x = HashCompare.GenericLimitedHashFast limit x - let inline GenericHashWithComparer comp x = HashCompare.GenericHashWithComparerFast comp x - - let inline MakeGenericEqualityComparer<'T>() = - // type-specialize some common cases to generate more efficient functions - { new System.Collections.Generic.IEqualityComparer<'T> with - member self.GetHashCode(x) = GenericHash x - member self.Equals(x,y) = GenericEquality x y } - - let inline MakeGenericLimitedEqualityComparer<'T>(limit:int) = - // type-specialize some common cases to generate more efficient functions - { new System.Collections.Generic.IEqualityComparer<'T> with - member self.GetHashCode(x) = GenericLimitedHash limit x - member self.Equals(x,y) = GenericEquality x y } - -(* - let CharIEquality = MakeGenericEqualityComparer() - let StringIEquality = MakeGenericEqualityComparer() - let SByteIEquality = MakeGenericEqualityComparer() - let Int16IEquality = MakeGenericEqualityComparer() - let Int32IEquality = MakeGenericEqualityComparer() - let Int64IEquality = MakeGenericEqualityComparer() - let IntPtrIEquality = MakeGenericEqualityComparer() - let ByteIEquality = MakeGenericEqualityComparer() - let UInt16IEquality = MakeGenericEqualityComparer() - let UInt32IEquality = MakeGenericEqualityComparer() - let UInt64IEquality = MakeGenericEqualityComparer() - let UIntPtrIEquality = MakeGenericEqualityComparer() - let FloatIEquality = MakeGenericEqualityComparer() - let Float32IEquality = MakeGenericEqualityComparer() - let DecimalIEquality = MakeGenericEqualityComparer() - - [] - type FastGenericEqualityComparerTable<'T>() = - static let f : System.Collections.Generic.IEqualityComparer<'T> = - match typeof<'T> with - | ty when ty.Equals(typeof) -> unboxPrim (box ByteIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box CharIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box SByteIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box Int16IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box Int32IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box Int64IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box IntPtrIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt16IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt32IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt64IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box UIntPtrIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box FloatIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box Float32IEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box DecimalIEquality) - | ty when ty.Equals(typeof) -> unboxPrim (box StringIEquality) - | _ -> MakeGenericEqualityComparer<'T>() - static member Function : System.Collections.Generic.IEqualityComparer<'T> = f - - let FastGenericEqualityComparer<'T> = FastGenericEqualityComparerTable<'T>.Function -*) - let inline FastGenericEqualityComparer<'T> = MakeGenericEqualityComparer<'T>() - let inline FastLimitedGenericEqualityComparer<'T>(limit) = MakeGenericLimitedEqualityComparer<'T>(limit) - - let inline MakeFastGenericComparer<'T>() = - { new System.Collections.Generic.IComparer<'T> with - member __.Compare(x,y) = GenericComparison x y } - - let CharComparer = MakeFastGenericComparer() - let StringComparer = MakeFastGenericComparer() - let SByteComparer = MakeFastGenericComparer() - let Int16Comparer = MakeFastGenericComparer() - let Int32Comparer = MakeFastGenericComparer() - let Int64Comparer = MakeFastGenericComparer() - let IntPtrComparer = MakeFastGenericComparer() - let ByteComparer = MakeFastGenericComparer() - let UInt16Comparer = MakeFastGenericComparer() - let UInt32Comparer = MakeFastGenericComparer() - let UInt64Comparer = MakeFastGenericComparer() - let UIntPtrComparer = MakeFastGenericComparer() - let FloatComparer = MakeFastGenericComparer() - let Float32Comparer = MakeFastGenericComparer() - let DecimalComparer = MakeFastGenericComparer() - - /// Use a type-indexed table to ensure we only create a single FastStructuralComparison function - /// for each type - [] - type FastGenericComparerTable<'T>() = - static let f : System.Collections.Generic.IComparer<'T> = - match typeof<'T> with - | ty when ty.Equals(typeof) -> unboxPrim (box ByteComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box CharComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box SByteComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box Int16Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box Int32Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box Int64Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box IntPtrComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt16Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt32Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box UInt64Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box UIntPtrComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box FloatComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box Float32Comparer) - | ty when ty.Equals(typeof) -> unboxPrim (box DecimalComparer) - | ty when ty.Equals(typeof) -> unboxPrim (box StringComparer) - | _ -> MakeFastGenericComparer<'T>() - static member Function : System.Collections.Generic.IComparer<'T> = f - - let FastGenericComparer<'T> = FastGenericComparerTable<'T>.Function - - - let inline retype (x:'T) : 'U = (# "" x : 'U #) - - let inline EnumOfValue (u : 'u) : 'e when 'e : enum<'u> = - unboxPrim<'e>(box u) - when 'e : 'e = (retype u : 'e) - - let inline EnumToValue (e : 'e) : 'u when 'e : enum<'u> = - unboxPrim<'u>(box e) - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - when 'e : 'e = (retype e : 'u) - - - - let inline format_error() = raise (new System.FormatException("Input string was not in a correct format")) - - // Parse formats - // DDDDDDDD - // -DDDDDDDD - // 0xHHHHHHHH - // -0xHHHHHHHH - // 0bBBBBBBB - // -0bBBBBBBB - // 0oOOOOOOO - // -0oOOOOOOO - // without leading/trailing spaces. - /// - // Note: Parse defaults to NumberStyles.Integer = AllowLeadingWhite ||| AllowTrailingWhite ||| AllowLeadingSign - // However, that is not the required behaviour of 'int32', 'int64' etc. when used on string - // arguments: we explicitly disallow AllowLeadingWhite ||| AllowTrailingWhite - // and only request AllowLeadingSign. - - let is_oxb c = -#if FX_NO_TO_LOWER_INVARIANT - let c = System.Char.ToLower c -#else - let c = System.Char.ToLowerInvariant c -#endif - charEq c 'x' || charEq c 'o' || charEq c 'b' - - let is_0oxb (s:string) p l = - l >= p + 2 && charEq (s.Chars(p)) '0' && is_oxb (s.Chars(p+1)) - - let get_0oxb (s:string) p l = - if is_0oxb s p l -#if FX_NO_TO_LOWER_INVARIANT - then p+2,System.Char.ToLower(s.Chars(p+1) ) -#else - then p+2,System.Char.ToLowerInvariant(s.Chars(p+1) ) -#endif - else p,'d' - - let getSign32 (s:string) p l = - if (l >= p + 1 && charEq (s.Chars(p)) '-') - then 1,(-1) - else 0,1 - - let getSign64 (s:string) p l = - if (l >= p + 1 && charEq (s.Chars(p)) '-') - then 1, -1L - else 0,1L - - let parseOctalUInt64 (s:string) p l = - let rec parse n acc = if n < l then parse (n+1) (acc *.. 8UL +.. (let c = s.Chars(n) in if c >=... '0' && c <=... '7' then Convert.ToUInt64(c) -.. Convert.ToUInt64('0') else format_error())) else acc in - parse p 0UL - - let parseBinaryUInt64 (s:string) p l = - let rec parse n acc = if n < l then parse (n+1) (acc *.. 2UL +.. (match s.Chars(n) with '0' -> 0UL | '1' -> 1UL | _ -> format_error())) else acc in - parse p 0UL - - let ParseUInt32 (s:string) = - let s = s.Trim() - let l = s.Length - let p = 0 - let p,specifier = get_0oxb s p l in - if p >= l then format_error() else - match specifier with - | 'x' -> UInt32.Parse( s.Substring(p), NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture) - | 'b' -> Convert.ToUInt32(parseBinaryUInt64 s p l) - | 'o' -> Convert.ToUInt32(parseOctalUInt64 s p l) - | _ -> UInt32.Parse(s.Substring(p), NumberStyles.Integer, CultureInfo.InvariantCulture) in - - let inline int32_of_uint32 (x:uint32) = (# "" x : int32 #) - let inline int64_of_uint64 (x:uint64) = (# "" x : int64 #) - - let ParseInt32 (s:string) = - let s = s.Trim() in - let l = s.Length in - let p = 0 in - let p,sign = getSign32 s p l in - let p,specifier = get_0oxb s p l in - if p >= l then format_error() else - match Char.ToLower(specifier,CultureInfo.InvariantCulture(*FxCop:1304*)) with - | 'x' -> sign * (int32_of_uint32 (Convert.ToUInt32(UInt64.Parse(s.Substring(p), NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture)))) - | 'b' -> sign * (int32_of_uint32 (Convert.ToUInt32(parseBinaryUInt64 s p l))) - | 'o' -> sign * (int32_of_uint32 (Convert.ToUInt32(parseOctalUInt64 s p l))) - | _ -> Int32.Parse(s, NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture) - - let ParseInt64 (s:string) = - let s = s.Trim() - let l = s.Length - let p = 0 - let p,sign = getSign64 s p l in - let p,specifier = get_0oxb s p l in - if p >= l then format_error() else - match Char.ToLower(specifier,CultureInfo.InvariantCulture(*FxCop:1304*)) with - | 'x' -> sign *. Int64.Parse(s.Substring(p), NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture) - | 'b' -> sign *. (int64_of_uint64 (parseBinaryUInt64 s p l)) - | 'o' -> sign *. (int64_of_uint64 (parseOctalUInt64 s p l)) - | _ -> Int64.Parse(s, NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture) - - let ParseUInt64 (s:string) : uint64 = - let s = s.Trim() in - let l = s.Length in - let p = 0 in - let p,specifier = get_0oxb s p l in - if p >= l then format_error() else - match specifier with - | 'x' -> UInt64.Parse(s.Substring(p), NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture) - | 'b' -> parseBinaryUInt64 s p l - | 'o' -> parseOctalUInt64 s p l - | _ -> UInt64.Parse(s.Substring(p), NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture) - - - [] - type GenericZeroDynamicImplTable<'T>() = - static let result : 'T = - // The dynamic implementation - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<'T> (box 0y) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0s) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0L) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0n) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0uy) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0us) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0u) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0UL) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0un) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0M) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0.0) - elif aty.Equals(typeof) then unboxPrim<'T> (box 0.0f) - else - let pinfo = aty.GetProperty("Zero") - unboxPrim<'T> (pinfo.GetValue(null,null)) - static member Result : 'T = result - - [] - type GenericOneDynamicImplTable<'T>() = - static let result : 'T = - // The dynamic implementation - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<'T> (box 1y) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1s) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1L) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1n) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1uy) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1us) - elif aty.Equals(typeof) then unboxPrim<'T> (box (retype 1us : char)) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1u) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1UL) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1un) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1M) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1.0) - elif aty.Equals(typeof) then unboxPrim<'T> (box 1.0f) - else - let pinfo = aty.GetProperty("One") - unboxPrim<'T> (pinfo.GetValue(null,null)) - - static member Result : 'T = result - - let GenericZeroDynamic< 'T >() : 'T = GenericZeroDynamicImplTable<'T>.Result - let GenericOneDynamic< 'T >() : 'T = GenericOneDynamicImplTable<'T>.Result - - let inline GenericZero< ^T when ^T : (static member Zero : ^T) > : ^T = - GenericZeroDynamic<(^T)>() - when ^T : int32 = 0 - when ^T : float = 0.0 - when ^T : float32 = 0.0f - when ^T : int64 = 0L - when ^T : uint64 = 0UL - when ^T : uint32 = 0ul - when ^T : nativeint = 0n - when ^T : unativeint = 0un - when ^T : int16 = 0s - when ^T : uint16 = 0us - when ^T : sbyte = 0y - when ^T : byte = 0uy - when ^T : decimal = 0M - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - when ^T : ^T = (^T : (static member Zero : ^T) ()) - - - let inline GenericOne< ^T when ^T : (static member One : ^T) > : ^T = - GenericOneDynamic<(^T)>() - when ^T : int32 = 1 - when ^T : float = 1.0 - when ^T : float32 = 1.0f - when ^T : int64 = 1L - when ^T : uint64 = 1UL - when ^T : uint32 = 1ul - when ^T : nativeint = 1n - when ^T : unativeint = 1un - when ^T : int16 = 1s - when ^T : uint16 = 1us - when ^T : char = (retype 1us : char) - when ^T : sbyte = 1y - when ^T : byte = 1uy - when ^T : decimal = 1M - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - // That is, not in the generic implementation of '+' - when ^T : ^T = (^T : (static member One : ^T) ()) - - [] - type GenericDivideByIntDynamicImplTable<'T>() = - static let result : ('T -> int -> 'T) = - // The dynamic implementation - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_> (box (fun (x:decimal) (n:int) -> System.Decimal.Divide(x, System.Convert.ToDecimal(n)))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float) (n:int) -> (# "div" x ((# "conv.r8" n : float #)) : float #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float32) (n:int) -> (# "div" x ((# "conv.r4" n : float32 #)) : float32 #))) - else - match aty.GetMethod("DivideByInt",[| aty; typeof |]) with - | null -> raise (NotSupportedException "dynamic invocation of DivideByInt involving coercions") - | m -> (fun x n -> unboxPrim<_> (m.Invoke(null,[| box x; box n |]))) - - static member Result : ('T -> int -> 'T) = result - - let DivideByIntDynamic<'T> x n = GenericDivideByIntDynamicImplTable<('T)>.Result x n - - let inline DivideByInt< ^T when ^T : (static member DivideByInt : ^T * int -> ^T) > (x:^T) (n:int) : ^T = - DivideByIntDynamic<'T> x n - when ^T : float = (# "div" x ((# "conv.r8" (n:int) : float #)) : float #) - when ^T : float32 = (# "div" x ((# "conv.r4" (n:int) : float32 #)) : float32 #) - when ^T : decimal = System.Decimal.Divide((retype x:decimal), System.Convert.ToDecimal(n)) - when ^T : ^T = (^T : (static member DivideByInt : ^T * int -> ^T) (x, n)) - - - // Dynamic implementation of addition operator resolution - [] - type AdditionDynamicImplTable<'T,'U,'V>() = - static let impl : ('T -> 'U -> 'V) = - // The dynamic implementation - let aty = typeof<'T> - let bty = typeof<'U> - let cty = typeof<'V> - let dyn() = - let ameth = aty.GetMethod("op_Addition",[| aty; bty |]) - let bmeth = if aty.Equals(bty) then null else bty.GetMethod("op_Addition",[| aty; bty |]) - match ameth,bmeth with - | null, null -> raise (NotSupportedException "dynamic invocation of op_Addition involving coercions") - | m,null | null,m -> (fun x y -> unboxPrim<_> (m.Invoke(null,[| box x; box y |]))) - | _ -> raise (NotSupportedException "dynamic invocation of op_Addition involving overloading") - - if aty.Equals(bty) && bty.Equals(cty) then - if aty.Equals(typeof) then unboxPrim<_> (box (fun (x:sbyte) (y:sbyte) -> (# "conv.i1" (# "add" x y : int32 #) : sbyte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int16) (y:int16) -> (# "conv.i2" (# "add" x y : int32 #) : int16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int32) (y:int32) -> (# "add" x y : int32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int64) (y:int64) -> (# "add" x y : int64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:nativeint) (y:nativeint) -> (# "add" x y : nativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:byte) (y:byte) -> (# "conv.u1" (# "add" x y : uint32 #) : byte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint16) (y:uint16) -> (# "conv.u2" (# "add" x y : uint32 #) : uint16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint32) (y:uint32) -> (# "add" x y : uint32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint64) (y:uint64) -> (# "add" x y : uint64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:unativeint) (y:unativeint) -> (# "add" x y : unativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float) (y:float) -> (# "add" x y : float #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float32) (y:float32) -> (# "add" x y : float32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:string) (y:string) -> System.String.Concat(x,y))) - else dyn() - else dyn() - - static member Impl : ('T -> 'U -> 'V) = impl - - let AdditionDynamic<'T,'U,'V> x n = AdditionDynamicImplTable<'T,'U,'V>.Impl x n - - // Dynamic implementation of checked addition operator resolution - [] - type CheckedAdditionDynamicImplTable<'T,'U,'V>() = - static let impl : ('T -> 'U -> 'V) = - // The dynamic implementation - let aty = typeof<'T> - let bty = typeof<'U> - let cty = typeof<'V> - let dyn() = - let ameth = aty.GetMethod("op_Addition",[| aty; bty |]) - let bmeth = if aty.Equals(bty) then null else bty.GetMethod("op_Addition",[| aty; bty |]) - match ameth,bmeth with - | null, null -> raise (NotSupportedException "dynamic invocation of op_Addition involving coercions") - | m,null | null,m -> (fun x y -> unboxPrim<_> (m.Invoke(null,[| box x; box y |]))) - | _ -> raise (NotSupportedException "dynamic invocation of op_Addition involving overloading") - - if aty.Equals(bty) && bty.Equals(cty) then - if aty.Equals(typeof) then unboxPrim<_> (box (fun (x:sbyte) (y:sbyte) -> (# "conv.ovf.i1" (# "add.ovf" x y : int32 #) : sbyte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int16) (y:int16) -> (# "conv.ovf.i2" (# "add.ovf" x y : int32 #) : int16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int32) (y:int32) -> (# "add.ovf" x y : int32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int64) (y:int64) -> (# "add.ovf" x y : int64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:nativeint) (y:nativeint) -> (# "add.ovf" x y : nativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:byte) (y:byte) -> (# "conv.ovf.u1.un" (# "add.ovf.un" x y : uint32 #) : byte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint16) (y:uint16) -> (# "conv.ovf.u2.un" (# "add.ovf.un" x y : uint32 #) : uint16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:char) (y:char) -> (# "conv.ovf.u2.un" (# "add.ovf.un" x y : uint32 #) : char #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint32) (y:uint32) -> (# "add.ovf.un" x y : uint32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint64) (y:uint64) -> (# "add.ovf.un" x y : uint64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:unativeint) (y:unativeint) -> (# "add.ovf.un" x y : unativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float) (y:float) -> (# "add" x y : float #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float32) (y:float32) -> (# "add" x y : float32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:string) (y:string) -> System.String.Concat(x,y))) - else dyn() - else dyn() - - - static member Impl : ('T -> 'U -> 'V) = impl - - let CheckedAdditionDynamic<'T,'U,'V> x n = CheckedAdditionDynamicImplTable<'T,'U,'V>.Impl x n - - - // Dynamic implementation of addition operator resolution - [] - type MultiplyDynamicImplTable<'T,'U,'V>() = - static let impl : ('T -> 'U -> 'V) = - // The dynamic implementation - let aty = typeof<'T> - let bty = typeof<'U> - let cty = typeof<'V> - let dyn() = - let ameth = aty.GetMethod("op_Multiply",[| aty; bty |]) - let bmeth = if aty.Equals(bty) then null else bty.GetMethod("op_Multiply",[| aty; bty |]) - match ameth,bmeth with - | null, null -> raise (NotSupportedException "dynamic invocation of op_Multiply involving coercions") - | m,null | null,m -> (fun x y -> unboxPrim<_> (m.Invoke(null,[| box x; box y |]))) - | _ -> raise (NotSupportedException "dynamic invocation of op_Multiply involving overloading") - - if aty.Equals(bty) && bty.Equals(cty) then - if aty.Equals(typeof) then unboxPrim<_> (box (fun (x:sbyte) (y:sbyte) -> (# "conv.i1" (# "mul" x y : int32 #) : sbyte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int16) (y:int16) -> (# "conv.i2" (# "mul" x y : int32 #) : int16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int32) (y:int32) -> (# "mul" x y : int32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int64) (y:int64) -> (# "mul" x y : int64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:nativeint) (y:nativeint) -> (# "mul" x y : nativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:byte) (y:byte) -> (# "conv.u1" (# "mul" x y : uint32 #) : byte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint16) (y:uint16) -> (# "conv.u2" (# "mul" x y : uint32 #) : uint16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint32) (y:uint32) -> (# "mul" x y : uint32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint64) (y:uint64) -> (# "mul" x y : uint64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:unativeint) (y:unativeint) -> (# "mul" x y : unativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float) (y:float) -> (# "mul" x y : float #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float32) (y:float32) -> (# "mul" x y : float32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:string) (y:string) -> System.String.Concat(x,y))) - else dyn() - else dyn() - - static member Impl : ('T -> 'U -> 'V) = impl - - let MultiplyDynamic<'T,'U,'V> x n = MultiplyDynamicImplTable<'T,'U,'V>.Impl x n - - // Dynamic implementation of checked addition operator resolution - [] - type CheckedMultiplyDynamicImplTable<'T,'U,'V>() = - static let impl : ('T -> 'U -> 'V) = - // The dynamic implementation - let aty = typeof<'T> - let bty = typeof<'U> - let cty = typeof<'V> - let dyn() = - let ameth = aty.GetMethod("op_Multiply",[| aty; bty |]) - let bmeth = if aty.Equals(bty) then null else bty.GetMethod("op_Multiply",[| aty; bty |]) - match ameth,bmeth with - | null, null -> raise (NotSupportedException "dynamic invocation of op_Multiply involving coercions") - | m,null | null,m -> (fun x y -> unboxPrim<_> (m.Invoke(null,[| box x; box y |]))) - | _ -> raise (NotSupportedException "dynamic invocation of op_Multiply involving overloading") - - if aty.Equals(bty) && bty.Equals(cty) then - if aty.Equals(typeof) then unboxPrim<_> (box (fun (x:sbyte) (y:sbyte) -> (# "conv.ovf.i1" (# "mul.ovf" x y : int32 #) : sbyte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int16) (y:int16) -> (# "conv.ovf.i2" (# "mul.ovf" x y : int32 #) : int16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int32) (y:int32) -> (# "mul.ovf" x y : int32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:int64) (y:int64) -> (# "mul.ovf" x y : int64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:nativeint) (y:nativeint) -> (# "mul.ovf" x y : nativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:byte) (y:byte) -> (# "conv.ovf.u1.un" (# "mul.ovf.un" x y : uint32 #) : byte #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint16) (y:uint16) -> (# "conv.ovf.u2.un" (# "mul.ovf.un" x y : uint16 #) : uint16 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint32) (y:uint32) -> (# "mul.ovf.un" x y : uint32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:uint64) (y:uint64) -> (# "mul.ovf.un" x y : uint64 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:unativeint) (y:unativeint) -> (# "mul.ovf.un" x y : unativeint #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float) (y:float) -> (# "mul" x y : float #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:float32) (y:float32) -> (# "mul" x y : float32 #))) - elif aty.Equals(typeof) then unboxPrim<_> (box (fun (x:string) (y:string) -> System.String.Concat(x,y))) - else dyn() - else dyn() - - static member Impl : ('T -> 'U -> 'V) = impl - - let CheckedMultiplyDynamic<'T,'U,'V> x n = CheckedMultiplyDynamicImplTable<'T,'U,'V>.Impl x n - - - - - open BasicInlinedOperations - open LanguagePrimitives - open LanguagePrimitives.IntrinsicOperators - open LanguagePrimitives.IntrinsicFunctions - -#if FX_ATLEAST_40 -#else - type Tuple<'T1> with - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1> = other :?> Tuple<'T1> - comparer.Compare((box t.Item1),(box t2.Item1)) - interface IStructuralEquatable with - override t.Equals(other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1> = other :?> Tuple<'T1> - comparer.Equals((box t.Item1),(box t2.Item1)) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - comparer.GetHashCode(t.Item1) - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other,(HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2> with - override x.ToString() = - let sb = StringBuilder(10) in - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2> = other :?> Tuple<'T1,'T2> - HashCompare.FastCompareTuple2 comparer (retype t : ('T1 * 'T2)) (retype t2) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2> = other :?> Tuple<'T1,'T2> - HashCompare.FastEqualsTuple2 comparer (retype t : ('T1 * 'T2)) (retype t2) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - HashCompare.FastHashTuple2 comparer (retype t : ('T1 * 'T2)) - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - - type Tuple<'T1,'T2,'T3> with - override x.ToString() = - let sb = StringBuilder(10) in - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3> = other :?> Tuple<'T1,'T2,'T3> - HashCompare.FastCompareTuple3 comparer (retype t : ('T1 * 'T2 * 'T3)) (retype t2) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3> = other :?> Tuple<'T1,'T2,'T3> - HashCompare.FastEqualsTuple3 comparer (retype t : ('T1 * 'T2 * 'T3)) (retype t2) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - HashCompare.FastHashTuple3 comparer (retype t : ('T1 * 'T2 * 'T3)) - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2,'T3,'T4> with - override x.ToString() = - let sb = StringBuilder(10) in - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(",") - .Append(box(x.Item4).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4> = other :?> Tuple<'T1,'T2,'T3,'T4> - HashCompare.FastCompareTuple4 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4)) (retype t2) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4> = other :?> Tuple<'T1,'T2,'T3,'T4> - HashCompare.FastEqualsTuple4 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4)) (retype t2) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - HashCompare.FastHashTuple4 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4)) - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2,'T3,'T4,'T5> with - override x.ToString() = - let sb = StringBuilder(10) in - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(",") - .Append(box(x.Item4).ToString()).Append(",") - .Append(box(x.Item5).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5> - HashCompare.FastCompareTuple5 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4 * 'T5)) (retype t2) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5> - HashCompare.FastEqualsTuple5 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4 * 'T5)) (retype t2) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - HashCompare.FastHashTuple5 comparer (retype t : ('T1 * 'T2 * 'T3 * 'T4 * 'T5)) - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6> with - override x.ToString() = - let sb = StringBuilder(10) - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(",") - .Append(box(x.Item4).ToString()).Append(",") - .Append(box(x.Item5).ToString()).Append(",") - .Append(box(x.Item6).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6> - let mutable n = comparer.Compare((box t.Item1),(box t2.Item1)) - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item2), (box t2.Item2)) ; - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item3), (box t2.Item3)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item4), (box t2.Item4)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item5), (box t2.Item5)); - if n <> 0 then - n - else - comparer.Compare((box t.Item6), (box t2.Item6)) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6> - comparer.Equals((box t.Item1),(box t2.Item1)) && comparer.Equals((box t.Item2),(box t2.Item2)) && comparer.Equals((box t.Item3),(box t2.Item3)) && - comparer.Equals((box t.Item4),(box t2.Item4)) && comparer.Equals((box t.Item5),(box t2.Item5)) && comparer.Equals((box t.Item6),(box t2.Item6)) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - TupleUtils.combine_tuple_hash_codes [|(comparer.GetHashCode(t.Item1)) ; (comparer.GetHashCode(t.Item2)) ; (comparer.GetHashCode(t.Item3)) ; (comparer.GetHashCode(t.Item4)) ; (comparer.GetHashCode(t.Item5)) ; (comparer.GetHashCode(t.Item6))|] - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> with - override x.ToString() = - let sb = StringBuilder(10) - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(",") - .Append(box(x.Item4).ToString()).Append(",") - .Append(box(x.Item5).ToString()).Append(",") - .Append(box(x.Item6).ToString()).Append(",") - .Append(box(x.Item7).ToString()).Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> - let mutable n = comparer.Compare((box t.Item1),(box t2.Item1)) - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item2), (box t2.Item2)) ; - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item3), (box t2.Item3)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item4), (box t2.Item4)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item5), (box t2.Item5)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item6), (box t2.Item6)); - if n <> 0 then - n - else - comparer.Compare((box t.Item7), (box t2.Item7)) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> - comparer.Equals((box t.Item1),(box t2.Item1)) && comparer.Equals((box t.Item2),(box t2.Item2)) && comparer.Equals((box t.Item3),(box t2.Item3)) && - comparer.Equals((box t.Item4),(box t2.Item4)) && comparer.Equals((box t.Item5),(box t2.Item5)) && comparer.Equals((box t.Item6),(box t2.Item6)) && comparer.Equals((box t.Item7),(box t2.Item7)) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - TupleUtils.combine_tuple_hash_codes [|(comparer.GetHashCode(t.Item1)) ; (comparer.GetHashCode(t.Item2)) ; (comparer.GetHashCode(t.Item3)) ; (comparer.GetHashCode(t.Item4)) ; (comparer.GetHashCode(t.Item5)) ; (comparer.GetHashCode(t.Item6)) ; (comparer.GetHashCode(t.Item7))|] - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> with - override x.ToString() = - let sb = StringBuilder(10) - sb.Append("(").Append(box(x.Item1).ToString()).Append(",") - .Append(box(x.Item2).ToString()).Append(",") - .Append(box(x.Item3).ToString()).Append(",") - .Append(box(x.Item4).ToString()).Append(",") - .Append(box(x.Item5).ToString()).Append(",") - .Append(box(x.Item6).ToString()).Append(",") - .Append(box(x.Item7).ToString()).Append(",") - .Append("...").Append(")").ToString() - interface IStructuralComparable with - override t.CompareTo (other:obj,comparer:System.Collections.IComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> - let mutable n = comparer.Compare((box t.Item1),(box t2.Item1)) - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item2), (box t2.Item2)) ; - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item3), (box t2.Item3)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item4), (box t2.Item4)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item5), (box t2.Item5)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item6), (box t2.Item6)); - if n <> 0 then - n - else - n <- comparer.Compare((box t.Item7), (box t2.Item7)) - if n <> 0 then - n - else - comparer.Compare((box t.Rest), (box t2.Rest)) - interface IStructuralEquatable with - override t.Equals (other:obj,comparer:System.Collections.IEqualityComparer) = - let t2 : Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> = other :?> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> - comparer.Equals((box t.Item1),(box t2.Item1)) && comparer.Equals((box t.Item2),(box t2.Item2)) && comparer.Equals((box t.Item3),(box t2.Item3)) && - comparer.Equals((box t.Item4),(box t2.Item4)) && comparer.Equals((box t.Item5),(box t2.Item5)) && comparer.Equals((box t.Item6),(box t2.Item6)) && - comparer.Equals((box t.Item7),(box t2.Item7)) && comparer.Equals((box t.Rest),(box t2.Rest)) - override t.GetHashCode(comparer:System.Collections.IEqualityComparer) = - TupleUtils.combine_tuple_hash_codes [|(comparer.GetHashCode(t.Item1)) ; (comparer.GetHashCode(t.Item2)) ; (comparer.GetHashCode(t.Item3)) ; (comparer.GetHashCode(t.Item4)) ; (comparer.GetHashCode(t.Item5)) ; (comparer.GetHashCode(t.Item6)) ; (comparer.GetHashCode(t.Item7)) ; (comparer.GetHashCode(t.Rest))|] - interface IComparable with - override t.CompareTo(other:obj) = - (t :> IStructuralComparable).CompareTo(other, (HashCompare.fsComparer :> System.Collections.IComparer)) - override t.GetHashCode() = - (t :> IStructuralEquatable).GetHashCode(HashCompare.fsUnlimitedHasher) - override t.Equals(other:obj) = - (t :> IStructuralEquatable).Equals(other,HashCompare.fsEqualityComparer) -#endif - - [] - type Choice<'T1,'T2> = - | Choice1Of2 of 'T1 - | Choice2Of2 of 'T2 - - [] - type Choice<'T1,'T2,'T3> = - | Choice1Of3 of 'T1 - | Choice2Of3 of 'T2 - | Choice3Of3 of 'T3 - - [] - type Choice<'T1,'T2,'T3,'T4> = - | Choice1Of4 of 'T1 - | Choice2Of4 of 'T2 - | Choice3Of4 of 'T3 - | Choice4Of4 of 'T4 - - [] - type Choice<'T1,'T2,'T3,'T4,'T5> = - | Choice1Of5 of 'T1 - | Choice2Of5 of 'T2 - | Choice3Of5 of 'T3 - | Choice4Of5 of 'T4 - | Choice5Of5 of 'T5 - - [] - type Choice<'T1,'T2,'T3,'T4,'T5,'T6> = - | Choice1Of6 of 'T1 - | Choice2Of6 of 'T2 - | Choice3Of6 of 'T3 - | Choice4Of6 of 'T4 - | Choice5Of6 of 'T5 - | Choice6Of6 of 'T6 - - [] - type Choice<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = - | Choice1Of7 of 'T1 - | Choice2Of7 of 'T2 - | Choice3Of7 of 'T3 - | Choice4Of7 of 'T4 - | Choice5Of7 of 'T5 - | Choice6Of7 of 'T6 - | Choice7Of7 of 'T7 - - //------------------------------------------------------------------------- - // F#-specific Exceptions - - exception Failure of string with - override x.Message = (match (x :> exn) with Failure(s) -> s) - - exception MatchFailure of string * int * int with - override x.Message = (match (x :> exn) with MatchFailure(s,n,m) -> "The match cases were incomplete") - - exception DynamicInvocationNotSupported of string - - //------------------------------------------------------------------------- - // Function Values - - [] - type TypeFunc() = - abstract Specialize<'T> : unit -> obj - - [] - type FastFunc<'T,'Res>() = - abstract Invoke : 'T -> 'Res - - module OptimizedClosures = - - [] - type FastFunc2 <'T,'U,'V>() = - inherit FastFunc<'T,('U -> 'V)>() - abstract Invoke : 'T * 'U -> 'V - override f.Invoke(t) = (fun u -> f.Invoke(t,u)) - static member Adapt(f : 'T -> 'U -> 'V) = - match box f with - | :? FastFunc2 <'T,'U,'V> as f -> f - | _ -> { new FastFunc2<'T,'U,'V>() with - member x.Invoke(t,u) = f t u } - - [] - type FastFunc3<'T,'U,'V,'W>() = - inherit FastFunc<'T,('U -> 'V -> 'W)>() - abstract Invoke : 'T * 'U * 'V -> 'W - override f.Invoke(t) = (fun u v -> f.Invoke(t,u,v)) - static member Adapt(f : 'T -> 'U -> 'V -> 'W) = - match box f with - | :? FastFunc3<'T,'U,'V,'W> as f -> f - | :? FastFunc2<'T,'U,FastFunc<'V,'W>> as f -> - { new FastFunc3<'T,'U,'V,'W>() with - member x.Invoke(t,u,v) = f.Invoke(t,u).Invoke(v) } - | _ -> { new FastFunc3<'T,'U,'V,'W>() with - member x.Invoke(t,u,v) = f t u v } - - [] - type FastFunc4 <'T,'U,'V,'W,'X>() = - inherit FastFunc<'T,('U -> 'V -> 'W -> 'X)>() - abstract Invoke : 'T * 'U * 'V * 'W -> 'X - static member Adapt(f : 'T -> 'U -> 'V -> 'W -> 'X) = - match box f with - | :? FastFunc4<'T,'U,'V,'W,'X> as f -> f - | :? FastFunc3<'T,'U,'V,FastFunc<'W,'X>> as f -> - { new FastFunc4<'T,'U,'V,'W,'X>() with - member x.Invoke(t,u,v,w) = f.Invoke(t,u,v).Invoke(w) } - | :? FastFunc2<'T,'U,FastFunc<'V,FastFunc<'W,'X>>> as f -> - { new FastFunc4<'T,'U,'V,'W,'X>() with - member x.Invoke(t,u,v,w) = f.Invoke(t,u).Invoke(v).Invoke(w) } - | _ -> { new FastFunc4<'T,'U,'V,'W,'X>() with - member x.Invoke(t,u,v,w) = f t u v w } - override f.Invoke(t) = (fun u v w -> f.Invoke(t,u,v,w)) - - [] - type FastFunc5<'T,'U,'V,'W,'X,'Y>() = - inherit FastFunc<'T,('U -> 'V -> 'W -> 'X -> 'Y)>() - abstract Invoke : 'T * 'U * 'V * 'W * 'X -> 'Y - override f.Invoke(t) = (fun u v w x -> f.Invoke(t,u,v,w,x)) - static member Adapt(f : 'T -> 'U -> 'V -> 'W -> 'X -> 'Y) = - match box f with - | :? FastFunc5<'T,'U,'V,'W,'X,'Y> as f -> f - | :? FastFunc4<'T,'U,'V,'W,FastFunc<'X,'Y>> as f -> - { new FastFunc5<'T,'U,'V,'W,'X,'Y>() with - member ff.Invoke(t,u,v,w,x) = f.Invoke(t,u,v,w).Invoke(x) } - | :? FastFunc3<'T,'U,'V,FastFunc<'W,FastFunc<'X,'Y>>> as f -> - { new FastFunc5<'T,'U,'V,'W,'X,'Y>() with - member ff.Invoke(t,u,v,w,x) = f.Invoke(t,u,v).Invoke(w).Invoke(x) } - | :? FastFunc2<'T,'U,FastFunc<'V,FastFunc<'W,FastFunc<'X,'Y>>>> as f -> - { new FastFunc5<'T,'U,'V,'W,'X,'Y>() with - member ff.Invoke(t,u,v,w,x) = f.Invoke(t,u).Invoke(v).Invoke(w).Invoke(x) } - | _ -> { new FastFunc5<'T,'U,'V,'W,'X,'Y>() with - member ff.Invoke(t,u,v,w,x) = f t u v w x } - - let inline invokeFast2((f1 : FastFunc<'T,('U -> 'V)>), t,u) = - match f1 with - | :? FastFunc2<'T,'U,'V> as f2 -> f2.Invoke(t,u) - | _ -> (f1.Invoke(t)) u - - let inline invokeFast3((f1 : FastFunc<'T,('U -> 'V -> 'W)>), t,u,v) = - match f1 with - | :? FastFunc3<'T,'U,'V,'W> as f3 -> f3.Invoke(t,u,v) - | :? FastFunc2<'T,'U,('V -> 'W)> as f2 -> (f2.Invoke(t,u)) v - | _ -> (f1.Invoke(t)) u v - - let inline invokeFast4((f1 : FastFunc<'T,('U -> 'V -> 'W -> 'X)>), t,u,v,w) = - match f1 with - | :? FastFunc4<'T,'U,'V,'W,'X> as f4 -> f4.Invoke(t,u,v,w) - | :? FastFunc3<'T,'U,'V,('W -> 'X)> as f3 -> (f3.Invoke(t,u,v)) w - | :? FastFunc2<'T,'U,('V -> 'W -> 'X)> as f2 -> (f2.Invoke(t,u)) v w - | _ -> (f1.Invoke(t)) u v w - - let inline invokeFast5((f1 : FastFunc<'T,('U -> 'V -> 'W -> 'X -> 'Y)>), t,u,v,w,x) = - match f1 with - | :? FastFunc5<'T,'U,'V,'W,'X,'Y> as f5 -> f5.Invoke(t,u,v,w,x) - | :? FastFunc4<'T,'U,'V,'W,('X -> 'Y)> as f4 -> (f4.Invoke(t,u,v,w)) x - | :? FastFunc3<'T,'U,'V,('W -> 'X -> 'Y)> as f3 -> (f3.Invoke(t,u,v)) w x - | :? FastFunc2<'T,'U,('V -> 'W -> 'X -> 'Y)> as f2 -> (f2.Invoke(t,u)) v w x - | _ -> (f1.Invoke(t)) u v w x - - - type FastFunc<'T,'Res> with - [] - [] - static member op_Implicit(f : System.Converter<_,_>) : ('T -> 'Res) = (fun t -> f.Invoke(t)) - [] - [] - static member op_Implicit( f : ('T -> 'Res) ) = new System.Converter<'T,'Res>(f) - - static member FromConverter(f : System.Converter<_,_>) : ('T -> 'Res) = (fun t -> f.Invoke(t)) - static member ToConverter( f : ('T -> 'Res) ) = new System.Converter<'T,'Res>(f) - - static member InvokeFast(f:FastFunc<_,_>,(t:'T),(u:'Res)) = OptimizedClosures.invokeFast2(f,t,u) - static member InvokeFast(f:FastFunc<_,_>,(t:'T),(u:'Res),v) = OptimizedClosures.invokeFast3(f,t,u,v) - static member InvokeFast(f:FastFunc<_,_>,(t:'T),(u:'Res),v,w) = OptimizedClosures.invokeFast4(f,t,u,v,w) - static member InvokeFast(f:FastFunc<_,_>,(t:'T),(u:'Res),v,w,x) = OptimizedClosures.invokeFast5(f,t,u,v,w,x) - - [] - [] - type FuncConvert = - [] - static member ToFastFunc( f : Action<_>) = (fun t -> f.Invoke(t)) - [] - static member ToFastFunc( f : Converter<_,_>) = (fun t -> f.Invoke(t)) - [] - static member FuncFromTupled (f:'T -> 'Res) = (fun a -> f a) - [] - static member FuncFromTupled (f:'T1 * 'T2 -> 'Res) = (fun a b -> f (a, b)) - [] - static member FuncFromTupled (f:'T1 * 'T2 * 'T3 -> 'Res) = (fun a b c -> f (a, b, c)) - [] - static member FuncFromTupled (f:'T1 * 'T2 * 'T3 * 'T4 -> 'Res) = (fun a b c d -> f (a, b, c, d)) - [] - static member FuncFromTupled (f:'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'Res) = (fun a b c d e-> f (a, b, c, d, e)) - - - - //------------------------------------------------------------------------- - // Refs - //------------------------------------------------------------------------- - - [] - do() - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - type Ref<'T> = - { -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - mutable contents: 'T } - member x.Value - with get() = x.contents - and set v = x.contents <- v - - and 'T ref = Ref<'T> - - //------------------------------------------------------------------------- - // Options - //------------------------------------------------------------------------- - - [] -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - [] - [] - type Option<'T> = - | None : 'T option - | Some : value:'T -> 'T option - - [] - member x.Value = match x with Some x -> x | None -> raise (new System.InvalidOperationException("Option.Value")) - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.IsNone = match x with None -> true | _ -> false - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.IsSome = match x with Some _ -> true | _ -> false - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - static member None : 'T option = None - - static member Some(x) : 'T option = Some(x) - - override x.ToString() = "Some("^x.Value.ToString()^")" - - and 'T option = 'T Option - - - -//============================================================================ -//============================================================================ -namespace Microsoft.FSharp.Collections - - //------------------------------------------------------------------------- - // Lists - //------------------------------------------------------------------------- - - open System.Collections.Generic - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions - open Microsoft.FSharp.Core.BasicInlinedOperations - - [] -#if FX_NO_DEBUG_PROXIES -#else - [>)>] -#endif -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - [] - type FSharpList<'T> = - | ([]) : 'T list - | (::) : _Head: 'T * _Tail: 'T list -> 'T list - interface System.Collections.Generic.IEnumerable<'T> - interface System.Collections.IEnumerable - - and 'T list = FSharpList<'T> - and List<'T> = FSharpList<'T> - - //------------------------------------------------------------------------- - // List (debug view) - //------------------------------------------------------------------------- - - and - ListDebugView<'T>(l:list<'T>) = - - let rec count l n = match l with [] -> n | _::t -> if n > 50 then n else count t (n+1) - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.Items = - let n = count l 0 - let items = zero_create n - let rec copy (items: 'T[]) l i = - match l with - | [] -> () - | h::t -> if i < n then (SetArray items (i,h); copy items t (i+1)) - copy items l 0; - items - - type ResizeArray<'T> = System.Collections.Generic.List<'T> - - //------------------------------------------------------------------------- - // List (augmentation) - //------------------------------------------------------------------------- - - module PrivateListHelpers = - - let notStarted() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext.")) - let alreadyFinished() = raise (new System.InvalidOperationException("Enumeration already finished.")) - let nonempty x = match x with [] -> false | _ -> true - - type ListEnumerator<'T> (s: 'T list) = - let mutable curr = s - let mutable started = false - - member x.GetCurrent() = - if started then - match curr with - | [] -> alreadyFinished() - | h::t -> h - else - notStarted() - - interface IEnumerator<'T> with - member x.Current = x.GetCurrent() - - interface System.Collections.IEnumerator with - member x.MoveNext() = - if started then - match curr with - | h :: t -> (curr <- t; nonempty curr) - | _ -> false - else - (started <- true; nonempty curr) - member x.Current = box (x.GetCurrent()) - member x.Reset() = started <- false; curr <- s - - interface System.IDisposable with - member x.Dispose() = () - - let mkListEnumerator s = (new ListEnumerator<'T>(s) :> IEnumerator<'T>) - - let rec lengthAcc acc l = match l with [] -> acc | h::t -> lengthAcc (acc+1) t - - let rec nth l n = - match l with - | [] -> raise (new System.ArgumentException("the index was outside the range of elements in the list","n")) - | h::t -> - if n < 0 then raise (new System.ArgumentException("the index was negative","n")) - elif n = 0 then h - else nth t (n - 1) - - type FSharpList<'T> with -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member l.Length = PrivateListHelpers.lengthAcc 0 l - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member l.DebugDisplay = - let n = l.Length - let txt = - if n > 1000 then "Length > 1000" - else System.String.Concat( [| "Length = "; n.ToString() |]) - new System.Text.StringBuilder(txt) - - - - member l.Head = match l with a :: b -> a | [] -> raise (System.InvalidOperationException("the list is empty")) - member l.Tail = match l with a :: b -> b | [] -> raise (System.InvalidOperationException("the list is empty")) - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member l.IsCons = match l with [] -> false | _ -> true - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member l.IsEmpty = match l with [] -> true | _ -> false - member l.Item with get(index) = PrivateListHelpers.nth l index - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - static member Empty : 'T list = [] - - static member Cons(head,tail) : 'T list = head::tail - - interface IEnumerable<'T> with - member l.GetEnumerator() = PrivateListHelpers.mkListEnumerator l - - interface System.Collections.IEnumerable with - member l.GetEnumerator() = (PrivateListHelpers.mkListEnumerator l :> System.Collections.IEnumerator) - - type seq<'T> = IEnumerable<'T> - - -//------------------------------------------------------------------------- -// Operators -//------------------------------------------------------------------------- - - -namespace Microsoft.FSharp.Core - - open System - open System.Diagnostics - open System.Collections.Generic - open System.Globalization - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions - open Microsoft.FSharp.Core.BasicInlinedOperations - open Microsoft.FSharp.Collections - - - - [] - module Operators = - - [] - let seq x = x (* temp addition for comprehension/workflow transitions *) - - [] - let inline unbox (x:obj) = UnboxGeneric(x) - - [] - let inline box (x:'T) = (# "box !0" type ('T) x : obj #) - - [] - let raise (e: exn) = (# "throw" e : 'T #) - - - [] - let inline not (b:bool) = (# "ceq" b false : bool #) - - - [] - let inline objEq (xobj:obj) (yobj:obj) = (# "ceq" xobj yobj : bool #) - - - let inline (<) x y = GenericLessThan x y - let inline (>) x y = GenericGreaterThan x y - let inline (>=) x y = GenericGreaterOrEqual x y - let inline (<=) x y = GenericLessOrEqual x y - let inline (=) x y = GenericEquality x y - let inline (<>) x y = not (GenericEquality x y) - - [] - let inline compare (x:'T) (y:'T) = GenericComparison x y - - [] - let inline max x y = GenericMaximum x y - - [] - let inline min x y = GenericMinimum x y - - -(* - [] - let ``assert`` (b) = System.Diagnostics.Debug.Assert(b) -*) - - [] - let failwith s = raise (Failure(s)) - - let InvalidArgument message = (new ArgumentException(message:string) :> exn) - - type InvalidArgumentException = ArgumentException - - let (|InvalidArgument|_|) (exn:exn) = match exn with :? ArgumentException as e -> Some(e.Message) | _ -> None - - - [] - let invalid_arg message = raise (InvalidArgument(message)) - - [] - let invalidArg (arg:string) (msg:string) = raise (new System.ArgumentException(msg,arg)) - - [] - let nullArg (arg:string) = raise (new System.ArgumentNullException(arg)) - - [] - let invalidOp s = raise (System.InvalidOperationException(s)) - - [] - let invalid_op s = raise (System.InvalidOperationException(s)) - - [] - let not_found() = raise (new KeyNotFoundException("The item, key or index was not found in the collection")) - - [] - [] - let inline rethrow() = unbox<_>(# "rethrow ldnull" : System.Object #) - - - [] - let fst (a,b) = a - - [] - let snd (a,b) = b - - [] - let ignore x = () - - [] - let ref x = { contents = x } - - let (:=) x y = x.contents <- y - - let (!) x = x.contents - - let inline (|>) x f = f x - - let inline (||>) (x1,x2) f = f x1 x2 - - let inline (|||>) (x1,x2,x3) f = f x1 x2 x3 - - let inline (<|) f x = f x - - let inline (<||) f (x1,x2) = f x1 x2 - - let inline (<|||) f (x1,x2,x3) = f x1 x2 x3 - - let inline (>>) f g x = g(f x) - - let inline (<<) f g x = f(g x) - - let (^) (x:string) (y:string) = System.String.Concat(x,y) - - - [] - let defaultArg x y = match x with None -> y | Some v -> v - - - let inline (~-) (x: ^T) : ^T = - (^T : (static member (~-) : ^T -> ^T) (x)) - when ^T : int32 = (# "neg" x : int32 #) - when ^T : float = (# "neg" x : float #) - when ^T : float32 = (# "neg" x : float32 #) - when ^T : int64 = (# "neg" x : int64 #) - when ^T : int16 = (# "neg" x : int16 #) - when ^T : nativeint = (# "neg" x : nativeint #) - when ^T : sbyte = (# "neg" x : sbyte #) - when ^T : decimal = (# "" (System.Decimal.op_UnaryNegation((# "" x : decimal #))) : ^T #) - - - let inline (+) (x: ^T) (y: ^U) : ^V = - AdditionDynamic<(^T),(^U),(^V)> x y - when ^T : int32 and ^U : int32 = (# "add" x y : int32 #) - when ^T : float and ^U : float = (# "add" x y : float #) - when ^T : float32 and ^U : float32 = (# "add" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "add" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "add" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "add" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "add" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "add" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.i2" (# "add" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.u2" (# "add" x y : uint32 #) : uint16 #) - when ^T : char and ^U : char = (# "conv.u2" (# "add" x y : uint32 #) : char #) - when ^T : sbyte and ^U : sbyte = (# "conv.i1" (# "add" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.u1" (# "add" x y : uint32 #) : byte #) - when ^T : string and ^U : string = (# "" (System.String.Concat((# "" x : string #),(# "" y : string #))) : ^T #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Addition((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - // That is, not in the generic implementation of '+' - when ^T : ^T = ((^T or ^U): (static member (+) : ^T * ^U -> ^V) (x,y)) - - let inline (-) (x: ^T) (y: ^U) : ^V = - ((^T or ^U): (static member (-) : ^T * ^U -> ^V) (x,y)) - when ^T : int32 and ^U : int32 = (# "sub" x y : int32 #) - when ^T : float and ^U : float = (# "sub" x y : float #) - when ^T : float32 and ^U : float32 = (# "sub" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "sub" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "sub" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "sub" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "sub" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "sub" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.i2" (# "sub" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.u2" (# "sub" x y : uint32 #) : uint16 #) - when ^T : sbyte and ^U : sbyte = (# "conv.i1" (# "sub" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.u1" (# "sub" x y : uint32 #) : byte #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Subtraction((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - - - let inline ( * ) (x: ^T) (y: ^U) : ^V = - MultiplyDynamic<(^T),(^U),(^V)> x y - when ^T : int32 and ^U : int32 = (# "mul" x y : int32 #) - when ^T : float and ^U : float = (# "mul" x y : float #) - when ^T : float32 and ^U : float32 = (# "mul" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "mul" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "mul" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "mul" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "mul" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "mul" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.i2" (# "mul" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.u2" (# "mul" x y : uint32 #) : uint16 #) - when ^T : sbyte and ^U : sbyte = (# "conv.i1" (# "mul" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.u1" (# "mul" x y : uint32 #) : byte #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Multiply((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - // That is, not in the generic implementation of '*' - when ^T : ^T = ((^T or ^U): (static member (*) : ^T * ^U -> ^V) (x,y)) - - let inline ( / ) (x: ^T) (y: ^U) : ^V = - ((^T or ^U): (static member (/) : ^T * ^U -> ^V) (x,y)) - when ^T : int32 and ^U : int32 = (# "div" x y : int32 #) - when ^T : float and ^U : float = (# "div" x y : float #) - when ^T : float32 and ^U : float32 = (# "div" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "div" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "div.un" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "div.un" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "div" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "div.un" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.i2" (# "div" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.u2" (# "div.un" x y : uint32 #) : uint16 #) - when ^T : sbyte and ^U : sbyte = (# "conv.i1" (# "div" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.u1" (# "div.un" x y : uint32 #) : byte #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Division((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - - let inline ( % ) (x: ^T) (y: ^U) : ^V = - ((^T or ^U): (static member (%) : ^T * ^U -> ^V) (x,y)) - when ^T : int32 and ^U : int32 = (# "rem" x y : int32 #) - when ^T : float and ^U : float = (# "rem" x y : float #) - when ^T : float32 and ^U : float32 = (# "rem" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "rem" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "rem.un" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "rem.un" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "rem" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "rem.un" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.i2" (# "rem" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.u2" (# "rem.un" x y : uint32 #) : uint16 #) - when ^T : sbyte and ^U : sbyte = (# "conv.i1" (# "rem" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.u1" (# "rem.un" x y : uint32 #) : byte #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Modulus((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - - let inline (~+) (x: ^T) : ^T = - (^T: (static member (~+) : ^T -> ^T) (x)) - when ^T : int32 = x - when ^T : float = x - when ^T : float32 = x - when ^T : int64 = x - when ^T : uint64 = x - when ^T : uint32 = x - when ^T : int16 = x - when ^T : uint16 = x - when ^T : nativeint = x - when ^T : unativeint = x - when ^T : sbyte = x - when ^T : byte = x - when ^T : decimal = x - - let inline mask (n:int) (m:int) = (# "and" n m : int #) - let inline (<<<) (x: ^T) (n:int) : ^T = - (^T: (static member (<<<) : ^T * int -> ^T) (x,n)) - when ^T : int32 = (# "shl" x (mask n 31) : int #) - when ^T : uint32 = (# "shl" x (mask n 31) : uint32 #) - when ^T : int64 = (# "shl" x (mask n 63) : int64 #) - when ^T : uint64 = (# "shl" x (mask n 63) : uint64 #) - when ^T : nativeint = (# "shl" x n : nativeint #) - when ^T : unativeint = (# "shl" x n : unativeint #) - when ^T : int16 = (# "conv.i2" (# "shl" x (mask n 15) : int32 #) : int16 #) - when ^T : uint16 = (# "conv.u2" (# "shl" x (mask n 15) : uint32 #) : uint16 #) - when ^T : sbyte = (# "conv.i1" (# "shl" x (mask n 7 ) : int32 #) : sbyte #) - when ^T : byte = (# "conv.u1" (# "shl" x (mask n 7 ) : uint32 #) : byte #) - - let inline (>>>) (x: ^T) (n:int) : ^T = - (^T: (static member (>>>) : ^T * int -> ^T) (x,n)) - when ^T : int32 = (# "shr" x (mask n 31) : int32 #) - when ^T : uint32 = (# "shr.un" x (mask n 31) : uint32 #) - when ^T : int64 = (# "shr" x (mask n 63) : int64 #) - when ^T : uint64 = (# "shr.un" x (mask n 63) : uint64 #) - when ^T : nativeint = (# "shr" x n : nativeint #) - when ^T : unativeint = (# "shr.un" x n : unativeint #) - when ^T : int16 = (# "conv.i2" (# "shr" x (mask n 15) : int32 #) : int16 #) - when ^T : uint16 = (# "conv.u2" (# "shr.un" x (mask n 15) : uint32 #) : uint16 #) - when ^T : sbyte = (# "conv.i1" (# "shr" x (mask n 7 ) : int32 #) : sbyte #) - when ^T : byte = (# "conv.u1" (# "shr.un" x (mask n 7 ) : uint32 #) : byte #) - - let inline (&&&) (x: ^T) (y: ^T) : ^T = - (^T: (static member (&&&) : ^T * ^T -> ^T) (x,y)) - when ^T : int32 = (# "and" x y : int32 #) - when ^T : int64 = (# "and" x y : int64 #) - when ^T : uint64 = (# "and" x y : uint64 #) - when ^T : uint32 = (# "and" x y : uint32 #) - when ^T : int16 = (# "and" x y : int16 #) - when ^T : uint16 = (# "and" x y : uint16 #) - when ^T : nativeint = (# "and" x y : nativeint #) - when ^T : unativeint = (# "and" x y : unativeint #) - when ^T : sbyte = (# "and" x y : sbyte #) - when ^T : byte = (# "and" x y : byte #) - - let inline (|||) (x: ^T) (y: ^T) : ^T = - (^T: (static member (|||) : ^T * ^T -> ^T) (x,y)) - when ^T : int32 = (# "or" x y : int32 #) - when ^T : int64 = (# "or" x y : int64 #) - when ^T : uint64 = (# "or" x y : uint64 #) - when ^T : uint32 = (# "or" x y : uint32 #) - when ^T : int16 = (# "or" x y : int16 #) - when ^T : uint16 = (# "or" x y : uint16 #) - when ^T : nativeint = (# "or" x y : nativeint #) - when ^T : unativeint = (# "or" x y : unativeint #) - when ^T : sbyte = (# "or" x y : sbyte #) - when ^T : byte = (# "or" x y : byte #) - - let inline (^^^) (x: ^T) (y: ^T) : ^T = - (^T: (static member (^^^) : ^T * ^T -> ^T) (x,y)) - when ^T : int32 = (# "xor" x y : int32 #) - when ^T : int64 = (# "xor" x y : int64 #) - when ^T : uint64 = (# "xor" x y : uint64 #) - when ^T : uint32 = (# "xor" x y : uint32 #) - when ^T : int16 = (# "xor" x y : int16 #) - when ^T : uint16 = (# "xor" x y : uint16 #) - when ^T : nativeint = (# "xor" x y : nativeint #) - when ^T : unativeint = (# "xor" x y : unativeint #) - when ^T : sbyte = (# "xor" x y : sbyte #) - when ^T : byte = (# "xor" x y : byte #) - - let inline (~~~) (x: ^T) : ^T = - (^T: (static member (~~~) : ^T -> ^T) (x)) - when ^T : int32 = (# "not" x : int32 #) - when ^T : int64 = (# "not" x : int64 #) - when ^T : uint64 = (# "not" x : uint64 #) - when ^T : uint32 = (# "not" x : uint32 #) - when ^T : nativeint = (# "not" x : nativeint #) - when ^T : unativeint = (# "not" x : unativeint #) - when ^T : int16 = (# "conv.i2" (# "not" x : int32 #) : int16 #) - when ^T : uint16 = (# "conv.u2" (# "not" x : uint32 #) : uint16 #) - when ^T : sbyte = (# "conv.i1" (# "not" x : int32 #) : sbyte #) - when ^T : byte = (# "conv.u1" (# "not" x : uint32 #) : byte #) - - let inline castToString (x:'T) = (# "" x : string #) // internal - - let nonempty x = match x with [] -> false | _ -> true - - // optimized mutation-based implementation. This code is only valid in fslib, where mutation of private - // tail cons cells is permitted in carefully written library code. - let setFreshConsTail cons t = - cons.(::).1 <- t - - // Return the last cons it the chain - let rec appendToFreshConsTail cons xs = - match xs with - | [] -> cons - | h::t -> - let cons2 = [h] - setFreshConsTail cons cons2 - appendToFreshConsTail cons2 t - - // let rec (@) x y = match x with [] -> y | (h::t) -> h :: (t @ y) - let (@) l1 l2 = - match l1 with - | [] -> l2 - | (h::t) -> - match l2 with - | [] -> l1 - | _ -> - let res = [h] - let cons = appendToFreshConsTail res t - setFreshConsTail cons l2; - res - - - [] - let incr x = x.contents <- x.contents + 1 - - [] - let decr x = x.contents <- x.contents - 1 -#if FX_NO_EXIT -#else - [] - let exit (n:int) = System.Environment.Exit(n); failwith "System.Environment.Exit did not exit!" -#endif - let inline byte_of_string (s:string) = (# "conv.ovf.u1" (ParseUInt32 s) : byte #) - let inline sbyte_of_string (s:string) = (# "conv.ovf.i1" (ParseInt32 s) : sbyte #) - let inline int16_of_string (s:string) = (# "conv.ovf.i2" (ParseInt32 s) : int16 #) - let inline uint16_of_string (s:string) = (# "conv.ovf.u2" (ParseUInt32 s) : uint16 #) - let inline nativeint_of_string (s:string) = (# "conv.ovf.i" (ParseInt64 s) : nativeint #) - let inline unativeint_of_string (s:string) = (# "conv.ovf.u" (ParseInt64 s) : unativeint #) - - let inline float_of_string (s:string) = Double.Parse(s,NumberStyles.Float, CultureInfo.InvariantCulture) - - let inline float32_of_string (s:string) = Single.Parse(s,NumberStyles.Float, CultureInfo.InvariantCulture) - - - [] - let inline byte (x: ^T) = - (^T : (static member ToByte: ^T -> byte) (x)) - when ^T : string = byte_of_string (castToString x) - when ^T : float = (# "conv.u1" x : byte #) - when ^T : float32 = (# "conv.u1" x : byte #) - when ^T : int64 = (# "conv.u1" x : byte #) - when ^T : int32 = (# "conv.u1" x : byte #) - when ^T : int16 = (# "conv.u1" x : byte #) - when ^T : nativeint = (# "conv.u1" x : byte #) - when ^T : sbyte = (# "conv.u1" x : byte #) - when ^T : uint64 = (# "conv.u1" x : byte #) - when ^T : uint32 = (# "conv.u1" x : byte #) - when ^T : uint16 = (# "conv.u1" x : byte #) - when ^T : char = (# "conv.u1" x : byte #) - when ^T : unativeint = (# "conv.u1" x : byte #) - when ^T : byte = (# "conv.u1" x : byte #) - - - [] - let inline sbyte (x: ^T) = - (^T : (static member ToSByte: ^T -> sbyte) (x)) - when ^T : string = sbyte_of_string (castToString x) - when ^T : float = (# "conv.i1" x : sbyte #) - when ^T : float32 = (# "conv.i1" x : sbyte #) - when ^T : int64 = (# "conv.i1" x : sbyte #) - when ^T : int32 = (# "conv.i1" x : sbyte #) - when ^T : int16 = (# "conv.i1" x : sbyte #) - when ^T : nativeint = (# "conv.i1" x : sbyte #) - when ^T : sbyte = (# "conv.i1" x : sbyte #) - when ^T : uint64 = (# "conv.i1" x : sbyte #) - when ^T : uint32 = (# "conv.i1" x : sbyte #) - when ^T : uint16 = (# "conv.i1" x : sbyte #) - when ^T : char = (# "conv.i1" x : sbyte #) - when ^T : unativeint = (# "conv.i1" x : sbyte #) - when ^T : byte = (# "conv.i1" x : sbyte #) - - - [] - let inline uint16 (x: ^T) = - (^T : (static member ToUInt16: ^T -> uint16) (x)) - when ^T : string = uint16_of_string (castToString x) - when ^T : float = (# "conv.u2" x : uint16 #) - when ^T : float32 = (# "conv.u2" x : uint16 #) - when ^T : int64 = (# "conv.u2" x : uint16 #) - when ^T : int32 = (# "conv.u2" x : uint16 #) - when ^T : int16 = (# "conv.u2" x : uint16 #) - when ^T : nativeint = (# "conv.u2" x : uint16 #) - when ^T : sbyte = (# "conv.u2" x : uint16 #) - when ^T : uint64 = (# "conv.u2" x : uint16 #) - when ^T : uint32 = (# "conv.u2" x : uint16 #) - when ^T : uint16 = (# "conv.u2" x : uint16 #) - when ^T : char = (# "conv.u2" x : uint16 #) - when ^T : unativeint = (# "conv.u2" x : uint16 #) - when ^T : byte = (# "conv.u2" x : uint16 #) - - - [] - let inline int16 (x: ^T) = - (^T : (static member ToInt16: ^T -> int16) (x)) - when ^T : string = int16_of_string (castToString x) - when ^T : float = (# "conv.i2" x : int16 #) - when ^T : float32 = (# "conv.i2" x : int16 #) - when ^T : int64 = (# "conv.i2" x : int16 #) - when ^T : int32 = (# "conv.i2" x : int16 #) - when ^T : int16 = (# "conv.i2" x : int16 #) - when ^T : nativeint = (# "conv.i2" x : int16 #) - when ^T : sbyte = (# "conv.i2" x : int16 #) - when ^T : uint64 = (# "conv.i2" x : int16 #) - when ^T : uint32 = (# "conv.i2" x : int16 #) - when ^T : uint16 = (# "conv.i2" x : int16 #) - when ^T : char = (# "conv.i2" x : int16 #) - when ^T : unativeint = (# "conv.i2" x : int16 #) - when ^T : byte = (# "conv.i2" x : int16 #) - - - [] - let inline uint32 (x: ^T) = - (^T : (static member ToUInt32: ^T -> uint32) (x)) - when ^T : string = ParseUInt32 (castToString x) - when ^T : float = (# "conv.u4" x : uint32 #) - when ^T : float32 = (# "conv.u4" x : uint32 #) - - when ^T : int64 = (# "conv.u4" x : uint32 #) - when ^T : nativeint = (# "conv.u4" x : uint32 #) - - // For integers shorter that 32 bits, we must first - // sign-widen the signed integer to 32 bits, and then - // "convert" from signed int32 to unsigned int32 - // This is a no-op on IL stack (ECMA 335 Part III 1.5 Tables 8 & 9) - when ^T : int32 = (# "" x : uint32 #) - when ^T : int16 = (# "" x : uint32 #) - when ^T : sbyte = (# "" x : uint32 #) - - - when ^T : uint64 = (# "conv.u4" x : uint32 #) - when ^T : uint32 = (# "conv.u4" x : uint32 #) - when ^T : uint16 = (# "conv.u4" x : uint32 #) - when ^T : char = (# "conv.u4" x : uint32 #) - when ^T : unativeint = (# "conv.u4" x : uint32 #) - when ^T : byte = (# "conv.u4" x : uint32 #) - - - [] - let inline int32 (x: ^T) = - (^T : (static member ToInt32: ^T -> int32) (x)) - when ^T : string = ParseInt32 (castToString x) - when ^T : float = (# "conv.i4" x : int32 #) - when ^T : float32 = (# "conv.i4" x : int32 #) - when ^T : int64 = (# "conv.i4" x : int32 #) - when ^T : nativeint = (# "conv.i4" x : int32 #) - - // For integers shorter that 32 bits, we sign-widen the signed integer to 32 bits - // This is a no-op on IL stack (ECMA 335 Part III 1.5 Tables 8 & 9) - when ^T : int32 = (# "" x : int32 #) - when ^T : int16 = (# "" x : int32 #) - when ^T : sbyte = (# "" x : int32 #) - - when ^T : uint64 = (# "conv.i4" x : int32 #) - when ^T : uint32 = (# "" x : int32 #) // Signed<->Unsigned conversion is a no-op on IL stack - when ^T : uint16 = (# "conv.i4" x : int32 #) - when ^T : char = (# "conv.i4" x : int32 #) - when ^T : unativeint = (# "conv.i4" x : int32 #) - when ^T : byte = (# "conv.i4" x : int32 #) - - - [] - - [] - let inline int x = int32 x - - - [] - let inline enum< ^T when ^T : enum > (x:int32) : ^T = EnumOfValue x - - let ( |KeyValue| ) (kvp : KeyValuePair<'T,'U>) = (kvp.Key, kvp.Value) - - - [] - let infinity = System.Double.PositiveInfinity - - [] - let nan = System.Double.NaN - - [] - let infinityf = System.Single.PositiveInfinity - - [] - let nanf = System.Single.NaN - - //let max_float = System.Double.MaxValue - //let min_float = 0x0010000000000000LF - //let epsilon_float = 0x3CB0000000000000LF // Int64.float_of_bits 4372995238176751616L - - - [] - let inline uint64 (x: ^T) = - (^T : (static member ToUInt64: ^T -> uint64) (x)) - when ^T : string = ParseUInt64 (castToString x) - when ^T : float = (# "conv.u8" x : uint64 #) - when ^T : float32 = (# "conv.u8" x : uint64 #) - - // we must first sign-widen the signed integer to 64 bits, and then - // "convert" from signed int64 to unsigned int64 - // conv.i8 sign-widens the input, and on IL stack, - // conversion from signed to unsigned is a no-op (ECMA 335 Part III 1.5 Table 8) - when ^T : int64 = (# "" x : uint64 #) - when ^T : int32 = (# "conv.i8" x : uint64 #) - when ^T : int16 = (# "conv.i8" x : uint64 #) - when ^T : nativeint = (# "conv.i8" x : uint64 #) - when ^T : sbyte = (# "conv.i8" x : uint64 #) - - - when ^T : uint64 = (# "" x : uint64 #) - when ^T : uint32 = (# "conv.u8" x : uint64 #) - when ^T : uint16 = (# "conv.u8" x : uint64 #) - when ^T : char = (# "conv.u8" x : uint64 #) - when ^T : unativeint = (# "conv.u8" x : uint64 #) - when ^T : byte = (# "conv.u8" x : uint64 #) - - - [] - let inline int64 (x: ^T) = - (^T : (static member ToInt64: ^T -> int64) (x)) - when ^T : string = ParseInt64 (castToString x) - when ^T : float = (# "conv.i8" x : int64 #) - when ^T : float32 = (# "conv.i8" x : int64 #) - when ^T : int64 = (# "conv.i8" x : int64 #) - when ^T : int32 = (# "conv.i8" x : int64 #) - when ^T : int16 = (# "conv.i8" x : int64 #) - when ^T : nativeint = (# "conv.i8" x : int64 #) - when ^T : sbyte = (# "conv.i8" x : int64 #) - - // When converting unsigned integer, we should zero-widen them, NOT sign-widen - // No-op for uint64, conv.u8 for uint32, for smaller types conv.u8 and conv.i8 are identical. - // For nativeint, conv.u8 works correctly both in 32 bit and 64 bit case. - when ^T : uint64 = (# "" x : int64 #) - when ^T : uint32 = (# "conv.u8" x : int64 #) - when ^T : uint16 = (# "conv.u8" x : int64 #) - when ^T : char = (# "conv.u8" x : int64 #) - when ^T : unativeint = (# "conv.u8" x : int64 #) - when ^T : byte = (# "conv.u8" x : int64 #) - - - [] - [] - let inline float32 (x: ^T) = - (^T : (static member ToSingle : ^T -> float32) (x)) - when ^T : string = float32_of_string (castToString x) - when ^T : float = (# "conv.r4" x : float32 #) - when ^T : float32 = (# "" x : float32 #) - when ^T : int64 = (# "conv.r4" x : float32 #) - when ^T : int32 = (# "conv.r4" x : float32 #) - when ^T : int16 = (# "conv.r4" x : float32 #) - when ^T : nativeint = (# "conv.r4" x : float32 #) - when ^T : sbyte = (# "conv.r4" x : float32 #) - when ^T : uint64 = (# "conv.r.un conv.r4" x : float32 #) - when ^T : uint32 = (# "conv.r.un conv.r4" x : float32 #) - when ^T : uint16 = (# "conv.r.un conv.r4" x : float32 #) - when ^T : char = (# "conv.r.un conv.r4" x : float32 #) - when ^T : unativeint = (# "conv.r.un conv.r4" x : float32 #) - when ^T : byte = (# "conv.r.un conv.r4" x : float32 #) - - - [] - [] - let inline float (x: ^T) = - (^T : (static member ToDouble : ^T -> float) (x)) - when ^T : string = float_of_string (castToString x) - when ^T : float = (# "" x : float #) - when ^T : float32 = (# "conv.r8" x : float #) - when ^T : int64 = (# "conv.r8" x : float #) - when ^T : int32 = (# "conv.r8" x : float #) - when ^T : int16 = (# "conv.r8" x : float #) - when ^T : nativeint = (# "conv.r8" x : float #) - when ^T : sbyte = (# "conv.r8" x : float #) - when ^T : uint64 = (# "conv.r.un conv.r8" x : float #) - when ^T : uint32 = (# "conv.r.un conv.r8" x : float #) - when ^T : uint16 = (# "conv.r.un conv.r8" x : float #) - when ^T : char = (# "conv.r.un conv.r8" x : float #) - when ^T : unativeint = (# "conv.r.un conv.r8" x : float #) - when ^T : byte = (# "conv.r.un conv.r8" x : float #) - when ^T : decimal = (System.Convert.ToDouble((# "" x : decimal #))) - - - [] - let inline decimal (x: ^T) = - (^T : (static member ToDecimal : ^T -> decimal) (x)) - when ^T : string = (System.Decimal.Parse(castToString x,NumberStyles.Float,CultureInfo.InvariantCulture)) - when ^T : float = (System.Convert.ToDecimal((# "" x : float #))) - when ^T : float32 = (System.Convert.ToDecimal((# "" x : float32 #))) - when ^T : int64 = (System.Convert.ToDecimal((# "" x : int64 #))) - when ^T : int32 = (System.Convert.ToDecimal((# "" x : int32 #))) - when ^T : int16 = (System.Convert.ToDecimal((# "" x : int16 #))) - when ^T : nativeint = (System.Convert.ToDecimal(int64 (# "" x : nativeint #))) - when ^T : sbyte = (System.Convert.ToDecimal((# "" x : sbyte #))) - when ^T : uint64 = (System.Convert.ToDecimal((# "" x : uint64 #))) - when ^T : uint32 = (System.Convert.ToDecimal((# "" x : uint32 #))) - when ^T : uint16 = (System.Convert.ToDecimal((# "" x : uint16 #))) - when ^T : unativeint = (System.Convert.ToDecimal(uint64 (# "" x : unativeint #))) - when ^T : byte = (System.Convert.ToDecimal((# "" x : byte #))) - when ^T : decimal = (# "" x : decimal #) - - // Recall type names. - // Framework names: sbyte, byte, int16, uint16, int32, uint32, int64, uint64, single, double. - // C# names: sbyte, byte, short, ushort, int, uint, long, ulong, single, double. - // F# names: sbyte, byte, int16, uint16, int, uint32, int64, uint64, float32, float. - // Systematic names: int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64. - - // The names float/float32 are being migrated to double/single - - [] - let inline single x = float32 x - - [] - let inline double x = float x - - - [] - let inline unativeint (x: ^T) = - (^T : (static member ToUIntPtr: ^T -> unativeint) (x)) - when ^T : string = unativeint_of_string (castToString x) - when ^T : float = (# "conv.u" x : unativeint #) - when ^T : float32 = (# "conv.u" x : unativeint #) - - // Narrower signed types we sign-extend. - // Same length signed types we leave as such (so -1 gets reinterpreted as unsigned MaxValue). - // Wider signed types we truncate. - // conv.i does just that for both 32 and 64 bit case of nativeint, and conversion from nativeint is no-op. - when ^T : int64 = (# "conv.i" x : unativeint #) - when ^T : int32 = (# "conv.i" x : unativeint #) - when ^T : int16 = (# "conv.i" x : unativeint #) - when ^T : nativeint = (# "" x : unativeint #) - when ^T : sbyte = (# "conv.i" x : unativeint #) - - when ^T : uint64 = (# "conv.u" x : unativeint #) - when ^T : uint32 = (# "conv.u" x : unativeint #) - when ^T : uint16 = (# "conv.u" x : unativeint #) - when ^T : char = (# "conv.u" x : unativeint #) - when ^T : unativeint = (# "" x : unativeint #) - when ^T : byte = (# "conv.u" x : unativeint #) - - - [] - let inline nativeint (x: ^T) = - (^T : (static member ToIntPtr: ^T -> nativeint) (x)) - when ^T : string = nativeint_of_string (castToString x) - when ^T : float = (# "conv.i" x : nativeint #) - when ^T : float32 = (# "conv.i" x : nativeint #) - - when ^T : int64 = (# "conv.i" x : nativeint #) - when ^T : int32 = (# "conv.i" x : nativeint #) - when ^T : int16 = (# "conv.i" x : nativeint #) - when ^T : nativeint = (# "conv.i" x : nativeint #) - when ^T : sbyte = (# "conv.i" x : nativeint #) - - // Narrower unsigned types we zero-extend. - // Same length unsigned types we leave as such (so unsigned MaxValue (all-bits-set) gets reinterpreted as -1). - // Wider unsigned types we truncate. - // conv.u does just that for both 32- and 64-bit-wide nativeint, and conversion from unativeint is no-op. - when ^T : uint64 = (# "conv.u" x : nativeint #) - when ^T : uint32 = (# "conv.u" x : nativeint #) - when ^T : uint16 = (# "conv.u" x : nativeint #) - when ^T : char = (# "conv.u" x : nativeint #) - when ^T : unativeint = (# "" x : nativeint #) - when ^T : byte = (# "conv.i" x : nativeint #) - - - [] - let inline string (x: ^T) = - match box x with - | :? System.IFormattable as f -> f.ToString("g",CultureInfo.InvariantCulture) - | obj -> obj.ToString() - when ^T : float = (# "" x : float #).ToString("g",CultureInfo.InvariantCulture) - when ^T : float32 = (# "" x : float32 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : int64 = (# "" x : int64 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : int32 = (# "" x : int32 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : int16 = (# "" x : int16 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : nativeint = (# "" x : nativeint #).ToString() - when ^T : sbyte = (# "" x : sbyte #).ToString("g",CultureInfo.InvariantCulture) - when ^T : uint64 = (# "" x : uint64 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : uint32 = (# "" x : uint32 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : int16 = (# "" x : int16 #).ToString("g",CultureInfo.InvariantCulture) - when ^T : unativeint = (# "" x : unativeint #).ToString() - when ^T : byte = (# "" x : byte #).ToString("g",CultureInfo.InvariantCulture) - - - [] - let inline char (x: ^T) = - (^T : (static member ToChar: ^T -> char) (x)) -#if FX_NO_CHAR_PARSE - when ^T : string = (castToString x).[0] -#else - when ^T : string = (System.Char.Parse(castToString x)) -#endif - when ^T : float = (# "conv.u2" x : char #) - when ^T : float32 = (# "conv.u2" x : char #) - when ^T : int64 = (# "conv.u2" x : char #) - when ^T : int32 = (# "conv.u2" x : char #) - when ^T : int16 = (# "conv.u2" x : char #) - when ^T : nativeint = (# "conv.u2" x : char #) - when ^T : sbyte = (# "conv.u2" x : char #) - when ^T : uint64 = (# "conv.u2" x : char #) - when ^T : uint32 = (# "conv.u2" x : char #) - when ^T : uint16 = (# "conv.u2" x : char #) - when ^T : char = (# "conv.u2" x : char #) - when ^T : unativeint = (# "conv.u2" x : char #) - when ^T : byte = (# "conv.u2" x : char #) - - - module Attributes = - open System.Runtime.CompilerServices - -#if FX_NO_DEFAULT_DEPENDENCY_TYPE -#else - [] - [] -#endif - [] - [] - -#if BE_SECURITY_TRANSPARENT - [] // assembly is fully transparent - [] // v4 transparency; soon to be the default, but not yet -#else -#if FX_NO_SECURITY_PERMISSIONS -#else -#if FX_SIMPLE_SECURITY_PERMISSIONS - [] -#else - [] - [] -#endif -#endif -#endif - do () - - - [] - let inline lock (lockobj : 'T when 'T : not struct) f = - System.Threading.Monitor.Enter(lockobj); - try f() - finally - System.Threading.Monitor.Exit(lockobj) - - - [] - let using (ie : 'T when 'T :> System.IDisposable) f = - try f(ie) - finally match (box ie) with null -> () | _ -> ie.Dispose() - - - [] - let inline typeof<'T> = BasicInlinedOperations.typeof<'T> - - - [] - let inline typedefof<'T> = BasicInlinedOperations.typedefof<'T> - - - [] - let inline sizeof<'T> = BasicInlinedOperations.sizeof<'T> - - - [] - let inline hash (x: 'T) = LanguagePrimitives.GenericHash x - - [] - let inline limitedHash (limit:int) (x: 'T) = LanguagePrimitives.GenericLimitedHash limit x - - - [] - let id x = x - - // std* are TypeFunctions with the effect of reading the property on instantiation. - // So, direct uses of stdout should capture the current System.Console.Out at that point. - [] - let stdin<'T> = System.Console.In - - [] - let stdout<'T> = System.Console.Out - - [] - let stderr<'T> = System.Console.Error - - - let inline defaultof<'T> = unsafeDefault<'T> - - - module Unchecked = - - [] - let inline defaultof<'T> = unsafeDefault<'T> - - module Checked = - - let inline (+) (x: ^T) (y: ^U) : ^V = - CheckedAdditionDynamic<(^T),(^U),(^V)> x y - when ^T : int32 and ^U : int32 = (# "add.ovf" x y : int32 #) - when ^T : float and ^U : float = (# "add" x y : float #) - when ^T : float32 and ^U : float32 = (# "add" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "add.ovf" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "add.ovf.un" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "add.ovf.un" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "add.ovf" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "add.ovf.un" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.ovf.i2" (# "add.ovf" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.ovf.u2.un" (# "add.ovf.un" x y : uint32 #) : uint16 #) - when ^T : char and ^U : char = (# "conv.ovf.u2.un" (# "add.ovf.un" x y : uint32 #) : char #) - when ^T : sbyte and ^U : sbyte = (# "conv.ovf.i1" (# "add.ovf" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.ovf.u1.un" (# "add.ovf.un" x y : uint32 #) : byte #) - when ^T : string and ^U : string = (# "" (System.String.Concat((# "" x : string #),(# "" y : string #))) : ^T #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Addition((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - // That is, not in the generic implementation of '+' - when ^T : ^T = ((^T or ^U): (static member (+) : ^T * ^U -> ^V) (x,y)) - - let inline (-) (x: ^T) (y: ^U) : ^V = - ((^T or ^U): (static member (-) : ^T * ^U -> ^V) (x,y)) - when ^T : int32 and ^U : int32 = (# "sub.ovf" x y : int32 #) - when ^T : float and ^U : float = (# "sub" x y : float #) - when ^T : float32 and ^U : float32 = (# "sub" x y : float32 #) - when ^T : int64 and ^U : int64 = (# "sub.ovf" x y : int64 #) - when ^T : uint64 and ^U : uint64 = (# "sub.ovf.un" x y : uint64 #) - when ^T : uint32 and ^U : uint32 = (# "sub.ovf.un" x y : uint32 #) - when ^T : nativeint and ^U : nativeint = (# "sub.ovf" x y : nativeint #) - when ^T : unativeint and ^U : unativeint = (# "sub.ovf.un" x y : unativeint #) - when ^T : int16 and ^U : int16 = (# "conv.ovf.i2" (# "sub.ovf" x y : int32 #) : int16 #) - when ^T : uint16 and ^U : uint16 = (# "conv.ovf.u2.un" (# "sub.ovf.un" x y : uint32 #) : uint16 #) - when ^T : sbyte and ^U : sbyte = (# "conv.ovf.i1" (# "sub.ovf" x y : int32 #) : sbyte #) - when ^T : byte and ^U : byte = (# "conv.ovf.u1.un" (# "sub.ovf.un" x y : uint32 #) : byte #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Subtraction((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - - let inline (~-) (x: ^T) : ^T = - (^T : (static member (~-) : ^T -> ^T) (x)) - when ^T : int32 = (# "sub.ovf" 0 x : int32 #) - when ^T : float = (# "neg" x : float #) - when ^T : float32 = (# "neg" x : float32 #) - when ^T : int64 = (# "sub.ovf" 0L x : int64 #) - when ^T : int16 = (# "sub.ovf" 0s x : int16 #) - when ^T : nativeint = (# "sub.ovf" 0n x : nativeint #) - when ^T : sbyte = (# "sub.ovf" 0y x : sbyte #) - when ^T : decimal = (# "" (System.Decimal.op_UnaryNegation((# "" x : decimal #))) : ^T #) - - let inline ( * ) (x: ^T) (y: ^U) : ^V = - CheckedMultiplyDynamic<(^T),(^U),(^V)> x y - when ^T : sbyte and ^U : sbyte = (# "conv.ovf.i1" (# "mul.ovf" x y : int32 #) : sbyte #) - when ^T : int16 and ^U : int16 = (# "conv.ovf.i2" (# "mul.ovf" x y : int32 #) : int16 #) - when ^T : int64 and ^U : int64 = (# "mul.ovf" x y : int64 #) - when ^T : int32 and ^U : int32 = (# "mul.ovf" x y : int32 #) - when ^T : nativeint and ^U : nativeint = (# "mul.ovf" x y : nativeint #) - when ^T : byte and ^U : byte = (# "conv.ovf.u1.un" (# "mul.ovf.un" x y : uint32 #) : byte #) - when ^T : uint16 and ^U : uint16 = (# "conv.ovf.u2.un" (# "mul.ovf.un" x y : uint32 #) : uint16 #) - when ^T : uint32 and ^U : uint32 = (# "mul.ovf.un" x y : uint32 #) - when ^T : uint64 and ^U : uint64 = (# "mul.ovf.un" x y : uint64 #) - when ^T : unativeint and ^U : unativeint = (# "mul.ovf.un" x y : unativeint #) - when ^T : float and ^U : float = (# "mul" x y : float #) - when ^T : float32 and ^U : float32 = (# "mul" x y : float32 #) - when ^T : decimal and ^U : decimal = (# "" (System.Decimal.op_Multiply((# "" x : decimal #),(# "" y : decimal #))) : ^V #) - // According to the somewhat subtle rules of static optimizations, - // this condition is used whenever ^T is resolved to a nominal type - // That is, not in the generic implementation of '*' - when ^T : ^T = ((^T or ^U): (static member (*) : ^T * ^U -> ^V) (x,y)) - - - [] - let inline byte (x: ^T) = - (^T : (static member ToByte: ^T -> byte) (x)) - when ^T : string = byte_of_string (castToString x) - when ^T : float = (# "conv.ovf.u1" x : byte #) - when ^T : float32 = (# "conv.ovf.u1" x : byte #) - when ^T : int64 = (# "conv.ovf.u1" x : byte #) - when ^T : int32 = (# "conv.ovf.u1" x : byte #) - when ^T : int16 = (# "conv.ovf.u1" x : byte #) - when ^T : nativeint = (# "conv.ovf.u1" x : byte #) - when ^T : sbyte = (# "conv.ovf.u1" x : byte #) - when ^T : uint64 = (# "conv.ovf.u1.un" x : byte #) - when ^T : uint32 = (# "conv.ovf.u1.un" x : byte #) - when ^T : uint16 = (# "conv.ovf.u1.un" x : byte #) - when ^T : char = (# "conv.ovf.u1.un" x : byte #) - when ^T : unativeint = (# "conv.ovf.u1.un" x : byte #) - when ^T : byte = (# "conv.ovf.u1.un" x : byte #) - - - [] - let inline sbyte (x: ^T) = - (^T : (static member ToSByte: ^T -> sbyte) (x)) - when ^T : string = sbyte_of_string (castToString x) - when ^T : float = (# "conv.ovf.i1" x : sbyte #) - when ^T : float32 = (# "conv.ovf.i1" x : sbyte #) - when ^T : int64 = (# "conv.ovf.i1" x : sbyte #) - when ^T : int32 = (# "conv.ovf.i1" x : sbyte #) - when ^T : int16 = (# "conv.ovf.i1" x : sbyte #) - when ^T : nativeint = (# "conv.ovf.i1" x : sbyte #) - when ^T : sbyte = (# "conv.ovf.i1" x : sbyte #) - when ^T : uint64 = (# "conv.ovf.i1.un" x : sbyte #) - when ^T : uint32 = (# "conv.ovf.i1.un" x : sbyte #) - when ^T : uint16 = (# "conv.ovf.i1.un" x : sbyte #) - when ^T : char = (# "conv.ovf.i1.un" x : sbyte #) - when ^T : unativeint = (# "conv.ovf.i1.un" x : sbyte #) - when ^T : byte = (# "conv.ovf.i1.un" x : sbyte #) - - - [] - let inline uint16 (x: ^T) = - (^T : (static member ToUInt16: ^T -> uint16) (x)) - when ^T : string = uint16_of_string (castToString x) - when ^T : float = (# "conv.ovf.u2" x : uint16 #) - when ^T : float32 = (# "conv.ovf.u2" x : uint16 #) - when ^T : int64 = (# "conv.ovf.u2" x : uint16 #) - when ^T : int32 = (# "conv.ovf.u2" x : uint16 #) - when ^T : int16 = (# "conv.ovf.u2" x : uint16 #) - when ^T : nativeint = (# "conv.ovf.u2" x : uint16 #) - when ^T : sbyte = (# "conv.ovf.u2" x : uint16 #) - when ^T : uint64 = (# "conv.ovf.u2.un" x : uint16 #) - when ^T : uint32 = (# "conv.ovf.u2.un" x : uint16 #) - when ^T : uint16 = (# "conv.ovf.u2.un" x : uint16 #) - when ^T : char = (# "conv.ovf.u2.un" x : uint16 #) - when ^T : unativeint = (# "conv.ovf.u2.un" x : uint16 #) - when ^T : byte = (# "conv.ovf.u2.un" x : uint16 #) - - - [] - let inline char (x: ^T) = - (^T : (static member ToChar: ^T -> char) (x)) -#if FX_NO_CHAR_PARSE - when ^T : string = (castToString x).[0] -#else - when ^T : string = (System.Char.Parse(castToString x)) -#endif - when ^T : float = (# "conv.ovf.u2" x : char #) - when ^T : float32 = (# "conv.ovf.u2" x : char #) - when ^T : int64 = (# "conv.ovf.u2" x : char #) - when ^T : int32 = (# "conv.ovf.u2" x : char #) - when ^T : int16 = (# "conv.ovf.u2" x : char #) - when ^T : nativeint = (# "conv.ovf.u2" x : char #) - when ^T : sbyte = (# "conv.ovf.u2" x : char #) - when ^T : uint64 = (# "conv.ovf.u2.un" x : char #) - when ^T : uint32 = (# "conv.ovf.u2.un" x : char #) - when ^T : uint16 = (# "conv.ovf.u2.un" x : char #) - when ^T : char = (# "conv.ovf.u2.un" x : char #) - when ^T : unativeint = (# "conv.ovf.u2.un" x : char #) - when ^T : byte = (# "conv.ovf.u2.un" x : char #) - - - [] - let inline int16 (x: ^T) = - (^T : (static member ToInt16: ^T -> int16) (x)) - when ^T : string = int16_of_string (castToString x) - when ^T : float = (# "conv.ovf.i2" x : int16 #) - when ^T : float32 = (# "conv.ovf.i2" x : int16 #) - when ^T : int64 = (# "conv.ovf.i2" x : int16 #) - when ^T : int32 = (# "conv.ovf.i2" x : int16 #) - when ^T : int16 = (# "conv.ovf.i2" x : int16 #) - when ^T : nativeint = (# "conv.ovf.i2" x : int16 #) - when ^T : sbyte = (# "conv.ovf.i2" x : int16 #) - when ^T : uint64 = (# "conv.ovf.i2.un" x : int16 #) - when ^T : uint32 = (# "conv.ovf.i2.un" x : int16 #) - when ^T : uint16 = (# "conv.ovf.i2.un" x : int16 #) - when ^T : char = (# "conv.ovf.i2.un" x : int16 #) - when ^T : unativeint = (# "conv.ovf.i2.un" x : int16 #) - when ^T : byte = (# "conv.ovf.i2.un" x : int16 #) - - - [] - let inline uint32 (x: ^T) = - (^T : (static member ToUInt32: ^T -> uint32) (x)) - when ^T : string = ParseUInt32 (castToString x) - when ^T : float = (# "conv.ovf.u4" x : uint32 #) - when ^T : float32 = (# "conv.ovf.u4" x : uint32 #) - when ^T : int64 = (# "conv.ovf.u4" x : uint32 #) - when ^T : int32 = (# "conv.ovf.u4" x : uint32 #) - when ^T : int16 = (# "conv.ovf.u4" x : uint32 #) - when ^T : nativeint = (# "conv.ovf.u4" x : uint32 #) - when ^T : sbyte = (# "conv.ovf.u4" x : uint32 #) - when ^T : uint64 = (# "conv.ovf.u4.un" x : uint32 #) - when ^T : uint32 = (# "conv.ovf.u4.un" x : uint32 #) - when ^T : uint16 = (# "conv.ovf.u4.un" x : uint32 #) - when ^T : char = (# "conv.ovf.u4.un" x : uint32 #) - when ^T : unativeint = (# "conv.ovf.u4.un" x : uint32 #) - when ^T : byte = (# "conv.ovf.u4.un" x : uint32 #) - - - [] - let inline int32 (x: ^T) = - (^T : (static member ToInt32: ^T -> int32) (x)) - when ^T : string = ParseInt32 (castToString x) - when ^T : float = (# "conv.ovf.i4" x : int32 #) - when ^T : float32 = (# "conv.ovf.i4" x : int32 #) - when ^T : int64 = (# "conv.ovf.i4" x : int32 #) - when ^T : int32 = (# "conv.ovf.i4" x : int32 #) - when ^T : int16 = (# "conv.ovf.i4" x : int32 #) - when ^T : nativeint = (# "conv.ovf.i4" x : int32 #) - when ^T : sbyte = (# "conv.ovf.i4" x : int32 #) - when ^T : uint64 = (# "conv.ovf.i4.un" x : int32 #) - when ^T : uint32 = (# "conv.ovf.i4.un" x : int32 #) - when ^T : uint16 = (# "conv.ovf.i4.un" x : int32 #) - when ^T : char = (# "conv.ovf.i4.un" x : int32 #) - when ^T : unativeint = (# "conv.ovf.i4.un" x : int32 #) - when ^T : byte = (# "conv.ovf.i4.un" x : int32 #) - - - [] - [] - let inline int x = int32 x - - - [] - let inline uint64 (x: ^T) = - (^T : (static member ToUInt64: ^T -> uint64) (x)) - when ^T : string = ParseUInt64 (castToString x) - when ^T : float = (# "conv.ovf.u8" x : uint64 #) - when ^T : float32 = (# "conv.ovf.u8" x : uint64 #) - when ^T : int64 = (# "conv.ovf.u8" x : uint64 #) - when ^T : int32 = (# "conv.ovf.u8" x : uint64 #) - when ^T : int16 = (# "conv.ovf.u8" x : uint64 #) - when ^T : nativeint = (# "conv.ovf.u8" x : uint64 #) - when ^T : sbyte = (# "conv.ovf.u8" x : uint64 #) - when ^T : uint64 = (# "conv.ovf.u8.un" x : uint64 #) - when ^T : uint32 = (# "conv.ovf.u8.un" x : uint64 #) - when ^T : uint16 = (# "conv.ovf.u8.un" x : uint64 #) - when ^T : char = (# "conv.ovf.u8.un" x : uint64 #) - when ^T : unativeint = (# "conv.ovf.u8.un" x : uint64 #) - when ^T : byte = (# "conv.ovf.u8.un" x : uint64 #) - - - [] - let inline int64 (x: ^T) = - (^T : (static member ToInt64: ^T -> int64) (x)) - when ^T : string = ParseInt64 (castToString x) - when ^T : float = (# "conv.ovf.i8" x : int64 #) - when ^T : float32 = (# "conv.ovf.i8" x : int64 #) - when ^T : int64 = (# "conv.ovf.i8" x : int64 #) - when ^T : int32 = (# "conv.ovf.i8" x : int64 #) - when ^T : int16 = (# "conv.ovf.i8" x : int64 #) - when ^T : nativeint = (# "conv.ovf.i8" x : int64 #) - when ^T : sbyte = (# "conv.ovf.i8" x : int64 #) - when ^T : uint64 = (# "conv.ovf.i8.un" x : int64 #) - when ^T : uint32 = (# "conv.ovf.i8.un" x : int64 #) - when ^T : uint16 = (# "conv.ovf.i8.un" x : int64 #) - when ^T : char = (# "conv.ovf.i8.un" x : int64 #) - when ^T : unativeint = (# "conv.ovf.i8.un" x : int64 #) - when ^T : byte = (# "conv.ovf.i8.un" x : int64 #) - - - [] - let inline unativeint (x: ^T) = - (^T : (static member ToUIntPtr: ^T -> unativeint) (x)) - when ^T : string = unativeint_of_string (castToString x) - when ^T : float = (# "conv.ovf.u" x : unativeint #) - when ^T : float32 = (# "conv.ovf.u" x : unativeint #) - when ^T : int64 = (# "conv.ovf.u" x : unativeint #) - when ^T : int32 = (# "conv.ovf.u" x : unativeint #) - when ^T : int16 = (# "conv.ovf.u" x : unativeint #) - when ^T : nativeint = (# "conv.ovf.u" x : unativeint #) - when ^T : sbyte = (# "conv.ovf.u" x : unativeint #) - when ^T : uint64 = (# "conv.ovf.u.un" x : unativeint #) - when ^T : uint32 = (# "conv.ovf.u.un" x : unativeint #) - when ^T : uint16 = (# "conv.ovf.u.un" x : unativeint #) - when ^T : char = (# "conv.ovf.u.un" x : unativeint #) - when ^T : unativeint = (# "conv.ovf.u.un" x : unativeint #) - when ^T : byte = (# "conv.ovf.u.un" x : unativeint #) - - - [] - let inline nativeint (x: ^T) = - (^T : (static member ToIntPtr: ^T -> nativeint) (x)) - when ^T : string = nativeint_of_string (castToString x) - when ^T : float = (# "conv.ovf.i" x : nativeint #) - when ^T : float32 = (# "conv.ovf.i" x : nativeint #) - when ^T : int64 = (# "conv.ovf.i" x : nativeint #) - when ^T : int32 = (# "conv.ovf.i" x : nativeint #) - when ^T : int16 = (# "conv.ovf.i" x : nativeint #) - when ^T : nativeint = (# "conv.ovf.i" x : nativeint #) - when ^T : sbyte = (# "conv.ovf.i" x : nativeint #) - when ^T : uint64 = (# "conv.ovf.i.un" x : nativeint #) - when ^T : uint32 = (# "conv.ovf.i.un" x : nativeint #) - when ^T : uint16 = (# "conv.ovf.i.un" x : nativeint #) - when ^T : char = (# "conv.ovf.i.un" x : nativeint #) - when ^T : unativeint = (# "conv.ovf.i.un" x : nativeint #) - when ^T : byte = (# "conv.ovf.i.un" x : nativeint #) - - module OperatorIntrinsics = begin - - - open System.Collections - - let notStarted() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext.")) - let alreadyFinished() = raise (new System.InvalidOperationException("Enumeration already finished.")) - - // Notes on "inline" with range ienumerable generation. - // "inline" is used to ensure explicit lambda arguments can be reduced by the optimiser. - // However, it is not used to ensure that primitive ops like add,sub etc. are direct calls. - - type mode = NotStarted | Running | Finished - - let inline makeEnumerator (z:'z) (canStart:'z->bool) (canStep:'z->bool) (doReset:'z->unit) (current:'z->'T) = - // Generate enumerator from mutable state "z". - // Marked "inline" to ensure argument functions are reduced (by optimiser). - let mode = ref NotStarted - let getCurrent() = - match !mode with - | NotStarted -> notStarted() - | Running -> current z - | Finished -> alreadyFinished() - { new IEnumerator<'T> with - member obj.Current = getCurrent() - interface System.Collections.IEnumerator with - member obj.Current = box (getCurrent()) - member obj.MoveNext() = - match !mode with - | NotStarted -> if canStart z then (mode := Running; true) else (mode := Finished; false) - | Running -> if canStep z then true else (mode := Finished; false) - | Finished -> false - member obj.Reset() = - mode := NotStarted - doReset z - interface System.IDisposable with - member obj.Dispose() = () - } - - let makeEmptyEnumerator() = - makeEnumerator () (fun () -> false) (fun () -> false) (fun () -> ()) - (fun () -> failwith "this makeEmptyEnumerator getter should be dead code") - - let makeSingletonEnumerator v = - let doReset () = () - let current () = v - let canStart () = true - let canStep () = false - makeEnumerator () canStart canStep doReset current - - let id x = x - let makeProperIntegralRangeEnumerator (<<) add (x0,dx,x1) f = - // NOTE: The ordering << is an argument. - // << will be < or > depending on direction. - // Assumes x0 << x1 and zero << dx (i.e. it's a "proper" range). - //-------- - // NOTE: "inline" so << becomes direct operation (should be IL comparision operation) - let z = ref x0 - let doReset z = z := x0 - let current z = f !z - let canStart z = true - let canStep z = let x = !z - let x' = add !z dx - if x' << x then false // x+dx has wrapped around - elif x' = x then false // x+dx has not moved (unexpected, dx<>0) - elif x << x' && x' << x1 then (z := x'; true) // x+dx has moved towards end point - elif x' = x1 then (z := x'; true) // x+dx has reached end point - else (* x1 << x' then *) false // x+dx has passed end point - makeEnumerator z canStart canStep doReset current - - let integralRangeStepEnumerator (zero,add) x0 dx x1 f = - // Generates sequence z_i where z_i = f (x0 + i.dx) while x0 + i.dx is in region (x0,x1) - // NOTE: could/should drop "inline", trade indirect add against code size. - if x0 = x1 then - makeSingletonEnumerator (f x0) - elif x0 < x1 then - if dx < zero then - makeEmptyEnumerator() // interval increasing, step decreasing - else - makeProperIntegralRangeEnumerator (<) add (x0,dx,x1) f // generate proper increasing sequence - else - if dx > zero then - makeEmptyEnumerator() // interval decreasing, step increasing - else - makeProperIntegralRangeEnumerator (>) add (x0,dx,x1) f // generate proper decreasing sequence - - let integralRangeEnumerator (dx,add,x0,x1) = - // Generates sequence z_i where z_i = (x0 + i.dx) while x0 + i.dx is in region (x0,x1) - if x0 = x1 then - makeSingletonEnumerator x0 - elif x0 < x1 then - makeProperIntegralRangeEnumerator (<) add (x0,dx,x1) id // generate proper increasing sequence - else - makeEmptyEnumerator() // interval decreasing, step increasing - - let integralRange<'T> (one:'T, add:'T -> 'T -> 'T, n:'T,m:'T) = - let gen() = integralRangeEnumerator (one,add,n,m) - { new IEnumerable<'T> with - member x.GetEnumerator() = gen() - interface System.Collections.IEnumerable with - member x.GetEnumerator() = (gen() :> System.Collections.IEnumerator) } - - let integralRangeStep<'T,'U> (zero:'U) (add:'T -> 'U -> 'T) (n:'T,step:'U,m:'T) = - if step = zero then invalidArg "step" "the step of a range cannot be zero"; - let gen() = integralRangeStepEnumerator (zero,add) n step m id - { new IEnumerable<'T> with - member x.GetEnumerator() = gen() - interface System.Collections.IEnumerable with - member x.GetEnumerator() = (gen() :> System.Collections.IEnumerator) } - - let isNaN x = x <> x // NaN is the only value that does not equal itself. - let makeProperFloatingRangeStepEnumerator (<<) add (x0,dx,x1) = - // NOTE: The ordering << is an argument. - // << will be < or > depending on direction. - // Assumes x0 << x1 and zero << dx. - // NOTE: "inline" ensures << is comparision op - let z = ref x0 - let doReset z = z := x0 - let current z = !z - let canStart z = true - let canStep z = let x = !z - let x' = add !z dx - // NOTE: The following code is similar to the integer case, but there are differences. - // * With floats, there is a NaN case to consider. - // * With floats, there should not be any wrapping around arithmetic. - // * With floats, x + dx == x is possible when dx>0. - if x' = x then false // no movement, loss of precision - elif x << x' && x' << x1 then (z := x'; true) // advanced towards end point - elif x' = x1 then (z := x'; true) // hit end point - elif x1 << x' then false // passed beyond end point - // [includes x' infinite, x1 finite case] - elif isNaN x' then false // x' has become NaN, which is possible... - // e.g. -infinity + infinity = NaN - elif x' << x then failwith // x + dx should not move against << - "Broken invariant in F# floating point range" - else false // Are there any cases left? [i think not] - makeEnumerator z canStart canStep doReset current - - let floatingRangeStepEnumerator (zero,add) x0 step x1 = - if step = zero then invalidArg "step" "the step of a range cannot be zero"; - if isNaN x0 then invalidArg "x0" "start of a range cannot be NaN"; - if isNaN step then invalidArg "step" "step of a range cannot be NaN"; - if isNaN x1 then invalidArg "x1" "end of a range cannot be NaN"; - if x0 = x1 then - makeSingletonEnumerator x0 - elif x0 < x1 then - if step < zero then - makeEmptyEnumerator() // interval increasing, step decreasing - else - makeProperFloatingRangeStepEnumerator (<) add (x0,step,x1) // generate proper increasing sequence - else - if step > zero then - makeEmptyEnumerator() // interval decreasing, step increasing - else - makeProperFloatingRangeStepEnumerator (>) add (x0,step,x1) // generate proper decreasing sequence - - // When is a System.Double an System.Int32? - let minIntR = -2147483648.0 - let maxIntR = 2147483647.0 - let asInt x = if minIntR <= x && x <= maxIntR && System.Math.Floor x = x then Some (int x) else None - - type ops<'T> = - { zero : 'T; - add : 'T -> 'T -> 'T; - sub : 'T -> 'T -> 'T; - mul : 'T -> 'T -> 'T; - div : 'T -> 'T -> 'T; - ofInt : int -> 'T; - toFloat : 'T -> float } - - // When a floating range looks like an exact number of steps, generate using {x0+i.dx} for i from an integer range. - let optimisedFloatingRangeEnumerator (ops:ops<'T>) x0 dx x1 = - match asInt (ops.toFloat (ops.div (ops.sub x1 x0) dx)) with - | Some n -> - integralRangeStepEnumerator (0,(+)) 0 1 n (fun i -> ops.add x0 (ops.mul (ops.ofInt i) dx)) - | None -> - floatingRangeStepEnumerator (ops.zero,ops.add) x0 dx x1 - - let floatingRange ops (n,step,m) = - let gen() = optimisedFloatingRangeEnumerator ops n step m - { new IEnumerable<'T> with - member x.GetEnumerator() = gen() - interface System.Collections.IEnumerable with - member x.GetEnumerator() = (gen() :> System.Collections.IEnumerator) } - - let floatOps :ops = {zero=0.0; add=(+); sub=(-); mul=( * );div=(/);ofInt=float;toFloat=float} - let float32Ops :ops= {zero=0.0f; add=(+); sub=(-); mul=( * );div=(/);ofInt=float32;toFloat=float} - - let RangeInt32 (n,step,m) : seq = integralRangeStep 0 (+) (n,step,m) - let RangeInt64 (n,step,m) : seq = integralRangeStep 0L (+) (n,step,m) - let RangeUInt64 (n,step,m) : seq = integralRangeStep 0UL (+) (n,step,m) - let RangeUInt32 (n,step,m) : seq = integralRangeStep 0ul (+) (n,step,m) - let RangeIntPtr (n,step,m) : seq = integralRangeStep 0n (+) (n,step,m) - let RangeUIntPtr (n,step,m) : seq = integralRangeStep 0un (+) (n,step,m) - let RangeInt16 (n,step,m) : seq = integralRangeStep 0s (+) (n,step,m) - let RangeUInt16 (n,step,m) : seq = integralRangeStep 0us (+) (n,step,m) - let RangeSByte (n,step,m) : seq = integralRangeStep 0y (+) (n,step,m) - let RangeByte (n,step,m) : seq = integralRangeStep 0uy (+) (n,step,m) - let RangeDouble (n,step,m) : seq = floatingRange floatOps (n,step,m) - let RangeSingle (n,step,m) : seq = floatingRange float32Ops (n,step,m) - let RangeGeneric (one,add,n,m) : seq<'T> = integralRange (one,add,n,m) - let RangeStepGeneric (zero,add,n,step,m) : seq<'T> = integralRangeStep zero add (n,step,m) - let RangeChar (n:char, m:char) = - integralRange ((retype 1us : char),(fun (x:char) (y:char) -> retype ((retype x : uint16) + (retype y : uint16)) ),n,m) - - - let inline to_float (x:float32) = (# "conv.r8" x : float #) - let inline to_float32 (x:float) = (# "conv.r4" x : float32 #) - - let inline ComputePowerGenericInlined one mul x n = - let rec loop n = - match n with - | 0 -> one - | 1 -> x - | 2 -> mul x x - | 3 -> mul (mul x x) x - | 4 -> let v = mul x x in mul v v - | _ -> - let v = loop (n/2) in - let v = mul v v in - if n%2 = 0 then v else mul v x in - loop n - - - [] - let PowByte (x:byte) n = ComputePowerGenericInlined 1uy Checked.( * ) x n - - [] - let PowSByte (x:sbyte) n = ComputePowerGenericInlined 1y Checked.( * ) x n - - [] - let PowInt16 (x:int16) n = ComputePowerGenericInlined 1s Checked.( * ) x n - - [] - let PowUInt16 (x:uint16) n = ComputePowerGenericInlined 1us Checked.( * ) x n - - [] - let PowInt32 (x:int32) n = ComputePowerGenericInlined 1 Checked.( * ) x n - - [] - let PowUInt32 (x:uint32) n = ComputePowerGenericInlined 1u Checked.( * ) x n - - [] - let PowInt64 (x:int64) n = ComputePowerGenericInlined 1L Checked.( * ) x n - - [] - let PowUInt64 (x:uint64) n = ComputePowerGenericInlined 1UL Checked.( * ) x n - - [] - let PowIntPtr (x:nativeint) n = ComputePowerGenericInlined 1n Checked.( * ) x n - - [] - let PowUIntPtr (x:unativeint) n = ComputePowerGenericInlined 1un Checked.( * ) x n - - [] - let PowSingle (x:float32) n = ComputePowerGenericInlined 1.0f Checked.( * ) x n - - [] - let PowDouble (x:float) n = ComputePowerGenericInlined 1.0 Checked.( * ) x n - - [] - let PowDecimal (x:decimal) n = ComputePowerGenericInlined 1.0M Checked.( * ) x n - - [] - let PowGeneric (one,mul,x:'T,n) = ComputePowerGenericInlined one mul x n - - - - let inline GetArraySlice (arr: _[]) (start,finish) = - let start = (match start with None -> 0 | Some n -> n) - let finish = (match finish with None -> arr.Length - 1 | Some n -> n) - GetArraySub arr start (finish - start + 1) - - let inline SetArraySlice (dst: _[]) (start,finish,src:_[]) = - let start = (match start with None -> 0 | Some n -> n) - let finish = (match finish with None -> dst.Length - 1 | Some n -> n) - SetArraySub dst start (finish - start + 1) src - - let GetArraySlice2D (arr: _[,]) (start1,finish1,start2,finish2) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> GetArray2DLength1 arr - 1 | Some n -> n) - let finish2 = (match finish2 with None -> GetArray2DLength2 arr - 1 | Some n -> n) - let len1 = (finish1 - start1 + 1) - let len2 = (finish2 - start2 + 1) - GetArray2DSub arr start1 start2 len1 len2 - - let SetArraySlice2D (dst: _[,]) (start1,finish1,start2,finish2,src:_[,]) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> GetArray2DLength1 dst - 1 | Some n -> n) - let finish2 = (match finish2 with None -> GetArray2DLength2 dst - 1 | Some n -> n) - SetArray2DSub dst start1 start2 (finish1 - start1 + 1) (finish2 - start2 + 1) src - - let GetArraySlice3D (arr: _[,,]) (start1,finish1,start2,finish2,start3,finish3) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let start3 = (match start3 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> GetArray3DLength1 arr - 1 | Some n -> n) - let finish2 = (match finish2 with None -> GetArray3DLength2 arr - 1 | Some n -> n) - let finish3 = (match finish3 with None -> GetArray3DLength3 arr - 1 | Some n -> n) - let len1 = (finish1 - start1 + 1) - let len2 = (finish2 - start2 + 1) - let len3 = (finish3 - start3 + 1) - GetArray3DSub arr start1 start2 start3 len1 len2 len3 - - let SetArraySlice3D (dst: _[,,]) (start1,finish1,start2,finish2,start3,finish3,src:_[,,]) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let start3 = (match start3 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> GetArray3DLength1 dst - 1 | Some n -> n) - let finish2 = (match finish2 with None -> GetArray3DLength2 dst - 1 | Some n -> n) - let finish3 = (match finish3 with None -> GetArray3DLength3 dst - 1 | Some n -> n) - SetArray3DSub dst start1 start2 start3 (finish1 - start1 + 1) (finish2 - start2 + 1) (finish3 - start3 + 1) src - - let GetArraySlice4D (arr: _[,,,]) (start1,finish1,start2,finish2,start3,finish3,start4,finish4) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let start3 = (match start3 with None -> 0 | Some n -> n) - let start4 = (match start4 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> Array4DLength1 arr - 1 | Some n -> n) - let finish2 = (match finish2 with None -> Array4DLength2 arr - 1 | Some n -> n) - let finish3 = (match finish3 with None -> Array4DLength3 arr - 1 | Some n -> n) - let finish4 = (match finish4 with None -> Array4DLength4 arr - 1 | Some n -> n) - let len1 = (finish1 - start1 + 1) - let len2 = (finish2 - start2 + 1) - let len3 = (finish3 - start3 + 1) - let len4 = (finish4 - start4 + 1) - GetArray4DSub arr start1 start2 start3 start4 len1 len2 len3 len4 - - let SetArraySlice4D (dst: _[,,,]) (start1,finish1,start2,finish2,start3,finish3,start4,finish4,src:_[,,,]) = - let start1 = (match start1 with None -> 0 | Some n -> n) - let start2 = (match start2 with None -> 0 | Some n -> n) - let start3 = (match start3 with None -> 0 | Some n -> n) - let start4 = (match start4 with None -> 0 | Some n -> n) - let finish1 = (match finish1 with None -> Array4DLength1 dst - 1 | Some n -> n) - let finish2 = (match finish2 with None -> Array4DLength2 dst - 1 | Some n -> n) - let finish3 = (match finish3 with None -> Array4DLength3 dst - 1 | Some n -> n) - let finish4 = (match finish4 with None -> Array4DLength4 dst - 1 | Some n -> n) - SetArray4DSub dst start1 start2 start3 start4 (finish1 - start1 + 1) (finish2 - start2 + 1) (finish3 - start3 + 1) (finish4 - start4 + 1) src - - let inline GetStringSlice (str:string) (start,finish) = - let start = (match start with None -> 0 | Some n -> n) - let finish = (match finish with None -> str.Length - 1 | Some n -> n) - str.Substring(start, finish-start+1) - - - - let inline abs_impl (x: ^T) : ^T = - (^T: (static member Abs : ^T -> ^T) (x)) - when ^T : int32 = let x : int32 = retype x in System.Math.Abs(x) - when ^T : float = let x : float = retype x in System.Math.Abs(x) - when ^T : float32 = let x : float32 = retype x in System.Math.Abs(x) - when ^T : int64 = let x : int64 = retype x in System.Math.Abs(x) - when ^T : nativeint = - let x : nativeint = retype x in - if x >= 0n then x else - let res = -x in - if res < 0n then raise (System.OverflowException("Negating the minimum value of a twos complement number is invalid.")) - res - when ^T : int16 = let x : int16 = retype x in System.Math.Abs(x) - when ^T : sbyte = let x : sbyte = retype x in System.Math.Abs(x) - when ^T : decimal = System.Math.Abs(retype x : decimal) - - let inline acos_impl(x: ^T) : ^T = - (^T: (static member Acos : ^T -> ^T) (x)) - when ^T : float = System.Math.Acos(retype x) - when ^T : float32 = System.Math.Acos(to_float (retype x)) |> to_float32 - - let inline asin_impl(x: ^T) : ^T = - (^T: (static member Asin : ^T -> ^T) (x)) - when ^T : float = System.Math.Asin(retype x) - when ^T : float32 = System.Math.Asin(to_float (retype x)) |> to_float32 - - let inline atan_impl(x: ^T) : ^T = - (^T: (static member Atan : ^T -> ^T) (x)) - when ^T : float = System.Math.Atan(retype x) - when ^T : float32 = System.Math.Atan(to_float (retype x)) |> to_float32 - - let inline atan2_impl(x: ^T) (y: ^T) : 'U = - (^T: (static member Atan2 : ^T * ^T -> 'U) (x,y)) - when ^T : float = System.Math.Atan2(retype x, retype y) - when ^T : float32 = System.Math.Atan2(to_float (retype x), to_float(retype y)) |> to_float32 - - let inline ceil_impl(x: ^T) : ^T = - (^T: (static member Ceiling : ^T -> ^T) (x)) - when ^T : float = System.Math.Ceiling(retype x : float) - when ^T : float32 = System.Math.Ceiling(to_float (retype x)) |> to_float32 - - let inline exp_impl(x: ^T) : ^T = - (^T: (static member Exp : ^T -> ^T) (x)) - when ^T : float = System.Math.Exp(retype x) - when ^T : float32 = System.Math.Exp(to_float (retype x)) |> to_float32 - - let inline floor_impl (x: ^T) : ^T = - (^T: (static member Floor : ^T -> ^T) (x)) - when ^T : float = System.Math.Floor(retype x : float) - when ^T : float32 = System.Math.Floor(to_float (retype x)) |> to_float32 - - let inline truncate_impl (x: ^T) : ^T = - (^T: (static member Truncate : ^T -> ^T) (x)) -#if FX_NO_TRUNCATE - when ^T : float = 0.0 - when ^T : float32 = 0.0 -#else - when ^T : float = System.Math.Truncate(retype x : float) - when ^T : float32 = System.Math.Truncate(to_float (retype x)) |> to_float32 -#endif - - let inline round_impl (x: ^T) : ^T = - (^T: (static member Round : ^T -> ^T) (x)) - when ^T : float = System.Math.Round(retype x : float) - when ^T : float32 = System.Math.Round(to_float (retype x)) |> to_float32 - - let inline sign_impl (x: ^T) : int = - (^T: (member Sign : int) (x)) - when ^T : int32 = System.Math.Sign(retype x : int32) - when ^T : int64 = System.Math.Sign(retype x : int64) - when ^T : nativeint = if (retype x : nativeint) < 0n then -1 else if (retype x : nativeint) > 0n then 1 else 0 - when ^T : int16 = System.Math.Sign(retype x : int16) - when ^T : sbyte = System.Math.Sign(retype x : sbyte) - when ^T : float = System.Math.Sign(retype x : float) - when ^T : float32 = System.Math.Sign(to_float (retype x)) - when ^T : decimal = System.Math.Sign(retype x : decimal) - - let inline log_impl(x: ^T) : ^T = - (^T: (static member Log : ^T -> ^T) (x)) - when ^T : float = System.Math.Log(retype x) - when ^T : float32 = System.Math.Log(to_float (retype x)) |> to_float32 - - let inline log10_impl(x: ^T) : ^T = - (^T: (static member Log10 : ^T -> ^T) (x)) - when ^T : float = System.Math.Log10(retype x) - when ^T : float32 = System.Math.Log10(to_float (retype x)) |> to_float32 - - let inline sqrt_impl(x: ^T) : ^U = - (^T: (static member Sqrt : ^T -> ^U) (x)) - when ^T : float = System.Math.Sqrt(retype x : float) - when ^T : float32 = System.Math.Sqrt(to_float (retype x)) |> to_float32 - - let inline cos_impl(x: ^T) : ^T = - (^T: (static member Cos : ^T -> ^T) (x)) - when ^T : float = System.Math.Cos(retype x) - when ^T : float32 = System.Math.Cos(to_float (retype x)) |> to_float32 - - let inline cosh_impl(x: ^T) : ^T = - (^T: (static member Cosh : ^T -> ^T) (x)) - when ^T : float = System.Math.Cosh(retype x) - when ^T : float32 = System.Math.Cosh(to_float (retype x)) |> to_float32 - - let inline sin_impl(x: ^T) : ^T = - (^T: (static member Sin : ^T -> ^T) (x)) - when ^T : float = System.Math.Sin(retype x) - when ^T : float32 = System.Math.Sin(to_float (retype x)) |> to_float32 - - let inline sinh_impl(x: ^T) : ^T = - (^T: (static member Sinh : ^T -> ^T) (x)) - when ^T : float = System.Math.Sinh(retype x) - when ^T : float32 = System.Math.Sinh(to_float (retype x)) |> to_float32 - - let inline tan_impl(x: ^T) : ^T = - (^T: (static member Tan : ^T -> ^T) (x)) - when ^T : float = System.Math.Tan(retype x) - when ^T : float32 = System.Math.Tan(to_float (retype x)) |> to_float32 - - - let inline tanh_impl(x: ^T) : ^T = - (^T: (static member Tanh : ^T -> ^T) (x)) - when ^T : float = System.Math.Tanh(retype x) - when ^T : float32 = System.Math.Tanh(to_float (retype x)) |> to_float32 - - let inline pow_impl (x: ^T) (y: ^T) : ^T = - (^T: (static member Pow : ^T * ^T -> ^T) (x,y)) - when ^T : float = System.Math.Pow((retype x : float), (retype y: float)) - when ^T : float32 = System.Math.Pow(to_float (retype x), to_float(retype y)) |> to_float32 - - [] - let UnaryDynamicImpl nm : ('T -> 'U) = - let aty = typeof<'T> - let minfo = aty.GetMethod(nm, [| aty |]) - (fun x -> unboxPrim<_>(minfo.Invoke(null,[| box x|]))) - - let BinaryDynamicImpl nm : ('T -> 'T -> 'U) = - let aty = typeof<'T> - let minfo = aty.GetMethod(nm,[| aty;aty |]) - (fun x y-> unboxPrim<_>(minfo.Invoke(null,[| box x; box y|]))) - - [] - type AbsDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:sbyte) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int16) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int32) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int64) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:nativeint) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> abs_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:decimal) -> abs_impl x) - else UnaryDynamicImpl "Abs" - static member Result : ('T -> 'T) = result - - [] - type AcosDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> acos_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> acos_impl x) - else UnaryDynamicImpl "Acos" - static member Result : ('T -> 'T) = result - - [] - type AsinDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> asin_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> asin_impl x) - else UnaryDynamicImpl "Asin" - static member Result : ('T -> 'T) = result - - [] - type AtanDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> atan_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> atan_impl x) - else UnaryDynamicImpl "Atan" - static member Result : ('T -> 'T) = result - - [] - type Atan2DynamicImplTable<'T,'U>() = - static let result : ('T -> 'T -> 'U) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) (y:float) -> atan2_impl x y) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) (y:float32) -> atan2_impl x y) - else BinaryDynamicImpl "Atan2" - static member Result : ('T -> 'T -> 'U) = result - - [] - type CeilingDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> ceil_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> ceil_impl x) - else UnaryDynamicImpl "Ceiling" - static member Result : ('T -> 'T) = result - - [] - type ExpDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> exp_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> exp_impl x) - else UnaryDynamicImpl "Exp" - static member Result : ('T -> 'T) = result - - [] - type FloorDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> floor_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> floor_impl x) - else UnaryDynamicImpl "Floor" - static member Result : ('T -> 'T) = result - - [] - type TruncateDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> truncate_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> truncate_impl x) - else UnaryDynamicImpl "Truncate" - static member Result : ('T -> 'T) = result - - [] - type RoundDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> round_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> round_impl x) - else UnaryDynamicImpl "Round" - static member Result : ('T -> 'T) = result - - [] - type SignDynamicImplTable<'T>() = - static let result : ('T -> int) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:nativeint) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:decimal) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int16) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int32) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:int64) -> sign_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:sbyte) -> sign_impl x) - else UnaryDynamicImpl "Sign" - static member Result : ('T -> int) = result - - [] - type LogDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> log_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> log_impl x) - else UnaryDynamicImpl "Log" - static member Result : ('T -> 'T) = result - - [] - type Log10DynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> log10_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> log10_impl x) - else UnaryDynamicImpl "Log10" - static member Result : ('T -> 'T) = result - - [] - type SqrtDynamicImplTable<'T,'U>() = - static let result : ('T -> 'U) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> sqrt_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> sqrt_impl x) - else UnaryDynamicImpl "Sqrt" - static member Result : ('T -> 'U) = result - - [] - type CosDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> cos_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> cos_impl x) - else UnaryDynamicImpl "Cos" - static member Result : ('T -> 'T) = result - - [] - type CoshDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> cosh_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> cosh_impl x) - else UnaryDynamicImpl "Cosh" - static member Result : ('T -> 'T) = result - - [] - type SinDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> sin_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> sin_impl x) - else UnaryDynamicImpl "Sin" - static member Result : ('T -> 'T) = result - - [] - type SinhDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> sinh_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> sinh_impl x) - else UnaryDynamicImpl "Sinh" - static member Result : ('T -> 'T) = result - - [] - type TanDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> tan_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> tan_impl x) - else UnaryDynamicImpl "Tan" - static member Result : ('T -> 'T) = result - - [] - type TanhDynamicImplTable<'T>() = - static let result : ('T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) -> tanh_impl x) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) -> tanh_impl x) - else UnaryDynamicImpl "Tanh" - static member Result : ('T -> 'T) = result - - [] - type PowDynamicImplTable<'T>() = - static let result : ('T -> 'T -> 'T) = - let aty = typeof<'T> - if aty.Equals(typeof) then unboxPrim<_>(fun (x:float) (y:float) -> pow_impl x y) - elif aty.Equals(typeof) then unboxPrim<_>(fun (x:float32) (y:float32) -> pow_impl x y) - else BinaryDynamicImpl "Pow" - static member Result : ('T -> 'T -> 'T) = result - - let AbsDynamic x = AbsDynamicImplTable<_>.Result x - let AcosDynamic x = AcosDynamicImplTable<_>.Result x - let AsinDynamic x = AsinDynamicImplTable<_>.Result x - let AtanDynamic x = AtanDynamicImplTable<_>.Result x - let Atan2Dynamic x y = Atan2DynamicImplTable<_,_>.Result x y - let CeilingDynamic x = CeilingDynamicImplTable<_>.Result x - let ExpDynamic x = ExpDynamicImplTable<_>.Result x - let FloorDynamic x = FloorDynamicImplTable<_>.Result x - let TruncateDynamic x = TruncateDynamicImplTable<_>.Result x - let RoundDynamic x = RoundDynamicImplTable<_>.Result x - let SignDynamic x = SignDynamicImplTable<_>.Result x - let LogDynamic x = LogDynamicImplTable<_>.Result x - let Log10Dynamic x = Log10DynamicImplTable<_>.Result x - let SqrtDynamic x = SqrtDynamicImplTable<_,_>.Result x - let CosDynamic x = CosDynamicImplTable<_>.Result x - let CoshDynamic x = CoshDynamicImplTable<_>.Result x - let SinDynamic x = SinDynamicImplTable<_>.Result x - let SinhDynamic x = SinhDynamicImplTable<_>.Result x - let TanDynamic x = TanDynamicImplTable<_>.Result x - let TanhDynamic x = TanhDynamicImplTable<_>.Result x - let PowDynamic x y = PowDynamicImplTable<_>.Result x y - - - end - open OperatorIntrinsics - - - let inline (..) (n:^T) (m:^T) = - RangeGeneric (GenericOne< (^T) >, Checked.( + ),n,m) - when ^T : int32 = RangeInt32 (retype n,1 ,retype m) - when ^T : float = RangeDouble (retype n,1.0 ,retype m) - when ^T : float32 = RangeSingle (retype n,1.0f ,retype m) - when ^T : int64 = RangeInt64 (retype n,1L ,retype m) - when ^T : uint64 = RangeUInt64 (retype n,1UL ,retype m) - when ^T : uint32 = RangeUInt32 (retype n,1ul ,retype m) - when ^T : nativeint = RangeIntPtr (retype n,1n ,retype m) - when ^T : unativeint = RangeUIntPtr (retype n,1un ,retype m) - when ^T : int16 = RangeInt16 (retype n,1s ,retype m) - when ^T : uint16 = RangeUInt16 (retype n,1us ,retype m) - when ^T : sbyte = RangeSByte (retype n,1y ,retype m) - when ^T : byte = RangeByte (retype n,1uy ,retype m) - when ^T : char = RangeChar (retype n,retype m) - - let inline (.. ..) (n:^T) (step:^U) (m:^T) = - RangeStepGeneric (GenericZero< (^U) >, Checked.( + ),n,step,m) - when ^T : int32 = RangeInt32 (retype n ,retype step ,retype m) - when ^T : float = RangeDouble (retype n ,retype step ,retype m) - when ^T : float32 = RangeSingle (retype n ,retype step ,retype m) - when ^T : int64 = RangeInt64 (retype n ,retype step ,retype m) - when ^T : uint64 = RangeUInt64 (retype n ,retype step ,retype m) - when ^T : uint32 = RangeUInt32 (retype n ,retype step ,retype m) - when ^T : nativeint = RangeIntPtr (retype n ,retype step ,retype m) - when ^T : unativeint = RangeUIntPtr (retype n ,retype step ,retype m) - when ^T : int16 = RangeInt16 (retype n ,retype step ,retype m) - when ^T : uint16 = RangeUInt16 (retype n ,retype step ,retype m) - when ^T : sbyte = RangeSByte (retype n ,retype step ,retype m) - when ^T : byte = RangeByte (retype n ,retype step ,retype m) - - - [] - let inline abs (x: ^T) : ^T = - AbsDynamic x - when ^T : ^T = abs_impl x - - - [] - let inline acos(x: ^T) : ^T = - AcosDynamic x - when ^T : ^T = acos_impl x - - - [] - let inline asin(x: ^T) : ^T = - AsinDynamic x - when ^T : ^T = asin_impl x - - - [] - let inline atan(x: ^T) : ^T = - AtanDynamic x - when ^T : ^T = atan_impl x - - - [] - let inline atan2(x: ^T) (y: ^T) : 'U = - Atan2Dynamic x y - when ^T : ^T = (atan2_impl x y : 'U) - - - [] - let inline ceil(x: ^T) : ^T = - CeilingDynamic x - when ^T : ^T = ceil_impl x - - - [] - let inline exp(x: ^T) : ^T = - ExpDynamic x - when ^T : ^T = exp_impl x - - - [] - let inline floor (x: ^T) : ^T = - FloorDynamic x - when ^T : ^T = floor_impl x - - - [] - let inline truncate (x: ^T) : ^T = - TruncateDynamic x - when ^T : ^T = truncate_impl x - - - [] - let inline round (x: ^T) : ^T = - RoundDynamic x - when ^T : ^T = round_impl x - - - [] - let inline sign (x: ^T) : int = - SignDynamic x - when ^T : ^T = sign_impl x - - - [] - let inline log(x: ^T) : ^T = - LogDynamic x - when ^T : ^T = log_impl x - - - [] - let inline log10(x: ^T) : ^T = - Log10Dynamic x - when ^T : ^T = log10_impl x - - - [] - let inline sqrt(x: ^T) : ^U = - SqrtDynamic x - when ^T : ^T = (sqrt_impl x : ^U) - - - [] - let inline cos(x: ^T) : ^T = - CosDynamic x - when ^T : ^T = cos_impl x - - - [] - let inline cosh(x: ^T) : ^T = - CoshDynamic x - when ^T : ^T = cosh_impl x - - - [] - let inline sin(x: ^T) : ^T = - SinDynamic x - when ^T : ^T = sin_impl x - - - [] - let inline sinh(x: ^T) : ^T = - SinhDynamic x - when ^T : ^T = sinh_impl x - - - [] - let inline tan(x: ^T) : ^T = - TanDynamic x - when ^T : ^T = tan_impl x - - - [] - let inline tanh(x: ^T) : ^T = - TanhDynamic x - when ^T : ^T = tanh_impl x - - let inline ( ** ) (x: ^T) (y: ^T) : ^T = - PowDynamic x y - when ^T : ^T = pow_impl x y - - - [] - let inline gpown (x: ^T) n = - let v = PowGeneric (GenericOne< (^T) >, Checked.( * ), x,n) - if n < 0 then GenericOne< (^T) > / v - else v - - [] - let inline pown (x: ^T) n = - (if n = Int32.MinValue then gpown x (n+1) / x else gpown x n) - when ^T : int32 = - (let x = (retype x : int32) in - if x = 2 && n >= 0 && n < 31 then 1 <<< n - elif n >= 0 then PowInt32 x n - else 1 / PowInt32 x n) - when ^T : int64 = - (let x = (retype x : int64) in - if x = 2L && n >= 0 && n < 63 then 1L <<< n - elif n >= 0 then PowInt64 x n - else 1L / PowInt64 x n) - when ^T : int16 = - (let x = (retype x : int16) in - if x = 2s && n >= 0 && n < 15 then 1s <<< n - elif n >= 0 then PowInt16 x n - else 1s / PowInt16 x n) - when ^T : sbyte = - (let x = (retype x : sbyte) in - if x = 2y && n >= 0 && n < 7 then 1y <<< n - elif n >= 0 then PowSByte x n - else 1y / PowSByte x n) - when ^T : nativeint = - (let x = (retype x : nativeint) in - if x = 2n && n >= 0 && n < 31 then 1n <<< n - elif n >= 0 then PowIntPtr x n - else 1n / PowIntPtr x n) - when ^T : uint32 = - (let x = (retype x : uint32) in - if x = 2u && n >= 0 && n <= 31 then 1u <<< n - elif n >= 0 then PowUInt32 x n - else 1u / PowUInt32 x n) - when ^T : uint64 = - (let x = (retype x : uint64) in - if x = 2UL && n >= 0 && n <= 63 then 1UL <<< n - elif n >= 0 then PowUInt64 x n - else 1UL / PowUInt64 x n) - when ^T : uint16 = - (let x = (retype x : uint16) in - if x = 2us && n >= 0 && n <= 15 then 1us <<< n - elif n >= 0 then PowUInt16 x n - else 1us / PowUInt16 x n) - when ^T : byte = - (let x = (retype x : byte) in - if x = 2uy && n >= 0 && n <= 7 then 1uy <<< n - elif n >= 0 then PowByte x n - else 1uy / PowByte x n) - when ^T : unativeint = - (let x = (retype x : unativeint) in - if x = 2un && n >= 0 && n <= 31 then 1un <<< n - elif n >= 0 then PowUIntPtr x n - else 1un / PowUIntPtr x n) - - when ^T : float = - (let x = (retype x : float) in - if n >= 0 then PowDouble x n else 1.0 / PowDouble x n) - when ^T : float32 = - (let x = (retype x : float32) in - if n >= 0 then PowSingle x n else 1.0f / PowSingle x n) - when ^T : decimal = - (let x = (retype x : decimal) in - if n >= 0 then PowDecimal x n else 1.0M / PowDecimal x n) - - - - - - - - -//============================================================================ -//============================================================================ - -namespace Microsoft.FSharp.Control - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - - exception Undefined - - type LazyFailure(exn:exn) = - static let undefined = new LazyFailure(Undefined) - member x.Exception = exn - static member Undefined = undefined - -#if FX_ATLEAST_40 - open System.Threading - - module LazyExtensions = - type System.Threading.LazyInit<'T> with - static member Create(f : unit -> 'T) = - let creator = new System.Func<'T>(f) - System.Threading.LazyInit<'T>(creator,System.Threading.LazyInitMode.EnsureSingleExecution) - static member CreateFromValue(value : 'T) = - System.Threading.LazyInit<'T>.Create(fun () -> value) - member x.IsDelayed = not(x.IsInitialized) - member x.IsForced = x.IsInitialized - member x.IsException = false - member x.Force() = x.Value - member x.SynchronizedForce() = x.Value - member x.UnsynchronizedForce() = x.Value - - type Lazy<'T> = System.Threading.LazyInit<'T> - - and 'T ``lazy`` = Lazy<'T> -#else - - - [] - [] - [] - type Lazy<'T> = - { /// This field holds the result of a successful computation. It's initial value is Unchecked.defaultof - mutable value : 'T - /// This field holds either the function to run or a LazyFailure object recording the exception raised - /// from running the function. It is null if the thunk has been evaluated successfully. - mutable funcOrException: obj } - static member Create(f: (unit->'T)) : Lazy<'T> = - { value = Unchecked.defaultof<'T>; - funcOrException = box(f); } - static member CreateFromValue(x:'T) : Lazy<'T> = - { value = x; - funcOrException = null; } - member x.IsDelayed = (match x.funcOrException with null -> false | :? LazyFailure -> false | _ -> true) - member x.IsException = (match x.funcOrException with null -> false | :? LazyFailure -> true | _ -> false) - member x.IsForced = (match x.funcOrException with null -> true | _ -> false) - member x.Force() = - match x.funcOrException with - | null -> x.value - | _ -> - // Enter the lock in case another thread is in the process of evaluting the result - System.Threading.Monitor.Enter(x); - try - x.UnsynchronizedForce() - finally - System.Threading.Monitor.Exit(x) - member x.UnsynchronizedForce() = - match x.funcOrException with - | null -> x.value - | :? LazyFailure as res -> - raise(res.Exception) - | :? (unit -> 'T) as f -> - x.funcOrException <- box(LazyFailure.Undefined) - try - let res = f () - x.funcOrException <- null; - x.value <- res; - res - with e -> - x.funcOrException <- box(new LazyFailure(e)); - rethrow() - | _ -> - failwith "unreachable" - member x.SynchronizedForce() = x.Force() -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.Value = x.Force() - - member internal x.StructuredFormatDisplay = x.ToString() // for the StructuredFormatDisplay attribute - override x.ToString() = - if x.IsForced then - if box x.Value = null then - "" - else - x.Value.ToString() - else - match x.funcOrException with - | :? LazyFailure as res -> - match res.Exception with - | Undefined -> "" - | e -> e.ToString() - | _ -> - "" - - and 'T ``lazy`` = Lazy<'T> -#endif - - - -//============================================================================ -//============================================================================ - - -namespace Microsoft.FSharp.Control - - open System.Diagnostics - open Microsoft.FSharp.Core - - type IDelegateEvent<'Del when 'Del :> System.Delegate > = - [] - abstract AddHandler: handler:'Del -> unit - [] - abstract RemoveHandler: handler:'Del -> unit - - type IEvent<'Del,'Args when 'Del : delegate<'Args,unit> and 'Del :> System.Delegate > = - abstract Add: callback:('Args -> unit) -> unit - inherit IDelegateEvent<'Del> - - [] - type Handler<'Args> = delegate of sender:obj * args:'Args -> unit - - type IEvent<'Args> = IEvent, 'Args> - - // FxCop suppressions - open System.Diagnostics.CodeAnalysis - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - do() - - // FxCop suppressions - [] - [] - [] - [] - [] - [] - [] - [] - - [] - [] - [] - [] - [] - [] - - - [] - [] - - [] - [] - [] - [] - [] - [] - [] - [] - [] - - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - - - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - - [] - - - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - - - [] - [] - [] - [] - do() - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/prim-types.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/prim-types.fsi deleted file mode 100644 index 577847be..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/prim-types.fsi +++ /dev/null @@ -1,2248 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -#nowarn "35" // This construct is deprecated: the treatment of this operator is now handled directly by the F# compiler and its meaning may not be redefined. -#nowarn "61" // The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. -#nowarn "62" // This construct is for compatibility with OCaml. The syntax 'module ... : sig .. end' is deprecated unless OCaml compatibility is enabled. Consider using 'module ... = begin .. end'. - -/// Basic F# type definitions, functions and operators -namespace Microsoft.FSharp.Core - - open System - - /// An abbreviation for the .NET type System.Object - type obj = System.Object - - /// An abbreviation for the .NET type System.Exception - type exn = System.Exception - - /// An abbreviation for the .NET type System.IntPtr - type nativeint = System.IntPtr - /// An abbreviation for the .NET type System.UIntPtr - type unativeint = System.UIntPtr - - /// An abbreviation for the .NET type System.String - type string = System.String - - /// An abbreviation for the .NET type System.Single - type float32 = System.Single - /// An abbreviation for the .NET type System.Double - type float = System.Double - /// An abbreviation for the .NET type System.Single - type single = System.Single - /// An abbreviation for the .NET type System.Double - type double = System.Double - - /// An abbreviation for the .NET type System.SByte - type sbyte = System.SByte - /// An abbreviation for the .NET type System.Byte - type byte = System.Byte - /// An abbreviation for the .NET type System.SByte - type int8 = System.SByte - /// An abbreviation for the .NET type System.Byte - type uint8 = System.Byte - - /// An abbreviation for the .NET type System.Int16 - type int16 = System.Int16 - /// An abbreviation for the .NET type System.UInt16 - type uint16 = System.UInt16 - - /// An abbreviation for the .NET type System.Int32 - type int32 = System.Int32 - /// An abbreviation for the .NET type System.UInt32 - type uint32 = System.UInt32 - - /// An abbreviation for the .NET type System.Int64 - type int64 = System.Int64 - /// An abbreviation for the .NET type System.UInt64 - type uint64 = System.UInt64 - - /// An abbreviation for the .NET type System.Char - type char = System.Char - /// An abbreviation for the .NET type System.Boolean - type bool = System.Boolean - /// An abbreviation for the .NET type System.Decimal - type decimal = System.Decimal - - /// An abbreviation for the .NET type System.Int32 - type int = int32 - - /// Single dimensional, zero-based arrays, written 'int[]', 'string[]' etc. - /// Use the values in the Array module to manipulate values - /// of this type, or the notation 'arr.[x]' to get/set array - /// values. - type 'T ``[]`` = (# "!0[]" #) - - /// Two dimensional arrays, typically zero-based. - /// - /// Use the values in the Array2D module - /// to manipulate values of this type, or the notation 'arr.[x,y]' to get/set array - /// values. - /// - /// Non-zero-based arrays can also be created using methods on the System.Array type. - type 'T ``[,]`` = (# "!0[0 ... , 0 ... ]" #) - - /// Three dimensional arrays, typically zero-based. Non-zero-based arrays - /// can be created using methods on the System.Array type. - /// - /// Use the values in the Array3D module - /// to manipulate values of this type, or the notation 'arr.[x1,x2,x3]' to get and set array - /// values. - type 'T ``[,,]`` = (# "!0[0 ...,0 ...,0 ...]" #) - - /// Four dimensional arrays, typically zero-based. Non-zero-based arrays - /// can be created using methods on the System.Array type. - /// - /// Use the values in the Array4D module - /// to manipulate values of this type, or the notation 'arr.[x1,x2,x3,x4]' to get and set array - /// values. - type 'T ``[,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...]" #) - - /// Single dimensional, zero-based arrays, written 'int[]', 'string[]' etc. - /// Use the values in the Array module to manipulate values - /// of this type, or the notation 'arr.[x]' to get/set array - /// values. - type 'T array = 'T[] - - - /// Represents a managed pointer in F# code. - type 'T byref = (# "!0&" #) - - /// Represents an unmanaged pointer in F# code. - /// - /// This type should only be used when writing F# code that interoperates - /// with native code. Use of this type in F# code may result in - /// unverifiable code being generated. Conversions to and from the - /// nativeint type may be required. Values of this type can be generated - /// by the functions in the NativeInterop.NativePtr module. - type nativeptr<'T> = (# "native int" #) - - /// This type is for internal use by the F# code generator - type 'T ilsigptr = (# "!0*" #) - - - -#if FX_ATLEAST_40 - // we get IStructrualEquatable and IStructuralComparable from System - type IStructuralEquatable = System.Collections.IStructuralEquatable - type IStructuralComparable = System.Collections.IStructuralComparable -#else - //------------------------------------------------------------------------- - // Structural equality - type IStructuralEquatable = - interface - abstract Equals: o:obj * comp:System.Collections.IEqualityComparer -> bool - abstract GetHashCode: comp:System.Collections.IEqualityComparer -> int - end - - //------------------------------------------------------------------------- - // Structural comparison - and IStructuralComparable = - interface - abstract CompareTo: o:obj * comp:System.Collections.IComparer -> int - end -#endif - - /// The type 'unit', which has only one value "()". This value is special and - /// always uses the representation 'null'. - and Unit = - interface System.IComparable - - /// The type 'unit', which has only one value "()". This value is special and - /// always uses the representation 'null'. - and unit = Unit - - /// Indicates the relationship between a compiled entity in a CLI binary and an element in F# source code - type SourceConstructFlags = - /// Indicates that the compiled entity has no relationship to an element in F# source code - | None = 0 - /// Indicates that the compiled entity is part of the representation of an F# union type declaration - | SumType = 1 - /// Indicates that the compiled entity is part of the representation of an F# record type declaration - | RecordType = 2 - /// Indicates that the compiled entity is part of the representation of an F# class or other object type declaration - | ObjectType = 3 - /// Indicates that the compiled entity is part of the representation of an F# record or union case field declaration - | Field = 4 - /// Indicates that the compiled entity is part of the representation of an F# exception declaration - | Exception = 5 - /// Indicates that the compiled entity is part of the representation of an F# closure - | Closure = 6 - /// Indicates that the compiled entity is part of the representation of an F# module declaration - | Module = 7 - /// Indicates that the compiled entity is part of the representation of an F# union case declaration - | UnionCase = 8 - /// Indicates that the compiled entity is part of the representation of an F# value declaration - | Value = 9 - /// The mask of values related to the kind of the compiled entity - | KindMask = 31 - /// Indicates that the compiled entity had private or internal representation in F# source code - | NonpublicRepresentation = 32 - - [] - /// Indicates one or more adjustments to the compiled representation of an F# type or member - type CompilationRepresentationFlags = - /// No special compilation representation - | None = 0 - /// Compile an instance member as 'static' - | Static = 1 - /// Compile a member as 'instance' even if null is used as a representation for this type - | Instance = 2 - /// append 'Module' to the end of a module whose name clashes with a type name in the same namespace - | ModuleSuffix = 4 - /// Permit the use of null as a representation for nullary discriminators in a discriminated union - | UseNullAsTrueValue = 8 - /// Compile a property as a .NET event - | Event = 16 - - //------------------------------------------------------------------------- - // F#-specific Attributes - - - /// Adding this attribute to class definition makes it sealed, which means it may not - /// be extended or implemented. - [] - type SealedAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> SealedAttribute - - /// The value of the attribute, indicating whether the type is sealed or not - member Value: bool - /// Create an instance of the attribute - new : value:bool -> SealedAttribute - - /// Adding this attribute to class definition makes it abstract, which means it need not - /// implement all its methods. Instances of abstract classes may not be constructed directly. - [] - [] - type AbstractClassAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> AbstractClassAttribute - - - /// Adding this attribute to the let-binding for the definition of a top-level - /// value makes the quotation expression that implements the value available - /// for use at runtime. - [] - [] - type ReflectedDefinitionAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> ReflectedDefinitionAttribute - - /// Adding this attribute to a type causes it to be represented using a .NET struct. - [] - [] - type StructAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> StructAttribute - - /// Adding this attribute to a type causes it to be interpreted as a unit of measure. - /// This may only be used under very limited conditions. - [] - [] - type MeasureAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> MeasureAttribute - - /// Adding this attribute to a type causes it to be interpreted as a refined type, currently limited to measure-parameterized types. - /// This may only be used under very limited conditions. - [] - [] - type MeasureAnnotatedAbbreviationAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> MeasureAnnotatedAbbreviationAttribute - - /// Adding this attribute to a type causes it to be represented using a .NET interface. - [] - [] - type InterfaceAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> InterfaceAttribute - - /// Adding this attribute to a type causes it to be represented using a .NET class. - [] - [] - type ClassAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> ClassAttribute - - /// Adding this attribute to a value causes it to be compiled as a .NET constant literal. - [] - [] - type LiteralAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> LiteralAttribute - - /// Adding this attribute to a property with event type causes it to be compiled with as a .NET - /// Common Language Infrastructure metadata event, through a syntactic translation to a pair of - /// 'add_EventName' and 'remove_EventName' methods. - [] - [] - type CLIEventAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> CLIEventAttribute - - /// Adding this attribute to a discriminated union with value false - /// turns off the generation of standard helper member tester, constructor - /// and accessor members for the generated .NET class for that type. - [] - [] - type DefaultAugmentationAttribute = - inherit System.Attribute - /// The value of the attribute, indicating whether the type has a default augmentation or not - member Value: bool - /// Create an instance of the attribute - new : value:bool -> DefaultAugmentationAttribute - - /// Adding this attribute to a function indicates it is the entrypoint for an application. - /// If this absent is not speficied for an EXE then the initialization implicit in the - /// module bindings in the last file in the compilation sequence are used as the entrypoint. - [] - [] - type EntryPointAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> EntryPointAttribute - - /// Adding this attribute to a record or union type disables the automatic generation - /// of overrides for 'System.Object.Equals(obj)', 'System.Object.GetHashCode()' - /// and 'System.IComparable' for the type. The type will by default use reference equality. - /// This is identical to adding attributes StructuralEquality(false) and StructuralComparison(false). - [] - [] - type ReferenceEqualityAttribute = - inherit System.Attribute - member Value: bool - /// Create an instance of the attribute - new : unit -> ReferenceEqualityAttribute - /// Create an instance of the attribute - new : value:bool -> ReferenceEqualityAttribute - - /// Adding this attribute to a record, union or struct type with value 'false' - /// confirms the automatic generation of overrides for 'System.Object.Equals(obj)' - /// and 'System.Object.GetHashCode()' for the type. This attribute is usually used in - /// conjunction with StructuralComparison(false) to generate a type that supports - /// structural equality but not structural comparison. - [] - [] - type StructuralEqualityAttribute = - inherit System.Attribute - /// The value of the attribute, indicating whether the type uses structural equality or not - member Value: bool - /// Create an instance of the attribute - new : unit -> StructuralEqualityAttribute - /// Create an instance of the attribute - new : value:bool -> StructuralEqualityAttribute - - /// Adding this attribute to a record, union or struct type with value 'false' disables the automatic generation - /// of implementations for 'System.IComparable' for the type. - [] - [] - type StructuralComparisonAttribute = - inherit System.Attribute - /// The value of the attribute, indicating whether the type uses structural comparison or not - member Value: bool - /// Create an instance of the attribute - new : unit -> StructuralComparisonAttribute - /// Create an instance of the attribute - new : value:bool -> StructuralComparisonAttribute - - /// Adding this attribute to a field declaration means that the field is - /// not initialized. During type checking a constraint is asserted that the field type supports 'null'. - /// If the 'check' value is false then the constraint is not asserted. - [] - [] - type DefaultValueAttribute = - inherit System.Attribute - /// Indicates if a constraint is asserted that the field type supports 'null' - member Check: bool - /// Create an instance of the attribute - new : unit -> DefaultValueAttribute - /// Create an instance of the attribute - new : check: bool -> DefaultValueAttribute - - /// This attribute is added automatically for all optional arguments - [] - [] - type OptionalArgumentAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> OptionalArgumentAttribute - - /// Adding this attribute to a type, value or member requires that - /// uses of the construct must explicitly instantiate any generic type parameters. - [] - [] - type RequiresExplicitTypeArgumentsAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> RequiresExplicitTypeArgumentsAttribute - - /// Adding this attribute to a non-function value with generic parameters indicates that - /// uses of the construct can give rise to generic code through type inference. - [] - [] - type GeneralizableValueAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> GeneralizableValueAttribute - - /// Adding the OverloadID attribute to a member permits it to - /// be part of a group overloaded by the same name and arity. The string - /// must be a unique name amongst those in the overload set. Overrides - /// of this method, if permitted, must be given the same OverloadID, - /// and the OverloadID must be specified in both signature and implementation - /// files if signature files are used. - [] - [] - type OverloadIDAttribute = - inherit System.Attribute - /// A unique identifier for this overloaded member within a given overload set - member UniqueName: string - /// Create an instance of the attribute - new : uniqueName:string -> OverloadIDAttribute - - /// Adding this attribute to a type with value 'false' disables the behaviour where F# makes the - /// type Serializable by default. - [] - [] - type AutoSerializableAttribute = - inherit System.Attribute - /// The value of the attribute, indicating whether the type is automatically marked serializable or not - member Value: bool - /// Create an instance of the attribute - new : value:bool -> AutoSerializableAttribute - - /// This attribute is added to generated assemblies to indicate the - /// version of the data schema used to encode additional F# - /// specific information in the resource attached to compiled F# libraries. - [] - [] - type FSharpInterfaceDataVersionAttribute = - inherit System.Attribute - /// The major version number of the F# version associated with the attribute - member Major: int - /// The minor version number of the F# version associated with the attribute - member Minor: int - /// The release number of the F# version associated with the attribute - member Release: int - /// Create an instance of the attribute - new : major:int * minor:int * release:int -> FSharpInterfaceDataVersionAttribute - - /// This attribute is inserted automatically by the F# compiler to tag - /// types and methods in the gneerated .NET code with flags indicating the correspondence with - /// original source constructs. It is used by the functions in the - /// Microsoft.FSharp.Reflection library to reverse-map compiled constructs - /// to their original forms. It is not intended for use from use code. - [] - [] - type CompilationMappingAttribute = - inherit System.Attribute - /// Indicates the relationship between the compiled entity and F# source code - member SourceConstructFlags : SourceConstructFlags - /// Indicates the sequence number of the entity, if any, in a linear sequence of elements with F# source code - member SequenceNumber : int - /// Indicates the variant number of the entity, if any, in a linear sequence of elements with F# source code - member VariantNumber : int - /// Create an instance of the attribute - new : sourceConstructFlags:SourceConstructFlags -> CompilationMappingAttribute - /// Create an instance of the attribute - new : sourceConstructFlags:SourceConstructFlags * sequenceNumber: int -> CompilationMappingAttribute - /// Create an instance of the attribute - new : sourceConstructFlags:SourceConstructFlags * variantNumber : int * sequenceNumber : int -> CompilationMappingAttribute - - /// This attribute is used to adjust the runtime representation for a type. - /// For example, it may be used to note that the null representation - /// may be used for a type. This affects how some constructs are compiled. - [] - [] - type CompilationRepresentationAttribute = - inherit System.Attribute - /// Indicates one or more adjustments to the compiled representation of an F# type or member - member Flags : CompilationRepresentationFlags - /// Create an instance of the attribute - new : flags:CompilationRepresentationFlags -> CompilationRepresentationAttribute - - /// This attribute is used to tag values that are part of an experimental library - /// feature - [] - [] - type ExperimentalAttribute = - inherit System.Attribute - /// Indicates the warning message to be emitted when F# source code uses this construct - member Message: string - /// Create an instance of the attribute - new : message:string-> ExperimentalAttribute - - /// This attribute is used to mark how a type is displayed by default when using - /// '%A' printf formatting patterns and other two-dimensional text-based display layouts. - /// In this version of F# the only valid values are of the form PreText {PropertyName} PostText. - /// The property name indicates a property to evaluate and to display instead of the object itself. - [] - [] - type StructuredFormatDisplayAttribute = - inherit System.Attribute - /// Indicates the text to display by default when objects of this type are displayed - /// using '%A' printf formatting patterns and other two-dimensional text-based display - /// layouts. - member Value: string - /// Create an instance of the attribute - new : value:string-> StructuredFormatDisplayAttribute - - - /// This attribute is used to tag values, modules and types that are only - /// present in F# to permit a degree of code-compatibility and cross-compilation - /// with other implementations of ML-familty languages, in particular OCaml. The - /// use of the construct will give a warning unless the --ml-compatibility flag - /// is specified. - [] - [] - type OCamlCompatibilityAttribute = - inherit System.Attribute - /// Indicates the warning message to be emitted when F# source code uses this construct - member Message: string - /// Create an instance of the attribute - new : unit -> OCamlCompatibilityAttribute - /// Create an instance of the attribute - new : message:string -> OCamlCompatibilityAttribute - - /// This attribute is used to tag values whose use will result in the generation - /// of unverifiable code. These values are inevitably marked 'inline' to ensure that - /// the unverifiable constructs are not present in the actual code for the F# library, - /// but are rather copied to the source code of the caller. - [] - [] - type UnverifiableAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> UnverifiableAttribute - - /// This attribute is used to tag values that may not be dynamically invoked at runtime. This is - /// typically added to inlined functions whose implementations include unverifiable code. It - /// causes the method body emitted for the inlined function to raise an exception if - /// dynamically invoked, rather than including the unverifiable code in the generated - /// assembly. - [] - [] - type NoDynamicInvocationAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> NoDynamicInvocationAttribute - - - /// This attribute is used to indicate that references to a the elements of a module, record or union - /// type require explicit qualified access. - [] - [] - type RequireQualifiedAccessAttribute = - inherit System.Attribute - /// Create an instance of the attribute - new : unit -> RequireQualifiedAccessAttribute - - /// This attribute is used for two purposes. When applied to an assembly, it must be given a string - /// argument, and this argument must indicate a valid module or namespace in that assembly. Source - /// code files compiled with a reference to this assembly are processed in an environment - /// where the given path is automatically oepned. - /// - /// When applied to a module within an assembly, then the attribute must not be given any arguments. - /// When the enclosing namespace is opened in user source code, the module is also implicitly opened. - [] - [] - type AutoOpenAttribute = - inherit System.Attribute - /// Indicates the namespace or module to be automatically opened when an assembly is referenced - /// or an enclosing module opened. - member Path: string - /// Create an attribute used to mark a module as 'automatically opened' when the enclosing namespace is opened - new : unit -> AutoOpenAttribute - /// Create an attribute used to mark a namespace or module path to be 'automatically opened' when an assembly is referenced - new : path:string-> AutoOpenAttribute - - //------------------------------------------------------------------------- - // Units of measure - - [] - /// The type of floating point numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Double. - type float<[] 'U> = float - - [] - /// The type of floating point numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Single. - type float32<[] 'U> = float32 - - [] - /// The type of decimal numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Decimal. - type decimal<[] 'U> = decimal - - [] - /// The type of 32-bit signed integer numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int32. - type int<[] 'U> = int - - [] - /// The type of 8-bit signed integer numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.SByte. - type int8<[] 'U> = int8 - - [] - /// The type of 16-bit signed integer numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int16. - type int16<[] 'U> = int16 - - [] - /// The type of 64-bit signed integer numbers, annotated with a unit of measure. The unit - /// of measure is erased in compiled code and when values of this type - /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int64. - type int64<[] 'U> = int64 - - //[] - //type MeasureProduct<[] 'U1, [] 'U2> = decimal - - - /// Language primitives associated with the F# language - module LanguagePrimitives = - - - /// Compare two values for equality - val inline GenericEquality : e1:'T -> e2:'T -> bool - - /// Compare two values for equality - val inline GenericEqualityWithComparer : comp:System.Collections.IEqualityComparer -> e1:'T -> e2:'T -> bool - - /// Compare two values - val inline GenericComparison : e1:'T -> e2:'T -> int - - /// Compare two values. May be called as a recursive case from an implementation of System.IComparable to - /// ensure consistent NaN comparison semantics. - val inline GenericComparisonWithComparer : comp:System.Collections.IComparer -> e1:'T -> e2:'T -> int - - /// Compare two values - val inline GenericLessThan : e1:'T -> e2:'T -> bool - - /// Compare two values - val inline GenericGreaterThan : e1:'T -> e2:'T -> bool - - /// Compare two values - val inline GenericLessOrEqual : e1:'T -> e2:'T -> bool - - /// Compare two values - val inline GenericGreaterOrEqual : e1:'T -> e2:'T -> bool - - /// Take the minimum of two values structurally according to the order given by GenericComparison - val inline GenericMinimum : e1:'T -> e2:'T -> 'T - - /// Take the maximum of two values structurally according to the order given by GenericComparison - val inline GenericMaximum : e1:'T -> e2:'T -> 'T - - - /// Reference/physical equality. - /// True if boxed versions of the inputs are reference-equal, OR if - /// both are primitive numeric types and the implementation of Object.Equals for the type - /// of the first argument returns true on the boxed versions of the inputs. - val inline PhysicalEquality : e1:'T -> e2:'T -> bool - - /// The physical hash. Hashes on the object identity, except for value types, - /// where we hash on the contents. - val inline PhysicalHash : obj:'T -> int - - /// Return an F# comparer object suitable for hashing and equality. This hashing behaviour - /// of the returned comparer is not limited by an overall node count when hashing F# - /// records, lists and union types. - val FSharpEqualityComparer : unit -> System.Collections.IEqualityComparer - - /// A static F# comparer object - val FSharpComparer : unit -> System.Collections.IComparer - - /// Make an F# comparer object for the given type - val FastGenericComparer<'T> : System.Collections.Generic.IComparer<'T> - - /// Make an F# hash/equality object for the given type - val inline FastGenericEqualityComparer<'T> : System.Collections.Generic.IEqualityComparer<'T> - - /// Make an F# hash/equality object for the given type using node-limited hashing when hashing F# - /// records, lists and union types. - val inline FastLimitedGenericEqualityComparer<'T> : limit: int -> System.Collections.Generic.IEqualityComparer<'T> - - /// Hash a value according to its structure. This hash is not limited by an overall node count when hashing F# - /// records, lists and union types. - val inline GenericHash : obj:'T -> int - - /// Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# - /// records, lists and union types. - val inline GenericLimitedHash : limit: int -> obj:'T -> int - - /// Recursively hash a part of a value according to its structure. - val inline GenericHashWithComparer : comparer : System.Collections.IEqualityComparer -> obj:'T -> int - - /// Generate a null value for reference types. - val inline DefaultValue<'T when 'T : null> : 'T - - /// Build an enum value from an underlying value - val inline EnumOfValue : value:'T -> 'Enum when 'Enum : enum<'T> - - /// Get the underlying value for an enum value - val inline EnumToValue : enum:'Enum -> 'T when 'Enum : enum<'T> - - /// Parse an int32 according to the rules used by the overloaded 'int32' conversion operator when applied to strings - val ParseInt32 : s:string -> int32 - - /// Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings - val ParseUInt32 : s:string -> uint32 - - /// Parse an int64 according to the rules used by the overloaded 'int64' conversion operator when applied to strings - val ParseInt64 : s:string -> int64 - - /// Parse an uint64 according to the rules used by the overloaded 'uint64' conversion operator when applied to strings - val ParseUInt64 : s:string -> uint64 - - /// Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' - [] - val GenericZeroDynamic : unit -> 'T - - /// Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' - [] - val GenericOneDynamic : unit -> 'T - - /// A compiler intrinsic that implements dynamic invocations to the '+' operator - [] - val AdditionDynamic : x:'T -> y:'U -> 'V - - /// A compiler intrinsic that implements dynamic invocations to the checked '+' operator - [] - val CheckedAdditionDynamic : x:'T -> y:'U -> 'V - - /// A compiler intrinsic that implements dynamic invocations to the '+' operator - [] - val MultiplyDynamic : x:'T -> y:'U -> 'V - - /// A compiler intrinsic that implements dynamic invocations to the checked '+' operator - [] - val CheckedMultiplyDynamic : x:'T -> y:'U -> 'V - - /// A compiler intrinsic that implements dynamic invocations for the DivideByInt primitive - [] - val DivideByIntDynamic : x:'T -> y:int -> 'T - - /// Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' - val inline GenericZero< ^T > : ^T when ^T : (static member Zero : ^T) - - /// Resolves to the one value for any primitive numeric type or any type with a static member called 'One' - val inline GenericOne< ^T > : ^T when ^T : (static member One : ^T) - - /// Divide a floating point value by an integer - val inline DivideByInt< ^T > : x:^T -> y:int -> ^T when ^T : (static member DivideByInt : ^T * int -> ^T) - - //------------------------------------------------------------------------- - - /// The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - module IntrinsicOperators = - - /// Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand - [] - val ( & ) : e1:bool -> e2:bool -> bool - /// Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand - val ( && ) : e1:bool -> e2:bool -> bool - /// Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand - //[] - val ( or ) : e1:bool -> e2:bool -> bool - /// Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand - val ( || ) : e1:bool -> e2:bool -> bool - /// Address-of. Uses of this value may result in the generation of unverifiable code. - [] - val inline ( ~& ) : obj:'T -> 'T byref - /// Address-of. Uses of this value may result in the generation of unverifiable code. - [] - val inline ( ~&& ) : obj:'T -> nativeptr<'T> - - //------------------------------------------------------------------------- - - /// The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - module IntrinsicFunctions = - - /// A compiler intrinsic that implements the ':?>' operator - [] - val UnboxGeneric<'T> : source:obj -> 'T - - /// A compiler intrinsic that implements the ':?>' operator - [] - val inline UnboxFast<'T> : source:obj -> 'T - - /// A compiler intrinsic that implements the ':?' operator - [] - val TypeTestGeneric<'T> : source:obj -> bool - - /// A compiler intrinsic that implements the ':?' operator - [] - val inline TypeTestFast<'T> : source:obj -> bool - - /// Primitive used by pattern match compilation - //[] - val inline GetString : source:string -> index:int -> char - - /// This function implements calls to default constructors - /// acccessed by 'new' constraints. - [] - val inline CreateInstance : unit -> 'T when 'T : (new : unit -> 'T) - - /// This function implements parsing of decimal constants - [] - val inline MakeDecimal : low:int -> medium:int -> high:int -> isNegative:bool -> scale:byte -> decimal - - /// A compiler intrinsic for the efficeint compilation of sequence expressions - [] - val Dispose<'T when 'T :> System.IDisposable > : resource:'T -> unit - - /// The standard overloaded associative (indexed) lookup operator - //[] - val inline GetArray : source:'T[] -> index:int -> 'T - - /// The standard overloaded associative (2-indexed) lookup operator - //[] - val inline GetArray2D : source:'T[,] -> index1:int * index2:int -> 'T - - /// The standard overloaded associative (3-indexed) lookup operator - //[] - val inline GetArray3D : source:'T[,,] ->index1:int * index2:int * index3:int -> 'T - - /// The standard overloaded associative (4-indexed) lookup operator - //[] - val inline GetArray4D : source:'T[,,,] ->index1:int * index2:int * index3:int * index4:int -> 'T - - /// The standard overloaded associative (indexed) mutation operator - //[] - val inline SetArray : target:'T[] -> index:int * value:'T -> unit - - /// The standard overloaded associative (2-indexed) mutation operator - //[] - val inline SetArray2D : target:'T[,] -> index1:int * index2:int * value:'T -> unit - - /// The standard overloaded associative (3-indexed) mutation operator - //[] - val inline SetArray3D : target:'T[,,] -> index1:int * index2:int * index3:int * value:'T -> unit - - /// The standard overloaded associative (4-indexed) mutation operator - //[] - val inline SetArray4D : target:'T[,,,] -> index1:int * index2:int * index3:int * index4:int * value:'T -> unit - - /// The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs - module HashCompare = - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val PhysicalHashIntrinsic : input:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val PhysicalEqualityIntrinsic : x:'T -> y:'T -> bool - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericHashIntrinsic : input:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val LimitedGenericHashIntrinsic : limit: int -> input:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericHashWithComparerIntrinsic : comp:System.Collections.IEqualityComparer -> input:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericComparisonWithComparerIntrinsic : comp:System.Collections.IComparer -> x:'T -> y:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericComparisonIntrinsic : x:'T -> y:'T -> int - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericEqualityIntrinsic : x:'T -> y:'T -> bool - // A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericEqualityWithComparerIntrinsic : comp:System.Collections.IEqualityComparer -> x:'T -> y:'T -> bool - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericLessThanIntrinsic : x:'T -> y:'T -> bool - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericGreaterThanIntrinsic : x:'T -> y:'T -> bool - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericGreaterOrEqualIntrinsic : x:'T -> y:'T -> bool - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val GenericLessOrEqualIntrinsic : x:'T -> y:'T -> bool - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastHashTuple2 : comparer:System.Collections.IEqualityComparer -> tuple:('T1 * 'T2) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastHashTuple3 : comparer:System.Collections.IEqualityComparer -> tuple:('T1 * 'T2 * 'T3) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastHashTuple4 : comparer:System.Collections.IEqualityComparer -> tuple:('T1 * 'T2 * 'T3 * 'T4) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastHashTuple5 : comparer:System.Collections.IEqualityComparer -> tuple:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastEqualsTuple2 : comparer:System.Collections.IEqualityComparer -> tuple1:('T1 * 'T2) -> tuple2:('T1 * 'T2) -> bool - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastEqualsTuple3 : comparer:System.Collections.IEqualityComparer -> tuple1:('T1 * 'T2 * 'T3) -> tuple2:('T1 * 'T2 * 'T3) -> bool - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastEqualsTuple4 : comparer:System.Collections.IEqualityComparer -> tuple1:('T1 * 'T2 * 'T3 * 'T4) -> tuple2:('T1 * 'T2 * 'T3 * 'T4) -> bool - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastEqualsTuple5 : comparer:System.Collections.IEqualityComparer -> tuple1:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> tuple2:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> bool - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastCompareTuple2 : comparer:System.Collections.IComparer -> tuple1:('T1 * 'T2) -> tuple2:('T1 * 'T2) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastCompareTuple3 : comparer:System.Collections.IComparer -> tuple1:('T1 * 'T2 * 'T3) -> tuple2:('T1 * 'T2 * 'T3) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastCompareTuple4 : comparer:System.Collections.IComparer -> tuple1:('T1 * 'T2 * 'T3 * 'T4) -> tuple2:('T1 * 'T2 * 'T3 * 'T4) -> int - - /// A primitive entry point used by the F# compiler for optimization purposes. - [] - val inline FastCompareTuple5 : comparer:System.Collections.IComparer -> tuple1:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> tuple2:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> int - - -#if FX_ATLEAST_40 -#else - //------------------------------------------------------------------------- - // F# Tuple Types - - - /// Compiled versions of F# tuple types. These are not used directly, though - /// these compiled forms are seen by other .NET languages. - type Tuple<'T1> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 -> Tuple<'T1> - member Item1 : 'T1 with get -#if TUPLE_STRUXT - [] - type Tuple<'T1,'T2> = - new : 'T1 * 'T2 -> Tuple<'T1,'T2> - val Item1 : 'T1 - val Item2 : 'T2 // -#else - type Tuple<'T1,'T2> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 -> Tuple<'T1,'T2> - member Item1 : 'T1 with get - member Item2 : 'T2 with get -#endif - - type Tuple<'T1,'T2,'T3> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 -> Tuple<'T1,'T2,'T3> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - - type Tuple<'T1,'T2,'T3,'T4> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 * 'T4 -> Tuple<'T1,'T2,'T3,'T4> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - member Item4 : 'T4 with get - - type Tuple<'T1,'T2,'T3,'T4,'T5> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> Tuple<'T1,'T2,'T3,'T4,'T5> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - member Item4 : 'T4 with get - member Item5 : 'T5 with get - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6-> Tuple<'T1,'T2,'T3,'T4,'T5,'T6> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - member Item4 : 'T4 with get - member Item5 : 'T5 with get - member Item6 : 'T6 with get - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 -> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - member Item4 : 'T4 with get - member Item5 : 'T5 with get - member Item6 : 'T6 with get - member Item7 : 'T7 with get - - type Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> = - interface IStructuralEquatable - interface IStructuralComparable - interface IComparable - new : 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'TRest -> Tuple<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TRest> - member Item1 : 'T1 with get - member Item2 : 'T2 with get - member Item3 : 'T3 with get - member Item4 : 'T4 with get - member Item5 : 'T5 with get - member Item6 : 'T6 with get - member Item7 : 'T7 with get - member Rest : 'TRest with get -#endif - - //------------------------------------------------------------------------- - // F# Choice Types - - - /// Helper types for active patterns with 2 choices. - [] - //[] - type Choice<'T1,'T2> = - /// Choice 1 of 2 choices - | Choice1Of2 of 'T1 - /// Choice 2 of 2 choices - | Choice2Of2 of 'T2 - - /// Helper types for active patterns with 3 choices. - [] - type Choice<'T1,'T2,'T3> = - /// Choice 1 of 3 choices - | Choice1Of3 of 'T1 - /// Choice 2 of 3 choices - | Choice2Of3 of 'T2 - /// Choice 3 of 3 choices - | Choice3Of3 of 'T3 - - /// Helper types for active patterns with 4 choices. - [] - type Choice<'T1,'T2,'T3,'T4> = - /// Choice 1 of 4 choices - | Choice1Of4 of 'T1 - /// Choice 2 of 4 choices - | Choice2Of4 of 'T2 - /// Choice 3 of 4 choices - | Choice3Of4 of 'T3 - /// Choice 4 of 4 choices - | Choice4Of4 of 'T4 - - /// Helper types for active patterns with 5 choices. - [] - type Choice<'T1,'T2,'T3,'T4,'T5> = - /// Choice 1 of 5 choices - | Choice1Of5 of 'T1 - /// Choice 2 of 5 choices - | Choice2Of5 of 'T2 - /// Choice 3 of 5 choices - | Choice3Of5 of 'T3 - /// Choice 4 of 5 choices - | Choice4Of5 of 'T4 - /// Choice 5 of 5 choices - | Choice5Of5 of 'T5 - - /// Helper types for active patterns with 6 choices. - [] - type Choice<'T1,'T2,'T3,'T4,'T5,'T6> = - /// Choice 1 of 6 choices - | Choice1Of6 of 'T1 - /// Choice 2 of 6 choices - | Choice2Of6 of 'T2 - /// Choice 3 of 6 choices - | Choice3Of6 of 'T3 - /// Choice 4 of 6 choices - | Choice4Of6 of 'T4 - /// Choice 5 of 6 choices - | Choice5Of6 of 'T5 - /// Choice 6 of 6 choices - | Choice6Of6 of 'T6 - - /// Helper types for active patterns with 7 choices. - [] - type Choice<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = - /// Choice 1 of 7 choices - | Choice1Of7 of 'T1 - /// Choice 2 of 7 choices - | Choice2Of7 of 'T2 - /// Choice 3 of 7 choices - | Choice3Of7 of 'T3 - /// Choice 4 of 7 choices - | Choice4Of7 of 'T4 - /// Choice 5 of 7 choices - | Choice5Of7 of 'T5 - /// Choice 6 of 7 choices - | Choice6Of7 of 'T6 - /// Choice 7 of 7 choices - | Choice7Of7 of 'T7 - - //------------------------------------------------------------------------- - // F# Exception Types - - - /// This exception is raised by 'failwith' - exception Failure of string - - /// Non-exhaustive match failures will raise the MatchFailure exception - exception MatchFailure of string * int * int - /// Dynamic invocations of functions marked with the NoDynamicInvocationAttribute attribute raise this exception - exception DynamicInvocationNotSupported of string - - - //------------------------------------------------------------------------- - // F# Function Types - - - /// The .NET type used to represent F# first-class type function values. This type is for use - /// by compiled F# code. - [] - type TypeFunc = - /// Specialize the type function at a given type - abstract Specialize<'T> : unit -> obj - /// Construct an instance of an F# first class type function value - new : unit -> TypeFunc - - /// The .NET type used to represent F# function values. This type is not - /// typically used directly, though may be used from other .NET languages. - [] - type FastFunc<'T,'Result> = - /// Invoke an F# first class function value with one argument - abstract member Invoke : func:'T -> 'Result - [] - /// Convert an F# first class function value to a value of type System.Converter - static member op_Implicit : func:('T -> 'Result) -> System.Converter <'T,'Result> - [] - /// Convert an value of type System.Converter to a F# first class function value - static member op_Implicit : converter:System.Converter <'T,'Result> -> ('T -> 'Result) - - /// Convert an F# first class function value to a value of type System.Converter - static member ToConverter : func:('T -> 'Result) -> System.Converter <'T,'Result> - /// Convert an value of type System.Converter to a F# first class function value - static member FromConverter : converter:System.Converter <'T,'Result> -> ('T -> 'Result) - - /// Invoke an F# first class function value with five curried arguments. In some cases this - /// will result in a more efficient application than applying the arguments successively. - static member InvokeFast : func:FastFunc <'T,('Result -> 'V -> 'W -> 'X -> 'Y)> * arg1:'T * arg2:'Result * arg3:'V * arg4:'W * arg5:'X -> 'Y - /// Invoke an F# first class function value with four curried arguments. In some cases this - /// will result in a more efficient application than applying the arguments successively. - static member InvokeFast : func:FastFunc <'T,('Result -> 'V -> 'W -> 'X)> * arg1:'T * arg2:'Result * arg3:'V * arg4:'W -> 'X - /// Invoke an F# first class function value with three curried arguments. In some cases this - /// will result in a more efficient application than applying the arguments successively. - static member InvokeFast : func:FastFunc <'T,('Result -> 'V -> 'W)> * arg1:'T * arg2:'Result * arg3:'V -> 'W - /// Invoke an F# first class function value with two curried arguments. In some cases this - /// will result in a more efficient application than applying the arguments successively. - static member InvokeFast : func:FastFunc <'T,('Result -> 'V)> * arg1:'T * arg2:'Result -> 'V - - /// Construct an instance of an F# first class function value - new : unit -> FastFunc <'T,'Result> - - [] - [] - /// Helper functions for converting F# first class function values to and from .NET representaions - /// of functions using delegates. - type FuncConvert = - [] - /// Convert the given Action delegate object to an F# function value - static member ToFastFunc : action:Action<'T> -> ('T -> unit) - - [] - /// Convert the given Converter delegate object to an F# function value - static member ToFastFunc : converter:Converter<'T,'U> -> ('T -> 'U) - - [] - /// A utility funcion to convert function values from tupled to curried form - static member FuncFromTupled : func:('T -> 'U) -> ('T -> 'U) - - [] - /// A utility funcion to convert function values from tupled to curried form - static member FuncFromTupled : func:('T1 * 'T2 -> 'U) -> ('T1 -> 'T2 -> 'U) - - [] - /// A utility funcion to convert function values from tupled to curried form - static member FuncFromTupled : func:('T1 * 'T2 * 'T3 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'U) - - [] - /// A utility funcion to convert function values from tupled to curried form - static member FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) - - [] - /// A utility funcion to convert function values from tupled to curried form - static member FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) - - /// An implementation module used to hold some private implementations of function - /// value invocation. - module OptimizedClosures = - - /// The .NET type used to represent F# function values that accept - /// two iterated (curried) arguments without intervening execution. This type should not - /// typically used directly from either F# code or from other .NET languages. - [] - type FastFunc2<'T1,'T2,'Result> = - inherit FastFunc <'T1,('T2 -> 'Result)> - /// Invoke the optimized function value with two curried arguments - abstract member Invoke : arg1:'T1 * arg2:'T2 -> 'Result - /// Adapt an F# first class function value to be an optimized function value that can - /// accept two curried arguments without intervening execution. - static member Adapt : func:('T1 -> 'T2 -> 'Result) -> FastFunc2<'T1,'T2,'Result> - /// Construct an optimized function value that can accept two curried - /// arguments without intervening execution. - new : unit -> FastFunc2 <'T1,'T2,'Result> - - /// The .NET type used to represent F# function values that accept - /// three iterated (curried) arguments without intervening execution. This type should not - /// typically used directly from either F# code or from other .NET languages. - [] - type FastFunc3<'T1,'T2,'T3,'Result> = - inherit FastFunc <'T1,('T2 -> 'T3 -> 'Result)> - /// Invoke an F# first class function value that accepts three curried arguments - /// without intervening execution - abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 -> 'Result - /// Adapt an F# first class function value to be an optimized function value that can - /// accept three curried arguments without intervening execution. - static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'Result) -> FastFunc3<'T1,'T2,'T3,'Result> - /// Construct an optimized function value that can accept three curried - /// arguments without intervening execution. - new : unit -> FastFunc3 <'T1,'T2,'T3,'Result> - - /// The .NET type used to represent F# function values that accept - /// four iterated (curried) arguments without intervening execution. This type should not - /// typically used directly from either F# code or from other .NET languages. - [] - type FastFunc4<'T1,'T2,'T3,'T4,'Result> = - inherit FastFunc <'T1,('T2 -> 'T3 -> 'T4 -> 'Result)> - /// Invoke an F# first class function value that accepts four curried arguments - /// without intervening execution - abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 * arg4:'T4 -> 'Result - /// Adapt an F# first class function value to be an optimized function value that can - /// accept four curried arguments without intervening execution. - static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'T4 -> 'Result) -> FastFunc4<'T1,'T2,'T3,'T4,'Result> - /// Construct an optimized function value that can accept four curried - /// arguments without intervening execution. - new : unit -> FastFunc4 <'T1,'T2,'T3,'T4,'Result> - - /// The .NET type used to represent F# function values that accept - /// five iterated (curried) arguments without intervening execution. This type should not - /// typically used directly from either F# code or from other .NET languages. - [] - type FastFunc5<'T1,'T2,'T3,'T4,'T5,'Result> = - inherit FastFunc <'T1,('T2 -> 'T3 -> 'T4 -> 'T5 -> 'Result)> - /// Invoke an F# first class function value that accepts five curried arguments - /// without intervening execution - abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 * arg4:'T4 * arg5:'T5 -> 'Result - /// Adapt an F# first class function value to be an optimized function value that can - /// accept five curried arguments without intervening execution. - static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'Result) -> FastFunc5<'T1,'T2,'T3,'T4,'T5,'Result> - /// Construct an optimized function value that can accept five curried - /// arguments without intervening execution. - new : unit -> FastFunc5 <'T1,'T2,'T3,'T4,'T5,'Result> - - - //------------------------------------------------------------------------- - // F# Mutable Reference Cells - - - /// The type of mutable references. Use the functions [:=] and [!] to get and - /// set values of this type. - type Ref <'T> = - { /// The current value of the reference cell - [] - mutable contents: 'T;} - /// The current value of the reference cell - member Value : 'T with get,set - - /// The type of mutable references. Use the functions [:=] and [!] to get and - /// set values of this type. - and 'T ref = Ref<'T> - - //------------------------------------------------------------------------- - // F# Option Types - - - /// The type of optional values. When used from other .NET languages the - /// empty option is the null value. - /// - /// Use the constructors Some and None to create values of this type. - /// Use the values in the Option module to manipulate values of this type, - /// or pattern match against the values directly. - /// - /// None values will appear as the value null to other .NET languages. - /// Instance methods on this type will appear as static methods to other .NET languages - /// due to the use of null as a value representation. - [] - [] - type Option <'T> = - /// The representation of "No value" - | None : 'T option - /// The representation of "Value of type 'T" - | Some : value:'T -> 'T option - /// Create an option value that is a 'None' value. - static member None : 'T option - /// Create an option value that is a 'Some' value. - static member Some : value:'T -> 'T option - [] - /// Get the value of a 'Some' option. A NullReferenceException is raised if the option is 'None'. - member Value : 'T - /// Return 'true' if the option is a 'Some' value. - member IsSome : bool - /// Return 'true' if the option is a 'None' value. - member IsNone : bool - - /// The type of optional values. When used from other .NET languages the - /// empty option is the null value. - /// - /// Use the constructors Some and None to create values of this type. - /// Use the values in the Option module to manipulate values of this type, - /// or pattern match against the values directly. - /// - /// 'None' values will appear as the value null to other .NET languages. - /// Instance methods on this type will appear as static methods to other .NET languages - /// due to the use of null as a value representation. - and 'T option = Option<'T> - - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - - /// The type of immutable singly-linked lists. - /// - /// Use the constructors [] and :: (infix) to create values of this type, or - /// the notation [1;2;3]. Use the values in the List module to manipulate - /// values of this type, or pattern match against the values directly. - type FSharpList<'T> = - | ([]) : 'T list - | (::) : _Head: 'T * _Tail: 'T list -> 'T list - /// Returns an empty list of a particular type - static member Empty : 'T list - - /// Gets the number of items contained in the list - member Length : int - /// Gets a value indicating if the list contains no entries - member IsEmpty : bool - - /// Gets the first element of the list - member Head : 'T - - /// Gets the tail of the list, which is a list containing all the elements of the list, excluding the first element - member Tail : 'T list - - /// Get the element of the list at the given position. Note lists are represented - /// as linked lists so this is an O(n) operation. - member Item : index:int -> 'T with get - - /// Returns a list with head as its first element and tail as its subsequent elements - static member Cons : head:'T * tail:'T list -> 'T list - - interface System.Collections.Generic.IEnumerable<'T> - interface System.Collections.IEnumerable - - /// An abbreviation for the type of immutable singly-linked lists. - /// - /// Use the constructors [] and :: (infix) to create values of this type, or - /// the notation [1;2;3]. Use the values in the List module to manipulate - /// values of this type, or pattern match against the values directly. - and 'T list = FSharpList<'T> - - /// An abbreviation for the type of immutable singly-linked lists. - and List<'T> = FSharpList<'T> - - /// An abbreviation for the .NET type System.Collections.Generic.List<_> - type ResizeArray<'T> = System.Collections.Generic.List<'T> - - /// An abbreviation for the .NET type System.Collections.Generic.IEnumerable<_> - type seq<'T> = IEnumerable<'T> - - - -namespace Microsoft.FSharp.Core - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - - /// Basic F# Operators. This module is automatically opened in all F# code. - module Operators = - - // Arithmetic operators. These operators are overloaded and can be used - // on any pair of types that satisfies the constraint, e.g. the - // '+' function can be used on any type that supports the "op_Addition" - // constraint. This includes all .NET types that support the op_Addition - // operator. The standard integral and floating point types support - // constraints as follows: - // - The built-in integral types are: - // sbyte, byte, int16, uint16, int32, unit32, - // int64, uint64, nativeint, unativeint - // - // - The built-in floating point types are: - // float, float32 - // - // - The built-in numeric types are these combined - // - // All built-in numeric types support: - // 'ty.(+) : (ty,ty) -> ty - // 'ty.(-) : (ty,ty) -> ty - // 'ty.( * ) : (ty,ty) -> ty - // 'ty.(/) : (ty,ty) -> ty - // 'ty.(%) : (ty,ty) -> ty - // 'ty.(~+) : (ty) -> ty - // - // All signed numeric types support: - // 'ty.(~-) : (ty) -> ty - - - /// Overloaded unary negation. - val inline ( ~- ) : n:^T -> ^T when ^T : (static member ( ~- ) : ^T -> ^T) and default ^T : int - - /// Overloaded addition operator - val inline ( + ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( + ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded subtraction operator - val inline ( - ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( - ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded multiplication operator - val inline ( * ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( * ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded division operator - val inline ( / ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( / ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded modulo operator - val inline ( % ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( % ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded logical-AND operator - val inline (&&&): x:^T -> y:^T -> ^T when ^T : (static member (&&&) : ^T * ^T -> ^T) and default ^T : int - - /// Overloaded logical-OR operator - val inline (|||) : x:^T -> y:^T -> ^T when ^T : (static member (|||) : ^T * ^T -> ^T) and default ^T : int - - /// Overloaded logical-XOR operator - val inline (^^^) : x:^T -> y:^T -> ^T when ^T : (static member (^^^) : ^T * ^T -> ^T) and default ^T : int - - /// Overloaded byte-shift left operator by a specified number of bits - val inline (<<<) : value:^T -> shift:int32 -> ^T when ^T : (static member (<<<) : ^T * int32 -> ^T) and default ^T : int - - /// Overloaded byte-shift right operator by a specified number of bits - val inline (>>>) : value:^T -> shift:int32 -> ^T when ^T : (static member (>>>) : ^T * int32 -> ^T) and default ^T : int - - /// Overloaded logical-NOT operator - val inline (~~~) : value:^T -> ^T when ^T : (static member (~~~) : ^T -> ^T) and default ^T : int - - /// Overloaded prefix=plus operator - val inline (~+) : value:^T -> ^T when ^T : (static member (~+) : ^T -> ^T) and default ^T : int - - /// Structural less-than comparison - val inline ( < ) : x:'T -> y:'T -> bool - - /// Structural greater-than - val inline ( > ) : x:'T -> y:'T -> bool - - ///Structural greater-than-or-equal - val inline ( >= ) : x:'T -> y:'T -> bool - - ///Structural less-than-or-equal comparison - val inline ( <= ) : x:'T -> y:'T -> bool - - ///Structural equality - val inline ( = ) : x:'T -> y:'T -> bool - - ///Structural inequality - val inline ( <> ) : x:'T -> y:'T -> bool - - /// Compose two functions, the function on the left being applied first - val inline (>>): func1:('T -> 'U) -> func2:('U -> 'V) -> ('T -> 'V) - - /// Compose two functions, the function on the right being applied first - val inline (<<): func2:('U -> 'V) -> func1:('T -> 'U) -> ('T -> 'V) - - /// Apply a function to a value, the value being on the left, the function on the right - val inline (|>): arg:'T -> func:('T -> 'U) -> 'U - /// Apply a function to two values, the values being a pair on the left, the function on the right - val inline (||>): arg1:'T1 * arg2:'T2 -> func:('T1 -> 'T2 -> 'U) -> 'U - /// Apply a function to three values, the values being a triple on the left, the function on the right - val inline (|||>): arg1:'T1 * arg2:'T2 * arg3:'T3 -> func:('T1 -> 'T2 -> 'T3 -> 'U) -> 'U - - /// Apply a function to a value, the value being on the right, the function on the left - val inline (<|): func:('T -> 'U) -> arg1:'T -> 'U - - /// Apply a function to two values, the values being a pair on the right, the function on the left - val inline (<||): func:('T1 -> 'T2 -> 'U) -> arg1:'T1 * arg2:'T2 -> 'U - - /// Apply a function to three values, the values being a triple on the right, the function on the left - val inline (<|||): func:('T1 -> 'T2 -> 'T3 -> 'U) -> arg1:'T1 * arg2:'T2 * arg3:'T3 -> 'U - - /// Used to specify a default value for an optional argument in the implementation of a function - val defaultArg : arg:'T option -> defaultValue:'T -> 'T - - /// Concatenate two strings. The overlaoded operator '+' may also be used. - val (^): s1:string -> s2:string -> string - - /// Raises an exception - val raise : exn:System.Exception -> 'T - - /// Rethrows an exception. This should only be used when handling an exception - [] - val inline rethrow : unit -> 'T - - /// Return the first element of a tuple, fst (a,b) = a. - val fst : tuple:('T1 * 'T2) -> 'T1 - - /// Return the second element of a tuple, snd (a,b) = b. - val snd : tuple:('T1 * 'T2) -> 'T2 - - /// Generic comparison - val inline compare: e1:'T -> e2:'T -> int - /// Maximum based on generic comparison - val inline max : e1:'T -> e2:'T -> 'T - /// Minimum based on generic comparison - val inline min : e1:'T -> e2:'T -> 'T - - /// Ignore the passed value. This is often used to throw away results of a computation. - val ignore : value:'T -> unit - - /// Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a. - val inline unbox : value:obj -> 'T - /// Boxes a strongly typed value. - val inline box : value:'T -> obj - - /// Throw a FailureException exception - val failwith : message:string -> 'T - - /// Throw an ArgumentException exception - val invalidArg : argumentName:string -> message:string -> 'T - - /// Throw an ArgumentNullException exception - val nullArg : argumentName:string -> 'T - - /// Throw an InvalidOperationException exception - val invalidOp : message:string -> 'T - - /// The identity function - val id : x:'T -> 'T - - /// Create a mutable reference cell - val ref : value:'T -> 'T ref - - /// Assign to a mutable reference cell - val ( := ) : cell:'T ref -> value:'T -> unit - - /// Dereference a mutable reference cell - val ( ! ) : cell:'T ref -> 'T - - /// Decrement a mutable reference cell containing an integer - val decr: cell:int ref -> unit - - /// Increment a mutable reference cell containing an integer - val incr: cell:int ref -> unit - - /// Concatenate two lists. - val (@): list1:'T list -> list2:'T list -> 'T list - - /// Negate a logical value. not true equals false and not false equals true - val inline not : value:bool -> bool - -#if FX_NO_EXIT -#else - /// Exit the current hardware isolated process, if security settings permit, - /// otherwise raise an exception. Calls System.Environment.Exit. - val exit: exitcode:int -> 'T when default 'T : obj -#endif - - /// Equivalent to System.Double.PositiveInfinity - val infinity: float - - /// Equivalent to System.Double.NaN - val nan: float - - /// Equivalent to System.Single.PositiveInfinity - val infinityf: float32 - - /// Equivalent to System.Single.NaN - val nanf: float32 - - /// Reads the value of the property System.Console.In. - val stdin<'T> : System.IO.TextReader - - /// Reads the value of the property System.Console.Error. - val stderr<'T> : System.IO.TextWriter - - /// Reads the value of the property System.Console.Out. - val stdout<'T> : System.IO.TextWriter - - /// The standard overloaded range operator, e.g. [n..m] for lists, seq {n..m} for sequences - val inline (..) : start:^T -> finish:^T -> seq< ^T > - when ^T : (static member (+) : ^T * ^T -> ^T) - and ^T : (static member One : ^T) - and default ^T : int - - /// The standard overloaded skip range operator, e.g. [n..skip..m] for lists, seq {n..skip..m} for sequences - val inline (.. ..) : start:^T -> step:^U -> finish:^T -> seq< ^T > - when (^T or ^U) : (static member (+) : ^T * ^U -> ^T) - and ^U : (static member Zero : ^U) - and default ^U : ^T - and default ^T : int - - /// Execute the function as a mutual-exlcusion region using the input value as a lock. - val inline lock: lockObject:'lock -> action:(unit -> 'T) -> 'T when 'lock : not struct - - /// Clean up resources associated with the input object after the completion of the given function. - /// Cleanup occurs even when an exception is raised by the protected - /// code. - val using: resource:('T :> System.IDisposable) -> action:('T -> 'U) -> 'U - - - /// Generate a System.Type runtime represenation of a static type. - /// The static type is still maintained on the value returned. - [] - val inline typeof<'T> : System.Type - - /// Generate a System.Type representation for a type definition. If the - /// input type is a generic type instantiation then return the - /// generic type definition associated with all such instantiations. - [] - val inline typedefof<'T> : System.Type - - /// Returns the internal size of a type in bytes. For example, sizeof<int> returns 4. - [] - val inline sizeof<'T> : int - - /// A generic hash function, designed to return equal hash values for items that are - /// equal according to the "=" operator. By default it will use structural hashing - /// for F# union, record and tuple types, hashing the complete contents of the - /// type. The exact behaviour of the function can be adjusted on a - /// type-by-type basis by implementing GetHashCode for each type. - val inline hash: obj:'T -> int - - /// A generic hash function. This function has the same behaviour as 'hash', - /// however the default structural hashing for F# union, record and tuple - /// types stops when the given limit of nodes is reached. The exact behaviour of - /// the function can be adjusted on a type-by-type basis by implementing - /// GetHashCode for each type. - val inline limitedHash: limit: int -> obj:'T -> int - - - /// Absolute value of the given number - val inline abs : value:^T -> ^T when ^T : (static member Abs : ^T -> ^T) and default ^T : int - - /// Inverse cosine of the given number - val inline acos : value:^T -> ^T when ^T : (static member Acos : ^T -> ^T) and default ^T : float - - /// Inverse sine of the given number - val inline asin : value:^T -> ^T when ^T : (static member Asin : ^T -> ^T) and default ^T : float - - /// Inverse tangent of the given number - val inline atan : value:^T -> ^T when ^T : (static member Atan : ^T -> ^T) and default ^T : float - - /// Inverse tangent of x/y where x and y are specified separately - val inline atan2 : y:^T -> x:^T -> 'U when ^T : (static member Atan2 : ^T * ^T -> 'U) and default ^T : float - - /// Ceiling of the given number - val inline ceil : value:^T -> ^T when ^T : (static member Ceiling : ^T -> ^T) and default ^T : float - - /// Exponential of the given number - val inline exp : value:^T -> ^T when ^T : (static member Exp : ^T -> ^T) and default ^T : float - - /// Floor of the given number - val inline floor : value:^T -> ^T when ^T : (static member Floor : ^T -> ^T) and default ^T : float - - /// Sign of the given number - val inline sign : value:^T -> int when ^T : (member Sign : int) and default ^T : float - - /// Round the given number - val inline round : value:^T -> ^T when ^T : (static member Round : ^T -> ^T) and default ^T : float - - /// Natural logarithm of the given number - val inline log : value:^T -> ^T when ^T : (static member Log : ^T -> ^T) and default ^T : float - - /// Logarithm to base 10 of the given number - val inline log10 : value:^T -> ^T when ^T : (static member Log10 : ^T -> ^T) and default ^T : float - - /// Square root of the given number - val inline sqrt : value:^T -> ^U when ^T : (static member Sqrt : ^T -> ^U) and default ^U : ^T and default ^T : ^U and default ^T : float - - /// Cosine of the given number - val inline cos : value:^T -> ^T when ^T : (static member Cos : ^T -> ^T) and default ^T : float - - /// Hyperbolic cosine of the given number - val inline cosh : value:^T -> ^T when ^T : (static member Cosh : ^T -> ^T) and default ^T : float - - /// Sine of the given number - val inline sin : value:^T -> ^T when ^T : (static member Sin : ^T -> ^T) and default ^T : float - - /// Hyperbolic sine of the given number - val inline sinh : value:^T -> ^T when ^T : (static member Sinh : ^T -> ^T) and default ^T : float - - /// Tangent of the given number - val inline tan : value:^T -> ^T when ^T : (static member Tan : ^T -> ^T) and default ^T : float - - /// Hyperbolic tangent of the given number - val inline tanh : value:^T -> ^T when ^T : (static member Tanh : ^T -> ^T) and default ^T : float - -#if FX_NO_TRUNCATE -#else - /// Overloaded truncate operator. - val inline truncate : value:^T -> ^T when ^T : (static member Truncate : ^T -> ^T) and default ^T : float -#endif - - /// Overloaded power operator. - val inline ( ** ) : x:^T -> y:^T -> ^T when ^T : (static member Pow : ^T * ^T -> ^T) and default ^T : float - - /// Overloaded power operator. If n > 0 then equivalent to x*...*x for n occurrences of x. - val inline pown : x:^T -> n:int -> ^T when ^T : (static member One : ^T) - and ^T : (static member ( * ) : ^T * ^T -> ^T) - and ^T : (static member ( / ) : ^T * ^T -> ^T) - and default ^T : int - - /// Converts the argument to byte. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Byte.Parse() on strings and otherwise requires a ToByte method on the input type - val inline byte : value:^T -> byte when ^T : (static member ToByte : ^T -> byte) and default ^T : int - - /// Converts the argument to signed byte. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using SByte.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSByte method on the input type - val inline sbyte : value:^T -> sbyte when ^T : (static member ToSByte : ^T -> sbyte) and default ^T : int - - /// Converts the argument to signed 16-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Int16.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt16 method on the input type - val inline int16 : value:^T -> int16 when ^T : (static member ToInt16 : ^T -> int16) and default ^T : int - - /// Converts the argument to unsigned 16-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using UInt16.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt16 method on the input type - val inline uint16 : value:^T -> uint16 when ^T : (static member ToUInt16 : ^T -> uint16) and default ^T : int - - /// Converts the argument to signed 32-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Int32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt32 method on the input type - val inline int : value:^T -> int when ^T : (static member ToInt32 : ^T -> int) and default ^T : int - - /// Converts the argument to a particular enum type. - val inline enum : value:int32 -> ^U when ^U : enum - - /// Converts the argument to signed 32-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Int32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt32 method on the input type - val inline int32 : value:^T -> int32 when ^T : (static member ToInt32 : ^T -> int32) and default ^T : int - - /// Converts the argument to unsigned 32-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using UInt32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt32 method on the input type - val inline uint32 : value:^T -> uint32 when ^T : (static member ToUInt32 : ^T -> uint32) and default ^T : int - - /// Converts the argument to signed 64-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Int64.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt64 method on the input type - val inline int64 : value:^T -> int64 when ^T : (static member ToInt64 : ^T -> int64) and default ^T : int - - /// Converts the argument to unsigned 64-bit integer. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using UInt64.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt64 method on the input type - val inline uint64 : value:^T -> uint64 when ^T : (static member ToUInt64 : ^T -> uint64) and default ^T : int - - /// Converts the argument to 32-bit float. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type - val inline float32 : value:^T -> float32 when ^T : (static member ToSingle : ^T -> float32) and default ^T : int - - /// Converts the argument to 64-bit float. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type - val inline float : value:^T -> float when ^T : (static member ToDouble : ^T -> float) and default ^T : int - - /// Converts the argument to 32-bit float. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type - val inline single : value:^T -> single when ^T : (static member ToSingle : ^T -> single) and default ^T : int - - /// Converts the argument to 64-bit float. This is a direct conversion for all - /// primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type - val inline double : value:^T -> float when ^T : (static member ToDouble : ^T -> double) and default ^T : int - - /// Converts the argument to signed native integer. This is a direct conversion for all - /// primitive numeric types and ToIntPtr method otherwise) - val inline nativeint : value:^T -> nativeint when ^T : (static member ToIntPtr : ^T -> nativeint) and default ^T : int - - /// Converts the argument to unsigned native integer using a direct conversion for all - /// primitive numeric types and requiring a ToUintPtr method otherwise - val inline unativeint : value:^T -> unativeint when ^T : (static member ToUIntPtr : ^T -> unativeint) and default ^T : int - - /// Converts the argument to a string using ToString. - /// For standard integer and floating point values the ToString conversion uses CultureInfo.InvariantCulture. - /// Note, native integer ToString does not support specifying CultureInfo. - val inline string : value:^T -> string - - /// Converts the argument to System.Decimal using a direct conversion for all - /// primitive numeric types and requiring a ToDecimal method otherwise - val inline decimal : value:^T -> decimal when ^T : (static member ToDecimal : ^T -> decimal) and default ^T : int - - /// Converts the argument to character. Numeric inputs are converted according to the UTF-16 - /// encoding for characters. String inputs must be exactly one character long. - /// For other types a static member ToChar must exist on the type. - val inline char : value:^T -> char when ^T : (static member ToChar : ^T -> char) and default ^T : int - - /// An active pattern to match values of type System.Collections.Generic.KeyValuePair - val ( |KeyValue| ): keyValuePair:KeyValuePair<'T,'U> -> 'T * 'U - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val invalid_arg : message:string -> 'T - - [] - val invalid_op : message:string -> 'T - - /// Throw an KeyNotFoundException exception - [] - val not_found : unit -> 'T - - [] - val InvalidArgument : string -> exn - - [] - val (|InvalidArgument|_|) : exn -> string option - - [] - type InvalidArgumentException = ArgumentException -#endif - - - /// A module of compiler intrinsic functions for efficient implementations of F# integer ranges - /// and dynamic invocations of other F# operators - module OperatorIntrinsics = - - //[] - /// Get a slice of an array - val inline GetArraySlice : source:'T[] -> start:int option * finish:int option -> 'T[] - - //[] - /// Set a slice of an array - val inline SetArraySlice : target:'T[] -> start:int option * finish:int option * source:'T[] -> unit - - //[] - /// Get a slice of an array - val GetArraySlice2D : source:'T[,] -> start1:int option * finish1:int option * start2:int option * finish2:int option -> 'T[,] - - //[] - /// Set a slice of an array - val SetArraySlice2D : target:'T[,] -> start1:int option * finish1:int option * start2:int option * finish2:int option * source:'T[,] -> unit - - //[] - /// Get a slice of an array - val GetArraySlice3D : source:'T[,,] -> start1:int option * finish1:int option * start2:int option * finish2:int option * start3:int option * finish3:int option -> 'T[,,] - - //[] - /// Set a slice of an array - val SetArraySlice3D : target:'T[,,] -> start1:int option * finish1:int option * start2:int option * finish2:int option * start3:int option * finish3:int option * source:'T[,,] -> unit - - //[] - /// Get a slice of an array - val GetArraySlice4D : source:'T[,,,] -> start1:int option * finish1:int option * start2:int option * finish2:int option * start3:int option * finish3:int option * start4:int option * finish4:int option -> 'T[,,,] - - // [] - /// Set a slice of an array - val SetArraySlice4D : target:'T[,,,] -> start1:int option * finish1:int option * start2:int option * finish2:int option * start3:int option * finish3:int option * start4:int option * finish4:int option * source:'T[,,,] -> unit - - //[] - /// Get a slice from a string - val inline GetStringSlice : source:string -> start:int option * finish:int option -> string - - /// Generate a range of integers - [] - val RangeInt32 : start:int * step:int * stop:int -> seq - /// Generate a range of float values - [] - val RangeDouble : start:float * step:float * stop:float -> seq - /// Generate a range of float32 values - [] - val RangeSingle : start:float32 * step:float32 * stop:float32 -> seq - /// Generate a range of int64 values - [] - val RangeInt64 : start:int64 * step:int64 * stop:int64 -> seq - /// Generate a range of uint64 values - [] - val RangeUInt64 : start:uint64 * step:uint64 * stop:uint64 -> seq - /// Generate a range of uint32 values - [] - val RangeUInt32 : start:uint32 * step:uint32 * stop:uint32 -> seq - /// Generate a range of nativeint values - [] - val RangeIntPtr : start:nativeint * step:nativeint * stop:nativeint -> seq - /// Generate a range of unativeint values - [] - val RangeUIntPtr : start:unativeint * step:unativeint * stop:unativeint -> seq - /// Generate a range of int16 values - [] - val RangeInt16 : start:int16 * step:int16 * stop:int16 -> seq - /// Generate a range of uint16 values - [] - val RangeUInt16 : start:uint16 * step:uint16 * stop:uint16 -> seq - /// Generate a range of sbyte values - [] - val RangeSByte : start:sbyte * step:sbyte * stop:sbyte -> seq - /// Generate a range of byte values - [] - val RangeByte : start:byte * step:byte * stop:byte -> seq - /// Generate a range of char values - [] - val RangeChar : start:char * stop:char -> seq - /// Generate a range of values using the given zero, add, start, step and stop values - [] - val RangeGeneric : one:'T * add:('T -> 'T -> 'T) * start:'T * stop:'T -> seq<'T> - /// Generate a range of values using the given zero, add, start, step and stop values - [] - val RangeStepGeneric : zero:'U * add:('T -> 'U -> 'T) * start:'T * step:'U * stop:'T -> seq<'T> - - [] - val AbsDynamic : x:'T -> 'T - - [] - val AcosDynamic : x:'T -> 'T - - - [] - val AsinDynamic : x:'T -> 'T - - [] - val AtanDynamic : x:'T -> 'T - - [] - val Atan2Dynamic : y:'T -> x:'T -> 'U - - [] - val CeilingDynamic : x:'T -> 'T - - - [] - val ExpDynamic : x:'T -> 'T - - [] - val FloorDynamic : x:'T -> 'T - - [] - val TruncateDynamic : x:'T -> 'T - - [] - val RoundDynamic : x:'T -> 'T - - [] - val SignDynamic : 'T -> int - - [] - val LogDynamic : x:'T -> 'T - - [] - val Log10Dynamic : x:'T -> 'T - - [] - val SqrtDynamic : 'T -> 'U - - [] - val CosDynamic : x:'T -> 'T - - [] - val CoshDynamic : x:'T -> 'T - - [] - val SinDynamic : x:'T -> 'T - - [] - val SinhDynamic : x:'T -> 'T - - [] - val TanDynamic : x:'T -> 'T - - [] - val TanhDynamic : x:'T -> 'T - - [] - val PowDynamic : x:'T -> y:'T -> 'T - - - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'byte' - [] - val PowByte : x:byte -> n:int -> byte - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'sbyte' - [] - val PowSByte : x:sbyte -> n:int -> sbyte - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int16' - [] - val PowInt16 : x:int16 -> n:int -> int16 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint16' - [] - val PowUInt16 : x:uint16 -> n:int -> uint16 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int32' - [] - val PowInt32 : x:int32 -> n:int -> int32 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint32' - [] - val PowUInt32 : x:uint32 -> n:int -> uint32 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'int64' - [] - val PowInt64 : x:int64 -> n:int -> int64 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'uint64' - [] - val PowUInt64 : x:uint64 -> n:int -> uint64 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'nativeint' - [] - val PowIntPtr : x:nativeint -> n:int -> nativeint - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'unativeint' - [] - val PowUIntPtr : x:unativeint -> n:int -> unativeint - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'float32' - [] - val PowSingle : x:float32 -> n:int -> float32 - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'float' - [] - val PowDouble : x:float -> n:int -> float - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'decimal' - [] - val PowDecimal : x:decimal -> n:int -> decimal - /// This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator - [] - val PowGeneric : one:'T * mul: ('T -> 'T -> 'T) * value:'T * exponent:int -> 'T - - /// This module contains basic operations which do not apply runtime and/or static checks - module Unchecked = - - /// Generate a defult value for any type. This is null for reference types, - /// For structs, this is struct value where all fields have the default value. - /// This function is unsafe in the sense that some F# values do not have proper null values. - [] - val inline defaultof<'T> : 'T - - /// This module contains the basic arithmetic operations with overflow checks. - module Checked = - /// Overloaded unary negation (checks for overflow) - [] - val inline ( ~- ) : value:^T -> ^T when ^T : (static member ( ~- ) : ^T -> ^T) and default ^T : int - - /// Overloaded subtraction operator (checks for overflow) - [] - val inline ( - ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( - ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded addition operator (checks for overflow) - val inline ( + ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( + ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Overloaded multiplication operator (checks for overflow) - [] - val inline ( * ) : x:^T -> y:^U -> ^V when (^T or ^U) : (static member ( * ) : ^T * ^U -> ^V) and default ^U : ^V and default ^V : ^T and default ^V : ^U and default ^T : ^V and default ^T : ^U and default ^T : int - - /// Converts the argument to byte. This is a direct conversion for all - /// primitive numeric types and ToByte method otherwise) - [] - val inline byte : value:^T -> byte when ^T : (static member ToByte : ^T -> byte) and default ^T : int - - /// Converts the argument to signed byte. This is a direct conversion for all - /// primitive numeric types and ToSByte method otherwise) - [] - val inline sbyte : value:^T -> sbyte when ^T : (static member ToSByte : ^T -> sbyte) and default ^T : int - - /// Converts the argument to signed 16-bit integer. This is a direct conversion for all - /// primitive numeric types and ToInt16 method otherwise) - [] - val inline int16 : value:^T -> int16 when ^T : (static member ToInt16 : ^T -> int16) and default ^T : int - - /// Converts the argument to unsigned 16-bit integer. This is a direct conversion for all - /// primitive numeric types and ToUInt16 method otherwise) - [] - val inline uint16 : value:^T -> uint16 when ^T : (static member ToUInt16 : ^T -> uint16) and default ^T : int - - /// Converts the argument to signed 32-bit integer. This is a direct conversion for all - /// primitive numeric types and ToInt32 method otherwise) - [] - val inline int : value:^T -> int when ^T : (static member ToInt32 : ^T -> int) and default ^T : int - - /// Converts the argument to signed 32-bit integer. This is a direct conversion for all - /// primitive numeric types and ToInt32 method otherwise) - [] - val inline int32 : value:^T -> int32 when ^T : (static member ToInt32 : ^T -> int32) and default ^T : int - - /// Converts the argument to unsigned 32-bit integer. This is a direct conversion for all - /// primitive numeric types and ToUInt32 method otherwise) - [] - val inline uint32 : value:^T -> uint32 when ^T : (static member ToUInt32 : ^T -> uint32) and default ^T : int - - /// Converts the argument to signed 64-bit integer. This is a direct conversion for all - /// primitive numeric types and ToInt64 method otherwise) - [] - val inline int64 : value:^T -> int64 when ^T : (static member ToInt64 : ^T -> int64) and default ^T : int - - /// Converts the argument to unsigned 64-bit integer. This is a direct conversion for all - /// primitive numeric types and ToUInt64 method otherwise) - [] - val inline uint64 : value:^T -> uint64 when ^T : (static member ToUInt64 : ^T -> uint64) and default ^T : int - - /// Converts the argument to signed native integer. This is a direct conversion for all - /// primitive numeric types and ToIntPtr method otherwise) - [] - val inline nativeint : value:^T -> nativeint when ^T : (static member ToIntPtr : ^T -> nativeint) and default ^T : int - - /// Converts the argument to unsigned native integer. This is a direct conversion for all - /// primitive numeric types and ToUIntPtr method otherwise) - [] - val inline unativeint : value:^T -> unativeint when ^T : (static member ToUIntPtr : ^T -> unativeint) and default ^T : int - - /// Converts the argument to unicode character based on UTF16 encoding (a direct conversion for all - /// primitive numeric types and ToUIntPtr method otherwise) - [] - val inline char : value:^T -> char when ^T : (static member ToChar : ^T -> char) and default ^T : int - - - -namespace Microsoft.FSharp.Control - open Microsoft.FSharp.Core - - /// An exeption type raised when the evaluation of a lazy value recursively depend upon itself - exception Undefined - -#if FX_ATLEAST_40 - - [] - module LazyExtensions = - type System.Threading.LazyInit<'T> with - /// Create a lazy computation that evaluates to the result of the given function when forced - static member Create : creator:(unit -> 'T) -> System.Threading.LazyInit<'T> - /// Create a lazy computation that evaluates to the given value when forced - static member CreateFromValue : value:'T -> System.Threading.LazyInit<'T> - /// Indicates if the lazy value has yet to be computed - [] - member IsDelayed : bool - /// Indicates if the lazy value has been successfully computed - [] - member IsForced : bool - /// Indicates if the lazy value is being computed or the computation raised an exception - [] - member IsException : bool - /// Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to - /// prevent other threads also computing the value. If the value is re-forced during its own computation - /// the Undefined exception is raised. - [] - member Force : unit -> 'T - // Same as Force - [] - member SynchronizedForce : unit -> 'T - /// Same as Force, except no lock is taken. - [] - member UnsynchronizedForce : unit -> 'T - - /// The type of delayed computations. - /// - /// Use the values in the Lazy module to manipulate - /// values of this type, and the notation 'lazy expr' to create values - /// of this type. - type Lazy<'T> = System.Threading.LazyInit<'T> - and 'T ``lazy`` = Lazy<'T> - - -#else - - - /// The type of delayed computations. - /// - /// Use the values in the Lazy module to manipulate - /// values of this type, and the notation 'lazy expr' to create values - /// of this type. - [] - type Lazy <'T> = - /// Indicates if the lazy value has been successfully computed - member IsForced : bool - /// Indicates if the lazy value is being computed or the computation raised an exception - member IsException : bool - /// Indicates if the lazy value has yet to be computed - member IsDelayed : bool - /// Same as Force - member SynchronizedForce : unit -> 'T - /// Same as Force, except no lock is taken. - member UnsynchronizedForce : unit -> 'T - /// Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to - /// prevent other threads also computing the value. If the value is re-forced during its own computation - /// the Undefined exception is raised. - member Force : unit -> 'T - /// Force the execution of this value and return its result. Same as Value. Mutual exclusion is used to - /// prevent other threads also computing the value. - member Value : 'T - /// Create a lazy computation that evaluates to the result of the given function when forced - static member Create : creator:(unit -> 'T) -> Lazy<'T> - /// Create a lazy computation that evaluates to the given value when forced - static member CreateFromValue : value:'T -> Lazy<'T> - /// The type of delayed computations. - /// - /// Use the values in the Lazy module to manipulate - /// values of this type, and the notation 'lazy expr' to create values - /// of this type. - and 'T ``lazy`` = Lazy<'T> -#endif - - - -namespace Microsoft.FSharp.Control - - open Microsoft.FSharp.Core - - /// F# gives special status to non-virtual instance member properties compatible with type IDelegateEvent, - /// generating approriate .NET metadata to make the member appear to other .NET languages as a - /// .NET event. - type IDelegateEvent<'Del when 'Del :> System.Delegate > = - /// Connect a handler delegate object to the event. A handler can - /// be later removed using RemoveHandler. The listener will - /// be invoked when the event is fired. - abstract AddHandler: handler:'Del -> unit - /// Remove a listener delegate from an event listener store - abstract RemoveHandler: handler:'Del -> unit - - ///The family of first class event values for delegate types that satisfy the F# delegate constraint. - type IEvent<'Del,'Args when 'Del : delegate<'Args,unit> and 'Del :> System.Delegate > = - /// Connect a listener function to the event. The listener will - /// be invoked when the event is fired. - abstract Add: callback:('Args -> unit) -> unit - inherit IDelegateEvent<'Del> - - - /// A delegate type associated with the F# event type IEvent<_> - type Handler<'T> = delegate of sender:obj * args:'T -> unit - - /// First-class listening points (i.e. objects that permit you to register a 'callback' - /// activated when the event is triggered). See the module Event - /// for functions to create events. - type IEvent<'T> = IEvent, 'T> - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/printf.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/printf.fs deleted file mode 100644 index 9800cd8e..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/printf.fs +++ /dev/null @@ -1,630 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Text - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Text -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Reflection -open Microsoft.FSharp.Text.StructuredPrintfImpl -open System.Globalization -open System.IO -open System.Text - -type PrintfFormat<'printer,'state,'residue,'result>(value:string) = - member x.Value = value - -type PrintfFormat<'printer,'state,'residue,'result,'tuple>(value:string) = - inherit PrintfFormat<'printer,'state,'residue,'result>(value) - -type Format<'printer,'state,'residue,'result> = PrintfFormat<'printer,'state,'residue,'result> -type Format<'printer,'state,'residue,'result,'tuple> = PrintfFormat<'printer,'state,'residue,'result,'tuple> - -module PrintfImpl = - - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Reflection - open System.Reflection - - type buf = System.Text.StringBuilder - - let string_of_char (c:char) = System.Char.ToString(c) - let string_of_int (i:int) = i.ToString() - - type info = - { mutable leftJustify : bool; - mutable numPrefixIfPos : char option; - mutable addZeros : bool; } - - let outputSignAndLeftSpace(outputChar,info,pos,width,numDigits) = - let used = - if pos then - match info.numPrefixIfPos with - | None -> 0 - | Some _ -> 1 - else 1 - let len = numDigits + used - if not info.leftJustify && not info.addZeros then - match width with - | None -> () - | Some w -> - for i = 1 to (w - len) do - outputChar ' '; - begin - if pos then - match info.numPrefixIfPos with - | None -> () - | Some c -> outputChar c - else outputChar '-'; - end; - if not info.leftJustify && info.addZeros then - match width with - | None -> () - | Some w -> - for i = 1 to (w - len) do - outputChar (if info.addZeros then '0' else ' '); - used - - let decode (c:char) = System.Convert.ToInt32(c) - let encode (x:int) = System.Convert.ToChar(x) - - let outputDigit(outputChar,intFormatChar,digit) = - let digitc = - if digit < 10 - then decode '0' + digit - else decode (if intFormatChar = 'x' then 'a' else 'A') + (digit - 10) - outputChar (encode digitc) - - let outputSpace(outputChar,width,len) = - match width with - | None -> () - | Some width -> - for i = 1 to (width - len) do - outputChar ' '; - - let outputZeros(outputChar,width,len) = - match width with - | None -> () - | Some width -> - for i = 1 to (width - len) do - outputChar '0' - - let outputRightSpace(outputChar,leftJustify,width,len) = - if leftJustify then outputSpace(outputChar,width,len) - - let outputUInt64(outputChar,intFormatChar,width,info,(n:uint64)) = - let nbase = match intFormatChar with 'o' -> 8uL | 'x' | 'X' -> 16uL | _ -> 10uL - let numDigits = - let mutable numDigits = 1 - let mutable nval = n / nbase - while nval > 0UL do - numDigits <- numDigits + 1; - nval <- nval / nbase; - numDigits - let topdiv = - let mutable topdiv = 1UL - for i = 1 to numDigits - 1 do - topdiv <- topdiv * nbase; - topdiv - - let len = numDigits + (outputSignAndLeftSpace(outputChar,info,true,width,numDigits)) - - let mutable residue = n - let mutable divisor = topdiv - while divisor > 0UL do - let digit = residue / divisor - outputDigit(outputChar,intFormatChar, int32(int64 digit)); - residue <- residue % divisor; - divisor <- divisor / nbase; - outputRightSpace(outputChar,info.leftJustify,width,len) - - let outputInt64(outputChar,intFormatChar,width,info,(n:int64)) = - let nbase = match intFormatChar with 'o' -> 8L | 'x' | 'X' -> 16L | _ -> 10L - let numDigits = - let mutable numDigits = 1 - let mutable nval = if n >= 0L then n / nbase else - (n / nbase) - while nval > 0L do - numDigits <- numDigits + 1; - nval <- nval / nbase; - numDigits - let topdiv = - let mutable topdiv = 1L - for i = 1 to numDigits - 1 do - topdiv <- topdiv * nbase; - topdiv - - let len = numDigits + (outputSignAndLeftSpace(outputChar,info,(n >= 0L),width,numDigits) ) - - let mutable residue = - if n = System.Int64.MinValue then System.Int64.MaxValue - elif n < 0L then - n - else n - let mutable divisor = topdiv - while divisor > 0L do - let digit = - if n = System.Int64.MinValue && divisor = 1L - then (match intFormatChar with 'd' | 'i' -> 8L | _ -> 100L) // nb. special case for min_int - else residue / divisor - outputDigit(outputChar,intFormatChar,int32(digit)); - residue <- residue % divisor; - divisor <- divisor / nbase; - outputRightSpace(outputChar,info.leftJustify,width,len) - - // The general technique used this file is to interpret - // a format string and use reflection to construct a function value that matches - // the specification of the format string. - // - // Generics add some serious complications here - we have to generate - // a function value of exactly the right runtime type, though the most - // natural scheme is to produce one of type 'obj -> obj'. We get around - // this by using a semi-reflective approach to creating and invoking - // function values of the right type. This comes with some - // overheads (though they are not too bad) and thus could and should be - // optimized in some special cases, e.g. where a format string - // just contains a single simple format specifier such as '%x' - //type DynamicFunction<'a,'b> = - // static member Make(impl : obj -> obj) : obj = - // box (fun (inp:'a) -> (unbox (impl (box (inp : 'a))) : 'b)) - - //let dynCloMakerTy = typeof>.GetGenericTypeDefinition() - let staticInvokeFlags = BindingFlags.Public ||| BindingFlags.InvokeMethod ||| BindingFlags.Static - let mkFunctionValue (tys: System.Type[]) (impl:obj->obj) = - //let saverTy = dynCloMakerTy.MakeGenericType(tys) - FSharpValue.MakeFunction(FSharpType.MakeFunctionType(tys.[0],tys.[1]), impl) - //saverTy.InvokeMember("Make",staticInvokeFlags,null,null,[| box impl |]) - - let funTyC = typeof<(obj -> obj)>.GetGenericTypeDefinition() - let mkFunTy a b = funTyC.MakeGenericType([| a;b |]) - - let isNamedType(ty:System.Type) = not (ty.IsArray || ty.IsByRef || ty.IsPointer) - let isFunctionType (ty1:System.Type) = - isNamedType(ty1) && ty1.IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(funTyC) - - let rec destFunTy (ty:System.Type) = - if isFunctionType ty then - ty, ty.GetGenericArguments() - else - match ty.BaseType with - | null -> failwith "destFunTy: not a function type" - | b -> destFunTy b - - let instanceInvokeFlags = BindingFlags.Public ||| BindingFlags.InvokeMethod ||| BindingFlags.Instance - let invokeFunctionValue (f:obj) (x:obj) = - let fTy,_ = destFunTy (f.GetType()) -#if FX_NO_CULTURE_INFO_ARGS - fTy.InvokeMember("Invoke",instanceInvokeFlags,(null:Binder),f,[| x |]) -#else - fTy.InvokeMember("Invoke",instanceInvokeFlags,(null:Binder),f,[| x |],CultureInfo.InvariantCulture(*FxCop:1304*)) -#endif - - let buildFunctionForOneArgPat (ty: System.Type) impl = - let _,tys = destFunTy ty - let dty = tys.[0] - let rty = tys.[1] - // PERF: this technique is a bit slow (e.g. in simple cases, like 'sprintf "%x"') - mkFunctionValue tys (fun inp -> impl rty inp) - - let buildFunctionForTwoArgPat args ty i go = - let _,tys1 = destFunTy ty - let rty1 = tys1.[1] - let _,tys2 = destFunTy rty1 - let rty2 = tys2.[1] - mkFunctionValue tys1 (fun inpf -> - mkFunctionValue tys2 (fun inpx -> - go (inpx::inpf::args) rty2 (i+1))) - - let buildFunctionForOneFunArgPat args ty i go = - let _,tys1 = destFunTy ty - let rty1 = tys1.[1] - mkFunctionValue tys1 (fun inpf -> go (inpf::args) rty1 (i+1)) - - let isDigit c = ('0' <= c && c <= '9') - let rec parseFlags info (fmt:string) i = - if i >= fmt.Length then failwith "missing format specifier"; - match fmt.[i] with - | '-' -> info.leftJustify <- true; parseFlags info fmt (i+1) - | '+' -> info.numPrefixIfPos <- Some '+'; parseFlags info fmt (i+1) - | '0' -> info.addZeros <- true; parseFlags info fmt (i+1) - | ' ' -> info.numPrefixIfPos <- Some ' '; parseFlags info fmt (i+1) - | '#' -> failwith "The # formatting modifier is invalid in F#"; - | _ -> i - - let rec parseDigitsPrecision (fmt:string) len i = - if i >= len then failwith "bad format specifier (precision)"; - match fmt.[i] with - | c when isDigit c -> parseDigitsPrecision fmt len (i+1) - | _ -> i - - let parsePrecision (fmt:string) len i = - if i >= len then failwith "bad format specifier (precision)"; - match fmt.[i] with - | c when isDigit c -> false,parseDigitsPrecision fmt len (i+1) - | '*' -> true,(i+1) - | _ -> false,i - - let rec parseSliceDotAndPrecision (fmt:string) len i = - match fmt.[i] with - | '.' -> - let w1 = i - let precisionArg,i = parsePrecision fmt len (i+1) - w1,Some (precisionArg,i),i - | _ -> i,None,i - - let rec parseSliceWidthAndPrecision (fmt:string) len i = - if i >= len then failwith "bad format specifier (width)"; - match fmt.[i] with - | c when isDigit c -> parseSliceWidthAndPrecision fmt len (i+1) - | '*' -> true,parseSliceDotAndPrecision fmt len (i+1) - | _ -> false,parseSliceDotAndPrecision fmt len i - - let invariantCulture = System.Globalization.CultureInfo.InvariantCulture - let parseWidthAndPrecision fmt len i = - let w0 = i - let widthArg,(w1,w2,i) = parseSliceWidthAndPrecision fmt len i - let width = - if (w0 = w1) then None - elif widthArg then Some(None) - else Some (Some(System.Int32.Parse (fmt.[w0..w1-1],invariantCulture)) ) - let precision = - match w2 with - | None -> None - | Some (precisionArg,w2') -> - if precisionArg then Some(None) - else Some (Some(System.Int32.Parse (fmt.[w1+1..w2'-1],invariantCulture)) ) - width,precision,i - - let newInfo ()= - { leftJustify = false; - numPrefixIfPos = None; - addZeros = false; } - - let defaultInfo = newInfo() - - let formatString outputChar info width (s:string) isNum = - match s with - | null -> outputSpace(outputChar,width,0) - | _ -> - if not info.leftJustify then - if isNum && info.addZeros then outputZeros(outputChar,width,s.Length) - else outputSpace(outputChar,width,s.Length); - s |> String.iter outputChar; - if info.leftJustify then - if isNum && info.addZeros then outputZeros(outputChar,width,s.Length) - else outputSpace(outputChar,width,s.Length) - - let capture1 (fmt:string) i args ty (go : obj list -> System.Type -> int -> obj) : obj = - let info = newInfo() - let len = fmt.Length - let i = parseFlags info fmt i - let width,precision,i = parseWidthAndPrecision fmt len i - let intFormatChar = fmt.[i] - - let captureCoreArgs args ty = - match intFormatChar with - | '%' -> go args ty (i+1) - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'l' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - | 'n' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - | 'L' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - - | 'U' -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'l' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - | 'n' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - | 'L' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+2)) - | _ -> failwith "bad format specifier (after U)" - - | 'f' | 'F' | 'e' | 'E' | 'g' | 'G' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'M' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 's' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'c' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'b' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1)) - | 'O' -> buildFunctionForOneArgPat ty (fun rty xobj -> go (xobj::args) rty (i+1)) - | 'A' -> buildFunctionForOneArgPat ty (fun rty xobj -> go (xobj::args) rty (i+1)) - | 'a' -> buildFunctionForTwoArgPat args ty i go - | 't' -> buildFunctionForOneFunArgPat args ty i go - | _ -> failwith "bad format specifier" - let capturePrecisionArg args ty = - match precision with - | None | Some(Some _) -> captureCoreArgs args ty - | Some(None) -> buildFunctionForOneArgPat ty (fun rty n -> captureCoreArgs (n :: args) rty) - let captureWidthArg args ty = - match width with - | None | Some(Some _) -> capturePrecisionArg args ty - | Some(None) -> buildFunctionForOneArgPat ty (fun rty n -> capturePrecisionArg (n :: args) rty) - captureWidthArg args ty - - - let unboxAsInt64 (n:obj) = - match n with - | :? sbyte as x -> x |> int64 - | :? int16 as x -> x |> int64 - | :? int32 as x -> x |> int64 - | :? nativeint as x -> x |> int64 - | :? int64 as x -> x - | :? byte as x -> x |> uint64 |> int64 - | :? uint16 as x -> x |> uint64 |> int64 - | :? uint32 as x -> x |> uint64 |> int64 - | :? uint64 as x -> x |> int64 - | :? unativeint as x -> x |> uint64 |> int64 - | _ -> failwith "bad integer supplied to dynamic formatter" - - let unboxAsUInt64 (n:obj) = - let unsigned = - match n with - | :? sbyte as x -> x |> byte |> box - | :? int16 as x -> x |> uint16 |> box - | :? int32 as x -> x |> uint32 |> box - | :? int64 as x -> x |> uint64 |> box - | :? nativeint as x -> x |> unativeint |> box - | _ -> n - unboxAsInt64 unsigned |> uint64 - - let format_one (outa: 'c -> unit) (outputChar: char -> unit) (os : 'b) (fmt:string) i args : (int * obj list) = - let info = newInfo() - let len = fmt.Length - let i = parseFlags info fmt i - let width,precision,i = parseWidthAndPrecision fmt len i - let intFormatChar = fmt.[i] - - let width,args = - match width,args with - | None,args -> None,args - | Some(Some w),args -> Some w,args - | Some(None),n::args -> Some (unbox n), args - | _ -> failwith "expected a width argument" - - let precision,args = - match precision,args with - | None,args -> None,args - | Some(Some w),args -> Some w,args - | Some(None),n::args -> Some (unbox n), args - | _ -> failwith "expected a precision argument" - - match intFormatChar,args with - | '%',args -> - outputChar intFormatChar; i+1, args - | ('d' | 'i'),n::args -> - match n with - | (:? byte | :? uint16 | :? uint32 | :? uint64 | :? unativeint) -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - | _ -> - outputInt64(outputChar,intFormatChar,width,info,(unboxAsInt64 n)); - i+1,args - | ('o' | 'u' | 'x' | 'X'),n::args -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | ('l' | 'L'),n::args -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' -> - outputInt64(outputChar,intFormatChar,width,info,(unboxAsInt64 n)); - i+1,args - | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | _ -> failwith "bad format specifier (after n)" - | 'n',n::args -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' -> - outputInt64(outputChar,intFormatChar,width,info,(unboxAsInt64 n)); - i+1,args - | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | _ -> failwith "bad format specifier (after l)" - | 'U',n::args -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | 'l' -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | _ -> failwith "bad format specifier (after Ul)" - | 'n' -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | _ -> failwith "bad format specifier (after Un)" - | 'L' -> - let i = i+1 - let intFormatChar = fmt.[i] - match intFormatChar with - | 'd' | 'i' | 'o' | 'u' | 'x' | 'X' -> - outputUInt64(outputChar,intFormatChar,width,info,(unboxAsUInt64 n)); - i+1,args - | _ -> failwith "bad format specifier (after UL)" - | _ -> failwith "bad format specifier (after U)" - - | ('f' | 'F' | 'e' | 'E' | 'g' | 'G'),n::args -> - let s, number, positive = - match n with - | :? float as f -> f.ToString(string_of_char intFormatChar + (match precision with None -> "6" | Some n -> string_of_int (max (min n 99) 0)),invariantCulture), not (f = infinity || f = -infinity || System.Double.IsNaN f), f >= 0. - | :? float32 as f -> f.ToString(string_of_char intFormatChar + (match precision with None -> "6" | Some n -> string_of_int (max (min n 99) 0)),invariantCulture), not (f = infinityf || f = -infinityf || System.Single.IsNaN f), f >= 0.f - | :? decimal as f -> f.ToString(string_of_char intFormatChar + (match precision with None -> "6" | Some n -> string_of_int (max (min n 99) 0)),invariantCulture), true, f >= 0M - | _ -> failwith "bad float value" - - let s = match info.numPrefixIfPos with Some c when positive -> string_of_char c + s | _ -> s - formatString outputChar info width s number; - i+1,args - | 'M',n::args -> - let d = (unbox n : System.Decimal) - let s = d.ToString("G",invariantCulture) - let s = match info.numPrefixIfPos with Some c when d >= 0M -> string_of_char c + s | _ -> s - formatString outputChar info width s true; - i+1,args - | 's',nobj::args -> formatString outputChar info width (unbox nobj) false; i+1,args - | 'c',nobj::args -> outputChar (unbox nobj); i+1,args - | 'b',nobj::args -> formatString outputChar info width (if (unbox nobj) then "true" else "false") false; i+1,args - | 'O',xobj::args -> formatString outputChar info width (match xobj with null -> "" | _ -> xobj.ToString()) false; i+1,args - | 'A',xobj::args -> - let bindingFlags = - match info.numPrefixIfPos with - | None -> BindingFlags.Public // Default see Public only - | Some '+' -> BindingFlags.Public ||| BindingFlags.NonPublic // %+A, sees anything possible - | Some c -> failwith ("internal: %A has an unexpected numeric prefix '" ^ string c ^ "'") - let opts = FormatOptions.Default - let opts = match width with None -> opts | Some w -> { opts with PrintWidth = w } - // printfn %0A is considered to mean 'print width zero' - let opts = if info.addZeros then { opts with PrintWidth = 0 } else opts - - let opts = match precision with None -> opts | Some w -> { opts with PrintSize = w } - let txt = - match xobj with - | null -> "" - | _ -> - Display.printf_any_to_string opts bindingFlags xobj - - txt |> String.iter outputChar; - i+1,args - | 'a',fobj::xobj::args -> - outa (unbox (invokeFunctionValue (invokeFunctionValue fobj (box os)) xobj)); - i+1,args - | 't',f::args -> outa ((unbox f) os); i+1,args - | _ -> failwith "bad format specifier" - - - let gprintf (initialize : unit -> 'b * ('c -> unit) * (char -> unit) * (unit -> 'd)) (fmt : PrintfFormat<'a,'b,'c,'d>) : 'a = - let fmt = fmt.Value - match fmt with - // optimize some common cases - | "%s" -> unbox (box (fun (s:string) -> let os,outa,outputChar,finalize = initialize() in formatString outputChar defaultInfo None s false; finalize())) - // | "%x" -> unbox (box (fun (n:int) -> let os,outa,outputChar,finalize = initialize() in outputUInt64 outputChar 'x' None defaultInfo (int32_to_uint64 n); finalize())) - // | "%d" -> unbox (box (fun (n:int) -> let os,outa,outputChar,finalize = initialize() in outputInt64 outputChar 'd' None defaultInfo (int32_to_int64 n); finalize())) - | _ -> - let len = fmt.Length - - /// After all arguments are captures we reinterpret and execute the actions - let run args = - let os,outa,outputChar,finalize = initialize() - let rec go args i = - if i >= len || (fmt.[i] = '%' && i+1 >= len) then (box (finalize())) - elif System.Char.IsSurrogatePair(fmt,i) then - outputChar fmt.[i]; - outputChar fmt.[i+1]; - go args (i+2) - else - - match fmt.[i] with - | '%' -> - let i,args = format_one outa outputChar os fmt (i+1) args - go args i - | c -> - outputChar c; go args (i+1) - go args 0 - - /// Function to capture the arguments and then run. - let rec capture args ty i = - if i >= len || (fmt.[i] = '%' && i+1 >= len) then - run (List.rev args) - elif System.Char.IsSurrogatePair(fmt,i) then - capture args ty (i+2) - else - match fmt.[i] with - | '%' -> - let i = i+1 - capture1 fmt i args ty capture - | c -> - capture args ty (i+1) - - (unbox (capture [] (typeof<'a>) 0) : 'a) - -module Printf = - - open System.Text - open System.Diagnostics - open PrintfImpl - - // These indicate the final type returned - type BuilderFormat<'a,'d> = Format<'a, StringBuilder, unit, 'd> - type StringFormat<'a,'d> = Format<'a, unit, string, 'd> - type TextWriterFormat<'a,'d> = Format<'a, TextWriter, unit, 'd> - - // These fix the final type returned - type BuilderFormat<'a> = BuilderFormat<'a,unit> - type StringFormat<'a> = StringFormat<'a,string> - type TextWriterFormat<'a> = TextWriterFormat<'a,unit> - - - [] - let ksprintf (f : string -> 'd) (fp : StringFormat<'a,'d>) = - let init () = - let buf = new StringBuilder() - let outputChar (c:char) = ignore (buf.Append(c)) - let outa (s:string) = ignore (buf.Append(s)) - let finish () = f (buf.ToString()) - (),outa,outputChar,finish - PrintfImpl.gprintf init fp - - [] - let kprintf f fmt = ksprintf f fmt - - let kprintf_imperative f handle outputChar fmt = - let init () = - let outa () = () - handle,outa,outputChar,f - PrintfImpl.gprintf init fmt - - [] - let kbprintf f (buf: StringBuilder) fmt = kprintf_imperative f buf (fun c -> ignore (buf.Append(c))) fmt - - [] - let ktwprintf f os fmt = kprintf_imperative f (os :> TextWriter) (fun c -> ignore (os.Write(c))) fmt - - [] - let kfprintf f (os:TextWriter) fmt = ktwprintf f os fmt - - [] - let sprintf fmt = ksprintf (fun x -> x) fmt - - [] - let failwithf fmt = ksprintf failwith fmt - - [] - let bprintf buf fmt = kbprintf (fun _ -> ()) buf fmt - - [] - let fprintf (os: TextWriter) fmt = kfprintf (fun _ -> ()) os fmt - - [] - let fprintfn (os: TextWriter) fmt = kfprintf (fun _ -> os.WriteLine()) os fmt - - [] - let twprintf os fmt = ktwprintf (fun _ -> ()) os fmt - - [] - let twprintfn (os : TextWriter) fmt = ktwprintf (fun _ -> os.WriteLine()) os fmt - - [] - let printf fmt = fprintf System.Console.Out fmt - - [] - let eprintf fmt = fprintf System.Console.Error fmt - - [] - let printfn fmt = fprintfn System.Console.Out fmt - - [] - let eprintfn fmt = fprintfn System.Console.Error fmt - - // FxCop suppressions (pending) - do() diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/printf.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/printf.fsi deleted file mode 100644 index b19b9d91..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/printf.fsi +++ /dev/null @@ -1,220 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// This namespace contains types and modules for generating and formatting text with F# -namespace Microsoft.FSharp.Text - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections -open System.IO -open System.Text - -/// Type of a formatting expression. -/// 'Printer : function type generated by printf -/// 'State: type argument passed to %a formatters -/// 'Residue: value generated by the overall printf action (e.g. sprint generates a string) -/// 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) -type PrintfFormat<'Printer,'State,'Residue,'Result> = - /// Construct a format string - new : value:string -> PrintfFormat<'Printer,'State,'Residue,'Result> - /// The raw text of the format string - member Value : string - -/// Type of a formatting expression. -/// 'Printer : function type generated by printf -/// 'State: type argument passed to %a formatters -/// 'Residue: value generated by the overall printf action (e.g. sprint generates a string) -/// 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) -/// 'Tuple: tuple of values generated by scan or match -type PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> = - inherit PrintfFormat<'Printer,'State,'Residue,'Result> - /// Construct a format string - new: value:string -> PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> - -/// Type of a formatting expression -/// 'Printer : function type generated by printf -/// 'State: type argument passed to %a formatters -/// 'Residue: value generated by the overall printf action (e.g. sprint generates a string) -/// 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) -type Format<'Printer,'State,'Residue,'Result> = PrintfFormat<'Printer,'State,'Residue,'Result> - -/// Type of a formatting expression -/// 'Printer : function type generated by printf -/// 'State: type argument passed to %a formatters -/// 'Residue: value generated by the overall printf action (e.g. sprint generates a string) -/// 'Result: value generated after post processing (e.g. failwithf generates a string internally then raises an exception) -/// 'Tuple: tuple of values generated by scan or match -type Format<'Printer,'State,'Residue,'Result,'Tuple> = PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> - -/// Extensible printf-style formatting for numbers and other datatypes -/// -/// Format specifications are strings with "%" markers indicating format -/// placeholders. Format placeholders consist of: -/// -/// %[flags][width][.precision][type] -/// -/// where the type is interpreted as follows: -/// -/// %b: bool, formatted as "true" or "false" -/// %s: string, formatted as its unescaped contents -/// %d, %i: any basic integer type formatted as a decimal integer, signed if the basic integer type is signed. -/// %u: any basic integer type formatted as an unsigned decimal integer -/// %x, %X, %o: any basic integer type formatted as an unsigned hexadecimal -/// (a-f)/Hexadecimal (A-F)/Octal integer -/// -/// %e, %E, %f, %F, %g, %G: -/// any basic floating point type (float,float32) formatted -/// using a C-style floating point format specifications, i.e -/// -/// %e, %E: Signed value having the form [-]d.dddde[sign]ddd where -/// d is a single decimal digit, dddd is one or more decimal -/// digits, ddd is exactly three decimal digits, and sign -/// is + or - -/// -/// %f: Signed value having the form [-]dddd.dddd, where dddd is one -/// or more decimal digits. The number of digits before the -/// decimal point depends on the magnitude of the number, and -/// the number of digits after the decimal point depends on -/// the requested precision. -/// -/// %g, %G: Signed value printed in f or e format, whichever is -/// more compact for the given value and precision. -/// -/// -/// %M: System.Decimal value -/// -/// %O: Any value, printed by boxing the object and using it's ToString method(s) -/// -/// %A: Any value, printed by using Microsoft.FSharp.Text.StructuredPrintfImpl.Display.any_to_string with the default layout settings -/// -/// %a: A general format specifier, requires two arguments: -/// (1) a function which accepts two arguments: -/// (a) a context parameter of the appropriate type for the -/// given formatting function (e.g. an #System.IO.TextWriter) -/// (b) a value to print -/// and which either outputs or returns appropriate text. -/// -/// (2) the particular value to print -/// -/// -/// %t: A general format specifier, requires one argument: -/// (1) a function which accepts a context parameter of the -/// appropriate type for the given formatting function (e.g. -/// an System.IO.TextWriter)and which either outputs or returns -/// appropriate text. -/// -/// Basic integer types are: -/// byte,sbyte,int16,uint16,int32,uint32,int64,uint64,nativeint,unativeint -/// Basic floating point types are: -/// float, float32 -/// -/// The following format patterns are accepted but a warning is printed: -/// -/// %h(d|u|x|X|o) -/// %l(d|u|x|X|o) -/// -/// The following format patterns are now deprecated: -/// -/// %Ld, %Li, %Lu, %Lx, %LX, %Lo: same, but an int64 -/// %nd, %ni, %nu, %nx, %nX, %no: same, but a nativeint -/// %Ud, %Ui, %Uu, %Ux, %UX, %Uo: same, but an unsigned int32 (uint32) -/// %ULd, %ULi, %ULu, %ULx, %ULX, %ULo: same, but an unsigned int64 (uint64) -/// %Und, %Uni, %Unu, %Unx, %UnX, %Uno: same, but an unsigned nativeint (unativeint) -/// -/// The optional width is an integer indicating the minimal width of the -/// result. For instance, %6d prints an integer, prefixing it with spaces -/// to fill at least 6 characters. If width is '*', then an extra integer -/// argument is taken to specify the corresponding width. -/// -/// any number -/// '*': -/// -/// Valid flags are: -/// -/// 0: add zeros instead of spaces to make up the required width -/// '-': left justify the result within the width specified -/// '+': add a '+' character if the number is positive (to match a '-' sign -/// for negatives) -/// ' ': add an extra space if the number is positive (to match a '-' -/// sign for negatives) -/// -/// The printf '#' flag is invalid and a compile-time error will be reported if it is used. -module Printf = - - /// Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The first type parameter indicates the - /// arguments of the format operation and the last the overall return type. - type BuilderFormat<'T,'Result> = Format<'T, StringBuilder, unit, 'Result> - /// Represents a statically-analyzed format when formatting builds a string. The first type parameter indicates the - /// arguments of the format operation and the last the overall return type. - type StringFormat<'T,'Result> = Format<'T, unit, string, 'Result> - /// Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The first type parameter indicates the - /// arguments of the format operation and the last the overall return type. - type TextWriterFormat<'T,'Result> = Format<'T, TextWriter, unit, 'Result> - - /// Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The type parameter indicates the - /// arguments and return type of the format operation. - type BuilderFormat<'T> = BuilderFormat<'T,unit> - /// Represents a statically-analyzed format when formatting builds a string. The type parameter indicates the - /// arguments and return type of the format operation. - type StringFormat<'T> = StringFormat<'T,string> - /// Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The type parameter indicates the - /// arguments and return type of the format operation. - type TextWriterFormat<'T> = TextWriterFormat<'T,unit> - - /// Print to a System.Text.StringBuilder - val bprintf : builder:StringBuilder -> format:BuilderFormat<'T> -> 'T - - /// Print to a text writer or an OCaml-compatible channel - val fprintf : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T - - /// Print to a text writer or an OCaml-compatible channel, adding a newline - val fprintfn : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T - - /// Print to any subtype of the .NET type System.IO.TextWriter - val twprintf : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T - - /// Print to any subtype of the .NET type System.IO.TextWriter, and add a newline - val twprintfn : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T - - /// Formatted printing to stderr - val eprintf : format:TextWriterFormat<'T> -> 'T - - /// Formatted printing to stderr, adding a newline - val eprintfn : format:TextWriterFormat<'T> -> 'T - - /// Formatted printing to stdout - val printf : format:TextWriterFormat<'T> -> 'T - - /// Formatted printing to stdout, adding a newline - val printfn : format:TextWriterFormat<'T> -> 'T - - /// Print to a string via an internal string buffer and return - /// the result as a string. Helper printers must return strings. - val sprintf : format:StringFormat<'T> -> 'T - - /// bprintf, but call the given 'final' function to generate the result. - /// See kprintf. - val kbprintf : continutation:(unit -> 'Result) -> builder:StringBuilder -> format:BuilderFormat<'T,'Result> -> 'T - - /// fprintf, but call the given 'final' function to generate the result. - /// See kprintf. - val kfprintf : continutation:(unit -> 'Result) -> textWriter:TextWriter -> format:TextWriterFormat<'T,'Result> -> 'T - - /// printf, but call the given 'final' function to generate the result. - /// For example, these let the printing force a flush after all output has - /// been entered onto the channel, but not before. - val kprintf : continutation:(string -> 'Result) -> format:StringFormat<'T,'Result> -> 'T - - /// twprintf, but call the given 'final' function to generate the result. - /// See kprintf. - val ktwprintf : continutation:(unit -> 'Result) -> textWriter:TextWriter -> format:TextWriterFormat<'T,'Result> -> 'T - - /// sprintf, but call the given 'final' function to generate the result. - /// See kprintf. - val ksprintf : continutation:(string -> 'Result) -> format:StringFormat<'T,'Result> -> 'T - - /// Print to a string buffer and raise an exception with the given - /// result. Helper printers must return strings. - val failwithf: format:StringFormat<'T,'Result> -> 'T - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/quotations.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/quotations.fs deleted file mode 100644 index 030f9cc0..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/quotations.fs +++ /dev/null @@ -1,1558 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Quotations - -#if FX_MINIMAL_REFLECTION -#else -open System -open System.IO -open System.Reflection -open System.Collections.Generic -open Microsoft.FSharp -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Primitives.Basics -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Reflection -open Microsoft.FSharp.Text -open Microsoft.FSharp.Text.Printf -open Microsoft.FSharp.Text.StructuredPrintfImpl -open Microsoft.FSharp.Text.StructuredPrintfImpl.LayoutOps - -//-------------------------------------------------------------------------- -// RAW quotations - basic data types -//-------------------------------------------------------------------------- - -module Helpers = - let qOneOrMoreRLinear q inp = - let rec queryAcc rvs e = - match q e with - | Some(v,body) -> queryAcc (v::rvs) body - | None -> - match rvs with - | [] -> None - | _ -> Some(List.rev rvs,e) - queryAcc [] inp - - let qOneOrMoreLLinear q inp = - let rec queryAcc e rvs = - match q e with - | Some(body,v) -> queryAcc body (v::rvs) - | None -> - match rvs with - | [] -> None - | _ -> Some(e,rvs) - queryAcc inp [] - - let mkRLinear mk (vs,body) = List.foldBack (fun v acc -> mk(v,acc)) vs body - let mkLLinear mk (body,vs) = List.fold (fun acc v -> mk(acc,v)) body vs - - let staticBindingFlags = BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly - let staticOrInstanceBindingFlags = BindingFlags.Instance ||| BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly - let instanceBindingFlags = BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly - let publicOrPrivateBindingFlags = System.Reflection.BindingFlags.Public ||| System.Reflection.BindingFlags.NonPublic - - let isDelegateType (typ:Type) = - if typ.IsSubclassOf(typeof) then - match typ.GetMethod("Invoke", instanceBindingFlags) with - | null -> false - | _ -> true - else - false - - let getDelegateInvoke ty = - if not (isDelegateType(ty)) then invalidArg "ty" "Expecting delegate type" - ty.GetMethod("Invoke", instanceBindingFlags) - -open Helpers - - - -[] -[] -type Var(name: string, typ:Type, ?isMutable: bool) = - - inherit obj() - static let mutable lastStamp = 0L - static let globals = new Dictionary<(string*Type),Var>(11) - - let stamp = lastStamp - let isMutable = defaultArg isMutable false - do lock globals (fun () -> lastStamp <- lastStamp + 1L) - - member v.Name = name - member v.IsMutable = isMutable - member v.Type = typ - member v.Stamp = stamp - - static member Global(nm,typ: Type) = - lock globals (fun () -> - let mutable res = Unchecked.defaultof - let ok = globals.TryGetValue((nm,typ),&res) - if ok then res else - let res = new Var(nm,typ) - globals.[((nm,typ))] <- res - res) - - override v.ToString() = name - override v.GetHashCode() = base.GetHashCode() - override v.Equals(obj:obj) = - match obj with - | :? Var as v2 -> System.Object.ReferenceEquals(v,v2) - | _ -> false - - interface System.IComparable with - member v.CompareTo(obj:obj) = - match obj with - | :? Var as v2 -> - if System.Object.ReferenceEquals(v,v2) then 0 else - let c = compare v.Name v2.Name in - if c <> 0 then c else -#if FX_NO_REFLECTION_METADATA_TOKENS // not available on Compact Framework -#else - let c = compare v.Type.MetadataToken v2.Type.MetadataToken in - if c <> 0 then c else - let c = compare v.Type.Module.MetadataToken v2.Type.Module.MetadataToken in - if c <> 0 then c else -#endif - let c = compare v.Type.Assembly.FullName v2.Type.Assembly.FullName in - if c <> 0 then c else - compare v.Stamp v2.Stamp - | _ -> 0 - -/// Represents specifications of a subset of F# expressions -[] -type Tree = - | CombTerm of ExprConstInfo * Expr list - | VarTerm of Var - | LambdaTerm of Var * Expr - | HoleTerm of Type * int - -and - [] - ExprConstInfo = - | AppOp - | IfThenElseOp - | LetRecOp - | LetRecCombOp - | LetOp - | NewRecordOp of Type - | NewUnionCaseOp of UnionCaseInfo - | UnionCaseTestOp of UnionCaseInfo - | NewTupleOp of Type - | TupleGetOp of Type * int - | InstancePropGetOp of PropertyInfo - | StaticPropGetOp of PropertyInfo - | InstancePropSetOp of PropertyInfo - | StaticPropSetOp of PropertyInfo - | InstanceFieldGetOp of FieldInfo - | StaticFieldGetOp of FieldInfo - | InstanceFieldSetOp of FieldInfo - | StaticFieldSetOp of FieldInfo - | NewObjectOp of ConstructorInfo - | InstanceMethodCallOp of MethodInfo - | StaticMethodCallOp of MethodInfo - | CoerceOp of Type - | NewArrayOp of Type - | NewDelegateOp of Type - | QuoteOp - | SequentialOp - | AddressOfOp - | VarSetOp - | AddressSetOp - | TypeTestOp of Type - | TryWithOp - | TryFinallyOp - | ForIntegerRangeLoopOp - | WhileLoopOp - // Arbitrary spliced values - not serialized - | ValueOp of obj * Type - | DefaultValueOp of Type - -and Expr(term:Tree,attribs:Expr list) = - member x.Tree = term - member x.CustomAttributes = attribs - override x.Equals(obj:obj) = - match obj with - | :? Expr as yt -> x.Tree = yt.Tree - | _ -> false - - override x.GetHashCode() = - x.Tree.GetHashCode() - - override x.ToString() = - Microsoft.FSharp.Text.StructuredPrintfImpl.Display.layout_to_string Microsoft.FSharp.Text.StructuredPrintfImpl.FormatOptions.Default (x.GetLayout()) - - member x.GetLayout() = - let expr (e:Expr ) = e.GetLayout() - let exprs (es:Expr list) = es |> List.map expr - let parens ls = bracketL (commaListL ls) - let pairL l1 l2 = bracketL (l1 $$ sepL "," $$ l2) - let listL ls = squareBracketL (commaListL ls) - let combL nm ls = wordL nm $$ parens ls - let noneL = wordL "None" - let someL e = combL "Some" [expr e] - let typeL (o: Type) = wordL o.FullName - let objL (o: 'T) = wordL (sprintf "%A" o) - let varL (v:Var) = wordL v.Name - let (|E|) (e: Expr) = e.Tree - let (|Lambda|_|) (E x) = match x with LambdaTerm(a,b) -> Some (a,b) | _ -> None - let (|IteratedLambda|_|) (e: Expr) = qOneOrMoreRLinear (|Lambda|_|) e - - let rec (|NLambdas|_|) n (e:Expr) = - match e with - | _ when n <= 0 -> Some([],e) - | Lambda(v,NLambdas ((-) n 1) (vs,b)) -> Some(v::vs,b) - | _ -> None - - match x.Tree with - | CombTerm(AppOp,args) -> combL "Application" (exprs args) - | CombTerm(IfThenElseOp,args) -> combL "IfThenElse" (exprs args) - | CombTerm(LetRecOp,[IteratedLambda(vs,E(CombTerm(LetRecCombOp,b2::bs)))]) -> combL "LetRec" [listL (List.map2 pairL (List.map varL vs) (exprs bs) ); b2.GetLayout()] - | CombTerm(LetOp,[e;E(LambdaTerm(v,b))]) -> combL "Let" [varL v; e.GetLayout(); b.GetLayout()] - | CombTerm(NewRecordOp(ty),args) -> combL "NewRecord" (typeL ty :: exprs args) - | CombTerm(NewUnionCaseOp(ucinfo),args) -> combL "NewUnionCase" (objL ucinfo :: exprs args) - | CombTerm(UnionCaseTestOp(ucinfo),args) -> combL "UnionCaseTest" (exprs args@ [objL ucinfo]) - | CombTerm(NewTupleOp(ty),args) -> combL "NewTuple" (exprs args) - | CombTerm(TupleGetOp(ty,i),[arg]) -> combL "TupleGet" ([expr arg] @ [objL i]) - | CombTerm(ValueOp(v,ty),[]) -> combL "Value" [objL v] - | CombTerm(InstanceMethodCallOp(minfo),obj::args) -> combL "Call" [someL obj; objL minfo; listL (exprs args)] - | CombTerm(StaticMethodCallOp(minfo),args) -> combL "Call" [noneL; objL minfo; listL (exprs args)] - | CombTerm(InstancePropGetOp(pinfo),(obj::args)) -> combL "PropGet" [someL obj; objL pinfo; listL (exprs args)] - | CombTerm(StaticPropGetOp(pinfo),args) -> combL "PropGet" [noneL; objL pinfo; listL (exprs args)] - | CombTerm(InstancePropSetOp(pinfo),(obj::args)) -> combL "PropSet" [someL obj; objL pinfo; listL (exprs args)] - | CombTerm(StaticPropSetOp(pinfo),args) -> combL "PropSet" [noneL; objL pinfo; listL (exprs args)] - | CombTerm(InstanceFieldGetOp(finfo),[obj]) -> combL "FieldGet" [someL obj; objL finfo] - | CombTerm(StaticFieldGetOp(finfo),[]) -> combL "FieldGet" [noneL; objL finfo] - | CombTerm(InstanceFieldSetOp(finfo),[obj;v]) -> combL "FieldSet" [someL obj; objL finfo; expr v;] - | CombTerm(StaticFieldSetOp(finfo),[v]) -> combL "FieldSet" [noneL; objL finfo; expr v;] - | CombTerm(CoerceOp(ty),[arg]) -> combL "Coerce" [ expr arg; typeL ty] - | CombTerm(NewObjectOp minfo,args) -> combL "NewObject" ([ objL minfo ] @ exprs args) - | CombTerm(DefaultValueOp(ty),args) -> combL "DefaultValue" ([ typeL ty ] @ exprs args) - | CombTerm(NewArrayOp(ty),args) -> combL "NewArray" ([ typeL ty ] @ exprs args) - | CombTerm(TypeTestOp(ty),args) -> combL "TypeTest" ([ typeL ty] @ exprs args) - | CombTerm(AddressOfOp,args) -> combL "AddressOf" (exprs args) - | CombTerm(VarSetOp,[E(VarTerm(v)); e]) -> combL "VarSet" [varL v; expr e] - | CombTerm(AddressSetOp,args) -> combL "AddressSet" (exprs args) - | CombTerm(ForIntegerRangeLoopOp,[e1;e2;E(LambdaTerm(v,e3))]) -> combL "ForIntegerRangeLoop" [varL v; expr e1; expr e2; expr e3] - | CombTerm(WhileLoopOp,args) -> combL "WhileLoop" (exprs args) - | CombTerm(TryFinallyOp,args) -> combL "TryFinally" (exprs args) - | CombTerm(TryWithOp,[e1;Lambda(v1,e2);Lambda(v2,e3)]) -> combL "TryWith" [expr e1; varL v1; expr e2; varL v2; expr e3] - | CombTerm(SequentialOp,args) -> combL "Sequential" (exprs args) - | CombTerm(NewDelegateOp(ty),[e]) -> - let n = (getDelegateInvoke ty).GetParameters().Length - match e with - | NLambdas n (vs,e) -> combL "NewDelegate" ([typeL ty] @ (vs |> List.map varL) @ [expr e]) - | _ -> combL "NewDelegate" ([typeL ty; expr e]) - //| CombTerm(_,args) -> combL "??" (exprs args) - | VarTerm(v) -> wordL v.Name - | LambdaTerm(v,b) -> combL "Lambda" [wordL v.Name; expr b] - | HoleTerm _ -> wordL "_" - | CombTerm(QuoteOp,args) -> combL "Quote" (exprs args) - | _ -> failwithf "Unexpected term in layout %A" x.Tree - - -type Expr<'T>(term:Tree,attribs) = - inherit Expr(term,attribs) - member x.Raw = (x :> Expr) - -[] -module Patterns = - - /// Represents a deserialized object that is yet to be instantiated. Representation is - /// as a computation. - type Instantiable<'T> = (int -> Type) -> 'T - - type ByteStream(bytes:byte[],initial:int,len:int) = - - let mutable pos = initial - let lim = initial + len - - member b.ReadByte() = - if pos >= lim then failwith "end of stream"; - let res = int32 bytes.[pos] - pos <- pos + 1; - res - - member b.ReadBytes n = - if pos + n > lim then failwith "ByteStream.ReadBytes: end of stream"; - let res = bytes.[pos..pos+n-1] - pos <- pos + n; - res - - member b.ReadUtf8BytesAsString n = - let res = System.Text.Encoding.UTF8.GetString(bytes,pos,n) - pos <- pos + n; - res - - - let E t = Expr< >(t,[]) - let EA (t,attribs) = Expr< >(t,attribs) - let ES ts = List.map E ts - - let (|E|) (e: Expr) = e.Tree - let (|ES|) (es: list) = es |> List.map (fun e -> e.Tree) - - - - let funTyC = typeof<(obj -> obj)>.GetGenericTypeDefinition() - let exprTyC = typedefof> - let checkVoid a = if a = typeof then typeof else a - let mkFunTy a b = - let (a, b) = checkVoid a, checkVoid b - funTyC.MakeGenericType([| a;b |]) - - let mkArrayTy (t:Type) = t.MakeArrayType(); - let mkExprTy (t:Type) = exprTyC.MakeGenericType([| t |]) - - - //-------------------------------------------------------------------------- - // Active patterns for decomposing quotations - //-------------------------------------------------------------------------- - - let (|Comb0|_|) (E x) = match x with CombTerm(k,[]) -> Some(k) | _ -> None - let (|Comb1|_|) (E x) = match x with CombTerm(k,[x]) -> Some(k,x) | _ -> None - let (|Comb2|_|) (E x) = match x with CombTerm(k,[x1;x2]) -> Some(k,x1,x2) | _ -> None - let (|Comb3|_|) (E x) = match x with CombTerm(k,[x1;x2;x3]) -> Some(k,x1,x2,x3) | _ -> None - - let (|Var|_|) (E x) = match x with VarTerm v -> Some v | _ -> None - let (|Application|_|) x = match x with Comb2(AppOp,a,b) -> Some (a,b) | _ -> None - let (|Lambda|_|) (E x) = match x with LambdaTerm(a,b) -> Some (a,b) | _ -> None - - let (|Quote|_|) (E x) = match x with CombTerm(QuoteOp,[a]) -> Some (a) | _ -> None - let (|IfThenElse|_|) = function Comb3(IfThenElseOp,e1,e2,e3) -> Some(e1,e2,e3) | _ -> None - - let (|NewTuple|_|) = function E(CombTerm(NewTupleOp(_),es)) -> Some(es) | _ -> None - let (|DefaultValue|_|) = function E(CombTerm(DefaultValueOp(ty),[])) -> Some(ty) | _ -> None - - let (|NewRecord|_|) = function E(CombTerm(NewRecordOp(x),es)) -> Some(x,es) | _ -> None - let (|NewUnionCase|_|) = function E(CombTerm(NewUnionCaseOp(ucinfo),es)) -> Some(ucinfo,es) | _ -> None - let (|UnionCaseTest|_|) = function Comb1(UnionCaseTestOp(ucinfo),e) -> Some(e,ucinfo) | _ -> None - let (|TupleGet|_|) = function Comb1(TupleGetOp(ty,n),e) -> Some(e,n) | _ -> None - let (|Coerce|_|) = function Comb1(CoerceOp ty,e1) -> Some(e1,ty) | _ -> None - let (|TypeTest|_|) = function Comb1(TypeTestOp ty,e1) -> Some(e1,ty) | _ -> None - let (|NewArray|_|) = function E(CombTerm(NewArrayOp ty,es)) -> Some(ty,es) | _ -> None - let (|AddressSet|_|) = function E(CombTerm(AddressSetOp,[e;v])) -> Some(e,v) | _ -> None - let (|TryFinally|_|) = function E(CombTerm(TryFinallyOp,[e1;e2])) -> Some(e1,e2) | _ -> None - let (|TryWith|_|) = function E(CombTerm(TryWithOp,[e1;Lambda(v1,e2);Lambda(v2,e3)])) -> Some(e1,v1,e2,v2,e3) | _ -> None - let (|VarSet|_| ) = function E(CombTerm(VarSetOp,[E(VarTerm(v)); e])) -> Some(v,e) | _ -> None - let (|Value|_|) = function E(CombTerm(ValueOp (v,ty),_)) -> Some(v,ty) | _ -> None - let (|ValueObj|_|) = function E(CombTerm(ValueOp (v,_),_)) -> Some(v) | _ -> None - - let (|AddressOf|_|) = function Comb1(AddressOfOp,e) -> Some(e) | _ -> None - let (|Sequential|_|) = function Comb2(SequentialOp,e1,e2) -> Some(e1,e2) | _ -> None - let (|ForIntegerRangeLoop|_|) = function Comb3(ForIntegerRangeLoopOp,e1,e2,Lambda(v, e3)) -> Some(v,e1,e2,e3) | _ -> None - let (|WhileLoop|_|) = function Comb2(WhileLoopOp,e1,e2) -> Some(e1,e2) | _ -> None - let (|PropGet|_|) = function E(CombTerm(StaticPropGetOp pinfo,args)) -> Some(None,pinfo,args) - | E(CombTerm(InstancePropGetOp pinfo,obj::args)) -> Some(Some(obj),pinfo,args) - | _ -> None - let (|PropSet|_|) = function E(CombTerm(StaticPropSetOp pinfo,v::args)) -> Some(None,pinfo,args,v) - | E(CombTerm(InstancePropSetOp pinfo,obj::v::args)) -> Some(Some(obj),pinfo,args,v) - | _ -> None - let (|FieldGet|_|) = function E(CombTerm(StaticFieldGetOp finfo,[])) -> Some(None,finfo) - | E(CombTerm(InstanceFieldGetOp finfo,[obj])) -> Some(Some(obj),finfo) - | _ -> None - let (|FieldSet|_|) = function E(CombTerm(StaticFieldSetOp finfo,[v])) -> Some(None,finfo,v) - | E(CombTerm(InstanceFieldSetOp finfo,[obj;v])) -> Some(Some(obj),finfo,v) - | _ -> None - let (|NewObject|_|) = function E(CombTerm(NewObjectOp ty,e)) -> Some(ty,e) | _ -> None - let (|Call|_|) = function E(CombTerm(StaticMethodCallOp minfo,args)) -> Some(None,minfo,args) - | E(CombTerm(InstanceMethodCallOp minfo,(obj::args))) -> Some(Some(obj),minfo,args) - | _ -> None - let (|LetRaw|_|) = function Comb2(LetOp,e1,e2) -> Some(e1,e2) | _ -> None - let (|LetRecRaw|_|) = function Comb1(LetRecOp,e1) -> Some(e1) | _ -> None - - let (|Let|_|) = function LetRaw(e,Lambda(v,body)) -> Some(v,e,body) | _ -> None - - let (|IteratedLambda|_|) (e: Expr) = qOneOrMoreRLinear (|Lambda|_|) e - let rec (|NLambdas|_|) n (e:Expr) = - match e with - | _ when n <= 0 -> Some([],e) - | Lambda(v,NLambdas ((-) n 1) (vs,b)) -> Some(v::vs,b) - | _ -> None - - let (|NewDelegate|_|) e = - match e with - | Comb1(NewDelegateOp(ty),e) -> - let n = (getDelegateInvoke ty).GetParameters().Length - match e with - | NLambdas n (vs,e) -> Some(ty,vs,e) - | _ -> None - | _ -> None - - let (|LetRec|_|) e = - match e with - | LetRecRaw(IteratedLambda(vs1,E(CombTerm(LetRecCombOp,body::es)))) -> Some(List.zip vs1 es,body) - | _ -> None - - //-------------------------------------------------------------------------- - // Getting the type of Raw quotations - //-------------------------------------------------------------------------- - - // Returns record member specified by name - let getRecordProperty(ty,fieldName) = - let mems = FSharpType.GetRecordFields(ty,publicOrPrivateBindingFlags) - match mems |> Array.tryFind (fun minfo -> minfo.Name = fieldName) with - | Some (m) -> m - | _ -> invalidArg "fieldName" "couldn't find a record member with specified name" - - let getUnionCaseInfo(ty,unionCaseName) = - let cases = FSharpType.GetUnionCases(ty,publicOrPrivateBindingFlags) - match cases |> Array.tryFind (fun ucase -> ucase.Name = unionCaseName) with - | Some(case) -> case - | _ -> invalidArg "unionCaseName" ("couldn't find a union case with the name '" + unionCaseName + "'") - - let getUnionCaseInfoField(ucinfo:UnionCaseInfo,index) = - let fields = ucinfo.GetFields() - if index < 0 || index >= fields.Length then invalidArg "index" "not a valid union case index" - fields.[index] - - /// Returns type of lambda applciation - something like "(fun a -> ..) b" - let rec typeOfAppliedLambda f = - let fty = ((typeOf f):Type) - match fty.GetGenericArguments() with - | [|a; b|] -> b - | _ -> failwith "ill formed expression: AppOp or LetOp" - - /// Returns type of the Raw quotation or fails if the quotation is ill formed - /// if 'verify' is true, verifies all branches, otherwise ignores some of them when not needed - and typeOf<'T> (e : ('T :> Expr)) : Type = - let (E t) = e - match t with - | VarTerm v -> v.Type - | LambdaTerm (v,b) -> mkFunTy v.Type (typeOf b) - | HoleTerm (ty,_) -> ty - | CombTerm (c,args) -> - match c,args with - | AppOp,[f;x] -> typeOfAppliedLambda f - | LetOp,_ -> match e with Let(_,_,b) -> typeOf b | _ -> failwith "unreachable" - | IfThenElseOp,[_;t;_] -> typeOf t - | LetRecOp,_ -> match e with LetRec(_,b) -> typeOf b | _ -> failwith "unreachable" - | LetRecCombOp,_ -> failwith "typeOfConst: LetRecCombOp" - | NewRecordOp ty,_ -> ty - | NewUnionCaseOp ucinfo,_ -> ucinfo.DeclaringType - | UnionCaseTestOp ucinfo,_ -> typeof - | ValueOp (o, ty),_ -> ty - | TupleGetOp (ty,i),_ -> FSharpType.GetTupleElements(ty).[i] - | NewTupleOp ty,_ -> ty - | StaticPropGetOp prop,_ -> prop.PropertyType - | InstancePropGetOp prop,_ -> prop.PropertyType - | StaticPropSetOp prop ,_ -> typeof - | InstancePropSetOp prop,_ -> typeof - | InstanceFieldGetOp fld ,_ -> fld.FieldType - | StaticFieldGetOp fld ,_ -> fld.FieldType - | InstanceFieldSetOp fld,_ -> typeof - | StaticFieldSetOp fld,_ -> typeof - | NewObjectOp ctor,_ -> ctor.DeclaringType - | InstanceMethodCallOp minfo,_ -> minfo.ReturnType |> checkVoid - | StaticMethodCallOp minfo,_ -> minfo.ReturnType |> checkVoid - | CoerceOp ty,_ -> ty - | SequentialOp,[a;b] -> typeOf b - | ForIntegerRangeLoopOp,_ -> typeof - | NewArrayOp ty,_ -> mkArrayTy ty - | NewDelegateOp ty,_ -> ty - | DefaultValueOp ty,_ -> ty - | QuoteOp,[expr] -> mkExprTy (typeOf expr) - | TryFinallyOp,[e1;e2] -> typeOf e1 - | TryWithOp,[e1;e2;e3] -> typeOf e1 - | WhileLoopOp,_ - | AddressSetOp,_ -> typeof - | AddressOfOp,_ -> failwith "can't take the address of this quotation" - | _ -> failwith "unreachable" - - //-------------------------------------------------------------------------- - // Constructors for building Raw quotations - //-------------------------------------------------------------------------- - - let mkFEN op l = E(CombTerm(op,l)) - let mkFE0 op = E(CombTerm(op,[])) - let mkFE1 op x = E(CombTerm(op,[(x:>Expr)])) - let mkFE2 op (x,y) = E(CombTerm(op,[(x:>Expr);(y:>Expr)])) - let mkFE3 op (x,y,z) = E(CombTerm(op,[(x:>Expr);(y:>Expr);(z:>Expr)]) ) - let mkOp v () = v - - let mkLetRaw v = mkFE2 LetOp v - - //-------------------------------------------------------------------------- - // Type-checked constructors for building Raw quotations - //-------------------------------------------------------------------------- - - // t2 is inherited from t1 / t2 implements interface t1 or t2 == t1 - let assignableFrom (t1:Type) (t2:Type) = - t1.IsAssignableFrom(t2) - - let checkTypes (expectedType: Type) (receivedType : Type) msg1 msg2 = - if (expectedType <> receivedType) then - invalidArg "receivedType" (sprintf "type mismatch when building '%s': %s. Expected '%A', got type '%A'" msg1 msg2 expectedType receivedType) - - let checkTypesWeak (expectedType: Type) (receivedType : Type) msg1 msg2 = - if (not (assignableFrom expectedType receivedType)) then - invalidArg "receivedType" (sprintf "type mismatch when building '%s': %s. Expected '%A', got type '%A'" msg1 msg2 expectedType receivedType) - - let checkArgs (paramInfos: ParameterInfo[]) (args:list) = - if (paramInfos.Length <> args.Length) then invalidArg "args" "incorrect number of arguments" - List.iter2 - ( fun (p:ParameterInfo) a -> checkTypesWeak p.ParameterType (typeOf a) "args" "invalid parameter for a method or indexer property") - (paramInfos |> Array.to_list) - args - // todo: shouldn't this be "strong" type check? sometimes? - - let checkAssignableFrom ty1 ty2 = - if not (assignableFrom ty1 ty2) then invalidArg "ty2" "incorrect type" - - let checkObj (membInfo: MemberInfo) (obj: Expr) = - if not (assignableFrom membInfo.DeclaringType (typeOf obj)) then invalidArg "obj" "incorrect instance type" - - - // Checks lambda application for correctnes - let checkAppliedLambda (f, v) = - let fty = typeOf f - let ftyG = (if fty.IsGenericType then fty.GetGenericTypeDefinition() else fty) - checkTypes funTyC ftyG "f" "expected function type in function application or let binding" - let vty = (typeOf v) - match fty.GetGenericArguments() with - | [|a; b|] -> checkTypes vty a "f" "function argument type doesn't match" - | _ -> invalidArg "f" "invalid function type" - - // Returns option (by name) of a NewUnionCase type - let getUnionCaseFields ty str = - let cases = FSharpType.GetUnionCases(ty,publicOrPrivateBindingFlags) - match cases |> Array.tryFind (fun ucase -> ucase.Name = str) with - | Some(case) -> case.GetFields() - | _ -> invalidArg "ty" "type is not a union type" - - let checkBind(v:Var,e) = - let ety = typeOf e - checkTypes v.Type ety "let" "the variable type doesn't match the type of the rhs of a let binding" - - // [Correct by definition] - let mkVar v = E(VarTerm v ) - let mkQuote(a) = E(CombTerm(QuoteOp,[(a:>Expr)] )) - - let mkValue (v,ty) = mkFE0 (ValueOp(v,ty)) - let mkValueG (v:'T) = mkValue(box v, typeof<'T>) - let mkLiftedValueOpG (v:'T) = ValueOp(box v, typeof<'T>) - let mkUnit () = mkValue(null, typeof) - let mkBool (v:bool) = mkValueG(v) - let mkString (v:string) = mkValueG(v) - let mkSingle (v:single) = mkValueG(v) - let mkDouble (v:double) = mkValueG(v) - let mkChar (v:char) = mkValueG(v) - let mkSByte (v:sbyte) = mkValueG(v) - let mkByte (v:byte) = mkValueG(v) - let mkInt16 (v:int16) = mkValueG(v) - let mkUInt16 (v:uint16) = mkValueG(v) - let mkInt32 (v:int32) = mkValueG(v) - let mkUInt32 (v:uint32) = mkValueG(v) - let mkInt64 (v:int64) = mkValueG(v) - let mkUInt64 (v:uint64) = mkValueG(v) - let mkAddressOf v = mkFE1 AddressOfOp v - let mkSequential (e1,e2) = mkFE2 SequentialOp (e1,e2) - let mkTypeTest (e,ty) = mkFE1 (TypeTestOp(ty)) e - let mkVarSet (v,e) = mkFE2 VarSetOp (mkVar(v),e) - let mkAddressSet (e1,e2) = mkFE2 AddressSetOp (e1,e2) - let mkLambda(var,body) = E(LambdaTerm(var,(body:>Expr))) - let mkTryWith(e1,v1,e2,v2,e3) = mkFE3 TryWithOp (e1,mkLambda(v1,e2),mkLambda(v2,e3)) - let mkTryFinally(e1,e2) = mkFE2 TryFinallyOp (e1,e2) - - let mkCoerce (ty,x) = mkFE1 (CoerceOp ty) x - let mkNull (ty) = mkFE0 (ValueOp(null,ty)) - - let mkApplication v = checkAppliedLambda v; mkFE2 AppOp v - - // Tuples - let mkNewTupleWithType (ty,args:Expr list) = - let mems = FSharpType.GetTupleElements ty |> Array.to_list - if (args.Length <> mems.Length) then invalidArg "args" "incompatible tuple length" - List.iter2(fun mt a -> checkTypes mt (typeOf a) "args" "Mismatching type of argument and tuple element." ) mems args - mkFEN (NewTupleOp ty) args - - let mkNewTuple (args) = - let ty = FSharpType.MakeTupleType(Array.map typeOf (Array.of_list args)) - mkFEN (NewTupleOp ty) args - - let mkTupleGet (ty,n,x) = - checkTypes ty (typeOf x) "tupleGet" "expression doesn't match the tuple type" - let mems = FSharpType.GetTupleElements ty - if (n < 0 or mems.Length <= n) then invalidArg "n" "tuple access out of range" - mkFE1 (TupleGetOp (ty,n)) x - - // Records - let mkNewRecord (ty,args:list) = - let mems = FSharpType.GetRecordFields(ty,publicOrPrivateBindingFlags) - if (args.Length <> mems.Length) then invalidArg "args" "incompatible record length" - List.iter2 (fun (minfo:PropertyInfo) a -> checkTypes minfo.PropertyType (typeOf a) "recd" "incorrect argument type for a record") (Array.to_list mems) args - mkFEN (NewRecordOp ty) args - - - // Discriminated unions - let mkNewUnionCase (ucinfo:UnionCaseInfo,args:list) = - let sargs = ucinfo.GetFields() - if (args.Length <> sargs.Length) then invalidArg "args" "union type requires different number of arguments" - List.iter2 (fun (minfo:PropertyInfo) a -> checkTypes minfo.PropertyType (typeOf a) "sum" "incorrect argument type for a union") (Array.to_list sargs) args - mkFEN (NewUnionCaseOp ucinfo) args - - let mkUnionCaseTest (ucinfo:UnionCaseInfo,expr) = - checkTypes ucinfo.DeclaringType (typeOf expr) "UnionCaseTagTest" "types of expression does not match" - mkFE1 (UnionCaseTestOp ucinfo) expr - - // Conditional etc.. - let mkIfThenElse (e,t,f) = - checkTypes (typeOf t) (typeOf f) "cond" "types of true and false branches differ" - checkTypes (typeof) (typeOf e) "cond" "condition expression must be of type bool" - mkFE3 IfThenElseOp (e,t,f) - - let mkNewArray (ty,args) = - List.iter (fun a -> checkTypes ty (typeOf a) "newArray" "initializer doesn't match array type") args - mkFEN (NewArrayOp ty) args - - let mkInstanceFieldGet(obj,finfo:FieldInfo) = - match finfo.IsStatic with - | false -> - checkObj finfo obj - mkFE1 (InstanceFieldGetOp finfo) obj - | true -> invalidArg "finfo" "object provided for static member" - - let mkStaticFieldGet (finfo:FieldInfo) = - match finfo.IsStatic with - | true -> mkFE0 (StaticFieldGetOp finfo) - | false -> invalidArg "finfo" "no object provided for instance member" - - let mkStaticFieldSet (finfo:FieldInfo,value:Expr) = - checkTypes (typeOf value) finfo.FieldType "value" "the type of the field was incorrect" - match finfo.IsStatic with - | true -> mkFE1 (StaticFieldSetOp finfo) value - | false -> invalidArg "finfo" "no object provided for instance member" - - let mkInstanceFieldSet (obj,finfo:FieldInfo,value:Expr) = - checkTypes (typeOf value) finfo.FieldType "value" "the type of the field was incorrect" - match finfo.IsStatic with - | false -> - checkObj finfo obj - mkFE2 (InstanceFieldSetOp finfo) (obj,value) - | true -> invalidArg "finfo" "object provided for static member" - - let mkCtorCall (ci:ConstructorInfo,args:list) = - checkArgs (ci.GetParameters()) args - mkFEN (NewObjectOp ci) args - - let mkDefaultValue (ty:Type) = - mkFE0 (DefaultValueOp ty) - - let mkStaticPropGet (pinfo:PropertyInfo,args:list) = - if (not pinfo.CanRead) then invalidArg "pinfo" "reading a set-only property" - checkArgs (pinfo.GetIndexParameters()) args - match pinfo.GetGetMethod(true).IsStatic with - | true -> mkFEN (StaticPropGetOp pinfo) args - | false -> invalidArg "pinfo" "no object provided for instance member" - - let mkInstancePropGet (obj,pinfo:PropertyInfo,args:list) = - if (not pinfo.CanRead) then invalidArg "pinfo" "reading a set-only property" - checkArgs (pinfo.GetIndexParameters()) args - match pinfo.GetGetMethod(true).IsStatic with - | false -> - checkObj pinfo obj - mkFEN (InstancePropGetOp pinfo) (obj::args) - | true -> invalidArg "pinfo" "object provided for static member" - - let mkStaticPropSet (pinfo:PropertyInfo,args:list,value:Expr) = - if (not pinfo.CanWrite) then invalidArg "pinfo" "writing a get-only property" - checkArgs (pinfo.GetIndexParameters()) args - match pinfo.GetSetMethod(true).IsStatic with - | true -> mkFEN (StaticPropSetOp pinfo) (value::args) - | false -> invalidArg "pinfo" "no object provided for instance member" - - let mkInstancePropSet (obj,pinfo:PropertyInfo,args:list,value:Expr) = - if (not pinfo.CanWrite) then invalidArg "pinfo" "writing a get-only property" - checkArgs (pinfo.GetIndexParameters()) args - match pinfo.GetSetMethod(true).IsStatic with - | false -> - checkObj pinfo obj - mkFEN (InstancePropSetOp pinfo) (obj::value::args) - | true -> invalidArg "pinfo" "object provided for static member" - - let mkInstanceMethodCall (obj,minfo:MethodInfo,args:list) = - checkArgs (minfo.GetParameters()) args - match minfo.IsStatic with - | false -> - checkObj minfo obj - mkFEN (InstanceMethodCallOp minfo) (obj::args) - | true -> invalidArg "minfo" "object provided for static member" - - let mkStaticMethodCall (minfo:MethodInfo,args:list) = - checkArgs (minfo.GetParameters()) args - match minfo.IsStatic with - | true -> mkFEN (StaticMethodCallOp minfo) args - | false -> invalidArg "minfo" "no object provided for instance member" - - let mkForLoop (v:Var,lowerBound,upperBound,body) = - checkTypes (typeof) (typeOf lowerBound) "lowerBound" "lower bound variable must be an integer" - checkTypes (typeof) (typeOf upperBound) "upperBound" "upper bound variable must be an integer" - checkTypes (typeof) (v.Type) "for" "body of the for loop must be lambda taking integer as an argument" - mkFE3 ForIntegerRangeLoopOp (lowerBound, upperBound, mkLambda(v,body)) - - let mkWhileLoop (guard,body) = - checkTypes (typeof) (typeOf guard) "guard" "guard must return boolean" - checkTypes (typeof) (typeOf body) "body" "body must return unit" - mkFE2 (WhileLoopOp) (guard,body) - - let mkNewDelegate (ty,e) = - let mi = getDelegateInvoke ty - let ps = mi.GetParameters() - let dlfun = Array.foldBack (fun (p:ParameterInfo) rty -> mkFunTy p.ParameterType rty) ps mi.ReturnType - checkTypes dlfun (typeOf e) "ty" "Function type doesn't match delegate type." - mkFE1 (NewDelegateOp ty) e - - let mkLet (v,e,b) = - checkBind (v,e); - mkLetRaw (e,mkLambda(v,b)) - - //let mkLambdas(vs,b) = mkRLinear mkLambdaRaw (vs,(b:>Expr)) - let mkTupledApplication (f,args) = - match args with - | [] -> mkApplication (f,mkUnit()) - | [x] -> mkApplication (f,x) - | _ -> mkApplication (f,mkNewTuple args) - - let mkApplications(f: Expr,es:list>) = mkLLinear mkTupledApplication (f,es) - - let mkIteratedLambdas(vs,b) = mkRLinear mkLambda (vs,b) - - let mkLetRecRaw v = mkFE1 LetRecOp v - let mkLetRecCombRaw v = mkFEN LetRecCombOp v - let mkLetRec (ves:(Var*Expr) list,body) = - List.iter checkBind ves; - let vs,es = List.unzip ves - mkLetRecRaw(mkIteratedLambdas (vs,mkLetRecCombRaw (body::es))) - - let ReflectedDefinitionsResourceNameBase = "ReflectedDefinitions" - - //------------------------------------------------------------------------- - // General Method Binder - - let typeEquals (s:Type) (t:Type) = s.Equals(t) - let typesEqual (ss:Type list) (tt:Type list) = - (ss.Length = tt.Length) && List.forall2 typeEquals ss tt - - let instFormal (typarEnv: Type[]) (ty:Instantiable<'T>) = ty (fun i -> typarEnv.[i]) - - let getGenericArguments(tc:Type) = - if tc.IsGenericType then tc.GetGenericArguments() else [| |] - - let getNumGenericArguments(tc:Type) = - if tc.IsGenericType then tc.GetGenericArguments().Length else 0 - - let bindMethodBySearch (parentT:Type,nm,marity,argtys,rty) = - let methInfos = parentT.GetMethods(staticOrInstanceBindingFlags) |> Array.to_list - // First, filter on name, if unique, then binding "done" - let tyargTs = getGenericArguments(parentT) - let methInfos = methInfos |> List.filter (fun methInfo -> methInfo.Name = nm) - match methInfos with - | [methInfo] -> - methInfo - | _ -> - // Second, type match. Note type erased (non-generic) F# code would not type match but they have unique names - let select (methInfo:MethodInfo) = - let tyargTIs = if parentT.IsGenericType then parentT.GetGenericArguments() else [| |] - // mref implied Types - let mtyargTIs = if methInfo.IsGenericMethod then methInfo.GetGenericArguments() else [| |] - if mtyargTIs.Length <> marity then false (* method generic arity mismatch *) else - let typarEnv = (Array.append tyargTs mtyargTIs) - let argTs = argtys |> List.map (instFormal typarEnv) - let resT = instFormal typarEnv rty - - // methInfo implied Types - let haveArgTs = - let parameters = Array.to_list (methInfo.GetParameters()) - parameters |> List.map (fun param -> param.ParameterType) - let haveResT = methInfo.ReturnType - // check for match - if argTs.Length <> haveArgTs.Length then false (* method argument length mismatch *) else - let res = typesEqual (resT::argTs) (haveResT::haveArgTs) - res - // return MethodInfo for (generic) type's (generic) method - match List.tryFind select methInfos with - | None -> failwith "convMethodRef: could not bind to method" - | Some methInfo -> methInfo - - let bindMethodHelper (parentT: Type, nm,marity,argtys,rty) = - if parentT = null then invalidArg "parentT" "parent type should not be null" - if marity = 0 then - let tyargTs = if parentT.IsGenericType then parentT.GetGenericArguments() else [| |] - let argTs,resT = - let argTs = Array.of_list (List.map (instFormal tyargTs) argtys) - let resT = instFormal tyargTs rty - argTs,resT - let methInfo = - try - match parentT.GetMethod(nm,staticOrInstanceBindingFlags,null,argTs,null) with - | null -> None - | res -> Some(res) - with :? AmbiguousMatchException -> None - match methInfo with - | Some methInfo when (typeEquals resT methInfo.ReturnType) -> methInfo - | _ -> bindMethodBySearch(parentT,nm,marity,argtys,rty) - else - bindMethodBySearch(parentT,nm,marity,argtys,rty) - - let bindModuleProperty (ty:Type,nm) = - match ty.GetProperty(nm,staticBindingFlags) with - | null -> failwith ("Couldn't bind property " + nm + " in type " + (ty.ToString())) - | res -> res - - - let bindModuleFunction (ty:Type,nm) = - match ty.GetMethod(nm,staticBindingFlags) with - | null -> failwith ("Couldn't bind function " + nm + " in type " + (ty.ToString())) - | res -> res - - let mkNamedType (tc:Type,tyargs) = - match tyargs with - | [] -> tc - | _ -> tc.MakeGenericType(Array.of_list tyargs) - - let inline checkNonNullArg (arg:string,err:string) y = match box y with null -> raise (new ArgumentNullException(arg,err)) | _ -> y - - let inst (tyargs:Type list) (i: Instantiable<'T>) = i (fun idx -> tyargs.[idx]) // Note, O(n) looks, but #tyargs is always small - - let bindProp (tc,propName,retType,argTypes,tyargs) = - // We search in the instantiated type, rather than searching the generic type. - let typ = mkNamedType(tc,tyargs) - let argtyps : Type list = argTypes |> inst tyargs - let retType : Type = retType |> inst tyargs - typ.GetProperty(propName, staticOrInstanceBindingFlags, null, retType, Array.of_list argtyps,null) |> checkNonNullArg ("propName","failed to bind property '"+ propName+"'") // fxcop may not see "propName" as an arg - - let bindField (tc,fldName,tyargs) = - let typ = mkNamedType(tc,tyargs) - typ.GetField(fldName,staticOrInstanceBindingFlags) |> checkNonNullArg ("fldName","failed to bind field '"+ fldName+"'") // fxcop may not see "fldName" as an arg - - let bindGenericCtor (tc:Type,argTypes:Instantiable) = - let argtyps = instFormal (getGenericArguments tc) argTypes - tc.GetConstructor(instanceBindingFlags,null,Array.of_list argtyps,null) |> checkNonNullArg ("tc","failed to bind constructor") // fxcop may not see "tc" as an arg - - let bindCtor (tc,argTypes:Instantiable,tyargs) = - let typ = mkNamedType(tc,tyargs) - let argtyps = argTypes |> inst tyargs - typ.GetConstructor(instanceBindingFlags,null,Array.of_list argtyps,null) |> checkNonNullArg ("tc","failed to bind constructor") // fxcop may not see "tc" as an arg - - let chop n xs = - if n<0 then failwith "List.chop: -ve" else - let rec split l = - match l with - | 0,xs -> [],xs - | n,x::xs -> let front,back = split (n-1,xs) - x::front,back - | n,[] -> failwith "List.chop: not enough elts list" - split (n,xs) - - let instMeth (ngmeth: MethodInfo, methTypeArgs) = - if ngmeth.GetGenericArguments().Length = 0 then ngmeth(* non generic *) - else ngmeth.MakeGenericMethod(Array.of_list methTypeArgs) - - let bindGenericMeth (tc:Type,argTypes : list>,retType,methName,numMethTyargs) = - bindMethodHelper(tc,methName,numMethTyargs,argTypes,retType) - - let bindMeth ((tc:Type,argTypes : list>,retType,methName,numMethTyargs),tyargs) = - let ntyargs = tc.GetGenericArguments().Length - let enclTypeArgs,methTypeArgs = chop ntyargs tyargs - let ty = mkNamedType(tc,enclTypeArgs) - let ngmeth = bindMethodHelper(ty,methName,numMethTyargs,argTypes,retType) - instMeth(ngmeth,methTypeArgs) - - let pinfoIsStatic (pinfo:PropertyInfo) = - if pinfo.CanRead then pinfo.GetGetMethod(true).IsStatic - elif pinfo.CanWrite then pinfo.GetSetMethod(true).IsStatic - else false - - //-------------------------------------------------------------------------- - // Unpickling - //-------------------------------------------------------------------------- - - module SimpleUnpickle = - - type instate = - { is: ByteStream; - istrings: string array; - localAssembly: System.Reflection.Assembly } - - let u_byte_as_int st = st.is.ReadByte() - - let u_bool st = let b = u_byte_as_int st in (b = 1) - let u_void (is: instate) = () - let u_unit (is: instate) = () - let prim_u_int32 st = - let b0 = (u_byte_as_int st) - let b1 = (u_byte_as_int st) - let b2 = (u_byte_as_int st) - let b3 = (u_byte_as_int st) - b0 ||| (b1 <<< 8) ||| (b2 <<< 16) ||| (b3 <<< 24) - - let u_int32 st = - let b0 = u_byte_as_int st - if b0 <= 0x7F then b0 - elif b0 <= 0xbf then - let b0 = b0 &&& 0x7f - let b1 = (u_byte_as_int st) - (b0 <<< 8) ||| b1 - else - prim_u_int32 st - - let u_bytes st = - let n = u_int32 st - st.is.ReadBytes(n) - - let prim_u_string st = - let len = (u_int32 st) - st.is.ReadUtf8BytesAsString(len) - - let u_int st = u_int32 st - let u_sbyte st = sbyte (u_int32 st) - let u_byte st = byte (u_byte_as_int st) - let u_int16 st = int16 (u_int32 st) - let u_uint16 st = uint16 (u_int32 st) - let u_uint32 st = uint32 (u_int32 st) - let u_int64 st = - let b1 = int64 (u_int32 st) &&& 0xFFFFFFFFL - let b2 = int64 (u_int32 st) - b1 ||| (b2 <<< 32) - let u_uint64 st = uint64 (u_int64 st) - let u_double st = System.BitConverter.ToDouble(System.BitConverter.GetBytes(u_int64 st),0) - let u_float32 st = System.BitConverter.ToSingle(System.BitConverter.GetBytes(u_int32 st),0) - let u_char st = char (int32 (u_uint16 st)) - let inline u_tup2 p1 p2 st = let a = p1 st in let b = p2 st in (a,b) - let inline u_tup3 p1 p2 p3 st = - let a = p1 st in let b = p2 st in let c = p3 st in (a,b,c) - let inline u_tup4 p1 p2 p3 p4 st = - let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in (a,b,c,d) - let inline u_tup5 p1 p2 p3 p4 p5 st = - let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in (a,b,c,d,e) - let u_uniq (tbl: _ array) st = - let n = u_int st - if n < 0 || n >= tbl.Length then failwith ("u_uniq: out of range, n = "+string n+ ", sizeof(tab) = " + string tbl.Length); - tbl.[n] - let u_string st = u_uniq st.istrings st - - let rec u_list_aux f acc st = - let tag = u_byte_as_int st - match tag with - | 0 -> List.rev acc - | 1 -> let a = f st in u_list_aux f (a::acc) st - | n -> failwith ("u_list: found number " + string n) - let u_list f st = u_list_aux f [] st - - let unpickle_obj localAssembly u phase2bytes = - let phase2data = - let st2 = - { is = new ByteStream(phase2bytes,0,phase2bytes.Length); - istrings = [| |]; - localAssembly=localAssembly } - u_tup2 (u_list prim_u_string) u_bytes st2 - let stringTab,phase1bytes = phase2data - let st1 = - { is = new ByteStream(phase1bytes,0,phase1bytes.Length); - istrings = Array.of_list stringTab; - localAssembly=localAssembly } - let res = u st1 - res - - open SimpleUnpickle - - let decodeFunTy args = - match args with - | [d;r] -> funTyC.MakeGenericType([| d; r |]) - | _ -> invalidArg "args" "expected two type arguments" - - let decodeArrayTy n (tys: Type list) = - match tys with - | [ty] -> if (n = 1) then ty.MakeArrayType() else ty.MakeArrayType(n) - // typeof.MakeArrayType(1) returns "Int[*]" but we need "Int[]" - | _ -> invalidArg "tys" "expected one type argument" - - let mkNamedTycon (tcName,ass:Assembly) = - match ass.GetType(tcName) with - | null -> - // For some reason we can get 'null' returned here even when a type with the right name exists... Hence search the slow way... - match (ass.GetTypes() |> Array.tryFind (fun a -> a.FullName = tcName)) with - | Some ty -> ty - | None -> invalidArg "tcName" "failed to bind type '%s' in assembly '%O'." tcName ass // "Available types are:\n%A" tcName ass (ass.GetTypes() |> Array.map (fun a -> a.FullName)) - | ty -> ty - - let decodeNamedTy tc tsR = mkNamedType(tc,tsR) - - let mscorlib = typeof.Assembly - let u_assref st = - let a = u_string st - if a = "" then mscorlib - elif a = "." then st.localAssembly - else - match System.Reflection.Assembly.Load(a) with - | null -> failwithf "failed to bind assembly '%s' while processing quotation data" a - | ass -> ass - - let u_NamedType st = - let a,b = u_tup2 u_string u_assref st - mkNamedTycon (a,b) - let u_tyvarSpec st = let tvName = u_string st in () - let u_tyconstSpec st = - let tag = u_byte_as_int st - match tag with - | 1 -> u_unit st |> (fun () -> decodeFunTy) - | 2 -> u_NamedType st |> decodeNamedTy - | 3 -> u_int st |> decodeArrayTy - | _ -> failwith "u_tyconstSpec" - - let appL fs env = List.map (fun f -> f env) fs - - let rec u_dtype st : (int -> Type) -> Type = - let tag = u_byte_as_int st - match tag with - | 0 -> u_int st |> (fun x env -> env(x)) - | 1 -> u_tup2 u_tyconstSpec (u_list u_dtype) st |> (fun (a,b) env -> a (appL b env)) - | _ -> failwith "u_dtype" - - let u_dtypes st = let a = u_list u_dtype st in appL a - - let (|NoTyArgs|) = function [] -> () | _ -> failwith "incorrect number of arguments during deserialization" - let (|OneTyArg|) = function [x] -> x | _ -> failwith "incorrect number of arguments during deserialization" - - type env = - { vars : Map; varn: int; typeInst : int -> Type } - let addVar env v = - { env with vars = env.vars.Add(env.varn,v); varn=env.varn+1 } - let envClosed (types:Type[]) = - { vars = Map.Empty; - varn = 0; - typeInst = fun (n:int) -> types.[n] } - - type Bindable<'T> = env -> 'T - - let rec u_Expr st = - let tag = u_byte_as_int st - match tag with - | 0 -> u_tup3 u_constSpec u_dtypes (u_list u_Expr) st - |> (fun (a,b,args) (env:env) -> - let tyargs = b env.typeInst - E(CombTerm(a tyargs, List.map (fun e -> e env) args ))) - | 1 -> let x = u_VarRef st - (fun env -> E(VarTerm (x env))) - | 2 -> let a = u_VarDecl st - let b = u_Expr st - (fun env -> let v = a env in E(LambdaTerm(v,b (addVar env v)))) - | 3 -> let a = u_dtype st - let idx = u_int st - (fun env -> E(HoleTerm(a env.typeInst , idx))) - | 4 -> let a = u_Expr st - (fun env -> mkQuote(a env)) - | 5 -> let a = u_Expr st - let attrs = u_list u_Expr st - (fun env -> let e = (a env) in EA(e.Tree,(e.CustomAttributes @ List.map (fun attrf -> attrf env) attrs))) - | _ -> failwith "u_Expr" - and u_VarDecl st = - let s,b = u_tup2 u_string u_dtype st in - (fun env -> new Var(s, b env.typeInst)) - and u_VarRef st = - let i = u_int st in - (fun env -> env.vars.[i]) - and u_RecdField st = - let ty,nm = u_tup2 u_NamedType u_string st - (fun tyargs -> getRecordProperty(mkNamedType(ty,tyargs),nm)) - and u_UnionCaseInfo st = - let ty,nm = u_tup2 u_NamedType u_string st - (fun tyargs -> getUnionCaseInfo(mkNamedType(ty,tyargs),nm)) - - and u_UnionCaseField st = - let case,i = u_tup2 u_UnionCaseInfo u_int st - (fun tyargs -> getUnionCaseInfoField(case tyargs,i)) - - and u_ModuleDefn st = - let (ty,nm,isProp) = u_tup3 u_NamedType u_string u_bool st - if isProp then StaticPropGetOp(bindModuleProperty(ty,nm)) - else StaticMethodCallOp(bindModuleFunction(ty,nm)) - - and u_MethodInfoData st = - u_tup5 u_NamedType (u_list u_dtype) u_dtype u_string u_int st - - and u_PropInfoData st = - u_tup4 u_NamedType u_string u_dtype u_dtypes st - - and u_CtorInfoData st = - u_tup2 u_NamedType u_dtypes st - - and u_MethodBase st = - let tag = u_byte_as_int st - match tag with - | 0 -> - match u_ModuleDefn st with - | StaticMethodCallOp(minfo) -> (minfo :> MethodBase) - | StaticPropGetOp(pinfo) -> (pinfo.GetGetMethod() :> MethodBase) - | _ -> failwith "unreachable" - | 1 -> - let data = u_MethodInfoData st - let minfo = bindGenericMeth(data) in - (minfo :> MethodBase) - | 2 -> - let data = u_CtorInfoData st - let cinfo = bindGenericCtor(data) in - (cinfo :> MethodBase) - | _ -> failwith "u_MethodBase" - - - and u_constSpec st = - let tag = u_byte_as_int st - match tag with - | 0 -> u_void st |> (fun () NoTyArgs -> IfThenElseOp) - | 1 -> u_ModuleDefn st |> (fun op tyargs -> - match op with - | StaticMethodCallOp(minfo) -> StaticMethodCallOp(instMeth(minfo,tyargs)) - // OK to throw away the tyargs here since this only non-generic values in modules get represented by static properties - | op -> op) - | 2 -> u_void st |> (fun () NoTyArgs -> LetRecOp) - | 3 -> u_NamedType st |> (fun x tyargs -> NewRecordOp (mkNamedType(x,tyargs))) - | 4 -> u_RecdField st |> (fun prop tyargs -> InstancePropGetOp(prop tyargs)) - | 5 -> u_UnionCaseInfo st |> (fun ucinfo tyargs -> NewUnionCaseOp(ucinfo tyargs)) - | 6 -> u_UnionCaseField st |> (fun prop tyargs -> InstancePropGetOp(prop tyargs) ) - | 7 -> u_UnionCaseInfo st |> (fun ucinfo tyargs -> UnionCaseTestOp(ucinfo tyargs)) - | 8 -> u_void st |> (fun () (OneTyArg(tyarg)) -> NewTupleOp tyarg) - | 9 -> u_int st |> (fun x (OneTyArg(tyarg)) -> TupleGetOp (tyarg,x)) - | 11 -> u_bool st |> (fun x NoTyArgs -> mkLiftedValueOpG x) - | 12 -> u_string st |> (fun x NoTyArgs -> mkLiftedValueOpG x) - | 13 -> u_float32 st |> (fun x NoTyArgs -> mkLiftedValueOpG x) - | 14 -> u_double st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 15 -> u_char st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 16 -> u_sbyte st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 17 -> u_byte st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 18 -> u_int16 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 19 -> u_uint16 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 20 -> u_int32 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 21 -> u_uint32 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 22 -> u_int64 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 23 -> u_uint64 st |> (fun a NoTyArgs -> mkLiftedValueOpG a) - | 24 -> u_void st |> (fun a NoTyArgs -> mkLiftedValueOpG ()) - | 25 -> u_PropInfoData st |> (fun (a,b,c,d) tyargs -> let pinfo = bindProp(a,b,c,d,tyargs) in if pinfoIsStatic pinfo then StaticPropGetOp(pinfo) else InstancePropGetOp(pinfo)) - | 26 -> u_CtorInfoData st |> (fun (a,b) tyargs -> NewObjectOp (bindCtor(a,b,tyargs))) - | 28 -> u_void st |> (fun a (OneTyArg(ty)) -> CoerceOp ty) - | 29 -> u_void st |> (fun a NoTyArgs -> SequentialOp) - | 30 -> u_void st |> (fun a NoTyArgs -> ForIntegerRangeLoopOp) - | 31 -> u_MethodInfoData st |> (fun p tyargs -> let minfo = bindMeth(p,tyargs) in if minfo.IsStatic then StaticMethodCallOp(minfo) else InstanceMethodCallOp(minfo)) - | 32 -> u_void st |> (fun a (OneTyArg(ty)) -> NewArrayOp ty) - | 33 -> u_void st |> (fun a (OneTyArg(ty)) -> NewDelegateOp ty) - | 34 -> u_void st |> (fun a NoTyArgs -> WhileLoopOp) - | 35 -> u_void st |> (fun () NoTyArgs -> LetOp) - | 36 -> u_RecdField st |> (fun prop tyargs -> InstancePropSetOp(prop tyargs)) - | 37 -> u_tup2 u_NamedType u_string st |> (fun (a,b) tyargs -> let finfo = bindField(a,b,tyargs) in if finfo.IsStatic then StaticFieldGetOp(finfo) else InstanceFieldGetOp(finfo)) - | 38 -> u_void st |> (fun () NoTyArgs -> LetRecCombOp) - | 39 -> u_void st |> (fun () NoTyArgs -> AppOp) - | 40 -> u_void st |> (fun () (OneTyArg(ty)) -> ValueOp(null,ty)) - | 41 -> u_void st |> (fun () (OneTyArg(ty)) -> DefaultValueOp(ty)) - | 42 -> u_PropInfoData st |> (fun (a,b,c,d) tyargs -> let pinfo = bindProp(a,b,c,d,tyargs) in if pinfoIsStatic pinfo then StaticPropSetOp(pinfo) else InstancePropSetOp(pinfo)) - | 43 -> u_tup2 u_NamedType u_string st |> (fun (a,b) tyargs -> let finfo = bindField(a,b,tyargs) in if finfo.IsStatic then StaticFieldSetOp(finfo) else InstanceFieldSetOp(finfo)) - | 44 -> u_void st |> (fun () NoTyArgs -> AddressOfOp) - | 45 -> u_void st |> (fun () NoTyArgs -> AddressSetOp) - | 46 -> u_void st |> (fun () (OneTyArg(ty)) -> TypeTestOp(ty)) - | 47 -> u_void st |> (fun () NoTyArgs -> TryFinallyOp) - | 48 -> u_void st |> (fun () NoTyArgs -> TryWithOp) - | _ -> failwithf "u_constSpec, unrecognized tag %d" tag - let unpickle_raw_expr (localType : System.Type) = unpickle_obj localType.Assembly u_Expr - let u_defn = u_tup2 u_MethodBase u_Expr - let u_defns = u_list u_defn - let unpickleDefns (localAssembly : System.Reflection.Assembly) = unpickle_obj localAssembly u_defns - - //-------------------------------------------------------------------------- - // General utilities that will eventually be folded into - // Microsoft.FSharp.Quotations.Typed - //-------------------------------------------------------------------------- - - /// Fill the holes in an Expr - let rec fillHolesInRawExpr (l:Expr[]) (E t as e) = - match t with - | VarTerm _ -> e - | LambdaTerm (v,b) -> EA(LambdaTerm(v, fillHolesInRawExpr l b ),e.CustomAttributes) - | CombTerm (op,args) -> EA(CombTerm(op, args |> List.map (fillHolesInRawExpr l)),e.CustomAttributes) - | HoleTerm (ty,idx) -> - if idx < 0 or idx >= l.Length then failwith "hole index out of range"; - let h = l.[idx] - checkTypes (typeOf h) ty "fill" "type of the argument doesn't match the hole type" - h - - let rec freeInExprAcc bvs acc (E t) = - match t with - | HoleTerm _ -> acc - | CombTerm (_, ag) -> ag |> List.fold (freeInExprAcc bvs) acc - | VarTerm v -> if Set.contains v bvs || Set.contains v acc then acc else Set.add v acc - | LambdaTerm (v,b) -> freeInExprAcc (Set.add v bvs) acc b - and freeInExpr e = freeInExprAcc Set.Empty Set.Empty e - - // utility for folding - let foldWhile f st (ie: seq<'T>) = - use e = ie.GetEnumerator() - let mutable res = Some st - while (res.IsSome && e.MoveNext()) do - res <- f (match res with Some a -> a | _ -> failwith "internal error") e.Current; - res - - let mkTyparSubst (tyargs:Type[]) = - let n = tyargs.Length - fun idx -> - if idx < n then tyargs.[idx] - else failwith "type argument out of range" - - exception Clash of Var - - /// Replace type variables and expression variables with parameters using the - /// given substitution functions/maps. - let rec substituteB bvs tmsubst (E t as e) = - match t with - | CombTerm (c, args) -> - let substargs = args |> List.map (fun arg -> substituteB bvs tmsubst arg) - EA(CombTerm(c, substargs),e.CustomAttributes) - | VarTerm v -> - match tmsubst v with - | None -> e - | Some e2 -> - let fvs = freeInExpr e2 - let clashes = Set.intersect fvs bvs in - if clashes.IsEmpty then e2 - else raise (Clash(clashes.MinimumElement)) - | LambdaTerm (v,b) -> - try EA(LambdaTerm(v,substituteB (Set.add v bvs) tmsubst b),e.CustomAttributes) - with Clash(bv) -> - if v = bv then - let v2 = new Var(v.Name,v.Type) - let v2exp = E(VarTerm(v2)) - EA(LambdaTerm(v2,substituteB bvs (fun v -> if v = bv then Some(v2exp) else tmsubst v) b),e.CustomAttributes) - else - rethrow() - | HoleTerm _ -> e - - - let substituteRaw tmsubst e = substituteB Set.Empty tmsubst e - - let readToEnd (s : Stream) = - let n = int s.Length - let res = Array.zeroCreate n - let i = ref 0 - while (!i < n) do - i := !i + s.Read(res,!i,(n - !i)) - done; - res - - let decodedTopResources = new Dictionary(10,HashIdentity.Structural) - -#if FX_NO_REFLECTION_MODULE_HANDLES // not available on Silverlight - type ModuleHandle = string - type System.Reflection.Module with - member x.ModuleHandle = x.FullyQualifiedName -#else - type ModuleHandle = System.ModuleHandle -#endif - -#if FX_NO_REFLECTION_METADATA_TOKENS // not available on Compact Framework - type ReflectedDefinitionTableKey = - | Key of Type * int * Type[] - static member GetKey(mbase:MethodBase) = - Key(mbase.DeclaringType.Module.ModuleHandle, - (if mbase.IsGenericMethod then mbase.GetGenericArguments().Length else 0), - mbase.GetParameters() |> Array.map (fun p -> p.Type)) -#else - type ReflectedDefinitionTableKey = - | Key of ModuleHandle * int - static member GetKey(mbase:MethodBase) = - Key(mbase.Module.ModuleHandle,mbase.MetadataToken) -#endif - - type ReflectedDefinitionTableEntry = Entry of Bindable - - let reflectedDefinitionTable = new Dictionary(10,HashIdentity.Structural) - - let registerReflectedDefinitions (assem : Assembly,rn,bytes:byte[]) = - let defns = unpickleDefns assem bytes - defns |> List.iter (fun (minfo,e) -> - //printfn "minfo = %A, handle = %A, token = %A" minfo minfo.Module.ModuleHandle minfo.MetadataToken - let key = ReflectedDefinitionTableKey.GetKey minfo - lock reflectedDefinitionTable (fun () -> - //printfn "Adding %A, hc = %d" key (key.GetHashCode()); - reflectedDefinitionTable.Add(key,Entry(e)))); - //System.Console.WriteLine("Added {0} resource {1}", assem.FullName, rn); - decodedTopResources.Add((assem,rn),0) - - let resolveMethodBase (mbase: MethodBase,tyargs: Type []) = - let data = - let assem = mbase.DeclaringType.Assembly - let key = ReflectedDefinitionTableKey.GetKey mbase - //printfn "Looking for %A, hc = %d, hc2 = %d" key (key.GetHashCode()) (assem.GetHashCode()); - let ok,res = lock reflectedDefinitionTable (fun () -> reflectedDefinitionTable.TryGetValue(key)) - if ok then Some(res) else - //System.Console.WriteLine("Loading {0}", td.Assembly); - let qdataResources = - // dynamic assemblies don't support the GetManifestResourceNames - match assem with - | :? System.Reflection.Emit.AssemblyBuilder -> [] - | _ -> - (try assem.GetManifestResourceNames() - // This raises NotSupportedException for dynamic assemblies - with :? NotSupportedException -> [| |]) - |> Array.to_list - |> List.filter (fun rn -> - //System.Console.WriteLine("Considering resource {0}", rn); - rn.StartsWith(ReflectedDefinitionsResourceNameBase,StringComparison.Ordinal) && - not (decodedTopResources.ContainsKey((assem,rn)))) - |> List.map (fun rn -> rn,unpickleDefns assem (readToEnd (assem.GetManifestResourceStream(rn)))) - - // ok, add to the table - let ok,res = - lock reflectedDefinitionTable (fun () -> - // check another thread didn't get in first - if not (reflectedDefinitionTable.ContainsKey(key)) then - qdataResources - |> List.iter (fun (rn,defns) -> - defns |> List.iter (fun (mbase,e) -> - reflectedDefinitionTable.[ReflectedDefinitionTableKey.GetKey mbase] <- Entry(e)); - decodedTopResources.Add((assem,rn),0)) - // we know it's in the table now, if it's ever going to be there - reflectedDefinitionTable.TryGetValue(key) - ); - - if ok then Some(res) else None - - match data with - | Some (Entry(exprBuilder)) -> - let expectedNumTypars = - getNumGenericArguments(mbase.DeclaringType) + - (match mbase with - | :? MethodInfo as minfo -> if minfo.IsGenericMethod then minfo.GetGenericArguments().Length else 0 - | _ -> 0) - if (expectedNumTypars <> tyargs.Length) then - invalidArg "tyargs" (sprintf "the method '%A' expects %d type arguments but %d were provided" mbase expectedNumTypars tyargs.Length); - Some(exprBuilder {typeInst = mkTyparSubst tyargs; vars=Map.Empty; varn=0}) - | None -> None - - let resolveMethodBaseInstantiated (mbase:MethodBase) = - match mbase with - | :? MethodInfo as minfo -> - let tyargs = - Array.append - (getGenericArguments(minfo.DeclaringType)) - (if minfo.IsGenericMethod then minfo.GetGenericArguments() else [| |]) - resolveMethodBase(mbase,tyargs) - | :? ConstructorInfo as cinfo -> - let tyargs = getGenericArguments(cinfo.DeclaringType) - resolveMethodBase(mbase,tyargs) - | _ -> - resolveMethodBase(mbase,[| |]) - - let deserialize(localAssembly,types,splices,bytes) : Expr = - let expr = unpickle_raw_expr localAssembly bytes (envClosed (Array.of_list types)) - fillHolesInRawExpr (Array.of_list splices) expr - - - let cast (expr: Expr) : Expr<'T> = - checkTypes (typeof<'T>) (typeOf expr) "expr" "the expression has the wrong type" - new Expr<'T>(expr.Tree,expr.CustomAttributes) - -open Patterns - - -type Expr with - member x.Substitute f = substituteRaw f x - member x.GetFreeVars () = (freeInExpr x :> seq<_>) - member x.Type = typeOf x - - static member AddressOf(e:Expr) = mkAddressOf(e) - static member AddressSet(e1:Expr,e2:Expr) = mkAddressSet(e1,e2) - static member Application(e1:Expr,e2:Expr) = mkApplication(e1,e2) - static member Applications(f:Expr,es) = mkApplications(f,es) - static member Call(meth:MethodInfo,args) = mkStaticMethodCall(meth,args) - static member Call(obj:Expr,meth:MethodInfo,args) = mkInstanceMethodCall(obj,meth,args) - static member Coerce(e:Expr,ty:Type) = mkCoerce(ty,e) - static member IfThenElse(g:Expr,t:Expr,e:Expr) = mkIfThenElse(g,t,e) - static member ForIntegerRangeLoop(v,start:Expr,finish:Expr,body:Expr) = mkForLoop(v,start,finish,body) - //static member Range: Expr * Expr -> Expr - //static member RangeStep: Expr * Expr * Expr -> Expr - static member FieldGet(finfo:FieldInfo) = mkStaticFieldGet(finfo) - static member FieldGet(obj:Expr,finfo:FieldInfo) = mkInstanceFieldGet(obj,finfo) - static member FieldSet(finfo:FieldInfo,v:Expr) = mkStaticFieldSet(finfo,v) - static member FieldSet(obj:Expr,finfo:FieldInfo,v:Expr) = mkInstanceFieldSet(obj,finfo,v) - static member Lambda(v:Var,e:Expr) = mkLambda(v,e) - //static member Lambdas(vs,e:Expr) = mkLambdas(vs,e) - static member Let(v:Var,e:Expr,b:Expr) = mkLet(v,e,b) - static member LetRec(binds,e:Expr) = mkLetRec(binds,e) - static member NewObject(cinfo:ConstructorInfo,args) = mkCtorCall(cinfo,args) - static member DefaultValue(ty:Type) = mkDefaultValue(ty) - static member NewTuple(es) = mkNewTuple(es) - static member NewRecord(ty:Type,args) = mkNewRecord(ty,args) - static member NewArray(ty:Type,es) = mkNewArray(ty,es) - static member NewDelegate(ty:Type,vs : Var list,body: Expr) = mkNewDelegate(ty,mkIteratedLambdas(vs, body)) - static member NewUnionCase(uc,es) = mkNewUnionCase(uc,es) - static member PropGet(obj:Expr,pinfo:PropertyInfo,?args) = mkInstancePropGet(obj,pinfo,(defaultArg args [])) - static member PropGet(pinfo:PropertyInfo,?args) = mkStaticPropGet(pinfo,(defaultArg args [])) - static member PropSet(obj:Expr,pinfo:PropertyInfo,value:Expr,?args) = mkInstancePropSet(obj,pinfo,(defaultArg args []),value) - static member PropSet(pinfo:PropertyInfo,value:Expr,?args) = mkStaticPropSet(pinfo,(defaultArg args []),value) - static member Quote(expr:Expr) = mkQuote(expr) - static member Sequential(e1:Expr,e2:Expr) = mkSequential(e1,e2) - static member TryWith(e1:Expr,v2:Var,e2:Expr,v3:Var,e3:Expr) = mkTryWith(e1,v2,e2,v3,e3) - static member TryFinally(e1:Expr,e2:Expr) = mkTryFinally(e1,e2) - static member TupleGet(e:Expr,n) = mkTupleGet(typeOf(e),n,e) - static member TypeTest(e:Expr,ty:Type) = mkTypeTest(e,ty) - static member UnionCaseTest(e:Expr,uci) = mkUnionCaseTest(uci,e) - static member Value(v:'T) = mkValue(box v, typeof<'T>) - static member Value(obj:obj,typ:Type) = mkValue(obj, typ) - static member Var(v) = mkVar(v) - static member VarSet(v,e:Expr) = mkVarSet(v,e) - static member WhileLoop(e1:Expr,e2:Expr) = mkWhileLoop(e1,e2) - //static member IsInlinedMethodInfo(minfo:MethodInfo) = false - static member TryGetReflectedDefinition(mbase:MethodBase) = resolveMethodBaseInstantiated(mbase) - static member Cast(expr:Expr) = cast expr - static member Deserialize(qualifyingType:Type,spliceTypes,spliceExprs,bytes) = deserialize(qualifyingType,spliceTypes,spliceExprs,bytes) - static member RegisterReflectedDefinitions(assembly:Assembly,nm,bytes) = registerReflectedDefinitions(assembly,nm,bytes) - static member GlobalVar<'T>(nm) : Expr<'T> = Expr.Var(Var.Global(nm,typeof<'T>)) |> Expr.Cast - -[] -module DerivedPatterns = - open Patterns - - let (|Bool|_|) = function ValueObj(:? bool as v) -> Some(v) | _ -> None - let (|String|_|) = function ValueObj(:? string as v) -> Some(v) | _ -> None - let (|Single|_|) = function ValueObj(:? single as v) -> Some(v) | _ -> None - let (|Double|_|) = function ValueObj(:? double as v) -> Some(v) | _ -> None - let (|Char|_|) = function ValueObj(:? char as v) -> Some(v) | _ -> None - let (|SByte|_|) = function ValueObj(:? sbyte as v) -> Some(v) | _ -> None - let (|Byte|_|) = function ValueObj(:? byte as v) -> Some(v) | _ -> None - let (|Int16|_|) = function ValueObj(:? int16 as v) -> Some(v) | _ -> None - let (|UInt16|_|) = function ValueObj(:? uint16 as v) -> Some(v) | _ -> None - let (|Int32|_|) = function ValueObj(:? int32 as v) -> Some(v) | _ -> None - let (|UInt32|_|) = function ValueObj(:? uint32 as v) -> Some(v) | _ -> None - let (|Int64|_|) = function ValueObj(:? int64 as v) -> Some(v) | _ -> None - let (|UInt64|_|) = function ValueObj(:? uint64 as v) -> Some(v) | _ -> None - let (|Unit|_|) = function Comb0(ValueOp(_,ty)) when ty = typeof -> Some() | _ -> None - - /// (fun (x,y) -> z) is represented as 'fun p -> let x = p#0 let y = p#1' etc. - /// This reverses this encoding. - let (|TupledLambda|_|) (lam: Expr) = - /// Strip off the 'let' bindings for an TupledLambda - let rec stripSuccessiveProjLets (p:Var) n expr = - match expr with - | Let(v1,TupleGet(Var(pA),m),rest) - when p = pA && m = n-> - let restvs,b = stripSuccessiveProjLets p (n+1) rest - v1::restvs, b - | _ -> ([],expr) - match lam.Tree with - | LambdaTerm(v,body) -> - match stripSuccessiveProjLets v 0 body with - | [],b -> Some([v], b) - | letvs,b -> Some(letvs,b) - | _ -> None - - let (|TupledApplication|_|) e = - match e with - | Application(f,x) -> - match x with - | Unit -> Some(f,[]) - | NewTuple(x) -> Some(f,x) - | x -> Some(f,[x]) - | _ -> None - - let (|Lambdas|_|) (e: Expr) = qOneOrMoreRLinear (|TupledLambda|_|) e - let (|Applications|_|) (e: Expr) = qOneOrMoreLLinear (|TupledApplication|_|) e - /// Reverse the compilation of And and Or - let (|AndAlso|_|) x = - match x with - | IfThenElse(x,y,Bool(false)) -> Some(x,y) - | _ -> None - - let (|OrElse|_|) x = - match x with - | IfThenElse(x,Bool(true),y) -> Some(x,y) - | _ -> None - - let (|SpecificCall|_|) templateParameter = - // Note: precomputation - match templateParameter with - | (Lambdas(_,Call(_,minfo1,_)) | Call(_,minfo1,_)) -> - let isg1 = minfo1.IsGenericMethod - let gmd = if isg1 then minfo1.GetGenericMethodDefinition() else null - - // end-of-precomputation - - (fun tm -> - match tm with - | Call(obj,minfo2,args) - when (minfo1.MetadataToken = minfo2.MetadataToken && - if isg1 then - minfo2.IsGenericMethod && gmd = minfo2.GetGenericMethodDefinition() - else - minfo1 = minfo2) -> - Some((minfo2.GetGenericArguments() |> Array.to_list),args) - | _ -> None) - | _ -> - invalidArg "templateParameter" "the parameter is not a recognized method name" - - - let (|MethodWithReflectedDefinition|_|) (minfo) = - Expr.TryGetReflectedDefinition(minfo) - - let (|PropertyGetterWithReflectedDefinition|_|) (pinfo:System.Reflection.PropertyInfo) = - Expr.TryGetReflectedDefinition(pinfo.GetGetMethod()) - - let (|PropertySetterWithReflectedDefinition|_|) (pinfo:System.Reflection.PropertyInfo) = - Expr.TryGetReflectedDefinition(pinfo.GetSetMethod()) - -[] -module ExprShape = - open Patterns - let RebuildShapeCombination(a:obj,args) = - // preserve the attributes - let op,attrs = unbox(a) - let e = - match op,args with - | AppOp,[f;x] -> mkApplication(f,x) - | IfThenElseOp,[g;t;e] -> mkIfThenElse(g,t,e) - | LetRecOp,[e1] -> mkLetRecRaw(e1) - | LetRecCombOp,_ -> mkLetRecCombRaw(args) - | LetOp,[e1;e2] -> mkLetRaw(e1,e2) - | NewRecordOp(ty),_ -> mkNewRecord(ty, args) - | NewUnionCaseOp(ucinfo),_ -> mkNewUnionCase(ucinfo, args) - | UnionCaseTestOp(ucinfo),[arg] -> mkUnionCaseTest(ucinfo,arg) - | NewTupleOp(ty),_ -> mkNewTupleWithType(ty, args) - | TupleGetOp(ty,i),[arg] -> mkTupleGet(ty,i,arg) - | InstancePropGetOp(pinfo),(obj::args) -> mkInstancePropGet(obj,pinfo,args) - | StaticPropGetOp(pinfo),[] -> mkStaticPropGet(pinfo,args) - | InstancePropSetOp(pinfo),obj::v::args -> mkInstancePropSet(obj,pinfo,args,v) - | StaticPropSetOp(pinfo),v::args -> mkStaticPropSet(pinfo,args,v) - | InstanceFieldGetOp(finfo),[obj] -> mkInstanceFieldGet(obj,finfo) - | StaticFieldGetOp(finfo),[] -> mkStaticFieldGet(finfo ) - | InstanceFieldSetOp(finfo),[obj;v] -> mkInstanceFieldSet(obj,finfo,v) - | StaticFieldSetOp(finfo),[v] -> mkStaticFieldSet(finfo,v) - | NewObjectOp minfo,_ -> mkCtorCall(minfo,args) - | DefaultValueOp(ty),_ -> mkDefaultValue(ty) - | StaticMethodCallOp(minfo),_ -> mkStaticMethodCall(minfo,args) - | InstanceMethodCallOp(minfo),obj::args -> mkInstanceMethodCall(obj,minfo,args) - | CoerceOp(ty),[arg] -> mkCoerce(ty,arg) - | NewArrayOp(ty),_ -> mkNewArray(ty,args) - | NewDelegateOp(ty),[arg] -> mkNewDelegate(ty,arg) - | SequentialOp,[e1;e2] -> mkSequential(e1,e2) - | TypeTestOp(ty),[e1] -> mkTypeTest(e1,ty) - | AddressOfOp,[e1] -> mkAddressOf(e1) - | VarSetOp,[E(VarTerm(v)); e] -> mkVarSet(v,e) - | AddressSetOp,[e1;e2] -> mkAddressSet(e1,e2) - | ForIntegerRangeLoopOp,[e1;e2;E(LambdaTerm(v,e3))] -> mkForLoop(v,e1,e2,e3) - | WhileLoopOp,[e1;e2] -> mkWhileLoop(e1,e2) - | ValueOp(v,ty),[] -> mkValue(v,ty) - | _ -> - //assert(false) - failwith "Unexpected error in mkConstApp" - EA(e.Tree,attrs) - - let rec (|ShapeVar|ShapeLambda|ShapeCombination|) e = - let rec loop expr = - let (E(t)) = expr - match t with - | VarTerm v -> ShapeVar(v) - | LambdaTerm(v,b) -> ShapeLambda(v,b) - | CombTerm(op,args) -> ShapeCombination(box (op,expr.CustomAttributes),args) - | HoleTerm _ -> invalidArg "expr" "Unexpected hole in expression" - loop (e :> Expr) -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/quotations.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/quotations.fsi deleted file mode 100644 index e50d8fd3..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/quotations.fsi +++ /dev/null @@ -1,350 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// Types and functions related to expression quotations -namespace Microsoft.FSharp.Quotations - -#if FX_MINIMAL_REFLECTION // not on Compact Framework -#else -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Reflection -open System -open System.Reflection - -[] -/// Information at the binding site of a variable -type Var = - /// The type associated with the variable - member Type : Type - /// The declared name of the variable - member Name : string - /// Indicates if the variable represents a mutable storage location - member IsMutable: bool - /// Create a new variable with the given name, type and mutability - new : name:string * typ:Type * ?isMutable : bool -> Var - /// Fetch or create a new variable with the given name and type from a global pool of shared variables - /// indexed by name and type - static member Global : name:string * typ:Type -> Var - - interface System.IComparable - -/// Quoted expressions annotated with System.Type values. -[] -type Expr = - - /// Substitute through the given expression using the given functions - /// to map variables to new values. The functions must give consistent results - /// at each application. Variable renaming may occur on the target expression - /// if variable capture occurs. - member Substitute : substitution:(Var -> Expr option) -> Expr - - /// Get the free expression variables of an expression as a list - member GetFreeVars : unit -> seq - - /// Returns type of an expression - member Type : Type - - /// Returns the custom attributes of an expression - member CustomAttributes : Expr list - - override Equals : obj:obj -> bool - - /// Build an expression that represents getting the address of a value - static member AddressOf : target:Expr -> Expr - - /// Build an expression that represents setting the value held at a particular address - static member AddressSet : target:Expr * value:Expr -> Expr - - /// Build an expression that represents the application of a first class function value to a single argument - static member Application: functionExpr:Expr * argument:Expr -> Expr - - /// Build an expression that represents the application of a first class function value to multiple arguments - static member Applications: functionExpr:Expr * arguments:list> -> Expr - - /// Build an expression that represents a call to an static method or module-bound function - static member Call : methodInfo:MethodInfo * arguments:list -> Expr - - /// Build an expression that represents a call to an instance method associated with an object - static member Call : obj:Expr * methodInfo:MethodInfo * arguments:list -> Expr - - /// Build an expression that represents the coercion of an expression to a type - static member Coerce : source:Expr * target:Type -> Expr - - /// Build 'if ... then ... else' expressions - static member IfThenElse : guard:Expr * thenExpr:Expr * elseExpr:Expr -> Expr - - /// Build a 'for i = ... to ... do ...' expression that represent loops over integer ranges - static member ForIntegerRangeLoop: loopVariable:Var * start:Expr * endExpr:Expr * body:Expr -> Expr - - /// Build an expression that represents the access of a static field - static member FieldGet: fieldInfo:FieldInfo -> Expr - - /// Build an expression that represents the access of a field of an object - static member FieldGet: obj:Expr * fieldInfo:FieldInfo -> Expr - - /// Build an expression that represents writing to a static field - static member FieldSet: fieldInfo:FieldInfo * value:Expr -> Expr - - /// Build an expression that represents writing to a field of an object - static member FieldSet: obj:Expr * fieldInfo:FieldInfo * value:Expr -> Expr - - /// Build an expression that represents the constrution of an F# function value - static member Lambda : parameter:Var * body:Expr -> Expr - - /// Build expressions associated with 'let' constructs - static member Let : letVariable:Var * letExpr:Expr * body:Expr -> Expr - - /// Build recursives expressions associated with 'let rec' constructs - static member LetRec : bindings:(Var * Expr) list * body:Expr -> Expr - - /// Build an expression that represents the invocation of an object constructor - static member NewObject: constructorInfo:ConstructorInfo * arguments:Expr list -> Expr - - - /// Build an expression that represents the invocation of a default object constructor - static member DefaultValue: expressionType:Type -> Expr - - - /// Build an expression that represents the creation of an F# tuple value - static member NewTuple: elements:Expr list -> Expr - - /// Build record-construction expressions - static member NewRecord: recordType:Type * elements:Expr list -> Expr - - /// Build an expression that represents the creation of an array value initialized with the given elements - static member NewArray: elementType:Type * elements:Expr list -> Expr - - /// Build an expression that represents the creation of a delegate value for the given type - static member NewDelegate: delegateType:Type * parameters:Var list * body:Expr -> Expr - - /// Build an expression that represents the creation of a union case value - static member NewUnionCase: unionCase:UnionCaseInfo * arguments:Expr list -> Expr - - /// Build an expression that represents reading a property of an object - static member PropGet: obj:Expr * property:PropertyInfo * ?indexerArgs: Expr list -> Expr - - /// Build an expression that represents reading a static property - static member PropGet: property:PropertyInfo * ?indexerArgs: Expr list -> Expr - - /// Build an expression that represents writing to a property of an object - static member PropSet: obj:Expr * property:PropertyInfo * value:Expr * ?indexerArgs: Expr list -> Expr - - /// Build an expression that represents writing to a static property - static member PropSet: property:PropertyInfo * value:Expr * ?indexerArgs: Expr list -> Expr - - /// Build an expression that represents a nested quotation literal - static member Quote: inner:Expr -> Expr - - /// Build an expression that represents the sequential execution of one expression followed by another - static member Sequential: first:Expr * second:Expr -> Expr - - /// Build an expression that represents a try/with construct for exception filtering and catching - static member TryWith: body:Expr * filterVar:Var * filterBody:Expr * catchVar:Var * catchBody:Expr -> Expr - - /// Build an expression that represents a try/finally construct - static member TryFinally: body:Expr * compensation:Expr -> Expr - - /// Build an expression that represents getting a field of a tuple - static member TupleGet: tuple:Expr * index:int -> Expr - - - /// Build an expression that represents a type test - static member TypeTest: source:Expr * target:Type -> Expr - - /// Build an expression that represents a test of a value is of a particular union case - static member UnionCaseTest: source:Expr * unionCase:UnionCaseInfo -> Expr - - /// Build an expression that represents a constant value of a particular type - static member Value : value:obj * expressionType:Type -> Expr - - /// Build an expression that represents a constant value - static member Value : value:'T -> Expr - - /// Build an expression that represents a variable - static member Var : variable:Var -> Expr - - /// Build an expression that represents setting a mutable variable - static member VarSet : variable:Var * value:Expr -> Expr - - /// Build an expression that represents a while loop - static member WhileLoop : guard:Expr * body:Expr -> Expr - - //---------------- - - - /// Return a new typed expression given an underlying runtime-typed expression. - /// A type annotation is usually required to use this function, and - /// using an incorrect type annotation may result in a later runtime exception. - static member Cast : source:Expr -> Expr<'T> - - /// Try and find a stored reflection definition for the given method. Stored reflection - /// definitions are added to an F# assembly through the use of the [<ReflectedDefinition>] attribute. - static member TryGetReflectedDefinition : methodBase:MethodBase -> Expr option - - /// This function is called automatically when quotation syntax (<@ @>) and related typed-expression - /// quotations are used. The bytes are a pickled binary representation of an unlinked form of the qutoed expression, - /// and the System.Type argument is any type in the assembly where the quoted - /// expression occurs, i.e. it helps scope the interpretation of the cross-assembly - /// references in the bytes. - static member Deserialize : qualifyingType:System.Type * spliceTypes:list * spliceExprs:list * value:byte[] -> Expr - - /// Permit interactive environments such as F# Interactive - /// to explicitly register new pickled resources that represent persisted - /// top level definitions. The string indicates a unique name for the resources - /// being added. The format for the bytes is the encoding generated by the F# compiler. - static member RegisterReflectedDefinitions: assembly:Assembly * resource:string * serializedValue:byte[] -> unit - - /// Fetch or create a new variable with the given name and type from a global pool of shared variables - /// indexed by name and type. The type is given by the expicit or inferred type parameter - static member GlobalVar<'T> : name:string -> Expr<'T> - - -/// Type-carrying quoted expressions. Expressions are generated either -/// by quotations in source text or programatically -and - [] - Expr<'T> = - inherit Expr - /// Get the raw expression associated with this type-carrying expression - member Raw : Expr - - -[] -/// Contains a set of primitive F# active patterns to analyze F# expression objects -module Patterns = - - /// An active pattern to recognize expressions that represent getting the address of a value - val (|AddressOf|_|) : input:Expr -> Expr option - /// An active pattern to recognize expressions that represent setting the value held at an address - val (|AddressSet|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions that represent applications of first class function values - val (|Application|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules - val (|Call|_|) : input:Expr -> (Expr option * MethodInfo * Expr list) option - /// An active pattern to recognize expressions that represent coercions from one type to another - val (|Coerce|_|) : input:Expr -> (Expr * Type) option - /// An active pattern to recognize expressions that represent getting a static or instance field - val (|FieldGet|_|) : input:Expr -> (Expr option * FieldInfo) option - /// An active pattern to recognize expressions that represent setting a static or instance field - val (|FieldSet|_|) : input:Expr -> (Expr option * FieldInfo * Expr) option - /// An active pattern to recognize expressions that represent loops over integer ranges - val (|ForIntegerRangeLoop|_|) : input:Expr -> (Var * Expr * Expr * Expr) option - /// An active pattern to recognize expressions that represent while loops - val (|WhileLoop|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions that represent conditionals - val (|IfThenElse|_|) : input:Expr -> (Expr * Expr * Expr) option - /// An active pattern to recognize expressions that represent first class function values - val (|Lambda|_|) : input:Expr -> (Var * Expr) option - /// An active pattern to recognize expressions that represent let bindings - val (|Let|_|) : input:Expr -> (Var * Expr * Expr) option - /// An active pattern to recognize expressions that represent recursive let bindings of one or more variables - val (|LetRec|_|) : input:Expr -> ((Var * Expr) list * Expr) option - /// An active pattern to recognize expressions that represent the construction of arrays - val (|NewArray|_|) : input:Expr -> (Type * Expr list) option - /// An active pattern to recognize expressions that represent invocations of a default constructor of a struct - val (|DefaultValue|_|) : input:Expr -> Type option - /// An active pattern to recognize expressions that represent construction of delegate values - val (|NewDelegate|_|) : input:Expr -> (Type * Var list * Expr) option - /// An active pattern to recognize expressions that represent invocation of object constructors - val (|NewObject|_|) : input:Expr -> (ConstructorInfo * Expr list) option - /// An active pattern to recognize expressions that represent construction of record values - val (|NewRecord|_|) : input:Expr -> (Type * Expr list) option - /// An active pattern to recognize expressions that represent construction of particular union case values - val (|NewUnionCase|_|) : input:Expr -> (UnionCaseInfo * Expr list) option - /// An active pattern to recognize expressions that represent construction of tuple values - val (|NewTuple|_|) : input:Expr -> (Expr list) option - /// An active pattern to recognize expressions that represent the read of a static or instance property, or a non-function value declared in a module - val (|PropGet|_|) : input:Expr -> (Expr option * PropertyInfo * Expr list) option - /// An active pattern to recognize expressions that represent setting a static or instance property, or a non-function value declared in a module - val (|PropSet|_|) : input:Expr -> (Expr option * PropertyInfo * Expr list * Expr) option - /// An active pattern to recognize expressions that represent a nested quotation literal - val (|Quote|_|) : input:Expr -> Expr option - /// An active pattern to recognize expressions that represent sequential exeuction of one expression followed by another - val (|Sequential|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions that represent a try/with construct for exception filtering and catching - val (|TryWith|_|) : input:Expr -> (Expr * Var * Expr * Var * Expr) option - /// An active pattern to recognize expressions that represent a try/finally construct - val (|TryFinally|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions that represent getting a tuple field - val (|TupleGet|_|) : input:Expr -> (Expr * int) option - /// An active pattern to recognize expressions that represent a dynamic type test - val (|TypeTest|_|) : input:Expr -> (Expr * Type) option - /// An active pattern to recognize expressions that represent a test if a value is of a particular union case - val (|UnionCaseTest|_|) : input:Expr -> (Expr * UnionCaseInfo) option - /// An active pattern to recognize expressions that represent a constant value - val (|Value|_|) : input:Expr -> (obj * Type) option - /// An active pattern to recognize expressions that represent a variable - val (|Var|_|) : input:Expr -> Var option - /// An active pattern to recognize expressions that represent setting a mutable variable - val (|VarSet|_|) : input:Expr -> (Var * Expr) option - - //---------------------------------------------------------------- - // Helpers - -[] -/// Contains a set of derived F# active patterns to analyze F# expression objects -module DerivedPatterns = - //val (|NewList|_|) : input:Expr -> Expr list option - /// An active pattern to recognize expressions that represent a (possibly curried or tupled) first class function value - val (|Lambdas|_|) : input:Expr -> (Var list list * Expr) option - /// An active pattern to recognize expressions that represent the application of a (possibly curried or tupled) first class function value - val (|Applications|_|) : input:Expr -> (Expr * Expr list list) option - /// An active pattern to recognize expressions of the form a && b - val (|AndAlso|_|) : input:Expr -> (Expr * Expr) option - /// An active pattern to recognize expressions of the form a || b - val (|OrElse|_|) : input:Expr -> (Expr * Expr) option - - /// An active pattern to recognize () constant expressions - val (|Unit|_|) : input:Expr -> unit option - /// An active pattern to recognize constant boolean expressions - val (|Bool|_|) : input:Expr -> bool option - /// An active pattern to recognize constant string expressions - val (|String|_|) : input:Expr -> string option - /// An active pattern to recognize constant 32-bit floating point number expressions - val (|Single|_|) : input:Expr -> float32 option - /// An active pattern to recognize constant 64-bit floating point number expressions - val (|Double|_|) : input:Expr -> float option - /// An active pattern to recognize constant unicode character expressions - val (|Char|_|) : input:Expr -> char option - /// An active pattern to recognize constant signed byte expressions - val (|SByte|_|) : input:Expr -> sbyte option - /// An active pattern to recognize constant byte expressions - val (|Byte|_|) : input:Expr -> byte option - /// An active pattern to recognize constant int16 expressions - val (|Int16|_|) : input:Expr -> int16 option - /// An active pattern to recognize constant unsigned int16 expressions - val (|UInt16|_|) : input:Expr -> uint16 option - /// An active pattern to recognize constant int32 expressions - val (|Int32|_|) : input:Expr -> int32 option - /// An active pattern to recognize constant unsigned int32 expressions - val (|UInt32|_|) : input:Expr -> uint32 option - /// An active pattern to recognize constant int64 expressions - val (|Int64|_|) : input:Expr -> int64 option - /// An active pattern to recognize constant unsigned int64 expressions - val (|UInt64|_|) : input:Expr -> uint64 option - /// A parameterized active pattern to recognize calls to a specified function or method - val (|SpecificCall|_|) : templateParameter:Expr -> (Expr -> (list * list) option) - - /// An active pattern to recognize methods that have an associated ReflectedDefinition - val (|MethodWithReflectedDefinition|_|) : methodBase:MethodBase -> Expr option - - /// An active pattern to recognize property getters or values in modules that have an associated ReflectedDefinition - val (|PropertyGetterWithReflectedDefinition|_|) : propertyInfo:PropertyInfo -> Expr option - /// An active pattern to recognize property setters that have an associated ReflectedDefinition - val (|PropertySetterWithReflectedDefinition|_|) : propertyInfo:PropertyInfo -> Expr option - -/// Active patterns for traversing, visiting, rebuilding and tranforming expressions in a generic way -[] -module ExprShape = - /// An active pattern that performs a complete decomposition viewing the expression tree as a binding structure - val (|ShapeVar|ShapeLambda|ShapeCombination|) : - input:Expr -> Choice)> // ConstApp - /// Re-build combination expressions. The first parameter should be an object - /// returned by the ShapeCombination case of the active pattern in this module. - val RebuildShapeCombination : shape:obj * arguments:list -> Expr - -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/reflect.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/reflect.fs deleted file mode 100644 index 580419eb..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/reflect.fs +++ /dev/null @@ -1,709 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -// -// Reflection on F# values. Analyze an object to see if it the representation -// of an F# value. -//========================================================================= - -namespace Microsoft.FSharp.Reflection - -open System -open System.Globalization -open System.Reflection -open Microsoft.FSharp.Core -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Primitives.Basics - -module internal Impl = - - let debug = false - - let inline checkNonNull argName (v: 'T) = - match box v with - | null -> nullArg argName - | _ -> () - - let emptyArray arr = (Array.length arr = 0) - let nonEmptyArray arr = Array.length arr > 0 - - let isNamedType(typ:Type) = not (typ.IsArray || typ.IsByRef || typ.IsPointer) - - let equivHeadTypes (ty1:Type) (ty2:Type) = - isNamedType(ty1) && - if ty1.IsGenericType then - ty2.IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(ty2.GetGenericTypeDefinition()) - else - ty1.Equals(ty2) - - let option = typedefof - let func = typedefof<(obj -> obj)> - - let isOptionType typ = equivHeadTypes typ (typeof) - let isFunctionType typ = equivHeadTypes typ (typeof<(int -> int)>) - let isUnitType typ = equivHeadTypes typ (typeof) - let isListType typ = equivHeadTypes typ (typeof) - - let tuple1 = typedefof> - let tuple2 = typedefof - let tuple3 = typedefof - let tuple4 = typedefof - let tuple5 = typedefof - let tuple6 = typedefof - let tuple7 = typedefof - let tuple8 = typedefof - - let isTuple1Type typ = equivHeadTypes typ tuple1 - let isTuple2Type typ = equivHeadTypes typ tuple2 - let isTuple3Type typ = equivHeadTypes typ tuple3 - let isTuple4Type typ = equivHeadTypes typ tuple4 - let isTuple5Type typ = equivHeadTypes typ tuple5 - let isTuple6Type typ = equivHeadTypes typ tuple6 - let isTuple7Type typ = equivHeadTypes typ tuple7 - let isTuple8Type typ = equivHeadTypes typ tuple8 - - let isTupleType typ = - isTuple1Type typ - || isTuple2Type typ - || isTuple3Type typ - || isTuple4Type typ - || isTuple5Type typ - || isTuple6Type typ - || isTuple7Type typ - || isTuple8Type typ - - let maxTuple = 8 - // Which field holds the nested tuple? - let tupleEncField = maxTuple-1 - - let rec mkTupleType (tys: Type[]) = - match tys.Length with - | 1 -> tuple1.MakeGenericType(tys) - | 2 -> tuple2.MakeGenericType(tys) - | 3 -> tuple3.MakeGenericType(tys) - | 4 -> tuple4.MakeGenericType(tys) - | 5 -> tuple5.MakeGenericType(tys) - | 6 -> tuple6.MakeGenericType(tys) - | 7 -> tuple7.MakeGenericType(tys) - | n when n >= maxTuple -> - let tysA = tys.[0..tupleEncField-1] - let tysB = tys.[maxTuple-1..] - let tyB = mkTupleType tysB - tuple8.MakeGenericType(Array.append tysA [| tyB |]) - | _ -> invalidArg "tys" "this is not a valid tuple type for the F# reflection library" - - let instancePropertyFlags = BindingFlags.GetProperty ||| BindingFlags.Instance - let staticGetFieldFlags = BindingFlags.GetField ||| BindingFlags.Static - let instanceBindingFlags = BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly - - let getPropertyInfo (typ: Type,propName,bindingFlags) = typ.GetProperty(propName,instancePropertyFlags ||| bindingFlags) - let getPropertyInfos (typ,names,bindingFlags) = names |> Array.map (fun nm -> getPropertyInfo (typ,nm,bindingFlags)) - - let tryFindMemberCompilationMappingAttribute (info: MemberInfo) = - match info.GetCustomAttributes (typeof, false) with - | null | [| |] -> None - | res -> Some (res.[0] :?> CompilationMappingAttribute) - - let findMemberCompilationMappingAttribute (info: MemberInfo) = - match info.GetCustomAttributes (typeof, false) with - | null | [| |] -> failwith "the member did not have a compilation mapping attribute" - | res -> (res.[0] :?> CompilationMappingAttribute) - - let sequenceNumberOfMember (x: MemberInfo) = (findMemberCompilationMappingAttribute x).SequenceNumber - let variantNumberOfMember (x: MemberInfo) = (findMemberCompilationMappingAttribute x).VariantNumber - - let sortFreshArray f arr = Array.sortInPlaceWith f arr; arr - - let isFieldProperty (prop : PropertyInfo) = - match tryFindMemberCompilationMappingAttribute(prop) with - | None -> false - | Some attr -> (attr.SourceConstructFlags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.Field - - let fieldsPropsOfUnionCase((typ:Type), (tag:int),bindingFlags) = - if isOptionType typ then - match tag with - | 0 (* None *) -> getPropertyInfos (typ,[| |],bindingFlags) - | 1 (* Some *) -> getPropertyInfos (typ,[| "Value" |] ,bindingFlags) - | _ -> failwith "fieldsPropsOfUnionCase" - elif isListType typ then - match tag with - | 0 (* Nil *) -> getPropertyInfos (typ,[| |],bindingFlags) - | 1 (* Cons *) -> getPropertyInfos (typ,[| "Head"; "Tail" |],bindingFlags) - | _ -> failwith "fieldsPropsOfUnionCase" - else - typ.GetProperties(instancePropertyFlags ||| bindingFlags) - |> Array.filter isFieldProperty - |> Array.filter (fun prop -> variantNumberOfMember prop = tag) - |> sortFreshArray (fun p1 p2 -> compare (sequenceNumberOfMember p1) (sequenceNumberOfMember p2)) - - let emptyObjArray : obj[] = [| |] - - let callStaticMethod (typ:Type,name,args,bindingFlags) = -#if FX_NO_CULTURE_INFO_ARGS - typ.InvokeMember(name, BindingFlags.Static ||| BindingFlags.InvokeMethod ||| bindingFlags, null, null,args) -#else - typ.InvokeMember(name, BindingFlags.Static ||| BindingFlags.InvokeMethod ||| bindingFlags, null, null,args,CultureInfo.InvariantCulture(*FxCop:1304*)) -#endif - - let tryFindCompilationMappingAttribute (typ:Type) = - match typ.GetCustomAttributes (typeof, false) with - | null | [| |] -> None - | res -> Some(res.[0] :?> CompilationMappingAttribute) - - let tryFindSourceConstructFlagsOfType (typ:Type) = - match tryFindCompilationMappingAttribute typ with - | None -> None - | Some attr -> Some attr.SourceConstructFlags - - let rec getTupleTypeInfo (typ:Type) = - if not (isTupleType (typ) ) then invalidArg "typ" "the type is not a tuple type"; - let tyargs = typ.GetGenericArguments() - if tyargs.Length = maxTuple then - let tysA = tyargs.[0..tupleEncField-1] - let tyB = tyargs.[tupleEncField] - Array.append tysA (getTupleTypeInfo tyB) - else - tyargs - - - let getFunctionTypeInfo (typ:Type) = - if not (isFunctionType typ) then invalidArg "typ" "not a function type" - let tyargs = typ.GetGenericArguments() - tyargs.[0], tyargs.[1] - - let isUnionType (typ:Type,bindingFlags:BindingFlags) = - isOptionType typ || - isListType typ || - match tryFindSourceConstructFlagsOfType(typ) with - | None -> false - | Some(flags) -> - (flags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.SumType && - // We see private representations only if BindingFlags.NonPublic is set - (if (flags &&& SourceConstructFlags.NonpublicRepresentation) <> enum(0) then - (bindingFlags &&& BindingFlags.NonPublic) <> enum(0) - else - true) - - let isRecordType (typ:Type,bindingFlags:BindingFlags) = - match tryFindSourceConstructFlagsOfType(typ) with - | None -> false - | Some(flags) -> - (flags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.RecordType && - // We see private representations only if BindingFlags.NonPublic is set - (if (flags &&& SourceConstructFlags.NonpublicRepresentation) <> enum(0) then - (bindingFlags &&& BindingFlags.NonPublic) <> enum(0) - else - true) && - not (isTupleType typ) - - let isModuleType (typ:Type) = - match tryFindSourceConstructFlagsOfType(typ) with - | None -> false - | Some(flags) -> - (flags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.Module - - let fieldPropsOfRecordType(typ:Type,bindingFlags) = - typ.GetProperties(instancePropertyFlags ||| bindingFlags) - |> Array.filter isFieldProperty - |> sortFreshArray (fun p1 p2 -> compare (sequenceNumberOfMember p1) (sequenceNumberOfMember p2)) - - let rec isClosureRepr typ = - isFunctionType typ || - (match typ.BaseType with null -> false | bty -> isClosureRepr bty) - - let isFSharpObjectType typ = - match tryFindSourceConstructFlagsOfType(typ) with - | None -> false - | Some(flags) -> - (flags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.ObjectType - - let discriminatorNameFromSumConstructor (m:MethodInfo) = - let nm = m.Name - if (m.GetParameters()).Length = 0 then - if nm.Substring(0,4) = "get_" then nm.Substring(4) else nm - else - nm - - - let getUnionTypeTagFields (typ:Type,bindingFlags) = - typ.GetFields(staticGetFieldFlags ||| bindingFlags) - |> Array.filter (fun (f:FieldInfo) -> f.Name.Length > 4 && f.Name.Substring(0,4) = "tag_") - - |> sortFreshArray (fun f1 f2 -> compare (f1.GetValue(null) :?> int) (f1.GetValue(null) :?> int)) - - // Check the base type - if it is also an F# type then - // for the moment we know it is a Discriminated Union - let isConstructorRepr (typ:Type,bindingFlags:BindingFlags) = - let rec get (typ:Type) = isUnionType (typ,bindingFlags) || match typ.BaseType with null -> false | b -> get b - get typ - - let unionTypeOfUnionCaseType (typ:Type,bindingFlags) = - let rec get (typ:Type) = if isUnionType (typ,bindingFlags) then typ else match typ.BaseType with null -> typ | b -> get b - get typ - - // Check the base type - if it is also an F# type then - // for the moment we know it is a Discriminated Union - let isExceptionRepr (typ:Type,bindingFlags) = - match tryFindSourceConstructFlagsOfType(typ) with - | None -> false - | Some(flags) -> - ((flags &&& SourceConstructFlags.KindMask) = SourceConstructFlags.Exception) && - // We see private representations only if BindingFlags.NonPublic is set - (if (flags &&& SourceConstructFlags.NonpublicRepresentation) <> enum(0) then - (bindingFlags &&& BindingFlags.NonPublic) <> enum(0) - else - true) - - let recdDescOfProps props = - props |> Array.to_list |> List.map (fun (p:PropertyInfo) -> p.Name, p.PropertyType) - - let getRecd obj (props:PropertyInfo[]) = - props |> Array.map (fun prop -> prop.GetValue(obj,null)) - - let getRecordReader(typ:Type,bindingFlags) = - let props = fieldPropsOfRecordType(typ,bindingFlags) - (fun (obj:obj) -> props |> Array.map (fun prop -> prop.GetValue(obj,null))) - - let getRecordConstructorMethod(typ:Type,bindingFlags) = - let props = fieldPropsOfRecordType(typ,bindingFlags) - let ctor = typ.GetConstructor(BindingFlags.Instance ||| bindingFlags,null,props |> Array.map (fun p -> p.PropertyType),null) - checkNonNull "typ" ctor; - ctor - - let getRecordConstructor(typ:Type,bindingFlags) = - let ctor = getRecordConstructorMethod(typ,bindingFlags) - (fun (args:obj[]) -> - ctor.Invoke(BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| bindingFlags,null,args,null)) - - let getTupleConstructorMethod(typ:Type,bindingFlags) = -#if FX_ATLEAST_40 - let props = typ.GetProperties() -#else - let props = typ.GetProperties() |> Array.rev -#endif - let ctor = typ.GetConstructor(BindingFlags.Instance ||| bindingFlags,null,props |> Array.map (fun p -> p.PropertyType),null) - checkNonNull "typ" ctor; - ctor - - let getTupleCtor(typ:Type,bindingFlags) = - let ctor = getTupleConstructorMethod(typ,bindingFlags) - (fun (args:obj[]) -> - ctor.Invoke(BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| bindingFlags,null,args,null)) - - let getPropertyReader (typ: Type,propName,bindingFlags) = - match getPropertyInfo(typ,propName,bindingFlags) with - | null -> None - | prop -> Some(fun (obj:obj) -> prop.GetValue(obj,instancePropertyFlags ||| bindingFlags,null,null,null)) - - let getRecordFieldReader (typ,propName,bindingFlags) = - match getPropertyReader (typ,propName,bindingFlags) with - | None -> failwith "getRecordFieldReader" - | Some reader -> reader - - let rec getTupleReader (typ:Type) = - let etys = typ.GetGenericArguments() - // Get the reader for the outer tuple record -#if FX_ATLEAST_40 - let props = typ.GetProperties(instancePropertyFlags ||| BindingFlags.Public) -#else - let props = typ.GetProperties(instancePropertyFlags ||| BindingFlags.Public) |> Array.rev -#endif - let reader = (fun (obj:obj) -> props |> Array.map (fun prop -> prop.GetValue(obj,null))) - if etys.Length < maxTuple - then reader - else - let tyBenc = etys.[tupleEncField] - let reader2 = getTupleReader(tyBenc) - (fun obj -> - let directVals = reader obj - let encVals = reader2 directVals.[tupleEncField] - Array.append directVals.[0..tupleEncField-1] encVals) - - let rec getTupleConstructor (typ:Type) = - let etys = typ.GetGenericArguments() - let maker1 = getTupleCtor (typ,BindingFlags.Public) - if etys.Length < maxTuple - then maker1 - else - let tyBenc = etys.[tupleEncField] - let maker2 = getTupleConstructor(tyBenc) - (fun (args:obj[]) -> - let encVal = maker2 args.[tupleEncField..] - maker1 (Array.append args.[0..tupleEncField-1] [| encVal |])) - - let getTupleConstructorInfo (typ:Type) = - let etys = typ.GetGenericArguments() - let maker1 = getTupleConstructorMethod (typ,BindingFlags.Public) - if etys.Length < maxTuple then - maker1,None - else - maker1,Some(etys.[tupleEncField]) - - let getTupleReaderInfo (typ:Type,index:int) = - - if index < 0 then invalidArg "index" "the tuple index was out of range" -#if FX_ATLEAST_40 - let props = typ.GetProperties(instancePropertyFlags ||| BindingFlags.Public) -#else - let props = typ.GetProperties(instancePropertyFlags ||| BindingFlags.Public) |> Array.rev -#endif - let get index = - if index >= props.Length then invalidArg "index" "the tuple index was out of range" - props.[index] - - if index < tupleEncField then - get index, None - else - let etys = typ.GetGenericArguments() - get tupleEncField, Some(etys.[tupleEncField],index-(maxTuple-1)) - - let getUnionCaseRecordReader (typ:Type,tag:int,bindingFlags) = - let props = fieldsPropsOfUnionCase(typ,tag,bindingFlags) - (fun (obj:obj) -> props |> Array.map (fun prop -> prop.GetValue(obj,bindingFlags,null,null,null))) - - let getUnionTagReader (typ:Type,bindingFlags) = - if isOptionType typ then (function null -> 0 | _ -> 1) - else - let tagreader = - match getPropertyReader (typ,"Tag",bindingFlags) with - | Some reader -> reader - | None -> (fun obj -> callStaticMethod(typ,"GetTag",[|obj|],bindingFlags)) - (fun obj -> (tagreader obj :?> int)) - - let getUnionTagMemberInfo (typ:Type,bindingFlags) = - match getPropertyInfo (typ,"Tag",bindingFlags) with - | null -> (typ.GetMethod("GetTag",BindingFlags.Static ||| bindingFlags) :> MemberInfo) - | info -> (info :> MemberInfo) - - let getUnionTypeTagNameMap (typ:Type,bindingFlags) = - getUnionTypeTagFields(typ,bindingFlags) - |> Array.map (fun tagfield -> - let constrname = tagfield.Name.Substring(4,tagfield.Name.Length - 4) - (tagfield.GetValue(null) :?> int),constrname) - - let getUnionTagConverter (typ:Type,bindingFlags) = - if isOptionType typ then (fun tag -> match tag with 0 -> "None" | 1 -> "Some" | _ -> invalidArg "tag" "tag out of range") - elif isListType typ then (fun tag -> match tag with 0 -> "Empty" | 1 -> "Cons" | _ -> invalidArg "tag" "tag out of range") - else - let tagfieldmap = getUnionTypeTagNameMap(typ,bindingFlags) |> Map.of_seq - (fun tag -> tagfieldmap.[tag]) - - let swap (x,y) = (y,x) - - let getUnionTagConverters (typ:Type,bindingFlags) = - let tagfields = getUnionTypeTagNameMap(typ,bindingFlags) - let tagfieldmap1 = tagfields |> Map.of_seq - let tagfieldmap2 = tagfields |> Array.map swap |> Map.of_seq - tagfields.Length, (fun tag -> tagfieldmap1.[tag]), (fun tag -> tagfieldmap2.[tag]) - - let getUnionCaseConstructorMethod (typ:Type,tag:int,bindingFlags) = - let props = fieldsPropsOfUnionCase(typ,tag,bindingFlags) - let constrname = getUnionTagConverter (typ,bindingFlags) tag - let methname = if emptyArray props then "get_"+constrname else constrname - match typ.GetMethod(methname, BindingFlags.Static ||| bindingFlags) with - | null -> failwith ("the constructor method '" + methname + "' for the union case could not be found") - | meth -> meth - - let getUnionCaseConstructor (typ:Type,tag:int,bindingFlags) = - let meth = getUnionCaseConstructorMethod (typ,tag,bindingFlags) - (fun args -> - meth.Invoke(null,BindingFlags.Static ||| BindingFlags.InvokeMethod ||| bindingFlags,null,args,null)) - - let getTypeOfReprType (typ:Type,bindingFlags) = - if isExceptionRepr(typ,bindingFlags) then typ.BaseType - elif isConstructorRepr(typ,bindingFlags) then unionTypeOfUnionCaseType(typ,bindingFlags) - elif isClosureRepr(typ) then - let rec get (typ:Type) = if isFunctionType typ then typ else match typ.BaseType with null -> typ | b -> get b - get typ - else typ - - - let ensureType (typ:Type,obj:obj,bindingFlags) = - match typ with - | null -> - match obj with - | null -> invalidArg "obj" "the object is null and no type was given" - | _ -> obj.GetType() - | _ -> typ - - - let checkUnionType(unionType,bindingFlags) = - checkNonNull "unionType" unionType; - if not (isUnionType (unionType,bindingFlags)) then - if isUnionType (unionType,bindingFlags ||| BindingFlags.NonPublic) then - invalidArg "unionType" "The type is a union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations" - else - invalidArg "unionType" "The type is not a union type" - - let checkExnType(exceptionType,bindingFlags) = - if not (isExceptionRepr (exceptionType,bindingFlags)) then - if isExceptionRepr (exceptionType,bindingFlags ||| BindingFlags.NonPublic) then - invalidArg "exceptionType" "The type is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations" - else - invalidArg "exceptionType" "The type is not the representation of an F# exception declaration" - - - // inline lets FxCop check that argument names match those given - let checkRecordType(argName,recordType,bindingFlags) = - checkNonNull "recordType" recordType; - if not (isRecordType (recordType,bindingFlags) ) then - if isRecordType (recordType,bindingFlags ||| BindingFlags.NonPublic) then - invalidArg "recordType" "The type is a record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations" - else - invalidArg "recordType" "The type is not a record type" - - let checkTupleType(argName,tupleType) = - checkNonNull argName tupleType; - if not (isTupleType tupleType) then invalidArg argName "the type is not a tuple type" - -[] -type UnionCaseInfo(typ: System.Type, tag:int) = - // Cache the tag -> name map - let mutable names = None - member x.Name = - match names with - | None -> (let conv = Impl.getUnionTagConverter (typ,BindingFlags.Public ||| BindingFlags.NonPublic) in names <- Some(conv); conv tag) - | Some(conv) -> conv tag - - member x.DeclaringType = typ - //member x.CustomAttributes = failwith "nyi" - member x.GetFields() = Impl.fieldsPropsOfUnionCase(typ,tag,BindingFlags.Public ||| BindingFlags.NonPublic) - - member x.GetCustomAttributes() = - let methInfo = Impl.getUnionCaseConstructorMethod (typ,tag,BindingFlags.Public ||| BindingFlags.NonPublic) - methInfo.GetCustomAttributes(false) - - member x.GetCustomAttributes(attributeType) = - let methInfo = Impl.getUnionCaseConstructorMethod (typ,tag,BindingFlags.Public ||| BindingFlags.NonPublic) - methInfo.GetCustomAttributes(attributeType,false) - - member x.Tag = tag - override x.ToString() = typ.Name + "." + x.Name - override x.GetHashCode() = typ.GetHashCode() + tag - override x.Equals(obj:obj) = - match obj with - | :? UnionCaseInfo as uci -> uci.DeclaringType = typ && uci.Tag = tag - | _ -> false - - -[] -type FSharpType = - - static member IsTuple(typ:Type) = - Impl.checkNonNull "typ" typ; - Impl.isTupleType typ - - static member IsRecord(typ:Type,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkNonNull "typ" typ; - Impl.isRecordType (typ,bindingFlags) - - static member IsUnion(typ:Type,?bindingFlags) = - Impl.checkNonNull "typ" typ; - let typ = Impl.getTypeOfReprType (typ ,BindingFlags.Public ||| BindingFlags.NonPublic) - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.isUnionType (typ,bindingFlags) - - static member IsFunction(typ:Type) = - Impl.checkNonNull "typ" typ; - let typ = Impl.getTypeOfReprType (typ ,BindingFlags.Public ||| BindingFlags.NonPublic) - Impl.isFunctionType typ - - static member IsModule(typ:Type) = - Impl.checkNonNull "typ" typ; - Impl.isModuleType typ - - static member MakeFunctionType(domain:Type,range:Type) = - Impl.checkNonNull "domain" domain; - Impl.checkNonNull "range" range; - Impl.func.MakeGenericType [| domain; range |] - - static member MakeTupleType(types:Type[]) = - Impl.checkNonNull "types" types; - if types |> Array.exists (function null -> true | _ -> false) then - invalidArg "types" "one of the types is null" - Impl.mkTupleType types - - static member GetTupleElements(tupleType:Type) = - Impl.checkTupleType("tupleType",tupleType); - Impl.getTupleTypeInfo tupleType - - static member GetFunctionElements(functionType:Type) = - Impl.checkNonNull "functionType" functionType; - let functionType = Impl.getTypeOfReprType (functionType ,BindingFlags.Public ||| BindingFlags.NonPublic) - Impl.getFunctionTypeInfo functionType - - static member GetRecordFields(recordType:Type,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkRecordType("recordType",recordType,bindingFlags); - Impl.fieldPropsOfRecordType(recordType,bindingFlags) - - static member GetUnionCases (unionType:Type,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - let unionType = Impl.getTypeOfReprType (unionType ,bindingFlags) - Impl.checkUnionType(unionType,bindingFlags); - Impl.getUnionTypeTagFields(unionType,bindingFlags) |> Array.mapi (fun i _ -> UnionCaseInfo(unionType,i)) - - static member IsExceptionRepresentation(typ:Type, ?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkNonNull "typ" typ; - Impl.isExceptionRepr(typ,bindingFlags) - - static member GetExceptionFields(exceptionType:Type, ?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkExnType(exceptionType,bindingFlags); - Impl.fieldPropsOfRecordType (exceptionType,bindingFlags) - -type DynamicFunction<'T1,'T2> = - static member Make(impl : obj -> obj) : obj = - box<('T1 -> 'T2)> (fun inp -> unbox<'T2>(impl (box<'T1>(inp)))) - - -[] -type FSharpValue = - - static member MakeRecord(recordType:Type,args,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkRecordType("recordType",recordType,bindingFlags); - Impl.getRecordConstructor (recordType,bindingFlags) args - - static member GetRecordField(record:obj,info:PropertyInfo) = - Impl.checkNonNull "info" info; - Impl.checkNonNull "record" record; - let reprty = record.GetType() - if not (Impl.isRecordType(reprty,BindingFlags.Public ||| BindingFlags.NonPublic)) then invalidArg "record" "the object is not an F# record value"; - info.GetValue(record,null) - - static member GetRecordFields(record:obj,?bindingFlags) = - Impl.checkNonNull "record" record; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - let typ = record.GetType() - if not (Impl.isRecordType(typ,bindingFlags)) then invalidArg "record" "the object is not an F# record value"; - Impl.getRecordReader (typ,bindingFlags) record - - static member PreComputeRecordFieldReader(info:PropertyInfo) = - Impl.checkNonNull "info" info; - (fun (obj:obj) -> info.GetValue(obj,null)) - - static member PreComputeRecordReader(recordType:Type,?bindingFlags) : (obj -> obj[]) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkRecordType("recordType",recordType,bindingFlags); - Impl.getRecordReader (recordType,bindingFlags) - - static member PreComputeRecordConstructor(recordType:Type,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkRecordType("recordType",recordType,bindingFlags); - Impl.getRecordConstructor (recordType,bindingFlags) - - static member PreComputeRecordConstructorInfo(recordType:Type, ?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkRecordType("recordType",recordType,bindingFlags); - Impl.getRecordConstructorMethod(recordType,bindingFlags) - - - static member MakeFunction(functionType:Type,implementation:(obj->obj)) = - Impl.checkNonNull "functionType" functionType; - if not (Impl.isFunctionType functionType) then invalidArg "functionType" "not a function type"; - Impl.checkNonNull "implementation" implementation; - let domain,range = Impl.getFunctionTypeInfo functionType - let dynCloMakerTy = typedefof> - let saverTy = dynCloMakerTy.MakeGenericType [| domain; range |] -#if FX_NO_CULTURE_INFO_ARGS - saverTy.InvokeMember("Make",BindingFlags.Static ||| BindingFlags.InvokeMethod ||| BindingFlags.Public ||| BindingFlags.NonPublic,null,null,[| box implementation |]) -#else - saverTy.InvokeMember("Make",BindingFlags.Static ||| BindingFlags.InvokeMethod ||| BindingFlags.Public ||| BindingFlags.NonPublic,null,null,[| box implementation |],CultureInfo.InvariantCulture(*FxCop:1304*)) -#endif - - static member MakeTuple(tupleElements: obj[],tupleType:Type) = - Impl.checkNonNull "tupleElements" tupleElements; - Impl.checkTupleType("tupleType",tupleType) - Impl.getTupleConstructor tupleType tupleElements - - static member GetTupleFields(tuple:obj) = // argument name(s) used in error message - Impl.checkNonNull "tuple" tuple; - let typ = tuple.GetType() - if not (Impl.isTupleType typ ) then invalidArg "tuple" "the object is not a tuple"; - Impl.getTupleReader typ tuple - - static member GetTupleField(tuple:obj,index:int) = // argument name(s) used in error message - Impl.checkNonNull "tuple" tuple; - let typ = tuple.GetType() - if not (Impl.isTupleType typ ) then invalidArg "tuple" "the object is not a tuple"; - let fields = Impl.getTupleReader typ tuple - if index < 0 || index >= fields.Length then invalidArg "index" "tuple field index out of range"; - fields.[index] - - static member PreComputeTupleReader(tupleType:Type) : (obj -> obj[]) = - Impl.checkTupleType("tupleType",tupleType) - Impl.getTupleReader tupleType - - static member PreComputeTuplePropertyInfo(tupleType:Type,index:int) = - Impl.checkTupleType("tupleType",tupleType) - Impl.getTupleReaderInfo (tupleType,index) - - static member PreComputeTupleConstructor(tupleType:Type) = - Impl.checkTupleType("tupleType",tupleType) - Impl.getTupleConstructor tupleType - - static member PreComputeTupleConstructorInfo(tupleType:Type) = - Impl.checkTupleType("tupleType",tupleType) - Impl.getTupleConstructorInfo (tupleType) - - static member MakeUnion(unionCase:UnionCaseInfo,args: obj [],?bindingFlags) = - Impl.checkNonNull "unionCase" unionCase; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.getUnionCaseConstructor (unionCase.DeclaringType,unionCase.Tag,bindingFlags) args - - static member PreComputeUnionConstructor (unionCase:UnionCaseInfo,?bindingFlags) = - Impl.checkNonNull "unionCase" unionCase; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.getUnionCaseConstructor (unionCase.DeclaringType,unionCase.Tag,bindingFlags) - - static member PreComputeUnionConstructorInfo(unionCase:UnionCaseInfo, ?bindingFlags) = - Impl.checkNonNull "unionCase" unionCase; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.getUnionCaseConstructorMethod (unionCase.DeclaringType,unionCase.Tag,bindingFlags) - - static member GetUnionFields(obj:obj,unionType:Type,?bindingFlags) = - //System.Console.WriteLine("typ1 = {0}",box unionType) - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - let unionType = Impl.ensureType(unionType,obj,bindingFlags) - //System.Console.WriteLine("typ2 = {0}",box unionType) - Impl.checkNonNull "unionType" unionType; - let unionType = Impl.getTypeOfReprType (unionType ,bindingFlags) - //System.Console.WriteLine("typ3 = {0}",box unionType) - Impl.checkUnionType(unionType,bindingFlags); - let tag = Impl.getUnionTagReader (unionType,bindingFlags) obj - let flds = Impl.getUnionCaseRecordReader (unionType,tag,bindingFlags) obj - UnionCaseInfo(unionType,tag), flds - - static member PreComputeUnionTagReader(unionType: Type,?bindingFlags) : (obj -> int) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkNonNull "unionType" unionType; - let unionType = Impl.getTypeOfReprType (unionType ,bindingFlags) - Impl.checkUnionType(unionType,bindingFlags); - Impl.getUnionTagReader (unionType ,bindingFlags) - - static member PreComputeUnionTagMemberInfo(unionType: Type,?bindingFlags) = - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - Impl.checkNonNull "unionType" unionType; - let unionType = Impl.getTypeOfReprType (unionType ,bindingFlags) - Impl.checkUnionType(unionType,bindingFlags); - Impl.getUnionTagMemberInfo(unionType ,bindingFlags) - - static member PreComputeUnionReader(unionCase: UnionCaseInfo,?bindingFlags) : (obj -> obj[]) = - Impl.checkNonNull "unionCase" unionCase; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - let typ = unionCase.DeclaringType - Impl.getUnionCaseRecordReader (typ,unionCase.Tag,bindingFlags) - - - static member GetExceptionFields(exn:obj, ?bindingFlags) = - Impl.checkNonNull "exn" exn; - let bindingFlags = defaultArg bindingFlags BindingFlags.Public - let typ = exn.GetType() - Impl.checkExnType(typ,bindingFlags); - Impl.getRecordReader (typ,bindingFlags) exn - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/reflect.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/reflect.fsi deleted file mode 100644 index 3b757295..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/reflect.fsi +++ /dev/null @@ -1,223 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -/// This namespace contains constructs for reflecting on the representation of -/// F# values and types. It augments the design of System.Reflection. -namespace Microsoft.FSharp.Reflection - -open System -open System.Reflection -open Microsoft.FSharp.Core -open Microsoft.FSharp.Primitives.Basics -open Microsoft.FSharp.Collections - -//--------------------------------------------------------------------- -// F# reified type inspection. - -///Represents a case of a discriminated union type -[] -type UnionCaseInfo = - /// The name of the case - member Name : string - /// The type in which the case occurs - member DeclaringType: Type - - /// Return the custom attributes associated with the case - member GetCustomAttributes: unit -> obj[] - /// Return the custom attributes associated with the case matching the given attribute type - member GetCustomAttributes: attributeType:System.Type -> obj[] - - /// The fields associated with the case, represented by PropertyInfo - member GetFields: unit -> PropertyInfo [] - - /// The integer tag for the case - member Tag: int - - -[] -/// Contains operations associated with constructing and analyzing values associated with F# types such as records, unions and tuples -type FSharpValue = - - /// Create an instance of a record type - /// - /// Assumes the given input is a record type. If not, ArgumentException is raised. - static member MakeRecord: recordType:Type * values:obj [] * ?bindingFlags:BindingFlags -> obj - - /// Read a field from a record value - /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. - static member GetRecordField: record:obj * info:PropertyInfo -> obj - - /// Read all the fields from a record value - /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. - static member GetRecordFields: record:obj * ?bindingFlags:BindingFlags -> obj[] - - - /// Precompute a function for reading a particular field from a record. - /// Assumes the given type is a RecordType with a field of the given name. - /// If not, ArgumentException is raised during pre-computation. - /// - /// Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo - /// because the path executed by the computed function is optimized given the knowledge that it will be - /// used to read values of the given type. - static member PreComputeRecordFieldReader : info:PropertyInfo -> (obj -> obj) - - /// Precompute a function for reading all the fields from a record. The fields are returned in the - /// same order as the fields reported by a call to Microsoft.FSharp.Reflection.Type.GetInfo for - /// this type. - /// - /// Assumes the given type is a RecordType. - /// If not, ArgumentException is raised during pre-computation. - /// - /// Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo - /// because the path executed by the computed function is optimized given the knowledge that it will be - /// used to read values of the given type. - static member PreComputeRecordReader : recordType:Type * ?bindingFlags:BindingFlags -> (obj -> obj[]) - - - /// Precompute a function for constructing a record value. - /// - /// Assumes the given type is a RecordType. - /// If not, ArgumentException is raised during pre-computation. - static member PreComputeRecordConstructor : recordType:Type * ?bindingFlags:BindingFlags -> (obj[] -> obj) - - /// Get a ConstructorInfo for a record type - static member PreComputeRecordConstructorInfo: recordType:Type * ?bindingFlags:BindingFlags -> ConstructorInfo - - /// Create a union case value - static member MakeUnion: unionCase:UnionCaseInfo * args:obj [] * ?bindingFlags:BindingFlags -> obj - - /// Identify the union case and its fields for an object - /// - /// Assumes the given input is a union case value. If not, ArgumentException is raised. - /// - /// If the type is not given, then the runtime type of the input object is used to identify the - /// relevant union type. The type should always be given if the input object may be null. For example, - /// option values may be represented using the 'null'. - static member GetUnionFields: value:obj * unionType:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo * obj [] - - /// - /// Assumes the given type is a union type. - /// If not, ArgumentException is raised during pre-computation. - /// - /// Using the computed function is more efficient than calling GetUnionCase - /// because the path executed by the computed function is optimized given the knowledge that it will be - /// used to read values of the given type. - static member PreComputeUnionTagReader : unionType:Type * ?bindingFlags:BindingFlags -> (obj -> int) - - /// Precompute a property or static method for reading an integer representing the case tag of a union type. - static member PreComputeUnionTagMemberInfo : unionType:Type * ?bindingFlags:BindingFlags -> MemberInfo - - /// Precompute a function for reading all the fields for a particular discriminator case of a union type - /// - /// Using the computed function will typically be faster than executing a corresponding call to GetFields - static member PreComputeUnionReader : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj -> obj[]) - - /// Precompute a function for constructing a discriminated union value for a particular union case. - static member PreComputeUnionConstructor : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj[] -> obj) - - /// A method that constructs objects of the given case - static member PreComputeUnionConstructorInfo: unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> MethodInfo - - /// Create an instance of a tuple type - /// - /// Assumes at least one element is given. If not, ArgumentException is raised. - static member MakeTuple: tupleElements:obj[] * tupleType:Type -> obj - - /// Read a field from a tuple value - /// - /// Assumes the given input is a tuple value. If not, ArgumentException is raised. - static member GetTupleField: tuple:obj * index:int -> obj - - /// Read all fields from a tuple - /// - /// Assumes the given input is a tuple value. If not, ArgumentException is raised. - static member GetTupleFields: tuple:obj -> obj [] - - /// Precompute a function for reading the values of a particular tuple type - /// - /// Assumes the given type is a TupleType. - /// If not, ArgumentException is raised during pre-computation. - static member PreComputeTupleReader : tupleType:Type -> (obj -> obj[]) - - /// Get information that indicates how to read a field of a tuple - static member PreComputeTuplePropertyInfo: tupleType:Type * index:int -> PropertyInfo * (Type * int) option - - /// Precompute a function for reading the values of a particular tuple type - /// - /// Assumes the given type is a TupleType. - /// If not, ArgumentException is raised during pre-computation. - static member PreComputeTupleConstructor : tupleType:Type -> (obj[] -> obj) - - /// Get a method that constructs objects of the given tuple type. - /// For small tuples, no additional typoe will be returned. - /// - /// For large tuples, an additional type is returned indicating that - /// a nested encoding has been used for the tuple type. In this case - /// the suffix portion of the tuple type has the given type and an - /// object of this type must be created and passed as the last argument - /// to the ConstructorInfo. A recursive call to PreComputeTupleConstructorInfo - /// can be used to determine the constructor for that the suffix type. - static member PreComputeTupleConstructorInfo: tupleType:Type -> ConstructorInfo * Type option - - /// Build a typed function from object from a dynamic function implementation - static member MakeFunction : functionType:Type * implementation:(obj -> obj) -> obj - - /// Read all the fields from a value built using an instance of an F# exception declaration - /// - /// Assumes the given input is an F# exception value. If not, ArgumentException is raised. - static member GetExceptionFields: exn:obj * ?bindingFlags:BindingFlags -> obj[] - - -[] -/// Contains operations associated with constructing and analyzing F# types such as records, unions and tuples -type FSharpType = - - /// Read all the fields from a record value, in declaration order - /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. - static member GetRecordFields: recordType:Type * ?bindingFlags:BindingFlags -> PropertyInfo[] - - /// Get the cases of a union type. - /// - /// Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. - static member GetUnionCases: unionType:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo[] - - /// Return a System.Type representing the F# function type with the given domain and range - static member MakeFunctionType: domain:Type * range:Type -> Type - - /// Return a System.Type representing an F# tuple type with the given element types - static member MakeTupleType: types:Type[] -> Type - - /// Return true if the typ is a representation of an F# tuple type - static member IsTuple : typ:Type -> bool - - /// Return true if the typ is a representation of an F# function type or the runtime type of a closure implementing an F# function type - static member IsFunction : typ:Type -> bool - - /// Return true if the typ is a System.Type value corresponding to the compiled form of an F# module - static member IsModule: typ:Type -> bool - - /// Return true if the typ is a representation of an F# record type - static member IsRecord: typ:Type * ?bindingFlags:BindingFlags -> bool - - /// Return true if the typ is a representation of an F# union type or the runtime type of a value of that type - static member IsUnion: typ:Type * ?bindingFlags:BindingFlags -> bool - - /// Get the tuple elements from the representation of an F# tuple type - static member GetTupleElements : tupleType:Type -> Type[] - - /// Get the domain and range types from an F# function type or from the runtime type of a closure implementing an F# type - static member GetFunctionElements : functionType:Type -> Type * Type - - /// Read all the fields from an F# exception declaration, in declaration order - /// - /// Assumes exceptionType is an exception representation type. If not, ArgumentException is raised. - static member GetExceptionFields: exceptionType:Type * ?bindingFlags:BindingFlags -> PropertyInfo[] - - /// Return true if the typ is a representation of an F# exception declaration - static member IsExceptionRepresentation: exceptionType:Type * ?bindingFlags:BindingFlags -> bool - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/seq.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/seq.fs deleted file mode 100644 index 22d59ceb..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/seq.fs +++ /dev/null @@ -1,1369 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Control - open Microsoft.FSharp.Collections - open Microsoft.FSharp.Primitives.Basics - open System.Collections - open System.Collections.Generic - - module IEnumerator = - - - let noReset() = raise (new System.NotSupportedException("Reset is not supported on this enumerator.")) - let notStarted() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext.")) - let alreadyFinished() = raise (new System.InvalidOperationException("Enumeration already finished.")) - let check started = if not started then notStarted() - let dispose (r : System.IDisposable) = r.Dispose() - - let cast (e : IEnumerator) : IEnumerator<'T> = - { new IEnumerator<'T> with - member x.Current = unbox e.Current - interface IEnumerator with - member x.Current = unbox e.Current - member x.MoveNext() = e.MoveNext() - member x.Reset() = noReset(); - interface System.IDisposable with - member x.Dispose() = - match e with - | :? System.IDisposable as e -> e.Dispose() - | _ -> () } - - /// A concrete implementation of an enumerator that returns no values - [] - type EmptyEnumerator<'T>() = - let mutable started = false - interface IEnumerator<'T> with - member x.Current = - check started; - (alreadyFinished() : 'T) - - interface System.Collections.IEnumerator with - member x.Current = - check started; - (alreadyFinished() : obj) - member x.MoveNext() = - if not started then started <- true; - false - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = () - - let Empty () = (new EmptyEnumerator<'T>() :> IEnumerator<'T>) - - let rec nth index (e : IEnumerator<'T>) = - if not (e.MoveNext()) then invalidArg "index" "not enough elements in the sequence"; - if index < 0 then invalidArg "index" "negative index requested"; - if index = 0 then e.Current - else nth (index-1) e - - type MapEnumeratorState = NotStarted | InProcess | Finished - - [] - type MapEnumerator<'T> () = - let mutable state = NotStarted - [] - val mutable curr : 'T - - member this.GetCurrent () = - match state with - | NotStarted -> notStarted() - | Finished -> alreadyFinished() - | InProcess -> () - this.curr - - abstract DoMoveNext : byref<'T> -> bool - abstract Dispose : unit -> unit - - interface IEnumerator<'T> with - member this.Current = this.GetCurrent() - - interface IEnumerator with - member this.Current = box(this.GetCurrent()) - member this.MoveNext () = - state <- InProcess - if this.DoMoveNext(&this.curr) then - true - else - state <- Finished - false - member this.Reset() = noReset() - interface System.IDisposable with - member this.Dispose() = this.Dispose() - - let map f (e : IEnumerator<_>) : IEnumerator<_>= - upcast - { new MapEnumerator<_>() with - member this.DoMoveNext (curr : byref<_>) = - if e.MoveNext() then - curr <- (f e.Current) - true - else - false - member this.Dispose() = e.Dispose() - } - - let mapi f (e : IEnumerator<_>) : IEnumerator<_> = - let i = ref (-1) - upcast - { new MapEnumerator<_>() with - member this.DoMoveNext curr = - i := !i + 1 - if e.MoveNext() then - curr <- f !i e.Current - true - else - false - member this.Dispose() = e.Dispose() - } - - let map2 f (e1 : IEnumerator<_>) (e2 : IEnumerator<_>) : IEnumerator<_>= - upcast - { new MapEnumerator<_>() with - member this.DoMoveNext curr = - let n1 = e1.MoveNext() - let n2 = e2.MoveNext() - if n1 && n2 then - curr <- f e1.Current e2.Current - true - else - false - member this.Dispose() = e1.Dispose(); e2.Dispose() - } - - - let choose f (e : IEnumerator<'T>) = - let started = ref false - let curr = ref None - let get() = check !started; (match !curr with None -> alreadyFinished() | Some x -> x) - { new IEnumerator<'b> with - member x.Current = get() - interface IEnumerator with - member x.Current = box (get()) - member x.MoveNext() = - if not !started then started := true; - curr := None; - while ((!curr).IsNone && e.MoveNext()) do - curr := f e.Current; - Option.isSome !curr - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = e.Dispose() } - - let filter f (e : IEnumerator<'T>) = - let started = ref false - let this = - { new IEnumerator<'T> with - member x.Current = check !started; e.Current - interface IEnumerator with - member x.Current = check !started; box e.Current - member x.MoveNext() = - let rec next() = - if not !started then started := true; - e.MoveNext() && (f e.Current || next()) - next() - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = e.Dispose() } - this - - let unfold f x : IEnumerator<_> = - let state = ref x - upcast - { new MapEnumerator<_>() with - member this.DoMoveNext curr = - match f !state with - | None -> false - | Some(r,s) -> - curr <- r - state := s - true - member this.Dispose() = () - } - - let upto lastOption f = - match lastOption with - | Some b when b<0 -> Empty() // a request for -ve length returns empty sequence - | _ -> - let unstarted = -1 // index value means unstarted (and no valid index) - let completed = -2 // index value means completed (and no valid index) - let unreachable = -3 // index is unreachable from 0,1,2,3,... - let finalIndex = match lastOption with - | Some b -> b // here b>=0, a valid end value. - | None -> unreachable // run "forever", well as far as Int32.MaxValue since indexing with a bounded type. - // The Current value for a valid index is "f i". - // Lazy<_> values are used as caches, to store either the result or an exception if thrown. - // These "Lazy<_>" caches are created only on the first call to current and forced immediately. - // The lazy creation of the cache nodes means enumerations that skip many Current values are not delayed by GC. - // For example, the full enumeration of Seq.initInfinite in the tests. - // state - let index = ref unstarted - // a Lazy node to cache the result/exception - let current = ref (Unchecked.defaultof<_>) - let setIndex i = index := i; current := (Unchecked.defaultof<_>) // cache node unprimed, initialised on demand. - let getCurrent() = - if !index = unstarted then notStarted() - if !index = completed then alreadyFinished() - match box !current with - | null -> current := Lazy.Create(fun () -> f !index); - | _ -> () - // forced or re-forced immediately. - (!current).Force() - { new IEnumerator<'b> with - member x.Current = getCurrent() - interface IEnumerator with - member x.Current = box (getCurrent()) - member x.MoveNext() = - if !index = completed then - false - elif !index = unstarted then - setIndex 0 - true - else ( - if !index = System.Int32.MaxValue then failwith "Enumeration based on System.Int32 exceeded System.Int32.MaxValue" - if !index = finalIndex then - false - else - setIndex (!index + 1) - true - ) - member self.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = () } - - let readAndClear r = - lock r (fun () -> match !r with None -> None | Some x as res -> r := None; res) - - let generateWhileSome openf compute closef : IEnumerator<'b> = - let started = ref false - let curr = ref None - let state = ref (Some(openf())) - let getCurr() = - check !started; - match !curr with None -> alreadyFinished() | Some x -> x - let start() = if not !started then (started := true) - - let dispose() = readAndClear state |> Option.iter closef - let finish() = (dispose(); curr := None) - { new IEnumerator<'b> with - member x.Current = getCurr() - interface IEnumerator with - member x.Current = box (getCurr()) - member x.MoveNext() = - start(); - match !state with - | None -> false (* we started, then reached the end, then got another MoveNext *) - | Some s -> - match (try compute s with e -> finish(); rethrow ()) with - | None -> finish(); false - | Some(r) as x -> curr := x; true - - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = dispose() } - - [] - type ArrayEnumerator<'T>(arr: 'T array) = - let mutable curr = -1 - let mutable len = arr.Length - member x.Get() = - if curr >= 0 then - if curr >= len then alreadyFinished() - else arr.[curr] - else - notStarted() - interface IEnumerator<'T> with - member x.Current = x.Get() - interface System.Collections.IEnumerator with - member x.MoveNext() = - if curr >= len then false - else - curr <- curr + 1; - (curr < len) - member x.Current = box(x.Get()) - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = () - - let of_array arr = (new ArrayEnumerator<'T>(arr) :> IEnumerator<'T>) - - [] - type Singleton<'T>(v:'T) = - let mutable started = false - interface IEnumerator<'T> with - member x.Current = v - interface IEnumerator with - member x.Current = box v - member x.MoveNext() = if started then false else (started <- true; true) - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = () - - let Singleton x = (new Singleton<'T>(x) :> IEnumerator<'T>) - - let EnumerateThenFinally f (e : IEnumerator<'T>) = - { new IEnumerator<'T> with - member x.Current = e.Current - interface IEnumerator with - member x.Current = (e :> IEnumerator).Current - member x.MoveNext() = e.MoveNext() - member x.Reset() = noReset() - interface System.IDisposable with - member x.Dispose() = f(); e.Dispose() } - - // Use generators for some implementations of IEnumerables. - // - module Generator = - - open System.Collections - open System.Collections.Generic - - type Step<'T> = - | Stop - | Yield of 'T - | Goto of Generator<'T> - - and Generator<'T> = - abstract Apply: (unit -> Step<'T>) - abstract Disposer: (unit -> unit) option - - let disposeG (g:Generator<'T>) = - match g.Disposer with - | None -> () - | Some f -> f() - - let chainDisposeG d1 (g:Generator<'T>) = - let app = g.Apply - let disp = match g.Disposer with Some f2 -> Some(fun () -> f2(); d1()) | None -> Some d1 - { new Generator<_> with - member x.Apply = app - member x.Disposer = disp } - - let appG (g:Generator<_>) = - //System.Console.WriteLine("{0}.appG", box g) - let res = g.Apply() - match res with - | Goto(next) -> - Goto(next) - | Yield _ -> - res - | Stop -> - //System.Console.WriteLine("appG: Stop") - disposeG g; - res - - // Binding. - // - // We use a type defintion to apply a local dynamic optimization. - // We automatically right-associate binding, i.e. push the continuations to the right. - // That is, bindG (bindG G1 cont1) cont2 --> bindG G1 (cont1 o cont2) - // This makes constructs such as the following linear rather than quadratic: - // - // let rec rwalk n = { if n > 0 then - // yield! rwalk (n-1) - // yield n } - - type GenerateThen<'T>(g:Generator<'T>, cont : unit -> Generator<'T>) = - member self.Generator = g - member self.Cont = cont - interface Generator<'T> with - member x.Apply = (fun () -> - match appG g with - | Stop -> - // OK, move onto the generator given by the continuation - Goto(cont()) - - | Yield v as res -> - res - - | Goto next -> - Goto(GenerateThen<_>.Bind(next,cont))) - member x.Disposer = - g.Disposer - - - static member Bind (g:Generator<'T>, cont) = - match g with - | :? GenerateThen<'T> as g -> GenerateThen<_>.Bind(g.Generator,(fun () -> GenerateThen<_>.Bind (g.Cont(), cont))) - | g -> (new GenerateThen<'T>(g, cont) :> Generator<'T>) - - - let bindG g cont = GenerateThen<_>.Bind(g,cont) - - //let emptyG () = - // { new Generator<_> with - // member x.Apply = (fun () -> Stop) - // member x.Disposer = None } - // - //let delayG f = - // { new Generator<_> with - // member x.Apply = fun () -> Goto(f()) - // member x.Disposer = None } - // - //let useG (v: System.IDisposable) f = - // { new Generator<_> with - // member x.Apply = (fun () -> - // let g = f v in - // // We're leaving this generator but want to maintain the disposal on the target. - // // Hence chain it into the disposer of the target - // Goto(chainDisposeG v.Dispose g)) - // member x.Disposer = Some (fun () -> v.Dispose()) } - // - //let yieldG (v:'T) = - // let yielded = ref false - // { new Generator<_> with - // member x.Apply = fun () -> if !yielded then Stop else (yielded := true; Yield(v)) - // member x.Disposer = None } - // - //let rec whileG gd b = if gd() then bindG (b()) (fun () -> whileG gd b) else emptyG() - // - //let yieldThenG x b = bindG (yieldG x) b - // - //let forG (v: seq<'T>) f = - // let e = v.GetEnumerator() in - // whileG e.MoveNext (fun () -> f e.Current) - - // Internal type. Drive an underlying generator. Crucially when the generator returns - // a new generator we simply update our current generator and continue. Thus the enumerator - // effectively acts as a reference cell holding the current generator. This means that - // infinite or large generation chains (e.g. caused by long sequences of append's, including - // possible delay loops) can be referenced via a single enumerator. - // - // A classic case where this arises in this sort of sequence expression: - // let rec data s = { yield s; - // yield! data (s + random()) } - // - // This translates to - // let rec data s = Seq.delay (fun () -> Seq.append (Seq.singleton s) (Seq.delay (fun () -> data (s+random())))) - // - // When you unwind through all the Seq, IEnumerator and Generator objects created, - // you get (data s).GetEnumerator being an "GenerateFromEnumerator(EnumeratorWrappingLazyGenerator(...))" for the append. - // After one element is yielded, we move on to the generator for the inner delay, which in turn - // comes back to be a "GenerateFromEnumerator(EnumeratorWrappingLazyGenerator(...))". - // - // Defined as a type so we can optimize Enumerator/Generator chains in enumerateFromLazyGenerator - // and GenerateFromEnumerator. - - - [] - type EnumeratorWrappingLazyGenerator<'T>(g:Generator<'T>) = - let mutable g = g - let mutable curr = None - let mutable finished = false - member e.Generator = g - interface IEnumerator<'T> with - member x.Current= match curr with Some(v) -> v | None -> failwith "MoveNext not called, or finished" - interface System.Collections.IEnumerator with - member x.Current = box (x :> IEnumerator<_>).Current - member x.MoveNext() = - not finished && - (match appG g with - | Stop -> - curr <- None; - finished <- true; - false - | Yield(v) -> - curr <- Some(v); - true - | Goto(next) -> - (g <- next); - (x :> IEnumerator).MoveNext()) - member x.Reset() = IEnumerator.noReset() - interface System.IDisposable with - member x.Dispose() = - if not finished then disposeG g - - // Internal type, used to optimize Enumerator/Generator chains - type LazyGeneratorWrappingEnumerator<'T>(e:System.Collections.Generic.IEnumerator<'T>) = - member g.Enumerator = e - interface Generator<'T> with - member g.Apply = (fun () -> - if e.MoveNext() then - Yield(e.Current) - else - Stop) - member g.Disposer= Some(e.Dispose) - - let EnumerateFromGenerator(g:Generator<'T>) = - match g with - | :? LazyGeneratorWrappingEnumerator<'T> as g -> g.Enumerator - | _ -> (new EnumeratorWrappingLazyGenerator<_>(g) :> System.Collections.Generic.IEnumerator<_>) - - let GenerateFromEnumerator (e:System.Collections.Generic.IEnumerator<'T>) = - match e with - | :? EnumeratorWrappingLazyGenerator<'T> as e -> e.Generator - | _ -> (new LazyGeneratorWrappingEnumerator<'T>(e) :> Generator<'T>) - - - module SequenceExpressionHelpers = - - let mkSeq f = - { new IEnumerable<'b> with - member x.GetEnumerator() = f() - interface IEnumerable with - member x.GetEnumerator() = (f() :> IEnumerator) } - - type EmptyEnumerable<'T> = - | EmptyEnumerable - interface IEnumerable<'T> with - member x.GetEnumerator() = IEnumerator.Empty<'T>() - interface IEnumerable with - member x.GetEnumerator() = (IEnumerator.Empty<'T>() :> IEnumerator) - - let Generate openf compute closef = - mkSeq (fun () -> IEnumerator.generateWhileSome openf compute closef) - - let GenerateUsing (openf : unit -> ('b :> System.IDisposable)) compute = - Generate openf compute (fun (s:'b) -> s.Dispose()) - - let EnumerateFromFunctions opener moveNext current = - Generate - opener - (fun x -> if moveNext x then Some(current x) else None) - (fun x -> match box(x) with :? System.IDisposable as id -> id.Dispose() | _ -> ()) - - // A family of enumerators that can have additional 'finally' actions added to the enumerator through - // the use of mutation. This is used to 'push' the disposal action for a 'use' into the next enumerator. - // For example, - // seq { use x = ... - // while ... } - // results in the 'while' loop giving an adjustable enumerator. This is then adjusted by adding the disposal action - // from the 'use' into the enumerator. This means that we avoid constructing a two-deep enumerator chain in this - // common case. - type IFinallyEnumerator = - abstract AppendFinallyAction : (unit -> unit) -> unit - - /// A concrete implementation of IEnumerable that adds the given compensation to the "Dispose" chain of any - /// enumerators returned by the enumerable. - [] - type FinallyEnumerable<'T>(compensation: unit -> unit, restf: unit -> seq<'T>) = - interface IEnumerable<'T> with - member x.GetEnumerator() = - try - let ie = restf().GetEnumerator() - match ie with - | :? IFinallyEnumerator as a -> - a.AppendFinallyAction(compensation); - ie - | _ -> - IEnumerator.EnumerateThenFinally compensation ie - with e -> - compensation(); - rethrow() - interface IEnumerable with - member x.GetEnumerator() = ((x :> IEnumerable<'T>).GetEnumerator() :> IEnumerator) - - /// An optimized object for concatenating a sequence of enumerables - [] - type ConcatEnumerator<'T,'b when 'b :> seq<'T>>(ies: seq<'b>) = - let mutable outerEnum = ies.GetEnumerator() - let mutable currInnerEnum = IEnumerator.Empty() - - let mutable started = false - let mutable finished = false - let mutable compensations = [] - - [] // false = unchecked - val mutable currElement : 'T - - member x.Finish() = - finished <- true - match currInnerEnum with - | null -> () - | _ -> - currInnerEnum.Dispose() - currInnerEnum <- null - match outerEnum with - | null -> () - | _ -> - outerEnum.Dispose() - outerEnum <- null - for f in compensations do - f() - compensations <- [] - - member x.GetCurrent() = - IEnumerator.check started; - if finished then IEnumerator.alreadyFinished() else x.currElement - - interface IFinallyEnumerator with - member x.AppendFinallyAction(f) = - compensations <- f :: compensations - - interface IEnumerator<'T> with - member x.Current = x.GetCurrent() - - interface IEnumerator with - member x.Current = box (x.GetCurrent()) - - member x.MoveNext() = - if not started then (started <- true) - if finished then false - else - let rec takeInner () = - // check the inner list - if currInnerEnum.MoveNext() then - x.currElement <- currInnerEnum.Current; - true - else - // check the outer list - let rec takeOuter() = - if outerEnum.MoveNext() then - let ie = outerEnum.Current - // Optimization to detect the statically-allocated empty IEnumerables - match box ie with - | :? EmptyEnumerable<'T> -> - // This one is empty, just skip, don't call GetEnumerator, try again - takeOuter() - | _ -> - // OK, this one may not be empty. - // Don't forget to dispose of the enumerator for the inner list now we're done with it - currInnerEnum.Dispose(); - currInnerEnum <- ie.GetEnumerator(); - takeInner () - else - // We're done - x.Finish() - false - takeOuter() - takeInner () - - member x.Reset() = IEnumerator.noReset() - - interface System.IDisposable with - member x.Dispose() = - if not finished then - x.Finish() - - let EnumerateUsing (resource : 'T :> System.IDisposable) (rest: 'T -> #seq<'b>) = - (FinallyEnumerable((fun () -> match box resource with null -> () | _ -> resource.Dispose()), - (fun () -> rest resource :> seq<_>)) :> seq<_>) - - let mkConcatEnumerable (ies: seq<'b :> seq<'T>>) = - mkSeq (fun () -> new ConcatEnumerator<_,_>(ies) :> IEnumerator<'T>) - - let EnumerateWhile (g : unit -> bool) (b: seq<'T>) : seq<'T> = - let started = ref false - let curr = ref None - let getCurr() = - IEnumerator.check !started; - match !curr with None -> IEnumerator.alreadyFinished() | Some x -> x - let start() = if not !started then (started := true) - - let finish() = (curr := None) - mkConcatEnumerable - (mkSeq (fun () -> - { new IEnumerator<_> with - member x.Current = getCurr() - interface IEnumerator with - member x.Current = box (getCurr()) - member x.MoveNext() = - start(); - let keepGoing = (try g() with e -> finish(); rethrow ()) in - if keepGoing then - curr := Some(b); true - else - finish(); false - member x.Reset() = IEnumerator.noReset() - interface System.IDisposable with - member x.Dispose() = () })) - - let EnumerateThenFinally (rest : seq<'T>) (compensation : unit -> unit) = - (FinallyEnumerable(compensation, (fun () -> rest)) :> seq<_>) - - [] - type GeneratedSequenceBase<'T>() as this = - let mutable redirectTo : GeneratedSequenceBase<'T> = Unchecked.defaultof<_> - let mutable redirect : bool = false - - abstract GetFreshEnumerator : unit -> IEnumerator<'T> - abstract GenerateNext : next:byref> -> int // 0 = Stop, 1 = Yield, 2 = Goto - abstract Close: unit -> unit - abstract CheckClose: bool - abstract LastGenerated : 'T - - member x.MoveNextImpl() = - let active = - if redirect then redirectTo - else this - let mutable target = null - match active.GenerateNext(&target) with - | 1 -> - true - | 2 -> - match target.GetEnumerator() with - | :? GeneratedSequenceBase<'T> as g when not active.CheckClose -> - redirectTo <- g - | e -> - redirectTo <- - { new GeneratedSequenceBase<'T>() with - member x.GetFreshEnumerator() = e - member x.GenerateNext(_) = if e.MoveNext() then 1 else 0 - member x.Close() = e.Dispose(); active.Close() - member x.CheckClose = true - member x.LastGenerated = e.Current } - redirect <- true - x.MoveNextImpl() - | _ (* 0 *) -> - false - - interface IEnumerable<'T> with - member x.GetEnumerator() = x.GetFreshEnumerator() - interface IEnumerable with - member x.GetEnumerator() = (x.GetFreshEnumerator() :> IEnumerator); - interface IEnumerator<'T> with - member x.Current = if redirect then redirectTo.LastGenerated else x.LastGenerated - member x.Dispose() = if redirect then redirectTo.Close() else x.Close() - interface IEnumerator with - member x.Current = box (if redirect then redirectTo.LastGenerated else x.LastGenerated) - member x.MoveNext() = x.MoveNextImpl() - - member x.Reset() = raise <| new System.NotSupportedException(); - - - [] - [] - type CachedSeq<'T>(cleanup,res:seq<'T>) = - interface System.IDisposable with - member x.Dispose() = cleanup() - interface System.Collections.Generic.IEnumerable<'T> with - member x.GetEnumerator() = res.GetEnumerator() - interface System.Collections.IEnumerable with - member x.GetEnumerator() = (res :> System.Collections.IEnumerable).GetEnumerator() - member obj.Clear() = cleanup() - - - [] - [] - module Seq = - - open SequenceExpressionHelpers - - let mkDelayedSeq (f: unit -> IEnumerable<'T>) = mkSeq (fun () -> f().GetEnumerator()) - let mkUnfoldSeq f x = mkSeq (fun () -> IEnumerator.unfold f x) - - [] - let delay f = mkDelayedSeq f - - [] - let unfold f x = mkUnfoldSeq f x - - [] - let empty<'T> = (EmptyEnumerable :> seq<'T>) - - [] - let initInfinite f = mkSeq (fun () -> IEnumerator.upto None f) - - [] - let init_infinite f = initInfinite f - - [] - let init count f = - if count < 0 then invalidArg "count" "the number of elements was negative" - mkSeq (fun () -> IEnumerator.upto (Some (count-1)) f) - - [] - let init_finite count f = init count f - - [] - let iter f (ie : seq<'T>) = - use e = ie.GetEnumerator() - while e.MoveNext() do - f e.Current; - - [] - let nth i (ie : seq<'T>) = - use e = ie.GetEnumerator() - IEnumerator.nth i e - - [] - let iteri f (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable i = 0 - while e.MoveNext() do - f i e.Current; - i <- i + 1; - - [] - let exists f (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable state = false - while (not state && e.MoveNext()) do - state <- f e.Current - state - - [] - let for_all f (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable state = true - while (state && e.MoveNext()) do - state <- f e.Current - state - - [] - let forall f ie = for_all f ie - - [] - let iter2 f (ie1 : seq<_>) (ie2 : seq<_>) = - use e1 = ie1.GetEnumerator() - use e2 = ie2.GetEnumerator() - while (e1.MoveNext() && e2.MoveNext()) do - f e1.Current e2.Current; - - - // Build an IEnumerble by wrapping/transforming iterators as they get generated. - let revamp f (ie : seq<_>) = mkSeq (fun () -> f (ie.GetEnumerator())) - let revamp2 f (ie1 : seq<_>) (ie2 : seq<_>) = mkSeq (fun () -> f (ie1.GetEnumerator()) (ie2.GetEnumerator())) - [] - let filter f ie = revamp (IEnumerator.filter f) ie - [] - let map f ie = revamp (IEnumerator.map f) ie - [] - let mapi f ie = revamp (IEnumerator.mapi f) ie - [] - let map2 f ie1 ie2 = revamp2 (IEnumerator.map2 f) ie1 ie2 - [] - let choose f ie = revamp (IEnumerator.choose f) ie - [] - let zip ie1 ie2 = map2 (fun x y -> x,y) ie1 ie2 - [] - let zip3 ie1 ie2 ie3 = map2 (fun x (y,z) -> x,y,z) ie1 (zip ie2 ie3) - - [] - let cast (seq: IEnumerable) = mkSeq (fun () -> IEnumerator.cast (seq.GetEnumerator())) - - [] - let tryPick f (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable res = None - while (Option.isNone res && e.MoveNext()) do - res <- f e.Current; - res - let first f ie = tryPick f ie - let pick f ie = match tryPick f ie with None -> raise (System.Collections.Generic.KeyNotFoundException()) | Some x -> x - - [] - let tryFind f (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable res = None - while (Option.isNone res && e.MoveNext()) do - let c = e.Current - if f c then res <- Some(c) - res - - let tryfind f ie = tryFind f ie - - [] - let find f ie = match tryfind f ie with None -> raise (System.Collections.Generic.KeyNotFoundException()) | Some x -> x - - [] - let take count (sequence : seq<'T>) = - if count < 0 then invalidArg "count" "the number of elements to take may not be negative" - (* Note: don't create or dispose any IEnumerable if n = 0 *) - if count = 0 then empty else - { use e = sequence.GetEnumerator() - for i in 0 .. count - 1 do - if not (e.MoveNext()) then - raise <| System.InvalidOperationException "the input sequence had insufficient elements" - yield e.Current } - - [] - let isEmpty (ie : seq<'T>) = - use ie = ie.GetEnumerator() - not (ie.MoveNext()) - - [] - let is_empty ie = isEmpty ie - - [] - let concat ies = SequenceExpressionHelpers.mkConcatEnumerable ies - - [] - let length (ie : seq<'T>) = - match ie with - | :? array<'T> as a -> a.Length - | :? list<'T> as a -> a.Length - | :? ResizeArray<'T> as a -> a.Count - | _ -> - use e = ie.GetEnumerator() - let mutable state = 0 - while e.MoveNext() do - state <- state + 1; - state - - [] - let fold f x (ie : seq<'T>) = - use e = ie.GetEnumerator() - let mutable state = x - while e.MoveNext() do - state <- f state e.Current; - state - - [] - let reduce f (sequence : seq<'T>) = - use e = sequence.GetEnumerator() - if not (e.MoveNext()) then invalidArg "sequence" "the input sequence was empty"; - let mutable state = e.Current - while e.MoveNext() do - state <- f state e.Current; - state - - let fromGenerator f = mkSeq(fun () -> Generator.EnumerateFromGenerator (f())) - let toGenerator (ie : seq<_>) = Generator.GenerateFromEnumerator (ie.GetEnumerator()) - - - [] - let append (ie1: seq<'T>) (ie2: seq<'T>) = - fromGenerator(fun () -> Generator.bindG (toGenerator ie1) (fun () -> toGenerator ie2)) - - - [] - let collect f ies = map f ies |> concat - - [] - let map_concat f ies = collect f ies - - [] - let compareWith (f:'T -> 'T -> int) (s1 : seq<'T>) (s2: seq<'T>) = - use e1 = s1.GetEnumerator() - use e2 = s2.GetEnumerator() - let rec go () = - let e1ok = e1.MoveNext() - let e2ok = e2.MoveNext() - let c = (if e1ok = e2ok then 0 else if e1ok then 1 else -1) - if c <> 0 then c else - if not e1ok || not e2ok then 0 - else - let c = f e1.Current e2.Current - if c <> 0 then c else - go () - go() - - [] - let compare f s1 s2 = compareWith f s1 s2 - - [] - let of_list (l : 'T list) = - (l :> seq<'T>) - - [] - let to_list (ie : seq<'T>) = - match ie with - | :? list<'T> as res -> res - | :? array<'T> as res -> List.of_array res - | _ -> - use e = ie.GetEnumerator() - let mutable res = [] - while e.MoveNext() do - res <- e.Current :: res - List.rev res - - // Create a new object to ensure underlying array may not be mutated by a backdoor cast - [] - let of_array (a : 'T array) = - mkSeq (fun () -> IEnumerator.of_array a) - - [] - let to_array (ie : seq<'T>) = - match ie with - | :? ('T[]) as res -> res - | :? list<'T> as res -> List.to_array res - | _ -> - use e = ie.GetEnumerator() - let res = new System.Collections.Generic.List<_>() - while e.MoveNext() do - res.Add(e.Current) - res.ToArray() - - [] - let singleton x = mkSeq (fun () -> IEnumerator.Singleton x) - - - [] - let truncate n (x: seq<'T>) = - { let i = ref 0 - use ie = x.GetEnumerator() - while !i < n && ie.MoveNext() do - i := !i + 1 - yield ie.Current } - - [] - let pairwise (x: seq<'T>) = - { use ie = x.GetEnumerator() - if ie.MoveNext() then - let iref = ref ie.Current - while ie.MoveNext() do - let j = ie.Current - yield (!iref, j) - iref := j } - - [] - let scan f z (seq : seq<_>) = - { let zref = ref z - yield !zref - use ie = seq.GetEnumerator() - while ie.MoveNext() do - zref := f !zref ie.Current - yield !zref } - -(* - [] - let scan1 f (sequence : seq<'T>) = - { use ie = sequence.GetEnumerator() - if ie.MoveNext() then - let zref = ref ie.Current - while ie.MoveNext() do - zref := f !zref ie.Current - yield !zref - else - raise <| System.InvalidOperationException "the input sequence was empty" } -*) - - [] - let find_index p s = s |> find (snd >> p) |> fst - - [] - let findIndex p (s:seq<_>) = - use ie = s.GetEnumerator() - let rec loop i = - if ie.MoveNext() then - if p ie.Current then - i - else loop (i+1) - else - raise (System.Collections.Generic.KeyNotFoundException()) - loop 0 - - [] - let tryFindIndex p (s:seq<_>) = - use ie = s.GetEnumerator() - let rec loop i = - if ie.MoveNext() then - if p ie.Current then - Some i - else loop (i+1) - else - None - loop 0 - - [] - let tryfind_index p s = s |> tryfind (snd >> p) |> Option.map fst - - - // windowed : int -> seq<'T> -> seq> - [] - let windowed windowSize (s: seq<_>) = - if windowSize <= 0 then invalidArg "windowSize" "the window size must be positive" - { let arr = Array.zeroCreate windowSize - let r = ref (windowSize-1) - let i = ref 0 - use e = s.GetEnumerator() - while e.MoveNext() do - arr.[!i] <- e.Current - i := (!i + 1) % windowSize - if !r = 0 then - yield Array.init windowSize (fun j -> arr.[(!i+j) % windowSize]) - else - r := (!r - 1) } - - [] - let cache (seq : seq<'T>) = - // Wrap a seq to ensure that it is enumerated just once and only as far as is necessary. - // - // This code is required to be thread safe. - // The necessary calls should be called at most once (include .MoveNext() = false). - // The enumerator should be disposed (and dropped) when no longer required. - //------ - // The state is (prefix,enumerator) with invariants: - // * the prefix followed by elts from the enumerator are the initial sequence. - // * the prefix contains only as many elements as the longest enumeration so far. - let prefix = System.Collections.Generic.List<_>() - let enumeratorR = ref None : IEnumerator<'T> option option ref // nested options rather than new type... - // None = Unstarted. - // Some(Some e) = Started. - // Some None = Finished. - let oneStepTo i = - // If possible, step the enumeration to prefix length i (at most one step). - // Be speculative, since this could have already happened via another thread. - lock enumeratorR (fun () -> - if not (i < prefix.Count) then // is a step still required? - // If not yet started, start it (create enumerator). - if !enumeratorR = None then enumeratorR := Some (Some (seq.GetEnumerator())) - match (!enumeratorR).Value with - | Some enumerator -> if enumerator.MoveNext() then - prefix.Add(enumerator.Current) - else - enumerator.Dispose() // Move failed, dispose enumerator, - enumeratorR := Some None // drop it and record finished. - | None -> ()) - let result = - unfold (fun i -> // i being the next position to be returned - if i < prefix.Count then - Some (prefix.[i],i+1) - else - oneStepTo i - if i < prefix.Count then - Some (prefix.[i],i+1) - else - None) 0 - let cleanup() = - lock enumeratorR (fun () -> - prefix.Clear() - begin match !enumeratorR with - | Some (Some e) -> IEnumerator.dispose e; - | _ -> () - end; - enumeratorR := None) - (new CachedSeq<_>(cleanup, result) :> seq<_>) - - [] - let readonly (s:seq<_>) = mkSeq (fun () -> s.GetEnumerator()) - - [] - let groupBy keyf seq = - - mkDelayedSeq (fun () -> - // Wrap a Some(_) aroud all keys in case the key type is itself a type using null as a representation - let dict = new Dictionary<'key option,System.Collections.Generic.List<'T>>(HashIdentity.Structural) - - // Build the groupings - seq |> iter (fun v -> - let key = Some (keyf v) - let ok,prev = dict.TryGetValue(key) - if ok then prev.Add(v) - else let prev = new List<'T>(1) - dict.[key] <- prev - prev.Add(v)) - - // Trim the size of each result group. - dict |> iter (fun group -> group.Value.TrimExcess()) - - // Return the sequence-of-sequences. Don't reveal the - // internal collections: just reveal them as sequences - dict |> map (fun group -> (group.Key.Value, readonly group.Value))) - - - [] - let distinct seq = - { // Wrap a Some(_) aroud all keys in case the key type is itself a type using null as a representation - let dict = new Dictionary<'key option,obj>(HashIdentity.Structural) - for v in seq do - let key = Some v - if not (dict.ContainsKey(key)) then - dict.[key] <- null; - yield v } - - [] - let distinctBy f seq = - { // Wrap a Some(_) aroud all keys in case the key type is itself a type using null as a representation - let dict = new Dictionary<'key option,obj>(HashIdentity.Structural) - for v in seq do - let key = Some (f v) - if not (dict.ContainsKey(key)) then - dict.[key] <- null; - yield v } - - [] - let sortBy keyf seq = - let comparer = ComparisonIdentity.Structural - mkDelayedSeq (fun () -> - (seq |> to_list |> List.sortWith (fun x y -> comparer.Compare(keyf x,keyf y)) |> to_array) :> seq<_>) - - [] - let sort seq = - mkDelayedSeq (fun () -> - (seq |> to_list |> List.sortWith Operators.compare |> to_array) :> seq<_>) - - [] - let countBy keyf seq = - mkDelayedSeq (fun () -> - let dict = new Dictionary<'key option,int>(HashIdentity.Structural) - - // Build the groupings - seq |> iter (fun v -> - let key = Some (keyf v ) - let ok,prev = dict.TryGetValue(key) - if ok then dict.[key] <- dict.[key] + 1 - else dict.[key] <- 1) - - dict |> map (fun group -> (group.Key.Value, group.Value))) - - [] - let inline sum (seq: seq< (^a) >) : ^a = - use e = seq.GetEnumerator() - let mutable acc = LanguagePrimitives.GenericZero< (^a) > - while e.MoveNext() do - acc <- Checked.(+) acc e.Current - acc - - [] - let inline sumBy (f : 'T -> ^U) (seq: seq<'T>) : ^U = - use e = seq.GetEnumerator() - let mutable acc = LanguagePrimitives.GenericZero< (^U) > - while e.MoveNext() do - acc <- Checked.(+) acc (f e.Current) - acc - - [] - let inline average (sequence: seq< (^a) >) : ^a = - use e = sequence.GetEnumerator() - let mutable acc = LanguagePrimitives.GenericZero< (^a) > - let mutable count = 0 - while e.MoveNext() do - acc <- Checked.(+) acc e.Current - count <- count + 1 - if count = 0 then - invalidArg "sequence" "the input sequence is empty"; - LanguagePrimitives.DivideByInt< (^a) > acc count - - [] - let inline averageBy (f : 'T -> ^U) (sequence: seq< 'T >) : ^U = - use e = sequence.GetEnumerator() - let mutable acc = LanguagePrimitives.GenericZero< (^U) > - let mutable count = 0 - while e.MoveNext() do - acc <- Checked.(+) acc (f e.Current) - count <- count + 1 - if count = 0 then - invalidArg "sequence" "the input sequence is empty"; - LanguagePrimitives.DivideByInt< (^U) > acc count - - [] - let min (sequence: seq<_>) = - use e = sequence.GetEnumerator() - if not (e.MoveNext()) then - invalidArg "sequence" "the input sequence is empty"; - let mutable acc = e.Current - while e.MoveNext() do - acc <- Operators.min acc e.Current - acc - - [] - let minBy (f : 'T -> 'U) (sequence: seq<'T>) : 'T = - use e = sequence.GetEnumerator() - if not (e.MoveNext()) then - invalidArg "sequence" "the input sequence is empty"; - let mutable acc = f e.Current - let mutable acc_v = e.Current - while e.MoveNext() do - let cur = f e.Current - if cur < acc then - acc <- cur - acc_v <- e.Current - acc_v - - [] - let max (sequence: seq<_>) = - use e = sequence.GetEnumerator() - if not (e.MoveNext()) then - invalidArg "sequence" "the input sequence is empty"; - let mutable acc = e.Current - while e.MoveNext() do - acc <- Operators.max acc e.Current - acc - - [] - let maxBy (f : 'T -> 'U) (sequence: seq<'T>) : 'T = - use e = sequence.GetEnumerator() - if not (e.MoveNext()) then - invalidArg "sequence" "the input sequence is empty"; - let mutable acc = f e.Current - let mutable acc_v = e.Current - while e.MoveNext() do - let cur = f e.Current - if cur > acc then - acc <- cur - acc_v <- e.Current - acc_v - - [] - let group_by keyf seq = groupBy keyf seq - [] - let distinct_by f seq = distinctBy f seq - [] - let sort_by keyf seq = sortBy keyf seq - [] - let count_by keyf seq = countBy keyf seq - [] - let inline sum_by (f : 'T -> ^U) (seq: seq<'T>) : ^U = sumBy f seq - [] - let inline average_by (f : 'T -> ^U) (sequence: seq< 'T >) : ^U = averageBy f sequence - [] - let min_by (f : 'T -> 'U) (sequence: seq<'T>) : 'T = minBy f sequence - [] - let max_by (f : 'T -> 'U) (sequence: seq<'T>) : 'T = maxBy f sequence - - [] - let takeWhile p (sequence: seq<_>) = - { use e = sequence.GetEnumerator() - let latest = ref (Unchecked.defaultof<_>) - while e.MoveNext() && (latest := e.Current; p !latest) do - yield !latest } - - [] - let skip count (sequence: seq<_>) = - { use e = sequence.GetEnumerator() - let latest = ref (Unchecked.defaultof<_>) - let ok = ref false - for i in 1 .. count do - if not (e.MoveNext()) then - raise <| System.InvalidOperationException "the input sequence had insufficient elements" - while e.MoveNext() do - yield e.Current } - - [] - let skipWhile p (sequence: seq<_>) = - { use e = sequence.GetEnumerator() - let latest = ref (Unchecked.defaultof<_>) - let ok = ref false - while e.MoveNext() do - if (latest := e.Current; (!ok || not (p !latest))) then - ok := true - yield !latest } - - [] - let skip_while p sequence = skipWhile p sequence - - [] - let take_while p sequence = takeWhile p sequence - - [] - let forall2 p (sequence1: seq<_>) (sequence2: seq<_>) = - use e1 = sequence1.GetEnumerator() - use e2 = sequence2.GetEnumerator() - let mutable ok = true - while (ok && e1.MoveNext() && e2.MoveNext()) do - ok <- p e1.Current e2.Current; - ok - - [] - let for_all2 p sequence1 sequence2 = forall2 p sequence1 sequence2 - - [] - let exists2 p (sequence1: seq<_>) (sequence2: seq<_>) = - use e1 = sequence1.GetEnumerator() - use e2 = sequence2.GetEnumerator() - let mutable ok = false - while (not ok && e1.MoveNext() && e2.MoveNext()) do - ok <- p e1.Current e2.Current; - ok - - [] - let hd (sequence : seq<_>) = - use e = sequence.GetEnumerator() - if (e.MoveNext()) then e.Current - else invalidArg "sequence" "the input sequence was empty" - - - [] - let find_indexi p s = s |> find (fun (x,y) -> p x y) |> fst - - [] - let tryfind_indexi p s = s |> tryFind (fun (x,y) -> p x y) |> Option.map fst diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/seq.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/seq.fsi deleted file mode 100644 index 4514d85a..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/seq.fsi +++ /dev/null @@ -1,509 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - - /// Basic operations on IEnumerables. - [] - [] - module Seq = - - /// Wrap the two given enumeration-of-enumerations as a single concatenated - /// enumeration. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val append: sequence1:seq<'T> -> sequence2:seq<'T> -> seq<'T> - - /// Return the average of the elements in the sequence - /// - /// The elements are averaged using the '+' operator, 'DivideByInt' method and 'Zero' property - /// associated with the element type. - val inline average : sequence:seq<(^T)> -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member DivideByInt : ^T * int -> ^T) - and ^T : (static member Zero : ^T) - - /// Return the average of the results generated by applying the function to each element of the sequence. - /// - /// The elements are averaged using the '+' operator, 'DivideByInt' method and 'Zero' property - /// associated with the generated type. - val inline averageBy : projection:('T -> ^U) -> sequence:seq<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U * int -> ^U) - and ^U : (static member Zero : ^U) - - /// Return a sequence that corresponds to a cached version of the input sequence. - /// This result sequence will have the same elements as the input sequence. The result - /// can be enumerated multiple times. The input sequence will be enumerated at most - /// once and only as far as is necessary. - /// - /// Enumeration of the result sequence is thread safe in the sense that multiple independent IEnumerator - /// values may be used simultaneously from different threads (accesses to - /// the internal lookaside table are thread safe). Each individual IEnumerator - /// is not typically thread safe and should not be accessed concurrently. - /// - /// Note, once enumeration of the input sequence has started, - /// it's enumerator will be kept live by this object until the enumeration has completed. - /// At that point, the enumerator will be disposed. - /// - /// The enumerator may be disposed and underlying cache storage released by - /// converting the returned sequence object to type IDisposable, and calling the Dispose method - /// on this object. The sequence object may then be re-enumerated and a fresh enumerator will - /// be used. - val cache: sequence:seq<'T> -> seq<'T> - - /// Wrap a loosely-typed System.Collections sequence as a typed sequence. - /// - /// The use of this function usually requires a type annotation. - /// An incorrect type annotation may result in runtime type - /// errors. - /// - /// Individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val cast: sequence:IEnumerable -> seq<'T> - - /// Apply the given function to each element of the list. Return - /// the list comprised of the results "x" for each element where - /// the function returns Some(x) - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - /// - /// Remember sequence is lazy, effects are delayed until it is enumerated. - val choose: chooser:('T -> 'U option) -> sequence:seq<'T> -> seq<'U> - - /// For each element of the enumeration apply the given function and concatenate all the results. - /// - /// Remember sequence is lazy, effects are delayed until it is enumerated. - val collect: mapping:('T -> #seq<'U>) -> sequence:seq<'T> -> seq<'U> - - /// Compare two sequence's using generic comparison, element by element. - val compare: comparer:('T -> 'T -> int) -> sequence1:seq<'T> -> sequence2:seq<'T> -> int - - /// Compare two sequence's using the given comparison function, element by element. - val compareWith: comparer:('T -> 'T -> int) -> sequence1:seq<'T> -> sequence2:seq<'T> -> int - - /// Wrap the given enumeration-of-enumerations as a single concatenated - /// enumeration. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val concat: sequences:seq<#seq<'T>> -> seq<'T> - - - /// Apply a key-generating function to each element of a sequence and return a sequence yielding unique - /// keys and their number of occurences in the original sequence. - /// - /// Note that this function returns a sequence that digests the whole initial sequence as soon as - /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. - val countBy : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'Key * int> - - /// Return a sequence that is built from the given delayed specification of an - /// Seq. The input function is evaluated each time an IEnumerator for the sequence - /// is requested. - val delay : generator:(unit -> seq<'T>) -> seq<'T> - - /// Return a sequence that contains no duplicate entries according to generic hash and equality comparisons on the entries. - /// If an element occurs multiple times in the sequence then the later occurrences are discarded. - val distinct: sequence:seq<'T> -> seq<'T> - - /// Return a sequence that contains no duplicate entries according to the - /// generic hash and equality comparisons on the keys returned by the given key-generating function. - /// If an element occurs multiple times in the sequence then the later occurrences are discarded. - val distinctBy: projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'T> - - /// Create an empty sequence - [] - val empty<'T> : seq<'T> - - /// Test if any element of the sequence satisfies the given predicate. - /// - /// The predicate is applied to the elements of the input sequence. If any application - /// returns true then the overall result is true and no further elements are tested. - /// Otherwise, false is returned. - val exists: predicate:('T -> bool) -> sequence:seq<'T> -> bool - - /// Test if any pair of corresponding elements of the input sequences satisfies the given predicate. - /// - /// The predicate is applied to matching elements in the two sequences up to the lesser of the - /// two lengths of the collections. If any application returns true then the overall result is - /// true and no further elements are tested. Otherwise, false is returned. If one sequence is shorter than - /// the other then the remaining elements of the longer sequence are ignored. - val exists2: predicate:('T1 -> 'T2 -> bool) -> sequence1:seq<'T1> -> sequence2:seq<'T2> -> bool - - /// Return a new collection containing only the elements of the collection - /// for which the given predicate returns "true" - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - /// - /// Remember sequence is lazy, effects are delayed until it is enumerated. - val filter: predicate:('T -> bool) -> sequence:seq<'T> -> seq<'T> - - /// Return the first element for which the given function returns true. - /// Raise KeyNotFoundException if no such element exists. - val find: predicate:('T -> bool) -> sequence:seq<'T> -> 'T - - /// Return the index of the first element in the sequence of pairs - /// that satisfies the given predicate. Raise KeyNotFoundException if no such element exists. - val findIndex: predicate:('T -> bool) -> sequence:seq<'T> -> int - - /// Apply 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 -> sequence:seq<'T> -> 'State - - /// Test if all elements of the sequence satisfy the given predicate. - /// - /// The predicate is applied to the elements of the input sequence. If any application - /// returns false then the overall result is false and no further elements are tested. - /// Otherwise, true is returned. - val forall: predicate:('T -> bool) -> sequence:seq<'T> -> bool - - /// Test the all pairs of elements drawn from the two sequences satisfies the - /// given predicate. If one sequence is shorter than - /// the other then the remaining elements of the longer sequence are ignored - val forall2: predicate:('T1 -> 'T2 -> bool) -> sequence1:seq<'T1> -> sequence2:seq<'T2> -> bool - - /// Apply a key-generating function to each element of a sequence and yields a sequence of - /// unique keys. Each unique key has also contains a sequence of all elements that match - /// to this key. - /// - /// Note that this function returns a sequence that digests the whole initial sequence as soon as - /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. - val groupBy : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'Key * seq<'T>> - - /// Return the first element of the sequence. - val hd: sequence:seq<'T> -> 'T - - /// Return true if the sequence contains no elements, false otherwise - val isEmpty: sequence:seq<'T> -> bool - - /// Generate a new sequence which, when iterated, will return successive - /// elements by calling the given function, up to the given count. The results of calling the function - /// will not be saved, i.e. the function will be reapplied as necessary to - /// regenerate the elements. The function is passed the index of the item being - /// generated. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val init: count:int -> initializer:(int -> 'T) -> seq<'T> - - /// Generate a new sequence which, when iterated, will return successive - /// elements by calling the given function. The results of calling the function - /// will not be saved, i.e. the function will be reapplied as necessary to - /// regenerate the elements. The function is passed the index of the item being - /// generated - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val initInfinite: initializer:(int -> 'T) -> seq<'T> - - /// Apply the given function to each element of the collection. - val iter: action:('T -> unit) -> sequence:seq<'T> -> unit - - /// Apply the given function to each element of the collection. The integer passed to the - /// function indicates the index of element. - val iteri: action:(int -> 'T -> unit) -> sequence:seq<'T> -> unit - - /// Apply the given function to two collections simultaneously. If one sequence is shorter than - /// the other then the remaining elements of the longer sequence are ignored. - val iter2: action:('T1 -> 'T2 -> unit) -> sequence1:seq<'T1> -> sequence2:seq<'T2> -> unit - - /// Return the length of the sequence - val length: sequence:seq<'T> -> int - - /// Build a new collection whose elements are the results of applying the given function - /// to each of the elements of the collection. The given function will be applied - /// as elements are demanded using the 'MoveNext' method on enumerators retrieved from the - /// object. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - val map : mapping:('T -> 'U) -> sequence:seq<'T> -> seq<'U> - - /// Build a new collection whose elements are the results of applying the given function - /// to the corresponding pairs of elements from the two sequences. If one input sequence is shorter than - /// the other then the remaining elements of the longer sequence are ignored. - val map2: mapping:('T1 -> 'T2 -> 'U) -> sequence1:seq<'T1> -> sequence2:seq<'T2> -> seq<'U> - - /// Build a new collection whose elements are the results of applying the given function - /// to each of the elements of the collection. The integer index passed to the - /// function indicates the index (from 0) of element being transformed. - val mapi: mapping:(int -> 'T -> 'U) -> sequence:seq<'T> -> seq<'U> - - /// Return the greatest of all elements of the sequence, compared via Operators.max - val max : sequence:seq<'T> -> 'T - - /// Return the greatest of all elements of the array, compared via Operators.max on the function result - val maxBy : projection:('T -> 'Key) -> sequence:seq<'T> -> 'T - - /// Return the lowest of all elements of the sequence, compared via Operators.min - val min : sequence:seq<'T> -> 'T - - /// Return the lowest of all elements of the array, compared via Operators.min on the function result - val minBy : projection:('T -> 'Key) -> sequence:seq<'T> -> 'T - - /// Compute the nth element in the collection. - val nth: index:int -> sequence:seq<'T> -> 'T - - /// Build a collection from the given array - val of_array: elements:'T array -> seq<'T> - - /// Build a collection from the given array - val of_list: elements:'T list -> seq<'T> - - /// Return a sequence of each element in the input sequence and its predecessor, with the - /// exception of the first element which is only returned as the predecessor of the second element. - val pairwise: sequence:seq<'T> -> seq<'T * 'T> - - /// Apply the given function to successive elements, returning the first - /// 'x' where the function returns "Some(x)". - val pick: chooser:('T -> 'U option) -> sequence:seq<'T> -> 'U - - /// Build a new sequence object that delegates to the given sequence object. This ensures - /// the original sequence can't be rediscovered and mutated by a type cast. For example, - /// if given an array the returned sequence will return the elements of the array, but - /// you can't cast the returned sequence object to an array. - val readonly : sequence:seq<'T> -> seq<'T> - - /// Apply a function to each element of the sequence, threading an accumulator argument - /// through the computation. Begin by applying the function to the first two elements. - /// Then feed this result into the function along with the third element and so on. - /// Return the final result. - /// Raises ArgumentException if the sequence has no elements. - val reduce: reduction:('T -> 'T -> 'T) -> sequence:seq<'T> -> 'T - - /// Like fold, but compute on-demand and return the sequence of intermediary and final results - val scan : folder:('State -> 'T -> 'State) -> state:'State -> sequence:seq<'T> -> seq<'State> - - /// Return a sequence that yields one item only. - val singleton: value:'T -> seq<'T> - - /// Return a sequence that skips N elements of the underlying sequence and then yields the - /// remaining elements of the sequence - val skip: count:int -> sequence:seq<'T> -> seq<'T> - - /// Return a sequence that, when iterated, skips elements of the underlying sequence while the - /// given predicate returns 'true', and then yields the remaining elements of the sequence - val skipWhile: predicate:('T -> bool) -> sequence:seq<'T> -> seq<'T> - - /// Yield a sequence ordered by keys. - /// - /// Note that this function returns a sequence that digests the whole initial sequence as soon as - /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. - val sort : sequence:seq<'T> -> seq<'T> - - /// Apply a key-generating function to each element of a sequence and yield a sequence ordered - /// by keys. The keys are compared using generic comparison as implemented by Operators.compare. - /// - /// Note that this function returns a sequence that digests the whole initial sequence as soon as - /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. - val sortBy : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'T> - - /// Return the sum of the elements in the sequence. - /// - /// The elements are summed using the '+' operator and 'Zero' property associated with the generated type. - val inline sum : sequence:seq<(^T)> -> ^T - when ^T : (static member ( + ) : ^T * ^T -> ^T) - and ^T : (static member Zero : ^T) - - /// Return the sum of the results generated by applying the function to each element of the sequence. - /// The generated elements are summed using the '+' operator and 'Zero' property associated with the generated type. - val inline sumBy : projection:('T -> ^U) -> sequence:seq<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - /// Return the first N elements of the sequence. - val take: count:int -> sequence:seq<'T> -> seq<'T> - - /// Return a sequence that, when iterated, yields elements of the underlying sequence while the - /// given predicate returns 'true', and returns no further elements - val takeWhile: predicate:('T -> bool) -> sequence:seq<'T> -> seq<'T> - - /// Build an array from the given collection - val to_array: sequence:seq<'T> -> 'T array - - /// Build a list from the given collection - val to_list: sequence:seq<'T> -> 'T list - - /// Return the first element for which the given function returns true. - /// Return None if no such element exists. - val tryFind: predicate:('T -> bool) -> sequence:seq<'T> -> 'T option - - /// Return the index of the first element in the sequence - /// that satisfies the given predicate. Return 'None' if no such element exists. - val tryFindIndex : predicate:('T -> bool) -> sequence:seq<'T> -> int option - - /// Apply the given function to successive elements, returning the first - /// result where the function returns "Some(x)". - val tryPick: chooser:('T -> 'U option) -> sequence:seq<'T> -> 'U option - - /// Return a sequence that when enumerated returns at most N elements. - val truncate: count:int -> sequence:seq<'T> -> seq<'T> - - /// Return a sequence that contains the elements generated by the given computation. - /// The given initial 'state' argument is passed to the element generator. - /// For each IEnumerator elements in the stream are generated on-demand by applying the element - /// generator, until a None value is returned by the element generator. Each call to the element - /// generator returns a new residual 'state'. - /// - /// Note the stream will be recomputed each time an IEnumerator is requested and iterated for the Seq. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. - - val unfold : generator:('State -> ('T * 'State) option) -> state:'State -> seq<'T> - - /// Return a sequence that yields 'sliding windows' of containing elements drawn from the input - /// sequence. Each window is returned as a fresh array. - val windowed: windowSize:int -> sequence:seq<'T> -> seq<'T[]> - - /// Combine the two sequences into a list of pairs. The two sequences need not have equal lengths: - /// when one sequence is exhausted any remaining elements in the other - /// sequence are ignored. - val zip: sequence1:seq<'T1> -> sequence2:seq<'T2> -> seq<'T1 * 'T2> - - /// Combine the three sequences into a list of triples. The two sequences need not have equal lengths: - /// when one sequence is exhausted any remaining elements in the other - /// sequence are ignored. - val zip3: sequence1:seq<'T1> -> sequence2:seq<'T2> -> sequence3:seq<'T3> -> seq<'T1 * 'T2 * 'T3> - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val group_by : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'Key * seq<'T>> - - [] - val is_empty: sequence:seq<'T> -> bool - - [] - val first: chooser:('T -> 'U option) -> sequence:seq<'T> -> 'U option - - [] - val for_all: predicate:('T -> bool) -> sequence:seq<'T> -> bool - - [] - val for_all2: predicate:('T1 -> 'T2 -> bool) -> sequence1:seq<'T1> -> sequence2:seq<'T2> -> bool - - - [] - val find_index: predicate:('T -> bool) -> sequence:seq<'Key * 'T> -> 'Key - - [] - val find_indexi: predicate:('Key -> 'T -> bool) -> sequence:seq<'Key * 'T> -> 'Key - - [] - val tryfind: predicate:('T -> bool) -> sequence:seq<'T> -> 'T option - - [] - val tryfind_index : predicate:('T -> bool) -> sequence:seq<'Key * 'T> -> 'Key option - - [] - val tryfind_indexi : predicate:('Key -> 'T -> bool) -> sequence:seq<'Key * 'T> -> 'Key option - - [] - val map_concat: mapping:('T -> #seq<'U>) -> sequence:seq<'T> -> seq<'U> - - [] - val init_finite: count:int -> initializer:(int -> 'T) -> seq<'T> - - [] - val init_infinite: initializer:(int -> 'T) -> seq<'T> - - [] - val take_while: predicate:('T -> bool) -> sequence:seq<'T> -> seq<'T> - - [] - val skip_while: predicate:('T -> bool) -> sequence:seq<'T> -> seq<'T> - - [] - val distinct_by : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'T> - - [] - val count_by : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'Key * int> - - [] - val sort_by : projection:('T -> 'Key) -> sequence:seq<'T> -> seq<'T> - - - [] - val inline sum_by : projection:('T -> ^U) -> sequence:seq<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member Zero : ^U) - - [] - val inline average_by : projection:('T -> ^U) -> sequence:seq<'T> -> ^U - when ^U : (static member ( + ) : ^U * ^U -> ^U) - and ^U : (static member DivideByInt : ^U * int -> ^U) - and ^U : (static member Zero : ^U) - - [] - val min_by : projection:('T -> 'Key) -> sequence:seq<'T> -> 'T - - [] - val max_by : projection:('T -> 'Key) -> sequence:seq<'T> -> 'T -#endif - - [] - /// A group of functions used as part of the compiled representation of F# sequence expressions - module SequenceExpressionHelpers = - - /// The F# compiler emits calls to this function to - /// implement the 'while' operator for F# sequence expressions - val EnumerateWhile : guard:(unit -> bool) -> sequence:seq<'T> -> seq<'T> - - /// The F# compiler emits calls to this function to - /// implement the 'try/finally' operator for F# sequence expressions - val EnumerateThenFinally : sequence:seq<'T> -> compensation:(unit -> unit) -> seq<'T> - - /// The F# compiler emits calls to this function to implement the compiler-intrinsic - /// conversions from untyped System.Collections.IEnumerable sequences to typed sequences - val EnumerateFromFunctions: create:(unit -> 'T) -> moveNext:('T -> bool) -> current:('T -> 'U) -> seq<'U> - - /// The F# compiler emits calls to this function to implement the 'use' operator for F# sequence expressions - val EnumerateUsing : resource:'T -> sequence:('T -> #seq<'U>) -> seq<'U> when 'T :> IDisposable - - [] - /// The F# compiler emits implementations of this type for compiled sequence expressions - type GeneratedSequenceBase<'T> = - /// The F# compiler emits implementations of this method for compiled sequence expressions - new : unit -> GeneratedSequenceBase<'T> - /// The F# compiler emits implementations of this method for compiled sequence expressions - abstract GetFreshEnumerator : unit -> IEnumerator<'T> - /// The F# compiler emits implementations of this method for compiled sequence expressions - abstract GenerateNext : next:byref> -> int - /// The F# compiler emits implementations of this method for compiled sequence expressions - abstract Close: unit -> unit - /// The F# compiler emits implementations of this method for compiled sequence expressions - abstract CheckClose: bool - /// The F# compiler emits implementations of this method for compiled sequence expressions - abstract LastGenerated : 'T - interface IEnumerable<'T> - interface IEnumerable - interface IEnumerator<'T> - interface IEnumerator - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/set.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/set.fs deleted file mode 100644 index c263520c..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/set.fs +++ /dev/null @@ -1,818 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open System.Collections - open System.Collections.Generic - open System.Diagnostics - - (* A classic functional language implementation of binary trees *) - - [] - type (* internal *) SetTree<'T> = - | SetEmpty // height = 0 - | SetNode of 'T * SetTree<'T> * SetTree<'T> * int // height = int - | SetOne of 'T // height = 1 - // OPTIMIZATION: store SetNode(k,SetEmpty,SetEmpty,1) ---> SetOne(k) - // REVIEW: performance rumour has it that the data held in SetNode and SetOne should be - // exactly one cache line on typical architectures. They are currently - // ~6 and 3 words respectively. - - [] - module internal SetTree = - - let height t = - match t with - | SetEmpty -> 0 - | SetOne _ -> 1 - | SetNode (_,_,_,h) -> h - - #if CHECKED - let rec checkInvariant t = - // A good sanity check, loss of balance can hit perf - match t with - | SetEmpty -> true - | SetOne _ -> true - | SetNode (k,t1,t2,h) -> - let h1 = height t1 - let h2 = height t2 - (-2 <= (h1 - h2) && (h1 - h2) <= 2) && checkInvariant t1 && checkInvariant t2 - #endif - - let tolerance = 2 - - let mk l k r = - match l,r with - | SetEmpty,SetEmpty -> SetOne (k) - | _ -> - let hl = height l - let hr = height r - let m = if hl < hr then hr else hl - SetNode(k,l,r,m+1) - - let rebalance t1 k t2 = - let t1h = height t1 - let t2h = height t2 - if t2h > t1h + tolerance then // right is heavier than left - match t2 with - | SetNode(t2k,t2l,t2r,t2h) -> - // one of the nodes must have height > height t1 + 1 - if height t2l > t1h + 1 then // balance left: combination - match t2l with - | SetNode(t2lk,t2ll,t2lr,t2lh) -> - mk (mk t1 k t2ll) t2lk (mk t2lr t2k t2r) - | _ -> failwith "rebalance" - else // rotate left - mk (mk t1 k t2l) t2k t2r - | _ -> failwith "rebalance" - else - if t1h > t2h + tolerance then // left is heavier than right - match t1 with - | SetNode(t1k,t1l,t1r,t1h) -> - // one of the nodes must have height > height t2 + 1 - if height t1r > t2h + 1 then - // balance right: combination - match t1r with - | SetNode(t1rk,t1rl,t1rr,t1rh) -> - mk (mk t1l t1k t1rl) t1rk (mk t1rr k t2) - | _ -> failwith "rebalance" - else - mk t1l t1k (mk t1r k t2) - | _ -> failwith "rebalance" - else mk t1 k t2 - - let rec add (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) k t = - match t with - | SetNode (k2,l,r,h) -> - let c = comparer.Invoke(k,k2) - if c < 0 then rebalance (add comparer k l) k2 r - elif c = 0 then t - else rebalance l k2 (add comparer k r) - | SetOne(k2) -> - // nb. no check for rebalance needed for small trees, also be sure to reuse node already allocated - let c = comparer.Invoke(k,k2) - if c < 0 then SetNode (k,SetEmpty,t,2) - elif c = 0 then t - else SetNode (k,t,SetEmpty,2) - | SetEmpty -> SetOne(k) - - let rec balance comparer t1 k t2 = - // Given t1 < k < t2 where t1 and t2 are "balanced", - // return a balanced tree for . - // Recall: balance means subtrees heights differ by at most "tolerance" - match t1,t2 with - | SetEmpty,t2 -> add comparer k t2 // drop t1 = empty - | t1,SetEmpty -> add comparer k t1 // drop t2 = empty - | SetOne k1,t2 -> add comparer k (add comparer k1 t2) - | t1,SetOne k2 -> add comparer k (add comparer k2 t1) - | SetNode(k1,t11,t12,h1),SetNode(k2,t21,t22,h2) -> - // Have: (t11 < k1 < t12) < k < (t21 < k2 < t22) - // Either (a) h1,h2 differ by at most 2 - no rebalance needed. - // (b) h1 too small, i.e. h1+2 < h2 - // (c) h2 too small, i.e. h2+2 < h1 - if h1+tolerance < h2 then - // case: b, h1 too small - // push t1 into low side of t2, may increase height by 1 so rebalance - rebalance (balance comparer t1 k t21) k2 t22 - elif h2+tolerance < h1 then - // case: c, h2 too small - // push t2 into high side of t1, may increase height by 1 so rebalance - rebalance t11 k1 (balance comparer t12 k t2) - else - // case: a, h1 and h2 meet balance requirement - mk t1 k t2 - - let rec split (comparer : OptimizedClosures.FastFunc2<'T,'T,int>) pivot t = - // Given a pivot and a set t - // Return { x in t s.t. x < pivot }, pivot in t? , { x in t s.t. x > pivot } - match t with - | SetNode(k1,t11,t12,h1) -> - let c = comparer.Invoke(pivot,k1) - if c < 0 then // pivot t1 - let t11_lo,havePivot,t11_hi = split comparer pivot t11 - t11_lo,havePivot,balance comparer t11_hi k1 t12 - elif c = 0 then // pivot is k1 - t11,true,t12 - else // pivot t2 - let t12_lo,havePivot,t12_hi = split comparer pivot t12 - balance comparer t11 k1 t12_lo,havePivot,t12_hi - | SetOne k1 -> - let c = comparer.Invoke(k1,pivot) - if c < 0 then t ,false,SetEmpty // singleton under pivot - elif c = 0 then SetEmpty,true ,SetEmpty // singleton is pivot - else SetEmpty,false,t // singleton over pivot - | SetEmpty -> - SetEmpty,false,SetEmpty - - let rec spliceOutSuccessor t = - match t with - | SetEmpty -> failwith "internal error: Map.splice_out_succ_or_pred" - | SetOne (k2) -> k2,SetEmpty - | SetNode (k2,l,r,_) -> - match l with - | SetEmpty -> k2,r - | _ -> let k3,l' = spliceOutSuccessor l in k3,mk l' k2 r - - let rec remove (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) k t = - match t with - | SetEmpty -> t - | SetOne (k2) -> - let c = comparer.Invoke(k,k2) - if c = 0 then SetEmpty - else t - | SetNode (k2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then rebalance (remove comparer k l) k2 r - elif c = 0 then - match l,r with - | SetEmpty,_ -> r - | _,SetEmpty -> l - | _ -> - let sk,r' = spliceOutSuccessor r - mk l sk r' - else rebalance l k2 (remove comparer k r) - - let rec mem (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) k t = - match t with - | SetNode(k2,l,r,_) -> - let c = comparer.Invoke(k,k2) - if c < 0 then mem comparer k l - elif c = 0 then true - else mem comparer k r - | SetOne(k2) -> (comparer.Invoke(k,k2) = 0) - | SetEmpty -> false - - let rec iter f t = - match t with - | SetNode(k2,l,r,_) -> iter f l; f k2; iter f r - | SetOne(k2) -> f k2 - | SetEmpty -> () - - let rec fold_right f m x = - match m with - | SetNode(k,l,r,h) -> fold_right f l (f k (fold_right f r x)) - | SetOne(k) -> f k x - | SetEmpty -> x - - let rec fold_left f x m = - match m with - | SetNode(k,l,r,h) -> - let x = fold_left f x l in - let x = f x k - fold_left f x r - | SetOne(k) -> f x k - | SetEmpty -> x - - let rec for_all f m = - match m with - | SetNode(k2,l,r,h) -> f k2 && for_all f l && for_all f r - | SetOne(k2) -> f k2 - | SetEmpty -> true - - let rec exists f m = - match m with - | SetNode(k2,l,r,h) -> f k2 || exists f l || exists f r - | SetOne(k2) -> f k2 - | SetEmpty -> false - - let is_empty m = match m with | SetEmpty -> true | _ -> false - - let subset comparer a b = for_all (fun x -> mem comparer x b) a - - let rec filterAux comparer f s acc = - match s with - | SetNode(k,l,r,_) -> - let acc = if f k then add comparer k acc else acc - filterAux comparer f l (filterAux comparer f r acc) - | SetOne(k) -> if f k then add comparer k acc else acc - | SetEmpty -> acc - - let filter comparer f s = filterAux comparer f s SetEmpty - - let rec diffAux comparer m acc = - match m with - | SetNode(k,l,r,_) -> diffAux comparer l (diffAux comparer r (remove comparer k acc)) - | SetOne(k) -> remove comparer k acc - | SetEmpty -> acc - - let diff comparer a b = diffAux comparer b a - - let rec countAux s acc = - match s with - | SetNode(k,l,r,_) -> countAux l (countAux r (acc+1)) - | SetOne(k) -> acc+1 - | SetEmpty -> acc - - let count s = countAux s 0 - - let rec union comparer t1 t2 = - // Perf: tried bruteForce for low heights, but nothing significant - match t1,t2 with - | SetNode(k1,t11,t12,h1),SetNode(k2,t21,t22,h2) -> // (t11 < k < t12) AND (t21 < k2 < t22) - // Divide and Quonquer: - // Suppose t1 is largest. - // Split t2 using pivot k1 into lo and hi. - // Union disjoint subproblems and then combine. - if h1 > h2 then - let lo,_,hi = split comparer k1 t2 in - balance comparer (union comparer t11 lo) k1 (union comparer t12 hi) - else - let lo,_,hi = split comparer k2 t1 in - balance comparer (union comparer t21 lo) k2 (union comparer t22 hi) - | SetEmpty,t -> t - | t,SetEmpty -> t - | SetOne k1,t2 -> add comparer k1 t2 - | t1,SetOne k2 -> add comparer k2 t1 - - let rec intersectionAux comparer b m acc = - match m with - | SetNode(k,l,r,_) -> - let acc = intersectionAux comparer b r acc - let acc = if mem comparer k b then add comparer k acc else acc - intersectionAux comparer b l acc - | SetOne(k) -> - if mem comparer k b then add comparer k acc else acc - | SetEmpty -> acc - - let intersection comparer a b = intersectionAux comparer b a SetEmpty - - let partition1 comparer f k (acc1,acc2) = if f k then (add comparer k acc1,acc2) else (acc1,add comparer k acc2) - - let rec partitionAux comparer f s acc = - match s with - | SetNode(k,l,r,_) -> - let acc = partitionAux comparer f r acc - let acc = partition1 comparer f k acc - partitionAux comparer f l acc - | SetOne(k) -> partition1 comparer f k acc - | SetEmpty -> acc - - let partition comparer f s = partitionAux comparer f s (SetEmpty,SetEmpty) - - // It's easier to get many less-important algorithms right using this active pattern - let (|MatchSetNode|MatchSetEmpty|) s = - match s with - | SetNode(k2,l,r,_) -> MatchSetNode(k2,l,r) - | SetOne(k2) -> MatchSetNode(k2,SetEmpty,SetEmpty) - | SetEmpty -> MatchSetEmpty - - let rec nextElemCont (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) k s cont = - match s with - | MatchSetNode(k2,l,r) -> - let c = comparer.Invoke(k,k2) - if c < 0 then nextElemCont comparer k l (function None -> cont(Some(k2)) | res -> res) - elif c = 0 then cont(minimumElementOpt r) - else nextElemCont comparer k r cont - | MatchSetEmpty -> cont(None) - - and nextElem comparer k s = nextElemCont comparer k s (fun res -> res) - - and prevElemCont (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) k s cont = - match s with - | MatchSetNode(k2,l,r) -> - let c = comparer.Invoke(k,k2) - if c > 0 then prevElemCont comparer k r (function None -> cont(Some(k2)) | res -> res) - elif c = 0 then cont(maximumElementOpt r) - else prevElemCont comparer k l cont - | MatchSetEmpty -> cont(None) - - and prevElem comparer k s = prevElemCont comparer k s (fun res -> res) - - and minimumElementAux s n = - match s with - | SetNode(k,l,r,_) -> minimumElementAux l k - | SetOne(k) -> k - | SetEmpty -> n - - and minimumElementOpt s = - match s with - | SetNode(k,l,r,_) -> Some(minimumElementAux l k) - | SetOne(k) -> Some k - | SetEmpty -> None - - and maximumElementAux s n = - match s with - | SetNode(k,l,r,_) -> maximumElementAux r k - | SetOne(k) -> k - | SetEmpty -> n - - and maximumElementOpt s = - match s with - | SetNode(k,l,r,_) -> Some(maximumElementAux r k) - | SetOne(k) -> Some(k) - | SetEmpty -> None - - let minimumElement s = - match minimumElementOpt s with - | Some(k) -> k - | None -> failwith "minimumElement" - - let maximumElement s = - match maximumElementOpt s with - | Some(k) -> k - | None -> failwith "maximumElement" - - - //-------------------------------------------------------------------------- - // Imperative left-to-right iterators. - //-------------------------------------------------------------------------- - - [] - type iterator<'T> = - { mutable stack: SetTree<'T> list; // invariant: always collapseLHS result - mutable started : bool // true when MoveNext has been called - } - - // collapseLHS: - // a) Always returns either [] or a list starting with SetOne. - // b) The "fringe" of the set stack is unchanged. - let rec collapseLHS stack = - match stack with - | [] -> [] - | SetEmpty :: rest -> collapseLHS rest - | SetOne k :: rest -> stack - | SetNode(k,l,r,h) :: rest -> collapseLHS (l :: SetOne k :: r :: rest) - - let mkIterator s = { stack = collapseLHS [s]; started = false } - - let not_started() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext.")) - let already_finished() = raise (new System.InvalidOperationException("Enumeration already finished.")) - - let current i = - if i.started then - match i.stack with - | SetOne k :: _ -> k - | [] -> already_finished() - | _ -> failwith "Please report error: Set iterator, unexpected stack for current" - else - not_started() - - let rec moveNext i = - if i.started then - match i.stack with - | SetOne k :: rest -> ( i.stack <- collapseLHS rest; - i.stack <> [] - ) - | [] -> false - | _ -> failwith "Please report error: Set iterator, unexpected stack for moveNext" - else - i.started <- true; // The first call to MoveNext "starts" the enumeration. - i.stack <> [] - - let mkIEnumerator s = - let i = ref (mkIterator s) - { new IEnumerator<_> with - member x.Current = current !i - interface IEnumerator with - member x.Current = box (current !i) - member x.MoveNext() = moveNext !i - member x.Reset() = i := mkIterator s - interface System.IDisposable with - member x.Dispose() = () } - - //-------------------------------------------------------------------------- - // Set comparison. This can be expensive. - //-------------------------------------------------------------------------- - - let rec compareStacks (comparer: OptimizedClosures.FastFunc2<'T,'T,int>) l1 l2 = - match l1,l2 with - | [],[] -> 0 - | [],_ -> -1 - | _ ,[] -> 1 - | (SetEmpty _ :: t1),(SetEmpty :: t2) -> compareStacks comparer t1 t2 - | (SetOne(n1k) :: t1),(SetOne(n2k) :: t2) -> - let c = comparer.Invoke(n1k,n2k) - if c <> 0 then c else compareStacks comparer t1 t2 - | (SetOne(n1k) :: t1),(SetNode(n2k,SetEmpty,n2r,_) :: t2) -> - let c = comparer.Invoke(n1k,n2k) - if c <> 0 then c else compareStacks comparer (SetEmpty :: t1) (n2r :: t2) - | (SetNode(n1k,(SetEmpty as emp),n1r,_) :: t1),(SetOne(n2k) :: t2) -> - let c = comparer.Invoke(n1k,n2k) - if c <> 0 then c else compareStacks comparer (n1r :: t1) (emp :: t2) - | (SetNode(n1k,(SetEmpty as emp),n1r,_) :: t1),(SetNode(n2k,SetEmpty,n2r,_) :: t2) -> - let c = comparer.Invoke(n1k,n2k) - if c <> 0 then c else compareStacks comparer (n1r :: t1) (n2r :: t2) - | (SetOne(n1k) :: t1),_ -> - compareStacks comparer (SetEmpty :: SetOne(n1k) :: t1) l2 - | (SetNode(n1k,n1l,n1r,_) :: t1),_ -> - compareStacks comparer (n1l :: SetNode(n1k,SetEmpty,n1r,0) :: t1) l2 - | _,(SetOne(n2k) :: t2) -> - compareStacks comparer l1 (SetEmpty :: SetOne(n2k) :: t2) - | _,(SetNode(n2k,n2l,n2r,_) :: t2) -> - compareStacks comparer l1 (n2l :: SetNode(n2k,SetEmpty,n2r,0) :: t2) - - let compare comparer s1 s2 = - match s1,s2 with - | SetEmpty,SetEmpty -> 0 - | SetEmpty,_ -> -1 - | _,SetEmpty -> 1 - | _ -> compareStacks comparer [s1] [s2] - - let choose s = minimumElement s - - let to_list s = - let rec loop m acc = - match m with - | SetNode(k,l,r,h) -> loop l (k :: loop r acc) - | SetOne(k) -> k ::acc - | SetEmpty -> acc - loop s [] - - let copyToArray s (arr: _[]) i = - let j = ref i - iter (fun x -> arr.[!j] <- x; j := !j + 1) s - - let to_array s = - let n = (count s) - let res = Array.zeroCreate n - copyToArray s res 0; - res - - - - let rec mkFromEnumerator comparer acc (e : IEnumerator<_>) = - if e.MoveNext() then - mkFromEnumerator comparer (add comparer e.Current acc) e - else acc - - let of_seq comparer (c : IEnumerable<_>) = - use ie = c.GetEnumerator() - mkFromEnumerator comparer SetEmpty ie - - let of_array comparer l = Array.fold (fun acc k -> add comparer k acc) SetEmpty l - - - [] -#if FX_NO_DEBUG_PROXIES -#else - [>)>] -#endif -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - [] - [] - - type Set<'T>(comparer:OptimizedClosures.FastFunc2<'T,'T,int>, tree: SetTree<'T>) = - - // We use .NET generics per-instantiation static fields to avoid allocating a new object for each empty - // set (it is just be a lookup into a .NET table of type-instantiation-indexed static fields). - - static let empty : Set<'T> = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'T>() - new Set<'T>(comparer,SetEmpty) - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member internal set.Comparer = comparer - //[] - member internal set.Tree : SetTree<'T> = tree - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - static member Empty :Set<'T> = empty - - member s.Add(x) : Set<'T> = Set<'T>(s.Comparer,SetTree.add s.Comparer x s.Tree ) - member s.Remove(x) : Set<'T> = Set<'T>(s.Comparer,SetTree.remove s.Comparer x s.Tree) - member s.Count = SetTree.count s.Tree - member s.Contains(x) = SetTree.mem s.Comparer x s.Tree - member s.Iterate(x) = SetTree.iter x s.Tree - member s.Fold f z = SetTree.fold_left (fun x z -> f z x) z s.Tree - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member s.IsEmpty = SetTree.is_empty s.Tree - - member s.Partition f : Set<'T> * Set<'T> = - match s.Tree with - | SetEmpty -> s,s - | _ -> let t1,t2 = SetTree.partition s.Comparer f s.Tree in Set<_>(s.Comparer,t1), Set<_>(s.Comparer,t2) - - member s.Filter f : Set<'T> = - match s.Tree with - | SetEmpty -> s - | _ -> Set<_>(s.Comparer,SetTree.filter s.Comparer f s.Tree) - - member s.Map f : Set<'U> = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'U>() - Set<_>(comparer,SetTree.fold_left (fun acc k -> SetTree.add comparer (f k) acc) (SetTree<_>.SetEmpty) s.Tree) - - member s.Exists f = SetTree.exists f s.Tree - - member s.forall f = SetTree.for_all f s.Tree - - static member (-) (a: Set<'T>, b: Set<'T>) = Set<_>.Subtract(a,b) - - [] - static member (+) (a: Set<'T>, b: Set<'T>) = Set<_>.Union(a,b) - - static member Intersection(a: Set<'T>, b: Set<'T>) : Set<'T> = - match b.Tree with - | SetEmpty -> b (* A INTER 0 = 0 *) - | _ -> - match a.Tree with - | SetEmpty -> a (* 0 INTER B = 0 *) - | _ -> Set<_>(a.Comparer,SetTree.intersection a.Comparer a.Tree b.Tree) - - static member Union(a: Set<'T>, b: Set<'T>) : Set<'T> = - match b.Tree with - | SetEmpty -> a (* A U 0 = A *) - | _ -> - match a.Tree with - | SetEmpty -> b (* 0 U B = B *) - | _ -> Set<_>(a.Comparer,SetTree.union a.Comparer a.Tree b.Tree) - - static member Union(sets:seq>) : Set<'T> = - Seq.fold (fun s1 s2 -> Set<_>.Union(s1,s2)) Set<'T>.Empty sets - - static member Intersection(sets:seq>) : Set<'T> = - Seq.reduce (fun s1 s2 -> Set<_>.Intersection(s1,s2)) sets - - static member Subtract(a: Set<'T>, b: Set<'T>) : Set<'T> = - match a.Tree with - | SetEmpty -> a (* 0 - B = 0 *) - | _ -> - match b.Tree with - | SetEmpty -> a (* A - 0 = A *) - | _ -> Set<_>(a.Comparer,SetTree.diff a.Comparer a.Tree b.Tree) - - static member Equality(a: Set<'T>, b: Set<'T>) = (SetTree.compare a.Comparer a.Tree b.Tree = 0) - - static member Compare(a: Set<'T>, b: Set<'T>) = SetTree.compare a.Comparer a.Tree b.Tree - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.Choose = SetTree.choose x.Tree - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.MinimumElement = SetTree.minimumElement x.Tree - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.MaximumElement = SetTree.maximumElement x.Tree - member x.GetNextElement(e) = SetTree.nextElem x.Comparer e x.Tree - member x.GetPreviousElement(e) = SetTree.prevElem x.Comparer e x.Tree - - member x.IsSubsetOf(y: Set<'T>) = SetTree.subset x.Comparer x.Tree y.Tree - member x.IsSupersetOf(y: Set<'T>) = SetTree.subset x.Comparer y.Tree x.Tree - member x.ToList () = SetTree.to_list x.Tree - member x.ToArray () = SetTree.to_array x.Tree - - member this.ComputeHashCode() = - let combineHash x y = (x <<< 1) + y + 631 - let mutable res = 0 - for x in this do - res <- combineHash res (hash x) - abs res - - override this.GetHashCode() = this.ComputeHashCode() - - override this.Equals(that) = - match that with - | :? Set<'T> as that -> - ((this :> System.IComparable).CompareTo(that) = 0) - | _ -> false - - interface System.IComparable with - member this.CompareTo(that: obj) = SetTree.compare this.Comparer this.Tree ((that :?> Set<'T>).Tree) - - interface ICollection<'T> with - member s.Add(x) = raise (new System.NotSupportedException("ReadOnlyCollection")) - member s.Clear() = raise (new System.NotSupportedException("ReadOnlyCollection")) - member s.Remove(x) = raise (new System.NotSupportedException("ReadOnlyCollection")) - member s.Contains(x) = SetTree.mem s.Comparer x s.Tree - member s.CopyTo(arr,i) = SetTree.copyToArray s.Tree arr i - member s.get_IsReadOnly() = true - member s.get_Count() = SetTree.count s.Tree - - interface IEnumerable<'T> with - member s.GetEnumerator() = SetTree.mkIEnumerator s.Tree - - interface IEnumerable with - override s.GetEnumerator() = (SetTree.mkIEnumerator s.Tree :> IEnumerator) - - static member Singleton(x:'T) : Set<'T> = Set<'T>.Empty.Add(x) - - new (elements : seq<'T>) = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'T>() - Set<_>(comparer,SetTree.of_seq comparer elements) - - static member Create(elements : seq<'T>) = Set<'T>(elements) - - static member FromArray(arr : 'T array) : Set<'T> = - let comparer = ComparisonIdentity.GetFastStructuralComparisonFunction<'T>() - Set<_>(comparer,SetTree.of_array comparer arr) - - and - [] - SetDebugView<'T>(v: Set<'T>) = - -#if FX_NO_DEBUG_DISPLAYS -#else - [] -#endif - member x.Items = v |> Seq.truncate 1000 |> Seq.to_array - -namespace Microsoft.FSharp.Collections - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open System.Collections - open System.Collections.Generic - open System.Diagnostics - - [] - [] - module Set = - - [] - let isEmpty (s : Set<'T>) = s.IsEmpty - - [] - let is_empty (s : Set<'T>) = s.IsEmpty - - [] - let contains x (s : Set<'T>) = s.Contains(x) - - [] - let mem x (s : Set<'T>) = s.Contains(x) - - [] - let add x (s : Set<'T>) = s.Add(x) - - [] - let singleton x = Set<'T>.Singleton(x) - - [] - let remove x (s : Set<'T>) = s.Remove(x) - - [] - let union (s1 : Set<'T>) (s2 : Set<'T>) = Set<'T>.Union(s1,s2) - - [] - let unionMany sets = Set<_>.Union(sets) - - [] - let union_all sets = unionMany sets - - [] - let intersect (s1 : Set<'T>) (s2 : Set<'T>) = Set<'T>.Intersection(s1,s2) - - [] - let intersectMany sets = Set<_>.Intersection(sets) - - [] - let intersect_all sets = intersectMany sets - - [] - let iter f (s : Set<'T>) = s.Iterate(f) - - [] - let empty<'T> : Set<'T> = Set<'T>.Empty - - [] - let forall f (s : Set<'T>) = s.forall f - - [] - let for_all f (s : Set<'T>) = s.forall f - - [] - let exists f (s : Set<'T>) = s.Exists f - - [] - let filter f (s : Set<'T>) = s.Filter f - - [] - let partition f (s : Set<'T>) = s.Partition f - - [] - let fold f z (s : Set<'T>) = SetTree.fold_left f z s.Tree - - [] - let fold_left f z s = fold f z s - - [] - let foldBack f (s : Set<'T>) z = SetTree.fold_right f s.Tree z - - [] - let fold_right f s z = foldBack f s z - - [] - let map f (s : Set<'T>) = s.Map f - - [] - let count (s : Set<'T>) = s.Count - - [] - let minimumElement (s : Set<'T>) = s.MinimumElement - - [] - let maximumElement (s : Set<'T>) = s.MaximumElement - - [] - let choose (s : Set<'T>) = s.Choose - - [] - let of_list l = Set<_>(List.to_seq l) - - [] - let of_array (l : 'T array) = Set<'T>.FromArray(l) - - [] - let to_list (s : Set<'T>) = s.ToList() - - [] - let to_array (s : Set<'T>) = s.ToArray() - - [] - let to_seq (s : Set<'T>) = (s :> seq<'T>) - - [] - let of_seq (c : seq<_>) = Set<_>(c) - - - [] - let next_elt x (s : Set<'T>) = s.GetNextElement(x) - - [] - let prev_elt x (s : Set<'T>) = s.GetPreviousElement(x) - - [] - let min_elt (s : Set<'T>) = s.MinimumElement - - [] - let max_elt (s : Set<'T>) = s.MaximumElement - - [] - let size (s: Set<'T>) = s.Count - - [] - let compare (s1: Set<'T>) (s2: Set<'T>) = Set<_>.Compare(s1,s2) - - [] - let subset (s1: Set<'T>) (s2: Set<'T>) = s1.IsSubsetOf(s2) - - [] - let diff (s1: Set<'T>) (s2: Set<'T>) = s1 - s2 diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/set.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/set.fsi deleted file mode 100644 index 46475cbc..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/set.fsi +++ /dev/null @@ -1,245 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - /// Immutable sets based on binary trees, where comparison is the - /// F# structural comparison function, potentially using implementations - /// of the IComparable interface on key values. - /// - /// See the Set module for further operations on sets. - /// - /// These sets can be used with elements of any type, but you should check that - /// structural hashing and equality on the element type are correct for your type. - [] - type Set<'T> = - - /// Create a set containing elements drawn from the given sequence. - new : elements:seq<'T> -> Set<'T> - - /// The empty set for the type 'T. - static member Empty : Set<'T> - - /// A useful shortcut for Set.add. Note this operation produces a new set - /// and does not mutate the original set. The new set will share many storage - /// nodes with the original. See the Set module for further operations on sets. - member Add : value:'T -> Set<'T> - - /// A useful shortcut for Set.remove. Note this operation produces a new set - /// and does not mutate the original set. The new set will share many storage - /// nodes with the original. See the Set module for further operations on sets. - member Remove : value:'T -> Set<'T> - - /// The number of elements in the set - member Count : int - - /// A useful shortcut for Set.contains. See the Set module for further operations on sets. - member Contains : value:'T -> bool - - /// A useful shortcut for Set.isEmpty. See the Set module for further operations on sets. - member IsEmpty : bool - - /// Return a new set with the elements of the second set removed from the first. - static member Subtract : set1:Set<'T> * set2:Set<'T> -> Set<'T> - - /// Return a new set with the elements of the second set removed from the first. - static member (-) : set1:Set<'T> * set2:Set<'T> -> Set<'T> - - /// Compute the union of the two sets. - static member (+) : set1:Set<'T> * set2:Set<'T> -> Set<'T> - - - /// Evaluates to "true" if all elements of the second set are in the first - member IsSubsetOf: set:Set<'T> -> bool - - /// Evaluates to "true" if all elements of the first set are in the second - member IsSupersetOf: set:Set<'T> -> bool - - - /// Returns the lowest element in the set according to the ordering being used for the set - member MinimumElement: 'T - - /// Returns the highest element in the set according to the ordering being used for the set - member MaximumElement: 'T - -#if DONT_INCLUDE_DEPRECATED -#else - /// Returns the least element in the set that is greater than the given key - /// according to the ordering being used for the set - [] - member GetNextElement: value:'T -> 'T option - - /// Returns the greatest element in the set that is less than the given key - /// according to the ordering being used for the set - [] - member GetPreviousElement: value:'T -> 'T option -#endif - - interface ICollection<'T> - interface IEnumerable<'T> - interface System.Collections.IEnumerable - - interface System.IComparable - override Equals : obj -> bool - - -namespace Microsoft.FSharp.Collections - - open System - open System.Collections.Generic - open Microsoft.FSharp.Core - open Microsoft.FSharp.Collections - - [] - [] - - /// Functional programming operators related to the Set<_> type. - module Set = - - /// The empty set for the type 'T . - [] - val empty<'T> : Set<'T> - - /// The set containing the given one element. - val singleton: value:'T -> Set<'T> - - /// Return a new set with an element added to the set. No exception is raised if - /// the set already contains the given element. - val add: value:'T -> set:Set<'T> -> Set<'T> - - ///Evaluates to "true" if the given element is in the given set - val contains: element:'T -> set:Set<'T> -> bool - - ///Return the number of elements in the set. Same as size - val count: set:Set<'T> -> int - - ///Test if any element of the collection satisfies the given predicate. - ///If the input function is f and the elements are i0...iN - ///then computes p i0 or ... or p iN. - val exists: predicate:('T -> bool) -> set:Set<'T> -> bool - - /// Return a new collection containing only the elements of the collection - /// for which the given predicate returns true - val filter: predicate:('T -> bool) -> set:Set<'T> -> Set<'T> - - /// Return a new collection containing the results of applying the - /// given function to each element of the input set - val map: mapping:('T -> 'U) -> set:Set<'T> -> Set<'U> - - /// Apply the given accumulating function to all the elements of the set - val fold: folder:('State -> 'T -> 'State) -> state:'State -> set:Set<'T> -> 'State - - /// Apply the given accumulating function to all the elements of the set - val foldBack: folder:('T -> 'State -> 'State) -> set:Set<'T> -> state:'State -> 'State - - /// Test if all elements of the collection satisfy the given predicate. - /// If the input function is f and the elements are i0...iN and "j0...jN" - /// then computes p i0 && ... && p iN. - val forall: predicate:('T -> bool) -> set:Set<'T> -> bool - - /// Compute the intersection of the two sets. - val intersect: set1:Set<'T> -> set2:Set<'T> -> Set<'T> - - ///Compute the intersection of a sequence of sets. The sequence must be non-empty - val intersectMany: sets:seq> -> Set<'T> - - ///Compute the union of the two sets. - val union: set1:Set<'T> -> set2:Set<'T> -> Set<'T> - - ///Compute the union of a sequence of sets. - val unionMany: sets:seq> -> Set<'T> - - ///Return "true" if the set is empty - val isEmpty: set:Set<'T> -> bool - - ///Apply the given function to each element of the set, in order according - ///to the comparison function - val iter: action:('T -> unit) -> set:Set<'T> -> unit - - ///Split the set into two sets containing the elements for which the given predicate - ///returns true and false respectively - val partition: predicate:('T -> bool) -> set:Set<'T> -> (Set<'T> * Set<'T>) - - ///Return a new set with the given element removed. No exception is raised in - ///the set doesn't contain the given element. - val remove: value: 'T -> set:Set<'T> -> Set<'T> - - /// Build a set that contains the same elements as the given list - val of_list: elements:'T list -> Set<'T> - - /// Build a list that contains the elements of the set in order - val to_list: set:Set<'T> -> 'T list - - /// Build a set that contains the same elements as the given array - val of_array: array:'T array -> Set<'T> - - /// Build an array that contains the elements of the set in order - val to_array: set:Set<'T> -> 'T array - - /// Return a view of the collection as an enumerable object - val to_seq: set:Set<'T> -> seq<'T> - - /// Build a new collection from the given enumerable object - val of_seq: elements:seq<'T> -> Set<'T> - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val union_all: seq> -> Set<'T> - - [] - val min_elt: set:Set<'T> -> 'T - - [] - val max_elt: set:Set<'T> -> 'T - - [] - val next_elt: value:'T -> set:Set<'T> -> 'T option - - [] - val prev_elt: value:'T -> set:Set<'T> -> 'T option - - [] - val size: set:Set<'T> -> int - - [] - val compare: set1:Set<'T> -> set2:Set<'T> -> int - - ///Evaluates to "true" if the given element is in the given set - [] - val mem: element:'T -> set:Set<'T> -> bool - - /// Returns the minimum element of the set - [] - val choose: set:Set<'T> -> 'T - - /// Evaluates to "true" if all elements of the second set are in the first - [] - val subset: set1:Set<'T> -> set2:Set<'T> -> bool - - /// Return a new set with the elements of the second set removed from the first. - [] - val diff: set1:Set<'T> -> set2:Set<'T> -> Set<'T> - - [] - val intersect_all: seq> -> Set<'T> - - [] - val is_empty: set:Set<'T> -> bool - - [] - val for_all: predicate:('T -> bool) -> set:Set<'T> -> bool - - [] - val fold_left: folder:('State -> 'T -> 'State) -> state:'State -> set:Set<'T> -> 'State - - [] - val fold_right: folder:('T -> 'State -> 'State) -> set:Set<'T> -> state:'State -> 'State - -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/string.fs b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/string.fs deleted file mode 100644 index e1236f36..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/string.fs +++ /dev/null @@ -1,96 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Core - - open System.Diagnostics - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - - [] - [] - module String = - - let inline checkNonNull arg = - match box arg with null -> nullArg "str" | _ -> () - - [] - let concat sep (strings : seq) = - System.String.Join(sep, Seq.to_array strings) - - [] - let iter (f : (char -> unit)) (str:string) = - checkNonNull str - for i = 0 to str.Length - 1 do - f str.[i] - - [] - let iteri f (str:string) = - checkNonNull str - for i = 0 to str.Length - 1 do - f i str.[i] - - [] - let map (f: char -> char) (str:string) = - checkNonNull str - let res = new System.Text.StringBuilder(str.Length) - str |> iter (fun c -> res.Append(f c) |> ignore); - res.ToString() - - [] - let mapi (f: int -> char -> char) (str:string) = - checkNonNull str - let res = new System.Text.StringBuilder(str.Length) - str |> iteri (fun i c -> res.Append(f i c) |> ignore); - res.ToString() - - [] - let collect (f: char -> string) (str:string) = - checkNonNull str - let res = new System.Text.StringBuilder(str.Length) - str |> iter (fun c -> res.Append(f c) |> ignore); - res.ToString() - - [] - let init (count:int) (f: int-> string) = - if count < 0 then invalidArg "n" "the length may not be negative" - let res = new System.Text.StringBuilder(count) - for i = 0 to count - 1 do - res.Append(f i) |> ignore; - res.ToString() - - [] - let replicate (count:int) (str:string) = - checkNonNull str - let res = new System.Text.StringBuilder(str.Length) - for i = 0 to count - 1 do - res.Append(str) |> ignore; - res.ToString() - - [] - let map_concat f str = collect f str - - [] - let forall f (str:string) = - checkNonNull str - let rec check i = (i >= str.Length) || (f str.[i] && check (i+1)) - check 0 - - [] - let for_all f str = forall f str - - [] - let exists f (str:string) = - checkNonNull str - let rec check i = (i < str.Length) && (f str.[i] || check (i+1)) - check 0 - - [] - let length (str:string) = - checkNonNull str - str.Length - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/string.fsi b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/string.fsi deleted file mode 100644 index bb32b6ee..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.Core/string.fsi +++ /dev/null @@ -1,67 +0,0 @@ -//========================================================================= -// (c) Microsoft Corporation 2005-2009. -//========================================================================= - -namespace Microsoft.FSharp.Core - - open System - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - - /// Functional programming operators for string processing. Further string operations - /// are available via the member functions on strings and other functionality in - /// System.String - /// and System.Text.RegularExpressions types. - [] - [] - module String = - - /// Return a new string made by concatenating the given strings - /// with separator 'sep', i.e. 'a1 + sep + ... + sep + aN' - val concat: sep:string -> strings: seq -> string - - /// Apply the function action to each character in the string. - val iter: action:(char -> unit) -> str:string -> unit - - /// Apply the function action to the index of each character in the string and the character itself. - val iteri: action:(int -> char -> unit) -> str:string -> unit - - /// Build a new string whose characters are the results of applying the function mapping - /// to each of the characters of the input string. - val map: mapping:(char -> char) -> str:string -> string - - /// Build a new string whose characters are the results of applying the function mapping - /// to each character in the string and the character itself. - val mapi: mapping:(int -> char -> char) -> str:string -> string - - /// Build a new string whose characters are the results of applying the function mapping - /// to each of the characters of the input string and concatenating the resulting - /// strings. - val collect: mapping:(char -> string) -> str:string -> string - - /// Build a new string whose characters are the results of applying the function mapping - /// to each index from 0 to count-1 and concatenating the resulting - /// strings. - val init: count:int -> initializer:(int -> string) -> string - - /// Test if all characters in the string satisfy the given predicate. - val forall: predicate:(char -> bool) -> str:string -> bool - - /// Test if any character of the string satisfies the given predicate. - val exists: predicate:(char -> bool) -> str:string -> bool - - /// Return a string by concatenating count instances of str. - val replicate: count:int -> str: string -> string - - /// Return the length of the string. - val length: str:string -> int - -#if DONT_INCLUDE_DEPRECATED -#else - [] - val map_concat: mapping:(char -> string) -> str:string -> string - - [] - val for_all: predicate:(char -> bool) -> str:string -> bool -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.PowerPack.Build.Tasks-proto/FSharp.PowerPack.Build.Tasks-proto.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/FSharp.PowerPack.Build.Tasks-proto/FSharp.PowerPack.Build.Tasks-proto.fsproj deleted file mode 100644 index 0955f100..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharp.PowerPack.Build.Tasks-proto/FSharp.PowerPack.Build.Tasks-proto.fsproj +++ /dev/null @@ -1,58 +0,0 @@ - - - - ..\.. - Proto - - - - - - AnyCPU - 2.0 - true - v2.0 - {8378c215-5d1d-4e68-b1ff-600b91821372} - Library - FSharp.PowerPack.Build.Tasks-proto - LKG - FSharp.PowerPack.Build.Tasks.xml - FSharp.PowerPack.Build.Tasks.fsi - BUILDING_PROTO;BUILDING_WITH_LKG;$(DefineConstants) - $(DisabledWarnings);9;60;35;42;62 - - - - - - - - - - - - - - - CompilerLocationUtils.fs - - - FSLex.Build.fsi - - - FSLex.Build.fs - - - FSYacc.Build.fsi - - - FSYacc.Build.fs - - - FSharp.PowerPack-proto.targets - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/FSharpSourceBuild.targets b/tools/FSharp_1.9.6.16/source/fsharp/FSharpSourceBuild.targets deleted file mode 100644 index 49b035e6..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/FSharpSourceBuild.targets +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - true - 1.9.6.15 - $(FSharpSourcesRoot)\source-build-version - true - $(FSharpSourcesRoot)\$(Configuration)\bin - NO_STRONG_NAMES;$(DefineConstants) - - - - - - - - - - - - - - $(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin - - $(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin - fsc.exe - $(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin - fslex.exe - $(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin - fsyacc.exe - - - - - $(FSharpSourcesRoot)\Proto\bin - - $(FSharpSourcesRoot)\Proto\bin - fsc-proto.exe - $(FSharpSourcesRoot)\Proto\bin - fslex-proto.exe - $(FSharpSourcesRoot)\Proto\bin - fsyacc-proto.exe - - - - - $(CompileDependsOn);ValidateConfiguration;CustomCopyLocalFiles - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/Fsc-proto/Fsc-proto.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/Fsc-proto/Fsc-proto.fsproj deleted file mode 100644 index a9a90aef..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/Fsc-proto/Fsc-proto.fsproj +++ /dev/null @@ -1,71 +0,0 @@ - - - - ..\.. - Proto - - - - - - x86 - Exe - $(DisabledWarnings);62 - Fsc-proto - Fsc.fsi - INTERNALIZED_POWER_PACK;BUILDING_PROTO;BUILDING_WITH_LKG;COMPILER;$(DefineConstants) - LKG - {9D7C9060-9263-40EB-8FE3-1E4E3C6D941C} - true - v2.0 - - - - filename.fsi - - - filename.fs - - - fsc.ml - - - fscmain.ml - - - fsc-proto.exe.config - - - - - - - {33E0FB8C-93DC-4AD7-9DCD-9FBDA6C2F061} - FSharp.Compiler-proto - - - - - - - - $(PrepareForRunDependsOn);CopyLkgToBin - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/Fsc/Fsc.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/Fsc/Fsc.fsproj deleted file mode 100644 index 08ea8d96..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/Fsc/Fsc.fsproj +++ /dev/null @@ -1,53 +0,0 @@ - - - - ..\.. - - - - - Debug - - x86 - {C94C257C-3C0A-4858-B5D8-D746498D1F08} - Exe - $(DisabledWarnings);62;44 - Fsc - INTERNALIZED_POWER_PACK;COMPILER;$(DefineConstants) - Fsc.fsi - true - v2.0 - - - - assemblyinfo.fsc.exe.fs - - - fsc.ml - - - fscmain.ml - - - - - - System.Windows.Forms - System.Windows.Forms.dll - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/Fsi/Fsi.fsproj b/tools/FSharp_1.9.6.16/source/fsharp/Fsi/Fsi.fsproj deleted file mode 100644 index f5e7a08c..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/Fsi/Fsi.fsproj +++ /dev/null @@ -1,62 +0,0 @@ - - - - ..\.. - - - - - Debug - - x86 - {d0e98c0d-490b-4c61-9329-0862f6e87645} - Exe - $(DisabledWarnings);62;44 - Fsi - 0x0A000000 - INTERNALIZED_POWER_PACK;COMPILER;$(DefineConstants) - true - v2.0 - $(OtherFlags) --publicasinternal - - - - assemblyinfo.fsi.exe.fs - - - console.fs - - - fsi.fs - - - - - - - - FSharp.Compiler.Interactive.Settings - {649fa588-f02e-457c-9fcf-87e46407481e} - True - - - FSharp.Compiler.Server.Shared - {d5870cf0-ed51-4cbc-b3d7-6f56da84ac06} - True - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/Fsi/console.fs b/tools/FSharp_1.9.6.16/source/fsharp/Fsi/console.fs deleted file mode 100644 index f253eb39..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/Fsi/console.fs +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -#light - -namespace Microsoft.FSharp.Compiler.Interactive - -open System -open System.Text -open System.Collections.Generic - -/// System.Console.ReadKey appears to return an ANSI character (not the expected the unicode character). -/// When this fix flag is true, this byte is converted to a char using the System.Console.InputEncoding. -/// This is a code-around for bug://1345. -/// Fixes to System.Console.ReadKey may break this code around, hence the option here. -module ConsoleOptions = - - // Bug 4254 tracks making this fix up version specific, e.g. - // let fixupRequired = typeof.Assembly.GetName().Version.Major = 2 - // - // Until we hear that this will be fixed in Dev10, we apply this fix always. - let fixNonUnicodeSystemConsoleReadKey = ref true - let readKeyFixup (c:char) = - if !fixNonUnicodeSystemConsoleReadKey then - // Assumes the c:char is actually a byte in the System.Console.InputEncoding. - // Convert it to a Unicode char through the encoding. - if 0 <= int c && int c <= 255 then - let chars = System.Console.InputEncoding.GetChars [| byte c |] - if chars.Length = 1 then - chars.[0] // fixed up char - else - assert("readKeyFixHook: InputEncoding.GetChars(single-byte) returned multiple chars" = "") - c // no fix up - else - assert("readKeyFixHook: given char is outside the 0..255 byte range" = "") - c // no fix up - else - c - -type Style = Prompt | Out | Error - -/// Class managing the command History. -type History() = - let list = new List() - let mutable current = 0 - - member x.Count = list.Count - member x.Current = - if current >= 0 && current < list.Count then list.[current] else String.Empty - - member x.Clear() = list.Clear(); current <- -1 - member x.Add line = - match line with - | null | "" -> () - | _ -> list.Add(line) - - member x.AddLast line = - match line with - | null | "" -> () - | _ -> list.Add(line); current <- list.Count - - // Dead code - // member x.First() = current <- 0; x.Current - // member x.Last() = current <- list.Count - 1; x.Current; - - member x.Previous() = - if (list.Count > 0) then - current <- ((current - 1) + list.Count) % list.Count - x.Current - - member x.Next() = - if (list.Count > 0) then - current <- (current + 1) % list.Count - x.Current - -/// List of available optionsCache - -type Options() = - inherit History() - let mutable root = "" - member x.Root with get() = root and set(v) = (root <- v) - -/// Cursor position management - -module Utils = - let guard(f) = - try f() - with e -> - Microsoft.FSharp.Compiler.ErrorLogger.warning(Failure(Printf.sprintf "Note: an unexpected exception in fsi.exe readline console support. Consider starting fsi.exe with the --no-readline option and report the stack trace below to the .NET or Mono implementors\n%s\n%s\n" e.Message e.StackTrace)); - -[] -type Cursor = - static member ResetTo(top,left) = - Utils.guard(fun () -> - Console.CursorTop <- top; - Console.CursorLeft <- left) - static member Move(inset, delta) = - let position = Console.CursorTop * (Console.BufferWidth - inset) + (Console.CursorLeft - inset) + delta - let top = position / (Console.BufferWidth - inset) - let left = inset + position % (Console.BufferWidth - inset) - Cursor.ResetTo(top,left) - -type Anchor = - {top:int; left:int} - static member Current(inset) = {top=Console.CursorTop;left= max inset Console.CursorLeft} - - member p.PlaceAt(inset, index) = - //printf "p.top = %d, p.left = %d, inset = %d, index = %d\n" p.top p.left inset index; - let left = inset + (( (p.left - inset) + index) % (Console.BufferWidth - inset)) - let top = p.top + ( (p.left - inset) + index) / (Console.BufferWidth - inset) - Cursor.ResetTo(top,left) - -type ReadLineConsole(complete: (string option * string -> seq)) = - let promptColor= Console.ForegroundColor - let outColor = Console.ForegroundColor - let errorColor = Console.ForegroundColor - let history = new History() - let mutable complete = complete - member x.SetCompletion(v) = complete <- v - - /// Inset all inputs by this amount - member x.Prompt = "> " - member x.Prompt2 = "- " - member x.Inset = x.Prompt.Length - - member x.GetOptions(input:string) = - /// Tab optionsCache available in current context - let optionsCache = new Options() - - let rec look parenCount i = - if i <= 0 then i else - match input.Chars(i - 1) with - | c when Char.IsLetterOrDigit(c) (* or Char.IsWhiteSpace(c) *) -> look parenCount (i-1) - | '.' | '_' -> look parenCount (i-1) - | '}' | ')' | ']' -> look (parenCount+1) (i-1) - | '(' | '{' | '[' -> look (parenCount-1) (i-1) - | _ when parenCount > 0 -> look parenCount (i-1) - | _ -> i - let start = look 0 input.Length - - let name = input.Substring(start, input.Length - start); - if (name.Trim().Length > 0) then - let lastDot = name.LastIndexOf('.'); - let attr, pref, root = - if (lastDot < 0) then - None, name, input.Substring(0, start) - else - Some(name.Substring(0, lastDot)), - name.Substring(lastDot + 1), - input.Substring(0, start + lastDot + 1) - //printf "attr, pref, root = %s\n" (any_to_string (attr, pref, root)) - try - complete(attr,pref) - |> Seq.filter(fun option -> option.StartsWith(pref,StringComparison.Ordinal)) - |> Seq.iter (fun option -> optionsCache.Add(option)) - // engine.Evaluate(String.Format("dir({0})", attr)) as IEnumerable; - optionsCache.Root <-root; - with e -> - optionsCache.Clear(); - optionsCache,true; - else - optionsCache,false; - - member x.MapCharacter(c) : string = - match c with - | '\x1A'-> "^Z"; - | _ -> "^?" - - member x.GetCharacterSize(c) = - if (Char.IsControl(c)) - then x.MapCharacter(c).Length - else 1 - - static member TabSize = 4; - - member x.ReadLine() = - - let checkLeftEdge(prompt) = - let currLeft = Console.CursorLeft - if currLeft < x.Inset then - if currLeft = 0 then Console.Write (if prompt then x.Prompt2 else String(' ',x.Inset)) - Utils.guard(fun () -> - Console.CursorLeft <- x.Inset); - - // The caller writes the primary prompt. If we are reading the 2nd and subsequent lines of the - // input we're responsible for writing the secondary prompt. - checkLeftEdge(true); - - /// Cursor anchor - position of !anchor when the routine was called - let anchor = ref (Anchor.Current(x.Inset)); - /// Length of the output currently rendered on screen. - let rendered = ref 0 - /// Input has changed, therefore options cache is invalidated. - let changed = ref false - /// Cache of optionsCache - let optionsCache = ref (new Options()) - - let writeBlank() = - Console.Write(' '); - checkLeftEdge(false) - let writeChar(c) = - if Console.CursorTop = Console.BufferHeight - 1 && Console.CursorLeft = Console.BufferWidth - 1 then - //printf "bottom right!\n"; - anchor := { !anchor with top = (!anchor).top - 1 }; - checkLeftEdge(true); - if (Char.IsControl(c)) then - let s = x.MapCharacter(c) - Console.Write(s); - rendered := !rendered + s.Length; - else - Console.Write(c); - rendered := !rendered + 1; - checkLeftEdge(true) - - /// The console input buffer. - let input = new StringBuilder() - /// Current position - index into the input buffer - let current = ref 0; - - let render() = - //printf "render\n"; - let curr = !current - let text = input.ToString() - (!anchor).PlaceAt(x.Inset,0); - let output = new StringBuilder() - let mutable position = -1 - for i = 0 to input.Length - 1 do - if (i = curr) then - position <- output.Length - let c = input.Chars(i) - if (Char.IsControl(c)) then - output.Append(x.MapCharacter(c)) |> ignore; - else - output.Append(c) |> ignore; - - if (curr = input.Length) then - position <- output.Length; - - // render the current text, computing a new value for "rendered" - let text = output.ToString(); - let old_rendered = !rendered - rendered := 0; - for i = 0 to input.Length - 1 do - writeChar(input.Chars(i)); - - // blank out any dangling old text - for i = !rendered to old_rendered - 1 do - writeBlank(); - - (!anchor).PlaceAt(x.Inset,position); - - render(); - - let insertChar(c:char) = - if (!current = input.Length) then - current := !current + 1; - input.Append(c) |> ignore; - writeChar(c) - else - input.Insert(!current, c) |> ignore; - current := !current + 1; - render(); - - let insertTab() = - for i = ReadLineConsole.TabSize - (!current % ReadLineConsole.TabSize) downto 1 do - insertChar(' ') - - let moveLeft() = - if (!current > 0 && (!current - 1 < input.Length)) then - current := !current - 1 - let c = input.Chars(!current) - Cursor.Move(x.Inset, - x.GetCharacterSize(c)) - - let moveRight() = - if (!current < input.Length) then - let c = input.Chars(!current); - current := !current + 1; - Cursor.Move(x.Inset, x.GetCharacterSize(c)); - - let setInput(line:string) = - input.Length <- 0; - input.Append(line) |> ignore; - current := input.Length; - render() - - let tabPress(shift) = - let opts,prefix = - if !changed then - changed := false; - x.GetOptions(input.ToString()); - else - !optionsCache,false - optionsCache := opts; - - if (opts.Count > 0) then - let part = - if shift - then opts.Previous() - else opts.Next(); - setInput(opts.Root + part); - else - if (prefix) then - Console.Beep(); - else - insertTab(); - - let delete() = - if (input.Length > 0 && !current < input.Length) then - input.Remove(!current, 1) |> ignore; - render(); - - let insert(key: ConsoleKeyInfo) = - // REVIEW: is this F6 rewrite required? 0x1A looks like Ctrl-Z. - // REVIEW: the Ctrl-Z code is not recognised as EOF by the lexer. - // REVIEW: looks like a relic of the port of readline, which is currently removable. - let c = if (key.Key = ConsoleKey.F6) then '\x1A' else key.KeyChar - let c = ConsoleOptions.readKeyFixup c - insertChar(c); - - let backspace() = - if (input.Length > 0 && !current > 0) then - input.Remove(!current - 1, 1) |> ignore; - current := !current - 1; - render(); - - let enter() = - Console.Write("\n"); - let line = input.ToString(); - if (line = "\x1A") then null - else - if (line.Length > 0) then - history.AddLast(line); - line; - - let rec read() = - let key = Console.ReadKey(true) - - match (key.Key) with - | ConsoleKey.Backspace -> - backspace(); - change() - | ConsoleKey.Delete -> - delete(); - change() - | ConsoleKey.Enter -> - enter() - | ConsoleKey.Tab -> - tabPress(key.Modifiers &&& ConsoleModifiers.Shift <> enum 0); - read() - | ConsoleKey.UpArrow -> - setInput(history.Previous()); - change() - | ConsoleKey.DownArrow -> - setInput(history.Next()); - change() - | ConsoleKey.RightArrow -> - moveRight() - change() - | ConsoleKey.LeftArrow -> - moveLeft() - change() - | ConsoleKey.Escape -> - setInput(String.Empty); - change() - | ConsoleKey.Home -> - current := 0; - (!anchor).PlaceAt(x.Inset,0) - change() - | ConsoleKey.End -> - current := input.Length; - (!anchor).PlaceAt(x.Inset,!rendered); - change() - | _ -> - // Note: If KeyChar=0, the not a proper char, e.g. it could be part of a multi key-press character, - // e.g. e-acute is ' and e with the French (Belgium) IME and US Intl KB. - // Here: skip KeyChar=0 (except for F6 which maps to 0x1A (ctrl-Z?)). - if key.KeyChar <> '\000' || key.Key = ConsoleKey.F6 then - insert(key); - change() - else - // Skip and read again. - read() - - and change() = - changed := true; - read() - read() - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/Fsi/fsi.fs b/tools/FSharp_1.9.6.16/source/fsharp/Fsi/fsi.fs deleted file mode 100644 index 0f08fddc..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/Fsi/fsi.fs +++ /dev/null @@ -1,1913 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved *) - -#light - -module internal Microsoft.FSharp.Compiler.Interactive.Shell - -[] -[] -do() - -open Internal.Utilities - -// #nowarn "64" // fsi.fs(1505,41): error FS0064: This construct causes code to be less generic than indicated by the type annotations. The type variable 'a has been constrained to be type ''a'. - -module Ilsupp = Microsoft.FSharp.Compiler.AbstractIL.Internal.Support -module Ilmorph = Microsoft.FSharp.Compiler.AbstractIL.Morphs -module Ilprint = Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter -module Ilreflect = Microsoft.FSharp.Compiler.AbstractIL.RuntimeWriter -module Tc = Microsoft.FSharp.Compiler.TypeChecker - -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -open Microsoft.FSharp.Compiler.AbstractIL.RuntimeWriter - -open Internal.Utilities.StructuredFormat - -open System -open System.Diagnostics -open System.Runtime.InteropServices -open System.IO -open System.Text -open System.Threading -open System.Reflection -open System.Windows.Forms - -open Microsoft.FSharp.Compiler.Interactive.Settings - -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Fscopts -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.Ilxgen -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.TypeChecker -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Opt -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.Build -open Microsoft.FSharp.Compiler.Lexhelp -open Microsoft.FSharp.Compiler.Layout -open Microsoft.FSharp.Compiler.PostTypecheckSemanticChecks - -//---------------------------------------------------------------------------- -// Hardbinding dependencies should we NGEN fsi.exe -//---------------------------------------------------------------------------- - -open System.Runtime.CompilerServices -[] do () -[] do () - -let callStaticMethod (ty:Type) name args = - ty.InvokeMember(name, (BindingFlags.InvokeMethod ||| BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic), null, null, Array.of_list args,Globalization.CultureInfo.InvariantCulture) - -let callGenericStaticMethod (ty:Type) name tyargs args = - let m = ty.GetMethod(name,(BindingFlags.InvokeMethod ||| BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic)) - let m = m.MakeGenericMethod(Array.of_list tyargs) - m.Invoke(null,Array.of_list args) - -//---------------------------------------------------------------------------- -// Timing support -//---------------------------------------------------------------------------- - -let product = "Microsoft F# Interactive" -let stdinMockFilename = "stdin" - -[] -type TimeReporter() = - let stopwatch = new System.Diagnostics.Stopwatch() - let ptime = System.Diagnostics.Process.GetCurrentProcess() - let numGC = System.GC.MaxGeneration - member tr.TimeOp(f) = - let startTotal = ptime.TotalProcessorTime - let startGC = [| for i in 0 .. numGC -> System.GC.CollectionCount(i) |] - stopwatch.Reset() - stopwatch.Start() - let res = f () - stopwatch.Stop() - let total = ptime.TotalProcessorTime - startTotal - let spanGC = [ for i in 0 .. numGC-> System.GC.CollectionCount(i) - startGC.[i] ] - let elapsed = stopwatch.Elapsed in - printfn "Real: %02d:%02d:%02d.%03d, CPU: %02d:%02d:%02d.%03d, GC %s" - elapsed.Hours elapsed.Minutes elapsed.Seconds elapsed.Milliseconds - total.Hours total.Minutes total.Seconds total.Milliseconds - (String.concat ", " (List.mapi (sprintf "gen%d: %d") spanGC)) - res - - member tr.TimeOpIf flag f = if flag then tr.TimeOp(f) else f () - -let timeReporter = TimeReporter() - - -//---------------------------------------------------------------------------- -// Console coloring -//---------------------------------------------------------------------------- - -// Testing shows "console coloring" is broken on some Mono configurations (e.g. Mono 2.4 Suse LiveCD). -// To support fsi usage, the console coloring is switched off by default on Mono. -do if runningOnMono then enableConsoleColoring <- false - - -//---------------------------------------------------------------------------- -// value saving -//---------------------------------------------------------------------------- - -let saverPath = ["Microsoft";"FSharp";"Compiler";"Interactive";"Internals";"SaveIt"] - -//---------------------------------------------------------------------------- -// value printing -//---------------------------------------------------------------------------- - -module ValuePrinting = - - type PrintMode = PrintExpr | PrintDecl - let printVal printMode (opts:FormatOptions) (x:obj) (ty:System.Type) = - // We do a dynamic invoke of any_to_layout with the right System.Type parameter for the static type of the saved value. - // In principle this helps any_to_layout do the right thing as it descends through terms. In practice it means - // it at least does the right thing for top level 'null' list and option values (but not for nested ones). - // - // The static type was saved into the location used by Internals.GetSavedItType when Internals.SaveIt was called. - // Internals.SaveIt has type ('a -> unit), and fetches the System.Type for 'a by using a typeof<'a> call. - // The funny thing here is that you might think that the driver (this file) knows more about the static types - // than the compiled code does. But it doesn't! In particular, it's not that easy to get a System.Type value based on the - // static type information we do have: we have no direct way to bind a F# TAST type or even an AbstractIL type to - // a System.Type value (I guess that functionality should be in ilreflect.fs). - // - // This will be more significant when we print values other then 'it' - // - try - let ass = typeof.Assembly - let displayModule = ass.GetType("Internal.Utilities.StructuredFormat.Display") - match printMode with - | PrintDecl -> - // When printing rhs of fsi declarations, use "fsi_any_to_layout". - // This will suppress some less informative values, by returning an empty layout. [fix 4343]. - (Internal.Utilities.StructuredFormat.Display.fsi_any_to_layout |> ignore); // if you adjust this then adjust the dynamic reference too - callGenericStaticMethod displayModule "fsi_any_to_layout" [ty] [box opts; box x] |> unbox - | PrintExpr -> - (Internal.Utilities.StructuredFormat.Display.any_to_layout |> ignore); // if you adjust this then adjust the dynamic reference too - callGenericStaticMethod displayModule "any_to_layout" [ty] [box opts; box x] |> unbox - with - | :? ThreadAbortException -> Layout.wordL "" - | e -> -#if DEBUG - Printf.printf "\n\nprintVal: x = %+A and ty=%s\n" x (ty.FullName) -#endif - Printf.printf "\n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: %s\n" (e.ToString()); - Layout.wordL "" - - let invokeDeclLayout tcGlobals emEnv ilxGenEnv (v:Val) = - // Bug 2581 requests to print declared values (rather than just expressions). - // This code supports it by providing a lookup from v to a concrete (System.Object,System.Type). - // This (obj,objTy) pair can then be fed to the fsi value printer. - // Note: The value may be (null:Object). - // Note: A System.Type allows the value printer guide printing of nulls, e.g. as None or []. - //------- - // Ilxgen knows what the v:Val was converted to w.r.t. AbsIL datastructures. - // Ilreflect knows what the AbsIL was generated to. - // Combining these allows for obtaining the (obj,objTy) by reflection where possible. - // This assumes the v:Val was given appropriate storage, e.g. StaticField. - if Microsoft.FSharp.Compiler.Interactive.Internals.GetFsiShowDeclarationValues() then - // Adjust "opts" for printing for "declared-values": - // - No sequences, because they may have effects or time cost. - // - No properties, since they may have unexpected effects. - // - Limit strings to roughly one line, since huge strings (e.g. 1 million chars without \n are slow in vfsi). - // - Limit PrintSize which is a count on nodes. - let declaredValueReductionFactor = 10 (* reduce PrintSize for declared values, e.g. see less of large terms *) - let opts = Microsoft.FSharp.Compiler.Interactive.Internals.GetFsiPrintOptions() - let opts = {opts with ShowProperties = false} (* properties off, motivated by Form props *) - let opts = {opts with ShowIEnumerable = false} (* seq off, motivated by db query concerns *) - let opts = {opts with StringLimit = max 0 (opts.PrintWidth-4)} (* 4 allows for an indent of 2 and 2 quotes (rough) *) - let opts = {opts with PrintSize = opts.PrintSize / declaredValueReductionFactor } (* print less *) - let res = try Ilxgen.lookupGeneratedValue (Ilreflect.lookupFieldRef emEnv >> Option.get, - Ilreflect.lookupMethodRef emEnv >> Option.get, - Ilreflect.lookupTypeRef emEnv >> Option.get, - Ilreflect.lookupType emEnv) tcGlobals ilxGenEnv v - with e -> assert(false); -#if DEBUG - dprintf "\nlookGenerateVal: failed on v=%+A v.Name=%s\n" v v.MangledName -#endif - None (* lookup may fail *) - match res with - | None -> None - | Some (obj,objTy) -> let lay : layout = printVal PrintDecl opts obj objTy - if isEmptyL lay then None else Some lay (* suppress empty layout *) - - else - None - - let invokeExprPrinter denv vref = - let opts = Microsoft.FSharp.Compiler.Interactive.Internals.GetFsiPrintOptions() - let savedIt = Microsoft.FSharp.Compiler.Interactive.Internals.GetSavedIt() - let savedItType = Microsoft.FSharp.Compiler.Interactive.Internals.GetSavedItType() - let rhsL = printVal PrintExpr opts savedIt savedItType - let fullL = if isEmptyL rhsL then - Tastops.NicePrint.valL denv vref (* the rhs was suppressed by the printer, so no value to print *) - else - (Tastops.NicePrint.valL denv vref ++ wordL "=") --- rhsL - // let fullL = wordL " " $$ fullL // indent by 2 chars?? - Internal.Utilities.StructuredFormat.Display.output_layout opts stdout fullL; - stdout.WriteLine() - - - -//---------------------------------------------------------------------------- -// Reporting - syphon input text -//---------------------------------------------------------------------------- - - -type Syphon() = - let syphonText = new StringBuilder() -#if DEBUG - let syphonDump() = - let text = syphonText.ToString() - let lines = text.Split(Array.of_list [ '\n' ]) - Array.iteri (fun i (s:string) -> dprintf "history %2d : %s\n" i s) lines -#endif - - member x.Reset () = ignore (syphonText.Remove(0,syphonText.Length)) - - member x.Add (str:string) = // syphonDump(); - ignore (syphonText.Append(str)) (* ; printf "syphon: %s\n" str *) - - member x.GetLine filename i = - if filename<> stdinMockFilename then "" else - let text = syphonText.ToString() - // In Visual Studio, when sending a block of text, it prefixes with '# "filename"\n' - // and postfixes with '# 1 "stdin"\n'. To first, get errors filename context, - // and second to get them back into stdin context (no position stack...). - // To find an error line, trim upto the last stdinReset string the syphoned text. - //printf "PrePrune:-->%s<--\n\n" text; - let rec prune (text:string) = - let stdinReset = "# 1 \"stdin\"\n" - let idx = text.IndexOf(stdinReset,StringComparison.Ordinal) - if idx <> -1 then - prune (text.Substring(idx + stdinReset.Length)) - else - text - - let text = prune text - //printf "PostPrune:-->%s<--\n\n" text; - let lines = text.Split(Array.of_list [ '\n' ]) - if 0 < i && i <= lines.Length then lines.[i-1] else "" - -//---------------------------------------------------------------------------- -// Error reporting -//---------------------------------------------------------------------------- - - -let ignoreAllErrors f = try f() with _ -> () - -let PrintError (tcConfig:TcConfigBuilder,syphon:Syphon,isWarn,err) = - ignoreAllErrors(fun () -> - DoWithErrorColor isWarn (fun () -> - stderr.WriteLine(); - writeViaBufferWithEnvironmentNewLines stderr (OutputErrorOrWarningContext " " syphon.GetLine) err; - writeViaBufferWithEnvironmentNewLines stderr (OutputErrorOrWarning (tcConfig.implicitIncludeDir,tcConfig.showFullPaths,tcConfig.flatErrors,tcConfig.errorStyle,false)) err; - stderr.WriteLine())) - - -/// This ErrorLogger reports all warnings, but raises StopProcessing on first error or early exit -type ErrorLoggerThatStopsOnFirstError(tcConfigB:TcConfigBuilder,syphon:Syphon) = - let mutable errors = 0 - member x.SetError() = - errors <- 1 - member x.ErrorSink(err) = - PrintError(tcConfigB,syphon,false,err) - errors <- errors + 1; - if tcConfigB.abortOnError then exit 1 (* non-zero exit code *) - // STOP ON FIRST ERROR (AVOIDS PARSER ERROR RECOVERY) - raise StopProcessing - - member x.CheckForNoErrors() = (errors = 0) - member x.ResetErrorCount() = (errors <- 0) - member x.ErrorCount = errors - - - interface ErrorLogger with - member public x.WarnSink(err) = - DoWithErrorColor true (fun () -> - if ReportWarningAsError tcConfigB.globalWarnLevel tcConfigB.specificWarnOff tcConfigB.specificWarnAsError tcConfigB.globalWarnAsError err then - x.ErrorSink err - else if ReportWarning tcConfigB.globalWarnLevel tcConfigB.specificWarnOff err then - stderr.WriteLine(); - writeViaBufferWithEnvironmentNewLines stderr (OutputErrorOrWarningContext " " syphon.GetLine) err; - writeViaBufferWithEnvironmentNewLines stderr (OutputErrorOrWarning (tcConfigB.implicitIncludeDir,tcConfigB.showFullPaths,tcConfigB.flatErrors,tcConfigB.errorStyle,true)) err; - stderr.WriteLine()) - member public x.ErrorSink(err) = x.ErrorSink(err) - member public x.ErrorCount = errors - - /// A helper function to check if its time to abort - member x.AbortOnError() = - if errors > 0 - then (eprintf "stopped due to error\n"; stderr.Flush(); raise StopProcessing) - else () - - -//---------------------------------------------------------------------------- -// cmd line - option state -//---------------------------------------------------------------------------- - -let dirname (s:string) = - if s = "" then "." - else - match Path.GetDirectoryName(s) with - | null -> if Path.IsPathRooted(s) then s else "." - | res -> if res = "" then "." else res - -let defaultFSharpBinariesDir = System.AppDomain.CurrentDomain.BaseDirectory - -//---------------------------------------------------------------------------- -// tcConfig - build the initial config -//---------------------------------------------------------------------------- - -let tcConfigB = Build.TcConfigBuilder.CreateNew(defaultFSharpBinariesDir, - true, // long running: optimizeForMemory - Directory.GetCurrentDirectory()) -let tcConfigP = TcConfigProvider.BasedOnMutableBuilder(tcConfigB) -do tcConfigB.resolutionEnvironment <- MSBuildResolver.RuntimeLike // See Bug 3608 -do tcConfigB.product <- product -do tcConfigB.useFsiAuxLib <- true -do tcConfigB.includes <- (// BUG 890: #light does not start new block on RHS of <- assignment - let progFiles = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ProgramFiles) - let windows = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.System),"..") - let rec path = function [] -> "" | [x] -> x | x::y::ys -> path (Path.Combine(x,y)::ys) - tcConfigB.includes) -// Preset: --optimize+ -g --tailcalls+ (see 4505) -do SetOptimizeSwitch tcConfigB On -do SetDebugSwitch tcConfigB (Some "pdbonly") On -do SetTailcallSwitch On - - -//---------------------------------------------------------------------------- -// cmd line - state for options -//---------------------------------------------------------------------------- - -let readline = ref (not runningOnMono) -let gui = ref true // override via "--gui", on by default -#if DEBUG -let showILCode = ref false // show modul il code -#endif -let showTypes = ref true // show types after each interaction? -let saveEmittedCode = ref false -let fsiServerName = ref "" -let interact = ref true -let IsInteractiveServer() = !fsiServerName<>"" -let explicitArgs = ref [] -let recordExplicitArg arg = explicitArgs := !explicitArgs @ [arg] - -let fsiServerInputCodePage = ref None -let fsiServerOutputCodePage = ref None - -// internal options -let probeToSeeIfConsoleWorks = ref true (* Retail always on *) -let peekAheadOnConsoleToPermitTyping = ref true (* Retail always on. REVIEW: cause of obscure GUI blocked until keypress bug? *) - -// Additional fsi options are list below. -// In the "--help", these options can be printed either before (fsiUsagePrefix) or after (fsiUsageSuffix) the core options. - -let displayHelpFsi tcConfigB (blocks:CompilerOptionBlock list) = - DisplayBannerText tcConfigB; - printfn "" - printfn "Usage: fsi.exe [script.fsx []]" // additional in fsi.exe - printCompilerOptionBlocks blocks - exit 0 - -// option tags -let tagString = "" -let tagFile = "" -let tagNone = "" - -/// These options preceed the FsiCoreCompilerOptions in the help blocks -let fsiUsagePrefix inputFiles tcConfigB = - [PublicOptions("- INPUT FILES -", - [CompilerOption("use",tagFile, OptionString (fun s -> inputFiles := !inputFiles @ [(s,true)]), None, - [ "Use the given file on startup as initial input"]); - CompilerOption("load",tagFile, OptionString (fun s -> inputFiles := !inputFiles @ [(s,false)]), None, - [ "#load the given file on startup"]); - ]); - PublicOptions("- CODE GENERATION -" ,[]); - PublicOptions("- ERRORS AND WARNINGS -" ,[]); - PublicOptions("- LANGUAGE -" ,[]); - PublicOptions("- MISCELLANEOUS -" ,[]); - PublicOptions("- ADVANCED -" ,[]); - PrivateOptions( - [(* Make internal fsi-server* options. Do not print in the help. They are used by VFSI. *) - CompilerOption("fsi-server","", OptionString (fun s -> fsiServerName := s), None, - [ "FSI server mode on given named channel"]); - CompilerOption("fsi-server-input-codepage","",OptionInt (fun n -> fsiServerInputCodePage := Some(n)), None, - [ " Set the input codepage for the console"]); - CompilerOption("fsi-server-output-codepage","",OptionInt (fun n -> fsiServerOutputCodePage := Some(n)), None, - [ " Set the output codepage for the console"]); - CompilerOption("fsi-server-no-unicode","", OptionUnit (fun () -> fsiServerOutputCodePage := None; fsiServerInputCodePage := None), None, - [ "Do not set the codepages for the console"]); - (* We do not want to print the "script.fsx arg2..." as part of the options *) - CompilerOption("script.fsx arg1 arg2 ...","", - OptionGeneral((fun args -> List.length args>0 && IsScript args.[0]), - (fun args -> let scriptFile = args.[0] - let scriptArgs = List.tl args - inputFiles := !inputFiles @ [(scriptFile,true)] (* record script.fsx for evaluation *) - List.iter recordExplicitArg scriptArgs (* record rest of line as explicit arguments *) - tcConfigB.noFeedback <- true (* "quiet", no banners responses etc *) - interact := false (* --exec, exit after eval *) - [] (* no arguments passed on, all consumed here *) - )),None, - [ "Run script.fsx with the follow command line arguments: arg1 arg2 ..."]); - ]); - PrivateOptions( - [(* Deprecated 2009.02.17. --no-gui and --gui is replaced by --gui[+/-] *) - CompilerOption("no-gui","", OptionUnit(fun () -> warning(DeprecatedCommandLineOption("--no-gui", "Use '--gui-' instead", rangeCmdArgs)); - gui := false), None, - [ "" ]); - (* Deprecated 2009.02.17. "--no-debug-info" is the same as --debug- *) - CompilerOption("no-debug-info","", OptionUnit (fun n -> warning(DeprecatedCommandLineOption("--no-debug-info", "Use '--debug-' instead", rangeCmdArgs)); - tcConfigB.debuginfo <- false),None, - [ "Turn off generation of debug information for" - "dynamic code"]); - (* Deprecated 2009.02.17. --no-readline replaced by --readline-, soon be replaced by --tabcomplete-, or removed altogether *) - CompilerOption("no-readline",tagNone, OptionUnit (function () -> warning(DeprecatedCommandLineOption("--no-readline", "Use '--readline-' instead", rangeCmdArgs)); - readline := false),None, - [ ]); - (* Private options, related to diagnostics around console probing *) - CompilerOption("probeconsole","", OptionSwitch (fun flag -> probeToSeeIfConsoleWorks := flag=On), None, - [ "Probe to see if System.Console looks functional"]); - CompilerOption("peekahead","", OptionSwitch (fun flag -> peekAheadOnConsoleToPermitTyping := flag=On), None, - [ "Probe to see if System.Console looks functional"]); - ]) - ] - -/// These options follow the FsiCoreCompilerOptions in the help blocks -let fsiUsageSuffix tcConfigB = - [PublicOptions("- INPUT FILES -", - [CompilerOption("--","", OptionRest recordExplicitArg, None, - [ "Treat remaining arguments as command line"; - "arguments, accessed using fsi.CommandLineArgs"]); - ]); - PublicOptions("- MISCELLANEOUS -", - [ CompilerOption("help", tagNone, - OptionHelp (fun blocks -> displayHelpFsi tcConfigB blocks),None, - [ "Display this usage message (Short form: -?)" ]) - ]); - PrivateOptions( - [ CompilerOption("?" , tagNone, OptionHelp (fun blocks -> displayHelpFsi tcConfigB blocks), None, [ "Short form of --help" ]); - CompilerOption("help" , tagNone, OptionHelp (fun blocks -> displayHelpFsi tcConfigB blocks), None, [ "Short form of --help" ]); - CompilerOption("full-help", tagNone, OptionHelp (fun blocks -> displayHelpFsi tcConfigB blocks), None, [ "Short form of --help" ]); - ]); - PublicOptions("- ADVANCED -", - [CompilerOption("exec","", OptionClear interact, None, - [ "Exit fsi after loading the files or running the" - ".fsx script given on the command line"]); - CompilerOption("gui", tagNone, OptionSwitch (fun flag -> gui := (flag = On)),None, - [ "Execute interactions on a Windows Forms event"; - "loop (on by default)" - ]); - CompilerOption("quiet","", OptionUnit (fun () -> tcConfigB.noFeedback <- true), None, - [ "Suppress fsi writing to stdout"]); - (* Renamed --readline and --no-readline to --tabcompletion:+|- *) - CompilerOption("readline",tagNone, OptionSwitch (function flag -> readline := (flag = On)),None, - [ "Support TAB completion in console (on by default)" ]); - ]); - ] - -//---------------------------------------------------------------------------- -// printfs - user, error -//---------------------------------------------------------------------------- - -let nullOut = new StreamWriter(Stream.Null) :> TextWriter -let kfprintf f (os:TextWriter) fmt = Printf.ktwprintf f os fmt -let fprintfnn (os: TextWriter) fmt = kfprintf (fun _ -> os.WriteLine(); os.WriteLine()) os fmt -/// uprintf to write usual responses to stdout (suppressed by --quiet), with various pre/post newlines -let uprintf fmt = fprintf (if tcConfigB.noFeedback then nullOut else System.Console.Out) fmt -let uprintfn fmt = fprintfn (if tcConfigB.noFeedback then nullOut else System.Console.Out) fmt -let uprintfnn fmt = fprintfnn (if tcConfigB.noFeedback then nullOut else System.Console.Out) fmt -let uprintnf fmt = uprintfn ""; uprintf fmt -let uprintnfn fmt = uprintfn ""; uprintfn fmt -let uprintnfnn fmt = uprintfn ""; uprintfnn fmt - -/// eprintf to write errors to stderr (not suppressable (yet)) -let eprintf fmt = eprintf fmt - - - -//---------------------------------------------------------------------------- -// Run "f x" on GUI thread, resorting to "dflt" if failure -//---------------------------------------------------------------------------- - -let RunCodeOnWinFormsMainThread (mainForm : Control) f = - if !progress then dprintf "RunCodeOnWinFormsMainThread: entry...\n"; - - // Workaround: Mono's Control.Invoke returns a null result. Hence avoid the problem by - // transferring the resulting state using a mutable location. - // Note ownership of this mutable location gets temporarily transferred between threads, - // but it is not concurrently read/written because Invoke is blocking. - let mainFormInvokeResultHolder = ref None - - // Actually, Mono's Control.Invoke isn't even blocking (or wasn't on 1.1.15)! So use a signal to indicate completion. - // Indeed, we should probably do this anyway with a timeout so we can report progress from - // the GUI thread. - use doneSignal = new AutoResetEvent(false) - - if !progress then dprintf "RunCodeOnWinFormsMainThread: invoking...\n"; - // BLOCKING: This blocks the stdin-reader thread until the - // form invocation has completed. NOTE: does not block on Mono - mainForm.Invoke(new MethodInvoker(fun () -> - try - mainFormInvokeResultHolder := Some(f ()); - finally - doneSignal.Set() |> ignore)) |> ignore; - let handles = Array.of_list [ (doneSignal :> WaitHandle) ] - if !progress then dprintf "RunCodeOnWinFormsMainThread: Waiting for completion signal....\n"; - while not (doneSignal.WaitOne(new TimeSpan(0,0,1),true)) do - if !progress then dprintf "."; stdout.Flush() - - if !progress then dprintf "RunCodeOnWinFormsMainThread: Got completion signal, res = %b\n" (Option.is_some !mainFormInvokeResultHolder); - !mainFormInvokeResultHolder |> Option.get - - -//---------------------------------------------------------------------------- -// Reporting - warnings, errors -//---------------------------------------------------------------------------- - -let syphon = new Syphon() -let errorLogger = ErrorLoggerThatStopsOnFirstError(tcConfigB,syphon) - -let _ = InstallGlobalErrorLogger(fun _ -> errorLogger) - - -//---------------------------------------------------------------------------- -// cmd line - parse options and process inputs -//---------------------------------------------------------------------------- - -let argv = System.Environment.GetCommandLineArgs() -/// Process command line, flags and collect filenames -/// The ParseCompilerOptions function calls imperative function to process "real" args -/// Rather than start processing, just collect names, then process them. -let sourceFiles = - let inputFilesAcc = ref ([] : (string * bool) list) - let collect name = - let fsx = Build.IsScript name - inputFilesAcc := !inputFilesAcc @ [(name,fsx)] (* O(n^2), but n small... *) - (try - let fsiCompilerOptions = fsiUsagePrefix inputFilesAcc tcConfigB @ GetCoreFsiCompilerOptions tcConfigB @ fsiUsageSuffix tcConfigB - let abbrevArgs = abbrevFlagSet tcConfigB false - ParseCompilerOptions collect fsiCompilerOptions (List.tl (PostProcessCompilerArgs abbrevArgs argv)) - with e -> - stopProcessingRecovery e range0; exit 1); - !inputFilesAcc - -do - if tcConfigB.utf8output then - let prev = System.Console.OutputEncoding - System.Console.OutputEncoding <- System.Text.Encoding.UTF8 - System.AppDomain.CurrentDomain.ProcessExit.Add(fun _ -> System.Console.OutputEncoding <- prev) - -do - let firstArg = - match sourceFiles with - | [] -> argv.[0] - | _ -> fst (List.hd (List.rev sourceFiles) ) - let args = Array.of_list (firstArg :: !explicitArgs) - fsi.CommandLineArgs <- args - - -//---------------------------------------------------------------------------- -// Banner -//---------------------------------------------------------------------------- - -let prompt = if IsInteractiveServer() then "SERVER-PROMPT>\n" else "> " -let banner() = - uprintnfn "Microsoft F# Interactive, (c) Microsoft Corporation, All Rights Reserved"; - uprintfnn "F# Version %s, compiling for .NET Framework Version %s" Ilxconfig.version (Ilsupp.clrVersion()); - uprintfn "Please send bug reports to fsbugs@microsoft.com"; - uprintfn "For help type #help;;" - -let help() = - uprintfn "" - uprintfnn " F# Interactive directives:"; - uprintfn " #r \"file.dll\";; reference (dynamically load) the given DLL."; - uprintfn " #I \"path\";; add the given search path for referenced DLLs."; -#if SUPPORT_USE - uprintfn " #use \"file.fs\";; use the given file, as if typed in."; -#endif - uprintfn " #load \"file.fs\" ...;; load the given file(s) as if compiled and referenced."; - uprintfn " #time [\"on\"|\"off\"\"];; toggle timing on/off."; - uprintfn " #help;; display help." - uprintfn " #quit;; exit."; (* last thing you want to do, last thing in the list - stands out more *) - uprintfn ""; - uprintfnn " F# Interactive command line options:" - uprintfn " See 'fsi --help' for options"; - uprintfn ""; - if IsInteractiveServer() then - uprintfnn " Visual Studio key bindings:"; - uprintfn " Up/Down = cycle history"; - uprintfn " CTRL-DOT = interrupt session"; (* CTRL-DOT in Visual Studio *) - uprintfn " ALT-ENTER = send selected source text to FSI session (adds ;;)"; - uprintfn "" - uprintfn " Please send bug reports to fsbugs@microsoft.com"; (* final message. Ask for bugs and *feedback* ? *) - uprintfn ""; - - -//---------------------------------------------------------------------------- -// TabletPC warning, in case of imminent system hang! -//---------------------------------------------------------------------------- - -/// Determining Whether a PC is a Tablet PC -/// http://msdn2.microsoft.com/en-us/library/ms700675(VS.85).aspx -/// http://blogs.msdn.com/swick/archive/2007/11/04/tabletpc-development-gotchas-part3-semantics-of-getsystemmetrics-sm-tabletpc-a.aspx -[] -extern bool GetSystemMetrics(int); -let WarningForTabletPC() = - try - let SM_TABLETPC = 86 - if GetSystemMetrics(SM_TABLETPC) then - uprintfn "NOTE:" - uprintfn "NOTE: For Tablet PC (Input Service) users:" - uprintfn "NOTE: If the 'Tablet PC Input Service' is running, the system might hang." - uprintfn "NOTE: See the XP hotfix http://support.microsoft.com/kb/925271" (* intended no full stop, keep URL clear *) - uprintfn "NOTE: If this occurs, please report to fsbugs@microsoft.com" - with e -> - () // maybe Mono. - - -/// Set the input/output encoding. The use of a thread is due to a known bug on -/// on Vista where calls to System.Console.InputEncoding can block the process. -let SetServerCodePages() = - match !fsiServerInputCodePage, !fsiServerOutputCodePage with - | None,None -> () - | inputCodePageOpt,outputCodePageOpt -> - let successful = ref false - Async.Spawn (async { do match inputCodePageOpt with - | None -> () - | Some(n:int) -> - let encoding = System.Text.Encoding.GetEncoding(n) in - // Note this modifies the real honest-to-goodness settings for the current shell. - // and the modifiations hang around even after the process has exited. - System.Console.InputEncoding <- encoding - do match outputCodePageOpt with - | None -> () - | Some(n:int) -> - let encoding = System.Text.Encoding.GetEncoding(n) in - // Note this modifies the real honest-to-goodness settings for the current shell. - // and the modifiations hang around even after the process has exited. - System.Console.OutputEncoding <- encoding - do successful := true }); - for pause in [10;50;100;1000;2000;10000] do - if not !successful then - System.Threading.Thread.Sleep(pause); - if not !successful then - System.Windows.Forms.MessageBox.Show("A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'") |> ignore - - -//---------------------------------------------------------------------------- -// Prompt printing -//---------------------------------------------------------------------------- - -// A prompt gets "printed ahead" at start up. Tells users to start type while initialisation completes. -// A prompt can be skipped by "silent directives", e.g. ones sent to FSI by VS. -let mutable dropPrompt = 0 -let promptPrint() = if dropPrompt = 0 then uprintf "%s" prompt else dropPrompt <- dropPrompt - 1 -let promptPrintAhead() = dropPrompt <- dropPrompt + 1; uprintf "%s" prompt -let promptSkipNext() = dropPrompt <- dropPrompt + 1 - - -//---------------------------------------------------------------------------- -// Startup... -//---------------------------------------------------------------------------- - -do if tcConfigB.showBanner then banner() -do if not runningOnMono then WarningForTabletPC() -do (try SetServerCodePages() with e -> warning(e)) -do uprintfn "" -do if isNil sourceFiles then promptPrintAhead() (* When no source files to load, print ahead prompt here *) - - -//---------------------------------------------------------------------------- -// Startup processing -//---------------------------------------------------------------------------- - -let consoleLooksFunctional() = - if not !probeToSeeIfConsoleWorks then true else - try - // Probe to see if the console looks functional on this version of .NET - let _ = System.Console.KeyAvailable - let _ = System.Console.ForegroundColor - let _ = System.Console.CursorLeft <- System.Console.CursorLeft - true - with e -> - (* warning(Failure("Note: there was a problem setting up custom readline console support. Consider starting fsi.exe with the --no-readline option")); *) - false - -let consoleOpt = - // The "console.fs" code does a limitted form of "TAB-completion". - // Currently, it turns on if it looks like we have a console. - // - // UNDER REVIEW: - // Choose suitable defaults and allow user override via /switch? - // e.g. In VFSI, never use console code. [IsInteractiveServer() should be condition, not check]. - // e.g. On Mono, if still problematic, then default to off? - // Once defaults and user switch considered, if exceptions thrown, report them and fallback?? - if !readline && consoleLooksFunctional() then - Some(new Microsoft.FSharp.Compiler.Interactive.ReadLineConsole(fun (s1,s2) -> Seq.empty)) - else - None - -// When VFSI is running, there should be no "console", and in particular the console.fs readline code should not to run. -do if IsInteractiveServer() then assert(consoleOpt = None) - -/// This threading event gets set after the first-line-reader has finished its work -let consoleReaderStartupDone = new ManualResetEvent(false) - -/// When using a key-reading console this holds the first line after it is read -let consoleFirstLine : string option ref = ref None - -/// Peek on the standard input so that the user can type into it from a console window. -do if !interact then - if !peekAheadOnConsoleToPermitTyping then - (new Thread(fun () -> - match consoleOpt with - | Some console when !readline && not (IsInteractiveServer()) -> - if isNil(sourceFiles) then ( - if !progress then dprintf "first-line-reader-thread reading first line...\n"; - consoleFirstLine := Some(console.ReadLine()); - if !progress then dprintf "first-line-reader-thread got first line = %s...\n" (any_to_string !consoleFirstLine); - ); - consoleReaderStartupDone.Set() |> ignore - if !progress then dprintf "first-line-reader-thread has set signal and exited.\n" ; - | _ -> - ignore(Console.In.Peek()); - consoleReaderStartupDone.Set() |> ignore - )).Start() - else - consoleReaderStartupDone.Set() |> ignore - -/// FSI does a "startup" interaction to automatically page all the libary information. -/// This is mainly information for the typechecker environment. -/// Printing a prompt first means it should happen while the first line is being entered, -/// so effectively the background. - -//---------------------------------------------------------------------------- -// parsing - ParseInteraction -//---------------------------------------------------------------------------- - -let ParseInteraction (tokenizer:Lexfilter.LexFilter) = - let lastToken = ref Parser.ELSE (* Bug 1935: any token <> SEMICOLON_SEMICOLON will do for initial value *) - try - if !progress then dprintf "In ParseInteraction...\n"; - - let input = - Lexhelp.reusingLexbufForParsing (tokenizer.lexbuf,None) (fun () -> - let lexer = tokenizer.lexer - let lexbuf = tokenizer.lexbuf - let lexer = fun lexbuf -> (let tok = lexer lexbuf - lastToken := tok; - tok) - Parser.interaction lexer lexbuf) - Some input - with e -> - // Bug 1935. On error, consume tokens until to ;; or EOF. - // Caveat: Unless the error parse ended on ;; - so check the lastToken returned by the lexer function. - // Caveat: What if this was a look-ahead? That's fine! Since we need to skip to the ;; anyway. - if !lastToken <> Parser.SEMICOLON_SEMICOLON then - let lexer = tokenizer.lexer - let lexbuf = tokenizer.lexbuf - let mutable tok = Parser.ELSE (* <-- any token <> SEMICOLON_SEMICOLON will do *) - while tok <> Parser.SEMICOLON_SEMICOLON && not lexbuf.IsPastEndOfStream do - tok <- lexer lexbuf - - stopProcessingRecovery e range0; - None - -//---------------------------------------------------------------------------- -// tcImports, typechecker globals etc. -//---------------------------------------------------------------------------- - -let tcGlobals,tcImports = - try - TcImports.BuildTcImports(tcConfigP) - with e -> - stopProcessingRecovery e range0; exit 1 - -let ilGlobals = tcGlobals.ilg - -//---------------------------------------------------------------------------- -// global objects -//---------------------------------------------------------------------------- - -let niceNameGen = NiceNameGenerator() -// Share intern'd strings across all lexing/parsing -let lexResourceManager = new Lexhelp.LexResourceManager() -let rangeStdin = rangeN stdinMockFilename 0 - -//---------------------------------------------------------------------------- -// Final linking -//---------------------------------------------------------------------------- - -/// Add attributes -let CreateModuleFragment assemblyName codegenResults = - if !progress then dprintf "Creating main module...\n"; - let mainModule = mk_simple_mainmod assemblyName (fsharpModuleName tcConfigB.target assemblyName) (tcConfigB.target = Dll) (mk_tdefs codegenResults.ilTypeDefs) None None 0x0 - { mainModule - with modulManifest = - (let man = mainModule.ManifestOfAssembly - Some { man with manifestCustomAttrs = mk_custom_attrs codegenResults.ilAssemAttrs }); } - - -//---------------------------------------------------------------------------- -// Compute assembly names -//---------------------------------------------------------------------------- - -#if FX_ATLEAST_40 // REVIEW: bug 3383 -let generateDebugInfo = false -#else -let generateDebugInfo = tcConfigB.debuginfo -#endif - -let outfile,pdbfile,assemblyName = "TMPFSCI.exe",None,"FSI-ASSEMBLY" - -let assemblyBuilder,moduleBuilder = Ilreflect.mkDynamicAssemblyAndModule assemblyName generateDebugInfo - -let writer = moduleBuilder.GetSymWriter() - - -//---------------------------------------------------------------------------- -// InteractionState -//---------------------------------------------------------------------------- - -[] -type InteractionState = - { optEnv : Opt.IncrementalOptimizationEnv; - emEnv : Ilreflect.emEnv; - tcGlobals : Env.TcGlobals; - tcState : Build.tcState; - ilxGenEnv : Ilxgen.ilxGenEnv; - timing : bool; - } - - -let tcLockObject = box 7 // any new object will do -let tcLock thunk = - lock tcLockObject (fun _ -> thunk()) - -//---------------------------------------------------------------------------- -// ParseOneInputFile -//---------------------------------------------------------------------------- - -let ProcessInputs i istate inputs showTypes isIncrementalFragment prefixPath = - let optEnv = istate.optEnv - let emEnv = istate.emEnv - let tcState = istate.tcState - let ilxGenEnv = istate.ilxGenEnv - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - - // typecheck - let tcState,topCustomAttrs,declaredImpls,tcEnvAtEndOfLastInput = - - tcLock (fun _ -> TypecheckClosedInputSet(errorLogger.CheckForNoErrors,tcConfig,tcImports,tcGlobals, Some prefixPath,tcState,inputs)) - - - // Logging/debugging - if tcConfig.printAst then - let (TAssembly(declaredImpls)) = declaredImpls - for input in declaredImpls do - dprintf "AST:\n%+A\n" input - - errorLogger.AbortOnError(); - - let importMap = tcImports.GetImportMap() - - (*moved printing of response to after the effects are executed because values may now be shown *) - - // optimize: note we collect the incremental optimization environment - let optimizedImpls, optData, optEnv = - ApplyAllOptimizations (tcConfig,tcGlobals,outfile,importMap,isIncrementalFragment,optEnv,tcState.Ccu,declaredImpls) - errorLogger.AbortOnError(); - - // codegen: note we collect the incremental optimization environment - let fragName = text_of_lid prefixPath - let codegenResults = GenerateIlxCode(true,runningOnMono,tcGlobals,tcConfig,importMap,topCustomAttrs,optimizedImpls,tcState.Ccu,fragName,ilxGenEnv) - errorLogger.AbortOnError(); - //if assemAttrs <> [] or modulAttrs <> [] then warning(Failure("Assembly attributes are ignored by by F# Interactive")); - - // Each fragment is like a small separately compiled extension to a single source file. - // The incremental extension to the environment is dictated by the "signature" of the values as they come out - // of the type checker. Hence we add the declaredImpls (unoptimized) to the environment, rather than the - // optimizedImpls. - let ilxGenEnv = Ilxgen.AddIncrementalLocalAssmblyFragmentToIlxGenEnv isIncrementalFragment tcGlobals tcState.Ccu fragName ilxGenEnv declaredImpls in - - ReportTime tcConfig "TAST -> ILX"; - errorLogger.AbortOnError(); - - (* step *) - ReportTime tcConfig "Linking"; - let ilxMainModule = CreateModuleFragment assemblyName codegenResults - - errorLogger.AbortOnError(); - - (* step *) - ReportTime tcConfig "ILX -> IL"; - let (ilxMainModule : ILModuleDef) = Ilxerase.ConvModule ilGlobals ilxMainModule - errorLogger.AbortOnError(); - - ReportTime tcConfig "Assembly refs Normalised"; - let mainmod3 = Ilmorph.module_scoref2scoref_memoized (NormalizeAssemblyRefs tcImports) ilxMainModule - errorLogger.AbortOnError(); - -#if DEBUG - if !showILCode then - uprintnfn "--------------------"; - Ilprint.output_module stdout mainmod3; - uprintnfn "--------------------" -#endif - - ReportTime tcConfig "Reflection.Emit"; - let emEnv,execs = Ilreflect.emitModuleFragment ilGlobals emEnv assemblyBuilder moduleBuilder mainmod3 generateDebugInfo - if !saveEmittedCode then assemblyBuilder.Save(assemblyName ^ ".dll"); - errorLogger.AbortOnError(); - - // Explicitly register the resources with the Sreflect module - // We would save them as resources into the dynamic assembly but there is missing - // functionality System.Reflection for dynamic modules that means they can't be read back out - //printf "#resources = %d\n" (length resources); - for bytes in codegenResults.quotationResourceBytes do - Microsoft.FSharp.Quotations.Expr.RegisterReflectedDefinitions (assemblyBuilder, fragName, bytes); - - - ReportTime tcConfig "Run Bindings"; - timeReporter.TimeOpIf istate.timing (fun () -> - execs |> List.iter (fun exec -> - match exec() with - | Some(e) -> - eprintf "%s\n" (e.ToString()); - errorLogger.SetError() - errorLogger.AbortOnError(); - | None -> ())) ; - - errorLogger.AbortOnError(); - - // Echo the decls (reach inside wrapping) - // This code occurs AFTER the execution of the declarations. - // So stored values will have been initialised, modified etc. - if showTypes && not tcConfig.noFeedback then - let denv = tcState.TcEnvFromImpls.DisplayEnv - let denv = if isIncrementalFragment then - // Extend denv with a (Val -> layout option) function for printing of val bindings. - {denv with generatedValueLayout = ValuePrinting.invokeDeclLayout istate.tcGlobals emEnv ilxGenEnv} - else - denv (* with #load items, the vals in the inferred signature do not tied up with those generated. Disabling printing. *) - // open the path for the fragment we just compiled - let denv = denv_add_open_path (path_of_lid prefixPath) denv - - let (TAssembly(declaredImpls)) = declaredImpls - for (TImplFile(qname,_,mexpr)) in declaredImpls do - let responseL = NicePrint.InferredSigOfModuleExprL false denv mexpr - if not (Layout.isEmptyL responseL) then - uprintfn ""; - // There are two copies of the layout sqashTo code (one in compiler, one in library). - // The library one converts Leaf objects to strings on the fly. - // The compiler one expects Lead objects to be strings already. - let opts = Microsoft.FSharp.Compiler.Interactive.Internals.GetFsiPrintOptions() - let responseL = Internal.Utilities.StructuredFormat.Display.squash_layout opts responseL - Layout.renderL (Layout.channelR stdout) responseL |> ignore - uprintfnn "" - - let istate = {istate with optEnv = optEnv; - emEnv = emEnv; - ilxGenEnv = ilxGenEnv; - tcState = tcState } - istate,tcEnvAtEndOfLastInput - - -//---------------------------------------------------------------------------- -// EvalDefns, EvalExpr -//---------------------------------------------------------------------------- - -let mkId str = mksyn_id rangeStdin str -let modIdN i = mkId (DynamicModulePrefix ^ sprintf "%04d" i) // shows exn traces, make clear and fixed width -let newModPathN i = [modIdN i] -let genIntI = let i = ref 0 in fun () -> incr i; !i - -let EvalInputsFromLoadedFiles istate inputs = - let i = genIntI() - let prefix = newModPathN i - // Ensure the path includes the qualifying name - let inputs = inputs |> List.map (PrependPathToInput prefix) - let istate,_ = ProcessInputs i istate inputs true false prefix - istate - -let EvalDefns istate showTypes defs = - let ml = false - let filename = stdinMockFilename - let i = genIntI() - let prefix = newModPathN i - let prefixPath = path_of_lid prefix - let impl = ModuleOrNamespaceImpl(prefix,true, (* true indicates module, false namespace *) defs,emptyPreXmlDoc,[],None,rangeStdin) - let input = ImplFileInput(ImplFile(filename,true, QualFileNameOfUniquePath (rangeStdin,prefixPath),[],[],[impl],true (* canContainEntryPoint *) )) - let istate,tcEnvAtEndOfLastInput = ProcessInputs i istate [input] showTypes true prefix - let tcState = istate.tcState - { istate with tcState = tcState.NextStateAfterIncrementalFragment(tcEnvAtEndOfLastInput) } - -let EvalExpr istate expr = - let m = rangeStdin - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - let itName = "it" - let itID = mksyn_id m itName - let itExp = Expr_id_get itID - let exprA = expr - let exprB = Expr_app(ExprAtomicFlag.NonAtomic, Expr_lid_get(false, List.map mkId saverPath,m), itExp,m) - let mkBind pat expr = Binding(None,DoBinding,false,false,[],emptyPreXmlDoc,SynInfo.emptyValSynData,pat,BindingRhs([],None,expr),m,NoSequencePointAtInvisibleBinding) - let bindingA = mkBind (mksyn_pat_var None itID) exprA (* let it = *) - let bindingB = mkBind (Pat_wild m) exprB (* let _ = it *) - let defA = Def_let (false, [bindingA], m) - let defB = Def_let (false, [bindingB], m) - let istate = EvalDefns istate false [defA;defB] - // Snarf the type for 'it' via the binding - match istate.tcState.TcEnvFromImpls |> Tc.items_of_tenv |> NameMap.find itName with - | Nameres.Item_val vref -> - if not tcConfig.noFeedback then - ValuePrinting.invokeExprPrinter istate.tcState.TcEnvFromImpls.DisplayEnv (deref_val vref) - | _ -> () - istate - -let EvalRequireDll istate m path = - if IsInvalidPath(path) then - error(Error(Printf.sprintf "'%s' is not a valid assembly name" path,m)) - // Check the file can be resolved before calling requireDLLReference - let _ = tcImports.ResolveLibFile(AssemblyReference(m,path),ResolveLibFileMode.ReportErrors) - tcConfigB.AddReferencedAssemblyByPath(m,path); - let tcState = istate.tcState - let tcEnv,(dllinfos,ccuinfos) = RequireDLL tcImports tcState.TcEnvFromImpls m path - let optEnv = List.fold AddExternalCcuToOpimizationEnv istate.optEnv ccuinfos - let ilxGenEnv = AddExternalCcusToIlxGenEnv tcGlobals istate.ilxGenEnv (ccuinfos |> List.map (fun ccuinfo -> ccuinfo.FSharpViewOfMetadata)) - dllinfos, - { istate with tcState = tcState.NextStateAfterIncrementalFragment(tcEnv); - optEnv = optEnv; - ilxGenEnv = ilxGenEnv } - -let WithImplicitHome dir f = - let old = tcConfigB.implicitIncludeDir - tcConfigB.implicitIncludeDir <- dir; - try f() - finally tcConfigB.implicitIncludeDir <- old - -let ProcessMetaCommandsFromInputAsInteractiveCommands m istate sourceFile inp = - let inp = - match inp with - | SigFileInput(_) -> inp - | ImplFileInput(ImplFile(filename,isScript,qualName,scopedPragmas,hashDirectives,impls,canContainEntryPoint)) -> - if isScript then - warning(Build.HashLoadedScriptConsideredSource(m)) - ImplFileInput(ImplFile(filename,false,qualName,scopedPragmas,hashDirectives,impls,canContainEntryPoint)) - else - inp - // REVIEW:2988 move loading printing to here... - WithImplicitHome - (dirname sourceFile) - (fun () -> - ProcessMetaCommandsFromInput - ((fun st (m,nm) -> tcConfigB.TurnWarningOff(m,nm); st), - (fun st (m,nm) -> snd (EvalRequireDll st m nm)), - (fun st (m,nm) -> ())) - tcConfigB - inp - istate) - -let EvalLoadFiles istate m sourceFiles = - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - match sourceFiles with - | [] -> istate - | _ -> - // use source file as if it were a module - // REVIEW:2988 move loading printing to here... - let sourceFiles = sourceFiles |> List.map (fun nm -> tcConfig.ResolveSourceFile(m,nm)) - // Intent "[Loading %s]\n" (String.concat "\n and " sourceFiles) - uprintf "[Loading " - sourceFiles |> List.iteri (fun i sourceFile -> if i=0 then (uprintf "%s" sourceFile) - else (uprintnf " and %s" sourceFile)) - uprintfn "]" - let inputs = - sourceFiles - |> List.map (fun file -> Fscopts.ParseOneInputFile(tcConfig,lexResourceManager,["INTERACTIVE"],file,true,errorLogger)) - errorLogger.AbortOnError(); - if List.exists (function None -> true | _ -> false) inputs then failwith "parse error"; - let inputs = List.map Option.get inputs - let istate = List.fold_left2 (ProcessMetaCommandsFromInputAsInteractiveCommands m) istate sourceFiles inputs - EvalInputsFromLoadedFiles istate inputs - -//---------------------------------------------------------------------------- -// FsiIntellisense - v1 - identifier completion - namedItemInEnvL -//---------------------------------------------------------------------------- - -let CompletionsForPartialLID istate (prefix:string) = - let lid,stem = - if prefix.IndexOf(".",StringComparison.Ordinal) >= 0 then - let parts = prefix.Split(Array.of_list ['.']) - let n = parts.Length - Array.sub parts 0 (n-1) |> Array.to_list,parts.[n-1] - else - [],prefix - let tcState = istate.tcState (* folded through now? *) - let amap = tcImports.GetImportMap() - let infoReader = new Infos.InfoReader(tcGlobals,amap) - let ncenv = new Nameres.NameResolver(tcGlobals,amap,infoReader,Nameres.FakeInstantiationGenerator) - // Note: for the accessor domain we should use (AccessRightsOfEnv tcState.TcEnvFromImpls) - let ad = Infos.AccessibleFromSomeFSharpCode - let nItems = Nameres.ResolvePartialLongIdent ncenv (Tc.nenv_of_tenv tcState.TcEnvFromImpls) rangeStdin ad lid false - let names = nItems |> List.map (Nameres.DisplayNameOfItem tcGlobals) - let names = names |> List.filter (fun (name:string) -> name.StartsWith(stem,StringComparison.Ordinal)) - names - -//---------------------------------------------------------------------------- -// FsiIntellisense (posible feature for v2) - GetDeclarations -//---------------------------------------------------------------------------- - -let FsiGetDeclarations istate (text:string) (names:string[]) = - try - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - Microsoft.FSharp.Compiler.SourceCodeServices.FsiIntelisense.getDeclarations - (tcConfig, - tcGlobals, - tcImports, - istate.tcState) - text - names - with - e -> - System.Windows.Forms.MessageBox.Show("FsiGetDeclarations: throws:\n" ^ e.ToString()) |> ignore; - [| |] - - -//---------------------------------------------------------------------------- -// ctrl-c handling -//---------------------------------------------------------------------------- - -module ControlC = - - type ControlEventHandler = delegate of int -> bool - - [] - extern bool SetConsoleCtrlHandler(ControlEventHandler callback,bool add) - - // One strange case: when a TAE happens a strange thing - // occurs the next read from stdin always returns - // 0 bytes, i.e. the channel will look as if it has been closed. So we check - // for this condition explicitly. We also recreate the lexbuf whenever CtrlC kicks. - type StdinState = StdinEOFPermittedBecauseCtrlCRecentlyPressed | StdinNormal - let stdinState = ref StdinNormal - let CTRL_C = 0 - let mainThread = Thread.CurrentThread - - type SignalProcessorState = - | CtrlCCanRaiseException - | CtrlCIgnored - - type KillerThreadRequest = - | ThreadAbortRequest - | NoRequest - | ExitRequest - | PrintInterruptRequest - - let ctrlcState = ref CtrlCIgnored - let killThreadRequest = ref NoRequest - let ctrlEventHandlers = ref [] : ControlEventHandler list ref - let ctrlEventActions = ref [] : (unit -> unit) list ref - - // Currently used only on Mono/Posix - type PosixSignalProcessor() = - let mutable reinstate = (fun () -> ()) - member x.Reinstate with set(f) = reinstate <- f - member x.Invoke(n:int) = - // we run this code once with n = -1 to make sure it is JITted before execution begins - // since we are not allowed to JIT a signal handler. THis also ensures the "Invoke" - // method is not eliminated by dead-code elimination - if n >= 0 then - reinstate(); - stdinState := StdinEOFPermittedBecauseCtrlCRecentlyPressed; - killThreadRequest := if (!ctrlcState = CtrlCCanRaiseException) then ThreadAbortRequest else PrintInterruptRequest - - // REVIEW: streamline all this code to use the same code on Windows and Posix. - let InstallCtrlCHandler((threadToKill:Thread),(pauseMilliseconds:int)) = - if !progress then dprintf "installing CtrlC handler\n"; - // WINDOWS TECHNIQUE: .NET has more safe points, and you can do more when a safe point. - // Hence we actually start up the killer thread within the handler. - try - let raiseCtrlC() = - Printf.eprintf "\n- Interrupt\n"; - stdinState := StdinEOFPermittedBecauseCtrlCRecentlyPressed; - if (!ctrlcState = CtrlCCanRaiseException) then - killThreadRequest := ThreadAbortRequest; - let killerThread = - new Thread(new ThreadStart(fun () -> - // sleep long enough to allow ControlEventHandler handler on main thread to return - // Also sleep to give computations a bit of time to terminate - Thread.Sleep(pauseMilliseconds); - if (!killThreadRequest = ThreadAbortRequest) then - if !progress then uprintnfn "- Aborting main thread..."; - killThreadRequest := NoRequest; - threadToKill.Abort(); - ()),Name="ControlCAbortThread") - killerThread.IsBackground <- true; - killerThread.Start() - - let ctrlEventHandler = new ControlEventHandler(fun i -> if i = CTRL_C then (raiseCtrlC(); true) else false ) - ctrlEventHandlers := ctrlEventHandler :: !ctrlEventHandlers; - ctrlEventActions := raiseCtrlC :: !ctrlEventActions; - let resultOK = SetConsoleCtrlHandler(ctrlEventHandler,true) - //Uncomment if failure is to be reported. - //if not resultOK then - // uprintfn "SetConsoleCtrlHandler: failed to install handler for ctrl-C" - false // don't exit via kill thread - with e -> - if !progress then eprintf "Failed to install ctrl-c handler using Windows technique - trying to install one using Unix signal handling...\n"; - // UNIX TECHNIQUE: We start up a killer thread, and it watches the mutable reference location. - // We can't have a dependency on Mono DLLs (indeed we don't even have them!) - // So SOFT BIND the following code: - // Mono.Unix.Native.Stdlib.signal(Mono.Unix.Native.Signum.SIGINT,new Mono.Unix.Native.SignalHandler(fun n -> PosixSignalProcessor.Invoke(n))) |> ignore; - match (try Choice1Of2(Assembly.Load("Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756")) with e -> Choice2Of2 e) with - | Choice1Of2(monoPosix) -> - try - if !progress then eprintf "loading type Mono.Unix.Native.Stdlib...\n"; - let monoUnixStdlib = monoPosix.GetType("Mono.Unix.Native.Stdlib") - if !progress then eprintf "loading type Mono.Unix.Native.SignalHandler...\n"; - let monoUnixSignalHandler = monoPosix.GetType("Mono.Unix.Native.SignalHandler") - if !progress then eprintf "creating delegate...\n"; - let target = new PosixSignalProcessor() - target.Invoke(-1); - let monoHandler = System.Delegate.CreateDelegate(monoUnixSignalHandler,target,"Invoke") - if !progress then eprintf "registering signal handler...\n"; - let monoSignalNumber = System.Enum.Parse(monoPosix.GetType("Mono.Unix.Native.Signum"),"SIGINT") - let register () = callStaticMethod monoUnixStdlib "signal" [ monoSignalNumber; box monoHandler ] |> ignore - target.Reinstate <- register; - register(); - let killerThread = - new Thread(new ThreadStart(fun () -> - while true do - //Printf.eprintf "\n- kill thread loop...\n"; stderr.Flush(); - Thread.Sleep(pauseMilliseconds*2); - match !killThreadRequest with - | PrintInterruptRequest -> - Printf.eprintf "\n- Interrupt\n"; stderr.Flush(); - killThreadRequest := NoRequest; - | ThreadAbortRequest -> - Printf.eprintf "\n- Interrupt\n"; stderr.Flush(); - if !progress then uprintnfn "- Aborting main thread..."; - killThreadRequest := NoRequest; - threadToKill.Abort() - | ExitRequest -> - // Mono has some wierd behaviour where it blocks on exit - // once CtrlC has ever been pressed. Who knows why? Perhaps something - // to do with having a signal handler installed, but it only happens _after_ - // at least one CtrLC has been pressed. Maybe raising a ThreadAbort causes - // exiting to have problems. - // - // Anyway, we make "#q" work this case by setting ExitRequest and brutally calling - // the process-wide 'exit' - Printf.eprintf "\n- Exit...\n"; stderr.Flush(); - callStaticMethod monoUnixStdlib "exit" [ box 0 ] |> ignore - | _ -> () - done),Name="ControlCAbortAlternativeThread") - killerThread.IsBackground <- true; - killerThread.Start(); - true // exit via kill thread to workaround block-on-exit bugs with Mono once a CtrlC has been pressed - with e -> - eprintf "Failed to install ctrl-c handler. Ctrl-C handling will not be available (sorry). Error was:\n\t%s" e.Message - false - | Choice2Of2 e -> - eprintf "Failed to install ctrl-c handler - Ctrl-C handling will not be available (sorry). Error was:\n\t%s" e.Message - false - -open ControlC - -//---------------------------------------------------------------------------- -// assembly finder -//---------------------------------------------------------------------------- - -module MagicAssemblyResolution = - - // FxCop identifies Assembly.LoadFrom. - [] - let assemblyLoadFrom (path:string) = Assembly.LoadFrom(path) - - do AppDomain.CurrentDomain.add_AssemblyResolve(new ResolveEventHandler(fun _ args -> - try - // Grab the name of the assembly - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - let assemName = args.Name.Split([| ',' |]).[0] - if !progress then uprintfn "ATTEMPT MAGIC LOAD ON ASSEMBLY, assemName = %s" assemName; - - // Special case: Mono Windows Forms attempts to load an assembly called something like "Windows.Forms.resources" - // We can't resolve this, so don't try. - // REVIEW: Suggest 4481, delete this special case. - if assemName.EndsWith(".resources",StringComparison.OrdinalIgnoreCase) or (runningOnMono && assemName = "UIAutomationWinforms") then null else - - // Special case: Is this the global unique dynamic assembly for FSI code? In this case just - // return the dynamic assembly itself. - if assemblyName = assemName then (assemblyBuilder :> Reflection.Assembly) else - - // Otherwise continue - let fileName1 = (assemName + ".dll") - let fileName2 = (assemName + ".exe") - let overallSearchResult = - // OK, try to resolve as a .dll - let searchResult = tcImports.TryResolveLibFile (AssemblyReference(rangeStdin,fileName1),ResolveLibFileMode.Speculative) - - match searchResult with - | OkResult _ -> searchResult - | _ -> - - // OK, try to resolve as a .exe - let searchResult = tcImports.TryResolveLibFile (AssemblyReference(rangeStdin,fileName2),ResolveLibFileMode.Speculative) - - match searchResult with - | OkResult _ -> searchResult - | _ -> - - if !progress then uprintfn "ATTEMPT LOAD, fileName1 = %s" fileName1; - /// Take a look through the files quoted, perhaps with explicit paths - let searchResult = - (tcConfig.referencedDLLs - |> List.tryPick (fun assemblyReference -> - if !progress then uprintfn "ATTEMPT MAGIC LOAD ON FILE, referencedDLL = %s" assemblyReference.Text; - if System.String.Compare(System.IO.Path.GetFileName assemblyReference.Text, fileName1,StringComparison.OrdinalIgnoreCase) = 0 then - Some(tcImports.TryResolveLibFile(assemblyReference,ResolveLibFileMode.Speculative)) - else None )) - - match searchResult with - | Some (OkResult _ as res) -> res - | _ -> - - // OK, assembly resolution has failed, at least according to the F# rules. We now give - // other AssemblyResolve handlers a chance to run. - // This is a specific request from customers who customize the - // AssemblyResolve mechanism to do magic things like going to a distributed company file store - // to pick up DLLs. This is also one of the reasons why the TryResolveLibFile paths can't - // report errors or warnings: we don't want spurious errors and warnings coming out before everyon - // has had a chance to resolve an assembly. - // - // If all other AssemblyResolve also fail then we want to report a "nice" exception. But how do we know if - // they failed? We just add a handler to the end of the AssemblyResolve chain, and if it - // ever gets executed we know they failed. - // - // This is also a fix for bug 1171. - let rec failingResolveHandler = - new ResolveEventHandler(fun _ _ -> - - // OK, the failingResolveHandler is now running now so remove it from the list to prevent it - // ever running again - (try AppDomain.CurrentDomain.remove_AssemblyResolve(failingResolveHandler) with _ -> ()); - - // Now commit the warnings and errors by re-resolving. If the file suddenly exists in the milliseconds - // in between well, then we succeed - tcImports.ResolveLibFile(AssemblyReference(rangeStdin,fileName1),ResolveLibFileMode.ReportErrors).resolvedPath |> assemblyLoadFrom) - - AppDomain.CurrentDomain.add_AssemblyResolve(failingResolveHandler); - ErrorResult([],Failure "no resolution") - - match overallSearchResult with - | ErrorResult _ -> null - | OkResult _ -> - let res = CommitOperationResult overallSearchResult - if assemName <> "Mono.Posix" then uprintfn "Binding session to '%s'..." res.resolvedPath; - assemblyLoadFrom(res.resolvedPath) - - with e -> - stopProcessingRecovery e range0; - null)); - - -//---------------------------------------------------------------------------- -// showInfo -//---------------------------------------------------------------------------- - -// REVIEW: add to RETAIL build? This could be useful diagnostics. Renamed? -#if DEBUG -/// Dump internal state information for diagnostics and regression tests. -let showInfo (istate:InteractionState) = - PrintOptionInfo tcConfigB -#endif - - -//---------------------------------------------------------------------------- -// interactive loop -//---------------------------------------------------------------------------- - -type stepStatus = CtrlC | EndOfFile | Completed | CompletedWithReportedError - -let InteractiveCatch f istate = - try - (* reset error count *) - errorLogger.ResetErrorCount(); - f istate - with e -> - stopProcessingRecovery e range0; - istate,CompletedWithReportedError - -//---------------------------------------------------------------------------- -// Process one parsed interaction. This runs on the GUI thread. -// It might be simpler if it ran on the parser thread. -//---------------------------------------------------------------------------- - -// #light is the default for FSI -let interactiveInputLightSyntaxStatus = - LightSyntaxStatus (tcConfigB.light <> Some(false), false (* no warnings *)) - -let ChangeDirectory (path:string) m = - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - let path = tcConfig.MakePathAbsolute path - if Directory.Exists(path) then - tcConfigB.implicitIncludeDir <- path - else - error(Error(sprintf "Directory '%s' doesn't exist" path,m)) - -let rec execInteraction exitViaKillThread (tcConfig:TcConfig) istate (action:interaction) = - istate |> InteractiveCatch (fun istate -> - // REVIEW: unify this processing of meta-commands with the two techniques used to process - // the meta-commands from files. - match action with - | IDefns ([ ],_) -> - istate,Completed - | IDefns ([ Def_expr(_,expr,m)],_) -> - EvalExpr istate expr,Completed - | IDefns (defs,m) -> - EvalDefns istate true defs,Completed -#if SUPPORT_USE - | IHash (HashDirective("use",[sourceFile],m),_) -> - MainThreadProcessInteractiveFile exitViaKillThread istate (sourceFile,m) -#endif - | IHash (HashDirective("load",sourceFiles,m),_) -> - EvalLoadFiles istate m sourceFiles,Completed - | IHash (HashDirective(("reference" | "r"),[path],m),_) -> - let dllinfos,istate = EvalRequireDll istate m path - dllinfos |> List.iter (fun dllinfo -> uprintnfnn "--> Referenced '%s'" dllinfo.FileName); - istate,Completed - | IHash (HashDirective("I",[path],m),_) -> - tcConfigB.AddIncludePath (m,path); - uprintnfnn "--> Added '%s' to library include path" (tcConfig.MakePathAbsolute path); - istate,Completed - | IHash (HashDirective("cd",[path],m),_) -> - ChangeDirectory path m; - istate,Completed - | IHash (HashDirective("silentCd",[path],m),_) -> - ChangeDirectory path m; - promptSkipNext(); (* "silent" directive *) - istate,Completed - | IHash (HashDirective("time",[],m),_) -> - uprintnfnn "--> Timing now %s" (if istate.timing then "off" else "on"); - {istate with timing = not (istate.timing)},Completed - | IHash (HashDirective("time",[("on" | "off") as v],m),_) -> - uprintnfnn "--> Timing now %s" (if v = "on" then "on" else "off"); - {istate with timing = (v = "on")},Completed - | IHash (HashDirective("nowarn",[d],m),_) -> - tcConfigB.TurnWarningOff(m,d); - istate,Completed - | IHash (HashDirective("terms",[],m),_) -> - tcConfigB.showTerms <- not tcConfig.showTerms; istate,Completed - | IHash (HashDirective("types",[],m),_) -> - showTypes := not (!showTypes); istate,Completed -#if DEBUG - | IHash (HashDirective("ilcode",[],m),_) -> - showILCode := not (!showILCode); istate,Completed - | IHash (HashDirective("info",[],m),_) -> - showInfo istate; istate,Completed -#endif - | IHash (HashDirective("savedll",[],m),_) -> - saveEmittedCode := true; istate,Completed - | IHash (HashDirective("nosavedll",[],m),_) -> - saveEmittedCode := true; istate,Completed - | IHash (HashDirective(("q" | "quit"),[],m),_) -> - if exitViaKillThread then - killThreadRequest := ExitRequest; - Thread.Sleep(1000) - exit 0; - | IHash (HashDirective("help",[],m),_) -> - help(); - istate,Completed - | IHash (HashDirective(c,arg,m),_) -> - uprintfn "Invalid directive '#%s %s'" c (String.concat " " arg); // REVIEW: uprintnfnn - like other directives above - istate,Completed (* REVIEW: cont = CompletedWithReportedError *) - ) - -and execInteractions exitViaKillThread tcConfig istate (action:interaction option) = - // #directive comes through with other definitions as a Def_hash. - // Split these out for individual processing. - let action,nextAction = - match action with - | None -> None ,None - | Some (IHash (hash,m)) -> action,None - | Some (IDefns ([],m)) -> None ,None - | Some (IDefns (Def_hash(hash,mh)::defs,m)) -> Some (IHash(hash,mh)),Some (IDefns(defs,m)) - | Some (IDefns (defs,m)) -> let isDefHash = function Def_hash(_,_) -> true | _ -> false - let defsA = Seq.takeWhile (isDefHash >> not) defs |> Seq.to_list - let defsB = Seq.skipWhile (isDefHash >> not) defs |> Seq.to_list - Some (IDefns(defsA,m)),Some (IDefns(defsB,m)) - match action with - | None -> assert(nextAction = None); istate,Completed - | Some action -> - let istate,cont = execInteraction exitViaKillThread tcConfig istate action - match cont with - | Completed -> execInteractions exitViaKillThread tcConfig istate nextAction - | CompletedWithReportedError -> istate,CompletedWithReportedError (* drop nextAction on error *) - | EndOfFile -> istate,Completed (* drop nextAction on EOF *) - | CtrlC -> istate,CtrlC (* drop nextAction on CtrlC *) - -and MainThreadProcessParsedInteraction exitViaKillThread action istate = - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - try - if !progress then dprintf "In MainThreadProcessParsedInteraction...\n"; - ctrlcState := CtrlCCanRaiseException; - let res = execInteractions exitViaKillThread tcConfig istate action - killThreadRequest := NoRequest; - ctrlcState := CtrlCIgnored; - res - with - | :? ThreadAbortException -> - killThreadRequest := NoRequest; - ctrlcState := CtrlCIgnored; - (try Thread.ResetAbort() with _ -> ()); - (istate,CtrlC) - | e -> - killThreadRequest := NoRequest; - ctrlcState := CtrlCIgnored; - stopProcessingRecovery e range0; - istate,CompletedWithReportedError - -//---------------------------------------------------------------------------- -// Parse then process one parsed interaction. This initially runs on the parser -// thread, then calls runCodeOnMainThread to run on the GUI thread. -// 'ProcessAndRunOneInteractionFromLexbuf' calls the runCodeOnMainThread when it has completed -// parsing and needs to typecheck and execute a definition. Type-checking and execution -// happens on the GUI thread. -//---------------------------------------------------------------------------- - -and ProcessAndRunOneInteractionFromLexbuf exitViaKillThread runCodeOnMainThread istate (tokenizer:Lexfilter.LexFilter) = - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - let lexbuf = tokenizer.lexbuf - if lexbuf.IsPastEndOfStream then - istate,(if !stdinState = StdinEOFPermittedBecauseCtrlCRecentlyPressed then (stdinState := StdinNormal; CtrlC) - else EndOfFile) - else - promptPrint(); - istate |> InteractiveCatch (fun istate -> - // BLOCKING POINT - // When FSI.EXE is waiting for input from the console the - // parser thread is blocked somewhere deep this call. *) - if !progress then dprintf "entering ParseInteraction...\n"; - let action = ParseInteraction tokenizer - if !progress then dprintf "returned from ParseInteraction...\n"; - // After we've unblocked and got something to run we switch - // over to the run-thread (e.g. the GUI thread) - if !progress then dprintf "calling runCodeOnMainThread...\n"; - let res = runCodeOnMainThread (MainThreadProcessParsedInteraction exitViaKillThread action) istate - if !progress then dprintf "Just called runCodeOnMainThread, res = %O...\n" res; - res) - -and MainThreadProcessInteractiveFile exitViaKillThread istate (sourceFile,m) = - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - // Resolve the filename to an absolute filename - let sourceFile = tcConfig.ResolveSourceFile(m,sourceFile) - // During the processing of the file, further filenames are - // resolved relative to the home directory of the loaded file. - WithImplicitHome (dirname sourceFile) (fun () -> - // use source file containing maybe several ;-interaction blocks - let stream,reader,lexbuf = UnicodeLexing.UnicodeFileAsLexbuf(sourceFile,tcConfig.inputCodePage) in - use stream = stream in - use reader = reader in - Lexhelp.resetLexbufPos sourceFile lexbuf; - let skip = true - let defines = "INTERACTIVE"::tcConfig.conditionalCompilationDefines - let lexargs = mkLexargs ((fun () -> tcConfig.implicitIncludeDir),sourceFile,defines, interactiveInputLightSyntaxStatus, lexResourceManager, ref [], errorLogger) in - let tokenizer = Lexfilter.create false interactiveInputLightSyntaxStatus (Lexer.token lexargs skip) lexbuf - let rec run istate = - let istate,cont = ProcessAndRunOneInteractionFromLexbuf exitViaKillThread (fun f istate -> f istate) istate tokenizer - if cont = Completed then run istate else istate,cont - let istate,cont = run istate - match cont with - | Completed -> failwith "MainThreadProcessInteractiveFile: Completed expected to have relooped" - | CompletedWithReportedError -> istate,CompletedWithReportedError - | EndOfFile -> istate,Completed (* here file-EOF is normal, continue required *) - | CtrlC -> istate,CtrlC - ) - - -let rec evalInteractiveFiles istate exitViaKillThread rangeStdin sourceFiles = - match sourceFiles with - | [] -> istate - | sourceFile :: sourceFiles -> - // Catch errors on a per-file basis, so results/bindings from pre-error files can be kept. - let istate,cont = InteractiveCatch (fun istate -> MainThreadProcessInteractiveFile exitViaKillThread istate (sourceFile,rangeStdin)) istate - match cont with - | Completed -> evalInteractiveFiles istate exitViaKillThread rangeStdin sourceFiles - | CompletedWithReportedError -> istate (* do not process any more files *) - | CtrlC -> istate (* do not process any more files *) - | EndOfFile -> assert(false); istate (* This is unexpected. EndOfFile is replaced by Completed in the called function *) - -//---------------------------------------------------------------------------- -// GUI runCodeOnMainThread -//---------------------------------------------------------------------------- - -//type InteractionStateConverter = delegate of InteractionState -> InteractionState * stepStatus - -///Use a dummy to access protected member -type DummyForm() = - inherit Form() - member x.DoCreateHandle() = x.CreateHandle() - -//---------------------------------------------------------------------------- -// initial state and welcome -//---------------------------------------------------------------------------- - -let initialInteractiveState = - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - let optEnv0 = InitialOptimizationEnv tcImports - let emEnv = Ilreflect.emEnv0 - let tcEnv = GetInitialTypecheckerEnv None rangeStdin tcConfig tcImports tcGlobals - let ccuName = assemblyName - - let tcState = TypecheckInitialState (rangeStdin,ccuName,tcConfig,tcGlobals,niceNameGen,tcEnv) - - let ilxgenEnv0 = IlxgenEnvInit(tcConfig,tcImports,tcGlobals,tcState.Ccu ) - {optEnv = optEnv0; - emEnv = emEnv; - tcGlobals = tcGlobals; - tcState = tcState; - ilxGenEnv = ilxgenEnv0; - timing = false; - } - - -//---------------------------------------------------------------------------- -// interactive state ref - most recent istate -//---------------------------------------------------------------------------- - -let istateRef = ref initialInteractiveState - -// Update the console completion function now we've got an initial type checking state. -// This means completion doesn't work until the initial type checking state has finished loading - fair enough! -begin - match consoleOpt with - | Some console when !readline -> - console.SetCompletion(fun (s1,s2) -> - CompletionsForPartialLID !istateRef - (match s1 with - | Some s -> s + "." + s2 - | None -> s2) - |> Seq.of_list) - | _ -> - () -end - -//---------------------------------------------------------------------------- -// Reading stdin -//---------------------------------------------------------------------------- - -let LexbufFromLineReader readf : UnicodeLexing.Lexbuf = - UnicodeLexing.FunctionAsLexbuf - (fun (buf: char[], start, len) -> - //dprintf "Calling ReadLine\n"; - let inputOption = try Some(readf()) with :? EndOfStreamException -> None - inputOption |> Option.iter (fun t -> syphon.Add (t + "\n")); - match inputOption with - | Some(null) | None -> - if !progress then dprintf "End of file from TextReader.ReadLine\n"; - 0 - | Some (input:string) -> - let input = input + "\n" - let ninput = input.Length - if ninput > len then eprintf "Warning: line too long, ignoring some characters\n"; - let ntrimmed = min len ninput - for i = 0 to ntrimmed-1 do - buf.[i+start] <- input.[i] - ntrimmed - ) - - -let TrySetUnhandledExceptionMode() = - let i = ref 0 // stop inlining - try - Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException) - incr i;incr i;incr i;incr i;incr i;incr i; - with _ -> - decr i;decr i;decr i;decr i;() - -//---------------------------------------------------------------------------- -// Reading stdin as a lex stream -//---------------------------------------------------------------------------- - -let removeZeroCharsFromString (str:string) = (* bug://4466 *) - if str<>null && str.Contains("\000") then - System.String(str |> Seq.filter (fun c -> c<>'\000') |> Seq.to_array) - else - str - -let MkStdinLexer () = - let lexbuf = - match consoleOpt with - | Some console when !readline && not (IsInteractiveServer()) -> - LexbufFromLineReader (fun () -> match !consoleFirstLine with Some l -> (consoleFirstLine := None; l) | None -> console.ReadLine()) - | _ -> - LexbufFromLineReader (fun () -> System.Console.In.ReadLine() |> removeZeroCharsFromString) - //lexbufFromTextReader Encoding.UTF8 System.Console.In - Lexhelp.resetLexbufPos stdinMockFilename lexbuf; - syphon.Reset(); - let lexargs = mkLexargs ((fun () -> tcConfigB.implicitIncludeDir),stdinMockFilename,"INTERACTIVE"::tcConfigB.conditionalCompilationDefines,interactiveInputLightSyntaxStatus,lexResourceManager, ref[], errorLogger) in - let skip = true (* don't report whitespace from lexer *) - (* A single hardWhite tokenizer must be shared for the entire *) - (* use of this lexbuf. *) - let tokenizer = Lexfilter.create false interactiveInputLightSyntaxStatus (Lexer.token lexargs skip) lexbuf - tokenizer - -//do Console.Out.Encoding <- Encoding.UTF8 -//do Console.Error.Encoding <- Encoding.UTF8 - -//---------------------------------------------------------------------------- -// main() -//---------------------------------------------------------------------------- - -let main () = - if !progress then dprintf "fsi : main()\n"; - let initial exitViaKillThread istate = - let istate = - let rec consume istate sourceFiles = - match sourceFiles with - | [] -> istate - | (_,fsx1) :: _ -> - let sourceFiles,rest = List.takeUntil (fun (_,fsx2) -> fsx1 <> fsx2) sourceFiles - let sourceFiles = List.map fst sourceFiles - let istate = - if fsx1 - then evalInteractiveFiles istate exitViaKillThread rangeStdin sourceFiles - else istate |> InteractiveCatch (fun istate -> EvalLoadFiles istate rangeStdin sourceFiles, Completed) |> fst in - consume istate rest in - consume istate sourceFiles - if nonNil(sourceFiles) then promptPrintAhead(); (* Seems required. I expected this could be deleted. Why not? *) - istate - - let istate = initialInteractiveState - if !interact then - // page in the type check env - let istate = istate |> InteractiveCatch (fun istate -> EvalDefns istate true [],Completed) |> fst - if !progress then dprintf "MAIN: installed CtrlC handler!\n"; - let exitViaKillThread = InstallCtrlCHandler(mainThread,(if !gui then 400 else 100)) - if !progress then dprintf "MAIN: got initial state, creating form\n"; - if !gui then - do (try Application.EnableVisualStyles() with _ -> ()) - Application.add_ThreadException(new ThreadExceptionEventHandler(fun _ args -> fsi.ReportThreadException(args.Exception))); - if not runningOnMono then (try TrySetUnhandledExceptionMode() with _ -> ()); - - // This is the event loop for winforms - let evLoop = - let mainForm = new DummyForm() - mainForm.DoCreateHandle(); - // Set the default thread exception handler - fsi.ThreadException.Add(fun exn -> RunCodeOnWinFormsMainThread mainForm (fun () -> PrintError(tcConfigB,syphon,true,exn))); - let restart = ref false - { new Microsoft.FSharp.Compiler.Interactive.IEventLoop with - member x.Run() = - restart := false; - if !progress then dprintf "MAIN: Calling Application.Run...\n"; - Application.Run() - if !progress then dprintf "MAIN: Returned from Application.Run...\n"; - !restart - member x.Invoke(f) : 'a = RunCodeOnWinFormsMainThread mainForm f - - member x.ScheduleRestart() = restart := true; Application.Exit() } - fsi.EventLoop <- evLoop; - - let istate = initial exitViaKillThread istate - if !progress then dprintf "creating stdinReaderThread\n"; - let tokenizer = ref (MkStdinLexer()) - - let stdinReaderThread = - istateRef := istate; - let cont = ref Completed - new Thread(new ThreadStart(fun () -> - try - try - if !progress then dprintf "READER: stdin thread started...\n"; - - // Delay until we've peeked the input or read the entire first line - WaitHandle.WaitAll([| (consoleReaderStartupDone :> WaitHandle) |]) |> ignore; - - if !progress then dprintf "READER: stdin thread got first line...\n"; - - // The main stdin loop, running on the stdinReaderThread. - // - // The function 'ProcessAndRunOneInteractionFromLexbuf' is blocking: it reads stdin - // until one or more real chunks of input have been received. - // - // We run the actual computations for each action on the main GUI thread by using - // mainForm.Invoke to pipe a message back through the form's main event loop. (The message - // is a delegate to execute on the main Thread) - // - while (!cont = CompletedWithReportedError or !cont = Completed or !cont = CtrlC) do - if (!cont = CtrlC) then - tokenizer := MkStdinLexer(); - let istate',cont' = - let runCodeOnMainThread f istate = - try fsi.EventLoop.Invoke (fun () -> f istate) - with _ -> (istate,Completed) - - ProcessAndRunOneInteractionFromLexbuf exitViaKillThread runCodeOnMainThread !istateRef !tokenizer - istateRef := istate'; - cont := cont'; - if !progress then dprintf "READER: cont = %O\n" !cont; - done ; - if !progress then dprintf "\n- READER: Exiting stdinReaderThread\n"; - with e -> stopProcessingRecovery e range0; - finally - (if !progress then dprintf "\n- READER: Exiting process because of failure/exit on stdinReaderThread\n"; - exit 1) - ),Name="StdinReaderThread") - // stdinReaderThread.IsBackground <- true; - if !progress then dprintf "MAIN: starting stdin thread...\n"; - stdinReaderThread.Start(); - - - let rec runLoop() = - if !progress then dprintf "GUI thread runLoop\n"; - let restart = - try - // BLOCKING POINT: The GUI Thread spends most (all) of its time this event loop - if !progress then dprintf "MAIN: entering event loop...\n"; - fsi.EventLoop.Run() - with - | :? ThreadAbortException -> - // If this TAE handler kicks it's almost certainly too late to save the - // state of the process - the state of the message loop may have been corrupted - uprintnfn "- Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart..."; - (try Thread.ResetAbort() with _ -> ()); - true - // Try again, just case we can restart - | e -> - stopProcessingRecovery e range0; - true - // Try again, just case we can restart - if !progress then dprintf "MAIN: exited event loop...\n"; - if restart then runLoop() - - runLoop(); - () - else // not interact - let istate = initial false istate - exit (min errorLogger.ErrorCount 1) - -//---------------------------------------------------------------------------- -// Server mode: -//---------------------------------------------------------------------------- - -let SpawnThread name f = - let th = new Thread(new ThreadStart(f),Name=name) - th.IsBackground <- true; - th.Start() - -let SpawnInteractiveServer() = - //Printf.printf "Spawning fsi server on channel '%s'" !fsiServerName; - SpawnThread "ServerThread" (fun () -> - let server = - {new Server.Shared.FSharpInteractiveServer() with - member this.Interrupt() = //printf "FSI-SERVER: received CTRL-C request...\n"; - try !ctrlEventActions |> List.iter (fun act -> act()) - with e -> assert(false); () (* final sanity check! - catch all exns - but not expected *) - member this.Completions(prefix) = - try CompletionsForPartialLID !istateRef prefix |> List.to_array - with e -> assert(false); [| |] (* final sanity check! - catch all exns - but not expected*) - member this.GetDeclarations(text,names) = - try tcLock (fun () -> FsiGetDeclarations !istateRef text names) - with e -> assert(false); [| |] (* final sanity check! - catch all exns - but not expected *) - } - - Server.Shared.FSharpInteractiveServer.StartServer(!fsiServerName,server)) - -do if not runningOnMono && IsInteractiveServer() then SpawnInteractiveServer() - -//---------------------------------------------------------------------------- -// STAThread -// Mark the main thread as STAThread since it is a GUI thread -//---------------------------------------------------------------------------- - -[] -do -#if DEBUG - try -#endif - main() -#if DEBUG - with e -> printf "Exception by fsi.exe:\n%+A\n" e -#endif - -//---------------------------------------------------------------------------- -// Misc -// The Ctrl-C exception handler that we've passed to native code has -// to be explicitly kept alive. -//---------------------------------------------------------------------------- - - -[] -do GC.KeepAlive(ctrlEventHandlers) - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/InternalCollections.fs b/tools/FSharp_1.9.6.16/source/fsharp/InternalCollections.fs deleted file mode 100644 index 2580079c..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/InternalCollections.fs +++ /dev/null @@ -1,200 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved -#light - -namespace Internal.Utilities.Collections -open System -open System.Collections.Generic - -#nowarn "44" // This construct is deprecated. This F# library function has been renamed. Use 'isSome' instead - -type ValueStrength<'T> = - | Strong of 'T - | Weak of WeakReference - -type internal AgedLookup<'TKey,'TValue>(keepStrongly:int, ?areSame) = - /// The list of items stored. Youngest is at the end of the list. - /// The choice of order is somewhat aribtrary. If the other way then adding - /// items would be O(1) and removing O(N). - let mutable refs:('TKey*ValueStrength<'TValue>) list = [] - - // The 75 here determines how long the list should be passed the end of strongly held - // references. Some operations are O(N) and we don't want to let things get out of - // hand. - let keepTotal : int = max keepStrongly 75 - - /// Default behavior of areSame function is structural equality (=) - let AreSame(key,key') = - match areSame with - | Some(f)->f(key,key') - | None-> key = key' - - /// Look up a the given key, return None if not found. - let TryPeekKeyValueImpl(data,key) = - let rec Lookup key = function - // Treat a list of key-value pairs as a lookup collection. - // This function returns true if two keys are the same according to the predicate - // function passed in. - | []->None - | (key',value)::t-> - if AreSame(key,key') then Some(key',value) - else Lookup key t - Lookup key data - - /// Determines whether a particular key exists. - let Exists(data,key) = - match TryPeekKeyValueImpl(data,key) with - | Some(_)->true - | None->false - - /// Set a particular key's value. - let Add(data,key,value) = - data @ [key,value] - - /// Remove a particular key value - let RemoveImpl(data, key) = - data |> List.filter (fun (key',_)->not (AreSame(key,key'))) - - /// Remove the stalest item from the list - let RemoveStalest(data) = - match data with - | (_::t)->t - | _->data - - let TryGetKeyValueImpl(data,key) = - match TryPeekKeyValueImpl(data,key) with - | Some(_, value) as result -> - // If the result existed, move it to the top of the list. - let data = RemoveImpl(data,key) - let data = Add(data,key,value) - result,data - | None -> None,data - - let FilterAndHold() = - [ for (key,value) in refs do - match value with - | Strong(value) -> yield (key,value) - | Weak(weakReference) -> - match weakReference.Target with - | null -> () - | value -> yield key,(value:?>'TValue) ] - - - let AssignWithStrength(newdata) = - let actualLength = List.length newdata - let tossThreshold = max 0 (actualLength - keepTotal) // Delete everything less than this threshold - let weakThreshhold = max 0 (actualLength - keepStrongly) // Weaken everything less than this threshhold - - refs<- - newdata - |> List.mapi( fun n kv -> n,kv ) // Place the index. - |> List.filter (fun (n:int,kv) -> n >= tossThreshold) // Delete everything below the toss threshhold - |> List.map( fun (n:int,(k,v)) -> k,if n Some(value) - | None -> None - member al.Put(key,value) = - let data = FilterAndHold() - let data = if Exists(data,key) then RemoveImpl(data,key) else data - let data = Add(data,key,value) - AssignWithStrength(data) // This will remove extras - member al.Remove(key) = - let data = FilterAndHold() - let newdata = RemoveImpl(data,key) - AssignWithStrength(newdata) - member al.MostRecent : ('TKey*'TValue) option= - let data = FilterAndHold() - if not data.IsEmpty then - // Non-optimal reverse list to get most recent. Consider an array of option for the data structure. - Some(data |> List.rev |> List.hd) - else None - member al.Clear() = - refs <- [] - member al.ToSequence() = - FilterAndHold() - |> List.to_seq - - - -type internal MruCache<'TKey,'TValue>(n,compute, ?areSame, ?isStillValid : 'TKey*'TValue->bool, ?areSameForSubsumption, ?logComputedNewValue, ?logUsedCachedValue) = - - /// Default behavior of areSame function is structural equality (=) - let AreSame(key,key') = - match areSame with - | Some(f)->f(key,key') - | None-> key = key' - - /// Default behavior of areSame function is structural equality (=) - let AreSameForSubsumption(key,key') : bool = - match areSameForSubsumption with - | Some(f)->f(key,key') - | None->AreSame(key,key') - - /// The list of items in the cache. Youngest is at the end of the list. - /// The choice of order is somewhat aribtrary. If the other way then adding - /// items would be O(1) and removing O(N). - let cache = AgedLookup<'TKey,'TValue>(n,AreSameForSubsumption) - - /// Whether or not this result value is still valid. - let IsStillValid(key,value) = - match isStillValid with - | Some(f)->f(key,value) - | None-> true - - let Log = function - | Some(f) -> f - | None-> fun x->() - - /// Log a message when a new value is computed. - let LogComputedNewValue = Log logComputedNewValue - - /// Log a message when an existing value was retrieved from cache. - let LogUsedCachedValue = Log logUsedCachedValue - - member bc.GetAvailable(key) = - match cache.TryPeekKeyValue(key) with - | Some(key', value)-> - if AreSame(key',key) then Some(value) - else None - | None -> None - - member bc.Get(key) = - let Compute() = - let value = compute key - cache.Put(key, value) - LogComputedNewValue(key) - value - match cache.TryGetKeyValue(key) with - | Some(key', value) as result -> - if AreSame(key', key) && IsStillValid(key,value) then - LogUsedCachedValue(key) - value - else Compute() - | None -> Compute() - - member bc.MostRecent = - cache.MostRecent - - member bc.SetAlternate(key:'TKey,value:'TValue) = - cache.Put(key,value) - - member bc.Remove(key) = - cache.Remove(key) - - member bc.Clear() = - cache.Clear() - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/InternalCollections.fsi b/tools/FSharp_1.9.6.16/source/fsharp/InternalCollections.fsi deleted file mode 100644 index 1a568ac9..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/InternalCollections.fsi +++ /dev/null @@ -1,55 +0,0 @@ -#light - -namespace Internal.Utilities.Collections - - /// Simple aging lookup table. When a member is accessed it's - /// moved to the top of the list and when there are too many elements - /// the least-recently-accessed element falls of the end. - type internal AgedLookup<'TKey,'TValue> = - new : keepStrongly:int - * ?areSame:('TKey * 'TKey -> bool) - -> AgedLookup<'TKey,'TValue> - /// Lookup the value without making it the most recent. - /// Returns the original key value because the areSame function - /// may have unified two different keys. - member TryPeekKeyValue : key:'TKey -> ('TKey*'TValue) option - /// Lookup a value and make it the most recent. - /// Returns the original key value because the areSame function - /// may have unified two different keys. - member TryGetKeyValue : key:'TKey -> ('TKey*'TValue) option - /// Lookup a value and make it the most recent. Return None if it wasn't there. - member TryGet : key:'TKey -> 'TValue option - /// Add an element to the collection. Make it the most recent. - member Put : 'TKey*'TValue -> unit - /// Remove the given value from the collection. - member Remove : key:'TKey -> unit - /// Get the most recent item if there is one. - member MostRecent : ('TKey * 'TValue) option - /// Remove all elements. - member Clear : unit -> unit - - /// Simple priority caching for a small number of key\value associations. - /// This cache may age-out results that have been Set by the caller. - /// Because of this, the caller must be able to tolerate values - /// that aren't what was originally passed to the Set function. - type internal MruCache<'TKey,'TValue> = - new : n:int - * compute:('TKey -> 'TValue) - * ?areSame:('TKey * 'TKey -> bool) - * ?isStillValid:('TKey * 'TValue -> bool) - * ?areSameForSubsumption:('TKey * 'TKey -> bool) - * ?logComputedNewValue:('TKey -> unit) - * ?logUsedCachedValue:('TKey -> unit) - -> MruCache<'TKey,'TValue> - /// Clear out the cache. - member Clear : unit -> unit - /// Get the value for the given key. Compute if necessary. - member Get : key:'TKey -> 'TValue - /// Get the value for the given key or None if not already available - member GetAvailable : key:'TKey -> 'TValue option - /// Remove the given value from the mru cache. - member Remove : key:'TKey -> unit - /// Set the value for the given key. This value does not have to agree with computed value. - member SetAlternate : key:'TKey * value:'TValue -> unit - /// Get the most recent item if there is one. - member MostRecent : ('TKey * 'TValue) option diff --git a/tools/FSharp_1.9.6.16/source/fsharp/InternalFileSystemUtils.fs b/tools/FSharp_1.9.6.16/source/fsharp/InternalFileSystemUtils.fs deleted file mode 100644 index 53a98944..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/InternalFileSystemUtils.fs +++ /dev/null @@ -1,37 +0,0 @@ -#light - -// This module comes from bugs 4577 and 4651. - -// Briefly, there are lots of .Net APIs that take a 'string filename' and if the -// filename is 'relative', they'll use Directory.GetCurrentDirectory() to 'base' the file. -// Since that involves mutable global state, it's anathema to call any of these methods -// with a non-absolute filename inside the VS process, since you never know what the -// current working directory may be. - -// Thus the idea is to replace all calls to e.g. File.Exists() with calls to File.SafeExists, -// which asserts that we are passing an 'absolute' filename and thus not relying on the -// (unreliable) current working directory. - -// At this point, we have done 'just enough' work to feel confident about the behavior of -// the product, but in an ideal world (perhaps with 4651) we should ensure that we never -// call unsafe .Net APIs and always call the 'safe' equivalents below, instead. - -namespace Internal.Utilities.FileSystem - -open System.IO -open System.Diagnostics - -type File() = - static member SafeExists filename = - Debug.Assert(Path.IsPathRooted(filename), sprintf "SafeExists: '%s' is not absolute" filename) - System.IO.File.Exists(filename) - static member SafeNewFileStream(filename:string,mode:FileMode,access:FileAccess,share:FileShare) = - new FileStream(filename,mode,access,share) - -type Path() = - /// Take in a Windows filename with an absolute path, and return the same filename - /// but canonicalized with respect to extra path separators (e.g. C:\\\\foo.txt) - /// and '..' portions - static member SafeGetFullPath filename = - Debug.Assert(Path.IsPathRooted(filename), sprintf "SafeGetFullPath: '%s' is not absolute" filename) - System.IO.Path.GetFullPath(filename) diff --git a/tools/FSharp_1.9.6.16/source/fsharp/InternalFileSystemUtils.fsi b/tools/FSharp_1.9.6.16/source/fsharp/InternalFileSystemUtils.fsi deleted file mode 100644 index c0e5d95f..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/InternalFileSystemUtils.fsi +++ /dev/null @@ -1,12 +0,0 @@ -#light - -namespace Internal.Utilities.FileSystem - type File = - class - static member SafeExists : filename:string -> bool - static member SafeNewFileStream : filename:string * mode:System.IO.FileMode * access:System.IO.FileAccess * share:System.IO.FileShare -> System.IO.FileStream - end - type Path = - class - static member SafeGetFullPath : filename:string -> string - end \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsharp/PrettyNaming.fs b/tools/FSharp_1.9.6.16/source/fsharp/PrettyNaming.fs deleted file mode 100644 index 523a9d7e..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/PrettyNaming.fs +++ /dev/null @@ -1,330 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved -//---------------------------------------------------------------------------- -// Some general F# utilities for mangling / unmangling / manipulating names. -//-------------------------------------------------------------------------- - -#light - -#if STANDALONE_METADATA -module (* internal *) FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming - -#else -/// Anything to do with special names of identifiers and other lexical rules -module (* internal *) Microsoft.FSharp.Compiler.PrettyNaming - open Internal.Utilities - open Microsoft.FSharp.Compiler - open Microsoft.FSharp.Compiler.AbstractIL.Internal - - open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -/// Anything to do with special names of identifiers and other lexical rules -#endif - - open System.Globalization - open System.Collections.Generic - - //------------------------------------------------------------------------ - // Operator name compilation - //----------------------------------------------------------------------- - - let lparen_get = ".()" - let lparen_set = ".()<-" - let qmark = "?" - let qmark_set = "?<-" - - let private opNameTable = - [ ("[]", "op_Nil"); - ("::", "op_ColonColon"); - ("+", "op_Addition"); - ("~%", "op_Splice"); - ("~%%", "op_SpliceUntyped"); - ("~++", "op_Increment"); - ("~--", "op_Decrement"); - ("-", "op_Subtraction"); - ("*", "op_Multiply"); - ("**", "op_Exponentiation"); - ("/", "op_Division"); - ("@", "op_Append"); - ("^", "op_Concatenate"); - ("%", "op_Modulus"); - ("&&&", "op_BitwiseAnd"); - ("|||", "op_BitwiseOr"); - ("^^^", "op_ExclusiveOr"); - ("<<<", "op_LeftShift"); - ("~~~", "op_LogicalNot"); - (">>>", "op_RightShift"); - ("~+", "op_UnaryPlus"); - ("~-", "op_UnaryNegation"); - ("~&", "op_AddressOf"); - ("~&&", "op_IntegerAddressOf"); - ("&&", "op_BooleanAnd"); - ("||", "op_BooleanOr"); - ("<=", "op_LessThanOrEqual"); - ("=","op_Equality"); - (">=", "op_GreaterThanOrEqual"); - ("<", "op_LessThan"); - (">", "op_GreaterThan"); - ("|>", "op_PipeRight"); - ("<|", "op_PipeLeft"); - ("!", "op_Dereference"); - (">>", "op_ComposeRight"); - ("<<", "op_ComposeLeft"); - ("<< >>", "op_TypedQuotationUnicode"); - ("<<| |>>", "op_ChevronsBar"); - ("<@ @>", "op_Quotation"); - ("<@@ @@>", "op_QuotationUntyped"); - ("+=", "op_AdditionAssignment"); - ("-=", "op_SubtractionAssignment"); - ("*=", "op_MultiplyAssignment"); - ("/=", "op_DivisionAssignment"); - ("..", "op_Range"); - (".. ..", "op_RangeStep"); - ("?", "op_Dynamic"); - ("?<-", "op_DynamicAssignment"); - (lparen_get, "op_ArrayLookup"); - (lparen_set, "op_ArrayAssign"); - ] - - let opCharTranslateTable = - [ ( '>', "Greater"); - ( '<', "Less"); - ( '+', "Plus"); - ( '-', "Minus"); - ( '*', "Multiply"); - ( '=', "Equals"); - ( '~', "Twiddle"); - ( '%', "Percent"); - ( '.', "Dot"); - ( '$', "Dollar"); - ( '&', "Amp"); - ( '|', "Bar"); - ( '@', "At"); - ( '#', "Hash"); - ( '^', "Hat"); - ( '!', "Bang"); - ( '?', "Qmark"); - ( '/', "Divide"); - ( ':', "Colon"); - ( '(', "LParen"); - ( ',', "Comma"); - ( ')', "RParen"); - ( ' ', "Space"); - ( '[', "LBrack"); - ( ']', "RBrack"); ] - - let IsOpName = - let t = new Dictionary<_,_>() - for (c,_) in opCharTranslateTable do - t.Add(c,1) - fun (n:string) -> - let rec loop i = (i < n.Length && (t.ContainsKey(n.[i]) || loop (i+1))) - loop 0 - - let CompileOpName = - let t = Map.of_list opNameTable - let t2 = Map.of_list opCharTranslateTable - fun n -> - match t.TryFind(n) with - | Some(x) -> x - | None -> - if IsOpName n then - let mutable r = [] - for i = 0 to String.length n - 1 do - let c = n.[i] - let c2 = match t2.TryFind(c) with Some(x) -> x | None -> string c - r <- c2 :: r - "op_"^(String.concat "" (List.rev r)) - else n - - let IsMangledOpName (n:string) = n.Length >= 3 && n.Substring(0,3) = "op_" - - let DecompileOpName = - let t = Map.of_list (List.map (fun (x,y) -> (y,x)) opNameTable) - let t2 = Map.of_list (List.map (fun (x,y) -> (y,x)) opCharTranslateTable) - fun n -> - match t.TryFind(n) with - | Some(x) -> x - | None -> - if n.Length >= 3 && n.Substring(0,3) = "op_" then - let rec loop (remaining:string) = - let l = remaining.Length - if l = 0 then Some(remaining) else - let choice = - opCharTranslateTable |> List.tryPick (fun (a,b) -> - let bl = b.Length - if bl <= l && remaining.Substring(0,bl) = b then - Some(string a, remaining.Substring(bl,l - bl)) - else None) - - match choice with - | Some (a,remaining2) -> - match loop remaining2 with - | None -> None - | Some a2 -> Some(a^a2) - | None -> None (* giveup *) - match loop (n.Substring(3,n.Length - 3)) with - | Some res -> res - | None -> n - else n - - let opname_Cons = CompileOpName "::" - let opname_Nil = CompileOpName "[]" - let opname_Equals = CompileOpName "=" - - - /// The characters that are allowed to be in an identifier. - let IsIdentifierPartCharacter c = - let cat = System.Char.GetUnicodeCategory(c) - ( cat = UnicodeCategory.UppercaseLetter // Letters - || cat = UnicodeCategory.LowercaseLetter - || cat = UnicodeCategory.TitlecaseLetter - || cat = UnicodeCategory.ModifierLetter - || cat = UnicodeCategory.OtherLetter - || cat = UnicodeCategory.LetterNumber - || cat = UnicodeCategory.DecimalDigitNumber // Numbers - || cat = UnicodeCategory.ConnectorPunctuation // Connectors - || cat = UnicodeCategory.NonSpacingMark // Combiners - || cat = UnicodeCategory.SpacingCombiningMark - || c = '\'' // Tick - ) - - /// Is this character a part of a long identifier - let IsLongIdentifierPartCharacter c = - (IsIdentifierPartCharacter c) || (c = '.') - - let IsPrefixOperator s = - let origName = DecompileOpName s - let skipIgnoredChars = origName.TrimStart([| '$'; '.' |]) - (skipIgnoredChars.StartsWith("!",System.StringComparison.Ordinal) && - not (skipIgnoredChars.StartsWith("!=",System.StringComparison.Ordinal))) || - skipIgnoredChars.StartsWith("?",System.StringComparison.Ordinal) || - skipIgnoredChars.StartsWith("~",System.StringComparison.Ordinal) - - let (|Control|Equality|Relational|Indexer|FixedTypes|Other|) opName = - if (opName = "&" || opName = "or" || opName = "&&" || opName = "||") then Control - elif (opName = "<>" || opName = "=" ) then Equality - elif (opName = "<" || opName = ">" || opName = "<=" || opName = ">=") then Relational - elif (opName = "<<" || opName = "<|" || opName = "<||" || opName = "<||" || opName = "|>" || opName = "||>" || opName = "|||>" || opName = ">>" || opName = "^" || opName = ":=" || opName = "@") then FixedTypes - elif (opName = ".[]" ) then Indexer - else Other - - let private compilerGeneratedMarker = "@" - - let IsCompilerGeneratedName (nm:string) = - nm.Contains(compilerGeneratedMarker) - - let CompilerGeneratedName nm = - if IsCompilerGeneratedName nm then nm else nm^compilerGeneratedMarker - - let GetBasicNameOfPossibleCompilerGeneratedName (name:string) = - match name.IndexOf compilerGeneratedMarker with - | -1 | 0 -> name - | n -> name.[0..n-1] - - let CompilerGeneratedNameSuffix (basicName:string) suffix = - basicName^compilerGeneratedMarker^suffix - - - //------------------------------------------------------------------------- - // Handle mangled .NET generic type names - //------------------------------------------------------------------------- - - let private mangledGenericTypeNameSym = '`' - let IsMangledGenericName (n:string) = - n.IndexOf mangledGenericTypeNameSym <> -1 && - (* check what comes after the symbol is a number *) - let m = n.LastIndexOf mangledGenericTypeNameSym - let mutable res = m < n.Length - 1 - for i = m + 1 to n.Length - 1 do - res <- res && n.[i] >= '0' && n.[i] <= '9'; - res - - type NameArityPair = NameArityPair of string*int - let DecodeGenericTypeName n = - if IsMangledGenericName n then - let pos = n.LastIndexOf mangledGenericTypeNameSym - let res = n.Substring(0,pos) - let num = n.Substring(pos+1,n.Length - pos - 1) - NameArityPair(res, int32 num) - else NameArityPair(n,0) - - let DemangleGenericTypeName n = - if IsMangledGenericName n then - let pos = n.LastIndexOf mangledGenericTypeNameSym - n.Substring(0,pos) - else n - (*------------------------------------------------------------------------- - !* Property name mangling. - * Expecting s to be in the form (as returned by qualified_mangled_name_of_tcref) of: - * get_P or set_P - * Names/Space/Class/NLPath-get_P or Names/Space/Class/NLPath.set_P - * Required to return "P" - *------------------------------------------------------------------------*) - - let private chopStringTo (s:string) (c:char) = - (* chopStringTo "abcdef" 'c' --> "def" *) - if s.IndexOf c <> -1 then - let i = s.IndexOf c + 1 - s.Substring(i, s.Length - i) - else - s - - /// Try to chop "get_" or "set_" from a string - let TryChopPropertyName s = - let s = chopStringTo s '.' - if s.Length <= 4 || (let s = s.Substring(0,4) in s <> "get_" && s <> "set_") then - None - else - Some(s.Substring(4,s.Length - 4) ) - - - let ChopPropertyName s = - match TryChopPropertyName s with - | None -> - failwith("Invalid internal property name: '"^s^"'"); - s - | Some res -> res - - - let DemangleOperatorName nm = - let nm = DecompileOpName nm - if IsOpName nm then "( "^nm^" )" else nm - - /// Used when generating the secret paths used by FSI file generation - let SplitNamesForFsiGenerationPath (s : string) : string list = - if s.StartsWith("``",System.StringComparison.Ordinal) && s.EndsWith("``",System.StringComparison.Ordinal) && s.Length > 4 then [s.Substring(2, s.Length-4)] // identifier is enclosed in `` .. ``, so it is only a single element (this is very approximate) - else s.Split [| '.' ; '`' |] |> Array.to_list // '.' chops members / namespaces / modules; '`' chops generic parameters for .NET types - - /// Used when generating the secret paths used by FSI file generation - let JoinNamesForFsiGenerationPath (ns : string list) : string = String.concat "." ns - - /// Used when generating the secret paths used by FSI file generation - let ChopUnshowableInFsiGenerationPath (ns : string list) : string list = - let showable s = - match s with - | "static" -> false - | _ -> s |> String.forall (fun x -> x >= '0' && x <= '9') |> not // this is safe because a stretch composed solely of digits doesn't constitute an identifier - - let rec loop = - function [] -> [] - | x :: _ as xs when showable x -> xs - | _ :: xs -> loop xs - ns |> List.rev |> loop |> List.rev - - - let FSharpModuleSuffix = "Module" - - let DemangleExceptionName nm = - let tryDropSuffix s t = - let lens = String.length s - let lent = String.length t - if (lens >= lent && (s.Substring (lens-lent,lent) = t)) then - Some (s.Substring (0,lens - lent)) - else - None - - match tryDropSuffix nm "Exception" with - | Some nm -> nm - | None -> nm - - let mangle_exception_name n = n + "Exception" diff --git a/tools/FSharp_1.9.6.16/source/fsharp/ReferenceResolution.fs b/tools/FSharp_1.9.6.16/source/fsharp/ReferenceResolution.fs deleted file mode 100644 index 3fa00104..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/ReferenceResolution.fs +++ /dev/null @@ -1,331 +0,0 @@ -#light -namespace Microsoft.FSharp.Compiler - -module MSBuildResolver = - open System - open Microsoft.Build.Tasks - open Microsoft.Build.Utilities - open Microsoft.Build.Framework - open Microsoft.Build.BuildEngine - open System.IO - - exception ResolutionFailure - - type ResolvedFrom = - | AssemblyFolders - | AssemblyFoldersEx - | TargetFrameworkDirectory - | RawFileName - | GlobalAssemblyCache - | Path of string - | Unknown - - type ResolvedFile = { - itemSpec:string - resolvedFrom:ResolvedFrom - fusionName:string - version:string - redist:string - baggage:string - } - with override this.ToString() = sprintf "ResolvedFile(%s)" this.itemSpec - - type ResolutionResults = { - resolvedFiles:ResolvedFile array - referenceDependencyPaths:string array - relatedPaths:string array - referenceSatellitePaths:string array - referenceScatterPaths:string array - referenceCopyLocalPaths:string array - suggestedBindingRedirects:string array - } - - let ReplaceFrameworkVariables(dirs) = - let windowsFramework = System.Environment.GetEnvironmentVariable("windir")+ @"\Microsoft.NET\Framework" - let referenceAssemblies = System.Environment.GetEnvironmentVariable("ProgramFiles")+ @"\Reference Assemblies\Microsoft\Framework" - dirs|>List.map(fun (d:string)->d.Replace("{WindowsFramework}",windowsFramework).Replace("{ReferenceAssemblies}",referenceAssemblies)) - -#if FX_ATLEAST_40 - /// The .NET runtime version that F# was built against. - let DotNetRuntime = sprintf "v%s.%s.%s" Microsoft.BuildSettings.Version.Major Microsoft.BuildSettings.Version.Minor Microsoft.BuildSettings.Version.ProductBuild - /// The short version (like 4.0) that F# was built against. - let DotNetRuntimeShort = sprintf "v%s.%s" Microsoft.BuildSettings.Version.Major Microsoft.BuildSettings.Version.Minor - /// Locations of .NET framework assemblies. - let DotNetFrameworkDirectories = ReplaceFrameworkVariables([@"{ReferenceAssemblies}\"+DotNetRuntimeShort; @"{WindowsFramework}\"+DotNetRuntime]) -#endif - - /// Derive the target framework directories. - let DeriveTargetFrameworkDirectories - (targetFrameworkVersion:string, // e.g. v2.0, v3.0, v3.5, v4.0 etc - frameworkRegistryBase:string, // Software\Microsoft\.NetFramework - logmessage:string->unit) = - let targetFrameworkVersion = - if not(targetFrameworkVersion.StartsWith("v",StringComparison.Ordinal)) then "v"^targetFrameworkVersion - else targetFrameworkVersion - let FrameworkStartsWith(short) = - targetFrameworkVersion.StartsWith(short,StringComparison.Ordinal) - let result = - if FrameworkStartsWith("v1.0") then ReplaceFrameworkVariables([@"{WindowsFramework}\v1.0.3705"]) - else if FrameworkStartsWith("v1.1") then ReplaceFrameworkVariables([@"{WindowsFramework}\v1.1.4322"]) - else if FrameworkStartsWith("v2.0") then ReplaceFrameworkVariables([@"{WindowsFramework}\v2.0.50727"]) - else if FrameworkStartsWith("v3.0") then ReplaceFrameworkVariables([@"{ReferenceAssemblies}\v3.0"; @"{WindowsFramework}\v3.0"; @"{WindowsFramework}\v2.0.50727"]) - else if FrameworkStartsWith("v3.5") then ReplaceFrameworkVariables([@"{ReferenceAssemblies}\v3.5"; @"{WindowsFramework}\v3.5"; @"{WindowsFramework}\v2.0.50727"]) -#if FX_ATLEAST_40 - else ReplaceFrameworkVariables(DotNetFrameworkDirectories) -#else - else [] -#endif - let result = result |> Array.of_list - logmessage (sprintf "Derived target framework directories for version %s are: %s" targetFrameworkVersion (String.Join(",", result))) - result - - /// Decode the ResolvedFrom code from MSBuild. - let DecodeResolvedFrom(resolvedFrom:string) : ResolvedFrom = - let Same a b = - String.CompareOrdinal(a,b) = 0 - match resolvedFrom with - | r when Same "{RawFileName}" r -> RawFileName - | r when Same "{GAC}" r -> GlobalAssemblyCache - | r when Same "{TargetFrameworkDirectory}" r -> TargetFrameworkDirectory - | r when Same "{AssemblyFolders}" r -> AssemblyFolders - | r when Same "{GAC}" r -> GlobalAssemblyCache - | r when r.Length >= 10 && Same "{Registry:" (r.Substring(0,10)) -> AssemblyFoldersEx - | r -> Path r - - - type ErrorWarningCallbackSig = ((*code:*)string->(*message*)string->unit) - - type ResolutionEnvironment = CompileTimeLike | RuntimeLike - - type Foregrounded = - | ForegroundedMessage of string - | ForegroundedError of string * string - | ForegroundedWarning of string * string - - let ResolveCore( - resolutionEnvironment: ResolutionEnvironment, - references:(string*(*baggage*)string)[], - targetFrameworkVersion:string, - targetFrameworkDirectories:string list, - targetProcessorArchitecture:string, - outputDirectory:string, - fsharpBinariesDir:string, - explicitIncludeDirs:string list, - implicitIncludeDir:string, - frameworkRegistryBase:string, - assemblyFoldersSuffix:string, - assemblyFoldersConditions:string, - allowRawFileName:bool, - logmessage:string->unit, - logwarning:ErrorWarningCallbackSig, - logerror:ErrorWarningCallbackSig ) = - - // Message Foregrounding: - // In version 4.0 MSBuild began calling log methods on a background (non-UI) thread. If there is an exception thrown from - // logmessage, logwarning or logerror then it would kill the process. - // The fix is to catch these exceptions and log the rest of the messages to a list to output at the end. - // It looks simpler to always just accumulate the messages during resolution and show them all at the end, but then - // we couldn't see the messages as resolution progresses. - let foregrounded = ref [] - let backgroundException : exn option ref = ref None - - let logmessage message = - match !backgroundException with - | Some(_) -> foregrounded := ForegroundedMessage(message) :: !foregrounded - | None -> - try - logmessage message - with e -> - backgroundException := Some(e) - foregrounded := ForegroundedMessage(message) :: !foregrounded - - let logwarning code message = - match !backgroundException with - | Some(_) -> foregrounded := ForegroundedWarning(code,message) :: !foregrounded - | None -> - try - logwarning code message - with e -> - backgroundException := Some(e) - foregrounded := ForegroundedWarning(code,message) :: !foregrounded - - let logerror code message = - match !backgroundException with - | Some(_) -> foregrounded := ForegroundedError(code,message) :: !foregrounded - | None -> - try - logwarning code message - with e -> - backgroundException := Some(e) - foregrounded := ForegroundedError(code,message) :: !foregrounded - - - let engine = { new IBuildEngine with - member be.BuildProjectFile(projectFileName, targetNames, globalProperties, targetOutputs) = true - member be.LogCustomEvent(e) = logmessage e.Message - member be.LogErrorEvent(e) = logerror e.Code e.Message - member be.LogMessageEvent(e) = logmessage e.Message - member be.LogWarningEvent(e) = logwarning e.Code e.Message - member be.ColumnNumberOfTaskNode with get() = 1 - member be.LineNumberOfTaskNode with get() = 1 - member be.ContinueOnError with get() = true - member be.ProjectFileOfTaskNode with get() = "" } - - let rar = new ResolveAssemblyReference() - rar.BuildEngine <- engine - - // Derive target framework directory if none was supplied. - let targetFrameworkDirectories = - if targetFrameworkDirectories=[] then DeriveTargetFrameworkDirectories(targetFrameworkVersion,frameworkRegistryBase,logmessage) - else targetFrameworkDirectories |> Array.of_list - - // Filter for null and zero length, and escape backslashes so legitimate path characters aren't mistaken for - // escape characters (E.g., ".\r.dll") - let explicitIncludeDirs = explicitIncludeDirs |> List.filter(fun eid->not(String.IsNullOrEmpty(eid))) - let references = references |> Array.filter(fun (path,_)->not(String.IsNullOrEmpty(path))) |> Array.map (fun (path,baggage) -> (path.Replace("\\","\\\\"),baggage)) - - rar.TargetFrameworkDirectories <- targetFrameworkDirectories - rar.FindRelatedFiles <- false - rar.FindDependencies <- false - rar.FindSatellites <- false - rar.FindSerializationAssemblies <- false - rar.TargetProcessorArchitecture <- targetProcessorArchitecture - - rar.Assemblies <- [|for (referenceName,baggage) in references -> - let item = new Microsoft.Build.Utilities.TaskItem(referenceName) - item.SetMetadata("Baggage", baggage) - item:>ITaskItem|] - - let rawFileNamePath = if allowRawFileName then ["{RawFileName}"] else [] - - let searchPaths = - match resolutionEnvironment with - | RuntimeLike -> - logmessage("Using scripting resolution precedence.") - // These are search paths for runtime-like or scripting resolution. GAC searching is present. - rawFileNamePath @ // Quick-resolve straight to filename first - explicitIncludeDirs @ // From -I, #I - [implicitIncludeDir] @ // Usually the project directory - [fsharpBinariesDir] @ // Location of fsc.exe - ["{TargetFrameworkDirectory}"] @ - [sprintf "{Registry:%s,%s,%s%s}" frameworkRegistryBase targetFrameworkVersion assemblyFoldersSuffix assemblyFoldersConditions] @ - ["{AssemblyFolders}"] @ - ["{GAC}"] - | CompileTimeLike -> - logmessage("Using compilation resolution precedence.") - // These are search paths for compile-like resolution. GAC searching is not present. - ["{TargetFrameworkDirectory}"] @ - rawFileNamePath @ // Quick-resolve straight to filename first - explicitIncludeDirs @ // From -I, #I - [implicitIncludeDir] @ // Usually the project directory - [fsharpBinariesDir] @ // Location of fsc.exe - [sprintf "{Registry:%s,%s,%s%s}" frameworkRegistryBase targetFrameworkVersion assemblyFoldersSuffix assemblyFoldersConditions] @ - ["{AssemblyFolders}"] @ - [outputDirectory] - - rar.SearchPaths <- searchPaths |> Array.of_list - - rar.AllowedAssemblyExtensions <- [| ".exe"; ".dll" |] - - let succeeded = rar.Execute() - - // Unroll any foregrounded messages - match !backgroundException with - | Some(backGroundException) -> - logwarning "" "Saw error on logger thread during resolution." - logwarning "" (sprintf "%A" backGroundException) - logwarning "" "Showing messages seen after exception." - - !foregrounded - |> List.iter(fun message-> - match message with - | ForegroundedMessage(message) -> logmessage message - | ForegroundedWarning(code,message) -> logwarning code message - | ForegroundedError(code,message) -> logerror code message ) - | None -> () - - if not succeeded then - raise ResolutionFailure - - { - resolvedFiles = [| for p in rar.ResolvedFiles -> {itemSpec = p.ItemSpec; - resolvedFrom = DecodeResolvedFrom(p.GetMetadata("ResolvedFrom")); - fusionName = p.GetMetadata("FusionName"); - version = p.GetMetadata("Version"); - redist = p.GetMetadata("Redist"); - baggage = p.GetMetadata("Baggage") } |] - referenceDependencyPaths = [| for p in rar.ResolvedDependencyFiles -> p.ItemSpec |] - relatedPaths = [| for p in rar.RelatedFiles -> p.ItemSpec |] - referenceSatellitePaths = [| for p in rar.SatelliteFiles -> p.ItemSpec |] - referenceScatterPaths = [| for p in rar.ScatterFiles -> p.ItemSpec |] - referenceCopyLocalPaths = [| for p in rar.CopyLocalFiles -> p.ItemSpec |] - suggestedBindingRedirects = [| for p in rar.SuggestedRedirects -> p.ItemSpec |] - } - - let Resolve( - resolutionEnvironment: ResolutionEnvironment, - references:(string*(*baggage*)string)[], - targetFrameworkVersion:string, - targetFrameworkDirectories:string list, - targetProcessorArchitecture:string, - outputDirectory:string, - fsharpBinariesDir:string, - explicitIncludeDirs:string list, - implicitIncludeDir:string, - frameworkRegistryBase:string, - assemblyFoldersSuffix:string, - assemblyFoldersConditions:string, - logmessage:string->unit, - logwarning:ErrorWarningCallbackSig, - logerror:ErrorWarningCallbackSig ) = - // The {RawFileName} target is 'dangerous', in the sense that is uses Directory.GetCurrentDirectory() to resolve unrooted file paths. - // It is unreliable to use this mutable global state inside Visual Studio. As a result, we partition all references into a "rooted" set - // (which contains e.g. C:\MyDir\MyAssem.dll) and "unrooted" (everything else). We only allow "rooted" to use {RawFileName}. Note that - // unrooted may still find 'local' assemblies by virtue of the fact that "implicitIncludeDir" is one of the places searched during - // assembly resolution. - let references = references |> Array.map (fun ((file,baggage) as data) -> - // However, MSBuild will not resolve 'relative' paths, even when e.g. implicitIncludeDir is part of the search. As a result, - // if we have an unrooted path+filename, we'll assume this is relative to the project directory and root it. - if System.IO.Path.IsPathRooted(file) then - data // fine, e.g. "C:\Dir\foo.dll" - elif not(file.Contains("\\") || file.Contains("/")) then - data // fine, e.g. "System.Transactions.dll" - else - // we have a 'relative path', e.g. "bin/Debug/foo.exe" or "..\Yadda\bar.dll" - // turn it into an absolute path based at implicitIncludeDir - (System.IO.Path.Combine(implicitIncludeDir, file), baggage) - ) - let rooted, unrooted = references |> Array.partition (fun (file,baggage) -> System.IO.Path.IsPathRooted(file)) - - let CallResolveCore(references, allowRawFileName) = - // all the params are the same... - ResolveCore( - resolutionEnvironment, - references, // ... except this - targetFrameworkVersion, - targetFrameworkDirectories, - targetProcessorArchitecture, - outputDirectory, - fsharpBinariesDir, - explicitIncludeDirs, - implicitIncludeDir, - frameworkRegistryBase, - assemblyFoldersSuffix, - assemblyFoldersConditions, - allowRawFileName, // ... and this - logmessage, - logwarning, - logerror) - - let rootedResults = CallResolveCore(rooted, true) - let unrootedResults = CallResolveCore(unrooted, false) - // now unify the two sets of results - { - resolvedFiles = Array.concat [| rootedResults.resolvedFiles; unrootedResults.resolvedFiles |] - referenceDependencyPaths = set rootedResults.referenceDependencyPaths |> Set.union (set unrootedResults.referenceDependencyPaths) |> Set.to_array - relatedPaths = set rootedResults.relatedPaths |> Set.union (set unrootedResults.relatedPaths) |> Set.to_array - referenceSatellitePaths = set rootedResults.referenceSatellitePaths |> Set.union (set unrootedResults.referenceSatellitePaths) |> Set.to_array - referenceScatterPaths = set rootedResults.referenceScatterPaths |> Set.union (set unrootedResults.referenceScatterPaths) |> Set.to_array - referenceCopyLocalPaths = set rootedResults.referenceCopyLocalPaths |> Set.union (set unrootedResults.referenceCopyLocalPaths) |> Set.to_array - suggestedBindingRedirects = set rootedResults.suggestedBindingRedirects |> Set.union (set unrootedResults.suggestedBindingRedirects) |> Set.to_array - } diff --git a/tools/FSharp_1.9.6.16/source/fsharp/TraceCall.fs b/tools/FSharp_1.9.6.16/source/fsharp/TraceCall.fs deleted file mode 100644 index 7c77f2f9..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/TraceCall.fs +++ /dev/null @@ -1,176 +0,0 @@ -#light -namespace Internal.Utilities.Debug - -open Internal.Utilities -open Internal.Utilities.Pervasives -open System -open System.IO -open System.Threading -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open System.Diagnostics -open System.Runtime.InteropServices - - -module TraceInterop = - type MessageBeepType = - | Default = -1 - | Ok = 0x00000000 - | Error = 0x00000010 - | Question = 0x00000020 - | Warning = 0x00000030 - | Information = 0x00000040 - - [] - let MessageBeep(mbt:MessageBeepType):bool=failwith "" - -[] -[] -type Trace private() = -#if DEBUG - static let mutable alreadyWarnedThatLoggingIsOn = false -#endif - static let mutable log = "" - static let TMinusZero = DateTime.Now - static let indent = 0 - static let mutable out = Console.Out - [] [] static val mutable private indent:int - [] [] static val mutable private threadName:string - - /// Set to the semicolon-delimited names of the logging classes to be reported. - /// Use * to mean all. - static member Log - with get() = log - and set(value) = log<-value - - /// Output destination. - static member Out - with get() = out - and set(value:TextWriter) = out<-value - - /// True if the given logging class should be logged. - static member ShouldLog(loggingClass) = - let result = Trace.Log = "*" || Trace.Log.Contains(loggingClass^";") || Trace.Log.EndsWith(loggingClass,StringComparison.Ordinal) -#if DEBUG - if result && not(alreadyWarnedThatLoggingIsOn) then - alreadyWarnedThatLoggingIsOn <- true - System.Windows.Forms.MessageBox.Show(sprintf "Tracing is on (ShouldLog(%s) is true)\r\nTrace.Log is \"%s\"" loggingClass Trace.Log) |> ignore -#endif - result - - /// Description of the current thread. - static member private CurrentThreadInfo() = - if String.IsNullOrEmpty(Trace.threadName) then sprintf "(id=%d)" Thread.CurrentThread.ManagedThreadId - else sprintf "(id=%d,name=%s)" Thread.CurrentThread.ManagedThreadId Trace.threadName - - /// Report the elapsed time since start - static member private ElapsedTime(start) = - let elapsed : TimeSpan = (DateTime.Now-start) - sprintf "%A ms" elapsed.TotalMilliseconds - - /// Get a string with spaces for indention. - static member private IndentSpaces() = new string(' ', Trace.indent) - - /// Log a message. - static member private LogMessage(msg:string) = - Trace.Out.Write(sprintf "%s%s" (Trace.IndentSpaces()) msg) - Trace.Out.Flush() - if Trace.Out<>Console.Out then - // Always log to console. - Console.Out.Write(sprintf "%s%s" (Trace.IndentSpaces()) msg) - - /// Name the current thread. - static member private NameCurrentThread(threadName) = - match threadName with - | Some(threadName)-> - let current = Trace.threadName - if String.IsNullOrEmpty(current) then Trace.threadName <- threadName - else if not(current.Contains(threadName)) then Trace.threadName <- current^","^threadName - | None -> () - - /// Base implementation of the call function - static member private CallImpl(loggingClass,functionName,descriptionFunc,threadName:string option) : IDisposable = - #if DEBUG - if Trace.ShouldLog(loggingClass) then - Trace.NameCurrentThread(threadName) - - let threadInfo = Trace.CurrentThreadInfo() - let indent = Trace.IndentSpaces() - let description = try descriptionFunc() with e->"No description because of exception" - let start = DateTime.Now - -#if DEBUG_WITH_TIME_AND_THREAD_INFO - Trace.LogMessage(sprintf "Entering %s(%s) %s t-plus %fms %s\n" - functionName - loggingClass - threadInfo - (start-TMinusZero).TotalMilliseconds - description) -#else - Trace.LogMessage(sprintf "Entering %s(%s) %s\n" - functionName - loggingClass - description) -#endif - Trace.indent<-Trace.indent+1 - - {new IDisposable with - member d.Dispose() = - Trace.indent<-Trace.indent-1 -#if DEBUG_WITH_TIME_AND_THREAD_INFO - Trace.LogMessage(sprintf "Exitting %s %s %s\n" - functionName - threadInfo - (Trace.ElapsedTime(start)))} -#else - Trace.LogMessage(sprintf "Exitting %s\n" - functionName)} -#endif - else - null : IDisposable - #else - null : IDisposable - #endif - - /// Log a method as its called. - static member Call(loggingClass,functionName,descriptionFunc) = Trace.CallImpl(loggingClass,functionName,descriptionFunc,None) - /// Log a method as its called. Expected always to be called on the same thread which will be named 'threadName' - static member CallByThreadNamed(loggingClass,functionName,threadName,descriptionFunc) = Trace.CallImpl(loggingClass,functionName,descriptionFunc,Some(threadName)) - /// Log a message by logging class. - static member PrintLine(loggingClass, messageFunc) = - #if DEBUG - if Trace.ShouldLog(loggingClass) then - let message = try messageFunc() with _-> " No message because of exception.\n" - Trace.LogMessage(sprintf " %s\n" message) - #else - () - #endif - - /// Log a message by logging class. - static member Print(loggingClass, messageFunc) = - #if DEBUG - if Trace.ShouldLog(loggingClass) then - let message = try messageFunc() with _-> "No message because of exception.\n" - Trace.LogMessage(message) - #else - () - #endif - - /// Make a beep when the given loggingClass is matched. - static member private BeepHelper(loggingClass,beeptype) = - #if DEBUG - if Trace.ShouldLog(loggingClass) then - TraceInterop.MessageBeep(beeptype) |> ignore - #else - () - #endif - - /// Make the "OK" sound when the given loggingClass is matched. - static member BeepOk(loggingClass) = Trace.BeepHelper(loggingClass,TraceInterop.MessageBeepType.Ok) - - /// Make the "Error" sound when the given loggingClass is matched. - static member BeepError(loggingClass) = Trace.BeepHelper(loggingClass,TraceInterop.MessageBeepType.Error) - - /// Make the default sound when the given loggingClass is matched. - static member Beep(loggingClass) = Trace.BeepHelper(loggingClass,TraceInterop.MessageBeepType.Default) - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/ast.ml b/tools/FSharp_1.9.6.16/source/fsharp/ast.ml deleted file mode 100644 index ab377d9e..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/ast.ml +++ /dev/null @@ -1,1482 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module (* internal *) Microsoft.FSharp.Compiler.Ast - -open Microsoft.FSharp.Text -open Internal.Utilities -open Internal.Utilities.Text.Lexing -open Internal.Utilities.Text.Parsing -open Internal.Utilities.Compatibility.OCaml.Lexing -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.UnicodeLexing -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.PrettyNaming - -module Ilpars = Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser -module Illex = Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiLexer - -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Range - - -/// The prefix of the names used for the fake namespace path added to all dynamic code entries in FSI.EXE -let DynamicModulePrefix = "FSI_" -let public lib_MF_name = "Microsoft.FSharp" -let public lib_MF_path = IL.split_namespace lib_MF_name -let public lib_MFCore_name = lib_MF_name ^ ".Core" -let public lib_MFCore_path = IL.split_namespace lib_MFCore_name - - -//------------------------------------------------------------------------ -// XML doc pre-processing -//----------------------------------------------------------------------- - -let findFirstIndexWhereTrue (arr: _ array) p = - let rec look lo hi = - assert ((lo >= 0) && (hi >= 0)) - assert ((lo <= arr.Length) && (hi <= arr.Length)) - if lo = hi then lo - else - let i = (lo+hi)/2 - if p arr.[i] then - if i = 0 then i - else - if p arr.[i-1] then - look lo i - else - i - else - // not true here, look after - look (i+1) hi - look 0 arr.Length - - -(* -findFirstIndexWhereTrue [| 2 |] (fun i -> i > 2) = 1 -findFirstIndexWhereTrue [| 2 |] (fun i -> i > 1) = 0 - -findFirstIndexWhereTrue [| 2;3 |] (fun i -> i > 1) = 0 -findFirstIndexWhereTrue [| 2;3 |] (fun i -> i > 2) = 1 -findFirstIndexWhereTrue [| 2;3 |] (fun i -> i > 3) = 2 - -findFirstIndexWhereTrue [| 1;2;3 |] (fun i -> i > 0) = 0 -findFirstIndexWhereTrue [| 1;2;3 |] (fun i -> i > 1) = 1 -findFirstIndexWhereTrue [| 1;2;3 |] (fun i -> i > 2) = 2 -findFirstIndexWhereTrue [| 1;2;3 |] (fun i -> i > 3) = 3 - -findFirstIndexWhereTrue [| 1;2;3;4 |] (fun i -> i > 0) = 0 -findFirstIndexWhereTrue [| 1;2;3;4 |] (fun i -> i > 1) = 1 -findFirstIndexWhereTrue [| 1;2;3;4 |] (fun i -> i > 2) = 2 -findFirstIndexWhereTrue [| 1;2;3;4 |] (fun i -> i > 3) = 3 -findFirstIndexWhereTrue [| 1;2;3;4 |] (fun i -> i > 4) = 4 - -findFirstIndexWhereTrue [| 1;2;3;4;5 |] (fun i -> i > 0) = 0 -findFirstIndexWhereTrue [| 1;2;3;4;5 |] (fun i -> i > 1) = 1 -findFirstIndexWhereTrue [| 1;2;3;4;5 |] (fun i -> i > 2) = 2 -findFirstIndexWhereTrue [| 1;2;3;4;5 |] (fun i -> i > 3) = 3 -findFirstIndexWhereTrue [| 1;2;3;4;5 |] (fun i -> i > 4) = 4 -findFirstIndexWhereTrue [| 1;2;3;4;5 |] (fun i -> i > 5) = 5 -*) - -type XmlDocCollector() = - let mutable savedLines = new ResizeArray<(string * pos)>() - let mutable savedGrabPoints = new ResizeArray() - let pos_compare p1 p2 = if pos_geq p1 p2 then 1 else if pos_eq p1 p2 then 0 else -1 - let savedGrabPointsAsArray = - lazy (savedGrabPoints.ToArray() |> Array.sortWith pos_compare) - - let savedLinesAsArray = - lazy (savedLines.ToArray() |> Array.sortWith (fun (_,p1) (_,p2) -> pos_compare p1 p2)) - - let check() = - assert (not savedLinesAsArray.IsForced && "can't add more XmlDoc elements to XmlDocCOllector after extracting first XmlDoc from the overall results" <> "") - - member x.AddGrabPoint(pos) = - check() - savedGrabPoints.Add pos - - member x.AddXmlDocLine(line,pos) = - check() - savedLines.Add(line,pos) - - member x.LinesBefore(grabPointPos) = - - let lines = savedLinesAsArray.Force() - let grabPoints = savedGrabPointsAsArray.Force() - let firstLineIndexAfterGrabPoint = findFirstIndexWhereTrue lines (fun (_,pos) -> pos_geq pos grabPointPos) - let grabPointIndex = findFirstIndexWhereTrue grabPoints (fun pos -> pos_geq pos grabPointPos) - assert (pos_eq grabPoints.[grabPointIndex] grabPointPos) - let firstLineIndexAfterPrevGrabPoint = - if grabPointIndex = 0 then - 0 - else - let prevGrabPointPos = grabPoints.[grabPointIndex-1] - findFirstIndexWhereTrue lines (fun (_,pos) -> pos_geq pos prevGrabPointPos) - //printfn "#lines = %d, firstLineIndexAfterPrevGrabPoint = %d, firstLineIndexAfterGrabPoint = %d" lines.Length firstLineIndexAfterPrevGrabPoint firstLineIndexAfterGrabPoint - lines.[firstLineIndexAfterPrevGrabPoint..firstLineIndexAfterGrabPoint-1] |> Array.map fst - - -type XmlDoc = XmlDoc of string[] - -let emptyXmlDoc = XmlDoc[| |] -let MergeXmlDoc (XmlDoc lines) (XmlDoc lines') = XmlDoc (Array.append lines lines') - -type PreXmlDoc = - | PreXmlMerge of PreXmlDoc * PreXmlDoc - | PreXmlDoc of pos * XmlDocCollector - | PreXmlDocEmpty - - member x.ToXmlDoc() = - match x with - | PreXmlMerge(a,b) -> MergeXmlDoc (a.ToXmlDoc()) (b.ToXmlDoc()) - | PreXmlDocEmpty -> emptyXmlDoc - | PreXmlDoc (pos,collector) -> - let lines = collector.LinesBefore pos - if lines.Length = 0 then emptyXmlDoc - else XmlDoc lines - - static member CreateFromGrabPoint(collector:XmlDocCollector,grabPointPos) = - collector.AddGrabPoint grabPointPos - PreXmlDoc(grabPointPos,collector) - -let emptyPreXmlDoc = PreXmlDocEmpty -let MergePreXmlDoc a b = PreXmlMerge (a,b) - - - -let ProcessXmlDoc (XmlDoc lines) = - // chop leading spaces (well, this isn't very efficient, is it?) - let rec trimSpaces str = if String.hasPrefix str " " then trimSpaces (String.dropPrefix str " ") else str - - let rec processLines lines = - match lines with - | [] -> [] - | (lineA::rest) as lines -> - let lineAT = trimSpaces lineA - if lineAT = "" then processLines rest - else if String.hasPrefix lineAT "<" then lines - else [""] @ lines @ [""] - - let lines = processLines (Array.to_list lines) - if lines.Length = 0 then emptyXmlDoc - else XmlDoc (Array.of_list lines) - - -//------------------------------------------------------------------------ -// AST: main ast definitions -//----------------------------------------------------------------------- - - -// PERFORMANCE: consider making this a struct. -[] -[] -type ident (text,range) = - member x.idText = text - member x.idRange = range - override x.ToString() = text - -type ValueId = ident -type UnionCaseId = ident -type RecdFieldId = ident - -type LongIdent = ident list -type RecdFieldPath = LongIdent * RecdFieldId -type access = | Access of int (* 0 = public, 1 = assembly, 2 = outer module etc. *) - -let accessPublic = Access 0 -let accessInternal = Access 1 -let accessPrivate = Access System.Int32.MaxValue - -type - [] - SynConst = - | Const_unit - | Const_bool of bool - | Const_int8 of sbyte - | Const_uint8 of byte - | Const_int16 of int16 - | Const_uint16 of uint16 - | Const_int32 of int32 - | Const_uint32 of uint32 - | Const_int64 of int64 - | Const_uint64 of uint64 - | Const_nativeint of int64 - | Const_unativeint of uint64 - | Const_float32 of single - | Const_float of double - | Const_char of char - | Const_decimal of System.Decimal - | Const_bignum of ( (* value: *) string * (* suffix: *) string) - | Const_string of string * range - | Const_bytearray of byte[] * range - | Const_uint16array of uint16[] - | Const_measure of SynConst * SynMeasure (* we never iterate, so the const here is not another Const_measure *) - -and SimplePat = - | SPat_as of - ValueId * - bool * (* true if a compiler generated name *) - bool * (* true if 'this' variable in member *) - bool * (* true if an optional parm. *) - range - | SPat_typed of SimplePat * SynType * range - | SPat_attrib of SimplePat * SynAttributes * range - -and SimplePats = - | SPats of SimplePat list * range - | SPats_typed of SimplePats * SynType * range - -and - [] - SynPat = - | Pat_const of SynConst * range - | Pat_wild of range - | Pat_as of SynPat * ValueId * bool (* true if 'this' variable *) * access option * range - | Pat_instance_member of ValueId * ValueId * access option * range (* adhoc overloaded method/property *) - | Pat_typed of SynPat * SynType * range - | Pat_attrib of SynPat * SynAttributes * range - | Pat_disj of SynPat * SynPat * range - | Pat_conjs of SynPat list * range - | Pat_lid of LongIdent * SynValTyparDecls option (* usually None: temporary used to parse "f<'a> x = x"*) * SynPat list * access option * range - | Pat_tuple of SynPat list * range - | Pat_paren of SynPat * range - | Pat_array_or_list of bool * SynPat list * range - | Pat_recd of (RecdFieldPath * SynPat) list * range - | Pat_range of char * char * range - | Pat_null of range - | Pat_opt_var of ident * range - | Pat_isinst of SynType * range - | Pat_expr of SynExpr * range - -and - [] - SynType = - | Type_lid of LongIdent * range - | Type_app of SynType * SynType list * bool * range // the bool is true if this is a postfix type application e.g. "int list" or "(int,string) dict" - | Type_proj_then_app of SynType * LongIdent * SynType list * range - | Type_tuple of (bool*SynType) list * range // the bool is true if / rather than * follows the type - | Type_arr of int * SynType * range - | Type_lazy of SynType * range - | Type_fun of SynType * SynType * range - | Type_forall of SynTyparDecl * SynType * range - | Type_var of SynTypar * range - | Type_anon of range - | Type_with_global_constraints of SynType * SynTypeConstraint list * range - | Type_anon_constraint of SynType * range - | Type_quotient of SynType * SynType * range (* For units of measure e.g. m / s *) - | Type_power of SynType * int * range (* For units of measure e.g. m^3 *) - | Type_dimensionless of range (* For the dimensionless units i.e. 1 *) - -and SeqExprOnly = SeqExprOnly of bool - -and ExprAtomicFlag = - | Atomic = 0 - | NonAtomic = 1 - -and - [] - SynExpr = - | Expr_paren of SynExpr * range (* parenthesized expressions kept in AST to distinguish A.M((x,y)) from A.M(x,y) *) - | Expr_quote of SynExpr * bool * SynExpr * range - | Expr_const of SynConst * range - | Expr_typed of SynExpr * SynType * range - | Expr_tuple of SynExpr list * range - | Expr_array_or_list of bool * SynExpr list * range - | Expr_recd of (SynType * SynExpr * range) option * SynExpr option * (RecdFieldPath * SynExpr) list * range - | Expr_new of bool * SynType * SynExpr * range (* bool true if known to be 'family' ('proected') scope *) - | Expr_impl of SynType * (SynExpr * ident option) option * SynBinding list * SynInterfaceImpl list * range - | Expr_while of SequencePointInfoForWhileLoop * SynExpr * SynExpr * range - | Expr_for of SequencePointInfoForForLoop * ident * SynExpr * bool * SynExpr * SynExpr * range - | Expr_foreach of SequencePointInfoForForLoop * SeqExprOnly * SynPat * SynExpr * SynExpr * range - | Expr_array_or_list_of_seq of bool * SynExpr * range - | Expr_comprehension of bool * bool ref * SynExpr * range - /// first bool indicates if lambda originates from a method. Patterns here are always "simple" - /// second bool indicates if this is a "later" part of an iterated sequence of lambdas - | Expr_lambda of bool * bool * SimplePats * SynExpr * range - | Expr_match of SequencePointInfoForBinding * SynExpr * SynMatchClause list * bool * range (* bool indicates if this is an exception match in a computation expression which throws unmatched exceptions *) - | Expr_do of SynExpr * range - | Expr_assert of SynExpr * range - | Expr_app of ExprAtomicFlag * SynExpr * SynExpr * range - | Expr_tyapp of SynExpr * SynType list * range - | Expr_let of bool * bool * SynBinding list * SynExpr * range - | Expr_try_catch of SynExpr * range * SynMatchClause list * range * range * SequencePointInfoForTry * SequencePointInfoForWith - | Expr_try_finally of SynExpr * SynExpr * range * SequencePointInfoForTry * SequencePointInfoForFinally - | Expr_seq of SequencePointInfoForSeq * bool * SynExpr * SynExpr * range (* false for first flag indicates "do a then b then return a" *) - | Expr_arb of range // for error recovery - | Expr_throwaway of SynExpr * range // for error recovery - | Expr_cond of SynExpr * SynExpr * SynExpr option * SequencePointInfoForBinding * range * range - | Expr_lid_get of bool * LongIdent * range (* bool true if preceded by a '?' for an optional named parameter *) - | Expr_id_get of ident (* = Expr_lid_get(false,[id],id.idRange) *) - | Expr_lid_set of LongIdent * SynExpr * range - | Expr_lid_indexed_set of LongIdent * SynExpr * SynExpr * range - | Expr_lvalue_get of SynExpr * LongIdent * range - | Expr_lvalue_set of SynExpr * LongIdent * SynExpr * range - | Expr_lvalue_indexed_set of SynExpr * LongIdent * SynExpr * SynExpr * range - | Expr_constr_field_get of SynExpr * LongIdent * int * range - | Expr_constr_field_set of SynExpr * LongIdent * int * SynExpr * range - | Expr_asm of ILInstr array * SynType list * SynExpr list * SynType list * range (* Embedded IL assembly code *) - | Expr_static_optimization of StaticOptimizationConstraint list * SynExpr * SynExpr * range - | Expr_isinst of SynExpr * SynType * range - | Expr_upcast of SynExpr * SynType * range - | Expr_addrof of bool * SynExpr * range * range - | Expr_downcast of SynExpr * SynType * range - | Expr_inferred_upcast of SynExpr * range - | Expr_inferred_downcast of SynExpr * range - | Expr_null of range - | Expr_lazy of SynExpr * range - | Expr_ifnull of SynExpr * SynExpr * range - | Expr_trait_call of SynTypar list * SynClassMemberSpfn * SynExpr * range - | Expr_typeof of SynType * range - | Expr_lbrack_get of SynExpr * SynExpr list * range * range - | Expr_lbrack_set of SynExpr * SynExpr list * SynExpr * range * range - - | Comp_zero of range - | Comp_yield of (bool * bool) * SynExpr * range - | Comp_yieldm of (bool * bool) * SynExpr * range - | Comp_bind of SequencePointInfoForBinding * bool * SynPat * SynExpr * SynExpr * range - | Comp_do_bind of SynExpr * range - - -and SynInterfaceImpl = - | InterfaceImpl of SynType * SynBinding list * range - -and SynMatchClause = - | Clause of SynPat * SynExpr option * SynExpr * range * SequencePointInfoForTarget - -and SynAttributes = SynAttribute list - -and SynAttribute = - (* ident option are target specifiers, e.g. "assembly","module",etc. *) - | Attr of LongIdent * SynExpr * ident option * range - -and ValSynData = - | ValSynData of MemberFlags option * ValSynInfo * ident option - -and SynBindingKind = - | StandaloneExpression - | NormalBinding - | DoBinding - -and SynBinding = - | Binding of - access option * - SynBindingKind * - bool (* mustinline: *) * - bool (* mutable: *) * - SynAttributes * - PreXmlDoc * - ValSynData * - SynPat * - BindingRhs * - range * - SequencePointInfoForBinding - -and SequencePointInfoForTarget = - | SequencePointAtTarget - | SuppressSequencePointAtTarget - -and SequencePointInfoForSeq = - | SequencePointsAtSeq - // This means "suppress a in 'a;b'" and "suppress b in 'a before b'" - | SuppressSequencePointOnExprOfSequential - // This means "suppress b in 'a;b'" and "suppress a in 'a before b'" - | SuppressSequencePointOnStmtOfSequential - -and SequencePointInfoForTry = - | SequencePointAtTry of range - | NoSequencePointAtTry - -and SequencePointInfoForWith = - | SequencePointAtWith of range - | NoSequencePointAtWith - -and SequencePointInfoForFinally = - | SequencePointAtFinally of range - | NoSequencePointAtFinally - -and SequencePointInfoForForLoop = - | SequencePointAtForLoop of range - | NoSequencePointAtForLoop - -and SequencePointInfoForWhileLoop = - | SequencePointAtWhileLoop of range - | NoSequencePointAtWhileLoop - -and SequencePointInfoForBinding = - | SequencePointAtBinding of range - // Indicates the ommission of a sequence point for a binding for a 'do expr' - | NoSequencePointAtDoBinding - // Indicates the ommission of a sequence point for a binding for a 'let e = expr' where 'expr' has immediate control flow - | NoSequencePointAtLetBinding - // Indicates the ommission of a sequence point for a compiler generated binding - // where wev'e done a local expansion of some construct into something that involves - // a 'let'. e.g. we've inlined a function and bound its arguments using 'let' - // The let bindings are 'sticky' in that the inversion of the inlining would involve - // replacing the entire expression with the original and not just the let bindings alone. - | NoSequencePointAtStickyBinding - // Given 'let v = e1 in e2', where this is a compiler generated binding, - // we are sometimes forced to generate a sequence point for the expression anyway based on its - // overall range. If the let binding is given the flag below then it is basically asserting that - // the binding has no interesting side effects and can be totally ignored and the range - // of the inner expression is used instead - | NoSequencePointAtInvisibleBinding - - // Don't drop sequence points when combining sequence points - member x.Combine(y:SequencePointInfoForBinding) = - match x,y with - | SequencePointAtBinding _ as g, _ -> g - | _, (SequencePointAtBinding _ as g) -> g - | _ -> x - -// BindingRhs records the r.h.s. of a binding after some munging in the parser. -// NOTE: This is a bit of a mess. In the early implementation of F# we decided -// to have the parser convert "let f x = e" into -// "let f = fun x -> e". This is called "pushing" a pattern across to the right hand side. Complex -// patterns (e.g. non-tuple patterns) result in a computation on the right. -// However, this approach really isn't that great - especially since -// the language is now considerably more complex, e.g. we use -// type information from the first (but not the second) form in -// type inference for recursive bindings, and the first form -// may specify .NET attributes for arguments. There are still many -// relics of this approach around, e.g. the expression in BindingRhs -// below is of the second form. However, to extract relevant information -// we keep a record of the pats and optional explicit return type already pushed -// into expression so we can use any user-given type information from these -and BindingRhs = - | BindingRhs of - SimplePats list * - (SynType * range * SynAttributes) option * - SynExpr - -and MemberFlags = - { OverloadQualifier: string option; - MemberIsInstance: bool; - MemberIsVirtual: bool; - MemberIsDispatchSlot: bool; - MemberIsOverrideOrExplicitImpl: bool; - MemberIsFinal: bool; - MemberKind: MemberKind } - -/// Note the member kind is actually computed partially by a syntax tree transformation "norm_pat" in tc.ml -and MemberKind = - | MemberKindClassConstructor - | MemberKindConstructor - | MemberKindMember - | MemberKindPropertyGet - | MemberKindPropertySet - | MemberKindPropertyGetSet - -and SynSignature = - | Sign_named of LongIdent - | Sign_explicit of SynModuleSpecDecls - - -and - [] - SynModuleImplDecl = - | Def_module_abbrev of ident * LongIdent * range - | Def_module of SynComponentInfo * SynModuleImplDecls * SynSignature option * range - | Def_let of bool * SynBinding list * range (* first flag recursion, second flag must-inline *) - | Def_expr of SequencePointInfoForBinding * SynExpr * range - | Def_tycons of SynTyconDefn list * range - | Def_partial_tycon of SynComponentInfo * SynClassMemberDefns * range - | Def_exn of SynExceptionDefn * range - | Def_open of LongIdent * range - | Def_attributes of SynAttributes * range - | Def_hash of hashDirective * range - -and SynExceptionCore = - | ExconCore of SynAttributes * SynUnionCaseDecl * LongIdent option * PreXmlDoc * access option * range - -and SynExceptionDefn = - | ExconDefn of SynExceptionCore * SynClassMemberDefns * range - -and SynTyconKind = - | TyconUnspecified - | TyconClass - | TyconInterface - | TyconStruct - | TyconRecord - | TyconUnion - | TyconAbbrev - | TyconHiddenRepr - | TyconILAssemblyCode - /// REVIEW: this should be a different representation, rather than a SynTyconKind - | TyconDelegate of SynType * ValSynInfo - -and SynTyconDefnRepr = - | TyconDefnRepr_class of SynTyconKind * SynClassMemberDefns * range - | TyconDefnRepr_simple of SynTyconSpfnOrDefnSimpleRepr * range - -and SynTyconDefn = - | TyconDefn of SynComponentInfo * SynTyconDefnRepr * SynClassMemberDefns * range - -and SynClassMemberDefns = SynClassMemberDefn list - -and - [] - SynClassMemberDefn = - | ClassMemberDefn_open of LongIdent * range - | ClassMemberDefn_member_binding of SynBinding * range - /// implicit ctor args as a defn line, 'as' specification - | ClassMemberDefn_implicit_ctor of access option * SynAttributes * SimplePat list * ident option * range - /// inherit (args...) as base - | ClassMemberDefn_implicit_inherit of SynType * SynExpr * ident option * range - /// localDefns - | ClassMemberDefn_let_bindings of SynBinding list * (* static: *) bool * (* recursive: *) bool * range - | ClassMemberDefn_slotsig of SynValSpfn * MemberFlags * range - | ClassMemberDefn_interface of SynType * SynClassMemberDefns option * range - | ClassMemberDefn_inherit of SynType * ident option * range - | ClassMemberDefn_field of SynFieldDecl * range - | ClassMemberDefn_tycon of SynTyconDefn * access option * range - -and SynExnSpfn = - | ExconSpfn of SynExceptionCore * SynClassSpfn * range - -and SynClassSpfn = SynClassMemberSpfn list - -and - [] - SynClassMemberSpfn = - | ClassMemberSpfn_binding of SynValSpfn * MemberFlags * range - | ClassMemberSpfn_interface of SynType * range - | ClassMemberSpfn_inherit of SynType * range - | ClassMemberSpfn_field of SynFieldDecl * range - | ClassMemberSpfn_tycon of SynTyconSpfn * range - -and SynValSpfn = - | ValSpfn of - SynAttributes * - ValueId * - SynValTyparDecls * - SynType * - ValSynInfo * - bool * - bool * (* mutable? *) - PreXmlDoc * - access option * - SynExpr option * - range - -and ValSynInfo = - | ValSynInfo of (*args:*) ArgSynInfo list list * (*return:*) ArgSynInfo - member x.ArgInfos = (let (ValSynInfo(args,_)) = x in args) - -and ArgSynInfo = - | ArgSynInfo of SynAttributes * (*optional:*) bool * ident option - -and SynValTyparDecls = - | SynValTyparDecls of SynTyparDecl list * bool * SynTypeConstraint list - -and SynTyconSpfnRepr = - | TyconSpfnRepr_class of SynTyconKind * SynClassSpfn * range - | TyconSpfnRepr_simple of SynTyconSpfnOrDefnSimpleRepr * range - -and SynComponentInfo = - | ComponentInfo of SynAttributes * ComponentKind * SynTyparDecl list * SynTypeConstraint list * LongIdent * PreXmlDoc * (* preferPostfix: *) bool * access option * range - -and ComponentKind = - | TMK_Namespace - | TMK_Module - | TMK_Tycon - -and SynTyconSpfn = - | TyconSpfn of SynComponentInfo * SynTyconSpfnRepr * SynClassSpfn * range - -and - [] - SynModuleSpecDecl = - | Spec_module_abbrev of ident * LongIdent * range - | Spec_module of SynComponentInfo * SynModuleSpecDecls * range - | Spec_val of SynValSpfn * range - | Spec_tycon of SynTyconSpfn list * range - | Spec_exn of SynExnSpfn * range - | Spec_open of LongIdent * range - | Spec_hash of hashDirective * range - -and - [] - SynTyconSpfnOrDefnSimpleRepr = - | TyconCore_union of access option * SynUnionCaseDecls * range - | TyconCore_enum of SynEnumCaseDecls * range - | TyconCore_recd of access option * SynFieldDecls * range - | TyconCore_general of SynTyconKind * (SynType * range * ident option) list * (SynValSpfn * MemberFlags) list * SynFieldDecls * bool * bool * range - | TyconCore_asm of ILType * range - | TyconCore_abbrev of SynType * range - | TyconCore_no_repr of range - -and SynUnionCaseDecls = SynUnionCaseDecl list - -and SynEnumCaseDecls = SynEnumCaseDecl list - -and SynFieldDecls = SynFieldDecl list - -and SynFieldDecl = - | Field of SynAttributes * (* static: *) bool * RecdFieldId option * SynType * bool * PreXmlDoc * access option * range - -and SynUnionCaseDecl = - | UnionCase of SynAttributes * UnionCaseId * SynUnionConstrTypeDecl * PreXmlDoc * access option * range - -and SynEnumCaseDecl = - | EnumCase of SynAttributes * UnionCaseId * SynConst * PreXmlDoc * range - -and SynUnionConstrTypeDecl = - /// Normal ML-style declaration - | UnionCaseFields of SynFieldDecl list - /// Full type spec given by 'UnionCase : ty1 * tyN -> rty' - | UnionCaseFullType of (SynType * ValSynInfo) - -and SynMeasure = - | Measure_Con of LongIdent * range - | Measure_Prod of SynMeasure * SynMeasure * range - | Measure_Seq of SynMeasure list * range - | Measure_Quot of SynMeasure * SynMeasure * range - | Measure_Power of SynMeasure * int * range - | Measure_One - | Measure_Anon of range - | Measure_Var of SynTypar * range - -and SynTypar = - | Typar of ident * TyparStaticReq * (* compgen: *) bool - -and SynTyparDecl = - | TyparDecl of SynAttributes * SynTypar - -and TyparStaticReq = - | NoStaticReq - | HeadTypeStaticReq - -and StaticOptimizationConstraint = - | WhenTyparTyconEqualsTycon of SynTypar * SynType * range - | WhenInlined of range - -and - [] - SynTypeConstraint = - | WhereTyparIsValueType of SynTypar * range - (* | WhereTyparSupportsDefaultConstructor of SynTypar * range *) - | WhereTyparIsReferenceType of SynTypar * range - | WhereTyparSupportsNull of SynTypar * range - | WhereTyparDefaultsToType of SynTypar * SynType * range - | WhereTyparEqualsType of SynTypar * SynType * range - | WhereTyparSubtypeOfType of SynTypar * SynType * range - | WhereTyparSupportsMember of SynTypar list * SynClassMemberSpfn * range - | WhereTyparIsEnum of SynTypar * SynType list * range - | WhereTyparIsDelegate of SynTypar * SynType list * range - -and SynModuleSpecDecls = SynModuleSpecDecl list -and SynModuleImplDecls = SynModuleImplDecl list - -/// QualifiedNameOfFile acts to fully-qualify module specifications and implementations, -/// most importantly the ones that simply contribute fragments to a namespace (i.e. the AnonNamespaceFragmentSpec case) -/// There may be multiple such fragments in a single assembly, a major difference between traditional -/// ML and F#. There may thus also be multiple matching pairs of these in an assembly, all contributing types to the same -/// namespace. These are matched up by the filename-rule. -and QualifiedNameOfFile = - | QualifiedNameOfFile of ident - member x.Text = (let (QualifiedNameOfFile(t)) = x in t.idText) - member x.Id = (let (QualifiedNameOfFile(t)) = x in t) - member x.Range = (let (QualifiedNameOfFile(t)) = x in t.idRange) - -/// ModuleOrNamespaceImpl(lid,isModule,decls,xmlDoc,attribs,access,m) -and moduleImpl = - | ModuleOrNamespaceImpl of LongIdent * (*isModule:*) bool * SynModuleImplDecls * PreXmlDoc * SynAttributes * access option * range - -and moduleSpec = - | ModuleOrNamespaceSpec of LongIdent * (*isModule:*) bool * SynModuleSpecDecls * PreXmlDoc * SynAttributes * access option * range - -and ParsedSigFileFragment = - | AnonTopModuleSpec of SynModuleSpecDecls * range - | NamedTopModuleSpec of moduleSpec - | AnonNamespaceFragmentSpec of LongIdent * bool * SynModuleSpecDecls * PreXmlDoc * SynAttributes * range - -and ParsedImplFileFragment = - | AnonTopModuleImpl of SynModuleImplDecls * range - | NamedTopModuleImpl of moduleImpl - | AnonNamespaceFragmentImpl of LongIdent * bool * SynModuleImplDecls * PreXmlDoc * SynAttributes * range - -and interaction = - | IDefns of SynModuleImplDecl list * range - | IHash of hashDirective * range - -and hashDirective = - | HashDirective of string * string list * range - -and ParsedImplFile = - | ParsedImplFile of hashDirective list * ParsedImplFileFragment list - -and ParsedSigFile = - | ParsedSigFile of hashDirective list * ParsedSigFileFragment list - -//---------------------------------------------------------------------- -// AST and parsing utilities. -//---------------------------------------------------------------------- - -type path = string list -let ident (s,r) = new ident(s,r) -let text_of_id (id:ident) = id.idText -let path_of_lid lid = List.map text_of_id lid -let arr_path_of_lid lid = Array.of_list (List.map text_of_id lid) -let text_of_path path = String.concat "." path -let text_of_arr_path path = - String.concat "." (List.of_array path) -let text_of_lid lid = text_of_path (path_of_lid lid) - -let range_of_lid (lid: ident list) = - match lid with - | [] -> failwith "range_of_lid" - | [id] -> id.idRange - | h::t -> union_ranges h.idRange (List.last t).idRange - - -type ScopedPragma = - | WarningOff of range * int - // Note: this type may be extended in the future with optimization on/off switches etc. - -// These are the results of parsing + folding in the implicit file name -/// ImplFile(modname,isScript,qualName,hashDirectives,modules,canContainEntryPoint) -type implFile = ImplFile of string * (*isScript: *) bool * QualifiedNameOfFile * ScopedPragma list * hashDirective list * moduleImpl list * bool -type sigFile = SigFile of string * QualifiedNameOfFile * ScopedPragma list * hashDirective list * moduleSpec list - -type input = - | ImplFileInput of implFile - | SigFileInput of sigFile - -let range_of_input inp = - match inp with - | ImplFileInput (ImplFile(_,_,_,_,_,(ModuleOrNamespaceImpl(_,_,_,_,_,_,m) :: _),_)) - | SigFileInput (SigFile(_,_,_,_,(ModuleOrNamespaceSpec(_,_,_,_,_,_,m) :: _))) -> m - | ImplFileInput (ImplFile(filename,_,_,_,_,[],_)) - | SigFileInput (SigFile(filename,_,_,_,[])) -> -#if DEBUG - assert("" = "compiler expects ImplFileInput and SigFileInput to have at least one fragment, 4488") -#endif - rangeN filename 0 (* There are no implementations, e.g. due to errors, so return a default range for the file *) - - -//---------------------------------------------------------------------- -// Construct syntactic AST nodes -//----------------------------------------------------------------------- - -let mksyn_id m s = ident(s,m) -let path_to_lid m p = List.map (mksyn_id m) p -let text_to_id0 n = mksyn_id range0 n - -// REVIEW: get rid of this name generator, which is used for the type inference -// variables implicit in the #C syntax -let mksyn_new_uniq = let i = ref 0 in fun () -> incr i; !i -let mksyn_item m n = Expr_id_get(mksyn_id m n) - -// REVIEW: get rid of this state -let new_arg_uniq_ref = ref 0 -let mksyn_new_arg_uniq () = incr new_arg_uniq_ref; !new_arg_uniq_ref -let mksyn_spat_var isOpt id = SPat_as (id,false,false,isOpt,id.idRange) - -let range_of_synpat p = - match p with - | Pat_const(_,m) | Pat_wild m | Pat_as (_,_,_,_,m) | Pat_disj (_,_,m) | Pat_conjs (_,m) - | Pat_lid (_,_,_,_,m) | Pat_array_or_list(_,_,m) | Pat_tuple (_,m) |Pat_typed(_,_,m) |Pat_attrib(_,_,m) - | Pat_recd (_,m) | Pat_range (_,_,m) | Pat_null m | Pat_isinst (_,m) | Pat_expr (_,m) - | Pat_instance_member(_,_,_,m) | Pat_opt_var(_,m) | Pat_paren(_,m) -> m - -let range_of_syntype ty = - match ty with - | Type_lid(_,m) | Type_app(_,_,_,m) | Type_proj_then_app(_,_,_,m) | Type_tuple(_,m) | Type_lazy(_,m) | Type_arr(_,_,m) | Type_fun(_,_,m) - | Type_forall(_,_,m) | Type_var(_,m) | Type_anon m | Type_with_global_constraints(_,_,m) - | Type_anon_constraint(_,m) | Type_quotient(_,_,m) | Type_power(_,_,m) | Type_dimensionless m -> m - -let range_of_synconst c dflt = - match c with - | Const_string (_,m0) | Const_bytearray (_,m0) -> m0 - | _ -> dflt - -let range_of_synexpr = function - | Expr_paren(_,m) - | Expr_quote(_,_,_,m) - | Expr_const(_,m) - | Expr_typed (_,_,m) - | Expr_tuple (_,m) - | Expr_array_or_list (_,_,m) - | Expr_recd (_,_,_,m) - | Expr_new (_,_,_,m) - | Expr_impl (_,_,_,_,m) - | Expr_while (_,_,_,m) - | Expr_for (_,_,_,_,_,_,m) - | Expr_foreach (_,_,_,_,_,m) - | Expr_comprehension (_,_,_,m) - | Expr_array_or_list_of_seq (_,_,m) - | Expr_lambda (_,_,_,_,m) - | Expr_match (_,_,_,_,m) - | Expr_do (_,m) - | Expr_assert (_,m) - | Expr_app (_,_,_,m) - | Expr_tyapp (_,_,m) - | Expr_let (_,_,_,_,m) - | Expr_try_catch (_,_,_,_,m,_,_) - | Expr_try_finally (_,_,m,_,_) - | Expr_seq (_,_,_,_,m) - | Expr_arb m - | Expr_throwaway (_,m) - | Expr_cond (_,_,_,_,_,m) - | Expr_lid_get (_,_,m) - | Expr_lid_set (_,_,m) - | Expr_lid_indexed_set (_,_,_,m) - | Expr_lbrack_get (_,_,_,m) - | Expr_lbrack_set (_,_,_,_,m) - | Expr_lvalue_get (_,_,m) - | Expr_lvalue_set (_,_,_,m) - | Expr_lvalue_indexed_set (_,_,_,_,m) - | Expr_constr_field_get (_,_,_,m) - | Expr_constr_field_set (_,_,_,_,m) - | Expr_asm (_,_,_,_,m) - | Expr_static_optimization (_,_,_,m) - | Expr_isinst (_,_,m) - | Expr_upcast (_,_,m) - | Expr_addrof (_,_,_,m) - | Expr_downcast (_,_,m) - | Expr_inferred_upcast (_,m) - | Expr_inferred_downcast (_,m) - | Expr_null m - | Expr_lazy (_, m) - | Expr_trait_call(_,_,_,m) - | Expr_typeof(_,m) - | Comp_zero (m) - | Comp_yield (_,_,m) - | Comp_yieldm (_,_,m) - | Comp_bind (_,_,_,_,_,m) - | Comp_do_bind (_,m) - | Expr_ifnull (_,_,m) -> m - | Expr_id_get id -> id.idRange - -let range_of_syndecl d = - match d with - | Def_module_abbrev(_,_,m) - | Def_module(_,_,_,m) - | Def_let(_,_,m) - | Def_expr(_,_,m) - | Def_tycons(_,m) - | Def_partial_tycon(_,_,m) - | Def_exn(_,m) - | Def_open (_,m) - | Def_hash (_,m) - | Def_attributes(_,m) -> m - -let range_of_synspec d = - match d with - | Spec_module_abbrev (_,_,m) - | Spec_module (_,_,m) - | Spec_val (_,m) - | Spec_tycon (_,m) - | Spec_exn (_,m) - | Spec_open (_,m) - | Spec_hash (_,m) -> m - -let range_of_classmember d = - match d with - | ClassMemberDefn_member_binding(_, m) - | ClassMemberDefn_interface(_, _, m) - | ClassMemberDefn_open(_, m) - | ClassMemberDefn_let_bindings(_,_,_,m) - | ClassMemberDefn_implicit_ctor(_,_,_,_,m) - | ClassMemberDefn_implicit_inherit(_,_,_,m) - | ClassMemberDefn_slotsig(_,_,m) - | ClassMemberDefn_inherit(_,_,m) - | ClassMemberDefn_field(_,m) - | ClassMemberDefn_tycon(_,_,m) -> m - - -let rec IsControlFlowExpression e = - match e with - | Expr_impl _ - | Expr_lambda _ - | Expr_let _ - | Expr_seq _ - | Expr_cond _ - | Comp_bind _ - | Expr_match _ - | Expr_try_catch _ - | Expr_try_finally _ - | Expr_for _ - | Expr_foreach _ - | Expr_while _ -> true - | Expr_typed(e,_,_) -> IsControlFlowExpression e - | _ -> false - -let anon_field_of_typ ty = Field([],false,None,ty,false,emptyPreXmlDoc,None,range_of_syntype ty) - -let mksyn_pat_var vis (id:ident) = Pat_as (Pat_wild id.idRange,id,false,vis,id.idRange) -let mksyn_this_pat_var (id:ident) = Pat_as (Pat_wild id.idRange,id,true,None,id.idRange) -let mksyn_pat_maybe_var lid vis m = Pat_lid (lid,None,[],vis,m) - -let generatedArgNamePrefix = "_arg" - -let new_arg_name() = (generatedArgNamePrefix^string (mksyn_new_arg_uniq())) - -let mksyn_new_arg_var m = - let nm = new_arg_name() - let id = mksyn_id m nm - mksyn_pat_var None id,mksyn_item m nm - -/// Push non-simple parts of a patten match over onto the r.h.s. of a lambda. -/// Return a simple pattern and a function to build a match on the r.h.s. if the pattern is complex -let rec SimplePatOfPat p = - match p with - | Pat_typed(p',ty,m) -> - let p2,laterf = SimplePatOfPat p' - SPat_typed(p2,ty,m), - laterf - | Pat_attrib(p',attribs,m) -> - let p2,laterf = SimplePatOfPat p' - SPat_attrib(p2,attribs,m), - laterf - | Pat_as (Pat_wild _, v,thisv,_,m) -> - SPat_as (v,false,thisv,false,m), - None - | Pat_opt_var (v,m) -> - SPat_as (v,false,false,true,m), - None - | Pat_paren (p,m) -> SimplePatOfPat p - | _ -> - let m = range_of_synpat p - (* 'nm' may be a real variable. Maintain its name. *) - let compgen,nm = (match p with Pat_lid([id],None,[],None,_) -> false,id.idText | _ -> true,new_arg_name()) - let id = mksyn_id m nm - let item = mksyn_item m nm - SPat_as (id,compgen,false,false,id.idRange), - Some (fun e -> Expr_match(NoSequencePointAtInvisibleBinding, item,[Clause(p,None,e,m,SuppressSequencePointAtTarget)],false,m)) - -let appFunOpt funOpt x = match funOpt with None -> x | Some f -> f x -let composeFunOpt funOpt1 funOpt2 = match funOpt2 with None -> funOpt1 | Some f -> Some (fun x -> appFunOpt funOpt1 (f x)) -let rec SimplePatsOfPat p = - match p with - | Pat_typed(p',ty,m) -> - let p2,laterf = SimplePatsOfPat p' - SPats_typed(p2,ty,m), - laterf - // | Pat_paren (p,m) -> SimplePatsOfPat p - | Pat_tuple (ps,m) - | Pat_paren(Pat_tuple (ps,m),_) -> - let ps2,laterf = - List.foldBack - (fun (p',rhsf) (ps',rhsf') -> - p'::ps', - (composeFunOpt rhsf rhsf')) - (List.map SimplePatOfPat ps) - ([], None) - SPats (ps2,m), - laterf - | Pat_paren(Pat_const (Const_unit,m),_) - | Pat_const (Const_unit,m) -> - SPats ([],m), - None - | _ -> - let m = range_of_synpat p - let sp,laterf = SimplePatOfPat p - SPats ([sp],m),laterf - -let PushPatternToExpr isMember pat rhs = - let nowpats,laterf = SimplePatsOfPat pat - nowpats, Expr_lambda (isMember,false,nowpats, appFunOpt laterf rhs,range_of_synexpr rhs) - -let IsSimplePattern pat = - let nowpats,laterf = SimplePatsOfPat pat - isNone laterf - -/// "fun (UnionCase x) (UnionCase y) -> body" -/// ==> -/// "fun tmp1 tmp2 -> -/// let (UnionCase x) = tmp1 in -/// let (UnionCase y) = tmp2 in -/// body" -let PushCurriedPatternsToExpr wholem isMember pats rhs = - // Two phases - // First phase: Fold back, from right to left, pushing patterns into r.h.s. expr - let spatsl,rhs = - (pats, ([],rhs)) - ||> List.foldBack (fun arg (spatsl,body) -> - let spats,bodyf = SimplePatsOfPat arg - // accumulate the body. This builds "let (UnionCase y) = tmp2 in body" - let body = appFunOpt bodyf body - // accumulate the patterns - let spatsl = spats::spatsl - (spatsl,body)) - // Second phase: build lambdas. Mark subsequent ones with "true" indicating they are part of an iterated sequence of lambdas - let expr = - match spatsl with - | [] -> rhs - | h::t -> - let expr = List.foldBack (fun spats e -> Expr_lambda (isMember,true,spats, e,wholem)) t rhs - let expr = Expr_lambda (isMember,false,h, expr,wholem) - expr - spatsl,expr - -let new_unit_uniq_ref = ref 0 -let new_unit_uniq () = incr new_unit_uniq_ref; !new_unit_uniq_ref - - -/// Helper for parsing the inline IL fragments. -let ParseAssemblyCodeInstructions s m = - try Ilpars.top_instrs Illex.token (UnicodeLexing.StringAsLexbuf s) - with RecoverableParseError -> - errorR(Error("error while parsing embedded IL",m)); [| |] - -/// Helper for parsing the inline IL fragments. -let ParseAssemblyCodeType s m = - try Ilpars.top_typ Illex.token (UnicodeLexing.StringAsLexbuf s) - with RecoverableParseError -> - errorR(Error("error while parsing embedded IL type",m)); IL.ecmaILGlobals.IL.typ_Object - -//------------------------------------------------------------------------ -// AST constructors -//------------------------------------------------------------------------ - -let lparen_set_opname = (CompileOpName lparen_set) -let lparen_get_opname = (CompileOpName lparen_get) -let qmark_opname = (CompileOpName qmark) -let mksyn_lid_get m path n = Expr_lid_get(false,path_to_lid m path @ [mksyn_id m n],m) -let mksyn_mod_item m modul n = mksyn_lid_get m [modul] n -let mk_oper opm oper = mksyn_item opm (CompileOpName oper) - -// 'false' in Expr_app means that operators are never high-precedence applications -let mksyn_infix opm m l oper r = Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, mk_oper opm oper,l,m), r,m) -let mksyn_bifix m oper l r = Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, mk_oper m oper,l,m), r,m) -let mksyn_trifix m oper x1 x2 x3 = Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, mk_oper m oper,x1,m), x2,m), x3,m) -let mksyn_quadfix m oper x1 x2 x3 x4 = Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, mk_oper m oper,x1,m), x2,m), x3,m),x4,m) -let mksyn_quinfix m oper x1 x2 x3 x4 x5 = Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, Expr_app (ExprAtomicFlag.NonAtomic, mk_oper m oper,x1,m), x2,m), x3,m),x4,m),x5,m) -let mksyn_prefix opm m oper x = Expr_app (ExprAtomicFlag.NonAtomic, mk_oper opm oper, x,m) -let mksyn_constr m n = [mksyn_id m (CompileOpName n)] - -let mksyn_dot_lparen_set m a b c = mksyn_trifix m lparen_set a b c -let mksyn_dot_lbrack_get m mDot a b = Expr_lbrack_get(a,[b],mDot,m) -let mksyn_qmark_set m a b c = mksyn_trifix m qmark_set a b c - -let mksyn_dot_lbrack_slice_get m mDot arr (x,y) = - Expr_lbrack_get(arr,[x;y],mDot,m) - -let mksyn_dot_lbrack_slice2_get m mDot arr (x1,y1) (x2,y2) = - Expr_lbrack_get(arr,[x1;y1;x2;y2],mDot,m) - -let mksyn_dot_lbrack_slice3_get m mDot arr (x1,y1) (x2,y2) (x3,y3) = - Expr_lbrack_get(arr,[x1;y1;x2;y2;x3;y3],mDot,m) - -let mksyn_dot_lbrack_slice4_get m mDot arr (x1,y1) (x2,y2) (x3,y3) (x4,y4) = - Expr_lbrack_get(arr,[x1;y1;x2;y2;x3;y3;x4;y4],mDot,m) - -let mksyn_dot_lparen_get m a b = - match b with - | Expr_tuple ([_;_],_) -> error(Deprecated("This indexer notation has been removed from the F# language",m)) - | Expr_tuple ([_;_;_],_) -> error(Deprecated("This indexer notation has been removed from the F# language",m)) - | _ -> mksyn_infix m m a lparen_get b -let mksyn_unit m = Expr_const(Const_unit,m) -let mksyn_unit_pat m = Pat_const(Const_unit,m) -let mksyn_delay m e = Expr_lambda (false,false,SPats ([mksyn_spat_var false (mksyn_id m "unitVar")],m), e, m) - -let (|Expr_lid_or_id_get|_|) inp = - match inp with - | Expr_lid_get(isOpt,lid, m) -> Some (isOpt,lid,m) - | Expr_id_get(id) -> Some (false,[id], id.idRange) - | _ -> None - -let (|Expr_single_id_get|_|) inp = - match inp with - | Expr_lid_get(false,[id], _) -> Some id.idText - | Expr_id_get(id) -> Some id.idText - | _ -> None - -let mksyn_assign m l r = - let m = union_ranges (range_of_synexpr l) (range_of_synexpr r) - match l with - //| Expr_paren(l2,m2) -> mksyn_assign m l2 r - | Expr_lid_or_id_get(false,v,_) -> Expr_lid_set (v,r,m) - | Expr_lvalue_get(e,v,_) -> Expr_lvalue_set (e,v,r,m) - | Expr_lbrack_get(e1,e2,mDot,_) -> Expr_lbrack_set (e1,e2,r,mDot,m) - | Expr_constr_field_get (x,y,z,_) -> Expr_constr_field_set (x,y,z,r,m) - | Expr_app (_, Expr_app(_, Expr_single_id_get(nm), a, _),b,_) when nm = qmark_opname -> - mksyn_qmark_set m a b r - | Expr_app (_, Expr_app(_, Expr_single_id_get(nm), a, _),b,_) when nm = lparen_get_opname -> - mksyn_dot_lparen_set m a b r - | Expr_app (_, Expr_lid_get(false,v,_),x,_) -> Expr_lid_indexed_set (v,x,r,m) - | Expr_app (_, Expr_lvalue_get(e,v,_),x,_) -> Expr_lvalue_indexed_set (e,v,x,r,m) - | _ -> errorR(Error("invalid expression on left of assignment",m)); Expr_const(Const_unit,m) - -let rec mksyn_dot m l r = - match l with - //| Expr_paren(l2,m2) -> mksyn_dot m l2 r - | Expr_lid_get(isOpt,lid,_) -> Expr_lid_get(isOpt,lid@[r],m) // MEMORY PERFORMANCE: This is memory intensive (we create a lot of these list nodes) - an ImmutableArray would be better here - | Expr_id_get(id) -> Expr_lid_get(false,[id;r],m) - | Expr_lvalue_get(e,lid,_) -> Expr_lvalue_get(e,lid@[r],m)// MEMORY PERFORMANCE: This is memory intensive (we create a lot of these list nodes) - an ImmutableArray would be better here - | expr -> Expr_lvalue_get(expr,[r],m) - -let rec mksyn_dotn m l r = - match l with - //| Expr_paren(l2,m2) -> mksyn_dotn m l2 r - | Expr_app (_, Expr_app(_, Expr_single_id_get(nm), a, _),Expr_lid_get (false,cid,_),_) when nm = lparen_get_opname-> - Expr_constr_field_get (a,cid, r,m) - | _ -> errorR(Error("array access or constructor field access expected",m)); Expr_const(Const_unit,m) - -let mksyn_match_lambda (isMember,isExnMatch,wholem,mtch,spBind) = - let p,pe = mksyn_new_arg_var wholem - let _,e = PushCurriedPatternsToExpr wholem isMember [p] (Expr_match(spBind,pe,mtch,isExnMatch,wholem)) - e - -let mksyn_fun_match_lambdas isMember wholem ps e = - let _,e = PushCurriedPatternsToExpr wholem isMember ps e - e - -let mksyn_cons x y = - let xm = range_of_synexpr x - Expr_app(ExprAtomicFlag.NonAtomic, Expr_id_get(mksyn_id xm opname_Cons),Expr_tuple([x;y],xm),xm) - -let mksyn_list m l = - List.foldBack mksyn_cons l (Expr_id_get(mksyn_id m opname_Nil)) - -let mksyn_cons_pat x y = - let xm = range_of_synpat x - Pat_lid (mksyn_constr xm opname_Cons, None, [Pat_tuple ([x;y],xm)],None,xm) - -let mksyn_list_pat m l = - List.foldBack mksyn_cons_pat l (Pat_lid(mksyn_constr m opname_Nil, None, [], None,m)) - -//------------------------------------------------------------------------ -// Arities of members -// Members have strongly syntactically constrained arities. We must infer -// the arity from the syntax in order to have any chance of handling recursive -// cross references during type inference. -// -// So we record the arity for: -// StaticProperty --> [1] -- for unit arg -// this.StaticProperty --> [1;1] -- for unit arg -// StaticMethod(args) --> map InferArgSynInfoFromSimplePat args -// this.InstanceMethod() --> 1 :: map InferArgSynInfoFromSimplePat args -// this.InstanceProperty with get(argpat) --> 1 :: [InferArgSynInfoFromSimplePat argpat] -// StaticProperty with get(argpat) --> [InferArgSynInfoFromSimplePat argpat] -// this.InstanceProperty with get() --> 1 :: [InferArgSynInfoFromSimplePat argpat] -// StaticProperty with get() --> [InferArgSynInfoFromSimplePat argpat] -// -// this.InstanceProperty with set(argpat)(v) --> 1 :: [InferArgSynInfoFromSimplePat argpat; 1] -// StaticProperty with set(argpat)(v) --> [InferArgSynInfoFromSimplePat argpat; 1] -// this.InstanceProperty with set(v) --> 1 :: [1] -// StaticProperty with set(v) --> [1] -//----------------------------------------------------------------------- - -module SynInfo = begin - let unnamedTopArg1 = ArgSynInfo([],false,None) - let unnamedTopArg = [unnamedTopArg1] - let unitArgData = unnamedTopArg - let unnamedRetVal = ArgSynInfo([],false,None) - let selfMetadata = unnamedTopArg - - let HasNoArgs (ValSynInfo(args,_)) = isNil args - let HasOptionalArgs (ValSynInfo(args,_)) = List.exists (List.exists (fun (ArgSynInfo(_,isOptArg,_)) -> isOptArg)) args - let IncorporateEmptyTupledArg (ValSynInfo(args,retInfo)) = ValSynInfo([]::args,retInfo) - let IncorporateSelfArg (ValSynInfo(args,retInfo)) = ValSynInfo(selfMetadata::args,retInfo) - let IncorporateSetterArg (ValSynInfo(args,retInfo)) = - let args = - match args with - [] -> [unnamedTopArg] - | [arg] -> [arg@[unnamedTopArg1]] - | _ -> failwith "invalid setter type" - ValSynInfo(args,retInfo) - let NumCurriedArgs(ValSynInfo(args,_)) = List.length args - let AritiesOfArgs (ValSynInfo(args,_)) = List.map List.length args - let AttribsOfArgData (ArgSynInfo(attribs,_,_)) = attribs - let IsOptionalArg (ArgSynInfo(_,isOpt,_)) = isOpt - let rec InferArgSynInfoFromSimplePat attribs p = - match p with - | SPat_as(nm,compgen,_,isOpt,_) -> - (* if List.length attribs <> 0 then dprintf "List.length attribs = %d\n" (List.length attribs); *) - ArgSynInfo(attribs, isOpt, (if compgen then None else Some nm)) - | SPat_typed(a,_,_) -> InferArgSynInfoFromSimplePat attribs a - | SPat_attrib(a,attribs2,_) -> InferArgSynInfoFromSimplePat (attribs @ attribs2) a - - let rec InferArgSynInfoFromSimplePats x = - match x with - | SPats(ps,_) -> List.map (InferArgSynInfoFromSimplePat []) ps - | SPats_typed(ps,_,_) -> InferArgSynInfoFromSimplePats ps - - let InferArgSynInfoFromPat p = - let sp,_ = SimplePatsOfPat p - InferArgSynInfoFromSimplePats sp - - /// Make sure only a solitary unit argument has unit elimination - let AdjustArgsForUnitElimination infosForArgs = - match infosForArgs with - | [[]] -> infosForArgs - | _ -> infosForArgs |> List.map (function [] -> unitArgData | x -> x) - - let AdjustMemberArgs memFlags infosForArgs = - match infosForArgs with - // Transform a property declared using '[static] member P = expr' to a method taking a "unit" argument - | [] when memFlags=MemberKindMember -> [] :: infosForArgs - | _ -> infosForArgs - - let InferLambdaArgs origRhsExpr = - let rec loop e = - match e with - | Expr_lambda(false,_,spats,rest,_) -> - InferArgSynInfoFromSimplePats spats :: loop rest - | _ -> [] - loop origRhsExpr - - let InferSynReturnData retInfo = - match retInfo with - | None -> unnamedRetVal - | Some((_,retInfo),_) -> retInfo - - let emptyValSynInfo = ValSynInfo([],unnamedRetVal) - let emptyValSynData = ValSynData(None,emptyValSynInfo,None) - - let InferValSynData memberFlagsOpt pat retInfo origRhsExpr = - - let infosForExplicitArgs = - match pat with - | Some(Pat_lid(_,_,curriedArgs,_,m)) -> List.map InferArgSynInfoFromPat curriedArgs - | _ -> [] - - let explicitArgsAreSimple = - match pat with - | Some(Pat_lid(_,_,curriedArgs,_,m)) -> List.forall IsSimplePattern curriedArgs - | _ -> true - - let retInfo = InferSynReturnData retInfo - - match memberFlagsOpt with - | None -> - let infosForLambdaArgs = InferLambdaArgs origRhsExpr - let infosForArgs = infosForExplicitArgs @ (if explicitArgsAreSimple then infosForLambdaArgs else []) - let infosForArgs = AdjustArgsForUnitElimination infosForArgs - ValSynData(None,ValSynInfo(infosForArgs,retInfo),None) - | Some memFlags -> - let infosForObjArgs = - if memFlags.MemberIsInstance then [ selfMetadata ] else [] - - let infosForArgs = AdjustMemberArgs memFlags.MemberKind infosForExplicitArgs - let infosForArgs = AdjustArgsForUnitElimination infosForArgs - - let argInfos = infosForObjArgs @ infosForArgs - ValSynData(Some(memFlags),ValSynInfo(argInfos,retInfo),None) -end - - -let mksyn_binding_rhs staticOptimizations rhsExpr rhsRange retInfo = - let rhsExpr = List.foldBack (fun (c,e1) e2 -> Expr_static_optimization (c,e1,e2,rhsRange)) staticOptimizations rhsExpr - let rhsExpr,retTyOpt = - match retInfo with - | Some ((ty,ArgSynInfo(rattribs,_,_)),tym) -> Expr_typed(rhsExpr,ty,range_of_synexpr rhsExpr), Some(ty,tym,rattribs) - | None -> rhsExpr,None - rhsExpr,retTyOpt - -let mksyn_binding (xmlDoc,headPat) (vis,pseudo,mut,bindm,spBind,wholem,retInfo,origRhsExpr,rhsRange,staticOptimizations,attrs,memberFlagsOpt) = - let info = SynInfo.InferValSynData memberFlagsOpt (Some headPat) retInfo origRhsExpr - let rhsExpr,retTyOpt = mksyn_binding_rhs staticOptimizations origRhsExpr rhsRange retInfo - // dprintfn "headPat = %A, info = %A" headPat info - // PERFORMANCE: There are quite a lot of these nodes allocated. Perhaps not much we can do about that. - Binding (vis,NormalBinding,pseudo,mut,attrs,xmlDoc,info,headPat,BindingRhs([],retTyOpt,rhsExpr),bindm,spBind) - -let NonVirtualMemberFlags q k = { MemberKind=k; OverloadQualifier=q; MemberIsInstance=true; MemberIsVirtual=false; MemberIsDispatchSlot=false; MemberIsOverrideOrExplicitImpl=false; MemberIsFinal=false } -let CtorMemberFlags q = { OverloadQualifier=q;MemberKind=MemberKindConstructor; MemberIsInstance=false; MemberIsVirtual=false; MemberIsDispatchSlot=false; MemberIsOverrideOrExplicitImpl=false; MemberIsFinal=false } -let ClassCtorMemberFlags = { OverloadQualifier=None;MemberKind=MemberKindClassConstructor; MemberIsInstance=false; MemberIsVirtual=false; MemberIsDispatchSlot=false; MemberIsOverrideOrExplicitImpl=false; MemberIsFinal=false } -let OverrideMemberFlags q k = { MemberKind=k; OverloadQualifier=q; MemberIsInstance=true; MemberIsVirtual=false; MemberIsDispatchSlot=false; MemberIsOverrideOrExplicitImpl=true; MemberIsFinal=false } -let AbstractMemberFlags q k = { MemberKind=k; OverloadQualifier=q; MemberIsInstance=true; MemberIsVirtual=false; MemberIsDispatchSlot=true; MemberIsOverrideOrExplicitImpl=false; MemberIsFinal=false } -let StaticMemberFlags q k = { MemberKind=k; OverloadQualifier=q; MemberIsInstance=false; MemberIsVirtual=false; MemberIsDispatchSlot=false; MemberIsOverrideOrExplicitImpl=false; MemberIsFinal=false } - -let inferredTyparDecls = SynValTyparDecls([],true,[]) -let noInferredTypars = SynValTyparDecls([],false,[]) - -//------------------------------------------------------------------------ -// Lexer args: status of #if/#endif processing. -//------------------------------------------------------------------------ - -type ifdefStackEntry = IfDefIf | IfDefElse -type ifdefStackEntries = (ifdefStackEntry * range) list -type ifdefStack = ifdefStackEntries ref - -/// Specifies how the 'endline' function in the lexer should continue after -/// it reaches end of line or eof. The options are to continue with 'token' function -/// or to continue with 'ifdef_skip' function. -type endlinecont = - | ENDL_token of ifdefStackEntries - | ENDL_skip of ifdefStackEntries * int * range - member x.IfdefStack = - match x with | ENDL_token(ifd) | ENDL_skip(ifd, _, _) -> ifd - -/// The parser defines a number of tokens for whitespace and -/// comments eliminated by the lexer. These carry a specification of -/// a continuation for the lexer when used in scenarios where we don't -/// care about whitespace. -type lexcont = - | AT_token of ifdefStackEntries - | AT_ifdef_skip of ifdefStackEntries * int * range - | AT_string of ifdefStackEntries *range - | AT_vstring of ifdefStackEntries * range - | AT_comment of ifdefStackEntries * int * range - | AT_tokenized_comment of ifdefStackEntries * int * range - | AT_comment_string of ifdefStackEntries * int * range - | AT_comment_vstring of ifdefStackEntries * int * range - | AT_camlonly of ifdefStackEntries * range - | AT_endline of endlinecont - - member x.IfdefStack = - match x with - | AT_token (ifd) - | AT_ifdef_skip (ifd,_,_) - | AT_string (ifd,_) - | AT_vstring (ifd,_) - | AT_comment (ifd,_,_) - | AT_tokenized_comment (ifd,_,_) - | AT_comment_string (ifd,_,_) - | AT_comment_vstring (ifd,_,_) - | AT_camlonly (ifd,_) -> ifd - | AT_endline(endl) -> endl.IfdefStack - - -(*------------------------------------------------------------------------ - * Parser/Lexer state - *-----------------------------------------------------------------------*) - -exception SyntaxError of obj (* ParseErrorContext<_> *) * range - -type ConcreteSyntaxSink = - { MatchPair: (range -> range -> unit) } - -let pos_of_lexpos (p:Position) = - mk_pos p.Line p.Column - -let mksyn_range (p1:Position) p2 = - mk_file_idx_range (decode_file_idx p1.FileName) (pos_of_lexpos p1) (pos_of_lexpos p2) - -let GetLexerRange (lexbuf:UnicodeLexing.Lexbuf) = - mksyn_range lexbuf.StartPos lexbuf.EndPos - -let GetParserLexbuf (parseState: IParseState) = - assert (parseState.ParserLocalStore.ContainsKey("LexBuffer")); - assert (parseState.ParserLocalStore.["LexBuffer"] :? UnicodeLexing.Lexbuf); - (parseState.ParserLocalStore.["LexBuffer"] :?> UnicodeLexing.Lexbuf) - -// The key into the ParserLocalStore and BufferLocalStore used to hold the concreateSyntaxSink -let concreteSyntaxSinkKey = "ConcreteSyntaxSink" - -let GetConcreteSyntaxSink (parseState: IParseState) = - if parseState.ParserLocalStore.ContainsKey(concreteSyntaxSinkKey) then - (parseState.ParserLocalStore.[concreteSyntaxSinkKey] :?> ConcreteSyntaxSink option) - else - let lexbuf = GetParserLexbuf parseState - let res = - if lexbuf.BufferLocalStore.ContainsKey(concreteSyntaxSinkKey) then - assert (lexbuf.BufferLocalStore.[concreteSyntaxSinkKey] :? ConcreteSyntaxSink); - Some (lexbuf.BufferLocalStore.[concreteSyntaxSinkKey] :?> ConcreteSyntaxSink) - else - None - parseState.ParserLocalStore.[concreteSyntaxSinkKey] <- res; - res - -let SetConcreteSyntaxSink (lexbuf:UnicodeLexing.Lexbuf) (concreteSyntaxSink: ConcreteSyntaxSink option) = - match concreteSyntaxSink with - | None -> - () - | Some r -> - lexbuf.BufferLocalStore.[concreteSyntaxSinkKey] <- r - -/// Get the range corresponding to the result of a grammar rule while it is being reduced -let lhs (parseState: IParseState) = - let p1,p2 = parseState.ResultRange - mksyn_range p1 p2 - -/// Get the position corresponding to the start of one of the r.h.s. symbols of a grammar rule while it is being reduced -let rhspos (parseState: IParseState) n = - pos_of_lexpos (parseState.InputStartPosition(n)) - -/// Get the range covering two of the r.h.s. symbols of a grammar rule while it is being reduced -let rhs2 (parseState: IParseState) n m = - let p1 = parseState.InputStartPosition(n) - let p2 = parseState.InputEndPosition(m) - mksyn_range p1 p2 - -/// Get the range corresponding to one of the r.h.s. symbols of a grammar rule while it is being reduced -let rhs parseState n = rhs2 parseState n n - -let MatchPair parseState p1 p2 = - match GetConcreteSyntaxSink(parseState) with - | None -> () - | Some snk -> snk.MatchPair (rhs parseState p1) (rhs parseState p2) - -//------------------------------------------------------------------------ -// XmlDoc F# lexer/parser state (thread local) -//------------------------------------------------------------------------ - -// The key into the BufferLocalStore used to hold the current accumulated XmlDoc lines -module LexbufLocalXmlDocStore = - let private xmlDocKey = "XmlDoc" - - let ClearXmlDoc (lexbuf:Lexbuf) = - lexbuf.BufferLocalStore.[xmlDocKey] <- box (XmlDocCollector()) - - let SaveXmlDoc (lexbuf:Lexbuf) (line,pos) = - if not (lexbuf.BufferLocalStore.ContainsKey(xmlDocKey)) then - lexbuf.BufferLocalStore.[xmlDocKey] <- box (XmlDocCollector()) - let collector = unbox(lexbuf.BufferLocalStore.[xmlDocKey]) - collector.AddXmlDocLine(line,pos) - - let GrabXML (lexbuf:Lexbuf, markerRange) = - if lexbuf.BufferLocalStore.ContainsKey(xmlDocKey) then - PreXmlDoc.CreateFromGrabPoint(unbox(lexbuf.BufferLocalStore.[xmlDocKey]),end_of_range markerRange) - else - emptyPreXmlDoc -#if DEBUG - let DumpXmlDoc note (XmlDoc lines) = - printf "\nXmlDoc: %s\n" note; - Array.iter (printf " %s\n") lines; - XmlDoc lines -#endif - - - -/// Generates compiler-generated names marked up with a source code location -type NiceNameGenerator() = - - let basicNameCounts = new System.Collections.Generic.Dictionary(100) - - member x.FreshCompilerGeneratedName (name,m) = - let basicName = GetBasicNameOfPossibleCompilerGeneratedName name - let n = (if basicNameCounts.ContainsKey basicName then basicNameCounts.[basicName] else 0) - let nm = CompilerGeneratedNameSuffix basicName (string (start_line_of_range m) ^ (match n with 0 -> "" | n -> "-" ^ string n)) - basicNameCounts.[basicName] <- n+1 - nm - - member x.Reset () = basicNameCounts.Clear() - - - -/// Generates compiler-generated names marked up with a source code location, but if given the same unique value then -/// return precisely the same name -type StableNiceNameGenerator() = - - let names = new System.Collections.Generic.Dictionary<(string * int64),_>(100) - let basicNameCounts = new System.Collections.Generic.Dictionary(100) - - member x.GetUniqueCompilerGeneratedName (name,m,uniq) = - let basicName = GetBasicNameOfPossibleCompilerGeneratedName name - if names.ContainsKey (basicName,uniq) then - names.[(basicName,uniq)] - else - let n = (if basicNameCounts.ContainsKey basicName then basicNameCounts.[basicName] else 0) - let nm = CompilerGeneratedNameSuffix basicName (string (start_line_of_range m) ^ (match n with 0 -> "" | n -> "-" ^ string n)) - names.[(basicName,uniq)] <- nm - basicNameCounts.[basicName] <- n+1 - nm - - member x.Reset () = - basicNameCounts.Clear() - names.Clear() - -/// A global generator of compiler generated names -let globalNng = NiceNameGenerator() -/// A global generator of stable compiler generated names -let globalStableNameGenerator = StableNiceNameGenerator () diff --git a/tools/FSharp_1.9.6.16/source/fsharp/augment.ml b/tools/FSharp_1.9.6.16/source/fsharp/augment.ml deleted file mode 100644 index 19957377..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/augment.ml +++ /dev/null @@ -1,1010 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - -#light - -/// Generate the hash/compare functions we add to user-defined types by default. -module internal Microsoft.FSharp.Compiler.Augment -open Internal.Utilities -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.PrettyNaming -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Env - -let mk_IComparable_CompareTo_slotsig g = - TSlotSig("CompareTo",g.mk_IComparable_ty, [],[], [[TSlotParam(Some("obj"),g.obj_ty,false,false,false,[])]],Some g.int_ty) - -let mk_IStructuralComparable_CompareTo_slotsig g = - TSlotSig("CompareTo",g.mk_IStructuralComparable_ty,[],[],[[TSlotParam(None,(mk_tuple_ty [g.obj_ty ; g.mk_IComparer_ty]),false,false,false,[])]], Some g.int_ty) - -let mk_IStructuralEquatable_Equals_slotsig g = - TSlotSig("Equals",g.mk_IStructuralEquatable_ty,[],[],[[TSlotParam(None,(mk_tuple_ty [g.obj_ty ; g.mk_IEqualityComparer_ty]),false,false,false,[])]], Some g.bool_ty) - -let mk_IStructuralEquatable_GetHashCode_slotsig g = - TSlotSig("GetHashCode",g.mk_IStructuralEquatable_ty,[],[],[[TSlotParam(None,g.mk_IEqualityComparer_ty,false,false,false,[])]], Some g.int_ty) - -let mk_GetHashCode_slotsig g = - TSlotSig("GetHashCode", g.obj_ty, [],[], [],Some g.int_ty) - -let mk_Equals_slotsig g = - TSlotSig("Equals", g.obj_ty, [],[], [[TSlotParam(Some("obj"),g.obj_ty,false,false,false,[])]],Some g.bool_ty) - - -let mspec_Object_GetType ilg = IL.mk_nongeneric_instance_mspec_in_nongeneric_boxed_tref(ilg.tref_Object,"GetType",[],ilg.typ_Type) -let mspec_Object_ToString ilg = IL.mk_nongeneric_instance_mspec_in_nongeneric_boxed_tref(ilg.tref_Object,"ToString",[],ilg.typ_String) -let mk_call_Object_GetType_GetString g m e1 = - mk_asm ([ IL.mk_normal_callvirt(mspec_Object_ToString g.ilg) ], [], - [ mk_asm ([ IL.mk_normal_callvirt(mspec_Object_GetType g.ilg) ], [], [ e1; ], [ g.int_ty ], m) ], [ g.string_ty ], m) - - -//------------------------------------------------------------------------- -// Helpers associated with code-generation of comparison/hash augmentations -//------------------------------------------------------------------------- - -let mk_this_typ g ty = if is_struct_typ g ty then mk_byref_typ g ty else ty - -let mk_compare_obj_typ g ty = (mk_this_typ g ty) --> (g.obj_ty --> g.int_ty) -let mk_compare_typ g ty = (mk_this_typ g ty) --> (ty --> g.int_ty) -let mk_compare_withc_typ g ty = (mk_this_typ g ty) --> ((mk_tuple_ty [g.obj_ty ; g.mk_IComparer_ty]) --> g.int_ty) - -let mk_equals_obj_typ g ty = (mk_this_typ g ty) --> (g.obj_ty --> g.bool_ty) -let mk_equals_typ g ty = (mk_this_typ g ty) --> (ty --> g.bool_ty) -let mk_equals_withc_typ g ty = (mk_this_typ g ty) --> ((mk_tuple_ty [g.obj_ty ; g.mk_IEqualityComparer_ty]) --> g.bool_ty) - -let mk_hash_withc_typ g ty = (mk_this_typ g ty) --> (g.mk_IEqualityComparer_ty --> g.int_ty) - -//------------------------------------------------------------------------- -// Polymorphic comparison -//------------------------------------------------------------------------- - -let mk_rel_binop g op m e1 e2 = mk_asm ([ IL.I_arith op ],[], [e1; e2],[g.bool_ty],m) -let mk_clt g m e1 e2 = mk_rel_binop g IL.AI_clt m e1 e2 -let mk_cgt g m e1 e2 = mk_rel_binop g IL.AI_cgt m e1 e2 - -//------------------------------------------------------------------------- -// REVIEW: make this a .constrained call, not a virtual call. -//------------------------------------------------------------------------- - -// for creating and using FSharpComparer objects and for creating and using -// IStructuralComparable objects (Eg, Calling CompareTo(obj o, IComparer comp)) -let icomparer_iltref g = g.tcref_System_Collections_IComparer.CompiledRepresentationForTyrepNamed -let icomparer_ilt g = mk_boxed_typ (icomparer_iltref g) [] -let istructuralcomparable_iltref g = g.tcref_System_IStructuralComparable.CompiledRepresentationForTyrepNamed - -let iequalitycomparer_iltref g = (g.tcref_System_Collections_IEqualityComparer).CompiledRepresentationForTyrepNamed -let iequalitycomparer_ilt g = mk_boxed_typ (iequalitycomparer_iltref g) [] -let istructuralequatable_iltref g = (g.tcref_System_IStructuralEquatable).CompiledRepresentationForTyrepNamed -let langprim_iltref g = (g.tcref_LanguagePrimitives).CompiledRepresentationForTyrepNamed -let langprim_ilt g = mk_boxed_typ (langprim_iltref g) [] - -let mspec_getComparer g = mk_static_nongeneric_mspec_in_typ (langprim_ilt g, "FSharpComparer",[],icomparer_ilt g) -let mk_call_GetComparer g m = - mk_asm([IL.mk_normal_call(mspec_getComparer g)], [], [], [g.mk_IComparer_ty], m) - -let mk_thisv g m ty = mk_local m "this" (mk_this_typ g ty) - -let mk_shl g m acce n = mk_asm([ IL.mk_ldc_i32 n; IL.I_arith IL.AI_shl ],[],[acce],[g.int_ty],m) -let mk_shr g m acce n = mk_asm([ IL.mk_ldc_i32 n; IL.I_arith IL.AI_shr ],[],[acce],[g.int_ty],m) -let mk_add g m e1 e2 = mk_asm([ IL.I_arith IL.AI_add ],[],[e1;e2],[g.int_ty],m) - -let add_to_hash_acc g m e accv acce = - mk_val_set m accv (mk_add g m (mk_int g m 0x9e3779b9) - (mk_add g m e - (mk_add g m (mk_shl g m acce 6) (mk_shr g m acce 2)))) - - -let mk_combine_all_hash_generators g m exprs accv acce = - List.fold_left - (fun tm e -> mk_compgen_seq m (add_to_hash_acc g m e accv acce) tm) - acce - exprs - -//------------------------------------------------------------------------- -// Build comparison functions for union, record and exception types. -//------------------------------------------------------------------------- - -let mk_thisv_thatv g m ty = - let thisv,thise = mk_thisv g m ty - let thatv,thate = mk_local m "obj" (mk_this_typ g ty) - thisv,thatv,thise,thate - -let bind_thatv g m ty thatv expr = - if is_struct_typ g ty then - let thatv2,_ = mk_mut_compgen_local m "obj" ty - thatv2,mk_compgen_let m thatv (mk_val_addr m (mk_local_vref thatv2)) expr - else thatv,expr - -let mk_thatcast g m ty = - if is_struct_typ g ty then - mk_mut_compgen_local m "thatCast" (mk_byref_typ g ty) - else - mk_compgen_local m "thatCast" ty - -let bind_thatcast g m ty thatcastv thatv thate expr = - if is_struct_typ g ty then - mk_compgen_let m thatcastv (mk_val_addr m (mk_local_vref thatv)) expr - else - mk_compgen_let m thatcastv thate expr - -let mk_compare_test_conjs g m exprs = - match exprs with - | [] -> mk_zero g m - | [h] -> h - | l -> - let a,b = List.frontAndBack l - (a,b) ||> List.foldBack (fun e acc -> - let nv,ne = mk_local m "n" g.int_ty - mk_compgen_let m nv e - (mk_cond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.int_ty - (mk_clt g m ne (mk_zero g m)) - ne - (mk_cond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.int_ty - (mk_cgt g m ne (mk_zero g m)) - ne - acc))) - -let mk_equals_test_conjs g m exprs = - match exprs with - | [] -> mk_one g m - | [h] -> h - | l -> - let a,b = List.frontAndBack l - List.foldBack (fun e acc -> mk_cond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.bool_ty e acc (mk_false g m)) a b - -/// note: 'x == y' does not imply 'x = y' for NaN -let mk_physical_equality_equals_test g m tycon thise thate expr = expr - -let minimal_type g (tcref:TyconRef) = - if tcref.Deref.IsExceptionDecl then [], g.exn_ty - else generalize_tcref tcref - -/// Build the comparison implementation for a record type -let mk_recd_compare g tcref (tycon:Tycon) = - let m = tycon.Range - let fields = tycon.AllInstanceFieldsAsList - let tinst,ty = minimal_type g tcref - let thisv,thatv,thise,thate = mk_thisv_thatv g m ty - let compe = mk_call_GetComparer g m - let mk_test (fspec:RecdField) = - let fty = fspec.FormalType - let fref = rfref_of_rfield tcref fspec - let m = fref.Range - mk_call_generic_comparison_withc_outer g m fty - compe - (mk_recd_field_get_via_expra(thise, fref, tinst, m)) - (mk_recd_field_get_via_expra(thate, fref, tinst, m)) - let expr = mk_compare_test_conjs g m (List.map mk_test fields) - let thatv,expr = bind_thatv g m ty thatv expr - thisv,thatv, expr - - -/// Build the comparison implementation for a record type when parameterized by a comparer -let mk_recd_compare_withc g tcref (tycon:Tycon) (thisv,thise) (_,thate) compe = - let m = tycon.Range - let fields = tycon.AllInstanceFieldsAsList - let tinst,ty = minimal_type g tcref - let tcv,tce = mk_compgen_local m "tempCast" ty // let tcv = thate - let thatcastv,thatcaste = mk_thatcast g m ty // let thatcastv = &tcv, if a struct - - let mk_test (fspec:RecdField) = - let fty = fspec.FormalType - let fref = rfref_of_rfield tcref fspec - let m = fref.Range - let e1 = mk_recd_field_get_via_expra(thise, fref, tinst, m) - let e2 = mk_recd_field_get_via_expra(thatcaste, fref, tinst, m) - - mk_call_generic_comparison_withc_outer g m fty - compe - (mk_recd_field_get_via_expra(thise, fref, tinst, m)) - (mk_recd_field_get_via_expra(thatcaste, fref, tinst, m)) - let expr = mk_compare_test_conjs g m (List.map mk_test fields) - - let expr = bind_thatcast g m ty thatcastv tcv tce expr - // will be optimized away if not necessary - let expr = mk_compgen_let m tcv thate expr - expr - - -/// Build the equality implementation wrapper for a record type -let mk_recd_equality g tcref (tycon:Tycon) = - let m = tycon.Range - let fields = tycon.AllInstanceFieldsAsList - let tinst,ty = minimal_type g tcref - let thisv,thatv,thise,thate = mk_thisv_thatv g m ty - let mk_test (fspec:RecdField) = - let fty = fspec.FormalType - let fref = rfref_of_rfield tcref fspec - let m = fref.Range - mk_call_generic_equality_outer g m fty - (mk_recd_field_get_via_expra(thise, fref, tinst, m)) - (mk_recd_field_get_via_expra(thate, fref, tinst, m)) - let expr = mk_equals_test_conjs g m (List.map mk_test fields) - let expr = mk_physical_equality_equals_test g m tycon thise thate expr - let thatv,expr = bind_thatv g m ty thatv expr - thisv,thatv,expr - -/// Build the equality implementation for a record type when parameterized by a comparer -let mk_recd_equality_withc g tcref (tycon:Tycon) (thisv,thise) (thatv,thate) compe = - let m = tycon.Range - let fields = tycon.AllInstanceFieldsAsList - let tinst,ty = minimal_type g tcref - let thatcastv,thatcaste = mk_thatcast g m ty - let tcv,tce = mk_compgen_local m "tempCast" ty - - let mk_test (fspec:RecdField) = - let fty = fspec.FormalType - let fref = rfref_of_rfield tcref fspec - let m = fref.Range - let e1 = mk_recd_field_get_via_expra(thise, fref, tinst, m) - let e2 = mk_recd_field_get_via_expra(thatcaste, fref, tinst, m) - - mk_call_generic_equality_withc_outer g m fty - compe - (mk_recd_field_get_via_expra(thise, fref, tinst, m)) - (mk_recd_field_get_via_expra(thatcaste, fref, tinst, m)) - let expr = mk_equals_test_conjs g m (List.map mk_test fields) - let expr = mk_physical_equality_equals_test g m tycon thise thatcaste expr - let expr = bind_thatcast g m ty thatcastv tcv tce expr - // will be optimized away if not necessary - let expr = mk_compgen_let m tcv thate expr - thisv,thatv,expr - - -/// Build the comparison implementation for an exception definition -let mk_exnconstr_compare g exnref (exnc:Tycon) = - let m = exnc.Range - let thatv,thate = mk_local m "obj" g.exn_ty - let thisv,thise = mk_thisv g m g.exn_ty - let compe = mk_call_GetComparer g m - let mk_test i (rfield:RecdField) = - let fty = rfield.FormalType - mk_call_generic_comparison_withc_outer g m fty - compe - (mk_exnconstr_field_get(thise, exnref, i, m)) - (mk_exnconstr_field_get(thate, exnref, i, m)) - let expr = mk_compare_test_conjs g m (List.mapi mk_test (exnc.AllInstanceFieldsAsList)) - let expr = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let dtree = - TDSwitch(thate, - [ mk_case(TTest_isinst(g.exn_ty,mk_tyapp_ty exnref []), - mbuilder.AddResultTarget(expr,SuppressSequencePointAtTarget)) ], - // OK, this is gross - we are comparing types by comparing strings. We should be able to do this another way. - Some(mbuilder.AddResultTarget - (mk_call_string_compare g m - (mk_call_Object_GetType_GetString g m thise) - (mk_call_Object_GetType_GetString g m thate), - SuppressSequencePointAtTarget)), - m) - mbuilder.Close(dtree,m,g.int_ty) - thisv,thatv,expr - - -/// Build the comparison implementation for an exception definition when parameterized by a comparer -let mk_exnconstr_compare_withc g exnref (exnc:Tycon) (thisv,thise) (thatv,thate) compe = - let m = exnc.Range - let thatcastv,thatcaste = mk_thatcast g m g.exn_ty - let mk_test i (rfield:RecdField) = - let fty = rfield.FormalType - let e1 = mk_exnconstr_field_get(thise, exnref, i, m) - let e2 = mk_exnconstr_field_get(thatcaste, exnref, i, m) - - mk_call_generic_comparison_withc_outer g m fty - compe - (mk_exnconstr_field_get(thise, exnref, i, m)) - (mk_exnconstr_field_get(thatcaste, exnref, i, m)) - let expr = mk_compare_test_conjs g m (List.mapi mk_test (exnc.AllInstanceFieldsAsList)) - let expr = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let dtree = - TDSwitch(thatcaste, - [ mk_case(TTest_isinst(g.exn_ty,mk_tyapp_ty exnref []), - mbuilder.AddResultTarget(expr,SuppressSequencePointAtTarget)) ], - // OK, this is gross - we are comparing types by comparing strings. We should be able to do this another way. - Some(mbuilder.AddResultTarget - (mk_call_string_compare g m - (mk_call_Object_GetType_GetString g m thise) - (mk_call_Object_GetType_GetString g m thatcaste), - SuppressSequencePointAtTarget)), - m) - mbuilder.Close(dtree,m,g.int_ty) - let expr = bind_thatcast g m g.exn_ty thatcastv thatv thate expr - expr - - -/// Build the equality implementation for an exception definition -let mk_exnconstr_equality g exnref (exnc:Tycon) = - let m = exnc.Range - let thatv,thate = mk_local m "obj" g.exn_ty - let thisv,thise = mk_thisv g m g.exn_ty - let mk_test i (rfield:RecdField) = - let fty = rfield.FormalType - mk_call_generic_equality_outer g m fty - (mk_exnconstr_field_get(thise, exnref, i, m)) - (mk_exnconstr_field_get(thate, exnref, i, m)) - let expr = mk_equals_test_conjs g m (List.mapi mk_test (exnc.AllInstanceFieldsAsList)) - let existential_tested = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let dtree = - TDSwitch(thate, - [ mk_case(TTest_isinst(g.exn_ty,mk_tyapp_ty exnref []), - mbuilder.AddResultTarget(expr,SuppressSequencePointAtTarget)) ], - Some(mbuilder.AddResultTarget(mk_false g m,SuppressSequencePointAtTarget)), - m) - mbuilder.Close(dtree,m,g.bool_ty) - let eqTested = mk_physical_equality_equals_test g m exnc thise thate existential_tested - thisv,thatv, eqTested - - -/// Build the equality implementation for an exception definition when parameterized by a comparer -let mk_exnconstr_equality_withc g exnref (exnc:Tycon) (thisv,thise) (thatv,thate) compe = - let m = exnc.Range - let thatcastv,thatcaste = mk_thatcast g m g.exn_ty - let mk_test i (rfield:RecdField) = - let fty = rfield.FormalType - let e1 = mk_exnconstr_field_get(thise, exnref, i, m) - let e2 = mk_exnconstr_field_get(thatcaste, exnref, i, m) - mk_call_generic_equality_withc_outer g m fty - compe - (mk_exnconstr_field_get(thise, exnref, i, m)) - (mk_exnconstr_field_get(thatcaste, exnref, i, m)) - let expr = mk_equals_test_conjs g m (List.mapi mk_test (exnc.AllInstanceFieldsAsList)) - let existential_tested = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let dtree = - TDSwitch(thatcaste, - [ mk_case(TTest_isinst(g.exn_ty,mk_tyapp_ty exnref []), - mbuilder.AddResultTarget(expr,SuppressSequencePointAtTarget)) ], - Some(mbuilder.AddResultTarget(mk_false g m,SuppressSequencePointAtTarget)), - m) - mbuilder.Close(dtree,m,g.bool_ty) - let eqTested = mk_physical_equality_equals_test g m exnc thise thatcaste existential_tested - let eqTested = bind_thatcast g m g.exn_ty thatcastv thatv thate eqTested - thisv,thatv, eqTested - -/// Build the comparison implementation for a union type -let mk_union_compare g tcref (tycon:Tycon) = - let m = tycon.Range - let ucases = tycon.UnionCasesAsList - let tinst,ty = minimal_type g tcref - let thisv,thise = mk_local m "this" ty - let thatv,thate = mk_local m "obj" ty - let thistagv,thistage = mk_compgen_local m "thisTag" g.int_ty - let thattagv,thattage = mk_compgen_local m "thatTag" g.int_ty - let compe = mk_call_GetComparer g m - - let expr1 = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let mk_constr_case ucase = - let cref = ucref_of_ucase tcref ucase - let m = cref.Range - let thisucv,thisucve = mk_compgen_local m "thisCast" (mk_proven_ucase_typ cref tinst) - let thatucv,thatucve = mk_compgen_local m "thatCast" (mk_proven_ucase_typ cref tinst) - let mk_test j (argty:RecdField) = - mk_call_generic_comparison_withc_outer g m argty.FormalType - compe - (mk_ucase_field_get_proven(thisucve, cref, tinst, j, m)) - (mk_ucase_field_get_proven(thatucve, cref, tinst, j, m)) - let rfields = ucase.RecdFields - if isNil rfields then None else - Some (mk_case(TTest_unionconstr(cref,tinst), - mbuilder.AddResultTarget - (mk_compgen_let m thisucv (mk_ucase_proof(thise,cref,tinst,m)) - (mk_compgen_let m thatucv (mk_ucase_proof(thate,cref,tinst,m)) - (mk_compare_test_conjs g m (List.mapi mk_test rfields))), - SuppressSequencePointAtTarget))) - - let nullary,nonNullary = List.partition isNone (List.map mk_constr_case ucases) - if isNil nonNullary then mk_zero g m else - let dtree = - TDSwitch(thise, - (nonNullary |> List.map (function (Some c) -> c | None -> failwith "mk_union_compare")), - (if isNil nullary then None - else Some (mbuilder.AddResultTarget(mk_zero g m,SuppressSequencePointAtTarget))), - m) - mbuilder.Close(dtree,m,g.int_ty) - - let getTags = - if ucases.Length = 1 then expr1 else - let tagsEqTested = - mk_cond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.int_ty - (mk_ceq g m thistage thattage) - expr1 - (mk_asm ([ IL.I_arith IL.AI_sub ],[], [thistage; thattage],[g.int_ty],m))in - mk_compgen_let m thistagv - (mk_ucase_tag_get (thise,tcref,tinst,m)) - (mk_compgen_let m thattagv - (mk_ucase_tag_get (thate,tcref,tinst,m)) - tagsEqTested) - - let nullTestedThat = mk_nonnull_cond g m g.int_ty thate getTags (mk_one g m) - let nullTestedThis = mk_nonnull_cond g m g.int_ty thise nullTestedThat (mk_minus_one g m) - thisv,thatv, nullTestedThis - - -/// Build the comparison implementation for a union type when parameterized by a comparer -let mk_union_compare_withc g tcref (tycon:Tycon) (thisv,thise) (thatv,thate) compe = - let m = tycon.Range - let ucases = tycon.UnionCasesAsList - let tinst,ty = minimal_type g tcref - let thistagv,thistage = mk_compgen_local m "thisTag" g.int_ty - let thattagv,thattage = mk_compgen_local m "thatTag" g.int_ty - let thatcastv,thatcaste = mk_thatcast g m ty - - let expr1 = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let mk_constr_case ucase = - let cref = ucref_of_ucase tcref ucase - let m = cref.Range - let thisucv,thisucve = mk_compgen_local m "thisCastu" (mk_proven_ucase_typ cref tinst) - let thatucv,thatucve = mk_compgen_local m "thatCastu" (mk_proven_ucase_typ cref tinst) - let mk_test j (argty:RecdField) = - let e1 = mk_ucase_field_get_proven(thisucve, cref, tinst, j, m) - let e2 = mk_ucase_field_get_proven(thatucve, cref, tinst, j, m) - mk_call_generic_comparison_withc_outer g m argty.FormalType - compe - (mk_ucase_field_get_proven(thisucve, cref, tinst, j, m)) - (mk_ucase_field_get_proven(thatucve, cref, tinst, j, m)) - let rfields = ucase.RecdFields - if isNil rfields then None else - Some (mk_case(TTest_unionconstr(cref,tinst), - mbuilder.AddResultTarget - (mk_compgen_let m thisucv (mk_ucase_proof(thise,cref,tinst,m)) - (mk_compgen_let m thatucv (mk_ucase_proof(thatcaste,cref,tinst,m)) - (mk_compare_test_conjs g m (List.mapi mk_test rfields))), - SuppressSequencePointAtTarget))) - - let nullary,nonNullary = List.partition isNone (List.map mk_constr_case ucases) - if isNil nonNullary then mk_zero g m else - let dtree = - TDSwitch(thise, - (nonNullary |> List.map (function (Some c) -> c | None -> failwith "mk_union_compare")), - (if isNil nullary then None - else Some (mbuilder.AddResultTarget(mk_zero g m,SuppressSequencePointAtTarget))), - m) - mbuilder.Close(dtree,m,g.int_ty) - - let getTags = - if ucases.Length = 1 then expr1 else - let tagsEqTested = - mk_cond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.int_ty - (mk_ceq g m thistage thattage) - expr1 - (mk_asm ([ IL.I_arith IL.AI_sub ],[], [thistage; thattage],[g.int_ty],m))in - mk_compgen_let m thistagv - (mk_ucase_tag_get (thise,tcref,tinst,m)) - (mk_compgen_let m thattagv - (mk_ucase_tag_get (thatcaste,tcref,tinst,m)) - tagsEqTested) - - let nullTestedThat = mk_nonnull_cond g m g.int_ty thatcaste getTags (mk_one g m) - let nullTestedThis = mk_nonnull_cond g m g.int_ty thise nullTestedThat (mk_minus_one g m) - let eqTested = bind_thatcast g m ty thatcastv thatv thate nullTestedThis - eqTested - - -/// Build the equality implementation for a union type -let mk_union_equality g tcref (tycon:Tycon) = - let m = tycon.Range - let ucases = tycon.UnionCasesAsList - let tinst,ty = minimal_type g tcref - let thisv,thise = mk_local m "this" ty - let thatv,thate = mk_local m "obj" ty - let thistagv,thistage = mk_compgen_local m "thisTag" g.int_ty - let thattagv,thattage = mk_compgen_local m "thatTag" g.int_ty - - let expr1 = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let mk_constr_case ucase = - let cref = ucref_of_ucase tcref ucase - let m = cref.Range - let thisucv,thisucve = mk_compgen_local m "thisCast" (mk_proven_ucase_typ cref tinst) - let thatucv,thatucve = mk_compgen_local m "thatCast" (mk_proven_ucase_typ cref tinst) - let mk_test j (argty:RecdField) = - mk_call_generic_equality_outer g m argty.FormalType - (mk_ucase_field_get_proven(thisucve, cref, tinst, j, m)) - (mk_ucase_field_get_proven(thatucve, cref, tinst, j, m)) - let rfields = ucase.RecdFields - if isNil rfields then None else - Some (mk_case(TTest_unionconstr(cref,tinst), - mbuilder.AddResultTarget - (mk_compgen_let m thisucv (mk_ucase_proof(thise,cref,tinst,m)) - (mk_compgen_let m thatucv (mk_ucase_proof(thate,cref,tinst,m)) - (mk_equals_test_conjs g m (List.mapi mk_test rfields))), - SuppressSequencePointAtTarget))) - - let nullary,nonNullary = List.partition isNone (List.map mk_constr_case ucases) - if isNil nonNullary then mk_true g m else - let dtree = - TDSwitch(thise,List.map (function (Some c) -> c | None -> failwith "mk_union_equality") nonNullary, - (if isNil nullary then None else Some (mbuilder.AddResultTarget(mk_true g m,SuppressSequencePointAtTarget))), - m) - mbuilder.Close(dtree,m,g.bool_ty) - - let getTags = - if ucases.Length = 1 then expr1 else - let tagsEqTested = - mk_cond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.bool_ty - (mk_ceq g m thistage thattage) - expr1 - (mk_false g m) - - mk_compgen_let m thistagv - (mk_ucase_tag_get (thise,tcref,tinst,m)) - (mk_compgen_let m thattagv - (mk_ucase_tag_get (thate,tcref,tinst,m)) - tagsEqTested) - let nullTestedThat = mk_nonnull_cond g m g.bool_ty thate getTags (mk_false g m) - let nullTestedThis = mk_nonnull_cond g m g.bool_ty thise nullTestedThat (mk_false g m) - let eqTested = - if is_unit_typ g ty then mk_true g m else - mk_physical_equality_equals_test g m tycon thise thate nullTestedThis - thisv,thatv, eqTested - - -/// Build the equality implementation for a union type when parameterized by a comparer -let mk_union_equality_withc g tcref (tycon:Tycon) (thisv,thise) (thatv,thate) compe = - let m = tycon.Range - let ucases = tycon.UnionCasesAsList - let tinst,ty = minimal_type g tcref - let thistagv,thistage = mk_compgen_local m "thisTag" g.int_ty - let thattagv,thattage = mk_compgen_local m "thatTag" g.int_ty - let thatcastv,thatcaste = mk_thatcast g m ty - - let expr1 = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let mk_constr_case ucase = - let cref = ucref_of_ucase tcref ucase - let m = cref.Range - let thisucv,thisucve = mk_compgen_local m "thisCastu" (mk_proven_ucase_typ cref tinst) - let thatucv,thatucve = mk_compgen_local m "thatCastu" (mk_proven_ucase_typ cref tinst) - let mk_test j (argty:RecdField) = - let e1 = mk_ucase_field_get_proven(thisucve, cref, tinst, j, m) - let e2 = mk_ucase_field_get_proven(thatucve, cref, tinst, j, m) - mk_call_generic_equality_withc_outer g m argty.FormalType - compe - (mk_ucase_field_get_proven(thisucve, cref, tinst, j, m)) - (mk_ucase_field_get_proven(thatucve, cref, tinst, j, m)) - let rfields = ucase.RecdFields - if isNil rfields then None else - Some (mk_case(TTest_unionconstr(cref,tinst), - mbuilder.AddResultTarget - (mk_compgen_let m thisucv (mk_ucase_proof(thise,cref,tinst,m)) - (mk_compgen_let m thatucv (mk_ucase_proof(thatcaste,cref,tinst,m)) - (mk_equals_test_conjs g m (List.mapi mk_test rfields))), - SuppressSequencePointAtTarget))) - - let nullary,nonNullary = List.partition isNone (List.map mk_constr_case ucases) - if isNil nonNullary then mk_true g m else - let dtree = - TDSwitch(thise,List.map (function (Some c) -> c | None -> failwith "mk_union_equality") nonNullary, - (if isNil nullary then None else Some (mbuilder.AddResultTarget(mk_true g m,SuppressSequencePointAtTarget))), - m) - mbuilder.Close(dtree,m,g.bool_ty) - - let getTags = - if ucases.Length = 1 then expr1 else - let tagsEqTested = - mk_cond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.bool_ty - (mk_ceq g m thistage thattage) - expr1 - (mk_false g m) - - mk_compgen_let m thistagv - (mk_ucase_tag_get (thise,tcref,tinst,m)) - (mk_compgen_let m thattagv - (mk_ucase_tag_get (thatcaste,tcref,tinst,m)) - tagsEqTested) - let nullTestedThat = mk_nonnull_cond g m g.bool_ty thatcaste getTags (mk_false g m) - let nullTestedThis = mk_nonnull_cond g m g.bool_ty thise nullTestedThat (mk_false g m) - let eqTested = - if is_unit_typ g ty then mk_true g m else - mk_physical_equality_equals_test g m tycon thise thatcaste nullTestedThis - let eqTested = bind_thatcast g m ty thatcastv thatv thate eqTested - thisv,thatv, eqTested - -//------------------------------------------------------------------------- -// Build hashing functions for union, record and exception types. -// Hashing functions must respect the "=" and comparison operators. -//------------------------------------------------------------------------- - -/// Structural hash implementation for record types when parameterized by a comparer -let mk_recd_hash_withc g tcref (tycon:Tycon) compe = - let m = tycon.Range - let fields = tycon.AllInstanceFieldsAsList - let tinst,ty = minimal_type g tcref - let thisv,thise = mk_thisv g m ty - let mk_field_hash (fspec:RecdField) = - let fty = fspec.FormalType - let fref = rfref_of_rfield tcref fspec - let m = fref.Range - let e = mk_recd_field_get_via_expra(thise, fref, tinst, m) - - mk_call_generic_hash_withc_outer g m fty compe e - - let accv,acce = mk_mut_compgen_local m "i" g.int_ty - let stmt = mk_combine_all_hash_generators g m (List.map mk_field_hash fields) (mk_local_vref accv) acce - let expr = mk_compgen_let m accv (mk_zero g m) stmt - thisv,expr - -/// Structural hash implementation for exception types when parameterized by a comparer -let mk_exnconstr_hash_withc g exnref (exnc:Tycon) compe = - let m = exnc.Range - let thisv,thise = mk_thisv g m g.exn_ty - - let mk_hash i (rfield:RecdField) = - let fty = rfield.FormalType - let e = mk_exnconstr_field_get(thise, exnref, i, m) - - mk_call_generic_hash_withc_outer g m fty compe e - - let accv,acce = mk_mut_compgen_local m "i" g.int_ty - let stmt = mk_combine_all_hash_generators g m (List.mapi mk_hash (exnc.AllInstanceFieldsAsList)) (mk_local_vref accv) acce - let expr = mk_compgen_let m accv (mk_zero g m) stmt - thisv,expr - -/// Structural hash implementation for union types when parameterized by a comparer -let mk_union_hash_withc g tcref (tycon:Tycon) compe = - let m = tycon.Range - let ucases = tycon.UnionCasesAsList - let tinst,ty = minimal_type g tcref - let thisv,thise = mk_thisv g m ty - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let accv,acce = mk_mut_compgen_local m "i" g.int_ty - let mk_constr_case i ucase1 = - let c1ref = ucref_of_ucase tcref ucase1 - let ucv,ucve = mk_compgen_local m "unionCase" (mk_proven_ucase_typ c1ref tinst) - let m = c1ref.Range - let mk_hash j (rfield:RecdField) = - let fty = rfield.FormalType - let e = mk_ucase_field_get_proven(ucve, c1ref, tinst, j, m) - mk_call_generic_hash_withc_outer g m fty compe e - mk_case(TTest_unionconstr(c1ref,tinst), - mbuilder.AddResultTarget - (mk_compgen_let m ucv - (mk_ucase_proof(thise,c1ref,tinst,m)) - (mk_compgen_seq m - (mk_val_set m (mk_local_vref accv) (mk_int g m i)) - (mk_combine_all_hash_generators g m (List.mapi mk_hash ucase1.RecdFields) (mk_local_vref accv) acce)), - SuppressSequencePointAtTarget)) - let dtree = TDSwitch(thise,List.mapi mk_constr_case ucases, None,m) - let stmt = mbuilder.Close(dtree,m,g.unit_ty) - let expr = mk_compgen_let m accv (mk_zero g m) stmt - thisv,expr - - -//------------------------------------------------------------------------- -// The predicate that determines which types implement the -// pre-baked IStructuralHash and IComparable semantics associated with F# -// types. Note abstract types are not _known_ to implement these interfaces, -// though the interfaces may be discoverable via type tests. -//------------------------------------------------------------------------- - -let isNominalExnc (exnc:Tycon) = - match exnc.ExceptionInfo with - | TExnAbbrevRepr _ | TExnNone | TExnAsmRepr _ -> false - | TExnFresh _ -> true - -let isTrueFSharpStructTycon g (tycon: Tycon) = - (tycon.IsFSharpStructTycon && not tycon.IsFSharpEnumTycon) - -let canBeAugmented g (tycon:Tycon) = - tycon.IsUnionTycon || - tycon.IsRecordTycon || - (tycon.IsExceptionDecl && isNominalExnc tycon) || - isTrueFSharpStructTycon g tycon - -let augmentation_attribs g (tycon:Tycon) = - canBeAugmented g tycon, - TryFindBoolAttrib g g.attrib_ReferenceEqualityAttribute tycon.Attribs, - TryFindBoolAttrib g g.attrib_StructuralEqualityAttribute tycon.Attribs, - TryFindBoolAttrib g g.attrib_StructuralComparisonAttribute tycon.Attribs - -let CheckAugmentationAttribs g (tycon:Tycon)= - let m = tycon.Range - let attribs = augmentation_attribs g tycon - match attribs with - - (* THESE ARE THE LEGITIMATE CASES *) - - | true, Some(true), None , None -> - if isTrueFSharpStructTycon g tycon then - errorR(Error("The 'ReferenceEquality' attribute may not be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'", m)) - else () - - (* [< >] *) - | _, None, None, None - (* [] *) - (* [] *) - | true, None , Some(true), Some(true) - (* [] *) - | true, None , Some(false), Some(false) - (* [] *) - | true, None , Some(true), Some(false) -> - () - - (* THESE ARE THE ERROR CASES *) - - (* [] *) - | _, Some(false), _ , _ -> - errorR(Error("The 'ReferenceEquality' attribute may not be 'false'. Consider using the 'StructuralEquality' attribute instead", m)) - (* [] *) - | _, _, Some(false), None - | _, _, Some(false), Some(true) -> - errorR(Error("The 'StructuralEquality' attribute may not be 'false' unles the 'StructuralComparison' attribute is also false", m)) - (* [] *) - | true, None , None , Some(_) -> - errorR(Error("The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute", m)) - (* [] *) - | true, None , Some(true), None -> - errorR(Error("The 'StructuralEquality' attribute must be used in conjunction with the 'StructuralComparison' attribute", m)) - - (* [] *) - | true, Some(_) , Some(_) , _ - (* [] *) - | true, Some(_), _, Some(_) -> - errorR(Error("A type may not have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes", m)) - - (* non augmented type, [] *) - | false, Some(_), _, _ - (* non augmented type, [] *) - | false, _, Some(_) , _ - (* non augmented type, [] *) - | false, _, _ , Some(_) -> - errorR(Error("Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes", m)) - let tcaug = tycon.TypeContents - - let hasExplicitICompare = - isNone tcaug.tcaug_compare - let hasExplicitIStructuralCompare = - isNone tcaug.tcaug_compare_withc - let hasExplicitEquals = - isNone tcaug.tcaug_equals && tcaug_has_override g tcaug "Equals" [g.obj_ty] - - match attribs with - (* [] *) - | _, Some(true), _, _ when hasExplicitEquals -> - errorR(Error("A type with attribute 'ReferenceEquality' may not have an explicit implementation of 'Object.Equals(obj)'", m)) - | _, _, Some(true), _ when hasExplicitEquals -> - errorR(Error("A type with attribute 'StructuralEquality' may not have an explicit implementation of 'Object.Equals(obj)'", m)) - // already caught the case where ReferenceEquality is true - | _, None, _, Some(true) when hasExplicitICompare -> - errorR(Error("A type with attribute 'StructuralComparison' may not have an explicit implementation of 'System.IComparable'", m)) - | _, Some(false), _, Some(true) when hasExplicitICompare -> - errorR(Error("A type with attribute 'StructuralComparison' may not have an explicit implementation of 'System.IComparable'", m)) - | _ -> () - -let TyconIsAugmentedWithCompare g (tycon:Tycon) = - // This type gets defined in prim-types, before we can add attributes to F# type definitions - let isUnit = g.compilingFslib && tycon.DisplayName = "Unit" - not isUnit && - - match augmentation_attribs g tycon with - (* [< >] *) - | true, None, None , None - (* [] *) - | true, None, Some(true), Some(true) -> true - (* other cases *) - | _ -> false - -let TyconIsAugmentedWithEquals g (tycon:Tycon) = - // This type gets defined in prim-types, before we can add attributes to F# type definitions - let isUnit = g.compilingFslib && tycon.DisplayName = "Unit" - not isUnit && - - match augmentation_attribs g tycon with - (* [< >] *) - | true, None, None , _ - (* [] *) - (* [] *) - | true, None, Some(true), _ -> true - (* other cases *) - | _ -> false - -let TyconIsAugmentedWithHash g tycon = TyconIsAugmentedWithEquals g tycon - -(*------------------------------------------------------------------------- - * Make values that represent the implementations of the - * IComparable semantics associated with F# types. - *------------------------------------------------------------------------- *) - -let slotImplMethod (final,ilnm,c,slotsig) = - { ImplementedSlotSigs=[slotsig]; - MemberFlags= - { OverloadQualifier=None; - MemberIsInstance=true; - MemberIsVirtual=false; - MemberIsDispatchSlot=false; - MemberIsFinal=final; - MemberIsOverrideOrExplicitImpl=true; - MemberKind=MemberKindMember}; - IsImplemented=false; - CompiledName=ilnm; - ApparentParent=c} - -let nonVirtualMethod (ilnm,c) = - { ImplementedSlotSigs=[]; - MemberFlags={ OverloadQualifier=None; - MemberIsInstance=true; - MemberIsVirtual=false; - MemberIsDispatchSlot=false; - MemberIsFinal=false; - MemberIsOverrideOrExplicitImpl=false; - MemberKind=MemberKindMember}; - IsImplemented=false; - CompiledName=ilnm; - ApparentParent=c} - -let mk_vspec g (tcref:TyconRef) isStronglyTyped tmty cpath vis methn slotsig ilnm ty tuparg = - let m = tcref.Range - let tps = tcref.Typars(m) - let id = mksyn_id m methn - let final = is_union_typ g tmty or is_recd_typ g tmty or is_struct_typ g tmty - let membInfo = match slotsig with None -> nonVirtualMethod (ilnm,tcref) | Some(slotsig) -> slotImplMethod(final,ilnm,tcref,slotsig) - let inl = OptionalInline - let args = if tuparg then [TopValInfo.unnamedTopArg; [TopValInfo.unnamedTopArg1;TopValInfo.unnamedTopArg1]] else [TopValInfo.unnamedTopArg;TopValInfo.unnamedTopArg] - let topValInfo = Some (TopValInfo (TopValInfo.InferTyparInfo tps,args,TopValInfo.unnamedRetVal)) - NewVal (id,ty,Immutable,true,topValInfo,cpath,vis,ValNotInRecScope,Some(membInfo),NormalVal,[],inl,emptyXmlDoc,true,false,false,false,None,Parent(tcref)) - -let MakeValsForCompareAugmentation g (tcref:TyconRef) = - let _,tmty = minimal_type g tcref - let tps = tcref.Typars(tcref.Range) - let vis = tcref.TypeReprAccessibility - mk_vspec g tcref false tmty tcref.CompilationPathOpt vis (tcref.MangledName^".CompareToOverride" ) (Some(mk_IComparable_CompareTo_slotsig g)) "CompareTo" (tps +-> (mk_compare_obj_typ g tmty)) false, - mk_vspec g tcref true tmty tcref.CompilationPathOpt vis (tcref.MangledName^".CompareTo" ) None "CompareTo" (tps +-> (mk_compare_typ g tmty)) false - -let MakeValsForCompareWithComparerAugmentation g (tcref:TyconRef) = - let _,tmty = minimal_type g tcref - let tps = tcref.Typars(tcref.Range) - let vis = tcref.TypeReprAccessibility - mk_vspec g tcref false tmty tcref.CompilationPathOpt vis (tcref.MangledName^".StructuralCompareTo") (Some(mk_IStructuralComparable_CompareTo_slotsig g)) "CompareTo" (tps +-> (mk_compare_withc_typ g tmty)) true - -let MakeValsForEqualsAugmentation g (tcref:TyconRef) = - let _,tmty = minimal_type g tcref - let vis = tcref.TypeReprAccessibility - let tps = tcref.Typars(tcref.Range) - let obj_vspec = mk_vspec g tcref false tmty tcref.CompilationPathOpt vis (tcref.MangledName^".EqualsOverride" ) (Some(mk_Equals_slotsig g)) "Equals" (tps +-> (mk_equals_obj_typ g tmty)) false - let vspec = mk_vspec g tcref true tmty tcref.CompilationPathOpt vis (tcref.MangledName^".Equals" ) None "Equals" (tps +-> (mk_equals_typ g tmty)) false - obj_vspec,vspec - -let MakeValsForEqualityWithComparerAugmentation g (tcref:TyconRef) = - let _,tmty = minimal_type g tcref - let vis = tcref.TypeReprAccessibility - let tps = tcref.Typars(tcref.Range) - let hsh = mk_vspec g tcref false tmty tcref.CompilationPathOpt vis (tcref.MangledName^".StructuralGetHashCode") (Some(mk_IStructuralEquatable_GetHashCode_slotsig g)) "GetHashCode" (tps +-> (mk_hash_withc_typ g tmty)) false - let eq = mk_vspec g tcref false tmty tcref.CompilationPathOpt vis (tcref.MangledName^".StructuralEquals") (Some(mk_IStructuralEquatable_Equals_slotsig g)) "Equals" (tps +-> (mk_equals_withc_typ g tmty)) true - hsh,eq - -let MakeBindingsForCompareAugmentation g (tycon:Tycon) = - let tcref = mk_local_tcref tycon - let m = tycon.Range - let tps = tycon.Typars(tycon.Range) - let mk_compare comparef = - match tycon.TypeContents.tcaug_compare with - | None -> [] - | Some (vref1,vref2) -> - let vspec1 = deref_val vref1 - let vspec2 = deref_val vref2 - (* this is the body of the override *) - let rhs1 = - let tinst,ty = minimal_type g tcref - - let thisv,thise = mk_thisv g m ty - let thatobjv,thatobje = mk_local m "obj" g.obj_ty - let comparee = - if is_unit_typ g ty then mk_zero g m else - - mk_appl g ((expr_for_vref m vref2,vref2.Type), (if isNil tinst then [] else [tinst]), [thise;mk_coerce(thatobje,ty,m,g.obj_ty)], m) - - mk_lambdas m tps [thisv;thatobjv] (comparee,g.int_ty) - let rhs2 = - let thisv,thatv,comparee = comparef g tcref tycon - mk_lambdas m tps [thisv;thatv] (comparee,g.int_ty) - [ // This one must come first because it may be inlined into the second - mk_compgen_bind vspec2 rhs2; - mk_compgen_bind vspec1 rhs1; ] - if tycon.IsUnionTycon then mk_compare mk_union_compare - elif tycon.IsRecordTycon or tycon.IsStructTycon then mk_compare mk_recd_compare - elif tycon.IsExceptionDecl then mk_compare mk_exnconstr_compare - else [] - -let MakeBindingsForCompareWithComparerAugmentation g (tycon:Tycon) = - let tcref = mk_local_tcref tycon - let m = tycon.Range - let tps = tycon.Typars(tycon.Range) - let mk_compare comparef = - match tycon.TypeContents.tcaug_compare_withc with - | None -> [] - | Some (vref) -> - let vspec = deref_val vref - let tinst,ty = minimal_type g tcref - - let compv,compe = mk_local m "comp" g.mk_IComparer_ty - - let thisv,thise = mk_thisv g m ty - let thatobjv,thatobje = mk_local m "obj" g.obj_ty - let thate = mk_coerce(thatobje,ty,m,g.obj_ty) - - let rhs = - let comparee = comparef g tcref tycon (thisv,thise) (thatobjv,thate) compe - let comparee = if is_unit_typ g ty then mk_zero g m else comparee - mk_multi_lambdas m tps [[thisv];[thatobjv;compv]] (comparee,g.int_ty) - [mk_compgen_bind vspec rhs] - if tycon.IsUnionTycon then mk_compare mk_union_compare_withc - elif tycon.IsRecordTycon or tycon.IsStructTycon then mk_compare mk_recd_compare_withc - elif tycon.IsExceptionDecl then mk_compare mk_exnconstr_compare_withc - else [] - -let MakeBindingsForEqualityWithComparerAugmentation g (tycon:Tycon) = - let tcref = mk_local_tcref tycon - let m = tycon.Range - let tps = tycon.Typars(tycon.Range) - let mk_structural_equatable hashf equalsf = - match tycon.TypeContents.tcaug_hash_and_equals_withc with - | None -> [] - | Some (vref1, vref2) -> - let vspec1 = deref_val vref1 - let vspec2 = deref_val vref2 - let tinst,ty = minimal_type g tcref - let compv,compe = mk_local m "comp" g.mk_IEqualityComparer_ty - - // build the hash rhs - let rhs_hash = - let thisv,hashe = hashf g tcref tycon compe - mk_lambdas m tps [thisv;compv] (hashe,g.int_ty) - - // build the equals rhs - let rhs_equals = - let thisv,thise = mk_thisv g m ty - let thatv,thate = mk_local m "obj" g.obj_ty - let thate = mk_coerce(thate,ty,m,g.obj_ty) - let thisv,thatv,equalse = equalsf g tcref tycon (thisv,thise) (thatv,thate) compe - mk_multi_lambdas m tps [[thisv];[thatv;compv]] (equalse,g.bool_ty) - - [(mk_compgen_bind vspec1 rhs_hash) ; (mk_compgen_bind vspec2 rhs_equals)] - if tycon.IsUnionTycon then mk_structural_equatable mk_union_hash_withc mk_union_equality_withc - elif (tycon.IsRecordTycon || tycon.IsStructTycon) then mk_structural_equatable mk_recd_hash_withc mk_recd_equality_withc - elif tycon.IsExceptionDecl then mk_structural_equatable mk_exnconstr_hash_withc mk_exnconstr_equality_withc - else [] - -let MakeBindingsForEqualsAugmentation g (tycon:Tycon) = - let tcref = mk_local_tcref tycon - let m = tycon.Range - let tps = tycon.Typars(m) - let mk_equals equalsf = - match tycon.TypeContents.tcaug_equals with - | None -> [] - | Some (vref1,vref2) -> - // this is the body of the override - let rhs1 = - let tinst,ty = minimal_type g tcref - - let thisv,thise = mk_thisv g m ty - let thatobjv,thatobje = mk_local m "obj" g.obj_ty - let equalse = - if is_unit_typ g ty then mk_true g m else - - let thatv,thate = mk_local m "that" ty - mk_isinst_cond g m ty thatobje thatv - (mk_appl g ((expr_for_vref m vref2,vref2.Type), (if isNil tinst then [] else [tinst]), [thise;thate], m)) - (mk_false g m) - - mk_lambdas m tps [thisv;thatobjv] (equalse,g.bool_ty) - // this is the body of the real strongly typed implementation - let rhs2 = - let thisv,thatv,equalse = equalsf g tcref tycon - mk_lambdas m tps [thisv;thatv] (equalse,g.bool_ty) - - [ mk_compgen_bind (deref_val vref2) rhs2; - mk_compgen_bind (deref_val vref1) rhs1; ] - if tycon.IsExceptionDecl then mk_equals mk_exnconstr_equality - elif tycon.IsUnionTycon then mk_equals mk_union_equality - elif tycon.IsRecordTycon or tycon.IsStructTycon then mk_equals mk_recd_equality - else [] diff --git a/tools/FSharp_1.9.6.16/source/fsharp/augment.mli b/tools/FSharp_1.9.6.16/source/fsharp/augment.mli deleted file mode 100644 index ee965f8e..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/augment.mli +++ /dev/null @@ -1,28 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - - -/// Generate the hash/compare functions we add to user-defined types by default. -module internal Microsoft.FSharp.Compiler.Augment - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler - -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Env - -val CheckAugmentationAttribs : TcGlobals -> Tycon -> unit -val TyconIsAugmentedWithCompare : TcGlobals -> Tycon -> bool -val TyconIsAugmentedWithEquals : TcGlobals -> Tycon -> bool -val TyconIsAugmentedWithHash : TcGlobals -> Tycon -> bool - -val MakeValsForCompareAugmentation : TcGlobals -> TyconRef -> Val * Val -val MakeValsForCompareWithComparerAugmentation : TcGlobals -> TyconRef -> Val -val MakeValsForEqualsAugmentation : TcGlobals -> TyconRef -> Val * Val -val MakeValsForEqualityWithComparerAugmentation : TcGlobals -> TyconRef -> Val * Val - -val MakeBindingsForCompareAugmentation : TcGlobals -> Tycon -> Binding list -val MakeBindingsForCompareWithComparerAugmentation : TcGlobals -> Tycon -> Binding list -val MakeBindingsForEqualsAugmentation : TcGlobals -> Tycon -> Binding list -val MakeBindingsForEqualityWithComparerAugmentation : TcGlobals -> Tycon -> Binding list diff --git a/tools/FSharp_1.9.6.16/source/fsharp/build.ml b/tools/FSharp_1.9.6.16/source/fsharp/build.ml deleted file mode 100644 index 0db885cb..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/build.ml +++ /dev/null @@ -1,3989 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved -#light - -/// Loading initial context, reporting errors etc. -module (* internal *) Microsoft.FSharp.Compiler.Build -open System -open System.IO -open Internal.Utilities -open Internal.Utilities.Text -open Microsoft.FSharp.Text -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.Pickle -open Microsoft.FSharp.Compiler.Range - -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.TypeChecker - -open Microsoft.FSharp.Compiler.SR -open Microsoft.FSharp.Compiler.DiagnosticMessage - -module Ilsupp = Microsoft.FSharp.Compiler.AbstractIL.Internal.Support -module Ilread = Microsoft.FSharp.Compiler.AbstractIL.BinaryReader - -module Tc = Microsoft.FSharp.Compiler.TypeChecker -module SR = Microsoft.FSharp.Compiler.SR -module DM = Microsoft.FSharp.Compiler.DiagnosticMessage - -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.Lexhelp -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Infos -open Microsoft.FSharp.Compiler.ConstraintSolver -open Microsoft.FSharp.Compiler.MSBuildResolver -open Microsoft.FSharp.Compiler.Typrelns -open Internal.Utilities.Debug -open Microsoft.FSharp.Compiler.Nameres -open Microsoft.FSharp.Compiler.PrettyNaming - -#if DEBUG -let showAssertForUnexpectedException = ref true -#endif - -//---------------------------------------------------------------------------- -// Some Globals -//-------------------------------------------------------------------------- - -let sigSuffixes = [".mli";".fsi"] -let implSuffixes = [".ml";".fs";".fsscript";".fsx"] -let resSuffixes = [".resx"] -let scriptSuffixes = [".fsscript";".fsx"] -let lightSyntaxDefaultExtensions : string list = [ ".fs";".fsscript";".fsx";".fsi" ] -let syntaxFlagRequiredExtensions : string list = [] // lightSyntaxDefaultExtensions - - -//---------------------------------------------------------------------------- -// ERROR REPORTING -//-------------------------------------------------------------------------- - -exception HashIncludeNotAllowedInNonScript of range -exception HashReferenceNotAllowedInNonScript of range -exception HashReferenceCopyAfterCompileNotAllowedInNonScript of range -exception HashDirectiveNotAllowedInNonScript of range -exception FileNameNotResolved of (*filename*) string * (*description of searched locations*) string * range -exception AssemblyNotResolved of (*originalName*) string * range -exception LoadedSourceNotFoundIgnoring of (*filename*) string * range -exception MSBuildReferenceResolutionWarning of (*MSBuild warning code*)string * (*Message*)string * range -exception MSBuildReferenceResolutionError of (*MSBuild warning code*)string * (*Message*)string * range -exception DeprecatedCommandLineOption of string * string * range -exception HashLoadedSourceHasIssues of (*warnings*) exn list * (*errors*) exn list * range -exception HashLoadedScriptConsideredSource of range -exception InvalidInternalsVisibleToAssemblyName of (*badName*)string * (*fileName option*) string option - - -let rec RangeOfError err = - match err with - | ErrorFromAddingConstraint(_,err2,_) -> RangeOfError err2 - | ReservedKeyword(_,m) - | IndentationProblem(_,m) - | ErrorFromAddingTypeEquation(_,_,_,_,_,m) - | ErrorFromApplyingDefault(_,_,_,_,_,m) - | ErrorsFromAddingSubsumptionConstraint(_,_,_,_,_,m) - | FunctionExpected(_,_,m) - | BakedInMemberConstraintName(_,m) - | IndexOutOfRangeExceptionWarning(m) - | StandardOperatorRedefinitionWarning(_,m) - | BadEventTransformation(m) - | ParameterlessStructCtor(m) - | FieldNotMutable (_,_,m) - | Recursion (_,_,_,_,m) - | InvalidRuntimeCoercion(_,_,_,m) - | IndeterminateRuntimeCoercion(_,_,_,m) - | IndeterminateStaticCoercion (_,_,_,m) - | StaticCoercionShouldUseBox (_,_,_,m) - | CoercionTargetSealed(_,_,m) - | UpcastUnnecessary(m) - | Creflect.IgnoringPartOfQuotedTermWarning (_,m) - - | TypeTestUnnecessary(m) - | RuntimeCoercionSourceSealed(_,_,m) - | OverrideDoesntOverride(_,_,_,_,_,m) - | UnionPatternsBindDifferentNames m - | UnionCaseWrongArguments (_,_,_,m) - | TypeIsImplicitlyAbstract m - | RequiredButNotSpecified (_,_,_,_,m) - | FunctionValueUnexpected (_,_,m) - | UnitTypeExpected (_,_,_,m ) - | UseOfAddressOfOperator m - | DeprecatedThreadStaticBindingWarning(m) - | NonUniqueInferredAbstractSlot (_,_,_,_,_,m) - | DefensiveCopyWarning (_,m) - | DeprecatedClassFieldInference(m) - | LetRecCheckedAtRuntime m - | UpperCaseIdentifierInPattern m - | NotUpperCaseConstructor m - | RecursiveUseCheckedAtRuntime (_,_,m) - | LetRecEvaluatedOutOfOrder (_,_,_,m) - | Error (_,m) - | SyntaxError (_,m) - | InternalError (_,m) - | FullAbstraction(_,m) - | InterfaceNotRevealed(_,_,m) - | WrappedError (_,m) - | Patcompile.MatchIncomplete (_,_,m) - | Patcompile.RuleNeverMatched m - | ValNotMutable(_,_,m) - | ValNotLocal(_,_,m) - | MissingFields(_,m) - | OverrideInIntrinsicAugmentation(m) - | IntfImplInIntrinsicAugmentation(m) - | OverrideInExtrinsicAugmentation(m) - | IntfImplInExtrinsicAugmentation(m) - | ValueRestriction(_,_,_,_,m) - | LetRecUnsound (_,_,m) - | Obsolete (_,m) - | Experimental (_,m) - | PossibleUnverifiableCode m - | OCamlCompatibility (_,m) - | Deprecated(_,m) - | LibraryUseOnly(m) - | FieldsFromDifferentTypes (_,_,_,m) - | IndeterminateType(m) - | TyconBadArgs(_,_,_,m) -> Some m - | FieldNotContained(_,arf,frf,_) -> Some arf.Range - | ValueNotContained(_,_,aval,_,_) -> Some aval.Range - | ConstrNotContained(_,aval,_,_) -> Some aval.ucase_id.idRange - | ExnconstrNotContained(_,aexnc,_,_) -> Some aexnc.Range - | VarBoundTwice(id) - | UndefinedName(_,_,id,_) -> Some id.idRange - | Duplicate(_,_,m) - | NameClash(_,_,_,m,_,_,_) - | UnresolvedOverloading(_,_,_,_,_,m) - | PossibleOverload(_,_,m) - //| PossibleBestOverload(_,_,m) - | VirtualAugmentationOnNullValuedType(m) - | NonVirtualAugmentationOnNullValuedType(m) - | NonRigidTypar(_,_,_,_,_,m) - | ConstraintSolverTupleDiffLengths(_,_,_,m,_) - | ConstraintSolverInfiniteTypes(_,_,_,m,_) - | ConstraintSolverMissingConstraint(_,_,_,m,_) - | ConstraintSolverTypesNotInEqualityRelation(_,_,_,m,_) - | ConstraintSolverError(_,m,_) - | ConstraintSolverTypesNotInSubsumptionRelation(_,_,_,m,_) - | ConstraintSolverRelatedInformation(_,m,_) - | SelfRefObjCtor(_,m) -> Some m - | NotAFunction(_,_,mfun,marg) -> Some mfun - | UnresolvedReferenceError(_,m) ->Some m - | UnresolvedPathReference(_,_,m) ->Some m - | DeprecatedCommandLineOption(_,_,m) ->Some m - | HashIncludeNotAllowedInNonScript(m) - | HashReferenceNotAllowedInNonScript(m) - | HashDirectiveNotAllowedInNonScript(m) - | HashReferenceCopyAfterCompileNotAllowedInNonScript(m) -> Some m - | FileNameNotResolved(_,_,m) -> Some m - | LoadedSourceNotFoundIgnoring(_,m) -> Some m - | MSBuildReferenceResolutionWarning(_,_,m) -> Some m - | MSBuildReferenceResolutionError(_,_,m) -> Some m - | AssemblyNotResolved(_,m) -> Some m - | HashLoadedSourceHasIssues(_,_,m) -> Some m - | HashLoadedScriptConsideredSource(m) -> Some m - - // Strip TargetInvocationException wrappers - | :? System.Reflection.TargetInvocationException as e -> - RangeOfError e.InnerException - - | _ -> None - -let rec GetErrorNumber err = - match err with - (* DO NOT CHANGE THESE NUMBERS *) - | ErrorFromAddingTypeEquation _ -> 1 - | FunctionExpected _ -> 2 - | NotAFunction _ -> 3 - | IndexOutOfRangeExceptionWarning _ -> 4 - | FieldNotMutable _ -> 5 - | Recursion _ -> 6 - | InvalidRuntimeCoercion _ -> 7 - | IndeterminateRuntimeCoercion _ -> 8 - | PossibleUnverifiableCode _ -> 9 - | SyntaxError _ -> 10 - | IndeterminateStaticCoercion _ -> 13 - | StaticCoercionShouldUseBox _ -> 14 - | RuntimeCoercionSourceSealed _ -> 16 - | OverrideDoesntOverride _ -> 17 - | UnionPatternsBindDifferentNames _ -> 18 - | UnionCaseWrongArguments _ -> 19 - | UnitTypeExpected _ -> 20 - | RecursiveUseCheckedAtRuntime _ -> 21 - | LetRecEvaluatedOutOfOrder _ -> 22 - | NameClash _ -> 23 - | Patcompile.MatchIncomplete _ -> 25 - | Patcompile.RuleNeverMatched _ -> 26 - | ValNotMutable _ -> 27 - | ValNotLocal _ -> 28 - | MissingFields _ -> 29 - | ValueRestriction _ -> 30 - | LetRecUnsound _ -> 31 - | FieldsFromDifferentTypes _ -> 32 - | TyconBadArgs _ -> 33 - | ValueNotContained _ -> 34 - | Deprecated _ -> 35 - | ConstrNotContained _ -> 36 - | Duplicate _ -> 37 - | VarBoundTwice _ -> 38 - | UndefinedName _ -> 39 - | LetRecCheckedAtRuntime _ -> 40 - | UnresolvedOverloading _ -> 41 - | LibraryUseOnly _ -> 42 - | ErrorFromAddingConstraint _ -> 43 - | Obsolete _ -> 44 - | FullAbstraction _ -> 45 - | ReservedKeyword _ -> 46 - | SelfRefObjCtor _ -> 47 - | VirtualAugmentationOnNullValuedType _ -> 48 - | UpperCaseIdentifierInPattern _ -> 49 - | InterfaceNotRevealed _ -> 50 - | UseOfAddressOfOperator _ -> 51 - | DefensiveCopyWarning _ -> 52 - | NotUpperCaseConstructor _ -> 53 - | TypeIsImplicitlyAbstract _ -> 54 - | DeprecatedClassFieldInference _ -> 55 - | DeprecatedThreadStaticBindingWarning _ -> 56 - | Experimental _ -> 57 - | IndentationProblem _ -> 58 - | CoercionTargetSealed _ -> 59 - | OverrideInIntrinsicAugmentation _ -> 60 - | NonVirtualAugmentationOnNullValuedType _ -> 61 - | OCamlCompatibility _ -> 62 - | ExnconstrNotContained _ -> 63 - | NonRigidTypar _ -> 64 - | UpcastUnnecessary _ -> 66 - | TypeTestUnnecessary _ -> 67 - | Creflect.IgnoringPartOfQuotedTermWarning _ -> 68 - | IntfImplInIntrinsicAugmentation _ -> 69 - | NonUniqueInferredAbstractSlot _ -> 70 - | ErrorFromApplyingDefault _ -> 71 - | IndeterminateType _ -> 72 - | InternalError _ -> 73 - | UnresolvedReferenceNoRange _ - | UnresolvedReferenceError _ - | UnresolvedPathReferenceNoRange _ - | UnresolvedPathReference _ -> 74 - | DeprecatedCommandLineOption _ -> 75 - | HashIncludeNotAllowedInNonScript _ - | HashReferenceNotAllowedInNonScript _ - | HashDirectiveNotAllowedInNonScript _ - | HashReferenceCopyAfterCompileNotAllowedInNonScript _ -> 76 - | BakedInMemberConstraintName _ -> 77 - | FileNameNotResolved _ -> 78 - | LoadedSourceNotFoundIgnoring _ -> 79 - | ParameterlessStructCtor _ -> 81 - | MSBuildReferenceResolutionWarning _ -> 82 - | MSBuildReferenceResolutionError _ -> 83 - | AssemblyNotResolved _ -> 84 - | HashLoadedSourceHasIssues _ -> 85 - | StandardOperatorRedefinitionWarning _ -> 86 - | InvalidInternalsVisibleToAssemblyName _ -> 87 - | OverrideInExtrinsicAugmentation _ -> 89 - | IntfImplInExtrinsicAugmentation _ -> 90 - | BadEventTransformation _ -> 91 - | HashLoadedScriptConsideredSource _ -> 92 - - (* DO NOT CHANGE THE NUMBERS *) - - // Strip TargetInvocationException wrappers - | :? System.Reflection.TargetInvocationException as e -> - GetErrorNumber e.InnerException - - | WrappedError(e,_) -> GetErrorNumber e - - (* These do not have good error numbers yet *) - | Error _ -> 191 - | Failure _ -> 192 - | _ -> 193 - -let warningOn err level = - match err with - // Level 4 warnings - | RecursiveUseCheckedAtRuntime _ - | LetRecEvaluatedOutOfOrder _ - | DefensiveCopyWarning _ - | FullAbstraction _ -> level > 3 - // Level 1 - 3 warnings - | _ -> level > 0 - -let rec SplitRelatedErrors err = - match err with - | UnresolvedOverloading(a,overloads,bestOverloads,errors,b,c) -> - UnresolvedOverloading(a,[],[],[],b,c), (overloads@bestOverloads@errors) - | ConstraintSolverRelatedInformation(fopt,m2,e) -> - let e,related = SplitRelatedErrors e - ConstraintSolverRelatedInformation(fopt,m2,e), related - | ErrorFromAddingTypeEquation(g,denv,t1,t2,e,m) -> - let e,related = SplitRelatedErrors e - ErrorFromAddingTypeEquation(g,denv,t1,t2,e,m) , related - | ErrorFromApplyingDefault(g,denv,tp,defaultType,e,m) -> - let e,related = SplitRelatedErrors e - ErrorFromApplyingDefault(g,denv,tp,defaultType,e,m) , related - | ErrorsFromAddingSubsumptionConstraint(g,denv,t1,t2,e,m) -> - let e,related = SplitRelatedErrors e - ErrorsFromAddingSubsumptionConstraint(g,denv,t1,t2,e,m), related - | ErrorFromAddingConstraint(x,e,m) -> - let e,related = SplitRelatedErrors e - ErrorFromAddingConstraint(x,e,m), related - | WrappedError (e,m) -> - let e,related = SplitRelatedErrors e - WrappedError(e,m), related - // Strip TargetInvocationException wrappers - | :? System.Reflection.TargetInvocationException as e -> - SplitRelatedErrors e.InnerException - | _ -> - err, [] - - - -let stringsOfTypes denv ts = - let _,ts,tpcs = PrettyTypes.PrettifyTypesN denv.g ts - let denvMin = { denv with showImperativeTyparAnnotations=false; showConstraintTyparAnnotations=false } - List.map (NicePrint.string_of_typ denvMin) ts - -// If the output text is different without showing constraints and/or imperative type variable -// annotations and/or fully qualifying paths then don't show them! -let minimalStringsOfTwoTypes denv t1 t2= - let _,(t1,t2),tpcs = PrettyTypes.PrettifyTypes2 denv.g (t1,t2) - // try denv + no type annotations - let denvMin = { denv with showImperativeTyparAnnotations=false; showConstraintTyparAnnotations=false } - let min1 = NicePrint.string_of_typ denvMin t1 - let min2 = NicePrint.string_of_typ denvMin t2 - if min1 <> min2 then (min1,min2,"") else - // try denv + no type annotations + show full paths - let denvMinWithAllPaths = { denvMin with openTopPaths=[] }.Normalize() - let min1 = NicePrint.string_of_typ denvMinWithAllPaths t1 - let min2 = NicePrint.string_of_typ denvMinWithAllPaths t2 - // try denv - if min1 <> min2 then (min1,min2,"") else - let min1 = NicePrint.string_of_typ denv t1 - let min2 = NicePrint.string_of_typ denv t2 - if min1 <> min2 then (min1,min2,NicePrint.string_of_typar_constraints denv tpcs) else - // try denv + show full paths - let denvWithAllPaths = { denv with openTopPaths=[] }.Normalize() - let min1 = NicePrint.string_of_typ denv t1 - let min2 = NicePrint.string_of_typ denv t2 - (min1,min2,NicePrint.string_of_typar_constraints denv tpcs) - - -// Note: Always show imperative annotations when comparing value signatures -let minimalStringsOfTwoValues denv v1 v2= - let denvMin = { denv with showImperativeTyparAnnotations=true; showConstraintTyparAnnotations=false } - let min1 = bufs (fun buf -> NicePrint.output_qualified_val_spec denvMin buf v1) - let min2 = bufs (fun buf -> NicePrint.output_qualified_val_spec denvMin buf v2) - if min1 <> min2 then (min1,min2) else - let denvMax = { denv with showImperativeTyparAnnotations=true; showConstraintTyparAnnotations=true } - let max1 = bufs (fun buf -> NicePrint.output_qualified_val_spec denvMax buf v1) - let max2 = bufs (fun buf -> NicePrint.output_qualified_val_spec denvMax buf v2) - max1,max2 - -let DeclareMesssage = DM.DeclareResourceString - -let SeeAlsoE = DeclareResourceString("SeeAlso","%s") -let ConstraintSolverTupleDiffLengthsE = DeclareResourceString("ConstraintSolverTupleDiffLengths","%d%d") -let ConstraintSolverInfiniteTypesE = DeclareResourceString("ConstraintSolverInfiniteTypes", "%s%s") -let ConstraintSolverMissingConstraintE = DeclareResourceString("ConstraintSolverMissingConstraint","%s") -let ConstraintSolverTypesNotInEqualityRelation1E = DeclareResourceString("ConstraintSolverTypesNotInEqualityRelation1","%s%s") -let ConstraintSolverTypesNotInEqualityRelation2E = DeclareResourceString("ConstraintSolverTypesNotInEqualityRelation2", "%s%s") -let ConstraintSolverTypesNotInSubsumptionRelationE = DeclareResourceString("ConstraintSolverTypesNotInSubsumptionRelation","%s%s%s") -let ConstraintSolverErrorE = DeclareResourceString("ConstraintSolverError","%s") -let ErrorFromAddingTypeEquation1E = DeclareResourceString("ErrorFromAddingTypeEquation1","%s%s%s") -let ErrorFromAddingTypeEquation2E = DeclareResourceString("ErrorFromAddingTypeEquation2","%s%s%s") -let ErrorFromApplyingDefault1E = DeclareResourceString("ErrorFromApplyingDefault1","%s") -let ErrorFromApplyingDefault2E = DeclareResourceString("ErrorFromApplyingDefault2","") -let ErrorsFromAddingSubsumptionConstraintE = DeclareResourceString("ErrorsFromAddingSubsumptionConstraint","%s%s%s") -let UpperCaseIdentifierInPatternE = DeclareResourceString("UpperCaseIdentifierInPattern","") -let NotUpperCaseConstructorE = DeclareResourceString("NotUpperCaseConstructor","") -let UnresolvedOverloadingE = DeclareResourceString("UnresolvedOverloading","%s") -let PossibleOverloadE = DeclareResourceString("PossibleOverload","%s") -let FunctionExpectedE = DeclareResourceString("FunctionExpected","") -let BakedInMemberConstraintNameE = DeclareResourceString("BakedInMemberConstraintName","%s") -let IndexOutOfRangeExceptionWarningE = DeclareResourceString("IndexOutOfRangeExceptionWarning","") -let StandardOperatorRedefinitionWarningE = DeclareResourceString("StandardOperatorRedefinitionWarning","%s") -let BadEventTransformationE = DeclareResourceString("BadEventTransformation","") -let ParameterlessStructCtorE = DeclareResourceString("ParameterlessStructCtor","") -let InterfaceNotRevealedE = DeclareResourceString("InterfaceNotRevealed","%s") -let NotAFunction1E = DeclareResourceString("NotAFunction1","") -let NotAFunction2E = DeclareResourceString("NotAFunction2","") -let TyconBadArgsE = DeclareResourceString("TyconBadArgs","%s%d%d") -let IndeterminateTypeE = DeclareResourceString("IndeterminateType","") -let NameClash1E = DeclareResourceString("NameClash1","%s%s") -let NameClash2E = DeclareResourceString("NameClash2","%s%s%s%s%s") -let Duplicate1E = DeclareResourceString("Duplicate1","%s") -let Duplicate2E = DeclareResourceString("Duplicate2","%s%s") -let UndefinedName1E = DeclareResourceString("UndefinedName1","%s%s") -let UndefinedName2E = DeclareResourceString("UndefinedName2","") -let InternalUndefinedTyconItemE = DeclareResourceString("InternalUndefinedTyconItem","%s%s%s") -let InternalUndefinedItemRefE = DeclareResourceString("InternalUndefinedItemRef","%s%s%s%s") -let FieldNotMutableE = DeclareResourceString("FieldNotMutable","") -let FieldsFromDifferentTypesE = DeclareResourceString("FieldsFromDifferentTypes","%s%s") -let VarBoundTwiceE = DeclareResourceString("VarBoundTwice","%s") -let RecursionE = DeclareResourceString("Recursion","%s%s%s%s") -let InvalidRuntimeCoercionE = DeclareResourceString("InvalidRuntimeCoercion","%s%s%s") -let IndeterminateRuntimeCoercionE = DeclareResourceString("IndeterminateRuntimeCoercion","%s%s") -let IndeterminateStaticCoercionE = DeclareResourceString("IndeterminateStaticCoercion","%s%s") -let StaticCoercionShouldUseBoxE = DeclareResourceString("StaticCoercionShouldUseBox","%s%s") -let TypeIsImplicitlyAbstractE = DeclareResourceString("TypeIsImplicitlyAbstract","") -let NonRigidTypar1E = DeclareResourceString("NonRigidTypar1","%s%s") -let NonRigidTypar2E = DeclareResourceString("NonRigidTypar2","%s%s") -let NonRigidTypar3E = DeclareResourceString("NonRigidTypar3","%s%s") -let OBlockEndE = DeclareResourceString("Parser.TOKEN.OBLOCKEND","") -let UnexpectedEndOfInputE = DeclareResourceString("UnexpectedEndOfInput","") -let UnexpectedE = DeclareResourceString("Unexpected","%s") -let NONTERM_interactionE = DeclareResourceString("NONTERM.interaction","") -let NONTERM_hashDirectiveE = DeclareResourceString("NONTERM.hashDirective","") -let NONTERM_fieldDeclE = DeclareResourceString("NONTERM.fieldDecl","") -let NONTERM_unionCaseReprE = DeclareResourceString("NONTERM.unionCaseRepr","") -let NONTERM_localBindingE = DeclareResourceString("NONTERM.localBinding","") -let NONTERM_hardwhiteLetBindingsE = DeclareResourceString("NONTERM.hardwhiteLetBindings","") -let NONTERM_classDefnMemberE = DeclareResourceString("NONTERM.classDefnMember","") -let NONTERM_defnBindingsE = DeclareResourceString("NONTERM.defnBindings","") -let NONTERM_classMemberSpfnE = DeclareResourceString("NONTERM.classMemberSpfn","") -let NONTERM_valSpfnE = DeclareResourceString("NONTERM.valSpfn","") -let NONTERM_tyconSpfnE = DeclareResourceString("NONTERM.tyconSpfn","") -let NONTERM_anonLambdaExprE = DeclareResourceString("NONTERM.anonLambdaExpr","") -let NONTERM_attrUnionCaseDeclE = DeclareResourceString("NONTERM.attrUnionCaseDecl","") -let NONTERM_cPrototypeE = DeclareResourceString("NONTERM.cPrototype","") -let NONTERM_objectImplementationMembersE = DeclareResourceString("NONTERM.objectImplementationMembers","") -let NONTERM_ifExprCasesE = DeclareResourceString("NONTERM.ifExprCases","") -let NONTERM_openDeclE = DeclareResourceString("NONTERM.openDecl","") -let NONTERM_fileModuleSpecE = DeclareResourceString("NONTERM.fileModuleSpec","") -let NONTERM_patternClausesE = DeclareResourceString("NONTERM.patternClauses","") -let NONTERM_beginEndExprE = DeclareResourceString("NONTERM.beginEndExpr","") -let NONTERM_recdExprE = DeclareResourceString("NONTERM.recdExpr","") -let NONTERM_tyconDefnE = DeclareResourceString("NONTERM.tyconDefn","") -let NONTERM_exconCoreE = DeclareResourceString("NONTERM.exconCore","") -let NONTERM_typeNameInfoE = DeclareResourceString("NONTERM.typeNameInfo","") -let NONTERM_attributeListE = DeclareResourceString("NONTERM.attributeList","") -let NONTERM_quoteExprE = DeclareResourceString("NONTERM.quoteExpr","") -let NONTERM_typeConstraintE = DeclareResourceString("NONTERM.typeConstraint","") -let NONTERM_Category_ImplementationFileE = DeclareResourceString("NONTERM.Category.ImplementationFile","") -let NONTERM_Category_DefinitionE = DeclareResourceString("NONTERM.Category.Definition","") -let NONTERM_Category_SignatureFileE = DeclareResourceString("NONTERM.Category.SignatureFile","") -let NONTERM_Category_PatternE = DeclareResourceString("NONTERM.Category.Pattern","") -let NONTERM_Category_ExprE = DeclareResourceString("NONTERM.Category.Expr","") -let NONTERM_Category_TypeE = DeclareResourceString("NONTERM.Category.Type","") -let NONTERM_typeArgsActualE = DeclareResourceString("NONTERM.typeArgsActual","") -let TokenName1E = DeclareResourceString("TokenName1","%s") -let TokenName1TokenName2E = DeclareResourceString("TokenName1TokenName2","%s%s") -let TokenName1TokenName2TokenName3E = DeclareResourceString("TokenName1TokenName2TokenName3","%s%s%s") -let RuntimeCoercionSourceSealed1E = DeclareResourceString("RuntimeCoercionSourceSealed1","%s") -let RuntimeCoercionSourceSealed2E = DeclareResourceString("RuntimeCoercionSourceSealed2","%s") -let CoercionTargetSealedE = DeclareResourceString("CoercionTargetSealed","%s") -let UpcastUnnecessaryE = DeclareResourceString("UpcastUnnecessary","") -let TypeTestUnnecessaryE = DeclareResourceString("TypeTestUnnecessary","") -let IgnoringPartOfQuotedTermWarningE = DeclareResourceString("IgnoringPartOfQuotedTermWarning","%s") -let OverrideDoesntOverride1E = DeclareResourceString("OverrideDoesntOverride1","%s") -let OverrideDoesntOverride2E = DeclareResourceString("OverrideDoesntOverride2","%s") -let OverrideDoesntOverride3E = DeclareResourceString("OverrideDoesntOverride3","%s") -let UnionCaseWrongArgumentsE = DeclareResourceString("UnionCaseWrongArguments","%d%d") -let UnionPatternsBindDifferentNamesE = DeclareResourceString("UnionPatternsBindDifferentNames","") -let ValueNotContainedE = DeclareResourceString("ValueNotContained","%s%s%s%s") -let ConstrNotContainedE = DeclareResourceString("ConstrNotContained","%s%s%s") -let ExnconstrNotContainedE = DeclareResourceString("ExnconstrNotContained","%s%s%s") -let FieldNotContainedE = DeclareResourceString("FieldNotContained","%s%s%s") -let RequiredButNotSpecifiedE = DeclareResourceString("RequiredButNotSpecified","%s%s%s") -let UseOfAddressOfOperatorE = DeclareResourceString("UseOfAddressOfOperator","") -let DefensiveCopyWarningE = DeclareResourceString("DefensiveCopyWarning","%s") -let DeprecatedThreadStaticBindingWarningE = DeclareResourceString("DeprecatedThreadStaticBindingWarning","") -let DeprecatedClassFieldInferenceE = DeclareResourceString("DeprecatedClassFieldInference","") -let FunctionValueUnexpectedE = DeclareResourceString("FunctionValueUnexpected","%s") -let UnitTypeExpected1E = DeclareResourceString("UnitTypeExpected1","%s") -let UnitTypeExpected2E = DeclareResourceString("UnitTypeExpected2","") -let RecursiveUseCheckedAtRuntimeE = DeclareResourceString("RecursiveUseCheckedAtRuntime","") -let LetRecUnsound1E = DeclareResourceString("LetRecUnsound1","%s") -let LetRecUnsound2E = DeclareResourceString("LetRecUnsound2","%s%s") -let LetRecUnsoundInnerE = DeclareResourceString("LetRecUnsoundInner","%s") -let LetRecEvaluatedOutOfOrderE = DeclareResourceString("LetRecEvaluatedOutOfOrder","") -let LetRecCheckedAtRuntimeE = DeclareResourceString("LetRecCheckedAtRuntime","") -let SelfRefObjCtor1E = DeclareResourceString("SelfRefObjCtor1","") -let SelfRefObjCtor2E = DeclareResourceString("SelfRefObjCtor2","") -let VirtualAugmentationOnNullValuedTypeE = DeclareResourceString("VirtualAugmentationOnNullValuedType","") -let NonVirtualAugmentationOnNullValuedTypeE = DeclareResourceString("NonVirtualAugmentationOnNullValuedType","") -let NonUniqueInferredAbstractSlot1E = DeclareResourceString("NonUniqueInferredAbstractSlot1","%s") -let NonUniqueInferredAbstractSlot2E = DeclareResourceString("NonUniqueInferredAbstractSlot2","") -let NonUniqueInferredAbstractSlot3E = DeclareResourceString("NonUniqueInferredAbstractSlot3","%s%s") -let NonUniqueInferredAbstractSlot4E = DeclareResourceString("NonUniqueInferredAbstractSlot4","") -let ErrorE = DeclareResourceString("Error","%s") -let Failure3E = DeclareResourceString("Failure3","%s") -let Failure4E = DeclareResourceString("Failure4","%s") -let FullAbstractionE = DeclareResourceString("FullAbstraction","%s") -let MatchIncomplete1E = DeclareResourceString("MatchIncomplete1","") -let MatchIncomplete2E = DeclareResourceString("MatchIncomplete2","%s") -let MatchIncomplete3E = DeclareResourceString("MatchIncomplete3","%s") -let MatchIncomplete4E = DeclareResourceString("MatchIncomplete4","") -let RuleNeverMatchedE = DeclareResourceString("RuleNeverMatched","") -let ValNotMutableE = DeclareResourceString("ValNotMutable","") -let ValNotLocalE = DeclareResourceString("ValNotLocal","") -let Obsolete1E = DeclareResourceString("Obsolete1","") -let Obsolete2E = DeclareResourceString("Obsolete2","%s") -let ExperimentalE = DeclareResourceString("Experimental","%s") -let PossibleUnverifiableCodeE = DeclareResourceString("PossibleUnverifiableCode","") -let OCamlCompatibilityE = DeclareResourceString("OCamlCompatibility","%s") -let DeprecatedE = DeclareResourceString("Deprecated","%s") -let LibraryUseOnlyE = DeclareResourceString("LibraryUseOnly","") -let MissingFieldsE = DeclareResourceString("MissingFields","%s") -let ValueRestriction1E = DeclareResourceString("ValueRestriction1","%s%s%s") -let ValueRestriction2E = DeclareResourceString("ValueRestriction2","%s%s%s") -let ValueRestriction3E = DeclareResourceString("ValueRestriction3","%s") -let ValueRestriction4E = DeclareResourceString("ValueRestriction4","%s%s%s") -let ValueRestriction5E = DeclareResourceString("ValueRestriction5","%s%s%s") -let RecoverableParseErrorE = DeclareResourceString("RecoverableParseError","") -let ReservedKeywordE = DeclareResourceString("ReservedKeyword","%s") -let IndentationProblemE = DeclareResourceString("IndentationProblem","%s") -let OverrideInIntrinsicAugmentationE = DeclareResourceString("OverrideInIntrinsicAugmentation","") -let OverrideInExtrinsicAugmentationE = DeclareResourceString("OverrideInExtrinsicAugmentation","") -let IntfImplInIntrinsicAugmentationE = DeclareResourceString("IntfImplInIntrinsicAugmentation","") -let IntfImplInExtrinsicAugmentationE = DeclareResourceString("IntfImplInExtrinsicAugmentation","") -let UnresolvedReferenceNoRangeE = DeclareResourceString("UnresolvedReferenceNoRange","%s") -let UnresolvedPathReferenceNoRangeE = DeclareResourceString("UnresolvedPathReferenceNoRange","%s%s") -let DeprecatedCommandLineOptionE = DeclareResourceString("DeprecatedCommandLineOption","%s%s") -let HashIncludeNotAllowedInNonScriptE = DeclareResourceString("HashIncludeNotAllowedInNonScript","") -let HashReferenceNotAllowedInNonScriptE = DeclareResourceString("HashReferenceNotAllowedInNonScript","") -let HashReferenceCopyAfterCompileNotAllowedInNonScriptE = DeclareResourceString("HashReferenceCopyAfterCompileNotAllowedInNonScript","") -let HashDirectiveNotAllowedInNonScriptE = DeclareResourceString("HashDirectiveNotAllowedInNonScript","") -let FileNameNotResolvedE = DeclareResourceString("FileNameNotResolved","%s%s") -let AssemblyNotResolvedE = DeclareResourceString("AssemblyNotResolved","%s") -let HashLoadedSourceHasIssues1E = DeclareResourceString("HashLoadedSourceHasIssues1","") -let HashLoadedSourceHasIssues2E = DeclareResourceString("HashLoadedSourceHasIssues2","") -let HashLoadedScriptConsideredSourceE = DeclareResourceString("HashLoadedScriptConsideredSource","") -let InvalidInternalsVisibleToAssemblyName1E = DeclareResourceString("InvalidInternalsVisibleToAssemblyName1","%s%s") -let InvalidInternalsVisibleToAssemblyName2E = DeclareResourceString("InvalidInternalsVisibleToAssemblyName2","%s") -let LoadedSourceNotFoundIgnoringE = DeclareResourceString("LoadedSourceNotFoundIgnoring","%s") -let MSBuildReferenceResolutionErrorE = DeclareResourceString("MSBuildReferenceResolutionError","%s%s") -let TargetInvocationExceptionWrapperE = DeclareResourceString("TargetInvocationExceptionWrapper","%s") - -let getErrorString = SR.GetString - -let rec OutputExceptionR (os:System.Text.StringBuilder) exn = - match exn with - | ConstraintSolverTupleDiffLengths(denv,tl1,tl2,m,m2) -> - os.Append(ConstraintSolverTupleDiffLengthsE.Format (List.length tl1) (List.length tl2)) |> ignore; - (if start_line_of_range m <> start_line_of_range m2 then - os.Append(SeeAlsoE.Format (string_of_range m)) |> ignore); - | ConstraintSolverInfiniteTypes(denv,t1,t2,m,m2) -> - let t1,t2,tpcs = minimalStringsOfTwoTypes denv t1 t2 - os.Append(ConstraintSolverInfiniteTypesE.Format t1 t2) |> ignore; - (if start_line_of_range m <> start_line_of_range m2 then - os.Append(SeeAlsoE.Format (string_of_range m)) |> ignore ); - | ConstraintSolverMissingConstraint(denv,tpr,tpc,m,m2) -> - os.Append(ConstraintSolverMissingConstraintE.Format (NicePrint.string_of_typar_constraint denv (tpr,tpc))) |> ignore; - (if start_line_of_range m <> start_line_of_range m2 then - os.Append(SeeAlsoE.Format (string_of_range m)) |> ignore ); - | ConstraintSolverTypesNotInEqualityRelation(denv,(TType_measure _ as t1),(TType_measure _ as t2),m,m2) -> - let t1,t2,tpcs = minimalStringsOfTwoTypes denv t1 t2 - os.Append(ConstraintSolverTypesNotInEqualityRelation1E.Format t1 t2) |> ignore; - (if start_line_of_range m <> start_line_of_range m2 then - os.Append(SeeAlsoE.Format (string_of_range m)) |> ignore); - | ConstraintSolverTypesNotInEqualityRelation(denv,t1,t2,m,m2) -> - let t1,t2,tpcs = minimalStringsOfTwoTypes denv t1 t2 - os.Append(ConstraintSolverTypesNotInEqualityRelation2E.Format t1 t2) |> ignore; - (if start_line_of_range m <> start_line_of_range m2 then - os.Append(SeeAlsoE.Format (string_of_range m)) |> ignore); - | ConstraintSolverTypesNotInSubsumptionRelation(denv,t1,t2,m,m2) -> - let t1,t2,tpcs = minimalStringsOfTwoTypes denv t1 t2 - os.Append(ConstraintSolverTypesNotInSubsumptionRelationE.Format t2 t1 tpcs) |> ignore; - (if start_line_of_range m <> start_line_of_range m2 then - os.Append(SeeAlsoE.Format (string_of_range m2)) |> ignore); - | ConstraintSolverError(msg,m,m2) -> - os.Append(ConstraintSolverErrorE.Format msg) |> ignore; - (if start_line_of_range m <> start_line_of_range m2 then - os.Append(SeeAlsoE.Format (string_of_range m2)) |> ignore); - | ConstraintSolverRelatedInformation(fopt,m2,e) -> - match e with - | ConstraintSolverError _ -> OutputExceptionR os e; - | _ -> () - fopt |> Option.iter (Printf.bprintf os " %s") - | ErrorFromAddingTypeEquation(g,denv,t1,t2,ConstraintSolverTypesNotInEqualityRelation(_,t1',t2',m,_),_) - when type_equiv g t1 t1' - && type_equiv g t2 t2' -> - let t1,t2,tpcs = minimalStringsOfTwoTypes denv t1 t2 - os.Append(ErrorFromAddingTypeEquation1E.Format t2 t1 tpcs) |> ignore - | ErrorFromAddingTypeEquation(g,denv,_,_,((ConstraintSolverTypesNotInSubsumptionRelation _ | ConstraintSolverError _) as e),m) -> - OutputExceptionR os e; - | ErrorFromAddingTypeEquation(g,denv,t1,t2,e,m) -> - if not (type_equiv g t1 t2) then ( - let t1,t2,tpcs = minimalStringsOfTwoTypes denv t1 t2 - if t1<>t2 ^ tpcs then os.Append(ErrorFromAddingTypeEquation2E.Format t1 t2 tpcs) |> ignore; - ); - OutputExceptionR os e - | ErrorFromApplyingDefault(g,denv,tp,defaultType,e,m) -> - let defaultType = List.hd (stringsOfTypes denv [defaultType]) - os.Append(ErrorFromApplyingDefault1E.Format defaultType) |> ignore - OutputExceptionR os e - os.Append(ErrorFromApplyingDefault2E.Format) |> ignore - | ErrorsFromAddingSubsumptionConstraint(g,denv,t1,t2,e,m) -> - if not (type_equiv g t1 t2) then ( - let t1,t2,tpcs = minimalStringsOfTwoTypes denv t1 t2 - if t1 <> (t2 ^ tpcs) then - os.Append(ErrorsFromAddingSubsumptionConstraintE.Format t2 t1 tpcs) |> ignore - ); - OutputExceptionR os e - | UpperCaseIdentifierInPattern(m) -> - os.Append(UpperCaseIdentifierInPatternE.Format) |> ignore - | NotUpperCaseConstructor(m) -> - os.Append(NotUpperCaseConstructorE.Format) |> ignore - | ErrorFromAddingConstraint(_,e,_) -> - OutputExceptionR os e; - | UnresolvedOverloading(_,_,_,_,mtext,m) -> - os.Append(UnresolvedOverloadingE.Format mtext) |> ignore - | PossibleOverload(_,minfo,m) -> - os.Append(PossibleOverloadE.Format minfo) |> ignore - //| PossibleBestOverload(_,minfo,m) -> - // Printf.bprintf os "\n\nPossible best overload: '%s'." minfo - | FunctionExpected(denv,t,m) -> - os.Append(FunctionExpectedE.Format) |> ignore - | BakedInMemberConstraintName(nm,m) -> - os.Append(BakedInMemberConstraintNameE.Format nm) |> ignore - | IndexOutOfRangeExceptionWarning(m) -> - os.Append(IndexOutOfRangeExceptionWarningE.Format) |> ignore - | StandardOperatorRedefinitionWarning(msg,_) -> - os.Append(StandardOperatorRedefinitionWarningE.Format msg) |> ignore - | BadEventTransformation(m) -> - os.Append(BadEventTransformationE.Format) |> ignore - | ParameterlessStructCtor(m) -> - os.Append(ParameterlessStructCtorE.Format) |> ignore - | InterfaceNotRevealed(denv,ity,m) -> - os.Append(InterfaceNotRevealedE.Format (NicePrint.pretty_string_of_typ denv ity)) |> ignore - | NotAFunction(denv,t,mfun,marg) -> - if start_col_of_range marg = 0 then - os.Append(NotAFunction1E.Format) |> ignore - else - os.Append(NotAFunction2E.Format) |> ignore - - | TyconBadArgs(denv,tcref,d,m) -> - let exp = tcref.TyparsNoRange.Length - os.Append(TyconBadArgsE.Format (full_display_text_of_tcref tcref) exp d) |> ignore - | IndeterminateType(m) -> - os.Append(IndeterminateTypeE.Format) |> ignore - | NameClash(nm,k1,nm1,m1,k2,nm2,m2) -> - if nm = nm1 && nm1 = nm2 && k1 = k2 then - os.Append(NameClash1E.Format k1 nm1) |> ignore - else - os.Append(NameClash2E.Format k1 nm1 nm k2 nm2) |> ignore - | Duplicate(k,s,m) -> - if k = "member" then - os.Append(Duplicate1E.Format (DecompileOpName s)) |> ignore - else - os.Append(Duplicate2E.Format k (DecompileOpName s)) |> ignore - | UndefinedName(_,k,id,avail) -> - os.Append(UndefinedName1E.Format k (DecompileOpName id.idText)) |> ignore - if List.mem id.idText - [ "open_out"; "pred"; "succ"; "min_int"; "max_int"; "End_of_file"; "Out_of_memory"; - "Division_by_zero"; "Stack_overflow"; "Not_found"; "Match_failure"; "Assert_failure"; - "Invalid_argument"; "!="; "=="; "+."; "-."; "*."; "/."; "abs_float"; "max_float"; "min_float"; - "epsilon_float"; "mod_float"; "modf"; "nonempty"; "neg_infinity"; "ldexp"; "FP_normal"; - "classify_float"; "bool_of_string"; "char_of_int"; "int_of_char"; "int_of_string"; - "int_of_float"; "string_of_bool"; "string_of_float"; "string_of_int"; "float_of_int"; - "float_of_string"; "in_channel"; "open_in"; "open_in_bin"; "open_in_gen"; - "close_in"; "in_channel_length"; "input_byte"; "input_char"; "input_line"; "input_value"; - "pos_in"; "really_input"; "seek_in"; "set_binary_mode_in"; "unsafe_really_input"; "out_channel"; - "open_out"; "open_out_bin"; "open_out_gen"; "close_out"; "out_channel_length"; - "output_byte"; "output_string"; "output_value"; "pos_out"; "seek_out"; "set_binary_mode_out"; - "flush"; "prerr_char"; "prerr_endline"; "prerr_float"; "prerr_int"; "prerr_newline"; - "prerr_string"; "print_char"; "print_endline"; "print_float"; "print_int"; "print_newline"; - "mem"; "assoc"; "try_assoc"; "mem_assoc"; "remove_assoc"; "assq";"try_assq"; "mem_assq"; - "remove_assq"; "memq"; "rev_map"; "rev_map2"; "rev_append"; "scan1_left"; "scan1_right"; - "print_string"; "read_float"; "read_int"; "read_line"; "Pervasives"; "Hashtbl"; "Buffer"; "Tagged"; "HashSet"; - "Parsing"; "Lexing"; "Char"; "Int32"; "Int64"; "UInt32"; "UInt64"; "Int16"; "UInt16"; "Byte"; - "SByte"; "Int8"; "UInt8"; "Obj"; "Num"; "Filename"; "ReadonlyArray"; "Roarray"; "LazyList"; "Big_int"; "Sys"; - "Printexc"; "Float"; "Float32"; "Matrix"; "Vector"; "Complex"; "generate_using"; "generate"; "complex"; "RowVector"; "matrix"; "vector"; "rowvec"; - // String.* functions - "split"; "lowercase"; "contains"; "contains_between"; "contains_from"; "capitalize"; "uncapitalize"; "uppercase"; "trim" ] then - os.Append(UndefinedName2E.Format) |> ignore - - | InternalUndefinedTyconItem(k,tcref,s) -> - os.Append(InternalUndefinedTyconItemE.Format (full_display_text_of_tcref tcref) k s) |> ignore - | InternalUndefinedItemRef(k,smr,ccuName,s) -> - os.Append(InternalUndefinedItemRefE.Format smr ccuName k s) |> ignore - | FieldNotMutable (denv,fref,m) -> - os.Append(FieldNotMutableE.Format) |> ignore - | FieldsFromDifferentTypes (denv,fref1,fref2,m) -> - os.Append(FieldsFromDifferentTypesE.Format fref1.FieldName fref2.FieldName) |> ignore - | VarBoundTwice(id) -> - os.Append(VarBoundTwiceE.Format (DecompileOpName id.idText)) |> ignore - | Recursion (denv,id,ty1,ty2,m) -> - let t1,t2,tpcs = minimalStringsOfTwoTypes denv ty1 ty2 - os.Append(RecursionE.Format (DecompileOpName id.idText) t1 t2 tpcs) |> ignore - | InvalidRuntimeCoercion(denv,ty1,ty2,m) -> - let t1,t2,tpcs = minimalStringsOfTwoTypes denv ty1 ty2 - os.Append(InvalidRuntimeCoercionE.Format t1 t2 tpcs) |> ignore - | IndeterminateRuntimeCoercion(denv,ty1,ty2,m) -> - let t1,t2,tpcs = minimalStringsOfTwoTypes denv ty1 ty2 - os.Append(IndeterminateRuntimeCoercionE.Format t1 t2) |> ignore - | IndeterminateStaticCoercion(denv,ty1,ty2,m) -> - let t1,t2,tpcs = minimalStringsOfTwoTypes denv ty1 ty2 - os.Append(IndeterminateStaticCoercionE.Format t1 t2) |> ignore - | StaticCoercionShouldUseBox(denv,ty1,ty2,m) -> - let t1,t2,tpcs = minimalStringsOfTwoTypes denv ty1 ty2 - os.Append(StaticCoercionShouldUseBoxE.Format t1 t2) |> ignore - | TypeIsImplicitlyAbstract(m) -> - os.Append(TypeIsImplicitlyAbstractE.Format) |> ignore - | NonRigidTypar(denv,tpnmOpt,typarRange,ty1,ty,m) -> - let _,(ty1,ty),tpcs = PrettyTypes.PrettifyTypes2 denv.g (ty1,ty) - match tpnmOpt with - | None -> - os.Append(NonRigidTypar1E.Format (string_of_range typarRange) (NicePrint.string_of_typ denv ty)) |> ignore - | Some tpnm -> - match ty1 with - | TType_measure _ -> - os.Append(NonRigidTypar2E.Format tpnm (NicePrint.string_of_typ denv ty)) |> ignore - | _ -> - os.Append(NonRigidTypar3E.Format tpnm (NicePrint.string_of_typ denv ty)) |> ignore - | SyntaxError (ctxt,m) -> - let ctxt = unbox>(ctxt) - let tokenIdToText tid = - match tid with - | Parser.TOKEN_IDENT -> getErrorString("Parser.TOKEN.IDENT") - | Parser.TOKEN_BIGNUM - | Parser.TOKEN_INT8 - | Parser.TOKEN_UINT8 - | Parser.TOKEN_INT16 - | Parser.TOKEN_UINT16 - | Parser.TOKEN_INT32 - | Parser.TOKEN_UINT32 - | Parser.TOKEN_INT64 - | Parser.TOKEN_UINT64 - | Parser.TOKEN_UNATIVEINT - | Parser.TOKEN_NATIVEINT -> getErrorString("Parser.TOKEN.INT") - | Parser.TOKEN_IEEE32 - | Parser.TOKEN_IEEE64 -> getErrorString("Parser.TOKEN.FLOAT") - | Parser.TOKEN_DECIMAL -> getErrorString("Parser.TOKEN.DECIMAL") - | Parser.TOKEN_CHAR -> getErrorString("Parser.TOKEN.CHAR") - - | Parser.TOKEN_BASE -> getErrorString("Parser.TOKEN.BASE") - | Parser.TOKEN_LPAREN_STAR_RPAREN -> getErrorString("Parser.TOKEN.LPAREN.STAR.RPAREN") - | Parser.TOKEN_DOLLAR -> getErrorString("Parser.TOKEN.DOLLAR") - | Parser.TOKEN_INFIX_STAR_STAR_OP -> getErrorString("Parser.TOKEN.INFIX.STAR.STAR.OP") - | Parser.TOKEN_INFIX_COMPARE_OP -> getErrorString("Parser.TOKEN.INFIX.COMPARE.OP") - | Parser.TOKEN_COLON_GREATER -> getErrorString("Parser.TOKEN.COLON.GREATER") - | Parser.TOKEN_COLON_COLON ->getErrorString("Parser.TOKEN.COLON.COLON") - | Parser.TOKEN_PERCENT_OP -> getErrorString("Parser.TOKEN.PERCENT.OP") - | Parser.TOKEN_INFIX_AT_HAT_OP -> getErrorString("Parser.TOKEN.INFIX.AT.HAT.OP") - | Parser.TOKEN_INFIX_BAR_OP -> getErrorString("Parser.TOKEN.INFIX.BAR.OP") - | Parser.TOKEN_PLUS_MINUS_OP -> getErrorString("Parser.TOKEN.PLUS.MINUS.OP") - | Parser.TOKEN_PREFIX_OP -> getErrorString("Parser.TOKEN.PREFIX.OP") - | Parser.TOKEN_COLON_QMARK_GREATER -> getErrorString("Parser.TOKEN.COLON.QMARK.GREATER") - | Parser.TOKEN_INFIX_STAR_DIV_MOD_OP -> getErrorString("Parser.TOKEN.INFIX.STAR.DIV.MOD.OP") - | Parser.TOKEN_INFIX_AMP_OP -> getErrorString("Parser.TOKEN.INFIX.AMP.OP") - | Parser.TOKEN_AMP -> getErrorString("Parser.TOKEN.AMP") - | Parser.TOKEN_AMP_AMP -> getErrorString("Parser.TOKEN.AMP.AMP") - | Parser.TOKEN_BAR_BAR -> getErrorString("Parser.TOKEN.BAR.BAR") - | Parser.TOKEN_LESS -> getErrorString("Parser.TOKEN.LESS") - | Parser.TOKEN_GREATER -> getErrorString("Parser.TOKEN.GREATER") - | Parser.TOKEN_QMARK -> getErrorString("Parser.TOKEN.QMARK") - | Parser.TOKEN_QMARK_QMARK -> getErrorString("Parser.TOKEN.QMARK.QMARK") - | Parser.TOKEN_COLON_QMARK-> getErrorString("Parser.TOKEN.COLON.QMARK") - | Parser.TOKEN_INT32_DOT_DOT -> getErrorString("Parser.TOKEN.INT32.DOT.DOT") - | Parser.TOKEN_DOT_DOT -> getErrorString("Parser.TOKEN.DOT.DOT") - | Parser.TOKEN_QUOTE -> getErrorString("Parser.TOKEN.QUOTE") - | Parser.TOKEN_STAR -> getErrorString("Parser.TOKEN.STAR") - | Parser.TOKEN_HIGH_PRECEDENCE_TYAPP -> getErrorString("Parser.TOKEN.HIGH.PRECEDENCE.TYAPP") - | Parser.TOKEN_COLON -> getErrorString("Parser.TOKEN.COLON") - | Parser.TOKEN_COLON_EQUALS -> getErrorString("Parser.TOKEN.COLON.EQUALS") - | Parser.TOKEN_LARROW -> getErrorString("Parser.TOKEN.LARROW") - | Parser.TOKEN_EQUALS -> getErrorString("Parser.TOKEN.EQUALS") - | Parser.TOKEN_GREATER_DOT -> getErrorString("Parser.TOKEN.GREATER.DOT") - | Parser.TOKEN_GREATER_BAR_RBRACK -> getErrorString("Parser.TOKEN.GREATER.BAR.RBRACK") - | Parser.TOKEN_MINUS -> getErrorString("Parser.TOKEN.MINUS") - | Parser.TOKEN_ADJACENT_PREFIX_PLUS_MINUS_OP -> getErrorString("Parser.TOKEN.ADJACENT.PREFIX.PLUS.MINUS.OP") - | Parser.TOKEN_FUNKY_OPERATOR_NAME -> getErrorString("Parser.TOKEN.FUNKY.OPERATOR.NAME") - | Parser.TOKEN_COMMA-> getErrorString("Parser.TOKEN.COMMA") - | Parser.TOKEN_DOT -> getErrorString("Parser.TOKEN.DOT") - | Parser.TOKEN_BAR-> getErrorString("Parser.TOKEN.BAR") - | Parser.TOKEN_HASH -> getErrorString("Parser.TOKEN.HASH") - | Parser.TOKEN_UNDERSCORE -> getErrorString("Parser.TOKEN.UNDERSCORE") - | Parser.TOKEN_SEMICOLON -> getErrorString("Parser.TOKEN.SEMICOLON") - | Parser.TOKEN_SEMICOLON_SEMICOLON-> getErrorString("Parser.TOKEN.SEMICOLON.SEMICOLON") - | Parser.TOKEN_LPAREN-> getErrorString("Parser.TOKEN.LPAREN") - | Parser.TOKEN_RPAREN -> getErrorString("Parser.TOKEN.RPAREN") - | Parser.TOKEN_SPLICE_SYMBOL -> getErrorString("Parser.TOKEN.SPLICE.SYMBOL") - | Parser.TOKEN_LQUOTE -> getErrorString("Parser.TOKEN.LQUOTE") - | Parser.TOKEN_LBRACK -> getErrorString("Parser.TOKEN.LBRACK") - | Parser.TOKEN_LBRACK_BAR -> getErrorString("Parser.TOKEN.LBRACK.BAR") - | Parser.TOKEN_LBRACK_LESS -> getErrorString("Parser.TOKEN.LBRACK.LESS") - | Parser.TOKEN_LBRACE -> getErrorString("Parser.TOKEN.LBRACE") - | Parser.TOKEN_LBRACE_LESS-> getErrorString("Parser.TOKEN.LBRACE.LESS") - | Parser.TOKEN_BAR_RBRACK -> getErrorString("Parser.TOKEN.BAR.RBRACK") - | Parser.TOKEN_GREATER_RBRACE -> getErrorString("Parser.TOKEN.GREATER.RBRACE") - | Parser.TOKEN_GREATER_RBRACK -> getErrorString("Parser.TOKEN.GREATER.RBRACK") - | Parser.TOKEN_RQUOTE_DOT _ - | Parser.TOKEN_RQUOTE -> getErrorString("Parser.TOKEN.RQUOTE") - | Parser.TOKEN_RBRACK -> getErrorString("Parser.TOKEN.RBRACK") - | Parser.TOKEN_RBRACE -> getErrorString("Parser.TOKEN.RBRACE") - | Parser.TOKEN_PUBLIC -> getErrorString("Parser.TOKEN.PUBLIC") - | Parser.TOKEN_PRIVATE -> getErrorString("Parser.TOKEN.PRIVATE") - | Parser.TOKEN_INTERNAL -> getErrorString("Parser.TOKEN.INTERNAL") - | Parser.TOKEN_CONSTRAINT -> getErrorString("Parser.TOKEN.CONSTRAINT") - | Parser.TOKEN_INSTANCE -> getErrorString("Parser.TOKEN.INSTANCE") - | Parser.TOKEN_DELEGATE -> getErrorString("Parser.TOKEN.DELEGATE") - | Parser.TOKEN_INHERIT -> getErrorString("Parser.TOKEN.INHERIT") - | Parser.TOKEN_CONSTRUCTOR-> getErrorString("Parser.TOKEN.CONSTRUCTOR") - | Parser.TOKEN_DEFAULT -> getErrorString("Parser.TOKEN.DEFAULT") - | Parser.TOKEN_OVERRIDE-> getErrorString("Parser.TOKEN.OVERRIDE") - | Parser.TOKEN_ABSTRACT-> getErrorString("Parser.TOKEN.ABSTRACT") - | Parser.TOKEN_VIRTUAL-> getErrorString("Parser.TOKEN.VIRTUAL") - | Parser.TOKEN_CLASS-> getErrorString("Parser.TOKEN.CLASS") - | Parser.TOKEN_MEMBER -> getErrorString("Parser.TOKEN.MEMBER") - | Parser.TOKEN_STATIC -> getErrorString("Parser.TOKEN.STATIC") - | Parser.TOKEN_NAMESPACE-> getErrorString("Parser.TOKEN.NAMESPACE") - | Parser.TOKEN_OBLOCKBEGIN -> getErrorString("Parser.TOKEN.OBLOCKBEGIN") - | Parser.TOKEN_ODECLEND - | Parser.TOKEN_OBLOCKSEP - | Parser.TOKEN_OEND - | Parser.TOKEN_ORIGHT_BLOCK_END - | Parser.TOKEN_OBLOCKEND -> getErrorString("Parser.TOKEN.OBLOCKEND") - | Parser.TOKEN_THEN - | Parser.TOKEN_OTHEN -> getErrorString("Parser.TOKEN.OTHEN") - | Parser.TOKEN_ELSE - | Parser.TOKEN_OELSE -> getErrorString("Parser.TOKEN.OELSE") - | Parser.TOKEN_LET(_) - | Parser.TOKEN_OLET(_) -> getErrorString("Parser.TOKEN.OLET") - | Parser.TOKEN_OBINDER - | Parser.TOKEN_BINDER -> getErrorString("Parser.TOKEN.BINDER") - | Parser.TOKEN_ODO -> getErrorString("Parser.TOKEN.ODO") - | Parser.TOKEN_OWITH -> getErrorString("Parser.TOKEN.OWITH") - | Parser.TOKEN_OFUNCTION -> getErrorString("Parser.TOKEN.OFUNCTION") - | Parser.TOKEN_OFUN -> getErrorString("Parser.TOKEN.OFUN") - | Parser.TOKEN_ORESET -> getErrorString("Parser.TOKEN.ORESET") - | Parser.TOKEN_ODUMMY -> getErrorString("Parser.TOKEN.ODUMMY") - | Parser.TOKEN_DO_BANG - | Parser.TOKEN_ODO_BANG -> getErrorString("Parser.TOKEN.ODO.BANG") - | Parser.TOKEN_YIELD -> getErrorString("Parser.TOKEN.YIELD") - | Parser.TOKEN_YIELD_BANG -> getErrorString("Parser.TOKEN.YIELD.BANG") - | Parser.TOKEN_OINTERFACE_MEMBER-> getErrorString("Parser.TOKEN.OINTERFACE.MEMBER") - | Parser.TOKEN_ELIF -> getErrorString("Parser.TOKEN.ELIF") - | Parser.TOKEN_RARROW -> getErrorString("Parser.TOKEN.RARROW") - | Parser.TOKEN_RARROW2 -> getErrorString("Parser.TOKEN.RARROW2") - | Parser.TOKEN_SIG -> getErrorString("Parser.TOKEN.SIG") - | Parser.TOKEN_STRUCT -> getErrorString("Parser.TOKEN.STRUCT") - | Parser.TOKEN_UPCAST -> getErrorString("Parser.TOKEN.UPCAST") - | Parser.TOKEN_DOWNCAST -> getErrorString("Parser.TOKEN.DOWNCAST") - | Parser.TOKEN_NULL -> getErrorString("Parser.TOKEN.NULL") - | Parser.TOKEN_RESERVED -> getErrorString("Parser.TOKEN.RESERVED") - | Parser.TOKEN_MODULE -> getErrorString("Parser.TOKEN.MODULE") - | Parser.TOKEN_AND -> getErrorString("Parser.TOKEN.AND") - | Parser.TOKEN_AS -> getErrorString("Parser.TOKEN.AS") - | Parser.TOKEN_ASSERT -> getErrorString("Parser.TOKEN.ASSERT") - | Parser.TOKEN_ASR-> getErrorString("Parser.TOKEN.ASR") - | Parser.TOKEN_DOWNTO -> getErrorString("Parser.TOKEN.DOWNTO") - | Parser.TOKEN_EXCEPTION -> getErrorString("Parser.TOKEN.EXCEPTION") - | Parser.TOKEN_FALSE -> getErrorString("Parser.TOKEN.FALSE") - | Parser.TOKEN_FOR -> getErrorString("Parser.TOKEN.FOR") - | Parser.TOKEN_FUN -> getErrorString("Parser.TOKEN.FUN") - | Parser.TOKEN_FUNCTION-> getErrorString("Parser.TOKEN.FUNCTION") - | Parser.TOKEN_FINALLY -> getErrorString("Parser.TOKEN.FINALLY") - | Parser.TOKEN_LAZY -> getErrorString("Parser.TOKEN.LAZY") - | Parser.TOKEN_MATCH -> getErrorString("Parser.TOKEN.MATCH") - | Parser.TOKEN_METHOD -> getErrorString("Parser.TOKEN.METHOD") - | Parser.TOKEN_MUTABLE -> getErrorString("Parser.TOKEN.MUTABLE") - | Parser.TOKEN_NEW -> getErrorString("Parser.TOKEN.NEW") - | Parser.TOKEN_OF -> getErrorString("Parser.TOKEN.OF") - | Parser.TOKEN_OPEN -> getErrorString("Parser.TOKEN.OPEN") - | Parser.TOKEN_OR -> getErrorString("Parser.TOKEN.OR") - | Parser.TOKEN_VOID -> getErrorString("Parser.TOKEN.VOID") - | Parser.TOKEN_EXTERN-> getErrorString("Parser.TOKEN.EXTERN") - | Parser.TOKEN_INTERFACE -> getErrorString("Parser.TOKEN.INTERFACE") - | Parser.TOKEN_REC -> getErrorString("Parser.TOKEN.REC") - | Parser.TOKEN_TO -> getErrorString("Parser.TOKEN.TO") - | Parser.TOKEN_TRUE -> getErrorString("Parser.TOKEN.TRUE") - | Parser.TOKEN_TRY -> getErrorString("Parser.TOKEN.TRY") - | Parser.TOKEN_TYPE -> getErrorString("Parser.TOKEN.TYPE") - | Parser.TOKEN_VAL -> getErrorString("Parser.TOKEN.VAL") - | Parser.TOKEN_INLINE -> getErrorString("Parser.TOKEN.INLINE") - | Parser.TOKEN_WHEN -> getErrorString("Parser.TOKEN.WHEN") - | Parser.TOKEN_WHILE -> getErrorString("Parser.TOKEN.WHILE") - | Parser.TOKEN_WITH-> getErrorString("Parser.TOKEN.WITH") - | Parser.TOKEN_IF -> getErrorString("Parser.TOKEN.IF") - | Parser.TOKEN_DO -> getErrorString("Parser.TOKEN.DO") - | Parser.TOKEN_DONE -> getErrorString("Parser.TOKEN.DONE") - | Parser.TOKEN_IN -> getErrorString("Parser.TOKEN.IN") - | Parser.TOKEN_HIGH_PRECEDENCE_APP-> getErrorString("Parser.TOKEN.HIGH.PRECEDENCE.APP") - | Parser.TOKEN_BEGIN -> getErrorString("Parser.TOKEN.BEGIN") - | Parser.TOKEN_END -> getErrorString("Parser.TOKEN.END") - | Parser.TOKEN_HASH_LIGHT - | Parser.TOKEN_HASH_LINE - | Parser.TOKEN_HASH_IF - | Parser.TOKEN_HASH_ELSE - | Parser.TOKEN_HASH_ENDIF -> getErrorString("Parser.TOKEN.HASH.ENDIF") - | Parser.TOKEN_INACTIVECODE -> getErrorString("Parser.TOKEN.INACTIVECODE") - | Parser.TOKEN_LEX_FAILURE-> getErrorString("Parser.TOKEN.LEX.FAILURE") - | Parser.TOKEN_WHITESPACE -> getErrorString("Parser.TOKEN.WHITESPACE") - | Parser.TOKEN_COMMENT -> getErrorString("Parser.TOKEN.COMMENT") - | Parser.TOKEN_LINE_COMMENT -> getErrorString("Parser.TOKEN.LINE.COMMENT") - | Parser.TOKEN_STRING_TEXT -> getErrorString("Parser.TOKEN.STRING.TEXT") - | Parser.TOKEN_BYTEARRAY -> getErrorString("Parser.TOKEN.BYTEARRAY") - | Parser.TOKEN_STRING -> getErrorString("Parser.TOKEN.STRING") - | Parser.TOKEN_EOF -> getErrorString("Parser.TOKEN.EOF") - | unknown -> sprintf "%A" unknown - - match ctxt.CurrentToken with - | None -> os.Append(UnexpectedEndOfInputE.Format) |> ignore - | Some token -> - match (token |> Parser.tagOfToken |> Parser.tokenTagToTokenId), token with - | (Parser.TOKEN_ORIGHT_BLOCK_END | Parser.TOKEN_OBLOCKEND),_ -> os.Append(OBlockEndE.Format) |> ignore - | Parser.TOKEN_LEX_FAILURE, Parser.LEX_FAILURE str -> Printf.bprintf os "%s" str (* Fix bug://2431 *) - | token,_ -> os.Append(UnexpectedE.Format (token |> tokenIdToText)) |> ignore - - (* Search for a state producing a single recognized non-terminal in the states on the stack *) - let foundInContext = - - (* Merge a bunch of expression non terminals *) - let (|NONTERM_Category_Expr|_|) = function - | Parser.NONTERM_argExpr|Parser.NONTERM_minusExpr|Parser.NONTERM_parenExpr|Parser.NONTERM_atomicExpr - | Parser.NONTERM_appExpr|Parser.NONTERM_tupleExpr|Parser.NONTERM_declExpr|Parser.NONTERM_braceExpr - | Parser.NONTERM_typedSeqExprBlock - | Parser.NONTERM_interactiveExpr -> Some() - | _ -> None - - (* Merge a bunch of pattern non terminals *) - let (|NONTERM_Category_Pattern|_|) = function - | Parser.NONTERM_constrPattern|Parser.NONTERM_parenPattern|Parser.NONTERM_atomicPattern -> Some() - | _ -> None - - (* Merge a bunch of if/then/else non terminals *) - let (|NONTERM_Category_IfThenElse|_|) = function - | Parser.NONTERM_ifExprThen|Parser.NONTERM_ifExprElifs|Parser.NONTERM_ifExprCases -> Some() - | _ -> None - - (* Merge a bunch of non terminals *) - let (|NONTERM_Category_SignatureFile|_|) = function - | Parser.NONTERM_signatureFile|Parser.NONTERM_moduleSpfn|Parser.NONTERM_moduleSpfns -> Some() - | _ -> None - let (|NONTERM_Category_ImplementationFile|_|) = function - | Parser.NONTERM_implementationFile|Parser.NONTERM_fileNamespaceImpl|Parser.NONTERM_fileNamespaceImpls -> Some() - | _ -> None - let (|NONTERM_Category_Definition|_|) = function - | Parser.NONTERM_fileModuleImpl|Parser.NONTERM_moduleDefn|Parser.NONTERM_interactiveModuleDefns - |Parser.NONTERM_moduleDefns|Parser.NONTERM_moduleDefnsOrExpr -> Some() - | _ -> None - - let (|NONTERM_Category_Type|_|) = function - | Parser.NONTERM_typ|Parser.NONTERM_tupleType -> Some() - | _ -> None - - let (|NONTERM_Category_Interaction|_|) = function - | Parser.NONTERM_interactiveItemsTerminator|Parser.NONTERM_interaction|Parser.NONTERM__startinteraction -> Some() - | _ -> None - - - // Canonicalize the categories and check for a unique category - ctxt.ReducibleProductions |> List.exists (fun prods -> - match prods - |> List.map Parser.prodIdxToNonTerminal - |> List.map (function - | NONTERM_Category_Type -> Parser.NONTERM_typ - | NONTERM_Category_Expr -> Parser.NONTERM_declExpr - | NONTERM_Category_Pattern -> Parser.NONTERM_atomicPattern - | NONTERM_Category_IfThenElse -> Parser.NONTERM_ifExprThen - | NONTERM_Category_SignatureFile -> Parser.NONTERM_signatureFile - | NONTERM_Category_ImplementationFile -> Parser.NONTERM_implementationFile - | NONTERM_Category_Definition -> Parser.NONTERM_moduleDefn - | NONTERM_Category_Interaction -> Parser.NONTERM_interaction - | nt -> nt) - |> Set.of_list - |> Set.to_list with - | [Parser.NONTERM_interaction] -> os.Append(NONTERM_interactionE.Format) |> ignore; true - | [Parser.NONTERM_hashDirective] -> os.Append(NONTERM_hashDirectiveE.Format) |> ignore; true - | [Parser.NONTERM_fieldDecl] -> os.Append(NONTERM_fieldDeclE.Format) |> ignore; true - | [Parser.NONTERM_unionCaseRepr] -> os.Append(NONTERM_unionCaseReprE.Format) |> ignore; true - | [Parser.NONTERM_localBinding] -> os.Append(NONTERM_localBindingE.Format) |> ignore; true - | [Parser.NONTERM_hardwhiteLetBindings] -> os.Append(NONTERM_hardwhiteLetBindingsE.Format) |> ignore; true - | [Parser.NONTERM_classDefnMember] -> os.Append(NONTERM_classDefnMemberE.Format) |> ignore; true - | [Parser.NONTERM_defnBindings] -> os.Append(NONTERM_defnBindingsE.Format) |> ignore; true - | [Parser.NONTERM_classMemberSpfn] -> os.Append(NONTERM_classMemberSpfnE.Format) |> ignore; true - | [Parser.NONTERM_valSpfn] -> os.Append(NONTERM_valSpfnE.Format) |> ignore; true - | [Parser.NONTERM_tyconSpfn] -> os.Append(NONTERM_tyconSpfnE.Format) |> ignore; true - | [Parser.NONTERM_anonLambdaExpr] -> os.Append(NONTERM_anonLambdaExprE.Format) |> ignore; true - | [Parser.NONTERM_attrUnionCaseDecl] -> os.Append(NONTERM_attrUnionCaseDeclE.Format) |> ignore; true - | [Parser.NONTERM_cPrototype] -> os.Append(NONTERM_cPrototypeE.Format) |> ignore; true - | [Parser.NONTERM_objExpr|Parser.NONTERM_objectImplementationMembers] -> os.Append(NONTERM_objectImplementationMembersE.Format) |> ignore; true - | [Parser.NONTERM_ifExprThen|Parser.NONTERM_ifExprElifs|Parser.NONTERM_ifExprCases] -> os.Append(NONTERM_ifExprCasesE.Format) |> ignore; true - | [Parser.NONTERM_openDecl] -> os.Append(NONTERM_openDeclE.Format) |> ignore; true - | [Parser.NONTERM_fileModuleSpec] -> os.Append(NONTERM_fileModuleSpecE.Format) |> ignore; true - | [Parser.NONTERM_patternClauses] -> os.Append(NONTERM_patternClausesE.Format) |> ignore; true - | [Parser.NONTERM_beginEndExpr] -> os.Append(NONTERM_beginEndExprE.Format) |> ignore; true - | [Parser.NONTERM_recdExpr] -> os.Append(NONTERM_recdExprE.Format) |> ignore; true - | [Parser.NONTERM_tyconDefn] -> os.Append(NONTERM_tyconDefnE.Format) |> ignore; true - | [Parser.NONTERM_exconCore] -> os.Append(NONTERM_exconCoreE.Format) |> ignore; true - | [Parser.NONTERM_typeNameInfo] -> os.Append(NONTERM_typeNameInfoE.Format) |> ignore; true - | [Parser.NONTERM_attributeList] -> os.Append(NONTERM_attributeListE.Format) |> ignore; true - | [Parser.NONTERM_quoteExpr] -> os.Append(NONTERM_quoteExprE.Format) |> ignore; true - | [Parser.NONTERM_typeConstraint] -> os.Append(NONTERM_typeConstraintE.Format) |> ignore; true - | [NONTERM_Category_ImplementationFile] -> os.Append(NONTERM_Category_ImplementationFileE.Format) |> ignore; true - | [NONTERM_Category_Definition] -> os.Append(NONTERM_Category_DefinitionE.Format) |> ignore; true - | [NONTERM_Category_SignatureFile] -> os.Append(NONTERM_Category_SignatureFileE.Format) |> ignore; true - | [NONTERM_Category_Pattern] -> os.Append(NONTERM_Category_PatternE.Format) |> ignore; true - | [NONTERM_Category_Expr] -> os.Append(NONTERM_Category_ExprE.Format) |> ignore; true - | [NONTERM_Category_Type] -> os.Append(NONTERM_Category_TypeE.Format) |> ignore; true - | [Parser.NONTERM_typeArgsActual] -> os.Append(NONTERM_typeArgsActualE.Format) |> ignore; true - | _ -> - false) -#if DEBUG - if not foundInContext then - Printf.bprintf os ". (Please report to fsbugs@microsoft.com: no 'in' context found: %+A)" (List.map (List.map Parser.prodIdxToNonTerminal) ctxt.ReducibleProductions); -#endif - let fix (s:string) = s.Replace(SR.GetString("FixKeyword"),"").Replace(SR.GetString("FixSymbol"),"").Replace(SR.GetString("FixReplace"),"") - match (ctxt.ShiftTokens - |> List.map Parser.tokenTagToTokenId - |> List.filter (function Parser.TOKEN_error | Parser.TOKEN_EOF -> false | _ -> true) - |> List.map tokenIdToText - |> Set.of_list - |> Set.to_list) with - | [tokenName1] -> os.Append(TokenName1E.Format (fix tokenName1)) |> ignore - | [tokenName1;tokenName2] -> os.Append(TokenName1TokenName2E.Format (fix tokenName1) (fix tokenName2)) |> ignore - | [tokenName1;tokenName2;tokenName3] -> os.Append(TokenName1TokenName2TokenName3E.Format (fix tokenName1) (fix tokenName2) (fix tokenName3)) |> ignore - | _ -> () -(* - Printf.bprintf os ".\n\n state = %A\n token = %A\n expect (shift) %A\n expect (reduce) %A\n prods=%A\n non terminals: %A" - ctxt.StateStack - ctxt.CurrentToken - (List.map Parser.tokenTagToTokenId ctxt.ShiftTokens) - (List.map Parser.tokenTagToTokenId ctxt.ReduceTokens) - ctxt.ReducibleProductions - (List.mapSquared Parser.prodIdxToNonTerminal ctxt.ReducibleProductions) -*) - | RuntimeCoercionSourceSealed(denv,ty,m) -> - let _,ty,tpcs = PrettyTypes.PrettifyTypes1 denv.g ty - if is_typar_typ denv.g ty - then os.Append(RuntimeCoercionSourceSealed1E.Format (NicePrint.string_of_typ denv ty)) |> ignore - else os.Append(RuntimeCoercionSourceSealed2E.Format (NicePrint.string_of_typ denv ty)) |> ignore - | CoercionTargetSealed(denv,ty,m) -> - let _,ty,tpcs = PrettyTypes.PrettifyTypes1 denv.g ty - os.Append(CoercionTargetSealedE.Format (NicePrint.string_of_typ denv ty)) |> ignore - | UpcastUnnecessary(m) -> - os.Append(UpcastUnnecessaryE.Format) |> ignore - | TypeTestUnnecessary(m) -> - os.Append(TypeTestUnnecessaryE.Format) |> ignore - | Creflect.IgnoringPartOfQuotedTermWarning (msg,_) -> - Printf.bprintf os "%s" msg - | OverrideDoesntOverride(denv,impl,minfoVirtOpt,g,amap,m) -> - let sig1 = DispatchSlotChecking.FormatOverride denv impl - begin match minfoVirtOpt with - | None -> - os.Append(OverrideDoesntOverride1E.Format sig1) |> ignore - | Some minfoVirt -> - os.Append(OverrideDoesntOverride2E.Format sig1) |> ignore - let sig2 = DispatchSlotChecking.FormatMethInfoSig g amap m denv minfoVirt - if sig1 <> sig2 then - os.Append(OverrideDoesntOverride3E.Format sig2) |> ignore - end - | UnionCaseWrongArguments (denv,n1,n2,m) -> - os.Append(UnionCaseWrongArgumentsE.Format n2 n1) |> ignore - | UnionPatternsBindDifferentNames m -> - os.Append(UnionPatternsBindDifferentNamesE.Format) |> ignore - | ValueNotContained (denv,mref,v1,v2,s) -> - let text1,text2 = minimalStringsOfTwoValues denv v1 v2 - os.Append(ValueNotContainedE.Format - (full_display_text_of_modref mref) - text1 - text2 - s) |> ignore - | ConstrNotContained (denv,v1,v2,msg) -> - os.Append(ConstrNotContainedE.Format (NicePrint.string_of_ucase denv v1) (NicePrint.string_of_ucase denv v2) msg) |> ignore - | ExnconstrNotContained (denv,v1,v2,s) -> - os.Append(ExnconstrNotContainedE.Format s (NicePrint.string_of_exnc denv v1) (NicePrint.string_of_exnc denv v2)) |> ignore - | FieldNotContained (denv,v1,v2,msg) -> - os.Append(FieldNotContainedE.Format (NicePrint.string_of_rfield denv v1) (NicePrint.string_of_rfield denv v2) msg) |> ignore - | RequiredButNotSpecified (denv,mref,k,name,m) -> - let nsb = new System.Text.StringBuilder() - name nsb; - os.Append(RequiredButNotSpecifiedE.Format (full_display_text_of_modref mref) k (nsb.ToString())) |> ignore - | UseOfAddressOfOperator _ -> - os.Append(UseOfAddressOfOperatorE.Format) |> ignore - | DefensiveCopyWarning(s,m) -> os.Append(DefensiveCopyWarningE.Format s) |> ignore - | DeprecatedThreadStaticBindingWarning(m) -> - os.Append(DeprecatedThreadStaticBindingWarningE.Format) |> ignore - | DeprecatedClassFieldInference(m) -> - os.Append(DeprecatedClassFieldInferenceE.Format) |> ignore - | FunctionValueUnexpected (denv,ty,m) -> - let _,ty,tpcs = PrettyTypes.PrettifyTypes1 denv.g ty - os.Append(FunctionValueUnexpectedE.Format (NicePrint.string_of_typ denv ty)) |> ignore - | UnitTypeExpected (denv,ty,perhapsProp,m) -> - let _,ty,tpcs = PrettyTypes.PrettifyTypes1 denv.g ty - os.Append(UnitTypeExpected1E.Format (NicePrint.string_of_typ denv ty)) |> ignore - if perhapsProp then os.Append(UnitTypeExpected2E.Format) |> ignore - | RecursiveUseCheckedAtRuntime (denv,v,m) -> - os.Append(RecursiveUseCheckedAtRuntimeE.Format) |> ignore - | LetRecUnsound (denv,[v],m) -> - os.Append(LetRecUnsound1E.Format v.DisplayName) |> ignore - | LetRecUnsound (denv,path,m) -> - let bos = new System.Text.StringBuilder() - let s = List.iter (fun (v:ValRef) -> bos.Append(LetRecUnsoundInnerE.Format v.DisplayName) |> ignore) (List.tl path @ [List.hd path]) - os.Append(LetRecUnsound2E.Format (List.hd path).DisplayName (bos.ToString())) |> ignore - | LetRecEvaluatedOutOfOrder (denv,v1,v2,m) -> - os.Append(LetRecEvaluatedOutOfOrderE.Format) |> ignore - | LetRecCheckedAtRuntime _ -> - os.Append(LetRecCheckedAtRuntimeE.Format) |> ignore - | SelfRefObjCtor(false,m) -> - os.Append(SelfRefObjCtor1E.Format) |> ignore - | SelfRefObjCtor(true,m) -> - os.Append(SelfRefObjCtor2E.Format) |> ignore - | VirtualAugmentationOnNullValuedType(m) -> - os.Append(VirtualAugmentationOnNullValuedTypeE.Format) |> ignore - | NonVirtualAugmentationOnNullValuedType(m) -> - os.Append(NonVirtualAugmentationOnNullValuedTypeE.Format) |> ignore - | NonUniqueInferredAbstractSlot(g,denv,bindnm,bvirt1,bvirt2,m) -> - os.Append(NonUniqueInferredAbstractSlot1E.Format bindnm) |> ignore - let ty1 = bvirt1.EnclosingType - let ty2 = bvirt2.EnclosingType - let t1,t2,tpcs = minimalStringsOfTwoTypes denv ty1 ty2 - os.Append(NonUniqueInferredAbstractSlot2E.Format) |> ignore - if t1 <> t2 then - os.Append(NonUniqueInferredAbstractSlot3E.Format t1 t2) |> ignore - os.Append(NonUniqueInferredAbstractSlot4E.Format) |> ignore - | Error (s,m) -> os.Append(ErrorE.Format s) |> ignore - | InternalError (s,_) - | InvalidArgument s - | Failure s -> - let f1 = SR.GetString("Failure1") - let f2 = SR.GetString("Failure2") - match s with - | f when f = f1 -> os.Append(Failure3E.Format s) |> ignore - | f when f = f2 -> os.Append(Failure3E.Format s) |> ignore - | _ -> os.Append(Failure4E.Format s) |> ignore -#if DEBUG - Printf.bprintf os "\nStack Trace\n%s\n" (exn.ToString()) - if !showAssertForUnexpectedException then - System.Diagnostics.Debug.Assert(false,sprintf "Bug seen in compiler: %s" (exn.ToString())) -#endif - | FullAbstraction(s,m) -> os.Append(FullAbstractionE.Format s) |> ignore - | WrappedError (exn,m) -> OutputExceptionR os exn - | Patcompile.MatchIncomplete (isComp,cexOpt,m) -> - os.Append(MatchIncomplete1E.Format) |> ignore - match cexOpt with - | None -> () - | Some (cex,false) -> os.Append(MatchIncomplete2E.Format cex) |> ignore - | Some (cex,true) -> os.Append(MatchIncomplete3E.Format cex) |> ignore - if isComp then - os.Append(MatchIncomplete4E.Format) |> ignore - | Patcompile.RuleNeverMatched m -> os.Append(RuleNeverMatchedE.Format) |> ignore - | ValNotMutable(denv,vr,m) -> os.Append(ValNotMutableE.Format) |> ignore - | ValNotLocal(denv,vr,m) -> os.Append(ValNotLocalE.Format) |> ignore - | Obsolete (s, _) -> - os.Append(Obsolete1E.Format) |> ignore - if s <> "" then os.Append(Obsolete2E.Format s) |> ignore - | Experimental (s, _) -> os.Append(ExperimentalE.Format s) |> ignore - | PossibleUnverifiableCode m -> os.Append(PossibleUnverifiableCodeE.Format) |> ignore - | OCamlCompatibility (s, _) -> os.Append(OCamlCompatibilityE.Format (if s = "" then "" else s^". ")) |> ignore - | Deprecated(s, _) -> os.Append(DeprecatedE.Format s) |> ignore - | LibraryUseOnly(_) -> os.Append(LibraryUseOnlyE.Format) |> ignore - | MissingFields(sl,m) -> os.Append(MissingFieldsE.Format (String.concat "," sl ^".")) |> ignore - | ValueRestriction(denv,hassig,v,tp,m) -> - let denv = { denv with showImperativeTyparAnnotations=true; } - let tps,tau = v.TypeScheme - if hassig then - if is_fun_typ denv.g tau && (arity_of_val v).HasNoArgs then - os.Append(ValueRestriction1E.Format - v.DisplayName - (NicePrint.string_of_qualified_val_spec denv v) - v.DisplayName) |> ignore - else - os.Append(ValueRestriction2E.Format - v.DisplayName - (NicePrint.string_of_qualified_val_spec denv v) - v.DisplayName) |> ignore - else - match v.MemberInfo with - | Some(membInfo) when - begin match membInfo.MemberFlags.MemberKind with - | MemberKindPropertyGet - | MemberKindPropertySet - | MemberKindConstructor -> true (* can't infer extra polymorphism *) - | _ -> false (* can infer extra polymorphism *) - end -> - os.Append(ValueRestriction3E.Format (NicePrint.string_of_qualified_val_spec denv v)) |> ignore - | _ -> - if is_fun_typ denv.g tau && (arity_of_val v).HasNoArgs then - os.Append(ValueRestriction4E.Format - v.DisplayName - (NicePrint.string_of_qualified_val_spec denv v) - v.DisplayName) |> ignore - else - os.Append(ValueRestriction5E.Format - v.DisplayName - (NicePrint.string_of_qualified_val_spec denv v) - v.DisplayName) |> ignore - - | Parsing.RecoverableParseError -> os.Append(RecoverableParseErrorE.Format) |> ignore - | ReservedKeyword (s,m) -> os.Append(ReservedKeywordE.Format s) |> ignore - | IndentationProblem (s,m) -> os.Append(IndentationProblemE.Format s) |> ignore - | OverrideInIntrinsicAugmentation(m) -> os.Append(OverrideInIntrinsicAugmentationE.Format) |> ignore - | OverrideInExtrinsicAugmentation(m) -> os.Append(OverrideInExtrinsicAugmentationE.Format) |> ignore - | IntfImplInIntrinsicAugmentation(m) -> os.Append(IntfImplInIntrinsicAugmentationE.Format) |> ignore - | IntfImplInExtrinsicAugmentation(m) -> os.Append(IntfImplInExtrinsicAugmentationE.Format) |> ignore - | UnresolvedReferenceError(assemblyname,_) - | UnresolvedReferenceNoRange(assemblyname) -> - os.Append(UnresolvedReferenceNoRangeE.Format assemblyname) |> ignore - | UnresolvedPathReference(assemblyname,pathname,_) - | UnresolvedPathReferenceNoRange(assemblyname,pathname) -> - os.Append(UnresolvedPathReferenceNoRangeE.Format pathname assemblyname) |> ignore - | DeprecatedCommandLineOption(optionName,altOption,_) -> os.Append(DeprecatedCommandLineOptionE.Format optionName altOption) |> ignore - | HashIncludeNotAllowedInNonScript(_) -> - os.Append(HashIncludeNotAllowedInNonScriptE.Format) |> ignore - | HashReferenceNotAllowedInNonScript(_) -> - os.Append(HashReferenceNotAllowedInNonScriptE.Format) |> ignore - | HashReferenceCopyAfterCompileNotAllowedInNonScript(_) -> - os.Append(HashReferenceCopyAfterCompileNotAllowedInNonScriptE.Format) |> ignore - | HashDirectiveNotAllowedInNonScript(_) -> - os.Append(HashDirectiveNotAllowedInNonScriptE.Format) |> ignore - | FileNameNotResolved(filename,locations,_) -> - os.Append(FileNameNotResolvedE.Format filename locations) |> ignore - | AssemblyNotResolved(originalName,_) -> - os.Append(AssemblyNotResolvedE.Format originalName) |> ignore - | HashLoadedSourceHasIssues(warnings,errors,_) -> - let Emit(l:exn list) = - OutputExceptionR os (List.hd l) - if errors=[] then - os.Append(HashLoadedSourceHasIssues1E.Format) |> ignore - Emit(warnings) - else - os.Append(HashLoadedSourceHasIssues2E.Format) |> ignore - Emit(errors) - | HashLoadedScriptConsideredSource(_) -> - os.Append(HashLoadedScriptConsideredSourceE.Format) |> ignore - | InvalidInternalsVisibleToAssemblyName(badName,fileNameOption) -> - match fileNameOption with - | Some file -> os.Append(InvalidInternalsVisibleToAssemblyName1E.Format badName file) |> ignore - | None -> os.Append(InvalidInternalsVisibleToAssemblyName2E.Format badName) |> ignore - | LoadedSourceNotFoundIgnoring(filename,_) -> - os.Append(LoadedSourceNotFoundIgnoringE.Format filename) |> ignore - | MSBuildReferenceResolutionWarning(code,message,_) - | MSBuildReferenceResolutionError(code,message,_) -> - os.Append(MSBuildReferenceResolutionErrorE.Format message code) |> ignore - // Strip TargetInvocationException wrappers - | :? System.Reflection.TargetInvocationException as e -> - OutputExceptionR os e.InnerException - | :? FileNotFoundException as e -> Printf.bprintf os "%s" e.Message - | :? DirectoryNotFoundException as e -> Printf.bprintf os "%s" e.Message - | :? System.ArgumentException as e -> Printf.bprintf os "%s" e.Message - | :? System.NotSupportedException as e -> Printf.bprintf os "%s" e.Message - | :? IOException as e -> Printf.bprintf os "%s" e.Message - | :? System.UnauthorizedAccessException as e -> Printf.bprintf os "%s" e.Message - | e -> - os.Append(TargetInvocationExceptionWrapperE.Format e.Message) |> ignore -#if DEBUG - Printf.bprintf os "\nStack Trace\n%s\n" (exn.ToString()) - if !showAssertForUnexpectedException then - System.Diagnostics.Debug.Assert(false,sprintf "Bug seen in compiler: %s" (exn.ToString())) -#endif - - -and output_plural os n = if n <> 1 then Printf.bprintf os "s" - -// remove any newlines and tabs -let OutputException (os:System.Text.StringBuilder) exn (flattenErrors:bool) = - let buf = new System.Text.StringBuilder() - - OutputExceptionR buf exn - - let s = if flattenErrors then buf.ToString().Replace('\n',' ').Replace('\t',' ') else buf.ToString() - - os.Append(s) |> ignore - - -type ErrorStyle = - | DefaultErrors - | EmacsErrors - | TestErrors - | VSErrors - -let SanitizeFileName fileName implicitIncludeDir = - // The assert below is almost ok, but it fires in two cases: - // - fsi.exe sometimes passes "stdin" as a dummy filename - // - if you have a #line directive, e.g. - // # 1000 "Line01.fs" - // then it also asserts. But these are edge cases that can be fixed later, e.g. in bug 4651. - //System.Diagnostics.Debug.Assert(System.IO.Path.IsPathRooted(fileName), sprintf "filename should be absolute: '%s'" fileName) - let fullPath = System.IO.Path.GetFullPath(fileName) - let currentDir = implicitIncludeDir - - // if the file name is not rooted in the current directory, return the full path - if not(fullPath.StartsWith(currentDir)) then - fullPath - // if the file name is rooted in the current directory, return the relative path - else - fullPath.Replace(currentDir^"\\","") - -(* used by fsc.exe and fsi.exe, but not by VS *) -let rec OutputErrorOrWarning (implicitIncludeDir,showFullPaths,flattenErrors,errorStyle,warn) os (err:exn) = - let output_where (showFullPaths,errorStyle) exn os m = - if m = rangeStartup || m = rangeCmdArgs then () - else - let file = file_of_range m - let file = if showFullPaths then - Filename.fullpath implicitIncludeDir file - else - SanitizeFileName file implicitIncludeDir - match errorStyle with - | ErrorStyle.EmacsErrors -> Printf.bprintf os "File \"%s\", line %d, characters %d-%d: " (file.Replace("\\","/")) (start_line_of_range m) (start_col_of_range m) (end_col_of_range m) - // We're adjusting the columns here to be 1-based - both for parity with C# and for MSBuild, which assumes 1-based columns for error output - | ErrorStyle.DefaultErrors -> Printf.bprintf os "%s(%d,%d): " (file.Replace("/","\\")) (start_line_of_range m) ((start_col_of_range m) + 1) - // We may also want to change TestErrors to be 1-based - | ErrorStyle.TestErrors -> Printf.bprintf os "%s(%d,%d-%d,%d): " (file.Replace("/","\\")) (start_line_of_range m) ((start_col_of_range m) + 1) (end_line_of_range m) ((end_col_of_range m) + 1) - // Here, we want the complete range information so Project Systems can generate proper squiggles - | ErrorStyle.VSErrors -> Printf.bprintf os "%s(%d,%d,%d,%d): " (file.Replace("/","\\")) (start_line_of_range m) ((start_col_of_range m) + 1) (end_line_of_range m) ((end_col_of_range m) + 1) - - - match err with - | ReportedError -> - dprintf "Unexpected ReportedError" (* this should actually never happen *) - | StopProcessing -> - dprintf "Unexpected StopProcessing" (* this should actually never happen *) - | _ -> - Printf.bprintf os "\n"; - match RangeOfError err with - | Some m -> output_where (showFullPaths,errorStyle) err os m - | None -> () - - Printf.bprintf os "%s FS%04d: " (if warn then "warning" else "error") (GetErrorNumber err); - let mainError,relatedErrors = SplitRelatedErrors err - OutputException os mainError flattenErrors; - List.iter (fun err -> Printf.bprintf os "\n"; OutputException os err flattenErrors) relatedErrors - -let OutputErrorOrWarningContext prefix fileLineFn os (err:exn) = - match RangeOfError err with - | None -> () - | Some m -> - let filename = file_of_range m - let lineA = start_line_of_range m - let lineB = end_line_of_range m - let line = fileLineFn filename lineA - if line<>"" then - let iA = start_col_of_range m - let iB = end_col_of_range m - let iLen = if lineA = lineB then max (iB - iA) 1 else 1 - Printf.bprintf os "%s%s\n" prefix line; - Printf.bprintf os "%s%s%s\n" prefix (String.make iA '-') (String.make iLen '^') - - - -//---------------------------------------------------------------------------- - -let coreFramework = - [ "System"; - "System.Xml" ] - -let extendedFramework = - [ "System.Runtime.Remoting"; - "System.Runtime.Serialization.Formatters.Soap"; - "System.Data"; - "System.Drawing"; - "System.Web"; - "System.Web.Services"; - "System.Windows.Forms"; ] - -let GetFSharpCoreLibraryName () = "FSharp.Core" -let GetFSharpPowerPackLibraryName () = "FSharp.PowerPack" -let fsiaux () = "FSharp.Compiler.Interactive.Settings" -let fsiAuxSettingsModulePath = "Microsoft.FSharp.Compiler.Interactive.Settings" -let scriptingFramework = coreFramework @ extendedFramework @ ["FSharp.Compiler.Interactive.Settings"] - -let (++) x s = x @ [s] - -/// Determine the default "frameworkVersion" (which is passed into MSBuild resolve). -/// If this binary was built for v4, the return "v4.0" -/// If this binary was built for v2, the return "v3.5", "v3.5" or "v2.0" depending on what is installed. -/// -/// See: Detecting which versions of the .NET framework are installed. -/// http://blogs.msdn.com/aaronru/archive/2007/11/26/net-framework-3-5-rtm-detection-logic.aspx -/// See: bug 4409. -open Microsoft.Win32 -let highestInstalledNetFrameworkVersionMajorMinor() = -#if FX_ATLEAST_40 - 4,"v4.0" -#else - try - let net35 = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5","Install",null) = box 1 - let net30 = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0","Install",null) = box 1 - let net20 = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727","Install",null) = box 1 - if net35 then 2,"v3.5" - elif net30 then 2,"v3.0" - else 2,"v2.0" // version is 2.0 assumed since this code is running. - // the above calls to Registry.GetValue could potentially fail - especially on platforms like Mono - with e -> warning(Error("Could not determine highest installed .NET framework version from Registry keys, using version 2.0",rangeStartup)); 2,"v2.0" -#endif - -//---------------------------------------------------------------------------- -// General file name resolver -//-------------------------------------------------------------------------- - -let TryResolveFileUsingPaths(paths,m,name) = - let () = - try Path.IsPathRooted(name) |> ignore - with :? System.ArgumentException as e -> error(Error(e.Message,m)) - if Path.IsPathRooted(name) && Internal.Utilities.FileSystem.File.SafeExists name - then name - else - let res = paths |> List.tryPick (fun path -> - let n = Filename.concat path name - if Internal.Utilities.FileSystem.File.SafeExists n then Some n - else None) - match res with - | Some f -> f - | None -> - let filename = name - let searchMessage = String.concat "\n " paths - raise (FileNameNotResolved(name,searchMessage,m)) - - - -let GetWarningNumber(m,s:string) = - try - Some (int32 s) - with err -> - warning(Error("invalid warning number: '"^s^"'",m)); - None - -let ComputeMakePathAbsolute implicitIncludeDir (path : string) = - try - // remove any quotation marks from the path first - let path = path.Replace("\"","") - if not (Path.IsPathRooted(path)) - then Filename.concat implicitIncludeDir path - else path - with - :? System.ArgumentException -> path - - -//---------------------------------------------------------------------------- -// Configuration -//-------------------------------------------------------------------------- - - -/// Determins whether a path is invalid or not. -let IsInvalidPath (path : string) = - String.IsNullOrEmpty(path) || - path.IndexOfAny(Path.GetInvalidPathChars()) <> -1 - -type target = - | WinExe - | ConsoleExe - | Dll - | Module - member x.IsExe = (match x with ConsoleExe | WinExe -> true | _ -> false) - -type ResolveLibFileMode = Speculative | ReportErrors - -type VersionFlag = - | VersionString of string - | VersionFile of string - | VersionNone - member x.GetVersionInfo(implicitIncludeDir) = - let vstr = x.GetVersionString(implicitIncludeDir) - try - IL.parse_version vstr - with _ -> errorR(Error("Invalid version string '"^vstr^"'",rangeStartup)) ; IL.parse_version "0.0.0.0" - - member x.GetVersionString(implicitIncludeDir) = - match x with - | VersionString s -> s - | VersionFile s -> - let s = if Path.IsPathRooted(s) then s else Path.Combine(implicitIncludeDir,s) - if not(Internal.Utilities.FileSystem.File.SafeExists(s)) then - errorR(Error("Invalid version file '"^s^"'",rangeStartup)) ; "0.0.0.0" - else - use is = System.IO.File.OpenText s - is.ReadLine() - | VersionNone -> "0.0.0.0" - - -type AssemblyReference = - | AssemblyReference of range * string - member x.Range = (let (AssemblyReference(m,_)) = x in m) - member x.Text = (let (AssemblyReference(_,text)) = x in text) - member x.SimpleAssemblyNameIs(name) = - (String.Compare(Path.GetFileNameWithoutExtension(x.Text), name, StringComparison.OrdinalIgnoreCase) = 0) || - (let text = x.Text.ToLowerInvariant() - not (text.Contains "/") && not (text.Contains "\\") && not (text.Contains ".dll") && not (text.Contains ".exe") && - try let aname = System.Reflection.AssemblyName(x.Text) in aname.Name = name - with _ -> false) - -type TcConfigBuilder = - { mutable mscorlibAssemblyName : string; - mutable autoResolveOpenDirectivesToDlls: bool; - mutable noFeedback: bool; - mutable implicitIncludeDir: string; (* normally "." *) - mutable openBinariesInMemory: bool; (* false for command line, true for VS *) - mutable openDebugInformationForLaterStaticLinking: bool; (* only for --standalone *) - defaultFSharpBinariesDir: string; - mutable compilingFslib: bool; - mutable useIncrementalBuilder: bool; - mutable includes: string list; - mutable implicitOpens: string list; - mutable useFsiAuxLib: bool; - mutable framework: bool; - mutable resolutionEnvironment : ResolutionEnvironment - mutable implicitlyResolveAssemblies: bool; - mutable light: bool option; - mutable conditionalCompilationDefines: string list; - mutable loadedSources: (range * string) list; - mutable referencedDLLs : AssemblyReference list; - optimizeForMemory: bool; - mutable inputCodePage: int option; - mutable embedResources : string list; - mutable globalWarnAsError: bool; - mutable globalWarnLevel: int; - mutable specificWarnOff: int list; - mutable specificWarnAsError: int list - mutable mlCompatibility: bool; - mutable checkOverflow: bool; - mutable showReferenceResolutions:bool; - mutable outputFile : string option; - mutable resolutionFrameworkRegistryBase : string; - mutable resolutionAssemblyFoldersSuffix : string; - mutable resolutionAssemblyFoldersConditions : string; - mutable platform : ILPlatform option; - mutable useMonoResolution : bool - mutable target : target - mutable debuginfo : bool - mutable debugSymbolFile : string option - (* Backend configuration *) - mutable typeCheckOnly : bool - mutable parseOnly : bool - mutable simulateException : string option - mutable printAst : bool - mutable tokenizeOnly : bool - mutable testInteractionParser : bool - mutable reportNumDecls : bool - mutable printSignature : bool - mutable printSignatureFile : string - mutable xmlDocOutputFile : string option - mutable generateHtmlDocs : bool - mutable htmlDocDirectory : string option - mutable htmlDocCssFile : string option - mutable htmlDocNamespaceFile : string option - mutable htmlDocAppendFlag : bool - mutable htmlDocLocalLinks : bool (* Do not do absolute links for fslib/mllib references *) - mutable stats : bool - mutable generateFilterBlocks : bool (* don't generate filter blocks due to bugs on Mono *) - - mutable signer : string option - mutable container : string option - - mutable delaysign : bool - mutable version : VersionFlag - mutable standalone : bool - mutable extraStaticLinkRoots : string list - mutable noSignatureData : bool - mutable onlyEssentialOptimizationData : bool - mutable useOptimizationDataFile : bool - mutable jitTracking : bool - mutable ignoreSymbolStoreSequencePoints : bool - mutable internConstantStrings : bool - mutable generateConfigFile : bool - mutable extraOptimizationIterations : int - - mutable win32res : string - mutable win32manifest : string - mutable includewin32manifest : bool - mutable linkResources : string list - - - mutable showFullPaths : bool - mutable errorStyle : ErrorStyle - mutable utf8output : bool - mutable flatErrors: bool - - mutable maxErrors : int - mutable abortOnError : bool (* intended for fsi scripts that should exit on first error *) - mutable baseAddress : int32 option - #if DEBUG - mutable writeGeneratedILFiles : bool (* write il files? *) - mutable showOptimizationData : bool -#endif - mutable showTerms : bool (* show terms between passes? *) - mutable writeTermsToFiles : bool (* show terms to files? *) - mutable doDetuple : bool (* run detuple pass? *) - mutable doTLR : bool (* run TLR pass? - not by default *) - mutable optsOn : bool (* optimizations are turned on *) - mutable optSettings : Opt.OptimizationSettings - - mutable product : string - /// show the MS (c) notice, e.g. with help or fsi? - mutable showBanner : bool - - /// show times between passes? - mutable showTimes : bool - - /// pause between passes? - mutable pause : bool - } - - - static member CreateNew (defaultFSharpBinariesDir,optimizeForMemory,implicitIncludeDir) = - System.Diagnostics.Debug.Assert(Path.IsPathRooted(implicitIncludeDir), sprintf "implicitIncludeDir should be absolute: '%s'" implicitIncludeDir) - if (String.IsNullOrEmpty(defaultFSharpBinariesDir)) then - failwith "Expected a valid defaultFSharpBinariesDir" - { mscorlibAssemblyName = "mscorlib"; - light = None; - noFeedback=false; - conditionalCompilationDefines=[]; - implicitIncludeDir = implicitIncludeDir; - autoResolveOpenDirectivesToDlls = false; - openBinariesInMemory = false; - openDebugInformationForLaterStaticLinking=false; - defaultFSharpBinariesDir=defaultFSharpBinariesDir; - compilingFslib=false; - useIncrementalBuilder=false; - useFsiAuxLib=false; - implicitOpens=[]; - includes=[]; - resolutionEnvironment=MSBuildResolver.CompileTimeLike - framework=true; - implicitlyResolveAssemblies=true; - referencedDLLs = []; - loadedSources = []; - globalWarnAsError=false; - globalWarnLevel=3; - specificWarnOff=[]; - specificWarnAsError=[] - embedResources = []; - inputCodePage=None; - optimizeForMemory=optimizeForMemory; - mlCompatibility=false; - checkOverflow=false; - showReferenceResolutions=false; - outputFile=None; - resolutionFrameworkRegistryBase = "Software\Microsoft\.NetFramework"; - resolutionAssemblyFoldersSuffix = "AssemblyFoldersEx"; - resolutionAssemblyFoldersConditions = ""; - platform = None; - useMonoResolution = runningOnMono - target = ConsoleExe - debuginfo = false - debugSymbolFile = None - - (* Backend configuration *) - typeCheckOnly = false - parseOnly = false - simulateException = None - printAst = false - tokenizeOnly = false - testInteractionParser = false - reportNumDecls = false - printSignature = false - printSignatureFile = "" - xmlDocOutputFile = None - generateHtmlDocs = false - htmlDocDirectory = None - htmlDocCssFile = None - htmlDocNamespaceFile = None - htmlDocAppendFlag = false - htmlDocLocalLinks = false (* Do not do absolute links for fslib/mllib references *) - stats = false - generateFilterBlocks = false (* don't generate filter blocks due to bugs on Mono *) - - signer = None - container = None - maxErrors = 100 - abortOnError = false - baseAddress = None - - delaysign = false - version = VersionNone - standalone = false - extraStaticLinkRoots = [] - noSignatureData = false - onlyEssentialOptimizationData = false - useOptimizationDataFile = false - jitTracking = true - ignoreSymbolStoreSequencePoints = false - internConstantStrings = true - generateConfigFile = false - extraOptimizationIterations = 0 - - win32res = "" - win32manifest = "" - includewin32manifest = true - linkResources = [] - showFullPaths =false - errorStyle = ErrorStyle.DefaultErrors - utf8output = false - flatErrors = false - - #if DEBUG - writeGeneratedILFiles = false (* write il files? *) - showOptimizationData = false - #endif - showTerms = false - writeTermsToFiles = false - - doDetuple = false - doTLR = false - optsOn = false - optSettings = Opt.OptimizationSettings.Defaults - product = "Microsoft F# Compiler" - showBanner = true - showTimes = false - pause = false - } - /// Decide names of output file, pdb and assembly - member tcConfigB.DecideNames sourceFiles = - if sourceFiles = [] then errorR(Error("No inputs specified",rangeCmdArgs)); - let ext() = match tcConfigB.target with Dll -> ".dll" | Module -> ".netmodule" | ConsoleExe | WinExe -> ".exe" - let implFiles = sourceFiles |> List.filter (fun lower -> List.exists (Filename.check_suffix (String.lowercase lower)) implSuffixes) - let outfile = - match tcConfigB.outputFile, List.rev implFiles with - | None,[] -> "out" ^ ext() - | None, h :: _ -> - let basic = Path.GetFileName h - let modname = try Filename.chop_extension basic with _ -> basic - modname^(ext()) - | Some f,_ -> f - let assemblyName = - let baseName = Path.GetFileName outfile - if not (Filename.check_suffix (String.lowercase baseName) (ext())) then - errorR(Error("The output name extension doesn't match the flags used. If -a is used the output file name must end with .dll, if --target module is used the output extension must be .netmodule, otherwise .exe ",rangeCmdArgs)); - System.IO.Path.GetFileNameWithoutExtension baseName - - let pdbfile = - if tcConfigB.debuginfo then - Some (match tcConfigB.debugSymbolFile with None -> (Filename.chop_extension outfile)^"."^(Ilsupp.pdb_suffix_for_configuration (Ilsupp.current_configuration())) | Some f -> f) - elif (tcConfigB.debugSymbolFile <> None) && (not (tcConfigB.debuginfo)) then - error(Error("The --pdb option requires the --debug option to be used",rangeStartup)) - else None - tcConfigB.outputFile <- Some(outfile) - outfile,pdbfile,assemblyName - member tcConfigB.TurnWarningOff(m,s:string) = - match GetWarningNumber(m,s) with - | None -> () - | Some n -> - // nowarn 62 turns on mlCompatibility, e.g. shows ML compat items in intellisense menus - if n = 62 then tcConfigB.mlCompatibility <- true; - tcConfigB.specificWarnOff <- ListSet.insert (=) n tcConfigB.specificWarnOff - - member tcConfigB.AddIncludePath (m,path) = - let absolutePath = ComputeMakePathAbsolute tcConfigB.implicitIncludeDir path - let ok = - let existsOpt = - try Some(Directory.Exists(absolutePath)) - with e -> warning(Error("The search directory '"^path^"' is invalid",m)); None - match existsOpt with - | Some(exists) -> - if not exists then warning(Error("The search directory '"^absolutePath^"' could not be found",m)); - exists - | None -> false - if ok && not (List.mem absolutePath tcConfigB.includes) then - tcConfigB.includes <- tcConfigB.includes ++ absolutePath - - member tcConfigB.AddLoadedSource(m,path) = - if IsInvalidPath(path) then - warning(Error(Printf.sprintf "'%s' is not a valid filename" path,m)) - else - let path = ComputeMakePathAbsolute tcConfigB.implicitIncludeDir path - - if not (List.mem path (List.map snd tcConfigB.loadedSources)) then - tcConfigB.loadedSources <- tcConfigB.loadedSources ++ (m,path) - - - member tcConfigB.AddEmbeddedResource filename = - tcConfigB.embedResources <- tcConfigB.embedResources ++ filename - - member tcConfigB.AddReferencedAssemblyByPath (m,path) = - if IsInvalidPath(path) then - warning(Error(Printf.sprintf "'%s' is not a valid assembly name" path,m)) - elif not (List.mem (AssemblyReference(m,path)) tcConfigB.referencedDLLs) then // NOTE: We keep same paths if range is different. - tcConfigB.referencedDLLs <- tcConfigB.referencedDLLs ++ AssemblyReference(m,path) - - - static member SplitCommandLineResourceInfo ri = - if String.contains ri ',' then - let p = String.index ri ',' - let file = String.sub ri 0 p - let rest = String.sub ri (p+1) (String.length ri - p - 1) - if String.contains rest ',' then - let p = String.index rest ',' - let name = String.sub rest 0 p^".resources" - let pubpri = String.sub rest (p+1) (rest.Length - p - 1) - if pubpri = "public" then file,name,Resource_public - elif pubpri = "private" then file,name,Resource_private - else error(Error("unrecognized privacy setting "^pubpri^" for managed resource",rangeStartup)) - else - file,rest^".resources",Resource_public - else - ri,System.IO.Path.GetFileName(ri),Resource_public - - -let OpenILBinary(filename,optimizeForMemory,openBinariesInMemory,ilGlobalsOpt,pdbPathOption,mscorlibAssemblyName) = - let ilGlobals = - match ilGlobalsOpt with - | None -> IL.mk_ILGlobals ScopeRef_local (Some mscorlibAssemblyName) - | Some ilGlobals -> ilGlobals - let opts = { Ilread.defaults with - Ilread.ilGlobals=ilGlobals; - // fsc.exe does not uses optimizeForMemory (hence keeps MORE caches in AbstractIL) - // fsi.exe does use optimizeForMemory (hence keeps FEWER caches in AbstractIL), because its long running - // Visual Studio does use optimizeForMemory (hence keeps FEWER caches in AbstractIL), because its long running - Ilread.optimizeForMemory=optimizeForMemory; - Ilread.pdbPath = pdbPathOption; } - - // Visual Studio uses OpenILModuleReaderAfterReadingAllBytes for all DLLs to avoid having to dispose of any readers explicitly - if openBinariesInMemory // && not syslib - then Ilread.OpenILModuleReaderAfterReadingAllBytes filename opts - else Ilread.OpenILModuleReader filename opts - -#if DEBUG -[] -#endif -type AssemblyResolution = - { originalReference : AssemblyReference - resolvedPath : string - resolvedFrom : ResolvedFrom - fusionName : string - fusionVersion : string - redist : string - sysdir : bool - } - member private this.ResolvedPath = this.resolvedPath - static member Default = - {originalReference = AssemblyReference(range0, null); resolvedPath = null; resolvedFrom = Unknown; fusionName = null; fusionVersion = null; redist = null; sysdir = false} - -type UnresolvedReference = UnresolvedReference of string * AssemblyReference list - -let highestInstalledFrameworkVersion = highestInstalledNetFrameworkVersionMajorMinor() - -[] -/// This type is immutable and must be kept as such. Do not extract or mutate the underlying data except by cloning it. -type TcConfig(data : TcConfigBuilder,validate:bool) = - // Validate the inputs - this helps ensure errors in options are shown in visual studio rather than only when built - // However we only validate a minimal number of options at the moment - do if validate then try data.version.GetVersionInfo(data.implicitIncludeDir) |> ignore with e -> errorR(e) - - // clone the input builder to ensure nobody messes with it. - let data = { data with pause = data.pause } - - /// A closed set of assemblies where, for any subset S: - /// - the TcImports object built for S (and thus the F# Compiler CCUs for the assemblies in S) - /// is a resource that can be shared between any two IncrementalBuild objects that reference - /// precisely S - let systemAssemblies = - [data.mscorlibAssemblyName] @ [GetFSharpCoreLibraryName()] @ coreFramework @ extendedFramework @ ["System.Core"] - - let computeKnownDllReference(referencedDLLs:AssemblyReference list, libraryName, pathOpt) = - let defaultCoreLibraryReference = AssemblyReference(rangeStartup,(match pathOpt with Some p -> Filename.concat p libraryName | None -> libraryName)^".dll") - match data.referencedDLLs |> List.filter(fun assemblyReference -> assemblyReference.SimpleAssemblyNameIs libraryName) with - | [AssemblyReference(m,f) as r] -> - let filename = ComputeMakePathAbsolute data.implicitIncludeDir f - if Internal.Utilities.FileSystem.File.SafeExists(filename) then - r,true - else - // If the file doesn't exist, let reference resolution logic report the error later... - defaultCoreLibraryReference, false - | [] -> - defaultCoreLibraryReference, false - | _ -> error(Error(sprintf "Multiple references to %s.dll are not permitted" libraryName,rangeCmdArgs)) - - // Look for an explicit reference to mscorlib and use that to compute clrRoot and targetFrameworkVersion - let mscorlibReference,isMscorlibExplicit = computeKnownDllReference(data.referencedDLLs,data.mscorlibAssemblyName,None) - let fslibReference,isFslibExplicit = computeKnownDllReference(data.referencedDLLs,GetFSharpCoreLibraryName(),Some(data.defaultFSharpBinariesDir)) - - let clrRootValue,(mscorlibMajorVersion,targetFrameworkVersionValue) = - if isMscorlibExplicit then - let filename = ComputeMakePathAbsolute data.implicitIncludeDir mscorlibReference.Text - try - - let ilReader = OpenILBinary(filename,data.optimizeForMemory,data.openBinariesInMemory,None,None,data.mscorlibAssemblyName) - try - let ilModule = ilReader.ILModuleDef - match ilModule.ManifestOfAssembly.Version with - | Some(v1,v2,_,_) -> - if v1 = 1us then - warning(Error(sprintf "The file '%s' is a CLI 1.x version of mscorlib. F# requires CLI version 2.0 or greater" filename,rangeStartup)) - let clrRoot = Some(Path.GetDirectoryName(Path.GetFullPath(filename))) - clrRoot, (int v1, sprintf "v%d.%d" v1 v2) - | _ -> - failwith "could not read version from mscorlib.dll" - finally - Ilread.CloseILModuleReader ilReader - with _ -> - error(Error(sprintf "Unable to read assembly '%s'" filename,rangeStartup)) - else - None, highestInstalledFrameworkVersion - - // Check that the referenced version of FSharp.COre.dll matches the referenced version of mscorlib.dll - let checkFSharpBinaryCompatWithMscorlib filename (ilAssemblyRefs: ILAssemblyRef list) m = - match ilAssemblyRefs |> List.tryFind (fun aref -> aref.Name = data.mscorlibAssemblyName) with - | Some aref when - (match aref.Version with - | Some(v1,_,_,_) -> ((v1 < 4us) <> (mscorlibMajorVersion < 4)) - | _ -> false) -> - warning(Error(sprintf "The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced F# core library '%s'. Consider recompiling the library or making an explicit reference to a version of this library that matches the CLI version you are using" filename,m)) - | _ -> - () - - // Look for an explicit reference to FSharp.Core and use that to compute fsharpBinariesDir - let fsharpBinariesDirValue = - if isFslibExplicit then - let filename = ComputeMakePathAbsolute data.implicitIncludeDir fslibReference.Text - try - let ilReader = OpenILBinary(filename,data.optimizeForMemory,data.openBinariesInMemory,None,None,data.mscorlibAssemblyName) - try - checkFSharpBinaryCompatWithMscorlib filename ilReader.ILAssemblyRefs rangeStartup; - let fslibRoot = Path.GetDirectoryName(Path.GetFullPath(filename)) - fslibRoot (* , sprintf "v%d.%d" v1 v2 *) - finally - Ilread.CloseILModuleReader ilReader - with _ -> - error(Error(sprintf "Unable to read assembly '%s'" filename,rangeStartup)) - else - data.defaultFSharpBinariesDir - - - - member x.mscorlibAssemblyName = data.mscorlibAssemblyName - member x.autoResolveOpenDirectivesToDlls = data.autoResolveOpenDirectivesToDlls - member x.noFeedback = data.noFeedback - member x.implicitIncludeDir = data.implicitIncludeDir - member x.openBinariesInMemory = data.openBinariesInMemory - member x.openDebugInformationForLaterStaticLinking = data.openDebugInformationForLaterStaticLinking - member x.fsharpBinariesDir = fsharpBinariesDirValue - member x.compilingFslib = data.compilingFslib - member x.useIncrementalBuilder = data.useIncrementalBuilder - member x.includes = data.includes - member x.implicitOpens = data.implicitOpens - member x.useFsiAuxLib = data.useFsiAuxLib - member x.framework = data.framework - member x.implicitlyResolveAssemblies = data.implicitlyResolveAssemblies - member x.resolutionEnvironment = data.resolutionEnvironment - member x.light = data.light - member x.conditionalCompilationDefines = data.conditionalCompilationDefines - member x.loadedSources = data.loadedSources - member x.referencedDLLs = data.referencedDLLs - member x.clrRoot = clrRootValue - member x.optimizeForMemory = data.optimizeForMemory - member x.inputCodePage = data.inputCodePage - member x.embedResources = data.embedResources - member x.globalWarnAsError = data.globalWarnAsError - member x.globalWarnLevel = data.globalWarnLevel - member x.specificWarnOff = data. specificWarnOff - member x.specificWarnAsError = data.specificWarnAsError - member x.mlCompatibility = data.mlCompatibility - member x.checkOverflow = data.checkOverflow - member x.showReferenceResolutions = data.showReferenceResolutions - member x.outputFile = data.outputFile - member x.resolutionFrameworkRegistryBase = data.resolutionFrameworkRegistryBase - member x.resolutionAssemblyFoldersSuffix = data. resolutionAssemblyFoldersSuffix - member x.resolutionAssemblyFoldersConditions = data. resolutionAssemblyFoldersConditions - member x.platform = data.platform - member x.useMonoResolution = data.useMonoResolution - member x.target = data.target - member x.debuginfo = data.debuginfo - member x.debugSymbolFile = data.debugSymbolFile - member x.typeCheckOnly = data.typeCheckOnly - member x.parseOnly = data.parseOnly - member x.simulateException = data.simulateException - member x.printAst = data.printAst - member x.targetFrameworkVersionMajorMinor = targetFrameworkVersionValue - member x.tokenizeOnly = data.tokenizeOnly - member x.testInteractionParser = data.testInteractionParser - member x.reportNumDecls = data.reportNumDecls - member x.printSignature = data.printSignature - member x.printSignatureFile = data.printSignatureFile - member x.xmlDocOutputFile = data.xmlDocOutputFile - member x.generateHtmlDocs = data.generateHtmlDocs - member x.htmlDocDirectory = match data.htmlDocDirectory with | None -> None | Some(x) -> Some(if System.IO.Path.IsPathRooted(x) then x else System.IO.Path.Combine(data.implicitIncludeDir, x)) - member x.htmlDocCssFile = data.htmlDocCssFile - member x.htmlDocNamespaceFile = data.htmlDocNamespaceFile - member x.htmlDocAppendFlag = data.htmlDocAppendFlag - member x.htmlDocLocalLinks = data.htmlDocLocalLinks - member x.stats = data.stats - member x.generateFilterBlocks = data.generateFilterBlocks - member x.signer = data.signer - member x.container = data.container - member x.delaysign = data.delaysign - member x.version = data.version - member x.standalone = data.standalone - member x.extraStaticLinkRoots = data.extraStaticLinkRoots - member x.noSignatureData = data.noSignatureData - member x.onlyEssentialOptimizationData = data.onlyEssentialOptimizationData - member x.useOptimizationDataFile = data.useOptimizationDataFile - member x.jitTracking = data.jitTracking - member x.ignoreSymbolStoreSequencePoints = data.ignoreSymbolStoreSequencePoints - member x.internConstantStrings = data.internConstantStrings - member x.generateConfigFile = data.generateConfigFile - member x.extraOptimizationIterations = data.extraOptimizationIterations - member x.win32res = data.win32res - member x.win32manifest = data.win32manifest - member x.includewin32manifest = data.includewin32manifest - member x.linkResources = data.linkResources - member x.showFullPaths = data.showFullPaths - member x.errorStyle = data.errorStyle - member x.utf8output = data.utf8output - member x.flatErrors = data.flatErrors - member x.maxErrors = data.maxErrors - member x.baseAddress = data.baseAddress - #if DEBUG - member x.writeGeneratedILFiles = data.writeGeneratedILFiles - member x.showOptimizationData = data.showOptimizationData -#endif - member x.showTerms = data.showTerms - member x.writeTermsToFiles = data.writeTermsToFiles - member x.doDetuple = data.doDetuple - member x.doTLR = data.doTLR - member x.optSettings = data.optSettings - member x.optsOn = data.optsOn - member x.product = data.product - member x.showBanner = data.showBanner - member x.showTimes = data.showTimes - member x.pause = data.pause - - static member Create(builder,validate) = TcConfig(builder,validate) - - member tcConfig.CloneOfOriginalBuilder = - { data with conditionalCompilationDefines=data.conditionalCompilationDefines } - - member tcConfig.ComputeCanContainEntryPoint(sourceFiles:string list) = - let n = sourceFiles.Length in - sourceFiles |> List.mapi (fun i nm -> (i=n-1) && tcConfig.target.IsExe) - - // This call can fail if no CLR is found (this is the path to mscorlib) - member tcConfig.ClrRoot = - match tcConfig.clrRoot with - | Some x -> - [tcConfig.MakePathAbsolute x] - | None -> - // When running on Mono we lead everyone to believe we're doing .NET 2.0 compilation - // by default. - if runningOnMono then - let mono10SysDir = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() - assert(mono10SysDir.EndsWith("1.0",StringComparison.Ordinal)); - let mono20SysDir = Path.Combine(Path.GetDirectoryName mono10SysDir, "2.0") - let mono21SysDir = Path.Combine(Path.GetDirectoryName mono10SysDir, "2.1") - if Directory.Exists(mono20SysDir) then - if Directory.Exists(mono21SysDir) then - [mono21SysDir;mono20SysDir] - else - [mono20SysDir] - else [mono10SysDir] - else - try [System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()] - with e -> errorRecovery e range0; [] - - member tcConfig.ComputeLightSyntaxInitialStatus filename = - let lower = String.lowercase filename - let lightOnByDefault = List.exists (Filename.check_suffix lower) lightSyntaxDefaultExtensions - if lightOnByDefault then (tcConfig.light <> Some(false)) else (tcConfig.light = Some(true) ) - - member tcConfig.ComputeSyntaxFlagRequired filename = - let lower = String.lowercase filename - List.exists (Filename.check_suffix lower) syntaxFlagRequiredExtensions - - member tcConfig.GetAvailableLoadedSources() = - let ResolveLoadedSource (m,path) = - try - let path = tcConfig.MakePathAbsolute path - if not(Internal.Utilities.FileSystem.File.SafeExists(path)) then - error(LoadedSourceNotFoundIgnoring(path,m)) - None - else Some(m,path) - with e -> errorRecovery e m; None - - tcConfig.loadedSources |> List.map ResolveLoadedSource |> List.filter Option.is_some |> List.map Option.get - - - /// Return true if this is an installed system memory that is allowed to be locked or placed into the - /// 'framework' reference set that is potentially shared across multiple compilations. - member tcConfig.IsSystemAssembly (filename:string) = - try - Internal.Utilities.FileSystem.File.SafeExists(filename) && - (let baseFilename = Path.GetFileNameWithoutExtension(filename) - systemAssemblies |> List.exists(fun s->s=baseFilename)) - with e -> - false - - - // This is not the complete set of search paths, it is just the set that is special to F# (as compared to MSBuild resolution) - member tcConfig.SearchPathsForLibraryFiles = - (tcConfig.ClrRoot @ - List.map (tcConfig.MakePathAbsolute) tcConfig.includes ++ - tcConfig.implicitIncludeDir ++ - tcConfig.fsharpBinariesDir) - - member tcConfig.SearchPathsForSourceFiles = - List.map (tcConfig.MakePathAbsolute) tcConfig.includes ++ - tcConfig.implicitIncludeDir - - member tcConfig.MakePathAbsolute path = - let result = ComputeMakePathAbsolute tcConfig.implicitIncludeDir path -#if TRACK_DOWN_EXTRA_BACKSLASHES - System.Diagnostics.Debug.Assert(not(result.Contains(@"\\")), "tcConfig.MakePathAbsolute results in a non-canonical filename with extra backslashes: "^result) -#endif - result - - member tcConfig.ResolveLibWithDirectories (AssemblyReference (m,nm) as r) = - let resolved = TryResolveFileUsingPaths(tcConfig.SearchPathsForLibraryFiles,m,nm) - let sysdir = tcConfig.IsSystemAssembly resolved - {AssemblyResolution.Default with originalReference=r;resolvedPath=resolved;resolvedFrom=Unknown;sysdir=sysdir} - - member tcConfig.ResolveSourceFile (m,nm) = - TryResolveFileUsingPaths(tcConfig.SearchPathsForSourceFiles,m,nm) - - member tcConfig.CheckFSharpBinary (filename,ilAssemblyRefs,m) = - checkFSharpBinaryCompatWithMscorlib filename ilAssemblyRefs m - - // NOTE!! if mode=Speculative then this method must not report ANY warnings or errors through 'warning' or 'error'. Instead - // it must return warnings and errors as data - // - // NOTE!! if mode=ReportErrors then this method must not raise exceptions. It must just report the errors and recover - static member TryResolveLibsUsingMSBuildRules (tcConfig:TcConfig,originalReferences:AssemblyReference list, errorAndWarningRange:range, mode:ResolveLibFileMode) : AssemblyResolution list * UnresolvedReference list = - use t = Trace.Call("Build","TryResolveLibsUsingMSBuildRules", fun _->sprintf "Original references %A" originalReferences) - - if tcConfig.useMonoResolution then - failwith "MSBuild resolution is not supported." - - if originalReferences=[] then [],[] - else - // Group references by name with range values in the grouped value list. - let groupedReferences = - originalReferences - |> Seq.group_by(fun r -> r.Text) - |> Seq.map(fun (name,s)->name,s |> List.of_seq) - |> Array.of_seq - - // Check whether the given file is a .NET assembly. - // Related to Dev10 515444. GetAssemblyName called by MSBuild's ResolveAssemblyReference - // will throw a ExecutionEngineException if things like notepad.exe. Attempt to prefilter - // non->NET assemblies by cracking the PE header and looking at the section (RVA) that points - // to managed code. - let IsNetAssembly file = - try - use fs = new FileStream(file, FileMode.Open, FileAccess.Read) - use reader = new BinaryReader(fs) - fs.Position <- 060L // Jump to PE Header - let header = reader.ReadUInt32() // Read the header position - fs.Position <- int64 header - let magic = reader.ReadUInt16() // the magic number lets us know if we're dealing with a 32 or 64-bit header - fs.Position <- int64 (header + (if magic = 0x020Bus then 248u else 232u)) // Jump to RVA - let rva14 = reader.ReadUInt32() - (rva14<>0u) - with - | :? System.UnauthorizedAccessException -> false - | :? System.IO.EndOfStreamException -> false - | :? System.ArgumentOutOfRangeException -> false - | :? System.IO.IOException -> false - - let IsNotFileOrIsAssembly file = - let file = if Path.IsPathRooted(file) then file else Path.Combine(tcConfig.implicitIncludeDir, file) - not(Internal.Utilities.FileSystem.File.SafeExists(file)) || IsNetAssembly(file) - - let logmessage showMessages = - if showMessages && tcConfig.showReferenceResolutions then (fun (message:string)->dprintf "%s\n" message) - else (fun message->()) - let logwarning showMessages = - (fun code message-> - if showMessages && mode = ReportErrors then - match code with - | "MSB3106" -> - // These are warnings that mean 'not resolved' for some assembly. - // Note that we don't get to know the name of the assembly that couldn't be resolved. - // Ignore these and rely on the logic below to emit an error for each unresolved reference. - () - | _ -> - (if code = "MSB3245" then errorR else warning) - (MSBuildReferenceResolutionWarning(code,message,errorAndWarningRange))) - let logerror showMessages = - (fun code message -> - if showMessages && mode = ReportErrors then - errorR(MSBuildReferenceResolutionError(code,message,errorAndWarningRange))) - - let targetFrameworkMajorMinor = tcConfig.targetFrameworkVersionMajorMinor - -#if DEBUG - assert( Set.contains targetFrameworkMajorMinor (set ["v2.0";"v3.0";"v3.5";"v4.0"]) ) // Resolve is flexible, but pinning down targetFrameworkMajorMinor. -#endif - - let targetProcessorArchitecture = - match tcConfig.platform with - | None -> "" // msil - | Some(X86) -> "x86" - | Some(AMD64) -> "amd64" - | Some(IA64) -> "ia64" - let outputDirectory = - match tcConfig.outputFile with - | Some(outputFile) -> tcConfig.MakePathAbsolute outputFile - | None -> tcConfig.implicitIncludeDir - let targetFrameworkDirectories = - match tcConfig.clrRoot with - | Some(clrRoot) -> [tcConfig.MakePathAbsolute clrRoot] - | None -> [] - - let references = [|0..groupedReferences.Length-1|] - |> Array.map(fun i->(fst groupedReferences.[i]),(string)i) - |> Array.filter(fst >> IsNotFileOrIsAssembly) - - let Resolve(references,showMessages) = - try - MSBuildResolver.Resolve - (tcConfig.resolutionEnvironment, - references, - targetFrameworkMajorMinor, // TargetFrameworkVersionMajorMinor - targetFrameworkDirectories, // TargetFrameworkDirectories - targetProcessorArchitecture, // TargetProcessorArchitecture - Path.GetDirectoryName(outputDirectory), // Output directory - tcConfig.fsharpBinariesDir, // FSharp binaries directory - tcConfig.includes, // Explicit include directories - tcConfig.implicitIncludeDir, // Implicit include directory (likely the project directory) - tcConfig.resolutionFrameworkRegistryBase, - tcConfig.resolutionAssemblyFoldersSuffix, - tcConfig.resolutionAssemblyFoldersConditions, - logmessage showMessages, logwarning showMessages, logerror showMessages) - with - MSBuildResolver.ResolutionFailure -> error(Error("Assembly resolution failure at or near this location",errorAndWarningRange)) - - let resolutions = Resolve(references,(*showMessages*)true) - - let resultingResolutions = - resolutions.resolvedFiles - |> Array.map(fun resolvedFile -> - let i = (int)(resolvedFile.baggage) - let original,ms = groupedReferences.[i] - ms|>List.map(fun originalReference-> - System.Diagnostics.Debug.Assert(System.IO.Path.IsPathRooted(resolvedFile.itemSpec), sprintf "msbuild-resolved path is not absolute: '%s'" resolvedFile.itemSpec) - let canonicalItemSpec = System.IO.Path.GetFullPath(resolvedFile.itemSpec) - {originalReference=originalReference; - resolvedPath=canonicalItemSpec; - resolvedFrom=resolvedFile.resolvedFrom; - fusionName=resolvedFile.fusionName; - fusionVersion=resolvedFile.version; - redist=resolvedFile.redist; - sysdir=tcConfig.IsSystemAssembly canonicalItemSpec})) - |> List.of_array - |> List.flatten - - // O(N^2) here over a small set of referenced assemblies. - let IsResolved(originalName:string) = - if resultingResolutions |> List.exists(fun resolution -> resolution.originalReference.Text = originalName) then true - else - // MSBuild resolution may have unified the result of two duplicate references. Try to re-resolve now. - // If re-resolution worked then this was a removed duplicate. - Resolve([|originalName,""|],(*showMessages*)false).resolvedFiles.Length<>0 - - let unresolvedReferences = - groupedReferences - //|> Array.filter(fst >> IsNotFileOrIsAssembly) - |> Array.filter(fst >> IsResolved >> not) - |> List.of_array - - // Report that an assembly was not resolved. - let ReportAssemblyNotResolved(file,originalReferences:AssemblyReference list) = - Trace.PrintLine("Build", fun () -> sprintf "Reporting error about assembly not found: %s" file) - originalReferences |> List.iter(fun originalReference -> errorR(AssemblyNotResolved(file,originalReference.Range))) - - // Search for original references that are not in the resolved set and issue errors for them - if mode = ReportErrors then - unresolvedReferences |> List.iter(ReportAssemblyNotResolved) - - // If mode=Speculative, then we haven't reported any errors. - // We report the error condition by returning an empty list of resolutions - if mode = Speculative && (originalReferences |> List.exists(fun r -> not (IsResolved r.Text))) then - [],(List.of_array groupedReferences) |> List.map UnresolvedReference - else - resultingResolutions,unresolvedReferences |> List.map UnresolvedReference - - - member tcConfig.MscorlibDllReference() = mscorlibReference - - member tcConfig.CoreLibraryDllReference() = fslibReference - - -let warningMem n l = n <> 0 && List.mem n l - -let ReportWarning (globalWarnLevel : int) (specificWarnOff : int list) (err:exn) = - let n = GetErrorNumber err - warningOn err globalWarnLevel && not (warningMem n specificWarnOff) - -let ReportWarningAsError (globalWarnLevel : int) (specificWarnOff : int list) (specificWarnAsError : int list) (globalWarnAsError : bool) (err:exn) = - (warningOn err globalWarnLevel) && - ((globalWarnAsError && not (warningMem (GetErrorNumber err) specificWarnOff)) || - warningMem (GetErrorNumber err) specificWarnAsError) - -//---------------------------------------------------------------------------- -// Scoped #nowarn pragmas - - -let GetScopedPragmasForHashDirective hd = - [ match hd with - | HashDirective("nowarn",[s],m) -> - match GetWarningNumber(m,s) with - | None -> () - | Some n -> yield WarningOff(m,n) - | _ -> () ] - -let GetScopedPragmasForInput input = - - match input with - | SigFileInput (SigFile(_,_,pragmas,_,_)) -> pragmas - | ImplFileInput (ImplFile(_,_,_,pragmas,_,_,_)) ->pragmas - - - -/// Build an ErrorLogger that delegates to another ErrorLogger but filters warnings turned off by the given pragma declarations -// -// NOTE: we allow a flag to turn of strict file checking. This is because file names sometimes don't match due to use of -// #line directives, e.g. for pars.fs/pars.fsy. In this case we just test by line number - in most cases this is sufficent -// because we install a filtering error handler on a file-by-file basis for parsing and type-checking. -// However this is indicative of a more systematic problem where source-line -// sensitive operations (lexfilter and warning filtering) do not always -// interact well with #line directives. -type ErrorLoggerFilteringByScopedPragmas (checkFile,scopedPragmas,errorLogger:ErrorLogger) = - let mutable scopedPragmas = scopedPragmas - member x.ScopedPragmas with set(v) = scopedPragmas <- v - interface ErrorLogger with - member x.ErrorSink(e) = errorLogger.ErrorSink(e) - member x.ErrorCount = errorLogger.ErrorCount - member x.WarnSink(err:exn) = - let report = - let warningNum = GetErrorNumber err - match RangeOfError err with - | Some m -> not (scopedPragmas |> List.exists (fun pragma -> - match pragma with - | WarningOff(pragmaRange,warningNumFromPragma) -> - warningNum = warningNumFromPragma && - (not checkFile || Range.file_idx_of_range m = Range.file_idx_of_range pragmaRange) && - Range.pos_geq (Range.start_of_range m) (Range.start_of_range pragmaRange))) - | None -> true - if report then errorLogger.WarnSink err; - -let GetErrorLoggerFilteringByScopedPragmas(checkFile,scopedPragmas,errorLogger) = - (ErrorLoggerFilteringByScopedPragmas(checkFile,scopedPragmas,errorLogger) :> ErrorLogger) - -/// Build an ErrorLogger that delegates to another ErrorLogger but filters warnings turned off by the given pragma declarations -type DelayedErrorLogger(errorLogger:ErrorLogger) = - let delayed = new ResizeArray<_>() - interface ErrorLogger with - member x.ErrorSink(e) = delayed.Add (e,true) - member x.ErrorCount = delayed |> Seq.filter snd |> Seq.length - member x.WarnSink(e) = delayed.Add(e,false) - member x.CommitDelayedErrorsAndWarnings() = - // Eagerly grab all the errors and warnings from the mutable collection - let errors = delayed |> Seq.to_list - // Now report them - for (e,isError) in errors do - if isError then errorLogger.ErrorSink(e) else errorLogger.WarnSink(e) - -//---------------------------------------------------------------------------- -// Parsing -//-------------------------------------------------------------------------- - - -let CanonicalizeFilename filename = - let basic = Path.GetFileName filename - String.capitalize (try Filename.chop_extension basic with _ -> basic) - -let QualFileNameOfModuleName m modname = QualifiedNameOfFile(mksyn_id m (text_of_lid modname)) -let QualFileNameOfFilename m filename = QualifiedNameOfFile(mksyn_id m (CanonicalizeFilename filename)) -let QualFileNameOfUniquePath (m, p: string list) = QualifiedNameOfFile(mksyn_id m (String.concat "_" p)) - -let QualFileNameOfSpecs filename specs = - match specs with - | [ModuleOrNamespaceSpec(modname,true,_,_,_,_,m)] -> QualFileNameOfModuleName m modname - | _ -> QualFileNameOfFilename (rangeN filename 1) filename - -let QualFileNameOfImpls filename specs = - match specs with - | [ModuleOrNamespaceImpl(modname,true,_,_,_,_,m)] -> QualFileNameOfModuleName m modname - | _ -> QualFileNameOfFilename (rangeN filename 1) filename - -let PrepandPathToQualFileName x (QualifiedNameOfFile(q)) = QualFileNameOfUniquePath (q.idRange,path_of_lid x@[q.idText]) -let PrepandPathToImpl x (ModuleOrNamespaceImpl(p,c,d,e,f,g,h)) = ModuleOrNamespaceImpl(x@p,c,d,e,f,g,h) -let PrepandPathToSpec x (ModuleOrNamespaceSpec(p,c,d,e,f,g,h)) = ModuleOrNamespaceSpec(x@p,c,d,e,f,g,h) - -let PrependPathToInput x inp = - match inp with - | ImplFileInput (ImplFile(b,c,q,d,hd,impls,e)) -> ImplFileInput (ImplFile(b,c,PrepandPathToQualFileName x q,d,hd,List.map (PrepandPathToImpl x) impls,e)) - | SigFileInput (SigFile(b,q,d,hd,specs)) -> SigFileInput(SigFile(b,PrepandPathToQualFileName x q,d,hd,List.map (PrepandPathToSpec x) specs)) - -let ComputeAnonModuleName check defaultNamespace filename m = - let modname = CanonicalizeFilename filename - if check && not (modname |> String.for_all (fun c -> System.Char.IsLetterOrDigit(c) || c = '_')) then - if not (filename.EndsWith("fsx",StringComparison.OrdinalIgnoreCase) || filename.EndsWith("fsscript",StringComparison.OrdinalIgnoreCase)) then // bug://2893 - warning(Error(sprintf "The declarations in this file will be placed in an implicit module '%s' based on the file name '%s'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file" modname (Path.GetFileName filename),m)); - let combined = - match defaultNamespace with - | None -> modname - | Some ns -> text_of_path [ns;modname] - path_to_lid m (split_namespace combined) - -let PostParseModuleImpl i defaultNamespace filename impl = - match impl with - | NamedTopModuleImpl(ModuleOrNamespaceImpl(lid,isModule,decls,xmlDoc,attribs,access,m)) -> - ModuleOrNamespaceImpl(lid,isModule,decls,xmlDoc,attribs,access,m) - | AnonTopModuleImpl (defs,m)-> - let modname = ComputeAnonModuleName (nonNil defs) defaultNamespace filename m - ModuleOrNamespaceImpl(modname,true,defs,emptyPreXmlDoc,[],None,m) - | AnonNamespaceFragmentImpl (nsname,b,c,d,e,m)-> - ModuleOrNamespaceImpl(nsname,b,c,d,e,None,m) - -let PostParseModuleSpec i defaultNamespace filename intf = - match intf with - | NamedTopModuleSpec(x) -> x - | AnonTopModuleSpec (defs,m) -> - let modname = ComputeAnonModuleName (nonNil defs) defaultNamespace filename m - ModuleOrNamespaceSpec(modname,true,defs,emptyPreXmlDoc,[],None,m) - | AnonNamespaceFragmentSpec (nsname,b,c,d,e,m)-> - ModuleOrNamespaceSpec(nsname,b,c,d,e,None,m) - - - -let IsScript filename = - let lower = String.lowercase filename - scriptSuffixes |> List.exists (Filename.check_suffix lower) - - -let PostParseModuleImpls (defaultNamespace,filename,canContainEntryPoint,ParsedImplFile(hashDirectives,impls)) = - let impls = impls |> List.mapi (fun i x -> PostParseModuleImpl i defaultNamespace filename x) - let qualName = QualFileNameOfImpls filename impls - let isScript = IsScript filename - - let scopedPragmas = - [ for (ModuleOrNamespaceImpl(_,_,decls,_,_,_,_)) in impls do - for d in decls do - match d with - | Def_hash (hd,_) -> yield! GetScopedPragmasForHashDirective hd - | _ -> () - for hd in hashDirectives do - yield! GetScopedPragmasForHashDirective hd ] - ImplFileInput(ImplFile(filename,isScript,qualName,scopedPragmas,hashDirectives,impls,canContainEntryPoint)) - -let PostParseModuleSpecs (defaultNamespace,filename,ParsedSigFile(hashDirectives,specs)) = - let specs = specs |> List.mapi (fun i x -> PostParseModuleSpec i defaultNamespace filename x) - let qualName = QualFileNameOfSpecs filename specs - let scopedPragmas = - [ for (ModuleOrNamespaceSpec(_,_,decls,_,_,_,_)) in specs do - for d in decls do - match d with - | Spec_hash(hd,_) -> yield! GetScopedPragmasForHashDirective hd - | _ -> () - for hd in hashDirectives do - yield! GetScopedPragmasForHashDirective hd ] - - SigFileInput(SigFile(filename,qualName,scopedPragmas,hashDirectives,specs)) - -let ParseInput (lexer,errorLogger:ErrorLogger,lexbuf:UnicodeLexing.Lexbuf,defaultNamespace,filename,canContainEntryPoint) = - // The assert below is almost ok, but it fires in two cases: - // - fsi.exe sometimes passes "stdin" as a dummy filename - // - if you have a #line directive, e.g. - // # 1000 "Line01.fs" - // then it also asserts. But these are edge cases that can be fixed later, e.g. in bug 4651. - //System.Diagnostics.Debug.Assert(System.IO.Path.IsPathRooted(filename), sprintf "should be absolute: '%s'" filename) - let lower = String.lowercase filename - // Delay sending errors and warnings until after the file is parsed. This gives us a chance to scrape the - // #nowarn declarations for the file - let filteringErrorLogger = ErrorLoggerFilteringByScopedPragmas(false,[],errorLogger) - let errorLogger = DelayedErrorLogger(filteringErrorLogger) - use unwind = InstallGlobalErrorLogger (fun _ -> errorLogger) - try - let input = - if implSuffixes |> List.exists (Filename.check_suffix lower) then - let impl = Parser.implementationFile lexer lexbuf - PostParseModuleImpls (defaultNamespace,filename,canContainEntryPoint,impl) - elif sigSuffixes |> List.exists (Filename.check_suffix lower) then - let intfs = Parser.signatureFile lexer lexbuf - PostParseModuleSpecs (defaultNamespace,filename,intfs) - else - errorLogger.Error(InternalError("ParseInput: unknown file suffix",Range.rangeStartup)) - filteringErrorLogger.ScopedPragmas <- GetScopedPragmasForInput input - input - finally - // OK, now commit the errors, since the ScopedPragmas will (hopefully) have been scraped - errorLogger.CommitDelayedErrorsAndWarnings() - - - - -[] -type TcAssemblyResolutions(results : AssemblyResolution list, unresolved : UnresolvedReference list) = - - let originalReferenceToResolution = results |> List.map (fun r -> r.originalReference.Text,r) |> Map.of_list - let resolvedPathToResolution = results |> List.map (fun r -> r.resolvedPath,r) |> Map.of_list - - /// Add some resolutions to the map of resolution results. - member tcResolutions.AddResolutionResults(newResults) = TcAssemblyResolutions(newResults @ results, unresolved) - /// Add some unresolved results. - member tcResolutions.AddUnresolvedReferences(newUnresolved) = TcAssemblyResolutions(results, newUnresolved @ unresolved) - - /// Get information about referenced DLLs - member tcResolutions.GetAssemblyResolutions() = results - member tcResolutions.GetUnresolvedReferences() = unresolved - member tcResolutions.TryFindByOriginalReference(assemblyReference:AssemblyReference) = originalReferenceToResolution.TryFind assemblyReference.Text - member tcResolutions.TryFindByResolvedName(nm) = resolvedPathToResolution.TryFind nm - - static member Resolve (tcConfig:TcConfig,assemblyList:AssemblyReference list) : TcAssemblyResolutions = - let resolved,unresolved = - if tcConfig.useMonoResolution then - assemblyList |> List.map tcConfig.ResolveLibWithDirectories, [] - else - TcConfig.TryResolveLibsUsingMSBuildRules (tcConfig,assemblyList,rangeStartup,ReportErrors) - TcAssemblyResolutions(resolved,unresolved) - - - static member GetAllDllReferences (tcConfig:TcConfig) = - [ yield tcConfig.MscorlibDllReference() - //yield tcConfig.SystemDllReference() - if not tcConfig.compilingFslib then - yield tcConfig.CoreLibraryDllReference() - - if tcConfig.framework then - for s in coreFramework do yield AssemblyReference(rangeStartup,s^".dll") - for s in extendedFramework do yield AssemblyReference(rangeStartup,s^".dll") - if tcConfig.useFsiAuxLib then - let name = Filename.concat tcConfig.fsharpBinariesDir (fsiaux()^".dll") - yield AssemblyReference(rangeStartup,name) - yield! tcConfig.referencedDLLs ] - - static member SplitNonFoundationalResolutions (tcConfig:TcConfig) = - let assemblyList = TcAssemblyResolutions.GetAllDllReferences tcConfig - let resolutions = TcAssemblyResolutions.Resolve(tcConfig,assemblyList) - let frameworkDLLs,nonFrameworkReferences = resolutions.GetAssemblyResolutions() |> List.partition (fun r -> r.sysdir) - let unresolved = resolutions.GetUnresolvedReferences() -#if TRACK_DOWN_EXTRA_BACKSLASHES - frameworkDLLs |> List.iter(fun x -> - let path = x.resolvedPath - System.Diagnostics.Debug.Assert(not(path.Contains(@"\\")), "SplitNonFoundationalResolutions results in a non-canonical filename with extra backslashes: "^path) - ) - nonFrameworkReferences |> List.iter(fun x -> - let path = x.resolvedPath - System.Diagnostics.Debug.Assert(not(path.Contains(@"\\")), "SplitNonFoundationalResolutions results in a non-canonical filename with extra backslashes: "^path) - ) -#endif -#if DEBUG - let itFailed = ref false - let addedText = "\nIf you want to debug this right now, attach a debugger, and put a breakpoint in 'build.ml' near the text '!itFailed', and you can re-step through the assembly resolution logic." - unresolved - |> List.iter (fun (UnresolvedReference(referenceText,ranges)) -> - if referenceText.Contains("mscorlib") then - System.Diagnostics.Debug.Assert(false, sprintf "whoops, did not resolve mscorlib: '%s'%s" referenceText addedText) - itFailed := true) - frameworkDLLs - |> List.iter (fun x -> - if not(System.IO.Path.IsPathRooted(x.resolvedPath)) then - System.Diagnostics.Debug.Assert(false, sprintf "frameworkDLL should be absolute path: '%s'%s" x.resolvedPath addedText) - itFailed := true) - nonFrameworkReferences - |> List.iter (fun x -> - if not(System.IO.Path.IsPathRooted(x.resolvedPath)) then - System.Diagnostics.Debug.Assert(false, sprintf "nonFrameworkReference should be absolute path: '%s'%s" x.resolvedPath addedText) - itFailed := true) - if !itFailed then - // idea is, put a breakpoint here and then step through - let assemblyList = TcAssemblyResolutions.GetAllDllReferences tcConfig - let resolutions = TcAssemblyResolutions.Resolve(tcConfig,assemblyList) - let frameworkDLLs,nonFrameworkReferences = resolutions.GetAssemblyResolutions() |> List.partition (fun r -> r.sysdir) - () -#endif - frameworkDLLs,nonFrameworkReferences,unresolved - - static member BuildFromPriorResolutions (tcConfig:TcConfig,resolutions) = - let references = resolutions |> List.map (fun r -> r.originalReference) - TcAssemblyResolutions.Resolve(tcConfig,references) - - -//---------------------------------------------------------------------------- -// Typecheck and optimization environments on disk -//-------------------------------------------------------------------------- -open Pickle - -let IsSignatureDataResource r = String.hasPrefix r.resourceName FSharpSignatureDataResourceName -let IsOptDataResource r = String.hasPrefix r.resourceName FSharpOptimizationDataResourceName -let GetSignatureDataResourceName r = String.dropPrefix (String.dropPrefix r.resourceName FSharpSignatureDataResourceName) "." -let GetOptDataResourceName r = String.dropPrefix (String.dropPrefix r.resourceName FSharpOptimizationDataResourceName) "." - -let IsReflectedDefinitionsResource r = String.hasPrefix r.resourceName Sreflect.pickledDefinitionsResourceNameBase - -let UnpickleFromResource file m u sref r = - match r.resourceWhere with - | Resource_local b -> unpickle_obj_with_dangling_ccus file sref u (b()) - | _-> error(InternalError("UnpickleFromResource",m)) - -let MakeILResource rname bytes = - { resourceName = rname; - resourceWhere = Resource_local (fun () -> bytes); - resourceAccess = Resource_public; - resourceCustomAttrs = mk_custom_attrs [] } - -let PickleToResource file g scope rname p x = - { resourceName = rname; - resourceWhere = (let bytes = pickle_obj_with_dangling_ccus file g scope p x in Resource_local (fun () -> bytes)); - resourceAccess = Resource_public; - resourceCustomAttrs = mk_custom_attrs [] } - - -let GetSignatureData file m sref r : PickledDataWithReferences = - UnpickleFromResource file m UnpickleModuleInfo sref r - -let WriteSignatureData (tcConfig:TcConfig,tcGlobals,exportRemapping,ccu:ccu,file) : ILResource = - let mspec = ccu.Contents - if !verboseStamps then - dprintf "Signature data before remap:\n%s\n" (Layout.showL (Layout.squashTo 192 (EntityL mspec))); - dprintf "---------------------- START OF APPLYING EXPORT REMAPPING TO SIGNATURE DATA------------\n"; - let mspec = ApplyExportRemappingToEntity tcGlobals exportRemapping mspec - if !verboseStamps then - dprintf "---------------------- END OF APPLYING EXPORT REMAPPING TO SIGNATURE DATA------------\n"; - dprintf "Signature data after remap:\n%s\n" (Layout.showL (Layout.squashTo 192 (EntityL mspec))); - PickleToResource file tcGlobals ccu (FSharpSignatureDataResourceName^"."^ccu.AssemblyName) PickleModuleInfo - { mspec=mspec; - compile_time_working_dir=tcConfig.implicitIncludeDir; - usesQuotations = ccu.UsesQuotations } - -let GetOptimizationData file m sref ca = - UnpickleFromResource file m Opt.u_lazy_modul_info sref ca - -let WriteOptData tcGlobals file (ccu,modulInfo) = - if verbose then dprintf "Optimization data after remap:\n%s\n" (Layout.showL (Layout.squashTo 192 (Opt.moduleInfoL modulInfo))); - PickleToResource file tcGlobals ccu (FSharpOptimizationDataResourceName^"."^ccu.AssemblyName) Opt.p_lazy_modul_info modulInfo - -//---------------------------------------------------------------------------- -// Names to match up refs and defs for assemblies and modules -//-------------------------------------------------------------------------- - -let GetNameOfScopeRef sref = - match sref with - | ScopeRef_local -> "" - | ScopeRef_module mref -> mref.Name - | ScopeRef_assembly aref -> aref.Name - -let GetNameOfILModule m = if module_is_mainmod m then assname_of_mainmod m else m.modulName - - -let MakeScopeRefForIlModule tcConfig ilModule = - if module_is_mainmod ilModule then - ScopeRef_assembly (assref_for_mainmod ilModule) - else - ScopeRef_module (modref_for_modul ilModule) - -let GetCustomAttributesOfIlModule (ilModule:ILModuleDef) = - dest_custom_attrs (match ilModule.Manifest with Some m -> m.CustomAttrs | None -> ilModule.CustomAttrs) - -let GetAutoOpenAttributes(ilModule) = - ilModule |> GetCustomAttributesOfIlModule |> List.choose TryFindAutoOpenAttr - -let GetInternalsVisibleToAttributes ilModule = - ilModule |> GetCustomAttributesOfIlModule |> List.choose TryFindInternalsVisibleToAttr - -//---------------------------------------------------------------------------- -// Relink blobs of saved data by fixing up ccus. -//-------------------------------------------------------------------------- - -type ImportedBinary = - { FileName: string; - IsFSharpBinary: bool; - RawMetadata: ILModuleDef; - ILAssemblyRefs : ILAssemblyRef list; - ILScopeRef: ILScopeRef } - -type ImportedAssembly = - { ILScopeRef: ILScopeRef; - FSharpViewOfMetadata: ccu; - AssemblyAutoOpenAttributes: string list; - AssemblyInternalsVisibleToAttributes: string list; - FSharpOptimizationData : Lazy> } - -type AvailableImportedAssembly = - | ResolvedImportedAssembly of ImportedAssembly - | UnresolvedImportedAssembly of string - -let availableToOptionalCcu = function - | ResolvedCcu(ccu) -> Some(ccu) - | UnresolvedCcu(assemblyName) -> None - - -//---------------------------------------------------------------------------- -// TcConfigProvider -//-------------------------------------------------------------------------- - -type TcConfigProvider = - | TcConfigProvider of (unit -> TcConfig) - member x.Get() = (let (TcConfigProvider(f)) = x in f()) - static member Constant(tcConfig) = TcConfigProvider(fun () -> tcConfig) - static member BasedOnMutableBuilder(tcConfigB) = TcConfigProvider(fun () -> TcConfig.Create(tcConfigB,validate=false)) - - -//---------------------------------------------------------------------------- -// TcImports -//-------------------------------------------------------------------------- - - -/// Tables of imported assemblies. -[] -type TcImports(tcConfigP:TcConfigProvider,initialResolutions:TcAssemblyResolutions, importsBase:TcImports option,ilGlobalsOpt) = - let mutable resolutions = initialResolutions - - let mutable importsBase : TcImports option = importsBase - let mutable dllInfos: ImportedBinary list = [] - let mutable dllTable: ImportedBinary NameMap = NameMap.empty - let mutable ccuInfos: ImportedAssembly list = [] - let mutable ccuTable: ImportedAssembly NameMap = NameMap.empty - let mutable disposeActions = [] - let mutable originalReferenceToResolution : Map = Map.empty - let mutable resolvedPathToResolution : Map = Map.empty -#if DEBUG - let mutable disposed = false -#endif - let mutable ilGlobalsOpt = ilGlobalsOpt - let mutable tcGlobals = None - - let CheckDisposed() = -#if DEBUG - if disposed then failwith "Use of Disposed TcConfig" -#else - () -#endif - - member tcImports.SetBase(baseTcImports) = - CheckDisposed() - importsBase <- Some(baseTcImports) - - member private tcImports.Base - with get() = - CheckDisposed() - importsBase - - member tcImports.CcuTable - with get() = - CheckDisposed() - ccuTable - - member private tcImports.DllTable - with get() = - CheckDisposed() - dllTable - - member tcImports.RegisterCcu(ccuInfo) = - CheckDisposed() - ccuInfos <- ccuInfos ++ ccuInfo; - // Assembly Ref Resolution: remove this use of ccu.AssemblyName - ccuTable <- NameMap.add (ccuInfo.FSharpViewOfMetadata.AssemblyName) ccuInfo ccuTable - - member tcImports.RegisterDll(dllInfo) = - CheckDisposed() - dllInfos <- dllInfos ++ dllInfo; - dllTable <- NameMap.add (GetNameOfScopeRef dllInfo.ILScopeRef) dllInfo dllTable - - member tcImports.GetDllInfos() = - CheckDisposed() - match importsBase with - | Some(importsBase)-> importsBase.GetDllInfos() @ dllInfos - | None -> dllInfos - - member tcImports.FindDllInfo (m,assemblyName) = - CheckDisposed() - let rec look(t:TcImports) = - match NameMap.tryfind assemblyName t.DllTable with - | Some res -> Some(res) - | None -> - match t.Base with - | Some t2 -> look(t2) - | None -> None - match look(tcImports) with - | Some res -> res - | None -> - tcImports.ImplicitLoadIfAllowed(m,assemblyName); - match look(tcImports) with - | Some res -> res - | None -> error(Error("could not resolve assembly "^assemblyName,m)) - - - member tcImports.FindDllInfoFromAssemblyRef(m,assref:ILAssemblyRef) = - CheckDisposed() - tcImports.FindDllInfo(m,assref.Name) - - - member tcImports.GetCcuInfos() = - CheckDisposed() - match importsBase with - | Some(importsBase)-> importsBase.GetCcuInfos() @ ccuInfos - | None -> ccuInfos - - member tcImports.GetCcusInDeclOrder() = - CheckDisposed() - List.map (fun x -> x.FSharpViewOfMetadata) (tcImports.GetCcuInfos()) - - // This is the main "assembly reference --> assembly" resolution routine. - // We parameterize by a fallback resolution function that will go and look for DLLs matching the assembly name - // in the include search paths. - member tcImports.FindCcuInfo (m,assemblyName) = - CheckDisposed() - let rec look (t:TcImports) = - match NameMap.tryfind assemblyName t.CcuTable with - | Some res -> Some(res) - | None -> - match t.Base with - | Some t2 -> look t2 - | None -> None - - match look(tcImports) with - | Some res -> ResolvedImportedAssembly(res) - | None -> - tcImports.ImplicitLoadIfAllowed(m,assemblyName); - match look(tcImports) with - | Some res -> ResolvedImportedAssembly(res) - | None -> UnresolvedImportedAssembly(assemblyName) - - - member tcImports.FindCcu(m,assemblyName) = - CheckDisposed() - match tcImports.FindCcuInfo(m,assemblyName) with - | ResolvedImportedAssembly(importedAssembly) -> ResolvedCcu(importedAssembly.FSharpViewOfMetadata) - | UnresolvedImportedAssembly(assemblyName) -> UnresolvedCcu(assemblyName) - - member tcImports.FindCcuFromAssemblyRef(m,assref:ILAssemblyRef) = - CheckDisposed() - match tcImports.FindCcuInfo(m,assref.Name) with - | ResolvedImportedAssembly(importedAssembly) -> ResolvedCcu(importedAssembly.FSharpViewOfMetadata) - | UnresolvedImportedAssembly(assemblyName) -> UnresolvedCcu(assref.QualifiedName) - - member tcImports.AssemblyLoader = - Import.AssemblyLoader (fun (m,assref) -> tcImports.FindCcuFromAssemblyRef(m,assref)) - - member tcImports.AttachDisposeAction(action) = - CheckDisposed() - disposeActions <- action :: disposeActions - - override obj.ToString() = - sprintf "tcImports = \n dllInfos=%A\n dllTable=%A\n ccuInfos=%A\n ccuTable=%A\n Base=%s\n" - dllInfos - dllTable - ccuInfos - ccuTable - (match importsBase with None-> "None" | Some(importsBase) -> importsBase.ToString()) - - - // Note: the returned binary reader is associated with the tcImports, i.e. when the tcImports are closed - // then the reader is closed. - member tcImports.OpenIlBinaryModule(syslib,filename,m) = - try - CheckDisposed() - let tcConfig = tcConfigP.Get() - let pdbPathOption = - // We open the pdb file if one exists parallel to the binary we - // are reading, so that --standalone will preserve debug information. - if tcConfig.openDebugInformationForLaterStaticLinking then - let pdbDir = (try Filename.dirname filename with _ -> ".") - let pdbFile = (try Filename.chop_extension filename with _ -> filename)^".pdb" - if Internal.Utilities.FileSystem.File.SafeExists pdbFile then - if verbose then dprintf "reading PDB file %s from directory %s\n" pdbFile pdbDir; - Some pdbDir - else - None - else - None - - - let ilBinaryReader = OpenILBinary(filename,tcConfig.optimizeForMemory,tcConfig.openBinariesInMemory,ilGlobalsOpt,pdbPathOption,tcConfig.mscorlibAssemblyName) - - tcImports.AttachDisposeAction(fun _ -> Ilread.CloseILModuleReader ilBinaryReader); - ilBinaryReader.ILModuleDef, ilBinaryReader.ILAssemblyRefs - with e -> - error(Error(sprintf "Error opening binary file '%s': %s" filename e.Message,m)) - - - - (* auxModTable is used for multi-module assemblies *) - member tcImports.MkLoaderForMultiModuleIlAssemblies m syslib = - CheckDisposed() - let auxModTable = Hashtbl.create 10 - fun viewedScopeRef -> - - let tcConfig = tcConfigP.Get() - match viewedScopeRef with - | ScopeRef_module modref -> - let key = modref.Name - if not (auxModTable.ContainsKey(key)) then - let resolution = tcConfig.ResolveLibWithDirectories(AssemblyReference(m,key)) - let ilModule,_ = tcImports.OpenIlBinaryModule(syslib,resolution.resolvedPath,m) - auxModTable.[key] <- ilModule - auxModTable.[key] - - | _ -> - error(InternalError("Unexpected ScopeRef_local or ScopeRef_assembly in exported type table",m)) - - member tcImports.IsAlreadyRegistered nm = - CheckDisposed() - tcImports.GetDllInfos() |> List.exists (fun dll -> - match dll.ILScopeRef with - | ScopeRef_assembly a -> a.Name = nm - | _ -> false) - - member tcImports.GetImportMap() = - CheckDisposed() - new Import.ImportMap (tcImports.GetTcGlobals(),tcImports.AssemblyLoader) - - // Note the tcGlobals are only available once mscorlib and fslib have been established. For TcImports, - // they are logically only needed when converting AbsIL data structures into F# data structures, and - // when converting AbsIL types in particular, since these types are normalized through the tables - // in the tcGlobals (E.g. normalizing 'System.Int32' to 'int'). On the whole ImportIlAssembly doesn't - // actually convert AbsIL types - it only converts the outer shell of type definitions - the vast majority of - // types such as those in method signatures are currently converted on-demand. However ImportILAssembly does have to - // convert the types that are constraints in generic parameters, which was the original motivation for making sure that - // ImportILAssembly had a tcGlobals available when it really needs it. - member tcImports.GetTcGlobals() = - CheckDisposed() - match tcGlobals with - | Some(g) -> g - | None -> - match importsBase with - | Some(b) -> b.GetTcGlobals() - | None -> failwith "unreachable: GetGlobals" - - member private tcImports.SetILGlobals(ilg) = - CheckDisposed() - ilGlobalsOpt <- Some(ilg) - - member private tcImports.SetTcGlobals(g) = - CheckDisposed() - tcGlobals <- Some(g) - - // Add a referenced assembly - // - // Retargetable assembly refs are required for binaries that must run - // against DLLs supported by multiple publishers. For example - // Compact Framework binaries must use this. However it is not - // clear when else it is required, e.g. for Mono. - - member tcImports.PrepareToImportReferencedIlDll syslib m filename (dllinfo:ImportedBinary) = - CheckDisposed() - let tcConfig = tcConfigP.Get() - let ilModule = dllinfo.RawMetadata - let sref = dllinfo.ILScopeRef - let aref = - match sref with - | ScopeRef_assembly aref -> aref - | _ -> error(InternalError("PrepareToImportReferencedIlDll: cannot reference .NET netmodules directly, reference the containing assembly instead",m)) - - let nm = aref.Name - if verbose then dprintn ("Converting IL assembly to F# data structures "^nm); - let auxModuleLoader = tcImports.MkLoaderForMultiModuleIlAssemblies m syslib - let ccu = Import.ImportIlAssembly(tcImports.GetImportMap,m,auxModuleLoader,sref,tcConfig.implicitIncludeDir, Some filename,ilModule) - let ccuinfo = - { FSharpViewOfMetadata=ccu; - ILScopeRef = sref; - AssemblyAutoOpenAttributes = GetAutoOpenAttributes(ilModule); - AssemblyInternalsVisibleToAttributes = GetInternalsVisibleToAttributes(ilModule); - FSharpOptimizationData = notlazy None } - tcImports.RegisterCcu(ccuinfo); - let phase2 () = [ResolvedImportedAssembly(ccuinfo)] - phase2 - - member tcImports.PrepareToImportReferencedFSharpDll syslib m filename (dllinfo:ImportedBinary) = - CheckDisposed() - let tcConfig = tcConfigP.Get() - tcConfig.CheckFSharpBinary(filename,dllinfo.ILAssemblyRefs,m) - let ilModule = dllinfo.RawMetadata - let sref = dllinfo.ILScopeRef - let modname = GetNameOfScopeRef sref - if verbose then dprintn ("Converting F# assembly to F# data structures "^(GetNameOfScopeRef sref)); - let attrs = GetCustomAttributesOfIlModule ilModule - assert (List.exists IsSignatureDataVersionAttr attrs); - if verbose then dprintn ("Relinking interface info from F# assembly "^modname); - let resources = dest_resources ilModule.modulResources - assert (List.exists IsSignatureDataResource resources); - let optDataFromResource = - resources - |> List.choose (fun r -> if IsOptDataResource r then Some(GetOptDataResourceName r,r) else None) - let ccuRawDataAndInfos = - resources - |> List.filter IsSignatureDataResource - |> List.map (fun iresource -> - let ccuName = GetSignatureDataResourceName iresource - let data = GetSignatureData filename m sref iresource - - // Look for optimization data in a file - let optDataFromFile = - let optDataFileName = (Filename.chop_extension filename)^".optdata" - if Internal.Utilities.FileSystem.File.SafeExists optDataFileName then - try Some(ccuName,MakeILResource optDataFileName (File.ReadAllBytes optDataFileName)) - with _ -> None - else None - - let optDatas = - // If F# optData is written to file, the DLL still contains "essential" optData - i.e. the must inline information. - // If we find optData in a file, we should use that one in preference to resource optData. - // We choose one or the other. - match optDataFromFile,optDataFromResource with - | None ,[] -> warning(Error(Printf.sprintf "No optimization information found for compilation unit '%s'" ccuName,m)); Map.empty - | Some optData,_ -> Map.of_list [optData] // prefer optData from file if available, since it implies DLL optData is limitted to "essential" - | None ,optDatas -> Map.of_list optDatas // Espect this route, optData from file is being disabled (but kept around). - - let minfo : PickledModuleInfo = data.RawData - let mspec = minfo.mspec - - - // Adjust where the code for known F# libraries live relative to the installation of F# - let code_dir = - let dir = minfo.compile_time_working_dir - let knownLibraryLocation = @"src\fsharp\" // Help highlighting... " - let knownLibarySuffixes = - [ @"FSharp.Core"; - @"FSharp.PowerPack"; - @"FSharp.PowerPack.Linq"; - @"FSharp.PowerPack.Metadata" ] - match knownLibarySuffixes |> List.tryfind (fun x -> dir.EndsWith(knownLibraryLocation + x,StringComparison.OrdinalIgnoreCase)) with - | None -> - dir - | Some libSuffix -> - // chop off 'FSharp.Core' - let dir = dir.[0..dir.Length-1-libSuffix.Length] - // chop off 'src\fsharp\' - let dir = dir.[0..dir.Length-1-knownLibraryLocation.Length] - // add "..\lib\FSharp.Core" to the F# binaries directory - let dir = Path.Combine(Path.Combine(tcConfig.fsharpBinariesDir,@"..\lib"),libSuffix) - dir - - let ccu = - new_ccu ccuName - { ccu_scoref=sref; - ccu_stamp = new_stamp(); - ccu_filename = Some filename; - ccu_qname= Some(sref.QualifiedName); - ccu_code_dir = code_dir; (* note: in some cases we fix up this information later *) - ccu_fsharp=true; - ccu_contents = mspec; - ccu_usesQuotations = minfo.usesQuotations; - ccu_forwarders = lazy Map.empty } - - let optdata = - lazy - (match Map.tryfind ccuName optDatas with - | None -> - if verbose then dprintf "*** no optimization data for CCU %s, was DLL compiled with --no-optimization-data??\n" ccuName; - None - | Some info -> - let data = GetOptimizationData filename m sref info - let res = data.OptionalFixup(fun nm -> availableToOptionalCcu(tcImports.FindCcu(m,nm))) - if verbose then dprintf "found optimization data for CCU %s\n" ccuName; - Some res) - data,{ FSharpViewOfMetadata=ccu; - AssemblyAutoOpenAttributes = GetAutoOpenAttributes(ilModule); - AssemblyInternalsVisibleToAttributes = GetInternalsVisibleToAttributes(ilModule); - FSharpOptimizationData=optdata; - ILScopeRef = sref } ) - - // Register all before relinking to cope with mutually-referential ccus - ccuRawDataAndInfos |> List.iter (snd >> tcImports.RegisterCcu); - let phase2 () = - (* Relink *) - (* dprintf "Phase2: %s\n" filename; REMOVE DIAGNOSTICS *) - ccuRawDataAndInfos |> List.iter (fun (data,_) -> data.OptionalFixup(fun nm -> availableToOptionalCcu(tcImports.FindCcu(m,nm))) |> ignore); - ccuRawDataAndInfos |> List.map snd |> List.map ResolvedImportedAssembly - phase2 - - - member tcImports.RegisterAndPrepareToImportReferencedDll warnIfAlreadyLoaded (r:AssemblyResolution) : _*(unit -> AvailableImportedAssembly list)= - CheckDisposed() - let tcConfig = tcConfigP.Get() - let m = r.originalReference.Range - let filename = r.resolvedPath - let syslib = r.sysdir - let ilModule,ilAssemblyRefs = tcImports.OpenIlBinaryModule(syslib,filename,m) - - let modname = GetNameOfILModule ilModule - if tcImports.IsAlreadyRegistered modname then - let dllinfo = tcImports.FindDllInfo(m,modname) - let phase2() = [tcImports.FindCcuInfo(m,modname)] - dllinfo,phase2 - else - let sref = MakeScopeRefForIlModule tcConfig ilModule - let dllinfo = {RawMetadata=ilModule; - FileName=filename; - IsFSharpBinary=true; - ILScopeRef = sref; - ILAssemblyRefs = ilAssemblyRefs } - tcImports.RegisterDll(dllinfo); - let attrs = GetCustomAttributesOfIlModule ilModule - let phase2 = - if (List.exists IsSignatureDataVersionAttr attrs) then - if not (List.exists (IsMatchingSignatureDataVersionAttr (IL.parse_version Ilxconfig.version)) attrs) then - errorR(Error("The F#-compiled DLL '"^filename^"' needs to be recompiled to be used with this version of F#",m)); - tcImports.PrepareToImportReferencedIlDll syslib m filename dllinfo - else - tcImports.PrepareToImportReferencedFSharpDll syslib m filename dllinfo - else - tcImports.PrepareToImportReferencedIlDll syslib m filename dllinfo - dllinfo,phase2 - - member tcImports.RegisterAndImportReferencedAssemblies warnIfAlreadyLoaded (nms:AssemblyResolution list) = - CheckDisposed() - - let dllinfos,phase2s = - nms |> List.map (tcImports.RegisterAndPrepareToImportReferencedDll warnIfAlreadyLoaded) - |> List.unzip - let ccuinfos = (List.collect (fun phase2 -> phase2()) phase2s) - dllinfos,ccuinfos - - member tcImports.DoRegisterAndImportReferencedAssemblies nms = - CheckDisposed() - tcImports.RegisterAndImportReferencedAssemblies true nms |> ignore - - member tcImports.ImplicitLoadIfAllowed(m,assemblyName) = - CheckDisposed() - // If the user is asking for the default framework then also try to resolve other implicit assemblies as they are discovered. - // Using this flag to mean 'allow implicit discover of assemblies'. - let tcConfig = tcConfigP.Get() - if tcConfig.implicitlyResolveAssemblies then - let tryFile speculativeFileName = - let foundFile = - try Some(tcImports.ResolveLibFile (AssemblyReference(m,speculativeFileName),ResolveLibFileMode.Speculative)) - with - // Don't re-report the load error - | AssemblyNotResolved _ - | FileNameNotResolved _ -> None - match foundFile with - | None -> None - | Some res -> - //if not tcConfig.noFeedback then dprintf "Implicitly referencing '%s'...\n" fileName; - tcImports.DoRegisterAndImportReferencedAssemblies [res] - Some() - - match tryFile (assemblyName^".dll") with - | Some() -> () - | None -> tryFile (assemblyName^".exe") |> ignore - - - member tcImports.TryResolveLibFile (assemblyReference:AssemblyReference,mode:ResolveLibFileMode): OperationResult = - let tcConfig = tcConfigP.Get() - // First try the prior resolutions map. - match resolutions.TryFindByOriginalReference assemblyReference with - | Some(assemblyResolution) -> - ResultD(assemblyResolution) - | None -> - match resolutions.TryFindByResolvedName assemblyReference.Text with - | Some(assemblyResolution) -> - ResultD(assemblyResolution) - | None -> - if tcConfigP.Get().useMonoResolution then - try - ResultD(tcConfig.ResolveLibWithDirectories assemblyReference) - with e -> - ErrorD(e) - else - // This is a previously unencounterd assembly. Resolve it and add it to the list. - // But don't cache resolution failures because the assembly may appear on the disk later. - let resolved,unresolved = TcConfig.TryResolveLibsUsingMSBuildRules(tcConfig,[ assemblyReference ],assemblyReference.Range,mode) - match resolved,unresolved with - | (assemblyResolution::_,_) -> - resolutions <- resolutions.AddResolutionResults(resolved) - ResultD(assemblyResolution) - | (_,_::_) -> - resolutions <- resolutions.AddUnresolvedReferences(unresolved) - ErrorD(AssemblyNotResolved(assemblyReference.Text,assemblyReference.Range)) - | [],[] -> - // Note, if mode=ResolveLibFileMode.Speculative and the resolution failed then TryResolveLibsUsingMSBuildRules returns - // the empty list and we convert the failure into an AssemblyNotResolved here. - ErrorD(AssemblyNotResolved(assemblyReference.Text,assemblyReference.Range)) - - /// Do TryResolveLibFile and commit the result - - member tcImports.ResolveLibFile (assemblyReference,mode) = - let opResult = tcImports.TryResolveLibFile(assemblyReference,mode) - CommitOperationResult opResult - - - static member BuildFrameworkTcImports (tcConfigP:TcConfigProvider,frameworkDLLs) = - use t = Trace.Call("Build","BuildFrameworkTcImports", fun _->"") - - let tcConfig = tcConfigP.Get() - let tcResolutions = TcAssemblyResolutions.BuildFromPriorResolutions(tcConfig,frameworkDLLs) - - // mscorlib gets loaded first. - let mscorlibReference = tcConfig.MscorlibDllReference() - - let frameworkTcImports = new TcImports(tcConfigP,tcResolutions,None,None) - - let sysCcu = - let mscorlibResolution = tcConfig.ResolveLibWithDirectories(mscorlibReference) - //printfn "mscorlibResolution= %s" mscorlibResolution.resolvedPath - match frameworkTcImports.RegisterAndImportReferencedAssemblies false [mscorlibResolution] with - | (_, [ResolvedImportedAssembly(sysCcu)]) -> sysCcu - | _ -> error(InternalError("BuildFoundationalTcImports: no sysCcu for "^mscorlibReference.Text,rangeStartup)) - let ilGlobals = IL.mk_ILGlobals sysCcu.FSharpViewOfMetadata.ILScopeRef (Some tcConfig.mscorlibAssemblyName) - frameworkTcImports.SetILGlobals ilGlobals - - // Load the rest of the framework DLLs all at once (they may be mutually recursive) - frameworkTcImports.DoRegisterAndImportReferencedAssemblies (tcResolutions.GetAssemblyResolutions()) - - let fslibCcu = - if tcConfig.compilingFslib then - // When compiling FSharp.Core.dll, the fslibCcu reference to FSharp.Core.dll is a delayed ccu thunk fixed up during type checking - let fslibCcu = CcuThunk.CreateDelayed(GetFSharpCoreLibraryName()) - fslibCcu - else - let fslibCcuInfo = - let coreLibraryReference = tcConfig.CoreLibraryDllReference() - //printfn "coreLibraryReference = %A" coreLibraryReference - match tcResolutions.TryFindByOriginalReference(coreLibraryReference) with - | Some coreLibraryResolution -> - //printfn "coreLibraryResolution = '%s'" coreLibraryResolution.resolvedPath - match frameworkTcImports.RegisterAndImportReferencedAssemblies false [coreLibraryResolution] with - | (_, [ResolvedImportedAssembly(fslibCcuInfo) ]) -> fslibCcuInfo - | _ -> - error(InternalError("BuildFrameworkTcImports: no successful import of "^coreLibraryResolution.resolvedPath,coreLibraryResolution.originalReference.Range)) - | None -> - error(InternalError(sprintf "BuildFrameworkTcImports: no resolution of '%s'" coreLibraryReference.Text,rangeStartup)) - Msilxlib.ilxLibraryAssemRef := - (let scoref = fslibCcuInfo.ILScopeRef - match scoref with - | ScopeRef_assembly aref -> Some aref - | ScopeRef_local | ScopeRef_module _ -> error(InternalError("fslib_assembly_ref: not ScopeRef_assembly",rangeStartup))); - fslibCcuInfo.FSharpViewOfMetadata - - // can't access system tuples on frameworks < v4.0 - match ilGlobals.mscorlib_scoref.AssemblyRef.Version with - | Some(v1,_,_,_) when v1 < 4us -> - Microsoft.FSharp.Compiler.Tastops.use_40_System_Types <- false - | _ -> () - - // OK, now we have both mscorlib.dll and FSharp.Core.dll we can create TcGlobals - let tcGlobals = mk_tcGlobals(tcConfig.compilingFslib,sysCcu.FSharpViewOfMetadata,ilGlobals,fslibCcu,tcConfig.implicitIncludeDir,tcConfig.mlCompatibility, Microsoft.FSharp.Compiler.Tastops.use_40_System_Types) -#if DEBUG - // the global_g reference cell is used only for debug printing - global_g := Some tcGlobals; -#endif - // do this prior to parsing, since parsing IL assembly code may refer to mscorlib - Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiConstants.parse_ilGlobals := tcGlobals.ilg; - frameworkTcImports.SetTcGlobals(tcGlobals) - tcGlobals,frameworkTcImports - - static member BuildNonFrameworkTcImports (tcConfigP:TcConfigProvider,tcGlobals:TcGlobals, baseTcImports,nonFrameworkReferences) = - let tcConfig = tcConfigP.Get() - let tcResolutions = TcAssemblyResolutions.BuildFromPriorResolutions(tcConfig,nonFrameworkReferences) - let references = tcResolutions.GetAssemblyResolutions() - let tcImports = new TcImports(tcConfigP,tcResolutions,Some baseTcImports, Some tcGlobals.ilg) - tcImports.DoRegisterAndImportReferencedAssemblies references; - tcImports - - - static member BuildTcImports(tcConfigP:TcConfigProvider) = - let tcConfig = tcConfigP.Get() - //let foundationalTcImports,tcGlobals = TcImports.BuildFoundationalTcImports(tcConfigP) - let frameworkDLLs,nonFrameworkReferences,unresolvedReferences = TcAssemblyResolutions.SplitNonFoundationalResolutions tcConfig - let tcGlobals,frameworkTcImports = TcImports.BuildFrameworkTcImports (tcConfigP,frameworkDLLs) - let tcImports = TcImports.BuildNonFrameworkTcImports(tcConfigP,tcGlobals,frameworkTcImports,nonFrameworkReferences) - tcGlobals,tcImports - - interface System.IDisposable with - member tcImports.Dispose() = - CheckDisposed() - // disposing deliberately only closes this tcImports, not the ones up the chain -#if DEBUG - disposed <- true -#endif - if verbose then - dprintf "disposing of TcImports, %d binaries\n" disposeActions.Length; - List.iter (fun f -> f()) disposeActions - -//---------------------------------------------------------------------------- -// Add "#r" and "#I" declarations to the tcConfig -//-------------------------------------------------------------------------- - -// Add the reference and add the ccu to the type checking environment . Only used by F# Interactive -let RequireDLL (tcImports:TcImports) tcEnv m file = - let RequireResolved = function - | ResolvedImportedAssembly(ccuinfo) -> ccuinfo - | UnresolvedImportedAssembly(assemblyName) -> error(Error("could not resolve assembly '"^assemblyName^"' required by '"^file,m)) - let resolution = tcImports.ResolveLibFile(AssemblyReference(m,file),ResolveLibFileMode.ReportErrors) - let dllinfos,ccuinfos = tcImports.RegisterAndImportReferencedAssemblies false [resolution] - let ccuinfos = ccuinfos |> List.map RequireResolved - let g = tcImports.GetTcGlobals() - let amap = tcImports.GetImportMap() - let tcEnv = ccuinfos |> List.fold (fun tcEnv ccuinfo -> Tc.AddCcuToTcEnv(g,amap,m,tcEnv,ccuinfo.FSharpViewOfMetadata,ccuinfo.AssemblyAutoOpenAttributes,false)) tcEnv - tcEnv,(dllinfos,ccuinfos) - - - -let ProcessMetaCommandsFromInput - (nowarnF: 'state -> range * string -> 'state, - dllRequireF: 'state -> range * string -> 'state, - loadSourceF: 'state -> range * string -> unit) - (tcConfig:TcConfigBuilder) - inp - state0 = - - let canHaveScriptMetaCommands = - match inp with - | SigFileInput(_) -> false - | ImplFileInput(ImplFile(filename,isScript,_,_,_,_,_)) -> isScript - - let ProcessMetaCommand state hash = - let mutable matchedm = range0 - try - match hash with - | HashDirective("I",args,m) -> - if not canHaveScriptMetaCommands then - errorR(HashIncludeNotAllowedInNonScript(m)); - match args with - | [path] -> - matchedm<-m - tcConfig.AddIncludePath(m,path); - state - | _ -> - errorR(Error("Invalid directive. Expected '#I \"\"'",m)) - state - | HashDirective("nowarn",[d],m) -> - nowarnF state (m,d) - | HashDirective(("reference" | "r"),args,m) -> - if not canHaveScriptMetaCommands then - errorR(HashReferenceNotAllowedInNonScript(m)); - match args with - | [path] -> - matchedm<-m - dllRequireF state (m,path) - | _ -> - errorR(Error("Invalid directive. Expected '#r \"\"'",m)) - state - | HashDirective(("Reference" | "R"),args,m) -> - errorR(HashReferenceCopyAfterCompileNotAllowedInNonScript(m)); - match args with - | [path] -> - matchedm<-m - dllRequireF state (m,path) - | _ -> state - | HashDirective("load",args,m) -> - if not canHaveScriptMetaCommands then - errorR(HashDirectiveNotAllowedInNonScript(m)); - match args with - | _ :: _ -> - matchedm<-m - args |> List.iter (fun path -> loadSourceF state (m,path)) - | _ -> - errorR(Error("Invalid directive. Expected '#load \"\" ... \"\"'",m)) - state - | HashDirective("time",args,m) -> - if not canHaveScriptMetaCommands then - errorR(HashDirectiveNotAllowedInNonScript(m)); - match args with - | [] -> - () - | ["on" | "off"] -> - () - | _ -> - errorR(Error("Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'",m)) - state - - | _ -> - - (* warning(Error("This meta-command has been ignored",m)); *) - state - with e -> errorRecovery e matchedm; state - - let rec WarnOnIgnoredSpecDecls decls = - decls |> List.iter (fun d -> - match d with - | Spec_hash (h,m) -> warning(Error("Directives inside modules are ignored",m)); - | Spec_module (_,subDecls,_) -> WarnOnIgnoredSpecDecls subDecls - | _ -> ()) - - let rec WarnOnIgnoredImplDecls decls = - decls |> List.iter (fun d -> - match d with - | Def_hash (h,m) -> warning(Error("Directives inside modules are ignored",m)); - | Def_module (_,subDecls,_,_) -> WarnOnIgnoredImplDecls subDecls - | _ -> ()) - - let ProcessMetaCommandsFromModuleSpec state (ModuleOrNamespaceSpec(_,_,decls,_,_,_,_)) = - List.fold (fun s d -> - match d with - | Spec_hash (h,m) -> ProcessMetaCommand s h - | Spec_module (_,subDecls,_) -> WarnOnIgnoredSpecDecls subDecls; s - | _ -> s) - state - decls - - let ProcessMetaCommandsFromModuleImpl state (ModuleOrNamespaceImpl(_,_,decls,_,_,_,_)) = - List.fold (fun s d -> - match d with - | Def_hash (h,m) -> ProcessMetaCommand s h - | Def_module (_,subDecls,_,_) -> WarnOnIgnoredImplDecls subDecls; s - | _ -> s) - state - decls - - match inp with - | SigFileInput(SigFile(_,_,_,hashDirectives,specs)) -> - let state = List.fold ProcessMetaCommand state0 hashDirectives - let state = List.fold ProcessMetaCommandsFromModuleSpec state specs - state - | ImplFileInput(ImplFile(_,_,_,_,hashDirectives,impls,_)) -> - let state = List.fold ProcessMetaCommand state0 hashDirectives - let state = List.fold ProcessMetaCommandsFromModuleImpl state impls - state - -let ApplyMetaCommandsFromInputToTcConfig (tcConfig:TcConfig) (inp:input) = - // Clone - let tcConfigB = tcConfig.CloneOfOriginalBuilder - let getWarningNumber = fun () (m,s) -> () - let addReferencedAssemblyByPath = fun () (m,s) -> tcConfigB.AddReferencedAssemblyByPath(m,s) - let addLoadedSource = fun () (m,s) -> tcConfigB.AddLoadedSource(m,s); - ProcessMetaCommandsFromInput (getWarningNumber, addReferencedAssemblyByPath, addLoadedSource) tcConfigB inp () - TcConfig.Create(tcConfigB,validate=false) - -let GetResolvedAssemblyInformation(tcConfig : TcConfig) : AssemblyResolution list = - let assemblyList = TcAssemblyResolutions.GetAllDllReferences(tcConfig) - let resolutions = TcAssemblyResolutions.Resolve(tcConfig,assemblyList) - resolutions.GetAssemblyResolutions() - -//---------------------------------------------------------------------------- -// Build the initial type checking environment -//-------------------------------------------------------------------------- - -let implicitOpen tcGlobals amap m tcEnv p = - if verbose then dprintf "opening %s\n" p ; - Tc.TcOpenDecl tcGlobals amap m m tcEnv (path_to_lid m (split_namespace p)) - -let GetInitialTypecheckerEnv (assemblyName:string option) initm (tcConfig:TcConfig) (tcImports:TcImports) tcGlobals = - let initm = start_range_of_range initm - if verbose then dprintf "--- building initial tcEnv\n"; - let internalsAreVisibleHere (ccuinfo:ImportedAssembly) = - match assemblyName with - | None -> false - | Some assemblyName -> - let isTargetAssemblyName (visibleTo:string) = - try - System.Reflection.AssemblyName(visibleTo).Name = assemblyName - with e -> - warning(InvalidInternalsVisibleToAssemblyName(visibleTo,ccuinfo.FSharpViewOfMetadata.FileName)) - false - let internalsVisibleTos = ccuinfo.AssemblyInternalsVisibleToAttributes - List.exists isTargetAssemblyName internalsVisibleTos - let ccus = tcImports.GetCcuInfos() |> List.map (fun ccuinfo -> ccuinfo.FSharpViewOfMetadata, - ccuinfo.AssemblyAutoOpenAttributes, - ccuinfo |> internalsAreVisibleHere) - let amap = tcImports.GetImportMap() - let tcEnv = Tc.CreateInitialTcEnv(tcGlobals,amap,initm,ccus) |> (fun tce -> - if tcConfig.checkOverflow then - List.fold (implicitOpen tcGlobals amap initm) tce [lib_MFOperatorsChecked_name] - else - tce) - if verbose then dprintf "--- opening implicit paths\n"; - if verbose then dprintf "--- GetInitialTypecheckerEnv, top modules = %s\n" (String.concat ";" (NameMap.domainL (nenv_of_tenv tcEnv).eModulesAndNamespaces)); - if verbose then dprintf "<-- GetInitialTypecheckerEnv\n"; - tcEnv - -//---------------------------------------------------------------------------- -// TYPECHECK -//-------------------------------------------------------------------------- - -(* The incremental state of type checking files *) -(* REVIEW: clean this up *) - -type topRootedSigs = Zmap.t -type topRootedImpls = QualifiedNameOfFile Zset.t -type TypecheckerSigsAndImpls = TopSigsAndImpls of topRootedSigs * topRootedImpls * ModuleOrNamespaceType * ModuleOrNamespaceType - -let qname_ord (q1:QualifiedNameOfFile) (q2:QualifiedNameOfFile) = compare q1.Text q2.Text - -type tcState = - { tcsCcu: ccu; - tcsCcuType: ModuleOrNamespace; - tcsNiceNameGen: NiceNameGenerator; - tcsTcSigEnv: Tc.tcEnv; - tcsTcImplEnv: Tc.tcEnv; - (* The accumulated results of type checking for this assembly *) - tcsTopSigsAndImpls : TypecheckerSigsAndImpls } - member x.NiceNameGenerator = x.tcsNiceNameGen - member x.TcEnvFromSignatures = x.tcsTcSigEnv - member x.TcEnvFromImpls = x.tcsTcImplEnv - member x.Ccu = x.tcsCcu - - member x.NextStateAfterIncrementalFragment(tcEnvAtEndOfLastInput) = - { x with tcsTcSigEnv = tcEnvAtEndOfLastInput; - tcsTcImplEnv = tcEnvAtEndOfLastInput } - - -let TypecheckInitialState(m,ccuName,tcConfig:TcConfig,tcGlobals,niceNameGen,tcEnv0) = - if verbose then dprintf "Typecheck (constructing initial state)....\n"; - (* Create a ccu to hold all the results of compilation *) - let ccuType = NewCcuContents ScopeRef_local m ccuName (empty_mtype Namespace) - let ccu = - new_ccu ccuName - {ccu_fsharp=true; - ccu_usesQuotations=false; - ccu_filename=None; - ccu_stamp = new_stamp(); - ccu_qname= None; - ccu_code_dir = tcConfig.implicitIncludeDir; - ccu_scoref=ScopeRef_local; - ccu_contents=ccuType; - ccu_forwarders=lazy Map.empty } - - (* OK, is this is the F# library CCU then fix it up. *) - if tcConfig.compilingFslib then - tcGlobals.fslibCcu.Fixup(ccu); - - - { tcsCcu= ccu; - tcsCcuType=ccuType; - tcsNiceNameGen=niceNameGen; - tcsTcSigEnv=tcEnv0; - tcsTcImplEnv=tcEnv0; - tcsTopSigsAndImpls = TopSigsAndImpls (Zmap.empty qname_ord,Zset.empty qname_ord, empty_mtype Namespace, empty_mtype Namespace ) } - -let CheckSimulateException(tcConfig:TcConfig) = - match tcConfig.simulateException with - | Some("tc-oom") -> raise(System.OutOfMemoryException()) - | Some("tc-an") -> raise(System.ArgumentNullException("simulated")) - | Some("tc-invop") -> raise(System.InvalidOperationException()) - | Some("tc-av") -> raise(System.AccessViolationException()) - | Some("tc-aor") -> raise(System.ArgumentOutOfRangeException()) - | Some("tc-dv0") -> raise(System.DivideByZeroException()) - | Some("tc-nfn") -> raise(System.NotFiniteNumberException()) - | Some("tc-oe") -> raise(System.OverflowException()) - | Some("tc-atmm") -> raise(System.ArrayTypeMismatchException()) - | Some("tc-bif") -> raise(System.BadImageFormatException()) - | Some("tc-knf") -> raise(System.Collections.Generic.KeyNotFoundException()) - | Some("tc-ior") -> raise(System.IndexOutOfRangeException()) - | Some("tc-ic") -> raise(System.InvalidCastException()) - | Some("tc-ip") -> raise(System.InvalidProgramException()) - | Some("tc-ma") -> raise(System.MemberAccessException()) - | Some("tc-ni") -> raise(System.NotImplementedException()) - | Some("tc-nr") -> raise(System.NullReferenceException()) - | Some("tc-oc") -> raise(System.OperationCanceledException()) - | Some("tc-fail") -> failwith "simulated" - | _ -> () - - -(* Typecheck a single file or interactive entry into F# Interactive *) -let TypecheckOneInputEventually - checkForNoErrors - (tcConfig:TcConfig) - (tcImports:TcImports) - tcGlobals - prefixPathOpt - (tcState:tcState) - inp = - eventually { - try - CheckSimulateException(tcConfig) - let (TopSigsAndImpls(topRootedSigs,topRootedImpls,allSigModulTyp,allImplementedSigModulTyp)) = tcState.tcsTopSigsAndImpls - let m = range_of_input inp - let amap = tcImports.GetImportMap() - let! (topAttrs, mimpls,tcEnvAtEnd,tcSigEnv,tcImplEnv,topSigsAndImpls,ccuType) = - eventually { - match inp with - | SigFileInput (SigFile(filename,qualNameOfFile, _,_,_) as file) -> - (* Check if we've seen this top module signature before. *) - if Zmap.mem qualNameOfFile topRootedSigs then - errorR(Error("A signature for the file or module "^qualNameOfFile.Text^" has already been specified",start_range_of_range m)); - - (* Check if the implementation came first in compilation order *) - if Zset.mem qualNameOfFile topRootedImpls then - errorR(Error("An implementation of file or module "^qualNameOfFile.Text^" has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer",m)); - - (* Typecheck the signature file *) - if !verboseStamps then - dprintf "---------------------- START CHECK %A ------------\n" filename; - let! (tcEnvAtEnd,tcEnv,smodulTypeTopRooted) = - Tc.TypecheckOneSigFile (tcGlobals,tcState.tcsNiceNameGen,amap,tcState.tcsCcu,checkForNoErrors,tcConfig.conditionalCompilationDefines) tcState.tcsTcSigEnv file - - if !verboseStamps then - dprintf "Type-checked signature:\n%s\n" (Layout.showL (Layout.squashTo 192 (EntityTypeL smodulTypeTopRooted))); - dprintf "---------------------- END CHECK %A ------------\n" filename; - - let topRootedSigs = Zmap.add qualNameOfFile smodulTypeTopRooted topRootedSigs - - // Open the prefixPath for fsi.exe - let tcEnv = - match prefixPathOpt with - | None -> tcEnv - | Some prefixPath -> - let m = qualNameOfFile.Range - TcOpenDecl tcGlobals amap m m tcEnv prefixPath - - (* Build the incremental results *) - let allSigsModulTyp = combine_mtyps [] m [smodulTypeTopRooted;allSigModulTyp] - - let ccuType = - NewCcuContents ScopeRef_local m tcState.tcsCcu.AssemblyName allSigsModulTyp - - if verbose then dprintf "SigFile, nm = %s, qname = %s\n" (demangled_name_of_modul tcState.tcsCcu.Contents) qualNameOfFile.Text; - let res = (EmptyTopAttrs, [],tcEnvAtEnd,tcEnv,tcState.tcsTcImplEnv,TopSigsAndImpls(topRootedSigs,topRootedImpls, allSigModulTyp, allImplementedSigModulTyp ),tcState.tcsCcuType) - return res - - | ImplFileInput (ImplFile(filename,_,qualNameOfFile,_,_,_,_) as file) -> - - // Check if we've got an interface for this fragment - let topRootedSigOpt = topRootedSigs.TryFind(qualNameOfFile) - - if verbose then dprintf "ImplFileInput, nm = %s, qualNameOfFile = %s, ?topRootedSigOpt = %b\n" filename qualNameOfFile.Text (isSome topRootedSigOpt); - - // Check if we've already seen an implementation for this fragment - if Zset.mem qualNameOfFile topRootedImpls then - errorR(Error("An implementation of the file or module "^qualNameOfFile.Text^" has already been given",m)); - - let tcImplEnv = tcState.tcsTcImplEnv - - if !verboseStamps then - dprintf "---------------------- START CHECK %A ------------\n" filename; - // Typecheck the implementation file - let! topAttrs,implFile,tcEnvAtEnd = - Tc.TypecheckOneImplFile (tcGlobals,tcState.tcsNiceNameGen,amap,tcState.tcsCcu,checkForNoErrors,tcConfig.conditionalCompilationDefines) tcImplEnv topRootedSigOpt file - let hadSig = isSome topRootedSigOpt - let implFileSigType = SigTypeOfImplFile implFile - - if !verboseStamps then - dprintf "Implementation signature:\n%s\n" (Layout.showL (Layout.squashTo 192 (EntityTypeL implFileSigType))); - dprintf "---------------------- END CHECK %A ------------\n" filename; - - if verbose then dprintf "done TypecheckOneImplFile...\n"; - let topRootedImpls = Zset.add qualNameOfFile topRootedImpls - - // Only add it to the environment if it didn't have a signature - let m = qualNameOfFile.Range - let tcImplEnv = Tc.AddLocalTopRootedModuleOrNamespace tcGlobals amap m tcImplEnv implFileSigType - let tcSigEnv = - if hadSig then tcState.tcsTcSigEnv - else Tc.AddLocalTopRootedModuleOrNamespace tcGlobals amap m tcState.tcsTcSigEnv implFileSigType - - // Open the prefixPath for fsi.exe - let tcImplEnv = - match prefixPathOpt with - | None -> tcImplEnv - | Some prefixPath -> - TcOpenDecl tcGlobals amap m m tcImplEnv prefixPath - - let allImplementedSigModulTyp = combine_mtyps [] m [implFileSigType; allImplementedSigModulTyp] - - // Add it to the CCU - let ccuType = - // The signature must be reestablished. - // [CHECK: Why? This seriously degraded performance] - NewCcuContents ScopeRef_local m tcState.tcsCcu.AssemblyName allImplementedSigModulTyp - - if verbose then dprintf "done TypecheckOneInputEventually...\n"; - - let topSigsAndImpls = TopSigsAndImpls(topRootedSigs,topRootedImpls,allSigModulTyp,allImplementedSigModulTyp) - let res = (topAttrs,[implFile], tcEnvAtEnd, tcSigEnv, tcImplEnv,topSigsAndImpls,ccuType) - return res } - - return (tcEnvAtEnd,topAttrs,mimpls), - { tcState with - tcsCcuType=ccuType; - tcsTcSigEnv=tcSigEnv; - tcsTcImplEnv=tcImplEnv; - tcsTopSigsAndImpls = topSigsAndImpls } - with e -> - errorRecovery e range0; - return (tcState.TcEnvFromSignatures,EmptyTopAttrs,[]),tcState - } - -let TypecheckOneInput checkForNoErrors tcConfig tcImports tcGlobals prefixPathOpt tcState inp = - // 'use' ensures that the warning handler is restored at the end - use unwind = InstallGlobalErrorLogger(fun oldLogger -> GetErrorLoggerFilteringByScopedPragmas(false,GetScopedPragmasForInput(inp),oldLogger)) - TypecheckOneInputEventually checkForNoErrors tcConfig tcImports tcGlobals prefixPathOpt tcState inp |> Eventually.force - -let TypecheckMultipleInputsFinish(results,tcState:tcState) = - let tcEnvsAtEndFile,topAttrs,mimpls = List.unzip3 results - - let topAttrs = List.foldBack CombineTopAttrs topAttrs EmptyTopAttrs - let mimpls = List.concat mimpls - // This is the environment required by fsi.exe when incrementally adding definitions - let tcEnvAtEndOfLastFile = (match tcEnvsAtEndFile with h :: _ -> h | _ -> tcState.TcEnvFromSignatures) - if verbose then dprintf "done TypecheckMultipleInputs...\n"; - - (tcEnvAtEndOfLastFile,topAttrs,mimpls),tcState - -let TypecheckMultipleInputs(checkForNoErrors,tcConfig:TcConfig,tcImports,tcGlobals,prefixPathOpt,tcState,inputs) = - let results,tcState = List.mapfold (TypecheckOneInput checkForNoErrors tcConfig tcImports tcGlobals prefixPathOpt) tcState inputs - TypecheckMultipleInputsFinish(results,tcState) - -let TypecheckClosedInputSetFinish(mimpls,tcState) = - // Publish the latest contents to the CCU - tcState.tcsCcu.Deref.ccu_contents <- tcState.tcsCcuType; - - // Check all interfaces have implementations - let (TopSigsAndImpls(topRootedSigs,topRootedImpls,_,_)) = tcState.tcsTopSigsAndImpls - topRootedSigs |> Zmap.iter (fun qualNameOfFile y -> - if not (Zset.mem qualNameOfFile topRootedImpls) then - errorR(Error("The signature file "^qualNameOfFile.Text^" does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match", qualNameOfFile.Range))); - if verbose then dprintf "done TypecheckClosedInputSet...\n"; - let tassembly = TAssembly(mimpls) - tcState, tassembly - -let TypecheckClosedInputSet(checkForNoErrors,tcConfig,tcImports,tcGlobals,prefixPathOpt,tcState,inputs) = - // tcEnvAtEndOfLastFile is the environment required by fsi.exe when incrementally adding definitions - let (tcEnvAtEndOfLastFile,topAttrs,mimpls),tcState = TypecheckMultipleInputs (checkForNoErrors,tcConfig,tcImports,tcGlobals,prefixPathOpt,tcState,inputs) - let tcState,tassembly = TypecheckClosedInputSetFinish (mimpls, tcState) - tcState, topAttrs, tassembly, tcEnvAtEndOfLastFile - -type OptionSwitch = - | On - | Off - -type OptionSpec = - | OptionClear of bool ref - | OptionFloat of (float -> unit) - | OptionInt of (int -> unit) - | OptionSwitch of (OptionSwitch -> unit) - | OptionIntList of (int -> unit) - | OptionIntListSwitch of (int -> OptionSwitch -> unit) - | OptionRest of (string -> unit) - | OptionSet of bool ref - | OptionString of (string -> unit) - | OptionStringList of (string -> unit) - | OptionStringListSwitch of (string -> OptionSwitch -> unit) - | OptionUnit of (unit -> unit) - | OptionHelp of (CompilerOptionBlock list -> unit) // like OptionUnit, but given the "options" - | OptionGeneral of (string list -> bool) * (string list -> string list) // Applies? * (ApplyReturningResidualArgs) - -and CompilerOption = CompilerOption of string * string * OptionSpec * Option * string list -and CompilerOptionBlock = PublicOptions of string * CompilerOption list | PrivateOptions of CompilerOption list -let blockOptions = function PublicOptions (heading,opts) -> opts | PrivateOptions opts -> opts - -let filterCompilerOptionBlock pred block = - match block with - | PublicOptions(heading,opts) -> PublicOptions(heading,List.filter pred opts) - | PrivateOptions(opts) -> PrivateOptions(List.filter pred opts) - -let compilerOptionUsage (CompilerOption(s,tag,spec,_,help)) = - let s = if s="--" then "" else s (* s="flag" for "--flag" options. s="--" for "--" option. Adjust printing here for "--" case. *) - match spec with - | (OptionUnit _ | OptionSet _ | OptionClear _ | OptionHelp _) -> sprintf "--%s" s - | OptionStringList f -> sprintf "--%s:%s" s tag - | OptionIntList f -> sprintf "--%s:%s" s tag - | OptionSwitch f -> sprintf "--%s[+|-]" s - | OptionStringListSwitch f -> sprintf "--%s[+|-]:%s" s tag - | OptionIntListSwitch f -> sprintf "--%s[+|-]:%s" s tag - | OptionString f -> sprintf "--%s:%s" s tag - | OptionInt f -> sprintf "--%s:%s" s tag - | OptionFloat f -> sprintf "--%s:%s" s tag - | OptionRest f -> sprintf "--%s ..." s - | OptionGeneral (pred,exec) -> if tag="" then sprintf "%s" s else sprintf "%s:%s" s tag (* still being decided *) - -let printCompilerOption (CompilerOption(s,tag,spec,_,help) as compilerOption) = - let flagWidth = 30 // fixed width for printing of flags, e.g. --warnaserror: - let lineWidth = try System.Console.BufferWidth with e -> 80 - // Lines have this form: - // flagWidth chars - for flags description or padding on continuation lines. - // single space - space. - // description - words upto but excluding the final character of the line. - assert(flagWidth = 30) - printf "%-30s" (compilerOptionUsage compilerOption) - let printWord column (word:string) = - // Have printed upto column. - // Now print the next word including any preceeding whitespace. - // Returns the column printed to (suited to folding). - if column + 1 (*space*) + word.Length >= lineWidth then // NOTE: "equality" ensures final character of the line is never printed - printfn "" (* newline *) - assert(flagWidth = 30) - printf "%-30s %s" ""(*<--flags*) word - flagWidth + 1 + word.Length - else - printf " %s" word - column + 1 + word.Length - let words = (String.concat " " help).Split [| ' ' |] - let finalColumn = Array.fold printWord flagWidth words - printfn "" (* newline *) - -let printPublicOptions (heading,opts) = - if opts<>[] then - printfn "" - printfn "" - printfn "\t\t%s" heading - List.iter printCompilerOption opts - -let printCompilerOptionBlocks blocks = - let equals x y = x=y - let publicBlocks = List.choose (function PrivateOptions _ -> None | PublicOptions (heading,opts) -> Some (heading,opts)) blocks - let consider doneHeadings (heading,opts) = - if Set.mem heading doneHeadings then - doneHeadings - else - let headingOptions = List.filter (fst >> equals heading) publicBlocks |> List.map snd |> List.concat - printPublicOptions (heading,headingOptions) - Set.add heading doneHeadings - List.fold consider Set.empty publicBlocks |> ignore> - -(* For QA *) -let dumpCompilerOption prefix (CompilerOption(str,tag,spec,_,help)) = - printf "section='%-25s' ! option=%-30s kind=" prefix str - match spec with - | OptionUnit _ -> printf "OptionUnit" - | OptionSet _ -> printf "OptionSet" - | OptionClear _ -> printf "OptionClear" - | OptionHelp _ -> printf "OptionHelp" - | OptionStringList _ -> printf "OptionStringList" - | OptionIntList _ -> printf "OptionIntList" - | OptionSwitch _ -> printf "OptionSwitch" - | OptionStringListSwitch _ -> printf "OptionStringListSwitch" - | OptionIntListSwitch _ -> printf "OptionIntListSwitch" - | OptionString _ -> printf "OptionString" - | OptionInt _ -> printf "OptionInt" - | OptionFloat _ -> printf "OptionFloat" - | OptionRest _ -> printf "OptionRest" - | OptionGeneral _ -> printf "OptionGeneral" - printf "\n" -let dumpCompilerOptionBlock = function - | PublicOptions (heading,opts) -> List.iter (dumpCompilerOption heading) opts - | PrivateOptions opts -> List.iter (dumpCompilerOption "NoSection") opts -let dumpCompilerOptionBlocks blocks = List.iter dumpCompilerOptionBlock blocks - - -//---------------------------------------------------------------------------- -// The argument parser is used by both the VS plug-in and the fsc.exe to -// parse the include file path and other front-end arguments. -// -// The language service uses this function too. It's important to continue -// processing flags even if an error is seen in one so that the best possible -// intellisense can be show. -//-------------------------------------------------------------------------- -let ParseCompilerOptions (collectOtherArgument : string -> unit) (blocks: CompilerOptionBlock list) args = - let specs : CompilerOption list = List.collect blockOptions blocks - - // returns a tuple - the option token, the option argument string - let parseOption (s : string) = - // grab the option token - let opts = s.Split([|':'|]) - let mutable opt = opts.[0] - // if it doesn't start with a '-' or '/', reject outright - if opt.[0] <> '-' && opt.[0] <> '/' then - opt <- "" - elif opt <> "--" then - // is it an abbreviated or MSFT-style option? - // if so, strip the first character and move on with your life - if opt.Length = 2 || opt.[0] = '/' then - opt <- opt.[1 ..] - // else, it should be a non-abbreviated option starting with "--" - elif opt.Length > 3 && opt.StartsWith("--") then - opt <- opt.[2 ..] - else - opt <- "" -(* - // is it two characters? If so, strip '-' or '/' from the start - if opt <> "--" && opt.Length > 1 && (opt.[0] = '-' || opt.[0] = '/') then - opt <- opt.[1 ..] - // is it more than two characters? If so, strip "--" or '/' from the start - if opt.Length > 2 && opt.[0] = '-' then // abbreviated options should have only 1 '-' - opt <- opt.[1 ..] -*) - // get the argument string - let optArgs = if opts.Length > 1 then String.Join(":",opts.[1 ..]) else "" - opt, optArgs - - let getOptionArg compilerOption (argString : string) = - if argString = "" then - let es = sprintf "option requires parameter: %s" (compilerOptionUsage compilerOption) - errorR(Error(es,rangeCmdArgs)) ; - argString - - let getOptionArgList compilerOption (argString : string) = - if argString = "" then - let es = sprintf "option requires parameter: %s" (compilerOptionUsage compilerOption) - errorR(Error(es,rangeCmdArgs)) ; - [] - else - argString.Split([|',';';'|]) |> List.of_array - - let getSwitchOpt (opt : string) = - // if opt is a switch, strip the '+' or '-' - if opt <> "--" && opt.Length > 1 && (opt.EndsWith("+",StringComparison.Ordinal) || opt.EndsWith("-",StringComparison.Ordinal)) then - opt.[0 .. opt.Length - 2] - else - opt - - let getSwitch (s: string) = - let s = (s.Split([|':'|])).[0] - if s <> "--" && s.EndsWith("-",StringComparison.Ordinal) then Off else On - - let rec process_arg args = - match args with - | [] -> () - | opt :: t -> - - let optToken, argString = parseOption opt - - let report_deprecated_option deprecated = - match deprecated with - | Some(e) -> warning(e) - | None -> () - - let rec attempt l = - match l with - | (CompilerOption(s, _, OptionHelp f, d, _) :: _) when optToken = s && argString = "" -> - report_deprecated_option d - f blocks; t - | (CompilerOption(s, _, OptionUnit f, d, _) :: _) when optToken = s && argString = "" -> - report_deprecated_option d - f (); t - | (CompilerOption(s, _, OptionSwitch f, d, _) :: _) when getSwitchOpt(optToken) = s && argString = "" -> - report_deprecated_option d - f (getSwitch opt); t - | (CompilerOption(s, _, OptionSet f, d, _) :: _) when optToken = s && argString = "" -> - report_deprecated_option d - f := true; t - | (CompilerOption(s, _, OptionClear f, d, _) :: _) when optToken = s && argString = "" -> - report_deprecated_option d - f := false; t - | (CompilerOption(s, _, OptionString f, d, _) as compilerOption :: _) when optToken = s -> - report_deprecated_option d - let oa = getOptionArg compilerOption argString - if oa <> "" then - f (getOptionArg compilerOption oa) - t - | (CompilerOption(s, _, OptionInt f, d, _) as compilerOption :: _) when optToken = s -> - report_deprecated_option d - let oa = getOptionArg compilerOption argString - if oa <> "" then - f (try int32 (oa) with _ -> - errorR(Error("'"^(getOptionArg compilerOption argString)^"' is not a valid integer argument",rangeCmdArgs)); 0) - t - | (CompilerOption(s, _, OptionFloat f, d, _) as compilerOption :: _) when optToken = s -> - report_deprecated_option d - let oa = getOptionArg compilerOption argString - if oa <> "" then - f (try float (oa) with _ -> - errorR(Error(("'"^getOptionArg compilerOption argString)^"' is not a valid floating point argument", rangeCmdArgs)); 0.0) - t - | (CompilerOption(s, _, OptionRest f, d, _) :: _) when optToken = s -> - report_deprecated_option d - List.iter f t; [] - | (CompilerOption(s, _, OptionIntList f, d, _) as compilerOption :: _) when optToken = s -> - report_deprecated_option d - let al = getOptionArgList compilerOption argString - if al <> [] then - List.iter (fun i -> f (try int32 i with _ -> errorR(Error(("'"^i^"' is not a valid integer argument"),rangeCmdArgs)); 0)) al ; - t - | (CompilerOption(s, _, OptionIntListSwitch f, d, _) as compilerOption :: _) when getSwitchOpt(optToken) = s -> - report_deprecated_option d - let al = getOptionArgList compilerOption argString - if al <> [] then - let switch = getSwitch(opt) - List.iter (fun i -> f (try int32 i with _ -> errorR(Error(("'"^i^"' is not a valid integer argument"),rangeCmdArgs)); 0) switch) al ; - t - // here - | (CompilerOption(s, _, OptionStringList f, d, _) as compilerOption :: _) when optToken = s -> - report_deprecated_option d - let al = getOptionArgList compilerOption argString - if al <> [] then - List.iter (fun s -> f s) (getOptionArgList compilerOption argString) - t - | (CompilerOption(s, _, OptionStringListSwitch f, d, _) as compilerOption :: _) when getSwitchOpt(optToken) = s -> - report_deprecated_option d - let al = getOptionArgList compilerOption argString - if al <> [] then - let switch = getSwitch(opt) - List.iter (fun s -> f s switch) (getOptionArgList compilerOption argString) - t - | (CompilerOption(s, _, OptionGeneral (pred,exec), d, _) :: more) when pred args -> - report_deprecated_option d - let rest = exec args in rest // arguments taken, rest remaining - | (_ :: more) -> attempt more - | [] -> - if (opt.[0] = '-' || opt.[0] = '/') then - // want the whole opt token - delimeter and all - let unrecOpt = sprintf "'%s'" (opt.Split([|':'|]).[0]) - errorR(Error("unrecognized option: "^ unrecOpt,rangeCmdArgs)) ; - t - else - (collectOtherArgument opt; t) - let rest = attempt specs - process_arg rest - - let result = process_arg args - result diff --git a/tools/FSharp_1.9.6.16/source/fsharp/build.mli b/tools/FSharp_1.9.6.16/source/fsharp/build.mli deleted file mode 100644 index c7b99e09..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/build.mli +++ /dev/null @@ -1,539 +0,0 @@ - -// (c) Microsoft Corporation. All rights reserved -#light - -/// Loading initial context, reporting errors etc. -module (* internal *) Microsoft.FSharp.Compiler.Build - -open System.Text -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler - -module Tc = Microsoft.FSharp.Compiler.TypeChecker - -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Infos -open Microsoft.FSharp.Compiler.MSBuildResolver -open Tc -open Microsoft.FSharp.Compiler.Env - -#if DEBUG -val internal showAssertForUnexpectedException : bool ref -#endif - -/// Signature file suffixes -val public sigSuffixes : string list - -/// Implementation file suffixes -val public implSuffixes : string list - -/// Script file suffixes -val public scriptSuffixes : string list - -val public IsScript : string -> bool - -val public IsInvalidPath : string -> bool - -/// File suffixes where #light is the default -val internal lightSyntaxDefaultExtensions : string list - -//---------------------------------------------------------------------------- -// Parsing inputs -//-------------------------------------------------------------------------- - -val public QualFileNameOfUniquePath : range * string list -> Ast.QualifiedNameOfFile - -val public PrependPathToInput : Ast.ident list -> Ast.input -> Ast.input - -val internal ParseInput : (UnicodeLexing.Lexbuf -> Parser.token) * ErrorLogger * UnicodeLexing.Lexbuf * string option * string * canContainEntryPoint: bool -> Ast.input - -//---------------------------------------------------------------------------- -// Errors -//-------------------------------------------------------------------------- - -type ErrorStyle = - | DefaultErrors - | EmacsErrors - | TestErrors - | VSErrors - - -val internal RangeOfError : exn -> range option -val internal SplitRelatedErrors : exn -> exn * exn list -val public OutputException : StringBuilder -> exn -> bool -> unit -val public SanitizeFileName : filename:string -> implicitIncludeDir:string -> string -val public OutputErrorOrWarning : implicitIncludeDir:string * showFullPaths: bool * flattenErrors: bool * errorStyle: ErrorStyle * warning:bool -> StringBuilder -> exn -> unit -val public OutputErrorOrWarningContext : prefix:string -> fileLineFunction:(string -> int -> string) -> StringBuilder -> exn -> unit - - -//---------------------------------------------------------------------------- -// Options and configuration -//-------------------------------------------------------------------------- - -// For command-line options that can be suffixed with +/- -type public OptionSwitch = - | On - | Off - -/// The spec value describes the action of the argument, -/// and whether it expects a following parameter. -type OptionSpec = - | OptionClear of bool ref - | OptionFloat of (float -> unit) - | OptionInt of (int -> unit) - | OptionSwitch of (OptionSwitch -> unit) - | OptionIntList of (int -> unit) - | OptionIntListSwitch of (int -> OptionSwitch -> unit) - | OptionRest of (string -> unit) - | OptionSet of bool ref - | OptionString of (string -> unit) - | OptionStringList of (string -> unit) - | OptionStringListSwitch of (string -> OptionSwitch -> unit) - | OptionUnit of (unit -> unit) - | OptionHelp of (CompilerOptionBlock list -> unit) // like OptionUnit, but given the "options" - | OptionGeneral of (string list -> bool) * (string list -> string list) // Applies? * (ApplyReturningResidualArgs) -and CompilerOption = CompilerOption of string * string * OptionSpec * Option * string list -and CompilerOptionBlock = PublicOptions of string * CompilerOption list | PrivateOptions of CompilerOption list - -val printCompilerOptionBlocks : CompilerOptionBlock list -> unit // for printing usage -val dumpCompilerOptionBlocks : CompilerOptionBlock list -> unit // for QA -val filterCompilerOptionBlock : (CompilerOption -> bool) -> CompilerOptionBlock -> CompilerOptionBlock - -exception public AssemblyNotResolved of (*originalName*) string * range -exception public FileNameNotResolved of (*filename*) string * (*description of searched locations*) string * range -exception public DeprecatedCommandLineOption of string * string * range -exception HashLoadedSourceHasIssues of (*warnings*) exn list * (*errors*) exn list * range -exception HashLoadedScriptConsideredSource of range - -type AssemblyReference = - | AssemblyReference of range * string - member Range : range - member Text : string - -type AssemblyResolution = { - /// The original reference to the assembly. - originalReference : AssemblyReference - /// Path to the resolvedFile - resolvedPath : string - /// Search path used to find this spot. - resolvedFrom : ResolvedFrom - /// Long fusion name of the assembly - fusionName : string - /// Version of the assembly like 4.0.0.0 - fusionVersion : string - /// Name of the redist, if any, that the assembly was found in. - redist : string - /// Whether or not this is an installed system assembly (for example, System.dll) - sysdir : bool - } - -type target = - | WinExe - | ConsoleExe - | Dll - | Module - member IsExe : bool - -type ResolveLibFileMode = - | Speculative - | ReportErrors - -type VersionFlag = - | VersionString of string - | VersionFile of string - | VersionNone - member GetVersionInfo : (*implicitIncludeDir:*)string -> ILVersionInfo - member GetVersionString : (*implicitIncludeDir:*)string -> string - - -type public TcConfigBuilder = - { mutable mscorlibAssemblyName: string; - mutable autoResolveOpenDirectivesToDlls: bool; - mutable noFeedback: bool; - mutable implicitIncludeDir: string; - mutable openBinariesInMemory: bool; - mutable openDebugInformationForLaterStaticLinking: bool; - defaultFSharpBinariesDir: string; - mutable compilingFslib: bool; - mutable useIncrementalBuilder: bool; - mutable includes: string list; - mutable implicitOpens: string list; - mutable useFsiAuxLib: bool; - mutable framework: bool; - mutable resolutionEnvironment : ResolutionEnvironment - mutable implicitlyResolveAssemblies : bool - /// Set if the user has explicitly turned indentation-aware syntax on/off - mutable light: bool option; - mutable conditionalCompilationDefines: string list; - /// Sources added into the build with #load - mutable loadedSources: (range * string) list; - - mutable referencedDLLs: AssemblyReference list; - optimizeForMemory: bool; - mutable inputCodePage: int option; - mutable embedResources : string list; - mutable globalWarnAsError: bool; - mutable globalWarnLevel: int; - mutable specificWarnOff: int list; - mutable specificWarnAsError: int list - mutable mlCompatibility:bool; - mutable checkOverflow:bool; - mutable showReferenceResolutions:bool; - mutable outputFile : string option; - mutable resolutionFrameworkRegistryBase : string; - mutable resolutionAssemblyFoldersSuffix : string; - mutable resolutionAssemblyFoldersConditions : string; - mutable platform : ILPlatform option - mutable useMonoResolution : bool - mutable target : target - mutable debuginfo : bool - mutable debugSymbolFile : string option - mutable typeCheckOnly : bool - mutable parseOnly : bool - mutable simulateException : string option - mutable printAst : bool - mutable tokenizeOnly : bool - mutable testInteractionParser : bool - mutable reportNumDecls : bool - mutable printSignature : bool - mutable printSignatureFile : string - mutable xmlDocOutputFile : string option - mutable generateHtmlDocs : bool - mutable htmlDocDirectory : string option - mutable htmlDocCssFile : string option - mutable htmlDocNamespaceFile : string option - mutable htmlDocAppendFlag : bool - mutable htmlDocLocalLinks : bool - mutable stats : bool - mutable generateFilterBlocks : bool - mutable signer : string option - mutable container : string option - mutable delaysign : bool - mutable version : VersionFlag - mutable standalone : bool - mutable extraStaticLinkRoots : string list - mutable noSignatureData : bool - mutable onlyEssentialOptimizationData : bool - mutable useOptimizationDataFile : bool - mutable jitTracking : bool - mutable ignoreSymbolStoreSequencePoints : bool - mutable internConstantStrings : bool - mutable generateConfigFile : bool - mutable extraOptimizationIterations : int - mutable win32res : string - mutable win32manifest : string - mutable includewin32manifest : bool - mutable linkResources : string list - mutable showFullPaths : bool - mutable errorStyle : ErrorStyle - mutable utf8output : bool - mutable flatErrors : bool - mutable maxErrors : int - mutable abortOnError : bool - mutable baseAddress : int32 option - #if DEBUG - mutable writeGeneratedILFiles : bool (* write il files? *) - mutable showOptimizationData : bool -#endif - mutable showTerms : bool - mutable writeTermsToFiles : bool - mutable doDetuple : bool - mutable doTLR : bool - mutable optsOn : bool - mutable optSettings : Opt.OptimizationSettings - mutable product : string - mutable showBanner : bool - mutable showTimes : bool - mutable pause : bool } - static member CreateNew : string * bool * string -> TcConfigBuilder - member DecideNames : string list -> (*outfile*)string * (*pdbfile*)string option * (*assemblyName*)string - member TurnWarningOff : range * string -> unit - member AddIncludePath : range * string -> unit - member AddReferencedAssemblyByPath : range * string -> unit - member AddLoadedSource : range * string -> unit - member AddEmbeddedResource : string -> unit - - static member SplitCommandLineResourceInfo : string -> string * string * ILResourceAccess - - - -[] -// Immutable TcConfig -type public TcConfig = - member mscorlibAssemblyName: string; - member autoResolveOpenDirectivesToDlls: bool; - member noFeedback: bool; - member implicitIncludeDir: string; - member openBinariesInMemory: bool; - member openDebugInformationForLaterStaticLinking: bool; - member fsharpBinariesDir: string; - member compilingFslib: bool; - member useIncrementalBuilder: bool; - member includes: string list; - member implicitOpens: string list; - member useFsiAuxLib: bool; - member framework: bool; - member implicitlyResolveAssemblies : bool - /// Set if the user has explicitly turned indentation-aware syntax on/off - member light: bool option; - member conditionalCompilationDefines: string list; - /// Sources added into the build with #load - member loadedSources: (range * string) list; - - member referencedDLLs: AssemblyReference list; - member optimizeForMemory: bool; - member inputCodePage: int option; - member embedResources : string list; - member globalWarnAsError: bool; - member globalWarnLevel: int; - member specificWarnOff: int list; - member specificWarnAsError: int list - member mlCompatibility:bool; - member checkOverflow:bool; - member showReferenceResolutions:bool; - member outputFile : string option; - member resolutionFrameworkRegistryBase : string; - member resolutionAssemblyFoldersSuffix : string; - member resolutionAssemblyFoldersConditions : string; - member platform : ILPlatform option - member useMonoResolution : bool - member target : target - member debuginfo : bool - member debugSymbolFile : string option - member typeCheckOnly : bool - member parseOnly : bool - member simulateException : string option - member printAst : bool - member tokenizeOnly : bool - member testInteractionParser : bool - member reportNumDecls : bool - member printSignature : bool - member printSignatureFile : string - member xmlDocOutputFile : string option - member generateHtmlDocs : bool - member htmlDocDirectory : string option - member htmlDocCssFile : string option - member htmlDocNamespaceFile : string option - member htmlDocAppendFlag : bool - member htmlDocLocalLinks : bool - member stats : bool - member generateFilterBlocks : bool - member signer : string option - member container : string option - member delaysign : bool - member version : VersionFlag - member standalone : bool - member extraStaticLinkRoots : string list - member noSignatureData : bool - member onlyEssentialOptimizationData : bool - member useOptimizationDataFile : bool - member jitTracking : bool - member ignoreSymbolStoreSequencePoints : bool - member internConstantStrings : bool - member generateConfigFile : bool - member extraOptimizationIterations : int - member win32res : string - member win32manifest : string - member includewin32manifest : bool - member linkResources : string list - member showFullPaths : bool - member errorStyle : ErrorStyle - member utf8output : bool - member flatErrors : bool - - member maxErrors : int - member baseAddress : int32 option -#if DEBUG - member writeGeneratedILFiles : bool (* write il files? *) - member showOptimizationData : bool -#endif - member showTerms : bool - member writeTermsToFiles : bool - member doDetuple : bool - member doTLR : bool - member optSettings : Opt.OptimizationSettings - member optsOn : bool - member product : string - member showBanner : bool - member showTimes : bool - member pause : bool - - - member ComputeLightSyntaxInitialStatus : string -> bool - member ComputeSyntaxFlagRequired : string -> bool - member ClrRoot : string list - - /// Get the loaded sources that exist and issue a warning for the ones that don't - member GetAvailableLoadedSources : unit -> (range*string) list - - member ComputeCanContainEntryPoint : sourceFiles:string list -> bool list - - /// File system query based on TcConfig settings - member ResolveSourceFile : range * string -> string - /// File system query based on TcConfig settings - member MakePathAbsolute : string -> string - static member Create : TcConfigBuilder * validate: bool -> TcConfig - - - -//---------------------------------------------------------------------------- -// Tables of referenced DLLs -//-------------------------------------------------------------------------- - -type public ImportedBinary = - { FileName: string; - IsFSharpBinary: bool; - RawMetadata: ILModuleDef; - ILAssemblyRefs : ILAssemblyRef list; - ILScopeRef: ILScopeRef ;} - -type public ImportedAssembly = - { ILScopeRef: ILScopeRef; - FSharpViewOfMetadata: Tast.ccu; - AssemblyAutoOpenAttributes: string list; - AssemblyInternalsVisibleToAttributes: string list; - FSharpOptimizationData : Lazy> } - -type UnresolvedReference = UnresolvedReference of string * AssemblyReference list - -[] -type TcAssemblyResolutions = - member GetAssemblyResolutions : unit -> AssemblyResolution list - - static member SplitNonFoundationalResolutions : TcConfig -> AssemblyResolution list * AssemblyResolution list * UnresolvedReference list - static member BuildFromPriorResolutions : TcConfig * AssemblyResolution list -> TcAssemblyResolutions - - -[] -type TcConfigProvider = - static member Constant : TcConfig -> TcConfigProvider - static member BasedOnMutableBuilder : TcConfigBuilder -> TcConfigProvider - -[] -type TcImports = - interface System.IDisposable - //new : TcImports option -> TcImports - member SetBase : TcImports -> unit - member GetCcuInfos : unit -> ImportedAssembly list - member GetCcusInDeclOrder : unit -> ccu list - member FindDllInfo : range * string -> ImportedBinary - member FindCcuFromAssemblyRef : range * ILAssemblyRef -> Tast.CcuResolutionResult - member AssemblyLoader : Import.AssemblyLoader - member GetImportMap : unit -> Import.ImportMap - - /// File system query based on TcConfig settings - member TryResolveLibFile : AssemblyReference * ResolveLibFileMode -> OperationResult - /// File system query based on TcConfig settings - member ResolveLibFile : AssemblyReference * ResolveLibFileMode -> AssemblyResolution - - static member BuildFrameworkTcImports : TcConfigProvider * AssemblyResolution list -> TcGlobals * TcImports - static member BuildNonFrameworkTcImports : TcConfigProvider * TcGlobals * TcImports * AssemblyResolution list -> TcImports - static member BuildTcImports : TcConfigProvider -> TcGlobals * TcImports - -//---------------------------------------------------------------------------- -// Special resources in DLLs -//-------------------------------------------------------------------------- - -val public IsSignatureDataResource : ILResource -> bool -val public IsOptDataResource : ILResource -> bool -val public IsReflectedDefinitionsResource : ILResource -> bool - -val public WriteSignatureData : TcConfig * TcGlobals * Tastops.Remap * ccu * string -> ILResource -val public WriteOptData : TcGlobals -> string -> Tast.ccu * Opt.LazyModuleInfo -> ILResource - -//---------------------------------------------------------------------------- -// -//-------------------------------------------------------------------------- - - -val public GetNameOfScopeRef : ILScopeRef -> string -val public GetNameOfILModule : ILModuleDef -> string - -val public GetFSharpCoreLibraryName : unit -> string -val public GetFSharpPowerPackLibraryName : unit -> string - -//---------------------------------------------------------------------------- -// Finding and requiring DLLs -//-------------------------------------------------------------------------- - -val public RequireDLL : TcImports -> tcEnv -> range -> string -> tcEnv * (ImportedBinary list * ImportedAssembly list) - -//---------------------------------------------------------------------------- -// Processing # commands -//-------------------------------------------------------------------------- - -val public ProcessMetaCommandsFromInput : - ('a -> range * string -> 'a) * - ('a -> range * string -> 'a) * - ('a -> range * string -> unit) -> TcConfigBuilder -> Ast.input -> 'a -> 'a - - -val public GetScopedPragmasForInput : Ast.input -> ScopedPragma list -val public GetErrorLoggerFilteringByScopedPragmas : checkFile:bool * ScopedPragma list * ErrorLogger -> ErrorLogger - -val public ApplyMetaCommandsFromInputToTcConfig : TcConfig -> Ast.input -> TcConfig -val public GetResolvedAssemblyInformation : TcConfig -> AssemblyResolution list - -//---------------------------------------------------------------------------- -// Loading the default library sets -//-------------------------------------------------------------------------- - -val public coreFramework : string list -val public extendedFramework : string list -val public scriptingFramework : string list - -//---------------------------------------------------------------------------- -// Type checking and querying the type checking state -//-------------------------------------------------------------------------- - -val public GetInitialTypecheckerEnv : string option -> range -> TcConfig -> TcImports -> TcGlobals -> tcEnv - -type topRootedSigs = (QualifiedNameOfFile, Tast.ModuleOrNamespaceType) Zmap.t - -[] -type tcState = - member NiceNameGenerator : Ast.NiceNameGenerator - member Ccu : Tast.ccu - member TcEnvFromSignatures : tcEnv - member NextStateAfterIncrementalFragment : tcEnv -> tcState - member TcEnvFromImpls : tcEnv - -val public TypecheckInitialState : - range * string * TcConfig * TcGlobals * Ast.NiceNameGenerator * tcEnv -> tcState - -val public TypecheckOneInputEventually : - (unit -> bool) -> TcConfig -> TcImports -> TcGlobals - -> Ast.LongIdent option -> tcState -> Ast.input - -> Eventually<(tcEnv * topAttribs * Tast.TypedImplFile list) * tcState> - -val public TypecheckMultipleInputsFinish : - (tcEnv * topAttribs * 'a list) list * tcState - -> (tcEnv * topAttribs * 'a list) * tcState - -val public TypecheckMultipleInputs : - (unit -> bool) * TcConfig * TcImports * TcGlobals * Ast.LongIdent option * tcState * Ast.input list - -> (tcEnv * topAttribs * Tast.TypedImplFile list) * tcState - -val public TypecheckClosedInputSetFinish : - TypedImplFile list * tcState - -> tcState * TypedAssembly - -val public TypecheckClosedInputSet : - (unit -> bool) * TcConfig * TcImports * TcGlobals * Ast.LongIdent option * tcState * Ast.input list - -> tcState * topAttribs * Tast.TypedAssembly * tcEnv - - -val public ParseCompilerOptions : (string -> unit) -> CompilerOptionBlock list -> string list -> unit -val public ReportWarning : int -> int list -> exn -> bool -val public ReportWarningAsError : int -> int list -> int list -> bool -> exn -> bool - -val public highestInstalledNetFrameworkVersionMajorMinor : unit -> int * string diff --git a/tools/FSharp_1.9.6.16/source/fsharp/check.ml b/tools/FSharp_1.9.6.16/source/fsharp/check.ml deleted file mode 100644 index c9456ba0..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/check.ml +++ /dev/null @@ -1,1078 +0,0 @@ - -#light - -module internal Microsoft.FSharp.Compiler.PostTypecheckSemanticChecks - -open System.Collections.Generic -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler - -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Layout -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.Typrelns -open Microsoft.FSharp.Compiler.Infos - -//-------------------------------------------------------------------------- -// TestHooks - for dumping range to support source transforms -//-------------------------------------------------------------------------- - -let testFlagMemberBody = ref false -let testHookMemberBody membInfo expr = - if !testFlagMemberBody then - let m = range_of_expr expr in - printf "TestMemberBody,%A,%s,%d,%d,%d,%d\n" - (membInfo.MemberFlags.MemberKind) - (file_of_range m) - (start_line_of_range m) - (start_col_of_range m) - (end_line_of_range m) - (end_col_of_range m) - -//-------------------------------------------------------------------------- -// NOTES: byref safety checks -//-------------------------------------------------------------------------- - -(* - The .NET runtime has safety requirements on the use of byrefs. - These include: - A1: No generic type/method can be instantiated with byref types (meaning contains byref type). - A2: No object field may be byref typed. - - In F# TAST level, byref types can be introduced/consumed at: - B1: lambda ... (v:byref) ... -- binding sites for values. - B2: &m -- address of operator, where m is local mutable or reference cell. - B3: ms.M() -- method calls on mutable structs. - B4: *br -- dereference byref - B5: br <- x -- assign byref - B6: expr@[byrefType] -- any type instantiation could introduce byref types. - B7: asm -- TExpr_asm forms that create/consume byrefs. - a) I_ldfld expr - b) I_stfld - c) others TBD... work in progress. - - Closures imply objects. - Closures are either: - a) explicit lambda expressions. - b) functions partially applied below their known arity. - - Checks: - C1: check no instantiation can contain byref types. - C2: check type declarations to ensure no object field will have byref type. - C3: check no explicit lambda expressions capture any free byref typed expression. - C4: check byref type expr occur only as: - C4.a) arg to functions occuring within their known arity. - C4.b) arg to IL method calls, e.g. arising from calls to instance methods on mutable structs. - C4.c) arg to property getter on mutable struct (record field projection) - C4.d) rhs of byref typed binding (aliasing). - Note [1] aliasing should not effect safety. The restrictions on RHS byref will also apply to alias. - Note [2] aliasing happens in the generated hash/compare code. - C5: when is a byref-typed-binding acceptable? - a) if it will be a method local, ok. - b) if it will be a top-level value stored as a field, then no. [These should have arity info]. - - Check commentary: - The C4 checks ensure byref expressions are only passed directly as method arguments (or aliased). - The C3 check ensures byref expressions are never captured, e.g. passed as direct method arg under a capturing thunk. - The C2 checks no type can store byrefs (C4 ensures F# code would never actually store them). - The C1 checks no generic type could be instanced to store byrefs. -*) - -//-------------------------------------------------------------------------- -// NOTES: rethrow safety checks -//-------------------------------------------------------------------------- - -(* "rethrow may only occur with-in the body of a catch handler". - -- Section 4.23. Part III. CLI Instruction Set. ECMA Draft 2002. - - 1. rethrow() calls are converted to TOp_rethrow in the type checker. - 2. any remaining rethrow val_refs will be first class uses. These are trapped. - 3. The freevars track free TOp_rethrow (they are bound (cleared) at try-catch handlers). - 4. An outermost expression is not contained in a try-catch handler. - These may not have unbound rethrows. - Outermost expressions occur at: - * module bindings. - * attribute arguments. - * Any more? What about fields of a static class? - 5. A lambda body (from lambda-expression or method binding) will not occur under a try-catch handler. - These may not have unbound rethrows. - 6. All other constructs are assumed to generate IL code sequences. - For correctness, this claim needs to be justified. - - Q: Do any post check rewrite passes factor expressions out to other functions? - A1. The optimiser may introduce auxillary functions, e.g. by splitting out match-branches. - This should not be done if the refactored body contains an unbound rethrow. - A2. TLR? Are any expression factored out into functions? - - Informal justification: - If a rethrow occurs, then it is minimally contained by either: - a) a try-catch - accepted. - b) a lambda expression - rejected. - c) none of the above - rejected as when checking outmost expressions. -*) - - - -//-------------------------------------------------------------------------- -// check environment -//-------------------------------------------------------------------------- - -type env = - { boundTypars: Typar list; - /// "module remap info", i.e. hiding information down the signature chain, used to compute what's hidden by a signature - mrmi: (Remap * SignatureHidingInfo) list; - /// Constructor limited - are we in the prelude of a constructor, prior to object initialization - limited: bool; - /// Are we in a quotation? - quote : bool; } - -let BindTypar env tyv = { env with boundTypars= tyv::env.boundTypars } - -let BindTypars env (tps:Typar list) = - if isNil tps then env else - // Here we mutate to provide better names for generalized type parameters - let nms = PrettyTypes.PrettyTyparNames (fun _ -> true) (env.boundTypars |> List.map (fun tp -> tp.Name) ) tps - (tps,nms) ||> List.iter2 (fun tp nm -> - if PrettyTypes.NeedsPrettyTyparName tp then - tp.Data.typar_id <- ident (nm,tp.Range)); - List.fold BindTypar env tps - -type cenv = - { mutable boundVals: Set; - mutable potentialUnboundUsesOfVals: Map; - g: TcGlobals; - amap: Import.ImportMap; - /// For reading metadata - infoReader: InfoReader; - internalsVisibleToPaths : CompilationPath list; - denv: DisplayEnv; - viewCcu : ccu; - reportErrors: bool; - canContainEntryPoint : bool; - // outputs - mutable usesQuotations : bool - mutable entryPointGiven:bool } - -let BindVal cenv (v:Val) = - //printfn "binding %s..." v.DisplayName - cenv.boundVals <- cenv.boundVals.Add(v.Stamp) -let BindVals cenv vs = List.iter (BindVal cenv) vs - -//-------------------------------------------------------------------------- -// check for byref types -//-------------------------------------------------------------------------- - -let exists_ty pred typ = - let res = ref false - let visitType ty = if pred ty then res := true - let visitTypar tp = () - let visitTraitSolution tp = () - typ |> IterType (visitType,visitTypar,visitTraitSolution); - !res - -let is_byref_like_ty g ty = - match try_tcref_of_stripped_typ g ty with - | None -> false - | Some tcref -> - tcref_eq g g.byref_tcr tcref || - tcref_eq g g.system_TypedReference_tcref tcref || - tcref_eq g g.system_ArgIterator_tcref tcref || - tcref_eq g g.system_RuntimeArgumentHandle_tcref tcref - -let contains_byref_ty cenv typ = exists_ty (is_byref_like_ty cenv.g) typ -let contains_void_ty cenv typ = exists_ty (is_void_typ cenv.g) typ - - -//-------------------------------------------------------------------------- -// check captures under lambdas -//-------------------------------------------------------------------------- - -/// This is the definition of what can/can't be free in a lambda expression. This is checked at lambdas OR TBind(v,e) nodes OR TObjExprMethod nodes. -/// For TBind(v,e) nodes we may know an 'arity' which gives as a larger set of legitimate syntactic arguments for a lambda. -/// For TObjExprMethod(v,e) nodes we always know the legitimate syntactic arguments. -let CheckEscapes cenv allowProtected syntacticArgs body = - if cenv.reportErrors then - let cant_be_free v = - // First, if v is a syntactic argument, then it can be free since it was passed in. - // The following can not be free: - // a) "Local" mutables, being mutables such that: - // i) the mutable has no arity (since arity implies top-level storage, top level mutables...) - // Note: "this" arguments to instance members on mutable structs are mutable arguments. - // b) BaseVal can never escape. - // c) Byref typed values can never escape. - - // These checks must correspond to the tests governing the error messages below. - let passedIn = ListSet.mem vspec_eq v syntacticArgs - if passedIn then - false - else - (v.IsMutable && v.TopValInfo.IsNone) || - (v.BaseOrThisInfo = BaseVal && not passedIn) || - (is_byref_like_ty cenv.g v.Type) - - let frees = free_in_expr CollectLocals body - let fvs = frees.FreeLocals - if not allowProtected && frees.UsesMethodLocalConstructs then - errorR(Error("A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope",range_of_expr body)) - elif Zset.exists cant_be_free fvs then - let v = List.find cant_be_free (Zset.elements fvs) - (* byref error before mutable error (byrefs are mutable...). *) - if (is_byref_like_ty cenv.g v.Type) then - // Inner functions are not guaranteed to compile to method with a predictable arity (number of arguments). - // As such, partial applications involving byref arguments could lead to closures containing byrefs. - // For safety, such functions are assumed to have no known arity, and so can not accept byrefs. - errorR(Error("The byref-typed variable '"^v.DisplayName^"' is used in an invalid way. Byrefs may not be captured by closures or passed to inner functions",range_of_expr body)) - elif v.IsMutable then - errorR(Error("The mutable variable '"^v.DisplayName^"' is used in an invalid way. Mutable variables may not be captured by closures. Consider eliminating this use of mutation or using a heap-allocated mutable reference cell via 'ref' and '!'",range_of_expr body)) - elif v.BaseOrThisInfo = BaseVal then - errorR(Error("The 'base' keyword is used in an invalid way. Base calls may not be used in closures. Consider using a private member to make base calls",range_of_expr body)) - else - errorR(InternalError("The variable '"^v.DisplayName^"' is used in an invalid way",range_of_expr body)) (* <- should be dead code, unless governing tests change *) - - -//-------------------------------------------------------------------------- -// check type access -//-------------------------------------------------------------------------- - -let access_internals_visible_to_as_internal thisCompPath internalsVisibleToPaths access = - // Each internalsVisibleToPath is a compPath for the internals of some assembly. - // Replace those by the compPath for the internals of this assembly. - // This makes those internals visible here, but still internal. Bug://3737 - List.fold - (fun access internalsVisibleToPath -> access_subst_paths (thisCompPath,internalsVisibleToPath) access) - access internalsVisibleToPaths - -let CheckTypeForAccess (cenv:cenv) objName valAcc m ty = - if cenv.reportErrors then - let visitType ty = - match try_tcref_of_stripped_typ cenv.g ty with - | None -> () - | Some tcref -> - let thisCompPath = cpath_of_ccu cenv.viewCcu - let tyconAcc = tcref.Accessibility |> access_internals_visible_to_as_internal thisCompPath cenv.internalsVisibleToPaths - if IsLessAccessible tyconAcc valAcc then - errorR(Error(Printf.sprintf "The type '%s' is less accessible than the value, member or type '%s' it is used in" tcref.DisplayName (objName()),m)) - let visitTypar tp = () - let visitTraitSolution tp = () - ty |> IterType (visitType,visitTypar,visitTraitSolution) - -//-------------------------------------------------------------------------- -// check type instantiations -//-------------------------------------------------------------------------- - -/// Check types occuring in the TAST. -let CheckType permitByrefs (cenv:cenv) (env:env) m ty = - if cenv.reportErrors then - let checkByrefs = not permitByrefs - let containsVoid = ref false - let containsByref = ref false - let visitType ty = - if checkByrefs && is_byref_like_ty cenv.g ty then containsByref := true - if is_void_typ cenv.g ty then containsVoid := true - let visitTypar tp = () - let visitTraitSolution info = - match info with - | FSMethSln(_,vref,_) -> - //printfn "considering %s..." vref.DisplayName - if vref_in_this_assembly cenv.g.compilingFslib vref && not (cenv.boundVals.Contains(vref.Stamp)) then - //printfn "recording %s..." vref.DisplayName - cenv.potentialUnboundUsesOfVals <- cenv.potentialUnboundUsesOfVals.Add(vref.Stamp,m) - | _ -> () - ty |> IterType (visitType,visitTypar,visitTraitSolution); - - if !containsVoid then - errorR(Error("'System.Void' can only be used as 'typeof' in F#",m)) - if !containsByref then - errorR(Error("A type instantiation involves a byref type. This is not permitted by the .NET runtime",m)) - -/// Check types occuring in TAST (like CheckType) and additionally reject any byrefs. -/// The additional byref checks are to catch "byref instantiations" - one place were byref are not permitted. -let CheckTypeNoByrefs (cenv:cenv) env m ty = CheckType false cenv env m ty -let CheckTypePermitByrefs (cenv:cenv) env m ty = CheckType true cenv env m ty - -let CheckTypeInstNoByrefs (cenv:cenv) env m tyargs = - tyargs |> List.iter (CheckTypeNoByrefs cenv env m) - -let CheckTypeInstPermitByrefs (cenv:cenv) env m tyargs = - tyargs |> List.iter (CheckType true cenv env m) - -//-------------------------------------------------------------------------- -// check exprs etc -//-------------------------------------------------------------------------- - -type context = - /// Tuple of contexts allowing byref typed expr - | KnownArityTuple of int - /// Context allows for byref typed expr - | DirectArg - /// General (byref type expr not allowed) - | GeneralContext - -let mkKnownArity n = if n=1 then DirectArg else KnownArityTuple n - -let argAritiesOfVal (vref:ValRef) = - match vref.TopValInfo with - | Some topValInfo -> List.map mkKnownArity topValInfo.AritiesOfArgs - | None -> [] - -let rec argAritiesOfFunExpr x = - match x with - | TExpr_val (vref,_,_) -> argAritiesOfVal vref (* recognise val *) - | TExpr_link eref -> argAritiesOfFunExpr !eref (* step through reclink *) - | TExpr_app(f,fty,tyargs,[],m) -> argAritiesOfFunExpr f (* step through instantiations *) - | TExpr_op(TOp_coerce,_,[f],_) -> argAritiesOfFunExpr f (* step through subsumption coercions *) - | _ -> [] - -let CheckNoRethrow cenv (body:expr) = - if cenv.reportErrors then - if (free_in_expr CollectLocals body).UsesUnboundRethrow then - errorR(Error("This expression contains a call to rethrow. Rethrow may only occur directly in a handler of a try-with. Rethrow may not be factored to a separate method or delayed under a lambda expression",range_of_expr body)) - -let is_splice g v = g.vref_eq v g.splice_expr_vref || g.vref_eq v g.splice_raw_expr_vref - -let rec CheckExpr (cenv:cenv) (env:env) expr = CheckExprInContext cenv env expr GeneralContext -and CheckVal (cenv:cenv) (env:env) v m context = - if cenv.reportErrors then - if is_splice cenv.g v && not env.quote then errorR(Error("Expression-splicing operators may only be used within quotations",m)); - if is_splice cenv.g v then errorR(Error("First-class uses of the expression-splicing operator are not permitted",m)); - if cenv.g.vref_eq v cenv.g.addrof_vref then errorR(Error("First-class uses of the address-of operators are not permitted",m)); - if cenv.g.vref_eq v cenv.g.addrof2_vref then errorR(Error("First-class uses of the address-of operators are not permitted",m)); - if cenv.g.vref_eq v cenv.g.rethrow_vref then errorR(Error("First-class uses of the rethrow function is not permitted",m)); - if is_byref_like_ty cenv.g v.Type then - // byref typed val can only occur in permitting contexts - if context <> DirectArg then errorR(Error("The byref typed value '" ^ v.DisplayName ^ "' may not be used at this point",m)) - CheckTypePermitByrefs cenv env m v.Type -and CheckExprInContext (cenv:cenv) (env:env) expr (context:context) = - // dprintf "CheckExpr: %s\n" (showL(ExprL expr)); - let expr = strip_expr expr in - match expr with - | TExpr_seq (e1,e2,dir,_,_) -> - CheckExpr cenv env e1; - CheckExpr cenv (if dir=ThenDoSeq then {env with limited=false} else env) e2 - | TExpr_let (bind,body,m,_) -> - CheckBinding cenv env bind ; - BindVal cenv (var_of_bind bind) - CheckExpr cenv env body - | TExpr_const (c,m,ty) -> - CheckTypePermitByrefs cenv env m ty - - | TExpr_val (v,vFlags,m) -> - if cenv.reportErrors then - if v.BaseOrThisInfo = BaseVal then - errorR(Error("'base' values may only be used to make direct calls to the base implementations of overridden members",m)) - - CheckVal cenv env v m context - - | TExpr_quote(ast,savedConv,m,ty) -> - CheckExpr cenv {env with quote=true} ast; - if cenv.reportErrors then - cenv.usesQuotations <- true - try - let conv = Creflect.ConvExprPublic (cenv.g, cenv.amap, cenv.viewCcu) Creflect.empty_env ast - match !savedConv with - | None -> savedConv:= Some conv - | Some _ -> () - with Creflect.InvalidQuotedTerm e -> - errorRecovery e m - - CheckTypeNoByrefs cenv env m ty - - | TExpr_obj (_,typ,basev,superInitCall,overrides,iimpls,m,_) -> - CheckExpr cenv env superInitCall; - CheckMethods cenv env basev overrides ; - CheckInterfaceImpls cenv env basev iimpls; - CheckTypePermitByrefs cenv env m typ - - // Allow base calls to F# methods - | TExpr_app((TExpr_val(v,vFlags,_) as f),fty,tyargs,(TExpr_val(baseVal,_,_)::rest),m) - when vFlags = VSlotDirectCall && baseVal.BaseOrThisInfo = BaseVal -> - // dprintfn "GOT BASE VAL USE" - CheckVal cenv env v m GeneralContext - CheckVal cenv env baseVal m GeneralContext - CheckTypePermitByrefs cenv env m fty; - CheckTypeInstPermitByrefs cenv env m tyargs; - CheckExprsInContext cenv env rest (argAritiesOfFunExpr f) - - // Allow base calls to IL methods - | TExpr_op (TOp_ilcall ((virt,protect,valu,newobj,superInit,prop,isDllImport,boxthis,mref),enclTypeArgs,methTypeArgs,tys),tyargs,(TExpr_val(baseVal,_,_)::rest),m) - when not virt && baseVal.BaseOrThisInfo = BaseVal -> - CheckTypeInstNoByrefs cenv env m tyargs; - CheckTypeInstNoByrefs cenv env m enclTypeArgs; - CheckTypeInstNoByrefs cenv env m methTypeArgs; - CheckTypeInstNoByrefs cenv env m tys; - CheckVal cenv env baseVal m GeneralContext - CheckExprDirectArgs cenv env rest - - | TExpr_op (c,tyargs,args,m) -> - CheckExprOp cenv env (c,tyargs,args,m) context - - // Allow 'typeof' calls as a special case, the only accepted use of System.Void! - | TExpr_app(TExpr_val(vref,_,_),_,[ty],[],m) when (is_typeof_vref cenv.g vref || is_typedefof_vref cenv.g vref ) && is_void_typ cenv.g ty -> - () // typeof allowed. Special case. No further checks. - - // Allow '%expr' in quotations - | TExpr_app(TExpr_val(vref,_,_),_,tinst,[arg],m) when is_splice cenv.g vref && env.quote -> - CheckTypeInstPermitByrefs cenv env m tinst; - CheckExpr cenv env arg - - - | TExpr_app(f,fty,tyargs,argsl,m) -> - // dprintfn "NO BASE VAL USE" - CheckTypeInstNoByrefs cenv env m tyargs; - CheckTypePermitByrefs cenv env m fty; - CheckTypeInstPermitByrefs cenv env m tyargs; - CheckExpr cenv env f; - CheckExprsInContext cenv env argsl (argAritiesOfFunExpr f) - - (* REVIEW: fold the next two cases together *) - | TExpr_lambda(lambda_id,basevopt,argvs,body,m,rty,_) -> - let topValInfo = TopValInfo ([],[argvs |> List.map (fun _ -> TopValInfo.unnamedTopArg1)],TopValInfo.unnamedRetVal) in - Option.iter (BindVal cenv) basevopt - BindVals cenv argvs - List.iter (type_of_val >> CheckTypePermitByrefs cenv env m) argvs; - CheckTypePermitByrefs cenv env m rty; - let ty = mk_multi_lambda_ty m argvs rty in - CheckLambdas None cenv env false topValInfo expr m ty - - | TExpr_tlambda(lambda_id,tps,body,m,rty,_) -> - let topValInfo = TopValInfo (TopValInfo.InferTyparInfo tps,[],TopValInfo.unnamedRetVal) in - CheckTypePermitByrefs cenv env m rty; - let ty = try_mk_forall_ty tps rty in - CheckLambdas None cenv env false topValInfo expr m ty - - | TExpr_tchoose(tps,e1,m) -> - CheckExpr cenv env e1 - - | TExpr_match(_,_,dtree,targets,m,ty,_) -> - CheckTypeNoByrefs cenv env m ty; - CheckDecisionTree cenv env dtree; - CheckDecisionTreeTargets cenv env m ty targets; - | TExpr_letrec (binds,e,m,_) -> - BindVals cenv (List.map var_of_bind binds) - CheckBindings cenv env binds; - CheckExpr cenv env e - | TExpr_static_optimization (constraints,e2,e3,m) -> - CheckExpr cenv env e2; - CheckExpr cenv env e3; - constraints |> List.iter (fun (TTyconEqualsTycon(ty1,ty2)) -> - CheckTypeNoByrefs cenv env m ty1; - CheckTypeNoByrefs cenv env m ty2) - | TExpr_link eref -> - failwith "Unexpected reclink" - -and CheckMethods cenv env basevopt l = List.iter (CheckMethod cenv env basevopt) l -and CheckMethod cenv env basevopt (TObjExprMethod(slotsig,tps,vs,e,m) as ObjExprMethod) = - let env = BindTypars env tps - let vs = List.concat vs - CheckNoRethrow cenv e; - CheckEscapes cenv true (match basevopt with Some x -> x:: vs | None -> vs) e; - CheckExpr cenv env e - -and CheckInterfaceImpls cenv env basevopt l = - l |> List.iter (CheckInterfaceImpl cenv env basevopt) - -and CheckInterfaceImpl cenv env basevopt (ty,overrides) = - CheckMethods cenv env basevopt overrides - - -and CheckExprOp cenv env (op,tyargs,args,m) context = - let limitedCheck() = - if env.limited then errorR(Error("Object constructors may not directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by the .NET IL",m)); - List.iter (CheckTypePermitByrefs cenv env m) tyargs; - (* Special cases *) - match op,tyargs,args,context with - // Handle these as special cases since mutables are allowed inside their bodies - | TOp_while _,_,[TExpr_lambda(_,_,[_],e1,_,_,_);TExpr_lambda(_,_,[_],e2,_,_,_)],_ -> - CheckTypeInstNoByrefs cenv env m tyargs; - CheckExprs cenv env [e1;e2] - - | TOp_try_finally _,[_],[TExpr_lambda(_,_,[_],e1,_,_,_); TExpr_lambda(_,_,[_],e2,_,_,_)],_ -> - CheckTypeInstNoByrefs cenv env m tyargs; - limitedCheck(); - CheckExprs cenv env [e1;e2] - - | TOp_for(_),_,[TExpr_lambda(_,_,[_],e1,_,_,_);TExpr_lambda(_,_,[_],e2,_,_,_);TExpr_lambda(_,_,[_],e3,_,_,_)],_ -> - CheckTypeInstNoByrefs cenv env m tyargs; - CheckExprs cenv env [e1;e2;e3] - - | TOp_try_catch _,[_],[TExpr_lambda(_,_,[_],e1,_,_,_); TExpr_lambda(_,_,[_],e2,_,_,_); TExpr_lambda(_,_,[_],e3,_,_,_)],_ -> - CheckTypeInstNoByrefs cenv env m tyargs; - limitedCheck(); - CheckExprs cenv env [e1;e2;e3] - - | TOp_ilcall ((virt,protect,valu,newobj,superInit,prop,isDllImport,boxthis,mref),enclTypeArgs,methTypeArgs,tys),_,_,_ -> - CheckTypeInstNoByrefs cenv env m tyargs; - CheckTypeInstNoByrefs cenv env m enclTypeArgs; - CheckTypeInstNoByrefs cenv env m methTypeArgs; - CheckTypeInstNoByrefs cenv env m tys; - CheckExprDirectArgs cenv env args - - | TOp_tuple,_,_,KnownArityTuple nArity -> (* tuple expression in known tuple context *) - if cenv.reportErrors then - if List.length args <> nArity then - errorR(InternalError("Tuple arity does not correspond to planned function argument arity",m)); - (* This tuple should not be generated. The known function arity means it just bundles arguments. *) - CheckExprDirectArgs cenv env args - | TOp_lval_op(LGetAddr,v),_,_,arity -> - if arity = DirectArg then - CheckExprs cenv env args (* Address-of operator generates byref, and context permits this. *) - else - if cenv.reportErrors then - errorR(Error("The address of the variable '" ^ v.DisplayName ^"' may not be used at this point",m)) - | TOp_rfield_get rf,_,[arg1],arity -> - CheckTypeInstNoByrefs cenv env m tyargs; - CheckExprDirectArgs cenv env [arg1] (* See mk_recd_field_get_via_expra -- byref arg1 when #args =1 *) - (* Property getters on mutable structs come through here. *) - | TOp_rfield_set rf,_,[arg1;arg2],arity -> - CheckTypeInstNoByrefs cenv env m tyargs; - CheckExprDirectArgs cenv env [arg1]; (* See mk_recd_field_set_via_expra -- byref arg1 when #args=2 *) - CheckExprs cenv env [arg2] (* Property setters on mutable structs come through here (TBC). *) - | TOp_coerce,[ty1;ty2],[x],arity -> - CheckTypeInstNoByrefs cenv env m tyargs; - CheckExprInContext cenv env x context - | TOp_rethrow,[ty1],[],arity -> - CheckTypeInstNoByrefs cenv env m tyargs - | TOp_field_get_addr rfref,tyargs,[],_ -> - if context <> DirectArg && cenv.reportErrors then - errorR(Error("The address of the static field '"^rfref.FieldName^"' may not be used at this point",m)); - CheckTypeInstNoByrefs cenv env m tyargs - (* NOTE: there are no arg exprs to check in this case *) - | TOp_field_get_addr rfref,tyargs,[rx],_ -> - if context <> DirectArg && cenv.reportErrors then - errorR(Error("The address of the field '"^rfref.FieldName^"' may not be used at this point",m)); - (* This construct is used for &(rx.rfield) and &(rx->rfield). Relax to permit byref types for rx. [See Bug 1263]. *) - CheckTypeInstNoByrefs cenv env m tyargs; - CheckExprInContext cenv env rx DirectArg (* allow rx to be byref here *) - | TOp_asm (instrs,tys),_,_,_ -> - CheckTypeInstPermitByrefs cenv env m tys; - CheckTypeInstNoByrefs cenv env m tyargs; - begin - match instrs,args with - | [ I_stfld (alignment,vol,fspec) ],[lhs;rhs] -> - CheckExprInContext cenv env lhs DirectArg; (* permit byref for lhs lvalue *) - CheckExpr cenv env rhs - | [ I_ldfld (alignment,vol,fspec) ],[lhs] -> - CheckExprInContext cenv env lhs DirectArg (* permit byref for lhs lvalue *) - | [ I_ldflda (fspec) | I_ldsflda (fspec) ],[lhs] -> - if context <> DirectArg && cenv.reportErrors then - errorR(Error("The address of the field '"^fspec.Name^"' may not be used at this point",m)); - CheckExprInContext cenv env lhs DirectArg (* permit byref for lhs lvalue *) - | [ I_ldelema _ ],[lhs] -> - if context <> DirectArg && cenv.reportErrors then - errorR(Error("The address of an array element may not be used at this point",m)); - CheckExprInContext cenv env lhs DirectArg (* permit byref for lhs lvalue *) - | instrs -> - CheckExprs cenv env args - end - | ( TOp_tuple - | TOp_ucase _ - | TOp_exnconstr _ - | TOp_array - | TOp_bytes _ - | TOp_uint16s _ - | TOp_recd _ - | TOp_rfield_set _ - | TOp_ucase_tag_get _ - | TOp_ucase_proof _ - | TOp_ucase_field_get _ - | TOp_ucase_field_set _ - | TOp_exnconstr_field_get _ - | TOp_exnconstr_field_set _ - | TOp_tuple_field_get _ - | TOp_get_ref_lval - | TOp_trait_call _ - | _ (* catch all! *) - ),_,_,_ -> - CheckTypeInstNoByrefs cenv env m tyargs; - CheckExprs cenv env args - -and CheckLambdas memInfo cenv env inlined topValInfo e m ety = - CheckTypePermitByrefs cenv env m ety; - // The topValInfo here says we are _guaranteeing_ to compile a function value - // as a .NET method with precisely the corresponding argument counts. - match e with - | TExpr_tchoose(tps,e1,m) -> - let env = BindTypars env tps - CheckLambdas memInfo cenv env inlined topValInfo e1 m ety - - | TExpr_lambda (lambda_id,_,_,_,m,_,_) - | TExpr_tlambda(lambda_id,_,_,m,_,_) -> - - let tps,basevopt,vsl,body,bodyty = dest_top_lambda_upto cenv.g cenv.amap topValInfo (e, ety) in - let env = BindTypars env tps - let vspecs = (Option.to_list basevopt @ List.concat vsl) in - vspecs |> List.iter (CheckValSpec cenv env m); - - // Allow access to protected things within members - match memInfo with - | None -> () - | Some membInfo -> - testHookMemberBody membInfo body; - - CheckEscapes cenv (isSome(memInfo)) vspecs body; - CheckNoRethrow cenv body; (* no rethrow under lambda expression *) - CheckExpr cenv env body; - if not inlined && contains_byref_ty cenv bodyty && cenv.reportErrors then - if List.length vsl = 0 then - errorR(Error("The type of a first-class function may not contain byrefs",m)) - else - errorR(Error("A method return type would contain byrefs which is not permitted",m)) - | _ -> - if not inlined && is_byref_like_ty cenv.g ety then - CheckExprInContext cenv env e DirectArg (* allow byref to occur as RHS of byref binding. *) - else - CheckExpr cenv env e - -and CheckExprsInContext cenv env exprs arities = - let arities = Array.of_list arities - let argArity i = if i < Array.length arities then arities.[i] else GeneralContext - exprs |> List.iteri (fun i exp -> CheckExprInContext cenv env exp (argArity i)) - -and CheckExprs cenv env exprs = - exprs |> List.iter (CheckExpr cenv env) - -and CheckFlatExprs cenv env exprs = - exprs |> FlatList.iter (CheckExpr cenv env) - -and CheckExprDirectArgs cenv env exprs = - exprs |> List.iter (fun x -> CheckExprInContext cenv env x DirectArg) - -and CheckDecisionTreeTargets cenv env m ty targets = - targets |> Array.iter (CheckDecisionTreeTarget cenv env m ty) - -and CheckDecisionTreeTarget cenv env m ty (TTarget(vs,e,_)) = CheckExpr cenv env e; - -and CheckDecisionTree cenv env x = - match x with - | TDSuccess (es,n) -> CheckFlatExprs cenv env es; - | TDBind(bind,rest) -> CheckBinding cenv env bind; CheckDecisionTree cenv env rest - | TDSwitch (e,cases,dflt,m) -> CheckDecisionTreeSwitch cenv env (e,cases,dflt,m) - -and CheckDecisionTreeSwitch cenv env (e,cases,dflt,m) = - CheckExpr cenv env e; - List.iter (fun (TCase(discrim,e)) -> CheckDecisionTreeTest cenv env m discrim; CheckDecisionTree cenv env e) cases; - Option.iter (CheckDecisionTree cenv env) dflt - -and CheckDecisionTreeTest cenv env m discrim = - match discrim with - | TTest_unionconstr (ucref,tinst) -> CheckTypeInstPermitByrefs cenv env m tinst - | TTest_array_length (n,typ) -> CheckTypePermitByrefs cenv env m typ - | TTest_const _ -> () - | TTest_isnull -> () - | TTest_isinst (srcTyp,dstTyp) -> (CheckTypePermitByrefs cenv env m srcTyp; CheckTypePermitByrefs cenv env m dstTyp) - | TTest_query (exp,tys,_,_,_) -> () - -and CheckAttrib cenv env (Attrib(_,k,args,props,m)) = - props |> List.iter (fun (AttribNamedArg(nm,ty,flg,expr)) -> CheckAttribExpr cenv env expr); - args |> List.iter (CheckAttribExpr cenv env) - -and CheckAttribExpr cenv env (AttribExpr(expr,vexpr)) = - CheckExpr cenv env expr; - CheckExpr cenv env vexpr; - CheckNoRethrow cenv expr; - CheckAttribValue cenv env vexpr - -and CheckAttribValue cenv env expr = - match expr with - - (* Detect standard constants *) - | TExpr_const(c,m,_) -> - match c with - | TConst_bool _ - | TConst_int32 _ - | TConst_sbyte _ - | TConst_int16 _ - | TConst_int32 _ - | TConst_int64 _ - | TConst_byte _ - | TConst_uint16 _ - | TConst_uint32 _ - | TConst_uint64 _ - | TConst_float _ - | TConst_float32 _ - | TConst_char _ - | TConst_zero _ - | TConst_string _ -> () - | _ -> - if cenv.reportErrors then - errorR (Error ( "This constant may not be used as a custom attribute value",m)) - - | TExpr_op(TOp_array,[elemTy],args,m) -> - List.iter (CheckAttribValue cenv env) args - | TExpr_app(TExpr_val(vref,_,_),_,[ty],[],m) when (is_typeof_vref cenv.g vref || is_typedefof_vref cenv.g vref) -> - () - | TExpr_op(TOp_coerce,_,[arg],_) -> - CheckAttribValue cenv env arg - | TExpr_app(TExpr_val(vref,_,_),_,_,[arg1],_) when cenv.g.vref_eq vref cenv.g.enum_vref -> - CheckAttribValue cenv env arg1 - (* Detect bitwise or of attribute flags: one case of constant folding (a more general treatment is needed *) - | BitwiseOr cenv.g (arg1,arg2) -> - CheckAttribValue cenv env arg1; - CheckAttribValue cenv env arg2 - | _ -> - if cenv.reportErrors then - errorR (Error ("invalid custom attribute value (not a constant or literal)",range_of_expr expr)) - -and CheckAttribs cenv env (attribs: Attribs) = - if isNil attribs then () else - let tcrefs = [ for (Attrib(tcref,k,_,_,m)) in attribs -> (tcref,m) ] - - // Check for violations of allowMultiple = false - let duplicates = - tcrefs - |> Seq.group_by (fun (tcref,m) -> tcref.Stamp) - |> Seq.map (fun (_,elems) -> List.last (List.of_seq elems), Seq.length elems) - |> Seq.filter (fun (_,count) -> count > 1) - |> Seq.map fst - |> Seq.to_list - // Filter for allowMultiple = false - |> List.filter (fun (tcref,m) -> - let (AttribInfo(tref,_)) = cenv.g.attrib_AttributeUsageAttribute - let allowMultiple = - TyconRefTryBindAttrib cenv.g cenv.g.attrib_AttributeUsageAttribute tcref - (fun (_,named) -> named |> List.tryPick (function ("AllowMultiple",_,_,CustomElem_bool res) -> Some res | _ -> None)) - (fun (Attrib(_,_,_,named,_)) -> named |> List.tryPick (function AttribNamedArg("AllowMultiple",_,_,AttribBoolArg(res) ) -> Some res | _ -> None)) - - (allowMultiple <> Some(true))) - if cenv.reportErrors then - for (tcref,m) in duplicates do - errorR(Error("The attribute type '"^tcref.DisplayName ^"' has 'AllowMultiple=false'. Multiple instances of this attribute may not be attached to a single language element",m)) - - attribs |> List.iter (CheckAttrib cenv env) - -and CheckValInfo cenv env (TopValInfo(_,args,ret)) = - args |> List.iterSquared (CheckArgInfo cenv env); - ret |> CheckArgInfo cenv env; - -and CheckArgInfo cenv env (TopArgInfo(attribs,_)) = - CheckAttribs cenv env attribs - -and CheckValSpec cenv env m (v:Val) = - v.Attribs |> CheckAttribs cenv env; - v.TopValInfo |> Option.iter (CheckValInfo cenv env); - v.Type |> CheckTypePermitByrefs cenv env m - -and CheckBinding cenv env (TBind(v,e,_) as bind) = - //printfn "visiting %s..." v.DisplayName - match cenv.potentialUnboundUsesOfVals.TryFind(v.Stamp) with - | None -> () - | Some m -> - let nm = v.DisplayName - errorR(Error(sprintf "The member '%s' is used in an invalid way. A use of '%s' has been inferred prior to its definition at or near '%s'. This is an invalid forward reference" nm nm (string_of_range m), v.Range)) - - v.Type |> CheckTypePermitByrefs cenv env v.Range; - v.Attribs |> CheckAttribs cenv env; - v.TopValInfo |> Option.iter (CheckValInfo cenv env); - if (v.IsMemberOrModuleBinding || v.IsMember) && not v.IsIncrClassGeneratedMember then - let access = - if IsHiddenVal env.mrmi v then - let (TAccess(l)) = v.Accessibility - // FSharp 1.0 bug 1908: Values hidden by signatures are implicitly at least 'internal' - let scoref = v.MemberActualParent.CompilationPath.ILScopeRef - (TAccess(CompPath(scoref,[])::l)) - else - v.Accessibility - v.Type |> CheckTypeForAccess cenv (fun () -> NicePrint.string_of_qualified_val_spec cenv.denv v) access v.Range; - - let env = if v.IsConstructor && not v.IsIncrClassConstructor then { env with limited=true } else env - - if cenv.reportErrors then - if is_byref_like_ty cenv.g v.Type && isSome (chosen_arity_of_bind bind) then - errorR(Error("A byref typed value would be stored here. Top-level let-bound byref values are not permitted",v.Range)); - - // Check top-level let-bound values (arity=0 so not compiled not method) for byref types (not allowed) - match chosen_arity_of_bind bind with - | Some info when info.HasNoArgs && contains_byref_ty cenv v.Type -> - errorR(Error("A byref typed value would be stored here. Top-level let-bound byref values are not permitted",v.Range)) - | _ -> () - - if isSome v.PublicPath then - if HasAttrib cenv.g cenv.g.attrib_ReflectedDefinitionAttribute v.Attribs then - cenv.usesQuotations <- true - (* If we've already recorded a definition then skip this *) - match v.ReflectedDefinition with - | None -> v.Data.val_defn <- Some e - | Some _ -> () - // Run the conversion process over the reflected definition to report any errors in the - // front end rather than the back end. We currenly re-run this during ilxgen.ml but there's - // no real need for that except that it helps us to bundle all reflected definitions up into - // one blob for pickling to the binary format - try - let ety = type_of_expr cenv.g e - let tps,taue,tauty = - match e with - | TExpr_tlambda (_,tps,b,_,_,_) -> tps,b,reduce_forall_typ cenv.g ety (List.map mk_typar_ty tps) - | _ -> [],e,ety - let env = Creflect.BindTypars Creflect.empty_env tps - let nng = NiceNameGenerator () - let _,argExprs,_ = Creflect.ConvExprPublic (cenv.g,cenv.amap,cenv.viewCcu) env taue - if nonNil(argExprs) then - errorR(Error("[] terms may not contain uses of the prefix splice operator '%'",v.Range)); - let crenv = Creflect.mk_cenv (cenv.g,cenv.amap,cenv.viewCcu) - Creflect.ConvMethodBase crenv env v |> ignore - with - | Creflect.InvalidQuotedTerm e -> - errorR(e) - - match v.MemberInfo with - | Some memberInfo when not v.IsIncrClassGeneratedMember -> - match memberInfo.MemberFlags.MemberKind with - - | (MemberKindPropertySet | MemberKindPropertyGet) -> - // These routines raise errors for ill-formed properties - v |> ReturnTypeOfPropertyVal cenv.g |> ignore - v |> ArgInfosOfPropertyVal cenv.g |> ignore - | _ -> - () - - | _ -> () - - - let topValInfo = match chosen_arity_of_bind bind with Some info -> info | _ -> TopValInfo.emptyValData in - let inlined = v.MustInline in - (* certain inline functions are permitted to have byref return types, since they never compile to records. *) - (* e.g. for the byref operator itself, &. *) - CheckLambdas v.MemberInfo cenv env inlined topValInfo e v.Range v.Type; - -and CheckBindings cenv env xs = FlatList.iter (CheckBinding cenv env) xs - -// Top binds introduce expression, check they are rethrow free. -let CheckTopBinding cenv env (TBind(v,e,_) as bind) = - let isExplicitEntryPoint = HasAttrib cenv.g cenv.g.attrib_EntryPointAttribute v.Attribs - if isExplicitEntryPoint then - cenv.entryPointGiven <- true; - if not cenv.canContainEntryPoint && cenv.reportErrors then - errorR(Error("A function labelled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence",v.Range)) - CheckNoRethrow cenv e; - CheckBinding cenv env bind - -let CheckTopBindings cenv env binds = FlatList.iter (CheckTopBinding cenv env) binds - -//-------------------------------------------------------------------------- -// check tycons -//-------------------------------------------------------------------------- - -let CheckRecdField cenv env (tycon:Tycon) (rfield:RecdField) = - CheckTypeForAccess cenv (fun () -> rfield.Name) rfield.Accessibility rfield.Range rfield.FormalType; - CheckTypePermitByrefs cenv env rfield.Range rfield.FormalType; - CheckAttribs cenv env rfield.PropertyAttribs; - CheckAttribs cenv env rfield.FieldAttribs; - if contains_byref_ty cenv rfield.FormalType && cenv.reportErrors then - errorR(Error("A type would store a byref typed value. This is not permitted by the .NET runtime",tycon.Range)) - -let CheckTypeDefn cenv env (tycon:Tycon) = - let m = tycon.Range in - CheckAttribs cenv env tycon.Attribs; - - if cenv.reportErrors then begin - if not tycon.IsTypeAbbrev then - let typ = (snd (generalize_tcref (mk_local_tcref tycon))) - let allVirtualMethsInParent = - match SuperTypeOfType cenv.g cenv.amap m typ with - | Some super -> - GetIntrinsicMethInfosOfType cenv.infoReader (None,AccessibleFromSomewhere) PreferOverrides m super - |> List.filter (fun minfo -> minfo.IsVirtual) - | None -> [] - - let immediateMeths = GetImmediateIntrinsicMethInfosOfType (None,AccessibleFromSomewhere) cenv.g cenv.amap m typ - let immediateProps = GetImmediateIntrinsicPropInfosOfType (None,AccessibleFromSomewhere) cenv.g cenv.amap m typ - - let getHash (hash:Dictionary) nm = - if hash.ContainsKey(nm) then hash.[nm] else [] - - let hashOfAllMeths = new Dictionary() - let hashOfAllProps = new Dictionary() - for minfo in immediateMeths do - let nm = minfo.LogicalName - let m = (match minfo.ArbitraryValRef with None -> m | Some vref -> vref.DefinitionRange) - let others = getHash hashOfAllMeths nm - // abstract/default pairs of duplicate methods are OK - let IsAbstractDefaultPair (x:MethInfo) (y:MethInfo) = - x.IsDispatchSlot && y.IsDefiniteFSharpOverride - let IsAbstractDefaultPair2 (minfo:MethInfo) (minfo2:MethInfo) = - IsAbstractDefaultPair minfo minfo2 || IsAbstractDefaultPair minfo2 minfo - let checkForDup erasureFlag minfo2 = - - not (IsAbstractDefaultPair2 minfo minfo2) - && minfo.IsInstance = minfo2.IsInstance - && MethInfosEquivByNameAndSig erasureFlag cenv.g cenv.amap m minfo minfo2 - - if others |> List.exists (checkForDup EraseAll) then - let suffix = if others |> List.exists (checkForDup EraseNone) then "" else " once tuples, functions and/or units of measure are erased" - errorR(Error(sprintf "Duplicate method. The method '%s' has the same name and signature as another method in this type%s" nm suffix,m)) - - if minfo.NumArgs.Length > 1 && others |> List.exists (fun minfo2 -> not (IsAbstractDefaultPair2 minfo minfo2)) then - errorR(Error(sprintf "The method '%s' has curried arguments but has the same name as another method in this type. Methods with curried arguments may not be overloaded. Consider using a method taking tupled arguments." nm,m)) - - if minfo.NumArgs.Length > 1 && ParamAttribsOfMethInfo cenv.amap m minfo |> List.existsSquared (fun (isParamArrayArg, isOutArg, optArgInfo) -> isParamArrayArg || isOutArg || optArgInfo <> NotOptional) then - errorR(Error(sprintf "Methods with curried arguments may not declare out arguments, 'ParamArray' arguments or optional arguments",m)) - - - hashOfAllMeths.[nm] <- minfo::others - for pinfo in immediateProps do - let nm = pinfo.PropertyName - let m = (match pinfo.ArbitraryValRef with None -> m | Some vref -> vref.DefinitionRange) - if hashOfAllMeths.ContainsKey(nm) then - errorR(Error(sprintf "Name clash. The property '%s' has the same name as a method in this type" nm,m)) - let others = getHash hashOfAllProps nm - if pinfo.HasGetter && pinfo.HasSetter && (pinfo.GetterMethod.IsVirtual <> pinfo.SetterMethod.IsVirtual) then - errorR(Error(sprintf "The property '%s' has getter and a setter that do not match. If one is abstract then the other must be as well" nm ,m)) - let checkForDup erasureFlag pinfo2 = - // abstract/default pairs of duplicate properties are OK - let IsAbstractDefaultPair (x:PropInfo) (y:PropInfo) = - x.IsDispatchSlot && y.IsDefiniteFSharpOverride - - not (IsAbstractDefaultPair pinfo pinfo2 || IsAbstractDefaultPair pinfo2 pinfo) - && pinfo.IsStatic = pinfo2.IsStatic - && PropInfosEquivByNameAndSig erasureFlag cenv.g cenv.amap m pinfo pinfo2 - - if others |> List.exists (checkForDup EraseAll) then - let suffix = if others |> List.exists (checkForDup EraseNone) then "" else " once tuples, functions and/or units of measure are erased" - errorR(Error(sprintf "Duplicate property. The property '%s' has the same name and signature as another property in this type%s" nm suffix,m)) - hashOfAllProps.[nm] <- pinfo::others - - if not (is_interface_typ cenv.g typ) then - let hashOfAllMethsInParent = new Dictionary() - for minfo in allVirtualMethsInParent do - let nm = minfo.LogicalName - let others = getHash hashOfAllMethsInParent nm - hashOfAllMethsInParent.[nm] <- minfo::others - for minfo in immediateMeths do - if minfo.IsDispatchSlot then - let nm = minfo.LogicalName - let m = (match minfo.ArbitraryValRef with None -> m | Some vref -> vref.DefinitionRange) - let parentMethsOfSameName = getHash hashOfAllMethsInParent nm - let checkForDup erasureFlag minfo2 = MethInfosEquivByNameAndSig erasureFlag cenv.g cenv.amap m minfo minfo2 - //if minfo.NumArgs.Length > 1 then - // warning(Error(sprintf "Abstract methods taking curried arguments Duplicate method. The method '%s' has curried arguments but has the same name as another method in this type. Methods with curried arguments may not be overloaded" nm,(match minfo.ArbitraryValRef with None -> m | Some vref -> vref.DefinitionRange))) - if parentMethsOfSameName |> List.exists (checkForDup EraseAll) then - let suffix = if parentMethsOfSameName |> List.exists (checkForDup EraseNone) then "" else " once tuples, functions and/or units of measure are erased" - errorR(Error(sprintf "Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type%s" nm suffix,m)) - - end; - - // Considers TFsObjModelRepr, TRecdRepr and TFiniteUnionRepr. - // [Review] are all cases covered: TILObjModelRepr,TAsmRepr. [Yes - these are FSharp.Core.dll only] - tycon.AllFieldsArray |> Array.iter (CheckRecdField cenv env tycon); - vslot_vals_of_tycons [tycon] |> List.iter (type_of_val >> CheckTypePermitByrefs cenv env m); (* check vslots = abstract slots *) - implements_of_tycon cenv.g tycon |> List.iter (CheckTypePermitByrefs cenv env m); (* check implemented interface types *) - super_of_tycon cenv.g tycon |> CheckTypePermitByrefs cenv env m; (* check super type *) - if tycon.IsUnionTycon then (* This covers finite unions. *) - tycon.UnionCasesAsList |> List.iter (fun uc -> - CheckAttribs cenv env uc.Attribs; - uc.RecdFields |> List.iter (CheckRecdField cenv env tycon)) - - let checkAccess ty = CheckTypeForAccess cenv (fun () -> tycon.DisplayNameWithUnderscoreTypars) tycon.Accessibility tycon.Range ty - vslot_vals_of_tycons [tycon] |> List.iter (type_of_val >> checkAccess); (* check vslots = abstract slots *) - super_of_tycon cenv.g tycon |> checkAccess - implements_of_tycon cenv.g tycon |> List.iter checkAccess - if tycon.IsFSharpDelegateTycon then - match tycon.TypeReprInfo with - | Some (TFsObjModelRepr r) -> - match r.fsobjmodel_kind with - | TTyconDelegate ss -> - //ss.ClassTypars - //ss.MethodTypars - ss.FormalReturnType |> Option.iter checkAccess; - ss.FormalParams |> List.iterSquared (fun (TSlotParam(_,ty,_,_,_,_)) -> checkAccess ty) - | _ -> () - | _ -> () - - - let interfaces = AllSuperTypesOfType cenv.g cenv.amap tycon.Range (generalize_tcref (mk_local_tcref tycon) |> snd) |> List.filter (is_interface_typ cenv.g) - - if cenv.reportErrors then - if not tycon.IsTypeAbbrev then - let firstInterfaceWithMultipleGenericInstantiations = - interfaces |> List.tryPick (fun typ1 -> - interfaces |> List.tryPick (fun typ2 -> - if // same nominal type - tcref_eq cenv.g (tcref_of_stripped_typ cenv.g typ1) (tcref_of_stripped_typ cenv.g typ2) && - // different instantiations - not (type_equiv_aux EraseAll cenv.g typ1 typ2) - then Some (typ1,typ2) - else None)) - - match firstInterfaceWithMultipleGenericInstantiations with - | None -> () - | Some (typ1,typ2) -> - errorR(Error(sprintf "This type implements or inherits the same interface at different generic instantiations '%s' and '%s'. This is not permitted in this version of F#" (NicePrint.pretty_string_of_typ cenv.denv typ1) (NicePrint.pretty_string_of_typ cenv.denv typ2),tycon.Range)) - - // Check struct fields. We check these late because we have to have first checked that the structs are - // free of cycles - if tycon.IsStructTycon then - tycon.AllInstanceFieldsAsList |> List.iter (fun f -> - (* Check if it's marked unsafe *) - let zeroInitUnsafe = TryFindBoolAttrib cenv.g cenv.g.attrib_DefaultValueAttribute f.FieldAttribs - if zeroInitUnsafe = Some(true) then - let ty' = snd(generalize_tcref (mk_local_tcref tycon)) - if not (TypeHasDefaultValue cenv.g ty') then - errorR(Error("The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check",m)); - ) - match tycon.TypeAbbrev with (* And type abbreviations *) - | None -> () - | Some typ -> - if contains_byref_ty cenv typ then - errorR(Error("The type abbreviation contains byrefs. This is not permitted by F#",tycon.Range)) - -let CheckTypeDefns cenv env tycons = List.iter (CheckTypeDefn cenv env) tycons - -//-------------------------------------------------------------------------- -// check modules -//-------------------------------------------------------------------------- - -let rec CheckModuleExpr cenv env x = - match x with - | TMTyped(mty,def,m) -> - let (rpi,mhi) = mk_mdef_to_mtyp_remapping def mty - let env = { env with mrmi = (mk_repackage_remapping rpi,mhi) :: env.mrmi } - CheckDefnInModule cenv env def - -and CheckDefnsInModule cenv env x = x |> List.iter (CheckDefnInModule cenv env) - -and CheckNothingAfterEntryPoint cenv m = - if cenv.entryPointGiven && cenv.reportErrors then - errorR(Error("A function labelled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence",m)) - -and CheckDefnInModule cenv env x = - match x with - | TMDefRec(tycons,binds,mspecs,m) -> - CheckNothingAfterEntryPoint cenv m - BindVals cenv (List.map var_of_bind binds) - CheckTypeDefns cenv env tycons; - CheckTopBindings cenv env binds; - List.iter (CheckModuleSpec cenv env) mspecs - | TMDefLet(bind,m) -> - CheckNothingAfterEntryPoint cenv m - CheckTopBinding cenv env bind - BindVal cenv (var_of_bind bind) - | TMDefDo(e,m) -> - CheckNothingAfterEntryPoint cenv m - CheckNoRethrow cenv e; - CheckExpr cenv env e - | TMAbstract(def) -> CheckModuleExpr cenv env def - | TMDefs(defs) -> CheckDefnsInModule cenv env defs -and CheckModuleSpec cenv env (TMBind(mspec, rhs)) = - CheckTypeDefn cenv env mspec; - CheckDefnInModule cenv env rhs - -let CheckTopImpl (g,amap,reportErrors,infoReader,internalsVisibleToPaths,viewCcu,denv ,TImplFile(_,_,mexpr),extraAttribs,canContainEntryPoint) = - let cenv = { g =g ; reportErrors=reportErrors; boundVals=Set.empty; potentialUnboundUsesOfVals=Map.empty; usesQuotations=false; infoReader=infoReader; internalsVisibleToPaths=internalsVisibleToPaths;amap=amap; denv=denv; viewCcu= viewCcu;canContainEntryPoint=canContainEntryPoint; entryPointGiven=false} - let env = { mrmi=[]; quote=false; limited=false; boundTypars=[] } in - CheckModuleExpr cenv env mexpr; - CheckAttribs cenv env extraAttribs; - if cenv.usesQuotations then - viewCcu.UsesQuotations <- true - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/creflect.ml b/tools/FSharp_1.9.6.16/source/fsharp/creflect.ml deleted file mode 100644 index b4fc6ca1..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/creflect.ml +++ /dev/null @@ -1,830 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module internal Microsoft.FSharp.Compiler.Creflect - -open Internal.Utilities -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - - -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Sreflect -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.PrettyNaming -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.Typrelns -open Range - -#if DEBUG -let verboseCReflect = try (System.Environment.GetEnvironmentVariable("VERBOSE_CREFLECT") <> null) with _ -> false -#else -let verboseCReflect = false -#endif - -let mscorlibName = "" -let mkVoidTy = mkNamedTy({ tcName = "System.Void"; tcAssembly=mscorlibName},[]) - -type cenv = - { g: Env.TcGlobals; - amap: Import.ImportMap; - scope: ccu; - typeSplices: ResizeArray ; - exprSplices: ResizeArray } - -let mk_cenv (g,amap,scope) = - { g = g; scope=scope; amap=amap; typeSplices = new ResizeArray<_>() ; exprSplices = new ResizeArray<_>() } - -type env = - { //Map from Val to binding index - vs: ValMap; - nvs: int; - //Map from typar stamps to binding index - tyvs: I64map.t; - // Map for values bound by the - // 'let v = isinst e in .... if nonnull v then ...v .... ' - // construct arising out the compilation of pattern matching. We decode these back to the form - // 'if istype v then ...unbox v .... ' - isinstVals: ValMap - substVals: ValMap } - -let empty_env = - { vs=vspec_map_empty(); - nvs=0; - tyvs = I64map.empty (); - isinstVals = vspec_map_empty() - substVals = vspec_map_empty() } - -let BindTypar env (v:Typar) = - let idx = env.tyvs.Count - { env with tyvs = I64map.add v.Stamp idx env.tyvs } - -let BindTypars env vs = - List.fold BindTypar env vs // fold_left because indexes are left-to-right - -let BindFormalTypars env vs = BindTypars { env with tyvs=I64map.empty()} vs - -let BindVal env v = - let idx = env.nvs - { env with vs = vspec_map_add v idx env.vs; nvs = env.nvs + 1 } - -let BindIsInstVal env v (ty,e) = - { env with isinstVals = vspec_map_add v (ty,e) env.isinstVals } - -let BindSubstVal env v e = - { env with substVals = vspec_map_add v e env.substVals } - - -let BindVals env vs = List.fold BindVal env vs // fold left-to-right because indexes are left-to-right -let BindFlatVals env vs = FlatList.fold BindVal env vs // fold left-to-right because indexes are left-to-right - -exception InvalidQuotedTerm of exn -exception IgnoringPartOfQuotedTermWarning of string * Range.range - -let wfail e = raise (InvalidQuotedTerm(e)) - -// Used to remove TExpr_link for inner expressions in pattern matches -let (|InnerExprPat|) expr = strip_expr expr - -let (|ModuleValueOrMemberUse|_|) cenv expr = - let rec loop expr args = - match strip_expr expr with - | TExpr_app((InnerExprPat(TExpr_val(vref,vFlags,_) as f)),fty,tyargs,actualArgs,m) when vref.IsMemberOrModuleBinding -> - Some(vref,vFlags,f,fty,tyargs,actualArgs@args) - | TExpr_app(f,fty,[],actualArgs,m) -> - loop f (actualArgs @ args) - | (TExpr_val(vref,vFlags,m) as f) when (vref.ActualParent <> ParentNone) -> - let fty = type_of_expr cenv.g f - Some(vref,vFlags,f,fty,[],args) - | _ -> - None - loop expr [] - - -let rec ConvExpr cenv (env : env) (expr: Tast.expr) : Sreflect.ExprData = - // Eliminate subsumption coercions for functions. This must be done post-typechecking because we need - // complete inference types. - let expr = NormalizeAndAdjustPossibleSubsumptionExprs cenv.g expr - - // Remove TExpr_ref nodes - let expr = strip_expr expr - - // Recognize F# object model calls - // Recognize applications of module functions. - match expr with - // Detect expression tree exprSplices - | TExpr_app(InnerExprPat(TExpr_val(vf,_,_)),_,_,[x0],m) - when cenv.g.vref_eq vf cenv.g.splice_expr_vref || cenv.g.vref_eq vf cenv.g.splice_raw_expr_vref -> - let idx = cenv.exprSplices.Count - let ty = type_of_expr cenv.g expr - match (free_in_expr CollectTyparsAndLocalsNoCaching x0).FreeLocals |> Seq.first (fun v -> if vspec_map_mem v env.vs then Some(v) else None) with - | Some v -> errorR(Error(sprintf "The variable '%s' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope" v.DisplayName,v.Range)) - | None -> () - cenv.exprSplices.Add(x0); - mkHole(ConvType cenv env m ty,idx) - - | ModuleValueOrMemberUse cenv (vref,vFlags,f,fty,tyargs,curriedArgs) -> - let m = range_of_expr expr - - let (numEnclTypeArgs,_,isNewObj,isSuperInit,isSelfInit,takesInstanceArg,isPropGet,isPropSet) = - GetMemberCallInfo cenv.g (vref,vFlags) - - let isMember,tps,curriedArgInfos,retTy = - - match vref.MemberInfo with - | Some _ when not vref.IsExtensionMember -> - // This is an application of a member method - // We only count one argument block for these. - let tps,curriedArgInfos,retTy,_ = GetTypeOfIntrinsicMemberInCompiledForm cenv.g vref - true,tps,curriedArgInfos,retTy - | _ -> - // This is an application of a module value or extension member - let arities = arity_of_val (deref_val vref) - let tps,curriedArgInfos,retTy,_ = GetTopValTypeInCompiledForm cenv.g arities vref.Type m - false,tps,curriedArgInfos,retTy - - // Compute the object arguments as they appear in a compiled call - // Strip off the object argument, if any. The curriedArgInfos are already adjusted to compiled member form - let objArgs,curriedArgs = - match takesInstanceArg,curriedArgs with - | false,curriedArgs -> [],curriedArgs - | true,(objArg::curriedArgs) -> [objArg],curriedArgs - | true,[] -> wfail(InternalError("warning: unexpected missing object argument when generating quotation for call to F# object member "^vref.MangledName,m)) - - if verboseCReflect then - dprintfn "vref.DisplayName = %A, #objArgs = %A, #curriedArgs = %A" vref.DisplayName objArgs.Length curriedArgs.Length - - // Check to see if there aren't enough arguments or if there is a tuple-arity mismatch - // If so, adjust and try again - if curriedArgs.Length < curriedArgInfos.Length || - ((fst(List.chop curriedArgInfos.Length curriedArgs),curriedArgInfos) ||> List.exists2 (fun arg argInfo -> - (argInfo.Length > (try_dest_tuple arg).Length))) then - - if verboseCReflect then - dprintfn "vref.DisplayName = %A was under applied" vref.DisplayName - // Too few arguments or incorrect tupling? Convert to a lambda and beta-reduce the - // partially applied arguments to 'let' bindings - let topValInfo = - match vref.TopValInfo with - | None -> error(InternalError("no arity information found for F# value "^vref.MangledName,vref.Range)) - | Some a -> a - - let expr,exprty = AdjustValForExpectedArity cenv.g m vref vFlags topValInfo - ConvExpr cenv env (MakeApplicationAndBetaReduce cenv.g (expr,exprty,[tyargs],curriedArgs,m)) - else - - // Too many arguments? Chop - let curriedArgs,laterArgs = List.chop curriedArgInfos.Length curriedArgs - - let callR = - // We now have the right number of arguments, w.r.t. currying and tupling. - // Next work out what kind of object model call and build an object model call node. - - // detuple the args - let untupledCurriedArgs = - (curriedArgs,curriedArgInfos) ||> List.map2 (fun arg curriedArgInfos -> - let numUntupledArgs = curriedArgInfos.Length - (if numUntupledArgs = 0 then [] - elif numUntupledArgs = 1 then [arg] - else try_dest_tuple arg)) - - if verboseCReflect then - dprintfn "vref.DisplayName = %A , after unit adjust, #untupledCurriedArgs = %A, #curriedArgInfos = %d" vref.DisplayName (List.map List.length untupledCurriedArgs) curriedArgInfos.Length - - if isMember then - // This is an application of a member method - // We only count one argument block for these. - let callArgs = (objArgs::untupledCurriedArgs) |> List.concat - - let parentTyconR = ConvTyconRef cenv env vref.MemberActualParent m - let isNewObj = (isNewObj || isSuperInit || isSelfInit) - // The signature types are w.r.t. to the formal context - let envinner = BindFormalTypars env tps - let argTys = curriedArgInfos |> List.concat |> List.map fst - let methArgTypesR = ConvTypes cenv envinner m argTys - let methRetTypeR = ConvReturnType cenv envinner m retTy - let methName = vref.CompiledName - let numGenericArgs = tyargs.Length-numEnclTypeArgs - ConvObjectModelCall cenv env m (isPropGet,isPropSet,isNewObj,parentTyconR,methArgTypesR,methRetTypeR,methName,tyargs,numGenericArgs,callArgs) - else - // This is an application of the module value. - ConvModuleValueApp cenv env m vref tyargs untupledCurriedArgs - - - List.fold (fun fR arg -> mkApp (fR,ConvExpr cenv env arg)) callR laterArgs - - - // Blast type application nodes and expression application nodes apart so values are left with just their type arguments - | TExpr_app(f,fty,(_ :: _ as tyargs),(_ :: _ as args),m) -> - let rfty = reduce_forall_typ cenv.g fty tyargs - ConvExpr cenv env (prim_mk_app (prim_mk_app (f,fty) tyargs [] m, rfty) [] args m) - - // Uses of possibly-polymorphic values - | TExpr_app(InnerExprPat(TExpr_val(vref,vFlags,m)),fty,tyargs,[],m2) -> - ConvValRef cenv env m vref tyargs - - // Simple applications - | TExpr_app(f,fty,tyargs,args,m) -> - if nonNil tyargs then wfail(Error("Quotations may not contain uses of generic expressions",m)); - List.fold (fun fR arg -> mkApp (fR,ConvExpr cenv env arg)) (ConvExpr cenv env f) args - - // REVIEW: what is the quotation view of literals accessing enumerations? Currently they show up as integers. - | TExpr_const(c,m,ty) -> - ConvConst cenv env m c ty - - | TExpr_val(vref,vFlags,m) -> - - ConvValRef cenv env m vref [] - - | TExpr_let(bind,body,m,_) -> - - // The binding may be a compiler-generated binding that gets removed in the quotation presentation - match ConvLetBind cenv env bind with - | None, env -> ConvExpr cenv env body - | Some(bindR),env -> mkLet(bindR,ConvExpr cenv env body) - - | TExpr_letrec(binds,body,m,_) -> - let vs = vars_of_Bindings binds - let vsR = vs |> FlatList.map (ConvVal cenv env) - let env = BindFlatVals env vs - let bodyR = ConvExpr cenv env body - let bindsR = FlatList.zip vsR (FlatList.map (rhs_of_bind >> ConvExpr cenv env) binds) - mkLetRec(FlatList.to_list bindsR,bodyR) - - | TExpr_lambda(_,_,vs,b,_,_,_) -> - let v,b = multi_lambda_to_tupled_lambda vs b - let vR = ConvVal cenv env v - let bR = ConvExpr cenv (BindVal env v) b - mkLambda(vR, bR) - - | TExpr_quote(ast,_,_,_) -> - mkQuote(ConvExpr cenv empty_env ast) - - | TExpr_tlambda (_,_,_,m,_,_) -> - wfail(Error("Quotations may not contain function declarations that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression",m)) - - | TExpr_match (spBind,m,dtree,tgs,m2,retTy,_) -> - let typR = ConvType cenv env m retTy - ConvDecisionTree cenv env tgs typR dtree - - | TExpr_seq (x0,x1,NormalSeq,_,m) -> mkSequential(ConvExpr cenv env x0, ConvExpr cenv env x1) - | TExpr_obj (_,typ,_,_,[TObjExprMethod(TSlotSig(_,ctyp, _,_,_,_),tps,[tmvs],e,_) as tmethod],_,m,_) when is_delegate_typ cenv.g typ -> - let f = mk_lambdas m tps tmvs (e,GetFSharpViewOfReturnType cenv.g (rty_of_tmethod cenv.g tmethod)) - let fR = ConvExpr cenv env f - let tyargR = ConvType cenv env m ctyp - mkDelegate(tyargR, fR) - - | TExpr_static_optimization (tcs,csx,x,m) -> ConvExpr cenv env x - | TExpr_tchoose _ -> ConvExpr cenv env (Typrelns.choose_typar_solutions_for_tchoose cenv.g cenv.amap expr) - | TExpr_seq (x0,x1,ThenDoSeq,_,m) -> mkSequential(ConvExpr cenv env x0, ConvExpr cenv env x1) - | TExpr_obj (n,typ,basev,basecall,overrides,iimpls,m,_) -> wfail(Error( "Quotations may not contain object expressions",m)) - - | TExpr_op(op,tyargs,args,m) -> - match op,tyargs,args with - | TOp_ucase ucref,_,_ -> - let mkR = ConvUnionCaseRef cenv env ucref m - let typ = rty_of_uctyp ucref tyargs - let tyargsR = ConvTypes cenv env m tyargs - let argsR = ConvExprs cenv env args - mkSum(mkR,tyargsR,argsR) - | TOp_tuple,tyargs,_ -> - let tyR = ConvType cenv env m (mk_tupled_ty cenv.g tyargs) - let argsR = ConvExprs cenv env args - mkTuple(tyR,argsR) - | TOp_recd (_,tcref),_,_ -> - let rgtypR = ConvTyconRef cenv env tcref m - let tyargsR = ConvTypes cenv env m tyargs - let typ = mk_tyapp_ty tcref tyargs - let argsR = ConvExprs cenv env args - mkRecdMk(rgtypR,tyargsR,argsR) - | TOp_ucase_field_get (ucref,n),tyargs,[e] -> - let tyargsR = ConvTypes cenv env m tyargs - let tcR,s = ConvUnionCaseRef cenv env ucref m - let projR = (tcR,s,n) - mkSumFieldGet( projR, tyargsR,ConvExpr cenv env e) - - | TOp_field_get_addr(rfref),tyargs,_ -> - wfail(Error( "Quotations may not contain subexpressions that take the address of a field",m)) - - | TOp_rfield_get(rfref),tyargs,[] -> - wfail(Error( "Quotations may not contain subexpressions that fetch static fields",m)) - - | TOp_rfield_get(rfref),tyargs,args -> - let tyargsR = ConvTypes cenv env m tyargs - let argsR = ConvExprs cenv env args - let ((parentTyconR,fldName) as projR) = ConvRecdFieldRef cenv env rfref m - if rfref.TyconRef.IsRecordTycon then - mkRecdGet(projR,tyargsR,argsR) - else - let fspec = rfref.RecdField - let tcref = rfref.TyconRef - if use_genuine_field tcref.Deref fspec then - mkFieldGet(projR,tyargsR, argsR) - else - let envinner = BindFormalTypars env (tcref.TyparsNoRange) - let propRetTypeR = ConvType cenv envinner m fspec.FormalType - mkPropGet( (parentTyconR, fldName,propRetTypeR,[]),tyargsR, argsR) - - - | TOp_tuple_field_get(n),tyargs,[e] -> - let tyR = ConvType cenv env m (mk_tupled_ty cenv.g tyargs) - mkTupleGet(tyR, n, ConvExpr cenv env e) - - | TOp_asm(([ I_ldfld(_,_,fspec) ] - | [ I_ldsfld (_,fspec) ] - | [ I_ldsfld (_,fspec); I_arith AI_nop ]),_),enclTypeArgs,args -> - let tyargsR = ConvTypes cenv env m enclTypeArgs - let parentTyconR = ConvIlTypeRef cenv env fspec.EnclosingTypeRef - let objArg = - match args with - | obj::rest -> ConvLValueExpr cenv env obj :: rest - | e -> e - mkFieldGet( (parentTyconR, fspec.Name),tyargsR, ConvExprs cenv env args) - - | TOp_asm([ I_stfld(_,_,fspec) | I_stsfld (_,fspec) ],_),enclTypeArgs,args -> - let tyargsR = ConvTypes cenv env m enclTypeArgs - let parentTyconR = ConvIlTypeRef cenv env fspec.EnclosingTypeRef - let objArg = - match args with - | obj::rest -> ConvLValueExpr cenv env obj :: rest - | e -> e - mkFieldSet( (parentTyconR, fspec.Name),tyargsR, ConvExprs cenv env args) - - | TOp_asm([ I_arith AI_ceq ],_),_,[arg1;arg2] -> - let ty = type_of_expr cenv.g arg1 - let eq = mk_call_generic_equality_outer cenv.g m ty arg1 arg2 - ConvExpr cenv env eq - - | TOp_asm([ I_throw ],_),_,[arg1] -> - let raiseExpr = mk_call_raise cenv.g m (type_of_expr cenv.g expr) arg1 - ConvExpr cenv env raiseExpr - - | TOp_asm(il,_),_,_ -> - wfail(Error( sprintf "Quotations may not contain inline assembly code (%+A)" il,m)) - | TOp_exnconstr tcref,_,args -> - let rgtypR = ConvTyconRef cenv env tcref m - let typ = mk_tyapp_ty tcref [] - let parentTyconR = ConvTyconRef cenv env tcref m - let argtys = tcref |> rfields_of_ecref |> List.map (fun rfld -> rfld.FormalType) - let methArgTypesR = ConvTypes cenv env m argtys - let argsR = ConvExprs cenv env args - mkCtorCall( { ctorParent = parentTyconR; - ctorArgTypes = methArgTypesR }, - [], argsR) - - | TOp_rfield_set rfref, tinst,args -> - let argsR = ConvExprs cenv env args - let tyargsR = ConvTypes cenv env m tyargs - let ((parentTyconR,fldName) as projR) = ConvRecdFieldRef cenv env rfref m - if rfref.TyconRef.IsRecordTycon then - mkRecdSet(projR,tyargsR,argsR) - else - let fspec = rfref.RecdField - let tcref = rfref.TyconRef - let parentTyconR = ConvTyconRef cenv env tcref m - if use_genuine_field tcref.Deref fspec then - mkFieldSet( projR,tyargsR, argsR) - else - let envinner = BindFormalTypars env (tcref.TyparsNoRange) - let propRetTypeR = ConvType cenv envinner m fspec.FormalType - mkPropSet( (parentTyconR, fldName,propRetTypeR,[]),tyargsR, argsR) - - | TOp_exnconstr_field_get(tcref,i),[],args -> - let exnc = strip_eqns_from_ecref tcref - let fspec = List.nth (exnc.TrueInstanceFieldsAsList) i - let parentTyconR = ConvTyconRef cenv env tcref m - let propRetTypeR = ConvType cenv env m fspec.FormalType - let callArgsR = ConvExprs cenv env args - mkPropGet( (parentTyconR, fspec.Name,propRetTypeR,[]),[], callArgsR) - - - | TOp_coerce,[tgtTy;srcTy],[x] -> - let xR = ConvExpr cenv env x - if type_equiv cenv.g tgtTy srcTy then - xR - else - mkCoerce(ConvType cenv env m tgtTy,xR) - | TOp_rethrow,[toTy],[] -> mk_rethrow_library_call cenv.g toTy m |> ConvExpr cenv env (* rebuild rethrow() and Convert *) - | TOp_lval_op(LGetAddr,vref),[],[] -> mkAddressOf(ConvExpr cenv env (TExpr_val(vref,NormalValUse,m))) - | TOp_lval_op(LByrefSet,vref),[],[e] -> mkAddressSet(ConvExpr cenv env (TExpr_val(vref,NormalValUse,m)), ConvExpr cenv env e) - | TOp_lval_op(LSet,vref),[],[e] -> mkAddressSet( mkAddressOf(ConvExpr cenv env (TExpr_val(vref,NormalValUse,m))), ConvExpr cenv env e) - | TOp_lval_op(LByrefGet,vref),[],[] -> ConvExpr cenv env (TExpr_val(vref,NormalValUse,m)) - | TOp_array,[ty],xa -> mkNewArray(ConvType cenv env m ty,ConvExprs cenv env xa) - - | TOp_while _,[],[TExpr_lambda(_,_,[_],test,_,_,_);TExpr_lambda(_,_,[_],body,_,_,_)] -> - mkWhileLoop(ConvExpr cenv env test, ConvExpr cenv env body) - - | TOp_for(_,dir),[],[TExpr_lambda(_,_,[_],lim0,_,_,_);TExpr_lambda(_,_,[_],lim1,_,_,_);body] -> - match dir with - | FSharpForLoopUp -> mkForLoop(ConvExpr cenv env lim0,ConvExpr cenv env lim1, ConvExpr cenv env body) - | _ -> wfail(Error( "Quotations may not contain descending for loops",m)) - - | TOp_ilcall((virt,protect,valu,isNewObj,isSuperInit,isProp,_,boxthis,mref), - enclTypeArgs,methTypeArgs,tys),[],callArgs -> - let parentTyconR = ConvIlTypeRef cenv env mref.EnclosingTypeRef - let isNewObj = (isNewObj || (isSuperInit = CtorValUsedAsSuperInit) || (isSuperInit = CtorValUsedAsSelfInit)) - let methArgTypesR = List.map (ConvIlType cenv env m) mref.ArgTypes - let methRetTypeR = ConvIlType cenv env m mref.ReturnType - let methName = mref.Name - let isPropGet = isProp && methName.StartsWith("get_",System.StringComparison.Ordinal) - let isPropSet = isProp && methName.StartsWith("set_",System.StringComparison.Ordinal) - let tyargs = (enclTypeArgs@methTypeArgs) - ConvObjectModelCall cenv env m (isPropGet,isPropSet,isNewObj,parentTyconR,methArgTypesR,methRetTypeR,methName,tyargs,methTypeArgs.Length,callArgs) - - | TOp_try_finally _,[resty],[TExpr_lambda(_,_,[_],e1,_,_,_); TExpr_lambda(_,_,[_],e2,_,_,_)] -> - mkTryFinally(ConvExpr cenv env e1,ConvExpr cenv env e2) - - | TOp_try_catch _,[resty],[TExpr_lambda(_,_,[_],e1,_,_,_); TExpr_lambda(_,_,[vf],ef,_,_,_); TExpr_lambda(_,_,[vh],eh,_,_,_)] -> - let vfR = ConvVal cenv env vf - let envf = BindVal env vf - let vhR = ConvVal cenv env vh - let envh = BindVal env vh - mkTryWith(ConvExpr cenv env e1,vfR,ConvExpr cenv envf ef,vhR,ConvExpr cenv envh eh) - - | TOp_bytes _,_,_ -> - wfail(Error( "Quotations may not contain literal byte arrays",m)) - - | TOp_ucase_proof _,_,[e] -> ConvExpr cenv env e // Note: we erase the union case proof conversions when converting to quotations - | TOp_ucase_tag_get tycr,tinst,[cx] -> wfail(Error( "Quotations may not contain subexpressions that fetch union case indexes",m)) - | TOp_ucase_field_set (c,i),tinst,[cx;x] -> wfail(Error( "Quotations may not contain subexpressions that set union case fields",m)) - | TOp_exnconstr_field_set(tcref,i),[],[ex;x] -> wfail(Error( "Quotations may not contain subexpressions that set fields in exception values",m)) - | TOp_get_ref_lval,_,_ -> wfail(Error( "Quotations may not contain subexpressions that require byref pointers",m)) - | TOp_trait_call (ss),_,_ -> wfail(Error( "Quotations may not contain subexpressions that call trait members",m)) - | _ -> - wfail(InternalError( "Unexpected expression shape",m)) - - | _ -> - wfail(InternalError(sprintf "unhandled construct in AST: %A" expr,range_of_expr expr)) - -and ConvLetBind cenv env (bind : Binding) = - match bind.Expr with - // Map for values bound by the - // 'let v = isinst e in .... if nonnull v then ...v .... ' - // construct arising out the compilation of pattern matching. We decode these back to the form - // 'if istype e then ...unbox e .... ' - // It's bit annoying that pattern matching does this tranformation. Like all premature optimization we pay a - // cost here to undo it. - | TExpr_op(TOp_asm([ I_isinst _ ],_),[ty],[e],m) -> - None, BindIsInstVal env bind.Var (ty,e) - - // Remove let = from quotation tree - | TExpr_val _ when bind.Var.IsCompilerGenerated -> - None, BindSubstVal env bind.Var bind.Expr - - // Remove let unionCase = ... from quotation tree - | TExpr_op(TOp_ucase_proof _,_,[e],m) -> - None, BindSubstVal env bind.Var e - | _ -> - let v = bind.Var - let vR = ConvVal cenv env v - let rhsR = ConvExpr cenv env bind.Expr - let envinner = BindVal env v - Some(vR,rhsR),envinner - -and ConvLValueExpr cenv env (expr: Tast.expr) : Tast.expr = - match expr with - | TExpr_op(op,tyargs,args,m) -> - match op with - | TOp_lval_op(LGetAddr,vref) -> TExpr_val(vref,NormalValUse,m) - | TOp_field_get_addr(rfref) -> TExpr_op(TOp_rfield_get(rfref),tyargs,args,m) - | TOp_asm([ I_ldflda(fspec) ],rtys) -> - let args = - match args with - | obj :: rest -> ConvLValueExpr cenv env obj :: rest - | [] -> [] - TExpr_op(TOp_asm([ mk_normal_ldfld(fspec) ],rtys),tyargs,args,m) - | TOp_asm([ I_ldsflda(fspec) ],rtys) -> - TExpr_op(TOp_asm([ mk_normal_ldsfld(fspec) ],rtys),tyargs,[],m) -(* - | TOp_asm(([ I_ldelema(ro,shape,tyarg) ] ),_),_,_ -> - mkArrayGet( (parentTyconR, fspec.Name),tyargsR, args) -*) - | _ -> expr - | _ -> expr - - -and ConvObjectModelCall cenv env m (isPropGet,isPropSet,isNewObj,parentTyconR,methArgTypesR,methRetTypeR,methName,tyargs,numGenericArgs,callArgs) = - - let tyargsR = ConvTypes cenv env m tyargs - let callArgs = - match callArgs with - // Strip of the get-address operation for structs - | obj::rest -> ConvLValueExpr cenv env obj :: rest - | _ -> callArgs - let callArgsR = ConvExprs cenv env callArgs - - if isPropGet || isPropSet then - let propName = ChopPropertyName methName - if isPropGet then - mkPropGet( (parentTyconR, propName,methRetTypeR,methArgTypesR),tyargsR, callArgsR) - else - let args,rty = List.frontAndBack methArgTypesR - mkPropSet( (parentTyconR, propName,rty,args),tyargsR, callArgsR) - - elif isNewObj then - mkCtorCall( { ctorParent = parentTyconR; - ctorArgTypes = methArgTypesR }, - tyargsR, callArgsR) - - else - mkMethodCall( { methParent = parentTyconR; - methArgTypes = methArgTypesR; - methRetType = methRetTypeR; - methName = methName; - numGenericArgs=numGenericArgs }, - tyargsR, callArgsR) - -and ConvModuleValueApp cenv env m (vref:ValRef) tyargs (args: Tast.expr list list) = - match vref.ActualParent with - | ParentNone -> failwith "ConvModuleValueApp" - | Parent(tcref) -> - let isProperty = IsCompiledAsStaticValue cenv.g vref.Deref - let tcrefR = ConvTyconRef cenv env tcref m - let tyargsR = ConvTypes cenv env m tyargs - let nm = vref.UniqueCompiledName - let argsR = List.map (ConvExprs cenv env) args - mkModuleValueApp(tcrefR,nm,isProperty,tyargsR,argsR) - -and ConvExprs cenv env args = - List.map (ConvExpr cenv env) args - -and ConvValRef cenv env m (vref:ValRef) tyargs = - let v = deref_val vref - if vspec_map_mem v env.isinstVals then - let (ty,e) = vspec_map_find v env.isinstVals - ConvExpr cenv env (mk_call_unbox cenv.g m ty e) - elif vspec_map_mem v env.substVals then - let e = vspec_map_find v env.substVals - ConvExpr cenv env e - elif vspec_map_mem v env.vs then - if nonNil tyargs then wfail(InternalError("ignoring generic application of local quoted variable",m)); - mkVar(vspec_map_find v env.vs) - else - let vty = v.Type - match v.ActualParent with - | ParentNone -> - // References to local values are embedded by value - let idx = cenv.exprSplices.Count - cenv.exprSplices.Add(mk_call_lift_value cenv.g m vty (expr_for_vref m vref)); - mkHole(ConvType cenv env m vty,idx) - | Parent _ -> - ConvModuleValueApp cenv env m vref tyargs [] - -and ConvUnionCaseRef cenv env (ucref:UnionCaseRef) m = - let ucgtypR = ConvTyconRef cenv env ucref.TyconRef m - let nm = - if cenv.g.ucref_eq ucref cenv.g.cons_ucref then "Cons" - elif cenv.g.ucref_eq ucref cenv.g.nil_ucref then "Empty" - else ucref.CaseName - (ucgtypR,nm) - -and ConvRecdFieldRef cenv env (rfref:RecdFieldRef) m = - let typR = ConvTyconRef cenv env rfref.TyconRef m - (typR,rfref.FieldName) - -and ConvVal cenv env (v:Val) = - let tyR = ConvType cenv env v.Range v.Type - freshVar (v.UniqueCompiledName, tyR) - -and ConvTyparRef cenv env m (tp:Typar) = - if I64map.mem tp.Stamp env.tyvs then - I64map.find tp.Stamp env.tyvs - else - match ResizeArray.tryfind_index (typar_ref_eq tp) cenv.typeSplices with - | Some idx -> idx - | None -> - let idx = cenv.typeSplices.Count - cenv.typeSplices.Add(tp); - idx - -and FilterMeasureTyargs tys = - tys |> List.filter (fun ty -> match ty with TType_measure _ -> false | _ -> true) - -and ConvType cenv env m typ = - match strip_tpeqns_and_tcabbrevs_and_measureable cenv.g typ with - | TType_app(tcref,[tyarg]) when is_il_arr_tcref cenv.g tcref -> - mkArrayTy(rank_of_il_arr_tcref cenv.g tcref,ConvType cenv env m tyarg) - - | TType_ucase(UCRef(tcref,_),tyargs) // Note: we erase union case 'types' when converting to quotations - | TType_app(tcref,tyargs) -> - mkNamedTy(ConvTyconRef cenv env tcref m, ConvTypes cenv env m tyargs) - - | TType_fun(a,b) -> mkFunTy(ConvType cenv env m a,ConvType cenv env m b) - | TType_tuple(l) -> ConvType cenv env m (compiled_tuple_ty cenv.g l) - | TType_var(tp) -> mkVarTy(ConvTyparRef cenv env m tp) - | TType_forall(spec,ty) -> wfail(Error("Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic",m)) - | _ -> wfail(InternalError ("Quotations may not contain this kind of type",m)) - -and ConvTypes cenv env m typs = - List.map (ConvType cenv env m) (FilterMeasureTyargs typs) - -and ConvConst cenv env m c ty = - match TryEliminateDesugaredConstants cenv.g m c with - | Some e -> ConvExpr cenv env e - | None -> - match c with - | TConst_bool i -> mkBool i - | TConst_sbyte i -> mkSByte i - | TConst_byte i -> mkByte i - | TConst_int16 i -> mkInt16 i - | TConst_uint16 i -> mkUInt16 i - | TConst_int32 i -> mkInt32 i - | TConst_uint32 i -> mkUInt32 i - | TConst_int64 i -> mkInt64 i - | TConst_uint64 i -> mkUInt64 i - | TConst_float i -> mkDouble(i) - | TConst_float32 i -> mkSingle(i) - | TConst_string s -> mkString(s) - | TConst_char c -> mkChar c - | TConst_unit -> mkUnit() - | TConst_zero -> mkNull(ConvType cenv env m ty) - | _ -> wfail(Error ("Quotations may not contain this kind of constant",m)) - -and ConvDecisionTree cenv env tgs typR x = - match x with - | TDSwitch(e1,csl,dfltOpt,m) -> - let acc = - match dfltOpt with - | Some d -> ConvDecisionTree cenv env tgs typR d - | None -> wfail(Error( "Quotations may not contain this kind of pattern match",m)) - (csl,acc) ||> List.foldBack (fun (TCase(discrim,dtree)) acc -> - match discrim with - | TTest_unionconstr(ucref,tyargs) -> - let e1R = ConvExpr cenv env e1 - let ucR = ConvUnionCaseRef cenv env ucref m - let tyargsR = ConvTypes cenv env m tyargs - mkCond(mkSumTagTest(ucR,tyargsR,e1R),ConvDecisionTree cenv env tgs typR dtree,acc) - | TTest_const(TConst_bool(true)) -> - let e1R = ConvExpr cenv env e1 - mkCond(e1R,ConvDecisionTree cenv env tgs typR dtree,acc) - | TTest_const(TConst_bool(false)) -> - let e1R = ConvExpr cenv env e1 - mkCond(e1R,acc,ConvDecisionTree cenv env tgs typR dtree) - | TTest_const(c) -> - let ty = type_of_expr cenv.g e1 - let eq = mk_call_generic_equality_outer cenv.g m ty e1 (TExpr_const(c,m,ty)) - let eqR = ConvExpr cenv env eq - mkCond(eqR,ConvDecisionTree cenv env tgs typR dtree,acc) - | TTest_isnull -> - match e1 with - | TExpr_val(vref,_,_) when vspec_map_mem (deref_val vref) env.isinstVals -> - let (ty,e) = vspec_map_find (deref_val vref) env.isinstVals - let tyR = ConvType cenv env m ty - let eR = ConvExpr cenv env e - mkCond(mkTypeTest(tyR,eR),ConvDecisionTree cenv env tgs typR dtree,acc) - | _ -> - let ty = type_of_expr cenv.g e1 - let eq = mk_call_generic_equality_outer cenv.g m ty e1 (TExpr_const(TConst_zero,m,ty)) - let eqR = ConvExpr cenv env eq - mkCond(eqR,ConvDecisionTree cenv env tgs typR dtree,acc) - | TTest_isinst (srcty,tgty) -> - let e1R = ConvExpr cenv env e1 - mkCond(mkTypeTest(ConvType cenv env m tgty,e1R),ConvDecisionTree cenv env tgs typR dtree,acc) - | TTest_query _ -> wfail(InternalError( "TTest_query test in quoted expression",m)) - | TTest_array_length _ -> wfail(Error( "Quotations may not contain array pattern matching",m)) - ) - | TDSuccess (args,n) -> - let (TTarget(vars,rhs,_)) = tgs.[n] - // TAST stores pattern bindings in reverse order for some reason - // Reverse them here to give a good presentation to the user - let args = List.rev args - let vars = List.rev vars - - let varsR = vars |> FlatList.map (ConvVal cenv env) - let targetR = ConvExpr cenv (BindFlatVals env vars) rhs - (varsR,args,targetR) |||> FlatList.foldBack2 (fun vR arg acc -> mkLet((vR,ConvExpr cenv env arg), acc) ) - - | TDBind(bind,rest) -> - // The binding may be a compiler-generated binding that gets removed in the quotation presentation - match ConvLetBind cenv env bind with - | None, env -> ConvDecisionTree cenv env tgs typR rest - | Some(bindR),env -> mkLet(bindR,ConvDecisionTree cenv env tgs typR rest) - - - -// REVIEW: quotation references to items in the assembly being generated -// are persisted as assembly-qualified-name strings. However this means -// they are not correctly re-adjusted -// when static-linking. We could consider persisting these references -// by creating fake IL metadata (e.g. fields) that refer to the relevant assemblies, which then -// get fixed-up automatically by IL metadata rewriting. -and full_tname_of_tref (tr:ILTypeRef) = String.concat "+" (tr.Enclosing @ [tr.Name]) - -and ConvIlTypeRef cenv env (tr:ILTypeRef) = - let tname = full_tname_of_tref tr - let scoref = tr.Scope - let assref = - // We use the name "." as a special marker for the "local" assembly - match scoref with - | ScopeRef_local -> "." - | _ -> scoref.QualifiedName - {tcName = tname; tcAssembly = assref} - -and ConvIlType cenv env m ty = - match ty with - | Type_boxed tspec | Type_value tspec -> - mkNamedTy(ConvIlTypeRef cenv env tspec.TypeRef, - List.map (ConvIlType cenv env m) tspec.GenericArgs) - | Type_array (shape,ty) -> - mkArrayTy(shape.Rank,ConvIlType cenv env m ty) - | Type_tyvar idx -> mkVarTy(int idx) - | Type_void -> mkVoidTy - | Type_ptr _ - | Type_byref _ - | Type_modified _ - | Type_fptr _ -> wfail(Error( "Quotations may not contain this kind of type (A)",m)) - -and ConvTyconRef cenv env (tcref:TyconRef) m = - let repr = tcref.CompiledRepresentation - match repr with - | TyrepOpen asm -> - match asm with - | Type_boxed tspec | Type_value tspec -> - ConvIlTypeRef cenv env tspec.TypeRef - | _ -> - wfail(Error( "Quotations may not contain this kind of type (B)",m)) - | TyrepNamed (tref,boxity) -> - if tcref.IsLocalRef then - (* We use the name "." as a special marker for the "local" assembly *) - { tcName= full_tname_of_tref tref; tcAssembly="." } - else - ConvIlTypeRef cenv env tref - -and ConvReturnType cenv envinner m retTy = - match retTy with - | None -> mkVoidTy - | Some ty -> ConvType cenv envinner m ty - -let ConvExprPublic (g,amap,scope) env e = - let cenv = mk_cenv (g,amap,scope) - let astExpr = ConvExpr cenv env e - // Add the outer debug range attribute - let astExpr = - let m = range_of_expr e - let mk_tuple g m es = mk_tupled g m es (List.map (type_of_expr g) es) - - let rangeExpr = - mk_tuple cenv.g m - [ mk_string cenv.g m (file_of_range m); - mk_int cenv.g m (start_line_of_range m); - mk_int cenv.g m (start_col_of_range m); - mk_int cenv.g m (end_line_of_range m); - mk_int cenv.g m (end_col_of_range m); ] - let attrExpr = - mk_tuple cenv.g m - [ mk_string cenv.g m "DebugRange"; rangeExpr ] - let attrExprR = ConvExpr cenv env attrExpr - - mkAttributedExpression(astExpr,attrExprR) - cenv.typeSplices |> ResizeArray.to_list |> List.map mk_typar_ty, - cenv.exprSplices |> ResizeArray.to_list, - astExpr - -let ConvMethodBase cenv env (v:Val) = - - let m = v.Range - let methName = v.CompiledName - let parentTyconR = ConvTyconRef cenv env v.MemberActualParent m - - match v.MemberInfo with - | Some(vspr) when not v.IsExtensionMember -> - - let vref = (mk_local_vref v) - let tps,argInfos,retTy,_ = GetTypeOfMemberInMemberForm cenv.g vref - let numEnclTypeArgs = vref.MemberApparentParent.TyparsNoRange.Length - let argTys = argInfos |> List.concat |> List.map fst - - let isNewObj = (vspr.MemberFlags.MemberKind = MemberKindConstructor) - - // The signature types are w.r.t. to the formal context - let envinner = BindFormalTypars env tps - let methArgTypesR = ConvTypes cenv envinner m argTys - let methRetTypeR = ConvReturnType cenv envinner m retTy - - let numGenericArgs = tps.Length-numEnclTypeArgs - - if isNewObj then - Sreflect.MethodBaseData.Ctor - { ctorParent = parentTyconR; - ctorArgTypes = methArgTypesR } - else - Sreflect.MethodBaseData.Method - { methParent = parentTyconR; - methArgTypes = methArgTypesR; - methRetType = methRetTypeR; - methName = methName; - numGenericArgs=numGenericArgs } - | _ -> - - Sreflect.MethodBaseData.ModuleDefn - { Name = methName; - Module = parentTyconR; - IsProperty = IsCompiledAsStaticValue cenv.g v } diff --git a/tools/FSharp_1.9.6.16/source/fsharp/creflect.mli b/tools/FSharp_1.9.6.16/source/fsharp/creflect.mli deleted file mode 100644 index 6d37f051..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/creflect.mli +++ /dev/null @@ -1,25 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module internal Microsoft.FSharp.Compiler.Creflect -open Microsoft.FSharp.Compiler - -// Convert quoted TAST data structures to structures ready for pickling - -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops - -type cenv -val mk_cenv : Env.TcGlobals * Import.ImportMap * ccu -> cenv - -type env -val empty_env : env -val BindTypars : env -> typars -> env - -exception InvalidQuotedTerm of exn -exception IgnoringPartOfQuotedTermWarning of string * Range.range - -val ConvExprPublic : Env.TcGlobals * Import.ImportMap * ccu -> env -> expr -> Tast.typ list * Tast.expr list * Sreflect.ExprData -val ConvMethodBase : cenv -> env -> Val -> Sreflect.MethodBaseData - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/csolve.ml b/tools/FSharp_1.9.6.16/source/fsharp/csolve.ml deleted file mode 100644 index cea01690..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/csolve.ml +++ /dev/null @@ -1,2153 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module (* internal *) Microsoft.FSharp.Compiler.ConstraintSolver - -//------------------------------------------------------------------------- -// Incremental type inference constraint solving. -// -// Primary constraints are: -// - type equations ty1 = ty2 -// - subtype inequations ty1 :> ty2 -// - trait constraints tyname : (static member op_Addition : 'a * 'b -> 'c) -// -// Plus some other constraints inherited from .NET generics. -// -// The constraints are immediately processed into a normal form, in particular -// - type equations on inference parameters: 'tp = ty -// - type inequations on inference parameters: 'tp :> ty -// - other constraints on inference paramaters -// -// The state of the inference engine is kept in imperative mutations to inference -// type variables. -// -// The use of the normal form allows the state of the inference engine to -// be queried for type-directed name resolution, type-directed overload -// resolution and when generating warning messages. -// -// The inference engine can be used in 'undo' mode to implement -// can-unify predicates used in method overload resolution and trait constraint -// satisfaction. -// -//------------------------------------------------------------------------- - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler - -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Outcome -open Microsoft.FSharp.Compiler.Infos -open Microsoft.FSharp.Compiler.Infos.AccessibilityLogic -open Microsoft.FSharp.Compiler.Infos.AttributeChecking -open Microsoft.FSharp.Compiler.Typrelns -open Microsoft.FSharp.Compiler.PrettyNaming - -(*------------------------------------------------------------------------- -!* Generate type variables and record them in within the scope of the - * compilation environment, which currently corresponds to the scope - * of the constraint resolution carried out by type checking. - *------------------------------------------------------------------------- *) - - -let new_tv_uniq = let i = ref 0 in fun () -> incr i; !i - -let compgen_id = text_to_id0 unassignedTyparName - -let new_compgen_inference_var (kind,rigid,staticReq,dynamicReq,error) = - NewTypar(kind,rigid,Typar(compgen_id,staticReq,true),error,dynamicReq,[]) - -let anon_id m = mksyn_id m unassignedTyparName -let new_anon_inference_var (kind,m,rigid,var,dyn) = - NewTypar (kind,rigid,Typar(anon_id m,var,true),false,dyn,[]) - -let new_named_inference_measurevar (m,rigid,var,id) = - NewTypar(KindMeasure,rigid,Typar(id,var,false),false,NoDynamicReq,[]) - -let new_inference_measurevar () = new_compgen_inference_var (KindMeasure,TyparFlexible,NoStaticReq,NoDynamicReq,false) - - -let new_error_tyvar () = new_compgen_inference_var (KindType,TyparFlexible,NoStaticReq,NoDynamicReq,true) -let new_error_measurevar () = new_compgen_inference_var (KindMeasure,TyparFlexible,NoStaticReq,NoDynamicReq,true) -let new_inference_typ () = mk_typar_ty (NewTypar (KindType,TyparFlexible,Typar(compgen_id,NoStaticReq,true),false,NoDynamicReq,[])) -let new_error_typ () = mk_typar_ty (new_error_tyvar ()) -let new_error_measure () = MeasureVar (new_error_measurevar ()) - -let new_inference_typs l = l |> List.map (fun _ -> new_inference_typ ()) - -// QUERY: should 'rigid' ever really be 'true'? We set this when we know -// we are going to have to generalize a typar, e.g. when implementing a -// abstract generic method slot. But we later check the generalization -// condition anyway, so we could get away with a non-rigid typar. This -// would sort of be cleaner, though give errors later. -let freshen_and_fixup_typars m rigid fctps tinst tpsorig = - let copy_tyvar (tp:Typar) = new_compgen_inference_var (tp.Kind,rigid,tp.StaticReq,(if rigid=TyparRigid then DynamicReq else NoDynamicReq),false) - let tps = tpsorig |> List.map copy_tyvar - let renaming,tinst = FixupNewTypars m fctps tinst tpsorig tps - tps,renaming,tinst - -let new_tinst m tpsorig = freshen_and_fixup_typars m TyparFlexible [] [] tpsorig -let new_minst m fctps tinst tpsorig = freshen_and_fixup_typars m TyparFlexible fctps tinst tpsorig - -let freshen_tps m tpsorig = - let _,renaming,tptys = new_tinst m tpsorig - tptys - -let FreshenMethInfo m (minfo:MethInfo) = - let _,renaming,tptys = new_minst m (FormalTyparsOfEnclosingTypeOfMethInfo m minfo) minfo.ActualTypeInst minfo.FormalMethodTypars - tptys - - -(*------------------------------------------------------------------------- -!* Unification of types: solve/record equality constraints - * Subsumption of types: solve/record subtyping constraints - *------------------------------------------------------------------------- *) - -exception ConstraintSolverTupleDiffLengths of DisplayEnv * Tast.typ list * Tast.typ list * range * range -exception ConstraintSolverInfiniteTypes of DisplayEnv * Tast.typ * Tast.typ * range * range -exception ConstraintSolverTypesNotInEqualityRelation of DisplayEnv * Tast.typ * Tast.typ * range * range -exception ConstraintSolverTypesNotInSubsumptionRelation of DisplayEnv * Tast.typ * Tast.typ * range * range -exception ConstraintSolverMissingConstraint of DisplayEnv * Tast.Typar * Tast.TyparConstraint * range * range -exception ConstraintSolverError of string * range * range -exception ConstraintSolverRelatedInformation of string option * range * exn - -exception ErrorFromApplyingDefault of Env.TcGlobals * DisplayEnv * Tast.Typar * Tast.typ * error * range -exception ErrorFromAddingTypeEquation of Env.TcGlobals * DisplayEnv * Tast.typ * Tast.typ * error * range -exception ErrorsFromAddingSubsumptionConstraint of Env.TcGlobals * DisplayEnv * Tast.typ * Tast.typ * error * range -exception ErrorFromAddingConstraint of DisplayEnv * error * range - -exception UnresolvedOverloading of DisplayEnv * error list * error list * error list * string * range -exception PossibleOverload of DisplayEnv * string * range -//exception PossibleBestOverload of DisplayEnv * string * range - -let GetPossibleOverloads amap m denv (calledMethGroup:CalledMeth<_> list) = - calledMethGroup |> List.map (fun cmeth -> PossibleOverload(denv,string_of_minfo amap m denv cmeth.Method,m)) - -(* -let GetPossibleBestOverloads amap m denv (calledMethGroup:CalledMeth<_> list) = - calledMethGroup |> List.map (fun cmeth -> PossibleBestOverload(denv,string_of_minfo amap m denv cmeth.Method,m)) -*) - -type ConstraintSolverState = - { - css_g: Env.TcGlobals; - css_amap: Import.ImportMap; - css_InfoReader : InfoReader; - /// This table stores all trait constraints, indexed by free type variable. - /// That is, there will be one entry in this table for each free type variable in - /// each outstanding trait constraint. Constraints are removed from the table and resolved - /// each time a solution to an index variable is found. - mutable css_cxs: Hashtbl.t; - } - - -type ConstraintSolverEnv = - { - cs_css: ConstraintSolverState; - cs_m: range; - cs_aenv: TypeEquivEnv; - cs_denv : DisplayEnv - } - member c.InfoReader = c.cs_css.css_InfoReader - member c.g = c.cs_css.css_g - member c.amap = c.cs_css.css_amap - -let MakeConstraintSolverEnv css m denv = - { cs_css=css; - cs_m=m; - cs_aenv=tyeq_env_empty; - cs_denv = denv } - - -(*------------------------------------------------------------------------- -!* Occurs check - *------------------------------------------------------------------------- *) - -/// Check whether a type variable OccursCheck in the r.h.s. of a type, e.g. to catch -/// infinite equations such as -/// 'a = list<'a> -let rec OccursCheck g un ty = - match strip_tpeqns_and_tcabbrevs g ty with - - | TType_ucase(_,l) - | TType_app (_,l) - | TType_tuple l -> List.exists (OccursCheck g un) l - - | TType_fun (d,r) -> OccursCheck g un d || OccursCheck g un r - - | TType_var r -> typar_ref_eq un r - - | TType_forall (tp,tau) -> OccursCheck g un tau - | _ -> false - - -(*------------------------------------------------------------------------- -!* Predicates on types - *------------------------------------------------------------------------- *) - -let IsSignedIntegralType g ty = - type_equiv_aux EraseMeasures g g.sbyte_ty ty || - type_equiv_aux EraseMeasures g g.int16_ty ty || - type_equiv_aux EraseMeasures g g.int32_ty ty || - type_equiv_aux EraseMeasures g g.nativeint_ty ty || - type_equiv_aux EraseMeasures g g.int64_ty ty - -let IsUnsignedIntegralType g ty = - type_equiv_aux EraseMeasures g g.byte_ty ty || - type_equiv_aux EraseMeasures g g.uint16_ty ty || - type_equiv_aux EraseMeasures g g.uint32_ty ty || - type_equiv_aux EraseMeasures g g.unativeint_ty ty || - type_equiv_aux EraseMeasures g g.uint64_ty ty - -let rec IsIntegralOrIntegralEnumType g ty = - IsSignedIntegralType g ty || - IsUnsignedIntegralType g ty || - (is_enum_typ g ty && IsIntegralOrIntegralEnumType g (GetUnderlyingTypeOfEnumType g ty)) - -let rec IsIntegralType g ty = - IsSignedIntegralType g ty || - IsUnsignedIntegralType g ty - -let IsStringType g ty = - type_equiv g g.string_ty ty -let IsCharType g ty = - type_equiv g g.char_ty ty - -/// float or float32 or float<_> or float32<_> -let IsFpType g ty = - type_equiv_aux EraseMeasures g g.float_ty ty || - type_equiv_aux EraseMeasures g g.float32_ty ty - -/// decimal or decimal<_> -let IsDecimalType g ty = - type_equiv_aux EraseMeasures g g.decimal_ty ty - -let IsNonDecimalNumericOrIntegralEnumType g ty = IsIntegralOrIntegralEnumType g ty || IsFpType g ty -let IsNumericOrIntegralEnumType g ty = IsNonDecimalNumericOrIntegralEnumType g ty || IsDecimalType g ty -let IsNonDecimalNumericType g ty = IsIntegralType g ty || IsFpType g ty -let IsNumericType g ty = IsNonDecimalNumericType g ty || IsDecimalType g ty - -// Get measure of type, float<_> or float32<_> or decimal<_> but not float=float<1> or float32=float32<1> or decimal=decimal<1> -let GetMeasureOfType g ty = - if is_stripped_tyapp_typ g ty then - let tcref,tinst = dest_stripped_tyapp_typ g ty - match tinst with - | [tyarg] -> - match strip_tpeqns_and_tcabbrevs g tyarg with - | TType_measure ms -> - if measure_equiv g ms MeasureOne then None else Some (tcref,ms) - | _ -> None - | _ -> None - else None - -let IsArrayTypeWithIndexer g ty = is_any_array_typ g ty - -let IsArrayTypeWithSlice g n ty = - is_any_array_typ g ty && (rank_of_any_array_typ g ty = n) - -let IsArrayKindMismatch g tc1 l1 tc2 l2 = - tcref_eq g tc1 g.il_arr1_tcr && - tcref_eq g g.array_tcr tc2 && - List.length l1 = 1 && - List.length l2 = 1 && - type_equiv g (List.hd l1) (List.hd l2) - -type TraitConstraintSolution = - | TTraitUnsolved - | TTraitBuiltIn - | TTraitSolved of MethInfo * tinst - -let BakedInTraitConstraintNames = - [ "op_Division" ; "op_Multiply"; "op_Addition" - "op_Subtraction"; "op_Modulus"; - "get_Zero"; "get_One"; - "DivideByInt";"get_Item"; "set_Item"; - "op_BitwiseAnd"; "op_BitwiseOr"; "op_ExclusiveOr"; "op_LeftShift"; - "op_RightShift"; "op_UnaryPlus"; "op_UnaryNegation"; "get_Sign"; "op_LogicalNot" - "op_OnesComplement"; "Abs"; "Sqrt"; "Sin"; "Cos"; "Tan"; - "Sinh"; "Cosh"; "Tanh"; "Atan"; "Acos"; "Asin"; "Exp"; "Ceiling"; "Floor"; "Round"; "Log10"; "Log"; "Sqrt"; - "Truncate"; "ToChar"; "ToByte"; "ToSByte"; "ToInt16"; "ToUInt16"; "ToInt32"; "ToUInt32"; "ToInt64"; "ToUInt64"; "ToSingle"; "ToDouble"; - "ToDecimal"; "ToUIntPtr"; "ToIntPtr"; "Pow"; "Atan2" ] - -//------------------------------------------------------------------------- -// Run the constraint solver with undo (used during method overload resolution) - -type trace = Trace of (unit -> unit) list ref - -type OptionalTrace = - | NoTrace - | WithTrace of trace - -let newTrace () = Trace (ref []) -let undoTrace (Trace trace) = List.iter (fun a -> a ()) !trace -let saveOnPreviousTrace (Trace trace1) (Trace trace2) = trace1 := !trace1 @ !trace2 - -let isNoTrace = function NoTrace -> true | WithTrace _ -> false - - -let CollectThenUndo f = - let trace = newTrace() - let res = f trace - undoTrace trace; - res - -let CheckThenUndo f = CollectThenUndo f |> CheckNoErrorsAndGetWarnings - -let FilterEachThenUndo f meths = - meths |> List.choose (fun calledMeth -> - match CheckThenUndo (fun trace -> f trace calledMeth) with - | None -> None - | Some warns -> Some (calledMeth,warns.Length)) - - -//------------------------------------------------------------------------- -// Solve - -exception NonRigidTypar of DisplayEnv * string option * range * Tast.typ * Tast.typ * range -exception LocallyAbortOperationThatLosesAbbrevs -let localAbortD = ErrorD LocallyAbortOperationThatLosesAbbrevs - -/// Ensure that vs is ordered so that an element with minimum sized exponent -/// is at the head of the list. Also, if possible, this element should have rigidity TyparFlexible -let FindMinimumMeasureExponent vs = - let rec findmin vs = - match vs with - | [] -> vs - | (v:Typar,e)::vs -> - match findmin vs with - | [] -> [(v,e)] - | (v',e')::vs' -> - if abs e < abs e' || (abs e = abs e' && (v.Rigidity = TyparFlexible)) - then (v, e) :: vs - else (v',e') :: (v,e) :: vs' - findmin vs - -let SubstMeasure (r:Typar) ms = - if r.Rigidity = TyparRigid then error(InternalError("SubstMeasure: rigid",r.Range)); - if r.Kind = KindType then error(InternalError("SubstMeasure: kind=type",r.Range)); - - let tp = r.Data - match tp.typar_solution with - | None -> tp.typar_solution <- Some (TType_measure ms) - | Some _ -> error(InternalError("already solved",r.Range)); - -let rec TransactStaticReq (csenv:ConstraintSolverEnv) trace (tpr:Typar) req = - let m = csenv.cs_m - if (tpr.Rigidity = TyparRigid && tpr.StaticReq <> req) then - ErrorD(ConstraintSolverError("The declared type parameter '"^tpr.Name^" cannot be used here since the type parameter cannot be resolved at compile time",m,m)) - else - let tpdata = tpr.Data - let orig = tpr.StaticReq - match trace with - | NoTrace -> () - | WithTrace (Trace actions) -> actions := (fun () -> set_static_req_of_tpdata tpdata orig) :: !actions - set_static_req_of_tpdata tpdata req; - CompleteD - -and SolveTypStaticReqTypar (csenv:ConstraintSolverEnv) trace req (tpr:Typar) = - let orig = tpr.StaticReq - let req2 = JoinTyparStaticReq req orig - if orig <> req2 then TransactStaticReq csenv trace tpr req2 else CompleteD - -and SolveTypStaticReq (csenv:ConstraintSolverEnv) trace req ty = - match req with - | NoStaticReq -> CompleteD - | HeadTypeStaticReq -> - (* requires that a type constructor be known at compile time *) - match strip_tpeqns ty with - | TType_measure ms -> - let vs = ListMeasureVarOccsWithNonZeroExponents ms - IterateD (fun ((tpr:Typar),_) -> SolveTypStaticReqTypar csenv trace req tpr) vs - - | _ -> - if (is_anypar_typ csenv.g ty) then - let tpr = dest_anypar_typ csenv.g ty - SolveTypStaticReqTypar csenv trace req tpr - else CompleteD - -let rec TransactDynamicReq (csenv:ConstraintSolverEnv) trace (tpr:Typar) req = - let m = csenv.cs_m - let tpdata = tpr.Data - let orig = tpr.DynamicReq - match trace with - | NoTrace -> () - | WithTrace (Trace actions) -> actions := (fun () -> set_dynamic_req_of_tpdata tpdata orig) :: !actions - set_dynamic_req_of_tpdata tpdata req; - CompleteD - -and SolveTypDynamicReq (csenv:ConstraintSolverEnv) trace req ty = - match req with - | NoDynamicReq -> CompleteD - | DynamicReq -> - if (is_anypar_typ csenv.g ty) then - let tpr = dest_anypar_typ csenv.g ty - if tpr.DynamicReq <> DynamicReq then TransactDynamicReq csenv trace tpr DynamicReq else CompleteD - else CompleteD - -let SubstMeasureWarnIfRigid (csenv:ConstraintSolverEnv) trace (v:Typar) ms = - if v.Rigidity = TyparWarnIfNotRigid && not (is_anypar_typ csenv.g (TType_measure ms)) then - // NOTE: we grab the name eagerly to make sure the type variable prints as a type variable - let tpnmOpt = if v.IsCompilerGenerated then None else Some v.Name - SolveTypStaticReq csenv trace v.StaticReq (TType_measure ms) ++ (fun () -> - SubstMeasure v ms; - WarnD(NonRigidTypar(csenv.cs_denv,tpnmOpt,v.Range,TType_measure (MeasureVar v), TType_measure ms,csenv.cs_m))) - else - // Propagate static requirements from 'tp' to 'ty' - SolveTypStaticReq csenv trace v.StaticReq (TType_measure ms) ++ (fun () -> - SubstMeasure v ms; - if v.Rigidity = TyparAnon && measure_equiv csenv.g ms MeasureOne then - WarnD(Error("This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'",v.Range)) - else CompleteD) - -/// The division operator in Caml/F# rounds towards zero. For our purposes, -/// we want to round towards negative infinity. -let DivRoundDown x y = - let signx=if x<0 then -1 else 1 - let signy=if y<0 then -1 else 1 - - if signx=signy then x / y - else (x-y+signy) / y - -/// Imperatively unify the unit-of-measure expression ms against 1. -/// This is a gcd-like algorithm that proceeds as follows: -/// 1. Express ms in the form 'u1^x1 * ... * 'un^xn * c1^y1 * ... * cm^ym -/// where 'u1,...,'un are non-rigid measure variables, c1,...,cm are measure identifiers or rigid measure variables, -/// x1,...,xn and y1,...,yn are non-zero exponents with |x1| <= |xi| for all i. -/// 2. (a) If m=n=0 then we're done (we're unifying 1 against 1) -/// (b) If m=0 but n<>0 then fail (we're unifying a variable-free expression against 1) -/// (c) If xi is divisible by |x1| for all i, and yj is divisible by |x1| for all j, then -/// immediately solve the constraint with the substitution -/// 'u1 := 'u2^(-x2/x1) * ... * 'un^(-xn/x1) * c1^(-y1/x1) * ... * cm^(-ym/x1) -/// (d) Otherwise, if m=1, fail (example: unifying 'u^2 * kg^3) -/// (e) Otherwise, make the substitution -/// 'u1 := 'u * 'u2^(-x2/x1) * ... * 'un^(-xn/x1) * c1^(-y1/x1) * ... * cm^(-ym/x1) -/// where 'u is a fresh measure variable, and iterate. - -let rec UnifyMeasureWithOne (csenv:ConstraintSolverEnv) trace ms = - if verbose then dprintf " UnifyMeasureWithOne...%s\n" ("ms = " ^ Layout.showL(typeL (TType_measure ms))); - let (rigidvars,nonrigidvars) = (ListMeasureVarOccsWithNonZeroExponents ms) |> List.partition (fun (v,_) -> v.Rigidity = TyparRigid) - let cons = ListMeasureConOccsWithNonZeroExponents csenv.g true ms - match FindMinimumMeasureExponent nonrigidvars, rigidvars, cons with - | [], [], [] -> CompleteD - | [], _, _ -> localAbortD - | (v,e)::vs, rigidvars, cs -> - let newms = ProdMeasures (List.map (fun (c,e') -> MeasurePower (MeasureCon c) (- (DivRoundDown e' e))) cs - @ List.map (fun (v,e') -> MeasurePower (MeasureVar v) (- (DivRoundDown e' e))) (vs @ rigidvars)) - if cs |> List.forall (fun (_,e') -> e' % e = 0) && (vs@rigidvars) |> List.forall (fun (_,e') -> e' % e = 0) - then SubstMeasureWarnIfRigid csenv trace v newms - elif isNil vs - then localAbortD - else - // New variable v' must inherit WarnIfNotRigid from v - let v' = new_anon_inference_var (KindMeasure,v.Range,v.Rigidity,v.StaticReq,v.DynamicReq) - SubstMeasure v (MeasureProd(MeasureVar v', newms)); - UnifyMeasureWithOne csenv trace ms - -/// Imperatively unify unit-of-measure expression ms1 against ms2 -let UnifyMeasures (csenv:ConstraintSolverEnv) trace ms1 ms2 = - if verbose then dprintf "UnifyMeasures...%s\n" ("ms1 = "^Layout.showL(typeL (TType_measure ms1))^", ms2 = "^Layout.showL(typeL (TType_measure ms2))); - UnifyMeasureWithOne csenv trace (MeasureProd(ms1,MeasureInv ms2)) - - -/// Simplify a unit-of-measure expression ms that forms part of a type scheme. -/// We make substitutions for vars, which are the (remaining) bound variables -/// in the scheme that we wish to simplify. -let SimplifyMeasure g vars ms = - if verbose then dprintf ("SimplifyMeasure ms = %s generalizable = %s\n") (Layout.showL (typeL (TType_measure ms))) (String.concat "," (List.map (fun tp -> Layout.showL (typeL (mk_typar_ty tp))) vars)); - let rec simp vars = - match FindMinimumMeasureExponent (List.filter (fun (v,e) -> e<>0) (List.map (fun v -> (v, MeasureVarExponent v ms)) vars)) with - | [] -> - (vars, None) - - | (v,e)::vs -> - if e < 0 then - let v' = new_anon_inference_var (KindMeasure,v.Range,TyparFlexible,v.StaticReq,v.DynamicReq) - let vars' = v' :: ListSet.remove typar_ref_eq v vars - SubstMeasure v (MeasureInv (MeasureVar v')); - simp vars' - else - let newv = if v.IsCompilerGenerated then new_anon_inference_var (KindMeasure,v.Range,TyparFlexible,v.StaticReq,v.DynamicReq) - else new_named_inference_measurevar (v.Range,TyparFlexible,v.StaticReq,v.Id) - let remainingvars = ListSet.remove typar_ref_eq v vars - let newms = (ProdMeasures (List.map (fun (c,e') -> MeasurePower (MeasureCon c) (- (DivRoundDown e' e))) (ListMeasureConOccsWithNonZeroExponents g false ms) - @ List.map (fun (v',e') -> if typar_ref_eq v v' then MeasureVar newv else MeasurePower (MeasureVar v') (- (DivRoundDown e' e))) (ListMeasureVarOccsWithNonZeroExponents ms))); - SubstMeasure v newms; - match vs with - | [] -> (remainingvars, Some newv) - | _ -> simp (newv::remainingvars) - - simp vars - -// Normalize a type ty that forms part of a unit-of-measure-polymorphic type scheme. -// Generalizable are the unit-of-measure variables that remain to be simplified. Generalized -// is a list of unit-of-measure variables that have already been generalized. -let rec SimplifyMeasuresInType g resultFirst ((generalizable, generalized) as param) ty = - if verbose then dprintf ("SimplifyMeasuresInType ty = %s generalizable = %s\n") (Layout.showL (typeL ty)) (String.concat "," (List.map (fun tp -> Layout.showL (typeL (mk_typar_ty tp))) generalizable)); - match strip_tpeqns ty with - | TType_ucase(_,l) - | TType_app (_,l) - | TType_tuple l -> SimplifyMeasuresInTypes g param l - - | TType_fun (d,r) -> if resultFirst then SimplifyMeasuresInTypes g param [r;d] else SimplifyMeasuresInTypes g param [d;r] - | TType_var r -> param - | TType_forall (tp,tau) -> SimplifyMeasuresInType g resultFirst param tau - | TType_measure measure -> - let (generalizable', newlygeneralized) = SimplifyMeasure g generalizable measure - if verbose then dprintf "newlygeneralized = %s\n" (match newlygeneralized with None -> "none" | Some tp -> Layout.showL (typeL (mk_typar_ty tp))); - match newlygeneralized with - | None -> (generalizable', generalized) - | Some v -> (generalizable', v::generalized) - | _ -> param - -and SimplifyMeasuresInTypes g param tys = - match tys with - | [] -> param - | ty::tys -> - let param' = SimplifyMeasuresInType g false param ty - SimplifyMeasuresInTypes g param' tys - -// We normalize unit-of-measure-polymorphic type schemes as described in Kennedy's thesis. There -// are three reasons for doing this: -// (1) to present concise and consistent type schemes to the programmer -// (2) so that we can compute equivalence of type schemes in signature matching -// (3) in order to produce a list of type parameters ordered as they appear in the (normalized) scheme. -// -// Representing the normal form as a matrix, with a row for each variable, -// and a column for each unit-of-measure expression in the "skeleton" of the type. Entries are integer exponents. -// -// ( 0...0 a1 as1 b1 bs1 c1 cs1 ...) -// ( 0...0 0 0...0 b2 bs2 c2 cs2 ...) -// ( 0...0 0 0...0 0 0...0 c3 cs3 ...) -//... -// ( 0...0 0 0...0 0 0...0 0 0...0 ...) -// -// The normal form is unique; what's more, it can be used to force a variable ordering -// because the first occurrence of a variable in a type is in a unit-of-measure expression with no -// other "new" variables (a1, b2, c3, above). -// -// The corner entries a1, b2, c3 are all positive. Entries lying above them (b1, c1, c2, etc) are -// non-negative and smaller than the corresponding corner entry. Entries as1, bs1, bs2, etc are arbitrary. -// This is known as a *reduced row echelon* matrix or Hermite matrix. -let SimplifyMeasuresInTypeScheme g resultFirst (generalizable:Typar list) ty = - // Only bother if we're generalizing over at least one unit-of-measure variable - let uvars, vars = - generalizable |> List.partition (fun v -> v.Kind = KindMeasure && v.Rigidity <> TyparRigid) - - match uvars with - | [] -> generalizable - | _::_ -> - let (_, generalized) = SimplifyMeasuresInType g resultFirst (uvars, []) ty - - vars @ List.rev generalized - -let freshMeasure () = MeasureVar (new_inference_measurevar ()) - -let CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 (r:Typar) ty = - let g = csenv.g - let denv = csenv.cs_denv - if r.Rigidity = TyparWarnIfNotRigid && - (not (is_anypar_typ g ty) || - (let tp2 = dest_anypar_typ g ty - not tp2.IsCompilerGenerated && - (r.IsCompilerGenerated || - // exclude this warning for two identically named user-specified type parameters, e.g. from different mutually recursive functions or types - r.DisplayName <> tp2.DisplayName ))) then - - // NOTE: we grab the name eagerly to make sure the type variable prints as a type variable - let tpnmOpt = if r.IsCompilerGenerated then None else Some r.Name - WarnD(NonRigidTypar(denv,tpnmOpt,r.Range,ty1,ty,csenv.cs_m )) - else - CompleteD - -/// Return true if we would rather unify this variable v1 := v2 than vice versa -let PreferUnifyTypar (v1:Typar) (v2:Typar) = - match v1.Rigidity,v2.Rigidity with - // Rigid > all - | TyparRigid,_ -> false - // Prefer to unify away WarnIfNotRigid in favour of Rigid - | TyparWarnIfNotRigid,TyparRigid -> true - | TyparWarnIfNotRigid,TyparWarnIfNotRigid -> true - | TyparWarnIfNotRigid,TyparAnon -> false - | TyparWarnIfNotRigid,TyparFlexible -> false - // Prefer to unify away anonymous variables in favour of Rigid, WarnIfNotRigid - | TyparAnon,TyparRigid -> true - | TyparAnon,TyparWarnIfNotRigid -> true - | TyparAnon,TyparAnon -> true - | TyparAnon,TyparFlexible -> false - // Prefer to unify away Flexible in favour of Rigid, WarnIfNotRigid or Anon - | TyparFlexible,TyparRigid -> true - | TyparFlexible,TyparWarnIfNotRigid -> true - | TyparFlexible,TyparAnon -> true - | TyparFlexible,TyparFlexible -> - - // Prefer to unify away compiler generated type vars - match v1.IsCompilerGenerated, v2.IsCompilerGenerated with - | true,false -> true - | false,true -> false - | _ -> - // Prefer to unify away non-error vars - gives better error recovery since we keep - // error vars lying around, and can avoid giving errors about illegal polymorphism - // if they occur - match v1.IsFromError, v2.IsFromError with - | true,false -> false - | _ -> true - - -/// Add the constraint "ty1 = ty" to the constraint problem, where ty1 is a type variable. -/// Propagate all effects of adding this constraint, e.g. to solve other variables -let rec SolveTyparEqualsTyp (csenv:ConstraintSolverEnv) ndeep m2 trace ty1 ty = - if verbose then dprintf "--> SolveTyparEqualsTyp...%s\n" ("ty1 = "^Layout.showL(typeL ty1)^", ty = "^Layout.showL(typeL ty)); - let m = csenv.cs_m - let denv = csenv.cs_denv - DepthCheck ndeep m ++ (fun () -> - match ty1 with - | TType_var r -> - if r.Kind = KindMeasure then error(InternalError("SolveTyparEqualsTyp: unit",m)); - - // The types may still be equivalent due to abbreviations, which we are trying not to eliminate - if type_equiv csenv.g ty1 ty then CompleteD else - - // The famous 'OccursCheck' check to catch things like 'a = list<'a> - if OccursCheck csenv.g r ty then ErrorD (ConstraintSolverInfiniteTypes(denv,ty1,ty,m,m2)) else - - // Note: warn _and_ continue! - CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 r ty ++ (fun () -> - - // Record the solution before we solve the constraints, since - // We may need to make use of the equation when solving the constraints. - // Record a entry in the undo trace if one is provided - let tpdata = r.Data - match trace with - | NoTrace -> () - | WithTrace (Trace actions) -> actions := (fun () -> tpdata.typar_solution <- None) :: !actions - tpdata.typar_solution <- Some ty; - - (* dprintf "setting typar %d to type %s at %a\n" r.Stamp ((DebugPrint.showType ty)) output_range m; *) - - (* Only solve constraints if this is not an error var *) - if r.IsFromError then CompleteD else - - // Check to see if this type variable is relevant to any trait constraints. - // If so, re-solve the relevant constraints. - (if csenv.cs_css.css_cxs.ContainsKey r.Stamp then - RepeatWhileD (fun () -> SolveRelevantMemberConstraintsForTypar csenv ndeep false trace r) - else - CompleteD) ++ (fun _ -> - - // Re-solve the other constraints associated with this type variable - solveTypMeetsTyparConstraints csenv ndeep m2 trace ty (r.DynamicReq,r.StaticReq,r.Constraints))) - - | TType_measure (MeasureVar r) -> - if r.Kind = KindType then error(InternalError("SolveTyparEqualsTyp: kind=type for unit var",m)); - - CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 r ty ++ (fun () -> - - solveTypMeetsTyparConstraints csenv ndeep m2 trace ty (r.DynamicReq,r.StaticReq,r.Constraints) ++ (fun () -> - match ty with - | TType_measure ms -> - let tp = r.Data - tp.typar_solution <- Some (TType_measure ms); CompleteD - | _ -> failwith "SolveTyparEqualsTyp: unit-of-measure var unified with type")) - - | _ -> failwith "SolveTyparEqualsTyp") - -/// Given a type 'ty' and a set of constraints on that type, solve those constraints. -and solveTypMeetsTyparConstraints (csenv:ConstraintSolverEnv) ndeep m2 trace ty (dreq,sreq,cs) = - let g = csenv.g - let m = csenv.cs_m - // Propagate dynamic requirements from 'tp' to 'ty' - SolveTypDynamicReq csenv trace dreq ty ++ (fun () -> - // Propagate static requirements from 'tp' to 'ty' - SolveTypStaticReq csenv trace sreq ty ++ (fun () -> - - // Solve constraints on 'tp' w.r.t. 'ty' - cs |> IterateD (function - | TTyparDefaultsToType (priority,dty,m) -> - if not (is_typar_typ g ty) or type_equiv g ty dty then CompleteD else - AddConstraint csenv ndeep m2 trace (dest_typar_typ g ty) (TTyparDefaultsToType(priority,dty,m)) - - | TTyparSupportsNull m2 -> SolveTypSupportsNull csenv ndeep m2 trace ty - | TTyparIsEnum(underlying, m2) -> SolveTypIsEnum csenv ndeep m2 trace ty underlying - | TTyparIsDelegate(aty,bty, m2) -> SolveTypIsDelegate csenv ndeep m2 trace ty aty bty - | TTyparIsNotNullableValueType m2 -> SolveTypIsNonNullableValueType csenv ndeep m2 trace ty - | TTyparIsReferenceType m2 -> SolveTypIsReferenceType csenv ndeep m2 trace ty - | TTyparRequiresDefaultConstructor m2 -> SolveTypRequiresDefaultConstructor csenv ndeep m2 trace ty - | TTyparSimpleChoice(tys,m2) -> SolveTypChoice csenv ndeep m2 trace ty tys - | TTyparCoercesToType(ty2,m2) -> SolveTypSubsumesTypKeepAbbrevs csenv ndeep m2 trace ty2 ty - | TTyparMayResolveMemberConstraint(traitInfo,m2) -> - SolveMemberConstraint csenv false ndeep m2 trace traitInfo ++ (fun _ -> CompleteD) - ))) - - -/// Add the constraint "ty1 = ty2" to the constraint problem. -/// Propagate all effects of adding this constraint, e.g. to solve type variables -and solveTypEqualsTyp (csenv:ConstraintSolverEnv) ndeep m2 trace ty1 ty2 = - if verbose then dprintf "solveTypEqualsTyp ndeep @ %a\n" output_range csenv.cs_m; -(* dprintf "solveTypEqualsTyp ty1=%s ty2=%s\n" (showL (typeL ty1)) (showL (typeL ty2)); *) - let ndeep = ndeep + 1 - let aenv = csenv.cs_aenv - let g = csenv.g - let m = csenv.cs_m - let denv = csenv.cs_denv - if ty1 === ty2 then CompleteD else - let canShortcut = (isNoTrace trace) - let sty1 = strip_tpeqns_and_tcabbrevsA csenv.g canShortcut ty1 - let sty2 = strip_tpeqns_and_tcabbrevsA csenv.g canShortcut ty2 -(* dprintf "sty1=%s sty2=%s\n" (showL (typeL sty1)) (showL (typeL sty2)); *) - match sty1, sty2 with - // type vars inside forall-types may be alpha-equivalent - | TType_var tp1, TType_var tp2 when typar_ref_eq tp1 tp2 || (tpmap_mem tp1 aenv.ae_typars && type_equiv g (tpmap_find tp1 aenv.ae_typars) ty2) -> CompleteD - - | TType_var tp1, TType_var tp2 when PreferUnifyTypar tp1 tp2 -> SolveTyparEqualsTyp csenv ndeep m2 trace sty1 ty2 - | TType_var tp1, TType_var tp2 when PreferUnifyTypar tp2 tp1 -> SolveTyparEqualsTyp csenv ndeep m2 trace sty2 ty1 - - | TType_var r, _ when (r.Rigidity <> TyparRigid) -> SolveTyparEqualsTyp csenv ndeep m2 trace sty1 ty2 - | _, TType_var r when (r.Rigidity <> TyparRigid) -> SolveTyparEqualsTyp csenv ndeep m2 trace sty2 ty1 - - // Catch float<_>=float<1>, float32<_>=float32<1> and decimal<_>=decimal<1> - | (_, TType_app (tc2,[ms])) when (tc2.IsMeasureableReprTycon && type_equiv csenv.g sty1 (reduce_tcref_measureable tc2 [ms])) - -> solveTypEqualsTyp csenv ndeep m2 trace ms (TType_measure MeasureOne) - | (TType_app (tc2,[ms]), _) when (tc2.IsMeasureableReprTycon && type_equiv csenv.g sty2 (reduce_tcref_measureable tc2 [ms])) - -> solveTypEqualsTyp csenv ndeep m2 trace ms (TType_measure MeasureOne) - - | TType_app (tc1,l1) ,TType_app (tc2,l2) when tcref_eq g tc1 tc2 -> SolveTypEqualsTypEqns csenv ndeep m2 trace l1 l2 - | TType_app (tc1,_) ,TType_app (tc2,_) -> localAbortD - | TType_tuple l1 ,TType_tuple l2 -> SolveTypEqualsTypEqns csenv ndeep m2 trace l1 l2 - | TType_fun (d1,r1) ,TType_fun (d2,r2) -> SolveFunTypEqn csenv ndeep m2 trace d1 d2 r1 r2 - | TType_measure ms1 ,TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2 - | TType_forall(tps1,rty1), TType_forall(tps2,rty2) -> - if (List.length tps1 <> List.length tps2) then localAbortD else - let aenv = bind_tyeq_env_typars tps1 tps2 aenv - let csenv = {csenv with cs_aenv = aenv } - if not (typar_decls_aequiv g aenv tps1 tps2) then localAbortD else - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty1 rty2 - - | TType_ucase (uc1,l1) ,TType_ucase (uc2,l2) when g.ucref_eq uc1 uc2 -> SolveTypEqualsTypEqns csenv ndeep m2 trace l1 l2 - - - | _ -> localAbortD - -and SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ty1 ty2 = - let denv = csenv.cs_denv - - // Back out of back out of expansions of type abbreviations to give improved error messages. - TryD (fun () -> solveTypEqualsTyp csenv ndeep m2 trace ty1 ty2) - (function LocallyAbortOperationThatLosesAbbrevs -> ErrorD(ConstraintSolverTypesNotInEqualityRelation(denv,ty1,ty2,csenv.cs_m,m2)) - | err -> ErrorD err) - -and SolveTypEqualsTypEqns csenv ndeep m2 trace origl1 origl2 = - match origl1,origl2 with - | [],[] -> CompleteD - | _ -> - // We unwind Iterate2D by hand here for performance reasons. - let rec loop l1 l2 = - match l1,l2 with - | [],[] -> CompleteD - | h1::t1, h2::t2 -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace h1 h2 ++ (fun () -> loop t1 t2) - | _ -> - ErrorD(ConstraintSolverTupleDiffLengths(csenv.cs_denv,origl1,origl2,csenv.cs_m,m2)) - loop origl1 origl2 - -and SolveFunTypEqn csenv ndeep m2 trace d1 d2 r1 r2 = - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace d1 d2 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace r1 r2) - -and SolveTypSubsumesTyp (csenv:ConstraintSolverEnv) ndeep m2 trace ty1 ty2 = - // 'a :> obj ---> - let ndeep = ndeep + 1 - let g = csenv.g - let amap = csenv.amap - let aenv = csenv.cs_aenv - let denv = csenv.cs_denv - let m = csenv.cs_m - if is_obj_typ g ty1 then CompleteD else - let canShortcut = (isNoTrace trace) - let sty1 = strip_tpeqns_and_tcabbrevsA csenv.g canShortcut ty1 - let sty2 = strip_tpeqns_and_tcabbrevsA csenv.g canShortcut ty2 - match sty1, sty2 with - | TType_var tp1, _ - when tpmap_mem tp1 aenv.ae_typars -> - SolveTypSubsumesTyp csenv ndeep m2 trace (tpmap_find tp1 aenv.ae_typars) ty2 - - | TType_var r1, TType_var r2 when typar_ref_eq r1 r2 -> CompleteD - | _, TType_var r (* when not (rigid_of_typar r) *) -> SolveTyparSubtypeOfType csenv ndeep m2 trace r ty1 - | TType_var r , _ (* | _, TType_var r *) -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ty1 ty2 - | TType_tuple l1 ,TType_tuple l2 -> SolveTypEqualsTypEqns csenv ndeep m2 trace l1 l2 (* nb. can unify since no variance *) - | TType_fun (d1,r1) ,TType_fun (d2,r2) -> SolveFunTypEqn csenv ndeep m2 trace d1 d2 r1 r2 (* nb. can unify since no variance *) - | TType_measure ms1, TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2 - - // Enforce the identities float=float<1>, float32=float32<1> and decimal=decimal<1> - | (_, TType_app (tc2,[ms])) when (tc2.IsMeasureableReprTycon && type_equiv csenv.g sty1 (reduce_tcref_measureable tc2 [ms])) - -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ms (TType_measure MeasureOne) - | (TType_app (tc2,[ms]), _) when (tc2.IsMeasureableReprTycon && type_equiv csenv.g sty2 (reduce_tcref_measureable tc2 [ms])) - -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ms (TType_measure MeasureOne) - - | TType_app (tc1,l1) ,TType_app (tc2,l2) when tcref_eq g tc1 tc2 -> - SolveTypEqualsTypEqns csenv ndeep m2 trace l1 l2 - - | TType_ucase (uc1,l1) ,TType_ucase (uc2,l2) when g.ucref_eq uc1 uc2 -> - SolveTypEqualsTypEqns csenv ndeep m2 trace l1 l2 - - | _ -> - // By now we know the type is not a variable type - - // C :> obj ---> - if is_obj_typ g ty1 then CompleteD else - - // 'a[] :> IList<'b> ---> 'a = 'b - // 'a[] :> ICollection<'b> ---> 'a = 'b - // 'a[] :> IEnumerable<'b> ---> 'a = 'b - // Note we don't support co-variance on array types nor - // the special .NET conversions for these types - if - (is_il_arr1_typ g ty2 && - is_stripped_tyapp_typ g ty1 && - (let tcr1 = tcref_of_stripped_typ g ty1 - tcref_eq g tcr1 g.tcref_System_Collections_Generic_IList || - tcref_eq g tcr1 g.tcref_System_Collections_Generic_ICollection || - tcref_eq g tcr1 g.tcref_System_Collections_Generic_IEnumerable)) then - - let tcref,tinst = dest_stripped_tyapp_typ g ty1 - match tinst with - | [ty1arg] -> - let ty2arg = dest_il_arr1_typ g ty2 - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ty1arg ty2arg - | _ -> error(InternalError("dest_il_arr1_typ",m)); - - // D :> Head<_> --> C :> Head<_> for the - // first interface or super-class C supported by D which - // may feasibly convert to Head. - - else - match (FindUniqueFeasibleSupertype g amap m ty1 ty2) with - | None -> ErrorD(ConstraintSolverTypesNotInSubsumptionRelation(denv,ty1,ty2,m,m2)) - | Some t -> SolveTypSubsumesTyp csenv ndeep m2 trace ty1 t - -and SolveTypSubsumesTypKeepAbbrevs csenv ndeep m2 trace ty1 ty2 = - let denv = csenv.cs_denv - TryD (fun () -> SolveTypSubsumesTyp csenv ndeep m2 trace ty1 ty2) - (function LocallyAbortOperationThatLosesAbbrevs -> ErrorD(ConstraintSolverTypesNotInSubsumptionRelation(denv,ty1,ty2,csenv.cs_m,m2)) - | err -> ErrorD err) - -//------------------------------------------------------------------------- -// Solve and record non-equality constraints -//------------------------------------------------------------------------- - - -and SolveTyparSubtypeOfType (csenv:ConstraintSolverEnv) ndeep m2 trace tp ty1 = - let g = csenv.g - let m = csenv.cs_m - if is_obj_typ g ty1 then CompleteD - elif type_equiv g ty1 (mk_typar_ty tp) then CompleteD - elif is_sealed_typ g ty1 then - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace (mk_typar_ty tp) ty1 - else - AddConstraint csenv ndeep m2 trace tp (TTyparCoercesToType(ty1,m)) - -and DepthCheck ndeep m = - if ndeep > 300 then ErrorD(Error("Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations",m)) else CompleteD - -// If this is a type that's parameterized on a unit-of-measure (expected to be numeric), unify its measure with 1 -and SolveDimensionlessNumericType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = - match GetMeasureOfType csenv.g ty with - | Some (tcref,ms2) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ty (mk_tyapp_ty tcref [TType_measure MeasureOne]) - | None -> - CompleteD - -/// We do a bunch of fakery to pretend that primitive types have certain members. -/// We pretend int and other types support a number of operators. In the actual IL for mscorlib they -/// don't, however the type-directed static optimization rules in the library code that makes use of this -/// will deal with the problem. -and SolveMemberConstraint (csenv:ConstraintSolverEnv) canon ndeep m2 trace (TTrait(tys,nm,memFlags,argtys,rty,sln)) : OperationResult = - //if sln.Value.IsSome then ResultD true else - let g = csenv.g - let m = csenv.cs_m - let amap = csenv.amap - let aenv = csenv.cs_aenv - let denv = csenv.cs_denv - DepthCheck ndeep m ++ (fun () -> - - if verbose then dprintf "-----------------------------\nResolve trait for %s\n" nm; - - // Remove duplicates from the set of types in the support - let tys = ListSet.setify (type_aequiv g aenv) tys - // Rebuild the trait infor after removing duplicates - let traitInfo = (TTrait(tys,nm,memFlags,argtys,rty,sln)) - let rty = GetFSharpViewOfReturnType g rty - - // Assert the object type if the constraint is for an instance member - begin - if memFlags.MemberIsInstance then - match tys, argtys with - | [ty], (h :: t) -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace h ty - | _ -> ErrorD (ConstraintSolverError("Expected arguments to an instance member", m,m2)) - else CompleteD - end ++ (fun () -> - - // Trait calls are only supported on pseudo type (variables) - tys |> IterateD (SolveTypStaticReq csenv trace HeadTypeStaticReq)) ++ (fun () -> - - let argtys = if memFlags.MemberIsInstance then List.tl argtys else argtys - - let minfos = GetRelevantMethodsForTrait csenv canon nm traitInfo - - if verbose then minfos |> List.iter (fun minfo -> dprintf "Possible overload: %s\n" (string_of_minfo amap m denv minfo)); - - match minfos,tys,memFlags.MemberIsInstance,nm,argtys with - | _,_,false,("op_Division" | "op_Multiply"),[argty1;argty2] - when - // This simulates the existence of - // float * float -> float - // float32 * float32 -> float32 - // float<'u> * float<'v> -> float<'u 'v> - // float32<'u> * float32<'v> -> float32<'u 'v> - // decimal<'u> * decimal<'v> -> decimal<'u 'v> - // decimal<'u> * decimal -> decimal<'u> - // float32<'u> * float32<'v> -> float32<'u 'v> - // int * int -> int - // int64 * int64 -> int64 - // - // The rule is triggered by these sorts of inputs when canon=false - // float * float - // float * float32 // will give error - // decimal * decimal - // decimal * decimal <-- Note this one triggers even though "decimal" has some possibly-relevant methods - // float * Matrix // the rule doesn't trigger for this one since Matrix has overloads we can use and we prefer those instead - // float * Matrix // the rule doesn't trigger for this one since Matrix has overloads we can use and we prefer those instead - // - // The rule is triggered by these sorts of inputs when canon=true - // float * 'a - // 'a * float - // decimal<'u> * 'a <--- - (let checkRuleAppliesInPreferenceToMethods argty1 argty2 = - // Check that at least one of the argument types is numeric - (IsNumericOrIntegralEnumType g argty1) && - // Check that the support of type variables is empty. That is, - // if we're canonicalizing, then having one of the types nominal is sufficient. - // If not, then both must be nominal (i.e. not a type variable). - (canon || not (is_typar_typ g argty2)) && - // This next condition checks that either - // - Neither type contributes any methods OR - // - We have the special case "decimal<_> * decimal". In this case we have some - // possibly-relevant methods from "decimal" but we ignore them in this case. - (isNil minfos || (isSome (GetMeasureOfType g argty1) && IsDecimalType g argty2)) in - - checkRuleAppliesInPreferenceToMethods argty1 argty2 || - checkRuleAppliesInPreferenceToMethods argty2 argty1) -> - - match GetMeasureOfType g argty1 with - | Some (tcref,ms1) -> - let ms2 = freshMeasure () - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 (mk_tyapp_ty tcref [TType_measure ms2]) ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty (mk_tyapp_ty tcref [TType_measure (MeasureProd(ms1,if nm = "op_Multiply" then ms2 else MeasureInv ms2))]) ++ (fun () -> - ResultD TTraitBuiltIn)) - | _ -> - match GetMeasureOfType g argty2 with - | Some (tcref,ms2) -> - let ms1 = freshMeasure () - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty1 (mk_tyapp_ty tcref [TType_measure ms1]) ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty (mk_tyapp_ty tcref [TType_measure (MeasureProd(ms1, if nm = "op_Multiply" then ms2 else MeasureInv ms2))]) ++ (fun () -> - ResultD TTraitBuiltIn)) - | _ -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> - ResultD TTraitBuiltIn)) - - | [],_,false,("op_Addition" | "op_Subtraction" | "op_Modulus"),[argty1;argty2] - when (IsNumericOrIntegralEnumType g argty1 || (nm = "op_Addition" && (IsCharType g argty1 || IsStringType g argty1))) && (canon || not (is_typar_typ g argty2)) - || (IsNumericOrIntegralEnumType g argty2 || (nm = "op_Addition" && (IsCharType g argty1 || IsStringType g argty1))) && (canon || not (is_typar_typ g argty1)) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> - ResultD TTraitBuiltIn)) - - - // We pretend for uniformity that the numeric types have a static property called Zero and One - // As with constants, only zero is polymorphic in its units - | [],[ty],false,"get_Zero",[] - when IsNumericType g ty -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty ty ++ (fun () -> - ResultD TTraitBuiltIn) - - | [],[ty],false,"get_One",[] - when IsNumericType g ty || IsCharType g ty -> - SolveDimensionlessNumericType csenv ndeep m2 trace ty ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty ty ++ (fun () -> - ResultD TTraitBuiltIn)) - - | [],_,false,("DivideByInt"),[argty1;argty2] - when IsFpType g argty1 || IsDecimalType g argty1 -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 g.int_ty ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> - ResultD TTraitBuiltIn)) - - // We pretend for uniformity that the 'string' and 'array' types have an indexer property called 'Item' - | [], [ty],true,("get_Item"),[argty1] - when IsStringType g ty -> - - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty1 g.int_ty ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty g.char_ty ++ (fun () -> - ResultD TTraitBuiltIn)) - (* WarnD(OCamlCompatibility("An use of the operator 'expr.[idx]' involved a lookup on an object of indeterminate type. This is deprecated in F# unless OCaml-comaptibility is enabled. Consider adding further type constraints",m) *) - - | [], [ty],true,("get_Item"),argtys - when IsArrayTypeWithIndexer g ty -> - - (if rank_of_any_array_typ g ty <> argtys.Length then ErrorD(ConstraintSolverError(sprintf "This indexer expects %d arguments but is here given %d" (rank_of_any_array_typ g ty) argtys.Length,m,m2)) else CompleteD) ++ (fun () -> - (argtys |> IterateD (fun argty -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty g.int_ty)) ++ (fun () -> - let ety = dest_any_array_typ g ty - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty ety ++ (fun () -> - ResultD TTraitBuiltIn))) - - | [], [ty],true,("set_Item"),argtys - when IsArrayTypeWithIndexer g ty -> - - (if rank_of_any_array_typ g ty <> argtys.Length - 1 then ErrorD(ConstraintSolverError(sprintf "This indexer expects %d arguments but is here given %d" (rank_of_any_array_typ g ty) (argtys.Length - 1),m,m2)) else CompleteD) ++ (fun () -> - let argtys,ety = List.frontAndBack argtys - (argtys |> IterateD (fun argty -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty g.int_ty)) ++ (fun () -> - let etys = dest_any_array_typ g ty - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ety etys ++ (fun () -> - ResultD TTraitBuiltIn))) - - | [],_,false,("op_BitwiseAnd" | "op_BitwiseOr" | "op_ExclusiveOr"),[argty1;argty2] - when (IsIntegralOrIntegralEnumType g argty1 || (is_flag_enum_typ g argty1)) && (canon || not (is_typar_typ g argty2)) - || (IsIntegralOrIntegralEnumType g argty2 || (is_flag_enum_typ g argty2)) && (canon || not (is_typar_typ g argty1)) -> - - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> - SolveDimensionlessNumericType csenv ndeep m2 trace argty1 ++ (fun () -> - ResultD TTraitBuiltIn))); - - | [], _,false,("op_LeftShift" | "op_RightShift"),[argty1;argty2] - when IsIntegralOrIntegralEnumType g argty1 -> - - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 g.int_ty ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> - SolveDimensionlessNumericType csenv ndeep m2 trace argty1 ++ (fun () -> - ResultD TTraitBuiltIn))) - - | _,_,false,("op_UnaryPlus"),[argty] - when IsNumericOrIntegralEnumType g argty -> - - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> - ResultD TTraitBuiltIn) - - | _,_,false,("op_UnaryNegation"),[argty] - when IsSignedIntegralType g argty || IsFpType g argty || IsDecimalType g argty -> - - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> - ResultD TTraitBuiltIn) - - | _,_,true,("get_Sign"),[] - when (let argty = tys.Head in IsSignedIntegralType g argty || IsFpType g argty || IsDecimalType g argty) -> - - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty g.int32_ty ++ (fun () -> - ResultD TTraitBuiltIn) - - | _,_,false,("op_LogicalNot" | "op_OnesComplement"),[argty] - when IsIntegralOrIntegralEnumType g argty -> - - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> - SolveDimensionlessNumericType csenv ndeep m2 trace argty ++ (fun () -> - ResultD TTraitBuiltIn)) - - | _,_,false,("Abs"),[argty] - when IsSignedIntegralType g argty || IsFpType g argty || IsDecimalType g argty -> - - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> - ResultD TTraitBuiltIn) - - | _,_,false,"Sqrt",[argty1] - when IsFpType g argty1 -> - match GetMeasureOfType g argty1 with - | Some (tcref, _) -> - let ms1 = freshMeasure () - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty1 (mk_tyapp_ty tcref [TType_measure (MeasureProd (ms1,ms1))]) ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty (mk_tyapp_ty tcref [TType_measure ms1]) ++ (fun () -> - ResultD TTraitBuiltIn)) - | None -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> - ResultD TTraitBuiltIn) - - | _,_,false,("Sin" | "Cos" | "Tan" | "Sinh" | "Cosh" | "Tanh" | "Atan" | "Acos" | "Asin" | "Exp" | "Ceiling" | "Floor" | "Round" | "Truncate" | "Log10" | "Log" | "Sqrt"),[argty] - when IsFpType g argty -> - - SolveDimensionlessNumericType csenv ndeep m2 trace argty ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> - ResultD TTraitBuiltIn)) - - | _,_,false,("ToChar" | "ToByte" | "ToSByte" | "ToInt16" | "ToUInt16" | "ToInt32" | "ToUInt32" | "ToInt64" | "ToUInt64" | "ToSingle" | "ToDouble"),[argty] - when IsNonDecimalNumericOrIntegralEnumType g argty || IsStringType g argty || IsCharType g argty -> - - ResultD TTraitBuiltIn - - | _,_,false,("ToDecimal"),[argty] - when IsNumericOrIntegralEnumType g argty || IsStringType g argty -> - - ResultD TTraitBuiltIn - - | _,_,false,("ToUIntPtr" | "ToIntPtr"),[argty] - when IsNonDecimalNumericOrIntegralEnumType g argty || IsCharType g argty -> (* note: IntPtr and UIntPtr are different, they do not support .Parse() from string *) - - ResultD TTraitBuiltIn - - | [],_,false,"Pow",[argty1; argty2] - when IsFpType g argty1 -> - - SolveDimensionlessNumericType csenv ndeep m2 trace argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> - ResultD TTraitBuiltIn))) - - | _,_,false,("Atan2"),[argty1; argty2] - when IsFpType g argty1 -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> - match GetMeasureOfType g argty1 with - | None -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 - | Some (tcref, _) -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty (mk_tyapp_ty tcref [TType_measure MeasureOne])) ++ (fun () -> - ResultD TTraitBuiltIn) - - | _ -> - // OK, this is not solved by a built-in constraint. - // Now look for real solutions - - match minfos,tys with - | [],[ty] when not (is_typar_typ g ty) -> - if tys |> List.exists (is_fun_typ g) then - ErrorD (ConstraintSolverError("Expecting a type supporting the operator '"^DecompileOpName nm^"' but given a function type. You may be missing an argument to a function",m,m2)) - else - ErrorD (ConstraintSolverError("The type '"^(NicePrint.pretty_string_of_typ denv ty)^"' does not support any operators named '"^DecompileOpName nm^"'",m,m2)) - - | _ -> - - let dummyExpr = mk_unit g m - let calledMethGroup = - minfos |> List.map (fun minfo -> - let callerArgs = argtys |> List.map (fun argty -> CallerArg(argty,m,false,dummyExpr)) - let minst = FreshenMethInfo m minfo - let objtys = (ObjTypesOfMethInfo amap m minfo minst) - MakeCalledMeth(csenv.InfoReader,false, FreshenMethInfo, m,AccessibleFromEverywhere,minfo,minst,minst,None,objtys,[(callerArgs,[])],false)) - (* dprintf " ---> calling ResolveOverloading, nm = %s, ty = '%s'\n" nm (Layout.showL (typeL ty)); *) - - let result,errors = - CollectThenUndo (fun trace -> ResolveOverloading csenv (WithTrace(trace)) nm (0,0) AccessibleFromEverywhere calledMethGroup false (Some (rty,dummyExpr))) - - if verbose then dprintf " <--- called ResolveOverloading, ok? = %b\n" (isSome (CheckNoErrorsAndGetWarnings errors)); - - match result with - | Some (calledMeth:CalledMeth<_>) -> - // OK, the constraint is solved. - // Re-run without undo to commit the inference equations. Throw errors away - let minfo = calledMeth.Method - if verbose then dprintf " ---> constraint solved, calling ResolveOverloading a second time, without undo, minfo = %s\n" (string_of_minfo amap m denv minfo); - let _,errors = ResolveOverloading csenv trace nm (0,0) AccessibleFromEverywhere calledMethGroup false (Some (rty,dummyExpr)) - - errors ++ (fun () -> - let isInstance = minfo.IsInstance - if isInstance <> memFlags.MemberIsInstance then - ErrorD(ConstraintSolverError("The type '"^(NicePrint.pretty_string_of_typ denv minfo.EnclosingType)^"' has a method '"^DecompileOpName nm^"' (full name '"^nm^"'), but the method is"^(if isInstance then " not" else "")^" static",m,m2 )) - else - CheckMethInfoAttributes g m minfo ++ (fun () -> - ResultD (TTraitSolved (minfo,calledMeth.CalledTyArgs)))) - - | None -> - - let support = GetSupportOfMemberConstraint csenv traitInfo - let frees = GetFreeTyparsOfMemberConstraint csenv traitInfo - - // If there's nothing left to learn then raise the errors - (if (canon && isNil support) || isNil frees then errors - // Otherwise re-record the trait waiting for canonicalization - else AddMemberConstraint csenv ndeep m2 trace traitInfo support frees) ++ (fun () -> ResultD TTraitUnsolved) - ) - ++ - (fun res -> RecordMemberConstraintSolution g m trace traitInfo res)) - - -/// Record the solution to a member constraint in the mutable reference cell attached to -/// each member constraint. -and RecordMemberConstraintSolution g m trace traitInfo res = - let transactSolution sln = - let prev = traitInfo.Solution - traitInfo.Solution <- Some sln - match trace with - | NoTrace -> () - | WithTrace (Trace actions) -> actions := (fun () -> traitInfo.Solution <- prev) :: !actions - - match res with - | TTraitUnsolved -> - ResultD false - - | TTraitSolved (minfo,minst) -> - let sln = MemberConstraintSolutionOfMethInfo g m minfo minst - TransactMemberConstraintSolution traitInfo trace sln; - ResultD true - - | TTraitBuiltIn -> - TransactMemberConstraintSolution traitInfo trace BuiltInSln; - ResultD true - -/// Convert a MethInfo into the data we save in the TAST -and MemberConstraintSolutionOfMethInfo g m minfo minst = - match minfo with - | ILMeth(g,ILMethInfo(ILTypeInfo(tcref,tref,tinst,_),extOpt,mdef,typars)) -> - let mref = IL.mk_mref_to_mdef (tref,mdef) - ILMethSln(mk_tyapp_ty tcref tinst,extOpt,mref,minst) - | FSMeth(g,typ,vref) -> - FSMethSln(typ, vref,minst) - | MethInfo.DefaultStructCtor _ -> - error(InternalError("the default struct constructor was the unexpected solution to a trait constraint",m)) - -/// Write into the reference cell stored in the TAST and add to the undo trace if necessary -and TransactMemberConstraintSolution traitInfo trace sln = - let prev = traitInfo.Solution - traitInfo.Solution <- Some sln - match trace with - | NoTrace -> () - | WithTrace (Trace actions) -> actions := (fun () -> traitInfo.Solution <- prev) :: !actions - -/// Only consider overload resolution if canonicalizing or all the types are now nominal. -/// That is, don't perform resolution if more nominal information may influence the set of available overloads -and GetRelevantMethodsForTrait (csenv:ConstraintSolverEnv) canon nm (TTrait(tys,_,_,_,_,_) as traitInfo) = - if canon || isNil (GetSupportOfMemberConstraint csenv traitInfo) then - let m = csenv.cs_m - let g = csenv.g - let minfos = tys |> List.map (GetIntrinsicMethInfosOfType csenv.cs_css.css_InfoReader (Some(nm),AccessibleFromSomeFSharpCode) IgnoreOverrides m) - /// Merge the sets so we don't get the same minfo from each side - /// We merge based on whether minfos use identical metadata or not. - - /// REVIEW: Consider the pathological cases where this may cause a loss of distinction - /// between potential overloads because a generic instantiation derived from the left hand type differs - /// to a generic instantiation for an operator based on the right hand type. - - let minfos = List.fold (ListSet.unionFavourLeft (MethInfosUseIdenticalDefinitions g)) (List.hd minfos) (List.tl minfos) - minfos - else - [] - - - -/// The nominal support of the member constraint -and GetSupportOfMemberConstraint (csenv:ConstraintSolverEnv) (TTrait(tys,_,_,_,_,_)) = - tys |> List.choose (fun ty -> if is_typar_typ csenv.g ty then Some (dest_typar_typ csenv.g ty) else None) - -/// All the typars relevant to the member constraint *) -and GetFreeTyparsOfMemberConstraint (csenv:ConstraintSolverEnv) (TTrait(tys,nm,memFlags,argtys,rty,_)) = - (free_in_types_lr_no_cxs csenv.g (tys@argtys@ Option.to_list rty)) - -/// Re-solve the global constraints involving any of the given type variables. -/// Trait constraints can't always be solved using the pessimistic rules. As a result we only canonicalize -/// them forcefully prior to generalization. -and SolveRelevantMemberConstraints (csenv:ConstraintSolverEnv) ndeep canon trace tps = - - RepeatWhileD - (fun () -> - tps |> AtLeastOneD (fun tp -> - /// Normalize the typar - let ty = mk_typar_ty tp - if not (is_typar_typ csenv.g ty) then ResultD false else - let tp = dest_typar_typ csenv.g ty - SolveRelevantMemberConstraintsForTypar csenv ndeep canon trace tp)) - -and SolveRelevantMemberConstraintsForTypar (csenv:ConstraintSolverEnv) ndeep canon trace tp = - let cxst = csenv.cs_css.css_cxs - let tpn = tp.Stamp - let cxs = Hashtbl.find_all cxst tpn - if isNil cxs then ResultD false else - - if verbose then dprintf "SolveRelevantMemberConstraintsForTypar #cxs = %d, m = %a\n" (List.length cxs) output_range csenv.cs_m; - cxs |> List.iter (fun _ -> Hashtbl.remove cxst tpn); - - assert (isNil (Hashtbl.find_all cxst tpn)); - - match trace with - | NoTrace -> () - | WithTrace (Trace actions) -> actions := (fun () -> List.iter (Hashtbl.add cxst tpn) cxs) :: !actions - - cxs |> AtLeastOneD (fun (traitInfo,m2) -> - let csenv = { csenv with cs_m = m2 } - SolveMemberConstraint csenv canon (ndeep+1) m2 trace traitInfo) - -and CanonicalizeRelevantMemberConstraints (csenv:ConstraintSolverEnv) ndeep trace tps = - SolveRelevantMemberConstraints csenv ndeep true trace tps - - -and AddMemberConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace traitInfo support frees = - let g = csenv.g - let m = csenv.cs_m - let aenv = csenv.cs_aenv - let cxst = csenv.cs_css.css_cxs - - // Write the constraint into the global table. That is, - // associate the constraint with each type variable in the free variables of the constraint. - // This will mean the constraint gets resolved whenever one of these free variables gets solved. - frees |> List.iter (fun tp -> - let tpn = tp.Stamp - - let cxs = Hashtbl.find_all cxst tpn - if verbose then dprintf "AddMemberConstraint: tpn = %d, #cxs = %d, m = %a\n" tpn (List.length cxs) output_range csenv.cs_m; - if verbose && List.length cxs > 10 then - cxs |> List.iter (fun (cx,_) -> dprintf " --> cx = %s, fvs = %s\n" (Layout.showL (traitL cx)) (Layout.showL (TyparsL (GetFreeTyparsOfMemberConstraint csenv cx)))); - - // check the constraint is not already listed for this type variable - if not (cxs |> List.exists (fun (traitInfo2,_) -> traits_aequiv g aenv traitInfo traitInfo2)) then - match trace with - | NoTrace -> () - | WithTrace (Trace actions) -> actions := (fun () -> Hashtbl.remove csenv.cs_css.css_cxs tpn) :: !actions - Hashtbl.add csenv.cs_css.css_cxs tpn (traitInfo,m2) - ); - - // Associate the constraint with each type variable in the support, so if the type variable - // gets generalized then this constraint is attached at the binding site. - support |> IterateD (fun tp -> AddConstraint csenv ndeep m2 trace tp (TTyparMayResolveMemberConstraint(traitInfo,m2))) - - -/// Record a constraint on an inference type variable. -and AddConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace tp newConstraint = - let g = csenv.g - let aenv = csenv.cs_aenv - let amap = csenv.amap - let denv = csenv.cs_denv - let m = csenv.cs_m - - - let consistent tpc1 tpc2 = - match tpc1,tpc2 with - | (TTyparMayResolveMemberConstraint(TTrait(tys1,nm1,memFlags1,argtys1,rty1,_),_), - TTyparMayResolveMemberConstraint(TTrait(tys2,nm2,memFlags2,argtys2,rty2,_),_)) - when (memFlags1 = memFlags2 && - nm1 = nm2 && - argtys1.Length = argtys2.Length && - List.lengthsEqAndForall2 (type_equiv g) tys1 tys2) -> - - let rty1 = GetFSharpViewOfReturnType g rty1 - let rty2 = GetFSharpViewOfReturnType g rty2 - Iterate2D (SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace) argtys1 argtys2 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty1 rty2 ++ (fun () -> - if verbose then dprintf "\n-------------\nmerged constraint for %s, tp = %s\n---------\n" nm1 (Layout.showL (TyparDeclL tp)); - CompleteD)) - - | (TTyparCoercesToType(ty1,_), - TTyparCoercesToType(ty2,_)) -> - - - // Record at most one subtype constraint for each head type. - // That is, we forbid constraints by both I and I. - // This works because the types on the r.h.s. of subtype - // constraints are head-types and so any further inferences are equational. - let collect ty = - let res = ref [] - IterateEntireHierarchyOfType (fun x -> res := x :: !res) g amap m ty; - List.rev !res - let parents1 = collect ty1 - let parents2 = collect ty2 - parents1 |> IterateD (fun ty1Parent -> - parents2 |> IterateD (fun ty2Parent -> - if not (HaveSameHeadType g ty1Parent ty2Parent) then CompleteD else - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ty1Parent ty2Parent)) - - | (TTyparIsEnum (u1,_), - TTyparIsEnum (u2,m2)) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace u1 u2 - - | (TTyparIsDelegate (aty1,bty1,_), - TTyparIsDelegate (aty2,bty2,m2)) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace aty1 aty2 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace bty1 bty2) - - | TTyparIsNotNullableValueType _,TTyparIsReferenceType _ - | TTyparIsReferenceType _,TTyparIsNotNullableValueType _ -> - ErrorD (Error("The constraints 'struct' and 'not struct' are inconsistent",m)) - - - | TTyparSupportsNull _,TTyparSupportsNull _ - | TTyparIsNotNullableValueType _,TTyparIsNotNullableValueType _ - | TTyparIsReferenceType _,TTyparIsReferenceType _ - | TTyparRequiresDefaultConstructor _,TTyparRequiresDefaultConstructor _ - | TTyparSimpleChoice (_,_),TTyparSimpleChoice (_,_) -> - CompleteD - - | _ -> CompleteD - - // See when one constraint implies implies another. - // 'a :> ty1 implies 'a :> 'ty2 if the head type name of ty2 (say T2) OccursCheck anywhere in the heirarchy of ty1 - // If it does occcur, e.g. at instantiation T2, then the check above will have enforced that - // T2 = ty2 - let implies tpc1 tpc2 = - match tpc1,tpc2 with - | TTyparMayResolveMemberConstraint(trait1,_), - TTyparMayResolveMemberConstraint(trait2,_) -> - traits_aequiv g aenv trait1 trait2 - | TTyparCoercesToType(ty1,_),TTyparCoercesToType(ty2,_) -> - ExistsSameHeadTypeInHierarchy g amap m ty1 ty2 - | TTyparIsEnum(u1,_),TTyparIsEnum(u2,_) -> type_equiv g u1 u2 - | TTyparIsDelegate(aty1,bty1,_),TTyparIsDelegate(aty2,bty2,_) -> type_equiv g aty1 aty2 && type_equiv g bty1 bty2 - | TTyparSupportsNull _,TTyparSupportsNull _ - | TTyparIsNotNullableValueType _,TTyparIsNotNullableValueType _ - | TTyparIsReferenceType _,TTyparIsReferenceType _ - | TTyparRequiresDefaultConstructor _,TTyparRequiresDefaultConstructor _ -> true - | TTyparSimpleChoice (tys1,_),TTyparSimpleChoice (tys2,_) -> ListSet.isSubsetOf (type_equiv g) tys1 tys2 - | TTyparDefaultsToType (priority1,dty1,_), TTyparDefaultsToType (priority2,dty2,m) -> - (priority1 = priority2) && type_equiv g dty1 dty2 - | _ -> false - - - - // First ensure constraint conforms with existing constraints - // NOTE: QUADRATIC - let existingConstraints = tp.Constraints - - let allCxs = newConstraint :: List.rev existingConstraints - begin - let rec enforceMutualConsistency i cxs = - match cxs with - | [] -> CompleteD - | cx :: rest -> IterateIdxD (fun j cx2 -> if i = j then CompleteD else consistent cx cx2) allCxs ++ (fun () -> enforceMutualConsistency (i+1) rest) - - enforceMutualConsistency 0 allCxs - end ++ (fun () -> - - let impliedByExistingConstraints = existingConstraints |> List.exists (fun tpc2 -> implies tpc2 newConstraint) - if verbose then dprintf " impliedByExistingConstraints? %b\n" impliedByExistingConstraints; - - if not impliedByExistingConstraints && (tp.Rigidity = TyparRigid) then - ErrorD (ConstraintSolverMissingConstraint(denv,tp,newConstraint,m,m2)) - - elif impliedByExistingConstraints then - (if verbose && List.length existingConstraints > 10 then - dprintf " (after implied) tp = %s\n" (Layout.showL (TyparDeclL tp)); - CompleteD) - - else - let newConstraints = - // Eliminate any constraints where one constraint implies another - // Keep constraints in the left-to-right form according to the order they are asserted. - // NOTE: QUADRATIC - let rec eliminateRedundant cxs acc = - match cxs with - | [] -> acc - | cx :: rest -> - eliminateRedundant rest (if List.exists (fun cx2 -> implies cx2 cx) acc then acc else (cx::acc)) - - eliminateRedundant allCxs [] - - - // Write the constraint into the type variable - // Record a entry in the undo trace if one is provided - let d = tp.Data - let orig = d.typar_constraints - begin match trace with - | NoTrace -> () - | WithTrace (Trace actions) -> actions := (fun () -> d.typar_constraints <- orig) :: !actions - end; - d.typar_constraints <- newConstraints; - - if verbose then dprintf "#newConstraints = %d\n" (List.length newConstraints); - if verbose && List.length newConstraints > 10 then - dprintf "\n----------------------\n tp = %s\n" (Layout.showL (TyparDeclL tp)); - - CompleteD) - -and SolveTypSupportsNull (csenv:ConstraintSolverEnv) ndeep m2 trace ty = - let g = csenv.g - let m = csenv.cs_m - let denv = csenv.cs_denv - begin - if is_typar_typ g ty then AddConstraint csenv ndeep m2 trace (dest_typar_typ g ty) (TTyparSupportsNull(m)) - elif TypeSatisfiesNullConstraint g ty then CompleteD - else ErrorD (ConstraintSolverError(sprintf "The type '%s' does not have 'null' as a proper value" (NicePrint.pretty_string_of_typ denv ty),m,m2)) - end - -and SolveTypIsEnum (csenv:ConstraintSolverEnv) ndeep m2 trace ty underlying = - trackErrors { - let g = csenv.g - let m = csenv.cs_m - let denv = csenv.cs_denv - if is_typar_typ g ty then - return! AddConstraint csenv ndeep m2 trace (dest_typar_typ g ty) (TTyparIsEnum(underlying,m)) - elif is_enum_typ g ty then - do! SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace underlying (GetUnderlyingTypeOfEnumType g ty) - return! CompleteD - else - return! ErrorD (ConstraintSolverError(sprintf "The type '%s' is not a .NET enum type" (NicePrint.pretty_string_of_typ denv ty),m,m2)) - } - -and SolveTypIsDelegate (csenv:ConstraintSolverEnv) ndeep m2 trace ty aty bty = - let g = csenv.g - let m = csenv.cs_m - let denv = csenv.cs_denv - if is_typar_typ g ty then - AddConstraint csenv ndeep m2 trace (dest_typar_typ g ty) (TTyparIsDelegate(aty,bty,m)) - elif is_delegate_typ g ty then - match TryDestStandardDelegateTyp csenv.InfoReader m AccessibleFromSomewhere ty with - | Some (tupledArgTy,rty) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace aty tupledArgTy ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace bty rty ++ (fun () -> - CompleteD)) - | None -> - ErrorD (ConstraintSolverError(sprintf "The type '%s' has a non-standard delegate type" (NicePrint.pretty_string_of_typ denv ty),m,m2)) - else ErrorD (ConstraintSolverError(sprintf "The type '%s' is not a .NET delegate type" (NicePrint.pretty_string_of_typ denv ty),m,m2)) - -and SolveTypIsNonNullableValueType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = - let g = csenv.g - let m = csenv.cs_m - let denv = csenv.cs_denv - if is_typar_typ g ty then - AddConstraint csenv ndeep m2 trace (dest_typar_typ g ty) (TTyparIsNotNullableValueType(m)) - else - let underlyingTy = strip_tpeqns_and_tcabbrevs_and_measureable g ty - if is_struct_typ g underlyingTy then - (* IsValueType = IsValueType + NonNullable *) - if tcref_eq g g.system_Nullable_tcref (tcref_of_stripped_typ g underlyingTy) then - ErrorD (ConstraintSolverError(sprintf "This type parameter may not be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some .NET languages is not confusing when used in conjunction with 'Nullable' values",m,m)) - else - CompleteD - else - ErrorD (ConstraintSolverError(sprintf "A generic construct requires that the type '%s' is a .NET or F# struct type" (NicePrint.pretty_string_of_typ denv ty),m,m2)) - -and SolveTypChoice (csenv:ConstraintSolverEnv) ndeep m2 trace ty tys = - let g = csenv.g - let m = csenv.cs_m - let denv = csenv.cs_denv - if is_typar_typ g ty then AddConstraint csenv ndeep m2 trace (dest_typar_typ g ty) (TTyparSimpleChoice(tys,m)) else - match strip_tpeqns_and_tcabbrevs g ty with - | TType_app (tc2,[ms]) when tc2.IsMeasureableReprTycon -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ms (TType_measure MeasureOne) - | _ -> - if List.exists (type_equiv g ty) tys then CompleteD - else ErrorD (ConstraintSolverError(sprintf "The type '%s' is not compatible with any of the types %s, arising from the use of a printf-style format string" (NicePrint.pretty_string_of_typ denv ty) (String.concat "," (List.map (NicePrint.pretty_string_of_typ denv) tys)),m,m2)) - - -and SolveTypIsReferenceType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = - let g = csenv.g - let m = csenv.cs_m - let denv = csenv.cs_denv - if is_typar_typ g ty then AddConstraint csenv ndeep m2 trace (dest_typar_typ g ty) (TTyparIsReferenceType(m)) - elif is_ref_typ g ty then CompleteD - else ErrorD (ConstraintSolverError(sprintf "A generic construct requires that the type '%s' have reference semantics, but it does not, i.e. it is a struct" (NicePrint.pretty_string_of_typ denv ty),m,m)) - -and SolveTypRequiresDefaultConstructor (csenv:ConstraintSolverEnv) ndeep m2 trace ty = - let g = csenv.g - let amap = csenv.amap - let m = csenv.cs_m - let denv = csenv.cs_denv - if is_typar_typ g ty then AddConstraint csenv ndeep m2 trace (dest_typar_typ g ty) (TTyparRequiresDefaultConstructor(m)) - elif is_struct_typ g ty && TypeHasDefaultValue g ty then - CompleteD - elif - GetIntrinsicConstructorInfosOfType csenv.InfoReader m ty - |> List.filter (IsMethInfoAccessible amap m AccessibleFromEverywhere) - |> List.exists minfo_is_nullary - then - if (is_stripped_tyapp_typ g ty && HasAttrib g g.attrib_AbstractClassAttribute (tcref_of_stripped_typ g ty).Attribs) then - ErrorD (ConstraintSolverError(sprintf "A generic construct requires that the type '%s' be non-abstract" (NicePrint.pretty_string_of_typ denv ty),m,m2)) - else - CompleteD - else - ErrorD (ConstraintSolverError(sprintf "A generic construct requires that the type '%s' have a public default constructor" (NicePrint.pretty_string_of_typ denv ty),m,m2)) - - -// Parameterized compatibility relation between member signatures. The real work -// is done by "equateTypes" and "subsumeTypes" and "subsumeArg" -and CanMemberSigsMatchUpToCheck - (csenv:ConstraintSolverEnv) - permitOptArgs // are we allowed to supply optional and/or "param" arguments? - equateTypes // used to equate the formal method instantiation with the actual method instantiation for a generic method - subsumeTypes // used to compare the "obj" type - (subsumeArg: CalledArg -> CallerArg<_> -> OperationResult) // used to compare the arguments for compatibility - reqdRetTyOpt - calledMeth : ImperativeOperationResult = - - let g = csenv.g - let amap = csenv.amap - let m = csenv.cs_m - - let (CalledMeth(minfo, - minst, - uminst, - callerObjArgTys, - argSets, - (* - unnamedCalledArgs, - unnamedCallerArgs, - paramArrayCalledArgOpt, - paramArrayCallerArgs, - assignedNamedArgs, - *) - methodRetTy, - assignedNamedProps, - pinfoOpt, - unassignedNamedItem, - attributeAssignedNamedItems, - unnamedCalledOptArgs, - unnamedCalledOutArgs)) = calledMeth - - // First equate the method instantiation (if any) with the method type parameters - if minst.Length <> uminst.Length then ErrorD(Error("type instantiation length mismatch",m)) else - - Iterate2D equateTypes minst uminst ++ (fun () -> - - if not (permitOptArgs or isNil(unnamedCalledOptArgs)) then ErrorD(Error("optional arguments not permitted here",m)) else - - - let calledObjArgTys = ObjTypesOfMethInfo amap m minfo minst - - // Check all the argument types. - - if calledObjArgTys.Length <> callerObjArgTys.Length then - ErrorD(Error (minfo.LogicalName^" is not "^(if (calledObjArgTys.Length <> 0) then "a static" else "an instance")^" member",m)) - - else - Iterate2D subsumeTypes calledObjArgTys callerObjArgTys ++ (fun () -> - (calledMeth.ArgSets |> IterateD (fun argSet -> - if argSet.UnnamedCalledArgs.Length <> argSet.UnnamedCallerArgs.Length then ErrorD(Error("argument length mismatch",m)) else - Iterate2D subsumeArg argSet.UnnamedCalledArgs argSet.UnnamedCallerArgs)) ++ (fun () -> - (calledMeth.ParamArrayCalledArgOpt |> OptionD (fun calledArg -> - if is_il_arr1_typ g calledArg.Type then - let ety = dest_il_arr1_typ g calledArg.Type - calledMeth.ParamArrayCallerArgs |> OptionD (IterateD (fun callerArg -> subsumeArg (CalledArg((0,0),false,NotOptional,false,None,ety)) callerArg)) - else - CompleteD) - - ) ++ (fun () -> - (calledMeth.ArgSets |> IterateD (fun argSet -> - argSet.AssignedNamedArgs |> IterateD (fun (AssignedCalledArg(_,called,caller)) -> subsumeArg called caller))) ++ (fun () -> - (assignedNamedProps |> IterateD (fun (AssignedItemSetter(_,item,caller)) -> - let name, calledArgTy = - match item with - | AssignedPropSetter(pinfo,pminfo,pminst) -> - let calledArgTy = List.hd (List.hd (ParamTypesOfMethInfo amap m pminfo pminst)) - pminfo.LogicalName, calledArgTy - - | AssignedIlFieldSetter(finfo) -> - (* Get or set instance IL field *) - let calledArgTy = FieldTypeOfILFieldInfo amap m finfo - finfo.FieldName, calledArgTy - - | AssignedRecdFieldSetter(rfinfo) -> - let calledArgTy = rfinfo.FieldType - rfinfo.Name, calledArgTy - - subsumeArg (CalledArg((-1,0),false, NotOptional,false,Some(name), calledArgTy)) caller) )) ++ (fun () -> - - // If there is a conflict in the return type up to subsumption then reject the overload. - // This lets us use partial type information to resolve overloads such as op_Explicit - // Do not take into account return type information for constructors - // Take into account tupling up of unfilled out args - if minfo.IsConstructor then CompleteD else - match reqdRetTyOpt with - | None -> CompleteD - | Some (reqdRetTy,e) -> - let methodRetTy = - if isNil unnamedCalledOutArgs then methodRetTy else - let outArgTys = List.map (fun (CalledArg(i,_,_,_,_,argty)) -> dest_byref_typ g argty) unnamedCalledOutArgs - if is_unit_typ g methodRetTy then mk_tupled_ty g outArgTys - else mk_tupled_ty g (methodRetTy :: outArgTys) - subsumeArg (CalledArg((-1,0),false,NotOptional,false,None,reqdRetTy)) (CallerArg(methodRetTy,m,false,e))) )))) - -//------------------------------------------------------------------------- -// Resolve IL overloading. -// -// This utilizes the type inference constraint solving engine in undo mode. -//------------------------------------------------------------------------- - - -// F# supports two adhoc conversions at method callsites (note C# supports more, though ones -// such as implicit conversions interact badly with type inference). -// The first is the use of "(fun x y -> ...)" when a delegate it expected. This is not part of -// the ":>" coercion relationship or inference constraint problem as -// such, but is a special rule applied only to method arguments. -// -// The function AdjustCalledArgType detects this case based on types and needs to know that the type being applied -// is a function type. -// -// The other conversion supported is the two ways to pass a value where a byref is expxected. -// The first (default) is to use a reference cell, and the interioer address is taken automatically -// The second is an explicit use of the "address-of" operator "&e". Here we detect the second case, -// and record the presence of the sytnax "&e" in the pre-inferred actual type for the method argument. -// The function AdjustCalledArgType detects this and refuses to apply the default byref-to-ref transformation. -// -// The function AdjustCalledArgType also adjusts for optional arguments. -and AdjustCalledArgType (csenv:ConstraintSolverEnv) (CalledArg(_,_,optArgInfo,isOutArg,_,calledArgTy)) (CallerArg(callerArgTy,m,isOptCallerArg,_)) = - (* If the called method argument is a byref type, then the caller may provide a byref or ref *) - let g = csenv.g - let amap = csenv.amap - if is_byref_typ g calledArgTy then - if is_byref_typ g callerArgTy then - calledArgTy - else - mk_refcell_ty g (dest_byref_typ g calledArgTy) - else - // If the called method argument is a delegate type, then the caller may provide a function - let calledArgTy = - if is_delegate_typ g calledArgTy && is_fun_typ g callerArgTy then - let minfo,del_argtys,del_rty,fty = GetSigOfFunctionForDelegate csenv.InfoReader calledArgTy m AccessibleFromSomeFSharpCode - let del_argtys = (if isNil del_argtys then [g.unit_ty] else del_argtys) - if List.length (fst (strip_fun_typ g callerArgTy)) = List.length del_argtys - then fty - else calledArgTy - else calledArgTy - - // Adjust the called argument type to take into account whether the caller's argument is M(?arg=Some(3)) or M(arg=1) - // If the called method argument is optional with type Option, then the caller may provide a T, unless their argument is propogating-optional (i.e. isOptCallerArg) - let calledArgTy = - match optArgInfo with - | NotOptional -> calledArgTy - | CalleeSide when not isOptCallerArg && is_option_ty g calledArgTy -> dest_option_ty g calledArgTy - | CalleeSide | CallerSide _ -> calledArgTy - calledArgTy - - -and private FeasiblySubsumesOrConverts (csenv:ConstraintSolverEnv) calledArg (CallerArg(callerArgTy,m,_,_) as callerArg) = - let calledArgTy = AdjustCalledArgType csenv calledArg callerArg - if not (type_feasibly_subsumes_type 0 csenv.g csenv.amap m calledArgTy CanCoerce callerArgTy) then ErrorD(Error("The argument types don't match",m)) else - CompleteD - -and private DefinitelyEquiv (csenv:ConstraintSolverEnv) calledArg (CallerArg(callerArgTy,m,_,_) as callerArg) = - let calledArgTy = AdjustCalledArgType csenv calledArg callerArg - if not (type_equiv csenv.g calledArgTy callerArgTy) then ErrorD(Error("The argument types don't match",m)) else - CompleteD - -// Assert a subtype constraint, and wrap an ErrorsFromAddingSubsumptionConstraint error around any failure -// to allow us to report the outer types involved in the constraint -and private SolveTypSubsumesTypWithReport (csenv:ConstraintSolverEnv) ndeep m trace ty1 ty2 = - TryD (fun () -> SolveTypSubsumesTypKeepAbbrevs csenv ndeep m trace ty1 ty2) - (fun res -> ErrorD (ErrorsFromAddingSubsumptionConstraint(csenv.g,csenv.cs_denv,ty1,ty2,res,m))) - -and private solveTypEqualsTypWithReport (csenv:ConstraintSolverEnv) ndeep m trace ty1 ty2 = - TryD (fun () -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m trace ty1 ty2) - (fun res -> ErrorD (ErrorFromAddingTypeEquation(csenv.g,csenv.cs_denv,ty1,ty2,res,m))) - -and ArgsMustSubsumeOrConvert - (csenv:ConstraintSolverEnv) - trace - (CalledArg(_,isParamArrayArg,_,_,_,calledArgTy) as calledArg) - (CallerArg(callerArgTy,m,_,_) as callerArg) = - - let g = csenv.g - let amap = csenv.amap - let calledArgTy = AdjustCalledArgType csenv calledArg callerArg - SolveTypSubsumesTypWithReport csenv 0 m trace calledArgTy callerArgTy ++ (fun () -> - - if isParamArrayArg && - is_stripped_tyapp_typ g calledArgTy && - (let tcf,tinstf = dest_stripped_tyapp_typ g calledArgTy - List.length tinstf = 1 && - type_feasibly_equiv 0 g amap m (List.hd tinstf) callerArgTy) - then - ErrorD(Error("This method expects a .NET 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument",m)) - else - CompleteD) - -and MustUnify csenv trace ty1 ty2 = - solveTypEqualsTypWithReport csenv 0 csenv.cs_m trace ty1 ty2 - -and MustUnifyInsideUndo csenv trace ty1 ty2 = - solveTypEqualsTypWithReport csenv 0 csenv.cs_m (WithTrace trace) ty1 ty2 - -and ArgsMustSubsumeOrConvertInsideUndo (csenv:ConstraintSolverEnv) trace calledArg (CallerArg(callerArgTy,m,_,_) as callerArg) = - let g = csenv.g - let amap = csenv.amap - let calledArgTy = AdjustCalledArgType csenv calledArg callerArg - SolveTypSubsumesTypWithReport csenv 0 m (WithTrace trace) calledArgTy callerArgTy - -and TypesMustSubsumeOrConvertInsideUndo (csenv:ConstraintSolverEnv) trace m calledArgTy callerArgTy = - SolveTypSubsumesTypWithReport csenv 0 m trace calledArgTy callerArgTy - -and ArgsEquivInsideUndo (csenv:ConstraintSolverEnv) trace calledArg (CallerArg(callerArgTy,m,_,_) as callerArg) = - let g = csenv.g - let amap = csenv.amap - let calledArgTy = AdjustCalledArgType csenv calledArg callerArg - if not (type_equiv csenv.g calledArgTy callerArgTy) then ErrorD(Error("The argument types don't match",m)) else - CompleteD - -and ReportNoCandidatesError (csenv:ConstraintSolverEnv) (nUnnamedCallerArgs,nNamedCallerArgs) methodName ad (calledMethGroup:CalledMeth<_> list) = - - let g = csenv.g - let amap = csenv.amap - let m = csenv.cs_m - let denv = csenv.cs_denv - - match (calledMethGroup |> List.partition (CalledMeth.GetMethod >> IsMethInfoAccessible amap m ad)), - (calledMethGroup |> List.partition (fun cmeth -> cmeth.HasCorrectObjArgs(amap,m,ad))), - (calledMethGroup |> List.partition (fun cmeth -> cmeth.HasCorrectArity)), - (calledMethGroup |> List.partition (fun cmeth -> cmeth.HasCorrectGenericArity)), - (calledMethGroup |> List.partition (fun cmeth -> cmeth.AssignsAllNamedArgs)) with - - // No version accessible - | ([],others),_,_,_,_ -> - ErrorD (Error ("The member or object constructor '"^methodName^"' is not "^showAccessDomain ad ^ - (if nonNil others then ". Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and may not be accessed from inner lambda expressions" else ""), m)) - | _,([],(cmeth::_)),_,_,_ -> - - // Check all the argument types. - - ErrorD(Error (methodName^" is not "^(if (cmeth.CalledObjArgTys(amap,m).Length <> 0) then "a static" else "an instance")^" method",m)) - - // One method, incorrect name/arg assignment - | _,_,_,_,([],[cmeth]) -> - let msg = - List.foldBack - (fun (CallerNamedArg(id,CallerArg(_,m,_,_))) acc -> "The member or object constructor '"^methodName^"' has no argument or settable return property '"^id.idText^"'. "^acc) - cmeth.UnassignedNamedArgs - ("The required signature is "^string_of_minfo amap m denv cmeth.Method) - ErrorD (Error (msg,m)) - - // One method, incorrect number of arguments provided by the user - | _,_,([],[cmeth]),_,_ when not cmeth.HasCorrectArity -> - let minfo = cmeth.Method - let nReqd = cmeth.TotalNumUnnamedCalledArgs - let nReqdNamed = cmeth.TotalNumAssignedNamedArgs - let nActual = cmeth.TotalNumUnnamedCallerArgs - let nreqdTyArgs = cmeth.NumCalledTyArgs - let nactualTyArgs = cmeth.NumCallerTyArgs - if nActual <> nReqd then - if nReqdNamed > 0 or cmeth.NumAssignedProps > 0 then - if nReqd > nActual then - let furtherText = if nActual = 0 then "" else " additional" - let nameText = - if nReqd > nActual then - let missingArgs = List.drop nReqd cmeth.AllUnnamedCalledArgs - match NamesOfCalledArgs missingArgs with - | [] -> "" - | names -> ". Some names for missing arguments are "^String.concat ";" names - else "" - ErrorD (Error (sprintf "The member or object constructor '%s' requires %d%s argument(s). The required signature is '%s'%s" methodName (nReqd-nActual) furtherText (string_of_minfo amap m denv minfo) nameText, m)) - else - ErrorD (Error (sprintf "The member or object constructor '%s' requires %d argument(s) but is here given %d unnamed and %d named argument(s). The required signature is '%s'" methodName (nReqd+nReqdNamed) nActual nReqdNamed (string_of_minfo amap m denv minfo), m)) - else - ErrorD (Error (sprintf "The member or object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'" methodName nReqd nActual (string_of_minfo amap m denv minfo), m)) - else - ErrorD (Error (sprintf "The member or object constructor '%s' takes %d type argument(s) but is here given %d. The required signature is '%s'" methodName nreqdTyArgs nactualTyArgs (string_of_minfo amap m denv minfo), m)) - - // One or more accessible, all the same arity, none correct - | ((cmeth :: cmeths2),_),_,_,_,_ when not cmeth.HasCorrectArity && cmeths2 |> List.forall (fun cmeth2 -> cmeth.TotalNumUnnamedCalledArgs = cmeth2.TotalNumUnnamedCalledArgs) -> - ErrorD (Error (sprintf "The member or object constructor '%s' taking %d arguments is not accessible from this code location. All accessible versions of method '%s' take %d arguments" methodName (cmeth.ArgSets |> List.sumBy (fun x -> x.NumUnnamedCalledArgs)) methodName cmeth.TotalNumUnnamedCalledArgs,m)) - - // Many methods, all with incorrect number of generic arguments - | _,_,_,([],(cmeth :: _)),_ -> - let msg = sprintf "Incorrect generic instantiation. No %s member named '%s' takes %d generic arguments" (showAccessDomain ad) methodName cmeth.NumCallerTyArgs - ErrorD (Error (msg,m)) - // Many methods of different arities, all incorrect - | _,_,([],(cmeth :: _)),_,_ -> - let minfo = cmeth.Method - ErrorD (Error (sprintf "The member or object constructor '%s' does not take %d argument(s). An overload was found taking %d arguments" methodName cmeth.TotalNumUnnamedCallerArgs (List.sum minfo.NumArgs),m)) - | _ -> - let msg = sprintf "No %s member or object constructor named '%s' takes %d arguments" (showAccessDomain ad) methodName (nUnnamedCallerArgs) - let msg = - if nNamedCallerArgs = 0 then - msg - else - let s = calledMethGroup |> List.map (fun cmeth -> cmeth.UnassignedNamedArgs |> List.map (fun na -> na.Name)|> Set.of_list) |> Set.intersect_all - if s.IsEmpty then - msg + sprintf ". Note the call to this member also provides %d named arguments" nNamedCallerArgs - else - let sample = s.MinimumElement - msg + sprintf ". The named argument '%s' doesn't correspond to any argument or settable return property for any overload" sample - ErrorD (Error (msg,m)) - - -// Resolve the overloading of a method -// This is used after analyzing the types of arguments -and ResolveOverloading - (csenv:ConstraintSolverEnv) - trace // The undo trace, if any - methodName // The name of the method being called, for error reporting - callerArgCounts // How many named/unnamed args id the caller provide? - ad // The access domain of the caller, e.g. a module, type etc. - calledMethGroup // The set of methods being called - permitOptArgs // Can we supply optional arguments? - reqdRetTyOpt // The expected return type, if known - = - let g = csenv.g - let amap = csenv.amap - let m = csenv.cs_m - let denv = csenv.cs_denv - // See what candidates we have based on name and arity - let candidates = calledMethGroup |> List.filter (fun cmeth -> cmeth.IsCandidate(g,amap,m,ad)) - let calledMethOpt, errors = - - match calledMethGroup,candidates with - | _,[calledMeth] -> - Some(calledMeth), CompleteD - - | [],_ -> - None, ErrorD (Error (sprintf "Method or object constructor '%s' not found" methodName,m)) - - | _,[] -> - None, ReportNoCandidatesError csenv callerArgCounts methodName ad calledMethGroup - - | _,_ -> - - // See what candidates we have based on current inferred type information and exact matches of argument types - // Return type deliberately not take into account - match candidates |> FilterEachThenUndo (fun newTrace calledMeth -> - CanMemberSigsMatchUpToCheck - csenv - permitOptArgs - (MustUnifyInsideUndo csenv newTrace) - (TypesMustSubsumeOrConvertInsideUndo csenv (WithTrace newTrace) m) - (ArgsEquivInsideUndo csenv newTrace) - None - calledMeth) with - | [(calledMeth,_)] -> - Some(calledMeth), CompleteD - - | _ -> - let applicable = candidates |> FilterEachThenUndo (fun newTrace candidate -> - CanMemberSigsMatchUpToCheck - csenv - permitOptArgs - (MustUnifyInsideUndo csenv newTrace) - (TypesMustSubsumeOrConvertInsideUndo csenv (WithTrace newTrace) m) - (ArgsMustSubsumeOrConvertInsideUndo csenv newTrace) - reqdRetTyOpt - candidate) - match applicable with - | [] -> - // OK, we failed. Collect up the errors from overload resolution and the possible overloads - let errors = - (candidates |> List.choose (fun calledMeth -> - match CollectThenUndo (fun newTrace -> - CanMemberSigsMatchUpToCheck - csenv - permitOptArgs - (MustUnifyInsideUndo csenv newTrace) - (TypesMustSubsumeOrConvertInsideUndo csenv (WithTrace newTrace) m) - (ArgsMustSubsumeOrConvertInsideUndo csenv newTrace) - reqdRetTyOpt - calledMeth) with - | OkResult _ -> None - | ErrorResult(_,exn) -> Some exn)) - - let overloads = GetPossibleOverloads amap m denv calledMethGroup - - None,ErrorD (UnresolvedOverloading (denv,overloads,[],errors,"No overloads match for method "^methodName^". Possible matches are shown below (or in the Error List window)",m)) - | [(calledMeth,_)] -> - Some(calledMeth), CompleteD - | applicableMeths -> - - let better (candidate:CalledMeth<_>, candidateWarnCount) (other:CalledMeth<_>, otherWarnCount) = - // prefer methods that don't give "this code is less generic" warnings - (candidateWarnCount = 0 || otherWarnCount > 0) && - - // prefer methods that don't use param array arg, or with more precise param array arg - (not candidate.UsesParamArrayConversion || - (other.UsesParamArrayConversion && - type_feasibly_subsumes_type 0 csenv.g csenv.amap m (other.ParamArrayElementType(g)) CanCoerce (other.ParamArrayElementType(g)))) && - - // prefer methods that don't use out args - (not candidate.HasOutArgs || other.HasOutArgs) && - - // prefer methods that don't use optional args - (not candidate.HasOptArgs || other.HasOptArgs) && - - // prefer non-generic methods - (candidate.CalledTyArgs.IsEmpty || not other.CalledTyArgs.IsEmpty) && - - // check regular args. The argument counts will only be different if one is using param args - (candidate.TotalNumUnnamedCalledArgs <> other.TotalNumUnnamedCalledArgs || - // all args are at least as good - (candidate.AllUnnamedCalledArgs, other.AllUnnamedCalledArgs) ||> List.forall2 (fun (CalledArg(pos1,isParamArray1,optArgInfo1,isOutArg1,nmOpt1,argType1)) (CalledArg(pos2,isParamArray2,optArgInfo2,isOutArg2,nmOpt2,argType2)) -> - type_feasibly_subsumes_type 0 csenv.g csenv.amap m argType2 CanCoerce argType1)) - - let bestMethods = - applicableMeths |> List.choose (fun candidate -> - if applicableMeths |> List.forall (fun other -> - candidate === other || - let res = better candidate other - //eprintfn "\n-------\nCandidate: %s\nOther: %s\nResult: %b\n" (string_of_minfo amap m denv candidate.Method) (string_of_minfo amap m denv other.Method) res - res) then - Some(candidate) - else - None) - match bestMethods with - | [(calledMeth,_)] -> Some(calledMeth), CompleteD - | bestMethods -> - let overloads = GetPossibleOverloads amap m denv calledMethGroup - //let bestOverloads = GetPossibleBestOverloads amap m denv bestMethods - - None, - ErrorD (UnresolvedOverloading (denv,overloads,(* bestOverloads *) [] ,[],"The method '"^methodName^"' is overloaded. Possible matches are shown below (or in the Error List window)",m)); - - // If we've got a candidate solution: make the final checks - no undo here! - match calledMethOpt with - | Some(calledMeth) -> - calledMethOpt, - errors ++ (fun () -> CanMemberSigsMatchUpToCheck - csenv - permitOptArgs - (MustUnify csenv trace) - (TypesMustSubsumeOrConvertInsideUndo csenv trace m)// REVIEW: this should not be an "InsideUndo" operation - (ArgsMustSubsumeOrConvert csenv trace) - reqdRetTyOpt - calledMeth) - - | None -> - None, errors - - -/// This is used before analyzing the types of arguments in a single overload resolution -let UnifyUniqueOverloading (csenv:ConstraintSolverEnv) callerArgCounts methodName ad (calledMethGroup:CalledMeth<_> list) = - let g = csenv.g - let amap = csenv.amap - let m = csenv.cs_m - let denv = csenv.cs_denv - if verbose then dprintf "--> UnifyUniqueOverloading@%a\n" output_range m; - (* See what candidates we have based on name and arity *) - let candidates = calledMethGroup |> List.filter (fun cmeth -> cmeth.IsCandidate(g,amap,m,ad)) - if verbose then dprintf "in UnifyUniqueOverloading@%a\n" output_range m; - match calledMethGroup,candidates with - | _,[calledMeth] -> - (* Only one candidate found - we thus know the types we expect of arguments *) - CanMemberSigsMatchUpToCheck - csenv true - (MustUnify csenv NoTrace) - (TypesMustSubsumeOrConvertInsideUndo csenv NoTrace m) - (ArgsMustSubsumeOrConvert csenv NoTrace) - None - calledMeth - ++ (fun () -> ResultD(true)) - - | [],_ -> - ErrorD (Error ("Method or object constructor '"^methodName^"' not found",m)) - | _,[] -> - ReportNoCandidatesError csenv callerArgCounts methodName ad calledMethGroup - ++ (fun () -> ResultD(false)) - | _ -> - ResultD(false) - -let EliminateConstraintsForGeneralizedTypars csenv trace (generalizedTypars:typars) = - // Resolve the global constraints where this type variable appears in the support of the constraint - generalizedTypars |> List.iter (fun tp -> - let tpn = tp.Stamp - let cxst = csenv.cs_css.css_cxs - let cxs = Hashtbl.find_all cxst tpn - if isNil cxs then () else - if verbose then dprintf "EliminateConstraintsForGeneralizedTypars: #cxs = %d, m = %a\n" (List.length cxs) output_range csenv.cs_m; - cxs |> List.iter (fun cx -> - Hashtbl.remove cxst tpn; - match trace with - | NoTrace -> () - | WithTrace (Trace actions) -> actions := (fun () -> (Hashtbl.add csenv.cs_css.css_cxs tpn cx)) :: !actions) - ) - - -//------------------------------------------------------------------------- -// Main entry points to constraint solver (some backdoors are used for -// some constructs) -// -// No error recovery here : we do that on a per-expression basis. -//------------------------------------------------------------------------- - -let AddCxTypeEqualsType denv css m ty1 ty2 = - solveTypEqualsTypWithReport (MakeConstraintSolverEnv css m denv) 0 m NoTrace ty1 ty2 - |> RaiseOperationResult - -let UndoIfFailed f = - let trace = newTrace() - let res = - try f trace |> CheckNoErrorsAndGetWarnings - with e -> None - match res with - | None -> - // Don't report warnings if we failed - undoTrace trace; false - | Some warns -> - // Report warnings if we succeeded - ReportWarnings warns; true - -let AddCxTypeEqualsTypeUndoIfFailed denv css m ty1 ty2 = - UndoIfFailed (fun trace -> SolveTypEqualsTypKeepAbbrevs (MakeConstraintSolverEnv css m denv) 0 m (WithTrace(trace)) ty1 ty2) - -let AddCxTypeMustSubsumeTypeUndoIfFailed denv css m ty1 ty2 = - UndoIfFailed (fun trace -> SolveTypSubsumesTypKeepAbbrevs (MakeConstraintSolverEnv css m denv) 0 m (WithTrace(trace)) ty1 ty2) - -let AddCxTypeMustSubsumeType denv css m trace ty1 ty2 = - SolveTypSubsumesTypWithReport (MakeConstraintSolverEnv css m denv) 0 m trace ty1 ty2 - |> RaiseOperationResult - -let AddCxMethodConstraint denv css m trace traitInfo = - TryD (fun () -> SolveMemberConstraint (MakeConstraintSolverEnv css m denv) false 0 m trace traitInfo ++ (fun _ -> CompleteD)) - (fun res -> ErrorD (ErrorFromAddingConstraint(denv,res,m))) - |> RaiseOperationResult - -let AddCxTypeMustSupportNull denv css m trace ty = - TryD (fun () -> SolveTypSupportsNull (MakeConstraintSolverEnv css m denv) 0 m trace ty) - (fun res -> ErrorD (ErrorFromAddingConstraint(denv,res,m))) - |> RaiseOperationResult - -let AddCxTypeMustSupportDefaultCtor denv css m trace ty = - TryD (fun () -> SolveTypRequiresDefaultConstructor (MakeConstraintSolverEnv css m denv) 0 m trace ty) - (fun res -> ErrorD (ErrorFromAddingConstraint(denv,res,m))) - |> RaiseOperationResult - -let AddCxTypeIsReferenceType denv css m trace ty = - TryD (fun () -> SolveTypIsReferenceType (MakeConstraintSolverEnv css m denv) 0 m trace ty) - (fun res -> ErrorD (ErrorFromAddingConstraint(denv,res,m))) - |> RaiseOperationResult - -let AddCxTypeIsValueType denv css m trace ty = - TryD (fun () -> SolveTypIsNonNullableValueType (MakeConstraintSolverEnv css m denv) 0 m trace ty) - (fun res -> ErrorD (ErrorFromAddingConstraint(denv,res,m))) - |> RaiseOperationResult - -let AddCxTypeIsEnum denv css m trace ty underlying = - TryD (fun () -> SolveTypIsEnum (MakeConstraintSolverEnv css m denv) 0 m trace ty underlying) - (fun res -> ErrorD (ErrorFromAddingConstraint(denv,res,m))) - |> RaiseOperationResult - -let AddCxTypeIsDelegate denv css m trace ty aty bty = - TryD (fun () -> SolveTypIsDelegate (MakeConstraintSolverEnv css m denv) 0 m trace ty aty bty) - (fun res -> ErrorD (ErrorFromAddingConstraint(denv,res,m))) - |> RaiseOperationResult - -let CodegenWitnessThatTypSupportsTraitConstraint g amap m (traitInfo:TraitConstraintInfo) = - let css = {css_g=g;css_amap=amap;css_cxs=Hashtbl.create 10;css_InfoReader=new InfoReader(g,amap) } - let csenv = MakeConstraintSolverEnv css m (empty_denv g) - SolveMemberConstraint csenv true 0 m NoTrace traitInfo ++ (fun res -> - if res then - match traitInfo.Solution with - | None -> ResultD None - | Some sln -> - match sln with - | ILMethSln(typ,extOpt,mref,minst) -> - let tcref,tinst = dest_stripped_tyapp_typ g typ - let scoref,enc,tdef = tcref.ILTyconInfo - let mdef = IL.resolve_mref tdef mref - let tref = IL.tref_for_nested_tdef scoref (enc,tdef) - let mtps = Import.ImportIlTypars (fun () -> amap) m scoref tinst mdef.mdGenericParams - ResultD (Some (ILMeth(g,ILMethInfo(ILTypeInfo(tcref,tref,tinst,tdef),extOpt,mdef,mtps)),minst)) - | FSMethSln(typ, vref,minst) -> - ResultD (Some (FSMeth(g,typ,vref),minst)) - | BuiltInSln -> - ResultD None - else - ResultD None) - - //| TTraitUnsolved -> ResultD None //ErrorD(InternalError("unsolved trait constraint in codegen",m)) - //| TTraitBuiltIn -> ResultD None //ErrorD(InternalError("trait constraint was resolved to F# library intrinsic in codegen",m)) - - -let ChooseTyparSolutionAndSolve css denv tp = - let g = css.css_g - let amap = css.css_amap - let max,m = choose_typar_solution_and_range g amap tp - let csenv = (MakeConstraintSolverEnv css m denv) - TryD (fun () -> SolveTyparEqualsTyp csenv 0 m NoTrace (mk_typar_ty tp) max) - (fun err -> ErrorD(ErrorFromApplyingDefault(g,denv,tp,max,err,m))) - |> RaiseOperationResult - - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/csolve.mli b/tools/FSharp_1.9.6.16/source/fsharp/csolve.mli deleted file mode 100644 index 25b0c7ec..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/csolve.mli +++ /dev/null @@ -1,94 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -module (* internal *) Microsoft.FSharp.Compiler.ConstraintSolver - -open Internal.Utilities -open Internal.Utilities.Pervasives -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Import -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.Infos - - -val internal new_compgen_inference_var : TyparKind * TyparRigidity * Ast.TyparStaticReq * TyparDynamicReq * bool -> Typar -val internal new_anon_inference_var : TyparKind * range * TyparRigidity * TyparStaticReq * TyparDynamicReq -> Typar -val internal new_inference_measurevar : unit -> Typar -val internal new_error_tyvar : unit -> Typar -val internal new_error_measurevar : unit -> Typar -val internal new_inference_typ : unit -> typ -val internal new_error_typ : unit -> typ -val internal new_error_measure : unit -> measure -val internal new_inference_typs : 'a list -> typ list - -val internal freshen_and_fixup_typars : range -> TyparRigidity -> typars -> typ list -> typars -> typars * TyparInst * typ list -val internal new_tinst : range -> typars -> typars * TyparInst * typ list -val internal freshen_tps : range -> typars -> typ list -val internal FreshenMethInfo : range -> MethInfo -> typ list - -exception internal ConstraintSolverTupleDiffLengths of DisplayEnv * typ list * typ list * range * range -exception internal ConstraintSolverInfiniteTypes of DisplayEnv * typ * typ * range * range -exception internal ConstraintSolverTypesNotInEqualityRelation of DisplayEnv * typ * typ * range * range -exception internal ConstraintSolverTypesNotInSubsumptionRelation of DisplayEnv * typ * typ * range * range -exception internal ConstraintSolverMissingConstraint of DisplayEnv * Typar * TyparConstraint * range * range -exception internal ConstraintSolverError of string * range * range -exception internal ConstraintSolverRelatedInformation of string option * range * exn -exception internal ErrorFromApplyingDefault of TcGlobals * DisplayEnv * Typar * typ * error * range -exception internal ErrorFromAddingTypeEquation of TcGlobals * DisplayEnv * typ * typ * error * range -exception internal ErrorsFromAddingSubsumptionConstraint of TcGlobals * DisplayEnv * typ * typ * error * range -exception internal ErrorFromAddingConstraint of DisplayEnv * error * range -exception internal UnresolvedOverloading of DisplayEnv * error list * error list * error list * string * range -exception internal PossibleOverload of DisplayEnv * string * range -//exception internal PossibleBestOverload of DisplayEnv * string * range -exception internal NonRigidTypar of DisplayEnv * string option * range * typ * typ * range - -type ConstraintSolverState = - {css_g: TcGlobals; - css_amap: ImportMap; - css_InfoReader : InfoReader; - mutable css_cxs: Internal.Utilities.Hashtbl.t ;} - -type ConstraintSolverEnv - -val internal BakedInTraitConstraintNames : string list - -val internal MakeConstraintSolverEnv : ConstraintSolverState -> range -> DisplayEnv -> ConstraintSolverEnv - -type trace = Trace of (unit -> unit) list ref - -type OptionalTrace = - | NoTrace - | WithTrace of trace - -val internal SimplifyMeasuresInTypeScheme : TcGlobals -> bool -> typars -> typ -> typars -val internal SolveTyparEqualsTyp : ConstraintSolverEnv -> int -> range -> OptionalTrace -> typ -> typ -> unit OperationResult -val internal SolveTypEqualsTypKeepAbbrevs : ConstraintSolverEnv -> int -> range -> OptionalTrace -> typ -> typ -> unit OperationResult -val internal CanonicalizeRelevantMemberConstraints : ConstraintSolverEnv -> int -> OptionalTrace -> typars -> unit OperationResult -val internal ResolveOverloading : ConstraintSolverEnv -> OptionalTrace -> string -> int * int -> AccessorDomain -> expr Typrelns.CalledMeth list -> bool -> (typ * expr) option -> expr Typrelns.CalledMeth option * unit OperationResult -val internal UnifyUniqueOverloading : ConstraintSolverEnv -> int * int -> string -> AccessorDomain -> expr Typrelns.CalledMeth list -> bool OperationResult -val internal EliminateConstraintsForGeneralizedTypars : ConstraintSolverEnv -> OptionalTrace -> typars -> unit -val internal IsArrayTypeWithIndexer : Env.TcGlobals -> typ -> bool - -val internal AddConstraint : ConstraintSolverEnv -> int -> Range.range -> OptionalTrace -> Typar -> TyparConstraint -> unit OperationResult -val internal AddCxTypeEqualsType : DisplayEnv -> ConstraintSolverState -> range -> typ -> typ -> unit -val internal AddCxTypeEqualsTypeUndoIfFailed : DisplayEnv -> ConstraintSolverState -> range -> typ -> typ -> bool -val internal AddCxTypeMustSubsumeType : DisplayEnv -> ConstraintSolverState -> range -> OptionalTrace -> typ -> typ -> unit -val internal AddCxTypeMustSubsumeTypeUndoIfFailed : DisplayEnv -> ConstraintSolverState -> range -> typ -> typ -> bool -val internal AddCxMethodConstraint : DisplayEnv -> ConstraintSolverState -> range -> OptionalTrace -> TraitConstraintInfo -> unit -val internal AddCxTypeMustSupportNull : DisplayEnv -> ConstraintSolverState -> range -> OptionalTrace -> typ -> unit -val internal AddCxTypeMustSupportDefaultCtor : DisplayEnv -> ConstraintSolverState -> range -> OptionalTrace -> typ -> unit -val internal AddCxTypeIsReferenceType : DisplayEnv -> ConstraintSolverState -> range -> OptionalTrace -> typ -> unit -val internal AddCxTypeIsValueType : DisplayEnv -> ConstraintSolverState -> range -> OptionalTrace -> typ -> unit -val internal AddCxTypeIsEnum : DisplayEnv -> ConstraintSolverState -> range -> OptionalTrace -> typ -> typ -> unit -val internal AddCxTypeIsDelegate : DisplayEnv -> ConstraintSolverState -> range -> OptionalTrace -> typ -> typ -> typ -> unit - -val internal CodegenWitnessThatTypSupportsTraitConstraint : TcGlobals -> ImportMap -> range -> TraitConstraintInfo -> OperationResult<(MethInfo * tinst) option> - -val internal ChooseTyparSolutionAndSolve : ConstraintSolverState -> DisplayEnv -> Typar -> unit diff --git a/tools/FSharp_1.9.6.16/source/fsharp/detuple.ml b/tools/FSharp_1.9.6.16/source/fsharp/detuple.ml deleted file mode 100644 index 3a1bfdc3..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/detuple.ml +++ /dev/null @@ -1,960 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved -#light - -module (* internal *) Microsoft.FSharp.Compiler.Detuple - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler - -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.Layout -open Microsoft.FSharp.Compiler.PrettyNaming -open Microsoft.FSharp.Compiler.Lib - -// -// This pass has one aim. -// - to eliminate tuples allocated at call sites (due to uncurried style) -// -// After PASS, -// Private, non-top-level functions fOrig which had explicit tuples at all callsites, -// have been replaced by transformedVal taking the individual tuple fields, -// subject to the type of the fOrig formal permitting the split. -// -// The decisions are based on call site analysis -// -//---------- -// TUPLE COLLAPSE SIMPLIFIED. -// -// The aim of the optimization pass implemented in this module -// is to eliminate (redundant) tuple allocs arising due to calls. -// These typically arise from code written in uncurried form. -// -// Note that "top-level" functions and methods are automatically detupled in F#, -// by choice of representation. So this only applies to inner functions, and even -// then only to those not given "TLR" representation through lambda-lifting. -// -// Q: When is a tuple allocation at callsite redundant? -// A1: If the function called only wants the fields of the tuple. -// A2: If all call sites allocate a tuple argument, -// then can factor that tuple creation into the function, -// and hope the optimiser will eliminate it if possible. -// e.g. if only the fields are required. -// -// The COLLAPSE transform is based on answer A2... -// -// [[ let rec fOrig p = ... fOrig (a,b) ... -// fOrig (x,y) ]] -// -> -// let rec transformedVal p1 p2 = let p = p1,p2 -// ... (transformedVal a b) ... -// -// transformedVal x y -// -// Q: What about cases where some calls to fOrig provide just a tuple? -// A: If fOrig requires the original tuple argument, then this transform -// would insert a tuple allocation inside fOrig, where none was before... -// -//---------- -// IMPLEMENTATION OVERVIEW. -// -// 1. Require call-pattern info about callsites of each function, e.g. -// -// [ (_,_) ; (_,(_,_,_)) ; _ ] -// [ (_,_) ; (_,_) ] -// [ (_,_) ] -// -// Detailing the number of arguments applied and their explicit tuple structure. -// -// ASIDE: Efficiency note. -// The rw pass does not change the call-pattern info, -// so call-pattern info can be collected for all ids in pre-pass. -// -// 2. Given the above, can *CHOOSE* a call-pattern for the transformed function. -// Informally, -// Collapse any tuple structure if it is known at ALL call sites. -// Formally, -// - n = max List.length of call-pattern args. -// - extend call patterns to List.length n with _ (no tuple info known) -// - component-wise intersect argument tuple-structures over call patterns. -// - gives least known call-pattern of List.length n. -// - can trim to minimum non-trivual List.length. -// -// [Used to] have INVARIANT on this chosen call pattern: -// -// Have: For each argi with non-trivial tuple-structure, -// at every call have an explicit tuple argument, -// with (at least) that structure. -// ---- -// Note, missing args in partial application will always -// have trivial tuple structure in chosen call-pattern. -// -// [PS: now defn arg projection info can override call site info] -// -// 2b.Choosing CallPattern also needs to check type of formals for the function. -// If function is not expecting a tuple (accoring to types) do not split them. -// -// 3. Given CallPattern for selected fOrig, -// (a) Can choose replacement formals, ybi where needed. (b, bar, means vector of formals). -// -// cpi | xi | ybi -// --------------------|-------|---------- -// UnknownTS | xi | SameArg xi -// TupleTS [] | [] | SameArg [] // unit case, special case for now. -// TupleTS ts1...tsN | xi | NewArgs (List.collect createFringeFormals [ts1..tsN]) -// -// (b) Can define transformedVal replacement function id. -// -// 4. Fixup defn bindings. -// -// [[DEFN: fOrig = LAM tps. lam x1 ...xp xq...xN. body ]] -// -> -// transformedVal = LAM tps. lam [[FORMALS: yb1...ybp]] xq...xN. [[REBINDS x1,yb1 ... xp,ybp]] [[FIX: body]] -// -// [[FORMAL: SameArg xi]] -> xi -// [[FORMAL: NewArgs vs]] -> [ [v1] ... [vN] ] // list up individual args for TExpr_lambda -// -// [[REBIND: xi , SameArg xi]] -> // no binding needed -// [[REBIND: [u], NewArgs vs]] -> u = "rebuildTuple(cpi,vs)" -// [[REBIND: us , NewArgs vs]] -> "rebuildTuple(cpi,vs)" then bind us to BuildProjections. // for TExpr_lambda -// -// rebuildTuple - create tuple based on vs fringe according to cpi tuple structure. -// -// Note, fixup body... -// -// 5. Fixup callsites. -// -// [[FIXCALL: APP fOrig tps args]] -> when fOrig is transformed, APP fOrig tps [[collapse args wrt cpf]] -// otherwise, unchanged, APP fOrig tps args. -// -// 6. Overview. -// - pre-pass to find callPatterns. -// - choose CallPattern (tuple allocs on all callsites) -// - create replacement formals and transformedVal where needed. -// - rw pass over expr - fixing defns and applications as required. -// - sanity checks and done. - -// Note: ids can occur in several ways in expr at this point in compiler. -// val id - freely -// app (val id) tys args - applied to tys/args (if no args, then free occurance) -// app (reclink (val id)) tys args - applied (recursive case) -// app (reclink (app (val id) tys' []) tys args - applied (recursive type instanced case) -// So, taking care counting callpatterns. -// -// Note: now considering defn projection requirements in decision. -// no longer can assume that all call sites have explicit tuples if collapsing. -// in these new cases, take care to have let binding sequence (eval order...) - - -// Merge a tyapp node and and app node. -let (|TyappAndApp|_|) e = - match e with - | TExpr_app (f,fty,tys,args,m) -> - match strip_expr f with - | TExpr_app(f2,fty2,tys2,[],m2) -> Some(f2,fty2,tys2 @ tys,args,m2) - | TExpr_app(f2,fty2,tys2,_,_) -> Some(f,fty,tys,args,m) (* has args, so not combine ty args *) - | f -> Some(f,fty,tys,args,m) - | _ -> None -(*------------------------------------------------------------------------- - *INDEX: GetValsBoundInExpr - *-------------------------------------------------------------------------*) - -module GlobalUsageAnalysis = begin - let bindAccBounds vals (isInDTree,v) = Zset.add v vals - - let GetValsBoundInExpr expr = - let folder = {ExprFolder0 with valBindingSiteIntercept = bindAccBounds} - let z0 = Zset.empty val_spec_order - let z = FoldExpr folder z0 expr - z - - - (*------------------------------------------------------------------------- - *INDEX: xinfo - state and ops - *-------------------------------------------------------------------------*) - - type accessor = PTup of int * typ list - - type xinfo = - (* Expr information. - * For each v, - * (a) log it's usage site context = accessors // APP type-inst args - * where first accessor in list applies first to the v/app. - * (b) log it's binding site representation. - *------ - * Future, could generalise to be graph representation of expr. (partly there). - * This type used to be called "usage". - *) - { xinfo_uses : Zmap.map; (* v -> context / APP inst args *) - xinfo_eqns : Zmap.map; (* v -> binding repr *) - xinfo_dtree : Zset.set; (* bound in a decision tree? *) - xinfo_mubinds : Zmap.map; (* v -> v list * recursive? -- the others in the mutual binding *) - xinfo_toplevel : Zset.set; - xinfo_top : bool - } - - let z0 = - { xinfo_uses = Zmap.empty val_spec_order; - xinfo_eqns = Zmap.empty val_spec_order; - xinfo_mubinds = Zmap.empty val_spec_order; - xinfo_dtree = Zset.empty val_spec_order; - xinfo_toplevel = Zset.empty val_spec_order; - xinfo_top = true - } - - // Note: this routine is called very frequently - let logUse (f:Val) tup z = - {z with xinfo_uses = - match Zmap.tryfind f z.xinfo_uses with - | Some sites -> Zmap.add f (tup::sites) z.xinfo_uses - | None -> Zmap.add f [tup] z.xinfo_uses } - - let logBinding z (isInDTree,v) = - let z = if isInDTree then {z with xinfo_dtree = Zset.add v z.xinfo_dtree} else z - let z = if z.xinfo_top then {z with xinfo_toplevel = Zset.add v z.xinfo_toplevel} else z - z - - - let logNonRecBinding z (bind:Binding) = - (* log mubind v -> vs *) - let v = var_of_bind bind - let vs = FlatList.one v - {z with xinfo_mubinds = Zmap.add v (false,vs) z.xinfo_mubinds; - xinfo_eqns = Zmap.add v bind.Expr z.xinfo_eqns } - - let logRecBindings z binds = - (* log mubind v -> vs *) - let vs = vars_of_Bindings binds - {z with xinfo_mubinds = (z.xinfo_mubinds,vs) ||> FlatList.fold (fun mubinds v -> Zmap.add v (true,vs) mubinds); - xinfo_eqns = (z.xinfo_eqns,binds) ||> FlatList.fold (fun eqns bind -> Zmap.add bind.Var bind.Expr eqns) } - - let foldUnderLambda f z x = - let saved = z.xinfo_top - let z = {z with xinfo_top=false} - let z = f z x - let z = {z with xinfo_top=saved} - z - -#if DEBUG - let dumpXInfo z = - let soAccessor (PTup (n,ts)) = "#" ^ string n - let dumpSite v (accessors,inst,args) = - dprintf "- use %s%s %s %s\n" - (showL (valL v)) - (match inst with - [] -> "" - | _ -> "@[" ^ showL (commaListL (List.map typeL inst)) ^ "]") - (showL (spaceListL (List.map ExprL args))) - (match accessors with - [] -> "" - | _ -> "|> " ^ String.concat " " (List.map soAccessor accessors)) - let dumpUse v sites = List.iter (dumpSite v) sites - let dumpTop (v:Val) = dprintf "- toplevel: %s\n" v.MangledName - if false then - ( dprintf "usage:\n"; - Zmap.iter dumpUse z.xinfo_uses; - Zset.iter dumpTop z.xinfo_toplevel - ) - else - () -#endif - - - (*------------------------------------------------------------------------- - *INDEX: xinfo - FoldExpr, foldBind collectors - *-------------------------------------------------------------------------*) - - let UsageFolders g = - // Fold expr, intercepts selected exprs. - // "val v" - count [] callpattern of v - // "app (f,args)" - count callpattern of f - //--- - // On intercepted nodes, must continue exprF fold over any subexpressions, e.g. args. - //------ - // Also, noting top-level bindings, - // so must cancel top-level "foldUnderLambda" whenever step under loop/lambda: - // - lambdas - // - try_catch + try_finally - // - for body - // - match targets - // - tmethods - let foldLocalVal f z vref = - if vref_in_this_assembly g.compilingFslib vref then f z (deref_val vref) - else z - let exprUsageIntercept exprF z expr = - let exprsF z xs = List.fold exprF z xs - let rec recognise context expr = - match expr with - | TExpr_val (v,_,m) -> - (* YES: count free occurance *) - let z = foldLocalVal (fun z v -> logUse v (context,[],[]) z) z v - Some z - | TyappAndApp(f,fty,tys,args,m) -> - match f with - | TExpr_val (fOrig,_,_) -> - // app where function is val - // YES: count instance/app (app when have term args), and then - // collect from args (have intercepted this node) - let collect z f = logUse f (context,tys,args) z - let z = foldLocalVal collect z fOrig - let z = List.fold exprF z args - Some z - | _ -> - (* NO: app but function is not val *) - None - | TExpr_op(TOp_tuple_field_get (n),ts,[x],m) -> - let context = PTup (n,ts) :: context - recognise context x - - // lambdas end top-level status - | TExpr_lambda(id,basevopt,vs,body,m,rty,_) -> - let z = foldUnderLambda exprF z body - Some z - | TExpr_tlambda(id,tps,body,m,rty,_) -> - let z = foldUnderLambda exprF z body - Some z - | _ -> - None // NO: no intercept - - let context = [] - recognise context expr - - let targetIntercept exprF z = function TTarget(argvs,body,_) -> Some (foldUnderLambda exprF z body) - let tmethodIntercept exprF z = function TObjExprMethod(_,_,_,e,m) -> Some (foldUnderLambda exprF z e) - - {ExprFolder0 with - exprIntercept = exprUsageIntercept; - nonRecBindingsIntercept = logNonRecBinding; - recBindingsIntercept = logRecBindings; - valBindingSiteIntercept = logBinding; - targetIntercept = targetIntercept; - tmethodIntercept = tmethodIntercept; - } - - - (*------------------------------------------------------------------------- - *INDEX: xinfo - entry point - *-------------------------------------------------------------------------*) - - let GetUsageInfoOfImplFile g expr = - let folder = UsageFolders g - let z = FoldImplFile folder z0 expr - z - -end - - -open GlobalUsageAnalysis - -(*------------------------------------------------------------------------- - *INDEX: misc - *-------------------------------------------------------------------------*) - -let internalError str = raise(Failure(str)) - -let mkLocalVal m name ty topValInfo = - let compgen = false in (* REVIEW: review: should this be true? *) - NewVal(mksyn_id m name,ty,Immutable,compgen,topValInfo,None,taccessPublic,ValNotInRecScope,None,NormalVal,[],OptionalInline,emptyXmlDoc,false,false,false,false,None,ParentNone) - -let dprintTerm header expr = - if false then - let str = Layout.showL (Layout.squashTo 192 (ImplFileL expr)) in (* improve cxty! *) - dprintf "\n\n\n%s:\n%s\n" header str - else - () - - -(*------------------------------------------------------------------------- - *INDEX: TupleStructure = tuple structure - *-------------------------------------------------------------------------*) - -type TupleStructure = (* tuple structure *) - | UnknownTS - | TupleTS of TupleStructure list - -let rec TopValInfoForTS = function - | UnknownTS -> [TopValInfo.unnamedTopArg] - | TupleTS ts -> ts |> List.collect TopValInfoForTS - -let rec andTS ts tsB = - match ts,tsB with - | _ ,UnknownTS -> UnknownTS - | UnknownTS ,_ -> UnknownTS - | TupleTS ss ,TupleTS ssB -> if List.length ss <> List.length ssB then UnknownTS (* different tuple instances *) - else TupleTS (List.map2 andTS ss ssB) - -let checkTS = function - | TupleTS [] -> internalError "exprTS: Tuple[] not expected. (units not done that way)." - | TupleTS [ts] -> internalError "exprTS: Tuple[x] not expected. (singleton tuples should not exist." - | ts -> ts - -let rec uncheckedExprTS = function (* explicit tuple-structure in expr *) - | TExpr_op(TOp_tuple,tys,args,m) -> TupleTS (List.map uncheckedExprTS args) - | _ -> UnknownTS - -let rec uncheckedTypeTS g ty = - if is_tuple_typ g ty then - let tys = dest_tuple_typ g ty - TupleTS (List.map (uncheckedTypeTS g) tys) - else - UnknownTS - -let exprTS exprs = exprs |> uncheckedExprTS |> checkTS -let typeTS g tys = tys |> uncheckedTypeTS g |> checkTS - -let rebuildTS g m ts vs = - let rec rebuild vs ts = - match vs,ts with - | [] ,UnknownTS -> internalError "rebuildTS: not enough fringe to build tuple" - | v::vs,UnknownTS -> vs,(expr_for_val m v,v.Type) - | vs ,TupleTS tss -> let vs,xtys = List.fmap rebuild vs tss - let xs,tys = List.unzip xtys - let x = mk_tupled g m xs tys - let ty = mk_tupled_ty g tys - vs,(x,ty) - - let vs,(x,ty) = rebuild vs ts - if List.length vs<>0 then internalError "rebuildTS: had move fringe vars than fringe. REPORT BUG" else (); - x - -(* naive string concats, just for testing *) - -/// CallPattern is tuple-structure for each argument position. -/// - callsites have a CallPattern (possibly instancing fOrig at tuple types...). -/// - the definition lambdas may imply a one-level CallPattern -/// - the definition formal projection info suggests a CallPattern -type CallPattern = - TupleStructure list (* equality/ordering ok on this type *) - -let callPatternOrder = (compare : CallPattern -> CallPattern -> int) -let argsCP exprs = List.map exprTS exprs -let noArgsCP = [] -let isTrivialCP xs = (isNil xs) - -#if DEBUG -let rec soTS = function (UnknownTS) -> "_" | TupleTS ss -> "(" ^ String.concat "," (List.map soTS ss) ^ ")" -let soCP tss = String.concat ";" (List.map soTS tss) -#endif - -let rec minimalCP callPattern = - match callPattern with - | [] -> [] - | UnknownTS::tss -> - match minimalCP tss with - | [] -> [] (* drop trailing UnknownTS *) - | tss -> UnknownTS::tss (* non triv tss tail *) - | (TupleTS ts)::tss -> TupleTS ts :: minimalCP tss - -/// INTERSECTION. -/// Combines a list of callpatterns into one common callpattern. -let commonCP callPatterns = - let rec andCPs cpA cpB = - match cpA,cpB with - | [] ,[] -> [] - | tsA::tsAs,tsB::tsBs -> andTS tsA tsB :: andCPs tsAs tsBs - | tsA::tsAs,[] -> [] (* now trim to shortest - UnknownTS :: andCPs tsAs [] *) - | [] ,tsB::tsBs -> [] (* now trim to shortest - UnknownTS :: andCPs [] tsBs *) - - List.reduce_left andCPs callPatterns - -let siteCP (accessors,inst,args) = argsCP args -let sitesCPs sites = List.map siteCP sites - -(*------------------------------------------------------------------------- - *INDEX: transform - *-------------------------------------------------------------------------*) - -type TransformedFormal = - // Indicates that - // - the actual arg in this position is unchanged - // - also menas that we keep the original formal arg - | SameArg - - // Indictes - // - the new formals for the transform - // - expr is tuple of the formals - | NewArgs of Val list * expr - -/// Info needed to convert f to curried form. -/// - yb1..ybp - replacement formal choices for x1...xp. -/// - transformedVal - replaces f. -type Transform = - { transformCallPattern : CallPattern; - transformedFormals : TransformedFormal list; (* REVIEW: could push these to fixup binding site *) - transformedVal : Val; - } - - -(*------------------------------------------------------------------------- - *INDEX: transform - mkTransform - decided, create necessary stuff - *-------------------------------------------------------------------------*) - -let mkTransform g (f:Val) m tps x1Ntys rty (callPattern,tyfringes: (typ list * Val list) list) = - // Create formal choices for x1...xp under callPattern - let transformedFormals = - (callPattern,tyfringes) ||> List.map2 (fun cpi (tyfringe,vs) -> - match cpi with - | UnknownTS -> SameArg - | TupleTS [] -> SameArg - | TupleTS ts -> - // Try to keep the same names for the arguments if possible - let vs = - if List.length vs = List.length tyfringe then - vs |> List.map (fun v -> mk_compgen_local v.Range v.MangledName v.Type |> fst) - else - let baseName = match vs with [v] -> v.MangledName | _ -> "arg" - let baseRange = match vs with [v] -> v.Range | _ -> m - tyfringe |> List.mapi (fun i ty -> - let name = baseName ^ string i - mk_compgen_local baseRange name ty |> fst) - - NewArgs (vs,rebuildTS g m cpi vs)) - - // Create transformedVal replacement for f - // Mark the arity of the value - let topValInfo = - match f.TopValInfo with - | None -> None - | _ -> Some(TopValInfo (TopValInfo.InferTyparInfo tps,List.collect TopValInfoForTS callPattern,TopValInfo.unnamedRetVal)) - (* type(transformedVal) tyfringes types replace initial arg types of f *) - let tys1r = List.collect fst tyfringes (* types for collapsed initial r args *) - let tysrN = List.drop tyfringes.Length x1Ntys (* types for remaining args *) - let argtys = tys1r @ tysrN - let fCty = mk_lambda_ty tps argtys rty - let transformedVal = mkLocalVal f.Range (globalNng.FreshCompilerGeneratedName (f.MangledName,f.Range)) fCty topValInfo - (*dprintf "mkTransform: f=%s\n" (showL (valL f)); - dprintf "mkTransform: tps=%s\n" (showL (commaListL (List.map TyparL tps))); - dprintf "mkTransform: callPattern=%s\n" (soCP callPattern); - dprintf "mkTransform: tyfringes=%s\n" (showL (commaListL (List.map (fun fr -> tupleL (List.map typeL fr)) tyfringes))); - dprintf "mkTransform: tys1r=%s\n" (showL (commaListL (List.map typeL tys1r))); - dprintf "mkTransform: tysrN=%s\n" (showL (commaListL (List.map typeL tysrN))); - dprintf "mkTransform: rty =%s\n" ((DebugPrint.showType rty)); - *) - { transformCallPattern = callPattern; - transformedFormals = transformedFormals; - transformedVal = transformedVal; - } - -#if DEBUG -open Microsoft.FSharp.Compiler.Layout -let dumpTransform trans = - let argTS = function - | 1 -> UnknownTS - | n -> TupleTS (List.repeat n UnknownTS) - - dprintf " - cp : %s\n - transformedVal : %s\n\n" - (soCP trans.transformCallPattern) - (showL (valL trans.transformedVal)) -#endif - -(*------------------------------------------------------------------------- - *INDEX: transform - vTransforms - support - *-------------------------------------------------------------------------*) - -let zipCallPatternArgTys m g (callPattern : TupleStructure list) (vss : Val list list) = - let rec zipTSTyp ts typ = - // match a tuple-structure and type, yields: - // (a) (restricted) tuple-structure, and - // (b) type fringe for each arg position. - match ts with - | TupleTS tss when is_tuple_typ g typ -> - let tys = dest_tuple_typ g typ - let tss,tyfringe = zipTSListTypList tss tys - TupleTS tss,tyfringe - | _ -> - UnknownTS,[typ] (* trim back CallPattern, function more general *) - and zipTSListTypList tss tys = - let tstys = List.map2 zipTSTyp tss tys // assumes tss tys same length - let tss = List.map fst tstys - let tys = List.collect snd tstys // link fringes - tss,tys - - let vss = List.take callPattern.Length vss // drop excessive tys if callPattern shorter - let tstys = List.map2 (fun ts vs -> let ts,tyfringe = zipTSTyp ts (type_of_lambda_arg m vs) in ts,(tyfringe,vs)) callPattern vss - List.unzip tstys - -(*------------------------------------------------------------------------- - *INDEX: transform - vTransforms - defnSuggestedCP - *-------------------------------------------------------------------------*) - -/// v = LAM tps. lam vs1:ty1 ... vsN:tyN. body. -/// The types suggest a tuple structure CallPattern. -/// The BuildProjections of the vsi trim this down, -/// since do not want to take as components any tuple that is required (projected to). -let decideFormalSuggestedCP g z tys vss = - - let rec trimTsByAccess accessors ts = - match ts,accessors with - | UnknownTS ,_ -> UnknownTS - | TupleTS tss,[] -> UnknownTS (* trim it, require the val at this point *) - | TupleTS tss,PTup (i,ty)::accessors -> - let tss = List.mapNth i (trimTsByAccess accessors) tss - TupleTS tss - - let trimTsByVal z ts v = - match Zmap.tryfind v z.xinfo_uses with - | None -> UnknownTS (* formal has no usage info, it is unused *) - | Some sites -> - let trim ts (accessors,inst,args) = trimTsByAccess accessors ts - List.fold trim ts sites - - let trimTsByFormal z ts vss = - match vss with - | [v] -> trimTsByVal z ts v - | vs -> - let tss = match ts with TupleTS tss -> tss | _ -> internalError "trimByFormal: ts must be tuple?? PLEASE REPORT\n" - let tss = List.map2 (trimTsByVal z) tss vs - TupleTS tss - - let tss = List.map (typeTS g) tys (* most general TS according to type *) - let tss = List.map2 (trimTsByFormal z) tss vss - tss - -(*------------------------------------------------------------------------- - *INDEX: transform - decideTransform - *-------------------------------------------------------------------------*) - -let decideTransform g z v callPatterns (m,tps,vss:Val list list,rty) (* tys are types of outer args *) = - let tys = List.map (type_of_lambda_arg m) vss (* arg types *) - (* NOTE: 'a in arg types may have been instanced at different tuples... *) - (* commonCP has to handle those cases. *) - let callPattern = commonCP callPatterns // common CallPattern - let callPattern = List.take vss.Length callPattern // restricted to max nArgs - (* NOW: get formal callPattern by defn usage of formals *) - let formalCallPattern = decideFormalSuggestedCP g z tys vss - let callPattern = List.take callPattern.Length formalCallPattern - // zip with information about known args - let callPattern,tyfringes = zipCallPatternArgTys m g callPattern vss - // drop trivial tail AND - let callPattern = minimalCP callPattern - // shorten tyfringes (zippable) - let tyfringes = List.take callPattern.Length tyfringes - (*dprintf "decideTransform: for v=%s\n" (showL (valL v)); - List.iter (fun cp -> dprintf "- site cp = %s\n" (soCP cp)) callPatterns; - dprintf "- common cp = %s\n" (soCP cp); - dprintf "- front cp = %s\n" (soCP cp); - dprintf "- arg tys = %s\n" (showL (commaListL (List.map typeL tys))); - dprintf "- formalCallPattern = %s\n" (soCP formalCallPattern); - dprintf "- front formalCallPattern = %s\n" (soCP cp); - dprintf "- zipped cp = %s\n" (soCP cp); - dprintf "- tyfringes = %s\n" (showL (commaListL (List.map (List.length >> intL) tyfringes))); - dprintf "- minimal cp = %s\n\n" (soCP cp); - *) - if isTrivialCP callPattern then - None (* no transform *) - else - Some (v,mkTransform g v m tps tys rty (callPattern,tyfringes)) - - -(*------------------------------------------------------------------------- - *INDEX: transform - DetermineTransforms - *-------------------------------------------------------------------------*) - -// Public f could be used beyond assembly. -// For now, suppressing any transforms on these. -// Later, could transform f and fix up local calls and provide an f wrapper for beyond. -let eligibleVal g (v:Val) = - let dllImportStubOrOtherNeverInline = (v.InlineInfo = NeverInline) - let mutableVal = v.IsMutable - let byrefVal = is_byref_typ g v.Type - not dllImportStubOrOtherNeverInline && - not byrefVal && - not mutableVal && - not v.IsMemberOrModuleBinding && // .IsCompiledAsTopLevel && - not v.IsCompiledAsTopLevel - -let DetermineTransforms g (z : GlobalUsageAnalysis.xinfo) = - let selectTransform f sites = - if not (eligibleVal g f) then None else - (* consider f, if it has top-level lambda (meaning has term args) *) - match Zmap.tryfind f z.xinfo_eqns with - | None -> None (* no binding site, so no transform *) - | Some e -> - let tps,vss,b,rty = dest_top_lambda (e,f.Type) - match List.concat vss with - | [] -> None (* defn has no term args *) - | arg1::_ -> (* consider f *) - let m = arg1.Range (* mark of first arg, mostly for error reporting *) - let callPatterns = sitesCPs sites (* callPatterns from sites *) - decideTransform g z f callPatterns (m,tps,vss,rty) (* make transform (if required) *) - - let vtransforms = Zmap.chooseL selectTransform z.xinfo_uses - let vtransforms = Zmap.of_list val_spec_order vtransforms - vtransforms - -#if DEBUG -let dumpVTransform v tr = - dprintf "Transform for %s\n" (showL (valL v)); - dumpTransform tr; - stdout.Flush() -#endif - - -(*------------------------------------------------------------------------- - *INDEX: pass - penv - env of pass - *-------------------------------------------------------------------------*) - -type penv = - { transforms : Zmap.map; (* planned transforms *) - ccu : ccu; - g : Env.TcGlobals; - } - -let HasTransfrom penv f = Zmap.tryfind f penv.transforms - -(*------------------------------------------------------------------------- - *INDEX: pass - app fixup - CollapseArgs - *-------------------------------------------------------------------------*) - -(* CollapseArgs: - - the args may not be tuples (decision made on defn projection). - - need to factor any side-effecting args out into a let binding sequence. - - also factor BuildProjections, so they share common tmps. -*) - -type env = {eg : TcGlobals; - prefix : string; - m : Range.range; } -let suffixE env s = {env with prefix = env.prefix ^ s} -let rangeE env m = {env with m = m} - -let push b bs = b::bs -let pushL xs bs = xs@bs - -let newLocal env ty = mk_compgen_local env.m env.prefix ty -let newLocalN env i ty = mk_compgen_local env.m (env.prefix ^ string i) ty - -let noEffectExpr env bindings x = - match x with - | TExpr_val (v,_,m) -> bindings,x - | x -> - let tmp,xtmp = newLocal env (type_of_expr env.eg x) - let bind = mk_compgen_bind tmp x - push bind bindings,xtmp - -// Given 'e', build -// let v1 = e#1 -// let v2 = e#N -let BuildProjections env bindings x xtys = - - let binds,vixs = - xtys - |> List.mapi (fun i xty -> - let vi,vix = newLocalN env i xty - let bind = mk_bind NoSequencePointAtInvisibleBinding vi (mk_tuple_field_get (x,xtys,i,env.m)) - bind,vix) - |> List.unzip - - // Why are we reversing here? Because we end up reversing once more later - let bindings = pushL (List.rev binds) bindings - bindings,vixs - -let rec CollapseArg env bindings ts x = - let m = range_of_expr x - let env = rangeE env m - match ts,x with - | UnknownTS ,x -> - let bindings,vx = noEffectExpr env bindings x - bindings,[vx] - | TupleTS tss,TExpr_op(TOp_tuple,xtys,xs,m) -> - let env = suffixE env "'" - CollapseArgs env bindings 1 tss xs - | TupleTS tss,x -> - // project components - let bindings,x = noEffectExpr env bindings x - let env = suffixE env "_p" - let xty = type_of_expr env.eg x - let xtys = dest_tuple_typ env.eg xty - let bindings,xs = BuildProjections env bindings x xtys - CollapseArg env bindings (TupleTS tss) (mk_tupled env.eg m xs xtys) - -and CollapseArgs env bindings n (callPattern as tss) args = - match callPattern,args with - | [] ,args -> bindings,args - | ts::tss,arg::args -> - let env1 = suffixE env (string n) - let bindings,xty = CollapseArg env1 bindings ts arg - let bindings,xtys = CollapseArgs env bindings (n+1) tss args - bindings,xty @ xtys - | ts::tss,[] -> - internalError "CollapseArgs: CallPattern longer than callsite args. REPORT BUG" - - -//------------------------------------------------------------------------- -// pass - app fixup -//------------------------------------------------------------------------- - -// REVIEW: use mk_let etc. -let nestedLet = List.foldBack (fun b acc -> mk_let_bind (range_of_expr acc) b acc) - -let FixupApp (penv:penv) (fx,fty,tys,args,m) = - - // Is it a val app, where the val has a transform? - match fx with - | TExpr_val (vref,_,m) -> - let f = deref_val vref - match HasTransfrom penv f with - | Some trans -> - // fix it - let callPattern = trans.transformCallPattern - let transformedVal = trans.transformedVal - let fCty = transformedVal.Type - let fCx = expr_for_val m transformedVal - (* [[f tps args ]] -> transformedVal tps [[COLLAPSED: args]] *) - let env = {prefix = "arg";m = m;eg=penv.g} - let bindings = [] - let bindings,args = CollapseArgs env bindings 0 callPattern args - let bindings = List.rev bindings - nestedLet bindings (TExpr_app (fCx,fCty,tys,args,m)) - | None -> - TExpr_app (fx,fty,tys,args,m) (* no change, f untransformed val *) - | _ -> - TExpr_app (fx,fty,tys,args,m) (* no change, f is expr *) - - -//------------------------------------------------------------------------- -//INDEX: pass - mubinds - translation support -//------------------------------------------------------------------------- - -let TransFormal ybi xi = - match ybi with - | SameArg -> [xi] // one arg - where arg=vpsecs - | NewArgs (vs,x) -> vs |> List.map List.singleton // many args - -let TransRebind ybi xi = - match xi,ybi with - | xi ,SameArg -> [] (* no rebinding, reused original formal *) - | [u],NewArgs (vs,x) -> [mk_compgen_bind u x] - | us ,NewArgs (vs,x) -> List.map2 mk_compgen_bind us (try_dest_tuple x) - - -//------------------------------------------------------------------------- -//INDEX: pass - mubinds -//------------------------------------------------------------------------- - -// Foreach (f,repr) where -// If f has trans, then -// repr = LAM tps. lam x1...xN . body -// -// transformedVal, yb1...ybp in trans. -// -// New binding: -// -// transformedVal = LAM tps. lam [[FORMALS: yb1 ... ybp]] xq...xN = let [[REBINDS: x1,yb1 ...]] -// body -// -// Does not fix calls/defns in binding rhs, that is done by caller. -// - -let pass_bind penv (TBind(fOrig,repr,letSeqPtOpt) as bind) = - let m = fOrig.Range - match HasTransfrom penv fOrig with - | None -> - // fOrig no transform - bind - | Some trans -> - // fOrig has transform - let tps,vss,body,rty = dest_top_lambda (repr,fOrig.Type) in (* expectation *) - // transformedVal is curried version of fOrig - let transformedVal = trans.transformedVal - // fCBody - parts - formals - let transformedFormals = trans.transformedFormals - let p = transformedFormals.Length - if (vss.Length < p) then internalError "pass_binds: |vss|

FlatList.map (pass_bind penv) - -(*------------------------------------------------------------------------- - *INDEX: pass - pass_bind_rhs - * - * At bindings (letrec/let), - * 0. run pass of bodies first. - * 1. transform bindings (as required), - * yields new bindings and fixup data for callsites. - * 2. required to fixup any recursive calls in the bodies (beware O(n^2) cost) - * 3. run pass over following code. - *-------------------------------------------------------------------------*) - -let pass_bind_rhs penv conv (TBind (v,repr,letSeqPtOpt)) = TBind(v,conv repr,letSeqPtOpt) -let pre_intercept_expr (penv:penv) conv expr = - match expr with - | TExpr_letrec (binds,e,m,_) -> - let binds = FlatList.map (pass_bind_rhs penv conv) binds - let binds = pass_binds penv binds - Some (mk_letrec_binds m binds (conv e)) - | TExpr_let (bind,e,m,_) -> - let bind = pass_bind_rhs penv conv bind - let bind = pass_bind penv bind - Some (mk_let_bind m bind (conv e)) - | TyappAndApp(f,fty,tys,args,m) -> - (* match app, and fixup if needed *) - let args = List.map conv args - let f = conv f - Some (FixupApp penv (f,fty,tys,args,m) ) - | _ -> None - - -let PostTransformExpr (penv:penv) expr = - match expr with - | TExpr_letrec (binds,e,m,_) -> - let binds = pass_binds penv binds - Some (mk_letrec_binds m binds e) - | TExpr_let (bind,e,m,_) -> - let bind = pass_bind penv bind - Some (mk_let_bind m bind e) - | TyappAndApp(f,fty,tys,args,m) -> - // match app, and fixup if needed - Some (FixupApp penv (f,fty,tys,args,m) ) - | _ -> None - - -let pass_ImplFile penv ass = - ass |> RewriteImplFile {pre_intercept =None (* Some (pre_intercept_expr penv) *); - post_transform= PostTransformExpr penv (* (fun _ -> None) *); - under_quotations=false } - - -(*------------------------------------------------------------------------- - *INDEX: entry point - *-------------------------------------------------------------------------*) - -let DetupleImplFile ccu g expr = - (* collect expr info - wanting usage contexts and bindings *) - let (z : xinfo) = GetUsageInfoOfImplFile g expr - (* For each Val, decide Some "transform", or None if not changing *) - let vtrans = DetermineTransforms g z - -#if DEBUG - // Diagnostics - summary of planned transforms - if verbose then dprintf "note: detuple - %d functions transformed\n" (List.length (Zmap.keys vtrans)); - if verbose then Zmap.iter dumpVTransform vtrans; -#endif - - (* Pass over term, rewriting bindings and fixing up call sites, under penv *) - let penv = {g=g; transforms = vtrans; ccu = ccu} - if verbose then dprintTerm "DetupleAssembly before:" expr; - if verbose then dprintf "DetupleAssembly: pass\n"; - let z = () in (* z=state, relic, to be removed *) - let expr = pass_ImplFile penv expr - if verbose then dprintTerm "DetupleAssembly after:" expr; - if verbose then dprintf "DetupleAssembly: done\n"; - expr diff --git a/tools/FSharp_1.9.6.16/source/fsharp/detuple.mli b/tools/FSharp_1.9.6.16/source/fsharp/detuple.mli deleted file mode 100644 index 49d96dda..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/detuple.mli +++ /dev/null @@ -1,38 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module internal Microsoft.FSharp.Compiler.Detuple - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Tast - -(* detuple pass: *) -val DetupleImplFile : ccu -> Env.TcGlobals -> TypedImplFile -> TypedImplFile - -module GlobalUsageAnalysis = - val GetValsBoundInExpr : expr -> Zset.set - - type accessor = PTup of int * typ list - - /// xinfo is "expr information". - /// This could extend to be a full graph view of the expr. - /// Later could support "safe" change operations, and optimisations could be in terms of those. - type xinfo = - { /// v -> context / APP inst args - xinfo_uses : Zmap.map; - /// v -> binding repr - xinfo_eqns : Zmap.map; - /// bound in a decision tree? - xinfo_dtree : Zset.set; - /// v -> v list * recursive? -- the others in the mutual binding - xinfo_mubinds : Zmap.map; - /// val not defined under lambdas - xinfo_toplevel : Zset.set; - /// top of expr toplevel? (true) - xinfo_top : bool; - } - val GetUsageInfoOfImplFile : Env.TcGlobals -> TypedImplFile -> xinfo diff --git a/tools/FSharp_1.9.6.16/source/fsharp/env.ml b/tools/FSharp_1.9.6.16/source/fsharp/env.ml deleted file mode 100644 index 7a91f108..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/env.ml +++ /dev/null @@ -1,1166 +0,0 @@ -(* (c) Microsoft Corporation 2005-2008. *) - - -#light - -//------------------------------------------------------------------------- -// Define Initial Environment. A bunch of types and values are hard-wired -// into the compiler. This lets the compiler perform particular optimizations -// for these types and values, for example emitting optimized calls for -// comparison and hashing functions. The compiler generates the compiled code -// for these types and values when the the --compiling-fslib switch is -// provided when linking the FSharp.Core.dll assembly. -//------------------------------------------------------------------------- -module Microsoft.FSharp.Compiler.Env - -open Internal.Utilities -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.PrettyNaming - -let private env_range = rangeN "startup" 0 - -let vara = mk_rigid_typar "a" env_range -let varb = mk_rigid_typar "b" env_range -let private varc = mk_rigid_typar "c" env_range -let private vard = mk_rigid_typar "d" env_range -let private vare = mk_rigid_typar "e" env_range -let private varf = mk_rigid_typar "f" env_range -let private varg = mk_rigid_typar "g" env_range - -let vara_ty = mk_typar_ty vara -let varb_ty = mk_typar_ty varb -let private varc_ty = mk_typar_ty varc -let private vard_ty = mk_typar_ty vard -let private vare_ty = mk_typar_ty vare -let private varf_ty = mk_typar_ty varf -let private varg_ty = mk_typar_ty varg - -type public val_info = Intrinsic of NonLocalPath * string * Tast.typ -let internal vref_for_val_info (Intrinsic(mvr,nm,ty)) = mk_nonlocal_vref mvr nm -let private vref_for_val_sinfo (mvr,nm) = mk_nonlocal_vref mvr nm - -//------------------------------------------------------------------------- -// Access the initial environment: names -//------------------------------------------------------------------------- *) - -let private lib_MFOperators_name = lib_MF_name ^ ".Core.Operators" -let internal lib_MFOperatorsChecked_name = lib_MF_name ^ ".Core.Operators.Checked" -let private lib_MFControl_name = lib_MF_name ^ ".Control" -let private lib_MFColl_name = lib_MF_name ^ ".Collections" -let private lib_MFLanguagePrimitives_name = lib_MF_name ^ ".Core.LanguagePrimitives" -let private lib_MFLanguagePrimitivesIntrinsicFunctions_name = lib_MF_name ^ ".Core.LanguagePrimitives.IntrinsicFunctions" -let private lib_MFText_name = lib_MF_name ^ ".Text" -let private lib_MFIEnumerable_name = lib_MF_name ^ ".Collections.SeqModule" -let private lib_MFIEnumerableSequenceExpressionHelpers_name = lib_MF_name ^ ".Collections.SequenceExpressionHelpers" - -let public lib_MLLib_OCaml_name = lib_MF_name ^ ".Compatibility.OCaml" -let public lib_MLLib_FSharp_name = lib_MF_name ^ "" -let public lib_FSLib_Pervasives_name = lib_MF_name ^ ".Core.ExtraTopLevelOperators" -let public lib_MLLib_Pervasives_name = lib_MF_name ^ ".Compatibility.OCaml.Pervasives" -let private lib_Quotations_name = lib_MF_name ^ ".Quotations" -let private lib_Quotations_ExprModule_name = lib_MF_name ^ ".Quotations.Impl" -let private lib_MFLanguagePrimitivesHashCompare_name = lib_MF_name ^ ".Core.LanguagePrimitives.HashCompare" -let private lib_MFLanguagePrimitivesIntrinsicOperators_name = lib_MF_name ^ ".Core.LanguagePrimitives.IntrinsicOperators" - -// for 4.0 LazyInit / Lazy type -let private lib_MFLazy_name = lib_MFControl_name ^ ".LazyExtensions" - -let private lib_MFOperators_path = IL.split_namespace lib_MFOperators_name |> Array.of_list -let private lib_MFOperatorsChecked_path = IL.split_namespace lib_MFOperatorsChecked_name |> Array.of_list -let public lib_MFControl_path = IL.split_namespace lib_MFControl_name -let public lib_MFColl_path = IL.split_namespace lib_MFColl_name -let private lib_MFText_path = IL.split_namespace lib_MFText_name |> Array.of_list -let private lib_MFLanguagePrimitives_path = IL.split_namespace lib_MFLanguagePrimitives_name |> Array.of_list -let private lib_MFLanguagePrimitivesIntrinsicFunctions_path = IL.split_namespace lib_MFLanguagePrimitivesIntrinsicFunctions_name |> Array.of_list -let private lib_MFLanguagePrimitivesIntrinsicOperators_path = IL.split_namespace lib_MFLanguagePrimitivesIntrinsicOperators_name |> Array.of_list -let private lib_MFLanguagePrimitivesHashCompare_path = IL.split_namespace lib_MFLanguagePrimitivesHashCompare_name |> Array.of_list -let private lib_MFIEnumerable_path = IL.split_namespace lib_MFIEnumerable_name |> Array.of_list -let private lib_MFIEnumerableSequenceExpressionHelpers_path = IL.split_namespace lib_MFIEnumerableSequenceExpressionHelpers_name |> Array.of_list -let private lib_Quotations_path = IL.split_namespace lib_Quotations_name |> Array.of_list -let private lib_FSLib_Pervasives_path = IL.split_namespace lib_FSLib_Pervasives_name |> Array.of_list - -let private lib_MFLazy_path = IL.split_namespace lib_MFLazy_name |> Array.of_list - -let private lib_MF_arr_path = lib_MF_path |> Array.of_list -let private lib_MFCore_arr_path = lib_MFCore_path |> Array.of_list -let private lib_MFControl_arr_path = lib_MFControl_path |> Array.of_list -let private lib_MFColl_arr_path = lib_MFColl_path |> Array.of_list - - - -//------------------------------------------------------------------------- -// Access the initial environment: helpers to build references -//------------------------------------------------------------------------- *) - -let internal mk_top_nlpath ccu p = NLPath(ccu,p) -let private mk_mono_typ tcref = TType_app(tcref,[]) -let internal mk_nonlocal_top_nlpath_tcref ccu path n = mk_nonlocal_tcref (mk_top_nlpath ccu path) n - -let internal mk_MF_tcref ccu n = mk_nonlocal_top_nlpath_tcref ccu lib_MF_arr_path n -let internal mk_MFCore_tcref ccu n = mk_nonlocal_top_nlpath_tcref ccu lib_MFCore_arr_path n -let internal mk_MFColl_tcref ccu n = mk_nonlocal_top_nlpath_tcref ccu lib_MFColl_arr_path n -let internal mk_MFIEnumerableSequenceExpressionHelpers_tcref ccu n = mk_nonlocal_top_nlpath_tcref ccu lib_MFIEnumerableSequenceExpressionHelpers_path n - -let internal mk_MFControl_nlpath ccu = mk_top_nlpath ccu lib_MFControl_arr_path -let internal mk_MFControl_tcref ccu n = mk_nonlocal_tcref (mk_MFControl_nlpath ccu) n - -let internal mk_MFLanguagePrimitives_nlpath ccu = NLPath(ccu,lib_MFLanguagePrimitives_path) -let internal mk_MFLanguagePrimitivesIntrinsicOperators_nlpath ccu = NLPath(ccu,lib_MFLanguagePrimitivesIntrinsicOperators_path) -let internal mk_MFLanguagePrimitivesIntrinsicFunctions_nlpath ccu = NLPath(ccu,lib_MFLanguagePrimitivesIntrinsicFunctions_path) -let internal mk_MFLanguagePrimitivesHashCompare_nlpath ccu = NLPath(ccu,lib_MFLanguagePrimitivesHashCompare_path) -let internal mk_MFText_nlpath ccu = NLPath(ccu,lib_MFText_path) -let internal mk_MFText_tcref ccu n = (mk_nonlocal_tcref (mk_MFText_nlpath ccu) n : TyconRef) -let internal mk_MFIEnumerable_nlpath ccu = NLPath(ccu,lib_MFIEnumerable_path) -let internal mk_MFIEnumerableSequenceExpressionHelpers_nlpath ccu = NLPath(ccu,lib_MFIEnumerableSequenceExpressionHelpers_path) -let internal mk_MFOperators_nlpath ccu = NLPath(ccu,lib_MFOperators_path) -let internal mk_MFOperatorsChecked_nlpath ccu = NLPath(ccu,lib_MFOperatorsChecked_path) - -let internal mk_mscorlib_tcref ccu p = - let a,b = split_type_name p - mk_nonlocal_tcref (NLPath(ccu,Array.of_list a)) b - -let internal mk_mscorlib_mono_typ ccu n = mk_mono_typ(mk_mscorlib_tcref ccu n) - -type public BuiltinAttribInfo = - | AttribInfo of ILTypeRef * TyconRef - member this.TyconRef = let (AttribInfo(tref,tcref)) = this in tcref - member this.TypeRef = let (AttribInfo(tref,tcref)) = this in tref - -//------------------------------------------------------------------------- -// Table of all these "globals" -//------------------------------------------------------------------------- *) - -[] -type public TcGlobals = - { ilg : ILGlobals; - ilxPubCloEnv : Pubclo.cenv; - compilingFslib: bool; - mlCompatibility : bool; - directoryToResolveRelativePaths : string; - fslibCcu: ccu; - sysCcu: ccu; - better_tcref_map: TyconRef -> tinst -> Tast.typ option; - refcell_tcr: TyconRef; - option_tcr : TyconRef; - choice2_tcr : TyconRef; - choice3_tcr : TyconRef; - choice4_tcr : TyconRef; - choice5_tcr : TyconRef; - choice6_tcr : TyconRef; - choice7_tcr : TyconRef; - list_tcr_canon : TyconRef; - lazy_tcr_canon : TyconRef; - - // These have a slightly different behaviour when compiling GetFSharpCoreLibraryName - // hence they are 'methods' on the TcGlobals structure. - - ucref_eq : UnionCaseRef -> UnionCaseRef -> bool; - vref_eq : ValRef -> ValRef -> bool; - - refcell_tcr_nice: TyconRef; - option_tcr_nice : TyconRef; - list_tcr_nice : TyconRef; - - format_tcr : TyconRef; - expr_tcr : TyconRef; - raw_expr_tcr : TyconRef; - int_tcr : TyconRef; - nativeint_tcr : TyconRef; - unativeint_tcr : TyconRef; - int32_tcr : TyconRef; - int16_tcr : TyconRef; - int64_tcr : TyconRef; - uint16_tcr : TyconRef; - uint32_tcr : TyconRef; - uint64_tcr : TyconRef; - sbyte_tcr : TyconRef; - decimal_tcr : TyconRef; - date_tcr : TyconRef; - pdecimal_tcr : TyconRef; - byte_tcr : TyconRef; - bool_tcr : TyconRef; - string_tcr : TyconRef; - obj_tcr : TyconRef; - unit_tcr_canon : TyconRef; - unit_tcr_nice : TyconRef; - exn_tcr : TyconRef; - char_tcr : TyconRef; - float_tcr : TyconRef; - float32_tcr : TyconRef; - pfloat_tcr : TyconRef; - pfloat32_tcr : TyconRef; - pint_tcr : TyconRef; - pint8_tcr : TyconRef; - pint16_tcr : TyconRef; - pint64_tcr : TyconRef; - byref_tcr : TyconRef; - nativeptr_tcr : TyconRef; - ilsigptr_tcr : TyconRef; - fastFunc_tcr : TyconRef; - array_tcr : TyconRef; - seq_tcr : TyconRef; - seq_base_tcr : TyconRef; - il_arr1_tcr : TyconRef; - il_arr2_tcr : TyconRef; - il_arr3_tcr : TyconRef; - il_arr4_tcr : TyconRef; - tuple1_tcr : TyconRef; - tuple2_tcr : TyconRef; - tuple3_tcr : TyconRef; - tuple4_tcr : TyconRef; - tuple5_tcr : TyconRef; - tuple6_tcr : TyconRef; - tuple7_tcr : TyconRef; - tuple8_tcr : TyconRef; - - fslib_IEvent2_tcr : TyconRef; - fslib_IDelegateEvent_tcr: TyconRef; - system_Nullable_tcref : TyconRef; - system_GenericIComparable_tcref : TyconRef; - system_GenericIEquatable_tcref : TyconRef; - system_IndexOutOfRangeException_tcref : TyconRef; - int_ty : Tast.typ; - nativeint_ty : Tast.typ; - unativeint_ty : Tast.typ; - int32_ty : Tast.typ; - int16_ty : Tast.typ; - int64_ty : Tast.typ; - uint16_ty : Tast.typ; - uint32_ty : Tast.typ; - uint64_ty : Tast.typ; - sbyte_ty : Tast.typ; - byte_ty : Tast.typ; - bool_ty : Tast.typ; - string_ty : Tast.typ; - obj_ty : Tast.typ; - unit_ty : Tast.typ; - exn_ty : Tast.typ; - char_ty : Tast.typ; - decimal_ty : Tast.typ; - float_ty : Tast.typ; - float32_ty : Tast.typ; - system_Array_typ : Tast.typ; - system_Object_typ : Tast.typ; - system_IDisposable_typ : Tast.typ; - system_Value_typ : Tast.typ; - system_Delegate_typ : Tast.typ; - system_MulticastDelegate_typ : Tast.typ; - system_Enum_typ : Tast.typ; - system_Exception_typ : Tast.typ; - system_Int32_typ : Tast.typ; - system_String_typ : Tast.typ; - system_Type_typ : Tast.typ; - system_TypedReference_tcref : TyconRef; - system_ArgIterator_tcref : TyconRef; - system_SByte_tcref : TyconRef; - system_Int16_tcref : TyconRef; - system_Int32_tcref : TyconRef; - system_Int64_tcref : TyconRef; - system_IntPtr_tcref : TyconRef; - system_Bool_tcref : TyconRef; - system_Char_tcref : TyconRef; - system_Byte_tcref : TyconRef; - system_UInt16_tcref : TyconRef; - system_UInt32_tcref : TyconRef; - system_UInt64_tcref : TyconRef; - system_UIntPtr_tcref : TyconRef; - system_Single_tcref : TyconRef; - system_Double_tcref : TyconRef; - system_RuntimeArgumentHandle_tcref : TyconRef; - system_RuntimeTypeHandle_typ : Tast.typ; - system_MarshalByRefObject_tcref : TyconRef; - system_MarshalByRefObject_typ : Tast.typ; - system_Array_tcref : TyconRef; - system_Object_tcref : TyconRef; - system_Void_tcref : TyconRef; - mk_IComparable_ty : Tast.typ; - mk_IConvertible_ty : Tast.typ; - mk_IFormattable_ty : Tast.typ; - mk_IStructuralComparable_ty : Tast.typ; - mk_IStructuralEquatable_ty : Tast.typ; - mk_IComparer_ty : Tast.typ; - mk_IEqualityComparer_ty : Tast.typ; - tcref_System_Collections_IComparer : TyconRef; - tcref_System_Collections_IEqualityComparer : TyconRef; - tcref_System_IStructuralComparable : TyconRef; - tcref_System_IStructuralEquatable : TyconRef; - tcref_LanguagePrimitives : TyconRef; - attrib_AttributeUsageAttribute : BuiltinAttribInfo; - attrib_ParamArrayAttribute : BuiltinAttribInfo; - attrib_IDispatchConstantAttribute : BuiltinAttribInfo; - attrib_IUnknownConstantAttribute : BuiltinAttribInfo; - attrib_SystemObsolete : BuiltinAttribInfo; - attrib_DllImportAttribute : BuiltinAttribInfo; - attrib_NonSerializedAttribute : BuiltinAttribInfo; - attrib_AutoSerializableAttribute : BuiltinAttribInfo; - attrib_StructLayoutAttribute : BuiltinAttribInfo; - attrib_TypeForwardedToAttribute : BuiltinAttribInfo; - attrib_ComVisibleAttribute : BuiltinAttribInfo; - attrib_ComImportAttribute : BuiltinAttribInfo; - attrib_FieldOffsetAttribute : BuiltinAttribInfo; - attrib_MarshalAsAttribute : BuiltinAttribInfo; - attrib_InAttribute : BuiltinAttribInfo; - attrib_OutAttribute : BuiltinAttribInfo; - attrib_OptionalAttribute : BuiltinAttribInfo; - attrib_ThreadStaticAttribute : BuiltinAttribInfo; - attrib_SpecialNameAttribute : BuiltinAttribInfo; - attrib_ContextStaticAttribute : BuiltinAttribInfo; - attrib_FlagsAttribute : BuiltinAttribInfo; - attrib_DefaultMemberAttribute : BuiltinAttribInfo; - attrib_DebuggerDisplayAttribute : BuiltinAttribInfo; - attrib_DebuggerTypeProxyAttribute : BuiltinAttribInfo; - tcref_System_Collections_Generic_IList : TyconRef; - tcref_System_Collections_Generic_ICollection : TyconRef; - tcref_System_Collections_Generic_IEnumerable : TyconRef; - tcref_System_Collections_Generic_IEnumerator : TyconRef; - - attrib_RequireQualifiedAccessAttribute : BuiltinAttribInfo; - attrib_OverloadIDAttribute : BuiltinAttribInfo; - attrib_EntryPointAttribute : BuiltinAttribInfo; - attrib_DefaultAugmentationAttribute : BuiltinAttribInfo; - attrib_OCamlCompatibilityAttribute : BuiltinAttribInfo; - attrib_ExperimentalAttribute : BuiltinAttribInfo; - attrib_UnverifiableAttribute : BuiltinAttribInfo; - attrib_LiteralAttribute : BuiltinAttribInfo; - attrib_ConditionalAttribute : BuiltinAttribInfo; - attrib_OptionalArgumentAttribute : BuiltinAttribInfo; - attrib_RequiresExplicitTypeArgumentsAttribute : BuiltinAttribInfo; - attrib_DefaultValueAttribute : BuiltinAttribInfo; - attrib_ClassAttribute : BuiltinAttribInfo; - attrib_InterfaceAttribute : BuiltinAttribInfo; - attrib_StructAttribute : BuiltinAttribInfo; - attrib_ReflectedDefinitionAttribute : BuiltinAttribInfo; - attrib_AutoOpenAttribute : BuiltinAttribInfo; - attrib_CompilationRepresentationAttribute : BuiltinAttribInfo; - attrib_CLIEventAttribute : BuiltinAttribInfo; - //attrib_PermitNullLiteralAttribute : BuiltinAttribInfo; - attrib_ReferenceEqualityAttribute : BuiltinAttribInfo; - attrib_StructuralEqualityAttribute : BuiltinAttribInfo; - attrib_StructuralComparisonAttribute : BuiltinAttribInfo; - attrib_SealedAttribute : BuiltinAttribInfo; - attrib_AbstractClassAttribute : BuiltinAttribInfo; - attrib_GeneralizableValueAttribute : BuiltinAttribInfo; - attrib_MeasureAttribute : BuiltinAttribInfo; - attrib_MeasureableAttribute : BuiltinAttribInfo; - attrib_NoDynamicInvocationAttribute : BuiltinAttribInfo; - - - cons_ucref : UnionCaseRef; - nil_ucref : UnionCaseRef; - (* These are the library values the compiler needs to know about *) - seq_vref : ValRef; - and_vref : ValRef; - and2_vref : ValRef; - addrof_vref : ValRef; - addrof2_vref : ValRef; - or_vref : ValRef; - or2_vref : ValRef; - generic_equality_inner_vref : ValRef; - generic_equality_withc_inner_vref : ValRef; - generic_comparison_inner_vref : ValRef; - generic_comparison_withc_inner_vref : ValRef; - generic_comparison_outer_vref : ValRef; - generic_hash_inner_vref: ValRef; - generic_hash_withc_inner_vref : ValRef; - poly_eq_inner_vref : ValRef; - bitwise_or_vref : ValRef; - seq_info : val_info; - rethrow_info : val_info; - rethrow_vref : ValRef; - typeof_info : val_info; - typeof_vref : ValRef; - typedefof_vref : ValRef; - enum_vref : ValRef; - new_decimal_info : val_info; - generic_comparison_withc_outer_info : val_info; - generic_comparison_outer_info : val_info; - generic_equality_outer_info : val_info; - generic_equality_withc_outer_info : val_info; - generic_hash_withc_outer_info : val_info; - - generic_hash_withc_tuple2_vref : ValRef; - generic_hash_withc_tuple3_vref : ValRef; - generic_hash_withc_tuple4_vref : ValRef; - generic_hash_withc_tuple5_vref : ValRef; - generic_equals_withc_tuple2_vref : ValRef; - generic_equals_withc_tuple3_vref : ValRef; - generic_equals_withc_tuple4_vref : ValRef; - generic_equals_withc_tuple5_vref : ValRef; - generic_compare_withc_tuple2_vref : ValRef; - generic_compare_withc_tuple3_vref : ValRef; - generic_compare_withc_tuple4_vref : ValRef; - generic_compare_withc_tuple5_vref : ValRef; - - create_instance_info : val_info; - unbox_vref : ValRef; - unbox_fast_vref : ValRef; - istype_vref : ValRef; - istype_fast_vref : ValRef; - get_generic_comparer_info : val_info; - get_generic_equality_comparer_info : val_info; - unbox_info : val_info; - unbox_fast_info : val_info; - istype_info : val_info; - istype_fast_info : val_info; - - dispose_info : val_info; - - range_op_vref : ValRef; - arr1_lookup_vref : ValRef; - arr2_lookup_vref : ValRef; - arr3_lookup_vref : ValRef; - arr4_lookup_vref : ValRef; - seq_map_concat_vref : ValRef; - seq_map_concat_info : val_info; - seq_using_info : val_info; - seq_using_vref : ValRef; - seq_delay_info : val_info; - seq_delay_vref : ValRef; - seq_append_info : val_info; - seq_append_vref : ValRef; - seq_generated_info : val_info; - seq_generated_vref : ValRef; - seq_finally_info : val_info; - seq_finally_vref : ValRef; - seq_of_functions_info : val_info; - seq_of_functions_vref : ValRef; - seq_to_array_info : val_info; - seq_to_list_info : val_info; - seq_map_info : val_info; - seq_map_vref : ValRef; - seq_singleton_info : val_info; - seq_singleton_vref : ValRef; - seq_empty_info : val_info; - seq_empty_vref : ValRef; - new_format_info : val_info; - raise_info : val_info; - lazy_force_info : val_info; - lazy_create_info : val_info; - - - array_get_info : val_info; - generic_hash_info : val_info; - unpickle_quoted_info : val_info; - cast_quotation_info : val_info; - lift_value_info : val_info; - //splice_vref : ValRef; - sprintf_vref : ValRef; - splice_expr_vref : ValRef; - splice_raw_expr_vref : ValRef; - new_format_vref : ValRef; - - // A list of types that are explicitly suppressed from the F# intellisense (such as "FSharpList", "Option") - // Note that the suppression checks for the precise name of the type - // ("FSharpList", "List"), so the lowercase versions ("list") are visible - suppressed_types : TyconRef list; - - /// Memoization table to help minimize the number of ILSourceDocument objects we create - memoize_file : int -> IL.ILSourceDocument; - - } - - -#if DEBUG -// This global is only used during debug output -let internal global_g = ref (None : TcGlobals option) -#endif - -let internal mk_tcGlobals (compilingFslib,sysCcu,ilg,fslibCcu,directoryToResolveRelativePaths,mlCompatibility,sysTypes) = - let int_tcr = mk_MFCore_tcref fslibCcu "int" - let nativeint_tcr = mk_MFCore_tcref fslibCcu "nativeint" - let unativeint_tcr = mk_MFCore_tcref fslibCcu "unativeint" - let int32_tcr = mk_MFCore_tcref fslibCcu "int32" - let int16_tcr = mk_MFCore_tcref fslibCcu "int16" - let int64_tcr = mk_MFCore_tcref fslibCcu "int64" - let uint16_tcr = mk_MFCore_tcref fslibCcu "uint16" - let uint32_tcr = mk_MFCore_tcref fslibCcu "uint32" - let uint64_tcr = mk_MFCore_tcref fslibCcu "uint64" - let sbyte_tcr = mk_MFCore_tcref fslibCcu "sbyte" - let decimal_tcr = mk_MFCore_tcref fslibCcu "decimal" - let pdecimal_tcr = mk_MFCore_tcref fslibCcu "decimal`1" - let byte_tcr = mk_MFCore_tcref fslibCcu "byte" - let bool_tcr = mk_MFCore_tcref fslibCcu "bool" - let string_tcr = mk_MFCore_tcref fslibCcu "string" - let obj_tcr = mk_MFCore_tcref fslibCcu "obj" - let unit_tcr_canon = mk_MFCore_tcref fslibCcu "Unit" - let unit_tcr_nice = mk_MFCore_tcref fslibCcu "unit" - let exn_tcr = mk_MFCore_tcref fslibCcu "exn" - let char_tcr = mk_MFCore_tcref fslibCcu "char" - let float_tcr = mk_MFCore_tcref fslibCcu "float" - let float32_tcr = mk_MFCore_tcref fslibCcu "float32" - let pfloat_tcr = mk_MFCore_tcref fslibCcu "float`1" - let pfloat32_tcr = mk_MFCore_tcref fslibCcu "float32`1" - let pint_tcr = mk_MFCore_tcref fslibCcu "int`1" - let pint8_tcr = mk_MFCore_tcref fslibCcu "int8`1" - let pint16_tcr = mk_MFCore_tcref fslibCcu "int16`1" - let pint64_tcr = mk_MFCore_tcref fslibCcu "int64`1" - let byref_tcr = mk_MFCore_tcref fslibCcu "byref`1" - let nativeptr_tcr = mk_MFCore_tcref fslibCcu "nativeptr`1" - let ilsigptr_tcr = mk_MFCore_tcref fslibCcu "ilsigptr`1" - let array_tcr = mk_MFCore_tcref fslibCcu "array`1" - let fastFunc_tcr = mk_MFCore_tcref fslibCcu "FastFunc`2" - let lazy_tcr = - if sysTypes then - mk_mscorlib_tcref sysCcu "System.Threading.LazyInit`1" - else - mk_MFControl_tcref fslibCcu "Lazy`1" - let fslib_IEvent2_tcr = mk_MFControl_tcref fslibCcu "IEvent`2" - let fslib_IDelegateEvent_tcr = mk_MFControl_tcref fslibCcu "IDelegateEvent`1" - let option_tcr_nice = mk_MFCore_tcref fslibCcu "option`1" - let list_tcr_not_nice = mk_MFColl_tcref fslibCcu "FSharpList`1" - let list_tcr_nice = mk_MFColl_tcref fslibCcu "list`1" - let seq_tcr = mk_MFColl_tcref fslibCcu "seq`1" - let format_tcr = mk_MFText_tcref fslibCcu "PrintfFormat`5" - let format4_tcr = mk_MFText_tcref fslibCcu "PrintfFormat`4" - let date_tcr = mk_mscorlib_tcref sysCcu"System.DateTime" - let IEnumerable_tcr = mk_mscorlib_tcref sysCcu "System.Collections.Generic.IEnumerable`1" - let IEnumerator_tcr = mk_mscorlib_tcref sysCcu "System.Collections.Generic.IEnumerator`1" - let expr_tcr = mk_nonlocal_tcref (NLPath(fslibCcu,lib_Quotations_path)) "Expr`1" - let raw_expr_tcr = mk_nonlocal_tcref (NLPath(fslibCcu,lib_Quotations_path)) "Expr" - let il_arr1_tcr = mk_MFCore_tcref fslibCcu "[]`1" - let il_arr2_tcr = mk_MFCore_tcref fslibCcu "[,]`1"; - let il_arr3_tcr = mk_MFCore_tcref fslibCcu "[,,]`1"; - let il_arr4_tcr = mk_MFCore_tcref fslibCcu "[,,,]`1"; - - let bool_ty = mk_mono_typ bool_tcr - let int_ty = mk_mono_typ int_tcr - let obj_ty = mk_mono_typ obj_tcr - let string_ty = mk_mono_typ string_tcr - let byte_ty = mk_mono_typ byte_tcr - let decimal_ty = mk_mscorlib_mono_typ sysCcu "System.Decimal" - let unit_ty = mk_mono_typ unit_tcr_nice - let system_Type_typ = mk_mscorlib_mono_typ sysCcu "System.Type" - - (* local helpers to build value infos *) - let mk_byref_typ ty = TType_app(byref_tcr, [ty]) - let mk_nativeptr_typ ty = TType_app(nativeptr_tcr, [ty]) - let mk_fun_ty d r = TType_fun (d,r) - let (-->) d r = mk_fun_ty d r - let mk_forall_ty d r = TType_forall (d,r) - let try_mk_forall_ty d r = if d = [] then r else mk_forall_ty d r - let (+->) d r = try_mk_forall_ty d r - - let mk_IComparer_ty = mk_mscorlib_mono_typ sysCcu "System.Collections.IComparer"; - let mk_IEqualityComparer_ty = mk_mscorlib_mono_typ sysCcu "System.Collections.IEqualityComparer"; - - let mk_binop_ty ty = ty --> (ty --> ty) - let mk_rel_ty ty = ty --> (ty --> bool_ty) - let mk_compare_ty ty = ty --> (ty --> int_ty) - let mk_compare_withc_ty ty = mk_IComparer_ty --> (ty --> (ty --> int_ty)) - let mk_equality_withc_ty ty = mk_IEqualityComparer_ty --> (ty --> (ty --> bool_ty)) - let mk_hash_ty ty = ty --> int_ty - let mk_hash_withc_ty ty = mk_IEqualityComparer_ty --> (ty --> int_ty) - - let mk_option_ty ty = TType_app(option_tcr_nice,[ty]) - let mk_list_ty ty = TType_app(list_tcr_nice,[ty]) - let mk_seq_ty ty1 = TType_app(seq_tcr,[ty1]) - let mk_IEnumerator_ty ty1 = TType_app(IEnumerator_tcr,[ty1]) - let mk_array_typ ty = TType_app(array_tcr, [ty]) - let mk_array2_typ ty = TType_app(il_arr2_tcr, [ty]) - let mk_array3_typ ty = TType_app(il_arr3_tcr, [ty]) - let mk_array4_typ ty = TType_app(il_arr4_tcr, [ty]) - let mk_lazy_ty ty = TType_app(lazy_tcr, [ty]) - - let mk_format_ty aty bty cty dty ety = TType_app(format_tcr, [aty;bty;cty;dty; ety]) - let mk_format4_ty aty bty cty dty = TType_app(format4_tcr, [aty;bty;cty;dty]) - let mk_expr_ty aty = TType_app(expr_tcr, [aty]) - let mk_raw_expr_ty = TType_app(raw_expr_tcr, []) - let cons_ucref = mk_ucref list_tcr_not_nice "op_ColonColon" - let nil_ucref = mk_ucref list_tcr_not_nice "op_Nil" - - - (* value infos *) - let fslib_MFLanguagePrimitives_nlpath = mk_MFLanguagePrimitives_nlpath fslibCcu - let fslib_MFIEnumerable_nlpath = mk_MFIEnumerable_nlpath fslibCcu - let fslib_MFIEnumerableSequenceExpressionHelpers_nlpath = mk_MFIEnumerableSequenceExpressionHelpers_nlpath fslibCcu - let fslib_MFText_nlpath = mk_MFText_nlpath fslibCcu - let fslib_MFControl_nlpath = mk_MFControl_nlpath fslibCcu - let fslib_MFOperators_nlpath = mk_MFOperators_nlpath fslibCcu - let fslib_MFOperatorsChecked_nlpath = mk_MFOperatorsChecked_nlpath fslibCcu - - let fslib_MFLanguagePrimitivesIntrinsicOperators_nlpath = mk_MFLanguagePrimitivesIntrinsicOperators_nlpath fslibCcu - let fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath = mk_MFLanguagePrimitivesIntrinsicFunctions_nlpath fslibCcu - let fslib_MFLanguagePrimitivesHashCompare_nlpath = mk_MFLanguagePrimitivesHashCompare_nlpath fslibCcu - let mfm = mk_top_nlpath fslibCcu (Array.append lib_MF_arr_path [| "Math" |]) - - let tuple1_tcr = if sysTypes then (mk_mscorlib_tcref sysCcu "System.Tuple`1") else (mk_MFCore_tcref fslibCcu "Tuple`1") - let tuple2_tcr = if sysTypes then (mk_mscorlib_tcref sysCcu "System.Tuple`2") else (mk_MFCore_tcref fslibCcu "Tuple`2") - let tuple3_tcr = if sysTypes then (mk_mscorlib_tcref sysCcu "System.Tuple`3") else (mk_MFCore_tcref fslibCcu "Tuple`3") - let tuple4_tcr = if sysTypes then (mk_mscorlib_tcref sysCcu "System.Tuple`4") else (mk_MFCore_tcref fslibCcu "Tuple`4") - let tuple5_tcr = if sysTypes then (mk_mscorlib_tcref sysCcu "System.Tuple`5") else (mk_MFCore_tcref fslibCcu "Tuple`5") - let tuple6_tcr = if sysTypes then (mk_mscorlib_tcref sysCcu "System.Tuple`6") else (mk_MFCore_tcref fslibCcu "Tuple`6") - let tuple7_tcr = if sysTypes then (mk_mscorlib_tcref sysCcu "System.Tuple`7") else (mk_MFCore_tcref fslibCcu "Tuple`7") - let tuple8_tcr = if sysTypes then (mk_mscorlib_tcref sysCcu "System.Tuple`8") else (mk_MFCore_tcref fslibCcu "Tuple`8") - - let choice2_tcr = mk_MFCore_tcref fslibCcu "Choice`2" - let choice3_tcr = mk_MFCore_tcref fslibCcu "Choice`3" - let choice4_tcr = mk_MFCore_tcref fslibCcu "Choice`4" - let choice5_tcr = mk_MFCore_tcref fslibCcu "Choice`5" - let choice6_tcr = mk_MFCore_tcref fslibCcu "Choice`6" - let choice7_tcr = mk_MFCore_tcref fslibCcu "Choice`7" - let tcref_eq x y = prim_tcref_eq compilingFslib fslibCcu x y - let vref_eq x y = prim_vref_eq compilingFslib fslibCcu x y - let ucref_eq x y = prim_ucref_eq compilingFslib fslibCcu x y - (* let modref_eq = prim_modref_eq compilingFslib fslibCcu in *) - - let suppressed_types = - [ // REVIEW: Decide whether we want to filter 'List' type as well. - // mk_MFColl_tcref fslibCcu "List`1"; - mk_MFColl_tcref fslibCcu "FSharpList`1"; - mk_MFCore_tcref fslibCcu "Option`1"; - mk_MFCore_tcref fslibCcu "Ref`1"; - mk_MFCore_tcref fslibCcu "Unit" ] - - let decode_tuple_ty l = - match l with - | [t1;t2;t3;t4;t5;t6;t7;marker] -> - match marker with - | TType_app(tcref,[t8]) when tcref_eq tcref tuple1_tcr -> TType_tuple [t1;t2;t3;t4;t5;t6;t7;t8] - | TType_app(tcref,[TType_tuple t8plus]) -> - TType_tuple ([t1;t2;t3;t4;t5;t6;t7] @ t8plus) - | _ -> TType_tuple l - | _ -> TType_tuple l - - let mk_MFCore_attrib nm : BuiltinAttribInfo = - let tname = nm ^ "." ^ nm - AttribInfo(mk_tref(Msilxlib.scoref (), nm),mk_MFCore_tcref fslibCcu nm) - - let mk_mscorlib_attrib nm : BuiltinAttribInfo = - AttribInfo(mk_tref (ilg.mscorlib_scoref,nm), mk_mscorlib_tcref sysCcu nm) - - let normalize filename = - let n = String.length filename - let res = Buffer.create n - for i = 0 to n-1 do - let c = String.get filename i - Buffer.add_char res (match c with '/' -> '\\' | _ -> c); - done; - Buffer.contents res - - let mk_doc filename = ILSourceDocument.Create(language=None, vendor=None, documentType=None, file=filename) - // Build the memoization table for files - let memoize_file = new MemoizationTable (file_of_file_idx >> Filename.fullpath directoryToResolveRelativePaths >> normalize >> mk_doc) - - let generic_comparison_outer_info = Intrinsic(fslib_MFLanguagePrimitives_nlpath, "GenericComparison" ,[vara] +-> mk_compare_ty vara_ty) - let generic_comparison_withc_outer_info = Intrinsic(fslib_MFLanguagePrimitives_nlpath, "GenericComparisonWithComparer" ,[vara] +-> mk_compare_withc_ty vara_ty) - - - let generic_hash_withc_tuple2_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastHashTuple2" ,[vara;varb] +-> mk_hash_withc_ty (decode_tuple_ty [vara_ty; varb_ty])) - let generic_hash_withc_tuple3_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastHashTuple3" ,[vara;varb;varc] +-> mk_hash_withc_ty (decode_tuple_ty [vara_ty; varb_ty; varc_ty])) - let generic_hash_withc_tuple4_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastHashTuple4" ,[vara;varb;varc;vard] +-> mk_hash_withc_ty (decode_tuple_ty [vara_ty; varb_ty; varc_ty; vard_ty])) - let generic_hash_withc_tuple5_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastHashTuple5" ,[vara;varb;varc;vard;vare] +->mk_hash_withc_ty (decode_tuple_ty [vara_ty; varb_ty; varc_ty; vard_ty; vare_ty])) - - let generic_equals_withc_tuple2_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastEqualsTuple2" ,[vara;varb]+-> mk_equality_withc_ty (decode_tuple_ty [vara_ty; varb_ty])) - let generic_equals_withc_tuple3_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastEqualsTuple3" ,[vara;varb;varc] +-> mk_equality_withc_ty (decode_tuple_ty [vara_ty; varb_ty; varc_ty])) - let generic_equals_withc_tuple4_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastEqualsTuple4" ,[vara;varb;varc;vard]+-> mk_equality_withc_ty (decode_tuple_ty [vara_ty; varb_ty; varc_ty; vard_ty])) - let generic_equals_withc_tuple5_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastEqualsTuple5" ,[vara;varb;varc;vard;vare] +-> mk_equality_withc_ty (decode_tuple_ty [vara_ty; varb_ty; varc_ty; vard_ty; vare_ty])) - - let generic_compare_withc_tuple2_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastCompareTuple2" ,[vara;varb]+-> mk_compare_withc_ty (decode_tuple_ty [vara_ty; varb_ty])) - let generic_compare_withc_tuple3_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastCompareTuple3" ,[vara;varb;varc]+-> mk_compare_withc_ty (decode_tuple_ty [vara_ty; varb_ty; varc_ty])) - let generic_compare_withc_tuple4_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastCompareTuple4" ,[vara;varb;varc;vard]+-> mk_compare_withc_ty (decode_tuple_ty [vara_ty; varb_ty; varc_ty; vard_ty])) - let generic_compare_withc_tuple5_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "FastCompareTuple5" ,[vara;varb;varc;vard;vare]+->mk_compare_withc_ty (decode_tuple_ty [vara_ty; varb_ty; varc_ty; vard_ty; vare_ty])) - - - let generic_equality_outer_info = Intrinsic(fslib_MFLanguagePrimitives_nlpath, "GenericEquality" ,[vara] +-> mk_rel_ty vara_ty) - let get_generic_comparer_info = Intrinsic(fslib_MFLanguagePrimitives_nlpath, "FSharpComparer" ,unit_ty --> mk_IComparer_ty) - let get_generic_equality_comparer_info = Intrinsic(fslib_MFLanguagePrimitives_nlpath, "FSharpEqualityComparer" ,unit_ty --> mk_IEqualityComparer_ty) - let generic_equality_withc_outer_info = Intrinsic(fslib_MFLanguagePrimitives_nlpath, "GenericEqualityWithComparer" ,[vara] +-> mk_equality_withc_ty vara_ty) - let generic_hash_withc_outer_info = Intrinsic(fslib_MFLanguagePrimitives_nlpath, "GenericHashWithComparer" ,[vara] +-> mk_hash_withc_ty vara_ty) - - let generic_equality_inner_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "GenericEqualityIntrinsic" ,[vara] +-> mk_rel_ty vara_ty) - let generic_equality_withc_inner_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "GenericEqualityWithComparerIntrinsic" ,[vara] +-> mk_equality_withc_ty vara_ty) - let generic_comparison_inner_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "GenericComparisonIntrinsic" ,[vara] +-> mk_compare_ty vara_ty) - let generic_comparison_withc_inner_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "GenericComparisonWithComparerIntrinsic",[vara] +-> mk_compare_withc_ty vara_ty) - - let generic_hash_inner_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "GenericHashIntrinsic" ,[vara] +-> mk_hash_ty vara_ty) - let generic_hash_withc_inner_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "GenericHashWithComparerIntrinsic" ,[vara] +-> mk_hash_withc_ty vara_ty) - - //let unary_neg_sinfo = fslib_MFLanguagePrimitivesIntrinsicOperators_nlpath, (CompileOpName "~-") - let and_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicOperators_nlpath, (CompileOpName "&") ,(mk_rel_ty bool_ty)) - let addrof_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicOperators_nlpath, (CompileOpName "~&") ,([vara] +-> (vara_ty --> mk_byref_typ vara_ty))) - let addrof2_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicOperators_nlpath, (CompileOpName "~&&") ,([vara] +-> (vara_ty --> mk_nativeptr_typ vara_ty))) - let and2_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicOperators_nlpath, (CompileOpName "&&") ,(mk_rel_ty bool_ty) ) - let or_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicOperators_nlpath, "or" ,(mk_rel_ty bool_ty)) - let or2_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicOperators_nlpath, (CompileOpName "||") ,(mk_rel_ty bool_ty)) - let create_instance_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "CreateInstance" ,([vara] +-> (unit_ty --> vara_ty))) - let unbox_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "UnboxGeneric" ,([vara] +-> (obj_ty --> vara_ty))) - - let unbox_fast_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "UnboxFast" ,([vara] +-> (obj_ty --> vara_ty))) - let istype_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "TypeTestGeneric" ,([vara] +-> (obj_ty --> bool_ty))) - let istype_fast_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "TypeTestFast" ,([vara] +-> (obj_ty --> bool_ty))) - - let dispose_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "Dispose" ,([vara] +-> (vara_ty --> unit_ty))) - - let poly_eq_inner_info = Intrinsic(fslib_MFLanguagePrimitivesHashCompare_nlpath, "PhysicalEqualityIntrinsic" ,([vara] +-> mk_rel_ty vara_ty)) - let bitwise_or_info = Intrinsic(fslib_MFOperators_nlpath, "op_BitwiseOr" ,([vara] +-> mk_binop_ty vara_ty)) - let bitwise_and_info = Intrinsic(fslib_MFOperators_nlpath, "op_BitwiseAnd" ,([vara] +-> mk_binop_ty vara_ty)) - let raise_info = Intrinsic(fslib_MFOperators_nlpath, "raise" ,([vara] +-> (mk_mscorlib_mono_typ sysCcu "System.Exception" --> vara_ty))) - let rethrow_info = Intrinsic(fslib_MFOperators_nlpath, "rethrow" ,([vara] +-> (unit_ty --> vara_ty))) - let typeof_info = Intrinsic(fslib_MFOperators_nlpath, "typeof" ,([vara] +-> system_Type_typ)) - let typedefof_info = Intrinsic(fslib_MFOperators_nlpath, "typedefof" ,([vara] +-> system_Type_typ)) - let enum_info = Intrinsic(fslib_MFOperators_nlpath, "enum" ,([vara] +-> (int_ty --> vara_ty))) - let range_op_info = Intrinsic(fslib_MFOperators_nlpath, "op_Range" ,([vara] +-> (vara_ty --> (vara_ty --> mk_seq_ty vara_ty)))) - let arr1_lookup_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "GetArray",([vara;] +-> (mk_array_typ vara_ty --> (int_ty --> vara_ty)))) - let arr2_lookup_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "GetArray2D",([vara;] +-> (mk_array2_typ vara_ty --> (TType_tuple [int_ty;int_ty] --> vara_ty)))) - let arr3_lookup_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "GetArray3D",([vara;] +-> (mk_array3_typ vara_ty --> (TType_tuple [int_ty;int_ty;int_ty] --> vara_ty)))) - let arr4_lookup_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "GetArray4D",([vara;] +-> (mk_array4_typ vara_ty --> (TType_tuple [int_ty;int_ty;int_ty;int_ty] --> vara_ty)))) - let seq_map_concat_info = Intrinsic(fslib_MFIEnumerable_nlpath, "collect" ,([vara;varb;varc] +-> ((vara_ty --> varb_ty) --> (mk_seq_ty vara_ty --> mk_seq_ty varc_ty)))) - let seq_delay_info = Intrinsic(fslib_MFIEnumerable_nlpath, "delay" ,([varb] +-> ((unit_ty --> mk_seq_ty varb_ty) --> mk_seq_ty varb_ty))) - let seq_append_info = Intrinsic(fslib_MFIEnumerable_nlpath, "append" ,([varb] +-> (mk_seq_ty varb_ty --> (mk_seq_ty varb_ty --> mk_seq_ty varb_ty)))) - let seq_using_info = Intrinsic(fslib_MFIEnumerableSequenceExpressionHelpers_nlpath, "EnumerateUsing" ,([vara;varb;varc] +-> (vara_ty --> ((vara_ty --> varb_ty) --> mk_seq_ty varc_ty)))) - let seq_generated_info = Intrinsic(fslib_MFIEnumerableSequenceExpressionHelpers_nlpath, "EnumerateWhile" ,([varb] +-> ((unit_ty --> bool_ty) --> (mk_seq_ty varb_ty --> mk_seq_ty varb_ty)))) - let seq_finally_info = Intrinsic(fslib_MFIEnumerableSequenceExpressionHelpers_nlpath, "EnumerateThenFinally" ,([varb] +-> (mk_seq_ty varb_ty --> ((unit_ty --> unit_ty) --> mk_seq_ty varb_ty)))) - let seq_of_functions_info = Intrinsic(fslib_MFIEnumerableSequenceExpressionHelpers_nlpath, "EnumerateFromFunctions" ,([vara;varb] +-> ((unit_ty --> vara_ty) --> ((vara_ty --> bool_ty) --> ((vara_ty --> varb_ty) --> mk_seq_ty varb_ty))))) - let seq_to_array_info = Intrinsic(fslib_MFIEnumerable_nlpath, "to_array" ,([varb] +-> (mk_seq_ty varb_ty --> mk_array_typ varb_ty))) - let seq_to_list_info = Intrinsic(fslib_MFIEnumerable_nlpath, "to_list" ,([varb] +-> (mk_seq_ty varb_ty --> mk_list_ty varb_ty))) - let seq_map_info = Intrinsic(fslib_MFIEnumerable_nlpath, "map" ,([vara;varb] +-> ((vara_ty --> varb_ty) --> (mk_seq_ty vara_ty --> mk_seq_ty varb_ty)))) - let seq_singleton_info = Intrinsic(fslib_MFIEnumerable_nlpath, "singleton" ,([vara] +-> (vara_ty --> (mk_seq_ty vara_ty)))) - let seq_empty_info = Intrinsic(fslib_MFIEnumerable_nlpath, "empty" ,([vara] +-> (mk_seq_ty vara_ty))) - let new_format_info = Intrinsic(fslib_MFText_nlpath, "PrintfFormat`5.ctor.1" ,([vara;varb;varc;vard;vare] +-> (string_ty --> mk_format_ty vara_ty varb_ty varc_ty vard_ty vare_ty))) - let sprintf_info = Intrinsic(NLPath(fslibCcu,lib_FSLib_Pervasives_path), "sprintf" ,([vara] +-> (mk_format4_ty vara_ty unit_ty string_ty string_ty))) - let lazy_force_info = - // LazyInit\Value for > 4.0 - if sysTypes then - Intrinsic(NLPath(fslibCcu,lib_MFLazy_path), "LazyInit`1.Force.1" ,([vara] +-> (mk_lazy_ty vara_ty --> (unit_ty --> vara_ty)))) - else - Intrinsic(fslib_MFControl_nlpath, "Lazy`1.Force.1" ,([vara] +-> (mk_lazy_ty vara_ty --> (unit_ty --> vara_ty)))) - let lazy_create_info = - if sysTypes then - Intrinsic(NLPath(fslibCcu,lib_MFLazy_path), "LazyInit`1.Create.1.Static" ,([vara] +-> ((unit_ty --> vara_ty) --> mk_lazy_ty vara_ty))) - else - Intrinsic(fslib_MFControl_nlpath, "Lazy`1.Create.1.Static" ,([vara] +-> ((unit_ty --> vara_ty) --> mk_lazy_ty vara_ty))) - let seq_info = Intrinsic(NLPath(fslibCcu,lib_FSLib_Pervasives_path),"seq",([vara] +-> (mk_seq_ty vara_ty --> mk_seq_ty vara_ty))) - let splice_expr_info = Intrinsic(NLPath(fslibCcu,lib_FSLib_Pervasives_path),"op_Splice",([vara] +-> (mk_expr_ty vara_ty --> vara_ty))) - let splice_raw_expr_info = Intrinsic(NLPath(fslibCcu,lib_FSLib_Pervasives_path),"op_SpliceUntyped",([vara] +-> (mk_raw_expr_ty --> vara_ty))) - let new_decimal_info = Intrinsic(fslib_MFLanguagePrimitivesIntrinsicFunctions_nlpath, "MakeDecimal" ,(int_ty --> (int_ty --> (int_ty --> (bool_ty --> (byte_ty --> decimal_ty)))))) - let array_get_info = Intrinsic(mk_MFLanguagePrimitivesIntrinsicFunctions_nlpath fslibCcu, "GetArray" ,([vara] +-> (mk_array_typ vara_ty --> (int_ty --> vara_ty)))) - let generic_hash_info = Intrinsic(mk_MFLanguagePrimitivesIntrinsicFunctions_nlpath fslibCcu, "StructuralHash" ,[vara] +-> (vara_ty --> int_ty)) - let poly_hash_info = Intrinsic(mk_MFLanguagePrimitivesIntrinsicFunctions_nlpath fslibCcu, "StructuralHash" ,([vara] +-> (vara_ty --> int_ty)) ) - let unpickle_quoted_info = Intrinsic(NLPath(fslibCcu,lib_Quotations_path), "Expr.Deserialize.4.Static" ,([] +-> (decode_tuple_ty [system_Type_typ ;mk_list_ty system_Type_typ ;mk_list_ty mk_raw_expr_ty ; mk_array_typ byte_ty] --> mk_raw_expr_ty ))) - let cast_quotation_info = Intrinsic(NLPath(fslibCcu,lib_Quotations_path), "Expr.Cast.1.Static" ,([vara] +-> (mk_raw_expr_ty --> mk_expr_ty vara_ty))) - let lift_value_info = Intrinsic(NLPath(fslibCcu,lib_Quotations_path), "Expr.Value.1.Static" ,([vara] +-> (vara_ty --> mk_expr_ty vara_ty))) - - { ilg=ilg; - ilxPubCloEnv=Pubclo.new_cenv(ilg); - compilingFslib=compilingFslib; - mlCompatibility=mlCompatibility; - directoryToResolveRelativePaths=directoryToResolveRelativePaths; - (* modref_eq = modref_eq; *) - ucref_eq = ucref_eq; - vref_eq = vref_eq; - fslibCcu = fslibCcu; - sysCcu = sysCcu; - refcell_tcr = mk_MFCore_tcref fslibCcu "Ref`1"; - option_tcr = mk_MFCore_tcref fslibCcu "Option`1"; - list_tcr_canon = mk_MFColl_tcref fslibCcu "FSharpList`1"; - lazy_tcr_canon = lazy_tcr; - refcell_tcr_nice = mk_MFCore_tcref fslibCcu "ref`1"; - option_tcr_nice = mk_MFCore_tcref fslibCcu "option`1"; - list_tcr_nice = mk_MFColl_tcref fslibCcu "list`1"; - format_tcr = format_tcr; - expr_tcr = expr_tcr; - raw_expr_tcr = raw_expr_tcr; - int_tcr = int_tcr; - nativeint_tcr = nativeint_tcr; - unativeint_tcr = unativeint_tcr; - int32_tcr = int32_tcr; - int16_tcr = int16_tcr; - int64_tcr = int64_tcr; - uint16_tcr = uint16_tcr; - uint32_tcr = uint32_tcr; - uint64_tcr = uint64_tcr; - sbyte_tcr = sbyte_tcr; - decimal_tcr = decimal_tcr; - date_tcr = date_tcr; - pdecimal_tcr = pdecimal_tcr; - byte_tcr = byte_tcr; - bool_tcr = bool_tcr; - string_tcr = string_tcr; - obj_tcr = obj_tcr; - unit_tcr_canon = unit_tcr_canon; - unit_tcr_nice = unit_tcr_nice; - exn_tcr = exn_tcr; - char_tcr = char_tcr; - float_tcr = float_tcr; - float32_tcr = float32_tcr; - pfloat_tcr = pfloat_tcr; - pfloat32_tcr = pfloat32_tcr; - pint_tcr = pint_tcr; - pint8_tcr = pint8_tcr; - pint16_tcr = pint16_tcr; - pint64_tcr = pint64_tcr; - byref_tcr = byref_tcr; - nativeptr_tcr = nativeptr_tcr; - ilsigptr_tcr = ilsigptr_tcr; - fastFunc_tcr = fastFunc_tcr; - fslib_IEvent2_tcr = fslib_IEvent2_tcr; - fslib_IDelegateEvent_tcr = fslib_IDelegateEvent_tcr; - array_tcr = array_tcr; - seq_tcr = seq_tcr; - seq_base_tcr = mk_MFIEnumerableSequenceExpressionHelpers_tcref fslibCcu "GeneratedSequenceBase`1"; - il_arr1_tcr = il_arr1_tcr; - il_arr2_tcr = il_arr2_tcr; - il_arr3_tcr = il_arr3_tcr; - il_arr4_tcr = il_arr4_tcr; - tuple1_tcr = tuple1_tcr; - tuple2_tcr = tuple2_tcr; - tuple3_tcr = tuple3_tcr; - tuple4_tcr = tuple4_tcr; - tuple5_tcr = tuple5_tcr; - tuple6_tcr = tuple6_tcr; - tuple7_tcr = tuple7_tcr; - tuple8_tcr = tuple8_tcr; - choice2_tcr = choice2_tcr; - choice3_tcr = choice3_tcr; - choice4_tcr = choice4_tcr; - choice5_tcr = choice5_tcr; - choice6_tcr = choice6_tcr; - choice7_tcr = choice7_tcr; - int_ty = int_ty; - nativeint_ty = mk_mono_typ nativeint_tcr; - unativeint_ty = mk_mono_typ unativeint_tcr; - int32_ty = mk_mono_typ int32_tcr; - int16_ty = mk_mono_typ int16_tcr; - int64_ty = mk_mono_typ int64_tcr; - uint16_ty = mk_mono_typ uint16_tcr; - uint32_ty = mk_mono_typ uint32_tcr; - uint64_ty = mk_mono_typ uint64_tcr; - sbyte_ty = mk_mono_typ sbyte_tcr; - byte_ty = byte_ty; - bool_ty = bool_ty; - string_ty = string_ty; - obj_ty = mk_mono_typ obj_tcr; - unit_ty = unit_ty; - exn_ty = mk_mono_typ exn_tcr; - char_ty = mk_mono_typ char_tcr; - decimal_ty = mk_mono_typ decimal_tcr; - float_ty = mk_mono_typ float_tcr; - float32_ty = mk_mono_typ float32_tcr; - memoize_file = memoize_file.Apply; - - system_Array_typ = mk_mscorlib_mono_typ sysCcu "System.Array"; - system_Object_typ = mk_mscorlib_mono_typ sysCcu "System.Object"; - system_IDisposable_typ = mk_mscorlib_mono_typ sysCcu "System.IDisposable"; - system_Value_typ = mk_mscorlib_mono_typ sysCcu "System.ValueType"; - system_Delegate_typ = mk_mscorlib_mono_typ sysCcu "System.Delegate"; - system_MulticastDelegate_typ = mk_mscorlib_mono_typ sysCcu "System.MulticastDelegate"; - system_Enum_typ = mk_mscorlib_mono_typ sysCcu "System.Enum"; - system_Exception_typ = mk_mscorlib_mono_typ sysCcu "System.Exception"; - system_String_typ = mk_mscorlib_mono_typ sysCcu "System.String"; - system_Int32_typ = mk_mscorlib_mono_typ sysCcu "System.Int32"; - system_Type_typ = system_Type_typ; - system_TypedReference_tcref = mk_mscorlib_tcref sysCcu "System.TypedReference" ; - system_ArgIterator_tcref = mk_mscorlib_tcref sysCcu "System.ArgIterator" ; - system_RuntimeArgumentHandle_tcref = mk_mscorlib_tcref sysCcu "System.RuntimeArgumentHandle"; - system_SByte_tcref = mk_mscorlib_tcref sysCcu "System.SByte"; - system_Int16_tcref = mk_mscorlib_tcref sysCcu "System.Int16"; - system_Int32_tcref = mk_mscorlib_tcref sysCcu "System.Int32"; - system_Int64_tcref = mk_mscorlib_tcref sysCcu "System.Int64"; - system_IntPtr_tcref = mk_mscorlib_tcref sysCcu "System.IntPtr"; - system_Bool_tcref = mk_mscorlib_tcref sysCcu "System.Boolean"; - system_Byte_tcref = mk_mscorlib_tcref sysCcu "System.Byte"; - system_UInt16_tcref = mk_mscorlib_tcref sysCcu "System.UInt16"; - system_Char_tcref = mk_mscorlib_tcref sysCcu "System.Char"; - system_UInt32_tcref = mk_mscorlib_tcref sysCcu "System.UInt32"; - system_UInt64_tcref = mk_mscorlib_tcref sysCcu "System.UInt64"; - system_UIntPtr_tcref = mk_mscorlib_tcref sysCcu "System.UIntPtr"; - system_Single_tcref = mk_mscorlib_tcref sysCcu "System.Single"; - system_Double_tcref = mk_mscorlib_tcref sysCcu "System.Double"; - system_RuntimeTypeHandle_typ = mk_mscorlib_mono_typ sysCcu "System.RuntimeTypeHandle"; - system_MarshalByRefObject_tcref = mk_mscorlib_tcref sysCcu "System.MarshalByRefObject"; - system_MarshalByRefObject_typ = mk_mscorlib_mono_typ sysCcu "System.MarshalByRefObject"; - - system_Array_tcref = mk_mscorlib_tcref sysCcu "System.Array"; - system_Object_tcref = mk_mscorlib_tcref sysCcu "System.Object"; - system_Void_tcref = mk_mscorlib_tcref sysCcu "System.Void"; - system_IndexOutOfRangeException_tcref = mk_mscorlib_tcref sysCcu "System.IndexOutOfRangeException"; - system_Nullable_tcref = mk_mscorlib_tcref sysCcu "System.Nullable`1"; - system_GenericIComparable_tcref = mk_mscorlib_tcref sysCcu "System.IComparable`1"; - system_GenericIEquatable_tcref = mk_mscorlib_tcref sysCcu "System.IEquatable`1"; - mk_IComparable_ty = mk_mscorlib_mono_typ sysCcu "System.IComparable"; - - mk_IStructuralComparable_ty = - if sysTypes then - mk_mscorlib_mono_typ sysCcu "System.Collections.IStructuralComparable"; - else - let tcref_IStructuralComparable = mk_MFCore_tcref fslibCcu "IStructuralComparable" - TType_app(tcref_IStructuralComparable,[]) - - mk_IStructuralEquatable_ty = - if sysTypes then - mk_mscorlib_mono_typ sysCcu "System.Collections.IStructuralEquatable"; - else - let tcref_IStructuralEquatable = mk_MFCore_tcref fslibCcu "IStructuralEquatable" - TType_app(tcref_IStructuralEquatable,[]) - - mk_IComparer_ty = mk_IComparer_ty; - mk_IEqualityComparer_ty = mk_IEqualityComparer_ty; - tcref_System_Collections_IComparer = mk_mscorlib_tcref sysCcu "System.Collections.IComparer"; - tcref_System_Collections_IEqualityComparer = mk_mscorlib_tcref sysCcu "System.Collections.IEqualityComparer"; - - tcref_System_IStructuralComparable = - if sysTypes then - mk_mscorlib_tcref sysCcu "System.Collections.IStructuralComparable" - else - mk_MFCore_tcref fslibCcu "IStructuralComparable" - tcref_System_IStructuralEquatable = - if sysTypes then - mk_mscorlib_tcref sysCcu "System.Collections.IStructuralEquatable"; - else - mk_MFCore_tcref fslibCcu "IStructuralEquatable" - - tcref_LanguagePrimitives = mk_MFCore_tcref fslibCcu "LanguagePrimitives"; - - mk_IConvertible_ty = mk_mscorlib_mono_typ sysCcu "System.IConvertible"; - mk_IFormattable_ty = mk_mscorlib_mono_typ sysCcu "System.IFormattable"; - - tcref_System_Collections_Generic_IList = mk_mscorlib_tcref sysCcu "System.Collections.Generic.IList`1"; - tcref_System_Collections_Generic_ICollection = mk_mscorlib_tcref sysCcu "System.Collections.Generic.ICollection`1"; - tcref_System_Collections_Generic_IEnumerable = IEnumerable_tcr; - tcref_System_Collections_Generic_IEnumerator = IEnumerator_tcr; - - attrib_AttributeUsageAttribute = mk_mscorlib_attrib "System.AttributeUsageAttribute"; - attrib_ParamArrayAttribute = mk_mscorlib_attrib "System.ParamArrayAttribute"; - attrib_IDispatchConstantAttribute = mk_mscorlib_attrib "System.Runtime.CompilerServices.IDispatchConstantAttribute"; - attrib_IUnknownConstantAttribute = mk_mscorlib_attrib "System.Runtime.CompilerServices.IUnknownConstantAttribute"; - - attrib_SystemObsolete = mk_mscorlib_attrib "System.ObsoleteAttribute"; - attrib_DllImportAttribute = mk_mscorlib_attrib "System.Runtime.InteropServices.DllImportAttribute"; - attrib_StructLayoutAttribute = mk_mscorlib_attrib "System.Runtime.InteropServices.StructLayoutAttribute"; - attrib_TypeForwardedToAttribute = mk_mscorlib_attrib "System.Runtime.CompilerServices.TypeForwardedToAttribute"; - attrib_ComVisibleAttribute = mk_mscorlib_attrib "System.Runtime.InteropServices.ComVisibleAttribute"; - attrib_ComImportAttribute = mk_mscorlib_attrib "System.Runtime.InteropServices.ComImportAttribute"; - attrib_FieldOffsetAttribute = mk_mscorlib_attrib "System.Runtime.InteropServices.FieldOffsetAttribute" ; - attrib_MarshalAsAttribute = mk_mscorlib_attrib "System.Runtime.InteropServices.MarshalAsAttribute"; - attrib_InAttribute = mk_mscorlib_attrib "System.Runtime.InteropServices.InAttribute" ; - attrib_OutAttribute = mk_mscorlib_attrib "System.Runtime.InteropServices.OutAttribute" ; - attrib_OptionalAttribute = mk_mscorlib_attrib "System.Runtime.InteropServices.OptionalAttribute" ; - attrib_ThreadStaticAttribute = mk_mscorlib_attrib "System.ThreadStaticAttribute"; - attrib_SpecialNameAttribute = mk_mscorlib_attrib "System.Runtime.CompilerServices.SpecialNameAttribute"; - attrib_ContextStaticAttribute = mk_mscorlib_attrib "System.ContextStaticAttribute"; - attrib_FlagsAttribute = mk_mscorlib_attrib "System.FlagsAttribute"; - attrib_DefaultMemberAttribute = mk_mscorlib_attrib "System.Reflection.DefaultMemberAttribute"; - attrib_DebuggerDisplayAttribute = mk_mscorlib_attrib "System.Diagnostics.DebuggerDisplayAttribute"; - attrib_DebuggerTypeProxyAttribute = mk_mscorlib_attrib "System.Diagnostics.DebuggerTypeProxyAttribute"; - - attrib_NonSerializedAttribute = mk_mscorlib_attrib "System.NonSerializedAttribute"; - attrib_AutoSerializableAttribute = mk_MFCore_attrib "AutoSerializableAttribute"; - attrib_OverloadIDAttribute = mk_MFCore_attrib "OverloadIDAttribute"; - attrib_RequireQualifiedAccessAttribute = mk_MFCore_attrib "RequireQualifiedAccessAttribute"; - attrib_EntryPointAttribute = mk_MFCore_attrib "EntryPointAttribute"; - attrib_DefaultAugmentationAttribute = mk_MFCore_attrib "DefaultAugmentationAttribute"; - attrib_OCamlCompatibilityAttribute = mk_MFCore_attrib "OCamlCompatibilityAttribute"; - attrib_ExperimentalAttribute = mk_MFCore_attrib "ExperimentalAttribute"; - attrib_UnverifiableAttribute = mk_MFCore_attrib "UnverifiableAttribute"; - attrib_LiteralAttribute = mk_MFCore_attrib "LiteralAttribute"; - attrib_ConditionalAttribute = mk_mscorlib_attrib "System.Diagnostics.ConditionalAttribute"; - attrib_OptionalArgumentAttribute = mk_MFCore_attrib "OptionalArgumentAttribute"; - attrib_RequiresExplicitTypeArgumentsAttribute = mk_MFCore_attrib "RequiresExplicitTypeArgumentsAttribute"; - attrib_DefaultValueAttribute = mk_MFCore_attrib "DefaultValueAttribute"; - attrib_ClassAttribute = mk_MFCore_attrib "ClassAttribute"; - attrib_InterfaceAttribute = mk_MFCore_attrib "InterfaceAttribute"; - attrib_StructAttribute = mk_MFCore_attrib "StructAttribute"; - attrib_ReflectedDefinitionAttribute = mk_MFCore_attrib "ReflectedDefinitionAttribute"; - attrib_AutoOpenAttribute = mk_MFCore_attrib "AutoOpenAttribute"; - attrib_CompilationRepresentationAttribute = mk_MFCore_attrib "CompilationRepresentationAttribute"; - attrib_CLIEventAttribute = mk_MFCore_attrib "CLIEventAttribute"; - attrib_ReferenceEqualityAttribute = mk_MFCore_attrib "ReferenceEqualityAttribute"; - attrib_StructuralEqualityAttribute = mk_MFCore_attrib "StructuralEqualityAttribute"; - attrib_StructuralComparisonAttribute = mk_MFCore_attrib "StructuralComparisonAttribute"; - attrib_SealedAttribute = mk_MFCore_attrib "SealedAttribute"; - attrib_AbstractClassAttribute = mk_MFCore_attrib "AbstractClassAttribute"; - attrib_GeneralizableValueAttribute = mk_MFCore_attrib "GeneralizableValueAttribute"; - attrib_MeasureAttribute = mk_MFCore_attrib "MeasureAttribute"; - attrib_MeasureableAttribute = mk_MFCore_attrib "MeasureAnnotatedAbbreviationAttribute"; - attrib_NoDynamicInvocationAttribute = mk_MFCore_attrib "NoDynamicInvocationAttribute"; - - // Build a map that uses the "canonical" F# type names and TyconRef's for these - // in preference to the .NET type names. Doing this normalization is a fairly performance critical - // piece of code as it is frequently invoked in the process of converting .NET metadata to F# internal - // compiler data structures (see import.ml). - better_tcref_map = - begin - let entries1 = - [ "Int32", int_tcr; - "IntPtr", nativeint_tcr; - "UIntPtr", unativeint_tcr; - "Int16",int16_tcr; - "Int64",int64_tcr; - "UInt16",uint16_tcr; - "UInt32",uint32_tcr; - "UInt64",uint64_tcr; - "SByte",sbyte_tcr; - "Decimal",decimal_tcr; - "Byte",byte_tcr; - "Boolean",bool_tcr; - "String",string_tcr; - "Object",obj_tcr; - "Exception",exn_tcr; - "Char",char_tcr; - "Double",float_tcr; - "Single",float32_tcr;] - |> List.map (fun (nm,tcr) -> - let ty = mk_mono_typ tcr - nm, mk_mscorlib_tcref sysCcu ("System."^nm), (fun _ -> ty)) - let entries2 = - [ "IEnumerable`2", IEnumerable_tcr, (fun tinst -> mk_seq_ty (List.nth tinst 0)); - "FastFunc`2", fastFunc_tcr, (fun tinst -> mk_fun_ty (List.nth tinst 0) (List.nth tinst 1)); - "Tuple`1", tuple1_tcr, decode_tuple_ty; - "Tuple`2", tuple2_tcr, decode_tuple_ty; - "Tuple`3", tuple3_tcr, decode_tuple_ty; - "Tuple`4", tuple4_tcr, decode_tuple_ty; - "Tuple`5", tuple5_tcr, decode_tuple_ty; - "Tuple`6", tuple6_tcr, decode_tuple_ty; - "Tuple`7", tuple7_tcr, decode_tuple_ty; - "Tuple`8", tuple8_tcr, decode_tuple_ty;] - let entries = (entries1 @ entries2) - - if compilingFslib then - // This map is for use when building FSharp.Core.dll. The backing Tycon's may not yet exist for - // the TyconRef's we have inour hands, hence we can't dereference them to find their stamps. - - // So this dictionary is indexed by names. - let dict = - entries - |> List.map (fun (nm,tcref,builder) -> nm, (fun tcref2 tinst -> if tcref_eq tcref tcref2 then Some(builder tinst) else None)) - |> Dictionary.of_list - (fun tcref tinst -> - match Dictionary.tryfind dict tcref.MangledName with - | Some builder -> builder tcref tinst - | _ -> None) - else - // This map is for use in normal times (not building FSharp.Core.dll). It is indexed by tcref stamp which is - // faster than the indexing technique used in the case above. - // - // So this dictionary is indexed by integers. - let dict = - entries - |> List.map (fun (_,tcref,builder) -> tcref.Stamp, builder) - |> Dictionary.of_list - (fun tcref2 tinst -> - match Dictionary.tryfind dict tcref2.Stamp with - | Some builder -> Some(builder tinst) - | _ -> None) - end; - - new_decimal_info = new_decimal_info; - seq_info = seq_info; - generic_equality_inner_vref = vref_for_val_info generic_equality_inner_info; - generic_equality_withc_inner_vref = vref_for_val_info generic_equality_withc_inner_info; - generic_comparison_inner_vref = vref_for_val_info generic_comparison_inner_info; - generic_comparison_withc_inner_vref = vref_for_val_info generic_comparison_withc_inner_info; - generic_comparison_outer_vref = vref_for_val_info generic_comparison_outer_info; - generic_comparison_withc_outer_info = generic_comparison_withc_outer_info; - generic_comparison_outer_info = generic_comparison_outer_info; - - generic_equality_outer_info = generic_equality_outer_info; - generic_equality_withc_outer_info = generic_equality_withc_outer_info; - - generic_hash_withc_outer_info = generic_hash_withc_outer_info; - generic_hash_inner_vref = vref_for_val_info generic_hash_inner_info; - generic_hash_withc_inner_vref = vref_for_val_info generic_hash_withc_inner_info; - - seq_vref = (vref_for_val_info seq_info) ; - and_vref = (vref_for_val_info and_info) ; - and2_vref = (vref_for_val_info and2_info); - addrof_vref = (vref_for_val_info addrof_info); - addrof2_vref = (vref_for_val_info addrof2_info); - or_vref = (vref_for_val_info or_info); - //splice_vref = (vref_for_val_info splice_info); - splice_expr_vref = (vref_for_val_info splice_expr_info); - splice_raw_expr_vref = (vref_for_val_info splice_raw_expr_info); - or2_vref = (vref_for_val_info or2_info); - poly_eq_inner_vref = vref_for_val_info poly_eq_inner_info; - bitwise_or_vref = vref_for_val_info bitwise_or_info; - raise_info = raise_info; - rethrow_info = rethrow_info; - rethrow_vref = vref_for_val_info rethrow_info; - typeof_info = typeof_info; - typeof_vref = vref_for_val_info typeof_info; - typedefof_vref = vref_for_val_info typedefof_info; - enum_vref = vref_for_val_info enum_info; - range_op_vref = vref_for_val_info range_op_info; - arr1_lookup_vref = vref_for_val_info arr1_lookup_info; - arr2_lookup_vref = vref_for_val_info arr2_lookup_info; - arr3_lookup_vref = vref_for_val_info arr3_lookup_info; - arr4_lookup_vref = vref_for_val_info arr4_lookup_info; - seq_singleton_vref = vref_for_val_info seq_singleton_info; - seq_map_concat_vref = vref_for_val_info seq_map_concat_info; - seq_map_concat_info = seq_map_concat_info; - seq_using_info = seq_using_info; - seq_using_vref = vref_for_val_info seq_using_info; - seq_delay_info = seq_delay_info; - seq_delay_vref = vref_for_val_info seq_delay_info; - seq_append_info = seq_append_info; - seq_append_vref = vref_for_val_info seq_append_info; - seq_generated_info = seq_generated_info; - seq_generated_vref = vref_for_val_info seq_generated_info; - seq_finally_info = seq_finally_info; - seq_finally_vref = vref_for_val_info seq_finally_info; - seq_of_functions_info = seq_of_functions_info; - seq_of_functions_vref = vref_for_val_info seq_of_functions_info; - seq_map_info = seq_map_info; - seq_map_vref = vref_for_val_info seq_map_info; - seq_singleton_info = seq_singleton_info; - seq_empty_info = seq_empty_info; - seq_empty_vref = vref_for_val_info seq_empty_info; - new_format_info = new_format_info; - new_format_vref = vref_for_val_info new_format_info; - sprintf_vref = vref_for_val_info sprintf_info; - unbox_vref = vref_for_val_info unbox_info; - unbox_fast_vref = vref_for_val_info unbox_fast_info; - istype_vref = vref_for_val_info istype_info; - istype_fast_vref = vref_for_val_info istype_fast_info; - unbox_info = unbox_info; - get_generic_comparer_info = get_generic_comparer_info; - get_generic_equality_comparer_info = get_generic_equality_comparer_info; - dispose_info = dispose_info; - unbox_fast_info = unbox_fast_info; - istype_info = istype_info; - istype_fast_info = istype_fast_info; - lazy_force_info=lazy_force_info; - lazy_create_info=lazy_create_info; - create_instance_info = create_instance_info; - seq_to_list_info = seq_to_list_info; - seq_to_array_info = seq_to_array_info; - array_get_info = array_get_info; - generic_hash_info = generic_hash_info; - unpickle_quoted_info = unpickle_quoted_info; - cast_quotation_info = cast_quotation_info; - lift_value_info = lift_value_info; - - - generic_hash_withc_tuple2_vref = vref_for_val_info generic_hash_withc_tuple2_info; - generic_hash_withc_tuple3_vref = vref_for_val_info generic_hash_withc_tuple3_info; - generic_hash_withc_tuple4_vref = vref_for_val_info generic_hash_withc_tuple4_info; - generic_hash_withc_tuple5_vref = vref_for_val_info generic_hash_withc_tuple5_info; - generic_equals_withc_tuple2_vref = vref_for_val_info generic_equals_withc_tuple2_info; - generic_equals_withc_tuple3_vref = vref_for_val_info generic_equals_withc_tuple3_info; - generic_equals_withc_tuple4_vref = vref_for_val_info generic_equals_withc_tuple4_info; - generic_equals_withc_tuple5_vref = vref_for_val_info generic_equals_withc_tuple5_info; - generic_compare_withc_tuple2_vref = vref_for_val_info generic_compare_withc_tuple2_info; - generic_compare_withc_tuple3_vref = vref_for_val_info generic_compare_withc_tuple3_info; - generic_compare_withc_tuple4_vref = vref_for_val_info generic_compare_withc_tuple4_info; - generic_compare_withc_tuple5_vref = vref_for_val_info generic_compare_withc_tuple5_info; - - - cons_ucref = cons_ucref; - nil_ucref = nil_ucref; - - suppressed_types = suppressed_types; - } - -let public mk_mscorlib_attrib g nm : BuiltinAttribInfo = - AttribInfo(mk_tref (g.ilg.mscorlib_scoref,nm), mk_mscorlib_tcref g.sysCcu nm) diff --git a/tools/FSharp_1.9.6.16/source/fsharp/formats.ml b/tools/FSharp_1.9.6.16/source/fsharp/formats.ml deleted file mode 100644 index 8a8e2416..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/formats.ml +++ /dev/null @@ -1,248 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -module internal Microsoft.FSharp.Compiler.Formats - -#light - -open Internal.Utilities -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.ConstraintSolver - -type format_item = Simple of typ | FuncAndVal - -let copy_and_fixup_format_typar m tp = - let _,_,tinst = freshen_and_fixup_typars m TyparFlexible [] [] [tp] - List.hd tinst - -let lowestDefaultPriority = 0 (* See comment on TTyparDefaultsToType *) - -let flexible_format_typar g m tys dflt = - let tp = NewTypar (KindType,TyparRigid,Typar(mksyn_id m "fmt",HeadTypeStaticReq,true),false,DynamicReq,[]) - fixup_typar_constraints tp [ TTyparSimpleChoice (tys,m); TTyparDefaultsToType (lowestDefaultPriority,dflt,m)]; - copy_and_fixup_format_typar m tp - -let flexible_int_format_typar g m = - flexible_format_typar g m [ g.byte_ty; g.int16_ty; g.int32_ty; g.int64_ty; g.sbyte_ty; g.uint16_ty; g.uint32_ty; g.uint64_ty;g.nativeint_ty;g.unativeint_ty; ] g.int_ty - - -let flexible_float_format_typar g m = - flexible_format_typar g m [ g.float_ty; g.float32_ty; g.decimal_ty ] g.float_ty - -let is_digit c = ('0' <= c && c <= '9') - -type info = - { mutable leftJustify : bool; - mutable numPrefixIfPos : char option; - mutable addZeros : bool; - mutable precision : bool} - -let newInfo ()= - { leftJustify = false; - numPrefixIfPos = None; - addZeros = false; - precision = false} - -let ParseFormatString m g fmt bty cty dty = - let len = String.length fmt - - let rec go acc i = - if i >= len then - let argtys = - if acc |> List.forall (fun (p, _) -> p = None) then // without positional specifiers - acc |> List.map snd |> List.rev - //elif acc |> List.exists (fun (p, _) -> p = None) then - // failwith "You must use positional specifiers for all arguments" - else // with positional specifiers - failwith "Positional specifiers are not permitted in format strings"; -// let acc = acc |> List.map (fun (p, t) -> Option.get p, t) -// let nbArgs : int = acc |> List.max_by fst |> fst -// let arr = Array.create nbArgs None -// acc |> List.iter (fun (i,t) -> -// match arr.[i-1] with -// | None -> arr.[i-1] <- Some t -// | Some ty -> if ty <> t then failwithf "Incompatible types for argument %d" i); -// arr |> Array.map (function None -> new_inference_typ () | Some t -> t) -// |> Array.to_list - - let aty = List.foldBack (-->) argtys dty - let ety = mk_tupled_ty g argtys - aty,ety - elif System.Char.IsSurrogatePair(fmt,i) then - go acc (i+2) - else - let c = fmt.[i] - match c with - | '%' -> - let i = i+1 - if i >= len then failwith "missing format specifier"; - let info = newInfo() - - let rec flags i = - if i >= len then failwith "missing format specifier"; - match fmt.[i] with - | '-' -> - if info.leftJustify then failwith "'-' flag set twice"; - info.leftJustify <- true; - flags(i+1) - | '+' -> - if info.numPrefixIfPos <> None then failwith "prefix flag (' ' or '+') set twice"; - info.numPrefixIfPos <- Some '+'; - flags(i+1) - | '0' -> - if info.addZeros then failwith "'0' flag set twice"; - info.addZeros <- true; - flags(i+1) - | ' ' -> - if info.numPrefixIfPos <> None then failwith "prefix flag (' ' or '+') set twice"; - info.numPrefixIfPos <- Some ' '; - flags(i+1) - | '#' -> failwith "The # formatting modifier is invalid in F#."; - | _ -> i - - let rec digits_precision i = - if i >= len then failwith "bad precision in format specifier"; - match fmt.[i] with - | c when is_digit c -> digits_precision (i+1) - | _ -> i - - let precision i = - if i >= len then failwith "bad width in format specifier"; - match fmt.[i] with - | c when is_digit c -> info.precision <- true; false,digits_precision (i+1) - | '*' -> info.precision <- true; true,(i+1) - | _ -> failwith "precision missing after the '.'" - - let optional_dot_and_precision i = - if i >= len then failwith "bad width in format specifier"; - match fmt.[i] with - | '.' -> precision (i+1) - | _ -> false,i - - let rec digits_width_and_precision i = - if i >= len then failwith "bad width in format specifier"; - match fmt.[i] with - | c when is_digit c -> digits_width_and_precision (i+1) - | _ -> optional_dot_and_precision i - - let width_and_precision i = - if i >= len then failwith "bad width in format specifier"; - match fmt.[i] with - | c when is_digit c -> false,digits_width_and_precision i - | '*' -> true,optional_dot_and_precision (i+1) - | _ -> false,optional_dot_and_precision i - - let rec digits_position n i = - if i >= len then failwith "bad width in format specifier"; - match fmt.[i] with - | c when is_digit c -> digits_position (n*10 + int c - int '0') (i+1) - | '$' -> Some n, i+1 - | _ -> None, i - - let position i = - match fmt.[i] with - | c when c >= '1' && c <= '9' -> - let p, i' = digits_position (int c - int '0') (i+1) - if p = None then None, i else p, i' - | _ -> None, i - - let posi, i = position i - - let i = flags i - - let widthArg,(precisionArg,i) = width_and_precision i - - if i >= len then failwith "bad precision in format specifier"; - - let acc = if precisionArg then (Option.map ((+)1) posi, g.int_ty) :: acc else acc - - let acc = if widthArg then (Option.map ((+)1) posi, g.int_ty) :: acc else acc - - let checkNoPrecision c = if info.precision then failwithf "'%c' format does not support precision" c - let checkNoZeroFlag c = if info.addZeros then failwithf "'%c' format does not support '0' flag" c - let checkNoNumericPrefix c = if info.numPrefixIfPos <> None then - failwithf "'%c' does not support prefix '%c' flag" c (Option.get info.numPrefixIfPos) - - let checkOtherFlags c = - checkNoPrecision c; - checkNoZeroFlag c; - checkNoNumericPrefix c - - let ch = fmt.[i] - match ch with - | '%' -> go acc (i+1) - - | ('d' | 'i' | 'o' | 'u' | 'x' | 'X') -> - if info.precision then failwithf "'%c' format does not support precision" ch; - go ((posi, flexible_int_format_typar g m) :: acc) (i+1) - - | ('l' | 'L' as c) -> - if info.precision then failwithf "'%c' format does not support precision" ch; - let i = i+1 - if i >= len then failwith "bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. These format specifiers support code cross-compiled with OCaml. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types" - // Always warn for %l and %Lx - warning(OCamlCompatibility("The 'l' or 'L' in this format specifier is unnecessary except in code cross-compiled with OCaml. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types",m)) - match fmt.[i] with - | ('d' | 'i' | 'o' | 'u' | 'x' | 'X') -> - go ((posi, flexible_int_format_typar g m) :: acc) (i+1) - | _ -> failwith "bad format specifier (after l or L). Expected ld,li,lo,lu,lx or lX. These format specifiers support code cross-compiled with OCaml. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types" - - | ('h' | 'H' as c) -> - failwith "The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types" - - | 'M' -> - go ((posi, g.decimal_ty) :: acc) (i+1) - - | 'n' -> - failwith "%n format patterns are deprecated. You can use %d instead, which is overloaded to work with all basic integer types" - - | 'U' -> - failwith "%U format patterns are deprecated. You can use %u instead, which is overloaded to work with all basic integer types" - - | ('f' | 'F' | 'e' | 'E' | 'g' | 'G') -> - go ((posi, flexible_float_format_typar g m) :: acc) (i+1) - - | 'b' -> - checkOtherFlags ch; - go ((posi, g.bool_ty) :: acc) (i+1) - - | 'c' -> - checkOtherFlags ch; - go ((posi, g.char_ty) :: acc) (i+1) - - | 's' -> - checkOtherFlags ch; - go ((posi, g.string_ty) :: acc) (i+1) - - | 'O' -> - checkOtherFlags ch; - go ((posi, new_inference_typ ()) :: acc) (i+1) - - | 'A' -> - match info.numPrefixIfPos with - | None // %A has BindingFlags=Public, %+A has BindingFlags=Public | NonPublic - | Some '+' -> go ((posi, new_inference_typ ()) :: acc) (i+1) - | Some _ -> failwithf "'%c' does not support prefix '%c' flag" ch (Option.get info.numPrefixIfPos) - - | 'a' -> - checkOtherFlags ch; - let xty = new_inference_typ () - let fty = bty --> (xty --> cty) - go ((Option.map ((+)1) posi, xty) :: (posi, fty) :: acc) (i+1) - - | 't' -> - checkOtherFlags ch; - go ((posi, bty --> cty) :: acc) (i+1) - - | c -> failwith ("bad format specifier: '%"^(String.make 1 c)^"'") - - | _ -> go acc (i+1) - go [] 0 - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/formats.mli b/tools/FSharp_1.9.6.16/source/fsharp/formats.mli deleted file mode 100644 index 871bf7b7..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/formats.mli +++ /dev/null @@ -1,14 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -/// Parse "printf-style" format specifiers at compile time, producing -/// a list of items that specify the types of the things that follow. -/// -/// Must be updated if the Printf runtime component is updated. - -module internal Microsoft.FSharp.Compiler.Formats - -open Internal.Utilities -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL.Internal - -val ParseFormatString : Range.range -> Env.TcGlobals -> string -> Tast.typ -> Tast.typ -> Tast.typ -> Tast.typ * Tast.typ diff --git a/tools/FSharp_1.9.6.16/source/fsharp/fs.pubkey b/tools/FSharp_1.9.6.16/source/fsharp/fs.pubkey deleted file mode 100644 index 1c49691a..00000000 Binary files a/tools/FSharp_1.9.6.16/source/fsharp/fs.pubkey and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/source/fsharp/fsc.ml b/tools/FSharp_1.9.6.16/source/fsharp/fsc.ml deleted file mode 100644 index 7ee59390..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/fsc.ml +++ /dev/null @@ -1,1787 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -// Driver for F# compiler. -// -// Roughly divides into: -// - Parsing -// - Flags -// - Importing IL assemblies -// - Compiling (including optimizing and managing ccu_thunks) -// - Linking (including ILX-IL transformation) - -#light - -module internal Microsoft.FSharp.Compiler.Driver - -open System.IO -open System.Collections.Generic -open Internal.Utilities -open Internal.Utilities.Pervasives -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -module Ilsupp = Microsoft.FSharp.Compiler.AbstractIL.Internal.Support -module Ilmorph = Microsoft.FSharp.Compiler.AbstractIL.Morphs -module Ilwrite = Microsoft.FSharp.Compiler.AbstractIL.BinaryWriter -module Ilprint = Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter - -open System.Runtime.CompilerServices -open System.IO -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.Ilxgen -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.TypeChecker -open Microsoft.FSharp.Compiler.Infos.AccessibilityLogic -open Microsoft.FSharp.Compiler.Infos.AttributeChecking -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Opt -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.Build -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Fscopts -open Microsoft.FSharp.Compiler.DiagnosticMessage - - -//---------------------------------------------------------------------------- -// Reporting - warnings, errors -//---------------------------------------------------------------------------- - -let exiter = QuitProcessExiter - -/// Create an error logger that counts and prints errors -let ErrorLoggerThatQuitsAfterMaxErrors (tcConfig:TcConfig) = - - let errors = ref 0 - - { new ErrorLogger with - member x.ErrorSink(err) = - if !errors >= tcConfig.maxErrors then - DoWithErrorColor true (fun () -> Printf.eprintfn "Exiting - too many errors") ; - exiter.Exit 1 - - DoWithErrorColor false (fun () -> - (writeViaBufferWithEnvironmentNewLines stderr (OutputErrorOrWarning (tcConfig.implicitIncludeDir,tcConfig.showFullPaths,tcConfig.flatErrors,tcConfig.errorStyle,false)) err; stderr.WriteLine())); - - incr errors - - match err with - | InternalError _ | Failure _ | Not_found -> - match tcConfig.simulateException with - | Some(_) -> () // Don't show an assert for simulateException case so that unittests can run without an assert dialog. - | None -> System.Diagnostics.Debug.Assert(false,sprintf "Bug seen in compiler: %s" (err.ToString())) - | _ -> - () - member x.WarnSink(err) = - DoWithErrorColor true (fun () -> - if (ReportWarningAsError tcConfig.globalWarnLevel tcConfig.specificWarnOff tcConfig.specificWarnAsError tcConfig.globalWarnAsError err) then - x.ErrorSink(err) - elif ReportWarning tcConfig.globalWarnLevel tcConfig.specificWarnOff err then - writeViaBufferWithEnvironmentNewLines stderr (OutputErrorOrWarning (tcConfig.implicitIncludeDir,tcConfig.showFullPaths,tcConfig.flatErrors,tcConfig.errorStyle,true)) err; - stderr.WriteLine()) - member x.ErrorCount = !errors } - -let ErrorLoggerInitial (tcConfigB:TcConfigBuilder) = ErrorLoggerThatQuitsAfterMaxErrors(TcConfig.Create(tcConfigB,validate=false)) - -//let ignoreAllFailures f = try f() with _ -> () - - - - -let BuildInitialDisplayEnvForDocGeneration (tcConfig:TcConfig,tcImports,tcGlobals) = - let denv = empty_denv tcGlobals - let denv = - { denv with - showImperativeTyparAnnotations=true; - showAttributes=true; - openTopPaths= - [ lib_MF_path ] @ - [ lib_MFCore_path ] @ - [ lib_MFColl_path ] @ - [ lib_MFControl_path ] @ - [ (IL.split_namespace lib_FSLib_Pervasives_name); ] @ - (if not tcConfig.compilingFslib then - [ (IL.split_namespace lib_MLLib_OCaml_name); - (IL.split_namespace lib_MLLib_FSharp_name); - (IL.split_namespace lib_MLLib_Pervasives_name); ] - else []) } - denv.Normalize() - - -module InterfaceFileWriter = - - let WriteInterfaceFile (tcGlobals,tcConfig:TcConfig,tcImports,generatedCcu,TAssembly(declaredImpls)) = - /// Use a UTF-8 Encoding with no Byte Order Mark - let os = - if tcConfig.printSignatureFile="" then System.Console.Out - else (File.CreateText tcConfig.printSignatureFile :> System.IO.TextWriter) - - if tcConfig.printSignatureFile <> "" then - Printf.fprintf os "#light\r\n\r\n" (* REVIEW: #light not need. and use fprintfn *) - - declaredImpls |> List.iter (fun (TImplFile(_,_,mexpr)) -> - let denv = BuildInitialDisplayEnvForDocGeneration(tcConfig,tcImports,tcGlobals) - writeViaBufferWithEnvironmentNewLines os (fun os s -> Printf.bprintf os "%s\n\n" s) - (NicePrint.InferredSigOfModuleExprL true denv mexpr |> Layout.squashTo 80 |> Layout.showL)) - - if tcConfig.printSignatureFile <> "" then os.Close() - - -module XmlDocWriter = - - let getDoc xmlDoc = - match ProcessXmlDoc xmlDoc with - | XmlDoc [| |] -> "" - | XmlDoc strs -> strs |> Array.to_list |> String.concat System.Environment.NewLine - - let writeXmlDoc (assemblyName,tcGlobals,generatedCcu:ccu,xmlfile) = - if not (Filename.hasSuffixCaseInsensitive "xml" xmlfile ) then - error(Error("the documentation file has no .xml suffix", Range.rangeStartup)); - (* the xmlDocSigOf* functions encode type into string to be used in "id" *) - let members = ref [] - let addMember id xmlDoc = - let doc = getDoc xmlDoc - members := (id,doc) :: !members - let g = tcGlobals - let do_val ptext (v:Val) = addMember (XmlDocSigOfVal g ptext v) v.XmlDoc - let do_tycon ptext (tc:Tycon) = - addMember (XmlDocSigOfTycon g ptext tc) tc.XmlDoc; - List.iter (deref_val >> do_val ptext) (adhoc_of_tycon tc) - - let modulMember path (m:ModuleOrNamespace) = addMember (XmlDocSigOfSubModul g path) m.XmlDoc - (* moduleSpec - recurses *) - let rec do_modul path (mspec:ModuleOrNamespace) = - let mtype = mspec.ModuleOrNamespaceType - let path = - (* skip the first item in the path which is the assembly name *) - match path with - | None -> Some "" - | Some "" -> Some (demangled_name_of_modul mspec) - | Some p -> Some (p^"."^demangled_name_of_modul mspec) - let ptext = match path with None -> "" | Some t -> t - if mspec.IsModule then modulMember ptext mspec; - let vals = - mtype.AllValuesAndMembers - |> NameMap.range - |> List.filter (fun x -> not x.IsCompilerGenerated) - |> List.filter (fun x -> x.MemberInfo.IsNone) - List.iter (do_modul path) mtype.ModuleAndNamespaceDefinitions; - List.iter (do_tycon ptext) mtype.ExceptionDefinitions; - List.iter (do_val ptext) vals; - List.iter (do_tycon ptext) mtype.TypeDefinitions - - do_modul None generatedCcu.Contents; - - use os = File.CreateText(xmlfile) - - Printf.twprintfn os (""); - Printf.twprintfn os (""); - Printf.twprintfn os ("%s") assemblyName; - Printf.twprintfn os (""); - !members |> List.iter (fun (id,doc) -> - Printf.twprintfn os "" id - Printf.twprintfn os "%s" doc - Printf.twprintfn os ""); - Printf.twprintfn os ""; - Printf.twprintfn os ""; - - - -module HtmlDocWriter = - - // bug://1813. - // The generated HTML docs contain these embedded URLs. - let urlForFSharp = "http://research.microsoft.com/fsharp/" - // These manual links should be links to reference copies of the library documentation directory (without the /-slash) - let urlForFSharpCoreManual = "http://research.microsoft.com/fsharp/manual/fslib" (* appended with "/Microsoft.FSharp.Collections.List.html" etc... *) - let urlForFSharpPowerPackManual = "http://research.microsoft.com/fsharp/manual/mllib" (* appended with "/Microsoft.FSharp.Collections.List.html" etc... *) - - let getDoc xmlDoc = - match ProcessXmlDoc xmlDoc with - | XmlDoc [| |] -> - "" - | XmlDoc strs -> - strs - |> Array.to_list - |> List.map (fun s -> s.Replace("","").Replace("","")) - |> String.concat "\n" - - let pseudo_case_insensitive a b = - let c1 = compare (String.lowercase a) (String.lowercase b) - if c1 <> 0 then c1 else - (* put upper case second - makes real definitions like 'Code' come after abbreviations 'code *) - -(compare a b) - - open Microsoft.FSharp.Compiler.Layout - let width_val = 80 - let width_type = 120 - let width_exn = 80 - - let rec split c str = - if String.contains str c then - let i = String.index str c - String.sub str 0 i :: split c (String.sub str (i+1) (String.length str - (i+1))) - else - [str] - - - /// String for layout squashed to a given width. - /// HTML translation and markup for TYPE and VAL syntax. - /// Assumes in

 context (since no explicit 
linebreaks). - let outputL width layout = - let baseR = htmlR stringR - let render = - { new render<_,_> with - member r.Start () = baseR.Start() - member r.AddText z s = baseR.AddText z s; (* REVIEW: escape HTML chars *) - member r.AddBreak z n = baseR.AddBreak z n - member r.Finish z = baseR.Finish z - member x.AddTag z (tag,attrs,start) = - match tag,start with - | "TYPE",_ -> z - | "VAL" ,true -> baseR.AddText z "" - | "VAL" ,false -> baseR.AddText z "" - | _ ,start -> baseR.AddTag z (tag,attrs,start)} - renderL render (squashTo width layout) - - type kind = PathK | TypeK of int (* int is typar arity *) - - let WriteHTMLDoc (tcConfig:TcConfig,tcImports,tcGlobals,generatedCcu:ccu,outdir,append,css,nsfile,assemVerFromAttrib) = - let assemblyName = generatedCcu.AssemblyName - let outdir = match outdir with None -> "." | Some x -> x - let rconcat a b = a^"/"^b - let css = match css with None -> "msdn.css" | Some x -> x - let nsfile = match nsfile with None -> "namespaces.html" | Some x -> x - let nsfullfile = Path.Combine(outdir,nsfile) - let nsbfilename = (rconcat ".." nsfile) in (* the name to use to link up to the namespace file *) - let wrap (oc:TextWriter) (a:string) (b:string) f = - oc.WriteLine a; - f (); - oc.WriteLine b - - let newExplicitFile append fullname bfilename title css f = - use oc = - if append && Internal.Utilities.FileSystem.File.SafeExists fullname then - System.IO.File.AppendText fullname - else - System.IO.File.CreateText fullname - - fprintfn oc "%s" title css; - let backlink = (bfilename,title) - f backlink oc; - let ver = - match assemVerFromAttrib with - | None -> tcConfig.version.GetVersionString(tcConfig.implicitIncludeDir) - | Some v -> IL.version_to_string v - fprintfn oc "

Documentation for assembly %s, version %s, generated using F# Programming Language version %s

" assemblyName ver urlForFSharp Ilxconfig.version; - fprintfn oc ""; - - let newFile fdir fname title f = - let fullname = Path.Combine(outdir,Path.Combine(fdir,fname)) - newExplicitFile false fullname fname title (rconcat ".." css) f - - let hlink url text = sprintf "%s" url text - - (* Path *) - let path0 = [] - let path1 x kind = [(x,kind)] - let pathExtend xs x kind = xs @ [x,kind] in (* short shallow lists *) - let pathText xs = String.concat "." (List.map fst xs) - let pathFilename xs = - let encode = function - | x,PathK -> x - | x,TypeK w -> - // Mangle to avoid colliding upper/lower names, 'complex' and 'Complex', to different filenames - // See also tastops.ml which prints type hrefs - "type_" ^ (String.underscoreLowercase x) ^ (if w=0 then "" else "-" ^ string_of_int w) - String.concat "." (List.map encode xs) ^ ".html" - - let collapseStrings xs = String.concat "." xs - let pathWrt knownNamespaces x = - let xs = split '.' x - let rec collapse front back = - match back with - | [] -> (if front = [] then [] else [collapseStrings front]) @ back - | mid::back -> - if List.mem (collapseStrings (front@[mid])) knownNamespaces - then [collapseStrings (front@[mid])] @ back - else collapse (front@[mid]) back - List.map (fun x -> (x,PathK)) (collapse [] xs) - - let nestBlock hFile f = - wrap hFile "
" "
" - (fun () -> f()) - - let nestItem hFile f = - wrap hFile "
" "
" - (fun () -> f()) - - (* TopNav - from paths *) - let newPathTrail hFile kind ptext = - let rec writer prior = function - | [] -> () - | [x,k] -> fprintf hFile "%s " x - | (x,k)::xks -> let prior = pathExtend prior x k - let url = pathFilename prior - let sep = if xks=[] then "" else "." - let item = hlink url x - fprintf hFile "%s%s" item sep; - writer prior xks - let uplink = sprintf "[Home] " nsbfilename - nestItem hFile (fun () -> - fprintf hFile "

%s%s " uplink kind; - writer path0 ptext; - fprintf hFile "

"; - fprintf hFile "
\n") - - let newPartitions hFile f = - nestItem hFile (fun () -> - wrap hFile "" "
" (fun () -> - f())) - - let newPartition hFile desc f = - wrap hFile (sprintf " %s" desc) (sprintf " ") (fun () -> - f()) - - let newSectionInPartition hFile title f = - wrap hFile (sprintf "

%s

" title) (sprintf "
") (fun () -> - f()) - - let newPartitionsWithSeeAlsoBacklink hFile (bfilename,btitle) f = - newPartitions hFile (fun () -> - f(); - newPartition hFile "" (fun () -> - newSectionInPartition hFile "See Also" (fun () -> - fprintf hFile "%s" bfilename btitle))) - - let newTable0 hFile title f = - newSectionInPartition hFile title (fun () -> - wrap hFile "" "
" (fun () -> - f())) - - let newTable2 hFile title width1 h1 h2 f = - newTable0 hFile title (fun () -> - wrap hFile (sprintf "%s%s" width1 h1 h2) "" (fun () -> - f())) - - let newNamespaceEntry hFile fdir ptext allmods tycons desc = - let fname = pathFilename ptext - let title = pathText ptext - let url = fdir ^ "/" ^ fname - fprintf hFile "%s\n" url title; - (* Sort sub-modules into alpha order *) - let allmods = - allmods - |> List.filter (fun (mspec:ModuleOrNamespace) -> mspec.IsModule) - |> List.sortWith (orderOn demangled_name_of_modul pseudo_case_insensitive) - (* Make them hyperlink to fdir/.html *) - let typeLinks = - tycons - |> List.map (fun (tycon:Tycon) -> - let ptext = pathExtend ptext tycon.DisplayName (TypeK tycon.TyparsNoRange.Length) - let url = fdir ^ "/" ^ pathFilename ptext - //hlink url (sprintf "[%s]" (tycon.DisplayNameWithUnderscoreTypars.Replace("<","<").Replace(">",">")))) - hlink url (sprintf "[%s]" tycon.DisplayName)) - |> String.concat ", " - let moduleLinks = - allmods - |> List.map (fun modul -> - let ptext = pathExtend ptext (demangled_name_of_modul modul) PathK - let url = fdir ^ "/" ^ pathFilename ptext - hlink url (sprintf "[%s]" (demangled_name_of_modul modul))) - |> String.concat ", " - fprintfn hFile "" ; - fprintfn hFile - "%s%s%s" - desc - (if nonNil tycons then sprintf "

Types: %s" typeLinks else "") - (if nonNil allmods then sprintf "

Modules: %s" moduleLinks else ""); - fprintfn hFile "" ; - () - - let newEntry hFile0 title desc = - fprintfn hFile0 "%s%s" title desc - - let denv = BuildInitialDisplayEnvForDocGeneration(tcConfig,tcImports,tcGlobals) - let denv = - { denv with - html = true; - showObsoleteMembers=false; - suppressInlineKeyword=true; - shortConstraints=true; - showOverrides=false; - showConstraintTyparAnnotations=false; - showImperativeTyparAnnotations=false; - - htmlAssemMap = - NameMap.of_list - (let fslib_default = [(GetFSharpCoreLibraryName() ,urlForFSharpCoreManual);] - let mllib_default = [(GetFSharpPowerPackLibraryName(),urlForFSharpPowerPackManual);] - if tcConfig.compilingFslib || tcConfig.htmlDocLocalLinks - then [] - else (fslib_default @ mllib_default)); } - - newExplicitFile append nsfullfile nsbfilename "Namespaces" css (fun blinkNamespacesFile hNamespacesFile -> - - wrap hNamespacesFile (sprintf "

" assemblyName) - ( "
Namespaces in assembly %sDescription
") (fun () -> - - let obsoleteText attribs = - match (TryFindAttrib tcGlobals tcGlobals.attrib_SystemObsolete attribs) with - | Some(Attrib(_,_,(AttribStringArg(msg) :: _),_,_)) -> - sprintf "

Note: %s

" msg - | _ -> "" - let isObsolete attribs = - HasAttrib tcGlobals tcGlobals.attrib_SystemObsolete attribs - - let IsUnseenVal (v:Val) = - not (IsValAccessible Infos.AccessibleFromEverywhere (mk_local_vref v)) || - v.IsCompilerGenerated || - isObsolete v.Attribs - - let IsUnseenEntity (e:Entity) = - not (IsEntityAccessible Infos.AccessibleFromEverywhere (mk_local_tcref e)) || - isObsolete e.Attribs - - let rec do_val denv fdir hFile ptext (v:Val) = - let denv = { denv with htmlHideRedundantKeywords=true } - newEntry hFile ("
"^outputL width_val (NicePrint.valL denv v)^"
") (obsoleteText v.Attribs^getDoc v.XmlDoc) - - let rec do_vals denv fdir hFile ptext title item (vals:Val list) = - let vals = vals |> List.filter (fun v -> not v.IsCompilerGenerated) - let vals = vals |> List.sortWith (orderOn (fun v -> v.DisplayName) pseudo_case_insensitive) - if nonNil vals then - newTable2 hFile title 60 item "Description" (fun () -> - vals |> List.iter (do_val denv fdir hFile ptext)) - - let rec do_tycon denv fdir hFile ptext (tycon:Tycon) = - newSectionInPartition hFile "Full Type Signature" (fun () -> - fprintf hFile "
%s
" (outputL width_type (NicePrint.tyconL denv (match tycon.TypeOrMeasureKind with KindMeasure -> wordL "[] type" | KindType -> wordL "type") tycon))); - let vals = adhoc_of_tycon tycon |> List.map deref_val - let val_is_instance (v:Val) = - assert v.IsMember; - (the (v.MemberInfo)).MemberFlags.MemberIsInstance - let _,vals = vals |> List.partition IsUnseenVal - let ivals,svals = List.partition val_is_instance vals - do_vals denv fdir hFile ptext "Instance Members" "Member" ivals; - do_vals denv fdir hFile ptext "Static Members" "Member" svals; - //do_vals denv fdir hFile ptext "Deprecated Members" "Member" dvals; - - let rec do_tycons denv fdir blinkFile hFile ptext title (tycons:Tycon list) = - if tycons <> [] then - newTable2 hFile title 30 "Type" "Description" (fun () -> - let tycons = tycons |> List.sortWith (orderOn (fun tc -> tc.DisplayName) pseudo_case_insensitive) - tycons |> List.iter (fun tycon -> - let tyname = tycon.DisplayName - let ptext = pathExtend ptext tyname (TypeK tycon.TyparsNoRange.Length) - let fname = pathFilename ptext - let title = pathText ptext in (* used as html page title *) - let text = obsoleteText tycon.Attribs - let text = text^(getDoc tycon.XmlDoc) - let text = - match tycon.TypeAbbrev with - | None -> text - | Some ty -> text ^ " Note: an abbreviation for "^(""^outputL width_type (NicePrint.typeL denv ty)^"") - newEntry hFile ("type " ^ hlink fname tyname) text; - newFile fdir fname title (fun blinkFile2 hFile2 -> - nestBlock hFile2 (fun () -> - newPathTrail hFile2 "Type" ptext; - newPartitionsWithSeeAlsoBacklink hFile2 blinkFile (fun () -> - newPartition hFile2 text (fun () -> - do_tycon denv fdir hFile2 ptext tycon)))))) - - let rec do_exnc denv fdir hFile ptext exnc = - newSectionInPartition hFile "Full Signature" (fun () -> - fprintf hFile "
%s
" (outputL width_exn (NicePrint.exnDefnL denv exnc))) - - let rec do_exncs denv fdir blinkFile hFile ptext (exncs:Tycon list) = - if nonNil exncs then - newTable2 hFile "Exceptions" 40 "Exception" "Description" (fun () -> - let exncs = exncs |> List.sortWith (orderOn (fun exnc -> exnc.DemangledExceptionName) pseudo_case_insensitive) - exncs |> List.iter (fun exnc -> - let ptext = pathExtend ptext exnc.DemangledExceptionName (TypeK exnc.TyparsNoRange.Length) - let fname = pathFilename ptext - let exname = exnc.DemangledExceptionName - let title = pathText ptext in (* used as html page title *) - let text = obsoleteText exnc.Attribs - let text = text^(getDoc exnc.XmlDoc) - let text = - match exnc.ExceptionInfo with - | TExnAbbrevRepr ecref as r -> text^" Note: an abbreviation for "^(""^outputL width_exn (NicePrint.exnDefnReprL denv r)^"") - | _ -> text - newEntry hFile ("exception " ^ hlink fname exname) text; - newFile fdir fname title (fun blinkFile2 hFile2 -> - nestBlock hFile2 (fun () -> - newPathTrail hFile2 "Exception" ptext; - newPartitionsWithSeeAlsoBacklink hFile2 blinkFile (fun () -> - newPartition hFile2 text (fun () -> - do_exnc denv fdir hFile2 ptext exnc)))))) - - let rec do_modul denv fdir ptext blinkFile hFile modul = - let denv = denv_add_open_modref (mk_local_modref modul) denv - let mtyp = modul.ModuleOrNamespaceType - - let moduls = - mtyp.ModuleAndNamespaceDefinitions - |> List.sortWith (orderOn demangled_name_of_modul pseudo_case_insensitive) - |> List.filter (IsUnseenEntity >> not) - let tycons= mtyp.TypeDefinitions |> List.filter (IsUnseenEntity >> not) - let vals = - mtyp.AllValuesAndMembers - |> NameMap.range - |> List.filter (fun x -> not x.IsMember) - |> List.filter (IsUnseenVal >> not) - - let extvals = - mtyp.AllValuesAndMembers - |> NameMap.range - |> List.filter (fun x -> x.IsExtensionMember) - |> List.filter (IsUnseenVal >> not) - - let apvals,vals = - vals - |> List.partition (mk_local_vref >> apinfo_of_vref >> isSome) - - do_moduls denv fdir blinkFile hFile ptext moduls; - do_tycons denv fdir blinkFile hFile ptext "Type Definitions" tycons; - do_exncs denv fdir blinkFile hFile ptext mtyp.ExceptionDefinitions; - do_vals denv fdir hFile ptext "Values" "Value" vals; - do_vals denv fdir hFile ptext "Active Patterns" "Active Pattern" apvals; - do_vals denv fdir hFile ptext "Extension Members" "Extension Member" extvals; - //do_tycons denv fdir blinkFile hFile ptext "Deprecated/Unsafe Type Definitions" dtycons; - //do_vals denv fdir hFile ptext "Deprecated Values" "Value" dvals - - and do_moduls denv fdir blinkFile hFile ptext moduls = - if moduls <> [] then - newTable2 hFile (sprintf "Modules (as contributed by assembly '%s')" assemblyName) 30 "Module" "Description" (fun () -> - let moduls = moduls |> List.sortWith (orderOn demangled_name_of_modul pseudo_case_insensitive) - moduls |> List.iter (fun modul -> - let mtyp = modul.ModuleOrNamespaceType - let ptext = pathExtend ptext (demangled_name_of_modul modul) PathK - let fname = pathFilename ptext - let title = pathText ptext - let text = obsoleteText modul.Attribs - let text = getDoc modul.XmlDoc - newEntry hFile (hlink fname title) text; - newFile fdir fname title (fun blinkFile2 hFile2 -> - nestBlock hFile2 (fun () -> - newPathTrail hFile2 "Module" ptext; - newPartitionsWithSeeAlsoBacklink hFile2 blinkFile (fun () -> - newPartition hFile2 text (fun () -> - do_modul denv fdir ptext blinkFile2 hFile2 modul)))))) - - let rec do_namespace denv fdir ptext blinkFile hFile moduls tycons exncs = - do_moduls denv fdir blinkFile hFile ptext moduls; - let _,tycons= List.partition IsUnseenEntity tycons - do_tycons denv fdir blinkFile hFile ptext "Type Definitions" tycons; - do_exncs denv fdir blinkFile hFile ptext exncs; - //do_tycons denv fdir blinkFile hFile ptext "Deprecated/Unsafe Type Definitions" dtycons - - let rec do_possible_namespace fdir path knownNamespaces (mspec:ModuleOrNamespace) = - let mtype = mspec.ModuleOrNamespaceType - let path = - /// skip the first item in the path which is the assembly name - match path with - | None -> Some "" - | Some "" -> Some (demangled_name_of_modul mspec) - | Some p -> Some (p^"."^demangled_name_of_modul mspec) - let ptext = - match path with - | None -> path0 - | Some t -> pathWrt knownNamespaces t - let allmods = mtype.ModuleAndNamespaceDefinitions - |> List.sortWith (orderOn demangled_name_of_modul pseudo_case_insensitive) - let allmods = allmods |> List.filter (IsUnseenEntity >> not) - let moduls,nsps = allmods |> List.partition (fun m -> m.IsModule) - let exncs = mtype.ExceptionDefinitions - let tycons = mtype.TypeDefinitions - let exncs = exncs |> List.filter (IsUnseenEntity >> not) - let tycons = tycons |> List.filter (IsUnseenEntity >> not) - - // In FSharp.Core.dll filter out the attributes - let tycons = - if tcGlobals.compilingFslib then - tycons |> List.filter (fun tycon -> - not (tycon.DisplayName = "PrintfFormat") && - not (tycon.DisplayName = "Format") && - not (tycon.DisplayName = "Unit") && - not (tycon.DisplayName = "TypeFunc") && - not (tycon.DisplayName = "FastFunc") && - not (tycon.DisplayName.StartsWith("Tuple",System.StringComparison.Ordinal)) && - not (tycon.DisplayName.StartsWith("Choice",System.StringComparison.Ordinal)) && - not (tycon.DisplayName.Contains "[") && - not (tycon.DisplayName.EndsWith("Flags",System.StringComparison.Ordinal)) && - not (tycon.DisplayName.EndsWith("Attribute",System.StringComparison.Ordinal))) - else - tycons - - // In FSharp.Core.dll filter out the attributes - let moduls = - if tcGlobals.compilingFslib then - moduls |> List.filter (fun modul -> - not (modul.DisplayName = "OptimizedClosures")) - else - moduls - - let knownNamespaces = - if mspec.IsNamespace && (nonNil moduls or nonNil tycons or nonNil exncs) then - let fname = pathFilename ptext - let title = pathText ptext - newNamespaceEntry hNamespacesFile fdir ptext allmods tycons (getDoc mspec.XmlDoc); - newFile fdir fname title (fun blinkFile2 hFile2 -> - nestBlock hFile2 (fun () -> - newPathTrail hFile2 "Namespace" ptext; - newPartitionsWithSeeAlsoBacklink hFile2 blinkNamespacesFile (fun () -> - newPartition hFile2 "" (fun () -> - do_namespace denv fdir ptext blinkFile2 hFile2 moduls tycons exncs)))); - title :: knownNamespaces - else - knownNamespaces - - List.iter (do_possible_namespace fdir path knownNamespaces) nsps; - - do_possible_namespace assemblyName None [] generatedCcu.Contents)) - -(*---------------------------------------------------------------------------- -!* cmd line - option state - *--------------------------------------------------------------------------*) - -let getModuleFileName() = - System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, - System.AppDomain.CurrentDomain.FriendlyName) - -let defaultFSharpBinariesDir = Filename.dirname (getModuleFileName()) - - -let outpath outfile extn = - String.concat "." (["out"; Filename.chop_extension (Path.GetFileName outfile); extn]) - - - -let TypeCheck (tcConfig,tcImports,tcGlobals,errorLogger:ErrorLogger,assemblyName,niceNameGen,tcEnv0,inputs) = - try - if isNil inputs then error(Error("no implementation files specified",Range.rangeStartup)); - let ccuName = assemblyName - let tcInitialState = TypecheckInitialState (rangeStartup,ccuName,tcConfig,tcGlobals,niceNameGen,tcEnv0) - TypecheckClosedInputSet ((fun () -> errorLogger.ErrorCount = 0),tcConfig,tcImports,tcGlobals,None,tcInitialState,inputs) - with e -> - errorRecovery e rangeStartup; - exiter.Exit 1 - - - -let GenerateInterfaceData(tcConfig:TcConfig) = - (* (tcConfig.target = Dll or tcConfig.target = Module) && *) - not tcConfig.standalone && not tcConfig.noSignatureData - -let EncodeInterfaceData(tcConfig:TcConfig,tcGlobals,errorLogger:ErrorLogger,exportRemapping,generatedCcu,outfile) = - try - if GenerateInterfaceData(tcConfig) then - if verbose then dprintfn "Generating interface data attribute..."; - let resource = WriteSignatureData (tcConfig,tcGlobals,exportRemapping,generatedCcu,outfile) - if verbose then dprintf "Generated interface data attribute!\n"; - [mk_SignatureDataVersionAttr tcGlobals (IL.parse_version Ilxconfig.version) ], [resource] - else - [],[] - with e -> - errorRecoveryNoRange e; - exiter.Exit 1 - - -(*---------------------------------------------------------------------------- -!* EncodeOptimizationData - *--------------------------------------------------------------------------*) - -let GenerateOptimizationData(tcConfig) = - (* (tcConfig.target =Dll or tcConfig.target = Module) && *) - GenerateInterfaceData(tcConfig) - -let EncodeOptimizationData(tcGlobals,tcConfig,outfile,exportRemapping,data) = - if GenerateOptimizationData(tcConfig) then - let data = map2'2 (Opt.RemapLazyModulInfo tcGlobals exportRemapping) data - if verbose then dprintn "Generating optimization data attribute..."; - if tcConfig.useOptimizationDataFile then - let ccu,modulInfo = data - let bytes = Pickle.pickle_obj_with_dangling_ccus outfile tcGlobals ccu Opt.p_lazy_modul_info modulInfo - let optDataFileName = (Filename.chop_extension outfile)^".optdata" - System.IO.File.WriteAllBytes(optDataFileName,bytes); - let data = - if tcConfig.onlyEssentialOptimizationData || tcConfig.useOptimizationDataFile - then map2'2 Opt.AbstractLazyModulInfoToEssentials data - else data - [ WriteOptData tcGlobals outfile data ] - else - [ ] - -//---------------------------------------------------------------------------- -// .res file format, for encoding the assembly version attribute. -//-------------------------------------------------------------------------- - -// Helpers for generating binary blobs -module BinaryGenerationUtilities = - // Little-endian encoding of int32 - let b0 n = byte (n &&& 0xFF) - let b1 n = byte ((n >>> 8) &&& 0xFF) - let b2 n = byte ((n >>> 16) &&& 0xFF) - let b3 n = byte ((n >>> 24) &&& 0xFF) - - let i16 (i:int32) = [| b0 i; b1 i |] - let i32 (i:int32) = [| b0 i; b1 i; b2 i; b3 i |] - - // Emit the bytes and pad to a 32-bit alignment - let Padded initialAlignment (v:byte[]) = - [| yield! v - for i in 1..(4 - (initialAlignment + v.Length) % 4) % 4 do - yield 0x0uy |] - -// Generate nodes in a .res file format. These are then linked by Abstract IL using the -// linkNativeResources function, which invokes the cvtres.exe utility -module ResFileFormat = - open BinaryGenerationUtilities - - let ResFileNode(dwTypeID,dwNameID,wMemFlags,wLangID,data:byte[]) = - [| yield! i32 data.Length // DWORD ResHdr.dwDataSize - yield! i32 0x00000020 // dwHeaderSize - yield! i32 ((dwTypeID <<< 16) ||| 0x0000FFFF) // dwTypeID,sizeof(DWORD) - yield! i32 ((dwNameID <<< 16) ||| 0x0000FFFF) // dwNameID,sizeof(DWORD) - yield! i32 0x00000000 // DWORD dwDataVersion - yield! i16 wMemFlags // WORD wMemFlags - yield! i16 wLangID // WORD wLangID - yield! i32 0x00000000 // DWORD dwVersion - yield! i32 0x00000000 // DWORD dwCharacteristics - yield! Padded 0 data |] - - let ResFileHeader() = ResFileNode(0x0,0x0,0x0,0x0,[| |]) - -// Generate the VS_VERSION_INFO structure held in a Win32 Version Resource in a PE file -// -// Web reference: http://www.piclist.com/tecHREF/os/win/api/win32/struc/src/str24_5.htm -module VersionResourceFormat = - open BinaryGenerationUtilities - - let VersionInfoNode(data:byte[]) = - [| yield! i16 (data.Length + 2) // wLength : int16; // Specifies the length, in bytes, of the VS_VERSION_INFO structure. This length does not include any padding that aligns any subsequent version resource data on a 32-bit boundary. - yield! data |] - - let VersionInfoElement(wType, szKey, valueOpt: byte[] option, children:byte[][], isString) = - // for String structs, wValueLength represents the word count, not the byte count - let wValueLength = (match valueOpt with None -> 0 | Some value -> (if isString then value.Length / 2 else value.Length)) - VersionInfoNode - [| yield! i16 wValueLength // wValueLength: int16. Specifies the length, in words, of the Value member. This value is zero if there is no Value member associated with the current version structure. - yield! i16 wType // wType : int16; Specifies the type of data in the version resource. This member is 1 if the version resource contains text data and 0 if the version resource contains binary data. - yield! Padded 2 szKey - match valueOpt with - | None -> yield! [] - | Some value -> yield! Padded 0 value - for child in children do - yield! child |] - - let Version((v1,v2,v3,v4):ILVersionInfo) = - [| yield! i32 (int32 v1 <<< 16 ||| int32 v2) // DWORD dwFileVersionMS; // Specifies the most significant 32 bits of the file's binary version number. This member is used with dwFileVersionLS to form a 64-bit value used for numeric comparisons. - yield! i32 (int32 v3 <<< 16 ||| int32 v4) // DWORD dwFileVersionLS; // Specifies the least significant 32 bits of the file's binary version number. This member is used with dwFileVersionMS to form a 64-bit value used for numeric comparisons. - |] - - let String(string,value) = - let wType = 0x1 // Specifies the type of data in the version resource. This member is 1 if the version resource contains text data and 0 if the version resource contains binary data. - let szKey = Bytes.string_as_unicode_bytes_null_terminated string - VersionInfoElement(wType, szKey, Some(Bytes.string_as_unicode_bytes_null_terminated value),[| |],true) - - let StringTable(language,strings) = - let wType = 0x1 // Specifies the type of data in the version resource. This member is 1 if the version resource contains text data and 0 if the version resource contains binary data. - let szKey = Bytes.string_as_unicode_bytes_null_terminated language - // Specifies an 8-digit hexadecimal number stored as a Unicode string. The four most significant digits represent the language identifier. The four least significant digits represent the code page for which the data is formatted. - // Each Microsoft Standard Language identifier contains two parts: the low-order 10 bits specify the major language, and the high-order 6 bits specify the sublanguage. For a table of valid identifiers see Language Identifiers. - - let children = - [| for string in strings do - yield String(string) |] - VersionInfoElement(wType, szKey, None,children,false) - - let StringFileInfo(stringTables: #seq >) = - let wType = 0x1 // Specifies the type of data in the version resource. This member is 1 if the version resource contains text data and 0 if the version resource contains binary data. - let szKey = Bytes.string_as_unicode_bytes_null_terminated "StringFileInfo" // Contains the Unicode string StringFileInfo - // Contains an array of one or more StringTable structures. Each StringTable structures szKey member indicates the appropriate language and code page for displaying the text in that StringTable structure. - let children = - [| for stringTable in stringTables do - yield StringTable(stringTable) |] - VersionInfoElement(wType, szKey, None,children,false) - - let VarFileInfo(vars: #seq) = - let wType = 0x1 // Specifies the type of data in the version resource. This member is 1 if the version resource contains text data and 0 if the version resource contains binary data. - let szKey = Bytes.string_as_unicode_bytes_null_terminated "VarFileInfo" // Contains the Unicode string StringFileInfo - // Contains an array of one or more StringTable structures. Each StringTable structures szKey member indicates the appropriate language and code page for displaying the text in that StringTable structure. - let children = - [| for (lang,codePage) in vars do - let szKey = Bytes.string_as_unicode_bytes_null_terminated "Translation" - yield VersionInfoElement(0x0,szKey, Some([| yield! i16 lang - yield! i16 codePage |]), [| |],false) |] - VersionInfoElement(wType, szKey, None,children,false) - - let VS_FIXEDFILEINFO(fileVersion:ILVersionInfo, - productVersion:ILVersionInfo, - dwFileFlagsMask, - dwFileFlags,dwFileOS, - dwFileType,dwFileSubtype, - lwFileDate:int64) = - let dwStrucVersion = 0x00010000 - [| yield! i32 0xFEEF04BD // DWORD dwSignature; // Contains the value 0xFEEFO4BD. This is used with the szKey member of the VS_VERSION_INFO structure when searching a file for the VS_FIXEDFILEINFO structure. - yield! i32 dwStrucVersion // DWORD dwStrucVersion; // Specifies the binary version number of this structure. The high-order word of this member contains the major version number, and the low-order word contains the minor version number. - yield! Version fileVersion // DWORD dwFileVersionMS,dwFileVersionLS; // Specifies the most/least significant 32 bits of the file's binary version number. This member is used with dwFileVersionLS to form a 64-bit value used for numeric comparisons. - yield! Version productVersion // DWORD dwProductVersionMS,dwProductVersionLS; // Specifies the most/least significant 32 bits of the file's binary version number. This member is used with dwFileVersionLS to form a 64-bit value used for numeric comparisons. - yield! i32 dwFileFlagsMask // DWORD dwFileFlagsMask; // Contains a bitmask that specifies the valid bits in dwFileFlags. A bit is valid only if it was defined when the file was created. - yield! i32 dwFileFlags // DWORD dwFileFlags; // Contains a bitmask that specifies the Boolean attributes of the file. This member can include one or more of the following values: - // VS_FF_DEBUG 0x1L The file contains debugging information or is compiled with debugging features enabled. - // VS_FF_INFOINFERRED The file's version structure was created dynamically; therefore, some of the members in this structure may be empty or incorrect. This flag should never be set in a file's VS_VERSION_INFO data. - // VS_FF_PATCHED The file has been modified and is not identical to the original shipping file of the same version number. - // VS_FF_PRERELEASE The file is a development version, not a commercially released product. - // VS_FF_PRIVATEBUILD The file was not built using standard release procedures. If this flag is set, the StringFileInfo structure should contain a PrivateBuild entry. - // VS_FF_SPECIALBUILD The file was built by the original company using standard release procedures but is a variation of the normal file of the same version number. If this flag is set, the StringFileInfo structure should contain a SpecialBuild entry. - yield! i32 dwFileOS //Specifies the operating system for which this file was designed. This member can be one of the following values: Flag - //VOS_DOS 0x0001L The file was designed for MS-DOS. - //VOS_NT 0x0004L The file was designed for Windows NT. - //VOS__WINDOWS16 The file was designed for 16-bit Windows. - //VOS__WINDOWS32 The file was designed for the Win32 API. - //VOS_OS216 0x00020000L The file was designed for 16-bit OS/2. - //VOS_OS232 0x00030000L The file was designed for 32-bit OS/2. - //VOS__PM16 The file was designed for 16-bit Presentation Manager. - //VOS__PM32 The file was designed for 32-bit Presentation Manager. - //VOS_UNKNOWN The operating system for which the file was designed is unknown to Windows. - yield! i32 dwFileType // Specifies the general type of file. This member can be one of the following values: - - //VFT_UNKNOWN The file type is unknown to Windows. - //VFT_APP The file contains an application. - //VFT_DLL The file contains a dynamic-link library (DLL). - //VFT_DRV The file contains a device driver. If dwFileType is VFT_DRV, dwFileSubtype contains a more specific description of the driver. - //VFT_FONT The file contains a font. If dwFileType is VFT_FONT, dwFileSubtype contains a more specific description of the font file. - //VFT_VXD The file contains a virtual device. - //VFT_STATIC_LIB The file contains a static-link library. - - yield! i32 dwFileSubtype // Specifies the function of the file. The possible values depend on the value of dwFileType. For all values of dwFileType not described in the following list, dwFileSubtype is zero. If dwFileType is VFT_DRV, dwFileSubtype can be one of the following values: - //VFT2_UNKNOWN The driver type is unknown by Windows. - //VFT2_DRV_COMM The file contains a communications driver. - //VFT2_DRV_PRINTER The file contains a printer driver. - //VFT2_DRV_KEYBOARD The file contains a keyboard driver. - //VFT2_DRV_LANGUAGE The file contains a language driver. - //VFT2_DRV_DISPLAY The file contains a display driver. - //VFT2_DRV_MOUSE The file contains a mouse driver. - //VFT2_DRV_NETWORK The file contains a network driver. - //VFT2_DRV_SYSTEM The file contains a system driver. - //VFT2_DRV_INSTALLABLE The file contains an installable driver. - //VFT2_DRV_SOUND The file contains a sound driver. - // - //If dwFileType is VFT_FONT, dwFileSubtype can be one of the following values: - // - //VFT2_UNKNOWN The font type is unknown by Windows. - //VFT2_FONT_RASTER The file contains a raster font. - //VFT2_FONT_VECTOR The file contains a vector font. - //VFT2_FONT_TRUETYPE The file contains a TrueType font. - // - //If dwFileType is VFT_VXD, dwFileSubtype contains the virtual device identifier included in the virtual device control block. - yield! i32 (int32 (lwFileDate >>> 32)) // Specifies the most significant 32 bits of the file's 64-bit binary creation date and time stamp. - yield! i32 (int32 lwFileDate) //Specifies the least significant 32 bits of the file's 64-bit binary creation date and time stamp. - |] - - - let VS_VERSION_INFO(fixedFileInfo,stringFileInfo,varFileInfo) = - let wType = 0x0 - let szKey = Bytes.string_as_unicode_bytes_null_terminated "VS_VERSION_INFO" // Contains the Unicode string VS_VERSION_INFO - let value = VS_FIXEDFILEINFO (fixedFileInfo) - let children = - [| yield StringFileInfo(stringFileInfo) - yield VarFileInfo(varFileInfo) - |] - VersionInfoElement(wType, szKey, Some(value),children,false) - - let VS_VERSION_INFO_RESOURCE(data) = - let dwTypeID = 0x0010 - let dwNameID = 0x0001 - let wMemFlags = 0x0030 // REVIEW: HARDWIRED TO ENGLISH - let wLangID = 0x0409 // REVIEW: HARDWIRED TO ENGLISH - ResFileFormat.ResFileNode(dwTypeID, dwNameID,wMemFlags,wLangID,VS_VERSION_INFO(data)) - -module ManifestResourceFormat = - - let VS_MANIFEST_RESOURCE(data, isLibrary) = - let dwTypeID = 0x0018 - let dwNameID = if isLibrary then 0x2 else 0x1 - let wMemFlags = 0x0 - let wLangID = 0x0 - ResFileFormat.ResFileNode(dwTypeID, dwNameID, wMemFlags, wLangID, data) - -/// Helpers for finding attributes -module AttributeHelpers = - - /// Try to find an attribute that takes a string argument - let TryFindStringAttribute tcGlobals attrib attribs = - match TryFindAttrib tcGlobals (mk_mscorlib_attrib tcGlobals attrib) attribs with - | Some (Attrib(_,_,[ AttribStringArg(s) ],_,_)) -> Some (s) - | _ -> None - - let TryFindIntAttribute tcGlobals attrib attribs = - match TryFindAttrib tcGlobals (mk_mscorlib_attrib tcGlobals attrib) attribs with - | Some (Attrib(_,_,[ AttribInt32Arg(i) ],_,_)) -> Some (i) - | _ -> None - - let TryFindBoolAttribute tcGlobals attrib attribs = - match TryFindAttrib tcGlobals (mk_mscorlib_attrib tcGlobals attrib) attribs with - | Some (Attrib(_,_,[ AttribBoolArg(p) ],_,_)) -> Some (p) - | _ -> None - - // Try to find an AssemblyVersion attribute - let TryFindVersionAttribute tcGlobals attrib attribs = - match TryFindStringAttribute tcGlobals attrib attribs with - | Some versionString -> - try Some(IL.parse_version versionString) - with e -> - warning(Error(sprintf "The invalid version '%s' was specified in assembly attribute and has been ignored" versionString,Range.rangeStartup)); - None - | _ -> None - - - - -let AssemblyCultureErrorE = DeclareResourceString("AssemblyCultureError","") - -module MainModuleBuilder = - let CreateMainModule - (tcConfig:TcConfig,tcGlobals, - pdbfile,assemblyName,outfile,topAttrs, - (iattrs,intfDataResources),optDataResources, - codegenResults,assemVerFromAttrib) = - - - if !progress then dprintf "Creating main module...\n"; - let ilTypeDefs = - let topTypeDef = mk_toplevel_tdef tcGlobals.ilg (mk_mdefs [], mk_fdefs []) - mk_tdefs codegenResults.ilTypeDefs - - let mainModule = - let hashAlg = AttributeHelpers.TryFindIntAttribute tcGlobals "System.Reflection.AssemblyAlgorithmIdAttribute" topAttrs.assemblyAttrs - let locale = AttributeHelpers.TryFindStringAttribute tcGlobals "System.Reflection.AssemblyCultureAttribute" topAttrs.assemblyAttrs - let flags = match AttributeHelpers.TryFindIntAttribute tcGlobals "System.Reflection.AssemblyFlagsAttribute" topAttrs.assemblyAttrs with | Some(f) -> f | _ -> 0x0 - - // You're only allowed to set a locale if the assembly is a library - if locale <> None && tcConfig.target <> Dll then - error(Error(AssemblyCultureErrorE.Format,rangeCmdArgs)) - - mk_simple_mainmod assemblyName (fsharpModuleName tcConfig.target assemblyName) (tcConfig.target = Dll or tcConfig.target = Module) ilTypeDefs hashAlg locale flags - - let disableJitOptimizations = not (tcConfig.optSettings.jitOpt()) - let manifestAttrs = - mk_custom_attrs - [ if not tcConfig.internConstantStrings then - yield mk_custom_attribute tcGlobals.ilg - (mk_tref (tcGlobals.ilg.mscorlib_scoref, "System.Runtime.CompilerServices.CompilationRelaxationsAttribute"), - [tcGlobals.ilg.typ_Int32],[CustomElem_int32( 8)], []) - yield! iattrs - yield! codegenResults.ilAssemAttrs - if Option.isSome pdbfile then - yield (mk_DebuggableAttribute_v2 tcGlobals.ilg (tcConfig.jitTracking, tcConfig.ignoreSymbolStoreSequencePoints, disableJitOptimizations, false (* enableEnC *) )) ] - - let tcVersion = tcConfig.version.GetVersionInfo(tcConfig.implicitIncludeDir) - let manifest = - if tcConfig.target = Module then None else - let man = mainModule.ManifestOfAssembly - let ver = - match assemVerFromAttrib with - | None -> tcVersion - | Some v -> v - Some { man with manifestVersion= Some(ver); - manifestCustomAttrs = manifestAttrs; - manifestDisableJitOptimizations=disableJitOptimizations; - manifestJitTracking= tcConfig.jitTracking } - - let quotDataResources = - codegenResults.quotationResourceBytes |> List.map (fun bytes -> - { resourceName=Sreflect.pickledDefinitionsResourceNameBase^string(new_uniq()); - resourceWhere = Resource_local (fun () -> bytes); - resourceAccess= Resource_public; - resourceCustomAttrs = mk_custom_attrs [] }) - - let resources = - mk_resources - [ for file in tcConfig.embedResources do - let name,bytes,pub = - let lower = String.lowercase file - if List.exists (Filename.check_suffix lower) [".resx"] then - let file = tcConfig.ResolveSourceFile(rangeStartup,file) - let outfile = (file |> Filename.chop_extension) ^ ".resources" - - let readResX(f:string) = - use rsxr = new System.Resources.ResXResourceReader(f) - rsxr - |> Seq.cast - |> Seq.to_list - |> List.map (fun (d:System.Collections.DictionaryEntry) -> (d.Key :?> string), d.Value) - let writeResources((r:(string * obj) list),(f:string)) = - use writer = new System.Resources.ResourceWriter(f) - r |> List.iter (fun (k,v) -> writer.AddResource(k,v)) - writeResources(readResX(file),outfile); - let file,name,pub = TcConfigBuilder.SplitCommandLineResourceInfo outfile - let file = tcConfig.ResolveSourceFile(rangeStartup,file) - let bytes = System.IO.File.ReadAllBytes file - System.IO.File.Delete outfile; - name,bytes,pub - else - - let file,name,pub = TcConfigBuilder.SplitCommandLineResourceInfo file - let file = tcConfig.ResolveSourceFile(rangeStartup,file) - let bytes = System.IO.File.ReadAllBytes file - name,bytes,pub - yield { resourceName=name; - resourceWhere=Resource_local (fun () -> bytes); - resourceAccess=pub; - resourceCustomAttrs=mk_custom_attrs [] } - - yield! quotDataResources - yield! intfDataResources - yield! optDataResources - for ri in tcConfig.linkResources do - let file,name,pub = TcConfigBuilder.SplitCommandLineResourceInfo ri - yield { resourceName=name; - resourceWhere=Resource_file(ILModuleRef.Create(name=file, hasMetadata=false, hash=Some (sha1_hash_bytes (System.IO.File.ReadAllBytes file))), 0); - resourceAccess=pub; - resourceCustomAttrs=mk_custom_attrs [] } ] - - //NOTE: the culture string can be turned into a number using this: - // sprintf "%04x" (System.Globalization.CultureInfo.GetCultureInfo("en").KeyboardLayoutId ) - let assemblyVersionResources = - let assemblyVersion = - match tcConfig.version with - | VersionNone ->assemVerFromAttrib - | v -> Some(tcVersion) - match assemblyVersion with - | None -> [] - | Some(assemblyVersion) -> - let FindAttribute key attrib = - match AttributeHelpers.TryFindStringAttribute tcGlobals attrib topAttrs.assemblyAttrs with - | Some text -> [(key,text)] - | _ -> [] - - let fileVersion = - match AttributeHelpers.TryFindVersionAttribute tcGlobals "System.Reflection.AssemblyFileVersionAttribute" topAttrs.assemblyAttrs with - | Some v -> v - | None -> assemblyVersion - - let productVersion = - match AttributeHelpers.TryFindVersionAttribute tcGlobals "System.Reflection.AssemblyInformationalVersionAttribute" topAttrs.assemblyAttrs with - | Some v -> v - | None -> assemblyVersion - - let stringFileInfo = - // 040904b0: - // Specifies an 8-digit hexadecimal number stored as a Unicode string. The four most significant digits represent the language identifier. The four least significant digits represent the code page for which the data is formatted. - // Each Microsoft Standard Language identifier contains two parts: the low-order 10 bits specify the major language, and the high-order 6 bits specify the sublanguage. For a table of valid identifiers see Language Identifiers. // - // REVIEW: HARDWIRED TO ENGLISH - [ ("040904b0", [ yield ("Assembly Version", (let v1,v2,v3,v4 = assemblyVersion in sprintf "%d.%d.%d.%d" v1 v2 v3 v4)) - yield ("FileVersion", (let v1,v2,v3,v4 = fileVersion in sprintf "%d.%d.%d.%d" v1 v2 v3 v4)) - yield ("ProductVersion", (let v1,v2,v3,v4 = productVersion in sprintf "%d.%d.%d.%d" v1 v2 v3 v4)) - yield! FindAttribute "Comments" "System.Reflection.AssemblyDescriptionAttribute" - yield! FindAttribute "FileDescription" "System.Reflection.AssemblyTitleAttribute" - yield! FindAttribute "ProductName" "System.Reflection.AssemblyProductAttribute" - yield! FindAttribute "CompanyName" "System.Reflection.AssemblyCompanyAttribute" - yield! FindAttribute "LegalCopyright" "System.Reflection.AssemblyCopyrightAttribute" - yield! FindAttribute "LegalTrademarks" "System.Reflection.AssemblyTrademarkAttribute" ]) ] - - - // These entries listed in the MSDN documentation as "standard" string entries are not yet settable - - // InternalName: The Value member identifies the file's internal name, if one exists. For example, this string could contain the module name for Windows dynamic-link libraries (DLLs), a virtual device name for Windows virtual devices, or a device name for MS-DOS device drivers. - // OriginalFilename: The Value member identifies the original name of the file, not including a path. This enables an application to determine whether a file has been renamed by a user. This name may not be MS-DOS 8.3-format if the file is specific to a non-FAT file system. - // PrivateBuild: The Value member describes by whom, where, and why this private version of the file was built. This string should only be present if the VS_FF_PRIVATEBUILD flag is set in the dwFileFlags member of the VS_FIXEDFILEINFO structure. For example, Value could be 'Built by OSCAR on \OSCAR2'. - // SpecialBuild: The Value member describes how this version of the file differs from the normal version. This entry should only be present if the VS_FF_SPECIALBUILD flag is set in the dwFileFlags member of the VS_FIXEDFILEINFO structure. For example, Value could be 'Private build for Olivetti solving mouse problems on M250 and M250E computers'. - - - - // "If you use the Var structure to list the languages your application - // or DLL supports instead of using multiple version resources, - // use the Value member to contain an array of DWORD values indicating the - // language and code page combinations supported by this file. The - // low-order word of each DWORD must contain a Microsoft language identifier, - // and the high-order word must contain the IBM® code page number. - // Either high-order or low-order word can be zero, indicating that - // the file is language or code page independent. If the Var structure is - // omitted, the file will be interpreted as both language and code page independent. " - let varFileInfo = [ (0x0409, 0x04b0) ] - - let fixedFileInfo = - let dwFileFlagsMask = 0x3f // REVIEW: HARDWIRED - let dwFileFlags = 0x00 // REVIEW: HARDWIRED - let dwFileOS = 0x04 // REVIEW: HARDWIRED - let dwFileType = 0x01 // REVIEW: HARDWIRED - let dwFileSubtype = 0x00 // REVIEW: HARDWIRED - let lwFileDate = 0x00L // REVIEW: HARDWIRED - (fileVersion,productVersion,dwFileFlagsMask,dwFileFlags,dwFileOS,dwFileType,dwFileSubtype,lwFileDate) - - let vsVersionInfoResource = - VersionResourceFormat.VS_VERSION_INFO_RESOURCE(fixedFileInfo,stringFileInfo,varFileInfo) - - - let resource = - [| yield! ResFileFormat.ResFileHeader() - yield! vsVersionInfoResource |] -#if DUMP_ASSEMBLY_RESOURCE - for i in 0..(resource.Length+15)/16 - 1 do - for j in 0..15 do - if j % 2 = 0 then printf " " - printf "%02x" resource.[min (i*16+j) (resource.Length - 1)] - printf " " - for j in 0..15 do - printf "%c" (let c = char resource.[min (i*16+j) (resource.Length - 1)] in if c > ' ' && c < '~' then c else '.') - printfn "" -#endif - [ resource ] - - // a user cannot specify both win32res and win32manifest - if not(tcConfig.win32manifest = "") && not(tcConfig.win32res = "") then - error(Error(sprintf "Conflicting options specified: win32manifest and win32res",rangeCmdArgs)); - - let win32Manifest = - if not(tcConfig.win32manifest = "") then - tcConfig.win32manifest - elif not(tcConfig.includewin32manifest) || not(tcConfig.win32res = "") || runningOnMono then // don't embed a manifest if a native resource is being included - "" - else - match Build.highestInstalledNetFrameworkVersionMajorMinor() with - | _,"v4.0" -> System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() ^ @"default.win32manifest" - | _,"v3.5" -> System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() ^ @"..\v3.5\default.win32manifest" - | _,_ -> "" // only have default manifests for 3.5 and 4.0 - - let nativeResources = - [ for av in assemblyVersionResources do - yield Lazy.CreateFromValue av - if not(tcConfig.win32res = "") then - yield Lazy.CreateFromValue (System.IO.File.ReadAllBytes tcConfig.win32res) - if tcConfig.includewin32manifest && not(win32Manifest = "") && not(runningOnMono) then - yield Lazy.CreateFromValue [| yield! ResFileFormat.ResFileHeader() - yield! (ManifestResourceFormat.VS_MANIFEST_RESOURCE((System.IO.File.ReadAllBytes win32Manifest), tcConfig.target = Dll))|]] - - - // Add attributes, version number, resources etc. - {mainModule with - modulName = (if tcConfig.target = Module then Path.GetFileName outfile else mainModule.modulName); - modulSubSystem = (if tcConfig.target = WinExe then 2 else 3) ; - modulResources= resources; - modulImageBase = (match tcConfig.baseAddress with None -> 0x00400000l | Some b -> b); - modulDLL=(tcConfig.target = Dll or tcConfig.target=Module); - modulPlatform = tcConfig.platform ; - modul32bit=(match tcConfig.platform with Some X86 -> true | _ -> false); - modul64bit=(match tcConfig.platform with Some AMD64 | Some IA64 -> true | _ -> false); - modulCustomAttrs= mk_custom_attrs ((if tcConfig.target = Module then iattrs else []) @ codegenResults.ilNetModuleAttrs); - modulNativeResources=nativeResources; - modulManifest = manifest } - - - - let EraseILX (ilGlobals,ilxMainModule) = - if !progress then dprintn "Generating IL code..."; - Ilxerase.ConvModule ilGlobals ilxMainModule - - - -/// OPTIONAL STATIC LINKING OF ALL DLLs THAT DEPEND ON THE F# LIBRARY -module StaticLinker = - type node = - { name: string; - data: ILModuleDef; - ccu: CcuThunk option ; - refs: ILReferences; - mutable edges: node list; - mutable visited: bool } - - - let StaticLinkModules tcConfig ilGlobals ilxMainModule (dependentModules: (ccu option * ILModuleDef) list) = - if isNil dependentModules then - ilxMainModule,(fun x -> x) - else - - match dependentModules |> List.tryPick (function (Some ccu,_) when ccu.UsesQuotations -> Some ccu | _ -> None) with - | Some ccu -> error(Error(sprintf "The code in assembly '%s' makes uses of quotation literals. Static linking may not include components that make use of quotation literals" ccu.AssemblyName,rangeStartup)); - | None -> () - - if dependentModules |> List.exists (fun (_,x) -> not x.IsDLL) then - error(Error("static linking may not include a .EXE",rangeStartup)) - if dependentModules |> List.exists (fun (_,x) -> not x.IsILOnly) then - error(Error("static linking may not include a mixed managed/unmanaged DLL",rangeStartup)) - let dependentModules = dependentModules |> List.map snd - let assems = - dependentModules - |> List.filter module_is_mainmod - |> List.map GetNameOfILModule - |> Set.of_list - - (* Rewrite scope references to be local references *) - let rewriteExternalRefsToLocalRefs x = - if assems.Contains(GetNameOfScopeRef x) then ScopeRef_local else x - let saved_resources = - let all_resources = - dependentModules - |> List.map (fun m -> dest_resources m.modulResources) - |> List.concat - // Save only the interface/optimization attributes of generated data - let intfDataResources,others = - let intfDataResources,others = List.partition IsSignatureDataResource all_resources - let intfDataResources = if GenerateInterfaceData(tcConfig) then intfDataResources else [] - intfDataResources,others - let optDataResources,others = - let optDataResources,others = List.partition IsOptDataResource others - let optDataResources = if GenerateOptimizationData(tcConfig) then optDataResources else [] - optDataResources,others - let rresources,others = - let rresources,others = List.partition IsReflectedDefinitionsResource others - let rresources = rresources |> List.mapi (fun i r -> {r with resourceName = Sreflect.pickledDefinitionsResourceNameBase^string (i+1)}) - rresources,others - if verbose then dprintf "#intfDataResources = %d, #optDataResources = %d, #rresources = %d\n" intfDataResources.Length optDataResources.Length rresources.Length; - intfDataResources@optDataResources@rresources@others - let moduls = ilxMainModule :: dependentModules - let topTypeDefs,normalTypeDefs = - moduls - |> List.map (fun m -> m.modulTypeDefs |> dest_tdefs |> List.partition (fun td -> is_toplevel_tname td.tdName)) - |> List.unzip - let topTypeDef = - let topTypeDefs = List.concat topTypeDefs - mk_toplevel_tdef ilGlobals - (mk_mdefs ((topTypeDefs |> List.collect (fun td -> dest_mdefs td.Methods))), - mk_fdefs ((topTypeDefs |> List.collect (fun td -> dest_fdefs td.Fields)))) - let ilxMainModule = - { ilxMainModule with - modulManifest = (let m = ilxMainModule.ManifestOfAssembly in Some {m with manifestCustomAttrs = mk_custom_attrs (dest_custom_attrs m.manifestCustomAttrs)}); - modulCustomAttrs = mk_custom_attrs [ for m in moduls do yield! dest_custom_attrs m.modulCustomAttrs ]; - modulTypeDefs = mk_tdefs (topTypeDef :: List.concat normalTypeDefs); - modulResources = mk_resources (saved_resources @ dest_resources ilxMainModule.modulResources); - modulNativeResources = - // NOTE: version resources from statically linked DLLs are dropped in the binary reader/writer - [ //yield! ilxMainModule.modulNativeResources - for m in moduls do - yield! m.modulNativeResources ] } - ilxMainModule, rewriteExternalRefsToLocalRefs - - - #if DEBUG - let PrintModule outfile x = - use os = File.CreateText(outfile) :> TextWriter - Ilprint.output_module os x - #endif - - // Compute a static linker. This only captures tcImports (a large data structure) if - // static linking is enabled. Normally this is not the case, which lets us collect tcImports - // prior to this point. - let StaticLink (tcConfig:TcConfig,tcImports:TcImports,ilGlobals) = - if not tcConfig.standalone && tcConfig.extraStaticLinkRoots = [] - then (fun (ilxMainModule,outfile) -> ilxMainModule) - else (fun (ilxMainModule,outfile) -> - ReportTime tcConfig "Find assembly references"; - (* Recursively find all referenced modules and add them to a module graph *) - let depModuleTable = Hashtbl.create 0 - let GetNode n = Hashtbl.find depModuleTable n - if !progress then dprintn "Performing static link..."; - begin - let remaining = ref (refs_of_module ilxMainModule).refsAssembly - while !remaining <> [] do - let aref = List.hd !remaining - remaining := List.tl !remaining; - match aref.Name with - | ("mscorlib" | "System" | "System.Core" | "System.Xml" | "Microsoft.Build.Framework" | "Microsoft.Build.Utilities") -> - Hashtbl.add depModuleTable aref.Name { refs = IL.empty_refs ; - name=aref.Name; - ccu=None; - data=ilxMainModule; // any old module - edges = []; - visited = true }; - | _ -> - if not (Hashtbl.mem depModuleTable aref.Name) then - if verbose then dprintn ("Finding "^aref.Name); - let ccu = - match tcImports.FindCcuFromAssemblyRef(Range.rangeStartup,aref) with - | ResolvedCcu ccu -> Some ccu - | UnresolvedCcu(ccuName) -> None - - let dllInfo = tcImports.FindDllInfo(Range.rangeStartup,aref.Name) - let modul = dllInfo.RawMetadata - if !progress then dprintn ("Finding references for "^aref.Name); - let refs = - if aref.Name = GetFSharpCoreLibraryName() then - IL.empty_refs - elif not modul.IsILOnly then - warning(Error(sprintf "ignoring mixed managed/unmanaged assembly %s during static linking\n" modul.modulName,rangeStartup)) - IL.empty_refs - else - try - { refsAssembly = dllInfo.ILAssemblyRefs; - refsModul = [] } - with e -> - warning(Error(sprintf "** warning: could not determine dependencies of assembly %s\n** reason: %s\n" modul.modulName (e.ToString()),rangeStartup)); - IL.empty_refs - Hashtbl.add depModuleTable aref.Name { refs=refs; - name=aref.Name; - ccu=ccu; - data=modul; - edges = []; - visited = false }; - remaining := refs.refsAssembly @ !remaining; - done; - end; - - ReportTime tcConfig "Find dependencies"; - (* Add edges from modules to the modules that depend on them *) - begin - Hashtbl.iter - (fun _ n -> n.refs.refsAssembly |> List.iter(fun aref -> let n2 = GetNode aref.Name in n2.edges <- n :: n2.edges) ) - depModuleTable; - end; - - // Find everything that depends on FSharp.Core - let depModules = - let roots = - [ if tcConfig.standalone && Hashtbl.mem depModuleTable (GetFSharpCoreLibraryName()) then - yield GetNode(GetFSharpCoreLibraryName()) - for n in tcConfig.extraStaticLinkRoots do - yield try GetNode n - with :? KeyNotFoundException -> - error(Error("Assembly "^n^" not found in dependency set of target application",rangeStartup)); ] - - let remaining = ref roots - [ while nonNil !remaining do - let n = List.hd !remaining - remaining := List.tl !remaining; - if not (n.visited) then - if verbose then dprintn ("Module "^n.name^" depends on "^GetFSharpCoreLibraryName()); - n.visited <- true; - remaining := n.edges @ !remaining - yield (n.ccu, n.data); ] - - ReportTime tcConfig "Static link"; - (* Glue all this stuff into ilxMainModule *) - let ilxMainModule,rewriteExternalRefsToLocalRefs = StaticLinkModules tcConfig ilGlobals ilxMainModule depModules - - let ilxMainModule = - let rewriteAssemblyRefsToMatchLibraries = NormalizeAssemblyRefs tcImports - Ilmorph.module_tref2tref_memoized (Ilmorph.tref_scoref2scoref (rewriteExternalRefsToLocalRefs >> rewriteAssemblyRefsToMatchLibraries)) ilxMainModule - - (* Print it out if requested *) - #if DEBUG - if tcConfig.writeGeneratedILFiles then (let _ = PrintModule (outpath outfile "ilx.main") ilxMainModule in ()); - #endif - ilxMainModule) - -(*---------------------------------------------------------------------------- -!* EMIT IL - *--------------------------------------------------------------------------*) - -type SigningInfo = SigningInfo of (* delaysign:*) bool * (*signer:*) string option * (*container:*) string option - -module FileWriter = - let EmitIL (tcConfig:TcConfig,ilGlobals,errorLogger:ErrorLogger,outfile,pdbfile,ilxMainModule,signingInfo:SigningInfo) = - let (SigningInfo(delaysign,signer,container)) = signingInfo - try - #if DEBUG - if tcConfig.writeGeneratedILFiles then dprintn "Printing module..."; - if tcConfig.writeGeneratedILFiles then StaticLinker.PrintModule (outpath outfile "il.txt") ilxMainModule; - #endif - if !progress then dprintn "Writing assembly..."; - if tcConfig.showTimes then Ilwrite.showTimes := true; - try - Ilwrite.WriteILBinary - outfile - { mscorlib=ilGlobals.mscorlib_scoref; - pdbfile=pdbfile; - - signer = - begin - // REVIEW: favor the container over the key file - C# appears to do this - if isSome container then - Some(Ilwrite.signerOpenKeyContainer container.Value) - else - match signer with - | None -> None - | Some(s) -> - try - if delaysign then - Some (Ilwrite.signerOpenPublicKeyFile s) - else - Some (Ilwrite.signerOpenKeyPairFile s) - with e -> - // Note:: don't use errorR here since we really want to fail and not produce a binary - error(Error(sprintf "The key file '%s' could not be opened" s,rangeCmdArgs)) - end; - fixupOverlappingSequencePoints = false; } - ilxMainModule - with Failure msg -> - error(Error(sprintf "A problem occurred writing the binary %s: %s" outfile msg, rangeCmdArgs)) - with e -> - errorRecoveryNoRange e; - exiter.Exit 1 - - - let WriteConfigFile(tcConfig:TcConfig,ilGlobals:ILGlobals,outfile) = - if tcConfig.generateConfigFile && tcConfig.target.IsExe then - use os = new StreamWriter((outfile^".config"),append=false,encoding=System.Text.Encoding.UTF8) - let (v1,v2,v3,_) = ilGlobals.mscorlib_scoref.AssemblyRef.Version.Value - Printf.twprintf os "\n\ - \n\ - \n\ - \n\ - \n\ - \n\ - " - (int v1) (int v2) (int v3) - (int v1) (int v2) (int v3); - - let WriteStatsFile (tcConfig:TcConfig,outfile) = - if tcConfig.stats then - try - use oc = new StreamWriter((outpath outfile "stats.txt"),append=false,encoding=System.Text.Encoding.UTF8) :> TextWriter -#if STATISTICS - Ilread.report oc; -#endif - Ilxgen.report oc; - with _ -> () - - - -let abortOnError (errorLogger:ErrorLogger) = - if errorLogger.ErrorCount > 0 then exiter.Exit 1 - -let KeyFileWarningE = DeclareResourceString("KeyFileWarning","") -let KeyNameWarningE = DeclareResourceString("KeyNameWarning","") -let DelaySignWarningE = DeclareResourceString("DelaySignWarning","") - - -let ValidateKeySigningAttributes (tcConfig : TcConfig) tcGlobals topAttrs = - let delaySignAttrib = AttributeHelpers.TryFindBoolAttribute tcGlobals "System.Reflection.AssemblyDelaySignAttribute" topAttrs.assemblyAttrs - let signerAttrib = AttributeHelpers.TryFindStringAttribute tcGlobals "System.Reflection.AssemblyKeyFileAttribute" topAttrs.assemblyAttrs - let containerAttrib = AttributeHelpers.TryFindStringAttribute tcGlobals "System.Reflection.AssemblyKeyNameAttribute" topAttrs.assemblyAttrs - - // REVIEW: C# throws a warning when these attributes are used - should we? - - // if delaySign is set via an attribute, validate that it wasn't set via an option - let delaysign = - match delaySignAttrib with - | Some delaysign -> - if tcConfig.delaysign then - warning(Error(DelaySignWarningE.Format,rangeCmdArgs)) ; - tcConfig.delaysign - else - delaysign - | _ -> tcConfig.delaysign - - - // if signer is set via an attribute, validate that it wasn't set via an option - let signer = - match signerAttrib with - | Some signer -> - if tcConfig.signer.IsSome && tcConfig.signer <> Some signer then - warning(Error(KeyFileWarningE.Format,rangeCmdArgs)) ; - tcConfig.signer - else - Some signer - | None -> tcConfig.signer - - // if container is set via an attribute, validate that it wasn't set via an option, and that they keyfile wasn't set - // if keyfile was set, use that instead (silently) - // REVIEW: This is C# behavior, but it seems kind of sketchy that we fail silently - let container = - match containerAttrib with - | Some container -> - if tcConfig.container.IsSome && tcConfig.container <> Some container then - warning(Error(KeyNameWarningE.Format,rangeCmdArgs)) ; - tcConfig.container - else - Some container - | None -> tcConfig.container - - SigningInfo (delaysign,signer,container) - - - -//---------------------------------------------------------------------------- -// main - split up to make sure that we can GC the -// dead data at the end of each phase. We explicitly communicate arguments -// from one phase to the next. -//----------------------------------------------------------------------------- - -type Args<'a> = Args of 'a - -let main1(argv) = - let tcConfigB = Build.TcConfigBuilder.CreateNew(defaultFSharpBinariesDir, false,Directory.GetCurrentDirectory()) - // Preset: --optimize+ -g --tailcalls+ (see 4505) - SetOptimizeSwitch tcConfigB On - SetDebugSwitch tcConfigB None Off - SetTailcallSwitch On - - let errorLogger = ErrorLoggerInitial tcConfigB - - // Install the global error logger and never remove it - let _ = InstallGlobalErrorLogger (fun _ -> errorLogger) - - - // process command line, flags and collect filenames - let sourceFiles = - - // The ParseCompilerOptions function calls imperative function to process "real" args - // Rather than start processing, just collect names, then process them. - try - let inputFilesRef = ref ([] : string list) - let collect name = - let lower = String.lowercase name - if List.exists (Filename.check_suffix lower) [".resx"] then - tcConfigB.AddEmbeddedResource name - else - inputFilesRef := name :: !inputFilesRef - let abbrevArgs = abbrevFlagSet tcConfigB true - ParseCompilerOptions collect (GetCoreFscCompilerOptions tcConfigB) (List.tl (PostProcessCompilerArgs abbrevArgs argv)); - abortOnError errorLogger; - let inputFiles = List.rev !inputFilesRef - - if tcConfigB.utf8output then - let prev = System.Console.OutputEncoding - System.Console.OutputEncoding <- System.Text.Encoding.UTF8 - System.AppDomain.CurrentDomain.ProcessExit.Add(fun _ -> System.Console.OutputEncoding <- prev) - - (* step - get dll references *) - let dllFiles,sourceFiles = List.partition Filename.isDll inputFiles - match dllFiles with - | [] -> () - | h::t -> deprecated (sprintf "The assembly '%s' is listed on the command line and has been added as a reference. Assemblies should now be referenced using a command line flag such as '-r'" h) rangeStartup - - tcConfigB.referencedDLLs <- tcConfigB.referencedDLLs @ (dllFiles |> List.map(fun f -> AssemblyReference(rangeStartup,f)) ); - sourceFiles - - with - e -> errorRecovery e rangeStartup; exiter.Exit 1 - - let sourceFiles = - sourceFiles - |> List.map (fun file -> if Path.IsPathRooted(file) then file else Path.Combine(tcConfigB.implicitIncludeDir, file)) - - tcConfigB.conditionalCompilationDefines <- "COMPILED" :: tcConfigB.conditionalCompilationDefines - // display the banner text, if necessary - Microsoft.FSharp.Compiler.Fscopts.DisplayBannerText tcConfigB - - // Create tcGlobals and frameworkTcImports - let outfile,pdbfile,assemblyName = tcConfigB.DecideNames sourceFiles - abortOnError errorLogger; // DecideNames may give "no inputs" error. Abort on error at this point. bug://3911 - - let tcConfig = TcConfig.Create(tcConfigB,validate=false) - - - let errorLogger = ErrorLoggerThatQuitsAfterMaxErrors tcConfig - - // Install the global error logger and never remove it - let _ = InstallGlobalErrorLogger (fun _ -> errorLogger) - - // Share intern'd strings across all lexing/parsing - let lexResourceManager = new Lexhelp.LexResourceManager() - - - (* step - decideNames *) - abortOnError errorLogger; - - // Nice name generator - let niceNameGen = NiceNameGenerator() - - let tcGlobals,tcImports,generatedCcu,typedAssembly,topAttrs,tcConfig = - - ReportTime tcConfig "Import mscorlib"; - let tcConfigP = TcConfigProvider.Constant(tcConfig) - - if tcConfig.useIncrementalBuilder then - ReportTime tcConfig "Incremental Parse and Typecheck"; - let projectDirectory = System.IO.Directory.GetCurrentDirectory() - let build,_ = - IncrementalFSharpBuild.Create (tcConfig, projectDirectory, assemblyName, niceNameGen, lexResourceManager, sourceFiles, - false, // no need to stay reactive - IncrementalFSharpBuild.BuildEvents.Default, - errorLogger, - errorRecovery) - let build,tcState,topAttribs,typedAssembly,tcEnv,tcImports,tcGlobals,tcConfig = IncrementalFSharpBuild.TypeCheck(build) - tcGlobals,tcImports,tcState.Ccu,typedAssembly,topAttribs,tcConfig - else - (* step - parse sourceFiles *) - ReportTime tcConfig "Parse inputs"; - let inputs = - try - sourceFiles - |> tcConfig.ComputeCanContainEntryPoint - |> List.zip sourceFiles - |> List.choose (fun (input,canContainEntryPoint) -> - let lower = String.lowercase input - ParseOneInputFile(tcConfig,lexResourceManager,["COMPILED"],input,canContainEntryPoint,errorLogger)) - with e -> - errorRecoveryNoRange e; exiter.Exit 1 - if tcConfig.parseOnly then exiter.Exit 0 else (); - abortOnError errorLogger; - - if tcConfig.printAst then - let show input = - let opts = Internal.Utilities.StructuredFormat.FormatOptions.Default - let l = Internal.Utilities.StructuredFormat.Display.any_to_layout opts input - Internal.Utilities.StructuredFormat.Display.output_layout opts stdout l - - inputs |> List.iter (fun input -> printf "AST:\n"; show input; printf "\n") - - let tcConfig = (tcConfig,inputs) ||> List.fold ApplyMetaCommandsFromInputToTcConfig - let tcConfigP = TcConfigProvider.Constant(tcConfig) - - ReportTime tcConfig "Import mscorlib and FSharp.Core.dll"; - - ReportTime tcConfig "Import system references"; - let sysRes,otherRes,_ = TcAssemblyResolutions.SplitNonFoundationalResolutions tcConfig - let tcGlobals,frameworkTcImports = TcImports.BuildFrameworkTcImports (tcConfigP,sysRes) - - ReportTime tcConfig "Import non-system references"; - let tcGlobals,tcImports = - let tcImports = TcImports.BuildNonFrameworkTcImports(tcConfigP,tcGlobals,frameworkTcImports,otherRes) - tcGlobals,tcImports - abortOnError errorLogger; - - ReportTime tcConfig "Typecheck"; - let tcEnv0 = GetInitialTypecheckerEnv (Some assemblyName) rangeStartup tcConfig tcImports tcGlobals - - // typecheck - let tcState,topAttrs,typedAssembly,tcEnvAtEnd = - TypeCheck(tcConfig,tcImports,tcGlobals,errorLogger,assemblyName,niceNameGen,tcEnv0,inputs) - - let generatedCcu = tcState.Ccu - abortOnError errorLogger; - ReportTime tcConfig "Typechecked"; - - (tcGlobals,tcImports,generatedCcu,typedAssembly,topAttrs,tcConfig) - - if tcConfig.typeCheckOnly then exiter.Exit 0; - - let signingInfo = ValidateKeySigningAttributes tcConfig tcGlobals topAttrs - - abortOnError errorLogger; - - // Build an updated errorLogger that filters according to the scopedPragmas. Then install - // it as the updated global error logger and never remove it - let oldLogger = errorLogger - let errorLogger = - let scopedPragmas = - let (TAssembly(impls)) = typedAssembly - [ for (TImplFile(_,pragmas,_)) in impls do yield! pragmas ] - GetErrorLoggerFilteringByScopedPragmas(true,scopedPragmas,oldLogger) - - let _ = InstallGlobalErrorLogger(fun _ -> errorLogger) - - - // Try to find an AssemblyVersion attribute - let assemVerFromAttrib = - match AttributeHelpers.TryFindVersionAttribute tcGlobals "System.Reflection.AssemblyVersionAttribute" topAttrs.assemblyAttrs with - | Some v -> - match tcConfig.version with - | VersionNone -> Some v - | _ -> warning(Error("The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option",Range.rangeStartup)); None - | _ -> None - - // write interface, xmldoc, generateHtmlDocs - begin - ReportTime tcConfig ("Write Interface File"); - if tcConfig.printSignature then InterfaceFileWriter.WriteInterfaceFile (tcGlobals,tcConfig,tcImports,generatedCcu,typedAssembly); - ReportTime tcConfig ("Write XML docs"); - tcConfig.xmlDocOutputFile |> Option.iter (fun xmlFile -> XmlDocWriter.writeXmlDoc (assemblyName,tcGlobals,generatedCcu,xmlFile)) - ReportTime tcConfig ("Write HTML docs"); - if tcConfig.generateHtmlDocs then - HtmlDocWriter.WriteHTMLDoc (tcConfig,tcImports,tcGlobals,generatedCcu,tcConfig.htmlDocDirectory,tcConfig.htmlDocAppendFlag,tcConfig.htmlDocCssFile,tcConfig.htmlDocNamespaceFile,assemVerFromAttrib); - end; - - - // Pass on only the minimimum information required for the next phase to ensure GC kicks in. - // In principle the JIT should be able to do good liveness analysis to clean things up, but the - // data structures involved here are so large we can't take the risk. - Args(tcConfig,tcImports,tcGlobals,errorLogger,generatedCcu,outfile,typedAssembly,topAttrs,pdbfile,assemblyName,assemVerFromAttrib,signingInfo) - - -let main2(Args(tcConfig,tcImports,tcGlobals,errorLogger,generatedCcu:ccu,outfile,typedAssembly,topAttrs,pdbfile,assemblyName,assemVerFromAttrib,signingInfo)) = - - ReportTime tcConfig ("Encode Interface Data"); - if !verboseStamps then - dprintf "---------------------- START MAKE EXPORT REMAPPING ------------\n"; - let exportRemapping = MakeExportRemapping generatedCcu generatedCcu.Contents - if !verboseStamps then - dprintf "---------------------- END MAKE EXPORT REMAPPING ------------\n"; - - let idata = EncodeInterfaceData(tcConfig,tcGlobals,errorLogger,exportRemapping,generatedCcu,outfile) - - if !progress && tcConfig.optSettings.jitOptUser = Some false then - dprintf "Note, optimizations are off.\n"; - (* optimize *) - let optEnv0 = InitialOptimizationEnv tcImports - - let importMap = tcImports.GetImportMap() - let optimizedImpls,optimizationData,_ = ApplyAllOptimizations (tcConfig,tcGlobals,outfile,importMap,false,optEnv0,generatedCcu,typedAssembly) - - abortOnError errorLogger; - - ReportTime tcConfig ("Encoding OptData"); - let generatedOptData = EncodeOptimizationData(tcGlobals,tcConfig,outfile,exportRemapping,(generatedCcu,optimizationData)) - - // Pass on only the minimimum information required for the next phase to ensure GC kicks in. - // In principle the JIT should be able to do good liveness analysis to clean things up, but the - // data structures involved here are so large we can't take the risk. - Args(tcConfig,tcImports,tcGlobals,errorLogger,generatedCcu,outfile,optimizedImpls,topAttrs,importMap,pdbfile,assemblyName, idata,generatedOptData,assemVerFromAttrib,signingInfo) - -let main2b(Args(tcConfig:TcConfig,tcImports,tcGlobals,errorLogger,generatedCcu:ccu,outfile,optimizedImpls,topAttrs,importMap,pdbfile,assemblyName,idata,generatedOptData,assemVerFromAttrib,signingInfo)) = - - // Compute a static linker. - let ilGlobals = tcGlobals.ilg - if tcConfig.standalone && generatedCcu.UsesQuotations then - error(Error("Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals",rangeStartup)); - let staticLinker = StaticLinker.StaticLink (tcConfig,tcImports,ilGlobals) - - ReportTime tcConfig "TAST -> ILX"; - let ilxGenEnv = IlxgenEnvInit(tcConfig,tcImports,tcGlobals,generatedCcu) - let codegenResults = GenerateIlxCode(false,false,tcGlobals,tcConfig,importMap,topAttrs,optimizedImpls,generatedCcu,generatedCcu.AssemblyName,ilxGenEnv) - - - let mainmodx = MainModuleBuilder.CreateMainModule (tcConfig,tcGlobals,pdbfile,assemblyName,outfile,topAttrs,idata,generatedOptData,codegenResults,assemVerFromAttrib) -#if DEBUG - // Print code before bailing out from the compiler due to errors - // in the backend of the compiler. The partially-generated - // ILX code often contains useful information. - if tcConfig.writeGeneratedILFiles then StaticLinker.PrintModule (outpath outfile "ilx.txt") mainmodx; -#endif - - abortOnError errorLogger; - - Args (tcConfig,errorLogger,staticLinker,ilGlobals,outfile,pdbfile,mainmodx,signingInfo) - -let main2c(Args(tcConfig,errorLogger,staticLinker,ilGlobals,outfile,pdbfile,mainmodx,signingInfo)) = - - ReportTime tcConfig "ILX -> IL"; - let ilxMainModule = MainModuleBuilder.EraseILX (ilGlobals,mainmodx) - abortOnError errorLogger; - Args(tcConfig,errorLogger,staticLinker,ilGlobals,ilxMainModule,outfile,pdbfile,signingInfo) - - -let main3(Args(tcConfig,errorLogger:ErrorLogger,staticLinker,ilGlobals,ilxMainModule,outfile,pdbfile,signingInfo)) = - - let ilxMainModule = - try staticLinker (ilxMainModule,outfile) - with e -> errorRecoveryNoRange e; exiter.Exit 1 - abortOnError errorLogger; - - Args (tcConfig,errorLogger,ilGlobals,ilxMainModule,outfile,pdbfile,signingInfo) - -let main4(Args(tcConfig,errorLogger,ilGlobals,ilxMainModule,outfile,pdbfile,signingInfo)) = - ReportTime tcConfig "Write .NET Binary"; - FileWriter.EmitIL (tcConfig,ilGlobals,errorLogger,outfile,pdbfile,ilxMainModule,signingInfo); - - ReportTime tcConfig "Write Config File"; - FileWriter.WriteConfigFile(tcConfig,ilGlobals,outfile); - ReportTime tcConfig "Write Stats File"; - FileWriter.WriteStatsFile (tcConfig,outfile); - - abortOnError errorLogger; - ReportTime tcConfig "Exiting" - - -let main(argv) = main1(argv) |> main2 |> main2b |> main2c |> main3 |> main4 diff --git a/tools/FSharp_1.9.6.16/source/fsharp/fscmain.ml b/tools/FSharp_1.9.6.16/source/fsharp/fscmain.ml deleted file mode 100644 index 864f8ab2..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/fscmain.ml +++ /dev/null @@ -1,24 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module internal Microsoft.FSharp.Compiler.CommandLineMain - -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Driver -open System.Runtime.CompilerServices - - -[] -do () - -[] -let main(argv) = - try - Driver.main(Array.append [| "fsc.exe" |] argv); - 0 - with e -> - errorRecovery e Microsoft.FSharp.Compiler.Range.range0; - 1 - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/fscopts.ml b/tools/FSharp_1.9.6.16/source/fsharp/fscopts.ml deleted file mode 100644 index 8b28ce19..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/fscopts.ml +++ /dev/null @@ -1,1030 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module (* internal *) Microsoft.FSharp.Compiler.Fscopts - -open Internal.Utilities -open Internal.Utilities.Pervasives -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -open Microsoft.FSharp.Compiler -open System - -module Ilsupp = Microsoft.FSharp.Compiler.AbstractIL.Internal.Support -module Unilex = Microsoft.FSharp.Compiler.UnicodeLexing - -module Attributes = - open System.Runtime.CompilerServices - - //[] - [] - do() - -open Microsoft.FSharp.Compiler.Build -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.TypeChecker -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Lexhelp -open Microsoft.FSharp.Compiler.Ilxgen -open Ilxerase - - -let lexFilterVerbose = false -let mutable enableConsoleColoring = true // global state - -let setFlag r n = - match n with - | 0 -> r false - | 1 -> r true - | _ -> raise (Failure "expected 0/1") - -let SetOptimizeOff(tcConfigB : TcConfigBuilder) = - tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some false } - tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some false } - tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some false } - tcConfigB.optSettings <- { tcConfigB.optSettings with lambdaInlineThreshold = 0 } - tcConfigB.ignoreSymbolStoreSequencePoints <- false; - tcConfigB.doDetuple <- false; - tcConfigB.doTLR <- false; - -let SetOptimizeOn(tcConfigB : TcConfigBuilder) = - tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some true } - tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some true } - tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some true } - tcConfigB.optSettings <- { tcConfigB.optSettings with lambdaInlineThreshold = 6 } - - tcConfigB.ignoreSymbolStoreSequencePoints <- true; - tcConfigB.doDetuple <- true; - tcConfigB.doTLR <- true; - -let SetOptimizeSwitch (tcConfigB : TcConfigBuilder) switch = - if (switch = On) then SetOptimizeOn(tcConfigB) else SetOptimizeOff(tcConfigB) - -let SetTailcallSwitch switch = - if (switch = On) then - SetTailCalls() - else - SetNoTailCalls() - -let jitoptimize_switch (tcConfigB : TcConfigBuilder) switch = - tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some (switch = On) } - -let localoptimize_switch (tcConfigB : TcConfigBuilder) switch = - tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some (switch = On) } - -let crossOptimizeSwitch (tcConfigB : TcConfigBuilder) switch = - tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some (switch = On) } - -let splitting_switch (tcConfigB : TcConfigBuilder) switch = - tcConfigB.optSettings <- { tcConfigB.optSettings with abstractBigTargets = switch = On } - -let (++) x s = x @ [s] - -let SetTarget (tcConfigB : TcConfigBuilder)(s : string) = - match s.ToLowerInvariant() with - | "exe" -> tcConfigB.target <- ConsoleExe - | "winexe" -> tcConfigB.target <- WinExe - | "library" -> tcConfigB.target <- Dll - | "module" -> tcConfigB.target <- Module - | _ -> error(Error("unrecognized target '"^s^"', expected 'exe', 'winexe', 'library' or 'module'",rangeCmdArgs)) - -let SetDebugSwitch (tcConfigB : TcConfigBuilder) (dtype : string option) (s : OptionSwitch) = - match dtype with - | Some(s) -> - match s with - | "pdbonly" -> tcConfigB.jitTracking <- false - | "full" -> tcConfigB.jitTracking <- true - | _ -> error(Error("unrecognized debug type '"^s^"', expected 'pdbonly' or 'full'", rangeCmdArgs)) - | None -> tcConfigB.jitTracking <- s = On - tcConfigB.debuginfo <- s = On ; - -let setOutFileName tcConfigB s = - tcConfigB.outputFile <- Some s - -let setSignatureFile tcConfigB s = - tcConfigB.printSignature <- true ; - tcConfigB.printSignatureFile <- s - -// option tags -let tagString = "" -let tagExe = "exe" -let tagWinExe = "winexe" -let tagLibrary = "library" -let tagModule = "module" -let tagFile = "" -let tagFileList = "" -let tagDirList = "" -let tagPathList = "" -let tagResInfo = "" -let tagFullPDBOnly = "{full|pdbonly}" -let tagWarnList = "" -let tagSymbolList = "" -let tagAddress = "
" -let tagN = "" -let tagNone = "" - - -// PrintOptionInfo -//---------------- - -/// Print internal "option state" information for diagnostics and regression tests. -let PrintOptionInfo (tcConfigB:TcConfigBuilder) = - printfn " jitOptUser . . . . . . : %+A" tcConfigB.optSettings.jitOptUser - printfn " localOptUser . . . . . : %+A" tcConfigB.optSettings.localOptUser - printfn " crossModuleOptUser . . : %+A" tcConfigB.optSettings.crossModuleOptUser - printfn " lambdaInlineThreshold : %+A" tcConfigB.optSettings.lambdaInlineThreshold - printfn " ignoreSymStoreSeqPts . : %+A" tcConfigB.ignoreSymbolStoreSequencePoints - printfn " doDetuple . . . . . . : %+A" tcConfigB.doDetuple - printfn " doTLR . . . . . . . . : %+A" tcConfigB.doTLR - printfn " jitTracking . . . . . : %+A" tcConfigB.jitTracking - printfn " debuginfo . . . . . . : %+A" tcConfigB.debuginfo - printfn " resolutionEnvironment : %+A" tcConfigB.resolutionEnvironment - printfn " product . . . . . . . : %+A" tcConfigB.product - printfn " useFsiAuxLib . . . . . : %+A" tcConfigB.useFsiAuxLib - tcConfigB.includes |> List.sort - |> List.iter (printfn " include . . . . . . . : %A") - - -// OptionBlock: Input files -//------------------------- - -let inputFileFlagsBoth (tcConfigB : TcConfigBuilder) = - [ CompilerOption("reference", tagFile, OptionString (fun s -> tcConfigB.AddReferencedAssemblyByPath (rangeStartup,s)), None, - [ "Reference an assembly (Short form: -r)" ]); - ] - -let referenceFlagAbbrev (tcConfigB : TcConfigBuilder) = - CompilerOption("r", tagFile, OptionString (fun s -> tcConfigB.AddReferencedAssemblyByPath (rangeStartup,s)), None, - [ "Short form of --reference" ]) - -let inputFileFlagsFsi tcConfigB = inputFileFlagsBoth tcConfigB -let inputFileFlagsFsc tcConfigB = inputFileFlagsBoth tcConfigB - - -// OptionBlock: Errors and warnings -//--------------------------------- - -let errorsAndWarningsFlags (tcConfigB : TcConfigBuilder) = - [ - CompilerOption("warnaserror", tagNone, OptionSwitch(fun switch -> tcConfigB.globalWarnAsError <- switch <> Off), None, - [ "Report all warnings as errors" ]); - - CompilerOption("warnaserror", tagWarnList, OptionIntListSwitch (fun n switch -> - tcConfigB.specificWarnAsError <- - if switch = Off then - ListSet.remove (=) n tcConfigB.specificWarnAsError - else - ListSet.insert (=) n tcConfigB.specificWarnAsError), None, - [ "Report specific warnings as errors" ]); - - CompilerOption("warn", tagN, OptionInt (fun n -> - tcConfigB.globalWarnLevel <- - if (n >= 0 && n <= 4) then n - else error(Error("Invalid warning level '" ^ (string n) ^ "'",rangeCmdArgs))), None, - [ "Set a warning level (0-4)" ]); - - CompilerOption("nowarn", tagWarnList, OptionStringList (fun n -> tcConfigB.TurnWarningOff(rangeCmdArgs,n)), None, - [ "Disable specific warning messages" ]); - ] - - -// OptionBlock: Output files -//-------------------------- - -let outputFileFlagsFsi (tcConfigB : TcConfigBuilder) = [] -let outputFileFlagsFsc (tcConfigB : TcConfigBuilder) = - [ - CompilerOption("out", tagFile, OptionString (setOutFileName tcConfigB), None, - [ "Name of the output file (Short form: -o)"]); - - CompilerOption("target", tagExe, OptionString (SetTarget tcConfigB), None, - [ "Build a console executable"]); - - CompilerOption("target", tagWinExe, OptionString (SetTarget tcConfigB), None, - [ "Build a Windows executable"]); - - CompilerOption("target", tagLibrary, OptionString (SetTarget tcConfigB), None, - [ "Build a library (Short form: -a)"]); - - CompilerOption("target", tagModule, OptionString (SetTarget tcConfigB), None, - [ "Build a module that can be added to another assembly" ]); - - CompilerOption("delaysign", tagNone, OptionSwitch (fun s -> tcConfigB.delaysign <- (s = On)), None, - [ "Delay-sign the assembly using only the public" - "portion of the strong name key" ]); - - CompilerOption("doc", tagFile, OptionString (fun s -> tcConfigB.xmlDocOutputFile <- Some s), None, - [ "Write the xmldoc of the assembly to the given" - "file" ]); - - CompilerOption("keyfile", tagFile, OptionString (fun s -> tcConfigB.signer <- Some(s)), None, - [ "Specify a strong name key file" ]); - CompilerOption("keycontainer", tagString, OptionString(fun s -> tcConfigB.container <- Some(s)),None, - [ "Specify a strong name key container" ]); - - CompilerOption("platform", tagString, OptionString (fun s -> tcConfigB.platform <- match s with | "x86" -> Some X86 | "x64" -> Some AMD64 | "Itanium" -> Some IA64 | "anycpu" -> None | _ -> error(Error("unrecognized platform '"^s^"'",rangeCmdArgs))), None, - [ "Limit which platforms this code can run on:" - "x86, Itanium, x64 or anycpu. The default is" - "anycpu"]) ; - - CompilerOption("nooptimizationdata", tagNone, OptionUnit (fun () -> tcConfigB.onlyEssentialOptimizationData <- true), None, - [ "Only include optimization information essential" - "for implementing inlined constructs. Inhibits" - "cross-module inlining but improves binary" - "compatibility"]); - - CompilerOption("nointerfacedata", tagNone, OptionUnit (fun () -> tcConfigB.noSignatureData <- true), None, - [ "Don't add a resource to the generated assembly" - "containing F#-specific metadata"]); - - CompilerOption("sig", tagFile, OptionString (setSignatureFile tcConfigB), None, - [ "Print the inferred interface of the assembly" - "to a file"]); - ] - - -// OptionBlock: Resources -//----------------------- - -let resourcesFlagsFsi (tcConfigB : TcConfigBuilder) = [] -let resourcesFlagsFsc (tcConfigB : TcConfigBuilder) = - [ - CompilerOption("win32res", tagFile, OptionString (fun s -> tcConfigB.win32res <- s), None, - [ "Specify a Win32 resource file (.res)" ]); - - CompilerOption("win32manifest", tagFile, OptionString (fun s -> tcConfigB.win32manifest <- s), None, - [ "Specify a Win32 manifest file" ]); - - CompilerOption("nowin32manifest", tagNone, OptionUnit (fun () -> tcConfigB.includewin32manifest <- false), None, - ["Do not include the default Win32 manifest"]); - - CompilerOption("resource", tagResInfo, OptionString (fun s -> tcConfigB.AddEmbeddedResource s), None, - [ "Embed the specified managed resource" ]); - - CompilerOption("linkresource", tagResInfo, OptionString (fun s -> tcConfigB.linkResources <- tcConfigB.linkResources ++ s), None, - [ "Link the specified resource to this assembly" - "where the resinfo format is" - " [,[,public|private]]"]); - ] - - -// OptionBlock: Code generation -//----------------------------- - -let codeGenerationFlags (tcConfigB : TcConfigBuilder) = - [ - CompilerOption("debug", tagNone, OptionSwitch (SetDebugSwitch tcConfigB None), None, - [ "Emit debug information (Short form: -g)" ]); - - CompilerOption("debug", tagFullPDBOnly, OptionString (fun s -> SetDebugSwitch tcConfigB (Some(s)) On), None, - [ "Specify debugging type: full, pdbonly." - "('full' is the default and enables attaching a" - "debugger to a running program)" ]); - - CompilerOption("optimize", tagNone, OptionSwitch (SetOptimizeSwitch tcConfigB) , None, - [ "Enable optimizations (Short form: -O)" ]); - - CompilerOption("tailcalls", tagNone, OptionSwitch SetTailcallSwitch, None, - [ "Enable or disable tailcalls"]); - - CompilerOption("crossoptimize", tagNone, OptionSwitch (crossOptimizeSwitch tcConfigB), None, - [ "Enable or disable cross-module optimizations"]); - - ] - - -// OptionBlock: Language -//---------------------- - -let defineSymbol tcConfigB s = tcConfigB.conditionalCompilationDefines <- s :: tcConfigB.conditionalCompilationDefines - -let mlCompatibilityFlag (tcConfigB : TcConfigBuilder) = - CompilerOption("mlcompatibility", tagNone, OptionUnit (fun () -> tcConfigB.mlCompatibility<-true; tcConfigB.TurnWarningOff(rangeCmdArgs,"62")), None, - [ "Ignore OCaml-compatibility warnings." ]) -let languageFlags tcConfigB = - [ - CompilerOption("checked", tagNone, OptionSwitch (fun switch -> tcConfigB.Build.checkOverflow <- (switch = On)), None, - [ "Generate overflow checks" ]); - CompilerOption("define", tagString, OptionString (defineSymbol tcConfigB), None, - [ "Define conditional compilation symbols (Short" - "form: -d)" ]); - mlCompatibilityFlag tcConfigB - ] - - -// OptionBlock: HTML doc generation -//--------------------------------- - -let htmlFlagsFsc tcConfigB = (* FSC only *) - [ - CompilerOption("generatehtml", tagNone, OptionUnit (fun () -> tcConfigB.generateHtmlDocs <- true), None, - [ "Generate HTML documentation" ]); - - CompilerOption("htmloutputdir", tagFile, OptionString (fun s -> tcConfigB.htmlDocDirectory <- Some s) , None, - [ "Output directory for HTML documentation" ]); - - CompilerOption("htmlcss", tagString, OptionString (fun s -> tcConfigB.htmlDocCssFile <- Some s), None, - [ "Set the name of the Cascading Style Sheet" ]); - - CompilerOption("htmlnamespacefile", tagString, OptionString (fun s -> tcConfigB.htmlDocNamespaceFile <- Some s), None, - [ "Set the name of the master namespaces.html" - "file assumed to be in the output directory" ]); - - CompilerOption("htmlnamespacefileappend", tagNone, OptionUnit (fun () -> tcConfigB.htmlDocAppendFlag <- true), None, - [ "Append to the master namespace file when" - "generating HTML documentation" ]); - ] - - -// OptionBlock: Advanced user options -//----------------------------------- - -let libFlag (tcConfigB : TcConfigBuilder) = - CompilerOption("lib", tagDirList, OptionStringList (fun s -> tcConfigB.AddIncludePath (rangeStartup,s)), None, - [ "Specify a directory for the include path which" - "is used to resolve source files and assemblies" - "(Short form: -I)" ]) - -let libFlagAbbrev (tcConfigB : TcConfigBuilder) = - CompilerOption("I", tagDirList, OptionStringList (fun s -> tcConfigB.AddIncludePath (rangeStartup,s)), None, - [ "Short form of --lib" ]) - -let codePageFlag (tcConfigB : TcConfigBuilder) = - CompilerOption("codepage", tagN, OptionInt (fun n -> - let encoding = - try System.Text.Encoding.GetEncoding(n) - with :? System.ArgumentException as err -> error(Error(err.Message,rangeCmdArgs)) - tcConfigB.inputCodePage <- Some(n)), None, - [ "Specify the codepage used to read source files" ]) - -let utf8OutputFlag (tcConfigB: TcConfigBuilder) = - CompilerOption("utf8output", tagNone, OptionUnit (fun () -> tcConfigB.utf8output <- true), None, - [ "Output messages in UTF-8 encoding" ]) - -let fullPathsFlag (tcConfigB : TcConfigBuilder) = - CompilerOption("fullpaths", tagNone, OptionUnit (fun () -> tcConfigB.showFullPaths <- true), None, - [ "Output messages with fully qualified paths" ]) - -let cliRootFlag (tcConfigB : TcConfigBuilder) = - CompilerOption("cliroot", tagString, OptionString (fun s -> ()), Some(DeprecatedCommandLineOption("--cliroot", "Use an explicit reference to a specific copy of mscorlib.dll instead", rangeCmdArgs)), - [ "Use to override where the compiler looks for" - "mscorlib.dll and framework components" ]) - -let advancedFlagsBoth tcConfigB = - [ - codePageFlag tcConfigB; - utf8OutputFlag tcConfigB; - fullPathsFlag tcConfigB; - libFlag tcConfigB; - ] - -let advancedFlagsFsi tcConfigB = advancedFlagsBoth tcConfigB -let advancedFlagsFsc tcConfigB = - advancedFlagsBoth tcConfigB @ - [ - CompilerOption("baseaddress", tagAddress, OptionString (fun s -> tcConfigB.baseAddress <- Some(int32 s)), None, - [ "Base address for the library to be built" ]); - CompilerOption("noframework", tagNone, OptionUnit (fun () -> - tcConfigB.framework <- false; - tcConfigB.implicitlyResolveAssemblies <- false), None, - [ "Do not reference the .NET Framework assemblies" - "by default" ]); - - CompilerOption("standalone", tagNone, OptionUnit (fun s -> - tcConfigB.openDebugInformationForLaterStaticLinking <- true; - tcConfigB.standalone <- true; - tcConfigB.implicitlyResolveAssemblies <- true), None, - [ "Statically link the F# library and all" - "referenced DLLs that depend on it into the" - "assembly being generated." ]); - - CompilerOption("staticlink", tagFile, OptionString (fun s -> tcConfigB.extraStaticLinkRoots <- tcConfigB.extraStaticLinkRoots @ [s]), None, - [ "Statically link the given assembly and all" - "referenced DLLs that depend on this assembly." - "Use an assembly name e.g. mylib, not a DLL name" ]); - - CompilerOption("pdb", tagString, OptionString (fun s -> tcConfigB.debugSymbolFile <- Some s), None, - [ "Name the output debug file" ]); - ] - -// OptionBlock: Internal options (internal use only) -//-------------------------------------------------- - -let testFlag tcConfigB = - CompilerOption("test", tagString, OptionString (fun s -> - match s with - | "ErrorRanges" -> tcConfigB.errorStyle <- ErrorStyle.TestErrors - | "MemberBodyRanges" -> PostTypecheckSemanticChecks.testFlagMemberBody := true - | "Tracking" -> Lib.tracking := true (* general purpose on/off diagnostics flag *) - | "NoNeedToTailcall" -> tcConfigB.optSettings <- { tcConfigB.optSettings with reportNoNeedToTailcall = true } - | "FunctionSizes" -> tcConfigB.optSettings <- { tcConfigB.optSettings with reportFunctionSizes = true } - | "TotalSizes" -> tcConfigB.optSettings <- { tcConfigB.optSettings with reportTotalSizes = true } - | "HasEffect" -> tcConfigB.optSettings <- { tcConfigB.optSettings with reportHasEffect = true } - | str -> warning(Error("Unknown --test argument: " ^ str,rangeCmdArgs))), None, - [ ]) - -let useIncrementalBuildFlag (tcConfigB : TcConfigBuilder) = - CompilerOption("use-incremental-build", tagNone, OptionUnit (fun () -> tcConfigB.useIncrementalBuilder <- true), None, - [ ]) - -let vsStyleErrorsFlag tcConfigB = - CompilerOption("vserrors", tagNone, OptionUnit (fun () -> tcConfigB.errorStyle <- ErrorStyle.VSErrors), None, - [ ]) - -let internalFlags (tcConfigB:TcConfigBuilder) = - [ - CompilerOption("stamps", tagNone, OptionSet Tast.verboseStamps, None, []); - CompilerOption("ranges", tagNone, OptionSet Tastops.DebugPrint.layout_ranges, None, []); - CompilerOption("terms" , tagNone, OptionUnit (fun () -> tcConfigB.showTerms <- true), None, []); - CompilerOption("termsfile" , tagNone, OptionUnit (fun () -> tcConfigB.writeTermsToFiles <- true), None, []); -#if DEBUG - CompilerOption("ilfiles", tagNone, OptionUnit (fun () -> tcConfigB.writeGeneratedILFiles <- true), None, []); -#endif - CompilerOption("pause", tagNone, OptionUnit (fun () -> tcConfigB.pause <- true), None, []); - CompilerOption("detuple", tagNone, OptionInt (setFlag (fun v -> tcConfigB.doDetuple <- v)), None, []); - CompilerOption("simulateException", tagNone, OptionString (fun s -> tcConfigB.simulateException <- Some(s)), None, [ "Simulate an exception from some part of the compiler" ]); - CompilerOption("tlr", tagN, OptionInt (setFlag (fun v -> tcConfigB.doTLR <- v)), None, []); - CompilerOption("tlrlift", tagNone, OptionInt (setFlag (fun v -> Tlr.liftTLR := v)), None, []); - CompilerOption("parseonly", tagNone, OptionUnit (fun () -> tcConfigB.parseOnly <- true), None, []); - CompilerOption("typecheckonly", tagNone, OptionUnit (fun () -> tcConfigB.typeCheckOnly <- true), None, []); - CompilerOption("ast", tagNone, OptionUnit (fun () -> tcConfigB.printAst <- true), None, []); - CompilerOption("tokenize", tagNone, OptionUnit (fun () -> tcConfigB.tokenizeOnly <- true), None, []); - CompilerOption("testInteractionParser", tagNone, OptionUnit (fun () -> tcConfigB.testInteractionParser <- true), None, []); - CompilerOption("testparsererrorrecovery", tagNone, OptionUnit (fun () -> tcConfigB.reportNumDecls <- true), None, []); - CompilerOption("inlinethreshold", tagN, OptionInt (fun n -> tcConfigB.optSettings <- { tcConfigB.optSettings with lambdaInlineThreshold = n }), None, []); - CompilerOption("extraoptimizationloops", tagNone, OptionInt (fun n -> tcConfigB.extraOptimizationIterations <- n), None, []); - CompilerOption("maxerrors", tagN, OptionInt (fun n -> tcConfigB.maxErrors <- n), None, []); - CompilerOption("abortonerror", tagNone, OptionUnit (fun () -> tcConfigB.abortOnError <- true), None, []); - CompilerOption("htmllocallinks", tagNone, OptionUnit (fun () -> tcConfigB.htmlDocLocalLinks <- true), None, []); - CompilerOption("publicasinternal", tagNone, OptionSet Ilxgen.generatePublicAsInternal, None, []); - CompilerOption("implicitresolution", tagNone, OptionUnit (fun s -> tcConfigB.implicitlyResolveAssemblies <- true), None, []); - - CompilerOption("resolutions", tagNone, OptionUnit (fun () -> tcConfigB.showReferenceResolutions <- true), None, - [ "Display assembly reference resolution information" ]) ; - CompilerOption("resolutionframeworkregistrybase", tagString, OptionString (fun s -> tcConfigB.resolutionFrameworkRegistryBase<-s), None, - [ "The base registry key to use for assembly resolution. This part in brackets here: HKEY_LOCAL_MACHINE\[SOFTWARE\Microsoft\.NETFramework]\v2.0.50727\AssemblyFoldersEx" ]); - CompilerOption("resolutionassemblyfoldersuffix", tagString, OptionString (fun s -> tcConfigB.resolutionAssemblyFoldersSuffix<-s), None, - [ "The base registry key to use for assembly resolution. This part in brackets here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\[AssemblyFoldersEx]" ]); - CompilerOption("resolutionassemblyfoldersconditions", tagString, OptionString (fun s -> tcConfigB.resolutionAssemblyFoldersConditions <- ","^s), None, - [ "Additional reference resolution conditions. For example \"OSVersion=5.1.2600.0,PlatformID=id" ]); - CompilerOption("simpleresolution", tagNone, OptionUnit (fun () -> tcConfigB.useMonoResolution<-true), None, - [ "Resolve assembly references using directory-based mono rules rather than MSBuild resolution (Default=false except when running fsc.exe under mono)" ]); - CompilerOption("msbuildresolution", tagNone, OptionUnit (fun () -> tcConfigB.useMonoResolution<-false), None, - [ "Resolve assembly references using MSBuild resolution rules rather than directory based (Default=true except when running fsc.exe under mono)" ]); - testFlag tcConfigB ; - useIncrementalBuildFlag tcConfigB; - vsStyleErrorsFlag tcConfigB; - CompilerOption("flaterrors", tagNone, OptionUnit (fun () -> tcConfigB.flatErrors <- true), None, []); - CompilerOption("jit", tagNone, OptionSwitch (jitoptimize_switch tcConfigB), None, []); - CompilerOption("localoptimize", tagNone, OptionSwitch(localoptimize_switch tcConfigB),None, []); - CompilerOption("splitting", tagNone, OptionSwitch(splitting_switch tcConfigB),None, []); - CompilerOption("versionfile", tagString, OptionString (fun s -> tcConfigB.version <- VersionFile s), None, []); - CompilerOption("times" , tagNone, OptionUnit (fun () -> tcConfigB.showTimes <- true), None, - [ "Display timing profiles for compilation" ]); - (* BEGIN: Consider as public Retail option? *) - // Some System.Console do not have operational colors, make this available in Retail? - CompilerOption("consolecolors", tagNone, OptionSwitch (fun switch -> enableConsoleColoring <- switch=On), None, - [ "Output messages with Console colors" ]) - ] - - -// OptionBlock: Deprecated flags (fsc, service only) -//-------------------------------------------------- - -let compilingFsLibFlag (tcConfigB : TcConfigBuilder) = - CompilerOption("compiling-fslib", tagNone, OptionUnit (fun () -> tcConfigB.compilingFslib <- true; tcConfigB.TurnWarningOff(rangeStartup,"42"); Msilxlib.compiling_msilxlib_ref := true), (* Not deprecated, just undocumented *) None, []) -let mlKeywordsFlag = - CompilerOption("ml-keywords", tagNone, OptionUnit (fun () -> Lexhelp.Keywords.permitFsharpKeywords := false), Some(DeprecatedCommandLineOption("--ml-keywords", "", rangeCmdArgs)), []) - -let gnuStyleErrorsFlag tcConfigB = - CompilerOption("gnu-style-errors", tagNone, OptionUnit (fun () -> tcConfigB.errorStyle <- ErrorStyle.EmacsErrors), Some(DeprecatedCommandLineOption("--gnu-style-errors", "", rangeCmdArgs)), []) - -let deprecatedFlagsBoth tcConfigB = - [ - CompilerOption("light", tagNone, OptionUnit (fun () -> tcConfigB.light <- Some(true)), Some(DeprecatedCommandLineOption("--light", "", rangeCmdArgs)), []); - CompilerOption("indentation-syntax", tagNone, OptionUnit (fun () -> tcConfigB.light <- Some(true)), Some(DeprecatedCommandLineOption("--indentation-syntax", "", rangeCmdArgs)), []); - CompilerOption("no-indentation-syntax", tagNone, OptionUnit (fun () -> tcConfigB.light <- Some(false)), Some(DeprecatedCommandLineOption("--no-indentation-syntax", "", rangeCmdArgs)), []); - ] - -let deprecatedFlagsFsi tcConfigB = deprecatedFlagsBoth tcConfigB -let deprecatedFlagsFsc tcConfigB = - deprecatedFlagsBoth tcConfigB @ - [ - cliRootFlag tcConfigB; - CompilerOption("jit-optimize", tagNone, OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some true }), Some(DeprecatedCommandLineOption("--jit-optimize", "", rangeCmdArgs)), []); - CompilerOption("no-jit-optimize", tagNone, OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some false }), Some(DeprecatedCommandLineOption("--no-jit-optimize", "", rangeCmdArgs)), []); - CompilerOption("jit-tracking", tagNone, OptionUnit (fun _ -> tcConfigB.jitTracking <- true), Some(DeprecatedCommandLineOption("--jit-tracking", "", rangeCmdArgs)), []); - CompilerOption("no-jit-tracking", tagNone, OptionUnit (fun _ -> tcConfigB.jitTracking <- false), Some(DeprecatedCommandLineOption("--no-jit-tracking", "", rangeCmdArgs)), []); - CompilerOption("progress", tagNone, OptionUnit (fun () -> progress := true), Some(DeprecatedCommandLineOption("--progress", "", rangeCmdArgs)), []); - (compilingFsLibFlag tcConfigB) ; - CompilerOption("version", tagString, OptionString (fun s -> tcConfigB.version <- VersionString s), Some(DeprecatedCommandLineOption("--version", "", rangeCmdArgs)), []); -// "--clr-mscorlib", OptionString (fun s -> warning(Some(DeprecatedCommandLineOption("--clr-mscorlib", "", rangeCmdArgs))) ; tcConfigB.Build.mscorlib_assembly_name <- s), "\n\tThe name of mscorlib on the target CLR"; - CompilerOption("generate-config-file", tagNone, OptionUnit (fun () -> tcConfigB.generateConfigFile <- true), Some(DeprecatedCommandLineOption("--generate-config-file", "", rangeCmdArgs)), []); - CompilerOption("local-optimize", tagNone, OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some true }), Some(DeprecatedCommandLineOption("--local-optimize", "", rangeCmdArgs)), []); - CompilerOption("no-local-optimize", tagNone, OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some false }), Some(DeprecatedCommandLineOption("--no-local-optimize", "", rangeCmdArgs)), []); - CompilerOption("cross-optimize", tagNone, OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some true }), Some(DeprecatedCommandLineOption("--cross-optimize", "", rangeCmdArgs)), []); - CompilerOption("no-cross-optimize", tagNone, OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some false }), Some(DeprecatedCommandLineOption("--no-cross-optimize", "", rangeCmdArgs)), []); - CompilerOption("no-string-interning", tagNone, OptionUnit (fun () -> tcConfigB.internConstantStrings <- false), Some(DeprecatedCommandLineOption("--no-string-interning", "", rangeCmdArgs)), []); - CompilerOption("statistics", tagNone, OptionUnit (fun () -> tcConfigB.stats <- true), Some(DeprecatedCommandLineOption("--statistics", "", rangeCmdArgs)), []); - CompilerOption("generate-filter-blocks", tagNone, OptionUnit (fun () -> tcConfigB.generateFilterBlocks <- true), Some(DeprecatedCommandLineOption("--generate-filter-blocks", "", rangeCmdArgs)), []); - CompilerOption("max-errors", tagN, OptionInt (fun n -> tcConfigB.maxErrors <- n), Some(DeprecatedCommandLineOption("--max-errors", "Use '--maxerrors' instead", rangeCmdArgs)), []); - CompilerOption("debug-file", tagNone, OptionString (fun s -> tcConfigB.debugSymbolFile <- Some s), Some(DeprecatedCommandLineOption("--debug-file", "Use '--pdb' instead", rangeCmdArgs)), []); - CompilerOption("no-debug-file", tagNone, OptionUnit (fun () -> tcConfigB.debuginfo <- false), Some(DeprecatedCommandLineOption("--no-debug-file", "Use '--debug-' instead", rangeCmdArgs)), []); - CompilerOption("Ooff", tagNone, OptionUnit (fun () -> SetOptimizeOff(tcConfigB)), Some(DeprecatedCommandLineOption("-Ooff", "Use '--optimize-' instead", rangeCmdArgs)), []); - mlKeywordsFlag ; - gnuStyleErrorsFlag tcConfigB; - ] - - -// OptionBlock: Miscellaneous options -//----------------------------------- - -let DisplayBannerText tcConfigB = - if tcConfigB.showBanner then ( - printfn "%s, (c) Microsoft Corporation, All Rights Reserved" tcConfigB.product - printfn "F# Version %s, compiling for .NET Framework Version %s" Ilxconfig.version (Ilsupp.clrVersion()) - ) - -/// FSC only help. (FSI has it's own help function). -let displayHelpFsc tcConfigB (blocks:CompilerOptionBlock list) = - DisplayBannerText tcConfigB; - printCompilerOptionBlocks blocks - exit 0 - -let miscFlagsBoth tcConfigB = - [ CompilerOption("nologo", tagNone, OptionUnit (fun () -> tcConfigB.showBanner <- false), None, [ "Suppress compiler copyright message" ]); - ] - -let miscFlagsFsc tcConfigB = - miscFlagsBoth tcConfigB @ - [ CompilerOption("help", tagNone, OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, [ "Display this usage message (Short form: -?)" ]) - ] -let miscFlagsFsi tcConfigB = miscFlagsBoth tcConfigB - - -// OptionBlock: Abbreviations of existing options -//----------------------------------------------- - -let abbreviatedFlagsBoth tcConfigB = - [ - CompilerOption("d", tagString, OptionString (defineSymbol tcConfigB), None, [ "Short form of --define"]); - CompilerOption("O", tagNone, OptionSwitch (SetOptimizeSwitch tcConfigB) , None, [ "Short form of --optimize[+|-]"]); - CompilerOption("g", tagNone, OptionSwitch (SetDebugSwitch tcConfigB None), None, [ "Short form of --debug"]); - CompilerOption("i", tagString, OptionUnit (fun () -> tcConfigB.printSignature <- true), None, [ "Short form of --sig"]); - referenceFlagAbbrev tcConfigB; (* -r *) - libFlagAbbrev tcConfigB; (* -I *) - ] - -let abbreviatedFlagsFsi tcConfigB = abbreviatedFlagsBoth tcConfigB -let abbreviatedFlagsFsc tcConfigB = - abbreviatedFlagsBoth tcConfigB @ - [ (* FSC only abbreviated options *) - CompilerOption("o", tagString, OptionString (setOutFileName tcConfigB), None, [ "Short form of --out"]); - CompilerOption("a", tagString, OptionUnit (fun () -> tcConfigB.target <- Dll), None, [ "Short form of --target library" ]); - (* FSC help abbreviations. FSI has it's own help options... *) - CompilerOption("?" , tagNone, OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, [ "Short form of --help" ]); - CompilerOption("help" , tagNone, OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, [ "Short form of --help" ]); - CompilerOption("full-help", tagNone, OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, [ "Short form of --help" ]) - ] - -let abbrevFlagSet tcConfigB isFsc = - let mutable argList : string list = [] - for c in ((if isFsc then abbreviatedFlagsFsc else abbreviatedFlagsFsi) tcConfigB) do - match c with - | CompilerOption(arg,_,OptionString s,_,_) - | CompilerOption(arg,_,OptionStringList s,_,_) -> argList <- argList @ ["-"^arg;"/"^arg] - | _ -> () - Set argList - -// check for abbreviated options that accept spaces instead of colons, and replace the spaces -// with colons when necessary -let PostProcessCompilerArgs (abbrevArgs : string Set) (args : string[]) = - let mutable i = 0 - let mutable idx = 0 - let len = args.Length - let mutable arga : string[] = Array.create len "" - - while i < len do - if not(abbrevArgs.Contains(args.[i])) || i = (len - 1) then - arga.[idx] <- args.[i] ; - i <- i+1 - else - arga.[idx] <- args.[i] ^ ":" ^ args.[i+1] - i <- i + 2 - idx <- idx + 1 - Array.to_list arga.[0 .. (idx - 1)] - -// OptionBlock: QA options -//------------------------ - -let testingAndQAFlags tcConfigB = - [ - CompilerOption("dumpAllCommandLineOptions", tagNone, OptionHelp(fun blocks -> dumpCompilerOptionBlocks blocks), None, ["Command line options"]) - ] - - -// Core compiler options, overview -//-------------------------------- - -(* The "core" compiler options are "the ones defined here". - Currently, fsi.exe has some additional options, defined in fsi.fs. - - The compiler options are put into blocks, named as Flags. - Some block options differ between fsc and fsi, in this case they split as FlagsFsc and FlagsFsi. - - The "service.ml" (language service) flags are the same as the fsc flags (except help options are removed). - REVIEW: is this correct? what about fsx files in VS and fsi options? - - Block | notes - ---------------------------|-------------------- - outputFileFlags | - inputFileFlags | - resourcesFlags | - codeGenerationFlags | - errorsAndWarningsFlags | - languageFlags | - htmlFlags | - miscFlags | - advancedFlags | - internalFlags | - abbreviatedFlags | - deprecatedFlags | REVIEW: some of these may have been valid for fsi.exe? - fsiSpecificFlags | These are defined later, in fsi.fs - ---------------------------|-------------------- -*) - -// Core compiler options exported to fsc.ml, service.ml and fsi.fs -//---------------------------------------------------------------- - -/// The core/common options used by fsc.exe. [not currently extended by fsc.ml]. -let GetCoreFscCompilerOptions (tcConfigB: TcConfigBuilder) = - [ PublicOptions("- OUTPUT FILES -" , outputFileFlagsFsc tcConfigB); - PublicOptions("- INPUT FILES -" , inputFileFlagsFsc tcConfigB); - PublicOptions("- RESOURCES -" , resourcesFlagsFsc tcConfigB); - PublicOptions("- CODE GENERATION -" , codeGenerationFlags tcConfigB); - PublicOptions("- ERRORS AND WARNINGS -" , errorsAndWarningsFlags tcConfigB); - PublicOptions("- LANGUAGE -" , languageFlags tcConfigB); - PublicOptions("- HTML -" , htmlFlagsFsc tcConfigB); - PublicOptions("- MISCELLANEOUS -" , miscFlagsFsc tcConfigB); - PublicOptions("- ADVANCED -" , advancedFlagsFsc tcConfigB); - PrivateOptions(List.concat [ internalFlags tcConfigB; - abbreviatedFlagsFsc tcConfigB; - deprecatedFlagsFsc tcConfigB; - testingAndQAFlags tcConfigB]) - ] - -/// The core/common options used by the F# VS Language Service. -/// Filter out OptionHelp which does printing then exit. This is not wanted in the context of VS!! -let GetCoreServiceCompilerOptions (tcConfigB:TcConfigBuilder) = - let isHelpOption = function CompilerOption(s,tag,OptionHelp _,_,descr) -> true | opt -> false - List.map (filterCompilerOptionBlock (isHelpOption >> not)) (GetCoreFscCompilerOptions tcConfigB) - -/// The core/common options used by fsi.exe. [note, some additional options are added in fsi.fs]. -let GetCoreFsiCompilerOptions (tcConfigB: TcConfigBuilder) = - [ PublicOptions("- OUTPUT FILES -" , outputFileFlagsFsi tcConfigB); - PublicOptions("- INPUT FILES -" , inputFileFlagsFsi tcConfigB); - PublicOptions("- RESOURCES -" , resourcesFlagsFsi tcConfigB); - PublicOptions("- CODE GENERATION -" , codeGenerationFlags tcConfigB); - PublicOptions("- ERRORS AND WARNINGS -" , errorsAndWarningsFlags tcConfigB); - PublicOptions("- LANGUAGE -" , languageFlags tcConfigB); - // Note: no HTML block for fsi.exe - PublicOptions("- MISCELLANEOUS -" , miscFlagsFsi tcConfigB); - PublicOptions("- ADVANCED -" , advancedFlagsFsi tcConfigB); - PrivateOptions(List.concat [ internalFlags tcConfigB; - abbreviatedFlagsFsi tcConfigB; - deprecatedFlagsFsi tcConfigB; - testingAndQAFlags tcConfigB]) - ] - - -(*---------------------------------------------------------------------------- -!* parsing - ParseOneInputFile - * Filename is either (ml/mli/fs/fsi source) or (.resx file). - * For source file, parse it to AST. For .resx compile to .resource and - * read. - *--------------------------------------------------------------------------*) - -let ParseOneInputFile (tcConfig:TcConfig,lexResourceManager,conditionalCompilationDefines,filename,canContainEntryPoint,errorLogger) = - try - let lower = String.lowercase filename - if List.exists (Filename.check_suffix lower) (sigSuffixes@implSuffixes) then - if not(Internal.Utilities.FileSystem.File.SafeExists(filename)) then - error(Error("Source file '"^filename^"' could not be found",rangeStartup)) - // bug 3155: if the file name is indirect, use a full path - let shortFilename = SanitizeFileName filename tcConfig.implicitIncludeDir - let stream,reader,lexbuf = UnicodeLexing.UnicodeFileAsLexbuf(filename,tcConfig.inputCodePage) - use stream = stream - use reader = reader - let skip = true in (* don't report whitespace from lexer *) - let lightSyntaxStatus = LightSyntaxStatus (tcConfig.ComputeLightSyntaxInitialStatus filename,true) - let syntaxFlagRequired = tcConfig.ComputeSyntaxFlagRequired(filename) - let lexargs = mkLexargs ((fun () -> tcConfig.implicitIncludeDir),filename,conditionalCompilationDefines@tcConfig.conditionalCompilationDefines,lightSyntaxStatus,lexResourceManager, ref [],errorLogger) - let input = - Lexhelp.usingLexbufForParsing (lexbuf,filename,None) (fun lexbuf -> - if verbose then dprintn ("Parsing... "^shortFilename); - let tokenizer = Lexfilter.create syntaxFlagRequired lightSyntaxStatus (Lexer.token lexargs skip) lexbuf - - if tcConfig.tokenizeOnly then - while true do - Printf.printf "tokenize - getting one token from %s\n" shortFilename; - let t = tokenizer.lexer lexbuf - Printf.printf "tokenize - got %s @ %a\n" (Parser.token_to_string t) output_range (GetLexerRange lexbuf); - (match t with Parser.EOF _ -> exit 0 | _ -> ()); - if lexbuf.IsPastEndOfStream then Printf.printf "!!! at end of stream\n" - - if tcConfig.testInteractionParser then - while true do - match (Parser.interaction tokenizer.lexer lexbuf) with - | IDefns(l,m) -> dprintf "Parsed OK, got %d defs @ %a\n" (List.length l) output_range m; - | IHash (_,m) -> dprintf "Parsed OK, got hash @ %a\n" output_range m; - exit 0; - - let res = ParseInput(tokenizer.lexer,errorLogger,lexbuf,None,filename,canContainEntryPoint) - - if tcConfig.reportNumDecls then - let rec flattenSpecs specs = - specs |> List.collect (function (Spec_module (_,subDecls,_)) -> flattenSpecs subDecls | spec -> [spec]) - let rec flattenDefns specs = - specs |> List.collect (function (Def_module (_,subDecls,_,_)) -> flattenDefns subDecls | defn -> [defn]) - - let flattenModSpec (ModuleOrNamespaceSpec(_,_,decls,_,_,_,_)) = flattenSpecs decls - let flattenModImpl (ModuleOrNamespaceImpl(_,_,decls,_,_,_,_)) = flattenDefns decls - match res with - | SigFileInput(SigFile(_,_,_,_,specs)) -> - dprintf "parsing yielded %d specs" (List.length (List.collect flattenModSpec specs)) - | ImplFileInput(ImplFile(_,_,_,_,_,impls,_)) -> - dprintf "parsing yielded %d definitions" (List.length (List.collect flattenModImpl impls)) - res - ) - if verbose then dprintn ("Parsed "^shortFilename); - Some input - - else error(Error("The file extension of "^(SanitizeFileName filename tcConfig.implicitIncludeDir)^" is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli",rangeStartup)) - with e -> (* errorR(Failure("parse failed")); *) errorRecovery e rangeStartup; None - -(*---------------------------------------------------------------------------- -!* PrintWholeAssemblyImplementation - *--------------------------------------------------------------------------*) - -let showTermFileCount = ref 0 -let PrintWholeAssemblyImplementation (tcConfig:TcConfig) outfile header expr = - if tcConfig.showTerms then - if tcConfig.writeTermsToFiles then - let filename = outfile ^ ".terms" - let n = !showTermFileCount - showTermFileCount := n+1; - use f = open_out (filename ^ "-" ^ string n ^ "-" ^ header) - Layout.outL f (Layout.squashTo 192 (AssemblyL expr)); - else - dprintf "\n------------------\nshowTerm: %s:\n" header; - Layout.outL stderr (Layout.squashTo 192 (AssemblyL expr)); - dprintf "\n------------------\n"; - -(*---------------------------------------------------------------------------- -!* ReportTime - *--------------------------------------------------------------------------*) - -let tPrev = ref None -let nPrev = ref None -let ReportTime (tcConfig:TcConfig) descr = - - match !nPrev with - | None -> () - | Some prevDescr -> - if tcConfig.pause then - dprintf "[done '%s', entering '%s'] press any key... " prevDescr descr; - System.Console.ReadLine() |> ignore; - // Intentionally putting this right after the pause so a debugger can be attached. - match tcConfig.simulateException with - | Some("fsc-oom") -> raise(System.OutOfMemoryException()) - | Some("fsc-an") -> raise(System.ArgumentNullException("simulated")) - | Some("fsc-invop") -> raise(System.InvalidOperationException()) - | Some("fsc-av") -> raise(System.AccessViolationException()) - | Some("fsc-aor") -> raise(System.ArgumentOutOfRangeException()) - | Some("fsc-dv0") -> raise(System.DivideByZeroException()) - | Some("fsc-nfn") -> raise(System.NotFiniteNumberException()) - | Some("fsc-oe") -> raise(System.OverflowException()) - | Some("fsc-atmm") -> raise(System.ArrayTypeMismatchException()) - | Some("fsc-bif") -> raise(System.BadImageFormatException()) - | Some("fsc-knf") -> raise(System.Collections.Generic.KeyNotFoundException()) - | Some("fsc-ior") -> raise(System.IndexOutOfRangeException()) - | Some("fsc-ic") -> raise(System.InvalidCastException()) - | Some("fsc-ip") -> raise(System.InvalidProgramException()) - | Some("fsc-ma") -> raise(System.MemberAccessException()) - | Some("fsc-ni") -> raise(System.NotImplementedException()) - | Some("fsc-nr") -> raise(System.NullReferenceException()) - | Some("fsc-oc") -> raise(System.OperationCanceledException()) - | Some("fsc-fail") -> failwith "simulated" - | _ -> () - - - - - if (tcConfig.showTimes || verbose) then - // Note that Sys.time calls are relatively expensive on the startup path so we don't - // make this call unless showTimes has been turned on. - let timeNow = System.Diagnostics.Process.GetCurrentProcess().UserProcessorTime.TotalSeconds - let maxGen = System.GC.MaxGeneration - let gcNow = [| for i in 0 .. maxGen -> System.GC.CollectionCount(i) |] - let ptime = System.Diagnostics.Process.GetCurrentProcess() - let wsNow = ptime.WorkingSet/1000000 - - match !tPrev, !nPrev with - | Some (timePrev,gcPrev:int[]),Some prevDescr -> - let spanGC = [| for i in 0 .. maxGen -> System.GC.CollectionCount(i) - gcPrev.[i] |] - dprintf "TIME: %4.1f Delta: %4.1f Mem: %3d" - timeNow (timeNow - timePrev) - wsNow; - dprintf " G0: %3d G1: %2d G2: %2d [%s]\n" - spanGC.[Operators.min 0 maxGen] spanGC.[Operators.min 1 maxGen] spanGC.[Operators.min 2 maxGen] - prevDescr - - | _ -> () - tPrev := Some (timeNow,gcNow) - - nPrev := Some descr - -(*---------------------------------------------------------------------------- -!* OPTIMIZATION - support - addDllToOptEnv - *--------------------------------------------------------------------------*) - -let AddExternalCcuToOpimizationEnv optEnv ccuinfo = - match ccuinfo.FSharpOptimizationData.Force() with - | None -> optEnv - | Some(data) -> Opt.BindCcu ccuinfo.FSharpViewOfMetadata data optEnv - -(*---------------------------------------------------------------------------- -!* OPTIMIZATION - support - optimize - *--------------------------------------------------------------------------*) - - -let InitialOptimizationEnv (tcImports:TcImports) = - let ccuinfos = tcImports.GetCcuInfos() - let optEnv = Opt.empty_env - let optEnv = List.fold AddExternalCcuToOpimizationEnv optEnv ccuinfos - optEnv - -let ApplyAllOptimizations (tcConfig:TcConfig,tcGlobals,outfile,importMap,isIncrementalFragment,optEnv,ccu:ccu,tassembly:TypedAssembly) = - (* NOTE: optEnv - threads through *) - (*---*) - (* Always optimize once - the results of this step give the x-module optimization *) - (* info. Subsequent optimization steps choose representations etc. which we don't *) - (* want to save in the x-module info (i.e. x-module info is currently "high level"). *) - PrintWholeAssemblyImplementation tcConfig outfile "pass-start" tassembly; -#if DEBUG - if tcConfig.showOptimizationData then dprintf "Expression prior to optimization:\n%s\n" (Layout.showL (Layout.squashTo 192 (AssemblyL tassembly))); - if tcConfig.showOptimizationData then dprintf "CCU prior to optimization:\n%s\n" (Layout.showL (Layout.squashTo 192 (EntityL ccu.Contents))); -#endif - - let optEnv0 = optEnv - let (TAssembly(implFiles)) = tassembly - ReportTime tcConfig ("Optimizations"); - let results,(optEnvFirstLoop,_,_) = - ((optEnv0,optEnv0,optEnv0),implFiles) ||> List.mapfold (fun (optEnvFirstLoop,optEnvExtraLoop,optEnvFinalSimplify) implFile -> - - // Only do abstract_big_targets on the first pass! Only do it when TLR is on! - let optSettings = tcConfig.optSettings - let optSettings = { optSettings with abstractBigTargets = tcConfig.doTLR } - let optSettings = { optSettings with reportingPhase = true } - - //ReportTime tcConfig ("Initial simplify"); - let optEnvFirstLoop,implFile,implFileOptData = - Opt.OptimizeImplFile(optSettings,ccu,tcGlobals,importMap,optEnvFirstLoop,isIncrementalFragment,implFile) - - // Only do this on the first pass! - let optSettings = { optSettings with abstractBigTargets = false } - let optSettings = { optSettings with reportingPhase = false } -#if DEBUG - if tcConfig.showOptimizationData then dprintf "Optimization implFileOptData:\n%s\n" (Layout.showL (Layout.squashTo 192 (Opt.moduleInfoL implFileOptData))); -#endif - - let implFile,optEnvExtraLoop = - if tcConfig.extraOptimizationIterations > 0 then - //ReportTime tcConfig ("Extra simplification loop"); - let optEnvExtraLoop,implFile, _ = Opt.OptimizeImplFile(optSettings,ccu,tcGlobals,importMap,optEnvExtraLoop,isIncrementalFragment,implFile) - //PrintWholeAssemblyImplementation tcConfig outfile (Printf.sprintf "extra-loop-%d" n) implFile; - implFile,optEnvExtraLoop - else - implFile,optEnvExtraLoop - - let implFile = - if tcConfig.doDetuple then - //ReportTime tcConfig ("Detupled optimization"); - let implFile = implFile |> Detuple.DetupleImplFile ccu tcGlobals - //PrintWholeAssemblyImplementation tcConfig outfile "post-detuple" implFile; - implFile - else implFile - - let implFile = - if tcConfig.doTLR then - implFile |> Tlr.MakeTLRDecisions ccu tcGlobals - else implFile - - let implFile = - Lowertop.LowerImplFile tcGlobals implFile - - let implFile,optEnvFinalSimplify = - if tcConfig.doTLR then - //ReportTime tcConfig ("Final simplify pass"); - let optEnvFinalSimplify,implFile, _ = Opt.OptimizeImplFile(optSettings,ccu,tcGlobals,importMap,optEnvFinalSimplify,isIncrementalFragment,implFile) - //PrintWholeAssemblyImplementation tcConfig outfile "post-rec-opt" implFile; - implFile,optEnvFinalSimplify - else - implFile,optEnvFinalSimplify - (implFile,implFileOptData),(optEnvFirstLoop,optEnvExtraLoop,optEnvFinalSimplify)) - - let implFiles,implFileOptDatas = List.unzip results - let assemblyOptData = Opt.UnionModuleInfos implFileOptDatas - let tassembly = TAssembly(implFiles) - PrintWholeAssemblyImplementation tcConfig outfile "pass-end" tassembly; - ReportTime tcConfig ("Ending Optimizations"); - - tassembly, assemblyOptData,optEnvFirstLoop - -(*---------------------------------------------------------------------------- -!* ILX generation - *--------------------------------------------------------------------------*) - -let IlxgenEnvInit (tcConfig:TcConfig,tcImports:TcImports,tcGlobals,generatedCcu) = - let ccus = tcImports.GetCcusInDeclOrder() - let ilxGenEnv = Ilxgen.GetEmptyIlxGenEnv generatedCcu - Ilxgen.AddExternalCcusToIlxGenEnv tcGlobals ilxGenEnv ccus - - -let GenerateIlxCode(isInteractive,isInteractiveOnMono, tcGlobals, tcConfig:TcConfig, importMap,topAttrs,optimizedImpls,generatedCcu,fragName,ilxGenEnv) = - if !progress then dprintf "Generating ILX code...\n"; - let cenv = { g=tcGlobals; - viewCcu = generatedCcu; - generateFilterBlocks = tcConfig.generateFilterBlocks; - emitConstantArraysUsingStaticDataBlobs = not isInteractiveOnMono; - workAroundReflectionEmitBugs=isInteractive; (* REVIEW: is this still required? *) - debug= tcConfig.debuginfo; - fragName = fragName; - localOptimizationsAreOn= tcConfig.optSettings.localOpt (); - Ilxgen.amap=importMap; - mainMethodInfo= (if (tcConfig.target = Dll || tcConfig.target = Module) then None else Some topAttrs.mainMethodAttrs); - emptyProgramOk = isInteractive; - } - Ilxgen.GenerateCode cenv ilxGenEnv optimizedImpls (topAttrs.assemblyAttrs,topAttrs.netModuleAttrs) - - - -(*---------------------------------------------------------------------------- -!* Assembly ref normalization: make sure all assemblies are referred to - * by the same references. - *--------------------------------------------------------------------------*) - -let NormalizeAssemblyRefs (tcImports:TcImports) = - if verbose then dprintn "Normalizing assembly references in generated IL code..."; - let assemFinder nm = tcImports.FindDllInfo(Range.rangeStartup,nm) - (fun scoref -> - match scoref with - | ScopeRef_local - | ScopeRef_module _ -> scoref - | ScopeRef_assembly aref -> (assemFinder aref.Name).ILScopeRef) - -let fsharpModuleName (t:target) (s:string) = - // return the name of the file as a module name - let ext = match t with | Dll -> "dll" | Module -> "netmodule" | _ -> "exe" - s + "." + ext - - -let ignoreFailureOnMono1_1_16 f = try f() with _ -> () - -let DoWithErrorColor isWarn f = - if not enableConsoleColoring then - f() - else - let foreBackColor = - try - let c = Console.ForegroundColor // may fail, perhaps on Mac, and maybe ForegroundColor is Black - let b = Console.BackgroundColor // may fail, perhaps on Mac, and maybe BackgroundColor is White - Some (c,b) - with - e -> None - match foreBackColor with - | None -> f() (* could not get console colours, so no attempt to change colours, can not set them back *) - | Some (c,b) -> - try - let warnColor = if Console.BackgroundColor = ConsoleColor.White then ConsoleColor.DarkBlue else ConsoleColor.Cyan - let errorColor = ConsoleColor.Red - ignoreFailureOnMono1_1_16 (fun () -> Console.ForegroundColor <- (if isWarn then warnColor else errorColor)); - f(); - finally - ignoreFailureOnMono1_1_16 (fun () -> Console.ForegroundColor <- c) - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/fscopts.mli b/tools/FSharp_1.9.6.16/source/fsharp/fscopts.mli deleted file mode 100644 index 0f7f8c47..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/fscopts.mli +++ /dev/null @@ -1,54 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module (* internal *) Microsoft.FSharp.Compiler.Fscopts - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Build -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Ilxgen -open Microsoft.FSharp.Compiler.Import -open Microsoft.FSharp.Compiler.Opt -open Microsoft.FSharp.Compiler.Env - -val DisplayBannerText : TcConfigBuilder -> unit - -//val GetCompilerOptions : TcConfigBuilder -> CompilerOption list -> CompilerOption list -val GetCoreFscCompilerOptions : TcConfigBuilder -> CompilerOptionBlock list -val GetCoreFsiCompilerOptions : TcConfigBuilder -> CompilerOptionBlock list -val GetCoreServiceCompilerOptions : TcConfigBuilder -> CompilerOptionBlock list - -// Expose the "setters" for some user switches, to enable setting of defaults -val SetOptimizeSwitch : TcConfigBuilder -> OptionSwitch -> unit -val SetTailcallSwitch : OptionSwitch -> unit -val SetDebugSwitch : TcConfigBuilder -> string option -> OptionSwitch -> unit -val PrintOptionInfo : TcConfigBuilder -> unit - -val fsharpModuleName : target -> string -> string - -val ParseOneInputFile : TcConfig * Lexhelp.LexResourceManager * string list * string * canContainEntryPoint: bool * ErrorLogger -> input option - -val InitialOptimizationEnv : TcImports -> IncrementalOptimizationEnv -val AddExternalCcuToOpimizationEnv : IncrementalOptimizationEnv -> ImportedAssembly -> IncrementalOptimizationEnv -val ApplyAllOptimizations : TcConfig * TcGlobals * string * ImportMap * bool * IncrementalOptimizationEnv * ccu * TypedAssembly -> TypedAssembly * Opt.LazyModuleInfo * IncrementalOptimizationEnv - -val IlxgenEnvInit : TcConfig * TcImports * TcGlobals * ccu -> ilxGenEnv -val GenerateIlxCode : bool * bool * TcGlobals * TcConfig * ImportMap * TypeChecker.topAttribs * TypedAssembly * ccu * string * ilxGenEnv -> CodegenResults - -// Used during static linking -val NormalizeAssemblyRefs : TcImports -> (AbstractIL.IL.ILScopeRef -> AbstractIL.IL.ILScopeRef) - -// Miscellany -val ignoreFailureOnMono1_1_16 : (unit -> unit) -> unit -val mutable enableConsoleColoring : bool -val DoWithErrorColor : bool -> (unit -> 'a) -> 'a -val ReportTime : TcConfig -> string -> unit -val abbrevFlagSet : TcConfigBuilder -> bool -> string Set -val PostProcessCompilerArgs : string Set -> string [] -> string list diff --git a/tools/FSharp_1.9.6.16/source/fsharp/fsiattrs.fs b/tools/FSharp_1.9.6.16/source/fsharp/fsiattrs.fs deleted file mode 100644 index d9c66cad..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/fsiattrs.fs +++ /dev/null @@ -1,10 +0,0 @@ -//========================================================================== -// (c) Microsoft Corporation 2005-2009. -//========================================================================== - -#light - -module Microsoft.FSharp.Compiler.Interactive.Attributes -[] -do() - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/fsiaux.fs b/tools/FSharp_1.9.6.16/source/fsharp/fsiaux.fs deleted file mode 100644 index 48a73798..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/fsiaux.fs +++ /dev/null @@ -1,201 +0,0 @@ -//========================================================================== -// (c) Microsoft Corporation 2005-2009. -//========================================================================== - -#light -#nowarn "64" // fsiaux.fs(56,26): error FS0064: This construct causes code to be less generic than indicated by the type annotations. The type variable 'a has been constrained to be type ''a' - -namespace Microsoft.FSharp.Compiler.Interactive - -open System -open System.Diagnostics -open System.Threading -open Internal.Utilities.StructuredFormat -open Internal.Utilities.StructuredFormat.LayoutOps - -[] -[] -do() - -type IEventLoop = - abstract Run : unit -> bool - abstract Invoke : (unit -> 'a) -> 'a - abstract ScheduleRestart : unit -> unit - -// An implementation of IEventLoop suitable for the command-line console -[] -type SimpleEventLoop() = - let runSignal = new AutoResetEvent(false) - let exitSignal = new AutoResetEvent(false) - let doneSignal = new AutoResetEvent(false) - let queue = ref ([] : (unit -> obj) list) - let result = ref (None : obj option) - let setSignal(signal : AutoResetEvent) = while not (signal.Set()) do Thread.Sleep(1); done - let waitSignal signal = WaitHandle.WaitAll([| (signal :> WaitHandle) |]) |> ignore - let waitSignal2 signal1 signal2 = - WaitHandle.WaitAny([| (signal1 :> WaitHandle); (signal2 :> WaitHandle) |]) - let running = ref false - let restart = ref false - interface IEventLoop with - member x.Run() = - running := true; - let rec run() = - match waitSignal2 runSignal exitSignal with - | 0 -> - !queue |> List.iter (fun f -> result := try Some(f()) with _ -> None); - setSignal doneSignal; - run() - | 1 -> - running := false; - !restart - | _ -> run() - run(); - member x.Invoke(f : unit -> 'a) : 'a = - queue := [f >> box]; - setSignal runSignal; - waitSignal doneSignal - !result |> Option.get |> unbox - member x.ScheduleRestart() = - // nb. very minor race condition here on running here, but totally - // unproblematic as ScheduleRestart and Exit are almost never called. - if !running then - restart := true; - setSignal exitSignal - interface System.IDisposable with - member x.Dispose() = - runSignal.Close(); - exitSignal.Close(); - doneSignal.Close(); - - - -[] -type InteractiveSession() as self = - let mutable evLoop = (new SimpleEventLoop() :> IEventLoop) - let mutable showIDictionary = true - let mutable showDeclarationValues = true - let mutable args = System.Environment.GetCommandLineArgs() - let mutable opts = { FormatOptions.Default with ShowProperties=true; - ShowIEnumerable=true; - PrintWidth=78 } - // Add a default printer for dictionaries - let intercept (ienv: Internal.Utilities.StructuredFormat.IEnvironment) (obj:obj) = - match obj with - | null -> None - | :? System.Collections.IDictionary as ie -> - let it = ie.GetEnumerator() - try - let itemLs = - unfoldL // the function to layout each object in the unfold - (fun obj -> ienv.GetLayout obj) - // the function to call at each step of the unfold - (fun () -> - if it.MoveNext() then - Some((it.Key, it.Value),()) - else None) () - // the maximum length - (1+opts.PrintLength/3) - let makeListL itemLs = - (leftL "[") $$ - sepListL (rightL ";") itemLs $$ - (rightL "]") - Some(wordL "dict" --- makeListL itemLs) - finally - match it with - | :? System.IDisposable as d -> d.Dispose() - | _ -> () - - | _ -> None - - let fireThreadExn, threadExn = Event.create() - - do self.PrintIntercepts <- intercept :: self.PrintIntercepts - - - member self.FloatingPointFormat - with get() = opts.FloatingPointFormat - and set(x) = opts <- { opts with FloatingPointFormat=x} - member self.FormatProvider - with get() = opts.FormatProvider - and set(x:System.IFormatProvider)= opts <- { opts with FormatProvider=x} - member self.PrintWidth - with get() = opts.PrintWidth - and set(x) = opts <- { opts with PrintWidth=x} - member self.PrintDepth - with get() = opts.PrintDepth - and set(x) = opts <- { opts with PrintDepth=x} - member self.PrintLength - with get() = opts.PrintLength - and set(x) = opts <- { opts with PrintLength=x} - member self.PrintSize - with get() = opts.PrintSize - and set(x) = opts <- { opts with PrintSize=x} - member self.ShowDeclarationValues - with get() = showDeclarationValues - and set(x) = showDeclarationValues <- x - member self.ShowProperties - with get() = opts.ShowProperties - and set(x) = opts <- { opts with ShowProperties=x} - member self.ShowIEnumerable - with get() = opts.ShowIEnumerable - and set(x) = opts <- { opts with ShowIEnumerable=x} - member self.ShowIDictionary - with get() = showIDictionary - and set(x) = showIDictionary <- x - member self.PrintIntercepts - with get() = opts.PrintIntercepts - and set(x) = opts <- { opts with PrintIntercepts=x} - member self.PrintOptions - with get() = opts - - [] - member self.CommandLineArgs - with get() = args - and set(x) = args <- x - member self.AddPrinter(f : 'a -> string) = - let aty = typeof<'a> in - let intercept ienv (obj:obj) = - match obj with - | null -> None - | _ when (aty).IsAssignableFrom(obj.GetType()) -> - Some(Internal.Utilities.StructuredFormat.LayoutOps.wordL( f(unbox obj))) - | _ -> None in - opts <- { opts with PrintIntercepts = (intercept :: opts.PrintIntercepts) } - member self.EventLoop - with get() = evLoop - and set(x:IEventLoop) = evLoop.ScheduleRestart(); evLoop <- x - - member self.AddPrintTransformer(f : 'a -> obj) = - let aty = typeof<'a> in - let intercept (ienv:Internal.Utilities.StructuredFormat.IEnvironment) (obj:obj) = - match obj with - | null -> None - | _ when (aty).IsAssignableFrom(obj.GetType()) -> - Some(ienv.GetLayout(f(unbox obj))) - | _ -> None in - opts <- { opts with PrintIntercepts = (intercept :: opts.PrintIntercepts) } - - member x.ReportThreadException(exn:exn) = fireThreadExn(exn) - - member x.ThreadException = threadExn - -[] -do() - - -module Settings = - let fsi = new InteractiveSession() - - [] - do() - -module Internals = - open System - open System.Reflection - - let savedIt = ref (typeof,box 0) - let SaveIt (x:'a) = (savedIt := (typeof<'a>, (box x))) - let GetSavedIt () = snd !savedIt - let GetSavedItType () = fst !savedIt - let GetFsiPrintOptions () = Settings.fsi.PrintOptions - let GetFsiShowDeclarationValues () = Settings.fsi.ShowDeclarationValues diff --git a/tools/FSharp_1.9.6.16/source/fsharp/fsiaux.fsi b/tools/FSharp_1.9.6.16/source/fsharp/fsiaux.fsi deleted file mode 100644 index 6998bce2..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/fsiaux.fsi +++ /dev/null @@ -1,63 +0,0 @@ - -#light - -namespace Microsoft.FSharp.Compiler.Interactive - -type IEventLoop = - /// Enter the run loop on the main thread of the event loop. - /// Call this from the GUI thread. - /// - /// A return of 'true' indicates 'I was replaced mid-flight and you can try to restart a different event loop' - /// A return of 'false' indicates a normal exit, e.g. a call to System.Windows.Forms.Application.Exit() - abstract Run : unit -> bool - /// Call this from a worker thread. Runs the operation synchronously. - abstract Invoke : (unit -> 'a) -> 'a - /// Call this from a worker thread. Notify the event loop that - /// it should exit the 'Run' loop on its main thread with a return value - /// of 'true' indicating an attempt to restart. Ignored if not running. - abstract ScheduleRestart : unit -> unit - -[] -type InteractiveSession = - member FloatingPointFormat: string with get,set - member FormatProvider: System.IFormatProvider with get,set - member PrintWidth : int with get,set - member PrintDepth : int with get,set - member PrintLength : int with get,set - member PrintSize : int with get,set - member ShowProperties : bool with get,set - member ShowIEnumerable: bool with get,set - member ShowDeclarationValues: bool with get,set - member AddPrinter: ('a -> string) -> unit - member AddPrintTransformer: ('a -> obj) -> unit - - /// The command line arguments after ignoring the arguments relevant to the interactive - /// environment and replacing the first argument with the name of the last script file, - /// if any. Thus 'fsi.exe test1.fs test2.fs -- hello goodbye' will give arguments - /// 'test2.fs', 'hello', 'goodbye'. This value will normally be different to those - /// returned by System.Environment.GetCommandLineArgs and Sys.argv. - member CommandLineArgs : string [] with get,set - - [] - member EventLoop: IEventLoop with get,set - - [] - member ReportThreadException: exn -> unit - - [] - member ThreadException: IEvent - - -module Settings = - - val fsi : InteractiveSession - -/// Hooks (internal use only, may change without notice). -module Internals = - val GetFsiPrintOptions : unit -> Internal.Utilities.StructuredFormat.FormatOptions - val SaveIt : 'a -> unit - val GetSavedIt : unit -> obj - val GetSavedItType : unit -> System.Type - val GetFsiShowDeclarationValues : unit -> bool -(* val openPaths : unit -> string[] *) - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/fsiserver/fsiserver.fs b/tools/FSharp_1.9.6.16/source/fsharp/fsiserver/fsiserver.fs deleted file mode 100644 index 585173c1..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/fsiserver/fsiserver.fs +++ /dev/null @@ -1,51 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - -#light - - -//[] // avoid calling the type "Shared" which is keyword in some languages -namespace Microsoft.FSharp.Compiler.Server.Shared - -// For FSI VS plugin, require FSI to provide services: -// e.g. -// - interrupt -// - intelisense completion -// -// This is done via remoting. -// Here we define the service class. -// This dll is required for both client (fsi-vs plugin) and server (spawned fsi). - -//[] -[] -[] -do() - -open System -open System.Diagnostics -open System.Runtime.Remoting.Channels -open System.Runtime.Remoting -open System.Runtime.Remoting.Lifetime - -[] -type FSharpInteractiveServer() = - inherit System.MarshalByRefObject() - abstract Interrupt : unit -> unit - abstract Completions : prefix:string -> string array - abstract GetDeclarations : text:string * names:string array -> (string * string * string * int) array - default x.Interrupt() = () - - [] - static member StartServer(channelName:string,server:FSharpInteractiveServer) = - let chan = new Ipc.IpcChannel(channelName) - LifetimeServices.LeaseTime <- TimeSpan(7,0,0,0); // days,hours,mins,secs - LifetimeServices.LeaseManagerPollTime <- TimeSpan(7,0,0,0); - LifetimeServices.RenewOnCallTime <- TimeSpan(7,0,0,0); - LifetimeServices.SponsorshipTimeout <- TimeSpan(7,0,0,0); - ChannelServices.RegisterChannel(chan,false); - let objRef = RemotingServices.Marshal(server,"FSIServer") - () - - static member StartClient(channelName) = - let T = Activator.GetObject(typeof,"ipc://" ^ channelName ^ "/FSIServer") in - let x = T :?> FSharpInteractiveServer in - x diff --git a/tools/FSharp_1.9.6.16/source/fsharp/ilxgen.ml b/tools/FSharp_1.9.6.16/source/fsharp/ilxgen.ml deleted file mode 100644 index 348da19a..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/ilxgen.ml +++ /dev/null @@ -1,6210 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -//-------------------------------------------------------------------------- -// The ILX generator. -// -// NOTE: unit have NULL storage (no point storing units). -//-------------------------------------------------------------------------- - -module (* internal *) Microsoft.FSharp.Compiler.Ilxgen - -open System.IO -open Internal.Utilities -open Internal.Utilities.Pervasives -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics - -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.PrettyNaming -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.Layout -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Typrelns - -module Ilx = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types - - -let verbose = false // (System.Environment.GetEnvironmentVariable("VERBOSE_ILXGEN") <> null) -let generatePublicAsInternal = ref false // flag can be set, see fscopts.ml - -let IsNonErasedTypar (tp:Typar) = not tp.IsErased -let DropErasedTypars (tps:Typar list) = tps |> List.filter IsNonErasedTypar -let DropErasedTyargs tys = tys |> List.filter (fun ty -> match ty with TType_measure _ -> false | _ -> true) -let AddSpecialNameFlag (mdef:ILMethodDef) = { mdef with mdSpecialName = true } - -let AddNonUserCompilerGeneratedAttribs g (mdef:ILMethodDef) = add_mdef_generated_attrs g.ilg mdef - -let debugDisplayMethodName = "__DebugDisplay" - -//-------------------------------------------------------------------------- -// misc -//-------------------------------------------------------------------------- - -let i_pop = I_arith AI_pop -let i_nop = I_arith AI_nop -let i_dup = I_arith AI_dup -let i_ldnull = I_arith AI_ldnull -let i_ldc_i32_0 = I_arith (AI_ldc (DT_I4,NUM_I4 0)) -let mk_ldc_i64 i = I_arith (AI_ldc (DT_I8,NUM_I8 i)) -let mk_ldc_double i = I_arith (AI_ldc (DT_R8,NUM_R8 i)) -let mk_ldc_single i = I_arith (AI_ldc (DT_R4,NUM_R4 i)) - -/// Make a method that simply loads a field -let mk_ldfld_method_def (methnm,reprAccess,stat,ilty,fldName,propType) = - let il_fspec = mk_fspec_in_typ(ilty,fldName,propType) - let ret = mk_return propType - let mdef = - if stat then - mk_static_nongeneric_mdef (methnm,reprAccess,[],ret,MethodBody_il(mk_ilmbody(true,[],2,nonbranching_instrs_to_code([mk_normal_ldsfld il_fspec]),None))) - else - mk_instance_mdef (methnm,reprAccess,[],ret,MethodBody_il(mk_ilmbody (true,[],2,nonbranching_instrs_to_code ([ ldarg_0; mk_normal_ldfld il_fspec]),None))) - mdef |> AddSpecialNameFlag - -let ChooseParamNames fieldNamesAndTypes = - let takenFieldNames = fieldNamesAndTypes |> List.map p23 |> Set.of_list - - fieldNamesAndTypes - |> List.map (fun (propName,fldName,propType) -> - let lowerPropName = String.uncapitalize propName - let paramName = if takenFieldNames.Contains(lowerPropName) then propName else lowerPropName - paramName,fldName,propType) - -let markup s = s |> Seq.mapi (fun i x -> i,x) - -// See prim-types.fs -let SourceLevelConstruct_SumType = 1 -let SourceLevelConstruct_RecordType = 2 -let SourceLevelConstruct_ObjectType = 3 -let SourceLevelConstruct_Field = 4 -let SourceLevelConstruct_Exception = 5 -let SourceLevelConstruct_Closure = 6 -let SourceLevelConstruct_Module = 7 -let SourceLevelConstruct_Alternative = 8 -let SourceLevelConstruct_Value = 9 -let SourceLevelConstruct_PrivateRepresentation = 32 - -// Approximation for purposes of optimization and giving a warning when compiling definition-only files as EXEs -let rec CheckCodeDoesSomething code = - match code with - | ILBasicBlock bb -> Array.fold (fun x i -> x || match i with I_arith (AI_ldnull | AI_nop | AI_pop) | I_ret | I_seqpoint _ -> false | _ -> true) false bb.bblockInstrs - | GroupBlock (_,codes) -> List.exists CheckCodeDoesSomething codes - | RestrictBlock (_,code) -> CheckCodeDoesSomething code - | TryBlock (code,seh) -> true - -let ChooseFreeVarNames takenNames ts = - let tns = List.map (fun t -> (t,None)) ts - let rec chooseName names (t,nOpt) = - let tn = match nOpt with None -> t | Some n -> t^string n - if Zset.mem tn names then - chooseName names (t,Some(match nOpt with None -> 0 | Some n -> (n+1))) - else - let names = Zset.add tn names - names,tn - let string_order = (compare : string -> string -> int) - let names = Zset.empty string_order |> Zset.addList takenNames - let names,ts = List.fmap chooseName names tns - ts - -let ilxgenGlobalNng = NiceNameGenerator () - -(* cannot tailcall to methods taking byrefs *) -let is_byref = function Type_byref _ -> true | _ -> false - -let mainMethName = CompilerGeneratedName "main" - -type AttributeDecoder(namedArgs) = - let nameMap = NameMap.of_list (List.map (fun (AttribNamedArg(s,a,b,c)) -> s,c) namedArgs) - let findConst x = match NameMap.tryfind x nameMap with | Some(AttribExpr(_,TExpr_const(c,_,_))) -> Some c | _ -> None - let findAppTr x = match NameMap.tryfind x nameMap with | Some(AttribExpr(_,TExpr_app(_,_,[TType_app(tr,ti)],_,_))) -> Some tr | _ -> None - - member self.FindInt16 x dflt = match findConst x with | Some(TConst_int16 x) -> x | _ -> dflt - member self.FindInt32 x dflt = match findConst x with | Some(TConst_int32 x) -> x | _ -> dflt - member self.FindBool x dflt = match findConst x with | Some(TConst_bool x) -> x | _ -> dflt - member self.FindString x dflt = match findConst x with | Some(TConst_string x) -> x | _ -> dflt - member self.FindTypeName x dflt = match findAppTr x with | Some(tr) -> tr.DisplayName | _ -> dflt - -//-------------------------------------------------------------------------- -// Statistics -//-------------------------------------------------------------------------- - -let report_ref = ref (fun oc -> ()) -let add_report f = let old = report_ref.contents in report_ref := (fun oc -> old oc; f oc) -let report (oc:TextWriter) = report_ref.contents oc - -let NewCounter(nm) = - let count = ref 0 - add_report (fun oc -> if !count <> 0 then output_string oc (string !count ^ " "^nm^"\n")); - (fun () -> incr count) - -let CountClosure = NewCounter "closures" -let CountMethodDef = NewCounter "IL method defintitions corresponding to values" -let CountStaticFieldDef = NewCounter "IL field defintitions corresponding to values" -let CountCallFuncInstructions = NewCounter "callfunc instructions (indirect calls)" - -//------------------------------------------------------------------------- -// Part of the last-minute tranformation performed by this file -// is to eliminate variables of static type "unit". These are -// utility functions related to this. -//------------------------------------------------------------------------- - -let BindUnitVars g (mvs:Val list,paramInfos,body) = - match mvs,paramInfos with - | [v],[] -> - assert is_unit_typ g v.Type - [], mk_let NoSequencePointAtInvisibleBinding v.Range v (mk_unit g v.Range) body - | _ -> mvs,body - -//-------------------------------------------------------------------------- -// Compilation environment for compiling a whole a module -//-------------------------------------------------------------------------- - -[] -type cenv = - { g: Env.TcGlobals; - viewCcu: ccu; - fragName: string; - generateFilterBlocks: bool; - workAroundReflectionEmitBugs: bool; - emitConstantArraysUsingStaticDataBlobs:bool; - amap: Import.ImportMap; - (* mainMethodInfo: if this is set, then the last module becomes the "main" module and its toplevel bindings are executed at startup *) - mainMethodInfo: Tast.Attribs option; - localOptimizationsAreOn: bool; - debug: bool; - emptyProgramOk : bool; } - - -type EmitSequencePointState = SPAlways | SPSuppress -//-------------------------------------------------------------------------- -// scope, cloc, visibility -// Referencing other stuff, and descriptions of where items are to be placed -// within the generated IL namespace/typespace. A bit of a mess. -//-------------------------------------------------------------------------- - -type cloc = - (* cloc = compilation location = path to a ccu, namespace or class *) - { clocScope: IL.ILScopeRef; - clocTopImplQualifiedName: string; - clocNamespace: string option; - clocEncl: string list; - clocQualifiedNameOfFile : string } - -//-------------------------------------------------------------------------- -// Access this and other assemblies -//-------------------------------------------------------------------------- - -let mk_il_name pos n = match pos with [] -> n | _ -> String.concat "." pos^"."^n -let mk_private_name n = (CompilerGeneratedName n) - -let scoref_for_cloc cloc = cloc.clocScope - -let CompLocForFragment fragName (ccu:ccu) = - { clocQualifiedNameOfFile =fragName; - clocTopImplQualifiedName= fragName; - clocScope=ccu.ILScopeRef; - clocNamespace=None; - clocEncl=[]} - -let CompLocForCcu (ccu:ccu) = CompLocForFragment ccu.AssemblyName ccu - -let mk_topname ns n = String.concat "." (match ns with Some x -> [x;n] | None -> [n]) - -let CompLocForSubModuleOrNamespace cloc (submod:ModuleOrNamespace) = - let n = submod.MangledName - match submod.ModuleOrNamespaceType.ModuleOrNamespaceKind with - | FSharpModuleWithSuffix | FSharpModule -> { cloc with clocEncl= cloc.clocEncl @ [n]} - | Namespace -> {cloc with clocNamespace=Some (mk_topname cloc.clocNamespace n)} - -let CompLocForFixedPath fragName qname (CompPath(sref,cpath)) = - let ns,t = List.takeUntil (fun (_,mkind) -> mkind <> Namespace) cpath - let ns = List.map fst ns - let ns = text_of_path ns - let encl = List.map (fun (s ,mkind)-> s) t - if verbose then dprintn ("CompLocForFixedPath, ns = '"^ns^"', encl = '"^text_of_path encl^"'"); - let ns = if ns = "" then None else Some ns - { clocQualifiedNameOfFile =fragName; - clocTopImplQualifiedName=qname; - clocScope=sref; - clocNamespace=ns; - clocEncl=encl } - -let CompLocForFixedModule fragName qname (mspec:ModuleOrNamespace) = - let cloc = CompLocForFixedPath fragName qname mspec.CompilationPath - let cloc = CompLocForSubModuleOrNamespace cloc mspec - cloc - -let NestedTypeRefForCompLoc cloc n = - match cloc.clocEncl with - | [] -> - let tyname = mk_topname cloc.clocNamespace n - mk_tref(scoref_for_cloc cloc,tyname) - | h::t -> mk_nested_tref(scoref_for_cloc cloc,mk_topname cloc.clocNamespace h :: t,n) - -let NestedTypeSpecForCompLoc cloc n tinst = - mk_tspec (NestedTypeRefForCompLoc cloc n,tinst) - -let TypeNameForStatupCode cloc = ".$"^cloc.clocTopImplQualifiedName -let TypeNameForPrivateImplementationDetails cloc = "" - -let CompLocForStartupCode cloc = - {cloc with clocEncl=[TypeNameForStatupCode cloc];clocNamespace=None} - -let CompLocForPrivateImplementationDetails cloc = - {cloc with - clocEncl=[TypeNameForPrivateImplementationDetails cloc];clocNamespace=None} - -let rec TypeRefForCompLoc cloc = - match cloc.clocEncl with - | [] -> - mk_tref(scoref_for_cloc cloc,TypeNameForPrivateImplementationDetails cloc) - | [h] -> - let tyname = mk_topname cloc.clocNamespace h - mk_tref(scoref_for_cloc cloc,tyname) - | _ -> - let encl,n = List.frontAndBack cloc.clocEncl - NestedTypeRefForCompLoc {cloc with clocEncl=encl} n - -let TypeSpecForCompLoc cloc = - mk_nongeneric_tspec (TypeRefForCompLoc cloc) - -// Under --publicasinternal change Public to Internal, -// except when mayChange=false, e.g. for override implementations (no accessibility restriction permitted). -let ComputePublicMemberAccess mayChange = if !generatePublicAsInternal && mayChange then MemAccess_assembly else MemAccess_public -let ComputeMemberAccess mayChange hidden = if hidden then MemAccess_assembly else ComputePublicMemberAccess mayChange - -// Under --publicasinternal change types from Public to Private (internal for types) -let ComputePublicTypeAccess() = if !generatePublicAsInternal then TypeAccess_private else TypeAccess_public -let ComputeTypeAccess (tref:ILTypeRef) hidden = - match tref.Enclosing with - | [] -> if hidden then TypeAccess_private else ComputePublicTypeAccess() - | _ -> TypeAccess_nested (ComputeMemberAccess true hidden) - - -//-------------------------------------------------------------------------- -// Representation of type constructors etc. -// -// How are module kinds, type parameters, local type constructors -// etc. are mapped to IL types and IL type variables -//-------------------------------------------------------------------------- - -[] -type TypeReprEnv = - { typar_reprs: (Typar * uint16 (* static_item_repr *) ) list; - typar_count: int; (* How many type variables are in scope? *) - tyenv_nativeptr_as_nativeint: bool (* Do we compile the "nativeptr<'a>" type as a machine integer, e.g. in closures? *) } - -//-------------------------------------------------------------------------- -// Lookup tyenv -//-------------------------------------------------------------------------- - -let repr_of_typar m tp tyenv = - try ListAssoc.find typar_ref_eq tp tyenv.typar_reprs - with Not_found -> - errorR(InternalError("Undefined or unsolved type variable: "^showL(TyparL tp),m)); - uint16 666 (* random value for post-hoc diagnostic analysis on generated tree *) - -//-------------------------------------------------------------------------- -// Type parameters and the environment -//-------------------------------------------------------------------------- - -let add_typar_as tyenv tp y = {tyenv with typar_reprs=(tp,y) :: tyenv.typar_reprs } -let add_typar tyenv (tp:Typar) = - if IsNonErasedTypar tp then { (add_typar_as tyenv tp (uint16 tyenv.typar_count)) with typar_count= tyenv.typar_count + 1 } else tyenv - -let add_typars tyenv tps = List.fold add_typar tyenv tps -let empty_tyenv = { typar_count=0; - typar_reprs=[]; - tyenv_nativeptr_as_nativeint=false} -let tyenv_for_typars tps = add_typars empty_tyenv tps - -let tyenv_for_tycon (tycon:Tycon) = tyenv_for_typars (tycon.TyparsNoRange) -let tyenv_for_tcref tcref = tyenv_for_tycon (deref_tycon tcref) - -//-------------------------------------------------------------------------- -// Generate type references -//-------------------------------------------------------------------------- - -let GenTcref (tcref:TyconRef) = - assert(not tcref.IsTypeAbbrev); - tcref.CompiledRepresentation - -type VoidNotOK = VoidNotOK | VoidOK -#if DEBUG -let voidCheck m g permits ty = - if permits=VoidNotOK && is_void_typ g ty then - error(InternalError("System.Void unexpectedly detected in IL code generation. This should not occur.",m)) -#endif - -// When generating parameter and return types generate precise .NET IL pointer types -// These can't be generated for generic instantiations, since .NET generics doesn't -// permit this. But for 'naked' values (locals, parameters, return values etc.) machine -// integer values and native pointer values are compatible (though the code is unverifiable). -type PtrsOK = - | PtrTypesOK - | PtrTypesNotOK - -// An F# multi dimension array type "int32[,]" should normally map to the ILDASM type "int32[0...,0...]", just like C#. -// -// However, System.Reflection.Emit has a nasty bug that means it can't emit calls to C# generic methods involving multi-dimensional arrays -// void M(int32[,]) -// because MakeGenericMethod on this method returns a handle that causes an invalid call to be emitted by the IL code generator for dynamic assemblies -// -// We have to pay a price here, either: -// -- always emit no bounds, i.e. the ILDASM type "int32[,]" (without lower bounds), and not be able to implement C# virtual slots involving multi-dimensional array types -// -- always emit bounds, i.e. the ILDASM type "int32[0...,0...]" (without lower bounds), and not be able to call C# or F# generic code such as the Array2 module -// -- emit no bounds within the signatures of F# generic methods -// We follow the last one -type MultiDimArrayEmitFlag = - | EmitMultiDimArrayTypesWithoutBounds - | EmitMultiDimArrayTypesNormally - -let rec GenTyargAux m g tyenv multiDimFlag tyarg = GenTypeAux m g tyenv VoidNotOK PtrTypesNotOK multiDimFlag tyarg -and GenTyargsAux m g tyenv multiDimFlag tyargs = List.map (GenTyargAux m g tyenv multiDimFlag) (DropErasedTyargs tyargs) - -and GenTyAppAux m g tyenv multiDimFlag repr tinst = - let ilTypeInst = GenTyargsAux m g tyenv multiDimFlag tinst - match repr with - | TyrepOpen ty -> - let ty = IL.inst_typ ilTypeInst ty - match multiDimFlag,ty with - | EmitMultiDimArrayTypesWithoutBounds, Type_array(ILArrayShape(arrayBounds),elemTy) when arrayBounds.Length > 1 -> - Type_array(ILArrayShape(arrayBounds |> List.map (fun _ -> (None,None))), elemTy) - | _ -> ty - | TyrepNamed (tref,boxity) -> IL.mk_typ boxity (mk_tspec (tref,ilTypeInst)) - -and GenNamedTyAppAux m g tyenv ptrsOK multiDimFlag tcref tinst = - let tinst = DropErasedTyargs tinst in - (* See above note on ptrsOK *) - if ptrsOK = PtrTypesOK && tcref_eq g tcref g.nativeptr_tcr then - GenNamedTyAppAux m g tyenv ptrsOK multiDimFlag g.ilsigptr_tcr tinst - else - GenTyAppAux m g tyenv multiDimFlag (GenTcref tcref) tinst - -and GenTypeAux m g tyenv voidOK ptrsOK multiDimFlag ty = -#if DEBUG - voidCheck m g voidOK ty; -#endif - (* if verbose then dprintf "generating type '%s'\n" ((DebugPrint.showType ty)); *) - match strip_tpeqns_and_tcabbrevs_and_measureable g ty with - | TType_app(tcref,tinst) -> GenNamedTyAppAux m g tyenv ptrsOK multiDimFlag tcref tinst - | TType_tuple(args) -> GenTypeAux m g tyenv VoidNotOK ptrsOK multiDimFlag (compiled_tuple_ty g args) - | TType_fun(dty,returnTy) -> Pubclo.typ_Func1 g.ilxPubCloEnv (GenTyargAux m g tyenv multiDimFlag dty) (GenTyargAux m g tyenv multiDimFlag returnTy) - - | TType_ucase(ucref,args) -> - let cuspec,idx = GenUnionCaseSpec m g tyenv ucref args - EraseIlxClassunions.typ_of_alt cuspec idx - - | TType_forall(tps,tau) -> - let tps = DropErasedTypars tps - let tyenv = (add_typars tyenv tps) - List.foldBack (GenGenericParam m g tyenv >> Pubclo.typ_TyFunc g.ilxPubCloEnv) tps (GenTypeAux m g tyenv VoidNotOK ptrsOK multiDimFlag tau) - | TType_var(tp) -> Type_tyvar (repr_of_typar m tp tyenv) - | TType_measure u -> g.ilg.typ_int32 - | _ -> failwith "GenTypeAux m: unexpected naked Unknown/Struct/Named type" - -and GenGenericParam m g tyenv (tp:Typar) = - let subTypeConstraints = tp.Constraints |> List.choose (function | TTyparCoercesToType(ty,m) -> Some(ty) | _ -> None) |> List.map (GenTypeAux m g tyenv VoidNotOK PtrTypesNotOK EmitMultiDimArrayTypesNormally) - let refTypeConstraint = tp.Constraints |> List.exists (function TTyparIsReferenceType _ -> true | TTyparSupportsNull _ -> true | _ -> false) - let notNullableValueTypeConstraint = tp.Constraints |> List.exists (function TTyparIsNotNullableValueType _ -> true | _ -> false) - let defaultConstructorConstraint = tp.Constraints |> List.exists (function TTyparRequiresDefaultConstructor _ -> true | _ -> false) - { gpName= - (let nm :string = tp.Name - if nm.TrimEnd([| '0' .. '9' |]).Length = 1 then nm - //elif nm.Length >= 1 && System.Char.IsLower nm.[0] then "T"^nm >= "T" && nm <= "Z" then nm - else "T"^(String.capitalize nm)); (* ^(if tp.IsCompilerGenerated then string tp.Stamp else "") *) - gpConstraints=subTypeConstraints; - gpVariance=NonVariant; - gpReferenceTypeConstraint=refTypeConstraint; - gpNotNullableValueTypeConstraint=notNullableValueTypeConstraint; - gpDefaultConstructorConstraint= defaultConstructorConstraint } - -//-------------------------------------------------------------------------- -// Generate ILX references to closures, classunions etc. given a tyenv -//-------------------------------------------------------------------------- - -and GenUnionCaseRef m g tyenv i (fspecs:RecdField array) = - fspecs |> Array.mapi (fun j fspec -> - let fieldDef = IL.mk_instance_fdef(fspec.Name,GenType m g tyenv fspec.FormalType, None, ComputePublicMemberAccess true) - { fieldDef with - // These properties on the "field" of an alternative end up going on a property generated by cu_erase.ml - fdCustomAttrs = mk_custom_attrs [(mk_CompilationMappingAttrWithVariantNumAndSeqNum g SourceLevelConstruct_Field i j )] } ) - - -and GenUnionRef m g tcref = - let tycon = (deref_tycon tcref) - assert(not tycon.IsTypeAbbrev); - match tycon.UnionInfo with - | None -> failwith "GenUnionRef m" - | Some funion -> - cached funion.funion_ilx_repr (fun () -> - let tyenvinner = tyenv_for_tycon tycon - match tcref.CompiledRepresentation with - | TyrepOpen _ -> failwith "GenUnionRef m: unexpected ASM tyrep" - | TyrepNamed (tref,_) -> - let alternatives = - tycon.UnionCasesArray |> Array.mapi (fun i cspec -> - { altName=cspec.ucase_il_name; - altCustomAttrs=mk_custom_attrs []; - altFields=GenUnionCaseRef m g tyenvinner i cspec.RecdFieldsArray }) - let nullPermitted = IsUnionTypeWithNullAsTrueValue g tycon - Ilx.IlxUnionRef(tref,alternatives,nullPermitted)) - - -and GenUnionSpec m g tyenv tcref tyargs = - let curef = GenUnionRef m g tcref - let tinst = GenTypeArgs m g tyenv tyargs - Ilx.IlxUnionSpec(curef,tinst) - -and GenUnionCaseSpec m g tyenv (ucref:UnionCaseRef) tyargs = - let cuspec = GenUnionSpec m g tyenv ucref.TyconRef tyargs - let idx = ucref_index ucref - cuspec, idx - - -and GenType m g tyenv ty = (GenTypeAux m g tyenv VoidNotOK PtrTypesNotOK EmitMultiDimArrayTypesNormally ty) - - -and GenTypes m g tyenv tys = List.map (GenType m g tyenv) tys -and GenTypePermitVoid m g tyenv ty = (GenTypeAux m g tyenv VoidOK PtrTypesNotOK EmitMultiDimArrayTypesNormally ty) -and GenTypesPermitVoid m g tyenv tys = List.map (GenTypePermitVoid m g tyenv) tys - -and GenTyApp m g tyenv repr tyargs = GenTyAppAux m g tyenv EmitMultiDimArrayTypesNormally repr tyargs -and GenNamedTyApp m g tyenv tcref tinst = GenNamedTyAppAux m g tyenv PtrTypesNotOK EmitMultiDimArrayTypesNormally tcref tinst - -/// IL pointer types are only generated for DLL Import signatures * -/// IL void types are only generated for return types -and ComputePtrTypesOK isDllImport = (if isDllImport then PtrTypesOK else PtrTypesNotOK) -and ComputeMultiDimArrayEmitFlag isGeneric = -#if FX_ATLEAST_40 - // in Dev10, the CLR has fixed the bug (see comment above "type MultiDimArrayEmitFlag" earlier in this file) - EmitMultiDimArrayTypesNormally -#else - (if isGeneric then EmitMultiDimArrayTypesWithoutBounds else EmitMultiDimArrayTypesNormally) -#endif - -and GenReturnType m g tyenv isDllImport isGeneric returnTyOpt = - match returnTyOpt with - | None -> Type_void - | Some returnTy -> GenTypeAux m g tyenv VoidNotOK(*1*) (ComputePtrTypesOK isDllImport) (ComputeMultiDimArrayEmitFlag isGeneric) returnTy (*1: generate void from unit, but not accept void *) - -and GenParamType m g tyenv isDllImport isGeneric ty = - ty |> GenTypeAux m g tyenv VoidNotOK (ComputePtrTypesOK isDllImport) (ComputeMultiDimArrayEmitFlag isGeneric) - -and GenParamTypes m g tyenv isDllImport isGeneric tys = - tys |> List.map (GenTypeAux m g tyenv VoidNotOK (ComputePtrTypesOK isDllImport) (ComputeMultiDimArrayEmitFlag isGeneric)) - -and GenTypeArgs m g tyenv tyargs = GenTyargsAux m g tyenv EmitMultiDimArrayTypesNormally tyargs - -let GenericParamHasConstraint gp = - nonNil gp.gpConstraints || - gp.gpVariance <> NonVariant || - gp.gpReferenceTypeConstraint || - gp.gpNotNullableValueTypeConstraint || - gp.gpDefaultConstructorConstraint - - -let repr_of_named_type cloc nm boxity = - TyrepNamed (NestedTypeRefForCompLoc cloc nm,boxity) - - - -(* Static fields generally go in a private StartupCode section. This is to ensure all static - fields are initialized only in their class constructors (we generate one primary - cctor for each file to ensure initialization coherence across the file, regardless - of how many modules are in the file). This means F# passes an extra check applied by SQL Server when it - verifies stored procedures: SQL Server checks that all 'initionly' static fields are only initialized from - their own class constructor. - - However, mutable static fields must be accessible across compilation units. This means we place them in their "natural" location - which may be in a nested module etc. This means mutable static fields can't be used in code to be loaded by SQL Server. *) - -let UseGenuineStaticField g (vspec:Val) = - let mut = vspec.IsMutable - let attribs = vspec.Attribs - let hasLiteralAttr = HasAttrib g g.attrib_LiteralAttribute attribs - mut || hasLiteralAttr - -let GenFieldSpecForStaticField g ilTypeSpecForProperty vspec cloc fieldName il_ty = - /// Where does the field live? - let tspec = - if UseGenuineStaticField g vspec then ilTypeSpecForProperty - else TypeSpecForCompLoc (CompLocForStartupCode cloc) - - mk_fspec_in_boxed_tspec (tspec,fieldName, il_ty) - -(* REVIEW: this logic is also duplicated in tc.ml's attribute type checking code *) -let GenFieldName tycon fld = gen_field_name tycon fld - -let GenRecdFieldRef m cenv tyenv (rfref:RecdFieldRef) tyargs = - let tyenvinner = tyenv_for_tycon rfref.Tycon - mk_fspec_in_typ(GenTyApp m cenv.g tyenv rfref.TyconRef.CompiledRepresentation tyargs, - GenFieldName rfref.Tycon rfref.RecdField, - GenType m cenv.g tyenvinner rfref.RecdField.FormalType) - -let GenExnType m g tyenv (ecref:TyconRef) = GenTyApp m g tyenv ecref.CompiledRepresentation [] - - -//-------------------------------------------------------------------------- -// Closure summaries -//-------------------------------------------------------------------------- - -type arityInfo = int list - - -[] -type IlxClosureInfo = - { clo_expr: expr; - clo_name: string; - clo_arity_info: arityInfo; - clo_formal_il_rty: ILType; - clo_il_frees: Ilx.IlxClosureFreeVar list; - clo_clospec: Ilx.IlxClosureSpec; - clo_attribs: Attribs; - clo_il_gparams: IL.ILGenericParameterDefs; - clo_freevars: Val list; (* nb. the freevars we actually close over *) - clo_lambdas: Ilx.IlxClosureLambdas; - - (* local type func support *) - /// The free type parameters occuring in the type of the closure (and not just its body) - /// This is used for local type functions, whose contract class must use these types - /// type Contract<'fv> = - /// abstract DirectInvoke : ty['fv] - /// type Implementation<'fv,'fv2> : Contract<'fv> = - /// override DirectInvoke : ty['fv] = expr['fv,'fv2] - /// - /// At the callsite we generate - /// unbox ty['fv] - /// callvirt clo.DirectInvoke - ltyfunc_contract_il_gactuals: ILType list; - ltyfunc_contract_ftyvs: Typar list; - ltyfunc_direct_il_gparams: IL.ILGenericParameterDefs - ltyfunc_internal_ftyvs: Typar list;} - - -//-------------------------------------------------------------------------- -// Representation of term declarations = Environments for compiling expressions. -//-------------------------------------------------------------------------- - - -[] -type storage = - /// Indicates the value is always null - | Null - /// Indicates the value is not stored, and no value is created - | Unrealized - /// Indicates the value is stored in a static field. - | StaticField of ILFieldSpec * ValRef * (*hasLiteralAttr:*)bool * ILTypeSpec * string * string * ILType * ILMethodRef * ILMethodRef * OptionalShadowLocal - /// Indicates the value is "stored" as a IL static method (in a "main" class for a F# - /// compilation unit, or as a member) according to its inferred or specified arity. - | Method of ValTopReprInfo * ValRef * ILMethodSpec * Range.range * TopArgInfo list * TopArgInfo - /// Indicates the value is stored at the given position in the closure environment accessed via "ldarg 0" - | Env of ILTypeSpec * int * NamedLocalIlxClosureInfo ref option - /// Indicates that the value is an argument of a method being generated - | Arg of int - /// Indicates that the value is stored in local of the method being generated. NamedLocalIlxClosureInfo is normally empty. - /// It is non-empty for 'local type functions', see comments on definition of NamedLocalIlxClosureInfo. - | Local of int * NamedLocalIlxClosureInfo ref option -and OptionalShadowLocal = - | NoShadowLocal - | ShadowLocal of storage -/// The representation of a NamedLocalClosure is based on a cloinfo. However we can't generate a cloinfo until we've -/// decided the representations of other items in the recursive set. Hence we use two phases to decide representations in -/// a recursive set. Yuck. -and NamedLocalIlxClosureInfo = - | NamedLocalIlxClosureInfoGenerator of (ilxGenEnv -> IlxClosureInfo) - | NamedLocalIlxClosureInfoGenerated of IlxClosureInfo - -and ModuleStorage = - { storage_vals: Lazy> ; - storage_submoduls: Lazy>; } - -/// BranchCallItems are those where a call to the value can be implemented as -/// a branch. At the moment these are only used for generating branch calls back to -/// the entry label of the method currently being generated. -and BranchCallItem = - | BranchCallClosure of arityInfo - | BranchCallMethod of - // Argument counts for compiled form of F# method or value - arityInfo * - // Arg infos for compiled form of F# method or value - (Tast.typ * TopArgInfo) list list * - // Typars for F# method or value - Tast.typars * - // Typars for F# method or value - int * - // num obj args - int - -and mark = Mark of ILCodeLabel (* places we can branch to *) - -and ilxGenEnv = - { tyenv: TypeReprEnv; - someTspecInThisModule: ILTypeSpec; - /// Where to place the stuff we're currently generating - cloc: cloc; - /// Hiding information down the signature chain, used to compute what's public to the assembly - sigToImplRemapInfo: (Remap * SignatureHidingInfo) list; - /// All values in scope - valsInScope: ValMap>; - /// For optimizing direct tail recusion to a loop - mark says where to branch to. Length is 0 or 1. - /// REVIEW: generalize to arbitrary nested local loops?? - innerVals: (ValRef * (BranchCallItem * mark)) list; - /// Full list of enclosing bound values. First non-compiler-generated element is used to help give nice names for closures and other expressions. - letBoundVars: ValRef list; - /// The set of IL local variable indexes currently in use by lexically scoped variables, to allow reuse on different branches. - /// Really an integer set. - liveLocals: unit Imap.t; - /// Are we under the scope of a try, catch or finally? If so we can't tailcall. SEH = structured exception handling - withinSEH: bool; } - -let replace_tyenv tyenv (eenv: ilxGenEnv) = {eenv with tyenv = tyenv} -let env_for_typars tps eenv = replace_tyenv (tyenv_for_typars tps) eenv -let AddTyparsToEnv typars (eenv:ilxGenEnv) = {eenv with tyenv = add_typars eenv.tyenv typars} - -let AddSignatureRemapInfo msg (rpi,mhi) eenv = - if verbose then dprintf "AddSignatureRemapInfo, %s, #tycons = %s\n" msg (showL (Layout.sepListL (wordL ";") (List.map tyconL (Zset.elements mhi.mhiTycons)))); - if verbose then dprintf "AddSignatureRemapInfo, %s, #rpi.mrpiTycons = %d, #tyconReprs = %s\n" msg (List.length rpi.mrpiTycons) (showL (Layout.sepListL (wordL ";") (List.map tyconL (Zset.elements mhi.mhiTyconReprs)))); - if verbose then dprintf "AddSignatureRemapInfo, %s, #vals = %s\n" msg (showL (Layout.sepListL (wordL ";") (List.map valL (Zset.elements mhi.mhiVals)))); - if verbose then dprintf "AddSignatureRemapInfo, %s, #rfrefs = %s\n" msg (showL (Layout.sepListL (wordL ";") (List.map recdFieldRefL (Zset.elements mhi.mhiRecdFields)))); - { eenv with sigToImplRemapInfo = (mk_repackage_remapping rpi,mhi) :: eenv.sigToImplRemapInfo } - -//-------------------------------------------------------------------------- -// Print eenv -//-------------------------------------------------------------------------- - -let output_storage pps s = - match s with - | StaticField _ -> output_string pps "(top)" - | Method _ -> output_string pps "(top)" - | Local _ -> output_string pps "(local)" - | Arg _ -> output_string pps "(arg)" - | Env _ -> output_string pps "(env)" - | Null -> output_string pps "(null)" - | Unrealized -> output_string pps "(no real value required)" - -//-------------------------------------------------------------------------- -// Augment eenv with values -//-------------------------------------------------------------------------- - -let AddStorageForVal g (v,s) eenv = - if verbose then dprintf "adding %s to value table\n" (showL (valL v)); - let eenv = { eenv with valsInScope = vspec_map_add v s eenv.valsInScope } - // when compiling fslib also add an entry under the results of a non-local lookup - if g.compilingFslib then - match v.PublicPath with - | None -> eenv - | Some pp -> - match try_deref_val (rescope_val_pubpath g.fslibCcu pp v) with - | None -> eenv - | Some gv -> - if verbose then dprintf "adding remapped %s to value table\n" (showL (valL gv)); - { eenv with valsInScope = vspec_map_add gv s eenv.valsInScope } - else - eenv - -let AddStorageForLocalVals g vals eenv = List.foldBack (fun (v,s) acc -> AddStorageForVal g (v,notlazy s) acc) vals eenv - -//-------------------------------------------------------------------------- -// Lookup eenv -//-------------------------------------------------------------------------- - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -let storage_for_val m v eenv = - let v = - try vspec_map_find v eenv.valsInScope - with Not_found -> - (* REVIEW: The binary will probably still be written under these error conditions. - * That is useful when debugging the compiler, but not in Retail mode. - * Fail with an internal error if Retail? *) - (* // Diagnostics for bug://4046 - * let vals = eenv.valsInScope.imap |> Zmap.to_list - * vals |> List.iter (printf "v,s = %A\n") - *) - assert false - errorR(Error(sprintf "undefined value: %s" (showL(vspecAtBindL v)),m)); - notlazy (Arg 668(* random value for post-hoc diagnostic analysis on generated tree *) ) - v.Force() - -let storage_for_vref m v eenv = storage_for_val m (deref_val v) eenv - -//-------------------------------------------------------------------------- -// Imported modules and the environment -// -// How a top level value is represented depends on its type. If it's a -// function or is polymorphic, then it gets represented as a -// method (possibly and instance method). Otherwise it gets represented as a -// static field. -//-------------------------------------------------------------------------- - -let vref_isDllImport g (vref:ValRef) = - vref.Attribs |> HasAttrib g g.attrib_DllImportAttribute - -let GetMethodSpecForMemberVal g memberInfo (vref:ValRef) = - let m = vref.Range - let tps,curriedArgInfos,returnTy,retInfo = - assert(vref.TopValInfo.IsSome); - GetTopValTypeInCompiledForm g (the vref.TopValInfo) vref.Type m - let tyenv_under_typars = tyenv_for_typars tps - let flatArgInfos = List.concat curriedArgInfos - let isDllImport = vref_isDllImport g vref - let isCtor = (memberInfo.MemberFlags.MemberKind = MemberKindConstructor) - let cctor = (memberInfo.MemberFlags.MemberKind = MemberKindClassConstructor) - let parentTcref = vref.MemberActualParent - let parentTypars = parentTcref.TyparsNoRange - let numParentTypars = parentTypars.Length - if tps.Length < numParentTypars then error(InternalError("CodeGen check: type checking did not ensure that this method is sufficiently generic", m)); - let ctps,mtps = List.chop numParentTypars tps - let isGeneric = nonNil (DropErasedTypars tps) - let isCompiledAsInstance = ValRefIsCompiledAsInstanceMember g vref - - let ilActualRetTy = - let ilRetTy = GenReturnType m g tyenv_under_typars isDllImport isGeneric returnTy - if isCtor || cctor then Type_void else ilRetTy - let ilTy = GenType m g tyenv_under_typars (mk_tyapp_ty parentTcref (List.map mk_typar_ty ctps)) - if isCompiledAsInstance || isCtor then - // Find the 'this' argument type if any - let thisTy,flatArgInfos = - if isCtor then (GetFSharpViewOfReturnType g returnTy),flatArgInfos - else - match flatArgInfos with - | [] -> error(InternalError("This instance method '"^vref.MangledName^"' has no arguments", m)) - | (h,_):: t -> h,t - - let thisTy = if is_byref_typ g thisTy then dest_byref_typ g thisTy else thisTy - let thisArgTys = tinst_of_stripped_typ g thisTy - if ctps.Length <> thisArgTys.Length then - warning(InternalError(Printf.sprintf "CodeGen check: type checking did not quantify the correct number of type variables for this method, #parentTypars = %d, #ctps = %d, #mtps = %d, #thisArgTys = %d" numParentTypars ctps.Length mtps.Length (List.length thisArgTys),m)) - else - List.iter2 - (fun gtp ty2 -> - if not (type_equiv g (mk_typar_ty gtp) ty2) then - warning(InternalError("CodeGen check: type checking did not quantify the correct type variables for this method: generalization list contained "^gtp.Name^"#"^string gtp.Stamp^" and list from 'this' pointer contained "^ (showL(typeL ty2)), m))) - ctps - thisArgTys; - let methodArgTys,paramInfos = List.unzip flatArgInfos - let ilMethodArgTys = GenParamTypes m g tyenv_under_typars isDllImport isGeneric methodArgTys - let ilMethodInst = GenTypeArgs m g tyenv_under_typars (List.map mk_typar_ty mtps) - let mspec = mk_instance_mspec_in_typ (ilTy,memberInfo.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - - mspec,ctps,mtps,paramInfos,retInfo - else - let methodArgTys,paramInfos = List.unzip flatArgInfos - let ilMethodArgTys = GenParamTypes m g tyenv_under_typars isDllImport isGeneric methodArgTys - let ilMethodInst = GenTypeArgs m g tyenv_under_typars (List.map mk_typar_ty mtps) - let mspec = mk_static_mspec_in_typ (ilTy,memberInfo.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - - mspec,ctps,mtps,paramInfos,retInfo - -// This called via 2 routes. -// (a) alloc_or_import_{ccu,modval,top_vspec} - for vref from modulespec mtyp_vals. -// (b) AllocStorageForBind - if arity specified for vref. This route includes some compiler generated temporaries. -// -/// This function decides the storage for the val. -/// The decision is based on arityInfo. -let ComputeStorageForTopVal g optShadowLocal (vref:ValRef) cloc = - - if is_unit_typ g vref.Type && not vref.IsMemberOrModuleBinding && not vref.IsMutable then Null else - let topValInfo = - match vref.TopValInfo with - | None -> error(InternalError("ComputeStorageForTopVal: no arity found for "^showL(ValRefL vref),vref.Range)) - | Some a -> a - - let m = vref.Range - let nm = vref.UniqueCompiledName - - // This call to GetTopValTypeInFSharpForm is only needed to determine if this is a (type) function or a value - // We should just look at the arity - match GetTopValTypeInFSharpForm g topValInfo vref.Type vref.Range with - | [],[], returnTy,retInfo when not vref.IsMember -> - // Mutable and literal static fields must have stable names and live in the "public" location - // See notes on GenFieldSpecForStaticField above. - let vspec = (deref_val vref) - let fieldName = if UseGenuineStaticField g vspec then nm else ilxgenGlobalNng.FreshCompilerGeneratedName (nm,m) - let il_ty = GenType m g empty_tyenv returnTy in (* empty_tyenv ok: not a field in a generic class *) - let ilTypeSpecForProperty = TypeSpecForCompLoc cloc - let attribs = vspec.Attribs - let mut = vspec.IsMutable - let hasLiteralAttr = HasAttrib g g.attrib_LiteralAttribute attribs - - let tref = ilTypeSpecForProperty.TypeRef - let ilGetterMethRef = mk_mref(tref,ILCallingConv.Static,"get_"^nm,0,[],il_ty) - let ilSetterMethRef = mk_mref(tref,ILCallingConv.Static,"set_"^nm,0,[il_ty],Type_void) - let fspec = GenFieldSpecForStaticField g ilTypeSpecForProperty vspec cloc fieldName il_ty - StaticField (fspec,vref,hasLiteralAttr,ilTypeSpecForProperty,fieldName,nm,il_ty,ilGetterMethRef,ilSetterMethRef,optShadowLocal) - - | _ -> - match vref.MemberInfo with - | Some(memberInfo) when not vref.IsExtensionMember -> - let mspec,_,_,paramInfos,retInfo = GetMethodSpecForMemberVal g memberInfo vref - Method (topValInfo,vref,mspec, m,paramInfos,retInfo) - | _ -> - let (tps,curriedArgInfos,returnTy,retInfo) = GetTopValTypeInCompiledForm g topValInfo vref.Type m - let tyenv_under_typars = tyenv_for_typars tps - let (methodArgTys,paramInfos) = curriedArgInfos |> List.concat |> List.unzip - let isDllImport = vref_isDllImport g vref - let isGeneric = nonNil (DropErasedTypars tps) - let ilMethodArgTys = GenParamTypes m g tyenv_under_typars isDllImport isGeneric methodArgTys - let ilRetTy = GenReturnType m g tyenv_under_typars isDllImport isGeneric returnTy - let tspec = TypeSpecForCompLoc cloc - let ilMethodInst = GenTypeArgs m g tyenv_under_typars (List.map mk_typar_ty tps) - let mspec = mk_static_mspec_in_boxed_tspec (tspec,nm,ilMethodArgTys,ilRetTy,ilMethodInst) - - Method(topValInfo,vref,mspec, m,paramInfos,retInfo) - -let ComputeAndAddStorageForLocalTopVal g cloc optShadowLocal (v:Val) eenv = - let storage = ComputeStorageForTopVal g optShadowLocal (mk_local_vref v) cloc - AddStorageForVal g (v,notlazy storage) eenv - -let ComputeStorageForNonLocalTopVal g cloc modref (v:Val) = - //if inline_info_of_val v = PseudoValue then Unrealized else - match v.TopValInfo with - | None -> error(InternalError("ComputeStorageForNonLocalTopVal, expected an arity for "^v.MangledName,v.Range)) - | Some _ -> ComputeStorageForTopVal g NoShadowLocal (mk_vref_in_modref modref v) cloc - -let rec ComputeStorageForNonLocalModuleOrNamespaceRef g cloc (modref:ModuleOrNamespaceRef) (modul:ModuleOrNamespace) acc = - if verbose then dprintn ("ComputeStorageForNonLocalModuleOrNamespaceRef for module "^demangled_name_of_modul modul); - NameMap.foldRange - (fun v acc -> AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal g cloc modref v)) acc) - modul.ModuleOrNamespaceType.AllValuesAndMembers - (NameMap.foldRange - (fun smodul acc -> ComputeStorageForNonLocalModuleOrNamespaceRef g (CompLocForSubModuleOrNamespace cloc smodul) (MakeNestedTcref modref smodul) smodul acc) - modul.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName - acc) - -let ComputeStorageForExternalCcu g eenv (ccu:ccu) = - if not ccu.IsFSharp then eenv else - let cloc = CompLocForCcu ccu - if verbose then dprintn ("ComputeStorageForExternalCcu, ccu = "^ccu.AssemblyName); - let eenv = - NameMap.foldRange - (fun smodul acc -> - let cloc = CompLocForSubModuleOrNamespace cloc smodul - let modref = mk_nonlocal_ccu_top_tcref ccu smodul - ComputeStorageForNonLocalModuleOrNamespaceRef g cloc modref smodul acc) - ccu.TopModulesAndNamespaces - eenv - eenv - -let rec AddBindingsForLocalModuleType allocVal cloc eenv (mty:ModuleOrNamespaceType) = - let eenv = NameMap.foldRange (fun submodul eenv -> AddBindingsForLocalModuleType allocVal (CompLocForSubModuleOrNamespace cloc submodul) eenv submodul.ModuleOrNamespaceType) mty.ModulesAndNamespacesByDemangledName eenv - let eenv = NameMap.foldRange (allocVal cloc) mty.AllValuesAndMembers eenv - eenv - -let AddExternalCcusToIlxGenEnv g eenv ccus = List.fold (ComputeStorageForExternalCcu g) eenv ccus - -let AddBindingsForTycon allocVal (cloc:cloc) (tycon:Tycon) eenv = - let unrealized_slots = - if tycon.IsFSharpObjectModelTycon - then tycon.FSharpObjectModelTypeInfo.fsobjmodel_vslots - else [] - List.foldBack (fun vref eenv -> allocVal cloc (deref_val vref) eenv) unrealized_slots eenv - -let rec AddBindingsForModuleDefs allocVal (cloc:cloc) eenv mdefs = - List.fold (AddBindingsForModuleDef allocVal cloc) eenv mdefs - -and AddBindingsForModuleDef allocVal cloc eenv x = - match x with - | TMDefRec(tycons,vbinds,mbinds,m) -> - let eenv = FlatList.foldBack (allocVal cloc) (vars_of_Bindings vbinds) eenv - (* Virtual don't have 'let' bindings and must be added to the environment *) - let eenv = List.foldBack (AddBindingsForTycon allocVal cloc) tycons eenv - let eenv = List.foldBack (AddBindingsForSubModules allocVal cloc) mbinds eenv - eenv - | TMDefLet(bind,m) -> - allocVal cloc bind.Var eenv - | TMDefDo(e,m) -> - eenv - | TMAbstract(TMTyped(mtyp,_,_)) -> - AddBindingsForLocalModuleType allocVal cloc eenv mtyp - | TMDefs(mdefs) -> - AddBindingsForModuleDefs allocVal cloc eenv mdefs - -and AddBindingsForSubModules allocVal cloc (TMBind(mspec, mdef)) eenv = - let cloc = - if mspec.IsNamespace then cloc - else CompLocForFixedModule cloc.clocQualifiedNameOfFile cloc.clocTopImplQualifiedName mspec - - AddBindingsForModuleDef allocVal cloc eenv mdef - -and AddBindingsForModuleTopVals g allocVal cloc eenv vs = - FlatList.foldBack allocVal vs eenv - - -// Put the partial results for a generated fragment (i.e. a part of a CCU generated by FSI) -// into the stored results for the whole CCU. -// isIncrementalExtension = true --> "#use or typed input" -// isIncrementalExtension = false --> "#load" -let AddIncrementalLocalAssmblyFragmentToIlxGenEnv isIncrementalExtension g ccu fragName eenv (TAssembly impls) = - let cloc = CompLocForFragment fragName ccu - let allocVal cloc v = ComputeAndAddStorageForLocalTopVal g cloc NoShadowLocal v - List.fold (fun eenv (TImplFile(qname,_,mexpr)) -> - let cloc = { cloc with clocTopImplQualifiedName = qname.Text } - if isIncrementalExtension then - match mexpr with - | TMTyped(_,mdef,_) -> AddBindingsForModuleDef allocVal cloc eenv mdef - (* | TMTyped(mtyp,_,m) -> error(Error("don't expect inner defs to have a constraint",m)) *) - else - AddBindingsForLocalModuleType allocVal cloc eenv (mtyp_of_mexpr mexpr) - - ) eenv impls - -//-------------------------------------------------------------------------- -// Generate debugging marks -//-------------------------------------------------------------------------- - -let GenILSourceMarker g m = - Some (ILSourceMarker.Create(document=g.memoize_file (file_idx_of_range m), - line=start_line_of_range m, - /// NOTE: .NET && VS measure first column as column 1 - column= (start_col_of_range m)+1, - endLine= (end_line_of_range m), - endColumn=(end_col_of_range m)+1)) - -let GenPossibleILSourceMarker cenv m = if cenv.debug then GenILSourceMarker cenv.g m else None - -//-------------------------------------------------------------------------- -// Helpers for merging property definitions -//-------------------------------------------------------------------------- - -let hashtbl_range ht = - let res = ref [] - Hashtbl.iter (fun _ x -> res := x :: !res) ht; - !res - -let merge_options m o1 o2 = - match o1,o2 with - | Some x, None | None, Some x -> Some x - | None, None -> None - | Some x, Some _ -> -#if DEBUG - // This warning fires on some code that also triggers this warning: - // warning(Error("The implementation of a specified generic interface required a method implementation not fully supported by F# Interactive. In the unlikely event that the resulting class fails to load then compile the interface type into a statically-compiled DLL and reference it using '#r'",m)); - // THe code is OK so we don't print this. - errorR(InternalError("merge_options: two values given",m)); -#endif - Some x - -let merge_pdefs m pd pdef = - {pd with propGet=merge_options m pd.propGet pdef.propGet; - propSet=merge_options m pd.propSet pdef.propSet; } - -let add_pdef_to_hash m ht pdef = - let nm = pdef.propName - if Hashtbl.mem ht nm then - let pd = Hashtbl.find ht nm - Hashtbl.replace ht nm (merge_pdefs m pd pdef) - else - Hashtbl.add ht nm pdef - - -/// Merge a whole group of properties all at once -let merge_pdef_list m propertyDefs = - let ht = Hashtbl.create 0 - propertyDefs |> List.iter (add_pdef_to_hash m ht); - hashtbl_range ht - -//-------------------------------------------------------------------------- -// Buffers for compiling modules. The entire assembly gets compiled via an AssemblyBuilder -//-------------------------------------------------------------------------- - -/// Information collected imperatively for each type definition -type TypeDefBuilder(tdef) = - let gbasic = tdef - let gmethods = new ResizeArray(0) - let gfields = new ResizeArray(0) - let gproperties : Hashtbl.t = Hashtbl.create 0 - let gevents = new ResizeArray(0) - let gnested = new TypeDefsBuilder() - - member b.Close() = - { tdef with - tdMethodDefs = mk_mdefs (dest_mdefs tdef.tdMethodDefs @ ResizeArray.to_list gmethods); - tdFieldDefs = mk_fdefs (dest_fdefs tdef.tdFieldDefs @ ResizeArray.to_list gfields); - tdProperties = mk_properties (dest_pdefs tdef.tdProperties @ hashtbl_range gproperties); - tdEvents = mk_events (dest_edefs tdef.tdEvents @ ResizeArray.to_list gevents); - tdNested = mk_tdefs (dest_tdefs tdef.tdNested @ gnested.Close()) } - - - member b.AddEventDef(edef) = ResizeArray.add gevents edef - member b.AddFieldDef(fieldDef) = ResizeArray.add gfields fieldDef - member b.AddMethodDef(mdef) = ResizeArray.add gmethods mdef - member b.NestedTypeDefs = gnested - member b.GetCurrentFields() = gfields |> Seq.readonly - - /// Merge Get and Set property nodes, which we generate independently for F# code - /// when we come across their corresponding methods. - member b.AddOrMergePropertyDef(pdef,m) = add_pdef_to_hash m gproperties pdef - - member b.PrependInstructionsToSpecificMethodDef(cond,instrs,tag) = - match ResizeArray.tryfind_index cond gmethods with - | Some idx -> gmethods.[idx] <- prepend_instrs_to_mdef instrs gmethods.[idx] - | None -> gmethods.Add(mk_cctor (mk_impl (false,[],1,nonbranching_instrs_to_code instrs,tag))) - - -and TypeDefsBuilder() = - let tdefs : Hashtbl.t = Hashtbl.create 0 - - member b.Close() = tdefs |> hashtbl_range |> List.map (fun b -> b.Close()) - - member b.FindTypeDefBuilder(nm) = - try Hashtbl.find tdefs nm - with Not_found -> failwith ("find_gtdef: "^nm^" not found") - - member b.FindNestedTypeDefsBuilder(path) = - List.fold (fun (acc:TypeDefsBuilder) x -> acc.FindTypeDefBuilder(x).NestedTypeDefs) b path - - member b.FindNestedTypeDefBuilder(tref:ILTypeRef) = - b.FindNestedTypeDefsBuilder(tref.Enclosing).FindTypeDefBuilder(tref.Name) - - member b.AddTypeDef(tdef:ILTypeDef) = - Hashtbl.add tdefs tdef.tdName (new TypeDefBuilder(tdef)) - -/// Assembly generation buffers -type AssemblyBuilder(cenv:cenv) as mgbuf = - // The Abstract IL table of types - let gtdefs= new TypeDefsBuilder() - // The definitions of top level values, as quotations. - let mutable reflectedDefinitions : (Tast.Val * Tast.expr) list = [] - // A memoization table for generating value types for big constant arrays - let vtgenerator= - new MemoizationTable<(cloc * int) , ILTypeSpec> - (fun (cloc,size) -> - let name = mk_private_name ("T" ^ string(new_uniq()) ^ "_" ^ string size ^ "Bytes") // Type names ending ...$T_37Bytes - let vtdef = mk_rawdata_vtdef cenv.g.ilg (name,size,0us) - let vtspec = NestedTypeSpecForCompLoc cloc vtdef.tdName [] - let vtref = vtspec.TypeRef - let vtdef = {vtdef with tdAccess= ComputeTypeAccess vtref true} - mgbuf.AddTypeDef(vtref,vtdef); - vtspec) - - let mutable explicitEntryPointInfo : ILTypeRef option = None - - member mgbuf.GenerateRawDataValueType(cloc,size) = - // Byte array literals require a ValueType of size the required number of bytes. - // With fsi.exe, S.R.Emit TypeBuilder CreateType has restrictions when a ValueType VT is nested inside a type T, and T has a field of type VT. - // To avoid this situation, these ValueTypes are generated under the private implementation rather than in the current cloc. [was bug 1532]. - let cloc = CompLocForPrivateImplementationDetails cloc - vtgenerator.Apply((cloc,size)) - - member mgbuf.AddTypeDef(tref:ILTypeRef,tdef) = - gtdefs.FindNestedTypeDefsBuilder(tref.Enclosing).AddTypeDef(tdef) - - member mgbuf.GetCurrentFields(tref:ILTypeRef) = - gtdefs.FindNestedTypeDefBuilder(tref).GetCurrentFields(); - - member mgbuf.AddReflectedDefinition(vspec,expr) = - reflectedDefinitions <- (vspec,expr) :: reflectedDefinitions - - member mgbuf.AddMethodDef(tref:ILTypeRef,mdef) = - gtdefs.FindNestedTypeDefBuilder(tref).AddMethodDef(mdef); - if mdef.mdEntrypoint then - explicitEntryPointInfo <- Some(tref) - - member mgbuf.AddExplicitInitToSpecificMethodDef(cond,tref,fspec,m) = - let instrs = - [ mk_ldc_i32 0; - mk_normal_stsfld fspec; - mk_normal_ldsfld fspec; - i_pop] - gtdefs.FindNestedTypeDefBuilder(tref).PrependInstructionsToSpecificMethodDef(cond,instrs,m) - - member mgbuf.AddEventDef(tref,edef) = - gtdefs.FindNestedTypeDefBuilder(tref).AddEventDef(edef) - - member mgbuf.AddFieldDef(tref,fieldDef) = - gtdefs.FindNestedTypeDefBuilder(tref).AddFieldDef(fieldDef) - - member mgbuf.AddOrMergePropertyDef(tref,pdef,m) = - gtdefs.FindNestedTypeDefBuilder(tref).AddOrMergePropertyDef(pdef,m) - - member mgbuf.Close() = gtdefs.Close(), reflectedDefinitions - member mgbuf.cenv = cenv - member mgbuf.GetExplicitEntryPointInfo() = explicitEntryPointInfo - - -let code_label_of_mark (Mark(lab)) = lab - -/// Record the types of the things on the evaluation stack. -/// Used for the few times we have to flush the IL evaluation stack and to compute maxStack. -type pushpop = - | Push of ILType - | Pop - -let push ty = Push ty - -/// Buffers for IL code generation -type CodeGenBuffer(m:range, - mgbuf: AssemblyBuilder, - methodName, - entryPointInfo: (ValRef * BranchCallItem) list, - alreadyUsedArgs:int, - alreadyUsedLocals:int, - zapFirstSeqPointToStart:bool) = - let locals: ResizeArray<((string * (mark * mark)) list * ILType)> = ResizeArray.create 10 - let codebuf : ResizeArray = ResizeArray.create 200 - let exnSpecs: ResizeArray = ResizeArray.create 10 - - // Keep track of the current stack so we can spill stuff when we hit a "try" when some stuff - // is on the stack. - let mutable stack : ILType list = [] - let mutable nstack=0 - let mutable maxStack=0 - let mutable seqpoint= None - - let codeLabels : Hashtbl.t =Hashtbl.create 10 - - let mutable lastSeqPoint = None - // Add a nop to make way for the first sequence point. There is always such a - // sequence point even when zapFirstSeqPointToStart=false - do if mgbuf.cenv.debug then codebuf.Add(i_nop); - - member cgbuf.DoAction a = - match a with - | Push ty -> - stack <- ty :: stack; - nstack <- nstack + 1; - maxStack <- Operators.max maxStack nstack - | Pop -> - match stack with - | [] -> - warning(InternalError("pop on empty stack during code generation\n",m)); - | h::t -> - stack <- t; - nstack <- nstack - 1 - - member cgbuf.GetCurrentStack() = stack - member cgbuf.AssertEmptyStack() = - if nonNil stack then warning(InternalError("stack flush didn't work, or extraneous expressions left on stack before stack restore",m)); - () - - member cgbuf.EmitInstr(pps,i) = - pps |> List.iter cgbuf.DoAction; - ResizeArray.add codebuf i - - member cgbuf.EmitInstrs (pps,is) = - pps |> List.iter cgbuf.DoAction; - is |> List.iter (ResizeArray.add codebuf) - - member cgbuf.GetLastSequencePoint() = - lastSeqPoint - - member cgbuf.EmitSeqPoint(src) = - if mgbuf.cenv.debug then - // Always add a nop between sequence points to help .NET get the stepping right - if (codebuf.Count > 0 && match codebuf.[codebuf.Count-1] with I_seqpoint _ -> true | _ -> false) then - codebuf.Add(i_nop); - let attr = GenILSourceMarker mgbuf.cenv.g src - assert(isSome(attr)); - let i = I_seqpoint (the attr) - codebuf.Add(i); - // Save the first sequence point away to snap it to the top of the method - match seqpoint with - | Some _ -> () - | None -> seqpoint <- Some i - // Save the last sequence point away so we can make a decision graph look consistent (i.e. reassert the sequence point at each target) - lastSeqPoint <- Some src - - member cgbuf.EmitExceptionClause(clause) = - exnSpecs.Add clause - - member cgbuf.EmitDelayMark(nm) = - let lab = generate_code_label() - //if verbose then dprintf " --> generated code label %s with name %s\n" (string_of_code_label lab) nm; - Mark lab - - member cgbuf.SetCodeLabelToPC(lab,pc) = - //if verbose then dprintf " --> setting label %s to pc %d\n" (string_of_code_label lab) pc; - if codeLabels.ContainsKey(lab) then - warning(InternalError(sprintf "two values for given for label %s" (string_of_code_label lab),m)); - codeLabels.[lab] <- pc - - member cgbuf.SetMark (Mark lab1,Mark lab2) = - let pc = - try codeLabels.[lab2] - with Not_found -> - error(InternalError(sprintf "cgbuf.SetMark code label has no pc specified yet",m)) - cgbuf.SetCodeLabelToPC(lab1,pc) - - member cgbuf.SetMarkToHere (Mark lab) = - cgbuf.SetCodeLabelToPC(lab,codebuf.Count) - - member cgbuf.SetStack(s) = - stack <- s; - nstack <- List.length s - - member cgbuf.Mark(s) = - let res = cgbuf.EmitDelayMark(s) - cgbuf.SetMarkToHere(res); - res - - member cgbuf.mgbuf = mgbuf - member cgbuf.MethodName = methodName - member cgbuf.PreallocatedArgCount = alreadyUsedArgs - - member cgbuf.AllocLocal(ranges,ty) = - let j = locals.Count - locals.Add((ranges,ty)); - j - - member cgbuf.ReallocLocal(cond,ranges,ty) = - let j = - match ResizeArray.tryfind_indexi cond locals with - | Some j -> - let (prevRanges,prevType) = locals.[j] - locals.[j] <- ((ranges@prevRanges),ty); - j - | None -> - cgbuf.AllocLocal(ranges,ty) - let j = j + alreadyUsedLocals - j - - member cgbuf.Close() = - let instrs = ResizeArray.to_array codebuf - let instrs = - // If we omitted ANY sequence points, then promote the first sequence point to be the first instruction in the - // method. A bit ugly but .NET debuggers only honour "step into" if the sequence point is the first in the method. - // - match seqpoint with - | Some(I_seqpoint sp as i) -> - let i = - if zapFirstSeqPointToStart then - i - else - // This special dummy sequence point seems to be the magic to indicate that the head of the - // method has no sequence point - I_seqpoint (ILSourceMarker.Create(document = sp.Document, - line = 0x00feefee, - column = 0, - endLine = 0x00feefee, - endColumn = 0)) - - // Note we use physical equality '==' to compare the instruction objects. Nasty. - instrs |> Array.mapi (fun idx i2 -> if idx = 0 then i else if i == i2 then i_nop else i2) - | _ -> - instrs - ResizeArray.to_list locals , - maxStack, - codeLabels, - instrs, - ResizeArray.to_list exnSpecs, - isSome seqpoint - -module CG = - let EmitInstr (cgbuf:CodeGenBuffer) pps i = cgbuf.EmitInstr(pps,i) - let EmitInstrs (cgbuf:CodeGenBuffer) pps is = cgbuf.EmitInstrs(pps,is) - let EmitSeqPoint (cgbuf:CodeGenBuffer) src = cgbuf.EmitSeqPoint(src) - let EmitDelayMark (cgbuf:CodeGenBuffer) nm = cgbuf.EmitDelayMark(nm) - let SetMark (cgbuf:CodeGenBuffer) m1 m2 = cgbuf.SetMark(m1,m2) - let SetMarkToHere (cgbuf:CodeGenBuffer) m1 = cgbuf.SetMarkToHere(m1) - let SetStack (cgbuf:CodeGenBuffer) s = cgbuf.SetStack(s) - let GenerateMark (cgbuf:CodeGenBuffer) s = cgbuf.Mark(s) - -open CG - - -//-------------------------------------------------------------------------- -// Compile constants -//-------------------------------------------------------------------------- - -let GenString cenv cgbuf m s = - CG.EmitInstrs cgbuf [Push cenv.g.ilg.typ_String] [ I_ldstr s ] - -let GenConstArray cenv (cgbuf:CodeGenBuffer) eenv m ilElementType (data:'a[]) (write : Bytes.Bytebuf.t -> 'a -> unit) = - let buf = Bytes.Bytebuf.create data.Length - data |> Array.iter (write buf); - let bytes = Bytes.Bytebuf.close buf - let ilArrayType = mk_sdarray_ty ilElementType - let len = data.Length - if data.Length = 0 then - CG.EmitInstrs cgbuf [Push cenv.g.ilg.typ_int32; Push ilArrayType; Pop] [ mk_ldc_i32 (0); I_newarr (Rank1ArrayShape,ilElementType); ] - else - let vtspec = cgbuf.mgbuf.GenerateRawDataValueType(eenv.cloc,bytes.Length) - let fldName = mk_private_name ("field"^string(new_uniq())) - let fty = Type_value vtspec - let fieldDef = mk_static_fdef (fldName,fty, None, Some bytes, MemAccess_assembly) - let fieldDef = { fieldDef with fdCustomAttrs = mk_custom_attrs [ mk_DebuggerBrowsableNeverAttribute cenv.g.ilg ] } - let fspec = mk_fspec_in_boxed_tspec (TypeSpecForCompLoc eenv.cloc,fldName, fty) - CountStaticFieldDef(); - cgbuf.mgbuf.AddFieldDef(fspec.EnclosingTypeRef,fieldDef); - CG.EmitInstrs cgbuf - [ Push cenv.g.ilg.typ_int32; Pop; Push ilArrayType; - Push ilArrayType; Push cenv.g.ilg.typ_RuntimeFieldHandle; - Pop; Pop] - [ mk_ldc_i32 data.Length; - I_newarr (Rank1ArrayShape,ilElementType); - i_dup; - I_ldtoken (Token_field fspec); - mk_normal_call (mspec_RuntimeHelpers_InitializeArray cenv.g.ilg) ] - - -//-------------------------------------------------------------------------- -// We normally generate in the context of a "what to do next" continuation -//-------------------------------------------------------------------------- - -type sequel = - | EndFilter (* integer says which local to save result in *) - | LeaveHandler of (bool (* finally? *) * int * mark) (* integer says which local to save result in *) - | Br of mark - | CmpThenBrOrContinue of pushpop list * ILInstr - | Continue - | DiscardThen of sequel - | Return - | EndLocalScope of sequel * mark (* used at end of 'let' and 'let rec' blocks to get tail recursive setting of end-of-scope marks *) -(* - | DiscardAndBr of mark - | discardAndReturnVoid -*) - | ReturnVoid - -let discard = DiscardThen Continue -let discardAndReturnVoid = DiscardThen ReturnVoid - - -//------------------------------------------------------------------------- -// This is the main code generation routine. It is used to generate -// the bodies of methods in a couple of places -//------------------------------------------------------------------------- - -let CodeGenThen cenv mgbuf (zapFirstSeqPointToStart,entryPointInfo,methodName,eenv,alreadyUsedArgs,alreadyUsedLocals,codeGenFunction,m) = - let cgbuf = new CodeGenBuffer(m,mgbuf,methodName,entryPointInfo,alreadyUsedArgs,alreadyUsedLocals,zapFirstSeqPointToStart) - let start = CG.GenerateMark cgbuf "mstart" - let innerVals = entryPointInfo |> List.map (fun (v,kind) -> (v,(kind,start))) - - (* Call the given code generator *) - codeGenFunction cgbuf {eenv with withinSEH=false; - liveLocals=Imap.empty(); - innerVals = innerVals}; - - let finish = CG.GenerateMark cgbuf "mfinish" - - let locals,maxStack,codeLabels,code,exnSpecs,hasSequencePoints = cgbuf.Close() - - let localDebugSpecs = - locals - |> List.mapi (fun i (nms,_) -> List.map (fun nm -> (i,nm)) nms) - |> List.concat - |> List.map (fun (i,(nm,(start,finish))) -> - { locRange=(code_label_of_mark start, code_label_of_mark finish); - locInfos= [{ localNum=i; localName=nm }] }) - - if debug && List.length locals > 64 then dprintn ("Note, method "^methodName^" has "^string (List.length locals)^" locals (even before conversion from ILX to IL)."); - - (List.map (snd >> IL.mk_local) locals, - maxStack, - codeLabels, - code, - exnSpecs, - localDebugSpecs, - hasSequencePoints) - -let CodeGenMethod cenv mgbuf (zapFirstSeqPointToStart,entryPointInfo,methodName,eenv,alreadyUsedArgs,alreadyUsedLocals,codeGenFunction,m) = - (* Codegen the method. REVIEW: change this to generate the AbsIL code tree directly... *) - if verbose then dprintf "----------\ncodegen method %s\n" methodName; - - let locals,maxStack,codeLabels,instrs,exns,localDebugSpecs,hasSequencePoints = - CodeGenThen cenv mgbuf (zapFirstSeqPointToStart,entryPointInfo,methodName,eenv,alreadyUsedArgs,alreadyUsedLocals,codeGenFunction,m) - - let dump() = - instrs |> Array.iteri (fun i instr -> dprintf "%s: %d: %A\n" methodName i instr); - - if verbose then dump(); - - let code = - // Build an Abstract IL code tree from the raw information - let lab2pc lbl = - try Hashtbl.find codeLabels lbl - with Not_found -> errorR(Error("label "^string_of_code_label lbl^" not found",m)); dump(); 676767 - - build_code methodName lab2pc instrs exns localDebugSpecs - - let code = check_code code - - // Attach a source range to the method. Only do this is it has some sequence points, because .NET 2.0/3.5 - // ILDASM has issues if you emit symbols with a source range but without any sequence points - let sourceRange = if hasSequencePoints then GenPossibleILSourceMarker cenv m else None - - // Build an Abstract IL method - mk_ilmbody (true,locals,maxStack,code, sourceRange) - -let StartDelayedLocalScope nm cgbuf = - let startScope = CG.EmitDelayMark cgbuf ("start_"^nm) - let endScope = CG.EmitDelayMark cgbuf ("end_"^nm) - startScope,endScope - -let StartLocalScope nm cgbuf = - let startScope = CG.GenerateMark cgbuf ("start_"^nm) - let endScope = CG.EmitDelayMark cgbuf ("end_"^nm) - startScope,endScope - -let LocalScope nm cgbuf (f : (mark * mark) -> 'a) : 'a = - let startScope,endScope as scopeMarks = StartLocalScope nm cgbuf - let res = f scopeMarks - CG.SetMarkToHere cgbuf endScope; - res - -let compileSequenceExpressions = true // try (System.Environment.GetEnvironmentVariable("COMPILED_SEQ") <> null) with _ -> false - -//------------------------------------------------------------------------- -// Generate expressions -//------------------------------------------------------------------------- - -let bindHasSeqPt = function (TBind(_,_,SequencePointAtBinding _)) -> true | _ -> false -let bindIsInvisible = function (TBind(_,_,NoSequencePointAtInvisibleBinding _)) -> true | _ -> false - -let AlwaysSuppressSequencePoint sp expr = - match sp with - | SPAlways -> - // These extra cases have historically always had their sequence point suppressed - // However they do not fall under the definition of 'DoesExprCodeGenDefinitelyStartWithSequencePoint = false' - match expr with - | TExpr_let (bind,_,_,_) when bindIsInvisible(bind) -> true - | TExpr_letrec(binds,_,_,_) when (binds |> FlatList.exists bindHasSeqPt) || (binds |> FlatList.forall bindIsInvisible) -> true - | TExpr_seq _ - | TExpr_match _ -> true - | TExpr_op((TOp_label _ | TOp_goto _),_,_,_) -> true - | _ -> false - | SPSuppress -> - true - -// This is the list of composite statement expressions where we're about to emit a sequence -// point for sure. They get sequence points on their sub-expressions -// -// Determine if expression code generation certainly starts with a sequence point. An approximation used -// to prevent the generation of duplicat sequence points for conditionals and pattern matching -let rec WillGenerateSequencePoint sp expr = - match sp with - | SPAlways -> - let definiteSequencePoint = - match expr with - | TExpr_let (bind,expr,_,_) - -> bindHasSeqPt(bind) || - (bind.Var.IsCompiledAsTopLevel && WillGenerateSequencePoint sp expr) - | TExpr_letrec(binds,expr,_,_) - -> (binds |> FlatList.forall (fun bind -> bind.Var.IsCompiledAsTopLevel)) && WillGenerateSequencePoint sp expr - - | TExpr_seq (_, _, NormalSeq,spSeq,_) -> - (match spSeq with - | SequencePointsAtSeq -> true - | SuppressSequencePointOnExprOfSequential -> true - | SuppressSequencePointOnStmtOfSequential -> false) - | TExpr_match (SequencePointAtBinding _,_,_,_,_,_,_) -> true - | TExpr_op(( TOp_try_catch (SequencePointAtTry _,_) - | TOp_try_finally (SequencePointAtTry _,_) - | TOp_for (SequencePointAtForLoop _,_) - | TOp_while (SequencePointAtWhileLoop _)),_,_,_) -> true - | _ -> false - definiteSequencePoint - - | SPSuppress -> - false - -let DoesGenExprStartWithSequencePoint sp expr = - WillGenerateSequencePoint sp expr || not (AlwaysSuppressSequencePoint sp expr) - -let rec GenExpr cenv (cgbuf:CodeGenBuffer) eenv sp expr sequel = - if verbose then dprintf "GenExpr@%a, #stack = %A, sequel = %s\n" output_range (range_of_expr expr) (cgbuf.GetCurrentStack()) (StringOfSequel sequel); - (* if verbose then dprintf "GenExpr@%a, #stack = %d, expr = %s, sequel = %s\n" output_range (range_of_expr expr) (List.length cgbuf.stack) (showL (ExprL expr)) (StringOfSequel sequel); *) - let expr = strip_expr expr - - if not (WillGenerateSequencePoint sp expr) && not (AlwaysSuppressSequencePoint sp expr) then - CG.EmitSeqPoint cgbuf (range_of_expr expr); - - match (if compileSequenceExpressions then Lowertop.LowerSeqExpr cenv.g cenv.amap expr else None) with - | Some info -> - GenSequenceExpr cenv cgbuf eenv info sequel - | None -> - - match expr with - | TExpr_const(c,m,ty) -> - GenConstant cenv cgbuf eenv (c,m,ty) sequel - | TExpr_match (spBind,exprm,tree,targets,m,ty,_) -> - GenMatch cenv cgbuf eenv (spBind,exprm,tree,targets,m,ty) sequel - | TExpr_seq(e1,e2,dir,spSeq,m) -> - GenSequential cenv cgbuf eenv sp (e1,e2,dir,spSeq,m) sequel - | TExpr_letrec (binds,body,m,_) -> - GenLetRec cenv cgbuf eenv (binds,body,m) sequel - | TExpr_let (bind,body,m,_) -> - (* This case implemented here to get a guaranteed tailcall *) - // Make sure we generate the sequence point outside the scope of the variable - let startScope,endScope as scopeMarks = StartDelayedLocalScope "let" cgbuf - let eenv = AllocStorageForBind cenv cgbuf scopeMarks eenv bind - let sp = GenSequencePointForBind cenv cgbuf eenv bind - CG.SetMarkToHere cgbuf startScope; - GenBindAfterSequencePoint cenv cgbuf eenv sp bind; - - let sp = if bindHasSeqPt bind || bindIsInvisible bind then SPAlways else SPSuppress - GenExpr cenv cgbuf eenv sp body (EndLocalScope(sequel,endScope)) - - | TExpr_lambda _ | TExpr_tlambda _ -> - GenLambda cenv cgbuf eenv false None expr sequel - | TExpr_app(f,fty,tyargs,args,m) -> - GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel - | TExpr_val(v,flags,m) -> - GenGetVal cenv cgbuf eenv (v,m) sequel - | TExpr_op(op,tyargs,args,m) -> - begin match op,args,tyargs with - | TOp_exnconstr(c),_,_ -> - GenAllocExn cenv cgbuf eenv (c,args,m) sequel - | TOp_ucase(c),_,_ -> - GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel - | TOp_recd(isCtor,tycon),_,_ -> - GenAllocRecd cenv cgbuf eenv isCtor (tycon,tyargs,args,m) sequel - | TOp_tuple_field_get(n),[e],_ -> - GenGetTupleField cenv cgbuf eenv (e,tyargs,n,m) sequel - | TOp_exnconstr_field_get(constr,n),[e],_ -> - GenGetExnField cenv cgbuf eenv (e,constr,n,m) sequel - | TOp_ucase_field_get(constr,n),[e],_ -> - GenGetUnionCaseField cenv cgbuf eenv (e,constr,tyargs,n,m) sequel - | TOp_ucase_tag_get(constr),[e],_ -> - GenGetUnionCaseTag cenv cgbuf eenv (e,constr,tyargs,m) sequel - | TOp_ucase_proof(constr),[e],_ -> - GenUnionCaseProof cenv cgbuf eenv (e,constr,tyargs,m) sequel - | TOp_exnconstr_field_set(constr,n),[e;e2],_ -> - GenSetExnField cenv cgbuf eenv (e,constr,n,e2,m) sequel - | TOp_ucase_field_set(constr,n),[e;e2],_ -> - GenSetUnionCaseField cenv cgbuf eenv (e,constr,tyargs,n,e2,m) sequel - | TOp_rfield_get(f),[e],_ -> - GenGetRecdField cenv cgbuf eenv (e,f,tyargs,m) sequel - | TOp_rfield_get(f),[],_ -> - GenGetStaticField cenv cgbuf eenv (f,tyargs,m) sequel - | TOp_field_get_addr(f),[e],_ -> - GenGetRecdFieldAddr cenv cgbuf eenv (e,f,tyargs,m) sequel - | TOp_field_get_addr(f),[],_ -> - GenGetStaticFieldAddr cenv cgbuf eenv (f,tyargs,m) sequel - | TOp_rfield_set(f),[e1;e2],_ -> - GenSetRecdField cenv cgbuf eenv (e1,f,tyargs,e2,m) sequel - | TOp_rfield_set(f),[e2],_ -> - GenSetStaticField cenv cgbuf eenv (f,tyargs,e2,m) sequel - | TOp_tuple,_,_ -> - GenAllocTuple cenv cgbuf eenv (args,tyargs,m) sequel - | TOp_asm(code,rtys),_,_ -> - GenAsmCode cenv cgbuf eenv (code,tyargs,args,rtys,m) sequel - | TOp_while sp,[TExpr_lambda(_,_,[_],e1,_,_,_);TExpr_lambda(_,_,[_],e2,_,_,_)],[] -> - GenWhileLoop cenv cgbuf eenv (sp,e1,e2,m) sequel - | TOp_for(spStart,dir),[TExpr_lambda(_,_,[_],e1,_,_,_);TExpr_lambda(_,_,[_],e2,_,_,_);TExpr_lambda(_,_,[v],e3,_,_,_)],[] -> - GenForLoop cenv cgbuf eenv (spStart,v,e1,dir,e2,e3,m) sequel - | TOp_try_finally(spTry,spFinally),[TExpr_lambda(_,_,[_],e1,_,_,_); TExpr_lambda(_,_,[_],e2,_,_,_)],[resty] -> - GenTryFinally cenv cgbuf eenv (e1,e2,m,resty,spTry,spFinally) sequel - | TOp_try_catch(spTry,spWith),[TExpr_lambda(_,_,[_],e1,_,_,_); TExpr_lambda(_,_,[vf],ef,_,_,_);TExpr_lambda(_,_,[vh],eh,_,_,_)],[resty] -> - GenTryCatch cenv cgbuf eenv (e1,vf,ef,vh,eh,m,resty,spTry,spWith) sequel - | TOp_ilcall(meth,enclTypeArgs,methTypeArgs,rtys),args,[] -> - GenIlCall cenv cgbuf eenv (meth,enclTypeArgs,methTypeArgs,args,rtys,m) sequel - | TOp_get_ref_lval,[e],[ty] -> GenGetAddrOfRefCellField cenv cgbuf eenv (e,ty,m) sequel - | TOp_coerce,[e],[tgty;srcty] -> GenCoerce cenv cgbuf eenv (e,tgty,m,srcty) sequel - | TOp_rethrow,[],[rtnty] -> GenRethrow cenv cgbuf eenv (rtnty,m) sequel - | TOp_trait_call(ss),args,[] -> GenTraitCall cenv cgbuf eenv (ss,args, m) expr sequel - | TOp_lval_op(LSet,v),[e],[] -> GenSetVal cenv cgbuf eenv (v,e,m) sequel - | TOp_lval_op(LByrefGet,v),[],[] -> GenGetByref cenv cgbuf eenv (v,m) sequel - | TOp_lval_op(LByrefSet,v),[e],[] -> GenSetByref cenv cgbuf eenv (v,e,m) sequel - | TOp_lval_op(LGetAddr,v),[],[] -> GenGetValAddr cenv cgbuf eenv (v,m) sequel - | TOp_array,elems,[argty] -> GenNewArray cenv cgbuf eenv (elems,argty,m) sequel - | TOp_bytes bytes,[],[] -> - if cenv.emitConstantArraysUsingStaticDataBlobs then - GenConstArray cenv cgbuf eenv m cenv.g.ilg.typ_uint8 bytes Bytes.Bytebuf.emit_byte; - GenSequel cenv eenv.cloc cgbuf sequel - else - GenNewArraySimple cenv cgbuf eenv (List.of_array (Array.map (mk_byte cenv.g m) bytes),cenv.g.byte_ty,m) sequel - | TOp_uint16s arr,[],[] -> - if cenv.emitConstantArraysUsingStaticDataBlobs then - GenConstArray cenv cgbuf eenv m cenv.g.ilg.typ_uint16 arr Bytes.Bytebuf.emit_u16; - GenSequel cenv eenv.cloc cgbuf sequel - else - GenNewArraySimple cenv cgbuf eenv (List.of_array (Array.map (mk_uint16 cenv.g m) arr),cenv.g.uint16_ty,m) sequel - | TOp_goto(label),_,_ -> - CG.EmitInstr cgbuf [] (I_br label); - // NOTE: discard sequel - | TOp_return,[e],_ -> - GenExpr cenv cgbuf eenv SPSuppress e Return - // NOTE: discard sequel - | TOp_return,[],_ -> - GenSequel cenv eenv.cloc cgbuf ReturnVoid - // NOTE: discard sequel - | TOp_label(label),_,_ -> - cgbuf.SetMarkToHere (Mark label) - GenUnitThenSequel cenv eenv.cloc cgbuf sequel - | _ -> error(InternalError("Unexpected operator node expression",range_of_expr expr)) - end - | TExpr_static_optimization(constraints,e2,e3,m) -> - GenStaticOptimization cenv cgbuf eenv (constraints,e2,e3,m) sequel - | TExpr_obj(uniq,typ,_,_,[meth],[],m,_) when is_delegate_typ cenv.g typ -> - GenDelegateExpr cenv cgbuf eenv expr (meth,m) sequel - | TExpr_obj(uniq,typ,basev,basecall,overrides,interfaceImpls,m,_) -> - GenObjectExpr cenv cgbuf eenv expr (typ,basev,basecall,overrides,interfaceImpls,m) sequel - - | TExpr_quote(ast,conv,m,ty) -> GenQuotation cenv cgbuf eenv (ast,conv,m,ty) sequel - | TExpr_link _ -> failwith "Unexpected reclink" - | TExpr_tchoose (_,_,m) -> error(InternalError("Unexpected TExpr_tchoose",m)) - -and GenExprs cenv cgbuf eenv es = List.iter (fun e -> GenExpr cenv cgbuf eenv SPSuppress e Continue) es - -and CodeGenMethodForExpr cenv mgbuf (spReq,entryPointInfo,methodName,eenv,alreadyUsedArgs,alreadyUsedLocals,expr0,sequel0) = - let zapFirstSeqPointToStart = (spReq = SPAlways) - CodeGenMethod cenv mgbuf (zapFirstSeqPointToStart,entryPointInfo,methodName,eenv,alreadyUsedArgs,alreadyUsedLocals, - (fun cgbuf eenv -> GenExpr cenv cgbuf eenv spReq expr0 sequel0), - (range_of_expr expr0)) - - - -//-------------------------------------------------------------------------- -// Generate sequels -//-------------------------------------------------------------------------- - -(* does the sequel discard its result, and if so what does it do next? *) -and sequelAfterDiscard sequel = - match sequel with - | DiscardThen sequel -> Some(sequel) - | EndLocalScope(sq,mark) -> sequelAfterDiscard sq |> Option.map (fun sq -> EndLocalScope(sq,mark)) - | _ -> None - -and sequel_ignoring_end_scopes_and_discard sequel = - let sequel = sequel_ignore_end_scopes sequel - match sequelAfterDiscard sequel with - | Some sq -> sq - | None -> sequel - -and sequel_ignore_end_scopes sequel = - match sequel with - | EndLocalScope(sq,m) -> sequel_ignore_end_scopes sq - | sq -> sq - -(* commit any 'EndLocalScope' nodes in the sequel and return the residue *) -and GenSequelEndScopes cgbuf sequel = - match sequel with - | EndLocalScope(sq,m) -> CG.SetMarkToHere cgbuf m; GenSequelEndScopes cgbuf sq - | sq -> () - -and StringOfSequel sequel = - match sequel with - | Continue -> "continue" - | DiscardThen sequel -> "discard; "^StringOfSequel sequel - | ReturnVoid -> "ReturnVoid" - | CmpThenBrOrContinue(pushpops,bri) -> "CmpThenBrOrContinue" - | Return -> "Return" - | EndLocalScope (sq,Mark k) -> "EndLocalScope("^StringOfSequel sq^","^string_of_code_label k^")" - | Br (Mark x) -> sprintf "Br L%s" (string_of_code_label x) - | LeaveHandler _ -> "LeaveHandler" - | EndFilter -> "EndFilter" - -and GenSequel cenv cloc cgbuf sequel = - let sq = sequel_ignore_end_scopes sequel - if verbose then dprintn ("GenSequel:" ^ StringOfSequel sequel); - (match sq with - | Continue -> () - | DiscardThen sq -> - CG.EmitInstr cgbuf [Pop] (i_pop); - GenSequel cenv cloc cgbuf sq - | ReturnVoid -> - CG.EmitInstr cgbuf [] I_ret - | CmpThenBrOrContinue(pushpops,bri) -> - CG.EmitInstr cgbuf pushpops bri - | Return -> - CG.EmitInstr cgbuf [Pop] I_ret - | EndLocalScope _ -> failwith "EndLocalScope unexpected" - | Br x -> - // Emit a NOP in debug code in case the branch instruction gets eliminated - // because it is a "branch to next instruction". This prevents two unrelated sequence points - // (the one before the branch and the one after) being coalesced together - if cgbuf.mgbuf.cenv.debug then - CG.EmitInstr cgbuf [] i_nop - CG.EmitInstr cgbuf [] (I_br(code_label_of_mark x)) - | LeaveHandler (isFinally, whereToSaveResult,x) -> - if isFinally then - CG.EmitInstr cgbuf [Pop] (i_pop) - else - EmitSetLocal cgbuf whereToSaveResult; - CG.EmitInstr cgbuf [] (if isFinally then I_endfinally else I_leave(code_label_of_mark x)) - | EndFilter -> - CG.EmitInstr cgbuf [Pop] I_endfilter - ); - GenSequelEndScopes cgbuf sequel; - if verbose then dprintn ("GenSequel: done"); - - -//-------------------------------------------------------------------------- -// Generate constants -//-------------------------------------------------------------------------- - -and GenConstant cenv cgbuf eenv (c,m,ty) sequel = - let il_ty = GenType m cenv.g eenv.tyenv ty - (* Check if we need to generate the value at all! *) - begin match sequelAfterDiscard sequel with - | None -> - if verbose then dprintn ("GenConstant: generating "); - begin match TryEliminateDesugaredConstants cenv.g m c with - | Some e -> GenExpr cenv cgbuf eenv SPSuppress e Continue - | None -> - match c with - | TConst_bool b -> CG.EmitInstr cgbuf [Push cenv.g.ilg.typ_bool] (mk_ldc_i32 (if b then 1 else 0)) - - | TConst_sbyte(i) -> CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_i32 (int32 i)) - | TConst_int16(i) -> CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_i32 (int32 i)) - | TConst_int32(i) -> CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_i32 i) - | TConst_int64(i) -> CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_i64 i) - | TConst_nativeint(i) -> CG.EmitInstrs cgbuf [Push il_ty] [mk_ldc_i64 i; I_arith (AI_conv DT_I) ] - | TConst_byte(i) -> CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_i32 (int32 i)) - | TConst_uint16(i) -> CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_i32 (int32 i)) - | TConst_uint32(i) -> CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_i32 (int32 i)) - | TConst_uint64(i) -> CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_i64 (int64 i)) - | TConst_unativeint(i) -> CG.EmitInstrs cgbuf [Push il_ty] [mk_ldc_i64 (int64 i); I_arith (AI_conv DT_U) ] - | TConst_float(f) -> CG.EmitInstr cgbuf [Push il_ty] ( I_arith (AI_ldc (DT_R8,NUM_R8 f)) ) - | TConst_float32(f) -> CG.EmitInstr cgbuf [Push il_ty] ( I_arith (AI_ldc (DT_R4,NUM_R4 f)) ) - | TConst_char(c) -> CG.EmitInstr cgbuf [Push il_ty] ( mk_ldc_i32 (int c)) - | TConst_string(s) -> GenString cenv cgbuf m s - | TConst_unit -> GenUnit cenv cgbuf - | TConst_zero -> GenDefaultValue cenv cgbuf eenv (ty,m) - | TConst_decimal _ -> failwith "unreachable" - end; - GenSequel cenv eenv.cloc cgbuf sequel - | Some sq -> - if verbose then dprintn ("GenConstant: skipping"); - (* Even if we didn't need to generate the value then maybe we still have to branch or return *) - GenSequel cenv eenv.cloc cgbuf sq - end - -and GenUnit cenv cgbuf = CG.EmitInstr cgbuf [Push cenv.g.ilg.typ_Object] i_ldnull - -and GenUnitThenSequel cenv cloc cgbuf sequel = - if verbose then dprintn ("GenUnitThenSequel:"); - match sequelAfterDiscard sequel with - | Some(sq) -> GenSequel cenv cloc cgbuf sq - | None -> GenUnit cenv cgbuf; GenSequel cenv cloc cgbuf sequel - - -//-------------------------------------------------------------------------- -// Generate simple data-related constructs -//-------------------------------------------------------------------------- - -and GenAllocTuple cenv cgbuf eenv (args,argtys,m) sequel = - if verbose then dprintn ("GenAllocTuple:"); - let tcref, tys, args, newm = compiled_mk_tuple cenv.g (argtys,args,m) - let typ = GenNamedTyApp newm cenv.g eenv.tyenv tcref tys - let ntyvars = if (tys.Length - 1) < goodTupleFields then (tys.Length - 1) else goodTupleFields - let tyvars = [0 .. ntyvars] |> List.map (fun n -> mk_tyvar_ty (uint16 n)) - if verbose then dprintf "GenAllocTuple: #args = %d\n" (List.length args); - GenExprs cenv cgbuf eenv args; - (* generate a reference to the constructor *) - let tyenvinner = tyenv_for_tcref tcref - if verbose then dprintf "GenAllocTuple: call, #args = %d" (List.length args); - CG.EmitInstr cgbuf (List.replicate args.Length Pop @ [ Push typ; ]) - (mk_normal_newobj - (mk_ctor_mspec_for_typ (typ,tyvars))); - GenSequel cenv eenv.cloc cgbuf sequel - - -and GenGetTupleField cenv cgbuf eenv (e,tys,n,m) sequel = - let rec compiled_get_system_tuple_item g (e,tys,n,m) = - let ar = List.length tys - if ar <= 0 then failwith "compiled_get_tuple_item" - elif ar < maxTuple then - let tcr' = compiled_tuple_tcref g tys - let typ = GenNamedTyApp m g eenv.tyenv tcr' tys - mk_call_Tuple_ItemN g m n typ e tys.[n] - else - let tysA,tysB = split_after (goodTupleFields) tys - let tyB = compiled_tuple_ty g tysB - let tys' = tysA@[tyB] - let tcr' = compiled_tuple_tcref g tys' - let typ' = GenNamedTyApp m g eenv.tyenv tcr' tys' - let n' = (min n goodTupleFields) - let elast = mk_call_Tuple_ItemN g m n' typ' e tys'.[n'] - if n < goodTupleFields then - elast - else - compiled_get_system_tuple_item g (elast,tysB,n-goodTupleFields,m) - GenExpr cenv cgbuf eenv SPSuppress (compiled_get_system_tuple_item cenv.g (e,tys,n,m)) sequel - - -and GenAllocExn cenv cgbuf eenv (c,args,m) sequel = - GenExprs cenv cgbuf eenv args; - let typ = GenExnType m cenv.g eenv.tyenv c - let flds = rfields_of_ecref c - let argtys = flds |> List.map (fun rfld -> GenType m cenv.g eenv.tyenv rfld.FormalType) - let mspec = mk_ctor_mspec (typ.TypeRef, AsObject,argtys,[]) - CG.EmitInstr cgbuf - (List.replicate args.Length Pop @ [ Push typ]) - (mk_normal_newobj mspec) ; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel = - if verbose then dprintn ("GenAllocUnionCase"); - GenExprs cenv cgbuf eenv args; - let cuspec,idx = GenUnionCaseSpec m cenv.g eenv.tyenv c tyargs - CG.EmitInstr cgbuf (List.replicate args.Length Pop @ [ Push (objtype_of_cuspec cuspec)]) (mk_IlxInstr (EI_newdata (cuspec,idx))); - GenSequel cenv eenv.cloc cgbuf sequel - -and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = - let typ = GenNamedTyApp m cenv.g eenv.tyenv tcref argtys - - (* Filter out fields with default initialization *) - let relevantFields = - tcref.AllInstanceFieldsAsList - |> List.filter (fun f -> not f.IsZeroInit) - - match ctorInfo with - | RecdExprIsObjInit -> - if verbose then dprintn ("GenAllocRecd: class constructor"); - (args,relevantFields) ||> List.iter2 (fun e f -> - CG.EmitInstr cgbuf [Push typ] ldarg_0; - GenExpr cenv cgbuf eenv SPSuppress e Continue; - GenFieldStore false cenv cgbuf eenv (mk_rfref tcref f.Name,argtys,m) discard) - (* Object construction doesn't generate a true value. *) - (* Object constructions will always just get thrown away so this is safe *) - GenSequel cenv eenv.cloc cgbuf sequel - | RecdExpr -> - if verbose then dprintf "GenAllocRecd: normal record, #args = %d\n" (List.length args); - GenExprs cenv cgbuf eenv args; - (* generate a reference to the record constructor *) - let tyenvinner = tyenv_for_tcref tcref - if verbose then dprintf "GenAllocRecd: call, #args = %d" (List.length args); - CG.EmitInstr cgbuf (List.replicate args.Length Pop @ [ Push typ; ]) - (mk_normal_newobj - (mk_ctor_mspec_for_typ (typ,relevantFields |> List.map (fun f -> GenType m cenv.g tyenvinner f.FormalType) ))); - GenSequel cenv eenv.cloc cgbuf sequel - - -and GenNewArraySimple cenv cgbuf eenv (elems,argty,m) sequel = - let argty' = GenType m cenv.g eenv.tyenv argty - let arrty = mk_array_ty_old (Rank1ArrayShape,argty') - - CG.EmitInstrs cgbuf [Push arrty] [ I_arith (AI_ldc (DT_I4,NUM_I4 ((List.length elems)))); I_newarr (Rank1ArrayShape,argty') ]; - List.iteri - (fun i e -> - CG.EmitInstrs cgbuf [Push arrty; Push cenv.g.ilg.typ_int32] [ i_dup; I_arith (AI_ldc (DT_I4,NUM_I4 (i))) ]; - GenExpr cenv cgbuf eenv SPSuppress e Continue; - CG.EmitInstr cgbuf [Pop; Pop; Pop] (I_stelem_any (Rank1ArrayShape,argty'))) - elems; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenNewArray cenv cgbuf eenv (elems: expr list,argty,m) sequel = - if elems.Length <= 5 || not cenv.emitConstantArraysUsingStaticDataBlobs then - GenNewArraySimple cenv cgbuf eenv (elems,argty,m) sequel - else - (* Try to emit a constant byte-blob array *) - let elems' = Array.of_list elems - let test,write = - match elems'.[0] with - | TExpr_const(TConst_bool _,_,_) -> (function TConst_bool _ -> true | _ -> false), (fun buf -> function TConst_bool b -> Bytes.Bytebuf.emit_bool_as_byte buf b | _ -> failwith "unreachable") - | TExpr_const(TConst_char _,_,_) -> (function TConst_char _ -> true | _ -> false), (fun buf -> function TConst_char b -> Bytes.Bytebuf.emit_i32_as_u16 buf (int b) | _ -> failwith "unreachable") - | TExpr_const(TConst_byte _,_,_) -> (function TConst_byte _ -> true | _ -> false), (fun buf -> function TConst_byte b -> Bytes.Bytebuf.emit_byte buf b | _ -> failwith "unreachable") - | TExpr_const(TConst_uint16 _,_,_) -> (function TConst_uint16 _ -> true | _ -> false), (fun buf -> function TConst_uint16 b -> Bytes.Bytebuf.emit_u16 buf b | _ -> failwith "unreachable") - | TExpr_const(TConst_uint32 _,_,_) -> (function TConst_uint32 _ -> true | _ -> false), (fun buf -> function TConst_uint32 b -> Bytes.Bytebuf.emit_i32 buf (int32 b) | _ -> failwith "unreachable") - | TExpr_const(TConst_uint64 _,_,_) -> (function TConst_uint64 _ -> true | _ -> false), (fun buf -> function TConst_uint64 b -> Bytes.Bytebuf.emit_i64 buf (int64 b) | _ -> failwith "unreachable") - | TExpr_const(TConst_sbyte _,_,_) -> (function TConst_sbyte _ -> true | _ -> false), (fun buf -> function TConst_sbyte b -> Bytes.Bytebuf.emit_byte buf (byte b) | _ -> failwith "unreachable") - | TExpr_const(TConst_int16 _,_,_) -> (function TConst_int16 _ -> true | _ -> false), (fun buf -> function TConst_int16 b -> Bytes.Bytebuf.emit_u16 buf (uint16 b) | _ -> failwith "unreachable") - | TExpr_const(TConst_int32 _,_,_) -> (function TConst_int32 _ -> true | _ -> false), (fun buf -> function TConst_int32 b -> Bytes.Bytebuf.emit_i32 buf b | _ -> failwith "unreachable") - | TExpr_const(TConst_int64 _,_,_) -> (function TConst_int64 _ -> true | _ -> false), (fun buf -> function TConst_int64 b -> Bytes.Bytebuf.emit_i64 buf b | _ -> failwith "unreachable") - - | _ -> (function _ -> false), (fun _ _ -> failwith "unreachable") - if elems' |> Array.forall (function TExpr_const(c,_,_) -> test c | _ -> false) then - let argty' = GenType m cenv.g eenv.tyenv argty - GenConstArray cenv cgbuf eenv m argty' elems' (fun buf -> function TExpr_const(c,_,_) -> write buf c | _ -> failwith "unreachable"); - GenSequel cenv eenv.cloc cgbuf sequel - - else - GenNewArraySimple cenv cgbuf eenv (elems,argty,m) sequel - -and GenCoerce cenv cgbuf eenv (e,tgty,m,srcty) sequel = - (* Is this an upcast? *) - if Typrelns.type_definitely_subsumes_type_no_coercion 0 cenv.g cenv.amap m tgty srcty && - (* Do an extra check - should not be needed *) - Typrelns.type_feasibly_subsumes_type 0 cenv.g cenv.amap m tgty Typrelns.NoCoerce srcty then - begin - (* The .NET IL doesn't always support implict subsumption for interface types, e.g. at stack merge points *) - (* Hence be conservative here and always cast explicitly. *) - if (is_interface_typ cenv.g tgty) then ( - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let ilToTy = GenType m cenv.g eenv.tyenv tgty - CG.EmitInstrs cgbuf [Pop; Push ilToTy] [ I_unbox_any ilToTy; ]; - GenSequel cenv eenv.cloc cgbuf sequel - ) else ( - GenExpr cenv cgbuf eenv SPSuppress e sequel; - ) - end - else - GenExpr cenv cgbuf eenv SPSuppress e Continue; - if not (is_obj_typ cenv.g srcty) then - let ilFromTy = GenType m cenv.g eenv.tyenv srcty - CG.EmitInstrs cgbuf [Pop; Push cenv.g.ilg.typ_Object] [ I_box ilFromTy; ]; - if not (is_obj_typ cenv.g tgty) then - let ilToTy = GenType m cenv.g eenv.tyenv tgty - CG.EmitInstrs cgbuf [Pop; Push ilToTy] [ I_unbox_any ilToTy; ]; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenRethrow cenv cgbuf eenv (rtnty,m) sequel = - let ilReturnTy = GenType m cenv.g eenv.tyenv rtnty - CG.EmitInstrs cgbuf [] [I_rethrow]; - // [See comment related to I_throw]. - // Rethrow does not return. Required to push dummy value on the stack. - // This follows prior behaviour by prim-types rethrow<_>. - CG.EmitInstrs cgbuf [Push ilReturnTy] [i_ldnull; I_unbox_any ilReturnTy ]; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenGetExnField cenv cgbuf eenv (e,ecref,fieldNum,m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let exnc = strip_eqns_from_ecref ecref - let typ = GenExnType m cenv.g eenv.tyenv ecref - CG.EmitInstrs cgbuf [] [ I_castclass typ]; - - let fld = List.nth (exnc.TrueInstanceFieldsAsList) fieldNum - let ftyp = GenType m cenv.g eenv.tyenv fld.FormalType - - let mspec = mk_nongeneric_instance_mspec_in_typ (typ,"get_"^fld.Name, [], ftyp) - CG.EmitInstr cgbuf ([Pop;Push ftyp]) (mk_normal_call mspec) - - GenSequel cenv eenv.cloc cgbuf sequel - -and GenSetExnField cenv cgbuf eenv (e,ecref,fieldNum,e2,m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let exnc = strip_eqns_from_ecref ecref - let typ = GenExnType m cenv.g eenv.tyenv ecref - CG.EmitInstrs cgbuf [] [ I_castclass typ ]; - let fld = List.nth (exnc.TrueInstanceFieldsAsList) fieldNum - let ftyp = GenType m cenv.g eenv.tyenv fld.FormalType - let fldName = GenFieldName exnc fld - GenExpr cenv cgbuf eenv SPSuppress e2 Continue; - CG.EmitInstr cgbuf [Pop; Pop] (mk_normal_stfld(mk_fspec_in_typ (typ,fldName,ftyp))); - GenUnitThenSequel cenv eenv.cloc cgbuf sequel - - -and GenUnionCaseProof cenv cgbuf eenv (e,constr,tyargs,m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let cuspec,idx = GenUnionCaseSpec m cenv.g eenv.tyenv constr tyargs - let fty = EraseIlxClassunions.typ_of_alt cuspec idx - CG.EmitInstrs cgbuf [Pop; Push fty] - [ mk_IlxInstr (EI_castdata(false,cuspec,idx)); ]; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenGetUnionCaseField cenv cgbuf eenv (e,constr,tyargs,n,m) sequel = - assert (is_proven_ucase_typ (type_of_expr cenv.g e)); - - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let cuspec,idx = GenUnionCaseSpec m cenv.g eenv.tyenv constr tyargs - (* ANALYSIS: don't use castdata where we've already done a typetest *) - let fty = actual_typ_of_cuspec_field cuspec idx n - CG.EmitInstrs cgbuf [Pop; Push fty] - [ //mk_IlxInstr (EI_castdata(false,cuspec,idx)); - mk_IlxInstr (EI_lddata(cuspec,idx,n)) ]; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenGetUnionCaseTag cenv cgbuf eenv (e,tycon,tyargs,m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let cuspec = GenUnionSpec m cenv.g eenv.tyenv tycon tyargs - CG.EmitInstrs cgbuf [Pop; Push cenv.g.ilg.typ_int32] [ mk_IlxInstr (EI_lddatatag(cuspec)) ]; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenSetUnionCaseField cenv cgbuf eenv (e,constr,tyargs,n,e2,m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let cuspec,idx = GenUnionCaseSpec m cenv.g eenv.tyenv constr tyargs - CG.EmitInstr cgbuf [Pop; Push (objtype_of_cuspec cuspec) ] (mk_IlxInstr (EI_castdata(false,cuspec,idx))); - GenExpr cenv cgbuf eenv SPSuppress e2 Continue; - CG.EmitInstr cgbuf [Pop; Pop] (mk_IlxInstr (EI_stdata(cuspec,idx,n)) ); - GenUnitThenSequel cenv eenv.cloc cgbuf sequel - -and GenGetRecdFieldAddr cenv cgbuf eenv (e,f,tyargs,m) sequel = (* follows GenGetAddrOfRefCellField code *) - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let fref = GenRecdFieldRef m cenv eenv.tyenv f tyargs - CG.EmitInstrs cgbuf [Pop; Push (Type_byref (actual_typ_of_fspec fref))] [ I_ldflda fref ] ; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenGetStaticFieldAddr cenv cgbuf eenv (f,tyargs,m) sequel = (* follows GenGetAddrOfRefCellField code *) - let fspec = GenRecdFieldRef m cenv eenv.tyenv f tyargs - CG.EmitInstrs cgbuf [Push (Type_byref (actual_typ_of_fspec fspec))] [ I_ldsflda fspec ] ; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenGetRecdField cenv cgbuf eenv (e,f,tyargs,m) sequel = - if verbose then dprintn ("GenGetRecdField"); - GenExpr cenv cgbuf eenv SPSuppress e Continue; - GenFieldGet false cenv cgbuf eenv (f,tyargs,m); - GenSequel cenv eenv.cloc cgbuf sequel - -and GenSetRecdField cenv cgbuf eenv (e1,f,tyargs,e2,m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e1 Continue; - GenExpr cenv cgbuf eenv SPSuppress e2 Continue; - GenFieldStore false cenv cgbuf eenv (f,tyargs,m) sequel - -and GenGetStaticField cenv cgbuf eenv (f,tyargs,m) sequel = - GenFieldGet true cenv cgbuf eenv (f,tyargs,m); - GenSequel cenv eenv.cloc cgbuf sequel - -and GenSetStaticField cenv cgbuf eenv (f,tyargs,e2,m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e2 Continue; - GenFieldStore true cenv cgbuf eenv (f,tyargs,m) sequel - -and mk_field_mspec isStatic = - (if isStatic then mk_static_nongeneric_mspec_in_typ else mk_nongeneric_instance_mspec_in_typ) -and mk_field_pops isStatic pops = if isStatic then pops else Pop::pops - - -and GenFieldGet isStatic cenv cgbuf eenv (rfref:RecdFieldRef,tyargs,m) = - let fspec = GenRecdFieldRef m cenv eenv.tyenv rfref tyargs - if use_genuine_field rfref.Tycon rfref.RecdField || tcref_in_this_assembly cenv.g.compilingFslib rfref.TyconRef then - CG.EmitInstrs cgbuf (mk_field_pops isStatic [ Push (actual_typ_of_fspec fspec)]) [ if isStatic then mk_normal_ldsfld fspec else mk_normal_ldfld fspec ] - else - let mspec = mk_field_mspec isStatic (fspec.EnclosingType,"get_"^rfref.RecdField.rfield_id.idText, [], fspec.FormalType) - CG.EmitInstr cgbuf (mk_field_pops isStatic [Push (actual_typ_of_fspec fspec)]) (mk_normal_call mspec) - -and GenFieldStore isStatic cenv cgbuf eenv (rfref:RecdFieldRef,tyargs,m) sequel = - let fspec = GenRecdFieldRef m cenv eenv.tyenv rfref tyargs - let fld = rfref.RecdField - if fld.IsMutable && not (use_genuine_field rfref.Tycon fld) then - let mspec = mk_field_mspec isStatic (fspec.EnclosingType, "set_"^fld.rfield_id.idText, [fspec.FormalType],Type_void) - - CG.EmitInstr cgbuf (mk_field_pops isStatic [Pop]) (mk_normal_call mspec) - else - (* Within assemblies we do generate some set-field operations *) - (* for immutable fields even when resolving recursive bindings. *) - (* However we do not generate "set" properties for these. *) - (* Hence we just set the field directly in this case. *) - CG.EmitInstr cgbuf (mk_field_pops isStatic [Pop]) (if isStatic then mk_normal_stsfld fspec else mk_normal_stfld fspec); - GenUnitThenSequel cenv eenv.cloc cgbuf sequel - -//-------------------------------------------------------------------------- -// Generate arguments to calls -//-------------------------------------------------------------------------- - -/// Generate arguments to a call, unless the argument is the single lone "unit" value -/// to a method or value compiled as a method taking no arguments -and GenUntupledArgsDiscardingLoneUnit cenv cgbuf eenv m numObjArgs curriedArgInfos args = - match curriedArgInfos ,args with - // Type.M() - // new C() - | [[]],[arg] when numObjArgs = 0 -> - assert is_unit_typ cenv.g (type_of_expr cenv.g arg) - GenExpr cenv cgbuf eenv SPSuppress arg discard - // obj.M() - | [[_];[]],[arg1;arg2] when numObjArgs = 1 -> - assert is_unit_typ cenv.g (type_of_expr cenv.g arg2) - GenExpr cenv cgbuf eenv SPSuppress arg1 Continue; - GenExpr cenv cgbuf eenv SPSuppress arg2 discard - | _ -> - (curriedArgInfos,args) ||> List.iter2 (fun argInfos x -> - GenUntupledArgExpr cenv cgbuf eenv m argInfos x Continue) - -/// Codegen arguments -and GenUntupledArgExpr cenv cgbuf eenv m argInfos expr sequel = - let numRequiredExprs = List.length argInfos - assert (numRequiredExprs >= 1) - if numRequiredExprs = 1 then - GenExpr cenv cgbuf eenv SPSuppress expr sequel - elif is_tuple expr then - let es = try_dest_tuple expr - if es.Length <> numRequiredExprs then error(InternalError("GenUntupledArgExpr (2)",m)); - es |> List.iter (fun x -> GenExpr cenv cgbuf eenv SPSuppress x Continue); - GenSequel cenv eenv.cloc cgbuf sequel - else - let ty = type_of_expr cenv.g expr - let locv,loce = mk_compgen_local m "arg" ty - let bind = mk_compgen_bind locv expr - LocalScope "untuple" cgbuf (fun scopeMarks -> - let eenvinner = AllocStorageForBind cenv cgbuf scopeMarks eenv bind - GenBind cenv cgbuf eenvinner bind; - if verbose then dprintf "expr = %s\nty = %s\narity = %d\n" (showL (ExprL expr)) ((DebugPrint.showType ty)) numRequiredExprs; - let tys = dest_tuple_typ cenv.g ty - assert (tys.Length = numRequiredExprs) - argInfos |> List.iteri (fun i fargty -> GenGetTupleField cenv cgbuf eenvinner (loce,tys,i,m) Continue); - GenSequel cenv eenv.cloc cgbuf sequel - ) - - -//-------------------------------------------------------------------------- -// Generate calls (try to detect direct calls) -//-------------------------------------------------------------------------- - -and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = - if verbose then dprintn ("GenApp:"); - match (f,tyargs,args) with - (* Look for tailcall to turn into branch *) - | (TExpr_val(v,_,_),_,_) when - ((ListAssoc.containsKey cenv.g.vref_eq v eenv.innerVals) && - not v.IsConstructor && - let (kind,_) = ListAssoc.find cenv.g.vref_eq v eenv.innerVals - (* when branch-calling methods we must have the right type parameters *) - begin match kind with - | BranchCallClosure _ -> true - | BranchCallMethod (_,_,tps,_,_) -> - (List.lengthsEqAndForall2 (fun ty tp -> type_equiv cenv.g ty (mk_typar_ty tp)) tyargs tps) - end && - (* must be exact #args, ignoring tupling - we untuple if needed below *) - (let arityInfo = - match kind with - | BranchCallClosure arityInfo - | BranchCallMethod (arityInfo,_,_,_,_) -> arityInfo - arityInfo.Length = args.Length - ) && - (* no tailcall out of exception handler, etc. *) - (match sequel_ignoring_end_scopes_and_discard sequel with Return | ReturnVoid -> true | _ -> false)) - -> - let (kind,mark) = ListAssoc.find cenv.g.vref_eq v eenv.innerVals - let ntmargs = - match kind with - | BranchCallClosure arityInfo -> - let ntmargs = List.foldBack (+) arityInfo 0 - GenExprs cenv cgbuf eenv args; - ntmargs - | BranchCallMethod (arityInfo,curriedArgInfos,tps,ntmargs,numObjArgs) -> - assert (curriedArgInfos.Length = arityInfo.Length ) - assert (curriedArgInfos.Length = args.Length) - //assert (curriedArgInfos.Length = ntmargs ) - GenUntupledArgsDiscardingLoneUnit cenv cgbuf eenv m numObjArgs curriedArgInfos args; - ntmargs - for i = ntmargs - 1 downto 0 do - CG.EmitInstrs cgbuf [Pop] [ I_starg (uint16 (i+cgbuf.PreallocatedArgCount)) ]; - done; - CG.EmitInstrs cgbuf [] [ I_br (code_label_of_mark mark) ]; - GenSequelEndScopes cgbuf sequel - - // Similarly for PhysicalEquality becomes cheap reference equality for non-value-types - | (TExpr_val(v,_,_),[ty],[arg1;arg2]) when - (cenv.g.vref_eq v cenv.g.poly_eq_inner_vref) - && (is_fsobjmodel_ref_typ cenv.g ty || - (is_il_ref_typ cenv.g ty - && not (type_equiv cenv.g ty cenv.g.system_Object_typ) - && not (type_equiv cenv.g ty cenv.g.system_Value_typ) - && not (type_equiv cenv.g ty cenv.g.system_Enum_typ)) or - is_delegate_typ cenv.g ty || - is_union_typ cenv.g ty || - is_recd_typ cenv.g ty || - is_repr_hidden_typ cenv.g ty || - is_tuple_typ cenv.g ty) -> - - GenExpr cenv cgbuf eenv SPSuppress arg1 Continue; - GenExpr cenv cgbuf eenv SPSuppress arg2 Continue; - CG.EmitInstr cgbuf [ Pop; Pop; Push cenv.g.ilg.typ_bool ] (I_arith AI_ceq); - GenSequel cenv eenv.cloc cgbuf sequel - - // Optimize calls to top methods when given "enough" arguments. - | (TExpr_val(vref,vFlags,_),_,_) when - (let storage = storage_for_vref m vref eenv - match storage with - | Method(topValInfo,vref,mspec,_,_,_) -> - (let tps,argtys,_,_ = GetTopValTypeInFSharpForm cenv.g topValInfo vref.Type m - tps.Length = tyargs.Length && - argtys.Length <= args.Length) - | _ -> false) -> - - let storage = storage_for_vref m vref eenv - begin match storage with - | Method (topValInfo,vref,mspec,_,_,_) -> - if verbose then dprintn ("GenApp: Method"); - let nowArgs,laterArgs = - let _,curriedArgInfos,returnTy,retInfo = GetTopValTypeInFSharpForm cenv.g topValInfo vref.Type m - List.chop curriedArgInfos.Length args - - let actualRetTy = apply_types cenv.g vref.Type (tyargs,nowArgs) - let _,curriedArgInfos,returnTy,retInfo = GetTopValTypeInCompiledForm cenv.g topValInfo vref.Type m - - let ilTyArgs = GenTypeArgs m cenv.g eenv.tyenv tyargs - - // For instance method calls chop off some type arguments, which are already - // carried by the class. Also work out if it's a virtual call. - let numEnclTypeArgs,virtualCall,newobj,isSuperInit,isSelfInit,_,_,_ = GetMemberCallInfo cenv.g (vref,vFlags) in - - // numEnclTypeArgs will include unit-of-measure args, unfortunately. For now, just cut-and-paste code from GetMemberCallInfo - // @REVIEW: refactor this - let numEnclTypeArgs = - match vref.MemberInfo with - | Some(membInfo) when not (vref.IsExtensionMember) -> - List.length(vref.MemberApparentParent.TyparsNoRange |> DropErasedTypars) - | _ -> 0 - - let (ilClassArgTys,ilMethArgTys) = - if ilTyArgs.Length < numEnclTypeArgs then error(InternalError("length mismatch",m)); - List.chop numEnclTypeArgs ilTyArgs - - let boxity = boxity_of_typ mspec.EnclosingType - let mspec = mk_mspec (mspec.MethodRef, boxity,ilClassArgTys,ilMethArgTys) - - // "Unit" return types on static methods become "void" - let mustGenerateUnitAfterCall = isNone returnTy - let isTailCall = - if isNil laterArgs && not isSelfInit then - let isDllImport = vref_isDllImport cenv.g vref - let hasByrefArg = nowArgs |> List.exists (type_of_expr cenv.g >> is_byref_typ cenv.g) - let makesNoCriticalTailcalls = vref.MakesNoCriticalTailcalls - CanTailcall(boxity,eenv.withinSEH,hasByrefArg,mustGenerateUnitAfterCall,isDllImport,isSelfInit,makesNoCriticalTailcalls,sequel) - else Normalcall - - let callInstr = - if virtualCall then I_callvirt (isTailCall, mspec, None) - elif newobj then I_newobj (mspec, None) - else I_call (isTailCall, mspec, None) - - // ok, now we're ready to generate - if isSuperInit || isSelfInit then - CG.EmitInstrs cgbuf [ Push mspec.EnclosingType ] [ ldarg_0 ] ; - - //dprintfn "mspec.Name = %s, curriedArgInfos = %A, nowArgs = %A" mspec.Name (List.map List.length curriedArgInfos) (List.length nowArgs) - GenUntupledArgsDiscardingLoneUnit cenv cgbuf eenv m (GetNumObjArgsOfValRef vref) curriedArgInfos nowArgs; - - let nargs = mspec.FormalArgTypes.Length - if verbose then dprintf "GenApp: call, nargs = %d, mspec.ILCallingConv.IsStatic = %b\n" nargs mspec.CallingConv.IsStatic; - CG.EmitInstr cgbuf (List.replicate (nargs + (if mspec.CallingConv.IsStatic || newobj then 0 else 1)) Pop @ - (if mustGenerateUnitAfterCall || isSuperInit || isSelfInit then [] else [Push (GenType m cenv.g eenv.tyenv actualRetTy)])) callInstr; - if verbose then dprintn ("GenApp: after"); - - // For isSuperInit, load the 'this' pointer as the pretend 'result' of the operation. It will be popped agin in most cases - if isSuperInit then CG.EmitInstrs cgbuf [ Push mspec.EnclosingType ] [ ldarg_0 ] ; - - // When generating deubg code, generate a 'nop' after a 'call' that returns 'void' - // This is what C# does, as it allows the call location to be maintained correctly in the stack frame - if cenv.debug && mustGenerateUnitAfterCall && (isTailCall = Normalcall) then - CG.EmitInstrs cgbuf [ ] [ i_nop ] ; - - if isNil laterArgs then - (* Generate the "unit" value if necessary *) - CommitCallSequel cenv eenv.cloc cgbuf mustGenerateUnitAfterCall sequel - else - GenIndirectCall cenv cgbuf eenv (actualRetTy,[],laterArgs,m) sequel - - if verbose then dprintn ("GenApp: Method Done"); - | _ -> failwith "??" - end - - // This case is for getting/calling a value, when we can't call it directly. - // However, we know the type instantiation for the value. - // In this case we can often generate a type-specific local expression for the value. - // This reduces the number of dynamic type applications. - | (TExpr_val(vref,_,_),_,_) -> - GenGetValRefAndSequel cenv cgbuf eenv m vref (Some (tyargs,args,m,sequel)) - - | _ -> - (* worst case: generate a first-class function value and call *) - GenExpr cenv cgbuf eenv SPSuppress f Continue; - GenIndirectCall cenv cgbuf eenv (fty,tyargs,args,m) sequel - -and CanTailcall(boxity,withinSEH,hasByrefArg,mustGenerateUnitAfterCall,isDllImport,isSelfInit,makesNoCriticalTailcalls,sequel) = - if (boxity = AsObject) && not withinSEH && not hasByrefArg && not isDllImport && not isSelfInit && not makesNoCriticalTailcalls && - // We can tailcall even if we need to generate "unit", as long as we're about to throw the value away anyway as par of the return. - // We can tailcall if we don't need to generate "unit", as long as we're about to return. - (match sequel_ignore_end_scopes sequel with - | ReturnVoid | Return -> not mustGenerateUnitAfterCall - | DiscardThen ReturnVoid -> mustGenerateUnitAfterCall - | _ -> false) - then Tailcall - else Normalcall - -and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv typ cloinfo tyargs m = - if verbose then dprintn ("Compiling local type func call in "^cgbuf.MethodName); - - let contract_tinst = cloinfo.ltyfunc_contract_ftyvs |> List.map mk_typar_ty |> GenTypeArgs m cenv.g eenv.tyenv - let ilTyArgs = tyargs |> GenTypeArgs m cenv.g eenv.tyenv - let _,contract_meth_il_gparams,(contract_clo_il_tspec:ILTypeSpec),contract_formal_il_rty = GenNamedLocalTypeFuncContractInfo cenv m cloinfo - let contract_il_tspec = mk_tspec(contract_clo_il_tspec.TypeRef,contract_tinst) - - if not (List.length contract_meth_il_gparams = List.length tyargs) then errorR(Error("incorrect number of type arguments to local call",m)); - - let contract_il_ty = Type_boxed contract_il_tspec - // Local TyFunc are represented as a $contract type. they currently get stored in a value of type object - // Recover result (value or reference types) via unbox_any. - CG.EmitInstrs cgbuf [Pop;Push contract_il_ty] [I_unbox_any contract_il_ty]; - let actual_rty = apply_types cenv.g typ (tyargs,[]) - - let il_mspec = mk_instance_mspec_in_boxed_tspec(contract_il_tspec, "DirectInvoke", [], contract_formal_il_rty, ilTyArgs) - let ilActualRetTy = GenType m cenv.g eenv.tyenv actual_rty - CountCallFuncInstructions(); - CG.EmitInstr cgbuf [Pop;Push ilActualRetTy] (mk_normal_callvirt il_mspec); - if verbose then dprintn "Done local type func call..." - actual_rty - - -and GenIndirectCall cenv cgbuf eenv (functy,tyargs,args,m) sequel = - if verbose then dprintn ("Compiling call in "^cgbuf.MethodName); - GenExprs cenv cgbuf eenv args; - if verbose then dprintn "Compiling call instruction..."; - (* Fold in the new types into the environment as we generate the formal types. *) - let apps = - let typars,formal_functy = try_dest_forall_typ cenv.g functy - if verbose then dprintf "length args = %d, formal_functy = %s\n" (List.length args) (showL(typeL formal_functy)); - - let feenv = add_typars eenv.tyenv typars - let mk_ty_apps = List.foldBack (fun tyarg apps -> Apps_tyapp(GenType m cenv.g eenv.tyenv tyarg,apps)) tyargs - let formal_rty,mk_tm_apps = - List.fold - (fun (formal_functy,sofar) _ -> - let formal_dty,formal_rty = dest_fun_typ cenv.g formal_functy - (formal_rty,(fun apps -> sofar (Apps_app(GenType m cenv.g feenv formal_dty,apps))))) - (formal_functy,(fun x -> x)) - args - if verbose then dprintn "Compiling return type..."; - let ret_apps = Apps_done (GenType m cenv.g feenv formal_rty) - mk_ty_apps (mk_tm_apps ret_apps) - let actual_rty = apply_types cenv.g functy (tyargs, args) - let ilActualRetTy = GenType m cenv.g eenv.tyenv actual_rty - let hasByrefArg = - let rec check x = - match x with - | Apps_tyapp(_,apps') -> check apps' - | Apps_app(arg,apps') -> is_byref arg || check apps' - | _ -> false - check apps - - let isTailCall = CanTailcall(AsObject,eenv.withinSEH,hasByrefArg,false,false,false,false,sequel) - CountCallFuncInstructions(); - CG.EmitInstr cgbuf (List.replicate (1+args.Length) Pop @ [Push ilActualRetTy]) (mk_IlxInstr (EI_callfunc(isTailCall,apps))); - if verbose then dprintn "Done compiling indirect call..."; - GenSequel cenv eenv.cloc cgbuf sequel - -//-------------------------------------------------------------------------- -// Generate try expressions -//-------------------------------------------------------------------------- - -and GenTry cenv cgbuf eenv scopeMarks (e1,m,resty,spTry) = - let sp = - match spTry with - | SequencePointAtTry m -> CG.EmitSeqPoint cgbuf m; SPAlways - | NoSequencePointAtTry -> SPSuppress - - let stack,eenvinner = EmitSaveStack cenv cgbuf eenv m scopeMarks - let start_try = CG.GenerateMark cgbuf "start_try" - let end_try = CG.EmitDelayMark cgbuf "end_try" - let after_handler = CG.EmitDelayMark cgbuf "after_handler" - let eenvinner = {eenvinner with withinSEH = true} - let il_resty = GenType m cenv.g eenvinner.tyenv resty - let where_to_save_expr,eenvinner = AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("tryres",m),il_resty) (start_try,end_try) - - // Generate the body of the try. In the normal case (SequencePointAtTry) we generate a sequence point - // both on the 'try' keyword and on the start of the expression in the 'try'. For inlined code and - // compiler generated 'try' blocks (i.e. NoSequencePointAtTry, used for the try/finally implicit - // in a 'use' or 'foreach'), we suppress the sequence point - GenExpr cenv cgbuf eenvinner sp e1 (LeaveHandler (false, where_to_save_expr,after_handler)); - CG.SetMarkToHere cgbuf end_try; - let tryMarks = (code_label_of_mark start_try, code_label_of_mark end_try) - where_to_save_expr,eenvinner,stack,tryMarks,after_handler,il_resty - -and GenTryCatch cenv cgbuf eenv (e1,vf:Val,ef,vh:Val,eh,m,resty,spTry,spWith) sequel = - if verbose then dprintn ("GenTry"); - (* Save the stack - gross because IL flushes the stack at the exn. handler *) - (* note: eenvinner notes spill vars are live *) - LocalScope "trystack" cgbuf (fun scopeMarks -> - let where_to_save_expr,eenvinner,stack,tryMarks,after_handler,il_resty = GenTry cenv cgbuf eenv scopeMarks (e1,m,resty,spTry) - - (* Now the List.filter and catch blocks *) - - let seh = - if cenv.generateFilterBlocks then - let startOfFilter = CG.GenerateMark cgbuf "startOfFilter" - let afterFilter = CG.EmitDelayMark cgbuf "afterFilter" - let (sequelOnBranches,afterJoin,stackAfterJoin,sequelAfterJoin) = GenJoinPoint cenv cgbuf "filter" eenv cenv.g.int_ty m EndFilter - begin - // We emit the sequence point for the 'with' keyword span on the start of the List.filter - // block. However the targets of the List.filter block pattern matching should not get any - // sequence points (they will be 'true'/'false' values indicating if the exception has been - // caught or not). - // - // The targets of the handler block DO get sequence points. Thus the expected behaviour - // for a try/with with a complex pattern is that we hit the "with" before the List.filter is run - // and then jump to the handler for the successful catch (or continue with exception handling - // if the List.filter fails) - match spWith with - | SequencePointAtWith m -> CG.EmitSeqPoint cgbuf m - | NoSequencePointAtWith -> () - - - CG.SetStack cgbuf [cenv.g.ilg.typ_Object]; - let _,eenvinner = AllocLocalVal cenv cgbuf vf eenvinner None (startOfFilter,afterFilter) - CG.EmitInstr cgbuf [Pop; Push cenv.g.ilg.typ_Exception] (I_castclass cenv.g.ilg.typ_Exception); - - GenStoreVal cenv cgbuf eenvinner vf.Range vf; - - // Why SPSuppress? Because we do not emit a sequence point at the start of the List.filter - we've already put one on - // the 'with' keyword above - GenExpr cenv cgbuf eenvinner SPSuppress ef sequelOnBranches; - CG.SetMarkToHere cgbuf afterJoin; - CG.SetStack cgbuf stackAfterJoin; - GenSequel cenv eenv.cloc cgbuf sequelAfterJoin; - end; - let endOfFilter = CG.GenerateMark cgbuf "endOfFilter" - let filterMarks = (code_label_of_mark startOfFilter, code_label_of_mark endOfFilter) - CG.SetMarkToHere cgbuf afterFilter; - - let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" - begin - CG.SetStack cgbuf [cenv.g.ilg.typ_Object]; - let _,eenvinner = AllocLocalVal cenv cgbuf vh eenvinner None (startOfHandler,after_handler) - CG.EmitInstr cgbuf [Pop; Push cenv.g.ilg.typ_Exception] (I_castclass cenv.g.ilg.typ_Exception); - GenStoreVal cenv cgbuf eenvinner vh.Range vh; - - GenExpr cenv cgbuf eenvinner SPAlways eh (LeaveHandler (false, where_to_save_expr,after_handler)); - end; - let endOfHandler = CG.GenerateMark cgbuf "endOfHandler" - let handlerMarks = (code_label_of_mark startOfHandler, code_label_of_mark endOfHandler) - SEH_filter_catch(filterMarks, handlerMarks) - else - let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" - begin - match spWith with - | SequencePointAtWith m -> CG.EmitSeqPoint cgbuf m - | NoSequencePointAtWith -> () - - CG.SetStack cgbuf [cenv.g.ilg.typ_Object]; - let _,eenvinner = AllocLocalVal cenv cgbuf vh eenvinner None (startOfHandler,after_handler) - CG.EmitInstr cgbuf [Pop; Push cenv.g.ilg.typ_Exception] (I_castclass cenv.g.ilg.typ_Exception); - - GenStoreVal cenv cgbuf eenvinner m vh; - - GenExpr cenv cgbuf eenvinner SPAlways eh (LeaveHandler (false, where_to_save_expr,after_handler)); - end; - let endOfHandler = CG.GenerateMark cgbuf "endOfHandler" - let handlerMarks = (code_label_of_mark startOfHandler, code_label_of_mark endOfHandler) - SEH_type_catch(cenv.g.ilg.typ_Object, handlerMarks) - - cgbuf.EmitExceptionClause - { exnClauses = [ seh ]; - exnRange= tryMarks } ; - - CG.SetMarkToHere cgbuf after_handler; - CG.SetStack cgbuf []; - - match spWith with - | SequencePointAtWith m -> CG.EmitSeqPoint cgbuf m - | NoSequencePointAtWith -> () - - (* Restore the stack and load the result *) - EmitRestoreStack cenv cgbuf stack; (* RESTORE *) - - EmitGetLocal cgbuf il_resty where_to_save_expr; - GenSequel cenv eenv.cloc cgbuf sequel - ) - - -and GenTryFinally cenv cgbuf eenv (e1,e2,m,resty,spTry,spFinally) sequel = - if verbose then dprintn ("GenTry"); - (* Save the stack - gross because IL flushes the stack at the exn. handler *) - (* note: eenvinner notes spill vars are live *) - LocalScope "trystack" cgbuf (fun scopeMarks -> - let where_to_save_expr,eenvinner,stack,tryMarks,after_handler,il_resty = GenTry cenv cgbuf eenv scopeMarks (e1,m,resty,spTry) - - (* Now the catch/finally block *) - let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" - CG.SetStack cgbuf []; - - let sp = - match spFinally with - | SequencePointAtFinally m -> CG.EmitSeqPoint cgbuf m; SPAlways - | NoSequencePointAtFinally -> SPSuppress - - GenExpr cenv cgbuf eenvinner sp e2 (LeaveHandler (true, where_to_save_expr,after_handler)); - let endOfHandler = CG.GenerateMark cgbuf "endOfHandler" - let handlerMarks = (code_label_of_mark startOfHandler, code_label_of_mark endOfHandler) - cgbuf.EmitExceptionClause - { exnClauses = [ SEH_finally(handlerMarks) ]; - exnRange = tryMarks } ; - - CG.SetMarkToHere cgbuf after_handler; - CG.SetStack cgbuf []; - - (* Restore the stack and load the result *) - EmitRestoreStack cenv cgbuf stack; (* RESTORE *) - EmitGetLocal cgbuf il_resty where_to_save_expr; - GenSequel cenv eenv.cloc cgbuf sequel - ) - -//-------------------------------------------------------------------------- -// Generate for-loop -//-------------------------------------------------------------------------- - -and GenForLoop cenv cgbuf eenv (spFor,v,e1,dir,e2,loopBody,m) sequel = - // The JIT/NGen eliminate array-bounds checks for C# loops of form: - // for(int i=0; i < (#ldlen arr#); i++) { ... arr[i] ... } - // Here - // dir = BI_blt indicates an optimized for loop that fits C# form that evaluates its 'end' argument each time around - // dir = BI_ble indicates a normal F# for loop that evaluates its argument only once - // - // It is also important that we follow C# IL-layout exactly "prefix, jmp test, body, test, finish" for JIT/NGEN. - let start = CG.GenerateMark cgbuf "for_start" - let finish = CG.EmitDelayMark cgbuf "for_finish" - let inner = CG.EmitDelayMark cgbuf "for_inner" - let test = CG.EmitDelayMark cgbuf "for_test" - let stack,eenvinner = EmitSaveStack cenv cgbuf eenv m (start,finish) - - let isUp = (match dir with | FSharpForLoopUp | CSharpForLoopUp -> true | FSharpForLoopDown -> false); - let isFSharpStyle = (match dir with FSharpForLoopUp | FSharpForLoopDown -> true | CSharpForLoopUp -> false); - - let finishIdx,eenvinner = - if isFSharpStyle then - let v,eenvinner = AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("endLoop",m), cenv.g.ilg.typ_int32) (start,finish) - v, eenvinner - else - -1,eenvinner - - let _,eenvinner = AllocLocalVal cenv cgbuf v eenvinner None (start,finish) (* note: eenvStack noted stack spill vars are live *) - match spFor with - | SequencePointAtForLoop(spStart) -> CG.EmitSeqPoint cgbuf spStart; - | NoSequencePointAtForLoop -> () - - GenExpr cenv cgbuf eenv SPSuppress e1 Continue; - GenStoreVal cenv cgbuf eenvinner m v; - if isFSharpStyle then - GenExpr cenv cgbuf eenv SPSuppress e2 Continue; - EmitSetLocal cgbuf finishIdx - EmitGetLocal cgbuf cenv.g.ilg.typ_int32 finishIdx - GenGetLocalVal cenv cgbuf eenvinner (range_of_expr e2) v None; - CG.EmitInstr cgbuf [Pop;Pop] (I_brcmp ((if isUp then BI_blt else BI_bgt),code_label_of_mark finish,code_label_of_mark inner)); - - else - CG.EmitInstr cgbuf [] (I_br (code_label_of_mark test)); - - // .inner - CG.SetMarkToHere cgbuf inner; - // - GenExpr cenv cgbuf eenvinner SPAlways loopBody discard; - // v++ or v-- - GenGetLocalVal cenv cgbuf eenvinner (range_of_expr e2) v None; - - CG.EmitInstr cgbuf [Push cenv.g.ilg.typ_int32] (mk_ldc_i32 (1)); - CG.EmitInstr cgbuf [Pop] (I_arith (if isUp then AI_add else AI_sub)); - GenStoreVal cenv cgbuf eenvinner m v; - - // .text - CG.SetMarkToHere cgbuf test; - - // FSharpForLoopUp: if v <> e2 + 1 then goto .inner - // FSharpForLoopDown: if v <> e2 - 1 then goto .inner - // CSharpStyle: if v < e2 then goto .inner - CG.EmitSeqPoint cgbuf (range_of_expr e2); - GenGetLocalVal cenv cgbuf eenvinner (range_of_expr e2) v None; - let cmp = match dir with FSharpForLoopUp | FSharpForLoopDown -> BI_bne_un | CSharpForLoopUp -> BI_blt - let e2Sequel = (CmpThenBrOrContinue ( [Pop; Pop], I_brcmp(cmp,code_label_of_mark inner,code_label_of_mark finish))); - - if isFSharpStyle then - EmitGetLocal cgbuf cenv.g.ilg.typ_int32 finishIdx - CG.EmitInstr cgbuf [Push cenv.g.ilg.typ_int32] (mk_ldc_i32 1); - CG.EmitInstr cgbuf [Pop] (I_arith (if isUp then AI_add else AI_sub)); - GenSequel cenv eenv.cloc cgbuf e2Sequel - else - GenExpr cenv cgbuf eenv SPSuppress e2 e2Sequel; - - // .finish - loop-exit here - CG.SetMarkToHere cgbuf finish; - - // Restore the stack and load the result - EmitRestoreStack cenv cgbuf stack; - GenUnitThenSequel cenv eenv.cloc cgbuf sequel - -//-------------------------------------------------------------------------- -// Generate while-loop -//-------------------------------------------------------------------------- - -and GenWhileLoop cenv cgbuf eenv (spWhile,e1,e2,m) sequel = - let finish = CG.EmitDelayMark cgbuf "while_finish" - let inner = CG.EmitDelayMark cgbuf "while_inner" - let start_test = CG.GenerateMark cgbuf "start_test" - - match spWhile with - | SequencePointAtWhileLoop(spStart) -> CG.EmitSeqPoint cgbuf spStart; - | NoSequencePointAtWhileLoop -> () - - (* SEQUENCE POINTS: Emit a sequence point to cover all of 'while e do' *) - GenExpr cenv cgbuf eenv SPSuppress e1 (CmpThenBrOrContinue ([Pop],(I_brcmp(BI_brfalse,code_label_of_mark finish,code_label_of_mark inner)))); - CG.SetMarkToHere cgbuf inner; - - GenExpr cenv cgbuf eenv SPAlways e2 (DiscardThen (Br start_test)); - CG.SetMarkToHere cgbuf finish; - - (* SEQUENCE POINTS: Emit a sequence point to cover 'done' if present *) - - GenUnitThenSequel cenv eenv.cloc cgbuf sequel - -//-------------------------------------------------------------------------- -// Generate seq -//-------------------------------------------------------------------------- - -and GenSequential cenv cgbuf eenv spIn (e1,e2,specialSeqFlag,spSeq,m) sequel = - - // Compiler generated sequential executions result in suppressions of sequence points on both - // left and right of the sequence - let spAction,spExpr = - (match spSeq with - | SequencePointsAtSeq -> SPAlways,spIn - | SuppressSequencePointOnExprOfSequential -> SPSuppress,spIn - | SuppressSequencePointOnStmtOfSequential -> spIn,SPSuppress) - match specialSeqFlag with - | NormalSeq -> - if verbose then dprintf "GenSequential (normal), sequel = %s\n" (StringOfSequel sequel); - GenExpr cenv cgbuf eenv spAction e1 discard; - GenExpr cenv cgbuf eenv spExpr e2 sequel - | ThenDoSeq -> - GenExpr cenv cgbuf eenv spExpr e1 Continue; - GenExpr cenv cgbuf eenv spAction e2 discard; - GenSequel cenv eenv.cloc cgbuf sequel - -//-------------------------------------------------------------------------- -// Generate IL assembly code. -// Polymorphic IL/ILX instructions may be instantiated when polymorphic code is inlined. -// We must implement this for the few uses of polymorphic instructions -// in the standard libarary. -//-------------------------------------------------------------------------- - -and GenAsmCode cenv cgbuf eenv (il,tyargs,args,rtys,m) sequel = - if verbose then dprintf "GenAsmCode, #args = %d" (List.length args); - let ilTyArgs = GenTypesPermitVoid m cenv.g eenv.tyenv tyargs - let il_rtys = GenTypesPermitVoid m cenv.g eenv.tyenv rtys - let il_after_inst = - il |> List.filter (function I_arith AI_nop -> false | _ -> true) - |> List.map (fun i -> - let err s = - errorR(InternalError(sprintf "%s: bad instruction: %A" s i,m)) - - let mod_fspec fspec = - {fspec with fspecEnclosingType= - let ty = fspec.fspecEnclosingType - let tspec = ty.TypeSpec - mk_typ (boxity_of_typ ty) (ILTypeSpec.Create(tspec.TypeRef, ilTyArgs)) } - match i,ilTyArgs with - | I_unbox_any (Type_tyvar idx) ,[tyarg] -> I_unbox_any (tyarg) - | I_box (Type_tyvar idx) ,[tyarg] -> I_box (tyarg) - | I_isinst (Type_tyvar idx) ,[tyarg] -> I_isinst (tyarg) - | I_castclass (Type_tyvar idx) ,[tyarg] -> I_castclass (tyarg) - | I_newarr (shape,Type_tyvar idx) ,[tyarg] -> I_newarr (shape,tyarg) - | I_ldelem_any (shape,Type_tyvar idx) ,[tyarg] -> I_ldelem_any (shape,tyarg) - | I_ldelema (ro,shape,Type_tyvar idx) ,[tyarg] -> I_ldelema (ro,shape,tyarg) - | I_stelem_any (shape,Type_tyvar idx) ,[tyarg] -> I_stelem_any (shape,tyarg) - | I_ldobj (a,b,Type_tyvar idx) ,[tyarg] -> I_ldobj (a,b,tyarg) - | I_stobj (a,b,Type_tyvar idx) ,[tyarg] -> I_stobj (a,b,tyarg) - | I_ldtoken (Token_type (Type_tyvar idx)),[tyarg] -> I_ldtoken (Token_type (tyarg)) - | I_sizeof (Type_tyvar idx) ,[tyarg] -> I_sizeof (tyarg) - | I_ldfld (al,vol,fspec) ,_ -> I_ldfld (al,vol,mod_fspec fspec) - | I_ldflda (fspec) ,_ -> I_ldflda (mod_fspec fspec) - | I_stfld (al,vol,fspec) ,_ -> I_stfld (al,vol,mod_fspec fspec) - | I_stsfld (vol,fspec) ,_ -> I_stsfld (vol,mod_fspec fspec) - | I_ldsfld (vol,fspec) ,_ -> I_ldsfld (vol,mod_fspec fspec) - | I_ldsflda (fspec) ,_ -> I_ldsflda (mod_fspec fspec) - | EI_ilzero(Type_tyvar idx) ,[tyarg] -> EI_ilzero(tyarg) - | I_other e,_ when is_ilx_ext_instr e -> - begin match (dest_ilx_ext_instr e),ilTyArgs with - | _ -> - if not (isNil tyargs) then err "Bad polymorphic ILX instruction"; - i - end - | I_arith AI_nop,_ -> i - (* These are embedded in the IL for a an initonly ldfld, i.e. *) - (* here's the relevant comment from tc.ml *) - (* "Add an I_nop if this is an initonly field to make sure we never recognize it as an lvalue. See mk_expra_of_expr." *) - - | _ -> - if not (isNil tyargs) then err "Bad polymorphic IL instruction"; - i) - match il_after_inst,args,sequel,il_rtys with - - // Strip off any ("ceq" x false) when the sequel is a comparison branch and change the BI_brfalse to a BI_brtrue - // This is the instruction sequence for "not" - // For these we can just generate the argument and change the test (from a brfalse to a brtrue and vice versa) - | ([ I_arith AI_ceq ], - [arg1; TExpr_const((TConst_bool false | TConst_sbyte 0y| TConst_int16 0s | TConst_int32 0 | TConst_int64 0L | TConst_byte 0uy| TConst_uint16 0us | TConst_uint32 0u | TConst_uint64 0UL),_,_) ], - CmpThenBrOrContinue([Pop],I_brcmp (((BI_brfalse | BI_brtrue) as bi) , label1,label2)), - _) -> - - let bi = match bi with BI_brtrue -> BI_brfalse | _ -> BI_brtrue - GenExpr cenv cgbuf eenv SPSuppress arg1 (CmpThenBrOrContinue([Pop],I_brcmp (bi, label1,label2))) - - // Query; when do we get a 'ret' in IL assembly code? - | [ I_ret ], [arg1],sequel,[ilRetTy] -> - GenExpr cenv cgbuf eenv SPSuppress arg1 Continue; - CG.EmitInstr cgbuf [Pop] I_ret; - GenSequelEndScopes cgbuf sequel - - // Query; when do we get a 'ret' in IL assembly code? - | [ I_ret ], [],sequel,[ilRetTy] -> - CG.EmitInstr cgbuf [Pop] I_ret; - GenSequelEndScopes cgbuf sequel - - // 'throw' instructions are a bit of a problem - e.g. let x = (throw ...) in ... expects a value *) - // to be left on the stack. But dead-code checking by some versions of the .NET verifier *) - // mean that we can't just have fake code after the throw to generate the fake value *) - // (nb. a fake value can always be generated by a "ldnull unbox.any ty" sequence *) - // So in the worst case we generate a fake (never-taken) branch to a piece of code to generate *) - // the fake value *) - | [ I_throw ], [arg1],sequel,[ilRetTy] -> - match sequel_ignore_end_scopes sequel with - | s when IsSequelImmediate s -> - if verbose then dprintf "GenAsmCode: throw: A\n"; - (* In most cases we can avoid doing this... *) - GenExpr cenv cgbuf eenv SPSuppress arg1 Continue; - CG.EmitInstr cgbuf [Pop] I_throw; - GenSequelEndScopes cgbuf sequel - | _ -> - if verbose then dprintf "GenAsmCode: throw: B\n"; - let after1 = CG.EmitDelayMark cgbuf ("fake_join") - let after2 = CG.EmitDelayMark cgbuf ("fake_join") - let after3 = CG.EmitDelayMark cgbuf ("fake_join") - CG.EmitInstrs cgbuf [] [mk_ldc_i32 0; - I_brcmp (BI_brfalse,code_label_of_mark after2,code_label_of_mark after1); ]; - - CG.SetMarkToHere cgbuf after1; - CG.EmitInstrs cgbuf [Push ilRetTy] [i_ldnull; I_unbox_any ilRetTy; I_br (code_label_of_mark after3) ]; - - CG.SetMarkToHere cgbuf after2; - GenExpr cenv cgbuf eenv SPSuppress arg1 Continue; - CG.EmitInstr cgbuf [Pop] I_throw; - CG.SetMarkToHere cgbuf after3; - GenSequel cenv eenv.cloc cgbuf sequel; - | _ -> - // float or float32 or float<_> or float32<_> - let g = cenv.g in - let anyfpType ty = type_equiv_aux EraseMeasures g g.float_ty ty || type_equiv_aux EraseMeasures g g.float32_ty ty - - // Otherwise generate the arguments, and see if we can use a I_brcmp rather than a comparison followed by an I_brfalse/I_brtrue - GenExprs cenv cgbuf eenv args; - match il_after_inst,sequel with - - (* NOTE: THESE ARE NOT VALID ON FLOATING POINT DUE TO NaN. Hence INLINE ASM ON FP. MUST BE CAREFULLY WRITTEN *) - - | [ I_arith AI_clt ], CmpThenBrOrContinue([Pop],I_brcmp (BI_brfalse, label1,label2)) when not (anyfpType (type_of_expr g args.Head)) -> - CG.EmitInstr cgbuf [Pop; Pop] (I_brcmp(BI_bge,label1,label2)); - | [ I_arith AI_cgt ], CmpThenBrOrContinue([Pop],I_brcmp (BI_brfalse, label1,label2)) when not (anyfpType (type_of_expr g args.Head)) -> - CG.EmitInstr cgbuf [Pop; Pop] (I_brcmp(BI_ble,label1, label2)); - | [ I_arith AI_clt_un ], CmpThenBrOrContinue([Pop],I_brcmp (BI_brfalse, label1,label2)) when not (anyfpType (type_of_expr g args.Head)) -> - CG.EmitInstr cgbuf [Pop; Pop] (I_brcmp(BI_bge_un,label1,label2)); - | [ I_arith AI_cgt_un ], CmpThenBrOrContinue([Pop],I_brcmp (BI_brfalse, label1,label2)) when not (anyfpType (type_of_expr g args.Head)) -> - CG.EmitInstr cgbuf [Pop; Pop] (I_brcmp(BI_ble_un,label1, label2)); - | [ I_arith AI_ceq ], CmpThenBrOrContinue([Pop],I_brcmp (BI_brfalse, label1,label2)) when not (anyfpType (type_of_expr g args.Head)) -> - CG.EmitInstr cgbuf [Pop; Pop] (I_brcmp(BI_bne_un,label1, label2)); - - // THESE ARE VALID ON FP w.r.t. NaN - - | [ I_arith AI_clt ], CmpThenBrOrContinue([Pop],I_brcmp (BI_brtrue, label1,label2)) -> - CG.EmitInstr cgbuf [Pop; Pop] (I_brcmp(BI_blt,label1, label2)); - | [ I_arith AI_cgt ], CmpThenBrOrContinue([Pop],I_brcmp (BI_brtrue, label1,label2)) -> - CG.EmitInstr cgbuf [Pop; Pop] (I_brcmp(BI_bgt,label1, label2)); - | [ I_arith AI_clt_un ], CmpThenBrOrContinue([Pop],I_brcmp (BI_brtrue, label1,label2)) -> - CG.EmitInstr cgbuf [Pop; Pop] (I_brcmp(BI_blt_un,label1, label2)); - | [ I_arith AI_cgt_un ], CmpThenBrOrContinue([Pop],I_brcmp (BI_brtrue, label1,label2)) -> - CG.EmitInstr cgbuf [Pop; Pop] (I_brcmp(BI_bgt_un,label1, label2)); - | [ I_arith AI_ceq ], CmpThenBrOrContinue([Pop],I_brcmp (BI_brtrue, label1,label2)) -> - CG.EmitInstr cgbuf [Pop; Pop] (I_brcmp(BI_beq,label1, label2)); - | _ -> - // Failing that, generate the real IL leaving value(s) on the stack - CG.EmitInstrs cgbuf (List.replicate args.Length Pop @ List.map push il_rtys) il_after_inst; - - // If no return values were specified generate a "unit" - if isNil rtys then - GenUnitThenSequel cenv eenv.cloc cgbuf sequel - else - GenSequel cenv eenv.cloc cgbuf sequel - -//-------------------------------------------------------------------------- -// Generate expression quotations -//-------------------------------------------------------------------------- - -and GenQuotation cenv cgbuf eenv (ast,conv,m,ety) sequel = - let argTypes,argExprs, astSpec = - match !conv with - | Some res -> res - | None -> - try - Creflect.ConvExprPublic (cenv.g, cenv.amap, cenv.viewCcu) Creflect.empty_env ast - with - Creflect.InvalidQuotedTerm e -> error(e) - let astPickledBytes = Sreflect.pickle astSpec - let mk_typeof_expr ilty = - mk_asm ([ mk_normal_call (mspec_Type_GetTypeFromHandle cenv.g.ilg) ], [], - [mk_asm ([ I_ldtoken (Token_type ilty) ], [],[],[cenv.g.system_RuntimeTypeHandle_typ],m)], - [cenv.g.system_Type_typ],m) - - let someTypeInModuleExpr = mk_typeof_expr(Type_boxed eenv.someTspecInThisModule) - let rawTy = mk_raw_expr_ty cenv.g - let mk_list ty els = List.foldBack (mk_cons cenv.g ty) els (mk_nil cenv.g m ty) - let typeExprs = List.map (GenType m cenv.g eenv.tyenv >> mk_typeof_expr) argTypes - let typesExpr = mk_list cenv.g.system_Type_typ typeExprs - let argsExpr = mk_list rawTy argExprs - let bytesExpr = TExpr_op(TOp_bytes(astPickledBytes),[],[],m) - let unpickledExpr = mk_call_unpickle_quotation cenv.g m someTypeInModuleExpr typesExpr argsExpr bytesExpr - let afterCastExpr = - // Detect a typed quotation and insert the cast if needed. The cast should not fail but does - // unfortunately involve a "typeOf" computation over a quotation tree. - if tcref_eq cenv.g (tcref_of_stripped_typ cenv.g ety) cenv.g.expr_tcr then - mk_call_cast_quotation cenv.g m (List.hd (tinst_of_stripped_typ cenv.g ety)) unpickledExpr - else - unpickledExpr - GenExpr cenv cgbuf eenv SPSuppress afterCastExpr sequel - -//-------------------------------------------------------------------------- -// Generate calls to IL methods -//-------------------------------------------------------------------------- - -and GenIlCall cenv cgbuf eenv ((virt,protect,valu,newobj,vFlags,_,isDllImport,_,mref),enclTypeArgs,methTypeArgs,args,rtys,m) sequel = - if verbose then dprintn ("GenIlCall"); - let hasByrefArg = mref.ArgTypes |> List.exists is_byref - let isSuperInit = (vFlags = CtorValUsedAsSuperInit) - let boxity = (if valu then AsValue else AsObject) - let mustGenerateUnitAfterCall = (isNil rtys) - let makesNoCriticalTailcalls = (newobj || not virt) // Don't tailcall for 'newobj', or 'call' to IL code - let tail = CanTailcall(boxity,eenv.withinSEH,hasByrefArg,mustGenerateUnitAfterCall,isDllImport,false,makesNoCriticalTailcalls,sequel) - - let il_ttyargs = GenTypeArgs m cenv.g eenv.tyenv enclTypeArgs - let ilMethArgTys = GenTypeArgs m cenv.g eenv.tyenv methTypeArgs - let il_rtys = GenTypes m cenv.g eenv.tyenv rtys - let mspec = mk_mspec (mref,boxity,il_ttyargs,ilMethArgTys) - - // Load the 'this' pointer to pass to the superclass constructor. This argument is not - // in the expression tree since it can't be treated like an ordinary value - if isSuperInit then CG.EmitInstrs cgbuf [ Push mspec.EnclosingType ] [ ldarg_0 ] ; - GenExprs cenv cgbuf eenv args; - let il = - if newobj then [ I_newobj(mspec,None) ] - elif virt then [ I_callvirt(tail,mspec,None) ] - else [ I_call(tail,mspec,None) ] - CG.EmitInstrs cgbuf (List.replicate (args.Length + (if isSuperInit then 1 else 0)) Pop @ (if isSuperInit then [] else List.map push il_rtys)) il; - - // Load the 'this' pointer as the pretend 'result' of the isSuperInit operation. - // It will be immediately popped in most cases, but may also be used as the target of ome "property set" oeprations. - if isSuperInit then CG.EmitInstrs cgbuf [ Push mspec.EnclosingType ] [ ldarg_0 ] ; - CommitCallSequel cenv eenv.cloc cgbuf mustGenerateUnitAfterCall sequel - -and CommitCallSequel cenv cloc cgbuf mustGenerateUnitAfterCall sequel = - if mustGenerateUnitAfterCall - then GenUnitThenSequel cenv cloc cgbuf sequel - else GenSequel cenv cloc cgbuf sequel - - -and GenTraitCall cenv cgbuf eenv (traitInfo, args, m) expr sequel = - let minfoOpt = CommitOperationResult (ConstraintSolver.CodegenWitnessThatTypSupportsTraitConstraint cenv.g cenv.amap m traitInfo) - match minfoOpt with - | None -> - let replacementExpr = - mk_throw m (type_of_expr cenv.g expr) - (mk_exnconstr(mk_MFCore_tcref cenv.g.fslibCcu "DynamicInvocationNotSupportedException", - [ mk_string cenv.g m traitInfo.MemberName],m)) - GenExpr cenv cgbuf eenv SPSuppress replacementExpr sequel - | Some (minfo,methTypeArgs) -> - - // Fix bug 1281: If we resolve to an instance method on a struct and we haven't yet taken - // the address of the object then go do that - if Infos.minfo_is_struct cenv.g minfo && minfo.IsInstance && (match args with [] -> false | h::t -> not (is_byref_typ cenv.g (type_of_expr cenv.g h))) then - let h,t = List.headAndTail args - let wrap,h' = mk_expra_of_expr cenv.g true PossiblyMutates h m - GenExpr cenv cgbuf eenv SPSuppress (wrap (TExpr_op(TOp_trait_call(traitInfo), [], (h' :: t), m))) sequel - else - let slotsig = Infos.SlotSigOfMethodInfo cenv.amap m minfo - let gty = minfo.EnclosingType - let (il_gty:ILType),ilParams,(ilReturn:ILReturnValue) = GenFormalSlotsig m cenv eenv slotsig - let ilArgTys = typs_of_params ilParams - let ilRetTy = ilReturn.Type - let mref = mk_mref(il_gty.TypeRef, (if minfo.IsInstance then ILCallingConv.Instance else ILCallingConv.Static), minfo.LogicalName, List.length (DropErasedTyargs methTypeArgs), ilArgTys, ilRetTy) - let tinst = snd(dest_stripped_tyapp_typ cenv.g gty) - let rtys = Option.to_list (actual_rty_of_slotsig tinst methTypeArgs slotsig) - GenIlCall cenv cgbuf eenv ((minfo.IsVirtual, - minfo.IsProtectedAccessiblity, - Infos.minfo_is_struct cenv.g minfo,false,NormalValUse,false,false,None,mref), - tinst,methTypeArgs,args,rtys,m) sequel - -//-------------------------------------------------------------------------- -// Generate byref-related operations -//-------------------------------------------------------------------------- - -and GenGetAddrOfRefCellField cenv cgbuf eenv (e,ty,m) sequel = - if verbose then dprintn ("GenGetAddrOfRefCellField"); - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let fref = GenRecdFieldRef m cenv eenv.tyenv (mk_refcell_contents_rfref cenv.g) [ty] - CG.EmitInstrs cgbuf [Pop; Push (Type_byref (actual_typ_of_fspec fref))] [ I_ldflda fref ] ; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenGetValAddr cenv cgbuf eenv (v,m) sequel = - if verbose then dprintn ("GenGetValAddr"); - let vspec = deref_val v - let il_ty = GenTypeOfVal cenv eenv vspec - match storage_for_vref m v eenv with - | Local (idx,None) -> - CG.EmitInstrs cgbuf [ Push (Type_byref il_ty)] [ I_ldloca (uint16 idx) ] ; - | Arg idx -> - CG.EmitInstrs cgbuf [ Push (Type_byref il_ty)] [ I_ldarga (uint16 idx) ] ; - | StaticField (fspec,vref,hasLiteralAttr,ilTypeSpecForProperty,fieldName,_,il_ty,_,_,_) -> - if hasLiteralAttr then errorR(Error("Taking the address of a literal field is invalid",m)); - EmitGetStaticFieldAddr cgbuf il_ty fspec - | Env (_,i,localCloInfo) -> - CG.EmitInstr cgbuf [Push (Type_byref il_ty)] (mk_IlxInstr (EI_ldenva i)); - | Local (_,Some _) | Method _ | Env _ | Unrealized | Null -> - errorR(Error( "This operation involves taking the address of a value '"^v.DisplayName^"' represented using a local variable or other special representation. This is invalid",m)); - CG.EmitInstrs cgbuf [Pop; Push (Type_byref il_ty)] [ I_ldarga (uint16 669 (* random value for post-hoc diagnostic analysis on generated tree *) ) ] ; - - GenSequel cenv eenv.cloc cgbuf sequel - -and GenGetByref cenv cgbuf eenv (v:ValRef,m) sequel = - if verbose then dprintn ("GenGetByref"); - GenGetLocalVRef cenv cgbuf eenv m v None; - let ilty = GenType m cenv.g eenv.tyenv (dest_byref_typ cenv.g v.Type) - CG.EmitInstrs cgbuf [Pop; Push ilty] [ mk_normal_ldobj ilty ]; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenSetByref cenv cgbuf eenv (v:ValRef,e,m) sequel = - if verbose then dprintn ("GenSetByref"); - GenGetLocalVRef cenv cgbuf eenv m v None; - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let ilty = GenType m cenv.g eenv.tyenv (dest_byref_typ cenv.g v.Type) - CG.EmitInstrs cgbuf [Pop; Pop] [ mk_normal_stobj ilty ]; - GenUnitThenSequel cenv eenv.cloc cgbuf sequel - -and GenDefaultValue cenv cgbuf eenv (ty,m) = - let il_ty = GenType m cenv.g eenv.tyenv ty - if is_ref_typ cenv.g ty then - CG.EmitInstr cgbuf [Push il_ty] i_ldnull - else - match try_tcref_of_stripped_typ cenv.g ty with - | Some tcref when (tcref_eq cenv.g cenv.g.system_SByte_tcref tcref || - tcref_eq cenv.g cenv.g.system_Int16_tcref tcref || - tcref_eq cenv.g cenv.g.system_Int32_tcref tcref || - tcref_eq cenv.g cenv.g.system_Bool_tcref tcref || - tcref_eq cenv.g cenv.g.system_Byte_tcref tcref || - tcref_eq cenv.g cenv.g.system_Char_tcref tcref || - tcref_eq cenv.g cenv.g.system_UInt16_tcref tcref || - tcref_eq cenv.g cenv.g.system_UInt32_tcref tcref) -> - CG.EmitInstr cgbuf [Push il_ty] i_ldc_i32_0 - | Some tcref when (tcref_eq cenv.g cenv.g.system_Int64_tcref tcref || - tcref_eq cenv.g cenv.g.system_UInt64_tcref tcref) -> - CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_i64 0L) - | Some tcref when (tcref_eq cenv.g cenv.g.system_Single_tcref tcref) -> - CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_single 0.0f) - | Some tcref when (tcref_eq cenv.g cenv.g.system_Double_tcref tcref) -> - CG.EmitInstr cgbuf [Push il_ty] (mk_ldc_double 0.0) - | _ -> - let il_ty = GenType m cenv.g eenv.tyenv ty - LocalScope "ilzero" cgbuf (fun scopeMarks -> - let loc_idx,eenvinner = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("default",m), il_ty) scopeMarks - // "initobj" (Generated by EmitInitLocal) doesn't work on byref types - // But ilzero(&ty) only gets generated in the built-in get-address function so - // we can just rely on zeroinit of all IL locals. - match il_ty with - | Type_byref _ -> () - | _ -> EmitInitLocal cgbuf il_ty loc_idx - EmitGetLocal cgbuf il_ty loc_idx; - ) - -//-------------------------------------------------------------------------- -// Generate object expressions as ILX "closures" -//-------------------------------------------------------------------------- - -and GenSlotParam m cenv eenv isGeneric (TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attribs)) = - let inFlag2,outFlag2,optionalFlag2,paramMarshal2,attribs = GenParamAttribs cenv attribs - - { paramName=nm; - paramType= GenParamType m cenv.g eenv.tyenv false isGeneric ty; - paramDefault=None; - paramMarshal=paramMarshal2; - paramIn=inFlag || inFlag2; - paramOut=outFlag || outFlag2; - paramOptional=optionalFlag || optionalFlag2; - paramCustomAttrs= mk_custom_attrs (GenAttrs cenv eenv attribs) } - -and GenFormalSlotsig m cenv eenv (TSlotSig(nm,typ,ctps,mtps,paraml,returnTy) as slotsig) = - let paraml = List.concat paraml - let ilTy = GenType m cenv.g eenv.tyenv typ - let eenv_for_slotsig = env_for_typars (ctps @ mtps) eenv - let isGeneric = nonNil (DropErasedTypars ctps) || nonNil (DropErasedTypars mtps) - let ilParams = paraml |> List.map (GenSlotParam m cenv eenv_for_slotsig isGeneric) - let ilRetTy = GenReturnType m cenv.g eenv_for_slotsig.tyenv false isGeneric returnTy - let ilReturn = mk_return ilRetTy - ilTy, ilParams,ilReturn - -and inst_slotparam inst (TSlotParam(nm,ty,inFlag,fl2,fl3,attrs)) = TSlotParam(nm,InstType inst ty,inFlag,fl2,fl3,attrs) - -and GenActualSlotsig m cenv eenv (TSlotSig(nm,typ,ctps,mtps,paraml,returnTy) as SlotSig) methTyparsOfOverridingMethod = - let paraml = List.concat paraml - let slotsig_inst = mk_typar_inst (ctps@mtps) (tinst_of_stripped_typ cenv.g typ @ generalize_typars methTyparsOfOverridingMethod) - let isGeneric = nonNil (DropErasedTypars ctps) || nonNil (DropErasedTypars mtps) - let ilParams = paraml |> List.map (inst_slotparam slotsig_inst >> GenSlotParam m cenv eenv isGeneric) - let ilRetTy = GenReturnType m cenv.g eenv.tyenv false isGeneric (Option.map (InstType slotsig_inst) returnTy) - let ilReturn = mk_return ilRetTy - ilParams,ilReturn - -and GenMethodImpl cenv eenv (shouldUseMethodImpl,(TSlotSig(nameOfOverridenMethod,enclTypOfOverridenMethod,_,_,_,_) as slotsig)) m = - let ov_il_typ,ov_il_params,ov_il_ret = GenFormalSlotsig m cenv eenv slotsig - let reallyUseMethodImpl = - if shouldUseMethodImpl - && cenv.workAroundReflectionEmitBugs - && inst_of_typ ov_il_typ <> [] - && ov_il_typ.TypeRef.Scope = ScopeRef_local then - - warning(Error("The implementation of a specified generic interface required a method implementation not fully supported by F# Interactive. In the unlikely event that the resulting class fails to load then compile the interface type into a statically-compiled DLL and reference it using '#r'",m)); - false - - else - shouldUseMethodImpl - - let nameOfOverridingMethod = if reallyUseMethodImpl then qualified_mangled_name_of_tcref (tcref_of_stripped_typ cenv.g enclTypOfOverridenMethod) nameOfOverridenMethod else nameOfOverridenMethod - - reallyUseMethodImpl,nameOfOverridingMethod, - (fun (ilTypeSpecForOverriding,methTyparsOfOverridingMethod) -> - let ov_tref = ov_il_typ.TypeRef - let ov_mref = mk_mref(ov_tref, ILCallingConv.Instance, nameOfOverridenMethod, List.length (DropErasedTypars methTyparsOfOverridingMethod), (typs_of_params ov_il_params), ov_il_ret.Type) - let eenv_for_ovby = AddTyparsToEnv methTyparsOfOverridingMethod eenv - let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv eenv_for_ovby slotsig methTyparsOfOverridingMethod - let ovby_mgparams = GenGenericParams m cenv eenv_for_ovby.tyenv methTyparsOfOverridingMethod - let ovby_mgactuals = generalize_gparams ovby_mgparams - let ovby = mk_instance_mspec_in_boxed_tspec(ilTypeSpecForOverriding, nameOfOverridingMethod, typs_of_params ilParamsOfOverridingMethod, ilReturnOfOverridingMethod.Type, ovby_mgactuals) - { mimplOverrides = OverridesSpec(ov_mref,ov_il_typ); - mimplOverrideBy = ovby }) - -and bindBaseVarOpt cenv eenv baseValOpt = - match baseValOpt with - | None -> eenv - | Some basev -> AddStorageForVal cenv.g (basev,notlazy (Arg 0)) eenv - -and fixupVirtualSlotFlags mdef = - {mdef with - mdHideBySig=true; - mdKind = (match mdef.mdKind with - | MethodKind_virtual vinfo -> - MethodKind_virtual - {vinfo with - virtStrict=false } - | _ -> failwith "fixupVirtualSlotFlags") } - -and renameMethodDef nameOfOverridingMethod mdef = - {mdef with mdName=nameOfOverridingMethod } - -and fixupMethodImplFlags mdef = - {mdef with mdAccess=MemAccess_private; - mdHideBySig=true; - mdKind=(match mdef.mdKind with - | MethodKind_virtual vinfo -> - MethodKind_virtual - {vinfo with - virtStrict=false; - virtFinal=true; - virtNewslot=true; } - | _ -> failwith "fixupMethodImpl") } - -and GenObjectMethod cenv eenvinner (cgbuf:CodeGenBuffer) shouldUseMethodImpl (TObjExprMethod((TSlotSig(nameOfOverridenMethod,enclTypOfOverridenMethod,_,_,_,_) as slotsig),methTyparsOfOverridingMethod,methodParams,methodBodyExpr,m)) = - - let eenvUnderTypars = AddTyparsToEnv methTyparsOfOverridingMethod eenvinner - let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv eenvUnderTypars slotsig methTyparsOfOverridingMethod - - // Args are stored starting at #1 - let methodParams = List.concat methodParams - let eenvForMeth = AddStorageForLocalVals cenv.g (methodParams |> List.mapi (fun i v -> (v,Arg i))) eenvUnderTypars - let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],nameOfOverridenMethod,eenvForMeth,0,0,methodBodyExpr,(if slotsig_has_void_rty slotsig then discardAndReturnVoid else Return)) - - let reallyUseMethodImpl,nameOfOverridingMethod,methodImplGenerator = GenMethodImpl cenv eenvinner (shouldUseMethodImpl,slotsig) (range_of_expr methodBodyExpr) - - let mdef = - mk_generic_virtual_mdef - (nameOfOverridingMethod, - ComputePublicMemberAccess false, (* false = may not change accessibility (override) *) - GenGenericParams m cenv eenvUnderTypars.tyenv methTyparsOfOverridingMethod, - ilParamsOfOverridingMethod, - ilReturnOfOverridingMethod, - MethodBody_il ilMethodBody) - // fixup attributes to generate a method impl - let mdef = if reallyUseMethodImpl then fixupMethodImplFlags mdef else mdef - let mdef = fixupVirtualSlotFlags mdef - (reallyUseMethodImpl,methodImplGenerator,methTyparsOfOverridingMethod),mdef - -and GenObjectExpr cenv cgbuf eenvouter expr (baseType,baseValOpt,basecall,overrides,interfaceImpls,m) sequel = - if verbose then dprintn ("GenObjectExpr"); - let cloinfo,body,eenvinner = GetIlxClosureInfo cenv m false None eenvouter expr - - let cloAttribs = cloinfo.clo_attribs - let cloFreeVars = cloinfo.clo_freevars - let cloLambdas = cloinfo.clo_lambdas - let cloName = cloinfo.clo_name - - let ilxCloSpec = cloinfo.clo_clospec - let ilCloFreeVars = cloinfo.clo_il_frees - let ilCloGenericFormals = cloinfo.clo_il_gparams - assert(isNil cloinfo.ltyfunc_direct_il_gparams); - let ilCloGenericActuals = inst_of_clospec cloinfo.clo_clospec - let ilCloRetTy = cloinfo.clo_formal_il_rty - let ilCloTypeRef = tref_of_clospec cloinfo.clo_clospec - let ilTypeSpecForOverriding = mk_tspec(ilCloTypeRef,ilCloGenericActuals) - - let eenvinner = bindBaseVarOpt cenv eenvinner baseValOpt - let ilCtorBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],cloName,eenvinner,1,0,basecall,discardAndReturnVoid) - - let mdefs = overrides |> List.map (GenObjectMethod cenv eenvinner cgbuf false >> snd) - - // Generate a method impl. This looks overly contorted and should likely be de-functionalized - let methodImplGenerator ((reallyUseMethodImpl,methodImplGeneratorFunction,methTyparsOfOverridingMethod),mdef) = - let mimpl = (if reallyUseMethodImpl then Some(methodImplGeneratorFunction (ilTypeSpecForOverriding,methTyparsOfOverridingMethod)) else None) - mimpl,mdef - - let mimpls,interfaceImplMethodDefs = interfaceImpls |> List.collect (snd >> List.map (GenObjectMethod cenv eenvinner cgbuf true >> methodImplGenerator)) |> List.unzip - let mimpls = mimpls |> List.choose (fun x -> x) - let interfaceTys = interfaceImpls |> List.map (fst >> GenType m cenv.g eenvinner.tyenv) - - let attrs = GenAttrs cenv eenvinner cloAttribs - let super = (if is_interface_typ cenv.g baseType then cenv.g.ilg.typ_Object else ilCloRetTy) - let interfaceTys = interfaceTys @ (if is_interface_typ cenv.g baseType then [ilCloRetTy] else []) - let cloTypeDef = GenClosureTypeDef cenv (ilCloTypeRef,cloFreeVars,ilCloGenericFormals,attrs,m,ilCloFreeVars,cloLambdas,ilCtorBody,(interfaceImplMethodDefs @ mdefs),mimpls,super,interfaceTys) - - cgbuf.mgbuf.AddTypeDef(ilCloTypeRef,cloTypeDef); - CountClosure(); - GenGetLocalVals cenv cgbuf eenvouter m cloFreeVars; - CG.EmitInstr cgbuf (List.replicate ilCloFreeVars.Length Pop@ [ Push (Pubclo.typ_of_lambdas cenv.g.ilxPubCloEnv cloLambdas)]) (mk_IlxInstr (EI_newclo ilxCloSpec)); - GenSequel cenv eenvouter.cloc cgbuf sequel - -and GenSequenceExpr cenv (cgbuf:CodeGenBuffer) eenvouter (nextEnumeratorValRef:ValRef,pcvref:ValRef,currvref:ValRef,stateVars,generateNextExpr,closeExpr,checkCloseExpr:expr,seqElemTy, m) sequel = - let stateVars = [ pcvref; currvref ] @ stateVars - let stateVarsSet = stateVars |> List.map deref_val |> Zset.of_list val_spec_order - if verbose then dprintn ("GenSequenceExpr"); - - // pretend that the state variables are bound - let eenvouter = - eenvouter |> AddStorageForLocalVals cenv.g (stateVars |> List.map (fun v -> v.Deref,Local(0,None))) - - // Get the free variables. Make a lambda to pretend that the 'nextEnumeratorValRef' is bound (it is an argument to GenerateNext) - let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilCloTypeRef:ILTypeRef,eenvinner) = - GetIlxClosureFreeVars cenv m None eenvouter (mk_lambda m nextEnumeratorValRef.Deref (generateNextExpr, cenv.g.int32_ty)) - let ilCloFreeVars = GetClosureILFreeVars cenv m [] eenvouter eenvinner cloFreeVars - - let ilCloSeqElemTy = GenType m cenv.g eenvinner.tyenv seqElemTy - let cloRetTy = mk_seq_ty cenv.g seqElemTy - let ilCloRetTyInner = GenType m cenv.g eenvinner.tyenv cloRetTy - let ilCloRetTyOuter = GenType m cenv.g eenvouter.tyenv cloRetTy - let ilCloEnumeratorTy = GenType m cenv.g eenvinner.tyenv (mk_IEnumerator_ty cenv.g seqElemTy) - let ilCloEnumerableTy = GenType m cenv.g eenvinner.tyenv (mk_seq_ty cenv.g seqElemTy) - let ilCloBaseTy = GenType m cenv.g eenvinner.tyenv (mk_tyapp_ty cenv.g.seq_base_tcr [seqElemTy]) - let ilCloGenericParams = GenGenericParams m cenv eenvinner.tyenv cloFreeTyvars - - // Create a new closure class with a single "MoveNext" method that implements the iterator. - let ilCloTypeSpecInner = mk_tspec (ilCloTypeRef, generalize_gparams ilCloGenericParams) - let cloLambdas = Lambdas_return ilCloRetTyInner - let cloref = IlxClosureRef(ilCloTypeRef, cloLambdas, ilCloFreeVars) - let ilxCloSpec = IlxClosureSpec(cloref, GenGenericArgs m eenvouter.tyenv cloFreeTyvars) - let formalClospec = IlxClosureSpec(cloref, generalize_gparams ilCloGenericParams) - - let getFreshMethod = - let mbody = - CodeGenMethod cenv cgbuf.mgbuf (true,[],"GetFreshEnumerator",eenvinner,1,0, - (fun cgbuf eenv -> - for fv in cloFreeVars do -(* TODO: Emit CompareExchange - if (System.Threading.Interlocked.CompareExchange(&__state, 1, 0) = 0) then - (x :> IEnumerator<'T>) - else - ... -*) - /// State variables always get zero-initialized - if stateVarsSet.Contains fv then - GenDefaultValue cenv cgbuf eenv (fv.Type,m) - else - GenGetLocalVal cenv cgbuf eenv m fv None; - CG.EmitInstr cgbuf (List.replicate ilCloFreeVars.Length Pop@ [ Push ilCloRetTyInner ]) (mk_IlxInstr (EI_newclo formalClospec)); - GenSequel cenv eenv.cloc cgbuf Return), - m) - mk_virtual_mdef("GetFreshEnumerator",MemAccess_public, [], mk_return ilCloEnumeratorTy, MethodBody_il mbody) - |> AddNonUserCompilerGeneratedAttribs cenv.g - let closeMethod = - // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump - let spReq = SPSuppress - mk_virtual_mdef("Close",MemAccess_public, [], mk_return Type_void, MethodBody_il (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"Close",eenvinner,1,0,closeExpr,discardAndReturnVoid))) - let checkCloseMethod = - // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump - let spReq = SPSuppress - mk_virtual_mdef("get_CheckClose",MemAccess_public, [], mk_return cenv.g.ilg.typ_Bool, MethodBody_il (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"get_CheckClose",eenvinner,1,0,checkCloseExpr,Return))) - let generateNextMethod = - // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump - let spReq = SPSuppress - // the 'next enumerator' byref arg is at arg position 1 - let eenvinner = eenvinner |> AddStorageForLocalVals cenv.g [ (nextEnumeratorValRef.Deref, Arg 1) ] - mk_virtual_mdef("GenerateNext",MemAccess_public, [mk_named_param("next",Type_byref ilCloEnumerableTy)], mk_return cenv.g.ilg.typ_Int32, MethodBody_il (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"GenerateNext",eenvinner,2,0,generateNextExpr,Return))) - let lastGeneratedMethod = - mk_virtual_mdef("get_LastGenerated",MemAccess_public, [], mk_return ilCloSeqElemTy, MethodBody_il (CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress,[],"get_LastGenerated",eenvinner,1,0,expr_for_vref m currvref,Return))) - |> AddNonUserCompilerGeneratedAttribs cenv.g - let ilCtorBody = mk_simple_storage_ctor(None, Some ilCloBaseTy.TypeSpec, ilCloTypeSpecInner, [], MemAccess_assembly) |> ilmbody_of_mdef - - let attrs = GenAttrs cenv eenvinner cloAttribs - let clo = GenClosureTypeDef cenv (ilCloTypeRef,cloFreeVars,ilCloGenericParams,attrs,m,ilCloFreeVars,cloLambdas,ilCtorBody,[generateNextMethod;closeMethod;checkCloseMethod;lastGeneratedMethod;getFreshMethod],[],ilCloBaseTy,[]) - cgbuf.mgbuf.AddTypeDef(ilCloTypeRef,clo); - CountClosure(); - - for fv in cloFreeVars do - /// State variables always get zero-initialized - if stateVarsSet.Contains fv then - GenDefaultValue cenv cgbuf eenvouter (fv.Type,m) - else - GenGetLocalVal cenv cgbuf eenvouter m fv None; - - CG.EmitInstr cgbuf (List.replicate ilCloFreeVars.Length Pop@ [ Push ilCloRetTyOuter ]) (mk_IlxInstr (EI_newclo ilxCloSpec)); - GenSequel cenv eenvouter.cloc cgbuf sequel - - - -/// Generate the class for a closure type definition -and GenClosureTypeDef cenv (tref:ILTypeRef, fvs:list, gparams, attrs, m, ilCloFreeVars, cloLambdas, ilCtorBody, mdefs, mimpls,ext, intfs) = - - // Closure types should not be marked as Serializable if any of their free variable fields are non-serializable - let tdSerializable = not (fvs |> List.exists (fun fv -> is_definitely_not_serializable cenv.g fv.Type)) - - { tdName = tref.Name; - tdLayout = TypeLayout_auto; - tdAccess = ComputeTypeAccess tref true; - tdGenericParams = gparams; - tdCustomAttrs = mk_custom_attrs(attrs @ [mk_CompilationMappingAttr cenv.g SourceLevelConstruct_Closure ]); - tdFieldDefs = mk_fdefs []; - tdInitSemantics=TypeInit_beforefield; - tdSealed=true; - tdAbstract=false; - tdKind=mk_IlxTypeDefKind (ETypeDef_closure { cloSource=None; - cloFreeVars=ilCloFreeVars; - cloStructure=cloLambdas; - cloCode=notlazy ilCtorBody }); - tdEvents= mk_events []; - tdProperties = mk_properties []; - tdMethodDefs= mk_mdefs mdefs; - tdMethodImpls= mk_mimpls mimpls; - tdSerializable= tdSerializable; - tdComInterop=false; - tdSpecialName= true; - tdNested=mk_tdefs []; - tdEncoding= TypeEncoding_autochar; - tdImplements= intfs; - tdExtends= Some ext; - tdSecurityDecls= mk_security_decls []; - tdHasSecurity=false; } - - -and GenGenericParams m cenv tyenv tps = List.map (GenGenericParam m cenv.g tyenv) (DropErasedTypars tps) -and GenGenericArgs m eenv tps = List.map (fun c -> (mk_tyvar_ty (repr_of_typar m c eenv))) (DropErasedTypars tps) - -/// Generate the closure class for a function -and GenLambdaClosure cenv (cgbuf:CodeGenBuffer) eenv isLocalTypeFunc selfv expr = - if verbose then dprintn ("GenLambdaClosure:"); - match expr with - | TExpr_lambda (_,_,_,_,m,_,_) - | TExpr_tlambda(_,_,_,m,_,_) -> - - let cloinfo,body,eenvinner = GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenv expr - - let entryPointInfo = - match selfv with - | Some v -> [(v, BranchCallClosure (cloinfo.clo_arity_info))] - | _ -> [] - let clo_body = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,entryPointInfo,cloinfo.clo_name,eenvinner,1,0,body,Return) - let clo_tref = tref_of_clospec cloinfo.clo_clospec - let clo = - if isLocalTypeFunc then - - // Work out the contract type and generate a class with an abstract method for this type - let (ilContractGenericParams,contract_meth_il_gparams,contract_actual_tspec:ILTypeSpec,contract_formal_il_rty) = GenNamedLocalTypeFuncContractInfo cenv m cloinfo - let contract_tref = contract_actual_tspec.TypeRef - let contract_tspec = mk_tspec(contract_tref,generalize_gparams ilContractGenericParams) - let contract_ctor = mk_nongeneric_nothing_ctor None cenv.g.ilg.tref_Object [] - - let contract_meths = [contract_ctor; mk_generic_virtual_mdef("DirectInvoke",MemAccess_assembly,contract_meth_il_gparams,[],mk_return contract_formal_il_rty, MethodBody_abstract) ] - - let contract_tdef = - { tdName = contract_tref.Name; - tdLayout = TypeLayout_auto; - tdAccess = ComputeTypeAccess contract_tref true; - tdGenericParams = ilContractGenericParams; - tdCustomAttrs = mk_custom_attrs([mk_CompilationMappingAttr cenv.g SourceLevelConstruct_Closure ]); - tdFieldDefs = mk_fdefs []; - tdInitSemantics=TypeInit_beforefield; - tdSealed=false; // the contract type is an abstract type and not sealed - tdAbstract=true; // the contract type is an abstract type - tdKind=TypeDef_class; - tdEvents= mk_events []; - tdProperties = mk_properties []; - tdMethodDefs= mk_mdefs contract_meths; - tdMethodImpls= mk_mimpls []; - tdSerializable= true; - tdComInterop=false; - tdSpecialName= true; - tdNested=mk_tdefs []; - tdEncoding= TypeEncoding_autochar; - tdImplements= []; - tdExtends= Some cenv.g.ilg.typ_Object; - tdSecurityDecls= mk_security_decls []; - tdHasSecurity=false; } - cgbuf.mgbuf.AddTypeDef(contract_tref,contract_tdef); - - let ilCtorBody = mk_ilmbody (true,[ ] ,8,nonbranching_instrs_to_code (mk_call_superclass_constructor([],contract_tspec)), None ) - let cloMethods = [ mk_generic_virtual_mdef("DirectInvoke",MemAccess_assembly,cloinfo.ltyfunc_direct_il_gparams,[],mk_return (cloinfo.clo_formal_il_rty), MethodBody_il clo_body) ] - let cloTypeDef = GenClosureTypeDef cenv (clo_tref,cloinfo.clo_freevars,cloinfo.clo_il_gparams,[],m,cloinfo.clo_il_frees,cloinfo.clo_lambdas,ilCtorBody,cloMethods,[],Type_boxed contract_tspec,[]) - cloTypeDef - - else - GenClosureTypeDef cenv (clo_tref,cloinfo.clo_freevars,cloinfo.clo_il_gparams,[],m,cloinfo.clo_il_frees,cloinfo.clo_lambdas,clo_body,[],[],cenv.g.ilg.typ_Object,[]) - CountClosure(); - cgbuf.mgbuf.AddTypeDef(clo_tref,clo); - cloinfo,m - | _ -> failwith "GenLambda: not a lambda" - -and GenLambdaVal cenv (cgbuf:CodeGenBuffer) eenv (cloinfo,m) = - if verbose then dprintn ("Loading environment for "^cloinfo.clo_name ^" in "^cgbuf.MethodName); - GenGetLocalVals cenv cgbuf eenv m cloinfo.clo_freevars; - if verbose then dprintn ("Compiling newclo for "^cloinfo.clo_name ^" in "^cgbuf.MethodName); - CG.EmitInstr cgbuf (List.replicate cloinfo.clo_il_frees.Length Pop@ [ Push (Pubclo.typ_of_lambdas cenv.g.ilxPubCloEnv cloinfo.clo_lambdas)]) (* REVIEW: more specific type when ILX supports them more explicitly *) - (mk_IlxInstr (EI_newclo cloinfo.clo_clospec)) - -and GenLambda cenv cgbuf eenv isLocalTypeFunc selfv expr sequel = - if verbose then dprintn ("GenLambda:"); - let cloinfo,m = GenLambdaClosure cenv cgbuf eenv isLocalTypeFunc selfv expr - GenLambdaVal cenv cgbuf eenv (cloinfo,m); - if verbose then dprintn ("GenLambda: done val"); - GenSequel cenv eenv.cloc cgbuf sequel - -and GenTypeOfVal cenv eenv (v:Val) = - if verbose then dprintn ("GenTypeOfVal"); - GenType v.Range cenv.g eenv.tyenv v.Type - -and GenFreevar cenv m eenvouter eenvinner (fv:Val) = - match storage_for_val m fv eenvouter with - // Local type functions - | Local(_,Some _) | Env(_,_,Some _) -> cenv.g.ilg.typ_Object -#if DEBUG - // Check for things that should never make it into the free variable set. Only do this in debug for performance reasons - | (StaticField _ | Method _ | Unrealized | Null) -> error(InternalError("GenFreevar: compiler error: unexpected unrealized value",fv.Range)) -#endif - | _ -> GenType m cenv.g eenvinner.tyenv fv.Type - -and GetIlxClosureFreeVars cenv m selfv eenvouter expr = - - // Choose a base name for the closure - let basename = - let boundv = eenvouter.letBoundVars |> List.tryfind (fun v -> not v.IsCompilerGenerated) - match boundv with - | Some v -> v.CompiledName - | None -> "clo" - - // Get a unique stamp for the closure. This must be stable for things that can be part of a let rec. - let uniq = - match expr with - | TExpr_obj (uniq,_,_,_,_,_,m,_) - | TExpr_lambda (uniq,_,_,_,m,_,_) - | TExpr_tlambda(uniq,_,_,m,_,_) -> uniq - | _ -> new_uniq() - - // Choose a name for the closure - let ilCloTypeRef = - // FSharp 1.0 bug 3404: System.Reflection doesn't like '.' and '`' in type names - let basenameSafeForUseAsTypename = basename.Replace('.', '$').Replace('`', '$') - let suffixmark = range_of_expr expr - let cloName = globalStableNameGenerator.GetUniqueCompilerGeneratedName(basenameSafeForUseAsTypename,suffixmark,uniq) - NestedTypeRefForCompLoc eenvouter.cloc cloName - - // Collect the free variables of the closure - let cloFreeVarResults = free_in_expr CollectTyparsAndLocals expr - - // Partition the free variables when some can be accessed from places besides the immediate environment - // Also filter out the current value being bound, if any, as it is available from the "this" - // pointer which gives the current closure itself. This is in the case e.g. let rec f = ... f ... - let cloFreeVars = - cloFreeVarResults.FreeLocals - |> Zset.elements - |> List.filter (fun fv -> - match storage_for_val m fv eenvouter with - | (StaticField _ | Method _ | Unrealized | Null) -> false - | _ -> - match selfv with - | Some v -> not (cenv.g.vref_eq (mk_local_vref fv) v) - | _ -> true) - - // The general shape is: - // {LAM . expr }[free-typars] : overall-type[contract-typars] - // Then - // internal-typars = free-typars - contract-typars - // - // In other words, the free type variables get divided into two sets - // -- "contract" ones, which are part of the return type. We separate these to enable use to - // bake our own function base contracts for local type functions - // - // -- "internal" ones, which get used internally in the implementation - let cloContractFreeTyvarSet = (free_in_type CollectTypars (type_of_expr cenv.g expr)).FreeTypars - - let cloInternalFreeTyvars = Zset.diff cloFreeVarResults.FreeTyvars.FreeTypars cloContractFreeTyvarSet |> Zset.elements - let cloContractFreeTyvars = cloContractFreeTyvarSet |> Zset.elements - - let cloFreeTyvars = cloContractFreeTyvars @ cloInternalFreeTyvars - - let cloAttribs = [] - - // If generating a named closure, add the closure itself as a var, available via "arg0" . - // The latter doesn't apply for the delegate implementation of closures. - let eenvinner = eenvouter |> env_for_typars cloFreeTyvars - - let ilCloTypeSpecInner = - let ilCloGenericParams = GenGenericParams m cenv eenvinner.tyenv cloFreeTyvars - mk_tspec (ilCloTypeRef, generalize_gparams ilCloGenericParams) - - // Build the environment that is active inside the closure itself - let eenvinner = { eenvinner with tyenv = { eenvinner.tyenv with tyenv_nativeptr_as_nativeint=true } } - let eenvinner = eenvinner |> AddStorageForLocalVals cenv.g (match selfv with | Some v -> [(deref_val v,Arg 0)] | _ -> []) - let eenvinner = eenvinner |> AddStorageForLocalVals cenv.g - (cloFreeVars |> List.mapi (fun i v -> - let localCloInfo = - match storage_for_val m v eenvouter with - | Local(_,localCloInfo) - | Env(_,_,localCloInfo) -> localCloInfo - | _ -> None - (v,Env(ilCloTypeSpecInner,i,localCloInfo))) ) - - - // Return a various results - (cloAttribs,cloInternalFreeTyvars,cloContractFreeTyvars,cloFreeTyvars,cloFreeVars,ilCloTypeRef,eenvinner) - -and GetClosureILFreeVars cenv m takenNames eenvouter eenvinner cloFreeVars = - let ilCloFreeVarNames = ChooseFreeVarNames takenNames (List.map name_of_val cloFreeVars) - let ilCloFreeVars = (cloFreeVars,ilCloFreeVarNames) ||> List.map2 (fun fv nm -> mk_freevar (nm,fv.IsCompilerGenerated, GenFreevar cenv m eenvouter eenvinner fv)) - ilCloFreeVars - -and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = - if verbose then dprintn ("GetIlxClosureInfo"); - let (cloAttribs,cloInternalFreeTyvars,cloContractFreeTyvars,cloFreeTyvars,cloFreeVars,ilCloTypeRef,eenvinner) = GetIlxClosureFreeVars cenv m selfv eenvouter expr - - if verbose then dprintn ("GetIlxClosureInfo: returnTy"); - let returnTy = - match expr with - | TExpr_lambda (_,_,_,_,_,returnTy,_) | TExpr_tlambda(_,_,_,_,returnTy,_) -> returnTy - | TExpr_obj(_,typ,_,_,_,_,_,_) -> typ - | _ -> failwith "GetIlxClosureInfo: not a lambda expression" - - if verbose then dprintn ("GetIlxClosureInfo: getClosureArgs"); - let rec getClosureArgs eenv ntmargs takenNames (e,returnTy) = - match e with - | TExpr_lambda (_,_,vs,body,m,bty,_) when not isLocalTypeFunc -> - - // Transform a lambda taking untupled arguments into one - // taking only a single tupled argument if necessary. REVIEW: do this earlier - let tupledv, body = multi_lambda_to_tupled_lambda vs body - let nm = tupledv.MangledName - let returnTy',l,arityInfo,takenNames,(body',bty'),eenv = - let eenv = AddStorageForVal cenv.g (tupledv,notlazy (Arg ntmargs)) eenv - getClosureArgs eenv (ntmargs + 1) (nm :: takenNames) (body,bty) - returnTy',Lambdas_lambda (mk_named_param(nm,GenTypeOfVal cenv eenv tupledv),l),1 :: arityInfo,takenNames,(body',bty'),eenv - - | TExpr_tlambda(_,tvs,body,m,bty,_) -> - let returnTy',l,arityInfo,takenNames,body,eenv = - let eenv = AddTyparsToEnv tvs eenv - getClosureArgs eenv ntmargs takenNames (body,bty) - returnTy',List.foldBack (fun tv sofar -> - let gp = GenGenericParam m cenv.g eenv.tyenv tv - Lambdas_forall(gp,sofar)) tvs l,arityInfo, takenNames,body,eenv - - | _ -> - let returnTy' = GenType m cenv.g eenv.tyenv returnTy - returnTy',Lambdas_return returnTy', [],takenNames,(e,returnTy),eenv - - // start at arg number 1 as "this" pointer holds the current closure - let (ilReturnTy,cloLambdas,narginfo,takenNames,(body,_),eenvinner) = getClosureArgs eenvinner 1 [] (expr,returnTy) - - // The general shape is: - // {LAM . expr }[free-typars] : overall-type[contract-typars] - // Then - // internal-typars = free-typars - contract-typars - // - // For a local type function closure, this becomes - // class Contract { - // abstract DirectInvoke : overall-type - // } - // - // class ContractImplementation : Contract { - // override DirectInvoke : overall-type { expr } - // } - // - // For a non-local type function closure, this becomes - // - // class FunctionImplementation : TypeFunc { - // override Specialize : overall-type { expr } - // } - // - // For a normal function closure, is empty, and this becomes - // - // class FunctionImplementation : overall-type { - // override Invoke(..) { expr } - // } - - // In other words, the free type variables get divided into two sets - // -- "contract" ones, which are part of the return type. We separate these to enable use to - // bake our own function base contracts for local type functions - // - // -- "internal" ones, which get used internally in the implementation - // - // There are also "direct" and "indirect" type variables, which are part of the lambdas of the type function. - // Direct type variables are only used for local type functions, and indirect type variables only used for first class - // function values. - - /// Compute the contract if it is a local type function - let ilContractGenericParams = GenGenericParams m cenv eenvinner.tyenv cloContractFreeTyvars - let ilContractGenericActuals = GenGenericArgs m eenvouter.tyenv cloContractFreeTyvars - let ilInternalGenericParams = GenGenericParams m cenv eenvinner.tyenv cloInternalFreeTyvars - let ilInternalGenericActuals = GenGenericArgs m eenvouter.tyenv cloInternalFreeTyvars - - let ilCloGenericFormals = ilContractGenericParams @ ilInternalGenericParams - let ilCloGenericActuals = ilContractGenericActuals @ ilInternalGenericActuals - - let ilCloFreeVars = GetClosureILFreeVars cenv m takenNames eenvouter eenvinner cloFreeVars - - let ilDirectGenericParams,ilReturnTy,cloLambdas = - if isLocalTypeFunc then - let rec strip lambdas acc = - match lambdas with - | Lambdas_forall(gp,r) -> strip r (gp::acc) - | Lambdas_return returnTy -> List.rev acc,returnTy,lambdas - | _ -> failwith "AdjustNamedLocalTypeFuncIlxClosureInfo: local functions can currently only be type functions" - strip cloLambdas [] - else - [],ilReturnTy,cloLambdas - - - let ilxCloSpec = IlxClosureSpec(IlxClosureRef(ilCloTypeRef, cloLambdas, ilCloFreeVars), ilCloGenericActuals) - let cloinfo = - { clo_expr=expr; - clo_name=ilCloTypeRef.Name; - clo_arity_info =narginfo; - clo_lambdas=cloLambdas; - clo_il_frees = ilCloFreeVars; - clo_formal_il_rty=ilReturnTy; - clo_clospec = ilxCloSpec; - clo_il_gparams = ilCloGenericFormals; - clo_freevars=cloFreeVars; - clo_attribs=cloAttribs; - ltyfunc_contract_ftyvs = cloContractFreeTyvars; - ltyfunc_internal_ftyvs = cloInternalFreeTyvars; - - ltyfunc_contract_il_gactuals = ilContractGenericActuals; - ltyfunc_direct_il_gparams=ilDirectGenericParams; } - if verbose then dprintn ("<-- GetIlxClosureInfo"); - cloinfo,body,eenvinner - -//-------------------------------------------------------------------------- -// Named local type functions -//-------------------------------------------------------------------------- - -and IsNamedLocalTypeFuncVal g (v:Val) expr = - not v.IsCompiledAsTopLevel && - is_forall_typ g v.Type && - (let tps,_ = dest_forall_typ g v.Type in tps |> List.exists (fun tp -> not tp.Constraints.IsEmpty)) && - (match strip_expr expr with TExpr_tlambda _ -> true | _ -> false) - -/// Generate the information relecant to the contract portion of a named local type function -and GenNamedLocalTypeFuncContractInfo cenv m cloinfo = - let clo_tref = tref_of_clospec cloinfo.clo_clospec - let contract_tref = ILTypeRef.Create(scope=clo_tref.Scope,enclosing=clo_tref.Enclosing,name=clo_tref.Name^"$contract") - let contract_tyenv = tyenv_for_typars cloinfo.ltyfunc_contract_ftyvs - let ilContractGenericParams = GenGenericParams m cenv contract_tyenv cloinfo.ltyfunc_contract_ftyvs - let tvs,contract_rty = - match cloinfo.clo_expr with - | TExpr_tlambda(_,tvs,body,m,bty,_) -> tvs, bty - | e -> [], type_of_expr cenv.g e - let contract_tyenv = add_typars contract_tyenv tvs - let contract_meth_il_gparams = GenGenericParams m cenv contract_tyenv tvs - let contract_formal_il_rty = GenType m cenv.g contract_tyenv contract_rty - ilContractGenericParams,contract_meth_il_gparams,mk_tspec(contract_tref,cloinfo.ltyfunc_contract_il_gactuals),contract_formal_il_rty - -/// Generate a new delegate construction including a clousre class if necessary. This is a lot like generating function closures -/// and object expression closures, and most of the code is shared. -and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delegateTy, _,_,_, _) as slotsig),methTyparsOfOverridingMethod,tmvs,body,implm),m) sequel = - if verbose then dprintn ("GenDelegateExpr"); - // Get the instantiation of the delegate type - let ctxt_il_delty = GenType m cenv.g eenvouter.tyenv delegateTy - let tmvs = List.concat tmvs - - // Yuck. TLBIMP.EXE generated APIs use UIntPtr for the delegate ctor. - let useUIntPtrForDelegateCtor = - try - if is_il_named_typ cenv.g delegateTy then - let tcref = tcref_of_stripped_typ cenv.g delegateTy - let _,_,tdef = tcref.ILTyconInfo - match find_mdefs_by_name ".ctor" tdef.tdMethodDefs with - | [ctorMDef] -> - match ctorMDef.mdParams with - | [_;p2] -> (p2.paramType.TypeSpec.Name = "System.UIntPtr") - | _ -> false - | _ -> false - else - false - with _ -> - false - - // Work out the free type variables for the morphing thunk - let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,delegee_tref,eenvinner) = GetIlxClosureFreeVars cenv m None eenvouter expr - let takenNames = List.map name_of_val tmvs - let ilCloFreeVars = GetClosureILFreeVars cenv m takenNames eenvouter eenvinner cloFreeVars - let ilDelegeeGenericParams = GenGenericParams m cenv eenvinner.tyenv cloFreeTyvars - let ilDelegeeTypeName = delegee_tref.Name - let ilDelegeeGenericActualsInner = generalize_gparams ilDelegeeGenericParams - - // Create a new closure class with a single "delegee" method that implements the delegate. - let delegeeMethName = "Invoke" - let ilDelegeeTypeSpecInner = mk_tspec (delegee_tref, ilDelegeeGenericActualsInner) - - let delegee_eenv_under_typars = AddTyparsToEnv methTyparsOfOverridingMethod eenvinner - - // The slot sig contains a formal instantiation. When creating delegates we're only - // interested in the actual instantiation since we don't have to emit a method impl. - let ilDelegeeParams,ilDelegeeRet = GenActualSlotsig m cenv delegee_eenv_under_typars slotsig methTyparsOfOverridingMethod - - let numthis = 1 - let delegee_meth_env = AddStorageForLocalVals cenv.g (List.mapi (fun i v -> (v,Arg (i+numthis))) tmvs) delegee_eenv_under_typars - let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],delegeeMethName,delegee_meth_env,1,0,body,(if slotsig_has_void_rty slotsig then discardAndReturnVoid else Return)) - let delegeeInvokeMeth = - mk_instance_mdef - (delegeeMethName,MemAccess_assembly, - ilDelegeeParams, - ilDelegeeRet, - MethodBody_il ilMethodBody) - let delegeeCtorMeth = mk_simple_storage_ctor(None, Some cenv.g.ilg.tspec_Object, ilDelegeeTypeSpecInner, [], MemAccess_assembly) - let ilCtorBody = ilmbody_of_mdef delegeeCtorMeth - - let cloLambdas = Lambdas_return ctxt_il_delty - let ilAttribs = GenAttrs cenv eenvinner cloAttribs - let clo = GenClosureTypeDef cenv (delegee_tref,cloFreeVars,ilDelegeeGenericParams,ilAttribs,m,ilCloFreeVars,cloLambdas,ilCtorBody,[delegeeInvokeMeth],[],cenv.g.ilg.typ_Object,[]) - cgbuf.mgbuf.AddTypeDef(delegee_tref,clo); - CountClosure(); - - let ctxt_gactuals_for_delegee = GenGenericArgs m eenvouter.tyenv cloFreeTyvars - let ilxCloSpec = IlxClosureSpec(IlxClosureRef(delegee_tref, cloLambdas, ilCloFreeVars), ctxt_gactuals_for_delegee) - GenGetLocalVals cenv cgbuf eenvouter m cloFreeVars; - CG.EmitInstr cgbuf (List.replicate ilCloFreeVars.Length Pop@ [ Push (Pubclo.typ_of_lambdas cenv.g.ilxPubCloEnv cloLambdas)]) (mk_IlxInstr (EI_newclo ilxCloSpec)); - - let ilDelegeeTypeSpecOuter = mk_tspec (delegee_tref,ctxt_gactuals_for_delegee) - let ilDelegeeInvokeMethOuter = mk_nongeneric_instance_mspec_in_boxed_tspec (ilDelegeeTypeSpecOuter,"Invoke",typs_of_params ilDelegeeParams, ilDelegeeRet.Type) - let ilDelegeeCtorMethOuter = mk_ctor_mspec_for_delegate cenv.g.ilg (ctxt_il_delty.TypeRef,IL.inst_of_typ ctxt_il_delty,useUIntPtrForDelegateCtor) - CG.EmitInstrs cgbuf - [Push cenv.g.ilg.typ_int32; Pop; Pop; Push ctxt_il_delty] - [ I_ldftn ilDelegeeInvokeMethOuter; - I_newobj(ilDelegeeCtorMethOuter,None) ]; - GenSequel cenv eenvouter.cloc cgbuf sequel - -//------------------------------------------------------------------------- -// Generate statically-resolved conditionals used for type-directed optimizations. -//------------------------------------------------------------------------- - -and GenStaticOptimization cenv cgbuf eenv (constraints,e2,e3,m) sequel = - let e = - if DecideStaticOptimizations cenv.g constraints = 1 then e2 - else e3 - GenExpr cenv cgbuf eenv SPSuppress e sequel - - -//------------------------------------------------------------------------- -// Generate discrimination trees -//------------------------------------------------------------------------- - -and IsSequelImmediate sequel = - match sequel with - (* All of these can be done at the end of each branch - we don't need a real join point *) - | Return | ReturnVoid | Br _ | LeaveHandler _ -> true - | DiscardThen sequel -> IsSequelImmediate sequel - | _ -> false - -and GenJoinPoint cenv cgbuf pos eenv ty m sequel = - if verbose then dprintn ("GenJoinPoint"); - match sequel with - // All of these can be done at the end of each branch - we don't need a real join point - | _ when IsSequelImmediate sequel -> - let stackAfterJoin = cgbuf.GetCurrentStack() - let afterJoin = CG.EmitDelayMark cgbuf (pos^"_join") - sequel,afterJoin,stackAfterJoin,Continue - - // We end scopes at the join point, if any - | EndLocalScope(sq,mark) -> - let sequel_now,afterJoin,stackAfterJoin,sequelAfterJoin = GenJoinPoint cenv cgbuf pos eenv ty m sq - sequel_now,afterJoin,stackAfterJoin,EndLocalScope(sequelAfterJoin,mark) - - // If something non-trivial happens after a discard then generate a join point, but first discard the value (often this means we won't generate it at all) - | DiscardThen sequel -> - let stackAfterJoin = cgbuf.GetCurrentStack() - let afterJoin = CG.EmitDelayMark cgbuf (pos^"_join") - DiscardThen (Br afterJoin),afterJoin,stackAfterJoin,sequel - - // The others (e.g. Continue, LeaveFilter and CmpThenBrOrContinue) can't be done at the end of each branch. We must create a join point. - | _ -> - let pushed = GenType m cenv.g eenv.tyenv ty - let stackAfterJoin = (pushed :: (cgbuf.GetCurrentStack())) - let afterJoin = CG.EmitDelayMark cgbuf (pos^"_join") - // go to the join point - Br afterJoin, afterJoin,stackAfterJoin,sequel - -and GenMatch cenv cgbuf eenv (spBind,exprm,tree,targets,m,ty) sequel = - if verbose then dprintf "GenMatch, dtree = %s\n" (showL (DecisionTreeL tree)); - - match spBind with - | SequencePointAtBinding m -> CG.EmitSeqPoint cgbuf m - | NoSequencePointAtDoBinding - | NoSequencePointAtLetBinding - | NoSequencePointAtInvisibleBinding - | NoSequencePointAtStickyBinding -> () - - // The target of branch needs a sequence point. - // If we don't give it one it will get entirely the wrong sequence point depending on earlier codegen - // Note we're not interested in having pattern matching and decision trees reveal their inner working. - // Hence at each branch target we 'reassert' the overall sequence point that was active as we came into the match. - // - // NOTE: sadly this causes multiple sequence points to appear for the "initial" location of an if/then/else or match. - let activeSP = cgbuf.GetLastSequencePoint() - let repeatSP() = - match activeSP with - | None -> () - | Some src -> - if activeSP <> cgbuf.GetLastSequencePoint() then - CG.EmitSeqPoint cgbuf src - - // First try the common cases where we don't need a join point. - match tree with - | TDSuccess(es,n) -> - failwith "internal error: matches that immediately succeed should have been normalized using mk_and_optimize_match" - - | _ -> - // Create a join point - let stackAtTargets = cgbuf.GetCurrentStack() in (* the stack at the r.h.s. of each clause *) - let (sequelOnBranches,afterJoin,stackAfterJoin,sequelAfterJoin) = GenJoinPoint cenv cgbuf "match" eenv ty m sequel - - // Stack: "stackAtTargets" is "stack prior to any match-testing" and also "stack at the start of each branch-RHS". - // match-testing (dtrees) should not contribute to the stack. - // Each branch-RHS (targets) may contribute to the stack, leaving it in the "stackAfterJoin" state, for the join point. - // Since code is branching and joining, the cgbuf stack is maintained manually. - GenDecisionTreeAndTargets cenv cgbuf stackAtTargets eenv tree targets repeatSP sequelOnBranches; - CG.SetMarkToHere cgbuf afterJoin; - - //assert(cgbuf.GetCurrentStack() = stackAfterJoin); // REVIEW: Since gen_dtree* now sets stack, stack should be stackAfterJoin at this point... - CG.SetStack cgbuf stackAfterJoin; - GenSequel cenv eenv.cloc cgbuf sequelAfterJoin - -// Accumulate the decision graph as we go -and GenDecisionTreeAndTargets cenv cgbuf stackAtTargets eenv tree targets repeatSP sequel = - ignore (GenDecisionTreeAndTargetsInner cenv cgbuf (CG.EmitDelayMark cgbuf "start_dtree") stackAtTargets eenv tree targets repeatSP (Imap.empty()) sequel) - -and get_prev_target rgraph n = Imap.tryfind n rgraph - -and GenDecisionTreeAndTargetsInner cenv cgbuf inplab stackAtTargets eenv tree targets repeatSP rgraph sequel = - if verbose then dprintf "GenDecisionTreeAndTargetsInner, dtree = %s\n" (showL (DecisionTreeL tree)); - CG.SetStack cgbuf stackAtTargets; // Set the expected initial stack. - match tree with - | TDBind(bind,rest) -> - CG.SetMarkToHere cgbuf inplab; - let startScope,endScope as scopeMarks = StartDelayedLocalScope "dtree_bind" cgbuf - let eenv = AllocStorageForBind cenv cgbuf scopeMarks eenv bind - let sp = GenSequencePointForBind cenv cgbuf eenv bind - CG.SetMarkToHere cgbuf startScope; - GenBindAfterSequencePoint cenv cgbuf eenv sp bind; - // We don't get the scope marks quite right for dtree-bound variables. This is because - // we effectively lose an EndLocalScope for all dtrees that go to the same target - // So we just pretend that the variable goes out of scope here. - CG.SetMarkToHere cgbuf endScope; - let bodyLabel = CG.EmitDelayMark cgbuf "decisionTreeBindBody" - CG.EmitInstr cgbuf [] (I_br (code_label_of_mark bodyLabel)); - GenDecisionTreeAndTargetsInner cenv cgbuf bodyLabel stackAtTargets eenv rest targets repeatSP rgraph sequel - - | TDSuccess (es,n) -> - GenDecisionTreeSuccess cenv cgbuf inplab stackAtTargets eenv es n targets repeatSP rgraph sequel - - | TDSwitch(e, cases, dflt,m) -> - GenDecisionTreeSwitch cenv cgbuf inplab stackAtTargets eenv e cases dflt m targets repeatSP rgraph sequel - -and GetTarget targets n = - if n >= Array.length targets then failwith "GetTarget: target not found in decision tree"; - targets.[n] - -and GenDecisionTreeSuccess cenv cgbuf inplab stackAtTargets eenv es n targets repeatSP rgraph sequel = - if verbose then dprintn ("GenDecisionTreeSuccess"); - let (TTarget(vs,successExpr,spTarget)) = GetTarget targets n - match get_prev_target rgraph n with - | Some (success,eenvrhs) -> - - // If not binding anything we can go directly to the success point - // This is useful to avoid lots of branches e.g. in match A | B | C -> e - // In this case each case will just go straight to "e" - if FlatList.isEmpty vs then - CG.SetMark cgbuf inplab success; - rgraph - else - CG.SetMarkToHere cgbuf inplab; - repeatSP(); - FlatList.iter2 (GenSetBindValue cenv cgbuf eenvrhs eenv ) vs es; - CG.EmitInstr cgbuf [] (I_br (code_label_of_mark success)); - rgraph - | None -> - CG.SetMarkToHere cgbuf inplab; - // Repeat the sequence point to make sure each target branch has some sequence point (instead of inheriting - // a random sequence point from the previously generated IL code from the previous block. See comment on - // repeatSP() above. - // - // Only repeat the sequence point if we really have to, i.e. if the target expression doesn't start with a - // sequence point anyway - let spTarget = (match spTarget with SequencePointAtTarget -> SPAlways | SuppressSequencePointAtTarget _ -> SPSuppress) - if isNil vs && DoesGenExprStartWithSequencePoint spTarget successExpr then - () - else - repeatSP(); - let binds = mk_invisible_FlatBindings vs es - let _,endScope as scopeMarks = StartLocalScope "matchrhs" cgbuf - let eenvrhs = AllocStorageForBinds cenv cgbuf scopeMarks eenv binds - GenBindings cenv cgbuf eenvrhs binds; - let success = CG.GenerateMark cgbuf "matching_rhs" - CG.SetStack cgbuf stackAtTargets; - GenExpr cenv cgbuf eenvrhs spTarget successExpr (EndLocalScope(sequel,endScope)); - // add the generated rhs. to the graph - Imap.add n (success,eenvrhs) rgraph - -and GenDecisionTreeSwitch cenv cgbuf inplab stackAtTargets eenv e cases dflt_opt switchm targets repeatSP rgraph sequel = - let m = range_of_expr e - CG.SetMarkToHere cgbuf inplab; - - repeatSP(); - match cases with - // optimize a test against a boolean value, i.e. the all-important if-then-else - | TCase(TTest_const(TConst_bool b), success_dtree) :: _ -> - let failure_dtree = (match dflt_opt with None -> dest_of_case (List.hd (List.tl cases)) | Some d -> d) - GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e None eenv (if b then success_dtree else failure_dtree) (if b then failure_dtree else success_dtree) targets repeatSP rgraph sequel - - // optimize a single test for a type constructor to an "isdata" test - much - // more efficient code, and this case occurs in the generated equality testers where perf is important - | TCase(TTest_unionconstr(c,tyargs), success_dtree) :: rest when List.length rest = (match dflt_opt with None -> 1 | Some x -> 0) -> - let failure_dtree = if dflt_opt = None then dest_of_case (List.hd (List.tl cases)) else the dflt_opt - let cuspec = GenUnionSpec m cenv.g eenv.tyenv c.TyconRef tyargs - let idx = ucref_index c - GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e (Some ([Pop; Push cenv.g.ilg.typ_bool],(mk_IlxInstr (EI_isdata (cuspec, idx))))) eenv success_dtree failure_dtree targets repeatSP rgraph sequel - - | _ -> - let caseLabels = List.map (fun _ -> CG.EmitDelayMark cgbuf "switch_case") cases - let dflt_label = match dflt_opt with None -> List.hd caseLabels | Some _ -> CG.EmitDelayMark cgbuf "switch_dflt" - let fst_discrim = discrim_of_case (List.hd cases) - match fst_discrim with - // Iterated tests, e.g. exception constructors, nulltests, typetests and active patterns. - // These should always have one positive and one negative branch - | TTest_isinst _ - | TTest_array_length _ - | TTest_isnull - | TTest_const(TConst_zero) -> - if List.length cases <> 1 || isNone dflt_opt then failwith "internal error: GenDecisionTreeSwitch: TTest_isinst/isnull/query"; - let bi = - match fst_discrim with - | TTest_const(TConst_zero) -> - GenExpr cenv cgbuf eenv SPSuppress e Continue; - BI_brfalse - | TTest_isnull -> - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let srcTy = type_of_expr cenv.g e - if is_typar_typ cenv.g srcTy then - let ilFromTy = GenType m cenv.g eenv.tyenv srcTy - CG.EmitInstr cgbuf [Pop; Push cenv.g.ilg.typ_Object] (I_box ilFromTy); - BI_brfalse - | TTest_isinst (srcty,tgty) -> - let e = mk_call_istype cenv.g m tgty e - GenExpr cenv cgbuf eenv SPSuppress e Continue; - BI_brtrue - | _ -> failwith "internal error: GenDecisionTreeSwitch" - CG.EmitInstr cgbuf [Pop] (I_brcmp (bi,code_label_of_mark (List.hd caseLabels),code_label_of_mark dflt_label)); - GenDecisionTreeCases cenv cgbuf stackAtTargets eenv targets repeatSP rgraph caseLabels cases dflt_opt dflt_label sequel - - | TTest_query _ -> error(Error("internal error in codegen: TTest_query",switchm)) - | TTest_unionconstr (hdc,tyargs) -> - GenExpr cenv cgbuf eenv SPSuppress e Continue; - let cuspec = GenUnionSpec m cenv.g eenv.tyenv hdc.TyconRef tyargs - let dests = - if cases.Length <> caseLabels.Length then failwith "internal error: TTest_unionconstr"; - (cases , caseLabels) ||> List.map2 (fun case label -> - match case with - | TCase(TTest_unionconstr (c,_),_) -> (ucref_index c, code_label_of_mark label) - | _ -> failwith "error: mixed constructor/const test?") - - CG.EmitInstr cgbuf [Pop] (mk_IlxInstr (EI_datacase (false,cuspec,dests, code_label_of_mark dflt_label))); - GenDecisionTreeCases cenv cgbuf stackAtTargets eenv targets repeatSP rgraph caseLabels cases dflt_opt dflt_label sequel - - | TTest_const c -> - GenExpr cenv cgbuf eenv SPSuppress e Continue; - match c with - | (TConst_bool b) -> failwith "should have been done earlier" - | (TConst_sbyte _) - | (TConst_int16 _) - | (TConst_int32 _) - | (TConst_byte _) - | (TConst_uint16 _) - | (TConst_uint32 _) - | (TConst_char _) -> - if List.length cases <> List.length caseLabels then failwith "internal error: "; - let dests = - (cases,caseLabels) ||> List.map2 (fun case label -> - let i = - match discrim_of_case case with - TTest_const c' -> - match c' with - | TConst_sbyte i -> int32 i - | TConst_int16 i -> int32 i - | TConst_int32 i -> i - | TConst_byte i -> int32 i - | TConst_uint16 i -> int32 i - | TConst_uint32 i -> int32 i - | TConst_char c -> int32 c - | _ -> failwith "internal error: badly formed const test" - - | _ -> failwith "internal error: badly formed const test" - (i,code_label_of_mark label)) - let mn = List.foldBack (fst >> Operators.min) dests (fst(List.hd dests)) - let mx = List.foldBack (fst >> Operators.max) dests (fst(List.hd dests)) - // Check if it's worth using a switch - // REVIEW: this is using switches even for single integer matches! - if mx - mn = (List.length dests - 1) then - let dest_labels = dests |> List.sortBy fst |> List.map snd - if mn <> 0 then - CG.EmitInstrs cgbuf [Push cenv.g.ilg.typ_int32; Pop] [ mk_ldc_i32 mn;I_arith AI_sub ]; - CG.EmitInstr cgbuf [Pop] (I_switch (dest_labels, code_label_of_mark dflt_label)); - else - error(InternalError("non-dense integer matches not implemented in codegen - these should have been removed by the pattern match compiler",switchm)); - GenDecisionTreeCases cenv cgbuf stackAtTargets eenv targets repeatSP rgraph caseLabels cases dflt_opt dflt_label sequel - | _ -> error(InternalError("these matches should never be needed",switchm)) - -and GenDecisionTreeCases cenv cgbuf stackAtTargets eenv targets repeatSP rgraph caseLabels cases dflt_opt dflt_label sequel = - assert(cgbuf.GetCurrentStack() = stackAtTargets); // cgbuf stack should be unchanged over tests. [bug://1750]. - let rgraph = - match dflt_opt with - | Some dflt_rhs -> GenDecisionTreeAndTargetsInner cenv cgbuf dflt_label stackAtTargets eenv dflt_rhs targets repeatSP rgraph sequel - | None -> rgraph - let rgraph = - List.fold_left2 - (fun rgraph case_label (TCase(_,case_rhs)) -> - GenDecisionTreeAndTargetsInner cenv cgbuf case_label stackAtTargets eenv case_rhs targets repeatSP rgraph sequel) - rgraph - caseLabels - cases - rgraph - -and (|BoolExpr|_|) = function TExpr_const(TConst_bool b1,_,_) -> Some(b1) | _ -> None - -and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester eenv success_dtree failure_dtree targets repeatSP rgraph sequel = - match success_dtree,failure_dtree with - // Peephole: if generating a boolean value or its negation then just leave it on the stack - // This comes up in the generated equality functions. REVIEW: do this as a peephole optimization elsewhere - | TDSuccess(es1,n1), - TDSuccess(es2,n2) when - FlatList.isEmpty es1 && FlatList.isEmpty es2 && - (match GetTarget targets n1, GetTarget targets n2 with - TTarget(_,BoolExpr(b1),_),TTarget(_,BoolExpr(b2),_) -> b1 = not b2 - | _ -> false) -> - - match GetTarget targets n1, GetTarget targets n2 with - | TTarget(_,BoolExpr(b1),_),_ -> - GenExpr cenv cgbuf eenv SPSuppress e Continue; - (match tester with Some (pushpop,i) -> CG.EmitInstr cgbuf pushpop i; | _ -> ()); - if not b1 then - CG.EmitInstrs cgbuf [Push cenv.g.ilg.typ_bool; Pop] [mk_ldc_i32 (0); I_arith AI_ceq]; - GenSequel cenv cloc cgbuf sequel; - rgraph - | _ -> failwith "internal error: GenDecisionTreeTest during bool elim" - - | _ -> - let success = CG.EmitDelayMark cgbuf "test_success" - let failure = CG.EmitDelayMark cgbuf "test_failure" - (match tester with - | None -> - (* generate the expression, then test it for "false" *) - GenExpr cenv cgbuf eenv SPSuppress e (CmpThenBrOrContinue([Pop],I_brcmp (BI_brfalse, code_label_of_mark failure,code_label_of_mark success))); - - (* Turn "EI_isdata" tests that branch into EI_brisdata tests *) - | Some (_,I_other i) when is_ilx_ext_instr i && (match dest_ilx_ext_instr i with EI_isdata _ -> true | _ -> false) -> - let (cuspec,idx) = match dest_ilx_ext_instr i with EI_isdata (cuspec,idx) -> (cuspec,idx) | _ -> failwith "??" - GenExpr cenv cgbuf eenv SPSuppress e (CmpThenBrOrContinue([Pop],mk_IlxInstr (EI_brisdata (cuspec, idx, code_label_of_mark success,code_label_of_mark failure)))); - | Some (pushpop,i) -> - GenExpr cenv cgbuf eenv SPSuppress e Continue; - CG.EmitInstr cgbuf pushpop i; - CG.EmitInstr cgbuf [Pop] (I_brcmp (BI_brfalse, code_label_of_mark failure,code_label_of_mark success))); - let rgraph = GenDecisionTreeAndTargetsInner cenv cgbuf success stackAtTargets eenv success_dtree targets repeatSP rgraph sequel - GenDecisionTreeAndTargetsInner cenv cgbuf failure stackAtTargets eenv failure_dtree targets repeatSP rgraph sequel - -//------------------------------------------------------------------------- -// Generate letrec bindings -//------------------------------------------------------------------------- - -and GenLetRecFixup cenv cgbuf eenv (ilxCloSpec,e,n,e2,m) = - GenExpr cenv cgbuf eenv SPSuppress e Continue; - CG.EmitInstrs cgbuf [] [ mk_IlxInstr (EI_castclo ilxCloSpec) ]; - GenExpr cenv cgbuf eenv SPSuppress e2 Continue; - CG.EmitInstrs cgbuf [Pop; Pop] [ mk_IlxInstr (EI_stclofld(ilxCloSpec, n)) ] - -and GenLetRecBinds cenv cgbuf eenv (allBinds: Bindings,m) = - (* Fix up recursion for non-toplevel recursive bindings *) - let bindsPossiblyRequiringFixup = - allBinds |> FlatList.filter (fun b -> - match (storage_for_val m b.Var eenv) with - | Method _ - | Unrealized - (* Note: Recursive data stored in static fields may require fixups e.g. let x = C(x) *) - (* | StaticField _ *) - | Null -> false - | _ -> true) - - let computeFixupsForOneRecursiveVar boundv forwardReferenceSet fixups selfv access set e = - match e with - | TExpr_lambda _ | TExpr_tlambda _ | TExpr_obj _ -> - let isLocalTypeFunc = (isSome selfv && (IsNamedLocalTypeFuncVal cenv.g (the selfv) e)) - let selfv = (match e with TExpr_obj _ -> None | _ when isLocalTypeFunc -> None | _ -> Option.map mk_local_vref selfv) - let clo,_,eenvclo = GetIlxClosureInfo cenv m isLocalTypeFunc selfv {eenv with letBoundVars=(mk_local_vref boundv)::eenv.letBoundVars} e - clo.clo_freevars |> List.iter (fun fv -> - if Zset.mem fv forwardReferenceSet then - match storage_for_val m fv eenvclo with - | Env (_,n,_) -> fixups := (boundv, fv, (fun () -> GenLetRecFixup cenv cgbuf eenv (clo.clo_clospec,access,n,expr_for_val m fv,m))) :: !fixups - | _ -> error (InternalError("GenLetRec: "^fv.MangledName^" was not in the environment",m)) ) - - | TExpr_val (vref,_,m) -> - let fv = deref_val vref - let needsFixup = Zset.mem fv forwardReferenceSet - if needsFixup then fixups := (boundv, fv,(fun () -> GenExpr cenv cgbuf eenv SPSuppress (set e) discard)) :: !fixups - | _ -> failwith "compute real fixup vars" - - - let fixups = ref [] - let recursiveVars = Zset.addFlatList (bindsPossiblyRequiringFixup |> FlatList.map (fun v -> v.Var)) (Zset.empty val_spec_order) - FlatList.fold - (fun forwardReferenceSet (bind:Binding) -> - let valBeingDefined = bind.Var - // compute fixups - bind.Expr |> iter_letrec_fixups cenv.g (Some valBeingDefined) (computeFixupsForOneRecursiveVar valBeingDefined forwardReferenceSet fixups) (expr_for_val m valBeingDefined, (fun e -> failwith ("internal error: should never need to set non-delayed recursive val: " ^ valBeingDefined.MangledName))); - Zset.remove valBeingDefined forwardReferenceSet) - recursiveVars - bindsPossiblyRequiringFixup |> ignore; - - FlatList.fold - (fun forwardReferenceSet (bind:Binding) -> - let valBeingDefined = bind.Var - if verbose then dprintn ("GenLetRec: generate binding for "^showL(valL valBeingDefined)); - GenBind cenv cgbuf eenv bind; - // execute and discard any fixups that can now be committed - let forwardReferenceSet = Zset.remove valBeingDefined forwardReferenceSet - fixups := !fixups |> List.filter (fun (boundv, fv, action) -> if (Zset.mem boundv forwardReferenceSet or Zset.mem fv forwardReferenceSet) then true else (action(); false)); - forwardReferenceSet) - recursiveVars - allBinds |> ignore; - - -and GenLetRec cenv cgbuf eenv (binds,body,m) sequel = - let _,endScope as scopeMarks = StartLocalScope "letrec" cgbuf - if verbose then dprintn ("GenLetRec"); - let eenv = AllocStorageForBinds cenv cgbuf scopeMarks eenv binds - GenLetRecBinds cenv cgbuf eenv (binds,m); - if verbose then dprintn ("GenLetRec: body"); - - let sp = if FlatList.exists bindHasSeqPt binds || FlatList.forall bindIsInvisible binds then SPAlways else SPSuppress - GenExpr cenv cgbuf eenv sp body (EndLocalScope(sequel,endScope)) - -//------------------------------------------------------------------------- -// Generate simple bindings -//------------------------------------------------------------------------- - -and GenSequencePointForBind cenv cgbuf eenv (TBind(vspec,e,spBind)) = - - let emitSP() = - match spBind,e with - | (( NoSequencePointAtInvisibleBinding - | NoSequencePointAtStickyBinding),_) -> SPSuppress - | (NoSequencePointAtDoBinding,_) -> SPAlways - | (NoSequencePointAtLetBinding,_) -> SPSuppress - // Don't emit sequence points for lambdas. - // SEQUENCE POINT REVIEW: don't emit for lazy either, nor any builder expressions - | _, (TExpr_lambda _ | TExpr_tlambda _) -> SPSuppress - | SequencePointAtBinding m,_ -> - CG.EmitSeqPoint cgbuf m; - SPSuppress - - let m = vspec.Range - - match storage_for_val m vspec eenv with - | Unrealized -> SPSuppress - | Null -> emitSP() - | Method (topValInfo,_,mspec,_,paramInfos,retInfo) -> SPSuppress - | StaticField _ -> emitSP() - | _ -> emitSP() - -and GenBind cenv cgbuf eenv bind = - let sp = GenSequencePointForBind cenv cgbuf eenv bind - GenBindAfterSequencePoint cenv cgbuf eenv sp bind - -and GenBindAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,e,spBind)) = - if verbose then dprintn ("GenBind"); - - // Record the closed reflection definition if publishing - // There is no real reason we're doing this so late in the day - match vspec.PublicPath, vspec.ReflectedDefinition with - | Some p, Some e -> cgbuf.mgbuf.AddReflectedDefinition(vspec,e) - | _ -> () - - if verbose then dprintn ("GenBind: " ^ showL(vspecAtBindL vspec)); - let eenv = {eenv with letBoundVars= (mk_local_vref vspec) :: eenv.letBoundVars} - //let access = ComputeMemberAccess (not vspec.IsOverride) (IsHiddenVal eenv.sigToImplRemapInfo vspec || not vspec.IsMemberOrModuleBinding) - let access = - let isHidden = - IsHiddenVal eenv.sigToImplRemapInfo vspec || // anything hiden by a signature gets assembly visibility - not vspec.IsMemberOrModuleBinding || // anything that's not a module or member binding gets assembly visibility - vspec.IsIncrClassGeneratedMember // compiler generated members for class function 'let' bindings get assembly visibility - ComputeMemberAccess (not vspec.IsOverride) isHidden - - // Workaround for .NET and Visual Studio restriction w.r.t debugger type proxys - // Mark internal constructors in internal classes as public. - let access = - if access = MemAccess_assembly && vspec.IsConstructor && IsHiddenTycon eenv.sigToImplRemapInfo vspec.MemberApparentParent.Deref then - MemAccess_public - else - access - - let m = vspec.Range - - match storage_for_val m vspec eenv with - | Unrealized -> () - - | Null -> - GenExpr cenv cgbuf eenv SPSuppress e discard - - | Method (topValInfo,_,mspec,_,paramInfos,retInfo) -> - let tps,baseValOpt,vsl,body',bodyty = IteratedAdjustArityOfLambda cenv.g cenv.amap topValInfo e - let methodVars = List.concat vsl - GenMethodForBinding cenv cgbuf eenv (vspec,mspec,access,paramInfos,retInfo) (topValInfo,baseValOpt,tps,methodVars, body', bodyty) - - | StaticField (fspec,vref,hasLiteralAttr,ilTypeSpecForProperty,fieldName,propName,fty,ilGetterMethRef,ilSetterMethRef,optShadowLocal) -> - let mut = vspec.IsMutable - - match mut,hasLiteralAttr,e with - | _,false,_ -> () - | true,true,_ -> errorR(Error("Values marked with 'LiteralAttribute' may not be mutable",m)) - | _,true,TExpr_const _ -> () - | _,true,_ -> errorR(Error("Values marked with 'LiteralAttribute' must currently be simple integer, character, Boolean, string or floating point constants",m)) - - /// Generate a static field definition and the get/set properties to access it. - - let ilAttribs = GenAttrs cenv eenv (vspec.Attribs) - let fieldDef = - let access = ComputeMemberAccess true (not hasLiteralAttr or IsHiddenVal eenv.sigToImplRemapInfo vspec) - let fieldDef = mk_static_fdef(fieldName,fty, None, None, access) - { fieldDef with - fdCustomAttrs = mk_custom_attrs (ilAttribs @ [ mk_DebuggerBrowsableNeverAttribute cenv.g.ilg ]) } - - - let fieldDef = - match hasLiteralAttr,e with - | false,_ -> fieldDef - | true,TExpr_const(konst,m,_) -> { fieldDef with fdLiteral=true; fdInit= Some(GenFieldInit m konst) } - | true,_ -> fieldDef (* error given above *) - - let ilTypeRefForProperty = ilTypeSpecForProperty.TypeRef - - let fieldDef = - let isClassInitializer = (cgbuf.MethodName = ".cctor") - if mut || (not isClassInitializer) || hasLiteralAttr then - fieldDef - else - {fieldDef with fdInitOnly=true } - - cgbuf.mgbuf.AddFieldDef(fspec.EnclosingTypeRef,fieldDef); - CountStaticFieldDef(); - - if not hasLiteralAttr then - let ilPropertyDef = - { propName=propName; - propRTSpecialName=false; - propSpecialName=false; - propSet=if mut then Some(ilSetterMethRef) else None; - propGet=Some(ilGetterMethRef); - propCallconv=CC_static; - propType=fty; - propInit=None; - propArgs=[]; - propCustomAttrs=mk_custom_attrs (ilAttribs @ [mk_CompilationMappingAttr cenv.g SourceLevelConstruct_Value]); } - cgbuf.mgbuf.AddOrMergePropertyDef(ilTypeRefForProperty,ilPropertyDef,m); - - let getterMethod = - mk_static_mdef([],ilGetterMethRef.Name,access,[],mk_return fty, - MethodBody_il(mk_ilmbody(true,[],2,nonbranching_instrs_to_code([ mk_normal_ldsfld fspec ]),None))) - |> AddSpecialNameFlag - cgbuf.mgbuf.AddMethodDef(ilTypeRefForProperty,getterMethod) ; - if mut then - let setterMethod = - mk_static_mdef([],ilSetterMethRef.Name,access,[mk_named_param("value",fty)],mk_return Type_void, - MethodBody_il(mk_ilmbody(true,[],2,nonbranching_instrs_to_code([ ldarg_0;mk_normal_stsfld fspec]),None))) - |> AddSpecialNameFlag - cgbuf.mgbuf.AddMethodDef(ilTypeRefForProperty,setterMethod) - - GenBindRhs cenv cgbuf eenv sp vspec e; - match optShadowLocal with - | NoShadowLocal -> EmitSetStaticField cgbuf fspec - | ShadowLocal storage-> - CG.EmitInstr cgbuf [Push fty] i_dup - EmitSetStaticField cgbuf fspec - GenSetStorage cenv m cgbuf storage - - | _ -> - GenSetBindValue cenv cgbuf eenv eenv vspec e - -//------------------------------------------------------------------------- -// Generate method bindings -//------------------------------------------------------------------------- - -/// Spectacularly gross table encoding P/Invoke and COM marshalling information -and GenMarshal cenv attribs = - let otherAttribs = - attribs - |> List.filter (IsMatchingAttrib cenv.g cenv.g.attrib_MarshalAsAttribute >> not) - - match TryFindAttrib cenv.g cenv.g.attrib_MarshalAsAttribute attribs with - | Some (Attrib(_,_,[ AttribInt32Arg unmanagedType ],namedArgs,m)) -> - let decoder = AttributeDecoder namedArgs - let rec decodeUnmanagedType unmanagedType = - (* enumeration values for System.Runtime.InteropServices.UnmanagedType taken from mscorlib.il *) - match unmanagedType with - | 0x0 -> NativeType_empty - | 0x01 -> NativeType_void - | 0x02 -> NativeType_bool - | 0x03 -> NativeType_int8 - | 0x04 -> NativeType_unsigned_int8 - | 0x05 -> NativeType_int16 - | 0x06 -> NativeType_unsigned_int16 - | 0x07 -> NativeType_int32 - | 0x08 -> NativeType_unsigned_int32 - | 0x09 -> NativeType_int64 - | 0x0A -> NativeType_unsigned_int64 - | 0x0B -> NativeType_float32 - | 0x0C -> NativeType_float64 - | 0x0F -> NativeType_currency - | 0x13 -> NativeType_bstr - | 0x14 -> NativeType_lpstr - | 0x15 -> NativeType_lpwstr - | 0x16 -> NativeType_lptstr - | 0x17 -> NativeType_fixed_sysstring (decoder.FindInt32 "SizeConst" 0x0) - | 0x19 -> NativeType_iunknown - | 0x1A -> NativeType_idsipatch - | 0x1B -> NativeType_struct - | 0x1C -> NativeType_interface - | 0x1D -> - let safeArraySubType = - match decoder.FindInt32 "SafeArraySubType" 0x0 with - (* enumeration values for System.Runtime.InteropServices.VarType taken from mscorlib.il *) - | 0x0 -> VariantType_empty - | 0x1 -> VariantType_null - | 0x02 -> VariantType_int16 - | 0x03 -> VariantType_int32 - | 0x0C -> VariantType_variant - | 0x04 -> VariantType_float32 - | 0x05 -> VariantType_float64 - | 0x06 -> VariantType_currency - | 0x07 -> VariantType_date - | 0x08 -> VariantType_bstr - | 0x09 -> VariantType_idispatch - | 0x0a -> VariantType_error - | 0x0b -> VariantType_bool - | 0x0d -> VariantType_iunknown - | 0x0e -> VariantType_decimal - | 0x10 -> VariantType_int8 - | 0x11 -> VariantType_unsigned_int8 - | 0x12 -> VariantType_unsigned_int16 - | 0x13 -> VariantType_unsigned_int32 - | 0x15 -> VariantType_unsigned_int64 - | 0x16 -> VariantType_int - | 0x17 -> VariantType_unsigned_int - | 0x18 -> VariantType_void - | 0x19 -> VariantType_hresult - | 0x1a -> VariantType_ptr - | 0x1c -> VariantType_carray - | 0x1d -> VariantType_userdefined - | 0x1e -> VariantType_lpstr - | 0x1B -> VariantType_safearray - | 0x1f -> VariantType_lpwstr - | 0x24 -> VariantType_record - | 0x40 -> VariantType_filetime - | 0x41 -> VariantType_blob - | 0x42 -> VariantType_stream - | 0x43 -> VariantType_storage - | 0x44 -> VariantType_streamed_object - | 0x45 -> VariantType_stored_object - | 0x46 -> VariantType_blob_object - | 0x47 -> VariantType_cf - | 0x48 -> VariantType_clsid - | 0x14 -> VariantType_int64 - | _ -> VariantType_empty - let safeArrayUserDefinedSubType = - // the argument is a System.Type obj, but it's written to MD as a UTF8 string - match decoder.FindTypeName "SafeArrayUserDefinedSubType" "" with - | "" -> None - | res -> if (safeArraySubType = VariantType_idispatch) || (safeArraySubType = VariantType_iunknown) then Some(res) else None - NativeType_safe_array(safeArraySubType,safeArrayUserDefinedSubType) - | 0x1E -> NativeType_fixed_array (decoder.FindInt32 "SizeConst" 0x0) - | 0x1F -> NativeType_int - | 0x20 -> NativeType_unsigned_int - | 0x22 -> NativeType_byvalstr - | 0x23 -> NativeType_ansi_bstr - | 0x24 -> NativeType_tbstr - | 0x25 -> NativeType_variant_bool - | 0x26 -> NativeType_method - | 0x28 -> NativeType_as_any - | 0x2A -> - let sizeParamIndex = - match decoder.FindInt16 "SizeParamIndex" -1s with - | -1s -> None - | res -> Some ((int)res,None) - let arraySubType = - match decoder.FindInt32 "ArraySubType" -1 with - | -1 -> None - | res -> Some (decodeUnmanagedType res) - NativeType_array(arraySubType,sizeParamIndex) - | 0x2B -> NativeType_lpstruct - | 0x2C -> - error(Error("Custom marshallers may not be specified in F# code. Consider using a C# helper function",m)) - (* NativeType_custom of bytes * string * string * bytes (* GUID,nativeTypeName,custMarshallerName,cookieString *) *) - //NativeType_error - | 0x2D -> NativeType_error - | _ -> NativeType_empty - Some(decodeUnmanagedType unmanagedType), otherAttribs - | Some (Attrib(_,_,_,_,m)) -> - errorR(Error("The MarshalAs attribute could not be decoded",m)); - None, attribs - | _ -> - // No MarshalAs detected - None, attribs - -and GenParamAttribs cenv attribs = - let inFlag = HasAttrib cenv.g cenv.g.attrib_InAttribute attribs - let outFlag = HasAttrib cenv.g cenv.g.attrib_OutAttribute attribs - let optionalFlag = HasAttrib cenv.g cenv.g.attrib_OptionalAttribute attribs - // Return the filtered attributes. Do not generate In, Out or Optional attributes - // as custom attributes in the code - they are implicit from the IL bits for these - let attribs = - attribs - |> List.filter (IsMatchingAttrib cenv.g cenv.g.attrib_InAttribute >> not) - |> List.filter (IsMatchingAttrib cenv.g cenv.g.attrib_OutAttribute >> not) - |> List.filter (IsMatchingAttrib cenv.g cenv.g.attrib_OptionalAttribute >> not) - - let paramMarshal,attribs = GenMarshal cenv attribs - inFlag,outFlag,optionalFlag,paramMarshal,attribs - -and GenParams cenv eenv (mspec:ILMethodSpec) (attribs:TopArgInfo list) (implValsOpt: Val list option) = - let ilArgTys = mspec.FormalArgTypes - let argInfosAndTypes = - if attribs.Length = ilArgTys.Length then List.zip ilArgTys attribs - else ilArgTys |> List.map (fun ilArgTy -> ilArgTy,TopValInfo.unnamedTopArg1) - - let argInfosAndTypes = - match implValsOpt with - | Some(implVals) when (implVals.Length = ilArgTys.Length) -> - List.map2 (fun x y -> x,Some y) argInfosAndTypes implVals - | _ -> - List.map (fun x -> x,None) argInfosAndTypes - - (Set.empty,argInfosAndTypes) - ||> List.mapfold (fun takenNames ((ilArgTy,TopArgInfo(attribs,isOpt)),implValOpt) -> - let inFlag,outFlag,optionalFlag,paramMarshal,attribs = GenParamAttribs cenv attribs - - let idOpt = (match isOpt with - | Some v -> Some v - | None -> match implValOpt with - | Some v -> Some v.Id - | None -> None) - - let nmOpt,takenNames = - match idOpt with - | Some id -> - let nm = if takenNames.Contains(id.idText) then globalNng.FreshCompilerGeneratedName (id.idText, id.idRange) else id.idText - Some nm, takenNames.Add(nm) - | None -> - None, takenNames - - let param = - { paramName=nmOpt; - paramType= ilArgTy; - paramDefault=None; (* REVIEW: support "default" attributes *) - paramMarshal=paramMarshal; - paramIn=inFlag; - paramOut=outFlag; - paramOptional=optionalFlag; - paramCustomAttrs= mk_custom_attrs (GenAttrs cenv eenv attribs) } - - param, takenNames) - |> fst - -and GenReturnInfo cenv eenv ilRetTy (TopArgInfo(attrs,_)) = - let marshal,attrs = GenMarshal cenv attrs - { returnType=ilRetTy; - returnMarshal=marshal; - returnCustomAttrs= mk_custom_attrs (GenAttrs cenv eenv attrs) } - -and GenPropertyForMethodDef g compileAsInstance tref mdef (memberInfo:ValMemberInfo) ilArgTys ilPropTy ilAttrs = - let name = memberInfo.PropertyName in (* chop "get_" *) - if verbose then dprintf "GenPropertyForMethodDef %s\n" name; - - { propName=name; - propRTSpecialName=false; - propSpecialName=false; - propSet=(if memberInfo.MemberFlags.MemberKind= MemberKindPropertySet then Some(mk_mref_to_mdef(tref,mdef)) else None); - propGet=(if memberInfo.MemberFlags.MemberKind= MemberKindPropertyGet then Some(mk_mref_to_mdef(tref,mdef)) else None); - propCallconv=(if compileAsInstance then CC_instance else CC_static); - propType=ilPropTy; - propInit=None; - propArgs= ilArgTys; - propCustomAttrs=ilAttrs; } - -and GenEventForProperty cenv eenvForMeth (mspec:ILMethodSpec) (memberInfo:ValMemberInfo) ilAttrsThatGoOnPrimaryItem m returnTy = - let evname = memberInfo.PropertyName - let delegateTy = Infos.FindDelegateTypeOfPropertyEvent cenv.g cenv.amap evname m returnTy - let ilDelegateTy = GenType m cenv.g eenvForMeth.tyenv delegateTy - let ilThisTy = mspec.EnclosingType - let addMethRef = mk_mref (ilThisTy.TypeRef,mspec.CallingConv,"add_" ^evname,0,[ilDelegateTy],Type_void) - let removeMethRef = mk_mref (ilThisTy.TypeRef,mspec.CallingConv,"remove_"^evname,0,[ilDelegateTy],Type_void) - { eventType = Some(ilDelegateTy); - eventName= evname; - eventRTSpecialName=false; - eventSpecialName=false; - eventAddOn = addMethRef; - eventRemoveOn = removeMethRef; - eventFire= None; - eventOther= []; - eventCustomAttrs = mk_custom_attrs ilAttrsThatGoOnPrimaryItem; } - - -and ComputeFlagFixupsForMemberBinding cenv eenv (v:Val,memberInfo:ValMemberInfo) = - - if isNil memberInfo.ImplementedSlotSigs then - [fixupVirtualSlotFlags] - else - memberInfo.ImplementedSlotSigs |> List.map (fun slotsig -> - let oty = slotsig.ImplementedType - let tcref = v.MemberApparentParent - let tcaug = tcref.TypeContents - - - let shouldUseMethodImpl = - // TODO: it would be good to get rid of this special casing of Compare and GetHashCode during code generation - let isCompare = - (isSome tcaug.tcaug_compare && type_equiv cenv.g oty cenv.g.mk_IComparable_ty) - let isStructural = - (isSome tcaug.tcaug_compare_withc && type_equiv cenv.g oty cenv.g.mk_IStructuralComparable_ty) || - (isSome tcaug.tcaug_hash_and_equals_withc && type_equiv cenv.g oty cenv.g.mk_IStructuralEquatable_ty) - is_interface_typ cenv.g oty && not isCompare && not isStructural - - - let memberParentTypars = - match PartitionValTypars cenv.g v with - | Some(_,memberParentTypars,_,_,_) -> memberParentTypars - | None -> errorR(InternalError("PartitionValTypars",v.Range)); [] - - let eenvUnderTypars = env_for_typars memberParentTypars eenv - - let reallyUseMethodImpl,nameOfOverridingMethod, _ = - GenMethodImpl cenv eenvUnderTypars (shouldUseMethodImpl,slotsig) v.Range - - (if reallyUseMethodImpl then fixupMethodImplFlags >> renameMethodDef nameOfOverridingMethod - else fixupVirtualSlotFlags >> renameMethodDef nameOfOverridingMethod)) - -and GenMethodForBinding - cenv cgbuf eenv - (v:Val,mspec,access,paramInfos,retInfo) - (topValInfo,baseValOpt,tps,methodVars, body, returnTy) = - - let m = v.Range - let selfMethodVars,nonSelfMethodVars,compileAsInstance = - match v.MemberInfo with - | Some(memberInfo) when ValSpecIsCompiledAsInstance cenv.g v -> - match methodVars with - | [] -> error(Error("Internal error: empty argument list for instance method",v.Range)) - | h::t -> [h],t,true - | _ -> [],methodVars,false - - let nonUnitNonSelfMethodVars,body = BindUnitVars cenv.g (nonSelfMethodVars,paramInfos,body) - let nonUnitMethodVars = selfMethodVars@nonUnitNonSelfMethodVars - let cmtps,curriedArgInfos,_,_ = GetTopValTypeInCompiledForm cenv.g topValInfo v.Type v.Range - let eenv = bindBaseVarOpt cenv eenv baseValOpt - - // The type parameters of the method's type are different to the type parameters - // for the big lambda ("tlambda") of the implementation of the method. - let eenv_under_meth_tlambda_typars = env_for_typars tps eenv - let eenv_under_meth_type_typars = env_for_typars cmtps eenv - - // Add the arguments to the environment. We add an implicit 'this' argument to constructors - let isCtor = v.IsConstructor - let eenvForMeth = - let eenvForMeth = eenv_under_meth_tlambda_typars - let numImplicitArgs = if isCtor then 1 else 0 - let eenvForMeth = AddStorageForLocalVals cenv.g (List.mapi (fun i v -> (v,Arg (numImplicitArgs+i))) nonUnitMethodVars) eenvForMeth - eenvForMeth - - let tailCallInfo = [(mk_local_vref v,BranchCallMethod (topValInfo.AritiesOfArgs,curriedArgInfos,tps,nonUnitMethodVars.Length,GetNumObjArgsOfVal v))] - - // Discard the result on a 'void' return type. For a constructor just return 'void' - let sequel = - if is_unit_typ cenv.g returnTy then discardAndReturnVoid - elif isCtor then ReturnVoid - else Return - - // Now generate the code. - - let ilMethodBody,preservesig = - match TryFindAttrib cenv.g cenv.g.attrib_DllImportAttribute v.Attribs with - | Some (Attrib(_,_,[ AttribStringArg(dll) ],namedArgs,m)) -> - if tps <> [] then error(Error("The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function",m)); - GenPInvokeMethod (v.CompiledName,dll,namedArgs), true - - | Some (Attrib(_,_,_,_,m)) -> - error(Error("The DllImport attribute could not be decoded",m)); - | _ -> - // Replace the body of PseudoValue "must inline" methods with a 'throw' - // However still generate the code for reflection etc. - let bodyExpr = - if HasAttrib cenv.g cenv.g.attrib_NoDynamicInvocationAttribute v.Attribs then - mk_throw m returnTy - (mk_exnconstr(mk_MFCore_tcref cenv.g.fslibCcu "DynamicInvocationNotSupportedException", - [ mk_string cenv.g m v.CompiledName],m)) - else - body - - // This is the main code generation for most methods - MethodBody_il(CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,tailCallInfo, mspec.Name, eenvForMeth, 0, 0, bodyExpr, sequel)), - false - - // Do not generate DllImport attributes into the code - they are implicit from the P/Invoke - let attrs = v.Attribs |> List.filter (IsMatchingAttrib cenv.g cenv.g.attrib_DllImportAttribute >> not) - - // Do not push the attributes to the method for events and properties - // However OverloadIDAttribute does get pushed to the methods as this is - // required by the F# quotation/reflection implementation. - - let attrsThatMustBeOnMethod, attrsThatGoOnPropertyIfItExists = - attrs |> List.partition (IsMatchingAttrib cenv.g cenv.g.attrib_OverloadIDAttribute) - - let ilAttrsCompilerGenerated = if v.IsCompilerGenerated then [ mk_CompilerGeneratedAttribute cenv.g.ilg ] else [] - let ilAttrsThatGoOnMethod = GenAttrs cenv eenv attrsThatMustBeOnMethod - let ilAttrsThatGoOnPrimaryItem = GenAttrs cenv eenv attrsThatGoOnPropertyIfItExists - let ilTypars = GenGenericParams m cenv eenv_under_meth_tlambda_typars.tyenv tps - let ilParams = GenParams cenv eenv mspec paramInfos (Some(nonUnitNonSelfMethodVars)) - let ilReturn = GenReturnInfo cenv eenv mspec.FormalReturnType retInfo - let methName = mspec.Name - let tref = mspec.MethodRef.EnclosingTypeRef - - let EmitTheMethodDef mdef = - // Does the function have an explicit [] attribute? - let isExplicitEntryPoint = HasAttrib cenv.g cenv.g.attrib_EntryPointAttribute attrs - let mdef = {mdef with - mdPreserveSig=preservesig; - mdEntrypoint = isExplicitEntryPoint; } - - let mdef = - if // operator names - mdef.mdName.StartsWith("op_",System.StringComparison.Ordinal) || - // active pattern names - mdef.mdName.StartsWith("|",System.StringComparison.Ordinal) then - {mdef with mdSpecialName=true} - else - mdef - CountMethodDef(); - cgbuf.mgbuf.AddMethodDef(tref,mdef) - - - match v.MemberInfo with - // don't generate unimplemented abstracts - | Some(memberInfo) when memberInfo.MemberFlags.MemberIsDispatchSlot && not memberInfo.IsImplemented -> - // skipping unimplemented abstract method - () - | Some(memberInfo) when not v.IsExtensionMember -> - - let _,ilMethTypars = ilTypars |> List.chop (inst_of_typ mspec.EnclosingType).Length - if memberInfo.MemberFlags.MemberKind = MemberKindConstructor then - assert (isNil ilMethTypars) - - // Constructors in abstract classes become protected - let access = - if HasAttrib cenv.g cenv.g.attrib_AbstractClassAttribute v.MemberApparentParent.Attribs then - MemAccess_family - else - access - - let mdef = mk_ctor (access,ilParams,ilMethodBody) - let mdef = { mdef with mdCustomAttrs= mk_custom_attrs (ilAttrsThatGoOnPrimaryItem @ ilAttrsThatGoOnMethod @ ilAttrsCompilerGenerated) }; - EmitTheMethodDef mdef - - elif memberInfo.MemberFlags.MemberKind = MemberKindClassConstructor then - assert (isNil ilMethTypars) - let mdef = mk_cctor ilMethodBody - let mdef = { mdef with mdCustomAttrs= mk_custom_attrs (ilAttrsThatGoOnPrimaryItem @ ilAttrsThatGoOnMethod @ ilAttrsCompilerGenerated) }; - EmitTheMethodDef mdef - - // Generate virtual/override methods + method-impl information if needed - else - let mdef = - if not compileAsInstance then - mk_static_mdef (ilMethTypars,memberInfo.CompiledName,access,ilParams,ilReturn,ilMethodBody) - - elif memberInfo.MemberFlags.MemberIsVirtual || - (memberInfo.MemberFlags.MemberIsDispatchSlot && memberInfo.IsImplemented) || - memberInfo.MemberFlags.MemberIsOverrideOrExplicitImpl then - - // Virtual methods are used to implement interfaces and hence must currently be public - // REVIEW: use method impls to implement the interfaces - if access <> MemAccess_public && not v.IsCompilerGenerated then - warning(FullAbstraction("This method will be made public in the underlying IL because it may implement an interface or override a method",v.Range)); - - let flagFixups = ComputeFlagFixupsForMemberBinding cenv eenv (v,memberInfo) - let mdef = mk_generic_virtual_mdef (memberInfo.CompiledName,ComputePublicMemberAccess false,ilMethTypars,ilParams,ilReturn,ilMethodBody) - let mdef = List.fold (fun mdef f -> f mdef) mdef flagFixups - mdef - else - mk_generic_instance_mdef (memberInfo.CompiledName,access,ilMethTypars,ilParams,ilReturn,ilMethodBody) - - let isAbstract = - memberInfo.MemberFlags.MemberIsDispatchSlot && - let tcref = v.MemberApparentParent - not (deref_tycon tcref).IsFSharpDelegateTycon - - let mdef = - {mdef with mdKind=match mdef.mdKind with - | MethodKind_virtual vinfo -> - MethodKind_virtual {vinfo with virtFinal=memberInfo.MemberFlags.MemberIsFinal; - virtAbstract=isAbstract; } - | k -> k } - - match memberInfo.MemberFlags.MemberKind with - - | (MemberKindPropertySet | MemberKindPropertyGet) as k -> - if nonNil ilMethTypars then - error(InternalError("A property may not be more generic than the enclosing type - constrain the polymorphism in the expression",v.Range)); - - // Check if we're compiling the property as a .NET event - if CompileAsEvent cenv.g v.Attribs then - - // Emit the pseudo-property as an event, but not if its a private method impl - if mdef.mdAccess <> MemAccess_private then - let edef = GenEventForProperty cenv eenvForMeth mspec memberInfo ilAttrsThatGoOnPrimaryItem m returnTy - cgbuf.mgbuf.AddEventDef(tref,edef) - // The method def is dropped on the floor here - - else - // Emit the property, but not if its a private method impl - if mdef.mdAccess <> MemAccess_private then - let vtyp = ReturnTypeOfPropertyVal cenv.g v - let ilPropTy = GenType m cenv.g eenv_under_meth_type_typars.tyenv vtyp - let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes m cenv.g eenv_under_meth_type_typars.tyenv - let ilPropertyDef = GenPropertyForMethodDef cenv.g compileAsInstance tref mdef memberInfo ilArgTys ilPropTy (mk_custom_attrs ilAttrsThatGoOnPrimaryItem) - cgbuf.mgbuf.AddOrMergePropertyDef(tref,ilPropertyDef,m) - - // Add the special name flag for all properties - let mdef = mdef |> AddSpecialNameFlag - // Do not push the attributes to the method for events and properties - // However OverloadIDAttribute does get pushed to the methods as this is - // required by the F# quotation/reflection implementation. - let mdef = { mdef with mdCustomAttrs= mk_custom_attrs (ilAttrsThatGoOnMethod @ ilAttrsCompilerGenerated) }; - EmitTheMethodDef mdef - | _ -> - let mdef = { mdef with mdCustomAttrs= mk_custom_attrs (ilAttrsThatGoOnPrimaryItem @ ilAttrsThatGoOnMethod @ ilAttrsCompilerGenerated) }; - EmitTheMethodDef mdef - - | _ -> - let mdef = mk_static_mdef (ilTypars, methName, access,ilParams,ilReturn,ilMethodBody) - let mdef = { mdef with mdCustomAttrs= mk_custom_attrs (ilAttrsThatGoOnPrimaryItem @ ilAttrsThatGoOnMethod @ ilAttrsCompilerGenerated) } - EmitTheMethodDef mdef - - -and GenPInvokeMethod (nm,dll,namedArgs) = - let decoder = AttributeDecoder namedArgs - - MethodBody_pinvoke - { pinvokeWhere=mk_simple_modref dll; - pinvokeName=decoder.FindString "EntryPoint" nm; - pinvokeCallconv= - match decoder.FindInt32 "ILCallingConv" 0 with - | 1 -> PInvokeCallConvWinapi - | 2 -> PInvokeCallConvCdecl - | 3 -> PInvokeCallConvStdcall - | 4 -> PInvokeCallConvThiscall - | 5 -> PInvokeCallConvFastcall - | _ -> PInvokeCallConvWinapi; - PInvokeCharEncoding= - match decoder.FindInt32 "CharSet" 0 with - | 1 -> PInvokeEncodingNone - | 2 -> PInvokeEncodingAnsi - | 3 -> PInvokeEncodingUnicode - | 4 -> PInvokeEncodingAuto - | _ -> PInvokeEncodingNone; - pinvokeNoMangle= decoder.FindBool "ExactSpelling" false; - pinvokeLastErr= decoder.FindBool "SetLastError" false; - PInvokeThrowOnUnmappableChar= if (decoder.FindBool "ThrowOnUnmappableChar" false) then PInvokeThrowOnUnmappableCharEnabled else PInvokeThrowOnUnmappableCharUseAssem; - PInvokeCharBestFit=if (decoder.FindBool "BestFitMapping" false) then PInvokeBestFitEnabled else PInvokeBestFitUseAssem } - - -and GenBindings cenv cgbuf eenv binds = FlatList.iter (GenBind cenv cgbuf eenv) binds - -//------------------------------------------------------------------------- -// Generate locals and other storage of values -//------------------------------------------------------------------------- - -and GenSetVal cenv cgbuf eenv (vref,e,m) sequel = - if verbose then dprintn ("GenSetVal"); - let storage = storage_for_vref m vref eenv - match storage with - | Env (ilCloTypeSpec,i,localCloInfo) -> - CG.EmitInstr cgbuf [Push (Type_boxed ilCloTypeSpec) ] ldarg_0; - | _ -> - () - GenExpr cenv cgbuf eenv SPSuppress e Continue; - GenSetStorage cenv vref.Range cgbuf storage - GenUnitThenSequel cenv eenv.cloc cgbuf sequel - -and GenGetValRefAndSequel cenv cgbuf eenv m (v:ValRef) fetch_sequel = - let ty = v.Type - GenGetStorageAndSequel cenv cgbuf eenv m (ty, GenType m cenv.g eenv.tyenv ty) (storage_for_vref m v eenv) fetch_sequel - -and GenGetVal cenv cgbuf eenv (v:ValRef,m) sequel = - GenGetValRefAndSequel cenv cgbuf eenv m v None; - GenSequel cenv eenv.cloc cgbuf sequel - -and GenBindRhs cenv cgbuf eenv sp (vspec:Val) e = - match e with - | TExpr_tlambda _ | TExpr_lambda _ -> - let isLocalTypeFunc = IsNamedLocalTypeFuncVal cenv.g vspec e - let selfv = if isLocalTypeFunc then None else Some (mk_local_vref vspec) - GenLambda cenv cgbuf eenv isLocalTypeFunc selfv e Continue - | _ -> - GenExpr cenv cgbuf eenv sp e Continue; - -and GenSetBindValue cenv cgbuf eenv eenv2 (vspec:Val) e = - GenBindRhs cenv cgbuf eenv2 SPSuppress vspec e; - GenStoreVal cenv cgbuf eenv vspec.Range vspec - -and EmitInitLocal cgbuf typ idx = CG.EmitInstrs cgbuf [] [I_ldloca (uint16 idx); (I_initobj typ) ] -and EmitSetLocal cgbuf idx = CG.EmitInstr cgbuf [Pop] (I_stloc (uint16 idx)) -and EmitGetLocal cgbuf typ idx = CG.EmitInstr cgbuf [Push typ] (I_ldloc (uint16 idx)) -and EmitSetStaticField cgbuf fspec = CG.EmitInstr cgbuf [Pop] (mk_normal_stsfld fspec) -and EmitGetStaticFieldAddr cgbuf typ fspec = CG.EmitInstr cgbuf [Push typ] (I_ldsflda fspec) -and EmitGetStaticField cgbuf typ fspec = CG.EmitInstr cgbuf [Push typ] (mk_normal_ldsfld fspec) - -and GenSetStorage cenv m cgbuf storage = - if verbose then dprintn ("GenSetStorage"); - match storage with - | Local (idx,_) -> EmitSetLocal cgbuf idx - | StaticField (fspec,vref,hasLiteralAttr,tspec,_,_,_,_,ilSetterMethRef,optShadowLocal) -> - if hasLiteralAttr then errorR(Error("Literal fields may not be set",m)); - CG.EmitInstr cgbuf [Pop] (I_call(Normalcall,mk_mref_mspec_in_typ(ilSetterMethRef,mk_typ AsObject tspec,[]),None)) - | Method (_,_,mspec,m,_,_) -> - error(Error("GenSetStorage: "^mspec.Name^" was represented as a static method but was not an appropriate lambda expression",m)) - | Null -> CG.EmitInstr cgbuf [Pop] (i_pop) - | Arg _ -> error(Error("mutable variables may not escape their method",m)) - - | Env (_,i,localCloInfo) -> - // Note: ldarg0 has already been emitted in GenSetVal - CG.EmitInstr cgbuf [Pop;Pop] (mk_IlxInstr (EI_stenv i)); - - | Unrealized -> error(Error("compiler error: unexpected unrealized value",m)) - -and CommitGetStorageSequel cenv cgbuf eenv m typ localCloInfo storeSequel = - if verbose then dprintn ("CommitGetStorageSequel"); - match localCloInfo,storeSequel with - | Some {contents =NamedLocalIlxClosureInfoGenerator cloinfo},_ -> error(InternalError("Unexpected generator",m)) - | Some {contents =NamedLocalIlxClosureInfoGenerated cloinfo},Some (tyargs,args,m,sequel) when nonNil tyargs -> - let actual_rty = GenNamedLocalTyFuncCall cenv cgbuf eenv typ cloinfo tyargs m; - CommitGetStorageSequel cenv cgbuf eenv m actual_rty None (Some ([],args,m,sequel)) - | _, None -> - (if verbose then dprintn ("CommitGetStorageSequel: None"); - ()) - | _,Some ([],[],m,sequel) -> - GenSequel cenv eenv.cloc cgbuf sequel - | _,Some (tyargs,args,m,sequel) -> - GenIndirectCall cenv cgbuf eenv (typ,tyargs,args,m) sequel - -and GenGetStorageAndSequel cenv cgbuf eenv m (typ,ilTy) storage storeSequel = - if verbose then dprintn ("GenGetStorageAndSequel:"); - match storage with - | Local (idx,localCloInfo) -> - if verbose then dprintn ("GenGetStorageAndSequel: Local..."); - EmitGetLocal cgbuf ilTy idx; - CommitGetStorageSequel cenv cgbuf eenv m typ localCloInfo storeSequel - - | StaticField (fspec,vref,hasLiteralAttr,ilTypeSpecForProperty,fieldName,_,_,ilGetterMethRef,_,_) -> - if verbose then dprintn ("GenGetStorageAndSequel: StaticField..."); - // References to literals go directly to the field - no property is used - if hasLiteralAttr then - EmitGetStaticField cgbuf ilTy fspec - else - CG.EmitInstr cgbuf [Push ilTy] (I_call(Normalcall,mk_mref_mspec_in_typ(ilGetterMethRef,mk_typ AsObject ilTypeSpecForProperty,[]),None)); - CommitGetStorageSequel cenv cgbuf eenv m typ None storeSequel - - | Method (topValInfo,vref,mspec,_,_,_) -> - // Get a toplevel value as a first-class value. - // We generate a lambda expression and that simply calls - // the toplevel method. However we optimize the case where we are - // immediately applying the value anyway (to insufficient arguments). - - // First build a lambda expression for the saturated use of the toplevel value... - // REVIEW: we should NOT be doing this in the backend... - if verbose then dprintn ("GenGetStorageAndSequel: Method..."); - let expr,exprty = AdjustValForExpectedArity cenv.g m vref NormalValUse topValInfo - - // Then reduce out any arguments (i.e. apply the sequel immediately if we can...) - match storeSequel with - | None -> GenLambda cenv cgbuf eenv false None expr Continue - | Some (tyargs',args,m,sequel) -> - let specialized_expr = - if verbose && tyargs' <> [] then dprintn ("creating type-specialized lambda at use of method "^mspec.Name); - if verbose && args <> [] then dprintf "creating term-specialized lambda at use of method %s\n--> expr = %s\n--> exprty = %s\n--> #args = %d\n" mspec.Name (showL (ExprL expr)) (showL (typeL exprty)) (List.length args); - if isNil args && isNil tyargs' then failwith ("non-lambda at use of method "^mspec.Name); - MakeApplicationAndBetaReduce cenv.g (expr,exprty,[tyargs'],args,m) - GenExpr cenv cgbuf eenv SPSuppress specialized_expr sequel - - | Null -> - CG.EmitInstr cgbuf [Push ilTy] (i_ldnull); - CommitGetStorageSequel cenv cgbuf eenv m typ None storeSequel - - | Unrealized -> - error(InternalError(sprintf "getting an unrealized value of type '%s'" (showL(typeL typ)),m)); - - | Arg i -> - CG.EmitInstr cgbuf [Push ilTy] (I_ldarg (uint16 i)); - CommitGetStorageSequel cenv cgbuf eenv m typ None storeSequel - - | Env (_,i,localCloInfo) -> - // Note: ldarg 0 is emitted in 'cu_erase' erasure of the ldenv instruction - CG.EmitInstr cgbuf [Push ilTy] (mk_IlxInstr (EI_ldenv i)); - CommitGetStorageSequel cenv cgbuf eenv m typ localCloInfo storeSequel - -and GenGetLocalVals cenv cgbuf eenvouter m fvs = - List.iter (fun v -> GenGetLocalVal cenv cgbuf eenvouter m v None) fvs; - -and GenGetLocalVal cenv cgbuf eenv m (vspec:Val) fetch_sequel = - GenGetStorageAndSequel cenv cgbuf eenv m (vspec.Type, GenTypeOfVal cenv eenv vspec) (storage_for_val m vspec eenv) fetch_sequel - -and GenGetLocalVRef cenv cgbuf eenv m (vref:ValRef) fetch_sequel = - GenGetStorageAndSequel cenv cgbuf eenv m (vref.Type, GenTypeOfVal cenv eenv (deref_val vref)) (storage_for_vref m vref eenv) fetch_sequel - -and GenStoreVal cenv cgbuf eenv m (vspec:Val) = - GenSetStorage cenv vspec.Range cgbuf (storage_for_val m vspec eenv) - -//and gen_begin_end - -//-------------------------------------------------------------------------- -// Allocate locals for values -//-------------------------------------------------------------------------- - -and AllocLocal cenv cgbuf eenv compgen (v,ty) (scopeMarks : mark * mark) = - // The debug range for the local - let ranges = if compgen then [] else [(v,scopeMarks)] - // Get an index for the local - let j = - if cenv.localOptimizationsAreOn - then cgbuf.ReallocLocal((fun i (_,ty') -> not (Imap.mem i eenv.liveLocals) && (ty = ty')),ranges,ty) - else cgbuf.AllocLocal(ranges,ty) - j, { eenv with liveLocals = Imap.add j () eenv.liveLocals } - -and AllocLocalVal cenv cgbuf v eenv repr scopeMarks = - let repr,eenv = - let ty = v.Type - if is_unit_typ cenv.g ty && not v.IsMutable then Null,eenv - elif isSome repr && IsNamedLocalTypeFuncVal cenv.g v (the repr) then - (* known, named, non-escaping type functions *) - let cloinfoGenerate eenv = - let eenvinner = - {eenv with - letBoundVars=(mk_local_vref v)::eenv.letBoundVars} - let cloinfo,_,_ = GetIlxClosureInfo cenv v.Range true None eenvinner (the repr) - cloinfo - - let idx,eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.MangledName, cenv.g.ilg.typ_Object) scopeMarks - Local (idx,Some(ref (NamedLocalIlxClosureInfoGenerator cloinfoGenerate))),eenv - else - (* normal local *) - let idx,eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.MangledName, GenTypeOfVal cenv eenv v) scopeMarks - Local (idx,None),eenv - Some repr,AddStorageForVal cenv.g (v,notlazy repr) eenv - -and AllocStorageForBind cenv cgbuf scopeMarks eenv bind = - AllocStorageForBinds cenv cgbuf scopeMarks eenv (FlatList.one bind) - - -and AllocStorageForBinds cenv cgbuf scopeMarks eenv binds = - // phase 1 - decicde representations - most are very simple. - let reps, eenv = FlatList.mapfold (AllocValForBind cenv cgbuf scopeMarks) eenv binds - - // Phase 2 - run the cloinfo generators for NamedLocalClosure values against the environment recording the - // representation choices. - reps |> FlatList.iter (fun reprOpt -> - match reprOpt with - | Some repr -> - match repr with - | Local(_,Some g) - | Env(_,_,Some g) -> - match !g with - | NamedLocalIlxClosureInfoGenerator f -> g := NamedLocalIlxClosureInfoGenerated (f eenv) - | NamedLocalIlxClosureInfoGenerated _ -> () - | _ -> () - | _ -> ()); - - eenv - -and AllocValForBind cenv cgbuf (scopeMarks:mark*mark) eenv (TBind(v,repr,_)) = - match v.TopValInfo with - | None -> - AllocLocalVal cenv cgbuf v eenv (Some repr) scopeMarks - | Some _ -> - None,AllocTopValWithinExpr cenv cgbuf eenv.cloc scopeMarks v eenv - - -and AllocTopValWithinExpr cenv cgbuf cloc scopeMarks v eenv = - // decide whether to use a shadow local or not - let useShadowLocal = - cenv.debug && - not cenv.localOptimizationsAreOn && - not v.IsCompilerGenerated && - not v.IsMutable && - IsCompiledAsStaticValue cenv.g v - - let optShadowLocal,eenv = - if useShadowLocal then - let storageOpt, eenv = AllocLocalVal cenv cgbuf v eenv None scopeMarks - match storageOpt with - | None -> NoShadowLocal,eenv - | Some storage -> ShadowLocal storage,eenv - - else - NoShadowLocal,eenv - - ComputeAndAddStorageForLocalTopVal cenv.g cloc optShadowLocal v eenv - - - -//-------------------------------------------------------------------------- -// Generate stack save/restore and assertions - pulled into letrec by alloc* -//-------------------------------------------------------------------------- - -/// Save the stack -/// - [gross] because IL flushes the stack at the exn. handler -/// - and because IL requires empty stack following a forward br (jump). -and EmitSaveStack cenv cgbuf eenv m scopeMarks = - if verbose then dprintn ("gen_save_stack"); - let stack_saved = (cgbuf.GetCurrentStack()) - let where_stack_saved,eenvinner = List.mapfold (fun eenv ty -> AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("spill",m), ty) scopeMarks) eenv stack_saved - List.iter (EmitSetLocal cgbuf) where_stack_saved; - cgbuf.AssertEmptyStack(); - (stack_saved,where_stack_saved),eenvinner (* need to return, it marks locals "live" *) - -/// Restore the stack and load the result -and EmitRestoreStack cenv cgbuf (stack_saved,where_stack_saved) = - cgbuf.AssertEmptyStack(); - List.iter2 (EmitGetLocal cgbuf) (List.rev stack_saved) (List.rev where_stack_saved) - -//------------------------------------------------------------------------- -//GenAttr: custom attribute generation -//------------------------------------------------------------------------- - -and GenAttribArg cenv eenv x (ilArgTy:ILType) = - - match x,ilArgTy with - - (* Detect standard constants *) - | TExpr_const(c,m,_),_ -> - let tynm = ilArgTy.TypeSpec.Name - let isobj = (tynm = "System.Object") - - match c with - | TConst_bool b -> CustomElem_bool b - | TConst_int32 i when isobj || tynm = "System.Int32" -> CustomElem_int32 ( i) - | TConst_int32 i when tynm = "System.SByte" -> CustomElem_int8 (sbyte i) - | TConst_int32 i when tynm = "System.Int16" -> CustomElem_int16 (int16 i) - | TConst_int32 i when tynm = "System.Byte" -> CustomElem_uint8 (byte i) - | TConst_int32 i when tynm = "System.UInt16" ->CustomElem_uint16 (uint16 i) - | TConst_int32 i when tynm = "System.UInt32" ->CustomElem_uint32 (uint32 i) - | TConst_int32 i when tynm = "System.UInt64" ->CustomElem_uint64 (uint64 (int64 i)) - | TConst_sbyte i -> CustomElem_int8 i - | TConst_int16 i -> CustomElem_int16 i - | TConst_int32 i -> CustomElem_int32 i - | TConst_int64 i -> CustomElem_int64 i - | TConst_byte i -> CustomElem_uint8 i - | TConst_uint16 i -> CustomElem_uint16 i - | TConst_uint32 i -> CustomElem_uint32 i - | TConst_uint64 i -> CustomElem_uint64 i - | TConst_float i -> CustomElem_float64 i - | TConst_float32 i -> CustomElem_float32 i - | TConst_char i -> CustomElem_char i - | TConst_zero when tynm = "System.String" -> CustomElem_string None - | TConst_string i when isobj || tynm = "System.String" -> CustomElem_string (Some(i)) - | _ -> error (InternalError ( "The type '"^tynm^"' may not be used as a custom attribute value",m)) - - // Detect '[| ... |]' nodes - | TExpr_op(TOp_array,[elemTy],args,m),Type_array _ -> - let ilElemTy = GenType m cenv.g eenv.tyenv elemTy - CustomElem_array (List.map (fun arg -> GenAttribArg cenv eenv arg ilElemTy) args) - - // Detect 'typeof' calls - | TExpr_app(TExpr_val(vref,_,_),_,[ty],[],m),_ when is_typeof_vref cenv.g vref -> - CustomElem_type (GenType m cenv.g eenv.tyenv ty) - - // Detect 'typedefof' calls - | TExpr_app(TExpr_val(vref,_,_),_,[ty],[],m),_ when is_typedefof_vref cenv.g vref -> - CustomElem_tref ((GenType m cenv.g eenv.tyenv ty).TypeRef) - - // Ignore upcasts - | TExpr_op(TOp_coerce,_,[arg2],_),_ -> - GenAttribArg cenv eenv arg2 ilArgTy - - // Detect explicit enum values - | TExpr_app(TExpr_val(vref,_,_),_,_,[arg1],_),_ when cenv.g.vref_eq vref cenv.g.enum_vref -> - GenAttribArg cenv eenv arg1 ilArgTy - - - // Detect bitwise or of attribute flags: one case of constant folding (a more general treatment is needed) - - | BitwiseOr cenv.g (arg1,arg2),_ -> - let v1 = GenAttribArg cenv eenv arg1 ilArgTy - let v2 = GenAttribArg cenv eenv arg2 ilArgTy - match v1,v2 with - | CustomElem_int8 i1, CustomElem_int8 i2 -> CustomElem_int8 (i1 ||| i2) - | CustomElem_int16 i1, CustomElem_int16 i2-> CustomElem_int16 (i1 ||| i2) - | CustomElem_int32 i1, CustomElem_int32 i2-> CustomElem_int32 (i1 ||| i2) - | CustomElem_int64 i1, CustomElem_int64 i2-> CustomElem_int64 (i1 ||| i2) - | CustomElem_uint8 i1, CustomElem_uint8 i2-> CustomElem_uint8 (i1 ||| i2) - | CustomElem_uint16 i1, CustomElem_uint16 i2-> CustomElem_uint16 (i1 ||| i2) - | CustomElem_uint32 i1, CustomElem_uint32 i2-> CustomElem_uint32 (i1 ||| i2) - | CustomElem_uint64 i1, CustomElem_uint64 i2-> CustomElem_uint64 (i1 ||| i2) - | _ -> error (InternalError ("invalid custom attribute value (not a valid constant): "^showL (ExprL x),range_of_expr x)) - - // Other expressions are not valid custom attribute values - | _ -> - error (InternalError ("invalid custom attribute value (not a constant): "^showL (ExprL x),range_of_expr x)) - - -and GenAttr cenv eenv (Attrib(_,k,args,props,m)) = - let props = - props |> List.map (fun (AttribNamedArg(s,ty,fld,AttribExpr(_,expr))) -> - let m = (range_of_expr expr) - let il_ty = GenType m cenv.g eenv.tyenv ty - let cval = GenAttribArg cenv eenv expr il_ty - (s,il_ty,fld,cval)) - let mspec = - match k with - | ILAttrib(mref) -> mk_mspec(mref,AsObject,[],[]) - | FSAttrib(vref) -> - assert(vref.IsMember); - let mspec,_,_,_,_ = GetMethodSpecForMemberVal cenv.g (the vref.MemberInfo) vref - mspec - let ilArgs = List.map2 (fun (AttribExpr(_,vexpr)) ty -> GenAttribArg cenv eenv vexpr ty) args mspec.FormalArgTypes - mk_custom_attribute_mref cenv.g.ilg (mspec,ilArgs, props) - -and GenAttrs cenv eenv attrs = List.map (GenAttr cenv eenv) attrs - -//-------------------------------------------------------------------------- -// Generate the set of modules for an assembly, and the declarations in each module -//-------------------------------------------------------------------------- - -and GenTypeDefForCompLoc cenv eenv (mgbuf: AssemblyBuilder) cloc hidden attribs = - let tref = TypeRefForCompLoc cloc - let tdef = - mk_simple_tdef cenv.g.ilg - (tref.Name, - ComputeTypeAccess tref hidden, - mk_mdefs [], - mk_fdefs [], - mk_properties [], - mk_events [], - mk_custom_attrs - (GenAttrs cenv eenv attribs @ - (if List.mem tref.Name [TypeNameForStatupCode cloc; TypeNameForPrivateImplementationDetails cloc] - then [ (* mk_CompilerGeneratedAttribute *) ] - else [mk_CompilationMappingAttr cenv.g SourceLevelConstruct_Module]))) - let tdef = { tdef with tdSealed=true; tdAbstract=true } - mgbuf.AddTypeDef(tref,tdef) - - -and GenModuleExpr cenv cgbuf qname lazyInitInfo eenv cloc x = - let (TMTyped(mty,def,m)) = x - // REVIEW: the scopeMarks are used for any shadow locals we create for the module bindings - // We use one scope for all the bindings in the module, which makes them all appear with their "default" values - // rather than incrementally as we step through the initializations in the module. This is a little unfortunate - // but stems from the way we add module values all at once before we generate the module itself. - LocalScope "module" cgbuf (fun scopeMarks -> - let sigToImplRemapInfo = mk_mdef_to_mtyp_remapping def mty - let eenv = AddSignatureRemapInfo "defs" sigToImplRemapInfo eenv - let eenv = - // Allocate all the values, including any shadow locals for static fields - let allocVal cloc v = AllocTopValWithinExpr cenv cgbuf cloc scopeMarks v - AddBindingsForModuleDef allocVal eenv.cloc eenv def - GenModuleDef cenv cgbuf qname lazyInitInfo eenv def) - -and GenModuleDefs cenv cgbuf qname lazyInitInfo eenv mdefs = - List.iter (GenModuleDef cenv cgbuf qname lazyInitInfo eenv) mdefs - -and GenModuleDef cenv (cgbuf:CodeGenBuffer) qname lazyInitInfo eenv x = - - - if verbose then dprintf "GenModuleDef, tspec(cloc) = %A\n" (TypeSpecForCompLoc eenv.cloc); - match x with - | TMDefRec(tycons,binds,mbinds,m) -> - tycons |> List.iter (fun tc -> - if tc.IsExceptionDecl - then GenExnDef cenv cgbuf.mgbuf eenv m tc - else GenTypeDef cenv cgbuf.mgbuf lazyInitInfo eenv m tc) ; - GenLetRecBinds cenv cgbuf eenv (binds,m); - mbinds |> List.iter (GenModuleBinding cenv cgbuf qname lazyInitInfo eenv) - - | TMDefLet(bind,m) -> - GenBindings cenv cgbuf eenv (FlatList.one bind) - - | TMDefDo(e,m) -> - GenExpr cenv cgbuf eenv SPAlways e discard; - - | TMAbstract(mexpr) -> - GenModuleExpr cenv cgbuf qname lazyInitInfo eenv eenv.cloc mexpr - - | TMDefs(mdefs) -> - GenModuleDefs cenv cgbuf qname lazyInitInfo eenv mdefs - - -// Generate a module binding -and GenModuleBinding cenv (cgbuf:CodeGenBuffer) (qname:QualifiedNameOfFile) lazyInitInfo eenv (TMBind(mspec, mdef)) = - let hidden = IsHiddenTycon eenv.sigToImplRemapInfo mspec - - let eenvinner = - if mspec.IsNamespace then eenv else - {eenv with cloc = CompLocForFixedModule cenv.fragName qname.Text mspec } - - // Create the class to hold the contents of this module. No class needed if - // we're compiling it as a namespace - if not mspec.IsNamespace then - GenTypeDefForCompLoc cenv eenvinner cgbuf.mgbuf eenvinner.cloc hidden mspec.Attribs; - GenModuleDef cenv cgbuf qname lazyInitInfo eenvinner mdef; - - // Generate the declarations in the module and its initialization code - - // Most module fields go into the startup code. If there are no fields we don't need a .cctor. - // However modules with mutable values contain public mutable - // static fields. In this case we need to ensure that if those fields are "touched" then the outer constructor - // is forced. The outer constructor will fill ni the value of the field. - if not mspec.IsNamespace && (cgbuf.mgbuf.GetCurrentFields(TypeRefForCompLoc eenvinner.cloc) |> Seq.is_empty |> not) then - GenForceOuterInitializationAsPartOfCCtor cenv cgbuf.mgbuf lazyInitInfo (TypeRefForCompLoc eenvinner.cloc) mspec.Range; - - -// Generate an entire file -and GenTopImpl cenv mgbuf mainInfo eenv (TImplFile(qname,_,mexpr) as impl) = - let fragName = qname.Text - if verbose then dprintf "-----------------------------------------------------------------------------\ngen_top_impl %s\n" fragName; - let eenv = {eenv with cloc = { eenv.cloc with clocTopImplQualifiedName = qname.Text } } - - // This is used to point the inner classes back to the startup module for initialization purposes - let clocStartup = CompLocForStartupCode eenv.cloc - let startupTspec = mk_nongeneric_tspec (TypeRefForCompLoc clocStartup) - - // Create the class to hold the initialization code and static fields for this file. - GenTypeDefForCompLoc cenv eenv mgbuf clocStartup true []; - - let eenv = {eenv with cloc = clocStartup; - someTspecInThisModule=mk_nongeneric_tspec (TypeRefForCompLoc clocStartup) } - - let createStaticInitializerFieldInStartupClass() = - let initFieldName = CompilerGeneratedName "init" - let fieldDef = - mk_static_fdef (initFieldName,cenv.g.ilg.typ_Int32, None, None, ComputeMemberAccess true true) - |> add_fdef_never_attrs cenv.g.ilg - |> add_fdef_generated_attrs cenv.g.ilg - - let fspec = mk_fspec_in_boxed_tspec (startupTspec, initFieldName, cenv. g.ilg.typ_Int32) - CountStaticFieldDef(); - mgbuf.AddFieldDef(startupTspec.TypeRef,fieldDef); - fspec - - let lazyInitInfo = - match mainInfo with - | Some _ -> None - | None -> - // We keep an accumulator of the fragments needed to force the initialization semantics through the compiled code. - // These fragments only get executed/committed if we actually end up producing some code for the .cctor. - // NOTE: The existence of .cctors adds costs to execution so this is a half-sensible attempt to avoid adding them when possible. - let initSemanticsAcc = ref [] - let fspec = createStaticInitializerFieldInStartupClass() - (*initSemanticsAcc := addCCtor :: !initSemanticsAcc; *) - Some(fspec,initSemanticsAcc) - - if verbose then dprintn ("gen_top_impl_expr: codegen .cctor/main for outer module"); - let m = qname.Range - let clocCcu = (CompLocForCcu cenv.viewCcu) - let methodName = match mainInfo with None -> ".cctor" | _ -> mainMethName - let topCode = CodeGenMethod cenv mgbuf (true,[],methodName,eenv,0,0,(fun cgbuf eenv -> - GenModuleExpr cenv cgbuf qname lazyInitInfo eenv clocCcu mexpr; - CG.EmitInstr cgbuf [] I_ret),m) - - // Make a .cctor method to run the top level bindings. This initializes all modules. - if verbose then dprintn ("Creating .cctor/main for outer module"); - let initmeths = - - match mainInfo, lazyInitInfo with - - | Some (main_attrs), None -> - - // Generate an explicit main method. If necessary, make a class constructor as - // well for the bindings earlier in the file containing the entrypoint. - match mgbuf.GetExplicitEntryPointInfo() with - | Some(tref) -> - if (CheckCodeDoesSomething topCode.ilCode) then - let fspec = createStaticInitializerFieldInStartupClass() - mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.mdEntrypoint),tref,fspec,GenPossibleILSourceMarker cenv m); - [ mk_cctor (MethodBody_il topCode) ] - else - [] - - // Generate an implicit main method - | None -> - - let ilAttrs = mk_custom_attrs (GenAttrs cenv eenv main_attrs) - if not cenv.emptyProgramOk && not (CheckCodeDoesSomething topCode.ilCode) then - let errorM = mk_range (file_of_range m) (end_of_range m) (end_of_range m) - warning (Error("Main module of program is empty: nothing will happen when it is run", errorM)); - let mdef = mk_static_nongeneric_mdef(mainMethName,ComputePublicMemberAccess true,[],mk_return Type_void, MethodBody_il topCode) - [ {mdef with mdEntrypoint= true; mdCustomAttrs = ilAttrs } ] - - // Generate an on-demand .cctor for the file - | None, Some(fspec, initSemanticsAcc) -> - - if (CheckCodeDoesSomething topCode.ilCode) then - // Run the imperative (yuck!) actions that force the generation - // of references to the cctor for nested modules etc. - (List.rev !initSemanticsAcc) |> List.iter (fun f -> f()); - - // Return the generated cctor - [ mk_cctor (MethodBody_il topCode) ] - else - [] - - | _ -> failwith "unreachable" - - initmeths |> List.iter (fun mdef -> mgbuf.AddMethodDef(TypeRefForCompLoc clocStartup,mdef)) ; - - // Compute the ilxgenEnv after the generation of the module, i.e. the residue need to generate anything that - // uses the constructs exported from this module. - // We add the module type all over again. Note no shadow locals for static fields needed here since they are only relevant to the main/.cctor - let eenvafter = - let allocVal cloc v = ComputeAndAddStorageForLocalTopVal cenv.g cloc NoShadowLocal v - AddBindingsForLocalModuleType allocVal clocCcu eenv (mtyp_of_mexpr mexpr) - - eenvafter - -and GenForceOuterInitializationAsPartOfCCtor cenv (mgbuf:AssemblyBuilder) lazyInitInfo tref m = - // Authoring a .cctor with effects forces the cctor for the 'initialization' module by doing a dummy store & load of a field - // Doing both a store and load keeps FxCop happier because it thinks the field is useful - match lazyInitInfo with - | Some (fspec,initSemanticsAcc) -> - initSemanticsAcc := (fun () -> mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.mdName = ".cctor"),tref,fspec,GenPossibleILSourceMarker cenv m)) :: !initSemanticsAcc - | None -> () - - -/// Generate an Equals method. -and GenEqualsOverrideCallingIComparable cenv mgbuf eenv m (this_tcref,this_ilty,that_ilty) = - let mspec = mk_nongeneric_instance_mspec_in_typ (cenv.g.ilg.typ_IComparable, "CompareTo", [cenv.g.ilg.typ_Object], cenv.g.ilg.typ_int32) - - mk_virtual_mdef - ("Equals",MemAccess_public, - [mk_named_param ("obj",cenv.g.ilg.typ_Object)], - mk_return cenv.g.ilg.typ_bool, - MethodBody_il - (mk_ilmbody(true,[],2, - nonbranching_instrs_to_code - [ yield ldarg_0; - yield I_ldarg 1us; - if is_struct_tcref this_tcref then - yield I_callconstraint ( Normalcall, this_ilty,mspec,None) - else - yield I_callvirt ( Normalcall, mspec,None) - yield mk_ldc_i32 (0) - yield I_arith AI_ceq ], - None))) - |> AddNonUserCompilerGeneratedAttribs cenv.g - -/// Generate a GetHashCode method. -and GenHashOverride cenv mgbuf eenv m this_tcref this_ilty = - let icomparer_iltref = (cenv.g.tcref_System_Collections_IComparer).CompiledRepresentationForTyrepNamed - let icomparer_ilt = mk_boxed_typ (icomparer_iltref) [] - let iequalitycomparer_iltref = (cenv.g.tcref_System_Collections_IEqualityComparer).CompiledRepresentationForTyrepNamed - let iequalitycomparer_ilt = mk_boxed_typ (iequalitycomparer_iltref) [] - let langprim_iltref = (cenv.g.tcref_LanguagePrimitives).CompiledRepresentationForTyrepNamed - let langprim_ilt = mk_boxed_typ (langprim_iltref) [] - let mspec_getComparer = mk_static_nongeneric_mspec_in_typ (langprim_ilt,"FSharpEqualityComparer",[],iequalitycomparer_ilt) - let mspec_IStructuralEquatable_GetHashCode = mk_nongeneric_instance_mspec_in_typ(this_ilty,"GetHashCode",[iequalitycomparer_ilt],cenv.g.ilg.typ_Int32) - mk_virtual_mdef - ("GetHashCode",MemAccess_public,[], - mk_return cenv.g.ilg.typ_int32, - MethodBody_il - (mk_ilmbody(true,[],2, - nonbranching_instrs_to_code - [ yield ldarg_0 - yield I_call (Normalcall, mspec_getComparer, None) - yield I_call (Normalcall, mspec_IStructuralEquatable_GetHashCode, None) ], - None))) - |> AddNonUserCompilerGeneratedAttribs cenv.g - - -and GenFieldInit m c = - match c with - | TConst_sbyte n -> FieldInit_int8 n - | TConst_int16 n -> FieldInit_int16 n - | TConst_int32 n -> FieldInit_int32 n - | TConst_int64 n -> FieldInit_int64 n - | TConst_byte n -> FieldInit_uint8 n - | TConst_uint16 n -> FieldInit_uint16 n - | TConst_uint32 n -> FieldInit_uint32 n - | TConst_uint64 n -> FieldInit_uint64 n - | TConst_bool n -> FieldInit_bool n - | TConst_char n -> FieldInit_char (uint16 n) - | TConst_float32 n -> FieldInit_single n - | TConst_float n -> FieldInit_double n - | TConst_string s -> FieldInit_string s - | TConst_zero -> FieldInit_ref - | _ -> error(Error("This type may not be used for a literal field",m)) - - -and GenAbstractBinding cenv eenv mgbuf tref (vref:ValRef) = - assert(vref.IsMember); - let m = vref.Range - let memberInfo = (the (vref.MemberInfo)) - let attribs = vref.Attribs - if memberInfo.MemberFlags.MemberIsDispatchSlot && not memberInfo.IsImplemented then - let ilAttrs = GenAttrs cenv eenv attribs - - let mspec,ctps,mtps,argInfos,retInfo = GetMethodSpecForMemberVal cenv.g memberInfo vref - let eenvForMeth = env_for_typars (ctps@mtps) eenv - let ilMethTypars = GenGenericParams m cenv eenvForMeth.tyenv mtps - let ilReturn = GenReturnInfo cenv eenvForMeth mspec.FormalReturnType retInfo - let ilParams = GenParams cenv eenvForMeth mspec argInfos None - let compileAsInstance = ValRefIsCompiledAsInstanceMember cenv.g vref - let mdef = mk_generic_virtual_mdef (memberInfo.CompiledName,ComputePublicMemberAccess false,ilMethTypars,ilParams,ilReturn,MethodBody_abstract) - let mdef = fixupVirtualSlotFlags mdef - let mdef = - {mdef with - mdKind=match mdef.mdKind with - | MethodKind_virtual vinfo -> - MethodKind_virtual {vinfo with virtFinal=memberInfo.MemberFlags.MemberIsFinal; - virtAbstract=memberInfo.MemberFlags.MemberIsDispatchSlot; } - | k -> k } - - match memberInfo.MemberFlags.MemberKind with - | MemberKindClassConstructor - | MemberKindConstructor - | MemberKindMember -> - let mdef = {mdef with mdCustomAttrs= mk_custom_attrs ilAttrs } - [mdef], [], [] - | MemberKindPropertyGetSet -> error(Error("Unexpected GetSet annotation on a property",m)); - | MemberKindPropertySet | MemberKindPropertyGet -> - let v = deref_val vref - let vtyp = ReturnTypeOfPropertyVal cenv.g v - if CompileAsEvent cenv.g attribs then - - let edef = GenEventForProperty cenv eenvForMeth mspec memberInfo ilAttrs m vtyp - [],[],[edef] - else - let ilPropertyDef = - let ilPropTy = GenType m cenv.g eenvForMeth.tyenv vtyp - let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes m cenv.g eenvForMeth.tyenv - GenPropertyForMethodDef cenv.g compileAsInstance tref mdef memberInfo ilArgTys ilPropTy (mk_custom_attrs ilAttrs) - let mdef = mdef |> AddSpecialNameFlag - [mdef], [ilPropertyDef],[] - - else - [],[],[] - -and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = - let tcref = mk_local_tcref tycon - if tycon.IsTypeAbbrev then () else - match tycon.TypeReprInfo with - | None -> () - | Some (TAsmRepr _ | TILObjModelRepr _ | TMeasureableRepr _) -> () - | Some (TFsObjModelRepr _ | TRecdRepr _ | TFiniteUnionRepr _) -> - let eenvinner = replace_tyenv (tyenv_for_tycon tycon) eenv - let _,thisTy = generalize_tcref tcref - let ilty = GenType m cenv.g eenvinner.tyenv thisTy - let tref = ilty.TypeRef - let tname = tref.Name - let hidden = IsHiddenTycon eenv.sigToImplRemapInfo tycon - let hiddenRepr = hidden or IsHiddenTyconRepr eenv.sigToImplRemapInfo tycon - let access = ComputeTypeAccess tref hidden - let gparams = GenGenericParams m cenv eenvinner.tyenv tycon.TyparsNoRange - let aug = tycon.TypeContents - let intfs = List.map (p13 >> GenType m cenv.g eenvinner.tyenv) aug.tcaug_implements - - let tcaug = tycon.TypeContents - - let augmentOverrideMethodDefs = - // The implicit augmentation doesn't actually create CompareTo(object) or Object.Equals - // So we do it here. - let specialCompareMethod = - - // Note you only have to implement 'System.IComparable' to customize structural comparison AND equality on F# types - // See also FinalTypeDefinitionChecksAtEndOfInferenceScope in tc.ml - - // Generate an Equals method implemented via IComparable if the type EXPLICITLY implements IComparable. - // HOWEVER, if the type doesn't override Object.Equals already. - (if isNone tcaug.tcaug_compare && - tcaug_has_interface cenv.g tcaug cenv.g.mk_IComparable_ty && - not (tcaug_has_override cenv.g tcaug "Equals" [cenv.g.obj_ty]) && - not tycon.IsFSharpInterfaceTycon - then - [ GenEqualsOverrideCallingIComparable cenv mgbuf eenv m (tcref,ilty,ilty) ] - else []) - - // The implicit augmentation doesn't actually create GetHashCode - let hashMethodDefs = - (if isSome tycon.TypeContents.tcaug_hash_and_equals_withc (* && not (tcref_alloc_observable tcref) *) && not tycon.TypeContents.tcaug_hasObjectGetHashCode - then [ GenHashOverride cenv mgbuf eenv m tcref ilty ] - else []) - - (specialCompareMethod @ hashMethodDefs) - // We can't reduce the accessibility because these implement virtual slots - (* |> List.map (fun md -> { md with mdAccess=memberAccess }) *) - - - // Generate the interface slots and abstract slots. - let abstractMethodDefs,abstractPropDefs, abstractEventDefs = - if tycon.IsFSharpDelegateTycon then - [],[],[] - else - // sort by order of declaration - tycon.TypeContents.tcaug_adhoc - |> NameMultiMap.range - |> List.sortWith (fun v1 v2 -> range_ord v1.DefinitionRange v2.DefinitionRange) - |> List.map (GenAbstractBinding cenv eenv mgbuf tref) - |> List.unzip3 - |> triple_map List.concat List.concat List.concat - - - let abstractPropDefs = abstractPropDefs |> merge_pdef_list m - let isAbstract = is_partially_implemented_tycon tycon - - // Generate all the method impls showing how various abstract slots and interface slots get implemented - // REVIEW: no method impl generated for IStructuralHash or ICompare - let methodImpls = - [ for vref in tycon.TypeContents.tcaug_adhoc |> NameMultiMap.range do - assert(vref.IsMember); - let memberInfo = vref.MemberInfo.Value - if memberInfo.MemberFlags.MemberIsOverrideOrExplicitImpl && not (CompileAsEvent cenv.g vref.Attribs) then - - for slotsig in memberInfo.ImplementedSlotSigs do - - if is_interface_typ cenv.g slotsig.ImplementedType then - - match vref.TopValInfo with - | Some arities -> - - let memberParentTypars,memberMethodTypars = - match PartitionValRefTypars cenv.g vref with - | Some(_,memberParentTypars,memberMethodTypars,_,_) -> memberParentTypars,memberMethodTypars - | None -> [],[] - - let shouldUseMethodImpl = true - let eenvUnderTypars = env_for_typars memberParentTypars eenv - let reallyUseMethodImpl,_,methodImplGenerator = GenMethodImpl cenv eenvUnderTypars (shouldUseMethodImpl,slotsig) m - if reallyUseMethodImpl then - yield methodImplGenerator (ilty.TypeSpec,memberMethodTypars) - - | _ -> () ] - - let defaultMemberAttrs = - tycon.TypeContents.tcaug_adhoc - |> NameMultiMap.range - |> List.tryPick (fun vref -> - let name = vref.DisplayName - match vref.MemberInfo with - | None -> None - | Some memberInfo -> - match name, memberInfo.MemberFlags.MemberKind with - | ("Item" | "op_IndexedLookup"), (MemberKindPropertyGet | MemberKindPropertySet) when nonNil (ArgInfosOfPropertyVal cenv.g (deref_val vref)) -> - Some( mk_custom_attribute cenv.g.ilg (mk_tref (cenv.g.ilg.mscorlib_scoref,"System.Reflection.DefaultMemberAttribute"),[cenv.g.ilg.typ_String],[CustomElem_string(Some(name))],[]) ) - | _ -> None) - |> Option.to_list - - let tyconRepr = tycon.TypeReprInfo - - // DebugDisplayAttribute gets copied to the subtypes generated as part of DU compilation - let debugDisplayAttrs,normalAttrs = tycon.Attribs |> List.partition (IsMatchingAttrib cenv.g cenv.g.attrib_DebuggerDisplayAttribute) - let generateDebugDisplayAttribute = not cenv.g.compilingFslib && tycon.IsUnionTycon && isNil debugDisplayAttrs - let generateDebugProxies = (not (tcref_eq cenv.g tcref cenv.g.unit_tcr_canon) && - not (HasAttrib cenv.g cenv.g.attrib_DebuggerTypeProxyAttribute tycon.Attribs)) - - - let ilDebugDisplayAttributes = - [ yield! GenAttrs cenv eenv debugDisplayAttrs - if generateDebugDisplayAttribute then - yield mk_DebuggerDisplayAttribute cenv.g.ilg ("{"^debugDisplayMethodName^"()}") ] - - - let tdCustomAttrs = - [ yield! defaultMemberAttrs - yield! normalAttrs - |> List.filter (IsMatchingAttrib cenv.g cenv.g.attrib_StructLayoutAttribute >> not) - |> GenAttrs cenv eenv - yield! ilDebugDisplayAttributes ] - - let reprAccess = ComputeMemberAccess true hiddenRepr - - - let tdKind = - match tyconRepr with - | Some (TFsObjModelRepr o) -> - match o.fsobjmodel_kind with - | TTyconClass -> TypeDef_class - | TTyconStruct -> TypeDef_valuetype - | TTyconInterface -> TypeDef_interface - | TTyconEnum -> TypeDef_enum - | TTyconDelegate _ -> TypeDef_delegate - - | _ -> TypeDef_class - - let isEmptyStruct = - (match tdKind with TypeDef_valuetype -> true | _ -> false) && - // All structs are sequential by default - // Structs with no instance fields get size 1, pack 0 - tycon.AllFieldsAsList |> List.exists (fun f -> not f.IsStatic) - - let requiresExtraField = - isEmptyStruct && cenv.workAroundReflectionEmitBugs && not tycon.TyparsNoRange.IsEmpty - - // Compute a bunch of useful thnigs for each field - let fieldSummaries = - [ for fspec in tycon.AllFieldsAsList do - - let useGenuineField = use_genuine_field tycon fspec - - // The property (or genuine IL field) is hidden in these circumstances: - // - secret fields apart from "__value" fields for enums - // - the representation of the type is hidden - // - the F# field is hidden by a signature or private declaration - let propHidden = - ((fspec.IsCompilerGenerated && not (is_enum_tycon tycon)) || - hiddenRepr || - IsHiddenRecdField eenv.sigToImplRemapInfo (rfref_of_rfield tcref fspec)) - let propType = GenType m cenv.g eenvinner.tyenv fspec.FormalType - let fldName = GenFieldName tycon fspec - - yield (useGenuineField,fldName,fspec.IsMutable, fspec.IsStatic, fspec.PropertyAttribs,propType,propHidden,fspec) ] - - // Generate the IL fields - let fieldDefs = - [ for (useGenuineField,fldName,mut,stat,_,propType,propHidden,fspec) in fieldSummaries do - - let literalValue = fspec.LiteralValue - - let fdOffset = - match TryFindAttrib cenv.g cenv.g.attrib_FieldOffsetAttribute fspec.FieldAttribs with - | Some (Attrib(_,_,[ AttribInt32Arg(fieldOffset) ],_,m)) -> - Some fieldOffset - | Some (Attrib(_,_,_,_,m)) -> - errorR(Error("The FieldOffset attribute could not be decoded",m)); - None - | _ -> - None - - let attribs = - [ // If using a field then all the attributes go on the field - // See also FSharp 1.0 Bug 4727: once we start compiling them as real mutable fields, you should not be able to target both "property" for "val mutable" fields in classes - - if useGenuineField then yield! fspec.PropertyAttribs - yield! fspec.FieldAttribs ] - let fattribs = - attribs - |> List.filter (IsMatchingAttrib cenv.g cenv.g.attrib_FieldOffsetAttribute >> not) - - - let fieldMarshal, fattribs = GenMarshal cenv fattribs - - let fdNotSerialized = HasAttrib cenv.g cenv.g.attrib_NonSerializedAttribute fattribs - - // The IL field is hidden if the property/field is hidden OR we're using a property AND the field is not mutable (because we can take the address of a mutable field). *) - // Otherwise fields are always accessed via their property getters/setters *) - let fdHidden = propHidden || (not useGenuineField && not mut) - - let extraAttribs = - match tyconRepr with - | Some (TRecdRepr _) when not useGenuineField -> [ mk_DebuggerBrowsableNeverAttribute cenv.g.ilg ] // hide fields in records in debug display - | _ -> [] // don't hide fields in classes in debug display - - yield - { fdName=fldName; - fdType=propType; - fdStatic=stat; - fdAccess=ComputeMemberAccess true fdHidden; - fdData=None; // REVIEW - fdInit= Option.map (GenFieldInit m) literalValue; - fdOffset=fdOffset; - fdSpecialName = (fldName="value__" && is_enum_tycon tycon); - fdMarshal=fieldMarshal - fdNotSerialized=fdNotSerialized; - fdInitOnly = false; // REVIEW - fdLiteral =isSome(literalValue); - fdCustomAttrs=mk_custom_attrs (GenAttrs cenv eenv fattribs @ extraAttribs) } - if requiresExtraField then - yield mk_instance_fdef("__dummy",cenv.g.ilg.typ_int32,None,MemAccess_assembly) ] - - // Generate property definitions for the fields compiled as properties - let propertyDefs = - [ for (i, (useGenuineField,fldName,mut,stat,propAttribs,propType,propHidden,fspec)) in markup fieldSummaries do - if not useGenuineField then - let cc = if stat then ILCallingConv.Static else ILCallingConv.Instance - let propName = fspec.Name - let fattrs = GenAttrs cenv eenv propAttribs @ [mk_CompilationMappingAttrWithSeqNum cenv.g SourceLevelConstruct_Field i] - yield - { propName=propName; - propRTSpecialName=false; - propSpecialName=false; - propSet=(if mut then Some(mk_mref(tref,cc,"set_"^propName,0,[propType],Type_void)) else None); - propGet=Some(mk_mref(tref,cc,"get_"^propName,0,[],propType)); - propCallconv=(if stat then CC_static else CC_instance); - propType=propType; - propInit=None; - propArgs=[]; - propCustomAttrs=mk_custom_attrs fattrs; } ] - - let methodDefs = - [ // Generate property getter methods for those fields that have properties - for (useGenuineField,fldName,_,stat,_,propType,propHidden,fspec) in fieldSummaries do - if not useGenuineField then - let propName = fspec.Name - let methnm = "get_"^propName - let access = ComputeMemberAccess true propHidden - yield mk_ldfld_method_def (methnm,access,stat,ilty,fldName,propType) - - // Generate property setter methods for the mutable fields - for (useGenuineField,fldName,mut,stat,_,propType,propHidden,fspec) in fieldSummaries do - if mut && not useGenuineField then - let propName = fspec.Name - let il_fspec = mk_fspec_in_typ(ilty,fldName,propType) - let methnm = "set_"^propName - let parms = [mk_named_param("value",propType)] - let ret = mk_return Type_void - let access = ComputeMemberAccess true propHidden - let mdef = - if stat then - mk_static_nongeneric_mdef - (methnm,access,parms,ret,MethodBody_il - (mk_ilmbody(true,[],2,nonbranching_instrs_to_code ([ ldarg_0;mk_normal_stsfld il_fspec]),None))) - else - mk_instance_mdef - (methnm,access,parms,ret,MethodBody_il - (mk_ilmbody(true,[],2,nonbranching_instrs_to_code ([ ldarg_0;I_ldarg 1us;mk_normal_stfld il_fspec]),None))) - yield mdef |> AddSpecialNameFlag - - if generateDebugDisplayAttribute then - let (|Lazy|) (x:Lazy<_>) = x.Force() - match (vspec_map_tryfind cenv.g.sprintf_vref.Deref eenv.valsInScope, - vspec_map_tryfind cenv.g.new_format_vref.Deref eenv.valsInScope) with - | Some(Lazy(Method(_,_,sprintf_mspec,_,_,_))), Some(Lazy(Method(_,_,new_format_mspec,_,_,_))) -> - // The type returned by the 'sprintf' call - let funcTy = Pubclo.typ_Func1 cenv.g.ilxPubCloEnv ilty cenv.g.ilg.typ_String - // Give the instantiation of the printf format object, i.e. a Format`5 object compatible with StringFormat - let new_format_mspec = mk_mspec(new_format_mspec.MethodRef,AsObject, - [// 'T -> string' - funcTy; - // rest follow from 'StringFormat' - GenType m cenv.g eenv.tyenv cenv.g.unit_ty; - cenv.g.ilg.typ_String; - cenv.g.ilg.typ_String; - cenv.g.ilg.typ_String],[]) - // Instantiate with our own type - let sprintf_mspec = mk_mspec(sprintf_mspec.MethodRef,AsObject,[],[funcTy]) - // Here's the body of the method. Call printf, then invoke the function it returns - let mdef = mk_instance_mdef (debugDisplayMethodName,MemAccess_assembly,[], - mk_return cenv.g.ilg.typ_Object, - MethodBody_il - (mk_ilmbody - (true,[],2, - nonbranching_instrs_to_code - [ // load the hardwired format string - I_ldstr "%+0.8A"; - // make the printf format object - mk_normal_newobj new_format_mspec; - // call sprintf - mk_normal_call sprintf_mspec; - // call the function returned by sprintf - ldarg_0; - mk_IlxInstr (EI_callfunc(Normalcall,Apps_app(ilty, Apps_done cenv.g.ilg.typ_String))); - mk_normal_newobj (mspec_StringBuilder_string cenv.g.ilg) ], - None))) - yield mdef |> AddSpecialNameFlag - | None,_ -> - printfn "sprintf not found" - () - | _,None -> - printfn "new formatnot found" - () - | _ -> - printfn "neither found, or non-method" - () - - // Build record constructors and the funky methods that go with records and delegate types. - // Constructors and delegate methods have the same access as the representation - match tyconRepr with - | Some (TRecdRepr _) when not (is_enum_tycon tycon) -> - // No constructor for enum types - // Otherwise find all the non-static, non zero-init fields and build a constructor - let relevantFields = - fieldSummaries - |> List.filter (fun (_,_,_,stat,_,_,_,fspec) -> not stat && not fspec.IsZeroInit) - - let takenFieldNames = - relevantFields - |> List.map (fun (_,fldName,_,_,_,propType,_,fspec) -> fldName) - |> Set.of_list - - let fieldNamesAndTypes = - relevantFields - |> List.map (fun (_,fldName,_,_,_,propType,_,fspec) -> (fspec.Name,fldName,propType)) - - let mdef = mk_simple_storage_ctor_with_param_names(None, Some cenv.g.ilg.tspec_Object, ilty.TypeSpec, ChooseParamNames fieldNamesAndTypes, reprAccess) - - yield mdef - // FSharp 1.0 bug 1988: Explicitly setting the ComVisible(true) attribute on an F# type causes an F# record to be emitted in a way that enables mutation for COM interop scenarios - if TryFindBoolAttrib cenv.g cenv.g.attrib_ComVisibleAttribute tycon.Attribs = Some(true) then - yield mk_simple_storage_ctor(None, Some cenv.g.ilg.tspec_Object, ilty.TypeSpec, [], reprAccess) - - | Some (TFsObjModelRepr r) when tycon.IsFSharpDelegateTycon -> - - // Build all the methods that go with a delegate type - match r.fsobjmodel_kind with - | TTyconDelegate ss -> - let p,r = - // When "type delagateTy = delegate of unit -> returnTy", - // suppress the unit arg from delagate .Invoke vslot. - let (TSlotSig(nm,typ,ctps,mtps,paraml,returnTy)) = ss - let paraml = - match paraml with - | [[tsp]] when is_unit_typ cenv.g tsp.Type -> [] (* suppress unit arg *) - | paraml -> paraml - GenActualSlotsig m cenv eenvinner (TSlotSig(nm,typ,ctps,mtps,paraml,returnTy)) [] - for mdef in mk_delegate_mdefs cenv.g.ilg (p,r) do - yield { mdef with mdAccess=reprAccess } - | _ -> - () - - | _ -> () ] - - let methods = methodDefs @ augmentOverrideMethodDefs @ abstractMethodDefs - let properties = mk_properties (propertyDefs @ abstractPropDefs) - let events = mk_events abstractEventDefs - let fields = mk_fdefs fieldDefs - - let tdef = - let tdSerializable = (TryFindBoolAttrib cenv.g cenv.g.attrib_AutoSerializableAttribute tycon.Attribs <> Some(false)) - - match tycon.TypeReprInfo with - | Some (TILObjModelRepr (_,_,td)) -> - {td with tdAccess = access; - tdCustomAttrs = mk_custom_attrs tdCustomAttrs; - tdGenericParams = gparams; } - - | Some (TRecdRepr _ | TFsObjModelRepr _ as tyconRepr) -> - let super = super_of_tycon cenv.g tycon - let super_il = GenType m cenv.g eenvinner.tyenv super - - // Build a basic type definition - let isObjectType = (match tyconRepr with TFsObjModelRepr _ -> true | _ -> false) - let attrs = - tdCustomAttrs @ - [mk_CompilationMappingAttr cenv.g - (if isObjectType - then SourceLevelConstruct_ObjectType - elif hiddenRepr then SourceLevelConstruct_RecordType ||| SourceLevelConstruct_PrivateRepresentation - else SourceLevelConstruct_RecordType )] - - let tdef = mk_generic_class(tname,access,gparams,super_il, intfs,mk_mdefs methods,fields,properties,events,mk_custom_attrs attrs) - - // Set some the extra entries in the definition - let tcref_is_the_sealed_attribute tcref = tcref_eq cenv.g tcref cenv.g.attrib_SealedAttribute.TyconRef - let tdef = { tdef with tdSealed = is_sealed_typ cenv.g thisTy || tcref_is_the_sealed_attribute tcref; - tdSerializable = tdSerializable; - tdMethodImpls=mk_mimpls methodImpls; - tdAbstract=isAbstract; - tdComInterop=IsComInteropType cenv.g thisTy } - - let tdLayout,tdEncoding = - match TryFindAttrib cenv.g cenv.g.attrib_StructLayoutAttribute tycon.Attribs with - | Some (Attrib(_,_,[ AttribInt32Arg(layoutKind) ],namedArgs,m)) -> - let decoder = AttributeDecoder namedArgs - let typePack = decoder.FindInt32 "Pack" 0x0 - let typeSize = decoder.FindInt32 "Size" 0x0 - let tdEncoding = - match (decoder.FindInt32 "CharSet" 0x0) with - (* enumeration values for System.Runtime.InteropServices.CharSet taken from mscorlib.il *) - | 0x03 -> TypeEncoding_unicode - | 0x04 -> TypeEncoding_autochar - | _ -> TypeEncoding_ansi - let layoutInfo = - if typePack = 0x0 && typeSize = 0x0 - then { typeSize=None; typePack=None } - else { typeSize = Some typeSize; typePack = Some (uint16 typePack) } - let tdLayout = - match layoutKind with - (* enumeration values for System.Runtime.InteropServices.LayoutKind taken from mscorlib.il *) - | 0x0 -> TypeLayout_sequential layoutInfo - | 0x2 -> TypeLayout_explicit layoutInfo - | _ -> TypeLayout_auto - tdLayout,tdEncoding - | Some (Attrib(_,_,_,_,m)) -> - errorR(Error("The StructLayout attribute could not be decoded",m)); - TypeLayout_auto, TypeEncoding_ansi - - | _ when (match tdKind with TypeDef_valuetype -> true | _ -> false) -> - - // All structs are sequential by default - // Structs with no instance fields get size 1, pack 0 - if tycon.AllFieldsAsList |> List.exists (fun f -> not f.IsStatic) || - // Reflection emit doesn't let us emit 'pack' and 'size' for generic structs. - // In that case we generate a dummy field instead - (cenv.workAroundReflectionEmitBugs && not tycon.TyparsNoRange.IsEmpty) - then - TypeLayout_sequential { typeSize=None; typePack=None }, TypeEncoding_ansi - else - TypeLayout_sequential { typeSize=Some 1; typePack=Some 0us }, TypeEncoding_ansi - - | _ -> - TypeLayout_auto, TypeEncoding_ansi - - let tdef = { tdef with tdKind = tdKind; tdLayout=tdLayout; tdEncoding=tdEncoding } - let tdef = match tdKind with TypeDef_interface -> { tdef with tdExtends = None; tdAbstract=true } | _ -> tdef - tdef - - | Some (TFiniteUnionRepr _) -> - let alternatives = - tycon.UnionCasesArray |> Array.mapi (fun i ucspec -> - { altName=ucspec.ucase_il_name; - altFields=GenUnionCaseRef m cenv.g eenvinner.tyenv i ucspec.RecdFieldsArray; - altCustomAttrs= mk_custom_attrs (GenAttrs cenv eenv ucspec.ucase_attribs @ [mk_CompilationMappingAttrWithSeqNum cenv.g SourceLevelConstruct_Alternative i]) }) - - { tdName = tname; - tdLayout = TypeLayout_auto; - tdAccess = access; - tdGenericParams = gparams; - tdCustomAttrs = - mk_custom_attrs (tdCustomAttrs @ - [mk_CompilationMappingAttr cenv.g - (if hiddenRepr - then SourceLevelConstruct_SumType ||| SourceLevelConstruct_PrivateRepresentation - else SourceLevelConstruct_SumType )]); - tdInitSemantics=TypeInit_beforefield; - tdSealed=true; - tdAbstract=false; - tdKind= - mk_IlxTypeDefKind - (ETypeDef_classunion - { cudReprAccess=reprAccess; - cudNullPermitted=IsUnionTypeWithNullAsTrueValue cenv.g tycon; - cudHelpersAccess=reprAccess; - cudHelpers= - (not (tcref_eq cenv.g tcref cenv.g.unit_tcr_canon) && - match TryFindAttrib cenv.g cenv.g.attrib_DefaultAugmentationAttribute tycon.Attribs with - | Some(Attrib(_,_,[ AttribBoolArg (b) ],_,_)) -> b - | Some (Attrib(_,_,_,_,m)) -> - errorR(Error("The DefaultAugmentation attribute could not be decoded",m)); - true - | _ -> - true) (* not hiddenRepr *) - cudDebugProxies= generateDebugProxies; - cudDebugDisplayAttributes= ilDebugDisplayAttributes; - cudAlternatives= alternatives; - cudWhere = None}); - tdFieldDefs = fields; - tdEvents= events; - tdProperties = properties; - tdMethodDefs= mk_mdefs methods; - tdMethodImpls= mk_mimpls methodImpls; - tdComInterop=false; - tdSerializable= tdSerializable; - tdSpecialName= false; - tdNested=mk_tdefs []; - tdEncoding= TypeEncoding_autochar; - tdImplements= intfs; - tdExtends= Some cenv.g.ilg.typ_Object; - tdSecurityDecls= mk_security_decls []; - tdHasSecurity=false; } - - | _ -> failwith "??" - mgbuf.AddTypeDef(tref,tdef); - - // If a type has a .cctor, then the outer .cctor must be run before the inner .cctor - - if methods |> List.exists (fun md -> md.Name = ".cctor" && - Option.for_all CheckCodeDoesSomething md.Code) then - GenForceOuterInitializationAsPartOfCCtor cenv mgbuf lazyInitInfo tref m - - - -/// Generate the type for an F# exception declaration. -and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = - let exncref = mk_local_ecref exnc - match exnc.ExceptionInfo with - | TExnAbbrevRepr _ | TExnAsmRepr _ | TExnNone -> () - | TExnFresh _ -> - let ilty = GenExnType m cenv.g eenv.tyenv exncref - let tref = ilty.TypeRef - let reprAccess = ComputeMemberAccess true (IsHiddenTyconRepr eenv.sigToImplRemapInfo exnc) - let isHidden = IsHiddenTycon eenv.sigToImplRemapInfo exnc - let access = ComputeTypeAccess tref isHidden - let reprAccess = ComputeMemberAccess true isHidden - let fspecs = exnc.TrueInstanceFieldsAsList - - let propMethodDefs,fieldDefs,propertyDefs,fieldNamesAndTypes = - [ for i,fld in markup fspecs do - let propName = fld.Name - let propType = GenType m cenv.g eenv.tyenv fld.FormalType - let methnm = "get_"^fld.Name - let fldName = GenFieldName exnc fld - let mdef = mk_ldfld_method_def (methnm,reprAccess,false,ilty,fldName,propType) - let fieldDef = IL.mk_instance_fdef(fldName,propType, None, MemAccess_assembly) - let ilPropertyDef = - let cc = ILCallingConv.Instance - { propName=propName; - propRTSpecialName=false; - propSpecialName=false; - propSet=None; - propGet=Some(mk_mref(tref,cc,methnm,0,[],propType)); - propCallconv=CC_instance; - propType=propType; - propInit=None; - propArgs=[]; - propCustomAttrs=mk_custom_attrs (GenAttrs cenv eenv fld.PropertyAttribs @ [mk_CompilationMappingAttrWithSeqNum cenv.g SourceLevelConstruct_Field i]); } - yield (mdef,fieldDef,ilPropertyDef,(propName,fldName,propType)) ] - |> List.unzip4 - - let ctorMethodDef = - mk_simple_storage_ctor_with_param_names(None, Some cenv.g.ilg.tspec_Exception, ilty.TypeSpec, ChooseParamNames fieldNamesAndTypes, reprAccess) - - // In compiled code, all exception types get a parameterless constructor for use with XML serialization - // This does default-initialization of all fields - let ctorMethodDefNoArgs = - if nonNil fieldNamesAndTypes then - [ mk_simple_storage_ctor(None, Some cenv.g.ilg.tspec_Exception, ilty.TypeSpec, [], reprAccess) ] - else - [] - - - let ctorMethodDefForSerialization = - mk_ctor(MemAccess_family, - [mk_named_param("info",cenv.g.ilg.typ_SerializationInfo);mk_named_param("context",cenv.g.ilg.typ_StreamingContext)], - mk_impl - (false,[],8, - nonbranching_instrs_to_code - [ ldarg_0; - I_ldarg 1us; - I_ldarg 2us; - mk_normal_call (mk_ctor_mspec_for_boxed_tspec (cenv.g.ilg.tspec_Exception,[cenv.g.ilg.typ_SerializationInfo;cenv.g.ilg.typ_StreamingContext])) ] -(* - preblock @ - begin - List.concat (List.mapi (fun n (pnm,nm,ty) -> - [ ldarg_0; - I_ldarg (uint16 (n+1)); - mk_normal_stfld (mk_fspec_in_boxed_tspec (tspec,nm,ty)); - ]) flds) - end -*) - ,None)) - - - let getObjectDataMethodForSerialization = - - let mdef = - mk_virtual_mdef - ("GetObjectData",MemAccess_public, - [mk_named_param ("info",cenv.g.ilg.typ_SerializationInfo);mk_named_param("context",cenv.g.ilg.typ_StreamingContext)], - mk_return Type_void, - (let code = - nonbranching_instrs_to_code - [ ldarg_0; - I_ldarg 1us; - I_ldarg 2us; - mk_normal_call (mk_nongeneric_instance_mspec_in_typ (cenv.g.ilg.typ_Exception, "GetObjectData", [cenv.g.ilg.typ_SerializationInfo;cenv.g.ilg.typ_StreamingContext], Type_void)) - ] - MethodBody_il(mk_ilmbody(true,[],8,code, None)))) - // Here we must encode: [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] - // In ILDASM this is: .permissionset demand = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SerializationFormatter' = bool(true)}} - { mdef with mdSecurityDecls=mk_security_decls [ mk_permission_set cenv.g.ilg (SecAction_demand,[(cenv.g.ilg.tref_SecurityPermissionAttribute,[("SerializationFormatter",cenv.g.ilg.typ_Bool, CustomElem_bool(true))])])]; - mdHasSecurity=true } - - - - - let tname = tref.Name - let compareMethodDefs = - (*if isSome exnc.TypeContents.tcaug_compare - then [ GenCompareOverride cenv mgbuf eenv m cenv.g.exn_ty (ilty,cenv.g.ilg.typ_Exception) ] - else*) - [] - - let hashMethodDefs = - if isSome exnc.TypeContents.tcaug_hash_and_equals_withc && not exnc.TypeContents.tcaug_hasObjectGetHashCode - then [ GenHashOverride cenv mgbuf eenv m exncref ilty ] - else [] - - let interfaces = List.map (p13 >> GenType m cenv.g eenv.tyenv) exnc.TypeContents.tcaug_implements - let tdef = - mk_generic_class - (tname,access,[],cenv.g.ilg.typ_Exception, - interfaces, - #if BE_SECURITY_TRANSPARENT - mk_mdefs ([ctorMethodDef] @ compareMethodDefs @ ctorMethodDefNoArgs @ [ ctorMethodDefForSerialization ] @ propMethodDefs @ hashMethodDefs), - #else - mk_mdefs ([ctorMethodDef] @ compareMethodDefs @ ctorMethodDefNoArgs @ [ getObjectDataMethodForSerialization; ctorMethodDefForSerialization ] @ propMethodDefs @ hashMethodDefs), - #endif - mk_fdefs fieldDefs, - mk_properties propertyDefs, - mk_events [], - mk_custom_attrs [mk_CompilationMappingAttr cenv.g SourceLevelConstruct_Exception]) - let tdef = { tdef with tdSerializable = true } - if verbose then dprintf "GenExnDef: writing results\n"; - mgbuf.AddTypeDef(tref,tdef) - -and CodegenAssembly cenv eenv mgbuf fileImpls = - if List.length fileImpls > 0 then - let a,b = List.frontAndBack fileImpls - let eenv = List.fold (GenTopImpl cenv mgbuf None) eenv a - let eenv = GenTopImpl cenv mgbuf cenv.mainMethodInfo eenv b - () - -//------------------------------------------------------------------------- -// When generating a module we just write into mutable -// structures representing the contents of the module. -//------------------------------------------------------------------------- - -let GetEmptyIlxGenEnv ccu = - let thisCompLoc = CompLocForCcu ccu - { tyenv=empty_tyenv; - cloc = thisCompLoc; - valsInScope=vspec_map_empty(); - someTspecInThisModule=ecmaILGlobals.tspec_Object; (* dummy value *) - letBoundVars=[]; - liveLocals=Imap.empty(); - innerVals = []; - sigToImplRemapInfo = []; (* "module remap info" *) - withinSEH = false;} - -type CodegenResults = - { ilTypeDefs: ILTypeDef list; - ilAssemAttrs : ILAttribute list; - ilNetModuleAttrs: ILAttribute list; - quotationResourceBytes: byte[] list } - - -let GenerateCode cenv eenv (TAssembly fileImpls) (assemA,moduleA) = - - (* Generate the implementations into the mgbuf *) - let mgbuf= new AssemblyBuilder(cenv) - let eenv = { eenv with cloc = CompLocForFragment cenv.fragName cenv.viewCcu } - GenTypeDefForCompLoc cenv eenv mgbuf (CompLocForPrivateImplementationDetails eenv.cloc) true []; - CodegenAssembly cenv eenv mgbuf fileImpls; - let ilAssemAttrs = GenAttrs cenv eenv assemA - - let tdefs,reflectedDefinitions = mgbuf.Close() - let quotationResourceBytes = - match reflectedDefinitions with - | [] -> [] - | _ -> - if verbose then dprintf "creating quotation resource"; - let defnsResource = - reflectedDefinitions |> List.choose (fun (v,e) -> - try - let ety = type_of_expr cenv.g e - let tps,taue,tauty = - match e with - | TExpr_tlambda (_,tps,b,_,_,_) -> tps,b,reduce_forall_typ cenv.g ety (List.map mk_typar_ty tps) - | _ -> [],e,ety - let env = Creflect.BindTypars Creflect.empty_env tps - let freeTypes,argExprs, astExpr = Creflect.ConvExprPublic (cenv.g,cenv.amap,cenv.viewCcu) env taue - let m = range_of_expr e - if nonNil(freeTypes) then error(InternalError("A free type variable was detected in a reflected definition",m)); - if nonNil(argExprs) then error(Error("Reflected definitions may not contain uses of the prefix splice operator '%'",m)); - let crenv = Creflect.mk_cenv (cenv.g,cenv.amap,cenv.viewCcu) - let mbaseR = Creflect.ConvMethodBase crenv env v - - Some(mbaseR,astExpr) - with - | Creflect.InvalidQuotedTerm e -> warning(e); None) - |> Sreflect.PickleDefns - [ defnsResource ] - let ilNetModuleAttrs = GenAttrs cenv eenv moduleA - - if verbose then dprintf "codegen complete"; - { ilTypeDefs= tdefs; - ilAssemAttrs = ilAssemAttrs; - ilNetModuleAttrs = ilNetModuleAttrs; - quotationResourceBytes = quotationResourceBytes } - - - -//------------------------------------------------------------------------- -// For printing values in fsi we want to lookup the value of given vrefs. -// The storage in the eenv says if the vref is stored in a static field. -// If we know how/where the field was generated, then we can lookup via reflection. -//------------------------------------------------------------------------- - -open System -open System.Reflection -let lookupGeneratedValue ((lookupFieldRef : ILFieldRef -> FieldInfo), - (lookupILMethodRef : ILMethodRef -> MethodInfo), - (lookupTypeRef : ILTypeRef -> Type), - (lookupType : ILType -> Type)) g eenv (v:Val) = - // Top-level val bindings are stored (for example) in static fields. - // In the FSI case, these fields are be created and initialised, so we can recover the object. - // Ilxgen knows how v was stored, and then ilreflect knows how this storage was generated. - // Ilxgen converts (v:Tast.Val) to AbsIL datatstructures. - // Ilreflect converts from AbsIL datatstructures to emitted Type, FieldInfo, MethodInfo etc. - //------ - // The lookup* functions are the conversions available from ilreflect. - try - // Convert the v.Type into a System.Type according to ilxgen and ilreflect. - let objTyp = - let il_ty = GenType range0 g empty_tyenv v.Type (* empty_tyenv ok, not expecting typars *) - lookupType il_ty - // Lookup the compiled v value (as an object). - // ASIDE: this code like an "immediate" form of GenGetStorageAndSequel - let storage = storage_for_val range0 v eenv - match storage with - | StaticField (fspec,vref,hasLiteralAttr,ilTypeSpecForProperty,fieldName,_,_,ilGetterMethRef,_,_) -> - let obj = - if hasLiteralAttr then - let staticTyp = lookupTypeRef fspec.EnclosingTypeRef - // Checked: This FieldInfo (FieldBuilder) supports GetValue(). - staticTyp.GetField(fieldName).GetValue(null:obj) - else - let staticTyp = lookupTypeRef ilTypeSpecForProperty.TypeRef - // Unfortunately we can not call .Invoke on the ILMethodRef's MethodInfo, - // because it is the MethodBuilder and that does not support .Invoke... - // Rather, we look for the getter MethodInfo from the built type and .Invoke on that. - if ilGetterMethRef.ArgCount <> 0 then - failwith "Expected ilGetterMethRef to have no arguments" (* immediately caught below! *) - let methInfo = staticTyp.GetMethod(ilGetterMethRef.Name,[||]) - methInfo.Invoke((null:obj),(null:obj[])) - Some (obj,objTyp) - | Null -> - Some (null,objTyp) - | Local _ -> None - | Method _ -> None - | Unrealized -> None - | Arg _ -> None - | Env _ -> None - with - e -> -#if DEBUG - printf "ilxGen.lookupGeneratedValue for v=%s caught exception:\n%A\n\n" v.MangledName e -#endif - None - -let lookupGeneratedInfo ((lookupFieldRef : ILFieldRef -> FieldInfo), - (lookupILMethodRef : ILMethodRef -> MethodInfo), - (lookupTypeRef : ILTypeRef -> Type), - (lookupType : ILType -> Type)) g eenv (v:Val) = - try - // Convert the v.Type into a System.Type according to ilxgen and ilreflect. - let objTyp = - let il_ty = GenType range0 g empty_tyenv v.Type (* empty_tyenv ok, not expecting typars *) - lookupType il_ty - // Lookup the compiled v value (as an object). - let storage = storage_for_val range0 v eenv - match storage with - | StaticField (fspec,vref,hasLiteralAttr,ilTypeSpecForProperty,fieldName,_,_,ilGetterMethRef,_,_) -> - let staticTyp = lookupTypeRef ilTypeSpecForProperty.TypeRef - if hasLiteralAttr then - Some (staticTyp.GetField(fieldName) :> MemberInfo) - else - Some (staticTyp.GetMethod(ilGetterMethRef.Name,[||]) :> MemberInfo) - | Null -> None - | Local _ -> None - | Method _ -> None - | Unrealized -> None - | Arg _ -> None - | Env _ -> None - with - e -> -#if DEBUG - printf "ilxGen.lookupGenertedInfo for v=%s caught exception:\n%A\n\n" v.MangledName e -#endif - None - - - diff --git a/tools/FSharp_1.9.6.16/source/fsharp/ilxgen.mli b/tools/FSharp_1.9.6.16/source/fsharp/ilxgen.mli deleted file mode 100644 index 9297eefa..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/ilxgen.mli +++ /dev/null @@ -1,60 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -module (* internal *) Microsoft.FSharp.Compiler.Ilxgen - -open Internal.Utilities -open Internal.Utilities.Pervasives -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open System -open System.IO -open System.Reflection -open Microsoft.FSharp.Compiler - -val generatePublicAsInternal : bool ref - -[] -type internal cenv = - { g: Env.TcGlobals; - viewCcu: Tast.ccu; - fragName: string; - generateFilterBlocks : bool; - workAroundReflectionEmitBugs: bool; - emitConstantArraysUsingStaticDataBlobs: bool; - amap: Import.ImportMap; - mainMethodInfo: Tast.Attribs option; - localOptimizationsAreOn: bool; - debug: bool; - emptyProgramOk: bool; } - -type public ilxGenEnv -val internal GetEmptyIlxGenEnv : Tast.ccu -> ilxGenEnv -val public AddExternalCcusToIlxGenEnv : Env.TcGlobals -> ilxGenEnv -> Tast.ccu list -> ilxGenEnv -val public AddIncrementalLocalAssmblyFragmentToIlxGenEnv : bool -> Env.TcGlobals -> Tast.ccu -> string -> ilxGenEnv -> Tast.TypedAssembly -> ilxGenEnv - -type public CodegenResults = - { ilTypeDefs : ILTypeDef list; - ilAssemAttrs : ILAttribute list; - ilNetModuleAttrs : ILAttribute list; - quotationResourceBytes : byte[] list } - -val internal GenerateCode : - cenv - -> ilxGenEnv - -> Tast.TypedAssembly - -> Tast.Attribs * Tast.Attribs - -> CodegenResults - - -val report : TextWriter -> unit - -val lookupGeneratedValue : ((ILFieldRef -> FieldInfo) * - (ILMethodRef -> MethodInfo) * - (ILTypeRef -> Type) * - (ILType -> Type)) -> Env.TcGlobals -> ilxGenEnv -> Tast.Val -> (obj * System.Type) option - -val lookupGeneratedInfo : ((ILFieldRef -> FieldInfo) * - (ILMethodRef -> MethodInfo) * - (ILTypeRef -> Type) * - (ILType -> Type)) -> Env.TcGlobals -> ilxGenEnv -> Tast.Val -> System.Reflection.MemberInfo option diff --git a/tools/FSharp_1.9.6.16/source/fsharp/import.ml b/tools/FSharp_1.9.6.16/source/fsharp/import.ml deleted file mode 100644 index 0c67b859..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/import.ml +++ /dev/null @@ -1,308 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -#if STANDALONE_METADATA - -module (* internal *) FSharp.PowerPack.Metadata.Reader.Internal.Import - -open System.Collections.Generic -open FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL -open FSharp.PowerPack.Metadata.Reader.Internal.Prelude -open FSharp.PowerPack.Metadata.Reader.Internal.Tast - -#else - -module (* internal *) Microsoft.FSharp.Compiler.Import - -open System.Collections.Generic -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler - -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger - -#endif - -type AssemblyLoader = - | AssemblyLoader of (range * ILAssemblyRef -> CcuResolutionResult) - member x.LoadAssembly(m,aref) = (let (AssemblyLoader(f)) = x in f (m,aref)) - - -//------------------------------------------------------------------------- -// Import an IL types as F# types. -//------------------------------------------------------------------------- - -// This is the context used for converting AbstractIL .NET types to F# internal compiler data structures. -// We currently cache the conversion of AbstractIL ILTypeRef nodes, based on hashes of these. -[] -type ImportMap(g:TcGlobals,assemMap:AssemblyLoader) = - let typeRefToTyconRefCache = new System.Collections.Generic.Dictionary() - member this.g = g - member this.assemMap = assemMap - member this.IlTypeRefToTyconRefCache = typeRefToTyconRefCache - -/// Import an IL type ref as an F# type constructor. -let ImportIlTypeRefUncached (env:ImportMap) m (tref:ILTypeRef) = - let tname = tref.Name - let encl = tref.Enclosing - let path,nsnb = (match encl with [] -> split_type_name_array tname | h :: t -> Array.append (split_namespace_array h) (Array.of_list t), tname) - let ccu = - match tref.Scope with - | ScopeRef_local -> error(InternalError("ImportILTypeRef: unexpected local scope",m)) - | ScopeRef_module _ -> error(InternalError("ImportILTypeRef: reference found to a type in an auxiliary module",m)) - | ScopeRef_assembly assref -> env.assemMap.LoadAssembly (m,assref) // NOTE: only assemMap callsite - - // Do a dereference of a fake tcref for the type just to check it exists in the target assembly and to find - // the corresponding Tycon. - let ccu = - match ccu with - | ResolvedCcu(ccu)->ccu - | UnresolvedCcu(ccuName) -> error (Error("The type '"^tname^"' is required here and is unavailable. You must add a reference to assembly '"^ccuName^"' ",m)) - let fake_tcref = mk_nonlocal_tcref (NLPath(ccu,path)) nsnb - let tycon = - try - deref_tycon fake_tcref - with _ -> - error (Error("A reference to the type '"^tref.FullName^"' in assembly "^ccu.AssemblyName^" was found, but the type could not be found in that assembly",m)) - match tycon.PublicPath with - | None -> error (Error ("An imported assembly uses the type '"^String.concat "." (Array.to_list path@[nsnb])^"' but that type is not public",m)); - | Some pubpath -> rescope_tycon_pubpath ccu pubpath tycon - - -let ImportILTypeRef (env:ImportMap) m (tref:ILTypeRef) = - if env.IlTypeRefToTyconRefCache.ContainsKey(tref) then - env.IlTypeRefToTyconRefCache.[tref] - else - let tcref = ImportIlTypeRefUncached env m tref - env.IlTypeRefToTyconRefCache.[tref] <- tcref; - tcref - -/// Import an IL type as an F# type -/// - The F# type check does the job of making the "void" into a "unit" value, whatever the repr. of "unit" is. -let rec ImportILType (env:ImportMap) m tinst typ = - match typ with - | Type_void -> - mk_unit_typ env.g - - | Type_array(bounds,ty) -> - let n = bounds.Rank - let elementType = ImportILType env m tinst ty - mk_multi_dim_array_typ env.g n elementType - - | Type_boxed tspec | Type_value tspec -> - let ninst = tspec.GenericArgs.Length - let tcref = ImportILTypeRef env m tspec.TypeRef - let inst = tspec.GenericArgs |> List.map (ImportILType env m tinst) - // Prefer the F# abbreviation for some built-in types, e.g. - // 'string' rather than 'System.String', since users don't - // on the whole realise that these are defined in terms of their .NET equivalents - // Also on import we decompile uses of FastFunc and Tuple. -#if STANDALONE_METADATA -#else - match env.g.better_tcref_map tcref inst with - | Some res -> res - | None -> -#endif - TType_app (tcref,inst) - - | Type_byref ty -> mk_byref_typ env.g (ImportILType env m tinst ty) - | Type_ptr ty -> mk_nativeptr_typ env.g (ImportILType env m tinst ty) - | Type_fptr _ -> mk_nativeint_typ env.g (* failwith "cannot import this kind of type (ptr, fptr)" *) - | Type_modified(_,_,ty) -> - // All custom modifiers are ignored - ImportILType env m tinst ty - | Type_tyvar u16 -> - try List.nth tinst (int u16) - with _ -> - error(Error("internal error or badly formed meatdata: not enough type parameters were in scope while importing",m)) - -//------------------------------------------------------------------------- -// Load an IL assembly into the compiler's internal data structures -// Careful use is made of laziness here to ensure we don't read the entire IL -// assembly on startup. -//-------------------------------------------------------------------------- - - -// tinst gives the type parameters for the enclosing type when converting the type parameters of a generic method -let ImportIlTypars amap m scoref tinst gps = - match gps with - | [] -> [] - | _ -> - let amap = amap() - let tps = gps |> List.map (fun gp -> mk_rigid_typar gp.gpName m) - - let tptys = tps |> List.map mk_typar_ty - let importInst = tinst@tptys - (tps,gps) ||> List.iter2 (fun tp gp -> - let constraints = gp.gpConstraints |> List.map (fun ilty -> TTyparCoercesToType(ImportILType amap m importInst (rescope_typ scoref ilty),m) ) - let constraints = if gp.gpReferenceTypeConstraint then (TTyparIsReferenceType(m)::constraints) else constraints - let constraints = if gp.gpNotNullableValueTypeConstraint then (TTyparIsNotNullableValueType(m)::constraints) else constraints - let constraints = if gp.gpDefaultConstructorConstraint then (TTyparRequiresDefaultConstructor(m)::constraints) else constraints - fixup_typar_constraints tp constraints); - tps - - -let MultisetDiscriminateAndMap nodef tipf (items: ('key list * 'value) list) = - // Find all the items with an empty key list and call 'tipf' - let tips = - [ for (keylist,v) in items do - match keylist with - | [] -> yield tipf v - | _ -> () ] - - // Find all the items with a non-empty key list. Bucket them together by - // the first key. For each bucket, call 'nodef' on that head key and the bucket. - let nodes = - let buckets = new Dictionary<_,_>(10) - for (keylist,v) in items do - match keylist with - | [] -> () - | key::rest -> - buckets.[key] <- (rest,v) :: (if buckets.ContainsKey key then buckets.[key] else []); - - [ for (KeyValue(key,items)) in buckets -> nodef key items ] - - tips,nodes - - -let rec ImportIlTypeDef amap m scoref cpath enc nm (ltdef:Lazy) = - let tdef = ltdef.Force() - let lmtyp = - let nested = tdef.NestedTypes - lazy - (let cpath = (mk_cpath cpath nm FSharpModule) - ImportIlTypeDefs amap m scoref cpath (enc@[tdef]) nested) - // Add the type itself. - NewILTycon - (Some cpath) - (nm,m) -#if STANDALONE_METADATA - (LazyWithContext<_,_>.Create(fun _ -> ImportIlTypars amap m scoref [] tdef.GenericParams)) -#else - // The read of the type parameters may fail to resolve types. We pick up a new range from the point where that read is forced - (LazyWithContext<_,_>.Create(fun m -> ImportIlTypars amap m scoref [] tdef.GenericParams)) -#endif - (scoref,enc,tdef) - lmtyp - - -and ImportIlTypeDefList amap m scoref cpath enc items = - // Split into the ones with namespaces and without - // This is a non-trivial function. - // Add the ones with namespaces in buckets - // That is, multi-set discriminate based in the first element of the namespace list (e.g. "System") - // and for each bag resulting from the discrimination fold-in a lazy computation to add the types under that bag - let rec add cpath items = - let tycons,namespaceModules = - items - |> MultisetDiscriminateAndMap - // nodef - called for each bucket, where 'n' is the head element of the namespace used - // as a key in the discrimination, tgs is the remaining descriptors. We create a sub-module for 'n' - (fun n tgs -> - let modty = lazy (add (mk_cpath cpath n Namespace) tgs) - let mspec = NewModuleOrNamespace (Some cpath) taccessPublic (mksyn_id m n) emptyXmlDoc [] modty - mspec) - - // tipf - called if there are no namespace items left to discriminate on. - (fun (n,info:Lazy<_>) -> - //Note: this scoref looks like it will always be identical to 'scoref' - let (scoref2,attrs,ltdef) = info.Force() - ImportIlTypeDef amap m scoref2 cpath enc n ltdef) - - let kind = match enc with [] -> Namespace | _ -> FSharpModule - (NewModuleOrNamespaceType kind (tycons@namespaceModules) [] ) - - add cpath items - -and ImportIlTypeDefs amap m scoref cpath enc tdefs = - tdefs - |> dest_lazy_tdefs - |> List.map (fun (ns,n,attrs,ltdef) -> (ns,(n,notlazy(scoref,attrs,ltdef)))) - |> ImportIlTypeDefList amap m scoref cpath enc - -let ImportIlAssemblyMainTypeDefs amap m scoref modul = - modul.modulTypeDefs |> ImportIlTypeDefs amap m scoref (CompPath(scoref,[])) [] - -/// Read the "exported types" table for multi-module assemblies. -let ImportIlAssemblyExportedType amap m auxModLoader (scoref:ILScopeRef) (exportedType:ILExportedType) = - // Forwarders are dealt with separately in the ref->def dereferencing logic in tast.ml as they effectively give rise to type equivalences - if exportedType.IsForwarder then - [] - else - let info = - lazy (match - (try - let modul = auxModLoader exportedType.ScopeRef - Some (lazy (find_tdef exportedType.Name modul.modulTypeDefs)) - with :? System.Collections.Generic.KeyNotFoundException -> None) - with - | None -> - error(Error("A reference to the DLL "^exportedType.ScopeRef.QualifiedName ^" is required by assembly " ^ scoref.QualifiedName ^ ". The imported type "^exportedType.Name^" is located in the first assembly and could not be resolved" ,m)) - | Some (ltdef) -> - scoref,exportedType.exportedTypeCustomAttrs,ltdef) - - let ns,n = split_type_name exportedType.Name - [ ImportIlTypeDefList amap m scoref (CompPath(scoref,[])) [] [(ns,(n,info))] ] - -/// Read the "exported types" table for multi-module assemblies. -let ImportIlAssemblyExportedTypes amap m auxModLoader scoref exportedTypes = - [ for exportedType in dest_exported_types exportedTypes do - yield! ImportIlAssemblyExportedType amap m auxModLoader scoref exportedType ] - -let ImportIlAssemblyTypeDefs(amap,m,auxModLoader,aref,mainmod:ILModuleDef) = - let scoref = ScopeRef_assembly aref - let mtypsForExportedTypes = ImportIlAssemblyExportedTypes amap m auxModLoader scoref mainmod.ManifestOfAssembly.manifestExportedTypes - let mainmod = ImportIlAssemblyMainTypeDefs amap m scoref mainmod - combine_mtyps [] m (mainmod :: mtypsForExportedTypes) - -// Read the type forwarder table for an assembly -let ImportIlAssemblyTypeForwarders(amap,m,exportedTypes:ILExportedTypes) = - // Note 'td' may be in another module or another assembly! - // Note: it is very important that we call auxModLoader lazily - lazy - ([ //printfn "reading forwarders..." - for exportedType in dest_exported_types exportedTypes do - let ns,n = split_type_name exportedType.Name - //printfn "found forwarder for %s..." n - let tcref = ImportIlTypeRefUncached (amap()) m (ILTypeRef.Create(exportedType.ScopeRef,[],exportedType.Name)) - yield (Array.of_list ns,n),tcref - let rec nested (net:ILNestedExportedTypes) enc = - [ for net in dest_nested_exported_types exportedType.Nested do - - //printfn "found nested forwarder for %s..." net.nestedExportedTypeName - let tcref = ImportIlTypeRefUncached (amap()) m (ILTypeRef.Create (exportedType.ScopeRef,enc,net.nestedExportedTypeName)) - yield (Array.of_list enc,exportedType.Name),tcref - yield! nested net.nestedExportedTypeNested (enc @ [ net.nestedExportedTypeName ]) ] - yield! nested exportedType.Nested (ns@[n]) ] - |> Map.of_list) - - -let ImportIlAssembly(amap,m,auxModuleLoader,sref,sourceDir,filename,ilModule:ILModuleDef) = - let aref = - match sref with - | ScopeRef_assembly aref -> aref - | _ -> error(InternalError("PrepareToImportReferencedIlDll: cannot reference .NET netmodules directly, reference the containing assembly instead",m)) - let nm = aref.Name - let mty = ImportIlAssemblyTypeDefs(amap,m,auxModuleLoader,aref,ilModule) - let ccuData = - { ccu_fsharp=false; - ccu_usesQuotations=false; - ccu_qname= Some sref.QualifiedName; - ccu_contents = NewCcuContents sref m nm mty ; - ccu_scoref = sref; - ccu_stamp = new_stamp(); - ccu_code_dir = sourceDir; // note: not an accurate value, but IL assemblies don't give us this information in any attributes. - ccu_filename = filename - ccu_forwarders = - (match ilModule.Manifest with - | None -> lazy Map.empty - | Some manifest -> ImportIlAssemblyTypeForwarders(amap,m,manifest.ExportedTypes)) } - - new_ccu nm ccuData diff --git a/tools/FSharp_1.9.6.16/source/fsharp/import.mli b/tools/FSharp_1.9.6.16/source/fsharp/import.mli deleted file mode 100644 index 4cc3873f..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/import.mli +++ /dev/null @@ -1,25 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module (* internal *) Microsoft.FSharp.Compiler.Import - -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.AbstractIL.IL - -type AssemblyLoader = - | AssemblyLoader of (range * ILAssemblyRef -> CcuResolutionResult) - member LoadAssembly : range * ILAssemblyRef -> CcuResolutionResult - - -[] -type ImportMap = - new : g:Env.TcGlobals * assemMap:AssemblyLoader -> ImportMap - member assemMap : AssemblyLoader - member g : Env.TcGlobals - -val internal ImportILTypeRef : ImportMap -> range -> ILTypeRef -> TyconRef -val internal ImportILType : ImportMap -> range -> typ list -> ILType -> typ -val internal ImportIlTypars : (unit -> ImportMap) -> range -> ILScopeRef -> typ list -> ILGenericParameterDef list -> Typar list -val internal ImportIlAssembly : (unit -> ImportMap) * range * (ILScopeRef -> ILModuleDef) * ILScopeRef * sourceDir:string * filename: string option * ILModuleDef -> CcuThunk diff --git a/tools/FSharp_1.9.6.16/source/fsharp/infos.ml b/tools/FSharp_1.9.6.16/source/fsharp/infos.ml deleted file mode 100644 index 14f4b527..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/infos.ml +++ /dev/null @@ -1,2215 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -/// tinfos, minfos, finfos, pinfos - summaries of information for references -/// to .NET and F# constructs. - -#light - -module (* internal *) Microsoft.FSharp.Compiler.Infos - -open Internal.Utilities -open Internal.Utilities.Pervasives -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler - -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Env -open Microsoft.FSharp.Compiler.AbstractIL.IL (* Abstract IL *) -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Text.Printf - -//------------------------------------------------------------------------- -// From IL types to F# types -//------------------------------------------------------------------------- - -/// importInst gives the context for interpreting type variables -let ImportType scoref amap m importInst ilty = - ilty |> rescope_typ scoref |> Import.ImportILType amap m importInst - -//------------------------------------------------------------------------- -// Fold the hierarchy. -// REVIEW: this code generalizes the iteration used below for member lookup. -//------------------------------------------------------------------------- - -let is_fsobjmodel_or_exn_typ g typ = - is_fsobjmodel_typ g typ || - (is_stripped_tyapp_typ g typ && (tcref_of_stripped_typ g typ).IsExceptionDecl) - -let SuperTypeOfType g amap m typ = - let typ = strip_tpeqns_and_tcabbrevs_and_measureable g typ - if is_il_named_typ g typ then - let tcref,tinst = dest_stripped_tyapp_typ g typ - let scoref,_,tdef = tcref.ILTyconInfo - match tdef.tdExtends with - | None -> None - | Some ilty -> Some (ImportType scoref amap m tinst ilty) - elif is_fsobjmodel_or_exn_typ g typ then - let tcref,tinst = dest_stripped_tyapp_typ g typ - Some (InstType (mk_inst_for_stripped_typ g typ) (super_of_tycon g (deref_tycon tcref))) - elif is_any_array_typ g typ then - Some(g.system_Array_typ) - elif is_ref_typ g typ && not (is_obj_typ g typ) then - Some(g.obj_ty) - elif is_tuple_struct_typ g typ then - //Some(g.system_Value_typ) - Some(g.obj_ty) - else None - -let mk_System_Collections_Generic_IList_ty g ty = TType_app(g.tcref_System_Collections_Generic_IList,[ty]) - - -let ImplementsOfType g amap m typ = - let itys = - if is_stripped_tyapp_typ g typ then - let tcref,tinst = dest_stripped_tyapp_typ g typ - if tcref.IsMeasureableReprTycon then - [g.mk_IComparable_ty; - g.mk_IConvertible_ty; - g.mk_IFormattable_ty; - mk_tyapp_ty g.system_GenericIComparable_tcref [typ]; - mk_tyapp_ty g.system_GenericIEquatable_tcref [typ]] - elif tcref.IsILTycon then - let scoref,_,tdef = tcref.ILTyconInfo - List.map (ImportType scoref amap m tinst) tdef.tdImplements - else - let inst = mk_inst_for_stripped_typ g typ - List.map (fun (x,_,_) -> InstType inst x) tcref.TypeContents.tcaug_implements - else [] - - let itys = - if is_il_arr1_typ g typ then - mk_System_Collections_Generic_IList_ty g (dest_il_arr1_typ g typ) :: itys - else - itys - itys - - -// Traverse the type hierarchy, e.g. f D (f C (f System.Object acc)). -let rec FoldHierarchyOfTypeAux ndeep followInterfaces f g amap m typ (visited,acc) = - if ListSet.mem (type_equiv g) typ visited then visited,acc else - let state = typ::visited, acc - if verbose then dprintf "--> FoldHierarchyOfTypeAux, ndeep = %d, typ = %s...\n" ndeep ((DebugPrint.showType typ)); - if ndeep > 100 then (errorR(Error("recursive class hierarchy (detected in FoldHierarchyOfTypeAux), typ = "^(DebugPrint.showType typ),m)); (visited,acc)) else - let visited,acc = - if is_interface_typ g typ then - List.foldBack - (FoldHierarchyOfTypeAux (ndeep+1) followInterfaces f g amap m) - (ImplementsOfType g amap m typ) - (FoldHierarchyOfTypeAux ndeep followInterfaces f g amap m g.obj_ty state) - elif is_typar_typ g typ then - let tp = dest_typar_typ g typ - let state = FoldHierarchyOfTypeAux (ndeep+1) followInterfaces f g amap m g.obj_ty state - List.foldBack - (fun x vacc -> - match x with - | TTyparMayResolveMemberConstraint _ - | TTyparDefaultsToType _ - | TTyparIsEnum _ - | TTyparIsDelegate _ - | TTyparSupportsNull _ - | TTyparIsNotNullableValueType _ - | TTyparIsReferenceType _ - | TTyparSimpleChoice _ - | TTyparRequiresDefaultConstructor _ -> vacc - | TTyparCoercesToType(cty,_) -> - FoldHierarchyOfTypeAux (ndeep + 1) followInterfaces f g amap m cty vacc) - tp.Constraints - state - else - let state = - if followInterfaces then - List.foldBack - (FoldHierarchyOfTypeAux (ndeep+1) followInterfaces f g amap m) - (ImplementsOfType g amap m typ) - state - else - state - let state = - Option.fold_right - (FoldHierarchyOfTypeAux (ndeep+1) followInterfaces f g amap m) - (SuperTypeOfType g amap m typ) - state - state - - (visited,f typ acc) - -/// Fold, do not follow interfaces -let FoldPrimaryHierarchyOfType f g amap m typ acc = FoldHierarchyOfTypeAux 0 false f g amap m typ ([],acc) |> snd - -/// Fold, following interfaces -let FoldEntireHierarchyOfType f g amap m typ acc = FoldHierarchyOfTypeAux 0 true f g amap m typ ([],acc) |> snd - -/// Iterate, following interfaces -let IterateEntireHierarchyOfType f g amap m typ = FoldHierarchyOfTypeAux 0 true (fun ty () -> f ty) g amap m typ ([],()) |> snd - -let ExistsInEntireHierarchyOfType f g amap m typ = - FoldHierarchyOfTypeAux 0 true (fun ty acc -> acc || f ty ) g amap m typ ([],false) |> snd - -let SearchEntireHierarchyOfType f g amap m typ = - FoldHierarchyOfTypeAux 0 true - (fun ty acc -> - match acc with - | None -> if f ty then Some(ty) else None - | Some _ -> acc) - g amap m typ ([],None) - |> snd - -let AllSuperTypesOfType g amap m ty = FoldHierarchyOfTypeAux 0 true (ListSet.insert (type_equiv g)) g amap m ty ([],[]) |> snd - - - -let mdef_is_ctor md = md.mdName = ".ctor" -let mdef_is_cctor md = md.mdName = ".cctor" - -let mdef_is_protected md = - not (mdef_is_ctor md) && - not (mdef_is_cctor md) && - (md.mdAccess = MemAccess_family) && - not md.mdCallconv.IsStatic - -let ImportTypeFromMetadata amap m scoref tinst minst ilty = - ImportType scoref amap m (tinst@minst) ilty - -//------------------------------------------------------------------------- -// Predicates and properties on values and members -//------------------------------------------------------------------------- - -let PropertyNameOfMemberValRef (vref:ValRef) = - assert(vref.IsMember) - (the (vref.MemberInfo)).PropertyName - -let MemberRefIsVirtual (vref:ValRef) = - let flags = vref.MemberInfo.Value.MemberFlags - flags.MemberIsVirtual || flags.MemberIsDispatchSlot || flags.MemberIsOverrideOrExplicitImpl - -// REVIEW: This whole predicate is very dubious. We should not need the notion of "DefiniteFSharpOverride" at all -let MemberRefIsDefiniteFSharpOverride (vref:ValRef) = - let membInfo = vref.MemberInfo.Value - let flags = membInfo.MemberFlags - not flags.MemberIsDispatchSlot && (flags.MemberIsOverrideOrExplicitImpl || nonNil membInfo.ImplementedSlotSigs) - -let MemberRefIsDispatchSlot (vref:ValRef) = - let membInfo = vref.MemberInfo.Value - membInfo.MemberFlags.MemberIsDispatchSlot - -let MemberRefIsAbstract (vref:ValRef) = - let membInfo = vref.MemberInfo.Value - membInfo.MemberFlags.MemberIsDispatchSlot && not membInfo.IsImplemented - -type ValRef with - member x.IsFSharpEventProperty(g) = - x.IsMember && CompileAsEvent g x.Attribs && not x.IsExtensionMember - -//------------------------------------------------------------------------- -// Basic infos -//------------------------------------------------------------------------- - -type ILTypeInfo = - | ILTypeInfo of TyconRef * ILTypeRef * tinst * ILTypeDef - member x.TyconRef = let (ILTypeInfo(tcref,_,_,_)) = x in tcref - member x.ILTypeRef = let (ILTypeInfo(_,tref,_,_)) = x in tref - member x.TypeInst = let (ILTypeInfo(_,_,tinst,_)) = x in tinst - member x.RawMetadata = let (ILTypeInfo(_,_,_,tdef)) = x in tdef - member x.ToType = TType_app(x.TyconRef,x.TypeInst) - member x.ILScopeRef = x.ILTypeRef.Scope - member x.Name = x.ILTypeRef.Name - member x.IsValueType = is_value_or_enum_tdef x.RawMetadata - - -type TypeInfo = - | ILType of ILTypeInfo - | FSType of Tast.typ - -type ILMethInfo = - | ILMethInfo of ILTypeInfo * ILTypeRef option (* extension? *) * ILMethodDef * typars (* typars are the uninstantiated generic method args *) - - member x.ILTypeInfo = let (ILMethInfo(tinfo,_,_,_)) = x in tinfo - member x.RawMetadata = let (ILMethInfo(_,_,md,_)) = x in md - member x.ExtensionMethodInfo = let (ILMethInfo(_,extInfo,_,_)) = x in extInfo - member x.ILTypeRef = x.ILTypeInfo.ILTypeRef - member x.ILName = x.RawMetadata.Name - - // methods to hide logic related to extension methods - member x.IsCSharpExtensionMethod = x.ExtensionMethodInfo.IsSome - - member x.ActualILTypeRef = - match x.ExtensionMethodInfo with - | None -> x.ILTypeRef - | Some info -> info - - member x.ActualTypeInst = - match x.ExtensionMethodInfo with - | None -> x.ILTypeInfo.TypeInst - | Some info -> [] - - member x.MetadataScope = x.ActualILTypeRef.Scope - - member x.ParamMetadata = - let ps = x.RawMetadata.mdParams in - if x.IsCSharpExtensionMethod then List.tl ps else ps - - member x.NumParams = x.ParamMetadata.Length - - member x.GenericArity = x.RawMetadata.mdGenericParams.Length - - member x.IsConstructor = x.RawMetadata |> mdef_is_ctor - member x.IsClassConstructor = x.RawMetadata |> mdef_is_cctor - member x.IsProtectedAccessibility = x.RawMetadata |> mdef_is_protected - member x.IsVirtual = x.RawMetadata.IsVirtual - member x.IsFinal = x.RawMetadata.IsFinal - - member x.IsAbstract = - match x.RawMetadata.mdKind with - | MethodKind_virtual vinfo -> vinfo.virtAbstract - | _ -> false - - /// Does it appear to the user as a static method? - member x.IsStatic = - not x.IsCSharpExtensionMethod && // all C# extension methods are instance - x.RawMetadata.mdCallconv.IsStatic - - /// Does it have the .NET IL 'newslot' flag set, and is also a virtual? - member x.IsNewSlot = - match x.RawMetadata.mdKind with - | MethodKind_virtual vinfo -> vinfo.virtNewslot - | _ -> false - - /// Does it appear to the user as an instance method? - member x.IsInstance = not x.IsConstructor && not x.IsStatic - - member x.ArgTypes(amap,m,minst) = - x.ParamMetadata |> List.map (fun p -> ImportTypeFromMetadata amap m x.MetadataScope x.ActualTypeInst minst p.Type) - - member x.ParamInfos(amap,m,minst) = - x.ParamMetadata |> List.map (fun p -> p.Name, ImportTypeFromMetadata amap m x.MetadataScope x.ActualTypeInst minst p.Type) - - member x.EnclosingType = x.ILTypeInfo.ToType - - - -type MethInfo = - | FSMeth of TcGlobals * Tast.typ * ValRef - | ILMeth of TcGlobals * ILMethInfo - | DefaultStructCtor of TcGlobals * Tast.typ - /// Get the enclosing ("parent") type of the method info. - member x.EnclosingType = - match x with - | ILMeth(g,x) -> x.EnclosingType - | FSMeth(g,typ,_) -> typ - | DefaultStructCtor(g,typ) -> typ - -type ILFieldInfo = - | ILFieldInfo of ILTypeInfo * ILFieldDef (* .NET IL fields *) - - member x.ILTypeInfo = (let (ILFieldInfo(tinfo,_)) = x in tinfo) - member x.RawMetadata = (let (ILFieldInfo(_,pd)) = x in pd) - member x.ScopeRef = x.ILTypeInfo.ILScopeRef - member x.ILTypeRef = x.ILTypeInfo.ILTypeRef - member x.TypeInst = x.ILTypeInfo.TypeInst - member x.FieldName = x.RawMetadata.fdName - member x.IsInitOnly = x.RawMetadata.fdInitOnly - member x.IsValueType = x.ILTypeInfo.IsValueType - member x.IsStatic = x.RawMetadata.fdStatic - member x.LiteralValue = if x.RawMetadata.fdLiteral then x.RawMetadata.fdInit else None - member x.ILFieldRef= rescope_fref x.ScopeRef (mk_fref_in_tref(x.ILTypeRef,x.FieldName,x.RawMetadata.fdType)) - -type RecdFieldInfo = - | RecdFieldInfo of tinst * Tast.RecdFieldRef (* F# fields *) - member x.TypeInst = let (RecdFieldInfo(tinst,_)) = x in tinst - member x.RecdFieldRef = let (RecdFieldInfo(_,rfref)) = x in rfref - member x.RecdField = x.RecdFieldRef.RecdField - member x.IsStatic = x.RecdField.IsStatic - member x.LiteralValue = x.RecdField.LiteralValue - member x.TyconRef = x.RecdFieldRef.TyconRef - member x.Tycon = x.RecdFieldRef.Tycon - member x.Name = x.RecdField.Name - member x.FieldType = actual_rtyp_of_rfref x.RecdFieldRef x.TypeInst - member x.EnclosingType = TType_app (x.RecdFieldRef.TyconRef,x.TypeInst) - -type UnionCaseInfo = - | UnionCaseInfo of tinst * Tast.UnionCaseRef - member x.TypeInst = let (UnionCaseInfo(tinst,_)) = x in tinst - member x.UnionCaseRef = let (UnionCaseInfo(_,ucref)) = x in ucref - member x.UnionCase = x.UnionCaseRef.UnionCase - member x.TyconRef = x.UnionCaseRef.TyconRef - member x.Tycon = x.UnionCaseRef.Tycon - member x.Name = x.UnionCase.DisplayName - - -type ILPropInfo = - | ILPropInfo of ILTypeInfo * ILPropertyDef - - member x.ILTypeInfo = match x with (ILPropInfo(tinfo,_)) -> tinfo - member x.RawMetadata = match x with (ILPropInfo(_,pd)) -> pd - member x.PropertyName = x.RawMetadata.propName - - member x.GetterMethod = - assert (x.HasGetter) - let mdef = resolve_mref x.ILTypeInfo.RawMetadata (the x.RawMetadata.propGet) - ILMethInfo(x.ILTypeInfo,None,mdef,[]) - - member x.SetterMethod = - assert (x.HasSetter) - let mdef = resolve_mref x.ILTypeInfo.RawMetadata (the x.RawMetadata.propSet) - ILMethInfo(x.ILTypeInfo,None,mdef,[]) - - member x.HasGetter = isSome x.RawMetadata.propGet - member x.HasSetter = isSome x.RawMetadata.propSet - member x.IsStatic = (x.RawMetadata.propCallconv = CC_static) - - -type PropInfo = - | FSProp of TcGlobals * Tast.typ * ValRef option * ValRef option - | ILProp of TcGlobals * ILPropInfo - -type ILEventInfo = - | ILEventInfo of ILTypeInfo * ILEventDef - member x.RawMetadata = match x with (ILEventInfo(_,ed)) -> ed - member x.ILTypeInfo = match x with (ILEventInfo(tinfo,_)) -> tinfo - member x.AddMethod = - let mdef = resolve_mref x.ILTypeInfo.RawMetadata x.RawMetadata.eventAddOn - ILMethInfo(x.ILTypeInfo,None,mdef,[]) - - member x.RemoveMethod = - let mdef = resolve_mref x.ILTypeInfo.RawMetadata x.RawMetadata.eventRemoveOn - ILMethInfo(x.ILTypeInfo,None,mdef,[]) - - member x.TypeRef = x.ILTypeInfo.ILTypeRef - member x.Name = x.RawMetadata.eventName - member x.IsStatic = x.AddMethod.IsStatic - - -type EventInfo = - | FSEvent of TcGlobals * PropInfo * ValRef * ValRef - | ILEvent of TcGlobals * ILEventInfo - - -/// Copy constraints. If the constraint comes from a type parameter associated -/// with a type constructor then we are simply renaming type variables. If it comes -/// from a generic method in a generic class (e.g. typ.M<_>) then we may be both substituting the -/// instantiation associated with 'typ' as well as copying the type parameters associated with -/// M and instantiating their constraints -/// -/// Note: this now looks identical to constraint instantiation. - -let CopyTyparConstraints m tprefInst (tporig:Typar) = - tporig.Constraints - |> List.map (fun tpc -> - match tpc with - | TTyparCoercesToType(ty,_) -> - TTyparCoercesToType (InstType tprefInst ty,m) - | TTyparDefaultsToType(priority,ty,_) -> - TTyparDefaultsToType (priority,InstType tprefInst ty,m) - | TTyparSupportsNull _ -> - TTyparSupportsNull m - | TTyparIsEnum(uty,_) -> - TTyparIsEnum (InstType tprefInst uty,m) - | TTyparIsDelegate(aty, bty,_) -> - TTyparIsDelegate (InstType tprefInst aty,InstType tprefInst bty,m) - | TTyparIsNotNullableValueType _ -> - TTyparIsNotNullableValueType m - | TTyparIsReferenceType _ -> - TTyparIsReferenceType m - | TTyparSimpleChoice (tys,_) -> - TTyparSimpleChoice (List.map (InstType tprefInst) tys,m) - | TTyparRequiresDefaultConstructor _ -> - TTyparRequiresDefaultConstructor m - | TTyparMayResolveMemberConstraint(traitInfo,_) -> - TTyparMayResolveMemberConstraint (inst_trait tprefInst traitInfo,m)) - -/// The constraints for each typar copied from another typar can only be fixed up once -/// we have generated all the new constraints, e.g. f List, B :> List> ... -let FixupNewTypars m ftctps tinst tpsorig tps = - let renaming,tptys = (mk_typar_to_typar_renaming tpsorig tps) - let tprefInst = (mk_typar_inst ftctps tinst) @ renaming - List.iter2 (fun tporig tp -> fixup_typar_constraints tp (CopyTyparConstraints m tprefInst tporig)) tpsorig tps; - renaming,tptys - - -//------------------------------------------------------------------------- -// tinfos -//------------------------------------------------------------------------- - -let inst_il_tinfo inst (ILTypeInfo(tcref,tref,tinst,tdef)) = ILTypeInfo(tcref,tref,inst_types inst tinst,tdef) - -let FormalTyparsOfILTypeInfo m (x:ILTypeInfo) = x.TyconRef.Typars(m) - -let tdef_of_il_typ g ty = (tcref_of_stripped_typ g ty).ILTyconRawMetadata - -let tinfo_of_il_typ g ty = - if is_il_named_typ g ty then - let tcref,tinst = dest_stripped_tyapp_typ g ty - let scoref,enc,tdef = tcref.ILTyconInfo - let tref = tref_for_nested_tdef scoref (enc,tdef) - ILTypeInfo(tcref,tref,tinst,tdef) - else - failwith "tinfo_of_il_typ" - - -/// Build IL method infos. -let mk_il_minfo amap m (tinfo:ILTypeInfo) (extInfo:ILTypeRef option) md = - let tinst,scoref = - match extInfo with - | None -> - tinfo.TypeInst,tinfo.ILScopeRef - | Some tref -> - // C# extension methods have no type typars - [], tref.Scope - let mtps = Import.ImportIlTypars (fun () -> amap) m scoref tinst md.mdGenericParams - ILMeth (amap.g,ILMethInfo(tinfo,extInfo, md,mtps)) - -//------------------------------------------------------------------------- -// il_minfo, il_pinfo -//------------------------------------------------------------------------- - - -// Get the logical object parameters of a type -let objtys_of_il_minfo amap m (x:ILMethInfo) minst = - // all C# extension methods are instance - if x.IsCSharpExtensionMethod then - x.RawMetadata.Parameters |> List.hd |> (fun p -> [ImportTypeFromMetadata amap m x.MetadataScope x.ActualTypeInst minst p.Type]) - elif x.IsInstance then - [x.EnclosingType] - else - [] - - -let ImportReturnTypeFromMetaData amap m ty scoref tinst minst = - match ty with - | Type_void -> None - | retTy -> Some (ImportTypeFromMetadata amap m scoref tinst minst retTy) - -let GetCompiledReturnTyOfILMethod amap m (x:ILMethInfo) minst = - ImportReturnTypeFromMetaData amap m x.RawMetadata.mdReturn.Type x.MetadataScope x.ActualTypeInst minst - -let GetFSharpReturnTyOfILMethod amap m minfo minst = - GetCompiledReturnTyOfILMethod amap m minfo minst - |> GetFSharpViewOfReturnType amap.g - -let mref_of_il_minfo (minfo:ILMethInfo) = - let mref = mk_mref_to_mdef (minfo.ActualILTypeRef,minfo.RawMetadata) - rescope_mref minfo.MetadataScope mref - - -let inst_il_minfo amap m inst (x:ILMethInfo) = - mk_il_minfo amap m (inst_il_tinfo inst x.ILTypeInfo) x.ExtensionMethodInfo x.RawMetadata - -let il_minfo_is_DllImport g (minfo:ILMethInfo) = - let (AttribInfo(tref,_)) = g.attrib_DllImportAttribute - minfo.RawMetadata.mdCustomAttrs |> ILThingDecodeILAttrib g tref |> isSome - -/// Build an expression node that is a call to a .NET method. *) -let mk_il_minfo_call g amap m isProp (minfo:ILMethInfo) vFlags minst direct args = - let isStatic = not (minfo.IsConstructor || minfo.IsInstance) - let valu = minfo.ILTypeInfo.IsValueType - let ctor = minfo.IsConstructor - if minfo.IsClassConstructor then - error (InternalError (minfo.ILName^": cannot call a class constructor",m)); - let useCallvirt = - not valu && not direct && minfo.IsVirtual - let isProtected = minfo.IsProtectedAccessibility - let mref = mref_of_il_minfo minfo - let newobj = ctor && (vFlags = NormalValUse) - let exprty = if ctor then minfo.EnclosingType else GetFSharpReturnTyOfILMethod amap m minfo minst - // The thing might be an extension method, in which case adjust the instantiations - let actualTypeInst = minfo.ActualTypeInst - let actualMethInst = minst - let retTy = (if not ctor && (mref.ReturnType = IL.Type_void) then [] else [exprty]) - let isDllImport = il_minfo_is_DllImport g minfo - TExpr_op(TOp_ilcall((useCallvirt,isProtected,valu,newobj,vFlags,isProp,isDllImport,None,mref),actualTypeInst,actualMethInst, retTy),[],args,m), - exprty - -let mk_obj_ctor_call g m = - let mref = (mk_nongeneric_ctor_mspec(g.ilg.tref_Object,AsObject,[])).MethodRef - TExpr_op(TOp_ilcall((false,false,false,false,CtorValUsedAsSuperInit,false,false,None,mref),[],[],[g.obj_ty]),[],[],m) - -//------------------------------------------------------------------------- -// .NET Property Infos -//------------------------------------------------------------------------- - -let pdef_accessibility tdef pd = - match pd.propGet with - | Some mref -> (resolve_mref tdef mref).mdAccess - | None -> - match pd.propSet with - None -> MemAccess_public - | Some mref -> (resolve_mref tdef mref).mdAccess - -let il_pinfo_is_protected (pinfo:ILPropInfo) = - (pinfo.HasGetter && pinfo.GetterMethod.IsProtectedAccessibility) || - (pinfo.HasSetter && pinfo.SetterMethod.IsProtectedAccessibility) - -let il_pinfo_is_virt (pinfo:ILPropInfo) = - (pinfo.HasGetter && pinfo.GetterMethod.IsVirtual) || - (pinfo.HasSetter && pinfo.SetterMethod.IsVirtual) - -let il_pinfo_is_newslot (pinfo:ILPropInfo) = - (pinfo.HasGetter && pinfo.GetterMethod.IsNewSlot) || - (pinfo.HasSetter && pinfo.SetterMethod.IsNewSlot) - -let il_pinfo_is_abstract (pinfo:ILPropInfo) = - (pinfo.HasGetter && pinfo.GetterMethod.IsAbstract) || - (pinfo.HasSetter && pinfo.SetterMethod.IsAbstract) - -let params_of_il_pinfo amap m (ILPropInfo (tinfo,pdef)) = - pdef.propArgs |> List.map (fun ty -> None, ImportTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInst [] ty) - -let vtyp_of_il_pinfo amap m (ILPropInfo(tinfo,pdef)) = - ImportTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInst [] pdef.propType - -//------------------------------------------------------------------------- -// .NET Event Infos -//------------------------------------------------------------------------- - - -let edef_accessibility tdef ed = (resolve_mref tdef ed.eventAddOn).mdAccess - -let DelegateTypeOfILEventInfo amap m (ILEventInfo(tinfo,edef)) = - ImportTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInst [] (the edef.eventType) - - -//------------------------------------------------------------------------- -// Testing equality & calculating hash codes of method/prop/event infos -//------------------------------------------------------------------------- - -/// Do two minfos have the same underlying definitions? -/// Used to merge operator overloads collected from left and right of an operator constraint -let MethInfosUseIdenticalDefinitions g x1 x2 = - match x1,x2 with - | ILMeth(g,x1), ILMeth(_,x2) -> (x1.RawMetadata === x2.RawMetadata) - | FSMeth(g,ty1,vref1), FSMeth(_,ty2,vref2) -> g.vref_eq vref1 vref2 - | DefaultStructCtor(g,ty1), DefaultStructCtor(_,ty2) -> tcref_eq g (tcref_of_stripped_typ g ty1) (tcref_of_stripped_typ g ty2) - | _ -> false - -/// Tests whether two property infos have the same underlying defintion -/// (uses the same techniques as pervious 'MethInfosUseIdenticalDefinitions') -let PropInfosUseIdenticalDefinitions x1 x2 = - let optVrefEq g = function - | Some(v1), Some(v2) -> g.vref_eq v1 v2 - | None, None -> true - | _ -> false - match x1,x2 with - | ILProp(g, x1), ILProp(_, x2) -> (x1.RawMetadata === x2.RawMetadata) - | FSProp(g, ty1, vrefa1, vrefb1), FSProp(_, ty2, vrefa2, vrefb2) -> - (optVrefEq g (vrefa1, vrefa2)) && (optVrefEq g (vrefb1, vrefb2)) - | _ -> false - -/// Test whether two event infos have the same underlying defintion (similar as above) -let EventInfosUseIdenticalDefintions x1 x2 = - match x1, x2 with - | FSEvent(g, pi1, vrefa1, vrefb1), FSEvent(_, pi2, vrefa2, vrefb2) -> - PropInfosUseIdenticalDefinitions pi1 pi2 && g.vref_eq vrefa1 vrefa2 && g.vref_eq vrefb1 vrefb2 - | ILEvent(g, x1), ILEvent(_, x2) -> (x1.RawMetadata === x2.RawMetadata) - | _ -> false - -/// Calculates a hash code of method info. Note: this is a very imperfect implementation, -/// but it works decently for comparing methods in the language service... -let GetMethInfoHashCode mi = - match mi with - | ILMeth(_,x1) -> hash x1.RawMetadata.Name - | FSMeth(_,_,vref) -> hash vref.CompiledName - | DefaultStructCtor(_,ty) -> hash ty - -/// Calculates a hash code of property info (similar as previous) -let GetPropInfoHashCode mi = - match mi with - | ILProp(_, x1) -> hash x1.RawMetadata.Name - | FSProp(_,_,vrefOpt1, vrefOpt2) -> - // Value to hash is option*option, which can be hashed efficiently - let vth = vrefOpt1 |> Option.map (fun vr -> vr.CompiledName), vrefOpt2 |> Option.map (fun vr -> vr.CompiledName) - hash(vth) - -/// Calculates a hash code of event info (similar as previous) -let GetEventInfoHashCode mi = - match mi with - | ILEvent(_, x1) -> hash x1.RawMetadata.Name - | FSEvent(_, pi, vref1, vref2) -> hash (GetPropInfoHashCode pi, vref1.CompiledName, vref2.CompiledName) - -//------------------------------------------------------------------------- -// minfo, pinfo -//------------------------------------------------------------------------- - -/// Apply a type instantiation to a method info, i.e. apply the instantiation to the enclosing type. -let InstMethInfo amap m inst = function - | ILMeth(g,x) -> inst_il_minfo amap m inst x - | FSMeth(g,typ,vref) -> FSMeth(g,InstType inst typ,vref) - | DefaultStructCtor(g,typ) -> DefaultStructCtor(g,InstType inst typ) - -let AnalyzeTypeOfMemberVal g (typ,vref) = - (* if vref.RecursiveValInfo then retTy else *) - let tps,_,retTy,_ = GetTypeOfMemberInMemberForm g vref - - let parentTyargs = tinst_of_stripped_typ g typ - let memberParentTypars,memberMethodTypars = List.chop parentTyargs.Length tps - - memberParentTypars,memberMethodTypars,retTy,parentTyargs - - -type MethInfo with - member x.LogicalName = - match x with - | ILMeth(g,y) -> y.ILName - | FSMeth(_,_,vref) -> vref.MemberInfo.Value.LogicalName - | DefaultStructCtor _ -> ".ctor" - - member x.ActualTypeInst = - match x with - | ILMeth(g,y) -> y.ActualTypeInst - | FSMeth(g,_,_) | DefaultStructCtor(g,_) -> tinst_of_stripped_typ g x.EnclosingType - - member x.FormalMethodTypars = - match x with - | ILMeth(g,ILMethInfo(tinfo,extInfo,_,mtps)) -> mtps - | FSMeth(g,typ,vref) -> - let _,mtps,_,_ = AnalyzeTypeOfMemberVal g (typ,vref) - mtps - | DefaultStructCtor _ -> [] - - member x.FormalMethodInst = generalize_typars x.FormalMethodTypars - - member x.XmlDoc = - match x with - | ILMeth(_,x) -> emptyXmlDoc - | FSMeth(_,_,vref) -> vref.XmlDoc - | DefaultStructCtor _ -> emptyXmlDoc - - member x.ArbitraryValRef = - match x with - | ILMeth(g,x) -> None - | FSMeth(g,_,vref) -> Some(vref) - | DefaultStructCtor _ -> None - -let mk_fs_minfo_tinst ttps mtps tinst minst = (mk_typar_inst ttps tinst @ mk_typar_inst mtps minst) - -let CompiledReturnTyOfMeth amap m minfo minst = - match minfo with - | ILMeth(g,ilminfo) -> GetCompiledReturnTyOfILMethod amap m ilminfo minst - | FSMeth(g,typ,vref) -> - let ttps,mtps,retTy,tinst = AnalyzeTypeOfMemberVal g (typ,vref) - Option.map (InstType (mk_fs_minfo_tinst ttps mtps tinst minst)) retTy - | DefaultStructCtor _ -> None - -let FSharpReturnTyOfMeth amap m minfo minst = - CompiledReturnTyOfMeth amap m minfo minst |> GetFSharpViewOfReturnType amap.g - -let ParamOfArgInfo (ty,TopArgInfo(_,id)) = (Option.map text_of_id id,ty) - -let ParamsOfMember g vref = ArgInfosOfMember g vref |> List.mapSquared ParamOfArgInfo - -let InstParam inst param = - map2'2 (InstType inst) param - -let InstParams inst paramTypes = - paramTypes |> List.mapSquared (InstParam inst) - -let ParamTypesOfMethInfo amap m minfo minst = - match minfo with - | ILMeth(g,ilminfo) -> - [ ilminfo.ArgTypes(amap,m,minst) ] - | FSMeth(g,typ,vref) -> - let ttps,mtps,_,tinst = AnalyzeTypeOfMemberVal g (typ,vref) - let paramTypes = ParamsOfMember g vref - let inst = (mk_fs_minfo_tinst ttps mtps tinst minst) - paramTypes |> List.mapSquared (snd >> InstType inst) - | DefaultStructCtor _ -> [] - -let ObjTypesOfMethInfo amap m minfo minst = - match minfo with - | ILMeth(g,ilminfo) -> objtys_of_il_minfo amap m ilminfo minst - | FSMeth(g,typ,vref) -> if vref.IsInstanceMember then [typ] else [] - | DefaultStructCtor _ -> [] - - -/// The caller-side value for the optional arg, is any -type OptionalArgCallerSideValue = - | Constant of IL.ILFieldInit - | DefaultValue - | MissingValue - | WrapperForIDispatch - | WrapperForIUnknown - | PassByRef of Tast.typ * OptionalArgCallerSideValue - -type OptionalArgInfo = - /// The argument is not optional - | NotOptional - /// The argument is optional, and is an F# callee-side optional arg - | CalleeSide - /// The argument is optional, and is a caller-side .NET optional or default arg - | CallerSide of OptionalArgCallerSideValue - - -let ParamAttribsOfMethInfo amap m minfo = - match minfo with - | ILMeth(g,x) -> - x.ParamMetadata - |> List.map (fun p -> - let isParamArrayArg = ILThingHasAttrib g.attrib_ParamArrayAttribute p.paramCustomAttrs - let isOutArg = (p.paramOut && not p.paramIn) - (* Note: we get default argument values frmo VB and other .NET language metadata *) - let optArgInfo = - if p.paramOptional then - CallerSide (match p.paramDefault with - | None -> - let rec analyze ty = - if is_byref_typ g ty then - let ty = dest_byref_typ g ty - PassByRef (ty, analyze ty) - elif is_obj_typ g ty then - if ILThingHasAttrib g.attrib_IDispatchConstantAttribute p.paramCustomAttrs then - WrapperForIDispatch - elif ILThingHasAttrib g.attrib_IUnknownConstantAttribute p.paramCustomAttrs then - WrapperForIUnknown - else - MissingValue - else - DefaultValue - analyze (ImportTypeFromMetadata amap m x.MetadataScope x.ActualTypeInst [] p.Type) - - | Some v -> Constant v) - else NotOptional - (isParamArrayArg, isOutArg, optArgInfo)) - |> List.singleton - | FSMeth(g,_,vref) -> - vref - |> ArgInfosOfMember g - |> List.mapSquared (fun (ty,TopArgInfo(attrs,nm)) -> - let isParamArrayArg = HasAttrib g g.attrib_ParamArrayAttribute attrs - // Design Suggestion 1427: Can't specify "out" args in F# - let isOutArg = false - let isOptArg = HasAttrib g g.attrib_OptionalArgumentAttribute attrs - // Note: can't specify caller-side default arguments in F#, by design (default is specified on the callee-side) - let optArgInfo = if isOptArg then CalleeSide else NotOptional - (isParamArrayArg,isOutArg,optArgInfo)) - | DefaultStructCtor _ -> - [[]] - -// REVIEW: should attributes always be empty here? -let mk_slotparam (ty,TopArgInfo(attrs,nm)) = TSlotParam(Option.map text_of_id nm, ty, false,false,false,attrs) - -let mk_slotsig (nm,typ,ctps,mtps,paraml,retTy) = copy_slotsig (TSlotSig(nm,typ,ctps,mtps,paraml, retTy)) - -// slotsigs must contain the formal types for the arguments and return type -// a _formal_ 'void' return type is represented as a 'unit' type. -// slotsigs are independent of instantiation: if an instantiation -// happens to make the return type 'unit' (i.e. it was originally a variable type -// then that does not correspond to a slotsig compiled as a 'void' return type. -// REVIEW: should we copy down attributes to slot params? -let SlotsigOfILMethInfo g amap m (ILMethInfo(tinfo,_,mdef,filmtps)) = - let tcref = tcref_of_stripped_typ g tinfo.ToType - let filtctps = tcref.Typars(m) - let ftctps = CopyTypars filtctps - let _,ftctptys = FixupNewTypars m [] [] filtctps ftctps - let ftinfo = tinfo_of_il_typ g (TType_app(tcref,ftctptys)) - let fmtps = CopyTypars filmtps - let _,fmtptys = FixupNewTypars m ftctps ftctptys filmtps fmtps - let frty = ImportReturnTypeFromMetaData amap m mdef.mdReturn.Type ftinfo.ILScopeRef ftinfo.TypeInst fmtptys - let fparams = - [ mdef.mdParams |> List.map (fun p -> - TSlotParam(p.paramName, ImportTypeFromMetadata amap m ftinfo.ILScopeRef ftinfo.TypeInst fmtptys p.Type,p.paramIn, p.paramOut, p.paramOptional,[])) ] - mk_slotsig(mdef.mdName,tinfo.ToType,ftctps, fmtps,fparams, frty) - -let SlotSigOfMethodInfo amap m minfo = - match minfo with - | ILMeth(g,x) -> SlotsigOfILMethInfo g amap m x - | FSMeth(g,typ,vref) -> - match vref.RecursiveValInfo with - | ValInRecScope(false) -> error(Error("Invalid recursive reference to an abstract slot",m)); - | _ -> () - - let tps,_,retTy,_ = GetTypeOfMemberInMemberForm g vref - let ctps = (tcref_of_stripped_typ g typ).Typars(m) - let ctpsorig,fmtps = List.chop ctps.Length tps - let crenaming,_ = mk_typar_to_typar_renaming ctpsorig ctps - let fparams = - vref - |> ArgInfosOfMember g - //|> (function [argInfos] -> argInfos | _ -> error(Error("An abstract slot may not have a curried type. Use a type 'M : arg1 * ... * argN -> result'",m))) - |> List.mapSquared (map1'2 (InstType crenaming) >> mk_slotparam ) - let frty = Option.map (InstType crenaming) retTy - mk_slotsig(minfo.LogicalName,minfo.EnclosingType,ctps,fmtps,fparams, frty) - | DefaultStructCtor _ -> error(InternalError("no slotsig for DefaultStructCtor",m)) - -// The slotsig returned by SlotSigOfMethodInfo is in terms of the type parameters on the parent type of the overriding method, -// -// Reverse-map the slotsig so it is in terms of the type parameters for the overriding method -let ReparentSlotSigToUseMethodTypars g amap m ovByMethValRef slotsig = - - match PartitionValRefTypars g ovByMethValRef with - | Some(_,ctps,_,_,_) -> - let parentToMemberInst,_ = mk_typar_to_typar_renaming (ovByMethValRef.MemberApparentParent.Typars(m)) ctps - let res = inst_slotsig parentToMemberInst slotsig - if verbose then dprintf "adjust slot %s, #parentToMemberInst = %d, before = %s, after = %s\n" (Layout.showL (ValRefL ovByMethValRef)) (List.length parentToMemberInst) (Layout.showL(SlotSigL slotsig)) (Layout.showL(SlotSigL res)); - res - | None -> - (* Note: it appears PartitionValRefTypars should never return 'None' *) - slotsig - -type MethInfo with - member x.NumArgs = - match x with - | ILMeth(g,x) -> [x.NumParams] - | FSMeth(g,_,vref) -> ParamsOfMember g vref |> List.map List.length - | DefaultStructCtor _ -> [0] - - /// Does the method appear to the user as an instance method? - member x.IsInstance = - match x with - | ILMeth(g,x) -> x.IsInstance - | FSMeth(g,_,vref) -> vref.IsInstanceMember - | DefaultStructCtor _ -> false - - member x.GenericArity = - match x with - | ILMeth(g,x) -> x.GenericArity - | FSMeth(g,typ,vref) -> - let _,mtps,_,_ = AnalyzeTypeOfMemberVal g (typ,vref) - mtps.Length - | DefaultStructCtor _ -> 0 - - member x.IsProtectedAccessiblity = - match x with - | ILMeth(g,x) -> x.IsProtectedAccessibility - | FSMeth _ -> false - | DefaultStructCtor _ -> false - - member x.IsVirtual = - match x with - | ILMeth(g,x) -> x.IsVirtual - | FSMeth(g,_,vref) -> MemberRefIsVirtual vref - | DefaultStructCtor _ -> false - - member x.IsConstructor = - match x with - | ILMeth(g,x) -> x.IsConstructor - | FSMeth(g,_,vref) -> - let flags = (the (vref.MemberInfo)).MemberFlags - (flags.MemberKind = MemberKindConstructor) - | DefaultStructCtor _ -> true - - member x.IsClassConstructor = - match x with - | ILMeth(g,x) -> x.IsClassConstructor - | FSMeth _ -> false - | DefaultStructCtor _ -> false - - // REVIEW: check this for consistency between IL and F# metadata - member x.IsDispatchSlot = - match x with - | ILMeth(g,x) -> - x.IsVirtual - | FSMeth(g,_,vref) as x -> - is_interface_typ g x.EnclosingType || - (let membInfo = (the (vref.MemberInfo)) - membInfo.MemberFlags.MemberIsDispatchSlot) - | DefaultStructCtor _ -> false - - member x.IsFinal = - not x.IsVirtual || - match x with - | ILMeth(g,x) -> x.IsFinal - | FSMeth(g,_,vref) as x -> false - | DefaultStructCtor _ -> true - - member x.IsAbstract = - match x with - | ILMeth(g,x) -> x.IsAbstract - | FSMeth(g,_,vref) as x -> - is_interface_typ g x.EnclosingType || - MemberRefIsAbstract vref - | DefaultStructCtor _ -> false - - member x.TcGlobals = - match x with - | ILMeth(g,_) -> g - | FSMeth(g,_,_) -> g - | DefaultStructCtor (g,_) -> g - - member x.IsNewSlot = - is_interface_typ x.TcGlobals x.EnclosingType || - (x.IsVirtual && - (match x with - | ILMeth(g,x) -> x.IsNewSlot - | FSMeth(g,_,vref) -> MemberRefIsDispatchSlot vref - | DefaultStructCtor _ -> false)) - - member x.IsDefiniteFSharpOverride = - match x with - | ILMeth(g,x) -> false - | FSMeth(g,_,vref) -> MemberRefIsDefiniteFSharpOverride vref - | DefaultStructCtor _ -> false - - - member x.IsExtensionMember = - match x with - | ILMeth(g,x) -> x.ExtensionMethodInfo.IsSome - | FSMeth(g,_,vref) -> vref.IsExtensionMember - | DefaultStructCtor _ -> false - - member x.IsFSharpEventProperty = - match x with - | FSMeth(g,_,vref) -> vref.IsFSharpEventProperty(g) - | _ -> false - -/// Type-qualified static property accessors for properties commonly used as first-class values -[] -module MethInfo = - let IsVirtual(m:MethInfo) = m.IsVirtual - let IsNewSlot(m:MethInfo) = m.IsNewSlot - let IsDefiniteFSharpOverride(m:MethInfo) = m.IsDefiniteFSharpOverride - let LogicalName(m:MethInfo) = m.LogicalName - - -let minfo_is_nullary (minfo:MethInfo) = (minfo.NumArgs = [0]) -let minfo_is_struct g (x:MethInfo) = x.EnclosingType|> is_struct_typ g - - - -type PropInfo with - member x.PropertyName = - match x with - | ILProp(_,x) -> x.PropertyName - | FSProp(_,typ,Some vref,_) - | FSProp(_,typ,_, Some vref) -> - PropertyNameOfMemberValRef vref - | FSProp _ -> failwith "unreachable" - - member x.GetterMethod = - match x with - | ILProp(g,x) -> ILMeth(g,x.GetterMethod) - | FSProp(g,typ,Some vref,_) -> FSMeth(g,typ,vref) - | FSProp _ -> failwith "no getter method" - - member x.SetterMethod = - match x with - | ILProp(g,x) -> ILMeth(g,x.SetterMethod) - | FSProp(g,typ,_,Some vref) -> FSMeth(g,typ,vref) - | FSProp _ -> failwith "no setter method" - - member x.HasGetter = - match x with - | ILProp(_,x) -> x.HasGetter - | FSProp(_,_,x,_) -> isSome x - - member x.HasSetter = - match x with - | ILProp(_,x) -> x.HasSetter - | FSProp(_,_,_,x) -> isSome x - - member x.EnclosingType = - match x with - | ILProp(_,x) -> x.ILTypeInfo.ToType - | FSProp(_,typ,_,_) -> typ - - - /// True if the getter (or, if absent, the setter) is a virtual method - // REVIEW: for IL properties this is getter OR setter. For F# properties it is getter ELSE setter - member x.IsVirtualProperty = - match x with - | ILProp(_,x) -> il_pinfo_is_virt x - | FSProp(_,typ,Some vref,_) - | FSProp(_,typ,_, Some vref) -> MemberRefIsVirtual vref - | FSProp _-> failwith "unreachable" - - - // REVIEW: this doesn't accord precisely with the IsNewSlot definition for members - member x.IsNewSlot = - match x with - | ILProp(_,x) -> il_pinfo_is_newslot x - | FSProp(_,typ,Some vref,_) - | FSProp(_,typ,_, Some vref) -> MemberRefIsDispatchSlot vref - | FSProp(_,_,None,None) -> failwith "unreachable" - - - /// True if the getter (or, if absent, the setter) for the property is a dispatch slot - // REVIEW: for IL properties this is getter OR setter. For F# properties it is getter ELSE setter - member x.IsDispatchSlot = - match x with - | ILProp(_,x) -> il_pinfo_is_virt x - | FSProp(g,typ,Some vref,_) - | FSProp(g,typ,_, Some vref) -> - is_interface_typ g typ || - (let membInfo = (the (vref.MemberInfo)) - membInfo.MemberFlags.MemberIsDispatchSlot) - | FSProp _ -> failwith "unreachable" - - member x.IsAbstract = - match x with - | ILProp(_,x) -> il_pinfo_is_abstract x - | FSProp(_,typ,Some vref,_) - | FSProp(_,typ,_, Some vref) -> MemberRefIsAbstract vref - | FSProp _ -> failwith "unreachable" - - member x.IsStatic = - match x with - | ILProp(_,x) -> x.IsStatic - | FSProp(_,_,Some vref,_) - | FSProp(_,_,_, Some vref) -> not vref.IsInstanceMember - | FSProp(_,_,None,None) -> failwith "unreachable" - - member x.IsDefiniteFSharpOverride = - match x with - | ILProp _ -> false - | FSProp(_,_,Some vref,_) - | FSProp(_,_,_,Some vref) -> MemberRefIsDefiniteFSharpOverride vref - | FSProp(_,_,None,None) -> failwith "unreachable" - - member x.IsIndexer = - match x with - | ILProp(_,ILPropInfo(tinfo,pdef)) -> pdef.propArgs <> [] - | FSProp(g,typ,Some vref,_) -> - // A getter has signature { OptionalObjectType } -> Unit -> PropertyType - // A getter indexer has signature { OptionalObjectType } -> TupledIndexerArguments -> PropertyType - let arginfos = ArgInfosOfMember g vref - arginfos.Length = 1 && arginfos.Head.Length >= 1 - | FSProp(g,typ,_, Some vref) -> - // A setter has signature { OptionalObjectType } -> PropertyType -> Void - // A setter indexer has signature { OptionalObjectType } -> TupledIndexerArguments -> PropertyType -> Void - let arginfos = ArgInfosOfMember g vref - arginfos.Length = 1 && arginfos.Head.Length >= 2 - | FSProp(_,typ,None,None) -> - failwith "unreachable" - - member x.IsFSharpEventProperty = - match x with - | FSProp(g,typ,Some vref,None) -> vref.IsFSharpEventProperty(g) - | _ -> false - - member x.XmlDoc = - match x with - | ILProp(_,x) -> emptyXmlDoc - | FSProp(_,typ,Some vref,_) - | FSProp(_,typ,_, Some vref) -> vref.XmlDoc - | FSProp(_,typ,None,None) -> failwith "unreachable" - - member x.IsValueType = - match x with - | ILProp(g,_) -> x.EnclosingType |> is_struct_typ g - | FSProp(g,_,_,_) -> x.EnclosingType |> is_struct_typ g - - member x.ArbitraryValRef = - match x with - | ILProp(_,x) -> None - | FSProp(_,typ,Some vref,_) - | FSProp(_,typ,_, Some vref) -> Some(vref) - | FSProp(_,typ,None,None) -> failwith "unreachable" - - - -/// Type-qualified static property accessors for properties commonly used as first-class values -[] -module PropInfo = - let HasGetter(m:PropInfo) = m.HasGetter - let IsVirtualProperty(m:PropInfo) = m.IsVirtualProperty - let IsDefiniteFSharpOverride(m:PropInfo) = m.IsDefiniteFSharpOverride - let IsNewSlot(m:PropInfo) = m.IsNewSlot - let HasSetter(m:PropInfo) = m.HasSetter - let EnclosingType(m:PropInfo) = m.EnclosingType - let PropertyName(m:PropInfo) = m.PropertyName - -let ParamNamesAndTypesOfPropInfo amap m = function - | ILProp (_,x) -> params_of_il_pinfo amap m x - | FSProp (g,typ,Some vref,_) - | FSProp (g,typ,_,Some vref) -> - let ttps,mtps,retTy,tinst = AnalyzeTypeOfMemberVal amap.g (typ,vref) - let inst = mk_typar_inst ttps tinst - ArgInfosOfPropertyVal g (deref_val vref) |> List.map (ParamOfArgInfo >> InstParam inst) - | FSProp _ -> failwith "param_typs_of_pinfo: unreachable" - -let PropertyTypeOfPropInfo amap m = function - | ILProp (_,x) -> vtyp_of_il_pinfo amap m x - | FSProp (g,typ,Some vref,_) - | FSProp (g,typ,_,Some vref) -> - let ttps,mtps,retTy,tinst = AnalyzeTypeOfMemberVal amap.g (typ,vref) - let inst = mk_typar_inst ttps tinst - ReturnTypeOfPropertyVal g (deref_val vref) - |> InstType inst - - | FSProp _ -> failwith "vtyp_typs_of_pinfo: unreachable" - -let ParamTypesOfPropInfo amap m pinfo = List.map snd (ParamNamesAndTypesOfPropInfo amap m pinfo) - -/// Used to hide/filter members from super classes based on signature *) -let PropInfosEquivByNameAndPartialSig erasureFlag g amap m (pinfo:PropInfo) (pinfo2:PropInfo) = - pinfo.PropertyName = pinfo2.PropertyName && - let argtys = ParamTypesOfPropInfo amap m pinfo - let argtys2 = ParamTypesOfPropInfo amap m pinfo2 - List.lengthsEqAndForall2 (type_equiv_aux erasureFlag g) argtys argtys2 - -//------------------------------------------------------------------------- -// events -//------------------------------------------------------------------------- - -exception BadEventTransformation of range - -/// Properties compatible with type IDelegateEvent and atributed with CLIEvent are special: we generate metadata and add/remove methods -/// to make them into a .NET event, and mangle the name of a property. -/// We don't handle static, indexer or abstract properties correctly. -/// Note the name mangling doesn't affect the name of the get/set methods for the property -/// and so doesn't affect how we compile F# accesses to the property. -let TypConformsToIDelegateEvent g ty = - is_fslib_IDelegateEvent_ty g ty && is_delegate_typ g (dest_fslib_IDelegateEvent_ty g ty) - - -/// Create an error object to raise should an event not have the shape expected by the .NET idiom described further below -let nonStandardEventError nm m = - Error ("The event '"^nm^" has a non-standard type. If this event is declared in another .NET language, you may need to access this event using the explicit add_"^nm^" and remove_"^nm^" methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'",m) - -let FindDelegateTypeOfPropertyEvent g amap nm m ty = - match SearchEntireHierarchyOfType (TypConformsToIDelegateEvent g) g amap m ty with - | None -> error(nonStandardEventError nm m) - | Some ty -> dest_fslib_IDelegateEvent_ty g ty - -type EventInfo with - member x.EventName = match x with ILEvent(_,e) -> e.Name | FSEvent (_,p,_,_) -> p.PropertyName - - member x.IsStatic = match x with ILEvent(_,e) -> e.IsStatic | FSEvent (_,p,_,_) -> p.IsStatic - member x.GetDelegateType(amap,m) = - match x with - | ILEvent(_,e) -> - if isNone e.RawMetadata.eventType then error (nonStandardEventError x.EventName m); - - DelegateTypeOfILEventInfo amap m e - | FSEvent(g,p,_,_) -> - FindDelegateTypeOfPropertyEvent g amap x.EventName m (PropertyTypeOfPropInfo amap m p) - - member x.IsValueType = - match x with - | ILEvent(_,e) -> e.ILTypeInfo.IsValueType - | FSEvent (_,p,_,_) -> p.IsValueType - member x.GetAddMethod(m) = - match x with - | ILEvent(g,e) -> ILMeth(g,e.AddMethod) - | FSEvent(g,p,addValRef,_) -> FSMeth(g,p.EnclosingType,addValRef) - member x.GetRemoveMethod(m) = - match x with - | ILEvent(g,e) -> ILMeth(g,e.RemoveMethod) - | FSEvent(g,p,_,removeValRef) -> FSMeth(g,p.EnclosingType,removeValRef) - - - - - - -//------------------------------------------------------------------------- -// finfo -//------------------------------------------------------------------------- - - -let FieldTypeOfILFieldInfo amap m (ILFieldInfo (tinfo,fdef)) = - ImportTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInst [] fdef.fdType - - -type ParamData = ParamData of bool * bool * OptionalArgInfo * string option * typ - -let ParamDatasOfMethInfo amap m minfo minst = - let paramInfos = - match minfo with - | ILMeth(g,ilminfo) -> - [ ilminfo.ParamInfos(amap,m,minst) ] - | FSMeth(g,typ,vref) -> - let ttps,mtps,_,tinst = AnalyzeTypeOfMemberVal g (typ,vref) - let paramTypes = ParamsOfMember g vref - let inst = (mk_fs_minfo_tinst ttps mtps tinst minst) - paramTypes |> InstParams inst - | DefaultStructCtor _ -> - [[]] - let paramAttribs = ParamAttribsOfMethInfo amap m minfo - (paramAttribs,paramInfos) ||> List.map2 (List.map2 (fun (isParamArrayArg,isOutArg,optArgInfo) (nmOpt,pty)-> - ParamData(isParamArrayArg,isOutArg,optArgInfo,nmOpt,pty))) - - -//------------------------------------------------------------------------- -// Printing -//------------------------------------------------------------------------- - -let FormatMethArgToBuffer denv os (ParamData(isParamArrayArg,isOutArg,optArgInfo,nmOpt,pty)) = - let isOptArg = optArgInfo <> NotOptional - match nmOpt, isOptArg, try_dest_option_ty denv.g pty with - // Layout an optional argument - | Some(nm), true, Some(pty) -> - bprintf os "?%s: %a" nm (NicePrint.output_typ denv) pty - // Layout an unnamed argument - | None, _,_ -> - bprintf os "%a" (NicePrint.output_typ denv) pty; - // Layout a named argument - | Some nm,_,_ -> - bprintf os "%s: %a" nm (NicePrint.output_typ denv) pty - - -let FormatMethInfoToBuffer amap m denv os minfo = - match minfo with - | DefaultStructCtor(g,typ) -> - bprintf os "%a()" (NicePrint.output_tcref denv) (tcref_of_stripped_typ g minfo.EnclosingType); - | FSMeth(g,_,vref) -> - NicePrint.output_qualified_val_spec denv os (deref_val vref) - | ILMeth(g,ilminfo) -> - // Prettify this baby - let minfo,minst = - let (ILMethInfo(ILTypeInfo(tcref,tref,tinst,tdef),extInfo,mdef,filmtps)) = ilminfo - let _,tys,_ = PrettyTypes.PrettifyTypesN g (tinst @ minfo.FormalMethodInst) - let tinst,minst = List.chop tinst.Length tys - let minfo = mk_il_minfo amap m (ILTypeInfo(tcref,tref,tinst,tdef)) extInfo mdef - minfo,minst - - let retTy = FSharpReturnTyOfMeth amap m minfo minst - bprintf os "%a" (NicePrint.output_tcref denv) (tcref_of_stripped_typ g minfo.EnclosingType); - if minfo.LogicalName = ".ctor" then - bprintf os "(" - else - bprintf os ".%a(" (NicePrint.output_typars denv minfo.LogicalName) minfo.FormalMethodTypars; - let paramDatas = ParamDatasOfMethInfo amap m minfo minst - paramDatas |> List.iter (List.iteri (fun i arg -> - if i > 0 then bprintf os ", "; - FormatMethArgToBuffer denv os arg)) - bprintf os ") : %a" (NicePrint.output_typ denv) retTy - -let string_of_minfo amap m denv d = bufs (fun buf -> FormatMethInfoToBuffer amap m denv buf d) -let string_of_param_data denv paramData = bufs (fun buf -> FormatMethArgToBuffer denv buf paramData) - - -(*------------------------------------------------------------------------- -!* Basic accessibility logic - *------------------------------------------------------------------------- *) - -/// What keys do we have to access other constructs? -type AccessorDomain = - | AccessibleFrom of - CompilationPath list * (* we have the keys to access any members private to the given paths *) - TyconRef option (* we have the keys to access any protected members of the super types of 'TyconRef' *) - | AccessibleFromEverywhere - | AccessibleFromSomeFSharpCode // everything but .NET private/internal stuff - | AccessibleFromSomewhere // everything - -module AccessibilityLogic = - - - let private il_tyaccess_accessible access = - access = TypeAccess_public || access = TypeAccess_nested MemAccess_public - - let private IsAccessible ad taccess = - match ad with - | AccessibleFromEverywhere -> can_access_from_everywhere taccess - | AccessibleFromSomeFSharpCode -> can_access_from_somewhere taccess - | AccessibleFromSomewhere -> true - | AccessibleFrom (cpaths,tcrefViewedFromOption) -> - (* REVIEW: protected access in F# code *) - List.exists (can_access_from taccess) cpaths - - let private CheckILMemberAccess g amap m (ILTypeInfo(tcrefOfViewedItem,_,_,_)) ad access = - match ad with - | AccessibleFromEverywhere -> - access = MemAccess_public - | AccessibleFromSomeFSharpCode -> - (access = MemAccess_public || - access = MemAccess_family || - access = MemAccess_famorassem) - | AccessibleFrom (cpaths,tcrefViewedFromOption) -> - let accessibleByFamily = - ((access = MemAccess_family || - access = MemAccess_famorassem) && - match tcrefViewedFromOption with - | None -> false - | Some tcrefViewedFrom -> - ExistsInEntireHierarchyOfType (fun typ -> is_stripped_tyapp_typ g typ && tcref_eq g (tcref_of_stripped_typ g typ) tcrefOfViewedItem) g amap m (generalize_tcref tcrefViewedFrom |> snd)) - let accessibleByInternalsVisibleTo = - (access = MemAccess_assembly && can_access_cpath_from_one_of cpaths tcrefOfViewedItem.CompilationPath) - (access = MemAccess_public) || accessibleByFamily || accessibleByInternalsVisibleTo - | AccessibleFromSomewhere -> - true - - let private tdef_accessible tdef = - il_tyaccess_accessible tdef.tdAccess - - // is tcref visible through the AccessibleFrom(cpaths,_)? note: InternalsVisibleTo extends those cpaths. - let private tcref_accessible_via_visible_to ad (tcrefOfViewedItem:TyconRef) = - match ad with - | AccessibleFromEverywhere | AccessibleFromSomewhere | AccessibleFromSomeFSharpCode -> false - | AccessibleFrom (cpaths,tcrefViewedFromOption) -> - can_access_cpath_from_one_of cpaths tcrefOfViewedItem.CompilationPath - - let private il_tinfo_accessible ad (ILTypeInfo(tcrefOfViewedItem,_,tinst,tdef)) = - tdef_accessible tdef || tcref_accessible_via_visible_to ad tcrefOfViewedItem - - let private il_mem_accessible g amap m ad tinfo access = - il_tinfo_accessible ad tinfo && CheckILMemberAccess g amap m tinfo ad access - - let IsEntityAccessible ad (tcref:TyconRef) = - if tcref.IsILTycon then - (tcref_accessible_via_visible_to ad tcref) || // either: visibleTo (e.g. InternalsVisibleTo) - (let scoref,enc,tdef = tcref.ILTyconInfo // or: accessible, along with all enclosing types - List.forall tdef_accessible enc && - tdef_accessible tdef) - else - tcref.Accessibility |> IsAccessible ad - - let CheckTyconAccessible m ad tcref = - let res = IsEntityAccessible ad tcref - if not res then - errorR(Error("The type '"^tcref.DisplayName^"' is not accessible from this code location",m)) - res - - let IsTyconReprAccessible ad tcref = - IsEntityAccessible ad tcref && - IsAccessible ad tcref.TypeReprAccessibility - - let CheckTyconReprAccessible m ad tcref = - CheckTyconAccessible m ad tcref && - (let res = IsAccessible ad tcref.TypeReprAccessibility - if not res then - errorR (Error ("The union cases or fields of the type '"^tcref.DisplayName^"' are not accessible from this code location",m)); - res) - - let rec IsTypeAccessible g ad ty = - not (is_stripped_tyapp_typ g ty) || - let tcref,tinst = dest_stripped_tyapp_typ g ty - IsEntityAccessible ad tcref && IsTypeInstAccessible g ad tinst - - and IsTypeInstAccessible g ad tinst = - match tinst with - | [] -> true - | _ -> List.forall (IsTypeAccessible g ad) tinst - - let IsILFieldInfoAccessible g amap m ad (ILFieldInfo (tinfo,fd)) = - il_mem_accessible g amap m ad tinfo fd.fdAccess - - let IsILEventInfoAccessible g amap m ad (ILEventInfo (tinfo,edef)) = - il_mem_accessible g amap m ad tinfo (edef_accessibility tinfo.RawMetadata edef) - - let IsILMethInfoAccessible g amap m ad (ILMethInfo (tinfo,_,mdef,_)) = - il_mem_accessible g amap m ad tinfo mdef.mdAccess - - let IsILPropInfoAccessible g amap m ad (ILPropInfo(tinfo,pdef)) = - il_mem_accessible g amap m ad tinfo (pdef_accessibility tinfo.RawMetadata pdef) - - let IsValAccessible ad (vref:ValRef) = - vref.Accessibility |> IsAccessible ad - - let CheckValAccessible m ad (vref:ValRef) = - if not (IsValAccessible ad vref) then - errorR (Error ("The value '"^vref.MangledName^"' is not accessible from this code location",m)) - - let IsUnionCaseAccessible ad (ucref:UnionCaseRef) = - IsTyconReprAccessible ad ucref.TyconRef && - IsAccessible ad ucref.UnionCase.Accessibility - - let CheckUnionCaseAccessible m ad (ucref:UnionCaseRef) = - CheckTyconReprAccessible m ad ucref.TyconRef && - (let res = IsAccessible ad ucref.UnionCase.Accessibility - if not res then - errorR (Error ("The union case '"^ucref.CaseName^"' is not accessible from this code location",m)) - res) - - let IsRecdFieldAccessible ad (rfref:RecdFieldRef) = - IsTyconReprAccessible ad rfref.TyconRef && - IsAccessible ad rfref.RecdField.Accessibility - - let CheckRecdFieldAccessible m ad (rfref:RecdFieldRef) = - CheckTyconReprAccessible m ad rfref.TyconRef && - (let res = IsAccessible ad rfref.RecdField.Accessibility - if not res then - errorR (Error ("The record, struct or class field '"^rfref.FieldName^"' is not accessible from this code location",m)) - res) - - let CheckRecdFieldInfoAccessible m ad (rfinfo:RecdFieldInfo) = - CheckRecdFieldAccessible m ad rfinfo.RecdFieldRef |> ignore - - let CheckILFieldInfoAccessible g amap m ad finfo = - if not (IsILFieldInfoAccessible g amap m ad finfo) then - errorR (Error (sprintf "The struct or class field '%s' is not accessible from this code location" finfo.FieldName,m)) - - let IsMethInfoAccessible amap m ad = function - | ILMeth (g,x) -> IsILMethInfoAccessible g amap m ad x - | FSMeth (_,_,vref) -> IsValAccessible ad vref - | DefaultStructCtor(g,typ) -> IsTypeAccessible g ad typ - - let IsPropInfoAccessible g amap m ad = function - | ILProp (_,x) -> IsILPropInfoAccessible g amap m ad x - | FSProp (_,_,Some vref,_) - | FSProp (_,_,_,Some vref) -> IsValAccessible ad vref - | _ -> false - -open AccessibilityLogic -(*------------------------------------------------------------------------- -!* Check custom attributes - *------------------------------------------------------------------------- *) - -exception Obsolete of string * range - -module AttributeChecking = - - - let private bindMethInfoAttributes minfo f1 f2 = - match minfo with - | ILMeth (_,x) -> f1 x.RawMetadata.mdCustomAttrs - | FSMeth (_,_,vref) -> f2 vref.Attribs - | DefaultStructCtor _ -> f2 [] - - - let private checkILAttributes g cattrs m = - let (AttribInfo(tref,_)) = g.attrib_SystemObsolete - match ILThingDecodeILAttrib g tref cattrs with - | Some ([CustomElem_string (Some(msg)) ],_) -> - WarnD(Obsolete(msg,m)) - | Some ([CustomElem_string (Some(msg)); CustomElem_bool isError ],_) -> - (if isError then ErrorD else WarnD) (Obsolete(msg,m)) - | Some ([CustomElem_string None ],_) -> - WarnD(Obsolete("",m)) - | Some _ -> - WarnD(Obsolete("",m)) - | None -> - CompleteD - - let TryBindMethInfoAttribute g (AttribInfo(atref,_) as attribSpec) minfo f1 f2 = - bindMethInfoAttributes minfo - (fun ilAttribs -> ILThingDecodeILAttrib g atref ilAttribs |> Option.bind f1) - (fun fsAttribs -> TryFindAttrib g attribSpec fsAttribs |> Option.bind f2) - - - let CheckFSharpAttributes g attribs m = - if isNil attribs then CompleteD - else - (match TryFindAttrib g g.attrib_SystemObsolete attribs with - | Some(Attrib(_,_,[ AttribStringArg(s) ],_,_)) -> - WarnD(Obsolete(s,m)) - | Some(Attrib(_,_,[ AttribStringArg(s); AttribBoolArg(isError) ],_,_)) -> - (if isError then ErrorD else WarnD) (Obsolete(s,m)) - | Some _ -> - WarnD(Obsolete("", m)) - | None -> - CompleteD - ) ++ (fun () -> - - match TryFindAttrib g g.attrib_OCamlCompatibilityAttribute attribs with - | Some(Attrib(_,_,[ AttribStringArg(s) ],_,_)) -> - WarnD(OCamlCompatibility(s,m)) - | Some _ -> - WarnD(OCamlCompatibility("", m)) - | None -> - CompleteD - ) ++ (fun () -> - - match TryFindAttrib g g.attrib_ExperimentalAttribute attribs with - | Some(Attrib(_,_,[ AttribStringArg(s) ],_,_)) -> - WarnD(Experimental(s,m)) - | Some _ -> - WarnD(Experimental("This construct is experimental", m)) - | _ -> - CompleteD - ) ++ (fun () -> - - match TryFindAttrib g g.attrib_UnverifiableAttribute attribs with - | Some _ -> - WarnD(PossibleUnverifiableCode(m)) - | _ -> - CompleteD - ) - - let CheckILAttribsForUnseen g cattrs m = - let (AttribInfo(tref,_)) = g.attrib_SystemObsolete - isSome (ILThingDecodeILAttrib g tref cattrs) - - let CheckAttribsForUnseen g attribs m = - nonNil attribs && - (isSome (TryFindAttrib g g.attrib_SystemObsolete attribs) || - (not g.mlCompatibility && isSome (TryFindAttrib g g.attrib_OCamlCompatibilityAttribute attribs)) - ) - // REVIEW: consider filter out experimental and unverifiable depending on context - - let CheckPropInfoAttributes pinfo m = - match pinfo with - | ILProp(g,ILPropInfo(tinfo,pdef)) -> checkILAttributes g pdef.propCustomAttrs m - | FSProp(g,typ,Some vref,_) - | FSProp(g,typ,_,Some vref) -> CheckFSharpAttributes g vref.Attribs m - | FSProp _ -> failwith "CheckPropInfoAttributes: unreachable" - - let CheckILFieldAttributes g (finfo:ILFieldInfo) m = - checkILAttributes g finfo.RawMetadata.fdCustomAttrs m |> CommitOperationResult - - let CheckMethInfoAttributes g m minfo = - match bindMethInfoAttributes minfo - (fun ilAttribs -> Some(checkILAttributes g ilAttribs m)) - (fun fsAttribs -> Some(CheckFSharpAttributes g fsAttribs m)) with - | Some res -> res - | None -> CompleteD (* no attribute = no errors *) - - let MethInfoIsUnseen g m minfo = - match bindMethInfoAttributes minfo - (fun ilAttribs -> Some(CheckILAttribsForUnseen g ilAttribs m)) - (fun fsAttribs -> Some(CheckAttribsForUnseen g fsAttribs m)) with - | Some res -> res - | None -> false - - let PropInfoIsUnseen m pinfo = - match pinfo with - | ILProp (g,ILPropInfo(tinfo,pdef)) -> CheckILAttribsForUnseen g pdef.propCustomAttrs m - | FSProp (g,typ,Some vref,_) - | FSProp (g,typ,_,Some vref) -> CheckAttribsForUnseen g vref.Attribs m - | FSProp _ -> failwith "CheckPropInfoAttributes: unreachable" - - let CheckEntityAttributes g (x:TyconRef) m = - if x.IsILTycon then - let tdef = x.ILTyconRawMetadata - checkILAttributes g tdef.tdCustomAttrs m - else CheckFSharpAttributes g x.Attribs m - - let CheckUnionCaseAttributes g (x:UnionCaseRef) m = - CheckEntityAttributes g x.TyconRef m ++ (fun () -> - CheckFSharpAttributes g x.Attribs m) - - let CheckRecdFieldAttributes g (x:RecdFieldRef) m = - CheckEntityAttributes g x.TyconRef m ++ (fun () -> - CheckFSharpAttributes g x.PropertyAttribs m) - - let CheckValAttributes g (x:ValRef) m = - CheckFSharpAttributes g x.Attribs m - - let CheckRecdFieldInfoAttributes g (x:RecdFieldInfo) m = - CheckRecdFieldAttributes g x.RecdFieldRef m - - -open AttributeChecking - -//------------------------------------------------------------------------- -// Build calls to F# methods -//------------------------------------------------------------------------- - -/// Consume the arguments in chunks and build applications. This copes with various F# calling signatures -/// all of which ultimately become 'methods'. -/// QUERY: this looks overly complex considering that we are doing a fundamentally simple -/// thing here. -let BuildFSharpMethodApp g m vref vexp vexprty (args: expr list) = - let arities = (arity_of_val (deref_val vref)).AritiesOfArgs - - let args3,(leftover,retTy) = - List.mapfold - (fun (args,fty) arity -> - match arity,args with - | (0|1),[] when type_equiv g (domain_of_fun_typ g fty) g.unit_ty -> mk_unit g m, (args, range_of_fun_typ g fty) - | 0,(arg::argst)-> - warning(InternalError(sprintf "Unexpected zero arity, args = %s" (Layout.showL (Layout.sepListL (Layout.rightL ";") (List.map ExprL args))),m)); - arg, (argst, range_of_fun_typ g fty) - | 1,(arg :: argst) -> arg, (argst, range_of_fun_typ g fty) - | 1,[] -> error(InternalError("expected additional arguments here",m)) - | _ -> - if args.Length < arity then error(InternalError("internal error in getting arguments, n = "^string arity^", #args = "^string args.Length,m)); - let tupargs,argst = List.chop arity args - let tuptys = tupargs |> List.map (type_of_expr g) - (mk_tupled g m tupargs tuptys), - (argst, range_of_fun_typ g fty) ) - (args,vexprty) - arities - if not leftover.IsEmpty then error(InternalError("Unexpected "^string(leftover.Length)^" remaining arguments in method application",m)); - mk_appl g ((vexp,vexprty),[],args3,m), - retTy - -let BuildFSharpMethodCall g m (typ,vref:ValRef) vFlags minst args = - let vexp = TExpr_val (vref,vFlags,m) - let vexpty = vref.Type - let tpsorig,tau = vref.TypeScheme - let vtinst = tinst_of_stripped_typ g typ @ minst - if tpsorig.Length <> vtinst.Length then error(InternalError("BuildFSharpMethodCall: unexpected List.length mismatch",m)); - let expr = mk_tyapp m (vexp,vexpty) vtinst - let exprty = InstType (mk_typar_inst tpsorig vtinst) tau - /// REVIEW: this is passing in the instantiated type. Should this be the formal type? - BuildFSharpMethodApp g m vref expr exprty args - -//------------------------------------------------------------------------- -// Sets of methods up the hierarchy, ignoring duplicates by name and sig. -// Used to collect sets of virtual methods, protected methods, protected -// properties etc. -// REVIEW: this code generalizes the iteration used below for member lookup. -// REVIEW: this doesn't take into account newslot decls. -//------------------------------------------------------------------------- - -let MemberIsExplicitImpl g (membInfo:ValMemberInfo) = - membInfo.MemberFlags.MemberIsOverrideOrExplicitImpl && - match membInfo.ImplementedSlotSigs with - | [] -> false - | slotsigs -> slotsigs |> List.forall (fun slotsig -> is_interface_typ g slotsig.ImplementedType ) - - -let SelectFromMemberVals g f (tcref:TyconRef) = - let aug = tcref.TypeContents - - aug.tcaug_adhoc |> NameMultiMap.chooseRange (fun vref -> - match vref.MemberInfo with - // The 'when' condition is a workaround for the fact that values providing - // override and interface implementations are published in inferred module types - // These cannot be selected directly via the "." notation. - // However, it certainly is useful to be able to publish these values, as we can in theory - // optimize code to make direct calls to these methods. - | Some membInfo when (not (MemberIsExplicitImpl g membInfo)) -> - f membInfo vref - | _ -> - None) - -let checkFilter optFilter nm = match optFilter with None -> true | Some n2 -> nm = n2 - -let TrySelectMemberVal g optFilter typ membInfo vref = - if checkFilter optFilter membInfo.CompiledName then - let tinst = tinst_of_stripped_typ g typ - let ntinst = List.length tinst - Some(FSMeth(g,typ,vref)) - else None - -let GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m typ = - let minfos = - if is_il_named_typ g typ then - let tinfo = tinfo_of_il_typ g typ - let mdefs = (match optFilter with None -> dest_mdefs | Some(nm) -> find_mdefs_by_name nm) tinfo.RawMetadata.tdMethodDefs - mdefs |> List.map (mk_il_minfo amap m tinfo None) - elif not (is_stripped_tyapp_typ g typ) then [] - else SelectFromMemberVals g (TrySelectMemberVal g optFilter typ) (tcref_of_stripped_typ g typ) - let minfos = minfos |> List.filter (IsMethInfoAccessible amap m ad) - minfos - -/// Join up getters and setters which are not associated in the F# data structure -type PropertyCollector(g,amap,m,typ,optFilter,ad) = - - let hashIdentity = - Microsoft.FSharp.Collections.HashIdentity.FromFunctions - (PropInfo.PropertyName >> hash) - (fun pinfo1 pinfo2 -> - PropInfosEquivByNameAndPartialSig EraseNone g amap m pinfo1 pinfo2 && - pinfo1.IsDefiniteFSharpOverride = pinfo2.IsDefiniteFSharpOverride ) - let props = new System.Collections.Generic.Dictionary(hashIdentity) - let add pinfo = - if props.ContainsKey(pinfo) then - match props.[pinfo], pinfo with - | FSProp (_,typ,Some vref1,_), FSProp (_,_,_,Some vref2) - | FSProp (_,typ,_,Some vref2), FSProp (_,_,Some vref1,_) -> - let pinfo = FSProp (g,typ,Some vref1,Some vref2) - props.[pinfo] <- pinfo - | _ -> - // This assert first while editing bad code. We will give a warning later in check.ml - //assert ("unexpected case"= "") - () - else - props.[pinfo] <- pinfo - - member x.Collect(membInfo,vref) = - match membInfo.MemberFlags.MemberKind with - | MemberKindPropertyGet -> - let nm = PropertyNameOfMemberValRef vref - let pinfo = FSProp(g,typ,Some vref,None) - if checkFilter optFilter nm && IsPropInfoAccessible g amap m ad pinfo then - add pinfo - | MemberKindPropertySet -> - let nm = PropertyNameOfMemberValRef vref - let pinfo = FSProp(g,typ,None,Some vref) - if checkFilter optFilter nm && IsPropInfoAccessible g amap m ad pinfo then - add pinfo - | _ -> - () - - member x.Close() = [ for KeyValue(_,pinfo) in props -> pinfo ] - - - -let GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m typ = - let pinfos = - if is_il_named_typ g typ then - let tinfo = tinfo_of_il_typ g typ - let pdefs = (match optFilter with None -> dest_pdefs | Some(nm) -> find_pdefs nm) tinfo.RawMetadata.tdProperties - pdefs |> List.map (fun pd -> ILProp(g,ILPropInfo(tinfo,pd))) - elif not (is_stripped_tyapp_typ g typ) then [] - else - let propCollector = new PropertyCollector(g,amap,m,typ,optFilter,ad) - SelectFromMemberVals g - (fun membInfo vref -> propCollector.Collect(membInfo,vref); None) - (tcref_of_stripped_typ g typ) |> ignore - propCollector.Close() - - let pinfos = pinfos |> List.filter (IsPropInfoAccessible g amap m ad) - pinfos - - - - -//--------------------------------------------------------------------------- -// -//------------------------------------------------------------------------- - -type HierarchyItem = - | MethodItem of MethInfo list list - | PropertyItem of PropInfo list list - | RecdFieldItem of RecdFieldInfo - | ILEventItem of ILEventInfo list - | ILFieldItem of ILFieldInfo list - -/// An InfoReader is an object to help us read and cache infos. -/// We create one of these for each file we typecheck. -/// -/// REVIEW: We could consider sharing one InfoReader across an entire compilation -/// run or have one global one for each (g,amap) pair. -type InfoReader(g:TcGlobals, amap:Import.ImportMap) = - - let getImmediateIntrinsicILFieldsOfType (optFilter,ad) m typ = - let infos = - if is_il_named_typ g typ then - let tinfo = tinfo_of_il_typ g typ - let fdefs = (match optFilter with None -> dest_fdefs | Some(nm) -> find_fdefs nm) tinfo.RawMetadata.tdFieldDefs - List.map (fun pd -> ILFieldInfo(tinfo,pd)) fdefs - elif not (is_stripped_tyapp_typ g typ) then [] - else [] - let infos = infos |> List.filter (IsILFieldInfoAccessible g amap m ad) - infos - - let getImmediateIntrinsicILEventsOfType (optFilter,ad) m typ = - let infos = - if is_il_named_typ g typ then - let tinfo = tinfo_of_il_typ g typ - let edefs = (match optFilter with None -> dest_edefs | Some(nm) -> find_edefs nm) tinfo.RawMetadata.tdEvents - List.map (fun pd -> ILEventInfo(tinfo,pd)) edefs - elif not (is_stripped_tyapp_typ g typ) then [] - else [] - let infos = infos |> List.filter (IsILEventInfoAccessible g amap m ad) - infos - - let mk_rfinfo g typ tcref fspec = RecdFieldInfo(tinst_of_stripped_typ g typ,rfref_of_rfield tcref fspec) - - let getImmediateIntrinsicRecdFieldsOfType nm typ = - match try_tcref_of_stripped_typ g typ with - | None -> None - | Some tcref -> - (* Note;secret fields are not allowed in lookups here, as we're only looking *) - (* up user-visible fields in name resolution. *) - match tcref.GetFieldByName nm with - | Some rfield when not rfield.IsCompilerGenerated -> Some (mk_rfinfo g typ tcref rfield) - | _ -> None - - - /// The primitive reader for the method info sets up a hierarchy - let readRawIntrinsicMethodSetsUncached ((optFilter,ad),m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m typ :: acc) g amap m typ [] - - /// The primitive reader for the property info sets up a hierarchy - let readRawIntrinsicPropertySetsUncached ((optFilter,ad),m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m typ :: acc) g amap m typ [] - - let readIlFieldInfosUncached ((optFilter,ad),m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> getImmediateIntrinsicILFieldsOfType (optFilter,ad) m typ @ acc) g amap m typ [] - - let readIlEventInfosUncached ((optFilter,ad),m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> getImmediateIntrinsicILEventsOfType (optFilter,ad) m typ @ acc) g amap m typ [] - - let findRecdFieldInfoUncached (nm,m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> match getImmediateIntrinsicRecdFieldsOfType nm typ with None -> acc | Some v -> Some v) g amap m typ None - - let readEntireTypeHierachyUncached ((),m,typ) = - FoldEntireHierarchyOfType (fun typ acc -> typ :: acc) g amap m typ [] - - let readPrimaryTypeHierachyUncached ((),m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> typ :: acc) g amap m typ [] - - /// The primitive reader for the named items up a hierarchy - let readRawIntrinsicNamedItemsUncached ((nm,ad),m,typ) = - let optFilter = Some(nm) - FoldPrimaryHierarchyOfType (fun typ acc -> - let minfos = GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m typ - let pinfos = GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m typ - let finfos = getImmediateIntrinsicILFieldsOfType (optFilter,ad) m typ - let einfos = getImmediateIntrinsicILEventsOfType (optFilter,ad) m typ - let rfinfos = getImmediateIntrinsicRecdFieldsOfType nm typ - match acc with - | Some(MethodItem(inheritedMethSets)) when nonNil minfos -> Some(MethodItem (minfos::inheritedMethSets)) - | _ when nonNil minfos -> Some(MethodItem ([minfos])) - | Some(PropertyItem(inheritedPropSets)) when nonNil pinfos -> Some(PropertyItem(pinfos::inheritedPropSets)) - | _ when nonNil pinfos -> Some(PropertyItem([pinfos])) - | _ when nonNil finfos -> Some(ILFieldItem(finfos)) - | _ when nonNil einfos -> Some(ILEventItem(einfos)) - | _ when isSome rfinfos -> Some(RecdFieldItem(rfinfos.Value)) - | _ -> acc) - g amap m - typ - None - - let makeInfoCache g f = - new MemoizationTable<_,_> - (compute=f, - // Only cache closed, monomorphic types (closed = all members for the type - // have been processed). Also don't cache anything involving an inference equations or - // type abbreviations. Generic type instantiations could be processed, but we have - // to be very careful not to cache anything that depends on inference equations or - // type abbreviations, and most instantiations involve some type variables anyway - canMemoize=(fun (flags,(_:range),typ) -> - match typ with - | TType_app(tcref,[]) -> tcref.TypeContents.tcaug_closed - | _ -> false), - - keyEquals=(fun (flags1,_,typ1) (flags2,_,typ2) -> - // Ignore the ranges! - (flags1 = flags2) && - match typ1,typ2 with - | TType_app(tcref1,[]),TType_app(tcref2,[]) -> tcref_eq g tcref1 tcref2 - | _ -> false), - keyHash= (fun (flags,_,typ) -> - hash flags + - (match typ with - | TType_app(tcref,[]) -> hash tcref.MangledName - | _ -> 0))) - - - let methodInfoCache = makeInfoCache g readRawIntrinsicMethodSetsUncached - let propertyInfoCache = makeInfoCache g readRawIntrinsicPropertySetsUncached - let ilFieldInfoCache = makeInfoCache g readIlFieldInfosUncached - let ilEventInfoCache = makeInfoCache g readIlEventInfosUncached - let recdFieldInfoCache = makeInfoCache g findRecdFieldInfoUncached - let namedItemsCache = makeInfoCache g readRawIntrinsicNamedItemsUncached - let entireTypeHierarchyCache = makeInfoCache g readEntireTypeHierachyUncached - let primaryTypeHierarchyCache = makeInfoCache g readPrimaryTypeHierachyUncached - - member x.g = g - member x.amap = amap - - /// Read the method infos for a type - /// - /// Cache the result for monomorphic types - member x.GetRawIntrinsicMethodSetsOfType (optFilter,ad,m,typ) = - methodInfoCache.Apply(((optFilter,ad),m,typ)) - - member x.GetRawIntrinsicPropertySetsOfType (optFilter,ad,m,typ) = - propertyInfoCache.Apply(((optFilter,ad),m,typ)) - - member x.GetILFieldInfosOfType (optFilter,ad,m,typ) = - ilFieldInfoCache.Apply(((optFilter,ad),m,typ)) - - member x.GetILEventInfosOfType (optFilter,ad,m,typ) = - ilEventInfoCache.Apply(((optFilter,ad),m,typ)) - - member x.TryFindRecdFieldInfoOfType (nm,m,typ) = - recdFieldInfoCache.Apply((nm,m,typ)) - - member x.TryFindNamedItemOfType (nm,ad,m,typ) = - namedItemsCache.Apply(((nm,ad),m,typ)) - - member x.ReadEntireTypeHierachy (m,typ) = - entireTypeHierarchyCache.Apply(((),m,typ)) - - member x.ReadPrimaryTypeHierachy (m,typ) = - primaryTypeHierarchyCache.Apply(((),m,typ)) - - -(*------------------------------------------------------------------------- -!* Constructor infos - *------------------------------------------------------------------------- *) - - -let private ConstructorInfosOfILType g amap m typ = - let tdef = tdef_of_il_typ g typ - tdef.Methods - |> IL.find_mdefs_by_name ".ctor" - |> List.filter (fun md -> match md.mdKind with MethodKind_ctor -> true | _ -> false) - |> List.map (mk_il_minfo amap m (tinfo_of_il_typ g typ) None) - -let GetIntrinsicConstructorInfosOfType (infoReader:InfoReader) m ty = - let g = infoReader.g - let amap = infoReader.amap - if verbose then dprintf "--> GetIntrinsicConstructorInfosOfType\n"; - if is_stripped_tyapp_typ g ty then - if is_il_named_typ g ty then - ConstructorInfosOfILType g amap m ty - else - let tcref = tcref_of_stripped_typ g ty - let nm = ".ctor" - let aug = tcref.TypeContents - (* tcaug_adhoc cleanup: this should select from all accessible/available vrefs *) - (* that are part of any augmentation of this type. That's assuming that constructors can *) - (* be in augmentations. *) - let vrefs = NameMultiMap.find nm aug.tcaug_adhoc - vrefs - |> List.choose(fun vref -> - match vref.MemberInfo with - | Some membInfo when (membInfo.MemberFlags.MemberKind = MemberKindConstructor) -> Some(vref) - | _ -> None) - |> List.map (fun x -> FSMeth(g,ty,x)) - else [] - - -(*------------------------------------------------------------------------- -!* Method signatures - *------------------------------------------------------------------------- *) - -let FormalTyparsOfEnclosingTypeOfMethInfo m minfo = - match minfo with - | ILMeth(g,ilminfo) -> - // For extension methods all type variables are on the method - if ilminfo.IsCSharpExtensionMethod then - [] - else - ilminfo.ILTypeInfo |> FormalTyparsOfILTypeInfo m - | FSMeth(g,typ,vref) -> - let ttps,_,_,_ = AnalyzeTypeOfMemberVal g (typ,vref) - ttps - | DefaultStructCtor(g,typ) -> - (tcref_of_stripped_typ g typ).Typars(m) - -let CompiledSigOfMeth g amap m (minfo:MethInfo) = - let fmtps = minfo.FormalMethodTypars - let fminst = generalize_typars fmtps - let vargtys = ParamTypesOfMethInfo amap m minfo fminst - let vrty = CompiledReturnTyOfMeth amap m minfo fminst - - // The formal method typars returned are completely formal - they don't take into account the instantiation - // of the enclosing type. For example, they may have constraints involving the _formal_ type parameters - // of the enclosing type. This instaniations can be used to interpret those type parameters - let fmtpinst = - let tinst = tinst_of_stripped_typ g minfo.EnclosingType - let ttps = FormalTyparsOfEnclosingTypeOfMethInfo m minfo - mk_typar_inst ttps tinst - - vargtys,vrty,fmtps,fmtpinst - -/// Used to hide/filter members from super classes based on signature -let MethInfosEquivByNameAndPartialSig erasureFlag g amap m (minfo:MethInfo) (minfo2:MethInfo) = - (minfo.LogicalName = minfo2.LogicalName) && - (minfo.GenericArity = minfo2.GenericArity) && - let fmtps = minfo.FormalMethodTypars - let fminst = generalize_typars fmtps - let fmtps2 = minfo2.FormalMethodTypars - let fminst2 = generalize_typars fmtps2 - let argtys = ParamTypesOfMethInfo amap m minfo fminst - let argtys2 = ParamTypesOfMethInfo amap m minfo2 fminst2 - (argtys,argtys2) ||> List.lengthsEqAndForall2 (List.lengthsEqAndForall2 (type_aequiv_aux erasureFlag g (mk_tyeq_env fmtps fmtps2))) - -/// Used to hide/filter members from super classes based on signature -let MethInfosEquivByNameAndSig erasureFlag g amap m minfo minfo2 = - MethInfosEquivByNameAndPartialSig erasureFlag g amap m minfo minfo2 && - let argtys,retTy,fmtps,_ = CompiledSigOfMeth g amap m minfo - let argtys2,rty2,fmtps2,_ = CompiledSigOfMeth g amap m minfo2 - match retTy,rty2 with - | None,None -> true - | Some retTy,Some rty2 -> type_aequiv_aux erasureFlag g (mk_tyeq_env fmtps fmtps2) retTy rty2 - | _ -> false - -/// Used to hide/filter members from super classes based on signature *) -let PropInfosEquivByNameAndSig erasureFlag g amap m pinfo pinfo2 = - PropInfosEquivByNameAndPartialSig erasureFlag g amap m pinfo pinfo2 && - let retTy = PropertyTypeOfPropInfo amap m pinfo - let rty2 = PropertyTypeOfPropInfo amap m pinfo2 - type_equiv_aux erasureFlag g retTy rty2 - -/// nb. Prefer items toward the top of the hierarchy if the items are virtual -/// but not when resolving base calls. Also get overrides instead -/// of abstract slots when measuring whether a class/interface implements all its -/// required slots. - -type FindMemberFlag = - | IgnoreOverrides - | PreferOverrides - -/// The input list is sorted from most-derived to least-derived type, so any System.Object methods -/// are at the end of the list. Return a filtered list where prior/subsequent members matching by name and -/// that are in the same equivalence class have been removed. We keep a name-indexed table to -/// be more efficient when we check to see if we've already seen a particular named method. -type IndexedList<'a>(itemLists: 'a list list, itemsByName: 'a NameMultiMap) = - member x.Items = itemLists - member x.ItemsWithName(nm) = NameMultiMap.find nm itemsByName - member x.AddItems(items,nmf) = IndexedList<'a>(items::itemLists,List.foldBack (fun x acc -> NameMultiMap.add (nmf x) x acc) items itemsByName ) - -/// Add all the items to the IndexedList if better items are not already present. This is used to hide methods -/// in super classes and/or hide overrides of methods in subclasses. -/// -/// Assume no items in 'items' are equivalent according to 'equiv'. This is valid because each step in a -/// .NET class hierarchy introduces a consistent set of methods, none of which hide each other within the -/// given set. This is an important optimization because it means we don't have to List.filter for equivalence between the -/// large overload sets introduced by methods like System.WriteLine. -/// -/// Assume items can be given names by 'nmf', where two items with different names are -/// not equivalent. -let private addItemsToIndexedList noBetterThan nmf items (ilist:IndexedList<_>) = - // Have we already seen an item with the same name and that is in the same equivalence class? - // If so, ignore this one. Note we can check against the original incoming 'ilist' because we are assuming that - // none the elements of 'items' are equivalent. - let items = items |> List.filter (fun item -> not (List.exists (noBetterThan item) (ilist.ItemsWithName(nmf item)))) - ilist.AddItems(items,nmf) - -let private emptyIndexedList() = IndexedList([],NameMultiMap.empty) - -let private excludePriorItems noBetterThan nmf = - let rec loop itemLists = - match itemLists with - | [] -> emptyIndexedList() - | items :: rest -> addItemsToIndexedList noBetterThan nmf items (loop rest) - fun itemLists -> (loop itemLists).Items - -let private excludeSubsequentItems equiv nmf = - let rec loop itemLists (acc:IndexedList<_>) = - match itemLists with - | [] -> List.rev acc.Items - | items :: rest -> loop rest (addItemsToIndexedList equiv nmf items acc) - fun itemLists -> loop itemLists (emptyIndexedList()) - -let private filterOverrides findFlag (isvirt:'a->bool,isNewSlot,isDefiniteOverride,equivSigs,nmf:'a->string) items = - let equivVirts x y = isvirt x && isvirt y && equivSigs x y - match findFlag with - | PreferOverrides -> - items - // For each F#-declared override, get rid of any equivalent abstract member in the same type - // This is because F# abstract members with default overrides give rise to two members with the - // same logical signature in the same type, e.g. - // type ClassType1() = - // abstract VirtualMethod1: string -> int - // default x.VirtualMethod1(s) = 3 - - |> List.map (fun items -> - let definiteOverrides = items |> List.filter isDefiniteOverride - items |> List.filter (fun item -> (isDefiniteOverride item || not (List.exists (equivVirts item) definiteOverrides)))) - - // get rid of any virtuals that are signature-equivalent to virtuals in supertypes - |> excludeSubsequentItems equivVirts nmf - | IgnoreOverrides -> - (* A new virtual with the same signature is no better than the original unless it is new slot *) - let noBetterThan item orig = not (isNewSlot item) && equivVirts item orig - items - // Get rid of any F#-declared overrides. THese may occur in the same type as the abstract member (unlike with .NET metadata) - // Include any 'newslot' declared methods. - |> List.map (List.filter (fun x -> not (isDefiniteOverride x))) - // get rid of any virtuals that are signature-equivalent to virtuals in subtypes - |> excludePriorItems noBetterThan nmf - -let FilterOverridesOfMethInfos findFlag g amap m minfos = - filterOverrides findFlag (MethInfo.IsVirtual,MethInfo.IsNewSlot,MethInfo.IsDefiniteFSharpOverride,MethInfosEquivByNameAndSig EraseNone g amap m,MethInfo.LogicalName) minfos - -let FilterOverridesOfPropInfos findFlag g amap m props = - filterOverrides findFlag (PropInfo.IsVirtualProperty,PropInfo.IsNewSlot,PropInfo.IsDefiniteFSharpOverride,PropInfosEquivByNameAndSig EraseNone g amap m, PropInfo.PropertyName) props - -let ExcludeHiddenOfMethInfos g amap m (minfos:MethInfo list list) = - minfos - |> excludeSubsequentItems - (fun m1 m2 -> - (* only hide those truly from super classes *) - not (tcref_eq g (tcref_of_stripped_typ g m1.EnclosingType) (tcref_of_stripped_typ g m2.EnclosingType)) && - MethInfosEquivByNameAndPartialSig EraseNone g amap m m1 m2) - MethInfo.LogicalName - |> List.concat - -let ExcludeHiddenOfPropInfos g amap m pinfos = - pinfos - |> excludeSubsequentItems (PropInfosEquivByNameAndPartialSig EraseNone g amap m) PropInfo.PropertyName - |> List.concat - -let GetIntrinsicMethInfoSetsOfType (infoReader:InfoReader) (optFilter,ad) findFlag m typ = - infoReader.GetRawIntrinsicMethodSetsOfType(optFilter,ad,m ,typ) - |> FilterOverridesOfMethInfos findFlag infoReader.g infoReader.amap m - -let GetIntrinsicPropInfoSetsOfType (infoReader:InfoReader) (optFilter,ad) findFlag m typ = - infoReader.GetRawIntrinsicPropertySetsOfType(optFilter,ad, m,typ) - |> FilterOverridesOfPropInfos findFlag infoReader.g infoReader.amap m - -let GetIntrinsicMethInfosOfType infoReader (optFilter,ad) findFlag m typ = - GetIntrinsicMethInfoSetsOfType infoReader (optFilter,ad) findFlag m typ |> List.concat - -let GetIntrinsicPropInfosOfType infoReader (optFilter,ad) findFlag m typ = - GetIntrinsicPropInfoSetsOfType infoReader (optFilter,ad) findFlag m typ |> List.concat - -let TryFindIntrinsicNamedItemOfType (infoReader:InfoReader) (nm,ad) findFlag m typ = - match infoReader.TryFindNamedItemOfType(nm,ad, m,typ) with - | Some item -> - match item with - | PropertyItem psets -> Some(PropertyItem (psets |> FilterOverridesOfPropInfos findFlag infoReader.g infoReader.amap m)) - | MethodItem msets -> Some(MethodItem (msets |> FilterOverridesOfMethInfos findFlag infoReader.g infoReader.amap m)) - | _ -> Some(item) - | None -> None - -/// Try to detect the existence of a method on a type -/// Used for -/// -- getting the GetEnumerator, get_Current, MoveNext methods for enumerable types -/// -- getting the Dispose method when resolving the 'use' construct -/// -- getting the various methods used to desugar the computation expression syntax -let TryFindMethInfo infoReader m ad nm ty = - GetIntrinsicMethInfosOfType infoReader (Some(nm),ad) IgnoreOverrides m ty - -let TryFindPropInfo infoReader m ad nm ty = - GetIntrinsicPropInfosOfType infoReader (Some(nm),ad) IgnoreOverrides m ty - - -/// Make a call to a method info. Used by the optimizer only to build -/// calls to the type-directed resolutions of overloaded operators -let MakeMethInfoCall amap m minfo minst args = - let vFlags = NormalValUse in (* correct unless if we allow wild trait constraints like "T has a ctor and can be used as a parent class" *) - match minfo with - | ILMeth(g,ilminfo) -> - let direct = not minfo.IsVirtual - let isProp = false in (* not necessarily correct, but this is only used post-creflect where this flag is irrelevant *) - mk_il_minfo_call g amap m isProp ilminfo vFlags minst direct args |> fst - | FSMeth(g,typ,vref) -> - BuildFSharpMethodCall g m (typ,vref) vFlags minst args |> fst - | DefaultStructCtor(_,typ) -> - mk_ilzero (m,typ) - -/// Given a delegate type work out the minfo, argument types, return type -/// and F# function type by looking at the Invoke signature of the delegate. -let GetSigOfFunctionForDelegate (infoReader:InfoReader) delty m ad = - let g = infoReader.g - let amap = infoReader.amap - let minfo = - match GetIntrinsicMethInfosOfType infoReader (Some "Invoke",ad) IgnoreOverrides m delty with - | [h] -> h - | [] -> error(Error("No Invoke methods found for delegate type",m)) - | h :: _ -> warning(InternalError("More than one Invoke method found for delegate type",m)); h - - let minst = [] // a delegate's Invoke method is never generic - let basicDelArgTys = ParamTypesOfMethInfo amap m minfo minst - if basicDelArgTys.Length <> 1 then error(Error("Delegates are not allowed to have curried signatures",m)) - let basicDelArgTys = basicDelArgTys.Head - let delArgTys = if isNil basicDelArgTys then [g.unit_ty] else basicDelArgTys - let delRetTy = FSharpReturnTyOfMeth amap m minfo minst - - CheckMethInfoAttributes g m minfo |> CommitOperationResult; - let fty = mk_iterated_fun_ty delArgTys delRetTy - minfo,basicDelArgTys,delRetTy,fty - -let TryDestStandardDelegateTyp (infoReader:InfoReader) m ad delTy = - let g = infoReader.g - let amap = infoReader.amap - let minfo,delArgTys,delRetTy,_ = GetSigOfFunctionForDelegate infoReader delTy m ad - match delArgTys with - | senderTy :: argTys when (is_obj_typ g senderTy) -> Some(mk_tupled_ty g argTys,delRetTy) - | _ -> None - - -(* We take advantage of the following idiom to simplify away the bogus "object" parameter of the - of the "Add" methods associated with events. If you want to access it you - can use AddHandler instead. - - The .NET Framework guidelines indicate that the delegate type used for - an event should take two parameters, an "object source" parameter - indicating the source of the event, and an "e" parameter that - encapsulates any additional information about the event. The type of - the "e" parameter should derive from the EventArgs class. For events - that do not use any additional information, the .NET Framework has - already defined an appropriate delegate type: EventHandler. - (from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkEventsTutorial.asp) - *) -let IsStandardEventInfo (infoReader:InfoReader) m ad (einfo:EventInfo) = - let dty = einfo.GetDelegateType(infoReader.amap,m) - match TryDestStandardDelegateTyp infoReader m ad dty with - | Some _ -> true - | None -> false - -/// Get the (perhaps tupled) argument type accepted by an event -let ArgsTypOfEventInfo (infoReader:InfoReader) m ad (einfo:EventInfo) = - let g = infoReader.g - let amap = infoReader.amap - let dty = einfo.GetDelegateType(amap,m) - match TryDestStandardDelegateTyp infoReader m ad dty with - | Some(argtys,_) -> argtys - | None -> error(nonStandardEventError einfo.EventName m) - -/// Get the type of the event when looked at as if it is a property -/// Used when displaying the property in Intellisense -let PropTypOfEventInfo (infoReader:InfoReader) m ad (einfo:EventInfo) = - let g = infoReader.g - let amap = infoReader.amap - let delTy = einfo.GetDelegateType(amap,m) - let argsTy = ArgsTypOfEventInfo infoReader m ad einfo - mk_fslib_IEvent2_ty g delTy argsTy diff --git a/tools/FSharp_1.9.6.16/source/fsharp/layout.ml b/tools/FSharp_1.9.6.16/source/fsharp/layout.ml deleted file mode 100644 index 36c717d0..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/layout.ml +++ /dev/null @@ -1,325 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved -#light - -module Microsoft.FSharp.Compiler.Layout - -open System -open System.IO -open Internal.Utilities.StructuredFormat -open Microsoft.FSharp.Text.Printf - -#nowarn "62" // This construct is for compatibility with OCaml. - -type layout = Internal.Utilities.StructuredFormat.Layout -let spaces n = new String(' ',n) - - -//-------------------------------------------------------------------------- -// INDEX: support -//-------------------------------------------------------------------------- - -let rec juxtLeft = function - Leaf (jl,text,jr) -> jl - | Node (jl,l,jm,r,jr,joint) -> jl - | Attr (tag,attrs,l) -> juxtLeft l - -let rec juxtRight = function - Leaf (jl,text,jr) -> jr - | Node (jl,l,jm,r,jr,joint) -> jr - | Attr (tag,attrs,l) -> juxtRight l - -(* NOTE: - * emptyL might be better represented as a constructor, - * so then (Sep"") would have true meaning - *) -let emptyL = Leaf (true,box "",true) -let isEmptyL = function Leaf(true,tag,true) when unbox tag = "" -> true | _ -> false - -let mkNode l r joint = - if isEmptyL l then r else - if isEmptyL r then l else - let jl = juxtLeft l in - let jm = juxtRight l || juxtLeft r in - let jr = juxtRight r in - Node(jl,l,jm,r,jr,joint) - - -//-------------------------------------------------------------------------- -//INDEX: constructors -//-------------------------------------------------------------------------- - -let wordL (str:string) = Leaf (false,box str,false) -let sepL (str:string) = Leaf (true ,box str,true) -let rightL (str:string) = Leaf (true ,box str,false) -let leftL (str:string) = Leaf (false,box str,true) - -let aboveL l r = mkNode l r (Broken 0) -let joinN i l r = mkNode l r (Breakable i) -let join = joinN 0 -let join1 = joinN 1 -let join2 = joinN 2 -let join3 = joinN 3 - -let tagAttrL str attrs ly = Attr (str,attrs,ly) -let linkL str ly = tagAttrL "html:a" [("href",str)] ly - -//-------------------------------------------------------------------------- -//INDEX: constructors derived -//-------------------------------------------------------------------------- - -let apply2 f l r = if isEmptyL l then r else - if isEmptyL r then l else f l r - -let ($$) l r = mkNode l r (Unbreakable) -let (++) l r = mkNode l r (Breakable 0) -let (--) l r = mkNode l r (Breakable 1) -let (---) l r = mkNode l r (Breakable 2) -let (----) l r = mkNode l r (Breakable 3) -let (-----) l r = mkNode l r (Breakable 4) -let (@@) l r = apply2 (fun l r -> mkNode l r (Broken 0)) l r -let (@@-) l r = apply2 (fun l r -> mkNode l r (Broken 1)) l r -let (@@--) l r = apply2 (fun l r -> mkNode l r (Broken 2)) l r - -let tagListL tagger = function - | [] -> emptyL - | [x] -> x - | x::xs -> - let rec process' prefixL = function - | [] -> prefixL - | y::ys -> process' ((tagger prefixL) ++ y) ys in - process' x xs - -let commaListL x = tagListL (fun prefixL -> prefixL $$ rightL ",") x -let semiListL x = tagListL (fun prefixL -> prefixL $$ rightL ";") x -let spaceListL x = tagListL (fun prefixL -> prefixL) x -let sepListL x y = tagListL (fun prefixL -> prefixL $$ x) y - -let bracketL l = leftL "(" $$ l $$ rightL ")" -let tupleL xs = bracketL (sepListL (sepL ",") xs) -let aboveListL = function - [] -> emptyL - | [x] -> x - | x::ys -> List.fold (fun pre y -> pre @@ y) x ys - -let optionL xL = function - None -> wordL "None" - | Some x -> wordL "Some" -- (xL x) - -let listL xL xs = leftL "[" $$ sepListL (sepL ";") (List.map xL xs) $$ rightL "]" - - -//-------------------------------------------------------------------------- -//INDEX: breaks v2 -//-------------------------------------------------------------------------- - -// A very quick implementation of break stack. -type breaks = Breaks of - /// pos of next free slot - int * - /// pos of next possible "outer" break - OR - outer=next if none possible - int * - /// stack of savings, -ve means it has been broken - int array - -// next is next slot to push into - aka size of current occupied stack. -// outer counts up from 0, and is next slot to break if break forced. -// - if all breaks forced, then outer=next. -// - popping under these conditions needs to reduce outer and next. -let chunkN = 400 -let breaks0 () = Breaks(0,0,Array.create chunkN 0) -let pushBreak saving (Breaks(next,outer,stack)) = - let stack = if next = Array.length stack then - Array.append stack (Array.create chunkN 0) (* expand if full *) - else - stack - stack.[next] <- saving; - Breaks(next+1,outer,stack) - -let popBreak (Breaks(next,outer,stack)) = - if next=0 then raise (Failure "popBreak: underflow"); - let topBroke = stack.[next-1] < 0 - let outer = if outer=next then outer-1 else outer (* if all broken, unwind *) - let next = next - 1 - Breaks(next,outer,stack),topBroke - -let forceBreak (Breaks(next,outer,stack)) = - if outer=next then - (* all broken *) - None - else - let saving = stack.[outer] - stack.[outer] <- -stack.[outer]; - let outer = outer+1 - Some (Breaks(next,outer,stack),saving) - -let squashTo maxWidth layout = - // breaks = break context, can force to get indentation savings. - // pos = current position in line - // layout = to fit - //------ - // returns: - // breaks - // layout - with breaks put in to fit it. - // pos - current pos in line = rightmost position of last line of block. - // offset - width of last line of block - // NOTE: offset <= pos -- depending on tabbing of last block - let rec fit breaks (pos,layout) = - (*Printf.printf "\n\nCalling pos=%d layout=[%s]\n" pos (showL layout);*) - let breaks,layout,pos,offset = - match layout with - | Attr (tag,attrs,l) -> - let breaks,layout,pos,offset = fit breaks (pos,l) - let layout = Attr (tag,attrs,layout) - breaks,layout,pos,offset - | Leaf (jl,text,jr) -> - let textWidth = (unbox text).Length - let rec fitLeaf breaks pos = - if pos + textWidth <= maxWidth then - breaks,layout,pos + textWidth,textWidth (* great, it fits *) - else - match forceBreak breaks with - None -> (breaks,layout,pos + textWidth,textWidth (* tough, no more breaks *)) - | Some (breaks,saving) -> (let pos = pos - saving in fitLeaf breaks pos) - fitLeaf breaks pos - - | Node (jl,l,jm,r,jr,joint) -> - let mid = if jm then 0 else 1 - match joint with - | Unbreakable -> - let breaks,l,pos,offsetl = fit breaks (pos,l) (* fit left *) - let pos = pos + mid (* fit space if juxt says so *) - let breaks,r,pos,offsetr = fit breaks (pos,r) (* fit right *) - breaks,Node (jl,l,jm,r,jr,Unbreakable),pos,offsetl + mid + offsetr - | Broken indent -> - let breaks,l,pos,offsetl = fit breaks (pos,l) (* fit left *) - let pos = pos - offsetl + indent (* broken so - offset left + indent *) - let breaks,r,pos,offsetr = fit breaks (pos,r) (* fit right *) - breaks,Node (jl,l,jm,r,jr,Broken indent),pos,indent + offsetr - | Breakable indent -> - let breaks,l,pos,offsetl = fit breaks (pos,l) (* fit left *) - (* have a break possibility, with saving *) - let saving = offsetl + mid - indent - let pos = pos + mid - if saving>0 then - let breaks = pushBreak saving breaks - let breaks,r,pos,offsetr = fit breaks (pos,r) - let breaks,broken = popBreak breaks - if broken then - breaks,Node (jl,l,jm,r,jr,Broken indent) ,pos,indent + offsetr - else - breaks,Node (jl,l,jm,r,jr,Breakable indent),pos,offsetl + mid + offsetr - else - (* actually no saving so no break *) - let breaks,r,pos,offsetr = fit breaks (pos,r) - breaks,Node (jl,l,jm,r,jr,Breakable indent) ,pos,offsetl + mid + offsetr - (*Printf.printf "\nDone: pos=%d offset=%d" pos offset;*) - breaks,layout,pos,offset - let breaks = breaks0 () - let pos = 0 - let breaks,layout,pos,offset = fit breaks (pos,layout) - layout - -//-------------------------------------------------------------------------- -//INDEX: render -//-------------------------------------------------------------------------- - -type ('a,'b) render = - (* exists 'b. - -- could use object type to get "exists 'b" on private state, - *) - abstract Start : unit -> 'b; - abstract AddText : 'b -> string -> 'b; - abstract AddBreak : 'b -> int -> 'b; - abstract AddTag : 'b -> string * (string * string) list * bool -> 'b; - abstract Finish : 'b -> 'a - -let renderL (rr: render<_,_>) layout = - let rec addL z pos i = function - (* pos is tab level *) - | Leaf (jl,text,jr) -> - rr.AddText z (unbox text),i + (unbox text).Length - | Node (jl,l,jm,r,jr,Broken indent) -> - let z,i = addL z pos i l - let z,i = rr.AddBreak z (pos+indent),(pos+indent) - let z,i = addL z (pos+indent) i r - z,i - | Node (jl,l,jm,r,jr,_) -> - let z,i = addL z pos i l - let z,i = if jm then z,i else rr.AddText z " ",i+1 - let pos = i - let z,i = addL z pos i r - z,i - | Attr (tag,attrs,l) -> - let z = rr.AddTag z (tag,attrs,true) - let z,i = addL z pos i l - let z = rr.AddTag z (tag,attrs,false) - z,i - let pos = 0 - let z,i = rr.Start(),0 - let z,i = addL z pos i layout - rr.Finish z - -/// string render -let stringR = - { new render with - member x.Start () = [] - member x.AddText rstrs text = text::rstrs - member x.AddBreak rstrs n = (spaces n) :: "\n" :: rstrs - member x.AddTag z (_,_,_) = z - member x.Finish rstrs = String.Join("",Array.of_list (List.rev rstrs)) } - -type NoState = NoState -type NoResult = NoResult - -/// channel render -let channelR (chan:TextWriter) = - { new render with - member r.Start () = NoState - member r.AddText z s = chan.Write s; z - member r.AddBreak z n = chan.WriteLine(); chan.Write (spaces n); z - member r.AddTag z (tag,attrs,start) = z - member r.Finish z = NoResult } - -/// buffer render -let bufferR os = - { new render with - member r.Start () = NoState - member r.AddText z s = bprintf os "%s" s; z - member r.AddBreak z n = bprintf os "\n"; bprintf os "%s" (spaces n); z - member r.AddTag z (tag,attrs,start) = z - member r.Finish z = NoResult } - -/// html render - wraps HTML encoding (REVIEW) and hyperlinks -let htmlR (baseR : render<'Res,'State>) = - { new render<'Res,'State> with - member r.Start () = baseR.Start() - member r.AddText z s = baseR.AddText z s; (* REVIEW: escape HTML chars *) - member r.AddBreak z n = baseR.AddBreak z n - member r.AddTag z (tag,attrs,start) = - match tag,attrs with - | "html:a",[("href",link)] -> - if start - then baseR.AddText z (sprintf "" link) - else baseR.AddText z (sprintf "") - | _ -> z - member r.Finish z = baseR.Finish z } - -/// indent render - wraps fixed indentation -let indentR indent (baseR : render<'Res,'State>) = - { new render<'Res,'State> with - member r.Start () = - let z = baseR.Start() - let z = baseR.AddText z (spaces indent) - z - member r.AddText z s = baseR.AddText z s; (* REVIEW: escape HTML chars *) - member r.AddBreak z n = baseR.AddBreak z (n+indent); - member r.AddTag z (tag,attrs,start) = baseR.AddTag z (tag,attrs,start) - member r.Finish z = baseR.Finish z } - -//-------------------------------------------------------------------------- -//INDEX: showL, outL are most common -//-------------------------------------------------------------------------- - -let showL layout = renderL stringR layout -let outL (chan:TextWriter) layout = renderL (channelR chan) layout |> ignore -let bufferL os layout = renderL (bufferR os) layout |> ignore diff --git a/tools/FSharp_1.9.6.16/source/fsharp/layout.mli b/tools/FSharp_1.9.6.16/source/fsharp/layout.mli deleted file mode 100644 index 922e4b63..00000000 --- a/tools/FSharp_1.9.6.16/source/fsharp/layout.mli +++ /dev/null @@ -1,71 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved -#light - -module Microsoft.FSharp.Compiler.Layout - -open System.Text -open System.IO -open Internal.Utilities.StructuredFormat - -type layout = Internal.Utilities.StructuredFormat.Layout - -val emptyL : Layout -val isEmptyL : Layout -> bool - -val wordL : string -> Layout -val sepL : string -> Layout -val rightL : string -> Layout -val leftL : string -> Layout - -val ( $$ ) : Layout -> Layout -> Layout (* never break "glue" *) -val ( ++ ) : Layout -> Layout -> Layout (* if break, indent=0 *) -val ( -- ) : Layout -> Layout -> Layout (* if break, indent=1 *) -val ( --- ) : Layout -> Layout -> Layout (* if break, indent=2 *) -val ( ---- ) : Layout -> Layout -> Layout (* if break, indent=2 *) -val ( ----- ) : Layout -> Layout -> Layout (* if break, indent=2 *) -val ( @@ ) : Layout -> Layout -> Layout (* broken ident=0 *) -val ( @@- ) : Layout -> Layout -> Layout (* broken ident=1 *) -val ( @@-- ) : Layout -> Layout -> Layout (* broken ident=2 *) - -val commaListL : Layout list -> Layout -val spaceListL : Layout list -> Layout -val semiListL : Layout list -> Layout -val sepListL : Layout -> Layout list -> Layout - -val bracketL : Layout -> Layout -val tupleL : Layout list -> Layout -val aboveL : Layout -> Layout -> Layout -val aboveListL : Layout list -> Layout - -val optionL : ('a -> Layout) -> 'a option -> Layout -val listL : ('a -> Layout) -> 'a list -> Layout - -val linkL : string -> Layout -> Layout - -val squashTo : int -> Layout -> Layout - -val showL : Layout -> string -val outL : TextWriter -> Layout -> unit -val bufferL : StringBuilder -> Layout -> unit - -(* render a Layout yielding an 'a using a 'b (hidden state) type *) -type ('a,'b) render = - abstract Start : unit -> 'b; - abstract AddText : 'b -> string -> 'b; - abstract AddBreak : 'b -> int -> 'b; - abstract AddTag : 'b -> string * (string * string) list * bool -> 'b; - abstract Finish : 'b -> 'a - -(* Run a render on a Layout *) -val renderL : ('b,'a) render -> Layout -> 'b - -(* Primitive renders *) -val stringR : (string,string list) render -type NoState = NoState -type NoResult = NoResult -val channelR : TextWriter -> (NoResult,NoState) render -val bufferR : StringBuilder -> (NoResult,NoState) render - -(* Combinator renders *) -val htmlR : ('a,'b) render -> ('a,'b) render (* assumes in
 context *)
-val indentR  : int -> ('a,'b) render -> ('a,'b) render
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/lex.mll b/tools/FSharp_1.9.6.16/source/fsharp/lex.mll
deleted file mode 100644
index 981b1f22..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/lex.mll
+++ /dev/null
@@ -1,927 +0,0 @@
-{
-
-module Microsoft.FSharp.Compiler.Lexer
-
-(*------------------------------------------------------------------------
- * The Lexer.  Some of the complication arises from the fact it is 
- * reused by the Visual Studio mode to do partial lexing reporting 
- * whitespace etc.
- * (c) Microsoft Corporation. All rights reserved 
- *-----------------------------------------------------------------------*)
-
-open System.Text
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal
-open Microsoft.FSharp.Compiler
-
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Parser
-open Microsoft.FSharp.Compiler.Lexhelp
-open Microsoft.FSharp.Compiler.Lib
-open Internal.Utilities.Text.Lexing
-
-let lexeme (lexbuf : UnicodeLexing.Lexbuf) = 
-    UnicodeLexing.Lexbuf.LexemeString(lexbuf)
-let ulexeme lexbuf = lexeme lexbuf
-
-
-let adjust_lexbuf_start_pos (lexbuf:UnicodeLexing.Lexbuf) p =  lexbuf.StartPos <- p 
-
-let string_trim_both s n m = String.sub s n (String.length s - (n+m))
-let trim_both   lexbuf n m = string_trim_both (ulexeme lexbuf) n m
-let trim_right  lexbuf n = trim_both lexbuf 0 n
-let trim_left   lexbuf n = trim_both lexbuf n 0
-
-let fail args lexbuf msg dflt =
-     let m = GetLexerRange  lexbuf in 
-     args.errorLogger.ErrorR(Error(msg,m));
-     dflt        
-     
-let trim_to_i32 args lexbuf n = 
-    try int32 (trim_right lexbuf n)
-    with _ -> fail args lexbuf "This number is outside the allowable range for this integer type" 0
-
-let CheckExprOp lexbuf = 
-    if String.contains (ulexeme lexbuf)  ':' then 
-        deprecated "':' is no longer permitted as a character in operator names" (GetLexerRange lexbuf) 
-
-let quote_op_is_raw s = String.length s >= 1 && s.[0] = '@'
-
-let rev_string s = 
-  let n = String.length s in 
-  let res = Buffer.create n in 
-  for i = n - 1 downto 0 do Buffer.add_char res s.[i] done;
-  Buffer.contents res
-  
-let unexpected_char lexbuf =
-    LEX_FAILURE ("Unexpected character '"^(lexeme lexbuf)^"'")
-
-let start_string args (lexbuf: UnicodeLexing.Lexbuf) =
-    let buf = Bytes.Bytebuf.create 100 in 
-    let m = GetLexerRange  lexbuf in
-    let startp = lexbuf.StartPos in  
-    let fin = (fun m2 b s -> 
-                     let endp = lexbuf.EndPos in  
-                     (* Adjust the start-of-token mark back to the true start of the token *)
-                     adjust_lexbuf_start_pos lexbuf startp;
-                     if b then
-                        if Lexhelp.stringbuf_is_bytes buf then
-                            BYTEARRAY (Lexhelp.stringbuf_as_bytes buf)
-                        else (
-                            fail args lexbuf "This byte array literal contains characters that do not encode as a single byte" ();
-                            BYTEARRAY (Lexhelp.stringbuf_as_bytes buf)
-                        )
-                     else
-                        STRING (Bytes.unicode_bytes_as_string s))  in
-    buf,fin,m
-             
-(* Utility functions for processing XML documentation *)
-
-let trySaveXmlDoc lexbuf (buff:option) =
-    match buff with 
-    | None -> () 
-    | Some(sb) -> LexbufLocalXmlDocStore.SaveXmlDoc lexbuf (sb.ToString(), pos_of_lexpos lexbuf.StartPos)
-  
-let tryAppendXmlDoc (buff:option) (s:string) =
-    match buff with 
-    | None -> ()
-    | Some(sb) -> ignore(sb.Append(s))
-
-(* Utilities for parsing #if/#else/#endif *)
-
-let shouldStartLine args lexbuf m err tok = 
-    if (start_col_of_range m <> 0) then fail args lexbuf err tok
-    else tok
-    
-let extractIdentFromHashIf (lexed:string) =
-    // Skip the '#if' token, then trim whitespace, then find the end of the identifier
-    let lexed = lexed.Trim() in     
-    let trimIf = lexed.Substring(3).Trim() in
-    let identEnd = trimIf.IndexOfAny([| ' '; '\t'; '/' |]) in
-    let identEnd = (if identEnd = -1 then trimIf.Length else identEnd) in
-    trimIf.Substring(0, identEnd)
-} 
-
-let letter = '\Lu' | '\Ll' | '\Lt' | '\Lm' | '\Lo' | '\Nl'
-let digit = '\Nd'
-let hex = ['0'-'9'] | ['A'-'F'] | ['a'-'f']
-let truewhite = [' ']
-let offwhite = ['\t']
-let anywhite = truewhite | offwhite
-let op_char = '!'|'$'|'%'|'&'|'*'|'+'|'-'|'.'|'/'|'<'|'='|'>'|'?'|'@'|'^'|'|'|'~'|':'
-let ignored_op_char = '.' | '$'
-let xinteger = 
-  (  '0' ('x'| 'X')  hex + 
-   | '0' ('o'| 'O')  (['0'-'7']) + 
-   | '0' ('b'| 'B')  (['0'-'1']) + )
-let integer = digit+
-let int8 = integer 'y'
-let uint8 = (xinteger | integer) 'u' 'y' 
-let int16 = integer 's'
-let uint16 = (xinteger | integer) 'u' 's'
-let int = integer 
-let int32 = integer 'l'
-let uint32 = (xinteger | integer) 'u' 
-let uint32l = (xinteger | integer) 'u' 'l'
-let nativeint = (xinteger | integer) 'n'
-let unativeint = (xinteger | integer) 'u' 'n'
-let int64 = (xinteger | integer) 'L' 
-let uint64 = (xinteger | integer) ('u' | 'U') 'L' 
-let xint8 = xinteger 'y'
-let xint16 = xinteger 's'
-let xint = xinteger 
-let xint32 = xinteger 'l'
-let floatp = digit+ '.' digit*  
-let floate = digit+ ('.' digit* )? ('e'| 'E') ['+' '-']? digit+
-let float = floatp | floate 
-let bignum =  integer ('I'  | 'N' | 'Z' | 'Q' | 'R' | 'G')
-let ieee64 = float
-(* let ieee64d = (float | integer) ('d' | 'D')  *)
-let ieee32 = float ('f' | 'F') 
-let decimal = (float | integer) ('m' | 'M') 
-let xieee32 = xinteger 'l' 'f'
-let xieee64 = xinteger 'L' 'F'
-let escape_char = ('\\' ( '\\' | "\"" | '\'' | 'a' | 'f' | 'v' | 'n' | 't' | 'b' | 'r'))
-let char = '\'' ( [^'\\''\n''\r''\t''\b'] | escape_char) '\''
-let trigraph = '\\' digit digit digit
-let hexgraph_short = '\\' 'x' hex hex 
-let unicodegraph_short = '\\' 'u' hex hex hex hex
-let unicodegraph_long =  '\\' 'U' hex hex hex hex hex hex hex hex
-let newline = ('\n' | '\r' '\n')
-
-let connecting_char = '\Pc'
-let combining_char = '\Mn' | '\Mc'
-let formatting_char = '\Cf' 
-
-let ident_start_char = 
-    letter | '_'
-
-let ident_char = 
-    letter
-  | connecting_char 
-  | combining_char 
-  | formatting_char 
-  | digit 
-  | ['\'']
-  
-let ident = ident_start_char ident_char*
-
-rule token args skip = parse
- | ident 
-     { Keywords.KeywordOrIdentifierToken args lexbuf (ulexeme lexbuf) }
- | "do!" 
-     { DO_BANG } 
- | "yield!" 
-     { YIELD_BANG(true)  } 
- | "return!" 
-     { YIELD_BANG(false) } 
- | ident '!' 
-     { let tok = Keywords.KeywordOrIdentifierToken args lexbuf (trim_right lexbuf 1)  in
-       match tok with 
-       | LET _ -> BINDER (trim_right lexbuf 1) 
-       | _ -> fail args lexbuf "Identifiers followed by '!' are reserved for future use" (Keywords.KeywordOrIdentifierToken args lexbuf (ulexeme lexbuf)) } 
- | ident ('#')  
-     { fail args lexbuf "Identifiers followed by '?' or '#' are reserved for future use" (Keywords.KeywordOrIdentifierToken args lexbuf (ulexeme lexbuf)) }
- | int8 
-     { let n = trim_to_i32 args lexbuf 1 in 
-       if n > 0x80 or n < -0x80 then fail args lexbuf "This number is outside the allowable range for 8-bit signed integers" (INT8(0y,false))
-    (* Allow  to parse as min_int.  Allowed only because we parse '-' as an operator. *)
-       else if n = 0x80 then INT8(sbyte(-0x80), true (* 'true' = 'bad'*) )
-       else INT8(sbyte n,false) }
- | xint8 
-     { let n = trim_to_i32 args lexbuf 1 in 
-       if n > 0xFF or n < 0 then fail args lexbuf "This number is outside the allowable range for hexadecimal 8-bit signed integers" (INT8(0y,false))
-       else INT8(sbyte(byte(n)),false) }
- | uint8
-     { let n = trim_to_i32 args lexbuf 2 in 
-       if n > 0xFF or n < 0 then fail args lexbuf "This number is outside the allowable range for 8-bit unsigned integers" (UINT8(0uy))
-       else UINT8(byte n) }
- | int16 
-     { let n = trim_to_i32 args lexbuf 1 in 
-       if n > 0x8000 or n < -0x8000 then fail args lexbuf "This number is outside the allowable range for 16-bit signed integers" (INT16(0s,false))
-    (* Allow  to parse as min_int.  Allowed only because we parse '-' as an operator. *)
-       else if n = 0x8000 then INT16(-0x8000s,true)
-       else INT16(int16 n,false) }
- | xint16 
-     { let n = trim_to_i32 args lexbuf 1 in 
-       if n > 0xFFFF or n < 0 then fail args lexbuf "This number is outside the allowable range for 16-bit signed integers" (INT16(0s,false))
-       else INT16(int16(uint16(n)),false) }
- | uint16 
-     { let n = trim_to_i32 args lexbuf 2 in 
-       if n > 0xFFFF or n < 0 then fail args lexbuf "This number is outside the allowable range for 16-bit unsigned integers" (UINT16(0us))
-       else UINT16(uint16 n) }
- | int '.' '.' 
-     { let s = trim_right lexbuf 2 in 
-       (* Allow  to parse as min_int.  Allowed only because we parse '-' as an operator. *)
-       if s = "2147483648" then INT32_DOT_DOT(-2147483648,true) else
-       let n = try int32 s with _ ->  fail args lexbuf "This number is outside the allowable range for 32-bit signed integers" 0 in
-       INT32_DOT_DOT(n,false)
-     } 
- | xint 
- | int 
-     { let s = ulexeme lexbuf in 
-       (* Allow  to parse as min_int.  Allowed only because we parse '-' as an operator. *)
-       if s = "2147483648" then INT32(-2147483648,true) else
-       let n =
-           try int32 s with _ ->  fail args lexbuf "This number is outside the allowable range for 32-bit signed integers" 0
-       in 
-       INT32(n,false)
-     } 
- | xint32 
- | int32 
-     { let s = trim_right lexbuf 1 in 
-       (* Allow  to parse as min_int.  Allowed only because we parse '-' as an operator. *)
-       if s = "2147483648" then INT32(-2147483648,true) else
-       let n = 
-           try int32 s with _ ->  fail args lexbuf "This number is outside the allowable range for 32-bit signed integers" 0
-       in
-       INT32(n,false)
-     } 
-
- | uint32
-     { 
-       let s = trim_right lexbuf 1 in 
-       let n = 
-           try int64 s with _ ->  fail args lexbuf "This number is outside the allowable range for 32-bit unsigned integers" 0L
-       in
-       if n > 0xFFFFFFFFL or n < 0L then fail args lexbuf "This number is outside the allowable range for 32-bit unsigned integers" (UINT32(0u)) else
-       UINT32(uint32 (uint64 n)) } 
-
- | uint32l
-     { 
-       let s = trim_right lexbuf 2 in 
-       let n = 
-           try int64 s with _ ->  fail args lexbuf "This number is outside the allowable range for 32-bit unsigned integers" 0L
-       in
-       if n > 0xFFFFFFFFL or n < 0L then fail args lexbuf "This number is outside the allowable range for 32-bit unsigned integers" (UINT32(0u)) else
-       UINT32(uint32 (uint64 n)) } 
-
- | int64 
-     { let s = trim_right lexbuf 1 in 
-       (* Allow  to parse as min_int.  Stupid but allowed because we parse '-' as an operator. *)
-       if s = "9223372036854775808" then INT64(-9223372036854775808L,true) else
-       let n = 
-          try int64 s with _ ->  fail args lexbuf "This number is outside the allowable range for 64-bit signed integers" 0L
-       in 
-       INT64(n,false)
-     }
-
- | uint64     
-     { let s = trim_right lexbuf 2 in 
-       let n = 
-         try uint64 s with _ -> fail args lexbuf "This number is outside the allowable range for 64-bit unsigned integers" 0UL
-       in 
-       UINT64(n) } 
-
- | nativeint  
-     { try 
-           NATIVEINT(int64 (trim_right lexbuf 1)) 
-       with _ ->  fail args lexbuf "This number is outside the allowable range for native integers" (NATIVEINT(0L)) } 
-
- | unativeint 
-     { try 
-           UNATIVEINT(uint64 (trim_right lexbuf 2)) 
-       with _ ->  fail args lexbuf "This number is outside the allowable range for unsigned native integers"  (UNATIVEINT(0UL)) }
-
- | ieee32     
-     { IEEE32 (try float32(trim_right lexbuf 1) with _ -> fail args lexbuf "Invalid floating point number" 0.0f) }
- | ieee64     
-     { IEEE64 (try float(ulexeme lexbuf) with _ -> fail args lexbuf "Invalid floating point number" 0.0) }
-
-(*  | ieee64d    { IEEE64 (float (trim_right lexbuf 1)) } *)
- | decimal    
-     { try 
-          let s = trim_right lexbuf 1 in
-          (* This implements a range check for decimal literals *)
-          let d = System.Decimal.Parse(s,System.Globalization.NumberStyles.AllowExponent ||| System.Globalization.NumberStyles.Number,System.Globalization.CultureInfo.InvariantCulture) in
-          DECIMAL d 
-       with 
-          e -> fail args lexbuf "This number is outside the allowable range for decimal literals" (DECIMAL (decimal 0))
-     }
- | xieee32     
-     { 
-       let s = trim_right lexbuf 2 in
-       let n64 = int64 s in 
-       if n64 > 0xFFFFFFFFL or n64 < 0L then fail args lexbuf "This number is outside the allowable range for 32-bit floats" (IEEE32 0.0f) else
-       IEEE32 (System.BitConverter.ToSingle(System.BitConverter.GetBytes(int32 (uint32 (uint64 n64))),0)) }
-
- | xieee64     
-     { 
-       let n64 = int64 (trim_right lexbuf 2) in 
-       IEEE64 (System.BitConverter.Int64BitsToDouble(n64)) }
-       
- | bignum     
-       { let s = ulexeme lexbuf in 
-         BIGNUM (trim_right lexbuf 1, s.[s.Length-1..s.Length-1]) }
-
- | (int | xint | float) ident_char+
-       { fail args lexbuf "This is not a valid numeric literal. Sample formats include 4, 0x4, 0b0100, 4L, 4UL, 4u, 4s, 4us, 4y, 4uy, 4.0, 4.0f, 4I" (INT32(0,false)) }
- 
- | char
-     { let s = ulexeme lexbuf in 
-       CHAR (if s.[1] = '\\' then escape s.[2] else s.[1])  }
-
- | char 'B' 
-     { let s = ulexeme lexbuf in 
-       let x = int32 (if s.[1] = '\\' then escape s.[2] else s.[1]) in
-       if x < 0 || x > 127 then 
-           fail args lexbuf "This is not a valid byte literal" (UINT8(byte 0))
-       else
-           UINT8 (byte(x))  }
-     
- | '\'' trigraph '\''
-     { let s = ulexeme lexbuf in 
-       let c = trigraph s.[2] s.[3] s.[4] in 
-       let x = int32 c in
-       if x < 0 || x > 255 then 
-           fail args lexbuf "This is not a valid character literal" (CHAR c)
-       else
-           CHAR c }
-
- | '\'' trigraph '\'' 'B'
-     { let s = ulexeme lexbuf in 
-       let x = int32 (trigraph s.[2] s.[3] s.[4]) in
-       if x < 0 || x > 255 then 
-           fail args lexbuf "This is not a valid byte literal" (UINT8(byte 0))
-       else
-           UINT8 (byte(x))  }
-
- | '\'' unicodegraph_short '\''  'B'
-     { let x = int32 (unicodegraph_short (trim_both lexbuf 3 2)) in
-       if x < 0 || x > 127 then 
-           fail args lexbuf "This is not a valid byte literal" (UINT8(byte 0))
-       else
-           UINT8 (byte(x))  }
-     
- | '\'' hexgraph_short '\'' { CHAR (char (int32 (hexgraph_short (trim_both lexbuf 3 1)))) }
- | '\'' unicodegraph_short '\'' { CHAR (char (int32 (unicodegraph_short (trim_both lexbuf 3 1)))) }
- | '\'' unicodegraph_long '\''  
-     { let hi,lo = unicodegraph_long (trim_both lexbuf 3 1) in 
-       match hi with 
-       | None -> CHAR (char lo)
-       | Some _ -> fail args lexbuf  "This unicode encoding is only valid in string literals" (CHAR (char lo)) }
- | "(*IF-FSHARP"    { skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf }
- | "(*F#"           { skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf }
- | "ENDIF-FSHARP*)" { skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf  }
- | "F#*)"           { skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf }
-
- | "(*)"            { LPAREN_STAR_RPAREN }
-
- | "(*"
-     { let m = GetLexerRange  lexbuf in 
-       skipToken skip (COMMENT (AT_comment(!args.ifdefStack,1,m))) (comment(1,m,args)) lexbuf }
-
- | "(*IF-CAML*)" |  "(*IF-OCAML*)" 
-     { let m = GetLexerRange  lexbuf in 
-       skipToken skip (COMMENT (AT_camlonly(!args.ifdefStack,m))) (camlonly m args) lexbuf }
-
- | '"' 
-     { let buf,fin,m = start_string args lexbuf in 
-       skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string (buf,fin,m,args)) lexbuf }
-      
- | '@' '"' 
-     { let buf,fin,m = start_string args lexbuf in 
-       skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m))) (vstring (buf,fin,m,args)) lexbuf }
-
- | truewhite+  
-     { if skip then token args skip lexbuf
-       else WHITESPACE (AT_token !args.ifdefStack) }
-
- | offwhite+  
-     { if args.lightSyntaxStatus.Status then errorR(Error("TABs are not allowed in #light code",GetLexerRange lexbuf));
-       skipToken skip (WHITESPACE (AT_token !args.ifdefStack)) (token args) lexbuf }
-
- | "////" op_char* 
-     { (* 4+ slash are 1-line comments, online 3 slash are XmlDoc *)
-       let m = GetLexerRange lexbuf in 
-       skipToken skip (LINE_COMMENT (AT_tokenized_comment(!args.ifdefStack,1,m))) (tokenized_comment(None,1,m,args)) lexbuf }
-
- | "///" op_char*
-     { (* Match exactly 3 slash, 4+ slash caught by preceding rule *)
-       let m = GetLexerRange lexbuf in 
-       let doc = trim_left lexbuf 3 in 
-       let sb = (new StringBuilder(100)).Append(doc) in
-       skipToken skip (LINE_COMMENT (AT_tokenized_comment(!args.ifdefStack,1,m))) (tokenized_comment(Some(sb),1,m,args)) lexbuf }
-
- | "//" op_char*
-     { (* Need to read all operator symbols too, otherwise it might be parsed by a rule below *)
-       let m = GetLexerRange lexbuf in 
-       skipToken skip (LINE_COMMENT (AT_tokenized_comment(!args.ifdefStack,1,m))) (tokenized_comment(None,1,m,args)) lexbuf }
-
- | newline 
-     { newline lexbuf; skipToken skip (WHITESPACE (AT_token !args.ifdefStack)) (token args) lexbuf }
-
- | '`' '`' ([^'`' '\n' '\r' '\t'] | '`' [^'`''\n' '\r' '\t']) + '`' '`' 
-     { Keywords.IdentifierToken args lexbuf (trim_both lexbuf 2 2) }
-
- | ('#' anywhite* | "#line" anywhite+ ) digit+ anywhite* ('@'? "\"" [^'\n''\r''"']+ '"')? anywhite* newline
-     {  let pos = lexbuf.EndPos in 
-        let lnum = pos.Line in 
-        if skip then 
-          let s = ulexeme lexbuf in 
-          let rec parseLeadingDirective n = 
-            match s.[n] with 
-            | c when c >= 'a' && c <= 'z' -> parseLeadingDirective (n+1) 
-            | _ -> parseLeadingWhitespace n // goto the next state
-          
-          and parseLeadingWhitespace n = 
-            match s.[n] with 
-            | ' ' | '\t' -> parseLeadingWhitespace (n+1) 
-            | _ -> parseLineNumber n n // goto the next state
-          
-          and parseLineNumber start n = 
-            match s.[n] with 
-            | c when c >= '0' && c <= '9' -> parseLineNumber start (n+1)
-            | _ -> let text =  (String.sub s start (n-start)) in 
-                   let lineNumber = 
-                       try int32 text
-                       with err -> errorR(Error("invalid line number: '"^text^"'",GetLexerRange lexbuf)); 0 in
-                   lineNumber, parseWhitespaceBeforeFile n // goto the next state
-          
-          and parseWhitespaceBeforeFile n =  
-            match s.[n] with 
-            | ' ' | '\t' | '@' -> parseWhitespaceBeforeFile (n+1) 
-            | '"' -> Some (parseFile (n+1) (n+1))
-            | _ -> None
-          
-          and parseFile start n =   
-            match s.[n] with 
-            | '"' -> String.sub s start (n-start)  
-            | _ -> parseFile start (n+1) in 
-
-          // Call the parser
-          let line,file = parseLeadingDirective 1 in 
-
-          // Construct the new position
-          set_pos lexbuf {pos with
-                pos_fname = (match file with Some f -> encode_file f | None -> pos.pos_fname); 
-                pos_bol= pos.pos_cnum;
-                pos_lnum=line };
-          token args skip lexbuf 
-        else 
-          skipToken skip (HASH_LINE (AT_token !args.ifdefStack)) (token args) lexbuf }
-            
- | "<@" op_char* { CheckExprOp lexbuf; let s = trim_left lexbuf 2 in LQUOTE (Printf.sprintf "<@%s %s@>" s (rev_string s), quote_op_is_raw s) }
- | op_char* "@>" { CheckExprOp lexbuf; let s = trim_right lexbuf 2 in RQUOTE (Printf.sprintf "<@%s %s@>" (rev_string s) s, quote_op_is_raw (rev_string s)) }
- | '#' { HASH }
- | '&' { AMP }
- | "&&" { AMP_AMP }
- | "||" { BAR_BAR }
- | '\'' { QUOTE }
- | '(' { LPAREN }
- | ')' { RPAREN }
- | '*' { STAR }
- | ',' { COMMA }
- | "->" { RARROW }
- | "->>" { RARROW2 }
- | "?" { QMARK }
- | "??" { QMARK_QMARK }
- | ".." { DOT_DOT }
- | "." { DOT }
- | ":" { COLON }
- | "::" { COLON_COLON }
- | ":>" { COLON_GREATER }
- | ">." { GREATER_DOT }
- | "@>." { RQUOTE_DOT ("<@ @>",false) }
- | "@@>." { RQUOTE_DOT ("<@@ @@>",true) }
- | ">|]" { GREATER_BAR_RBRACK }
- | ":?>" { COLON_QMARK_GREATER }
- | ":?" { COLON_QMARK }
- | ":=" { COLON_EQUALS }
- | ";;" { SEMICOLON_SEMICOLON }
- | ";" { SEMICOLON }
- | "<-" { LARROW }
- | "=" { EQUALS }
- | "[" { LBRACK }
- | "[|" { LBRACK_BAR }
- | "<" { LESS }
- | ">" { GREATER }
- | "[<" { LBRACK_LESS }
- | "]" { RBRACK }
- | "|]" { BAR_RBRACK }
- | ">]" { GREATER_RBRACK }
- | "{" { LBRACE }
- | "|" { BAR }
- | "}" { RBRACE }
- | "$" { DOLLAR }
- | "%" { PERCENT_OP("%") }
- | "%%" { PERCENT_OP("%%") }
- | "-" { MINUS }
- | "~" { RESERVED }
- | "`" { RESERVED }
- | ignored_op_char* '*' '*'                    op_char* { CheckExprOp lexbuf; INFIX_STAR_STAR_OP(ulexeme lexbuf) }
- | ignored_op_char* ('*' | '/'|'%')            op_char* { CheckExprOp lexbuf; INFIX_STAR_DIV_MOD_OP(ulexeme lexbuf) }
- | ignored_op_char* ('+'|'-')                  op_char* { CheckExprOp lexbuf; PLUS_MINUS_OP(ulexeme lexbuf) }
- | ignored_op_char* ('@'|'^')                  op_char* { CheckExprOp lexbuf; INFIX_AT_HAT_OP(ulexeme lexbuf) }
- | ignored_op_char* ('=' | "!=" | '<' | '>' | '$')  op_char* { CheckExprOp lexbuf; INFIX_COMPARE_OP(ulexeme lexbuf) }
- | ignored_op_char* ('&')                      op_char* { CheckExprOp lexbuf; INFIX_AMP_OP(ulexeme lexbuf) }
- | ignored_op_char* '|'                        op_char* { CheckExprOp lexbuf; INFIX_BAR_OP(ulexeme lexbuf) }
- | ignored_op_char* ('!' | '?' | '~' )         op_char* { CheckExprOp lexbuf; PREFIX_OP(ulexeme lexbuf) }
- | ".[]"  | ".[]<-" | ".[,]<-" | ".[,,]<-" | ".[,,,]<-" | ".[,,,]" | ".[,,]" | ".[,]" | ".[..]" | ".[..,..]" | ".[..,..,..]" | ".[..,..,..,..]"
- | ".()"  | ".()<-"  { FUNKY_OPERATOR_NAME(ulexeme lexbuf) }
-
- | "#light" anywhite* 
-   { if args.lightSyntaxStatus.ExplicitlySet && args.lightSyntaxStatus.WarnOnMultipleTokens then 
-         warning(Error("#light should only occur as the first non-comment text in an F# source file",GetLexerRange lexbuf));
-     args.lightSyntaxStatus.Status <- true; 
-     skipToken skip (HASH_LIGHT (AT_token !args.ifdefStack)) (token args) lexbuf } 
-
- | ("#indent" | "#light") anywhite+ "\"off\"" 
-   { args.lightSyntaxStatus.Status <- false; 
-     skipToken skip (HASH_LIGHT (AT_token !args.ifdefStack)) (token args) lexbuf } 
-   
- | ("#indent" | "#light") anywhite+ "\"on\""
-   { args.lightSyntaxStatus.Status <- true; 
-     skipToken skip (HASH_LIGHT (AT_token !args.ifdefStack)) (token args) lexbuf } 
-   
- | anywhite* "#if" anywhite+ ident anywhite* ("//" [^'\n''\r']*)?
-   { let m = GetLexerRange lexbuf in    
-     let lexed = (ulexeme lexbuf) in
-     let id = extractIdentFromHashIf lexed in
-     args.ifdefStack := (IfDefIf,m) :: !(args.ifdefStack);
-     
-     // Get the token; make sure it starts at zero position & return
-     let cont, f = 
-       ( if List.mem id args.defines then (AT_endline(ENDL_token(!args.ifdefStack)), endline (ENDL_token !args.ifdefStack) args)
-         else (AT_endline(ENDL_skip(!args.ifdefStack,0,m)), endline (ENDL_skip(!args.ifdefStack,0,m)) args)  ) in         
-     let tok = shouldStartLine args lexbuf m "#if directive must appear as the first non-whitespace character on a line" (HASH_IF(m,lexed,cont)) in
-     skipToken skip tok f lexbuf }
-
- | anywhite* "#else" anywhite* ("//" [^'\n''\r']*)?
-   { let lexed = (ulexeme lexbuf) in
-     let m = GetLexerRange lexbuf in 
-     match !(args.ifdefStack) with
-     | [] ->  LEX_FAILURE "#else has no matching #if" 
-     | (IfDefElse,_) :: rest -> LEX_FAILURE "#endif required for #else" 
-     | (IfDefIf,_) :: rest -> 
-       let m = GetLexerRange  lexbuf in 
-       args.ifdefStack := (IfDefElse,m) :: rest;
-       let tok = HASH_ELSE(m,lexed, AT_endline(ENDL_skip(!args.ifdefStack,0,m))) in
-       let tok = shouldStartLine args lexbuf m "#else directive must appear as the first non-whitespace character on a line" tok in
-       skipToken skip tok (endline (ENDL_skip(!args.ifdefStack,0,m)) args) lexbuf }
-
- | anywhite* "#endif" anywhite* ("//" [^'\n''\r']*)?
-   { let lexed = (ulexeme lexbuf) in
-     let m = GetLexerRange lexbuf in 
-     match !(args.ifdefStack) with
-     | []->  LEX_FAILURE "#endif has no matching #if" 
-     | _ :: rest ->  
-        args.ifdefStack := rest;          
-        let tok = HASH_ENDIF(m,lexed,AT_endline(ENDL_token(!args.ifdefStack))) in
-        let tok = shouldStartLine args lexbuf m "#endif directive must appear as the first non-whitespace character on a line" tok in
-        skipToken skip tok (endline (ENDL_token(!args.ifdefStack)) args) lexbuf }
-
- | "#if" 
-   { let tok = fail args lexbuf "#if directive should be immediately followed by an identifier" (WHITESPACE (AT_token !args.ifdefStack)) in
-     skipToken skip tok (token args) lexbuf }
-
- | _ 
-   { unexpected_char lexbuf }     
- | eof 
-   { EOF (AT_token !args.ifdefStack) }
-
-(* Skips INACTIVE code until if finds #else / #endif matching with the #if or #else *)
-
-and ifdef_skip n m args skip = parse               
- | anywhite* "#if" anywhite+ ident anywhite* ("//" [^'\n''\r']*)?
-   { let m = GetLexerRange lexbuf in    
-     let id = extractIdentFromHashIf (ulexeme lexbuf) in
-     
-     // If #if is the first thing on the line then increase depth, otherwise skip, because it is invalid (e.g. "(**) #if ...")
-     if (start_col_of_range m <> 0) then
-       skipToken skip (INACTIVECODE (AT_ifdef_skip(!args.ifdefStack,n,m))) (ifdef_skip n m args) lexbuf
-     else
-       let tok = INACTIVECODE(AT_endline(ENDL_skip(!args.ifdefStack,n+1,m))) in
-       skipToken skip tok (endline (ENDL_skip(!args.ifdefStack,n+1,m)) args) lexbuf }
-
-  | anywhite* "#else" anywhite* ("//" [^'\n''\r']*)?
-    { let lexed = (ulexeme lexbuf) in
-      let m = GetLexerRange  lexbuf in 
-           
-      // If #else is the first thing on the line then process it, otherwise ignore, because it is invalid (e.g. "(**) #else ...")
-      if (start_col_of_range m <> 0) then
-        skipToken skip (INACTIVECODE (AT_ifdef_skip(!args.ifdefStack,n,m))) (ifdef_skip n m args) lexbuf
-      elif n = 0 then 
-         match !(args.ifdefStack) with
-         | []->  LEX_FAILURE "#else has no matching #if" 
-         | (IfDefElse,_) :: rest -> LEX_FAILURE "#endif required for #else" 
-         | (IfDefIf,_) :: rest -> 
-           let m = GetLexerRange  lexbuf in 
-           args.ifdefStack := (IfDefElse,m) :: rest;
-           skipToken skip (HASH_ELSE(m,lexed,AT_endline(ENDL_token(!args.ifdefStack)))) (endline (ENDL_token(!args.ifdefStack)) args) lexbuf 
-       else
-         skipToken skip (INACTIVECODE(AT_endline(ENDL_skip(!args.ifdefStack,n,m)))) (endline (ENDL_skip(!args.ifdefStack,n,m)) args) lexbuf }
-          
-  | anywhite* "#endif" anywhite* ("//" [^'\n''\r']*)?
-    { let lexed = (ulexeme lexbuf) in
-      let m = GetLexerRange  lexbuf in 
-      
-      // If #endif is the first thing on the line then process it, otherwise ignore, because it is invalid (e.g. "(**) #endif ...")
-      if (start_col_of_range m <> 0) then
-          skipToken skip (INACTIVECODE (AT_ifdef_skip(!args.ifdefStack,n,m))) (ifdef_skip n m args) lexbuf
-      elif n = 0 then 
-          match !(args.ifdefStack) with
-          | [] ->  LEX_FAILURE "#endif has no matching #if" 
-          | _ :: rest -> 
-              args.ifdefStack := rest;
-              skipToken skip (HASH_ENDIF(m,lexed,AT_endline(ENDL_token(!args.ifdefStack)))) (endline (ENDL_token(!args.ifdefStack)) args) lexbuf 
-       else
-           let tok = INACTIVECODE(AT_endline(ENDL_skip(!args.ifdefStack,n-1,m))) in
-           let tok = shouldStartLine args lexbuf m "Syntax error. wrong nested #endif, unexpected tokens before it" tok in
-           skipToken skip tok (endline (ENDL_skip(!args.ifdefStack,(n-1),m)) args) lexbuf }
-           
-  | newline 
-    { newline lexbuf; ifdef_skip n m args skip lexbuf }
-    
-  | [^ ' ' '\n' '\r' ]+
-  | anywhite+
-  | _    
-    { // This tries to be nice and get tokens as 'words' because VS uses this when selecting stuff
-      skipToken skip (INACTIVECODE (AT_ifdef_skip(!args.ifdefStack,n,m))) (ifdef_skip n m args) lexbuf }
-  | eof  
-    { EOF (AT_ifdef_skip(!args.ifdefStack,n,m)) }
-
-(* Called after lexing #if IDENT/#else/#endif - this checks whether there is nothing except end of line *)
-(* or end of file and then calls the lexing function specified by 'cont' - either token or ifdef_skip *)
-and endline cont args skip = parse
- | newline
-   { newline lexbuf; 
-     match cont with
-     | ENDL_token(ifdefStack) -> skipToken skip (WHITESPACE(AT_token ifdefStack)) (token args) lexbuf
-     | ENDL_skip(ifdefStack, n, m) -> skipToken skip (INACTIVECODE (AT_ifdef_skip(ifdefStack,n,m))) (ifdef_skip n m args) lexbuf
-   }
- | eof
-   { match cont with
-     | ENDL_token(ifdefStack) -> (EOF(AT_token ifdefStack))
-     | ENDL_skip(ifdefStack, n, m) -> (EOF(AT_ifdef_skip(ifdefStack,n,m)))
-   }
- | [^'\r' '\n']+
- | _
-   { let tok = fail args lexbuf "Expected single line comment or end of line" (WHITESPACE (AT_token !args.ifdefStack)) in
-     skipToken skip tok (token args) lexbuf }     
-
-(* NOTE : OCaml doesn't take tailcalls for functions > ~5 arguments.  Sheesh. *)
-(* Hence we have to wrap up arguments for deeply nested *)
-(* recursive call targets such as this one *)
-and string sargs skip = parse
- |  '\\' newline anywhite* 
-    { let (buf,fin,m,args) = sargs in 
-      newline lexbuf; 
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m)))  (string sargs) lexbuf }
-
- |  escape_char
-    { let (buf,fin,m,args) = sargs in 
-      add_byte_char buf (escape (lexeme lexbuf).[1]);
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m)))  (string sargs) lexbuf } 
-
- | trigraph
-    (* REVIEW: Disallow these in string sargs constants, at least if > 127, since then *)
-    (* they have no established meaning *)
-    { let (buf,fin,m,args) = sargs in 
-      let s = ulexeme lexbuf in 
-      add_byte_char buf (trigraph s.[1] s.[2] s.[3]);
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m)))  (string sargs) lexbuf }
-
- | hexgraph_short
-    { let (buf,fin,m,args) = sargs in 
-      add_unichar buf (int (hexgraph_short (trim_left lexbuf 2)));
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m)))  (string sargs) lexbuf  }
-      
- | unicodegraph_short
-    (* REVIEW: Disallow these in bytearray constants *)
-    { let (buf,fin,m,args) = sargs in 
-      add_unichar buf (int (unicodegraph_short (trim_left lexbuf 2)));
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m)))  (string sargs) lexbuf  }
-     
- | unicodegraph_long
-    { let (buf,fin,m,args) = sargs in 
-      let hi,lo = unicodegraph_long (trim_left lexbuf 2) in 
-      (match hi with | None -> () | Some c -> add_unichar buf (int c));
-      add_unichar buf (int lo);
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf  }
-     
- |  '"' 
-    { let (buf,fin,m,args) = sargs in 
-      let m2 = GetLexerRange lexbuf in 
-      call_string_finish fin buf m2 false }
-
- |  '"''B' 
-    { let (buf,fin,m,args) = sargs in 
-      let m2 = GetLexerRange lexbuf in 
-      call_string_finish fin buf m2 true }
-
- | newline
-    { let (buf,fin,m,args) = sargs in 
-      newline lexbuf; 
-      add_string buf (ulexeme lexbuf); 
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m)))  (string sargs) lexbuf }
-
- | ident  
-    { let (buf,fin,m,args) = sargs in 
-      add_string buf (ulexeme lexbuf); 
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m)))  (string sargs) lexbuf }
-
- | integer 
- | xinteger
-    { let (buf,fin,m,args) = sargs in 
-      add_string buf (ulexeme lexbuf); 
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m)))  (string sargs) lexbuf }
-
- | anywhite +  
-    { let (buf,fin,m,args) = sargs in 
-      add_string buf (ulexeme lexbuf); 
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m)))  (string sargs) lexbuf }
-
- | eof  
-    { let (buf,fin,m,args) = sargs in 
-      EOF (AT_string(!args.ifdefStack,m)) }
- | _ 
-    { let (buf,fin,m,args) = sargs in 
-      add_string buf (lexeme lexbuf); 
-      skipToken skip (STRING_TEXT (AT_string(!args.ifdefStack,m))) (string sargs) lexbuf }
-
-(* REVIEW: consider sharing this code with the 'string' lexer state *)
-and vstring sargs skip = parse
- |  '"' '"'
-   { let (buf,fin,m,args) = sargs in 
-     add_byte_char buf '\"';
-     skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m)))  (vstring sargs) lexbuf } 
-
- |  '"' 
-    { let (buf,fin,m,args) = sargs in 
-      let m2 = GetLexerRange lexbuf in 
-      call_string_finish fin buf m2 false }
-
- |  '"''B' 
-    { let (buf,fin,m,args) = sargs in 
-      let m2 = GetLexerRange lexbuf in 
-      call_string_finish fin buf m2 true }
-
- | newline 
-    { let (buf,fin,m,args) = sargs in 
-      newline lexbuf; 
-      add_string buf (ulexeme lexbuf); 
-      skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m)))  (vstring sargs) lexbuf }
-
- | ident  
-    { let (buf,fin,m,args) = sargs in 
-      add_string buf (ulexeme lexbuf); 
-      skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m)))  (vstring sargs) lexbuf }
-
- | integer 
- | xinteger
-    { let (buf,fin,m,args) = sargs in 
-      add_string buf (ulexeme lexbuf); 
-      skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m)))  (vstring sargs) lexbuf }
-
- | anywhite +  
-    { let (buf,fin,m,args) = sargs in 
-      add_string buf (ulexeme lexbuf); 
-      skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m)))  (vstring sargs) lexbuf }
-
- | eof 
-    { let (buf,fin,m,args) = sargs in 
-      EOF (AT_vstring(!args.ifdefStack,m)) }
- | _ 
-    { let (buf,fin,m,args) = sargs in 
-      add_string buf (lexeme lexbuf); 
-      skipToken skip (STRING_TEXT (AT_vstring(!args.ifdefStack,m))) (vstring sargs) lexbuf }
-
-(* Parsing single-line comment - we need to split it into words for Visual Studio IDE *)
-and tokenized_comment cargs skip = parse 
- | newline
-     { let buff,n,m,args = cargs in 
-       trySaveXmlDoc lexbuf buff;
-       newline lexbuf; 
-       (* saves the documentation (if we're collecting any) into a buffer-local variable *)
-       skipToken skip (LINE_COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf }
- 
- | eof 
-     { let _, n,m,args = cargs in 
-       EOF (AT_token !args.ifdefStack) } (* NOTE: it is legal to end a file with this comment, so we'll return EOF as a token *)
-      
- | [^ ' ' '\n' '\r' ]+
- | anywhite+
-     { let buff,n,m,args = cargs in 
-       (* Append the current token to the XML documentation if we're collecting it *)
-       tryAppendXmlDoc buff (ulexeme lexbuf);
-       skipToken skip (LINE_COMMENT (AT_tokenized_comment(!args.ifdefStack,n,m))) (tokenized_comment(buff,n,m,args)) lexbuf  } 
-       
- | _ { let _, n,m,args = cargs in 
-      skipToken skip (LINE_COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf }
-
-       
-(* WARNING: taking sargs as a single parameter seems to make a difference as to whether *)
-(* OCaml takes tailcalls. *)
-and comment cargs skip = parse
- |  char
-    { let n,m,args = cargs in 
-      skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment(n,m,args)) lexbuf  } 
-    
- | '"'   
-    { let n,m,args = cargs in 
-      skipToken skip (COMMENT (AT_comment_string(!args.ifdefStack,n,m))) (comment_string n m args) lexbuf }
-
- | '@' '"'
-    { let n,m,args = cargs in 
-      skipToken skip (COMMENT (AT_comment_vstring(!args.ifdefStack,n,m))) (comment_vstring n m args) lexbuf }
-
- | '(' '*'
-    { let n,m,args = cargs in 
-      skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n+1,m))) (comment (n+1,m,args)) lexbuf }
-     
- | newline
-    { let n,m,args = cargs in 
-      newline lexbuf; 
-      skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment cargs) lexbuf }
- | "*)" 
-    { 
-      let n,m,args = cargs in 
-      if n > 1 then skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n-1,m))) (comment (n-1,m,args)) lexbuf 
-      else skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf }
-      
- | anywhite+
- | [^ '\'' '(' '*' '\n' '\r' '"' ')' '@' ' ' '\t' ]+  
-    { 
-      let n,m,args = cargs in 
-      skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment cargs) lexbuf }
-    
- | eof 
-     { let n,m,args = cargs in 
-       EOF (AT_comment(!args.ifdefStack,n,m)) }
-     
- | _ { let n,m,args = cargs in 
-       skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment(n,m,args)) lexbuf }
-
-and comment_string n m args skip = parse
- (* Follow string lexing, skipping tokens until it finishes *)
- |  '\\' newline anywhite* 
-     { newline lexbuf; 
-       skipToken skip (COMMENT (AT_comment_string(!args.ifdefStack,n,m))) (comment_string n m args) lexbuf }
-
- | escape_char
- | trigraph
- | hexgraph_short
- | unicodegraph_short
- | unicodegraph_long
- | ident  
- | integer
- | xinteger
- | anywhite +  
-     { skipToken skip (COMMENT (AT_comment_string(!args.ifdefStack,n,m))) (comment_string n m args) lexbuf }
-
-
- | '"' 
-     { skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment(n,m,args)) lexbuf }
-     
- | newline 
-     { newline lexbuf;  
-       skipToken skip (COMMENT (AT_comment_string(!args.ifdefStack,n,m))) (comment_string n m args) lexbuf }
-     
- | eof 
-     { EOF (AT_comment_string(!args.ifdefStack,n,m)) }
-     
- | _  
-     { skipToken skip (COMMENT (AT_comment_string(!args.ifdefStack,n,m))) (comment_string n m args) lexbuf }
-
-and comment_vstring n m args skip = parse
- (* Follow vstring lexing, in short, skip double-quotes and other chars until we hit a single quote *)
- | '"' '"'
-     { skipToken skip (COMMENT (AT_comment_vstring(!args.ifdefStack,n,m))) (comment_vstring n m args) lexbuf }
-
- | '"' 
-     { skipToken skip (COMMENT (AT_comment(!args.ifdefStack,n,m))) (comment(n,m,args)) lexbuf }
-
- | ident  
- | integer 
- | xinteger
- | anywhite +  
-     { skipToken skip (COMMENT (AT_comment_vstring(!args.ifdefStack,n,m))) (comment_vstring n m args) lexbuf }
-     
- | newline 
-     { newline lexbuf;
-       skipToken skip (COMMENT (AT_comment_vstring(!args.ifdefStack,n,m))) (comment_vstring n m args) lexbuf }
-     
- | eof 
-     { EOF (AT_comment_vstring(!args.ifdefStack,n,m)) }
-     
- | _  
-     { skipToken skip (COMMENT (AT_comment_vstring(!args.ifdefStack,n,m))) (comment_vstring n m args) lexbuf }
-     
-and camlonly m args skip = parse
- | "\""
-     { let buf = Bytes.Bytebuf.create 100 in 
-       let m2 = GetLexerRange  lexbuf in 
-       let _ = string (buf,default_string_finish,m2,args) skip lexbuf in  
-       skipToken skip (COMMENT (AT_camlonly(!args.ifdefStack,m))) (camlonly m args) lexbuf }
- | newline { newline lexbuf;  skipToken skip (COMMENT (AT_camlonly(!args.ifdefStack,m))) (camlonly m args) lexbuf }
- | "(*ENDIF-CAML*)"  {  skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf }
- | "(*ENDIF-OCAML*)" {  skipToken skip (COMMENT (AT_token !args.ifdefStack)) (token args) lexbuf }
- | [^ '(' '"' '\n' '\r' ]+  { skipToken skip (COMMENT (AT_camlonly(!args.ifdefStack,m))) (camlonly m args) lexbuf }
- | eof { EOF (AT_camlonly(!args.ifdefStack,m)) }
- | _ {  skipToken skip (COMMENT (AT_camlonly(!args.ifdefStack,m))) (camlonly m args) lexbuf }
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/lexfilter.ml b/tools/FSharp_1.9.6.16/source/fsharp/lexfilter.ml
deleted file mode 100644
index f23fd403..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/lexfilter.ml
+++ /dev/null
@@ -1,1817 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-/// LexFilter - process the token stream prior to parsing.
-/// Implements the offside rule and a copule of other lexical transformations.
-module (* internal *) Microsoft.FSharp.Compiler.Lexfilter
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Parser
-open Internal.Utilities.Text.Lexing
-open Internal.Utilities.Compatibility.OCaml.Lexing
-open Microsoft.FSharp.Compiler.Lexhelp
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
-
-let debug = false 
-
-type column = int
-let col_of_pos (p:Position) = p.Column
-let line_of_pos (p:Position) = p.Line
-let print_pos_span line column =  Printf.sprintf "(%d:%d)" line column
-let string_of_pos p = print_pos_span (line_of_pos p) (col_of_pos p)
-// used for warning strings, which should display columns as 1-based
-let warning_string_of_pos p = print_pos_span (line_of_pos p) ((col_of_pos p) + 1)
-let output_pos os p = Printf.fprintf os "(%d:%d)" (line_of_pos p) (col_of_pos p)
-
-type Context = 
-    (* position is position of keyword *)
-    // bool indicates 'LET' is an offside let that's part of a CtxtSeqBlock where the 'in' is optional 
-    | CtxtLetDecl of bool * Position  
-    | CtxtIf of Position  
-    | CtxtTry of Position  
-    | CtxtFun of Position  
-    | CtxtFunction of Position  
-    | CtxtWithAsLet of Position  // 'with' when used in an object expression 
-    | CtxtWithAsAugment of Position   // 'with' as used in a type augmentation 
-    | CtxtMatch of Position  
-    | CtxtFor of Position  
-    | CtxtWhile of Position  
-    | CtxtWhen of Position   
-    | CtxtVanilla of Position
-    | CtxtThen of Position  
-    | CtxtElse of Position 
-    | CtxtDo of Position 
-    | CtxtInterfaceHead of Position 
-    | CtxtType of Position 
-    
-    | CtxtNamespaceHead of Position 
-    | CtxtModuleHead of Position 
-    | CtxtMemberHead of Position 
-    | CtxtMemberBody of Position 
-    | CtxtModuleBody of Position 
-    | CtxtException of Position 
-    | CtxtParen of Parser.token * Position 
-    (* position is position of following token *)
-    | CtxtSeqBlock of firstInSequence * Position * addBlockEnd   
-    // first bool indicates "was this 'with' followed immediately by a '|'"? 
-    | CtxtMatchClauses of bool * Position   
-
-    member c.StartPos = 
-        match c with 
-        | CtxtNamespaceHead p | CtxtModuleHead p | CtxtException p | CtxtModuleBody p
-        | CtxtLetDecl (_,p) | CtxtDo p | CtxtInterfaceHead p | CtxtType p | CtxtParen(_,p) | CtxtMemberHead p | CtxtMemberBody p
-        | CtxtWithAsLet(p)
-        | CtxtWithAsAugment(p)
-        | CtxtMatchClauses (_,p) | CtxtIf p | CtxtMatch p | CtxtFor p | CtxtWhile p | CtxtWhen p | CtxtFunction p | CtxtFun p | CtxtTry p | CtxtThen p | CtxtElse (p) | CtxtVanilla p
-        | CtxtSeqBlock (_,p,_) -> p
-
-    member c.StartCol = col_of_pos c.StartPos
-
-    override c.ToString() = 
-        match c with 
-        | CtxtNamespaceHead _ -> "nshead"
-        | CtxtModuleHead _ -> "modhead"
-        | CtxtException _ -> "exception"
-        | CtxtModuleBody _ -> "modbody"
-        | CtxtLetDecl(b,p) -> Printf.sprintf "let(%b,%s)" b (string_of_pos p)
-        | CtxtWithAsLet p -> Printf.sprintf "withlet(%s)" (string_of_pos p)
-        | CtxtWithAsAugment _ -> "withaug"
-        | CtxtDo _ -> "do"
-        | CtxtInterfaceHead _ -> "interface-decl"
-        | CtxtType _ -> "type"
-        | CtxtParen _ -> "paren"
-        | CtxtMemberHead _ -> "member-head"
-        | CtxtMemberBody _ -> "body"
-        | CtxtSeqBlock (b,p,addBlockEnd) -> Printf.sprintf "seqblock(%s,%s)" (match b with FirstInSeqBlock -> "first" | NotFirstInSeqBlock -> "subsequent") (string_of_pos p)
-        | CtxtMatchClauses _ -> "withblock"
-
-        | CtxtIf _ -> "if"
-        | CtxtMatch _ -> "match"
-        | CtxtFor _ -> "for"
-        | CtxtWhile p -> Printf.sprintf "while(%s)" (string_of_pos p)
-        | CtxtWhen _ -> "when" 
-        | CtxtTry _ -> "try"
-        | CtxtFun _ -> "fun"
-        | CtxtFunction _ -> "function"
-
-        | CtxtThen _ -> "then"
-        | CtxtElse p -> Printf.sprintf "else(%s)" (string_of_pos p)
-        | CtxtVanilla (p) -> Printf.sprintf "vanilla(%s)" (string_of_pos p)
-  
-and addBlockEnd = AddBlockEnd | NoAddBlockEnd | AddOneSidedBlockEnd
-and firstInSequence = FirstInSeqBlock | NotFirstInSeqBlock
-
-
-let isInfix token = 
-  match token with 
-  | COMMA 
-  | BAR_BAR 
-  | AMP_AMP 
-  | AMP 
-  | OR
-  | INFIX_BAR_OP _ 
-  | INFIX_AMP_OP _  
-  | INFIX_COMPARE_OP _ 
-  | DOLLAR 
-  //| BAR
-  (*| LESS |GREATER  *)
-  (* | EQUALS *)
-  | INFIX_AT_HAT_OP _
-  | PLUS_MINUS_OP _ 
-  | MINUS  
-  | STAR 
-  | INFIX_STAR_DIV_MOD_OP _
-  | INFIX_STAR_STAR_OP _ 
-  | QMARK_QMARK -> true
-  | _ -> false
-
-let isNonAssocInfixToken token = 
-  match token with 
-  | EQUALS -> true
-  | _ -> false
-
-let infixTokenLength token = 
-  match token with 
-  | COMMA  -> 1
-  | AMP -> 1
-  | OR -> 1
-  | DOLLAR -> 1
-  | MINUS -> 1  
-  | STAR  -> 1
-  | BAR -> 1
-  | LESS -> 1
-  | GREATER -> 1
-  | EQUALS -> 1
-  | QMARK_QMARK -> 2
-  | BAR_BAR -> 2
-  | AMP_AMP -> 2
-  | INFIX_BAR_OP d 
-  | INFIX_AMP_OP d  
-  | INFIX_COMPARE_OP d 
-  | INFIX_AT_HAT_OP d
-  | PLUS_MINUS_OP d 
-  | INFIX_STAR_DIV_MOD_OP d
-  | INFIX_STAR_STAR_OP d -> d.Length
-  | _ -> assert false; 1
-
-
-/// Determine the tokens that may align with the 'if' of an 'if/then/elif/else' without closing
-/// the construct
-let rec isIfBlockContinuator token =
-  match token with 
-  (* The following tokens may align with the "if" without closing the "if", e.g.
-        if  ...
-        then  ...
-        elif ...
-        else ... *) 
-  | THEN | ELSE | ELIF -> true  
-  (* Likewise 
-        if  ... then  (
-        ) elif begin 
-        end else ... *)
-  | END | RPAREN -> true  
-  // The following arise during reprocessing of the inserted tokens, e.g. when we hit a DONE 
-  | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true 
-  | ODUMMY(token) -> isIfBlockContinuator(token)
-  | _ -> false
-
-/// Determine the token that may align with the 'try' of a 'try/catch' or 'try/finally' without closing
-/// the construct
-let rec isTryBlockContinuator token =
-  match token with 
-  (* These tokens may align with the "try" without closing the construct, e.g.
-             try ...
-             with ... *)
-  | FINALLY | WITH -> true  
-  // The following arise during reprocessing of the inserted tokens when we hit a DONE
-  | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true 
-  | ODUMMY(token) -> isTryBlockContinuator(token)
-  | _ -> false
-
-let rec isThenBlockContinuator token =
-  match token with 
-  | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true // The following arise during reprocessing of the inserted tokens when we hit a DONE
-  | ODUMMY(token) -> isThenBlockContinuator(token)
-  | _ -> false
-
-let rec isDoContinuator token =
-  match token with 
-  | DONE -> true (* These tokens may align with the "for" without closing the construct, e.g.
-                           for ... 
-                              do 
-                                 ... 
-                              done *)
-  | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true // The following arise during reprocessing of the inserted tokens when we hit a DONE
-  | ODUMMY(token) -> isDoContinuator(token)
-  | _ -> false
-
-let rec isInterfaceContinuator token =
-  match token with 
-  | END -> true (* These tokens may align with the token "interface" without closing the construct, e.g.
-                           interface ... with 
-                             ...
-                           end *)
-  | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true // The following arise during reprocessing of the inserted tokens when we hit a DONE
-  | ODUMMY(token) -> isInterfaceContinuator(token)
-  | _ -> false
-
-let rec isTypeContinuator token =
-  match token with 
-  (* The following tokens may align with the token "type" without closing the construct, e.g.
-         type X = 
-         | A
-         | B
-         and Y = c            <---          'and' HERE
-         
-         type X = {
-            x: int;
-            y: int
-         }                     <---          '}' HERE
-         and Y = c 
-
-         type Complex = struct
-           val im : float
-         end with                  <---          'end' HERE
-           static member M() = 1
-         end *)
-  | RBRACE | WITH | BAR | AND | END -> true 
-                           
-  // The following arise during reprocessing of the inserted tokens when we hit a DONE 
-  | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true 
-  | ODUMMY(token) -> isTypeContinuator(token)
-  | _ -> false
-
-let rec isForLoopContinuator token =
-  match token with 
-  | DONE -> true (* These tokens may align with the "for" without closing the construct, e.g.
-                           for ... do 
-                              ... 
-                           done *)
-  | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true// The following arise during reprocessing of the inserted tokens when we hit a DONE
-  | ODUMMY(token) -> isForLoopContinuator(token)
-  | _ -> false
-
-let rec isWhileBlockContinuator token =
-  match token with 
-  | DONE -> true (* These tokens may align with the "while" without closing the construct, e.g.
-                           while ... do 
-                              ... 
-                           done *)
-  | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true // The following arise during reprocessing of the inserted tokens when we hit a DONE
-  | ODUMMY(token) -> isWhileBlockContinuator(token)
-  | _ -> false
-
-let rec isLetContinuator token =
-  match token with 
-  | AND -> true  (* These tokens may align with the "let" without closing the construct, e.g.
-                           let ...
-                           and ... *)
-  | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true // The following arise during reprocessing of the inserted tokens when we hit a DONE
-  | ODUMMY(token) -> isLetContinuator(token)
-  | _ -> false
-
-let rec isTypeSeqBlockElementContinuator token = 
-  match token with 
-  | BAR -> true
-  (* A sequence of items separated by '|' counts as one sequence block element, e.g.
-     type x = 
-       | A                 <-- These together count as one element
-       | B                 <-- These together count as one element
-       member x.M1
-       member x.M2 *)
-  | OBLOCKBEGIN | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true // The following arise during reprocessing of the inserted tokens when we hit a DONE
-  | ODUMMY(token) -> isTypeSeqBlockElementContinuator token 
-  | _ -> false
-
-(* Work out when a token doesn't terminate a single item in a sequence definition *)
-let rec isSeqBlockElementContinuator token =
-  isInfix token || 
-        (* Infix tokens may align with the first column of a sequence block without closing a sequence element and starting a new one *)
-        (* e.g. 
-          let f x
-              h x 
-              |> y                              <------- NOTE: Not a new element in the sequence
-       *) 
-  (* end tokens *)
-  match token with 
-  | END | AND | WITH | THEN | RPAREN | RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ -> true 
-        (* The above tokens may align with the first column of a sequence block without closing a sequence element and starting a new one *)
-        (* e.g. 
-          new MenuItem("&Open...", 
-                       new EventHandler(fun _ _ -> 
-                           ...
-                       ),                              <------- NOTE RPAREN HERE
-                       Shortcut.CtrlO)
-       *) 
-  // The following arise during reprocessing of the inserted tokens when we hit a DONE
-  | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true 
-  | ODUMMY(token) -> isSeqBlockElementContinuator token 
-  | _ -> false
-
-let rec isWithAugmentBlockContinuator token = 
-  match token with 
-  | END -> true    (* These tokens may align with "with" of an augmentation block without closing the construct, e.g.
-                           interface Foo
-                              with 
-                                 member ...
-                              end *)
-  | ODUMMY(token) -> isWithAugmentBlockContinuator(token)
-  | _ -> false
-
-let isLongIdentifier token = (match token with IDENT _ | DOT -> true | _ -> false)
-
-let isAtomicExprEndToken token = 
-    match token with
-    | IDENT _ 
-    | INT8 _ | INT16 _ | INT32 _ | INT64 _ | NATIVEINT _ 
-    | UINT8 _ | UINT16 _ | UINT32 _ | UINT64 _ | UNATIVEINT _
-    | DECIMAL _ | BIGNUM _  | STRING _ | BYTEARRAY _  | CHAR _ 
-    | IEEE32 _ | IEEE64 _ 
-    | RPAREN | RBRACK | RBRACE | BAR_RBRACK | END 
-    | NULL | FALSE | TRUE | UNDERSCORE -> true
-    | _ -> false
-    
-//----------------------------------------------------------------------------
-// give a 'begin' token, does an 'end' token match?
-//--------------------------------------------------------------------------
-let parenTokensBalance t1 t2 = 
-    match t1,t2 with 
-    | (LPAREN,RPAREN) 
-    | (LBRACE,RBRACE) 
-    | (LBRACK,RBRACK) 
-    | (INTERFACE,END) 
-    | (CLASS,END) 
-    | (SIG,END) 
-    | (STRUCT,END) 
-    | (LBRACK_BAR,BAR_RBRACK)
-    | (BEGIN,END) -> true 
-    | (LQUOTE q1,RQUOTE q2) when q1 = q2 -> true 
-    | _ -> false
-    
-type LexFilter = 
-    { lexbuf : UnicodeLexing.Lexbuf;
-      lexer: UnicodeLexing.Lexbuf -> Parser.token }
-
-/// Used to save some aspects of the lexbuffer state
-[]
-type LexbufState(startPos: Position, 
-                 endPos  : Position, 
-                 pastEOF : bool) = 
-    member x.StartPos = startPos
-    member x.EndPos = endPos
-    member x.PastEOF = pastEOF
-
-/// Used to save the state related to a token
-[]
-type TokenTup = 
-    val Token : token
-    val LexbufState : LexbufState
-    val LastTokenPos: Position * Position
-    new (token,state,lastTokenPos) = { Token=token; LexbufState=state;LastTokenPos=lastTokenPos }
-    
-    /// Returns starting position of the token
-    member x.StartPos = x.LexbufState.StartPos
-    /// Returns end position of the token
-    member x.EndPos = x.LexbufState.EndPos
-    
-    /// Returns a token 'tok' with the same position as this token
-    member x.UseLocation(tok) = 
-        let tokState = x.LexbufState 
-        TokenTup(tok,LexbufState(tokState.StartPos, tokState.EndPos,false),x.LastTokenPos)
-        
-    /// Returns a token 'tok' with the same position as this token, except that 
-    /// it is shifted by specified number of characters from the left and from the right
-    /// Note: positive value means shift to the right in both cases
-    member x.UseShiftedLocation(tok, shiftLeft, shiftRight) = 
-        let tokState = x.LexbufState 
-        TokenTup(tok,LexbufState(tokState.StartPos.ShiftColumnBy(shiftLeft),
-                                 tokState.EndPos.ShiftColumnBy(shiftRight),false),x.LastTokenPos)
-        
-
-
-//----------------------------------------------------------------------------
-// Utilities for the tokenizer that are needed in other opalces
-//--------------------------------------------------------------------------*)
-
-// Strip a bunch of leading '>' of a token, at the end of a typar application
-// Note: this is used in the 'service.ml' to do limited postprocessing
-let (|TyparsCloseOp|_|) (txt:string) = 
-    let angles = txt |> Seq.takeWhile (fun c -> c = '>') |> Seq.to_list
-    let afterAngles = txt |> Seq.skipWhile (fun c -> c = '>') |> Seq.to_list
-    if angles.Length = 0 then None else
-
-    let afterOp = 
-        match (new System.String(Array.of_seq afterAngles)) with 
-         | "." -> Some DOT
-         | "]" -> Some RBRACK
-         | "-" -> Some MINUS
-         | ".." -> Some DOT_DOT 
-         | "?" ->  Some QMARK 
-         | "??" -> Some QMARK_QMARK 
-         | "*" -> Some STAR 
-         | "&" -> Some AMP
-         | "->" -> Some RARROW 
-         | "->>" -> Some RARROW2 
-         | "<-"  -> Some LARROW 
-         | "=" -> Some EQUALS 
-         | "<" -> Some LESS 
-         | "$" -> Some DOLLAR
-         | "%" -> Some (PERCENT_OP("%") )
-         | "%%" -> Some (PERCENT_OP("%%"))
-         | "" -> None
-         | s -> 
-             match  List.of_seq afterAngles with 
-              | ('=' :: _)
-              | ('!' :: '=' :: _)
-              | ('<' :: _)
-              | ('>' :: _)
-              | ('$' :: _) -> Some (INFIX_COMPARE_OP(s))
-              | ('&' :: _) -> Some (INFIX_AMP_OP(s))
-              | ('|' :: _) -> Some (INFIX_BAR_OP(s))
-              | ('!' :: _)
-              | ('?' :: _)
-              | ('~' :: _) -> Some (PREFIX_OP(s))
-              | ('@' :: _)
-              | ('^' :: _) -> Some (INFIX_AT_HAT_OP(s))
-              | ('+' :: _)
-              | ('-' :: _) -> Some (PLUS_MINUS_OP(s))
-              | ('*' :: '*' :: _) -> Some (INFIX_STAR_STAR_OP(s))
-              | ('*' :: _)
-              | ('/' :: _)
-              | ('%' :: _) -> Some (INFIX_STAR_DIV_MOD_OP(s))
-              | _ -> None
-    Some([| for c in angles do yield GREATER |],afterOp)
-
-//----------------------------------------------------------------------------
-// build a hardWhiteLexFilter
-//--------------------------------------------------------------------------*)
-let create syntaxFlagRequired (lightSyntaxStatus:LightSyntaxStatus) lexer (lexbuf: UnicodeLexing.Lexbuf)  = 
-
-    delayInsertedToWorkaroundKnownNgenBug "Delay1" <| fun () ->
-    
-    //----------------------------------------------------------------------------
-    // Part I. Building a new lex stream from an old
-    //
-    // A lexbuf is a stateful object that can be enticed to emit tokens by calling
-    // 'lexer' functions designed to work with the lexbuf.  Here we fake a new stream
-    // coming out of an existing lexbuf.  Ideally lexbufs would be abstract interfaces
-    // and we could just build a new abstract interface that wraps an existing one.
-    // However that is not how either OCaml or F# lexbufs work.
-    // 
-    // Part of the fakery we perform involves buffering a lookahead token which 
-    // we eventually pass on to the client.  However, this client also looks at
-    // other aspects of the 'state' of lexbuf directly, e.g. OCaml lexbufs
-    // have 
-    //    (start-pos, end-pos)
-    // states, and F# lexbufs have a triple
-    //    (start-pos, end-pos, eof-reached)
-    //
-    // You may ask why the F# parser reads this lexbuf state directly.  Well, the
-    // pars.mly code itself it doesn't, but the parser engines (Parsing, prim-parsing.fs) 
-    // certainly do for both F# and OCaml. e.g. when these parsers read a token 
-    // from the lexstream they also read the position information and keep this
-    // a related stack. 
-    //
-    // Anyway, this explains the functions getLexbufState(), setLexbufState() etc.
-    //--------------------------------------------------------------------------
-
-    (* make sure we don't report 'eof' when inserting a token, and set the positions to the *)
-    (* last reported token position *)
-    let lexbufStateForInsertedDummyTokens (lastTokenStartPos,lastTokenEndPos) =
-        new LexbufState(lastTokenStartPos,lastTokenEndPos,false) 
-
-    let getLexbufState() = 
-        new LexbufState(lexbuf.StartPos, lexbuf.EndPos, lexbuf.IsPastEndOfStream)  
-(*
-        if debug then dprintf "GET lex state: %a\n" output_any p;
-        p
-*)
-
-    let setLexbufState (p:LexbufState) =
-        (* if debug then dprintf "SET lex state to; %a\n" output_any p;  *)
-        (* let (p1,p2,eof) = p in   *)
-        lexbuf.StartPos <- p.StartPos;  
-        lexbuf.EndPos <- p.EndPos; 
-        lexbuf.IsPastEndOfStream <- p.PastEOF
-
-    let startPosOfTokenTup (tokenTup:TokenTup) = 
-          match tokenTup.Token with
-          (* EOF token is processed as if they were on column -1 *)
-          (* This forces the closure of all contexts. *)
-          | Parser.EOF _ -> 
-              let p = tokenTup.LexbufState.StartPos
-              { p with pos_cnum = p.pos_bol-1 }
-          | _ ->  tokenTup.LexbufState.StartPos 
-
-    //----------------------------------------------------------------------------
-    // Part II. The state of the new lex stream object.
-    //--------------------------------------------------------------------------
-
-    (* Ok, we're going to the wrapped lexbuf.  Set the lexstate back so that the lexbuf *)
-    (* appears consistent and correct for the wrapped lexer function. *)
-    let runWrappedLexerInConsistentLexbufState =
-        let savedLexbufState = ref (LexbufState())
-        let haveLexbufState = ref false
-        fun () -> 
-            let state = if !haveLexbufState then !savedLexbufState else getLexbufState()
-            setLexbufState state;
-            let lastTokenStart = state.StartPos
-            let lastTokenEnd = state.EndPos
-            let token = lexer lexbuf
-            (* Now we've got the token, remember the lexbuf state, associating it with the token *)
-            (* and remembering it as the last observed lexbuf state for the wrapped lexer function. *)
-            let tokenLexbufState = getLexbufState()
-            savedLexbufState := tokenLexbufState;
-            haveLexbufState := true;
-            TokenTup(token,tokenLexbufState,(lastTokenStart,lastTokenEnd))
-
-    //----------------------------------------------------------------------------
-    // Fetch a raw token, either from the old lexer or from our delayedStack
-    //--------------------------------------------------------------------------
-
-    let delayedStack = ref []
-
-    let delayToken tokenTup = 
-      delayedStack := tokenTup :: !delayedStack
-
-    let popNextTokenTup() = 
-      match !delayedStack with 
-      | tokenTup :: rest -> 
-          delayedStack := rest; 
-          if debug then dprintf "popNextTokenTup: delayed token, tokenStartPos = %a\n" output_pos (startPosOfTokenTup tokenTup); 
-          tokenTup
-      | [] -> 
-          if debug then dprintf "popNextTokenTup: no delayed tokens, running lexer...\n";
-          runWrappedLexerInConsistentLexbufState() 
-    
-
-    //----------------------------------------------------------------------------
-    // Part III. Initial configuration of state.
-    //
-    // We read a token.  In F# Interactive the parser thread will be correctly blocking
-    // here.
-    //--------------------------------------------------------------------------
-
-    let initialized = ref false
-    let offsideStack = ref []
-    let prevWasAtomicEnd = ref false
-    
-    let peekInitial() =
-        let initialLookaheadTokenTup  = popNextTokenTup()
-        if debug then dprintf "first token: initialLookaheadTokenLexbufState = %a\n" output_pos (startPosOfTokenTup initialLookaheadTokenTup); 
-        
-        delayToken initialLookaheadTokenTup; 
-        initialized := true;
-        offsideStack := (CtxtSeqBlock(FirstInSeqBlock,startPosOfTokenTup initialLookaheadTokenTup,NoAddBlockEnd)) :: !offsideStack;
-        initialLookaheadTokenTup 
-
-    let warn (s:TokenTup) msg = 
-        warning(Lexhelp.IndentationProblem(msg,mksyn_range (startPosOfTokenTup s) s.LexbufState.EndPos))
-
-    //----------------------------------------------------------------------------
-    // Part IV. Helper functions for pushing contexts and giving good warnings
-    // if a context is undented.  
-    //
-    // Undentation rules
-    //--------------------------------------------------------------------------
-
-    let pushCtxt tokenTup (newCtxt:Context) =
-        let rec unindentationLimit strict stack = 
-            match newCtxt,stack with 
-            | _, [] -> (newCtxt.StartPos, -1) 
-            (* | _, (CtxtSeqBlock _ :: (CtxtModuleBody _ | CtxtMatchClauses _ | CtxtThen _ | CtxtElse _ | CtxtDo _ | CtxtParen _ | CtxtMemberBody _) :: _) -> () *) 
-
-            (* ignore SeqBlock because something more interesting is coming *)
-            (* | CtxtSeqBlock _ :: rest -> unindentationLimit strict rest*)
-            (* ignore Vanilla because a SeqBlock is always coming *)
-            | _, (CtxtVanilla _ :: rest) -> unindentationLimit strict rest
-
-            | _, (CtxtSeqBlock _ :: rest) when not strict -> unindentationLimit strict rest
-            | _, (CtxtParen _ :: rest) when not strict -> unindentationLimit strict rest
-
-
-
-            (* 'begin match' limited by minimum of two  *)
-            (* '(match' limited by minimum of two  *)
-            | _,(((CtxtMatch _) as ctxt1) :: CtxtSeqBlock _ :: (CtxtParen ((BEGIN | LPAREN),_) as ctxt2) :: rest)
-                      -> if ctxt1.StartCol <= ctxt2.StartCol 
-                         then (ctxt1.StartPos,ctxt1.StartCol) 
-                         else (ctxt2.StartPos,ctxt2.StartCol) 
-
-             (* 'let ... = function' limited by 'let', precisely  *)
-             (* This covers the common form *)
-             (*                          *)
-             (*     let f x = function   *)
-             (*     | Case1 -> ...       *)
-             (*     | Case2 -> ...       *)
-            | (CtxtMatchClauses _), (CtxtFunction _ :: CtxtSeqBlock _ :: (CtxtLetDecl  _ as limitCtxt) :: rest)
-                      -> (limitCtxt.StartPos,limitCtxt.StartCol)
-
-            (* Otherwise 'function ...' places no limit until we hit a CtxtLetDecl etc...  (Recursive) *)
-            | (CtxtMatchClauses _), (CtxtFunction _ :: rest)
-                      -> unindentationLimit false rest
-
-            (* 'try ... with'  limited by 'try'  *)
-            | _,(CtxtMatchClauses _ :: (CtxtTry _ as limitCtxt) :: rest)
-                      -> (limitCtxt.StartPos,limitCtxt.StartCol)
-
-            (* 'fun ->' places no limit until we hit a CtxtLetDecl etc...  (Recursive) *)
-            | _,(CtxtFun _ :: rest)
-                      -> unindentationLimit false rest
-
-            (* 'f ...{' places no limit until we hit a CtxtLetDecl etc... *)
-            | _,(CtxtParen (LBRACE,_) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest)
-            | _,(CtxtSeqBlock _ :: CtxtParen(LBRACE,_) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest)
-                      -> unindentationLimit false rest
-
-
-             (* MAJOR PERMITTED UNDENTATION This is allowing:
-                  if x then y else
-                  let x = 3 + 4
-                  x + x  
-                This is a serious thing to allow, but is required since there is no "return" in this language.
-                Without it there is no way of escaping special cases in large bits of code without indenting the main case.
-               *)
-            | CtxtSeqBlock _, (CtxtElse _  :: (CtxtIf _ as limitCtxt) :: rest) 
-                      -> (limitCtxt.StartPos,limitCtxt.StartCol)
-
-            (* Permitted inner-construct precise block alighnment: 
-                         interface ...
-                         with ... 
-                         end 
-                         
-                         type ...
-                         with ... 
-                         end *)
-            | CtxtWithAsAugment _,((CtxtInterfaceHead _ | CtxtMemberHead _ | CtxtException _ | CtxtType _) as limitCtxt  :: rest)
-                      -> (limitCtxt.StartPos,limitCtxt.StartCol) 
-
-            (* Permit unindentation via parentheses (or begin/end) following a 'then', 'else' or 'do':
-                      if nr > 0 then (  
-                            nr <- nr - 1;
-                            acc <- d;
-                            i <- i - 1
-                      ) else (
-                            i <- -1
-                      );
-             *)
-
-            (* PERMITTED UNDENTATION: Inner construct (then,with,else,do) that dangle, places no limit until we hit the corresponding leading construct CtxtIf, CtxtFor, CtxtWhile, CtxtVanilla etc... *)
-            (*    e.g.   if ... then ...
-                            expr
-                         else
-                            expr
-                  rather than forcing 
-                         if ... 
-                         then expr
-                         else expr
-                         
-                         
-                         
-                Also  ...... with
-                         ...           <-- this is before the "with"
-                      end
-
-
-             *)
-
-            | _,((CtxtWithAsAugment _ | CtxtThen _ | CtxtElse _ | CtxtDo _ )  :: rest)
-                      -> unindentationLimit false rest
-
-
-            (* '... (function ->' places no limit until we hit a CtxtLetDecl etc....  (Recursive) *)
-            | _,(CtxtFunction _ :: rest)
-                      -> unindentationLimit false rest
-
-            (* 'module ... : sig'    limited by 'module' *)
-            (* 'module ... : struct' limited by 'module' *)
-            (* 'module ... : begin'  limited by 'module' *)
-            (* 'if ... then ('       limited by 'if' *)
-            (* 'if ... then {'       limited by 'if' *)
-            (* 'if ... then ['       limited by 'if' *)
-            (* 'if ... then [|'       limited by 'if' *)
-            (* 'if ... else ('       limited by 'if' *)
-            (* 'if ... else {'       limited by 'if' *)
-            (* 'if ... else ['       limited by 'if' *)
-            (* 'if ... else [|'       limited by 'if' *)
-            (* 'f ... ('       limited by 'f' *)
-            (* 'f ... {'       limited by 'f' *)
-            (* 'f ... ['       limited by 'f' *)
-            (* 'f ... [|'       limited by 'f' *)
-            (* 'type C = class ... '       limited by 'type' *)
-            (* 'type C = interface ... '       limited by 'type' *)
-            (* 'type C = struct ... '       limited by 'type' *)
-            | _,(CtxtParen ((SIG | STRUCT | BEGIN),_) :: CtxtSeqBlock _  :: (CtxtModuleBody _ as limitCtxt) ::  _)
-            | _,(CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACK_BAR)      ,_) :: CtxtSeqBlock _ :: CtxtThen _ :: (CtxtIf _         as limitCtxt) ::  _)
-            | _,(CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACK_BAR)      ,_) :: CtxtSeqBlock _ :: CtxtElse _ :: (CtxtIf _         as limitCtxt) ::  _)
-            | _,(CtxtParen ((BEGIN | LPAREN | LBRACK (* | LBRACE *) | LBRACK_BAR)      ,_) :: CtxtVanilla _ :: (CtxtSeqBlock _         as limitCtxt) ::  _)
-            | _,(CtxtParen ((CLASS | STRUCT | INTERFACE),_) :: CtxtSeqBlock _ :: (CtxtType _ as limitCtxt) ::  _)
-                      -> (limitCtxt.StartPos,limitCtxt.StartCol + 1) 
-
-            | _,(CtxtSeqBlock _ :: CtxtParen((BEGIN | LPAREN | LBRACK (* | LBRACE *) | LBRACK_BAR),_) :: CtxtVanilla _ :: (CtxtSeqBlock _ as limitCtxt) :: _)
-            | (CtxtSeqBlock _),(CtxtParen ((BEGIN | LPAREN | LBRACE | LBRACK | LBRACK_BAR)      ,_) :: CtxtSeqBlock _ :: ((CtxtType _ | CtxtLetDecl _ | CtxtMemberBody _ | CtxtWithAsLet _) as limitCtxt) ::  _)
-                      -> (limitCtxt.StartPos,limitCtxt.StartCol + 1) 
-
-            (* Permitted inner-construct (e.g. "then" block and "else" block in overall "if-then-else" block ) block alighnment: 
-                         if ... 
-                         then expr
-                         elif expr  
-                         else expr  *)
-            | (CtxtIf   _ | CtxtElse _ | CtxtThen _), (CtxtIf _ as limitCtxt) :: rest  
-                      -> (limitCtxt.StartPos,limitCtxt.StartCol)
-            (* Permitted inner-construct precise block alighnment: 
-                         while  ... 
-                         do expr
-                         done   *)
-            | (CtxtDo _), ((CtxtFor  _ | CtxtWhile _) as limitCtxt) :: rest  
-                      -> (limitCtxt.StartPos,limitCtxt.StartCol)
-
-
-            (* These contexts all require indentation by at least one space *)
-            | _,((CtxtInterfaceHead _ | CtxtNamespaceHead _ | CtxtModuleHead _ | CtxtException _ | CtxtModuleBody _ | CtxtIf _ | CtxtWithAsLet _ | CtxtLetDecl _ | CtxtMemberHead _ | CtxtMemberBody _) as limitCtxt :: _) 
-                      -> (limitCtxt.StartPos,limitCtxt.StartCol + 1) 
-
-            (* These contexts can have their contents exactly aligning *)
-            | _,((CtxtParen _ | CtxtFor _ | CtxtWhen _ | CtxtWhile _ | CtxtType _ | CtxtMatch _  | CtxtTry _ | CtxtMatchClauses _ | CtxtSeqBlock _) as limitCtxt :: _)
-                      -> (limitCtxt.StartPos,limitCtxt.StartCol) 
-       
-
-
-        begin match newCtxt with 
-        (* Dont bother to check pushes of Vanilla blocks since we've always already pushed a SeqBlock at this position *)
-        | CtxtVanilla _ -> ()
-        | _ -> 
-            let p1,c1 = unindentationLimit true !offsideStack
-            let c2 = newCtxt.StartCol
-            if c2 < c1 then 
-                warn tokenTup 
-                       (if debug then (Printf.sprintf "possible incorrect indentation: this token is offside of context at position %s, newCtxt = %A, stack = %A, newCtxtPos = %s, c1 = %d, c2 = %d" (warning_string_of_pos p1) newCtxt !offsideStack (string_of_pos (newCtxt.StartPos)) c1 c2)  
-                        else          (Printf.sprintf "possible incorrect indentation: this token is offside of context started at position %s. Try indenting this token further or using standard formatting conventions" (warning_string_of_pos p1))    )
-        end;
-        let newOffsideStack = newCtxt :: !offsideStack
-        if debug then dprintf "--> pushing, stack = %A\n" newOffsideStack;
-        offsideStack := newOffsideStack
-
-    let popCtxt() = 
-        match !offsideStack with 
-        |  [] -> ()
-        | h :: rest -> 
-             if debug then dprintf "<-- popping Context(%A), stack = %A\n" h rest;
-             offsideStack := rest
-
-    let replaceCtxt p ctxt = popCtxt(); pushCtxt p ctxt
-
-
-    //----------------------------------------------------------------------------
-    // Peek ahead at a token, either from the old lexer or from our delayedStack
-    //--------------------------------------------------------------------------
-
-    let peekNextTokenTup() = 
-        let tokenTup = popNextTokenTup()
-        delayToken tokenTup; 
-        tokenTup
-    
-    let peekNextToken() = 
-        peekNextTokenTup().Token
-    
-     //----------------------------------------------------------------------------
-     // Adjacency precedence rule
-     //--------------------------------------------------------------------------
-
-    let isAdjacent (leftTokenTup:TokenTup) rightTokenTup =
-        let lparenStartPos = startPosOfTokenTup rightTokenTup
-        let tokenEndPos = leftTokenTup.LexbufState.EndPos
-        (tokenEndPos = lparenStartPos)
-    
-    let nextTokenIsAdjacentLParenOrLBrack (tokenTup:TokenTup) =
-        let lookaheadTokenTup = peekNextTokenTup()
-        match lookaheadTokenTup.Token with 
-        | (LPAREN | LBRACK) -> 
-            isAdjacent tokenTup lookaheadTokenTup
-        | _ -> false
-
-    let nextTokenIsAdjacent firstTokenTup =
-        let lookaheadTokenTup = peekNextTokenTup()
-        isAdjacent firstTokenTup lookaheadTokenTup
-
-    let peekAdjacentTypars indentation (tokenTup:TokenTup) =
-        let lookaheadTokenTup = peekNextTokenTup()
-        match lookaheadTokenTup.Token with 
-(*
-  IMPLEMENTATION FOR DESIGN CHANGE 1600 IF REQUIRED
-        | (INFIX_COMPARE_OP "<>",_,_) -> true
-*)
-        | INFIX_COMPARE_OP " 
-            let tokenEndPos = tokenTup.LexbufState.EndPos 
-            if isAdjacent tokenTup lookaheadTokenTup then 
-                let stack = ref []
-                let rec scanAhead nParen = 
-                   let lookaheadTokenTup = popNextTokenTup()
-                   let lookaheadToken = lookaheadTokenTup.Token
-                   stack := lookaheadTokenTup :: !stack;
-                   let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup
-                   match lookaheadToken with 
-                   | Parser.EOF _ | SEMICOLON_SEMICOLON -> false 
-                   | _ when indentation && lookaheadTokenStartPos < tokenEndPos -> false
-                   | (RPAREN | RBRACK) ->
-                       let nParen = nParen - 1
-                       if nParen > 0 then scanAhead nParen else false
-                   | GREATER | GREATER_DOT | GREATER_RBRACK | GREATER_BAR_RBRACK -> 
-                       let nParen = nParen - 1
-                       if nParen > 0 then scanAhead nParen else true
-                   | INFIX_COMPARE_OP (TyparsCloseOp(greaters,afterOp)) -> 
-                       let nParen = nParen - greaters.Length
-                       if nParen > 0 then scanAhead nParen else true
-                   | (LPAREN | LESS | LBRACK | INFIX_COMPARE_OP " 
-                       scanAhead (nParen+1)
-                   | INFIX_AT_HAT_OP _ | MINUS | INT32 _ | INFIX_STAR_DIV_MOD_OP _ | DOT | UNDERSCORE | IDENT _ | COMMA | RARROW | HASH | STAR | QUOTE  -> scanAhead nParen
-                   | _ -> if nParen > 1 then scanAhead nParen else false
-                let res = scanAhead 0
-                !stack |> List.iter (fun tokenTup ->
-                    match tokenTup.Token with 
-                    | INFIX_COMPARE_OP "
-                        delayToken (tokenTup.UseShiftedLocation(INFIX_STAR_DIV_MOD_OP "/", 1, 0));
-                        delayToken (tokenTup.UseShiftedLocation(LESS, 0, -1));
-                    | GREATER_DOT -> 
-                        delayToken (tokenTup.UseShiftedLocation(DOT, 1, 0));         // smash token into two parts ( ">."   ->  ">" and ".")
-                        delayToken (tokenTup.UseShiftedLocation(GREATER, 0, -1));      // use location 
-                    | GREATER_BAR_RBRACK -> 
-                        delayToken (tokenTup.UseShiftedLocation(BAR_RBRACK, 1, 0));
-                        delayToken (tokenTup.UseShiftedLocation(GREATER, 0, -2));
-                    | GREATER_RBRACK ->
-                        delayToken (tokenTup.UseShiftedLocation(RBRACK, 1, 0));
-                        delayToken (tokenTup.UseShiftedLocation(GREATER, 0, -1));
-                    | (INFIX_COMPARE_OP (TyparsCloseOp(greaters,afterOp) as opstr)) -> 
-                        match afterOp with
-                        | None -> ()
-                        | Some tok -> delayToken (tokenTup.UseShiftedLocation(tok, greaters.Length, 0))
-                        for i = greaters.Length - 1 downto 0 do
-                            delayToken (tokenTup.UseShiftedLocation(greaters.[i], i, -opstr.Length + i + 1));
-                    | _ -> delayToken tokenTup);
-                res
-            else 
-                false
-        | _ -> false
-
-     //----------------------------------------------------------------------------
-     // End actions
-     //--------------------------------------------------------------------------
-
-    let returnToken (tokenLexbufState:LexbufState) tok = 
-
-        setLexbufState(tokenLexbufState);
-        prevWasAtomicEnd  := isAtomicExprEndToken(tok);
-        tok
-              
-     //----------------------------------------------------------------------------
-     // Parse and transform the stream of tokens coming from popNextTokenTup, pushing
-     // contexts where needed, popping them where things are offside, balancing
-     // parentheses and other constructs.
-     //--------------------------------------------------------------------------
-
-              
-    let rec hwTokenFetch (useBlockRule) =
-            let tokenTup = popNextTokenTup()
-            let tokenReplaced = rulesForBothSoftWhiteAndHardWhite(tokenTup)
-            if tokenReplaced then hwTokenFetch(useBlockRule) else 
-
-            let tokenStartPos = (startPosOfTokenTup tokenTup)
-            let token = tokenTup.Token
-            let tokenLexbufState = tokenTup.LexbufState
-            let tokenPrevEndPos = tokenTup.LastTokenPos
-            if debug then dprintf "fetch, tokenStartPos = %a, OBLOCKBEGIN=%b, BAR=%b\n" output_pos tokenStartPos (token=OBLOCKBEGIN) (token=BAR); 
-            let tokenStartCol = col_of_pos tokenStartPos
-
-            let sameLine() = (line_of_pos (startPosOfTokenTup (peekNextTokenTup())) = line_of_pos tokenStartPos)
-            let reprocess() = 
-              delayToken tokenTup; 
-              hwTokenFetch(useBlockRule)
-
-            let reprocessWithoutBlockRule() = 
-              delayToken tokenTup; 
-              hwTokenFetch(false)
-            
-            let insertTokenFromPrevPosToCurrentPos(tok) = 
-              delayToken tokenTup; 
-              if debug then dprintf "inserting %a\n" output_any tok;
-              (* returnToken (lexbufStateForInsertedDummyTokens tokenPrevEndPos) tok in *)
-              (* returnToken (lexbufStateForInsertedDummyTokens (fst tokenPrevEndPos, endPosOfTokenTup tokenTup)) tok in *)
-              returnToken (lexbufStateForInsertedDummyTokens (startPosOfTokenTup tokenTup, tokenTup.LexbufState.EndPos)) tok
-
-            let insertToken(tok) = 
-              delayToken tokenTup; 
-              if debug then dprintf "inserting %a\n" output_any tok; 
-              (* returnToken (lexbufStateForInsertedDummyTokens tokenPrevEndPos) tok in *)
-              returnToken (lexbufStateForInsertedDummyTokens (startPosOfTokenTup tokenTup, tokenTup.LexbufState.EndPos)) tok
-
-            let isSemiSemi = match token with SEMICOLON_SEMICOLON -> true | _ -> false
-
-            (* if token = RARROW then Ildiag.dprintf "pushing RARROW at %s, !offsideStack = %A\n" (string_of_pos tokenStartPos) !offsideStack;  *)
-              
-            match token,!offsideStack with 
-
-            (* Balancing rule. Every 'in' terminates all surrounding blocks up to a CtxtLetDecl, and will be swallowed by *)
-            (* terminating the corresponding CtxtLetDecl in the rule below. *)
-            (* Balancing rule. Every 'done' terminates all surrounding blocks up to a CtxtDo, and will be swallowed by *)
-            (* terminating the corresponding CtxtDo in the rule below. *)
-            |  (END | SEMICOLON_SEMICOLON | ELSE | ELIF |  DONE |  IN | RPAREN | RBRACE | RBRACK | BAR_RBRACK | WITH | FINALLY | RQUOTE _),  stack
-                
-                when 
-                  (nonNil stack &&
-                   match token,stack with 
-                   | END, (CtxtWithAsAugment(_)  :: _)
-                   | (ELSE | ELIF), (CtxtIf _ :: _)
-                   | DONE         , (CtxtDo _ :: _)
-                   | IN           , ((CtxtFor _ (* for x in ienum ... *) | CtxtLetDecl _) :: _)
-                   (* WITH balances except in the following contexts.... Phew - an overused keyword! *)
-                   | WITH         , (  ((CtxtMatch _ | CtxtException _ | CtxtMemberHead _ | CtxtInterfaceHead _ | CtxtTry _ | CtxtType _)  :: _)
-                                         (* This is the nasty record/object-expression case *)
-                                         | (CtxtSeqBlock _ :: CtxtParen(LBRACE,_)  :: _) )
-                   | FINALLY      , (CtxtTry _  :: _) -> false
-                   | t2           , (CtxtParen(t1,_) :: _) -> not (parenTokensBalance t1  t2)
-                   | _ -> true)
-                
-                -> 
-                let ctxt = List.hd !offsideStack
-                if debug then dprintf "IN/ELSE/ELIF/DONE/RPAREN/RBRACE/END at %a terminates context at position %a\n" output_pos tokenStartPos output_pos ctxt.StartPos;
-                popCtxt();
-                (match ctxt with 
-                 | CtxtFun _
-                 | CtxtMatchClauses _ 
-                 | CtxtWithAsLet _       
-                         -> (if debug then dprintf "--> inserting OEND\n");     
-                            insertToken OEND
-
-                 | CtxtWithAsAugment _       
-                         -> (if debug then dprintf "--> closing WithAsAugment that didn't have an END, inserting ODECLEND\n");     
-                            insertToken ODECLEND
-                 
-                 | CtxtDo _        
-                 | CtxtLetDecl (true,_) -> 
-                             (if debug then dprintf "--> inserting ODECLEND\n"); 
-                             insertToken ODECLEND 
-                             
-                 | CtxtSeqBlock(_,_,AddBlockEnd) ->  
-                             (if debug then dprintf "--> inserting OBLOCKEND\n"); 
-                             insertToken OBLOCKEND 
-
-                 | CtxtSeqBlock(_,_,AddOneSidedBlockEnd) ->  
-                             (if debug then dprintf "--> inserting ORIGHT_BLOCK_END\n"); 
-                             insertToken ORIGHT_BLOCK_END 
-
-                 
-                 | _                -> reprocess())
-
-            (* reset on ';;' rule. A ';;' terminates ALL entries *)
-            |  SEMICOLON_SEMICOLON, []  -> 
-                if debug then dprintf ";; scheduling a reset\n";
-                delayToken(tokenTup.UseLocation(ORESET));
-                returnToken tokenLexbufState SEMICOLON_SEMICOLON
-            |  ORESET, []  -> 
-                if debug then dprintf "performing a reset after a ;; has been swallowed\n";
-                (* NOTE: The parser thread of F# Interactive will often be blocked on this call, e.g. after an entry has been *)
-                (* processed and we're waiting for the first token of the next entry. *)
-                peekInitial() |> ignore
-                hwTokenFetch(true) 
-
-
-            (* Balancing rule. Encountering an 'in' balances with a 'let'. i.e. even a non-offside 'in' closes a 'let' *)
-            (* The 'IN' token is thrown away and becomes an ODECLEND *)
-            |  IN, (CtxtLetDecl (blockLet,offsidePos) :: _) -> 
-                if debug then dprintf "IN at %a (becomes %s)\n" output_pos tokenStartPos (if blockLet then "ODECLEND" else "IN");
-                if tokenStartCol < col_of_pos offsidePos then warn tokenTup "the indentation of this 'in' token is incorrect with respect to the corresponding 'let'";
-                popCtxt();
-                delayToken(tokenTup.UseLocation(ODUMMY(token))); (* make sure we queue a dummy token at this position to check if any other pop rules apply*)
-                returnToken tokenLexbufState (if blockLet then ODECLEND else token)
-
-            (* Balancing rule. Encountering a 'done' balances with a 'do'. i.e. even a non-offside 'done' closes a 'do' *)
-            (* The 'DONE' token is thrown away and becomes an ODECLEND *)
-            |  DONE, (CtxtDo offsidePos :: _) -> 
-                if debug then dprintf "DONE at %a terminates CtxtDo(offsidePos=%a)\n" output_pos tokenStartPos output_pos offsidePos;
-                popCtxt();
-                (* reprocess as the DONE may close a DO context *)
-                delayToken(tokenTup.UseLocation(ODECLEND)); 
-                hwTokenFetch(useBlockRule)
-
-            (* Balancing rule. Encountering a ')' or '}' balances with a '(' or '{', even if not offside *)
-            |  ((END | RPAREN | RBRACE | RBRACK | BAR_RBRACK | RQUOTE _) as t2), (CtxtParen (t1,_) :: _) 
-                    when parenTokensBalance t1 t2  ->
-                if debug then dprintf "RPAREN/RBRACE/RBRACK/BAR_RBRACK/RQUOTE/END at %a terminates CtxtParen()\n" output_pos tokenStartPos;
-                popCtxt();
-                delayToken(tokenTup.UseLocation(ODUMMY(token))); (* make sure we queue a dummy token at this position to check if any closing rules apply*)
-                returnToken tokenLexbufState token
-
-            (* Balancing rule. Encountering a 'end' can balance with a 'with' but only when not offside *)
-            |  END, (CtxtWithAsAugment(offsidePos) :: _) 
-                       when not (tokenStartCol + 1 <= col_of_pos offsidePos) -> 
-                if debug then dprintf "END at %a terminates CtxtWithAsAugment()\n" output_pos tokenStartPos;
-                popCtxt();                delayToken(tokenTup.UseLocation(ODUMMY(token))); (* make sure we queue a dummy token at this position to check if any closing rules apply*)
-                returnToken tokenLexbufState OEND
-
-            (*  Balancing rule. CtxtNamespaceHead ~~~> CtxtSeqBlock *)
-            (*  Applied when a token other then a long identifier is seen *)
-            | _, (CtxtNamespaceHead _ :: _) 
-                when not (isLongIdentifier token) -> 
-                 if debug then dprintf "CtxtNamespaceHead: EQUALS, pushing CtxtSeqBlock\n";
-                 popCtxt();
-                 pushCtxtSeqBlockAt(tokenTup,false,NoAddBlockEnd);
-                 reprocess()
-
-            (*  Balancing rule. CtxtModuleHead ~~~> CtxtSeqBlock *)
-            (*  Applied when a ':' or '=' token is seen *)
-            (*  Otherwise it's a 'head' module declaration, so ignore it *)
-            | _, (CtxtModuleHead offsidePos :: _) 
-                when not (isLongIdentifier token) && not (match token with PUBLIC | PRIVATE | INTERNAL -> true | _ -> false) -> 
-                 if (match token with COLON | EQUALS -> true | _ -> false) then begin
-                   if debug then dprintf "CtxtModuleHead: COLON/EQUALS, pushing CtxtModuleBody and CtxtSeqBlock\n";
-                   popCtxt();
-                   pushCtxt tokenTup (CtxtModuleBody offsidePos);
-                   pushCtxtSeqBlock(true,AddBlockEnd);
-                   returnToken tokenLexbufState token
-                 end else begin
-                   popCtxt();
-                   reprocessWithoutBlockRule()
-                 end
-
-            (*  Offside rule for SeqBlock.  
-                f x
-                g x
-              ...
-             *)
-            | _, (CtxtSeqBlock(_,offsidePos,addBlockEnd) :: rest) when 
-                            
-                   (isSemiSemi or 
-                        let grace = 
-                            match token, rest with 
-                             (* When in a type context allow a grace of 2 column positions for '|' tokens, permits 
-                                 type x = 
-                                     A of string    <-- note missing '|' here - bad style, and perhaps should be disallowed
-                                   | B of int *)
-                                      
-                            | BAR, (CtxtType _ :: _) -> 2
-
-                             (* This ensures we close a type context seq block when the '|' marks
-                                of a type definition are aligned with the 'type' token. This lack of
-                                indentation is fundamentally perverse and should probably not be allowed,
-                                but occurs in Foundations of F# and in quite a lot of user code.
-                                
-                                 type x = 
-                                 | A 
-                                 | B 
-                                 
-                                     <-- close the type context sequence block here *)
-
-                            | _, (CtxtType posType :: _) when col_of_pos offsidePos = col_of_pos posType && not (isTypeSeqBlockElementContinuator token) -> -1
-
-
-                            | _ -> 
-                               (* Allow a grace of 3 column positions for infix tokens, permits 
-                                   let x =           
-                                         expr + expr 
-                                       + expr + expr 
-                                  And   
-                                     let x =           
-                                           expr  
-                                        |> f expr 
-                                        |> f expr  
-                                  Note you need a semicolon in the following situation:
-
-                                   let x =           
-                                         stmt
-                                        -expr     <-- not allowed, as prefix token is here considered infix
-
-                                  i.e.
-
-                                   let x =           
-                                         stmt;
-                                         -expr     
-                            *)
-                                (if isInfix token then infixTokenLength token + 1 else 0)
-                        (tokenStartCol + grace < col_of_pos offsidePos)) -> 
-               if debug then dprintf "offside token at column %d indicates end of CtxtSeqBlock started at %a!\n" tokenStartCol output_pos offsidePos;
-               popCtxt();
-               if debug then (match addBlockEnd with AddBlockEnd -> dprintf "end of CtxtSeqBlock, insert OBLOCKEND \n" | _ -> ()) ;
-               (match addBlockEnd with 
-                | AddBlockEnd -> insertToken(OBLOCKEND) 
-                | AddOneSidedBlockEnd -> insertToken(ORIGHT_BLOCK_END) 
-                | NoAddBlockEnd -> reprocess() )
-
-            (*  Offside rule for SeqBlock.
-                  fff
-                     eeeee
-                
-             *)
-            | _, (CtxtVanilla(offsidePos) :: _) when isSemiSemi or tokenStartCol <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside token at column %d indicates end of CtxtVanilla started at %a!\n" tokenStartCol output_pos offsidePos;
-               popCtxt();
-               reprocess()
-
-            (*  Offside rule for SeqBlock - special case
-                [< ... >]
-                decl
-             *)
-
-            | _, (CtxtSeqBlock(NotFirstInSeqBlock,offsidePos,addBlockEnd) :: _) 
-                     when (match token with GREATER_RBRACK -> true | _ -> false) -> 
-               (* attribute-end tokens mean CtxtSeqBlock rule is NOT applied to the next token, *)
-               replaceCtxt tokenTup (CtxtSeqBlock (FirstInSeqBlock,offsidePos,addBlockEnd));
-               reprocessWithoutBlockRule()
-
-            (*  Offside rule for SeqBlock - avoiding inserting OBLOCKSEP on first item in block
-             *)
-
-            | _, (CtxtSeqBlock (FirstInSeqBlock,offsidePos,addBlockEnd) :: _) when useBlockRule -> 
-               (* This is the first token in a block, or a token immediately *)
-               (* following an infix operator (see above). *)
-               (* Return the token, but only after processing any additional rules *)
-               (* applicable for this token.  Don't apply the CtxtSeqBlock rule for *)
-               (* this token, but do apply it on subsequent tokens. *)
-               if debug then dprintf "repull for CtxtSeqBlockStart\n" ;
-               replaceCtxt tokenTup (CtxtSeqBlock (NotFirstInSeqBlock,offsidePos,addBlockEnd));
-               reprocessWithoutBlockRule()
-
-            (*  Offside rule for SeqBlock - inserting OBLOCKSEP on subsequent items in a block when they are precisely aligned
-
-               let f1 () = 
-                  expr
-                  ...
-               ~~> insert OBLOCKSEP
-           
-               let f1 () = 
-                  let x = expr
-                  ...
-               ~~> insert OBLOCKSEP
-             
-               let f1 () = 
-                  let x1 = expr
-                  let x2 = expr
-                  let x3 = expr
-                  ...
-               ~~> insert OBLOCKSEP
-             *)
-            | _, (CtxtSeqBlock (NotFirstInSeqBlock,offsidePos,addBlockEnd) :: rest) 
-                   when  useBlockRule 
-                      && not (let isTypeCtxt = (match rest with 
-                                               | (CtxtType _ :: _) -> true
-                                               | _ -> false)
-                              if isTypeCtxt then isTypeSeqBlockElementContinuator token
-                              else isSeqBlockElementContinuator  token)
-                      && (tokenStartCol = col_of_pos offsidePos) 
-                      && (line_of_pos tokenStartPos <> line_of_pos offsidePos) -> 
-                 if debug then dprintf "offside at column %d matches start of block(%a)! delaying token, returning OBLOCKSEP\n" tokenStartCol output_pos offsidePos;
-                 replaceCtxt tokenTup (CtxtSeqBlock (FirstInSeqBlock,offsidePos,addBlockEnd));
-                 (* no change to offside stack: another statement block starts *)
-                 insertTokenFromPrevPosToCurrentPos OBLOCKSEP
-
-            (*  Offside rule for CtxtLetDecl *)
-            (* let .... = 
-                  ...
-               
-             *)
-            (* let .... = 
-                  ...
-               
-             *)
-            (*   let .... =
-                     ...
-                <*>
-             *)
-            | _, (CtxtLetDecl (true,offsidePos) :: _) when 
-                          isSemiSemi or (if isLetContinuator token then tokenStartCol + 1 else tokenStartCol) <= col_of_pos offsidePos -> 
-               if debug then dprintf "token at column %d is offside from LET(offsidePos=%a)! delaying token, returning ODECLEND\n" tokenStartCol output_pos offsidePos;
-               popCtxt();
-               insertToken ODECLEND
-
-            | _, (CtxtDo offsidePos :: _) 
-                   when isSemiSemi or (if isDoContinuator token then tokenStartCol + 1 else tokenStartCol) <= col_of_pos offsidePos -> 
-               if debug then dprintf "token at column %d is offside from DO(offsidePos=%a)! delaying token, returning ODECLEND\n" tokenStartCol output_pos offsidePos;
-               popCtxt();
-               insertToken ODECLEND
-
-            (* class
-                  interface AAA
-                ...
-               ...
-               
-             *)
-
-            | _, (CtxtInterfaceHead offsidePos :: _) 
-                   when isSemiSemi or (if isInterfaceContinuator token then tokenStartCol + 1 else tokenStartCol) <= col_of_pos offsidePos -> 
-               if debug then dprintf "token at column %d is offside from INTERFACE(offsidePos=%a)! pop and reprocess\n" tokenStartCol output_pos offsidePos;
-               popCtxt();
-               reprocess()
-
-            | _, (CtxtType offsidePos :: _) 
-                   when (isSemiSemi or 
-                         ((if isTypeContinuator token then tokenStartCol + 1 else tokenStartCol) <= col_of_pos offsidePos)) -> 
-               if debug then dprintf "token at column %d is offside from TYPE(offsidePos=%a)! pop and reprocess\n" tokenStartCol output_pos offsidePos;
-               popCtxt();
-               reprocess()
-
-            (* module M = ...
-               end
-             *)
-            (*  module M = ...
-               ...
-             *)
-            | _, ((CtxtModuleBody offsidePos) :: _) when isSemiSemi or tokenStartCol <= col_of_pos offsidePos -> 
-               if debug then dprintf "token at column %d is offside from MODULE with offsidePos %a! delaying token\n" tokenStartCol output_pos offsidePos;
-               popCtxt();
-               reprocess()
-
-            | _, ((CtxtException offsidePos) :: _) when isSemiSemi or tokenStartCol <= col_of_pos offsidePos -> 
-               if debug then dprintf "token at column %d is offside from EXCEPTION with offsidePos %a! delaying token\n" tokenStartCol output_pos offsidePos;
-               popCtxt();
-               reprocess()
-
-            (* Pop CtxtMemberBody when offside.  Insert an ODECLEND to indicate the end of the member *)
-            | _, ((CtxtMemberBody(offsidePos)) :: _) when isSemiSemi or tokenStartCol <= col_of_pos offsidePos -> 
-               if debug then dprintf "token at column %d is offside from MEMBER/OVERRIDE head with offsidePos %a!\n" tokenStartCol output_pos offsidePos;
-               popCtxt();
-               insertToken ODECLEND
-               (* hwTokenFetch(useBlockRule) *)
-
-            (* Pop CtxtMemberHead when offside *)
-            | _, ((CtxtMemberHead(offsidePos)) :: _) when isSemiSemi or tokenStartCol <= col_of_pos offsidePos -> 
-               if debug then dprintf "token at column %d is offside from MEMBER/OVERRIDE head with offsidePos %a!\n" tokenStartCol output_pos offsidePos;
-               popCtxt();
-               reprocess()
-
-            | _, (CtxtIf offsidePos :: _) 
-                       when isSemiSemi or (if isIfBlockContinuator token then  tokenStartCol + 1 else tokenStartCol) <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtIf\n";
-               popCtxt();
-               reprocess()
-                
-            | _, (CtxtWithAsLet offsidePos :: _) 
-                       when isSemiSemi or (if isLetContinuator token then  tokenStartCol + 1 else tokenStartCol) <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtWithAsLet\n";
-               popCtxt();
-               insertToken OEND
-                
-            | _, (CtxtWithAsAugment(offsidePos) :: _) 
-                       when isSemiSemi or (if isWithAugmentBlockContinuator token then tokenStartCol + 1  else tokenStartCol) <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtWithAsAugment, isWithAugmentBlockContinuator = %b\n" (isWithAugmentBlockContinuator token);
-               popCtxt();
-               insertToken ODECLEND 
-                
-            | _, (CtxtMatch offsidePos :: _) 
-                       when isSemiSemi or tokenStartCol <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtMatch\n";
-               popCtxt();
-               reprocess()
-                
-            | _, (CtxtFor offsidePos :: _) 
-                       when isSemiSemi or (if isForLoopContinuator token then  tokenStartCol + 1 else tokenStartCol) <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtFor\n";
-               popCtxt();
-               reprocess()
-                
-            | _, (CtxtWhile offsidePos :: _) 
-                       when isSemiSemi or (if isWhileBlockContinuator token then  tokenStartCol + 1 else tokenStartCol) <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtWhile\n";
-               popCtxt();
-               reprocess()
-                
-            | _, (CtxtWhen offsidePos :: _) 
-                       when isSemiSemi or tokenStartCol <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtWhen\n";
-               popCtxt();
-               reprocess()
-                
-            | _, (CtxtFun offsidePos :: _) 
-                       when isSemiSemi or tokenStartCol <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtFun\n";
-               popCtxt();
-               insertToken OEND
-                
-            | _, (CtxtFunction offsidePos :: _) 
-                       when isSemiSemi or tokenStartCol <= col_of_pos offsidePos -> 
-               popCtxt();
-               reprocess()
-                
-            | _, (CtxtTry offsidePos :: _) 
-                       when isSemiSemi or (if isTryBlockContinuator token then  tokenStartCol + 1 else tokenStartCol) <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtTry\n";
-               popCtxt();
-               reprocess()
-                
-            (*  then 
-                   ...
-                else  
-             *)
-            (*  then 
-                   ...
-             *)
-            | _, (CtxtThen offsidePos :: _) when isSemiSemi or  (if isThenBlockContinuator token then  tokenStartCol + 1 else tokenStartCol)<= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtThen, popping\n";
-               popCtxt();
-               reprocess()
-                
-            (*  else ...
-               ....
-             *)
-            | _, (CtxtElse (offsidePos) :: _) when isSemiSemi or tokenStartCol <= col_of_pos offsidePos -> 
-               if debug then dprintf "offside from CtxtElse, popping\n";
-               popCtxt();
-               reprocess()
-
-            | _, (CtxtMatchClauses (leadingBar,offsidePos) :: _) 
-                       (* leadingBar=false permits match patterns without an initial '|' *)
-                      when (isSemiSemi or 
-                            (match token with 
-                             (* BAR occurs in pattern matching 'with' blocks *)
-                             | BAR -> 
-                                 let cond1 = tokenStartCol + (if leadingBar then 0 else 2)  < col_of_pos offsidePos
-                                 let cond2 = tokenStartCol + (if leadingBar then 1 else 2)  < col_of_pos offsidePos
-                                 if (cond1 <> cond2) then 
-                                     warn tokenTup "The '|' tokens separating rules of this pattern match are misaligned by one column. This misalignment was tolerated by earlier versions of the F# compiler but will now normally give an error. Consider realigning your code or using further indentation";
-                                 cond1
-                             | END -> tokenStartCol + (if leadingBar then -1 else 1) < col_of_pos offsidePos
-                             | _   -> tokenStartCol + (if leadingBar then -1 else 1) < col_of_pos offsidePos)) -> 
-                if debug then dprintf "offside from WITH, tokenStartCol = %d, offsidePos = %a, delaying token, returning OEND\n" tokenStartCol output_pos offsidePos;
-                popCtxt();
-                insertToken OEND
-                
-
-            (*  namespace ... ~~~> CtxtNamespaceHead *)
-            |  NAMESPACE,(_ :: _) -> 
-                if debug then dprintf "NAMESPACE: entering CtxtNamespaceHead, awaiting end of long identifier to push CtxtSeqBlock\n" ;
-                pushCtxt tokenTup (CtxtNamespaceHead tokenStartPos);
-                returnToken tokenLexbufState token
-                
-            (*  module ... ~~~> CtxtModuleHead *)
-            |  MODULE,(_ :: _) -> 
-                if debug then dprintf "MODULE: entering CtxtModuleHead, awaiting EQUALS to go to CtxtSeqBlock (%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtModuleHead tokenStartPos);
-                returnToken tokenLexbufState token
-                
-            (*  exception ... ~~~> CtxtException *)
-            |  EXCEPTION,(_ :: _) -> 
-                if debug then dprintf "EXCEPTION: entering CtxtException(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtException tokenStartPos);
-                returnToken tokenLexbufState token
-                
-            (*  let ... ~~~> CtxtLetDecl *)
-            (*     -- this rule only applies to *)
-            (*              - 'static let' *)
-            | LET(isUse), (ctxt :: _) when (match ctxt with CtxtMemberHead _ -> true | _ -> false) -> 
-                if debug then dprintf "LET: entering CtxtLetDecl(), awaiting EQUALS to go to CtxtSeqBlock (%a)\n" output_pos tokenStartPos;
-                let startPos = match ctxt with CtxtMemberHead startPos -> startPos | _ -> tokenStartPos
-                popCtxt(); // get rid of the CtxtMemberHead
-                pushCtxt tokenTup (CtxtLetDecl(true,startPos));
-                returnToken tokenLexbufState (OLET(isUse))
-
-            (*  let ... ~~~> CtxtLetDecl *)
-            (*     -- this rule only applies to *)
-            (*              - 'let' 'right-on' a SeqBlock line *)
-            | LET(isUse), (ctxt :: _) -> 
-                let blockLet = match ctxt with CtxtSeqBlock _ -> true | _ -> false
-                if debug then dprintf "LET: entering CtxtLetDecl(blockLet=%b), awaiting EQUALS to go to CtxtSeqBlock (%a)\n" blockLet output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtLetDecl(blockLet,tokenStartPos));
-                returnToken tokenLexbufState (if blockLet then OLET(isUse) else token)
-                
-            (*  let!  ... ~~~> CtxtLetDecl *)
-            | BINDER b, (ctxt :: _) -> 
-                let blockLet = match ctxt with CtxtSeqBlock _ -> true | _ -> false
-                if debug then dprintf "LET: entering CtxtLetDecl(blockLet=%b), awaiting EQUALS to go to CtxtSeqBlock (%a)\n" blockLet output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtLetDecl(blockLet,tokenStartPos));
-                returnToken tokenLexbufState (if blockLet then OBINDER b else token)
-                
-            (*  static member ... ~~~> CtxtMemberHead *)
-            (*  static ... ~~~> CtxtMemberHead *)
-            (*  member ... ~~~> CtxtMemberHead *)
-            (*  override ... ~~~> CtxtMemberHead *)
-            (*  default ... ~~~> CtxtMemberHead *)
-            |  (STATIC | ABSTRACT | MEMBER | OVERRIDE | DEFAULT),(ctxt :: _) when (match ctxt with CtxtMemberHead _ -> false | _ -> true) -> 
-                if debug then dprintf "STATIC/MEMBER/OVERRIDE/DEFAULT: entering CtxtMemberHead, awaiting EQUALS to go to CtxtSeqBlock (%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtMemberHead(tokenStartPos));
-                returnToken tokenLexbufState token
-
-            (*  public new... ~~~> CtxtMemberHead *)
-            |  (PUBLIC | PRIVATE | INTERNAL),(ctxt :: _) when (match peekNextToken() with NEW -> true | _ -> false) -> 
-                if debug then dprintf "PUBLIC/PRIVATE/INTERNAL NEW: entering CtxtMemberHead, awaiting EQUALS to go to CtxtSeqBlock (%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtMemberHead(tokenStartPos));
-                returnToken tokenLexbufState token
-
-            (*  new( ~~~> CtxtMemberHead, if not already there because of 'public' *)
-            | NEW, ctxt :: _  when (match peekNextToken() with LPAREN -> true | _ -> false) &&  (match ctxt with CtxtMemberHead _ -> false | _ -> true)   -> 
-                if debug then dprintf "NEW: entering CtxtMemberHead, awaiting EQUALS to go to CtxtSeqBlock (%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtMemberHead(tokenStartPos));
-                returnToken tokenLexbufState token
-                                     
-            (*  'let ... = ' ~~~> CtxtSeqBlock *)
-            | EQUALS, (CtxtLetDecl _ :: _) ->  
-                if debug then dprintf "CtxtLetDecl: EQUALS, pushing CtxtSeqBlock\n";
-                pushCtxtSeqBlock(true,AddBlockEnd);
-                returnToken tokenLexbufState token
-
-            | EQUALS, (CtxtType _ :: _) ->  
-                if debug then dprintf "CtxType: EQUALS, pushing CtxtSeqBlock\n";
-                pushCtxtSeqBlock(true,AddBlockEnd);
-                returnToken tokenLexbufState token
-
-            | LAZY, _ ->  
-                if debug then dprintf "LAZY, pushing CtxtSeqBlock\n";
-                pushCtxtSeqBlock(false,NoAddBlockEnd);
-                returnToken tokenLexbufState token
-
-            (*  'with ... = ' ~~~> CtxtSeqBlock *)
-            (* We don't insert begin/end block tokens here since we can't properly distinguish single-line *)
-            (* OCaml-style record update expressions such as "{ t with gbuckets=Array.copy t.gbuckets; gcount=t.gcount }" *)
-            (* These have a syntactically odd status because of the use of ";" to terminate expressions, so each *)
-            (* "=" binding is not properly balanced by "in" or "and" tokens in the single line syntax (unlike other bindings) *)
-            (* REVIEW: However we should be able to insert an OBLOCKEND in the offside case, e.g. 
-                     { t with field1 = f
-                               x
-                              field2 = f 
-                               y }
-                 correctly reports an error because the "x" is offside from the CtxtSeqBlock started by the first equation. *)
-            | EQUALS, ((CtxtWithAsLet _) :: _) ->  
-                if debug then dprintf "CtxtLetDecl/CtxtWithAsLet: EQUALS, pushing CtxtSeqBlock\n";
-                pushCtxtSeqBlock(false,NoAddBlockEnd);
-                returnToken tokenLexbufState token
-
-            (*  'new(... =' ~~~> CtxtMemberBody, CtxtSeqBlock *)
-            (*  'member ... =' ~~~> CtxtMemberBody, CtxtSeqBlock *)
-            (*  'static member ... =' ~~~> CtxtMemberBody, CtxtSeqBlock *)
-            (*  'default ... =' ~~~> CtxtMemberBody, CtxtSeqBlock *)
-            (*  'override ... =' ~~~> CtxtMemberBody, CtxtSeqBlock *)
-            | EQUALS, ((CtxtMemberHead(offsidePos)) :: _) ->  
-                if debug then dprintf "CtxtMemberHead: EQUALS, pushing CtxtSeqBlock\n";
-                replaceCtxt tokenTup (CtxtMemberBody (offsidePos));
-                pushCtxtSeqBlock(true,AddBlockEnd);
-                returnToken tokenLexbufState token
-
-            (* '(' tokens are balanced with ')' tokens and also introduce a CtxtSeqBlock *)
-            | (BEGIN | LPAREN | SIG | LBRACE | LBRACK | LBRACK_BAR | LQUOTE _), _ ->                      
-                if debug then dprintf "LPAREN etc., pushes CtxtParen, pushing CtxtSeqBlock, tokenStartPos = %a\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtParen (token,tokenStartPos));
-                pushCtxtSeqBlock(false,NoAddBlockEnd);
-                returnToken tokenLexbufState token
-
-            (* '(' tokens are balanced with ')' tokens and also introduce a CtxtSeqBlock *)
-            | STRUCT, ctxts                       
-                   when (match ctxts with 
-                         | CtxtSeqBlock _ :: (CtxtModuleBody _ | CtxtType _) :: _ -> 
-                                (* type ... = struct ... end *)
-                                (* module ... = struct ... end *)
-                            true 
-                             
-                         | _ -> false) (* type X<'a when 'a : struct> *) ->
-                if debug then dprintf "LPAREN etc., pushes CtxtParen, pushing CtxtSeqBlock, tokenStartPos = %a\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtParen (token,tokenStartPos));
-                pushCtxtSeqBlock(false,NoAddBlockEnd);
-                returnToken tokenLexbufState token
-
-            | (RARROW | RARROW2), ctxts 
-                   (* Only treat '->' as a sequence block in certain circumstances *)
-                   (* Only treat '->' as a sequence block in certain circumstances *)
-                   when (let rec check = function (CtxtWhile _ | CtxtFor _ | CtxtWhen _ | CtxtMatchClauses _ | CtxtFun _) :: _ -> true (* comprehension/match *)
-                                                | (CtxtSeqBlock _ :: CtxtParen ((LBRACK | LBRACE | LBRACK_BAR), _) :: _) -> true  (* comprehension *)
-                                                | (CtxtSeqBlock _ :: (CtxtDo _ | CtxtWhile _ | CtxtFor _ | CtxtWhen _ | CtxtMatchClauses _  | CtxtTry _ | CtxtThen _ | CtxtElse _) :: _) -> true (* comprehension *)
-                                                (* | (((* CtxtWhen _ | *) CtxtFor _) :: rest) -> check rest (* comprehension *) *)
-                                                | _ -> false
-                         check ctxts) ->
-                if debug then dprintf "RARROW/RARROW2, pushing CtxtSeqBlock, tokenStartPos = %a\n" output_pos tokenStartPos;
-                pushCtxtSeqBlock(false,AddOneSidedBlockEnd);
-                returnToken tokenLexbufState token
-
-            | LARROW, ctxts  when (match peekNextToken() with TRY | MATCH | IF | LET _ | FOR | WHILE -> true | _ -> false) ->
-                if debug then dprintf "LARROW, pushing CtxtSeqBlock, tokenStartPos = %a\n" output_pos tokenStartPos;
-                pushCtxtSeqBlock(true,AddBlockEnd);
-                returnToken tokenLexbufState token
-
-            (*  do  ~~> CtxtDo;CtxtSeqBlock  (unconditionally) *)
-            | (DO | DO_BANG), _ -> 
-                if debug then dprintf "DO: pushing CtxtSeqBlock, tokenStartPos = %a\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtDo (tokenStartPos));
-                pushCtxtSeqBlock(true,AddBlockEnd);
-                returnToken tokenLexbufState (match token with DO -> ODO | DO_BANG -> ODO_BANG | _ -> failwith "unreachable")
-
-            (* The r.h.s. of an infix token begins a new block *)
-            | _,_ when isInfix token && not (sameLine()) -> 
-                if debug then dprintf "(Infix etc.), pushing CtxtSeqBlock, tokenStartPos = %a\n" output_pos tokenStartPos;
-                pushCtxtSeqBlock(false,NoAddBlockEnd);
-                returnToken tokenLexbufState token
-
-
-            | WITH, ((CtxtTry _ | CtxtMatch _) :: _)  -> 
-                let lookaheadTokenTup = peekNextTokenTup()
-                let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup
-                let leadingBar = match (peekNextToken()) with BAR -> true | _ -> false
-                if debug then dprintf "WITH, pushing CtxtMatchClauses, lookaheadTokenStartPos = %a, tokenStartPos = %a\n" output_pos lookaheadTokenStartPos output_pos tokenStartPos;
-                pushCtxt lookaheadTokenTup (CtxtMatchClauses(leadingBar,lookaheadTokenStartPos));
-                returnToken tokenLexbufState OWITH 
-
-            | FINALLY, (CtxtTry _ :: _)  -> 
-                let leadingBar = match (peekNextToken()) with BAR -> true | _ -> false
-                if debug then dprintf "FINALLY, pushing pushCtxtSeqBlock, tokenStartPos = %a\n" output_pos tokenStartPos;
-                pushCtxtSeqBlock(true,AddBlockEnd);
-                returnToken tokenLexbufState token
-
-            | WITH, (((CtxtException _ | CtxtType _ | CtxtMemberHead _ | CtxtInterfaceHead _) as limCtxt) :: _) 
-            | WITH, ((CtxtSeqBlock _) as limCtxt :: CtxtParen(LBRACE,_) :: _)  -> 
-                let lookaheadTokenTup = peekNextTokenTup()
-                let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup
-                begin match lookaheadTokenTup.Token with 
-                | IDENT _ 
-                (* The next clause detects the access annotations after the 'with' in:
-                      member  x.PublicGetSetProperty 
-                                   with public get i = "Ralf"
-                                   and  private set i v = ()  
-                   *)
-                | PUBLIC | PRIVATE | INTERNAL -> 
-
-                    let offsidePos = 
-                       if col_of_pos lookaheadTokenStartPos > col_of_pos tokenTup.LexbufState.EndPos  then
-                            (* This detects:
-                                  { new Foo 
-                                    with M() = 1
-                                    and  N() = 2 } 
-                               and treats the inner bindings as if they were member bindings. 
-                               It also happens to detect
-                                  { foo with m = 1;
-                                             n = 2 }
-                               So we're careful to set the offside column to be the minimum required *)
-                          tokenStartPos
-                        else
-                            (* This detects:
-                                  { foo with 
-                                      m = 1;
-                                      n = 2 }
-                               So we're careful to set the offside column to be the minimum required *)
-                          limCtxt.StartPos
-                    if debug then dprintf "WITH, pushing CtxtWithAsLet, tokenStartPos = %a, lookaheadTokenStartPos = %a\n" output_pos tokenStartPos output_pos lookaheadTokenStartPos;
-                    pushCtxt tokenTup (CtxtWithAsLet(offsidePos));
-                    returnToken tokenLexbufState OWITH 
-                | _ -> 
-                    if debug then dprintf "WITH, pushing CtxtWithAsAugment and CtxtSeqBlock, tokenStartPos = %a, limCtxt = %A\n" output_pos tokenStartPos limCtxt;
-
-                    (* In these situations
-                          interface I with 
-                              ...
-                          end
-                          exception ... with 
-                              ...
-                          end
-                          type ... with 
-                              ...
-                          end
-                          member x.P 
-                             with get() = ...
-                             and  set() = ...
-                          member x.P with 
-                              get() = ...
-                       The limit is "interface"/"exception"/"type" *)
-                    let offsidePos = limCtxt.StartPos
-                       
-                    pushCtxt tokenTup (CtxtWithAsAugment(offsidePos));
-                    pushCtxtSeqBlock(true,AddBlockEnd);
-                    returnToken tokenLexbufState token 
-                end;
-
-            | WITH, stack  -> 
-                if debug then dprintf "WITH\n";
-                if debug then dprintf "WITH --> NO MATCH, pushing CtxtWithAsAugment (type augmentation), stack = %A" stack;
-                pushCtxt tokenTup (CtxtWithAsAugment(tokenStartPos));
-                pushCtxtSeqBlock(true,AddBlockEnd);
-                returnToken tokenLexbufState token 
-
-            | FUNCTION, _  -> 
-                let lookaheadTokenTup = peekNextTokenTup()
-                let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup
-                let leadingBar = match (peekNextToken()) with BAR -> true | _ -> false
-                pushCtxt tokenTup (CtxtFunction(tokenStartPos));
-                pushCtxt lookaheadTokenTup (CtxtMatchClauses(leadingBar,lookaheadTokenStartPos));
-                returnToken tokenLexbufState OFUNCTION
-
-            | THEN,_  -> 
-                if debug then dprintf "THEN, replacing THEN with OTHEN, pushing CtxtSeqBlock;CtxtThen(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtThen(tokenStartPos));
-                pushCtxtSeqBlock(true,AddBlockEnd);
-                returnToken tokenLexbufState OTHEN 
-
-            | ELSE, _   -> 
-                let lookaheadTokenTup = peekNextTokenTup()
-                let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup
-                begin match peekNextToken() with 
-                | IF when sameLine() ->
-                  (* EXCEPTION-TO-THE-RULE: We convert ELSE IF to ELIF since it then opens the block at the right point, *)
-                  (* In particular the case
-                        if e1 then e2
-                        else if e3 then e4
-                        else if e5 then e6 *)
-                  let _ = popNextTokenTup()
-                  if debug then dprintf "ELSE IF: replacing ELSE IF with ELIF, pushing CtxtIf, CtxtVanilla(%a)\n" output_pos tokenStartPos;
-                  pushCtxt tokenTup (CtxtIf(tokenStartPos));
-                  returnToken tokenLexbufState ELIF
-                  
-                | _ -> 
-                  if debug then dprintf "ELSE: replacing ELSE with OELSE, pushing CtxtSeqBlock, CtxtElse(%a)\n" output_pos lookaheadTokenStartPos;
-                  pushCtxt tokenTup (CtxtElse(tokenStartPos));
-                  pushCtxtSeqBlock(true,AddBlockEnd);
-                  returnToken tokenLexbufState OELSE
-                end
-
-            | (ELIF | IF), _   -> 
-                if debug then dprintf "IF, pushing CtxtIf(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtIf (tokenStartPos));
-                returnToken tokenLexbufState token
-
-            | MATCH, _   -> 
-                if debug then dprintf "MATCH, pushing CtxtMatch(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtMatch (tokenStartPos));
-                returnToken tokenLexbufState token
-
-            | FOR, _   -> 
-                if debug then dprintf "FOR, pushing CtxtFor(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtFor (tokenStartPos));
-                returnToken tokenLexbufState token
-
-            | WHILE, _   -> 
-                if debug then dprintf "WHILE, pushing CtxtWhile(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtWhile (tokenStartPos));
-                returnToken tokenLexbufState token
-
-            | WHEN, ((CtxtSeqBlock _) :: _)  -> 
-                if debug then dprintf "WHEN, pushing CtxtWhen(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtWhen (tokenStartPos));
-                returnToken tokenLexbufState token
-
-            | FUN, _   -> 
-                if debug then dprintf "FUN, pushing CtxtFun(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtFun (tokenStartPos));
-                returnToken tokenLexbufState OFUN
-
-            | INTERFACE, _  -> 
-                let lookaheadTokenTup = peekNextTokenTup()
-                let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup
-                begin match lookaheadTokenTup.Token with 
-                (* type I = interface .... end *)
-                | DEFAULT | OVERRIDE | INTERFACE | NEW | TYPE | STATIC | END | MEMBER | ABSTRACT  | INHERIT | LBRACK_LESS -> 
-                    if debug then dprintf "INTERFACE, pushing CtxtParen, tokenStartPos = %a, lookaheadTokenStartPos = %a\n" output_pos tokenStartPos output_pos lookaheadTokenStartPos;
-                    pushCtxt tokenTup (CtxtParen (token,tokenStartPos));
-                    pushCtxtSeqBlock(true,AddBlockEnd);
-                    returnToken tokenLexbufState token
-                (* type C with interface .... with *)
-                (* type C = interface .... with *)
-                | _ -> 
-                    if debug then dprintf "INTERFACE, pushing CtxtInterfaceHead, tokenStartPos = %a, lookaheadTokenStartPos = %a\n" output_pos tokenStartPos output_pos lookaheadTokenStartPos;
-                    pushCtxt tokenTup (CtxtInterfaceHead(tokenStartPos));
-                    returnToken tokenLexbufState OINTERFACE_MEMBER
-                end;
-
-            | CLASS, _   -> 
-                if debug then dprintf "CLASS, pushing CtxtParen(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtParen (token,tokenStartPos));
-                pushCtxtSeqBlock(true,AddBlockEnd);
-                returnToken tokenLexbufState token
-
-            | TYPE, _   -> 
-                if debug then dprintf "TYPE, pushing CtxtType(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtType(tokenStartPos));
-                returnToken tokenLexbufState token
-
-            | TRY, _   -> 
-                if debug then dprintf "Try, pushing CtxtTry(%a)\n" output_pos tokenStartPos;
-                pushCtxt tokenTup (CtxtTry (tokenStartPos));
-                (* REVIEW: we would like to push both a begin/end block pair here, but we can only do that *)
-                (* if we are able to balance the WITH with the TRY.  We can't do that because of the numeraous ways *)
-                (* WITH is used in the grammar (see what happens when we hit a WITH below. *)
-                (* This hits us especially in the single line case: "try make ef1 t with _ -> make ef2 t". *)
-                
-                pushCtxtSeqBlock(false,AddOneSidedBlockEnd);
-                returnToken tokenLexbufState token
-
-            |  OBLOCKBEGIN,_ -> 
-              (* if debug then dprintf "returning token (%s), pos = %a\n" (match token with END -> "end" | _ -> "?") output_pos tokenStartPos;*)
-              returnToken tokenLexbufState token  
-                
-            |  ODUMMY(_),_ -> 
-              if debug then dprintf "skipping dummy token as no offside rules apply\n";
-              hwTokenFetch (useBlockRule) 
-                
-            (* ordinary tokens start a vanilla block *)
-            |  _,CtxtSeqBlock _ :: _ -> 
-                pushCtxt tokenTup (CtxtVanilla(tokenStartPos));
-                if debug then dprintf "pushing CtxtVanilla at tokenStartPos = %a\n" output_pos tokenStartPos;
-                returnToken tokenLexbufState token  
-                
-            |  _ -> 
-              (* if debug then dprintf "returning token (%s), pos = %a\n" (match token with END -> "end" | _ -> "?") output_pos tokenStartPos;*)
-              returnToken tokenLexbufState token  
-
-     and rulesForBothSoftWhiteAndHardWhite(tokenTup:TokenTup) = 
-          match tokenTup.Token with 
-          (* Insert HIGH_PRECEDENCE_APP if needed *)
-          |  IDENT _ when nextTokenIsAdjacentLParenOrLBrack tokenTup ->
-              let dotTokenTup = peekNextTokenTup()
-              if debug then dprintf "inserting HIGH_PRECEDENCE_APP at dotTokenPos = %a\n" output_pos (startPosOfTokenTup dotTokenTup);
-              
-              delayToken(dotTokenTup.UseLocation(HIGH_PRECEDENCE_APP));
-              delayToken(tokenTup);
-              true
-
-          (* Insert HIGH_PRECEDENCE_TYAPP if needed; note that we accept integer constants even though integers cannot have
-             units. This is in order to generate better error messages *)
-          |  (IDENT _ | IEEE64 _ | IEEE32 _ | DECIMAL _ | INT8 _ | INT16 _ | INT32 _ | INT64 _ | NATIVEINT _ | UINT8 _ | UINT16 _ | UINT32 _ | UINT64 _ | BIGNUM _) when peekAdjacentTypars false tokenTup ->
-              let dotTokenTup = peekNextTokenTup()
-              if debug then dprintf "softwhite inserting HIGH_PRECEDENCE_TYAPP at dotTokenPos = %a\n" output_pos (startPosOfTokenTup dotTokenTup);
-
-(*  IMPLEMENTATION FOR DESIGN CHANGE 1600 IF REQUIRED
-              | INFIX_COMPARE_OP "<>" ->
-                  delayToken(LESS,tokenLexbufState,tokenPrevEndPos);
-                  delayToken(GREATER,tokenLexbufState,tokenPrevEndPos);
-                  delayToken(tokenTup);
-*)
-
-              delayToken (dotTokenTup.UseLocation(HIGH_PRECEDENCE_TYAPP));
-              delayToken (tokenTup);
-              true
-
-          (* Split this token to allow "1..2" for range specification *)
-          |  INT32_DOT_DOT (i,v) ->
-              let dotdotPos = new LexbufState(tokenTup.EndPos.ShiftColumnBy(-2), tokenTup.EndPos, false);
-              delayToken(new TokenTup(DOT_DOT, dotdotPos, tokenTup.LastTokenPos));
-              delayToken(tokenTup.UseShiftedLocation(INT32(i,v), 0, -2));
-              true
-          (* Split @>. and @@>. into two *)
-          |  RQUOTE_DOT (s,raw) ->
-              let dotPos = new LexbufState(tokenTup.EndPos.ShiftColumnBy(-1), tokenTup.EndPos, false);
-              delayToken(new TokenTup(DOT, dotPos, tokenTup.LastTokenPos));
-              delayToken(tokenTup.UseShiftedLocation(RQUOTE(s,raw), 0, -1));
-              true
-
-          |  MINUS | PLUS_MINUS_OP _
-                when ((match tokenTup.Token with | PLUS_MINUS_OP s -> (s = "+") | _ -> true) &&
-                      nextTokenIsAdjacent tokenTup && 
-                      not (!prevWasAtomicEnd && (snd(tokenTup.LastTokenPos) = startPosOfTokenTup tokenTup))) ->
-
-              let plus = (match tokenTup.Token with | PLUS_MINUS_OP s -> (s = "+") | _ -> false)
-              let nextTokenTup = popNextTokenTup()
-              begin 
-                /// Merge the location of the prefix token and the literal
-                let delayMergedToken tok = delayToken(new TokenTup(tok,new LexbufState(tokenTup.LexbufState.StartPos,nextTokenTup.LexbufState.EndPos,nextTokenTup.LexbufState.PastEOF),tokenTup.LastTokenPos))
-                match nextTokenTup.Token with 
-                | INT8(v,bad)      -> delayMergedToken(INT8((if plus then v else -v),(plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not
-                | INT16(v,bad)     -> delayMergedToken(INT16((if plus then v else -v),(plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not
-                | INT32(v,bad)     -> delayMergedToken(INT32((if plus then v else -v),(plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not
-                | INT32_DOT_DOT(v,bad)     -> delayMergedToken(INT32_DOT_DOT((if plus then v else -v),(plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not
-                | INT64(v,bad)     -> delayMergedToken(INT64((if plus then v else -v),(plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not
-                | NATIVEINT(v) -> delayMergedToken(NATIVEINT(if plus then v else -v))
-                | IEEE32(v)    -> delayMergedToken(IEEE32(if plus then v else -v))
-                | IEEE64(v)    -> delayMergedToken(IEEE64(if plus then v else -v))
-                | DECIMAL(v)    -> delayMergedToken(DECIMAL(if plus then v else System.Decimal.op_UnaryNegation v))
-                | BIGNUM(v,s)    -> delayMergedToken(BIGNUM((if plus then v else "-"^v),s))
-                | _ -> 
-                  let token = ADJACENT_PREFIX_PLUS_MINUS_OP (match tokenTup.Token with PLUS_MINUS_OP s -> s | MINUS -> "-" | _ -> failwith "unreachable" )
-                  delayToken nextTokenTup; 
-                  delayToken(tokenTup.UseLocation(token));
-              end;
-              true
-
-          | _ -> 
-              false
-  
-     and pushCtxtSeqBlock(addBlockBegin,addBlockEnd) = pushCtxtSeqBlockAt (peekNextTokenTup(),addBlockBegin,addBlockEnd) 
-     and pushCtxtSeqBlockAt(p:TokenTup,addBlockBegin,addBlockEnd) = 
-         if addBlockBegin then (
-           if debug then dprintf "--> insert OBLOCKBEGIN \n" ;
-           delayToken(p.UseLocation(OBLOCKBEGIN))
-         );
-         pushCtxt p (CtxtSeqBlock(FirstInSeqBlock, startPosOfTokenTup p,addBlockEnd)) 
-
-    let rec swTokenFetch() = 
-          let tokenTup = popNextTokenTup()
-          let tokenReplaced = rulesForBothSoftWhiteAndHardWhite(tokenTup)
-          if tokenReplaced then swTokenFetch() 
-          else returnToken tokenTup.LexbufState tokenTup.Token
-
-    //----------------------------------------------------------------------------
-    // Part VI. The new lexer function.  In light 
-    //--------------------------------------------------------------------------
-
-    let lexer = fun _ -> 
-        if not !initialized then 
-            let firstTokenTup = peekInitial();
-            if syntaxFlagRequired && not lightSyntaxStatus.ExplicitlySet then 
-                warn firstTokenTup "The first non-comment text in an F# source file must be '#light' or '#light \"off\"'. '#light \"off\"' is used for the subset of F# that cross-compiles with with OCaml"
-
-        if lightSyntaxStatus.Status
-        then hwTokenFetch(true)  
-        else swTokenFetch()
-
-    { lexbuf = lexbuf;
-      lexer = lexer }
-
-  
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/lexhelp.ml b/tools/FSharp_1.9.6.16/source/fsharp/lexhelp.ml
deleted file mode 100644
index 3104dfb2..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/lexhelp.ml
+++ /dev/null
@@ -1,343 +0,0 @@
-(*------------------------------------------------------------------------
- * (c) Microsoft Corporation. All rights reserved 
- *
- * Helper functions for the F# lexer lex.mll
- *-----------------------------------------------------------------------*)
-
-#light
-
-module Microsoft.FSharp.Compiler.Lexhelp
-
-open Internal.Utilities
-open Internal.Utilities.Text
-open Internal.Utilities.Pervasives
-open Internal.Utilities.Text.Lexing
-open Microsoft.FSharp.Compiler
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.PrettyNaming
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Parser
-
-let set_pos (lexbuf:UnicodeLexing.Lexbuf) p = lexbuf.EndPos <- p 
-
-/// Lexer args: status of #light processing.  Mutated when a #light
-/// directive is processed. This alters the behaviour of the lexfilter.
-[]
-type LightSyntaxStatus(initial:bool,warn:bool) = 
-    let mutable status = None
-    member x.Status 
-       with get() = match status with None -> initial | Some v -> v
-       and  set v = status <- Some(v)
-    member x.ExplicitlySet = status.IsSome
-    member x.WarnOnMultipleTokens = warn
-    
-
-/// Manage lexer resources (string interning)
-[]
-type LexResourceManager() =
-    let strings = new System.Collections.Generic.Dictionary(100)
-    member x.InternString(s) = 
-        let mutable res = "" in
-        let ok = strings.TryGetValue(s,&res)  in
-        if ok then res 
-        else 
-            (strings.[s] <- s; s)
-              
-/// Lexer parameters 
-type lexargs =  
-    { defines: string list;
-      ifdefStack: ifdefStack;
-      resourceManager: LexResourceManager;
-      getSourceDirectory: (unit -> string); 
-      lightSyntaxStatus : LightSyntaxStatus;
-      errorLogger: ErrorLogger }
-
-let mkLexargs (srcdir,filename,defines,lightSyntaxStatus,resourceManager,ifdefStack,errorLogger) =
-    (* resetLexbufPos filename lexbuf; *) (* called explicitly from usingLexbufForParsing *)
-    { defines = defines;
-      ifdefStack= ifdefStack;
-      lightSyntaxStatus=lightSyntaxStatus;
-      resourceManager=resourceManager;
-      getSourceDirectory=srcdir; 
-      errorLogger=errorLogger }
-
-/// Set some (buffer local) mutable variables on the currently active lexbuf.
-let registerLexbufForParsing (lexbuf:UnicodeLexing.Lexbuf) concreteSyntaxSink = 
-    LexbufLocalXmlDocStore.ClearXmlDoc lexbuf;
-    SetConcreteSyntaxSink  lexbuf concreteSyntaxSink 
-
-/// Register the lexbuf and call the given function
-let reusingLexbufForParsing(lexbuf,concreteSyntaxSink) f = 
-    registerLexbufForParsing lexbuf concreteSyntaxSink;
-    try
-      f () 
-    with e ->
-      raise (WrappedError(e,(try GetLexerRange lexbuf with _ -> range0)))
-
-let resetLexbufPos filename (lexbuf: UnicodeLexing.Lexbuf) = 
-    lexbuf.EndPos <- {lexbuf.EndPos with pos_fname= encode_file filename; 
-                                         pos_cnum=0;
-                                         pos_lnum=1 }
-
-/// Reset the lexbuf, configure the initial position with the given filename and call the given function
-let usingLexbufForParsing (lexbuf:UnicodeLexing.Lexbuf,filename,concreteSyntaxSink) f =
-    resetLexbufPos filename lexbuf;
-    reusingLexbufForParsing(lexbuf,concreteSyntaxSink) (fun () -> f lexbuf)
-
-(*------------------------------------------------------------------------
-!* Functions to manipulate lexer transient state
- *-----------------------------------------------------------------------*)
-
-let default_string_finish = (fun endm b s -> STRING (Bytes.unicode_bytes_as_string s))
-
-let call_string_finish fin buf endm b = fin endm b (Bytes.Bytebuf.close buf)
-
-let add_string buf x = Bytes.Bytebuf.emit_bytes buf (Bytes.string_as_unicode_bytes x)
-
-let add_int_char buf c = 
-    Bytes.Bytebuf.emit_int_as_byte buf (c % 256);
-    Bytes.Bytebuf.emit_int_as_byte buf (c / 256)
-
-let add_unichar buf c = add_int_char buf (int c)
-let add_byte_char buf (c:char) = add_int_char buf (int32 c % 256)
-
-/// When lexing bytearrays we don't expect to see any unicode stuff. 
-/// Likewise when lexing string constants we shouldn't see any trigraphs > 127 
-/// So to turn the bytes collected in the string buffer back into a bytearray 
-/// we just take every second byte we stored.  Note all bytes > 127 should have been 
-/// stored using add_int_char 
-let stringbuf_as_bytes buf = 
-    let bytes = Bytes.Bytebuf.close buf 
-    Bytes.make (fun i -> Bytes.get bytes (i*2)) (Bytes.length bytes / 2)
-
-/// Sanity check that high bytes are zeros. Further check each low byte <= 127 
-let stringbuf_is_bytes buf = 
-    let bytes = Bytes.Bytebuf.close buf 
-    let mutable ok = true 
-    for i = 0 to Bytes.length bytes/2-1 do
-        if Bytes.get bytes (i*2+1) <> 0 then ok <- false
-    ok
-
-let newline (lexbuf:LexBuffer<_>) = 
-    lexbuf.EndPos <- lexbuf.EndPos.NextLine
-
-let trigraph c1 c2 c3 =
-    let digit (c:char) = int c - int '0' 
-    char (digit c1 * 100 + digit c2 * 10 + digit c3)
-
-let digit d = 
-    if d >= '0' && d <= '9' then int32 d - int32 '0'   
-    else failwith "digit" 
-
-let hexdigit d = 
-    if d >= '0' && d <= '9' then digit d 
-    elif d >= 'a' && d <= 'f' then int32 d - int32 'a' + 10
-    elif d >= 'A' && d <= 'F' then int32 d - int32 'A' + 10
-    else failwith "hexdigit" 
-
-let unicodegraph_short s =
-    if String.length s <> 4 then failwith "unicodegraph";
-    uint16 (hexdigit s.[0] * 4096 + hexdigit s.[1] * 256 + hexdigit s.[2] * 16 + hexdigit s.[3])
-
-let hexgraph_short s =
-    if String.length s <> 2 then failwith "hexgraph";
-    uint16 (hexdigit s.[0] * 16 + hexdigit s.[1])
-
-let unicodegraph_long s =
-    if String.length s <> 8 then failwith "unicodegraph_long";
-    let high = hexdigit s.[0] * 4096 + hexdigit s.[1] * 256 + hexdigit s.[2] * 16 + hexdigit s.[3] in 
-    let low = hexdigit s.[4] * 4096 + hexdigit s.[5] * 256 + hexdigit s.[6] * 16 + hexdigit s.[7] in 
-    if high = 0 then None, uint16 low 
-    else 
-      (* A surrogate pair - see http://www.unicode.org/unicode/uni2book/ch03.pdf, section 3.7 *)
-      Some (uint16 (0xD800 + ((high * 0x10000 + low - 0x10000) / 0x400))),
-      uint16 (0xDF30 + ((high * 0x10000 + low - 0x10000) % 0x400))
-
-let escape c = 
-    match c with
-    | '\\' -> '\\'
-    | '\'' -> '\''
-    | 'a' -> char 7
-    | 'f' -> char 12
-    | 'v' -> char 11
-    | 'n' -> '\n'
-    | 't' -> '\t'
-    | 'b' -> '\b'
-    | 'r' -> '\r'
-    | c -> c
-
-/// Token skipper.  Colorizers for language modes such as Visual Studio see some tokens 
-/// that the parser does not see.  
-let inline skipToken skip (skippedToken: token) (lexer: bool -> UnicodeLexing.Lexbuf -> token) lexbuf =
-    // NOTE: The "lexer lexbuf" call MUST be a tailcall - this is a 
-    // recursive loop back to the lexer. 
-    if skip then lexer skip lexbuf else skippedToken 
-
-(*------------------------------------------------------------------------
-!* Keyword table
- *-----------------------------------------------------------------------*)
-    
-exception ReservedKeyword of string * range
-exception IndentationProblem of string * range
-
-module Keywords = 
-    type private compatibilityMode =
-        | ALWAYS  (* keyword *)
-        | FSHARP  (* keyword, but an identifier under --ml-compatibility mode *)
-
-    let private keywordList = 
-     [ FSHARP, "abstract", ABSTRACT;
-      ALWAYS, "and"        ,AND;
-      ALWAYS, "as"         ,AS;
-      ALWAYS, "assert"     ,ASSERT;
-      ALWAYS, "asr"        ,INFIX_STAR_STAR_OP "asr";
-      ALWAYS, "base"       ,BASE;
-      ALWAYS, "begin"      ,BEGIN;
-      ALWAYS, "class"      ,CLASS;
-      FSHARP, "default"    ,DEFAULT;
-      FSHARP, "delegate"   ,DELEGATE;
-      ALWAYS, "do"         ,DO;
-      ALWAYS, "done"       ,DONE;
-      FSHARP, "downcast"   ,DOWNCAST;
-      ALWAYS, "downto"     ,DOWNTO;
-      FSHARP, "elif"       ,ELIF;
-      ALWAYS, "else"       ,ELSE;
-      ALWAYS, "end"        ,END;
-      ALWAYS, "exception"  ,EXCEPTION;
-      FSHARP, "extern"     ,EXTERN;
-      ALWAYS, "false"      ,FALSE;
-      ALWAYS, "finally"    ,FINALLY;
-      ALWAYS, "for"        ,FOR;
-      ALWAYS, "fun"        ,FUN;
-      ALWAYS, "function"   ,FUNCTION;
-      ALWAYS, "if"         ,IF;
-      ALWAYS, "in"         ,IN;
-      ALWAYS, "inherit"    ,INHERIT;
-      FSHARP, "inline"     ,INLINE;
-      FSHARP, "interface"  ,INTERFACE;
-      FSHARP, "internal"   ,INTERNAL;
-      ALWAYS, "land"       ,INFIX_STAR_DIV_MOD_OP "land";
-      ALWAYS, "lazy"       ,LAZY;
-      ALWAYS, "let"        ,LET(false);
-      ALWAYS, "lor"        ,INFIX_STAR_DIV_MOD_OP "lor";
-      ALWAYS, "lsl"        ,INFIX_STAR_STAR_OP "lsl";
-      ALWAYS, "lsr"        ,INFIX_STAR_STAR_OP "lsr";
-      ALWAYS, "lxor"       ,INFIX_STAR_DIV_MOD_OP "lxor";
-      ALWAYS, "match"      ,MATCH;
-      FSHARP, "member"     ,MEMBER;
-      ALWAYS, "mod"        ,INFIX_STAR_DIV_MOD_OP "mod";
-      ALWAYS, "module"     ,MODULE;
-      ALWAYS, "mutable"    ,MUTABLE;
-      FSHARP, "namespace"  ,NAMESPACE;
-      ALWAYS, "new"        ,NEW;
-      FSHARP, "null"       ,NULL;
-      ALWAYS, "of"         ,OF;
-      ALWAYS, "open"       ,OPEN;
-      ALWAYS, "or"         ,OR;
-      FSHARP, "override"   ,OVERRIDE;
-      ALWAYS, "private"    ,PRIVATE;  
-      FSHARP, "public"     ,PUBLIC;
-      ALWAYS, "rec"        ,REC;
-      FSHARP, "return"      ,YIELD(false);
-      ALWAYS, "sig"        ,SIG;
-      FSHARP, "static"     ,STATIC;
-      ALWAYS, "struct"     ,STRUCT;
-      ALWAYS, "then"       ,THEN;
-      ALWAYS, "to"         ,TO;
-      ALWAYS, "true"       ,TRUE;
-      ALWAYS, "try"        ,TRY;
-      ALWAYS, "type"       ,TYPE;
-      FSHARP, "upcast"     ,UPCAST;
-      FSHARP, "use"        ,LET(true);
-      ALWAYS, "val"        ,VAL;
-      ALWAYS, "virtual"    ,VIRTUAL;
-      FSHARP, "void"       ,VOID;
-      ALWAYS, "when"       ,WHEN;
-      ALWAYS, "while"      ,WHILE;
-      ALWAYS, "with"       ,WITH;
-      FSHARP, "yield"      ,YIELD(true);
-      ALWAYS, "_"          ,UNDERSCORE;
-    (*------- for prototyping and explaining offside rule *)
-      FSHARP, "__token_OBLOCKSEP" ,OBLOCKSEP;
-      FSHARP, "__token_OWITH"     ,OWITH;
-      FSHARP, "__token_ODECLEND"  ,ODECLEND;
-      FSHARP, "__token_OTHEN"     ,OTHEN;
-      FSHARP, "__token_OELSE"     ,OELSE;
-      FSHARP, "__token_OEND"      ,OEND;
-      FSHARP, "__token_ODO"       ,ODO;
-      FSHARP, "__token_OLET"      ,OLET(true);
-      FSHARP, "__token_constraint",CONSTRAINT;
-      ]
-    (*------- reserved keywords which are ml-compatibility ids *) 
-    @ List.map (fun s -> (FSHARP,s,RESERVED)) 
-        [ "atomic"; "break"; 
-          "checked"; "component"; "const"; "constraint"; "constructor"; "continue"; 
-          "eager"; 
-          "fixed"; "fori"; "functor"; "global"; 
-          "include";  (* "instance"; *)
-          "method"; "mixin"; 
-          "object"; "parallel"; "params";  "process"; "protected"; "pure"; (* "pattern"; *)
-          "sealed"; "trait";  "tailcall";
-          "volatile"; ]
-
-    let private unreserve_words = 
-        keywordList |> List.choose (function (mode,keyword,_) -> if mode = FSHARP then Some keyword else None) 
-
-    (*------------------------------------------------------------------------
-    !* Keywords
-     *-----------------------------------------------------------------------*)
-
-    let keywordNames = 
-        keywordList |> List.map (fun (_, w, _) -> w) 
-
-    let keywordTable = 
-        let tab = Hashtbl.create 1000 in
-        List.iter (fun (mode,keyword,token) -> Hashtbl.add tab keyword token) keywordList;
-        tab
-        
-    let KeywordToken s = keywordTable.[s]
-
-    (* REVIEW: get rid of this element of global state *)
-    let permitFsharpKeywords = ref true
-
-    let IdentifierToken args (lexbuf:UnicodeLexing.Lexbuf) (s:string) =
-        if IsCompilerGeneratedName s then 
-            let m = GetLexerRange lexbuf 
-            warning(Error("Identifiers containing '@' are reserved for use in F# code generation",m));
-        IDENT (args.resourceManager.InternString(s))
-
-    let KeywordOrIdentifierToken args (lexbuf:UnicodeLexing.Lexbuf) s =
-        if not !permitFsharpKeywords && List.mem s unreserve_words then
-            IdentifierToken args lexbuf s
-        elif Hashtbl.mem keywordTable s then 
-            let v = KeywordToken s 
-            if v = RESERVED then
-                let m = GetLexerRange lexbuf 
-                warning(ReservedKeyword("The identifier '"^s^"' is reserved for future use by F#.",m));
-                IdentifierToken args lexbuf s
-            else v
-        else 
-            match s with 
-            | "__SOURCE_DIRECTORY__" -> 
-               STRING (args.getSourceDirectory())
-            | "__SOURCE_FILE__" -> 
-               STRING (System.IO.Path.GetFileName((file_of_file_idx (decode_file_idx lexbuf.StartPos.FileName))))
-            | "__LINE__" -> 
-               STRING (string lexbuf.StartPos.Line)
-            | _ -> 
-               IdentifierToken args lexbuf s
-
-    /// A utility to help determine if an identifier needs to be quoted 
-    let QuoteIdentifierIfNeeded (s : string) : string =
-        let isKeyword (n : string) : bool = List.exists ((=) n) keywordNames
-        if isKeyword s || not (String.for_all IsLongIdentifierPartCharacter s) then 
-            "``" + s + "``"
-        else 
-            s
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/lexhelp.mli b/tools/FSharp_1.9.6.16/source/fsharp/lexhelp.mli
deleted file mode 100644
index 4e25f0ba..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/lexhelp.mli
+++ /dev/null
@@ -1,74 +0,0 @@
-(*------------------------------------------------------------------------
- * (c) Microsoft Corporation. All rights reserved 
- *
- * Helper functions for the F# lexer lex.mll
- *-----------------------------------------------------------------------*)
-
-#light
-
-module Microsoft.FSharp.Compiler.Lexhelp
-
-open Internal.Utilities
-open Internal.Utilities.Text
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Text
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal
-open Microsoft.FSharp.Compiler
-
-[]
-type LightSyntaxStatus =
-    new : initial:bool * warn : bool -> LightSyntaxStatus
-    member ExplicitlySet : bool
-    member Status : bool
-    member Status : bool with set
-    member WarnOnMultipleTokens : bool
-
-[]
-type LexResourceManager =
-    new : unit -> LexResourceManager
-    member InternString : s:string -> string
-
-type lexargs =
-  {defines: string list;
-   ifdefStack: ifdefStack;
-   resourceManager: LexResourceManager;
-   getSourceDirectory: unit -> string;
-   lightSyntaxStatus: LightSyntaxStatus;
-   errorLogger: ErrorLogger}
-val resetLexbufPos : string -> UnicodeLexing.Lexbuf -> unit
-val mkLexargs : (unit -> string) * 'a * string list * LightSyntaxStatus * LexResourceManager * ifdefStack * ErrorLogger -> lexargs
-val reusingLexbufForParsing : UnicodeLexing.Lexbuf * ConcreteSyntaxSink option -> (unit -> 'a) -> 'a 
-
-val internal  set_pos : UnicodeLexing.Lexbuf -> Lexing.Position -> unit
-val internal usingLexbufForParsing : UnicodeLexing.Lexbuf * string * ConcreteSyntaxSink option -> (UnicodeLexing.Lexbuf -> 'a) -> 'a
-val internal default_string_finish : 'a -> 'b -> byte[] -> Parser.token
-val internal call_string_finish : ('a -> 'b -> byte[] -> 'c) -> AbstractIL.Internal.Bytes.Bytebuf.t -> 'a -> 'b -> 'c
-val internal add_string : AbstractIL.Internal.Bytes.Bytebuf.t -> string -> unit
-val internal add_int_char : AbstractIL.Internal.Bytes.Bytebuf.t -> int -> unit
-val internal add_unichar : AbstractIL.Internal.Bytes.Bytebuf.t -> int -> unit
-val internal add_byte_char : AbstractIL.Internal.Bytes.Bytebuf.t -> char -> unit
-val internal stringbuf_as_bytes : AbstractIL.Internal.Bytes.Bytebuf.t -> byte[]
-val internal stringbuf_is_bytes : AbstractIL.Internal.Bytes.Bytebuf.t -> bool
-val internal newline : Lexing.LexBuffer<'a> -> unit
-val internal trigraph : char -> char -> char -> char
-val internal digit : char -> int32
-val internal hexdigit : char -> int32
-val internal unicodegraph_short : string -> uint16
-val internal hexgraph_short : string -> uint16
-val internal unicodegraph_long : string -> uint16 option * uint16
-val internal escape : char -> char
-
-val inline internal skipToken : bool -> Parser.token -> (bool -> UnicodeLexing.Lexbuf -> Parser.token) -> UnicodeLexing.Lexbuf -> Parser.token
-
-exception internal ReservedKeyword of string * Range.range
-exception internal IndentationProblem of string * Range.range
-
-module Keywords = 
-    val internal KeywordOrIdentifierToken : lexargs -> UnicodeLexing.Lexbuf -> string -> Parser.token
-    val internal IdentifierToken : lexargs -> UnicodeLexing.Lexbuf -> string -> Parser.token
-    val internal QuoteIdentifierIfNeeded : string -> string
-    val internal permitFsharpKeywords : bool ref
-    val keywordNames : string list
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/lib.ml b/tools/FSharp_1.9.6.16/source/fsharp/lib.ml
deleted file mode 100644
index 8d543f02..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/lib.ml
+++ /dev/null
@@ -1,619 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-module (* internal *) Microsoft.FSharp.Compiler.Lib
-
-open System.IO
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open System.Diagnostics
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-
-/// is this the developer-debug build? 
-let debug = false 
-let verbose = false
-let progress = ref false 
-let tracking = ref false // intended to be a general hook to control diagnostic output when tracking down bugs
-
-(*-------------------------------------------------------------------------
-!* Library: bits
- *------------------------------------------------------------------------*)
-
-module Bits = 
-    let b0 n =  (n          &&& 0xFF)  
-    let b1 n =  ((n >>> 8)  &&& 0xFF) 
-    let b2 n =  ((n >>> 16) &&& 0xFF) 
-    let b3 n =  ((n >>> 24) &&& 0xFF) 
-
-    let rec pown32 n = if n = 0 then 0  else (pown32 (n-1) ||| (1  <<<  (n-1)))
-    let rec pown64 n = if n = 0 then 0L else (pown64 (n-1) ||| (1L <<< (n-1)))
-    let mask32 m n = (pown32 n) <<< m
-    let mask64 m n = (pown64 n) <<< m
-
-
-module List = 
-    let noRepeats xOrder xs =
-        let s = Zset.addList   xs (Zset.empty xOrder) // build set 
-        Zset.elements s          // get elements... no repeats 
-
-
-(*-------------------------------------------------------------------------
-!* Library: files
- *------------------------------------------------------------------------*)
-
-module Filename = 
-    let fullpath cwd nm = 
-        let p = if Path.IsPathRooted(nm) then nm else Path.Combine(cwd,nm)
-        try Path.GetFullPath(p) with 
-        | :? System.ArgumentException 
-        | :? System.ArgumentNullException 
-        | :? System.NotSupportedException 
-        | :? System.IO.PathTooLongException 
-        | :? System.Security.SecurityException -> p
-
-    let hasSuffixCaseInsensitive suffix filename = (* case-insensitive *)
-      Filename.check_suffix (String.lowercase filename) (String.lowercase suffix)
-
-    let isDll file = hasSuffixCaseInsensitive ".dll" file 
-
-
-//-------------------------------------------------------------------------
-// Library: projections
-//------------------------------------------------------------------------
-
-type 'a order = 'a -> 'a -> int
-
-let foldOn p f z x = f z (p x)
-let maxOn f x1 x2 = if f x1 > f x2 then x1 else x2
-let orderOn p pxOrder x xx = pxOrder (p x) (p xx)
-
-//-------------------------------------------------------------------------
-// Library: Bool
-//------------------------------------------------------------------------
-
-module Bool = 
-    let order (a:bool) (b:bool) = Operators.compare a b
-
-module Int32 = 
-    let order (a:int) (b:int) = Operators.compare a b
-
-module Int64 = 
-    let order (a:int64) (b:int64) = Operators.compare a b
-
-//-------------------------------------------------------------------------
-// Library: Strings
-//------------------------------------------------------------------------
-
-module String =
-
-    /// When generating HTML documentation,
-    /// some servers/filesystem are case insensitive.
-    /// This leads to collisions on type names, e.g. complex and Complex.
-    ///
-    /// This function does partial disambiguation, by prefixing lowercase strings with _.
-    let underscoreLowercase s =
-      if String.isAllLower s then "_"^s else s
-      
-module Pair = 
-    let order (compare1,compare2) (a1,a2) (aa1,aa2) =
-        let res1 = compare1 a1 aa1
-        if res1 <> 0 then res1 else compare2 a2 aa2
-
-let fmap2'2 f z (a1,a2)       = let z,a2 = f z a2 in z,(a1,a2)
-
-
-(*-------------------------------------------------------------------------
-!* Library: Map extensions
- *------------------------------------------------------------------------*)
-
-module Map = 
-    let tryFindMulti k map = match Map.tryfind k map with Some res -> res | None -> []
-
-(*-------------------------------------------------------------------------
-!* Library: Name maps
- *------------------------------------------------------------------------*)
-
-type 'a NameMap = Map
-type nameset = string Zset.t
-type NameMultiMap<'a> = 'a list NameMap
-
-module Nameset =
-    let of_list l : nameset = List.foldBack Zset.add l (Zset.empty String.order)
-
-[]
-module NameMap = 
-
-    let empty = Map.empty
-    let domain m = Map.fold_right (fun x _ acc -> Zset.add x acc) m (Zset.empty String.order)
-    let domainL m = Zset.elements (domain m)
-    let range m = List.rev (Map.fold_right (fun _ x sofar -> x :: sofar) m [])
-    let fold f (m:'a NameMap) z = Map.fold_right f m z
-    let forall f m = Map.fold_right (fun x y sofar -> sofar && f x y) m true
-    let exists f m = Map.fold_right (fun x y sofar -> sofar or f x y) m false
-    let of_keyed_list f l = List.foldBack (fun x acc -> Map.add (f x) x acc) l Map.empty
-    let of_list l : 'a NameMap = Map.of_list l
-    let of_FlatList (l:FlatList<_>) : 'a NameMap = FlatList.toMap l
-    let to_list (l: 'a NameMap) = Map.to_list l
-    let layer (m1 : 'a NameMap) m2 = Map.fold_right Map.add m1 m2
-
-    (* not a very useful function - only called in one place - should be changed *)
-    let layerAdditive addf m1 m2 = 
-      Map.fold_right (fun x y sofar -> Map.add x (addf (Map.tryFindMulti x sofar) y) sofar) m1 m2
-
-    let union unionf m1 m2 = 
-      Map.fold_right
-        (fun x1 y1 sofar -> 
-          Map.add 
-            x1 
-            (match Map.tryfind x1 sofar with 
-              | Some res -> (unionf y1 res) 
-              | None -> y1) 
-            sofar)
-        m1 m2
-
-    (* For every entry in m2 find an entry in m1 and fold *)
-    let subfold2 errf f m1 m2 acc =
-        Map.fold_right (fun n x2 acc -> try f n (Map.find n m1) x2 acc with Not_found -> errf n x2) m2 acc
-
-    let suball2 errf p m1 m2 = subfold2 errf (fun _ x1 x2 acc -> p x1 x2 & acc) m1 m2 true
-
-    let mapfold f s (l: 'a NameMap) = 
-        Map.fold_right (fun x y (l',s') -> let y',s'' = f s' x y in Map.add x y' l',s'') l (Map.empty,s)
-
-    let mapFoldRange f s (l: 'a NameMap) = 
-        Map.fold_right (fun x y (l',s') -> let y',s'' = f s' y in Map.add x y' l',s'') l (Map.empty,s)
-
-    let foldRange f (l: 'a NameMap) acc = Map.fold_right (fun _ y acc -> f y acc) l acc
-
-    let filterRange f (l: 'a NameMap) = Map.fold_right (fun x y acc -> if f y then Map.add x y acc else acc) l Map.empty
-
-    let mapFilter f (l: 'a NameMap) = Map.fold_right (fun x y acc -> match f y with None -> acc | Some y' -> Map.add x y' acc) l Map.empty
-
-    let map f (l : 'a NameMap) = Map.mapi (fun _ x -> f x) l
-
-    let iter f (l : 'a NameMap) = Map.iter (fun k v -> f v) l
-
-    let iteri f (l : 'a NameMap) = Map.iter f l
-
-    let mapi f (l : 'a NameMap) = Map.mapi f l
-
-    let partition f (l : 'a NameMap) = Map.filter (fun _ x-> f x) l, Map.filter (fun _ x -> not (f x)) l
-
-    let mem v (m: 'a NameMap) = Map.mem v m
-
-    let find v (m: 'a NameMap) = Map.find v m
-
-    let tryfind v (m: 'a NameMap) = Map.tryfind v m 
-
-    let add v x (m: 'a NameMap) = Map.add v x m
-
-    let is_empty (m: 'a NameMap) = (Map.is_empty  m)
-
-    let existsInRange p m =  Map.fold_right (fun _ y acc -> acc or p y) m false 
-
-    let tryFindInRange p m = 
-        Map.fold_right (fun _ y acc -> 
-             match acc with 
-             | None -> if p y then Some y else None 
-             | _ -> acc) m None 
-
-[]
-module NameMultiMap = 
-    let existsInRange f (m: NameMultiMap<'a>) = NameMap.exists (fun _ l -> List.exists f l) m
-    let find v (m: NameMultiMap<'a>) = match Map.tryfind v m with None -> [] | Some r -> r
-    let add v x (m: NameMultiMap<'a>) = NameMap.add v (x :: find v m) m
-    let range (m: NameMultiMap<'a>) = Map.fold_right (fun _ x sofar -> x @ sofar) m []
-    let chooseRange f (m: NameMultiMap<'a>) = Map.fold_right (fun _ x sofar -> List.choose f x @ sofar) m []
-    let map f (m: NameMultiMap<'a>) = NameMap.map (List.map f) m 
-    let empty : NameMultiMap<'a> = Map.empty
-    let initBy f xs : NameMultiMap<'a> = xs |> Seq.group_by f |> Seq.map (fun (k,v) -> (k,List.of_seq v)) |> Map.of_seq 
-
-
-//---------------------------------------------------------------------------
-// Library: Pre\Post checks
-//------------------------------------------------------------------------- 
-module Check = 
-    
-    /// Throw System.InvalidOperationException() if argument is None.
-    /// If there is a value (e.g. Some(value)) then value is returned.
-    let NotNone argname (arg:'a option) : 'a = 
-        match arg with 
-        | None -> raise (new System.InvalidOperationException(argname))
-        | Some x -> x
-
-    /// Throw System.ArgumentNullException() if argument is null.
-    let ArgumentNotNull arg argname = 
-        match box(arg) with 
-        | null -> raise (new System.ArgumentNullException(argname))
-        | _ -> ()
-       
-        
-    /// Throw System.ArgumentNullException() if array argument is null.
-    /// Throw System.ArgumentOutOfRangeException() is array argument is empty.
-    let ArrayArgumentNotNullOrEmpty (arr:'a[]) argname = 
-        ArgumentNotNull arr argname
-        if (0 = arr.Length) then
-            raise (new System.ArgumentOutOfRangeException(argname))
-
-    /// Throw System.ArgumentNullException() if string argument is null.
-    /// Throw System.ArgumentOutOfRangeException() is string argument is empty.
-    let StringArgumentNotNullOrEmpty (s:string) argname = 
-        ArgumentNotNull s argname
-        if s.Length == 0 then
-            raise (new System.ArgumentNullException(argname))
-
-//-------------------------------------------------------------------------
-// Library 
-//------------------------------------------------------------------------
-
-module Imap = 
-    let empty () = Zmap.empty Int32.order
-
-    type t<'a> =  Zmap.t
-    let add k v (t:t<'a>) = Zmap.add k v t
-    let find k (t:t<'a>) = Zmap.find k t
-    let tryfind k (t:t<'a>) = Zmap.tryfind k t
-    let remove  k (t:t<'a>) = Zmap.remove k t
-    let mem     k (t:t<'a>)  = Zmap.mem k t
-    let iter    f (t:t<'a>)  = Zmap.iter f t
-    let map     f (t:t<'a>)  = Zmap.map f t 
-    let fold     f (t:t<'a>)  z = Zmap.fold f t z
-
-module I64map = 
-    let empty () = Zmap.empty Int64.order
-
-    type t<'a> =  Zmap.t
-    let add k v (t:t<'a>) = Zmap.add k v t
-    let find k (t:t<'a>) = Zmap.find k t
-    let tryfind k (t:t<'a>) = Zmap.tryfind k t
-    let remove  k (t:t<'a>) = Zmap.remove k t
-    let mem     k (t:t<'a>)  = Zmap.mem k t
-    let iter    f (t:t<'a>)  = Zmap.iter f t
-    let map     f (t:t<'a>)  = Zmap.map f t 
-    let fold     f (t:t<'a>)  z = Zmap.fold f t z
-
-//-------------------------------------------------------------------------
-// Library: generalized association lists
-//------------------------------------------------------------------------
-
-module ListAssoc = 
-
-    /// Treat a list of key-value pairs as a lookup collection.
-    /// This function looks up a value based on a match from the supplied
-    /// predicate function.
-    let rec find f x l = 
-      match l with 
-      | [] -> raise Not_found
-      | (x',y)::t -> if f x x' then y else find f x t
-
-    /// Treat a list of key-value pairs as a lookup collection.
-    /// This function returns true if two keys are the same according to the predicate
-    /// function passed in.
-    let rec containsKey (f:'key->'key->bool) (x:'key) (l:('key*'value) list) : bool = 
-      match l with 
-      | [] -> false
-      | (x',y)::t -> f x x' || containsKey f x t
-
-//-------------------------------------------------------------------------
-// Library: lists as generalized sets
-//------------------------------------------------------------------------
-
-module ListSet = 
-    (* NOTE: O(n)! *)
-    let rec mem f x l = 
-        match l with 
-        | [] -> false
-        | x'::t -> f x x' or mem f x t
-
-    (* NOTE: O(n)! *)
-    let insert f x l = if mem f x l then l else x::l
-    let unionFavourRight f l1 l2 = 
-        if l2 = [] then l1
-        else if l1 = [] then l2 
-        else List.foldBack (insert f) l1 l2 (* nb. fold_right to preserve natural orders *)
-
-    (* NOTE: O(n)! *)
-    let rec private gen_index_aux eq x l n =
-        match l with
-        | [] -> raise Not_found
-        | (h::t) -> if eq h x then n else gen_index_aux eq x t (n+1)
-
-    let findIndex eq x l = gen_index_aux eq x l 0
-
-    let rec remove f x l = 
-        match l with 
-        | (h::t) -> if f x h then t else h:: remove f x t
-        | [] -> []
-
-    (* NOTE: quadratic! *)
-    let rec subtract f l1 l2 = 
-      match l2 with 
-      | (h::t) -> subtract f (remove (fun y2 y1 ->  f y1 y2) h l1) t
-      | [] -> l1
-
-    let isSubsetOf f l1 l2 = List.forall (fun x1 -> mem f x1 l2) l1
-    (* nb. preserve orders here: f must be applied to elements of l1 then elements of l2*)
-    let isSupersetOf f l1 l2 = List.forall (fun x2 -> mem (fun y2 y1 ->  f y1 y2) x2 l1) l2
-    let equals f l1 l2 = isSubsetOf f l1 l2 && isSupersetOf f l1 l2
-
-    let unionFavourLeft f l1 l2 = 
-      if l2 = [] then l1 
-      else if l1 = [] then l2 
-      else l1 @ (subtract f l2 l1)
-
-
-    (* NOTE: not tail recursive! *)
-    let rec intersect f l1 l2 = 
-      match l2 with 
-      | (h::t) -> if mem f h l1 then h::intersect f l1 t else intersect f l1 t
-      | [] -> []
-
-    (* NOTE: quadratic! *)
-    // Note: if duplicates appear, keep the ones toward the _front_ of the list
-    let setify f l = List.foldBack (insert f) (List.rev l) [] |> List.rev
-
-
-module FlatListSet = 
-    let remove f x l = FlatList.filter (fun y -> not (f x y)) l
-
-//-------------------------------------------------------------------------
-// Library: pairs
-//------------------------------------------------------------------------
-
-let pair_map f1 f2 (a,b) = (f1 a, f2 b)
-let triple_map f1 f2 f3 (a,b,c) = (f1 a, f2 b, f3 c)
-let map_fst f (a,b) = (f a, b)
-let map_snd f (a,b) = (a, f b)
-let map_acc_fst f s (x,y) =  let x',s = f s x in  (x',y),s
-let map_acc_snd f s (x,y) =  let y',s = f s y in  (x,y'),s
-let pair a b = a,b      
-
-let p13 (x,y,z) = x
-let p23 (x,y,z) = y
-let p33 (x,y,z) = z
-
-let map1'2 f (a1,a2)       = (f a1,a2)
-let map2'2 f (a1,a2)       = (a1,f a2)
-let map1'3 f (a1,a2,a3)     = (f a1,a2,a3)
-let map2'3 f (a1,a2,a3)     = (a1,f a2,a3)
-let map3'3 f (a1,a2,a3)     = (a1,a2,f a3)
-let map3'4 f (a1,a2,a3,a4)     = (a1,a2,f a3,a4)
-let map4'4 f (a1,a2,a3,a4)   = (a1,a2,a3,f a4)
-let map5'5 f (a1,a2,a3,a4,a5) = (a1,a2,a3,a4,f a5)
-let map6'6 f (a1,a2,a3,a4,a5,a6) = (a1,a2,a3,a4,a5,f a6)
-let foldl'2 (f1,f2)    acc (a1,a2)         = f2 (f1 acc a1) a2
-let foldl1'2 f1    acc (a1,a2)         = f1 acc a1
-let foldl'3 (f1,f2,f3) acc (a1,a2,a3)      = f3 (f2 (f1 acc a1) a2) a3
-let map'2 (f1,f2)    (a1,a2)     = (f1 a1, f2 a2)
-let map'3 (f1,f2,f3) (a1,a2,a3)  = (f1 a1, f2 a2, f3 a3)
-
-//---------------------------------------------------------------------------
-// Zmap rebinds
-//------------------------------------------------------------------------- 
-
-module Zmap = 
-    let force  k   mp           = match Zmap.tryfind k mp with Some x -> x | None -> failwith "Zmap.force: lookup failed"
-
-    let mapKey key f mp =
-      match f (Zmap.tryfind key mp) with
-      | Some fx -> Zmap.add key fx mp       
-      | None    -> Zmap.remove key mp
-
-(*---------------------------------------------------------------------------
-!* Zset
- *------------------------------------------------------------------------- *)
-
-module Zset =
-    let of_list order xs = Zset.addList   xs (Zset.empty order)
-
-    // CLEANUP NOTE: move to Zset?
-    let rec fixpoint f (s as s0) =
-        let s = f s
-        if Zset.equal s s0 then s0           (* fixed *)
-                           else fixpoint f s (* iterate *)
-
-
-
-(*---------------------------------------------------------------------------
-!* Misc
- *------------------------------------------------------------------------- *)
-
-let equalOn f x y = (f x) = (f y)
-
-
-(*---------------------------------------------------------------------------
-!* Buffer printing utilities
- *------------------------------------------------------------------------- *)
-
-let bufs f = 
-    let buf = Buffer.create 100 in f buf; Buffer.contents buf
-
-let buff os f x = 
-    let buf = Buffer.create 100 in f buf x; Buffer.output_buffer os buf
-
-// Converts "\n" into System.Environment.NewLine before writing to os. See lib.ml:buff
-let writeViaBufferWithEnvironmentNewLines  os f x = 
-    let buf = Buffer.create 100 in f buf x;
-    let text = buf.ToString()
-    let text = text.Replace("\n",System.Environment.NewLine)
-    output_string os text
-        
-//---------------------------------------------------------------------------
-// Imperative Graphs 
-//---------------------------------------------------------------------------
-
-module NodeGraph = 
-    type ('id,'data) node = { nodeId: 'id; nodeData: 'data; mutable nodeNeighbours: ('id,'data) node list }
-
-    type ('id,'data) graph = { id: ('data -> 'id);
-                               ord: 'id order;
-                               nodes: ('id,'data) node list;
-                               edges: ('id * 'id) list;
-                               getNodeData: ('id -> 'data) }
-
-    let mk_graph (id,ord) nodeData edges =
-        let nodemap = List.map (fun d -> id d, { nodeId = id d; nodeData=d; nodeNeighbours=[] }) nodeData
-        let tab = Zmap.of_list ord nodemap 
-        let getNode nodeId = Zmap.find nodeId tab
-        let getNodeData nodeId = (getNode nodeId).nodeData
-        let nodes = List.map snd nodemap
-        List.iter (fun node -> node.nodeNeighbours <- List.map (snd >> getNode) (List.filter (fun (x,y) -> ord x node.nodeId = 0) edges)) nodes;
-        {id=id; ord = ord; nodes=nodes;edges=edges;getNodeData=getNodeData}
-
-    let iterate_cycles f g = 
-        let rec trace path node = 
-          if List.exists (g.id >> (=) node.nodeId) path then f (List.rev path)
-          else List.iter (trace (node.nodeData::path)) node.nodeNeighbours
-        List.iter (fun node -> trace [] node) g.nodes 
-
-#if OLDCODE
-
-let dfs g = 
-    let grey = ref (Zset.empty g.ord)
-    let time = ref 0
-    let forest = ref []
-    let backEdges = ref []
-    let discoveryTimes = ref (Zmap.empty g.ord)
-    let finishingTimes = ref (Zmap.empty g.ord)
-    g.nodes |> List.iter (fun n ->  
-      (* build a dfsTree for each node in turn *)
-      let treeEdges = ref []
-      let rec visit n1 = 
-        incr time;
-        grey := Zset.add n1.nodeId !grey;
-        discoveryTimes := Zmap.add n1.nodeId !time !discoveryTimes;
-        n1.nodeNeighbours |> List.iter (fun n2 ->
-          if not (Zset.mem n2.nodeId !grey) then begin
-            treeEdges := (n1.nodeId,n2.nodeId) :: !treeEdges;
-            visit(n2)
-          end else begin
-            backEdges := (n1.nodeId,n2.nodeId) :: !backEdges
-          end);
-        incr time;
-        finishingTimes := Zmap.add n1.nodeId !time !finishingTimes;
-        ()
-      if not (Zset.mem n.nodeId !grey) then begin 
-        visit(n);
-        forest := (n.nodeId,!treeEdges) :: !forest
-      end);
-    !forest, !backEdges,  (fun n -> Zmap.find n !discoveryTimes), (fun n -> Zmap.find n !finishingTimes)
- 
-
-(* Present strongly connected components, in dependency order *)
-(* Each node is assumed to have a self-edge *)
-let topsort_strongly_connected_components g = 
-    let forest, backEdges, discoveryTimes, finishingTimes = dfs g
-    let nodeIds = List.map (fun n -> n.nodeId) g.nodes
-    let nodesInDecreasingFinishingOrder = 
-      List.sort (fun n1 n2 -> -(compare (finishingTimes n1) (finishingTimes n2))) nodeIds
-    let gT = NodeGraph.mk_graph (g.id,g.ord) (List.map g.getNodeData nodesInDecreasingFinishingOrder) (List.map (fun (x,y) -> (y,x)) g.edges)
-    let forest, backEdges, discoveryTimes, finishingTimes = dfs gT
-    let scc (root,tree) = Zset.add root (List.foldBack (fun (n1,n2) acc -> Zset.add n1 (Zset.add n2 acc)) tree (Zset.empty g.ord))
-    let sccs = List.rev (List.map scc forest)
-    List.map (Zset.elements >> List.map g.getNodeData) sccs
-#endif
-
-
-#if SELFTEST
-let g1 = NodeGraph.mk_graph (=) [1;2;3] [(1,2);(2,3);(3,1)]
-let g2 = NodeGraph.mk_graph (=) [1;2;3] [(1,2);(2,3)]
-let g3 = NodeGraph.mk_graph (=) [1;2;3] [(1,1);(2,2)]
-let g4 = NodeGraph.mk_graph (=) [1;2;3] [(1,1);(2,1)]
-let g5 = NodeGraph.mk_graph (=) [1;2;3] [(3,2);(2,1)]
-let g6 = NodeGraph.mk_graph (=) [1;2;3] []
-let g7 = NodeGraph.mk_graph (=) [1;2;3] [(1,2);(2,1);(3,3)]
-let g8 = NodeGraph.mk_graph (=) [1;2;3] [(3,2);(2,3);(1,1)]
-
-
-let p sccs =  List.iter (fun l -> printf "scc: "; List.iter (fun i -> printf "%d;" i) l; printf "\n") sccs
-
-do p (topsort_strongly_connected_components g1);;
-do p (topsort_strongly_connected_components g2);;
-do p (topsort_strongly_connected_components g3);;
-do p (topsort_strongly_connected_components g4);;
-do p (topsort_strongly_connected_components g5);;
-do p (topsort_strongly_connected_components g6);;
-do p (topsort_strongly_connected_components g7);;
-do p (topsort_strongly_connected_components g8);;
-
-#endif
-
-(*---------------------------------------------------------------------------
-!* In some cases we play games where we use 'null' as a more efficient representation
- * in F#. The functions below are used to give initial values to mutable fields.
- * This is an unsafe trick, as it relies on the fact that the type of values
- * being placed into the slot never utilizes "null" as a representation. To be used with
- * with care.
- *------------------------------------------------------------------------- *)
-
-// The following DEBUG code does not compile.
-//#if DEBUG
-//type 'a nonnull_slot = 'a option 
-//let nullable_slot_empty() = None 
-//let nullable_slot_full(x) = Some x
-//#else
-type 'a nonnull_slot = 'a
-let nullable_slot_empty() = Unchecked.defaultof<'a>
-let nullable_slot_full(x) = x
-//#endif    
-
-(*---------------------------------------------------------------------------
-!* Caches, mainly for free variables
- *------------------------------------------------------------------------- *)
-
-type 'a cache = { mutable cacheVal: 'a nonnull_slot; }
-let new_cache() = { cacheVal = nullable_slot_empty() }
-
-let inline cached cache resf = 
-  match box cache.cacheVal with 
-  | null -> (let res = resf() in  cache.cacheVal <- nullable_slot_full res; res)
-  | _ -> cache.cacheVal
-
-let inline cacheOptRef cache f = 
-    match !cache with 
-    | Some v -> v
-    | None -> 
-       let res = f()
-       cache := Some res;
-       res 
-
-
-(* There is a bug in .NET Framework v2.0.52727 DD#153959 that very occasionally hits F# code. *)
-(* It is related to recursive class loading in multi-assembly NGEN scenarios. The bug has been fixed but *)
-(* not yet deployed. *)
-(* The bug manifests itself as an ExecutionEngine failure or fast-fail process exit which comes *)
-(* and goes depending on whether components are NGEN'd or not, e.g. 'ngen install FSharp.COmpiler.dll' *)
-(* One workaround for the bug is to break NGEN loading and fixups into smaller fragments. Roughly speaking, the NGEN *)
-(* loading process works by doing delayed fixups of references in NGEN code. This happens on a per-method *)
-(* basis. For example, one manifestation is that a "print" before calling a method like Lexfilter.create gets *)
-(* displayed but the corresponding "print" in the body of that function doesn't get displayed. In between, the NGEN *)
-(* image loader is performing a whole bunch of fixups of the NGEN code for the body of that method, and also for *)
-(* bodies of methods referred to by that method. That second bit is very important: the fixup causing the crash may *)
-(* be a couple of steps down the dependency chain. *)
-(* *)
-(* One way to break work into smaller chunks is to put delays in the call chains, i.e. insert extra stack frames. That's *)
-(* what the function 'delayInsertedToWorkaroundKnownNgenBug' is for. If you get this problem, try inserting  *)
-(*    delayInsertedToWorkaroundKnownNgenBug "Delay1" (fun () -> ...) *)
-(* at the top of the function that doesn't seem to be being called correctly. This will help you isolate out the problem *)
-(* and may make the problem go away altogher. Enable the 'print' commands in that function too. *)
-
-let delayInsertedToWorkaroundKnownNgenBug s f = 
-    (* Some random code to prevent inlining of this function *)
-    let res = ref 10
-    for i = 0 to 2 do 
-       res := !res + String.length s;
-    done;
-    if verbose then Printf.printf "------------------------executing NGEN bug delay '%s', calling 'f' --------------\n" s;
-    let res = f()
-    if verbose then Printf.printf "------------------------exiting NGEN bug delay '%s' --------------\n" s;
-    res
-    
-
-#if DUMPER
-type Dumper(x:obj) =
-     []
-     member self.Dump = sprintf "%A" x 
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/lowertop.ml b/tools/FSharp_1.9.6.16/source/fsharp/lowertop.ml
deleted file mode 100644
index 86000ee4..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/lowertop.ml
+++ /dev/null
@@ -1,538 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-/// An "expr -> expr" pass that eta-expands under-applied values of 
-/// known arity to lambda expressions and beta-var-reduces to bind 
-/// any known arguments.  The results are later optimized by the peephole 
-/// optimizer in opt.ml.
-module internal Microsoft.FSharp.Compiler.Lowertop 
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler 
-
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Infos
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.PrettyNaming
-
-
-let InterceptExpr g cont expr =
-    if verbose then dprintf "lower_expr@%a\n" output_range (range_of_expr expr);
-
-    match expr with
-    | TExpr_val(vref,flags,m) -> 
-        begin match vref.TopValInfo with 
-        | Some(arity) -> Some (fst (AdjustValForExpectedArity g m vref flags arity))
-        | None -> None
-        end
-    
-    // App (Val v,tys,args) 
-    | TExpr_app((TExpr_val (vref,flags,mv) as f0),f0ty,tyargsl,argsl,m) -> 
-        // Only transform if necessary, i.e. there are not enough arguments 
-        match vref.TopValInfo with
-        | Some(topValInfo) ->
-            let argsl = List.map cont argsl 
-            let f0 = 
-                if List.length topValInfo.AritiesOfArgs > List.length argsl 
-                then fst(AdjustValForExpectedArity g m vref flags topValInfo) 
-                else f0 
-
-            Some (MakeApplicationAndBetaReduce g (f0,f0ty,[tyargsl],argsl,m))
-        | None -> None
-
-    | TExpr_app(f0,f0ty,tyargsl,argsl,m) -> 
-        Some (MakeApplicationAndBetaReduce g (f0,f0ty, [tyargsl],argsl,m) )
-
-    | _ -> None
-
-let LowerImplFile g ass = 
-    RewriteImplFile {pre_intercept = Some(InterceptExpr g);
-                      post_transform= (fun _ -> None);
-                      under_quotations=false } ass
-
-
-//----------------------------
-
-let mk_lambda_notype g m uv e = 
-    mk_lambda m uv (e,type_of_expr g e) 
-
-let mk_unit_delay_lambda g m e =
-    let uv,ue = mk_compgen_local m "unitVar" g.unit_ty
-    mk_lambda_notype g m uv e 
-
-let callNonOverloadedMethod g amap m methName ty args =
-    match TryFindMethInfo (InfoReader(g,amap)) m AccessibleFromSomeFSharpCode methName ty  with 
-    | [] -> error(InternalError("No method called '"^methName^"' was found",m));
-    | ILMeth(g,ilMethInfo) :: _  -> mk_il_minfo_call g amap m false ilMethInfo NormalValUse [] false args |> fst
-    | _  -> error(InternalError("The method called '"^methName^"' resolved to a non-IL type",m))
-                
-
-type LoweredSeqFirstPhaseResult = 
-   { /// The code to run in the second phase, to rebuild the expressions, once all code labels and their mapping to program counters have been determined
-     /// 'nextVar' is the argument variable for the GenerateNext method that represents the byref argument that holds the "goto" destination for a tailcalling sequence expression
-     phase2 : ((* pc: *) ValRef * (* current: *) ValRef * (* nextVar: *) ValRef * Map -> expr * expr * expr)
-     /// The labels allocated for one portion of the sequence expression
-     labels : int list 
-     
-     /// The state variables allocated for one portion of the sequence expression (i.e. the local let-bound variables which become state variables)
-     stateVars: ValRef list }
-
-let free_in v e = Zset.mem v (free_in_expr CollectTyparsAndLocals e).FreeLocals
-
-/// Analyze a TAST expression to detect the elaborated form of a sequence expression.
-/// Then compile it to a state machine represented as a TAST containing goto, return and label nodes. 
-/// The returned state machine will also contain references to state variables (from internal 'let' bindings),
-/// a program counter (pc) that records the current state, and a current generated value (current).
-/// All these variables are then represented as fields in a hosting closure object along with any additional
-/// free variables of the sequence expression.
-///
-/// The analysis is done in two phases. The first phase determines the state variables and state labels (as Abstract IL code labels).
-/// We then allocate an integer pc for each state label and proceed with the second phase, which builds two related state machine
-/// expressions: one for 'MoveNext' and one for 'Dispose'.
-let LowerSeqExpr g amap overallExpr = 
-    /// Detect a 'yield x' within a 'seq { ... }'
-    let (|SeqYield|_|) expr = 
-        match expr with
-        | TExpr_app(TExpr_val (vref,_,_),f0ty,tyargsl,[arg],m) when g.vref_eq vref g.seq_singleton_vref ->  
-            Some (arg,m)
-        | _ -> 
-            None
-    
-    /// Detect a 'expr; expr' within a 'seq { ... }'
-    let (|SeqAppend|_|) expr = 
-        match expr with
-        | TExpr_app(TExpr_val (vref,_,_),f0ty,tyargsl,[arg1;arg2],m) when g.vref_eq vref g.seq_append_vref ->  
-            Some (arg1,arg2,m)
-        | _ -> 
-            None
-    
-    /// Detect a 'while gd do expr' within a 'seq { ... }'
-    let (|SeqWhile|_|) expr = 
-        match expr with
-        | TExpr_app(TExpr_val (vref,_,_),f0ty,tyargsl,[TExpr_lambda(_,_,[dummyv],gd,_,_,_);arg2],m) 
-             when g.vref_eq vref g.seq_generated_vref && 
-                  not (free_in dummyv gd) ->  
-            Some (gd,arg2,m)
-        | _ -> 
-            None
-    
-    let (|SeqTryFinally|_|) expr = 
-        match expr with
-        | TExpr_app(TExpr_val (vref,_,_),f0ty,tyargsl,[arg1;TExpr_lambda(_,_,[dummyv],compensation,_,_,_)],m) 
-            when g.vref_eq vref g.seq_finally_vref && 
-                 not (free_in dummyv compensation) ->  
-            Some (arg1,compensation,m)
-        | _ -> 
-            None
-    
-    let (|SeqUsing|_|) expr = 
-        match expr with
-        | TExpr_app(TExpr_val (vref,_,_),f0ty,[_;_;elemTy],[resource;TExpr_lambda(_,_,[v],body,_,_,_)],m) 
-            when g.vref_eq vref g.seq_using_vref ->  
-            Some (resource,v,body,elemTy,m)
-        | _ -> 
-            None
-    
-    let (|SeqFor|_|) expr = 
-        match expr with
-        // Nested for loops are represented by calls to Seq.collect
-        | TExpr_app(TExpr_val (vref,_,_),f0ty,[inpElemTy;enumty2;genElemTy],[TExpr_lambda(_,_,[v],body,_,_,_); inp],m) when g.vref_eq vref g.seq_map_concat_vref ->  Some (inp,v,body,genElemTy,m)
-        // "for x in e -> e2" is converted to a call to Seq.map by the F# type checker. This could be removed.
-        | TExpr_app(TExpr_val (vref,_,_),f0ty,[inpElemTy;genElemTy],[TExpr_lambda(_,_,[v],body,_,_,_); inp],m) when g.vref_eq vref g.seq_map_vref ->  Some (inp,v,mk_call_seq_singleton g m genElemTy body,genElemTy,m)
-        | _ -> None
-    
-    let (|SeqDelay|_|) expr = 
-        match expr with
-        | TExpr_app(TExpr_val (vref,_,_),f0ty,[elemTy],[TExpr_lambda(_,_,[v],e,_,_,_)],m) when g.vref_eq vref g.seq_delay_vref && not (free_in v e) ->  Some (e,elemTy)
-        | _ -> None
-    
-    let (|SeqEmpty|_|) expr = 
-        match expr with
-        | TExpr_app(TExpr_val (vref,_,_),f0ty,tyargsl,[],m) when g.vref_eq vref g.seq_empty_vref ->  Some (m)
-        | _ -> None
-    
-    let (|Seq|_|) expr = 
-        match expr with
-        // use 'seq { ... }' as an indicator
-        | TExpr_app(TExpr_val (vref,_,_),f0ty,[elemTy],[e],m) when g.vref_eq vref g.seq_vref ->  Some (e,elemTy) 
-        // use 'Seq.delay (fun () -> ...)' as an indicator for sequence expressions in FSharp.Core.dll
-        | SeqDelay(e,elemTy) when g.compilingFslib -> Some(e,elemTy)
-        | _ -> None
-
-    let allocLabel() =  new_stamp()
-        
-    let rec Lower  
-                 isWholeExpr 
-                 isTailCall // is this sequence in tailcall position?
-                 noDisposeContinuationLabel // represents the label for the code where there is effectively nothig to do to dispose the iterator for the current state
-                 currentDisposeContinuationLabel // represents the label for the code we have to run to dispose the iterator given the current state
-                 expr = 
-
-        match expr with 
-        | SeqYield(e,m) -> 
-            // printfn "found Seq.singleton"
-                 //this.pc <- NEXT; 
-                 //curr <- e; 
-                 //return true;  
-                 //NEXT:
-            let label = IL.generate_code_label()
-            Some { phase2 = (fun (pcv,currv,nextv,pcMap) ->                 
-                        let generate = 
-                            mk_compgen_seq m 
-                                (mk_val_set m pcv (mk_int32 g m pcMap.[label]))
-                                (mk_seq SequencePointsAtSeq m 
-                                    (mk_val_set m currv e)
-                                    (mk_compgen_seq m 
-                                        (TExpr_op(TOp_return,[],[mk_one g m],m))
-                                        (TExpr_op(TOp_label label,[],[],m))))
-                        let dispose = 
-                            mk_compgen_seq m 
-                                (TExpr_op(TOp_label label,[],[],m))
-                                (TExpr_op(TOp_goto currentDisposeContinuationLabel,[],[],m))
-                        let checkDispose = 
-                            mk_compgen_seq m 
-                                (TExpr_op(TOp_label label,[],[],m))
-                                (TExpr_op(TOp_return,[],[mk_bool g m (not (noDisposeContinuationLabel = currentDisposeContinuationLabel))],m))
-                        generate,dispose,checkDispose);
-                   labels=[label];
-                   stateVars=[] }
-
-        | SeqDelay(e,elemTy) -> 
-            // printfn "found Seq.delay"
-            Lower isWholeExpr isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e // note, using 'isWholeExpr' here prevents 'seq { yield! e }' and 'seq { 0 .. 1000 }' from being compiled
-        | SeqAppend(e1,e2,m) -> 
-            // printfn "found Seq.append"
-            match Lower false false noDisposeContinuationLabel currentDisposeContinuationLabel e1, 
-                  Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e2 with 
-            | Some res1, Some res2 -> 
-                Some { phase2 = (fun ctxt -> 
-                            let generate1,dispose1,checkDispose1 = res1.phase2 ctxt
-                            let generate2,dispose2,checkDispose2 = res2.phase2 ctxt
-                            let generate = mk_compgen_seq m generate1 generate2
-                            // Order shouldn't matter here, since disposals actions are linked together by goto's  (each ends in a goto).
-                            // However leaving as is for now.
-                            let dispose = mk_compgen_seq m dispose2 dispose1 
-                            let checkDispose = mk_compgen_seq m checkDispose2 checkDispose1
-                            generate,dispose,checkDispose);
-                       labels= res1.labels @ res2.labels;
-                       stateVars = res1.stateVars @ res2.stateVars }
-            | _ -> 
-                None
-        | SeqWhile(e1,e2,m) -> 
-            // printfn "found Seq.while"
-            match Lower false false noDisposeContinuationLabel currentDisposeContinuationLabel e2 with 
-            | Some res2  -> 
-                Some { phase2 = (fun ctxt -> 
-                            let generate2,dispose2,checkDispose2 = res2.phase2 ctxt
-                            let generate = mk_while g (SequencePointAtWhileLoop(range_of_expr e1),e1,generate2,m)
-                            let dispose = dispose2
-                            let checkDispose = checkDispose2
-                            generate,dispose,checkDispose);
-                       labels = res2.labels;
-                       stateVars = res2.stateVars }
-            | _ -> 
-                None
-        | SeqUsing(resource,v,body,elemTy,m) -> 
-            // printfn "found Seq.using"
-            Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel (mk_let (SequencePointAtBinding(range_of_expr body)) m v resource (mk_call_seq_finally g m elemTy body (mk_unit_delay_lambda g m (mk_call_dispose g m v.Type (expr_for_val m v))))) 
-        | SeqFor(inp,v,body,genElemTy,m) -> 
-            // printfn "found Seq.for"
-            let inpElemTy = v.Type
-            let inpEnumTy = mk_IEnumerator_ty g inpElemTy
-            let enumv, enume = mk_compgen_local m "enum" inpEnumTy
-            // [[ use enum = inp.GetEnumerator()
-            //    while enum.MoveNext() do
-            //       let v = enum.Current 
-            //       body ]]            
-            Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel
-                 (mk_call_seq_using g m inpEnumTy genElemTy (callNonOverloadedMethod g amap m "GetEnumerator" (mk_seq_ty g inpElemTy) [inp]) 
-                     (mk_lambda_notype g m enumv 
-                       (mk_call_seq_generated g m genElemTy (mk_unit_delay_lambda g m (callNonOverloadedMethod g amap m "MoveNext" inpEnumTy [enume]))
-                          (mk_invisible_let m v (callNonOverloadedMethod g amap m "get_Current" inpEnumTy [enume])
-                              body))))
-        | SeqTryFinally(e1,compensation,m) -> 
-            // printfn "found Seq.try/finally"
-            let innerDisposeContinuationLabel = IL.generate_code_label()
-            match Lower false false noDisposeContinuationLabel innerDisposeContinuationLabel e1 with 
-            | Some res1  -> 
-                Some { phase2 = (fun ((pcv,currv,_,pcMap) as ctxt) -> 
-                            let generate1,dispose1,checkDispose1 = res1.phase2 ctxt
-                            let generate = 
-                                // copy the compensation expression - one copy for the success continuation and one for the exception
-                                let compensation = copy_expr g CloneAllAndMarkExprValsAsCompilerGenerated compensation
-                                mk_compgen_seq m 
-                                    // set the PC to the inner finally, so that if an exception happens we run the right finally 
-                                    (mk_compgen_seq m 
-                                        (mk_val_set m pcv (mk_int32 g m pcMap.[innerDisposeContinuationLabel]))
-                                        generate1 )
-                                    // set the PC past the try/finally before trying to run it, to make sure we only run it once
-                                    (mk_compgen_seq m 
-                                        (TExpr_op(TOp_label innerDisposeContinuationLabel,[],[],m))
-                                        (mk_compgen_seq m 
-                                            (mk_val_set m pcv (mk_int32 g m pcMap.[currentDisposeContinuationLabel]))
-                                            compensation))
-                            let dispose = 
-                                // generate inner try/finallys, then outer try/finallys
-                                mk_compgen_seq m 
-                                    dispose1 
-                                    // set the PC past the try/finally before trying to run it, to make sure we only run it once
-                                    (mk_compgen_seq m 
-                                        (TExpr_op(TOp_label innerDisposeContinuationLabel,[],[],m))
-                                        (mk_compgen_seq m 
-                                            (mk_val_set m pcv (mk_int32 g m pcMap.[currentDisposeContinuationLabel]))
-                                            (mk_compgen_seq m 
-                                                compensation
-                                                (TExpr_op(TOp_goto currentDisposeContinuationLabel,[],[],m)))))
-                            let checkDispose = 
-                                mk_compgen_seq m 
-                                    checkDispose1 
-                                    (mk_compgen_seq m 
-                                        (TExpr_op(TOp_label innerDisposeContinuationLabel,[],[],m))
-                                        (TExpr_op(TOp_return,[],[mk_true g m (* yes, we must dispose!!! *) ],m)))
-
-                            generate,dispose,checkDispose);
-                       labels = innerDisposeContinuationLabel :: res1.labels;
-                       stateVars = res1.stateVars }
-            | _ -> 
-                None
-        | SeqEmpty(m) -> 
-            // printfn "found Seq.empty"
-            Some { phase2 = (fun _ -> 
-                            let generate = mk_unit g  m
-                            let dispose = TExpr_op(TOp_goto currentDisposeContinuationLabel,[],[],m)
-                            let checkDispose = TExpr_op(TOp_goto currentDisposeContinuationLabel,[],[],m)
-                            generate,dispose,checkDispose);
-                   labels = []
-                   stateVars = [] }
-        | TExpr_seq(x1,x2,NormalSeq,ty,m) -> 
-            match Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel x2 with 
-            | Some res2-> 
-                // printfn "found sequential execution"
-                Some { phase2 = (fun ctxt -> 
-                            let generate2,dispose2,checkDispose2 = res2.phase2 ctxt
-                            let generate = TExpr_seq(x1,generate2,NormalSeq,ty,m)
-                            let dispose = dispose2
-                            let checkDispose = checkDispose2
-                            generate,dispose,checkDispose);
-                       labels = res2.labels
-                       stateVars = res2.stateVars }
-            | None -> None
-        | TExpr_let(bind,e2,m,_) -> 
-            match Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e2 with 
-            | Some res2 ->
-                if bind.Var.IsCompiledAsTopLevel then 
-                    // printfn "found top level let  "
-                    Some { phase2 = (fun ctxt -> 
-                                let generate2,dispose2,checkDispose2 = res2.phase2 ctxt
-                                let generate = mk_let_bind m bind generate2
-                                let dispose = dispose2
-                                let checkDispose = checkDispose2
-                                generate,dispose, checkDispose);
-                           labels=res2.labels;
-                           stateVars = res2.stateVars }
-                else
-                    // printfn "found state variable %s" bind.Var.DisplayName
-                    let (TBind(v,e,sp)) = bind
-                    let sp,spm = 
-                        match sp with 
-                        | SequencePointAtBinding m -> SequencePointsAtSeq,m 
-                        | _ -> SuppressSequencePointOnExprOfSequential,range_of_expr e
-                    let vref = mk_local_vref v
-                    Some { phase2 = (fun ctxt -> 
-                                let generate2,dispose2,checkDispose2 = res2.phase2 ctxt
-                                let generate = 
-                                    mk_compgen_seq m 
-                                        (mk_seq sp m 
-                                            (mk_val_set spm vref e) 
-                                            generate2) 
-                                        // zero out the current value to free up its memory
-                                        (mk_val_set m vref (mk_ilzero (m,vref.Type)))  
-                                let dispose = dispose2
-                                let checkDispose = checkDispose2
-                                generate,dispose,checkDispose);
-                           labels=res2.labels
-                           stateVars = vref::res2.stateVars }
-            | None -> 
-                None
-
-        | TExpr_match (spBind,exprm,pt,targets,m,ty,_) when targets |> Array.forall (fun (TTarget(vs,e,spTarget)) -> isNil vs) ->
-            // lower all the targets. abandon if any fail to lower
-            let tgl = targets |> Array.map (fun (TTarget(vs,e,spTarget)) -> Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e) |> Array.to_list
-            // LIMITATION: non-trivial pattern matches involving or-patterns or active patterns where bindings can't be 
-            // transferred to the r.h.s. are not yet compiled. 
-            if tgl |> List.forall isSome then 
-                let tgl = List.map Option.get tgl
-                let labs = tgl |> List.collect (fun res -> res.labels)
-                let stateVars = tgl |> List.collect (fun res -> res.stateVars)
-                Some { phase2 = (fun ctxt -> 
-                            let gtgs,disposals,checkDisposes = 
-                                (Array.to_list targets,tgl) 
-                                  ||> List.map2 (fun (TTarget(vs,_,spTarget)) res -> 
-                                        let generate,dispose,checkDispose = res.phase2 ctxt
-                                        let gtg = TTarget(vs,generate,spTarget)
-                                        gtg,dispose,checkDispose)
-                                  |> List.unzip3  
-                            let generate = prim_mk_match (spBind,exprm,pt,Array.of_list gtgs,m,ty)
-                            let dispose = if isNil disposals then mk_unit g m else List.reduce (mk_compgen_seq m) disposals
-                            let checkDispose = if isNil checkDisposes then mk_false g m else List.reduce (mk_compgen_seq m) checkDisposes
-                            generate,dispose,checkDispose);
-                       labels=labs;
-                       stateVars = stateVars }
-            else
-                None
-
-        // yield! e ---> (for x in e -> x)
-        //
-        // Design choice: we compile 'yield! e' as 'for x in e do yield x'. 
-        //
-        // Note, however, this leads to a loss of tailcalls: the case not 
-        // handled correctly yet is sequence expressions that use yield! in the last position
-        // This can give rise to infinite iterator chains when implemented by the naive expansion to 
-        // “for x in e yield e”. For example consider this:
-        //
-        // let rec rwalk x = {  yield x; 
-        //                      yield! rwalk (x + rand()) }
-        //
-        // This is the moral equivalent of a tailcall optimization. These also don’t compile well 
-        // in the C# compilation model
-
-        | arbitrarySeqExpr -> 
-            let m = range_of_expr arbitrarySeqExpr
-            if isWholeExpr then 
-                // printfn "FAILED - not worth compiling an unrecognized immediate yield! %s " (string_of_range m)
-                None
-            else
-                let conforms_to_seq g ty = is_stripped_tyapp_typ g ty && tcref_eq g (tcref_of_stripped_typ g ty) g.tcref_System_Collections_Generic_IEnumerable
-                match SearchEntireHierarchyOfType (conforms_to_seq g) g amap m (type_of_expr g arbitrarySeqExpr) with
-                | None -> 
-                    // printfn "FAILED - yield! did not yield a sequence! %s" (string_of_range m)
-                    None
-                | Some ty -> 
-                    // printfn "found yield!"
-                    let inpElemTy = List.hd (tinst_of_stripped_typ g ty)
-                    if isTailCall then 
-                             //this.pc <- NEXT; 
-                             //nextEnumerator <- e; 
-                             //return 2;  
-                             //NEXT:
-                        let label = IL.generate_code_label()
-                        Some { phase2 = (fun (pcv,currv,nextv,pcMap) ->                 
-                                    let generate = 
-                                        mk_compgen_seq m 
-                                            (mk_val_set m pcv (mk_int32 g m pcMap.[label]))
-                                            (mk_seq SequencePointsAtSeq m 
-                                                (mk_lval_set m nextv arbitrarySeqExpr)
-                                                (mk_compgen_seq m 
-                                                    (TExpr_op(TOp_return,[],[mk_two g m],m))
-                                                    (TExpr_op(TOp_label label,[],[],m))))
-                                    let dispose = 
-                                        mk_compgen_seq m 
-                                            (TExpr_op(TOp_label label,[],[],m))
-                                            (TExpr_op(TOp_goto currentDisposeContinuationLabel,[],[],m))
-                                    let checkDispose = 
-                                        mk_compgen_seq m 
-                                            (TExpr_op(TOp_label label,[],[],m))
-                                            (TExpr_op(TOp_return,[],[mk_false g m],m))
-                                    generate,dispose,checkDispose);
-                               labels=[label];
-                               stateVars=[] }
-                    else
-                        let v,ve = mk_compgen_local m "v" inpElemTy
-                        Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel (mk_call_seq_map_concat g m inpElemTy inpElemTy (mk_lambda_notype g m v (mk_call_seq_singleton g m inpElemTy ve)) arbitrarySeqExpr)
-            
-
-    match overallExpr with 
-    | Seq(e,ty) -> 
-        // printfn "found seq { ... } or Seq.delay (fun () -> ...) in FSharp.Core.dll"
-        let m = range_of_expr e
-        let initLabel = IL.generate_code_label()
-        let noDisposeContinuationLabel = IL.generate_code_label()
-        match Lower true true noDisposeContinuationLabel noDisposeContinuationLabel e with 
-        | Some res ->
-            let labs = res.labels
-            let stateVars = res.stateVars 
-            // printfn "successfully lowered, found %d state variables and %d labels!" stateVars.Length labs.Length
-            let pcv,pce = mk_mut_compgen_local m "pc" g.int32_ty
-            let currv,curre = mk_mut_compgen_local m "current" ty
-            let nextv,nexte = mk_mut_compgen_local m "next" (mk_byref_typ g (mk_seq_ty g ty))
-            let nextvref = mk_local_vref nextv
-            let pcvref = mk_local_vref pcv
-            let currvref = mk_local_vref currv
-            let pcs = labs |> List.mapi (fun i _ -> i + 2)
-            let pcDone = labs.Length + 2
-            let pcInit = 1
-            let pc2lab  = Map.of_list ((pcInit,initLabel) :: (pcDone,noDisposeContinuationLabel) :: List.zip pcs labs)
-            let lab2pc = Map.of_list ((initLabel,pcInit) :: (noDisposeContinuationLabel,pcDone) :: List.zip labs pcs)
-            let stateMachineExpr,disposalExpr, checkDisposeExpr = res.phase2 (pcvref,currvref,nextvref,lab2pc)
-            // Add on the final 'return false' to indicate the iteration is complete
-            let stateMachineExpr = 
-                mk_compgen_seq m 
-                    stateMachineExpr 
-                    (mk_compgen_seq m 
-                        // set the pc to "finished"
-                        (mk_val_set m pcvref (mk_int32 g m pcDone))
-                        (mk_compgen_seq m 
-                            (TExpr_op(TOp_label noDisposeContinuationLabel,[],[],m))
-                            (mk_compgen_seq m 
-                                // zero out the current value to free up its memory
-                                (mk_val_set m currvref (mk_ilzero (m,currvref.Type)))
-                                (TExpr_op(TOp_return,[],[mk_zero g m],m)))))
-            let disposalExpr = 
-                mk_compgen_seq m 
-                    disposalExpr 
-                    (mk_compgen_seq m 
-                        (TExpr_op(TOp_label noDisposeContinuationLabel,[],[],m))
-                        (mk_compgen_seq m 
-                            // set the pc to "finished"
-                            (mk_val_set m pcvref (mk_int32 g m pcDone))
-                            // zero out the current value to free up its memory
-                            (mk_val_set m currvref (mk_ilzero (m,currvref.Type)))))
-            let checkDisposeExpr = 
-                mk_compgen_seq m 
-                    checkDisposeExpr 
-                    (mk_compgen_seq m 
-                        (TExpr_op(TOp_label noDisposeContinuationLabel,[],[],m))
-                        (TExpr_op(TOp_return,[],[mk_false g m],m)))
-                            
-            let addJumpTable isDisposal expr = 
-                let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m )
-                let mkGotoLabelTarget lab = mbuilder.AddResultTarget(TExpr_op(TOp_goto lab,[],[],m),SuppressSequencePointAtTarget)
-                let dtree = 
-                  TDSwitch(pce,
-                           [ 
-                             // no disposal action for the initial state (pc = 1)
-                             if isDisposal then 
-                                 yield mk_case(TTest_const(TConst_int32 pcInit),mkGotoLabelTarget noDisposeContinuationLabel) 
-                             for pc in pcs do 
-                                 yield mk_case(TTest_const(TConst_int32 pc),mkGotoLabelTarget pc2lab.[pc])
-                             yield mk_case(TTest_const(TConst_int32 pcDone),mkGotoLabelTarget noDisposeContinuationLabel) ],
-                           Some(mkGotoLabelTarget pc2lab.[pcInit]),
-                           m)
-                           
-                let table = mbuilder.Close(dtree,m,g.int_ty)
-                mk_compgen_seq m table (mk_compgen_seq m (TExpr_op(TOp_label initLabel,[],[],m)) expr)
-
-            let stateMachineExprWithJumpTable = addJumpTable false stateMachineExpr
-            let disposalExprWithJumpTable = addJumpTable true disposalExpr  
-            let checkDisposeExprWithJumpTable = addJumpTable true checkDisposeExpr  
-            // all done, no return the results
-            Some (nextvref, pcvref,currvref,stateVars,stateMachineExprWithJumpTable,disposalExprWithJumpTable,checkDisposeExprWithJumpTable,ty,m)
-
-        | None -> 
-            // printfn "FAILED: no compilation found! %s" (string_of_range m)
-            None
-    | _ -> None
-    
-    
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/nameres.ml b/tools/FSharp_1.9.6.16/source/fsharp/nameres.ml
deleted file mode 100644
index bf713202..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/nameres.ml
+++ /dev/null
@@ -1,2091 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-module (* internal *) Microsoft.FSharp.Compiler.Nameres
-
-//-------------------------------------------------------------------------
-// Name environment and name resolution 
-//------------------------------------------------------------------------- 
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Import
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
-open Microsoft.FSharp.Compiler.AbstractIL.IL // Abstract IL 
-open Microsoft.FSharp.Compiler.Outcome
-open Microsoft.FSharp.Compiler.Infos
-open Microsoft.FSharp.Compiler.Infos.AccessibilityLogic
-open Microsoft.FSharp.Compiler.Infos.AttributeChecking
-open Microsoft.FSharp.Compiler.Layout
-open Microsoft.FSharp.Compiler.PrettyNaming
-
-type NameResolver(g:TcGlobals, 
-                  amap: Import.ImportMap, 
-                  infoReader: InfoReader, 
-                  instantiationGenerator: (range -> typars -> tinst)) =
-    /// Used to transform typars into new inference typars 
-    // instantiationGenerator is a function to help us create the
-    // type parameters by copying them from type parameter specifications read
-    // from IL code.  
-    //
-    // When looking up items in generic types we create a fresh instantiation 
-    // of the type, i.e. instantiate the type with inference variables. 
-    // This means the item is returned ready for use by the type inference engine 
-    // without further freshening. However it does mean we end up plumbing 'instantiationGenerator' 
-    // around a bit more than we would like to, which is a bit annoying. 
-    member nr.instantiationGenerator = instantiationGenerator
-    member nr.g = g
-    member nr.amap = amap
-    member nr.InfoReader = infoReader
-    
-//-------------------------------------------------------------------------
-// Helpers for unionconstrs and recdfields
-//------------------------------------------------------------------------- 
-
-let UnionCaseRefsInTycon modref (tycon:Tycon) = 
-    tycon.UnionCasesAsList |> List.map (ucref_of_ucase (MakeNestedTcref modref tycon)) 
-
-let UnionCaseRefsInModuleOrNamespace (modref:ModuleOrNamespaceRef) = 
-    List.foldBack (UnionCaseRefsInTycon modref >> (@)) (NameMap.range modref.ModuleOrNamespaceType.AllEntities) []
-
-let IsUnionCaseInTycon (id:ident) (tycon :Tycon) = isSome (tycon.GetUnionCaseByName id.idText) 
-
-let IsRecdFieldInTycon (id:ident) (tycon :Tycon) = tycon.GetFieldByName(id.idText).IsSome
-
-let IsRecdFieldInUnionCase (id:ident) (ucase:UnionCase) = ucase.GetFieldByName id.idText |> isSome
-
-let TryFindTypeWithUnionCase (modref:ModuleOrNamespaceRef) id = 
-    NameMap.tryFindInRange (IsUnionCaseInTycon id) modref.ModuleOrNamespaceType.AllEntities
-
-let TryFindTypeWithRecdField (mty:ModuleOrNamespaceType) id = 
-    NameMap.tryFindInRange (IsRecdFieldInTycon id) mty.AllEntities
-
-let ActivePatternElemsOfValRef vref = 
-    match apinfo_of_vref vref with
-    | Some (APInfo(_,nms,_) as apinfo) -> List.mapi (fun i _ -> APElemRef(apinfo,vref, i)) nms
-    | None -> [] 
-
-let ActivePatternElemsOfVal modref vspec = 
-    ActivePatternElemsOfValRef (mk_vref_in_modref modref vspec)
-
-
-let ActivePatternElemsOfModuleOrNamespace (modref:ModuleOrNamespaceRef) : ActivePatternElemRef NameMap = 
-    let mtyp = modref.ModuleOrNamespaceType
-    cacheOptRef mtyp.ActivePatternsLookupTable (fun () ->
-       let aprefs = List.foldBack (ActivePatternElemsOfVal modref >> (@)) (NameMap.range mtyp.AllValuesAndMembers) []
-       List.foldBack (fun apref acc -> NameMap.add (name_of_apref apref) apref acc) aprefs Map.empty)
-
-//---------------------------------------------------------------------------
-// 
-//------------------------------------------------------------------------- 
-
-// Note: Active patterns are encoded like this:
-//   let (|A|B|) x = if x < 0 then A else B    // A and B are reported as results using 'Item_apres' 
-//   match () with | A | B -> ()               // A and B are reported using 'ITem_apelem'
-
-[]
-type NamedItem = 
-  (* These exist in the "eUnqualifiedItems" List.map in the type environment. *)
-  | Item_val of  ValRef
-  | Item_ucase of UnionCaseInfo
-  | Item_apres of ActivePatternInfo * typ * int 
-  | Item_apelem of ActivePatternElemRef 
-  | Item_ecref of TyconRef 
-  | Item_recdfield of RecdFieldInfo
-
-  (* The following are never in the items table but are valid results of binding *)
-  (* an identitifer in different circumstances. *)
-  | Item_newdef of ident
-  | Item_il_field of ILFieldInfo
-  | Item_event of EventInfo
-  | Item_property of string * PropInfo list
-  | Item_meth_group of string * MethInfo list
-  | Item_ctor_group of string * MethInfo list
-  | Item_fake_intf_ctor of Tast.typ
-  | Item_delegate_ctor of Tast.typ
-  | Item_typs of string * Tast.typ list
-  | Item_modrefs of Tast.ModuleOrNamespaceRef list
-  | Item_implicit_op of ident
-  | Item_param_name of ident 
-  | Item_prop_name of ident 
-
-
-let MakeMethGroup (nm,minfos:MethInfo list) = 
-    let minfos = minfos |> List.sortBy (fun minfo -> minfo.NumArgs |> List.sum)
-    Item_meth_group (nm,minfos)
-
-let MakeCtorGroup (nm,minfos:MethInfo list) = 
-    let minfos = minfos |> List.sortBy (fun minfo -> minfo.NumArgs |> List.sum)
-    Item_ctor_group (nm,minfos)
-
-  
-//---------------------------------------------------------------------------
-//
-//------------------------------------------------------------------------- 
-
-type ExtensionMember = 
-   | FSExtMem of ValRef
-   | ILExtMem of ILTypeRef * ILMethodDef
-   static member Equality g e1 e2 = 
-       match e1, e2 with 
-       | FSExtMem vref1, FSExtMem vref2 -> g.vref_eq vref1 vref2
-       | ILExtMem (_,md1), ILExtMem (_,md2) -> md1 === md2
-       | _ -> false
-       
-[]
-type NameResolutionEnv =
-    { /// Display environment information for output 
-      eDisplayEnv: DisplayEnv;  
-      
-      /// Values and Data Tags available by unqualified name 
-      eUnqualifiedItems: NamedItem NameMap;
-
-      /// Data Tags and Active Pattern Tags available by unqualified name 
-      ePatItems: NamedItem NameMap;
-
-      /// Modules accessible via "." notation. Note this is a multi-map. 
-      /// Adding a module abbreviation adds it a local entry to this List.map. 
-      /// Likewise adding a ccu or opening a path adds entries to this List.map. 
-      
-      
-      /// REVIEW (old comment)
-      /// "The boolean flag is means the namespace or module entry shouldn't 'really' be in the 
-      ///  map, and if it is everr used to resolve a name then we give a warning. 
-      ///  This is used to give warnings on unqualified namespace accesses, e.g. 
-      ///    open System 
-      ///    open Collections                            <--- give a warning 
-      ///    let v = new Collections.Generic.List() <--- give a warning" 
-      
-      eModulesAndNamespaces:  (Tast.ModuleOrNamespaceRef list) NameMap; 
-      
-      /// Fully qualified modules and namespaces. 'open' does not change this. 
-      eFullyQualifiedModulesAndNamespaces:  (Tast.ModuleOrNamespaceRef list) NameMap; 
-      
-      /// RecdField labels in scope.  RecdField labels are those where type are inferred 
-      /// by label rather than by known type annotation. 
-      /// Bools indicate if from a record, where no warning is given on indeterminate lookup 
-      eFieldLabels: (Tast.RecdFieldRef * bool) NameMultiMap; 
-
-      /// Tycons indexed by the various names that may be used to access them, e.g. 
-      ///     "List" --> multiple tycon_refs for the various tycons accessible by this name. 
-      ///     "List`1" --> TyconRef 
-      eTyconsByAccessNames: TyconRef NameMultiMap; 
-
-      /// Tycons available by unqualified, demangled names (i.e. (List,1) --> TyconRef) 
-      eTyconsByDemangledNameAndArity: Map; 
-
-      /// Extension members by type and name 
-      eExtensionMembers: ExtensionMember TcrefMultiMap; 
-
-      /// Typars (always available by unqualified names). Further typars can be 
-      /// in the tpenv, a structure folded through each top-level definition. 
-      eTypars: Typar NameMap; 
-
-    } 
-
-    static member Empty(g) =
-        { eDisplayEnv=empty_denv g;
-          eModulesAndNamespaces=Map.empty;
-          eFullyQualifiedModulesAndNamespaces = Map.empty;
-          eFieldLabels=Map.empty;
-          eUnqualifiedItems=Map.empty;
-          ePatItems=Map.empty;
-          eTyconsByAccessNames=Map.empty;
-          eTyconsByDemangledNameAndArity=Map.empty;
-          eExtensionMembers=tcref_map_empty();      
-          eTypars=Map.empty; }
-    member x.DisplayEnv = x.eDisplayEnv
-    member x.UnqualifiedItems = x.eUnqualifiedItems
-
-
-//-------------------------------------------------------------------------
-// NamedItem functions
-//------------------------------------------------------------------------- 
-
-let DisplayNameOfItem g d = 
-    match d with
-    | Item_val v -> v.DisplayName
-    | Item_apelem apref -> name_of_apref apref
-    | Item_ucase(ucr) -> DecompileOpName ucr.UnionCase.DisplayName
-    | Item_ecref(ecr) -> ecr.DemangledExceptionName
-    | Item_recdfield(rfinfo) -> DecompileOpName rfinfo.RecdField.Name
-    | Item_newdef(id) -> id.idText
-    | Item_il_field(finfo) -> finfo.FieldName
-    | Item_event(einfo) -> einfo.EventName
-    | Item_property(nm,pinfos) -> nm
-    | Item_meth_group(nm,_) -> nm
-    | Item_ctor_group(nm,_) -> DemangleGenericTypeName nm
-    | Item_fake_intf_ctor typ 
-    | Item_delegate_ctor typ -> DemangleGenericTypeName (tcref_of_stripped_typ g typ).MangledName
-    | Item_typs(nm,tcref) -> DemangleGenericTypeName nm
-    | Item_modrefs(modref :: _) -> demangled_name_of_modref modref
-    | Item_param_name(id) -> id.idText
-    | Item_prop_name(id) -> id.idText
-    | _ ->  ""
-
-
-// Add a value to the relevant table
-//
-// Object model members are not added to the name resolution environment *)
-// because they use compiler-internal mangled names. *)
-let AddValRefToItems (vref:ValRef) eUnqualifiedItems =
-    match vref.MemberInfo with 
-    | Some _ -> eUnqualifiedItems
-    | None -> NameMap.add vref.MangledName (Item_val vref) eUnqualifiedItems
-
-let AddValRefToExtensionMembers (vref:ValRef) eExtensionMembers =
-    if vref.IsMember && vref.IsExtensionMember then
-        tcref_mmap_add vref.MemberApparentParent (FSExtMem vref) eExtensionMembers 
-    else
-        eExtensionMembers
-
-let AddActivePatternRefToPatternItems apref tab = 
-    NameMap.add (name_of_apref apref) (Item_apelem apref) tab
-
-
-/// This entrypoint is used to add some extra items to the environment for Visual Studio, e.g. static members 
-let AddFakeNamedValRefToNameEnv nm vref nenv =
-    {nenv with eUnqualifiedItems= NameMap.add nm (Item_val vref) nenv.eUnqualifiedItems }
-
-/// This entrypoint is used to add some extra items to the environment for Visual Studio, e.g. record members
-let AddFakeNameToNameEnv nm item nenv =
-    {nenv with eUnqualifiedItems= NameMap.add nm item nenv.eUnqualifiedItems }
-
-let AddValRefToNameEnv vref nenv =
-    {nenv with eUnqualifiedItems= AddValRefToItems vref nenv.eUnqualifiedItems;
-               eExtensionMembers = AddValRefToExtensionMembers vref nenv.eExtensionMembers;
-               ePatItems = 
-                   (let ePatItems = List.foldBack AddActivePatternRefToPatternItems (ActivePatternElemsOfValRef vref) nenv.ePatItems
-
-                    (* Add literal constants to the environment available for resolving items in patterns *)
-                    let ePatItems = 
-                        match vref.LiteralValue with 
-                        | None -> ePatItems 
-                        | Some _ -> NameMap.add vref.MangledName (Item_val vref) ePatItems
-
-                    ePatItems) }
-
-let AddActivePatternResultTagsToNameEnv apinfo ty nenv =
-    let nms = names_of_apinfo apinfo
-    let apresl = nms |> List.mapi (fun j nm -> nm, j)
-    { nenv with  eUnqualifiedItems= List.foldBack (fun (nm,j) acc -> Map.add nm (Item_apres(apinfo,ty,j)) acc) apresl nenv.eUnqualifiedItems; } 
-
-let GeneralizeUnionCaseRef (ucref:UnionCaseRef) = 
-    UnionCaseInfo(fst(generalize_tcref ucref.TyconRef), ucref)
-    
-let private AddTyconRefToNameEnv (g:TcGlobals) amap m nenv (tcref:TyconRef) = 
-    let AddRecdField (rfref:RecdFieldRef) tab = NameMultiMap.add rfref.FieldName (rfref,rfref.TyconRef.IsRecordTycon) tab
-    let AddUnionCase tab (ucref:UnionCaseRef)  = Map.add ucref.CaseName (Item_ucase (GeneralizeUnionCaseRef ucref)) tab
-    let AddUnionCases tab ucrefs = List.fold AddUnionCase tab ucrefs
-    let isIL = tcref.IsILTycon
-    let ucrefs = if isIL then [] else tcref.UnionCasesAsList |> List.map (ucref_of_ucase tcref) 
-    let flds =  if isIL then [| |] else tcref.AllFieldsArray
-
-    let eExtensionMembers = 
-        let csharpExtensionMeths =
-            if isIL  then 
-                let scoref,enc,tdef = tcref.ILTyconInfo
-                if ILThingHasExtensionAttribute tdef.tdCustomAttrs then 
-                    let tref = ILTypeInfo(tcref,tref_for_nested_tdef scoref (enc,tdef),[],tdef)
-                    
-                    if verbose then dprintfn "found extension attribute on type %s" tcref.MangledName
-                    
-                    dest_mdefs tdef.tdMethodDefs |> List.collect (fun md ->
-                          if ILThingHasExtensionAttribute md.mdCustomAttrs then
-                            match md.mdParams with 
-                            | thisParam :: _ -> 
-                                let ilty = thisParam.Type
-                                match ilty with 
-                                | Type_boxed tspec 
-                                | Type_value tspec -> 
-                                    let tcref = (tspec |> rescope_tspec scoref).TypeRef |> Import.ImportILTypeRef amap m
-                                    if verbose then dprintfn "found extension method %s on type %s" md.Name tcref.MangledName
-                                    
-                                    [(tcref, tref, md)]
-                                // Do not import extension members whose 'this' is only a type parameter
-                                | _ ->
-                                    []
-                            | _ -> 
-                                []
-                          else
-                              [])
-                else
-                    []
-            else 
-                []
-        if verbose then dprintfn "found %d extension members on type %s" csharpExtensionMeths.Length tcref.MangledName
-        (nenv.eExtensionMembers,csharpExtensionMeths) ||> List.fold (fun tab (tcref,tref,md) -> 
-            tcref_mmap_add tcref (ILExtMem (tref.ILTypeRef, md)) tab)  
-        
-    
-    { nenv with 
-        eFieldLabels= 
-            (if isIL then nenv.eFieldLabels 
-             else (nenv.eFieldLabels,flds) ||> Array.fold_left (fun acc f -> 
-                       if f.IsStatic || f.IsCompilerGenerated then acc 
-                       else AddRecdField (rfref_of_rfield tcref f) acc)) ;
-        eUnqualifiedItems    = 
-            (if isIL then nenv.eUnqualifiedItems else AddUnionCases nenv.eUnqualifiedItems    ucrefs);
-        ePatItems = 
-            (if isIL then nenv.ePatItems else AddUnionCases nenv.ePatItems ucrefs);
-        eExtensionMembers = 
-            eExtensionMembers;
-        eTyconsByDemangledNameAndArity= 
-            AddTyconsByDemangledNameAndArity tcref.MangledName (tcref.Typars(m)) tcref nenv.eTyconsByDemangledNameAndArity; 
-        eTyconsByAccessNames= 
-            AddTyconsByAccessNames tcref.MangledName tcref nenv.eTyconsByAccessNames } 
-    
-let AddTyconRefsToNameEnv g amap m tcrefs nenv = 
-    List.fold (AddTyconRefToNameEnv g amap m) nenv tcrefs
-
-let AddExceptionDeclsToNameEnv (ecref:TyconRef) nenv = 
-    assert ecref.IsExceptionDecl
-    let add_ecref_to_tab tab = NameMap.add ecref.DemangledExceptionName (Item_ecref ecref) tab
-    {nenv with 
-       eUnqualifiedItems=add_ecref_to_tab nenv.eUnqualifiedItems;
-       ePatItems = add_ecref_to_tab nenv.ePatItems }
-
-let AddModuleAbbrevToNameEnv (id:ident) modrefs nenv = 
-    {nenv with
-       eModulesAndNamespaces=
-         let add old nw = nw @ old
-         NameMap.layerAdditive add (Map.add id.idText modrefs Map.empty) nenv.eModulesAndNamespaces }
-
-
-//-------------------------------------------------------------------------
-// Open a structure or an IL namespace 
-//------------------------------------------------------------------------- 
-
-let modrefs_of_mtyp modref (mty:ModuleOrNamespaceType) = 
-  mty.ModulesAndNamespacesByDemangledName |> NameMap.map (MakeNestedTcref modref)
-
-let foldIf pred f x acc = if pred x then f x acc else acc
-
-// Recursive because of "AutoOpen", i.e. adding a module reference may automatically open further modules
-
-let rec AddModrefsToNameEnv g amap m topRooted ad modrefs nenv =
-    let AddModrefs modrefs tab = 
-         let add old nw = 
-             if IsEntityAccessible ad nw then  
-                 if verbose then  dprintf "AddModrefs, nm = %s, #old = %d\n" (demangled_name_of_modref nw) (List.length old);
-                 let isPartialNamespace = not topRooted && not nw.IsNamespace
-                 ((* isPartialNamespace, *) nw) :: old
-             else 
-                 old
-         NameMap.layerAdditive add modrefs tab
-    let nenv = 
-        {nenv with
-           eModulesAndNamespaces= AddModrefs modrefs nenv.eModulesAndNamespaces;
-           eFullyQualifiedModulesAndNamespaces =
-             (if topRooted  
-              then AddModrefs modrefs nenv.eFullyQualifiedModulesAndNamespaces
-              else nenv.eFullyQualifiedModulesAndNamespaces) } 
-    let nenv = 
-        (nenv,NameMap.range modrefs) ||> List.fold (fun nenv modref ->  
-            if modref.IsModule && TryFindBoolAttrib g g.attrib_AutoOpenAttribute modref.Attribs = Some(true) then
-                AddModuleOrNamespaceContentsToNameEnv g amap ad m modref nenv
-            else
-                nenv)
-    nenv
-
-and AddModuleOrNamespaceContentsToNameEnv (g:TcGlobals) amap (ad:AccessorDomain) m (modref:ModuleOrNamespaceRef) nenv = 
-    let mty = modref.ModuleOrNamespaceType
-    let tycons = mty.TypeAndExceptionDefinitions
-    let exncs = mty.ExceptionDefinitions
-    let nenv = { nenv with eDisplayEnv= denv_add_open_modref modref nenv.eDisplayEnv }
-    let nenv = List.foldBack (MakeNestedTcref modref >> foldIf (IsEntityAccessible ad) (AddExceptionDeclsToNameEnv)) exncs nenv
-    let nenv = NameMap.foldRange (mk_vref_in_modref modref >> foldIf (IsValAccessible ad) (AddValRefToNameEnv)) mty.AllValuesAndMembers nenv
-    let nenv = AddTyconRefsToNameEnv g amap m (tycons |> List.map (MakeNestedTcref modref) |> List.filter (IsEntityAccessible ad) ) nenv
-    let modrefs = modrefs_of_mtyp modref mty
-    let nenv = AddModrefsToNameEnv g amap m false ad modrefs nenv
-    nenv
-
-let AddModrefToNameEnv g amap m topRooted ad modref nenv =  
-    AddModrefsToNameEnv g amap m topRooted ad (Map.add (demangled_name_of_modref modref) modref Map.empty) nenv
-
-  
-type CheckForDuplicateTyparFlag = 
-    | CheckForDuplicateTypars 
-    | NoCheckForDuplicateTypars
-
-let AddDeclaredTyparsToNameEnv check typars nenv = 
-    let typarmap = 
-      List.foldBack 
-        (fun (tp:Typar) sofar -> 
-          begin match check with 
-          | CheckForDuplicateTypars -> 
-              if Map.mem tp.Name sofar then errorR (Duplicate("type parameter",tp.DisplayName,tp.Range))
-          | NoCheckForDuplicateTypars -> 
-              ()
-          end;
-          Map.add tp.Name tp sofar) typars Map.empty 
-    {nenv with eTypars=NameMap.layer typarmap nenv.eTypars }
-
-//--------------------------------------------------------------------------
-// Lookup tables
-//-------------------------------------------------------------------------- 
-
-let tryname s t (id:ident) = 
-    try Map.find id.idText t 
-    with Not_found -> error (UndefinedName(0,s,id,NameMap.domainL t))
-
-//-------------------------------------------------------------------------
-// FreshenTycon and instantiationGenerator.  
-//------------------------------------------------------------------------- 
-
-let FreshenTycon (ncenv: NameResolver) m (tcref:TyconRef) = 
-    let tinst = ncenv.instantiationGenerator m (tcref.Typars(m))
-    TType_app(tcref,tinst)
-
-let FreshenUnionCaseRef (ncenv: NameResolver) m (ucref:UnionCaseRef) = 
-    let tinst = ncenv.instantiationGenerator m (ucref.TyconRef.Typars(m))
-    UnionCaseInfo(tinst,ucref)
-
-/// This must be called after fetching unqualified items that may need to be freshened
-let FreshenUnqualifiedItem (ncenv: NameResolver) m res = 
-    match res with 
-    | Item_ucase (UnionCaseInfo(_,ucref)) -> Item_ucase (FreshenUnionCaseRef ncenv m ucref)
-    | _ -> res
-
-
-//-------------------------------------------------------------------------
-// Resolve module paths, value, field etc. lookups.  Doing this involves
-// searching through many possibilities and disambiguating.  Hence first
-// define some ways of combining multiple results and for carrying
-// error information.  Errors are generally undefined names and are
-// reported by returning the error that occurs at greatest depth in the
-// sequence of identifiers. 
-//------------------------------------------------------------------------- 
-
-// Accumulate a set of possible results. 
-// If neither operations succeed, return an approximate error. 
-// If one succeeds, return that one. 
-// Prefer the error associated with the first argument. 
-let OneResult res = 
-    match res with 
-    | Result x -> Result [x]
-    | Exception e -> Exception e
-
-let OneSuccess x = Result [x]
-
-let AddResults res1 res2 =
-    match res1, res2 with 
-    | Result [],_ -> res2
-    | _,Result [] -> res1
-    | Result x,Result l -> Result (x @ l)
-    | Exception _,Result l -> Result l
-    | Result x,Exception _ -> Result x
-     (* This prefers error messages coming from deeper failing long identifier paths *)
-    | Exception (UndefinedName(n1,_,_,_) as e1),Exception (UndefinedName(n2,_,_,_) as e2) -> 
-        if n1 < n2 then Exception e2 else Exception e1
-    (* Prefer more concrete errors about things being undefined *)
-    | Exception (UndefinedName(n1,_,_,_) as e1),Exception (Error _) -> Exception e1
-    | Exception (Error _),Exception (UndefinedName(n1,_,_,_) as e2) -> Exception e2
-    | Exception e1,Exception _ -> Exception e1
-
-let (+++) x y = AddResults x y
-let NoResultsOrUsefulErrors = Result []
-
-// REVIEW: make this tail recursive
-let rec CollectResults f = function
-    | [] -> NoResultsOrUsefulErrors
-    | [h] -> OneResult (f h)
-    | h :: t -> AddResults (OneResult (f h)) (CollectResults f t)
-
-let AtMostOneResult m res = 
-    match res with 
-    | Exception err -> raze err
-    | Result [] -> raze (Error("invalid module/expression/type",m))
-    | Result [res] -> success res
-    | Result (res :: _) -> success res (* raze (Error("this module/expression/type is ambiguous",m))*)
-
-//-------------------------------------------------------------------------
-// Resolve (possibly mangled) type names 
-//------------------------------------------------------------------------- 
- 
-/// Qualified lookups where the number of generic arguments is known 
-/// from context, e.g. Module.Type.  In theory the full names suh as ``List`1`` can 
-/// be used to qualify access if needed 
-let LookupTypeNameInEntityHaveArity nm ntyargs (mty:ModuleOrNamespaceType) = 
-    if IsMangledGenericName nm || ntyargs = 0 then 
-        mty.TypesByMangledName.TryFind nm
-    else
-        mty.TypesByMangledName.TryFind (nm^"`"^string ntyargs)
-
-/// Unqualified lookups where the number of generic arguments is known 
-/// from context, e.g. List.  Rebindings due to 'open' may have rebound identifiers.
-let LookupTypeNameInEnvHaveArity nm ntyargs nenv = 
-    if IsMangledGenericName nm then 
-      nenv.eTyconsByDemangledNameAndArity.TryFind(DecodeGenericTypeName nm) 
-      +?? (fun () -> nenv.eTyconsByAccessNames.TryFind nm |> Option.map List.hd)
-    else 
-      nenv.eTyconsByDemangledNameAndArity.TryFind(NameArityPair(nm,ntyargs)) 
-      +?? (fun () -> nenv.eTyconsByAccessNames.TryFind nm |> Option.map List.hd)
-
-/// Unqualified lookups where the number of generic arguments is NOT known 
-/// from context. This is used in five places: 
-///     -  static member lookups, e.g. MyType.StaticMember(3) 
-///     -                         e.g. MyModule.MyType.StaticMember(3) 
-///     -  type-qualified field names, e.g. { RecordType.field = 3 } 
-///     -  type-qualified constructor names, e.g. match x with UnionType.A -> 3 
-///     -  identifiers to constructors for better error messages, e.g. 'String(3)' after 'open System' 
-///     -  the special single-constructor rule in tc_tycon_cores 
-/// 
-/// Because of the potential ambiguity multiple results can be returned. 
-/// Explicit type annotations can be added where needed to specify the generic arity. 
-///  
-/// In theory the full names such as ``RecordType`1`` can 
-/// also be used to qualify access if needed, though this is almost never needed.  
-
-let LookupTypeNameNoArity nm byDemangledNameAndArity byAccessNames = 
-    if IsMangledGenericName nm then 
-      match Map.tryfind (DecodeGenericTypeName nm) byDemangledNameAndArity with 
-      | Some res -> [res]
-      | None -> 
-          match Map.tryfind nm byAccessNames with
-          | Some res -> res
-          | None -> []
-    else 
-      NameMultiMap.find nm byAccessNames
-
-let LookupTypeNameInEnvNoArity nm nenv = 
-    LookupTypeNameNoArity nm nenv.eTyconsByDemangledNameAndArity nenv.eTyconsByAccessNames 
-
-let LookupTypeNameInEntityNoArity m nm (mtyp:ModuleOrNamespaceType) = 
-    LookupTypeNameNoArity nm (mtyp.TypesByDemangledNameAndArity(m)) mtyp.TypesByAccessNames 
-
-type TypeNameInExprOrPatFlag = ResolveTypeNamesToCtors | ResolveTypeNamesToTypeRefs
-type TypeNameResInfo = TypeNameInExprOrPatFlag * int option
-let DefaultTypeNameResInfo = (ResolveTypeNamesToCtors,None) 
-
-
-let LookupTypeNameInEnvMaybeHaveArity nm ((_,numTyargsOpt):TypeNameResInfo)  nenv = 
-    match numTyargsOpt with 
-    | None -> LookupTypeNameInEnvNoArity nm nenv
-    | Some ntyargs -> LookupTypeNameInEnvHaveArity nm ntyargs nenv |> Option.to_list
-
-let LookupTypeNameInEntityMaybeHaveArity ad m nm numTyargsOpt (modref: ModuleOrNamespaceRef) = 
-    let mtyp = modref.ModuleOrNamespaceType
-    let tycons = 
-        match numTyargsOpt with 
-        | None -> 
-            LookupTypeNameInEntityNoArity m nm mtyp
-        | Some ntyargs -> 
-            LookupTypeNameInEntityHaveArity nm ntyargs mtyp |> Option.to_list
-    tycons 
-       |> List.map (MakeNestedTcref modref) 
-       |> List.filter (IsEntityAccessible ad)
-
-
-let GetNestedTypesOfType ad (ncenv:NameResolver) (optFilter,numTyargsOpt) m typ =
-    let g = ncenv.g
-    ncenv.InfoReader.ReadPrimaryTypeHierachy(m,typ) |> List.collect (fun typ -> 
-        if is_stripped_tyapp_typ g typ then 
-            let tcref,tinst = dest_stripped_tyapp_typ g typ
-            let tycon = deref_tycon tcref
-            let mty = tycon.ModuleOrNamespaceType
-            // Handle the .NET/C# business where nested generic types implictly accumulate the type parameters 
-            // from their enclosing types.
-            let MakeNestedType (tcrefNested:TyconRef) = 
-                let _,tps = List.chop tinst.Length (tcrefNested.Typars(m))
-                let tinstNested = ncenv.instantiationGenerator m tps
-                mk_tyapp_ty tcrefNested (tinst @ tinstNested)
-
-            match optFilter with 
-            | Some nm -> 
-                LookupTypeNameInEntityMaybeHaveArity ad m nm numTyargsOpt tcref 
-                    |> List.map MakeNestedType 
-            | None -> 
-                mty.TypesByAccessNames 
-                    |> NameMultiMap.range 
-                    |> List.map (MakeNestedTcref tcref >> MakeNestedType)
-                    |> List.filter (IsTypeAccessible g ad)
-        else [])
-
-//-------------------------------------------------------------------------
-// Report environments to visual studio. We stuff intermediary results 
-// into a global variable. A little unpleasant. 
-// REVIEW: We could at least put the global in cenv!!!
-//------------------------------------------------------------------------- 
-
-// Represents a type of the occurence when reporting name in name resolution
-type ItemOccurence = 
-  // This is a binding / declaration of the item
-  | Binding = 0
-  // This is a usage of the item
-  | Use = 1
-  // Inside pattern matching
-  | Pattern = 2
-  
-type ITypecheckResultsSink =
-    abstract NotifyEnvWithScope : range * NameResolutionEnv * AccessorDomain -> unit
-    abstract NotifyExprHasType : pos * typ * Tastops.DisplayEnv * NameResolutionEnv * AccessorDomain * range -> unit
-    abstract NotifyNameResolution : pos * NamedItem * ItemOccurence * Tastops.DisplayEnv * NameResolutionEnv * AccessorDomain * range -> unit
-
-let GlobalTypecheckResultsSink : ITypecheckResultsSink option ref  = ref None
-
-let CallEnvSink(scopem,nenv,ad) = 
-    match !GlobalTypecheckResultsSink with 
-    | None -> () 
-    | Some sink -> sink.NotifyEnvWithScope(scopem,nenv,ad)
-
-let CallNameResolutionSink(m,nenv,item,occurenceType,denv,ad) = 
-    match !GlobalTypecheckResultsSink with 
-    | None -> () 
-    | Some sink -> sink.NotifyNameResolution(end_of_range m,item,occurenceType,denv,nenv,ad,m)  
-
-let CallExprHasTypeSink(m,nenv,typ,denv,ad) = 
-    match !GlobalTypecheckResultsSink with 
-    | None -> () 
-    | Some sink -> sink.NotifyExprHasType(end_of_range m,typ,denv,nenv,ad,m)
-
-
-/// Checks if the type variables associated with the result of a resolution are inferrable,
-/// i.e. occur in the arguments or return type of the resolution. If not give a warning
-/// about a type instantiation being needed.
-type ResultTyparChecker = unit -> bool
-
-let CheckAllTyparsInferrable g amap m  item = 
-    match item with
-    | Item_val v -> true
-    | Item_apelem apref -> true
-    | Item_ucase(ucr) -> true
-    | Item_ecref(ecr) -> true
-    | Item_recdfield(rfinfo) -> true
-    | Item_newdef(id) -> true
-    
-    | Item_il_field(finfo) -> true
-    | Item_event(einfo) -> true
-
-    | Item_property(nm,pinfos) -> 
-        pinfos |> List.forall (fun pinfo -> 
-            let freeInEnclosingType = free_in_type CollectTyparsNoCaching pinfo.EnclosingType
-            let freeInArgsAndRetType = 
-                acc_free_in_types CollectTyparsNoCaching (ParamTypesOfPropInfo amap m pinfo) 
-                       (free_in_type CollectTyparsNoCaching (PropertyTypeOfPropInfo amap m pinfo))
-            let free = Zset.diff freeInEnclosingType.FreeTypars  freeInArgsAndRetType.FreeTypars
-            free.IsEmpty)
-
-    | Item_meth_group(nm,minfos) -> 
-        minfos |> List.forall (fun minfo -> 
-            let fminst = minfo.FormalMethodInst
-            let freeInEnclosingType = free_in_type CollectTyparsNoCaching minfo.EnclosingType
-            let freeInArgsAndRetType = 
-                List.foldBack (acc_free_in_types CollectTyparsNoCaching) (ParamTypesOfMethInfo amap m minfo fminst) 
-                   (acc_free_in_types CollectTyparsNoCaching (ObjTypesOfMethInfo amap m minfo fminst) 
-                       (free_in_type CollectTyparsNoCaching (FSharpReturnTyOfMeth amap m minfo fminst)))
-            let free = Zset.diff freeInEnclosingType.FreeTypars  freeInArgsAndRetType.FreeTypars
-            free.IsEmpty)
-
-    | Item_ctor_group(nm,_) -> true
-    | Item_fake_intf_ctor typ 
-    | Item_delegate_ctor typ -> true
-    | Item_typs(nm,tcref) -> true
-    | Item_modrefs(modref :: _) -> true
-    | Item_param_name(id) -> true
-    | Item_prop_name(id) -> true
-    | _ ->  true
-    
-/// Keeps track of information relevant to the chosen resolution of a long identifier
-///
-/// When we resolve an item such as System.Console.In we
-/// resolve it in one step to a property/val/method etc. item. However
-/// Visual Studio needs to know about the exact resolutions of the names
-/// System and Console, i.e. the 'entity path' of the resolution. 
-///
-/// Each of the resolution routines keeps track of the entity path and 
-/// ultimately calls ResolutionInfo.SendToSink to record it for 
-/// later use by Visual Studio.
-type ResolutionInfo = 
-    | ResolutionInfo of (*entityPath, reversed*)(range * EntityRef) list * (*warnings/errors*)(ResultTyparChecker -> unit)
-
-    static member SendToSink(ncenv: NameResolver,nenv,ad,ResolutionInfo(entityPath,warnings),typarChecker) = 
-        entityPath |> List.iter (fun (m,eref:EntityRef) -> 
-            CheckEntityAttributes ncenv.g eref m |> CommitOperationResult;        
-            CheckTyconAccessible m ad eref |> ignore;
-            let item = if eref.IsModuleOrNamespace then Item_modrefs([eref]) else Item_typs(eref.DisplayName,[FreshenTycon ncenv m eref])
-            CallNameResolutionSink(m,nenv,item,ItemOccurence.Use,nenv.eDisplayEnv,ad))
-        warnings(typarChecker)
- 
-    static member Empty = 
-        ResolutionInfo([],(fun typarChecker -> ()))
-
-    member x.AddEntity info = 
-        let (ResolutionInfo(entityPath,warnings)) = x
-        ResolutionInfo(info::entityPath,warnings)
-
-    member x.AddWarning f = 
-        let (ResolutionInfo(entityPath,warnings)) = x
-        ResolutionInfo(entityPath,(fun typarChecker -> f typarChecker; warnings typarChecker))
-
-
-
-let CheckForMultipleGenericTypeAmbiguities (tcrefs:(ResolutionInfo * TyconRef) list) ((typeNameResFlag,numTyargsOpt):TypeNameResInfo) m = 
-    // Given ambiguous C<>, C<_>    we resolve the ambiguous 'C.M' to C<> without warning
-    // Given ambiguous C<_>, C<_,_> we resolve the ambiguous 'C.M' to C<_> with an ambiguity error
-    // Given C<_>                   we resolve the ambiguous 'C.M' to C<_> with a warning if the argument or return types can't be inferred
-
-    // Given ambiguous C<>, C<_>    we resolve the ambiguous 'C()' to C<> without warning
-    // Given ambiguous C<_>, C<_,_> we resolve the ambiguous 'C()' to C<_> with an ambiguity error
-    // Given C<_>                   we resolve the ambiguous 'C()' to C<_> with a warning if the argument or return types can't be inferred
-
-    let tcrefs = 
-        tcrefs 
-        // remove later duplicates (if we've opened the same module more than once)
-        |> Seq.distinct_by (fun (_,tcref) -> tcref.Stamp) 
-        |> Seq.to_list                     
-        // List.sort_by is a STABLE sort (the order matters!)
-        |> List.sort_by (fun (_,tcref) -> tcref.Typars(m).Length)
-
-    match tcrefs with 
-    | ((resInfo,tcref) :: _) when 
-            // multiple types
-            tcrefs.Length > 1 && 
-            // no explicit type instantiation
-            isNone numTyargsOpt && 
-            // some type arguments required on all types (note sorted by typar count above)
-            tcref.Typars(m).Length > 0 && 
-            // plausible types have different arities
-            (tcrefs |> Seq.distinct_by (fun (_,tcref) -> tcref.Typars(m).Length) |> Seq.length > 1)  ->
-        [ for (resInfo,tcref) in tcrefs do 
-            let resInfo = resInfo.AddWarning (fun typarChecker -> errorR(Error(sprintf "Multiple types exist called '%s', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '%s'" tcref.DisplayName tcref.DisplayNameWithUnderscoreTypars,m)))
-            yield (resInfo,tcref) ]
-
-    | [(resInfo,tcref)] when isNone numTyargsOpt && tcref.Typars(m).Length > 0 && typeNameResFlag = ResolveTypeNamesToTypeRefs ->
-        let resInfo = 
-            resInfo.AddWarning (fun typarChecker -> 
-                if not (typarChecker()) then 
-                    warning(Error(sprintf "The instantiation of the generic type '%s' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '%s'" tcref.DisplayName tcref.DisplayNameWithUnderscoreTypars,m)))
-        [(resInfo,tcref)]
-
-    | _ -> 
-        tcrefs
-    
-
-
-//-------------------------------------------------------------------------
-// Consume ids that refer to a namespace
-//------------------------------------------------------------------------- 
-
-type FullyQualifiedFlag = 
-    // Only resolve full paths.
-    // This is urrently unused, but would be needed for a fully-qualified syntax, so leaving it in the code
-    | FullyQualified 
-    | OpenQualified 
-
-let ResolveLongIndentAsModuleOrNamespace fullyQualified (nenv:NameResolutionEnv) ad (lid:ident list) =
-    match lid with 
-    | [] -> NoResultsOrUsefulErrors
-    | id:: rest -> 
-        let tab = 
-            match fullyQualified with 
-            | FullyQualified -> nenv.eFullyQualifiedModulesAndNamespaces 
-            | OpenQualified -> nenv.eModulesAndNamespaces
-
-        match tab.TryFind(id.idText) with
-        | Some modrefs -> 
-            
-            /// Look through the sub-namespaces and/or modules
-            let rec look depth  modref (mty:ModuleOrNamespaceType) (lid:ident list) =
-                match lid with 
-                | [] -> success (depth,modref,mty)
-                | id:: rest ->
-                    match mty.ModulesAndNamespacesByDemangledName.TryFind(id.idText) with
-                    | Some mspec when IsEntityAccessible ad (MakeNestedTcref modref mspec) -> 
-                        let subref = MakeNestedTcref modref mspec
-                        look (depth+1) subref mspec.ModuleOrNamespaceType rest
-                    | _ -> raze (UndefinedName(depth,"namespace",id,[]))
-
-            modrefs |> CollectResults (fun modref -> 
-                if IsEntityAccessible ad modref then 
-                    look 1 modref modref.ModuleOrNamespaceType rest
-                else 
-                    raze (UndefinedName(0,"namespace or module",id,[]))) 
-        | None -> 
-            raze (UndefinedName(0,"namespace or module",id,[]))
-
-
-let ResolveLongIndentAsModuleOrNamespaceThen fullyQualified (nenv:NameResolutionEnv) ad lid f =
-    match lid with 
-    | [] -> NoResultsOrUsefulErrors
-    | id :: rest -> 
-        match ResolveLongIndentAsModuleOrNamespace fullyQualified nenv ad [id] with
-        |  Result modrefs -> 
-              modrefs |> CollectResults (fun (depth,modref,mty) ->  
-                  let resInfo = ResolutionInfo.Empty.AddEntity(id.idRange,modref) 
-                  f resInfo (depth+1) id.idRange modref mty rest) 
-        |  Exception err -> Exception err 
-
-//-------------------------------------------------------------------------
-// Bind name used in "new Foo.Bar(...)" constructs
-//------------------------------------------------------------------------- 
-
-let private ResolveObjectConstructorPrim (ncenv:NameResolver) edenv resInfo m ad typ = 
-    let g = ncenv.g
-    let amap = ncenv.amap
-    if verbose then   dprintf "--> ResolveObjectConstructor\n"; 
-    if is_delegate_typ g typ then 
-        success (resInfo,Item_delegate_ctor typ,[])
-    else 
-        let cinfos =  GetIntrinsicConstructorInfosOfType ncenv.InfoReader m typ
-        if is_interface_typ g typ && isNil cinfos then 
-            success (resInfo,Item_fake_intf_ctor typ, [])
-        else 
-            let defaultStructCtorInfo = 
-                if (is_struct_typ g typ && not(cinfos |> List.exists minfo_is_nullary)) then 
-                    [DefaultStructCtor(g,typ)] 
-                else []
-            if verbose then   dprintf "--> ResolveObjectConstructor (2)\n"; 
-            if (isNil defaultStructCtorInfo && isNil cinfos) or not (is_stripped_tyapp_typ g typ) then 
-                raze (Error("No constructors are available for the type '"^NicePrint.pretty_string_of_typ edenv typ^"'",m))
-            else 
-                let cinfos = cinfos |> List.filter (IsMethInfoAccessible amap m ad)  
-                success (resInfo,MakeCtorGroup ((tcref_of_stripped_typ g typ).MangledName, (defaultStructCtorInfo@cinfos)),[]) 
-
-let ResolveObjectConstructor (ncenv:NameResolver) edenv m ad typ = 
-    ResolveObjectConstructorPrim (ncenv:NameResolver) edenv [] m ad typ  |?> (fun (resInfo,item,rest) -> (item,rest))
-
-//-------------------------------------------------------------------------
-// Bind IL "." notation (member lookup or lookup in a type)
-//------------------------------------------------------------------------- 
-
-let IntrinsicPropInfosOfTypeInScope (infoReader:InfoReader) (optFilter, ad) findFlag m typ =
-    let g = infoReader.g
-    let amap = infoReader.amap
-    let pinfos = GetIntrinsicPropInfoSetsOfType infoReader (optFilter, ad) findFlag m typ
-    let pinfos = pinfos |> ExcludeHiddenOfPropInfos g amap m 
-    pinfos
-
-let ExtensionPropInfosOfTypeInScope (infoReader:InfoReader) eExtensionMembers (optFilter, ad) findFlag m typ =
-    let g = infoReader.g
-    let amap = infoReader.amap
-    infoReader.ReadEntireTypeHierachy(m,typ) |> List.collect (fun typ -> 
-         if (is_stripped_tyapp_typ g typ) then 
-            let tcref = tcref_of_stripped_typ g typ
-            (* NOTE: multiple "open"'s push multiple duplicate values into eExtensionMembers *)
-            (* REVIEW: this looks a little slow: ListSet.setify is quadratic. *)
-            let extValRefs = ListSet.setify (ExtensionMember.Equality g) (tcref_mmap_find tcref eExtensionMembers)
-            let propCollector = new PropertyCollector(g,amap,m,typ,optFilter,ad)
-            extValRefs |> List.iter (fun emem ->
-                match emem with 
-                | FSExtMem vref -> 
-                   match vref.MemberInfo with 
-                   | None -> ()
-                   | Some(membInfo) -> propCollector.Collect(membInfo,vref)
-                | ILExtMem _ -> 
-                   // No extension properties coming from .NET
-                   ())
-            propCollector.Close()
-         else [])
-
-let AllPropInfosOfTypeInScope infoReader eExtensionMembers (optFilter, ad) findFlag m typ =
-    IntrinsicPropInfosOfTypeInScope infoReader (optFilter, ad) findFlag m typ
-    @ ExtensionPropInfosOfTypeInScope infoReader eExtensionMembers (optFilter, ad) findFlag m typ 
-
-let IntrinsicMethInfosOfType (infoReader:InfoReader) (optFilter,ad) findFlag m typ =
-    let g = infoReader.g
-    let amap = infoReader.amap
-    let minfos = GetIntrinsicMethInfoSetsOfType infoReader (optFilter,ad) findFlag m typ
-    let minfos = minfos |> ExcludeHiddenOfMethInfos g amap m
-    minfos
-
-let ImmediateExtensionMethInfosOfTypeInScope (infoReader:InfoReader) eExtensionMembers (optFilter,ad) findFlag m typ =
-    let g = infoReader.g
-    if (is_stripped_tyapp_typ g typ) then 
-        let tcref = tcref_of_stripped_typ g typ
-        // NOTE: multiple "open"'s push multiple duplicate values into eExtensionMembers 
-        // REVIEW: this looks a little slow: ListSet.setify is quadratic. 
-        let extValRefs = ListSet.setify (ExtensionMember.Equality g) (tcref_mmap_find tcref eExtensionMembers)
-        extValRefs |> List.choose (fun emem -> 
-                match emem with 
-                | FSExtMem vref -> 
-                    match vref.MemberInfo with 
-                    | None -> None
-                    | Some(membInfo) -> TrySelectMemberVal g optFilter typ membInfo vref
-                | ILExtMem (actualParent,md) when (match optFilter with None -> true | Some(nm) -> nm = md.mdName) ->
-                    // 'typ' is the logical parent 
-                    let tinfo = tinfo_of_il_typ g typ
-                    Some(mk_il_minfo infoReader.amap m tinfo (Some(actualParent)) md)
-                | _ -> 
-                    None) 
-    else []
-
-let ExtensionMethInfosOfTypeInScope (infoReader:InfoReader) eExtensionMembers (optFilter,ad) findFlag m typ =
-    let g = infoReader.g
-    infoReader.ReadEntireTypeHierachy(m,typ) |> List.collect (fun typ -> 
-        ImmediateExtensionMethInfosOfTypeInScope infoReader eExtensionMembers (optFilter,ad) findFlag m typ) 
-
-let AllMethInfosOfTypeInScope infoReader eExtensionMembers (optFilter,ad) findFlag m typ =
-    IntrinsicMethInfosOfType infoReader (optFilter,ad) findFlag m typ 
-    @ ExtensionMethInfosOfTypeInScope infoReader eExtensionMembers (optFilter,ad) findFlag m typ          
-
-
-exception IndeterminateType of range
-
-type LookupKind = 
-   | RecdField
-   | Pattern
-   | Expr
-   | Type
-   | Ctor
-
-
-let TryFindUnionCaseOfType g typ nm =
-    if is_stripped_tyapp_typ g typ then 
-        let tcref,tinst = dest_stripped_tyapp_typ g typ
-        match tcref.GetUnionCaseByName nm with 
-        | None -> None
-        | Some ucase -> Some(UnionCaseInfo(tinst,ucref_of_ucase tcref ucase))
-    else 
-        None
-   
-// REVIEW: this shows up on performance logs. Consider for example endles resolutions  of "List.map" to 
-// the empty set of results, or "x.Length" for a list or array type. This indicates it could be worth adding a cache here.
-let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo:ResolutionInfo) depth m ad (lid:ident list) findFlag typeNameResInfo typ =
-    let g = ncenv.g
-    match lid with 
-    | [] -> error(InternalError("ResolveLongIdentInTypePrim",m))
-    | id :: rest -> 
-        let nm = id.idText // used to filter the searches of the tables 
-        let optFilter = Some(nm) // used to filter the searches of the tables 
-        let contentsSearchAccessible = 
-           let unionCaseSearch = 
-               if (match lookupKind with Expr | Pattern -> true | _ -> false) then 
-                   TryFindUnionCaseOfType g typ nm 
-               else 
-                   None
-           // Lookup: datatype constructors take precedence 
-           match unionCaseSearch with 
-           | Some ucase -> 
-               success(resInfo,Item_ucase(ucase),rest)
-           | None -> 
-                match TryFindIntrinsicNamedItemOfType ncenv.InfoReader (nm,ad) findFlag m typ with
-                | Some (PropertyItem psets) when (match lookupKind with Expr  -> true | _ -> false) -> 
-                    let pinfos = psets |> ExcludeHiddenOfPropInfos g ncenv.amap m
-                    let item = 
-                        match pinfos with 
-                        | [pinfo] when pinfo.IsFSharpEventProperty -> 
-                            let minfos1 = GetImmediateIntrinsicMethInfosOfType (Some("add_"^nm),ad) g ncenv.amap m typ 
-                            let minfos2 = GetImmediateIntrinsicMethInfosOfType (Some("remove_"^nm),ad) g ncenv.amap m typ 
-                            match  minfos1,minfos2 with 
-                            | [FSMeth(_,_,addValRef)],[FSMeth(_,_,removeValRef)] -> 
-                                // FOUND PROPERTY-AS-EVENT AND CORRESPONDING ADD/REMOVE METHODS
-                                Item_event(FSEvent(g,pinfo,addValRef,removeValRef))
-                            | _ -> 
-                                // FOUND PROPERTY-AS-EVENT BUT DIDN'T FIND CORRESPONDING ADD/REMOVE METHODS
-                                Item_property (nm,pinfos)
-                        | _ -> 
-                            Item_property (nm,pinfos)
-
-
-                    success (resInfo,item,rest) 
-
-                | Some(MethodItem msets) when (match lookupKind with Expr  -> true | _ -> false) -> 
-                    let minfos = msets |> ExcludeHiddenOfMethInfos g ncenv.amap m
-                    success (resInfo,MakeMethGroup (nm,minfos),rest)
-
-                | Some (ILFieldItem (finfo:: _))  when (match lookupKind with Expr | Pattern -> true | _ -> false) -> 
-                    success (resInfo,Item_il_field finfo,rest)
-
-                | Some (ILEventItem (einfo :: _)) when (match lookupKind with Expr -> true | _ -> false)  -> 
-                    success (resInfo,Item_event (ILEvent(g,einfo)),rest)
-                | Some (RecdFieldItem (rfinfo)) when (match lookupKind with Expr | RecdField | Pattern -> true | _ -> false) -> 
-                    success(resInfo,Item_recdfield(rfinfo),rest)
-                | _ ->
-                let pinfos = ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv.eExtensionMembers (optFilter, ad) findFlag m typ
-                if nonNil(pinfos) && (match lookupKind with Expr -> true | _ -> false)  then 
-                    success (resInfo,Item_property (nm,pinfos),rest) else
-                
-                let minfos = ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv.eExtensionMembers (optFilter,ad) findFlag m typ
-                if nonNil(minfos) && (match lookupKind with Expr -> true | _ -> false) then 
-                    success (resInfo,MakeMethGroup (nm,minfos),rest) else 
-                
-                if is_typar_typ g typ then raze (IndeterminateType(union_ranges m id.idRange))
-                else raze (UndefinedName (depth,"field, constructor or member", id,[]))
-              
-        let nestedSearchAccessible = 
-            let nestedTypes = GetNestedTypesOfType ad ncenv (Some nm,(if isNil rest then snd typeNameResInfo else None)) m typ
-            let typeNameResFlag,numTyargsOpt = typeNameResInfo
-            if isNil rest then 
-                if isNil nestedTypes then 
-                    NoResultsOrUsefulErrors
-                else 
-                    match typeNameResFlag with 
-                    | ResolveTypeNamesToCtors -> 
-                        nestedTypes |> CollectResults (ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo m ad) 
-                    | ResolveTypeNamesToTypeRefs -> 
-                        OneSuccess (resInfo,Item_typs (nm,nestedTypes),rest)
-            else 
-                ResolveLongIdentInTypes ncenv nenv lookupKind resInfo (depth+1) m ad rest findFlag typeNameResInfo nestedTypes
-        (OneResult contentsSearchAccessible +++ nestedSearchAccessible)
-        
-and ResolveLongIdentInTypes (ncenv:NameResolver) nenv lookupKind resInfo depth m ad lid findFlag typeNameResInfo typs = 
-    typs |> CollectResults (ResolveLongIdentInTypePrim ncenv nenv lookupKind resInfo depth m ad lid findFlag typeNameResInfo >> AtMostOneResult m) 
-
-let ResolveLongIdentInType ncenv nenv lookupKind m ad lid findFlag typeNameResInfo typ =
-    let resInfo,item,rest = 
-        ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind ResolutionInfo.Empty 0 m ad lid findFlag typeNameResInfo typ
-        |> AtMostOneResult m
-        |> ForceRaise
-    ResolutionInfo.SendToSink(ncenv,nenv,ad,resInfo,(fun () -> CheckAllTyparsInferrable ncenv.g ncenv.amap m item));
-    item,rest
-
-// QUERY (instantiationGenerator cleanup): it would be really nice not to flow instantiationGenerator to here. 
-// This would help make it the separation between name resolution and 
-// type inference more obvious. However this would mean each caller 
-// would have to freshen. 
-let private ResolveLongIdentInTyconRef (ncenv:NameResolver) nenv lookupKind resInfo depth m ad lid typeNameResInfo tcref =
-    let typ = (FreshenTycon ncenv m tcref)
-    typ |> ResolveLongIdentInTypePrim ncenv nenv lookupKind resInfo depth m ad lid IgnoreOverrides typeNameResInfo  
-
-let private ResolveLongIdentInTyconRefs (ncenv:NameResolver) nenv lookupKind depth m ad lid typeNameResInfo idRange tcrefs = 
-    // The basic search
-    tcrefs |> CollectResults (fun (resInfo:ResolutionInfo,tcref) -> 
-        let resInfo = resInfo.AddEntity(idRange,tcref)
-        tcref |> ResolveLongIdentInTyconRef ncenv nenv lookupKind resInfo depth m ad lid typeNameResInfo |> AtMostOneResult m) 
-
-//-------------------------------------------------------------------------
-// ResolveExprLongIdentInModuleOrNamespace 
-//------------------------------------------------------------------------- 
-
-let (|AccessibleEntityRef|_|) ad modref mspec = 
-    let eref = MakeNestedTcref modref mspec
-    if IsEntityAccessible ad eref then Some(eref) else None
-
-
-let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv typeNameResInfo ad resInfo depth m modref (mty:ModuleOrNamespaceType) (lid :ident list) =
-    // resInfo records the modules or namespaces actually relevant to a resolution
-    let g = ncenv.g
-    match lid with 
-    | [] -> raze (InternalError("ResolveExprLongIdentInModuleOrNamespace",m))
-    | id :: rest ->
-        match mty.AllValuesAndMembers.TryFind(id.idText) with
-        | Some vspec when IsValAccessible ad (mk_vref_in_modref modref vspec) -> 
-            success(resInfo,Item_val (mk_vref_in_modref modref vspec),rest)
-        | _->
-        match  TryFindTypeWithUnionCase modref id with
-        | Some tycon when IsTyconReprAccessible ad (MakeNestedTcref modref tycon) -> 
-            let ucref = mk_ucref (MakeNestedTcref modref tycon) id.idText 
-            let ucinfo = FreshenUnionCaseRef ncenv m ucref
-            success (resInfo,Item_ucase ucinfo,rest)
-        | _ -> 
-        match mty.ExceptionDefinitionsByDemangledName.TryFind(id.idText) with
-        | Some excon when IsTyconReprAccessible ad (MakeNestedTcref modref excon) -> 
-            success (resInfo,Item_ecref (MakeNestedTcref modref excon),rest)
-        | _ ->
-
-            (* Something in a type? *)
-            let tyconSearch = 
-                let tcrefs = LookupTypeNameInEntityMaybeHaveArity ad id.idRange id.idText (if nonNil rest then None else snd typeNameResInfo) modref  
-                let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref))
-                if (nonNil rest) then 
-                    let tcrefs = CheckForMultipleGenericTypeAmbiguities tcrefs (ResolveTypeNamesToTypeRefs,None) m 
-                    ResolveLongIdentInTyconRefs ncenv nenv  LookupKind.Expr (depth+1) m ad rest typeNameResInfo id.idRange tcrefs
-                (* check if we've got some explicit type arguments *)
-                else 
-                    let tcrefs = CheckForMultipleGenericTypeAmbiguities tcrefs typeNameResInfo m 
-                    match fst typeNameResInfo with 
-                    | ResolveTypeNamesToTypeRefs -> 
-                        success [ for (resInfo,tcref) in tcrefs do 
-                                      let typ = FreshenTycon ncenv m tcref
-                                      let item = (resInfo,Item_typs(id.idText,[typ]),[])
-                                      yield item ]
-                    | ResolveTypeNamesToCtors -> 
-                        let typs = tcrefs |> List.map (fun (resInfo, tcref) -> resInfo, FreshenTycon ncenv m tcref) 
-                        typs |> CollectResults (fun (resInfo,typ) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad typ) 
-
-            (* Something in a sub-namespace or sub-module *)
-            let moduleSearch = 
-                if (nonNil rest) then 
-                    match mty.ModulesAndNamespacesByDemangledName.TryFind(id.idText) with
-                    | Some(AccessibleEntityRef ad modref submodref) -> 
-                        let resInfo = resInfo.AddEntity(id.idRange,submodref)
-
-                        OneResult (ResolveExprLongIdentInModuleOrNamespace ncenv nenv typeNameResInfo ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType rest)
-                    | _ -> 
-                        NoResultsOrUsefulErrors
-                else 
-                    NoResultsOrUsefulErrors
-
-            AtMostOneResult id.idRange ( tyconSearch +++   moduleSearch +++ raze (UndefinedName(depth,"value, constructor, namespace or type",id,[])))
-
-
-//-------------------------------------------------------------------------
-
-/// Resolve F# "A.B.C" syntax in expressions
-/// Not all of the sequence will necessarily be swallowed, i.e. we return some identifiers 
-/// that may represent further actions, e.g. further lookups. 
-
-let ResolveExprLongIdent (ncenv:NameResolver) m ad nenv typeNameResInfo lid =
-    let g = ncenv.g
-    let resInfo = ResolutionInfo.Empty
-    match lid with 
-    | [] -> error (Error("invalid expression: "^text_of_lid lid, m))
-    | [id] ->
-          // Single identifier.  This is the basic rule: lookup the environment! simple enough 
-          match nenv.eUnqualifiedItems.TryFind(id.idText) with
-          | Some res -> 
-              FreshenUnqualifiedItem ncenv m res, []
-          | None -> 
-              // Check if it's a type name, e.g. a constructor call or a type instantiation 
-              let ctorSearch = 
-                  let tcrefs = LookupTypeNameInEnvMaybeHaveArity id.idText typeNameResInfo nenv
-                  let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref))
-                  let tcrefs = CheckForMultipleGenericTypeAmbiguities tcrefs typeNameResInfo m 
-                  match fst typeNameResInfo with 
-                  | ResolveTypeNamesToCtors ->
-                      let tcrefs = tcrefs |> List.filter (fun (_,tcref) -> tcref.IsILTycon || tcref.IsFSharpObjectModelTycon)
-                      let typs = tcrefs |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) 
-                      typs 
-                          |> CollectResults (fun (resInfo,typ) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad typ) 
-                  | ResolveTypeNamesToTypeRefs ->
-                      let typs = tcrefs |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) 
-                      success (typs |> List.map (fun (resInfo,typ) -> (resInfo,Item_typs(id.idText,[typ]),[])))
-
-
-              let implicitOpSearch = 
-                  if IsMangledOpName id.idText then 
-                      success [(resInfo,Item_implicit_op id,[])] 
-                  else NoResultsOrUsefulErrors
-
-              let failingCase = raze (UndefinedName(0,"value or constructor",id,[]))
-              let search = ctorSearch +++ implicitOpSearch +++ failingCase
-              let resInfo,item,rest = ForceRaise (AtMostOneResult m search)
-              ResolutionInfo.SendToSink(ncenv,nenv,ad,resInfo,(fun () -> CheckAllTyparsInferrable ncenv.g ncenv.amap m item));
-              item,rest
-              
-            
-    // A compound identifier. 
-    // It still might be a value in the environment, or something in an F# module, namespace, typ, or nested type 
-    | id :: rest -> 
-    
-        // Values in the environment take total priority, but contructors do NOT for compound lookups, e.g. if someone in some imported  
-        // module has defined a constructor "String" (common enough) then "String.foo" doesn't give an error saying 'constructors have no members' 
-        // Instead we go lookup the String module or type.
-        let ValIsInEnv nm = 
-            (match nenv.eUnqualifiedItems.TryFind(nm) with Some(Item_val _) -> true | _ -> false)
-
-        if ValIsInEnv id.idText &&
-           (* Workaround for bug 908: adding "int", "float" etc. as functions has broken their use as types, and now System.Int32 etc. have *)
-           (* to be used instead.  Here we are friendly and allow them to be used as types and just give a warning instead. *)
-           (* Here we check that the thing being referenced is indeed a function value, and we know that we're doing a "int.Foo" lookup *)
-           (* which doesn't make sense on a function value, so we give a warning and revert to the old interpretation. *)
-           match nenv.eUnqualifiedItems.[id.idText] with 
-           | Item_val vref when 
-                (let nm = vref.MangledName
-                 (match nm with "string" | "int" | "float" | "float32" | "single" | "double" | "sbyte" | "byte" | "int16" | "uint16" | "int32" | "uint32"  -> true | _ -> false)
-                 && let _,tau = vref.TypeScheme in is_fun_typ g tau)
-                 -> 
-                     warning(Error(sprintf "The standard definition of the identifier '%s' is now a function used to convert values to type '%s', or will be in a future release. Access static methods via the canonical uppercase name for the type, e.g. replace 'int.Parse(...)' with 'System.Int32.Parse(...)'" vref.MangledName vref.MangledName,id.idRange));
-                     false
-           | _ -> true
-        then
-              nenv.eUnqualifiedItems.[id.idText], rest
-        else
-          // Otherwise modules are searched first. REVIEW: modules and types should be searched together. 
-          // For each module referenced by 'id', search the module as if it were an F# module and/or a .NET namespace. 
-          let moduleSearch ad = 
-               ResolveLongIndentAsModuleOrNamespaceThen OpenQualified nenv ad lid 
-                   (ResolveExprLongIdentInModuleOrNamespace ncenv nenv typeNameResInfo ad)
-
-          // REVIEW: somewhat surprisingly, this shows up on performance traces, with tcrefs non-nil.
-          // This seems strange since we would expect in the vast majority of cases tcrefs is empty here.
-          let tyconSearch ad = 
-              let tcrefs = LookupTypeNameInEnvNoArity id.idText nenv
-              let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref))
-              let tcrefs  = CheckForMultipleGenericTypeAmbiguities tcrefs (ResolveTypeNamesToTypeRefs,None) m 
-              ResolveLongIdentInTyconRefs ncenv nenv LookupKind.Expr 1 m ad rest typeNameResInfo id.idRange tcrefs
-
-          let envSearch = 
-              match Map.tryfind id.idText nenv.eUnqualifiedItems with
-              | Some res -> OneSuccess (resInfo,FreshenUnqualifiedItem ncenv m res,rest)
-              | None -> NoResultsOrUsefulErrors
-
-          let search = moduleSearch ad +++ tyconSearch ad +++ envSearch 
-
-          let resInfo,item,rest = 
-              match AtMostOneResult m search with 
-              | Result _ as res -> 
-                  ForceRaise res
-              | _ ->  
-                  let failingCase = raze (UndefinedName(0,"value, namespace, type or module",id,[]))               
-                  ForceRaise (AtMostOneResult m (search +++ moduleSearch AccessibleFromSomeFSharpCode +++ tyconSearch AccessibleFromSomeFSharpCode +++ failingCase))
-          ResolutionInfo.SendToSink(ncenv,nenv,ad,resInfo,(fun () -> CheckAllTyparsInferrable ncenv.g ncenv.amap m item));
-          item,rest
-
-
-//-------------------------------------------------------------------------
-// Resolve F#/IL "." syntax in patterns
-//------------------------------------------------------------------------- 
-
-let rec ResolvePatternLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv numTyArgsOpt ad resInfo depth m modref (mty:ModuleOrNamespaceType) lid =
-    let g = ncenv.g
-    if verbose then  dprintf "--> ResolvePatternLongIdentInModuleOrNamespace edenv, lid = %s@%a\n" (text_of_lid lid) output_range m ;
-    match lid with 
-    | [] -> raze (Error("ResolvePatternLongIdentInModuleOrNamespace edenv",m))
-    | id :: rest ->
-        match TryFindTypeWithUnionCase modref id with
-        | Some tycon when IsTyconReprAccessible ad (MakeNestedTcref modref tycon) -> 
-            let tcref = MakeNestedTcref modref tycon
-            let ucref = mk_ucref tcref id.idText
-            let ucinfo = FreshenUnionCaseRef ncenv m ucref
-            success (resInfo,Item_ucase ucinfo,rest)
-        | _ -> 
-        match mty.ExceptionDefinitionsByDemangledName.TryFind(id.idText) with
-        | Some exnc when IsEntityAccessible ad (MakeNestedTcref modref exnc) -> 
-            success (resInfo,Item_ecref (MakeNestedTcref modref exnc),rest)
-        | _ ->
-        // An active pattern constructor in a module 
-        match (ActivePatternElemsOfModuleOrNamespace modref).TryFind(id.idText) with
-        | Some ( APElemRef(_,vref,_) as apref) when IsValAccessible ad vref -> 
-            success (resInfo,Item_apelem apref,rest)
-        | _ -> 
-        match mty.AllValuesAndMembers.TryFind(id.idText) with
-        | Some vspec  when IsValAccessible ad (mk_vref_in_modref modref vspec) -> 
-            success(resInfo,Item_val (mk_vref_in_modref modref vspec),rest)
-        | _ ->
-        // Something in a type? e.g. a literal field 
-        let tcrefs = LookupTypeNameInEntityMaybeHaveArity ad id.idRange id.idText None modref
-        let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref))
-        let tyconSearch = 
-            match lid with 
-            | tn:: rest when nonNil rest ->
-                ResolveLongIdentInTyconRefs (ncenv:NameResolver) nenv LookupKind.Pattern (depth+1) m ad rest numTyArgsOpt id.idRange tcrefs
-            | _ -> 
-                NoResultsOrUsefulErrors
-        // Constructor of a type? 
-        let ctorSearch = 
-            let typs = tcrefs |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) 
-            typs |> CollectResults (fun (resInfo,typ) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad typ) 
-        // Something in a sub-namespace or sub-module or nested-type 
-        let moduleSearch = 
-            if (nonNil rest) then 
-                match mty.ModulesAndNamespacesByDemangledName.TryFind(id.idText) with
-                | Some(AccessibleEntityRef ad modref submodref) -> 
-                    let resInfo = resInfo.AddEntity(id.idRange,submodref)
-                    OneResult (ResolvePatternLongIdentInModuleOrNamespace ncenv nenv numTyArgsOpt ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType rest)
-                | _ -> 
-                    NoResultsOrUsefulErrors
-             else NoResultsOrUsefulErrors
-        let res = AtMostOneResult id.idRange ( tyconSearch +++   ctorSearch +++ moduleSearch +++ raze (UndefinedName(depth,"constructor, module or namespace",id,[])))
-        res
-        
-exception UpperCaseIdentifierInPattern of range
-type WarnOnUpperFlag = WarnOnUpperCase | AllIdsOK
-
-
-// Long ID in a pattern 
-let ResolvePatternLongIdent (ncenv:NameResolver) warnOnUpper newDef m ad nenv numTyArgsOpt (lid:ident list) =
-    let g = ncenv.g
-    match lid with 
-    // Single identifiers in patterns 
-    | [id] ->
-          // Single identifiers in patterns - bind to constructors and active patterns 
-          // For the special case of 
-          //   let C = x 
-          match nenv.ePatItems.TryFind(id.idText) with
-          | Some res when not newDef  -> FreshenUnqualifiedItem ncenv m res
-          | _ -> 
-          // Single identifiers in patterns - variable bindings 
-          if not newDef &&
-             (warnOnUpper = WarnOnUpperCase) && 
-             id.idText.Length >= 3 && 
-             System.Char.ToLowerInvariant id.idText.[0] <> id.idText.[0] then 
-            warning(UpperCaseIdentifierInPattern(m));
-          Item_newdef id
-        
-    // Long identifiers in patterns 
-    | _ -> 
-        if verbose then  dprintf "--> ResolvePatternLongIdent, lid = %s@%a\n" (text_of_lid lid) output_range m ;
-        let moduleSearch ad = 
-            ResolveLongIndentAsModuleOrNamespaceThen OpenQualified nenv ad lid 
-                (ResolvePatternLongIdentInModuleOrNamespace ncenv nenv numTyArgsOpt ad)
-        let tyconSearch ad = 
-            match lid with 
-            | tn:: rest when nonNil rest ->
-                let tcrefs = LookupTypeNameInEnvNoArity tn.idText nenv
-                let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref))
-                ResolveLongIdentInTyconRefs ncenv nenv LookupKind.Pattern 1 tn.idRange ad rest numTyArgsOpt tn.idRange tcrefs 
-            | _ -> 
-                NoResultsOrUsefulErrors
-        let resInfo,res,rest = 
-            match AtMostOneResult m (tyconSearch ad +++  moduleSearch ad) with 
-            | Result _ as res -> ForceRaise res
-            | _ ->  
-                ForceRaise (AtMostOneResult m (tyconSearch AccessibleFromSomeFSharpCode +++ moduleSearch AccessibleFromSomeFSharpCode))
-        ResolutionInfo.SendToSink(ncenv,nenv,ad,resInfo,(fun () -> true));
-  
-        if nonNil rest then error(Error("this is not a constructor or literal, or a constructor is being used incorrectly",(List.hd rest).idRange));
-        res
-
-
-//-------------------------------------------------------------------------
-// Resolve F#/IL "." syntax in types
-//------------------------------------------------------------------------- 
-
-let rec ResolveTypeLongIdentInTypePrim (ncenv:NameResolver) typeNameResInfo ad resInfo depth m tcref (lid: ident list) =
-    match lid with 
-    | [] -> error(Error("Unexpected empty long identifier",m))
-    | [id] -> 
-        let tcrefs = LookupTypeNameInEntityMaybeHaveArity ad id.idRange id.idText (snd typeNameResInfo) tcref 
-        let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref))
-        let tcrefs = CheckForMultipleGenericTypeAmbiguities tcrefs typeNameResInfo m 
-        match tcrefs with 
-        | tcref :: _ -> success tcref
-        | [] -> raze (UndefinedName(depth,"type",id,[]))
-    | id::rest ->
-        // Search nested types
-        let tyconSearch = 
-            let tcrefs = LookupTypeNameInEntityMaybeHaveArity ad id.idRange id.idText None tcref
-            let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref))
-            let tcrefs  = CheckForMultipleGenericTypeAmbiguities tcrefs (fst typeNameResInfo,None) m 
-            tcrefs |> CollectResults (fun (resInfo,tcref) -> ResolveTypeLongIdentInTypePrim ncenv typeNameResInfo ad resInfo (depth+1) m tcref rest)
-        AtMostOneResult m tyconSearch
-
-let ResolveTypeLongIdentInType (ncenv:NameResolver) nenv typeNameResInfo ad m tcref (lid: ident list) =
-    let resInfo,tcref = ForceRaise (ResolveTypeLongIdentInTypePrim ncenv typeNameResInfo ad ResolutionInfo.Empty 0 m tcref lid)
-    ResolutionInfo.SendToSink(ncenv,nenv,ad,resInfo,(fun () -> true));
-    tcref
-
-
-let rec private ResolveTypeLongIdentInModuleOrNamespace (ncenv:NameResolver) typeNameResInfo ad (resInfo:ResolutionInfo) depth m modref mty (lid: ident list) =
-    let g = ncenv.g
-    match lid with 
-    | [] -> error(Error("Unexpected empty long identifier",m))
-    | [id] -> 
-        // On all paths except error reporting we have isSome(numTyargsOpt), hence get at most one result back 
-        let tcrefs = LookupTypeNameInEntityMaybeHaveArity ad id.idRange id.idText (snd typeNameResInfo) modref  
-        if nonNil tcrefs then
-            tcrefs |> CollectResults (fun tcref -> success(resInfo,tcref))
-        else 
-            raze (UndefinedName(depth,"type",id,[]))
-    | id::rest ->
-        let modulSearch = 
-            match modref.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName.TryFind(id.idText) with
-            | Some(AccessibleEntityRef ad modref submodref) -> 
-                let resInfo = resInfo.AddEntity(id.idRange,submodref)
-                ResolveTypeLongIdentInModuleOrNamespace ncenv typeNameResInfo ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType rest
-            | _ ->  
-                raze (UndefinedName(depth,"module or namespace",id,[]))
-        let tyconSearch = 
-            let tcrefs = LookupTypeNameInEntityMaybeHaveArity ad id.idRange id.idText None modref
-            tcrefs |> CollectResults (fun tcref -> ResolveTypeLongIdentInTypePrim ncenv typeNameResInfo ad resInfo (depth+1) m tcref rest)
-        tyconSearch +++ modulSearch
-
-let ResolveTypeLongIdentPrim (ncenv:NameResolver) fullyQualified m nenv ad (lid: ident list) ntyargs =
-    let g = ncenv.g
-    match lid with 
-    | [] -> error(Error("Unexpected empty long identifier",m))
-    | [id]  ->  
-        match LookupTypeNameInEnvHaveArity id.idText ntyargs nenv with
-        | Some res -> success(ResolutionInfo.Empty,res)
-        | None -> 
-            (* For Good Error Reporting! *)
-            let tcrefs = LookupTypeNameInEnvNoArity id.idText nenv
-            match tcrefs with
-            | tcref :: tcrefs -> 
-                // Note: This path is only for error reporting
-                //CheckForMultipleGenericTypeAmbiguities tcref rest typeNameResInfo m;
-                success(ResolutionInfo.Empty,tcref)
-            | [] -> 
-                raze (UndefinedName(0,"type",id,NameMap.domainL nenv.eTyconsByAccessNames))
-    | id::rest ->
-        let typeNameResInfo = (ResolveTypeNamesToTypeRefs,Some(ntyargs))
-        let tyconSearch = 
-            match LookupTypeNameInEnvHaveArity id.idText ntyargs nenv with
-            | Some tcref when IsEntityAccessible ad tcref -> 
-                OneResult (ResolveTypeLongIdentInTypePrim ncenv typeNameResInfo ad ResolutionInfo.Empty 1 m tcref rest)
-            | _ -> 
-                NoResultsOrUsefulErrors
-        let modulSearch = 
-            ResolveLongIndentAsModuleOrNamespaceThen fullyQualified nenv ad lid 
-                (ResolveTypeLongIdentInModuleOrNamespace ncenv typeNameResInfo ad)
-            |?> (fun res -> List.concat res)
-
-        let modulSearchFailed = 
-            ResolveLongIndentAsModuleOrNamespaceThen fullyQualified nenv AccessibleFromSomeFSharpCode lid 
-                (ResolveTypeLongIdentInModuleOrNamespace ncenv (ResolveTypeNamesToTypeRefs,None) ad)
-            |?> (fun res -> List.concat res)
-(*
-        let tyconSearchFailed = 
-            (* For Good Error Reporting! *)
-            match LookupTypeNameInEnvNoArity id.idText nenv with 
-            | [] -> NoResultsOrUsefulErrors
-            | tcrefs -> success(tcrefs)
-*)
-        match tyconSearch +++ modulSearch with 
-        | Result results -> 
-            // NOTE: we delay checking the CheckForMultipleGenericTypeAmbiguities condition until right at the end after we've
-            // collected all possible resolutions of the type
-            let tcrefs = CheckForMultipleGenericTypeAmbiguities results typeNameResInfo m 
-            match tcrefs with 
-            | (resInfo,tcref) :: _ -> 
-                // We've already reported the ambiguity, possibly as an error. Now just take the first possible result.
-                success(resInfo,tcref)
-            | [] -> 
-                // failing case - report nice ambiguity errors even in this case
-                AtMostOneResult m ((tyconSearch +++ modulSearch +++ modulSearchFailed) |?> (fun tcrefs -> CheckForMultipleGenericTypeAmbiguities tcrefs typeNameResInfo m))
-            
-        | _ ->  
-            // failing case - report nice ambiguity errors even in this case
-            AtMostOneResult m ((tyconSearch +++ modulSearch +++ modulSearchFailed) |?> (fun tcrefs -> CheckForMultipleGenericTypeAmbiguities tcrefs typeNameResInfo m))
-
-
-let ResolveTypeLongIdent (ncenv:NameResolver) occurence fullyQualified nenv ad (lid: ident list) ntyargs =
-    let m = range_of_lid lid
-    let res = ResolveTypeLongIdentPrim ncenv fullyQualified m nenv ad lid ntyargs 
-    // Register the result as a name resolution
-    match res with 
-    | Result (resInfo,tcref) -> 
-        ResolutionInfo.SendToSink(ncenv,nenv,ad,resInfo,(fun () -> true));
-        CallNameResolutionSink(m,nenv,Item_typs(tcref.DisplayName,[FreshenTycon ncenv m tcref]),occurence,nenv.eDisplayEnv,ad)
-    | _ -> ()
-    res |?> snd
-
-//-------------------------------------------------------------------------
-// Resolve F#/IL "." syntax in records etc.
-//------------------------------------------------------------------------- 
-
-exception DeprecatedClassFieldInference of range
-
-let rec ResolveFieldInModuleOrNamespace (ncenv:NameResolver) nenv ad (resInfo:ResolutionInfo) depth m modref mty lid = 
-    let typeNameResInfo = DefaultTypeNameResInfo
-    let g = ncenv.g
-    if verbose then  dprintf "--> ResolveFieldInModuleOrNamespace edenv, lid = %s@%a\n" (text_of_lid lid) output_range m ;
-    match lid with 
-    | id::rest -> 
-        let error = raze (UndefinedName(depth,"record label or namespace",id,[]))
-        (* search for module-qualified names, e.g. { Microsoft.FSharp.Core.contents = 1 } *)
-        let modulScopedFieldNames = 
-            match TryFindTypeWithRecdField mty id  with
-            | Some tycon when IsEntityAccessible ad (MakeNestedTcref modref tycon) -> 
-                success(mk_rfref_in_tcref modref tycon id, rest)
-            | _ -> error
-        // search for type-qualified names, e.g. { Microsoft.FSharp.Core.Ref.contents = 1 } 
-        let tyconSearch = 
-            match lid with 
-            | tn:: rest when nonNil rest ->
-                let tcrefs = LookupTypeNameInEntityMaybeHaveArity ad id.idRange id.idText None modref
-                let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref))
-                let tyconSearch = ResolveLongIdentInTyconRefs ncenv nenv LookupKind.RecdField  (depth+1) m ad rest typeNameResInfo id.idRange tcrefs
-                // choose only fields 
-                let tyconSearch = tyconSearch |?> List.choose (function (_,Item_recdfield(RecdFieldInfo(_,rfref)),rest) -> Some(rfref,rest) | _ -> None)
-                tyconSearch
-            | _ -> 
-                NoResultsOrUsefulErrors
-        (* search for names in nested modules, e.g. { Microsoft.FSharp.Core.contents = 1 } *)
-        let modulSearch = 
-            if nonNil rest then 
-                match mty.ModulesAndNamespacesByDemangledName.TryFind(id.idText) with
-                | Some(AccessibleEntityRef ad modref submodref) -> 
-                    let resInfo = resInfo.AddEntity(id.idRange,submodref)
-                    ResolveFieldInModuleOrNamespace ncenv nenv ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType  rest 
-                | _ -> 
-                    error
-            else error
-        AtMostOneResult m (OneResult modulScopedFieldNames +++ tyconSearch +++ OneResult modulSearch)
-    | [] -> failwith "ResolveFieldInModuleOrNamespace edenv"
-
-let ResolveField (ncenv:NameResolver) nenv ad typ (mp,id:ident) =
-    let typeNameResInfo = DefaultTypeNameResInfo
-    let g = ncenv.g
-    let m = id.idRange
-    match mp with 
-    | [] -> 
-        if is_stripped_tyapp_typ g typ then 
-            match ncenv.InfoReader.TryFindRecdFieldInfoOfType(id.idText,m,typ) with
-            | Some (RecdFieldInfo(_,rfref)) -> [(rfref,true)]
-            | None -> error(Error(sprintf "The type %s does not contain a field %s" (NicePrint.pretty_string_of_typ nenv.eDisplayEnv typ) id.idText,m))
-        else 
-            let frefs = tryname "record label" nenv.eFieldLabels id 
-            (* Eliminate duplicates arising from multiple 'open' *)
-            let frefs = frefs |> ListSet.setify (fun (fref1,_) (fref2,_) -> tcref_eq g fref1.TyconRef fref2.TyconRef)
-            frefs
-                        
-    | _ -> 
-        let lid = (mp@[id])
-        let tyconSearch ad = 
-            match lid with 
-            | tn:: (_ :: _ as rest) -> 
-                let m = tn.idRange
-                let tcrefs = LookupTypeNameInEnvNoArity tn.idText nenv
-                let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref))
-                let tyconSearch = ResolveLongIdentInTyconRefs ncenv nenv LookupKind.RecdField 1 m ad rest typeNameResInfo tn.idRange tcrefs
-                // choose only fields 
-                let tyconSearch = tyconSearch |?> List.choose (function (_,Item_recdfield(RecdFieldInfo(_,rfref)),rest) -> Some(rfref,rest) | _ -> None)
-                tyconSearch
-            | _ -> NoResultsOrUsefulErrors
-        let modulSearch ad = 
-            ResolveLongIndentAsModuleOrNamespaceThen OpenQualified nenv ad lid 
-                (ResolveFieldInModuleOrNamespace ncenv nenv ad)
-        let item,rest = ForceRaise (AtMostOneResult m (modulSearch ad +++ tyconSearch ad +++ modulSearch AccessibleFromSomeFSharpCode +++ tyconSearch AccessibleFromSomeFSharpCode))
-        if nonNil rest then errorR(Error("invalid field label",(List.hd rest).idRange));
-        [(item,true)]
-
-/// Generate a new reference to a record field with a fresh type instantiation
-let FreshenRecdFieldRef (ncenv:NameResolver) m (rfref:RecdFieldRef) =
-    Item_recdfield(RecdFieldInfo(ncenv.instantiationGenerator m (rfref.Tycon.Typars(m)), rfref))
-
-
-
-/// Resolve F#/IL "." syntax in expressions (2).
-/// We have an expr. on the left, and we do an access, e.g. 
-/// (f obj).field or (f obj).meth.  The basic rule is that if l-r type 
-/// inference has determined the outer type then we can proceed in a simple fashion. The exception 
-/// to the rule is for field types, which applies if l-r was insufficient to 
-/// determine any valid members 
-//
-// QUERY (instantiationGenerator cleanup): it would be really nice not to flow instantiationGenerator to here. 
-let private ResolveExprDotLongIdent (ncenv:NameResolver) m ad nenv typ lid findFlag =
-    let g = ncenv.g
-    let typeNameResInfo = DefaultTypeNameResInfo
-    let adhoctDotSearchAccessible = AtMostOneResult m (ResolveLongIdentInTypePrim ncenv nenv LookupKind.Expr ResolutionInfo.Empty 1 m ad lid findFlag typeNameResInfo typ)
-    match adhoctDotSearchAccessible with 
-    | Exception _ ->
-        // If the dot is not resolved by adhoc overloading then look for a record field 
-        // that can resolve the name. 
-        let dotFieldIdSearch = 
-            match lid with 
-            // A unique record label access, e.g  expr.field  
-            | id::rest when nenv.eFieldLabels.ContainsKey(id.idText) -> 
-                match nenv.eFieldLabels.[id.idText] with
-                | [] -> NoResultsOrUsefulErrors
-                | (rfref,isRecdField) :: _ ->
-                    if not isRecdField then errorR(DeprecatedClassFieldInference(m));
-                    // NOTE (instantiationGenerator cleanup): we need to freshen here because we don't know the type. 
-                    // But perhaps the caller should freshen?? 
-                    let item = FreshenRecdFieldRef ncenv m rfref
-                    OneSuccess (ResolutionInfo.Empty,item,rest)
-            | _ -> NoResultsOrUsefulErrors 
-        
-        // A unique record label access qualified by a module, e.g  expr.Module.field
-        // Really for OCaml compat. only 
-        let moduleFieldIdSearch =
-            match lid with 
-            | id::(_ :: _ as rest) when nenv.eModulesAndNamespaces.ContainsKey(id.idText) ->
-                ResolveLongIndentAsModuleOrNamespaceThen OpenQualified nenv ad lid 
-                    (ResolveFieldInModuleOrNamespace ncenv nenv ad)
-                (* QUERY: should caller freshen? *)
-                |?> List.map (fun (rfref,rest) -> 
-                       warning(OCamlCompatibility("This lookup resolves to a record field by using the syntax 'expr.Module.field'. Although this is allowed for OCaml compatibility, the style is considered deprecated for F#. Consider using a simple field lookup 'expr.field', perhaps with an annotation to constrain the type of 'expr'",m));
-                       (ResolutionInfo.Empty,FreshenRecdFieldRef ncenv m rfref,rest))
-            | _  -> NoResultsOrUsefulErrors
-        let search = dotFieldIdSearch +++ moduleFieldIdSearch
-        match AtMostOneResult m search with 
-        | Result _ as res -> ForceRaise res
-        | _ -> 
-            let adhoctDotSearchAll = ResolveLongIdentInTypePrim ncenv nenv LookupKind.Expr ResolutionInfo.Empty 1 m AccessibleFromSomeFSharpCode lid findFlag typeNameResInfo typ 
-            ForceRaise (AtMostOneResult m (search +++ adhoctDotSearchAll))
-
-    | Result _ -> 
-        ForceRaise adhoctDotSearchAccessible
-
-let ComputeItemRange wholem (lid: ident list) rest =
-    match rest with
-    | [] -> wholem
-    | _ -> 
-        let ids,_ = List.chop (max 0 (lid.Length - rest.Length)) lid
-        match ids with 
-        | [] -> wholem
-        | _ -> range_of_lid ids
-
-/// Filters method groups that will be sent to Visual Studio IntelliSense
-/// to include only static/instance members
-let filterMethodGroups (ncenv:NameResolver) itemRange item staticOnly =
-    match item with
-    | Item_meth_group(nm, minfos) -> 
-        let minfos = minfos |> List.filter  (fun minfo -> 
-           staticOnly = (ObjTypesOfMethInfo ncenv.amap itemRange minfo minfo.FormalMethodInst |> isNil))
-        Item_meth_group(nm, minfos)
-    | item -> item
-
-/// Called for 'TypeName.Bar' - for VS IntelliSense, we can filter out instance members from method groups
-let ResolveLongIdentAsExprAndComputeRange (ncenv:NameResolver) wholem ad nenv typeNameResInfo lid = 
-    let item,rest = ResolveExprLongIdent ncenv wholem ad nenv typeNameResInfo lid
-    let itemRange = ComputeItemRange wholem lid rest
-    
-    // Record the precise resolution of the field for intellisense
-    CallNameResolutionSink(itemRange, nenv, filterMethodGroups ncenv itemRange item true, ItemOccurence.Use, nenv.DisplayEnv, ad);
-    item, itemRange, rest
-
-/// Called for 'expression.Bar' - for VS IntelliSense, we can filter out static members from method groups
-let ResolveExprDotLongIdentAndComputeRange (ncenv:NameResolver) wholem ad nenv typ lid findFlag = 
-    let resInfo,item,rest = ResolveExprDotLongIdent ncenv wholem ad nenv typ lid findFlag
-    let itemRange = ComputeItemRange wholem lid rest
-    ResolutionInfo.SendToSink(ncenv,nenv,ad,resInfo,(fun () -> CheckAllTyparsInferrable ncenv.g ncenv.amap itemRange item));
-    
-    // Record the precise resolution of the field for intellisense
-    CallNameResolutionSink(itemRange, nenv, filterMethodGroups ncenv itemRange item false, ItemOccurence.Use, nenv.DisplayEnv, ad);
-    item, itemRange, rest
-
-//-------------------------------------------------------------------------
-// Given an nenv resolve partial paths to sets of names, used by interactive
-// environments (Visual Studio)
-//
-// ptc = partial type check
-// ptci = partial type check item
-//
-// There are some inefficiencies in this code - e.g. we often 
-// create potentially large lists of methods/fields/properties and then
-// immiediately List.filter them.  We also use lots of "map/concats".  Dosen't
-// seem to hit the interactive experience too badly though.
-//------------------------------------------------------------------------- 
-
-let FakeInstantiationGenerator (m:range) gps = List.map mk_typar_ty gps 
-
-// note: making local refs is ok since it is only used by VS 
-let ptci_of_vref v = Item_val(v)
-let ptci_of_ucref v = Item_ucase v
-let ptci_of_ecref v = Item_ecref v
-let ptci_of_submodul v = Item_modrefs [v]
-let ptci_of_recdfield v = Item_recdfield v
-let ptci_of_il_finfo finfo = Item_il_field finfo
-let ptci_of_einfo x = Item_event x
-let ptci_of_pinfo (pinfo:PropInfo) = Item_property (pinfo.PropertyName,[pinfo])
-let ptci_of_minfos (nm,minfos) = MakeMethGroup(nm,minfos)
-
-let IsTyconUnseenObsoleteSpec ad g m (x:TyconRef) allowObsolete = 
-    not (IsEntityAccessible ad x) ||
-    ((not allowObsolete) &&
-      (if x.IsILTycon then 
-          CheckILAttribsForUnseen g x.ILTyconRawMetadata.tdCustomAttrs m
-       else 
-          CheckAttribsForUnseen g x.Attribs m))
-
-let IsTyconUnseen ad g m (x:TyconRef) = IsTyconUnseenObsoleteSpec ad g m x false
-
-let IsValUnseen ad g m (v:ValRef) = 
-    not (IsValAccessible ad v) ||
-    v.IsCompilerGenerated ||
-    CheckAttribsForUnseen g v.Attribs m
-
-let IsUnionCaseUnseen ad g m (ucref:UnionCaseRef) = 
-    not (IsUnionCaseAccessible ad ucref) ||
-    IsTyconUnseen ad g m ucref.TyconRef || 
-    CheckAttribsForUnseen g ucref.Attribs m
-
-let ItemIsUnseen ad g m item = 
-    match item with 
-    | Item_val x -> IsValUnseen ad  g m x
-    | Item_ucase x -> IsUnionCaseUnseen ad g m x.UnionCaseRef
-    | Item_ecref x -> IsTyconUnseen ad g m x
-    | _ -> false
-
-let ptci_of_tycon ncenv m (x:TyconRef) = 
-    Item_typs (x.DisplayName,[FreshenTycon ncenv m x])
-
-let ptci_of_typ g x = 
-    let nm = if is_stripped_tyapp_typ g x then (tcref_of_stripped_typ g x).DisplayName else "?"
-    Item_typs (nm,[x])
-
-// Filter out 'PrivateImplementationDetail' classes 
-let IsInterestingModuleName nm =
-    String.length nm >= 1 &&
-    String.sub nm 0 1 <> "<"
-
-let rec PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f plid (modref:ModuleOrNamespaceRef) =
-    if verbose then  dprintf "PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen, plid = %s\n" (text_of_path plid); 
-    let mty = modref.ModuleOrNamespaceType
-    match plid with 
-    | [] -> f modref
-    | id:: rest -> 
-        match mty.ModulesAndNamespacesByDemangledName.TryFind(id) with
-        | Some mty -> PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f rest (MakeNestedTcref modref mty) 
-        | None -> []
-
-let PartialResolveLongIndentAsModuleOrNamespaceThen (nenv:NameResolutionEnv) plid f =
-    if verbose then  dprintf "PartialResolveLongIndentAsModuleOrNamespaceThen, plid = %s\n" (text_of_path plid); 
-    match plid with 
-    | id:: rest -> 
-        match Map.tryfind id nenv.eModulesAndNamespaces with
-        | Some(modrefs) -> 
-            List.collect (PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f rest) modrefs
-        | None ->
-            []
-    | [] -> []
-
-let ResolveCompletionsInType (ncenv: NameResolver) nenv m ad statics typ =
-    let g = ncenv.g
-    let amap = ncenv.amap
-    let rfinfos = 
-        if is_stripped_tyapp_typ g typ then 
-            let tc,tinst = dest_stripped_tyapp_typ g typ
-            (all_rfrefs_of_tcref tc)
-            |> List.filter (IsRecdFieldAccessible ad)
-            |> List.filter (fun fref -> fref.RecdField.IsStatic = statics)
-            |> List.filter (fun fref -> not fref.RecdField.IsCompilerGenerated)
-            |> List.map (fun fref -> RecdFieldInfo(tinst,fref)) 
-        else []
-
-    let ucinfos = 
-        if statics  && is_stripped_tyapp_typ g typ then 
-            let tc,tinst = dest_stripped_tyapp_typ g typ
-            ucrefs_of_tcref tc 
-            |> List.filter (IsUnionCaseUnseen ad g m >> not)
-            |> List.map (fun ucref ->  Item_ucase(UnionCaseInfo(tinst,ucref)))
-        else []
-
-    let einfos = 
-        ncenv.InfoReader.GetILEventInfosOfType(None,ad,m,typ)
-        |> List.filter (IsILEventInfoAccessible g amap m ad)
-        |> List.map (fun x -> ILEvent(g,x))
-        |> List.filter (fun x -> 
-            IsStandardEventInfo ncenv.InfoReader m ad x &&
-            x.IsStatic = statics)
-
-    let nestedTypes = 
-        typ
-        |> GetNestedTypesOfType ad ncenv (None,None) m 
-
-    let finfos = 
-        ncenv.InfoReader.GetILFieldInfosOfType(None,ad,m,typ)
-        |> List.filter (fun (ILFieldInfo(ty,fld) as x) -> 
-            fld.fdSpecialName = false &&
-            x.IsStatic = statics && 
-            IsILFieldInfoAccessible g amap m ad x)
-
-    let pinfos = 
-        AllPropInfosOfTypeInScope ncenv.InfoReader nenv.eExtensionMembers (None,ad) IgnoreOverrides m typ
-        |> List.filter (fun x -> 
-            x.IsStatic = statics && 
-            not (PropInfoIsUnseen m x) &&
-            IsPropInfoAccessible g amap m ad x)
-
-    // Exclude get_ and set_ methods accessed by properties 
-    let pinfoMethNames = 
-      (pinfos 
-       |> List.filter PropInfo.HasGetter
-       |> List.map (fun pinfo -> pinfo.GetterMethod.LogicalName))
-      @
-      (pinfos 
-       |> List.filter PropInfo.HasSetter
-       |> List.map (fun pinfo -> pinfo.SetterMethod.LogicalName))
-    
-    let einfoMethNames = 
-        [ for e in einfos do 
-             match e with 
-             | ILEvent(_, e) -> 
-                 yield e.AddMethod.ILName
-                 yield e.RemoveMethod.ILName
-             | _ -> 
-                 () ]
-
-    let names = Zset.addList pinfoMethNames (Zset.addList einfoMethNames (Zset.empty String.order))
-
-    let minfo_filter (minfo:MethInfo) = 
-        // Only show the Finalize, MemberwiseClose etc. methods on System.Object for values whose static type really is 
-        // System.Object. Few of these are typically used from F#.  
-        (type_equiv g typ g.obj_ty 
-         || minfo.LogicalName = "GetType" 
-         || minfo.LogicalName = "GetHashCode" 
-         || minfo.LogicalName = "ToString" 
-         || (minfo.IsInstance && minfo.LogicalName = "Equals")
-         || not (type_equiv g minfo.EnclosingType g.obj_ty)) &&
-        not minfo.IsInstance = statics &&
-        IsMethInfoAccessible amap m ad minfo &&
-        not (MethInfoIsUnseen g m minfo) &&
-        not minfo.IsConstructor &&
-        not minfo.IsClassConstructor &&
-        not (names.Contains minfo.LogicalName)
-    
-    // REVIEW: add a name List.filter here in the common cases?
-    let minfos = 
-        AllMethInfosOfTypeInScope ncenv.InfoReader nenv.eExtensionMembers (None,ad) IgnoreOverrides m typ 
-        |> List.filter minfo_filter
-
-    // Partition methods into overload sets
-    let rec partitionl (l:MethInfo list) acc = 
-        match l with
-        | [] -> acc
-        | h::t -> 
-            let nm = h.LogicalName
-            partitionl t (NameMultiMap.add nm h acc)
-
-    // Build the results
-    ucinfos @
-    List.map ptci_of_recdfield rfinfos @
-    List.map ptci_of_pinfo pinfos @
-    List.map ptci_of_il_finfo finfos @
-    List.map ptci_of_einfo einfos @
-    List.map (ptci_of_typ g) nestedTypes @
-    List.map ptci_of_minfos (NameMap.to_list (partitionl minfos Map.empty))
-      
-
-let rec ResolvePartialLongIdentInType (ncenv: NameResolver) nenv m ad statics plid typ =
-    let g = ncenv.g
-    let amap = ncenv.amap
-    if verbose then   dprintf "ResolvePartialLongIdentInType , typ = '%s', plid = '%s'\n" (NicePrint.pretty_string_of_typ (empty_denv g) typ) (text_of_path plid);
-    match plid with
-    | [] -> ResolveCompletionsInType ncenv nenv m ad statics typ
-    | id :: rest ->
-  
-      let rfinfos = 
-        if is_stripped_tyapp_typ g typ then 
-            let tc,tinst = dest_stripped_tyapp_typ g typ
-            (all_rfrefs_of_tcref tc)
-            |> List.filter (IsRecdFieldAccessible ad)
-            |> List.filter (fun fref -> fref.RecdField.IsStatic = statics)
-            |> List.filter (fun fref -> not fref.RecdField.IsCompilerGenerated)
-            |> List.map (fun fref -> RecdFieldInfo(tinst,fref)) 
-        else 
-            []
-  
-      let nestedTypes = 
-          typ 
-          |> GetNestedTypesOfType ad ncenv (Some(id),None) m  
-
-      let ucinfos = 
-          if statics && is_stripped_tyapp_typ g typ then 
-              let tc,tinst = dest_stripped_tyapp_typ g typ
-              ucrefs_of_tcref tc
-              |> List.filter (IsUnionCaseUnseen ad g m >> not)
-              |> List.map (fun ucref ->  Item_ucase(UnionCaseInfo(tinst,ucref))) 
-          else []
- 
-      // e.g. .. 
-      (rfinfos |> List.filter (fun x -> x.Name = id)
-               |> List.collect (fun x -> x.FieldType |> ResolvePartialLongIdentInType ncenv nenv m ad false rest)) @
-
-      // e.g. .. 
-      (typ
-         |> AllPropInfosOfTypeInScope ncenv.InfoReader nenv.eExtensionMembers (Some(id),ad) IgnoreOverrides m 
-         |> List.filter (fun x -> x.IsStatic = statics)
-         |> List.filter (IsPropInfoAccessible g amap m ad) 
-         |> List.collect (PropertyTypeOfPropInfo amap m >> ResolvePartialLongIdentInType ncenv nenv m ad false rest)) @
-
-      // e.g. .. 
-      (ncenv.InfoReader.GetILEventInfosOfType(Some(id),ad,m,typ)
-         |> List.map (fun x -> ILEvent(g,x))
-         |> List.collect (PropTypOfEventInfo ncenv.InfoReader m ad >> ResolvePartialLongIdentInType ncenv nenv m ad false rest)) @
-
-      // nested types! 
-      (nestedTypes 
-         |> List.collect (ResolvePartialLongIdentInType ncenv nenv m ad statics rest)) @
-
-      // e.g. .. 
-      (ncenv.InfoReader.GetILFieldInfosOfType(Some(id),ad,m,typ)
-         |> List.filter (fun x -> 
-             not x.RawMetadata.fdSpecialName &&
-             x.IsStatic = statics && 
-             IsILFieldInfoAccessible g amap m ad x)
-         |> List.collect (FieldTypeOfILFieldInfo amap m >> ResolvePartialLongIdentInType ncenv nenv m ad false rest))
-     
-let ptcis_of_tycon_ctors (ncenv:NameResolver) m ad (tcref:TyconRef) = 
-    let g = ncenv.g
-    let amap = ncenv.amap
-    // Don't show constructors for type abbreviations. See FSharp 1.0 bug 2881
-    if tcref.IsTypeAbbrev then 
-        []
-    else 
-        let typ = FreshenTycon ncenv m tcref
-        match ResolveObjectConstructor ncenv (empty_denv g) m ad typ with 
-        | Result (item,_) -> 
-            begin match item with 
-            | Item_ctor_group(nm,cinfos) -> 
-                cinfos 
-                |> List.filter (IsMethInfoAccessible amap m ad)
-                |> List.filter (MethInfoIsUnseen g m >> not)
-                |> List.map (fun minfo -> MakeCtorGroup(nm,[minfo])) 
-            | item -> 
-                [item]
-            end
-        | Exception _ -> []
-
-(* import.ml creates somewhat fake modules for nested members of types (so that *)
-(* types never contain other types) *)
-let not_fake_container_modul tyconNames nm = 
-  not (Set.mem nm tyconNames)
-
-/// Check is a namesapce or module contains something accessible 
-let rec private EntityRefContainsSomethingAccessible (ncenv: NameResolver) m ad (modref:ModuleOrNamespaceRef) = 
-    let g = ncenv.g
-    let mty = modref.ModuleOrNamespaceType
-
-    // Search the values in the module for an accessible value 
-    // BUG: we're not applying accessibility checks here, just looking for any value 
-    (mty.AllValuesAndMembers
-     |> NameMap.exists (fun _ v -> 
-         let vref = mk_vref_in_modref modref v
-         not vref.IsCompilerGenerated && 
-         not (IsValUnseen ad g m vref) &&
-         isNone(vref.MemberInfo))) ||
-
-    // Search the types in the namespace/module for an accessible tycon 
-    (mty.AllEntities 
-     |> NameMap.exists (fun _ tc ->  
-          not tc.IsModuleOrNamespace && 
-          not (IsTyconUnseen ad g m (MakeNestedTcref modref tc)))) ||
-
-    // Search the sub-modules of the namespace/modulefor something accessible 
-    (mty.ModulesAndNamespacesByDemangledName 
-     |> NameMap.exists (fun _ submod -> 
-        let submodref = MakeNestedTcref modref submod
-        EntityRefContainsSomethingAccessible ncenv m ad submodref)) 
-
-let rec ResolvePartialLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv m ad (modref:ModuleOrNamespaceRef) plid allowObsolete =
-    let g = ncenv.g
-    let amap = ncenv.amap
-    if verbose then   dprintf "ResolvePartialLongIdentInModuleOrNamespace, plid = %s\n" (text_of_path plid); 
-    let mty = modref.ModuleOrNamespaceType
-    
-    let tycons = 
-        mty.TypeDefinitions
-        |> List.filter (fun tycon -> not (IsTyconUnseen ad g m (MakeNestedTcref modref tycon)))
-
-    let iltyconNames = 
-        mty.TypesByAccessNames
-        |> NameMultiMap.range
-        |> List.choose (fun (tycon:Tycon) -> if tycon.IsILTycon then Some(tycon.DisplayName) else None)
-        |> Set.of_seq      
-    
-    match plid with 
-    | [] -> 
-
-         // Collect up the accessible values in the module, excluding the members
-         (mty.AllValuesAndMembers
-          |> NameMap.range
-          |> List.map (mk_vref_in_modref modref)
-          |> List.filter (fun v -> v.MemberInfo.IsNone)
-          |> List.filter (IsValUnseen ad g m >> not) 
-          |> List.map ptci_of_vref)
-
-         // Collect up the accessible discriminated union cases in the module 
-       @ (UnionCaseRefsInModuleOrNamespace modref 
-          |> List.filter (IsUnionCaseUnseen ad g m >> not)
-          |> List.map GeneralizeUnionCaseRef 
-          |> List.map ptci_of_ucref)
-
-         // Collect up the accessible active patterns in the module 
-       @ (ActivePatternElemsOfModuleOrNamespace modref 
-          |> NameMap.range
-          |> List.filter (fun apref -> apref.ActivePatternVal |> IsValUnseen ad g m |> not) 
-          |> List.map Item_apelem)
-
-
-         // Collect up the accessible F# exception declarations in the module 
-       @ (mty.ExceptionDefinitionsByDemangledName 
-          |> NameMap.range 
-          |> List.map (MakeNestedTcref modref)
-          |> List.filter (IsTyconUnseen ad g m >> not)
-          |> List.map ptci_of_ecref)
-
-         // Collect up the accessible sub-modules 
-       @ (mty.ModulesAndNamespacesByDemangledName 
-          |> NameMap.range 
-          |> List.filter (demangled_name_of_modul >> not_fake_container_modul iltyconNames)
-          |> List.filter (demangled_name_of_modul >> IsInterestingModuleName)
-          |> List.map (MakeNestedTcref modref)
-          |> List.filter (IsTyconUnseen ad g m >> not)
-          |> List.filter (EntityRefContainsSomethingAccessible ncenv m ad)
-          |> List.map ptci_of_submodul)
-
-    (* Get all the types and .NET constructor groups accessible from here *)
-       @ (tycons 
-          |> List.map (MakeNestedTcref modref >> ptci_of_tycon ncenv m) )
-
-       @ (tycons 
-          |> List.map (MakeNestedTcref modref >> ptcis_of_tycon_ctors ncenv m ad) |> List.concat)
-
-    | id :: rest  -> 
-        (match mty.ModulesAndNamespacesByDemangledName.TryFind(id) with
-         | Some mspec 
-             when not (IsTyconUnseenObsoleteSpec ad g m (MakeNestedTcref modref mspec) allowObsolete) -> 
-             let allowObsolete = rest <> [] && allowObsolete
-             ResolvePartialLongIdentInModuleOrNamespace ncenv nenv m ad (MakeNestedTcref modref mspec) rest allowObsolete
-         | _ -> [])
-
-      @ (LookupTypeNameInEntityNoArity m id mty 
-         |> List.collect (fun tycon ->
-             let tcref = MakeNestedTcref modref tycon 
-             if not (IsTyconUnseenObsoleteSpec ad g m tcref allowObsolete) then 
-                 tcref |> generalize_tcref |> snd |> ResolvePartialLongIdentInType ncenv nenv m ad true rest
-             else 
-                 []))
-
-/// allowObsolete - specifies whether we should return obsolete types & modules 
-///   as (no other obsolete items are returned)
-let ResolvePartialLongIdent (ncenv: NameResolver) nenv m ad plid allowObsolete = 
-    let g = ncenv.g
-    match  plid with
-    |  [] -> 
-       let iltyconNames =
-          nenv.eTyconsByAccessNames
-          |> NameMultiMap.range
-          |> List.choose (fun (tyconRef) -> if tyconRef.IsILTycon then Some(tyconRef.DisplayName) else None)
-          |> Set.of_seq      
-       
-       let items = 
-           nenv.eUnqualifiedItems
-           |> NameMap.range
-           |> List.filter (ItemIsUnseen ad g m >> not)
-
-       let apats = 
-           nenv.ePatItems
-           |> NameMap.range
-           |> List.filter (function Item_apelem v -> true | _ -> false)
-
-       let mods = 
-           nenv.eModulesAndNamespaces 
-           |> NameMultiMap.range 
-           |> List.filter (demangled_name_of_modref >> IsInterestingModuleName  )
-           |> List.filter (demangled_name_of_modref >> not_fake_container_modul iltyconNames)
-           |> List.filter (EntityRefContainsSomethingAccessible ncenv m ad)
-           |> List.filter (IsTyconUnseen ad g m >> not)
-           |> List.map ptci_of_submodul
-
-       let tycons = 
-           nenv.eTyconsByDemangledNameAndArity
-           |> NameMap.range
-           |> List.filter (fun tcref -> not tcref.IsExceptionDecl) 
-           |> List.filter (IsTyconUnseen ad g m >> not)
-           |> List.map (ptci_of_tycon ncenv m)
-
-       // Get all the constructors accessible from here
-       let constructors =  
-           nenv.eTyconsByDemangledNameAndArity
-           |> NameMap.range
-           |> List.filter (IsTyconUnseen ad g m >> not)
-           |> List.collect (ptcis_of_tycon_ctors ncenv m ad)
-
-       items @ apats @ mods @ tycons @ constructors 
-
-    | id :: rest -> 
-    
-        (* Look in the namespaces 'id' *)
-        PartialResolveLongIndentAsModuleOrNamespaceThen nenv [id] (fun modref -> 
-          let allowObsolete = rest <> [] && allowObsolete
-          if EntityRefContainsSomethingAccessible ncenv m ad modref then 
-            ResolvePartialLongIdentInModuleOrNamespace ncenv nenv m ad modref rest allowObsolete
-          else 
-            [])
-
-        (* Look for values called 'id' that accept the dot-notation *)
-      @ (if nenv.eUnqualifiedItems.ContainsKey(id) then 
-                 (* v.lookup : member of a value *)
-          let v = Map.find id nenv.eUnqualifiedItems
-          match v with 
-          | Item_val x -> 
-              if verbose then   dprintf "ResolvePartialLongIdent (through val), plid = %s\n" (text_of_path plid); 
-              let typ = x.Type
-              let typ = if x.BaseOrThisInfo = CtorThisVal then dest_refcell_ty g typ else typ
-              ResolvePartialLongIdentInType ncenv nenv m ad false rest  typ
-          | _ -> []
-         else [])
-      @ 
-    (* type.lookup : lookup a static something in a type *)
-        (LookupTypeNameInEnvNoArity id nenv |> List.collect (FreshenTycon ncenv m >> ResolvePartialLongIdentInType ncenv nenv m ad true rest))
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/nameres.mli b/tools/FSharp_1.9.6.16/source/fsharp/nameres.mli
deleted file mode 100644
index b3a77e0d..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/nameres.mli
+++ /dev/null
@@ -1,167 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-module (* internal *) Microsoft.FSharp.Compiler.Nameres
-
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Infos
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Import
-open Microsoft.FSharp.Compiler.Outcome
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.PrettyNaming
-
-/// A NameResolver primarily holds an InfoReader
-type NameResolver =
-    new : g:TcGlobals * amap:ImportMap * infoReader:InfoReader * instantiationGenerator:(range -> typars -> tinst) -> NameResolver
-    member InfoReader : InfoReader
-    member amap : ImportMap
-    member g : TcGlobals
-    member instantiationGenerator : (range -> typars -> tinst)
-
-//---------------------------------------------------------------------------
-// 
-//------------------------------------------------------------------------- 
-
-[]
-type NamedItem = 
-  // These exist in the "eUnqualifiedItems" List.map in the type environment. 
-  | Item_val of  ValRef
-  | Item_ucase of UnionCaseInfo
-  | Item_apres of ActivePatternInfo * typ * int 
-  | Item_apelem of ActivePatternElemRef 
-  | Item_ecref of TyconRef 
-  | Item_recdfield of RecdFieldInfo
-
-  // The following are never in the items table but are valid results of binding 
-  // an identitifer in different circumstances. 
-  | Item_newdef of ident
-  | Item_il_field of ILFieldInfo
-  | Item_event of EventInfo
-  | Item_property of string * PropInfo list
-  | Item_meth_group of string * MethInfo list
-  | Item_ctor_group of string * MethInfo list
-  | Item_fake_intf_ctor of Tast.typ
-  | Item_delegate_ctor of Tast.typ
-  | Item_typs of string * Tast.typ list
-  | Item_modrefs of Tast.ModuleOrNamespaceRef list
-  /// Represents the resolution of a source identifier to an implicit use of an infix operator
-  | Item_implicit_op of ident
-  /// Represents the resolution of a source identifier to a named argument
-  | Item_param_name of ident 
-  | Item_prop_name of ident
-
-type ExtensionMember = 
-   | FSExtMem of ValRef
-   | ILExtMem of ILTypeRef * ILMethodDef
-
-[]
-type NameResolutionEnv =
-    {eDisplayEnv: DisplayEnv;
-     eUnqualifiedItems: NamedItem NameMap;
-     ePatItems: NamedItem NameMap;
-     eModulesAndNamespaces: ModuleOrNamespaceRef list NameMap;
-     eFullyQualifiedModulesAndNamespaces: ModuleOrNamespaceRef list NameMap;
-     eFieldLabels: (RecdFieldRef * bool) NameMultiMap;
-     eTyconsByAccessNames: TyconRef NameMultiMap;
-     eTyconsByDemangledNameAndArity: Map;
-     eExtensionMembers: TcrefMultiMap;
-     eTypars: Typar NameMap;}
-    static member Empty : g:TcGlobals -> NameResolutionEnv
-    member DisplayEnv : DisplayEnv
-    member UnqualifiedItems : NamedItem NameMap
-
-
-val public DisplayNameOfItem : TcGlobals -> NamedItem -> string
-
-val internal AddFakeNamedValRefToNameEnv : string -> ValRef -> NameResolutionEnv -> NameResolutionEnv
-val internal AddFakeNameToNameEnv : string -> NamedItem -> NameResolutionEnv -> NameResolutionEnv
-
-val internal AddValRefToNameEnv                    : ValRef -> NameResolutionEnv -> NameResolutionEnv
-val internal AddActivePatternResultTagsToNameEnv   : ActivePatternInfo -> typ -> NameResolutionEnv -> NameResolutionEnv
-val internal AddTyconRefsToNameEnv                 : TcGlobals -> ImportMap -> range -> TyconRef list -> NameResolutionEnv -> NameResolutionEnv
-val internal AddExceptionDeclsToNameEnv            : TyconRef -> NameResolutionEnv -> NameResolutionEnv
-val internal AddModuleAbbrevToNameEnv              : ident -> ModuleOrNamespaceRef list -> NameResolutionEnv -> NameResolutionEnv
-val internal AddModrefsToNameEnv                   : TcGlobals -> ImportMap -> range -> bool -> AccessorDomain -> Map -> NameResolutionEnv -> NameResolutionEnv
-val internal AddModrefToNameEnv                    : TcGlobals -> ImportMap -> range -> bool -> AccessorDomain -> ModuleOrNamespaceRef -> NameResolutionEnv -> NameResolutionEnv
-val internal AddModuleOrNamespaceContentsToNameEnv : TcGlobals -> ImportMap -> AccessorDomain -> range -> ModuleOrNamespaceRef -> NameResolutionEnv -> NameResolutionEnv
-
-type CheckForDuplicateTyparFlag =
-  | CheckForDuplicateTypars
-  | NoCheckForDuplicateTypars
-
-val internal AddDeclaredTyparsToNameEnv : CheckForDuplicateTyparFlag -> Typar list -> NameResolutionEnv -> NameResolutionEnv
-val internal OneResult : 'a outcome -> 'a list outcome
-val internal AtMostOneResult : range -> 'a list outcome -> 'a outcome
-val internal LookupTypeNameInEnvNoArity : string -> NameResolutionEnv -> TyconRef list
-
-type TypeNameInExprOrPatFlag =
-  | ResolveTypeNamesToCtors
-  | ResolveTypeNamesToTypeRefs
-
-type TypeNameResInfo = TypeNameInExprOrPatFlag * int option
-
-val internal DefaultTypeNameResInfo : TypeNameInExprOrPatFlag * 'a option
-
-type internal ItemOccurence = 
-  | Binding = 0
-  | Use = 1
-  | Pattern = 2
-  
-type ITypecheckResultsSink =
-    abstract NotifyEnvWithScope   : range * NameResolutionEnv * AccessorDomain -> unit
-    abstract NotifyExprHasType    : pos * typ * DisplayEnv * NameResolutionEnv * AccessorDomain * range -> unit
-    abstract NotifyNameResolution : pos * NamedItem * ItemOccurence * DisplayEnv * NameResolutionEnv * AccessorDomain * range -> unit
-
-val internal GlobalTypecheckResultsSink : ITypecheckResultsSink option ref 
-val internal CallEnvSink                : range * NameResolutionEnv * AccessorDomain -> unit
-val internal CallNameResolutionSink     : range * NameResolutionEnv * NamedItem * ItemOccurence * DisplayEnv * AccessorDomain -> unit
-val internal CallExprHasTypeSink        : range * NameResolutionEnv * Tast.typ * DisplayEnv * AccessorDomain -> unit
-
-val internal AllPropInfosOfTypeInScope : InfoReader -> TcrefMultiMap -> string option * AccessorDomain -> FindMemberFlag -> range -> typ -> PropInfo list
-val internal AllMethInfosOfTypeInScope : InfoReader -> TcrefMultiMap -> string option * AccessorDomain -> FindMemberFlag -> range -> typ -> MethInfo list
-
-exception internal IndeterminateType of range
-exception internal UpperCaseIdentifierInPattern of range
-exception internal DeprecatedClassFieldInference of range
-
-val FreshenRecdFieldRef :NameResolver -> Range.range -> Tast.RecdFieldRef -> NamedItem
-
-type FullyQualifiedFlag =
-  | FullyQualified
-  | OpenQualified
-
-type LookupKind =
-  | RecdField
-  | Pattern
-  | Expr
-  | Type
-  | Ctor
-
-
-type WarnOnUpperFlag =
-  | WarnOnUpperCase
-  | AllIdsOK
-
-val internal ResolveLongIndentAsModuleOrNamespace   : FullyQualifiedFlag -> NameResolutionEnv -> AccessorDomain -> ident list -> (int * ModuleOrNamespaceRef * ModuleOrNamespaceType) list outcome
-val internal ResolveObjectConstructor               : NameResolver -> DisplayEnv -> range -> AccessorDomain -> typ -> (NamedItem * 'a list) outcome
-val internal ResolveLongIdentInType                 : NameResolver -> NameResolutionEnv -> LookupKind -> range -> AccessorDomain -> ident list -> FindMemberFlag -> TypeNameInExprOrPatFlag * int option -> typ -> NamedItem * ident list
-val internal ResolvePatternLongIdent                : NameResolver -> WarnOnUpperFlag -> bool -> range -> AccessorDomain -> NameResolutionEnv -> TypeNameInExprOrPatFlag * int option -> ident list -> NamedItem
-val internal ResolveTypeLongIdentInType             : NameResolver -> NameResolutionEnv -> TypeNameInExprOrPatFlag * int option -> AccessorDomain -> range -> ModuleOrNamespaceRef -> ident list -> TyconRef 
-val internal ResolveTypeLongIdent                   : NameResolver -> ItemOccurence -> FullyQualifiedFlag -> NameResolutionEnv -> AccessorDomain -> ident list -> int -> TyconRef outcome
-val internal ResolveField                           : NameResolver -> NameResolutionEnv -> AccessorDomain -> typ -> ident list * ident -> (RecdFieldRef * bool) list
-val internal ResolveExprLongIdent                   : NameResolver -> range -> AccessorDomain -> NameResolutionEnv -> TypeNameInExprOrPatFlag * int option -> ident list -> NamedItem * ident list
-val internal ResolveLongIdentAsExprAndComputeRange  : NameResolver -> range -> AccessorDomain -> NameResolutionEnv -> TypeNameInExprOrPatFlag * int option -> ident list -> NamedItem * range * ident list
-val internal ResolveExprDotLongIdentAndComputeRange : NameResolver -> range -> AccessorDomain -> NameResolutionEnv -> typ -> ident list -> FindMemberFlag -> NamedItem * range * ident list
-
-val FakeInstantiationGenerator : range -> Typar list -> typ list
-val ResolvePartialLongIdent : NameResolver -> NameResolutionEnv -> range -> AccessorDomain -> string list -> bool -> NamedItem list
-val ResolveCompletionsInType       : NameResolver -> NameResolutionEnv -> Range.range -> Infos.AccessorDomain -> bool -> Tast.typ -> NamedItem list
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/opt.ml b/tools/FSharp_1.9.6.16/source/fsharp/opt.ml
deleted file mode 100644
index e35a0dfe..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/opt.ml
+++ /dev/null
@@ -1,2814 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-//-------------------------------------------------------------------------
-// A fairly simple optimizer. The main aim is to inline simple, known functions
-// and constant values, and to eliminate non-side-affecting bindings that 
-// are never used.
-//------------------------------------------------------------------------- 
-
-#light
-
-module (* internal *) Microsoft.FSharp.Compiler.Opt
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX
-open Microsoft.FSharp.Compiler
-
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
-
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.PrettyNaming 
-open Microsoft.FSharp.Compiler.Tast 
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Layout
-open Microsoft.FSharp.Compiler.Typrelns
-
-let verboseOptimizationInfo = false
-let verboseOptimizations = false
-
-let i_ldlen = [ I_ldlen; I_arith (AI_conv DT_I4)  ] 
-
-let callSize = 1  // size of a function call 
-let forAndWhileLoopSize = 5 // size of a for/while loop
-let tryCatchSize = 5  // size of a try/catch 
-let tryFinallySize = 5 // size of a try/finally
-let closureTotalSize = 10 // Total cost of a closure. Each closure adds a class definition
-let methodDefnTotalSize = 1  // Total cost of a method definition
-
-//-------------------------------------------------------------------------
-// Info returned up the tree by optimization.
-// Partial information about an expression.
-// Some ExprValueInfo can 
-// 
-// We store one of these for each value in the environment, including values 
-// which we know little or nothing about. 
-//------------------------------------------------------------------------- 
-
-type TypeValueInfo =
-  | UnknownTypeValue
-
-type ExprValueInfo =
-  | UnknownValue
-  /// record size info (max_depth) for ExprValueInfo 
-  | SizeValue   of int * ExprValueInfo        
-  (* RECURSIVE cases *)
-  /// "equal to another identifier about which we know some further detail" 
-  | ValValue    of ValRef * ExprValueInfo    
-  /// used for  when optimizing module expressions 
-  | ModuleValue of ModuleInfo              
-  | TupleValue  of ExprValueInfo array 
-  | RecdValue   of TyconRef * ExprValueInfo array         (* INVARIANT: in field definition order *)
-  | UnionCaseValue of UnionCaseRef * ExprValueInfo array 
-  (* NON RECURSIVE cases *)
-  | ConstValue of Constant * Tast.typ
-  | CurriedLambdaValue of
-      ( uniq        (* id *)
-      * int        (* arities, i.e. number of bunches of untupled args, and number of args in each bunch. INCLUDE TYPE ARGS. *)
-      * int        (* size *)
-      * Tast.expr  (* value, a lambda term *)
-      * Tast.typ   (* type of lamba term *))
-  | ConstExprValue of
-      ( int        (* size *)
-      * Tast.expr  (* value, a term *))
-
-and ValInfo =
-    { ValMakesNoCriticalTailcalls: bool;
-      ValExprInfo: ExprValueInfo }
-and ModuleInfo = 
-    { ValInfos: (ValRef * ValInfo) NameMap;
-      ModuleOrNamespaceInfos: LazyModuleInfo NameMap }
-and LazyModuleInfo = Lazy
-let braceL x = leftL "{" $$ x $$ rightL "}"  
-    
-let namemapL xL xmap = NameMap.fold (fun nm x z -> z @@ xL nm x) xmap emptyL
-let rec exprValueInfoL = function
-  | ConstValue (x,_)         -> NicePrint.constL x
-  | UnknownValue             -> wordL "?"
-  | SizeValue (_,vinfo)      -> exprValueInfoL vinfo
-  | ValValue (vr,vinfo)      -> bracketL ((ValRefL vr $$ wordL "alias") --- exprValueInfoL vinfo)
-  | ModuleValue minfo        -> wordL "struct<...>"
-  | TupleValue vinfos        -> bracketL (exprValueInfosL vinfos)
-  | RecdValue (_,vinfos)     -> braceL   (exprValueInfosL vinfos)
-  | UnionCaseValue (ucr,vinfos) -> UnionCaseRefL ucr $$ bracketL (exprValueInfosL vinfos)
-  | CurriedLambdaValue(lambdaId,arities,bsize,expr',ety) -> wordL "lam" ++ ExprL expr' (* (Printf.sprintf "lam(size=%d)" bsize) *)
-  | ConstExprValue (size,x)  -> ExprL x
-and exprValueInfosL vinfos = commaListL (List.map exprValueInfoL (Array.to_list vinfos))
-and moduleInfoL (x:LazyModuleInfo) = 
-    let x = x.Force()
-    braceL ((wordL "Modules: " @@ namemapL (fun nm x -> wordL nm $$ moduleInfoL x) x.ModuleOrNamespaceInfos) 
-            @@ (wordL "Values:" @@ namemapL (fun nm (vref,x) -> ValRefL vref $$ valInfoL x) x.ValInfos))
-
-and valInfoL (x:ValInfo) = 
-    braceL ((wordL "ValExprInfo: " @@ exprValueInfoL x.ValExprInfo) 
-            @@ (wordL "ValMakesNoCriticalTailcalls:" @@ wordL (if x.ValMakesNoCriticalTailcalls then "true" else "false")))
-
-type summary<'a> =
-    { Info: 'a; 
-      /// What's the contribution to the size of this function?
-      FunctionSize: int; 
-      /// What's the total contribution to the size of the assembly, including closure classes etc.?
-      TotalSize: int; 
-      /// Meaning: could mutate, could non-terminate, could raise exception 
-      /// One use: an effect expr can not be eliminated as dead code (e.g. sequencing)
-      /// One use: an effect=false expr can not throw an exception? so try-catch is removed.
-      HasEffect: bool  
-      /// Indicates that a function may make a useful tailcall, hence when called should itself be tailcalled
-      MightMakeCriticalTailcall: bool  
-    }
-
-type expr_summary = ExprValueInfo summary
-type modul_summary = ModuleInfo summary
-    
-//-------------------------------------------------------------------------
-// BoundValueInfoBySize
-// Note, this is a different notion of "size" to the one used for inlining heuristics
-//------------------------------------------------------------------------- 
-
-let rec SizeOfValueInfos arr = 
-    let n = Array.length arr
-    let rec go i acc = if i >= n then acc else max acc (SizeOfValueInfo arr.[i])
-    go 0 0
-and SizeOfValueInfo x =
-    match x with
-    | SizeValue (vdepth,v)     -> vdepth (* terminate recursion at CACHED size nodes *)
-    | ConstValue (x,_)                  -> 1
-    | UnknownValue             -> 1
-    | ValValue (vr,vinfo)      -> SizeOfValueInfo vinfo + 1
-    | ModuleValue minfo        -> 1 (* do not care about size of these, they do not nest heavily... *)
-    | TupleValue vinfos        
-    | RecdValue (_,vinfos)
-    | UnionCaseValue (_,vinfos)   -> 1 + SizeOfValueInfos vinfos
-    | CurriedLambdaValue(lambdaId,arities,bsize,expr',ety) -> 1
-    | ConstExprValue (size,_)  -> 1
-
-let rec MakeValueInfoWithCachedSize vdepth v =
-    match v with
-      | SizeValue(_,v) -> MakeValueInfoWithCachedSize vdepth v
-      | _ -> let minDepthForASizeNode = 5 in (* for small vinfos do not record size info, save space *)
-             if vdepth > minDepthForASizeNode then SizeValue(vdepth,v) else v (* add nodes to stop recursion *)
-    
-let MakeSizedValueInfo v =
-    let vdepth = SizeOfValueInfo v
-    MakeValueInfoWithCachedSize vdepth v
-
-let BoundValueInfoBySize vinfo =
-    let rec bound depth x =
-        if depth<0 then UnknownValue else
-        match x with
-        | SizeValue (vdepth,vinfo) -> if vdepth < depth then x else MakeSizedValueInfo (bound depth vinfo)
-        | ValValue (vr,vinfo)      -> ValValue (vr,bound (depth-1) vinfo)
-        | TupleValue vinfos        -> TupleValue (Array.map (bound (depth-1)) vinfos)
-        | RecdValue (tcref,vinfos) -> RecdValue  (tcref,Array.map (bound (depth-1)) vinfos)
-        | UnionCaseValue (ucr,vinfos) -> UnionCaseValue (ucr,Array.map (bound (depth-1)) vinfos)
-        | ModuleValue minfo        -> x
-        | ConstValue _                  -> x
-        | UnknownValue             -> x
-        | CurriedLambdaValue(lambdaId,arities,bsize,expr',ety) -> x
-        | ConstExprValue (size,_)  -> x
-    let max_depth  = 6 in  (* beware huge constants! *)
-    let trim_depth = 3
-    let vdepth = SizeOfValueInfo vinfo
-    if vdepth > max_depth 
-    then MakeSizedValueInfo (bound trim_depth vinfo)
-    else MakeValueInfoWithCachedSize vdepth vinfo
-
-//-------------------------------------------------------------------------
-// What we know about the world 
-//------------------------------------------------------------------------- 
-
-let jitOptDefault = true
-let localOptDefault = true
-let crossModuleOptDefault = true
-
-type OptimizationSettings = 
-    { abstractBigTargets : bool;
-      jitOptUser : bool option;
-      localOptUser : bool option;
-      crossModuleOptUser : bool option; 
-      /// size after which we start chopping methods in two, though only at match targets 
-      bigTargetSize : int   
-      /// size after which we start enforcing splitting sub-expressions to new methods, to avoid hitting .NET IL limitations 
-      veryBigExprSize : int 
-      /// The size after which we don't inline
-      lambdaInlineThreshold : int;  
-      /// For unit testing
-      reportingPhase : bool
-      reportNoNeedToTailcall: bool;
-      reportFunctionSizes : bool 
-      reportHasEffect : bool 
-      reportTotalSizes : bool }
-
-    static member Defaults = 
-        { abstractBigTargets = false;
-          jitOptUser = None;
-          localOptUser = None
-          /// size after which we start chopping methods in two, though only at match targets 
-          bigTargetSize = 100  
-          /// size after which we start enforcing splitting sub-expressions to new methods, to avoid hitting .NET IL limitations 
-          veryBigExprSize = 3000 
-          crossModuleOptUser = None;
-          /// The size after which we don't inline
-          lambdaInlineThreshold = 6;
-          reportingPhase = false;
-          reportNoNeedToTailcall = false;
-          reportFunctionSizes = false
-          reportHasEffect = false
-          reportTotalSizes = false
-        }
-
-    member x.jitOpt() = (match x.jitOptUser with Some f -> f | None -> jitOptDefault)
-    member x.localOpt () = (match x.localOptUser with Some f -> f | None -> localOptDefault)
-    member x.crossModuleOpt () = x.localOpt () && (match x.crossModuleOptUser with Some f -> f | None -> crossModuleOptDefault)
-
-    member x.KeepOptimizationValues() = x.crossModuleOpt ()
-    /// inline calls *
-    member x.InlineLambdas () = x.localOpt ()  
-    /// eliminate unused bindings with no effect 
-    member x.EliminateUnusedBindings () = x.localOpt () 
-    /// eliminate try around expr with no effect 
-    member x.EliminateTryCatchAndTryFinally () = x.localOpt () 
-    /// eliminate first part of seq if no effect 
-    member x.EliminateSequential () = x.localOpt () 
-    /// determine branches in pattern matching
-    member x.EliminateSwitch () = x.localOpt () 
-    member x.EliminateRecdFieldGet () = x.localOpt () 
-    member x.EliminateTupleFieldGet () = x.localOpt () 
-    member x.EliminatUnionCaseFieldGet () = x.localOpt () 
-    /// eliminate non-copiler generated immediate bindings 
-    member x.EliminateImmediatelyConsumedLocals() = x.localOpt () 
-    /// expand "let x = (exp1,exp2,...)" bind fields as prior tmps 
-    member x.ExpandStructrualValues() = x.localOpt () 
-
-type cenv =
-    { g: Env.TcGlobals;
-      amap: Import.ImportMap;
-      optimizing: bool;
-      scope: ccu; 
-      localInternalVals: System.Collections.Generic.Dictionary 
-      settings: OptimizationSettings }
-
-
-
-type IncrementalOptimizationEnv =
-    { // An identifier to help with name generation
-      latestBoundId: ident option;
-      // The set of lambda IDs we've inlined to reach this point. Helps to prevent recursive inlining 
-      dontInline: Zset.t;  
-      // Recursively bound vars. If an sub-expression that is a candidate for method splitting
-      // contains any of these variables then don't split it, for fear of mucking up tailcalls.
-      // See FSharp 1.0 bug 2892
-      dontSplitVars: ValMap;  
-      /// The Val for the function binding being generated, if any. 
-      functionVal: (Val * Tast.ValTopReprInfo) option;
-      typarInfos: (Typar * TypeValueInfo) list; 
-      localExternalVals: ValInfo ValMap;
-      globalModuleInfos: LazyModuleInfo NameMap;   }
-
-let empty_env = 
-    { latestBoundId = None; 
-      dontInline = Zset.empty Int64.order;
-      typarInfos = [];
-      functionVal = None; 
-      dontSplitVars = vspec_map_empty();
-      localExternalVals = vspec_map_empty(); 
-      globalModuleInfos = NameMap.empty }
-
-//-------------------------------------------------------------------------
-// IsPartialExprVal - is the expr fully known?
-//------------------------------------------------------------------------- 
-
-let rec IsPartialExprVal x = (* IsPartialExprVal can not rebuild to an expr *)
-    match x with
-    | UnknownValue -> true
-    | ModuleValue ss -> IsPartialStructVal ss
-    | TupleValue args | RecdValue (_,args) | UnionCaseValue (_,args) -> Array.exists IsPartialExprVal args
-    | ConstValue _ | CurriedLambdaValue _ | ConstExprValue _ -> false
-    | ValValue (_,a) 
-    | SizeValue(_,a) -> IsPartialExprVal a
-
-and IsPartialStructVal (ss:ModuleInfo) =
-    (ss.ModuleOrNamespaceInfos  |> Map.exists (fun _ x -> IsPartialStructVal (x.Force()))) ||
-    (ss.ValInfos |> Map.exists (fun _ (_,x) -> IsPartialExprVal x.ValExprInfo)) 
-
-let CheckInlineValueIsComplete (v:Val) res =
-    if v.MustInline && IsPartialExprVal res then
-        errorR(Error("The value '"^v.MangledName^"' was marked inline but its value was incomplete", v.Range))
-        //System.Diagnostics.Debug.Assert(false,sprintf "Break for incomplete inline value %s" v.MangledName)
-
-let check msg m vref (res:ValInfo)  =
-    CheckInlineValueIsComplete (deref_val vref) res.ValExprInfo;
-    (vref,res)
-
-//-------------------------------------------------------------------------
-// Bind information about values 
-//------------------------------------------------------------------------- 
-
-let EmptyModuleInfo = notlazy { ValInfos = Map.empty; ModuleOrNamespaceInfos = Map.empty }
-let rec UnionModuleInfo (m1:LazyModuleInfo) (m2:LazyModuleInfo) = 
-    let m1 = m1.Force()
-    let m2 = m2.Force()
-    notlazy
-       { ValInfos =  NameMap.layer m1.ValInfos m2.ValInfos;
-         ModuleOrNamespaceInfos = NameMap.union UnionModuleInfo  m1.ModuleOrNamespaceInfos m2.ModuleOrNamespaceInfos }
-
-let UnionModuleInfos (minfos : LazyModuleInfo list) = List.foldBack UnionModuleInfo minfos EmptyModuleInfo
-
-let FindOrCreateModuleInfo n ss = 
-    match Map.tryfind n ss with 
-    | Some res -> res
-    | None -> EmptyModuleInfo
-
-let rec BindValueInSubModule mp i (v:Val) vval ss =
-    if i >= Array.length mp 
-    then {ss with ValInfos = Map.add v.MangledName (mk_local_vref v,vval) ss.ValInfos }
-    else {ss with ModuleOrNamespaceInfos = BindValueInModule mp.[i] mp (i+1) v vval ss.ModuleOrNamespaceInfos }
-
-and BindValueInModule n mp i v vval ss =
-    let old =  FindOrCreateModuleInfo n ss
-    Map.add n (notlazy (BindValueInSubModule mp i v vval (old.Force()))) ss
-
-let bind_val_in_env_for_fslib (NLPath(ccu,mp)) v vval env =
-    // We eventually need to allow multiple CCUs with the same 'name' but different assemblies.
-    // So at some point we should remove this use of ccu.AssemblyName
-    {env with globalModuleInfos = BindValueInModule ccu.AssemblyName mp 0 v vval env.globalModuleInfos }
-
-let rec  bind_top_module_in_modul n mp i mval ss =
-    if i >= Array.length mp 
-    then 
-        match Map.tryfind n ss with 
-        | Some res -> Map.add n (UnionModuleInfo mval res) ss
-        | None -> Map.add n mval ss
-    else
-        let old =  (FindOrCreateModuleInfo n ss).Force()
-        Map.add n (notlazy {old with ModuleOrNamespaceInfos =  bind_top_module_in_modul mp.[i] mp (i+1) mval old.ModuleOrNamespaceInfos}) ss
-
-let UnknownValInfo = { ValExprInfo=UnknownValue; ValMakesNoCriticalTailcalls=false }
-
-let MkValInfo info (v:Val)  = { ValExprInfo=info.Info; ValMakesNoCriticalTailcalls= v.MakesNoCriticalTailcalls }
-
-(* Bind a value *)
-let bind_internal_local_vspec cenv (v:Val) vval env = 
-    let vval = if v.IsMutable then UnknownValInfo else vval
-#if CHECKED
-#else
-    match vval.ValExprInfo with 
-    | UnknownValue -> env
-    | _ -> 
-#endif
-        cenv.localInternalVals.[v.Stamp] <- vval;
-        env
-        
-let bind_escaping_local_vspec cenv (v:Val) vval env = 
-#if CHECKED
-    CheckInlineValueIsComplete v vval;
-#endif
-
-    if verboseOptimizationInfo then dprintn ("*** Binding "^v.MangledName); 
-    let vval = if v.IsMutable then {vval with ValExprInfo=UnknownValue } else vval
-    let env = 
-#if CHECKED
-#else
-        match vval.ValExprInfo with 
-        | UnknownValue -> env  
-        | _ -> 
-#endif
-            { env with localExternalVals=vspec_map_add v vval env.localExternalVals }
-    (* If we're compiling fslib then also bind the value as a non-local path to allow us to resolve the compiler-non-local-refereneces *)
-    let env = 
-        if cenv.g.compilingFslib && isSome (v.PublicPath) 
-        then bind_val_in_env_for_fslib (enclosing_nlpath_of_pubpath cenv.g.fslibCcu (the (v.PublicPath))) v vval env 
-        else env
-    env
-
-let rec bind_module_vspecs cenv (mval:LazyModuleInfo) env =
-    let mval = mval.Force()
-    NameMap.foldRange (fun (v,vval) env -> bind_escaping_local_vspec cenv (deref_val v) vval env) mval.ValInfos
-      (NameMap.foldRange  (bind_module_vspecs cenv) mval.ModuleOrNamespaceInfos env)
-
-
-let bind_internal_vspec_to_unknown cenv v env = 
-#if CHECKED
-    bind_internal_local_vspec cenv v UnknownValue env
-#else
-    env
-#endif
-let bind_internal_vspecs_to_unknown cenv vs env = 
-#if CHECKED
-    List.foldBack (bind_internal_vspec_to_unknown cenv) vs env
-#else
-    env
-#endif
-
-let BindTypeVar tyv typeinfo env = { env with typarInfos= (tyv,typeinfo)::env.typarInfos } 
-
-let BindTypeVarsToUnknown (tps:Typar list) env = 
-    if isNil tps then env else
-    // The optimizer doesn't use the type values it could track. 
-    // However here we mutate to provide better names for generalized type parameters 
-    let nms = PrettyTypes.PrettyTyparNames (fun _ -> true) (env.typarInfos |> List.map (fun (tp,_) -> tp.Name) ) tps
-    (tps,nms) ||> List.iter2 (fun tp nm -> 
-            if PrettyTypes.NeedsPrettyTyparName tp  then 
-                tp.Data.typar_id <- ident (nm,tp.Range));      
-    List.fold (fun sofar arg -> BindTypeVar arg UnknownTypeValue sofar) env tps 
-
-let BindCcu (ccu:Tast.ccu) mval env = 
-    if verboseOptimizationInfo then 
-        dprintf "*** Reloading optimization data for assembly %s, info = \n%s\n" ccu.AssemblyName (showL (Layout.squashTo 192 (moduleInfoL mval)));  
-
-    { env with globalModuleInfos=Map.add ccu.AssemblyName mval env.globalModuleInfos }
-
-let mk_cenv settings scope g amap = 
-    { settings=settings;
-      scope=scope; 
-      g=g; 
-      amap=amap;
-      optimizing=true;
-      localInternalVals=new System.Collections.Generic.Dictionary<_,_>(10000) }
-
-
-//-------------------------------------------------------------------------
-// Lookup information about values 
-//------------------------------------------------------------------------- 
-
-
-let GetInfoForLocalValue cenv env (v:Val) m = 
-    (* Abstract slots do not have values *)
-    match v.MemberInfo with 
-    | Some(vspr) when vspr.MemberFlags.MemberIsDispatchSlot -> UnknownValInfo
-    | _ -> 
-        let mutable res = Unchecked.defaultof<_> 
-        let ok = cenv.localInternalVals.TryGetValue(v.Stamp, &res)
-        if ok then res else
-        match vspec_map_tryfind v env.localExternalVals with 
-        | Some vval -> vval
-        | None -> 
-            if v.MustInline then
-                errorR(Error("The value '"^full_display_text_of_vref (mk_local_vref v) ^"' was marked inline but was not bound in the optimization environment", m));
-#if CHECKED
-            warning(Error ("*** Local value "^v.MangledName^" not found during optimization. Please report this problem",m)); 
-#endif
-            UnknownValInfo 
-
-let TryGetInfoForCcu env (ccu:ccu) = env.globalModuleInfos.TryFind(ccu.AssemblyName)
-
-let rec TryGetInfoForPath sv p i = 
-    if i >= Array.length p then Some sv else 
-    match Map.tryfind p.[i] sv.ModuleOrNamespaceInfos with 
-    | Some info -> 
-        TryGetInfoForPath (info.Force()) p (i+1)
-    | None -> 
-        if verboseOptimizationInfo then 
-            dprintn ("\n\n*** Optimization info for submodule "^p.[i]^" not found in parent module which contains submodules: "^String.concat "," (NameMap.domainL sv.ModuleOrNamespaceInfos)); 
-        None
-
-let TryGetInfoForNonLocalPath env (NLPath(ccu,p)) = 
-    match TryGetInfoForCcu env ccu with 
-    | Some ccuinfo -> TryGetInfoForPath (ccuinfo.Force()) p 0
-    | None -> None
-          
-let GetInfoForNonLocalVal cenv env (v:ValRef) =
-    match v.MemberInfo with 
-    | Some(vspr) when vspr.MemberFlags.MemberIsDispatchSlot -> UnknownValInfo
-    | _ -> 
-        if (* in_this: REVIEW: optionally turn x-module on/off on per-module basis  or  *)
-          cenv.settings.crossModuleOpt () || 
-          v.MustInline then 
-            let smv = nlpath_of_nlref v.nlr
-            let n = item_of_nlref v.nlr
-            match TryGetInfoForNonLocalPath env smv with
-            | Some(structInfo) ->
-                match structInfo.ValInfos.TryFind(n) with 
-                | Some ninfo -> snd ninfo
-                | None -> 
-                      //dprintn ("\n\n*** Optimization info for value "^n^" from module "^(full_name_of_nlpath smv)^" not found, module contains values: "^String.concat "," (NameMap.domainL structInfo.ValInfos));  
-                      //System.Diagnostics.Debug.Assert(false,sprintf "Break for module %s, value %s" (full_name_of_nlpath smv) n)
-                      UnknownValInfo
-            | None -> 
-                //dprintf "\n\n*** Optimization info for module %s from ccu %s not found." (full_name_of_nlpath smv) (ccu_of_nlpath smv).AssemblyName;  
-                //System.Diagnostics.Debug.Assert(false,sprintf "Break for module %s, ccu %s" (full_name_of_nlpath smv) (ccu_of_nlpath smv).AssemblyName)
-                UnknownValInfo
-        else UnknownValInfo
-
-let GetInfoForVal cenv env m (v:ValRef) =  
-    let res = 
-        match v.IsLocalRef with 
-        | true -> GetInfoForLocalValue cenv env v.binding m
-        | false -> GetInfoForNonLocalVal cenv env v
-    check "its stored value was incomplete" m v res |> ignore;
-    res
-
-//-------------------------------------------------------------------------
-// Try to get information about values of particular types
-//------------------------------------------------------------------------- 
-
-let rec strip_value = function
-  | ValValue(_,details) -> strip_value details (* step through ValValue "aliases" *) 
-  | SizeValue(_,details) -> strip_value details (* step through SizeValue "aliases" *) 
-  | vinfo               -> vinfo
-
-let (|StripConstValue|_|) ev = 
-  match strip_value ev with
-  | ConstValue(c,_) -> Some c
-  | _ -> None
-
-let (|StripLambdaValue|_|) ev = 
-  match strip_value ev with 
-  | CurriedLambdaValue info -> Some info
-  | _ -> None
-
-let dest_tuple_value ev = 
-  match strip_value ev with 
-  | TupleValue info -> Some info
-  | _ -> None
-
-let dest_recd_value ev = 
-  match strip_value ev with 
-  | RecdValue (tcref,info) -> Some info
-  | _ -> None
-
-let (|StripUnionCaseValue|_|) ev = 
-  match strip_value ev with 
-  | UnionCaseValue (c,info) -> Some (c,info)
-  | _ -> None
-
-let mk_bool_value g n = ConstValue(TConst_bool n, g.bool_ty)
-let mk_int8_value g n = ConstValue(TConst_sbyte n, g.sbyte_ty)
-let mk_int16_value g n = ConstValue(TConst_int16 n, g.int16_ty)
-let mk_int32_value g n = ConstValue(TConst_int32 n, g.int32_ty)
-let mk_int64_value g n = ConstValue(TConst_int64 n, g.int64_ty)
-let mk_uint8_value g n = ConstValue(TConst_byte n, g.byte_ty)
-let mk_uint16_value g n = ConstValue(TConst_uint16 n, g.uint16_ty)
-let mk_uint32_value g n = ConstValue(TConst_uint32 n, g.uint32_ty)
-let mk_uint64_value g n = ConstValue(TConst_uint64 n, g.uint64_ty)
-
-let (|StripInt32Value|_|) = function StripConstValue(TConst_int32 n) -> Some n | _ -> None
-      
-//-------------------------------------------------------------------------
-// mk value_infos
-//------------------------------------------------------------------------- 
-
-let MakeValueInfoForValue g m vref vinfo            = 
-    let rec check x = 
-        match x with 
-        | ValValue (vref2,detail)  -> if g.vref_eq vref vref2 then error(Error("recursive ValValue "^showL(exprValueInfoL vinfo),m)) else check detail
-        | SizeValue (n,detail) -> check detail
-        | _ -> ()
-    check vinfo;
-    ValValue (vref,vinfo)       |> BoundValueInfoBySize
-
-let MakeValueInfoForRecord tcref tyargs argvals = RecdValue (tcref,argvals)   |> BoundValueInfoBySize
-let MakeValueInfoForTuple argvals               = TupleValue argvals          |> BoundValueInfoBySize
-let MakeValueInfoForUnionCase cspec argvals     = UnionCaseValue (cspec,argvals) |> BoundValueInfoBySize
-let MakeValueInfoForConst c ty                  = ConstValue(c,ty)
-
-// Helper to evaluate a unary integer operation over known values
-let inline IntegerUnaryOp g f8 f16 f32 f64 fu8 fu16 fu32 fu64 a = 
-     match a with
-     | StripConstValue(c) -> 
-         match c with 
-         | TConst_bool  a -> Some(mk_bool_value g (f32 (if a then 1 else 0) <> 0))
-         | TConst_int32  a -> Some(mk_int32_value g (f32 a))
-         | TConst_int64  a -> Some(mk_int64_value g (f64 a))
-         | TConst_int16  a -> Some(mk_int16_value g (f16 a))
-         | TConst_sbyte   a  -> Some(mk_int8_value g (f8 a))
-         | TConst_byte  a  -> Some(mk_uint8_value g (fu8 a))
-         | TConst_uint32 a -> Some(mk_uint32_value g (fu32 a))
-         | TConst_uint64 a -> Some(mk_uint64_value g (fu64 a))
-         | TConst_uint16 a -> Some(mk_uint16_value g (fu16 a))
-         | _ -> None
-     | _ -> None
-
-// Helper to evaluate a unary signed integer operation over known values
-let inline SignedIntegerUnaryOp g f8 f16 f32 f64 a = 
-     match a with
-     | StripConstValue(c) -> 
-         match c with 
-         | TConst_int32 a -> Some(mk_int32_value g (f32 a))
-         | TConst_int64 a -> Some(mk_int64_value g (f64 a))
-         | TConst_int16 a -> Some(mk_int16_value g (f16 a))
-         | TConst_sbyte  a -> Some(mk_int8_value g (f8 a))
-         | _ -> None
-     | _ -> None
-         
-// Helper to evaluate a binary integer operation over known values
-let inline IntegerBinaryOp g f8 f16 f32 f64 fu8 fu16 fu32 fu64 a b = 
-     match a,b with
-     | StripConstValue(c1),StripConstValue(c2) -> 
-         match c1,c2 with 
-         | (TConst_bool a),(TConst_bool  b) -> Some(mk_bool_value  g (f32  (if a then 1 else 0) (if b then 1 else 0) <> 0))
-         | (TConst_int32  a),(TConst_int32  b) -> Some(mk_int32_value  g (f32  a b))
-         | (TConst_int64  a),(TConst_int64  b) -> Some(mk_int64_value  g (f64  a b))
-         | (TConst_int16  a),(TConst_int16  b) -> Some(mk_int16_value  g (f16  a b))
-         | (TConst_sbyte   a),(TConst_sbyte   b) -> Some(mk_int8_value   g (f8   a b))
-         | (TConst_byte  a),(TConst_byte  b) -> Some(mk_uint8_value  g (fu8  a b))
-         | (TConst_uint16 a),(TConst_uint16 b) -> Some(mk_uint16_value g (fu16 a b))
-         | (TConst_uint32 a),(TConst_uint32 b) -> Some(mk_uint32_value g (fu32 a b))
-         | (TConst_uint64 a),(TConst_uint64 b) -> Some(mk_uint64_value g (fu64 a b))
-         | _ -> None
-     | _ -> None
-
-module Unchecked = Microsoft.FSharp.Core.Operators
-         
-/// Evaluate primitives based on interpretation of IL instructions. 
-//
-// The implementation
-// utilizes F# arithmetic extensively, so a mistake in the implementation of F# arithmetic  
-// in the core library used by the F# compiler will propagate to be a mistake in optimization. 
-// The IL instructions appear in the tree through inlining.
-let MakeAssemblyCodeValueInfo g instrs argvals tys =
-  match instrs,argvals,tys with
-    | [ I_arith AI_add ],[t1;t2],_ -> 
-         // Note: each use of Unchecked.(+) gets instantiated at a different type and inlined
-         match IntegerBinaryOp g Unchecked.(+) Unchecked.(+) Unchecked.(+) Unchecked.(+) Unchecked.(+) Unchecked.(+) Unchecked.(+) Unchecked.(+) t1 t2 with 
-         | Some res -> res
-         | _ -> UnknownValue
-    | [ I_arith AI_sub ],[t1;t2],_ -> 
-         // Note: each use of Unchecked.(+) gets instantiated at a different type and inlined
-         match IntegerBinaryOp g Unchecked.(-) Unchecked.(-) Unchecked.(-) Unchecked.(-) Unchecked.(-) Unchecked.(-) Unchecked.(-) Unchecked.(-) t1 t2 with 
-         | Some res -> res
-         | _ -> UnknownValue
-    | [ I_arith AI_mul ],[a;b],_ -> (match IntegerBinaryOp g Unchecked.( * )  Unchecked.( * ) Unchecked.( * )  Unchecked.( * ) Unchecked.( * )  Unchecked.( * ) Unchecked.( * )  Unchecked.( * ) a b with Some res -> res | None -> UnknownValue)
-    | [ I_arith AI_and ],[a;b],_ -> (match IntegerBinaryOp g (&&&) (&&&) (&&&) (&&&) (&&&) (&&&) (&&&) (&&&) a b  with Some res -> res | None -> UnknownValue)
-    | [ I_arith AI_or  ],[a;b],_ -> (match IntegerBinaryOp g (|||) (|||) (|||) (|||) (|||) (|||) (|||) (|||) a b  with Some res -> res | None -> UnknownValue)
-    | [ I_arith AI_xor ],[a;b],_ -> (match IntegerBinaryOp g (^^^) (^^^) (^^^) (^^^) (^^^) (^^^) (^^^) (^^^) a b  with Some res -> res | None -> UnknownValue)
-    | [ I_arith AI_not ],[a],_ -> (match IntegerUnaryOp g (~~~) (~~~) (~~~) (~~~) (~~~) (~~~) (~~~) (~~~) a with Some res -> res | None -> UnknownValue)
-    | [ I_arith AI_neg ],[a],_ -> (match SignedIntegerUnaryOp g (~-) (~-) (~-) (~-) a with Some res -> res | None -> UnknownValue)
-
-    | [ I_arith AI_ceq ],[a;b],_ -> 
-       match strip_value a, strip_value b with
-       | ConstValue(TConst_bool   a1,_),ConstValue(TConst_bool   a2,_)  -> mk_bool_value g (a1 = a2)
-       | ConstValue(TConst_sbyte  a1,_),ConstValue(TConst_sbyte  a2,_) -> mk_bool_value g (a1 = a2)
-       | ConstValue(TConst_int16  a1,_),ConstValue(TConst_int16  a2,_)  -> mk_bool_value g (a1 = a2)
-       | ConstValue(TConst_int32  a1,_),ConstValue(TConst_int32  a2,_)  -> mk_bool_value g (a1 = a2)
-       | ConstValue(TConst_int64  a1,_),ConstValue(TConst_int64  a2,_)  -> mk_bool_value g (a1 = a2)
-       | ConstValue(TConst_char   a1,_),ConstValue(TConst_char   a2,_)  -> mk_bool_value g (a1 = a2)
-       | ConstValue(TConst_byte   a1,_),ConstValue(TConst_byte   a2,_)   -> mk_bool_value g (a1 = a2)
-       | ConstValue(TConst_uint16 a1,_),ConstValue(TConst_uint16 a2,_)  -> mk_bool_value g (a1 = a2)
-       | ConstValue(TConst_uint32 a1,_),ConstValue(TConst_uint32 a2,_)  -> mk_bool_value g (a1 = a2)
-       | ConstValue(TConst_uint64 a1,_),ConstValue(TConst_uint64 a2,_)  -> mk_bool_value g (a1 = a2)
-       | _ -> UnknownValue
-    | [ I_arith AI_clt ],[a;b],_ -> 
-       match strip_value a,strip_value b with
-       | ConstValue(TConst_bool  a1,_),ConstValue(TConst_bool  a2,_) -> mk_bool_value g (a1 < a2)
-       | ConstValue(TConst_int32 a1,_),ConstValue(TConst_int32 a2,_) -> mk_bool_value g (a1 < a2)
-       | ConstValue(TConst_int64 a1,_),ConstValue(TConst_int64 a2,_) -> mk_bool_value g (a1 < a2)
-       | ConstValue(TConst_sbyte a1,_),ConstValue(TConst_sbyte a2,_) -> mk_bool_value g (a1 < a2)
-       | ConstValue(TConst_int16 a1,_),ConstValue(TConst_int16 a2,_) -> mk_bool_value g (a1 < a2)
-       | _ -> UnknownValue
-    | [ I_arith (AI_conv(DT_U1))],[a],[ty] when type_equiv g ty g.byte_ty -> 
-       match strip_value a with
-       | ConstValue(TConst_sbyte  a,_) -> mk_uint8_value g (Unchecked.byte a)
-       | ConstValue(TConst_int16  a,_) -> mk_uint8_value g (Unchecked.byte a)
-       | ConstValue(TConst_int32  a,_) -> mk_uint8_value g (Unchecked.byte a)
-       | ConstValue(TConst_int64  a,_) -> mk_uint8_value g (Unchecked.byte a)
-       | ConstValue(TConst_byte   a,_) -> mk_uint8_value g (Unchecked.byte a)
-       | ConstValue(TConst_uint16 a,_) -> mk_uint8_value g (Unchecked.byte a)
-       | ConstValue(TConst_uint32 a,_) -> mk_uint8_value g (Unchecked.byte a)
-       | ConstValue(TConst_uint64 a,_) -> mk_uint8_value g (Unchecked.byte a)
-       | _ -> UnknownValue
-    | [ I_arith (AI_conv(DT_U2))],[a],[ty] when type_equiv g ty g.uint16_ty -> 
-       match strip_value a with
-       | ConstValue(TConst_sbyte   a,_) -> mk_uint16_value g (Unchecked.uint16 a)
-       | ConstValue(TConst_int16  a,_) -> mk_uint16_value g (Unchecked.uint16 a)
-       | ConstValue(TConst_int32  a,_) -> mk_uint16_value g (Unchecked.uint16 a)
-       | ConstValue(TConst_int64  a,_) -> mk_uint16_value g (Unchecked.uint16 a)
-       | ConstValue(TConst_byte  a,_) -> mk_uint16_value g (Unchecked.uint16 a)
-       | ConstValue(TConst_uint16 a,_) -> mk_uint16_value g (Unchecked.uint16 a)
-       | ConstValue(TConst_uint32 a,_) -> mk_uint16_value g (Unchecked.uint16 a)
-       | ConstValue(TConst_uint64 a,_) -> mk_uint16_value g (Unchecked.uint16 a)
-       | _ -> UnknownValue
-    | [ I_arith (AI_conv(DT_U4))],[a],[ty] when type_equiv g ty g.uint32_ty -> 
-       match strip_value a with
-       | ConstValue(TConst_sbyte   a,_) -> mk_uint32_value g (Unchecked.uint32 a)
-       | ConstValue(TConst_int16  a,_) -> mk_uint32_value g (Unchecked.uint32 a)
-       | ConstValue(TConst_int32  a,_) -> mk_uint32_value g (Unchecked.uint32 a)
-       | ConstValue(TConst_int64  a,_) -> mk_uint32_value g (Unchecked.uint32 a)
-       | ConstValue(TConst_byte  a,_) -> mk_uint32_value g (Unchecked.uint32 a)
-       | ConstValue(TConst_uint16 a,_) -> mk_uint32_value g (Unchecked.uint32 a)
-       | ConstValue(TConst_uint32 a,_) -> mk_uint32_value g (Unchecked.uint32 a)
-       | ConstValue(TConst_uint64 a,_) -> mk_uint32_value g (Unchecked.uint32 a)
-       | _ -> UnknownValue
-    | [ I_arith (AI_conv(DT_U8))],[a],[ty] when type_equiv g ty g.uint64_ty  -> 
-       match strip_value a with
-       | ConstValue(TConst_sbyte   a,_) -> mk_uint64_value g (Unchecked.uint64 a)
-       | ConstValue(TConst_int16  a,_) -> mk_uint64_value g (Unchecked.uint64 a)
-       | ConstValue(TConst_int32  a,_) -> mk_uint64_value g (Unchecked.uint64 a)
-       | ConstValue(TConst_int64  a,_) -> mk_uint64_value g (Unchecked.uint64 a)
-       | ConstValue(TConst_byte  a,_) -> mk_uint64_value g (Unchecked.uint64 a)
-       | ConstValue(TConst_uint16 a,_) -> mk_uint64_value g (Unchecked.uint64 a)
-       | ConstValue(TConst_uint32 a,_) -> mk_uint64_value g (Unchecked.uint64 a)
-       | ConstValue(TConst_uint64 a,_) -> mk_uint64_value g (Unchecked.uint64 a)
-       | _ -> UnknownValue
-    | [ I_arith (AI_conv(DT_I1))],[a],[ty] when type_equiv g ty g.sbyte_ty  -> 
-       match strip_value a with
-       | ConstValue(TConst_sbyte   a,_) -> mk_int8_value g (Unchecked.sbyte a)
-       | ConstValue(TConst_int16  a,_) -> mk_int8_value g (Unchecked.sbyte a)
-       | ConstValue(TConst_int32  a,_) -> mk_int8_value g (Unchecked.sbyte a)
-       | ConstValue(TConst_int64  a,_) -> mk_int8_value g (Unchecked.sbyte a)
-       | ConstValue(TConst_byte  a,_) -> mk_int8_value g (Unchecked.sbyte a)
-       | ConstValue(TConst_uint16 a,_) -> mk_int8_value g (Unchecked.sbyte a)
-       | ConstValue(TConst_uint32 a,_) -> mk_int8_value g (Unchecked.sbyte a)
-       | ConstValue(TConst_uint64 a,_) -> mk_int8_value g (Unchecked.sbyte a)
-       | _ -> UnknownValue
-    | [ I_arith (AI_conv(DT_I2))],[a],[ty] when type_equiv g ty g.int16_ty  -> 
-       match strip_value a with
-       | ConstValue(TConst_int32  a,_) -> mk_int16_value g (Unchecked.int16 a)
-       | ConstValue(TConst_int16  a,_) -> mk_int16_value g (Unchecked.int16 a)
-       | ConstValue(TConst_sbyte   a,_) -> mk_int16_value g (Unchecked.int16 a)
-       | ConstValue(TConst_int64  a,_) -> mk_int16_value g (Unchecked.int16 a)
-       | ConstValue(TConst_uint32 a,_) -> mk_int16_value g (Unchecked.int16 a)
-       | ConstValue(TConst_uint16 a,_) -> mk_int16_value g (Unchecked.int16 a)
-       | ConstValue(TConst_byte  a,_) -> mk_int16_value g (Unchecked.int16 a)
-       | ConstValue(TConst_uint64 a,_) -> mk_int16_value g (Unchecked.int16 a)
-       | _ -> UnknownValue
-    | [ I_arith (AI_conv(DT_I4))],[a],[ty] when type_equiv g ty g.int32_ty -> 
-       match strip_value a with
-       | ConstValue(TConst_int32  a,_) -> mk_int32_value g (Unchecked.int32 a)
-       | ConstValue(TConst_int16  a,_) -> mk_int32_value g (Unchecked.int32 a)
-       | ConstValue(TConst_sbyte   a,_) -> mk_int32_value g (Unchecked.int32 a)
-       | ConstValue(TConst_int64  a,_) -> mk_int32_value g (Unchecked.int32 a)
-       | ConstValue(TConst_uint32 a,_) -> mk_int32_value g (Unchecked.int32 a)
-       | ConstValue(TConst_uint16 a,_) -> mk_int32_value g (Unchecked.int32 a)
-       | ConstValue(TConst_byte  a,_) -> mk_int32_value g (Unchecked.int32 a)
-       | ConstValue(TConst_uint64 a,_) -> mk_int32_value g (Unchecked.int32 a)
-       | _ -> UnknownValue
-    | [ I_arith (AI_conv(DT_I8))],[a],[ty] when type_equiv g ty g.int64_ty  -> 
-       match strip_value a with
-       | ConstValue(TConst_int32  a,_) -> mk_int64_value g (Unchecked.int64 a)
-       | ConstValue(TConst_int16  a,_) -> mk_int64_value g (Unchecked.int64 a)
-       | ConstValue(TConst_sbyte  a,_) -> mk_int64_value g (Unchecked.int64 a)
-       | ConstValue(TConst_int64  a,_) -> mk_int64_value g (Unchecked.int64 a)
-       | ConstValue(TConst_uint32 a,_) -> mk_int64_value g (Unchecked.int64 a)
-       | ConstValue(TConst_uint16 a,_) -> mk_int64_value g (Unchecked.int64 a)
-       | ConstValue(TConst_byte   a,_) -> mk_int64_value g (Unchecked.int64 a)
-       | ConstValue(TConst_uint64 a,_) -> mk_int64_value g (Unchecked.int64 a)
-       | _ -> UnknownValue
-    | [ I_arith AI_clt_un ],[a;b],[ty] when type_equiv g ty g.bool_ty  -> 
-       match strip_value a,strip_value b with
-       | ConstValue(TConst_char   a1,_),ConstValue(TConst_char   a2,_) -> mk_bool_value g (a1 < a2)
-       | ConstValue(TConst_byte   a1,_),ConstValue(TConst_byte  a2,_)  -> mk_bool_value g (a1 < a2)
-       | ConstValue(TConst_uint16 a1,_),ConstValue(TConst_uint16 a2,_) -> mk_bool_value g (a1 < a2)
-       | ConstValue(TConst_uint32 a1,_),ConstValue(TConst_uint32 a2,_) -> mk_bool_value g (a1 < a2)
-       | ConstValue(TConst_uint64 a1,_),ConstValue(TConst_uint64 a2,_) -> mk_bool_value g (a1 < a2)
-       | _ -> UnknownValue
-    | [ I_arith AI_cgt ],[a;b],[ty] when type_equiv g ty g.bool_ty  -> 
-       match strip_value a,strip_value b with
-       | ConstValue(TConst_sbyte a1,_),ConstValue(TConst_sbyte  a2,_) -> mk_bool_value g (a1 > a2)
-       | ConstValue(TConst_int16 a1,_),ConstValue(TConst_int16 a2,_)  -> mk_bool_value g (a1 > a2)
-       | ConstValue(TConst_int32 a1,_),ConstValue(TConst_int32 a2,_)  -> mk_bool_value g (a1 > a2)
-       | ConstValue(TConst_int64 a1,_),ConstValue(TConst_int64 a2,_)  -> mk_bool_value g (a1 > a2)
-       | _ -> UnknownValue
-    | [ I_arith AI_cgt_un ],[a;b],[ty] when type_equiv g ty g.bool_ty   -> 
-       match strip_value a,strip_value b with
-       | ConstValue(TConst_char   a1,_),ConstValue(TConst_char   a2,_) -> mk_bool_value g (a1 > a2)
-       | ConstValue(TConst_byte   a1,_),ConstValue(TConst_byte  a2,_)  -> mk_bool_value g (a1 > a2)
-       | ConstValue(TConst_uint16 a1,_),ConstValue(TConst_uint16 a2,_) -> mk_bool_value g (a1 > a2)
-       | ConstValue(TConst_uint32 a1,_),ConstValue(TConst_uint32 a2,_) -> mk_bool_value g (a1 > a2)
-       | ConstValue(TConst_uint64 a1,_),ConstValue(TConst_uint64 a2,_) -> mk_bool_value g (a1 > a2)
-       | _ -> UnknownValue
-    | [ I_arith AI_shl ],[a;n],_ -> 
-       match strip_value a,strip_value n with
-       | ConstValue(TConst_int64  a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 63 -> (mk_int64_value  g (a <<< n))
-       | ConstValue(TConst_int32  a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 31 -> (mk_int32_value  g (a <<< n))
-       | ConstValue(TConst_int16  a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 15 -> (mk_int16_value  g (a <<< n))
-       | ConstValue(TConst_sbyte  a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 7  -> (mk_int8_value   g (a <<< n))
-       | ConstValue(TConst_uint64 a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 63 -> (mk_uint64_value g (a <<< n))
-       | ConstValue(TConst_uint32 a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 31 -> (mk_uint32_value g (a <<< n))
-       | ConstValue(TConst_uint16 a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 15 -> (mk_uint16_value g (a <<< n))
-       | ConstValue(TConst_byte   a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 7  -> (mk_uint8_value  g (a <<< n))
-       | _ -> UnknownValue
-
-    | [ I_arith AI_shr ],[a;n],_ -> 
-       match strip_value a,strip_value n with
-       | ConstValue(TConst_sbyte a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 7  -> (mk_int8_value  g (a >>> n))
-       | ConstValue(TConst_int16 a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 15 -> (mk_int16_value g (a >>> n))
-       | ConstValue(TConst_int32 a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 31 -> (mk_int32_value g (a >>> n))
-       | ConstValue(TConst_int64 a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 63 -> (mk_int64_value g (a >>> n))
-       | _ -> UnknownValue
-    | [ I_arith AI_shr_un ],[a;n],_ -> 
-       match strip_value a,strip_value n with
-       | ConstValue(TConst_byte   a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 7  -> (mk_uint8_value g  (a >>> n))
-       | ConstValue(TConst_uint16 a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 15 -> (mk_uint16_value g (a >>> n))
-       | ConstValue(TConst_uint32 a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 31 -> (mk_uint32_value g (a >>> n))
-       | ConstValue(TConst_uint64 a,_),ConstValue(TConst_int32 n,_) when n >= 0 && n <= 63 -> (mk_uint64_value g (a >>> n))
-       | _ -> UnknownValue
-       
-    // Retypings using IL asm "" are quite common in prim-types.fs
-    // Sometimes these are only to get the primitives to pass the type checker.
-    // Here we check for retypings from know values to known types.
-    // We're conservative not to apply any actual data-changing conversions here.
-    | [ ],[v],[ty] -> 
-       match strip_value v with
-       | ConstValue(TConst_bool   a,_) ->
-            if type_equiv g ty g.bool_ty then v
-            elif type_equiv g ty g.sbyte_ty then mk_int8_value g (if a then 1y else 0y)
-            elif type_equiv g ty g.int16_ty then mk_int16_value g (if a then 1s else 0s)
-            elif type_equiv g ty g.int32_ty then mk_int32_value g (if a then 1 else 0)
-            elif type_equiv g ty g.byte_ty then mk_uint8_value g (if a then 1uy else 0uy)
-            elif type_equiv g ty g.uint16_ty then mk_uint16_value g (if a then 1us else 0us)
-            elif type_equiv g ty g.uint32_ty then mk_uint32_value g (if a then 1u else 0u)
-            else UnknownValue
-       | ConstValue(TConst_sbyte   a,_) ->
-            if type_equiv g ty g.sbyte_ty then v
-            elif type_equiv g ty g.int16_ty then mk_int16_value g (Unchecked.int16 a)
-            elif type_equiv g ty g.int32_ty then mk_int32_value g (Unchecked.int32 a)
-            else UnknownValue
-       | ConstValue(TConst_byte   a,_) ->
-            if type_equiv g ty g.byte_ty then v
-            elif type_equiv g ty g.uint16_ty then mk_uint16_value g (Unchecked.uint16 a)
-            elif type_equiv g ty g.uint32_ty then mk_uint32_value g (Unchecked.uint32 a)
-            else UnknownValue
-       | ConstValue(TConst_int16   a,_) ->
-            if type_equiv g ty g.int16_ty then v
-            elif type_equiv g ty g.int32_ty then mk_int32_value g (Unchecked.int32 a)
-            else UnknownValue
-       | ConstValue(TConst_uint16   a,_) ->
-            if type_equiv g ty g.uint16_ty then v
-            elif type_equiv g ty g.uint32_ty then mk_uint32_value g (Unchecked.uint32 a)
-            else UnknownValue
-       | ConstValue(TConst_int32   a,_) ->
-            if type_equiv g ty g.int32_ty then v
-            elif type_equiv g ty g.uint32_ty then mk_uint32_value g (Unchecked.uint32 a)
-            else UnknownValue
-       | ConstValue(TConst_uint32   a,_) ->
-            if type_equiv g ty g.uint32_ty then v
-            elif type_equiv g ty g.int32_ty then mk_int32_value g (Unchecked.int32 a)
-            else UnknownValue
-       | ConstValue(TConst_int64   a,_) ->
-            if type_equiv g ty g.int64_ty then v
-            elif type_equiv g ty g.uint64_ty then mk_uint64_value g (Unchecked.uint64 a)
-            else UnknownValue
-       | ConstValue(TConst_uint64   a,_) ->
-            if type_equiv g ty g.uint64_ty then v
-            elif type_equiv g ty g.int64_ty then mk_int64_value g (Unchecked.int64 a)
-            else UnknownValue
-       | _ -> UnknownValue
-    | _ -> UnknownValue
-
-
-//-------------------------------------------------------------------------
-// Size constants and combinators
-//------------------------------------------------------------------------- 
-
-let local_var_size = 1
-
-let rec AddTotalSizesAux acc l = match l with [] -> acc | h::t -> AddTotalSizesAux (h.TotalSize + acc) t
-let AddTotalSizes l = AddTotalSizesAux 0 l
-
-let rec AddFunctionSizesAux acc l = match l with [] -> acc | h::t -> AddFunctionSizesAux (h.FunctionSize + acc) t
-let AddFunctionSizes l = AddFunctionSizesAux 0 l
-
-let AddTotalSizesFlat l = l |> FlatList.sum_by (fun x -> x.TotalSize) 
-let AddFunctionSizesFlat l = l |> FlatList.sum_by (fun x -> x.FunctionSize) 
-
-//-------------------------------------------------------------------------
-// opt list/array combinators - zipping (_,_) return type
-//------------------------------------------------------------------------- 
-let rec or_effects l = match l with [] -> false | h::t -> h.HasEffect || or_effects t
-let or_effects_Flat l = FlatList.exists (fun x -> x.HasEffect) l
-
-let rec or_tailcalls l = match l with [] -> false | h::t -> h.MightMakeCriticalTailcall || or_tailcalls t
-let or_tailcalls_Flat l = FlatList.exists (fun x -> x.MightMakeCriticalTailcall) l
-        
-let rec OptimizeListAux f l acc1 acc2 = 
-    match l with 
-    | [] -> List.rev acc1, List.rev acc2
-    | (h ::t) -> 
-        let (x1,x2)  = f h
-        OptimizeListAux f t (x1::acc1) (x2::acc2) 
-
-let OptimizeList f l = OptimizeListAux f l [] [] 
-
-let OptimizeFlatList f l = l |> FlatList.map f |> FlatList.unzip 
-
-(* let opt_array f l = let l1,l2 = OptimizeList f (Array.to_list l) in Array.of_list l1, l2 *)
-
-let no_exprs : (expr list * list>)= [],[]
-let no_FlatExprs : (FlatExprs * FlatList>) = FlatList.empty, FlatList.empty
-
-//-------------------------------------------------------------------------
-// Common ways of building new value_infos
-//------------------------------------------------------------------------- 
-
-let CombineValueInfos einfos res = 
-      { TotalSize  = AddTotalSizes einfos;
-        FunctionSize  = AddFunctionSizes einfos;
-        HasEffect = or_effects einfos; 
-        MightMakeCriticalTailcall = or_tailcalls einfos; 
-        Info = res }
-
-let CombineFlatValueInfos einfos res = 
-      { TotalSize  = AddTotalSizesFlat einfos;
-        FunctionSize  = AddFunctionSizesFlat einfos;
-        HasEffect = or_effects_Flat einfos; 
-        MightMakeCriticalTailcall = or_tailcalls_Flat einfos; 
-        Info = res }
-
-let CombineValueInfosUnknown einfos = CombineValueInfos einfos UnknownValue
-let CombineFlatValueInfosUnknown einfos = CombineFlatValueInfos einfos UnknownValue
-
-//-------------------------------------------------------------------------
-// Hide information because of a signature
-//------------------------------------------------------------------------- 
-
-let AbstractLazyModulInfoByHiding isAssemblyBoundary m mhi =
-
-(* Previously: "This code is not sound when abstracting at the assembly boundary. 
-                1. The MHI is not looking at 'internal' access attributes".
-   Now, the freevars and FreeTyvars can indicate if the non-public (hidden) items have been used.
-   Under those checks, the further hidden* checks may be subsumed (meaning, not required anymore).
-*)
-    let hiddenTycon,hiddenTyconRepr,hiddenVal, hiddenRfield, hiddenUconstr = 
-        Zset.mem_of mhi.mhiTycons, 
-        Zset.mem_of mhi.mhiTyconReprs, 
-        Zset.mem_of mhi.mhiVals, 
-        Zset.mem_of mhi.mhiRecdFields, 
-        Zset.mem_of mhi.mhiUnionCases
-
-    let rec abstractExprInfo ivalue = 
-        if verboseOptimizationInfo then dprintf "abstractExprInfo\n"; 
-        match ivalue with 
-        (* Check for escaping value. Revert to old info if possible  *)
-        | ValValue (vref2,detail) ->
-            let detail' = abstractExprInfo detail 
-            let v2 = (deref_val vref2) 
-            let tyvars = free_in_val CollectAll v2 
-            if  
-                (isAssemblyBoundary && not (free_tyvars_all_public tyvars)) || 
-                Zset.exists hiddenTycon tyvars.FreeTycons || 
-                hiddenVal v2
-            then detail'
-            else ValValue (vref2,detail')
-        (* Check for escape in lambda *)
-        | CurriedLambdaValue (_,_,_,expr,_) | ConstExprValue(_,expr) when            
-            (let fvs = free_in_expr CollectAll expr
-             (*dprintf "abstractModulInfoByHiding, #fvs.FreeLocals = %d, #fvs.FreeRecdFields = %d\n" (List.length (Zset.elements fvs.FreeLocals)) (List.length (Zset.elements fvs.FreeRecdFields)); *)
-             (isAssemblyBoundary && not (freevars_all_public fvs))      || 
-             Zset.exists hiddenVal       fvs.FreeLocals               ||
-             Zset.exists hiddenTycon     fvs.FreeTyvars.FreeTycons ||
-             Zset.exists hiddenTyconRepr fvs.FreeLocalTyconReprs        ||
-             Zset.exists hiddenRfield    fvs.FreeRecdFields               ||
-             Zset.exists hiddenUconstr   fvs.FreeUnionCases ) ->
-                UnknownValue
-        (* Check for escape in constant *)
-        | ConstValue(_,ty) when 
-            (let ftyvs = free_in_type CollectAll ty
-             (isAssemblyBoundary && not (free_tyvars_all_public ftyvs)) || 
-             Zset.exists hiddenTycon ftyvs.FreeTycons) ->
-                UnknownValue
-        | TupleValue vinfos         -> TupleValue (Array.map abstractExprInfo vinfos)
-        | RecdValue (tcref,vinfos)  -> 
-            if hiddenTyconRepr (deref_tycon tcref) || Array.exists (rfref_of_rfield tcref >> hiddenRfield) tcref.AllFieldsArray
-            then UnknownValue 
-            else RecdValue (tcref,Array.map abstractExprInfo vinfos)
-        | UnionCaseValue(ucref,vinfos) -> 
-            let tcref = ucref.TyconRef
-            if hiddenTyconRepr ucref.Tycon || tcref.UnionCasesArray |> Array.exists (ucref_of_ucase tcref >> hiddenUconstr) 
-            then UnknownValue 
-            else UnionCaseValue (ucref,Array.map abstractExprInfo vinfos)
-        | ModuleValue sinfo         -> ModuleValue (abstractModulInfo sinfo)
-        | SizeValue(vdepth,vinfo)   -> MakeSizedValueInfo (abstractExprInfo vinfo)
-        | UnknownValue  
-        | ConstExprValue _   
-        | CurriedLambdaValue _ 
-        | ConstValue _  -> ivalue
-    and abstractValInfo v = { ValExprInfo=abstractExprInfo v.ValExprInfo; ValMakesNoCriticalTailcalls=v.ValMakesNoCriticalTailcalls }
-    and abstractModulInfo ss =
-         if verboseOptimizationInfo then dprintf "abstractModulInfo\n"; 
-         { ModuleOrNamespaceInfos = NameMap.map abstractLazyModulInfo ss.ModuleOrNamespaceInfos;
-           ValInfos = 
-               ss.ValInfos 
-               |> NameMap.filterRange (fst >> deref_val >> hiddenVal >> not)
-               |> NameMap.map (fun (vref,e) -> 
-                check "its implementation uses a binding hidden by a signature" m vref (abstractValInfo e) )  } 
-    and abstractLazyModulInfo (ss:LazyModuleInfo) = 
-          ss.Force() |> abstractModulInfo |> notlazy
-
-    abstractLazyModulInfo
-
-/// Hide all information except what we need for "must inline". We always save this optimization information
-let AbstractLazyModulInfoToEssentials =
-
-    let rec abstractModulInfo (ss:ModuleInfo) =
-         { ModuleOrNamespaceInfos = NameMap.map (Lazy.force >> abstractModulInfo >> notlazy) ss.ModuleOrNamespaceInfos;
-           ValInfos =  ss.ValInfos  |> NameMap.filterRange (fun (v,_) -> v.MustInline) }
-    and abstractLazyModulInfo ss = ss |> Lazy.force |> abstractModulInfo |> notlazy
-      
-    abstractLazyModulInfo
-
-
-//-------------------------------------------------------------------------
-// Hide information because of a "let ... in ..." or "let rec  ... in ... "
-//------------------------------------------------------------------------- 
-
-let AbstractExprInfoByVars m (boundVars:Val list,boundTyVars) ivalue =
-  // Module and member bindings can be skipped when checking abstraction, since abstraction of these values has already been done when 
-  // we hit the end of the module and called AbstractLazyModulInfoByHiding. If we don't skip these then we end up quadtratically retraversing  
-  // the inferred optimization data, i.e. at each binding all the way up a sequences of 'lets' in a module. 
-  let boundVars = boundVars |> List.filter (fun v -> not v.IsMemberOrModuleBinding)
-
-  match boundVars,boundTyVars with 
-  | [],[] -> ivalue
-  | _ -> 
-      //let dump() = 
-      //            boundVars |> List.iter (fun v -> dprintf "  -- bv  %s @ %a\n" v.MangledName output_range v.Range);
-      //            boundTyVars |> List.iter (fun v -> dprintf "  -- btyv  %s @ %a\n" v.Name output_range v.Range)
-
-      let rec abstractExprInfo ivalue =
-          match ivalue with 
-        (* Check for escaping value. Revert to old info if possible  *)
-          | ValValue (VRef_private v2,detail) when  
-            (nonNil boundVars && List.exists (vspec_eq v2) boundVars) || 
-            (nonNil boundTyVars &&
-             let ftyvs = free_in_val CollectTypars v2
-             List.exists (Zset.mem_of ftyvs.FreeTypars) boundTyVars) -> 
-
-              if verboseOptimizationInfo then 
-                  dprintf "hiding value '%s' when used in expression (see %a)\n" v2.MangledName output_range v2.Range;
-                  let ftyvs = free_in_val CollectTypars v2
-                  ftyvs.FreeTypars |> Zset.iter (fun v -> dprintf "  -- ftyv  %s @ %a\n" v.Name output_range v.Range);
-                  boundVars |> List.iter (fun v -> dprintf "  -- bv  %s @ %a\n" v.MangledName output_range v.Range);
-                  boundTyVars |> List.iter (fun v -> dprintf "  -- btyv  %s @ %a\n" v.Name output_range v.Range)
-
-              abstractExprInfo detail
-          | ValValue (v2,detail) -> 
-              let detail' = abstractExprInfo detail
-              ValValue (v2,detail')
-        
-          // Check for escape in lambda 
-          | CurriedLambdaValue (_,_,_,expr,_) | ConstExprValue(_,expr)  when 
-            (let fvs = free_in_expr (if isNil boundTyVars then CollectLocals else CollectTyparsAndLocals) expr
-             (nonNil boundVars   && List.exists (Zset.mem_of fvs.FreeLocals) boundVars) or
-             (nonNil boundTyVars && List.exists (Zset.mem_of fvs.FreeTyvars.FreeTypars) boundTyVars) or
-             (fvs.UsesMethodLocalConstructs )) ->
-              if verboseOptimizationInfo then 
-                  let fvs = free_in_expr (if isNil boundTyVars then CollectLocals else CollectTyparsAndLocals) expr
-                  dprintf "Trimming lambda @ %a, UsesMethodLocalConstructs = %b, ExprL = %s\n"  output_range (range_of_expr expr) fvs.UsesMethodLocalConstructs (showL (ExprL expr));
-                  fvs.FreeLocals |> Zset.iter (fun v -> dprintf "fv  %s @ %a\n" v.MangledName output_range v.Range);
-                  fvs.FreeTyvars.FreeTypars |> Zset.iter (fun v -> dprintf "ftyv  %s @ %a\n" v.Name output_range v.Range);
-                  boundVars |> List.iter (fun v -> dprintf "bv  %s @ %a\n" v.MangledName output_range v.Range);
-                  boundTyVars |> List.iter (fun v -> dprintf "btyv  %s @ %a\n" v.Name output_range v.Range)
-
-              UnknownValue
-
-          // Check for escape in generic constant
-          | ConstValue(_,ty) when 
-            (nonNil boundTyVars && 
-             (let ftyvs = free_in_type CollectTypars ty
-              List.exists (Zset.mem_of ftyvs.FreeTypars) boundTyVars)) ->
-              UnknownValue
-
-          // Otherwise check all sub-values 
-          | TupleValue vinfos -> TupleValue (Array.map (abstractExprInfo) vinfos)
-          | RecdValue (tcref,vinfos) -> RecdValue (tcref,Array.map (abstractExprInfo) vinfos)
-          | UnionCaseValue (cspec,vinfos) -> UnionCaseValue(cspec,Array.map (abstractExprInfo) vinfos)
-          | ModuleValue sinfo -> ModuleValue (abstractModulInfo sinfo)
-          | CurriedLambdaValue _ 
-          | ConstValue _ 
-          | ConstExprValue _ 
-          | UnknownValue -> ivalue
-          | SizeValue (vdepth,vinfo) -> MakeSizedValueInfo (abstractExprInfo vinfo)
-
-      and abstractValInfo v = 
-          { ValExprInfo=abstractExprInfo v.ValExprInfo; 
-            ValMakesNoCriticalTailcalls=v.ValMakesNoCriticalTailcalls }
-
-      and abstractModulInfo ss =
-         { ModuleOrNamespaceInfos  = ss.ModuleOrNamespaceInfos  |> NameMap.map (Lazy.force >> abstractModulInfo >> notlazy) ;
-           ValInfos = ss.ValInfos |> NameMap.map (fun (vref,e) -> 
-               if verboseOptimizationInfo then dprintf "checking %s @ %a\n" vref.MangledName output_range (vref.Range); 
-               check "its implementation uses a private binding" m vref (abstractValInfo e) ) }
-
-      abstractExprInfo ivalue
-
-//-------------------------------------------------------------------------
-// Rewrite optimization, e.g. to use public stable references so we can pickle it
-// to disk.
-//------------------------------------------------------------------------- 
-let RemapLazyModulInfo g tmenv =
-
-    let rec remapExprInfo ivalue = 
-        if verboseOptimizationInfo then dprintf "remapExprInfo\n"; 
-        match ivalue with 
-        | ValValue (v,detail)      -> ValValue (remap_vref tmenv v,remapExprInfo detail)
-        | TupleValue vinfos         -> TupleValue (Array.map remapExprInfo vinfos)
-        | RecdValue (tcref,vinfos)  -> RecdValue (remap_tcref tmenv.tcref_remap tcref, Array.map remapExprInfo vinfos)
-        | UnionCaseValue(cspec,vinfos) -> UnionCaseValue (remap_ucref tmenv.tcref_remap cspec,Array.map remapExprInfo vinfos)
-        | ModuleValue sinfo         -> ModuleValue (remapModulInfo sinfo)
-        | SizeValue(vdepth,vinfo) -> MakeSizedValueInfo (remapExprInfo vinfo)
-        | UnknownValue              -> UnknownValue
-        | CurriedLambdaValue (uniq,arity,sz,expr,typ)  -> CurriedLambdaValue (uniq,arity,sz,remap_expr g CloneAll tmenv expr,remap_possible_forall_typ g tmenv typ)  
-        | ConstValue (c,ty)  -> ConstValue (c,remap_possible_forall_typ g tmenv ty)
-        | ConstExprValue (sz,expr)  -> ConstExprValue (sz,remap_expr g CloneAll tmenv expr)
-
-    and remapValInfo v = { ValExprInfo=remapExprInfo v.ValExprInfo; ValMakesNoCriticalTailcalls=v.ValMakesNoCriticalTailcalls }
-    and remapModulInfo ss =
-         if verboseOptimizationInfo then dprintf "remapModulInfo\n"; 
-         { ModuleOrNamespaceInfos = ss.ModuleOrNamespaceInfos |> NameMap.map RemapLazyModulInfo;
-           ValInfos = ss.ValInfos |> NameMap.map (fun (vref,vinfo) -> 
-                                                     let vref' = remap_vref tmenv vref 
-                                                     let vinfo = remapValInfo vinfo
-                                                     // Propogate any inferred ValMakesNoCriticalTailcalls flag from implementation to signature information
-                                                     if vinfo.ValMakesNoCriticalTailcalls then set_notailcall_hint_of_vflags vref'.Deref.Data true
-                                                     (vref',vinfo)) } 
-
-    and RemapLazyModulInfo ss =
-         ss |> Lazy.force |> remapModulInfo |> notlazy
-           
-    RemapLazyModulInfo
-
-//-------------------------------------------------------------------------
-// Hide information when a value is no longer visible
-//------------------------------------------------------------------------- 
-
-let AbstractAndRemapModulInfo msg g m (repackage,hidden) info =
-    let mrpi = mk_repackage_remapping repackage
-    if verboseOptimizationInfo then dprintf "%s - %a - Optimization data prior to trim: \n%s\n" msg output_range m (Layout.showL (Layout.squashTo 192 (moduleInfoL info)));
-    let info = info |> AbstractLazyModulInfoByHiding false m hidden
-    if verboseOptimizationInfo then dprintf "%s - %a - Optimization data after trim:\n%s\n" msg output_range m (Layout.showL (Layout.squashTo 192 (moduleInfoL info)));
-    let info = info |> RemapLazyModulInfo g mrpi
-    if verboseOptimizationInfo then dprintf "%s - %a - Optimization data after remap:\n%s\n" msg output_range m (Layout.showL (Layout.squashTo 192 (moduleInfoL info)));
-    info
-
-//-------------------------------------------------------------------------
-// Misc helerps
-//------------------------------------------------------------------------- 
-
-(* Mark some variables (the ones we introduce via abstractBigTargets) as don't-eliminate *)
-let suffixForVariablesThatMayNotBeEliminated = "$cont"
-
-/// Type applications of F# "type functions" may cause side effects, e.g. 
-/// let x<'a> = printfn "hello"; typeof<'a> 
-/// In this case do not treat them as constants. 
-let IsTyFuncValRefExpr = function 
-    | TExpr_val (fv,_,_) -> fv.IsTypeFunction
-    | _ -> false
-
-/// Type applications of existing functions are always simple constants, with the exception of F# 'type functions' 
-/// REVIEW: we could also include any under-applied application here. 
-let rec IsSmallConstExpr x =
-    match x with
-    | TExpr_val (v,_,m) -> not v.IsMutable
-    | TExpr_app(fe,_,tyargs,args,_) -> isNil(args) && not (IsTyFuncValRefExpr fe) && IsSmallConstExpr fe
-    | _ -> false
-
-let ValueOfExpr expr = 
-    if IsSmallConstExpr expr then 
-      ConstExprValue(0,expr)
-    else UnknownValue
-
-//-------------------------------------------------------------------------
-// Dead binding elimination 
-//------------------------------------------------------------------------- 
- 
-let ValueIsUsedOrHasEffect cenv m fvs (b:Binding,binfo) =
-    let v = b.Var
-    not (cenv.settings.EliminateUnusedBindings()) ||
-    isSome v.MemberInfo ||
-    binfo.HasEffect || 
-    Zset.mem v fvs
-
-let rec SplitValuesByIsUsedOrHasEffect cenv m fvs x = 
-    x |> FlatList.filter (ValueIsUsedOrHasEffect cenv m fvs) |> FlatList.unzip
-
-//-------------------------------------------------------------------------
-// 
-//------------------------------------------------------------------------- 
-
-let IlAssemblyCodeInstrHasEffect i = 
-    match i with 
-    | I_arith (  AI_nop | AI_ldc _ | AI_add | AI_sub | AI_mul | AI_xor | AI_and | AI_or 
-               | AI_ceq | AI_cgt | AI_cgt_un | AI_clt | AI_clt_un | AI_conv _ | AI_shl 
-               | AI_shr | AI_shr_un | AI_neg | AI_not | AI_ldnull )
-    | I_ldstr _ | I_ldtoken _  -> false
-    | _ -> true
-  
-let IlAssemblyCodeHasEffect instrs = List.exists IlAssemblyCodeInstrHasEffect instrs
-
-//-------------------------------------------------------------------------
-// Effects
-//
-// note: allocating an object with observable identity (i.e. a name) 
-// or reading from a mutable field counts as an 'effect', i.e.
-// this context 'effect' has it's usual meaning in the effect analysis literature of 
-//   read-from-mutable 
-//   write-to-mutable 
-//   name-generation
-//   arbitrary-side-effect (e.g. 'non-termination' or 'fire the missiles')
-//------------------------------------------------------------------------- 
-
-let rec ExprHasEffect g expr = 
-    match expr with 
-    | TExpr_val (vref,_,_) -> vref.IsTypeFunction or (vref.IsMutable)
-    | TExpr_quote _ 
-    | TExpr_lambda _
-    | TExpr_tlambda _ 
-    | TExpr_const _ -> false
-    /// type applications do not have effects, with the exception of type functions
-    | TExpr_app(f0,_,_,[],_) -> (IsTyFuncValRefExpr f0) or ExprHasEffect g f0
-    | TExpr_op(op,_,args,_) -> ExprsHaveEffect g args || OpHasEffect g op
-    | TExpr_letrec(binds,body,_,_) -> BindingsHaveEffect g binds || ExprHasEffect g body
-    | TExpr_let(bind,body,_,_) -> BindingHasEffect g bind || ExprHasEffect g body
-    // REVIEW: could add TExpr_obj on an interface type - these are similar to records of lambda expressions 
-    | _ -> true
-and ExprsHaveEffect g exprs = List.exists (ExprHasEffect g) exprs
-and BindingsHaveEffect g binds = FlatList.exists (BindingHasEffect g) binds
-and BindingHasEffect g bind = bind.Expr |> ExprHasEffect g
-and OpHasEffect g op = 
-    match op with 
-    | TOp_tuple -> false
-    | TOp_recd (ctor,tcref) -> 
-        match ctor with 
-        | RecdExprIsObjInit -> true
-        | RecdExpr -> tcref_alloc_observable tcref
-    | TOp_ucase ucref -> tcref_alloc_observable ucref.TyconRef
-    | TOp_exnconstr ecref -> ecref_alloc_observable ecref
-    | TOp_bytes _ | TOp_uint16s _ | TOp_array -> true (* alloc observable *)
-    | TOp_ucase_tag_get _ -> false
-    | TOp_ucase_proof _ -> false
-    | TOp_ucase_field_get (ucref,n) -> ucref_rfield_mutable g ucref n 
-    | TOp_asm(instrs,_) -> IlAssemblyCodeHasEffect instrs
-    | TOp_tuple_field_get(_) -> false
-    | TOp_exnconstr_field_get(ecref,n) -> ecref_rfield_mutable ecref n 
-    | TOp_get_ref_lval -> false
-    | TOp_rfield_get rfref  -> rfref.RecdField.IsMutable
-    | TOp_field_get_addr rfref  -> true (* check *)
-    | TOp_ucase_field_set _
-    | TOp_exnconstr_field_set _
-    | TOp_coerce
-    | TOp_rethrow
-    | TOp_for _ 
-    | TOp_while  _
-    | TOp_try_catch _
-    | TOp_try_finally _ (* note: these really go through a different path anyway *)
-    | TOp_trait_call _
-    | TOp_goto _
-    | TOp_label _
-    | TOp_return
-    | TOp_ilcall _ (* conservative *)
-    | TOp_lval_op _  (* conservative *)
-    | TOp_rfield_set _ -> true
-
-
-let TryEliminateBinding cenv env (TBind(vspec1,e1,spBind)) e2 m  =
-    // don't eliminate bindings if we're not optimizing AND the binding is not a compiler generated variable
-    if not (cenv.optimizing && cenv.settings.EliminateImmediatelyConsumedLocals()) && 
-       not vspec1.IsCompilerGenerated then 
-       None 
-    else
-        // Peephole on immediate consumption of single bindings, e.g. "let x = e in x" --> "e" 
-        // REVIEW: enhance this by general elimination of bindings to 
-        // non-side-effecting expressions that are used only once. 
-        // But note the cases below cover some instances of side-effecting expressions as well.... 
-        let IsUniqueUse vspec2 args = 
-              vspec_eq vspec1 vspec2  
-           && (not (vspec2.MangledName.Contains(suffixForVariablesThatMayNotBeEliminated)))
-           // REVIEW: this looks slow. Look only for one variable instead 
-           && (let fvs = acc_free_in_exprs CollectLocals args empty_freevars
-               not (Zset.mem vspec1 fvs.FreeLocals))
-
-        // Immediate consumption of value as 2nd or subsequent argument to a construction or projection operation 
-        let rec GetImmediateUseContext rargsl argsr = 
-              match argsr with 
-              | (TExpr_val(VRef_private vspec2,_,_)) :: argsr2
-                 when vspec_eq vspec1 vspec2 && IsUniqueUse vspec2 (List.rev rargsl@argsr2) -> Some(List.rev rargsl,argsr2)
-              | argsrh :: argsrt when not (ExprHasEffect cenv.g argsrh) -> GetImmediateUseContext (argsrh::rargsl) argsrt 
-              | _ -> None
-
-        match strip_expr e2 with 
-
-         // Immediate consumption of value as itself 'let x = e in x'
-         | TExpr_val(VRef_private vspec2,_,_) 
-             when IsUniqueUse vspec2 [] -> 
-               // if verbose then dprintf "Simplifying let x = e in x near %a\n" output_range m;
-               Some e1
-
-         // Immediate consumption of value by a pattern match 'let x = e in match x with ...'
-         | TExpr_match(spMatch,exprm,TDSwitch(TExpr_val(VRef_private vspec2,_,_),cases,dflt,_),targets,m,ty2,_)
-             when (vspec_eq vspec1 vspec2 && 
-                   let fvs = acc_free_in_targets CollectLocals targets (acc_free_in_switch_cases CollectLocals cases dflt empty_freevars)
-                   not (Zset.mem vspec1 fvs.FreeLocals)) -> 
-                    (* if verbose then dprintf "Simplifying let x = e in match x with ... near %a\n" output_range m;*)
-              let spMatch = spBind.Combine(spMatch)
-              Some (TExpr_match(spMatch,range_of_expr e1,TDSwitch(e1,cases,dflt,m),targets,m,ty2,SkipFreeVarsCache()))
-               
-         // Immediate consumption of value as a function 'let f = e in f ...'
-         // Note functions are evaluated before args 
-         // Note: do not include functions with a single arg of unit type, introduced by abstractBigTargets 
-         | TExpr_app(f,f0ty,tyargs,args,m) 
-               when not (vspec1.MangledName.Contains(suffixForVariablesThatMayNotBeEliminated)) ->
-             match GetImmediateUseContext [] (f::args) with 
-             | Some([],rargs) -> Some (MakeApplicationAndBetaReduce cenv.g (e1,f0ty,[tyargs],rargs ,m))
-             | Some(f::largs,rargs) -> Some (MakeApplicationAndBetaReduce cenv.g (f,f0ty,[tyargs],largs @ (e1::rargs),m))
-             | None -> None
-
-         // Immediate consumption of value as first non-effectful argument to a construction or projection operation 
-         // 'let x = e in op[x;....]'
-         | TExpr_op (c,tyargs,args,m) -> 
-             match GetImmediateUseContext [] args with 
-             | Some(largs,rargs) -> Some (TExpr_op (c,tyargs,(largs @ (e1:: rargs)),m))
-             | None -> None
-
-         | _ ->  
-            None
-
-let TryEliminateLet cenv env bind e2 m = 
-    match TryEliminateBinding cenv env bind e2 m with 
-    | Some e2' -> e2',-local_var_size  (* eliminated a let, hence reduce size estimate *)
-    | None -> mk_let_bind m bind e2 ,0
-
-//-------------------------------------------------------------------------
-
-/// Detect the application of a value to an arbitrary number of arguments
-let rec (|KnownValApp|_|) expr = 
-    match strip_expr expr with
-    | TExpr_val(vref,_,_) -> Some(vref,[],[])
-    | TExpr_app(KnownValApp(vref,typeArgs1,otherArgs1),_,typeArgs2,otherArgs2,_) -> Some(vref,typeArgs1@typeArgs2,otherArgs1@otherArgs2)
-    | _ -> None
-
-//-------------------------------------------------------------------------
-// ExpandStructuralBinding
-//
-// Expand bindings to tuple expressions by factoring sub-expression out as prior bindings.
-// Similarly for other structural constructions, like records...
-// If the item is only projected from then the construction (allocation) can be eliminated.
-// This transform encourages that by allowing projections to be simplified.
-//------------------------------------------------------------------------- 
-
-let ExprIsValue = function TExpr_val _ -> true | _ -> false
-let ExpandStructuralBinding cenv env expr =
-    match expr with
-    | TExpr_let (TBind(v,rhs,tgtSeqPtOpt),body,m,_) 
-        when (is_tuple rhs &&  
-              not v.IsCompiledAsTopLevel &&  
-              not v.IsMember && 
-              not v.IsTypeFunction &&
-              not v.IsMutable) ->
-          let args   = try_dest_tuple rhs
-          if List.forall ExprIsValue args then
-              expr (* avoid re-expanding when recursion hits original binding *)
-          else
-              let argTys = dest_tuple_typ cenv.g v.Type
-              let argBind i arg argTy =
-                  let name = v.MangledName ^ "_" ^ string i
-                  let v,ve = mk_compgen_local (range_of_expr arg) name argTy
-                  ve,mk_compgen_bind v arg
-           
-              let ves,binds = List.mapi2 argBind args argTys |> List.unzip
-              let tuple = mk_tupled cenv.g m ves argTys
-              mk_lets_bind m binds (mk_let tgtSeqPtOpt m v tuple body)
-              (* REVIEW: other cases - records, explicit lists etc. *)
-    | expr -> expr
-    
-//-------------------------------------------------------------------------
-// The traversal
-//------------------------------------------------------------------------- 
-
-let rec OptimizeExpr cenv (env:IncrementalOptimizationEnv) expr =
-    if verboseOptimizations then dprintf "OptimizeExpr@%a\n" output_range (range_of_expr expr);
-
-    // Eliminate subsumption coercions for functions. This must be done post-typechecking because we need
-    // complete inference types.
-    let expr = NormalizeAndAdjustPossibleSubsumptionExprs cenv.g expr
-
-    let expr = strip_expr expr
-    
-
-    match expr with
-    (* treat the common linear cases to avoid stack overflows, using an explicit continutation *)
-    | TExpr_seq _ | TExpr_let _ ->  OptimizeLinearExpr cenv env expr (fun x -> x)
-
-    | TExpr_const (c,m,ty) -> OptimizeConst cenv env expr (c,m,ty)
-    | TExpr_val (v,vFlags,m) -> OptimizeVal cenv env expr (v,m)
-    | TExpr_quote(ast,conv,m,ty) -> 
-          TExpr_quote(ast,conv,m,ty),
-          { TotalSize = 10;
-            FunctionSize = 1;
-            HasEffect = false;  
-            MightMakeCriticalTailcall=false;
-            Info=UnknownValue }
-    | TExpr_obj (_,typ,basev,expr,overrides,iimpls,m,_) -> OptimizeObjectExpr cenv env (typ,basev,expr,overrides,iimpls,m)
-    | TExpr_op (c,tyargs,args,m) -> OptimizeExprOp cenv env (c,tyargs,args,m)
-    | TExpr_app(f,fty,tyargs,argsl,m) -> OptimizeApplication cenv env (f,fty,tyargs,argsl,m) 
-    (* REVIEW: fold the next two cases together *)
-    | TExpr_lambda(lambdaId,_,argvs,body,m,rty,_) -> 
-        let topValInfo = TopValInfo ([],[argvs |> List.map (fun _ -> TopValInfo.unnamedTopArg1)],TopValInfo.unnamedRetVal)
-        let ty = mk_multi_lambda_ty m argvs rty
-        OptimizeLambdas None cenv env topValInfo expr ty
-    | TExpr_tlambda(lambdaId,tps,body,m,rty,_)  -> 
-        let topValInfo = TopValInfo (TopValInfo.InferTyparInfo tps,[],TopValInfo.unnamedRetVal)
-        let ty = try_mk_forall_ty tps rty
-        OptimizeLambdas None cenv env topValInfo expr ty
-    | TExpr_tchoose _  -> OptimizeExpr cenv env (Typrelns.choose_typar_solutions_for_tchoose cenv.g cenv.amap expr)
-    | TExpr_match(spMatch,exprm,dtree,targets,m,ty,_) -> OptimizeMatch cenv env (spMatch,exprm,dtree,targets,m,ty)
-    | TExpr_letrec (binds,e,m,_) ->  OptimizeLetRec cenv env (binds,e,m)
-    | TExpr_static_optimization (constraints,e2,e3,m) ->
-        let e2',e2info = OptimizeExpr cenv env e2
-        let e3',e3info = OptimizeExpr cenv env e3
-        TExpr_static_optimization(constraints,e2',e3',m), 
-        { TotalSize = min e2info.TotalSize e3info.TotalSize;
-          FunctionSize = min e2info.FunctionSize e3info.FunctionSize;
-          HasEffect = e2info.HasEffect || e3info.HasEffect;
-          MightMakeCriticalTailcall=e2info.MightMakeCriticalTailcall || e3info.MightMakeCriticalTailcall // seems conservative
-          Info= UnknownValue }
-    | TExpr_link eref -> 
-        assert ("unexpected reclink" = "");
-        failwith "Unexpected reclink"
-
-
-//-------------------------------------------------------------------------
-// Optimize/analyze an object expression
-//------------------------------------------------------------------------- 
-
-and OptimizeObjectExpr cenv env (typ,basevopt,basecall,overrides,iimpls,m) =
-    if verboseOptimizations then dprintf "OptimizeObjectExpr\n";
-    let basecall',basecallinfo = OptimizeExpr cenv env basecall
-    let overrides',overrideinfos = OptimizeMethods cenv env basevopt overrides
-    let iimpls',iimplsinfos = OptimizeInterfaceImpls cenv env basevopt iimpls
-    let expr'=mk_obj_expr(typ,basevopt,basecall',overrides',iimpls',m)
-    expr', { TotalSize=closureTotalSize + basecallinfo.TotalSize + AddTotalSizes overrideinfos + AddTotalSizes iimplsinfos;
-             FunctionSize=1 (* a newobj *) ;
-             HasEffect=true;
-             MightMakeCriticalTailcall=false; // creating an object is not a useful tailcall
-             Info=UnknownValue}
-
-//-------------------------------------------------------------------------
-// Optimize/analyze the methods that make up an object expression
-//------------------------------------------------------------------------- 
-
-and OptimizeMethods cenv env basevopt l = OptimizeList (OptimizeMethod cenv env basevopt) l
-and OptimizeMethod cenv env basevopt (TObjExprMethod(slotsig,tps,vs,e,m) as tmethod) = 
-    if verboseOptimizations then dprintf "OptimizeMethod\n";
-    let env = {env with latestBoundId=Some tmethod.Id; functionVal = None}
-    let env = BindTypeVarsToUnknown tps env
-    let env = bind_internal_vspecs_to_unknown cenv vs env
-    let env = Option.fold_right (bind_internal_vspec_to_unknown cenv) basevopt env
-    let e',einfo = OptimizeExpr cenv env e
-    (* REVIEW: if we ever change this from being UnknownValue then we should call AbstractExprInfoByVars *)
-    TObjExprMethod(slotsig,tps,vs,e',m),
-    { TotalSize = einfo.TotalSize;
-      FunctionSize = 0;
-      HasEffect = false;
-      MightMakeCriticalTailcall=false;
-      Info=UnknownValue}
-
-//-------------------------------------------------------------------------
-// Optimize/analyze the interface implementations that form part of an object expression
-//------------------------------------------------------------------------- 
-
-and OptimizeInterfaceImpls cenv env basevopt l = OptimizeList (OptimizeInterfaceImpl cenv env basevopt) l
-and OptimizeInterfaceImpl cenv env basevopt (ty,overrides) = 
-    if verboseOptimizations then dprintf "OptimizeInterfaceImpl\n";
-    let overrides',overridesinfos = OptimizeMethods cenv env basevopt overrides
-    (ty, overrides'), 
-    { TotalSize = AddTotalSizes overridesinfos;
-      FunctionSize = 1;
-      HasEffect = false;
-      MightMakeCriticalTailcall=false;
-      Info=UnknownValue}
-
-//-------------------------------------------------------------------------
-// Optimize/analyze an application of an intrinsic operator to arguments
-//------------------------------------------------------------------------- 
-
-and OptimizeExprOp cenv env (op,tyargs,args,m) =
-
-    if verboseOptimizations then dprintf "OptimizeExprOp\n";
-    (* Special cases *)
-    match op,tyargs,args with 
-    | TOp_coerce,[toty;fromty],[e] -> 
-        let e',einfo = OptimizeExpr cenv env e
-        if type_equiv cenv.g toty fromty then e',einfo 
-        else 
-          mk_coerce(e',toty,m,fromty), 
-          { TotalSize=einfo.TotalSize + 1;
-            FunctionSize=einfo.FunctionSize + 1;
-            HasEffect = true;  
-            MightMakeCriticalTailcall=false;
-            Info=UnknownValue }
-    (* Handle these as special cases since mutables are allowed inside their bodies *)
-    | TOp_while spWhile,_,[TExpr_lambda(_,_,[_],e1,_,_,_);TExpr_lambda(_,_,[_],e2,_,_,_)]  -> OptimizeWhileLoop cenv env (spWhile,e1,e2,m) 
-    | TOp_for(spStart,dir),_,[TExpr_lambda(_,_,[_],e1,_,_,_);TExpr_lambda(_,_,[_],e2,_,_,_);TExpr_lambda(_,_,[v],e3,_,_,_)]  -> OptimizeFastIntegerForLoop cenv env (spStart,v,e1,dir,e2,e3,m) 
-    | TOp_try_finally(spTry,spFinally),[resty],[TExpr_lambda(_,_,[_],e1,_,_,_); TExpr_lambda(_,_,[_],e2,_,_,_)] -> OptimizeTryFinally cenv env (spTry,spFinally,e1,e2,m,resty)
-    | TOp_try_catch(spTry,spWith),[resty],[TExpr_lambda(_,_,[_],e1,_,_,_); TExpr_lambda(_,_,[vf],ef,_,_,_); TExpr_lambda(_,_,[vh],eh,_,_,_)] -> OptimizeTryCatch cenv env (e1,vf,ef,vh,eh,m,resty,spTry,spWith)
-    | TOp_trait_call(traitInfo),[],args -> OptimizeTraitCall cenv env (traitInfo, args, m) 
-
-   // This code hooks arr.Length. The idea is to ensure loops end up in the "same shape"as the forms of loops that the .NET JIT
-   // guarantees to optimize.
-  
-    | TOp_ilcall ((virt,protect,valu,newobj,superInit,prop,isDllImport,boxthis,mref),enclTypeArgs,methTypeArgs,tys),_,[arg]
-        when (mref.EnclosingTypeRef.Scope.IsAssemblyRef &&
-              mref.EnclosingTypeRef.Scope.AssemblyRef.Name = "mscorlib" &&
-              mref.EnclosingTypeRef.Name = "System.Array" &&
-              mref.Name = "get_Length" &&
-              is_il_arr1_typ cenv.g (type_of_expr cenv.g arg)) -> 
-         OptimizeExpr cenv env (TExpr_op(TOp_asm(i_ldlen,[cenv.g.int_ty]),[],[arg],m))
-
-
-    // Empty IL instruction lists are used as casts in prim_types.fs. But we can get rid of them 
-    // if the types match up. 
-    | TOp_asm([],[ty]),_,[a] when type_equiv cenv.g (type_of_expr cenv.g a) ty -> OptimizeExpr cenv env a
-
-    | _ -> 
-    (* Reductions *)
-    let args',arginfos = OptimizeExprsThenConsiderSplits cenv env args
-    let knownValue = 
-        match op,arginfos with 
-        | TOp_rfield_get (rf),[e1info] -> TryOptimizeRecordFieldGet cenv env (e1info,rf,tyargs,m) 
-        | TOp_tuple_field_get n,[e1info] -> TryOptimizeTupleFieldGet cenv env (e1info,tyargs,n,m)
-        | TOp_ucase_field_get (cspec,n),[e1info] -> TryOptimizeUnionCaseGet cenv env (e1info,cspec,tyargs,n,m)
-        | _ -> None
-    match knownValue with 
-    | Some valu -> 
-        match TryOptimizeVal cenv env (false,valu,m)  with 
-        | Some res -> OptimizeExpr cenv env res  (* discard e1 since guard ensures it has no effects *)
-        | None -> OptimizeExprOpFallback cenv env (op,tyargs,args',m) arginfos valu
-    | None -> OptimizeExprOpFallback cenv env (op,tyargs,args',m) arginfos UnknownValue
-
-
-and OptimizeExprOpFallback cenv env (op,tyargs,args',m) arginfos valu =
-    if verboseOptimizations then dprintf "OptimizeExprOpFallback\n";
-    (* The generic case - we may collect information, but the construction/projection doesn't disappear *)
-    let args_tsize = AddTotalSizes arginfos
-    let args_fsize = AddFunctionSizes arginfos
-    let args_effect = or_effects arginfos
-    let args_valus = List.map (fun x -> x.Info) arginfos
-    let effect = OpHasEffect cenv.g op
-    let cost,valu = 
-      match op with
-      | TOp_ucase c              -> 2,MakeValueInfoForUnionCase c (Array.of_list args_valus)
-      | TOp_exnconstr _           -> 2,valu (* REVIEW: information collection possilbe here *)
-      | TOp_tuple                 -> 1, MakeValueInfoForTuple (Array.of_list args_valus)
-      | TOp_rfield_get _     
-      | TOp_tuple_field_get _    
-      | TOp_ucase_field_get _   
-      | TOp_exnconstr_field_get _
-      | TOp_ucase_tag_get _      -> 1,valu (* REVIEW: reduction possible here, and may be very effective *)
-      | TOp_ucase_proof _        -> 
-            // We count the proof as size 0
-            // We maintain the value of the source of the proof-cast if it is known to be a UnionCaseValue
-            let valu = (match args_valus.[0] with StripUnionCaseValue (uc,info) -> UnionCaseValue(uc,info) | _ ->  valu)  
-            0,valu
-      | TOp_asm(instrs,tys)         -> min (List.length instrs) 1, 
-                                       MakeAssemblyCodeValueInfo cenv.g instrs args_valus tys
-      | TOp_bytes bytes -> (Bytes.length bytes)/10 , valu
-      | TOp_uint16s bytes -> bytes.Length/10 , valu
-      | TOp_field_get_addr _     
-      | TOp_array | TOp_for _ | TOp_while _ | TOp_try_catch _ | TOp_try_finally _
-      | TOp_ilcall _
-      | TOp_trait_call _          
-      | TOp_lval_op _    
-      | TOp_rfield_set _
-      | TOp_ucase_field_set _
-      | TOp_get_ref_lval 
-      | TOp_coerce
-      | TOp_rethrow
-      | TOp_exnconstr_field_set _ -> 1,valu
-      | TOp_recd (ctorInfo,tcref) ->
-          let finfos = tcref.AllInstanceFieldsAsList
-          (* REVIEW: this seems a little conservative: allocating a record with a mutable field *)
-          (* is not an effect - only reading or writing the field is. *)
-          let valu = 
-              match ctorInfo with 
-              | RecdExprIsObjInit -> UnknownValue
-              | RecdExpr -> 
-                   if args_valus.Length <> finfos.Length then valu 
-                   else MakeValueInfoForRecord tcref tyargs (Array.of_list ((args_valus,finfos) ||> List.map2 (fun x f -> if f.IsMutable then UnknownValue else x) ))
-          2,valu  
-      | TOp_goto _ | TOp_label _ | TOp_return -> assert false; error(InternalError("unexpected goto/label/return in optimization",m))
-
-    // Indirect calls to IL code are always taken as tailcalls
-    let mayBeCriticalTailcall = 
-      match op with
-      | TOp_ilcall ((virt,_,_,newobj,_,_,_,_,_),_,_,_) -> not newobj && virt
-      | _ -> false
-    
-    let vinfo = { TotalSize=args_tsize + cost;
-                  FunctionSize=args_fsize + cost;
-                  HasEffect=args_effect || effect;                  
-                  MightMakeCriticalTailcall= mayBeCriticalTailcall; // discard tailcall info for args - these are not in tailcall position
-                  Info=valu } 
-
-    // Replace entire expression with known value? 
-    match TryOptimizeValInfo cenv env m vinfo with 
-    | Some res -> res,vinfo
-    | None ->
-          TExpr_op(op,tyargs,args',m),
-          { TotalSize=args_tsize + cost;
-            FunctionSize=args_fsize + cost;
-            HasEffect=args_effect || effect;
-            MightMakeCriticalTailcall= mayBeCriticalTailcall; // discard tailcall info for args - these are not in tailcall position
-            Info=valu }
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a constant node
-//------------------------------------------------------------------------- 
-
-and OptimizeConst cenv env expr (c,m,ty) = 
-    match TryEliminateDesugaredConstants cenv.g m c with 
-    | Some(e) -> 
-        OptimizeExpr cenv env e
-    | None ->
-        if verboseOptimizations then dprintf "OptimizeConst\n";
-        expr, { TotalSize=(match c with 
-                           | TConst_string b -> b.Length/10 
-                           | _ -> 0);
-                FunctionSize=0;
-                HasEffect=false;
-                MightMakeCriticalTailcall=false;
-                Info=MakeValueInfoForConst c ty}
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a record lookup. 
-//------------------------------------------------------------------------- 
-
-and TryOptimizeRecordFieldGet cenv env (e1info,r,tinst,m) =
-    match dest_recd_value e1info.Info with
-    | Some finfos when cenv.settings.EliminateRecdFieldGet() && not e1info.HasEffect ->
-        let n = (rfref_index r)
-        if n >= finfos.Length then errorR(InternalError( "TryOptimizeRecordFieldGet: term argument out of range",m));
-        Some finfos.[n]   (* Uses INVARIANT on record ValInfos that exprs are in defn order *)
-    | _ -> None
-  
-and TryOptimizeTupleFieldGet cenv env (e1info,tys,n,m) =
-    match dest_tuple_value e1info.Info with
-    | Some tups when cenv.settings.EliminateTupleFieldGet() && not e1info.HasEffect ->
-        let len = tups.Length 
-        if len <> tys.Length then errorR(InternalError("error: tuple lengths don't match",m));
-        if n >= len then errorR(InternalError("TryOptimizeTupleFieldGet: tuple index out of range",m));
-        Some tups.[n]
-    | _ -> None
-      
-and TryOptimizeUnionCaseGet cenv env (e1info,cspec,tys,n,m) =
-    match e1info.Info with
-    | StripUnionCaseValue(cspec2,args) when cenv.settings.EliminatUnionCaseFieldGet() && not e1info.HasEffect && cenv.g.ucref_eq cspec cspec2 ->
-        if n >= args.Length then errorR(InternalError( "TryOptimizeUnionCaseGet: term argument out of range",m));
-        Some args.[n]
-    | _ -> None
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a for-loop
-//------------------------------------------------------------------------- 
-
-and OptimizeFastIntegerForLoop cenv env (spStart,v,e1,dir,e2,e3,m) =
-    if verboseOptimizations then dprintf "OptimizeFastIntegerForLoop\n";
-    let e1',e1info = OptimizeExpr cenv env e1 
-    let e2',e2info = OptimizeExpr cenv env e2 
-    let env = bind_internal_vspec_to_unknown cenv v env 
-    let e3', e3info = OptimizeExpr cenv env e3 
-    // Try to replace F#-style loops with C# style loops that recompute their bounds but which are compiled more efficiently by the JITs, e.g.
-    //  F#  "for x = 0 to arre.Length - 1 do ..." --> C# "for (int x = 0; x < arre.Length; x++) { ... }"
-    //  F#  "for x = 0 to 10 do ..." --> C# "for (int x = 0; x < 11; x++) { ... }"
-    let e2', dir = 
-        match dir, e2' with 
-        // detect upwards for loops with bounds of the form "arr.Length - 1" and convert them to a C#-style for loop
-        | FSharpForLoopUp, TExpr_op(TOp_asm([ I_arith AI_sub ],_),_,[TExpr_op(TOp_asm([ I_ldlen; I_arith (AI_conv DT_I4)],_),_,[arre],_);
-                                                                     TExpr_const(TConst_int32 1,_,_)],_) 
-                  when not (snd(OptimizeExpr cenv env arre)).HasEffect -> 
-
-            mk_ldlen cenv.g m arre, CSharpForLoopUp
-
-        // detect upwards for loops with constant bounds, but not MaxValue!
-        | FSharpForLoopUp, TExpr_const(TConst_int32 n,_,_) 
-                  when n < System.Int32.MaxValue -> 
-
-            mk_incr cenv.g m e2', CSharpForLoopUp
-
-        | _ ->
-            e2', dir
-
-    let einfos = [e1info;e2info;e3info] 
-    let eff = or_effects einfos 
-    (* neither bounds nor body has an effect, and loops always terminate, hence eliminate the loop *)
-    if not eff then 
-        mk_unit cenv.g m , { TotalSize=0; FunctionSize=0; HasEffect=false; MightMakeCriticalTailcall=false; Info=UnknownValue }
-    else
-        let expr' = mk_for cenv.g (spStart,v,e1',dir,e2',e3',m) 
-        expr', { TotalSize=AddTotalSizes einfos + forAndWhileLoopSize;
-                 FunctionSize=AddFunctionSizes einfos + forAndWhileLoopSize;
-                 HasEffect=eff;
-                 MightMakeCriticalTailcall=false;
-                 Info=UnknownValue }
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a set of recursive bindings
-//------------------------------------------------------------------------- 
-
-and OptimizeLetRec cenv env (binds,bodyExpr,m) =
-    if verboseOptimizations then dprintf "OptimizeLetRec\n";
-    let vs = binds |> FlatList.map (fun v -> v.Var) in 
-    let env = bind_internal_vspecs_to_unknown cenv vs env 
-    let binds',env = OptimizeBindings cenv true env binds 
-    let bodyExpr',einfo = OptimizeExpr cenv env bodyExpr 
-    // REVIEW: graph analysis to determine which items are unused 
-    // Eliminate any unused bindings, as in let case 
-    let binds'',bindinfos = 
-        let fvs0 = free_in_expr CollectLocals bodyExpr' 
-        let fvsN = FlatList.map (fst >> free_in_rhs CollectLocals) binds' 
-        let fvs  = FlatList.fold union_freevars fvs0 fvsN 
-        SplitValuesByIsUsedOrHasEffect cenv m fvs.FreeLocals binds'
-    // Trim out any optimization info that involves escaping values 
-    let evalue' = AbstractExprInfoByVars m (FlatList.to_list vs,[]) einfo.Info 
-    // REVIEW: size of constructing new closures - should probably add #freevars + #recfixups here 
-    let bodyExpr' = TExpr_letrec(binds'',bodyExpr',m,NewFreeVarsCache()) 
-    let info = CombineValueInfos (einfo :: FlatList.to_list bindinfos) evalue' 
-    bodyExpr', info
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a linear sequence of sequentioanl execution or 'let' bindings.
-//------------------------------------------------------------------------- 
-
-and OptimizeLinearExpr cenv env expr contf =
-    if verboseOptimizations then dprintf "OptimizeLinearExpr\n";
-    let expr = if cenv.settings.ExpandStructrualValues() then ExpandStructuralBinding cenv env expr else expr 
-    match expr with 
-    | TExpr_seq (e1,e2,flag,spSeq,m) -> 
-      if verboseOptimizations then dprintf "OptimizeLinearExpr: seq\n";
-      let e1',e1info = OptimizeExpr cenv env e1 
-      OptimizeLinearExpr cenv env e2 (contf << (fun (e2',e2info) -> 
-        if flag = NormalSeq && cenv.settings.EliminateSequential () && not e1info.HasEffect then 
-            e2', e2info
-        else 
-            TExpr_seq(e1',e2',flag,spSeq,m),
-            { TotalSize = e1info.TotalSize + e2info.TotalSize;
-              FunctionSize = e1info.FunctionSize + e2info.FunctionSize;
-              HasEffect = flag <> NormalSeq || e1info.HasEffect || e2info.HasEffect;
-              MightMakeCriticalTailcall = (if flag = NormalSeq then e2info.MightMakeCriticalTailcall else  e1info.MightMakeCriticalTailcall || e2info.MightMakeCriticalTailcall)
-              Info = UnknownValue (* can't propagate value: must access result of computation for its effects *) }))
-
-    | TExpr_let (bind,body,m,_) ->  
-      if verboseOptimizations then dprintf "OptimizeLinearExpr: let\n";
-      let (bind',bindingInfo),env = OptimizeBinding cenv false env bind 
-      OptimizeLinearExpr cenv env body (contf << (fun (body',bodyInfo) ->  
-        if ValueIsUsedOrHasEffect cenv m (free_in_expr CollectLocals body').FreeLocals (bind',bindingInfo) then
-            (* Eliminate let bindings on the way back up *)
-            let expr',adjust = TryEliminateLet cenv env  bind' body' m 
-            expr',
-            { TotalSize = bindingInfo.TotalSize + bodyInfo.TotalSize + adjust; 
-              FunctionSize = bindingInfo.FunctionSize + bodyInfo.FunctionSize + adjust; 
-              HasEffect=bindingInfo.HasEffect || bodyInfo.HasEffect;
-              MightMakeCriticalTailcall = bodyInfo.MightMakeCriticalTailcall; // discard tailcall info from binding - not in tailcall position
-              Info = UnknownValue }
-        else 
-            (* On the way back up: Trim out any optimization info that involves escaping values on the way back up *)
-            let evalue' = AbstractExprInfoByVars bind'.Var.Range ([bind'.Var],[]) bodyInfo.Info 
-            body',
-            { TotalSize = bindingInfo.TotalSize + bodyInfo.TotalSize - local_var_size (* eliminated a local var *); 
-              FunctionSize = bindingInfo.FunctionSize + bodyInfo.FunctionSize - local_var_size (* eliminated a local var *); 
-              HasEffect=bindingInfo.HasEffect || bodyInfo.HasEffect;
-              MightMakeCriticalTailcall = bodyInfo.MightMakeCriticalTailcall; // discard tailcall info from binding - not in tailcall position
-              Info = evalue' } ))
-
-    | _ -> contf (OptimizeExpr cenv env expr)
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a try/finally construct.
-//------------------------------------------------------------------------- 
-  
-and OptimizeTryFinally cenv env (spTry,spFinally,e1,e2,m,ty) =
-    if verboseOptimizations then dprintf "OptimizeTryFinally\n";
-    let e1',e1info = OptimizeExpr cenv env e1 
-    let e2',e2info = OptimizeExpr cenv env e2 
-    let info = 
-        { TotalSize = e1info.TotalSize + e2info.TotalSize + tryFinallySize;
-          FunctionSize = e1info.FunctionSize + e2info.FunctionSize + tryFinallySize;
-          HasEffect = e1info.HasEffect || e2info.HasEffect;
-          MightMakeCriticalTailcall = false; // no tailcalls from inside in try/finally
-          Info = UnknownValue } 
-    (* try-finally, so no effect means no exception can be raised, so just sequence the finally *)
-    if cenv.settings.EliminateTryCatchAndTryFinally () && not e1info.HasEffect then 
-        let sp = 
-            match spTry with 
-            | SequencePointAtTry _ -> SequencePointsAtSeq 
-            | NoSequencePointAtTry -> SuppressSequencePointOnExprOfSequential
-        TExpr_seq(e1',e2',ThenDoSeq,sp,m),info 
-    else
-        mk_try_finally cenv.g (e1',e2',m,ty,spTry,spFinally), 
-        info
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a try/catch construct.
-//------------------------------------------------------------------------- 
-  
-and OptimizeTryCatch cenv env (e1,vf,ef,vh,eh,m,ty,spTry,spWith) =
-    if verboseOptimizations then dprintf "OptimizeTryCatch\n";
-    let e1',e1info = OptimizeExpr cenv env e1    
-    // try-catch, so no effect means no exception can be raised, so discard the catch 
-    if cenv.settings.EliminateTryCatchAndTryFinally () && not e1info.HasEffect then 
-        e1',e1info 
-    else
-        let envinner = bind_internal_vspec_to_unknown cenv vf (bind_internal_vspec_to_unknown cenv vh env)
-        let ef',efinfo = OptimizeExpr cenv envinner ef 
-        let eh',ehinfo = OptimizeExpr cenv envinner eh 
-        let info = 
-            { TotalSize = e1info.TotalSize + efinfo.TotalSize+ ehinfo.TotalSize  + tryCatchSize;
-              FunctionSize = e1info.FunctionSize + efinfo.FunctionSize+ ehinfo.FunctionSize  + tryCatchSize;
-              HasEffect = e1info.HasEffect || efinfo.HasEffect || ehinfo.HasEffect;
-              MightMakeCriticalTailcall = false;
-              Info = UnknownValue } 
-        mk_try_catch cenv.g (e1',vf,ef',vh,eh',m,ty,spTry,spWith), 
-        info
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a while loop
-//------------------------------------------------------------------------- 
-  
-and OptimizeWhileLoop cenv env  (spWhile,e1,e2,m) =
-    if verboseOptimizations then dprintf "OptimizeWhileLoop\n";
-    let e1',e1info = OptimizeExpr cenv env e1 
-    let e2',e2info = OptimizeExpr cenv env e2 
-    mk_while cenv.g (spWhile,e1',e2',m), 
-    { TotalSize = e1info.TotalSize + e2info.TotalSize + forAndWhileLoopSize;
-      FunctionSize = e1info.FunctionSize + e2info.FunctionSize + forAndWhileLoopSize;
-      HasEffect = true; (* may not terminate *)
-      MightMakeCriticalTailcall = false;
-      Info = UnknownValue }
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a call to a 'member' constraint. Try to resolve the call to 
-// a witness (should always be possible due to compulsory inlining of any
-// code that contains calls to member constraints, except when analyzing 
-// not-yet-inlined generic code)
-//------------------------------------------------------------------------- 
- 
-
-and OptimizeTraitCall cenv env   (traitInfo, args, m) =
-
-    // Resolve the static overloading early (during the compulsory rewrite phase) so we can inline. 
-    match ConstraintSolver.CodegenWitnessThatTypSupportsTraitConstraint cenv.g cenv.amap m traitInfo with
-           
-    | OkResult (_,Some(minfo,minst)) 
-        // Limitation related to bug 1281:   If we resolve to an instance method on a struct and we haven't yet taken the address of the object 
-        when not (Infos.minfo_is_struct cenv.g minfo && minfo.IsInstance) -> 
-        
-        let expr = Infos.MakeMethInfoCall cenv.amap m minfo minst args 
-        OptimizeExpr cenv env expr
-
-    // resolution fails when optimizing generic code 
-    |  _ -> 
-        let args',arginfos = OptimizeExprsThenConsiderSplits cenv env args 
-        OptimizeExprOpFallback cenv env (TOp_trait_call(traitInfo),[],args,m) arginfos UnknownValue 
-
-//-------------------------------------------------------------------------
-// Make optimization decisions once we know the optimization information
-// for a value
-//------------------------------------------------------------------------- 
-
-and TryOptimizeVal cenv env (mustInline,valInfoForVal,m) = 
-    match valInfoForVal with 
-    (* Inline constants immediately *)
-    | ConstValue (c,ty) -> Some (TExpr_const (c,m,ty))
-    | SizeValue (_,detail) -> TryOptimizeVal cenv env (mustInline,detail,m) 
-    | ValValue (v',detail) -> 
-         if verboseOptimizations then dprintf "TryOptimizeVal, ValValue, valInfoForVal = %s\n" (showL(exprValueInfoL valInfoForVal));
-         (* Inline values bound to other values immediately *)
-         (* if verbose then dprintf "Considering inlining value %a to value %a near %a\n" output_val_ref v output_locval_ref v' output_range m;  *)
-         match  TryOptimizeVal cenv env (mustInline,detail,m) with 
-          (* Prefer to inline using the more specific info if possible *)
-          | Some e -> Some e
-          (* If the more specific info didn't reveal an inline then use the value *)
-          | None ->  Some(expr_for_vref m v')
-    | ConstExprValue(size,expr) ->
-        if verboseOptimizations then dprintf "Inlining constant expression value at %a\n"  output_range m;
-        Some (RemarkExpr m (copy_expr cenv.g CloneAllAndMarkExprValsAsCompilerGenerated expr))
-    | CurriedLambdaValue (_,_,_,expr,_) when mustInline ->
-        if verboseOptimizations then dprintf "Inlining mustinline-lambda at %a\n"  output_range m;
-        Some (RemarkExpr m (copy_expr cenv.g CloneAllAndMarkExprValsAsCompilerGenerated expr))
-    | TupleValue _ | UnionCaseValue _ | RecdValue _ when mustInline -> failwith "tuple, union and record values cannot be marked 'inline'"
-    | UnknownValue when mustInline -> warning(Error("a value marked as 'inline' has an unexpected value",m)); None
-    | _ when mustInline -> warning(Error("a value marked as 'inline' could not be inlined",m)); None
-    | _ -> None 
-  
-and TryOptimizeValInfo cenv env m vinfo = 
-    if vinfo.HasEffect then None else TryOptimizeVal cenv env (false,vinfo.Info ,m)
-
-//-------------------------------------------------------------------------
-// Add 'v1 = v2' information into the information stored about a value
-//------------------------------------------------------------------------- 
-  
-and AddValEqualityInfo g m (v:ValRef) info =
-    if v.IsMutable then 
-        /// the env assumes known-values do not change 
-        info 
-    else 
-        {info with Info= MakeValueInfoForValue g m v info.Info}
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a use of a value
-//------------------------------------------------------------------------- 
-
-and OptimizeVal cenv env expr (v:ValRef,m) =
-    let valInfoForVal = GetInfoForVal cenv env m v 
-
-    match TryOptimizeVal cenv env (v.MustInline,valInfoForVal.ValExprInfo ,m) with
-    | Some e -> 
-       // don't reoptimize inlined lambdas until they get applied to something
-       match e with 
-       | TExpr_tlambda _ 
-       | TExpr_lambda _ ->
-           e, (AddValEqualityInfo cenv.g m v 
-                    { Info=valInfoForVal.ValExprInfo; 
-                      HasEffect=false; 
-                      MightMakeCriticalTailcall = false;
-                      FunctionSize=10; 
-                      TotalSize=10})
-       | _ -> 
-           let e,einfo = OptimizeExpr cenv env e 
-           e,AddValEqualityInfo cenv.g m v einfo 
-
-    | None -> 
-       if v.MustInline  then error(Error("failed to inline the value '"^v.MangledName^"' marked 'inline', perhaps because a recursive value was marked 'inline'",m));
-       expr,(AddValEqualityInfo cenv.g m v 
-                    { Info=valInfoForVal.ValExprInfo; 
-                      HasEffect=false; 
-                      MightMakeCriticalTailcall = false;
-                      FunctionSize=1; 
-                      TotalSize=1})
-
-//-------------------------------------------------------------------------
-// Attempt to replace an application of a value by an alternative value.
-//------------------------------------------------------------------------- 
-
-and StripToNominalTyconRef cenv ty = 
-    if is_stripped_tyapp_typ cenv.g ty then dest_stripped_tyapp_typ cenv.g ty 
-    elif is_tuple_typ cenv.g ty then 
-        let tyargs = dest_tuple_typ cenv.g ty
-        compiled_tuple_tcref cenv.g tyargs, tyargs 
-    else failwith "StripToNominalTyconRef: unreachable" 
-      
-
-and CanDevirtualizeApplication cenv v vref ty args  = 
-     cenv.g.vref_eq v vref
-     && not (is_unit_typ cenv.g ty)
-     && is_stripped_tyapp_typ cenv.g ty // || (is_tuple_typ cenv.g ty && List.length (dest_tuple_typ cenv.g ty) < maxTuple)) 
-     // Exclusion: Some unions have null as representations 
-     && not (IsUnionTypeWithNullAsTrueValue cenv.g (deref_tycon (fst(StripToNominalTyconRef cenv ty))))  
-     // If we de-virtualize an operation on structs then we have to take the address of the object argument
-     // Hence we have to actually have the object argument available to us,
-     && (not (is_struct_typ cenv.g ty) || nonNil args) 
-
-and TakeAddressOfStructArgumentIfNeeded cenv (vref:ValRef) ty args m =
-    if vref.IsInstanceMember && is_struct_typ cenv.g ty then 
-        match args with 
-        | objArg::rest -> 
-            // REVIEW: we set NeverMutates. This is valid because we only ever use DevirtualizeApplication to transform 
-            // known calls to known generated F# code for CompareTo, Equals and GetHashCode.
-            // If we ever reuse DevirtualizeApplication to transform an arbitrary virtual call into a 
-            // direct call then this assumption is not valid.
-            let wrap,objArgAddress = mk_expra_of_expr cenv.g true NeverMutates objArg m 
-            wrap, (objArgAddress::rest)
-        | _ -> 
-            // no wrapper, args stay the same 
-            (fun x -> x), args
-    else
-        (fun x -> x), args
-
-and DevirtualizeApplication cenv env (vref:ValRef) ty tyargs args m =
-    let wrap,args = TakeAddressOfStructArgumentIfNeeded cenv vref ty args m
-    let transformedExpr = wrap (MakeApplicationAndBetaReduce cenv.g (expr_for_vref m vref,vref.Type,(if isNil tyargs then [] else [tyargs]),args,m))
-    OptimizeExpr cenv env transformedExpr
-
-    
-  
-and TryDevirtualizeApplication cenv env (f,tyargs,args,m) =
-    match f,tyargs,args with 
-
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericComparisonIntrinsic when type is known 
-    // to be augmented with a visible comparison value. 
-    //
-    // e.g rewrite 
-    //      'LanguagePrimitives.HashCompare.GenericComparisonIntrinsic (x:C) (y:C)' 
-    //  --> 'x.CompareTo(y:C)' where this is a direct call to the implementation of CompareTo, i.e.
-    //        C::CompareTo(C)
-    //    not C::CompareTo(obj)
-    //
-    // If C is a struct type then we have to take the address of 'c'
-    
-    | TExpr_val(v,_,_),[ty],_ when CanDevirtualizeApplication cenv v cenv.g.generic_comparison_inner_vref ty args ->
-         
-        let tcref,tyargs = StripToNominalTyconRef cenv ty
-        match tcref.TypeContents.tcaug_compare with 
-        | Some (_,vref)  -> Some (DevirtualizeApplication cenv env vref ty tyargs args m)
-        | _ -> None
-        
-    | TExpr_val(v,_,_),[ty],_ when CanDevirtualizeApplication cenv v cenv.g.generic_comparison_withc_inner_vref ty args ->
-         
-        let tcref,tyargs = StripToNominalTyconRef cenv ty
-        match tcref.TypeContents.tcaug_compare_withc, args with 
-        | Some vref, [comp; x; y]  -> 
-            // the target takes a tupled argument, so we need to reorder the arg expressions in the
-            // arg list, and create a tuple of y & comp
-            // push the comparer to the end and box the argument
-            let args2 = [x; mk_tupled_notypes cenv.g m [mk_coerce(y,cenv.g.obj_ty,m,ty) ; comp]]
-            Some (DevirtualizeApplication cenv env vref ty tyargs args2 m)
-        | _ -> None
-        
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericEqualityIntrinsic when type is known 
-    // to be augmented with a visible comparison value. 
-    | TExpr_val(v,_,_),[ty],_ when CanDevirtualizeApplication cenv v cenv.g.generic_equality_inner_vref ty args ->
-         
-        let tcref,tyargs = StripToNominalTyconRef cenv ty 
-        match tcref.TypeContents.tcaug_equals with 
-        | Some (_,vref)  -> Some (DevirtualizeApplication cenv env vref ty tyargs args m)
-        | _ -> None
-        
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericEqualityWithComparerFast
-    | TExpr_val(v,_,_),[ty],_ when CanDevirtualizeApplication cenv v cenv.g.generic_equality_withc_inner_vref ty args ->
-        let tcref,tyargs = StripToNominalTyconRef cenv ty
-        match tcref.TypeContents.tcaug_hash_and_equals_withc, args with
-        | Some (_,vref), [comp; x; y]  -> 
-            // push the comparer to the end and box the argument
-            let args2 = [x; mk_tupled_notypes cenv.g m [mk_coerce(y,cenv.g.obj_ty,m,ty) ; comp]]
-            Some (DevirtualizeApplication cenv env vref ty tyargs args2 m)
-        | _ -> None 
-        
-
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericHashIntrinsic
-    | TExpr_val(v,_,_),[ty],_ when CanDevirtualizeApplication cenv v cenv.g.generic_hash_inner_vref ty args ->
-        let tcref,tyargs = StripToNominalTyconRef cenv ty
-        match tcref.TypeContents.tcaug_hash_and_equals_withc, args with
-        | Some (vref,_), [x] -> 
-            let args2 = [x; mk_call_get_generic_equality_comparer cenv.g m]
-            Some (DevirtualizeApplication cenv env vref ty tyargs args2 m)
-        | _ -> None 
-        
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic
-    | TExpr_val(v,_,_),[ty],_ when  CanDevirtualizeApplication cenv v cenv.g.generic_hash_withc_inner_vref ty args ->
-        let tcref,tyargs = StripToNominalTyconRef cenv ty
-        match tcref.TypeContents.tcaug_hash_and_equals_withc, args with
-        | Some (vref,_), [comp; x]  -> 
-            let args2 = [x; comp]
-            Some (DevirtualizeApplication cenv env vref ty tyargs args2 m)
-        | _ -> None 
-
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic for tuple types
-    | TExpr_val(v,_,_),[ty],_ when  cenv.g.vref_eq v cenv.g.generic_comparison_inner_vref && is_tuple_typ cenv.g ty ->
-        let tyargs = dest_tuple_typ cenv.g ty 
-        let vref = 
-            match tyargs.Length with 
-            | 2 -> Some cenv.g.generic_compare_withc_tuple2_vref 
-            | 3 -> Some cenv.g.generic_compare_withc_tuple3_vref 
-            | 4 -> Some cenv.g.generic_compare_withc_tuple4_vref 
-            | 5 -> Some cenv.g.generic_compare_withc_tuple5_vref 
-            | _ -> None
-        match vref with 
-        | Some vref -> Some (DevirtualizeApplication cenv env vref ty tyargs (mk_call_get_generic_comparer cenv.g m :: args) m)            
-        | None -> None
-        
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic for tuple types
-    | TExpr_val(v,_,_),[ty],_ when  cenv.g.vref_eq v cenv.g.generic_hash_inner_vref && is_tuple_typ cenv.g ty ->
-        let tyargs = dest_tuple_typ cenv.g ty 
-        let vref = 
-            match tyargs.Length with 
-            | 2 -> Some cenv.g.generic_hash_withc_tuple2_vref 
-            | 3 -> Some cenv.g.generic_hash_withc_tuple3_vref 
-            | 4 -> Some cenv.g.generic_hash_withc_tuple4_vref 
-            | 5 -> Some cenv.g.generic_hash_withc_tuple5_vref 
-            | _ -> None
-        match vref with 
-        | Some vref -> Some (DevirtualizeApplication cenv env vref ty tyargs (mk_call_get_generic_equality_comparer cenv.g m :: args) m)            
-        | None -> None
-        
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic for tuple types
-    | TExpr_val(v,_,_),[ty],_ when  cenv.g.vref_eq v cenv.g.generic_equality_inner_vref && is_tuple_typ cenv.g ty ->
-        let tyargs = dest_tuple_typ cenv.g ty 
-        let vref = 
-            match tyargs.Length with 
-            | 2 -> Some cenv.g.generic_equals_withc_tuple2_vref 
-            | 3 -> Some cenv.g.generic_equals_withc_tuple3_vref 
-            | 4 -> Some cenv.g.generic_equals_withc_tuple4_vref 
-            | 5 -> Some cenv.g.generic_equals_withc_tuple5_vref 
-            | _ -> None
-        match vref with 
-        | Some vref -> Some (DevirtualizeApplication cenv env vref ty tyargs (mk_call_get_generic_equality_comparer cenv.g m :: args) m)            
-        | None -> None
-        
-        
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic for tuple types
-    | TExpr_val(v,_,_),[ty],_ when  cenv.g.vref_eq v cenv.g.generic_comparison_withc_inner_vref && is_tuple_typ cenv.g ty ->
-        let tyargs = dest_tuple_typ cenv.g ty 
-        let vref = 
-            match tyargs.Length with 
-            | 2 -> Some cenv.g.generic_compare_withc_tuple2_vref 
-            | 3 -> Some cenv.g.generic_compare_withc_tuple3_vref 
-            | 4 -> Some cenv.g.generic_compare_withc_tuple4_vref 
-            | 5 -> Some cenv.g.generic_compare_withc_tuple5_vref 
-            | _ -> None
-        match vref with 
-        | Some vref -> Some (DevirtualizeApplication cenv env vref ty tyargs args m)            
-        | None -> None
-        
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic for tuple types
-    | TExpr_val(v,_,_),[ty],_ when  cenv.g.vref_eq v cenv.g.generic_hash_withc_inner_vref && is_tuple_typ cenv.g ty ->
-        let tyargs = dest_tuple_typ cenv.g ty 
-        let vref = 
-            match tyargs.Length with 
-            | 2 -> Some cenv.g.generic_hash_withc_tuple2_vref 
-            | 3 -> Some cenv.g.generic_hash_withc_tuple3_vref 
-            | 4 -> Some cenv.g.generic_hash_withc_tuple4_vref 
-            | 5 -> Some cenv.g.generic_hash_withc_tuple5_vref 
-            | _ -> None
-        match vref with 
-        | Some vref -> Some (DevirtualizeApplication cenv env vref ty tyargs args m)            
-        | None -> None
-        
-    // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericEqualityWithComparerIntrinsic for tuple types
-    | TExpr_val(v,_,_),[ty],_ when  cenv.g.vref_eq v cenv.g.generic_equality_withc_inner_vref && is_tuple_typ cenv.g ty ->
-        let tyargs = dest_tuple_typ cenv.g ty 
-        let vref = 
-            match tyargs.Length with 
-            | 2 -> Some cenv.g.generic_equals_withc_tuple2_vref 
-            | 3 -> Some cenv.g.generic_equals_withc_tuple3_vref 
-            | 4 -> Some cenv.g.generic_equals_withc_tuple4_vref 
-            | 5 -> Some cenv.g.generic_equals_withc_tuple5_vref 
-            | _ -> None
-        match vref with 
-        | Some vref -> Some (DevirtualizeApplication cenv env vref ty tyargs args m)            
-        | None -> None
-        
-
-    // Calls to LanguagePrimitives.IntrinsicFunctions.UnboxGeneric can be optimized to calls to UnboxFast when we know that the 
-    // target type isn't 'NullNotLiked', i.e. that the target type is not an F# union, record etc. 
-    // Note UnboxFast is just the .NET IL 'unbox.any' instruction. 
-    | TExpr_val(v,_,_),[ty],_ when cenv.g.vref_eq v cenv.g.unbox_vref && 
-                                   can_use_unbox_fast cenv.g ty ->
-
-        Some(DevirtualizeApplication cenv env cenv.g.unbox_fast_vref ty tyargs args m)
-        
-    // Calls to LanguagePrimitives.IntrinsicFunctions.TypeTestGeneric can be optimized to calls to TypeTestFast when we know that the 
-    // target type isn't 'NullNotTrueValue', i.e. that the target type is not an F# union, record etc. 
-    // Note TypeTestFast is just the .NET IL 'isinst' instruction followed by a non-null comparison 
-    | TExpr_val(v,_,_),[ty],_ when cenv.g.vref_eq v cenv.g.istype_vref && 
-                                   can_use_istype_fast cenv.g ty ->
-
-        Some(DevirtualizeApplication cenv env cenv.g.istype_fast_vref ty tyargs args m)
-        
-    | _ -> None
-
-/// Attempt to inline an application of a known value at callsites
-and TryInlineApplication cenv env (f0',finfo) (tyargs,args,m) =
-    if verboseOptimizations then dprintf "Considering inlining app near %a\n"  output_range m; 
-    match finfo.Info with 
-    | StripLambdaValue (lambdaId,arities,size,f2,f2ty) when
-
-       (if verboseOptimizations then dprintf "Considering inlining lambda near %a, size = %d, finfo.HasEffect = %b\n"  output_range m size finfo.HasEffect;
-        cenv.optimizing &&
-        cenv.settings.InlineLambdas () &&
-        not finfo.HasEffect &&
-        (* Don't inline recursively! *)
-        not (Zset.mem lambdaId env.dontInline) &&
-        (if verboseOptimizations then dprintf "Recursion ok, #tyargs = %d, #args = %d, #arities=%d\n" (List.length tyargs) (List.length args) arities;
-         (* Check the number of argument groups is enough to saturate the lambdas of the target. *)
-         (if List.filter (fun t -> match t with TType_measure _ -> false | _ -> true) tyargs = [] then 0 else 1) + List.length args >= arities &&
-          (if verboseOptimizations then dprintn "Enough args"; 
-           (if size > cenv.settings.lambdaInlineThreshold + List.length args then
-              if verboseOptimizations then dprintf "Not inlining lambda near %a because size = %d\n" output_range m size; 
-              false
-            else true)))) ->
-
-        if verboseOptimizations then dprintf "Inlining lambda near %a\n"  output_range m;
-  (* ----------       Printf.printf "Inlining lambda near %a = %s\n"  output_range m (showL (ExprL f2));  (* JAMES: *) ----------*)
-        let f2' = RemarkExpr m (copy_expr cenv.g CloneAllAndMarkExprValsAsCompilerGenerated f2)
-        if verboseOptimizations then dprintf "--- TryInlineApplication, optimizing arguments\n";
-
-        // REVIEW: this is a cheapshot way of optimizing the arg expressions as well without the restriction of recursive  
-        // inlining kicking into effect 
-        let args' = args |> List.map (fun e -> let e',einfo = OptimizeExpr cenv env e in e') 
-        // Beta reduce. MakeApplicationAndBetaReduce cenv.g does all the hard work. 
-        if verboseOptimizations then dprintf "--- TryInlineApplication, beta reducing \n";
-        let expr' = MakeApplicationAndBetaReduce cenv.g (f2',f2ty,[tyargs],args',m)
-        if verboseOptimizations then dprintf "--- TryInlineApplication, reoptimizing\n";
-        Some (OptimizeExpr cenv {env with dontInline= Zset.add lambdaId env.dontInline} expr')
-          
-    | _ -> None
-
-//-------------------------------------------------------------------------
-// Optimize/analyze an application of a function to type and term arguments
-//------------------------------------------------------------------------- 
-
-and OptimizeApplication cenv env (f0,f0ty,tyargs,args,m) =
-    if verboseOptimizations then dprintf "--> OptimizeApplication\n";
-    let f0',finfo = OptimizeExpr cenv env f0 
-    if verboseOptimizations then dprintf "--- OptimizeApplication, trying to devirtualize\n";
-    match TryDevirtualizeApplication cenv env (f0,tyargs,args,m) with 
-    | Some res -> 
-        if verboseOptimizations then dprintf "<-- OptimizeApplication, devirtualized\n";
-        res
-    | None -> 
-
-    match TryInlineApplication cenv env (f0',finfo) (tyargs,args,m) with 
-    | Some res -> 
-        if verboseOptimizations then dprintf "<-- OptimizeApplication, inlined\n";
-        res
-    | None -> 
-
-    let shapes = 
-        match f0' with 
-        | TExpr_val(vref,_,_) when isSome vref.TopValInfo -> 
-            let (TopValInfo(kinds,detupArgsL,_)) = the vref.TopValInfo 
-            let nargs = (args.Length) 
-            let nDetupArgsL = detupArgsL.Length
-            let nShapes = min nargs nDetupArgsL 
-            let detupArgsShapesL = 
-                List.take  nShapes detupArgsL |> List.map (fun detupArgs -> 
-                    match detupArgs with 
-                    | [] | [_] -> UnknownValue
-                    | _ -> TupleValue(Array.of_list (List.map (fun _ -> UnknownValue) detupArgs))) 
-            detupArgsShapesL @ List.replicate (nargs - nShapes) UnknownValue
-            
-        | _ -> args |> List.map (fun _ -> UnknownValue) 
-
-    let args',arginfos = OptimizeExprsThenReshapeAndConsiderSplits cenv env (List.zip shapes args) 
-    if verboseOptimizations then dprintf "<-- OptimizeApplication, beta reducing\n";
-    let expr' = MakeApplicationAndBetaReduce cenv.g (f0',f0ty, [tyargs],args',m) 
-    
-    match f0' with 
-    | TExpr_lambda _ | TExpr_tlambda _ -> 
-       (* we beta-reduced, hence reoptimize *)
-        if verboseOptimizations then dprintf "<-- OptimizeApplication, beta reduced\n";
-        OptimizeExpr cenv env expr'
-    | _ -> 
-        if verboseOptimizations then dprintf "<-- OptimizeApplication, regular\n";
-
-        // Determine if this application is a critical tailcall
-        let mayBeCriticalTailcall = 
-            match f0' with 
-            | KnownValApp(vref,typeArgs,otherArgs)   ->
-
-                 // Check if this is a call to a function of known arity that has been inferred to not be a critical tailcall when used as a direct call
-                 // This includes recursive calls to the function being defined (in which case we get a non-critical, closed-world tailcall).
-                 // Note we also have to check the argument count to ensure this is a direct call (or a partial application).
-                 let doesNotMakeCriticalTailcall = 
-                     vref.MakesNoCriticalTailcalls || 
-                     (let valInfoForVal = GetInfoForVal cenv env m vref  in valInfoForVal.ValMakesNoCriticalTailcalls) ||
-                     (match env.functionVal with | None -> false | Some (v,_) -> vspec_eq vref.Deref v)
-                 if doesNotMakeCriticalTailcall then
-                    let numArgs = otherArgs.Length + args'.Length
-                    match vref.TopValInfo with 
-                    | Some i -> numArgs > i.NumCurriedArgs 
-                    | None -> 
-                    match env.functionVal with 
-                    | Some (v,i) ->  numArgs > i.NumCurriedArgs
-                    | None -> true // over-applicaiton of a known function, which presumably returns a function. This counts as an indirect call
-                 else
-                    true // application of a function that may make a critical tailcall
-                
-            | _ -> 
-                // All indirect calls (calls to unknown functions) are assumed to be critical tailcalls 
-                true
-
-        expr', { TotalSize=finfo.TotalSize + AddTotalSizes arginfos;
-                 FunctionSize=finfo.FunctionSize + AddFunctionSizes arginfos;
-                 HasEffect=true;
-                 MightMakeCriticalTailcall = mayBeCriticalTailcall;
-                 Info=ValueOfExpr expr' }
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a lambda expression
-//------------------------------------------------------------------------- 
-        
-and OptimizeLambdas (vspec: Val option) cenv env topValInfo e ety = 
-    if verboseOptimizations then dprintf "OptimizeLambdas, #argsl = %d, %a\n" topValInfo.NumCurriedArgs output_range (range_of_expr e) ;
-    match e with 
-    | TExpr_lambda (lambdaId,_,_,_,m,_,_)  
-    | TExpr_tlambda(lambdaId,_,_,m,_,_) ->
-        let isTopLevel = isSome vspec && vspec.Value.IsCompiledAsTopLevel
-        let tps,basevopt,vsl,body,bodyty = IteratedAdjustArityOfLambda cenv.g cenv.amap topValInfo e
-        let env = { env with functionVal = (match vspec with None -> None | Some v -> Some (v,topValInfo)) }
-        let env = Option.fold_right (bind_internal_vspec_to_unknown cenv) basevopt env
-        let env = BindTypeVarsToUnknown tps env
-        let env = List.foldBack (bind_internal_vspecs_to_unknown cenv) vsl env
-        let env = bind_internal_vspecs_to_unknown cenv (Option.to_list basevopt) env
-        let body',bodyinfo = OptimizeExpr cenv env body
-        let expr' = mk_basev_multi_lambdas m tps basevopt vsl (body',bodyty)
-        let arities = List.length vsl
-        let arities = if tps = [] then arities else 1+arities
-        let bsize = bodyinfo.TotalSize
-        if verboseOptimizations then dprintf "lambda @ %a, bsize = %d\n" output_range m bsize;
-
-        
-        /// Set the flag on the value indicating that direct calls can avoid a tailcall (which are expensive on .NET x86)
-        /// MightMakeCriticalTailcall is true whenever the body of the method may itself do a useful tailcall, e.g. has
-        /// an application in the last position.
-        match vspec with 
-        | Some v -> 
-            if not bodyinfo.MightMakeCriticalTailcall then 
-                set_notailcall_hint_of_vflags v.Data true
-            
-            // UNIT TEST HOOK: report analysis results for the first optimization phase 
-            if cenv.settings.reportingPhase && not v.IsCompilerGenerated then 
-                if cenv.settings.reportNoNeedToTailcall then 
-                    if bodyinfo.MightMakeCriticalTailcall then
-                        printfn "value %s at line %d may make a critical tailcall" v.DisplayName (start_line_of_range v.Range) 
-                    else 
-                        printfn "value %s at line %d does not make a critical tailcall" v.DisplayName (start_line_of_range v.Range) 
-                if cenv.settings.reportTotalSizes then 
-                    printfn "value %s at line %d has total size %d" v.DisplayName (start_line_of_range v.Range)  bodyinfo.TotalSize 
-                if cenv.settings.reportFunctionSizes then 
-                    printfn "value %s at line %d has method size %d" v.DisplayName (start_line_of_range v.Range)  bodyinfo.FunctionSize
-                if cenv.settings.reportHasEffect then 
-                    if bodyinfo.HasEffect then
-                        printfn "function %s at line %d causes side effects or may not terminate" v.DisplayName (start_line_of_range v.Range) 
-                    else 
-                        printfn "function %s at line %d causes no side effects" v.DisplayName (start_line_of_range v.Range) 
-        | _ -> 
-            () 
-
-        // can't inline any values with semi-recursive object references to self or base 
-        let valu =   
-          match basevopt with 
-          | None -> CurriedLambdaValue (lambdaId,arities,bsize,expr',ety) 
-          | _ -> UnknownValue
-
-        expr', { TotalSize=bsize + (if isTopLevel then methodDefnTotalSize else closureTotalSize); (* estimate size of new syntactic closure - expensive, in contrast to a method *)
-                 FunctionSize=1; 
-                 HasEffect=false;
-                 MightMakeCriticalTailcall = false;
-                 Info= valu; }
-    | _ -> OptimizeExpr cenv env e 
-      
-
-
-//-------------------------------------------------------------------------
-// Recursive calls that first try to make an expression "fit" the a shape
-// where it is about to be consumed.
-//------------------------------------------------------------------------- 
-
-and OptimizeExprsThenReshapeAndConsiderSplits cenv env exprs = 
-    match exprs with 
-    | [] -> no_exprs 
-    | _ -> OptimizeList (OptimizeExprThenReshapeAndConsiderSplit cenv env) exprs
-
-and OptimizeExprsThenConsiderSplits cenv env exprs = 
-    match exprs with 
-    | [] -> no_exprs 
-    | _ -> OptimizeList (OptimizeExprThenConsiderSplit cenv env) exprs
-
-and OptimizeFlatExprsThenConsiderSplits cenv env (exprs:FlatExprs) = 
-    if FlatList.isEmpty exprs then no_FlatExprs
-    else OptimizeFlatList (OptimizeExprThenConsiderSplit cenv env) exprs
-
-and OptimizeExprThenReshapeAndConsiderSplit cenv env (shape,e) = 
-    OptimizeExprThenConsiderSplit cenv env (ReshapeExpr cenv (shape,e))
-
-and OptimizeDecisionTreeTargets cenv env m ty targets = 
-    OptimizeList (OptimizeDecisionTreeTarget cenv env m ty) (Array.to_list targets)
-
-and ReshapeExpr cenv (shape,e) = 
-  match shape,e with 
-  | TupleValue(subshapes), TExpr_val(vref,vFlags,m) ->
-      let tinst = dest_tuple_typ cenv.g (type_of_expr cenv.g e)
-      mk_tupled cenv.g m (List.mapi (fun i subshape -> ReshapeExpr cenv (subshape,mk_tuple_field_get(e,tinst,i,m))) (Array.to_list subshapes)) tinst
-  | _ ->  
-      e
-
-and OptimizeExprThenConsiderSplit cenv env e = 
-  let e',einfo = OptimizeExpr cenv env e
-  (* ALWAYS consider splits for enormous sub terms here - otherwise we will create invalid .NET programs  *)
-  ConsiderSplitToMethod true cenv.settings.veryBigExprSize cenv env (e',einfo) 
-
-//-------------------------------------------------------------------------
-// Decide whether to List.unzip a sub-expression into a new method
-//------------------------------------------------------------------------- 
-
-and ComputeSplitToMethodCondition flag threshold cenv env (e,einfo) = 
-    flag &&
-    // don't mess with taking guaranteed tailcalls if used with --no-tailcalls! 
-    !Msilxlib.tailcall_implementation <> Ilxsettings.NoTailcalls &&
-    einfo.FunctionSize >= threshold &&
-    (let fvs = free_in_expr CollectLocals e
-     not fvs.UsesUnboundRethrow  &&
-     // We can only split an expression out as a method if certain conditions are met. 
-     // It can't use any protected or base calls 
-     not fvs.UsesMethodLocalConstructs &&
-     fvs.FreeLocals |> Zset.for_all (fun v -> 
-          // no direct-self-recursive refrences
-          not (vspec_map_mem v env.dontSplitVars) &&
-          (v.TopValInfo.IsSome ||
-            // All the free variables (apart from things with an arity, i.e. compiled as methods) should be normal, i.e. not base/this etc. 
-            (v.BaseOrThisInfo = NormalVal && 
-             // None of them should be byrefs 
-             not (is_byref_typ cenv.g v.Type) && 
-             //  None of them should be local polymorphic constrained values 
-             not (IsGenericValWithGenericContraints cenv.g v) &&
-             // None of them should be mutable 
-             not v.IsMutable))))
-
-and ConsiderSplitToMethod flag threshold cenv env (e,einfo) = 
-    if ComputeSplitToMethodCondition flag threshold cenv env (e,einfo) then
-        let m = (range_of_expr e)
-        let uv,ue = mk_compgen_local m "unitVar" cenv.g.unit_ty
-        let ty = type_of_expr cenv.g e
-        let fv,fe = mk_compgen_local m (match env.latestBoundId with Some id -> id.idText^suffixForVariablesThatMayNotBeEliminated | None -> suffixForVariablesThatMayNotBeEliminated) (cenv.g.unit_ty --> ty)
-        mk_invisible_let m fv (mk_lambda m uv (e,ty)) 
-          (prim_mk_app (fe,(cenv.g.unit_ty --> ty)) [] [mk_unit cenv.g m] m),
-        {einfo with FunctionSize=callSize }
-    else
-        e,einfo 
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a pattern matching expression
-//------------------------------------------------------------------------- 
-
-and OptimizeMatch cenv env (spMatch,exprm,dtree,targets,m, ty) =
-    if verboseOptimizations then dprintf "OptimizeMatch\n";
-    // REVIEW: consider collecting, merging and using information flowing through each line of the decision tree to each target 
-    let dtree',dinfo = OptimizeDecisionTree cenv env m dtree 
-    let targets',tinfos = OptimizeDecisionTreeTargets cenv env m ty targets 
-    let tinfo = CombineValueInfosUnknown tinfos
-    let expr' = mk_and_optimize_match spMatch exprm m ty dtree' targets' 
-    let einfo = 
-        { TotalSize = dinfo.TotalSize + tinfo.TotalSize;
-          FunctionSize = dinfo.FunctionSize + tinfo.FunctionSize;
-          HasEffect = dinfo.HasEffect || tinfo.HasEffect;
-          MightMakeCriticalTailcall=tinfo.MightMakeCriticalTailcall; // discard tailcall info from decision tree since it's not in tailcall position
-          Info= UnknownValue }
-    expr', einfo
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a target of a decision tree
-//------------------------------------------------------------------------- 
-
-and OptimizeDecisionTreeTarget cenv env m ty (TTarget(vs,e,spTarget)) = 
-    if verboseOptimizations then dprintf "OptimizeDecisionTreeTarget\n";
-    (* REVIEW: this is where we should be using information collected for each target *)
-    let env = bind_internal_vspecs_to_unknown cenv vs env 
-    let e',einfo = OptimizeExpr cenv env e 
-    let e',einfo = ConsiderSplitToMethod cenv.settings.abstractBigTargets cenv.settings.bigTargetSize cenv env (e',einfo) 
-    let evalue' = AbstractExprInfoByVars m (FlatList.to_list vs,[]) einfo.Info 
-    TTarget(vs,e',spTarget),
-    { TotalSize=einfo.TotalSize; 
-      FunctionSize=einfo.FunctionSize;
-      HasEffect=einfo.HasEffect;
-      MightMakeCriticalTailcall = einfo.MightMakeCriticalTailcall; 
-      Info=evalue' }
-
-//-------------------------------------------------------------------------
-// Optimize/analyze a decision tree
-//------------------------------------------------------------------------- 
-
-and OptimizeDecisionTree cenv env m x =
-    match x with 
-    | TDSuccess (es,n) -> 
-        let es', einfos = OptimizeFlatExprsThenConsiderSplits cenv env es 
-        TDSuccess(es',n),CombineFlatValueInfosUnknown einfos
-    | TDBind(bind,rest) -> 
-        let (bind,binfo),envinner = OptimizeBinding cenv false env bind 
-        let rest,rinfo = OptimizeDecisionTree cenv envinner m rest 
-
-        if ValueIsUsedOrHasEffect cenv m (acc_free_in_dtree CollectLocals rest empty_freevars).FreeLocals (bind,binfo) then
-
-            let info = CombineValueInfosUnknown [rinfo;binfo]
-            // try to fold the let-binding into a single result expression
-            match rest with 
-            | TDSuccess([e],n) -> 
-                let e,adjust = TryEliminateLet cenv env bind e m 
-                TDSuccess([e],n),info
-            | _ -> 
-                TDBind(bind,rest),info
-
-        else 
-            rest,rinfo
-
-    | TDSwitch (e,cases,dflt,m) -> 
-        OptimizeSwitch cenv env (e,cases,dflt,m)
-
-and TryOptimizeDecisionTreeTest cenv test vinfo = 
-    match test,vinfo with 
-    | TTest_unionconstr (c1,_), StripUnionCaseValue(c2,_) ->  Some(cenv.g.ucref_eq c1 c2)
-    | TTest_array_length (n1,_),  _ -> None
-    | TTest_const c1,StripConstValue(c2) -> if c1 = TConst_zero or c2 = TConst_zero then None else Some(c1=c2)
-    | TTest_isnull,StripConstValue(c2) -> Some(c2=TConst_zero)
-    | TTest_isinst (srcty1,tgty1), _ -> None
-    // These should not occur in optimization
-    | TTest_query (_,_,vrefOpt1,n1,apinfo1),_ -> None
-    | _ -> None
-
-/// Optimize/analyze a switch construct from pattern matching 
-and OptimizeSwitch cenv env (e,cases,dflt,m) =
-    if verboseOptimizations then dprintf "OptimizeSwitch\n";
-    let e', einfo = OptimizeExpr cenv env e 
-
-    let cases,dflt = 
-        if cenv.settings.EliminateSwitch() && not einfo.HasEffect then
-            // Attempt to find a definite success, i.e. the first case where there is definite success
-            match (List.tryfind (function (TCase(d2,_)) when TryOptimizeDecisionTreeTest cenv d2 einfo.Info  = Some(true) -> true | _ -> false) cases) with 
-            | Some(TCase(_,case)) -> [],Some(case)
-            | _ -> 
-                // Filter definite failures
-                cases |> List.filter (function (TCase(d2,_)) when TryOptimizeDecisionTreeTest cenv d2 einfo.Info = Some(false) -> false | _ -> true), 
-                dflt
-        else
-            cases,dflt 
-    // OK, see what we're left with and continue
-    match cases,dflt with 
-    | [],Some case -> OptimizeDecisionTree cenv env m case
-    | _ -> OptimizeSwitchFallback cenv env (e', einfo, cases,dflt,m)
-
-and OptimizeSwitchFallback cenv env (e', einfo, cases,dflt,m) =
-    let cases',cinfos = List.unzip (List.map (fun (TCase(discrim,e)) -> let e',einfo = OptimizeDecisionTree cenv env m e in TCase(discrim,e'),einfo) cases) 
-    let dflt',dinfos = match dflt with None -> None,[] | Some df -> let df',einfo = OptimizeDecisionTree cenv env m df in Some df',[einfo] 
-    let size = (List.length dinfos + List.length cinfos) * 2
-    let info = CombineValueInfosUnknown (einfo :: cinfos @ dinfos)
-    let info = { info with TotalSize = info.TotalSize + size; FunctionSize = info.FunctionSize + size;  }
-    TDSwitch (e',cases',dflt',m),info
-
-and OptimizeBinding cenv isRec env (TBind(v,e,spBind) as bind) =
-    try 
-        if verboseOptimizations then dprintf "OptimizeBinding\n";
-        
-        // The aim here is to stop method splitting for direct-self-tailcalls. We do more than that: if an expression
-        // occurs in the body of recursively defined values RVS, then we refuse to split
-        // any expression that contains a reference to any value in RVS.
-        // This doesn't prevent splitting for mutually recursive references. See FSharp 1.0 bug 2892.
-        let env = 
-            if isRec then { env with dontSplitVars = vspec_map_add v () env.dontSplitVars } 
-            else env
-        
-        let repr',einfo = 
-            let env = if v.IsCompilerGenerated && isSome env.latestBoundId then env else {env with latestBoundId=Some v.Id} 
-            let cenv = if v.InlineInfo = PseudoValue then { cenv with optimizing=false} else cenv 
-            if verboseOptimizations then dprintf "OptimizeBinding --> OptimizeLambdas\n";
-            let e',einfo = OptimizeLambdas (Some v) cenv env (InferArityOfExprBinding cenv.g v e)  e v.Type 
-            let size = local_var_size 
-            e',{einfo with FunctionSize=einfo.FunctionSize+size; TotalSize = einfo.TotalSize+size} 
-
-        // Trim out optimization information for large lambdas we'll never inline
-        // Trim out optimization information for expressions that call protected members 
-        let rec cut ivalue = 
-            match ivalue with
-            | CurriedLambdaValue (_, arities, size, body,_) -> 
-                if size > (cenv.settings.lambdaInlineThreshold + arities + 2) then 
-                    if verboseOptimizations then dprintf "Discarding lambda for binding %s, size = %d, m = %a\n"  v.MangledName size output_range (range_of_expr body);
-                    UnknownValue (* trim large *)
-                else
-                    let fvs = free_in_expr CollectLocals body
-                    if fvs.UsesMethodLocalConstructs then
-                        if verboseOptimizations then dprintf "Discarding lambda for binding %s because uses protected members, m = %a\n"  v.MangledName output_range (range_of_expr body);
-                        UnknownValue (* trim protected *)
-                    else
-                        ivalue
-
-            | ValValue(v,x) -> ValValue(v,cut x)
-            | ModuleValue _ -> UnknownValue
-            | TupleValue a -> TupleValue(Array.map cut a)
-            | RecdValue (tcref,a) -> RecdValue(tcref,Array.map cut a)       
-            | UnionCaseValue (a,b) -> UnionCaseValue (a,Array.map cut b)
-            | UnknownValue | ConstValue _  | ConstExprValue _ -> ivalue
-            | SizeValue(_,a) -> MakeSizedValueInfo (cut a) 
-        let einfo = if v.MustInline  then einfo else {einfo with Info = cut einfo.Info } 
-        let einfo = 
-            if (not(v.MustInline ) && not (cenv.settings.KeepOptimizationValues())) ||
-               (v.InlineInfo = NeverInline) ||
-               // MarshalByRef methods may not be inlined
-               (match v.ActualParent with 
-                | Parent tcref -> 
-                    // Check we can deref system_MarshalByRefObject_tcref. When compiling against the Silverlight mscorlib we can't
-                    cenv.g.system_MarshalByRefObject_tcref.TryDeref.IsSome &&
-                    // Check if this is a subtype of MarshalByRefObject
-                    ExistsSameHeadTypeInHierarchy cenv.g cenv.amap v.Range (snd(generalize_tcref tcref)) cenv.g.system_MarshalByRefObject_typ 
-                | ParentNone -> false) ||
-
-               // These values are given a special going-over by the optimizer and 
-               // ilxgen.ml, hence treat them as if no-inline 
-               (let nvref = mk_local_vref v 
-                cenv.g.vref_eq nvref cenv.g.seq_vref ||
-                cenv.g.vref_eq nvref cenv.g.poly_eq_inner_vref ||
-                cenv.g.vref_eq nvref cenv.g.generic_comparison_inner_vref ||
-                cenv.g.vref_eq nvref cenv.g.generic_comparison_withc_inner_vref ||
-                cenv.g.vref_eq nvref cenv.g.generic_equality_inner_vref ||
-                cenv.g.vref_eq nvref cenv.g.generic_equality_withc_inner_vref ||
-                cenv.g.vref_eq nvref cenv.g.generic_hash_inner_vref)
-            then {einfo with Info=UnknownValue} 
-            else einfo 
-        if v.MustInline  && IsPartialExprVal einfo.Info then 
-            errorR(InternalError("the mustinline value '"^v.MangledName^"' was not inferred to have a known value",v.Range));
-        if verboseOptimizations then dprintf "val %s gets opt info %s\n" (showL(valL v)) (showL(exprValueInfoL einfo.Info));
-        
-        let env = bind_internal_local_vspec cenv v (MkValInfo einfo v) env 
-        (TBind(v,repr',spBind), einfo), env
-    with exn -> 
-        errorRecovery exn v.Range; 
-        raise ReportedError
-          
-and OptimizeBindings cenv isRec env xs = FlatList.mapfold (OptimizeBinding cenv isRec) env xs
-    
-and OptimizeModuleExpr cenv env x = 
-    match x with   
-    | TMTyped(mty,def,m) -> 
-        // Optimize the module implementation
-        let (def,info),(env,bindInfosColl) = OptimizeModuleDef cenv (env,[]) def  
-        let bindInfosColl = List.concat bindInfosColl 
-        
-        // Compute the elements truly hidden by the module signature.
-        // The hidden set here must contain NOT MORE THAN the set of values made inaccessible by 
-        // the application of the signature. If it contains extra elements we'll accidentally eliminate
-        // bindings.
-         
-        let (renaming, hidden) as rpi = mk_mdef_to_mtyp_remapping def mty 
-        let def = 
-            if not (cenv.settings.localOpt()) then def else 
-
-            let fvs = free_in_mdef CollectLocals def 
-            let dead = 
-                bindInfosColl |> List.filter (fun (bind,binfo) -> 
-
-                    // Check the expression has no side effect, e.g. is a lambda expression (a function definition)
-                    not (ValueIsUsedOrHasEffect cenv m fvs.FreeLocals (bind,binfo)) &&
-
-                    // Check the thing is hidden by the signature (if any)
-                    hidden.mhiVals.Contains(bind.Var) && 
-
-                    // Check the thing is not compiled as a static field
-                    not (IsCompiledAsStaticValue cenv.g bind.Var))
-            if verboseOptimizations then dead |> List.iter (fun (bind,_) -> dprintf "dead, hidden, buried, gone: %s\n" (showL (vspecAtBindL bind.Var)));
-            let deadSet = Zset.addList (dead |> List.map (fun (bind,_) -> bind.Var)) (Zset.empty val_spec_order)
-
-            // Eliminate dead private bindings from a module type by mutation. Note that the optimizer doesn't
-            // actually copy the entire term - it copies the expression portions of the term and leaves the 
-            // value_spec and entity_specs in place. However this means that the value_specs and entity specs 
-            // need to be updated when a change is made that affects them, e.g. when a binding is eliminated. 
-            // We'd have to do similar tricks if the type of variable is changed (as happens in TLR, which also
-            // uses mutation), or if we eliminated a type constructor.
-            //
-            // It may be wise to move to a non-mutating implementation at some point here. Copying expressions is
-            // probably more costly than copying specs anyway.
-            let rec elim_mtyp (mtyp:ModuleOrNamespaceType) =                  
-                let mty = 
-                    new ModuleOrNamespaceType(kind=mtyp.ModuleOrNamespaceKind, 
-                                  vals= (mtyp.AllValuesAndMembers |> NameMap.filterRange (Zset.mem_of deadSet >> not)),
-                                  entities= mtyp.AllEntities)
-                mtyp.ModuleAndNamespaceDefinitions |> List.iter (fun mspec -> elim_mspec  mspec)
-                mty;
-            and elim_mspec (mspec:ModuleOrNamespace) = 
-                let mtyp = elim_mtyp mspec.ModuleOrNamespaceType 
-                mspec.Data.entity_modul_contents <- notlazy mtyp
-
-            let rec elim_mdef x =                  
-                match x with 
-                | TMDefRec(tycons,vbinds,mbinds,m) -> 
-                    let vbinds = vbinds |> FlatList.filter (var_of_bind >> Zset.mem_of deadSet >> not) 
-                    let mbinds = mbinds |> List.map elim_mbind
-                    TMDefRec(tycons,vbinds,mbinds,m)
-                | TMDefLet(bind,m)  -> 
-                    if Zset.mem bind.Var deadSet then TMDefRec([],FlatList.empty,[],m) else x
-                | TMDefDo _  -> x
-                | TMDefs(defs) -> TMDefs(List.map elim_mdef defs) 
-                | TMAbstract _ ->  x 
-            and elim_mbind (TMBind(mspec, d)) =
-                // Clean up the ModuleOrNamespaceType by mutation
-                elim_mspec mspec;
-                TMBind(mspec,elim_mdef d) 
-            
-            elim_mdef def 
-
-        let info = AbstractAndRemapModulInfo "defs" cenv.g m rpi info
-
-        TMTyped(mty,def,m),info 
-
-and mk_var_bind (bind:Binding) info =
-    let v = bind.Var
-    (v.MangledName, (mk_local_vref v, info))
-
-and OptimizeModuleDef cenv (env,bindInfosColl) x = 
-    match x with 
-    | TMDefRec(tycons,binds,mbinds,m) -> 
-        let env = bind_internal_vspecs_to_unknown cenv (vars_of_Bindings binds) env
-        let bindInfos,env = OptimizeBindings cenv true env binds
-        let binds', binfos = FlatList.unzip bindInfos
-        let mbindInfos,(env,bindInfosColl) = OptimizeModuleBindings cenv (env,bindInfosColl) mbinds
-        let mbinds,minfos = List.unzip mbindInfos
-        
-          (* REVIEW: Eliminate let bindings on the way back up *)
-        (TMDefRec(tycons,binds',mbinds,m),
-         notlazy { ValInfos=NameMap.of_FlatList (FlatList.map2 (fun bind binfo -> mk_var_bind bind (MkValInfo binfo bind.Var)) binds binfos); 
-                   ModuleOrNamespaceInfos = NameMap.of_list minfos}),
-         (env,(FlatList.to_list bindInfos :: bindInfosColl))
-    | TMAbstract(mexpr) -> 
-        let mexpr,info = OptimizeModuleExpr cenv env mexpr
-        let env = bind_module_vspecs cenv info env
-        (TMAbstract(mexpr),info),(env,bindInfosColl)
-    | TMDefLet(bind,m)  ->
-        let ((bind',binfo) as bindInfo),env = OptimizeBinding cenv false env bind
-          (* REVIEW: Eliminate unused let bindings from modules *)
-        (TMDefLet(bind',m),
-         notlazy { ValInfos=NameMap.of_list [mk_var_bind bind (MkValInfo binfo bind.Var)]; 
-                   ModuleOrNamespaceInfos = NameMap.of_list []}),
-        (env ,([bindInfo]::bindInfosColl))
-
-    | TMDefDo(e,m)  ->
-        let (e,einfo) = OptimizeExpr cenv env e
-        (TMDefDo(e,m),EmptyModuleInfo),
-        (env ,bindInfosColl)
-    | TMDefs(defs) -> 
-        let (defs,info),(env,bindInfosColl) = OptimizeModuleDefs cenv (env,bindInfosColl) defs 
-        (TMDefs(defs), info), (env,bindInfosColl)
-
-and OptimizeModuleBindings cenv (env,bindInfosColl) xs = List.mapfold (OptimizeModuleBinding cenv) (env,bindInfosColl) xs
-
-and OptimizeModuleBinding cenv (env,bindInfosColl) (TMBind(mspec, def)) = 
-    let id = mspec.Id
-    let (def,info),(_,bindInfosColl) = OptimizeModuleDef cenv (env,bindInfosColl) def 
-    let env = bind_module_vspecs cenv info env
-    (TMBind(mspec,def),(id.idText, info)), 
-    (env,bindInfosColl)
-
-and OptimizeModuleDefs cenv (env,bindInfosColl) defs = 
-    if verboseOptimizations then dprintf "OptimizeModuleDefs\n";
-    let defs,(env,bindInfosColl) = List.mapfold (OptimizeModuleDef cenv) (env,bindInfosColl) defs
-    let defs,minfos = List.unzip defs
-    (defs,UnionModuleInfos minfos),(env,bindInfosColl)
-   
-and OptimizeImplFileInternal cenv env isIncrementalFragment (TImplFile(qname, pragmas, (TMTyped(mty,_,m) as mexpr))) =
-    let env,mexpr',minfo  = 
-        match mexpr with 
-        // FSI: FSI compiles everything as if you're typing incrementally into one module 
-        // This means the fragment is not truly a constrained module as later fragments will be typechecked 
-        // against the internals of the module rather than the externals. Furthermore it would be wrong to apply 
-        // optimizations that did lots of reorganizing stuff to the internals of a module should we ever implement that. 
-        | TMTyped(mty,def,m) when isIncrementalFragment -> 
-            let (def,minfo),(env,bindInfosColl) = OptimizeModuleDef cenv (env,[]) def 
-            env, TMTyped(mty, def,m), minfo
-        |  _ -> 
-            let mexpr', minfo = OptimizeModuleExpr cenv env mexpr
-            let env = bind_module_vspecs cenv minfo env
-            env, mexpr', minfo
-
-    let hidden = mk_assembly_boundary_mhi mty
-
-    let minfo = AbstractLazyModulInfoByHiding true m hidden minfo
-    env, TImplFile(qname,pragmas,mexpr'), minfo
-
-//-------------------------------------------------------------------------
-// Entry point
-//------------------------------------------------------------------------- 
-
-let OptimizeImplFile(settings,ccu,tcGlobals,importMap,optEnv,isIncrementalFragment,mimpls) =
-    let cenv = mk_cenv settings ccu tcGlobals importMap
-    OptimizeImplFileInternal cenv optEnv isIncrementalFragment mimpls 
-
-
-//-------------------------------------------------------------------------
-// Pickle to stable format for cross-module optimization data
-//------------------------------------------------------------------------- 
-
-open Pickle
-
-let rec p_expr_info x st =
-    match x with 
-    | ConstValue (c,ty)   -> p_byte 0 st; p_tup2 p_const p_typ (c,ty) st 
-    | UnknownValue   -> p_byte 1 st
-    | ValValue (a,b) -> p_byte 2 st; p_tup2 (p_vref "optval") p_expr_info (a,b) st
-    | ModuleValue a  -> p_byte 3 st; p_submodul_info a st
-    | TupleValue a   -> p_byte 4 st; (p_array p_expr_info) a st
-    | UnionCaseValue (a,b) -> p_byte 5 st; p_tup2 p_ucref (p_array p_expr_info) (a,b) st
-    | CurriedLambdaValue (_,b,c,d,e) -> p_byte 6 st; p_tup4 p_int p_int p_expr p_typ (b,c,d,e) st
-    | ConstExprValue (a,b) -> p_byte 7 st; p_tup2 p_int p_expr (a,b) st
-    | RecdValue (tcref,a)  -> p_byte 10 st; p_tup2 (p_tcref "opt data") (p_array p_expr_info) (tcref,a) st
-    | SizeValue (adepth,a) -> p_expr_info a st
-
-and p_val_info (v:ValInfo) st = 
-    p_tup2 p_expr_info p_bool (v.ValExprInfo, v.ValMakesNoCriticalTailcalls) st
-
-and p_submodul_info x st = 
-    p_tup2 (p_namemap (p_tup2 (p_vref "opttab") p_val_info)) (p_namemap p_lazy_submodul_info) (x.ValInfos, x.ModuleOrNamespaceInfos) st
-
-and p_lazy_submodul_info x st = 
-    p_lazy p_submodul_info x st
-
-let rec u_expr_info st =
-    let rec u_expr_info st =
-        let tag = u_byte st
-        match tag with
-        | 0 -> u_tup2 u_const u_typ       st |> (fun (c,ty) -> ConstValue(c,ty))
-        | 1 -> UnknownValue
-        | 2 -> u_tup2 u_vref u_expr_info st |> (fun (a,b) -> ValValue (a,b))
-        | 3 -> u_submodul_info          st |> (fun a -> ModuleValue a)
-        | 4 -> u_array u_expr_info       st |> (fun a -> TupleValue a)
-        | 5 -> u_tup2 u_ucref (u_array u_expr_info)  st |> (fun (a,b) -> UnionCaseValue (a,b))
-        | 6 -> u_tup4 u_int u_int u_expr u_typ st |> (fun (b,c,d,e) -> CurriedLambdaValue (new_uniq(),b,c,d,e))
-        | 7 -> u_tup2 u_int u_expr        st |> (fun (a,b) -> ConstExprValue (a,b))
-        | 10 -> u_tup2 u_tcref (u_array u_expr_info)      st |> (fun (a,b) -> RecdValue (a,b))
-        | _ -> failwith "u_expr_info"
-    MakeSizedValueInfo (u_expr_info st) (* calc size of unpicked ExprValueInfo *)
-
-and u_val_info st = 
-    let a,b = u_tup2 u_expr_info u_bool st
-    { ValExprInfo=a; ValMakesNoCriticalTailcalls = b } 
-
-and u_submodul_info st = 
-    let a,b = u_tup2 (u_namemap (u_tup2 u_vref u_val_info)) (u_namemap u_lazy_submodul_info) st
-    { ValInfos=a; ModuleOrNamespaceInfos=b}
-
-and u_lazy_submodul_info st = u_lazy u_submodul_info st
-
-let p_lazy_modul_info info st = p_lazy_submodul_info info st
-let u_lazy_modul_info st = u_lazy_submodul_info st
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/opt.mli b/tools/FSharp_1.9.6.16/source/fsharp/opt.mli
deleted file mode 100644
index 4d16bc12..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/opt.mli
+++ /dev/null
@@ -1,54 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-module  Microsoft.FSharp.Compiler.Opt
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-
-type OptimizationSettings = 
-    { abstractBigTargets : bool
-      jitOptUser : bool option
-      localOptUser : bool option
-      crossModuleOptUser : bool option
-      bigTargetSize : int
-      veryBigExprSize : int 
-      lambdaInlineThreshold : int
-      reportingPhase : bool;
-      reportNoNeedToTailcall: bool
-      reportFunctionSizes : bool
-      reportHasEffect : bool
-      reportTotalSizes : bool }
-
-    member jitOpt : unit -> bool 
-    member localOpt : unit -> bool 
-    static member Defaults : OptimizationSettings
-
-/// Optimization information 
-type ModuleInfo
-type LazyModuleInfo = ModuleInfo Lazy.t
-
-type IncrementalOptimizationEnv
-val internal empty_env : IncrementalOptimizationEnv
-
-/// For building optimization environments incrementally 
-val internal BindCcu : Tast.ccu -> LazyModuleInfo -> IncrementalOptimizationEnv -> IncrementalOptimizationEnv
-
-/// The entry point. Boolean indicates 'incremental extension' in FSI 
-val internal OptimizeImplFile : OptimizationSettings *  Tast.ccu (* scope *) * Env.TcGlobals * Import.ImportMap * IncrementalOptimizationEnv * bool * Tast.TypedImplFile -> IncrementalOptimizationEnv * Tast.TypedImplFile * LazyModuleInfo
-
-/// Displaying optimization data
-val internal moduleInfoL : LazyModuleInfo -> Layout.layout
-
-/// Saving and re-reading optimization information 
-val p_lazy_modul_info : LazyModuleInfo -> Pickle.WriterState -> unit 
-val internal u_lazy_modul_info : Pickle.ReaderState -> LazyModuleInfo
-
-/// Rewrite the modul info using the export remapping 
-val RemapLazyModulInfo : Env.TcGlobals -> Tastops.Remap -> (LazyModuleInfo -> LazyModuleInfo)
-val AbstractLazyModulInfoToEssentials : (LazyModuleInfo -> LazyModuleInfo)
-val UnionModuleInfos: LazyModuleInfo list -> LazyModuleInfo
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/outcome.ml b/tools/FSharp_1.9.6.16/source/fsharp/outcome.ml
deleted file mode 100644
index f41a6983..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/outcome.ml
+++ /dev/null
@@ -1,69 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-(* --------------------------------------------------------------------	
- * Outcomes.  These are used to describe steps of a machine that
- * may raise errors.  The errors can be trapped.
- * --------------------------------------------------------------------	*)
-
-module (* internal *) Microsoft.FSharp.Compiler.Outcome
-
-open Internal.Utilities
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler
-
-type 'a outcome = ResultOrException<'a>
-
-let success a = Result a
-let raze (b:exn) = Exception b
-
-let trappable_outcome_cases f1 f2 = function
-  | Result x -> f1 x
-  | Exception err -> f2 err
-let trappable_option (exn:exn) res = 
-  match res with 
-  | Some x -> success(x) 
-  | None -> raze exn
-let trappable_trywith res f = trappable_outcome_cases success f res
-let rec trappable_outcome_first (e:exn) f l1 =
-  match l1 with 
-  | [] -> raze e 
-  | (h1::t1) -> 
-      trappable_outcome_cases success 
-	(fun x -> trappable_outcome_first e f t1) 
-	(f h1)
-let (||?>) res f = 
-  match res with 
-  | Result x -> f x 
-  | Exception err -> Exception err
-
-let (|?>) res f = 
-  match res with 
-  | Result x -> Result(f x )
-  | Exception err -> Exception err
-  
-let razewith s = raze(Failure(s))
-
-let ForceRaise = function
-  | Result x -> x
-  | Exception err -> raise err
-
-let rec trappable_map f l1 =
-  match l1 with 
-    [] -> success []
-  | (h1::t1) -> 
-      f h1 ||?> (fun h -> trappable_map f t1 ||?> (fun t -> success (h::t)))
-
-let rec trappable_map2 f l1 l2 =
-  match l1,l2 with 
-  | [],[] -> success []
-  | [],_ -> razewith "trappable_map2"
-  | _,[] -> razewith "trappable_map2"
-  | (h1::t1),(h2::t2) -> 
-      f h1 h2 ||?> (fun h -> trappable_map2 f t1 t2 ||?> (fun t -> success(h::t)))
-
- (* x |> otherwise (fun () -> result) *)
-let otherwise f x =
-   trappable_outcome_cases (fun x -> success(x)) (fun err -> f()) x
-
-	    
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/outcome.mli b/tools/FSharp_1.9.6.16/source/fsharp/outcome.mli
deleted file mode 100644
index fc5f70e1..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/outcome.mli
+++ /dev/null
@@ -1,21 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-module (* internal *) Microsoft.FSharp.Compiler.Outcome
-
-open Internal.Utilities
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-
-type 'a outcome = ResultOrException<'a>
-val success : 'a -> 'a outcome
-val raze : exn -> 'a outcome
-val trappable_outcome_cases : mapping:('a -> 'b) -> (exn -> 'b) -> 'a outcome -> 'b
-val trappable_option : exn -> 'a option -> 'a outcome
-val trappable_trywith : 'a outcome -> (exn -> 'a outcome) -> 'a outcome
-val trappable_outcome_first : exn -> ('a -> 'b outcome) -> 'a list -> 'b outcome
-val ( ||?> ) : 'a outcome -> ('a -> 'b outcome) -> 'b outcome
-val ( |?> ) : 'a outcome -> ('a -> 'b) -> 'b outcome
-val razewith : string -> 'a outcome
-val ForceRaise : 'a outcome -> 'a
-val trappable_map : ('a -> 'b outcome) -> 'a list -> 'b list outcome
-val trappable_map2 : ('a -> 'b -> 'c outcome) -> 'a list -> 'b list -> 'c list outcome
-val otherwise : (unit -> 'a outcome) -> 'a outcome -> 'a outcome
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/pars.mly b/tools/FSharp_1.9.6.16/source/fsharp/pars.mly
deleted file mode 100644
index 32080bc0..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/pars.mly
+++ /dev/null
@@ -1,3338 +0,0 @@
-%{
-// (c) Microsoft Corporation. All rights reserved
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler
-open Internal.Utilities.Text.Parsing
-
-open System
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.PrettyNaming
-open Microsoft.FSharp.Compiler.ErrorLogger
-
-let mk_optional m xopt = 
-    match xopt with 
-    | None -> mksyn_lid_get m Ast.lib_MFCore_path "None"
-    | Some x  -> Expr_app(ExprAtomicFlag.NonAtomic, mksyn_lid_get m Ast.lib_MFCore_path "Some",x,m)
-
-let mk_Do (vis,strict,expr,m) = 
-    if isSome vis then errorR(Error("Visibility declarations are not permitted on 'do' bindings",m));
-    Binding (None,
-             (if strict then DoBinding else StandaloneExpression),
-             false,false,[],emptyPreXmlDoc,SynInfo.emptyValSynData,
-             (if strict then Pat_const(Const_unit,m) else Pat_wild m),
-             BindingRhs([],None,expr),m,NoSequencePointAtDoBinding)
-
-let mk_Def_expr (e,m) = 
-    let spExpr = if IsControlFlowExpression e then NoSequencePointAtDoBinding else SequencePointAtBinding (range_of_synexpr e) in
-    Def_expr(spExpr,e,m)
-
-let addAttribs attrs p =  Pat_attrib(p,attrs,range_of_synpat p)
-
-let computeOverloadQualifier attrs = 
-  let attrs = 
-      attrs |> List.choose (fun attr -> 
-          match attr with 
-          | (Attr(lid,(Expr_const(Const_string (s,_),_) | Expr_paren(Expr_const(Const_string (s,_),_),_)),_,_)) ->
-              begin match List.frontAndBack lid with 
-              | (_,id) when id.idText = "OverloadID" or id.idText = "OverloadIDAttribute" -> Some(s)
-              | _ -> None
-              end
-          | _ -> None) in
-  match attrs with 
-  | [x] -> Some x
-  | [] -> None
-  | _ -> failwith "Multiple OverloadID attributes"
-
-(* error recovery*)
-let arbExpr(parseState) = Expr_arb(lhs(parseState))
-
-let mksyn_anon_constraint ty m = Type_anon_constraint(ty,m) 
-
-(* This function is called by the generated parser code. Returning initiates error recovery *)
-let parse_error_rich = Some (fun (ctxt: ParseErrorContext<_>) -> 
-    errorR(SyntaxError(box(ctxt), GetLexerRange (GetParserLexbuf ctxt.ParseState))))
-
-let reportParseErrorAt m s = errorR(Error(s,m))
-
-let reportParseWarningAt m s = warning(Error(s,m))
-
-let raiseParseErrorAt m s = 
-    reportParseErrorAt m s; 
-    // This initiates error recovery
-    raise RecoverableParseError 
-
-let checkEndOfFileError t = 
-  match t with 
-  | AT_ifdef_skip(_,_,m) -> reportParseErrorAt m "end of file in #if section begun at or after here"
-  | AT_string (_,m) ->  reportParseErrorAt m "end of file in string begun at or before here"
-  | AT_vstring (_,m) ->  reportParseErrorAt m "end of file in verbatim string begun at or before here"
-  | AT_comment (_,_,m) ->  reportParseErrorAt m "end of file in comment begun at or before here"
-  | AT_tokenized_comment (_,_,m) ->  reportParseErrorAt m "end of file in comment begun at or before here"
-  | AT_comment_string (_,_,m) -> reportParseErrorAt m "end of file in string embedded in comment begun at or before here"
-  | AT_comment_vstring (_,_,m) -> reportParseErrorAt m "end of file in verbatim string embedded in comment begun at or before here"
-  | AT_camlonly (_,m) -> reportParseErrorAt m "end of file in IF-OCAML section begun at or before here" 
-  | AT_endline(ENDL_skip(_,_,m)) -> reportParseErrorAt m "end of file in directive begun at or before here"
-  | AT_endline(ENDL_token(stack))
-  | AT_token(stack) -> 
-      match stack with 
-      | [] -> ()
-      | (_,m) :: _  -> reportParseErrorAt m "no #endif found for #if or #else" 
-
-type BindingSet = BindingSetPreAttrs of range * bool * bool * (SynAttributes -> access option -> SynAttributes * SynBinding list)
-
-let mkClassMemberLocalBindings(isStatic,wholem,attrs,vis,BindingSetPreAttrs(_,isRec,isUse,declsPreAttrs)) = 
-   let ignoredFreeAttrs,decls = declsPreAttrs attrs vis in
-   if nonNil ignoredFreeAttrs then warning(Error("attributes have been ignored in this construct",wholem));
-   if isUse then errorR(Error("'use' bindings are not permitted in implicit class constructors",wholem));
-   ClassMemberDefn_let_bindings (decls,isStatic,isRec,wholem)
-
-let mkLocalBindings (wholem,BindingSetPreAttrs(_,isRec,isUse,declsPreAttrs),body) = 
-   let ignoredFreeAttrs,decls = declsPreAttrs [] None in 
-   if nonNil ignoredFreeAttrs then warning(Error("attributes have been ignored in this construct",wholem));
-   Expr_let (isRec,isUse,decls,body,wholem) 
-
-let mkDefnBindings (wholem,BindingSetPreAttrs(_,isRec,isUse,declsPreAttrs),attrs,vis,attrsm) = 
-    if isUse then errorR(Error("'use' bindings are not permitted in modules",wholem));
-    let freeAttrs,decls = declsPreAttrs attrs vis in 
-    let letDecls = [ Def_let (isRec,decls,wholem) ] in 
-    let attrDecls = if nonNil freeAttrs then [ Def_attributes (freeAttrs,attrsm) ] else [] in 
-    attrDecls @ letDecls
-
-let id_of_pat m p = 
-    match p with 
-    | Pat_as (Pat_wild _,id,false,_,_) -> id 
-    | _ -> raiseParseErrorAt m "an integer for loop must use a simple identifier"
-
-let checkForMultipleAugmentations m a1 a2 = 
-    if nonNil a1 && nonNil a2 then raiseParseErrorAt m "at most one 'with' augmentation is permitted";
-    a1 @ a2
-
-let grabXmlDoc(parseState,elemIdx) = 
-    LexbufLocalXmlDocStore.GrabXML(GetParserLexbuf parseState,rhs parseState elemIdx)
-
-
-%} 
-
-%token  BYTEARRAY
-%token  STRING 
-%token  IDENT 
-%token  INFIX_STAR_STAR_OP 
-%token  INFIX_COMPARE_OP 
-%token  INFIX_AT_HAT_OP 
-%token  INFIX_BAR_OP 
-%token  PREFIX_OP
-%token  INFIX_STAR_DIV_MOD_OP 
-%token  INFIX_AMP_OP 
-%token  PLUS_MINUS_OP 
-%token  ADJACENT_PREFIX_PLUS_MINUS_OP 
-%token  FUNKY_OPERATOR_NAME
-
-/* bool indicates if INT8 was 'bad' max_int+1, e.g. '128'  */
-%token  INT8 
-%token  INT16
-%token  INT32 INT32_DOT_DOT
-%token  INT64
-
-%token  UINT8
-%token  UINT16
-%token  UINT32
-%token  UINT64
-%token  UNATIVEINT
-%token  NATIVEINT
-%token  IEEE32
-%token  IEEE64
-%token  CHAR
-%token  DECIMAL 
-%token <(string * string)> BIGNUM
-%token  LET YIELD YIELD_BANG
-%token  SPLICE_SYMBOL PERCENT_OP BINDER 
-%token  LQUOTE RQUOTE  RQUOTE_DOT 
-%token BAR_BAR LESS GREATER UPCAST DOWNCAST NULL RESERVED MODULE NAMESPACE DELEGATE CONSTRAINT BASE
-%token AND AS ASSERT ASR BEGIN DO DONE DOWNTO ELSE ELIF END DOT_DOT
-%token EXCEPTION FALSE FOR FUN FUNCTION IF IN FINALLY DO_BANG 
-%token LAZY  MATCH METHOD MUTABLE NEW OF 
-%token OPEN OR REC THEN TO TRUE TRY TYPE VAL INLINE INTERFACE INSTANCE
-%token WHEN WHILE WITH HASH AMP AMP_AMP QUOTE LPAREN RPAREN STAR COMMA RARROW RARROW2 GREATER_DOT GREATER_BAR_RBRACK LPAREN_STAR_RPAREN
-%token QMARK QMARK_QMARK DOT COLON COLON_COLON COLON_GREATER  COLON_QMARK_GREATER COLON_QMARK COLON_EQUALS SEMICOLON 
-%token SEMICOLON_SEMICOLON LARROW EQUALS  LBRACK  LBRACK_BAR  LBRACK_LESS LBRACE
-%token LBRACE_LESS BAR_RBRACK GREATER_RBRACE UNDERSCORE
-%token BAR RBRACK RBRACE MINUS DOLLAR
-%token GREATER_RBRACK STRUCT SIG 
-%token STATIC MEMBER CLASS VIRTUAL ABSTRACT OVERRIDE DEFAULT CONSTRUCTOR INHERIT 
-%token EXTERN VOID PUBLIC PRIVATE INTERNAL 
-
-/* for high-precedence tyapps and apps */
-%token HIGH_PRECEDENCE_APP   /* inserted for f(x), but not f (x) */
-%token HIGH_PRECEDENCE_TYAPP /* inserted for x, but not x OLET      /* LexFilter #light converts 'LET' tokens to 'OLET' when starting (CtxtLetDecl(blockLet=true)) */
-%token  OBINDER /* LexFilter #light converts 'BINDER' tokens to 'OBINDER' when starting (CtxtLetDecl(blockLet=true)) */
-%token ODO              /* LexFilter #light converts 'DO' tokens to 'ODO' */
-%token ODO_BANG         /* LexFilter #light converts 'DO_BANG' tokens to 'ODO_BANG' */
-%token OTHEN            /* LexFilter #light converts 'THEN' tokens to 'OTHEN' */
-%token OELSE            /* LexFilter #light converts 'ELSE' tokens to 'OELSE' except if immeditely followed by 'if', when they become 'ELIF' */
-%token OWITH            /* LexFilter #light converts SOME (but not all) 'WITH' tokens to 'OWITH' */ 
-%token OFUNCTION        /* LexFilter #light converts 'FUNCTION' tokens to 'OFUNCTION' */ 
-%token OFUN             /* LexFilter #light converts 'FUN' tokens to 'OFUN' */
-
-
-%token ORESET           /* LexFilter uses internally to force a complete reset on a ';;' */
-
-%token OBLOCKBEGIN      /* LexFilter #light inserts for:
-                                  - just after first '=' or ':' when in 'CtxtModuleHead', i.e. after 'module' and sequence of dot/identifier/access tokens
-                                  - just after first '=' when in 'CtxtMemberHead'
-                                  - just after first '=' when in 'CtxtType' 
-                                  - just after 'do' in any context (when opening CtxtDo)
-                                  - just after 'finally' in any context 
-                                  - just after 'with' (when opening CtxtWithAsAugment)
-                                  - just after 'else' (when opening CtxtElse)
-                                  - just after 'then' (when opening CtxtThen)
-                                  - just after 'interface' (when pushing CtxtParen(INTERFACE), i.e. next token is DEFAULT | OVERRIDE | INTERFACE | NEW | TYPE | STATIC | END | MEMBER | ABSTRACT  | INHERIT | LBRACK_LESS)
-                                  - just after 'class' (when pushing CtxtParen(CLASS)
-                                  - just after 'class' 
-                           But not when opening these CtxtSeqBlocks:
-                                  - just after first non-dot/identifier token past 'namespace' 
-                                  - just after first '=' when in 'CtxtLetDecl' or 'CtxtWithAsLet' 
-                                  - just after 'lazy' in any context
-                                  - just after '->' in any context                                  
-                                  - when opening CtxtNamespaceHead, CtxtModuleHead 
-                        */
-%token OBLOCKSEP        /* LexFilter #light inserts when transforming CtxtSeqBlock(NotFirstInSeqBlock,_,AddBlockEnd) to CtxtSeqBlock(FirstInSeqBlock,_,AddBlockEnd) on exact alignment */
-
-/*    REVIEW: merge OEND, ODECLEND, OBLOCKEND and ORIGHT_BLOCK_END into one token */
-%token OEND             /* LexFilter #light inserts when closing CtxtFun, CtxtMatchClauses, CtxtWithAsLet _        */
-%token ODECLEND         /* LexFilter #light inserts when closing CtxtDo and CtxtLetDecl(block) */
-%token ORIGHT_BLOCK_END /* LexFilter #light inserts when closing CtxtSeqBlock(_,_,AddOneSidedBlockEnd) */
-%token OBLOCKEND        /* LexFilter #light inserts when closing CtxtSeqBlock(_,_,AddBlockEnd) */
-
-%token OINTERFACE_MEMBER /* inserted for non-paranthetical use of 'INTERFACE', i.e. not INTERFACE/END */
-%token  ODUMMY
-
-/* These are artificial */
-%token  LEX_FAILURE
-%token  COMMENT WHITESPACE HASH_LINE HASH_LIGHT INACTIVECODE LINE_COMMENT STRING_TEXT EOF
-%token  HASH_IF HASH_ELSE HASH_ENDIF 
-
-%start signatureFile implementationFile interaction
-%type  implementationFile
-%type  signatureFile
-%type  interaction
-%type  ident
-%type  typ
-%type  tyconSpfns
-%type  declExpr
-%type  headBindingPattern
-
-
-/* About precedence rules: 
- * 
- * Tokens and dummy-terminals are given precedence below (lowest first).
- * A rule has precedence of the first token or the dummy terminal given after %prec.
- * The precedence resolve shift/reduce conflicts:
- *   (a) If either rule has no precedence:
- *       S/R: shift over reduce, and
- *       R/R: reduce earlier rule over later rule.
- *   (b) If both rules have precedence:
- *       S/R: choose highest precedence action (precedence of reduce rule vs shift token)
- *            if same precedence: leftassoc gives reduce, rightassoc gives shift, nonassoc error.
- *       R/R: reduce the rule that comes first (textually first in the yacc file)
- *
- * Advice from: http://dinosaur.compilertools.net/yacc/
- *
- *   'Conflicts resolved by precedence are not counted in the number of S/R and R/R
- *    conflicts reported by Yacc. This means that mistakes in the moduleSpfn of
- *    precedences may disguise errors in the input grammar; it is a good idea to be
- *    sparing with precedences, and use them in an essentially ``cookbook'' fashion,
- *    until some experience has been gained'
- *
- * Observation:
- *   It is possible to eliminate conflicts by giving precedence to rules and tokens.
- *   Dummy tokens can be used for the rule and the tokens also need precedence.
- *   The danger is that giving precedence to the tokens may twist the grammar elsewhere.
- *   Maybe it would be good to assign precedence at given locations, e.g.
- *
- *   order: precShort precLong
- *
- *   rule: TokA TokB %@precShort        {action1}     -- assign prec to rule.
- *       | TokA TokB TokC@precLong TokD {action2}     -- assign prec to TokC at this point.
- *
- * Observation: reduce/reduce
- *   If there is a common prefix with a reduce/reduce conflict,
- *   e.g "OPEN path" for topopens and moduleDefns then can factor
- *   opendef = "OPEN path" which can be on both paths.
- *
- * Debugging and checking precedence rules.
- *   - comment out a rule's %prec and see what conflicts are introduced.
- *
- * Dummy terminals (like prec_type_prefix) can assign precedence to a rule.
- * Doc says rule and (shift) token precedence resolves shift/reduce conflict.
- * It seems like dummy terminals can not assign precedence to the shift,
- * but including the tokens in the precedences below will order them.
- * e.g. prec_type_prefix lower precedence than RARROW, LBRACK, IDENT, LAZY, STAR (all extend types).
- */
-
-/* start with lowest */
-
-%nonassoc prec_args_error             /* less than RPAREN */
-%nonassoc prec_atomexpr_lparen_error  /* less than RPAREN */
-
-%right AS
-
-/* prec_wheretyp_prefix = "where typ" lower than extensions, i.e. "WHEN" */
-%nonassoc prec_wheretyp_prefix        /* lower than WHEN and RPAREN */
-%nonassoc RPAREN
-
-%right WHEN
-
-/* prec_pat_pat_action = "pattern when expr -> expr"
- * Lower than match extensions - i.e. BAR.
- */
-%nonassoc prec_pat_pat_action          /* lower than BAR */
-
-/* "a then b" as an object constructor is very low precedence */
-/* Lower than "if a then b" */
-%left prec_then_before
-%nonassoc prec_then_if
-%left  BAR
-
-%right SEMICOLON  prec_semiexpr_sep OBLOCKSEP
-%right prec_defn_sep
-
-/* prec_atompat_pathop = precedence of at atomic pattern, e.g "Constructor".
- * Lower than possible pattern extensions, so "pathop . extension" does shift not reduce.
- * possible extensions are:
- *  - constant terminals.
- *  - null
- *  - LBRACK = [
- *  - TRUE,FALSE
- */
-%nonassoc prec_atompat_pathop
-%nonassoc INT8 UINT8 INT16 UINT16 INT32 UINT32 INT64 UINT64 NATIVEINT UNATIVEINT IEEE32 IEEE64 CHAR STRING BYTEARRAY BIGNUM DECIMAL
-%nonassoc LPAREN LBRACE LBRACK_BAR 
-%nonassoc TRUE FALSE UNDERSCORE NULL
-
-
-/* prec_typ_prefix        lower than "T  -> T  -> T" extensions.
- * prec_tuptyp_prefix     lower than "T * T * T * T" extensions.
- * prec_tuptyptail_prefix lower than "T * T * T * T" extensions.
- * Lower than possible extensions:
- *  - STAR, LAZY, IDENT, RARROW
- *  - LBRACK = [ - for "base[]" types              
- * Shifts not reduces.
- */
-%nonassoc prec_typ_prefix             /* lower than STAR, LAZY, IDENT, RARROW etc */
-%nonassoc prec_tuptyp_prefix          /* ditto */
-%nonassoc prec_tuptyptail_prefix      /* ditto */
-%nonassoc prec_toptuptyptail_prefix      /* ditto */
-        
-%right    RARROW
-%nonassoc IDENT LAZY LBRACK
-
-/* prec_opt_attributes_none = precedence of no attributes
- * These can prefix LET-moduleDefns.
- * Committing to an opt_attribute (reduce) forces the decision that a following LET is a moduleDefn.
- * At the top-level, it could turn out to be an expr, so prefer to shift and find out...
- */
-%nonassoc prec_opt_attributes_none    /* lower than LET,NEW */
-
-/* LET,NEW higher than SEMICOLON so shift
- *   "seqExpr = seqExpr; . let x = y in z"
- *   "seqExpr = seqExpr; . new...."
- */
-%nonassoc LET NEW
-
-       
-/* Redundant dummies: expr_let, expr_function, expr_fun, expr_match */
-/* Resolves conflict: expr_try, expr_if */
-%nonassoc expr_let
-%nonassoc decl_let
-%nonassoc expr_function expr_fun expr_match expr_try expr_do
-%nonassoc decl_match decl_do
-%nonassoc expr_if                     /* lower than ELSE to disambiguate "if _ then if _ then _ else _" */
-%nonassoc ELSE   
-
-/* prec_atomtyp_path = precedence of atomType "path"
- * Lower than possible extension "path" to allow "path . <" shift.
- * Extensions: LESS
- */
-%nonassoc prec_atomtyp_path           /* lower than LESS */
-%nonassoc prec_atomtyp_get_path       /* lower than LESS */
-
-/* prec_no_more_attr_bindings = precedence of "more_localBindings = ."
- * Lower precedence than AND so further bindings are shifted.
- */
-%nonassoc prec_no_more_attr_bindings  /* lower than AND */
-%nonassoc OPEN
-
-/* prec_interfaces_prefix - lower than extensions, i.e. INTERFACE */
-%nonassoc prec_interfaces_prefix      /* lower than INTERFACE */
-%nonassoc INTERFACE
-
-%right LARROW 
-%right COLON_EQUALS 
-%nonassoc pat_tuple expr_tuple
-%left COMMA
-%nonassoc slice_comma  /* for matrix.[1..2,3..4] the ".." has higher precedence than "2,3" */
-%nonassoc DOT_DOT /* for matrix.[1..2,3..4] the ".." has higher precedence than "2,3" */
-%nonassoc paren_pat_colon
-%nonassoc paren_pat_attribs
-%left OR BAR_BAR
-%left AND   /* check */
-%left  AMP AMP_AMP 
-%nonassoc pat_conj
-%nonassoc expr_not
-%left INFIX_COMPARE_OP DOLLAR LESS GREATER EQUALS  INFIX_BAR_OP INFIX_AMP_OP
-%right INFIX_AT_HAT_OP
-%right COLON_COLON
-%nonassoc pat_isinst expr_isinst COLON_GREATER  
-%left PLUS_MINUS_OP MINUS expr_prefix_plus_minus ADJACENT_PREFIX_PLUS_MINUS_OP
-%left  INFIX_STAR_DIV_MOD_OP STAR PERCENT_OP
-%right INFIX_STAR_STAR_OP
-%left  QMARK_QMARK
-%left head_expr_adjacent_minus
-%left expr_app expr_assert expr_lazy
-%left arg_expr_adjacent_minus
-%left expr_args
-%right matching_bar
-%left pat_app
-%left pat_args
-%left PREFIX_OP
-%left DOT QMARK
-%left HIGH_PRECEDENCE_APP
-%left HIGH_PRECEDENCE_TYAPP
-
-
-%nonassoc prec_interaction_empty
-
-%%
-
-/* F# TopLevel */
-/* NOTE: interactions */
-/* A SEMICOLON_SEMICOLON (or EOF) will mark the end of all interaction blocks. */
-/* The end of interaction blocks must be determined without needing to lookahead one more token. */
-/* A lookahead token would be dropped between parser calls. See bug 1027. */
-
-interaction:
-  | interactiveItemsTerminator
-     { IDefns ($1,lhs(parseState)) }
-  | SEMICOLON 
-     { warning(Error("A semicolon is not expected at this point",rhs parseState 1));
-       IDefns ([],lhs(parseState)) }
-  | OBLOCKSEP
-     { IDefns ([],lhs(parseState)) }
-  
-hashDirective:
-  | HASH IDENT hashDirectiveArgs                            
-     { HashDirective ($2,$3,lhs(parseState)) }
-
-hashDirectiveArg: 
-  | STRING 
-     { $1 } 
-
-hashDirectiveArgs: 
-  |    
-     { [] } 
-  | hashDirectiveArgs hashDirectiveArg 
-     { $1 @ [$2] }
-
-interactiveTerminator: 
-  | SEMICOLON_SEMICOLON {}
-  | EOF     {}
-
-/* Represents the sequence of items swallowed in one gulp by F# Interactive */
-/* It is important to make this as large as possible given the chunk of input */
-/* text. More or less identical to 'moduleDefns' but where SEMICOLON_SEMICOLON is */
-/* not part of the grammar of topSeps and HASH interactions are not part of */
-/* the swalloed blob, since things like #use must be processed separately. */
-/* REVIEW: limiting the input chunks until the next # directive can lead to */ 
-/* discrepencies between whole-file type checking in FSI and FSC. */
-
-interactiveItemsTerminator:
-  /* Always ends on interactiveTerminator */
-  | interactiveTerminator  { [] }
-  | interactiveModuleDefns interactiveTerminator { $1 }
-  | interactiveExpr        interactiveTerminator { $1 }
-  | interactiveHash        interactiveTerminator { $1 }
-  | interactiveModuleDefns itop_seps interactiveItemsTerminator { $1 @ $3 }
-  | interactiveExpr        itop_seps interactiveItemsTerminator { $1 @ $3 }
-  | interactiveHash        itop_seps interactiveItemsTerminator { $1 @ $3 }
-
-interactiveModuleDefns:
-  /* One or more moduleDefn. REVIEW: "moduleDefns" logical name, but that is used already */
-  | moduleDefn                        { $1 }
-  | moduleDefn interactiveModuleDefns { $1 @ $2 }
-
-interactiveExpr:
-  | opt_attributes opt_decl_visibility declExpr
-      { if isSome $2 then errorR(Error("Visibility declarations are not permitted here",rhs parseState 3));
-        let attrDecls = if nonNil $1 then [ Def_attributes ($1,rhs parseState 1) ] else [] in 
-        attrDecls @ [ mk_Def_expr($3,rhs parseState 3)] }
-
-interactiveHash:      
-  | hashDirective { [Def_hash($1,rhs parseState 1)] }
-      
-/* F# Language Proper */
-
-signatureFile: 
-  | fileNamespaceSpecs EOF 
-     { checkEndOfFileError $2; $1 }
-  | fileNamespaceSpecs error EOF 
-     { $1 }
-
-  /* If this rule fires it is kind of catastrophic: error recovery yields no results! */
-  /* This will result in NO intellisense for the file! Ideally we wouldn't need this rule */
-  /* Note: the compiler assumes there is at least one "fragment", so an empty one is used (see 4488) */
-  | error EOF 
-     { let emptySigFileFrag = AnonTopModuleSpec([],rhs parseState 1) in 
-       ParsedSigFile([],[emptySigFileFrag]) }     
-
-implementationFile: 
-  | fileNamespaceImpls EOF 
-     { checkEndOfFileError $2; $1 }
-  | fileNamespaceImpls error EOF 
-     { $1 }
-
-  /* If this rule fires it is kind of catastrophic: error recovery yields no results! */
-  /* This will result in NO intellisense for the file! Ideally we wouldn't need this rule */
-  /* Note: the compiler assumes there is at least one "fragment", so an empty one is used (see 4488) */
-  | error EOF 
-     { let emptyImplFileFrag = AnonTopModuleImpl([],rhs parseState 1) in 
-       ParsedImplFile([],[emptyImplFileFrag]) }
-
-moduleIntro: 
-  | MODULE opt_access path { $3,true,grabXmlDoc(parseState,1),$2 }
-
-namespaceIntro: 
-  | NAMESPACE path { $2,false,grabXmlDoc(parseState,1)  }
-
-fileNamespaceSpecs: 
-  | fileModuleSpec  
-      { ParsedSigFile([],[ ($1 ([],emptyPreXmlDoc)) ]) }
-  | fileModuleSpec  fileNamespaceSpecList 
-      { (* If there are namespaces, the first fileModuleImpl may only contain # directives *)
-        let decls = 
-            match ($1 ([],emptyPreXmlDoc)) with 
-            | AnonTopModuleSpec(decls,m) -> decls  
-            | AnonNamespaceFragmentSpec(_,_, decls, _,_,_) -> decls 
-            | NamedTopModuleSpec(ModuleOrNamespaceSpec(_,_,_,_,_,_,m)) ->
-                raiseParseErrorAt m "only '#' compiler directives may occur prior to the first 'namespace' declaration" in
-        let decls = 
-            decls |> List.collect (function 
-                | (Spec_hash (hd,_)) -> [hd]
-                | d ->  
-                     reportParseErrorAt (range_of_synspec d) "only '#' compiler directives may occur prior to the first 'namespace' declaration";
-                     []) in
-        ParsedSigFile(decls, $2) } 
-
-fileNamespaceSpecList: 
-  | fileNamespaceSpec fileNamespaceSpecList { $1 :: $2 }
-  | fileNamespaceSpec { [$1] }
-
-fileNamespaceSpec: 
-  | opt_attributes namespaceIntro deprecated_opt_equals fileModuleSpec 
-     { let path,_,xml = $2 in ($4 (path,xml)) }
-
-fileNamespaceImpls: 
-  | fileModuleImpl  
-      { ParsedImplFile([], [ ($1 ([],emptyPreXmlDoc)) ]) }
-  | fileModuleImpl fileNamespaceImplList 
-      { (* If there are namespaces, the first fileModuleImpl may only contain # directives *)
-        let decls = 
-            match ($1 ([],emptyPreXmlDoc)) with 
-            | AnonTopModuleImpl(decls,m) -> decls  
-            | AnonNamespaceFragmentImpl(_,_, decls, _,_,_) -> decls 
-            | NamedTopModuleImpl(ModuleOrNamespaceImpl(_,_,_,_,_,_,m)) ->
-                raiseParseErrorAt m "only '#' compiler directives may occur prior to the first 'namespace' declaration" in
-        let decls = 
-            decls |> List.collect (function 
-                | (Def_hash (hd,_)) -> [hd]
-                | d ->  
-                     reportParseErrorAt (range_of_syndecl d) "only '#' compiler directives may occur prior to the first 'namespace' declaration";
-                     []) in
-        ParsedImplFile(decls, $2) } 
-
-
-fileNamespaceImplList: 
-  | fileNamespaceImpl fileNamespaceImplList { $1 :: $2 }
-  | fileNamespaceImpl { [$1] }
-
-fileNamespaceImpl: 
-  | opt_attributes namespaceIntro deprecated_opt_equals fileModuleImpl 
-     { let path,_,xml = $2 in ($4 (path,xml)) }
-
-fileModuleSpec: 
-  | opt_attributes opt_decl_visibility  moduleIntro moduleSpfnsPossiblyEmpty 
-    { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-      let m = (rhs2 parseState 3 4) in
-      (fun (path,_) -> 
-        let path2,_,xml,vis = $3 in 
-        let lid = path@path2 in 
-        NamedTopModuleSpec(ModuleOrNamespaceSpec(lid,true, $4, xml,$1,vis,m)))  }
-  | moduleSpfnsPossiblyEmpty 
-    { let m = (rhs parseState 1) in 
-      (fun (path,xml) -> 
-        match path with 
-        | [] -> AnonTopModuleSpec($1, m)  
-        | _ -> AnonNamespaceFragmentSpec(path,false, $1, xml,[],m))  } 
-
-fileModuleImpl: 
-  | opt_attributes opt_decl_visibility moduleIntro moduleDefnsOrExprPossiblyEmpty
-    { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-      let m = (rhs2 parseState 3 4) in 
-      (fun (path,_) -> 
-        let path2,isModule,xml,vis = $3 in 
-        let lid = path@path2 in 
-        NamedTopModuleImpl(ModuleOrNamespaceImpl(lid,isModule, $4, xml,$1,vis,m))) }
-  | moduleDefnsOrExprPossiblyEmpty 
-    { let m = (rhs parseState 1) in 
-      (fun (path,xml) -> 
-        match path with 
-        | [] -> AnonTopModuleImpl($1,m)  
-        | _ -> AnonNamespaceFragmentImpl(path,false, $1, xml,[],m)) } 
-
-moduleSpfnsPossiblyEmpty: 
-  | moduleSpfns
-      { $1 }
-  | error
-      { [] }
-  | 
-      { [] }
-      
-moduleSpfns: 
-  | moduleSpfn  opt_top_seps moduleSpfns 
-      { $1 :: $3 } 
-  | error top_seps moduleSpfns 
-      { (* silent recovery *) $3 }
-  | moduleSpfn  opt_top_seps 
-      { [$1] } 
-
-
-moduleDefnsOrExprPossiblyEmpty:
-  | moduleDefnsOrExpr
-     { $1 }
-  | 
-     { [] }
-
-/* A naked expression is only allowed at the start of a module/file, or straight after a top_seps */
-moduleDefnsOrExpr:
-  | opt_attributes opt_decl_visibility declExpr top_seps moduleDefnsOrExpr 
-      { if isSome $2 then errorR(Error("Visibility declarations are not permitted here",rhs parseState 3));
-        let attrDecls = if nonNil $1 then [ Def_attributes ($1,rhs parseState 1) ] else [] in 
-        attrDecls @ mk_Def_expr ($3,rhs parseState 3) :: $5 }
-  | opt_attributes opt_decl_visibility declExpr top_seps
-      { if isSome $2 then errorR(Error("Visibility declarations are not permitted here",rhs parseState 3));
-        let attrDecls = if nonNil $1 then [ Def_attributes ($1,rhs parseState 1) ] else [] in 
-        attrDecls @ [ mk_Def_expr($3,rhs parseState 3) ] }
-  | opt_attributes opt_decl_visibility declExpr
-      { if isSome $2 then errorR(Error("Visibility declarations are not permitted here",rhs parseState 3));
-        let attrDecls = if nonNil $1 then [ Def_attributes ($1,rhs parseState 1) ] else [] in 
-        attrDecls @ [ mk_Def_expr($3,rhs parseState 3) ] }
-  | moduleDefns 
-      { $1 } 
-  | error
-     { [] }
-
-moduleDefns:
-  | moduleDefnOrDirective moduleDefns 
-      {  $1 @ $2 } 
-  | moduleDefnOrDirective top_seps moduleDefnsOrExpr 
-      {  $1 @ $3 } 
-  | moduleDefnOrDirective
-      { $1 }
-  | moduleDefnOrDirective top_seps
-      { $1 }
-  | error top_seps moduleDefnsOrExpr 
-      {  $3 } 
-
-moduleDefnOrDirective:
-  | moduleDefn 
-      {  $1  } 
-  | hashDirective 
-      { [ Def_hash ($1,rhs2 parseState 1 1) ] } 
-  /* Recover whenever an error occurs in a moduleDefn */
-
-
-
-/* This is used by both "fsi" interactions and "source file" fragments defined by moduleDefns */
-moduleDefn:
-
-  | opt_attributes opt_decl_visibility defnBindings                   %prec decl_let 
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        new_arg_uniq_ref := 0;
-        mkDefnBindings (rhs parseState 3,$3,$1,$2,rhs parseState 3)  }
-
-  | opt_attributes opt_decl_visibility hardwhiteLetBindings          %prec decl_let 
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        new_arg_uniq_ref := 0;
-        mkDefnBindings (rhs parseState 3,$3,$1,$2,rhs parseState 3)  }
-
-  | opt_attributes opt_decl_visibility doBinding %prec decl_let 
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        let letm = rhs parseState 3 in 
-        mkDefnBindings (letm,$3,$1,$2,rhs parseState 3) }
-  
-  | opt_attributes opt_decl_visibility TYPE tyconDefn tyconDefnList
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        let      (TyconDefn(ComponentInfo(cas   ,kind     ,a,cs,b,c,d,d2,d3),e,f,g)) = $4 in
-        let tc = (TyconDefn(ComponentInfo($1@cas,TMK_Tycon,a,cs,b,c,d,d2,d3),e,f,g)) in
-        [ Def_tycons(tc :: $5,rhs2 parseState 3 5) ] }
-
-  | opt_attributes opt_decl_visibility TYPE typeNameInfo tyconDefnAugmentation
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        if nonNil $1 then warning(Error("Attributes on augmentations are ignored, they must be placed on the original declaration",rhs parseState 1));
-        [ Def_partial_tycon($4,$5,rhs2 parseState 3 5) ] }
-
-  | opt_attributes opt_decl_visibility exconDefn
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        let (ExconDefn(ExconCore(cas,a,b,c,d,d2),e,f)) = $3 in 
-        let ec = (ExconDefn(ExconCore($1@cas,a,b,c,d,d2),e,f)) in 
-        [ Def_exn(ec, rhs2 parseState 3 3) ] }
-
-  | opt_attributes opt_decl_visibility moduleIntro opt_signature EQUALS  namedModuleDefnBlock
-
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        let attribs,(path,isModule,xml,vis),mty = $1,$3,$4 in 
-        if not isModule          then raiseParseErrorAt (rhs parseState 3) "namespaces must be declared at the head of a file";
-        match $6 with 
-        | Choice1Of2 eqn -> 
-            if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-            if isSome mty            then raiseParseErrorAt (rhs parseState 3) "a module abbreviation may not be given a constraint";
-            if List.length path <> 1 then raiseParseErrorAt (rhs parseState 3) "a module abbreviation must be a simple name, not a path";
-            if List.length $1 <> 0   then raiseParseErrorAt (rhs parseState 1) "ignorning attributes on module abbreviation";
-            if isSome vis            then raiseParseErrorAt (rhs parseState 1) "ignorning accessibility attribute on module abbreviation. Module abbreviations are always private";
-            [ Def_module_abbrev(List.hd path,eqn,rhs2 parseState 3 6) ]
-        | Choice2Of2 def -> 
-            if List.length path <> 1 then raiseParseErrorAt (rhs parseState 3) "a module definition must be a simple name, not a path";
-            let info = ComponentInfo(attribs,TMK_Module,[],[],path,xml,false,vis,rhs parseState 3) in
-            [ Def_module(info,def,mty,rhs2 parseState 3 6) ] }
-
-  | openDecl 
-      { [Def_open($1,rhs parseState 1)] }
-
-/* this occurs on the right of a module abbreviation (#light encloses the r.h.s. with OBLOCKBEGIN/OBLOCKEND) */
-/* We don't use it in signature files */
-namedModuleAbbrevBlock:
-  | OBLOCKBEGIN path OBLOCKEND 
-       { $2 }
-  | path 
-       { $1 }
-       
-namedModuleDefnBlock:
-  | OBLOCKBEGIN wrappedNamedModuleDefn OBLOCKEND 
-       { 
-         Choice2Of2 $2 
-       }
-  | OBLOCKBEGIN moduleDefnsOrExpr OBLOCKEND 
-       { // BUG 2644 FSharp 1.0: 
-         // There is an ambiguity here 
-         // In particular, consider the following two:
-
-         // module M2 = 
-         //    System.DateTime.Now
-         // module M2 = 
-         //    Microsoft.FSharp.Core.List
-         // The second is a module abbreviation , the first a module containing a single expression.
-         // This is a bit unfortunate. For F# v1 the resolution is in favour of 
-         // the module abbreviation, i.e. anything of the form 
-         //    module M2 = ID.ID.ID.ID
-         // will be taken as a module abbreviation, regardles of the identifiers themselves.
-         // In a later version (Dev11) we could actually try resolving the names 
-         // to both expressions and module identifiers and base the resolution of that semantic lookup
-         //
-         // This is similar to the ambiguitty between 
-         //    type X = int
-         // and 
-         //    type X = OneValue
-         // However in that case we do use type name lookup to make the resolution.
-
-         match $2 with 
-         | [ Def_expr (_,Expr_lid_or_id_get(false,path,_),_) ] -> 
-             Choice1Of2  path
-         | _ -> 
-             Choice2Of2 $2 
-       }
-  | OBLOCKBEGIN moduleDefnsOrExpr recover 
-       { reportParseErrorAt (rhs parseState 1) "unclosed block in #light syntax";   
-         Choice2Of2 $2 
-       }
-  | OBLOCKBEGIN error OBLOCKEND                
-       { 
-         Choice2Of2 [] 
-       }
-  | wrappedNamedModuleDefn 
-       {
-         Choice2Of2 $1 
-        }
-  | path 
-        {
-         Choice1Of2 $1 
-        }
-
-wrappedNamedModuleDefn:
-  | structOrBegin moduleDefnsOrExprPossiblyEmpty END 
-       { $2 }
-  | structOrBegin moduleDefnsOrExprPossiblyEmpty recover 
-       { reportParseErrorAt (rhs parseState 1) "unmatched 'begin' or 'struct'";  
-         $2 }
-  | structOrBegin error END                      
-       { [] }
-
-opt_signature :
-  | 
-       { None }
-  | COLON moduleSpecBlock
-       { deprecatedWithError "Signature types must be given in a .fsi or .mli file" (lhs(parseState));
-         Some(Sign_explicit($2)) }
-  | COLON path
-       { deprecatedWithError "Signature types must be given in a .fsi or .mli file" (lhs(parseState));
-         Some(Sign_named($2)) }
-
-tyconDefnAugmentation: 
-  | WITH classDefnBlock decl_end
-     { $2 }
-/* opt_sig: { None } | COLON sigOrBegin moduleSpfns END { $3 } */
-
-moduleSpfn: 
-  | hashDirective 
-      { Spec_hash ($1,rhs2 parseState 1 1)  } 
-  | valSpfn 
-      { $1 }
-
-  | opt_attributes opt_decl_visibility moduleIntro colonOrEquals namedModuleAbbrevBlock 
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        let path,isModule,xml,vis = $3 in 
-        if not isModule          then raiseParseErrorAt (rhs parseState 3) "namespaces must be declared at the head of a file";
-        if List.length path <> 1 then raiseParseErrorAt (rhs parseState 3) "a module abbreviation must be a simple name, not a path";
-        if List.length $1 <> 0   then raiseParseErrorAt (rhs parseState 1) "ignorning attributes on module abbreviation";
-        if isSome(vis)           then raiseParseErrorAt (rhs parseState 1) "ignorning visibility attribute on module abbreviation. Module abbreviations are always private";
-        Spec_module_abbrev(List.hd path,$5,rhs2 parseState 3 5) } 
-
-  | opt_attributes opt_decl_visibility  moduleIntro colonOrEquals moduleSpecBlock
-      { let path,isModule,xml,vis = $3 in 
-        if not isModule          then raiseParseErrorAt (rhs parseState 3) "namespaces must be declared at the head of a file";
-        if List.length path <> 1 then raiseParseErrorAt (rhs parseState 3) "a module moduleDefn must be a simple name, not a path";
-        let info = ComponentInfo($1,TMK_Module,[],[],path,xml,false,vis,rhs parseState 3) in
-        if isSome($2) then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        Spec_module(info,$5,rhs2 parseState 3 5) }
-
-  | opt_attributes opt_decl_visibility  tyconSpfns 
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        let (TyconSpfn(ComponentInfo(cas,k,a,cs,b,c,d,d2,d3),e,f,g)),rest = 
-           match $3 with
-           | [] -> raiseParseErrorAt (rhs parseState 3) "Unexpected empty type moduleDefn list"
-           | h::t -> h,t in 
-        let tc = (TyconSpfn(ComponentInfo($1@cas,k,a,cs,b,c,d,d2,d3),e,f,g))in 
-        Spec_tycon (tc::rest,rhs parseState 3) } 
-
-  | opt_attributes opt_decl_visibility exconSpfn
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        let (ExconSpfn(ExconCore(cas,a,b,c,d,d2),e,f)) = $3 in 
-        let ec = (ExconSpfn(ExconCore($1@cas,a,b,c,d,d2),e,f)) in 
-        Spec_exn(ec, rhs parseState 3) }
-
-  | OPEN path { Spec_open ($2, rhs2 parseState 1 2) }
-
-valSpfn: 
-  | opt_attributes opt_decl_visibility VAL opt_attributes opt_inline opt_mutable opt_access nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints opt_literalValue
-      { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        (let attr1,attr2,inlineFlag,mutableFlag,vis2,id,doc,explicitValTyparDecls,(ty,arity),konst = ($1),($4),($5),($6),($7),($8),grabXmlDoc(parseState,3),($9),($11),($12) in 
-        if nonNil attr2 then errorR(Deprecated("Attributes should be placed before 'val'",rhs parseState 4));
-        let m = rhs2 parseState 3 11 in 
-        let valSpfn = ValSpfn((attr1@attr2),id,explicitValTyparDecls,ty,arity,inlineFlag,mutableFlag,doc, vis2,konst,m) in 
-        Spec_val(valSpfn,m))
-      }
-
-opt_literalValue: 
-  | { None }
-  | EQUALS declExpr { Some($2) }
-  
-  
-moduleSpecBlock: 
-  | OBLOCKBEGIN            moduleSpfns     OBLOCKEND { $2 }
-  | OBLOCKBEGIN sigOrBegin moduleSpfnsPossiblyEmpty END OBLOCKEND { $3 }
-  |             sigOrBegin moduleSpfnsPossiblyEmpty END { $2 }
-
-opt_attributes:
-  | attributes                                { $1 }
-  |            %prec prec_opt_attributes_none { [] }
-
-attributes: 
-  | attributeList                     
-     { $1 }
-  | attributeList attributes
-     { $1 @ $2 }
-
-attributeList: 
-  | LBRACK_LESS  attributeListElements opt_seps GREATER_RBRACK opt_OBLOCKSEP {  MatchPair parseState 1 4; $2 }
-
-attributeListElements: 
-  | attribute                     
-     { [$1] }
-  | attributeListElements seps attribute 
-     { $1 @ [$3] }
-
-attribute:
-  | path opt_HIGH_PRECEDENCE_APP opt_atomicExprAfterType 
-     { let arg = match $3 with None -> mksyn_unit (range_of_lid $1) | Some e -> e in 
-       Attr($1,arg,None,range_of_lid $1) }
-  | attributeTarget COLON path opt_HIGH_PRECEDENCE_APP opt_atomicExprAfterType 
-     { let arg = match $5 with None -> mksyn_unit (range_of_lid $3) | Some e -> e in 
-       Attr($3,arg,Some $1,range_of_lid $3) }
-
-attributeTarget: 
-  | MODULE { ident("module",lhs(parseState)) } 
-  | TYPE { ident("type",lhs(parseState)) } 
-  | ident { $1 } 
-  | YIELD /* return */ { if $1 then reportParseErrorAt (rhs parseState 1) "syntax error";
-                         ident("return",lhs(parseState)) } 
-
-
-tyconSpfns:      
-  | TYPE tyconSpfn_list 
-     { $2 }
-
-tyconSpfn_list:  
-  | tyconSpfn AND tyconSpfn_list 
-     { $1 :: $3 } 
-  | tyconSpfn 
-     { [$1] }
-
-tyconSpfn: 
-  | typeNameInfo  EQUALS tyconSpfnRhsBlock 
-      { $3 $1 }
-  | typeNameInfo  opt_classSpfn       
-      { TyconSpfn($1,TyconSpfnRepr_simple (TyconCore_no_repr (lhs(parseState)),lhs(parseState)),$2,lhs(parseState)) }
-
-tyconSpfnRhsBlock: 
-  /* This rule allows members to be given for record and union types in the #light syntax */
-  /* without the use of 'with' ... 'end'. For example: */
-  /*     type R = */
-  /*         { a : int } */
-  /*         member r.A = a */
-  /* It also takes into account that any existing 'with' */
-  /* block still needs to be considered and may occur indented or undented from the core type */
-  /* representation. */
-  | OBLOCKBEGIN  tyconSpfnRhs opt_OBLOCKSEP classSpfnMembers opt_classSpfn OBLOCKEND opt_classSpfn  
-     { let m = lhs(parseState) in 
-       (fun nameInfo -> 
-           $2 nameInfo (checkForMultipleAugmentations m ($4 @ $5) $7)) }
-  | tyconSpfnRhs opt_classSpfn
-     { let m = lhs(parseState) in 
-       (fun nameInfo -> 
-           $1 nameInfo $2) }
-
-tyconSpfnRhs: 
-  | tyconDefnOrSpfnSimpleRepr 
-     { let m = lhs(parseState) in 
-       (fun nameInfo augmentation -> 
-           TyconSpfn(nameInfo,TyconSpfnRepr_simple ($1,m),augmentation,m)) }
-  | tyconClassSpfn 
-     { let m = lhs(parseState) in 
-       (fun nameInfo augmentation -> 
-           TyconSpfn(nameInfo,TyconSpfnRepr_class (fst $1,snd $1,m),augmentation,m)) }
-  | DELEGATE OF topType
-     { let m = lhs(parseState) in 
-       let ty,arity = $3 in
-       let invoke = ClassMemberSpfn_binding(ValSpfn([],mksyn_id m "Invoke",inferredTyparDecls,ty,arity,false,false,emptyPreXmlDoc,None,None,m),AbstractMemberFlags None MemberKindMember,m) in 
-       (fun nameInfo augmentation -> 
-           if nonNil augmentation then raiseParseErrorAt m "augmentations are not permitted on delegate type moduleDefns";
-           TyconSpfn(nameInfo,TyconSpfnRepr_class (TyconDelegate (ty,arity),[invoke],m),[],m)) }
-
-tyconClassSpfn: 
-  | classSpfnBlockKindUnspecified
-     { (TyconUnspecified, $1) }
-  | classOrInterfaceOrStruct classSpfnBlock END
-     { ($1,$2) }
-  | classOrInterfaceOrStruct classSpfnBlock recover 
-     { reportParseErrorAt (rhs parseState 1) "unmatched 'class', 'interface' or 'struct'";
-       ($1,$2) }
-  | classOrInterfaceOrStruct error END
-     { (* silent recovery *) ($1,[]) }
-
-classSpfnBlockKindUnspecified:
-  | OBLOCKBEGIN  classSpfnMembers OBLOCKEND 
-     { $2 }
-  | OBLOCKBEGIN  classSpfnMembers recover
-     { $2 }
-/* NOTE: these rules enable a 'heavy' syntax to omit the kind of a type. */
-  | BEGIN  classSpfnBlock END 
-     { $2 }
-  | BEGIN  classSpfnBlock recover
-     { $2 }
-
-
-
-classSpfnBlock:
-  | OBLOCKBEGIN  classSpfnMembers OBLOCKEND { $2 }
-  | OBLOCKBEGIN  classSpfnMembers recover { $2 }
-  | classSpfnMembers { $1 }
-
-classSpfnMembers:  
-  | classMemberSpfn opt_seps classSpfnMembers 
-     { $1 :: $3 } 
-  |  
-     { []  }
-
-memberFlags: 
-  /* | STATIC          { StaticMemberFlags } */
-  | STATIC MEMBER   { StaticMemberFlags }  
-  | MEMBER          { NonVirtualMemberFlags }
-  | METHOD         { raiseParseErrorAt (rhs parseState 1) "use 'member x.MyMethod(arg) = ...' to declare a new method" }
-  | VIRTUAL         { raiseParseErrorAt (rhs parseState 1) "use 'abstract' to declare a new virtual method slot, and 'default' or 'override' to specify the default implemenation for that slot" }
-  | OVERRIDE        { OverrideMemberFlags }
-  | DEFAULT        { OverrideMemberFlags }
-
-memberSpecFlags: 
-  | memberFlags { $1 }  
-  | ABSTRACT        { AbstractMemberFlags }
-  | ABSTRACT MEMBER { AbstractMemberFlags }
-
-classMemberSpfnGetSet:
-  | /* EMPTY */ 
-    { (fun arity -> (match arity with ValSynInfo([],_) -> MemberKindPropertyGet | _ -> MemberKindMember)) }
-  | WITH classMemberSpfnGetSetElements 
-    { (fun arity -> $2) }
-  | OWITH classMemberSpfnGetSetElements OEND
-    { (fun arity -> $2) }
-  | OWITH classMemberSpfnGetSetElements error
-    {  reportParseErrorAt (rhs parseState 1) "unmatched 'with' or badly formatted 'with' block";
-       (fun arity -> $2) }
-
-
-classMemberSpfnGetSetElements:
-  | nameop 
-    { (let (id:ident) = $1 in 
-       if id.idText = "get" then MemberKindPropertyGet 
-       else if id.idText = "set" then MemberKindPropertySet 
-       else raiseParseErrorAt (rhs parseState 1) "'get', 'set' or 'get,set' required") }
-  | nameop COMMA nameop
-    { let (id:ident) = $1 in 
-      if not ((id.idText = "get" && $3.idText = "set") or 
-              (id.idText = "set" && $3.idText = "get")) then 
-         raiseParseErrorAt (rhs2 parseState 1 3) "'get', 'set' or 'get,set' required";
-      MemberKindPropertyGetSet }
-
-classMemberSpfn:
-  | opt_attributes opt_decl_visibility memberSpecFlags opt_inline opt_access nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints classMemberSpfnGetSet opt_literalValue
-     { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-       let inlineFlag,doc,vis2,id,explicitValTyparDecls,(ty,arity),optLiteralValue = $4,grabXmlDoc(parseState,3),$5,$6,$7,$9,$11 in
-       let m = rhs2 parseState 3 10 in 
-       let valSpfn = ValSpfn($1,id,explicitValTyparDecls,ty,arity, inlineFlag,false,doc, vis2,optLiteralValue,m) in 
-       ClassMemberSpfn_binding(valSpfn, $3 (computeOverloadQualifier $1) ($10 arity),m) }
-  | opt_attributes opt_decl_visibility interfaceMember appType  
-     { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-       ClassMemberSpfn_interface ($4,union_ranges (rhs parseState 3) (range_of_syntype $4)) }
-  | opt_attributes opt_decl_visibility INHERIT appType 
-     { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-       ClassMemberSpfn_inherit ($4,union_ranges (rhs parseState 3) (range_of_syntype $4)) }
-  | opt_attributes opt_decl_visibility VAL fieldDecl 
-     { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-       let fld = $4 $1 false  in
-       ClassMemberSpfn_field(fld,rhs2 parseState 3 4) }
-  | opt_attributes opt_decl_visibility STATIC VAL fieldDecl 
-     { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-       ClassMemberSpfn_field($5 $1 true,rhs2 parseState 3 5) }
-  | opt_attributes  opt_decl_visibility STATIC TYPE tyconSpfn 
-     { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-       ClassMemberSpfn_tycon($5,rhs2 parseState 3 5) }
-  | opt_attributes opt_decl_visibility NEW COLON topTypeWithTypeConstraints  
-     { let vis,doc,(ty,arity) = $2,grabXmlDoc(parseState,3),$5 in 
-       let m = union_ranges (rhs parseState 3) (range_of_syntype ty) in
-       let inlineFlag = false in
-       let valSpfn = ValSpfn($1,mksyn_id (rhs parseState 3) "new",noInferredTypars,ty,arity,inlineFlag,false, doc, vis,None,m) in
-       ClassMemberSpfn_binding(valSpfn, CtorMemberFlags  (computeOverloadQualifier $1),m) }
-
-typeNameInfo: 
-  | opt_attributes tyconNameAndTyparDecls opt_typeConstraints
-     { let typars,lid,fixity,tpcs1,vis,xmlDoc = $2 in 
-       let tpcs2 = $3 in 
-       ComponentInfo($1,TMK_Tycon,typars,(tpcs1 @ tpcs2),lid,xmlDoc,fixity,vis,range_of_lid lid)  }
-
-tyconDefnList:  
-  | AND tyconDefn tyconDefnList 
-     { $2 :: $3 } 
-  |                             
-     { [] }
-
-tyconDefn: 
-  | typeNameInfo 
-     { TyconDefn($1,TyconDefnRepr_simple(TyconCore_no_repr(lhs(parseState)),lhs(parseState)),[],lhs(parseState)) }
-  | typeNameInfo EQUALS tyconDefnRhsBlock
-     { let tcDefRepr,members = $3 in
-       TyconDefn($1,tcDefRepr,members,lhs(parseState)) }
-  | typeNameInfo opt_attributes opt_decl_visibility opt_HIGH_PRECEDENCE_APP  simplePatterns optAsSpec EQUALS tyconDefnRhsBlock
-     { let vis,spats, az,(tcDefRepr,members) = $3,$5,$6,$8 in
-       let (ComponentInfo(_,_,_,_,lid,_,_,_,_)) = $1 in 
-       let memberCtorPattern = ClassMemberDefn_implicit_ctor (vis,$2,spats,az,range_of_lid lid) in
-       let tcDefRepr = 
-         match tcDefRepr with
-         | TyconDefnRepr_class (k,cspec,m) -> TyconDefnRepr_class (k,memberCtorPattern::cspec,m)
-         | _ -> reportParseErrorAt (rhs2 parseState 1 5) "Only class types may take value arguments"; tcDefRepr
-       in
-       TyconDefn($1,tcDefRepr,members,lhs(parseState))  }
-
-tyconDefnRhsBlock: 
-  /* This rule allows members to be given for record and union types in the #light syntax */
-  /* without the use of 'with' ... 'end'. For example: */
-  /*     type R = */
-  /*         { a : int } */
-  /*         member r.A = a */
-  /* It also takes into account that any existing 'with' */
-  /* block still needs to be considered and may occur indented or undented from the core type */
-  /* representation. */
-  | OBLOCKBEGIN  tyconDefnRhs opt_OBLOCKSEP classDefnMembers opt_classDefn OBLOCKEND opt_classDefn  
-     { let m = lhs(parseState) in 
-       $2 (checkForMultipleAugmentations m ($4 @ $5) $7) }
-  | tyconDefnRhs opt_classDefn
-     { let m = lhs(parseState) in 
-       $1 $2 }
-
-tyconDefnRhs: 
-  | tyconDefnOrSpfnSimpleRepr 
-     { let m = lhs(parseState) in (fun augmentation -> TyconDefnRepr_simple ($1,m),augmentation) }
-  | tyconClassDefn 
-     { let m = lhs(parseState) in (fun augmentation -> TyconDefnRepr_class (fst $1,snd $1,m),augmentation) }
-  | DELEGATE OF topType
-     { let m = lhs(parseState) in 
-       let ty,arity = $3 in
-       (fun augmentation -> 
-           let valSpfn = ValSpfn([],mksyn_id m "Invoke",inferredTyparDecls,ty,arity,false,false,emptyPreXmlDoc,None,None,m) in 
-           let invoke = ClassMemberDefn_slotsig(valSpfn,AbstractMemberFlags None MemberKindMember,m) in 
-           if nonNil augmentation then raiseParseErrorAt m "augmentations are not permitted on delegate type moduleDefns";
-           TyconDefnRepr_class (TyconDelegate (ty,arity),[invoke],m),[]) }
-
-tyconClassDefn: 
-  | classDefnBlockKindUnspecified
-     { (TyconUnspecified, $1) }
-  | classOrInterfaceOrStruct classDefnBlock END 
-     { ($1,$2) }
-  | classOrInterfaceOrStruct classDefnBlock recover 
-     { reportParseErrorAt (rhs parseState 1) "unmatched 'class', 'interface' or 'struct'";
-       ($1,$2) }
-  | classOrInterfaceOrStruct error END
-     { (* silent recovery *) ($1,[]) }
-
-classDefnBlockKindUnspecified:
-  | OBLOCKBEGIN  classDefnMembers recover
-     { (* silent recovery *) $2 }
-  | OBLOCKBEGIN  classDefnMembers OBLOCKEND 
-     { $2 }
-/* NOTE: these rules enable a 'heavy' syntax to omit the kind of a type. However this doesn't seem necessary to support.
-  NOTE: that is 'type kind inference' is only supported for #light 
-  | BEGIN  classDefnBlock END 
-     { $2 }
-  | BEGIN  classDefnBlock recover 
-     { reportParseErrorAt (rhs parseState 1) "unmatched 'begin'";
-       $2 }
-  | BEGIN  error END 
-     { (* silent recovery *) [] }
-*/
-
-classDefnBlock:
-  | OBLOCKBEGIN  classDefnMembers recover { (* silent recovery *) $2 }
-  | OBLOCKBEGIN  classDefnMembers OBLOCKEND { $2 }
-  | classDefnMembers { $1 }
-  
-classDefnMembers:  
-  | classDefnMember opt_seps classDefnMembers 
-     { $1 @  $3 }
-  /* REVIEW: Error recovery rules that are followed by potentially empty productions are suspicious! */
-  | error classDefnMembers 
-     { $2 }
-  | 
-     { [] }
-
-classDefnMemberGetSet: 
-  | WITH classDefnMemberGetSetElements
-     { $2  }
-  | OWITH classDefnMemberGetSetElements OEND
-     { $2  }
-  | OWITH classDefnMemberGetSetElements error
-     { reportParseErrorAt (rhs parseState 1) "unmatched 'with' or badly formatted 'with' block";
-       $2  }
-
-classDefnMemberGetSetElements: 
-  | classDefnMemberGetSetElement 
-     { [$1]  }
-  | classDefnMemberGetSetElement AND classDefnMemberGetSetElement
-     { [$1;$3] }
-
-classDefnMemberGetSetElement: 
-  | opt_inline bindingPattern opt_topReturnTypeWithTypeConstraints EQUALS typedSeqExprBlock 
-     { let rhsm = (range_of_synexpr $5) in 
-       ($1,$2,$3,$5,rhsm) }
-
-memberCore:  
- /* methods and simple getter properties */
-  | opt_inline bindingPattern  opt_topReturnTypeWithTypeConstraints EQUALS typedSeqExprBlock  
-     {  let rhsm = (range_of_synexpr $5) in 
-        let wholem = union_ranges (rhs2 parseState 3 4) rhsm in 
-        let mpat = rhs parseState 2 in 
-        let optReturnType = $3 in 
-        let bindingBuilder,bindm = $2 in 
-        (fun vis memFlagsBuilder attrs -> 
-             [ ClassMemberDefn_member_binding (bindingBuilder (vis,$1,false,bindm,NoSequencePointAtInvisibleBinding,wholem,optReturnType,$5,rhsm,[],attrs,Some(memFlagsBuilder (computeOverloadQualifier attrs) MemberKindMember)),bindm) ]) }
-
- /* properties with explicit get/set, also indexer properties */
-  | opt_inline bindingPattern  opt_topReturnTypeWithTypeConstraints classDefnMemberGetSet  
-     { let wholem = rhs2 parseState 2 4 in 
-       let propertyNameBindingBuilder,_ = $2 in 
-       let optPropertyType = $3 in 
-       let mutableFlag = false in
-       (fun visNoLongerUsed memFlagsBuilder attrs -> 
-             $4 |> List.map (fun (optInline,(bindingBuilder,bindm),optReturnType,expr,exprm) ->
-                   let optInline = $1 || optInline in 
-                   let overloadQualifier =  (computeOverloadQualifier attrs) in 
-                   
-                   let binding = bindingBuilder (visNoLongerUsed,optInline,mutableFlag,bindm,NoSequencePointAtInvisibleBinding,wholem,optReturnType,expr,exprm,[],attrs,Some (memFlagsBuilder overloadQualifier MemberKindMember)) in
-                   let (Binding (vis,_,pseudo,_,attrs,doc,valSynData,pv,_,bindm,spBind)) = binding in 
-                   let memberKind = 
-                         let getset = 
-                               let rec go p = 
-                                   match p with 
-                                   | Pat_lid ([id],_,_,_,_) ->  id.idText
-                                   | Pat_as (_,nm,_,_,_) ->  nm.idText
-                                   | Pat_typed (p,_,_) ->  go p
-                                   | Pat_attrib (p,_,_) ->  go p
-                                  | _ -> raiseParseErrorAt bindm "invalid declaration syntax"  in
-                               go pv in 
-                         if getset = "get" then MemberKindPropertyGet 
-                         else if getset = "set" then MemberKindPropertySet 
-                         else raiseParseErrorAt bindm "get and/or set required" in
-
-
-                   // REVIEW: It's hard not to ignore the optPropertyType type annotation for 'set' properties. To apply it, 
-                   // we should apply it to the last argument, but at this point we've already pushed the patterns that 
-                   // make up the arguments onto the RHS. So we just always give a warning. 
-
-                   begin match optPropertyType with 
-                   | Some _ -> errorR(Error("type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...'",bindm))
-                   | None -> ()
-                   end;
-                   
-                   let optReturnType = 
-                       match (memberKind, optReturnType) with 
-                       | MemberKindPropertySet,_ -> optReturnType
-                       | _, None -> optPropertyType
-                       | _ -> optReturnType in 
-
-                   (* REDO with the correct member kind *)
-                   let binding = bindingBuilder(vis,pseudo,mutableFlag,bindm,NoSequencePointAtInvisibleBinding,wholem,optReturnType,expr,exprm,[],attrs,Some(memFlagsBuilder overloadQualifier memberKind)) in 
-                   let (Binding (vis,_,pseudo,_,attrs,doc,valSynData,pv,rhsAfterPats,bindm,spBind)) = binding in 
-                
-                   let (ValSynData(_,valSynInfo,_)) = valSynData  in
-
-                   // Setters have all arguments tupled in their internal TAST form, though they don't appear to be tupled from the syntax
-                   let memFlags = memFlagsBuilder overloadQualifier memberKind in
-                   let valSynInfo = 
-                       match memberKind, valSynInfo with 
-                       | MemberKindPropertyGet,ValSynInfo ([],_)          when not memFlags.MemberIsInstance  -> raiseParseErrorAt bindm  "A getter property must at least have one argument, e.g. 'with get() = ...'"
-                       | MemberKindPropertyGet,ValSynInfo ([thisArg],_)   when memFlags.MemberIsInstance      -> raiseParseErrorAt bindm  "A getter property must at least have one argument, e.g. 'with get() = ...'"
-
-                       | MemberKindPropertySet,ValSynInfo (thisArg::indexAndValueArgs,ret) when     memFlags.MemberIsInstance -> ValSynInfo ([thisArg;List.concat indexAndValueArgs],ret)
-                       | MemberKindPropertySet,ValSynInfo (indexAndValueArgs,ret)          when not memFlags.MemberIsInstance -> ValSynInfo ([List.concat indexAndValueArgs],ret)
-                       | _ -> valSynInfo in
-
-                   let valSynData = ValSynData(Some(memFlags), valSynInfo,None) in 
-
-                   // Create the binding from the first lambda pattern in order to extract out the pattern of the 
-                   // 'this' variable and put it into the pattern for the get/set binding, replacing the get/set part 
-                   // A little gross. 
-                   let pv',doc' = 
-                       let bindingOuter = propertyNameBindingBuilder(vis,optInline,mutableFlag,bindm,spBind,bindm,optReturnType,expr,exprm,[],attrs,Some(memFlagsBuilder overloadQualifier MemberKindMember)) in
-                       let (Binding (_,_,_,_,_,doc2,_,pvOuter,_,_,_)) = bindingOuter in 
-                       
-                   
-                       let lidOuter,lidVisOuter = 
-                           match pvOuter with 
-                           | Pat_lid (lid,None,[],lidVisOuter,m) ->  lid,lidVisOuter
-                           | p -> raiseParseErrorAt bindm "invalid declaration syntax"  in
-
-                       // Merge the visibility from the outer point with the inner point, e.g.
-                       //    member   this.Size with  get ()      = m_size
-                       
-                       let mergeLidVisOuter lidVisInner =
-                           match lidVisInner,lidVisOuter with 
-                           | None,None -> None
-                           | Some lidVisInner,None | None,Some lidVisInner -> Some lidVisInner
-                           | Some _, Some _ ->  
-                               errorR(Error("multiple accessibilities given for property getter or setter",bindm));
-                               lidVisInner in
-                   
-                       // Replace the "get" or the "set" with the right name
-                       let rec go p = 
-                           match p with 
-                           | Pat_lid ([id],tyargs,args,lidVisInner,m) ->  
-                               // Setters have all arguments tupled in their internal form, though they don't 
-                               // appear to be tupled from the syntax. Somewhat unfortunate
-                               let args = 
-                                   if id.idText = "set" then 
-                                       match args with 
-                                       | [Pat_paren(Pat_tuple (indexPats,_),indexPatRange);valuePat] when id.idText = "set" -> 
-                                           [Pat_tuple(indexPats@[valuePat],union_ranges indexPatRange (range_of_synpat valuePat))] 
-                                       | [indexPat;valuePat] -> 
-                                           [Pat_tuple(args,union_ranges (range_of_synpat indexPat) (range_of_synpat valuePat))] 
-                                       | [valuePat] -> 
-                                           [valuePat] 
-                                       | _ -> 
-                                           raiseParseErrorAt m "property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... '" 
-                                   else 
-                                       args in
-                               Pat_lid (lidOuter,tyargs,args,mergeLidVisOuter lidVisInner,m)
-                           | Pat_as (_,nm,_,lidVisInner,m) ->  Pat_lid (lidOuter,None,[],mergeLidVisOuter lidVisInner,m)
-                           | Pat_typed (p,ty,m) ->  Pat_typed(go p,ty,m)
-                           | Pat_attrib (p,attribs,m) ->  Pat_attrib(go p,attribs,m)
-                           | Pat_wild(m) ->  Pat_wild(m)
-                           | _ -> raiseParseErrorAt bindm "invalid declaration syntax"  in
-
-                       go pv,MergePreXmlDoc doc2 doc in
-
-                   ClassMemberDefn_member_binding (Binding (vis,NormalBinding,pseudo,mutableFlag,attrs,doc',valSynData,pv',rhsAfterPats,bindm,spBind),bindm)))
-       }
-
-abstractMemberFlags: 
-  | ABSTRACT {} 
-  | ABSTRACT MEMBER {} 
-
-classDefnMember:
-  | opt_attributes opt_decl_visibility classDefnBindings
-     { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-       [mkClassMemberLocalBindings(false,rhs2 parseState 3 3,$1,$2,$3)] }
-       
-  | opt_attributes opt_decl_visibility STATIC classDefnBindings  
-     { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-       [mkClassMemberLocalBindings(true,rhs2 parseState 3 4,$1,$2,$4)] }
-       
-       
-/*
-  | openDecl 
-      { [ClassMemberDefn_open($1,rhs parseState 1)] }
-*/
-
-  | opt_attributes opt_decl_visibility memberFlags memberCore  opt_ODECLEND
-     { if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-       $4 $2 $3 $1 }
-       
-  | opt_attributes opt_decl_visibility interfaceMember appType opt_interfaceImplDefn  
-     {  if nonNil $1 then errorR(Error("attributes are not permitted on interface implementations",rhs parseState 1));
-        if isSome $2 then errorR(Error("interfaces always have the same visibility as the enclosing type",rhs parseState 3));
-        [ ClassMemberDefn_interface ($4, $5,rhs2 parseState 3 5) ] }
-        
-  | opt_attributes opt_decl_visibility abstractMemberFlags opt_inline nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints classMemberSpfnGetSet  opt_ODECLEND
-     { let ty,arity = $8 in
-       let inlineFlag,doc,id,explicitValTyparDecls = $4,grabXmlDoc(parseState,3),$5,$6 in
-       let m = rhs2 parseState 3 9 in
-       if isSome $2 then errorR(Error("Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type",m));
-       let valSpfn = ValSpfn($1,id,explicitValTyparDecls,ty,arity, inlineFlag,false,doc, None,None,m) in
-       [ ClassMemberDefn_slotsig(valSpfn,AbstractMemberFlags (computeOverloadQualifier $1) ($9 arity), m) ] }
-       
-  | opt_attributes opt_decl_visibility inheritsDefn
-     {  if nonNil $1 then errorR(Error("attributes are not permitted on 'inherit' declarations",rhs parseState 1));
-        if isSome $2 then errorR(Error("Visibility declarations are not permitted on an 'inherits' declaration",rhs parseState 1));
-        [ $3 ] }
-        
-  | opt_attributes opt_decl_visibility VAL fieldDecl 
-     {  if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        [ ClassMemberDefn_field($4 $1 false,rhs2 parseState 3 4) ] }
-        
-  | opt_attributes opt_decl_visibility STATIC VAL fieldDecl 
-     {  if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        [ ClassMemberDefn_field($5 $1 true,rhs2 parseState 3 5) ] }
-        
-  | opt_attributes opt_decl_visibility NEW  atomicPattern optAsSpec EQUALS typedSeqExprBlock opt_ODECLEND
-     {  let m = union_ranges (rhs2 parseState 3 6) (range_of_synexpr $7) in 
-        let expr = $7 in
-        let valSynData = ValSynData (Some(CtorMemberFlags (computeOverloadQualifier $1)), ValSynInfo([SynInfo.InferArgSynInfoFromPat $4],SynInfo.unnamedRetVal), $5) in 
-        let vis = $2 in 
-        [ ClassMemberDefn_member_binding(Binding (None,NormalBinding,false,false,$1,grabXmlDoc(parseState,3),valSynData, Pat_lid ([mksyn_id (rhs parseState 3) "new"],Some noInferredTypars,[$4],vis,rhs parseState 3),BindingRhs([],None,expr),m,NoSequencePointAtInvisibleBinding),m) ] }
-        
-  | opt_attributes opt_decl_visibility STATIC TYPE tyconDefn 
-     {  if isSome $2 then errorR(Error("Visibility declarations should come immediately prior to the identifier naming a construct",rhs parseState 2));
-        [ ClassMemberDefn_tycon($5,None,rhs2 parseState 3 5) ] }
-   
-atomicPatternLongIdent:
-  | pathop { (None,$1) }
-  | access pathop { (Some($1), $2) }
-
-opt_access:
-  |        { None }
-  | access { Some($1) } 
-
-access:
-  | PRIVATE  { accessPrivate }
-  | PUBLIC   { accessPublic }
-  | INTERNAL { accessInternal }
-
-/* only valid on 'NEW' */
-opt_decl_visibility:
-  | access { Some($1) } 
-  |  { None }
-  
-opt_interfaceImplDefn: 
-  | WITH objectImplementationBlock decl_end { Some($2) } 
-  |                            { None }
-
-opt_classDefn: 
-  | WITH classDefnBlock decl_end { $2 } 
-  |                           { [] }
-
-opt_classSpfn: 
-  | WITH classSpfnBlock decl_end { $2 } 
-  |                    { [] }
-
-
-inheritsDefn: 
-  | INHERIT appType optBaseSpec
-     { let mDecl = union_ranges (rhs parseState 1) (range_of_syntype $2) in
-       ClassMemberDefn_inherit($2,$3,mDecl) }
-  | INHERIT appType opt_HIGH_PRECEDENCE_APP atomicExprAfterType optBaseSpec
-     { let mDecl = union_ranges (rhs parseState 1) (range_of_synexpr $4) in
-       ClassMemberDefn_implicit_inherit($2,$4,$5,mDecl) }
-
-optAsSpec: 
-  | asSpec { Some($1) } 
-  |        { None }
-
-asSpec: 
-  | AS ident { $2 } 
-
-optBaseSpec: 
-  | baseSpec { Some($1) } 
-  |        { None }
-
-baseSpec: 
-  | AS ident 
-      { if ($2).idText <> "base" then 
-             errorR(Error("'inherit' declarations may not have 'as'  bindings. The keyword 'base' may be used instead. Remove this 'as' binding",rhs2 parseState 1 2)); 
-        ident("base",rhs parseState 2) } 
-        
-  | AS BASE 
-      { errorR(Error("'inherit' declarations may not have 'as' bindings. The keyword 'base' may be used instead. Remove this 'as' binding",rhs2 parseState 1 2)); 
-        ident("base",rhs parseState 2) } 
-
-
-objectImplementationBlock:
-  | OBLOCKBEGIN objectImplementationMembers OBLOCKEND { $2 }
-  | OBLOCKBEGIN objectImplementationMembers recover { $2 }
-  | objectImplementationMembers { $1 }
-
-objectImplementationMembers:  
-  | objectImplementationMember opt_seps objectImplementationMembers { $1 @  $3 }
-  | objectImplementationMember opt_seps { $1 }
-
-objectImplementationMember: 
-  | opt_attributes memberOrOverride memberCore opt_ODECLEND
-     { $3 None OverrideMemberFlags $1 }
-  | opt_attributes memberOrOverride error { [] } 
-
-memberOrOverride: 
-  | MEMBER {} 
-  | OVERRIDE {}
-
-
-tyconDefnOrSpfnSimpleRepr: 
-  | opt_attributes opt_decl_visibility typ
-     { if nonNil $1 then errorR(Error("Attributes are not allowed here",rhs parseState 1));
-       if isSome $2 then errorR(Error("Visibility declarations are not permitted on type abbreviations",rhs parseState 2));
-       TyconCore_abbrev ($3, lhs(parseState)) }
-  | opt_attributes opt_decl_visibility unionRepr
-     { if nonNil $1 then errorR(Error("Attributes are not allowed here",rhs parseState 1));
-       if $3 |> List.exists (function Choice1Of2 _ -> true | _ -> false) then (
-           if isSome $2 then errorR(Error("Visibility declarations are not permitted on enum types",rhs parseState 2));
-           TyconCore_enum ($3 |> List.choose (function 
-                                              | Choice1Of2 data ->  
-                                                Some(data) 
-                                              | Choice2Of2(UnionCase(_,_,_,_,_,m)) -> 
-                                                errorR(Error("All enum fields must be given values",m)); None),
-                           lhs(parseState))
-       ) else 
-           TyconCore_union ($2, 
-                            $3 |> List.choose (function Choice2Of2 data -> Some(data) | Choice1Of2 _ -> failwith "huh?"),
-                            lhs(parseState)) }
-  | opt_attributes opt_decl_visibility braceFieldDeclList
-     { if nonNil $1 then errorR(Error("Attributes are not allowed here",rhs parseState 1));
-       TyconCore_recd ($2,$3,lhs(parseState)) }
-  | opt_attributes opt_decl_visibility LPAREN inlineAssemblyTyconRepr RPAREN
-     { if nonNil $1 then errorR(Error("Attributes are not allowed here",rhs parseState 1));
-       libraryOnlyWarning (lhs(parseState));
-       if isSome $2 then errorR(Error("Visibility declarations are not permitted on inline assembly code types",rhs parseState 2));
-       MatchPair parseState 3 5;  
-       $4 }
-
-
-braceFieldDeclList:
-  | LBRACE  recdFieldDeclList RBRACE
-     { MatchPair parseState 1 3;   $2 }
-  | LBRACE  recdFieldDeclList recover
-     { $2 }
-  | LBRACE  error RBRACE
-     { MatchPair parseState 1 3;   [] }
-
-inlineAssemblyTyconRepr:
-  | HASH STRING opt_HASH 
-     { libraryOnlyWarning (lhs(parseState));
-       let lhsm = lhs(parseState) in 
-       TyconCore_asm (ParseAssemblyCodeType $2 (rhs parseState 2),lhsm) }
-
-classOrInterfaceOrStruct: 
-  | CLASS     { TyconClass } 
-  | INTERFACE { TyconInterface } 
-  | STRUCT    { TyconStruct }
-
-interfaceMember: 
-  | INTERFACE { } 
-  | OINTERFACE_MEMBER    { }
-
-tyconNameAndTyparDecls:  
-  | opt_access path 
-      { [], $2,false,[],$1,grabXmlDoc(parseState,2) }
-  | opt_access prefixTyparDecls  path
-      { $2, $3,false,[],$1,grabXmlDoc(parseState,2) }
-  | opt_access path postfixTyparDecls 
-      { let tps,tpcs = $3 in 
-        tps, $2,true,tpcs,$1,grabXmlDoc(parseState,2) }
-
-prefixTyparDecls:
-  | typar { [ TyparDecl([],$1) ] }
-  | LPAREN prefixTyparDeclList RPAREN {  MatchPair parseState 1 3; List.rev $2 }
-
-prefixTyparDeclList: 
-  | prefixTyparDeclList COMMA typarDecl { $3 :: $1 } 
-  | typarDecl { [$1] }
-
-typarDecl : 
-  | opt_attributes typar { TyparDecl($1,$2) }
-
-postfixTyparDecls: 
-  | opt_HIGH_PRECEDENCE_TYAPP LESS prefixTyparDeclList opt_typeConstraints GREATER { List.rev $3, $4 }
-
-explicitValTyparDeclsCore: 
-  | prefixTyparDeclList COMMA DOT_DOT 
-      { (List.rev $1,true) }
-  | DOT_DOT 
-      { deprecatedWithError "Either specify all relevant type parameters or none" (lhs(parseState));
-        ([],true) }
-  | prefixTyparDeclList 
-      { (List.rev $1,false) }
-  | 
-      { ([],false) }
-
-explicitValTyparDecls: 
-  | opt_HIGH_PRECEDENCE_TYAPP LESS explicitValTyparDeclsCore opt_typeConstraints GREATER 
-      { let tps,flex = $3 in 
-         SynValTyparDecls(tps,flex,$4) }
-
-opt_explicitValTyparDecls: 
-  | explicitValTyparDecls 
-      { $1 } 
-  |       
-      { SynValTyparDecls([],true,[]) }
-
-opt_explicitValTyparDecls2: 
-  | explicitValTyparDecls 
-      { Some $1 } 
-  |       
-      { None }
-
-opt_typeConstraints:
-  |                      
-     { [] }
-  | WHEN typeConstraints 
-     { List.rev $2 }
-
-typeConstraints: 
-  | typeConstraints AND typeConstraint { $3 :: $1 } 
-  | typeConstraint { [$1] }
-
-typeConstraint: 
-  | DEFAULT typar COLON typ 
-      { libraryOnlyWarning (lhs(parseState)); WhereTyparDefaultsToType($2,$4,lhs(parseState)) }
-  | typar COLON_GREATER typ 
-      { WhereTyparSubtypeOfType($1,$3,lhs(parseState)) }
-  | typar COLON STRUCT 
-      { WhereTyparIsValueType($1,lhs(parseState)) }
-  | typar COLON IDENT STRUCT 
-      { if $3 <> "not" then reportParseErrorAt (rhs parseState 3) ("Unexpected identifier: '"^ $3 ^"'");  
-        WhereTyparIsReferenceType($1,lhs(parseState)) }
-  | typar COLON NULL 
-      { WhereTyparSupportsNull($1,lhs(parseState)) }
-  | typar COLON LPAREN classMemberSpfn RPAREN 
-      { WhereTyparSupportsMember([ $1 ],$4,lhs(parseState)) }
-  | LPAREN typar OR typar RPAREN COLON LPAREN classMemberSpfn RPAREN 
-      { WhereTyparSupportsMember([ $2 ; $4 ],$8,lhs(parseState)) }
-  | typar COLON DELEGATE typeArgs 
-      { WhereTyparIsDelegate($1,$4,lhs(parseState)) }
-  | typar COLON IDENT typeArgs 
-      { match $3 with 
-        | "enum" -> WhereTyparIsEnum($1,$4,lhs(parseState))
-        | nm -> raiseParseErrorAt (rhs parseState 3) ("Unexpected identifier: '"^ nm ^"'") }
-
-unionRepr:
-  /* Note the next three rules are required to disambiguate this from type x = y */
-  /* Attributes can only appear on a single constructor if you've used a | */
-  | barAndgrabXmlDoc attrUnionCaseDecls  
-     { $2 $1 }
-  | firstUnionCaseDeclOfMany barAndgrabXmlDoc attrUnionCaseDecls  
-     { $1 :: $3 $2 }
-  | firstUnionCaseDecl 
-     { [$1] } 
-
-barAndgrabXmlDoc : 
-  | BAR { grabXmlDoc(parseState,1) }
-
-attrUnionCaseDecls: 
-  | attrUnionCaseDecl barAndgrabXmlDoc attrUnionCaseDecls  { (fun xmlDoc -> $1 xmlDoc  :: $3 $2) } 
-  | attrUnionCaseDecl { (fun xmlDoc -> [ $1 xmlDoc ]) }
-
-attrUnionCaseDecl: 
-  | opt_attributes opt_access unionCaseName opt_OBLOCKSEP
-      { if isSome $2 then errorR(Error("Visibility declarations are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation",rhs parseState 2));
-        let mDecl = rhs parseState 3 in
-        (fun xmlDoc -> Choice2Of2 (UnionCase ( $1, $3,UnionCaseFields [],xmlDoc,None,mDecl))) 
-      } 
-  | opt_attributes opt_access unionCaseName OF unionCaseRepr  opt_OBLOCKSEP
-      { if isSome $2 then errorR(Error("Visibility declarations are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation",rhs parseState 2));
-        let mDecl = rhs2 parseState 3 5 in
-        (fun xmlDoc -> Choice2Of2 (UnionCase ( $1, $3,UnionCaseFields $5,xmlDoc,None,mDecl))) 
-      } 
-  | opt_attributes opt_access unionCaseName COLON topType opt_OBLOCKSEP
-      { if isSome $2 then errorR(Error("Visibility declarations are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation",rhs parseState 2));
-        libraryOnlyWarning(lhs(parseState));
-        let mDecl = rhs2 parseState 3 5 in
-        (fun xmlDoc -> Choice2Of2 (UnionCase ( $1, $3,UnionCaseFullType $5,xmlDoc,None,mDecl))) 
-      }
-  | opt_attributes opt_access unionCaseName EQUALS constant opt_OBLOCKSEP
-      { if isSome $2 then errorR(Error("Visibility declarations are not permitted on enumeration fields",rhs parseState 2));
-        let mDecl = rhs2 parseState 3 5 in
-        (fun xmlDoc -> Choice1Of2 (EnumCase ( $1, $3,$5,xmlDoc,mDecl))) 
-      } 
-
-/* REVIEW: unify this with operatorName! */
-unionCaseName: 
-  | nameop  
-      { $1 } 
-  | LPAREN COLON_COLON RPAREN  
-      {  MatchPair parseState 1 3; ident(opname_Cons,rhs parseState 2) }  
-  | LPAREN LBRACK RBRACK  RPAREN  
-      {  MatchPair parseState 1 4; ident(opname_Nil,rhs2 parseState 2 3) }  
-
-firstUnionCaseDeclOfMany: 
-  | ident opt_OBLOCKSEP
-      { 
-        Choice2Of2 (UnionCase ( [], $1,UnionCaseFields [],emptyPreXmlDoc,None,rhs parseState 1)) 
-      } 
-  | ident EQUALS constant opt_OBLOCKSEP
-      { 
-        Choice1Of2 (EnumCase ([],$1,$3,emptyPreXmlDoc,rhs2 parseState 1 3)) 
-      }
-  | firstUnionCaseDecl opt_OBLOCKSEP
-      { $1 }
-
-firstUnionCaseDecl: 
-  | ident OF unionCaseRepr  
-     { 
-       Choice2Of2 (UnionCase ( [],$1,UnionCaseFields $3,emptyPreXmlDoc,None,rhs2 parseState 1 3)) 
-    } 
-  | ident EQUALS constant opt_OBLOCKSEP
-      { 
-        Choice1Of2 (EnumCase ([],$1,$3,emptyPreXmlDoc,rhs2 parseState 1 3)) 
-      }
-
-unionCaseRepr:
-  | braceFieldDeclList
-     { errorR(Deprecated("Consider using a separate record type instead",lhs(parseState))); 
-       $1 }
-  | appType STAR tupleTypeElements 
-     { List.map anon_field_of_typ ($1 :: $3) }
-  | appType 
-     { [anon_field_of_typ $1] }
-
-recdFieldDeclList: 
-  | recdFieldDecl seps recdFieldDeclList 
-     { $1 :: $3 } 
-  | recdFieldDecl opt_seps           
-     { [$1] }
-
-recdFieldDecl: 
-  | opt_attributes  fieldDecl
-     { let fld = $2 $1 false in 
-       let (Field(a,b,c,d,e,f,vis,g)) = fld in 
-       if isSome vis then errorR(Error("Visibility declarations are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation",rhs parseState 2));
-       Field(a,b,c,d,e,f,None,g)  }
-
-fieldDecl: 
-  | opt_mutable opt_access ident COLON  polyType 
-     { let rhsm = rhs2 parseState 3 5 in 
-       (fun attrs stat -> Field(attrs, stat,Some $3,$5,$1,grabXmlDoc(parseState,3),$2,rhsm)) }
-
-
-exconDefn: 
-  | exconCore opt_classDefn 
-     { ExconDefn($1,$2, lhs(parseState)) }
-
-exconSpfn: 
-  | exconCore opt_classSpfn 
-     { ExconSpfn($1,$2,lhs(parseState)) }
-  
-exceptionAndGrabDoc:
-  | EXCEPTION { grabXmlDoc(parseState,1) }
-  
-exconCore: 
-  | exceptionAndGrabDoc opt_attributes opt_access exconIntro exconRepr 
-     { ExconCore($2,$4, $5,$1,$3,lhs(parseState)) }
-  
-exconIntro: 
-  | ident 
-      { UnionCase ( [], $1,UnionCaseFields [],emptyPreXmlDoc,None,lhs(parseState)) }
-  | ident OF unionCaseRepr 
-      { UnionCase ( [], $1,UnionCaseFields $3,emptyPreXmlDoc,None,lhs(parseState)) }
-
-exconRepr: 
-  |             { None }
-  | EQUALS path { Some ($2) }
-
-openDecl:  
-  |  OPEN path { $2 }
-
-defnBindings: 
-  | LET opt_rec localBindings 
-      { let letm = rhs parseState 1 in 
-        let isUse,isRec,bindingsPreAttrs = $1,$2,$3 in 
-        (* the first binding swallow any attributes prior to the 'let' *)
-        BindingSetPreAttrs(rhs parseState 1,isRec,isUse,(fun attrs vis -> 
-            let binds = bindingsPreAttrs attrs vis letm in 
-                        if not isRec && List.length binds > 1 then 
-                                ocamlCompatWarning "The declaration form 'let ... and ...' for non-recursive bindings is deprecated in F# code. In F# code simply use multiple 'let' bindings" letm; 
-            [],binds)) }
-  | cPrototype
-      { BindingSetPreAttrs(lhs(parseState), false,false,$1)  }
-
-doBinding:
-  | DO typedSeqExprBlock 
-      { let letm = rhs parseState 1 in 
-        let wholem = rhs2 parseState 1 2 in 
-        // any attributes prior to the 'let' are left free, e.g. become top-level attributes 
-        // associated with the module, 'main' function or assembly depending on their target 
-        BindingSetPreAttrs(letm,false,false,(fun attrs vis -> attrs,[mk_Do (vis,true,$2,wholem)])) }
-
-
-hardwhiteLetBindings: 
-  | OLET opt_rec localBindings hardwhiteDefnBindingsTerminator
-      { $4 (rhs parseState 1);  (* report unterminated error *)
-        let letm = rhs parseState 1 in 
-        let isUse,isRec,bindingsPreAttrs = $1,$2,$3 in 
-           
-        (* the first binding swallow any attributes prior to the 'let' *)
-        BindingSetPreAttrs(letm,isRec,isUse,(fun attrs vis -> 
-            let binds = bindingsPreAttrs attrs vis letm in 
-                        if not isRec && List.length binds > 1 then 
-                                ocamlCompatWarning "The declaration form 'let ... and ...' for non-recursive bindings is deprecated in F# code. In F# code simply use multiple 'let' bindings" letm; 
-            [],bindingsPreAttrs attrs vis letm)) }
-
-hardwhiteDoBinding: 
-  | ODO typedSeqExprBlock hardwhiteDefnBindingsTerminator          
-      { $3 (rhs parseState 1);  (* report unterminated error *)
-        let letm = rhs parseState 1 in 
-        let wholem = union_ranges letm (range_of_synexpr $2) in 
-        let seqPt = NoSequencePointAtDoBinding in 
-        // any attributes prior to the 'let' are left free, e.g. become top-level attributes 
-        // associated with the module, 'main' function or assembly depending on their target 
-        BindingSetPreAttrs(letm,false,false,(fun attrs vis -> attrs,[mk_Do (vis,true,$2,wholem)])), $2 }
-
-classDefnBindings: 
-  | defnBindings { $1 }
-  | doBinding { $1 }
-  | hardwhiteLetBindings { $1 } 
-  | hardwhiteDoBinding  { fst $1 }
-
-
-hardwhiteDefnBindingsTerminator:
-  |  ODECLEND
-     { (fun m -> ()) }
-  |  recover 
-     { (fun m -> reportParseErrorAt m "unmatched 'let' or 'do'") }
-
-cPrototype: 
-  | EXTERN cRetType opt_access ident opt_HIGH_PRECEDENCE_APP LPAREN cArgs RPAREN 
-      { let rty,vis,nm,args  = $2,$3,$4,$7 in 
-        let xmlDoc = grabXmlDoc(parseState,1) in 
-        let nmm = rhs parseState 3 in 
-        let argsm = rhs parseState 6 in 
-        let bindm = lhs(parseState) in
-        let wholem = lhs(parseState) in
-        let rhsm = lhs(parseState) in 
-        let rhsExpr = Expr_app(ExprAtomicFlag.NonAtomic, Expr_id_get(ident("failwith",rhsm)),Expr_const(Const_string("extern was not given a DllImport attribute",rhsm),rhsm),rhsm) in
-        (fun attrs vis -> 
-            let binding = mksyn_binding (xmlDoc,Pat_lid ([nm],Some(noInferredTypars),[Pat_tuple(args,argsm)],vis,nmm)) (vis,false,false,bindm,NoSequencePointAtInvisibleBinding,wholem,Some(rty),rhsExpr,rhsm,[],attrs,None) in
-            [], [binding]) }
-
-cArgs: 
-  | cMoreArgs 
-     { List.rev $1 }
-  | cArg 
-     { [$1] }
-  |       
-     { [] }
-  
-cMoreArgs: 
-  | cMoreArgs COMMA cArg 
-     { $3 :: $1 }
-  | cArg COMMA cArg 
-     { [$3; $1] }
-
-cArg: 
-  | opt_attributes cType       
-     { let m = lhs(parseState) in Pat_typed(Pat_wild m,$2,m) |> addAttribs $1 }
-  | opt_attributes cType ident 
-     { let m = lhs(parseState) in Pat_typed(Pat_as (Pat_wild m,$3,false,None,m),$2,m) |> addAttribs $1 }
-
-cType: 
-  | path      
-     { let m = lhs(parseState) in 
-       Type_app(Type_lid($1,m),[],false,m) } 
-
-  | cType opt_HIGH_PRECEDENCE_APP LBRACK RBRACK 
-     { let m = lhs(parseState) in 
-       Type_app(Type_lid([ident("[]",m)],m),[$1],true,m) } 
-
-  | cType STAR 
-     { let m = lhs(parseState) in 
-       Type_app(Type_lid([ident("nativeptr",m)],m),[$1],true,m) } 
-
-  | cType AMP  
-     { let m = lhs(parseState) in 
-       Type_app(Type_lid([ident("byref",m)],m),[$1],true,m) } 
-
-  | VOID STAR 
-     { let m = lhs(parseState) in 
-       Type_app(Type_lid([ident("nativeint",m)],m),[],true,m) } 
-
-cRetType: 
-  | opt_attributes cType 
-     { ($2,ArgSynInfo($1,false,None)),rhs parseState 2 }
-  | opt_attributes VOID  
-     { let m = rhs parseState 2 in 
-       (Type_app(Type_lid([ident("unit",m)],m),[],false,m),ArgSynInfo($1,false,None)),m } 
-
-
-localBindings: 
-  | attr_localBinding more_localBindings 
-      { (fun attrs vis letm -> 
-           match $1 with 
-           | Some f -> (f attrs vis letm true ::  $2) 
-           | None -> $2) }
-
-more_localBindings: 
-  | AND attr_localBinding more_localBindings 
-      { let letm = (rhs parseState 1) in
-        (match $2 with 
-         | Some f -> f [] None letm false :: $3 
-         | None -> $3) }
-  | %prec prec_no_more_attr_bindings 
-      { [] }
-
-attr_localBinding: 
-  | DO typedSeqExprBlock 
-      { let m = union_ranges (rhs parseState 1) (range_of_synexpr $2) in 
-        Some(fun attrs vis _ isFirst -> 
-          deprecatedWithError "The declaration form 'let do ...' and 'and do ...' has been removed from the F# language" m;
-          mk_Do (vis,true,$2,m)) }
-  | opt_attributes localBinding 
-      { Some(fun attrs vis letm _ -> 
-          $2 (attrs@$1) vis letm) }
-  | error 
-      { None }
-
-localBinding: 
-  | opt_inline opt_mutable bindingPattern  opt_topReturnTypeWithTypeConstraints EQUALS  typedExprWithStaticOptimizationsBlock 
-      { let expr,opts = $6 in
-        let eqm = rhs parseState 5 in 
-        let rhsm = range_of_synexpr expr in 
-        let optReturnType = $4 in 
-        let bindingBuilder,bindm = $3 in 
-        (fun attrs vis letm -> 
-            let wholem = union_ranges letm rhsm in
-            let spBind = if IsControlFlowExpression expr then NoSequencePointAtLetBinding else SequencePointAtBinding(wholem) in
-            bindingBuilder (vis,$1,$2,bindm,spBind,wholem,optReturnType,expr,rhsm,opts,attrs,None)) }
-  | opt_inline opt_mutable bindingPattern  opt_topReturnTypeWithTypeConstraints EQUALS  error
-      { let wholem = rhs2 parseState 3 5 in 
-        let rhsm = rhs parseState 5 in
-        let optReturnType = $4 in 
-        let bindingBuilder,bindm = $3 in 
-        (fun attrs vis letm -> 
-            let spBind = SequencePointAtBinding(union_ranges letm rhsm) in
-            bindingBuilder (vis,$1,$2,bindm,spBind,wholem,optReturnType,arbExpr(parseState),rhsm,[],attrs,None))  }
-
-/* REVIEW: this should probably be an expression form rather than tied to this particular part of the grammar */
-typedExprWithStaticOptimizationsBlock: 
-  | OBLOCKBEGIN typedExprWithStaticOptimizations OBLOCKEND { $2 }
-  | OBLOCKBEGIN typedExprWithStaticOptimizations recover { $2 (* silent recovery *) }
-  | typedExprWithStaticOptimizations { $1 }
-
-typedExprWithStaticOptimizations : 
-  | typedSeqExpr opt_staticOptimizations { $1, List.rev $2 }
-
-opt_staticOptimizations: 
-  | opt_staticOptimizations staticOptimization { $2 :: $1 } 
-  | { [] }
-
-staticOptimization: 
-  | WHEN staticOptimizationConditions EQUALS typedSeqExprBlock { ($2,$4) }
-
-staticOptimizationConditions: 
-  | staticOptimizationConditions AND staticOptimizationCondition { $3 :: $1 } 
-  | staticOptimizationCondition { [$1 ] }
-
-staticOptimizationCondition: 
-  | typar COLON typ { WhenTyparTyconEqualsTycon($1,$3,lhs(parseState)) }
-  | TRUE  {WhenInlined(rhs parseState 1) }
-
-rawconstant: 
-  | INT8 { if snd $1 then errorR(Error("This number is outside the allowable range for 8-bit signed integers", lhs(parseState)));
-           Const_int8 (fst $1) } 
-  | UINT8 { Const_uint8 $1 } 
-  | INT16 { if snd $1 then errorR(Error("This number is outside the allowable range for 16-bit signed integers", lhs(parseState)));
-            Const_int16 (fst $1) } 
-  | UINT16 { Const_uint16 $1 } 
-  | INT32 { if snd $1 then errorR(Error("This number is outside the allowable range for 32-bit signed integers", lhs(parseState)));
-            Const_int32 (fst $1) } 
-  | UINT32 { Const_uint32 $1 } 
-  | INT64 { if snd $1 then errorR(Error("This number is outside the allowable range for 64-bit signed integers", lhs(parseState)));
-            Const_int64 (fst $1) } 
-  | UINT64 { Const_uint64 $1 } 
-  | NATIVEINT { Const_nativeint $1 } 
-  | UNATIVEINT { Const_unativeint $1 } 
-  | IEEE32 { Const_float32 $1 } 
-  | IEEE64 { Const_float $1 } 
-  | CHAR { Const_char $1 } 
-  | DECIMAL { Const_decimal $1 } 
-  | BIGNUM { Const_bignum $1 } 
-  | STRING { Const_string ($1,lhs(parseState)) } 
-  | BYTEARRAY { Const_bytearray ($1,lhs(parseState)) }
-
-constant: 
-  | rawconstant { $1 }
-  | rawconstant HIGH_PRECEDENCE_TYAPP measurearg { Const_measure($1, $3) }
-
-bindingPattern:
-  | headBindingPattern   
-      {  let xmlDoc = grabXmlDoc(parseState,1) in
-         mksyn_binding (xmlDoc,$1), rhs parseState 1 }
-
-/* sp = v | sp:typ | attrs sp */
-simplePattern:
-  | ident 
-      { SPat_as ($1,false,false,false,rhs parseState 1) }
-  | QMARK ident 
-      { SPat_as ($2,false,false,true,rhs parseState 2) }
-  | simplePattern COLON typeWithTypeConstraints
-      { let lhsm = lhs(parseState) in 
-        SPat_typed($1,$3,lhsm) }
-  | attributes simplePattern %prec paren_pat_attribs
-      { let lhsm = lhs(parseState)  in
-        SPat_attrib($2,$1,lhsm) }
-
-simplePatternCommaList:
-  | simplePattern { [$1] }
-  | simplePattern COMMA simplePatternCommaList { $1 :: $3 }
-
-simplePatterns:
-  | LPAREN simplePatternCommaList RPAREN { $2 }
-  | LPAREN RPAREN { [] }
-  | LPAREN simplePatternCommaList recover { reportParseErrorAt (rhs parseState 1) "unmatched '('"; [] }
-  | LPAREN error RPAREN { (* silent recovery *) [] }
-  | LPAREN recover {  reportParseErrorAt (rhs parseState 1) "unmatched '('"; [] }  
-
-
-headBindingPattern:
-  | headBindingPattern AS ident 
-      { Pat_as ($1,$3,false,None,rhs2 parseState 1 3) }
-  | headBindingPattern BAR headBindingPattern  
-      { Pat_disj($1,$3,rhs2 parseState 1 3) }
-  | headBindingPattern COLON_COLON  headBindingPattern 
-      { Pat_lid (mksyn_constr (rhs parseState 2) opname_Cons, None,[Pat_tuple ([$1;$3],rhs2 parseState 1 3)],None,lhs(parseState)) }
-  | tuplePatternElements  %prec pat_tuple 
-      { Pat_tuple(List.rev $1, lhs(parseState)) }
-  | conjPatternElements   %prec pat_conj
-      { Pat_conjs(List.rev $1, lhs(parseState)) }
-  | constrPattern 
-      { $1 }
-
-tuplePatternElements: 
-  | tuplePatternElements COMMA headBindingPattern { $3 :: $1 }
-  | headBindingPattern COMMA headBindingPattern { $3 :: $1 :: [] }
-
-conjPatternElements: 
-  | conjPatternElements AMP headBindingPattern { $3 :: $1 }
-  | headBindingPattern AMP headBindingPattern { $3 :: $1 :: [] }
-
-constrPattern:
-  | atomicPatternLongIdent explicitValTyparDecls                                                          { let vis,lid = $1 in Pat_lid (lid,Some $2,[],vis,lhs(parseState)) }
-  | atomicPatternLongIdent opt_explicitValTyparDecls2                     atomicPatterns    %prec pat_app { let vis,lid = $1 in Pat_lid (lid,$2,$3,vis,lhs(parseState)) }
-  | atomicPatternLongIdent opt_explicitValTyparDecls2 HIGH_PRECEDENCE_APP atomicPatterns                  { let vis,lid = $1 in Pat_lid (lid,$2,$4,vis,lhs(parseState)) }
-  | COLON_QMARK atomType  %prec pat_isinst { Pat_isinst($2,lhs(parseState)) }
-  | atomicPattern { $1 }
-
-atomicPatterns: 
-  | atomicPattern atomicPatterns %prec pat_args { $1 :: $2 } 
-  | atomicPattern HIGH_PRECEDENCE_APP atomicPatterns 
-      { reportParseErrorAt (rhs parseState 1) "Successive patterns should be separated by spaces or tupled";
-        $1 :: $3 } 
-  | atomicPattern { [$1] }
-
-
-atomicPattern:
-  | quoteExpr 
-      { Pat_expr($1,lhs(parseState)) } 
-  | CHAR DOT_DOT CHAR { Pat_range ($1,$3,rhs2 parseState 1 3) }
-  | LBRACE recordPatternElements RBRACE
-      { $2 }
-  | LBRACK listPatternElements RBRACK
-      { MatchPair parseState 1 3; Pat_array_or_list(false,$2,lhs(parseState)) }
-  | LBRACK_BAR listPatternElements  BAR_RBRACK
-      { MatchPair parseState 1 3; Pat_array_or_list(true,$2, lhs(parseState)) }
-  | UNDERSCORE { Pat_wild (lhs(parseState)) }
-  | QMARK ident { Pat_opt_var($2,lhs(parseState)) } 
-  | atomicPatternLongIdent %prec prec_atompat_pathop 
-      { let vis,lid = $1 in 
-        if List.length lid > 1 || (let c = (List.hd lid).idText.[0] in Char.IsUpper(c) && not (Char.IsLower c)) 
-        then mksyn_pat_maybe_var lid vis (lhs(parseState))
-        else mksyn_pat_var vis (List.hd lid) }
-  | constant { Pat_const ($1,range_of_synconst $1 (lhs(parseState))) }
-  | FALSE  { Pat_const(Const_bool false,lhs(parseState)) } 
-  | TRUE  { Pat_const(Const_bool true,lhs(parseState)) } 
-  | NULL { Pat_null(lhs(parseState)) }
-  | LPAREN parenPatternBody RPAREN {  MatchPair parseState 1 3; let m = (lhs(parseState)) in Pat_paren($2 m,m) } 
-  | LPAREN parenPatternBody recover { reportParseErrorAt (rhs parseState 1) "unmatched '('"; $2 (rhs2 parseState 1 2) }
-  | LPAREN error RPAREN { (* silent recovery *) Pat_wild (lhs(parseState)) }
-  | LPAREN recover {  reportParseErrorAt (rhs parseState 1) "unmatched '('"; Pat_wild (lhs(parseState))}  
-
-  
-      
-parenPatternBody: 
-  | parenPattern 
-      { (fun m -> $1) } 
-  |      
-      { (fun m -> Pat_const(Const_unit,m)) } 
-
-/* This duplicates out 'patterns' in order to give type annotations */
-/* the desired precedence w.r.t. patterns, tuple patterns in particular. */
-/* Duplication requried to minimize the disturbance to the grammar, */
-/* in particular the expected property that "pat" parses the same as */
-/* "(pat)"!  Here are some examples: */
-/*    a,b                  parses as (a,b) */
-/*    (a,b)           also parses as (a,b) */
-/*    (a,b : t)            parses as (a, (b:t)) */
-/*    a,b as t             parses as ((a,b) as t) */
-/*    (a,b as t)      also parses as ((a,b) as t) */
-/*    a,b | c,d            parses as ((a,b) | (c,d)) */
-/*    (a,b | c,d)     also parses as ((a,b) | (c,d)) */
-/*    (a : t,b)            parses as ((a:t),b) */
-/*    (a : t1,b : t2)      parses as ((a:t),(b:t2)) */
-/*    (a,b as nm : t)      parses as (((a,b) as nm) : t) */
-/*    (a,b :: c : t)       parses as (((a,b) :: c) : t) */
-/* */
-/* Probably the most unexpected thing here is that 'as nm' binds the */
-/* whole pattern to the left, whereas ': t' binds only the pattern */
-/* immediately preceding in the tuple. */
-/* */
-/* Also, it is unexpected that '(a,b : t)' in a pattern binds differently to */
-/* '(a,b : t)' in an expression. It's not that easy to solve that without */
-/* duplicating the entire expression grammar, or making a fairly severe breaking change */
-/* to the language. */
-parenPattern:
-  | parenPattern AS ident 
-      { Pat_as ($1,$3,false,None,rhs2 parseState 1 3) }
-  | parenPattern BAR parenPattern  
-      { Pat_disj($1,$3,rhs2 parseState 1 3) }
-  | tupleParenPatternElements 
-      { Pat_tuple(List.rev $1,lhs(parseState)) }
-  | conjParenPatternElements
-      { Pat_conjs(List.rev $1,rhs2 parseState 1 3) }
-  | parenPattern COLON  typeWithTypeConstraints %prec paren_pat_colon
-      { let lhsm = lhs(parseState) in 
-        Pat_typed($1,$3,lhsm) } 
-  | attributes parenPattern  %prec paren_pat_attribs
-      { let lhsm = lhs(parseState)  in
-        Pat_attrib($2,$1,lhsm) } 
-  | parenPattern COLON_COLON  parenPattern 
-      { Pat_lid (mksyn_constr (rhs parseState 2) opname_Cons, None, [ Pat_tuple ([$1;$3],rhs2 parseState 1 3) ],None,lhs(parseState)) }
-  | parenPattern COLON_GREATER typ  
-      { let lhsm = lhs(parseState) in 
-        deprecatedWithError "Patterns of the form 'pat :> type' have been removed from the F# language. Consider using just 'pat : type' instead" lhsm;
-        Pat_typed($1, mksyn_anon_constraint $3 lhsm,lhsm) } 
-  | constrPattern { $1 }
-
-tupleParenPatternElements:
-  | tupleParenPatternElements COMMA parenPattern  { $3 :: $1 }
-  | parenPattern COMMA parenPattern  { $3 :: $1 :: [] }
-  
-conjParenPatternElements: 
-  | conjParenPatternElements AMP parenPattern { $3 :: $1 }
-  | parenPattern AMP parenPattern { $3 :: $1 :: [] }
-
-recordPatternElements:
-  | recordPatternElementsAux { let rs,m = $1 in Pat_recd (rs,m) }
-
-recordPatternElementsAux: /* Fix 1190 */
-  | recordPatternElement opt_seps                      { [$1],lhs(parseState) }
-  | recordPatternElement seps recordPatternElementsAux { let r = $1 in let (rs,dropMark) = $3 in (r :: rs),lhs(parseState) }
-
-recordPatternElement:  
-  | path EQUALS parenPattern { (List.frontAndBack $1,$3) }
-
-listPatternElements: /* Fix 3569 */
-  |                                       { [] }
-  | parenPattern opt_seps                 { [$1] }
-  | parenPattern seps listPatternElements { $1 :: $3 }
-
-/* The lexfilter likes to insert OBLOCKBEGIN/OBLOCKEND pairs */
-typedSeqExprBlock: 
-  | OBLOCKBEGIN typedSeqExpr OBLOCKEND { $2 }
-  | OBLOCKBEGIN typedSeqExpr recover { $2 }
-  | typedSeqExpr { $1 }
-
-/* The lexfilter likes to insert OBLOCKBEGIN/OBLOCKEND pairs */
-declExprBlock: 
-  | OBLOCKBEGIN typedSeqExpr OBLOCKEND { $2 }
-  | declExpr { $1 }
-
-/* For some constructs the lex filter can't be sure to insert a matching OBLOCKEND, e.g. "function a -> b | c -> d" all in one line */
-/* for these it only inserts a trailing ORIGHT_BLOCK_END */
-typedSeqExprBlockR: 
-  | typedSeqExpr ORIGHT_BLOCK_END { $1 }
-  | typedSeqExpr { $1 }
-
-typedSeqExpr: 
-  | seqExpr COLON               typeWithTypeConstraints { Expr_typed ($1,$3, union_ranges (range_of_synexpr $1) (range_of_syntype $3)) }
-  | seqExpr COLON_QMARK         typ  %prec expr_isinst  { Expr_isinst($1,$3, union_ranges (range_of_synexpr $1) (range_of_syntype $3)) }
-  | seqExpr COLON_GREATER       typ                     { Expr_upcast($1,$3, union_ranges (range_of_synexpr $1) (range_of_syntype $3)) } 
-  | seqExpr COLON_QMARK_GREATER typ                     { Expr_downcast($1,$3, union_ranges (range_of_synexpr $1) (range_of_syntype $3)) }
-  | seqExpr { $1 }
-
-seqExpr:
-  | declExpr seps seqExpr                 { Expr_seq(SequencePointsAtSeq,true,$1,$3,union_ranges (range_of_synexpr $1) (range_of_synexpr $3)) } 
-  | declExpr seps                         { $1 }  
-  | declExpr             %prec SEMICOLON { $1 } 
-  | declExpr THEN seqExpr %prec prec_then_before { Expr_seq(SequencePointsAtSeq,false,$1,$3,union_ranges (range_of_synexpr $1) (range_of_synexpr $3) ) }
-  | declExpr OTHEN OBLOCKBEGIN typedSeqExpr OBLOCKEND %prec prec_then_before { Expr_seq(SequencePointsAtSeq,false,$1,$4,union_ranges (range_of_synexpr $1) (range_of_synexpr $4)) }
-
-/* use this as the last terminal when performing silent error recovery */
-/* in situations where a syntax error has definitely occurred. This allows */
-/* the EOF token to be swallowed to help initiate error recovery. */
-recover: 
-   | error { }  
-   | EOF { }
-
-declExpr:
-  | defnBindings IN typedSeqExpr  %prec expr_let 
-     { mkLocalBindings (rhs2 parseState 1 3,$1,$3) }
-  | defnBindings IN error        %prec expr_let
-     { mkLocalBindings (rhs2 parseState 1 2,$1,arbExpr(parseState)) }
-  | defnBindings error        %prec expr_let
-    { reportParseErrorAt (match $1 with (BindingSetPreAttrs(m,_,_,_))  -> m) "no matching 'in' found for this 'let'";
-      mkLocalBindings (rhs parseState 1,$1,arbExpr(parseState)) }
-
-  | hardwhiteLetBindings typedSeqExprBlock  %prec expr_let 
-     { mkLocalBindings (union_ranges (rhs parseState 1) (range_of_synexpr $2),$1,$2) }
-  | hardwhiteLetBindings error        %prec expr_let
-     { reportParseErrorAt (match $1 with (BindingSetPreAttrs(m,_,_,_))  -> m) "error in the return expression for this 'let'. Possible incorrect indentation";
-       mkLocalBindings (rhs2 parseState 1 2,$1,arbExpr(parseState)) }
-  | hardwhiteLetBindings OBLOCKSEP typedSeqExprBlock  %prec expr_let 
-     { mkLocalBindings (union_ranges (rhs2 parseState 1 2) (range_of_synexpr $3) ,$1,$3) }
-  | hardwhiteLetBindings OBLOCKSEP error        %prec expr_let
-     { //reportParseErrorAt (match $1 with (BindingSetPreAttrs(m,_,_,_))  -> m) "error in the return expression for this 'let'. Possible incorrect indentation";
-       mkLocalBindings (rhs2 parseState 1 2,$1,arbExpr(parseState)) }
-
-  | hardwhiteDoBinding  %prec expr_let
-     { let e = snd $1 in
-       Expr_do(e,range_of_synexpr e) }
-  
-  | anonMatchingExpr %prec expr_function
-      { $1 }
-  | anonLambdaExpr  %prec expr_fun { $1 }
-
-  | MATCH typedSeqExpr     withClauses              %prec expr_match 
-      { let mMatch = (rhs parseState 1) in
-        let mWith,(clauses,mLast) = $3 in 
-        let spBind = SequencePointAtBinding(union_ranges mMatch mWith) in 
-        Expr_match(spBind, $2,clauses,false,union_ranges mMatch mLast) }
-
-  | MATCH typedSeqExpr     recover               %prec expr_match 
-      { (* Produce approximate expression during error recovery *)
-        Expr_throwaway($2,rhs2 parseState 1 2) }
-      
-  | TRY typedSeqExprBlockR withClauses              %prec expr_try 
-      { let mTry = (rhs parseState 1) in
-        let spTry = SequencePointAtTry(mTry) in 
-        let mWith,(clauses,mLast) = $3 in 
-        let spWith = SequencePointAtWith(mWith) in 
-        let mTryToWith = union_ranges mTry mWith in 
-        let mWithToLast = union_ranges mWith mLast in 
-        let mTryToLast = union_ranges mTry mLast in
-        Expr_try_catch($2, mTryToWith, clauses,mWithToLast, mTryToLast,spTry,spWith) }
-
-  | TRY typedSeqExprBlockR recover              %prec expr_try 
-      { (* Produce approximate expression during error recovery *)
-        (* Include any expressions to make sure they gets type checked in case that generates useful results for intellisense *)
-        $2 }
-
-  | TRY typedSeqExprBlockR FINALLY typedSeqExprBlock %prec expr_try 
-      { let mTry = rhs parseState 1 in 
-        let spTry = SequencePointAtTry(mTry) in 
-        let spFinally = SequencePointAtFinally(rhs parseState 3) in 
-        let mTryToLast = union_ranges mTry (range_of_synexpr $4) in 
-        Expr_try_finally($2, $4,mTryToLast,spTry,spFinally) }
-
-  | IF declExpr ifExprCases %prec expr_if 
-      { let mIf = (rhs parseState 1) in
-        $3 $2 mIf }
-
-  | IF declExpr recover %prec expr_if 
-      { reportParseErrorAt (rhs parseState 1) "unmatched 'if'"; 
-        (* Produce an approximate expression during error recovery. *)
-        (* Include expressions to make sure they get type checked in case that generates useful results for intellisense. *)
-        (* Generate a throwAway for the expression so it isn't forced to have a type 'bool' *)
-        (* from the context it is used in. *)
-        Expr_throwaway($2, rhs2 parseState 1 2) }
-
-  | IF recover %prec expr_if 
-      { arbExpr parseState }
-
-  | LAZY declExpr %prec expr_lazy 
-      { Expr_lazy($2,union_ranges (rhs parseState 1) (range_of_synexpr $2)) }
-
-  | ASSERT declExpr %prec expr_assert { Expr_assert($2, union_ranges (rhs parseState 1) (range_of_synexpr $2)) }
-  | ASSERT %prec expr_assert { raiseParseErrorAt (rhs parseState 1) "'assert' may no longer be used as a first class value. Use 'assert ' instead" }
-
-  | WHILE declExpr do_or_odo typedSeqExprBlock done_term 
-      { let mWhile = union_ranges (rhs parseState 1) (range_of_synexpr $2) in
-        let spWhile = SequencePointAtWhileLoop(mWhile) in 
-        Expr_while(spWhile,$2,$4,union_ranges (rhs parseState 1) (range_of_synexpr $4)) }
-      
-  | WHILE declExpr do_or_odo typedSeqExprBlock recover { reportParseErrorAt (rhs parseState 4) "'done' expected after this expression" ;  arbExpr(parseState) }  
-  | WHILE declExpr do_or_odo error done_term { (* silent recovery *) arbExpr(parseState) }  
-  | WHILE declExpr recover { reportParseErrorAt (rhs parseState 2) "'do' expected after this expression" ; arbExpr(parseState) }  
-  | WHILE error done_term { (* silent recovery *) arbExpr(parseState)  } 
-
-  | FOR forLoopBinder do_or_odo typedSeqExprBlock done_term 
-      { let spBind = SequencePointAtForLoop(rhs2 parseState 1 3) in
-        let (a,b) = $2 in Expr_foreach(spBind,SeqExprOnly(false),a,b,$4,union_ranges (rhs parseState 1) (range_of_synexpr $4)) }
-
-  | FOR forLoopBinder recover
-      { let spBind = SequencePointAtForLoop(rhs2 parseState 1 2) in
-        let (a,b) = $2 in Expr_foreach(spBind,SeqExprOnly(false),a,b,arbExpr(parseState),lhs(parseState)) }
-
-  | FOR forLoopBinder do_or_odo error done_term 
-      { let spBind = SequencePointAtForLoop(rhs2 parseState 1 3) in
-        let (a,b) = $2 in Expr_foreach(spBind,SeqExprOnly(false),a,b,arbExpr(parseState),rhs2 parseState 1 3) }
-
-  | FOR forLoopRange  do_or_odo typedSeqExprBlock done_term 
-      { let spBind = SequencePointAtForLoop(rhs2 parseState 1 3) in
-        let (a,b,c,d) = $2 in Expr_for(spBind,a,b,c,d,$4,union_ranges (rhs parseState 1) (range_of_synexpr $4)) }
-
-  | FOR forLoopRange  do_or_odo typedSeqExprBlock recover 
-      { reportParseErrorAt (rhs parseState 1) "unclosed 'for', e.g. no 'done' found to match this 'for'" ; arbExpr(parseState) }
-
-  | FOR forLoopRange  do_or_odo error done_term 
-      { (* silent recovery *) arbExpr(parseState) }
-
-  | FOR error do_or_odo typedSeqExprBlock done_term 
-      { (* silent recovery *) $4 }
-
-/* do not include this one - though for fairly bizarre reasons!
-   If the user has simply typed 'for'as the 
-   start of a variable name, and intellisense parsing 
-   kicks in, then we can't be sure we're parsing a for-loop. The general rule is that you shoudn't
-   commit to aggressive look-for-a-matching-construct error recovery until
-   you're sure you're parsing a particular construct.
-
-  This probably affects 'and' as well, but it's hard to change that.
-  'for' is a particularly common prefix of identifiers.
-
-  | FOR error done_term {  reportParseErrorAt (rhs parseState 2)  "identifier expected"; arbExpr(parseState) }
-*/
-
-  | FOR parenPattern error done_term {  reportParseErrorAt (rhs parseState 3) "'=' expected"; arbExpr(parseState) }
-
-  /* START MONADIC SYNTAX ONLY */
-  | YIELD declExpr
-     { Comp_yield(($1,not $1),$2, union_ranges (rhs parseState 1) (range_of_synexpr $2)) } 
-  | YIELD_BANG declExpr
-     { Comp_yieldm(($1,not $1), $2, union_ranges (rhs parseState 1) (range_of_synexpr $2)) } 
-
-  | BINDER headBindingPattern EQUALS typedSeqExprBlock IN opt_OBLOCKSEP typedSeqExprBlock %prec expr_let 
-     { let spBind = SequencePointAtBinding(rhs2 parseState 1 5) in
-       let m = rhs parseState 1 in
-       Comp_bind(spBind,($1 = "use"),$2,$4,$7, lhs parseState) }
-
-  | OBINDER headBindingPattern EQUALS typedSeqExprBlock hardwhiteDefnBindingsTerminator opt_OBLOCKSEP typedSeqExprBlock %prec expr_let 
-     { let spBind = SequencePointAtBinding(union_ranges (rhs parseState 1) (range_of_synexpr $4)) in
-       let m = rhs parseState 1 in
-       Comp_bind(spBind,($1 = "use"),$2,$4,$7, lhs parseState) }
-
-  | OBINDER headBindingPattern EQUALS typedSeqExprBlock hardwhiteDefnBindingsTerminator opt_OBLOCKSEP error %prec expr_let 
-     { (* error recovery that allows intellisense when writing incomplete computation expressions *)
-                         let spBind = SequencePointAtBinding(union_ranges (rhs parseState 1) (range_of_synexpr $4)) in
-       let m = rhs parseState 1 in
-       Comp_bind(spBind,($1 = "use"),$2,$4, (Comp_zero(m)) , lhs parseState) }
-
-  | DO_BANG typedSeqExpr IN opt_OBLOCKSEP typedSeqExprBlock %prec expr_let 
-     { let spBind = NoSequencePointAtDoBinding in
-       Comp_bind(spBind,false,Pat_const(Const_unit,range_of_synexpr $2),$2,$5, union_ranges (rhs parseState 1) (range_of_synexpr $5)) }
-
-  | ODO_BANG typedSeqExprBlock hardwhiteDefnBindingsTerminator %prec expr_let 
-     { Comp_do_bind($2, union_ranges (rhs parseState 1) (range_of_synexpr $2)) }
-
-  | FOR forLoopBinder opt_OBLOCKSEP monadicSingleLineQualifiersThenArrowThenExprR %prec expr_let 
-     { let spBind = SequencePointAtForLoop(rhs2 parseState 1 2) in
-       let a,b= $2 in Expr_foreach(spBind,SeqExprOnly(true),a,b,$4 (rhs parseState 3),rhs2 parseState 1 3) } 
-
-  | RARROW typedSeqExprBlockR 
-     { errorR(Error("The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions",lhs parseState));
-       Comp_yield((true,true),$2, lhs parseState) } 
-     
-  /* END MONADIC SYNTAX ONLY */
-
-
-  | declExpr COLON_EQUALS           declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 ":=" $3 }
-  | minusExpr LARROW                declExprBlock { mksyn_assign (union_ranges (range_of_synexpr $1) (range_of_synexpr $3)) $1 $3 }
-  | tupleExpr  %prec expr_tuple  { Expr_tuple( List.rev $1,lhs(parseState)) }
-  | declExpr  BAR_BAR               declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 "||" $3 }
-  | declExpr  INFIX_BAR_OP          declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 $2 $3 }
-  | declExpr  OR                    declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 "or" $3 }
-  | declExpr  AMP                   declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 "&" $3 }
-  | declExpr  AMP_AMP               declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 "&&" $3 }
-  | declExpr  INFIX_AMP_OP          declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 $2 $3 }
-  | declExpr  EQUALS                declExpr { mksyn_infix (rhs parseState 2) (union_ranges (range_of_synexpr $1) (range_of_synexpr $3)) $1 "=" $3 }
-  | declExpr  INFIX_COMPARE_OP      declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 $2 $3 }
-  | declExpr  DOLLAR                declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 "$" $3 }
-  | declExpr  LESS                  declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 "<" $3 }
-  | declExpr  GREATER               declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 ">" $3 }
-  | declExpr  INFIX_AT_HAT_OP       declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 $2 $3 }
-  | declExpr  PERCENT_OP            declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 $2 $3 }
-  | declExpr  COLON_COLON           declExpr { Expr_app (ExprAtomicFlag.NonAtomic, mksyn_item (rhs parseState 2) opname_Cons,Expr_tuple ([$1;$3],lhs(parseState)),lhs(parseState)) }
-  | declExpr  PLUS_MINUS_OP         declExpr { mksyn_infix (rhs parseState 2)  (lhs(parseState)) $1 $2 $3 }
-  | declExpr  MINUS                 declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 "-" $3 }
-  | declExpr  STAR                  declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 "*" $3 }
-  | declExpr  INFIX_STAR_DIV_MOD_OP declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 $2 $3 }
-  | declExpr  INFIX_STAR_STAR_OP    declExpr { mksyn_infix (rhs parseState 2) (lhs(parseState)) $1 $2 $3 }
-  | minusExpr %prec expr_prefix_plus_minus { $1 }
-
-dynamicArg:
-  | IDENT
-      { let con = Const_string ($1,rhs parseState 1) in
-        let arg2 = Expr_const (con,range_of_synconst con (rhs parseState 1))  in
-        arg2 }
-  | LPAREN typedSeqExpr RPAREN
-      { $2 }
-
-monadicWhenCondition:
-  | WHEN declExpr 
-     { $2 }
-  
-withClauses:
-  | WITH withPatternClauses       { rhs parseState 1, $2 }
-  | OWITH withPatternClauses OEND { rhs parseState 1, $2 }
-  | OWITH withPatternClauses recover { rhs parseState 1, $2 }
-
-withPatternClauses:
-  | patternClauses 
-      { $1 }
-  | BAR patternClauses 
-      {  $2 }
-  | BAR error 
-      {  (* silent recovery *)  
-         let mLast = rhs parseState 1 in
-         [], mLast }
-  | error  
-      {  (* silent recovery *)  
-         let mLast = rhs parseState 1 in
-         [], mLast }
-
-
-patternAndGuard: 
-  | parenPattern patternGuard 
-      { $1, $2, rhs parseState 1 }
-      
-patternClauses: 
-  | patternAndGuard patternResult %prec prec_pat_pat_action
-     { let pat,guard,patm = $1 in 
-       let mLast = range_of_synexpr $2 in 
-       [Clause(pat,guard,$2,patm,SequencePointAtTarget)], mLast  }
-  | patternAndGuard patternResult BAR patternClauses 
-     { let pat,guard,patm = $1 in 
-       let clauses,mLast = $4 in 
-       (Clause(pat,guard,$2,patm,SequencePointAtTarget) :: clauses), mLast }
-  | patternAndGuard patternResult BAR error 
-     { let pat,guard,patm = $1 in 
-       let mLast = rhs parseState 3 in 
-       (* silent recovery *)
-       [Clause(pat,guard,$2,patm,SequencePointAtTarget)], mLast  }
-  | patternAndGuard patternResult error 
-     { let pat,guard,patm = $1 in 
-       let mLast = range_of_synexpr $2 in 
-       (* silent recovery *)
-       [Clause(pat,guard,$2,patm,SequencePointAtTarget)], mLast }
- 
-patternGuard: 
-  | WHEN declExpr 
-     { Some $2 }
-  | 
-     { None }
-
-patternResult: 
-  | RARROW typedSeqExprBlockR  
-     { $2 }
-
-ifExprCases: 
-  | ifExprThen ifExprElifs 
-      { let exprThen,mThen = $1 in 
-        (fun exprGuard mIf -> 
-            let mIfToThen = union_ranges mIf mThen in
-            let mIfToEndOfElseBranch = union_ranges mIf (range_of_synexpr (match $2 with None -> exprThen | Some e -> e)) in
-            let spIfToThen = SequencePointAtBinding(mIfToThen) in
-            Expr_cond(exprGuard,exprThen,$2,spIfToThen,mIfToThen,mIfToEndOfElseBranch)) }
-
-ifExprThen: 
-  | THEN  declExpr %prec prec_then_if { $2, rhs parseState 1 }
-  | OTHEN  OBLOCKBEGIN typedSeqExpr OBLOCKEND %prec prec_then_if { $3,rhs parseState 1 }
-  | OTHEN  OBLOCKBEGIN typedSeqExpr recover %prec prec_then_if { $3,rhs parseState 1 }
-
-ifExprElifs: 
-  | 
-      { None }
-  | ELSE declExpr 
-      { Some $2 }
-  | OELSE  OBLOCKBEGIN typedSeqExpr OBLOCKEND 
-      { Some $3 }
-  | OELSE  OBLOCKBEGIN typedSeqExpr recover 
-      { Some $3 }
-  | ELIF declExpr ifExprCases 
-      { let mElif = rhs parseState 1 in 
-        Some ($3 $2 mElif) }
-
-tupleExpr: 
-  | tupleExpr COMMA declExpr   
-      { $3 :: $1 }
-  | declExpr COMMA declExpr  
-      { $3 :: $1 :: [] }
-
-minusExpr: 
-  | MINUS minusExpr   %prec expr_prefix_plus_minus
-      { mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr $2)) "~-" $2 }
-  | PLUS_MINUS_OP minusExpr  
-      { mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr $2)) ("~"^($1)) $2 } 
-  | ADJACENT_PREFIX_PLUS_MINUS_OP minusExpr 
-      { mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr $2)) ("~"^($1)) $2 }
-  | SPLICE_SYMBOL minusExpr
-      { mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr $2)) $1 $2 }
-  | PERCENT_OP minusExpr
-      { mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr $2)) ("~"^($1)) $2 }
-  | AMP  minusExpr    
-      { Expr_addrof(true,$2,rhs parseState 1,union_ranges (rhs parseState 1) (range_of_synexpr $2)) } 
-  | AMP_AMP  minusExpr   
-      { Expr_addrof(false,$2,rhs parseState 1, union_ranges (rhs parseState 1) (range_of_synexpr $2)) } 
-  | NEW appType  opt_HIGH_PRECEDENCE_APP atomicExprAfterType 
-      { Expr_new(false,$2,$4,union_ranges (rhs parseState 1) (range_of_synexpr $4)) }
-  | NEW appType opt_HIGH_PRECEDENCE_APP error   
-      { Expr_new(false,$2,arbExpr(parseState),union_ranges (rhs parseState 1) (range_of_syntype $2)) }
-  | UPCAST  minusExpr 
-      { Expr_inferred_upcast($2,union_ranges (rhs parseState 1) (range_of_synexpr $2)) }   
-  | DOWNCAST  minusExpr 
-      { Expr_inferred_downcast($2,union_ranges (rhs parseState 1) (range_of_synexpr $2))}   
-  | appExpr 
-      { $1 }
-
-appExpr:
-  | appExpr argExpr %prec expr_app
-      { Expr_app (ExprAtomicFlag.NonAtomic, $1,$2,union_ranges (range_of_synexpr $1) (range_of_synexpr $2))  }
-  | atomicExpr 
-      { let arg,_ = $1 in 
-        arg }
-
-argExpr:
-  | ADJACENT_PREFIX_PLUS_MINUS_OP atomicExpr 
-      { let arg2,hpa2 = $2 in 
-        if hpa2 then reportParseErrorAt (rhs parseState 1) "Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized";
-        mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr arg2)) ("~"^($1)) arg2 }
-   | atomicExpr 
-      { let arg,hpa = $1 in 
-        if hpa then reportParseErrorAt (range_of_synexpr arg) "Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized";
-        arg }
-    
-    
-atomicExpr:
-  | atomicExpr HIGH_PRECEDENCE_APP atomicExpr
-      { let arg1,_ = $1 in 
-        let arg2,_ = $3 in 
-        Expr_app (ExprAtomicFlag.Atomic, arg1,arg2,union_ranges (range_of_synexpr arg1) (range_of_synexpr arg2)),true  }
-
-  | atomicExpr HIGH_PRECEDENCE_TYAPP typeArgsActual
-      { let arg1,_ = $1 in 
-        Expr_tyapp (arg1,$3,lhs(parseState)),false }
-
-  | PREFIX_OP  atomicExpr  
-      { let arg2,hpa2 = $2 in 
-        mksyn_prefix (rhs parseState 1) (union_ranges (rhs parseState 1) (range_of_synexpr arg2)) $1 arg2,hpa2 }
-  | atomicExpr DOT atomicExprQualification 
-      { let arg1,hpa1 = $1 in 
-        $3 arg1 (lhs(parseState)) (rhs parseState 2),hpa1 }
-  | BASE DOT atomicExprQualification 
-      { let arg1 = Expr_id_get(ident("base",rhs parseState 1)) in
-        $3 arg1 (lhs(parseState)) (rhs parseState 2),false }
-  | QMARK nameop 
-      { Expr_lid_get (true,[$2],rhs parseState 2),false }
-  | atomicExpr QMARK dynamicArg
-      { let arg1,hpa1 = $1 in
-        mksyn_infix (rhs parseState 2) (lhs(parseState)) arg1 "?" $3, hpa1 }
-  | nameop
-      { Expr_id_get ($1),false }
-  | LBRACK listExprElements RBRACK 
-      { MatchPair parseState 1 3; 
-        $2 (lhs(parseState)) false,false }
-  | LBRACK listExprElements recover 
-      { reportParseErrorAt (rhs parseState 1) "unmatched '['"; 
-        $2 (rhs2 parseState 1 2) false, false }
-  | LBRACK error RBRACK 
-      { MatchPair parseState 1 3; 
-        (* silent recovery *) 
-        Expr_array_or_list(false,[ ], lhs(parseState)),false  } 
-  | atomicExprAfterType 
-      { $1,false }
-
-atomicExprQualification:
-  |    identop 
-      { let idm = rhs parseState 1 in 
-        (fun e lhsm dotm -> mksyn_dot lhsm e $1) }
-  |  recover 
-      { (fun e lhsm dotm -> 
-            reportParseErrorAt dotm "missing qualification after '.'"; 
-            // Include 'e' in the returned expression but throw it away
-            Expr_throwaway(e,lhsm)) }
-  |   INT32 
-      { (fun e lhsm dotm -> 
-            libraryOnlyWarning (lhs(parseState));
-            mksyn_dotn lhsm e (fst $1)) }
-  |   LPAREN COLON_COLON RPAREN DOT INT32  
-      { (fun e lhsm dotm -> 
-            libraryOnlyWarning(lhs(parseState));
-            Expr_constr_field_get (e,mksyn_constr lhsm opname_Cons,(fst $5),lhsm)) }
-  |   LPAREN  typedSeqExpr RPAREN  
-      { MatchPair parseState 1 3; 
-        (fun e lhsm dotm -> 
-            ocamlCompatWarning "The expression form 'expr.(expr)' is for use when OCaml compatibility is enabled. In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array" (lhs(parseState)); 
-            mksyn_dot_lparen_get lhsm e $2) }
-  |   LBRACK  typedSeqExpr RBRACK  
-      { MatchPair parseState 1 3; 
-        (fun e lhsm dotm -> mksyn_dot_lbrack_get lhsm dotm e $2) }
-
-  |   LBRACK  optRange RBRACK  
-      { MatchPair parseState 1 3; 
-        (fun e lhsm dotm -> mksyn_dot_lbrack_slice_get lhsm dotm e $2) }
-  |   LBRACK  optRange COMMA optRange RBRACK  %prec slice_comma
-      { MatchPair parseState 1 5; 
-        (fun e lhsm dotm -> mksyn_dot_lbrack_slice2_get lhsm dotm e $2 $4) }
-  |   LBRACK  optRange COMMA optRange COMMA optRange RBRACK  %prec slice_comma
-      { MatchPair parseState 1 7; 
-        (fun e lhsm dotm -> mksyn_dot_lbrack_slice3_get lhsm dotm e $2 $4 $6) }
-  |   LBRACK  optRange COMMA optRange COMMA optRange COMMA optRange RBRACK  %prec slice_comma
-      { MatchPair parseState 1 9; 
-        (fun e lhsm dotm -> mksyn_dot_lbrack_slice4_get lhsm dotm e $2 $4 $6 $8) }
-
-optRange:
-  | declExpr DOT_DOT declExpr { mk_optional (rhs parseState 1) (Some $1), mk_optional (rhs parseState 3) (Some $3) }
-  | declExpr DOT_DOT { mk_optional (rhs parseState 1) (Some $1), mk_optional (rhs parseState 2) None }
-  | DOT_DOT declExpr { mk_optional (rhs parseState 1) None, mk_optional (rhs parseState 2) (Some $2) }
-  | STAR { mk_optional (rhs parseState 1) None, mk_optional (rhs parseState 1) None }
-  
-
-/* the start et of atomicExprAfterType must not overlap with the valid postfix tokens of the type syntax, e.g. new List(...) */
-atomicExprAfterType:
-  | constant 
-      { Expr_const ($1,range_of_synconst $1 (lhs(parseState))) }
-  | parenExpr 
-      { $1 }
-  | braceExpr 
-      { $1 }
-  | NULL 
-      { Expr_null(lhs(parseState)) } 
-  | FALSE  
-      { Expr_const(Const_bool false,lhs(parseState)) } 
-  | TRUE  
-      { Expr_const(Const_bool true,lhs(parseState)) } 
-  | quoteExpr
-      { $1 }
-  | arrayExpr
-      { $1 }
-  | beginEndExpr
-      { $1 }
-  
-beginEndExpr:
-  | BEGIN typedSeqExpr END 
-      { Expr_paren($2,rhs2 parseState 1 3) } 
-  | BEGIN typedSeqExpr recover 
-      { reportParseErrorAt (rhs parseState 1) "unmatched 'begin'"; $2 } 
-  | BEGIN error END 
-      { (* silent recovery *) arbExpr(parseState)  } 
-  | BEGIN END 
-      { mksyn_unit (lhs(parseState)) } 
-
-quoteExpr:
-  | LQUOTE typedSeqExpr RQUOTE 
-      { MatchPair parseState 1 3; 
-        if $1 <> $3 then reportParseErrorAt (rhs parseState 1) ("mismatched quotation, beginning with '"^ fst $1 ^ "'");  
-        (Expr_quote(mksyn_item (lhs(parseState)) (CompileOpName (fst $1)), snd $1, $2,lhs(parseState))) } 
-  | LQUOTE typedSeqExpr recover 
-      { reportParseErrorAt (rhs parseState 1) ("unmatched '"^fst $1^"'");  
-        // Note: deliberately use this smaller range for the expression: see FSHarp 1.0 bug 3225
-        let mExpr = rhs2 parseState 1 1 in
-        Expr_quote(mksyn_item (lhs(parseState)) (CompileOpName (fst $1)),snd $1, $2,mExpr)  } 
-  | LQUOTE error RQUOTE 
-      { MatchPair parseState 1 3; (* silent recovery *) Expr_quote(mksyn_item (lhs(parseState)) (CompileOpName (fst $1)),snd $1, arbExpr(parseState),lhs(parseState))  }  
-
-arrayExpr:
-  | LBRACK_BAR listExprElements BAR_RBRACK 
-      {  MatchPair parseState 1 3; $2 (lhs(parseState)) true } 
-  | LBRACK_BAR listExprElements recover 
-      { reportParseErrorAt (rhs parseState 1) "unmatched '[|'"; 
-        $2 (rhs2 parseState 1 2) true}
-  | LBRACK_BAR error BAR_RBRACK 
-      {  MatchPair parseState 1 3; (* silent recovery *) Expr_array_or_list(true,[ ], lhs(parseState)) }  
-
-parenExpr:
-  | LPAREN parenExprBody RPAREN 
-      { MatchPair parseState 1 3; $2 (rhs2 parseState 1 3) }
-  | LPAREN parenExprBody recover 
-      { reportParseErrorAt (rhs parseState 1) "unmatched '('"; let lhsm = rhs2 parseState 1 2 in Expr_paren($2 lhsm,lhsm) }
-  | LPAREN error RPAREN 
-      { MatchPair parseState 1 3; (* silent recovery *) arbExpr(parseState) }
-  | LPAREN recover %prec prec_atomexpr_lparen_error 
-      { reportParseErrorAt (rhs parseState 1) "unmatched '('"; arbExpr(parseState)  }  
-
-parenExprBody:
-  |   
-      {  (fun m -> Expr_const(Const_unit,m)) } 
-  | TYPE typ  
-      {  (fun  m -> Expr_typeof($2,m)) }
-  | staticallyKnownHeadTypars COLON LPAREN classMemberSpfn RPAREN  typedSeqExpr 
-      {  MatchPair parseState 3 5;  
-         MatchPair parseState 6 8; 
-         (fun m -> Expr_trait_call($1,$4,$6,m)) } /* disambiguate: x $a.id(x) */
-  | typedSeqExpr
-      { (fun m -> Expr_paren($1,m)) } 
-  | inlineAssemblyExpr 
-      { $1 }
-
-staticallyKnownHeadTypars:
-  | staticallyKnownHeadTypar { [$1] }
-  | LPAREN staticallyKnownHeadTypar OR staticallyKnownHeadTypar RPAREN { [$2 ; $4 ] }
-
-braceExpr:
-  | LBRACE braceExprBody RBRACE 
-     {  MatchPair parseState 1 3; $2 (lhs(parseState)) }
-  | LBRACE braceExprBody recover 
-     { reportParseErrorAt (rhs parseState 1) "unmatched '{'" ; $2 (lhs(parseState)) }  
-  | LBRACE error RBRACE 
-     { MatchPair parseState 1 3; (* silent recovery *) arbExpr(parseState)  }  
-
-braceExprBody:
-  | recdExpr 
-     {  (fun m -> let a,b,c = $1 in Expr_recd(a,b,c,m)) }
-  | objExpr 
-     { $1 }
-  | monadicExprInitial 
-     { $1 false }
-
-listExprElements: 
-  | monadicExprInitial
-     { (fun lhsm isArray -> Expr_array_or_list_of_seq(isArray, $1 true lhsm,lhsm)) }
-  | 
-     { (fun lhsm isArray -> Expr_array_or_list(isArray,[ ], lhsm)) }
-
-monadicExprInitial: 
-  | seqExpr
-     { (fun isArrayOrList lhsm -> Expr_comprehension(isArrayOrList,ref(isArrayOrList),$1,lhsm)) }
-  | rangeSequenceExpr 
-     { $1 }
-  
-rangeSequenceExpr: 
-  | declExpr TO       declExpr  %prec expr_let
-     { deprecatedWithError "use 'expr .. expr' instead" (lhs(parseState)); (fun _ m -> mksyn_infix m m $1 ".." $3) }
-  | declExpr DOT_DOT  declExpr  
-     { (fun _ m -> mksyn_infix m m $1 ".." $3) }
-  | declExpr DOT_DOT  declExpr DOT_DOT declExpr  
-     { (fun _ m -> mksyn_trifix m ".. .." $1 $3 $5) }
-
-
-/* Allow a naked yield (no "yield" or "return" or "->") immediately after a "->" */
-/* Allow a naked yield (no "yield!" or "return!" or "->>") immediately after a "->>" */
-/* In both cases multiple 'for' and 'when' bindings can precede */
-monadicSingleLineQualifiersThenArrowThenExprR:
-  | RARROW typedSeqExprBlockR 
-     { (fun m -> Comp_yield((true,false),$2,m)) } 
-  | RARROW2 typedSeqExprBlockR 
-     { let mAll = union_ranges (rhs parseState 1) (range_of_synexpr $2) in
-       deprecatedWithError "The expression form '->>' in sequence expressions has been removed from the F# language. Use the syntax 'yield! ...' to generate multiple elements in sequence expressions" mAll;
-       (fun m -> Comp_yieldm((true,false),$2,m)) } 
-
-  | FOR forLoopBinder opt_OBLOCKSEP monadicSingleLineQualifiersThenArrowThenExprR %prec decl_let 
-     { deprecatedWithError "Nested 'for' loops in sequence expressions should be written 'for x in  do for y in  do ...yield " (rhs2 parseState 1 2);
-       let spBind = SequencePointAtForLoop(rhs2 parseState 1 2) in
-       let a2,b2= $2 in 
-       (fun m -> 
-           Expr_foreach(spBind,SeqExprOnly(true),a2,b2,$4 m,m)) } 
-
-  | monadicWhenCondition opt_OBLOCKSEP monadicSingleLineQualifiersThenArrowThenExprR %prec decl_let 
-     { let mWhenAndGuard = range_of_synexpr $1 in
-       deprecatedWithError "'when' conditions in sequence expressions have been removed from the F# language. Use 'for x in  do if  then ...yield " mWhenAndGuard;
-       let spWhenAndGuard = SequencePointAtBinding(mWhenAndGuard) in
-       (fun m -> 
-           Expr_cond($1,$3 m,None,spWhenAndGuard,mWhenAndGuard,m)) } 
-
-
-forLoopBinder: 
-  | parenPattern IN declExpr 
-     { ($1, $3) }
-  | parenPattern IN rangeSequenceExpr 
-     { ($1, $3 false (rhs parseState 3)) }
-  | parenPattern IN recover
-     { ($1, arbExpr(parseState)) }
-
-forLoopRange: 
-  | parenPattern EQUALS declExpr  direction  declExpr { id_of_pat (rhs parseState 1) $1,$3,$4,$5 }
-
-inlineAssemblyExpr:
-  |  HASH STRING opt_inlineAssemblyTypeArg opt_curriedArgExprs  opt_inlineAssemblyReturnTypes opt_HASH 
-      { libraryOnlyWarning (lhs(parseState));
-        let s,sm = $2,rhs parseState 2 in
-        (fun m -> Expr_asm (ParseAssemblyCodeInstructions s sm,$3,List.rev $4,$5,m)) }
-  
-opt_curriedArgExprs: 
-  | opt_curriedArgExprs argExpr  %prec expr_args { $2 :: $1 } 
-  |  { [] }
-
-opt_atomicExprAfterType: 
-  |  { None }
-  |  atomicExprAfterType { Some($1) }
-
-opt_inlineAssemblyTypeArg:
-  |  { [] }
-  | TYPE LPAREN typ RPAREN  {  MatchPair parseState 2 4; [$3] }
-
-opt_inlineAssemblyReturnTypes:
-  |  
-     { [] }
-  | COLON typ 
-     { [$2] }
-  | COLON LPAREN RPAREN  
-     {  MatchPair parseState 2 3; [] }
-
-recdExpr:
-  | 
-     { (None,None, []) }
-  | INHERIT appType opt_HIGH_PRECEDENCE_APP opt_atomicExprAfterType recdExprBindings opt_seps
-     { let arg = match $4 with None -> mksyn_unit (lhs(parseState)) | Some e -> e in 
-       (Some($2,arg,rhs2 parseState 2 4),None, $5) }
-/* REVIEW: we shouldn't really be permitting appExpr here if we want to minimize the number of "entries" into the expression */
-/* syntax. OCaml only permits atomicExpr here */
-  | appExpr EQUALS declExpr recdExprBindings opt_seps
-     { match $1 with 
-       | Expr_lid_or_id_get(false,v,m) -> (None,None, (List.frontAndBack v,$3) :: List.rev $4) 
-       | _ -> raiseParseErrorAt (rhs parseState 2) "field bindings must have the form 'id = expr;'" }
-  | appExpr WITH path EQUALS  declExpr recdExprBindings  opt_seps
-     {  (None,Some $1,(List.frontAndBack $3,$5):: List.rev $6) }
-  | appExpr OWITH path EQUALS  declExpr recdExprBindings  opt_seps OEND
-     {  (None,Some $1,(List.frontAndBack $3,$5):: List.rev $6) }
-
-recdExprBindings: 
-  | recdExprBindings seps path EQUALS declExpr { (List.frontAndBack $3,$5) :: $1 } 
-  |                                            { [] }
-
-/* There is a minor conflict between
-       seq { new ty() }  // sequence expression with one very odd 'action' expression
-  and 
-       { new ty() }   // object expression with no interfaces and no overrides
-Hence we make sure the latter is not permitted by the grammar
-*/
-objExpr:
-  | objExprBaseCall objExprBindings opt_OBLOCKSEP opt_objExprInterfaces
-     { (fun m -> let (a,b) = $1 in Expr_impl(a,b,$2,$4, m)) }
-  | objExprBaseCall opt_OBLOCKSEP objExprInterfaces
-     { (fun m -> let (a,b) = $1 in Expr_impl(a,b,[],$3, m)) }
-  | NEW appType
-     { (fun m -> let (a,b) = $2,None in Expr_impl(a,b,[],[], m)) }
-
-objExprBaseCall:
-  | NEW appType  opt_HIGH_PRECEDENCE_APP atomicExprAfterType baseSpec
-     { ($2, Some($4,Some($5))) }
-  | NEW appType  opt_HIGH_PRECEDENCE_APP atomicExprAfterType 
-     { ($2, Some($4,None)) }
-  | NEW appType
-     { $2,None }
- 
-
-
-opt_objExprBindings: 
-  | objExprBindings { $1 }
-  |                 { [] }
-
-objExprBindings: 
-  | WITH localBindings 
-      { let letm = (rhs parseState 1) in
-        ($2 [] None letm) }
-  | OWITH localBindings OEND
-      { let letm = (rhs parseState 1) in
-        ($2 [] None letm) }
-  | WITH objectImplementationBlock opt_decl_end
-      { $2 |> 
-        (List.choose (function ClassMemberDefn_member_binding(b,m) -> Some b
-                          | ClassMemberDefn_implicit_inherit (_, _, _, m)
-                          | ClassMemberDefn_implicit_ctor (_,_,_, _, m)
-                          | ClassMemberDefn_let_bindings(_,_,_,m)                    
-                          | ClassMemberDefn_slotsig(_,_,m) 
-                          | ClassMemberDefn_interface(_,_,m) 
-                          | ClassMemberDefn_inherit(_,_,m)
-                          | ClassMemberDefn_field(_,m)
-                          | ClassMemberDefn_open(_,m)
-                          | ClassMemberDefn_tycon(_,_,m) -> errorR(Error("This member is not permitted in an object implementation",m)); None)) }
-
-objExprInterfaces:
-  | objExprInterface opt_objExprInterfaces { $1 :: $2 }
-
-opt_objExprInterfaces:
-  | %prec prec_interfaces_prefix { [] }
-  | objExprInterface opt_objExprInterfaces { $1 :: $2 }
-  | error opt_objExprInterfaces { (* silent recovery *) $2 }
-
-objExprInterface:
-  |  interfaceMember appType opt_objExprBindings opt_decl_end opt_OBLOCKSEP
-    { InterfaceImpl($2, $3, lhs(parseState)) }
-
-direction: 
-  | TO     { true } 
-  | DOWNTO { false }
-
-
-anonLambdaExpr: 
-  | FUN atomicPatterns RARROW typedSeqExprBlock 
-     { let mAll = union_ranges (rhs parseState 1) (range_of_synexpr $4) in
-       mksyn_fun_match_lambdas false mAll $2 $4 }
-  | FUN atomicPatterns RARROW error
-     { let mAll = rhs2 parseState 1 3 in
-       mksyn_fun_match_lambdas false mAll $2 (arbExpr(parseState)) }
-  | OFUN atomicPatterns RARROW typedSeqExprBlockR OEND
-     { let mAll = union_ranges (rhs parseState 1) (range_of_synexpr $4) in
-       mksyn_fun_match_lambdas false mAll $2 $4 }
-  | OFUN atomicPatterns RARROW ORIGHT_BLOCK_END OEND
-     { reportParseErrorAt (rhs2 parseState 1 3) "missing function body" ;
-       mksyn_fun_match_lambdas false (rhs2 parseState 1 3) $2 (arbExpr(parseState)) }
-
-  | OFUN atomicPatterns RARROW recover
-     { reportParseErrorAt (rhs2 parseState 1 3) "missing function body" ;
-       mksyn_fun_match_lambdas false (rhs2 parseState 1 3) $2 (arbExpr(parseState)) }
-
-anonMatchingExpr: 
-  | FUNCTION opt_bar patternClauses  %prec expr_function
-      { let clauses,mLast = $3 in
-        let mAll = union_ranges (rhs parseState 1) mLast in
-        mksyn_match_lambda(false,false,mAll,clauses,NoSequencePointAtInvisibleBinding) }
-  | OFUNCTION opt_bar patternClauses  OEND %prec expr_function
-      { let clauses,mLast = $3 in
-        let mAll = union_ranges (rhs parseState 1) mLast in
-        mksyn_match_lambda(false,false,mAll,clauses,NoSequencePointAtInvisibleBinding) }
-  | OFUNCTION opt_bar patternClauses  error OEND %prec expr_function
-      { reportParseErrorAt (rhs parseState 1) "error in 'function' block"; 
-        let clauses,mLast = $3 in
-        let mAll = union_ranges (rhs parseState 1) mLast in
-        mksyn_match_lambda(false,false,mAll,clauses,NoSequencePointAtInvisibleBinding) }
-
-/*--------------------------------------------------------------------------*/
-/* TYPE ALGEBRA                                                             */
-
-typeWithTypeConstraints:
-  | typ %prec prec_wheretyp_prefix { $1 }
-  | typ WHEN typeConstraints 
-     { Type_with_global_constraints($1, List.rev $3,lhs(parseState)) }
-
-topTypeWithTypeConstraints: 
-  | topType 
-     { $1 }
-  | topType WHEN typeConstraints 
-     { let ty,arity = $1 in 
-        (* nb. it doesn't matter where the constraints go in the structure of the type. *)
-        Type_with_global_constraints(ty,List.rev $3,lhs(parseState)), arity }
-
-opt_topReturnTypeWithTypeConstraints: 
-  |             
-     { None } 
-  | COLON topTypeWithTypeConstraints 
-     { let ty,arity = $2 in 
-       let arity = (match arity with ValSynInfo([],rmdata)-> rmdata | _ -> SynInfo.unnamedRetVal) in
-       Some ((ty,arity),rhs parseState 2) }
-
-topType: 
-  | topTupleType RARROW topType 
-     { let dty,dmdata= $1 in 
-       let rty,(ValSynInfo(dmdatas,rmdata)) = $3 in 
-       Type_fun(dty,rty,lhs(parseState)), (ValSynInfo(dmdata::dmdatas, rmdata)) }
-  | topTupleType 
-     { let ty,rmdata = $1 in ty, (ValSynInfo([],(match rmdata with [md] -> md | _ -> SynInfo.unnamedRetVal))) }
-
-topTupleType:
-  | topAppType STAR topTupleTypeElements 
-     { let ty,mdata = $1 in let tys,mdatas = List.unzip $3 in (Type_tuple(List.map (fun ty -> (false,ty)) (ty ::tys), lhs(parseState))),(mdata :: mdatas) }
-  | topAppType                 
-     { let ty,mdata = $1 in ty,[mdata] }
-
-topTupleTypeElements:
-  | topAppType STAR topTupleTypeElements       { $1 :: $3 }
-  | topAppType %prec prec_toptuptyptail_prefix { [$1] }
-
-/* REVIEW: why can't we use opt_attributes here? */
-topAppType:
-  | attributes appType COLON appType 
-     { match $2 with 
-       | Type_lid([id],_) -> $4,ArgSynInfo($1,false,Some id)
-       | _ -> raiseParseErrorAt (rhs parseState 2) "syntax error in labelled type argument"  }
-  | attributes QMARK ident COLON appType 
-     { $5,ArgSynInfo($1,true,Some $3) }
-  | attributes appType 
-     { ($2,ArgSynInfo($1,false,None)) }
-  | appType COLON appType 
-     { match $1 with 
-       | Type_lid([id],_) -> $3,ArgSynInfo([],false,Some id)
-       | _ -> raiseParseErrorAt (rhs parseState 2) "syntax error in labelled type argument"  }
-  | QMARK ident COLON appType 
-     { $4,ArgSynInfo([],true,Some $2) }
-  | appType 
-     { $1,ArgSynInfo([],false,None) }
-
-polyType: 
-  | typar DOT typ 
-      { deprecatedWithError "OCaml-style polymorphic record fields are deprecated and will be removed in a future release of the language. Consider using an interface type with a generic method instead" (lhs(parseState));
-        Type_forall(TyparDecl([],$1),$3,lhs(parseState)) }
-  | typ { $1 }
-
-typ:
-  | tupleType RARROW typ  { Type_fun($1,$3,lhs(parseState)) }
-  | tupleType %prec prec_typ_prefix { $1 }
-
-
-tupleType:
-  | appType STAR tupleOrQuotTypeElements { Type_tuple((false,$1) :: $3,lhs(parseState)) }
-
-  | INFIX_STAR_DIV_MOD_OP tupleOrQuotTypeElements
-    { if $1 <> "/" then reportParseErrorAt (rhs parseState 1) "Unexpected infix operator in type expression";
-      Type_tuple((true, Type_dimensionless (lhs(parseState))):: $2, lhs(parseState)) }
-
-  | appType INFIX_STAR_DIV_MOD_OP tupleOrQuotTypeElements
-      { if $2 <> "/" then reportParseErrorAt (rhs parseState 1) "Unexpected infix operator in type expression";
-        Type_tuple((true,$1) :: $3, lhs(parseState)) }
-  | appType %prec prec_tuptyp_prefix { $1 }
-
-tupleOrQuotTypeElements:
-  | appType STAR tupleOrQuotTypeElements              { (false,$1) :: $3 }
-  | appType INFIX_STAR_DIV_MOD_OP tupleOrQuotTypeElements 
-      { if $2 <> "/" then reportParseErrorAt (rhs parseState 1) "Unexpected infix operator in type expression";
-        (true,$1) :: $3 }
-  | appType %prec prec_tuptyptail_prefix { [(false,$1)] }
-
-tupleTypeElements:
-  | appType STAR tupleTypeElements              { $1 :: $3 }
-  | appType %prec prec_tuptyptail_prefix { [$1] }
-
-appTypeCon:
-  | path %prec prec_atomtyp_path 
-      { Type_lid($1, lhs(parseState)) }
-
-  | typar 
-     { Type_var($1, lhs(parseState)) }
-
-appTypeConPower:
-  | appTypeCon INFIX_AT_HAT_OP INT32
-     { if $2 = "^-" then Type_power($1, -(fst $3), lhs(parseState))
-       else Type_power($1, fst $3, lhs(parseState)) }
-  | appTypeCon 
-    { $1 }
-
-appType:
-  | appType arrayTypeSuffix 
-      {  Type_arr($2,$1,lhs(parseState)) }
-  | appType HIGH_PRECEDENCE_APP arrayTypeSuffix 
-      {  Type_arr($3,$1,lhs(parseState)) }
-  | appType appTypeConPower  
-      { Type_app($2,[$1],true,lhs(parseState)) }
-  | appType LAZY  
-      { deprecatedWithError "The use of 'typ lazy' as a type is deprecated. Use 'Lazy' instead" (rhs parseState 2);
-        Type_lazy($1,lhs(parseState)) }
-  | LPAREN appTypePrexifArguments RPAREN  appTypeConPower
-      { ocamlCompatWarning "The syntax '(typ,...,typ) ident' for multi-argument generic type instantiations is only recommended if OCaml compatibility is enabled. Consider using 'ident' instead" (lhs(parseState)); 
-        MatchPair parseState 1 3; 
-        Type_app($4,$2, true, lhs(parseState)) }
-  | powerType 
-      { $1 }
-  | typar      COLON_GREATER typ                     
-      {  let tp,typ = $1,$3 in 
-         let m = lhs(parseState) in 
-         Type_with_global_constraints(Type_var (tp, rhs parseState 1), [WhereTyparSubtypeOfType(tp,typ,m)],m)  }
-  | UNDERSCORE COLON_GREATER typ %prec COLON_GREATER 
-      {  MatchPair parseState 1 3; mksyn_anon_constraint $3 (lhs(parseState)) }
-
-arrayTypeSuffix:
-  | LBRACK RBRACK 
-      {  MatchPair parseState 1 2; 1 }
-  | LBRACK COMMA RBRACK 
-      {  MatchPair parseState 1 3; 2 }
-  | LBRACK COMMA COMMA RBRACK 
-      {  MatchPair parseState 1 4; 3 }
-  | LBRACK COMMA COMMA COMMA RBRACK 
-      {  MatchPair parseState 1 5; 4 }
-
-appTypePrexifArguments:
-  | typ COMMA typ typeListElements { $1 :: $3 :: List.rev $4 }
-
-typeListElements: 
-  | typeListElements COMMA typ { $3 :: $1 } 
-  |                      { [] }
-
-powerType:
-  | atomType
-    { $1 }
-  | atomType INFIX_AT_HAT_OP INT32
-     { if $2 <> "^" && $2 <> "^-" then reportParseErrorAt (rhs parseState 2) "Unexpected infix operator in type expression";
-       if $2 = "^-" then Type_power($1, - (fst $3), lhs(parseState))
-       else Type_power($1, fst $3, lhs(parseState)) }
-  | atomType INFIX_AT_HAT_OP MINUS INT32
-     { if $2 <> "^" then reportParseErrorAt (rhs parseState 2) "Unexpected infix operator in type expression";
-       Type_power($1, - (fst $4), lhs(parseState)) }
-
-atomType:
-  | HASH atomType 
-     { mksyn_anon_constraint $2 (lhs(parseState)) }
-  | appTypeConPower %prec prec_atomtyp_path 
-     { $1 }
-  | UNDERSCORE 
-     { Type_anon (lhs(parseState)) }
-  | LPAREN typ RPAREN 
-     {  MatchPair parseState 1 3; $2 }
-  | LPAREN typ recover      
-     { reportParseErrorAt (rhs parseState 1) "unmatched '('" ; $2 }  
-  | INT32
-      { if fst $1 <> 1 then reportParseErrorAt (rhs parseState 1) "Unexpected integer literal in type expression";
-        Type_dimensionless (lhs(parseState))
-      }
-  | LPAREN error RPAREN   
-     { (* silent recovery *) Type_anon (lhs(parseState)) }  
-  | appTypeCon typeArgs %prec prec_atomtyp_path 
-     { Type_app($1,$2,false,lhs(parseState)) } 
-  | atomType DOT path %prec prec_atomtyp_get_path 
-     { Type_proj_then_app($1,$3,[],lhs(parseState)) } 
-  | atomType DOT path typeArgs %prec prec_atomtyp_get_path 
-     { Type_proj_then_app($1,$3,$4,lhs(parseState)) } 
-
-
-typeArgs:
-  | typeArgsActual
-     { $1 } 
-  | HIGH_PRECEDENCE_TYAPP typeArgsActual 
-     { $2 } 
-
-typeArgsActual:
-  | LESS GREATER 
-     { [] } 
-  | LESS typ GREATER 
-     { [$2] } 
-  | LESS typ COMMA typ typeListElements GREATER 
-     { $2 :: $4 :: List.rev $5 } 
-
-measurearg:
-  | LESS measure GREATER
-     { $2 }
-  | LESS UNDERSCORE GREATER
-     { Measure_Anon (lhs(parseState)) }
-
-measureatom:
-  | path 
-     { Measure_Con($1, lhs(parseState)) }
-
-  | typar 
-     { Measure_Var($1, lhs(parseState)) }
-
-  | LPAREN measure RPAREN
-     { $2 }
-
-measurepower:
-  | measureatom 
-      { $1 }
-
-  | measureatom INFIX_AT_HAT_OP INT32
-     { if $2 <> "^" && $2 <> "^-" then reportParseErrorAt (rhs parseState 2) "Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'";
-       if $2 = "^-" then Measure_Power($1, - (fst $3), lhs(parseState))
-       else Measure_Power($1, fst $3, lhs(parseState)) }
-
-  | measureatom INFIX_AT_HAT_OP MINUS INT32
-     { if $2 <> "^" then reportParseErrorAt (rhs parseState 2) "Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'";
-       Measure_Power($1, - (fst $4), lhs(parseState)) }
-
-  | INT32
-     { if fst $1 <> 1 then reportParseErrorAt (rhs parseState 1) "Unexpected integer literal in unit-of-measure expression";
-       Measure_One }
-
-measureseq:
-  | measurepower
-    { [$1] }
-  | measurepower measureseq
-    { $1 :: $2 }
-
-measure:
-  | measureseq
-    { Measure_Seq($1, lhs(parseState)) }
-  | measure STAR measure
-    { Measure_Prod($1, $3, lhs(parseState)) }
-  | measure INFIX_STAR_DIV_MOD_OP measure
-    { if $2 <> "*" && $2 <> "/" then reportParseErrorAt (rhs parseState 2) "Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'";
-      if $2 = "*" then Measure_Prod($1, $3, lhs(parseState))
-      else Measure_Quot($1, $3, lhs(parseState)) }
-  | INFIX_STAR_DIV_MOD_OP measure
-     { if $1 <> "/" then reportParseErrorAt (rhs parseState 1) "Unexpected operator in unit-of-measure expression. Legal operators are '*', '/' and '^'";
-       Measure_Quot(Measure_One, $2, lhs(parseState)) }
-   
-typar: 
-  | QUOTE ident 
-     {  let id = mksyn_id (lhs(parseState)) ($2).idText in
-        Typar(id ,NoStaticReq,false) }
-/*
-  | DOLLAR ident 
-     {  libraryOnlyWarning (lhs(parseState)); 
-        let id = mksyn_id (lhs(parseState)) ($2).idText in
-        Typar(id,CompleteStaticReq,false) }
-*/
-  | staticallyKnownHeadTypar 
-     { $1 }
-
-staticallyKnownHeadTypar: 
-  | INFIX_AT_HAT_OP ident 
-    {  if $1 <> "^" then reportParseErrorAt (rhs parseState 1) "syntax error: unexpeced type paramter specification";
-       Typar($2,HeadTypeStaticReq,false) }
-
-  
-
-ident: 
-  | IDENT 
-     { ident($1,rhs parseState 1) } 
-
-path: 
-  | ident  
-     { [$1] }
-  | path DOT ident  
-     { (* silent recovery *) $1 @ [$3] } 
-  | path DOT error  
-     { (* silent recovery *) $1  } 
-
-opname: 
-  | LPAREN operatorName RPAREN  
-     {  MatchPair parseState 1 3; 
-        ident(CompileOpName $2,rhs parseState 2) }
-  | LPAREN_STAR_RPAREN
-     {  MatchPair parseState 1 1; 
-        ident(CompileOpName "*",rhs parseState 1) }
-
-/* active pattern value names */
-  | LPAREN barNames BAR RPAREN 
-     { let text = ("|"^String.concat "|" (List.rev $2) ^ "|") in
-       ident(text,rhs2 parseState 2 3) }
-                         
-  | LPAREN barNames BAR UNDERSCORE BAR RPAREN 
-     { let text = ("|"^String.concat "|" (List.rev $2) ^ "|_|" ) in
-       ident(text,rhs2 parseState 2 5) }
-
-operatorName: 
-  | PREFIX_OP { $1 }
-  | INFIX_STAR_STAR_OP  { $1 }
-  | INFIX_COMPARE_OP { $1 }
-  | INFIX_AT_HAT_OP  { $1 }
-  | INFIX_BAR_OP  { $1 }
-  | INFIX_AMP_OP { $1 }
-  | PLUS_MINUS_OP  { $1 }
-  | INFIX_STAR_DIV_MOD_OP { $1 }
-  | DOLLAR { "$" }
-  | ADJACENT_PREFIX_PLUS_MINUS_OP { $1 }
-  | MINUS { "-" }
-  | STAR { "*" }
-  | EQUALS { "=" }
-  | OR { "or" }
-  | LESS { "<" }
-  | GREATER { ">" }
-  | QMARK { "?" }
-  | AMP { "&" }
-  | AMP_AMP { "&&" }
-  | BAR_BAR { "||" }
-  | COLON_EQUALS { ":=" }
-  | FUNKY_OPERATOR_NAME 
-      { if $1 <> ".[]" then 
-             deprecatedOperator (lhs(parseState)); 
-        $1 }
-  | SPLICE_SYMBOL { $1 }
-  | PERCENT_OP { $1 }
-  | DOT_DOT { (* deprecatedOperator (lhs(parseState)); *) ".." }
-  | DOT_DOT DOT_DOT { (* deprecatedOperator (lhs(parseState)); *) ".. .." }
-  | LQUOTE RQUOTE 
-      { if $1 <> $2 then reportParseErrorAt (rhs parseState 1) ("mismatched quotation operator name, beginning with '"^fst $1^"'");  
-        fst $1 } 
-
-barName: 
-  | IDENT 
-      { if not (String.isUpper $1) then reportParseErrorAt (rhs parseState 1) ("active pattern case identifiers must begin with an uppercase letter");  
-        $1 }
-
-barNames: 
-  | BAR barName
-      { [$2] }
-  | barNames BAR barName
-      { $3 :: $1 }
-
-identop: 
-  | ident  
-     { $1 } 
-  | opname 
-     { $1 }
-
-/* path ending in an op */
-pathop: 
-  | ident  
-     { [$1] }
-  | opname 
-     { [$1] }
-  | ident DOT pathop 
-     { $1 :: $3 } 
-  | ident DOT error  
-     { (* silent recovery *) [$1] }  
-
-
-/* nameop is identop not used as part of a path */
-nameop: 
-  | identop  { $1 } 
-
-top_sep: 
-  | SEMICOLON { } 
-  | SEMICOLON_SEMICOLON { }
-  | OBLOCKSEP { }  
-
-top_seps: 
-  | top_sep                     { } 
-  | top_sep top_seps { }
-
-itop_sep: 
-  | SEMICOLON { } 
-  | OBLOCKSEP { }  
-
-itop_seps: 
-  | itop_sep                     { } 
-  | itop_sep itop_seps { }
-
-opt_itop_seps: 
-  | itop_sep opt_itop_seps { }
-  |                        { } 
-
-opt_top_seps: 
-  | top_sep opt_top_seps { }
-  |                      { } 
-
-seps: 
-  | OBLOCKSEP { } 
-  | SEMICOLON { }
-  | OBLOCKSEP SEMICOLON { }
-  | SEMICOLON OBLOCKSEP { }
-
-/* An 'end' that's optional only in #light, where an ODECLEND gets inserted, and explicit 'end's get converted to OEND */
-decl_end: 
-  | ODECLEND 
-      { } 
-  | OEND 
-      { (* reportParseWarningAt (rhs parseState 2) "this 'end' token is not needed in #light syntax and should  be omitted. A future release of the language may require this";  *)  }
-  | END 
-      {} 
-
-/* An 'end' that's optional in both #light and #heavy */
-opt_decl_end: 
-  | ODECLEND 
-      {} 
-  | OEND 
-      { (* reportParseWarningAt (rhs parseState 2) "this 'end' token is not needed in #light syntax and should be omitted. A future release of the language may require this";   *)  } 
-  | END 
-      {} 
-  |     
-      {} 
-
-opt_ODECLEND: 
-  | ODECLEND { } 
-  |          { }
-
-deprecated_opt_equals: 
-  | EQUALS    { deprecatedWithError "No '=' symbol should follow a 'namespace' declaration" (lhs(parseState)) } 
-  |           {  }
-
-opt_OBLOCKSEP: 
-  | OBLOCKSEP { }
-  |          { } 
-
-opt_seps: 
-  | seps { }
-  |      { } 
-
-opt_rec: 
-  | REC { true }
-  |     { false } 
-
-opt_bar: 
-  | BAR { } 
-  |     { } 
-
-opt_inline: 
-  | INLINE { true } 
-  |        { false }
-
-opt_mutable: 
-  | MUTABLE { true } 
-  |         { false }
-
-do_or_odo: 
-  | DO  { }
-  | ODO { }
-
-done_term: 
-  | DONE { }
-  | ODECLEND { }  /* DONE gets thrown away by the lexfilter in favour of ODECLEND */
-
-structOrBegin: 
-  | STRUCT { ocamlCompatWarning "The syntax 'module ... = struct .. end' is deprecated unless OCaml compatibility is enabled. Consider using 'module ... = begin .. end'" (lhs(parseState)); }
-  | BEGIN { } 
-
-sigOrBegin: 
-  | SIG { ocamlCompatWarning "The syntax 'module ... : sig .. end' is deprecated unless OCaml compatibility is enabled. Consider using 'module ... = begin .. end'" (lhs(parseState)); }
-  | BEGIN { } 
-
-colonOrEquals: 
-  | COLON { ocamlCompatWarning "The syntax 'module ... : sig .. end' is deprecated unless OCaml compatibility is enabled. Consider using 'module ... = begin .. end'" (lhs(parseState)); }
-  | EQUALS { } 
-
-opt_HASH: 
-  | HASH {} 
-
-opt_HIGH_PRECEDENCE_APP:
-  | HIGH_PRECEDENCE_APP { }
-  |    { }
-
-opt_HIGH_PRECEDENCE_TYAPP:
-  | HIGH_PRECEDENCE_TYAPP { }
-  |    { }
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/patcompile.ml b/tools/FSharp_1.9.6.16/source/fsharp/patcompile.ml
deleted file mode 100644
index f2f3c25c..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/patcompile.ml
+++ /dev/null
@@ -1,1164 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-#light
-
-module (* internal *) Microsoft.FSharp.Compiler.Patcompile
-
-open System.Collections.Generic
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics 
-
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.PrettyNaming
-open Microsoft.FSharp.Compiler.Typrelns
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.Lib
-
-exception MatchIncomplete of bool * (string * bool) option * range
-exception RuleNeverMatched of range
-
-type ActionOnFailure = 
-  | Incomplete 
-  | Throw 
-  | Rethrow 
-  | FailFilter
-
-[]
-type pat =
-  | TPat_const of Constant * range
-  | TPat_wild of range  (* note = TPat_disjs([],m), but we haven't yet removed that duplication *)
-  | TPat_as of  pat * pbind * range (* note: can be replaced by TPat_var, i.e. equals TPat_conjs([TPat_var; pat]) *)
-  | TPat_disjs of  pat list * range
-  | TPat_conjs of  pat list * range
-  | TPat_query of (expr * typ list * ValRef option * int * ActivePatternInfo) * pat * range
-  | TPat_unioncase of UnionCaseRef * tinst * pat list * range
-  | TPat_exnconstr of TyconRef * pat list * range
-  | TPat_tuple of  pat list * typ list * range
-  | TPat_array of  pat list * typ * range
-  | TPat_recd of TyconRef * tinst * (tinst * pat) list * range
-  | TPat_range of char * char * range
-  | TPat_null of range
-  | TPat_isinst of typ * typ * pbind option * range
-and pbind = PBind of Val * TypeScheme
-
-and tclause =  TClause of pat * expr option * DecisionTreeTarget * range
-
-let debug = false
-
-(*---------------------------------------------------------------------------
- * Nasty stuff to permit obscure polymorphic bindings.
- *
- * [bind_subexpr] actually produces the binding
- * e.g. let v2 = \Gamma ['a,'b]. ([] : 'a ,[] : 'b)
- *      let (x,y) = p.  
- * When v = x, gtvs = 'a,'b.  We must bind:
- *     x --> \Gamma A. fst (v2[A,]) 
- *     y --> \Gamma A. snd (v2[,A]).  
- * 
- * [GetSubExprOfInput] is just used to get a concrete value from a type
- * function in the middle of the "test" part of pattern matching.
- * For example, e.g.  let [x; y] = [ (\x.x); (\x.x) ] 
- * Here the constructor test needs a real list, even though the
- * r.h.s. is actually a polymorphic type function.  To do the
- * test, we apply the r.h.s. to a dummy type - it doesn't matter
- * which (unless the r.h.s. actually looks at it's type argument...)
- *------------------------------------------------------------------------- *)
-
-type SubExprOfInput = SubExpr of (TyparInst -> expr -> expr) * (expr * Val)
-
-let bind_subexpr g amap gtps (PBind(v,tyscheme)) m (SubExpr(accessf,(ve2,v2))) =
-    let e' = 
-        if isNil gtps then accessf [] ve2 else 
-        let freeze_var gtp = 
-             if is_being_generalized gtp tyscheme then mk_typar_ty gtp 
-             else Typrelns.choose_typar_solution g amap gtp
-             
-        let tyargs = List.map freeze_var gtps
-        let tinst = mk_typar_inst gtps tyargs
-        accessf tinst (mk_appl g ((ve2,v2.Type),[tyargs],[],v2.Range))
-    v,mk_poly_bind_rhs m tyscheme e'
-
-let GetSubExprOfInput g (gtps,tyargs,tinst) (SubExpr(accessf,(ve2,v2))) =
-    if isNil gtps then accessf [] ve2 else
-    accessf tinst (mk_appl g ((ve2,v2.Type),[tyargs],[],v2.Range))
-
-(*---------------------------------------------------------------------------
- * path, frontier
- *------------------------------------------------------------------------- *)
-
-// A path reaches into a pattern.
-// The ints record which choices taken, e.g. tuple/record fields.
-// [it may be enough that subpatterns have unique paths].
-type path = 
-    | PathQuery of path * uniq
-    | PathConj of path * int
-    | PathTuple of path * tinst * int
-    | PathRecd of path * TyconRef * tinst * tinst  * int
-    | PathUnionConstr of path * UnionCaseRef * tinst * int
-    | PathArray of path * typ * int * int
-    | PathExnConstr of path * TyconRef * int
-    | PathEmpty of typ 
-
-let rec path_eq p1 p2 = 
-    match p1,p2 with
-    | PathQuery(p1,n1), PathQuery(p2,n2) -> (n1 = n2) && path_eq p1 p2
-    | PathConj(p1,n1), PathConj(p2,n2) -> (n1 = n2) && path_eq p1 p2
-    | PathTuple(p1,_,n1), PathTuple(p2,_,n2) -> (n1 = n2) && path_eq p1 p2
-    | PathRecd(p1,_,_,_,n1), PathRecd(p2,_,_,_,n2) -> (n1 = n2) && path_eq p1 p2
-    | PathUnionConstr(p1,_,_,n1), PathUnionConstr(p2,_,_,n2) -> (n1 = n2) && path_eq p1 p2
-    | PathArray(p1,_,_,n1), PathArray(p2,_,_,n2) -> (n1 = n2) && path_eq p1 p2
-    | PathExnConstr(p1,_,n1), PathExnConstr(p2,_,n2) -> (n1 = n2) && path_eq p1 p2
-    | PathEmpty(_), PathEmpty(_) -> true
-    | _ -> false
-
-
-(*---------------------------------------------------------------------------
- * Counter example generation 
- *------------------------------------------------------------------------- *)
-
-type refutedSet = 
-    /// A value RefutedInvestigation(path,discrim) indicates that the value at the given path is known 
-    /// to NOT be matched by the given discriminator
-    | RefutedInvestigation of path * DecisionTreeDiscriminator list
-    /// A value RefutedWhenClause indicates that a 'when' clause failed
-    | RefutedWhenClause
-
-let notNullText = "some-non-null-value"
-let otherSubtypeText = "some-other-subtype"
-
-exception CannotRefute
-let RefuteDiscrimSet g m path discrims = 
-    let mk_unknown ty = snd(mk_compgen_local m "_" ty)
-    let rec go path tm = 
-        match path with 
-        | PathQuery _ -> raise CannotRefute
-        | PathConj (p,j) -> 
-             go p tm
-        | PathTuple (p,tys,j) -> 
-             go p (fun _ -> mk_tupled g m (mk_one_known tm j tys) tys)
-        | PathRecd (p,tcref,tinst,finst,j) -> 
-             let flds = tcref |> typs_of_instance_rfields_of_tcref (mk_tcref_inst tcref tinst) |> mk_one_known tm j
-             go p (fun _ -> TExpr_op(TOp_recd(RecdExpr, tcref),tinst, flds,m))
-
-        | PathUnionConstr (p,ucref,tinst,j) -> 
-             let flds = ucref |> typs_of_ucref_rfields (mk_tcref_inst ucref.TyconRef tinst)|> mk_one_known tm j
-             go p (fun _ -> TExpr_op(TOp_ucase(ucref),tinst, flds,m))
-
-        | PathArray (p,ty,len,n) -> 
-             go p (fun _ -> TExpr_op(TOp_array,[ty], mk_one_known tm n (List.replicate len ty) ,m))
-
-        | PathExnConstr (p,ecref,n) -> 
-             let flds = ecref |> typs_of_ecref_rfields |> mk_one_known tm n
-             go p (fun _ -> TExpr_op(TOp_exnconstr(ecref),[], flds,m))
-
-        | PathEmpty(ty) -> tm ty
-        
-    and mk_one_known tm n tys = List.mapi (fun i ty -> if i = n then tm ty else mk_unknown ty) tys 
-    and mk_unknowns tys = List.map mk_unknown tys
-
-    let tm ty = 
-        match discrims with 
-        | [TTest_isnull] -> 
-            snd(mk_compgen_local m notNullText ty)
-        | [TTest_isinst (srcty,tgty)] -> 
-            snd(mk_compgen_local m otherSubtypeText ty)
-        | (TTest_const c :: rest) -> 
-            let consts = Set.of_list (c :: List.choose (function TTest_const(c) -> Some c | _ -> None) rest)
-            let c' = 
-                Seq.tryfind (fun c -> not (consts.Contains(c)))
-                     (match c with 
-                      | TConst_bool(b) -> [ true; false ] |> List.to_seq |> Seq.map (fun v -> TConst_bool(v))
-                      | TConst_sbyte(i) ->  Seq.append (seq { 0y .. System.SByte.MaxValue }) (seq { System.SByte.MinValue .. 0y })|> Seq.map (fun v -> TConst_sbyte(v))
-                      | TConst_int16(i) -> Seq.append (seq { 0s .. System.Int16.MaxValue }) (seq { System.Int16.MinValue .. 0s }) |> Seq.map (fun v -> TConst_int16(v))
-                      | TConst_int32(i) ->  Seq.append (seq { 0 .. System.Int32.MaxValue }) (seq { System.Int32.MinValue .. 0 })|> Seq.map (fun v -> TConst_int32(v))
-                      | TConst_int64(i) ->  Seq.append (seq { 0L .. System.Int64.MaxValue }) (seq { System.Int64.MinValue .. 0L })|> Seq.map (fun v -> TConst_int64(v))
-                      | TConst_nativeint(i) ->  Seq.append (seq { 0L .. System.Int64.MaxValue }) (seq { System.Int64.MinValue .. 0L })|> Seq.map (fun v -> TConst_nativeint(v))
-                      | TConst_byte(i) -> seq { 0uy .. System.Byte.MaxValue } |> Seq.map (fun v -> TConst_byte(v))
-                      | TConst_uint16(i) -> seq { 0us .. System.UInt16.MaxValue } |> Seq.map (fun v -> TConst_uint16(v))
-                      | TConst_uint32(i) -> seq { 0u .. System.UInt32.MaxValue } |> Seq.map (fun v -> TConst_uint32(v))
-                      | TConst_uint64(i) -> seq { 0UL .. System.UInt64.MaxValue } |> Seq.map (fun v -> TConst_uint64(v))
-                      | TConst_unativeint(i) -> seq { 0UL .. System.UInt64.MaxValue } |> Seq.map (fun v -> TConst_unativeint(v))
-                      | TConst_float(i) -> seq { 0 .. System.Int32.MaxValue } |> Seq.map (fun v -> TConst_float(float v))
-                      | TConst_float32(i) -> seq { 0 .. System.Int32.MaxValue } |> Seq.map (fun v -> TConst_float32(float32 v))
-                      | TConst_char(i) -> seq { 32us .. System.UInt16.MaxValue } |> Seq.map (fun v -> TConst_char(char v))
-                      | TConst_string(s) -> seq { 1 .. System.Int32.MaxValue } |> Seq.map (fun v -> TConst_string(new System.String('a',v)))
-                      | TConst_decimal(s) -> seq { 1 .. System.Int32.MaxValue } |> Seq.map (fun v -> TConst_decimal(decimal v))
-                      | _ -> 
-                          raise CannotRefute) 
-
-            (* REVIEW: we could return a better enumeration literal field here if a field matches one of the enumeration cases *)
-
-            match c' with 
-            | None -> raise CannotRefute
-            | Some c -> TExpr_const(c,m,ty)
-            
-        | (TTest_unionconstr (ucref1,tinst) :: rest) -> 
-             let ucrefs = ucref1 :: List.choose (function TTest_unionconstr(ucref,_) -> Some ucref | _ -> None) rest
-             let tcref = ucref1.TyconRef
-             (* Choose the first ucref based on ordering of names *)
-             let others = 
-                 tcref 
-                 |> ucrefs_of_tcref 
-                 |> List.filter (fun ucref -> not (List.exists (g.ucref_eq ucref) ucrefs)) 
-                 |> List.sortBy (fun ucref -> ucref.CaseName)
-             match others with 
-             | [] -> raise CannotRefute
-             | ucref2 :: _ -> 
-               let flds = ucref2 |> typs_of_ucref_rfields (mk_tcref_inst tcref tinst) |> mk_unknowns
-               TExpr_op(TOp_ucase(ucref2),tinst, flds,m)
-               
-        | [TTest_array_length (n,ty)] -> 
-             TExpr_op(TOp_array,[ty], mk_unknowns (List.replicate (n+1) ty) ,m)
-             
-        | _ -> 
-            raise CannotRefute
-    go path tm
-
-let rec CombineRefutations g r1 r2 =
-   match r1,r2 with
-   | TExpr_val(vref,_,_), other | other, TExpr_val(vref,_,_) when vref.MangledName = "_" -> other 
-   | TExpr_val(vref,_,_), other | other, TExpr_val(vref,_,_) when vref.MangledName = notNullText -> other 
-   | TExpr_val(vref,_,_), other | other, TExpr_val(vref,_,_) when vref.MangledName = otherSubtypeText -> other 
-
-   | TExpr_op((TOp_exnconstr(ecref1) as op1), tinst1,flds1,m1), TExpr_op(TOp_exnconstr(ecref2), _,flds2,_) when tcref_eq g ecref1 ecref2 -> 
-        TExpr_op(op1, tinst1,List.map2 (CombineRefutations g) flds1 flds2,m1)
-
-   | TExpr_op((TOp_ucase(ucref1) as op1), tinst1,flds1,m1), 
-     TExpr_op(TOp_ucase(ucref2), _,flds2,_)  -> 
-       if g.ucref_eq ucref1 ucref2 then 
-           TExpr_op(op1, tinst1,List.map2 (CombineRefutations g) flds1 flds2,m1)
-       (* Choose the greater of the two ucrefs based on name ordering *)
-       elif ucref1.CaseName < ucref2.CaseName then 
-           r2
-       else 
-           r1
-        
-   | TExpr_op(op1, tinst1,flds1,m1), TExpr_op(_, _,flds2,_) -> 
-        TExpr_op(op1, tinst1,List.map2 (CombineRefutations g) flds1 flds2,m1)
-        
-   | TExpr_const(c1, m1, ty1), TExpr_const(c2,_,_) -> 
-       let c12 = 
-
-           (* Make sure longer strings are greater, not the case in the default ordinal comparison *)
-           (* This is needed because the individual counter examples make longer strings *)
-           let MaxStrings s1 s2 = 
-               let c = compare (String.length s1) (String.length s2)
-               if c < 0 then s2 
-               elif c > 0 then s1 
-               elif s1 < s2 then s2 
-               else s1
-               
-           match c1,c2 with 
-           | TConst_string(s1), TConst_string(s2) -> TConst_string(MaxStrings s1 s2)
-           | TConst_decimal(s1), TConst_decimal(s2) -> TConst_decimal(max s1 s2)
-           | _ -> max c1 c2 
-           
-       (* REVIEW: we couldd return a better enumeration literal field here if a field matches one of the enumeration cases *)
-       TExpr_const(c12, m1, ty1)
-
-   | _ -> r1 
-
-let ShowCounterExample g denv m refuted = 
-   try
-      let refutations = refuted |> List.collect (function RefutedWhenClause -> [] | (RefutedInvestigation(path,discrim)) -> [RefuteDiscrimSet g m path discrim])
-      let counterExample = 
-          match refutations with 
-          | [] -> raise CannotRefute
-          | h :: t -> 
-              if verbose then dprintf "h = %s\n" (Layout.showL (ExprL h));
-              List.fold (CombineRefutations g) h t
-      let text = Layout.showL (NicePrint.dataExprL denv counterExample)
-      let failingWhenClause = refuted |> List.exists (function RefutedWhenClause -> true | _ -> false)
-      Some(text,failingWhenClause)
-      
-    with 
-        | CannotRefute ->    
-          None 
-        | e -> 
-          warning(InternalError(Printf.sprintf "" (e.ToString()),m));
-          None
-       
-(*---------------------------------------------------------------------------
- * Basic problem specification
- *------------------------------------------------------------------------- *)
-    
-type RuleNumber = int
-
-type Active = Active of path * SubExprOfInput * pat
-
-type Actives = Active list
-
-type Frontier = Frontier of RuleNumber * Actives * ValMap
-
-type InvestigationPoint = Investigation of RuleNumber * DecisionTreeDiscriminator * path
-
-(* Note: actives must be a SortedDictionary *)
-(* REVIEW: improve these data structures, though surprisingly these functions don't tend to show up *)
-(* on profiling runs *)
-let rec IsMemOfActives p1 actives = 
-    match actives with 
-    | [] -> false 
-    | (Active(p2,_,_)) :: rest -> path_eq p1 p2 or IsMemOfActives p1 rest
-
-let rec LookupActive x l = 
-    match l with 
-    | [] -> raise (KeyNotFoundException())
-    | (Active(h,r1,r2)::t) -> if path_eq x h then (r1,r2) else LookupActive x t
-
-let rec RemoveActive x l = 
-    match l with 
-    | [] -> []
-    | ((Active(h,_,_) as p) ::t) -> if path_eq x h then t else p:: RemoveActive x t
-
-(*---------------------------------------------------------------------------
- * Utilities
- *------------------------------------------------------------------------- *)
-
-let RangeOfPat t = 
-    match t with 
-    | TPat_null m | TPat_isinst (_,_,_,m) | TPat_const (_,m) | TPat_unioncase (_ ,_,_,m) 
-    | TPat_exnconstr (_,_,m) | TPat_query (_,_,m) | TPat_range(_,_,m) 
-    | TPat_recd(_,_,_,m) | TPat_tuple(_,_,m) | TPat_array(_,_,m) | TPat_disjs(_,m) | TPat_conjs(_,m) | TPat_as(_,_,m) | TPat_wild(m) -> m
-  
-// tpinst is required because the pattern is specified w.r.t. generalized type variables. 
-let GetDiscrimOfPattern g tpinst t = 
-    match t with 
-    | TPat_null m -> 
-        Some(TTest_isnull)
-    | TPat_isinst (srcty,tgty,_,m) -> 
-        Some(TTest_isinst (InstType tpinst srcty,InstType tpinst tgty))
-    | TPat_exnconstr(tcref,_,m) -> 
-        Some(TTest_isinst (g.exn_ty,mk_tyapp_ty tcref []))
-    | TPat_const (c,m) -> 
-        Some(TTest_const c)
-    | TPat_unioncase (c,tyargs',_,m) -> 
-        Some(TTest_unionconstr (c,inst_types tpinst tyargs'))
-    | TPat_array (args,ty,m) -> 
-        Some(TTest_array_length (List.length args,ty))
-    | TPat_query ((pexp,restys,apatVrefOpt,idx,apinfo),_,m) -> 
-        Some(TTest_query (pexp, inst_types tpinst restys, apatVrefOpt,idx,apinfo))
-    | _ -> None
-
-let ConstOfDiscrim discrim =
-    match discrim with 
-    | TTest_const x -> x
-    | _ -> failwith "not a const case"
-
-let ConstOfCase c = ConstOfDiscrim(discrim_of_case c)
-
-let GetDiscrimOfCase (TCase(discrim,_)) = discrim
-
-/// Compute pattern identity
-let DiscrimsEq g d1 d2 =
-  match d1,d2 with 
-  | TTest_unionconstr (c1,_),    TTest_unionconstr(c2,_) -> g.ucref_eq c1 c2
-  | TTest_array_length (n1,_),   TTest_array_length(n2,_) -> (n1=n2)
-  | TTest_const c1,              TTest_const c2 -> (c1=c2)
-  | TTest_isnull ,               TTest_isnull -> true
-  | TTest_isinst (srcty1,tgty1), TTest_isinst (srcty2,tgty2) -> type_equiv g srcty1 srcty2 && type_equiv g tgty1 tgty2
-  | TTest_query (_,_,vrefOpt1,n1,apinfo1),        TTest_query (_,_,vrefOpt2,n2,apinfo2) -> 
-      match vrefOpt1, vrefOpt2 with 
-      | Some vref1, Some vref2 -> g.vref_eq vref1 vref2 && n1 = n2 
-      | _ -> false (* for equality purposes these are considered unequal! This is because adhoc computed patterns have no identity. *)
-
-  | _ -> false
-    
-/// Redundancy of 'isinst' patterns 
-let IsDiscrimSubsumedBy g amap m d1 d2 =
-  (DiscrimsEq g d1 d2) 
-  ||
-  (match d1,d2 with 
-   | TTest_isinst (srcty1,tgty1), TTest_isinst (srcty2,tgty2) -> 
-      type_definitely_subsumes_type_no_coercion 0 g amap m tgty2 tgty1
-   | _ -> false)
-    
-/// Choose a set of investigations that can be performed simultaneously 
-let rec ChooseSimultaneousEdgeSet prevOpt f l =
-    match l with 
-    | [] -> [],[]
-    | h::t -> 
-        match f prevOpt h with 
-        | Some x,_ ->         
-             let l,r = ChooseSimultaneousEdgeSet (Some x) f t
-             x :: l, r
-        | None,cont -> 
-             let l,r = ChooseSimultaneousEdgeSet prevOpt f t
-             l, h :: r
-
-/// Can we represent a integer discrimination as a 'switch'
-let CanCompactConstantClass c = 
-    match c with 
-    | TConst_sbyte _ | TConst_int16 _ | TConst_int32 _ 
-    | TConst_byte _ | TConst_uint16 _ | TConst_uint32 _ 
-    | TConst_char _ -> true
-    | _ -> false
-                         
-/// Can two discriminators in a 'column' be decided simultaneously?
-let DiscrimsHaveSameSimultaneousClass g d1 d2 =
-  match d1,d2 with 
-  | TTest_const _,              TTest_const _ 
-  | TTest_isnull ,               TTest_isnull 
-  | TTest_array_length _,   TTest_array_length _
-  | TTest_unionconstr _,    TTest_unionconstr _  -> true
-
-  | TTest_isinst _, TTest_isinst _ -> false
-  | TTest_query (_,_,apatVrefOpt1,n1,apinfo1),        TTest_query (_,_,apatVrefOpt2,n2,apinfo2) -> 
-      match apatVrefOpt1, apatVrefOpt2 with 
-      | Some vref1, Some vref2 -> g.vref_eq vref1 vref2 
-      | _ -> false (* for equality purposes these are considered different classes of discriminators! This is because adhoc computed patterns have no identity! *)
-
-  | _ -> false
-
-
-/// Decide the next pattern to investigate
-let ChooseInvestigationPointLeftToRight frontiers =
-    match frontiers with 
-    | Frontier (i,actives,_) ::t -> 
-        let rec choose l = 
-            match l with 
-            | [] -> failwith "ChooseInvestigationPointLeftToRight: no non-immediate patterns in first rule"
-            | (Active(path,_,(TPat_null _ | TPat_isinst _ | TPat_exnconstr _ | TPat_unioncase _ | TPat_array _ | TPat_const _ | TPat_query _ | TPat_range _)) as active)
-                ::t -> active
-            | _ :: t -> choose t
-        choose actives
-    | [] -> failwith "ChooseInvestigationPointLeftToRight: no frontiers!"
-
-
-/// Build a dtree, equivalent to: TDSwitch("expr",edges,default,m) 
-///
-/// Once we've chosen a particular active to investigate, we compile the
-/// set of edges affected by this investigation into a switch.  
-///
-///   - For TTest_query(...,None,...) there is only one edge
-///
-///   - For TTest_isinst there are multiple edges, which we can't deal with
-///     one switch, so we make an iterated if-then-else to cover the cases. We
-///     should probably adjust the code to only choose one edge in this case.
-///
-///   - Compact integer switches become a single switch.  Non-compact integer
-///     switches, string switches and floating point switches are treated in the
-///     same way as TTest_isinst.
-let rec BuildSwitch resVarOpt g expr edges dflt m =
-    if verbose then dprintf "--> BuildSwitch@%a, #edges = %A, dflt.IsSome = %A\n" output_range m (List.length edges) (Option.is_some dflt); 
-    match edges,dflt with 
-    | [], None      -> failwith "internal error: no edges and no default"
-    | [], Some dflt -> dflt      (* NOTE: first time around, edges<>[] *)
-    (* Optimize the case where the match always succeeds *)
-    | [TCase(_,tree)], None -> tree
-
-    (* 'isinst' tests where we have stored the result of the 'isinst' in a variable *)
-    (* In this case the 'expr' already holds the result of the 'isinst' test. *)
-    
-    | (TCase(TTest_isinst _,success) as edge):: edges, dflt  when isSome(resVarOpt) -> 
-        TDSwitch(expr,[TCase(TTest_isnull,(BuildSwitch None g expr edges dflt) m)],Some success,m)    
-        
-    | (TCase((TTest_isnull | TTest_isinst _),_) as edge):: edges, dflt  -> 
-        TDSwitch(expr,[edge],Some (BuildSwitch resVarOpt g expr edges dflt m),m)    
-        (*begin match dflt with 
-        | None      -> error(InternalError("exception/null/isinst matches need default cases!",m))
-        | Some dflt -> TDSwitch(GetSubExprOfInput  g subexpr,[edge],Some (BuildSwitch resVarOpt g subexpr edges (Some dflt) m),m)
-        end*)
-
-    (* All these should also always have default cases *)
-    | TCase(TTest_const (TConst_decimal _ | TConst_string _ | TConst_float32 _ |  TConst_float _ | TConst_sbyte _ | TConst_byte _| TConst_int16 _ | TConst_uint16 _ | TConst_int32 _ | TConst_uint32 _ | TConst_int64 _ | TConst_uint64 _ | TConst_nativeint _ | TConst_unativeint _ | TConst_char _ ),_) :: _, None -> 
-        error(InternalError("inexhaustive match - need a default cases!",m))
-
-    (* Split string, float, uint64, int64, unativeint, nativeint matches into serial equality tests *)
-    | TCase((TTest_array_length _ | TTest_const (TConst_float32 _ | TConst_float _ | TConst_string _ | TConst_decimal _ | TConst_int64 _ | TConst_uint64 _ | TConst_nativeint _ | TConst_unativeint _)),_) :: _, Some dflt -> 
-        List.foldBack 
-            (fun (TCase(discrim,tree)) sofar -> 
-                let testexpr = expr
-                let testexpr = 
-                    match discrim with 
-                    | TTest_array_length(n,ty)       -> 
-                        let v,vexp,bind = mk_compgen_local_and_invisible_bind g "testExpr" m testexpr
-                        mk_let_bind m bind (mk_lazy_and g m (mk_nonnull_test g m vexp) (mk_ceq g m (mk_ldlen g m vexp) (mk_int g m n)))
-                    | TTest_const (TConst_string _ as c)  -> 
-                        mk_call_generic_equality_outer g m g.string_ty testexpr (TExpr_const(c,m,g.string_ty))
-                    | TTest_const (TConst_decimal _ as c)  -> 
-                        mk_call_generic_equality_outer g m g.decimal_ty testexpr (TExpr_const(c,m,g.decimal_ty))
-                    | TTest_const ((TConst_float _ | TConst_float32 _ | TConst_int64 _ | TConst_uint64 _ | TConst_nativeint _ | TConst_unativeint _) as c)   -> 
-                        mk_ceq g m testexpr (TExpr_const(c,m,type_of_expr g testexpr))
-                    | _ -> error(InternalError("strange switch",m))
-                mk_bool_switch m testexpr tree sofar)
-          edges
-          dflt
-
-    (* Split integer and char matches into compact fragments which will themselves become switch *)
-    (* statements. *)
-    | TCase(TTest_const c,_) :: _, Some dflt when CanCompactConstantClass c -> 
-        let edge_compare c1 c2 = 
-            match ConstOfCase c1,ConstOfCase c2 with 
-            | (TConst_sbyte i1),(TConst_sbyte i2) -> compare i1 i2
-            | (TConst_int16 i1),(TConst_int16 i2) -> compare i1 i2
-            | (TConst_int32 i1),(TConst_int32 i2) -> compare i1 i2
-            | (TConst_byte i1),(TConst_byte i2) -> compare i1 i2
-            | (TConst_uint16 i1),(TConst_uint16 i2) -> compare i1 i2
-            | (TConst_uint32 i1),(TConst_uint32 i2) -> compare i1 i2
-            | (TConst_char c1),(TConst_char c2) -> compare c1 c2
-            | _ -> failwith "illtyped term during pattern compilation" 
-        let edges' = List.sortWith edge_compare edges
-        let rec compactify curr edges = 
-            if debug then  dprintf "--> compactify@%a\n" output_range m; 
-            match curr,edges with 
-            | None,[] -> []
-            | Some last,[] -> [List.rev last]
-            | None,h::t -> compactify (Some [h]) t
-            | Some (prev::moreprev),h::t -> 
-                match ConstOfCase prev,ConstOfCase h with 
-                | TConst_sbyte iprev,TConst_sbyte inext when int32(iprev) + 1 = int32 inext -> 
-                    compactify (Some (h::prev::moreprev)) t
-                | TConst_int16 iprev,TConst_int16 inext when int32(iprev) + 1 = int32 inext -> 
-                    compactify (Some (h::prev::moreprev)) t
-                | TConst_int32 iprev,TConst_int32 inext when iprev+1 = inext -> 
-                    compactify (Some (h::prev::moreprev)) t
-                | TConst_byte iprev,TConst_byte inext when int32(iprev) + 1 = int32 inext -> 
-                    compactify (Some (h::prev::moreprev)) t
-                | TConst_uint16 iprev,TConst_uint16 inext when int32(iprev)+1 = int32 inext -> 
-                    compactify (Some (h::prev::moreprev)) t
-                | TConst_uint32 iprev,TConst_uint32 inext when int32(iprev)+1 = int32 inext -> 
-                    compactify (Some (h::prev::moreprev)) t
-                | TConst_char cprev,TConst_char cnext when (int32 cprev + 1 = int32 cnext) -> 
-                    compactify (Some (h::prev::moreprev)) t
-                |       _ ->  (List.rev (prev::moreprev)) :: compactify None edges
-
-            | _ -> failwith "internal error: compactify"
-        let edge_groups = compactify None edges'
-        List.foldBack 
-            (fun edge_group sofar ->  TDSwitch(expr,edge_group,Some sofar,m))
-            edge_groups
-            dflt
-
-    // For a total pattern match, run the active pattern, bind the result and 
-    // recursively build a switch in the choice type 
-    | (TCase(TTest_query _,_)::rest), dflt -> 
-       error(InternalError("TTest_query should have been eliminated",m));
-
-    // For a complete match, optimize one test to be the default 
-    | (TCase(test,tree)::rest), None -> TDSwitch (expr,rest,Some tree,m)
-
-    // Otherwise let codegen make the choices 
-    | _ -> TDSwitch (expr,edges,dflt,m)
-
-let rec patL pat = 
-    if debug then  dprintf "--> patL\n"; 
-    match pat with
-    | TPat_query (_,pat,_) -> Layout.(--) (Layout.wordL "query") (patL pat)
-    | TPat_wild _ -> Layout.wordL "wild"
-    | TPat_as _ -> Layout.wordL "var"
-    | TPat_tuple (pats, _, _) 
-    | TPat_array (pats, _, _) -> Layout.bracketL (Layout.tupleL (List.map patL pats))
-    | _ -> Layout.wordL "?" 
-  
-let rec pathL p = Layout.wordL ""
-     
-let activeL (Active (path, subexpr, pat)) =
-    Layout.(--) (Layout.wordL "Active") (Layout.tupleL [pathL path; patL pat]) 
-     
-let frontierL (Frontier (i,actives,_)) =
-    Layout.(--) (Layout.wordL "Frontier") (Layout.tupleL [intL i; Layout.listL activeL actives]) 
-
-let mk_frontiers investigations i = 
-    List.map (fun (actives,valMap) -> Frontier(i,actives,valMap)) investigations
-
-let GetRuleIndex (Frontier (i,active,valMap)) = i
-
-/// Is a pattern a partial pattern?
-let rec IsPatternPartial p = 
-    match p with 
-    | TPat_query ((_,restys,apatVrefOpt,idx,apinfo),p,m) -> not (total_of_apinfo apinfo) or IsPatternPartial p
-    | TPat_const _ -> false
-    | TPat_wild _ -> false
-    | TPat_as (p,_,_) -> IsPatternPartial p
-    | TPat_disjs (ps,_) | TPat_conjs(ps,_) 
-    | TPat_tuple (ps,_,_) | TPat_exnconstr(_,ps,_) 
-    | TPat_array (ps,_,_) | TPat_unioncase (_,_,ps,_)-> List.exists IsPatternPartial ps
-    | TPat_recd (_,_,psl,_) -> List.exists (snd >> IsPatternPartial) psl
-    | TPat_range _ -> false
-    | TPat_null _ -> false
-    | TPat_isinst _ -> false
-
-let rec ErasePartialPatterns inpp = 
-    match inpp with 
-    | TPat_query ((expr,restys,apatVrefOpt,idx,apinfo),p,m) -> 
-         if (total_of_apinfo apinfo) then TPat_query ((expr,restys,apatVrefOpt,idx,apinfo),ErasePartialPatterns p,m)
-         else TPat_disjs ([],m) (* always fail *)
-    | TPat_as (p,x,m) -> TPat_as (ErasePartialPatterns p,x,m)
-    | TPat_disjs (ps,m) -> TPat_disjs(erase_partials ps, m)
-    | TPat_conjs(ps,m) -> TPat_conjs(erase_partials ps, m)
-    | TPat_tuple (ps,x,m) -> TPat_tuple(erase_partials ps, x, m)
-    | TPat_exnconstr(x,ps,m) -> TPat_exnconstr(x,erase_partials ps,m) 
-    | TPat_array (ps,x,m) -> TPat_array (erase_partials ps,x,m)
-    | TPat_unioncase (x,y,ps,m) -> TPat_unioncase (x,y,erase_partials ps,m)
-    | TPat_recd (x,y,ps,m) -> TPat_recd (x,y,List.map (map2'2 ErasePartialPatterns) ps,m)
-    | TPat_const _ 
-    | TPat_wild _ 
-    | TPat_range _ 
-    | TPat_null _ 
-    | TPat_isinst _ -> inpp
-and erase_partials inps = List.map ErasePartialPatterns inps
-
-
-
-
-(*---------------------------------------------------------------------------
- * The algorithm
- *------------------------------------------------------------------------- *)
-
-type EdgeDiscrim = EdgeDiscrim of int * DecisionTreeDiscriminator * range
-let get_discrim (EdgeDiscrim(_,discrim,_)) = discrim
-
-let when_of_clause (TClause(p,whenOpt,_,_)) = whenOpt
-let pat_of_clause (TClause(p,whenOpt,_,_)) = p
-let range_of_clause (TClause(p,whenOpt,_,m)) = m
-let vs_of_clause (TClause(p,whenOpt,TTarget(vs,_,_),m)) = vs
-
-let CompilePatternBasic 
-        g denv amap exprm matchm 
-        warnOnUnused 
-        warnOnIncomplete 
-        actionOnFailure 
-        (topv,topgtvs) 
-        (clausesL: tclause list) 
-        ty =
-    // Add the targets to a match builder 
-    // Note the input expression has already been evaluated and saved into a variable.
-    // Hence no need for a new sequence point.
-    let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,exprm)
-    List.iteri (fun i (TClause(_,_,tg,_)) -> mbuilder.AddTarget(tg) |> ignore) clausesL;
-    
-    (* Add the incomplete or rethrow match clause on demand, printing a *)
-    (* warning if necessary (only if it is ever exercised) *)
-    let incompleteMatchClauseOnce = ref None
-    let getIncompleteMatchClause (refuted) = 
-        // This is lazy because emit a 
-        // warning when the lazy thunk gets evaluated 
-        match !incompleteMatchClauseOnce with 
-        | None -> 
-                (* Emit the incomplete match warning *)               
-                if (actionOnFailure = Incomplete) && warnOnIncomplete then 
-                    warning (MatchIncomplete (false,ShowCounterExample g denv exprm refuted, exprm));
-                let throwExpr =
-                    match actionOnFailure with
-                      | FailFilter  -> 
-                          // Return 0 from the .NET exception filter
-                          mk_int g matchm 0
-
-                      | Rethrow     -> 
-                          // Rethrow unmatched try-catch exn. No sequence point at the target since its not
-                          // real code.
-                          mk_rethrow matchm ty 
-                      
-                      | Throw       -> 
-                          // We throw instead of rethrow on unmatched try-catch in a computation expression. But why?
-                          // Because this isn't a real .NET exception filter/handler but just a function we're passing
-                          // to a computation expression builder to simulate one.
-                          mk_throw   matchm ty (expr_for_val matchm topv) 
-                          
-                      | Incomplete  -> 
-                          mk_throw   matchm ty 
-                              (mk_exnconstr(mk_MFCore_tcref g.fslibCcu "MatchFailureException", 
-                                            // REVIEW: get rid of this use of Bytes.string_as_unicode_bytes 
-                                            [ mk_string g matchm (file_of_range matchm); 
-                                              mk_int g matchm (matchm |> start_of_range |> line_of_pos); 
-                                              mk_int g matchm (matchm |> start_of_range |> col_of_pos)],matchm))
-
-                // We don't emit a sequence point at any of the above cases because they don't correspond to 
-                // user code. 
-                //
-                // Note we don't emit sequence points at either the succeeding or failing
-                // targets of filters since if the exception is filtered successfully then we 
-                // will run the handler and hit the sequence point there.
-                // That sequence point will have the pattern variables bound, which is exactly what we want.
-                let tg = TTarget(FlatList.empty,throwExpr,SuppressSequencePointAtTarget  )
-                mbuilder.AddTarget tg |> ignore;
-                let clause = TClause(TPat_wild matchm,None,tg,matchm)
-                incompleteMatchClauseOnce := Some(clause);
-                clause
-                
-        | Some c -> c
-
-    (* Helpers to get the variables bound at a target. We conceptually add a dummy clause that will always succeed with a "throw" *)
-    let clausesA = Array.of_list clausesL
-    let nclauses = Array.length clausesA
-    let lastMatchClauseWarnngGiven = ref false
-    let GetClause i refuted = 
-        if i < nclauses then 
-            clausesA.[i]  
-        elif i = nclauses then getIncompleteMatchClause(refuted)
-        else failwith "GetClause"
-    let GetValsBoundByClause i refuted = vs_of_clause (GetClause i refuted)
-    let GetWhenGuardOfClause i refuted = when_of_clause (GetClause i refuted)
-    
-    // Different uses of parameterized active patterns have different identities as far as paths 
-    // are concerned. Here we generate unique numbers that are completely different to any stamp
-    // by usig negative numbers.
-    let genUniquePathId() = - (new_uniq())
-
-    // Build versions of these functions which apply a dummy instantiation to the overall type arguments 
-    let GetSubExprOfInput,GetDiscrimOfPattern = 
-        let tyargs = List.map (fun _ -> g.unit_ty) topgtvs
-        let unit_tpinst = mk_typar_inst topgtvs tyargs
-        GetSubExprOfInput g (topgtvs,tyargs,unit_tpinst),
-        GetDiscrimOfPattern g unit_tpinst
-
-
-     (* The main recursive loop of the pattern match compiler *)
-    let rec InvestigateFrontiers refuted frontiers = 
-        if debug then dprintf "frontiers = %s\n" (String.concat ";" (List.map (GetRuleIndex >> string) frontiers));
-        match frontiers with
-        | [] -> failwith "CompilePattern:compile - empty clauses: at least the final clause should always succeed"
-        | (Frontier (i,active,valMap)) :: rest ->
-
-            (* Check to see if we've got a succeeding clause.  There may still be a 'when' condition for the clause *)
-            match active with
-            | [] -> CompileSuccessPointAndGuard i refuted valMap rest 
-
-            | _ -> 
-                if debug then dprintf "Investigating based on rule %d, #active = %d\n" i (List.length active);
-                (* Otherwise choose a point (i.e. a path) to investigate. *)
-                let (Active(path,subexpr,pat))  = ChooseInvestigationPointLeftToRight frontiers
-                match pat with
-                // All these constructs should have been eliminated in BindProjectionPattern 
-                | TPat_as _   | TPat_tuple _  | TPat_wild _      | TPat_disjs _  | TPat_conjs _  | TPat_recd _ -> failwith "Unexpected pattern"
-
-                // Leaving the ones where we have real work to do 
-                | _ -> 
-
-                    if debug then dprintf "ChooseSimultaneousEdgeSet\n";
-                    let simulSetOfEdgeDiscrims,fallthroughPathFrontiers = ChooseSimultaneousEdges frontiers path
-
-                    let resPreBindOpt,bindOpt =     ChoosePreBinder simulSetOfEdgeDiscrims subexpr    
-                            
-                    // For each case, recursively compile the residue decision trees that result if that case successfully matches 
-                    let simulSetOfCases, _ = CompileSimultaneousSet frontiers path refuted subexpr simulSetOfEdgeDiscrims (resPreBindOpt) 
-                          
-                    assert (nonNil(simulSetOfCases));
-
-                    if debug then 
-                        dprintf "#fallthroughPathFrontiers = %d, #simulSetOfEdgeDiscrims = %d\n"  (List.length fallthroughPathFrontiers) (List.length simulSetOfEdgeDiscrims);
-                        dprintf "Making cases for each discriminator...\n";
-                        dprintf "#edges = %d\n" (List.length simulSetOfCases);
-                        dprintf "Checking for completeness of edge set from earlier investigation of rule %d, #active = %d\n" i (List.length active);
-
-                    // Work out what the default/fall-through tree looks like, is any 
-                    // Check if match is complete, if so optimize the default case away. 
-                
-                    let defaultTreeOpt  : DecisionTree option = CompileFallThroughTree fallthroughPathFrontiers path refuted  simulSetOfCases
-
-                    // OK, build the whole tree and whack on the binding if any 
-                    let finalDecisionTree = 
-                        let inpExprToSwitch = (match resPreBindOpt with Some vexp -> vexp | None -> GetSubExprOfInput subexpr)
-                        let tree = BuildSwitch resPreBindOpt g inpExprToSwitch simulSetOfCases defaultTreeOpt matchm
-                        match bindOpt with 
-                        | None -> tree
-                        | Some bind -> TDBind (bind,tree)
-                        
-                    finalDecisionTree
-
-    and CompileSuccessPointAndGuard i refuted valMap rest =
-
-        if debug then dprintf "generating success node for rule %d\n" i;
-        let vs2 = GetValsBoundByClause i refuted
-        let es2 = 
-            vs2 |> FlatList.map (fun v -> 
-                match (vspec_map_tryfind v valMap) with 
-                | None -> error(Error("missing variable "^v.DisplayName,v.Range)) 
-                | Some res -> res)
-        let rhs' = TDSuccess(es2, i)
-        match GetWhenGuardOfClause i refuted with 
-        | Some whenExpr -> 
-            if debug then dprintf "generating success node for rule %d, with 'when' clause\n" i;
-            // We duplicate both the bindings and the guard expression to ensure uniqueness of bound variables: the same vars are boun in the guard and the targets 
-            // REVIEW: this is also duplicating the guard when "or" patterns are used, leading to code explosion for large guards with many "or" patterns 
-            let m = (range_of_expr whenExpr)
-            
-            // SEQUENCE POINTS: REVIEW: Build a sequence point at 'when' 
-            let whenExpr = copy_expr g CloneAll (mk_lets_from_Bindings m (mk_invisible_FlatBindings vs2 es2) whenExpr)
-            mk_bool_switch m whenExpr rhs' (InvestigateFrontiers (RefutedWhenClause::refuted) rest)
-        | None -> rhs' 
-
-    /// Select the set of discriminators which we can handle in one test, or as a series of 
-    /// iterated tests, e.g. in the case of TPat_isinst.  Ensure we only take at most one class of TPat_query(_) at a time. 
-    /// Record the rule numbers so we know which rule the TPat_query cam from, so that when we project through 
-    /// the frontier we only project the right rule. 
-    and ChooseSimultaneousEdges frontiers path =
-        if debug then dprintf "ChooseSimultaneousEdgeSet\n";
-        frontiers |> ChooseSimultaneousEdgeSet None (fun prevOpt (Frontier (i',active',_)) -> 
-              if IsMemOfActives path active' then 
-                  let p = LookupActive path active' |> snd
-                  match GetDiscrimOfPattern p with
-                  | Some discrim -> 
-                      if (match prevOpt with None -> true | Some (EdgeDiscrim(_,discrimPrev,_)) -> DiscrimsHaveSameSimultaneousClass g discrim discrimPrev) then (
-                          if debug then dprintf "taking rule %d\n" i';
-                          Some (EdgeDiscrim(i',discrim,RangeOfPat p)),true
-                      ) else 
-                          None,false
-                                                        
-                  | None -> 
-                      None,true
-              else 
-                  None,true)
-
-    and ChoosePreBinder simulSetOfEdgeDiscrims subexpr =
-         match simulSetOfEdgeDiscrims with 
-          // Very simple 'isinst' tests: put the result of 'isinst' in a local variable 
-          //
-          // That is, transform 
-          //     'if istype e then ...unbox e .... ' 
-          // into
-          //     'let v = isinst e in .... if nonnull v then ...v .... ' 
-          //
-          // This is really an optimization that could be done more effectively in opt.ml
-          // if we flowed a bit of information through 
-
-          
-         | EdgeDiscrim(i',(TTest_isinst (srcty,tgty)),m) :: rest 
-                    (* check we can use a simple 'isinst' instruction *)
-                    when can_use_istype_fast g tgty && isNil topgtvs ->
-
-             let v,vexp = mk_compgen_local m "typeTestResult" tgty
-             if topv.IsMemberOrModuleBinding then 
-                 AdjustValToTopVal v topv.ActualParent TopValInfo.emptyValData;
-             let argexp = GetSubExprOfInput subexpr
-             let appexp = mk_isinst tgty argexp matchm
-             Some(vexp),Some(mk_invisible_bind v appexp)
-
-         // Active pattern matches: create a variable to hold the results of executing the active pattern. 
-         | (EdgeDiscrim(i',(TTest_query(pexp,restys,resPreBindOpt,_,apinfo)),m) :: rest) ->
-             if debug then dprintf "Building result var for active pattern...\n";
-             
-             if nonNil topgtvs then error(InternalError("Unexpected generalized type variables when compiling an active pattern",m));
-             let rty = mk_apinfo_result_typ g m apinfo restys
-             let v,vexp = mk_compgen_local m "activePatternResult" rty
-             if topv.IsMemberOrModuleBinding then 
-                 AdjustValToTopVal v topv.ActualParent TopValInfo.emptyValData;
-             let argexp = GetSubExprOfInput subexpr
-             let appexp = mk_appl g ((pexp,type_of_expr g pexp), [], [argexp],m)
-             
-             Some(vexp),Some(mk_invisible_bind v appexp)
-          | _ -> None,None
-                            
-
-    and CompileSimultaneousSet frontiers path refuted subexpr simulSetOfEdgeDiscrims (resPreBindOpt:expr option) =
-
-        ([],simulSetOfEdgeDiscrims) ||> List.collectFold (fun taken (EdgeDiscrim(i',discrim,m)) -> 
-             // Check to see if we've already collected the edge for this case, in which case skip it. 
-             if List.exists (IsDiscrimSubsumedBy g amap m discrim) taken  then 
-                 // Skip this edge: it is refuted 
-                 ([],taken) 
-             else 
-                 // Make a resVar to hold the results of the successful "proof" that a union value is
-                 // a successful union case. That is, transform 
-                 //     'match v with 
-                 //        | A _ -> ... 
-                 //        | B _ -> ...' 
-                 // into
-                 //     'match v with 
-                 //        | A _ -> let vA = (v ~~> A)  in .... 
-                 //        | B _ -> let vB = (v ~~> B)  in .... ' 
-                 //
-                 // Only do this for union cases that actually have some fields and with more than one case
-                 let resPostBindOpt,ucaseBindOpt =
-                     match discrim with 
-                     | TTest_unionconstr (ucref, tinst) when isNil topgtvs && not topv.IsMemberOrModuleBinding && ucref.UnionCase.RecdFields.Length >= 1 && ucref.Tycon.UnionCasesArray.Length > 1 ->
-                       let v,vexp = mk_compgen_local m "unionCase" (mk_proven_ucase_typ ucref tinst)
-                       let argexp = GetSubExprOfInput subexpr
-                       let appexp = mk_ucase_proof(argexp, ucref,tinst,m)
-                       Some(vexp),Some(mk_invisible_bind v appexp)
-                     | _ -> 
-                       None,None
-                 
-                 // Convert active pattern edges to tests on results data 
-                 let discrim' = 
-                     match discrim with 
-                     | TTest_query(pexp,restys,apatVrefOpt,idx,apinfo) -> 
-                         let aparity = List.length (names_of_apinfo apinfo)
-                         let total = total_of_apinfo apinfo
-                         if not total && aparity > 1 then 
-                             error(Error("partial active patterns may only generate one result",m));
-                         
-                         if not total then TTest_unionconstr(mk_some_ucref g,restys)
-                         elif aparity <= 1 then TTest_const(TConst_unit) 
-                         else TTest_unionconstr(mk_choices_ucref g m aparity idx,restys) 
-                     | _ -> discrim
-                     
-                 // Project a successful edge through the frontiers. 
-                 let investigation = Investigation(i',discrim,path)
-
-                 let frontiers = frontiers |> List.collect (GenerateNewFrontiersAfterSucccessfulInvestigation resPreBindOpt resPostBindOpt investigation) 
-                 let tree = InvestigateFrontiers refuted frontiers
-                 // Bind the resVar for the union case, if we have one
-                 let tree = 
-                     match ucaseBindOpt with 
-                     | None -> tree
-                     | Some bind -> TDBind (bind,tree)
-                 // Return the edge 
-                 let edge = TCase(discrim',tree)
-                 [edge], (discrim :: taken) )
-
-    and CompileFallThroughTree fallthroughPathFrontiers path refuted  simulSetOfCases =
-
-        let simulSetOfDiscrims = List.map GetDiscrimOfCase simulSetOfCases
-
-        let IsRefuted (Frontier (i',active',_)) = 
-            IsMemOfActives path active' &&
-            let p = LookupActive path active' |> snd
-            match GetDiscrimOfPattern p with 
-            | Some(discrim) -> List.exists (IsDiscrimSubsumedBy g amap exprm discrim) simulSetOfDiscrims 
-            | None -> false
-
-        match simulSetOfDiscrims with 
-        | TTest_const (TConst_bool b) :: _ when simulSetOfCases.Length = 2 ->  None
-        | TTest_const (TConst_unit) :: _  ->  None
-        | TTest_unionconstr (ucref,_) :: _ when  simulSetOfCases.Length = ucref.TyconRef.UnionCasesArray.Length -> None                      
-        | TTest_query _ :: _ -> error(InternalError("TTest_query should have been eliminated",matchm))
-        | _ -> 
-            let fallthroughPathFrontiers = List.filter (IsRefuted >> not) fallthroughPathFrontiers
-            
-            (* Add to the refuted set *)
-            let refuted = (RefutedInvestigation(path,simulSetOfDiscrims)) :: refuted
-        
-            if debug then dprintf "Edge set was incomplete. Compiling remaining cases\n";
-            match fallthroughPathFrontiers with
-            | [] -> 
-                None
-            | _ -> 
-                Some(InvestigateFrontiers refuted fallthroughPathFrontiers)
-          
-    // Build a new frontire that represents the result of a successful investigation 
-    // at rule point (i',discrim,path) 
-    and GenerateNewFrontiersAfterSucccessfulInvestigation resPreBindOpt resPostBindOpt (Investigation(i',discrim,path)) (Frontier (i, active,valMap) as frontier) =
-        if debug then dprintf "projecting success of investigation encompassing rule %d through rule %d \n" i' i;
-
-        if (IsMemOfActives path active) then
-            let (SubExpr(accessf,ve) as e),pat = LookupActive path active
-            if debug then dprintf "active...\n";
-
-            let mk_sub_frontiers path accessf' active' argpats pathBuilder = 
-                let mk_sub_active j p = 
-                    let newSubExpr = SubExpr(accessf' j, ve)
-                    let newPath = pathBuilder path j
-                    Active(newPath, newSubExpr, p)
-                let newActives = List.mapi mk_sub_active argpats
-                let investigations = BindProjectionPatterns newActives (active', valMap)
-                mk_frontiers investigations i
-
-            let active' = RemoveActive path active
-            match pat with 
-            | TPat_wild _ | TPat_as _ | TPat_tuple _ | TPat_disjs _ | TPat_conjs _ | TPat_recd _ -> failwith "Unexpected projection pattern"
-            | TPat_query ((_,restys,apatVrefOpt,idx,apinfo),p,m) -> 
-            
-                if total_of_apinfo apinfo then
-            
-                    if (isNone apatVrefOpt && i = i') 
-                       || (DiscrimsEq g discrim (the (GetDiscrimOfPattern pat))) then
-                        let aparity = List.length (names_of_apinfo apinfo)
-                        let accessf' j tpinst e' = 
-                            if aparity <= 1 then the resPreBindOpt 
-                            else
-                                let ucref = mk_choices_ucref g m aparity idx
-                                mk_ucase_field_get_unproven(the resPreBindOpt,ucref,inst_types tpinst restys,j,exprm)
-                        mk_sub_frontiers path accessf' active' [p] (fun path j -> PathQuery(path,int64 j))
-
-                    elif isNone apatVrefOpt then
-
-                        // Successful active patterns  don't refute other patterns
-                        [frontier] 
-                    else
-                        []
-                else 
-                    if i = i' then
-                            let accessf' j tpinst _ =  
-                                mk_ucase_field_get_unproven(the resPreBindOpt, mk_some_ucref g, inst_types tpinst restys, 0, exprm)
-                            mk_sub_frontiers path accessf' active' [p] (fun path j -> PathQuery(path,int64 j))
-                    else 
-                        // Successful active patterns  don't refute other patterns
-                        [frontier]  
-
-            | TPat_unioncase (ucref1, tyargs, argpats,_) -> 
-                match discrim with 
-                | TTest_unionconstr (ucref2, tinst) when g.ucref_eq ucref1 ucref2 ->
-                    let accessf' j tpinst e' = 
-                        match resPostBindOpt with 
-                        | Some e -> mk_ucase_field_get_proven(e,ucref1,tinst,j,exprm)
-                        | None -> mk_ucase_field_get_unproven(accessf tpinst e',ucref1,inst_types tpinst tyargs,j,exprm)
-                        
-                    mk_sub_frontiers path accessf' active' argpats (fun path j -> PathUnionConstr(path,ucref1,tyargs,j))
-                | TTest_unionconstr _ ->
-                    // Successful union case tests DO refute all other union case tests (no overlapping union cases)
-                    []
-                | _ -> 
-                    // Successful union case tests don't refute any other patterns
-                    [frontier]
-
-            | TPat_array (argpats,ty,_) -> 
-                match discrim with
-                | TTest_array_length (n,_) when List.length argpats = n ->
-                    let accessf' j tpinst e' = mk_call_array_get g exprm ty (accessf tpinst e') (mk_int g exprm j)
-                    mk_sub_frontiers path accessf' active' argpats (fun path j -> PathArray(path,ty,List.length argpats,j))
-                | TTest_array_length _ -> 
-                    []
-                | _ -> 
-                    [frontier]
-
-            | TPat_exnconstr (ecref, argpats,_) -> 
-                match discrim with 
-                | TTest_isinst (srcTy,tgtTy) when type_equiv g (mk_tyapp_ty ecref []) tgtTy ->
-                    let accessf' j tpinst e' = mk_exnconstr_field_get(accessf tpinst e',ecref,j,exprm)
-                    mk_sub_frontiers path accessf' active' argpats (fun path j -> PathExnConstr(path,ecref,j))
-                | _ -> 
-                    // Successful type tests against other types don't refute anything
-                    [frontier]
-
-            | TPat_isinst (srcty,tgtTy1,pbindOpt,_) -> 
-                match discrim with 
-                | TTest_isinst (srcTy,tgtTy2) when type_equiv g tgtTy1 tgtTy2  ->
-                    match pbindOpt with 
-                    | Some pbind -> 
-                        let accessf' tpinst e' = 
-                            // Fetch the result from the place where we saved it, if possible
-                            match resPreBindOpt with 
-                            | Some e -> e 
-                            | _ -> 
-                                // Otherwise call the helper
-                               mk_call_unbox_fast g exprm (InstType tpinst tgtTy1) (accessf tpinst e')
-
-                        let (v,e') =  bind_subexpr g amap topgtvs pbind exprm (SubExpr(accessf',ve))
-                        [Frontier (i, active', vspec_map_add v e' valMap)]
-                    | None -> 
-                        [Frontier (i, active', valMap)]
-                    
-                | _ ->
-                    // Successful type tests against other types don't refute anything
-                    [frontier]
-
-            | TPat_null _ -> 
-                match discrim with 
-                | TTest_isnull -> 
-                    [Frontier (i, active',valMap)]
-                | _ ->
-                    // Successful null tests don't refute any other patterns 
-                    [frontier]
-
-            | TPat_const (c1,_) -> 
-                match discrim with 
-                | TTest_const c2 when (c1=c2) -> 
-                    [Frontier (i, active',valMap)]
-                | TTest_const _ -> 
-                    // All constants refute all other constants (no overlapping between constants!)
-                    []
-                | _ ->
-                    [frontier]
-
-            | _ -> failwith "pattern compilation: GenerateNewFrontiersAfterSucccessfulInvestigation"
-        else [frontier] 
-        
-    and BindProjectionPattern (Active(path,subExpr,p) as inp) ((acc_active,acc_vmap) as s) = 
-        let (SubExpr(accessf,ve)) = subExpr 
-        let mk_sub_active pathBuilder accessf'  j p'  = 
-            Active(pathBuilder path j,SubExpr(accessf' j,ve),p')
-            
-        match p with 
-        | TPat_wild _ -> 
-            BindProjectionPatterns [] s 
-        | TPat_as(p',pbind,m) -> 
-            let (v,e') =  bind_subexpr g amap topgtvs pbind m subExpr
-            BindProjectionPattern (Active(path,subExpr,p')) (acc_active,vspec_map_add v e' acc_vmap)
-        | TPat_tuple(ps,tyargs,m) ->
-            let accessf' j tpinst e' = mk_tuple_field_get(accessf tpinst e',inst_types tpinst tyargs,j,exprm)
-            let pathBuilder path j = PathTuple(path,tyargs,j)
-            let newActives = List.mapi (mk_sub_active pathBuilder accessf') ps
-            BindProjectionPatterns newActives s 
-        | TPat_recd(tcref,tinst,ps,m) -> 
-            let newActives = 
-                (ps,instance_rfrefs_of_tcref tcref) ||> List.mapi2 (fun j (finst,p) fref -> 
-                    let accessf' fref j tpinst e' = mk_recd_field_get g (accessf tpinst e',fref,inst_types tpinst tinst,finst,exprm)
-                    let pathBuilder path j = PathRecd(path,tcref,tinst,finst,j)
-                    mk_sub_active pathBuilder (accessf' fref) j p) 
-            BindProjectionPatterns newActives s 
-        | TPat_disjs(ps,m) -> 
-            List.collect (fun p -> BindProjectionPattern (Active(path,subExpr,p)) s)  ps
-        | TPat_conjs(ps,m) -> 
-            let newActives = List.mapi (mk_sub_active (fun path j -> PathConj(path,j)) (fun j -> accessf)) ps
-            BindProjectionPatterns newActives s 
-        
-        | TPat_range (c1,c2,m) ->
-            let res = ref []
-            for i = int c1 to int c2 do
-                res :=  BindProjectionPattern (Active(path,subExpr,TPat_const(TConst_char(char i),m))) s @ !res
-            done;
-            !res
-        (* Assign an identifier to each TPat_query based on our knowledge of the 'identity' of the active pattern, if any *)
-        | TPat_query ((_,_,apatVrefOpt,_,_),_,_) -> 
-            let uniqId = match apatVrefOpt with None -> genUniquePathId() | Some vref -> vref.Stamp
-            let inp = Active(PathQuery(path,uniqId),subExpr,p) 
-            [(inp::acc_active, acc_vmap)] 
-        | _ -> 
-            [(inp::acc_active, acc_vmap)] 
-    and BindProjectionPatterns ps s =
-        List.foldBack (fun p sofar -> List.collect (BindProjectionPattern p) sofar) ps [s] 
-
-    (* The setup routine of the match compiler *)
-    let dtree = 
-      InvestigateFrontiers
-        []
-        (List.concat 
-           (List.mapi 
-              (fun i (TClause(p,opt_when,rhs,_)) -> 
-                let initialSubExpr = SubExpr((fun tpinst x -> x),(expr_for_val topv.Range topv,topv))
-                let investigations = BindProjectionPattern (Active(PathEmpty(ty),initialSubExpr,p)) ([],vspec_map_empty())
-                mk_frontiers investigations i)
-              clausesL)
-          @ 
-          mk_frontiers [([],vspec_map_empty())] nclauses)
-
-    let targets = mbuilder.CloseTargets()
-
-    (* Report unused targets *)
-    let used = acc_targets_of_dtree dtree []
-    let _ = if warnOnUnused then List.iteri (fun i (TClause(_,_,_,patm)) ->  if not (List.mem i used) then warning (RuleNeverMatched patm)) clausesL
-    dtree,targets
-  
-let isPartialOrWhenClause c = IsPatternPartial (pat_of_clause c) or (isSome (when_of_clause c))
-
-
-let rec CompilePattern  g denv amap exprm matchm warnOnUnused actionOnFailure (topv,topgtvs) (clausesL: tclause list) ty =
-  match clausesL with 
-  | _ when List.exists isPartialOrWhenClause clausesL ->
-        // Partial clauses cause major code explosion if treated naively 
-        // Hence treat any pattern matches with any partial clauses clause-by-clause 
-        
-        // First make sure we generate at least some of the obvious incomplete match warnings. 
-        let warnOnUnused = false in (* we can't turn this on since we're pretending all partial's fail in order to control the complexity of this. *)
-        let warnOnIncomplete = true
-        let clausesPretendAllPartialFail = List.collect (fun (TClause(p,whenOpt,tg,m)) -> [TClause(ErasePartialPatterns p,whenOpt,tg,m)]) clausesL
-        let _ = CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (topv,topgtvs) clausesPretendAllPartialFail ty
-        let warnOnIncomplete = false
-        
-        let rec atMostOnePartialAtATime clauses = 
-            if debug then dprintf "atMostOnePartialAtATime: #clauses = %A\n" clauses;
-            match List.takeUntil isPartialOrWhenClause clauses with 
-            | l,[]       -> CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (topv,topgtvs) l ty
-            | l,(h :: t) -> doGroupWithAtMostOnePartial (l @ [h]) t
-        and doGroupWithAtMostOnePartial group rest = 
-            if debug then dprintf "doGroupWithAtMostOnePartial: #group = %A\n" group;
-            let dtree,targets = atMostOnePartialAtATime rest
-            let expr = mk_and_optimize_match NoSequencePointAtInvisibleBinding exprm matchm ty dtree targets
-            CompilePatternBasic 
-                 g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (topv,topgtvs) 
-                 (group @ [TClause(TPat_wild matchm,None,TTarget(FlatList.empty,expr,SuppressSequencePointAtTarget),matchm)]) ty
-        
-
-        atMostOnePartialAtATime clausesL
-      
-  | _ -> 
-      CompilePatternBasic g denv amap exprm matchm warnOnUnused true actionOnFailure (topv,topgtvs) (clausesL: tclause list) ty
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/patcompile.mli b/tools/FSharp_1.9.6.16/source/fsharp/patcompile.mli
deleted file mode 100644
index bc8a0046..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/patcompile.mli
+++ /dev/null
@@ -1,62 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-module (* internal *) Microsoft.FSharp.Compiler.Patcompile
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Range
-
-/// What should the decision tree contain for any incomplete match? 
-type (* internal *) ActionOnFailure = 
-  | Incomplete 
-  | Throw 
-  | Rethrow 
-  | FailFilter
-
-[]
-type (* internal *) pat =
-  | TPat_const of Constant * range
-  | TPat_wild of range
-  | TPat_as of  pat * pbind * range
-  | TPat_disjs of  pat list * range
-  | TPat_conjs of  pat list * range
-  | TPat_query of (expr * typ list * ValRef option * int * ActivePatternInfo) * pat * range
-  | TPat_unioncase of UnionCaseRef * tinst * pat list * range
-  | TPat_exnconstr of TyconRef * pat list * range
-  | TPat_tuple of  pat list * typ list * range
-  | TPat_array of  pat list * typ * range
-  | TPat_recd of TyconRef * tinst * (tinst * pat) list * range
-  | TPat_range of char * char * range
-  | TPat_null of range
-  | TPat_isinst of typ * typ * pbind option * range
-and (* internal *) pbind = PBind of Val * TypeScheme
-
-and (* internal *) tclause =  TClause of pat * expr option * DecisionTreeTarget * range
-
-val internal RangeOfPat : pat -> range
-
-val internal CompilePattern : 
-    Env.TcGlobals ->
-    Tastops.DisplayEnv ->
-    Import.ImportMap -> 
-    range ->  (* range of the expression we are matching on *)
-    range ->  (* range of the whole match clause on *)
-    // warn on unused? 
-    bool ->  
-    ActionOnFailure -> 
-    // the value being matched against, perhaps polymorphic 
-    Val * typars -> 
-    // input type-checked syntax of pattern matching
-    tclause list -> 
-    typ -> 
-      // produce TAST nodes
-      DecisionTree * DecisionTreeTarget list
-	
-
-exception internal MatchIncomplete of bool * (string * bool) option * range
-exception internal RuleNeverMatched of range
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/pickle.ml b/tools/FSharp_1.9.6.16/source/fsharp/pickle.ml
deleted file mode 100644
index deb772ff..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/pickle.ml
+++ /dev/null
@@ -1,2385 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-#if STANDALONE_METADATA
-
-module (* internal *) FSharp.PowerPack.Metadata.Reader.Internal.Pickle
-
-open System.Collections.Generic 
-open FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-open FSharp.PowerPack.Metadata.Reader.Internal.Tast
-open FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-#else
-module Microsoft.FSharp.Compiler.Pickle 
-
-open System.Collections.Generic
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler 
-
-module Ilprint = Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter 
-module Ilx    = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Lib.Bits
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types
-
-
-#endif
-
-let verbose = false
-
-let ffailwith fileName str = failwithf "Error reading/writing metadata for the F# compiled DLL %s. Was the DLL compiled with an earlier version of the F# compiler? (error: %s)" fileName str 
-
-// Fixup pickled data w.r.t. a set of CCU thunks indexed by name
-type PickledDataWithReferences<'rawData> = 
-    { /// The data that uses a collection of CcuThunks internally
-      RawData: 'rawData; 
-      /// The assumptions that need to be fixed up
-      FixupThunks: list } 
-
-    member x.Fixup loader =
-        x.FixupThunks |> List.iter (fun reqd -> reqd.Fixup(loader reqd.AssemblyName)) ;
-        x.RawData
-
-    /// Like Fixup but loader may return None, in which case there is no fixup.
-    member x.OptionalFixup loader =
-        x.FixupThunks 
-        |> List.iter(fun reqd->
-            match loader reqd.AssemblyName with 
-            | Some(loaded) -> reqd.Fixup(loaded)
-            | None -> reqd.FixupOrphaned() );
-        x.RawData
-
-(*
-    /// Like Fixup but loader may return None, in which case there is no fixup.
-    member x.OptionalFixup loader =
-        x.FixupThunks 
-        |> List.iter(fun reqd->
-            match loader reqd with 
-            | Some(loaded) -> fixer (reqd,loaded)
-            | None -> reqd.FixupOrphaned() );
-        x.RawData
-*)
-    
-
-(*---------------------------------------------------------------------------
- * Basic pickle/unpickle state
- *------------------------------------------------------------------------- *)
-
-type 'a tbl = 
-    { name: string;
-      tbl: Dictionary<'a, int>;
-      mutable rows: ResizeArray<'a>;
-      mutable count: int }
-
-let inline new_tbl n = 
-  { name = n;
-    tbl = new System.Collections.Generic.Dictionary<_,_>(1000, HashIdentity.Structural);
-    rows= new ResizeArray<_>(1000);
-    count=0; }
-
-let get_tbl tbl = Seq.to_array tbl.rows
-let tbl_size tbl = tbl.rows.Count
-
-let add_entry tbl x =
-    let n = tbl.count
-    tbl.count <- tbl.count + 1;
-    tbl.tbl.[x] <- n;
-    tbl.rows.Add(x);
-    n
-
-let find_or_add_entry tbl x =
-    let mutable res = Unchecked.defaultof<_>
-    let ok = tbl.tbl.TryGetValue(x,&res)
-    if ok then res else add_entry tbl x
-
-type 'a itbl = 
-    { itbl_name: string;
-      itbl_rows: 'a array }
-
-let new_itbl n r = { itbl_name=n; itbl_rows=r }
-
-#if INCLUDE_METADATA_WRITER
-type osgn_outmap<'data,'osgn> = 
-    | ObservableNodeOutMap of 
-        ('osgn -> stamp) * 
-        ('osgn -> string) * 
-        ('osgn -> range) * 
-        ('osgn -> 'data) * 
-        string * 
-        stamp tbl 
-(* inline this to get known-type-information through to the Hashtbl.create *)
-let inline new_osgn_outmap f g rangeF h nm = ObservableNodeOutMap (f, g,rangeF,h,nm, new_tbl nm)
-let osgn_outmap_size (ObservableNodeOutMap(_,_,_,_,_,x)) = tbl_size x
-
-type WriterState = 
-  { os: Bytes.Bytebuf.t; 
-    oscope: ccu;
-    occus: CcuReference tbl; 
-    otycons: osgn_outmap; 
-    otypars: osgn_outmap; 
-    ovals: osgn_outmap;
-    ostrings: string tbl; 
-    opubpaths: (int[] * int) tbl; 
-    onlpaths: (int * int[]) tbl; 
-    osimpletyps: (int * int) tbl;
-    oglobals : Env.TcGlobals;
-    ofile : string;
-  }
-let pfailwith st str = ffailwith st.ofile str
-
-#endif
-    
-type osgn_inmap<'data,'osgn> = 
-    | ObservableNodeInMap of ('osgn -> 'data -> unit) * ('osgn -> bool) * string * 'osgn array 
-    member x.Get(n:int) = let (ObservableNodeInMap(_,_,_,arr)) = x in arr.[n]
-let new_osgn_inmap mk lnk isLinked nm n = ObservableNodeInMap (lnk,isLinked,nm, Array.init n (fun i -> mk() ))
-
-type ReaderState = 
-  { is: Bytes.Bytestream.t; 
-    iilscope: ILScopeRef;
-    iccus: CcuThunk itbl; 
-    itycons: osgn_inmap;  
-    itypars: osgn_inmap; 
-    ivals: osgn_inmap;
-    istrings: string itbl;
-    ipubpaths: PublicPath itbl; 
-    inlpaths: NonLocalPath itbl; 
-    isimpletyps: typ itbl;
-    ifile: string;
-  }
-
-let ufailwith st str = ffailwith st.ifile str
-
-(*---------------------------------------------------------------------------
- * Basic pickle/unpickle operations
- *------------------------------------------------------------------------- *)
- 
-#if INCLUDE_METADATA_WRITER
-
-type 'a pickler = 'a -> WriterState -> unit
-
-let p_byte b st = Bytes.Bytebuf.emit_int_as_byte st.os b
-let p_bool b st = p_byte (if b then 1 else 0) st
-let p_void (os: WriterState) = ()
-let p_unit () (os: WriterState) = ()
-let prim_p_int32 i st = 
-    p_byte (b0 i) st;
-    p_byte (b1 i) st;
-    p_byte (b2 i) st;
-    p_byte (b3 i) st
-
-/// Compress integers according to the same scheme used by CLR metadata 
-/// This halves the size of pickled data 
-let p_int32 n st = 
-    if n >= 0 &  n <= 0x7F then 
-        p_byte (b0 n) st
-    else if n >= 0x80 & n <= 0x3FFF then  
-        p_byte ( (0x80 ||| (n >>> 8))) st; 
-        p_byte ( (n &&& 0xFF)) st 
-    else 
-        p_byte 0xFF st;
-        prim_p_int32 n st
-
-let p_bytes s st = 
-    let len = Bytes.length s
-    p_int32 (len) st;
-    Bytes.Bytebuf.emit_bytes st.os s
-
-let p_prim_string s st = 
-    let bytes = Bytes.string_as_utf8_bytes s
-    let len = Bytes.length bytes
-    p_int32 (len) st;
-    Bytes.Bytebuf.emit_bytes st.os bytes
-
-let p_int c st = p_int32 c st
-let p_int8 (i:sbyte) st = p_int32 (int32 i) st
-let p_uint8 (i:byte) st = p_byte (int i) st
-let p_int16 (i:int16) st = p_int32 (int32 i) st
-let p_uint16 (x:uint16) st = p_int32 (int32 x) st
-let p_uint32 (x:uint32) st = p_int32 (int32 x) st
-let p_int64 (i:int64) st = 
-    p_int32 (int32 (i &&& 0xFFFFFFFFL)) st;
-    p_int32 (int32 (i >>> 32)) st
-
-let p_uint64 (x:uint64) st = p_int64 (int64 x) st
-
-let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0)
-let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x)
-
-let p_single i st = p_int32 (bits_of_float32 i) st
-let p_double i st = p_int64 (bits_of_float i) st
-let p_ieee64 i st = p_int64 (bits_of_float i) st
-let p_char i st = p_uint16 (uint16 (int32 i)) st
-let inline p_tup2 p1 p2 (a,b) (st:WriterState) = (p1 a st : unit); (p2 b st : unit)
-let inline p_tup3 p1 p2 p3 (a,b,c) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit)
-let inline  p_tup4 p1 p2 p3 p4 (a,b,c,d) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit)
-let inline  p_tup5 p1 p2 p3 p4 p5 (a,b,c,d,e) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit)
-let inline  p_tup6 p1 p2 p3 p4 p5 p6 (a,b,c,d,e,f) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit)
-let inline  ptup7 p1 p2 p3 p4 p5 p6 p7 (a,b,c,d,e,f,x7) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit)
-let inline  ptup8 p1 p2 p3 p4 p5 p6 p7 p8 (a,b,c,d,e,f,x7,x8) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit)
-let inline  ptup9 p1 p2 p3 p4 p5 p6 p7 p8 p9 (a,b,c,d,e,f,x7,x8,x9) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit); (p9 x9 st : unit)
-let inline  ptup10 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 (a,b,c,d,e,f,x7,x8,x9,x10) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit); (p9 x9 st : unit); (p10 x10 st : unit)
-let inline  ptup11 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 (a,b,c,d,e,f,x7,x8,x9,x10,x11) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit); (p9 x9 st : unit); (p10 x10 st : unit); (p11 x11 st : unit)
-let inline  ptup12 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit); (p9 x9 st : unit); (p10 x10 st : unit); (p11 x11 st : unit); (p12 x12 st : unit)
-let inline  ptup13 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit); (p9 x9 st : unit); (p10 x10 st : unit); (p11 x11 st : unit); (p12 x12 st : unit); (p13 x13 st : unit)
-let inline  ptup14 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13,x14) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit); (p9 x9 st : unit); (p10 x10 st : unit); (p11 x11 st : unit); (p12 x12 st : unit); (p13 x13 st : unit) ; (p14 x14 st : unit)
-let inline  ptup15 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13,x14,x15) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit); (p9 x9 st : unit); (p10 x10 st : unit); (p11 x11 st : unit); (p12 x12 st : unit); (p13 x13 st : unit) ; (p14 x14 st : unit); (p15 x15 st : unit)
-
-#endif
-
-let u_byte st = Bytes.Bytestream.read_byte st.is
-
-type 'a unpickler = ReaderState -> 'a
-
-let u_bool st = let b = u_byte st in (b = 1) 
-
-let u_void (is: ReaderState) = ()
-
-let u_unit (is: ReaderState) = ()
-
-let prim_u_int32 st = 
-    let b0 =  (u_byte st)
-    let b1 =  (u_byte st)
-    let b2 =  (u_byte st)
-    let b3 =  (u_byte st)
-    b0 ||| (b1 <<< 8) ||| (b2 <<< 16) ||| (b3 <<< 24)
-
-let u_int32 st = 
-    let b0 = u_byte st
-    if b0 <= 0x7F then b0 
-    else if b0 <= 0xbf then 
-        let b0 = b0 &&& 0x7F
-        let b1 = (u_byte st)
-        (b0 <<< 8) ||| b1
-    else  
-        assert(b0 = 0xFF);
-        prim_u_int32 st
-
-let u_bytes st = 
-    let n =  (u_int32 st)
-    Bytes.Bytestream.read_bytes st.is n
-
-let u_prim_string st = 
-    let len =  (u_int32 st)
-    Bytes.Bytestream.read_utf8_bytes_as_string st.is len
-
-let u_int st = u_int32 st
-let u_int8 st = sbyte (u_int32 st)
-let u_uint8 st = byte (u_byte st)
-let u_int16 st = int16 (u_int32 st)
-let u_uint16 st = uint16 (u_int32 st)
-let u_uint32 st = uint32 (u_int32 st)
-let u_int64 st = 
-    let b1 = (int64 (u_int32 st)) &&& 0xFFFFFFFFL
-    let b2 = int64 (u_int32 st)
-    b1 ||| (b2 <<< 32)
-
-let u_uint64 st = uint64 (u_int64 st)
-let float32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0)
-let float_of_bits (x:int64) = System.BitConverter.Int64BitsToDouble(x)
-
-let u_single st = float32_of_bits (u_int32 st)
-let u_double st = float_of_bits (u_int64 st)
-
-let u_ieee64 st = float_of_bits (u_int64 st)
-
-let u_char st = char (int32 (u_uint16 st))
-
-
-let inline  u_tup2 p1 p2 (st:ReaderState) = let a = p1 st in let b = p2 st in (a,b)
-let inline  u_tup3 p1 p2 p3 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in (a,b,c)
-let inline u_tup4 p1 p2 p3 p4 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in (a,b,c,d)
-let inline u_tup5 p1 p2 p3 p4 p5 (st:ReaderState) =
-  let a = p1 st 
-  let b = p2 st 
-  let c = p3 st 
-  let d = p4 st 
-  let e = p5 st 
-  (a,b,c,d,e)
-let inline u_tup6 p1 p2 p3 p4 p5 p6 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in (a,b,c,d,e,f)
-let inline utup7 p1 p2 p3 p4 p5 p6 p7 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in (a,b,c,d,e,f,x7)
-let inline utup8 p1 p2 p3 p4 p5 p6 p7 p8 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in  (a,b,c,d,e,f,x7,x8)
-let inline utup9 p1 p2 p3 p4 p5 p6 p7 p8 p9 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in (a,b,c,d,e,f,x7,x8,x9)
-let inline utup10 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in
-  let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in
-  let x9 = p9 st in let x10 = p10 st in (a,b,c,d,e,f,x7,x8,x9,x10)
-let inline utup11 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in
-  let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in
-  let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in (a,b,c,d,e,f,x7,x8,x9,x10,x11)
-let inline utup12 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in
-  let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in
-  let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in
-  (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12)
-let inline utup13 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in
-  let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in
-  let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in let x13 = p13 st in
-  (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13)
-let inline utup14 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in
-  let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in
-  let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in let x13 = p13 st in
-  let x14 = p14 st in
-  (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13,x14)
-let inline utup15 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 (st:ReaderState) =
-  let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in
-  let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in
-  let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in let x13 = p13 st in
-  let x14 = p14 st in let x15 = p15 st in
-  (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13,x14,x15)
-
-
-(*---------------------------------------------------------------------------
- * Pickle/unpickle operations for observably shared graph nodes
- *------------------------------------------------------------------------- *)
-
-(* exception Nope *)
-
-(* ctxt is for debugging *)
-#if INCLUDE_METADATA_WRITER
-let p_osgn_ref (ctxt:string) (ObservableNodeOutMap(stampF,nameF,rangeF,derefF,nm,keyTable)) x st = 
-    let idx = find_or_add_entry keyTable (stampF x)
-    //if ((idx >= 1387 && idx <= 1388) && nm = "ovals") then 
-    //    dprintf "idx %d#%d in table %s has name '%s', was defined at '%s' and is referenced from context %s\n" idx (stampF x) nm (nameF x) (string_of_range (rangeF x)) ctxt; 
-    //    System.Diagnostics.Debug.Assert(false)
-    p_int idx st
-
-let p_osgn_decl (ObservableNodeOutMap(stampF,nameF,rangeF,derefF,nm,keyTable)) p x st = 
-    let stamp = stampF x
-    let idx = find_or_add_entry keyTable stamp
-    (* dprintf "decl %d#%d in table %s has name %s\n" idx (stampF x) nm (nameF x);  *)
-    p_tup2 p_int p (idx,derefF x) st
-#endif
-
-let u_osgn_ref (ObservableNodeInMap(lnk,isLinked,nm,arr)) st = 
-    let n = u_int st
-    if n < 0 or n >= Array.length arr then ufailwith st ("u_osgn_ref: out of range, table = "^nm^", n = "^string n); 
-    arr.[n]
-
-let u_osgn_decl (ObservableNodeInMap(lnk,isLinked,nm,arr)) u st = 
-    let idx,data = u_tup2 u_int u st
-  (*   dprintf "unpickling osgn %d in table %s\n" idx nm; *)
-    let res = arr.[idx]
-    lnk res data;
-    res
-
-(*---------------------------------------------------------------------------
- * Pickle/unpickle operations for interned nodes in the term DAG
- *------------------------------------------------------------------------- *)
-
-let encode_uniq tbl key = find_or_add_entry tbl key
-let lookup_uniq st tbl n = 
-  let arr = tbl.itbl_rows
-  if n < 0 or n >= Array.length arr then ufailwith st ("lookup_uniq in table "^tbl.itbl_name^" out of range, n = "^string n^ ", sizeof(tab) = " ^ string (Array.length arr)); 
-  arr.[n]
-
-//---------------------------------------------------------------------------
-// Pickle/unpickle arrays and lists. For lists use the same binary format as arrays so we can switch
-// between internal representations relatively easily
-//------------------------------------------------------------------------- 
- 
-#if INCLUDE_METADATA_WRITER
-let p_array f (x: 'a[]) st =
-    p_int x.Length st;
-    for i = 0 to x.Length-1 do
-        f x.[i] st
-
- 
-let p_list f x st = p_array f (Array.of_list x) st
-
-
-#if FLAT_LIST_AS_LIST
-#else
-let p_FlatList f (x: FlatList<'a>) st = p_list f x st // p_array f (match x.array with null -> [| |] | _ -> x.array) st
-#endif
-#if FLAT_LIST_AS_ARRAY_STRUCT
-let p_FlatList f (x: FlatList<'a>) st = p_array f (match x.array with null -> [| |] | _ -> x.array) st
-#endif
-#if FLAT_LIST_AS_ARRAY
-let p_FlatList f (x: FlatList<'a>) st = p_array f x st
-#endif
-
-let p_wrap (f: 'a -> 'b) (p : 'b pickler) : 'a pickler = (fun x st -> p (f x) st)
-let p_option f x st =
-    match x with 
-    | None -> p_byte 0 st
-    | Some h -> p_byte 1 st; f h st
-
-(*
-let p_lazy p x st = 
-    p (Lazy.force x) st
-*)
-// This is an attempt to pickle lazy values in such a way that they can be read back
-// lazily. However, it doesn't work because the value may contain the definitions of some
-// OSGN nodes. We could record these nodes as we find them and somehow mark them as "lazy tripwire" 
-// OSGN node s when they are reconstituted, i.e. ones where the lazy value is forced before the 
-// OSGN node is dereferenced.
-//
-//
-let p_lazy p x st = 
-    let v = Lazy.force x
-    let fixupPos1 = Bytes.Bytebuf.position st.os
-    //// We fix these up after
-    prim_p_int32 0 st;
-    let fixupPos2 = Bytes.Bytebuf.position st.os
-    prim_p_int32 0 st;
-    let fixupPos3 = Bytes.Bytebuf.position st.os
-    prim_p_int32 0 st;
-    let fixupPos4 = Bytes.Bytebuf.position st.os
-    prim_p_int32 0 st;
-    let fixupPos5 = Bytes.Bytebuf.position st.os
-    prim_p_int32 0 st;
-    let fixupPos6 = Bytes.Bytebuf.position st.os
-    prim_p_int32 0 st;
-    let fixupPos7 = Bytes.Bytebuf.position st.os
-    prim_p_int32 0 st;
-    let idx1 = Bytes.Bytebuf.position st.os
-    let otyconsIdx1 = osgn_outmap_size st.otycons
-    let otyparsIdx1 = osgn_outmap_size st.otypars
-    let ovalsIdx1 = osgn_outmap_size st.ovals
-    // Run the pickler
-    p v st;
-    // Determine and fixup the length of the pickled data
-    let idx2 = Bytes.Bytebuf.position st.os
-    Bytes.Bytebuf.fixup_i32 st.os fixupPos1 (idx2-idx1);
-    // Determine and fixup the ranges of OSGN nodes defined within the lazy portion
-    let otyconsIdx2 = osgn_outmap_size st.otycons
-    let otyparsIdx2 = osgn_outmap_size st.otypars
-    let ovalsIdx2 = osgn_outmap_size st.ovals
-    Bytes.Bytebuf.fixup_i32 st.os fixupPos2 otyconsIdx1;
-    Bytes.Bytebuf.fixup_i32 st.os fixupPos3 otyconsIdx2;
-    Bytes.Bytebuf.fixup_i32 st.os fixupPos4 otyparsIdx1;
-    Bytes.Bytebuf.fixup_i32 st.os fixupPos5 otyparsIdx2;
-    Bytes.Bytebuf.fixup_i32 st.os fixupPos6 ovalsIdx1;
-    Bytes.Bytebuf.fixup_i32 st.os fixupPos7 ovalsIdx2
-
-let p_hole () = 
-    let h = ref (None : 'a pickler option)
-    (fun f -> h := Some f),(fun x st -> match !h with Some f -> f x st | None -> pfailwith st "p_hole: unfilled hole")
-
-
-#endif
-
-let u_array f st =
-    let n = u_int st
-    let res = Array.zeroCreate n
-    for i = 0 to n-1 do
-        res.[i] <- f st
-    res
-
-let u_list f st = Array.to_list (u_array f st)
-
-#if FLAT_LIST_AS_LIST
-#else
-let u_FlatList f st = u_list f st // new FlatList<_> (u_array f st)
-#endif
-#if FLAT_LIST_AS_ARRAY_STRUCT
-let u_FlatList f st = FlatList(u_array f st)
-#endif
-#if FLAT_LIST_AS_ARRAY
-let u_FlatList f st = u_array f st
-#endif
-
-let u_array_revi f st =
-    let n = u_int st
-    let res = Array.zeroCreate n
-    for i = 0 to n-1 do
-        res.[i] <- f st (n-1-i) 
-    res
-
-(* Mark up default constraints with a priority in reverse order: last gets 0 etc. See comment on TTyparDefaultsToType *)
-let u_list_revi f st = Array.to_list (u_array_revi f st)
- 
- 
-let u_wrap (f: 'b -> 'a) (u : 'b unpickler) : 'a unpickler = (fun st -> f (u st))
-
-
-let u_option f st = 
-    let tag = u_byte st
-    match tag with
-    | 0 -> None
-    | 1 -> Some (f st)
-    | n -> ufailwith st ("u_option: found number " ^ string n)
-
-(*
-
-let u_lazy u st = 
-    Lazy.CreateFromValue (u st)
-*)
-
-
-// Boobytrap an OSGN node with a force of a lazy load of a bunch of pickled data
-#if LAZY_UNPICKLE
-let wire (x:osgn<_>) (res:Lazy<_>) = 
-    x.osgnTripWire <- Some(fun () -> res.Force() |> ignore)
-#endif
-
-let u_lazy u st = 
-
-    // Read the number of bytes in the record
-    let len         = prim_u_int32 st // fixupPos1
-    // These are the ranges of OSGN nodes defined within the lazily read portion of the graph
-    let otyconsIdx1 = prim_u_int32 st // fixupPos2
-    let otyconsIdx2 = prim_u_int32 st // fixupPos3
-    let otyparsIdx1 = prim_u_int32 st // fixupPos4
-    let otyparsIdx2 = prim_u_int32 st // fixupPos5
-    let ovalsIdx1   = prim_u_int32 st // fixupPos6
-    let ovalsIdx2   = prim_u_int32 st // fixupPos7
-
-#if LAZY_UNPICKLE
-    // Record the position in the bytestream to use when forcing the read of the data
-    let idx1 = Bytes.Bytestream.position st.is
-    // Skip the length of data
-    Bytes.Bytestream.skip st.is len;
-    // This is the lazy computation that wil force the unpickling of the term.
-    // This term must contain OSGN definitions of the given nodes.
-    let res = 
-        lazy (let st = { st with is = Bytes.Bytestream.clone_and_seek st.is idx1 }
-              u st)
-    /// Force the reading of the data as a "tripwire" for each of the OSGN thunks 
-    for i = otyconsIdx1 to otyconsIdx2-1 do wire (st.itycons.Get(i)) res done;
-    for i = ovalsIdx1   to ovalsIdx2-1   do wire (st.ivals.Get(i))   res done;
-    for i = otyparsIdx1 to otyparsIdx2-1 do wire (st.itypars.Get(i)) res done;
-    res
-#else
-    Lazy.CreateFromValue(u st)
-#endif    
-
-
-let u_hole () = 
-    let h = ref (None : 'a unpickler option)
-    (fun f -> h := Some f),(fun st -> match !h with Some f -> f st | None -> ufailwith st "u_hole: unfilled hole")
-
-(*---------------------------------------------------------------------------
- * Pickle/unpickle F# interface data 
- *------------------------------------------------------------------------- *)
-
-// Strings 
-// A huge number of these occur in pickled F# data, so make them unique 
-let encode_string stringTab x = encode_uniq stringTab x
-let decode_string x = x
-let lookup_string st stringTab x = lookup_uniq st stringTab x
-let u_encoded_string = u_prim_string
-let u_string st   = lookup_uniq st st.istrings (u_int st)
-let u_strings = u_list u_string
-let u_ints = u_list u_int
-
-
-#if INCLUDE_METADATA_WRITER
-let p_encoded_string = p_prim_string
-let p_string s st = p_int (encode_string st.ostrings s) st
-let p_strings = p_list p_string
-let p_ints = p_list p_int
-#endif
-
-// CCU References 
-// A huge number of these occur in pickled F# data, so make them unique 
-let encode_ccuref ccuTab (x:CcuThunk) = encode_uniq ccuTab x.AssemblyName 
-let decode_ccuref x = x
-let lookup_ccuref st ccuTab x = lookup_uniq st ccuTab x
-let u_encoded_ccuref = u_prim_string
-let u_ccuref st   = lookup_uniq st st.iccus (u_int st)
-
-#if INCLUDE_METADATA_WRITER
-let p_encoded_ccuref = p_prim_string
-let p_ccuref s st = p_int (encode_ccuref st.occus s) st
-#endif
-
-// References to public items in this module 
-// A huge number of these occur in pickled F# data, so make them unique 
-let decode_pubpath st stringTab (a,b) = PubPath(Array.map (lookup_string st stringTab) a, lookup_string st stringTab b)
-let lookup_pubpath st pubpathTab x = lookup_uniq st pubpathTab x
-let u_encoded_pubpath = u_tup2 (u_array u_int) u_int
-let u_pubpath st = lookup_uniq st st.ipubpaths (u_int st)
-
-#if INCLUDE_METADATA_WRITER
-let encode_pubpath stringTab pubpathTab (PubPath(a,b)) = encode_uniq pubpathTab (Array.map (encode_string stringTab) a, encode_string stringTab b)
-let p_encoded_pubpath = p_tup2 (p_array p_int) p_int
-let p_pubpath x st = p_int (encode_pubpath st.ostrings st.opubpaths x) st
-#endif
-
-// References to other modules 
-// A huge number of these occur in pickled F# data, so make them unique 
-let decode_nlpath st ccuTab stringTab (a,b) = NLPath(lookup_ccuref st ccuTab a, Array.map (lookup_string st stringTab) b)
-let lookup_nlpath st nlpathTab x = lookup_uniq st nlpathTab x
-let u_encoded_nlpath = u_tup2 u_int (u_array u_int)
-let u_nlpath st = lookup_uniq st st.inlpaths (u_int st)
-
-#if INCLUDE_METADATA_WRITER
-let encode_nlpath ccuTab stringTab nlpathTab (NLPath(a,b)) = encode_uniq nlpathTab (encode_ccuref ccuTab a, Array.map (encode_string stringTab) b)
-let p_encoded_nlpath = p_tup2 p_int (p_array p_int)
-let p_nlpath x st = p_int (encode_nlpath st.occus st.ostrings st.onlpaths x) st
-#endif
-
-// Simple types are types like "int", represented as TType(Ref_nonlocal(...,"int"),[]). 
-// A huge number of these occur in pickled F# data, so make them unique. 
-let decode_simpletyp st ccuTab stringTab nlpathTab (a,b) = TType_app(mk_nonlocal_tcref (lookup_nlpath st nlpathTab a) (lookup_string st stringTab b),[])
-let lookup_simpletyp st simpletypTab x = lookup_uniq st simpletypTab x
-let u_encoded_simpletyp = u_tup2 u_int u_int
-let u_simpletyp st = lookup_uniq st st.isimpletyps (u_int st)
-#if INCLUDE_METADATA_WRITER
-let encode_simpletyp ccuTab stringTab nlpathTab simpletypTab (a,b) = encode_uniq simpletypTab (encode_nlpath ccuTab stringTab nlpathTab a, encode_string stringTab b)
-let p_encoded_simpletyp = p_tup2 p_int p_int
-let p_simpletyp x st = p_int (encode_simpletyp st.occus st.ostrings st.onlpaths st.osimpletyps x) st
-#endif
-
-type sizes = int * int * int 
-#if INCLUDE_METADATA_WRITER
-let pickle_obj_with_dangling_ccus file g scope p x =
-  let ccuNameTab,(sizes: sizes),stringTab,pubpathTab,nlpathTab,simpletypTab,phase1bytes =
-    let st1 = 
-      { os = Bytes.Bytebuf.create 100000; 
-        oscope=scope;
-        occus= new_tbl "occus"; 
-        otycons=new_osgn_outmap (fun (tc:Tycon) -> tc.Stamp) (fun tc -> tc.MangledName) (fun tc -> tc.Range) (fun osgn -> osgn.Data) "otycons"; 
-        otypars=new_osgn_outmap (fun (tp:Typar) -> tp.Stamp) (fun tp -> tp.DisplayName) (fun tp -> tp.Range) (fun osgn -> osgn.Data) "otypars"; 
-        ovals=new_osgn_outmap (fun (v:Val) -> v.Stamp) (fun v -> v.MangledName) (fun v -> v.Range) (fun osgn -> osgn.Data)  "ovals";
-        ostrings=new_tbl "ostrings";
-        onlpaths=new_tbl "onlpaths";  
-        opubpaths=new_tbl "opubpaths";  
-        osimpletyps=new_tbl "osimpletyps";  
-        oglobals=g;
-        ofile=file;
-        (* REINSTATE: odecomps=new_osgn_outmap stamp_of_decomp name_of_decomp "odecomps"; *) }
-    p x st1;
-    let sizes = 
-      osgn_outmap_size st1.otycons,
-      osgn_outmap_size st1.otypars,
-      osgn_outmap_size st1.ovals 
-    st1.occus, sizes, st1.ostrings, st1.opubpaths,st1.onlpaths, st1.osimpletyps, Bytes.Bytebuf.close st1.os
-  let phase2data = (get_tbl ccuNameTab,sizes,get_tbl stringTab,get_tbl pubpathTab,get_tbl nlpathTab,get_tbl simpletypTab,phase1bytes)
-  let phase2bytes = 
-    let st2 = 
-     { os = Bytes.Bytebuf.create 100000; 
-       oscope=scope;
-       occus= new_tbl "occus (fake)"; 
-       otycons=new_osgn_outmap (fun (tc:Tycon) -> tc.Stamp) (fun tc -> tc.MangledName) (fun tc -> tc.Range) (fun osgn -> osgn.Data) "otycons"; 
-       otypars=new_osgn_outmap (fun (tp:Typar) -> tp.Stamp) (fun tp -> tp.DisplayName) (fun tp -> tp.Range) (fun osgn -> osgn.Data) "otypars"; 
-       ovals=new_osgn_outmap (fun (v:Val) -> v.Stamp) (fun v -> v.MangledName) (fun v -> v.Range) (fun osgn -> osgn.Data)  "ovals";
-       ostrings=new_tbl "ostrings (fake)";
-       opubpaths=new_tbl "opubpaths (fake)";
-       onlpaths=new_tbl "onlpaths (fake)";
-       osimpletyps=new_tbl "osimpletyps (fake)";
-       oglobals=g;
-       ofile=file; }
-    ptup7
-      (p_array p_encoded_ccuref) 
-      (p_tup3 p_int p_int p_int) 
-      (p_array p_encoded_string) 
-      (p_array p_encoded_pubpath) 
-      (p_array p_encoded_nlpath) 
-      (p_array p_encoded_simpletyp) 
-      p_bytes 
-      phase2data st2;
-    Bytes.Bytebuf.close st2.os
-  phase2bytes
-  
-#endif
-    
-#if CHECKED
-let check (ilscope:ILScopeRef) (ObservableNodeInMap(lnk,isLinked,nm,arr)) =
-    for i = 0 to arr.Length-1 do
-      let n = arr.[i]
-      if not (isLinked n) then 
-        printf "*** unpickle: osgn %d in table %s with IL scope %s had no matching declaration (was not fixed up)\nPlease report this warning. (Note for compiler developers: to get information about which item this index relates to, enable the conditional in Pickle.p_osgn_ref to refer to the given index number and recompile an identical copy of the source for the DLL containing the data being unpickled.  A message will then be printed indicating the name of the item.\n" i nm ilscope.QualifiedName
-#endif
-
-let unpickle_obj_with_dangling_ccus file ilscope u (phase2bytes:byte[]) =
-    let st2 = 
-       { is = Bytes.Bytestream.of_bytes phase2bytes 0 phase2bytes.Length; 
-         iilscope= ilscope;
-         iccus= new_itbl "iccus (fake)" [| |]; 
-         itycons= new_osgn_inmap Tycon.NewUnlinked (fun osgn tg -> osgn.Link(tg)) (fun osgn -> osgn.IsLinked) "itycons" 0; 
-         itypars= new_osgn_inmap Typar.NewUnlinked (fun osgn tg -> osgn.Link(tg)) (fun osgn -> osgn.IsLinked) "itypars" 0; 
-         ivals  = new_osgn_inmap Val.NewUnlinked   (fun osgn tg -> osgn.Link(tg)) (fun osgn -> osgn.IsLinked) "ivals" 0;
-         istrings = new_itbl "istrings (fake)" [| |]; 
-         inlpaths = new_itbl "inlpaths (fake)" [| |]; 
-         ipubpaths = new_itbl "ipubpaths (fake)" [| |]; 
-         isimpletyps = new_itbl "isimpletyps (fake)" [| |]; 
-         ifile=file }
-    let phase2data = 
-        utup7
-           (u_array u_encoded_ccuref) 
-           (u_tup3 u_int u_int u_int) 
-           (u_array u_encoded_string) 
-           (u_array u_encoded_pubpath) 
-           (u_array u_encoded_nlpath) 
-           (u_array u_encoded_simpletyp) 
-           u_bytes st2
-    let ccuNameTab,sizes,stringTab,pubpathTab,nlpathTab,simpletypTab,phase1bytes = phase2data
-    let ccuTab       = new_itbl "iccus"       (Array.map (CcuThunk.CreateDelayed) ccuNameTab)
-    let stringTab    = new_itbl "istrings"    (Array.map decode_string stringTab)
-    let pubpathTab   = new_itbl "ipubpaths"   (Array.map (decode_pubpath st2 stringTab) pubpathTab)
-    let nlpathTab    = new_itbl "inlpaths"    (Array.map (decode_nlpath st2 ccuTab stringTab) nlpathTab)
-    let simpletypTab = new_itbl "isimpletyps" (Array.map (decode_simpletyp st2 ccuTab stringTab nlpathTab) simpletypTab)
-    let ((ntycons,ntypars,nvals) : sizes) = sizes
-    let data = 
-        let st1 = 
-           { is = Bytes.Bytestream.of_bytes phase1bytes 0 phase1bytes.Length; 
-             iccus=  ccuTab; 
-             iilscope= ilscope;
-             itycons= new_osgn_inmap Tycon.NewUnlinked (fun osgn tg -> osgn.Link(tg)) (fun osgn -> osgn.IsLinked)  "itycons" ntycons; 
-             itypars= new_osgn_inmap Typar.NewUnlinked (fun osgn tg -> osgn.Link(tg)) (fun osgn -> osgn.IsLinked) "itypars" ntypars; 
-             ivals=   new_osgn_inmap Val.NewUnlinked   (fun osgn tg -> osgn.Link(tg)) (fun osgn -> osgn.IsLinked) "ivals" nvals;
-             istrings = stringTab;
-             ipubpaths = pubpathTab;
-             inlpaths = nlpathTab;
-             isimpletyps = simpletypTab;
-             ifile=file }
-        let res = u st1
-#if CHECKED
-#if LAZY_UNPICKLE
-#else
-        check ilscope st1.itycons;
-        check ilscope st1.ivals;
-        check ilscope st1.itypars;
-#endif
-#endif
-        res
-
-    {RawData=data; FixupThunks=Array.to_list ccuTab.itbl_rows }
-    
-
-(*=========================================================================*)
-(* PART II *)
-(*=========================================================================*)
-
-(*---------------------------------------------------------------------------
- * Pickle/unpickle for Abstract IL data, up to IL instructions 
- *------------------------------------------------------------------------- *)
-
-#if INCLUDE_METADATA_WRITER
-let p_pubkey x st = 
-    match x with 
-    | PublicKey b      -> p_byte 0 st; p_bytes b st
-    | PublicKeyToken b -> p_byte 1 st; p_bytes b st
-let p_version x st = p_tup4 p_uint16 p_uint16 p_uint16 p_uint16 x st
-let p_modref (x:ILModuleRef) st = 
-    p_tup3 p_string p_bool (p_option p_bytes) (x.Name,x.HasMetadata,x.Hash) st
-let p_assref (x:ILAssemblyRef) st =
-  p_tup6 p_string (p_option p_bytes) (p_option p_pubkey) p_bool (p_option p_version) (p_option p_string)
-    ( x.Name,x.Hash,x.PublicKey,x.Retargetable,x.Version,x.Locale) st
-let p_scoref x st = 
-  match x with 
-  | ScopeRef_local         -> p_byte 0 st; p_void st
-  | ScopeRef_module mref   -> p_byte 1 st; p_modref mref st
-  | ScopeRef_assembly aref -> p_byte 2 st; p_assref aref st
-#endif
-
-let u_pubkey st = 
-    let tag = u_byte st
-    match tag with
-    | 0 -> u_bytes st |> (fun b -> PublicKey b) 
-    | 1 -> u_bytes st |> (fun b -> PublicKeyToken b) 
-    | _ -> ufailwith st "u_pubkey"
-
-let u_version st = u_tup4 u_uint16 u_uint16 u_uint16 u_uint16 st
-
-let u_modref st = 
-    let (a,b,c) = u_tup3 u_string u_bool (u_option u_bytes) st
-    ILModuleRef.Create(a, b, c)
-
-let u_assref st =
-  let a,b,c,d,e,f = u_tup6 u_string (u_option u_bytes) (u_option u_pubkey) u_bool (u_option u_version) (u_option u_string) st
-  ILAssemblyRef.Create(a, b, c, d, e, f)
-
-// IL scope references are rescoped as they are unpickled.  This means 
-// the pickler accepts IL fragments containing ScopeRef_local, as we adjust 
-// these to be absolute scope references during unpickling.  
-let u_scoref st = 
-  let res = 
-    let tag = u_byte st
-    match tag with
-    | 0 -> u_void   st |> (fun () -> ScopeRef_local)
-    | 1 -> u_modref st |> (fun mref -> ScopeRef_module mref)
-    | 2 -> u_assref st |> (fun aref -> ScopeRef_assembly aref)
-    | _ -> ufailwith st "u_scoref"  
-  let res = rescope_scoref st.iilscope res 
-  res
-
-#if INCLUDE_METADATA_WRITER
-let p_hasthis x st = 
-  p_byte (match x with 
-          | CC_instance -> 0
-          | CC_instance_explicit -> 1
-          | CC_static -> 2) st
-let p_array_shape = p_wrap (fun (ILArrayShape x) -> x) (p_list (p_tup2 (p_option p_int32) (p_option p_int32)))
-let fill_p_iltyp,p_iltyp = p_hole()
-let p_iltyps = (p_list p_iltyp)
-let p_basic_callconv x st = 
-  p_byte (match x with 
-          | CC_default -> 0
-          | CC_cdecl  -> 1
-          | CC_stdcall -> 2
-          | CC_thiscall -> 3
-          | CC_fastcall -> 4
-          | CC_vararg -> 5) st
-let p_callconv (Callconv(x,y)) st = p_tup2 p_hasthis p_basic_callconv (x,y) st
-let p_callsig = p_wrap (fun x -> (x.callsigCallconv,x.callsigArgs,x.callsigReturn)) (p_tup3 p_callconv p_iltyps p_iltyp)
-let p_iltref (x:ILTypeRef) st = p_tup3 p_scoref p_strings p_string (x.Scope,x.Enclosing,x.Name) st
-let p_iltspec (a:ILTypeSpec) st = p_tup2 p_iltref p_iltyps (a.TypeRef,a.GenericArgs) st
-let _ = fill_p_iltyp (fun ty st ->
-  match ty with 
-  | Type_void             -> p_byte 0 st; p_void st
-  | Type_array (shape,ty) -> p_byte 1 st; p_tup2 p_array_shape p_iltyp (shape,ty) st
-  | Type_value tspec      -> p_byte 2 st; p_iltspec tspec st
-  | Type_boxed tspec      -> p_byte 3 st; p_iltspec tspec st
-  | Type_ptr ty           -> p_byte 4 st; p_iltyp ty st
-  | Type_byref ty         -> p_byte 5 st; p_iltyp ty st
-  | Type_fptr csig        -> p_byte 6 st; p_callsig csig st
-  | Type_tyvar n          -> p_byte 7 st; p_uint16 n st
-  | Type_modified (req,tref,ty) -> p_byte 8 st; p_tup3 p_bool p_iltref p_iltyp (req,tref,ty) st)
-#endif
-let u_basic_callconv st = 
-  match u_byte st with 
-  | 0 -> CC_default 
-  | 1 -> CC_cdecl  
-  | 2 -> CC_stdcall 
-  | 3 -> CC_thiscall 
-  | 4 -> CC_fastcall 
-  | 5 -> CC_vararg
-  | _ -> ufailwith st "u_basic_callconv"
-
-let u_hasthis st = 
-  match u_byte st with 
-  | 0 -> CC_instance 
-  | 1 -> CC_instance_explicit 
-  | 2 -> CC_static 
-  | _ -> ufailwith st "u_hasthis"
-
-let u_callconv st = let a,b = u_tup2 u_hasthis u_basic_callconv st in Callconv(a,b)
-let u_iltref st = let a,b,c = u_tup3 u_scoref u_strings u_string st in ILTypeRef.Create(a, b, c) 
-let u_array_shape = u_wrap (fun x -> ILArrayShape x) (u_list (u_tup2 (u_option u_int32) (u_option u_int32)))
-
-
-let fill_u_iltyp,u_iltyp = u_hole()
-let u_iltyps = (u_list u_iltyp)
-let u_callsig = u_wrap (fun (a,b,c) -> {callsigCallconv=a; callsigArgs=b; callsigReturn=c}) (u_tup3 u_callconv u_iltyps u_iltyp)
-let u_iltspec st = let a,b = u_tup2 u_iltref u_iltyps st in ILTypeSpec.Create(a,b)
-
-let _ = fill_u_iltyp (fun st ->
-  let tag = u_byte st
-  match tag with
-  | 0 -> u_void st |> (fun () -> Type_void)
-  | 1 -> u_tup2 u_array_shape u_iltyp  st |> (fun (arr,ty) -> Type_array (arr,ty))
-  | 2 -> u_iltspec st |> (fun x -> Type_value x)
-  | 3 -> u_iltspec st |> (fun x -> Type_boxed x)
-  | 4 -> u_iltyp st |> (fun x -> Type_ptr x)
-  | 5 -> u_iltyp st |> (fun x -> Type_byref x)
-  | 6 -> u_callsig st |> (fun x -> Type_fptr x)
-  | 7 -> u_uint16 st |> (fun x -> Type_tyvar x)
-  | 8 -> u_tup3 u_bool u_iltref u_iltyp  st |> (fun (req,tref,ty) -> Type_modified (req,tref,ty))
-  | 9 -> u_tup2 u_array_shape u_iltyp  st |> (fun (shape,ty) -> Type_array (shape,ty))
-  | _ -> ufailwith st "u_iltyp")
-
-
-#if INCLUDE_METADATA_WRITER
-let p_ilmref (x:ILMethodRef) st = p_tup6 p_iltref p_callconv p_int p_string p_iltyps p_iltyp (x.EnclosingTypeRef,x.CallingConv,x.GenericArity,x.Name,x.ArgTypes,x.ReturnType) st
-let p_ilfref x st = p_tup3 p_iltref p_string p_iltyp (x.frefParent,x.frefName,x.frefType) st
-let pilmspec x st = p_tup3 p_ilmref p_iltyp p_iltyps (dest_mspec x) st
-let pilfspec x st = p_tup2 p_ilfref p_iltyp (x.fspecFieldRef,x.fspecEnclosingType) st
-let pbasic_type x st = p_int (match x with DT_R -> 0 | DT_I1 -> 1 | DT_U1 -> 2 | DT_I2 -> 3 | DT_U2 -> 4 | DT_I4 -> 5 | DT_U4 -> 6 | DT_I8 -> 7 | DT_U8 -> 8 | DT_R4 -> 9 | DT_R8 -> 10 | DT_I -> 11 | DT_U -> 12 | DT_REF -> 13) st
-let p_ldtoken_info x st = 
-  match x with 
-  | Token_type ty -> p_byte 0 st; p_iltyp ty st
-  | Token_method x -> p_byte 1 st; pilmspec x st
-  | Token_field x -> p_byte 2 st; pilfspec x st
-let p_alignment x st = p_int (match x with Aligned -> 0 | Unaligned_1 -> 1 | Unaligned_2 -> 2 | Unaligned_4 -> 3) st
-let p_volatility x st = p_int (match x with Volatile -> 0 | Nonvolatile -> 1) st
-let p_readonly x st = p_int (match x with ReadonlyAddress -> 0 | NormalAddress -> 1) st
-let p_tailness x st = p_int (match x with Tailcall -> 0 | Normalcall -> 1) st
-let p_varargs = p_option p_iltyps
-let p_ldc_info x st = 
-  match x with 
-  | NUM_I4 x -> p_byte 0 st; p_int32 x st
-  | NUM_I8 x -> p_byte 1 st; p_int64 x st
-  | NUM_R4 x -> p_byte 2 st; p_single x st
-  | NUM_R8 x -> p_byte 3 st; p_ieee64 x st
-
-#endif
-
-let u_ilmref st = 
-    let x1,x2,x3,x4,x5,x6 = u_tup6 u_iltref u_callconv u_int u_string u_iltyps u_iltyp st
-    ILMethodRef.Create(x1,x2,x4,x3,x5,x6)
-
-let u_ilfref st = let x1,x2,x3 = u_tup3 u_iltref u_string u_iltyp st in {frefParent=x1;frefName=x2;frefType=x3}
-
-let uilmspec st = let x1,x2,x3 = u_tup3 u_ilmref u_iltyp u_iltyps st in ILMethodSpec.Create(x2,x1,x3)
-let uilfspec st = let x1,x2 = u_tup2 u_ilfref u_iltyp st in {fspecFieldRef=x1;fspecEnclosingType=x2}
-
-let ubasic_type st = (match u_int st with  0 -> DT_R | 1 -> DT_I1 | 2 -> DT_U1 | 3 -> DT_I2 | 4 -> DT_U2 | 5 -> DT_I4 | 6 -> DT_U4 | 7 -> DT_I8 | 8 -> DT_U8 | 9 -> DT_R4 | 10 -> DT_R8 | 11 -> DT_I | 12 -> DT_U | 13 -> DT_REF | _ -> ufailwith st "ubasic_type" )
-  
-let u_ldtoken_info st = 
-  let tag = u_byte st
-  match tag with
-  | 0 -> u_iltyp st |> (fun x -> Token_type x)
-  | 1 -> uilmspec st |> (fun x -> Token_method x)
-  | 2 -> uilfspec st |> (fun x -> Token_field x)
-  | _ -> ufailwith st "u_ldtoken_info"
-  
-let u_ldc_info st = 
-  let tag = u_byte st
-  match tag with
-  | 0 -> u_int32 st |> (fun x -> NUM_I4 x)
-  | 1 -> u_int64 st |> (fun x -> NUM_I8 x)
-  | 2 -> u_single st |> (fun x -> NUM_R4 x)
-  | 3 -> u_ieee64 st |> (fun x -> NUM_R8 x)
-  | _ -> ufailwith st "u_ldtoken_info"
-  
-let u_alignment st = (match u_int st with  0 -> Aligned | 1 -> Unaligned_1 | 2 -> Unaligned_2 | 3 -> Unaligned_4 | _ -> ufailwith st "u_alignment" )
-let u_volatility st = (match u_int st with  0 -> Volatile | 1 -> Nonvolatile | _ -> ufailwith st "u_volatility" )
-let u_readonly st = (match u_int st with  0 -> ReadonlyAddress | 1 -> NormalAddress | _ -> ufailwith st "u_readonly" )
-let u_tailness st = (match u_int st with  0 -> Tailcall | 1 -> Normalcall | _ -> ufailwith st "u_tailness" )
-let u_varargs = u_option u_iltyps
-  
-let itag_nop         = 0 
-let itag_break       = 1 
-let itag_ldarg       = 2 
-let itag_ldloc       = 3
-let itag_stloc       = 4 
-let itag_ldnull      = 5 
-let itag_ldc         = 6 
-let itag_dup           = 7 
-let itag_pop           = 8 
-let itag_jmp           = 9 
-let itag_call          = 10 
-let itag_calli         = 11 
-let itag_ret           = 12 
-let itag_br            = 13 
-let itag_brfalse       = 14 
-let itag_brtrue        = 15 
-let itag_beq           = 16 
-let itag_bge           = 17 
-let itag_bgt           = 18 
-let itag_ble           = 19 
-let itag_blt           = 20 
-let itag_bne_un        = 21 
-let itag_bge_un        = 22 
-let itag_bgt_un        = 23 
-let itag_ble_un        = 24 
-let itag_blt_un        = 25 
-let itag_switch        = 26 
-let itag_ldind         = 27
-let itag_stind         = 28
-let itag_add           = 29
-let itag_sub           = 30 
-let itag_mul           = 31
-let itag_div           = 32 
-let itag_div_un        = 33 
-let itag_rem           = 34 
-let itag_rem_un        = 35 
-let itag_and           = 36 
-let itag_or            = 37 
-let itag_xor           = 38 
-let itag_shl           = 39 
-let itag_shr           = 40 
-let itag_shr_un        = 41 
-let itag_neg           = 42 
-let itag_not           = 43 
-let itag_conv       = 44
-let itag_conv_un     = 45 
-let itag_conv_ovf   = 46
-let itag_conv_ovf_un   = 47
-let itag_callvirt      = 48 
-let itag_cpobj         = 49 
-let itag_ldobj         = 50 
-let itag_ldstr         = 51 
-let itag_newobj        = 52 
-let itag_castclass     = 53 
-let itag_isinst        = 54 
-let itag_unbox         = 55 
-let itag_throw         = 56 
-let itag_ldfld         = 57 
-let itag_ldflda        = 58 
-let itag_stfld         = 59 
-let itag_ldsfld        = 60 
-let itag_ldsflda       = 61 
-let itag_stsfld        = 62 
-let itag_stobj         = 63 
-let itag_box           = 64 
-let itag_newarr        = 65 
-let itag_ldlen         = 66 
-let itag_ldelema       = 67 
-let itag_ldelem     = 68
-let itag_stelem      = 69 
-let itag_refanyval     = 70 
-let itag_ckfinite      = 71 
-let itag_mkrefany      = 72 
-let itag_ldtoken       = 73 
-let itag_add_ovf       = 74 
-let itag_add_ovf_un    = 75 
-let itag_mul_ovf       = 76 
-let itag_mul_ovf_un    = 77 
-let itag_sub_ovf       = 78 
-let itag_sub_ovf_un    = 79 
-let itag_endfinally    = 80 
-let itag_leave         = 81 
-let itag_arglist        = 82
-let itag_ceq        = 83
-let itag_cgt        = 84
-let itag_cgt_un        = 85
-let itag_clt        = 86
-let itag_clt_un        = 87
-let itag_ldftn        = 88 
-let itag_ldvirtftn    = 89 
-let itag_ldarga      = 90 
-let itag_starg       = 91 
-let itag_ldloca      = 92 
-let itag_localloc     = 93 
-let itag_endfilter    = 94 
-let itag_unaligned   = 95 
-let itag_volatile    = 96 
-let itag_constrained    = 97
-let itag_readonly    = 98
-let itag_tail        = 99 
-let itag_initobj             = 100
-let itag_cpblk       = 101
-let itag_initblk             = 102
-let itag_rethrow             = 103 
-let itag_sizeof      = 104
-let itag_refanytype   = 105
-let itag_ldelem_any = 106
-let itag_stelem_any = 107
-let itag_unbox_any = 108
-let itag_ldunit = 109
-let itag_ldlen_multi = 113
-let itag_callconstrained      = 114 
-let itag_ilzero = 115
-
-let simple_instrs = 
- [
-  itag_ret,              (I_ret);
-  itag_add,              (I_arith AI_add);
-  itag_add_ovf,        (I_arith AI_add_ovf);
-  itag_add_ovf_un,   (I_arith AI_add_ovf_un);
-  itag_and,              (I_arith AI_and);  
-  itag_div,              (I_arith AI_div); 
-  itag_div_un,         (I_arith AI_div_un);
-  itag_ceq,              (I_arith AI_ceq);  
-  itag_cgt,              (I_arith AI_cgt );
-  itag_cgt_un,         (I_arith AI_cgt_un);
-  itag_clt,              (I_arith AI_clt);
-  itag_clt_un,         (I_arith AI_clt_un);
-  itag_mul,   (I_arith AI_mul  );
-  itag_mul_ovf,   (I_arith AI_mul_ovf);
-  itag_mul_ovf_un,   (I_arith AI_mul_ovf_un);
-  itag_rem,   (I_arith AI_rem  );
-  itag_rem_un,   (I_arith AI_rem_un ); 
-  itag_shl,   (I_arith AI_shl ); 
-  itag_shr,   (I_arith AI_shr ); 
-  itag_shr_un,   (I_arith AI_shr_un);
-  itag_sub,   (I_arith AI_sub  );
-  itag_sub_ovf,   (I_arith AI_sub_ovf);
-  itag_sub_ovf_un,   (I_arith AI_sub_ovf_un); 
-  itag_xor,   (I_arith AI_xor);  
-  itag_or,   (I_arith AI_or);     
-  itag_neg,   (I_arith AI_neg);     
-  itag_not,   (I_arith AI_not);     
-  itag_ldnull,   (I_arith AI_ldnull);   
-  itag_dup,   (I_arith AI_dup);   
-  itag_pop,   (I_arith AI_pop);
-  itag_ckfinite,   (I_arith AI_ckfinite);
-  itag_nop,   (I_arith AI_nop);
-  itag_break,   (I_break);
-  itag_arglist,   (I_arglist);
-  itag_endfilter,   (I_endfilter);
-  itag_endfinally,   I_endfinally;
-  itag_refanytype,   (I_refanytype);
-  itag_localloc,   (I_localloc);
-  itag_throw,   (I_throw);
-  itag_ldlen,   (I_ldlen);
-  itag_rethrow,       (I_rethrow);
-];;
-
-let encode_table = Dictionary<_,_>(300);;
-let _ = List.iter (fun (icode,i) -> encode_table.[i] <- icode) simple_instrs;;
-let encode_instr si = encode_table.[si]
-let is_noarg_instr s = encode_table.ContainsKey s
-
-let decoders = 
- [ itag_ldarg, (u_uint16 >>  (fun x -> I_ldarg x));
-   itag_starg, (u_uint16 >>  (fun x -> I_starg x));
-   itag_ldarga, (u_uint16 >>  (fun x -> I_ldarga x));
-   itag_stloc, (u_uint16 >>  (fun x -> I_stloc x));
-   itag_ldloc, (u_uint16 >>  (fun x -> I_ldloc x));
-   itag_ldloca, (u_uint16 >>  (fun x -> I_ldloca x)); 
-   itag_stind, (u_tup3 u_alignment u_volatility ubasic_type) >> (fun (a,b,c) -> I_stind (a,b,c));
-   itag_ldind, (u_tup3 u_alignment u_volatility ubasic_type) >> (fun (a,b,c) -> I_ldind (a,b,c));
-   itag_cpblk, (u_tup2 u_alignment u_volatility) >> (fun (a,b) -> I_cpblk (a,b));
-   itag_initblk, (u_tup2 u_alignment u_volatility) >> (fun (a,b) -> I_initblk (a,b));
-   itag_call, (u_tup3 u_tailness uilmspec u_varargs) >> (fun (a,b,c) -> I_call (a,b,c));
-   itag_callvirt, (u_tup3 u_tailness uilmspec u_varargs) >> (fun (a,b,c) -> I_callvirt (a,b,c));
-   itag_callconstrained, (u_tup4 u_tailness u_iltyp uilmspec u_varargs) >> (fun (a,b,c,d) -> I_callconstraint (a,b,c,d));
-   itag_newobj, (u_tup2 uilmspec u_varargs) >> (fun (a,b) -> I_newobj (a,b));
-   itag_ldftn, uilmspec >> (fun a -> I_ldftn (a));
-   itag_ldvirtftn, uilmspec >> (fun a -> I_ldvirtftn (a));
-   itag_calli, (u_tup3 u_tailness u_callsig u_varargs) >> (fun (a,b,c) -> I_calli (a,b,c));
-   itag_ldc, (u_tup2 ubasic_type u_ldc_info) >> (fun (a,b) -> I_arith (AI_ldc (a,b)));
-   itag_conv, ubasic_type >> (fun a -> I_arith (AI_conv a));
-   itag_conv_ovf, ubasic_type >> (fun a -> I_arith (AI_conv_ovf a));
-   itag_conv_ovf_un, ubasic_type >> (fun a -> I_arith (AI_conv_ovf_un a));
-   itag_stelem, ubasic_type >> (fun a -> I_stelem a);
-   itag_ldelem, ubasic_type >> (fun a -> I_ldelem a);
-   itag_ldfld, (u_tup3 u_alignment u_volatility uilfspec) >> (fun (a,b,c) -> I_ldfld (a,b,c));
-   itag_ldflda, uilfspec >> (fun a -> I_ldflda a);
-   itag_ldsfld, (u_tup2 u_volatility uilfspec) >> (fun (a,b) -> I_ldsfld (a,b));
-   itag_ldsflda, uilfspec >> (fun a -> I_ldsflda a);
-   itag_stfld, (u_tup3 u_alignment u_volatility uilfspec) >> (fun (a,b,c) -> I_stfld (a,b,c));
-   itag_stsfld, (u_tup2 u_volatility uilfspec) >> (fun (a,b) -> I_stsfld (a,b));
-   itag_ldtoken, u_ldtoken_info >> (fun a -> I_ldtoken a);
-   itag_ldstr, u_string >> (fun a -> I_ldstr a);
-   itag_box, u_iltyp >> (fun a -> I_box a);
-   itag_unbox, u_iltyp >> (fun a -> I_unbox a);
-   itag_unbox_any, u_iltyp >> (fun a -> I_unbox_any a);
-   itag_newarr, u_tup2 u_array_shape u_iltyp >> (fun (a,b) -> I_newarr(a,b));
-   itag_stelem_any, u_tup2 u_array_shape u_iltyp >> (fun (a,b) -> I_stelem_any(a,b));
-   itag_ldelem_any, u_tup2 u_array_shape u_iltyp >> (fun (a,b) -> I_ldelem_any(a,b));
-   itag_ldelema, u_tup3 u_readonly u_array_shape u_iltyp >> (fun (a,b,c) -> I_ldelema(a,b,c));
-   itag_castclass, u_iltyp >> (fun a -> I_castclass a);
-   itag_isinst, u_iltyp >> (fun a -> I_isinst a);
-   itag_refanyval, u_iltyp >> (fun a -> I_refanyval a);
-   itag_mkrefany, u_iltyp >> (fun a -> I_mkrefany a);
-   itag_initobj, u_iltyp >> (fun a -> I_initobj a);
-   itag_initobj, u_iltyp >> (fun a -> I_initobj a);
-   itag_ldobj, (u_tup3 u_alignment u_volatility u_iltyp) >> (fun (a,b,c) -> I_ldobj (a,b,c));
-   itag_stobj, (u_tup3 u_alignment u_volatility u_iltyp) >> (fun (a,b,c) -> I_stobj (a,b,c));
-   itag_cpobj, u_iltyp >> (fun a -> I_cpobj a);
-   itag_sizeof, u_iltyp >> (fun a -> I_sizeof a);
-   itag_ilzero, u_iltyp >> (fun ty -> EI_ilzero ty);
-   itag_ldlen_multi, u_tup2 u_int32 u_int32 >> (fun (a,b) -> EI_ldlen_multi (a,b));
-   ] 
-
-let decode_tab = 
-  let tab = Array.init 256 (fun n -> (fun st -> ufailwith st ("no decoder for instruction "^string n)))
-  let add_instr (icode,f) =  tab.[icode] <- f
-  List.iter add_instr decoders;
-  List.iter (fun (icode,mk) -> add_instr (icode,(fun _ -> mk))) simple_instrs;
-  tab
-
-#if INCLUDE_METADATA_WRITER
-let p_instr n p x st = 
-  p_int n st; p x st
-
-let rec p_ilinstr x st =
-  match x with
-  | si when is_noarg_instr si -> p_instr (encode_instr si) p_unit () st
-  | I_leave _ | I_brcmp _ | I_br _ | I_switch _ -> pfailwith st "p_ilinstr: cannot encode branches"
-  | I_seqpoint s ->   ()
-  | I_call      (tl,mspec,varargs) -> p_instr itag_call (p_tup3 p_tailness pilmspec p_varargs) (tl,mspec,varargs) st;
-  | I_callvirt  (tl,mspec,varargs) -> p_instr itag_callvirt (p_tup3 p_tailness pilmspec p_varargs) (tl,mspec,varargs) st;
-  | I_callconstraint    (tl,ty,mspec,varargs)   -> p_instr itag_callconstrained (p_tup4 p_tailness p_iltyp pilmspec p_varargs) (tl,ty,mspec,varargs) st;
-  | I_newobj    (mspec,varargs) -> p_instr itag_newobj (p_tup2 pilmspec p_varargs) (mspec,varargs) st;
-  | I_ldftn     mspec   ->  p_instr itag_ldftn pilmspec mspec st;
-  | I_ldvirtftn mspec   -> p_instr itag_ldvirtftn pilmspec mspec st;
-  | I_calli (a,b,c)     ->  p_instr itag_calli (p_tup3 p_tailness p_callsig p_varargs) (a,b,c) st;
-  | I_ldarg x ->  p_instr itag_ldarg p_uint16 x st
-  | I_starg x ->  p_instr itag_starg p_uint16 x st
-  | I_ldarga x ->  p_instr itag_ldarga p_uint16 x st
-  | I_ldloc x ->  p_instr itag_ldloc p_uint16 x st
-  | I_stloc x ->  p_instr itag_stloc p_uint16 x st
-  | I_ldloca x ->  p_instr itag_ldloca p_uint16 x st
-  | I_cpblk     (al,vol) -> p_instr itag_cpblk (p_tup2 p_alignment p_volatility) (al,vol) st
-  | I_initblk   (al,vol) -> p_instr itag_initblk (p_tup2 p_alignment p_volatility) (al,vol) st
-  | I_arith (AI_ldc (a,b)) -> p_instr itag_ldc (p_tup2 pbasic_type p_ldc_info) (a,b) st
-  | I_arith (AI_conv a) -> p_instr itag_conv pbasic_type a st
-  | I_arith (AI_conv_ovf a) -> p_instr itag_conv_ovf pbasic_type a st
-  | I_arith (AI_conv_ovf_un a) -> p_instr itag_conv_ovf_un pbasic_type a st
-  | I_ldind (a,b,c) -> p_instr itag_ldind (p_tup3 p_alignment p_volatility pbasic_type) (a,b,c) st
-  | I_stind (a,b,c) -> p_instr itag_stind (p_tup3 p_alignment p_volatility pbasic_type) (a,b,c) st
-  | I_stelem a  -> p_instr itag_stelem pbasic_type a st 
-  | I_ldelem a  -> p_instr itag_ldelem pbasic_type a st 
-  | I_ldfld(a,b,c) -> p_instr itag_ldfld (p_tup3 p_alignment p_volatility pilfspec) (a,b,c) st
-  | I_ldflda(c) -> p_instr itag_ldflda pilfspec c st
-  | I_ldsfld(a,b) -> p_instr itag_ldsfld (p_tup2 p_volatility pilfspec) (a,b) st
-  | I_ldsflda(a) -> p_instr itag_ldsflda pilfspec a st
-  | I_stfld(a,b,c) -> p_instr itag_stfld (p_tup3 p_alignment p_volatility pilfspec) (a,b,c) st
-  | I_stsfld(a,b) -> p_instr itag_stsfld (p_tup2 p_volatility pilfspec) (a,b) st
-  | I_ldtoken  tok -> p_instr itag_ldtoken p_ldtoken_info tok st
-  | I_ldstr     s       -> p_instr itag_ldstr p_string s st
-  | I_box  ty   -> p_instr itag_box p_iltyp ty st
-  | I_unbox  ty -> p_instr itag_unbox p_iltyp ty st
-  | I_unbox_any  ty     -> p_instr itag_unbox_any p_iltyp ty st
-  | I_newarr(a,b)       -> p_instr itag_newarr (p_tup2 p_array_shape p_iltyp) (a,b) st
-  | I_stelem_any(a,b)   -> p_instr itag_stelem_any (p_tup2 p_array_shape p_iltyp) (a,b) st
-  | I_ldelem_any(a,b)   -> p_instr itag_ldelem_any (p_tup2 p_array_shape p_iltyp) (a,b) st
-  | I_ldelema(a,b,c)    -> p_instr itag_ldelema (p_tup3 p_readonly p_array_shape p_iltyp) (a,b,c) st
-  | I_castclass  ty     -> p_instr itag_castclass p_iltyp ty st
-  | I_isinst  ty        -> p_instr itag_isinst p_iltyp ty st
-  | I_refanyval  ty     -> p_instr itag_refanyval p_iltyp ty st
-  | I_mkrefany  ty      -> p_instr itag_mkrefany p_iltyp ty st
-  | I_initobj  ty       -> p_instr itag_initobj p_iltyp ty st
-  | I_ldobj(a,b,c)      -> p_instr itag_ldobj (p_tup3 p_alignment p_volatility p_iltyp) (a,b,c) st
-  | I_stobj(a,b,c)      -> p_instr itag_stobj (p_tup3 p_alignment p_volatility p_iltyp) (a,b,c) st
-  | I_cpobj  ty         -> p_instr itag_cpobj p_iltyp ty st
-  | I_sizeof  ty        -> p_instr itag_sizeof p_iltyp ty st
-  | EI_ilzero (a)        -> p_instr itag_ilzero p_iltyp a st
-  | EI_ldlen_multi (n,m) -> p_instr itag_ldlen_multi (p_tup2 p_int32 p_int32) (n,m) st
-  | I_other e when Ilx.is_ilx_ext_instr e -> pfailwith st "an ILX instruction cannot be emitted"
-  |  _ -> pfailwith st "an IL instruction cannot be emitted"
-#endif
-
-let u_ilinstr st = 
-  let n = u_int st
-  decode_tab.[n] st
-
-  
-
-(*---------------------------------------------------------------------------
- * Pickle/unpickle for F# types and module signatures
- *------------------------------------------------------------------------- *)
-
-#if INCLUDE_METADATA_WRITER
-let p_Map pk pv = p_wrap Map.to_list (p_list (p_tup2 pk pv))
-let p_namemap p = p_Map p_string p
-let p_immutable_ref p = p_wrap (!) p
-#endif
-
-let u_Map uk uv = u_wrap Map.of_list (u_list (u_tup2 uk uv))
-let u_namemap u = u_Map u_string u
-let u_immutable_ref u = u_wrap (ref) u
-
-#if INCLUDE_METADATA_WRITER
-let p_pos (x: pos) st = p_tup2 p_int p_int (dest_pos x) st
-let p_range (x: range) st = p_tup3 p_string p_pos p_pos (dest_range x) st
-let p_dummy_range : range pickler   = fun x st -> ()
-let p_ident (x: ident) st = p_tup2 p_string p_range (x.idText,x.idRange) st
-let p_xmldoc (XmlDoc x) st = p_array p_string x st
-#endif
-
-let u_pos st = let a = u_int st in let b = u_int st in mk_pos a b
-let u_range st = let a = u_string st in let b = u_pos st in let c = u_pos st in mk_range a b c
-
-// Most ranges (e.g. on optimization expressions) can be elided from stored data 
-let u_dummy_range : range unpickler = fun st -> range0
-let u_ident st = let a = u_string st in let b = u_range st in ident(a,b)
-let u_xmldoc st = XmlDoc (u_array u_string st)
-
-
-#if INCLUDE_METADATA_WRITER
-let p_nonlocal_item_ref () {nlr_nlpath=a;nlr_item=b} st =
-    p_nlpath a st; p_string b st
-let p_local_item_ref ctxt tab st = p_osgn_ref ctxt tab st
-
-let rec p_vref ctxt x st = 
-    match x with 
-    | VRef_private(x) -> p_byte 0 st; p_local_item_ref ctxt st.ovals x st
-    | VRef_nonlocal(x) -> p_byte 1 st; p_nonlocal_item_ref () x st
-let rec p_tcref ctxt x st = 
-    match x with 
-    | ERef_private(x) -> p_byte 0 st; p_local_item_ref ctxt st.otycons x st
-    | ERef_nonlocal(x) -> p_byte 1 st; p_nonlocal_item_ref () x st
-
-let p_ucref (UCRef(a,b)) st = p_tup2 (p_tcref "ucref") p_string (a,b) st
-let p_rfref (RFRef(a,b)) st = p_tup2 (p_tcref "rfref") p_string (a,b) st
-let p_vrefs ctxt = p_list (p_vref ctxt) 
-let p_tpref x st = p_local_item_ref "typar" st.otypars  x st
-
-#endif
-
-let u_nonlocal_item_ref () st = 
-    let a = u_nlpath st in let b = u_string st
-    mk_nlr a b
-  
-let u_local_item_ref tab st = u_osgn_ref tab st
-
-let u_vref st = 
-    let tag = u_byte st
-    match tag with
-    | 0 -> u_local_item_ref st.ivals st |> (fun x -> VRef_private x)
-    | 1 -> u_nonlocal_item_ref () st |> (fun x -> VRef_nonlocal x)
-    | _ -> ufailwith st "u_item_ref"
-    
-let u_tcref st = 
-    let tag = u_byte st
-    match tag with
-    | 0 -> u_local_item_ref st.itycons  st |> (fun x -> ERef_private x)
-    | 1 -> u_nonlocal_item_ref () st |> (fun x -> ERef_nonlocal x)
-    | _ -> ufailwith st "u_item_ref"
-    
-let u_ucref st  = let a,b = u_tup2 u_tcref u_string st in UCRef(a,b)
-
-let u_rfref st = let a,b = u_tup2 u_tcref u_string st in RFRef(a,b)
-
-let u_vrefs = u_list u_vref 
-
-let u_tpref st = u_local_item_ref st.itypars st
-
-
-#if INCLUDE_METADATA_WRITER
-let fill_p_typ,p_typ = p_hole()
-let p_typs = (p_list p_typ);;
-
-let fill_p_attribs,p_attribs = p_hole()
-#endif
-
-let fill_u_typ,u_typ = u_hole()
-let u_typs = (u_list u_typ);;
-let fill_u_attribs,u_attribs = u_hole()
-
-
-#if INCLUDE_METADATA_WRITER
-let p_kind x st =
-  p_byte (match x with
-          | KindType -> 0
-          | KindMeasure -> 1) st
-
-let p_member_kind x st = 
-    p_byte (match x with 
-            | MemberKindMember -> 0
-            | MemberKindPropertyGet  -> 1
-            | MemberKindPropertySet -> 2
-            | MemberKindConstructor -> 3
-            | MemberKindClassConstructor -> 4
-            | MemberKindPropertyGetSet -> pfailwith st "pickling: MemberKindPropertyGetSet only expected in parse trees") st
-#endif
-
-
-let u_kind st =
-  match u_byte st with
-  | 0 -> KindType
-  | 1 -> KindMeasure
-  | _ -> ufailwith st "u_kind"
-
-let u_member_kind st = 
-    match u_byte st with 
-    | 0 -> MemberKindMember 
-    | 1 -> MemberKindPropertyGet  
-    | 2 -> MemberKindPropertySet 
-    | 3 -> MemberKindConstructor
-    | 4 -> MemberKindClassConstructor
-    | _ -> ufailwith st "u_member_kind"
-
-#if INCLUDE_METADATA_WRITER
-let p_MemberFlags x st = 
-  ptup7 (p_option p_string) p_bool p_bool p_bool p_bool p_bool p_member_kind 
-      (x.OverloadQualifier, 
-       x.MemberIsInstance, 
-       x.MemberIsVirtual, 
-       x.MemberIsDispatchSlot, 
-       x.MemberIsOverrideOrExplicitImpl, 
-       x.MemberIsFinal, 
-       x.MemberKind) st
-#endif
-let u_MemberFlags st = 
-  let x1,x2,x3,x4,x5,x6,x7 = utup7 (u_option u_string) u_bool u_bool u_bool u_bool u_bool u_member_kind st
-  { OverloadQualifier=x1;
-    MemberIsInstance=x2;
-    MemberIsVirtual=x3;
-    MemberIsDispatchSlot=x4;
-    MemberIsOverrideOrExplicitImpl=x5;
-    MemberIsFinal=x6;
-    MemberKind=x7}
-
-#if INCLUDE_METADATA_WRITER
-let p_trait_sln sln st = 
-    match sln with 
-    | ILMethSln(a,b,c,d) ->
-         p_byte 0 st; p_tup4 p_typ (p_option p_iltref) p_ilmref p_typs (a,b,c,d) st
-    | FSMethSln(a,b,c) ->
-         p_byte 1 st; p_tup3 p_typ (p_vref "trait") p_typs (a,b,c) st
-    | BuiltInSln -> 
-         p_byte 2 st
-
-let p_trait (TTrait(a,b,c,d,e,f)) st  = 
-    p_tup6 p_typs p_string p_MemberFlags p_typs (p_option p_typ) (p_option p_trait_sln) (a,b,c,d,e,!f) st
-#endif
-
-let u_trait_sln st = 
-    let tag = u_byte st
-    match tag with 
-    | 0 -> 
-        let (a,b,c,d) = u_tup4 u_typ (u_option u_iltref) u_ilmref u_typs st
-        ILMethSln(a,b,c,d) 
-    | 1 -> 
-        let (a,b,c) = u_tup3 u_typ u_vref u_typs st
-        FSMethSln(a,b,c)
-    | 2 -> 
-        BuiltInSln
-    | _ -> ufailwith st "u_trait_sln" 
-
-let u_trait st = 
-    let a,b,c,d,e,f = u_tup6 u_typs u_string u_MemberFlags u_typs (u_option u_typ) (u_option u_trait_sln) st
-    TTrait (a,b,c,d,e,ref f)
-
-#if INCLUDE_METADATA_WRITER
-let rec p_measure_expr measure st =
-    let measure = strip_upeqnsA false measure 
-    match measure with 
-    | MeasureCon tcref   -> p_byte 0 st; p_tcref "measure" tcref st
-    | MeasureInv x       -> p_byte 1 st; p_measure_expr x st
-    | MeasureProd(x1,x2) -> p_byte 2 st; p_measure_expr x1 st; p_measure_expr x2 st
-    | MeasureVar(v)      -> p_byte 3 st; p_tpref v st
-    | MeasureOne      -> p_byte 4 st
-#endif
-
-let rec u_measure_expr st =
-    let tag = u_byte st
-    match tag with
-    | 0 -> let a = u_tcref st in MeasureCon a
-    | 1 -> let a = u_measure_expr st in MeasureInv a
-    | 2 -> let a,b = u_tup2 u_measure_expr u_measure_expr st in MeasureProd (a,b)
-    | 3 -> let a = u_tpref st in MeasureVar a
-    | 4 -> MeasureOne
-    | _ -> ufailwith st "u_measure_expr"
-
-#if INCLUDE_METADATA_WRITER
-let p_typar_constraint x st = 
-    match x with 
-    | TTyparCoercesToType (a,m)                 -> p_byte 0 st; p_tup2 p_typ p_range (a,m) st
-    | TTyparMayResolveMemberConstraint(traitInfo,m) -> p_byte 1 st; p_tup2 p_trait p_range (traitInfo,m) st
-    | TTyparDefaultsToType(_,rty,m)               -> p_byte 2 st; p_tup2 p_typ p_range (rty,m) st
-    | TTyparSupportsNull(m)                     -> p_byte 3 st; p_range m st
-    | TTyparIsNotNullableValueType(m)           -> p_byte 4 st; p_range m st
-    | TTyparIsReferenceType(m)                  -> p_byte 5 st; p_range m st
-    | TTyparRequiresDefaultConstructor(m)       -> p_byte 6 st; p_range m st
-    | TTyparSimpleChoice(tys,m)                 -> p_byte 7 st; p_tup2 p_typs p_range (tys,m) st
-    | TTyparIsEnum(ty,m)                        -> p_byte 8 st; p_typ ty st; p_range m st
-    | TTyparIsDelegate(aty,bty,m)               -> p_byte 9 st; p_typ aty st; p_typ bty st; p_range m st
-let p_typar_constraints = (p_list p_typar_constraint)
-#endif
-
-let u_typar_constraint st = 
-    let tag = u_byte st
-    match tag with
-    | 0 -> u_tup2 u_typ u_range st |> (fun (a,b)   -> (fun ridx -> TTyparCoercesToType (a,b) ))
-    | 1 -> u_tup2 u_trait u_range st |> (fun (traitInfo,f) -> (fun ridx -> TTyparMayResolveMemberConstraint(traitInfo,f)))
-    | 2 -> u_tup2 u_typ u_range                  st |> (fun (a,b)   -> (fun ridx -> TTyparDefaultsToType(ridx,a,b)))
-    | 3 -> u_range                             st |> (fun (a)     -> (fun ridx -> TTyparSupportsNull(a)))
-    | 4 -> u_range                             st |> (fun (a)     -> (fun ridx -> TTyparIsNotNullableValueType(a)))
-    | 5 -> u_range                             st |> (fun (a)     -> (fun ridx -> TTyparIsReferenceType(a)))
-    | 6 -> u_range                             st |> (fun (a)     -> (fun ridx -> TTyparRequiresDefaultConstructor(a)))
-    | 7 -> u_tup2 u_typs u_range                st |> (fun (a,b)   -> (fun ridx -> TTyparSimpleChoice(a,b)))
-    | 8 -> u_tup2 u_typ u_range                st |> (fun (a,b)   -> (fun ridx -> TTyparIsEnum(a,b)))
-    | 9 -> u_tup3 u_typ u_typ u_range          st |> (fun (a,b,c) -> (fun ridx -> TTyparIsDelegate(a,b,c)))
-    | _ -> ufailwith st "u_typar_constraint" 
-
-
-let u_typar_constraints = (u_list_revi u_typar_constraint)
-
-
-#if INCLUDE_METADATA_WRITER
-let p_typar_spec_data (x:TyparData) st = 
-    p_tup5
-      p_ident 
-      p_attribs
-      p_int32
-      p_typar_constraints
-      p_xmldoc
-
-      (x.typar_id,x.typar_attribs,x.typar_flags,x.typar_constraints,x.typar_xmldoc) st
-
-let p_typar_spec (x:Typar) st = 
-    //Disabled, workaround for bug 2721: if x.Rigidity <> TyparRigid then warning(Error(sprintf "p_typar_spec: typar#%d is not rigid" x.Stamp, x.Range));
-    if x.IsFromError then warning(Error("p_typar_spec: from error", x.Range));
-    p_osgn_decl st.otypars p_typar_spec_data x st
-
-let p_typar_specs = (p_list p_typar_spec)
-#endif
-
-let u_typar_spec_data st = 
-    let a,c,d,e,g = u_tup5 u_ident u_attribs u_int32 u_typar_constraints u_xmldoc st
-    { typar_id=a; 
-      typar_stamp=new_stamp();
-      typar_attribs=c;
-      typar_flags=d;
-      typar_constraints=e;
-      typar_solution=None;
-      typar_xmldoc=g }
-
-let u_typar_spec st = 
-    u_osgn_decl st.itypars u_typar_spec_data st 
-
-let u_typar_specs = (u_list u_typar_spec)
-
-
-#if INCLUDE_METADATA_WRITER
-let _ = fill_p_typ (fun ty st ->
-   let ty = strip_tpeqns ty
-   match ty with 
-   | TType_tuple l                                                 -> p_byte 0 st; p_typs l st
-   | TType_app(ERef_nonlocal { nlr_nlpath=nlpath; nlr_item=item },[]) -> p_byte 1 st; p_simpletyp (nlpath,item) st
-   | TType_app (tc,tinst)                                          -> p_byte 2 st; p_tup2 (p_tcref "typ") p_typs (tc,tinst) st
-   | TType_fun (d,r)                                               -> p_byte 3 st; p_tup2 p_typ p_typ (d,r) st
-   | TType_var r                                                   -> p_byte 4 st; p_tpref r st
-   | TType_forall (tps,r)                                          -> p_byte 5 st; p_tup2 p_typar_specs p_typ (tps,r) st
-   | TType_modul_bindings                                          -> p_byte 6 st; p_void st
-   | TType_measure measure                                         -> p_byte 7 st; p_measure_expr measure st
-   | TType_ucase (uc,tinst)                                        -> p_byte 8 st; p_tup2 p_ucref p_typs (uc,tinst) st)
-
-#endif
-
-let _ = fill_u_typ (fun st ->
-    let tag = u_byte st
-    match tag with
-    | 0 -> let l = u_typs st                              in TType_tuple l
-    | 1 -> u_simpletyp st 
-    | 2 -> let tc = u_tcref st in let tinst = u_typs st    in TType_app (tc,tinst)
-    | 3 -> let d = u_typ st    in let r = u_typ st         in TType_fun (d,r)
-    | 4 -> let r = u_tpref st                             in  r.AsType
-    | 5 -> let tps = u_typar_specs st in let r = u_typ st  in TType_forall (tps,r)
-    | 6 ->                                                  TType_modul_bindings
-    | 7 -> let measure = u_measure_expr st                in TType_measure measure
-    | 8 -> let uc = u_ucref st in let tinst = u_typs st    in TType_ucase (uc,tinst)
-    | _ -> ufailwith st "u_typ")
-  
-
-#if INCLUDE_METADATA_WRITER
-let fill_p_binds,p_binds = p_hole()
-let fill_p_targets,p_targets = p_hole()
-let fill_p_Exprs,p_Exprs = p_hole()
-let fill_p_FlatExprs,p_FlatExprs = p_hole()
-let fill_p_constraints,p_constraints = p_hole()
-let fill_p_Vals,p_Vals = p_hole()
-let fill_p_FlatVals,p_FlatVals = p_hole()
-#endif
-
-let fill_u_binds,u_binds = u_hole()
-let fill_u_targets,u_targets = u_hole()
-let fill_u_Exprs,u_Exprs = u_hole()
-let fill_u_FlatExprs,u_FlatExprs = u_hole()
-let fill_u_constraints,u_constraints = u_hole()
-let fill_u_Vals,u_Vals = u_hole()
-let fill_u_FlatVals,u_FlatVals = u_hole()
-
-#if INCLUDE_METADATA_WRITER
-let p_TopArgInfo (TopArgInfo(a,b)) st = p_attribs a st; p_option p_ident b st
-let p_TopTyparInfo (TopTyparInfo(a,b)) st = p_tup2 p_ident p_kind (a,b) st
-let p_ValTopReprInfo (TopValInfo (a,args,ret)) st = 
-    p_list p_TopTyparInfo a st; 
-    p_list (p_list p_TopArgInfo) args st; 
-    p_TopArgInfo ret st
-#endif
-
-
-let u_TopArgInfo st = let a = u_attribs st in let b = u_option u_ident st in match a,b with [],None -> TopValInfo.unnamedTopArg1 | _ -> TopArgInfo(a,b)
-let u_TopTyparInfo st = let a,b = u_tup2 u_ident u_kind st in TopTyparInfo(a,b)
-let u_ValTopReprInfo st = 
-    let a = u_list u_TopTyparInfo st
-    let b = u_list (u_list u_TopArgInfo) st
-    let c = u_TopArgInfo st
-    TopValInfo (a,b,c)
-
-#if INCLUDE_METADATA_WRITER
-let p_ranges = (p_option (p_tup2 p_range p_range)) 
-let p_istype x st = 
-  match x with 
-  | FSharpModuleWithSuffix -> p_byte 0 st
-  | FSharpModule            -> p_byte 1 st
-  | Namespace              -> p_byte 2 st
-let p_cpath (CompPath(a,b)) st = p_tup2 p_scoref (p_list (p_tup2 p_string p_istype)) (a,b) st
-
-#endif
-
-let u_ranges = (u_option (u_tup2 u_range u_range))
-
-let u_istype st = 
-  let tag = u_byte st
-  match tag with
-  | 0 -> FSharpModuleWithSuffix 
-  | 1 -> FSharpModule  
-  | 2 -> Namespace 
-  | _ -> ufailwith st "u_istype"
-
-let u_cpath  st = let a,b = u_tup2 u_scoref (u_list (u_tup2 u_string u_istype)) st in (CompPath(a,b))
-
-
-let rec dummy x = x
-#if INCLUDE_METADATA_WRITER
-and p_tycon_repr x st = 
-    match x with 
-    | TRecdRepr fs          -> p_byte 0 st; p_rfield_table fs st
-    | TFiniteUnionRepr x    -> p_byte 2 st; p_list p_unioncase_spec (Array.to_list x.funion_ucases.ucases_by_index) st
-    | TILObjModelRepr (_,_,td) -> error (Failure("Unexpected IL type "^td.Name))
-    | TAsmRepr ilty         -> p_byte 4 st; p_iltyp ilty st
-    | TFsObjModelRepr r     -> p_byte 5 st; p_tycon_objmodel_data r st
-    | TMeasureableRepr ty       -> p_byte 6 st; p_typ ty st
-and p_tycon_objmodel_data x st = 
-  p_tup3 p_tycon_objmodel_kind (p_vrefs "vslots") p_rfield_table 
-    (x.fsobjmodel_kind, x.fsobjmodel_vslots, x.fsobjmodel_rfields) st
-and p_unioncase_spec x st =                     
-    ptup7 
-        p_rfield_table p_typ p_string p_ident p_attribs p_xmldoc p_access
-        (x.ucase_rfields,x.ucase_rty,x.ucase_il_name,x.ucase_id,x.ucase_attribs,x.ucase_xmldoc,x.ucase_access) st
-and p_exnc_spec_data x st = p_entity_spec_data x st
-and p_exnc_repr x st =
-  match x with 
-  | TExnAbbrevRepr x -> p_byte 0 st; (p_tcref "exn abbrev") x st
-  | TExnAsmRepr x    -> p_byte 1 st; p_iltref x st
-  | TExnFresh x      -> p_byte 2 st; p_rfield_table x st
-  | TExnNone         -> p_byte 3 st
-and p_exnc_spec x st = p_tycon_spec x st
-and p_access (TAccess n) st = p_list p_cpath n st
-and p_recdfield_spec x st = 
-    ptup10
-      p_bool p_typ p_bool p_bool (p_option p_const) p_ident p_attribs p_attribs p_xmldoc p_access 
-      (x.rfield_mutable,x.rfield_type,x.rfield_static,x.rfield_secret,x.rfield_const,x.rfield_id,x.rfield_pattribs,x.rfield_fattribs,x.rfield_xmldoc,x.rfield_access) st
-and p_rfield_table x st = 
-  p_list p_recdfield_spec (Array.to_list x.rfields_by_index) st
-
-and p_entity_spec_data x st = 
-  ptup15
-    p_typar_specs
-    p_ident 
-    (p_option p_pubpath)
-    (p_tup2 p_access p_access)
-    p_attribs
-    (p_option p_tycon_repr)
-    (p_option p_typ)
-    p_tcaug
-    p_xmldoc
-    p_kind
-    p_bool 
-    p_bool 
-    (p_option p_cpath)
-    (p_lazy p_modul_typ)
-    p_exnc_repr 
-    (x.entity_typars.Force(x.entity_range),
-     ident (x.entity_name, x.entity_range),
-     x.entity_pubpath,
-     (x.entity_accessiblity, x.entity_tycon_repr_accessibility),
-     x.entity_attribs,
-     x.entity_tycon_repr,
-     x.entity_tycon_abbrev,
-     x.entity_tycon_tcaug,
-     x.entity_xmldoc,
-     x.entity_kind,
-     x.entity_uses_prefix_display,
-     x.entity_is_modul_or_namespace,
-     x.entity_cpath,
-     x.entity_modul_contents,
-     x.entity_exn_info) st
-and p_tcaug p st = 
-  ptup7
-    (p_option (p_tup2 (p_vref "compare_obj") (p_vref "compare")))
-    (p_option (p_vref "hash"))
-    (p_option (p_tup2 (p_vref "hash") (p_vref "equals")))
-    (p_namemap (p_vrefs "adhoc")) 
-    (p_list (p_tup3 p_typ p_bool p_range))
-    (p_option p_typ)
-    p_bool
-    (p.tcaug_compare, p.tcaug_structural_hash, p.tcaug_equals, p.tcaug_adhoc, p.tcaug_implements,p.tcaug_super,p.tcaug_abstract) st
-
-and p_tycon_spec x st = p_osgn_decl st.otycons p_entity_spec_data x st
-
-and p_parentref x st = 
-    match x with 
-    | ParentNone -> p_byte 0 st
-    | Parent x -> p_byte 1 st; p_tcref "parent tycon" x st
-
-and p_attribkind x st = 
-    match x with 
-    | ILAttrib x -> p_byte 0 st; p_ilmref x st
-    | FSAttrib x -> p_byte 1 st; p_vref "attrib" x st
-
-and p_attrib (Attrib (a,b,c,d,e)) st = 
-    p_tup5 (p_tcref "attrib") p_attribkind (p_list p_attrib_expr) (p_list p_attrib_arg) p_range (a,b,c,d,e) st
-
-and p_attrib_expr (AttribExpr(e1,e2)) st = 
-    p_tup2 p_expr p_expr (e1,e2) st
-
-and p_attrib_arg (AttribNamedArg(a,b,c,d)) st = 
-    p_tup4 p_string p_typ p_bool p_attrib_expr (a,b,c,d) st
-
-and p_member_info x st = 
-    p_tup5 p_string 
-        (p_tcref "member_info")  p_MemberFlags (p_list p_slotsig) p_bool 
-        (x.CompiledName, x.ApparentParent,x.MemberFlags,x.ImplementedSlotSigs,x.IsImplemented) st
-
-and p_tycon_objmodel_kind x st = 
-    match x with 
-    | TTyconClass       -> p_byte 0 st; p_void st
-    | TTyconInterface   -> p_byte 1 st; p_void st
-    | TTyconStruct      -> p_byte 2 st; p_void st
-    | TTyconDelegate ss -> p_byte 3 st; p_slotsig ss st
-    | TTyconEnum        -> p_byte 4 st; p_void st
-
-and p_mustinline x st = 
-    p_byte (match x with 
-            | PseudoValue -> 0
-            | AlwaysInline  -> 1
-            | OptionalInline -> 2
-            | NeverInline -> 3) st
-
-and p_basethis x st = 
-    p_byte (match x with 
-            | BaseVal -> 0
-            | CtorThisVal  -> 1
-            | NormalVal -> 2
-            | MemberThisVal -> 3) st
-
-and p_vrefFlags x st = 
-    p_byte (match x with 
-            | NormalValUse -> 0
-            | CtorValUsedAsSuperInit  -> 1
-            | CtorValUsedAsSelfInit  -> 2
-            | VSlotDirectCall -> 3) st
-
-and p_ValData x st =
-    if verbose then dprintf "p_ValData, nm = %s, stamp #%d, ty = %s\n" x.val_name x.val_stamp (DebugPrint.showType x.val_type);
-    ptup12
-      p_string
-      p_ranges
-      p_typ 
-      p_int64 
-      (p_option p_pubpath) 
-      (p_option p_member_info) 
-      p_attribs 
-      (p_option p_ValTopReprInfo)
-      p_xmldoc
-      p_access
-      p_parentref
-      (p_option p_const)
-      ( x.val_name,
-        (* only keep range information on published values, not on optimization data *)
-        (match x.val_pubpath with None -> None | Some _ -> Some(x.val_range, x.val_defn_range)),
-        x.val_type,
-        x.val_flags,
-        x.val_pubpath,
-        x.val_member_info,
-        x.val_attribs,
-        x.val_top_repr_info,
-        x.val_xmldoc,
-        x.val_access,
-        x.val_actual_parent,
-        x.val_const) st
-      
-and p_Val x st = p_osgn_decl st.ovals p_ValData x st
-and p_modul_typ (x: ModuleOrNamespaceType) st = 
-    p_tup3
-      p_istype
-      (p_namemap p_Val)
-      (p_namemap p_tycon_spec)
-      (x.ModuleOrNamespaceKind,x.AllValuesAndMembers,x.AllEntities)
-      st
-
-#endif
-
-
-and u_tycon_repr st = 
-    let tag = u_byte st
-    match tag with
-    | 0 -> u_rfield_table            st |> (fun x -> TRecdRepr x)
-    | 2 -> u_list u_unioncase_spec   st |> (fun x -> MakeUnionRepr x)
-    | 4 -> u_iltyp                   st |> (fun x -> TAsmRepr x)
-    | 5 -> u_tycon_objmodel_data     st |> (fun x -> TFsObjModelRepr x)
-    | 6 -> u_typ st |> (fun ty -> TMeasureableRepr ty)
-    | _ -> ufailwith st "u_tycon_repr"
-  
-and u_tycon_objmodel_data st = 
-  let x1,x2,x3 = u_tup3 u_tycon_objmodel_kind u_vrefs u_rfield_table st
-  {fsobjmodel_kind=x1; fsobjmodel_vslots=x2; fsobjmodel_rfields=x3 }
-  
-and u_unioncase_spec st = 
-    let a,b,c,d,e,f,i = utup7 u_rfield_table u_typ u_string u_ident u_attribs u_xmldoc u_access st
-    {ucase_rfields=a; ucase_rty=b; ucase_il_name=c; ucase_id=d; ucase_attribs=e;ucase_xmldoc=f;ucase_access=i }
-    
-and u_exnc_spec_data st = u_entity_spec_data st 
-
-and u_exnc_repr st =
-  let tag = u_byte st
-  match tag with
-  | 0 -> u_tcref           st |> (fun x -> TExnAbbrevRepr x)
-  | 1 -> u_iltref          st |> (fun x -> TExnAsmRepr x)
-  | 2 -> u_rfield_table st |> (fun x -> TExnFresh x)
-  | 3 -> TExnNone
-  | _ -> ufailwith st "u_exnc_repr"
-  
-and u_exnc_spec st = u_tycon_spec st
-
-and u_access st = 
-    match u_list u_cpath st with 
-    | [] -> taccessPublic (* save unnecessary allocations *)
-    | res -> TAccess res
-
-and u_recdfield_spec st = 
-    let a,c1,c2,c2b,c3,d,e1,e2,f,g = utup10 u_bool u_typ u_bool u_bool (u_option u_const) u_ident u_attribs u_attribs u_xmldoc u_access st
-    { rfield_mutable=a;  rfield_type=c1; rfield_static=c2; rfield_secret=c2b; rfield_const=c3; rfield_id=d; rfield_pattribs=e1;rfield_fattribs=e2;rfield_xmldoc=f; rfield_access=g }
-
-and u_rfield_table st = MakeRecdFieldsTable (u_list u_recdfield_spec st)
-
-and u_entity_spec_data st = 
-    let x1,x2,x3,(x4a,x4b),x6,x7,x8,x9,x10,x10b,x11,x11b,x12,x13,x14 = 
-       utup15
-          u_typar_specs
-          u_ident 
-          (u_option u_pubpath)
-          (u_tup2 u_access u_access)
-          u_attribs
-          (u_option u_tycon_repr)
-          (u_option u_typ) 
-          u_tcaug 
-          u_xmldoc 
-          u_kind
-          u_bool 
-          u_bool 
-          (u_option u_cpath )
-          (u_lazy u_modul_typ) 
-          u_exnc_repr 
-          st
-    { entity_typars=LazyWithContext<_,_>.NotLazy x1;
-      entity_stamp=new_stamp();
-      entity_name=x2.idText;
-      entity_range=x2.idRange;
-      entity_pubpath=x3;
-      entity_accessiblity=x4a;
-      entity_tycon_repr_accessibility=x4b;
-      entity_attribs=x6;
-      entity_tycon_repr=x7;
-      entity_tycon_abbrev=x8;
-      entity_tycon_tcaug=x9;
-      entity_xmldoc=x10;
-      entity_kind=x10b;
-      entity_uses_prefix_display=x11;
-      entity_is_modul_or_namespace=x11b;
-      entity_cpath=x12;
-      entity_modul_contents= x13;
-      entity_exn_info=x14;
-      entity_il_repr_cache=new_cache();  } 
-
-and u_tcaug st = 
-  let a,b1,b2,c,d,e,g = 
-    utup7
-      (u_option (u_tup2 u_vref u_vref))
-      (u_option u_vref)
-      (u_option (u_tup2 u_vref u_vref))
-      (u_namemap u_vrefs)
-      (u_list (u_tup3 u_typ u_bool u_range)) 
-      (u_option u_typ)
-      u_bool 
-      st 
-  {tcaug_compare=a; 
-   tcaug_structural_hash=b1;
-   tcaug_compare_withc=None; 
-   tcaug_hash_and_equals_withc=None; 
-   tcaug_equals=b2; 
-   // only used for code generation and checking - hence don't care about the values when reading back in
-   tcaug_hasObjectGetHashCode=false; 
-   tcaug_adhoc=c; 
-   tcaug_implements=d;
-   tcaug_super=e;
-   tcaug_closed=true; 
-   tcaug_abstract=g}
- 
-and u_tycon_spec st = u_osgn_decl st.itycons u_entity_spec_data st 
-
-and u_parentref st = 
-    let tag = u_byte st
-    match tag with
-    | 0 -> ParentNone
-    | 1 -> u_tcref st |> (fun x -> Parent x)
-    | _ -> ufailwith st "u_attribkind" 
-
-and u_attribkind st = 
-    let tag = u_byte st
-    match tag with
-    | 0 -> u_ilmref st |> (fun x -> ILAttrib x) 
-    | 1 -> u_vref st |> (fun x -> FSAttrib x)
-    | _ -> ufailwith st "u_attribkind" 
-
-and u_attrib st : Attrib = 
-    let a,b,c,d,e = u_tup5 u_tcref u_attribkind (u_list u_attrib_expr) (u_list u_attrib_arg) u_range st
-    Attrib(a,b,c,d,e)
-
-and u_attrib_expr st = 
-    let a,b = u_tup2 u_expr u_expr st 
-    AttribExpr(a,b)
-
-and u_attrib_arg st  = 
-    let a,b,c,d = u_tup4 u_string u_typ u_bool u_attrib_expr st 
-    AttribNamedArg(a,b,c,d)
-
-and u_member_info st = 
-    let x1,x2,x3,x4,x5 = u_tup5 u_string u_tcref u_MemberFlags (u_list u_slotsig) u_bool st
-    { CompiledName=x1;
-      ApparentParent=x2;
-      MemberFlags=x3;
-      ImplementedSlotSigs=x4;
-      IsImplemented=x5  }
-
-and u_tycon_objmodel_kind st = 
-    let tag = u_byte st
-    match tag with
-    | 0 -> u_void    st |> (fun () -> TTyconClass )
-    | 1 -> u_void    st |> (fun () -> TTyconInterface  )
-    | 2 -> u_void    st |> (fun () -> TTyconStruct )
-    | 3 -> u_slotsig st |> (fun x  -> TTyconDelegate x)
-    | 4 -> u_void    st |> (fun () -> TTyconEnum )
-    | _ -> ufailwith st "u_tycon_objmodel_kind"
-
-and u_mustinline st = 
-    match u_byte st with 
-    | 0 -> PseudoValue 
-    | 1 -> AlwaysInline  
-    | 2 -> OptionalInline 
-    | 3 -> NeverInline 
-    | _ -> ufailwith st "u_mustinline"
-
-and u_basethis st = 
-    match u_byte st with 
-    | 0 -> BaseVal 
-    | 1 -> CtorThisVal  
-    | 2 -> NormalVal 
-    | 3 -> MemberThisVal
-    | _ -> ufailwith st "u_basethis"
-
-and u_vrefFlags st = 
-    match u_byte st with 
-    | 0 -> NormalValUse 
-    | 1 -> CtorValUsedAsSuperInit
-    | 2 -> CtorValUsedAsSelfInit
-    | 3 -> VSlotDirectCall
-    | _ -> ufailwith st "u_vrefFlags"
-
-and u_ValData st =
-  let x1,x1a,x2,x4,x7,x8,x9,x10,x12,x13,x13b,x14 = 
-    utup12
-      u_string
-      u_ranges
-      u_typ 
-      u_int64
-      (u_option u_pubpath)
-      (u_option u_member_info) 
-      u_attribs 
-      (u_option u_ValTopReprInfo)
-      u_xmldoc 
-      u_access
-      u_parentref
-      (u_option u_const) st
-  { val_name=x1;
-    val_range=(match x1a with None -> range0 | Some(a,_) -> a);
-    val_defn_range=(match x1a with None -> range0 | Some(_,b) -> b);
-    val_type=x2;
-    val_stamp=new_stamp();
-    val_flags=x4;
-    val_pubpath=x7;
-    val_defn = None;
-    val_member_info=x8;
-    val_attribs=x9;
-    val_top_repr_info=x10;
-    val_xmldoc=x12;
-    val_access=x13;
-    val_actual_parent=x13b;
-    val_const=x14;
-  }
-
-and u_Val st = u_osgn_decl st.ivals u_ValData st 
-
-
-and u_modul_typ st = 
-  let x1,x3,x5 = 
-    u_tup3
-      u_istype
-      (u_namemap u_Val)
-      (u_namemap u_tycon_spec) st
-  new ModuleOrNamespaceType(x1,x3,x5)
-
-
-(*---------------------------------------------------------------------------
- * Pickle/unpickle for F# expressions (for optimization data)
- *------------------------------------------------------------------------- *)
-
-#if INCLUDE_METADATA_WRITER
-and p_const x st = 
-  match x with 
-  | TConst_bool x       -> p_byte 0  st; p_bool x st
-  | TConst_sbyte x       -> p_byte 1  st; p_int8 x st
-  | TConst_byte x      -> p_byte 2  st; p_uint8 x st
-  | TConst_int16 x      -> p_byte 3  st; p_int16 x st
-  | TConst_uint16 x     -> p_byte 4  st; p_uint16 x st
-  | TConst_int32 x      -> p_byte 5  st; p_int32 x st
-  | TConst_uint32 x     -> p_byte 6  st; p_uint32 x st
-  | TConst_int64 x      -> p_byte 7  st; p_int64 x st
-  | TConst_uint64 x     -> p_byte 8  st; p_uint64 x st
-  | TConst_nativeint x  -> p_byte 9  st; p_int64 x st
-  | TConst_unativeint x -> p_byte 10 st; p_uint64 x st
-  | TConst_float32 x    -> p_byte 11 st; p_single x st
-  | TConst_float x      -> p_byte 12 st; p_int64 (bits_of_float x) st
-  | TConst_char c       -> p_byte 13 st; p_char c st
-  | TConst_string s     -> p_byte 14 st; p_string s st
-  | TConst_unit         -> p_byte 17 st; p_void st
-  | TConst_zero         -> p_byte 18 st; p_void st
-  | TConst_decimal s    -> p_byte 19 st; p_array p_int32 (System.Decimal.GetBits(s)) st
-#endif
-
-and u_const st = 
-  let tag = u_byte st
-  match tag with
-  | 0 -> u_bool st |> (fun x -> TConst_bool x) 
-  | 1 -> u_int8 st |> (fun x -> TConst_sbyte x)
-  | 2 -> u_uint8 st |> (fun x -> TConst_byte x)
-  | 3 -> u_int16 st |> (fun x -> TConst_int16 x)
-  | 4 -> u_uint16 st |> (fun x -> TConst_uint16 x)
-  | 5 -> u_int32 st |> (fun x -> TConst_int32 x)
-  | 6 -> u_uint32 st |> (fun x -> TConst_uint32 x)
-  | 7 -> u_int64 st |> (fun x -> TConst_int64 x)
-  | 8 -> u_uint64 st |> (fun x -> TConst_uint64 x)
-  | 9 -> u_int64 st |> (fun x -> TConst_nativeint x)
-  | 10 -> u_uint64 st |> (fun x -> TConst_unativeint x)
-  | 11 -> u_single st |> (fun x -> TConst_float32 x)
-  | 12 -> u_int64 st |> (fun x -> TConst_float (float_of_bits x))
-  | 13 -> u_char st |> (fun x -> TConst_char x)
-  | 14 -> u_string st |> (fun x -> TConst_string x)
-  | 17 -> u_void st |> (fun () -> TConst_unit)
-  | 18 -> u_void st |> (fun () -> TConst_zero)
-  | 19 -> u_array u_int32 st |> (fun bits -> TConst_decimal (new System.Decimal(bits)))
-  | _ -> ufailwith st "u_const" 
-
-
-#if INCLUDE_METADATA_WRITER
-and p_dtree x st = 
-  match x with 
-  | TDSwitch (a,b,c,d) -> p_byte 0 st; p_tup4 p_expr (p_list p_dtree_case) (p_option p_dtree) p_dummy_range (a,b,c,d) st
-  | TDSuccess (a,b)    -> p_byte 1 st; p_tup2 p_FlatExprs p_int (a,b) st
-  | TDBind (a,b)       -> p_byte 2 st; p_tup2 p_bind p_dtree (a,b) st
-
-and p_dtree_case (TCase(a,b)) st = p_tup2 p_dtree_discrim p_dtree (a,b) st
-
-and p_dtree_discrim x st = 
-  match x with 
-  | TTest_unionconstr (ucref,tinst) -> p_byte 1 st; p_tup2 p_ucref p_typs (ucref,tinst) st
-  | TTest_const c                   -> p_byte 2 st; p_const c st
-  | TTest_isnull                    -> p_byte 3 st; p_void st
-  | TTest_isinst (srcty,tgty)       -> p_byte 4 st; p_typ srcty st; p_typ tgty st
-  | TTest_query _                   -> pfailwith st "TTest_query: only used during pattern match compilation"
-  | TTest_array_length (n,ty)       -> p_byte 6 st; p_tup2 p_int p_typ (n,ty) st
-
-and p_target (TTarget(a,b,_)) st = p_tup2 p_FlatVals p_expr (a,b) st
-and p_bind (TBind(a,b,_)) st = p_tup2 p_Val p_val_repr (a,b) st
-and p_val_repr x st = p_expr x st
-
-and p_lval_op_kind x st =
-  p_int (match x with LGetAddr -> 0 | LByrefGet -> 1 | LSet -> 2 | LByrefSet -> 3) st
-
-and p_recdInfo x st = 
-    match x with 
-    | RecdExprIsObjInit -> p_byte 0 st
-    | RecdExpr -> p_byte 1 st
-
-
-#endif
-and u_dtree st = 
-  let tag = u_byte st
-  match tag with
-  | 0 -> u_tup4 u_expr (u_list u_dtree_case) (u_option u_dtree) u_dummy_range st |> (fun (e,cases,dflt,m) -> TDSwitch (e,cases,dflt,m) ) 
-  | 1 -> u_tup2 u_FlatExprs u_int st |> (fun (es,n) -> TDSuccess (es,n) )
-  | 2 -> u_tup2 u_bind u_dtree st |> (fun (b,t) -> TDBind(b,t) )
-  | _ -> ufailwith st "u_dtree" 
-
-and u_dtree_case st = let a,b = u_tup2 u_dtree_discrim u_dtree st in (TCase(a,b)) 
-
-and u_dtree_discrim st = 
-  let tag = u_byte st
-  match tag with
-  | 1 -> u_tup2 u_ucref u_typs st |> (fun (a,b) -> TTest_unionconstr (a,b) ) 
-  | 2 -> u_const st             |> (fun c -> TTest_const c ) 
-  | 3 -> u_void st              |> (fun () -> TTest_isnull ) 
-  | 4 -> u_tup2 u_typ u_typ st    |> (fun (srcty,tgty) -> TTest_isinst (srcty,tgty) )
-  | 6 -> u_tup2 u_int u_typ st    |> (fun (n,ty)       -> TTest_array_length (n,ty) )
-  | _ -> ufailwith st "u_dtree_discrim" 
-
-and u_target st = let a,b = u_tup2 u_FlatVals u_expr st in (TTarget(a,b,SuppressSequencePointAtTarget)) 
-
-and u_bind st = let a = u_Val st in let b = u_val_repr st in TBind(a,b,NoSequencePointAtStickyBinding)
-
-and u_val_repr st = u_expr st
-
-and u_lval_op_kind st =
-  match (u_int st) with 0 -> LGetAddr | 1 -> LByrefGet | 2 -> LSet | 3 -> LByrefSet | _ -> ufailwith st "uval_op_kind"
-
-and u_recdInfo st = 
-    let tag = u_byte st
-    match tag with 
-    | 0 -> RecdExprIsObjInit 
-    | 1 -> RecdExpr 
-    | _ -> ufailwith st "u_recdInfo" 
-  
-#if INCLUDE_METADATA_WRITER
-and p_op x st = 
-  match x with 
-  | TOp_ucase c                   -> p_byte 0 st; p_ucref c st
-  | TOp_exnconstr c               -> p_byte 1 st; p_tcref "op"  c st
-  | TOp_tuple                     -> p_byte 2 st
-  | TOp_recd (a,b)                -> p_byte 3 st; p_tup2 p_recdInfo (p_tcref "recd op") (a,b) st
-  | TOp_rfield_set (a)            -> p_byte 4 st; p_rfref a st
-  | TOp_rfield_get (a)            -> p_byte 5 st; p_rfref a st
-  | TOp_ucase_tag_get (a)         -> p_byte 6 st; p_tcref "cnstr op" a st
-  | TOp_ucase_field_get (a,b)     -> p_byte 7 st; p_tup2 p_ucref p_int (a,b) st
-  | TOp_ucase_field_set (a,b)     -> p_byte 8 st; p_tup2 p_ucref p_int (a,b) st
-  | TOp_exnconstr_field_get (a,b) -> p_byte 9 st; p_tup2 (p_tcref "exn op") p_int (a,b) st
-  | TOp_exnconstr_field_set (a,b) -> p_byte 10 st; p_tup2 (p_tcref "exn op")  p_int (a,b) st
-  | TOp_tuple_field_get (a)       -> p_byte 11 st; p_int a st
-  | TOp_asm (a,b)                 -> p_byte 12 st; p_tup2 (p_list p_ilinstr) p_typs (a,b) st
-  | TOp_get_ref_lval              -> p_byte 13 st
-  | TOp_ucase_proof (a)     -> p_byte 14 st; p_ucref a st
-  | TOp_coerce                    -> p_byte 15 st
-  | TOp_trait_call (b)            -> p_byte 16 st; p_trait b st
-  | TOp_lval_op (a,b)             -> p_byte 17 st; p_tup2 p_lval_op_kind (p_vref "lval") (a,b) st
-  | TOp_ilcall (a,b,c,d)          -> p_byte 18 st; p_tup4 (ptup9 p_bool p_bool p_bool p_bool p_vrefFlags p_bool p_bool (p_option (p_tup2 p_typ p_typ)) p_ilmref) p_typs p_typs p_typs (a,b,c,d) st
-  | TOp_array                     -> p_byte 19 st
-  | TOp_while _                   -> p_byte 20 st
-  | TOp_for(_,dir)                -> p_byte 21 st; p_int (match dir with FSharpForLoopUp -> 0 | CSharpForLoopUp -> 1 | FSharpForLoopDown -> 2) st
-  | TOp_bytes bytes               -> p_byte 22 st; p_bytes bytes st
-  | TOp_try_catch _                -> p_byte 23 st
-  | TOp_try_finally _               -> p_byte 24 st
-  | TOp_field_get_addr (a)   -> p_byte 25 st; p_rfref a st
-  | TOp_uint16s arr          -> p_byte 26 st; p_array p_uint16 arr st
-  | TOp_rethrow              -> p_byte 27 st
-  | TOp_goto _ | TOp_label _ | TOp_return -> failwith "unexpected backend construct in pickled TAST"
-#endif
-
-and u_op st = 
-  let tag = u_byte st
-  match tag with
-  | 0 -> let a = u_ucref st
-         TOp_ucase (a) 
-  | 1 -> let a = u_tcref st
-         TOp_exnconstr (a) 
-  | 2 -> TOp_tuple 
-  | 3 -> let a = u_recdInfo st
-         let b = u_tcref st
-         TOp_recd (a,b) 
-  | 4 -> let a = u_rfref st
-         TOp_rfield_set (a) 
-  | 5 -> let a = u_rfref st
-         TOp_rfield_get (a) 
-  | 6 -> let a = u_tcref st
-         TOp_ucase_tag_get (a) 
-  | 7 -> let a = u_ucref st
-         let b = u_int st
-         TOp_ucase_field_get (a,b) 
-  | 8 -> let a = u_ucref st
-         let b = u_int st
-         TOp_ucase_field_set (a,b) 
-  | 9 -> let a = u_tcref st
-         let b = u_int st
-         TOp_exnconstr_field_get (a,b) 
-  | 10 -> let a = u_tcref st
-          let b = u_int st
-          TOp_exnconstr_field_set (a,b) 
-  | 11 -> let a = u_int st
-          TOp_tuple_field_get (a) 
-  | 12 -> let a = (u_list u_ilinstr) st
-          let b = u_typs st
-          TOp_asm (a,b) 
-  | 13 -> TOp_get_ref_lval 
-  | 14 -> let a = u_ucref st
-          TOp_ucase_proof (a) 
-  | 15 -> TOp_coerce
-  | 16 -> let a = u_trait st
-          TOp_trait_call a
-  | 17 -> let a = u_lval_op_kind st
-          let b = u_vref st
-          TOp_lval_op (a,b) 
-  | 18 -> let (a1,a2,a3,a4,a5,a6,a7,a8,a9) = (utup9 u_bool u_bool u_bool u_bool u_vrefFlags u_bool u_bool (u_option (u_tup2 u_typ u_typ)) u_ilmref) st
-          let b = u_typs st
-          let c = u_typs st
-          let d = u_typs st
-          TOp_ilcall ((a1,a2,a3,a4,a5,a6,a7,a8,a9),b,c,d) 
-  | 19 -> TOp_array
-  | 20 -> TOp_while NoSequencePointAtWhileLoop
-  | 21 -> let dir = match u_int st with 0 -> FSharpForLoopUp | 1 -> CSharpForLoopUp | 2 -> FSharpForLoopDown | _ -> failwith "unknown for loop"
-          TOp_for (NoSequencePointAtForLoop, dir)
-  | 22 -> TOp_bytes (u_bytes st)
-  | 23 -> TOp_try_catch(NoSequencePointAtTry,NoSequencePointAtWith)
-  | 24 -> TOp_try_finally(NoSequencePointAtTry,NoSequencePointAtFinally)
-  | 25 -> let a = u_rfref st
-          TOp_field_get_addr (a) 
-  | 26 -> TOp_uint16s (u_array u_uint16 st)
-  | 27 -> TOp_rethrow
-  | _ -> ufailwith st "u_op" 
-
-#if INCLUDE_METADATA_WRITER
-and p_expr expr st = 
-(* try *)
-  match expr with 
-  | TExpr_link e -> p_expr !e st
-  | TExpr_const (x,m,ty)                -> p_byte 0 st; p_tup3 p_const p_dummy_range p_typ (x,m,ty) st
-  | TExpr_val (a,b,m)                   -> p_byte 1 st; p_tup3 (p_vref "val") p_vrefFlags p_dummy_range (a,b,m) st
-  | TExpr_op(a,b,c,d)                   -> p_byte 2 st; p_tup4 p_op  p_typs p_Exprs p_dummy_range (a,b,c,d) st
-  | TExpr_seq (a,b,c,_,d)                 -> p_byte 6 st; p_tup4 p_expr p_expr p_int p_dummy_range (a,b,(match c with NormalSeq -> 0 | ThenDoSeq -> 1),d) st
-  | TExpr_lambda (a,b0,b1,c,d,e,_)      -> p_byte 9 st; p_tup5 (p_option p_Val) p_Vals p_expr p_dummy_range p_typ (b0,b1,c,d,e) st
-  | TExpr_tlambda (a,b,c,d,e,_)         -> p_byte 10 st; p_tup4 p_typar_specs p_expr p_dummy_range p_typ (b,c,d,e) st
-  | TExpr_app (a1,a2,b,c,d)             -> p_byte 11 st; p_tup5 p_expr p_typ p_typs p_Exprs p_dummy_range (a1,a2,b,c,d) st
-  | TExpr_letrec (a,b,c,_)              -> p_byte 12 st; p_tup3 p_binds p_expr p_dummy_range (a,b,c) st
-  | TExpr_let (a,b,c,_)                 -> p_byte 13 st; p_tup3 p_bind p_expr p_dummy_range (a,b,c) st
-  | TExpr_match (_,a,b,c,d,e,_)           -> p_byte 14 st; p_tup5 p_dummy_range p_dtree p_targets p_dummy_range p_typ (a,b,c,d,e) st
-  | TExpr_obj(a,b,c,d,e,f,g,_)          -> p_byte 21 st; p_tup6 p_typ (p_option p_Val) p_expr p_methods p_intfs p_dummy_range (b,c,d,e,f,g) st
-  | TExpr_static_optimization(a,b,c,d)  -> p_byte 22 st; p_tup4 p_constraints p_expr p_expr p_dummy_range (a,b,c,d) st
-  | TExpr_tchoose (a,b,c)               -> p_byte 25 st; p_tup3 p_typar_specs p_expr p_dummy_range (a,b,c) st
-  | TExpr_quote(ast,_,m,ty)             -> p_byte 26 st; p_tup3 p_expr p_dummy_range p_typ (ast,m,ty) st
-#endif
-
-(*
-with Nope -> 
-   dprintf "\nloc: %a\nexpr: %s\n\n" output_range (Tastops.range_of_expr expr) (Layout.showL (Tastops.ExprL expr));
-   stdout.Flush();
-   raise Nope
-*)
-and u_expr st = 
-  let tag = u_byte st
-  match tag with
-  | 0 -> let a = u_const st
-         let b = u_dummy_range st
-         let c = u_typ st
-         TExpr_const (a,b,c) 
-  | 1 -> let a = u_vref st
-         let b = u_vrefFlags st
-         let c = u_dummy_range st
-         TExpr_val (a,b,c) 
-  | 2 -> let a = u_op st
-         let b = u_typs st
-         let c = u_Exprs st
-         let d = u_dummy_range st
-         TExpr_op (a,b,c,d)
-  | 6 -> let a = u_expr st
-         let b = u_expr st
-         let c = u_int st
-         let d = u_dummy_range  st
-         TExpr_seq (a,b,(match c with 0 -> NormalSeq | 1 -> ThenDoSeq | _ -> ufailwith st "specialSeqFlag"),SuppressSequencePointOnExprOfSequential,d) 
-  | 9 -> let b0 = u_option u_Val st
-         let b1 = u_Vals st
-         let c = u_expr st
-         let d = u_dummy_range st
-         let e = u_typ st
-         TExpr_lambda (new_uniq(),b0,b1,c,d,e,SkipFreeVarsCache()) 
-  | 10 -> let b = u_typar_specs st
-          let c = u_expr st
-          let d = u_dummy_range st
-          let e = u_typ st
-          TExpr_tlambda (new_uniq(),b,c,d,e,SkipFreeVarsCache()) 
-  | 11 -> let a1 = u_expr st
-          let a2 = u_typ st
-          let b = u_typs st
-          let c = u_Exprs st
-          let d = u_dummy_range st
-          TExpr_app (a1,a2,b,c,d) 
-  | 12 -> let a = u_binds st
-          let b = u_expr st
-          let c = u_dummy_range st
-          TExpr_letrec (a,b,c,NewFreeVarsCache()) 
-  | 13 -> let a = u_bind st
-          let b = u_expr st
-          let c = u_dummy_range st
-          TExpr_let (a,b,c,NewFreeVarsCache()) 
-  | 14 -> let a = u_dummy_range st
-          let b = u_dtree st
-          let c = u_targets st
-          let d = u_dummy_range st
-          let e = u_typ st
-          TExpr_match (NoSequencePointAtStickyBinding,a,b,c,d,e,SkipFreeVarsCache()) 
-  | 21 -> let b = u_typ st
-          let c = (u_option u_Val) st
-          let d = u_expr st
-          let e = u_methods st
-          let f = u_intfs st
-          let g = u_dummy_range st
-          TExpr_obj (new_uniq(),b,c,d,e,f,g,SkipFreeVarsCache())
-  | 22 -> let a = u_constraints st
-          let b = u_expr st
-          let c = u_expr st
-          let d = u_dummy_range st
-          TExpr_static_optimization (a,b,c,d)
-  | 25 -> let a = u_typar_specs st
-          let b = u_expr st
-          let c = u_dummy_range st
-          TExpr_tchoose (a,b,c)
-  | 26 -> let b = u_expr st
-          let c = u_dummy_range st
-          let d = u_typ st
-          TExpr_quote (b,ref None,c,d)
-  | _ -> ufailwith st "u_expr" 
-
-#if INCLUDE_METADATA_WRITER
-and p_arg x st = p_tup2 p_expr p_typ x st
-and p_constraint x st = 
-  match x with
-  | TTyconEqualsTycon (a,b) -> p_byte 0 st; p_tup2 p_typ p_typ (a,b) st
-
-and p_slotparam (TSlotParam (a,b,c,d,e,f)) st = p_tup6 (p_option p_string) p_typ p_bool p_bool p_bool p_attribs (a,b,c,d,e,f) st
-and p_slotsig (TSlotSig (a,b,c,d,e,f)) st = p_tup6 p_string p_typ p_typar_specs p_typar_specs (p_list (p_list p_slotparam)) (p_option p_typ) (a,b,c,d,e,f) st
-and p_method (TObjExprMethod (a,b,c,d,e)) st = p_tup5 p_slotsig p_typar_specs (p_list p_Vals) p_expr p_range (a,b,c,d,e) st 
-and p_methods x st = p_list p_method x st
-and p_intf x st = p_tup2 p_typ p_methods x st
-and p_intfs x st = p_list p_intf x st
-#endif
-
-and u_arg st = u_tup2 u_expr u_typ st
-
-and u_constraint st = 
-  let tag = u_byte st
-  match tag with
-  | 0 -> u_tup2 u_typ u_typ st |> (fun (a,b) -> TTyconEqualsTycon(a,b) ) 
-  | _ -> ufailwith st "u_constraint" 
-
-and u_slotparam st = 
-    let a,b,c,d,e,f = u_tup6 (u_option u_string) u_typ u_bool u_bool u_bool u_attribs st 
-    TSlotParam(a,b,c,d,e,f)
-
-and u_slotsig st = 
-    let a,b,c,d,e,f = u_tup6 u_string u_typ u_typar_specs u_typar_specs (u_list (u_list u_slotparam)) (u_option u_typ) st
-    TSlotSig(a,b,c,d,e,f)
-
-and u_method st = 
-    let a,b,c,d,e = u_tup5 u_slotsig u_typar_specs (u_list u_Vals) u_expr u_range st 
-    TObjExprMethod(a,b,c,d,e)
-
-and u_methods st = u_list u_method st
-
-and u_intf st = u_tup2 u_typ u_methods st
-
-and u_intfs st = u_list u_intf st
-
-#if INCLUDE_METADATA_WRITER
-let _ = fill_p_binds (p_FlatList p_bind);;
-let _ = fill_p_targets (p_array p_target);;
-let _ = fill_p_constraints (p_list p_constraint);;
-let _ = fill_p_Exprs (p_list p_expr);;
-let _ = fill_p_FlatExprs (p_FlatList p_expr);;
-let _ = fill_p_attribs (p_list p_attrib);;
-let _ = fill_p_Vals (p_list p_Val);;
-let _ = fill_p_FlatVals (p_FlatList p_Val);;
-#endif
-
-let _ = fill_u_binds (u_FlatList u_bind);;
-let _ = fill_u_targets (u_array u_target);;
-let _ = fill_u_constraints (u_list u_constraint);;
-let _ = fill_u_Exprs (u_list u_expr);;
-let _ = fill_u_FlatExprs (u_FlatList u_expr);;
-let _ = fill_u_attribs (u_list u_attrib);;
-let _ = fill_u_Vals (u_list u_Val);;
-let _ = fill_u_FlatVals (u_FlatList u_Val);;
-
-(*---------------------------------------------------------------------------
- * Pickle/unpickle F# interface data 
- *------------------------------------------------------------------------- *)
-
-#if INCLUDE_METADATA_WRITER
-let pickle_modul_spec mspec st = p_tycon_spec mspec st
-let PickleModuleInfo minfo st = p_tup3 pickle_modul_spec p_string p_bool (minfo.mspec, minfo.compile_time_working_dir, minfo.usesQuotations) st
-#endif
-
-let unpickle_modul_spec st = u_tycon_spec st 
-  
-let UnpickleModuleInfo st = let a,b,c = u_tup3 unpickle_modul_spec u_string u_bool st in { mspec=a; compile_time_working_dir=b; usesQuotations=c }
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/pickle.mli b/tools/FSharp_1.9.6.16/source/fsharp/pickle.mli
deleted file mode 100644
index 064780de..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/pickle.mli
+++ /dev/null
@@ -1,73 +0,0 @@
-#light
-
-// (c) Microsoft Corporation. All rights reserved
-module Microsoft.FSharp.Compiler.Pickle 
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.Tast
-
-// Fixup pickled data w.r.t. a set of CCU thunks indexed by name
-type PickledDataWithReferences<'rawData> = 
-    { /// The data that uses a collection of CcuThunks internally
-      RawData: 'rawData; 
-      /// The assumptions that need to be fixed up
-      FixupThunks: list } 
-
-    member Fixup : (CcuReference -> ccu) -> 'rawData
-    /// Like Fixup but loader may return None, in which case there is no fixup.
-    member OptionalFixup: (CcuReference -> ccu option) -> 'rawData
-    
-
-type WriterState 
-type ReaderState 
-
-type 'a pickler = 'a -> WriterState -> unit
-type 'a unpickler = ReaderState -> 'a
-
-val internal p_byte : int -> WriterState -> unit
-val internal u_byte : ReaderState -> int
-val internal p_bool : bool -> WriterState -> unit
-val internal u_bool : ReaderState -> bool
-val internal p_int : int -> WriterState -> unit
-val internal u_int : ReaderState -> int
-val internal p_string : string -> WriterState -> unit
-val internal u_string : ReaderState -> string
-val internal p_lazy : 'a pickler -> Lazy<'a> pickler
-val internal u_lazy : 'a unpickler -> Lazy<'a> unpickler
-
-val inline  internal p_tup2 : ('a pickler) -> ('b pickler) -> ('a * 'b) pickler
-val inline  internal p_tup3 : ('a pickler) -> ('b pickler) -> ('c pickler) -> ('a * 'b * 'c) pickler
-val inline  internal p_tup4 : ('a pickler) -> ('b pickler) -> ('c pickler) -> ('d pickler) -> ('a * 'b * 'c * 'd) pickler
-val inline  internal u_tup2 : ('b unpickler) -> ('c unpickler ) -> ('b * 'c) unpickler
-val inline  internal u_tup3 : ('b unpickler) -> ('c unpickler ) -> ('d unpickler ) -> ('b * 'c * 'd) unpickler
-val inline  internal u_tup4 : ('b unpickler) -> ('c unpickler ) -> ('d unpickler ) -> ('e unpickler) -> ('b * 'c * 'd * 'e) unpickler
-val internal p_array : ('a pickler) -> 'a array pickler
-val internal u_array : 'a unpickler -> 'a array unpickler
-val internal p_namemap : ('a pickler) -> 'a Lib.NameMap pickler
-val internal u_namemap : ('a unpickler) -> 'a Lib.NameMap unpickler
-
-val pickle_obj_with_dangling_ccus : string -> Env.TcGlobals -> scope:ccu -> ('a pickler) -> 'a -> byte[]
-val internal unpickle_obj_with_dangling_ccus : string -> viewedScope:ILScopeRef -> ('a  unpickler) -> byte[] ->  PickledDataWithReferences<'a>
-
-val internal p_const : Constant pickler
-val internal u_const : Constant unpickler
-val internal p_vref : string -> ValRef pickler
-val internal u_vref : ValRef unpickler
-val internal p_tcref : string -> TyconRef pickler
-val internal u_tcref : TyconRef unpickler
-val internal p_ucref : UnionCaseRef pickler
-val internal u_ucref : UnionCaseRef unpickler
-val internal p_expr : expr pickler
-val internal u_expr : expr unpickler
-val internal p_typ : typ pickler
-val internal u_typ : typ unpickler
-
-val internal pickle_modul_spec : pickler
-val internal unpickle_modul_spec : ReaderState -> ModuleOrNamespace
-val internal PickleModuleInfo : pickler
-val internal UnpickleModuleInfo : ReaderState -> PickledModuleInfo
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/range.ml b/tools/FSharp_1.9.6.16/source/fsharp/range.ml
deleted file mode 100644
index c0a6bae6..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/range.ml
+++ /dev/null
@@ -1,194 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-#light
-
-/// Anything to do with special names of identifiers and other lexical rules 
-module (* internal *) Microsoft.FSharp.Compiler.Range
-
-open System.IO
-open System.Collections.Generic
-open Microsoft.FSharp.Text.Printf
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler  
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Lib.Bits
-
-
-
-type file_idx = int32 
-type pos = int32 
-type range = int64 
-(*    { rangeFile: string;
-      rangeBegin: pos;
-      rangeEnd: pos }  *) 
-    (* { posLine: int; posCol: int }  *)
-
-let col_nbits  = 9
-let line_nbits  = 16
-
-let pos_nbits = line_nbits + col_nbits
-let _ = assert (pos_nbits <= 32)
-let pos_col_mask  = mask32 0         col_nbits
-let line_col_mask = mask32 col_nbits line_nbits
-
-let mk_pos l c = 
-    let l = max 0 l in
-    let c = max 0 c in
-        ( c &&& pos_col_mask)
-    ||| ((l <<< col_nbits) &&& line_col_mask)
-
-let inline (lsr)  (x:int) (y:int)  = int32 (uint32 x >>> y)
-
-let line_of_pos p =  (p lsr col_nbits)
-let col_of_pos p =  (p &&& pos_col_mask)
-
-let bits_of_pos (x:pos) :int32 = x
-let pos_of_bits (x:int32) : pos = x
-
-let file_idx_nbits = 14
-let start_line_nbits = line_nbits
-let start_col_nbits = col_nbits
-let end_line_nbits = line_nbits
-let end_col_nbits = col_nbits
-let _ = assert (file_idx_nbits + start_line_nbits + start_col_nbits + end_line_nbits + end_col_nbits = 64)
-
-let file_idx_mask   = mask64 0 file_idx_nbits
-let start_line_mask = mask64 (file_idx_nbits) start_line_nbits
-let start_col_mask  = mask64 (file_idx_nbits + start_line_nbits) start_col_nbits
-let end_line_mask   = mask64 (file_idx_nbits + start_line_nbits + start_col_nbits) end_line_nbits
-let end_col_mask    = mask64 (file_idx_nbits + start_line_nbits + start_col_nbits + end_line_nbits) end_col_nbits
-
-let mk_file_idx_range fidx b e = 
-        int64(fidx)
-    ||| (int64(line_of_pos b) <<< file_idx_nbits) 
-    ||| (int64(col_of_pos b)  <<< (file_idx_nbits + start_line_nbits))
-    ||| (int64(line_of_pos e) <<< (file_idx_nbits + start_line_nbits + start_col_nbits))
-    ||| (int64(col_of_pos e)  <<< (file_idx_nbits + start_line_nbits + start_col_nbits + end_line_nbits))
-let file_idx_of_range r   = int32(r &&& file_idx_mask)
-let start_line_of_range r = int32((r &&& start_line_mask) >>> file_idx_nbits)
-let start_col_of_range r  = int32((r &&& start_col_mask)  >>> (file_idx_nbits + start_line_nbits)) 
-let end_line_of_range r   = int32((r &&& end_line_mask)   >>> (file_idx_nbits + start_line_nbits + start_col_nbits)) 
-let end_col_of_range r    = int32((r &&& end_col_mask)    >>> (file_idx_nbits + start_line_nbits + start_col_nbits + end_line_nbits)) 
-
-
-// This is just a standard unique-index table
-type FileIndexTable() = 
-    class
-        let indexToFileTable = new ResizeArray<_>(11)
-        let fileToIndexTable = new Dictionary(11)
-        member t.FileToIndex f = 
-            let mutable res = 0 in
-            let ok = fileToIndexTable.TryGetValue(f,&res) in
-            if ok then res 
-            else
-                lock fileToIndexTable (fun () -> 
-                    let mutable res = 0 in
-                    let ok = fileToIndexTable.TryGetValue(f,&res) in
-                    if ok then res 
-                    else
-                        let n = indexToFileTable.Count in
-                        indexToFileTable.Add(f);
-                        fileToIndexTable.[f] <- n;
-                        n)
-
-        member t.IndexToFile n = 
-            (if n < 0 then failwithf "file_of_file_idx: negative argument: n = %d\n" n);
-            (if n >= indexToFileTable.Count then failwithf "file_of_file_idx: invalid argument: n = %d\n" n);
-            indexToFileTable.[n]
-    end
-    
-let maxFileIndex = pown32 file_idx_nbits
-
-// WARNING: Global Mutable State, holding a mapping between integers and filenames
-let fileIndexTable = new FileIndexTable()
-// Note if we exceed the maximum number of files we'll start to report incorrect file names
-let file_idx_of_file f = fileIndexTable.FileToIndex(f) % maxFileIndex 
-let file_of_file_idx n = fileIndexTable.IndexToFile(n)
-
-let mk_range f b e = mk_file_idx_range (file_idx_of_file f) b e
-let file_of_range r = file_of_file_idx (file_idx_of_range r)
-
-
-(* end representation, start derived ops *)
-
-let start_of_range r = mk_pos (start_line_of_range r) (start_col_of_range r)
-let end_of_range r = mk_pos (end_line_of_range r) (end_col_of_range r)
-let dest_file_idx_range r = file_idx_of_range r,start_of_range r,end_of_range r
-let dest_range r = file_of_range r,start_of_range r,end_of_range r
-let dest_pos p = line_of_pos p,col_of_pos p
-
-let trim_range_right r n = 
-    let fidx,p1,p2 = dest_file_idx_range r in 
-    let l2,c2 = dest_pos p2 in 
-    mk_file_idx_range fidx p1 (mk_pos l2 (max 0 (c2 - n)))
-                 
-let pos_ord   p1 p2 = Pair.order (Int32.order   ,Int32.order) (dest_pos p1) (dest_pos p2)
-(* range_ord: not a total order, but enough to sort on ranges *)      
-let range_ord r1 r2 = Pair.order (String.order,pos_ord) (file_of_range r1,start_of_range r1) (file_of_range r2,start_of_range r2)
-
-let output_pos (os:TextWriter) m = fprintf os "(%d,%d)" (line_of_pos m) (col_of_pos m)
-let output_range (os:TextWriter) m = fprintf os "%s%a-%a" (file_of_range m) output_pos (start_of_range m) output_pos (end_of_range m)
-let boutput_pos os m = bprintf os "(%d,%d)" (line_of_pos m) (col_of_pos m)
-let boutput_range os m = bprintf os "%s%a-%a" (file_of_range m) boutput_pos (start_of_range m) boutput_pos (end_of_range m)
-    
-let start_range_of_range m =    let f,s,e = dest_file_idx_range m in mk_file_idx_range f s s
-let end_range_of_range m =   let f,s,e = dest_file_idx_range m in mk_file_idx_range f e e
-let pos_gt p1 p2 =
-   (line_of_pos p1 > line_of_pos p2 or
-      (line_of_pos p1 = line_of_pos p2 &&
-       col_of_pos p1 > col_of_pos p2))
-
-let pos_eq p1 p2 = (line_of_pos p1 = line_of_pos p2 &&  col_of_pos p1 = col_of_pos p2)
-let pos_geq p1 p2 = pos_eq p1 p2 or pos_gt p1 p2
-
-let union_ranges m1 m2 = 
-    if file_idx_of_range m1 <> file_idx_of_range m2 then m2 else
-    let b = 
-      if pos_geq (start_of_range m1) (start_of_range m2) then (start_of_range m2)
-      else (start_of_range m1) in 
-    let e = 
-      if pos_geq (end_of_range m1) (end_of_range m2) then (end_of_range m1)
-      else (end_of_range m2) in 
-    mk_file_idx_range (file_idx_of_range m1) b e
-
-let range_contains_range m1 m2 =
-    (file_of_range m1) = (file_of_range m2) &&
-    pos_geq (start_of_range m2) (start_of_range m1) &&
-    pos_geq (end_of_range m1) (end_of_range m2)
-
-let range_contains_pos m1 p =
-    pos_geq p (start_of_range m1) &&
-    pos_geq (end_of_range m1) p
-
-let range_before_pos m1 p =
-    pos_geq p (end_of_range m1)
-
-let rangeN filename line =  mk_range filename (mk_pos line 0) (mk_pos line 80)
-let pos0 = mk_pos 1 0
-let range0 =  rangeN "unknown" 1
-let rangeStartup = rangeN "startup" 1
-let rangeCmdArgs = rangeN "commandLineArgs" 0
-
-// Store a file_idx in the pos_fname field, so we don't have to look up the 
-// file_idx hash table to map back from pos_fname to a file_idx during lexing 
-let encode_file_idx idx = 
-   Bytes.utf8_bytes_as_string (Bytes.of_intarray [|  (idx &&& 0x7F); 
-                                                     ((idx lsr 7) &&& 0x7F)  |])
-
-let encode_file file = file |> file_idx_of_file |> encode_file_idx
-
-let _ = assert (file_idx_nbits <= 14) (* this encoding is size limited *)
-let decode_file_idx (s:string) = 
-    if String.length s = 0 then 0 else 
-    let idx =   (int32 s.[0]) 
-             ||| ((int32 s.[1]) <<< 7) in 
-    idx
-           
-(* For Diagnostics *)
-let string_of_pos   pos = let line,col = line_of_pos pos,col_of_pos pos in sprintf "(%d,%d)" line col
-let string_of_range r   = sprintf "%s%s-%s" (file_of_range r) (string_of_pos (start_of_range r)) (string_of_pos (end_of_range r))
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/range.mli b/tools/FSharp_1.9.6.16/source/fsharp/range.mli
deleted file mode 100644
index 1ec66c83..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/range.mli
+++ /dev/null
@@ -1,92 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-module (* internal *) Microsoft.FSharp.Compiler.Range
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open System.Text
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler  
-
-  
-(* we keep a global tables of filenames that we can reference by integers *)
-type file_idx = int32 
-val file_idx_of_file : string -> file_idx
-val file_of_file_idx : file_idx -> string
-
-val col_nbits: int (* number of bits needed to store the largest possible column number we care about *)
-val line_nbits: int (* number of bits needed to store the largest possible line number we care about *)
-
-type pos = int32 
-val line_of_pos : pos -> int
-val col_of_pos : pos -> int
-val dest_pos : pos -> int * int
-/// Create a position for the given line and column
-val mk_pos : line:int -> column:int -> pos
-
-(* the raw bits for the pos *)
-val pos_nbits: int (* maximum number of bits needed to store an encoded position *)
-val bits_of_pos : pos -> int32
-val pos_of_bits : int32 -> pos 
-
-val pos_ord : pos -> pos -> int
-
-type range = int64 
-
-(* this view of range marks uses file indexes explicitly *)
-val mk_file_idx_range : file_idx -> pos -> pos -> range
-val dest_file_idx_range : range -> file_idx * pos * pos
-val file_idx_of_range : range -> file_idx
-val start_of_range : range -> pos
-val end_of_range : range -> pos
-
-(* this view hides the use of file indexes and just returns the filenames *)
-val file_of_range : range -> string
-val dest_range : range -> string * pos * pos
-val mk_range : string -> pos -> pos -> range
-
-(* derived accessors *)
-val start_line_of_range : range -> int
-val start_col_of_range : range -> int
-val end_line_of_range : range -> int
-val end_col_of_range : range -> int
-
-val trim_range_right : range -> int -> range
-
-(* range_ord: not a total order, but enough to sort on ranges *)      
-val range_ord : range -> range -> int
-
-val output_pos : out_channel -> pos -> unit
-val output_range : out_channel -> range -> unit
-val boutput_pos : StringBuilder -> pos -> unit
-val boutput_range : StringBuilder -> range -> unit
-    
-val start_range_of_range : range -> range
-val end_range_of_range : range -> range
-val pos_gt : pos -> pos -> bool
-val pos_eq : pos -> pos -> bool
-val pos_geq : pos -> pos -> bool
-
-val union_ranges : range -> range -> range
-val range_contains_range : range -> range -> bool
-val range_contains_pos : range -> pos -> bool
-val range_before_pos : range -> pos -> bool
-
-val rangeN : string -> int -> range
-val pos0 : pos
-val range0 : range
-val rangeStartup : range
-val rangeCmdArgs : range
- 
-// Store a file_idx in the pos_fname field, so we don't have to look up the 
-// file_idx hash table to map back from pos_fname to a file_idx during lexing 
-//
-// Because we are using file indexes we actually encode the corresponding 
-// file index within the bits of the string, which allows us to recover the file index 
-// efficiently while creating positions during lexing. 
-val decode_file_idx : string -> file_idx
-val encode_file : string -> string 
-
-(* For diagnostics *)  
-val string_of_pos   : pos   -> string
-val string_of_range : range -> string
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/sr.fs b/tools/FSharp_1.9.6.16/source/fsharp/sr.fs
deleted file mode 100644
index 95831400..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/sr.fs
+++ /dev/null
@@ -1,180 +0,0 @@
-#light
-
-namespace Microsoft.FSharp.Compiler 
-    open Microsoft.FSharp.Core
-    open Microsoft.FSharp.Core.Operators
-    open Microsoft.FSharp.Text
-    open Microsoft.FSharp.Collections
-    open Microsoft.FSharp.Reflection
-    open System.Globalization
-    open System.IO
-    open System.Text
-    open System.Reflection
-    
-    module SR =
-        let private resources = lazy (new System.Resources.ResourceManager("fsstrings", System.Reflection.Assembly.GetExecutingAssembly()))
-
-        let GetString(name:string) =        
-            let s = resources.Force().GetString(name, System.Globalization.CultureInfo.CurrentUICulture)
-#if DEBUG
-            if null = s then
-                System.Diagnostics.Debug.Assert(false, sprintf "**RESOURCE ERROR**: Resource token %s does not exist!" name)
-#endif
-            s
-
-        let GetObject(name:string) =
-            let o = resources.Force().GetObject(name, System.Globalization.CultureInfo.CurrentUICulture)
-#if DEBUG
-            if null = o then
-                System.Diagnostics.Debug.Assert(false, sprintf "**RESOURCE ERROR**: Resource token %s does not exist!" name)
-#endif
-            o
-            
-        
-    module DiagnosticMessage =
-    
-        open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-        open Microsoft.FSharp.Reflection
-        open System.Reflection
-        open Internal.Utilities.StructuredFormat
-  
-        let staticInvokeFlags = BindingFlags.Public ||| BindingFlags.InvokeMethod ||| BindingFlags.Static
-        let mkFunctionValue (tys: System.Type[]) (impl:obj->obj) = 
-            FSharpValue.MakeFunction(FSharpType.MakeFunctionType(tys.[0],tys.[1]), impl)
-            
-        let funTyC = typeof<(obj -> obj)>.GetGenericTypeDefinition()  
-        let mkFunTy a b = funTyC.MakeGenericType([| a;b |])
-
-        let isNamedType(ty:System.Type) = not (ty.IsArray ||  ty.IsByRef ||  ty.IsPointer)
-        let isFunctionType (ty1:System.Type)  = 
-            isNamedType(ty1) && ty1.IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(funTyC)
-
-        let rec destFunTy (ty:System.Type) =
-            if isFunctionType ty then 
-                ty, ty.GetGenericArguments() 
-            else
-                match ty.BaseType with 
-                | null -> failwith "destFunTy: not a function type" 
-                | b -> destFunTy b 
-
-        let buildFunctionForOneArgPat (ty: System.Type) impl = 
-            let _,tys = destFunTy ty 
-            let dty = tys.[0] 
-            let rty = tys.[1]
-            // PERF: this technique is a bit slow (e.g. in simple cases, like 'sprintf "%x"') 
-            mkFunctionValue tys (fun inp -> impl rty inp)
-                    
-        let capture1 (fmt:string) i args ty (go : obj list -> System.Type -> int -> obj) : obj = 
-            match fmt.[i] with
-            | '%' -> go args ty (i+1) 
-            | 'd'
-            | 'f'
-            | 's' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1))
-            | _ -> failwith "bad format specifier"
-            
-        // newlines and tabs get converted to strings when read from a resource file
-        // this will preserve their original intention    
-        let postProcessString (s : string) =
-            s.Replace("\\n","\n").Replace("\\t","\t")
-            
-        let createMessageString (messageString : string) (fmt : Printf.StringFormat<'T>) : 'T = 
-            let fmt = fmt.Value // here, we use the actual error string, as opposed to the one stored as fmt
-            let len = fmt.Length 
-
-            /// Function to capture the arguments and then run.
-            let rec capture args ty i = 
-                if i >= len ||  (fmt.[i] = '%' && i+1 >= len) then 
-                    let b = new System.Text.StringBuilder()    
-                    b.AppendFormat(messageString, (Array.of_list (List.rev args))) |> ignore
-                    box(b.ToString())
-                // REVIEW: For these purposes, this should be a nop, but I'm leaving it
-                // in incase we ever decide to support labels for the error format string
-                // E.g., "%s%d"
-                elif System.Char.IsSurrogatePair(fmt,i) then 
-                   capture args ty (i+2)
-                else
-                    match fmt.[i] with
-                    | '%' ->
-                        let i = i+1 
-                        capture1 fmt i args ty capture
-                    | c ->
-                        capture args ty (i+1) 
-
-            (unbox (capture [] (typeof<'T>) 0) : 'T)
-    
-        type ResourceString<'T>(fmtString : string, fmt : Printf.StringFormat<'T>) =
-            member a.Format =
-                createMessageString fmtString fmt
-            
-        let DeclareResourceString ((messageID : string),(fmt : Printf.StringFormat<'T>)) =
-            let mutable messageString = SR.GetString(messageID)
-#if DEBUG
-            // validate that the message string exists
-            let fmtString = fmt.Value
-            
-            if null = messageString then
-                System.Diagnostics.Debug.Assert(false, sprintf "**DECLARED MESSAGE ERROR** String resource %s does not exist" messageID)
-                messageString <- ""
-            
-            // validate the formatting specifiers
-            let countFormatHoles (s : string) =
-                // remove escaped format holes
-                let s = s.Replace("{{","").Replace("}}","")
-                let len = s.Length - 2
-                let mutable pos = 0
-                let mutable nHoles = 0
-                let mutable order = Set.empty
-    
-                while pos < len do
-                    if s.[pos] = '{' then
-                        let mutable pos' = pos+1
-                        while System.Char.IsNumber(s.[pos']) do
-                            pos' <- pos' + 1
-                        if pos' > pos+1 && s.[pos'] = '}' then
-                            nHoles <- nHoles + 1
-                            let ordern = (int) (s.[(pos+1) .. (pos'-1)])
-                            order <- order.Add(ordern)
-                            pos <- pos'
-                    pos <- pos + 1
-                // the sort should be unnecessary, but better safe than sorry
-                nHoles,Set.to_list order |> List.sort |> List.rev
-
-            let countFormatPlaceholders (s : string) =
-                // strip any escaped % characters - yes, this will fail if given %%%...
-                let s = s.Replace("%%","")
-                
-                if s = "" then 
-                    0
-                else
-                    let len = s.Length - 1
-                    let mutable pos = 0
-                    let mutable nFmt = 0
-                
-                    while pos < len do
-                        if s.[pos] = '%' && 
-                          (s.[pos+1] = 'd' || s.[pos+1] = 's' || s.[pos+1] = 'f') then
-                            nFmt <- nFmt + 1
-                            pos <- pos + 2 ;
-                        else
-                            pos <- pos + 1 ;
-                    nFmt
-                    
-            let nHoles,holes = countFormatHoles messageString
-            let nPlaceholders = countFormatPlaceholders fmtString
-            
-            // first, verify that the number of holes in the message string does not exceed the 
-            // largest hole reference
-            if holes <> [] && holes.[0] > nHoles - 1 then
-                System.Diagnostics.Debug.Assert(false, sprintf "**DECLARED MESSAGE ERROR** Message string %s contains %d holes, but references hole %d" messageID nHoles holes.[0])
-                
-            // next, verify that the number of format placeholders is the same as the number of holes
-            if nHoles <> nPlaceholders then
-                System.Diagnostics.Debug.Assert(false, sprintf "**DECLARED MESSAGE ERROR** Message string %s contains %d holes, but its format specifier contains %d placeholders" messageID nHoles nPlaceholders)
-                
- #endif            
-            messageString <- postProcessString messageString                            
-            new ResourceString<'T>(messageString, fmt)
-            
-            
-                 
-        
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/sr.fsi b/tools/FSharp_1.9.6.16/source/fsharp/sr.fsi
deleted file mode 100644
index ca1b01c5..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/sr.fsi
+++ /dev/null
@@ -1,15 +0,0 @@
-#light
-
-namespace Microsoft.FSharp.Compiler 
-    
-    module SR =
-        val GetString : string -> string
-        val GetObject : string -> System.Object
-            
-        
-    module DiagnosticMessage =
-        type ResourceString<'T> =
-          new : string * Printf.StringFormat<'T> -> ResourceString<'T>
-          member Format : 'T
-
-        val DeclareResourceString : string * Printf.StringFormat<'T> -> ResourceString<'T>
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/sreflect.ml b/tools/FSharp_1.9.6.16/source/fsharp/sreflect.ml
deleted file mode 100644
index 761f0078..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/sreflect.ml
+++ /dev/null
@@ -1,428 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-//-------------------------------------------------------------------------
-// Expression and Type Specifications.  These are what we save
-//------------------------------------------------------------------------- 
-
-
-module (* internal *) Microsoft.FSharp.Compiler.Sreflect
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal
-open Microsoft.FSharp.Compiler
-open Microsoft.FSharp.Compiler.Lib
-
-module Bytebuf = Bytes.Bytebuf
-module Bytestream = Bytes.Bytestream
-
-let mkRLinear mk (vs,body) = List.foldBack (fun v acc -> mk (v,acc)) vs body 
-
-type TypeVarData = { tvName: string; }
-type NamedTypeData = { tcName: string; tcAssembly:  string }
-
-type TypeCombOp = 
-    | ArrayTyOp  of int (* rank *) 
-    | FunTyOp
-    | NamedTyOp of NamedTypeData
-
-type TypeData =
-    | VarType   of int
-    | AppType   of TypeCombOp * TypeData list
-  
-
-let mkVarTy v = VarType v 
-let mkFunTy (x1,x2) = AppType(FunTyOp, [x1; x2])  
-let mkArrayTy (n,x) = AppType(ArrayTyOp n, [x]) 
-let mkNamedTy (r,l) = AppType(NamedTyOp r,l) 
-
-
-type CtorData = 
-    { ctorParent: NamedTypeData; 
-      ctorArgTypes: TypeData list; }
-
-type MethodData = 
-    { methParent: NamedTypeData;
-      methName: string;
-      methArgTypes: TypeData list;
-      methRetType: TypeData; 
-      numGenericArgs: int }
-  
-type VarData = 
-    { vText: string; 
-      vType: TypeData } 
-type FieldData = NamedTypeData * string
-type RecdFieldData = NamedTypeData * string
-type PropInfoData = NamedTypeData * string * TypeData * TypeData list
-
-type CombOp = 
-    | AppOp
-    | CondOp  
-    | ModuleValueOp of NamedTypeData * string * bool
-    | LetRecOp  
-    | LetRecCombOp  
-    | LetOp  
-    | RecdMkOp  of NamedTypeData
-    | RecdGetOp  of NamedTypeData * string
-    | RecdSetOp  of NamedTypeData * string
-    | SumMkOp  of NamedTypeData * string
-    | SumFieldGetOp  of NamedTypeData * string * int
-    | SumTagTestOp of NamedTypeData * string
-    | TupleMkOp  
-    | TupleGetOp of int
-    | UnitOp   
-    | BoolOp   of bool   
-    | StringOp of string 
-    | SingleOp of float32 
-    | DoubleOp of float  
-    | CharOp   of char   
-    | SByteOp  of sbyte
-    | ByteOp   of byte   
-    | Int16Op  of int16  
-    | UInt16Op of uint16 
-    | Int32Op  of int32  
-    | UInt32Op of uint32 
-    | Int64Op  of int64  
-    | UInt64Op of uint64 
-    | PropGetOp of PropInfoData
-    | FieldGetOp of NamedTypeData * string
-    | CtorCallOp of CtorData 
-    | MethodCallOp of MethodData 
-    | CoerceOp 
-    | NewArrayOp
-    | DelegateOp
-    | SeqOp 
-    | ForLoopOp 
-    | WhileLoopOp 
-    | NullOp   
-    | DefaultValueOp 
-    | PropSetOp of PropInfoData
-    | FieldSetOp  of NamedTypeData * string
-    | AddressOfOp
-    | AddressSetOp
-    | TypeTestOp 
-    | TryFinallyOp
-    | TryWithOp 
-
-
-/// Represents specifications of a subset of F# expressions 
-type ExprData =
-    | AttrExpr   of ExprData * ExprData list
-    | CombExpr   of CombOp * TypeData list * ExprData list
-    | VarExpr    of int
-    | QuoteExpr  of ExprData 
-    | LambdaExpr of VarData * ExprData
-    | HoleExpr   of TypeData * int
-  
-let mkVar v = VarExpr v 
-let mkHole (v,idx) = HoleExpr (v ,idx)
-let mkApp (a,b) = CombExpr(AppOp, [], [a; b]) (* REVIEW: type arguments? *)
-let mkLambda (a,b) = LambdaExpr (a,b) 
-let mkQuote (a) = QuoteExpr (a) 
-
-let mkCond (x1,x2,x3)          = CombExpr(CondOp,[], [x1;x2;x3])  
-let mkModuleValueApp (tcref,nm,isProp,tyargs,args: ExprData list list) = CombExpr(ModuleValueOp(tcref,nm,isProp),tyargs,List.concat args)
-let mkTuple (ty,x)             = CombExpr(TupleMkOp,[ty],x)
-let mkLet ((v,e),b)            = CombExpr(LetOp,[],[e;mkLambda (v,b)])  (* nb. order preserves source order *)
-let mkUnit ()                  = CombExpr(UnitOp, [], []) 
-let mkNull ty                  = CombExpr(NullOp, [ty], []) 
-
-let mkLetRecRaw e1 = CombExpr(LetRecOp,[],[e1])
-let mkLetRecCombRaw args = CombExpr(LetRecCombOp,[], args) 
-let mkLetRec (ves,body) = 
-     let vs,es = List.unzip ves in 
-     mkLetRecRaw(mkRLinear mkLambda  (vs, mkLetRecCombRaw (body::es)))
-      
-let mkRecdMk      (n,tys,args)            = CombExpr(RecdMkOp n,tys,args)  
-let mkRecdGet     ((d1,d2),tyargs,args)   = CombExpr(RecdGetOp(d1,d2),tyargs,args)
-let mkRecdSet     ((d1,d2),tyargs,args)   = CombExpr(RecdSetOp(d1,d2),tyargs,args)
-let mkSum         ((d1,d2),tyargs,args)   = CombExpr(SumMkOp(d1,d2),tyargs,args)
-let mkSumFieldGet ((d1,d2,d3),tyargs,arg) = CombExpr(SumFieldGetOp(d1,d2,d3),tyargs,[arg])
-let mkSumTagTest  ((d1,d2),tyargs,arg)    = CombExpr(SumTagTestOp(d1,d2),tyargs,[arg])
-let mkTupleGet    (ty,n,e)                = CombExpr(TupleGetOp n,[ty],[e]) 
-
-let mkCoerce  (ty,arg)        = CombExpr(CoerceOp,[ty],[arg])
-let mkTypeTest  (ty,arg)      = CombExpr(TypeTestOp,[ty],[arg])
-let mkAddressOf  (arg)        = CombExpr(AddressOfOp,[],[arg])
-let mkAddressSet  (arg1,arg2) = CombExpr(AddressSetOp,[],[arg1;arg2])
-let mkDefaultValue (ty)       = CombExpr(DefaultValueOp,[ty],[])
-let mkNewArray     (ty,args)  = CombExpr(NewArrayOp,[ty],args)
-
-let mkBool   v = CombExpr(BoolOp   v,[],[]) 
-let mkString v = CombExpr(StringOp v,[],[]) 
-let mkSingle v = CombExpr(SingleOp v,[],[]) 
-let mkDouble v = CombExpr(DoubleOp v,[],[]) 
-let mkChar   v = CombExpr(CharOp   v,[],[]) 
-let mkSByte  v = CombExpr(SByteOp  v,[],[]) 
-let mkByte   v = CombExpr(ByteOp   v,[],[]) 
-let mkInt16  v = CombExpr(Int16Op  v,[],[]) 
-let mkUInt16 v = CombExpr(UInt16Op v,[],[]) 
-let mkInt32  v = CombExpr(Int32Op  v,[],[]) 
-let mkUInt32 v = CombExpr(UInt32Op v,[],[]) 
-let mkInt64  v = CombExpr(Int64Op  v,[],[]) 
-let mkUInt64 v = CombExpr(UInt64Op v,[],[]) 
-
-let mkSequential (e1,e2)       = CombExpr(SeqOp,[],[e1;e2])
-let mkForLoop (x1,x2,x3)       = CombExpr(ForLoopOp,[], [x1;x2;x3])  
-let mkWhileLoop (e1,e2)        = CombExpr(WhileLoopOp,[],[e1;e2])
-let mkTryFinally(e1,e2)        = CombExpr(TryFinallyOp,[],[e1;e2])
-let mkTryWith(e1,vf,ef,vh,eh)  = CombExpr(TryWithOp,[],[e1;mkLambda(vf,ef);mkLambda(vh,eh)])
-let mkDelegate (ty,e)          = CombExpr(DelegateOp,[ty],[e])
-let mkPropGet  (d,tyargs,args) = CombExpr(PropGetOp(d),tyargs,args)
-let mkPropSet  (d,tyargs,args) = CombExpr(PropSetOp(d),tyargs,args)
-let mkFieldGet ((d1,d2),tyargs,args) = CombExpr(FieldGetOp(d1,d2),tyargs,args)
-let mkFieldSet ((d1,d2),tyargs,args) = CombExpr(FieldSetOp(d1,d2),tyargs,args)
-let mkCtorCall   (d,tyargs,args) = CombExpr(CtorCallOp(d),tyargs,args)
-let mkMethodCall (d,tyargs,args) = CombExpr(MethodCallOp(d),tyargs,args)
-let mkAttributedExpression(e,attr) = AttrExpr(e,[attr])
-
-//---------------------------------------------------------------------------
-// Pickle/unpickle expression and type specifications in a stable format
-// compatible with those read by Microsoft.FSharp.Quotations
-//--------------------------------------------------------------------------- 
-
-let pickledDefinitionsResourceNameBase = "ReflectedDefinitions"
-
-let freshVar (n,ty) = {vText=n; vType=ty}
-
-module SimplePickle = begin
-
-    type 'a tbl = 
-        { tbl: Hashtbl.t<'a,int>;
-          mutable rows: 'a list;
-          mutable count: int }
-
-    let new_tbl () = 
-      { tbl = (Hashtbl.create 20);
-        rows=[];
-        count=0; }
-
-    let get_tbl tbl = List.rev tbl.rows
-    let tbl_size tbl = List.length tbl.rows
-
-    let add_entry tbl x =
-        let n = tbl.count in 
-        tbl.count <- tbl.count + 1;
-        Hashtbl.add tbl.tbl x n;
-        tbl.rows <- x :: tbl.rows;
-        n
-
-    let find_or_add_entry tbl x =
-        if Hashtbl.mem tbl.tbl x then Hashtbl.find tbl.tbl x 
-        else add_entry tbl x
-
-
-    let tbl_find tbl x = Hashtbl.find tbl.tbl x 
-
-    let tbl_mem tbl x = Hashtbl.mem tbl.tbl x 
-
-    type outstate = 
-        { os: Bytebuf.t; 
-          ostrings: string tbl }
-
-    let p_byte b st = Bytebuf.emit_int_as_byte st.os b
-    let p_bool b st = p_byte (if b then 1 else 0) st
-    let p_void (os: outstate) = ()
-    let p_unit () (os: outstate) = ()
-    let prim_pint32 i st = 
-        p_byte (Bits.b0 i) st;
-        p_byte (Bits.b1 i) st;
-        p_byte (Bits.b2 i) st;
-        p_byte (Bits.b3 i) st
-
-    // compress integers according to the same scheme used by CLR metadata 
-    // This halves the size of pickled data 
-    let p_int32 n st = 
-        if n >= 0 &&  n <= 0x7F then 
-            p_byte (Bits.b0 n) st
-        else if n >= 0x80 && n <= 0x3FFF then  
-            p_byte  (0x80 ||| (n >>> 8)) st; 
-            p_byte (n &&& 0xFF) st 
-        else 
-            p_byte 0xFF st;
-            prim_pint32 n st
-
-    let p_bytes s st = 
-        let len = Bytes.length s 
-        p_int32 (len) st;
-        Bytebuf.emit_bytes st.os s
-
-    let prim_pstring s st = 
-        let bytes = Bytes.string_as_utf8_bytes s 
-        let len = Bytes.length bytes 
-        p_int32 (len) st;
-        Bytebuf.emit_bytes st.os bytes
-
-    let p_int (c:int) st = p_int32 c st
-    let p_int8 (i:int8) st = p_int32 (int32 i) st
-    let p_uint8 (i:uint8) st = p_byte (int i) st
-    let p_int16 (i:int16) st = p_int32 (int32 i) st
-    let p_uint16 (x:uint16) st = p_int32 (int32 x) st
-    let puint32 (x:uint32) st = p_int32 (int32 x) st
-    let p_int64 i st = 
-        p_int32 (int32 (i &&& 0xFFFFFFFFL)) st;
-        p_int32 (int32 (i >>> 32)) st
-
-    let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0)
-    let bits_of_float (x:float) = System.BitConverter.ToInt64(System.BitConverter.GetBytes(x),0)
-
-    let p_uint64 x st = p_int64 (int64 x) st
-    let p_double i st = p_int64 (bits_of_float i) st
-    let p_single i st = p_int32 (bits_of_float32 i) st
-    let p_char i st = p_uint16 (uint16 (int32 i)) st
-    let inline p_tup2 p1 p2 (a,b) (st:outstate) = (p1 a st : unit); (p2 b st : unit)
-    let inline p_tup3 p1 p2 p3 (a,b,c) st = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit)
-    let inline p_tup4 p1 p2 p3 p4 (a,b,c,d) st = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit)
-    let inline p_tup5 p1 p2 p3 p4 p5 (a,b,c,d,e) st = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit)
-    let puniq tbl key st = p_int (find_or_add_entry tbl key) st
-    let p_string s st = puniq st.ostrings s st
-    let rec p_list f x st =
-        match x with 
-        | [] -> p_byte 0 st
-        | h :: t -> p_byte 1 st; f h st; p_list f t st
-          
-
-    let pickle_obj p x =
-        let stringTab,phase1bytes =
-            let st1 = 
-                { os = Bytebuf.create 100000; 
-                  ostrings=new_tbl(); } in
-            p x st1;
-            get_tbl st1.ostrings, Bytebuf.close st1.os in
-        let phase2data = (stringTab,phase1bytes) in 
-        let phase2bytes = 
-            let st2 = 
-               { os = Bytebuf.create 100000; 
-                  ostrings=new_tbl();} in
-            p_tup2 (p_list prim_pstring) p_bytes phase2data st2;
-            Bytebuf.close st2.os in 
-        phase2bytes
-end
-
-open SimplePickle
-
-
-let p_assref x st = p_string x st
-
-let p_NamedType x st = p_tup2 p_string p_assref (x.tcName, x.tcAssembly) st
-
-let p_tycon x st = 
-    match x with
-    | FunTyOp     -> p_byte 1 st
-    | NamedTyOp a -> p_byte 2 st; p_NamedType a st
-    | ArrayTyOp a -> p_byte 3 st; p_int a st
-
-let rec p_type x st =
-    match x with 
-    | VarType v     -> p_byte 0 st; p_int v st
-    | AppType(c,ts) -> p_byte 1 st; p_tup2 p_tycon p_types (c,ts) st
-
-and p_types x st = p_list p_type x st
-
-let p_varDecl v st   = p_tup2 p_string p_type (v.vText,v.vType) st
-
-let p_recdFieldSpec v st = p_tup2 p_NamedType p_string v st
-
-let p_ucaseSpec v st   = p_tup2 p_NamedType p_string v st
-
-let p_MethodData a st = 
-    p_tup5 p_NamedType p_types p_type p_string p_int (a.methParent,a.methArgTypes,a.methRetType, a.methName, a.numGenericArgs) st
-
-let p_CtorData a st = 
-    p_tup2 p_NamedType p_types (a.ctorParent,a.ctorArgTypes) st
-
-let p_PropInfoData a st = 
-    p_tup4 p_NamedType p_string p_type p_types a st
-    
-let p_CombOp x st = 
-    match x with 
-    | CondOp        -> p_byte 0 st
-    | ModuleValueOp (x,y,z) -> p_byte 1 st; p_tup3 p_NamedType p_string p_bool (x,y,z) st
-    | LetRecOp      -> p_byte 2 st
-    | RecdMkOp  a   -> p_byte 3 st; p_NamedType a st
-    | RecdGetOp  (x,y)  -> p_byte 4 st; p_recdFieldSpec (x,y) st
-    | SumMkOp  (x,y)  -> p_byte 5 st; p_ucaseSpec (x,y) st
-    | SumFieldGetOp (a,b,c) -> p_byte 6 st; p_tup2 p_ucaseSpec p_int ((a,b),c) st
-    | SumTagTestOp (x,y) -> p_byte 7 st; p_ucaseSpec (x,y) st
-    | TupleMkOp     -> p_byte 8 st
-    | TupleGetOp a  -> p_byte 9 st; p_int a st
-    | BoolOp   a    -> p_byte 11 st; p_bool a st
-    | StringOp a    -> p_byte 12 st; p_string a st
-    | SingleOp a    -> p_byte 13 st; p_single a st
-    | DoubleOp a    -> p_byte 14 st; p_double a st
-    | CharOp   a    -> p_byte 15 st; p_char a st
-    | SByteOp  a    -> p_byte 16 st; p_int8 a st
-    | ByteOp   a    -> p_byte 17 st; p_uint8 a st
-    | Int16Op  a    -> p_byte 18 st; p_int16 a st
-    | UInt16Op a    -> p_byte 19 st; p_uint16 a st
-    | Int32Op  a    -> p_byte 20 st; p_int32 a st
-    | UInt32Op a    -> p_byte 21 st; puint32 a st
-    | Int64Op  a    -> p_byte 22 st; p_int64 a st
-    | UInt64Op a    -> p_byte 23 st; p_uint64 a st
-    | UnitOp        -> p_byte 24 st
-    | PropGetOp d   -> p_byte 25 st; p_PropInfoData d st
-    | CtorCallOp a  -> p_byte 26 st; p_CtorData a st
-    | CoerceOp      -> p_byte 28 st
-    | SeqOp         -> p_byte 29 st
-    | ForLoopOp -> p_byte 30 st
-    | MethodCallOp a   -> p_byte 31 st; p_MethodData a st
-    | NewArrayOp        -> p_byte 32 st
-    | DelegateOp       -> p_byte 33 st
-    | WhileLoopOp -> p_byte 34 st
-    | LetOp            -> p_byte 35 st
-    | RecdSetOp  (x,y) -> p_byte 36 st; p_recdFieldSpec (x,y) st
-    | FieldGetOp (a,b) -> p_byte 37 st; p_tup2 p_NamedType p_string (a, b) st
-    | LetRecCombOp     -> p_byte 38 st
-    | AppOp            -> p_byte 39 st
-    | NullOp           -> p_byte 40 st
-    | DefaultValueOp -> p_byte 41 st
-    | PropSetOp d   -> p_byte 42 st; p_PropInfoData d st
-    | FieldSetOp (a,b) -> p_byte 43 st; p_tup2 p_NamedType p_string (a, b) st
-    | AddressOfOp      -> p_byte 44 st
-    | AddressSetOp     -> p_byte 45 st
-    | TypeTestOp       -> p_byte 46 st
-    | TryFinallyOp     -> p_byte 47 st
-    | TryWithOp        -> p_byte 48 st
-
-let rec p_expr x st =
-    match x with 
-    | CombExpr(c,ts,args) -> p_byte 0 st; p_tup3 p_CombOp p_types (p_list p_expr) (c,ts,args) st
-    | VarExpr v           -> p_byte 1 st; p_int v st
-    | LambdaExpr(v,e)     -> p_byte 2 st; p_tup2 p_varDecl p_expr (v,e) st
-    | HoleExpr(ty,idx)    -> p_byte 3 st; p_type ty st; p_int idx st
-    | QuoteExpr(tm)       -> p_byte 4 st; p_expr tm st
-    | AttrExpr(e,attrs)    -> p_byte 5 st; p_tup2 p_expr (p_list p_expr) (e,attrs) st
-  
-type ModuleDefnData = 
-    { Module: NamedTypeData;
-      Name: string;
-      IsProperty: bool }
-
-type MethodBaseData = 
-    | ModuleDefn of ModuleDefnData
-    | Method     of MethodData
-    | Ctor       of CtorData
-
-let pickle = pickle_obj p_expr
-
-let p_MethodBase x st = 
-    match x with 
-    | ModuleDefn md -> 
-        p_byte 0 st;
-        p_NamedType md.Module st;
-        p_string md.Name st;
-        p_bool md.IsProperty st
-    | Method md -> 
-        p_byte 1 st;
-        p_MethodData md st
-    | Ctor md -> 
-        p_byte 2 st;
-        p_CtorData md st
-
-let pdmkns defs = p_list (p_tup2 p_MethodBase p_expr) defs
-let PickleDefns   = pickle_obj pdmkns
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/sreflect.mli b/tools/FSharp_1.9.6.16/source/fsharp/sreflect.mli
deleted file mode 100644
index d2082c76..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/sreflect.mli
+++ /dev/null
@@ -1,112 +0,0 @@
-
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-/// Code to pickle out quotations in the quotation binary format.
-module (* internal *) Microsoft.FSharp.Compiler.Sreflect
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler 
-
-open Microsoft.FSharp.Compiler.Lib
-open Bytes
-
-type TypeData 
-type TypeVarData =  { tvName: string }
-type NamedTypeData = { tcName: string; tcAssembly:  string }
-
-val mkVarTy : int -> TypeData 
-val mkFunTy : (TypeData * TypeData) -> TypeData
-val mkArrayTy : (int * TypeData ) -> TypeData 
-val mkNamedTy : (NamedTypeData * TypeData list) -> TypeData 
-
-type ExprData
-
-type VarData 
-
-type CtorData = 
-    { ctorParent: NamedTypeData; 
-      ctorArgTypes: TypeData list; }
-
-type MethodData = 
-    { methParent: NamedTypeData;
-      methName: string;
-      methArgTypes: TypeData list;
-      methRetType: TypeData; 
-      numGenericArgs: int }
-
-type ModuleDefnData = 
-    { Module: NamedTypeData;
-      Name: string;
-      IsProperty: bool }
-
-type MethodBaseData = 
-    | ModuleDefn of ModuleDefnData
-    | Method     of MethodData
-    | Ctor       of CtorData
-
-type FieldData     = NamedTypeData * string
-type RecdFieldData = NamedTypeData * string
-type PropInfoData  = NamedTypeData * string * TypeData * TypeData list
-
-val mkVar    : int -> ExprData 
-val mkHole   : TypeData * int -> ExprData 
-val mkApp    : ExprData * ExprData -> ExprData 
-val mkLambda : VarData * ExprData -> ExprData 
-val mkQuote  : ExprData -> ExprData 
-val mkCond   : ExprData * ExprData * ExprData -> ExprData 
-val mkModuleValueApp : NamedTypeData * string * bool * TypeData list * ExprData list list -> ExprData 
-val mkLetRec : (VarData * ExprData) list * ExprData -> ExprData 
-val mkLet : (VarData * ExprData) * ExprData -> ExprData
-val mkRecdMk : NamedTypeData  * TypeData list * ExprData list -> ExprData
-val mkRecdGet : RecdFieldData   * TypeData list * ExprData list -> ExprData 
-val mkRecdSet :  RecdFieldData * TypeData list * ExprData list -> ExprData 
-val mkSum : (NamedTypeData * string) * TypeData list * ExprData list -> ExprData 
-val mkSumFieldGet : (NamedTypeData * string * int) * TypeData list * ExprData -> ExprData  
-val mkSumTagTest : (NamedTypeData * string)   * TypeData list * ExprData -> ExprData  
-val mkTuple : TypeData * ExprData list -> ExprData 
-val mkTupleGet : TypeData * int * ExprData -> ExprData
-val mkCoerce : TypeData * ExprData -> ExprData 
-val mkNewArray : TypeData * ExprData list -> ExprData 
-val mkTypeTest : TypeData * ExprData -> ExprData 
-val mkAddressSet : ExprData * ExprData -> ExprData 
-val mkUnit : unit -> ExprData 
-val mkNull : TypeData -> ExprData 
-val mkBool : bool -> ExprData 
-val mkString : string -> ExprData 
-val mkSingle : float32 -> ExprData 
-val mkDouble : float -> ExprData 
-val mkChar : char -> ExprData 
-val mkSByte : sbyte -> ExprData 
-val mkByte : byte -> ExprData 
-val mkInt16 : int16 -> ExprData 
-val mkUInt16 : uint16 -> ExprData 
-val mkInt32 : int32 -> ExprData 
-val mkUInt32 : uint32 -> ExprData 
-val mkInt64 : int64 -> ExprData 
-val mkUInt64 : uint64 -> ExprData 
-val mkAddressOf : ExprData -> ExprData
-val mkSequential : ExprData * ExprData -> ExprData 
-val mkForLoop : ExprData * ExprData * ExprData -> ExprData 
-val mkWhileLoop : ExprData * ExprData -> ExprData 
-val mkTryFinally : ExprData * ExprData -> ExprData 
-val mkTryWith : ExprData * VarData * ExprData * VarData * ExprData -> ExprData 
-val mkDelegate : TypeData * ExprData -> ExprData 
-val mkPropGet : PropInfoData   * TypeData list * ExprData list -> ExprData   
-val mkPropSet : PropInfoData   * TypeData list * ExprData list -> ExprData   
-val mkFieldGet : FieldData   * TypeData list * ExprData list -> ExprData  
-val mkFieldSet : FieldData   * TypeData list * ExprData list -> ExprData  
-val mkCtorCall : CtorData * TypeData list * ExprData list -> ExprData 
-val mkMethodCall : MethodData * TypeData list * ExprData list -> ExprData 
-val mkAttributedExpression : ExprData * ExprData -> ExprData 
-val pickle : (ExprData -> byte[]) 
-
-    
-val PickleDefns : ((MethodBaseData * ExprData) list -> byte[]) 
-val pickledDefinitionsResourceNameBase : string
-val freshVar : string * TypeData -> VarData
-
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/tast.ml b/tools/FSharp_1.9.6.16/source/fsharp/tast.ml
deleted file mode 100644
index a191d735..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/tast.ml
+++ /dev/null
@@ -1,3027 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-  
-#light
-
-
-#if STANDALONE_METADATA
-
-module (* internal *) FSharp.PowerPack.Metadata.Reader.Internal.Tast
-
-open System.Collections.Generic 
-open FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-open FSharp.PowerPack.Metadata.Reader.Internal.PrettyNaming
-open FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-#else
-
-module (* internal *) Microsoft.FSharp.Compiler.Tast 
-
-open System.Collections.Generic 
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.IL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics 
-open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types
-
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.PrettyNaming
-open Microsoft.FSharp.Compiler.Sreflect
-
-open Microsoft.FSharp.Text.Printf
-#endif
-
-///verboseStamps: print #stamp on each id -- very verbose - but sometimes useful. Turn on using '--stamps'
-let verboseStamps = ref false
-
-
-/// Unique name generator for stamps attached to lambdas and object expressions
-type uniq = int64
-let new_uniq = let i = ref 0L in fun () -> i := !i + 1L; !i
-type stamp = int64
-/// Unique name generator for stamps attached to to val_specs, tycon_specs etc.
-let new_stamp = let i = ref 0L in fun () -> i := !i + 1L; !i
-
-//-------------------------------------------------------------------------
-// Flags
-
-type ValInlineInfo =
-    /// Indicates the value must always be inlined 
-    | PseudoValue 
-    /// Indictes the value is inlined but the code for the function still exists, e.g. to satisfy interfaces on objects, but that it is also always inlined 
-    | AlwaysInline 
-    | OptionalInline
-    | NeverInline
-
-let mustinline = function PseudoValue | AlwaysInline -> true | OptionalInline | NeverInline -> false
-
-type ValRecursiveScopeInfo =
-    /// Set while the value is within its recursive scope. The flag indicates if the value has been eagerly generalized and accepts generic-recursive calls 
-    | ValInRecScope of bool
-    /// The normal value for this flag when the value is not within its recursive scope 
-    | ValNotInRecScope
-
-type ValMutability   = 
-    | Immutable 
-    | Mutable
-
-type TyparDynamicReq = 
-    /// Indicates the type parameter is not needed at runtime and may be eliminated
-    | NoDynamicReq 
-    /// Indicates the type parameter is needed at runtime and may not be eliminated
-    | DynamicReq
-
-type ValBaseOrThisInfo = 
-    | CtorThisVal 
-    | BaseVal 
-    | NormalVal 
-    | MemberThisVal
-
-//---------------------------------------------------------------------------
-// Flags on values
-//---------------------------------------------------------------------------
-
-module ValFlags = begin
-
-    let base_of_vflags x =
-                                  match (x           &&&       0b0000000000000110L) with 
-                                                             | 0b0000000000000000L -> BaseVal
-                                                             | 0b0000000000000010L -> CtorThisVal
-                                                             | 0b0000000000000100L -> NormalVal
-                                                             | 0b0000000000000110L -> MemberThisVal
-                                                             | _          -> failwith "base_of_vflags"
-
-    let encode_base_of_vflags x val_flags =
-                     (val_flags &&&                         ~~~0b0000000000000110L)
-                                ||| (match x with
-                                        | BaseVal ->           0b0000000000000000L
-                                        | CtorThisVal ->       0b0000000000000010L
-                                        | NormalVal ->         0b0000000000000100L
-                                        | MemberThisVal ->     0b0000000000000110L)
-
-
-
-    let is_compgen_of_vflags x =           (x           &&&       0b0000000000001000L) <> 0x0L
-    let encode_compgen_of_vflags b val_flags = 
-                         if b then      (  val_flags |||       0b0000000000001000L) 
-                         else           (  val_flags &&&   ~~~ 0b0000000000001000L)
-    let inline_info_of_vflags x =
-                                  match (x           &&&       0b0000000000110000L) with 
-                                                             | 0b0000000000000000L -> PseudoValue
-                                                             | 0b0000000000010000L -> AlwaysInline
-                                                             | 0b0000000000100000L -> OptionalInline
-                                                             | 0b0000000000110000L -> NeverInline
-                                                             | _          -> failwith "inline_info_of_vflags"
-    let encode_mustinline_of_vflags x val_flags =
-                     (val_flags &&&                         ~~~0b0000000000110000L)
-                                ||| (match x with
-                                        | PseudoValue ->       0b0000000000000000L
-                                        | AlwaysInline ->      0b0000000000010000L
-                                        | OptionalInline ->    0b0000000000100000L
-                                        | NeverInline ->       0b0000000000110000L)
-
-    let mutability_of_vflags x =
-                                  match (x           &&&       0b0000000001000000L) with 
-                                                             | 0b0000000000000000L -> Immutable
-                                                             | 0b0000000001000000L -> Mutable
-                                                             | _          -> failwith "mutability_of_vflags"
-
-    let encode_mutability_of_vflags x val_flags =
-                     (val_flags &&&                         ~~~0b0000000001000000L)
-                                ||| (match x with
-                                        | Immutable ->         0b0000000000000000L
-                                        | Mutable   ->         0b0000000001000000L)
-
-    let is_topbind_of_vflags x =
-                                  match (x           &&&       0b0000000010000000L) with 
-                                                             | 0b0000000000000000L -> false
-                                                             | 0b0000000010000000L -> true
-                                                             | _          -> failwith "is_topbind_of_vflags"
-
-    let encode_is_topbind_of_vflags x val_flags =
-                     (val_flags &&&                         ~~~0b0000000010000000L)
-                                ||| (match x with
-                                        | false     ->         0b0000000000000000L
-                                        | true      ->         0b0000000010000000L)
-
-    let is_extension_member_of_vflags x =
-                                  match (x           &&&       0b0000000100000000L) with 
-                                                             | 0b0000000000000000L -> false
-                                                             | 0b0000000100000000L -> true
-                                                             | _          -> failwith "is_extension_member_of_vflags"
-
-    let encode_isext_of_vflags x val_flags =
-                     (val_flags &&&                         ~~~0b0000000100000000L)
-                                ||| (match x with
-                                        | false     ->         0b0000000000000000L
-                                        | true      ->         0b0000000100000000L)
-    let is_incr_class_of_vflags x =
-                                  match (x           &&&       0b0000001000000000L) with 
-                                                             | 0b0000000000000000L -> false
-                                                             | 0b0000001000000000L -> true
-                                                             | _          -> failwith "is_incr_class_of_vflags"
-
-    let encode_is_incr_class_of_vflags x val_flags =
-                     (val_flags &&&                         ~~~0b0000001000000000L)
-                                ||| (match x with
-                                        | false     ->         0b0000000000000000L
-                                        | true      ->         0b0000001000000000L)
-
-    let is_tyfunc_of_vflags x =
-                                  match (x           &&&       0b0000010000000000L) with 
-                                                             | 0b0000000000000000L -> false
-                                                             | 0b0000010000000000L -> true
-                                                             | _          -> failwith "is_incr_class_of_vflags"
-
-    let encode_is_tyfunc_of_vflags x val_flags =
-                     (val_flags &&&                         ~~~0b0000010000000000L)
-                                ||| (match x with
-                                        | false     ->         0b0000000000000000L
-                                        | true      ->         0b0000010000000000L)
-
-    let vrec_of_vflags x =       match  (x           &&&       0b0001100000000000L) with 
-                                                             | 0b0000000000000000L -> ValNotInRecScope
-                                                             | 0b0000100000000000L -> ValInRecScope(true)
-                                                             | 0b0001000000000000L -> ValInRecScope(false)
-                                                             | _                   -> failwith "vrec_of_vflags"
-    let encode_vrec_of_vflags x val_flags =
-                    (val_flags &&&                          ~~~0b0001100000000000L)
-                               |||  (match x with
-                                     | ValNotInRecScope     -> 0b0000000000000000L
-                                     | ValInRecScope(true)  -> 0b0000100000000000L
-                                     | ValInRecScope(false) -> 0b0001000000000000L)
-
-    let is_notailcall_hint_of_vflags x =
-                                  match (x           &&&       0b0010000000000000L) with 
-                                                             | 0b0000000000000000L -> false
-                                                             | 0b0010000000000000L -> true
-                                                             | _          -> failwith "is_notailcall_hint_of_vflags"
-
-    let encode_notailcall_hint_of_vflags x val_flags =
-                     (val_flags &&&                         ~~~0b0010000000000000L)
-                                ||| (match x with
-                                        | false     ->         0b0000000000000000L
-                                        | true      ->         0b0010000000000000L)
-
-    let encode (vrec,baseOrThis,isCompGen,mustinline,isMutable,isTopBinding,isExtensionMember,isImplicitCtor,isTyFunc) =
-        0L |> encode_vrec_of_vflags      vrec 
-           |> encode_base_of_vflags       baseOrThis
-           |> encode_compgen_of_vflags    isCompGen
-           |> encode_mustinline_of_vflags mustinline
-           |> encode_mutability_of_vflags isMutable
-           |> encode_is_topbind_of_vflags    isTopBinding
-           |> encode_isext_of_vflags      isExtensionMember
-           |> encode_is_incr_class_of_vflags      isImplicitCtor
-           |> encode_is_tyfunc_of_vflags      isTyFunc
-end
-
-
-
-type TyparKind = 
-    | KindType 
-    | KindMeasure
-    member x.AttrName =
-      match x with
-      | KindType -> None
-      | KindMeasure -> Some "Measure"
-    override x.ToString() = 
-      match x with
-      | KindType -> "type"
-      | KindMeasure -> "measure"
-
-
-type TyparRigidity = 
-    /// Indicates the type parameter can't be solved
-    | TyparRigid 
-    /// Indicates we give a warning if the type parameter is ever solved
-    | TyparWarnIfNotRigid 
-    /// Indicates the type parameter is an inference variable may be solved
-    | TyparFlexible
-    /// Indicates the type parameter derives from an '_' anonymous type
-    /// For units-of-measure, we give a warning if this gets solved to '1'
-    | TyparAnon
-
-
-module TyparFlags = begin
-
-    (* encode typar flags into a bit field  *)
-
-    let from_error_of_tpflags x = (x       &&&     0b00000000010) <> 0x0
-    let encode_from_error_of_tpflags b typar_flags = 
-             if b then      (  typar_flags |||     0b00000000010) 
-             else           (  typar_flags &&& ~~~ 0b00000000010)
-
-    let compgen_of_tpflags x = (x          &&&     0b00000000100) <> 0x0
-    let encode_compgen_of_tpflags b typar_flags = 
-             if b then      (  typar_flags |||     0b00000000100) 
-             else           (  typar_flags &&& ~~~ 0b00000000100)
-
-    let static_req_of_tpflags x =
-                      match (x             &&&     0b00000001000) with 
-                                                 | 0b00000000000 -> NoStaticReq
-                                                 | 0b00000001000 -> HeadTypeStaticReq
-                                                 | _             -> failwith "static_req_of_tpflags"
-
-    let encode_static_req_of_tpflags x typar_flags =
-                     (typar_flags &&&           ~~~0b00000001000)
-                      ||| (match x with
-                            | NoStaticReq ->       0b00000000000
-                            | HeadTypeStaticReq -> 0b00000001000)
-
-
-    let rigid_of_tpflags x =            
-                      match (x             &&&     0b00001100000) with 
-                                                 | 0b00000000000 -> TyparRigid
-                                                 | 0b00000100000 -> TyparWarnIfNotRigid
-                                                 | 0b00001000000 -> TyparFlexible
-                                                 | 0b00001100000 -> TyparAnon
-                                                 | _          -> failwith "rigid_of_tpflags"
-    let encode_rigid_of_tpflags x typar_flags =
-         (typar_flags &&&                       ~~~0b00001100000)
-                    ||| (match x with
-                          | TyparRigid          -> 0b00000000000
-                          | TyparWarnIfNotRigid -> 0b00000100000
-                          | TyparFlexible       -> 0b00001000000
-                          | TyparAnon           -> 0b00001100000)
-
-    let kind_of_tpflags x = 
-                      match (x             &&&     0b00010000000) with 
-                                                 | 0b00000000000 -> KindType
-                                                 | 0b00010000000 -> KindMeasure
-                                                 | _          -> failwith "kind_of_tpflags"
-
-    let encode_kind_of_tpflags x typar_flags =
-         (typar_flags &&&                       ~~~0b00010000000)
-                      ||| (match x with
-                            | KindType          -> 0b00000000000
-                            | KindMeasure       -> 0b00010000000)
-
-    let dynamic_req_of_tpflags x =
-                      match (x             &&&     0b01000000000) with 
-                                                 | 0b00000000000 -> NoDynamicReq
-                                                 | 0b01000000000 -> DynamicReq
-                                                 | _             -> failwith "dynamic_req_of_tpflags"
-
-    let encode_dynamic_req_of_tpflags x typar_flags =
-                     (typar_flags &&&           ~~~0b01000000000)
-                      ||| (match x with
-                            | NoDynamicReq ->      0b00000000000
-                            | DynamicReq ->        0b01000000000)
-
-
-    let encode (kind,rigid,isFromError,isCompGen,staticReq,dynamicReq) =
-        0 |> encode_kind_of_tpflags kind
-          |> encode_rigid_of_tpflags      rigid 
-          |> encode_from_error_of_tpflags isFromError
-          |> encode_compgen_of_tpflags    isCompGen
-          |> encode_static_req_of_tpflags staticReq
-          |> encode_dynamic_req_of_tpflags dynamicReq
-
-end
-
-let unassignedTyparName = "?"
-
-exception UndefinedName of int * string * ident * string list
-exception InternalUndefinedItemRef of string * string * string * string
-
-
-// Type definitions, exception definitions, module definitions and
-// namespace definitions are all 'entities'. These have too much in common to make it 
-// worth factoring them out as separate types.
-//
-// Tycons, exncs and moduls are all modelled via tycon_specs, 
-// they have different name-resolution logic. 
-// For example, an excon ABC really correspond to a type called 
-// ABCException with a union case ABC. At the moment they are 
-// simply indexed in the excon table as the discriminator constructor ABC. 
-type Entity = 
-    { mutable Data: EntityData; }
-    member x.MangledName = x.Data.entity_name
-    member x.DisplayName = DemangleGenericTypeName x.Data.entity_name
-    member x.DisplayNameWithUnderscoreTypars = 
-        let nm = x.DisplayName 
-        match x.Typars(x.Range) with 
-        | [] -> x.DisplayName
-        | tps -> x.DisplayName + "<" + String.concat "," (Array.create tps.Length "_") + ">"
-    
-    member x.Range = x.Data.entity_range
-    member x.Stamp = x.Data.entity_stamp
-    member x.Attribs = x.Data.entity_attribs
-    member x.XmlDoc = x.Data.entity_xmldoc
-    member x.ModuleOrNamespaceType = x.Data.entity_modul_contents.Force()
-    
-    member x.TypeContents = x.Data.entity_tycon_tcaug
-    member x.TypeOrMeasureKind = x.Data.entity_kind
-    member x.Id = ident(x.MangledName, x.Range)
-    member x.TypeReprInfo = x.Data.entity_tycon_repr
-    member x.ExceptionInfo = x.Data.entity_exn_info
-    member x.IsExceptionDecl = match x.ExceptionInfo with TExnNone -> false | _ -> true
-    member x.DemangledExceptionName =  
-        let nm = x.MangledName
-        if x.IsExceptionDecl then DemangleExceptionName nm else nm 
-    
-    member x.Typars(m) = x.Data.entity_typars.Force(m) // lazy because it may read metadata, must provide a context "range" in case error occurs reading metadata
-    member x.TyparsNoRange = x.Typars(x.Range)
-    member x.TypeAbbrev = x.Data.entity_tycon_abbrev
-    member x.IsTypeAbbrev = x.TypeAbbrev.IsSome
-    member x.TypeReprAccessibility = x.Data.entity_tycon_repr_accessibility
-    member x.CompiledReprCache = x.Data.entity_il_repr_cache
-    member x.PublicPath = x.Data.entity_pubpath
-    member x.Accessibility = x.Data.entity_accessiblity
-    member x.IsPrefixDisplay = x.Data.entity_uses_prefix_display
-    member x.IsModuleOrNamespace = x.Data.entity_is_modul_or_namespace
-    member x.IsNamespace = x.IsModuleOrNamespace && (match x.ModuleOrNamespaceType.ModuleOrNamespaceKind with Namespace -> true | _ -> false)
-    member x.IsModule = x.IsModuleOrNamespace && (match x.ModuleOrNamespaceType.ModuleOrNamespaceKind with Namespace -> false | _ -> true)
-    member x.CompilationPathOpt = x.Data.entity_cpath 
-    member x.CompilationPath = match x.CompilationPathOpt with Some cpath -> cpath | None -> error(Error("type/module "^x.MangledName^" is not a concrete module or type",x.Range))
-    
-    member x.AllFieldTable = 
-        match x.TypeReprInfo with 
-        | Some (TRecdRepr x | TFsObjModelRepr {fsobjmodel_rfields=x}) -> x
-        |  _ -> 
-        match x.ExceptionInfo with 
-        | TExnFresh x -> x
-        | _ -> 
-        { rfields_by_index = [| |]; 
-          rfields_by_name = NameMap.empty }
-
-    member x.AllFieldsArray = x.AllFieldTable.rfields_by_index
-    member x.AllFieldsAsList = x.AllFieldsArray |> Array.to_list
-
-    // NOTE: This method is over-used...
-    member x.AllInstanceFieldsAsList = x.AllFieldsAsList |> List.filter (fun f -> not f.IsStatic)
-    member x.TrueFieldsAsList = x.AllFieldsAsList |> List.filter (fun f -> not f.IsCompilerGenerated)
-    member x.TrueInstanceFieldsAsList = x.AllFieldsAsList |> List.filter (fun f -> not f.IsStatic && not f.IsCompilerGenerated)
-
-    member x.GetFieldByIndex(n) = x.AllFieldTable.FieldByIndex(n)
-    member x.GetFieldByName(n) = x.AllFieldTable.FieldByName(n)
-
-    member x.UnionTypeInfo = 
-        match x.Data.entity_tycon_repr with 
-        | Some (TFiniteUnionRepr x) -> Some x 
-        |  _ -> None
-
-    member x.UnionCasesArray = 
-        match x.UnionTypeInfo with 
-        | Some x -> x.funion_ucases.ucases_by_index 
-        | None -> [| |] 
-
-    member x.UnionCasesAsList = x.UnionCasesArray |> Array.to_list
-
-    member x.GetUnionCaseByName(n) =
-        match x.UnionTypeInfo with 
-        | Some x  -> NameMap.tryfind n x.funion_ucases.ucases_by_name
-        | None -> None
-
-    
-    // OSGN support
-    static member NewUnlinked() : Entity = { Data = nullable_slot_empty() }
-    static member New reason data : Entity  = 
-        if !verboseStamps then 
-            dprintf "entity %s#%d (%s)\n" data.entity_name data.entity_stamp reason;
-        { Data = data }
-    member x.Link(tg) = x.Data <- nullable_slot_full(tg)
-    member x.IsLinked = match box x.Data with null -> false | _ -> true 
-
-    override x.ToString() = x.MangledName
-
-    member x.FSharpObjectModelTypeInfo = 
-         match x.Data.entity_tycon_repr with 
-         | Some (TFsObjModelRepr x) -> x 
-         |  _ -> failwith "not an F# object model type definition"
-
-    member x.IsILTycon = match x.TypeReprInfo with | Some (TILObjModelRepr _) -> true |  _ -> false
-    member x.ILTyconInfo = match x.TypeReprInfo with | Some (TILObjModelRepr (a,b,c)) -> (a,b,c) |  _ -> failwith "not a .NET type definition"
-    member x.ILTyconRawMetadata = let _,_,td = x.ILTyconInfo in td
-
-    member x.IsUnionTycon = match x.TypeReprInfo with | Some (TFiniteUnionRepr _) -> true |  _ -> false
-    member x.UnionInfo = match x.TypeReprInfo with | Some (TFiniteUnionRepr x) -> Some x |  _ -> None
-
-    member x.IsRecordTycon = match x.TypeReprInfo with | Some (TRecdRepr _) -> true |  _ -> false
-    member x.IsFSharpObjectModelTycon = match x.TypeReprInfo with | Some (TFsObjModelRepr _) -> true |  _ -> false
-    member x.IsAsmReprTycon = match x.TypeReprInfo with | Some (TAsmRepr _) -> true |  _ -> false
-    member x.IsMeasureableReprTycon = match x.TypeReprInfo with | Some (TMeasureableRepr _) -> true |  _ -> false
-    member x.IsHiddenReprTycon = match x.TypeAbbrev,x.TypeReprInfo with | None,None -> true |  _ -> false
-
-    member x.IsFSharpInterfaceTycon =  x.IsFSharpObjectModelTycon && match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconInterface -> true | _ -> false
-    member x.IsFSharpDelegateTycon =  x.IsFSharpObjectModelTycon && match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconDelegate _ -> true | _ -> false
-    member x.IsFSharpEnumTycon =  x.IsFSharpObjectModelTycon && match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconEnum -> true | _ -> false
-
-    member x.IsFSharpStructTycon =
-        x.IsFSharpObjectModelTycon &&
-        match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with 
-        | TTyconClass | TTyconInterface   | TTyconDelegate _ -> false
-        | TTyconStruct | TTyconEnum -> true
-
-    member x.IsILStructTycon =
-        x.IsILTycon && 
-        let tdef = x.ILTyconRawMetadata
-        match tdef.tdKind with
-        | TypeDef_valuetype | TypeDef_enum -> true
-        | _ -> false
-
-    member x.IsStructTycon = 
-        x.IsILStructTycon || x.IsFSharpStructTycon
-
-    /// From TAST TyconRef to IL ILTypeRef
-    member x.CompiledRepresentation =
-
-        let il_tref_for_cpath (CompPath(sref,p)) item = 
-            let rec top racc  p = 
-                match p with 
-                | [] -> ILTypeRef.Create(sref,[],text_of_path  (List.rev (item::racc)))
-                | (h,istype)::t -> 
-                    match istype with 
-                    | FSharpModuleWithSuffix | FSharpModule -> 
-                        let outerTypeName = (text_of_path (List.rev (h::racc)))
-                        ILTypeRef.Create(sref, (outerTypeName :: List.map (fun (nm,_) -> nm) t),item)
-                    | _ -> 
-                      top (h::racc) t
-            top [] p 
-
-
-        assert(not x.IsTypeAbbrev);
-        cached x.CompiledReprCache (fun () -> 
-            match x.ExceptionInfo with 
-            | TExnAbbrevRepr ecref2 -> ecref2.CompiledRepresentation
-            | TExnAsmRepr tref -> TyrepNamed(tref,AsObject)
-            | _ -> 
-            match x.TypeReprInfo with 
-            | Some (TAsmRepr typ) -> TyrepOpen typ
-            | _ -> 
-                let boxity = if x.IsStructTycon then AsValue else AsObject
-                TyrepNamed (il_tref_for_cpath x.CompilationPath x.MangledName,boxity))
-
-
-    member x.CompiledRepresentationForTyrepNamed =
-        match x.CompiledRepresentation with 
-        | TyrepNamed(tref,_) -> tref
-        | TyrepOpen _ -> invalidOp (sprintf "the type %s has an assembly code representation" x.DisplayNameWithUnderscoreTypars)
-
-
-and 
- []
- EntityData =
-    { /// The declared type parameters of the type  
-      // MUTABILITY; used only during creation and remapping  of tycons 
-      mutable entity_typars: LazyWithContext;        
-
-      // MUTABILITY; used only when establishing tycons. 
-      // REVIEW: remove this use of mutabilty 
-      mutable entity_kind : TyparKind;
-      
-      /// The unique stamp of the "tycon blob". Note the same tycon in signature and implementation get different stamps 
-      entity_stamp: stamp;
-
-      /// The name of the type, possibly with `n mangling 
-      entity_name: string;
-
-      /// The declaration location for the type constructor 
-      entity_range: range;
-      
-      /// Indicates the type prefers the "tycon" syntax for display etc. 
-      entity_uses_prefix_display: bool;                   
-      
-      /// Indicates the "tycon blob" is actually a module 
-      entity_is_modul_or_namespace : bool; 
-
-      /// The declared accessibility of the representation, not taking signatures into account 
-      entity_tycon_repr_accessibility: Accessibility;
-      
-      /// The declared attributes for the type 
-      (* MUTABILITY; used only during creation and remapping of tycons *)
-      mutable entity_attribs: Attribs;     
-                
-      /// The declared representation of the type, i.e. record, union, class etc. 
-      //
-      // REVIEW: the 'None' value here has two meanings
-      //     - it indicates 'not yet known' during the first 2 phases of establishing type definitions
-      //     - it indicated 'no representation' at all other times, i.e. 
-      //           type X
-      //       in signatures 
-      //   It would be better to separate these two cases out, by just adding two cases
-      //   to TyconRepresentation and removing the use of 'option'
-      //
-      // MUTABILITY; used only during creation and remapping of tycons 
-      mutable entity_tycon_repr: TyconRepresentation option;   
-
-      /// If non-None, indicates the type is an abbreviation for another type. 
-      mutable entity_tycon_abbrev: typ option;             (* MUTABILITY; used only during creation and remapping of tycons *)
-      
-      /// The methods and properties of the type 
-      mutable entity_tycon_tcaug: TyconAugmentation;      (* MUTABILITY; used only during creation and remapping of tycons *)
-      
-      /// Field used when the 'tycon' is really an exception definition 
-      (* MUTABILITY; used only during creation and remapping of tycons *)
-      mutable entity_exn_info: ExceptionInfo;     
-      
-      /// This field is used when the 'tycon' is really a module definition. It holds statically nested type definitions and nested modules 
-      (* MUTABILITY: only used during creation and remapping  of tycons and *)
-      (* when compiling fslib to fixup compiler forward references to internal items *)
-      mutable entity_modul_contents: Lazy;     
-
-      /// The declared documentation for the type or module 
-      entity_xmldoc : XmlDoc;
-
-      /// The stable path to the type, e.g. Microsoft.FSharp.Core.FastFunc`2 
-      (* REVIEW: it looks like entity_cpath subsumes this *)
-      entity_pubpath : PublicPath option; (*   where does this live? *)
-
-      mutable entity_accessiblity: Accessibility; (*   how visible is this? *)  (* MUTABILITY; used only during creation and remapping  of tycons *)
- 
-      /// The stable path to the type, e.g. Microsoft.FSharp.Core.FastFunc`2 
-      entity_cpath : CompilationPath option; 
-
-      /// Used during codegen to hold the ILX representation indicating how to access the type 
-      entity_il_repr_cache : CompiledTypeRepr cache;  (* MUTABILITY; *)
-
-    }
-
-and ParentRef = 
-    | Parent of TyconRef
-    | ParentNone
-    
-and 
-  []
-  TyconAugmentation = 
-    { /// This is the value implementing the auto-generated comparison 
-      /// semantics if any. It is not present if the type defines its own implementation 
-      /// of IComparable or if the type doesn't implement IComparable implicitly. 
-      mutable tcaug_compare        : (ValRef * ValRef) option;
-      
-      /// This is the value implementing the auto-generated comparison
-      /// semantics if any. It is not present if the type defines its own implementation
-      /// of IStructuralComparable or if the type doesn't implement IComparable implicitly.
-      mutable tcaug_compare_withc : ValRef option;                      
-
-      /// This is the value implementing the auto-generated equality 
-      /// semantics if any. It is not present if the type defines its own implementation 
-      /// of Object.Equals or if the type doesn't override Object.Equals implicitly. 
-      mutable tcaug_equals        : (ValRef * ValRef) option;
-
-      /// This is the value implementing the auto-generated comparison
-      /// semantics if any. It is not present if the type defines its own implementation
-      /// of IStructuralEquatable or if the type doesn't implement IComparable implicitly.
-      mutable tcaug_hash_and_equals_withc : (ValRef * ValRef) option;                                    
-
-      /// True if the type defined an Object.GetHashCode method. In this 
-      /// case we give a warning if we auto-generate a hash method since the semantics may not match up
-      mutable tcaug_hasObjectGetHashCode : bool;             
-      
-      /// Likewise IStructuralHash::GetHashCode 
-      mutable tcaug_structural_hash: ValRef option;             
-      
-      /// Properties, methods etc. 
-      mutable tcaug_adhoc          : (ValRef list) NameMap;
-      
-      /// Interface implementations - boolean indicates compiler-generated 
-      mutable tcaug_implements     : (typ * bool * range) list;  
-      
-      /// Super type, if any 
-      mutable tcaug_super          : typ option;                 
-      
-      /// Set to true at the end of the scope where proper augmentations are allowed 
-      mutable tcaug_closed         : bool;                       
-
-      /// Set to true if the type is determined to be abstract 
-      mutable tcaug_abstract : bool;                       
-    }
-   
-and 
-  []
-  TyconRepresentation = 
-    /// Indicates the type is a class, struct, enum, delegate or interface 
-    | TFsObjModelRepr    of TyconObjModelData
-    /// Indicates the type is a record 
-    | TRecdRepr          of TyconRecdFields
-    /// Indicates the type is a discriminated union 
-    | TFiniteUnionRepr   of TyconUnionData 
-    /// Indicates the type is a .NET type 
-    | TILObjModelRepr    of 
-          // scope: 
-          ILScopeRef * 
-          // nesting:   
-          ILTypeDef list * 
-          // definition: 
-          ILTypeDef 
-    /// Indicates the type is implemented as IL assembly code using the given closed Abstract IL type 
-    | TAsmRepr           of ILType
-    /// Indicates the type is parameterized on a measure (e.g. float<_>) but erases to some other type (e.g. float)
-    | TMeasureableRepr   of typ
-
-
-and 
-  TyconObjModelKind = 
-    /// Indicates the type is a class (also used for units-of-measure)
-    | TTyconClass 
-    /// Indicates the type is an interface 
-    | TTyconInterface 
-    /// Indicates the type is a struct 
-    | TTyconStruct 
-    /// Indicates the type is a delegate with the given Invoke signature 
-    | TTyconDelegate of SlotSig 
-    /// Indicates the type is an enumeration 
-    | TTyconEnum
-    
-and 
-  []
-  TyconObjModelData = 
-    { /// Indicates whether the type declaration is a class, interface, enum, delegate or struct 
-      fsobjmodel_kind: TyconObjModelKind;
-      /// The declared abstract slots of the class, interface or struct 
-      fsobjmodel_vslots: ValRef list; 
-      /// The fields of the class, struct or enum 
-      fsobjmodel_rfields: TyconRecdFields }
-
-and 
-  []
-  TyconRecdFields = 
-    { /// The fields of the record, in declaration order. 
-      rfields_by_index: RecdField array;
-      
-      /// The fields of the record, indexed by name. 
-      rfields_by_name : RecdField NameMap  }
-
-    member x.FieldByIndex(n) = 
-        if n >= 0 && n < Array.length x.rfields_by_index then x.rfields_by_index.[n] 
-        else failwith "FieldByIndex"
-
-    member x.FieldByName(n) = x.rfields_by_name.TryFind(n)
-
-    member x.AllFieldsAsList = x.rfields_by_index |> Array.to_list
-    member x.TrueFieldsAsList = x.AllFieldsAsList |> List.filter (fun f -> not f.IsCompilerGenerated)   
-    member x.TrueInstanceFieldsAsList = x.AllFieldsAsList |> List.filter (fun f -> not f.IsStatic && not f.IsCompilerGenerated)   
-
-and 
-  []
-  TyconUnionCases = 
-    { /// The cases of the discriminated union, in declaration order. 
-      ucases_by_index: UnionCase array;
-      /// The cases of the discriminated union, indexed by name. 
-      ucases_by_name : UnionCase NameMap 
-    }
-    member x.GetUnionCaseByIndex(n) = 
-        if n >= 0 && n < x.ucases_by_index.Length then x.ucases_by_index.[n] 
-        else invalidArg "n" "GetUnionCaseByIndex"
-
-    member x.UnionCasesAsList = x.ucases_by_index |> Array.to_list
-
-and 
-  []
-  TyconUnionData =
-    { /// The cases contained in the discriminated union. 
-      funion_ucases: TyconUnionCases;
-      /// The ILX data structure representing the discriminated union. 
-#if STANDALONE_METADATA
-#else
-      funion_ilx_repr: IlxUnionRef cache; 
-#endif
-    }
-    member x.UnionCasesAsList = x.funion_ucases.ucases_by_index |> Array.to_list
-
-and 
-  []
-  UnionCase =
-    { /// Data carried by the case. 
-      ucase_rfields: TyconRecdFields;
-      /// Return type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it 
-      ucase_rty: typ;
-      /// Name of the case in generated IL code 
-      ucase_il_name: string;
-      /// Documentation for the case 
-      ucase_xmldoc : XmlDoc;
-      /// Name/range of the case 
-      ucase_id: ident; 
-      ///  Indicates the declared visibility of the union constructor, not taking signatures into account 
-      ucase_access: Accessibility; 
-      /// Attributes, attached to the generated static method to make instances of the case 
-      ucase_attribs: Attribs; }
-
-    member uc.Attribs = uc.ucase_attribs
-    member uc.Range = uc.ucase_id.idRange
-    member uc.Id = uc.ucase_id
-    member uc.Accessibility = uc.ucase_access
-    member uc.DisplayName = uc.Id.idText
-    member uc.RecdFieldsArray = uc.ucase_rfields.rfields_by_index 
-    member uc.RecdFields = uc.ucase_rfields.rfields_by_index |> Array.to_list
-    member uc.GetFieldByName nm = uc.ucase_rfields.FieldByName nm
-    member uc.IsNullary = (uc.ucase_rfields.rfields_by_index.Length = 0)
-
-and 
-  []
-  RecdField =
-    { /// Is the field declared mutable in F#? 
-      rfield_mutable: bool;
-      /// Documentation for the field 
-      rfield_xmldoc : XmlDoc;
-      /// The type of the field, w.r.t. the generic parameters of the enclosing type constructor 
-      rfield_type: typ;
-      /// Indicates a static field 
-      rfield_static: bool;
-      /// Indicates a compiler generated field, not visible to Intellisense or name resolution 
-      rfield_secret: bool;
-      /// The default initialization info, for static literals 
-      rfield_const: Constant option; 
-      ///  Indicates the declared visibility of the field, not taking signatures into account 
-      rfield_access: Accessibility; 
-      /// Attributes attached to generated property 
-      rfield_pattribs: Attribs; 
-      /// Attributes attached to generated field 
-      rfield_fattribs: Attribs; 
-      /// Name/declaration-location of the field 
-      rfield_id: ident; }
-    member v.Accessibility = v.rfield_access
-    member v.PropertyAttribs = v.rfield_pattribs
-    member v.FieldAttribs = v.rfield_fattribs
-    member v.Range = v.rfield_id.idRange
-    member v.Id = v.rfield_id
-    member v.Name = v.rfield_id.idText
-    member v.IsCompilerGenerated = v.rfield_secret
-    member v.IsMutable = v.rfield_mutable
-    member v.IsStatic = v.rfield_static
-    member v.FormalType = v.rfield_type
-    member v.LiteralValue = 
-        match v.rfield_const  with 
-        | None -> None
-        | Some(TConst_zero) -> None
-        | Some(k) -> Some(k)
-
-    member v.IsZeroInit = 
-        match v.rfield_const  with 
-        | None -> false 
-        | Some(TConst_zero) -> true 
-        | _ -> false
-
-and ExceptionInfo =
-    /// Indicates that an exception is an abbreviation for the given exception 
-    | TExnAbbrevRepr of TyconRef 
-    /// Indicates that an exception is shorthand for the given .NET exception type 
-    | TExnAsmRepr of ILTypeRef
-    /// Indicates that an exception carries the given record of values 
-    | TExnFresh of TyconRecdFields
-    /// Indicates that an exception is abstract, i.e. is in a signature file, and we do not know the representation 
-    | TExnNone
-
-and ModuleOrNamespaceKind = 
-    /// Indicates that a module is compiled to a class with the "Module" suffix added. 
-    | FSharpModuleWithSuffix 
-    /// Indicates that a module is compiled to a class with the same name as the original module 
-    | FSharpModule 
-    /// Indicates that a 'module' is really a namespace 
-    | Namespace
-
-and 
-    []
-    ModuleOrNamespaceType(kind: ModuleOrNamespaceKind, vals: Val NameMap, entities: Entity NameMap) = 
-
-      let mutable entities = entities 
-      
-      /// Lookup tables keyed the way various clients expect them to be keyed.
-      /// We attach them here so we don't need to store lookup tables via any other technique 
-      let apref_cache : ActivePatternElemRef NameMap option ref = ref None
-      let modulesByDemangledName_cache       : ModuleOrNamespace NameMap option ref = ref None
-      let exconsByDemangledName_cache        : Tycon NameMap option ref = ref None
-      let tyconsByDemangledNameAndArity_cache: (Map) option ref= ref None
-      let tyconsByAccessNames_cache          : NameMultiMap option ref = ref None
-      let tyconsByMangledName_cache          : Tycon NameMap option ref = ref None
-  
-  
-      /// Namespace or module-compiled-as-type? 
-      member mtyp.ModuleOrNamespaceKind = kind 
-              
-      /// Values, including members in F# types in this module-or-namespace-fragment. 
-      member mtyp.AllValuesAndMembers = vals
-      
-      /// Type, mapping mangled name to Tycon, e.g. 
-      ////     "Dictionary`2" --> Tycon 
-      ////     "ListModule" --> Tycon with module info
-      ////     "FooException" --> Tycon with exception info
-      member mtyp.AllEntities = entities
-
-      /// Mutation used during compilation of FSharp.Core.dll
-      member mtyp.AddModuleOrNamespaceByMutation(modul:ModuleOrNamespace) =
-          entities <- Map.add modul.MangledName modul entities;
-          modulesByDemangledName_cache := None          
-          
-      member mtyp.AddEntity(tycon:Tycon) = 
-          new ModuleOrNamespaceType(mtyp.ModuleOrNamespaceKind, mtyp.AllValuesAndMembers, Map.add tycon.MangledName tycon mtyp.AllEntities)
-          
-      member mtyp.AddVal(vspec:Val) = 
-          new ModuleOrNamespaceType(mtyp.ModuleOrNamespaceKind, Map.add vspec.MangledName vspec mtyp.AllValuesAndMembers, mtyp.AllEntities)
-          
-      /// Lookup tables keyed the way various clients expect them to be keyed.
-      /// We attach them here so we don't need to store lookup tables via any other technique 
-      member mtyp.ActivePatternsLookupTable               = apref_cache
-      member mtyp.ModulesAndNamespacesLookupTable         = modulesByDemangledName_cache
-      member mtyp.FSharpExceptionsLookupTable             = exconsByDemangledName_cache
-      member mtyp.TypesByDemangledNameAndArityLookupTable = tyconsByDemangledNameAndArity_cache
-      member mtyp.TypesByAccessNamesLookupTable           = tyconsByAccessNames_cache
-      member mtyp.TypesByMangledNameLookupTable           = tyconsByMangledName_cache
-  
-
-and ModuleOrNamespace = Entity 
-and Tycon = Entity 
-
-and Accessibility = 
-    /// TAccess(...,path,...) indicates the construct  can only be accessed from any code in the given type constructor, module or assembly. [] indicates global scope. 
-    | TAccess of CompilationPath list
-    
-and 
-  []
-  TyparData = 
-    { mutable typar_id: ident; (* MUTABILITY: we set the names of generalized inference type parameters to make the look nice for IL code generation *)
-       
-      mutable typar_flags: int32;
-       (*
-          FLAGS ARE LOGICALLY: 
-              (* MUTABILITY CLEANUP: could create fresh rigid variables and equate these to them. *) 
-              mutable typar_rigid: bool;                                 (* cannot unify: quantified.  Mutated when inference decides to generalize. *)
-              typar_from_error: bool;                                    (* typar was generated as part of error recovery *)
-              typar_compgen: bool;
-              mutable typar_static_req: TyparStaticReq;                  (* true for $a types or any tyvars in types equated with $a types - these may not be generalized *)
-       *)
-       
-       /// The unique stamp of the typar blob. 
-      typar_stamp: stamp; 
-       
-       /// The documentation for the type parameter. Empty for type inference variables.
-      typar_xmldoc : XmlDoc;
-       
-       /// The declared attributes of the type parameter. Empty for type inference variables. 
-      mutable typar_attribs: Attribs;                      
-       
-       /// An inferred equivalence for a type inference variable. 
-       (* Note: this is the most important mutable state in all of F#! *)
-      mutable typar_solution: typ option;
-       
-       /// The inferred constraints for the type inference variable 
-       (* Note: along with typar_solution, this is the most important mutable state in all of F#! *)
-      mutable typar_constraints: TyparConstraint list; 
-    } 
-
-and 
-  []
-  Typar = 
-    { mutable Data: TyparData;
-      mutable AsType: typ }
-    member x.Name                = x.Data.typar_id.idText
-    member x.Range               = x.Data.typar_id.idRange
-    member x.Id                  = x.Data.typar_id
-    member x.Stamp               = x.Data.typar_stamp
-    member x.Solution            = x.Data.typar_solution
-    member x.Constraints         = x.Data.typar_constraints
-    member x.IsCompilerGenerated = x.Data.typar_flags |> TyparFlags.compgen_of_tpflags
-    member x.Rigidity            = x.Data.typar_flags |> TyparFlags.rigid_of_tpflags
-    member x.DynamicReq          = x.Data.typar_flags |> TyparFlags.dynamic_req_of_tpflags
-    member x.StaticReq           = x.Data.typar_flags |> TyparFlags.static_req_of_tpflags
-    member x.IsFromError         = x.Data.typar_flags |> TyparFlags.from_error_of_tpflags
-    member x.Kind                = x.Data.typar_flags |> TyparFlags.kind_of_tpflags
-    member x.IsErased            = match x.Kind with KindType -> false | _ -> true
-    member x.Attribs             = x.Data.typar_attribs
-    member x.DisplayName = let nm = x.Name in if nm = "?" then "?"^string x.Stamp else nm
-
-    // OSGN support
-    static member NewUnlinked() : Typar  = 
-        let res = { Data = nullable_slot_empty(); AsType=Unchecked.defaultof<_> }
-        res.AsType <- TType_var res
-        res
-    static member New(data) : Typar = 
-        let res = { Data = data; AsType=Unchecked.defaultof<_> }
-        res.AsType <- TType_var res
-        res
-    member x.Link(tg) = x.Data <- nullable_slot_full(tg)
-    member x.IsLinked = match box x.Data with null -> false | _ -> true 
-
-    override x.ToString() = x.Name
-
-and 
-  []
-  TyparConstraint = 
-    /// Indicates a constraint that a type is a subtype of the given type 
-    | TTyparCoercesToType              of typ * range
-
-    /// Indicates a default value for an inference type variable should it be netiher generalized nor solved 
-    | TTyparDefaultsToType             of int * typ * range 
-    
-    /// Indicates a constraint that a type has a 'null' value 
-    | TTyparSupportsNull               of range 
-    
-    /// Indicates a constraint that a type has a member with the given signature 
-    | TTyparMayResolveMemberConstraint of TraitConstraintInfo * range 
-    
-    /// Indicates a constraint that a type is a non-Nullable value type 
-    /// These are part of .NET's model of generic constraints, and in order to 
-    /// generate verifiable code we must attach them to F# generalzied type variables as well. 
-    | TTyparIsNotNullableValueType     of range 
-    
-    /// Indicates a constraint that a type is a reference type 
-    | TTyparIsReferenceType            of range 
-
-    /// Indicates a constraint that a type is a simple choice between one of the given ground types. See format.ml 
-    | TTyparSimpleChoice               of typ list * range 
-
-    /// Indicates a constraint that a type has a parameterless constructor 
-    | TTyparRequiresDefaultConstructor of range 
-
-    /// Indicates a constraint that a type is an enum with the given underlying 
-    | TTyparIsEnum                     of typ * range 
-    
-    /// Indicates a constraint that a type is a delegate from the given tuple of args to the given return type *)
-    | TTyparIsDelegate                 of typ * typ * range 
-    
-/// The specification of a member constraint that must be solved 
-and TraitConstraintInfo = 
-    /// Indicates the signature of a member constraint 
-    | TTrait of typ list * string * MemberFlags * typ list * typ option * (* solution: *) TraitConstraintSln option ref 
-    member x.MemberName = (let (TTrait(_,nm,_,_,_,_)) = x in nm)
-    member x.ReturnType = (let (TTrait(_,_,_,_,ty,_)) = x in ty)
-    member x.Solution 
-        with get() = (let (TTrait(_,_,_,_,ty,sln)) = x in sln.Value)
-        and set(v) = (let (TTrait(_,_,_,_,ty,sln)) = x in sln.Value <- v)
-    
-and TraitConstraintSln = 
-    | FSMethSln of 
-         typ * // the type and its instantiation
-         ValRef  *   // the method
-         tinst // the generic method instantiation 
-    | ILMethSln of
-         typ * 
-         ILTypeRef option (* extension? *) * 
-         ILMethodRef * 
-         // typars * // the uninstantiated generic method args 
-         tinst    // the generic method instantiation 
-    | BuiltInSln
-   //| DefaultStructCtorSln of typ
-
-and Val = 
-    { mutable Data: ValData; }
-    /// The internal name the value. 
-    member x.MangledName = x.Data.val_name
-    /// The place where the value was defined. 
-    member x.Range = x.Data.val_range
-    /// A unique stamp within the context of this invocation of the compiler process 
-    member x.Stamp = x.Data.val_stamp
-    /// The type of the value. 
-    /// May be a Type_forall for a generic value. 
-    /// May be a type variable or type containing type variables during type inference. 
-
-    // Mutability used in inference by adjustAllUsesOfRecValue.  
-    // This replaces the recursively inferred type with a schema. 
-    // MUTABILITY CLEANUP: find a way to do this using type unification alone. 
-    member x.Type                       = x.Data.val_type
-    member x.Accessibility              = x.Data.val_access
-    /// Range of the definition (implementation) of the value, used by Visual Studio 
-    /// Updated by mutation when the implementation is matched against the signature. 
-    member x.DefinitionRange            = x.Data.val_defn_range
-    /// The value of a value or member marked with [<LiteralAttribute>] 
-    member x.LiteralValue               = x.Data.val_const
-    member x.Id                         = ident(x.MangledName,x.Range)
-    /// Is this represented as a "top level" static binding (i.e. a static field, static member,
-    /// instance member), rather than an "inner" binding that may result in a closure.
-    ///
-    /// This is implied by IsMemberOrModuleBinding, however not vice versa, for two reasons.
-    /// Some optimizations mutate this value when they decide to change the representation of a 
-    /// binding to be IsCompiledAsTopLevel. Second, even immediately after type checking we expect
-    /// some non-module, non-member bindings to be marked IsCompiledAsTopLevel, e.g. 'y' in 
-    /// 'let x = let y = 1 in y + y' (NOTE: check this, don't take it as gospel)
-    member x.IsCompiledAsTopLevel       = x.Data.val_top_repr_info.IsSome 
-
-    member x.UniqueCompiledName =
-#if STANDALONE_METADATA
-#else
-        // These cases must get stable unique names for their static field & static property. This name
-        // must be stable across quotation generation and IL code generation (quotations can refer to the 
-        // properties implicit in these)
-        //
-        //    Variable 'x' here, which is compiled as a top level static:
-        //         do let x = expr in ...    // IsMemberOrModuleBinding = false, IsCompiledAsTopLevel = true, IsMember = false, CompilerGenerated=false
-        //
-        //    The implicit 'patternInput' variable here:
-        //         let [x] = expr in ...    // IsMemberOrModuleBinding = true, IsCompiledAsTopLevel = true, IsMember = false, CompilerGenerated=true
-        //    
-        //    The implicit 'copyOfStruct' variables here:
-        //         let dt = System.DateTime.Now - System.DateTime.Now // IsMemberOrModuleBinding = false, IsCompiledAsTopLevel = true, IsMember = false, CompilerGenerated=true
-        //    
-        // However we don't need this for CompilerGenerated members such as the imlpementations of IComparable
-        if x.IsCompiledAsTopLevel  && not x.IsMember  && (x.IsCompilerGenerated || not x.IsMemberOrModuleBinding) then 
-            globalStableNameGenerator.GetUniqueCompilerGeneratedName(x.MangledName,x.Range,x.Stamp) 
-        else 
-#endif
-            x.MangledName
-
-    /// What is the public path to the value, if any? Should be set if and only if
-    /// IsMemberOrModuleBinding is set.
-    //
-    // Note: this is a somewhat strange field to be storing since the information
-    // is imprecise (it doesn't indicate if the path is made of namespaces or types, hence
-    // it's not enough to rebuild a compiled reference to the value. However it is enough to
-    // build an F# cross-module reference to the value)
-    //
-    // Also, this is recoverable from the parent
-    //
-    // We use it here:
-    //   - in opt.ml   : when compiling fslib, we bind an entry for the value in a global table (see bind_escaping_local_vspec)
-    //   - in ilxgen.ml: when compiling fslib, we bind an entry for the value in a global table (see bind_escaping_local_vspec)
-    //   - in opt.ml   : (full_display_text_of_vref) for error reporting of non-inlinable values
-    //   - in service.ml (boutput_item_description): to display the full text of a value's binding location
-    //   - in check.ml: as a boolean to detect public values for saving quotations 
-    //   - in ilxgen.ml: as a boolean to detect public values for saving quotations 
-    //   - in MakeExportRemapping, to build non-local references for values
-    member x.PublicPath                 = x.Data.val_pubpath
-
-    /// Is this a member definition or module definition?
-    member x.IsMemberOrModuleBinding    = x.Data.val_flags |> ValFlags.is_topbind_of_vflags
-    member x.IsExtensionMember          = x.Data.val_flags |> ValFlags.is_extension_member_of_vflags
-
-    member x.ReflectedDefinition        = x.Data.val_defn
-
-    /// Is this a member, if so some more data about the member.
-    ///
-    /// Note, the value may still be (a) an extension member or (b) and abtract slot without
-    /// a true body.
-    member x.MemberInfo                 = x.Data.val_member_info
-
-    member x.IsMember                   = x.MemberInfo.IsSome
-    member x.IsNonExtensionMember       = x.IsMember && not x.IsExtensionMember
-    member x.IsModuleBinding            = x.IsMemberOrModuleBinding && not x.IsMember 
-    member x.IsCompiledIntoModule       = x.IsExtensionMember || x.IsModuleBinding
-
-    member x.IsInstanceMember = x.IsMember && x.MemberInfo.Value.MemberFlags.MemberIsInstance
-
-    member x.IsConstructor              =
-        match x.MemberInfo with 
-        | Some(memberInfo) when not x.IsExtensionMember && (memberInfo.MemberFlags.MemberKind = MemberKindConstructor) -> true
-        | _ -> false
-
-    member x.IsOverride                 =
-        match x.MemberInfo with 
-        | Some(memberInfo) when memberInfo.MemberFlags.MemberIsOverrideOrExplicitImpl -> true
-        | _ -> false
-            
-    member x.IsMutable                  = (match x.Data.val_flags |> ValFlags.mutability_of_vflags with Immutable -> false | Mutable -> true)
-
-    /// Was the value inferred to be a method or function that definitely makes no critical tailcalls?
-    member x.MakesNoCriticalTailcalls = x.Data.val_flags |> ValFlags.is_notailcall_hint_of_vflags
-
-    member x.IsIncrClassGeneratedMember     = x.IsCompilerGenerated && x.Data.val_flags |> ValFlags.is_incr_class_of_vflags
-    member x.IsIncrClassConstructor = x.IsConstructor && x.Data.val_flags |> ValFlags.is_incr_class_of_vflags
-    member x.RecursiveValInfo           = x.Data.val_flags |> ValFlags.vrec_of_vflags
-    member x.BaseOrThisInfo             = x.Data.val_flags |> ValFlags.base_of_vflags
-
-    //  Was this value declared to be a type function, e.g. "let f<'a> = typeof<'a>"
-    member x.IsTypeFunction             = x.Data.val_flags |> ValFlags.is_tyfunc_of_vflags
-    member x.TopValInfo                  = x.Data.val_top_repr_info
-    member x.InlineInfo                 = x.Data.val_flags |> ValFlags.inline_info_of_vflags
-    member x.MustInline                 = mustinline(x.InlineInfo)
-    member x.IsCompilerGenerated        = x.Data.val_flags |> ValFlags.is_compgen_of_vflags
-    member x.Attribs                    = x.Data.val_attribs
-    member x.XmlDoc                     = x.Data.val_xmldoc
-    /// The parent type or module, if any (None for expression bindings and parameters)
-    member x.ActualParent               = x.Data.val_actual_parent
-
-    member x.MemberActualParent = 
-        match x.ActualParent  with 
-        | Parent tcref -> tcref
-        | ParentNone -> error(InternalError("MemberActualParent: does not have a parent",x.Range))
-            
-    member x.MemberApparentParent = 
-        match x.MemberInfo with 
-        | Some membInfo -> membInfo.ApparentParent
-        | None -> error(InternalError("MemberApparentParent",x.Range))
-
-    member x.ApparentParent = 
-        match x.MemberInfo with 
-        | Some membInfo -> Parent(membInfo.ApparentParent)
-        | None -> x.ActualParent
-
-    member x.CoreDisplayName = 
-        match x.MemberInfo with 
-        | Some membInfo -> 
-            match membInfo.MemberFlags.MemberKind with 
-            | MemberKindClassConstructor 
-            | MemberKindConstructor 
-            | MemberKindMember -> membInfo.CompiledName
-            | MemberKindPropertyGetSet 
-            | MemberKindPropertySet
-            | MemberKindPropertyGet -> membInfo.PropertyName
-        | None -> x.MangledName 
-
-    member x.DisplayName = 
-        DemangleOperatorName x.CoreDisplayName
-
-    member x.TypeScheme = 
-        match x.Type with 
-        | TType_forall(tps,tau) -> tps,tau
-        | ty -> [],ty
-
-    member x.TauType = 
-        match x.Type with 
-        | TType_forall(_,tau) -> tau
-        | ty -> ty
-
-    member x.Typars = 
-        match x.Type with 
-        | TType_forall(tps,_) -> tps
-        | ty -> []
-
-    member x.CompiledName = 
-        match x.MemberInfo with 
-        | Some membInfo -> membInfo.CompiledName
-        | None -> x.MangledName
-
-    // OSGN support
-    static member NewUnlinked() : Val  = { Data = nullable_slot_empty() }
-    static member New(data) : Val = { Data = data }
-    member x.Link(tg) = x.Data <- nullable_slot_full(tg)
-    member x.IsLinked = match box x.Data with null -> false | _ -> true 
-
-    override x.ToString() = x.MangledName
-    
-    
-and 
-  []
-  ValData =
-    { val_name: string;
-      val_range: range;
-      mutable val_defn_range: range; 
-      mutable val_type: typ;
-      val_stamp: stamp; 
-      /// See vflags section further below for encoding/decodings here 
-      mutable val_flags: int64;
-      mutable val_const: Constant option;
-      val_pubpath : PublicPath option;
-
-      /// What is the original, unoptimized, closed-term definition, if any? 
-      /// Used to implement []
-      mutable val_defn: expr option; 
-
-      /// How visible is this? 
-      val_access: Accessibility; 
-
-      /// Is the value actually an instance method/property/event that augments 
-      /// a type, and if so what name does it take in the IL?
-      val_member_info: ValMemberInfo option;
-
-      /// Custom attributes attached to the value. These contain references to other values (i.e. constructors in types). Mutable to fixup  
-      /// these value references after copying a colelction of values. 
-      mutable val_attribs: Attribs;
-
-      /// Top level values have an arity inferred and/or specified
-      /// signatures.  The arity records the number of arguments preferred 
-      /// in each position for a curried functions. The currying is based 
-      /// on the number of lambdas, and in each position the elements are 
-      /// based on attempting to deconstruct the type of the argument as a 
-      /// tuple-type.  The field is mutable because arities for recursive 
-      /// values are only inferred after the r.h.s. is analyzed, but the 
-      /// value itself is created before the r.h.s. is analyzed. 
-      ///
-      /// TLR also sets this for inner bindings that it wants to 
-      /// represent as "top level" bindings.
-     
-      // MUTABILITY CLEANUP: mutability of this field is used by 
-      //     -- adjustAllUsesOfRecValue 
-      //     -- TLR optimizations
-      //     -- LinearizeTopMatch
-      //
-      // For example, we use mutability to replace the empty arity initially assumed with an arity garnered from the 
-      // type-checked expression.  
-      mutable val_top_repr_info: ValTopReprInfo option;
-
-
-      // MUTABILITY CLEANUP: mutability of this field is used by 
-      //     -- LinearizeTopMatch
-      //
-      // The fresh temporary should just be created with the right parent
-      mutable val_actual_parent: ParentRef;
-
-      /// XML documentation attached to a value.
-      val_xmldoc : XmlDoc; 
-  } 
-
-and 
-  []
-  ValMemberInfo = 
-    { /// The member name in compiled code
-      CompiledName: string;
-     
-      /// The parent type. For an extension member this is the type being extended 
-      ApparentParent: TyconRef;  
-
-      /// Gets updated with full slotsig after interface implementation relation is checked 
-      mutable ImplementedSlotSigs: SlotSig list; 
-
-      /// Gets updated with 'true' if an abstract slot is implemented in the file being typechecked.  Internal only. 
-      mutable IsImplemented: bool;                      
-
-      MemberFlags: MemberFlags }
-
-    member x.PropertyName = 
-        let logicalName = 
-            match x.ImplementedSlotSigs with 
-            | (TSlotSig(nm,_,_,_,_,_)) :: _ -> nm
-            | _ -> x.CompiledName 
-        ChopPropertyName logicalName
-    member x.LogicalName = 
-        match x.ImplementedSlotSigs with 
-        | slotsig :: _ -> slotsig.Name
-        | _ -> x.CompiledName 
-
-
-
-/// Non-local references indirect via a CCU
-/// The lookup into the CCU is a NonLocalPath, which is a series of strings
-/// We cache the result of dereferencing
-and NonLocalItemRef = 
-    { /// The path to an item referenced via a CCU
-      nlr_nlpath : NonLocalPath; 
-      /// The name of an item referenced via a CCU 
-      nlr_item: string; }
-      
-/// A public path records where a construct lives within the global namespace
-/// of a CCU.
-and PublicPath      = 
-    | PubPath of string[] * string
-
-/// The information ILXGEN needs about the location of an item
-and CompilationPath = 
-    | CompPath of ILScopeRef * (string * ModuleOrNamespaceKind) list
-    member x.ILScopeRef = (let (CompPath(scoref,_)) = x in scoref)
-    member x.AccessPath = (let (CompPath(_,p)) = x in p)
-
-/// Index into the namespace/module structure of a particular CCU 
-and NonLocalPath    = 
-    | NLPath of ccu * string[]
-        
-    member nlpath.TryDeref = 
-        let (NLPath(ccu,p)) = nlpath 
-        ccu.EnsureDerefable(p)
-        let rec loop (entity:Entity)  i = 
-            if i >= p.Length then Some entity
-            else 
-                let next = entity.ModuleOrNamespaceType.AllEntities.TryFind(p.[i])
-                match next with 
-                | Some res -> loop res (i+1)
-                | None -> None
-
-        match loop ccu.Contents 0 with
-        | Some res as r -> r
-        | None ->
-            // OK, the lookup failed. Check if we can redirect through a type forwarder on this assembly.
-            // Look for a forwarder for each prefix-path
-            let rec tryForwardPrefixPath i = 
-                if i < p.Length then 
-                    match ccu.TryForward(p.[0..i-1],p.[i]) with
-                    | Some tcref -> 
-                       // OK, found a forwarder, now continue with the lookup to find the nested type
-                       loop tcref.Deref (i+1)
-                    | None -> tryForwardPrefixPath (i+1)
-                else
-                    None
-            tryForwardPrefixPath 0
-        
-    member nlpath.DisplayName =
-        let (NLPath(ccu,p)) = nlpath 
-        String.concat "." p 
-
-    member nlpath.AssemblyName =
-        let (NLPath(ccu,p)) = nlpath 
-        ccu.AssemblyName
-
-    member nlpath.Deref = 
-        match nlpath.TryDeref with 
-        | Some res -> res
-        | None -> 
-              errorR (InternalUndefinedItemRef ("module/namespace",nlpath.DisplayName, nlpath.AssemblyName, "")); 
-              raise (KeyNotFoundException())
-        
-    member nlpath.TryModuleOrNamespaceType = 
-        nlpath.TryDeref |> Option.map (fun v -> v.ModuleOrNamespaceType) 
-
-    member nlpath.ModuleOrNamespaceType = 
-        nlpath.Deref.ModuleOrNamespaceType
-
-        
-
-and 
-  []
-  EntityRef = 
-    { /// Indicates a reference to something bound in this CCU 
-      mutable binding: Entity nonnull_slot
-      /// Indicates a reference to something bound in another CCU 
-      nlr: NonLocalItemRef }
-    member x.IsLocalRef = match box x.nlr with null -> true | _ -> false
-    member x.IsResolved = match box x.binding with null -> false | _ -> true
-    member x.PrivateTarget = x.binding
-    member x.ResolvedTarget = x.binding
-
-    member private tcr.Resolve() = 
-        let res = 
-            match tcr.nlr.nlr_nlpath.TryModuleOrNamespaceType with
-            | Some mtyp -> 
-                Map.tryFind tcr.nlr.nlr_item mtyp.AllEntities
-
-            | None -> None
-        let res = 
-            match res with 
-            | Some _ -> res
-            | None -> 
-                // The lookup failed. See if we can go through a type forwarder
-                let (NLPath(ccu,p)) = tcr.nlr.nlr_nlpath 
-                ccu.EnsureDerefable(p)
-                match ccu.TryForward(p,tcr.nlr.nlr_item) with 
-                | Some forwardedTo -> 
-                    forwardedTo.TryDeref // recurse
-                | None -> 
-                    None
-        match res with 
-        | Some r -> 
-             tcr.binding <- nullable_slot_full r; 
-        | None -> 
-             ()
-
-    // Dereference the TyconRef to a Tycon. Amortize the cost of doing this.
-    // This path should not allocate in the amortized case
-    member tcr.Deref = 
-        match box tcr.binding with 
-        | null ->
-            tcr.Resolve()
-            match box tcr.binding with 
-            | null -> raise (InternalUndefinedItemRef ("namespace, module or type",tcr.nlr.nlr_nlpath.DisplayName,tcr.nlr.nlr_nlpath.AssemblyName, tcr.nlr.nlr_item))
-            | _ -> tcr.binding
-        | _ -> 
-            tcr.binding
-
-    // Dereference the TyconRef to a Tycon option.
-    member tcr.TryDeref = 
-        match box tcr.binding with 
-        | null -> 
-            tcr.Resolve()
-            match box tcr.binding with 
-            | null -> None
-            | _ -> Some tcr.binding
-
-        | _ -> 
-            Some tcr.binding
-
-    override x.ToString() = 
-       if x.IsLocalRef then 
-           x.ResolvedTarget.DisplayName 
-       else 
-           x.nlr.nlr_nlpath.DisplayName + "::" + x.nlr.nlr_item
-
-
-    member x.CompiledRepresentation = x.Deref.CompiledRepresentation
-    member x.CompiledRepresentationForTyrepNamed = x.Deref.CompiledRepresentationForTyrepNamed
-    member x.MangledName = x.Deref.MangledName
-    member x.DisplayName = x.Deref.DisplayName
-    member x.DisplayNameWithUnderscoreTypars = x.Deref.DisplayNameWithUnderscoreTypars
-    member x.Range = x.Deref.Range
-    member x.Stamp = x.Deref.Stamp
-    member x.Attribs = x.Deref.Attribs
-    member x.XmlDoc = x.Deref.XmlDoc
-    member x.ModuleOrNamespaceType = x.Deref.ModuleOrNamespaceType
-    
-    member x.TypeContents = x.Deref.TypeContents
-    member x.TypeOrMeasureKind = x.Deref.TypeOrMeasureKind
-    member x.Id = x.Deref.Id
-    member x.TypeReprInfo = x.Deref.TypeReprInfo
-    member x.ExceptionInfo = x.Deref.ExceptionInfo
-    member x.IsExceptionDecl = x.Deref.IsExceptionDecl
-    
-    member x.DemangledExceptionName = x.Deref.DemangledExceptionName
-        
-    member x.Typars(m) = x.Deref.Typars(m)
-    member x.TyparsNoRange = x.Deref.TyparsNoRange
-    member x.TypeAbbrev = x.Deref.TypeAbbrev
-    member x.IsTypeAbbrev = x.Deref.IsTypeAbbrev
-    member x.TypeReprAccessibility = x.Deref.TypeReprAccessibility
-    member x.CompiledReprCache = x.Deref.CompiledReprCache
-    member x.PublicPath = x.Deref.PublicPath
-    member x.Accessibility = x.Deref.Accessibility
-    member x.IsPrefixDisplay = x.Deref.IsPrefixDisplay
-    member x.IsModuleOrNamespace  = x.Deref.IsModuleOrNamespace
-    member x.IsNamespace          = x.Deref.IsNamespace
-    member x.IsModule             = x.Deref.IsModule
-    member x.CompilationPathOpt   = x.Deref.CompilationPathOpt
-    member x.CompilationPath      = x.Deref.CompilationPath
-    member x.AllFieldTable        = x.Deref.AllFieldTable
-    member x.AllFieldsArray       = x.Deref.AllFieldsArray
-    member x.AllFieldsAsList = x.Deref.AllFieldsAsList
-    member x.TrueFieldsAsList = x.Deref.TrueFieldsAsList
-    member x.TrueInstanceFieldsAsList = x.Deref.TrueInstanceFieldsAsList
-    member x.AllInstanceFieldsAsList = x.Deref.AllInstanceFieldsAsList
-    member x.GetFieldByIndex(n)        = x.Deref.GetFieldByIndex(n)
-    member x.GetFieldByName(n)         = x.Deref.GetFieldByName(n)
-    member x.UnionTypeInfo             = x.Deref.UnionTypeInfo
-    member x.UnionCasesArray           = x.Deref.UnionCasesArray
-    member x.UnionCasesAsList     = x.Deref.UnionCasesAsList
-    member x.GetUnionCaseByName(n)     = x.Deref.GetUnionCaseByName(n)
-    member x.FSharpObjectModelTypeInfo = x.Deref.FSharpObjectModelTypeInfo
-    member x.IsStructTycon             = x.Deref.IsStructTycon
-    member x.IsAsmReprTycon            = x.Deref.IsAsmReprTycon
-    member x.IsMeasureableReprTycon    = x.Deref.IsMeasureableReprTycon
-    
-    
-    member x.IsILTycon                = x.Deref.IsILTycon
-    member x.ILTyconInfo              = x.Deref.ILTyconInfo
-    member x.ILTyconRawMetadata       = x.Deref.ILTyconRawMetadata
-    member x.IsUnionTycon             = x.Deref.IsUnionTycon
-    member x.UnionInfo                = x.Deref.UnionInfo
-    member x.IsRecordTycon            = x.Deref.IsRecordTycon
-    member x.IsFSharpObjectModelTycon = x.Deref.IsFSharpObjectModelTycon
-    member x.IsHiddenReprTycon        = x.Deref.IsHiddenReprTycon
-
-    member x.IsFSharpInterfaceTycon   = x.Deref.IsFSharpInterfaceTycon
-    member x.IsFSharpDelegateTycon    = x.Deref.IsFSharpDelegateTycon
-    member x.IsFSharpEnumTycon        = x.Deref.IsFSharpEnumTycon
-
-    member x.IsFSharpStructTycon      = x.Deref.IsFSharpStructTycon
-
-    member x.IsILStructTycon          = x.Deref.IsILStructTycon
-
-
-/// note: ModuleOrNamespaceRef and TyconRef are type equivalent 
-and ModuleOrNamespaceRef       = EntityRef
-and TyconRef       = EntityRef
-
-/// References are either local or nonlocal
-and 
-  []
-  ValRef = 
-    { /// Indicates a reference to something bound in this CCU 
-      mutable binding: Val nonnull_slot
-      /// Indicates a reference to something bound in another CCU 
-      nlr: NonLocalItemRef }
-    member x.IsLocalRef = match box x.nlr with null -> true | _ -> false
-    member x.IsResolved = match box x.binding with null -> false | _ -> true
-    member x.PrivateTarget = x.binding
-    member x.ResolvedTarget = x.binding
-
-    member vr.Deref = 
-        match box vr.binding with 
-        | null ->
-            let res = 
-                let nlr = vr.nlr 
-                let mtyp = nlr.nlr_nlpath.ModuleOrNamespaceType
-                try Map.find nlr.nlr_item mtyp.AllValuesAndMembers
-                with :? KeyNotFoundException -> raise (InternalUndefinedItemRef ("val",nlr.nlr_nlpath.DisplayName, nlr.nlr_nlpath.AssemblyName, nlr.nlr_item))
-            vr.binding <- nullable_slot_full res; 
-            res 
-        | x -> vr.binding
-
-    member vr.TryDeref = 
-        match box vr.binding with 
-        | null -> 
-            vr.nlr.nlr_nlpath.TryModuleOrNamespaceType |> Option.bind (fun mty -> Map.tryFind vr.nlr.nlr_item mty.AllValuesAndMembers)
-        | _ -> Some vr.binding
-
-    member x.Type                       = x.Deref.Type
-    member x.TypeScheme                 = x.Deref.TypeScheme
-    member x.TauType                    = x.Deref.TauType
-    member x.Typars                     = x.Deref.Typars
-    member x.MangledName                = x.Deref.MangledName
-    member x.DisplayName                = x.Deref.DisplayName
-    member x.CompiledName               = x.Deref.CompiledName
-    member x.CoreDisplayName            = x.Deref.CoreDisplayName
-    member x.Range                      = x.Deref.Range
-
-    member x.Accessibility              = x.Deref.Accessibility
-    member x.ActualParent               = x.Deref.ActualParent
-    member x.ApparentParent             = x.Deref.ApparentParent
-    member x.DefinitionRange            = x.Deref.DefinitionRange
-    member x.LiteralValue               = x.Deref.LiteralValue
-    member x.Id                         = x.Deref.Id
-    member x.Stamp                      = x.Deref.Stamp
-    member x.IsCompiledAsTopLevel       = x.Deref.IsCompiledAsTopLevel
-    member x.UniqueCompiledName         = x.Deref.UniqueCompiledName
-
-    member x.PublicPath                 = x.Deref.PublicPath
-    member x.ReflectedDefinition        = x.Deref.ReflectedDefinition
-    member x.IsConstructor              = x.Deref.IsConstructor
-    member x.MemberInfo                 = x.Deref.MemberInfo
-    member x.IsMember                   = x.Deref.IsMember
-    member x.IsModuleBinding            = x.Deref.IsModuleBinding
-    member x.IsInstanceMember           = x.Deref.IsInstanceMember
-
-    member x.IsMutable                  = x.Deref.IsMutable
-    member x.MakesNoCriticalTailcalls  = x.Deref.MakesNoCriticalTailcalls
-    member x.IsMemberOrModuleBinding    = x.Deref.IsMemberOrModuleBinding
-    member x.IsExtensionMember          = x.Deref.IsExtensionMember
-    member x.IsIncrClassConstructor = x.Deref.IsIncrClassConstructor
-    member x.IsIncrClassGeneratedMember = x.Deref.IsIncrClassGeneratedMember
-    member x.RecursiveValInfo           = x.Deref.RecursiveValInfo
-    member x.BaseOrThisInfo             = x.Deref.BaseOrThisInfo
-    member x.IsTypeFunction             = x.Deref.IsTypeFunction
-    member x.TopValInfo                  = x.Deref.TopValInfo
-    member x.InlineInfo                 = x.Deref.InlineInfo
-    member x.MustInline                 = x.Deref.MustInline
-    member x.IsCompilerGenerated        = x.Deref.IsCompilerGenerated
-    member x.Attribs                    = x.Deref.Attribs
-    member x.XmlDoc                     = x.Deref.XmlDoc
-    member x.MemberActualParent         = x.Deref.MemberActualParent
-    member x.MemberApparentParent       = x.Deref.MemberApparentParent
-    override x.ToString() = 
-       if x.IsLocalRef then x.ResolvedTarget.DisplayName else x.nlr.nlr_nlpath.DisplayName + "::" + x.nlr.nlr_item
-
-and UnionCaseRef = UCRef of TyconRef * string
-and RecdFieldRef = RFRef of TyconRef * string
-
-and 
-  /// The algebra of types
-  []
-// REMOVING because of possible stack overflow  [)>]
-  typ =
-    /// Indicates the type is a universal type, only used for types of values, members and record fields 
-    | TType_forall of typars * typ
-    /// Indicates the type is a type application 
-    | TType_app of TyconRef * tinst
-    /// Indicates the type is a tuple type 
-    | TType_tuple of typ list
-    /// Indicates the type is a function type 
-    | TType_fun of  typ * typ
-    /// Indicates the type is a non-F#-visible type representing a "proof" that a union value belongs to a particular union case
-    /// These types are not user-visible and will never appear as an inferred type. They are the types given to
-    /// the temporaries arising out of pattern matching on union values.
-    | TType_ucase of  UnionCaseRef * tinst
-    /// Indicates the type is a variable type, whether declared, generalized or an inference type parameter  
-    | TType_var of Typar 
-    /// A legacy fake type used in legacy code to indicate the "type" of a module when building a module expression 
-    | TType_modul_bindings
-    | TType_measure of measure
-
-and tinst = typ list 
-
-and measure = 
-    | MeasureVar of Typar
-    | MeasureCon of TyconRef
-    | MeasureProd of measure*measure
-    | MeasureInv of measure
-    | MeasureOne
-
-and 
-  []
-  CcuData = 
-    { /// Holds the filename for the DLL, if any 
-      ccu_filename: string option; 
-      
-      /// Holds the data indicating how this assembly/module is referenced from the code being compiled. 
-      ccu_scoref: ILScopeRef;
-      
-      /// A unique stamp for this DLL 
-      ccu_stamp: stamp;
-      
-      /// The fully qualified assembly reference string to refer to this assembly. This is persisted in quotations 
-      ccu_qname: string option; 
-      
-      /// A hint as to where does the code for the CCU live (e.g what was the tcConfig.implicitIncludeDir at compilation time for this DLL?) 
-      ccu_code_dir: string; 
-      
-      /// Indicates that this DLL was compiled using the F# compiler 
-      ccu_fsharp: bool; 
-      
-      /// Indicates that this DLL uses quotation literals somewhere. This is used to implement a restriction on static linking
-      mutable ccu_usesQuotations : bool;
-      
-      /// A handle to the full specification of the contents of the module contained in this ccu *)
-      (* NOTE: may contain transient state during typechecking *)
-      mutable ccu_contents: ModuleOrNamespace;
-      
-      ccu_forwarders : CcuTypeForwarderTable }
-
-and CcuTypeForwarderTable = Lazy>
-
-and CcuReference =  string // ILAssemblyRef
-
-and ccu = CcuThunk
-
-// Compilation units and Cross-compilation-unit thunks.
-//
-// A compilation unit is, more or less, the new material created in one
-// invocation of the compiler.  Due to static linking assemblies may hold more 
-// than one compilation unit (i.e. when two assemblies are merged into a compilation
-// the resulting assembly will contain 3 CUs).  Compilation units are also created for referenced
-// .NET assemblies. 
-// 
-// References to items such as type constructors are via 
-// cross-compilation-unit thunks, which directly reference the data structures that define
-// these modules.  Thus, when saving out values to disk we only wish 
-// to save out the "current" part of the term graph.  When reading values
-// back in we "fixup" the links to previously referenced modules.
-//
-// All non-local accesses to the data structures are mediated
-// by ccu-thunks.  Ultimately, a ccu-thunk is either a (named) element of
-// the data structure, or it is a delayed fixup, i.e. an invalid dangling
-// reference that has not had an appropriate fixup applied.  
-
-/// A relinkable handle to the contents of a compilation unit. Relinking is performed by mutation.
-and CcuThunk = 
-    { mutable target: CcuData;
-      mutable orphanfixup : bool;
-      name: CcuReference  }
-      
-    member ccu.Deref = 
-        if (ccu.target = Unchecked.defaultof) || ccu.orphanfixup then 
-            raise(UnresolvedReferenceNoRange ccu.name)
-        ccu.target
-   
-    member ccu.IsUnresolvedReference = (ccu.target = Unchecked.defaultof || ccu.orphanfixup)
-
-    /// Ensure the ccu is derefable in advance. Supply a path to attach to any resulting error message.
-    member ccu.EnsureDerefable(requiringPath:string[]) = 
-        // ccu.orphanfixup is true when a reference is missing in the transitive closure of static references that
-        // may potentially be required for the metadata of referenced DLLs. It is set to true if the "loader"
-        // used in the F# metadata-deserializer or the .NET metadata reader returns a failing value (e.g. None).
-        // Note: When used from Visual Studio, the loader will not automatically chase down transitively referenced DLLs - they
-        // must be in the explicit references in the project.
-        if ccu.IsUnresolvedReference then 
-            let path = System.String.Join(".", requiringPath)
-            raise(UnresolvedPathReferenceNoRange(ccu.name,path))
-            
-    member ccu.UsesQuotations with get() = ccu.Deref.ccu_usesQuotations and set(v) = ccu.Deref.ccu_usesQuotations <- v
-    member ccu.AssemblyName = ccu.name
-    member ccu.ILScopeRef = ccu.Deref.ccu_scoref
-    member ccu.Stamp = ccu.Deref.ccu_stamp
-    member ccu.FileName = ccu.Deref.ccu_filename
-    member ccu.QualifiedName = ccu.Deref.ccu_qname
-    member ccu.SourceCodeDirectory = ccu.Deref.ccu_code_dir
-    member ccu.IsFSharp = ccu.Deref.ccu_fsharp
-    member ccu.Contents = ccu.Deref.ccu_contents
-    member ccu.TypeForwarders : Map  = ccu.Deref.ccu_forwarders.Force()
-
-    static member Create(nm,x) = 
-        { target = x; 
-          orphanfixup = false;
-          name = nm;  }
-
-    static member CreateDelayed(nm) = 
-        { target = Unchecked.defaultof<_>; 
-          orphanfixup = false;
-          name = nm;  }
-
-    member x.Fixup(avail:CcuThunk) = 
-        match box x.target with
-        | null -> 
-            assert (avail.AssemblyName = x.AssemblyName)
-            x.target <- 
-               (match box avail.target with
-                | null -> error(Failure("internal error: ccu thunk '"^avail.name^"' not fixed up!"))
-                | _ -> avail.target)
-        | _ -> errorR(Failure("internal error: the ccu thunk for assembly "^x.AssemblyName^" not delayed!"));
-        
-    member x.FixupOrphaned() = 
-        match box x.target with
-        | null -> x.orphanfixup<-true
-        | _ -> errorR(Failure("internal error: the ccu thunk for assembly "^x.AssemblyName^" not delayed!"));
-            
-    member ccu.TryForward(nlpath:string[],item:string) : EntityRef option  = 
-        ccu.EnsureDerefable(nlpath)
-        ccu.TypeForwarders.TryFind(nlpath,item) 
-        //printfn "trying to forward %A::%s from ccu '%s', res = '%A'" p n ccu.AssemblyName res.IsSome
-
-    override ccu.ToString() = ccu.AssemblyName
-
-/// The result of attempting to resolve an assembly name to a full ccu.
-/// UnresolvedCcu will contain the name of the assembly that could not be resolved.
-and CcuResolutionResult =
-    | ResolvedCcu of ccu
-    | UnresolvedCcu of string
-
-and PickledModuleInfo =
-  { mspec: ModuleOrNamespace;
-    compile_time_working_dir: string;
-    usesQuotations : bool }
-
-//---------------------------------------------------------------------------
-// Attributes
-//---------------------------------------------------------------------------
-
-and Attribs = Attrib list 
-
-and AttribKind = 
-  /// Indicates an attribute refers to a type defined in an imported .NET assembly *)
-  | ILAttrib of ILMethodRef 
-  /// Indicates an attribute refers to a type defined in an imported F# assembly *)
-  | FSAttrib of ValRef
-
-/// Attrib(kind,unnamedArgs,propVals)
-and Attrib = 
-  | Attrib of TyconRef * AttribKind * AttribExpr list * AttribNamedArg list * range
-
-/// We keep both source expression and evaluated expression around to help intellisense and signature printing
-and AttribExpr = AttribExpr of (* source *) expr * (* evaluated *) expr 
-
-/// AttribNamedArg(name,type,isField,value)
-and AttribNamedArg = AttribNamedArg of (string*typ*bool*AttribExpr)
-
-/// Constants in expressions
-and Constant = 
-  | TConst_bool       of bool
-  | TConst_sbyte       of sbyte
-  | TConst_byte      of byte
-  | TConst_int16      of int16
-  | TConst_uint16     of uint16
-  | TConst_int32      of int32
-  | TConst_uint32     of uint32
-  | TConst_int64      of int64
-  | TConst_uint64     of uint64
-  | TConst_nativeint  of int64
-  | TConst_unativeint of uint64
-  | TConst_float32    of single
-  | TConst_float      of double
-  | TConst_char       of char
-  | TConst_string     of string (* in unicode *)
-  | TConst_decimal    of System.Decimal (* in unicode *)
-  | TConst_unit
-  | TConst_zero (* null/zero-bit-pattern *)
-  
-
-/// Decision trees. Pattern matching has been compiled down to
-/// a decision tree by this point.  The right-hand-sides (actions) of
-/// the decision tree are labelled by integers that are unique for that
-/// particular tree.
-and 
-  []
-  DecisionTree = 
-
-    /// Indicates a decision point in a decision tree. 
-    | TDSwitch  of 
-          (* input: *) expr * 
-          (* cases: *) DecisionTreeCase list * 
-          (* default: *) DecisionTree option * range
-
-    /// Indicates the decision tree has terminated with success, calling the given target with the given parameters 
-    | TDSuccess of 
-          (* results: *) FlatExprs * 
-          (* target: *) int  
-
-    /// Bind the given value throught the remaining cases of the dtree. 
-    | TDBind of 
-          (* binding: *) Binding * 
-          (* body: *) DecisionTree
-
-and DecisionTreeCase = 
-    | TCase of DecisionTreeDiscriminator * DecisionTree
-
-and 
-  []
-  DecisionTreeDiscriminator = 
-    /// Test if the input to a decision tree matches the given constructor 
-    | TTest_unionconstr of (UnionCaseRef * tinst) 
-
-    /// Test if the input to a decision tree is an array of the given length 
-    | TTest_array_length of int * typ  
-
-    /// Test if the input to a decision tree is the given constant value 
-    | TTest_const of Constant
-
-    /// Test if the input to a decision tree is null 
-    | TTest_isnull 
-
-    /// Test if the input to a decision tree is an instance of the given type 
-    | TTest_isinst of (* source: *) typ * (* target: *) typ
-
-    /// Run the active pattern and bind a successful result to the (one) variable in the remaining tree 
-    | TTest_query of expr * typ list * ValRef option * int * ActivePatternInfo
-
-
-/// A target of a decision tree. Can be thought of as a little function, though is compiled as a local block. 
-and DecisionTreeTarget = 
-    | TTarget of FlatVals * expr * SequencePointInfoForTarget
-
-and Bindings = FlatList
-
-and Binding = 
-    | TBind of Val * expr * SequencePointInfoForBinding
-    member x.Var               = (let (TBind(v,_,_)) = x in v)
-    member x.Expr              = (let (TBind(_,e,_)) = x in e)
-    member x.SequencePointInfo = (let (TBind(_,_,sp)) = x in sp)
-    
-// ActivePatternElemRef: active pattern element (deconstruction case), e.g. 'JNil' or 'JCons'. 
-// Integer indicates which choice in the target set is being selected by this item. 
-and ActivePatternElemRef = 
-    | APElemRef of ActivePatternInfo * ValRef * int 
-
-    member x.IsTotalActivePattern = (let (APElemRef(total,vref,n)) = x in total)
-    member x.ActivePatternVal = (let (APElemRef(total,vref,n)) = x in vref)
-    member x.CaseIndex = (let (APElemRef(total,vref,n)) = x in n)
-
-and ActivePatternInfo = 
-    | APInfo of bool * string list * range
-
-and ValTopReprInfo  = 
-    | TopValInfo  of (* numTypars: *) TopTyparInfo list * (* args: *) TopArgInfo list list * (* result: *) TopArgInfo 
-    member x.ArgInfos       = (let (TopValInfo(_,args,_)) = x in args)
-    member x.NumCurriedArgs = (let (TopValInfo(_,args,_)) = x in args.Length)
-    member x.NumTypars      = (let (TopValInfo(n,_,_)) = x in n.Length)
-    member x.HasNoArgs      = (let (TopValInfo(n,args,_)) = x in n.IsEmpty && args.IsEmpty)
-    member x.AritiesOfArgs  = (let (TopValInfo(_,args,_)) = x in List.map List.length args)
-    member x.KindsOfTypars  = (let (TopValInfo(n,_,_)) = x in n |> List.map (fun (TopTyparInfo(_,k)) -> k))
-
-/// The extra metadata stored about typars for top-level definitions. Any information here is propagated from signature through
-/// to the compiled code.
-and TopArgInfo = TopArgInfo of (* attributes: *) Attribs * (* name: *) ident option 
-
-/// The extra metadata stored about typars for top-level definitions. Any information here is propagated from signature through
-/// to the compiled code.
-and TopTyparInfo = TopTyparInfo of ident * TyparKind
-
-and typars = Typar list
- 
-and Exprs = expr list
-and FlatExprs = FlatList
-and Vals = Val list
-and FlatVals = FlatList
-
-/// The big type of expressions.  
-and expr =
-    /// A constant expression. 
-    | TExpr_const of Constant * range * typ
-
-    /// Reference a value. The flag is only relevant if the value is an object model member 
-    /// and indicates base calls and special uses of object constructors. 
-    | TExpr_val of ValRef * ValUseFlag * range
-
-    /// Sequence expressions, used for "a;b", "let a = e in b;a" and "a then b" (the last an OO constructor). 
-    | TExpr_seq of expr * expr * SequentialOpKind * SequencePointInfoForSeq * range
-
-    /// Lambda expressions. 
-    
-    // Why multiple vspecs? A TExpr_lambda taking multiple arguments really accepts a tuple. 
-    // But it is in a convenient form to be compile accepting multiple 
-    // arguments, e.g. if compiled as a toplevel static method. 
-
-    // REVIEW: see if we can eliminate this and just use lambdas taking single arguments. 
-    // though perhaps propagating metadata about preferred argument names. 
-
-    // REVIEW: it would probably be better if the freevar cache cached those of the body rather than the 
-    // whole expression.  
-
-    // REVIEW: why not conjoin multiple lambdas into a single iterated lambda node? 
-    | TExpr_lambda of uniq * Val option * Val list * expr * range * typ * SkipFreeVarsCache
-
-    // Type lambdas.  These are used for the r.h.s. of polymorphic 'let' bindings and 
-    // for expressions that implement first-class polymorphic values. 
-    // REVIEW: it would probably be better if the freevar cache cached those of the body rather than the 
-    // whole expression.  
-    | TExpr_tlambda of uniq * typars * expr * range * typ  * SkipFreeVarsCache
-
-    /// Applications.
-    /// Applications combine type and term applications, and are normalized so 
-    /// that sequential applications are combined, so "(f x y)" becomes "f [[x];[y]]". 
-    /// The type attached to the function is the formal function type, used to ensure we don't build application 
-    /// nodes that over-apply when instantiating at function types. 
-    | TExpr_app of expr * typ * tinst * Exprs * range
-
-    /// Bind a recursive set of values. 
-
-    // REVIEW: it would probably be better if the freevar cache cached those of the body rather than the 
-    // whole expression.  
-    | TExpr_letrec of Bindings * expr * range * FreeVarsCache
-
-    /// Bind a value. 
-    
-    // REVIEW: do we really need both TExpr_let AND TExpr_letrec AND TExpr_match AND TExpr_lambda!? 
-    // Why not just TExpr_match the primitive? 
-    
-    // REVIEW: it would probably be better if the freevar cache cached those of the body rather than the 
-    // whole expression.  
-    | TExpr_let of Binding * expr * range * FreeVarsCache
-
-    // Object expressions: A closure that implements an interface or a base type. 
-    // The base object type might be a delegate type. 
-    | TExpr_obj of 
-         (* unique *)           uniq * 
-         (* object typ *)       typ *                                         (* <-- NOTE: specifies type parameters for base type *)
-         (* base val *)         Val option * 
-         (* ctor call *)        expr * 
-         (* overrides *)        ObjExprMethod list * 
-         (* extra interfaces *) (typ * ObjExprMethod list) list *                   
-                                range * 
-                                SkipFreeVarsCache
-
-    // Pattern matching. 
-
-    /// Matches are a more complicated form of "let" with multiple possible destinations 
-    /// and possibly multiple ways to get to each destination.  
-    /// The first mark is that of the expression being matched, which is used 
-    /// as the mark for all the decision making and binding that happens during the match. 
-    | TExpr_match of SequencePointInfoForBinding * range * DecisionTree * DecisionTreeTarget array * range * typ * SkipFreeVarsCache
-
-    /// If we statically know some infomation then in many cases we can use a more optimized expression 
-    /// This is primarily used by terms in the standard library, particularly those implementing overloaded 
-    /// operators. 
-    | TExpr_static_optimization of StaticOptimization list * expr * expr * range
-
-    /// An intrinsic applied to some (strictly evaluated) arguments 
-    /// A few of intrinsics (TOp_try, TOp_while, TOp_for) expect arguments kept in a normal form involving lambdas 
-    | TExpr_op of ExprOpSpec * tinst * Exprs * range
-
-    // Indicates the expression is a quoted expression tree. 
-    | TExpr_quote of expr * (typ list * Exprs * ExprData) option ref * range * typ  
-    
-    /// Typechecking residue: Indicates a free choice of typars that arises due to 
-    /// minimization of polymorphism at let-rec bindings.  These are 
-    /// resolved to a concrete instantiation on subsequent rewrites. 
-    | TExpr_tchoose of typars * expr * range
-
-    /// Typechecking residue: A TExpr_link occurs for every use of a recursively bound variable. While type-checking 
-    /// the recursive bindings a dummy expression is stored in the mutable reference cell. 
-    /// After type checking the bindings this is replaced by a use of the variable, perhaps at an 
-    /// appropriate type instantiation. These are immediately eliminated on subsequent rewrites. 
-    | TExpr_link of expr ref
-
-/// A type for a module-or-namespace-fragment and the actual definition of the module-or-namespace-fragment
-and ModuleOrNamespaceExprWithSig = 
-    | TMTyped of 
-         /// The module_typ is a binder. However it is not used in the ModuleOrNamespaceExpr: it is only referenced from the 'outside' 
-         ModuleOrNamespaceType 
-         * ModuleOrNamespaceExpr
-         * range
-
-/// The contents of a module-or-namespace-fragment definition 
-and ModuleOrNamespaceExpr = 
-    /// Indicates the module is a module with a signature 
-    | TMAbstract of ModuleOrNamespaceExprWithSig
-    /// Indicates the module fragment is made of several module fragments in succession 
-    | TMDefs     of ModuleOrNamespaceExpr list  
-    /// Indicates the module fragment is a 'let' definition 
-    | TMDefLet   of Binding * range
-    /// Indicates the module fragment is an evaluation of expression for side-effects
-    | TMDefDo   of expr * range
-    /// Indicates the module fragment is a 'rec' definition of types, values and modules
-    | TMDefRec   of Tycon list * Bindings * ModuleOrNamespaceBinding list * range
-
-/// A named module-or-namespace-fragment definition 
-and ModuleOrNamespaceBinding = 
-    | TMBind of 
-         /// This ModuleOrNamespace that represents the compilation of a module as a class. 
-         /// The same set of tycons etc. are bound in the ModuleOrNamespace as in the ModuleOrNamespaceExpr
-         ModuleOrNamespace * 
-         /// This is the body of the module/namespace 
-         ModuleOrNamespaceExpr
-
-
-#if STANDALONE_METADATA
-#else
-and TypedImplFile = TImplFile of QualifiedNameOfFile * ScopedPragma list * ModuleOrNamespaceExprWithSig
-
-and TypedAssembly = TAssembly of TypedImplFile list
-
-#endif
-and RecordConstructionInfo = 
-   /// We're in a constructor. The purpose of the record expression is to 
-   /// fill in the fields of a pre-created but uninitialized object 
-   | RecdExprIsObjInit
-   /// Normal record construction 
-   | RecdExpr
-   
-and 
-    []
-    ExprOpSpec =
-    /// An operation representing the creation of a union value of the particular union case
-    | TOp_ucase of UnionCaseRef 
-    /// An operation representing the creation of an exception value using an F# exception declaration
-    | TOp_exnconstr of TyconRef
-    /// An operation representing the creation of a tuple value
-    | TOp_tuple 
-    /// An operation representing the creation of an array value
-    | TOp_array
-    /// Constant bytes, but a new mutable blob is generated each time the construct is executed 
-    | TOp_bytes of byte[] 
-    | TOp_uint16s of uint16[] 
-    // REVIEW: simplify these two to a more general concretization of inner letrec bindings
-    /// An operation representing a lambda-encoded while loop
-    | TOp_while of SequencePointInfoForWhileLoop
-    /// An operation representing a lambda-encoded for loop
-    | TOp_for of SequencePointInfoForForLoop * ForLoopStyle (* count up or down? *)
-    /// An operation representing a lambda-encoded try/catch
-    | TOp_try_catch of SequencePointInfoForTry * SequencePointInfoForWith
-    /// An operation representing a lambda-encoded try/finally
-    | TOp_try_finally of SequencePointInfoForTry * SequencePointInfoForFinally
-
-    /// Construct a record or object-model value. The ValRef is for self-referential class constructors, otherwise 
-    /// it indicates that we're in a constructor and the purpose of the expression is to 
-    /// fill in the fields of a pre-created but uninitialized object, and to assign the initialized 
-    /// version of the object into the optional mutable cell pointed to be the given value. 
-    | TOp_recd of RecordConstructionInfo * TyconRef
-    
-    /// An operation representing setting a record field
-    | TOp_rfield_set of RecdFieldRef 
-    /// An operation representing getting a record field
-    | TOp_rfield_get of RecdFieldRef 
-    /// An operation representing getting the address of a record field
-    | TOp_field_get_addr of RecdFieldRef       
-    /// An operation representing getting an integer tag for a union value representing the union case number
-    | TOp_ucase_tag_get of TyconRef 
-    /// An operation representing a coercion that proves a union value is of a particular union case. THis is not a test, its
-    /// simply added proof to enable us to generate verifiable code for field access on union types
-    | TOp_ucase_proof of UnionCaseRef
-    /// An operation representing a field-get from a union value, where that value has been proven to be of the corresponding union case.
-    | TOp_ucase_field_get of UnionCaseRef * int 
-    /// An operation representing a field-get from a union value. THe value is not assumed to have been proven to be of the corresponding union case.
-    | TOp_ucase_field_set of  UnionCaseRef * int
-    /// An operation representing a field-get from an F# exception value.
-    | TOp_exnconstr_field_get of TyconRef * int 
-    /// An operation representing a field-set on an F# exception value.
-    | TOp_exnconstr_field_set of TyconRef * int 
-    /// An operation representing a field-get from an F# tuple value.
-    | TOp_tuple_field_get of int 
-    /// IL assembly code - type list are the types pushed on the stack 
-    | TOp_asm of ILInstr list * typ list 
-    /// generate a ldflda on an 'a ref. REVIEW: generalize to a TOp_flda 
-    | TOp_get_ref_lval 
-    /// Conversion node, compiled via type-directed translation or to box/unbox 
-    | TOp_coerce 
-    /// Represents a "rethrow" operation. May not be rebound, or used outside of try-finally, expecting a unit argument 
-    | TOp_rethrow 
-    | TOp_return
-#if STANDALONE_METADATA
-#else
-    | TOp_goto of ILCodeLabel
-    | TOp_label of ILCodeLabel
-#endif
-
-    /// Pseudo method calls. This is used for overloaded operations like op_Addition. 
-    | TOp_trait_call of TraitConstraintInfo  
-
-    /// Operation nodes represnting C-style operations on byrefs and mutable vals (l-values) 
-    | TOp_lval_op of LValueOperation * ValRef 
-
-    /// IL method calls 
-    | TOp_ilcall of 
-        (bool * (* virtual call? *)
-         bool * (* protected? *)
-         bool * (* is the object a value type? *) 
-         bool * (* newobj call? *) 
-         ValUseFlag * (* isSuperInit call? *) 
-         bool * (* property? used for reflection *)
-         bool * (* DllImport? if so don't tailcall *)
-         (typ * typ) option * (* coercion to box 'this' *)  
-         ILMethodRef) * 
-       typ list * (* tinst *) 
-       typ list * (* minst *) 
-       typ list   (* types of pushed values if any *) 
-
-and ForLoopStyle = 
-    /// Evaluate start and end once, loop up
-    | FSharpForLoopUp 
-    /// Evaluate start and end once, loop down
-    | FSharpForLoopDown 
-    /// Evaluate start once and end multiple times, loop up
-    | CSharpForLoopUp
-
-and LValueOperation = 
-    /// In C syntax this is: &localv            
-    | LGetAddr      
-    /// In C syntax this is: *localv_ptr        
-    | LByrefGet     
-    /// In C syntax this is:  localv = e     , note == *(&localv) = e == LGetAddr; LByrefSet
-    | LSet          
-    /// In C syntax this is: *localv_ptr = e   
-    | LByrefSet     
-
-and SequentialOpKind = 
-    /// a ; b 
-    | NormalSeq 
-    /// let res = a in b;res 
-    | ThenDoSeq     
-
-and ValUseFlag =
-    | NormalValUse
-    /// A call to a constructor, e.g. 'inherit C()'
-    | CtorValUsedAsSuperInit
-    /// A call to a constructor, e.g. 'new C() = new C(3)'
-    | CtorValUsedAsSelfInit
-    /// A call to a base method, e.g. 'base.OnPaint(args)'
-    | VSlotDirectCall
-  
-and StaticOptimization = 
-    | TTyconEqualsTycon of typ * typ
-  
-/// A representation of a method in an object expression. 
-/// Note: Methods associated with types are represented as val declarations
-/// Note: We should probably use val_specs for object expressions, as then the treatment of members 
-/// in object expressions could be more unified with the treatment of members in types 
-and ObjExprMethod = 
-    | TObjExprMethod of SlotSig * typars * Val list list * expr * range
-    member x.Id = let (TObjExprMethod(slotsig,methFormalTypars,_,_,m)) = x in mksyn_id m slotsig.Name
-
-and SlotSig = 
-    | TSlotSig of string * typ * typars * typars * SlotParam list list * typ option
-    member ss.Name             = let (TSlotSig(nm,_,_,_,_,_)) = ss in nm
-    member ss.ImplementedType  = let (TSlotSig(_,ty,_,_,_,_)) = ss in ty
-    member ss.ClassTypars      = let (TSlotSig(_,_,ctps,_,_,_)) = ss in ctps
-    member ss.MethodTypars     = let (TSlotSig(_,_,_,mtps,_,_)) = ss in mtps
-    member ss.FormalParams     = let (TSlotSig(_,_,_,_,ps,_)) = ss in ps
-    member ss.FormalReturnType = let (TSlotSig(_,_,_,_,_,rt)) = ss in rt
-
-and SlotParam = 
-    | TSlotParam of  string option * typ * bool (* in *) * bool (* out *) * bool (* optional *) * Attribs
-    member x.Type = let (TSlotParam(_,ty,_,_,_,_)) = x in ty
-
-//---------------------------------------------------------------------------
-// Freevars.  Computed and cached by later phases (never computed type checking).  Cached in terms. Not pickled.
-//---------------------------------------------------------------------------
-
-#if STANDALONE_METADATA
-#else
-and FreeLocals = Val Zset.t
-and FreeTypars = Typar Zset.t
-and FreeTycons = Tycon Zset.t
-and FreeRecdFields = RecdFieldRef Zset.t
-and FreeUnionCases = UnionCaseRef Zset.t
-and FreeTyvars = 
-    { /// The summary of locally defined type definitions used in the expression. These may be made private by a signature 
-      /// and we have to check various conditions associated with that. 
-      FreeTycons: FreeTycons;
-
-      /// The summary of values used as trait solutions
-      FreeTraitSolutions: FreeLocals;
-      
-      /// The summary of type parameters used in the expression. These may not escape the enclosing generic construct 
-      /// and we have to check various conditions associated with that. 
-      FreeTypars: FreeTypars }
-
-
-and SkipFreeVarsCache = unit
-and FreeVarsCache = FreeVars cache
-
-and FreeVars = 
-    { /// The summary of locally defined variables used in the expression. These may be hidden at let bindings etc. 
-      /// or made private by a signature or marked 'internal' or 'private', and we have to check various conditions associated with that. 
-      FreeLocals: FreeLocals;
-      
-      /// Indicates if the expression contains a call to a protected member or a base call. 
-      /// Calls to protected members and direct calls to super classes can't escape, also code can't be inlined 
-      UsesMethodLocalConstructs: bool; 
-
-      /// Indicates if the expression contains a call to rethrow that is not bound under a (try-)with branch. 
-      /// Rethrow may only occur in such locations. 
-      UsesUnboundRethrow: bool; 
-
-      /// The summary of locally defined tycon representations used in the expression. These may be made private by a signature 
-      /// or marked 'internal' or 'private' and we have to check various conditions associated with that. 
-      FreeLocalTyconReprs: FreeTycons; 
-
-      /// The summary of fields used in the expression. These may be made private by a signature 
-      /// or marked 'internal' or 'private' and we have to check various conditions associated with that. 
-      FreeRecdFields: FreeRecdFields;
-      
-      /// The summary of union constructors used in the expression. These may be
-      /// marked 'internal' or 'private' and we have to check various conditions associated with that.
-      FreeUnionCases: FreeUnionCases;
-      
-      /// See FreeTyvars above.
-      FreeTyvars: FreeTyvars }
-#endif
-
-/// Specifies the compiled representations of type and exception definitions.  
-/// Computed and cached by later phases (never computed type checking).  Cached at 
-/// type and exception definitions. Not pickled.
-and CompiledTypeRepr = 
-    | TyrepNamed of ILTypeRef * ILBoxity
-    | TyrepOpen of ILType  
-
-//---------------------------------------------------------------------------
-// Basic properties on type definitions
-//---------------------------------------------------------------------------
-
-let demangled_name_of_entity_name nm k = 
-    match k with 
-    | FSharpModuleWithSuffix -> String.dropSuffix nm FSharpModuleSuffix
-    | _ -> nm
-
-let demangled_name_of_modul (x:ModuleOrNamespace) = 
-    demangled_name_of_entity_name x.MangledName x.ModuleOrNamespaceType.ModuleOrNamespaceKind
-
-/// Metadata on values (names of arguments etc. 
-module TopValInfo = 
-    let unnamedTopArg1 = TopArgInfo([],None)
-    let unnamedTopArg = [unnamedTopArg1]
-    let unitArgData = [[]]
-    let unnamedRetVal = TopArgInfo([],None)
-    let selfMetadata = unnamedTopArg
-    let emptyValData = TopValInfo([],[],unnamedRetVal)
-
-    let InferTyparInfo (tps:Typar list) = tps |> List.map (fun tp -> TopTyparInfo(tp.Id, tp.Kind))
-    let InferTopArgInfo (v:Val) = TopArgInfo ([], Some v.Id)
-    let InferTopArgInfos (vs:Val list list) = TopValInfo([],List.mapSquared InferTopArgInfo vs,unnamedRetVal)
-    let HasNoArgs (TopValInfo(n,args,_)) = n.IsEmpty && args.IsEmpty
-
-//---------------------------------------------------------------------------
-// Basic properties via functions (old style)
-//---------------------------------------------------------------------------
-
-let id_of_tycon             (tc:Tycon) = ident(tc.MangledName, tc.Range)
-let stamp_of_tycon          (tc:Tycon) = tc.Stamp
-let attribs_of_tycon        (tc:Tycon) = tc.Attribs
-let pubpath_of_tycon        (tc:Tycon) = tc.PublicPath
-
-let data_of_val          (v:Val) = v.Data 
-let type_of_val          (v:Val) = v.Type
-let types_of_vals        (v:Val list) = v |> List.map (fun v -> v.Type)
-let name_of_val          (v:Val) = v.MangledName
-let id_of_val            (v:Val) = ident(v.MangledName,v.Range)
-let pubpath_of_val       (v:Val) = v.PublicPath
-  
-let arity_of_val (v:Val) = (match v.TopValInfo with None -> TopValInfo.emptyValData | Some arities -> arities)
-
-let set_vrec_of_vflags       x b = x.val_flags <- ValFlags.encode_vrec_of_vflags       b x.val_flags
-let set_is_topbind_of_vflags x b = x.val_flags <- ValFlags.encode_is_topbind_of_vflags b x.val_flags
-let set_notailcall_hint_of_vflags x b = x.val_flags <- ValFlags.encode_notailcall_hint_of_vflags b x.val_flags
-
-//-------------------------------------------------------------------------
-// Managed cached type name lookup tables
-//------------------------------------------------------------------------- 
- 
-let AddTyconsByDemangledNameAndArity nm (typars:Typar list) x tab = 
-    let nm = DemangleGenericTypeName nm 
-    Map.add (NameArityPair(nm, typars.Length)) x tab
-
-let AddTyconsByAccessNames nm x tab = 
-    if IsMangledGenericName nm then 
-        let dnm = DemangleGenericTypeName nm 
-        let res = NameMultiMap.add nm x tab 
-        NameMultiMap.add dnm x res
-    else
-        NameMultiMap.add nm x tab 
-       
-type ModuleOrNamespaceType with  
-    member mtyp.TypeDefinitions               = mtyp.AllEntities |> NameMap.range |> List.filter (fun x -> not x.IsExceptionDecl && not x.IsModuleOrNamespace)
-    member mtyp.ExceptionDefinitions          = mtyp.AllEntities |> NameMap.range |> List.filter (fun x -> x.IsExceptionDecl)
-    member mtyp.ModuleAndNamespaceDefinitions = mtyp.AllEntities |> NameMap.range |> List.filter (fun x -> x.IsModuleOrNamespace)
-    member mtyp.TypeAndExceptionDefinitions   = mtyp.AllEntities |> NameMap.range |> List.filter (fun x -> not x.IsModuleOrNamespace)
-
-    member mtyp.TypesByDemangledNameAndArity(m) = 
-      cacheOptRef mtyp.TypesByDemangledNameAndArityLookupTable (fun () -> 
-         List.foldBack (fun (tc:Tycon) acc -> AddTyconsByDemangledNameAndArity tc.MangledName (tc.Typars(m)) tc acc) mtyp.TypeAndExceptionDefinitions  Map.empty)
-
-    member mtyp.TypesByAccessNames = 
-        cacheOptRef mtyp.TypesByAccessNamesLookupTable (fun () -> 
-           List.foldBack (fun (tc:Tycon) acc -> AddTyconsByAccessNames tc.MangledName tc acc) mtyp.TypeAndExceptionDefinitions  Map.empty)
-
-    member mtyp.TypesByMangledName = 
-        let add_tyconsByMangledName (x:Tycon) tab = NameMap.add x.MangledName x tab 
-        cacheOptRef mtyp.TypesByMangledNameLookupTable (fun () -> 
-           List.foldBack add_tyconsByMangledName mtyp.TypeAndExceptionDefinitions  Map.empty)
-
-    member mtyp.ExceptionDefinitionsByDemangledName = 
-        let add_exconsByDemangledName (tycon:Tycon) acc = NameMap.add tycon.DemangledExceptionName tycon acc
-        cacheOptRef mtyp.FSharpExceptionsLookupTable (fun () -> 
-           List.foldBack add_exconsByDemangledName mtyp.ExceptionDefinitions  Map.empty)
-
-    member mtyp.ModulesAndNamespacesByDemangledName = 
-        let add_moduleByDemangledName (tycon:Entity) acc = 
-            if tycon.IsModuleOrNamespace then 
-                NameMap.add (demangled_name_of_modul tycon) tycon acc
-            else acc
-        cacheOptRef mtyp.ModulesAndNamespacesLookupTable (fun () -> 
-           NameMap.foldRange add_moduleByDemangledName mtyp.AllEntities  Map.empty)
-
-type CcuThunk with 
-    member ccu.TopModulesAndNamespaces = ccu.Contents.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName
-    member ccu.TopTypeAndExceptionDefinitions = ccu.Contents.ModuleOrNamespaceType.TypeAndExceptionDefinitions
-
-let name_of_rfield     v = v.rfield_id.idText
-let set_rigid_of_tpdata       x b = x.typar_flags <- TyparFlags.encode_rigid_of_tpflags       b x.typar_flags
-let set_from_error_of_tpdata  x b = x.typar_flags <- TyparFlags.encode_from_error_of_tpflags  b x.typar_flags
-let set_static_req_of_tpdata  x b = x.typar_flags <- TyparFlags.encode_static_req_of_tpflags  b x.typar_flags
-let set_dynamic_req_of_tpdata x b = x.typar_flags <- TyparFlags.encode_dynamic_req_of_tpflags b x.typar_flags
-let set_compgen_of_tpdata x b     = x.typar_flags <- TyparFlags.encode_compgen_of_tpflags     b x.typar_flags
-let set_kind_of_tpdata        x b = x.typar_flags <- TyparFlags.encode_kind_of_tpflags        b x.typar_flags
-
-
-//---------------------------------------------------------------------------
-// Aggregate operations to help transform the components that 
-// make up the entire compilation unit
-//---------------------------------------------------------------------------
-
-#if STANDALONE_METADATA
-#else
-let mapTImplFile      f   (TImplFile(fragName,pragmas,moduleExpr)) = TImplFile(fragName, pragmas,f moduleExpr)
-let fmapTImplFile     f z (TImplFile(fragName,pragmas,moduleExpr)) = let z,moduleExpr = f z moduleExpr in z,TImplFile(fragName,pragmas,moduleExpr)
-let map_acc_TImplFile f z (TImplFile(fragName,pragmas,moduleExpr)) = let moduleExpr,z = f z moduleExpr in TImplFile(fragName,pragmas,moduleExpr), z
-let foldTImplFile     f z (TImplFile(fragName,pragmas,moduleExpr)) = f z moduleExpr
-#endif
-
-//---------------------------------------------------------------------------
-// Equality relations on locally defined things 
-//---------------------------------------------------------------------------
-
-let local_tcref_eq  (lv1:Tycon) (lv2:Tycon) = lv1.Stamp === lv2.Stamp
-let typar_ref_eq    (lv1:Typar) (lv2:Typar) = lv1.Stamp === lv2.Stamp
-
-
-/// Equality on value specs, implemented as reference equality
-let vspec_eq (lv1: Val) (lv2: Val) = (lv1 === lv2)
-
-/// Equality on CCUs, implemented as reference equality
-let ccu_eq (mv1: ccu) (mv2: ccu) = (mv1 === mv2) || (mv1.Contents === mv2.Contents)
-
-/// Equality on type varialbes, implemented as reference equality
-let tpspec_eq (tp1: Typar) (tp2: Typar) = (tp1 === tp2)
-
-
-let deref_tycon (tcr :TyconRef) = tcr.Deref
-/// Identical to tcref.Deref and deref_tycon, just used to help distinguish what kind of entity we expect here
-let deref_modul (tcr :ModuleOrNamespaceRef) = tcr.Deref
-
-
-let deref_val (vr :ValRef) = vr.Deref
-let (|ValDeref|) (vr :ValRef) = vr.Deref
-let try_deref_val (vr :ValRef) = vr.TryDeref
-
-
-
-//---------------------------------------------------------------------------
-// Get information from refs
-//---------------------------------------------------------------------------
-
-exception InternalUndefinedTyconItem of string * TyconRef * string
-
-type RecdFieldRef with 
-    member x.TyconRef = let (RFRef(tcref,id)) = x in tcref
-    member x.FieldName = let (RFRef(tcref,id)) = x in id
-    member x.Tycon = x.TyconRef.Deref
-    member x.RecdField = 
-        let (RFRef(tcref,id)) = x
-        match tcref.GetFieldByName id with 
-        | Some res -> res
-        | None -> raise (InternalUndefinedTyconItem ("field",tcref, id))
-    member x.PropertyAttribs = x.RecdField.PropertyAttribs
-    member x.Range = x.RecdField.Range
-
-type UnionCaseRef with 
-    member x.TyconRef = let (UCRef(tcref,_)) = x in tcref
-    member x.CaseName = let (UCRef(_,nm)) = x in nm
-    member x.Tycon = x.TyconRef.Deref
-    member x.UnionCase = 
-        let (UCRef(tcref,nm)) = x
-        match tcref.GetUnionCaseByName nm with 
-        | Some res -> res
-        | None -> raise (InternalUndefinedTyconItem ("union case",tcref, nm))
-    member x.Attribs = x.UnionCase.Attribs
-    member x.Range = x.UnionCase.Range
-
-//--------------------------------------------------------------------------
-// Make references to TAST items
-//--------------------------------------------------------------------------
-
-let mk_rfref tcref f = RFRef(tcref, f)
-let mk_ucref tcref c = UCRef(tcref, c)
-let rfref_of_rfield tcref f = mk_rfref tcref f.rfield_id.idText
-let ucref_of_ucase tcref c = mk_ucref tcref c.ucase_id.idText
-let mk_nlpath (NLPath(mref,p)) n = NLPath(mref,Array.append p [| n |])
-let mk_cpath (CompPath(scoref,p)) n modKind = CompPath(scoref,p@[(n,modKind)])
-
-
-
-let path_of_nlpath (NLPath(a,b)) = b
-let ccu_of_nlpath  (NLPath(a,b)) = a
-
-let demangled_name_of_modref    (x:ModuleOrNamespaceRef) = (deref_modul x) |> demangled_name_of_modul 
-
-let nlpath_of_nlref nlr = nlr.nlr_nlpath 
-let item_of_nlref   nlr = nlr.nlr_item
-let ccu_of_nlref    nlr = ccu_of_nlpath (nlpath_of_nlref nlr)
-
-let VRef_private(x) : ValRef = { binding=x; nlr=Unchecked.defaultof<_> }      
-let VRef_nonlocal(x) : ValRef = { binding=Unchecked.defaultof<_>; nlr=x }      
-let VRef_nonlocal_preresolved x xref : ValRef = { binding=x; nlr=xref }      
-let (|VRef_private|VRef_nonlocal|) (x: ValRef) = 
-    match box x.nlr with 
-    | null -> VRef_private(x.binding) 
-    | _ -> VRef_nonlocal(x.nlr)
-
-let ERef_private(x) : EntityRef = { binding=x; nlr=Unchecked.defaultof<_> }      
-let ERef_nonlocal(x) : EntityRef = { binding=Unchecked.defaultof<_>; nlr=x }      
-let ERef_nonlocal_preresolved x xref : EntityRef = { binding=x; nlr=xref }      
-let (|ERef_private|ERef_nonlocal|) (x: EntityRef) = 
-    match box x.nlr with 
-    | null -> ERef_private(x.binding) 
-    | _ -> ERef_nonlocal(x.nlr)
-
-let ccu_of_vref iref =  
-    match iref with 
-    | VRef_private _ -> None
-    | VRef_nonlocal(nlr) -> Some (ccu_of_nlref iref.nlr)
-
-let ccu_of_tcref iref =  
-    match iref with 
-    | ERef_private _ -> None
-    | ERef_nonlocal(nlr) -> Some (ccu_of_nlref iref.nlr)
-
-//--------------------------------------------------------------------------
-// Type parameters and inference unknowns
-//-------------------------------------------------------------------------
-
-let mk_typar_ty (tp:Typar) = 
-    match tp.Kind with 
-    | KindType -> tp.AsType 
-    | KindMeasure -> TType_measure (MeasureVar tp)
-
-let CopyTypar (tp: Typar) = let x = tp.Data in Typar.New { x with typar_stamp=new_stamp() }
-let CopyTypars tps = List.map CopyTypar tps
-
-let fixup_typar_constraints (tp:Typar) cs =
-    tp.Data.typar_constraints <-  cs
-
-
-//--------------------------------------------------------------------------
-// Inference variables
-//-------------------------------------------------------------------------- 
-
-let tpref_is_solved (r:Typar) = 
-    match r.Solution with 
-    | None -> false
-    | _ -> true
-
-    
-let try_shortcut_solved_upref canShortcut (r:Typar) = 
-    if r.Kind = KindType then failwith "try_shortcut_solved_upref: kind=type";
-    match r.Solution with
-    | Some (TType_measure unt) -> 
-        if canShortcut then 
-            match unt with 
-            | MeasureVar r2 -> 
-               match r2.Solution with
-               | None -> ()
-               | Some res as soln -> 
-                  r.Data.typar_solution <- soln;
-            | _ -> () 
-        unt
-    | _ -> 
-        failwith "try_shortcut_solved_upref: unsolved"
-      
-
-let rec strip_upeqnsA canShortcut measure = 
-    match measure with 
-    | MeasureVar r when tpref_is_solved r -> strip_upeqnsA canShortcut (try_shortcut_solved_upref canShortcut r)
-    | _ -> measure
-
-let rec strip_tpeqnsA canShortcut ty = 
-    match ty with 
-    | TType_var r -> 
-        match r.Solution with
-        | Some soln -> 
-            if canShortcut then 
-                match soln with 
-                // We avoid shortcutting when there are additional constraints on the type variable we're trying to cut out
-                // This is only because IterType likes to walk _all_ the constraints _everywhere_ in a type, including
-                // those attached to _solved_ type variables. In an ideal world this would never be needed - see the notes
-                // on IterType.
-                | TType_var r2 when r2.Constraints.IsEmpty -> 
-                   match r2.Solution with
-                   | None -> ()
-                   | Some res as soln2 -> 
-                      r.Data.typar_solution <- soln2;
-                | _ -> () 
-            strip_tpeqnsA canShortcut soln
-        | None -> 
-            ty
-    | TType_measure measure -> 
-        TType_measure (strip_upeqnsA canShortcut measure)
-    | _ -> ty
-
-let strip_tpeqns ty = strip_tpeqnsA false ty
-let strip_upeqns measure = strip_upeqnsA false measure
-
-//--------------------------------------------------------------------------
-// Construct local references
-//-------------------------------------------------------------------------- 
-
-
-let mk_nlr mp id = {nlr_nlpath = mp; nlr_item=id }
-let mk_local_tcref x = ERef_private x
-let mk_nonlocal_tcref mp id = ERef_nonlocal (mk_nlr mp id)
-let mk_nonlocal_vref mp id = VRef_nonlocal (mk_nlr mp id)
-let mk_nonlocal_tcref_preresolved x mp id = ERef_nonlocal_preresolved x (mk_nlr mp id)
-let mk_nonlocal_vref_preresolved x mp id = VRef_nonlocal_preresolved x (mk_nlr mp id)
-
-//--------------------------------------------------------------------------
-// From Ref_private to Ref_nonlocal when exporting data.
-//--------------------------------------------------------------------------
-
-let enclosing_nlpath_of_pubpath viewedCcu (PubPath(p,nm)) = NLPath(viewedCcu, p)
-let nlpath_of_pubpath viewedCcu (PubPath(p,nm)) = NLPath(viewedCcu,Array.append p [| nm |])
-let nlpath_of_modul viewedCcu (v:ModuleOrNamespace) = v.PublicPath |> Option.map (nlpath_of_pubpath viewedCcu)
-
-let nlref_of_pubpath viewedCcu (PubPath(p,nm) as pubpath) x = 
-    mk_nlr (enclosing_nlpath_of_pubpath viewedCcu pubpath) nm
-
-let rescope_val_pubpath viewedCcu pubpath x : ValRef = VRef_nonlocal (nlref_of_pubpath viewedCcu pubpath x)
-let rescope_tycon_pubpath viewedCcu pubpath x : TyconRef = ERef_nonlocal (nlref_of_pubpath viewedCcu pubpath x)
-
-//---------------------------------------------------------------------------
-// Equality between TAST items.
-//---------------------------------------------------------------------------
-
-let vref_in_this_assembly compilingFslib (x: ValRef) = 
-    match x with 
-    | VRef_private _ -> true
-    | VRef_nonlocal _ -> compilingFslib
-
-let tcref_in_this_assembly compilingFslib (x: TyconRef) = 
-    match x with 
-    | ERef_private _ -> true
-    | ERef_nonlocal _ -> compilingFslib
-
-let array_path_eq (y1:string[]) (y2:string[]) =
-    let len1 = y1.Length 
-    let len2 = y2.Length 
-    (len1 = len2) && 
-    (let rec loop i = (i >= len1) || (y1.[i] = y2.[i] && loop (i+1)) 
-     loop 0)
-
-let nlpath_eq (NLPath(x1,y1) as smr1) (NLPath(x2,y2) as smr2) = 
-    smr1 === smr2 || (ccu_eq x1 x2 && array_path_eq y1 y2)
-
-/// This predicate tests if non-local resolution paths are definitely known to resolve
-/// to different entities. All references with different named paths always resolve to 
-/// different entities. Two references with the same named paths may resolve to the same 
-/// entities even if they reference through different CCUs, because one reference
-/// may be forwarded to another via a .NET TypeForwarder.
-let nlpath_definitely_not_eq (NLPath(x1,y1)) (NLPath(x2,y2) as smr2) = 
-    not (array_path_eq y1 y2)
-
-let nlref_eq nlr1 nlr2 = 
-    (nlr1 === nlr2 ) || 
-    (nlpath_eq nlr1.nlr_nlpath nlr2.nlr_nlpath && 
-     (nlr1.nlr_item === nlr2.nlr_item  || nlr1.nlr_item  = nlr2.nlr_item))
-
-/// See nlpath_definitely_not_eq
-let nlref_definitely_not_eq nlr1 nlr2 = 
-    (nlpath_definitely_not_eq nlr1.nlr_nlpath nlr2.nlr_nlpath || nlr1.nlr_item <> nlr2.nlr_item)
-
-/// Compiler-internal references to items in fslib are generated as Ref_nonlocal even when compiling fslib 
-let fslib_nlpath_eq_pubpath nlr (PubPath(path,nm)) = 
-    nlr.nlr_item = nm  &&
-    let (NLPath(ccu,p)) = nlr.nlr_nlpath 
-    if (array_path_eq p path) then true 
-    else ( (* warning(Failure(sprintf "%s <> %s" (text_of_arr_path p) (text_of_arr_path path))); *) false)
-
-let fslib_refs_eq ppF namef (|Ref_private|Ref_nonlocal|) fslibCcu x y  =
-    match x,y with 
-    | (Ref_nonlocal nlr, Ref_private x)
-    | (Ref_private x, Ref_nonlocal nlr) ->
-        ccu_eq (ccu_of_nlpath nlr.nlr_nlpath) fslibCcu &&
-        let pubpathOpt = ppF x 
-        isSome pubpathOpt && fslib_nlpath_eq_pubpath nlr (Option.get pubpathOpt)
-    | (Ref_private x, Ref_private y) ->
-        let pubpathOpt1 = ppF x 
-        let pubpathOpt2 = ppF y 
-        isSome pubpathOpt1 && isSome pubpathOpt2 && pubpathOpt1 = pubpathOpt2
-    | _ -> false
-  
-let prim_tcref_eq compilingFslib fslibCcu (x : TyconRef) (y : TyconRef) = 
-    x === y ||
-    match x.IsResolved,y.IsResolved with 
-    | true, true when not compilingFslib -> x.ResolvedTarget === y.ResolvedTarget 
-    | _ -> 
-    match x.IsLocalRef,y.IsLocalRef with 
-    | false, false when 
-        (// Two tcrefs with identical paths are always equal
-         nlref_eq x.nlr y.nlr || 
-         // The tcrefs may have forwarders. If they may possibly be equal then resolve them to get their canonical references
-         // and compare those using pointer equality.
-         (not (nlref_definitely_not_eq x.nlr y.nlr) && x.Deref === y.Deref)) -> 
-        true
-    | _ -> 
-        compilingFslib && fslib_refs_eq pubpath_of_tycon (fun (tc:Tycon) -> tc.MangledName) (|ERef_private|ERef_nonlocal|) fslibCcu x y  
-
-let prim_ucref_eq compilingFslib fslibCcu (UCRef(tcr1,c1) as uc1) (UCRef(tcr2,c2) as uc2) = 
-    uc1 === uc2 || (prim_tcref_eq compilingFslib fslibCcu tcr1 tcr2 && c1 = c2)
-
-let prim_vref_eq compilingFslib fslibCcu (x : ValRef) (y : ValRef) =
-    x === y ||
-    match x.IsResolved,y.IsResolved with 
-    | true, true when x.ResolvedTarget === y.ResolvedTarget -> true
-    | _ -> 
-    match x.IsLocalRef,y.IsLocalRef with 
-    | true,true when vspec_eq x.PrivateTarget y.PrivateTarget -> true
-    | false,false when nlref_eq x.nlr y.nlr -> true
-    | _ -> compilingFslib && fslib_refs_eq pubpath_of_val  name_of_val (|VRef_private|VRef_nonlocal|) fslibCcu x y
- 
-//---------------------------------------------------------------------------
-// pubpath/cpath mess
-//---------------------------------------------------------------------------
-
-#if STANDALONE_METADATA
-#else
-let GetNameOfScopeRef sref = 
-    match sref with 
-    | ScopeRef_local -> ""
-    | ScopeRef_module mref -> mref.Name
-    | ScopeRef_assembly aref -> aref.Name
-let mangled_text_of_cpath (CompPath(scoref,path)) = GetNameOfScopeRef scoref ^"/"^ text_of_path (List.map fst path)
-let string_of_access (TAccess paths) = String.concat ";" (List.map mangled_text_of_cpath paths)
-#endif
-  
-let mangled_path_of_cpath (CompPath(scoref,path))  = List.map fst path
-let pubpath_of_cpath (id:ident) cpath = PubPath(Array.of_list (mangled_path_of_cpath cpath),id.idText)
-
-let demangled_path_of_cpath (CompPath(scoref,path)) = 
-    path |> List.map (fun (nm,k) -> demangled_name_of_entity_name nm k)
-
-let parent_cpath (CompPath(scoref,cpath)) = 
-    let a,b = List.frontAndBack cpath 
-    CompPath(scoref,a)
-
-let full_cpath_of_modul (m:ModuleOrNamespace) = 
-    let (CompPath(scoref,cpath))  = m.CompilationPath
-    CompPath(scoref,cpath@[(m.MangledName, m.ModuleOrNamespaceType.ModuleOrNamespaceKind)])
-
-// Can cpath2 be accessed given a right to access cpath1. That is, is cpath2 a nested type or namespace of cpath1. Note order of arguments.
-let can_access_cpath_from (CompPath(scoref1,cpath1)) (CompPath(scoref2,cpath2)) =
-    let rec loop p1 p2  = 
-        match p1,p2 with 
-        | (a1,k1)::rest1, (a2,k2)::rest2 -> (a1=a2) && (k1=k2) && loop rest1 rest2
-        | [],_ -> true 
-        | _ -> false // cpath1 is longer
-    loop cpath1 cpath2 &&
-    (scoref1 = scoref2)
-
-let can_access_cpath_from_one_of cpaths cpathTest =
-    List.exists (fun cpath -> can_access_cpath_from cpath cpathTest) cpaths
-
-let can_access_from (TAccess x) cpath = 
-    x |> List.forall (fun cpath1 -> can_access_cpath_from cpath1 cpath)
-
-let can_access_from_everywhere (TAccess x) = x.IsEmpty
-let can_access_from_somewhere (TAccess x) = true
-let IsLessAccessible (TAccess aa) (TAccess bb)  = 
-   (* not (ListSet.isSubsetOf (=) aa bb) *)
-    not (aa |> List.forall(fun a -> bb |> List.exists (fun b -> can_access_cpath_from a b)))
-
-/// Given (newPath,oldPath) replace oldPath by newPath in the TAccess.
-let access_subst_paths (newPath,oldPath) (TAccess paths) =
-    let subst cpath = if cpath=oldPath then newPath else cpath
-    TAccess (List.map subst paths)
-
-let cpath_of_ccu (ccu:ccu) = CompPath(ccu.ILScopeRef,[]) 
-let nlpath_of_ccu ccu = NLPath(ccu,[| |]) 
-let taccessPublic = TAccess []
-
-//---------------------------------------------------------------------------
-// Construct TAST nodes
-//---------------------------------------------------------------------------
-
-let SkipFreeVarsCache() = ()
-let SkipCacheCompute (cache:SkipFreeVarsCache) f = f()
-
-let NewFreeVarsCache() = new_cache ()
-
-let MakeUnionCasesTable ucs = 
-    { ucases_by_index = Array.of_list ucs; 
-      ucases_by_name = NameMap.of_keyed_list (fun uc -> uc.DisplayName) ucs }
-                                                                  
-let MakeRecdFieldsTable ucs = 
-    { rfields_by_index = Array.of_list ucs; 
-      rfields_by_name = ucs  |> NameMap.of_keyed_list (fun rfld -> rfld.Name) }
-                                                                  
-
-let MakeUnionCases ucs = 
-    { funion_ucases=MakeUnionCasesTable ucs; 
-#if STANDALONE_METADATA
-#else
-      funion_ilx_repr=new_cache()
-#endif
-    }
-let MakeUnionRepr ucs = TFiniteUnionRepr (MakeUnionCases ucs)
-
-
-let new_ccu nm x  : ccu = CcuThunk.Create(nm,x)
-
-let NewTypar (kind,rigid,Typar(id,staticReq,isCompGen),isFromError,dynamicReq,attribs) = 
-    Typar.New
-      { typar_id = id; 
-        typar_stamp = new_stamp(); 
-        typar_flags= TyparFlags.encode (kind,rigid,isFromError,isCompGen,staticReq,dynamicReq); 
-        typar_attribs= attribs; 
-        typar_solution = None;
-        typar_constraints=[];
-        typar_xmldoc = emptyXmlDoc; (* todo *) } 
-
-let mk_rigid_typar nm m = NewTypar (KindType,TyparRigid,Typar(mksyn_id m nm,NoStaticReq,true),false,DynamicReq,[])
-let new_tcaug () =  { tcaug_compare=None; 
-                      tcaug_compare_withc=None; 
-                      tcaug_equals=None; 
-                      tcaug_structural_hash=None;
-                      tcaug_hash_and_equals_withc=None; 
-                      tcaug_hasObjectGetHashCode=false; 
-                      tcaug_adhoc=NameMultiMap.empty; 
-                      tcaug_super=None;
-                      tcaug_implements=[]; 
-                      tcaug_closed=false; 
-                      tcaug_abstract=false; }
-
-let combineAccess (TAccess a1) (TAccess a2) = TAccess(a1@a2)
-
-let NewUnionCase id nm tys rty attribs docOption vis = 
-    { ucase_id=id;
-      ucase_il_name=nm;
-      ucase_xmldoc=docOption;
-      ucase_access=vis;
-      ucase_rfields = MakeRecdFieldsTable tys;
-      ucase_rty = rty;
-      ucase_attribs=attribs } 
-
-let set_tcaug_compare              tcaug x = tcaug.tcaug_compare              <- Some x
-let set_tcaug_compare_withc   tcaug x = tcaug.tcaug_compare_withc   <- Some x
-let set_tcaug_equals               tcaug x = tcaug.tcaug_equals               <- Some x
-let set_tcaug_hash_and_equals_withc tcaug x = tcaug.tcaug_hash_and_equals_withc <- Some x
-let set_tcaug_hasObjectGetHashCode tcaug b = tcaug.tcaug_hasObjectGetHashCode <- b
-
-
-let NewModuleOrNamespaceType mkind tycons vals = 
-    new ModuleOrNamespaceType(mkind, NameMap.of_keyed_list name_of_val vals, NameMap.of_keyed_list (fun (tc:Tycon) -> tc.MangledName) tycons)
-
-let empty_mtype mkind = NewModuleOrNamespaceType mkind [] []
-
-
-let NewExn cpath (id:ident) vis repr attribs doc = 
-    let id = mksyn_id id.idRange (mangle_exception_name id.idText)
-    Tycon.New "exnc"
-      { entity_stamp=new_stamp();
-        entity_attribs=attribs;
-        entity_kind=KindType;
-        entity_name=id.idText;
-        entity_range=id.idRange;
-        entity_exn_info= repr;
-        entity_tycon_tcaug=new_tcaug();
-        entity_xmldoc=doc;
-        entity_pubpath=cpath |> Option.map (pubpath_of_cpath id);
-        entity_accessiblity=vis;
-        entity_tycon_repr_accessibility=vis;
-        entity_modul_contents = notlazy (empty_mtype FSharpModule);
-        entity_cpath= cpath;
-        entity_typars=LazyWithContext<_,_>.NotLazy [];
-        entity_tycon_abbrev = None;
-        entity_tycon_repr = None;
-        entity_uses_prefix_display=false; (* REVIEW, though note these are not generic anyway *)
-        entity_is_modul_or_namespace = false;
-        entity_il_repr_cache= new_cache() ;  } 
-
-let NewRecdField  stat konst id ty isMutable pattribs fattribs docOption vis secret =
-    { rfield_mutable=isMutable;
-      rfield_pattribs=pattribs;
-      rfield_fattribs=fattribs;
-      rfield_type=ty;
-      rfield_static=stat;
-      rfield_const=konst;
-      rfield_access = vis;
-      rfield_secret = secret;
-      rfield_xmldoc = docOption; 
-      rfield_id=id; }
-
-    
-let NewTycon cpath (nm,m) vis repr_vis kind typars docOption preferPostfix mtyp =
-    let stamp = new_stamp() 
-    Tycon.New "tycon"
-      { entity_stamp=stamp;
-        entity_name=nm;
-        entity_kind=kind;
-        entity_range=m;
-        entity_uses_prefix_display=preferPostfix;
-        entity_attribs=[];
-        entity_typars=typars;
-        entity_tycon_abbrev = None;
-        entity_tycon_repr = None;
-        entity_tycon_repr_accessibility = repr_vis;
-        entity_exn_info=TExnNone;
-        entity_tycon_tcaug=new_tcaug();
-        entity_modul_contents = mtyp;
-        entity_accessiblity=vis;
-        entity_xmldoc = docOption;
-        entity_pubpath=cpath |> Option.map (pubpath_of_cpath (mksyn_id m nm));
-        entity_cpath = cpath;
-        entity_is_modul_or_namespace =false;
-        entity_il_repr_cache = new_cache(); }
-
-let NewILTycon nlpath id tps (scoref,enc,tdef) mtyp =
-    let tycon = NewTycon nlpath id taccessPublic taccessPublic KindType tps emptyXmlDoc true mtyp 
-    tycon.Data.entity_tycon_repr <- Some (TILObjModelRepr (scoref,enc,tdef));
-    tycon.TypeContents.tcaug_closed <- true;
-    tycon
-
-exception Duplicate of string * string * range
-exception NameClash of string * string * string * range * string * string * range
-exception FullAbstraction of string * range
-
-let mk_namemap s (idf: _ -> ident) items = 
-    (items,NameMap.empty) ||> List.foldBack (fun item sofar -> 
-        let id = idf item 
-        if NameMap.mem id.idText sofar then raise (Duplicate(s,id.idText,id.idRange));
-        NameMap.add id.idText item sofar) 
-
-let mk_tycon_namemap     = mk_namemap "type"      id_of_tycon
-let mk_exnconstr_namemap = mk_namemap "exception" id_of_tycon
-let mk_val_namemap       = mk_namemap "value"     id_of_val
-
-let NewModuleOrNamespace cpath vis (id:ident) xml attribs mtype = 
-    let stamp = new_stamp() 
-    // Put the module suffix on if needed 
-    Tycon.New "mspec"
-      { entity_name=id.idText;
-        entity_range = id.idRange;
-        entity_stamp=stamp;
-        entity_kind=KindType;
-        entity_modul_contents = mtype;
-        entity_uses_prefix_display=false; 
-        entity_is_modul_or_namespace =true;
-        entity_typars=LazyWithContext<_,_>.NotLazy [];
-        entity_tycon_abbrev = None;
-        entity_tycon_repr = None;
-        entity_tycon_repr_accessibility = vis;
-        entity_exn_info=TExnNone;
-        entity_tycon_tcaug=new_tcaug();
-        entity_pubpath=cpath |> Option.map (pubpath_of_cpath id);
-        entity_cpath=cpath;
-        entity_accessiblity=vis;
-        entity_attribs=attribs;
-        entity_xmldoc=xml;
-        entity_il_repr_cache = new_cache(); }
-
-let NewVal (id:ident,ty,isMutable,isCompGen,arity,cpathOpt,vis,vrec,specialRepr,baseOrThis,attribs,mustinline,doc,isTopBinding,isExtensionMember,isImplicitCtor,isTyFunc,konst,actualParent) : Val = 
-    let stamp = new_stamp() 
-    if !verboseStamps then dprintf "NewVal, %s#%d\n" id.idText stamp;
-    Val.New
-        { val_stamp = stamp;
-          val_name=id.idText;
-          val_range=id.idRange;
-          val_defn_range=id.idRange;
-          val_defn=None;
-          val_top_repr_info= arity;
-          val_actual_parent= actualParent;
-          val_flags = ValFlags.encode(vrec,baseOrThis,isCompGen,mustinline,isMutable,isTopBinding,isExtensionMember,isImplicitCtor,isTyFunc);
-          val_pubpath= cpathOpt |> Option.map (pubpath_of_cpath id);
-          val_const= konst;
-          val_access=vis;
-          val_member_info=specialRepr;
-          val_attribs=attribs;
-          val_type = ty;
-          val_xmldoc = doc; } 
-
-
-let NewCcuContents sref m nm mty =
-    NewModuleOrNamespace (Some(CompPath(sref,[]))) taccessPublic (mksyn_id m nm) emptyXmlDoc [] (notlazy mty)
-      
-
-//--------------------------------------------------------------------------
-// Cloning and adjusting
-//--------------------------------------------------------------------------
- 
-/// Create a tycon based on an existing one using the function 'f'. 
-/// We require that we be given the new parent for the new tycon. 
-/// We pass the new tycon to 'f' in case it needs to reparent the 
-/// contents of the tycon. 
-let NewModifiedTycon f (orig:Tycon) = 
-    let stamp = new_stamp() 
-    let data = orig.Data 
-    if !verboseStamps then dprintf "NewModifiedTycon, %s#%d, based on %s#%d\n" orig.MangledName stamp orig.MangledName data.entity_stamp;
-    Tycon.New "NewModifiedTycon" (f { data with entity_stamp=stamp; }) 
-    
-/// Create a module Tycon based on an existing one using the function 'f'. 
-/// We require that we be given the parent for the new module. 
-/// We pass the new module to 'f' in case it needs to reparent the 
-/// contents of the module. 
-let NewModifiedModuleOrNamespace f orig = 
-    orig |> NewModifiedTycon (fun d -> 
-        { d with entity_modul_contents = notlazy (f (d.entity_modul_contents.Force())) }) 
-
-/// Create a Val based on an existing one using the function 'f'. 
-/// We require that we be given the parent for the new Val. 
-let NewModifiedVal f (orig:Val) = 
-    let data = orig.Data
-    let stamp = new_stamp() 
-    if !verboseStamps then dprintf "NewModifiedVal, stamp #%d, based on stamp #%d\n" stamp data.val_stamp;
-    let data' = f { data with val_stamp=stamp }
-    Val.New data'
-
-let NewClonedModuleOrNamespace orig =  NewModifiedModuleOrNamespace (fun mty -> mty) orig
-let NewClonedTycon orig =  NewModifiedTycon (fun d -> d) orig
-
-//------------------------------------------------------------------------------
-
-/// Combine module types when multiple namespace fragments contribute to the
-/// same namespace, making new module specs as we go.
-let private combine_maps f m1 m2 = 
-    Map.foldBack (fun k v acc -> Map.add k (if Map.contains k m2 then f [v;Map.find k m2] else f [v]) acc) m1 
-      (Map.foldBack (fun k v acc -> if Map.contains k m1 then acc else Map.add k (f [v]) acc) m2 Map.empty)
-
-
-let rec private combine_msigtyps path m (mty1:ModuleOrNamespaceType)  (mty2:ModuleOrNamespaceType)  = 
-    match mty1.ModuleOrNamespaceKind,mty2.ModuleOrNamespaceKind  with 
-    | Namespace,Namespace -> 
-        let kind = mty1.ModuleOrNamespaceKind
-        let entities = combine_maps (combine_entitiesl path) mty1.AllEntities mty2.AllEntities 
-        let vals = combine_maps (function [] -> failwith "??" | [v] -> v | (v:Val) :: _ -> errorR(Error( sprintf "two values named '%s' occur in namespace '%s' in two parts of this assembly" v.MangledName (text_of_path path),v.Range)); v) mty1.AllValuesAndMembers mty2.AllValuesAndMembers 
-        new ModuleOrNamespaceType(kind, vals, entities)
-    | Namespace, _ | _,Namespace -> error(Error(sprintf "a namespace and a module named '%s' both occur in two parts of this assembly" (text_of_path path),m))
-    | _-> error(Error(sprintf "two modules named '%s' occur in two parts of this assembly" (text_of_path path),m))
-
-and private combine_entitiesl path l = 
-    match l with
-    | h :: t -> List.fold (combine_entites path) h t
-    | _ -> failwith "combine_entitiesl"
-
-and private combine_entites path (tycon1:Entity) (tycon2:Entity) = 
-
-    match tycon1.IsModuleOrNamespace, tycon2.IsModuleOrNamespace with
-    | true,true -> 
-        tycon1 |> NewModifiedTycon (fun data1 -> 
-                    { data1 with 
-                         entity_xmldoc = MergeXmlDoc tycon1.XmlDoc tycon2.XmlDoc;
-                         entity_attribs = tycon1.Attribs @ tycon2.Attribs;
-                         entity_modul_contents=lazy (combine_msigtyps (path@[demangled_name_of_modul tycon2]) tycon2.Range tycon1.ModuleOrNamespaceType tycon2.ModuleOrNamespaceType); }) 
-    | false,false -> 
-        error(Error( sprintf "two type definitions named '%s' occur in namespace '%s' in two parts of this assembly" tycon2.MangledName (text_of_path path),tycon2.Range))
-    | _,_ -> 
-        error(Error( sprintf "a module and a type definition named '%s' occur in namespace '%s' in two parts of this assembly" tycon2.MangledName (text_of_path path),tycon2.Range))
-    
-and combine_mtyps path m l = 
-    match l with
-    | h :: t -> List.fold (combine_msigtyps path m) h t
-    | _ -> failwith "combine_mtyps"
-
-//--------------------------------------------------------------------------
-// Resource format for pickled data
-//--------------------------------------------------------------------------
-
-let FSharpOptimizationDataResourceName = "FSharpOptimizationData"
-let FSharpSignatureDataResourceName = "FSharpSignatureData"
-
-
-#if STANDALONE_METADATA
-
-type TcGlobals = 
-    { nativeptr_tcr:TyconRef;
-      nativeint_tcr:TyconRef;
-      byref_tcr:TyconRef;
-      il_arr1_tcr:TyconRef;
-      il_arr2_tcr:TyconRef;
-      il_arr3_tcr:TyconRef;
-      il_arr4_tcr:TyconRef;
-      unit_tcr:TyconRef; }
-
-let mk_nativeptr_typ g ty = TType_app (g.nativeptr_tcr, [ty])
-let mk_byref_typ g ty = TType_app (g.byref_tcr, [ty])
-let mk_unit_typ g = TType_app (g.unit_tcr, [])
-let mk_nativeint_typ g = TType_app (g.nativeint_tcr, [])
-
-let mk_multi_dim_array_typ g n ty = 
-    if n = 1 then TType_app (g.il_arr1_tcr, [ty]) 
-    elif n = 2 then TType_app (g.il_arr2_tcr, [ty]) 
-    elif n = 3 then TType_app (g.il_arr3_tcr, [ty]) 
-    elif n = 4 then TType_app (g.il_arr4_tcr, [ty]) 
-    else failwith "F# supports a maxiumum .NET array dimension of 4"
-
-
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/tastops.ml b/tools/FSharp_1.9.6.16/source/fsharp/tastops.ml
deleted file mode 100644
index fef0869d..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/tastops.ml
+++ /dev/null
@@ -1,8134 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#light
-
-/// Derived expression manipulation and construction functions.
-module (* internal *) Microsoft.FSharp.Compiler.Tastops 
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX 
-open Microsoft.FSharp.Compiler 
-
-module Illib = Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-module Ilprint = Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter 
-
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.Layout
-open Microsoft.FSharp.Compiler.PrettyNaming
-
-//---------------------------------------------------------------------------
-// Standard orderings, e.g. for order set/map keys
-//---------------------------------------------------------------------------
-
-let val_spec_order (v1:Val) (v2:Val) = compare v1.Stamp v2.Stamp
-let tycon_spec_order  (tc1:Tycon) (tc2:Tycon) = compare tc1.Stamp tc2.Stamp 
-let rfref_order  (RFRef(tcref1,nm1)) (RFRef(tcref2,nm2)) = 
-    let c = tycon_spec_order (deref_tycon tcref1) (deref_tycon tcref2) 
-    if c <> 0 then c else 
-    compare nm1 nm2
-
-let ucref_order  (UCRef(tcref1,nm1)) (UCRef(tcref2,nm2)) = 
-    let c = tycon_spec_order (deref_tycon tcref1) (deref_tycon tcref2) 
-    if c <> 0 then c else 
-    compare nm1 nm2
-
-//---------------------------------------------------------------------------
-// Make some common types
-//---------------------------------------------------------------------------
-
-let mk_fun_ty d r = TType_fun (d,r)
-let (-->) d r = mk_fun_ty d r
-let mk_forall_ty d r = TType_forall (d,r)
-let try_mk_forall_ty d r = if isNil d then r else mk_forall_ty d r
-let (+->) d r = try_mk_forall_ty d r
-let mk_tuple_ty l = TType_tuple l
-let mk_iterated_fun_ty dl r = List.foldBack (-->) dl r
-
-let fake_mk_tupled_ty m tys = 
-    match tys with 
-    | [] -> error(InternalError("fake_mk_tupled_ty",m))
-    | [h] -> h 
-    | _ -> mk_tuple_ty tys
-
-let type_of_lambda_arg m vs = fake_mk_tupled_ty m (types_of_vals vs)
-let mk_multi_lambda_ty m vs rty = mk_fun_ty (type_of_lambda_arg m vs) rty 
-let mk_lambda_ty tps tys rty = try_mk_forall_ty tps (mk_iterated_fun_ty tys rty)
-
-/// When compiling FSharp.Core.dll we have to deal with the non-local references into
-/// the library arising from env.ml. Part of this means that we have to be able to resolve these
-/// references. This function artificially forces the existence of a module or namespace at a 
-/// particular point in order to do this.
-let ensure_fslib_has_submodul_at (ccu:ccu) path (CompPath(_,cpath)) xml =
-    let scoref = ccu.ILScopeRef 
-    let rec loop prior_cpath (path:ident list) cpath (modul:ModuleOrNamespace) =
-        let mtype = modul.ModuleOrNamespaceType 
-        match path,cpath with 
-        | (hpath::tpath),((_,mkind)::tcpath)  -> 
-            let modName = hpath.idText 
-            if not (Map.mem modName mtype.AllEntities) then 
-                let smodul = NewModuleOrNamespace (Some(CompPath(scoref,prior_cpath))) taccessPublic hpath xml [] (notlazy (empty_mtype mkind))
-                mtype.AddModuleOrNamespaceByMutation(smodul);
-            let modul = Map.find modName mtype.AllEntities 
-            loop (prior_cpath@[(modName,Namespace)]) tpath tcpath modul 
-
-        | _ -> () 
-
-    loop [] path cpath ccu.Contents
-
-
-//---------------------------------------------------------------------------
-// Primitive destructors
-//---------------------------------------------------------------------------
-
-/// Look through the TExpr_link nodes arising from type inference
-let rec strip_expr e = 
-    match e with 
-    | TExpr_link eref -> strip_expr !eref
-    | _ -> e    
-
-let discrim_of_case (TCase(d,_)) = d
-let dest_of_case (TCase(_,d)) = d
-let mk_case (a,b) = TCase(a,b)
-
-let is_tuple e = match e with TExpr_op(TOp_tuple,_,_,_) -> true | _ -> false
-let try_dest_tuple e = match e with TExpr_op(TOp_tuple,_,es,_) -> es | _ -> [e]
-
-//---------------------------------------------------------------------------
-// Debug info for expressions
-//---------------------------------------------------------------------------
-
-let rec range_of_expr x =
-  match x with
-  | TExpr_val (_,_,m) | TExpr_op (_,_,_,m)   | TExpr_const (_,m,_) | TExpr_quote (_,_,m,_)
-  | TExpr_obj (_,_,_,_,_,_,m,_) | TExpr_app(_,_,_,_,m) | TExpr_seq (_,_,_,_,m) 
-  | TExpr_static_optimization (_,_,_,m) | TExpr_lambda (_,_,_,_,m,_,_) 
-  | TExpr_tlambda (_,_,_,m,_,_)| TExpr_tchoose (_,_,m) | TExpr_letrec (_,_,m,_) | TExpr_let (_,_,m,_) | TExpr_match (_,_,_,_,m,_,_)
-    -> m
-  | TExpr_link(eref) -> range_of_expr !eref
-
-//---------------------------------------------------------------------------
-// Build nodes in decision graphs
-//---------------------------------------------------------------------------
-
-
-let prim_mk_match(spBind,exprm,tree,targets,matchm,ty) = TExpr_match (spBind,exprm,tree,targets,matchm,ty,SkipFreeVarsCache())
-
-type MatchBuilder(spBind,inpRange: Range.range) = 
-
-    let targets = new ResizeArray<_>(10) 
-    member x.AddTarget(tg) = 
-        let n = targets.Count 
-        targets.Add(tg);
-        n
-
-    member x.AddResultTarget(e,spTarget) = TDSuccess(FlatList.empty, x.AddTarget(TTarget(FlatList.empty,e,spTarget)))
-
-    member x.CloseTargets() = targets |> ResizeArray.to_list
-
-    member x.Close(dtree,m,ty) = prim_mk_match  (spBind,inpRange,dtree,ResizeArray.to_array targets,m,ty)
-
-let mk_bool_switch m g t e = TDSwitch(g,[TCase(TTest_const(TConst_bool(true)),t)],Some e,m)
-
-let mk_cond spBind spTarget m ty e1 e2 e3 = 
-    let mbuilder = new MatchBuilder(spBind,m)
-    let dtree = mk_bool_switch m e1 (mbuilder.AddResultTarget(e2,spTarget)) (mbuilder.AddResultTarget(e3,spTarget)) 
-    mbuilder.Close(dtree,m,ty)
-
-//---------------------------------------------------------------------------
-// These make local/non-local references to values according to whether
-// the item is globally stable ("published") or not.
-//---------------------------------------------------------------------------
-
-let mk_local_vref   (v:Val) = VRef_private v
-let mk_local_modref (v:ModuleOrNamespace) = ERef_private v
-let mk_local_tcref  (v:Tycon) = ERef_private v
-let mk_local_ecref  (v:Tycon) = ERef_private v
-
-let mk_nonlocal_ccu_top_tcref ccu (x:Tycon) = mk_nonlocal_tcref_preresolved x (nlpath_of_ccu ccu) x.MangledName
-
-let mk_vref_in_modref  (cref:TyconRef) (x:Val) : ValRef = 
-    match cref with 
-    | ERef_private _ -> mk_local_vref x
-    | ERef_nonlocal nlr ->
-        let (NLPath(ccu,p)) = nlr.nlr_nlpath 
-        mk_nonlocal_vref_preresolved x (NLPath(ccu, Array.append p [| nlr.nlr_item |])) x.MangledName
-
-let MakeNestedTcref (cref:TyconRef) (x:Entity) : TyconRef  = 
-    match cref with 
-    | ERef_private _ -> mk_local_tcref x
-    | ERef_nonlocal nlr ->
-        let (NLPath(ccu,p)) = nlr.nlr_nlpath 
-        mk_nonlocal_tcref_preresolved x (NLPath(ccu, Array.append p [| nlr.nlr_item |])) x.MangledName
-
-let mk_rfref_in_tcref (x:ModuleOrNamespaceRef) tycon (rf:ident) : RecdFieldRef = mk_rfref (MakeNestedTcref x tycon) rf.idText 
-
-//---------------------------------------------------------------------------
-// Primitive constructors
-//---------------------------------------------------------------------------
-
-let expr_for_vref m vref =  TExpr_val(vref,NormalValUse,m)
-let expr_for_val m v =  expr_for_vref m (mk_local_vref v)
-let gen_mk_local m s ty mut compgen =
-    let thisv = NewVal(ident(s,m),ty,mut,compgen,None,None,taccessPublic,ValNotInRecScope,None,NormalVal,[],OptionalInline,emptyXmlDoc,false,false,false,false,None,ParentNone) 
-    thisv,expr_for_val m thisv
-
-let mk_local         m s ty = gen_mk_local m s ty Immutable false
-let mk_compgen_local m s ty = gen_mk_local m s ty Immutable true
-let mk_mut_compgen_local m s ty = gen_mk_local m s ty Mutable true
-
-
-(* Type gives return type.  For type-lambdas this is the formal return type. *)
-let mk_multi_lambda m vs (b,rty) = TExpr_lambda (new_uniq(), None,vs,b,m, rty, SkipFreeVarsCache())
-let mk_basev_multi_lambda m basevopt vs (b,rty) = TExpr_lambda (new_uniq(), basevopt,vs,b,m, rty, SkipFreeVarsCache())
-let mk_lambda m v (b,rty) = mk_multi_lambda m [v] (b,rty)
-let mk_tlambda m vs (b,tau_ty) = match vs with [] -> b | _ -> TExpr_tlambda (new_uniq(), vs,b,m,tau_ty, SkipFreeVarsCache())
-let mk_tchoose m vs b = match vs with [] -> b | _ -> TExpr_tchoose (vs,b,m)
-
-let mk_obj_expr (ty,basev,basecall,overrides,iimpls,m) = 
-    TExpr_obj (new_uniq(),ty,basev,basecall,overrides,iimpls,m,SkipFreeVarsCache()) 
-
-let mk_lambdas m tps (vs:Val list) (b,rty) = 
-  mk_tlambda m tps (List.foldBack (fun v (e,ty) -> mk_lambda m v (e,ty), v.Type --> ty) vs (b,rty))
-let mk_multi_lambdas_core m vsl (b,rty) = 
-  List.foldBack (fun v (e,ty) -> mk_multi_lambda m v (e,ty), type_of_lambda_arg m v --> ty) vsl (b,rty)
-let mk_multi_lambdas m tps vsl (b,rty) = 
-  mk_tlambda m tps (mk_multi_lambdas_core m vsl (b,rty) )
-
-let mk_basev_multi_lambdas_core m basevopt vsl (b,rty) = 
-    match basevopt with
-    | None -> mk_multi_lambdas_core m vsl (b,rty)
-    | _ -> 
-        match vsl with 
-        | [] -> error(InternalError("mk_basev_multi_lambdas_core: can't attach a basev to a non-lambda expression",m))
-        | h::t -> 
-            let b,rty = mk_multi_lambdas_core m t (b,rty)
-            (mk_basev_multi_lambda m basevopt h (b,rty), (type_of_lambda_arg m h --> rty))
-        
-let mk_basev_multi_lambdas m tps basevopt vsl (b,rty) = 
-  mk_tlambda m tps (mk_basev_multi_lambdas_core m basevopt vsl (b,rty) )
-
-let mk_multi_lambda_bind v letSeqPtOpt m  tps vsl (b,rty) = 
-    TBind(v,mk_multi_lambdas m tps vsl (b,rty),letSeqPtOpt)
-
-let mk_bind seqPtOpt v e = TBind(v,e,seqPtOpt)
-let mk_compgen_bind v e = TBind(v,e,NoSequencePointAtStickyBinding)
-
-/// Make bindings that are compiler generated (though the variables may not be - e.g. they may be lambda arguments in a beta reduction)
-let mk_compgen_binds vs es = 
-    if List.length vs <> List.length es then failwith "mk_compgen_binds: invalid argument";
-    List.map2 mk_compgen_bind vs es |> FlatList.of_list
-
-(* n.b. type gives type of body *)
-let mk_let_bind m bind body = TExpr_let(bind,body, m, NewFreeVarsCache())
-let mk_lets_bind m binds body = List.foldBack (mk_let_bind m) binds body 
-let mk_lets_from_Bindings m binds body = FlatList.foldBack (mk_let_bind m) binds body 
-let mk_let seqPtOpt m v x body = mk_let_bind m (mk_bind seqPtOpt v x) body
-let mk_compgen_let m v x body = mk_let_bind m (mk_compgen_bind v x) body
-
-let mk_invisible_bind v e = TBind(v,e,NoSequencePointAtInvisibleBinding)
-let mk_invisible_let m v x body = mk_let_bind m (mk_invisible_bind v x) body
-let mk_invisible_binds vs es = 
-    if List.length vs <> List.length es then failwith "mk_invisible_binds: invalid argument";
-    List.map2 mk_invisible_bind vs es
-
-let mk_invisible_FlatBindings vs es = 
-    if FlatList.length vs <> FlatList.length es then failwith "mk_invisible_FlatBindings: invalid argument";
-    FlatList.map2 mk_invisible_bind vs es
-
-let mk_invisible_lets m vs xs body = mk_lets_bind m (mk_invisible_binds vs xs) body
-let mk_invisible_lets_from_Bindings m vs xs body = mk_lets_from_Bindings m (mk_invisible_FlatBindings vs xs) body
-
-let mk_letrec_binds m binds body = if FlatList.isEmpty binds then body else TExpr_letrec(binds,body, m, NewFreeVarsCache())
-let mk_letrec_binds_typed m binds (body,ty) =  mk_letrec_binds m binds body, ty
-
-
-
-//-------------------------------------------------------------------------
-// Type schemes...
-//-------------------------------------------------------------------------
-
- 
-type TypeScheme   = 
-    TypeScheme of 
-        typars (* the truly generalized type parameters *)
-      * typars (* free choice type parameters from a recursive block where this value only generalizes a subsest of the overall set of type parameters generalized *)
-      * typ    (* the 'tau' type forming the body of the generalized type *)
-  
-let mk_poly_bind_rhs m typeScheme bodyExpr = 
-    let (TypeScheme(generalizedTypars,freeChoiceTypars,tauType)) = typeScheme
-    mk_tlambda m generalizedTypars (mk_tchoose m freeChoiceTypars bodyExpr, tauType)
-
-let is_being_generalized tp typeScheme = 
-    let (TypeScheme(generalizedTypars,_,_)) = typeScheme
-    ListSet.mem tpspec_eq tp generalizedTypars
-
-//-------------------------------------------------------------------------
-// Build conditional expressions...
-//------------------------------------------------------------------------- 
-
-let mk_lazy_and g m e1 e2 = mk_cond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.bool_ty e1 e2 (TExpr_const(TConst_bool false,m,g.bool_ty))
-let mk_lazy_or g m e1 e2 = mk_cond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.bool_ty e1 (TExpr_const(TConst_bool true,m,g.bool_ty)) e2
-
-let mk_byref_typ g ty = TType_app (g.byref_tcr, [ty])
-let mk_multi_dim_array_typ g n ty = 
-  if n = 1 then TType_app (g.il_arr1_tcr, [ty]) 
-  elif n = 2 then TType_app (g.il_arr2_tcr, [ty]) 
-  elif n = 3 then TType_app (g.il_arr3_tcr, [ty]) 
-  elif n = 4 then TType_app (g.il_arr4_tcr, [ty]) 
-  else failwith "F# supports a maxiumum .NET array dimension of 4"
-
-let mk_unit_typ g = g.unit_ty 
-let mk_nativeint_typ g = g.nativeint_ty
-
-let mk_coerce(e,to_ty,m,from_ty)                     = TExpr_op(TOp_coerce,[to_ty;from_ty],[e],m)
-
-let mk_asm(code,tinst,args,rettys,m)                 = TExpr_op(TOp_asm(code,rettys),tinst,args,m)
-let mk_ucase(uc,tinst,args,m)                        = TExpr_op(TOp_ucase uc,tinst,args,m)
-let mk_exnconstr(uc,args,m)                          = TExpr_op(TOp_exnconstr uc,[],args,m)
-let mk_tuple_field_get(e,tinst,i,m)                  = TExpr_op(TOp_tuple_field_get(i), tinst, [e],m)
-
-let mk_recd_field_get_via_expra(e,fref,tinst,m)      = TExpr_op(TOp_rfield_get(fref), tinst, [e],m)
-let mk_recd_field_get_addr_via_expra(e,fref,tinst,m) = TExpr_op(TOp_field_get_addr(fref), tinst, [e],m)
-
-let mk_static_rfield_get_addr(fref,tinst,m)          = TExpr_op(TOp_field_get_addr(fref), tinst, [],m)
-let mk_static_rfield_get(fref,tinst,m)               = TExpr_op(TOp_rfield_get(fref), tinst, [],m)
-let mk_static_rfield_set(fref,tinst,e,m)             = TExpr_op(TOp_rfield_set(fref), tinst, [e],m)
-
-let mk_recd_field_set_via_expra(e1,fref,tinst,e2,m)  = TExpr_op(TOp_rfield_set(fref), tinst, [e1;e2],m)
-
-let mk_ucase_tag_get(e1,cref,tinst,m)                = TExpr_op(TOp_ucase_tag_get(cref), tinst, [e1],m)
-let mk_ucase_proof(e1,cref,tinst,m)            = TExpr_op(TOp_ucase_proof(cref), tinst, [e1],m)
-
-/// Build a 'get' expression for something we've already determined to be a particular union case, and where the
-/// input expression has 'TType_ucase', which is an F# compiler internal "type"
-let mk_ucase_field_get_proven(e1,cref,tinst,j,m)   = TExpr_op(TOp_ucase_field_get(cref,j), tinst, [e1],m)
-
-/// Build a 'get' expression for something we've already determined to be a particular union case, but where 
-/// the static type of the input is not yet proven to be that particular union case. This requires a type
-/// cast to 'prove' the condition.
-let mk_ucase_field_get_unproven(e1,cref,tinst,j,m)  = mk_ucase_field_get_proven(mk_ucase_proof(e1,cref,tinst,m),cref,tinst,j,m)
-
-let mk_ucase_field_set(e1,cref,tinst,j,e2,m)         = TExpr_op(TOp_ucase_field_set(cref,j), tinst, [e1;e2],m)
-
-let mk_exnconstr_field_get(e1,ecref,j,m)             = TExpr_op(TOp_exnconstr_field_get(ecref,j), [],[e1],m)
-let mk_exnconstr_field_set(e1,ecref,j,e2,m)          = TExpr_op(TOp_exnconstr_field_set(ecref,j), [],[e1;e2],m)
-
-let mk_dummy_lambda g (e,ety) = 
-    let m = (range_of_expr e) 
-    mk_lambda m (fst (mk_compgen_local m "unitVar" g.unit_ty)) (e,ety)
-                           
-let mk_while       g (spWhile,e1,e2,m)             = 
-    TExpr_op(TOp_while spWhile,[]  ,[mk_dummy_lambda g (e1,g.bool_ty);mk_dummy_lambda g (e2,g.unit_ty)],m)
-
-let mk_for         g (spFor,v,e1,dir,e2,e3,m)    = 
-    TExpr_op(TOp_for (spFor,dir)    ,[]  ,[mk_dummy_lambda g (e1,g.int_ty) ;mk_dummy_lambda g (e2,g.int_ty);mk_lambda (range_of_expr e3) v (e3,g.unit_ty)],m)
-
-let mk_try_catch   g (e1,vf,ef,vh,eh,m,ty,spTry,spWith) = 
-    TExpr_op(TOp_try_catch(spTry,spWith),[ty],[mk_dummy_lambda g (e1,ty);mk_lambda (range_of_expr ef) vf (ef,ty);mk_lambda (range_of_expr eh) vh (eh,ty)],m)
-
-let mk_try_finally g (e1,e2,m,ty,spTry,spFinally)          = 
-    TExpr_op(TOp_try_finally(spTry,spFinally),[ty],[mk_dummy_lambda g (e1,ty);mk_dummy_lambda g (e2,g.unit_ty)],m)
-
-let mk_ilzero (m,ty) = TExpr_const(TConst_zero,m,ty) 
-
-
-let rec split_after_acc n l1 l2 = if n <= 0 then List.rev l1,l2 else split_after_acc (n-1) ((List.hd l2):: l1) (List.tl l2) 
-let split_after n l = split_after_acc n [] l
-
-
-//--------------------------------------------------------------------------
-// Maps tracking extra information for values
-//--------------------------------------------------------------------------
-
-[]
-type ValMap<'a> = 
-    val imap: I64map.t<'a>
-    new (imap) = {imap=imap}
-     
-// REVIEW: convert these to OO
-let vspec_map_find    (v: Val) (m:ValMap<_>) = I64map.find v.Stamp m.imap
-let vspec_map_tryfind (v: Val) (m:ValMap<_>) = I64map.tryfind v.Stamp m.imap
-let vspec_map_mem     (v: Val) (m:ValMap<_>) = I64map.mem v.Stamp m.imap
-let vspec_map_add     (v: Val) x (m:ValMap<_>) = ValMap (I64map.add v.Stamp x m.imap)
-let vspec_map_remove  (v: Val) (m:ValMap<_>) = ValMap (I64map.remove v.Stamp m.imap)
-let vspec_map_empty () = ValMap (I64map.empty ())
-let vspec_map_is_empty (m:ValMap<_>) = m.imap.IsEmpty
-let vspec_map_of_list vs = List.foldBack (fun (x,y) acc -> vspec_map_add x y acc) vs (vspec_map_empty()) 
-
-type ValHash<'a> = VSpecHash of System.Collections.Generic.Dictionary
-let vspec_hash_find    (VSpecHash t) (v:Val) = t.[v.Stamp]
-let vspec_hash_tryfind  (VSpecHash t) (v:Val) = let i = v.Stamp in if t.ContainsKey(i) then Some(t.[i]) else None
-let vspec_hash_mem      (VSpecHash t) (v:Val) = let i = v.Stamp in t.ContainsKey(i)
-let vspec_hash_add      (VSpecHash t) (v:Val) x = let i = v.Stamp in t.[i] <- x
-let vspec_hash_remove   (VSpecHash t) (v:Val) = let i = v.Stamp in t.Remove(i) |> ignore
-let vspec_hash_create()  =  VSpecHash (new System.Collections.Generic.Dictionary<_,_>(11))
-
-type ValMultiMap<'a> = ValMap<'a list> 
-let vspec_mmap_find v (m: ValMultiMap<'a>) = if vspec_map_mem v m then vspec_map_find v m else []
-let vspec_mmap_add v x (m: ValMultiMap<'a>) = vspec_map_add v (x :: vspec_mmap_find v m) m
-let vspec_mmap_empty () : ValMultiMap<'a> = vspec_map_empty()
-
-type TyparMap<'a> = TPMap of I64map.t<'a>
-let tpmap_find (v: Typar) (TPMap m) = I64map.find v.Stamp m
-let tpmap_mem (v: Typar) (TPMap m) = I64map.mem v.Stamp m
-let tpmap_add (v: Typar) x (TPMap m) = TPMap (I64map.add v.Stamp x m)
-let tpmap_empty () = TPMap (I64map.empty ())
-
-type TcrefMap<'a> = TCRefMap of I64map.t<'a>
-let tcref_map_find    (v: TyconRef) (TCRefMap m) = I64map.find v.Stamp m
-let tcref_map_tryfind (v: TyconRef) (TCRefMap m) = I64map.tryfind v.Stamp m
-let tcref_map_mem     (v: TyconRef) (TCRefMap m) = I64map.mem v.Stamp m
-let tcref_map_add     (v: TyconRef) x (TCRefMap m) = TCRefMap (I64map.add v.Stamp x m)
-let tcref_map_empty  () = TCRefMap (I64map.empty ())
-let tcref_map_is_empty (TCRefMap m) = Zmap.is_empty m
-let tcref_map_of_list vs = List.foldBack (fun (x,y) acc -> tcref_map_add x y acc) vs (tcref_map_empty()) 
-
-type TcrefMultiMap<'a> = 'a list TcrefMap
-let tcref_mmap_find v (m: TcrefMultiMap<'a>) = if tcref_map_mem v m then tcref_map_find v m else []
-let tcref_mmap_add v x (m: TcrefMultiMap<'a>) = tcref_map_add v (x :: tcref_mmap_find v m) m
-let tcref_mmap_empty () : TcrefMultiMap<'a> = tcref_map_empty()
-
-//--------------------------------------------------------------------------
-// Substitute for type variables and remap type constructors 
-//--------------------------------------------------------------------------
-
-type TyparInst = (Typar * typ) list
-type tpenv = TyparInst
-
-type TyconRefRemap = TyconRef TcrefMap
-type ValRemap = ValMap
-
-let empty_tpenv = ([] : tpenv)
-let empty_tpinst = ([] : TyparInst)
-
-type Remap =
-    { tpinst : TyparInst;
-      vspec_remap: ValRemap;
-      tcref_remap : TyconRefRemap }
-
-type tyenv = Remap
-      
-let empty_tcref_remap : TyconRefRemap = tcref_map_empty()
-let empty_vref_remap : ValRemap = vspec_map_empty()
-let empty_remap = { tpinst = empty_tpinst; tcref_remap =empty_tcref_remap;vspec_remap =empty_vref_remap }
-let empty_tyenv = empty_remap
-
-//--------------------------------------------------------------------------
-// renamings
-//--------------------------------------------------------------------------
-
-let tmenv_add_tcref_remap tcref1 tcref2 tmenv = 
-    {tmenv with tcref_remap=tcref_map_add tcref1 tcref2 tmenv.tcref_remap}
-
-let remap_vref tmenv vref = 
-    match vspec_map_tryfind (deref_val vref) tmenv.vspec_remap with 
-    | None -> vref 
-    | Some res -> res
-
-let remap_is_empty tyenv = 
-    isNil tyenv.tpinst && 
-    tcref_map_is_empty tyenv.tcref_remap && 
-    vspec_map_is_empty tyenv.vspec_remap 
-
-let inst_tpref tpinst ty tp  =
-    if ListAssoc.containsKey typar_ref_eq tp tpinst then ListAssoc.find typar_ref_eq tp tpinst 
-    else ty    (* avoid re-allocation of TType_app node in the common case *)
-
-let inst_tpref_unit tpinst measure (tp:Typar)  =
-   if tp.Kind = KindType then failwith "inst_tpref_unit: kind=Type";
-   if ListAssoc.containsKey typar_ref_eq tp tpinst then 
-       match ListAssoc.find typar_ref_eq tp tpinst with 
-       | TType_measure measure -> measure
-       | _ ->  failwith "inst_tpref_unit incorrect kind";
-   else measure
-
-let remap_tcref tcmap tcr  =
-    match tcref_map_tryfind tcr tcmap with 
-    | Some tcr ->  tcr
-    | None -> tcr
-
-let remap_ucref tcmap (UCRef(tcref,nm)) = UCRef(remap_tcref tcmap tcref,nm)
-let remap_rfref tcmap (RFRef(tcref,nm)) = RFRef(remap_tcref tcmap tcref,nm)
-
-let mk_typar_inst (typars: typars) tyargs =  
-#if CHECKED
-    if List.length typars <> List.length tyargs then
-      failwith ("mk_typar_inst: invalid type" ^ (sprintf " %d <> %d" (List.length typars) (List.length tyargs)));
-#endif
-    (List.zip typars tyargs : TyparInst)
-
-let generalize_typar tp = mk_typar_ty tp
-let generalize_typars tps = List.map generalize_typar tps
-
-let rec remap_typeA (tyenv : tyenv) (ty:typ) =
-  let ty = strip_tpeqns ty
-  match ty with
-  | TType_var tp as ty       -> inst_tpref tyenv.tpinst ty tp
-  | TType_app (tcr,tinst) as ty -> 
-      match tcref_map_tryfind tcr tyenv.tcref_remap with 
-      | Some tcr' ->  TType_app (tcr',remap_typesA tyenv tinst)
-      | None -> 
-          match tinst with 
-          | [] -> ty  (* optimization to avoid re-allocation of TType_app node in the common case *)
-          | _ -> 
-              (* avoid reallocation on idempotent *)
-              let tinst' = remap_typesA tyenv tinst
-              if tinst === tinst' then ty else 
-              TType_app (tcr,tinst')
-
-  | TType_ucase (UCRef(tcr,n),tinst) as ty -> 
-      match tcref_map_tryfind tcr tyenv.tcref_remap with 
-      | Some tcr' ->  TType_ucase (UCRef(tcr',n),remap_typesA tyenv tinst)
-      | None -> TType_ucase (UCRef(tcr,n),remap_typesA tyenv tinst)
-
-  | TType_tuple l  as ty -> 
-      let l' = remap_typesA tyenv l
-      if l === l' then ty else  
-      TType_tuple (l')
-  | TType_fun (d,r) as ty      -> 
-      let d' = remap_typeA tyenv d
-      let r' = remap_typeA tyenv r
-      if d === d' && r === r' then ty else
-      TType_fun (d', r')
-  | TType_forall (tps,ty) -> 
-      let tps',tyenv = copy_remap_and_bind_typars tyenv tps
-      TType_forall (tps', remap_typeA tyenv ty)
-  | TType_modul_bindings          -> ty
-  | TType_measure measure -> 
-      TType_measure (remap_measureA tyenv measure)
-
-and remap_measureA tyenv measure =
-    match measure with
-    | MeasureOne -> measure
-    | MeasureCon tcr ->
-        match tcref_map_tryfind tcr tyenv.tcref_remap with 
-        | Some tcr ->  MeasureCon tcr
-        | None -> measure
-    | MeasureProd(u1,u2) -> MeasureProd(remap_measureA tyenv u1, remap_measureA tyenv u2)
-    | MeasureInv u -> MeasureInv(remap_measureA tyenv u)
-    | MeasureVar tp as measure -> 
-      match tp.Solution with
-       | None -> 
-          if ListAssoc.containsKey typar_ref_eq tp tyenv.tpinst then 
-              match ListAssoc.find typar_ref_eq tp tyenv.tpinst with 
-              | TType_measure measure -> measure
-              | _ -> failwith "remap_measureA: incorrect kinds"
-          else measure
-       | Some (TType_measure measure) -> remap_measureA tyenv measure
-       | Some ty -> failwithf "incorrect kinds: %A" ty
-and remap_typesA tyenv types = List.mapq (remap_typeA tyenv) types
-and remap_typar_constraintsA tyenv cs =
-   cs |>  List.choose (fun x -> 
-         match x with 
-         | TTyparCoercesToType(ty,m) -> 
-             Some(TTyparCoercesToType (remap_typeA tyenv ty,m))
-         | TTyparMayResolveMemberConstraint(traitInfo,m) -> 
-             Some(TTyparMayResolveMemberConstraint (remap_traitA tyenv traitInfo,m))
-         | TTyparDefaultsToType(priority,ty,m) -> Some(TTyparDefaultsToType(priority,remap_typeA tyenv ty,m))
-         | TTyparIsEnum(uty,m) -> 
-             Some(TTyparIsEnum(remap_typeA tyenv uty,m))
-         | TTyparIsDelegate(uty1,uty2,m) -> 
-             Some(TTyparIsDelegate(remap_typeA tyenv uty1,remap_typeA tyenv uty2,m))
-         | TTyparSimpleChoice(tys,m) -> Some(TTyparSimpleChoice(remap_typesA tyenv tys,m))
-         | TTyparSupportsNull _ | TTyparIsNotNullableValueType _ 
-         | TTyparIsReferenceType _ | TTyparRequiresDefaultConstructor _ -> Some(x))
-
-and remap_traitA tyenv (TTrait(typs,nm,mf,argtys,rty,slnCell)) =
-    let slnCell = 
-        match !slnCell with 
-        | None -> None
-        | Some sln -> 
-            let sln = 
-                match sln with 
-                | ILMethSln(typ,extOpt,mref,minst) ->
-                     ILMethSln(remap_typeA tyenv typ,extOpt,mref,remap_typesA tyenv minst)  
-                | FSMethSln(typ, vref,minst) ->
-                     FSMethSln(remap_typeA tyenv typ, remap_vref tyenv vref,remap_typesA tyenv minst)  
-                | BuiltInSln -> 
-                     BuiltInSln
-            Some sln
-    // Note: we reallocate a new solution cell on every traversal of a trait constraint
-    // This feels incorrect for trait constraints that are quantified: it seems we should have 
-    // formal binders for trait constraints when they are quantified, just as
-    // we have formal binders for type variables.
-    //
-    // The danger here is that a solution for one syntactic occurrence of a trait constraint won't
-    // be propagated to other, "linked" solutions. However trait constraints don't appear in any algebrra
-    // in the same way as types
-    TTrait(remap_typesA tyenv typs,nm,mf,remap_typesA tyenv argtys, Option.map (remap_typeA tyenv) rty,ref slnCell)
-
-
-and bind_typars tps tyargs tpinst =   
-    match tps with 
-    | [] -> tpinst 
-    | _ -> List.map2 (fun tp tyarg -> (tp,tyarg)) tps tyargs @ tpinst 
-
-(* This version is used to remap most type parameters, e.g. ones bound at tycons, vals, records *)
-(* See notes below on remap_type_full for why we have a function that accepts remap_attribs as an argument *)
-and copy_remap_and_bind_typars_full remap_attrib tyenv tps =
-    match tps with 
-    | [] -> tps,tyenv 
-    | _ -> 
-      let tps' = CopyTypars tps
-      let tyenv = { tyenv with tpinst = bind_typars tps (generalize_typars tps') tyenv.tpinst } 
-      (tps,tps') ||> List.iter2 (fun tporig tp -> 
-         fixup_typar_constraints tp (remap_typar_constraintsA tyenv  tporig.Constraints);
-         tp.Data.typar_attribs  <- tporig.Data.typar_attribs |> List.map remap_attrib) ;
-      tps',tyenv
-
-(* copies bound typars, extends tpinst *)
-and copy_remap_and_bind_typars tyenv tps =
-    copy_remap_and_bind_typars_full (fun _ -> failwith "Unexpected attribute in first-class Type_forall") tyenv tps
-
-let remap_type  tyenv x =
-    if remap_is_empty tyenv then x else
-    remap_typeA tyenv x
-
-let remap_types tyenv x = 
-    if remap_is_empty tyenv then x else 
-    remap_typesA tyenv x
-
-/// Use this one for any type that may be a forall type where the type variables may contain attributes 
-/// Logically speaking this is mtuually recursive with remap_attrib defined much later in this file, 
-/// because types may contain forall types that contain attributes, which need to be remapped. 
-/// We currently break the recursion by passing in remap_attrib as a function parameter. 
-/// Use this one for any type that may be a forall type where the type variables may contain attributes 
-let remap_type_full remap_attrib tyenv ty =
-    if remap_is_empty tyenv then ty else 
-    match strip_tpeqns ty with
-    | TType_forall(tps,tau) -> 
-        let tps',tyenvinner = copy_remap_and_bind_typars_full remap_attrib tyenv tps
-        TType_forall(tps',remap_type tyenvinner tau)
-    | _ -> 
-        try remap_type tyenv ty
-        with e -> failwith "error in remap_type_full"
-
-let remap_param tyenv (TSlotParam(nm,typ,fl1,fl2,fl3,attribs) as x) = 
-    if remap_is_empty tyenv then x else 
-    TSlotParam(nm,remap_typeA tyenv typ,fl1,fl2,fl3,attribs) 
-
-let remap_slotsig remap_attrib tyenv (TSlotSig(nm,typ, ctps,methTypars,paraml, rty) as x) =
-    if remap_is_empty tyenv then x else 
-    let typ' = remap_typeA tyenv typ
-    let ctps',tyenvinner = copy_remap_and_bind_typars_full remap_attrib tyenv ctps
-    let methTypars',tyenvinner = copy_remap_and_bind_typars_full remap_attrib tyenvinner methTypars
-    TSlotSig(nm,typ', ctps',methTypars',List.mapSquared (remap_param tyenvinner) paraml,Option.map (remap_typeA tyenvinner) rty) 
-
-let mk_inst_tyenv tpinst = { tcref_remap= empty_tcref_remap; tpinst=tpinst; vspec_remap=empty_vref_remap }
-
-(* entry points for "typar -> typ" instantiation *)
-let InstType              tpinst x = if isNil tpinst then x else remap_typeA  (mk_inst_tyenv tpinst) x
-let inst_types             tpinst x = if isNil tpinst then x else remap_typesA (mk_inst_tyenv tpinst) x
-let inst_trait             tpinst x = if isNil tpinst then x else remap_traitA (mk_inst_tyenv tpinst) x
-let inst_typar_constraints tpinst x = if isNil tpinst then x else remap_typar_constraintsA (mk_inst_tyenv tpinst) x
-let inst_slotsig tpinst ss = remap_slotsig (fun _ -> failwith "Unexpected attribute in first-class Type_forall") (mk_inst_tyenv tpinst) ss
-let copy_slotsig ss = remap_slotsig (fun _ -> failwith "Unexpected attribute in first-class Type_forall") empty_remap ss
-
-let mk_typar_to_typar_renaming tpsorig tps = 
-    let tinst = generalize_typars tps
-    mk_typar_inst tpsorig tinst,tinst
-
-let mk_tycon_inst (tycon:Tycon) tinst = mk_typar_inst tycon.TyparsNoRange tinst
-let mk_tcref_inst tcref tinst = mk_tycon_inst (deref_tycon tcref) tinst
-
-//---------------------------------------------------------------------------
-// Remove inference equations and abbreviations from units
-//---------------------------------------------------------------------------
-
-let reduce_tcref_abbrev_measure (tcref:TyconRef) = 
-    let abbrev = tcref.TypeAbbrev
-    match abbrev with 
-    | Some (TType_measure abbrev_measure) -> abbrev_measure 
-    | _ -> invalid_arg "reduce_tcref_abbrev_measure: no abbreviation or incorrect kind"
-
-let rec strip_tpeqns_and_tcabbrevsA_measure canShortcut measure = 
-    match strip_upeqnsA canShortcut measure with 
-    | MeasureCon tcref when tcref.IsTypeAbbrev  ->  
-        strip_tpeqns_and_tcabbrevsA_measure canShortcut (reduce_tcref_abbrev_measure tcref) 
-    | m -> m
-
-let strip_tpeqns_and_tcabbrevs_measure m = strip_tpeqns_and_tcabbrevsA_measure false m
-
-let tcref_eq g tcref1 tcref2 = prim_tcref_eq g.compilingFslib g.fslibCcu tcref1 tcref2
-let tycon_eq (tycon1:Entity) (tycon2:Entity) = (tycon1.Stamp = tycon2.Stamp)
-
-//---------------------------------------------------------------------------
-// Basic unit stuff
-//---------------------------------------------------------------------------
-
-
-/// What is the contribution of unit-of-measure constant ucref to unit-of-measure expression measure? 
-let rec MeasureConExponent g abbrev ucref unt =
-    match (if abbrev then strip_tpeqns_and_tcabbrevs_measure unt else strip_upeqns unt) with
-    | MeasureCon ucref' -> if tcref_eq g ucref' ucref then 1 else 0
-    | MeasureInv unt' -> -(MeasureConExponent g abbrev ucref unt')
-    | MeasureProd(unt1,unt2) -> MeasureConExponent g abbrev ucref unt1 + MeasureConExponent g abbrev ucref unt2
-    | _ -> 0
-
-/// What is the contribution of unit-of-measure constant ucref to unit-of-measure expression measure
-/// after remapping tycons? 
-let rec MeasureConExponentAfterRemapping g r ucref unt =
-    match strip_tpeqns_and_tcabbrevs_measure unt with
-    | MeasureCon ucref' -> if tcref_eq g (r ucref') ucref then 1 else 0
-    | MeasureInv unt' -> -(MeasureConExponentAfterRemapping g r ucref unt')
-    | MeasureProd(unt1,unt2) -> MeasureConExponentAfterRemapping g r ucref unt1 + MeasureConExponentAfterRemapping g r ucref unt2
-    | _ -> 0
-
-/// What is the contribution of unit-of-measure variable tp to unit-of-measure expression unt? 
-let rec MeasureVarExponent tp unt =
-    match strip_tpeqns_and_tcabbrevs_measure unt with
-    | MeasureVar tp' -> if typar_ref_eq tp tp' then 1 else 0
-    | MeasureInv unt' -> -(MeasureVarExponent tp unt')
-    | MeasureProd(unt1,unt2) -> MeasureVarExponent tp unt1 + MeasureVarExponent tp unt2
-    | _ -> 0
-
-/// List the *literal* occurrences of unit variables in a unit expression, without repeats  
-let ListMeasureVarOccs unt =
-    let rec gather acc unt =  
-        match strip_tpeqns_and_tcabbrevs_measure unt with
-          MeasureVar tp -> if List.exists (typar_ref_eq tp) acc then acc else tp::acc
-        | MeasureProd(unt1,unt2) -> gather (gather acc unt1) unt2
-        | MeasureInv unt' -> gather acc unt'
-        | _ -> acc   
-    gather [] unt
-
-/// List the *observable* occurrences of unit variables in a unit expression, without repeats, paired with their non-zero exponents
-let ListMeasureVarOccsWithNonZeroExponents untexpr =
-    let rec gather acc unt =  
-        match strip_tpeqns_and_tcabbrevs_measure unt with
-          MeasureVar tp -> if List.exists (fun (tp', _) -> typar_ref_eq tp tp') acc then acc 
-                           else let e = MeasureVarExponent tp untexpr in if e=0 then acc else (tp,e)::acc
-        | MeasureProd(unt1,unt2) -> gather (gather acc unt1) unt2
-        | MeasureInv unt' -> gather acc unt'
-        | _ -> acc   
-    gather [] untexpr
-
-/// List the *observable* occurrences of unit constants in a unit expression, without repeats, paired with their non-zero exponents
-let ListMeasureConOccsWithNonZeroExponents g eraseAbbrevs untexpr =
-    let rec gather acc unt =  
-        match (if eraseAbbrevs then strip_tpeqns_and_tcabbrevs_measure unt else strip_upeqns unt) with
-        | MeasureCon c -> if List.exists (fun (c', _) -> tcref_eq g c c') acc then acc 
-                          else let e = MeasureConExponent g eraseAbbrevs c untexpr in if e=0 then acc else (c,e)::acc
-        | MeasureProd(unt1,unt2) -> gather (gather acc unt1) unt2
-        | MeasureInv unt' -> gather acc unt'
-        | _ -> acc  
-    gather [] untexpr
-
-/// List the *literal* occurrences of unit constants in a unit expression, without repeats,
-/// and after applying a remapping function r to tycons
-let ListMeasureConOccsAfterRemapping g r unt =
-    let rec gather acc unt =  
-        match (strip_tpeqns_and_tcabbrevs_measure unt) with
-        | MeasureCon c -> if List.exists (tcref_eq g (r c)) acc then acc else r c::acc
-        | MeasureProd(unt1,unt2) -> gather (gather acc unt1) unt2
-        | MeasureInv unt' -> gather acc unt'
-        | _ -> acc
-   
-    gather [] unt
-
-/// Construct a measure expression representing the n'th power of a measure
-let rec MeasurePower u n = 
-    if n=0 then MeasureOne
-    elif n=1 then u
-    elif n<0 then MeasureInv (MeasurePower u (-n))
-    else MeasureProd(u,MeasurePower u (n-1))
-
-/// Construct a measure expression representing the product of a list of measures
-let ProdMeasures ms = List.foldBack (fun m1 m2 -> MeasureProd (m1,m2)) ms MeasureOne
-
-let is_dimensionless g tyarg =
-    match strip_tpeqns tyarg with
-    | TType_measure unt ->
-      isNil (ListMeasureVarOccsWithNonZeroExponents unt) && 
-      isNil (ListMeasureConOccsWithNonZeroExponents g true unt)
-    | _ -> false
-
-//--------------------------------------------------------------------------
-// Tuple compilation (types)
-//------------------------------------------------------------------------ 
-
-let maxTuple = 8
-let goodTupleFields = maxTuple-1
-
-let is_tuple_tcref g tcref =
-    match tcref with
-    | x when g.tuple1_tcr = x || g.tuple2_tcr = x || g.tuple3_tcr = x || g.tuple4_tcr = x || g.tuple5_tcr = x || g.tuple6_tcr = x || g.tuple7_tcr = x || g.tuple8_tcr = x -> true
-    | _ -> false
-
-let compiled_tuple_tcref g tys = 
-    let n = List.length tys 
-    if   n = 1 then g.tuple1_tcr
-    elif n = 2 then g.tuple2_tcr
-    elif n = 3 then g.tuple3_tcr
-    elif n = 4 then g.tuple4_tcr
-    elif n = 5 then g.tuple5_tcr
-    elif n = 6 then g.tuple6_tcr
-    elif n = 7 then g.tuple7_tcr
-    elif n = 8 then g.tuple8_tcr
-    else failwithf "compiled_tuple_tcref, n = %d" n
-
-let rec compiled_tuple_ty g tys = 
-    let n = List.length tys 
-    if n < maxTuple then TType_app (compiled_tuple_tcref g tys, tys)
-    else 
-        let tysA,tysB = split_after goodTupleFields tys
-        TType_app (g.tuple8_tcr, tysA@[compiled_tuple_ty g tysB])
-
-//---------------------------------------------------------------------------
-// Remove inference equations and abbreviations from types 
-//---------------------------------------------------------------------------
-
-
-let apply_tycon_abbrev abbrev_ty tycon tyargs = 
-    if isNil tyargs then abbrev_ty 
-    else InstType (mk_tycon_inst tycon tyargs) abbrev_ty
-
-let reduce_tycon_abbrev (tycon:Tycon) tyargs = 
-    let abbrev = tycon.TypeAbbrev
-    match abbrev with 
-    | None -> invalidArg "tycon" "this type definition is not an abbreviation";
-    | Some abbrev_ty -> 
-        apply_tycon_abbrev abbrev_ty tycon tyargs
-
-let reduce_tcref_abbrev (tcref:TyconRef) tyargs = 
-    reduce_tycon_abbrev tcref.Deref tyargs
-
-let reduce_tycon_measureable (tycon:Tycon) tyargs = 
-    let repr = tycon.TypeReprInfo
-    match repr with 
-    | Some (TMeasureableRepr ty) -> 
-        if isNil tyargs then ty else InstType (mk_tycon_inst tycon tyargs) ty
-    | _ -> invalidArg "tc" "this type definition is not a refinement"
-
-let reduce_tcref_measureable (tcref:TyconRef) tyargs = 
-    reduce_tycon_measureable tcref.Deref tyargs
-
-let rec strip_tpeqns_and_tcabbrevsA g canShortcut ty = 
-    let ty = strip_tpeqnsA canShortcut ty 
-    match ty with 
-    | TType_app (tcref,tinst) -> 
-        let tycon = tcref.Deref
-        match tycon.TypeAbbrev with 
-        | Some abbrev_ty -> 
-            strip_tpeqns_and_tcabbrevsA g canShortcut (apply_tycon_abbrev abbrev_ty tycon tinst)
-        | None -> 
-            if tycon.IsMeasureableReprTycon && List.forall (is_dimensionless g) tinst then
-                strip_tpeqns_and_tcabbrevsA g canShortcut (reduce_tycon_measureable tycon tinst)
-            else ty
-    | ty -> ty
-
-let strip_tpeqns_and_tcabbrevs g ty = strip_tpeqns_and_tcabbrevsA g false ty
-
-/// This erases outermost occurences of inference equations, type abbreviations and measureable types (float<_>).
-/// It also optionally erases all "compilation representations", i.e. function and
-/// tuple types, and also "nativeptr<'T> --> System.IntPtr"
-let rec strip_tpeqns_and_tcabbrevs_and_erase eraseFuncAndTuple g ty =
-    let ty = strip_tpeqns_and_tcabbrevs g ty
-    match ty with
-    | TType_app (tcref,args) -> 
-        let tycon = tcref.Deref
-        if tycon.IsMeasureableReprTycon  then
-            strip_tpeqns_and_tcabbrevs_and_erase eraseFuncAndTuple g (reduce_tycon_measureable tycon args)
-        elif tcref_eq g tcref g.nativeptr_tcr && eraseFuncAndTuple then 
-            strip_tpeqns_and_tcabbrevs_and_erase eraseFuncAndTuple g g.nativeint_ty
-        else
-            ty
-    | TType_fun(a,b) when eraseFuncAndTuple -> TType_app(g.fastFunc_tcr,[ a; b]) 
-    | TType_tuple(l) when eraseFuncAndTuple -> compiled_tuple_ty g l
-    | ty -> ty
-
-let strip_tpeqns_and_tcabbrevs_and_measureable g ty =
-   strip_tpeqns_and_tcabbrevs_and_erase false g ty
-       
-type Erasure = EraseAll | EraseMeasures | EraseNone
-
-let  strip_tpeqns_and_tcabbrevs_wrt_erasure erasureFlag g ty = 
-    match erasureFlag with 
-    | EraseAll -> strip_tpeqns_and_tcabbrevs_and_erase true g ty
-    | EraseMeasures -> strip_tpeqns_and_tcabbrevs_and_erase false g ty
-    | _ -> strip_tpeqns_and_tcabbrevs g ty
-
-    
-let rec strip_eqns_from_ecref (eref:TyconRef) = 
-    let exnc = deref_tycon eref
-    match exnc.ExceptionInfo with
-    | TExnAbbrevRepr eref -> strip_eqns_from_ecref eref
-    | _ -> exnc
-
-let dest_unpar_measure g unt =
-    let vs = ListMeasureVarOccsWithNonZeroExponents unt
-    let cs = ListMeasureConOccsWithNonZeroExponents g true unt
-    match vs, cs with
-    | [(v,1)], [] -> v
-    | _, _ -> failwith "dest_unpar_measure: not a unit-of-measure parameter"
-
-let is_unpar_measure g unt =
-    let vs = ListMeasureVarOccsWithNonZeroExponents unt
-    let cs = ListMeasureConOccsWithNonZeroExponents g true unt
- 
-    match vs, cs with
-    | [(_,1)], [] -> true
-    | _,   _ -> false
-
-
-let prim_dest_forall_typ g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_forall (tyvs,tau) -> (tyvs,tau) | _ -> failwith "prim_dest_forall_typ: not a forall type")
-let dest_fun_typ      g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_fun (tyv,tau) -> (tyv,tau) | _ -> failwith "dest_fun_typ: not a function type")
-let dest_tuple_typ    g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_tuple l -> l | _ -> failwith "dest_tuple_typ: not a tuple type")
-let dest_typar_typ    g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_var v -> v | _ -> failwith "dest_typar_typ: not a typar type")
-let dest_anypar_typ   g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_var v -> v | TType_measure unt -> dest_unpar_measure g unt | _ -> failwith "dest_anypar_typ: not a typar or unpar type")
-let dest_measure_typ  g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_measure m -> m | _ -> failwith "dest_measure_typ: not a unit-of-measure type")
-let is_fun_typ        g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_fun _ -> true | _ -> false)
-let is_forall_typ     g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_forall _ -> true | _ -> false)
-let is_tuple_typ      g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_tuple _ -> true | _ -> false)
-let is_union_typ      g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_app(tcr,_) -> tcr.IsUnionTycon | _ -> false)
-let is_repr_hidden_typ   g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_app(tcr,_) -> tcr.IsHiddenReprTycon | _ -> false)
-let is_fsobjmodel_typ g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_app(tcr,_) -> tcr.IsFSharpObjectModelTycon | _ -> false)
-let is_recd_typ       g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_app(tcr,_) -> tcr.IsRecordTycon | _ -> false)
-let is_typar_typ      g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_var _ -> true | _ -> false)
-let is_anypar_typ     g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_var _ -> true | TType_measure unt -> is_unpar_measure g unt | _ -> false)
-let is_measure_typ    g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_measure _ -> true | _ -> false)
-
-// WARNING: If you increase this you must make the corresponding types in FSharp.Core.dll structs
-#if TUPLE_STRUXT
-let highestTupleStructType = 2
-let is_tuple_struct_typ g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_tuple l -> l.Length <= highestTupleStructType | _ -> false)
-#else
-let is_tuple_struct_typ (g:TcGlobals) (ty:typ) = false
-#endif
-
-
-let is_proven_ucase_typ ty = match ty with TType_ucase _ -> true | _ -> false
-
-let mk_tyapp_ty tcref tyargs = TType_app(tcref,tyargs)
-let mk_proven_ucase_typ ucref tyargs = TType_ucase(ucref,tyargs)
-let is_stripped_tyapp_typ   g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_app _ -> true | _ -> false) 
-let dest_stripped_tyapp_typ g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_app(tcref,tinst) -> tcref,tinst | _ -> failwith "dest_stripped_tyapp_typ") 
-let tcref_of_stripped_typ   g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_app(tcref,_) -> tcref | _ -> failwith "tcref_of_stripped_typ") 
-let try_tcref_of_stripped_typ   g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_app(tcref,_) -> Some tcref | _ -> None) 
-let tinst_of_stripped_typ   g ty = ty |> strip_tpeqns_and_tcabbrevs g |> (function TType_app(_,tinst) -> tinst | _ -> []) 
-let tycon_of_stripped_typ   g ty = deref_tycon (tcref_of_stripped_typ g ty)
-
-let mk_inst_for_stripped_typ g typ = 
-    if is_stripped_tyapp_typ g typ then 
-      let tcref,tinst = dest_stripped_tyapp_typ g typ
-      mk_tcref_inst tcref tinst
-    else []
-
-let domain_of_fun_typ g ty = fst(dest_fun_typ g ty)
-let range_of_fun_typ  g ty = snd(dest_fun_typ g ty)
-
-let contains_measures_typ g ty = 
-    let rec contains ty =
-        match strip_tpeqns_and_tcabbrevs g ty with 
-        | TType_tuple l -> List.exists contains l
-        | TType_app (_,tinst) -> List.exists contains tinst
-        | TType_ucase (_,tinst) -> List.exists contains tinst
-        | TType_fun (d,r) -> contains d || contains r
-        | TType_var r -> match r.Kind with KindMeasure -> true | _ -> false
-        | TType_forall (tps,r) -> contains r
-        | TType_modul_bindings -> failwith "contains_measures_typ: naked struct"
-        | TType_measure unt -> true
-    contains ty
-
-//---------------------------------------------------------------------------
-// Type information about records, constructors etc.
-//---------------------------------------------------------------------------
- 
-let typ_of_rfield inst (fspec:RecdField)  = InstType inst fspec.FormalType
-
-let typs_of_rfields inst rfields = List.map (typ_of_rfield inst) rfields
-
-let typs_of_instance_rfields_of_tcref inst (tcref:TyconRef) = tcref.AllInstanceFieldsAsList |>  typs_of_rfields inst 
-
-let rfield_tables_of_ucref (x:UnionCaseRef) = x.UnionCase.ucase_rfields 
-let rfields_of_ucref x = (rfield_tables_of_ucref x).AllFieldsAsList
-let rfield_of_ucref_by_idx x n = (rfield_tables_of_ucref x).FieldByIndex n
-
-let rty_of_ucref (x:UnionCaseRef) = x.UnionCase.ucase_rty
-let typs_of_ucref_rfields inst x = typs_of_rfields inst (rfields_of_ucref x)
-
-let typ_of_ucref_rfield_by_idx (x:UnionCaseRef) tinst j = 
-    let tcref = x.TyconRef
-    let inst = mk_tcref_inst tcref tinst
-    typ_of_rfield inst (rfield_of_ucref_by_idx x j)
-
-let rty_of_uctyp (x:UnionCaseRef) tinst = 
-    let tcref = x.TyconRef
-    let inst = mk_tcref_inst tcref tinst
-    InstType inst (rty_of_ucref x)
-
-let rfields_of_ecref x = (strip_eqns_from_ecref x).TrueInstanceFieldsAsList
-let rfield_of_ecref_by_idx x n = (strip_eqns_from_ecref x).GetFieldByIndex n
-
-let typs_of_ecref_rfields x = typs_of_rfields [] (rfields_of_ecref x)
-let typ_of_ecref_rfield x j = typ_of_rfield [] (rfield_of_ecref_by_idx x j)
-
-(* REVIEW: these could be faster, e.g. by storing the index in the NameMap *)
-let ucref_index (UCRef(tcref,id)) = try tcref.UnionCasesArray |> Array.find_index (fun ucspec -> ucspec.DisplayName = id) with Not_found -> error(InternalError(Printf.sprintf "constructor %s not found in type %s" id tcref.MangledName, tcref.Range))
-let rfref_index (RFRef(tcref,id)) = try tcref.AllFieldsArray |> Array.find_index (fun rfspec -> rfspec.Name = id)  with Not_found -> error(InternalError(Printf.sprintf "field %s not found in type %s" id tcref.MangledName, tcref.Range))
-
-let ucrefs_of_tcref          (tcref:TyconRef) = tcref.UnionCasesAsList         |> List.map (ucref_of_ucase tcref) 
-let instance_rfrefs_of_tcref (tcref:TyconRef) = tcref.TrueInstanceFieldsAsList |> List.map (rfref_of_rfield tcref) 
-let all_rfrefs_of_tcref      (tcref:TyconRef) = tcref.AllFieldsAsList          |> List.map (rfref_of_rfield tcref) 
-
-let actual_typ_of_rfield tycon tinst (fspec:RecdField) = 
-    InstType (mk_tycon_inst tycon tinst) fspec.FormalType
-
-let actual_rtyp_of_rfref (fref:RecdFieldRef) tinst = 
-    actual_typ_of_rfield fref.Tycon tinst fref.RecdField
-
-let formal_typ_of_tcref g (tcref:TyconRef) = 
-    TType_app(tcref,List.map mk_typar_ty tcref.TyparsNoRange)
-
-let enclosing_formal_typ_of_val g (v:Val) = formal_typ_of_tcref g v.MemberApparentParent
-    
-//---------------------------------------------------------------------------
-// Apply type functions to types
-//---------------------------------------------------------------------------
-
-let NormalizeDeclaredTyparsForEquiRecursiveInference g tps = 
-    match tps with 
-    | [] -> []
-    | tps -> 
-        tps |> List.map (fun tp -> 
-          let ty =  mk_typar_ty tp
-          if is_anypar_typ g ty then dest_anypar_typ g ty else tp)
-
-let dest_forall_typ g ty = 
-    let tps,tau = prim_dest_forall_typ g ty 
-    // tps may be have been equated to other tps in equi-recursive type inference 
-    // and unit type inference. Normalize them here 
-    let tps = NormalizeDeclaredTyparsForEquiRecursiveInference g tps
-    tps,tau
-
-let try_dest_forall_typ g ty = 
-    if is_forall_typ g ty then dest_forall_typ g ty else ([],ty) 
-
-
-let rec strip_fun_typ g ty = 
-    if is_fun_typ g ty then 
-        let (d,r) = dest_fun_typ g ty 
-        let more,rty = strip_fun_typ g r 
-        d::more, rty
-    else [],ty
-
-let reduce_forall_typ g ty tyargs = 
-    let tps,tau = dest_forall_typ g ty
-    InstType (mk_typar_inst tps tyargs) tau
-
-let reduce_iterated_fun_ty g ty args = 
-    List.fold (fun ty _ -> 
-        if not (is_fun_typ g ty) then failwith "reduce_iterated_fun_ty";
-        snd (dest_fun_typ g ty)) ty args
-
-let apply_types g functy (tyargs,argtys) = 
-    let after_tyapp_ty = if is_forall_typ g functy then reduce_forall_typ g functy tyargs else functy
-    reduce_iterated_fun_ty g after_tyapp_ty argtys
-
-let formal_apply_types g functy (tyargs,args) = 
-    reduce_iterated_fun_ty g
-      (if isNil tyargs then functy else snd (dest_forall_typ g functy))
-      args
-
-let rec strip_fun_typ_upto g n ty = 
-    assert (n >= 0);
-    if n > 0 && is_fun_typ g ty then 
-        let (d,r) = dest_fun_typ g ty
-        let more,rty = strip_fun_typ_upto g (n-1) r in d::more, rty
-    else [],ty
-
-        
-let try_dest_tuple_typ g ty = 
-    if is_tuple_typ g ty then dest_tuple_typ g ty else [ty]
-
-type UncurriedArgInfos = (typ * TopArgInfo) list 
-type CurriedArgInfos = (typ * TopArgInfo) list list
-
-(* A 'tau' type is one with its type paramaeters stripped off *)
-let GetTopTauTypeInFSharpForm g (curriedArgInfos: TopArgInfo list list) tau m =
-    let argtys,rty = strip_fun_typ_upto g curriedArgInfos.Length tau
-    if curriedArgInfos.Length <> argtys.Length then 
-        error(Error("Invalid member signature encountered because of an earlier error",m))
-    let argtysl = 
-        (curriedArgInfos,argtys) ||> List.map2 (fun argInfos argty -> 
-            match argInfos with 
-            | [] -> [ (g.unit_ty, TopValInfo.unnamedTopArg1) ]
-            | [argInfo] -> [ (argty, argInfo) ]
-            | _ -> List.zip (dest_tuple_typ g argty) argInfos) 
-    argtysl,rty
-
-let dest_top_forall_type g (TopValInfo (ntps,argInfos,retInfo) as topValInfo) ty =
-    let tps,tau = (if isNil ntps then [],ty else try_dest_forall_typ g ty)
-#if CHECKED
-    if tps.Length <> kinds.Length then failwith (sprintf "dest_top_forall_type: internal error, #tps = %d, #ntps = %d" (List.length tps) ntps);
-#endif
-    (* tps may be have been equated to other tps in equi-recursive type inference. Normalize them here *)
-    let tps = NormalizeDeclaredTyparsForEquiRecursiveInference g tps
-    tps,tau
-
-let GetTopValTypeInFSharpForm g (TopValInfo(_,argInfos,retInfo) as topValInfo) ty m =
-    let tps,tau = dest_top_forall_type g topValInfo ty
-    let argtysl,rty = GetTopTauTypeInFSharpForm g argInfos tau m
-    tps,argtysl,rty,retInfo
-
-let IsCompiledAsStaticValue g (v:Val) = 
-    (isSome v.TopValInfo &&
-     match GetTopValTypeInFSharpForm g v.TopValInfo.Value v.Type v.Range with 
-     | [],[], _,_ when not v.IsMember -> true
-     | _ -> false) 
-
-//-------------------------------------------------------------------------
-// Multi-dimensional array types...
-//-------------------------------------------------------------------------
-
-let is_il_arr_tcref g tcr = 
-    tcref_eq g tcr g.il_arr1_tcr || 
-    tcref_eq g tcr g.il_arr2_tcr || 
-    tcref_eq g tcr g.il_arr3_tcr || 
-    tcref_eq g tcr g.il_arr4_tcr 
-
-let rank_of_il_arr_tcref g tcr = 
-    if tcref_eq g tcr g.il_arr1_tcr then 1
-    elif tcref_eq g tcr g.il_arr2_tcr then 2
-    elif tcref_eq g tcr g.il_arr3_tcr then 3
-    elif tcref_eq g tcr g.il_arr4_tcr then 4
-    else failwith "rank_of_il_arr_tcref: unsupported array rank"
-
-//-------------------------------------------------------------------------
-// Misc functions on F# types
-//------------------------------------------------------------------------- 
-
-let get_array_element_typ (g:TcGlobals) ty =
-    let tcr,tinst = dest_stripped_tyapp_typ g ty
-    match tinst with 
-    | [ty] -> ty
-    | _ -> failwith "get_array_element_typ";
-
-let is_il_arr_typ g ty =
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> is_il_arr_tcref g tcref
-
-let is_il_arr1_typ g ty =
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> tcref_eq g tcref g.il_arr1_tcr 
-
-let dest_il_arr1_typ g ty = get_array_element_typ g ty
-
-let is_compat_array_typ g ty = 
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> tcref_eq g g.array_tcr tcref
-
-let is_unit_typ g ty = 
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> tcref_eq g g.unit_tcr_canon tcref
-
-let is_obj_typ g ty = 
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> tcref_eq g g.system_Object_tcref tcref
-
-let is_void_typ (g:TcGlobals) ty = 
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> tcref_eq g g.system_Void_tcref tcref
-
-let is_il_named_typ g ty = 
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> tcref.IsILTycon
-
-
-let is_il_class_typ g ty = 
-    (is_il_named_typ g ty &&
-     let tcref,tinst = dest_stripped_tyapp_typ g ty
-     (tcref.ILTyconRawMetadata.tdKind = TypeDef_class))
-
-let is_il_interface_typ g ty = 
-    (is_il_named_typ g ty && 
-     let tcr,tinst = dest_stripped_tyapp_typ g ty
-     (tcr.ILTyconRawMetadata.tdKind = TypeDef_interface))
-
-let is_il_ref_typ g ty = 
-    (is_il_named_typ g ty && 
-     let tcref,tinst = dest_stripped_tyapp_typ g ty
-     not (is_value_or_enum_tdef tcref.ILTyconRawMetadata)) ||
-    is_il_arr_typ g ty
-
-
-let is_il_enum_tycon (tycon:Tycon) = 
-    (tycon.IsILTycon && tycon.ILTyconRawMetadata.IsEnum)
-
-let is_il_interface_tycon (tycon:Tycon) = 
-    (tycon.IsILTycon && (tycon.ILTyconRawMetadata.tdKind = TypeDef_interface))
-
-let is_il_delegate_tcref (tcref:TyconRef) = 
-    if tcref.IsILTycon then 
-        match tcref.ILTyconRawMetadata.tdKind with
-        | TypeDef_delegate -> true
-        | _ -> false
-    else false
-
-let is_any_array_typ g ty =  is_il_arr_typ g ty || is_compat_array_typ g ty
-let dest_any_array_typ g ty = get_array_element_typ g ty
-let rank_of_any_array_typ g ty = 
-    if is_il_arr_typ g ty then 
-        rank_of_il_arr_tcref g (tcref_of_stripped_typ g ty)
-    else 1
-
-let is_fsobjmodel_ref_typ g ty = 
-    is_fsobjmodel_typ g ty && 
-    let tcr,tinst = dest_stripped_tyapp_typ g ty
-    match tcr.FSharpObjectModelTypeInfo.fsobjmodel_kind with 
-    | TTyconClass | TTyconInterface   | TTyconDelegate _ -> true
-    | TTyconStruct | TTyconEnum -> false
-
-let is_tycon_kind_struct k = 
-    match k with 
-    | TTyconClass | TTyconInterface   | TTyconDelegate _ -> false
-    | TTyconStruct | TTyconEnum -> true
-
-let is_tycon_kind_enum k = 
-    match k with 
-    | TTyconStruct | TTyconClass | TTyconInterface   | TTyconDelegate _  -> false
-    | TTyconEnum -> true
-
-let is_fsobjmodel_class_tycon (x:Tycon) = 
-    x.IsFSharpObjectModelTycon &&
-    match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconClass -> true | _ -> false
-
-let is_fsobjmodel_class_typ     g ty = is_stripped_tyapp_typ g ty && is_fsobjmodel_class_tycon (tycon_of_stripped_typ g ty)
-let is_fsobjmodel_struct_typ    g ty = is_stripped_tyapp_typ g ty && (tycon_of_stripped_typ g ty).IsFSharpStructTycon
-let is_fsobjmodel_interface_typ g ty = is_stripped_tyapp_typ g ty && (tycon_of_stripped_typ g ty).IsFSharpInterfaceTycon
-let is_fsobjmodel_delegate_typ  g ty = is_stripped_tyapp_typ g ty && (tycon_of_stripped_typ g ty).IsFSharpDelegateTycon
-
-let is_delegate_typ g ty = 
-    is_fsobjmodel_delegate_typ g ty ||
-     match try_tcref_of_stripped_typ g ty with 
-     | Some tcref -> is_il_delegate_tcref tcref
-     | _ -> false
-
-let is_interface_typ g ty = 
-    is_il_interface_typ g ty || 
-    is_fsobjmodel_interface_typ g ty
-
-let is_class_typ g ty = 
-    is_il_class_typ g ty || 
-    is_fsobjmodel_class_typ g ty
-
-let is_ref_typ g ty = 
-    is_union_typ g ty || 
-    is_compat_array_typ g ty ||
-    (is_tuple_typ g ty && not (is_tuple_struct_typ g ty)) || 
-    is_recd_typ g ty || 
-    is_il_ref_typ g ty ||
-    is_fun_typ g ty || 
-    is_repr_hidden_typ g ty || 
-    is_fsobjmodel_ref_typ g ty || 
-    is_unit_typ g ty
-
-let is_struct_typ g ty = 
-    (is_stripped_tyapp_typ g ty && (tycon_of_stripped_typ g ty).IsStructTycon) || is_tuple_struct_typ g ty
-
-let is_enum_tycon x = 
-    is_il_enum_tycon x || x.IsFSharpEnumTycon
-
-let is_interface_tycon x = 
-    is_il_interface_tycon x || x.IsFSharpInterfaceTycon
-
-let is_enum_tcref tcref = is_enum_tycon (deref_tycon tcref)
-let is_struct_tcref (tcref:TyconRef) = tcref.IsStructTycon
-let is_interface_tcref tcref = is_interface_tycon (deref_tycon tcref)
-
-let is_enum_typ g ty = 
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> is_enum_tcref tcref
-
-let actual_rty_of_slotsig parentTyInst methTyInst (TSlotSig(_,_,parentFormalTypars,methFormalTypars,_,formalRetTy)) = 
-    let methTyInst = mk_typar_inst methFormalTypars methTyInst
-    let parentTyInst = mk_typar_inst parentFormalTypars parentTyInst
-    Option.map (InstType (parentTyInst @ methTyInst)) formalRetTy
-
-let slotsig_has_void_rty (TSlotSig(_,_,_,_,_,formalRetTy)) = 
-    isNone formalRetTy 
-
-let rty_of_tmethod g (TObjExprMethod((TSlotSig(_,parentTy,_,_,_,_) as ss),methFormalTypars,_,_,m)) =
-    let tinst = tinst_of_stripped_typ g parentTy
-    let methTyInst = generalize_typars methFormalTypars
-    actual_rty_of_slotsig tinst methTyInst ss
-
-/// Is the type 'abstract' in C#-speak
-let is_partially_implemented_tycon (tycon:Tycon) = 
-    if tycon.IsFSharpObjectModelTycon then 
-      not tycon.IsFSharpDelegateTycon && 
-      tycon.TypeContents.tcaug_abstract 
-    else 
-      (tycon.IsILTycon && tycon.ILTyconRawMetadata.IsAbstract)
-
-//---------------------------------------------------------------------------
-// Find all type variables in a type, apart from those that have had 
-// an equation assigned by type inference.
-//---------------------------------------------------------------------------
-
-let empty_free_locvals = Zset.empty val_spec_order
-let union_free_locvals s1 s2 = 
-    if s1 == empty_free_locvals then s2
-    elif s2 == empty_free_locvals then s1
-    else Zset.union s1 s2
-
-let empty_free_rfields = Zset.empty rfref_order
-let union_free_rfields s1 s2 = 
-    if s1 == empty_free_rfields then s2
-    elif s2 == empty_free_rfields then s1
-    else Zset.union s1 s2
-
-let empty_free_ucases = Zset.empty ucref_order
-let union_free_ucases s1 s2 = 
-    if s1 == empty_free_ucases then s2
-    elif s2 == empty_free_ucases then s1
-    else Zset.union s1 s2
-
-let empty_free_loctycons = Zset.empty tycon_spec_order
-let union_free_loctycons s1 s2 = 
-    if s1 == empty_free_loctycons then s2
-    elif s2 == empty_free_loctycons then s1
-    else Zset.union s1 s2
-
-let typar_spec_order (v1:Typar) (v2:Typar) = compare v1.Stamp v2.Stamp (* type instanced *) 
-
-let empty_free_loctypars = Zset.empty typar_spec_order
-let union_free_loctypars s1 s2 = 
-    if s1 == empty_free_loctypars then s2
-    elif s2 == empty_free_loctypars then s1
-    else Zset.union s1 s2
-
-let empty_free_tyvars =  
-    { FreeTycons=empty_free_loctycons; 
-      /// The summary of values used as trait solutions
-      FreeTraitSolutions=empty_free_locvals;
-      FreeTypars=empty_free_loctypars}
-
-let union_free_tyvars fvs1 fvs2 = 
-    if fvs1 == empty_free_tyvars then fvs2 else 
-    if fvs2 == empty_free_tyvars then fvs1 else
-    { FreeTycons           = union_free_loctycons fvs1.FreeTycons fvs2.FreeTycons;
-      FreeTraitSolutions   = union_free_locvals fvs1.FreeTraitSolutions fvs2.FreeTraitSolutions;
-      FreeTypars           = union_free_loctypars fvs1.FreeTypars fvs2.FreeTypars }
-
-type FreeVarOptions = 
-    { canCache: bool;
-      collectInTypes: bool
-      includeLocalTycons: bool;
-      includeTypars: bool; 
-      includeLocalTyconReprs: bool;
-      includeRecdFields : bool; 
-      includeUnionCases : bool;
-      includeLocals : bool }
-      
-let CollectAllNoCaching = 
-        { canCache=false;
-          collectInTypes=true;
-          includeLocalTycons=true;
-          includeLocalTyconReprs=true;
-          includeRecdFields =true; 
-          includeUnionCases=true;
-          includeTypars=true; 
-          includeLocals=true }
-
-let CollectTyparsNoCaching = 
-        { canCache=false;
-          collectInTypes=true;
-          includeLocalTycons=false;
-          includeTypars=true; 
-          includeLocalTyconReprs=false;
-          includeRecdFields =false; 
-          includeUnionCases=false;
-          includeLocals=false }
-
-let CollectLocalsNoCaching = 
-        { canCache=false;
-          collectInTypes=false;
-          includeLocalTycons=false;
-          includeTypars=false; 
-          includeLocalTyconReprs=false;
-          includeRecdFields =false; 
-          includeUnionCases=false;
-          includeLocals=true }
-
-let CollectTyparsAndLocalsNoCaching = 
-        { canCache=false;
-          collectInTypes=true;
-          includeLocalTycons=false;
-          includeLocalTyconReprs=false;
-          includeRecdFields =false; 
-          includeUnionCases=false;
-          includeTypars=true; 
-          includeLocals=true }
-
-let CollectAll =
-        { canCache=false; 
-          collectInTypes=true;
-          includeLocalTycons=true;
-          includeLocalTyconReprs=true;
-          includeRecdFields =true; 
-          includeUnionCases=true;
-          includeTypars=true; 
-          includeLocals=true }
-    
-let CollectTyparsAndLocals = // CollectAll
-        { canCache=true; // only cache for this one
-          collectInTypes=true;
-          includeTypars=true; 
-          includeLocals=true;
-          includeLocalTycons=false;
-          includeLocalTyconReprs=false;
-          includeRecdFields =false; 
-          includeUnionCases=false; }
-
-
-let CollectTypars = CollectTyparsAndLocals
-(*
-        { canCache=false; 
-          collectInTypes=true;
-          includeTypars=true; 
-          includeLocals=false; 
-          includeLocalTycons=false;
-          includeLocalTyconReprs=false;
-          includeRecdFields =false; 
-          includeUnionCases=false;}
-*)
-
-let CollectLocals = CollectTyparsAndLocals
-(*
-        { canCache=false; 
-          collectInTypes=false;
-          includeLocalTycons=false;
-          includeLocalTyconReprs=false;
-          includeRecdFields =false; 
-          includeUnionCases=false;
-          includeTypars=false; 
-          includeLocals=true }
-*)
-
-
-let acc_free_loctycon opts x acc = 
-    if not opts.includeLocalTycons then acc else
-    if Zset.mem x acc.FreeTycons then acc else 
-    {acc with FreeTycons = Zset.add x acc.FreeTycons } 
-
-let acc_free_tycon opts (tcr:TyconRef) acc = 
-    if not opts.includeLocalTycons then acc else
-    match tcr.IsLocalRef with 
-    | true -> acc_free_loctycon opts tcr.PrivateTarget acc
-    | _ -> acc
-
-let rec bound_typars opts tps acc = 
-    // Bound type vars form a recursively-referential set due to constraints, e.g.  A : I, B : I 
-    // So collect up free vars in all constraints first, then bind all variables 
-    let acc = List.foldBack (fun (tp:Typar) acc -> acc_free_in_typar_constraints opts tp.Constraints acc) tps acc
-    List.foldBack (fun tp acc -> {acc with FreeTypars = Zset.remove tp acc.FreeTypars}) tps acc
-
-and acc_free_in_typar_constraints opts cxs acc =
-    List.foldBack (acc_free_in_typar_constraint opts) cxs acc
-
-and acc_free_in_typar_constraint opts tpc acc =
-    match tpc with 
-    | TTyparCoercesToType(typ,m) -> acc_free_in_type opts typ acc
-    | TTyparMayResolveMemberConstraint (traitInfo,_) -> acc_free_in_trait opts traitInfo acc
-    | TTyparDefaultsToType(_,rty,_) -> acc_free_in_type opts rty acc
-    | TTyparSimpleChoice(tys,_) -> acc_free_in_types opts tys acc
-    | TTyparIsEnum(uty,m) -> acc_free_in_type opts uty acc
-    | TTyparIsDelegate(aty,bty,m) -> acc_free_in_type opts aty (acc_free_in_type opts bty acc)
-    | TTyparSupportsNull _ | TTyparIsNotNullableValueType _ | TTyparIsReferenceType _ 
-    | TTyparRequiresDefaultConstructor _ -> acc
-
-and acc_free_in_trait opts (TTrait(typs,_,_,argtys,rty,sln)) acc = 
-    Option.fold_right (acc_free_in_trait_sln opts) sln.Value
-       (acc_free_in_types opts typs 
-         (acc_free_in_types opts argtys 
-           (Option.fold_right (acc_free_in_type opts) rty acc)))
-
-and acc_free_in_trait_sln opts sln acc = 
-    match sln with 
-    | ILMethSln(typ,extOpt,mref,minst) ->
-         acc_free_in_type opts typ 
-            (acc_free_in_types opts minst acc)
-    | FSMethSln(typ, vref,minst) ->
-         acc_free_in_type opts typ 
-            (acc_free_trait_sln_vref opts vref  
-               (acc_free_in_types opts minst acc))
-    | BuiltInSln -> acc
-
-and acc_free_trait_sln_locval opts v fvs =
-    if Zset.mem v fvs.FreeTraitSolutions then fvs 
-    else 
-        let fvs =  acc_free_in_val opts v fvs
-        {fvs with FreeTraitSolutions=Zset.add v fvs.FreeTraitSolutions}
-and acc_free_trait_sln_vref opts (vref:ValRef) fvs = 
-    match vref.IsLocalRef with 
-    | true -> acc_free_trait_sln_locval opts vref.PrivateTarget fvs
-    // non-local values do not contain free variables 
-    | _ -> fvs
-
-and acc_free_tpref opts (tp:Typar) acc = 
-    if not opts.includeTypars then acc else
-    if Zset.mem tp acc.FreeTypars then acc
-    else 
-      acc_free_in_typar_constraints opts tp.Constraints
-        {acc with FreeTypars=Zset.add tp acc.FreeTypars}
-
-and acc_free_in_type opts ty acc  = 
-    match strip_tpeqns ty with 
-    | TType_tuple l -> acc_free_in_types opts l acc
-    | TType_app (tc,tinst) -> 
-        let acc = acc_free_tycon opts tc  acc
-        match tinst with 
-        | [] -> acc  // optimization to avoid unneeded call
-        | _ -> acc_free_in_types opts tinst acc
-    | TType_ucase (UCRef(tc,_),tinst) -> acc_free_in_types opts tinst (acc_free_tycon opts tc  acc)
-    | TType_fun (d,r) -> acc_free_in_type opts d (acc_free_in_type opts r acc)
-    | TType_var r -> acc_free_tpref opts r acc
-    | TType_forall (tps,r) -> union_free_tyvars (bound_typars opts tps (free_in_type opts r)) acc
-    | TType_modul_bindings -> failwith "acc_free_in_type opts: naked struct"
-    | TType_measure unt -> acc_free_in_unit opts unt acc
-and acc_free_in_unit opts unt acc = List.foldBack (fun (tp,_) acc -> acc_free_tpref opts tp acc) (ListMeasureVarOccsWithNonZeroExponents unt) acc
-and acc_free_in_types opts tys acc = 
-    match tys with 
-    | [] -> acc
-    | h :: t -> acc_free_in_type opts h (acc_free_in_types opts t acc)
-and free_in_type opts ty = acc_free_in_type opts ty empty_free_tyvars
-
-and acc_free_in_val opts (v:Val) acc = acc_free_in_type opts v.Data.val_type acc
-
-let free_in_types opts tys = acc_free_in_types opts tys empty_free_tyvars
-let free_in_val opts v = acc_free_in_val opts v empty_free_tyvars
-let free_in_typar_constraints opts v = acc_free_in_typar_constraints opts v empty_free_tyvars
-let acc_free_tprefs opts tps acc = List.foldBack (acc_free_tpref opts) tps acc
-        
-
-//--------------------------------------------------------------------------
-// Free in type, left-to-right order preserved. This is used to determine the
-// order of type variables for top-level definitions based on their signature,
-// so be careful not to change the order.  We accumulate in reverse
-// order.
-//--------------------------------------------------------------------------
-
-let empty_free_typars_lr = []
-let union_free_typars_lr fvs1 fvs2 = ListSet.unionFavourRight typar_ref_eq fvs1 fvs2
-
-let rec bound_typars_lr g cxFlag thruFlag acc tps = 
-    (* Bound type vars form a recursively-referential set due to constraints, e.g.  A : I, B : I *)
-    (* So collect up free vars in all constraints first, then bind all variables *)
-    let acc = List.fold (fun acc (tp:Typar) -> acc_free_in_typar_constraints_lr g cxFlag thruFlag acc tp.Constraints) tps acc
-    List.foldBack (ListSet.remove typar_ref_eq) tps acc
-
-and acc_free_in_typar_constraints_lr g cxFlag thruFlag acc cxs =
-    List.fold (acc_free_in_typar_constraint_lr g cxFlag thruFlag) acc cxs 
-
-and acc_free_in_typar_constraint_lr g cxFlag thruFlag acc tpc =
-    match tpc with 
-    | TTyparCoercesToType(typ,m) -> acc_free_in_type_lr g cxFlag thruFlag acc typ 
-    | TTyparMayResolveMemberConstraint (traitInfo,_) -> acc_free_in_trait_lr g cxFlag thruFlag acc traitInfo 
-    | TTyparDefaultsToType(_,rty,_) -> acc_free_in_type_lr g cxFlag thruFlag acc rty 
-    | TTyparSimpleChoice(tys,_) -> acc_free_in_types_lr g cxFlag thruFlag acc tys 
-    | TTyparIsEnum(uty,m) -> acc_free_in_type_lr g cxFlag thruFlag acc uty
-    | TTyparIsDelegate(aty,bty,m) -> acc_free_in_type_lr g cxFlag thruFlag (acc_free_in_type_lr g cxFlag thruFlag acc aty) bty  
-    | TTyparSupportsNull _ | TTyparIsNotNullableValueType _ | TTyparIsReferenceType _ 
-    | TTyparRequiresDefaultConstructor _ -> acc
-
-and acc_free_in_trait_lr g cxFlag thruFlag acc (TTrait(typs,_,_,argtys,rty,_))  = 
-    let acc = acc_free_in_types_lr g cxFlag thruFlag acc typs
-    let acc = acc_free_in_types_lr g cxFlag thruFlag acc argtys
-    let acc = Option.fold_left (acc_free_in_type_lr g cxFlag thruFlag) acc rty
-    acc
-
-and acc_free_tpref_lr g cxFlag thruFlag acc (tp:Typar) = 
-    if ListSet.mem typar_ref_eq tp acc 
-    then acc
-    else 
-        let acc = (ListSet.insert typar_ref_eq tp acc)
-        if cxFlag then 
-            acc_free_in_typar_constraints_lr g cxFlag thruFlag acc tp.Constraints
-        else 
-            acc
-
-and acc_free_in_type_lr g cxFlag thruFlag acc ty  = 
-    if verbose then  dprintf "--> acc_free_in_type_lr \n";
-    match (if thruFlag then strip_tpeqns_and_tcabbrevs g ty else strip_tpeqns ty) with 
-    | TType_tuple l -> acc_free_in_types_lr g cxFlag thruFlag acc l 
-    | TType_app (_,tinst) -> acc_free_in_types_lr g cxFlag thruFlag acc tinst 
-    | TType_ucase (_,tinst) -> acc_free_in_types_lr g cxFlag thruFlag acc tinst 
-    | TType_fun (d,r) -> acc_free_in_type_lr g cxFlag thruFlag (acc_free_in_type_lr g cxFlag thruFlag acc d ) r
-    | TType_var r -> acc_free_tpref_lr g cxFlag thruFlag acc r 
-    | TType_forall (tps,r) -> union_free_typars_lr (bound_typars_lr g cxFlag thruFlag tps (acc_free_in_type_lr g cxFlag thruFlag empty_free_typars_lr r)) acc
-    | TType_modul_bindings -> failwith "acc_free_in_type_lr: naked struct"
-    | TType_measure unt -> List.foldBack (fun (tp,_) acc -> acc_free_tpref_lr g cxFlag thruFlag acc tp) (ListMeasureVarOccsWithNonZeroExponents unt) acc
-
-and acc_free_in_types_lr g cxFlag thruFlag acc tys = 
-    match tys with 
-    | [] -> acc
-    | h :: t -> acc_free_in_types_lr g cxFlag thruFlag (acc_free_in_type_lr g cxFlag thruFlag acc h) t
-    
-let free_in_type_lr g thruFlag ty = acc_free_in_type_lr g true thruFlag empty_free_typars_lr ty |> List.rev
-let free_in_types_lr g thruFlag ty = acc_free_in_types_lr g true thruFlag empty_free_typars_lr ty |> List.rev
-let free_in_types_lr_no_cxs g ty = acc_free_in_types_lr g false true empty_free_typars_lr ty |> List.rev
-
-let var_of_bind (b:Binding) = b.Var
-let rhs_of_bind (b:Binding) = b.Expr
-let vars_of_Bindings (binds:Bindings) = binds |> FlatList.map (fun b -> b.Var)
-let vars_of_binds (binds:Binding list) = binds |> List.map (fun (b:Binding) -> b.Var)
-
-let bind_order (v1:Binding) (v2:Binding) = val_spec_order v1.Var v2.Var
-
-//---------------------------------------------------------------------------
-// Equivalence of types up to alpha-equivalence 
-//---------------------------------------------------------------------------
-
-type TypeEquivEnv = 
-    { ae_typars: TyparMap;
-      ae_tcrefs: TyconRefRemap}
-
-let tyeq_env_empty = { ae_typars=tpmap_empty(); ae_tcrefs=empty_tcref_remap }
-
-let bind_tyeq_env_types tps1 tys2 aenv =
-    {aenv with ae_typars=List.fold_right2 tpmap_add tps1 tys2 aenv.ae_typars}
-
-let bind_tyeq_env_typars tps1 tps2 aenv =
-    bind_tyeq_env_types tps1 (List.map mk_typar_ty tps2) aenv
-
-let bind_tyeq_env_tpinst tpinst aenv =
-    let tps,tys = List.unzip tpinst
-    bind_tyeq_env_types tps tys aenv
-
-let mk_tyeq_env tps1 tps2 = bind_tyeq_env_typars tps1 tps2 tyeq_env_empty
-
-let rec traits_aequiv_aux erasureFlag g aenv (TTrait(typs1,nm,mf1,argtys,rty,_)) (TTrait(typs2,nm2,mf2,argtys2,rty2,_)) =
-   ListSet.equals (type_aequiv_aux erasureFlag g aenv) typs1 typs2 &&
-   mf1 = mf2 && 
-   return_types_aequiv_aux erasureFlag g aenv rty rty2 && 
-   List.lengthsEqAndForall2 (type_aequiv_aux erasureFlag g aenv) argtys argtys2 &&
-   nm = nm2
-
-and return_types_aequiv_aux erasureFlag g aenv rty rty2 =
-    match rty,rty2 with  
-    | None,None -> true
-    | Some t1,Some t2 -> type_aequiv_aux erasureFlag g aenv t1 t2
-    | _ -> false
-
-    
-and typarConstraints_aequiv_aux erasureFlag g aenv tpc1 tpc2 =
-    match tpc1,tpc2 with
-    | TTyparCoercesToType(acty,_),
-      TTyparCoercesToType(fcty,_) -> 
-        type_aequiv_aux erasureFlag g aenv acty fcty
-
-    | TTyparMayResolveMemberConstraint(trait1,_),
-      TTyparMayResolveMemberConstraint(trait2,_) -> 
-        traits_aequiv_aux erasureFlag g aenv trait1 trait2 
-
-    | TTyparDefaultsToType(_,acty,_),
-      TTyparDefaultsToType(_,fcty,_) -> 
-        type_aequiv_aux erasureFlag g aenv acty fcty
-
-    | TTyparIsEnum(uty1,_),TTyparIsEnum(uty2,_) -> 
-        type_aequiv_aux erasureFlag g aenv uty1 uty2
-
-    | TTyparIsDelegate(aty1,bty1,_),TTyparIsDelegate(aty2,bty2,_) -> 
-        type_aequiv_aux erasureFlag g aenv aty1 aty2 && 
-        type_aequiv_aux erasureFlag g aenv bty1 bty2 
-
-    | TTyparSimpleChoice (tys1,_),TTyparSimpleChoice(tys2,_) -> 
-        ListSet.equals (type_aequiv_aux erasureFlag g aenv) tys1 tys2
-
-    | TTyparSupportsNull _               ,TTyparSupportsNull _ 
-    | TTyparIsNotNullableValueType _    ,TTyparIsNotNullableValueType _
-    | TTyparIsReferenceType _           ,TTyparIsReferenceType _ 
-    | TTyparRequiresDefaultConstructor _, TTyparRequiresDefaultConstructor _ -> true
-    | _ -> false
-
-and typarConstraintSets_aequiv_aux erasureFlag g aenv (tp1:Typar) (tp2:Typar) = 
-    tp1.StaticReq = tp2.StaticReq &&
-    ListSet.equals (typarConstraints_aequiv_aux erasureFlag g aenv) tp1.Constraints tp2.Constraints
-
-and typar_decls_aequiv_aux erasureFlag g aenv tps1 tps2 = 
-    List.length tps1 = List.length tps2 &&
-    let aenv = bind_tyeq_env_typars tps1 tps2 aenv
-    List.for_all2 (typarConstraintSets_aequiv_aux erasureFlag g aenv) tps1 tps2
-
-and tcref_aequiv g aenv tc1 tc2 = 
-    tcref_eq g tc1 tc2 || 
-    (tcref_map_mem tc1 aenv.ae_tcrefs && tcref_eq g (tcref_map_find tc1 aenv.ae_tcrefs) tc2)
-
-and type_aequiv_aux erasureFlag g aenv ty1 ty2 = 
-    if verbose then  dprintf "--> type_aequiv...\n";
-    let ty1 = strip_tpeqns_and_tcabbrevs_wrt_erasure erasureFlag g ty1 
-    let ty2 = strip_tpeqns_and_tcabbrevs_wrt_erasure erasureFlag g ty2
-    match ty1, ty2 with
-    | TType_forall(tps1,rty1), TType_forall(tps2,rty2) -> 
-        typar_decls_aequiv_aux erasureFlag g aenv tps1 tps2 && type_aequiv_aux erasureFlag g (bind_tyeq_env_typars tps1 tps2 aenv) rty1 rty2
-    | TType_var tp1, TType_var tp2 when typar_ref_eq tp1 tp2 -> 
-        true
-    | TType_var tp1, _ when tpmap_mem tp1 aenv.ae_typars -> 
-        type_equiv_aux erasureFlag g (tpmap_find tp1 aenv.ae_typars) ty2
-    | TType_app (tc1,b1)  ,TType_app (tc2,b2) -> 
-        tcref_aequiv g aenv tc1 tc2 &&
-        types_aequiv_aux erasureFlag g aenv b1 b2
-    | TType_ucase (UCRef(tc1,n1),b1)  ,TType_ucase (UCRef(tc2,n2),b2) -> 
-        n1=n2 &&
-        tcref_aequiv g aenv tc1 tc2 &&
-        types_aequiv_aux erasureFlag g aenv b1 b2
-    | TType_tuple l1,TType_tuple l2 -> 
-        types_aequiv_aux erasureFlag g aenv l1 l2
-    | TType_fun (dtys1,rty1),TType_fun (dtys2,rty2) -> 
-        type_aequiv_aux erasureFlag g aenv dtys1 dtys2 && type_aequiv_aux erasureFlag g aenv rty1 rty2
-    | TType_measure m1, TType_measure m2 -> 
-        match erasureFlag with EraseNone -> measure_aequiv g aenv m1 m2 | _ -> true 
-    | _ -> false
-
-and measure_aequiv g aenv un1 un2 =
-    let vars1 = ListMeasureVarOccs un1
-    let trans tp1 = if tpmap_mem tp1 aenv.ae_typars then dest_anypar_typ g (tpmap_find tp1 aenv.ae_typars) else tp1
-    let remap_tcref tc = if tcref_map_mem tc aenv.ae_tcrefs then tcref_map_find tc aenv.ae_tcrefs else tc
-    let vars1' = List.map trans vars1
-    let vars2 = ListSet.subtract typar_ref_eq (ListMeasureVarOccs un2) vars1'
-    let cons1 = ListMeasureConOccsAfterRemapping g remap_tcref un1
-    let cons2 = ListMeasureConOccsAfterRemapping g remap_tcref un2 
- 
-    List.forall (fun v -> MeasureVarExponent v un1 = MeasureVarExponent (trans v) un2) vars1 &&
-    List.forall (fun v -> MeasureVarExponent v un1 = MeasureVarExponent v un2) vars2 &&
-    List.forall (fun c -> MeasureConExponentAfterRemapping g remap_tcref c un1 = MeasureConExponentAfterRemapping g remap_tcref c un2) (cons1@cons2)  
-
-and types_aequiv_aux erasureFlag g aenv l1 l2 = List.lengthsEqAndForall2 (type_aequiv_aux erasureFlag g aenv) l1 l2
-and type_equiv_aux erasureFlag g ty1 ty2 =  type_aequiv_aux erasureFlag g tyeq_env_empty ty1 ty2
-
-let type_aequiv g aenv ty1 ty2 = type_aequiv_aux EraseNone g aenv ty1 ty2
-let type_equiv g ty1 ty2 = type_equiv_aux EraseNone g ty1 ty2
-let traits_aequiv g aenv t1 t2 = traits_aequiv_aux EraseNone g aenv t1 t2
-let typarConstraints_aequiv g aenv c1 c2 = typarConstraints_aequiv_aux EraseNone g aenv c1 c2
-let typar_decls_aequiv g aenv d1 d2 = typar_decls_aequiv_aux EraseNone g aenv d1 d2
-let return_types_aequiv g aenv t1 t2 = return_types_aequiv_aux EraseNone g aenv t1 t2
-let measure_equiv g m1 m2 = measure_aequiv g tyeq_env_empty m1 m2
-
-//--------------------------------------------------------------------------
-// Values representing member functions on F# types
-//--------------------------------------------------------------------------
-
-let GetNumObjArgsOfMember memberFlags = 
-    if memberFlags.MemberIsInstance then 1 else 0
-
-let GetNumObjArgsOfVal (v:Val) = 
-    match v.MemberInfo with 
-    | Some membInfo -> GetNumObjArgsOfMember membInfo.MemberFlags
-    | None -> 0
-
-let GetNumObjArgsOfValRef (vref:ValRef) =  GetNumObjArgsOfVal vref.Deref
-
-// Pull apart the type for an F# value that represents an object model method. Do not strip off a 'unit' argument.
-// Review: Should GetMemberTypeInFSharpForm have any other direct callers? 
-let GetMemberTypeInFSharpForm g memberFlags arities ty m = 
-    let tps,argInfos,rty,retInfo = GetTopValTypeInFSharpForm g arities ty m
-    let numObjArgs = GetNumObjArgsOfMember memberFlags
-
-    let argInfos = 
-        if numObjArgs = 1 then 
-            match argInfos with
-            | [] -> 
-                errorR(InternalError("value does not have a valid member type",m)); 
-                argInfos
-            | h::t -> t
-        else argInfos
-    tps,argInfos,rty,retInfo
-
-// Check that an F# value represents an object model method. 
-// It will also always have an arity (inferred from syntax). 
-let check_member_val membInfo arity m =
-    match membInfo, arity with 
-    | None,_ -> error(InternalError("check_member_val - no membInfo" , m))
-    | _,None -> error(InternalError("check_member_val - no arity", m))
-    | Some membInfo,Some arity ->  (membInfo,arity)
-
-let check_member_vref (vref:ValRef) =
-    check_member_val vref.MemberInfo vref.TopValInfo vref.Range
-     
-let GetTopValTypeInCompiledForm g topValInfo typ m =
-    let tps,paramArgInfos,rty,retInfo = GetTopValTypeInFSharpForm g topValInfo typ m
-    // Eliminate lone single unit arguments
-    let paramArgInfos = 
-        match paramArgInfos, topValInfo.ArgInfos with 
-        // static member and module value unit argument elimination
-        | [[(argType,_)]] ,[[]] -> 
-            //assert is_unit_typ g argType 
-            [[]]
-        // instance member unit argument elimination
-        | [objInfo;[(argType,_)]] ,[[objArg];[]] -> 
-            //assert is_unit_typ g argType 
-            [objInfo; []]
-        | _ -> 
-            paramArgInfos
-    let rty = (if is_unit_typ g rty then None else Some rty)
-    (tps,paramArgInfos,rty,retInfo)
-     
-// Pull apart the type for an F# value that represents an object model method
-// and see the "member" form for the type, i.e. 
-// detect methods with no arguments by (effectively) looking for single argument type of 'unit'. 
-// The analysis is driven of the inferred arity information for the value.
-//
-// This is used not only for the compiled form - it's also used for all type checking and object model
-// logic such as determining if abstract methods have been implemented or not, and how
-// many arguments the method takes etc.
-let GetMemberTypeInMemberForm g memberFlags topValInfo typ m =
-    let tps,paramArgInfos,rty,retInfo = GetMemberTypeInFSharpForm g memberFlags topValInfo typ m
-    // Eliminate lone single unit arguments
-    let paramArgInfos = 
-        match paramArgInfos, topValInfo.ArgInfos with 
-        // static member and module value unit argument elimination
-        | [[(argType,_)]] ,[[]] -> 
-            assert is_unit_typ g argType 
-            [[]]
-        // instance member unit argument elimination
-        | [[(argType,_)]] ,[[objArg];[]] -> 
-            assert is_unit_typ g argType 
-            [[]]
-        | _ -> 
-            paramArgInfos
-    let rty = (if is_unit_typ g rty then None else Some rty)
-    (tps,paramArgInfos,rty,retInfo)
-
-let GetTypeOfMemberInMemberForm g (vref:ValRef) =
-    //assert (not vref.IsExtensionMember)
-    let membInfo,topValInfo = check_member_vref vref
-    GetMemberTypeInMemberForm g membInfo.MemberFlags topValInfo vref.Type vref.Range
-
-let GetTypeOfMemberInFSharpForm g (vref:ValRef) =
-    let membInfo,topValInfo = check_member_vref vref
-    GetMemberTypeInFSharpForm g membInfo.MemberFlags topValInfo vref.Type vref.Range
-
-let GetReturnTypeOMemberInMemberForm g (vref:ValRef) =
-    let membInfo,topValInfo = check_member_vref vref
-    let _,_,rty,_ = GetMemberTypeInMemberForm g membInfo.MemberFlags topValInfo vref.Type vref.Range
-    rty
-  
-/// Match up the type variables on an member value with the type 
-/// variables on the apparent enclosing type
-let PartitionValTypars g (v:Val)  = 
-     match v.TopValInfo with 
-     | None -> error(InternalError("PartitionValTypars: not a top value", v.Range))
-     | Some arities -> 
-         let fullTypars,_ = dest_top_forall_type g arities v.Type 
-         let parent = v.MemberApparentParent
-         let parentTypars = parent.TyparsNoRange
-         let nparentTypars = parentTypars.Length
-         if nparentTypars <= fullTypars.Length then 
-             let memberParentTypars,memberMethodTypars = List.chop nparentTypars fullTypars
-             let memberToParentInst,tinst = mk_typar_to_typar_renaming memberParentTypars parentTypars
-             Some(parentTypars,memberParentTypars,memberMethodTypars,memberToParentInst,tinst)
-         else None
-
-let PartitionValRefTypars g vref = PartitionValTypars g (deref_val vref) 
-
-/// Get the arguments for an F# value that represents an object model method 
-let ArgInfosOfMemberVal g (v:Val) = 
-    let membInfo,topValInfo = check_member_val v.MemberInfo v.TopValInfo v.Range
-    let _,arginfos,_,_ = GetMemberTypeInMemberForm g membInfo.MemberFlags topValInfo v.Type v.Range
-    arginfos
-
-let ArgInfosOfMember g vref = 
-    ArgInfosOfMemberVal g (deref_val vref)
-
-let GetFSharpViewOfReturnType g retTy =
-    match retTy with 
-    | None -> g.unit_ty
-    | Some retTy ->  retTy
-
-
-/// Get the property "type" (getter return type) for an F# value that represents a getter or setter
-/// of an object model property.
-let ReturnTypeOfPropertyVal g (v:Val) = 
-    let membInfo,topValInfo = check_member_val v.MemberInfo v.TopValInfo v.Range
-    match membInfo.MemberFlags.MemberKind with 
-    | MemberKindPropertySet ->
-        let _,arginfos,_,_ = GetMemberTypeInMemberForm g membInfo.MemberFlags topValInfo v.Type v.Range
-        if not arginfos.IsEmpty && not arginfos.Head.IsEmpty then
-            arginfos.Head |> List.last |> fst 
-        else
-            error(Error("this value does not have a valid property setter type", v.Range));
-    | MemberKindPropertyGet ->
-        let _,_,rty,_ = GetMemberTypeInMemberForm g membInfo.MemberFlags topValInfo v.Type v.Range
-        GetFSharpViewOfReturnType g rty
-    | _ -> error(InternalError("vtyp_of_prop_vref",v.Range))
-
-
-/// Get the property arguments for an F# value that represents a getter or setter
-/// of an object model property.
-let ArgInfosOfPropertyVal g (v:Val) = 
-    let membInfo,topValInfo = check_member_val v.MemberInfo v.TopValInfo v.Range
-    match membInfo.MemberFlags.MemberKind with 
-    | MemberKindPropertyGet ->
-        ArgInfosOfMemberVal g v |> List.concat
-    | MemberKindPropertySet ->
-        let _,arginfos,_,_ = GetMemberTypeInMemberForm g membInfo.MemberFlags topValInfo v.Type v.Range
-        if not arginfos.IsEmpty && not arginfos.Head.IsEmpty then
-            arginfos.Head |> List.frontAndBack |> fst 
-        else
-            error(Error("this value does not have a valid property setter type", v.Range));
-    | _ -> 
-        error(InternalError("ArgInfosOfPropertyVal",v.Range))
-
-//---------------------------------------------------------------------------
-// Generalize type constructors to types
-//---------------------------------------------------------------------------
-
-let generalize_tcref_tinst (tc:TyconRef) =  generalize_typars tc.TyparsNoRange
-let generalize_tcref tc = 
-    let tinst = generalize_tcref_tinst tc
-    tinst,TType_app(tc, tinst)
-
-let isTTyparSupportsStaticMethod = function TTyparMayResolveMemberConstraint _ -> true | _ -> false
-let isTTyparCoercesToType = function TTyparCoercesToType _ -> true | _ -> false
-
-//--------------------------------------------------------------------------
-// Print Signatures/Types - prelude
-//-------------------------------------------------------------------------- 
-
-let prefix_of_static_req s =
-    match s with 
-    | NoStaticReq -> "'"
-    | HeadTypeStaticReq -> " ^"
-
-let prefix_of_rigid (typar:Typar) =   
-  if (typar.Rigidity <> TyparRigid) then "_" else ""
-
-//---------------------------------------------------------------------------
-// Prettify: PrettyTyparNames/PrettifyTypes - make typar names human friendly
-//---------------------------------------------------------------------------
-
-module PrettyTypes = begin
-
-    let NewPrettyTypar (tp:Typar) nm = 
-        NewTypar (tp.Kind, tp.Rigidity,Typar(ident(nm, tp.Range),tp.StaticReq,false),false,DynamicReq,[])
-
-    let NewPrettyTypars renaming tps names = 
-        let niceTypars = List.map2 NewPrettyTypar tps names
-        let renaming = renaming @ mk_typar_inst tps (generalize_typars niceTypars)
-        (tps,niceTypars) ||> List.iter2 (fun tp tpnice -> fixup_typar_constraints tpnice (inst_typar_constraints renaming tp.Constraints)) ;
-        niceTypars, renaming
-
-    // We choose names for type parameters from 'a'..'t'
-    // We choose names for unit-of-measure from 'u'..'z'
-    // If we run off the end of these ranges, we use 'aX' for positive integer X or 'uX' for positive integer X
-    // Finally, we skip any names already in use
-    let NeedsPrettyTyparName (tp:Typar) = tp.IsCompilerGenerated && (tp.Data.typar_id.idText = unassignedTyparName)
-    let PrettyTyparNames pred alreadyInUse tps = 
-        let rec choose (tps:Typar list) (typeIndex, measureIndex) acc = 
-            match tps with
-            | [] -> List.rev acc
-            | tp::tps ->
-            
-
-                // Use a particular name, possibly after incrementing indexes
-                let useThisName (nm, typeIndex, measureIndex) = 
-                    choose tps (typeIndex, measureIndex) (nm::acc)
-
-                // Give up, try again with incremented indexes
-                let tryAgain (typeIndex, measureIndex) = 
-                    choose (tp::tps) (typeIndex, measureIndex) acc
-
-                let tryName (nm, typeIndex, measureIndex) f = 
-                    if List.mem nm alreadyInUse then 
-                        f()
-                    else
-                        useThisName (nm, typeIndex, measureIndex)
-
-                if pred tp then 
-                    if NeedsPrettyTyparName tp then 
-                        let (typeIndex, measureIndex, baseName, letters, i) = 
-                          match tp.Kind with 
-                          | KindType -> (typeIndex+1,measureIndex,'a',20,typeIndex) 
-                          | KindMeasure -> (typeIndex,measureIndex+1,'u',6,measureIndex)
-                        let nm = 
-                           if i < letters then String.make 1 (char(int baseName + i)) 
-                           else String.make 1 baseName ^ string (i-letters+1)
-                        tryName (nm, typeIndex, measureIndex)  (fun () -> 
-                            tryAgain (typeIndex, measureIndex))
-
-                    else
-                        tryName (tp.Name, typeIndex, measureIndex) (fun () -> 
-                            // Use the next index and append it to the natural name
-                            let (typeIndex, measureIndex, nm) = 
-                              match tp.Kind with 
-                              | KindType -> (typeIndex+1,measureIndex,tp.Name+ string typeIndex) 
-                              | KindMeasure -> (typeIndex,measureIndex+1,tp.Name+ string measureIndex)
-                            tryName (nm,typeIndex, measureIndex) (fun () -> 
-                                tryAgain (typeIndex, measureIndex)))
-                else
-                    useThisName (tp.Name,typeIndex, measureIndex)
-
-                          
-        choose tps (0,0) []
-
-    let PrettifyTypes g foldTys mapTys tys = 
-        let ftps = (foldTys (acc_free_in_type_lr g true false) empty_free_typars_lr tys)
-        (* let ftps = (foldTys (fun x acc -> acc_free_in_type_lr false acc x) tys empty_free_typars_lr) in   *)
-        let ftps = List.rev ftps
-        (* ftps |> List.iter (fun tp -> dprintf "free typar: %d\n" (stamp_of_typar tp)); *)
-        let rec computeKeep (keep:typars) change (tps:typars) = 
-            match tps with 
-            | [] -> List.rev keep, List.rev change 
-            | tp :: rest -> 
-                if not (NeedsPrettyTyparName tp) && (not (keep |> List.exists (fun tp2 -> tp.Name = tp2.Name)))  then
-                    computeKeep (tp :: keep) change rest
-                else 
-                    computeKeep keep (tp :: change) rest
-        let keep,change = computeKeep [] [] ftps
-        
-        (* change |> List.iter (fun tp -> dprintf "change typar: %s %s %d\n" tp.Name (tp.DisplayName) (stamp_of_typar tp));  *)
-        (* keep |> List.iter (fun tp -> dprintf "keep typar: %s %s %d\n" tp.Name (tp.DisplayName) (stamp_of_typar tp));  *)
-        let alreadyInUse = keep |> List.map (fun x -> x.Name)
-        let names = PrettyTyparNames (fun x -> List.memq x change) alreadyInUse ftps
-
-        let niceTypars, renaming = NewPrettyTypars [] ftps names 
-        let prettyTypars = mapTys (InstType renaming) tys
-        (* niceTypars |> List.iter (fun tp -> dprintf "nice typar: %d\n" (stamp_of_typar tp)); *) 
-        let tpconstraints  = niceTypars |> List.collect (fun tpnice -> List.map (fun tpc -> tpnice,tpc) tpnice.Constraints)
-
-        renaming,
-        prettyTypars,
-        tpconstraints
-
-    let PrettifyTypes1   g x = PrettifyTypes g (fun f -> f) (fun f -> f) x
-    let PrettifyTypes2   g x = PrettifyTypes g (fun f -> foldl'2 (f,f)) (fun f -> map'2 (f,f)) x
-    let PrettifyTypesN   g x = PrettifyTypes g List.fold List.map   x
-    let PrettifyTypesN1  g x = PrettifyTypes g (fun f -> foldl'2 (List.fold (foldl1'2  f), f)) (fun f -> map'2 (List.map (map1'2  f),f)) x
-    let PrettifyTypesNN1 g x = PrettifyTypes g (fun f -> foldl'3 (List.fold f, List.fold (foldl1'2 f),f)) (fun f -> map'3 (List.map f, List.map (map1'2  f), f)) x
-    let PrettifyTypesNM1 g x = PrettifyTypes g (fun f -> foldl'3 (List.fold f, List.fold (List.fold (foldl1'2 f)),f)) (fun f -> map'3 (List.map f, List.mapSquared (map1'2  f), f)) x
-
-end
-
-
- 
-module SimplifyTypes = begin
-
-    (* CAREFUL! This function does NOT walk constraints *)
-    let rec FoldType f z typ =
-        let typ = strip_tpeqns typ 
-        let z = f z typ
-        match typ with
-        | TType_forall (tps,body) -> FoldType f z body
-        | TType_app (_,tinst) -> List.fold (FoldType f) z tinst
-        | TType_ucase (_,tinst) -> List.fold (FoldType f) z tinst
-        | TType_tuple typs        -> List.fold (FoldType f) z typs
-        | TType_fun (s,t)         -> FoldType f (FoldType f z s) t
-        | TType_var tp            -> z
-        | TType_modul_bindings            -> z
-        | TType_measure unt          -> z
-
-    let incM x m =
-        if Zmap.mem x m then Zmap.add x (1 + Zmap.find x m) m
-        else Zmap.add x 1 m
-
-    let AccTyparCounts z typ =
-        (* Walk type to determine typars and their counts (for pprinting decisions) *)
-        FoldType (fun z typ -> match typ with | TType_var tp when tp.Rigidity = TyparRigid  -> incM tp z | _ -> z) z typ
-
-    let emptyTyparCounts = Zmap.empty typar_spec_order
-
-    (* print multiple fragments of the same type using consistent naming and formatting *)
-    let AccTyparCountsMulti acc l = List.fold AccTyparCounts acc l
-
-    type TypeSimplificationInfo =
-        { singletons         : Typar Zset.set;
-          inplaceConstraints :  Zmap.map;
-          postfixConstraints : (Typar * TyparConstraint) list; }
-          
-    let typeSimplificationInfo0 = 
-        { singletons         = Zset.empty typar_spec_order;
-          inplaceConstraints = Zmap.empty typar_spec_order;
-          postfixConstraints = [] }
-
-    let CategorizeConstraints simplify m cxs =
-        let singletons = if simplify then Zmap.chooseL (fun tp n -> if n=1 then Some tp else None) m else []
-        let singletons = Zset.addList singletons (Zset.empty typar_spec_order)
-        // Here, singletons are typars that occur once in the type.
-        // However, they may also occur in a type constraint.
-        // If they do, they are really multiple occurance - so we should remove them.
-        let constraintTypars = (free_in_typar_constraints CollectTyparsNoCaching (List.map snd cxs)).FreeTypars
-        let usedInTypeConstraint typar = Zset.mem typar constraintTypars
-        let singletons = singletons |> Zset.filter (usedInTypeConstraint >> not) 
-        (* Here, singletons should really be used once *)
-        let inplace,postfix =
-          cxs |> List.partition (fun (tp,tpc) -> 
-            simplify &&
-            isTTyparCoercesToType tpc && 
-            Zset.mem tp singletons && 
-            tp.Constraints.Length = 1)
-        let inplace = inplace |> List.map (function (tp,TTyparCoercesToType(ty,m)) -> tp,ty | _ -> failwith "not isTTyparCoercesToType")
-        
-        { singletons         = singletons;
-          inplaceConstraints = Zmap.of_list typar_spec_order inplace;
-          postfixConstraints = postfix;
-        }
-    let CollectInfo simplify tys cxs = 
-        CategorizeConstraints simplify (AccTyparCountsMulti emptyTyparCounts tys) cxs 
-        
-end
-
-let rec IterType ((fStripped,fTypars,fTraitSolution) as f) typ =
-    // We iterate the _solved_ constraints as well, to pick up any record of trait constraint solutions
-    // This means we walk _all_ the constraints _everywhere_ in a type, including
-    // those attached to _solved_ type variables. This is used by PostTypecheckSemanticChecks to detect uses of
-    // values as solutions to trait constraints and determine if inference has caused the value to escape its scope.
-    // The only record of these solutions is in the _solved_ constraints of types.
-    // In an ideal world we would, instead, record the solutions to these constraints as "witness variables" in expressions,
-    // rather than solely in types.
-    match typ with 
-    | TType_var tp  when tp.Solution.IsSome  -> 
-        tp.Constraints |> List.iter (fun cx -> 
-            match cx with 
-            | TTyparMayResolveMemberConstraint((TTrait(typs,_,_,argtys,rty,soln)),m) -> 
-                 Option.iter fTraitSolution !soln
-            | _ -> ())
-    | _ -> ()
-    
-    let typ = strip_tpeqns typ 
-    fStripped typ;
-    match typ with
-    | TType_forall (tps,body) -> 
-        IterType f body;           
-        tps |> List.iter fTypars;
-        tps |> List.iter (fun tp -> tp.Constraints |> List.iter (IterTypeConstraint f))
-
-    | TType_measure unt          -> ()
-    | TType_app (_,tinst) -> IterTypes f tinst
-    | TType_ucase (_,tinst) -> IterTypes f tinst
-    | TType_tuple typs        -> IterTypes f typs
-    | TType_fun (s,t)         -> IterType f s; IterType f t
-    | TType_var tp            -> fTypars tp
-    | TType_modul_bindings            -> ()
-and IterTypes f tys = List.iter (IterType f) tys
-and IterTypeConstraint ((fStripped,fTypars,fTraitSolution) as f) x =
-     match x with 
-     | TTyparCoercesToType(ty,m) -> IterType f ty
-     | TTyparMayResolveMemberConstraint(traitInfo,m) -> IterTraitInfo f traitInfo
-     | TTyparDefaultsToType(priority,ty,m) -> IterType f ty
-     | TTyparSimpleChoice(tys,m) -> IterTypes f tys
-     | TTyparIsEnum(uty,m) -> IterType f uty
-     | TTyparIsDelegate(aty,bty,m) -> IterType f aty; IterType f bty
-     | TTyparSupportsNull _ | TTyparIsNotNullableValueType _ 
-     | TTyparIsReferenceType _ | TTyparRequiresDefaultConstructor _ -> ()
-and IterTraitInfo ((_,_,fTraitSolution) as f) (TTrait(typs,_,_,argtys,rty,soln))  = 
-    IterTypes f typs; 
-    IterTypes f argtys; 
-    Option.iter (IterType f) rty;
-    Option.iter fTraitSolution !soln
-
-//--------------------------------------------------------------------------
-// Print Signatures/Types
-//-------------------------------------------------------------------------- 
-
-type DisplayEnv = 
-  { html: bool;
-    htmlHideRedundantKeywords: bool;
-    htmlAssemMap: string NameMap; (* where can the docs for f# assemblies be found? *)
-    openTopPaths: (string list) list; 
-    showObsoleteMembers: bool; 
-    showTyparBinding: bool; 
-    showImperativeTyparAnnotations: bool;
-    suppressInlineKeyword: bool;
-    showMemberContainers:bool;
-    shortConstraints:bool;
-    showAttributes:bool;
-    showOverrides:bool;
-    showConstraintTyparAnnotations: bool;
-    abbreviateAdditionalConstraints: bool;
-    showTyparDefaultConstraints : bool;
-    g: TcGlobals;
-    contextAccessibility: Accessibility;
-    generatedValueLayout:(Val -> layout option);    
-    }
-
-  member x.Normalize() = 
-      { x with 
-           openTopPaths = 
-              x.openTopPaths 
-                |> List.sortWith (fun p1 p2 -> -(compare p1 p2)) 
-      }
-
-let empty_denv tcGlobals = 
-  { html=false;
-    htmlHideRedundantKeywords=false;
-    htmlAssemMap=NameMap.empty;
-    openTopPaths=[]; 
-    showObsoleteMembers=true;
-    showTyparBinding = false;
-    showImperativeTyparAnnotations=false;
-    suppressInlineKeyword=false;
-    showMemberContainers=false;
-    showAttributes=false;
-    showOverrides=true;
-    showConstraintTyparAnnotations=true;
-    abbreviateAdditionalConstraints=false;
-    showTyparDefaultConstraints=false;
-    shortConstraints=false;
-    g=tcGlobals;
-    contextAccessibility = taccessPublic;
-    generatedValueLayout = (fun v -> None);        
-  }.Normalize()
-
-
-let denv_add_open_path path denv = 
-    { denv with openTopPaths= path :: denv.openTopPaths}.Normalize()
-
-let denv_add_open_modref modref denv = 
-    let path = demangled_path_of_cpath (full_cpath_of_modul (deref_modul modref))
-    denv_add_open_path path denv 
-
-let denv_scope_access access denv =     
-    { denv with contextAccessibility = combineAccess denv.contextAccessibility access }
-
-let full_name_of_nlpath (NLPath(ccu,p) : NonLocalPath) =  text_of_arr_path p 
-let (+.+) s1 s2 = (if s1 = "" then s2 else s1^"."^s2)
-
-let full_name_of_parent_of_item_ref ppF (|Ref_private|Ref_nonlocal|) tcref = 
-    match tcref with 
-    | Ref_private x -> 
-         (match ppF x with 
-          | None -> None
-          | Some (PubPath([| |],nm)) -> None
-          | Some (PubPath(p,nm)) -> Some(text_of_path (Array.to_list p)))
-    | Ref_nonlocal nlr -> 
-        match nlr.nlr_nlpath with 
-        | (NLPath(ccu,[| |])) -> None 
-        | _ -> Some (full_name_of_nlpath nlr.nlr_nlpath)
-  
-
-let full_display_text_of_item_ref nmF ppF (|Ref_private|Ref_nonlocal|) xref = 
-    match full_name_of_parent_of_item_ref ppF (|Ref_private|Ref_nonlocal|) xref  with 
-    | None -> nmF xref 
-    | Some pathText -> pathText +.+ nmF xref
-  
-let full_display_text_of_parent_of_modref r = full_name_of_parent_of_item_ref pubpath_of_tycon (|ERef_private|ERef_nonlocal|) r
-
-let full_display_text_of_modref r = full_display_text_of_item_ref demangled_name_of_modref pubpath_of_tycon (|ERef_private|ERef_nonlocal|) r
-let full_display_text_of_vref   r = full_display_text_of_item_ref (fun (tc:ValRef)   -> tc.DisplayName) pubpath_of_val   (|VRef_private|VRef_nonlocal|) r
-let full_display_text_of_tcref  r = full_display_text_of_item_ref (fun (tc:TyconRef) -> tc.DisplayNameWithUnderscoreTypars) pubpath_of_tycon (|ERef_private|ERef_nonlocal|) r
-let full_display_text_of_ecref  r = full_display_text_of_item_ref (fun (tc:TyconRef) -> tc.DisplayNameWithUnderscoreTypars) pubpath_of_tycon (|ERef_private|ERef_nonlocal|) r
-
-let full_display_text_of_ucref (ucref:UnionCaseRef) = full_display_text_of_tcref ucref.TyconRef +.+ ucref.CaseName
-let full_display_text_of_rfref (rfref:RecdFieldRef) = full_display_text_of_tcref rfref.TyconRef +.+ rfref.FieldName
-
-// This is a broken version of 'full_display_text_of_item_ref' that uses a mangled name in the Ref_nonlocal case.
-// It is only used by the FSI generation code, which uses a really unstable and subtle technique to propagate information from
-// the pretty printing code that lays out signautre files to the consuming code in the Language Service.
-let full_mangled_name_of_item_ref_DO_NOT_USE nmF ppF (|Ref_private|Ref_nonlocal|) xref = 
-    match xref with 
-    | Ref_private x -> 
-        match full_name_of_parent_of_item_ref ppF (|Ref_private|Ref_nonlocal|) xref  with 
-        | None -> nmF xref 
-        | Some pathText -> pathText +.+ nmF xref
-    | Ref_nonlocal nlr -> 
-        let nm = nlr.nlr_item //   <<----- BAD BAD BAD - this is a mangled name. The FSI generation code expects exactly this name to be used for non-local references
-        match full_name_of_parent_of_item_ref ppF (|Ref_private|Ref_nonlocal|) xref  with 
-        | None -> nm 
-        | Some pathText -> pathText +.+ nm
-
-let approx_full_mangled_name_of_modref r = full_mangled_name_of_item_ref_DO_NOT_USE demangled_name_of_modref pubpath_of_tycon (|ERef_private|ERef_nonlocal|) r
-let approx_full_mangled_name_of_vref   r = full_mangled_name_of_item_ref_DO_NOT_USE (fun (tc:ValRef)   -> tc.MangledName) pubpath_of_val   (|VRef_private|VRef_nonlocal|) r
-let approx_full_mangled_name_of_tcref  r = full_mangled_name_of_item_ref_DO_NOT_USE (fun (tc:TyconRef) -> tc.DisplayName) pubpath_of_tycon (|ERef_private|ERef_nonlocal|) r
-let approx_full_mangled_name_of_ecref  r = full_mangled_name_of_item_ref_DO_NOT_USE (fun (tc:TyconRef) -> tc.DisplayName) pubpath_of_tycon (|ERef_private|ERef_nonlocal|) r
-let approx_full_mangled_name_of_ucref (ucref:UnionCaseRef) = approx_full_mangled_name_of_tcref ucref.TyconRef +.+ ucref.CaseName
-let approx_full_mangled_name_of_rfref (rfref:RecdFieldRef) = approx_full_mangled_name_of_tcref rfref.TyconRef +.+ rfref.FieldName
-
-let full_mangled_path_to_tcref (tcref:TyconRef) = 
-    match tcref with 
-    | ERef_private ltc -> (match tcref.PublicPath with None -> [| |] | Some (PubPath(p,nm)) -> p)
-    | ERef_nonlocal nlr -> path_of_nlpath (nlpath_of_nlref nlr)
-  
-let qualified_mangled_name_of_tcref tcref nm = 
-    String.concat "-" (Array.to_list (full_mangled_path_to_tcref tcref) @ [ tcref.MangledName ^ "-" ^ nm ])
-
-let rec firstEq p1 p2 = 
-    match p1 with
-    | [] -> true 
-    | h1::t1 -> 
-        match p2 with 
-        | h2::t2 -> h1 = h2 && firstEq t1 t2
-        | _ -> false 
-
-let rec firstRem p1 p2 = 
-   match p1 with [] -> p2 | h1::t1 -> firstRem t1 (List.tl p2)
-
-let trim_path_by_denv denv path =
-    let findOpenedNamespace opened_path = 
-        if  firstEq opened_path path then 
-          let t2 = firstRem opened_path path
-          if t2 <> [] then Some(text_of_path t2^".")
-          else Some("")
-        else None
-    match List.tryPick findOpenedNamespace denv.openTopPaths with
-    | Some(s) -> s
-    | None ->  if isNil path then "" else text_of_path path ^ "."
-
-
-let adhoc_of_tycon (tycon:Tycon) = 
-    NameMultiMap.range tycon.TypeContents.tcaug_adhoc 
-    |> List.filter (fun v -> not v.IsCompilerGenerated)
-
-let super_of_tycon g (tycon:Tycon) = 
-    match tycon.TypeContents.tcaug_super with 
-    | None -> g.obj_ty 
-    | Some ty -> ty 
-
-let implements_of_tycon (g:TcGlobals) (tycon:Tycon) = 
-    tycon.TypeContents.tcaug_implements |> List.map (fun (x,_,_) -> x)
-
-//----------------------------------------------------------------------------
-// Detect attributes
-//----------------------------------------------------------------------------
-
-// AbsIL view of attributes (we read these from .NET binaries) 
-let is_il_attrib (tref:ILTypeRef) attr = 
-    (attr.customMethod.EnclosingType.TypeSpec.Name = tref.Name) &&
-    (attr.customMethod.EnclosingType.TypeSpec.Enclosing = tref.Enclosing)
-
-// REVIEW: consider supporting querying on Abstract IL custom attributes.
-// These linear iterations cost us a fair bit when there are lots of attributes
-// on imported types. However this is fairly rare and can also be solved by caching the
-// results of attribute lookups in the TAST
-let ILThingHasILAttrib tref attrs = List.exists (is_il_attrib tref) (dest_custom_attrs attrs)
-
-let ILThingDecodeILAttrib g tref attrs = 
-    attrs |> dest_custom_attrs |> List.tryPick(fun x -> if is_il_attrib tref x then Some(decode_il_attrib_data g.ilg x)  else None)
-
-// This one is done by name to ensure the compiler doesn't take a dependency on dereferencing a type that only exists in .NET 3.5
-let ILThingHasExtensionAttribute attrs = 
-    attrs |> dest_custom_attrs |> List.exists (fun attr -> 
-        attr.customMethod.EnclosingType.TypeSpec.Name = "System.Runtime.CompilerServices.ExtensionAttribute")
-    
-(* F# view of attributes (these get converted to AbsIL attributes in ilxgen) *)
-let IsMatchingAttrib g (AttribInfo(_,tcref)) (Attrib(tcref2,_,_,_,_)) = tcref_eq g tcref  tcref2
-let HasAttrib g tref attrs = List.exists (IsMatchingAttrib g tref) attrs
-let fsthing_find_attrib g tref attrs = List.find (IsMatchingAttrib g tref) attrs
-let TryFindAttrib g tref attrs = List.tryfind (IsMatchingAttrib g tref) attrs
-
-let (|SpecificAttribNamedArg|_|) nm = function (AttribNamedArg(nm2,_,_,AttribExpr(_,v))) when nm = nm2 -> Some v | _ -> None
-
-let (|AttribInt32Arg|_|) = function AttribExpr(_,TExpr_const (TConst_int32(n),m,_)) -> Some(n) | _ -> None
-let (|AttribBoolArg|_|) = function AttribExpr(_,TExpr_const (TConst_bool(n),m,_)) -> Some(n) | _ -> None
-let (|AttribStringArg|_|) = function AttribExpr(_,TExpr_const (TConst_string(n),m,_)) -> Some(n) | _ -> None
-
-let TryFindBoolAttrib g nm attrs = 
-    match TryFindAttrib g nm attrs with
-    | Some(Attrib(_,_,[ ],_,_)) -> Some(true)
-    | Some(Attrib(_,_,[ AttribBoolArg(b) ],_,_)) -> Some(b)
-    | _ -> None
-
-let TryFindUnitAttrib g nm attrs = 
-    match TryFindAttrib g nm attrs with
-    | Some(Attrib(_,_,[ ],_,_)) -> Some()
-    | _ -> None
-
-let TryFindInt32Attrib g nm attrs = 
-    match TryFindAttrib g nm attrs with
-    | Some(Attrib(_,_,[ AttribInt32Arg(b) ],_,_)) -> Some b
-    | _ -> None
-    
-let ILThingHasAttrib (AttribInfo (atref,_)) attrs = 
-    ILThingHasILAttrib atref attrs
-
-let TyconRefTryBindAttrib g (AttribInfo (atref,_) as args) (tcref:TyconRef) f1 f2 = 
-    if tcref.IsILTycon then 
-        match ILThingDecodeILAttrib g atref tcref.ILTyconRawMetadata.tdCustomAttrs with 
-        | Some attr -> f1 attr
-        | _ -> None
-    else 
-        match TryFindAttrib g args tcref.Attribs with 
-        | Some attr -> f2 attr
-        | _ -> None
-      
-let TyconRefHasAttrib g args tcref = 
-    TyconRefTryBindAttrib g args tcref (fun _ -> Some()) (fun _ -> Some()) |> isSome 
-
-/// Detect if a type is definitely known to be non-serializable
-let is_definitely_not_serializable g typ =
-    if is_il_arr_typ g typ || is_any_array_typ g typ then
-      true
-    else
-      match try_tcref_of_stripped_typ g typ with 
-      | None -> false
-      | Some tcref -> 
-         if tcref.IsILTycon then 
-             not tcref.ILTyconRawMetadata.tdSerializable
-         else 
-             (TryFindBoolAttrib g g.attrib_AutoSerializableAttribute tcref.Attribs = Some(false))
-
-//-------------------------------------------------------------------------
-// List and reference types...
-//------------------------------------------------------------------------- 
-
-let is_byref_typ g ty     = 
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> tcref_eq g g.byref_tcr tcref
-
-let dest_byref_typ g ty   = if is_byref_typ g ty then List.hd (tinst_of_stripped_typ g ty) else failwith "dest_byref_typ: not a byref type"
-
-let is_refcell_ty g ty   = 
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> tcref_eq g g.refcell_tcr tcref
-
-let dest_refcell_ty g ty = if is_refcell_ty g ty then List.hd (tinst_of_stripped_typ g ty) else failwith "dest_refcell_ty: not a ref type"
-let mk_refcell_ty  g ty = TType_app(g.refcell_tcr_nice,[ty])
-
-let mk_lazy_ty g ty = TType_app(g.lazy_tcr_canon,[ty])
-
-let mk_format_ty g aty bty cty dty ety = TType_app(g.format_tcr, [aty;bty;cty;dty; ety])
-
-let mk_option_ty g ty = TType_app (g.option_tcr_nice, [ty])
-let mk_list_ty g ty = TType_app (g.list_tcr_nice, [ty])
-let is_arity1_ty g tcr ty = 
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> tcref_eq g tcr tcref
-
-let is_option_ty g ty = is_arity1_ty g g.option_tcr ty
-
-let try_dest_option_ty g ty = 
-    match tinst_of_stripped_typ g ty with 
-    | [ty1]  when is_option_ty g ty  -> Some(ty1)
-    | _ -> None
-
-let dest_option_ty g ty = 
-    match try_dest_option_ty g ty with 
-    | Some(ty) -> ty
-    | None -> failwith "dest_option_ty: not an option type"
-
-let mk_none_ucref g = mk_ucref g.option_tcr "None"
-let mk_some_ucref g = mk_ucref g.option_tcr "Some"
-
-let vref_is_dispatch_slot (vref:ValRef) = 
-    match vref.MemberInfo with 
-    | Some membInfo -> membInfo.MemberFlags.MemberIsDispatchSlot 
-    | None -> false
-
-let (|BitwiseOr|_|) g expr = 
-    match expr with 
-    | TExpr_app(TExpr_val(vref,_,_),_,_,[arg1;arg2],_) when g.vref_eq vref g.bitwise_or_vref  ->
-        Some(arg1,arg2)
-    // Special workaround, only used when compiling FSharp.Core.dll. Uses of 'a ||| b' occur before the '|||' bitwise or operator
-    // is defined. These get through type checking because enums implicitly support the '|||' operator through
-    // the automatic resolution of undefined operators (see tc.ml, Item_implicit_op). This then compiles as an 
-    // application of a lambda to two arguments. We recognize this pattern here
-    | TExpr_app(TExpr_lambda _,_,_,[arg1;arg2],_) when g.compilingFslib  -> 
-        Some(arg1,arg2)
-    | _ -> None
-
-let is_typeof_vref g vref = 
-    g.vref_eq vref g.typeof_vref 
-    // There is an internal version of typeof defined in prim-types.fs that needs to be detected
-    || (g.compilingFslib && vref.CompiledName = "typeof") 
-
-let is_typedefof_vref g vref = 
-    g.vref_eq vref g.typedefof_vref 
-    // There is an internal version of typeof defined in prim-types.fs that needs to be detected
-    || (g.compilingFslib && vref.CompiledName = "typedefof") 
-
-//--------------------------------------------------------------------------
-// Print Signatures/Types 
-//-------------------------------------------------------------------------- 
-
-module NicePrint = begin
-    open Microsoft.FSharp.Compiler.Layout
-    open Microsoft.FSharp.Compiler.PrettyNaming
-    open PrettyTypes
-
-    /// Paths are used in FSI generation and Abstract IL metadata printing
-    ///
-    /// paths in innermost-to-outermost order (e.g., `Foo.Bar.Baz` = ["Baz" ; "Bar" ; "Foo"])
-    type Path = 
-        | Path of string list 
-        | NoPath 
-
-        static member Empty = Path []
-
-        member path.Add ident = 
-            match path with
-            | NoPath    -> NoPath
-            | Path xs -> Path (ident :: xs)
-
-    let fullySplitTypeRef (tref:ILTypeRef) = 
-        (List.collect IL.split_namespace (tref.Enclosing @ [IL.ungenericize_tname tref.Name])) 
-
-    let commentL l = wordL "(*" ++ l ++ wordL "*)"
-    let comment str = str |> wordL |> commentL
-
-    let layoutsL (ls : layout list) : layout =
-        match ls with
-        | []      -> emptyL
-        | [x]     -> x
-        | x :: xs -> List.fold ($$) x xs 
-
-    /// Place the mangled identifier's name at the 'end' of the path; this will make the fully-qualified name later
-    ///
-    /// REVIEW: when FSI generation for assemblies containing quoted identifiers is
-    /// implemented, a decision will have to be taken here whether to strip "``" from the 
-    /// beginning / end of these identifiers; this depends on how the island parser is made to 
-    /// get "funny" identifiers; the same for operators
-    let annotateWithPath ident path mangledIdent = 
-        let mkPair s = (s, "")
-        let node = wordL ident
-        match path with
-        | NoPath      -> node
-        | Path path -> Internal.Utilities.StructuredFormat.Layout.Attr ("goto:path", mangledIdent :: path |> List.rev |> List.map mkPair , node)
-
-    // shortcut to annote elements with a path extended by the identifier.
-    let (&==) ident path = annotateWithPath ident path ident 
-
-
-    module IlPrint = begin
-
-        open Microsoft.FSharp.Compiler.AbstractIL.IL
-        
-        let private adjustIlNameInternal (path : Path)(n : string) : string list =
-
-            // REVIEW: don't hardwire this table like this
-            let demangleFSharpBaseTypes n =
-                match n with
-                | "System.Void"    -> "unit"
-                | "System.Object"  -> "obj"
-                | "System.String"  -> "string"
-                | "System.Single"  -> "float32"
-                | "System.Double"  -> "float"
-                | "System.Decimal"  -> "decimal"
-                | "System.Char"    -> "char"
-                | "System.Int16"   -> "int16"
-                | "System.Int32"   -> "int" 
-                | "System.Int64"   -> "int64" 
-                | "System.UInt16"  -> "uint16" 
-                | "System.UInt32"  -> "uint32" 
-                | "System.UInt64"  -> "uint64" 
-                | "System.Boolean" -> "bool"
-                | _                -> n
-
-            let dropCurrentNamespace n    = 
-                match path with
-                | NoPath    -> n
-                | Path xs -> 
-                    match n |> List.rev with
-                    | (y :: _) as ys when ys = xs -> [ y ] // special case for (recursive) references to the type we're currently defining
-                    | y :: ys when ys = xs        -> [ y ]
-                    | _                           -> n
-            n |> demangleFSharpBaseTypes |> SplitNamesForFsiGenerationPath |> ChopUnshowableInFsiGenerationPath |> dropCurrentNamespace |> List.map Lexhelp.Keywords.QuoteIdentifierIfNeeded
-
-        /// fix up a name coming from IL metadata by:
-        /// - translating well-known base types (e.g., System.Int32 -> int)
-        /// - chopping off numeric (num-of-params) suffixes
-        /// - hiding the current namespace (e.g., if we're in A.B.C.D and we're
-        ///   showing A.B.C.D.E, we can abbreviate this to E)
-        /// - quote "funny" names (keywords, otherwise invalid identifiers)
-        let private adjustIlName (path : Path)(n : string) : string =
-            n |> adjustIlNameInternal path |> JoinNamesForFsiGenerationPath
-
-        /// this fixes up a name just like adjustIlName but also handles F#
-        /// operators
-        let private adjustIlMethodName (path : Path)(n : string) : string =
-          let specialdemangleOperatorName s =
-              if IsMangledOpName s
-              then DemangleOperatorName s
-              else s
-          n |> adjustIlNameInternal path |> List.map specialdemangleOperatorName |> JoinNamesForFsiGenerationPath
-
-
-
-        // our good Haskell friend
-        let rec intersperse x lst =
-            match lst with 
-            | []      -> []
-            | [y]     -> [y]
-            | y :: ys -> y :: x :: intersperse x ys
-
-        let private arrayShapeL (ILArrayShape sh : ILArrayShape) : layout = 
-            leftL "[" $$ wordL (sh |> List.tl |> List.map (fun _ -> ",") |> String.concat "") $$ rightL "]" // drop off one "," so that a n-dimensional array has n - 1 ","'s
-
-        let private  paramsList (ps : ILGenericParameterDefs) = 
-            ps |> List.map (fun x -> "'" + x.Name |> wordL) 
-
-        let private paramsL (ps : layout list) : layout = 
-            match ps with
-            | [] -> emptyL
-            | _  -> 
-                let body = ps |> intersperse (sepL ",") |> layoutsL
-                sepL "<" $$ body $$ rightL ">"
-
-        let private pruneParms (name : string)(parms : layout list) =
-            let numParms = let rightMost = name |> SplitNamesForFsiGenerationPath |> List.rev |> List.hd
-                           try rightMost |> int // can't find a way to see the number of generic parameters for *this* class (the GenericParams also include type variables for enclosing classes); this will have to do
-                               with _ -> 0 // looks like it's non-generic
-            parms |> List.rev |> List.take numParms |> List.rev
-                             
-        let rec ilILTypeL (denv : DisplayEnv)(path : Path)(parms : layout list)(typ : ILType) : layout =
-            match typ with
-            | Type_void               -> wordL "unit" // These are type-theoretically totally different type-theoretically `void` is Fin 0 and `unit` is Fin (S 0) ... but, this looks like as close as we can get.
-            | Type_array (sh, t)      -> ilILTypeL denv path parms t $$ arrayShapeL sh
-            | Type_value t
-            | Type_boxed t            -> (adjustIlName path t.Name |> wordL) $$ (t.GenericArgs |> List.map (ilILTypeL denv path parms) |> paramsL)
-            | Type_ptr t
-            | Type_byref t            -> ilILTypeL denv path parms t
-            | Type_fptr t             -> ilILCallingSignatureL denv path parms None t
-            | Type_tyvar n            -> List.nth parms <| int n
-            | Type_modified (_, _, t) -> ilILTypeL denv path parms t // "Just recurse through them to the contained ILType"--Don
-
-        /// Layout a function's type signature. We need a special case for
-        /// constructors (Their return types are reported as `void`, but this is
-        /// incorrect; so if we're dealing with a constructor we require that the
-        /// return type be passed along as the `cons` parameter.)
-        and ilILCallingSignatureL (denv : DisplayEnv)(path : Path)(parms : layout list)(cons : string option)(signatur : ILCallingSignature) : layout =
-            let args = signatur.ArgTypes |> List.map (ilILTypeL denv path parms) |> intersperse (wordL "*")
-            let res  = 
-                match cons with
-                | Some className -> (adjustIlName path className |> wordL) $$ (pruneParms className parms |> paramsL) // special case for constructor return-type (viz., the class itself)
-                | None           -> signatur.ReturnType |> ilILTypeL denv path parms
-            match args with
-            | []      -> wordL "unit" $$ wordL "->" $$ res
-            | [x]     -> x $$ wordL "->" $$ res
-            | x :: xs -> (List.fold ($$) x xs) $$ wordL "->" $$ res
-
-        /// Layout a method's signature. In the case that we've a constructor, we
-        /// pull off the class name from the `path`; naturally, it's the
-        /// most-deeply-nested element.
-
-        let private ilMethodDefL (denv : DisplayEnv)(path : Path)(parms : layout list)(className : string)(m : ILMethodDef) : layout =
-            let myParms         = m.GenericParams |> paramsList
-            let parms           = parms @ myParms
-            let name            = adjustIlMethodName path m.Name
-            let (nameL, isCons) = 
-                match () with
-                | _ when m.IsConstructor -> ("new" &== path,                                                              Some className) // we need the unadjusted name here to be able to grab the number of generic parameters
-                | _ when m.IsStatic      -> (wordL "static" $$ wordL "member" $$ (name &== path) $$ (myParms |> paramsL), None)
-                | _                      -> (wordL "member" $$ (name &== path) $$ (myParms |> paramsL),                   None)
-            let signaturL       = callsig_of_mdef m |> ilILCallingSignatureL denv path parms isCons
-            nameL $$ wordL ":" $$ signaturL
-
-        let private ilFieldDefL (denv : DisplayEnv)(path : Path)(parms : layout list)(f : ILFieldDef) : layout =
-            let staticL =  if f.IsStatic then wordL "static" else emptyL
-            let name    = adjustIlName path f.Name
-            let nameL   = name &== path
-            let typL    = ilILTypeL denv path parms f.Type
-            staticL $$ wordL "val" $$ nameL $$ wordL ":" $$ typL            
-       
-        let private ilPropertyDefL (denv : DisplayEnv)(path : Path)(parms : layout list)(p : ILPropertyDef) : layout =
-            let staticL =  if p.propCallconv =  CC_static then wordL "static" else emptyL
-            let name    = adjustIlName path p.Name
-            let nameL   = name &== path
-            
-            let getterTypeL (getterRef:ILMethodRef) =
-                match getterRef.ArgTypes with
-                |   [] -> ilILTypeL denv path parms getterRef.ReturnType
-                |   _ -> ilILCallingSignatureL denv path parms None getterRef.CallingSignature
-                
-            let setterTypeL (setterRef:ILMethodRef) =
-                let argTypes = setterRef.ArgTypes
-                if isNil argTypes then
-                    emptyL // shouldn't happen
-                else
-                    let frontArgs, lastArg = List.frontAndBack argTypes
-                    let argsL = frontArgs |> List.map (ilILTypeL denv path parms) |> intersperse (wordL "*") |> List.fold ($$) emptyL
-                    argsL $$ wordL "->" $$ (ilILTypeL denv path parms lastArg)
-            
-            let typL = 
-                match p.GetMethod, p.SetMethod with
-                |   None, None -> ilILTypeL denv path parms p.Type // shouldn't happen
-                |   Some getterRef, _ -> getterTypeL getterRef
-                |   None, Some setterRef -> setterTypeL setterRef
-                
-            let specGetSetL =
-                match p.GetMethod, p.SetMethod with
-                |   None,None 
-                |   Some _, None -> emptyL
-                |   None, Some _ -> wordL "with" $$ wordL "deb  set"
-                |   Some _, Some _ -> wordL "with" $$ wordL "get," $$ wordL "set"
-            staticL $$ wordL "member" $$ nameL $$ wordL ":" $$ typL $$ specGetSetL
-
-        let ilEnumFieldDefL (denv : DisplayEnv) (path : Path) (f : ILFieldDef) : layout =
-            let res   = 
-                match f.fdInit with
-                | Some init -> 
-                    match init with
-                    | FieldInit_bool x   -> 
-                        if x
-                        then Some "true"
-                        else Some "false"
-                    | FieldInit_char c   -> Some ("'" + (char c).ToString () + "'")
-                    | FieldInit_int16 x  -> Some ((x |> int32 |> string) + "s")
-                    | FieldInit_int32 x  -> Some (x |> string)
-                    | FieldInit_int64 x  -> Some ((x |> string) + "L")
-                    | FieldInit_uint16 x -> Some ((x |> int32 |> string) + "us")
-                    | FieldInit_uint32 x -> Some ((x |> int64 |> string) + "u")
-                    | FieldInit_uint64 x -> Some ((x |> int64 |> string) + "UL")
-                    | FieldInit_single d -> 
-                        let s = d.ToString ("g12", System.Globalization.CultureInfo.InvariantCulture)
-                        let s = 
-                            if String.for_all (fun c -> System.Char.IsDigit c || c = '-')  s 
-                            then s + ".0" 
-                            else s
-                        Some (s + "f")
-                    | FieldInit_double d -> 
-                         let s = d.ToString ("g12", System.Globalization.CultureInfo.InvariantCulture)
-                         if String.for_all (fun c -> System.Char.IsDigit c || c = '-')  s 
-                         then Some (s + ".0")
-                         else Some s
-                    | _   -> None
-                | None      -> None
-            let initL = match res with
-                        | None   -> wordL "=" $$ (comment "value unavailable")
-                        | Some s -> wordL "=" $$ wordL s
-
-            let name  = adjustIlName path f.Name
-            let nameL = name &== path
-            wordL "|" $$ nameL $$ initL
-
-        // filtering methods for hiding things we oughtn't show
-        let private isStaticProperty    (p : ILPropertyDef)      = match p.GetMethod,p.SetMethod with
-                                                                   | Some getter,_    -> getter.CallingSignature.CallingConv.IsStatic
-                                                                   | None,Some setter -> setter.CallingSignature.CallingConv.IsStatic
-                                                                   | None,None        -> true
-        let private isPublicMethod      (m : ILMethodDef) : bool = m.Access = MemAccess_public
-        let private isPublicCtor        (m : ILMethodDef) : bool = m.Access = MemAccess_public && m.IsConstructor
-        let private isNotSpecialName    (m : ILMethodDef) : bool = not m.mdSpecialName
-        let private isPublicField       (f : ILFieldDef)  : bool = f.Access = MemAccess_public
-        let private isPublicClass       (c : ILTypeDef)   : bool =
-            match c.Access with
-            | TypeAccess_public
-            | TypeAccess_nested MemAccess_public -> true
-            | _                                  -> false
-        let private isShowEnumField (f : ILFieldDef) : bool = f.Name <> "value__" // this appears to be the hard-coded underlying storage field
-        let private isShowBase      (n : layout)   : bool = 
-            let noShow = [ "System.Object" ; "System.ValueType" ; "obj" ] // hide certain 'obvious' base classes
-            noShow |> List.map wordL |> List.exists ((=) n) |> not
-
-        let rec ilTypeDefL (denv : DisplayEnv)(path : Path)(t : ILTypeDef) : layout =
-            let name        = t.Name |> SplitNamesForFsiGenerationPath |> List.rev |> List.hd // dump the qualifiers
-            let path'       = path // assumption: path's already been augmented when handling the LHS
-            let parms       = t.GenericParams |> paramsList
-
-            let baseNameL b = 
-                match b with
-                | Some b -> let baseName = ilILTypeL denv path parms b
-                            if isShowBase baseName
-                               then [ wordL "inherit" $$ baseName ]
-                               else []
-                | None   -> []
-
-            let fieldsL parms = dest_fdefs >> List.filter isPublicField   >> List.map (ilFieldDefL denv path' parms)
-            let enumsL        = dest_fdefs >> List.filter isShowEnumField >> List.map (ilEnumFieldDefL denv path')
-            let typesL        = dest_tdefs >> List.filter isPublicClass   >> List.map (ilNestedClassDefL denv path')
-
-            let renderL pre body post = 
-                match pre with
-                | Some pre -> 
-                    match body with
-                    | [] -> emptyL // empty type
-                    | _  -> (pre @@-- aboveListL body) @@ post
-                | None     -> aboveListL body
-
-            let classL (t : ILTypeDef) typeWord = 
-                let pre    = Some (wordL typeWord)
-                let baseT  = baseNameL t.Extends
-                let memberBlockLs (fieldDefs:ILFieldDefs,methodDefs:ILMethodDefs,propertyDefs:PropertyDefs) =
-                    let ctors  =
-                        methodDefs |> dest_mdefs |> 
-                            List.filter isPublicCtor (*|> List.filter isNotSpecialName*) |> 
-                            List.map (ilMethodDefL denv path' parms t.Name)
-                    let fields = fieldsL parms fieldDefs
-                    let nProps = propertyDefs |> dest_pdefs |> List.map (fun pd -> pd.Name,ilPropertyDefL denv path' parms pd)
-                    let nMeths = 
-                        methodDefs |> dest_mdefs |> 
-                            List.filter isPublicMethod |> List.filter isNotSpecialName |> 
-                            List.map (fun md -> md.Name,ilMethodDefL denv path' parms t.Name md)
-                    let members = (nProps @ nMeths) |> List.sortBy fst |> List.map snd (* (properties and members) are sorted by name *)
-                    ctors @ fields @ members
-                let bodyStatic   = memberBlockLs (t.Fields     |> dest_fdefs |> List.filter (fun fd -> fd.IsStatic)                |> mk_fdefs,
-                                                  t.Methods    |> dest_mdefs |> List.filter (fun md -> md.IsStatic)                |> mk_mdefs,
-                                                  t.Properties |> dest_pdefs |> List.filter (fun pd -> isStaticProperty pd)        |> mk_properties)
-                let bodyInstance = memberBlockLs (t.Fields     |> dest_fdefs |> List.filter (fun fd -> fd.IsStatic         |> not) |> mk_fdefs,
-                                                  t.Methods    |> dest_mdefs |> List.filter (fun md -> md.IsStatic         |> not) |> mk_mdefs,
-                                                  t.Properties |> dest_pdefs |> List.filter (fun pd -> isStaticProperty pd |> not) |> mk_properties)
-                let body = bodyInstance @ bodyStatic (* instance "member" before "static member" *)
-                let types  = typesL t.NestedTypes
-                let post   = wordL "end"
-                renderL pre (baseT @ body @ types) post
-
-            let delegateL (t : ILTypeDef) = 
-                let rhs = 
-                    match t.Methods |> dest_mdefs |> List.filter (fun m -> m.Name = "Invoke") with // the delegate delegates to the type of `Invoke`
-                    | m :: _ -> ilILCallingSignatureL denv path parms None (callsig_of_mdef m)
-                    | _      -> comment "`Invoke` method could not be found"
-                wordL "delegate" $$ wordL "of" $$ rhs
-
-            match t.tdKind with
-            | TypeDef_class     -> classL t "class"
-            | TypeDef_valuetype -> classL t "struct"
-            | TypeDef_interface -> classL t "interface"
-            | TypeDef_enum      -> renderL None (enumsL t.Fields) emptyL
-            | TypeDef_delegate  -> delegateL t
-            | TypeDef_other _   -> comment "cannot show type"
-          
-        and ilNestedClassDefL (denv : DisplayEnv)(path : Path)(t : ILTypeDef) : layout =
-            let name     = adjustIlName path t.Name
-            let nameL    = name &== path
-            let parms    = t.GenericParams |> paramsList
-            let paramsL  = pruneParms t.Name parms |> paramsL
-            let path'    = path.Add name
-            let pre      = wordL "type" $$ nameL $$ paramsL
-            let body     = ilTypeDefL denv path' t
-            if body = emptyL
-               then pre
-               else (pre $$ wordL "=") @@-- body
-
-    end
-
-    (* Note: We need nice printing of constants in order to print literals and attributes *)
-    let constL c =
-        let str = 
-            match c with
-            | TConst_bool x        -> if x then "true" else "false"
-            | TConst_sbyte x        -> (x               |> string)^"y"
-            | TConst_byte x       -> (x               |> string)^"uy"
-            | TConst_int16 x       -> (x               |> string)^"s"
-            | TConst_uint16 x      -> (x               |> string)^"us"
-            | TConst_int32 x       -> (x               |> string)
-            | TConst_uint32 x      -> (x               |> string)^"u"
-            | TConst_int64 x       -> (x               |> string)^"L"
-            | TConst_uint64 x      -> (x               |> string)^"UL"
-            | TConst_nativeint x   -> (x               |> string)^"n"
-            | TConst_unativeint x  -> (x               |> string)^"un"
-            | TConst_float32 d      -> 
-                (let s = d.ToString("g12",System.Globalization.CultureInfo.InvariantCulture)
-                 if String.for_all (fun c -> System.Char.IsDigit(c) || c = '-')  s 
-                 then s + ".0" 
-                 else s) + "f"
-            | TConst_float d      -> 
-                let s = d.ToString("g12",System.Globalization.CultureInfo.InvariantCulture)
-                if String.for_all (fun c -> System.Char.IsDigit(c) || c = '-')  s 
-                then s + ".0" 
-                else s
-            | TConst_char c        -> "'" ^ c.ToString() ^ "'" 
-            | TConst_string bs     -> "\"" ^ bs ^ "\"" 
-            | TConst_unit          -> "()" 
-            | TConst_decimal bs    -> string bs ^ "M" 
-            | TConst_zero       -> "default"
-        wordL str
-
-    let bracketIfL x lyt = if x then bracketL lyt else lyt
-    let hlinkL (url:string) l = linkL url l
-    let squareAngleL x = leftL "[<" $$ x $$ rightL ">]"
-    let angleL denv x = 
-        if denv.html then 
-            sepL "<" $$ x $$ rightL ">"  
-        else
-            sepL "<" $$ x $$ rightL ">"  
-    let braceL x = leftL "{" $$ x $$ rightL "}"  
-    let boolL = function true -> wordL "true" | false -> wordL "false"
-
-    let accessibilityL (denv:DisplayEnv) accessibility itemL =   
-        let isInternalCompPath x = 
-            match x with 
-            | CompPath(ScopeRef_local,[]) -> true 
-            | _ -> false
-        let (|Public|Internal|Private|) (TAccess p) = 
-            match p with 
-            | [] -> Public 
-            | _ when List.forall isInternalCompPath p  -> Internal 
-            | _ -> Private
-        match denv.contextAccessibility,accessibility with
-        | Public,Internal  -> wordL "internal" ++ itemL    // print modifier, since more specific than context
-        | Public,Private   -> wordL "private" ++ itemL     // print modifier, since more specific than context
-        | Internal,Private -> wordL "private" ++ itemL     // print modifier, since more specific than context
-        | _ -> itemL
-
-    let trefL denv tref =
-        let path = fullySplitTypeRef tref
-        let p2,n = List.frontAndBack path
-        if denv.html then
-            hlinkL (text_of_path path ^ ".html") (wordL n)
-        else 
-            leftL (trim_path_by_denv denv p2) $$ wordL n
-        
-    /// Layout a reference to a type or value, perhaps emitting a HTML hyperlink *)
-    let tcrefL isExn denv (tcref:TyconRef) = 
-        let nm = tcref.MangledName
-        let isExn = isExn && tcref.IsExceptionDecl
-        let demangled = DemangleGenericTypeName nm
-        let demangled = if isExn then DemangleExceptionName demangled else demangled
-        let tyconTextL = wordL demangled
-        let path = demangled_path_of_cpath tcref.CompilationPath
-        let arity = tcref.TyparsNoRange.Length
-        let arity_suffix = if arity=0 then "" else "-" ^ string_of_int arity
-        match tcref with 
-        | ERef_private _ -> 
-            if denv.html then 
-                let nm = (text_of_path (path@["type_" ^ String.underscoreLowercase demangled ^ arity_suffix])) in    (* text must tie up with fsc.ml *)
-                hlinkL (sprintf "%s.html" nm)  tyconTextL
-            else
-                let pathText = trim_path_by_denv denv path
-                (if pathText = "" then tyconTextL else leftL pathText $$ tyconTextL)
-        | ERef_nonlocal nlref -> 
-            if denv.html then 
-                let href = 
-                    let ccu = ccu_of_nlref nlref
-                    match ccu.AssemblyName with 
-                    | "mscorlib" | "System" | "System.Windows.Forms" 
-                    | "System.Xml" | "System.Drawing" | "System.Data" -> 
-                        (* cross link to the MSDN 2.0 documentation.  Generic types don't seem to have stable names :-( *)
-                        if demangled = nm then 
-                          Some (sprintf "http://msdn2.microsoft.com/en-us/library/%s.aspx" (text_of_path (path@[nm])))
-                        else None
-                    | _ -> 
-                        if ccu.IsFSharp then 
-                            let nm = text_of_path (path@["type_" ^ String.underscoreLowercase demangled ^ arity_suffix]) in     (* text must tie up with fsc.ml *)
-                            match denv.htmlAssemMap.TryFind(ccu.AssemblyName) with 
-                            | Some root -> Some (sprintf "%s/%s.html" root nm)  
-                            (* otherwise assume it is installed parallel to this tree *)
-                            | None -> Some (sprintf "../%s/%s.html" ccu.AssemblyName nm)  
-                        else
-                            None
-                           
-                match href with 
-                | Some href -> hlinkL href tyconTextL
-                | None      -> tyconTextL
-            else
-              let pathText = trim_path_by_denv denv path
-              (if pathText = "" then tyconTextL else leftL pathText $$ tyconTextL)
-
-    /// Layout the flags of a member *)
-    let memFlagsL hide memFlags = 
-        let stat = if hide || memFlags.MemberIsInstance || (memFlags.MemberKind = MemberKindConstructor) then emptyL else wordL "static"
-        let stat = if not memFlags.MemberIsDispatchSlot && memFlags.MemberIsVirtual then stat ++ wordL "virtual" 
-                   elif not hide && memFlags.MemberIsDispatchSlot then stat ++ wordL "abstract" 
-                   elif memFlags.MemberIsOverrideOrExplicitImpl then stat ++ wordL "override" 
-                   else stat
-        let stat = 
-        
-            if memFlags.MemberIsOverrideOrExplicitImpl then stat 
-            else  
-              match memFlags.MemberKind with 
-              | MemberKindClassConstructor  
-              | MemberKindConstructor 
-              | MemberKindPropertyGetSet -> stat
-              | MemberKindMember 
-              | MemberKindPropertyGet 
-              | MemberKindPropertySet -> stat ++ wordL "member"
-
-        (* let stat = if memFlags.MemberIsFinal then stat ++ wordL "final" else stat in  *)
-        stat
-
-    /// Layout a single attibute arg, following the cases of 'gen_attr_arg' in ilxgen.ml *)
-    /// This is the subset of expressions we display in the NicePrint pretty printer *)
-    /// See also dataExprL - there is overlap between these that should be removed *)
-    let rec attribArgL denv arg = 
-        match arg with 
-        | TExpr_const(c,_,ty) -> 
-            if is_enum_typ denv.g ty then 
-                wordL "enum" $$ angleL denv (typeL denv ty) $$ bracketL (constL c)
-            else
-                constL c
-
-        | TExpr_op(TOp_array,[elemTy],args,m) ->
-            leftL "[|" $$ semiListL (List.map (attribArgL denv) args) $$ rightL "|]"
-
-        (* Detect 'typeof' calls *)
-        | TExpr_app(TExpr_val(vref,_,_),_,[ty],[],m) when is_typeof_vref denv.g vref  ->
-            leftL "typeof<" $$ typeL denv ty $$ rightL ">"
-
-        (* Detect 'typedefof' calls *)
-        | TExpr_app(TExpr_val(vref,_,_),_,[ty],[],m) when is_typedefof_vref denv.g vref  ->
-            leftL "typedefof<" $$ typeL denv ty $$ rightL ">"
-
-        | TExpr_op(TOp_coerce,[tgTy;_],[arg2],_) ->
-            leftL "(" $$ attribArgL denv arg2 $$ wordL ":>" $$ typeL denv tgTy $$ rightL ")"
-
-        | BitwiseOr denv.g (arg1,arg2) ->
-            attribArgL denv arg1 $$ wordL "|||" $$ attribArgL denv arg2
-
-        (* Detect explicit enum values *)
-        | TExpr_app(TExpr_val(vref,_,_),_,_,[arg1],_) when denv.g.vref_eq vref denv.g.enum_vref  ->
-            wordL "enum" ++ bracketL (attribArgL denv arg1)
-
-
-        | _ -> wordL "(* unsupported attribute argument *)"
-
-    /// Layout arguments of an attribute 'arg1, ..., argN' 
-    and attribArgsL denv args = 
-        sepListL (rightL ",") (List.map (fun (AttribExpr(e1,_)) -> attribArgL denv e1) args)
-
-    /// Layout an attribute 'Type(arg1, ..., argN)' 
-    //
-    // REVIEW: we are ignoring "props" here
-    and attribL denv (Attrib(tcref,k,args,props,m)) = 
-        let argsL = bracketL (attribArgsL denv args)
-        match k with 
-        | (ILAttrib(mref)) -> 
-            let trimmedName = 
-                let name =  mref.EnclosingTypeRef.Name
-                match String.tryDropSuffix name "Attribute" with 
-                | Some shortName -> shortName
-                | None -> name
-            let tref = mref.EnclosingTypeRef
-            let tref = ILTypeRef.Create(scope= tref.Scope, enclosing=tref.Enclosing, name=trimmedName)
-            trefL denv tref ++ argsL
-
-        | (FSAttrib(vref)) -> 
-            (* REVIEW: this is not trimming "Attribute" *)
-            let rty = GetReturnTypeOMemberInMemberForm denv.g vref
-            let rty = GetFSharpViewOfReturnType denv.g rty
-            let tcref = tcref_of_stripped_typ denv.g rty
-            tcrefL false denv tcref ++ argsL
-
-
-    /// Layout '[]' above another block 
-    and attribsL denv kind attrs restL = 
-        
-        if denv.showAttributes then
-            (* Don't display DllImport attributes in generated signatures and/or html *)
-            let attrs = if denv.html then attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_OverloadIDAttribute >> not) else attrs
-            let attrs = if denv.html then attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_ClassAttribute >> not) else attrs
-            let attrs = if denv.html then attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_StructAttribute >> not) else attrs
-            let attrs = if denv.html then attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_InterfaceAttribute >> not) else attrs
-            let attrs = attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_DllImportAttribute >> not)
-            let attrs = attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_ContextStaticAttribute >> not)
-            let attrs = attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_ThreadStaticAttribute >> not)
-            let attrs = attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_EntryPointAttribute >> not)
-            let attrs = attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_MarshalAsAttribute >> not)
-            let attrs = attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_ReflectedDefinitionAttribute >> not)
-            let attrs = attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_StructLayoutAttribute >> not)
-            let attrs = attrs |> List.filter (IsMatchingAttrib denv.g denv.g.attrib_AutoSerializableAttribute >> not)
-            match attrs with
-            | [] -> restL 
-            | _  -> squareAngleL (sepListL (rightL ";") (List.map (attribL denv) attrs)) @@ 
-                    restL
-        else 
-        match kind with 
-        | KindType -> restL
-        | KindMeasure -> squareAngleL (wordL "Measure") @@ restL
-
-    and typarAttribsL denv kind attrs restL =         
-            match attrs, kind with
-            | [], KindType -> restL 
-            | _, _  -> squareAngleL (sepListL (rightL ";") ((match kind with KindType -> [] | KindMeasure -> [wordL "Measure"]) @ List.map (attribL denv) attrs)) $$ restL
-
-    (* NOTE: The primed' functions take an "env" - determines inplace printing of typar and constraints *)
-    (* NOTE: "denv" is the DisplayEnv - "env" is the TypeSimplificationInfo *)      
-
-    /// Layout type parameters, taking TypeSimplificationInfo into account  *
-    and typarDeclsL' denv env nmL prefix (typars:typars) =
-        let tpcs = typars |> List.collect (fun tp -> List.map (fun tpc -> tp,tpc) tp.Constraints) 
-        match typars,tpcs with 
-        | [],[]  -> 
-            nmL
-
-        | [h],[] when not prefix -> 
-            typarL' denv env h --- nmL
-
-        | _ -> 
-            let tpcsL = constraintsL denv env tpcs
-            let coreL = sepListL (sepL ",") (List.map (typarL' denv env) typars)
-            (if prefix or nonNil(tpcs) then nmL $$ angleL denv (coreL --- tpcsL) else bracketL coreL --- nmL)
-
-    /// Layout a single type parameter declaration, taking TypeSimplificationInfo into account  *)
-    /// There are several printing-cases for a typar:
-    ///
-    ///  'a              - is multiple  occurance.
-    ///  _               - singleton occurance, an underscore prefered over 'b. (OCAML accepts but does not print)
-    ///  #Type           - inplace coercion constraint and singleton.
-    ///  ('a :> Type)    - inplace coercion constraint not singleton.
-    ///  ('a.opM : S->T) - inplace operator constraint.
-    ///
-    and typarL' denv env (typar:Typar) =
-        let varL =
-          wordL (sprintf "%s%s%s"
-                   (if denv.showConstraintTyparAnnotations then prefix_of_static_req typar.StaticReq else "'")
-                   (if denv.showImperativeTyparAnnotations then prefix_of_rigid typar else "")
-                   typar.DisplayName)
-        let varL = typarAttribsL denv typar.Kind typar.Attribs varL
-
-        match Zmap.tryfind typar env.SimplifyTypes.inplaceConstraints with
-        | Some (typarConstrTyp) ->
-            if Zset.mem typar env.SimplifyTypes.singletons then
-                leftL "#" $$ typarSubtypeConstraintL denv env typarConstrTyp
-            else
-                (varL $$ sepL ":>" $$ typarSubtypeConstraintL denv env typarConstrTyp) |> bracketL
-
-        | _ -> varL
-
-      
-    /// Layout type parameter constraints, taking TypeSimplificationInfo into account  *)
-    and constraintsL denv env cxs = 
-        
-        
-        // Internally member constraints get attached to each type variable in their support. 
-        // This means we get too many constraints being printed. 
-        // So we normalize the constraints to eliminate duplicate member constraints 
-        let cxs = 
-            cxs  
-            |> ListSet.setify (fun (_,cx1) (_,cx2) ->
-                     match cx1,cx2 with 
-                     | TTyparMayResolveMemberConstraint(traitInfo1,_),
-                       TTyparMayResolveMemberConstraint(traitInfo2,_) -> traits_aequiv denv.g tyeq_env_empty traitInfo1 traitInfo2
-                     | _ -> false)
-                     
-        let cxsL = List.collect (constraintL' denv env) cxs
-        match cxsL with 
-        | [] -> emptyL 
-        | _ -> 
-            if denv.abbreviateAdditionalConstraints then 
-                wordL "when "
-            elif denv.shortConstraints then 
-                leftL "(" $$ wordL "requires" $$ sepListL (wordL "and") cxsL $$ rightL ")"
-            else
-                wordL "when" $$ sepListL (wordL "and") cxsL
-
-    /// Layout constraints, taking TypeSimplificationInfo into account  *)
-    and constraintL' denv env (tp,tpc) =
-        match tpc with 
-        | TTyparCoercesToType(tpct,m) -> 
-            [typarL' denv env tp $$ wordL ":>" --- typarSubtypeConstraintL denv env tpct]
-        | TTyparMayResolveMemberConstraint(traitInfo,_) ->
-            [traitL denv env traitInfo]
-        | TTyparDefaultsToType(_,ty,m) ->
-           if denv.showTyparDefaultConstraints then [wordL "default" $$ typarL' denv env tp $$ wordL " :" $$ typeL' denv env ty]
-           else []
-        | TTyparIsEnum(ty,m) ->
-            if denv.shortConstraints then 
-               [wordL "enum"]
-            else
-               [typarL' denv env tp $$ wordL ":" $$ tyappL denv env (wordL "enum") 2 true [ty]]
-        | TTyparIsDelegate(aty,bty,m) ->
-            if denv.shortConstraints then 
-               [wordL "delegate"]
-            else
-               [typarL' denv env tp $$ wordL ":" $$ tyappL denv env (wordL "delegate") 2 true [aty;bty]]
-        | TTyparSupportsNull(m) ->
-           [typarL' denv env tp $$ wordL ":" $$ wordL "null" ]
-        | TTyparIsNotNullableValueType(m) ->
-            if denv.shortConstraints then 
-               [wordL "value type"]
-            else
-               [typarL' denv env tp $$ wordL ":" $$ wordL "struct" ]
-        | TTyparIsReferenceType(m) ->
-            if denv.shortConstraints then 
-               [wordL "reference type"]
-            else
-               [typarL' denv env tp $$ wordL ":" $$ wordL "not struct" ]
-        | TTyparSimpleChoice(tys,m) ->
-           [typarL' denv env tp $$ wordL ":" $$ bracketL (sepListL (sepL "|") (List.map (typeL' denv env) tys)) ]
-        | TTyparRequiresDefaultConstructor(m) -> 
-            if denv.shortConstraints then 
-               [wordL "default constructor"]
-            else
-               [typarL' denv env tp $$ wordL ":" $$ bracketL (wordL "new : unit -> " $$ (typarL' denv env tp))]
-
-    /// Layout a subtype constraint *)
-    and typarSubtypeConstraintL denv env ty = typeL' denv env ty
-
-    and traitL denv env (TTrait(tys,nm,memFlags,argtys,rty,_)) =
-        let nm = DemangleOperatorName nm
-        if denv.shortConstraints then 
-            wordL ("member "^nm)
-        else
-            let rty = GetFSharpViewOfReturnType denv.g rty
-            let stat = memFlagsL denv.htmlHideRedundantKeywords memFlags
-            let tys = ListSet.setify (type_equiv denv.g) tys
-            let tysL = 
-                match tys with 
-                | [ty] -> typeL' denv env ty 
-                | tys -> bracketL (typesWithPrecL denv env 2 (wordL "or") tys)
-            tysL $$ wordL ":"  ---  
-                bracketL (stat ++ wordL nm $$ wordL ":" ---
-                        ((typesWithPrecL denv env 2 (wordL "*") argtys --- wordL "->") --- (typeL' denv env rty)))
-
-
-    /// Layout a unit expression *)
-    and auxMeasureL' denv env prec unt =
-        let sortVars (vs:(Typar * int) list) = vs |> List.sortBy (fun (v,_) -> v.DisplayName) 
-        let sortCons (cs:(TyconRef * int) list) = cs |> List.sortBy (fun (c,_) -> c.DisplayName) 
-        let negvs,posvs = ListMeasureVarOccsWithNonZeroExponents              unt |> sortVars |> List.partition (fun (_,e) -> e<0)
-        let negcs,poscs = ListMeasureConOccsWithNonZeroExponents denv.g false unt |> sortCons |> List.partition (fun (_,e) -> e<0)
-        let unparL (uv:Typar) = wordL ("'" ^  uv.DisplayName)
-        let unconL tc = tcrefL false denv tc
-        let prefix = spaceListL  (List.map (fun (v,e) -> if e=1  then unparL v else unparL v -- wordL (Printf.sprintf "^ %d" e)) posvs @
-                                  List.map (fun (c,e) -> if e=1  then unconL c else unconL c -- wordL (Printf.sprintf "^ %d" e)) poscs)
-        let postfix = spaceListL (List.map (fun (v,e) -> if e= -1 then unparL v else unparL v -- wordL (Printf.sprintf "^ %d" (-e))) negvs @
-                                  List.map (fun (c,e) -> if e= -1 then unconL c else unconL c -- wordL (Printf.sprintf "^ %d" (-e))) negcs)
-        match (negvs,negcs) with 
-        | [],[] -> (match posvs,poscs with [],[] -> wordL "1" | _ -> prefix)
-        | _ -> prefix $$ sepL "/" $$ (if List.length negvs + List.length negcs > 1 then sepL "(" $$ postfix $$ sepL ")" else postfix)
-
-    /// Layout type arguments, either NAME or (ty,...,ty) NAME *)
-    and tyappL denv env tcL prec prefix args =
-        if prefix  then 
-            match args with
-            | [] -> tcL
-            | [arg] -> tcL $$ sepL (if denv.html then "<" else "<") $$ (typeWithPrecL denv env 4 arg) $$ rightL (if denv.html then ">" else ">")
-            | args -> bracketIfL (prec <= 1) (tcL $$ angleL denv (typesWithPrecL denv env 2 (sepL ",") args))
-        else
-            match args with
-            | []    -> tcL
-            | [arg] ->  typeWithPrecL denv env 2 arg $$ tcL
-            | args  -> bracketIfL (prec <= 1) (bracketL (typesWithPrecL denv env 2 (sepL ",") args) --- tcL)
-
-    /// Layout a type, taking precedence into account to insert brackets where needed *)
-    and typeWithPrecL denv env prec typ =
-
-        match strip_tpeqns typ with 
-
-        (* Layout a type application *)
-        | TType_app (tc,args) when tc.IsMeasureableReprTycon && List.forall (is_dimensionless denv.g) args ->
-          typeWithPrecL denv env prec (reduce_tcref_measureable tc args)
-
-        | TType_app (tc,args) -> 
-          tyappL denv env (tcrefL false denv tc) prec tc.IsPrefixDisplay args 
-
-        | TType_ucase (UCRef(tc,_),args) -> 
-          tyappL denv env (tcrefL false denv tc) prec tc.IsPrefixDisplay args 
-
-
-        (* Layout a tuple type *)
-        | TType_tuple t ->
-            bracketIfL (prec <= 2) (typesWithPrecL denv env 2 (wordL "*") t)
-
-        (* Layout a first-class generic type. *)
-        | TType_forall (tps,tau) ->
-            let tauL = typeWithPrecL denv env prec tau
-            match tps with 
-            | []  -> tauL
-            | [h] -> typarL' denv env h $$ rightL "." --- tauL
-            | (h::t) -> spaceListL (List.map (typarL' denv env) (h::t)) $$ rightL "." --- tauL
-
-        (* Layout a function type. *)
-        | TType_fun (dty,rty) ->
-            let rec loop soFarL ty = 
-              match strip_tpeqns ty with 
-              | TType_fun (dty,rty) -> loop (soFarL --- (typeWithPrecL denv env 4 dty $$ wordL "->")) rty
-              | rty -> soFarL --- typeWithPrecL denv env 5 rty
-            bracketIfL (prec <= 4) (loop emptyL typ)
-
-        (* Layout a type variable . *)
-        | TType_var r ->
-            typarL' denv env r
-
-        | TType_modul_bindings -> wordL ""
-        | TType_measure unt -> auxMeasureL' denv env 4 unt
-
-    /// Layout a list of types, separated with the given separator, either '*' or ',' *)
-    and typesWithPrecL denv env prec sep typl = 
-        sepListL sep (List.map (typeWithPrecL denv env prec) typl)
-
-    and measureL' denv env unt = auxMeasureL' denv env 5 unt
-
-    /// Layout a single type, taking TypeSimplificationInfo into account *)
-    and typeL' denv env typ = 
-        typeWithPrecL denv env 5 typ
-
-    and typeL denv typ  = 
-        typeL' denv SimplifyTypes.typeSimplificationInfo0 typ
-
-    /// Layout a single type used as the type of a member or value 
-    let topTypeL denv env argInfos rty cxs =
-        if denv.html && List.exists (snd >> isTTyparSupportsStaticMethod) cxs then
-            wordL "overloaded"
-        else
-            // Parenthesize the return type to match the topValInfo 
-            let rtyL  = typeWithPrecL denv env 4 rty
-            let cxsL = constraintsL denv env cxs
-            match argInfos with
-            | [] -> rtyL --- cxsL
-            | _  -> 
-
-               // Format each argument, including its name and type 
-               let argL (ty,TopArgInfo(argAttribs,idOpt)) = 
-                   
-                   // Detect an optional argument 
-                   let isOptionalArg = HasAttrib denv.g denv.g.attrib_OptionalArgumentAttribute argAttribs
-                   match idOpt, isOptionalArg, try_dest_option_ty denv.g ty with 
-                   // Layout an optional argument 
-                   | Some(id), true, Some(ty) -> 
-                       leftL ("?"^id.idText) $$ sepL ":" $$ typeWithPrecL denv env 2 ty 
-                   // Layout an unnamed argument 
-                   | None, _,_ -> 
-                       typeWithPrecL denv env 2 ty
-                   // Layout a named argument 
-                   | Some id,_,_ -> 
-                        leftL id.idText $$ sepL ":" $$ typeWithPrecL denv env 2 ty
-
-               let allArgsL = 
-                   argInfos 
-                   |> List.mapSquared argL 
-                   |> List.map (sepListL (wordL "*"))
-                   |> List.map (fun x -> (x $$ wordL "->")) 
-               (List.foldBack (---) allArgsL rtyL) --- cxsL
-
-    let typarDeclsL denv nmL prefix typars = 
-        typarDeclsL' denv SimplifyTypes.typeSimplificationInfo0 nmL prefix typars 
-
-    let measureL denv unt  = 
-        measureL' denv SimplifyTypes.typeSimplificationInfo0 unt
-
-    let constraintL denv typars = 
-        match constraintL' denv SimplifyTypes.typeSimplificationInfo0 typars  with 
-        | h::_ -> h 
-        | [] -> emptyL
-
-    let typesAndConstraintsL denv taus =
-        let _,ptaus,cxs = PrettifyTypesN denv.g taus
-        let env = SimplifyTypes.CollectInfo true ptaus cxs
-        List.map (typeL' denv env) ptaus,constraintsL denv env env.SimplifyTypes.postfixConstraints
-
-    let topPrettifiedTypesAndConstraintsL denv argInfos tau cxs = 
-        let env = SimplifyTypes.CollectInfo true (tau:: List.collect (List.map fst) argInfos) cxs
-        topTypeL denv env argInfos tau env.SimplifyTypes.postfixConstraints
-
-    let topTypAndConstraintsL denv argInfos tau = 
-        let _,(argInfos,tau),cxs = PrettifyTypesN1 denv.g (argInfos,tau)
-        topPrettifiedTypesAndConstraintsL denv [argInfos] tau cxs
-
-    let memberTypeAndConstraintsL denv argInfos retTy parentTyparTys = 
-        let _,(parentTyparTys,argInfos,retTy),cxs = PrettifyTypesNM1 denv.g (parentTyparTys,argInfos,retTy)
-        (* Filter out the parent typars, which don't get shown in the member signature *)
-        let cxs = cxs |> List.filter (fun (tp,_) -> not (List.exists (dest_typar_typ denv.g >> typar_ref_eq tp) parentTyparTys)) 
-        topPrettifiedTypesAndConstraintsL denv argInfos retTy cxs
-
-    (* Layout: type spec - class, datatype, record, abbrev *)
-
-    let memberTypeCoreL denv memberToParentInst (methTypars:typars,argInfos,retTy) = 
-       let niceMethodTypars, allTyparInst = 
-           let methTyparNames = methTypars |> List.mapi (fun i tp -> if (NeedsPrettyTyparName tp) then sprintf "a%d" (List.length memberToParentInst + i) else tp.Name)
-           NewPrettyTypars memberToParentInst methTypars methTyparNames
-
-       let retTy = InstType allTyparInst retTy
-       let argInfos = argInfos |> List.map (fun infos -> if isNil infos then [(denv.g.unit_ty,TopValInfo.unnamedTopArg1)] else infos |> List.map (map1'2 (InstType allTyparInst))) 
-
-       (* Also format dummy types corresponding to any type variables on the container to make sure they *)
-       (* aren't chosen as names for displayed variables. *)
-       let memberParentTypars = List.map fst memberToParentInst
-       let parentTyparTys = List.map (mk_typar_ty >> InstType allTyparInst) memberParentTypars
-
-       niceMethodTypars,memberTypeAndConstraintsL denv argInfos retTy parentTyparTys
-
-    let memberTypeL denv v tps argInfos retTy = 
-        match PartitionValTypars denv.g v with
-        | Some(_,memberParentTypars,memberMethodTypars,memberToParentInst,_) ->  
-           memberTypeCoreL denv memberToParentInst (memberMethodTypars, argInfos, retTy)
-        | None -> 
-           [],topTypAndConstraintsL denv (List.concat argInfos) retTy 
-
-    let memberSigL denv  (memberToParentInst,nm,methTypars,argInfos,retTy) = 
-        let niceMethodTypars,tauL = memberTypeCoreL denv memberToParentInst (methTypars, argInfos, retTy)
-        let nameL = 
-            let nameL = wordL (DemangleOperatorName nm)
-            let nameL = if denv.showTyparBinding then typarDeclsL denv nameL true niceMethodTypars else nameL
-            nameL
-        nameL $$ wordL ":" $$ tauL
-
-
-    let memberLP denv (path : Path) (v:Val) = 
-        let membInfo = the v.MemberInfo
-        let topValInfo = the v.TopValInfo
-        let id = v.Id
-        let ty = v.Type
-        let stat = memFlagsL denv.htmlHideRedundantKeywords membInfo.MemberFlags
-        let tps,argInfos,rty,_ = GetMemberTypeInFSharpForm denv.g membInfo.MemberFlags topValInfo ty v.Range
-        let mkNameL niceMethodTypars name =       
-            let name  = DemangleOperatorName name
-            let nameL = if denv.showMemberContainers then tcrefL false denv (tcref_of_stripped_typ denv.g (enclosing_formal_typ_of_val denv.g v)) $$ sepL "." $$ (name &== path) else name &== path
-            let nameL = if denv.showTyparBinding then typarDeclsL denv nameL true niceMethodTypars else nameL
-            let nameL = accessibilityL denv v.Accessibility nameL
-            nameL
-
-        match membInfo.MemberFlags.MemberKind with 
-        | MemberKindMember -> 
-            let niceMethodTypars,tauL = memberTypeL denv v tps argInfos rty
-            let nameL = mkNameL niceMethodTypars membInfo.CompiledName
-            stat --- (nameL $$ wordL ":" $$ tauL)
-        | MemberKindClassConstructor  
-        | MemberKindConstructor -> 
-            let niceMethodTypars,tauL = memberTypeL denv v tps argInfos rty
-            let newL = accessibilityL denv v.Accessibility (wordL "new")
-            stat ++ newL $$ wordL ":" $$ tauL
-        | MemberKindPropertyGetSet -> stat
-        | MemberKindPropertyGet -> 
-            if isNil argInfos then 
-                // use error recovery because intellisense on an incomplete file will show this
-                errorR(Error("invalid form for a property getter. At least one '()' argument is required when using the explicit syntax",id.idRange));
-                stat --- wordL membInfo.PropertyName --- wordL "with get"
-            else
-                let argInfos = 
-                    match argInfos with 
-                    | [[(ty,_)]] when is_unit_typ denv.g ty -> []
-                    | _ -> argInfos
-
-                let niceMethodTypars,tauL = memberTypeL denv v tps argInfos rty
-                let nameL = mkNameL niceMethodTypars membInfo.PropertyName
-                stat --- (nameL $$ wordL ":" $$ (if isNil argInfos then tauL else tauL --- wordL "with get"))
-        | MemberKindPropertySet -> 
-            if argInfos.Length <> 1 || isNil argInfos.Head then 
-                // use error recovery because intellisense on an incomplete file will show this
-                errorR(Error("invalid form for a property setter. At least one argument is required",id.idRange));
-                stat --- wordL membInfo.PropertyName --- wordL "with set"
-            else 
-                let argInfos,valueInfo = List.frontAndBack argInfos.Head
-                let niceMethodTypars,tauL = memberTypeL denv v tps (if isNil argInfos then [] else [argInfos]) (fst valueInfo)
-                let nameL = mkNameL niceMethodTypars membInfo.PropertyName
-                stat --- (nameL $$ wordL ":" $$ (tauL --- wordL "with set"))
-
-    let nonMemberValSpecLP denv (path : Path) (tps,v:Val,tau,cxs) =
-        let env = SimplifyTypes.CollectInfo true [tau] cxs
-        let cxs = env.SimplifyTypes.postfixConstraints
-        let argInfos,rty = GetTopTauTypeInFSharpForm denv.g (arity_of_val v).ArgInfos tau v.Range
-        (* Drop the names from value arguments when printing them *)
-        let argInfos = argInfos |> List.mapSquared (fun (ty,info) -> ty,TopValInfo.unnamedTopArg1)
-        let nameL = v.DisplayName &== path
-        let nameL = accessibilityL denv v.Accessibility nameL
-        let nameL = if v.IsMutable then wordL "mutable" ++ nameL else nameL
-        let nameL = 
-            if not denv.html && v.MustInline && not denv.suppressInlineKeyword then 
-                wordL "inline" ++ nameL 
-            else 
-                nameL
-
-        let isOverGeneric = List.length (Zset.elements (free_in_type CollectTyparsNoCaching tau).FreeTypars) < List.length tps (* Bug: 1143 *)
-        let isTyFunction  = v.IsTypeFunction     (* Bug: 1143, and innerpoly tests *)
-        let typarBindingsL = 
-            if isTyFunction || isOverGeneric || denv.showTyparBinding then 
-                typarDeclsL denv nameL true tps 
-            else nameL
-        let valAndTypeL = (wordL "val"  $$ typarBindingsL --- wordL ":") --- topTypeL denv env argInfos rty cxs
-        match denv.generatedValueLayout v with
-          | None      -> valAndTypeL
-          | Some rhsL -> (valAndTypeL ++ wordL "=") --- rhsL
-
-    let valLP denv (path : Path) (v:Val) =
-        let vL = 
-            match v.MemberInfo with 
-            | None -> 
-                let tps,tau = v.TypeScheme
-
-                // adjust the type in case this is the 'this' pointer stored in a reference cell
-                let tau = if v.BaseOrThisInfo = CtorThisVal && is_refcell_ty denv.g tau then dest_refcell_ty denv.g tau else tau
-
-                let tprenaming,ptau,cxs = PrettyTypes.PrettifyTypes1 denv.g tau
-                let ptps = 
-                    tps  
-                       |> generalize_typars 
-                       // Badly formed code may instantiate rigid declared typars to types, e.g. see bug
-                       // Hence we double check here that the thing is really a type variable
-                       |> List.map (InstType tprenaming)
-                       |> List.filter (is_anypar_typ denv.g) 
-                       |> List.map (dest_anypar_typ denv.g)
-                nonMemberValSpecLP denv path (ptps,v,ptau,cxs)
-            | Some _ -> 
-                memberLP denv path v
-        attribsL denv KindType v.Attribs vL
-
-    let valL denv (v:Val) = valLP denv Path.NoPath v
-
-    let extensionMembersLP denv (path:Path) (vs:Val list) =
-      let extensionMemberLP (v:Val) =
-        let tycon = v.MemberApparentParent.Deref
-        let nameL = wordL tycon.DisplayName
-        let nameL = accessibilityL denv tycon.Accessibility nameL // "type-accessibility"
-        let tps =
-          match PartitionValTypars denv.g v with
-            | Some(_,memberParentTypars,memberMethodTypars,_,_) -> memberParentTypars
-            | None -> []          
-        let lhsL = wordL "type" $$ typarDeclsL denv nameL tycon.IsPrefixDisplay tps
-        (lhsL $$ wordL "with") @@-- (valLP denv path v)
-      aboveListL (List.map extensionMemberLP vs)
-
-    let ucaseArgTypesL denv argtys = 
-        sepListL (wordL "*") (List.map (typeWithPrecL denv SimplifyTypes.typeSimplificationInfo0 2) argtys)
-
-    let ucaseLP denv (path : Path) prefixL ucase =
-        let nmL = (DemangleOperatorName ucase.ucase_id.idText) &== path
-        //let nmL = accessibilityL denv ucase.Accessibility nmL
-        match ucase.RecdFields |> List.map (fun rfld -> rfld.FormalType) with
-        | []     -> (prefixL $$ nmL)
-        | argtys -> (prefixL $$ nmL $$ wordL "of") --- ucaseArgTypesL denv argtys
-
-    let ucaseL denv prefixL ucase = ucaseLP denv Path.Empty prefixL ucase
-
-    let ucasesLP denv (path : Path) ucases =
-        let prefixL = wordL "|" // See bug://2964 - always prefix in case preceeded by accessibility modifier
-        List.map (ucaseLP denv path prefixL) ucases
-        
-    let rfspecLP addAccess denv (path : Path) (fld:RecdField) =
-        let lhs = fld.Name &== path
-        let lhs = (if addAccess then accessibilityL denv fld.Accessibility lhs else lhs)
-        let lhs = if fld.IsMutable then wordL "mutable" --- lhs else lhs
-        (lhs $$ rightL ":") --- typeL denv fld.FormalType
-
-    let rfspecL addAccess denv fld = rfspecLP addAccess denv Path.Empty fld
-
-    /// When to force a break? "type tyname =  repn"
-    /// When repn is class or datatype constructors (not single one).
-    let breakTypeDefnEqn repr =
-        match repr with 
-        | TFsObjModelRepr _ -> true
-        | TFiniteUnionRepr r    -> (List.length (r.funion_ucases.UnionCasesAsList) > 1) 
-        | TRecdRepr _ -> true
-        | TAsmRepr _ 
-        | TILObjModelRepr _  -> false
-        | TMeasureableRepr _ -> false
-
-    let tyconLP denv (path : Path) typewordL (tycon:Tycon) =
-        let prefix = tycon.IsPrefixDisplay
-        let name   = tycon.DisplayName
-        let nameL  = name &== path
-        let nameL = accessibilityL denv tycon.Accessibility nameL 
-        let denv = denv_scope_access tycon.Accessibility denv
-        let path  = path.Add name // the full names of constructors and , e.g., have their type name as part of the path
-        let lhsL =
-            let tps = tycon.TyparsNoRange
-            let tpsL = typarDeclsL denv nameL prefix tps
-            typewordL $$ tpsL
-        let memberImplementLs,memberCtorLs,memberInstanceLs,memberStaticLs = 
-            let tcaug = tycon.TypeContents
-            let adhoc = 
-                adhoc_of_tycon tycon  
-                |> List.filter (vref_is_dispatch_slot >> not) 
-                |> List.filter (fun v -> 
-                                    match v.MemberInfo.Value.ImplementedSlotSigs with 
-                                    | TSlotSig(_,oty,_,_,_,_) :: _ -> 
-                                        // Don't print overrides in HTML docs
-                                        denv.showOverrides && 
-                                        // Don't print individual methods forming interface implementations - these are currently never exported 
-                                        not (is_interface_typ denv.g oty)
-                                    | [] -> true)
-                |> List.filter (fun v -> denv.showObsoleteMembers || not (HasAttrib denv.g denv.g.attrib_SystemObsolete v.Attribs))
-            (* sort *)            
-            let sortKey (v:ValRef) = (not v.IsConstructor,    (* constructors before others *)
-                                      v.Id.idText)            (* sort by name *)
-            let adhoc = adhoc |> List.sortBy sortKey
-            let iimpls = 
-                match tycon.TypeReprInfo with 
-                | Some (TFsObjModelRepr r) when r.fsobjmodel_kind = TTyconInterface -> []
-                | _ -> tcaug.tcaug_implements
-            let iimpls = iimpls |> List.filter (fun (ty,compgen,m) -> not compgen)
-            (* if TTyconInterface, the iimpls should be printed as inheritted interfaces *)
-            let iimplsLs = iimpls |> List.map (fun (ty,compgen,m) -> wordL "interface" --- typeL denv ty)
-            let adhocCtorsLs    = adhoc |> List.filter (fun v -> v.IsConstructor)                               |> List.map (fun vref -> valLP denv path (deref_val vref))
-            let adhocInstanceLs = adhoc |> List.filter (fun v -> not v.IsConstructor && v.IsInstanceMember)     |> List.map (fun vref -> valLP denv path (deref_val vref))
-            let adhocStaticLs   = adhoc |> List.filter (fun v -> not v.IsConstructor && not v.IsInstanceMember) |> List.map (fun vref -> valLP denv path (deref_val vref))
-            iimplsLs,adhocCtorsLs,adhocInstanceLs,adhocStaticLs
-        let memberLs = memberImplementLs @ memberCtorLs @ memberInstanceLs @ memberStaticLs
-        let addMembersAsWithEnd reprL = 
-            if isNil memberLs then reprL
-            else reprL @@ (wordL "with" @@-- aboveListL memberLs) @@ wordL "end"
-
-        let reprL = 
-            match tycon.TypeReprInfo with 
-            | Some repr -> 
-                let brk  = nonNil memberLs || breakTypeDefnEqn repr
-                let rhsL =                     
-                    let addReprAccessL l = accessibilityL denv tycon.TypeReprAccessibility l 
-                    let denv = denv_scope_access tycon.TypeReprAccessibility denv  
-                    match repr with 
-                    | TRecdRepr flds ->
-                        let recdFieldRefL fld = rfspecLP false denv path fld $$ rightL ";"
-                        let recdL = tycon.TrueFieldsAsList |> List.map recdFieldRefL |> aboveListL |> braceL
-                        addMembersAsWithEnd (addReprAccessL recdL)
-                        
-                    | TFsObjModelRepr r -> 
-                        match r.fsobjmodel_kind with 
-                        | TTyconDelegate (TSlotSig(nm,typ, _,_,paraml, rty)) ->
-                            let rty = GetFSharpViewOfReturnType denv.g rty
-                            wordL "delegate of" --- topTypeL denv SimplifyTypes.typeSimplificationInfo0 (paraml |> List.mapSquared (fun sp -> (sp.Type, TopValInfo.unnamedTopArg1))) rty []
-                        | _ ->
-                            match r.fsobjmodel_kind with
-                            | TTyconEnum -> 
-                                tycon.TrueFieldsAsList
-                                |> List.map (fun f -> 
-                                                  match f.LiteralValue with 
-                                                  | None -> emptyL
-                                                  | Some c -> wordL "| " $$ (f.Name &== path) $$ wordL " = " $$ constL c)
-                                |> aboveListL
-                            | _ -> 
-                                let start = 
-                                    match r.fsobjmodel_kind with
-                                    | TTyconClass -> "class" 
-                                    | TTyconInterface -> "interface" 
-                                    | TTyconStruct -> "struct" 
-                                    | TTyconEnum -> "enum" 
-                                    | _ -> failwith "???"
-                                let inherits = 
-                                   match r.fsobjmodel_kind, tycon.TypeContents.tcaug_super with
-                                   | TTyconClass,Some super -> [wordL  "inherit" $$ (typeL denv super)] 
-                                   | TTyconInterface,_ -> 
-                                     let tcaug = tycon.TypeContents
-                                     tcaug.tcaug_implements 
-                                       |> List.filter (fun (ity,compgen,_) -> not compgen)
-                                       |> List.map (fun (ity,compgen,_) -> wordL  "inherit" $$ (typeL denv ity))
-                                   | _ -> []
-                                let vsprs = 
-                                    adhoc_of_tycon tycon 
-                                    |> List.filter (fun v -> isNil (the(v.MemberInfo)).ImplementedSlotSigs) 
-                                    |> List.filter vref_is_dispatch_slot 
-                                    |> List.map (fun vref -> valLP denv path (deref_val vref))
-                                let staticValsLs  = 
-                                    tycon.TrueFieldsAsList
-                                    |> List.filter (fun f -> f.IsStatic)
-                                    |> List.map (fun f -> wordL "static" $$ wordL "val" $$ rfspecLP true denv path f)
-                                let instanceValsLs  = 
-                                    tycon.TrueFieldsAsList
-                                    |> List.filter (fun f -> not f.IsStatic)
-                                    |> List.map (fun f -> wordL "val" $$ rfspecLP true denv path f)
-                                let alldecls = inherits @ memberImplementLs @ memberCtorLs @ instanceValsLs @ vsprs @ memberInstanceLs @ staticValsLs @ memberStaticLs
-                                let emptyMeasure = match tycon.TypeOrMeasureKind with KindMeasure -> isNil alldecls | _ -> false
-                                if emptyMeasure then emptyL else (wordL start @@-- aboveListL alldecls) @@ wordL "end"
-                    | TFiniteUnionRepr ucases        -> 
-                        let ucasesL = tycon.UnionCasesAsList |> ucasesLP denv path |> aboveListL
-                        addMembersAsWithEnd (addReprAccessL ucasesL)
-                    | TAsmRepr s                      -> 
-                        wordL "(# \"\" #)"
-                    | TMeasureableRepr ty                 ->
-                        typeL denv ty
-                 
-                    | TILObjModelRepr (scoref,enc,td) -> IlPrint.ilTypeDefL denv path td
-
-                let brk  = match tycon.TypeReprInfo with
-                           | Some (TILObjModelRepr _) -> true
-                           | _                        -> brk
-                if rhsL = emptyL
-                   then lhsL
-                   else (* only unions and records can have accessibility on their representation *)
-                        if brk
-                           then (lhsL $$ wordL "=") @@-- rhsL 
-                           else (lhsL $$ wordL "=") ---  rhsL
-
-            | None   -> 
-                match tycon.TypeAbbrev with
-                | None   -> 
-                    addMembersAsWithEnd lhsL 
-                | Some a -> 
-                    (lhsL $$ wordL "=") --- (typeL denv a)
-        attribsL denv tycon.TypeOrMeasureKind tycon.Attribs reprL
-
-    let tyconL denv typewordL tycon = tyconLP denv Path.NoPath typewordL tycon
-
-    let prettyTypeL denv typ = 
-        let tprenaming,typ,cxs = PrettyTypes.PrettifyTypes1 denv.g typ
-        let env = SimplifyTypes.CollectInfo true [typ] cxs
-        let cxsL = constraintsL denv env env.SimplifyTypes.postfixConstraints
-        typeWithPrecL denv env 2 typ  --- cxsL
-
-    (* Layout: exception spec *)
-      
-    let exnDefnReprL denv repr =
-        match repr with 
-        | TExnAbbrevRepr ecref -> wordL "=" --- tcrefL true denv ecref
-        | TExnAsmRepr tref     -> wordL "=" --- wordL "(# ... #)"
-        | TExnNone             -> emptyL
-        | TExnFresh r          -> 
-            match r.TrueFieldsAsList with
-            | []  -> emptyL
-            | r -> wordL "of" --- ucaseArgTypesL denv (r |> List.map (fun rfld -> rfld.FormalType))
-
-    let exnDefnLP denv (path : Path) (exnc:Entity) =
-        let nm = exnc.DemangledExceptionName
-        let nmL = annotateWithPath nm path (mangle_exception_name nm)
-        let nmL = accessibilityL denv exnc.TypeReprAccessibility nmL
-        let exnL = wordL "exception" $$ nmL // need to tack on the Exception at the right of the name for goto definition
-        exnL $$ exnDefnReprL denv exnc.ExceptionInfo
-
-    let exnDefnL denv exnc = exnDefnLP denv Path.NoPath exnc
-
-    (* Layout: module spec *)
-
-    let tycon_specsLP denv (path : Path) (tycons:Tycon list) =
-        match tycons with 
-        | [] -> emptyL
-        | [h] when h.IsExceptionDecl -> exnDefnLP denv path h
-        | h :: t -> 
-            let x  = tyconLP denv path (wordL "type") h
-            let xs = List.map (tyconLP denv path (wordL "and")) t
-            aboveListL (x::xs)
-
-    /// Layout the inferred signature of a compilation unit
-    let InferredSigOfModuleExprL showHeader denv expr =
-
-        let rec isConcreteNamespace x = 
-            match x with 
-            | TMDefRec(tycons,binds,mbinds,m) -> 
-                nonNil tycons || not (FlatList.isEmpty binds) || (mbinds |> List.exists (fun (TMBind(x,_)) -> not x.IsNamespace))
-            | TMDefLet(bind,m)  -> true
-            | TMDefDo(e,m)  -> true
-            | TMDefs(defs) -> defs |> List.exists isConcreteNamespace 
-            | TMAbstract(TMTyped(_,def,_)) -> isConcreteNamespace def
-
-        let rec imexprLP denv (path : Path) (TMTyped(mty,def,m)) = imdefLP denv path def
-
-        and imexprL denv (TMTyped(mty,def,m)) = imexprLP denv Path.Empty (TMTyped(mty,def,m))
-
-        and imdefsLP denv (path : Path) x = aboveListL (x |> List.map (imdefLP denv path))
-
-        and imdefLP denv (path : Path) x = 
-            let filterVal    (v:Val) = not v.IsCompilerGenerated && isNone v.MemberInfo
-            let filterExtMem (v:Val) = v.IsExtensionMember
-            match x with 
-            | TMDefRec(tycons,binds,mbinds,m) -> 
-                 tycon_specsLP denv path tycons @@ 
-                 (binds |> FlatList.to_list |> vars_of_binds |> List.filter filterExtMem |> extensionMembersLP denv path) @@
-                 (binds |> FlatList.to_list |> vars_of_binds |> List.filter filterVal    |> List.map (valLP denv path)   |> aboveListL) @@
-                 (mbinds |> List.map (imbindLP denv path) |> aboveListL)
-            | TMDefLet(bind,m) -> ([bind] |> vars_of_binds |> List.filter filterVal    |> List.map (valLP denv path) |> aboveListL)
-            | TMDefs(defs) -> imdefsLP denv path defs
-            | TMDefDo _  -> emptyL
-            | TMAbstract(mexpr) -> imexprLP denv path mexpr
-        and imbindLP denv (path : Path) (TMBind(mspec, def)) = 
-            let nm = demangled_name_of_modul mspec
-            let innerPath = (full_cpath_of_modul mspec).AccessPath
-            let outerPath = mspec.CompilationPath.AccessPath
-            let k = mspec.ModuleOrNamespaceType.ModuleOrNamespaceKind
-
-            let denv = denv_add_open_path (List.map fst innerPath) denv
-            if mspec.IsNamespace then  
-                let basic = imdefLP denv path def
-                // Check if this namespace contains anything interesting
-                if isConcreteNamespace def then 
-                    // This is a container namespace. We print the header when we get to the first concrete module.
-                    let headerL = wordL ("namespace " ^ (String.concat "." (innerPath |> List.map fst)))
-                    headerL @@-- basic
-                else
-                    // This is a namespace that only contains namespaces. Skipt the header
-                    basic
-            else
-                // This is a module 
-                let nmL   = accessibilityL denv mspec.Accessibility (nm &== path)
-                let denv  = denv_scope_access mspec.Accessibility denv
-                let basic = imdefLP denv path def
-                // Check if its an outer module or a nested module
-                if (outerPath |> List.forall (fun (_,istype) -> istype = Namespace) ) then 
-                    // OK, this is an outer module
-                    if showHeader then 
-                        // OK, we're not in F# Interactive
-                        // Check if this is an outer module with no namespace
-                        if isNil outerPath then 
-                            // If so print a "module" declaration
-                            (wordL "module" $$ nmL) @@ basic
-                        else 
-                            // Otherwise this is an outer module contained immediately in a namespace
-                            // We already printed the namespace declaration earlier.  So just print the 
-                            // module now.
-                            ((wordL "module" $$ nmL $$ wordL "=" $$ wordL "begin") @@-- basic) @@ wordL "end"
-                    else
-                        // OK, wer'e in F# Interactive, presumably the implicit module for each interaction.
-                        basic
-                else
-                    // OK, this is a nested module
-                    ((wordL "module" $$ nmL $$ wordL "=" $$ wordL "begin") @@-- basic) @@ wordL "end"
-        imexprL denv expr
-
-    type DeclSpec = 
-        | DVal of Val 
-        | DTycon of Tycon 
-        | DException of Tycon 
-        | DModul of ModuleOrNamespace
-
-    let rangeOfDeclSpec = function
-        | DVal   v -> v.Range
-        | DTycon t -> t.Range
-        | DException t -> t.Range
-        | DModul m -> m.Range
-
-    /// modul - provides (valspec)* - and also types, exns and submodules.
-    /// Each defines a decl block on a given range.
-    /// Can sort on the ranges to recover the original declaration order.
-    let rec ModuleOrNamespaceTypeLP (topLevel : bool)(denv : DisplayEnv)(path : Path)(mtype : ModuleOrNamespaceType) =
-        (* REVIEW: consider a better way to keep decls in order. *)
-        let decl_specs : DeclSpec list =
-            List.concat
-              [mtype.AllValuesAndMembers |> NameMap.range |> List.filter (fun v -> not v.IsCompilerGenerated && v.MemberInfo = None) |> List.map DVal;
-               mtype.TypeDefinitions |> List.map DTycon;
-               mtype.ExceptionDefinitions |> List.map DException;
-               mtype.ModuleAndNamespaceDefinitions |> List.map DModul;
-              ]
-       
-        let decl_specs = List.sortWith (orderOn rangeOfDeclSpec range_ord) decl_specs
-        let decl_specL =
-          function // only show namespaces / modules at the top level; this is because we've no global namespace
-          | DVal  vspec      when not topLevel -> valLP                     denv path vspec
-          | DTycon tycon     when not topLevel -> tyconLP                   denv path (wordL "type") tycon
-          | DException tycon when not topLevel -> exnDefnLP                 denv path tycon 
-          | DModul mspec                       -> ModuleOrNamespaceLP false denv path mspec
-          | _                                  -> emptyL // this catches non-namespace / modules at the top-level
-
-        aboveListL (List.map decl_specL decl_specs)
-
-    and ModuleOrNamespaceLP (topLevel : bool)(denv : DisplayEnv)(path : Path)(mspec : ModuleOrNamespace) = 
-        let istype = mspec.ModuleOrNamespaceType.ModuleOrNamespaceKind
-        let nm     = demangled_name_of_modul mspec
-        let denv   = denv_add_open_modref (mk_local_modref mspec) denv
-        let nmL    = accessibilityL denv mspec.Accessibility (nm &== path)
-        let denv   = denv_scope_access mspec.Accessibility denv       
-        let path   = path.Add nm // tack on the current module to be used in calls to linearise all subterms
-        let body   = ModuleOrNamespaceTypeLP topLevel denv path  mspec.ModuleOrNamespaceType
-        if istype = Namespace
-           then (wordL "namespace" $$ nmL) @@-- body
-           else (wordL "module" $$ nmL $$ wordL "= begin") @@-- body @@ wordL "end"
-
-    let ModuleOrNamespaceTypeL (denv : DisplayEnv)(mtype : ModuleOrNamespaceType) = ModuleOrNamespaceTypeLP false denv Path.Empty mtype
-    let ModuleOrNamespaceL (denv : DisplayEnv)(mspec : ModuleOrNamespace) = ModuleOrNamespaceLP false denv Path.Empty mspec
-    let AssemblyL denv (mspec : ModuleOrNamespace) = ModuleOrNamespaceTypeLP true denv Path.Empty mspec.ModuleOrNamespaceType // we seem to get the *assembly* name as an outer module, this strips this off
-
-    //--------------------------------------------------------------------------
-    // Nice printing of a subset of expressions, e.g. for refutations in pattern matching
-    //--------------------------------------------------------------------------
-
-    let rec dataExprL denv expr = dataExprWrapL denv false expr
-    and atomL denv expr = dataExprWrapL denv true  expr (* true means bracket if needed to be atomic expr *)
-
-    and dataExprWrapL denv isAtomic expr =
-        let wrap = bracketIfL isAtomic in (* wrap iff require atomic expr *)
-        match expr with
-        | TExpr_const (c,m,ty)                          -> 
-            if is_enum_typ denv.g ty then 
-                wordL "enum" $$ angleL denv (typeL denv ty) $$ bracketL (constL c)
-            else
-                constL c
-
-        | TExpr_val (v,flags,m)                         -> wordL (v.DisplayName)
-        | TExpr_link rX                                 -> dataExprWrapL denv isAtomic (!rX)
-        | TExpr_op(TOp_ucase(c),tyargs,args,m)        -> 
-            if denv.g.ucref_eq c denv.g.nil_ucref then wordL "[]"
-            elif denv.g.ucref_eq c denv.g.cons_ucref then 
-                let rec strip = function (TExpr_op(TOp_ucase(c),tyargs,[h;t],m)) -> h::strip t | _ -> []
-                listL (dataExprL denv) (strip expr)
-            elif isNil(args) then 
-                wordL c.CaseName 
-            else 
-                (wordL c.CaseName ++ bracketL (commaListL (dataExprsL denv args)))
-            
-        | TExpr_op(TOp_exnconstr(c),_,args,m)           ->  (wordL c.MangledName ++ bracketL (commaListL (dataExprsL denv args)))
-        | TExpr_op(TOp_tuple,tys,xs,m)                  -> tupleL (dataExprsL denv xs)
-        | TExpr_op(TOp_recd (ctor,tc),tinst,xs,m)       -> let fields = tc.TrueInstanceFieldsAsList
-                                                           let lay fs x = (wordL fs.rfield_id.idText $$ sepL "=") --- (dataExprL denv x)
-                                                           leftL "{" $$ semiListL (List.map2 lay fields xs) $$ rightL "}" 
-        | TExpr_op(TOp_array,[ty],xs,m)                 -> leftL "[|" $$ semiListL (dataExprsL denv xs) $$ rightL "|]"
-        | _ -> wordL "?"
-    and dataExprsL denv xs = List.map (dataExprL denv) xs
-
-    //--------------------------------------------------------------------------
-    // Print Signatures/Types - ouput functions - old style
-    //-------------------------------------------------------------------------- 
-        
-    (* A few old-style o/p functions are used, e.g. in tc.ml *)    
-    let output_tref                 denv os x    = trefL denv x                |> bufferL os
-    let output_tcref                denv os x    = x |> tcrefL false denv      |> bufferL os    
-    let output_val_spec             denv os x    = x |> valL denv              |> bufferL os
-    let output_typ                  denv os x    = x |> typeL denv             |> bufferL os  
-    let output_exnc                 denv os x    = x |> exnDefnL denv          |> bufferL os
-    let output_typar_constraints    denv os x    = x |> constraintsL denv SimplifyTypes.typeSimplificationInfo0  |> bufferL os
-    let string_of_typar_constraints denv x       = x |> constraintsL denv SimplifyTypes.typeSimplificationInfo0  |> showL
-    let output_rfield               denv os x    = x |> rfspecL false denv |> bufferL os
-    let output_tycon                denv os x    = tyconL denv (wordL "type") x      |> bufferL os
-    let output_ucase                denv os x    = ucaseL denv (wordL "|") x |> bufferL os
-    let output_typars               denv nm os tps  = (typarDeclsL denv  (wordL nm) true tps)  |> bufferL os
-    let output_typar_constraint     denv os tpc  = output_typar_constraints denv os [tpc]
-    let string_of_typar_constraint  denv tpc     = string_of_typar_constraints denv [tpc]
-    let string_of_typ               denv    typ  = typeL denv typ                                 |> showL
-    let pretty_string_of_typ        denv    typ  = prettyTypeL denv typ                          |> showL
-    let pretty_string_of_unit       denv    unt  = measureL denv unt                          |> showL
-    let string_of_rfield            denv x    = x |> rfspecL false denv |> showL
-    let string_of_tycon             denv x    = tyconL denv (wordL "type") x      |> showL
-    let string_of_ucase             denv x    = ucaseL denv (wordL "|") x |> showL
-    let string_of_typars            denv nm tps  = (typarDeclsL denv  (wordL nm) true tps)  |> showL
-    let string_of_exnc              denv x    = x |> exnDefnL denv          |> showL
-    let string_of_val_spec          denv x    = x |> valL denv              |> showL
-    (* Print members with a qualification showing the type they are contained in *)
-    let output_qualified_val_spec denv os v = output_val_spec { denv with showMemberContainers=true; } os v
-    let string_of_qualified_val_spec denv v = string_of_val_spec { denv with showMemberContainers=true; } v
-
-end
-
-//--------------------------------------------------------------------------
-// DEBUG layout
-//---------------------------------------------------------------------------
-
-module DebugPrint = begin
-    open Microsoft.FSharp.Compiler.Layout
-    open PrettyTypes
-    let layout_ranges = ref false  
-
-    let intL (n:int)          = wordL (string n )
-    let int64L (n:int64)          = wordL (string n )
-
-    let namemapL xL xmap = NameMap.foldRange (fun x z -> z @@ xL x) xmap emptyL
-
-    let bracketIfL x lyt = if x then bracketL lyt else lyt
-
-    let lvalopL x = 
-        match x with 
-        | LGetAddr  -> wordL "LGetAddr"
-        | LByrefGet -> wordL "LByrefGet"
-        | LSet      -> wordL "LSet"
-        | LByrefSet -> wordL "LByrefSet"
-
-    let angleBracketL l = leftL "<" $$ l $$ rightL ">"
-    let angleBracketListL l = angleBracketL (sepListL (sepL ",") l)
-
-
-    let memFlagsL hide memFlags = 
-        let stat = if hide || memFlags.MemberIsInstance || (memFlags.MemberKind = MemberKindConstructor) then emptyL else wordL "static"
-        let stat = if not memFlags.MemberIsDispatchSlot && memFlags.MemberIsVirtual then stat ++ wordL "virtual" 
-                   elif not hide && memFlags.MemberIsDispatchSlot then stat ++ wordL "abstract" 
-                   elif memFlags.MemberIsOverrideOrExplicitImpl then stat ++ wordL "override" 
-                   else stat
-        (* let stat = if memFlags.MemberIsFinal then stat ++ wordL "final" else stat in  *)
-        stat
-
-    let stampL n w = if !verboseStamps then w $$ sepL "#" $$ int64L n else w
-
-    let tcrefL (tc:TyconRef) = wordL tc.DisplayName |> stampL tc.Stamp
-
-
-    let rec auxTypeL env typ = auxTypeWrapL env false typ
-
-    and auxTypeAtomL env typ = auxTypeWrapL env true  typ
-
-    and auxTyparsL env tcL prefix tinst = 
-       match tinst with 
-       | [] -> tcL
-       | [t] -> 
-         let tL = auxTypeAtomL env t
-         if prefix then        tcL $$ angleBracketL tL 
-         else            tL $$ tcL 
-       | _ -> 
-         let tinstL = List.map (auxTypeL env) tinst
-         if prefix then                   
-             tcL $$ angleBracketListL tinstL
-         else  
-             tupleL tinstL $$ tcL
-            
-    and auxTypeWrapL env isAtomic typ = 
-        let wrap x = NicePrint.bracketIfL isAtomic x in (* wrap iff require atomic expr *)
-        match strip_tpeqns typ with
-        | TType_forall (typars,rty) -> 
-           (leftL "!" $$ typarDeclsL typars --- auxTypeL env rty) |> wrap
-        | TType_ucase (UCRef(tcref,_),tinst)  
-        | TType_app (tcref,tinst)   -> 
-           let prefix = tcref.IsPrefixDisplay
-           let tcL = tcrefL tcref
-           auxTyparsL env tcL prefix tinst
-        | TType_tuple typs          -> sepListL (wordL "*") (List.map (auxTypeAtomL env) typs) |> wrap
-        | TType_fun (f,x)           -> ((auxTypeAtomL env f $$ wordL "->") --- auxTypeL env x) |> wrap
-        | TType_var typar           -> auxTyparWrapL env isAtomic typar 
-        | TType_modul_bindings              -> wordL "structT"
-        | TType_measure unt -> 
-#if DEBUG
-          leftL "{" $$
-          (match !global_g with
-           | None -> wordL ""
-           | Some g -> 
-             let sortVars (vs:(Typar * int) list) = vs |> List.sortBy (fun (v,_) -> v.DisplayName) 
-             let sortCons (cs:(TyconRef * int) list) = cs |> List.sortBy (fun (c,_) -> c.DisplayName) 
-             let negvs,posvs = ListMeasureVarOccsWithNonZeroExponents         unt |> sortVars |> List.partition (fun (_,e) -> e<0)
-             let negcs,poscs = ListMeasureConOccsWithNonZeroExponents g false unt |> sortCons |> List.partition (fun (_,e) -> e<0)
-             let unparL (uv:Typar) = wordL ("'" ^  uv.DisplayName)
-             let unconL tc = tcrefL tc
-             let prefix = spaceListL  (List.map (fun (v,e) -> if e=1  then unparL v else unparL v -- wordL (Printf.sprintf "^ %d" e)) posvs @
-                                       List.map (fun (c,e) -> if e=1  then unconL c else unconL c -- wordL (Printf.sprintf "^ %d" e)) poscs)
-             let postfix = spaceListL (List.map (fun (v,e) -> if e= -1 then unparL v else unparL v -- wordL (Printf.sprintf "^ %d" (-e))) negvs @
-                                       List.map (fun (c,e) -> if e= -1 then unconL c else unconL c -- wordL (Printf.sprintf "^ %d" (-e))) negcs)
-             match (negvs,negcs) with 
-             | [],[] -> prefix 
-             | _ -> prefix $$ sepL "/" $$ postfix) $$
-          rightL "}"
-#else
-          wordL ""
-#endif
-
-    and auxTyparWrapL env isAtomic (typar:Typar) =
-          let wrap x = NicePrint.bracketIfL isAtomic x in (* wrap iff require atomic expr *)  
-          (* There are several cases for pprinting of typar.
-           * 
-           *   'a              - is multiple  occurance.
-           *   #Type           - inplace coercion constraint and singleton
-           *   ('a :> Type)    - inplace coercion constraint not singleton
-           *   ('a.opM : S->T) - inplace operator constraint
-           *)
-          let tpL =
-            wordL (prefix_of_static_req typar.StaticReq
-                   ^ prefix_of_rigid typar
-                   ^ typar.DisplayName)
-          let varL = tpL |> stampL typar.Stamp 
-
-          match Zmap.tryfind typar env.SimplifyTypes.inplaceConstraints with
-          | Some (typarConstrTyp) ->
-              if Zset.mem typar env.SimplifyTypes.singletons then
-                leftL "#" $$ auxTyparConstraintTypL env typarConstrTyp
-              else
-                (varL $$ sepL ":>" $$ auxTyparConstraintTypL env typarConstrTyp) |> wrap
-          | _ -> varL
-
-    and auxTypar2L     env typar = auxTyparWrapL env false typar
-
-    and auxTyparAtomL env typar = auxTyparWrapL env true  typar
-
-    and auxTyparConstraintTypL env ty = auxTypeL env ty
-
-    and auxTraitL env (TTrait(tys,nm,memFlags,argtys,rty,_)) =
-#if DEBUG
-        match !global_g with
-        | None -> wordL ""
-        | Some g -> 
-            let rty = GetFSharpViewOfReturnType g rty
-            let stat = memFlagsL false memFlags
-            let argsL = sepListL (wordL "*") (List.map (auxTypeAtomL env) argtys)
-            let resL  = auxTypeL env rty
-            let methodTypeL = (argsL $$ wordL "->") ++ resL
-            bracketL (stat ++ bracketL (sepListL (wordL "or") (List.map (auxTypeAtomL env) tys)) ++ wordL "member" --- (wordL nm $$ wordL ":" -- methodTypeL))
-#else
-        wordL "trait"
-#endif
-
-    and auxTyparConstraintL env (tp,tpc) = 
-        match tpc with
-        | TTyparCoercesToType(typarConstrTyp,m) ->
-            auxTypar2L env tp $$ wordL ":>" --- auxTyparConstraintTypL env typarConstrTyp
-        | TTyparMayResolveMemberConstraint(traitInfo,_) ->
-            auxTypar2L env tp $$ wordL ":"  --- auxTraitL env traitInfo
-        | TTyparDefaultsToType(_,ty,m) ->
-            wordL "default" $$ auxTypar2L env tp $$ wordL ":" $$ auxTypeL env ty
-        | TTyparIsEnum(ty,m) ->
-            auxTypar2L env tp $$ wordL ":" $$ auxTyparsL env (wordL "enum") true [ty]
-        | TTyparIsDelegate(aty,bty,m) ->
-            auxTypar2L env tp $$ wordL ":" $$ auxTyparsL env (wordL "delegate") true [aty; bty]
-        | TTyparSupportsNull(m) ->
-            auxTypar2L env tp $$ wordL ":" $$ wordL "null"
-        | TTyparIsNotNullableValueType(m) ->
-            auxTypar2L env tp $$ wordL ":" $$ wordL "struct"
-        | TTyparIsReferenceType(m) ->
-            auxTypar2L env tp $$ wordL ":" $$ wordL "not struct"
-        | TTyparSimpleChoice(tys,m) ->
-            auxTypar2L env tp $$ wordL ":" $$ bracketL (sepListL (sepL "|") (List.map (auxTypeL env) tys))
-        | TTyparRequiresDefaultConstructor(m) ->
-            auxTypar2L env tp $$ wordL ":" $$ bracketL (wordL "new : unit -> " $$ (auxTypar2L env tp))
-
-    and auxTyparConstraintsL env x = 
-        match x with 
-        | []   -> emptyL
-        | cxs -> wordL "when" --- aboveListL (List.map (auxTyparConstraintL env) cxs)    
-
-    and TyparL     tp = auxTypar2L     SimplifyTypes.typeSimplificationInfo0 tp 
-    and typarAtomL tp = auxTyparAtomL SimplifyTypes.typeSimplificationInfo0 tp
-
-    and typeAtomL tau =
-        let tau,cxs = tau,[]
-        let env = SimplifyTypes.CollectInfo false [tau] cxs
-        match env.SimplifyTypes.postfixConstraints with
-        | [] -> auxTypeAtomL env tau
-        | _ -> bracketL (auxTypeL env tau --- auxTyparConstraintsL env env.SimplifyTypes.postfixConstraints)
-          
-    and typeL tau =
-        let tau,cxs = tau,[]
-        let env = SimplifyTypes.CollectInfo false [tau] cxs
-        match env.SimplifyTypes.postfixConstraints with
-        | [] -> auxTypeL env tau 
-        | _ -> (auxTypeL env tau --- auxTyparConstraintsL env env.SimplifyTypes.postfixConstraints) 
-
-    and TyparDeclL tp =
-        let tau,cxs = mk_typar_ty tp,(List.map (fun x -> (tp,x)) tp.Constraints)
-        let env = SimplifyTypes.CollectInfo false [tau] cxs
-        match env.SimplifyTypes.postfixConstraints with
-        | [] -> auxTypeL env tau 
-        | _ -> (auxTypeL env tau --- auxTyparConstraintsL env env.SimplifyTypes.postfixConstraints) 
-    and typarDeclsL tps = angleBracketListL (List.map TyparDeclL       tps) 
-
-    //--------------------------------------------------------------------------
-    // DEBUG layout - types
-    //--------------------------------------------------------------------------
-      
-    let rangeL m = wordL (string_of_range m)
-
-    let instL tyL tys =
-        match tys with
-        | []  -> emptyL
-        | tys -> sepL "@[" $$ commaListL (List.map tyL tys) $$ rightL "]"
-
-    let ValRefL  (vr:ValRef)  = 
-        wordL vr.MangledName |> stampL vr.Stamp 
-
-    let attribL (Attrib(_,k,args,props,m)) = 
-        leftL "[<" $$ 
-        (match k with 
-         | ILAttrib (ilmeth) -> wordL ilmeth.Name
-         | FSAttrib (vref)   -> ValRefL vref) $$
-        rightL ">]"
-    
-    let attribsL attribs = aboveListL (List.map attribL attribs)
-
-    let arityInfoL (TopValInfo (tpNames,_,_) as tvd) = 
-        let ns = tvd.AritiesOfArgs in 
-        leftL "arity<" $$ intL tpNames.Length $$ sepL ">[" $$ commaListL (List.map intL ns) $$ rightL "]"
-
-
-    let valL (vspec:Val) =
-        let vsL = wordL (DecompileOpName vspec.MangledName) |> stampL vspec.Stamp
-        let vsL = if not !verboseStamps then vsL else vsL $$ rightL (if isSome(vspec.PublicPath) then "+" else "-")
-        let vsL = vsL -- attribsL (vspec.Attribs)
-        vsL
-
-    let TypeOfvalL      (v:Val) =
-        (valL v
-          $$ (if  v.MustInline then wordL "inline " else emptyL) 
-          $$ (if v.IsMutable then wordL "mutable " else emptyL)
-          $$ wordL ":") -- typeL v.Type
-
-
-    let tslotparamL(TSlotParam(nmOpt, typ, inFlag, outFlag, optFlag,attribs)) =
-        (optionL wordL nmOpt) $$ wordL ":" $$ typeL typ $$ (if inFlag then wordL "[in]" else emptyL)  $$ (if outFlag then wordL "[out]" else emptyL)  $$ (if inFlag then wordL "[opt]" else emptyL)
-    
-
-    let SlotSigL (TSlotSig(nm,typ,tps1,tps2,pms,rty)) =
-#if DEBUG
-        match !global_g with
-        | None -> wordL ""
-        | Some g -> 
-            let rty = GetFSharpViewOfReturnType g rty
-            (wordL "slot" --- (wordL nm) $$ wordL "@" $$ typeL typ) --
-              (wordL "LAM" --- spaceListL (List.map TyparL       tps1) $$ rightL ".") ---
-              (wordL "LAM" --- spaceListL (List.map TyparL       tps2) $$ rightL ".") ---
-              (commaListL (List.map (List.map tslotparamL >> tupleL) pms)) $$ (wordL "-> ") --- (typeL rty) 
-#else
-        wordL "slotsig"
-#endif
-
-    let rec MemberL (membInfo:ValMemberInfo) = 
-        (aboveListL [ wordL "vspr_il_name! = " $$ wordL membInfo.CompiledName ;
-                      wordL "membInfo-slotsig! = " $$ listL SlotSigL membInfo.ImplementedSlotSigs ]) 
-    and vspecAtBindL  v = 
-        let vL = valL v  in
-        let mutL = (if v.IsMutable then wordL "mutable" ++ vL else vL)
-        mutL  --- (aboveListL (List.concat [[wordL ":" $$ typeL v.Type];
-                                            (match v.MemberInfo with None -> [] | Some mem_info   -> [wordL "!" $$ MemberL mem_info]);
-                                            (match v.TopValInfo with None -> [] | Some arity_info -> [wordL "#" $$ arityInfoL arity_info])]))
-
-    let UnionCaseRefL (ucr:UnionCaseRef) = wordL ucr.CaseName
-    let recdFieldRefL (rfref:RecdFieldRef) = wordL rfref.FieldName
-
-    //--------------------------------------------------------------------------
-    // DEBUG layout - bind, expr, dtree etc.
-    //--------------------------------------------------------------------------
-
-    let identL (id:ident) = wordL id.idText  
-
-    let rec tyconL (tycon:Tycon) =
-        if tycon.IsModuleOrNamespace then EntityL tycon else 
-        
-        let lhsL = wordL (match tycon.TypeOrMeasureKind with KindMeasure -> "[] type" | KindType -> "type") $$ wordL tycon.DisplayName $$ typarDeclsL tycon.TyparsNoRange
-        let lhsL = lhsL --- attribsL tycon.Attribs
-        let memberLs = 
-            let tcaug = tycon.TypeContents
-            let adhoc = adhoc_of_tycon tycon  |> List.filter (vref_is_dispatch_slot >> not)
-            (* Don't print individual methods forming interface implementations - these are currently never exported *)
-            let adhoc = adhoc |> List.filter (fun v -> isNil (the(v.MemberInfo)).ImplementedSlotSigs)
-            let iimpls = 
-                match tycon.TypeReprInfo with 
-                | Some (TFsObjModelRepr r) when r.fsobjmodel_kind = TTyconInterface -> []
-                | _ -> tcaug.tcaug_implements
-            let iimpls = iimpls |> List.filter (fun (ty,compgen,m) -> not compgen)
-            (* if TTyconInterface, the iimpls should be printed as inheritted interfaces *)
-            if (isNil adhoc && isNil iimpls) 
-            then emptyL 
-            else 
-                let iimplsLs = iimpls |> List.map (fun (ty,compgen,m) -> wordL "interface" --- typeL ty)
-                let adhocLs  = adhoc  |> List.map (fun vref -> vspecAtBindL  (deref_val vref))
-                (wordL "with" @@-- aboveListL (iimplsLs @ adhocLs)) @@ wordL "end"
-
-        let ucaseArgTypesL argtys = sepListL (wordL "*") (List.map typeL argtys)
-
-        let ucaseL prefixL ucase =
-            let nmL = wordL (DemangleOperatorName ucase.ucase_id.idText)
-            match ucase.RecdFields |> List.map (fun rfld -> rfld.FormalType) with
-            | []     -> (prefixL $$ nmL)
-            | argtys -> (prefixL $$ nmL $$ wordL "of") --- ucaseArgTypesL argtys
-
-        let ucasesL ucases =
-            let prefixL = if List.length ucases > 1 then wordL "|" else emptyL
-            List.map (ucaseL prefixL) ucases
-            
-        let rfspecL (fld:RecdField) =
-            let lhs = wordL fld.Name
-            let lhs = if fld.IsMutable then wordL "mutable" --- lhs else lhs
-            (lhs $$ rightL ":") --- typeL fld.FormalType
-
-        let tyconReprL (repr,tycon:Tycon) = 
-            match repr with 
-            | TRecdRepr _ ->
-                tycon.TrueFieldsAsList |> List.map (fun fld -> rfspecL fld $$ rightL ";") |> aboveListL  
-            | TFsObjModelRepr r -> 
-                match r.fsobjmodel_kind with 
-                | TTyconDelegate (TSlotSig(nm,typ, _,_,paraml, rty)) ->
-                    wordL "delegate ..."
-                | _ ->
-                    let start = 
-                        match r.fsobjmodel_kind with
-                        | TTyconClass -> "class" 
-                        | TTyconInterface -> "interface" 
-                        | TTyconStruct -> "struct" 
-                        | TTyconEnum -> "enum" 
-                        | _ -> failwith "???"
-                    let inherits = 
-                       match r.fsobjmodel_kind, tycon.TypeContents.tcaug_super with
-                       | TTyconClass,Some super -> [wordL  "inherit" $$ (typeL super)] 
-                       | TTyconInterface,_ -> 
-                         let tcaug = tycon.TypeContents
-                         tcaug.tcaug_implements 
-                           |> List.filter (fun (ity,compgen,_) -> not compgen)
-                           |> List.map (fun (ity,compgen,_) -> wordL  "inherit" $$ (typeL ity))
-                       | _ -> []
-                    let vsprs = adhoc_of_tycon tycon |> List.filter vref_is_dispatch_slot |> List.map (fun vref -> vspecAtBindL (deref_val vref))
-                    let vals  = tycon.TrueFieldsAsList |> List.map (fun f -> (if f.IsStatic then wordL "static" else emptyL) $$ wordL "val" $$ rfspecL f)
-                    let alldecls = inherits @ vsprs @ vals
-                    let emptyMeasure = match tycon.TypeOrMeasureKind with KindMeasure -> isNil alldecls | _ -> false
-                    if emptyMeasure then emptyL else (wordL start @@-- aboveListL alldecls) @@ wordL "end"
-            | TFiniteUnionRepr ucases        -> tycon.UnionCasesAsList |> ucasesL |> aboveListL 
-            | TAsmRepr s                      -> wordL "(# ... #)"
-            | TMeasureableRepr ty             -> typeL ty
-            | TILObjModelRepr (_,_,td) -> wordL td.tdName
-        let reprL = 
-            match tycon.TypeReprInfo with 
-            | Some a -> let rhsL = tyconReprL (a,tycon) @@ memberLs
-                        (lhsL $$ wordL "=") @@-- rhsL
-            | None   -> match tycon.TypeAbbrev with
-                              | None   -> lhsL @@-- memberLs
-                              | Some a -> (lhsL $$ wordL "=") --- (typeL a @@ memberLs)
-        reprL
-
-        
-    //--------------------------------------------------------------------------
-    // layout - bind, expr, dtree etc.
-    //--------------------------------------------------------------------------
-
-    and BindingL (TBind(v,repr,_)) =
-        vspecAtBindL v --- (wordL "=" $$ ExprL repr)
-
-    and ExprL expr = exprWrapL false expr
-    and atomL expr = exprWrapL true  expr (* true means bracket if needed to be atomic expr *)
-
-    and letRecL binds bodyL = 
-        let eqnsL = 
-            binds 
-               |>  FlatList.to_list 
-               |> List.mapHeadTail (fun bind -> wordL "rec" $$ BindingL bind $$ wordL "in")
-                              (fun bind -> wordL "and" $$ BindingL bind $$ wordL "in") 
-        (aboveListL eqnsL @@ bodyL) 
-
-    and letL bind bodyL = 
-        let eqnL = wordL "let" $$ BindingL bind $$ wordL "in"
-        (eqnL @@ bodyL) 
-                                                               
-    and exprWrapL isAtomic expr =
-        let wrap = bracketIfL isAtomic in (* wrap iff require atomic expr *)
-        let lay =
-            match expr with
-            | TExpr_const (c,m,ty)                          -> NicePrint.constL c
-            | TExpr_val (v,flags,m)                         -> let xL = valL (deref_val v) in
-                                                               let xL =
-                                                                   if not !verboseStamps then xL else
-                                                                   let tag = 
-                                                                     match v with
-                                                                     | VRef_private _    -> ""
-                                                                     | VRef_nonlocal _ -> "!!" in
-                                                                   xL $$ rightL tag in
-                                                               let xL =
-                                                                   match flags with
-                                                                     | CtorValUsedAsSelfInit    -> xL $$ rightL ""
-                                                                     | CtorValUsedAsSuperInit -> xL $$ rightL ""
-                                                                     | VSlotDirectCall -> xL $$ rightL ""
-                                                                     | NormalValUse -> xL in
-                                                               xL
-            | TExpr_seq (x0,x1,flag,_,m)                    -> (let flag = 
-                                                                  match flag with
-                                                                  | NormalSeq   -> "; (*Seq*)"
-                                                                  | ThenDoSeq   -> "; (*ThenDo*)" in
-                                                                ((ExprL x0 $$ rightL flag) @@ ExprL x1) |> wrap)
-            | TExpr_lambda(lambda_id ,basevopt,argvs,body,m,rty,_)  -> let formalsL = spaceListL (List.map vspecAtBindL argvs) in
-                                                                       let bindingL = match basevopt with
-                                                                                      | None       -> wordL "lam" $$ formalsL $$ rightL "."
-                                                                                      | Some basev -> wordL "lam" $$ (leftL "base=" $$ vspecAtBindL basev) --- formalsL $$ rightL "." in
-                                                                       (bindingL ++ ExprL body) |> wrap
-            | TExpr_tlambda(lambda_id,argtyvs,body,m,rty,_) -> ((wordL "LAM"    $$ spaceListL (List.map TyparL       argtyvs) $$ rightL ".") ++ ExprL body) |> wrap
-            | TExpr_tchoose(argtyvs,body,m)                 -> ((wordL "CHOOSE" $$ spaceListL (List.map TyparL       argtyvs) $$ rightL ".") ++ ExprL body) |> wrap
-            | TExpr_app (f,fty,tys,argtys,m)              -> 
-                let flayout = atomL f
-                appL flayout tys argtys |> wrap
-            | TExpr_letrec (binds,body,m,_)                 -> letRecL binds (ExprL body) |> wrap
-            | TExpr_let    (bind,body,m,_)                 -> letL bind (ExprL body) |> wrap
-            | TExpr_link rX                                 -> (wordL "RecLink" --- atomL (!rX)) |> wrap
-            | TExpr_match (spBind,exprm,dtree,targets,m,ty,_)      -> leftL "[" $$ (DecisionTreeL dtree @@ aboveListL (List.mapi targetL (targets |> Array.to_list)) $$ rightL "]")
-            | TExpr_op(TOp_ucase (c),tyargs,args,m)                -> ((UnionCaseRefL c (*$$ (instL typeL tyargs)*)) ++ spaceListL (List.map atomL args)) |> wrap
-            | TExpr_op(TOp_exnconstr (ecref),_,args,m)                -> wordL ecref.DemangledExceptionName $$ bracketL (commaListL (List.map atomL args))
-            | TExpr_op(TOp_tuple,tys,xs,m)                          -> tupleL (List.map ExprL xs)
-            | TExpr_op(TOp_recd (ctor,tc),tinst,xs,m)               -> 
-                let fields = tc.TrueInstanceFieldsAsList
-                let lay fs x = (wordL fs.rfield_id.idText $$ sepL "=") --- (ExprL x)
-                let ctorL = 
-                    match ctor with
-                    | RecdExpr             -> emptyL
-                    | RecdExprIsObjInit-> wordL "(new)"
-                leftL "{" $$ semiListL (List.map2 lay fields xs) $$ rightL "}" $$ ctorL
-            | TExpr_op(TOp_rfield_set (rf),tinst,[rx;x],m)        -> (atomL rx --- wordL ".") $$ (recdFieldRefL rf $$ wordL "<-" --- ExprL x)
-            | TExpr_op(TOp_rfield_set (rf),tinst,[x],m)        -> (recdFieldRefL rf $$ wordL "<-" --- ExprL x)
-            | TExpr_op(TOp_rfield_get (rf),tinst,[rx],m)          -> (atomL rx $$ rightL ".#" $$ recdFieldRefL rf)
-            | TExpr_op(TOp_rfield_get (rf),tinst,[],m)          -> (recdFieldRefL rf)
-            | TExpr_op(TOp_field_get_addr (rf),tinst,[rx],m)     -> leftL "&" $$ bracketL (atomL rx $$ rightL ".!" $$ recdFieldRefL rf)
-            | TExpr_op(TOp_field_get_addr (rf),tinst,[],m)     -> leftL "&" $$ (recdFieldRefL rf)
-            | TExpr_op(TOp_ucase_tag_get (tycr),tinst,[x],m)         -> wordL ("#" ^ tycr.MangledName ^ ".tag") $$ atomL x
-            | TExpr_op(TOp_ucase_proof (c),tinst,[x],m)    -> wordL ("#" ^ c.CaseName^ ".cast") $$ atomL x
-            | TExpr_op(TOp_ucase_field_get (c,i),tinst,[x],m)        -> wordL ("#" ^ c.CaseName ^ "." ^ string i) --- atomL x
-            | TExpr_op(TOp_ucase_field_set (c,i),tinst,[x;y],m)      -> ((atomL x --- (rightL ("#" ^ c.CaseName ^ "." ^ string i))) $$ wordL ":=") --- ExprL y
-            | TExpr_op(TOp_tuple_field_get (i),tys,[x],m)             -> wordL ("#" ^ string i) --- atomL x
-            | TExpr_op(TOp_coerce,[typ;typ2],[x],m)                   -> atomL x --- (wordL ":>" $$ typeL typ) (* check: or is it typ2? *)
-            | TExpr_op(TOp_rethrow,[typ],[],m)                        -> wordL "Rethrow!"
-            | TExpr_op(TOp_asm (a,tys),tyargs,args,m)      -> 
-                let instrs = a |> List.map (sprintf "%+A" >> wordL) |> spaceListL // %+A has + since instrs are from an "internal" type  
-                let instrs = leftL "(#" $$ instrs $$ rightL "#)"
-                (appL instrs tyargs args ---
-                    wordL ":" $$ spaceListL (List.map typeAtomL tys)) |> wrap
-            | TExpr_op(TOp_lval_op (lvop,vr),_,args,m)       -> (lvalopL lvop $$ ValRefL vr --- bracketL (commaListL (List.map atomL args))) |> wrap
-            | TExpr_op(TOp_ilcall ((virt,protect,valu,newobj,superInit,prop,isDllImport,boxthis,mref),tinst,minst,tys),tyargs,args,m) ->
-                let meth = mref.Name
-                wordL "ILCall" $$ aboveListL [wordL "meth  " --- wordL meth;
-                                              wordL "tinst " --- listL typeL tinst;
-                                              wordL "minst " --- listL typeL minst;
-                                              wordL "tyargs" --- listL typeL tyargs;
-                                              wordL "args  " --- listL ExprL args] |> wrap
-            | TExpr_op(TOp_array,[ty],xs,m)                 -> leftL "[|" $$ commaListL (List.map ExprL xs) $$ rightL "|]"
-            | TExpr_op(TOp_while _,[],[x1;x2],m)              -> wordL "while" $$ ExprL x1 $$ wordL "do" $$ ExprL x2 $$ rightL "}"
-            | TExpr_op(TOp_for _,[],[x1;x2;x3],m)           -> wordL "for" $$ aboveListL [(ExprL x1 $$ wordL "to" $$ ExprL x2 $$ wordL "do"); ExprL x3 ] $$ rightL "done"
-            | TExpr_op(TOp_try_catch _,[_],[x1;x2],m)         -> wordL "try" $$ ExprL x1 $$ wordL "with" $$ ExprL x2 $$ rightL "}"
-            | TExpr_op(TOp_try_finally _,[_],[x1;x2],m)       -> wordL "try" $$ ExprL x1 $$ wordL "finally" $$ ExprL x2 $$ rightL "}"
-            | TExpr_op(TOp_bytes _,_ ,_ ,m)                 -> wordL "bytes++"       
-            | TExpr_op(TOp_uint16s _,_ ,_ ,m)                 -> wordL "uint16++"       
-            | TExpr_op(TOp_get_ref_lval,tyargs,args,m)      -> wordL "GetRefLVal..."
-            | TExpr_op(TOp_trait_call _,tyargs,args,m)      -> wordL "traitcall..."
-            | TExpr_op(TOp_exnconstr_field_get _,tyargs,args,m) -> wordL "TOp_exnconstr_field_get..."
-            | TExpr_op(TOp_exnconstr_field_set _,tyargs,args,m) -> wordL "TOp_exnconstr_field_set..."
-            | TExpr_op(TOp_try_finally _,tyargs,args,m) -> wordL "TOp_try_finally..."
-            | TExpr_op(TOp_try_catch  _,tyargs,args,m) -> wordL "TOp_try_catch..."
-            | TExpr_op(_,tys,args,m)                        -> wordL "TExpr_op ..." $$ bracketL (commaListL (List.map atomL args)) (* REVIEW *)
-            | TExpr_quote (a,_,m,_)                       -> leftL "<@" $$ atomL a $$ rightL "@>"
-            | TExpr_obj (n,typ,basev,ccall,
-                           overrides,iimpls,_,_)              -> 
-                let ccallL (vu,mr,tinst,args) = appL (wordL "ccall") tinst args
-                wordL "OBJ:" $$ aboveListL [typeL typ;
-                                            ExprL ccall;
-                                            optionL vspecAtBindL basev;
-                                            aboveListL (List.map overrideL overrides);
-                                            aboveListL (List.map iimplL iimpls)]
-
-            | TExpr_static_optimization (tcs,csx,x,m)       -> 
-                let tconstraintL = function TTyconEqualsTycon (s,t) -> (typeL s $$ wordL "=") --- typeL t
-                (wordL "opt" @@- (ExprL x)) @@--
-                   (wordL "|" $$ ExprL csx --- (wordL "when..." (* --- sepListL (wordL "and") (List.map tconstraintL tcs) *) ))
-           
-        (* For tracking ranges through expr rewrites *)
-        if !layout_ranges 
-        then leftL "{" $$ (rangeL (range_of_expr expr) $$ rightL ":") ++ lay $$ rightL "}"
-        else lay
-
-    and AssemblyL (TAssembly(implFiles)) = 
-        aboveListL (List.map ImplFileL implFiles)
-    
-    and appL flayout tys args =
-        let z = flayout
-        let z = z $$ instL typeL tys
-        let z = z --- sepL "`" --- (spaceListL (List.map atomL args))
-        z
-       
-    and ImplFileL (TImplFile(qnm,_,e)) =
-        aboveListL [(wordL "top implementation ") @@-- mexprL e]
-
-    and mexprL x =
-        match x with 
-        (* | TMTyped(mtyp,rest,_) -> aboveListL [wordL "CONSTRAIN" @@-- mexprL rest @@- (wordL ":"  @@-  EntityTypeL mtyp)] *)
-        | TMTyped(mtyp,defs,m) -> mdefL defs  @@- (wordL ":"  @@-  EntityTypeL mtyp)
-    and mdefsL defs = wordL "Module Defs" @@-- aboveListL(List.map mdefL defs)
-    and mdefL x = 
-        match x with 
-        | TMDefRec(tycons ,binds,mbinds,m) ->  aboveListL ((tycons |> List.map tyconL) @ [letRecL binds emptyL] @ List.map mbindL mbinds)
-        | TMDefLet(bind,m) -> letL bind emptyL
-        | TMDefDo(e,m) -> ExprL e
-        | TMDefs(defs) -> mdefsL defs; 
-        | TMAbstract(mexpr) -> mexprL mexpr
-    and mbindL (TMBind(mspec, rhs)) =
-        (wordL (if mspec.IsNamespace then "namespace" else "module") $$ (wordL (demangled_name_of_modul mspec) |> stampL mspec.Stamp)) @@-- mdefL rhs 
-
-    and EntityTypeL (mtyp:ModuleOrNamespaceType) =
-        aboveListL [namemapL TypeOfvalL mtyp.AllValuesAndMembers;
-                    namemapL tyconL  mtyp.AllEntities;]    
-
-    and EntityL (ms:ModuleOrNamespace) =
-        let header = wordL "module" $$ (wordL  (demangled_name_of_modul ms) |> stampL ms.Stamp) $$ wordL ":"
-        let footer = wordL "end"
-        let body = EntityTypeL ms.ModuleOrNamespaceType
-        (header @@-- body) @@ footer
-
-    and ccuL     (ccu:ccu) = EntityL ccu.Contents
-
-    and DecisionTreeL x = 
-        match x with 
-        | TDBind (bind,body)            -> let bind = wordL "let" $$ BindingL bind $$ wordL "in" in (bind @@ DecisionTreeL body) 
-        | TDSuccess (args,n)            -> wordL "Success" $$ leftL "T" $$ intL n $$ tupleL (args |> FlatList.to_list |> List.map ExprL)
-        | TDSwitch (test,dcases,dflt,r) -> (wordL "Switch" --- ExprL test) @@--
-                                            (aboveListL (List.map dcaseL dcases) @@
-                                             match dflt with
-                                               None       -> emptyL
-                                             | Some dtree -> wordL "dflt:" --- DecisionTreeL dtree)
-
-    and dcaseL (TCase (test,dtree)) = (dtestL test $$ wordL "//") --- DecisionTreeL dtree
-
-    and dtestL x = 
-        match x with 
-        |  (TTest_unionconstr (c,tinst)) -> wordL "is" $$ UnionCaseRefL c $$ instL typeL tinst
-        |  (TTest_array_length (n,ty)) -> wordL "length" $$ intL n $$ typeL ty
-        |  (TTest_const       c        ) -> wordL "is" $$ NicePrint.constL c
-        |  (TTest_isnull               ) -> wordL "isnull"
-        |  (TTest_isinst (_,typ)           ) -> wordL "isinst" $$ typeL typ
-        |  (TTest_query (exp,_,_,idx,_)) -> wordL "query" $$ ExprL exp
-            
-    and targetL i (TTarget (argvs,body,_)) = leftL "T" $$ intL i $$ tupleL (FlatValsL argvs) $$ rightL ":" --- ExprL body
-    and FlatValsL vs = vs |> FlatList.to_list |> List.map valL
-
-    and tmethodL (TObjExprMethod(TSlotSig(nm,_,_,_,_,_),tps,vs,e,m)) =
-        (wordL "TObjExprMethod" --- (wordL nm) $$ wordL "=") --
-          (wordL "METH-LAM" --- angleBracketListL (List.map TyparL       tps) $$ rightL ".") ---
-          (wordL "meth-lam" --- tupleL (List.map (List.map vspecAtBindL >> tupleL) vs)  $$ rightL ".") ---
-          (atomL e) 
-    and overrideL tmeth     = wordL "with" $$ tmethodL tmeth 
-    and iimplL (typ,tmeths) = wordL "impl" $$ aboveListL (typeL typ :: List.map tmethodL tmeths) 
-
-    let showType x = Layout.showL (typeL x)
-    let showExpr x = Layout.showL (ExprL x)
-
-end
-
-
-let ValRefL    x = DebugPrint.ValRefL x
-let UnionCaseRefL   x = DebugPrint.UnionCaseRefL x
-let intL     x = DebugPrint.intL x
-let valL   x = DebugPrint.valL x
-let TyparL   x = DebugPrint.TyparL x
-let TyparDeclL   x = DebugPrint.TyparDeclL x
-let TyparsL   x = DebugPrint.typarDeclsL x
-let typeL    x = DebugPrint.typeL x
-let SlotSigL x = DebugPrint.SlotSigL x
-let EntityTypeL   x = DebugPrint.EntityTypeL x
-let EntityL   x = DebugPrint.EntityL x
-let TypeOfvalL x = DebugPrint.TypeOfvalL x
-let MemberL    x = DebugPrint.MemberL x
-let BindingL    x = DebugPrint. BindingL x
-let ExprL    x = DebugPrint.ExprL x
-let DecisionTreeL    x = DebugPrint.DecisionTreeL x
-let tyconL    x = DebugPrint.tyconL x
-let ImplFileL  x = DebugPrint.ImplFileL x
-let AssemblyL  x = DebugPrint.AssemblyL x
-let vspecAtBindL x = DebugPrint.vspecAtBindL x
-let recdFieldRefL x = DebugPrint.recdFieldRefL x
-let traitL x = DebugPrint.auxTraitL SimplifyTypes.typeSimplificationInfo0 x
-
-//--------------------------------------------------------------------------
-// 
-//--------------------------------------------------------------------------
-
-let mtyp_of_mexpr (TMTyped(mtyp,_,_)) = mtyp
-
-let wrap_modul_as_mtyp_in_namespace x = NewModuleOrNamespaceType Namespace [ x ] []
-
-let wrap_mtyp_as_mspec id cpath mtyp = 
-    NewModuleOrNamespace (Some cpath)  taccessPublic  id  emptyXmlDoc  [] (notlazy mtyp)
-let wrap_modul_in_namespace id (mspec:ModuleOrNamespace) = 
-    wrap_mtyp_as_mspec id (parent_cpath mspec.CompilationPath)  (wrap_modul_as_mtyp_in_namespace mspec)
-let wrap_mbind_in_namespace (id :ident) (TMBind(mspec,defs))  = 
-    let cpath = mspec.CompilationPath
-    let parentModuleSpec = NewModuleOrNamespace (Some (parent_cpath cpath)) taccessPublic id emptyXmlDoc [] (notlazy (empty_mtype Namespace))
-    TMBind(parentModuleSpec, TMDefRec ([],FlatList.empty,[TMBind(mspec,defs)],id.idRange))
-
-let SigTypeOfImplFile (TImplFile(_,_,mexpr)) = mtyp_of_mexpr mexpr 
-
-//--------------------------------------------------------------------------
-// Data structures representing what gets hidden and what gets remapped (i.e. renamed or alpha-converted)
-// when a module signature is applied to a module.
-//--------------------------------------------------------------------------
-
-type SignatureRepackageInfo = 
-    { mrpiVals  : (ValRef * ValRef) list;
-      mrpiTycons: (TyconRef * TyconRef) list  }
-    
-type SignatureHidingInfo = 
-    { mhiTycons     : Zset.t; 
-      mhiTyconReprs : Zset.t;  
-      mhiVals       : Zset.t; 
-      mhiRecdFields : Zset.t; 
-      mhiUnionCases : Zset.t }
-
-let union_mhi x y = 
-    { mhiTycons       = Zset.union x.mhiTycons y.mhiTycons;
-      mhiTyconReprs   = Zset.union x.mhiTyconReprs y.mhiTyconReprs;
-      mhiVals         = Zset.union x.mhiVals y.mhiVals;
-      mhiRecdFields   = Zset.union x.mhiRecdFields y.mhiRecdFields;
-      mhiUnionCases   = Zset.union x.mhiUnionCases y.mhiUnionCases; }
-
-let empty_mhi = 
-    { mhiTycons      = Zset.empty tycon_spec_order; 
-      mhiTyconReprs  = Zset.empty tycon_spec_order;  
-      mhiVals        = Zset.empty val_spec_order; 
-      mhiRecdFields  = Zset.empty rfref_order; 
-      mhiUnionCases  = Zset.empty ucref_order }
-
-let empty_mrpi = { mrpiVals = []; mrpiTycons= [] } 
-
-let mk_repackage_remapping mrpi = 
-    { vspec_remap = vspec_map_of_list (List.map (map1'2 deref_val) mrpi.mrpiVals );
-      tpinst = empty_tpinst; 
-      tcref_remap = tcref_map_of_list mrpi.mrpiTycons }
-
-//--------------------------------------------------------------------------
-// Compute instances of the above for mty -> mty
-//--------------------------------------------------------------------------
-
-let acc_entity_remap (msigty:ModuleOrNamespaceType) (tycon:Tycon) (mrpi,mhi) =
-    let sigtyconOpt = (NameMap.tryfind tycon.MangledName msigty.AllEntities)
-    match sigtyconOpt with 
-    | None -> 
-        // The type constructor is not present in the signature. Hence it is hidden. 
-        let mhi = { mhi with mhiTycons = Zset.add tycon mhi.mhiTycons }
-        (mrpi,mhi) 
-    | Some sigtycon  -> 
-        // The type constructor is in the signature. Hence record the repackage entry 
-        let sigtcref = mk_local_tcref sigtycon
-        let tcref = mk_local_tcref tycon
-        let mrpi = { mrpi with mrpiTycons = ((tcref, sigtcref) :: mrpi.mrpiTycons) }
-        (* OK, now look for hidden things *)
-        let mhi = 
-            if isSome tycon.TypeReprInfo && isNone sigtycon.TypeReprInfo then 
-                (* The type representation is absent in the signature, hence it is hidden *)
-                { mhi with mhiTyconReprs = Zset.add tycon mhi.mhiTyconReprs } 
-            else 
-                (* The type representation is present in the signature. *)
-                (* Find the fields that have been hidden or which were non-public anyway. *)
-                mhi 
-                |> Array.fold_right  (fun (rfield:RecdField) mhi ->
-                            match sigtycon.GetFieldByName(rfield.Name) with 
-                            | Some _  -> 
-                                (* The field is in the signature. Hence it is not hidden. *)
-                                mhi
-                            | _ -> 
-                                (* The field is not in the signature. Hence it is regarded as hidden. *)
-                                let rfref = rfref_of_rfield tcref rfield
-                                { mhi with mhiRecdFields =  Zset.add rfref mhi.mhiRecdFields })
-                        tycon.AllFieldsArray
-                |> List.foldBack  (fun (ucase:UnionCase) mhi ->
-                            match sigtycon.GetUnionCaseByName ucase.DisplayName with 
-                            | Some _  -> 
-                                (* The constructor is in the signature. Hence it is not hidden. *)
-                                mhi
-                            | _ -> 
-                                (* The constructor is not in the signature. Hence it is regarded as hidden. *)
-                                let ucref = ucref_of_ucase tcref ucase
-                                { mhi with mhiUnionCases =  Zset.add ucref mhi.mhiUnionCases })
-                        (tycon.UnionCasesAsList)  
-        (mrpi,mhi) 
-
-let acc_sub_entity_remap (msigty:ModuleOrNamespaceType) (tycon:Tycon) (mrpi,mhi) =
-    let sigtyconOpt = (NameMap.tryfind tycon.MangledName msigty.AllEntities)
-    match sigtyconOpt with 
-    | None -> 
-        // The type constructor is not present in the signature. Hence it is hidden. 
-        let mhi = { mhi with mhiTycons = Zset.add tycon mhi.mhiTycons }
-        (mrpi,mhi) 
-    | Some sigtycon  -> 
-        // The type constructor is in the signature. Hence record the repackage entry 
-        let sigtcref = mk_local_tcref sigtycon
-        let tcref = mk_local_tcref tycon
-        let mrpi = { mrpi with mrpiTycons = ((tcref, sigtcref) :: mrpi.mrpiTycons) }
-        (mrpi,mhi) 
-
-let acc_val_remap (msigty:ModuleOrNamespaceType) (vspec:Val) (mrpi,mhi) =
-    let sigValOpt = (NameMap.tryfind vspec.MangledName msigty.AllValuesAndMembers)
-    let vref = mk_local_vref vspec
-    match sigValOpt with 
-    | None -> 
-        if verbose then dprintf "acc_val_remap, hide = %s#%d\n" vspec.MangledName vspec.Stamp; (* showL(valL vspec)); *)
-        let mhi = { mhi with mhiVals = Zset.add vspec mhi.mhiVals }
-        (mrpi,mhi) 
-    | Some sigVal  -> 
-        (* The value is in the signature. Add the repackage entry. *)
-        if !verboseStamps then dprintf "acc_val_remap, remap value %s#%d --> %s#%d\n" vspec.MangledName vspec.Stamp sigVal.MangledName sigVal.Stamp; 
-      
-        let mrpi = { mrpi with mrpiVals = (vref,mk_local_vref sigVal) :: mrpi.mrpiVals }
-        (mrpi,mhi) 
-
-let get_submodsigty nm (msigty:ModuleOrNamespaceType) = 
-    match NameMap.tryfind nm msigty.AllEntities with 
-    | None -> empty_mtype FSharpModule 
-    | Some sigsubmodul -> sigsubmodul.ModuleOrNamespaceType
-
-let rec acc_mty_remap (mty:ModuleOrNamespaceType) (msigty:ModuleOrNamespaceType) acc = 
-    let acc = List.foldBack (fun (submodul:ModuleOrNamespace) acc -> acc_mty_remap submodul.ModuleOrNamespaceType (get_submodsigty submodul.MangledName msigty) acc) mty.ModuleAndNamespaceDefinitions acc
-    let acc = NameMap.foldRange (acc_entity_remap msigty) mty.AllEntities acc
-    let acc = NameMap.foldRange (acc_val_remap msigty) mty.AllValuesAndMembers acc
-    acc 
-
-let mk_mtyp_to_mtyp_remapping mty msigty = 
-    (* dprintf "mk_mtyp_to_mtyp_remapping,\nmty = %s\nmmsigty=%s\n" (showL(EntityTypeL mty)) (showL(EntityTypeL msigty)); *)
-    acc_mty_remap mty msigty (empty_mrpi, empty_mhi) 
-
-//--------------------------------------------------------------------------
-// Compute instances of the above for mexpr -> mty
-//--------------------------------------------------------------------------
-
-/// At TMDefRec nodes abstract (virtual) vslots are effectively binders, even 
-/// though they are tucked away inside the tycon. This helper function extracts the
-/// virtual slots to aid with finding this babies.
-let vslot_vals_of_tycons (tycons:Tycon list) =  
-  tycons 
-  |> List.collect (fun tycon -> if tycon.IsFSharpObjectModelTycon then tycon.FSharpObjectModelTypeInfo.fsobjmodel_vslots else []) 
-  |> List.map deref_val
-
-let rec acc_mdef_remap msigty x acc = 
-    match x with 
-    | TMDefRec(tycons,binds,mbinds,m) -> 
-         (*  Abstract (virtual) vslots in the tycons at TMDefRec nodes are binders. They also need to be added to the remapping. *)
-         let vslotvs = vslot_vals_of_tycons tycons
-         List.foldBack (acc_entity_remap msigty) tycons 
-            (List.foldBack (acc_val_remap msigty) vslotvs 
-                (FlatList.foldBack (var_of_bind >> acc_val_remap msigty) binds 
-                    (List.foldBack (acc_mbind_remap msigty) mbinds acc)))
-    | TMDefLet(bind,m)  -> acc_val_remap msigty bind.Var acc
-    | TMDefDo(e,m)  -> acc
-    | TMDefs(defs) -> acc_mdefs_remap msigty defs acc
-    | TMAbstract(mexpr) -> acc_mty_remap (mtyp_of_mexpr mexpr) msigty acc
-and acc_mbind_remap msigty (TMBind(mspec, def)) acc =
-    acc_sub_entity_remap msigty mspec (acc_mdef_remap (get_submodsigty mspec.MangledName msigty) def acc)
-
-and acc_mdefs_remap msigty mdefs acc = List.foldBack (acc_mdef_remap msigty) mdefs acc
-
-let mk_mdef_to_mtyp_remapping mdef msigty =  
-    if verbose then dprintf "mk_mdef_to_mtyp_remapping,\nmdefs = %s\nmsigty=%s\n" (showL(DebugPrint.mdefL mdef)) (showL(EntityTypeL msigty));
-    acc_mdef_remap msigty mdef (empty_mrpi, empty_mhi) 
-
-//--------------------------------------------------------------------------
-// Compute instances of the above for the assembly boundary
-//--------------------------------------------------------------------------
-
-let acc_tycon_assembly_boundary_mhi (tycon:Tycon) mhi =
-    if not (can_access_from_everywhere tycon.Accessibility) then 
-        // The type constructor is not public, hence hidden at the assembly boundary. 
-        { mhi with mhiTycons = Zset.add tycon mhi.mhiTycons } 
-    elif not (can_access_from_everywhere tycon.TypeReprAccessibility) then 
-        { mhi with mhiTyconReprs = Zset.add tycon mhi.mhiTyconReprs } 
-    else 
-        mhi 
-        |> Array.fold_right  
-               (fun (rfield:RecdField) mhi ->
-                   if not (can_access_from_everywhere rfield.Accessibility) then 
-                       let tcref = mk_local_tcref tycon
-                       let rfref = rfref_of_rfield tcref rfield
-                       { mhi with mhiRecdFields = Zset.add rfref mhi.mhiRecdFields } 
-                   else mhi)
-               tycon.AllFieldsArray  
-        |> List.foldBack  
-               (fun (ucase:UnionCase) mhi ->
-                   if not (can_access_from_everywhere ucase.Accessibility) then 
-                       let tcref = mk_local_tcref tycon
-                       let ucref = ucref_of_ucase tcref ucase
-                       { mhi with mhiUnionCases = Zset.add ucref mhi.mhiUnionCases } 
-                   else mhi)
-               (tycon.UnionCasesAsList)   
-
-let acc_val_assembly_boundary_mhi (vspec:Val) mhi =
-    if not (can_access_from_everywhere vspec.Accessibility) then 
-        // The value is not public, hence hidden at the assembly boundary. 
-        { mhi with mhiVals = Zset.add vspec mhi.mhiVals } 
-    else 
-        mhi
-
-let rec acc_mty_assembly_boundary_mhi mty acc = 
-    let acc = List.foldBack (fun (submodul:ModuleOrNamespace) acc -> acc_mty_assembly_boundary_mhi submodul.ModuleOrNamespaceType acc) mty.ModuleAndNamespaceDefinitions acc
-    let acc = NameMap.foldRange acc_tycon_assembly_boundary_mhi mty.AllEntities acc
-    let acc = NameMap.foldRange acc_val_assembly_boundary_mhi mty.AllValuesAndMembers acc
-    acc 
-
-let mk_assembly_boundary_mhi mty = 
-(*     dprintf "mk_mtyp_to_mtyp_remapping,\nmty = %s\nmmsigty=%s\n" (showL(EntityTypeL mty)) (showL(EntityTypeL msigty)); *)
-    acc_mty_assembly_boundary_mhi mty empty_mhi
-
-(*--------------------------------------------------------------------------
-!* Compute instances of the above for mexpr -> mty
- *------------------------------------------------------------------------ *)
-
-let IsHidden setF accessF remapF debugF = 
-    let rec check mrmi x = 
-        if verbose then dprintf "IsHidden %s ??\n" (showL (debugF x));
-            (* Internal/private? *)
-        not (can_access_from_everywhere (accessF x)) || 
-        (match mrmi with 
-         | [] -> false (* Ah! we escaped to freedom! *)
-         | (rpi,mhi) :: rest -> 
-            (* Explicitly hidden? *)
-            Zset.mem x (setF mhi) or 
-            (* Recurse... *)
-            check rest (remapF rpi x))
-    fun mrmi x -> 
-        let res = check mrmi x
-        if verbose then dprintf "IsHidden, #mrmi = %d, %s = %b\n" mrmi.Length (showL (debugF x)) res;
-        res
-        
-let IsHiddenTycon     mrmi x = IsHidden (fun mhi -> mhi.mhiTycons)     (fun tc -> tc.Accessibility)        (fun rpi x ->  deref_tycon (remap_tcref rpi.tcref_remap (mk_local_tcref x))) tyconL mrmi x 
-let IsHiddenTyconRepr mrmi x = IsHidden (fun mhi -> mhi.mhiTyconReprs) (fun v -> v.TypeReprAccessibility)  (fun rpi x ->  deref_tycon (remap_tcref rpi.tcref_remap (mk_local_tcref x))) tyconL mrmi x 
-let IsHiddenVal       mrmi x = IsHidden (fun mhi -> mhi.mhiVals)       (fun v -> v.Accessibility)          (fun rpi x ->  deref_val (remap_vref rpi (mk_local_vref x))) valL mrmi x 
-let IsHiddenRecdField mrmi x = IsHidden (fun mhi -> mhi.mhiRecdFields) (fun rfref -> rfref.RecdField.Accessibility) (fun rpi x ->  remap_rfref rpi.tcref_remap x) recdFieldRefL mrmi x 
-
-
-(*--------------------------------------------------------------------------
-!* Generic operations on module types
- *------------------------------------------------------------------------ *)
-
-let fold_vals_and_tycons_of_mtyp ft fv = 
-    let rec go mty acc = 
-        let acc = NameMap.foldRange (fun (mspec:ModuleOrNamespace) acc -> go mspec.ModuleOrNamespaceType acc) mty.ModulesAndNamespacesByDemangledName acc
-        let acc = NameMap.foldRange ft mty.AllEntities acc
-        let acc = NameMap.foldRange fv mty.AllValuesAndMembers acc
-        acc
-    go 
-
-let all_vals_of_mtyp m = fold_vals_and_tycons_of_mtyp (fun ft acc -> acc) (fun v acc -> v :: acc) m []
-let all_tycons_of_mtyp m = fold_vals_and_tycons_of_mtyp (fun ft acc -> ft :: acc) (fun v acc -> acc) m []
-
-//---------------------------------------------------------------------------
-// Free variables in terms.  Are all constructs public accessible?
-//---------------------------------------------------------------------------
- 
-let is_public_vspec (lv:Val)           = (lv.Accessibility = taccessPublic)
-let is_public_ucref (ucr:UnionCaseRef) = (ucr.UnionCase.Accessibility = taccessPublic)
-let is_public_rfref (rfr:RecdFieldRef) = (rfr.RecdField.Accessibility = taccessPublic)
-let is_public_tycon (tcr:Tycon)        = (tcr.Accessibility = taccessPublic)
-
-let freevars_all_public fvs = 
-    // Are any non-public items used in the expr (which corresponded to the fvs)?
-    // Recall, taccess occurs in:
-    //      EntityData     has     entity_tycon_repr_accessibility and entity_accessiblity
-    //      UnionCase    has     ucase_access
-    //      RecdField      has     rfield_access
-    //      ValData       has     val_access
-    // The freevars and FreeTyvars collect local constructs.
-    // Here, we test that all those constructs are public.
-    //
-    // CODEREVIEW:
-    // What about non-local vals. This fix assumes non-local vals must be public. OK?
-    Zset.for_all is_public_vspec fvs.FreeLocals  &&
-    Zset.for_all is_public_ucref fvs.FreeUnionCases &&
-    Zset.for_all is_public_rfref fvs.FreeRecdFields  &&
-    Zset.for_all is_public_tycon fvs.FreeTyvars.FreeTycons
-
-let free_tyvars_all_public tyvars = 
-    Zset.for_all is_public_tycon tyvars.FreeTycons
-
-(*---------------------------------------------------------------------------
-!* Free variables in terms.  All binders are distinct.
- *------------------------------------------------------------------------- *)
-
-let empty_freevars =  
-  { UsesMethodLocalConstructs=false;
-    UsesUnboundRethrow=false;
-    FreeLocalTyconReprs=empty_free_loctycons; 
-    FreeLocals=empty_free_locvals; 
-    FreeTyvars=empty_free_tyvars;
-    FreeRecdFields = empty_free_rfields;
-    FreeUnionCases = empty_free_ucases}
-
-let union_freevars fvs1 fvs2 = 
-  if fvs1 == empty_freevars then fvs2 else 
-  if fvs2 == empty_freevars then fvs1 else
-  { FreeLocals                    = union_free_locvals fvs1.FreeLocals fvs2.FreeLocals;
-    FreeTyvars                    = union_free_tyvars fvs1.FreeTyvars fvs2.FreeTyvars;    
-    UsesMethodLocalConstructs     = fvs1.UsesMethodLocalConstructs || fvs2.UsesMethodLocalConstructs;
-    UsesUnboundRethrow            = fvs1.UsesUnboundRethrow || fvs2.UsesUnboundRethrow;
-    FreeLocalTyconReprs           = union_free_loctycons fvs1.FreeLocalTyconReprs fvs2.FreeLocalTyconReprs; 
-    FreeRecdFields                = union_free_rfields fvs1.FreeRecdFields fvs2.FreeRecdFields; 
-    FreeUnionCases                = union_free_ucases fvs1.FreeUnionCases fvs2.FreeUnionCases; }
-
-let inline tyvars (opts:FreeVarOptions) f v acc =
-    if not opts.collectInTypes then acc else
-    let ftyvs = acc.FreeTyvars
-    let ftyvs' = f v ftyvs
-    if ftyvs == ftyvs' then acc else 
-    { acc with FreeTyvars = ftyvs' }
-
-#if FREEVARS_IN_TYPES_ANALYSIS
-type CheckCachability<'key,'acc>(name,f: FreeVarOptions -> 'key -> 'acc -> bool * 'acc) =
-    let dict = System.Collections.Generic.Dictionary<'key,int>(HashIdentity.Reference)
-    let idem = System.Collections.Generic.Dictionary<'key,int>(HashIdentity.Reference)
-    let closed = System.Collections.Generic.Dictionary<'key,int>(HashIdentity.Reference)
-    let mutable saved = 0
-    do System.AppDomain.CurrentDomain.ProcessExit.Add(fun _ ->
-        let hist = dict |> Seq.group_by (fun (KeyValue(k,v)) -> v) |> Seq.map (fun (n,els) -> (n,Seq.length els)) |> Seq.sort_by (fun (n,_) -> n)
-        let total = hist |> Seq.sum_by (fun (nhits,nels) -> nels)
-        let totalHits = hist |> Seq.sum_by (fun (nhits,nels) -> nhits * nels)
-        printfn "*** %s saved %d hits (%g%%) ***" name saved (float  saved / float (saved + totalHits) * 100.0)
-        printfn "*** %s had %d hits total, possible saving %d ***" name totalHits (totalHits - total)
-        //for (nhits,nels) in hist do 
-        //    printfn "%s, %g%% els for %g%% hits had %d hits" name (float nels / float total * 100.0) (float (nels * nhits) / float totalHits * 100.0) nhits
-
-        let hist = idem |> Seq.group_by (fun (KeyValue(k,v)) -> v) |> Seq.map (fun (n,els) -> (n,Seq.length els)) |> Seq.sort_by (fun (n,_) -> n)
-        let total = hist |> Seq.sum_by (fun (nhits,nels) -> nels)
-        let totalHits = hist |> Seq.sum_by (fun (nhits,nels) -> nhits * nels)
-        printfn "*** %s had %d idempotent hits total, possible saving %d ***" name totalHits (totalHits - total)
-        //for (nhits,nels) in hist do 
-        //    printfn "%s, %g%% els for %g%% hits had %d idempotent hits" name (float nels / float total * 100.0) (float (nels * nhits) / float totalHits * 100.0) nhits
-
-        let hist = closed |> Seq.group_by (fun (KeyValue(k,v)) -> v) |> Seq.map (fun (n,els) -> (n,Seq.length els)) |> Seq.sort_by (fun (n,_) -> n)
-        let total = hist |> Seq.sum_by (fun (nhits,nels) -> nels)
-        let totalHits = hist |> Seq.sum_by (fun (nhits,nels) -> nhits * nels)
-        printfn "*** %s had %d closed hits total, possible saving %d ***" name totalHits (totalHits - total)
-       )
-        
-    member cache.Apply(opts,key,acc) = 
-        if not opts.collectInTypes then 
-            saved <- saved + 1
-            acc 
-        else
-            let cls,res = f opts  key acc
-            if opts.canCache then 
-                if dict.ContainsKey key then 
-                    dict.[key] <- dict.[key] + 1
-                else
-                    dict.[key] <- 1
-                if res === acc then
-                    if idem.ContainsKey key then 
-                        idem.[key] <- idem.[key] + 1
-                    else
-                        idem.[key] <- 1
-                if cls then
-                    if closed.ContainsKey key then 
-                        closed.[key] <- closed.[key] + 1
-                    else
-                        closed.[key] <- 1
-            res
-            
-
-    //member cache.OnExit() = 
-
-let acc_freevars_in_type_cache =  CheckCachability("acc_freevars_in_type", (fun opts ty fvs -> (free_in_type opts ty === empty_free_tyvars), tyvars opts (acc_free_in_type opts) ty fvs))
-let acc_freevars_in_val_cache =  CheckCachability("acc_freevars_in_val", (fun opts  v fvs ->  (free_in_val opts v === empty_free_tyvars), tyvars opts (acc_free_in_val opts) v fvs))
-let acc_freevars_in_types_cache =  CheckCachability("acc_freevars_in_types", (fun opts  tys fvs -> (free_in_types opts tys === empty_free_tyvars), tyvars opts (acc_free_in_types opts) tys fvs))
-let acc_freevars_in_tycon_cache =  CheckCachability("acc_freevars_in_tycon", (fun opts  tys fvs -> false,tyvars opts (acc_free_tycon opts) tys fvs))
-
-let acc_freevars_in_type opts ty fvs = acc_freevars_in_type_cache.Apply(opts,ty,fvs)
-let acc_freevars_in_types opts tys fvs = 
-    if isNil tys then fvs else acc_freevars_in_types_cache.Apply(opts,tys,fvs)
-let acc_freevars_in_tycon opts (tcr:TyconRef) acc = 
-    match tcr.IsLocalRef with 
-    | true -> acc_freevars_in_tycon_cache.Apply(opts,tcr,acc)
-    | _ -> acc
-let acc_freevars_in_val opts v fvs = acc_freevars_in_val_cache.Apply(opts,v,fvs)
-#else
-
-let acc_freevars_in_type opts ty acc = tyvars opts (acc_free_in_type opts) ty acc
-let acc_freevars_in_types opts tys acc = if isNil tys then acc else tyvars opts (acc_free_in_types opts) tys acc
-let acc_freevars_in_tycon opts tcref acc = tyvars opts (acc_free_tycon opts) tcref acc
-let acc_freevars_in_val opts v acc = tyvars opts (acc_free_in_val opts) v acc
-#endif
-    
-let acc_freevars_in_trait_sln opts tys acc = tyvars opts (acc_free_in_trait_sln opts) tys acc 
-
-let bound_locval opts v fvs =
-    if not opts.includeLocals then fvs else
-    let fvs = acc_freevars_in_val opts v fvs
-    if not (Zset.mem v fvs.FreeLocals) then fvs
-    else {fvs with FreeLocals= Zset.remove v fvs.FreeLocals} 
-
-let bound_protect fvs =
-    if fvs.UsesMethodLocalConstructs then {fvs with UsesMethodLocalConstructs = false} else fvs
-
-let acc_uses_function_local_constructs flg fvs = 
-    if flg && not fvs.UsesMethodLocalConstructs then {fvs with UsesMethodLocalConstructs = true} 
-    else fvs 
-
-let bound_rethrow fvs =
-    if fvs.UsesUnboundRethrow then {fvs with UsesUnboundRethrow = false} else fvs  
-
-let acc_uses_rethrow flg fvs = 
-    if flg && not fvs.UsesUnboundRethrow then {fvs with UsesUnboundRethrow = true} 
-    else fvs 
-
-let bound_locvals opts vs fvs = List.foldBack (bound_locval opts) vs fvs
-
-let bind_lhs opts (bind:Binding) fvs = bound_locval opts bind.Var fvs
-
-let FreeVarsCacheCompute opts cache f = if opts.canCache then cached cache f else f()
-
-let rec acc_rhs opts (TBind(_,repr,_)) acc = acc_free_in_expr opts repr acc
-          
-and acc_free_in_switch_cases opts csl dflt (acc:FreeVars) =
-    Option.fold_right (acc_free_in_dtree opts) dflt (List.foldBack (acc_free_in_switch_case opts) csl acc)
- 
-and acc_free_in_switch_case opts (TCase(discrim,dtree)) acc = 
-    acc_free_in_dtree opts dtree (acc_free_in_discrim opts discrim acc)
-
-and acc_free_in_discrim (opts:FreeVarOptions) discrim acc = 
-    match discrim with 
-    | TTest_unionconstr(ucref,tinst) -> acc_free_ucref opts ucref (acc_freevars_in_types opts tinst acc)
-    | TTest_array_length(_,ty) -> acc_freevars_in_type opts ty acc
-    | TTest_const _
-    | TTest_isnull -> acc
-    | TTest_isinst (srcty,tgty) -> acc_freevars_in_type opts srcty (acc_freevars_in_type opts tgty acc)
-    | TTest_query (exp, tys, vref, idx, apinfo) -> acc_free_in_expr opts exp (acc_freevars_in_types opts tys (Option.fold_right (acc_free_vref opts) vref acc))
-
-and acc_free_in_dtree opts x (acc : FreeVars) =
-    match x with 
-    | TDSwitch(e1,csl,dflt,_) -> acc_free_in_expr opts e1 (acc_free_in_switch_cases opts csl dflt acc)
-    | TDSuccess (es,_) -> acc_free_in_FlatExprs opts es acc
-    | TDBind (bind,body) -> union_freevars (bind_lhs opts bind (acc_rhs opts bind (free_in_dtree opts body))) acc
-  
-and acc_free_locval opts v fvs =
-    if not opts.includeLocals then fvs else
-    if Zset.mem v fvs.FreeLocals then fvs 
-    else 
-        let fvs = acc_freevars_in_val opts v fvs
-        {fvs with FreeLocals=Zset.add v fvs.FreeLocals}
-  
-and acc_loctycon_repr opts b fvs = 
-    if not opts.includeLocalTyconReprs then fvs else
-    if Zset.mem b fvs.FreeLocalTyconReprs  then fvs
-    else { fvs with FreeLocalTyconReprs = Zset.add b fvs.FreeLocalTyconReprs } 
-
-and acc_used_tycon_repr opts (tc:Tycon) fvs = 
-    if isSome tc.TypeReprInfo
-    then acc_loctycon_repr opts tc fvs
-    else fvs
-
-and acc_free_ucref opts cr fvs =   
-    if not opts.includeUnionCases then fvs else
-    if Zset.mem cr fvs.FreeUnionCases then fvs 
-    else
-        let fvs = fvs |> acc_used_tycon_repr opts cr.Tycon
-        let fvs = fvs |> acc_freevars_in_tycon opts cr.TyconRef
-        { fvs with FreeUnionCases = Zset.add cr fvs.FreeUnionCases } 
-
-and acc_free_rfref opts fr fvs = 
-    if not opts.includeRecdFields then fvs else
-    if Zset.mem fr fvs.FreeRecdFields then fvs 
-    else 
-        let fvs = fvs |> acc_used_tycon_repr opts fr.Tycon
-        let fvs = fvs |> acc_freevars_in_tycon opts fr.TyconRef 
-        { fvs with FreeRecdFields = Zset.add fr fvs.FreeRecdFields } 
-  
-and acc_free_ecref exnc fvs = fvs (* Note: this exnc (TyconRef) should be collected the surround types, e.g. tinst of TExpr_op *)
-and acc_free_vref opts (vref:ValRef) fvs = 
-    match vref.IsLocalRef with 
-    | true -> acc_free_locval opts vref.PrivateTarget fvs
-    // non-local values do not contain free variables 
-    | _ -> fvs
-
-and acc_free_in_method opts (TObjExprMethod(slotsig,tps,tmvs,e,m)) acc =
-    acc_free_in_slotsig opts slotsig
-     (union_freevars (tyvars opts (bound_typars opts) tps (List.foldBack (bound_locvals opts) tmvs (free_in_expr opts  e))) acc)
-
-and acc_free_in_methods opts methods acc = 
-    List.foldBack (acc_free_in_method opts) methods acc
-
-and acc_free_in_iimpl opts (ty,overrides) acc = 
-    acc_freevars_in_type opts ty (acc_free_in_methods opts overrides acc)
-
-and acc_free_in_expr (opts:FreeVarOptions) x acc = 
-  match x with
-  | TExpr_let(_) -> acc_free_in_expr_linear opts x acc (fun e -> e)
-  | _ -> acc_free_in_expr_nonlinear opts x acc
-      
-and acc_free_in_expr_linear (opts:FreeVarOptions) x acc contf =   
-    (* for nested let-bindings, we need to continue after the whole let-binding is processed *)
-    match x with
-    | TExpr_let (bind,e,_,cache) -> 
-        let contf = contf << (fun free ->
-          union_freevars (FreeVarsCacheCompute opts cache (fun () -> bind_lhs opts bind (acc_rhs opts bind free))) acc )
-        acc_free_in_expr_linear opts e empty_freevars contf
-    | _ -> 
-      // No longer linear expr
-      acc_free_in_expr opts x acc |> contf
-    
-and acc_free_in_expr_nonlinear opts x acc =
-    match x with
-    (* BINDING CONSTRUCTS *)
-    | TExpr_lambda (_,basev,vs,b,_,rty,cache)  -> 
-        union_freevars (SkipCacheCompute cache (fun () -> Option.fold_right (bound_locval opts) basev (bound_locvals opts vs (acc_freevars_in_type opts rty (free_in_expr opts b))))) acc
-    | TExpr_tlambda (_,vs,b,_,rty, cache) ->
-        union_freevars (SkipCacheCompute cache (fun () -> tyvars opts (bound_typars opts) vs (acc_freevars_in_type opts rty (free_in_expr opts b)))) acc
-    | TExpr_tchoose (vs,b,_) ->
-        union_freevars (tyvars opts (bound_typars opts) vs (free_in_expr opts b)) acc
-    | TExpr_letrec (binds,e,_,cache) ->
-        union_freevars (FreeVarsCacheCompute opts cache (fun () -> FlatList.foldBack (bind_lhs opts) binds (FlatList.foldBack (acc_rhs opts) binds (free_in_expr opts e)))) acc
-    | TExpr_let (bind,e,_,cache) -> 
-        failwith "unreachable - linear expr"
-    | TExpr_obj (_,typ,basev,basecall,overrides,iimpls,m,cache)   ->  
-        union_freevars (SkipCacheCompute cache (fun () -> 
-            bound_protect
-              (Option.fold_right (bound_locval opts) basev
-                (acc_freevars_in_type opts typ
-                   (acc_free_in_expr opts basecall
-                      (acc_free_in_methods opts overrides 
-                         (List.foldBack (acc_free_in_iimpl opts) iimpls empty_freevars))))))) acc  
-    (* NON-BINDING CONSTRUCTS *)                      
-    | TExpr_const _ -> acc
-    | TExpr_val (lvr,flags,_) ->  
-        acc_uses_function_local_constructs (flags <> NormalValUse) (acc_free_vref opts lvr acc)
-    | TExpr_quote (ast,{contents=Some(argTypes,argExprs,data)},_,ty) ->  
-        acc_free_in_expr opts ast 
-            (acc_free_in_exprs opts argExprs
-               (acc_freevars_in_types opts argTypes
-                  (acc_freevars_in_type opts ty acc))) 
-    | TExpr_quote (ast,{contents=None},_,ty) ->  
-        acc_free_in_expr opts ast (acc_freevars_in_type opts ty acc)
-    | TExpr_app(f0,f0ty,tyargs,args,_) -> 
-        acc_freevars_in_type opts f0ty
-          (acc_free_in_expr opts f0
-             (acc_freevars_in_types opts tyargs
-                (acc_free_in_exprs opts args acc)))
-    | TExpr_link(eref) -> acc_free_in_expr opts !eref acc
-    | TExpr_seq (e1,e2,_,_,_) -> 
-        let acc = acc_free_in_expr opts e1 acc
-        // tail-call - this is required because we should be able to handle (((e1; e2); e3); e4; .... ))
-        acc_free_in_expr opts e2 acc 
-
-    | TExpr_static_optimization (_,e2,e3,m) -> acc_free_in_expr opts e2 (acc_free_in_expr opts e3 acc)
-    | TExpr_match (_,_,dtree,targets,_,_,cache) -> 
-        union_freevars 
-          (SkipCacheCompute cache (fun () -> acc_free_in_targets opts targets empty_freevars)) 
-          (acc_free_in_dtree opts dtree acc)
-            
-    //| TExpr_op (TOp_try_catch,tinst,[TExpr_lambda(_,_,[_],e1,_,_,_); TExpr_lambda(_,_,[_],e2,_,_,_); TExpr_lambda(_,_,[_],e3,_,_,_)],_) ->
-    | TExpr_op (TOp_try_catch _,tinst,[e1;e2;e3],m) ->
-        union_freevars 
-          (acc_freevars_in_types opts tinst
-            (acc_free_in_exprs opts [e1;e2] acc))
-          (bound_rethrow (acc_free_in_expr opts e3 empty_freevars))
-
-    | TExpr_op (op,tinst,args,_) -> 
-         let acc = acc_free_in_op opts op acc
-         let acc = acc_freevars_in_types opts tinst acc
-         acc_free_in_exprs opts args acc
-
-and acc_free_in_op opts op acc =
-    match op with
-
-    // Things containing no references
-    | TOp_bytes _ 
-    | TOp_uint16s _ 
-    | TOp_try_catch _ 
-    | TOp_try_finally _ 
-    | TOp_for _ 
-    | TOp_coerce 
-    | TOp_get_ref_lval 
-    | TOp_tuple 
-    | TOp_array 
-    | TOp_while _
-    | TOp_goto _ | TOp_label _ | TOp_return 
-    | TOp_tuple_field_get _ -> acc
-
-    | TOp_ucase_tag_get tr -> acc_used_tycon_repr opts (deref_tycon tr) acc
-    
-    // Things containing just a union case reference
-    | TOp_ucase_proof cr 
-    | TOp_ucase cr 
-    | TOp_ucase_field_get (cr,_) 
-    | TOp_ucase_field_set (cr,_) -> acc_free_ucref opts cr acc
-
-    // Things containing just an exception reference
-    | TOp_exnconstr ecr 
-    | TOp_exnconstr_field_get (ecr,_) 
-    | TOp_exnconstr_field_set (ecr,_)  -> acc_free_ecref ecr acc
-
-    | TOp_rfield_get fr 
-    | TOp_field_get_addr fr 
-    | TOp_rfield_set fr -> acc_free_rfref opts fr acc
-
-    | TOp_recd (kind,tcr) -> 
-        let acc = acc_uses_function_local_constructs (kind = RecdExprIsObjInit) acc
-        (acc_used_tycon_repr opts (deref_tycon tcr) (tyvars opts (acc_free_tycon opts) tcr acc)) 
-
-    | TOp_asm (_,tys) ->  acc_freevars_in_types opts tys acc
-    | TOp_rethrow -> acc_uses_rethrow true acc
-
-    | TOp_trait_call(TTrait(tys,nm,_,argtys,rty,sln)) -> 
-        Option.fold_right (acc_freevars_in_trait_sln opts) sln.Value
-           (acc_freevars_in_types opts tys 
-             (acc_freevars_in_types opts argtys 
-               (Option.fold_right (acc_freevars_in_type opts) rty acc)))
-
-    | TOp_lval_op (_,lvr) -> 
-        acc_free_vref opts lvr acc
-
-    | TOp_ilcall ((virt,protect,valu,newobj,superInit,prop,isDllImport,boxthis,mref),enclTypeArgs,methTypeArgs,tys) ->
-       acc_freevars_in_types opts enclTypeArgs 
-         (acc_freevars_in_types opts methTypeArgs  
-           (acc_freevars_in_types opts tys 
-             (acc_uses_function_local_constructs protect acc)))
-
-and acc_free_in_targets opts targets acc = 
-    Array.fold_right (fun (TTarget(vs,e,_)) acc -> FlatList.foldBack (bound_locval opts) vs (acc_free_in_expr opts e acc)) targets acc
-
-and acc_free_in_FlatExprs opts (es:FlatExprs) acc = FlatList.foldBack (acc_free_in_expr opts) es acc
-
-and acc_free_in_exprs opts (es: Exprs) acc = 
-    match es with 
-    | [] -> acc 
-    | h::t -> 
-        let acc = acc_free_in_expr opts h acc
-        // tailcall - e.g. Cons(x,Cons(x2,.......Cons(x1000000,Nil))) and [| x1; .... ; x1000000 |]
-        acc_free_in_exprs opts t acc
-
-and acc_free_in_slotsig opts (TSlotSig(_,typ,_,_,_,_)) acc = acc_freevars_in_type opts typ acc
- 
-and free_in_dtree opts e = acc_free_in_dtree opts e empty_freevars
-and free_in_expr opts e = acc_free_in_expr opts e empty_freevars
-
-(* Note: these are only an approximation - they are currently used only by the optimizer  *)
-let rec acc_free_in_mdef opts x acc = 
-    match x with 
-    | TMDefRec(tycons,binds,mbinds,m) -> FlatList.foldBack (acc_rhs opts) binds  (List.foldBack (acc_free_in_mbind opts) mbinds acc)
-    | TMDefLet(bind,m)  -> acc_rhs opts bind  acc
-    | TMDefDo(e,m)  -> acc_free_in_expr opts e acc
-    | TMDefs(defs) -> acc_free_in_mdefs opts defs acc
-    | TMAbstract(TMTyped(mtyp,mdef,_)) -> acc_free_in_mdef opts mdef acc (* not really right, but sufficient for how this is used in optimization *)
-and acc_free_in_mbind opts (TMBind(_, def)) acc = acc_free_in_mdef opts def acc
-and acc_free_in_mdefs opts x acc = 
-    List.foldBack (acc_free_in_mdef opts) x acc
-
-(* NOTE: we don't yet need to ask for free variables in module expressions *)
-
-let free_in_rhs opts bind = acc_rhs opts bind empty_freevars
-let free_in_mdef opts mdef = acc_free_in_mdef opts mdef empty_freevars
-
-(*---------------------------------------------------------------------------
-!* Destruct - rarely needed
- *------------------------------------------------------------------------- *)
-
-let rec strip_lambda (e,ty) = 
-    match e with 
-    | TExpr_lambda (_,basevopt,v,b,_,rty,_) -> 
-        if isSome basevopt then errorR(InternalError("skipping basevopt", range_of_expr e));
-        let (vs',b',rty') = strip_lambda (b,rty)
-        (v :: vs', b', rty') 
-    | _ -> ([],e,ty)
-
-let dest_top_lambda (e,ty) =
-    let tps,taue,tauty = match e with TExpr_tlambda (_,tps,b,_,rty,_) -> tps,b,rty | _ -> [],e,ty
-    let vs,body,rty = strip_lambda (taue,tauty)
-    tps,vs,body,rty
-
-// This is used to infer arities of expressions 
-// i.e. base the chosen arity on the syntactic expression shape and type of arguments 
-let InferArityOfExpr g ty partialArgAttribsL retAttribs e = 
-    let rec strip_lambda_notypes e = 
-        match e with 
-        | TExpr_lambda (_,_,vs,b,_,_,_) -> 
-            let (vs',b') = strip_lambda_notypes b
-            (vs :: vs', b') 
-        | TExpr_tchoose (tps,b,_) -> strip_lambda_notypes b 
-        | _ -> ([],e)
-
-    let dest_top_lambda_notypes e =
-        let tps,taue = match e with TExpr_tlambda (_,tps,b,_,_,_) -> tps,b | _ -> [],e
-        let vs,body = strip_lambda_notypes taue
-        tps,vs,body
-
-    let tps,vsl,body = dest_top_lambda_notypes e
-    let fun_arity = vsl.Length
-    let dtys,rty =  strip_fun_typ_upto g fun_arity (snd (try_dest_forall_typ g ty))
-    let partialArgAttribsL = Array.of_list partialArgAttribsL
-    assert (List.length vsl = List.length dtys)
-        
-    let curriedArgInfos =
-        (List.zip vsl dtys) |> List.mapi (fun i (vs,ty) -> 
-            let partialAttribs = if i < partialArgAttribsL.Length then partialArgAttribsL.[i] else []
-            let tys = if (i = 0 && is_unit_typ g ty) then [] else try_dest_tuple_typ g ty
-            let ids = 
-                if vs.Length = tys.Length then  vs |> List.map (fun v -> Some v.Id)
-                else tys |> List.map (fun _ -> None)
-            let attribs = 
-                if partialAttribs.Length = tys.Length then  partialAttribs 
-                else tys |> List.map (fun _ -> [])
-            (ids,attribs) ||> List.map2 (fun id attribs -> TopArgInfo(attribs,id)))
-    let retInfo = TopArgInfo(retAttribs,None)
-    TopValInfo (TopValInfo.InferTyparInfo tps, curriedArgInfos, retInfo)
-
-let InferArityOfExprBinding g (v:Val) e = 
-    match v.TopValInfo with
-    | Some info -> info
-    | None -> InferArityOfExpr g v.Type [] [] e
-
-let chosen_arity_of_bind (TBind(v,repr,_)) = v.TopValInfo
-
-//-------------------------------------------------------------------------
-// Check if constraints are satisfied that allow us to use more optimized
-// implementations
-//------------------------------------------------------------------------- 
-
-let GetUnderlyingTypeOfEnumType g typ = 
-   assert(is_enum_typ g typ);
-   let tycon = deref_tycon (tcref_of_stripped_typ g typ)
-   if is_il_enum_tycon tycon then 
-       let tdef = tycon.ILTyconRawMetadata
-       let info = info_for_enum (tdef.tdName,tdef.tdFieldDefs)
-       let il_ty = typ_of_enum_info info
-       match il_ty.TypeSpec.Name with 
-       | "System.Byte" -> g.byte_ty
-       | "System.SByte" -> g.sbyte_ty
-       | "System.Int16" -> g.int16_ty
-       | "System.Int32" -> g.int32_ty
-       | "System.Int64" -> g.int64_ty
-       | "System.UInt16" -> g.uint16_ty
-       | "System.UInt32" -> g.uint32_ty
-       | "System.UInt64" -> g.uint64_ty
-       | "System.Single" -> g.float32_ty
-       | "System.Double" -> g.float_ty
-       | "System.Char" -> g.char_ty
-       | "System.Boolean" -> g.bool_ty
-       | _ -> g.int32_ty
-   else 
-       match tycon.GetFieldByName "value__" with 
-       | Some rf -> rf.FormalType
-       | None ->  error(InternalError("no 'value__' field found for enumeration type "^tycon.MangledName,tycon.Range))
-
-
-(* CLEANUP NOTE: this absolutely awful. Get rid of this nonsense mutation. *)
-let set_val_has_no_arity (f:Val) = 
-    if verbose then  dprintf "clearing topValInfo on %s\n" f.MangledName; 
-    f.Data.val_top_repr_info <- None; f
-
-
-(*--------------------------------------------------------------------------
-!* Resolve static optimization constraints
- *------------------------------------------------------------------------ *)
-
-let norm_enum_typ g ty = (if is_enum_typ g ty then GetUnderlyingTypeOfEnumType g ty else ty) 
-
-// -1 equals "no", 0 is "unknown", 1 is "yes"
-let decide_static_optimization_constraint g (TTyconEqualsTycon (a,b)) =
-     let a = norm_enum_typ g (strip_tpeqns_and_tcabbrevs_and_measureable g a)
-     let b = norm_enum_typ g (strip_tpeqns_and_tcabbrevs_and_measureable g b)
-     // Both types must be nominal for a definite result
-     match try_tcref_of_stripped_typ g a with 
-     | Some tcref1 -> 
-         match try_tcref_of_stripped_typ g b with 
-         | Some tcref2 -> if tcref_eq g tcref1 tcref2 then 1 else -1
-         | None -> 0
-     | None -> 0
-    
-let rec DecideStaticOptimizations g cs = 
-    match cs with 
-    | [] -> 1
-    | h::t -> 
-        let d = decide_static_optimization_constraint g h 
-        if d = -1 then -1 elif d = 1 then DecideStaticOptimizations g t else 0
-
-let mk_static_optimization_expr g (cs,e1,e2,m) = 
-    let d = DecideStaticOptimizations g cs in 
-    if d = -1 then e2
-    elif d = 1 then e1
-    else TExpr_static_optimization(cs,e1,e2,m)
-
-//--------------------------------------------------------------------------
-// Copy expressions, including new names for locally bound values.
-// Used to inline expressions.
-//--------------------------------------------------------------------------
-
-
-type ValCopyFlag = 
-    | CloneAll
-    | CloneAllAndMarkExprValsAsCompilerGenerated
-    | OnlyCloneExprVals
-    
-let mark_as_compgen compgen d = 
-    let compgen = 
-        match compgen with 
-        | CloneAllAndMarkExprValsAsCompilerGenerated -> true
-        | _ -> false
-    { d with val_flags= ValFlags.encode_compgen_of_vflags (ValFlags.is_compgen_of_vflags d.val_flags || compgen) d.val_flags }
-
-let bind_locval (v:Val) (v':Val) tmenv = 
-    { tmenv with vspec_remap=vspec_map_add v (mk_local_vref v') tmenv.vspec_remap}
-
-let bind_LocalVals vs vs' tmenv = 
-    { tmenv with vspec_remap=List.fold_right2 (fun v v' acc -> vspec_map_add v (mk_local_vref v') acc) vs vs' tmenv.vspec_remap}
-
-let bind_LocalFlatVals vs vs' tmenv = 
-    { tmenv with vspec_remap=FlatList.foldBack2 (fun v v' acc -> vspec_map_add v (mk_local_vref v') acc) vs vs' tmenv.vspec_remap}
-
-let bind_tycon (tc:Tycon) (tc':Tycon) tyenv = 
-    { tyenv with tcref_remap=tcref_map_add (mk_local_tcref tc) (mk_local_tcref tc') tyenv.tcref_remap }
-
-let bind_tycons tcs tcs' tyenv =  
-    { tyenv with tcref_remap= List.fold_right2 (fun tc tc' acc -> tcref_map_add (mk_local_tcref tc) (mk_local_tcref tc') acc) tcs tcs' tyenv.tcref_remap }
-
-let remap_attrib_kind  tmenv k =  
-    match k with 
-    | ILAttrib _ as x -> x
-    | FSAttrib vref -> FSAttrib(remap_vref tmenv vref)
-
-let tmenv_copy_remap_and_bind_typars remap_attrib tmenv tps = 
-    let tps',tyenvinner = copy_remap_and_bind_typars_full remap_attrib tmenv tps
-    let tmenvinner = tyenvinner 
-    tps',tmenvinner
-
-let rec remap_attrib g tmenv (Attrib (tcref,kind, args, props,m)) = 
-    Attrib(remap_tcref tmenv.tcref_remap tcref,
-           remap_attrib_kind tmenv kind, 
-           args |> List.map (remap_attrib_expr g tmenv), 
-           props |> List.map (fun (AttribNamedArg(nm,ty,flg,expr)) -> AttribNamedArg(nm,remap_type tmenv ty, flg, remap_attrib_expr g tmenv expr)),
-           m)
-
-and remap_attrib_expr g tmenv (AttribExpr(e1,e2)) = 
-    AttribExpr(remap_expr g CloneAll tmenv e1, remap_expr g CloneAll tmenv e2)
-    
-and remap_attribs g tmenv xs =  List.map (remap_attrib g tmenv) xs
-
-and remap_possible_forall_typ g tmenv ty = remap_type_full (remap_attrib g tmenv) tmenv ty
-
-and remap_arg_data g tmenv (TopArgInfo(attribs,nm)) =
-    TopArgInfo(remap_attribs g tmenv attribs,nm)
-
-and remap_top_val_info g tmenv (TopValInfo(tpNames,arginfosl,retInfo)) =
-    TopValInfo(tpNames,List.mapSquared (remap_arg_data g tmenv) arginfosl, remap_arg_data g tmenv retInfo)
-
-and remap_val_data g tmenv d =
-    if !verboseStamps then dprintf "remap val data #%d\n" d.val_stamp;
-    let ty = d.val_type
-    let topValInfo = d.val_top_repr_info
-    let ty' = ty |> remap_possible_forall_typ g tmenv
-    { d with 
-        val_type    = ty';
-        val_actual_parent = d.val_actual_parent |> remap_parent_ref tmenv;
-        val_top_repr_info = d.val_top_repr_info |> Option.map (remap_top_val_info g tmenv);
-        val_member_info   = d.val_member_info |> Option.map (remap_member_info g d.val_defn_range topValInfo ty ty' tmenv);
-        val_attribs       = d.val_attribs       |> remap_attribs g tmenv }
-
-and remap_parent_ref tyenv p =
-    match p with 
-    | ParentNone -> ParentNone
-    | Parent x -> Parent (x |> remap_tcref tyenv.tcref_remap)
-
-and map_immediate_vals_and_tycons_of_modtyp ft fv (x:ModuleOrNamespaceType) = 
-    let vals = x.AllValuesAndMembers      |> NameMap.map fv
-    let tycons = x.AllEntities |> NameMap.map ft
-    new ModuleOrNamespaceType(x.ModuleOrNamespaceKind, vals, tycons)
-    
-and copy_and_remap_val g compgen tmenv (v:Val) = 
-    match compgen with 
-    | OnlyCloneExprVals when v.IsMemberOrModuleBinding -> v
-    | _ ->  v |> NewModifiedVal (remap_val_data g tmenv >> mark_as_compgen compgen)
-
-and fixup_val_attribs g tmenv (v1:Val) (v2:Val) =
-    let attrs = v1.Attribs
-    if isNil attrs then () else
-    v2.Data.val_attribs <- attrs |> remap_attribs g tmenv
-    
-and copy_and_remap_and_bind_vals g compgen tmenv vs = 
-    let vs' = vs |> List.map (copy_and_remap_val g compgen tmenv)
-    let tmenvinner = bind_LocalVals vs vs' tmenv
-    // Fixup attributes now we've built the full List.map of value renamings (attributes contain value references) *)
-    List.iter2 (fixup_val_attribs g tmenvinner) vs vs';    
-    vs', tmenvinner
-
-and copy_and_remap_and_bind_FlatVals g compgen tmenv vs = 
-    let vs' = vs |> FlatList.map (copy_and_remap_val g compgen tmenv)
-    let tmenvinner = bind_LocalFlatVals vs vs' tmenv
-    (* Fixup attributes now we've built the full List.map of value renamings (attributes contain value references) *)
-    FlatList.iter2 (fixup_val_attribs g tmenvinner) vs vs';    
-    vs', tmenvinner
-
-and copy_and_remap_and_bind_val g compgen tmenv v = 
-    let v' = v |> copy_and_remap_val g compgen tmenv
-    let tmenvinner = bind_locval v v' tmenv
-    (* Fixup attributes now we've built the full List.map of value renamings (attributes contain value references) *)
-    fixup_val_attribs g tmenvinner v v';    
-    v', tmenvinner
-    
-and remap_expr g (compgen:ValCopyFlag) (tmenv:Remap) x =
-    match x with
-    // Binding constructs - see also dtrees below 
-    | TExpr_lambda (_,basevopt,vs,b,m,rty,_)  -> 
-        let basevopt, tmenv =  Option.mapfold (copy_and_remap_and_bind_val g compgen) tmenv basevopt
-        let vs,tmenv = copy_and_remap_and_bind_vals g compgen tmenv vs
-        let b = remap_expr g compgen tmenv b
-        let rty = remap_type tmenv rty
-        TExpr_lambda (new_uniq(), basevopt,vs,b,m, rty, SkipFreeVarsCache ())
-    | TExpr_tlambda (_,tps,b,m,rty,_) ->
-        let tps',tmenvinner = tmenv_copy_remap_and_bind_typars (remap_attrib g tmenv) tmenv tps
-        mk_tlambda m tps' (remap_expr g compgen tmenvinner b,remap_type tmenvinner rty)
-    | TExpr_tchoose (tps,b,m) ->
-        let tps',tmenvinner = tmenv_copy_remap_and_bind_typars (remap_attrib g tmenv) tmenv tps
-        TExpr_tchoose(tps',remap_expr g compgen tmenvinner b,m)
-    | TExpr_letrec (binds,e,m,_) ->  
-        let binds',tmenvinner = copy_and_remap_and_bind_bindings g compgen tmenv binds 
-        TExpr_letrec (binds',remap_expr g compgen tmenvinner e,m,NewFreeVarsCache())
-    | TExpr_let _ -> remap_linear_expr g compgen tmenv x (fun x -> x)
-    | TExpr_match (spBind,exprm,pt,targets,m,ty,_) ->
-        prim_mk_match (spBind,exprm,remap_dtree g compgen tmenv pt,
-                     targets |> Array.map (fun (TTarget(vs,e,spTarget)) ->
-                       let vs',tmenvinner = copy_and_remap_and_bind_FlatVals g compgen tmenv vs 
-                       TTarget(vs', remap_expr g compgen tmenvinner e,spTarget)),
-                     m,remap_type tmenv ty)
-    (* Other constructs *)
-    | TExpr_val (vr,isSuperInit,m) -> 
-        let vr' = remap_vref tmenv vr 
-        if vr == vr' then x 
-        else TExpr_val (vr',isSuperInit,m)
-    | TExpr_quote (a,{contents=Some(argTypes,argExprs,data)},m,ty) ->  
-        TExpr_quote (remap_expr g compgen tmenv a,{contents=Some(remap_typesA tmenv argTypes,remap_exprs g compgen tmenv  argExprs,data)},m,remap_type tmenv ty)
-    | TExpr_quote (a,{contents=None},m,ty) ->  
-        TExpr_quote (remap_expr g compgen tmenv a,{contents=None},m,remap_type tmenv ty)
-    | TExpr_obj (_,typ,basev,basecall,overrides,iimpls,m,_) -> 
-        let basev',tmenvinner = Option.mapfold (copy_and_remap_and_bind_val g compgen) tmenv basev 
-        mk_obj_expr(remap_type tmenv typ,basev',
-                    remap_expr g compgen tmenv basecall,
-                    List.map (remap_method g compgen tmenvinner) overrides,
-                    List.map (remap_iimpl g compgen tmenvinner) iimpls,m) 
-    | TExpr_op(op,tinst,args,m) -> 
-        let op' = remap_op tmenv op 
-        let tinst' = remap_types tmenv tinst 
-        let args' = remap_exprs g compgen tmenv args 
-        if op == op' && tinst == tinst' && args == args' then x 
-        else TExpr_op (op',tinst',args',m)
-    | TExpr_app(e1,e1ty,tyargs,args,m) -> 
-        let e1' = remap_expr g compgen tmenv e1 
-        let e1ty' = remap_possible_forall_typ g tmenv e1ty 
-        let tyargs' = remap_types tmenv tyargs 
-        let args' = remap_exprs g compgen tmenv args 
-        if e1 == e1' && e1ty == e1ty' && tyargs == tyargs' && args == args' then x 
-        else TExpr_app(e1',e1ty',tyargs',args',m)
-    | TExpr_link(eref) -> 
-        remap_expr g compgen tmenv !eref
-    | TExpr_seq (e1,e2,dir,spSeq,m)  -> 
-        let e1' = remap_expr g compgen tmenv e1 
-        let e2' = remap_expr g compgen tmenv e2 
-        if e1 == e1' && e2 == e2' then x 
-        else TExpr_seq (e1',e2',dir,spSeq,m)
-    | TExpr_static_optimization (cs,e2,e3,m) -> 
-       (* note that type instantiation typically resolve the static constraints here *)
-       mk_static_optimization_expr g (List.map (remap_constraint tmenv) cs,
-                                      remap_expr g compgen tmenv e2,
-                                      remap_expr g compgen tmenv e3,m)
-
-    | TExpr_const (c,m,ty) -> 
-        let ty' = remap_type tmenv ty 
-        if ty == ty' then x else TExpr_const (c,m,ty')
-
-and remap_linear_expr g compgen tmenv e contf =
-    match e with 
-    | TExpr_let (bind,e,m,_) ->  
-      let bind',tmenvinner = copy_and_remap_and_bind_binding g compgen tmenv bind
-      remap_linear_expr g compgen tmenvinner e (contf << mk_let_bind m bind')
-    | _ -> contf (remap_expr g compgen tmenv e) 
-and remap_constraint tyenv c = 
-    match c with 
-    | TTyconEqualsTycon(ty1,ty2) -> TTyconEqualsTycon(remap_type tyenv ty1, remap_type tyenv ty2)
-
-and remap_op tmenv op = 
-    match op with 
-    | TOp_recd (ctor,tcr)           -> TOp_recd(ctor,remap_tcref tmenv.tcref_remap tcr)
-    | TOp_ucase_tag_get tcr         -> TOp_ucase_tag_get(remap_tcref tmenv.tcref_remap tcr)
-    | TOp_ucase(ucref)              -> TOp_ucase(remap_ucref tmenv.tcref_remap ucref)
-    | TOp_ucase_proof(ucref)  -> TOp_ucase_proof(remap_ucref tmenv.tcref_remap ucref)
-    | TOp_exnconstr(ec)             -> TOp_exnconstr(remap_tcref tmenv.tcref_remap ec)
-    | TOp_exnconstr_field_get(ec,n) -> TOp_exnconstr_field_get(remap_tcref tmenv.tcref_remap ec,n)
-    | TOp_exnconstr_field_set(ec,n) -> TOp_exnconstr_field_set(remap_tcref tmenv.tcref_remap ec,n)
-    | TOp_rfield_set(rfref)         -> TOp_rfield_set(remap_rfref tmenv.tcref_remap rfref)
-    | TOp_rfield_get(rfref)         -> TOp_rfield_get(remap_rfref tmenv.tcref_remap rfref)
-    | TOp_field_get_addr(rfref)     -> TOp_field_get_addr(remap_rfref tmenv.tcref_remap rfref)
-    | TOp_ucase_field_get(ucref,n)  -> TOp_ucase_field_get(remap_ucref tmenv.tcref_remap ucref,n)
-    | TOp_ucase_field_set(ucref,n)  -> TOp_ucase_field_set(remap_ucref tmenv.tcref_remap ucref,n)
-    | TOp_asm (instrs,tys)          -> TOp_asm (instrs,remap_types tmenv tys)
-    | TOp_trait_call(traitInfo)     -> TOp_trait_call(remap_traitA tmenv traitInfo)
-    | TOp_lval_op (kind,lvr)        -> TOp_lval_op (kind,remap_vref tmenv lvr)
-    | TOp_ilcall ((virt,protect,valu,newobj,superInit,prop,isDllImport,boxthis,mref),enclTypeArgs,methTypeArgs,tys) -> 
-       TOp_ilcall ((virt,protect,valu,newobj,superInit,prop,isDllImport,Option.map (fun (a,b) -> (remap_type tmenv a, remap_type tmenv b)) boxthis,mref),
-                      remap_types tmenv enclTypeArgs,remap_types tmenv methTypeArgs,remap_types tmenv tys)
-    | _ ->  op
-    
-
-and remap_exprs g compgen tmenv es = List.mapq (remap_expr g compgen tmenv) es
-and remap_FlatExprs g compgen tmenv es = FlatList.mapq (remap_expr g compgen tmenv) es
-
-and remap_dtree g compgen tmenv x =
-    match x with 
-    | TDSwitch(e1,csl,dflt,m) -> 
-        TDSwitch(remap_expr g compgen tmenv e1,
-                List.map (fun (TCase(test,y)) -> 
-                  let test' = 
-                    match test with 
-                    | TTest_unionconstr (uc,tinst)   -> TTest_unionconstr(remap_ucref tmenv.tcref_remap uc,remap_types tmenv tinst)
-                    | TTest_array_length (n,ty)      -> TTest_array_length(n,remap_type tmenv ty)
-                    | TTest_const c                  -> test
-                    | TTest_isinst (srcty,tgty)      -> TTest_isinst (remap_type tmenv srcty,remap_type tmenv tgty) 
-                    | TTest_isnull                   -> TTest_isnull 
-                    | TTest_query _ -> failwith "TTest_query should only be used during pattern match compilation"
-                  TCase(test',remap_dtree g compgen tmenv y)) csl, 
-                Option.map (remap_dtree g compgen tmenv) dflt,
-                m)
-    | TDSuccess (es,n) -> 
-        TDSuccess (remap_FlatExprs g compgen tmenv es,n)
-    | TDBind (bind,rest) -> 
-        let bind',tmenvinner = copy_and_remap_and_bind_binding g compgen tmenv bind
-        TDBind (bind',remap_dtree g compgen tmenvinner rest)
-        
-and copy_and_remap_and_bind_binding g compgen tmenv (bind:Binding) =
-    let v = bind.Var
-    let v', tmenv = copy_and_remap_and_bind_val g compgen tmenv v
-    remap_and_rename_bind g compgen tmenv bind v' , tmenv
-
-and copy_and_remap_and_bind_bindings g compgen tmenv binds = 
-    let vs', tmenvinner = copy_and_remap_and_bind_FlatVals g compgen tmenv (vars_of_Bindings binds)
-    remap_and_rename_binds g compgen tmenvinner binds vs',tmenvinner
-
-and remap_and_rename_binds g compgen tmenvinner binds vs' = FlatList.map2 (remap_and_rename_bind g compgen tmenvinner) binds vs'
-and remap_and_rename_bind g compgen tmenvinner (TBind(_,repr,letSeqPtOpt)) v' = TBind(v', remap_expr g compgen tmenvinner repr,letSeqPtOpt)
-
-and remap_method g compgen tmenv (TObjExprMethod(slotsig,tps,vs,e,m))  =
-    let slotsig' = remap_slotsig (remap_attrib g tmenv) tmenv slotsig
-    let tps',tmenvinner = tmenv_copy_remap_and_bind_typars (remap_attrib g tmenv) tmenv tps
-    let vs', tmenvinner2 = List.mapfold (copy_and_remap_and_bind_vals g compgen) tmenvinner vs
-    let e' = remap_expr g compgen tmenvinner2 e
-    TObjExprMethod(slotsig',tps',vs',e',m)
-
-and remap_iimpl g compgen tmenv (ty,overrides)  =
-    (remap_type tmenv ty, List.map (remap_method g compgen tmenv) overrides)
-
-and remap_rfield g tmenv x = 
-    { x with 
-          rfield_type     = x.rfield_type     |> remap_possible_forall_typ g tmenv;
-          rfield_pattribs = x.rfield_pattribs |> remap_attribs g tmenv;
-          rfield_fattribs = x.rfield_fattribs |> remap_attribs g tmenv; } 
-and remap_rfields g tmenv (x:TyconRecdFields) = x.AllFieldsAsList |> List.map (remap_rfield g tmenv) |> MakeRecdFieldsTable 
-
-and remap_ucase g tmenv x = 
-    { x with 
-          ucase_rfields = x.ucase_rfields |> remap_rfields g tmenv;
-          ucase_rty     = x.ucase_rty     |> remap_type tmenv;
-          ucase_attribs = x.ucase_attribs |> remap_attribs g tmenv; } 
-and remap_funion g tmenv (x:TyconUnionData) = x.UnionCasesAsList |> List.map (remap_ucase g tmenv)|> MakeUnionCases 
-
-and remap_fsobjmodel g tmenv x = 
-    { x with 
-          fsobjmodel_kind = 
-             (match x.fsobjmodel_kind with 
-              | TTyconDelegate slotsig -> TTyconDelegate (remap_slotsig (remap_attrib g tmenv) tmenv slotsig)
-              | TTyconClass | TTyconInterface | TTyconStruct | TTyconEnum -> x.fsobjmodel_kind);
-          fsobjmodel_vslots  = x.fsobjmodel_vslots  |> List.map (remap_vref tmenv);
-          fsobjmodel_rfields = x.fsobjmodel_rfields |> remap_rfields g tmenv } 
-
-
-and remap_tycon_repr g tmenv repr = 
-    match repr with 
-    | TFsObjModelRepr    x -> TFsObjModelRepr (remap_fsobjmodel g tmenv x)
-    | TRecdRepr          x -> TRecdRepr (remap_rfields g tmenv x)
-    | TFiniteUnionRepr   x -> TFiniteUnionRepr (remap_funion g tmenv x)
-    | TILObjModelRepr    _ -> failwith "cannot remap IL type definitions"
-    | TAsmRepr           x -> repr
-    | TMeasureableRepr   x -> TMeasureableRepr (remap_type tmenv x)
-
-and remap_tcaug tmenv x = 
-    { x with 
-          tcaug_equals           = x.tcaug_equals            |> Option.map (pair_map (remap_vref tmenv) (remap_vref tmenv));
-          tcaug_compare       = x.tcaug_compare        |> Option.map (pair_map (remap_vref tmenv) (remap_vref tmenv));
-          tcaug_compare_withc = x.tcaug_compare_withc  |> Option.map(remap_vref tmenv);
-          tcaug_hash_and_equals_withc  = x.tcaug_hash_and_equals_withc   |> Option.map (pair_map (remap_vref tmenv) (remap_vref tmenv));
-          tcaug_adhoc            = x.tcaug_adhoc             |> NameMap.map (List.map (remap_vref tmenv));
-          tcaug_super            = x.tcaug_super             |> Option.map (remap_type tmenv);
-          tcaug_implements       = x.tcaug_implements        |> List.map (map1'3 (remap_type tmenv)) } 
-
-and remap_tycon_exnc_info g tmenv inp =
-    match inp with 
-    | TExnAbbrevRepr x -> TExnAbbrevRepr (remap_tcref tmenv.tcref_remap x)
-    | TExnFresh      x -> TExnFresh (remap_rfields g tmenv x)
-    | TExnAsmRepr  _ | TExnNone -> inp 
-
-and remap_member_info g m topValInfo ty ty' tmenv x = 
-    // The slotsig in the ImplementedSlotSigs is w.r.t. the type variables in the value's type. 
-    // REVIEW: this is a bit gross. It would be nice if the slotsig was standalone 
-    assert (isSome topValInfo);
-    let tpsorig,_,_,_ = GetMemberTypeInFSharpForm g x.MemberFlags (the(topValInfo)) ty m
-    let tps,_,_,_ = GetMemberTypeInFSharpForm g x.MemberFlags (the(topValInfo)) ty' m
-    let renaming,_ = mk_typar_to_typar_renaming tpsorig tps 
-    let tmenv = { tmenv with tpinst = tmenv.tpinst @ renaming } 
-    { x with 
-        ApparentParent    = x.ApparentParent    |>  remap_tcref tmenv.tcref_remap ;
-        ImplementedSlotSigs = x.ImplementedSlotSigs |> List.map (remap_slotsig (remap_attrib g tmenv) tmenv); 
-    } 
-
-and copy_remap_and_bind_mtyp g compgen tmenv mty = 
-    let tycons = all_tycons_of_mtyp mty
-    let vs = all_vals_of_mtyp mty
-    let _,_,tmenvinner = copy_and_remap_and_bind_tycons_and_vals g compgen tmenv tycons vs
-    remap_mtyp g compgen tmenvinner mty, tmenvinner
-
-and remap_mtyp g compgen tmenv mty = 
-    map_immediate_vals_and_tycons_of_modtyp (rename_tycon tmenv) (rename_val tmenv) mty 
-
-and rename_tycon tyenv x = 
-    let tcref = 
-        try 
-            let res = tcref_map_find (mk_local_tcref x) tyenv.tcref_remap 
-            res
-        with Not_found -> 
-            errorR(InternalError("couldn't remap internal tycon "^showL(tyconL x),x.Range)); 
-            mk_local_tcref x 
-    deref_tycon  tcref
-
-and rename_val tmenv x = 
-    match vspec_map_tryfind x tmenv.vspec_remap with 
-    | Some v -> deref_val v
-    | None -> x
-
-and copy_tycon compgen (tycon:Tycon) = 
-    match compgen with 
-    | OnlyCloneExprVals -> tycon
-    | _ ->  NewClonedTycon tycon
-
-/// This operates over a whole nested collection of tycons and vals simultaneously *)
-and copy_and_remap_and_bind_tycons_and_vals g compgen tmenv tycons vs = 
-    let tycons' = tycons |> List.map (copy_tycon compgen)
-
-    let tmenvinner = bind_tycons tycons tycons' tmenv
-    
-    (* Values need to be copied and renamed. *)
-    let vs',tmenvinner = copy_and_remap_and_bind_vals g compgen tmenvinner vs
-    if !verboseStamps then 
-        for tycon in tycons do 
-            dprintf "copy_and_remap_and_bind_tycons_and_vals: tycon %s#%d\n" tycon.MangledName tycon.Stamp;
-        for v in vs do 
-            dprintf "copy_and_remap_and_bind_tycons_and_vals: val %s#%d\n" v.MangledName v.Stamp;
-
-    (* "if a type constructor is hidden then all its inner values and inner type constructors must also be hidden" *)
-    (* Hence we can just lookup the inner tycon/value mappings in the tables. *)
-
-    let lookup_val (v:Val) = 
-        let vref = 
-            try  
-               let res = vspec_map_find v tmenvinner.vspec_remap
-               if !verboseStamps then 
-                   dprintf "remaped internal value %s#%d --> %s#%d\n" v.MangledName v.Stamp (deref_val res).MangledName (deref_val res).Stamp;
-               res 
-            with Not_found -> 
-                errorR(InternalError(sprintf "couldn't remap internal value '%s'" v.MangledName,v.Range));
-                mk_local_vref v
-        deref_val vref
-        
-    let lookup_tycon tycon = 
-        let tcref = 
-            try 
-                let res = tcref_map_find (mk_local_tcref tycon) tmenvinner.tcref_remap 
-                if !verboseStamps then 
-                    dprintf "remaped internal tycon %s#%d --> %s#%d\n" tycon.MangledName tycon.Stamp (deref_tycon res).MangledName (deref_tycon res).Stamp;
-                res
-            with Not_found -> 
-                errorR(InternalError("couldn't remap internal tycon "^showL(tyconL tycon),tycon.Range));
-                mk_local_tcref tycon
-        deref_tycon  tcref
-             
-    (tycons,tycons') ||> List.iter2 (fun tc tc' -> 
-        let tcd = tc.Data
-        let tcd' = tc'.Data
-        let tps',tmenvinner2 = tmenv_copy_remap_and_bind_typars (remap_attrib g tmenvinner) tmenvinner (tcd.entity_typars.Force(tcd.entity_range))
-        tcd'.entity_typars         <- LazyWithContext.NotLazy tps';
-        tcd'.entity_attribs        <- tcd.entity_attribs |> remap_attribs g tmenvinner2;
-        tcd'.entity_tycon_repr           <- tcd.entity_tycon_repr    |> Option.map (remap_tycon_repr g tmenvinner2);
-        tcd'.entity_tycon_abbrev         <- tcd.entity_tycon_abbrev  |> Option.map (remap_type tmenvinner2) ;
-        tcd'.entity_tycon_tcaug          <- tcd.entity_tycon_tcaug   |> remap_tcaug tmenvinner2 ;
-        tcd'.entity_modul_contents <- notlazy (tcd.entity_modul_contents 
-                                              |> Lazy.force 
-                                              |> map_immediate_vals_and_tycons_of_modtyp lookup_tycon lookup_val);
-        tcd'.entity_exn_info      <- tcd.entity_exn_info      |> remap_tycon_exnc_info g tmenvinner2) ;
-    tycons',vs', tmenvinner
-
-
-and all_tycons_of_mdef mdef =
-    match mdef with 
-    | TMDefRec(tycons,binds,mbinds,m) -> 
-        tycons @ List.collect (fun (TMBind(mspec, def)) -> mspec :: all_tycons_of_mdef def) mbinds
-    | TMDefLet _           -> []
-    | TMDefDo _            -> []
-    | TMDefs(defs)      -> List.collect all_tycons_of_mdef defs
-    | TMAbstract(TMTyped(mty,_,_)) -> all_tycons_of_mtyp mty
-and all_vals_of_mdef mdef = 
-    match mdef with 
-    | TMDefRec(tycons,binds,mbinds,m) -> 
-       vslot_vals_of_tycons tycons @
-       (binds |> vars_of_Bindings |> FlatList.to_list) @ 
-       List.collect (fun (TMBind(mspec, def)) -> all_vals_of_mdef def) mbinds
-    | TMDefLet(bind,m)            -> [bind.Var]
-    | TMDefDo _            -> []
-    | TMDefs(defs)      -> List.collect all_vals_of_mdef defs
-    | TMAbstract(TMTyped(mty,_,_)) -> all_vals_of_mtyp mty
-
-and remap_and_bind_mexpr g compgen tmenv (TMTyped(mty,mdef,m)) =
-    let mdef = copy_and_remap_mdef g compgen tmenv mdef
-    let mty,tmenv = copy_remap_and_bind_mtyp g compgen tmenv mty
-    TMTyped(mty,mdef,m), tmenv
-
-and remap_mexpr g compgen tmenv (TMTyped(mty,mdef,m)) =
-    let mdef = copy_and_remap_mdef g compgen tmenv mdef 
-    let mty = remap_mtyp g compgen tmenv mty 
-    TMTyped(mty,mdef,m)
-
-and copy_and_remap_mdef g compgen tmenv mdef =
-    let tycons = all_tycons_of_mdef mdef 
-    let vs = all_vals_of_mdef mdef 
-    let _,_,tmenvinner = copy_and_remap_and_bind_tycons_and_vals g compgen tmenv tycons vs
-    remap_and_rename_mdef g compgen tmenvinner mdef
-
-and remap_and_rename_mdefs g compgen tmenv x = 
-    List.map (remap_and_rename_mdef g compgen tmenv) x 
-
-and remap_and_rename_mdef g compgen tmenv mdef =
-    match mdef with 
-    | TMDefRec(tycons,binds,mbinds,m) -> 
-        (* Abstract (virtual) vslots in the tycons at TMDefRec nodes are binders. They also need to be copied and renamed. *)
-        let tycons = tycons |> List.map (rename_tycon tmenv)
-        let binds = remap_and_rename_binds g compgen tmenv binds (binds |> FlatList.map (var_of_bind >> rename_val tmenv))
-        let mbinds = mbinds |> List.map (remap_and_rename_mbind g compgen tmenv)
-        TMDefRec(tycons,binds,mbinds,m)
-    | TMDefLet(bind,m)            ->
-        let v = bind.Var
-        let bind = remap_and_rename_bind g compgen tmenv bind (rename_val tmenv v)
-        TMDefLet(bind, m)
-    | TMDefDo(e,m)            ->
-        let e = remap_expr g compgen tmenv e
-        TMDefDo(e, m)
-    | TMDefs(defs)      -> 
-        let defs = remap_and_rename_mdefs g compgen tmenv defs
-        TMDefs(defs)
-    | TMAbstract(mexpr) -> 
-        let mexpr = remap_mexpr g compgen tmenv mexpr
-        TMAbstract(mexpr)
-
-and remap_and_rename_mbind g compgen tmenv (TMBind(mspec, def)) =
-    let mspec = rename_tycon tmenv mspec
-    let def = remap_and_rename_mdef g compgen tmenv def
-    TMBind(mspec, def)
-
-and remap_ImplFile g compgen tmenv mv = 
-    map_acc_TImplFile (remap_and_bind_mexpr g compgen) tmenv mv
-
-and remap_assembly g compgen tmenv (TAssembly(mvs)) = 
-    let mvs,z = List.mapfold (remap_ImplFile g compgen) tmenv mvs
-    TAssembly(mvs),z
-
-let empty_expr_remap = empty_remap
-
-let copy_mtyp     g compgen mtyp = copy_remap_and_bind_mtyp g compgen empty_expr_remap mtyp |> fst
-let copy_val      g compgen v    = copy_and_remap_and_bind_val g compgen empty_expr_remap v |> fst
-let copy_expr     g compgen e    = remap_expr g compgen empty_expr_remap e    
-let copy_ImplFile g compgen e    = remap_ImplFile g compgen empty_expr_remap e |> fst
-let copy_assembly g compgen e    = remap_assembly g compgen empty_expr_remap e |> fst
-
-let inst_expr g tpinst e = remap_expr g CloneAll (mk_inst_tyenv tpinst) e
-
-//--------------------------------------------------------------------------
-// Replace Marks - adjust debugging marks when a lambda gets
-// eliminated (i.e. an expression gets inlined)
-//--------------------------------------------------------------------------
-
-let rec RemarkExpr m x =
-    match x with
-    | TExpr_lambda (uniq,basevopt,vs,b,_,rty,fvs)  -> TExpr_lambda (uniq,basevopt,vs,RemarkExpr m b,m,rty,fvs)  
-    | TExpr_tlambda (uniq,tps,b,_,rty,fvs) -> TExpr_tlambda (uniq,tps,RemarkExpr m b,m,rty,fvs)
-    | TExpr_tchoose (tps,b,_) -> TExpr_tchoose (tps,RemarkExpr m b,m)
-    | TExpr_letrec (binds,e,_,fvs) ->  TExpr_letrec (RemarkBinds m binds,RemarkExpr m e,m,fvs)
-    | TExpr_let (bind,e,_,fvs) -> TExpr_let (RemarkBind m bind,RemarkExpr m e,m,fvs)
-    | TExpr_match (_,_,pt,targets,_,ty,_) -> prim_mk_match (NoSequencePointAtInvisibleBinding,m,RemarkDecisionTree m pt, Array.map (fun (TTarget(vs,e,_)) ->TTarget(vs, RemarkExpr m e,SuppressSequencePointAtTarget)) targets,m,ty)
-    | TExpr_val (x,isSuperInit,_) -> TExpr_val (x,isSuperInit,m)
-    | TExpr_quote (a,conv,_,ty) ->  TExpr_quote (RemarkExpr m a,conv,m,ty)
-    | TExpr_obj (n,typ,basev,basecall,overrides,iimpls,_,fvs) -> 
-        TExpr_obj (n,typ,basev,RemarkExpr m basecall,
-                     List.map (RemarkMethod m) overrides,
-                     List.map (RemarkInterfaceImpl m) iimpls,m,fvs)
-    | TExpr_op (op,tinst,args,_) -> 
-        let op = 
-            match op with 
-            | TOp_try_finally(_,_) -> TOp_try_finally(NoSequencePointAtTry,NoSequencePointAtFinally)
-            | TOp_try_catch(_,_) -> TOp_try_catch(NoSequencePointAtTry,NoSequencePointAtWith)
-            | _ -> op
-            
-        TExpr_op (op,tinst,RemarkExprs m args,m)
-    | TExpr_link (eref) -> RemarkExpr m !eref
-    | TExpr_app(e1,e1ty,tyargs,args,_) -> TExpr_app(RemarkExpr m e1,e1ty,tyargs,RemarkExprs m args,m)
-    | TExpr_seq (e1,e2,dir,_,_)  -> TExpr_seq (RemarkExpr m e1,RemarkExpr m e2,dir,SuppressSequencePointOnExprOfSequential,m)
-    | TExpr_static_optimization (eqns,e2,e3,_) -> TExpr_static_optimization (eqns,RemarkExpr m e2,RemarkExpr m e3,m)
-    | TExpr_const (c,_,ty) -> TExpr_const (c,m,ty)
-  
-and RemarkMethod m (TObjExprMethod(slotsig,tps,vs,e,_)) = 
-  TObjExprMethod(slotsig,tps,vs,RemarkExpr m e,m)
-and RemarkInterfaceImpl m (ty,overrides) = 
-  (ty, List.map (RemarkMethod m) overrides)
-and RemarkExprs m es = es |> List.map (RemarkExpr m) 
-and RemarkFlatExprs m es = es |> FlatList.map (RemarkExpr m) 
-and RemarkDecisionTree m x =
-  match x with 
-  | TDSwitch(e1,csl,dflt,_) -> TDSwitch(RemarkExpr m e1, List.map (fun (TCase(test,y)) -> TCase(test,RemarkDecisionTree m y)) csl, Option.map (RemarkDecisionTree m) dflt,m)
-  | TDSuccess (es,n) -> TDSuccess (RemarkFlatExprs m es,n)
-  | TDBind (bind,rest) -> TDBind(RemarkBind m bind,RemarkDecisionTree m rest)
-and RemarkBinds m binds = FlatList.map (RemarkBind m) binds
-and RemarkBind m (TBind(v,repr,_)) = TBind(v, RemarkExpr m repr,NoSequencePointAtStickyBinding)
-
-
-//--------------------------------------------------------------------------
-// Reference semantics?
-//--------------------------------------------------------------------------
-
-let rfield_alloc_observable (f:RecdField) = not f.IsStatic && f.IsMutable
-let ucase_alloc_observable uc = uc.ucase_rfields.rfields_by_index |> Array.exists rfield_alloc_observable
-let ucref_alloc_observable (uc:UnionCaseRef) = uc.UnionCase |> ucase_alloc_observable
-  
-let tycon_alloc_observable (tycon:Tycon) =
-  if tycon.IsRecordTycon or tycon.IsStructTycon then 
-    tycon.AllFieldsArray |> Array.exists rfield_alloc_observable
-  elif tycon.IsUnionTycon then 
-    tycon.UnionCasesArray |> Array.exists ucase_alloc_observable
-  else false
-
-let tcref_alloc_observable tcr = tycon_alloc_observable (deref_tycon tcr)
-  
-// Although from the pure F# perspective exception values cannot be changed, the .NET 
-// implementation of exception objects attaches a whole bunch of stack information to 
-// each raised object.  Hence we treat exception objects as if they have identity 
-let ecref_alloc_observable (ecref:TyconRef) = true 
-
-// Some of the implementations of library functions on lists use mutation on the tail 
-// of the cons cell. These cells are always private, i.e. not accessible by any other 
-// code until the construction of the entire return list has been completed. 
-// However, within the implementation code reads of the tail cell must in theory be treated 
-// with caution.  Hence we are conservative and within fslib we don't treat list 
-// reads as if they were pure. 
-let ucref_rfield_mutable g (ucref:UnionCaseRef) n = 
-    (g.compilingFslib && tcref_eq g ucref.TyconRef g.list_tcr_canon && n = 1) ||
-    (rfield_of_ucref_by_idx ucref n).IsMutable
-  
-let ecref_rfield_mutable ecref n = 
-    if n < 0 || n >= List.length (rfields_of_ecref ecref) then errorR(InternalError(sprintf "ecref_rfield_mutable, exnc = %s, n = %d" ecref.DemangledExceptionName n,ecref.Range));
-    (rfield_of_ecref_by_idx ecref n).IsMutable
-
-let use_genuine_field tycon (f:RecdField) = 
-    isSome f.LiteralValue || is_enum_tycon tycon || f.rfield_secret || (f.rfield_mutable && not tycon.IsRecordTycon)
-
-let gen_field_name tycon f = 
-    if use_genuine_field tycon f then f.rfield_id.idText
-    else CompilerGeneratedName f.rfield_id.idText 
-
-//-------------------------------------------------------------------------
-// Helpers for building code contained in the initial environment
-//------------------------------------------------------------------------- 
-
-let mk_expr_ty g ty =  TType_app(g.expr_tcr,[ty])
-let mk_raw_expr_ty g =  TType_app(g.raw_expr_tcr,[])
-
-// flag to specify use of System.Tuple and System.Threading.LazyInit
-let mutable use_40_System_Types = true 
-
-let mk_tupled_ty g tys = 
-    match tys with 
-    | [] -> g.unit_ty 
-    | [h] -> h
-    | _ -> mk_tuple_ty tys
-
-let mk_tupled_vars_ty g vs = 
-    mk_tupled_ty g (types_of_vals vs)
-
-let mk_meth_ty g argtys rty = mk_iterated_fun_ty (List.map (mk_tupled_ty g) argtys) rty 
-let mk_nativeptr_typ g ty = TType_app (g.nativeptr_tcr, [ty])
-let mk_array_typ g ty = TType_app (g.array_tcr, [ty])
-let mk_bytearray_ty g = mk_array_typ g g.byte_ty
-
-
-//--------------------------------------------------------------------------
-// type_of_expr
-//--------------------------------------------------------------------------
- 
-let rec type_of_expr g e = 
-    match e with 
-    | TExpr_app(f,fty,tyargs,args,m) -> apply_types g fty (tyargs,args)
-    | TExpr_obj (_,ty,_,_,_,_,_,_)  
-    | TExpr_match (_,_,_,_,_,ty,_) 
-    | TExpr_quote(_,_,_,ty) 
-    | TExpr_const(_,_,ty)              -> (ty)
-    | TExpr_val(vref,isSuperInit,_)  -> vref.Type
-    | TExpr_seq(a,b,k,_,_) -> type_of_expr g (match k with NormalSeq  -> b | ThenDoSeq -> a)
-    | TExpr_lambda(_,basevopt,vs,_,_,rty,_) -> (mk_tupled_vars_ty g vs --> rty)
-    | TExpr_tlambda(_,tyvs,_,_,rty,_) -> (tyvs +-> rty)
-    | TExpr_let(_,e,_,_) 
-    | TExpr_tchoose(_,e,_)
-    | TExpr_link { contents=e}
-    | TExpr_static_optimization (_,_,e,_) 
-    | TExpr_letrec(_,e,_,_) -> type_of_expr g e
-    | TExpr_op(op,tinst,args,m) -> 
-        match op with 
-        | TOp_coerce -> (match tinst with [to_ty;from_ty] -> to_ty | _ -> failwith "bad TOp_coerce node")
-        | (TOp_ilcall (_,_,_,rtys) | TOp_asm(_,rtys)) -> (match rtys with [h] -> h | _ -> g.unit_ty)
-        | TOp_ucase uc -> rty_of_uctyp uc tinst
-        | TOp_ucase_proof uc -> mk_proven_ucase_typ uc tinst  
-        | TOp_recd (_,tcref) -> mk_tyapp_ty tcref tinst
-        | TOp_exnconstr uc -> g.exn_ty
-        | TOp_bytes _ -> mk_bytearray_ty g
-        | TOp_uint16s _ -> mk_array_typ g g.uint16_ty
-        | TOp_tuple_field_get(i) -> List.nth tinst i
-        | TOp_tuple -> mk_tuple_ty tinst
-        | (TOp_for _ | TOp_while _) -> g.unit_ty
-        | TOp_array -> (match tinst with [ty] -> mk_array_typ g ty | _ -> failwith "bad TOp_array node")
-        | (TOp_try_catch _ | TOp_try_finally _) -> (match tinst with [ty] ->  ty | _ -> failwith "bad TOp_try node")
-        | TOp_field_get_addr(fref) -> mk_byref_typ g (actual_rtyp_of_rfref fref tinst)
-        | TOp_rfield_get(fref) -> actual_rtyp_of_rfref fref tinst
-        | (TOp_rfield_set _ | TOp_ucase_field_set _ | TOp_exnconstr_field_set _ | TOp_lval_op ((LSet | LByrefSet),_)) ->g.unit_ty
-        | TOp_ucase_tag_get(cref) -> g.int_ty
-        | TOp_ucase_field_get(cref,j) -> typ_of_ucref_rfield_by_idx cref tinst j
-        | TOp_exnconstr_field_get(ecref,j) -> typ_of_ecref_rfield ecref j
-        | TOp_lval_op (LByrefGet, v) -> dest_byref_typ g v.Type
-        | TOp_lval_op (LGetAddr, v) -> mk_byref_typ g v.Type
-        | TOp_get_ref_lval -> (match tinst with [ty] -> mk_byref_typ g ty | _ -> failwith "bad TOp_get_ref_lval node")      
-        | TOp_trait_call (TTrait(_,_,_,_,ty,_)) -> GetFSharpViewOfReturnType g ty
-        | TOp_rethrow -> (match tinst with [rtn_ty] -> rtn_ty | _ -> failwith "bad TOp_rethrow node")
-        | TOp_goto _ | TOp_label _ | TOp_return -> 
-            //assert false; 
-            //errorR(InternalError("unexpected goto/label/return in type_of_expr",m)); 
-            // It doesn't matter what type we return here. THis is only used in free variable analysis in the code generator
-            g.unit_ty
-
-//--------------------------------------------------------------------------
-// Make applications
-//---------------------------------------------------------------------------
-
-let prim_mk_app (f,fty) tyargs argsl m = 
-  TExpr_app(f,fty,tyargs,argsl,m)
-
-let rec mk_expr_appl_aux g f fty argsl m =
-  if verbose then  dprintf "--- mk_expr_appl_aux, fty = %s\n" ((DebugPrint.showType fty));
-  match argsl with 
-  | arg :: rest ->
-      match f with 
-      (* Try to zip the term application with others *)
-      | TExpr_app(f',fty',tyargs,pargs,m2) 
-          (* Only do this when the formal return type of the function type is another function type *)
-          when is_fun_typ g (formal_apply_types g fty' (tyargs,pargs)) ->
-            if verbose then  dprintf "--- mk_expr_appl_aux, List.zip, fty' = %s\n" ((DebugPrint.showType fty'));
-            let pargs' = pargs@[arg]
-            let f'' = prim_mk_app (f',fty') tyargs pargs' (union_ranges m2 m)
-            let fty'' = apply_types g fty' (tyargs,pargs') 
-            if verbose then  dprintf "--- mk_expr_appl_aux, combined, continue, fty'' = %s\n" ((DebugPrint.showType fty''));
-            mk_expr_appl_aux g f'' fty'' rest m
-      | _ -> 
-          if not (is_fun_typ g fty) then error(InternalError("expected a function type",m));
-          let _,rfty = dest_fun_typ g fty
-          mk_expr_appl_aux g (prim_mk_app (f,fty) [] [arg] m) rfty rest m
-
-  | [] -> (f,fty)
-
-let rec mk_appl_aux g f fty tyargsl argsl m =
-  match tyargsl with 
-  | tyargs :: rest -> 
-      begin match tyargs with 
-      | [] -> mk_appl_aux g f fty rest argsl m
-      | _ -> 
-        let arfty = reduce_forall_typ g fty tyargs
-        mk_appl_aux g (prim_mk_app (f,fty) tyargs [] m) arfty rest argsl m
-      end
-  | [] -> mk_expr_appl_aux g f fty argsl m
-      
-let mk_appl g ((f,fty),tyargsl,argl,m) = fst (mk_appl_aux g f fty tyargsl argl m)
-let mk_tyapp m (f,fty) tyargs = match tyargs with [] -> f | _ -> prim_mk_app (f,fty) tyargs [] m 
-
-let mk_val_set m v e = TExpr_op(TOp_lval_op (LSet, v), [], [e], m)             (*   localv <- e      *)
-let mk_lval_set m v e = TExpr_op(TOp_lval_op (LByrefSet, v), [], [e], m)       (*  *localv_ptr = e   *)
-let mk_lval_get m v = TExpr_op(TOp_lval_op (LByrefGet, v), [], [], m)          (* *localv_ptr        *)
-let mk_val_addr m v = TExpr_op(TOp_lval_op (LGetAddr, v), [], [], m)           (* &localv            *)
-
-(*--------------------------------------------------------------------------
-!* Decision tree reduction
- *------------------------------------------------------------------------ *)
-
-let rec acc_targets_of_dtree tree acc =
-  match tree with 
-  | TDSwitch (_,edges,dflt,_) -> List.foldBack (dest_of_case >> acc_targets_of_dtree) edges (Option.fold_right acc_targets_of_dtree dflt acc)
-  | TDSuccess (_,i) -> ListSet.insert (=) i acc
-  | TDBind (_,rest) -> acc_targets_of_dtree rest acc
-
-let rec map_acc_tips_of_dtree f tree =
-    match tree with 
-    | TDSwitch (e,edges,dflt,m) -> TDSwitch (e,List.map (map_acc_tips_of_edge f) edges,Option.map (map_acc_tips_of_dtree f) dflt,m)
-    | TDSuccess (es,i) -> f es i  
-    | TDBind (bind,rest) -> TDBind(bind,map_acc_tips_of_dtree f rest)
-and map_acc_tips_of_edge f (TCase(x,t)) = 
-    TCase(x,map_acc_tips_of_dtree f t)
-
-let map_targets_of_dtree f tree = map_acc_tips_of_dtree (fun es i -> TDSuccess(es, f i)) tree
-
-(* Dead target elimination *)
-let eliminate_dead_targets_from_match tree targets =
-    let used = acc_targets_of_dtree tree [] |> Array.of_list
-    if used.Length < Array.length targets then
-        Array.sortInPlace used;
-        let nused = Array.length used
-        let ntargets = Array.length targets
-        let tree' = 
-            let remap = Array.create ntargets (-1)
-            Array.iteri (fun i tgn -> remap.[tgn] <- i) used;
-            map_targets_of_dtree (fun tgn -> if remap.[tgn] = -1 then failwith "eliminate_dead_targets_from_match: failure while eliminating unused targets"; 
-                                             remap.[tgn]) tree
-        let targets' = Array.map (Array.get targets) used
-        tree',targets'
-    else 
-        tree,targets
-    
-
-
-let rec target_of_success_dtree tree =
-    match tree with 
-    | TDSwitch _ -> None
-    | TDSuccess (_,i) -> Some i
-    | TDBind(b,t) -> target_of_success_dtree t
-
-/// Check a decision tree only has bindings that immediately cover a 'Success'
-let rec dtree_has_non_trivial_bindings tree =
-    match tree with 
-    | TDSwitch (_,edges,dflt,_) -> List.exists (dest_of_case >> dtree_has_non_trivial_bindings) edges || (Option.exists dtree_has_non_trivial_bindings dflt)
-    | TDSuccess _ -> false
-    | TDBind (_,t) -> isNone (target_of_success_dtree t)
-
-// If a target has assignments and can only be reached through one 
-// branch (i.e. is "linear"), then transfer the assignments to the r.h.s. to be a "let". 
-let fold_linear_binding_targets_of_match tree targets =
-
-    // Don't do this when there are any bindings in the tree except where those bindings immediately cover a success node
-    // since the variables would be extruded from their scope. 
-    if dtree_has_non_trivial_bindings tree then 
-        tree,targets 
-
-    else
-
-        // Build a map showing how each target might be reached
-        let rec acc_tips_of_dtree accBinds tree  acc =
-            match tree with 
-            | TDSwitch (_,edges,dflt,_) -> 
-                assert (isNil accBinds)
-                List.foldBack (acc_tips_of_edge accBinds) edges (Option.fold_right (acc_tips_of_dtree accBinds) dflt acc)
-            | TDSuccess (es,i) -> 
-                Map.add i ((List.rev accBinds,es) :: Map.tryFindMulti i acc) acc
-            | TDBind (bind,rest) -> 
-                acc_tips_of_dtree (bind::accBinds) rest acc
-
-        and acc_tips_of_edge accBinds (TCase(_,x)) acc = acc_tips_of_dtree accBinds x acc
-
-        // Compute the targets that can only be reached one way
-        let linearTips = 
-            acc_tips_of_dtree [] tree Map.empty 
-            |> Map.filter (fun k v -> match v with [_] -> true | _ -> false)
-
-        if linearTips.IsEmpty then 
-
-            tree,targets
-
-        else
-            
-            /// rebuild the decision tree, replacing 'bind-then-success' decision trees by TDSuccess nodes that just go to the target
-            let rec rebuildDecisionTree tree =
-                
-                // Check if this is a bind-then-success tree
-                match target_of_success_dtree tree with
-                | Some i when linearTips.ContainsKey i -> TDSuccess(FlatList.empty,i)
-                | _ -> 
-                    match tree with 
-                    | TDSwitch (e,edges,dflt,m) -> TDSwitch (e,List.map rebuildDecisionTreeEdge edges,Option.map rebuildDecisionTree dflt,m)
-                    | TDSuccess _ -> tree
-                    | TDBind _ -> tree
-
-            and rebuildDecisionTreeEdge (TCase(x,t)) =  
-                TCase(x,rebuildDecisionTree t)
-
-            let tree' =  rebuildDecisionTree tree
-
-            /// rebuild the targets , replacing linear targets by ones that include all the 'let' bindings from the source
-            let targets' = 
-                targets |> Array.mapi (fun i (TTarget(vs,e,spTarget) as tg) -> 
-                    match Map.tryfind i linearTips with 
-                    | Some ((binds,es) :: _) -> 
-                        let m = (range_of_expr e)
-                        TTarget(FlatList.empty,mk_lets_bind m binds (mk_invisible_lets_from_Bindings m vs es e),spTarget)
-                    | _ -> tg )
-     
-            tree',targets'
-
-// Simplify a little as we go, including dead target elimination 
-let rec simplify_trivial_match spBind exprm matchm ty tree targets  = 
-    match tree with 
-    | TDSuccess(es,n) -> 
-        if n >= Array.length targets then failwith "simplify_trivial_match: target out of range";
-        let (TTarget(vs,rhs,spTarget)) = targets.[n]
-        if vs.Length <> es.Length then failwith ("simplify_trivial_match: invalid argument, n = "^string n^", List.length targets = "^string (Array.length targets));
-        mk_invisible_lets_from_Bindings (range_of_expr rhs) vs es rhs
-    | _ -> 
-        prim_mk_match (spBind,exprm,tree,targets,matchm,ty)
- 
-(* Simplify a little as we go, including dead target elimination *)
-let mk_and_optimize_match spBind exprm matchm ty tree targets  = 
-    let targets = Array.of_list targets
-    match tree with 
-    | TDSuccess _ -> 
-        simplify_trivial_match spBind exprm matchm ty tree targets
-    | _ -> 
-        let tree,targets = eliminate_dead_targets_from_match tree targets
-        let tree,targets = fold_linear_binding_targets_of_match tree targets
-        simplify_trivial_match spBind exprm matchm ty tree targets
-
-
-(*-------------------------------------------------------------------------
-!* mk_expra_of_expr
- *------------------------------------------------------------------------- *)
-
-type mutates = DefinitelyMutates | PossiblyMutates | NeverMutates
-exception DefensiveCopyWarning of string * range 
-
-let type_immutable g ty =
-    match try_tcref_of_stripped_typ g ty with 
-    | None -> false
-    | Some tcref -> 
-      not (tcref_alloc_observable tcref) ||
-      tcref_eq g tcref g.decimal_tcr ||
-      tcref_eq g tcref g.date_tcr
-
-let MustTakeAddressOfVal (v:ValRef) = v.IsMutable 
-
-let CanTakeAddressOfVal g (v:ValRef) mut =
-    // We can take the address of values of struct type if all instances of the type are
-    // known to be immutable. 
-    // We only do this for true locals because we can't necessarily take adddresses
-    // across assemblies.
-    // Note: type_immutable should imply PossiblyMutates or NeverMutates
-    not (mut = DefinitelyMutates) &&  
-    not v.IsMemberOrModuleBinding &&
-    type_immutable g v.Type
-
-let MustTakeAddressOfRecdField (rfref: RecdFieldRef) = rfref.RecdField.IsMutable
-let CanTakeAddressOfRecdField g (rfref: RecdFieldRef) mut tinst =
-       (not (mut = DefinitelyMutates) && 
-        // We only do this if the field is defined in this assembly because we can't take adddresses across assemblies fro immutable fields
-        tcref_in_this_assembly g.compilingFslib rfref.TyconRef &&
-        type_immutable g (actual_rtyp_of_rfref rfref tinst))
-
-
-let rec mk_expra_of_expr g valu mut e m =
-    if not valu then (fun x -> x),e else
-    match e with 
-    (* LVALUE: "x" where "x" is byref *)
-    | TExpr_op(TOp_lval_op (LByrefGet, v), _,[], m) -> 
-        (fun x -> x), expr_for_vref m v
-    (* LVALUE: "x" where "x" is mutable local *)
-    | TExpr_val(v, _,m) when MustTakeAddressOfVal v || CanTakeAddressOfVal g v mut ->
-        (fun x -> x), mk_val_addr m v
-    (* LVALUE: "x" where "e.x" is mutable record field. "e" may be an lvalue *)
-    | TExpr_op(TOp_rfield_get rfref, tinst,[e],m) when MustTakeAddressOfRecdField rfref || CanTakeAddressOfRecdField g rfref mut tinst ->
-        let exprty = type_of_expr g e
-        let wrap,expra = mk_expra_of_expr g (is_struct_typ g exprty) mut e m
-        wrap, mk_recd_field_get_addr_via_expra(expra,rfref,tinst,m)
-
-    (* LVALUE: "x" where "e.x" is a .NET static field. *)
-    | TExpr_op(TOp_asm ([IL.I_ldsfld(vol,fspec)],[ty2]), tinst,[],m) -> 
-        (fun x -> x),TExpr_op(TOp_asm ([IL.I_ldsflda(fspec)],[mk_byref_typ g ty2]), tinst,[],m)
-
-    (* LVALUE: "x" where "e.x" is a .NET instance field. "e" may be an lvalue *)
-    | TExpr_op(TOp_asm ([IL.I_ldfld(align,vol,fspec)],[ty2]), tinst,[e],m) 
-       -> 
-        let exprty = type_of_expr g e
-        let wrap,expra = mk_expra_of_expr g (is_struct_typ g exprty) mut e m
-        wrap,TExpr_op(TOp_asm ([IL.I_ldflda(fspec)],[mk_byref_typ g ty2]), tinst,[expra],m)
-
-    (* LVALUE: "x" where "x" is mutable static field. *)
-    | TExpr_op(TOp_rfield_get rfref, tinst,[],m) when MustTakeAddressOfRecdField rfref || CanTakeAddressOfRecdField g rfref mut tinst ->
-        (fun x -> x), mk_static_rfield_get_addr(rfref,tinst,m)
-
-    // LVALUE:  "e.[n]" where e is an array of structs 
-    | TExpr_app(TExpr_val(vf,_,_),_,[elemTy],[aexpr;nexpr],_) 
-         when (g.vref_eq vf g.arr1_lookup_vref) -> 
-        
-        let shape = Rank1ArrayShape
-        (fun x -> x), TExpr_op(TOp_asm ([IL.I_ldelema(NormalAddress,shape,IL.mk_tyvar_ty 0us)],[mk_byref_typ g elemTy]), [elemTy],[aexpr;nexpr],m)
-
-    // LVALUE:  "e.[n1,n2]", "e.[n1,n2,n3]", "e.[n1,n2,n3,n4]" where e is an array of structs 
-    | TExpr_app(TExpr_val(vf,_,_),_,[elemTy],[aexpr;TExpr_op(TOp_tuple,_,args,_)],_) 
-         when (g.vref_eq vf g.arr2_lookup_vref || g.vref_eq vf g.arr3_lookup_vref || g.vref_eq vf g.arr4_lookup_vref) -> 
-        
-        let shape = ILArrayShape(Array.to_list (Array.create args.Length (None,None))) 
-
-        (fun x -> x), TExpr_op(TOp_asm ([IL.I_ldelema(NormalAddress,shape,IL.mk_tyvar_ty 0us)],[mk_byref_typ g elemTy]), [elemTy],(aexpr::args),m)
-
-    | TExpr_val(v, _,m) when mut = DefinitelyMutates
-       -> 
-        if is_byref_typ g v.Type then error(Error("Unexpected use of a byref-typed variable",m));
-        error(Error("A value must be local and mutable in order to mutate the contents of a value type, e.g. 'let mutable x = ...'",m));
-         
-    | _ -> 
-        begin match mut with 
-        | NeverMutates -> ()
-        | DefinitelyMutates -> 
-          errorR(Error("Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'",m));
-        | PossiblyMutates -> 
-          warning(DefensiveCopyWarning("The value has been copied to ensure the original is not mutated by this operation",m));
-        end;
-        let tmp,tmpe = mk_mut_compgen_local m "copyOfStruct" (type_of_expr g e)
-        (fun rest -> mk_compgen_let m tmp e rest), (mk_val_addr m (mk_local_vref tmp))        
-
-let mk_recd_field_get g (e,fref:RecdFieldRef,tinst,finst,m) = 
-    let ftyp = actual_rtyp_of_rfref fref tinst
-    let wrap,e' = mk_expra_of_expr g fref.Tycon.IsStructTycon NeverMutates e m 
-    wrap (mk_tyapp m (mk_recd_field_get_via_expra(e',fref,tinst,m), ftyp) finst)
-
-let mk_recd_field_set g (e,fref:RecdFieldRef,tinst,e2,m) = 
-    let wrap,e' = mk_expra_of_expr g fref.Tycon.IsStructTycon DefinitelyMutates e m 
-    wrap (mk_recd_field_set_via_expra(e',fref,tinst,e2,m))
-
-(*---------------------------------------------------------------------------
-!* Compute fixups for letrec's.
- *
- * Generate an assignment expression that will fixup the recursion 
- * amongst the vals on the r.h.s. of a letrec.  The returned expressions 
- * include disorderly constructs such as expressions/statements 
- * to set closure environments and non-mutable fields. These are only ever 
- * generated by the backend code-generator when processing a "letrec"
- * construct.
- *
- * [self] is the top level value that is being fixed
- * [expr_to_fix] is the r.h.s. expression
- * [rvs] is the set of recursive vals being bound. 
- * [acc] accumulates the expression right-to-left. 
- *
- * Traversal of the r.h.s. term must happen back-to-front to get the
- * uniq's for the lambdas correct in the very rare case where the same lambda
- * somehow appears twice on the right.
- *------------------------------------------------------------------------- *)
-
-let rec iter_letrec_fixups g (selfv : Val option) rvs ((access : expr),set) expr_to_fix  = 
-  let expr_to_fix =  strip_expr expr_to_fix
-  match expr_to_fix with 
-  | TExpr_const _ -> ()
-  | TExpr_op(TOp_tuple,argtys,args,m) ->
-      args |> List.iteri (fun n -> 
-          iter_letrec_fixups g None rvs 
-            (mk_tuple_field_get(access,argtys,n,m), 
-            (fun e -> 
-              (* NICE: it would be better to do this check in the type checker *)
-              errorR(Error("Recursively defined values may not appear directly as part of the construction of a tuple value within a recursive binding.",m));
-              e)))
-
-  | TExpr_op(TOp_ucase (c),tinst,args,m) ->
-      args |> List.iteri (fun n -> 
-          iter_letrec_fixups g None rvs 
-            (mk_ucase_field_get_unproven(access,c,tinst,n,m), 
-             (fun e -> 
-               (* NICE: it would be better to do this check in the type checker *)
-               let tcref = c.TyconRef
-               errorR(Error("Recursive values may not appear directly as a construction of the type '"^tcref.MangledName^"' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead",m));
-               mk_ucase_field_set(access,c,tinst,n,e,m))))
-
-  | TExpr_op(TOp_recd (_,tcref),tinst,args,m) -> 
-      (instance_rfrefs_of_tcref tcref, args) ||> List.iter2 (fun fref arg -> 
-          let fspec = fref.RecdField
-          iter_letrec_fixups g None rvs 
-            (mk_recd_field_get_via_expra(access,fref,tinst,m), 
-             (fun e -> 
-               (* NICE: it would be better to do this check in the type checker *)
-               if not fspec.IsMutable && not (tcref_in_this_assembly g.compilingFslib tcref) then
-                 errorR(Error("Recursive values may not be directly assigned to the non-mutable field '"^fspec.rfield_id.idText^"' of the type '"^tcref.MangledName^"' within a recursive binding. Consider using a mutable field instead",m));
-               mk_recd_field_set g (access,fref,tinst,e,m))) arg )
-  | TExpr_val (_,_,m) 
-  | TExpr_lambda (_,_,_,_,m,_,_)  
-  | TExpr_obj (_,_,_,_,_,_,m,_)  
-  | TExpr_tchoose (_,_,m)  
-  | TExpr_tlambda (_,_,_,m,_,_)  -> 
-      rvs selfv access set expr_to_fix
-  | e -> ()
-
-
-
-
-(*--------------------------------------------------------------------------
-!* computations on constraints
- *------------------------------------------------------------------------*)
- 
-let JoinTyparStaticReq r1 r2 = 
-  match r1,r2 with
-  | NoStaticReq,r | r,NoStaticReq -> r 
-  | HeadTypeStaticReq,r | r,HeadTypeStaticReq -> r
-  
-
-
-(*-------------------------------------------------------------------------
-!* ExprFolder - fold steps
- *-------------------------------------------------------------------------*)
-
-type ExprFolder<'a> = {exprIntercept    : ('a -> expr -> 'a) -> 'a -> expr  -> 'a option;   (* intercept? *)
-                      (* hook. this bool is 'bound in dtree' *)
-                      valBindingSiteIntercept          : 'a -> bool * Val  -> 'a;                     
-                      (* hook.  these values are always bound to these expressions. bool is 'recursively' *)
-                      nonRecBindingsIntercept         : 'a -> Binding -> 'a;         
-                      recBindingsIntercept         : 'a -> Bindings -> 'a;         
-                      dtreeAcc         : 'a -> DecisionTree -> 'a;                     (* hook *)
-                      targetIntercept  : ('a -> expr -> 'a) -> 'a -> DecisionTreeTarget  -> 'a option; (* intercept? *)
-                      tmethodIntercept : ('a -> expr -> 'a) -> 'a -> ObjExprMethod -> 'a option; (* intercept? *)
-                     }
-
-let ExprFolder0 =
-  { exprIntercept    = (fun exprF z x -> None);
-    valBindingSiteIntercept          = (fun z b  -> z);
-    nonRecBindingsIntercept         = (fun z bs -> z);
-    recBindingsIntercept         = (fun z bs -> z);
-    dtreeAcc         = (fun z dt -> z);
-    targetIntercept  = (fun exprF z x -> None);
-    tmethodIntercept = (fun exprF z x -> None);
-  }
-
-
-(*-------------------------------------------------------------------------
-!* FoldExpr
- *-------------------------------------------------------------------------*)
-
-let mkFolders (folders : _ ExprFolder) =
-  (******
-   * Adapted from usage info folding.
-   * Collecting from exprs at moment.
-   * To collect ids etc some additional folding needed, over formals etc.
-   ******)
-  let {exprIntercept    = exprIntercept; 
-       valBindingSiteIntercept          = valBindingSiteIntercept;
-       nonRecBindingsIntercept         = nonRecBindingsIntercept;
-       recBindingsIntercept         = recBindingsIntercept;
-       dtreeAcc         = dtreeAcc;
-       targetIntercept  = targetIntercept;
-       tmethodIntercept = tmethodIntercept} = folders
-  let rec exprsF z xs = List.fold exprF z xs
-  and flatExprsF z xs = FlatList.fold exprF z xs
-  and exprF z x =
-    match exprIntercept exprF z x with (* fold this node, then recurse *)
-    | Some z -> z (* intercepted *)
-    | None ->     (* structurally recurse *)
-        match x with
-        | TExpr_const (c,m,ty)                                     -> z
-        | TExpr_val (v,isSuperInit,m)                               -> z
-        | TExpr_op (c,tyargs,args,m)                               -> exprsF z args
-        | TExpr_seq (x0,x1,dir,_,m)                                -> exprsF z [x0;x1]
-        | TExpr_lambda(lambda_id ,basevopt,argvs,body,m,rty,_)     -> exprF  z body
-        | TExpr_tlambda(lambda_id,argtyvs,body,m,rty,_)            -> exprF  z body
-        | TExpr_tchoose(_,body,m)                                  -> exprF  z body
-        | TExpr_app (f,fty,tys,argtys,m)                           -> 
-            let z = exprF z f
-            let z = exprsF z argtys
-            z
-        | TExpr_letrec (binds,body,m,_)                            -> 
-            let z = valBindsF false z binds
-            let z = exprF z body
-            z
-        | TExpr_let    (bind,body,m,_)                             -> 
-            let z = valBindF false z bind
-            let z = exprF z body
-            z
-        | TExpr_link rX                                            -> exprF z (!rX)
-        | TExpr_match (spBind,exprm,dtree,targets,m,ty,_)                 -> 
-            let z = dtreeF z dtree
-            let z = Array.fold_left targetF z targets
-            z
-        | TExpr_quote(e,{contents=Some(argTypes,argExprs,_)},m,_)  -> exprsF z argExprs
-        | TExpr_quote(e,{contents=None},m,_)                       -> z
-        | TExpr_obj (n,typ,basev,basecall,overrides,iimpls,m,_)    -> 
-            let z = exprF z basecall
-            let z = List.fold tmethodF z overrides
-            let z = List.fold (foldOn snd (List.fold tmethodF)) z iimpls
-            z
-        | TExpr_static_optimization (tcs,csx,x,m)                   -> exprsF z [csx;x]
-  and valBindF dtree z bind =
-    let z = nonRecBindingsIntercept z bind
-    bindF dtree z bind 
-  and valBindsF dtree z binds =
-    let z = recBindingsIntercept z binds
-    FlatList.fold (bindF dtree) z binds 
-
-  and bindF dtree z (bind:Binding) =
-    let z = valBindingSiteIntercept z (dtree,bind.Var)
-    exprF z bind.Expr
-
-  and dtreeF z dtree =
-    let z = dtreeAcc z dtree
-    match dtree with
-    | TDBind (bind,rest)            -> 
-        let z = valBindF true z bind
-        dtreeF z rest
-    | TDSuccess (args,n)            -> flatExprsF z args
-    | TDSwitch (test,dcases,dflt,r) -> 
-        let z = exprF z test
-        let z = List.fold dcaseF z dcases
-        let z = Option.fold dtreeF z dflt
-        z
-
-  and dcaseF z = function
-      TCase (test,dtree)   -> dtreeF z dtree (* not collecting from test *)
-
-  and targetF z x =
-    (match targetIntercept exprF z x with 
-         Some z -> z (* intercepted *)
-       | None ->     (* structurally recurse *)
-           let (TTarget (argvs,body,_)) = x
-           exprF z body)
-            
-  and tmethodF z x =
-    (match tmethodIntercept exprF z x with 
-         Some z -> z (* intercepted *)
-       | None ->     (* structurally recurse *)
-           let (TObjExprMethod(_,_,_,e,_)) = x
-           exprF z e)
-
-  and mexprF z x =
-      match x with 
-      | TMTyped(mtyp,def,m) -> mdefF z def
-  and mdefF z x = 
-      match x with
-      | TMDefRec(tycons,binds,mbinds,m) -> 
-          (* REVIEW: also iterate the abstract slot vspecs hidden in the _vslots field in the tycons *)
-          let z = valBindsF false z binds
-          let z = List.fold mbindF z mbinds
-          z
-      | TMDefLet(bind,m) -> valBindF false z bind
-      | TMDefDo(e,m) -> exprF z e
-      | TMDefs(defs) -> List.fold mdefF z defs 
-      | TMAbstract(x) -> mexprF z x
-  and mbindF z (TMBind(nm, def)) = mdefF z def
-
-  and implF z x = foldTImplFile mexprF z x
-  and implsF z (TAssembly(x)) = List.fold implF z x
-
- 
-  exprF, implF,implsF
-
-let FoldExpr     folders = let exprF,implF,implsF = mkFolders folders in exprF
-let FoldImplFile folders = let exprF,implF,implsF = mkFolders folders in implF
-
-    
-(*-------------------------------------------------------------------------
-!* ExprStats
- *-------------------------------------------------------------------------*)
-
-let ExprStats x =
-  let count = ref 0
-  let folders = {ExprFolder0 with exprIntercept = (fun exprF z x -> (count := !count + 1; None))}
-  let () = FoldExpr folders () x
-  string !count ^ " TExpr nodes"
-
-    
-(*-------------------------------------------------------------------------
-!* 
- *------------------------------------------------------------------------- *)
-
-let mk_string g m n = TExpr_const(TConst_string n,m,g.string_ty)
-let mk_int64 g m n = TExpr_const(TConst_int64 n,m,g.int64_ty)
-let mk_bool g m b = TExpr_const(TConst_bool b,m,g.bool_ty)
-let mk_byte g m b = TExpr_const(TConst_byte b,m,g.byte_ty)
-let mk_uint16 g m b = TExpr_const(TConst_uint16 b,m,g.uint16_ty)
-let mk_true g m = mk_bool g m true
-let mk_false g m = mk_bool g m false
-let mk_unit g m = TExpr_const(TConst_unit,m,g.unit_ty)
-let mk_int32 g m n =  TExpr_const(TConst_int32 n,m,g.int32_ty)
-let mk_int g m n =  mk_int32 g m (n)
-let mk_zero g m =  mk_int g m 0
-let mk_one g m =  mk_int g m 1
-let mk_two g m =  mk_int g m 2
-let mk_minus_one g  m =  mk_int g m (-1)
-
-let dest_int32 = function TExpr_const(TConst_int32 n,m,ty) -> Some n | _ -> None
-
-let is_fslib_IDelegateEvent_ty g ty     = is_stripped_tyapp_typ g ty && tcref_eq g g.fslib_IDelegateEvent_tcr (tcref_of_stripped_typ g ty)
-let dest_fslib_IDelegateEvent_ty g ty   = 
-  if is_fslib_IDelegateEvent_ty g ty then 
-    match tinst_of_stripped_typ g ty with 
-    | [ty1] -> ty1
-    | _ -> failwith "dest_fslib_IDelegateEvent_ty: internal error"
-  else failwith "dest_fslib_IDelegateEvent_ty: not an IDelegateEvent type"
-let mk_fslib_IEvent2_ty g ty1 ty2 = TType_app (g.fslib_IEvent2_tcr, [ty1;ty2])
-
-let mk_refcell_contents_rfref g  = mk_rfref g.refcell_tcr "contents"
-
-let typed_expr_for_val m (v:Val) = expr_for_val m v,v.Type
-
-(*-------------------------------------------------------------------------
- * Tuples...
- *------------------------------------------------------------------------- *)
- 
-let mk_tupled g m es tys = 
-    match es with 
-    | [] -> mk_unit g m 
-    | [e] -> e
-    | _ -> TExpr_op(TOp_tuple,tys,es,m)
-
-let mk_tupled_notypes g m args = mk_tupled g m args (List.map (type_of_expr g) args)
-
-let mk_tupled_vars g m vs = mk_tupled g m (List.map (expr_for_val m) vs) (types_of_vals vs)
-
-(*--------------------------------------------------------------------------
-!* Permutations
- *------------------------------------------------------------------------*)
-    
-let inverse_perm (sigma:int array) =
-  let n = Array.length sigma
-  let inv_sigma = Array.create n (-1)
-  for i = 0 to n-1 do
-    let sigma_i = sigma.[i]
-    (* assert( inv_sigma.[sigma_i] = -1 ); *)
-    inv_sigma.[sigma_i] <- i
-  done;
-  inv_sigma
-  
-let permute (sigma:int array) (data:'a array) = 
-  let n = Array.length sigma
-  let inv_sigma = inverse_perm sigma
-  Array.init n (fun i -> data.[inv_sigma.[i]])
-  
-
-(*--------------------------------------------------------------------------
-!* Permute expressions
- *------------------------------------------------------------------------*)
-    
-let rec existsR a b pred = if a<=b then pred a || existsR (a+1) b pred else false
-let mapi_acc_list f z xs =
-  let rec fmapi f i z = function
-    | []    -> z,[]
-    | x::xs -> let z,x  = f i z x
-               let z,xs = fmapi f (i+1) z xs
-               z,x::xs
- 
-  fmapi f 0 z xs
-
-/// Given expr = xi = [| x0; ... xN |]
-/// Given sigma a permutation to apply to the xi.
-/// Return (bindings',expr') such that:
-///   (a) xi are permutated under sigma, xi -> position sigma(i).
-///------
-/// Motivation:
-///   opt.ml    - put record field assignments in order under known effect information
-///   ilxgen.ml - put record field assignments in order if necessary (no optimisations)
-///               under unknown-effect information.
-let permuteExpr (sigma:int array) (expr:expr array) (typ:typ array) (names:string array) =
-    let inv_sigma = inverse_perm sigma
-    let liftPosition i =
-        (* In english, lift out xi if      
-             * LC2: xi goes to position that will be preceded by
-             *       (an expr with an effect that originally followed xi).
-             *)
-        (let i' = sigma.[i]
-         existsR 0 (i' - 1) (fun j' ->
-                                   let j = inv_sigma.[j']
-                                   j > i))
-   
-    let rewrite i rbinds xi =
-        if liftPosition i then
-            let tmpv,tmpe = mk_compgen_local (range_of_expr xi) names.[i] typ.[i]
-            let bind = mk_compgen_bind tmpv xi
-            bind :: rbinds,tmpe
-        else
-            rbinds,xi
- 
-    let xis = Array.to_list expr
-    let rbinds,xis = mapi_acc_list rewrite [] xis
-    let binds = List.rev rbinds
-    let expr  = permute sigma (Array.of_list xis)
-    binds,expr
-    
-let permuteExprList (sigma:int array) (expr:expr list) (typ:typ list)  (names:string list) =
-    let binds,expr = permuteExpr sigma (Array.of_list expr) (Array.of_list typ)  (Array.of_list names)
-    binds,Array.to_list expr
-  
-
-(*-------------------------------------------------------------------------
- * Build lazy expressions...
- *------------------------------------------------------------------------- *)
-
-let mk_seq spSeq m e1 e2 = TExpr_seq(e1,e2,NormalSeq,spSeq,m)
-let mk_compgen_seq m e1 e2 = mk_seq SuppressSequencePointOnExprOfSequential m e1 e2
-let rec mk_seqs spSeq g m es = 
-    match es with 
-    | [e] -> e 
-    | e::es -> mk_seq spSeq m e (mk_seqs spSeq g m es) 
-    | [] -> mk_unit g m
-
-/// Evaluate the expressions in the original order, but build a record with the results in field order 
-/// Note some fields may be static. If this were not the case we could just use 
-///     let sigma       = Array.map rfref_index ()  
-/// However the presence of static fields means rfref_index may index into a non-compact set of instance field indexes. 
-/// We still need to sort by index. 
-let mk_recd g (lnk,tcref,tinst,rfrefs,args,m) =  
-    (* Remove any abbreviations *)
-    let tcref,tinst = dest_stripped_tyapp_typ g (mk_tyapp_ty tcref tinst)
-    
-    let rfrefs_array = Array.of_list (List.mapi (fun i x -> (i,x)) rfrefs)
-    Array.sortInPlaceBy (snd >> rfref_index) rfrefs_array;
-    let sigma = Array.create (Array.length rfrefs_array) (-1)
-    Array.iteri (fun j (i,_) -> 
-        if sigma.[i] <> -1 then error(InternalError("bad permutation",m));
-        sigma.[i] <- j)  rfrefs_array;
-    
-    let argTyps     = List.map (fun rfref  -> actual_rtyp_of_rfref rfref tinst) rfrefs
-    let names       = rfrefs |> List.map (fun rfref -> rfref.FieldName)
-    let binds,args  = permuteExprList sigma args argTyps names
-    mk_lets_bind m binds (TExpr_op(TOp_recd(lnk,tcref),tinst,args,m))
-  
-let mk_ldarg0 m ty = mk_asm( [ ldarg_0 ],[],[],[ty],m) 
-
-let mk_refcell     g m ty e = mk_recd g (RecdExpr,g.refcell_tcr,[ty],[mk_refcell_contents_rfref g],[e],m)
-let mk_refcell_get g m ty e = mk_recd_field_get g (e,mk_refcell_contents_rfref g,[ty],[],m)
-let mk_refcell_set g m ty e1 e2 = mk_recd_field_set g (e1,mk_refcell_contents_rfref g,[ty],e2,m)
-
-(*-------------------------------------------------------------------------
- * List builders
- *------------------------------------------------------------------------- *)
- 
-let mk_nil g m ty = mk_ucase (g.nil_ucref,[ty],[],m)
-let mk_cons g ty h t = mk_ucase (g.cons_ucref,[ty],[h;t],union_ranges (range_of_expr h) (range_of_expr t))
-
-let mk_compgen_local_and_invisible_bind g nm m e = 
-    let locv,loce = mk_compgen_local m nm (type_of_expr g e)
-    locv,loce,mk_invisible_bind locv e 
-
-(*----------------------------------------------------------------------------
- * Make some fragments of code
- *--------------------------------------------------------------------------*)
-
-let box = IL.I_box (IL.mk_tyvar_ty 0us)
-let isinst = IL.I_isinst (IL.mk_tyvar_ty 0us)
-let unbox = IL.I_unbox_any (IL.mk_tyvar_ty 0us)
-let mk_unbox ty e m = mk_asm ([ unbox ], [ty],[e], [ ty ], m)
-let mk_isinst ty e m = mk_asm ([ isinst ], [ty],[e], [ ty ], m)
-
-let mspec_Object_GetHashCode     ilg = IL.mk_nongeneric_instance_mspec_in_nongeneric_boxed_tref(ilg.tref_Object,"GetHashCode",[],ilg.typ_int32)
-let mspec_Type_GetTypeFromHandle ilg = IL.mk_static_nongeneric_mspec_in_nongeneric_boxed_tref(ilg.tref_Type,"GetTypeFromHandle",[ilg.typ_RuntimeTypeHandle],ilg.typ_Type)
-let fspec_Missing_Value  ilg = IL.mk_fspec_in_nongeneric_boxed_tref(ilg.tref_Missing,"Value",ilg.typ_Missing)
-
-
-let typed_expr_for_val_info m (Intrinsic(mvr,nm,ty) as i) =
-  let e = vref_for_val_info i
-  expr_for_vref m e,ty
-
-let mk_call_get_generic_comparer g m = mk_appl g (typed_expr_for_val_info m g.get_generic_comparer_info,       [], [ mk_unit g m ],  m)
-let mk_call_get_generic_equality_comparer g m = mk_appl g (typed_expr_for_val_info m g.get_generic_equality_comparer_info,       [], [ mk_unit g m ],  m)
-let mk_call_unbox                g m ty e1    = mk_appl g (typed_expr_for_val_info m g.unbox_info,       [[ty]], [ e1 ],  m)
-let mk_call_unbox_fast           g m ty e1    = mk_appl g (typed_expr_for_val_info m g.unbox_fast_info,  [[ty]], [ e1 ],  m)
-let mk_call_istype               g m ty e1    = mk_appl g (typed_expr_for_val_info m g.istype_info,      [[ty]], [ e1 ],  m)
-let mk_call_istype_fast          g m ty e1    = mk_appl g (typed_expr_for_val_info m g.istype_fast_info, [[ty]], [ e1 ],  m)
-let mk_call_typeof               g m ty       = mk_appl g (typed_expr_for_val_info m g.typeof_info,      [[ty]], [ ],  m)
-
-let mk_call_dispose               g m ty e1    = mk_appl g (typed_expr_for_val_info m g.dispose_info,       [[ty]], [ e1 ],  m)
-let mk_call_seq                   g m ty e1    = mk_appl g (typed_expr_for_val_info m g.seq_info,           [[ty]], [ e1 ],  m)
-let mk_call_create_instance       g m ty       = mk_appl g (typed_expr_for_val_info m g.create_instance_info, [[ty]], [  (mk_unit g m) ],  m)
-
-let mk_call_generic_comparison_outer       g m ty e1 e2      = mk_appl g (typed_expr_for_val_info m g.generic_comparison_outer_info,       [[ty]], [  e1;e2 ],  m)
-let mk_call_generic_comparison_withc_outer g m ty comp e1 e2 = mk_appl g (typed_expr_for_val_info m g.generic_comparison_withc_outer_info, [[ty]], [  comp;e1;e2 ],  m)
-let mk_call_generic_equality_outer        g m ty e1 e2      = mk_appl g (typed_expr_for_val_info m g.generic_equality_outer_info,        [[ty]], [  e1;e2 ],  m)
-let mk_call_generic_equality_withc_outer  g m ty comp e1 e2 = mk_appl g (typed_expr_for_val_info m g.generic_equality_withc_outer_info,  [[ty]], [comp;e1;e2], m)
-//let mk_call_generic_hash_outer          g m ty e1         = mk_appl g (typed_expr_for_val_info m g.generic_hash_outer_info,          [[ty]], [e1], m)
-let mk_call_generic_hash_withc_outer    g m ty comp e1    = mk_appl g (typed_expr_for_val_info m g.generic_hash_withc_outer_info,    [[ty]], [comp;e1], m)
-
-let mk_call_array_get             g m ty e1 e2 = mk_appl g (typed_expr_for_val_info m g.array_get_info, [[ty]], [ e1 ; e2 ],  m)
-let mk_call_new_decimal g m (e1,e2,e3,e4,e5)       = mk_appl g (typed_expr_for_val_info m g.new_decimal_info, [], [ e1;e2;e3;e4;e5 ],  m)
-
-let mk_call_string_compare g m e1 e2 = mk_call_generic_comparison_outer g m g.string_ty e1 e2 
-
-let mk_call_new_format                g m aty bty cty dty ety e1    = mk_appl g (typed_expr_for_val_info m g.new_format_info, [[aty;bty;cty;dty;ety]], [ e1 ],  m)
-let mk_call_raise g m aty e1    = mk_appl g (typed_expr_for_val_info m g.raise_info, [[aty]], [ e1 ],  m)
-
-let TryEliminateDesugaredConstants g m c = 
-    match c with 
-
-    | TConst_decimal d -> 
-        match System.Decimal.GetBits(d) with 
-        | [| lo;med;hi; signExp |] -> 
-            let scale = (min (((signExp &&& 0xFF0000) >>> 16) &&& 0xFF) 28) |> byte
-            let isNegative = (signExp &&& 0x80000000) <> 0
-        
-            Some(mk_call_new_decimal g m (mk_int g m lo,mk_int g m med,mk_int g m hi,mk_bool g m isNegative,mk_byte g m scale) )
-        | _ -> failwith "unreachable"
-        
-    | _ -> 
-        None
-
-let mk_seq_ty g ty = mk_tyapp_ty g.seq_tcr [ty] 
-let mk_IEnumerator_ty g ty = mk_tyapp_ty g.tcref_System_Collections_Generic_IEnumerator [ty] 
-
-let mk_call_seq_map_concat g m alphaTy betaTy arg1 arg2 = 
-    let enumty2 = try range_of_fun_typ g (type_of_expr g arg1) with _ -> (* defensive programming *) (mk_seq_ty g betaTy)
-    mk_appl g (typed_expr_for_val_info m g.seq_map_concat_info, [[alphaTy;enumty2;betaTy]], [ arg1; arg2 ],  m) 
-                  
-let mk_call_seq_using g m resourceTy elemTy arg1 arg2 = 
-    (* We're intantiating val using : 'a -> ('a -> 'sb) -> seq<'b> when 'sb :> seq<'b> and 'a :> IDisposable *)
-    (* We set 'sb -> range(typeof(arg2)) *)
-    let enumty = try range_of_fun_typ g (type_of_expr g arg2) with _ -> (* defensive programming *) (mk_seq_ty g elemTy)
-    mk_appl g (typed_expr_for_val_info m g.seq_using_info, [[resourceTy;enumty;elemTy]], [ arg1; arg2 ],  m) 
-                  
-let mk_call_seq_delay g m elemTy arg1 = 
-    mk_appl g (typed_expr_for_val_info m g.seq_delay_info, [[elemTy]], [ arg1 ],  m) 
-                  
-let mk_call_seq_append g m elemTy arg1 arg2 = 
-    mk_appl g (typed_expr_for_val_info m g.seq_append_info, [[elemTy]], [ arg1; arg2 ],  m) 
-
-let mk_call_seq_generated g m elemTy arg1 arg2 = 
-    mk_appl g (typed_expr_for_val_info m g.seq_generated_info, [[elemTy]], [ arg1; arg2 ],  m) 
-                       
-let mk_call_seq_finally g m elemTy arg1 arg2 = 
-    mk_appl g (typed_expr_for_val_info m g.seq_finally_info, [[elemTy]], [ arg1; arg2 ],  m) 
-                       
-let mk_call_seq_of_functions g m ty1 ty2 arg1 arg2 arg3 = 
-    mk_appl g (typed_expr_for_val_info m g.seq_of_functions_info, [[ty1;ty2]], [ arg1; arg2; arg3  ],  m) 
-                  
-let mk_call_seq_to_array g m elemTy arg1 =  
-    mk_appl g (typed_expr_for_val_info m g.seq_to_array_info, [[elemTy]], [ arg1 ],  m) 
-                  
-let mk_call_seq_to_list g m elemTy arg1 = 
-    mk_appl g (typed_expr_for_val_info m g.seq_to_list_info, [[elemTy]], [ arg1 ],  m) 
-                  
-let mk_call_seq_map g m inpElemTy genElemTy arg1 arg2 = 
-    mk_appl g (typed_expr_for_val_info m g.seq_map_info, [[inpElemTy;genElemTy]], [ arg1; arg2 ],  m) 
-                  
-let mk_call_seq_singleton g m ty1 arg1 = 
-    mk_appl g (typed_expr_for_val_info m g.seq_singleton_info, [[ty1]], [ arg1 ],  m) 
-                  
-let mk_call_seq_empty g m ty1 = 
-    mk_appl g (typed_expr_for_val_info m g.seq_empty_info, [[ty1]], [ ],  m) 
-                 
-let mk_call_unpickle_quotation g m e1 e2 e3 e4 = 
-    let args = [ e1; e2; e3; e4 ]
-    mk_appl g (typed_expr_for_val_info m g.unpickle_quoted_info, [], [ mk_tupled_notypes g m args ],  m)
-
-let mk_call_cast_quotation g m ty e1 = 
-    mk_appl g (typed_expr_for_val_info m g.cast_quotation_info, [[ty]], [ e1 ],  m)
-
-let mk_call_lift_value g m ty e1 = 
-    mk_appl g (typed_expr_for_val_info m g.lift_value_info , [[ty]], [ e1],  m)
-
-let mk_lazy_delayed g m ty f = mk_appl g (typed_expr_for_val_info m g.lazy_create_info, [[ty]], [ f ],  m) 
-let mk_lazy_force g m ty e = mk_appl g (typed_expr_for_val_info m g.lazy_force_info, [[ty]], [ e; mk_unit g m ],  m) 
-
-
-let query_asm e = 
-    match strip_expr e with 
-    |  TExpr_op(TOp_asm (instrs,_),[],args,_) ->Some(instrs,args)
-    | _ -> None 
-
-let dest_incr e = 
-    match query_asm e with 
-    | Some([ IL.I_arith IL.AI_add ],[TExpr_const(TConst_int32 1,_,_) ;arg2]) -> Some(arg2)
-    | _ -> None 
-
-// Note: We plan to get rid of all IL generation in the typechecker and pattern match
-// compiler, or else train the quotation generator to understand the generated IL. 
-// Hence each of the following are marked with places where they are generated.
-
-// Generated by the optimizer and the encoding of 'for' loops     
-let mk_decr g m e = mk_asm([ IL.I_arith IL.AI_sub  ],[],[e; mk_one g m],[g.int_ty],m)
-let mk_incr g m e = mk_asm([ IL.I_arith IL.AI_add  ],[],[mk_one g m; e],[g.int_ty],m)
-
-// Generated by the pattern match compiler and the optimizer for
-//    1. array patterns
-//    2. optimizations associated with getting 'for' loops into the shape expected by the JIT.
-// 
-// NOTE: The conv.i4 assumes that int_ty is int32. Note: ldlen returns native UNSIGNED int 
-//
-// REVIEW: quotation processing doesn't yet understand this, giving a problem with quoting
-// constructors of array pattern matching
-let mk_ldlen g m arre = mk_asm ([ IL.I_ldlen; IL.I_arith (IL.AI_conv IL.DT_I4) ],[],[ arre ], [ g.int_ty ], m)
-
-// This is generated in equality/compare/hash augmentations and in the pattern match compiler.
-// It is understood by the quotation processor and turned into "Equality" nodes.
-let mk_ceq g m e1 e2 = mk_asm ([ IL.I_arith IL.AI_ceq  ],[],  [e1; e2],[g.bool_ty],m)
-
-// This is generated in the initialization of the "ctorv" field in the typechecker's compilation of
-// an implicit class construction.
-let mk_null m ty = TExpr_const(TConst_zero, m,ty)
-
-(*----------------------------------------------------------------------------
- * rethrow
- *--------------------------------------------------------------------------*)
-
-(* throw, rethrow *)
-let mk_throw m ty e = mk_asm ([ IL.I_throw ],[], [e],[ty],m)
-let dest_throw = function
-    | TExpr_op(TOp_asm([IL.I_throw],[ty2]),[],[e],m) -> Some (m,ty2,e)
-    | _ -> None
-let is_throw x = isSome (dest_throw x)
-
-// rethrow - parsed as library call - internally represented as op form.
-let mk_rethrow_library_call g ty m = let ve,vt = typed_expr_for_val_info m g.rethrow_info in TExpr_app(ve,vt,[ty],[mk_unit g m],m)
-let mk_rethrow m returnTy = TExpr_op(TOp_rethrow,[returnTy],[],m) (* could suppress unitArg *)
-
-(*----------------------------------------------------------------------------
- * CompilationMappingAttribute, SourceConstructFlags
- *--------------------------------------------------------------------------*)
-
-let tref_CompilationMappingAttr() = mk_tref(Msilxlib.scoref (), lib_MFCore_name ^ ".CompilationMappingAttribute")
-let tref_SourceConstructFlags ()=  mk_tref(Msilxlib.scoref (), lib_MFCore_name ^ ".SourceConstructFlags")
-let IsCompilationMappingAttr cattr = is_il_attrib (tref_CompilationMappingAttr ()) cattr
-let mk_CompilationMappingAttrPrim g k nums = 
-    mk_custom_attribute g.ilg (tref_CompilationMappingAttr(), 
-                               ((mk_nongeneric_value_typ (tref_SourceConstructFlags())) :: (nums |> List.map (fun _ -> g.ilg.typ_Int32))),
-                               ((k :: nums) |> List.map (fun n -> CustomElem_int32(n))),
-                               [])
-let mk_CompilationMappingAttr g kind = mk_CompilationMappingAttrPrim g kind []
-let mk_CompilationMappingAttrWithSeqNum g kind seqNum = mk_CompilationMappingAttrPrim g kind [seqNum]
-let mk_CompilationMappingAttrWithVariantNumAndSeqNum g kind varNum seqNum = mk_CompilationMappingAttrPrim g kind [varNum;seqNum]
-
-(*----------------------------------------------------------------------------
- * FSharpInterfaceDataVersionAttribute
- *--------------------------------------------------------------------------*)
-
-let tref_SignatureDataVersionAttr () = 
-    mk_tref(Msilxlib.scoref (), lib_MFCore_name ^ ".FSharpInterfaceDataVersionAttribute")
-
-let mk_SignatureDataVersionAttr g ((v1,v2,v3,v4) : ILVersionInfo)  = 
-    mk_custom_attribute g.ilg
-        (tref_SignatureDataVersionAttr(), 
-         [g.ilg.typ_Int32;g.ilg.typ_Int32;g.ilg.typ_Int32],
-         [CustomElem_int32 (int32 v1);
-          CustomElem_int32 (int32 v2) ; 
-          CustomElem_int32 (int32 v3)],[])
-
-let tref_AutoOpenAttr () = 
-    mk_tref(Msilxlib.scoref (), lib_MFCore_name ^ ".AutoOpenAttribute")
-
-let IsSignatureDataVersionAttr cattr = is_il_attrib (tref_SignatureDataVersionAttr ()) cattr
-let TryFindAutoOpenAttr cattr = 
-    if is_il_attrib (tref_AutoOpenAttr ()) cattr then 
-        (* ok to use ecmaILGlobals here since we're querying metadata, not making it *)
-        match decode_il_attrib_data IL.ecmaILGlobals cattr with 
-        |  [CustomElem_string s],_ -> s
-        |  [],_ -> None
-        | _ -> 
-            warning(Failure("Unexpected decode of AutoOpenAttribute")); 
-            None
-    else
-        None
-        
-let tref_InternalsVisibleToAttr () = 
-    mk_tref (ecma_mscorlib_scoref,"System.Runtime.CompilerServices.InternalsVisibleToAttribute")    
-
-let TryFindInternalsVisibleToAttr cattr = 
-    if is_il_attrib (tref_InternalsVisibleToAttr ()) cattr then 
-        (* ok to use ecmaILGlobals here since we're querying metadata, not making it *)
-        match decode_il_attrib_data IL.ecmaILGlobals cattr with 
-        |  [CustomElem_string s],_ -> s
-        |  [],_ -> None
-        | _ -> 
-            warning(Failure("Unexpected decode of InternalsVisibleToAttribute")); 
-            None
-    else
-        None
-
-let IsMatchingSignatureDataVersionAttr  ((v1,v2,v3,v4) : ILVersionInfo)  cattr = 
-    IsSignatureDataVersionAttr cattr &&
-    (* ok to use ecmaILGlobals here since we're querying metadata, not making it *)
-    match decode_il_attrib_data IL.ecmaILGlobals cattr with 
-    |  [CustomElem_int32 u1; CustomElem_int32 u2;CustomElem_int32 u3 ],_ -> 
-          // add this specific case to reject the CTP format, which also shares prefix 1.9.6
-          let fullName = cattr.customMethod.EnclosingType.TypeSpec.FullName
-          if fullName.Contains("Version=1.9.6.3,") || fullName.Contains("Version=1.9.6.2,") || fullName.Contains("Version=1.9.6.0,") then false
-          else (v1 = uint16 u1) && (v2 = uint16 u2) && (v3 = uint16 u3)
-    | _ -> warning(Failure("Unexpected decode of InterfaceDataVersionAttribute")); false
-
-let mk_CompilerGeneratedAttr g n = mk_custom_attribute g.ilg (tref_CompilationMappingAttr(), [mk_nongeneric_value_typ (tref_SourceConstructFlags())],[CustomElem_int32(n)],[])
-
-(* match inp with :? ty as v -> e2[v] | _ -> e3 *)
-let mk_isinst_cond g m tgty vinpe v e2 e3 = 
-    // No sequence point for this simple expression form
-    let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m)
-    let tg2 = TDSuccess(FlatList.one (mk_call_unbox g m tgty vinpe), mbuilder.AddTarget(TTarget(FlatList.one v,e2,SuppressSequencePointAtTarget)))
-    let tg3 = mbuilder.AddResultTarget(e3,SuppressSequencePointAtTarget)
-    let dtree = TDSwitch(vinpe,[TCase(TTest_isinst(type_of_expr g vinpe,tgty),tg2)],Some tg3,m)
-    mbuilder.Close(dtree,m,type_of_expr g e2)
-
-
-(*--------------------------------------------------------------------------
-!* tupled lambda --> method/function with a given topValInfo specification.
- *
- * AdjustArityOfLambdaBody: "(vs,body)" represents a lambda "fun (vs) ->  body".  The
- * aim is to produce a "static method" represented by a pair
- * "(mvs, body)" where mvs has the List.length "arity".
- *------------------------------------------------------------------------ *)
-
-
-let untupled_to_tupled vs =
-    let untupledTys = types_of_vals vs
-    let m = (List.hd vs).Range
-    let tupledv,tuplede = mk_compgen_local m "tupledArg" (mk_tuple_ty untupledTys)
-    let untupling_es =  List.mapi (fun i ty ->  mk_tuple_field_get(tuplede,untupledTys,i,m)) untupledTys
-    tupledv, mk_invisible_lets m vs untupling_es 
-    
-// The required tupled-arity (arity) can either be 1 
-// or N, and likewise for the tuple-arity of the input lambda, i.e. either 1 or N 
-// where the N's will be identical. 
-let AdjustArityOfLambdaBody g arity (vs:Val list) body = 
-    let nvs = vs.Length
-    if not (nvs = arity || nvs = 1 || arity = 1) then failwith ("lengths don't add up");
-    if arity = 0 then 
-        vs,body
-    elif nvs = arity then 
-        vs,body
-    elif nvs = 1 then
-        let v = vs.Head
-        let untupledTys = dest_tuple_typ g v.Type
-        if  (untupledTys.Length <> arity) then failwith "length untupledTys <> arity";
-        let dummyvs,dummyes = 
-            untupledTys 
-            |> List.mapi (fun i ty -> mk_compgen_local v.Range (v.MangledName ^"_"^string i) ty) 
-            |> List.unzip 
-        let body = mk_invisible_let v.Range v (mk_tupled g v.Range dummyes untupledTys) body
-        dummyvs,body
-    else 
-        let tupledv, untupler =  untupled_to_tupled vs
-        [tupledv],untupler body
-
-let multi_lambda_to_tupled_lambda vs body = 
-    match vs with 
-    | [] -> failwith "multi_lambda_to_tupled_lambda: expected some argments"
-    | [v] -> v,body 
-    | vs -> 
-        let tupledv, untupler =  untupled_to_tupled vs
-        tupledv, untupler body 
-      
-
-//--------------------------------------------------------------------------
-// Beta reduction via let-bindings. Reduce immediate apps. of lambdas to let bindings. 
-// Includes binding the immediate application of generic
-// functions. Input type is the type of the function.  Makes use of the invariant
-// that any two expressions have distinct local variables (because we explicitly copy
-// expressions).
-//------------------------------------------------------------------------ 
-
-let rec MakeApplicationAndBetaReduceAux g (f,fty,tyargsl,argsl,m) =
-  (* let verbose = true in *)
-  match f with 
-  | TExpr_let(bind,body,mlet,_) ->
-      // Lift bindings out, i.e. (let x = e in f) y --> let x = e in f y 
-      // This increases the scope of 'x', which I don't like as it mucks with debugging 
-      // scopes of variables, but this is an important optimization, especially when the '|>' 
-      // notation is used a lot. 
-      (* REVIEW: only apply this when beta-reduction really occurs *)
-      if verbose then dprintf "--- MakeApplicationAndBetaReduceAux, reducing under let\n";
-      mk_let_bind mlet bind (MakeApplicationAndBetaReduceAux g (body,fty,tyargsl,argsl,m))
-  | _ -> 
-  match tyargsl,argsl with 
-  | [] :: rest,_ -> 
-     MakeApplicationAndBetaReduceAux g (f,fty,rest,argsl,m)
-
-  | tyargs :: rest,_ -> 
-      (* Bind type parameters by immediate substitution *)
-      match f with 
-      | TExpr_tlambda(_, tyvs,body,_,bodyty,_) when tyvs.Length = List.length tyargs -> 
-          let tpenv = bind_typars tyvs tyargs empty_tpenv
-          let body = RemarkExpr m (inst_expr g tpenv body)
-          let bodyty' = InstType tpenv bodyty
-          MakeApplicationAndBetaReduceAux g (body,bodyty', rest,argsl,m) 
-
-      | _ -> 
-          let f,fty = mk_appl_aux g f fty [tyargs] [] m
-          MakeApplicationAndBetaReduceAux g (f,fty, rest,argsl,m)
-
-  | [], arg :: rest ->
-      (* Bind term parameters by "let" explicit substitutions *)
-      match f with 
-      | TExpr_lambda(_,None,argvs,body,_,bodyty,_) -> 
-          let argv,body = multi_lambda_to_tupled_lambda argvs body
-          mk_compgen_let m argv arg (MakeApplicationAndBetaReduceAux g (body, bodyty, [],rest,m))
-      | _ -> 
-          let f,fty = mk_expr_appl_aux g f fty [arg] m
-          MakeApplicationAndBetaReduceAux g (f,fty, [], rest,m)
-
-  | [],[] -> 
-      f
-      
-let MakeApplicationAndBetaReduce g (f,fty,tyargsl,argl,m) = 
-  MakeApplicationAndBetaReduceAux g (f,fty,tyargsl,argl,m)
-
-//---------------------------------------------------------------------------
-// Adjust for expected usage
-// Convert a use of a value to saturate to the given arity.
-//--------------------------------------------------------------------------- 
-
-let MakeArgsForTopArgs g m argtysl tpenv =
-    argtysl |> List.mapi (fun i argtys -> 
-        let n = List.length argtys
-        argtys |> List.mapi (fun j (argty,TopArgInfo(_,nm)) -> 
-            let ty = InstType tpenv argty
-            let nm = 
-               match nm with 
-               | None -> CompilerGeneratedName ("arg"^ string i^ string j)
-               | Some id -> id.idText
-            fst (mk_compgen_local m nm ty)))
-
-let AdjustValForExpectedArity g m (vref:ValRef) flags topValInfo =
-
-    let tps,argtysl,rty,_ = GetTopValTypeInFSharpForm g topValInfo vref.Type m
-    let tps' = CopyTypars tps
-    let tyargs' = List.map mk_typar_ty tps'
-    let tpenv = bind_typars tps tyargs' empty_tpenv
-    let rty' = InstType tpenv rty
-    let vsl = MakeArgsForTopArgs g m argtysl tpenv
-    let call = MakeApplicationAndBetaReduce g (TExpr_val(vref,flags,m),vref.Type,[tyargs'],(List.map (mk_tupled_vars g m) vsl),m)
-    let tauexpr,tauty = 
-        List.foldBack 
-            (fun vs (e,ty) -> mk_multi_lambda m vs (e, ty), (mk_tupled_vars_ty g vs --> ty))
-            vsl
-            (call, rty')
-    // Build a type-lambda expression for the toplevel value if needed... 
-    mk_tlambda m tps' (tauexpr,tauty),tps' +-> tauty
-
-
-//---------------------------------------------------------------------------
-// 
-
-
-let IsSubsumptionExpr g expr =
-    match expr with 
-    | TExpr_op(TOp_coerce,[inputTy;actualTy],[_],m) ->
-        is_fun_typ g actualTy && is_fun_typ g inputTy   
-    | _ -> 
-        false
-
-let strip_tupled_fun_typ g ty = 
-    let argTys,retTy = strip_fun_typ g ty
-    let curriedArgTys = argTys |> List.map (try_dest_tuple_typ g)
-    curriedArgTys, retTy
-
-let (|ExprValWithPossibleTypeInst|_|) expr =
-    match expr with 
-    | TExpr_app(TExpr_val(vref,flags,m),fty,tyargs,[],_)  ->
-        Some(vref,flags,tyargs,m)
-    | TExpr_val(vref,flags,m) ->
-        Some(vref,flags,[],m)
-    | _ -> 
-        None
-
-let mk_coerce_if_needed g tgtTy srcTy expr =
-    //if type_definitely_subsumes_type_no_coercion 0 g cenv.amap m tgtTy srcTy then 
-    if type_equiv g tgtTy srcTy then 
-        expr
-    else 
-        mk_coerce(expr,tgtTy,range_of_expr expr,srcTy)
-
-let mk_compgen_let_in m nm ty e f = 
-    let v,ve = mk_compgen_local m nm ty
-    mk_compgen_let m v e (f (v,ve))
-
-/// Take a node representing a coercion from one function type to another, e.g.
-///    A -> A * A -> int 
-/// to 
-///    B -> B * A -> int 
-/// and return an expression of the correct type that doesn't use a coercion type. For example
-/// return   
-///    (fun b1 b2 -> E (b1 :> A) (b2 :> A))
-///
-///    - Use good names for the closure arguments if available
-///    - Create lambda variables if needed, or use the supplied arguments if available.
-///
-/// Return the new expression and any unused suffix of supplied arguments
-///
-/// If E is a value with TopInfo then use the arity to help create a better closure.
-/// In particular we can create a closure like this:
-///    (fun b1 b2 -> E (b1 :> A) (b2 :> A))
-/// rather than 
-///    (fun b1 -> let clo = E (b1 :> A) in (fun b2 -> clo (b2 :> A)))
-/// The latter closures are needed to carefully preserve side effect order
-///
-/// Note that the results of this translation are visible to quotations
-
-let AdjustPossibleSubsumptionExpr g (expr:expr) (suppliedArgs: expr list) : (expr* expr list) option =
-
-    match expr with 
-    | TExpr_op(TOp_coerce,[inputTy;actualTy],[exprWithActualTy],m) when 
-        is_fun_typ g actualTy && is_fun_typ g inputTy  ->
-        
-        if type_equiv g actualTy inputTy then 
-            Some(exprWithActualTy, suppliedArgs)
-        else
-            
-            let curriedActualArgTys,retTy = strip_tupled_fun_typ g actualTy
-
-            let curriedInputTys,_ = strip_fun_typ g inputTy
-
-            assert (curriedActualArgTys.Length = curriedInputTys.Length)
-
-            let argTys = (curriedInputTys,curriedActualArgTys) ||> List.mapi2 (fun i x y -> (i,x,y))
-
-
-            // Use the nice names for a function of known arity and name. Note that 'nice' here also 
-            // carries a semantic meaning. For a function with top-info,
-            //   let f (x:A) (y:A) (z:A) = ...
-            // we know there are no side effects on the application of 'f' to 1,2 args. This greatly simplifies
-            // the closure built for 
-            //   f b1 b2 
-            // and indeed for 
-            //   f b1 b2 b3
-            // we don't build any closure at all, and just return
-            //   f (b1 :> A) (b2 :> A) (b3 :> A)
-            
-            let curriedNiceNames = 
-                match strip_expr exprWithActualTy with 
-                | ExprValWithPossibleTypeInst(vref,flags,tyargs,m) when vref.TopValInfo.IsSome -> 
-
-                    let tps,argtysl,rty,_ = GetTopValTypeInFSharpForm g vref.TopValInfo.Value vref.Type (range_of_expr expr)
-                    argtysl |> List.mapi (fun i argtys -> 
-                        let n = List.length argtys
-                        argtys |> List.mapi (fun j (argty,TopArgInfo(_,nm)) -> 
-                             match nm with 
-                             | None -> CompilerGeneratedName ("arg" ^ string i ^string j)
-                             | Some id -> id.idText))
-                | _ -> 
-                    []
-
-            assert (curriedActualArgTys.Length >= curriedNiceNames.Length)
-
-            let argTysWithNiceNames,argTysWithoutNiceNames =
-                List.chop curriedNiceNames.Length argTys
-
-            /// Only consume 'suppliedArgs' up to at most the number of nice arguments
-            let suppliedArgs, droppedSuppliedArgs = 
-                List.chop (min suppliedArgs.Length curriedNiceNames.Length) suppliedArgs
-
-            /// THe relevant range for any expressions and applications includes the arguments 
-            let appm = List.fold (fun m e -> union_ranges m (range_of_expr e)) m suppliedArgs
-
-            // See if we have 'enough' suppliedArgs. If not, we have to build some lambdas, and,
-            // we have to 'let' bind all arguments that we consume, e.g.
-            //   Seq.take (effect;4) : int list -> int list
-            // is a classic case. Here we generate
-            //   let tmp = (effect;4) in 
-            //   (fun v -> Seq.take tmp (v :> seq<_>))
-            let buildingLambdas = (suppliedArgs.Length <> curriedNiceNames.Length)
-            //printfn "buildingLambdas = %A" buildingLambdas
-            //printfn "suppliedArgs.Length = %d" suppliedArgs.Length 
-
-            /// Given a tuple of argument variables that has a tuple type that satisfies the input argument types,
-            /// coerce it to a tuple that satisfies the matching coerced argument type(s).
-            let CoerceDetupled (argTys: typ list) (detupledArgs:expr list) (actualTys: typ list) =
-                assert (actualTys.Length = argTys.Length)
-                assert (actualTys.Length = detupledArgs.Length)
-                // Inject the coercions into the user-supplied explicit tuple
-                let argm = List.reduce_left union_ranges (List.map range_of_expr detupledArgs) 
-                mk_tupled g argm (List.map3 (mk_coerce_if_needed g) actualTys argTys detupledArgs) actualTys
-
-            /// Given an argument variable of tuple type that has been evaluated and stored in the 
-            /// given variable, where the tuple type that satisfies the input argument types,
-            /// coerce it to a tuple that satisfies the matching coerced argument type(s).
-            let CoerceBoundTuple tupleVar argTys (actualTys : typ list) =
-                assert (actualTys.Length > 1)
-            
-                mk_tupled g appm 
-                   ((actualTys,argTys) ||> List.mapi2 (fun i actualTy dummyTy ->  
-                       let argExprElement = mk_tuple_field_get(tupleVar,argTys,i,appm)
-                       mk_coerce_if_needed  g actualTy dummyTy argExprElement))
-                   actualTys
-
-            /// Given an argument that has a tuple type that satisfies the input argument types,
-            /// coerce it to a tuple that satisfies the matching coerced argument type. Try to detuple the argument if possible.
-            let CoerceTupled niceNames (argExpr:expr) (actualTys:typ list) =
-                let argExprTy = (type_of_expr g argExpr)
-
-                let argTys  = 
-                    match actualTys with 
-                    | [_] -> 
-                        [type_of_expr g argExpr]
-                    | _ -> 
-                        try_dest_tuple_typ g argExprTy 
-                
-                assert (actualTys.Length = argTys.Length)
-                let nm = match niceNames with [nm] -> nm | _ -> "arg"
-                if buildingLambdas then 
-                    // Evaluate the user-supplied tuple-valued argument expression, inject the coercions and build an explicit tuple
-                    // Assign the argument to make sure it is only run once
-                    //     f ~~> : B -> int
-                    //     f ~~> : (B * B) -> int
-                    //
-                    //  for 
-                    //     let f a = 1
-                    //     let f (a,a) = 1
-                    let v,ve = mk_compgen_local appm nm argExprTy
-                    let binderBuilder = (fun tm -> mk_compgen_let appm v argExpr tm)
-                    let expr = 
-                        match actualTys,argTys with
-                        | [actualTy],[argTy] -> mk_coerce_if_needed  g actualTy argTy ve 
-                        | _ -> CoerceBoundTuple ve argTys actualTys
-
-                    binderBuilder,expr
-                else                
-                    if type_equiv g (mk_tupled_ty g actualTys) argExprTy then 
-                        (fun tm -> tm), argExpr
-                    else
-                    
-                        let detupledArgs,argTys  = 
-                            match actualTys with 
-                            | [actualType] -> 
-                                [argExpr],[type_of_expr g argExpr]
-                            | _ -> 
-                                try_dest_tuple argExpr,try_dest_tuple_typ g argExprTy 
-
-                        // OK, the tuples match, or there is no de-tupling,
-                        //     f x
-                        //     f (x,y)
-                        //
-                        //  for 
-                        //     let f (x,y) = 1
-                        // and we're not building lambdas, just coerce the arguments in place
-                        if detupledArgs.Length =  actualTys.Length then 
-                            (fun tm -> tm), CoerceDetupled argTys detupledArgs actualTys
-                        else 
-                            // In this case there is a tuple mismatch.
-                            //     f p
-                            //
-                            //
-                            //  for 
-                            //     let f (x,y) = 1
-                            // Assign the argument to make sure it is only run once
-                            let v,ve = mk_compgen_local appm nm argExprTy
-                            let binderBuilder = (fun tm -> mk_compgen_let appm v argExpr tm)
-                            let expr = CoerceBoundTuple ve argTys actualTys
-                            binderBuilder,expr
-                        
-
-            // This variable is really a dummy to make the code below more regular. 
-            // In the i = N - 1 cases we skip the introduction of the 'let' for
-            // this variable.
-            let resVar,resVarAsExpr = mk_compgen_local appm "result" retTy
-            let N = argTys.Length
-            let (cloVar,exprForOtherArgs,exprForOtherArgsTy) = 
-                List.foldBack 
-                    (fun (i,inpArgTy,actualArgTys) (cloVar:Val,res,resTy) -> 
-
-                        let inpArgTys = 
-                            match actualArgTys with 
-                            | [_] -> [inpArgTy]
-                            | _ -> dest_tuple_typ g inpArgTy
-
-                        assert (inpArgTys.Length = actualArgTys.Length)
-                        
-                        let inpsAsVars,inpsAsExprs = inpArgTys |> List.mapi (fun j ty -> mk_compgen_local appm ("arg"^string i^string j) ty)  |> List.unzip
-                        let inpsAsActualArg = CoerceDetupled inpArgTys inpsAsExprs actualArgTys
-                        let inpCloVarType = (mk_fun_ty (mk_tupled_ty g actualArgTys) cloVar.Type)
-                        let newResTy = mk_fun_ty inpArgTy resTy
-                        let inpCloVar,inpCloVarAsExpr = mk_compgen_local appm ("clo"^string i) inpCloVarType
-                        let newRes = 
-                            // For the final arg we can skip introducing the dummy variable
-                            if i = N - 1 then 
-                                mk_multi_lambda appm inpsAsVars 
-                                    (mk_appl g ((inpCloVarAsExpr,inpCloVarType),[],[inpsAsActualArg],appm),resTy)
-                            else
-                                mk_multi_lambda appm inpsAsVars 
-                                    (mk_invisible_let appm cloVar 
-                                       (mk_appl g ((inpCloVarAsExpr,inpCloVarType),[],[inpsAsActualArg],appm)) 
-                                       res, 
-                                     resTy)
-                            
-                        inpCloVar,newRes,newResTy)
-                    argTysWithoutNiceNames
-                    (resVar,resVarAsExpr,retTy)
-
-            
-            // Mark the up as Some/None
-            let suppliedArgs = List.map Some suppliedArgs @ List.of_array (Array.create (curriedNiceNames.Length - suppliedArgs.Length) None)
-
-            assert (suppliedArgs.Length = curriedNiceNames.Length)
-
-            let exprForAllArgs = 
-
-                if isNil argTysWithNiceNames then 
-                    mk_invisible_let appm cloVar exprWithActualTy exprForOtherArgs
-                else
-                    let lambdaBuilders,binderBuilders,inpsAsArgs = 
-                    
-                        (argTysWithNiceNames,curriedNiceNames,suppliedArgs) |||> List.map3 (fun (i,inpArgTy,actualArgTys) niceNames suppliedArg -> 
-
-                                let inpArgTys = 
-                                    match actualArgTys with 
-                                    | [_] -> [inpArgTy]
-                                    | _ -> dest_tuple_typ g inpArgTy
-
-
-                                /// Note: there might not be enough nice names, and they might not match in arity
-                                let niceNames = 
-                                    match niceNames with 
-                                    | nms when nms.Length = inpArgTys.Length -> nms
-                                    | [nm] -> inpArgTys |> List.mapi (fun i _ -> (nm^string i))
-                                    | nms -> nms
-                                match suppliedArg with 
-                                | Some arg -> 
-                                    let binderBuilder,inpsAsActualArg = CoerceTupled niceNames arg actualArgTys
-                                    let lambdaBuilder = (fun tm -> tm)
-                                    lambdaBuilder, binderBuilder,inpsAsActualArg
-                                | None -> 
-                                    let inpsAsVars,inpsAsExprs = (niceNames,inpArgTys)  ||> List.map2 (fun nm ty -> mk_compgen_local appm nm ty)  |> List.unzip
-                                    let inpsAsActualArg = CoerceDetupled inpArgTys inpsAsExprs actualArgTys
-                                    let lambdaBuilder = (fun tm -> mk_multi_lambda appm inpsAsVars (tm, type_of_expr g tm))
-                                    let binderBuilder = (fun tm -> tm)
-                                    lambdaBuilder,binderBuilder,inpsAsActualArg)
-                        |> List.unzip3
-                    
-                    // If no trailing args then we can skip introducing the dummy variable
-                    // This corresponds to 
-                    //    let f (x:A) = 1      
-                    //
-                    //   f ~~> type B -> int
-                    //
-                    // giving
-                    //   (fun b -> f (b :> A))
-                    // rather than 
-                    //   (fun b -> let clo = f (b :> A) in clo)   
-                    let exprApp = 
-                        if argTysWithoutNiceNames.Length = 0 then 
-                            mk_appl g ((exprWithActualTy,actualTy),[],inpsAsArgs,appm)
-                        else
-                            mk_invisible_let appm 
-                                    cloVar (mk_appl g ((exprWithActualTy,actualTy),[],inpsAsArgs,appm)) 
-                                    exprForOtherArgs
-
-                    List.foldBack (fun f acc -> f acc) binderBuilders 
-                        (List.foldBack (fun f acc -> f acc) lambdaBuilders exprApp)
-
-            Some(exprForAllArgs,droppedSuppliedArgs)
-    | _ -> 
-        None
-  
-/// Find and make all subsumption eliminations 
-let NormalizeAndAdjustPossibleSubsumptionExprs g inputExpr = 
-    let expr,args = 
-        // AdjustPossibleSubsumptionExpr can take into account an application
-        match strip_expr inputExpr with 
-        | TExpr_app(f,fty,[],args,m)  ->
-             f,args
-
-        | expr -> 
-            inputExpr,[]
-    
-    match AdjustPossibleSubsumptionExpr g expr args with 
-    | None -> 
-        inputExpr
-    | Some (expr',[]) -> 
-        expr'
-    | Some (expr',args') -> 
-        //printfn "adjusted...." 
-        TExpr_app(expr',type_of_expr g expr',[],args',range_of_expr inputExpr)  
-             
-  
-//---------------------------------------------------------------------------
-// LinearizeTopMatch - when only one non-failing target, make linear.  The full
-// complexity of this is only used for spectacularly rare bindings such as 
-//    type ('a,'b) either = This of 'a | That of 'b
-//    let this_f1 = This (fun x -> x)
-//    let This fA | That fA = this_f1
-// 
-// Here a polymorphic top level binding "fA" is _computed_ by a pattern match!!!
-// The TAST coming out of type checking must, however, define fA as a type function,
-// since it is marked with an arity that indicates it's r.h.s. is a type function]
-// without side effects and so can be compiled as a generic method (for example).
-
-// polymorphic things bound in complex matches at top level require eta expansion of the 
-// type function to ensure the r.h.s. of the binding is indeed a type function 
-let tlambda_eta g m tps (tm,ty) = 
-  if isNil tps then tm else mk_tlambda m tps (mk_appl g ((tm,ty),[(List.map mk_typar_ty tps)],[],m),ty)
-
-let AdjustValToTopVal (tmp:Val) parent valData =
-        tmp.Data.val_top_repr_info <- Some valData ;  
-        tmp.Data.val_actual_parent <- parent;  
-        set_is_topbind_of_vflags tmp.Data true
-
-/// For match with only one non-failing target T0, the other targets, T1... failing (say, raise exception).
-///   tree, T0(v0,..,vN) => rhs ; T1() => fail ; ...
-/// Convert it to bind T0's variables, then continue with T0's rhs:
-///   let tmp = switch tree, TO(fv0,...,fvN) => Tup (fv0,...,fvN) ; T1() => fail; ...
-///   let v1  = #1 tmp in ...
-///   and vN  = #N tmp
-///   rhs
-/// Motivation:
-/// - For top-level let bindings with possibly failing matches,
-///   this makes clear that subsequent bindings (if reached) are top-level ones.
-let LinearizeTopMatchAux g parent  (spBind,m,tree,targets,m2,ty) =
-    let targetsL = Array.to_list targets
-    (* items* package up 0,1,more items *)
-    let itemsProj tys i x = 
-        match tys with 
-        | []  -> failwith "itemsProj: no items?"
-        | [t] -> x (* no projection needed *)
-        | tys -> TExpr_op(TOp_tuple_field_get(i),tys,[x],m)
-    let isThrowingTarget = function TTarget(_,x,_) -> is_throw x
-    if 1 + List.count isThrowingTarget targetsL = targetsL.Length then
-        (* Have failing targets and ONE successful one, so linearize *)
-        let (TTarget (vs,rhs,spTarget)) = the (List.tryfind (isThrowingTarget >> not) targetsL)
-        (* note - old code here used copy value to generate locals - this was not right *)
-        let fvs      = vs |> FlatList.map (fun v -> fst(mk_local v.Range v.MangledName v.Type)) |> FlatList.to_list  (* fresh *)
-        let vtys     = vs |> List.map (fun v -> v.Type) 
-        let tmpTy    = mk_tupled_vars_ty g vs
-        let tmp,tmpe = mk_compgen_local m "matchResultHolder" tmpTy
-
-        AdjustValToTopVal tmp parent TopValInfo.emptyValData;  
-
-        let newTg    = TTarget (fvs,mk_tupled_vars g m fvs,spTarget)
-        let fixup (TTarget (tvs,tx,spTarget)) = 
-           match dest_throw tx with
-           | Some (m,ty,e) -> let tx = mk_throw m tmpTy e
-                              TTarget(tvs,tx,spTarget) (* Throwing targets, recast it's "return type" *)
-           | None          -> newTg       (* Non-throwing target,  replaced [new/old] *)
-       
-        let targets  = Array.map fixup targets
-        let binds    = 
-            vs |> FlatList.mapi (fun i v -> 
-                let ty = v.Type
-                let rhs =  tlambda_eta g m  v.Typars (itemsProj vtys i tmpe, ty)
-                (* update the arity of the value *)
-                v.Data.val_top_repr_info <- Some (InferArityOfExpr g ty [] [] rhs);  
-                mk_invisible_bind v rhs)  in (* vi = proj tmp *)
-        mk_compgen_let m
-          tmp (prim_mk_match (spBind,m,tree,targets,m2,tmpTy)) (* note, probably retyped match, but note, result still has same type *)
-          (mk_lets_from_Bindings m binds rhs)                             
-    else
-        (* no change *)
-        prim_mk_match (spBind,m,tree,targets,m2,ty)
-
-let LinearizeTopMatch g parent = function
-  | TExpr_match (spBind,m,tree,targets,m2,ty,cache) -> LinearizeTopMatchAux g parent (spBind,m,tree,targets,m2,ty)
-  | x -> x
-
-
-(*---------------------------------------------------------------------------
- * XmlDoc signatures
- *------------------------------------------------------------------------- *)
-
-
-let commaEncs strs  = String.concat "," strs
-let angleEnc  str   = "{" ^ str ^ "}" 
-let ticks_and_argcount_text_of_tcref (tcref:TyconRef) = 
-     let nm = tcref.MangledName
-     text_of_path (Array.to_list (full_mangled_path_to_tcref tcref) @ [nm]) 
-
-let typarEnc g gtps typar = 
-    let idx = 
-        try ListSet.findIndex typar_ref_eq  typar gtps
-        with Not_found -> warning(InternalError("Typar not found during XmlDoc generation",typar.Range)); 0
-    "``"^string idx 
-
-let rec typeEnc  g gtps ty = 
-    if verbose then  dprintf "--> typeEnc";
-    match (strip_tpeqns_and_tcabbrevs g ty) with 
-    | TType_forall (typars,typ) -> 
-        "Microsoft.FSharp.Core.TypeFunc"
-    | _ when is_compat_array_typ g ty    -> 
-        let tcref,tinst = dest_stripped_tyapp_typ g ty
-        typeEnc g gtps (List.hd tinst)^ "[]"
-    | _ when is_il_arr_typ g ty   -> 
-        let tcref,tinst = dest_stripped_tyapp_typ g ty
-        typeEnc g gtps (List.hd tinst)^ tcref.MangledName
-    | TType_ucase (UCRef(tcref,_),tinst)   
-    | TType_app (tcref,tinst)   -> 
-        ticks_and_argcount_text_of_tcref tcref ^ tyargsEnc g gtps tinst
-    | TType_tuple typs          -> 
-        sprintf "Microsoft.FSharp.Core.Tuple`%d%s" typs.Length (tyargsEnc g gtps typs)
-    | TType_fun (f,x)           -> 
-        "Microsoft.FSharp.Core.FastFunc`2" ^ tyargsEnc g gtps [f;x]
-    | TType_var typar           -> 
-        typarEnc g gtps typar
-    | TType_modul_bindings  -> 
-        "System.Object"
-    | TType_measure unt -> "?"
-
-and tyargsEnc  g gtps args = 
-     if isNil args then ""
-     else angleEnc (commaEncs (List.map (typeEnc g gtps) args)) 
-
-let XmlDocArgsEnc g gtps argTs =
-  if isNil argTs then "" 
-  else "(" ^ String.concat "," (List.map (typeEnc g gtps) argTs) ^ ")"
-
-let XmlDocSigOfVal g path (v:Val) =
-  let tps,methTypars,argInfos,prefix,path,name = 
-
-    // CLEANUP: this is one of several code paths that treat module values and members 
-    // seperately when really it would be cleaner to make sure GetTopValTypeInFSharpForm, GetMemberTypeInFSharpForm etc.
-    // were lined up so code paths like this could be uniform
-    
-    match v.MemberInfo with 
-    | Some membInfo when not v.IsExtensionMember -> 
-        (* Methods, Properties etc. *)
-        let tps,argInfos,rtnT,_ = GetMemberTypeInMemberForm g membInfo.MemberFlags (the v.TopValInfo) v.Type v.Range
-        let prefix,name = 
-          match membInfo.MemberFlags.MemberKind with 
-          | MemberKindClassConstructor 
-          | MemberKindConstructor 
-          | MemberKindMember -> "M:", v.CompiledName
-          | MemberKindPropertyGetSet 
-          | MemberKindPropertySet
-          | MemberKindPropertyGet -> "P:",membInfo.PropertyName
-        let path = 
-          path^"."^ v.MemberActualParent.MangledName
-        let methTypars = 
-          match PartitionValTypars g v with
-          | Some(_,_,memberMethodTypars,_,_) ->  memberMethodTypars
-          | None -> tps
-        tps,methTypars,argInfos,prefix,path,name
-    | _ ->
-        // Regular F# values and extension members 
-        let w = arity_of_val v
-        let tps,argInfos,_,_ = GetTopValTypeInCompiledForm g w v.Type v.Range
-        let name = v.CompiledName
-        let prefix =
-          if  w.NumCurriedArgs = 0 && isNil tps then "P:"
-          else "M:"
-        tps,tps,argInfos,prefix,path,name
-  let argTs = argInfos |> List.concat |> List.map fst
-  let args = XmlDocArgsEnc g tps argTs
-  let arity = List.length methTypars in (* C# XML doc adds `` to *generic* member names *)
-  let genArity = if arity=0 then "" else Printf.sprintf "``%d" arity
-  prefix ^ path ^ "." ^ name ^ genArity ^ args
-
-let XmlDocSigOfTycon (g:TcGlobals) path (tc:Tycon) = "T:" ^ path ^ "." ^ tc.MangledName 
-let XmlDocSigOfSubModul (g:TcGlobals) path = "T:" ^ path 
-
-
-(*--------------------------------------------------------------------------
-!* Some unions have null as representations 
- *------------------------------------------------------------------------*)
-
-
-let enum_CompilationRepresentationAttribute_Static             = 0b0000000000000001
-let enum_CompilationRepresentationAttribute_Instance           = 0b0000000000000010
-let enum_CompilationRepresentationAttribute_StaticInstanceMask = 0b0000000000000011
-let enum_CompilationRepresentationAttribute_ModuleSuffix       = 0b0000000000000100
-let enum_CompilationRepresentationAttribute_PermitNull         = 0b0000000000001000
-
-let TyconHasUseNullAsTrueValueAttribute g (tycon:Tycon) =
-     match TryFindInt32Attrib  g g.attrib_CompilationRepresentationAttribute tycon.Attribs with
-     | Some(flags) -> ((flags &&& enum_CompilationRepresentationAttribute_PermitNull) <> 0)
-     | _ -> false 
-
-
-(* WARNING: this must match optimizeAlternativeToNull in ilx/cu_erase.ml *) 
-(* REVIEW: make this fully attribute controlled *)
-let IsUnionTypeWithNullAsTrueValue (g:TcGlobals) (tycon:Tycon) =
-  (tycon.IsUnionTycon && 
-   let ucs = tycon.UnionCasesArray
-   (Array.length ucs = 0 ||
-     (TyconHasUseNullAsTrueValueAttribute g tycon &&
-      ucs |> Array.existsOne (fun uc -> uc.IsNullary) &&
-      ucs |> Array.exists (fun uc -> not uc.IsNullary))))
-
-let TyconCompilesInstanceMembersAsStatic g tycon = IsUnionTypeWithNullAsTrueValue g tycon
-let TcrefCompilesInstanceMembersAsStatic g tcref = TyconCompilesInstanceMembersAsStatic g (deref_tycon tcref)
-
-let TypeNullNever g ty = 
-    let underlyingTy = strip_tpeqns_and_tcabbrevs_and_measureable g ty
-    (is_struct_typ g underlyingTy) ||
-    (is_byref_typ g underlyingTy)
-
-let TypeNullIsExtraValue g ty = 
-    is_il_ref_typ g ty ||
-    is_delegate_typ g ty //||
-        //(not (TypeNullNever g ty) && 
-         //is_stripped_tyapp_typ ty && 
-         //HasAttrib  g g.attrib_PermitNullLiteralAttribute (deref_tycon (tcref_of_stripped_typ ty)).Attribs)
-
-let TypeNullIsTrueValue g ty = 
-    (is_stripped_tyapp_typ g ty && IsUnionTypeWithNullAsTrueValue g (deref_tycon (tcref_of_stripped_typ g ty)))  ||
-    (is_unit_typ g ty)
-
-let TypeNullNotLiked g ty = 
-       not (TypeNullIsExtraValue g ty) 
-    && not (TypeNullIsTrueValue g ty) 
-    && not (TypeNullNever g ty) 
-
-let TypeSatisfiesNullConstraint g ty = 
-    TypeNullIsExtraValue g ty  
-
-let rec TypeHasDefaultValue g ty = 
-    TypeSatisfiesNullConstraint g ty  
-    || (is_struct_typ g ty &&
-        // Is it an F# struct type?
-        (if is_fsobjmodel_struct_typ g ty then 
-            let tcref,tinst = dest_stripped_tyapp_typ g ty 
-            let flds = 
-                tcref.TrueInstanceFieldsAsList
-                  // We can ignore fields with the DefaultValue(false) attribute 
-                  |> List.filter (fun fld -> not (TryFindBoolAttrib g g.attrib_DefaultValueAttribute fld.FieldAttribs = Some(false)))
-
-            flds |> List.forall (typ_of_rfield (mk_tcref_inst tcref tinst) >> TypeHasDefaultValue g)
-         elif is_tuple_struct_typ g ty then 
-            dest_tuple_typ g ty |> List.forall (TypeHasDefaultValue g)
-         else
-            // All struct types defined in other .NET languages have a DefaultValue regardless of their
-            // instantiation
-            true))
-
-(* Can we use the fast helper for the 'LanguagePrimitives.IntrinsicFunctions.TypeTestGeneric'? *)
-let can_use_istype_fast g ty = 
-     not (is_typar_typ g ty) && 
-     not (TypeNullIsTrueValue g ty) && 
-     not (TypeNullNever g ty)
-
-(* Can we use the fast helper for the 'LanguagePrimitives.IntrinsicFunctions.UnboxGeneric'? *)
-let can_use_unbox_fast g ty = 
-     not (is_typar_typ g ty) && 
-     not (TypeNullNotLiked g ty)
-     
-     
-(*--------------------------------------------------------------------------
-!* Nullness tests and pokes 
- *------------------------------------------------------------------------*)
-
-// Null tests are generated by
-//    1. The compilation of array patterns in the pattern match compiler
-//    2. The compilation of string patterns in the pattern match compiler
-
-let mk_nonnull_test g m e = mk_asm ([ IL.I_arith IL.AI_ldnull ; IL.I_arith IL.AI_cgt_un  ],[],  [e],[g.bool_ty],m)
-let mk_nonnull_poke g m e = mk_asm ([ IL.I_arith IL.AI_dup ; IL.I_ldvirtftn (mspec_Object_GetHashCode g.ilg); IL.I_arith IL.AI_pop  ],[],  [e],[type_of_expr g e],m)
-let mk_nonnull_cond g m ty e1 e2 e3 = mk_cond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m ty (mk_nonnull_test g m e1) e2 e3
-
-
-let ModuleNameIsMangled g attrs =
-    match TryFindInt32Attrib g g.attrib_CompilationRepresentationAttribute attrs with
-    | Some(flags) -> ((flags &&& enum_CompilationRepresentationAttribute_ModuleSuffix) <> 0)
-    | _ -> false 
-
-let CompileAsEvent g attrs = HasAttrib g g.attrib_CLIEventAttribute attrs 
-
-
-let MemberIsCompiledAsInstance g parent isExtensionMember membInfo attrs =
-    // All extension members are compiled as static members
-    if isExtensionMember then false
-    // Anything implementing a dispatch slot is compiled as an instance member
-    elif nonNil membInfo.ImplementedSlotSigs then true
-    else 
-        // Otherwise check attributes to see if there is an explicit instance or explicit static flag
-        let explicitInstance,explicitStatic = 
-            match TryFindInt32Attrib g g.attrib_CompilationRepresentationAttribute attrs with
-            | Some(flags) -> 
-              ((flags &&& enum_CompilationRepresentationAttribute_Instance) <> 0),
-              ((flags &&& enum_CompilationRepresentationAttribute_Static) <> 0)
-            | _ -> false,false
-        explicitInstance ||
-        (membInfo.MemberFlags.MemberIsInstance &&
-         not explicitStatic &&
-         not (TcrefCompilesInstanceMembersAsStatic g parent))
-
-
-let is_sealed_typ g ty =
-  let ty = strip_tpeqns_and_tcabbrevs_and_measureable g ty
-  not (is_ref_typ g ty) ||
-  is_any_array_typ g ty || 
-  (if is_il_named_typ g ty then 
-      let tcref,tinst = dest_stripped_tyapp_typ g ty
-      let tdef = tcref.ILTyconRawMetadata
-      tdef.tdSealed
-   elif (is_fsobjmodel_interface_typ g ty || is_fsobjmodel_class_typ g ty) then 
-      let tcref,tinst = dest_stripped_tyapp_typ g ty
-      (TryFindBoolAttrib g g.attrib_SealedAttribute tcref.Attribs = Some(true))
-   else true)
-   
-let IsComInteropType g ty =
-    let tcr,_ = dest_stripped_tyapp_typ g ty
-    TryFindBoolAttrib g g.attrib_ComImportAttribute tcr.Attribs = Some(true)
-  
-let ValSpecIsCompiledAsInstance g (v:Val) =
-    match v.MemberInfo with 
-    | Some(membInfo) -> 
-        // Note it doesn't matter if we pass 'v.MemberActualParent' or 'v.MemberApparentParent' here. 
-        // These only differ if the value is an extension member, and in that case MemberIsCompiledAsInstance always returns 
-        // false anyway 
-        MemberIsCompiledAsInstance g v.MemberApparentParent v.IsExtensionMember membInfo v.Attribs  
-    |  _ -> false
-
-let ValRefIsCompiledAsInstanceMember g vref = ValSpecIsCompiledAsInstance g (deref_val vref)
-
-
-(*---------------------------------------------------------------------------
- * Crack information about an F# object model call
- *------------------------------------------------------------------------- *)
-
-let GetMemberCallInfo g (vref:ValRef,vFlags) = 
-    match vref.MemberInfo with 
-    | Some(membInfo) when not vref.IsExtensionMember -> 
-      let numEnclTypeArgs = vref.MemberApparentParent.TyparsNoRange.Length
-      let virtualCall = 
-        (membInfo.MemberFlags.MemberIsVirtual || 
-         membInfo.MemberFlags.MemberIsOverrideOrExplicitImpl || 
-         membInfo.MemberFlags.MemberIsDispatchSlot) && 
-        not membInfo.MemberFlags.MemberIsFinal && 
-        not (vFlags = VSlotDirectCall)
-      let isNewObj    = (membInfo.MemberFlags.MemberKind = MemberKindConstructor) && (vFlags = NormalValUse)
-      let isSuperInit = (membInfo.MemberFlags.MemberKind = MemberKindConstructor) && (vFlags = CtorValUsedAsSuperInit)
-      let isSelfInit  = (membInfo.MemberFlags.MemberKind = MemberKindConstructor) && (vFlags = CtorValUsedAsSelfInit)
-      let isCompiledAsInstance = ValRefIsCompiledAsInstanceMember g vref
-      let takesInstanceArg = isCompiledAsInstance && not isNewObj
-      let isPropGet = (membInfo.MemberFlags.MemberKind = MemberKindPropertyGet) && (membInfo.MemberFlags.MemberIsInstance = isCompiledAsInstance)
-      let isPropSet = (membInfo.MemberFlags.MemberKind = MemberKindPropertySet) && (membInfo.MemberFlags.MemberIsInstance = isCompiledAsInstance)
-      numEnclTypeArgs, virtualCall,isNewObj,isSuperInit,isSelfInit ,takesInstanceArg,isPropGet,isPropSet
-    | _ -> 
-      0,false,false,false,false,false,false,false
-
-(*---------------------------------------------------------------------------
- * Active pattern name helpers
- *------------------------------------------------------------------------- *)
-
-let core_display_name_of_vref (vref:ValRef) = vref.CoreDisplayName
-
-let is_ap_name(nm) =
-    // REVIEW: This may not be correct in all the cases. For example, is "|+|" valid AP name?
-    let len = String.length nm
-    String.contains nm '|' &&
-      (String.index nm '|' = 0) &&
-      len >= 3 &&
-      (String.rindex nm '|' = len - 1)
-    
-let apinfo_of_vname (nm, m) = 
-    let rec loop nm = 
-        if String.contains nm '|' then 
-           let n = String.index nm '|'
-           String.sub nm 0 n :: loop (String.sub nm (n+1) (String.length nm - n - 1))
-        else
-           [nm]
-    let nm = DecompileOpName nm
-    let len = String.length nm
-    if is_ap_name nm then 
-          let res = loop (String.sub nm 1 (len - 2))
-          let resH,resT = List.frontAndBack res
-          Some(if resT = "_" then APInfo(false,resH,m) else APInfo(true,res,m))
-        (* dprintf "apinfo_of_vname %s, res = %s\n" nm (String.concat ";" res);*)
-    else None
-
-let apinfo_of_vref (vref:ValRef) =  
-    // This next line is an optimization to prevent calls to core_display_name_of_vref, which calls DemangleOperatorName
-    if not (String.hasPrefix vref.MangledName "|" ) then None else 
-    apinfo_of_vname (vref.CoreDisplayName, vref.Range)
-
-let name_of_apref (APElemRef(_,vref,n)) =
-    match apinfo_of_vref vref with
-    | None -> error(InternalError("name_of_apref: not an active pattern name", vref.Range))
-    | Some (APInfo(total,nms,_)) -> 
-        if n < 0 || n >= List.length nms  then error(InternalError("name_of_apref: index out of range for active pattern refernce", vref.Range));
-        List.nth nms n
-
-let mk_choices_tcref g m n = 
-     match n with 
-     | 0 | 1 -> error(InternalError("mk_choices_tcref",m))
-     | 2 -> g.choice2_tcr
-     | 3 -> g.choice3_tcr
-     | 4 -> g.choice4_tcr
-     | 5 -> g.choice5_tcr
-     | 6 -> g.choice6_tcr
-     | 7 -> g.choice7_tcr
-     | _ -> error(Error("active patterns may not return more than 7 possibilities",m))
-let mk_choices_typ g m tinst = 
-     match List.length tinst with 
-     | 0 -> g.unit_ty
-     | 1 -> List.hd tinst
-     | _ -> mk_tyapp_ty (mk_choices_tcref g m (List.length tinst)) tinst
-
-let mk_choices_ucref g m n i = 
-     mk_ucref (mk_choices_tcref g m n) ("Choice"^string (i+1)^"Of"^string n)
-
-let names_of_apinfo (APInfo(_,nms,_)) = nms
-let total_of_apinfo (APInfo(total,_,_)) = total
-
-let mk_apinfo_result_typ g m apinfo rtys = 
-    let choicety = mk_choices_typ g m rtys
-    if total_of_apinfo apinfo then choicety else mk_option_ty g choicety
-    
-let mk_apinfo_typ g m apinfo dty rtys = mk_fun_ty dty (mk_apinfo_result_typ g m apinfo rtys)
-    
-
-(*---------------------------------------------------------------------------
-!* RewriteExpr: rewrite bottom up with interceptors 
- *-------------------------------------------------------------------------*)
-
-type ExprRewritingEnv = 
-    { pre_intercept: ((expr -> expr) -> expr -> expr option) option;
-      post_transform: expr -> expr option;
-      under_quotations: bool }    
-
-let rec rewrite_bind env (TBind(v,e,letSeqPtOpt) as bind) = TBind(v,RewriteExpr env e,letSeqPtOpt) 
-
-and rewrite_binds env binds = FlatList.map (rewrite_bind env) binds
-
-and RewriteExpr env expr =
-  match expr with 
-  | TExpr_let _ 
-  | TExpr_seq _ ->
-      rewrite_linear_expr env expr (fun e -> e)
-  | _ -> 
-      let expr = 
-         match pre_rewrite_expr env expr with 
-         | Some expr -> expr
-         | None -> rewrite_expr_structure env expr
-      post_rewrite_expr env expr 
-
-and pre_rewrite_expr env expr = 
-     match env.pre_intercept  with 
-     | Some f -> f (RewriteExpr env) expr
-     | None -> None 
-and post_rewrite_expr env expr = 
-     match env.post_transform expr with 
-     | None -> expr 
-     | Some expr -> expr 
-
-and rewrite_expr_structure env expr =  
-  match expr with
-  | TExpr_const _ 
-  | TExpr_val _ -> expr
-  | TExpr_app(f0,f0ty,tyargs,args,m) -> 
-      let f0'   = RewriteExpr env f0
-      let args' = rewrite_exprs env args
-      if f0 == f0' && args == args' then expr
-      else TExpr_app(f0',f0ty,tyargs,args',m)
-
-  | TExpr_quote(ast,{contents=Some(argTypes,argExprs,data)},m,ty) -> 
-      TExpr_quote((if env.under_quotations then RewriteExpr env ast else ast),{contents=Some(argTypes,rewrite_exprs env argExprs,data)},m,ty)
-  | TExpr_quote(ast,{contents=None},m,ty) -> 
-      TExpr_quote((if env.under_quotations then RewriteExpr env ast else ast),{contents=None},m,ty)
-  | TExpr_obj (_,ty,basev,basecall,overrides,iimpls,m,_) -> 
-      mk_obj_expr(ty,basev,RewriteExpr env basecall,List.map (rewrite_override env) overrides,
-                  List.map (rewrite_iimpl env) iimpls,m)
-  | TExpr_link eref -> 
-      RewriteExpr env !eref
-  | TExpr_op (c,tyargs,args,m) -> 
-      let args' = rewrite_exprs env args
-      if args == args' then expr 
-      else TExpr_op(c,tyargs,args',m)
-  | TExpr_lambda(lambda_id,basevopt,argvs,body,m,rty,_) -> 
-      let body = RewriteExpr env body
-      mk_basev_multi_lambda m basevopt argvs (body,rty)
-  | TExpr_tlambda(lambda_id,argtyvs,body,m,rty,_) -> 
-      let body = RewriteExpr env body
-      mk_tlambda m argtyvs (body,rty)
-  | TExpr_match(spBind,exprm,dtree,targets,m,ty,_) -> 
-      let dtree' = rewrite_dtree env dtree
-      let targets' = rewrite_targets env targets
-      mk_and_optimize_match spBind exprm m ty dtree' targets'
-  | TExpr_letrec (binds,e,m,_) ->
-      let binds = rewrite_binds env binds
-      let e' = RewriteExpr env e
-      TExpr_letrec(binds,e',m,NewFreeVarsCache())
-  | TExpr_let _ -> failwith "unreachable - linear let"
-  | TExpr_seq _ -> failwith "unreachable - linear seq"
-  | TExpr_static_optimization (constraints,e2,e3,m) ->
-      let e2' = RewriteExpr env e2
-      let e3' = RewriteExpr env e3
-      TExpr_static_optimization(constraints,e2',e3',m)
-  | TExpr_tchoose (a,b,m) -> 
-      TExpr_tchoose(a,RewriteExpr env b,m)
-and rewrite_linear_expr env expr contf =
-    (* schedule a rewrite on the way back up by adding to the continuation *)
-    let contf = contf << post_rewrite_expr env
-    match pre_rewrite_expr env expr with 
-    | Some expr -> contf expr  (* done - intercepted! *)
-    | None -> 
-        match expr with 
-        | TExpr_let (bind,body,m,_) ->  
-            let bind = rewrite_bind env bind
-            rewrite_linear_expr env body (contf << (fun body' ->
-                mk_let_bind m bind body'))
-        | TExpr_seq  (e1,e2,dir,spSeq,m) ->
-            let e1' = RewriteExpr env e1
-            rewrite_linear_expr env e2 (contf << (fun e2' ->
-                if e1 == e1' && e2 == e2' then expr 
-                else TExpr_seq(e1',e2',dir,spSeq,m)))
-        | _ -> 
-            (* no longer linear *)
-            contf (RewriteExpr env expr) 
-
-and rewrite_exprs env exprs = List.mapq (RewriteExpr env) exprs
-and rewrite_FlatExprs env exprs = FlatList.mapq (RewriteExpr env) exprs
-
-and rewrite_dtree env x =
-  match x with 
-  | TDSuccess (es,n) -> 
-      let es' = rewrite_FlatExprs env es
-      if FlatList.physicalEquality es es' then x 
-      else TDSuccess(es',n)
-  | TDSwitch (e,cases,dflt,m) ->
-      let e' = RewriteExpr env e
-      let cases' = List.map (fun (TCase(discrim,e)) -> TCase(discrim,rewrite_dtree env e)) cases
-      let dflt' = Option.map (rewrite_dtree env) dflt
-      TDSwitch (e',cases',dflt',m)
-  | TDBind (bind,body) ->
-      let bind' = rewrite_bind env bind
-      let body = rewrite_dtree env body
-      TDBind (bind',body)
-and rewrite_target env (TTarget(vs,e,spTarget)) = TTarget(vs,RewriteExpr env e,spTarget)
-and rewrite_targets env targets = List.map (rewrite_target env) (Array.to_list targets)
-
-and rewrite_override env (TObjExprMethod(slotsig,tps,vs,e,m)) =
-  TObjExprMethod(slotsig,tps,vs,RewriteExpr env e,m)
-and rewrite_iimpl env (ty,overrides) = 
-  (ty, List.map (rewrite_override env) overrides)
-    
-and rewrite_mexpr env x = 
-    match x with  
-    (* | TMTyped(mty,e,m) -> TMTyped(mty,rewrite_mexpr env e,m) *)
-    | TMTyped(mty,def,m) ->  TMTyped(mty,rewrite_mdef env def,m)
-and rewrite_mdefs env x = List.map (rewrite_mdef env) x
-    
-and rewrite_mdef env x = 
-    match x with 
-    | TMDefRec(tycons,binds,mbinds,m) -> TMDefRec(tycons,rewrite_binds env binds,rewrite_mbinds env mbinds,m)
-    | TMDefLet(bind,m)         -> TMDefLet(rewrite_bind env bind,m)
-    | TMDefDo(e,m)             -> TMDefDo(RewriteExpr env e,m)
-    | TMDefs(defs)             -> TMDefs(rewrite_mdefs env defs)
-    | TMAbstract(mexpr)        -> TMAbstract(rewrite_mexpr env mexpr)
-and rewrite_mbind env (TMBind(nm, rhs)) = TMBind(nm,rewrite_mdef env rhs)
-and rewrite_mbinds env mbinds = List.map (rewrite_mbind env) mbinds
-
-and RewriteImplFile env mv = mapTImplFile (rewrite_mexpr env) mv
-
-
-let is_flag_enum_typ (g:TcGlobals) typ = 
-   (is_enum_typ g typ (* && TyconRefHasAttrib g g.attrib_FlagsAttribute (tcref_of_stripped_typ typ) *) ) 
-
-(*--------------------------------------------------------------------------
-!* Build a mrpi that converts all "local" references to "public" things 
- * to be non local references.
- *------------------------------------------------------------------------ *)
-
-let MakeExportRemapping viewedCcu = 
-
-    let acc_entity_remap (tycon:Tycon) tmenv = 
-        match tycon.PublicPath with 
-        | Some pubpath -> 
-            if !verboseStamps then dprintf "adding export remapping for tycon %s#%d\n" tycon.MangledName tycon.Stamp;
-            let tcref = rescope_tycon_pubpath viewedCcu pubpath tycon
-            tmenv_add_tcref_remap (mk_local_tcref tycon) tcref tmenv
-        | None -> error(InternalError("Unexpected tycon without a pubpath when remapping assembly data",tycon.Range))
-
-    let acc_val_remap (vspec:Val) tmenv = 
-        match vspec.PublicPath with 
-        | Some pubpath -> 
-            if !verboseStamps then dprintf "adding export remapping for value %s#%d\n" vspec.MangledName vspec.Stamp;
-            {tmenv with vspec_remap=vspec_map_add vspec (rescope_val_pubpath viewedCcu pubpath vspec) tmenv.vspec_remap}
-        | None -> error(InternalError("Unexpected value without a pubpath when remapping assembly data",vspec.Range))
-
-    fun (mspec:ModuleOrNamespace) -> 
-        fold_vals_and_tycons_of_mtyp acc_entity_remap acc_val_remap mspec.ModuleOrNamespaceType empty_expr_remap
-
-(*--------------------------------------------------------------------------
-!* Apply a "local to nonlocal" renaming to a module type.  This can't use
- * remap_mspec since the remapping we want isn't to newly created nodes
- * but rather to remap to the nonlocal references. This is deliberately 
- * "breaking" the binding structure implicit in the module type, which is
- * the whole point - one things are rewritten to use non local references then
- * the elements can be copied at will, e.g. when inlining during optimization.
- *------------------------------------------------------------------------ *)
-
-
-let rec remap_tycon_data_to_nonlocal g tmenv d = 
-    let tps',tmenvinner = tmenv_copy_remap_and_bind_typars (remap_attrib g tmenv) tmenv (d.entity_typars.Force(d.entity_range))
-
-    { d with 
-          entity_typars         = LazyWithContext.NotLazy tps';
-          entity_attribs        = d.entity_attribs        |> remap_attribs g tmenvinner;
-          entity_tycon_repr           = d.entity_tycon_repr           |> Option.map (remap_tycon_repr g tmenvinner);
-          entity_tycon_abbrev         = d.entity_tycon_abbrev         |> Option.map (remap_type tmenvinner) ;
-          entity_tycon_tcaug          = d.entity_tycon_tcaug          |> remap_tcaug tmenvinner ;
-          entity_modul_contents = 
-              notlazy (d.entity_modul_contents 
-                       |> Lazy.force 
-                       |> map_immediate_vals_and_tycons_of_modtyp (remap_tycon_to_nonlocal g tmenv) 
-                                                                  (remap_val_to_nonlocal g tmenv));
-          entity_exn_info      = d.entity_exn_info      |> remap_tycon_exnc_info g tmenvinner}
-
-and remap_tycon_to_nonlocal g tmenv x = 
-    x |> NewModifiedTycon (remap_tycon_data_to_nonlocal g tmenv)  
-
-and remap_val_to_nonlocal g  tmenv inp = 
-    inp |> NewModifiedVal (remap_val_data g tmenv)
-
-let ApplyExportRemappingToEntity g tmenv x = remap_tycon_to_nonlocal g tmenv x
-
-(* Which constraints actually get compiled to .NET constraints? *)
-let is_compiled_constraint cx = 
-    match cx with 
-      | TTyparIsNotNullableValueType _ 
-      | TTyparIsReferenceType _
-      | TTyparRequiresDefaultConstructor _
-      | TTyparCoercesToType _ -> true
-      | _ -> false
-    
-// Is a value a first-class polymorphic value with .NET constraints? 
-// Used to turn off TLR and method splitting
-let IsGenericValWithGenericContraints g (v:Val) = 
-    is_forall_typ g v.Type && 
-    v.Type |> dest_forall_typ g |> fst |> List.exists (fun tp -> List.exists is_compiled_constraint tp.Constraints)
-
-(* Does a type support a given interface? *)
-let tcaug_has_interface g tcaug ty = 
-    List.exists (fun (x,_,_) -> type_equiv g ty x)  tcaug.tcaug_implements
-
-(* Does a type have an override matching the given name and argument types? *)
-(* Used to detet the presence of 'Equals' and 'GetHashCode' in type checking *)
-let tcaug_has_override g tcaug nm argtys = 
-    tcaug.tcaug_adhoc 
-    |> NameMultiMap.find nm
-    |> List.exists (fun vref -> 
-                      match vref.MemberInfo with 
-                      | None -> false 
-                      | Some membInfo -> 
-                                     let argInfos = ArgInfosOfMember g vref 
-                                     argInfos.Length = 1 && 
-                                     List.lengthsEqAndForall2 (type_equiv g) (List.map fst (List.hd argInfos)) argtys  &&  
-                                     membInfo.MemberFlags.MemberIsOverrideOrExplicitImpl) 
-
-let mk_fast_for_loop g (spLet,m,idv:Val,start,dir,finish,body) =
-    let dir = if dir then FSharpForLoopUp else FSharpForLoopDown 
-    //let startv,starte   = mk_compgen_local (range_of_expr start)  "loopStart" g.int_ty
-    //let finishv,finishe = mk_compgen_local (range_of_expr finish) "loopEnd" g.int_ty
-    //mk_let spLet (range_of_expr start)  startv  start 
-      //(mk_compgen_let (range_of_expr finish) finishv finish 
-    mk_for g (spLet,idv,start,dir,finish,body,m)
-
-let rec EvalConstantExpr g x = 
-    match x with 
-
-    (* Detect standard constants *)
-    | TExpr_const(c,m,_) -> 
-        match c with 
-        | TConst_bool _ 
-        | TConst_int32 _ 
-        | TConst_sbyte  _
-        | TConst_int16  _
-        | TConst_int32 _
-        | TConst_int64 _  
-        | TConst_byte  _
-        | TConst_uint16  _
-        | TConst_uint32  _
-        | TConst_uint64  _
-        | TConst_float _
-        | TConst_float32 _
-        | TConst_char _
-        | TConst_zero _
-        | TConst_string _  -> x
-        | _ -> 
-            errorR (Error ( "This constant may not be used as a custom attribute value",m)); 
-            x
-
-    | TExpr_app(TExpr_val(vref,_,_),_,[ty],[],m) when (is_typeof_vref g vref || is_typedefof_vref g vref) -> 
-        x
-    | TExpr_op(TOp_coerce,_,[arg],_) -> 
-        EvalConstantExpr g arg
-    | TExpr_app(TExpr_val(vref,_,_),_,_,[arg1],_) when g.vref_eq vref g.enum_vref  -> 
-        EvalConstantExpr g arg1
-    (* Detect bitwise or of attribute flags: one case of constant folding (a more general treatment is needed *)    
-    | BitwiseOr g (arg1,arg2) ->
-        match EvalConstantExpr g arg1, EvalConstantExpr g arg2 with 
-        | TExpr_const(TConst_int32 x1,m,ty), TExpr_const(TConst_int32 x2,_,_) -> TExpr_const(TConst_int32 (x1 ||| x2),m,ty)
-        | TExpr_const(TConst_sbyte x1,m,ty), TExpr_const(TConst_sbyte x2,_,_) -> TExpr_const(TConst_sbyte (x1 ||| x2),m,ty)
-        | TExpr_const(TConst_int16 x1,m,ty), TExpr_const(TConst_int16 x2,_,_) -> TExpr_const(TConst_int16 (x1 ||| x2),m,ty)
-        | TExpr_const(TConst_int64 x1,m,ty), TExpr_const(TConst_int64 x2,_,_) -> TExpr_const(TConst_int64 (x1 ||| x2),m,ty)
-        | TExpr_const(TConst_byte x1,m,ty), TExpr_const(TConst_byte x2,_,_) -> TExpr_const(TConst_byte (x1 ||| x2),m,ty)
-        | TExpr_const(TConst_uint16 x1,m,ty), TExpr_const(TConst_uint16 x2,_,_) -> TExpr_const(TConst_uint16 (x1 ||| x2),m,ty)
-        | TExpr_const(TConst_uint32 x1,m,ty), TExpr_const(TConst_uint32 x2,_,_) -> TExpr_const(TConst_uint32 (x1 ||| x2),m,ty)
-        | TExpr_const(TConst_uint64 x1,m,ty), TExpr_const(TConst_uint64 x2,_,_) -> TExpr_const(TConst_uint64 (x1 ||| x2),m,ty)
-        | _ -> x
-    | _ -> 
-        errorR (Error ( "This is not a constant expression or valid custom attribute value",range_of_expr x)); 
-        x
-
-
-let EvalAttribArg g x = 
-    match x with 
-    | TExpr_op(TOp_array,[elemTy],args,m) -> 
-        let args = args |> List.map (EvalConstantExpr g) 
-        TExpr_op(TOp_array,[elemTy],args,m) 
-    | _ -> 
-        EvalConstantExpr g x
-
-// Take into account the fact that some "instance" members are compiled as static
-// members when usinging CompilationRepresentation.Static, or any non-virtual instance members
-// in a type that supports "null" as a true value. This is all members
-// where ValRefIsCompiledAsInstanceMember is false but membInfo.MemberFlags.MemberIsInstance 
-// is true.
-//
-// This is the right abstraction for viewing member types, but the implementation
-// below is a little ugly.
-let GetTypeOfIntrinsicMemberInCompiledForm g (vref:ValRef) =
-    assert (not vref.IsExtensionMember)
-    let membInfo,topValInfo = check_member_vref vref
-    let tps,argInfos,rty,retInfo = GetTypeOfMemberInMemberForm g vref
-    let argInfos = 
-        // Check if the thing is really an instance member compiled as a static member
-        // If so, the object argument counts as a normal argument in the compiled form
-        if membInfo.MemberFlags.MemberIsInstance && not (ValRefIsCompiledAsInstanceMember g vref) then 
-            let _,origArgInfos,_,_ = GetTopValTypeInFSharpForm g topValInfo vref.Type vref.Range
-            match origArgInfos with
-            | [] -> 
-                errorR(InternalError("value does not have a valid member type",vref.Range)); 
-                argInfos
-            | h::t -> h ::argInfos
-        else argInfos
-    tps,argInfos,rty,retInfo
-
-
-//--------------------------------------------------------------------------
-// Tuple compilation (expressions)
-//------------------------------------------------------------------------ 
-
-
-let rec compiled_mk_tuple g (argtys,args,m) = 
-    let n = List.length argtys 
-    if n <= 0 then failwith "compiled_mk_tuple"
-    elif n < maxTuple then  (compiled_tuple_tcref g argtys, argtys, args, m)
-    else
-        let argtysA,argtysB = split_after goodTupleFields argtys
-        let argsA,argsB = split_after (goodTupleFields) args
-        let ty8, v8 = 
-            match argtysB,argsB with 
-            | [ty8],[arg8] -> 
-                match ty8 with
-                // if it's already been nested or ended, pass it through
-                |  TType_app(tn, _)  when (is_tuple_tcref g tn) ->
-                    ty8,arg8
-                | _ ->
-                    let ty8enc = TType_app(g.tuple1_tcr,[ty8])
-                    let v8enc = TExpr_op(TOp_tuple,[ty8],[arg8],m) 
-                    ty8enc,v8enc
-            | _ -> 
-                let a,b,c,d = compiled_mk_tuple g (argtysB, argsB, m)
-                let ty8plus = TType_app(a,b)
-                let v8plus = TExpr_op(TOp_tuple,b,c,d)
-                ty8plus,v8plus
-        let argtysAB = argtysA @ [ty8] 
-        (compiled_tuple_tcref g argtysAB, argtysAB,argsA @ [v8],m)
-
-let get_rfref_of_tcref(tcref,n) =
-    let f = (deref_tycon tcref).GetFieldByIndex n 
-    rfref_of_rfield tcref f 
-
-let mspec_Tuple_ItemN (g : TcGlobals) typ n = IL.mk_nongeneric_instance_mspec_in_tref((tref_of_typ typ), AsObject, (if n < goodTupleFields then "get_Item"^(n+1).ToString() else "get_Rest"), [], (mk_tyvar_ty (uint16 n)), (inst_of_typ typ))
-let mk_call_Tuple_ItemN g m n typ te retty =
-    mk_asm([IL.mk_normal_call(mspec_Tuple_ItemN g typ n)],[],[te],[retty],m)
-          
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/tastops.mli b/tools/FSharp_1.9.6.16/source/fsharp/tastops.mli
deleted file mode 100644
index 38d8a77e..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/tastops.mli
+++ /dev/null
@@ -1,1283 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#light
-
-/// Derived expression manipulation and construction functions.
-module (* internal *) Microsoft.FSharp.Compiler.Tastops 
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open System.Text
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.IL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.Layout
-open Microsoft.FSharp.Compiler.Lib
-
-//-------------------------------------------------------------------------
-// Build common types
-//------------------------------------------------------------------------- 
-
-val mk_fun_ty : typ -> typ -> typ
-val ( --> ) : typ -> typ -> typ
-val try_mk_forall_ty : typars -> typ -> typ
-val ( +-> ) : typars -> typ -> typ
-val mk_tuple_ty : typ list -> typ
-val mk_iterated_fun_ty : typ list -> typ -> typ
-val type_of_lambda_arg : range -> Val list -> typ
-val mk_multi_lambda_ty : range -> Val list -> typ -> typ
-val mk_lambda_ty : typars -> typ list -> typ -> typ
-
-//-------------------------------------------------------------------------
-// Module publication, used while compiling fslib.
-//------------------------------------------------------------------------- 
-
-val ensure_fslib_has_submodul_at : ccu -> ident list -> Tast.CompilationPath -> XmlDoc -> unit 
-
-//-------------------------------------------------------------------------
-// Miscellaneous accessors on terms
-//------------------------------------------------------------------------- 
-
-val strip_expr : expr -> expr
-
-val discrim_of_case : DecisionTreeCase -> DecisionTreeDiscriminator
-val dest_of_case : DecisionTreeCase -> DecisionTree
-
-val var_of_bind : Binding -> Val
-val vars_of_Bindings : Bindings -> FlatVals 
-val vars_of_binds : Binding list -> Val list
-val rhs_of_bind : Binding -> expr
-
-//-------------------------------------------------------------------------
-// Build decision trees imperatively
-//------------------------------------------------------------------------- 
-
-type MatchBuilder =
-    new : SequencePointInfoForBinding * range -> MatchBuilder
-    member AddTarget : DecisionTreeTarget -> int
-    member AddResultTarget : expr * SequencePointInfoForTarget -> DecisionTree
-    member CloseTargets : unit -> DecisionTreeTarget list
-    member Close : DecisionTree * range * typ -> expr
-
-//-------------------------------------------------------------------------
-// Make some special decision graphs
-//------------------------------------------------------------------------- 
-
-val mk_bool_switch : range -> expr -> DecisionTree -> DecisionTree -> DecisionTree
-val mk_cond : SequencePointInfoForBinding -> SequencePointInfoForTarget -> range -> typ -> expr -> expr -> expr -> expr
-val mk_nonnull_cond : TcGlobals -> range -> typ -> expr -> expr -> expr -> expr
-
-//-------------------------------------------------------------------------
-// Make normalized references
-//------------------------------------------------------------------------- 
-
-val mk_local_vref   : Val -> ValRef
-val mk_local_modref : ModuleOrNamespace -> ModuleOrNamespaceRef
-val mk_local_tcref  : Tycon -> TyconRef
-val mk_local_ecref  : Tycon -> TyconRef
-
-val mk_nonlocal_ccu_top_tcref  : ccu (* viewed *) -> Tycon -> TyconRef
-
-val mk_vref_in_modref   : ModuleOrNamespaceRef -> Val -> ValRef
-val MakeNestedTcref  : ModuleOrNamespaceRef -> Tycon -> TyconRef
-val mk_rfref_in_tcref   : ModuleOrNamespaceRef -> Tycon -> ident -> RecdFieldRef
-
-//-------------------------------------------------------------------------
-// Generate new locals
-//------------------------------------------------------------------------- 
-
-val expr_for_vref : range -> ValRef -> expr
-
-(* NOTE: try to use expr_for_vref or the expression returned from mk_local instead of this. *)
-val expr_for_val : range -> Val -> expr
-val gen_mk_local : range -> string -> typ -> ValMutability -> bool -> Val * expr
-val mk_local : range -> string -> typ -> Val * expr
-val mk_compgen_local : range -> string -> typ -> Val * expr
-val mk_mut_compgen_local : range -> string -> typ -> Val * expr
-val mk_compgen_local_and_invisible_bind : TcGlobals -> string -> range -> expr -> Val * expr * Binding 
-
-//-------------------------------------------------------------------------
-// Make lambdas
-//------------------------------------------------------------------------- 
-
-val mk_multi_lambda : range -> Val list -> expr * typ -> expr
-val mk_basev_multi_lambda : range -> Val option -> Val list -> expr * typ -> expr
-val mk_lambda : range -> Val -> expr * typ -> expr
-val mk_tlambda : range -> typars -> expr * typ -> expr
-val mk_obj_expr : typ * Val option * expr * ObjExprMethod list * (typ * ObjExprMethod list) list * Range.range -> expr
-val mk_tchoose : range -> typars -> expr -> expr
-val mk_lambdas : range -> typars -> Val list -> expr * typ -> expr
-val mk_multi_lambdas_core : range -> Val list list -> expr * typ -> expr * typ
-val mk_multi_lambdas : range -> typars -> Val list list -> expr * typ -> expr
-val mk_basev_multi_lambdas : range -> typars -> Val option -> Val list list -> expr * typ -> expr
-
-val mk_while      : TcGlobals -> SequencePointInfoForWhileLoop * expr * expr * range                          -> expr
-val mk_for        : TcGlobals -> SequencePointInfoForForLoop * Val * expr * ForLoopStyle * expr * expr * range -> expr
-val mk_try_catch  : TcGlobals -> expr * Val * expr * Val * expr * range * typ * SequencePointInfoForTry * SequencePointInfoForWith -> expr
-val mk_try_finally: TcGlobals -> expr * expr * range * typ * SequencePointInfoForTry * SequencePointInfoForFinally -> expr
-
-//-------------------------------------------------------------------------
-// Make let/letrec
-//------------------------------------------------------------------------- 
- 
-
-// Generate a user-level let-bindings
-val mk_bind : SequencePointInfoForBinding -> Val -> expr -> Binding
-val mk_let_bind : range -> Binding -> expr -> expr
-val mk_lets_bind : range -> Binding list -> expr -> expr
-val mk_lets_from_Bindings : range -> Bindings -> expr -> expr
-val mk_let : SequencePointInfoForBinding -> range -> Val -> expr -> expr -> expr
-val mk_multi_lambda_bind : Val -> SequencePointInfoForBinding -> range -> typars -> Val list list -> expr * typ -> Binding
-
-// Compiler generated bindings may involve a user variable.
-// Compiler generated bindings may give rise to a sequence point if they are part of
-// an SPAlways expression. Compiler generated bindings can arise from for example, inlining.
-val mk_compgen_bind : Val -> expr -> Binding
-val mk_compgen_binds : Val list -> expr list -> Bindings
-val mk_compgen_let : range -> Val -> expr -> expr -> expr
-
-// Invisible bindings are never given a sequence point and should never have side effects
-val mk_invisible_let : range -> Val -> expr -> expr -> expr
-val mk_invisible_bind : Val -> expr -> Binding
-val mk_invisible_binds : Val list -> expr list -> Binding list
-val mk_invisible_FlatBindings : FlatVals -> FlatExprs -> Bindings
-
-val mk_letrec_binds : range -> Bindings -> expr -> expr
-val mk_letrec_binds_typed : range -> Bindings -> expr * 'a -> expr * 'a
-
- 
-//-------------------------------------------------------------------------
-// Type schemes
-//------------------------------------------------------------------------- 
- 
-type TypeScheme   = 
-    TypeScheme of 
-        typars (* the truly generalized type parameters *) 
-      * typars (* free choice type parameters from a recursive block where this value only generalizes a subsest of the overall set of type parameters generalized *)
-      * typ    (* the 'tau' type forming the body of the generalized type *)
-
-val mk_poly_bind_rhs : range -> TypeScheme -> expr -> expr
-val is_being_generalized : Typar -> TypeScheme -> bool
-
-//-------------------------------------------------------------------------
-// Make lazy and/or
-//------------------------------------------------------------------------- 
-
-val mk_lazy_and  : TcGlobals -> range -> expr -> expr -> expr
-val mk_lazy_or   : TcGlobals -> range -> expr -> expr -> expr
-val mk_byref_typ : TcGlobals -> typ -> typ
-val mk_nativeint_typ : TcGlobals -> typ
-val mk_unit_typ : TcGlobals -> typ
-
-//-------------------------------------------------------------------------
-// Make construction operations
-//------------------------------------------------------------------------- 
-
-val mk_ucase : UnionCaseRef * tinst * expr list * range -> expr
-val mk_exnconstr : TyconRef * expr list * range -> expr
-val mk_asm : ILInstr list * tinst * expr list * typ list * range -> expr
-val mk_coerce : expr * typ * range * typ -> expr
-val mk_rethrow : range -> typ -> expr
-val mk_rethrow_library_call : TcGlobals -> typ -> range -> expr
-
-
-//-------------------------------------------------------------------------
-// Make projection operations
-//------------------------------------------------------------------------- 
- 
-val mk_tuple_field_get                : expr                  * tinst * int         * range -> expr
-val mk_recd_field_get_via_expra       : expr * RecdFieldRef   * tinst               * range -> expr
-val mk_recd_field_get_addr_via_expra  : expr * RecdFieldRef   * tinst               * range -> expr
-val mk_static_rfield_get              :        RecdFieldRef   * tinst               * range -> expr
-val mk_static_rfield_set              :        RecdFieldRef   * tinst * expr        * range -> expr
-val mk_static_rfield_get_addr         :        RecdFieldRef   * tinst               * range -> expr
-val mk_recd_field_set_via_expra       : expr * RecdFieldRef   * tinst * expr        * range -> expr
-val mk_ucase_tag_get                  : expr * TyconRef       * tinst               * range -> expr
-val mk_ucase_proof                    : expr * UnionCaseRef   * tinst               * range -> expr
-val mk_ucase_field_get_proven         : expr * UnionCaseRef   * tinst * int         * range -> expr
-val mk_ucase_field_get_unproven       : expr * UnionCaseRef   * tinst * int         * range -> expr
-val mk_exnconstr_field_get            : expr * TyconRef               * int         * range -> expr
-val mk_ucase_field_set                : expr * UnionCaseRef   * tinst * int  * expr * range -> expr
-val mk_exnconstr_field_set            : expr * TyconRef               * int  * expr * range -> expr
-
-//-------------------------------------------------------------------------
-// Compiled view of tuples
-//------------------------------------------------------------------------- 
- 
-val maxTuple : int
-val goodTupleFields : int
-val compiled_tuple_tcref : TcGlobals -> 'a list -> TyconRef
-val compiled_tuple_ty : TcGlobals -> typ list -> typ
-val compiled_mk_tuple : TcGlobals -> typ list * expr list * range -> TyconRef * typ list * expr list * range
-
-val mk_call_Tuple_ItemN : TcGlobals -> range -> int -> ILType -> expr -> typ -> expr
-val split_after : int -> 'a list -> 'a list * 'a list
-val get_rfref_of_tcref : TyconRef * int -> RecdFieldRef
-
-//-------------------------------------------------------------------------
-// Take the address of an expression, or force it into a mutable local. Any allocated
-// mutable local may need to be kept alive over a larger expression, hence we return
-// a wrapping function that wraps "let mutable loc = expr in ..." around a larger
-// expression.
-//------------------------------------------------------------------------- 
-
-exception DefensiveCopyWarning of string * range 
-type mutates = DefinitelyMutates | PossiblyMutates | NeverMutates
-val mk_expra_of_expr : TcGlobals -> bool -> mutates -> expr -> range -> (expr -> expr) * expr
-
-//-------------------------------------------------------------------------
-// Tables keyed on values and/or type parameters
-//------------------------------------------------------------------------- 
-
-[]
-type ValMap<'a> = 
-    struct
-        val imap: I64map.t<'a>
-        new : I64map.t<'a> -> ValMap<'a>
-    end
-
-val vspec_map_find    : Val -> ValMap<'a> -> 'a
-val vspec_map_tryfind : Val -> ValMap<'a> -> 'a option
-val vspec_map_mem     : Val -> ValMap<'a> -> bool
-val vspec_map_add     : Val -> 'a -> ValMap<'a> -> ValMap<'a>
-val vspec_map_remove  : Val -> ValMap<'a> -> ValMap<'a>
-val vspec_map_empty   : unit -> ValMap<'a>
-val vspec_map_is_empty   : ValMap<'a> -> bool
-val vspec_map_of_list  : (Val * 'a) list -> ValMap<'a>
-
-type ValHash<'a> 
-val vspec_hash_find    : ValHash<'a> -> Val -> 'a
-val vspec_hash_tryfind : ValHash<'a> -> Val -> 'a option
-val vspec_hash_mem     : ValHash<'a> -> Val -> bool
-val vspec_hash_add     : ValHash<'a> -> Val -> 'a -> unit
-val vspec_hash_remove  : ValHash<'a> -> Val -> unit
-val vspec_hash_create  : unit -> ValHash<'a>
-
-
-type ValMultiMap<'a> = ValMap<'a list>
-val vspec_mmap_find : Val -> ValMultiMap<'a> -> 'a list
-val vspec_mmap_add  : Val -> 'a -> ValMultiMap<'a> -> ValMultiMap<'a>
-val vspec_mmap_empty : unit -> ValMultiMap<'a>
-
-type TyparMap<'a> 
-val tpmap_find   : Typar -> TyparMap<'a> -> 'a
-val tpmap_mem   : Typar -> TyparMap<'a> -> bool
-val tpmap_add   : Typar -> 'a -> TyparMap<'a> -> TyparMap<'a> 
-val tpmap_empty : unit -> TyparMap<'a> 
-
-type TcrefMap<'a> = TCRefMap of 'a Lib.I64map.t
-val tcref_map_tryfind : TyconRef -> TcrefMap<'a> -> 'a option
-val tcref_map_find    : TyconRef -> TcrefMap<'a> -> 'a
-val tcref_map_mem     : TyconRef -> TcrefMap<'a> -> bool
-val tcref_map_add     : TyconRef -> 'a -> TcrefMap<'a> -> TcrefMap<'a>
-val tcref_map_empty   : unit -> TcrefMap<'a>
-val tcref_map_of_list : (TyconRef * 'a) list -> TcrefMap<'a>
-
-type TcrefMultiMap<'a> = 'a list TcrefMap
-val tcref_mmap_find : TyconRef -> TcrefMultiMap<'a> -> 'a list
-val tcref_mmap_add  : TyconRef -> 'a -> TcrefMultiMap<'a> -> TcrefMultiMap<'a>
-val tcref_mmap_empty : unit -> TcrefMultiMap<'a>
-
-val val_spec_order : Val -> Val -> int
-val tycon_spec_order : Tycon -> Tycon -> int
-val rfref_order : RecdFieldRef -> RecdFieldRef -> int
-val typar_spec_order : Typar -> Typar -> int
-val bind_order : Binding -> Binding -> int
-
-val tcref_eq : TcGlobals -> TyconRef -> TyconRef -> bool
-val tycon_eq : Tycon -> Tycon -> bool
-
-//-------------------------------------------------------------------------
-// Operations on types: substitution
-//------------------------------------------------------------------------- 
-
-type TyparInst = (Typar * typ) list
-
-type TyconRefRemap = TyconRef TcrefMap
-type ValRemap = ValMap
-type Remap =
-    { tpinst : TyparInst;
-      vspec_remap: ValRemap;
-      tcref_remap : TyconRefRemap }
-type tyenv = Remap      
-val empty_tcref_remap : TyconRefRemap
-val empty_tyenv : tyenv
-
-val mk_typar_inst : typars -> typ list -> TyparInst
-val mk_tcref_inst : TyconRef -> tinst -> TyparInst
-val empty_tpinst : TyparInst
-
-val InstType               : TyparInst -> typ -> typ
-val inst_types              : TyparInst -> tinst -> tinst
-val inst_typar_constraints  : TyparInst -> TyparConstraint list -> TyparConstraint list 
-val inst_trait              : TyparInst -> TraitConstraintInfo -> TraitConstraintInfo 
-
-/// These are just substitutions (REVIEW: remove)
-type tpenv = (Typar * typ) list
-val empty_tpenv : TyparInst
-
-//-------------------------------------------------------------------------
-// From typars to types 
-//------------------------------------------------------------------------- 
-
-val generalize_typars : typars -> tinst
-val generalize_tcref : TyconRef -> typ list * typ
-val mk_typar_to_typar_renaming : typars -> typars -> TyparInst * typ list
-
-//-------------------------------------------------------------------------
-// See through typar equations from inference and/or type abbreviation equations.
-//------------------------------------------------------------------------- 
-
-val reduce_tcref_abbrev : TyconRef -> typ list -> typ
-val reduce_tcref_measureable : TyconRef -> typ list -> typ
-val reduce_tcref_abbrev_measure : TyconRef -> measure
-
-/// set bool to 'true' to allow shortcutting of type parameter equation chains during stripping 
-val strip_tpeqns_and_tcabbrevsA : TcGlobals -> bool -> typ -> typ 
-val strip_tpeqns_and_tcabbrevs : TcGlobals -> typ -> typ
-val strip_tpeqns_and_tcabbrevs_and_measureable : TcGlobals -> typ -> typ
-
-//-------------------------------------------------------------------------
-// See through exception abbreviations
-//------------------------------------------------------------------------- 
-
-val strip_eqns_from_ecref : TyconRef -> Tycon
-
-//-------------------------------------------------------------------------
-// Analyze types.  These all look through type abbreviations and 
-// inference equations, i.e. are "stripped"
-//------------------------------------------------------------------------- 
-
-val dest_forall_typ     : TcGlobals -> typ -> typars * typ
-val dest_fun_typ        : TcGlobals -> typ -> typ * typ
-val dest_tuple_typ      : TcGlobals -> typ -> typ list
-val dest_typar_typ      : TcGlobals -> typ -> Typar
-val dest_anypar_typ     : TcGlobals -> typ -> Typar
-val dest_measure_typ    : TcGlobals -> typ -> measure
-val try_dest_forall_typ : TcGlobals -> typ -> typars * typ
-
-val is_fun_typ          : TcGlobals -> typ -> bool
-val is_forall_typ       : TcGlobals -> typ -> bool
-val is_tuple_typ        : TcGlobals -> typ -> bool
-val is_tuple_struct_typ : TcGlobals -> typ -> bool
-val is_union_typ        : TcGlobals -> typ -> bool
-val is_repr_hidden_typ  : TcGlobals -> typ -> bool
-val is_fsobjmodel_typ   : TcGlobals -> typ -> bool
-val is_recd_typ         : TcGlobals -> typ -> bool
-val is_typar_typ        : TcGlobals -> typ -> bool
-val is_anypar_typ       : TcGlobals -> typ -> bool
-val is_measure_typ      : TcGlobals -> typ -> bool
-
-val contains_measures_typ : TcGlobals -> typ -> bool
-
-val mk_tyapp_ty : TyconRef -> tinst -> typ
-
-val mk_proven_ucase_typ : UnionCaseRef -> tinst -> typ
-val is_proven_ucase_typ : typ -> bool
-
-val is_stripped_tyapp_typ     : TcGlobals -> typ -> bool
-val dest_stripped_tyapp_typ   : TcGlobals -> typ -> TyconRef * tinst
-val tcref_of_stripped_typ     : TcGlobals -> typ -> TyconRef
-val try_tcref_of_stripped_typ : TcGlobals -> typ -> TyconRef option
-val tinst_of_stripped_typ     : TcGlobals -> typ -> tinst
-val mk_inst_for_stripped_typ  : TcGlobals -> typ -> TyparInst
-
-val domain_of_fun_typ  : TcGlobals -> typ -> typ
-val range_of_fun_typ   : TcGlobals -> typ -> typ
-val strip_fun_typ      : TcGlobals -> typ -> typ list * typ
-val strip_fun_typ_upto : TcGlobals -> int -> typ -> typ list * typ
-
-val reduce_forall_typ : TcGlobals -> typ -> tinst -> typ
-
-val try_dest_tuple_typ : TcGlobals -> typ -> typ list
-
-(* union data constructors *)
-val rty_of_ucref               : UnionCaseRef -> typ
-val rfields_of_ucref           : UnionCaseRef -> RecdField list
-val rty_of_uctyp : UnionCaseRef -> tinst -> typ
-val ucref_index: UnionCaseRef -> int
-val ucrefs_of_tcref: TyconRef -> UnionCaseRef list
-
-(* fields of union data constructors *)
-val typ_of_ucref_rfield_by_idx : UnionCaseRef -> tinst -> int -> typ
-val typs_of_ucref_rfields : TyparInst -> UnionCaseRef -> typ list
-
-(* fields of records *)
-val typ_of_rfield           : TyparInst -> RecdField -> typ
-
-val actual_rtyp_of_rfref   : RecdFieldRef -> tinst -> typ
-val rfref_index            : RecdFieldRef -> int
-
-val typs_of_instance_rfields_of_tcref    : TyparInst -> TyconRef -> typ list
-val actual_typ_of_rfield     : Tycon -> tinst -> RecdField -> typ
-val instance_rfrefs_of_tcref : TyconRef -> RecdFieldRef list
-val all_rfrefs_of_tcref      : TyconRef -> RecdFieldRef list
-
-(* fields of exception constructors *)
-val rfields_of_ecref : TyconRef -> RecdField list
-val typs_of_ecref_rfields : TyconRef -> typ list
-
-val IterType : (typ -> unit) * (Typar -> unit) * (TraitConstraintSln -> unit) -> typ -> unit
-
-val is_typeof_vref : TcGlobals -> ValRef -> bool
-val is_typedefof_vref : TcGlobals -> ValRef -> bool
-
-//-------------------------------------------------------------------------
-// Top types: guaranteed to be compiled to .NET methods, and must be able to 
-// have user-specified argument names (for stability w.r.t. reflection)
-// and user-specified argument and return attributes.
-//------------------------------------------------------------------------- 
-
-type UncurriedArgInfos = (typ * TopArgInfo) list 
-type CurriedArgInfos = UncurriedArgInfos list
-
-val GetTopTauTypeInFSharpForm : TcGlobals -> TopArgInfo list list -> typ -> range -> CurriedArgInfos * typ
-val GetTopValTypeInFSharpForm     : TcGlobals -> ValTopReprInfo -> typ -> range -> typars * CurriedArgInfos * typ * TopArgInfo
-val IsCompiledAsStaticValue       : TcGlobals -> Val -> bool
-val GetTopValTypeInCompiledForm   : TcGlobals -> ValTopReprInfo -> typ -> range -> typars * CurriedArgInfos * typ option * TopArgInfo
-val GetFSharpViewOfReturnType : TcGlobals -> typ option -> typ
-
-val NormalizeDeclaredTyparsForEquiRecursiveInference : TcGlobals -> typars -> typars
-
-//-------------------------------------------------------------------------
-// Compute the return type after an application
-//------------------------------------------------------------------------- 
- 
-val apply_types : TcGlobals -> typ -> typ list * 'a list -> typ
-
-//-------------------------------------------------------------------------
-// Compute free variables in types
-//------------------------------------------------------------------------- 
- 
-val empty_free_loctypars : FreeTypars
-val union_free_loctypars : FreeTypars -> FreeTypars -> FreeTypars
-
-val empty_free_loctycons : FreeTycons
-val union_free_loctycons : FreeTycons -> FreeTycons -> FreeTycons
-
-val empty_free_tyvars : FreeTyvars
-val union_free_tyvars : FreeTyvars -> FreeTyvars -> FreeTyvars
-
-val empty_free_locvals : FreeLocals
-val union_free_locvals : FreeLocals -> FreeLocals -> FreeLocals
-
-type FreeVarOptions 
-
-val CollectLocalsNoCaching : FreeVarOptions
-val CollectTyparsNoCaching : FreeVarOptions
-val CollectTyparsAndLocalsNoCaching : FreeVarOptions
-val CollectTyparsAndLocals : FreeVarOptions
-val CollectLocals : FreeVarOptions
-val CollectTypars : FreeVarOptions
-val CollectAllNoCaching : FreeVarOptions
-val CollectAll : FreeVarOptions
-
-val acc_free_in_types : FreeVarOptions -> typ list -> FreeTyvars -> FreeTyvars
-val acc_free_in_type : FreeVarOptions -> typ -> FreeTyvars -> FreeTyvars
-val acc_free_tprefs : FreeVarOptions -> typars -> FreeTyvars -> FreeTyvars
-
-val free_in_type  : FreeVarOptions -> typ      -> FreeTyvars
-val free_in_types : FreeVarOptions -> typ list -> FreeTyvars
-val free_in_val   : FreeVarOptions -> Val -> FreeTyvars
-
-(* This one puts free variables in canonical left-to-right order. *)
-val free_in_type_lr : TcGlobals -> bool -> typ -> typars
-val free_in_types_lr : TcGlobals -> bool -> typ list -> typars
-val free_in_types_lr_no_cxs : TcGlobals -> typ list -> typars
-
-
-//-------------------------------------------------------------------------
-// Equivalence of types (up to substitution of type variables in the left-hand type)
-//------------------------------------------------------------------------- 
-
-type TypeEquivEnv = 
-    { ae_typars: TyparMap;
-      ae_tcrefs: TyconRefRemap }
-
-val tyeq_env_empty : TypeEquivEnv
-
-val bind_tyeq_env_typars : typars -> typars   -> TypeEquivEnv -> TypeEquivEnv
-val bind_tyeq_env_types  : typars -> typ list -> TypeEquivEnv -> TypeEquivEnv
-val bind_tyeq_env_tpinst : TyparInst         -> TypeEquivEnv -> TypeEquivEnv
-val mk_tyeq_env          : typars -> typars                     -> TypeEquivEnv
-
-type Erasure = EraseAll | EraseMeasures | EraseNone
-val traits_aequiv_aux           : Erasure -> TcGlobals -> TypeEquivEnv -> TraitConstraintInfo  -> TraitConstraintInfo  -> bool
-val traits_aequiv               :            TcGlobals -> TypeEquivEnv -> TraitConstraintInfo  -> TraitConstraintInfo  -> bool
-val typarConstraints_aequiv_aux : Erasure -> TcGlobals -> TypeEquivEnv -> TyparConstraint      -> TyparConstraint      -> bool
-val typarConstraints_aequiv     :            TcGlobals -> TypeEquivEnv -> TyparConstraint      -> TyparConstraint      -> bool
-val typar_decls_aequiv          :            TcGlobals -> TypeEquivEnv -> typars               -> typars               -> bool
-val type_aequiv_aux             : Erasure -> TcGlobals -> TypeEquivEnv -> typ                  -> typ                  -> bool
-val type_aequiv                 :            TcGlobals -> TypeEquivEnv -> typ                  -> typ                  -> bool
-val return_types_aequiv_aux     : Erasure -> TcGlobals -> TypeEquivEnv -> typ option           -> typ option           -> bool
-val return_types_aequiv         :            TcGlobals -> TypeEquivEnv -> typ option           -> typ option           -> bool
-val tcref_aequiv                :            TcGlobals -> TypeEquivEnv -> TyconRef             -> TyconRef             -> bool
-val type_equiv_aux              : Erasure -> TcGlobals                   -> typ                  -> typ                  -> bool
-val type_equiv                  :            TcGlobals                   -> typ                  -> typ                  -> bool
-val measure_equiv               :            TcGlobals                   -> measure              -> measure              -> bool
-
-//-------------------------------------------------------------------------
-// Unit operations
-//------------------------------------------------------------------------- 
-val MeasurePower : measure -> int -> measure
-val ListMeasureVarOccsWithNonZeroExponents : measure -> (Typar * int) list
-val ListMeasureConOccsWithNonZeroExponents : TcGlobals -> bool -> measure -> (TyconRef * int) list
-val ProdMeasures : measure list -> measure
-val MeasureVarExponent : Typar -> measure -> int
-val MeasureConExponent : TcGlobals -> bool -> TyconRef -> measure -> int
-
-//-------------------------------------------------------------------------
-// VSPR values (i.e. values that are really members in the object model)
-//------------------------------------------------------------------------- 
-
-val GetNumObjArgsOfVal: Val -> int
-val GetNumObjArgsOfValRef: ValRef -> int
-
-val GetTypeOfMemberInMemberForm : TcGlobals -> ValRef -> typars * CurriedArgInfos * typ option * TopArgInfo
-val GetTypeOfIntrinsicMemberInCompiledForm : TcGlobals -> ValRef -> typars * CurriedArgInfos * typ option * TopArgInfo
-val GetMemberTypeInMemberForm : TcGlobals -> MemberFlags -> ValTopReprInfo -> typ -> range -> typars * CurriedArgInfos * typ option * TopArgInfo
-
-val PartitionValTypars : TcGlobals -> Val -> (typars * typars * typars * TyparInst * typ list) option
-val PartitionValRefTypars : TcGlobals -> ValRef -> (typars * typars * typars * TyparInst * typ list) option
-
-val ReturnTypeOfPropertyVal : TcGlobals -> Val -> typ
-val ArgInfosOfPropertyVal : TcGlobals -> Val -> UncurriedArgInfos 
-val ArgInfosOfMember: TcGlobals -> ValRef -> CurriedArgInfos 
-
-val GetMemberCallInfo : TcGlobals -> ValRef * ValUseFlag -> int * bool * bool * bool * bool * bool * bool * bool
-
-//-------------------------------------------------------------------------
-// Printing
-//------------------------------------------------------------------------- 
- 
-module PrettyTypes =
-    val NeedsPrettyTyparName : Typar -> bool
-    val PrettyTyparNames : (Typar -> bool) -> string list -> typars -> string list
-    val PrettifyTypes1 : TcGlobals -> typ -> TyparInst * typ * (Typar * TyparConstraint) list
-    val PrettifyTypes2 : TcGlobals -> typ * typ -> TyparInst * (typ * typ) * (Typar * TyparConstraint) list
-    val PrettifyTypesN : TcGlobals -> typ list -> TyparInst * typ list * (Typar * TyparConstraint) list
-
-type DisplayEnv = {html: bool;
-                   htmlHideRedundantKeywords: bool;
-                   htmlAssemMap: string Lib.NameMap;
-                   openTopPaths: (string list) list;
-                   showObsoleteMembers: bool; 
-                   showTyparBinding: bool;
-                   showImperativeTyparAnnotations: bool;
-                   suppressInlineKeyword:bool;
-                   showMemberContainers: bool;
-                   shortConstraints:bool;
-                   showAttributes: bool;
-                   showOverrides:bool;
-                   showConstraintTyparAnnotations:bool;
-                   abbreviateAdditionalConstraints: bool;
-                   showTyparDefaultConstraints: bool;
-                   g: TcGlobals ;
-                   contextAccessibility: Accessibility;
-                   generatedValueLayout:(Val -> layout option);                     
-                   }
-      with 
-          member Normalize: unit -> DisplayEnv
-      end
-
-val empty_denv : TcGlobals -> DisplayEnv
-val denv_add_open_path   : path   -> DisplayEnv -> DisplayEnv
-val denv_add_open_modref : ModuleOrNamespaceRef   -> DisplayEnv -> DisplayEnv
-
-val full_name_of_nlpath : NonLocalPath -> string
-
-/// Return the full text for an item as we want it displayed to the user as a fully qualified entity
-val full_display_text_of_modref : ModuleOrNamespaceRef -> string
-val full_display_text_of_parent_of_modref : ModuleOrNamespaceRef -> string option
-val full_display_text_of_vref   : ValRef -> string
-val full_display_text_of_tcref  : TyconRef -> string
-val full_display_text_of_ecref  : TyconRef -> string
-val full_display_text_of_ucref  : UnionCaseRef -> string
-val full_display_text_of_rfref  : RecdFieldRef -> string
-
-val ticks_and_argcount_text_of_tcref : TyconRef -> string
-
-/// Return the full path to the item using mangled names (well, sort of), to act as a unique key into the FSI generation lookaside table.
-/// The mangled names have to precisely match the path names implicitly embedded as attributes into layout objects by the NicePrint code below.
-/// This is a very fragile technique and the mangled names are not really guaranteed to be unique (e.g. the mangled names
-/// don't cope with overloading of types by generic arity), and this whole business of using mangled paths is not a 
-/// good technique in general. Hence these functions should not be used outside the FSI generation code.
-val approx_full_mangled_name_of_modref : ModuleOrNamespaceRef -> string
-val approx_full_mangled_name_of_vref : ValRef -> string
-val approx_full_mangled_name_of_tcref  : TyconRef -> string
-val approx_full_mangled_name_of_ecref  : TyconRef -> string
-val approx_full_mangled_name_of_ucref  : UnionCaseRef -> string
-val approx_full_mangled_name_of_rfref  : RecdFieldRef -> string
-
-/// A unique qualified name for each type definition, used to qualify the names of interface implementation methods
-val qualified_mangled_name_of_tcref : TyconRef -> string -> string
-
-module NicePrint =
-    val constL : Constant -> layout
-    val typeL                       : DisplayEnv -> typ -> layout
-    val constraintL                 : DisplayEnv -> (Typar * TyparConstraint) -> layout 
-    val topTypAndConstraintsL       : DisplayEnv -> (typ * TopArgInfo) list -> typ -> layout
-    val typesAndConstraintsL        : DisplayEnv -> typ list -> layout list * layout
-    val tyconL                      : DisplayEnv -> layout -> Tycon -> layout
-    val memberSigL                  : DisplayEnv -> TyparInst * string * typars * CurriedArgInfos * typ -> layout
-    val measureL                    : DisplayEnv -> measure -> layout
-    val valL                        : DisplayEnv -> Val -> layout
-    val exnDefnL                    : DisplayEnv -> Tycon -> layout
-    val exnDefnReprL                : DisplayEnv -> ExceptionInfo -> layout
-    val dataExprL                   : DisplayEnv -> expr -> layout
-
-    val InferredSigOfModuleExprL    : bool -> DisplayEnv -> ModuleOrNamespaceExprWithSig -> layout
-    val ModuleOrNamespaceTypeL      : DisplayEnv -> ModuleOrNamespaceType -> layout
-    val ModuleOrNamespaceL          : DisplayEnv -> ModuleOrNamespace -> layout
-    val AssemblyL                   : DisplayEnv -> ModuleOrNamespace -> layout
-    
-    val string_of_typ               : DisplayEnv -> typ -> string
-    val pretty_string_of_typ        : DisplayEnv -> typ -> string
-    val pretty_string_of_unit       : DisplayEnv -> measure -> string
-    val string_of_typar_constraints : DisplayEnv -> (Typar * TyparConstraint) list  -> string
-    val string_of_typar_constraint  : DisplayEnv -> Typar * TyparConstraint -> string
-
-    val output_tref                 : DisplayEnv -> StringBuilder -> ILTypeRef -> unit
-    val output_tcref                : DisplayEnv -> StringBuilder -> TyconRef -> unit
-    val output_typ                  : DisplayEnv -> StringBuilder -> typ -> unit
-    val output_typars               : DisplayEnv -> string -> StringBuilder -> typars -> unit
-    val output_typar_constraint     : DisplayEnv -> StringBuilder -> Typar * TyparConstraint -> unit
-    val output_typar_constraints    : DisplayEnv -> StringBuilder -> (Typar * TyparConstraint) list -> unit
-    val output_qualified_val_spec   : DisplayEnv -> StringBuilder -> Val -> unit
-    
-    val string_of_qualified_val_spec : DisplayEnv -> Val -> string
-
-    val output_tycon                : DisplayEnv -> StringBuilder -> Tycon -> unit
-    val output_ucase                : DisplayEnv -> StringBuilder -> UnionCase -> unit
-    val output_rfield               : DisplayEnv -> StringBuilder -> RecdField -> unit
-    val output_exnc                 : DisplayEnv -> StringBuilder -> Tycon -> unit
-    
-    val string_of_tycon             : DisplayEnv -> Tycon -> string
-    val string_of_ucase             : DisplayEnv -> UnionCase -> string
-    val string_of_rfield            : DisplayEnv -> RecdField -> string
-    val string_of_exnc              : DisplayEnv -> Tycon -> string
-
-val adhoc_of_tycon : Tycon -> ValRef list
-val super_of_tycon : TcGlobals -> Tycon -> Tast.typ
-val implements_of_tycon : TcGlobals -> Tycon -> Tast.typ list
-val vslot_vals_of_tycons : Tycon list -> Val list
-
-//-------------------------------------------------------------------------
-// Free variables in expressions etc.
-//------------------------------------------------------------------------- 
-
-val empty_freevars : FreeVars
-val union_freevars : FreeVars -> FreeVars -> FreeVars
-
-val acc_free_in_targets      : FreeVarOptions -> DecisionTreeTarget array -> FreeVars -> FreeVars
-val acc_free_in_exprs        : FreeVarOptions -> expr list -> FreeVars -> FreeVars
-val acc_free_in_switch_cases : FreeVarOptions -> DecisionTreeCase list -> DecisionTree option -> FreeVars -> FreeVars
-val acc_free_in_dtree        : FreeVarOptions -> DecisionTree -> FreeVars -> FreeVars
-
-/// Get the free variables in a module definition.
-val free_in_mdef : FreeVarOptions -> ModuleOrNamespaceExpr -> FreeVars
-
-/// Get the free variables in an expression.
-val free_in_expr  : FreeVarOptions -> expr  -> FreeVars
-
-/// Get the free variables in the right hand side of a binding.
-val free_in_rhs   : FreeVarOptions -> Binding  -> FreeVars
-
-val free_tyvars_all_public  : FreeTyvars -> bool
-val freevars_all_public     : FreeVars -> bool
-
-//-------------------------------------------------------------------------
-// Mark/range/position information from expressions
-//------------------------------------------------------------------------- 
-
-val range_of_expr : expr -> range
-
-//-------------------------------------------------------------------------
-// Top expressions to implement top types
-//------------------------------------------------------------------------- 
-
-val dest_top_lambda : expr * typ -> typars * Val list list * expr * typ
-val InferArityOfExpr : TcGlobals -> typ -> Tast.Attribs list list -> Tast.Attribs -> expr -> ValTopReprInfo
-val InferArityOfExprBinding : TcGlobals -> Val -> expr -> ValTopReprInfo
-val chosen_arity_of_bind : Binding -> ValTopReprInfo option
-
-//-------------------------------------------------------------------------
-//  Copy expressions and types
-//------------------------------------------------------------------------- 
-                   
-val empty_expr_remap : Remap
-
-(* REVIEW: this mutation should not be needed *)
-val set_val_has_no_arity : Val -> Val
-
-type ValCopyFlag = 
-    | CloneAll
-    | CloneAllAndMarkExprValsAsCompilerGenerated
-    // OnlyCloneExprVals is a nasty setting to reuse the cloning logic in a mode where all 
-    // Tycon and "module/member" Val objects keep their identity, but the Val objects for all expr bindings
-    // are cloned. This is used to 'fixup' the TAST created by tlr.ml. 
-    //
-    // This is a fragile mode of use. It's not really clear why TLR needs to create a "bad" expression tree that
-    // reuses Val objects as multiple value bindings, and its been the cause of several subtle bugs.
-    | OnlyCloneExprVals
-
-val remap_tcref : TyconRefRemap -> TyconRef -> TyconRef
-val remap_ucref : TyconRefRemap -> UnionCaseRef -> UnionCaseRef
-val remap_rfref : TyconRefRemap -> RecdFieldRef -> RecdFieldRef
-val remap_vref : Remap -> ValRef -> ValRef
-val remap_expr : TcGlobals -> ValCopyFlag -> Remap -> expr -> expr
-val remap_possible_forall_typ : TcGlobals -> Remap -> typ -> typ
-val copy_mtyp : TcGlobals -> ValCopyFlag -> ModuleOrNamespaceType -> ModuleOrNamespaceType
-val copy_expr : TcGlobals -> ValCopyFlag -> expr -> expr
-val copy_ImplFile : TcGlobals -> ValCopyFlag -> TypedImplFile -> TypedImplFile
-val copy_assembly : TcGlobals -> ValCopyFlag -> TypedAssembly -> TypedAssembly
-val copy_slotsig : SlotSig -> SlotSig
-val inst_slotsig : TyparInst -> SlotSig -> SlotSig
-val inst_expr : TcGlobals -> TyparInst -> expr -> expr
-
-//-------------------------------------------------------------------------
-// Build the remapping that corresponds to a module meeting its signature
-// and also report the set of tycons, tycon representations and values hidden in the process.
-//------------------------------------------------------------------------- 
-
-type SignatureRepackageInfo = 
-    { mrpiVals: (ValRef * ValRef) list;
-      mrpiTycons: (TyconRef * TyconRef) list  }
-      
-type SignatureHidingInfo = 
-    { mhiTycons  : Tycon Zset.t; 
-      mhiTyconReprs : Tycon Zset.t;  
-      mhiVals       : Val Zset.t; 
-      mhiRecdFields : RecdFieldRef Zset.t;
-      mhiUnionCases : UnionCaseRef Zset.t }
-
-val empty_mrpi : SignatureRepackageInfo
-val empty_mhi : SignatureHidingInfo
-val union_mhi : SignatureHidingInfo -> SignatureHidingInfo -> SignatureHidingInfo
-
-val mk_mtyp_to_mtyp_remapping : ModuleOrNamespaceType -> ModuleOrNamespaceType -> SignatureRepackageInfo * SignatureHidingInfo
-val mk_mdef_to_mtyp_remapping : ModuleOrNamespaceExpr -> ModuleOrNamespaceType -> SignatureRepackageInfo * SignatureHidingInfo
-val mk_assembly_boundary_mhi : ModuleOrNamespaceType -> SignatureHidingInfo
-val mtyp_of_mexpr : ModuleOrNamespaceExprWithSig -> ModuleOrNamespaceType
-val mk_repackage_remapping : SignatureRepackageInfo -> Remap 
-
-val wrap_modul_in_namespace : ident -> ModuleOrNamespace -> ModuleOrNamespace
-val wrap_mbind_in_namespace : ident -> ModuleOrNamespaceBinding -> ModuleOrNamespaceBinding
-val wrap_modul_as_mtyp_in_namespace : ModuleOrNamespace -> ModuleOrNamespaceType 
-val wrap_mtyp_as_mspec : ident -> CompilationPath -> ModuleOrNamespaceType -> ModuleOrNamespace
-
-val SigTypeOfImplFile : TypedImplFile -> ModuleOrNamespaceType
-
-//-------------------------------------------------------------------------
-// Given a list of top-most signatures that together constrain the public compilation units
-// of an assembly, compute a remapping that converts local references to non-local references.
-// This remapping must be applied to all pickled expressions and types 
-// exported from the assembly.
-//------------------------------------------------------------------------- 
-
-val MakeExportRemapping : ccu -> (ModuleOrNamespace -> Remap)
-val ApplyExportRemappingToEntity :  TcGlobals -> Remap -> ModuleOrNamespace -> ModuleOrNamespace 
-
-/// Query SignatureRepackageInfo
-val IsHiddenTycon     : (Remap * SignatureHidingInfo) list -> Tycon -> bool
-val IsHiddenTyconRepr : (Remap * SignatureHidingInfo) list -> Tycon -> bool
-val IsHiddenVal       : (Remap * SignatureHidingInfo) list -> Val -> bool
-val IsHiddenRecdField : (Remap * SignatureHidingInfo) list -> RecdFieldRef -> bool
-
-//-------------------------------------------------------------------------
-//  Adjust marks in expressions
-//------------------------------------------------------------------------- 
-
-val RemarkExpr : range -> expr -> expr
-
-//-------------------------------------------------------------------------
-// Make applications
-//------------------------------------------------------------------------- 
- 
-val prim_mk_app : (expr * typ) -> tinst -> expr list -> range -> expr
-val mk_appl : TcGlobals -> (expr * typ) * typ list list * expr list * range -> expr
-val mk_tyapp : range -> expr * typ -> typ list -> expr
-
-val mk_val_set   : range -> ValRef -> expr -> expr
-val mk_lval_set  : range -> ValRef -> expr -> expr
-val mk_lval_get  : range -> ValRef -> expr
-val mk_val_addr  : range -> ValRef -> expr
-
-//-------------------------------------------------------------------------
-// Note these take the address of the record expression if it is a struct, and
-// apply a type instantiation if it is a first-class polymorphic record field.
-//------------------------------------------------------------------------- 
-
-val mk_recd_field_get : TcGlobals -> expr * RecdFieldRef * tinst * tinst * range -> expr
-val mk_recd_field_set : TcGlobals -> expr * RecdFieldRef * tinst * expr * range -> expr
-
-//-------------------------------------------------------------------------
-//  Get the targets used in a decision graph (for reporting warnings)
-//------------------------------------------------------------------------- 
-
-val acc_targets_of_dtree : DecisionTree -> int list -> int list
-
-//-------------------------------------------------------------------------
-//  Optimizations on decision graphs
-//------------------------------------------------------------------------- 
-
-val mk_and_optimize_match : SequencePointInfoForBinding  -> range -> range -> typ -> DecisionTree -> DecisionTreeTarget list -> expr
-
-val prim_mk_match : SequencePointInfoForBinding * range * DecisionTree * DecisionTreeTarget array * range * typ -> expr
-
-//-------------------------------------------------------------------------
-//  Work out what things on the r.h.s. of a letrec need to be fixed up
-//------------------------------------------------------------------------- 
-
-val iter_letrec_fixups : 
-   TcGlobals -> Val option  -> 
-   (Val option -> expr -> (expr -> expr) -> expr -> unit) -> 
-   expr * (expr -> expr) -> expr -> unit
-
-//-------------------------------------------------------------------------
-// From lambdas taking multiple variables to lambdas taking a single variable
-// of tuple type. 
-//------------------------------------------------------------------------- 
-
-val multi_lambda_to_tupled_lambda: Val list -> expr -> Val * expr
-val AdjustArityOfLambdaBody          : TcGlobals -> int -> Val list -> expr -> Val list * expr
-
-//-------------------------------------------------------------------------
-// Make applications, doing beta reduction by introducing let-bindings
-//------------------------------------------------------------------------- 
-
-val MakeApplicationAndBetaReduce : TcGlobals -> expr * typ * tinst list * expr list * range -> expr
-
-val JoinTyparStaticReq : TyparStaticReq -> TyparStaticReq -> TyparStaticReq
-
-//-------------------------------------------------------------------------
-// More layout - this is for debugging
-//------------------------------------------------------------------------- 
-module DebugPrint =
-
-    val layout_ranges : bool ref
-    val showType : typ -> string
-    val showExpr : expr -> string
-
-val ValRefL : ValRef -> layout
-val UnionCaseRefL : UnionCaseRef -> layout
-val vspecAtBindL : Val -> layout
-val intL : int -> layout
-val valL : Val -> layout
-val TyparDeclL : Typar -> layout
-val traitL : TraitConstraintInfo -> layout
-val TyparL : Typar -> layout
-val TyparsL : typars -> layout
-val typeL : typ -> layout
-val SlotSigL : SlotSig -> layout
-val EntityTypeL : ModuleOrNamespaceType -> layout
-val EntityL : ModuleOrNamespace -> layout
-val TypeOfvalL : Val -> layout
-val MemberL : ValMemberInfo -> layout
-val BindingL : Binding -> layout
-val ExprL : expr -> layout
-val tyconL : Tycon -> layout
-val DecisionTreeL : DecisionTree -> layout
-val ImplFileL : TypedImplFile -> layout
-val AssemblyL : TypedAssembly -> layout
-val recdFieldRefL : RecdFieldRef -> layout
-
-//-------------------------------------------------------------------------
-// Fold on expressions
-//------------------------------------------------------------------------- 
-
-type ExprFolder<'a> =
-    { exprIntercept    : ('a -> expr -> 'a) -> 'a -> expr -> 'a option;
-      valBindingSiteIntercept          : 'a -> bool * Val -> 'a;
-      nonRecBindingsIntercept         : 'a -> Binding -> 'a;         
-      recBindingsIntercept        : 'a -> Bindings -> 'a;         
-      dtreeAcc           : 'a -> DecisionTree -> 'a;
-      targetIntercept    : ('a -> expr -> 'a) -> 'a -> DecisionTreeTarget -> 'a option;
-      tmethodIntercept   : ('a -> expr -> 'a) -> 'a -> ObjExprMethod -> 'a option;}
-val ExprFolder0 : ExprFolder<'a>
-val FoldImplFile: ExprFolder<'a> -> ('a -> TypedImplFile -> 'a) 
-val FoldExpr : ExprFolder<'a> -> ('a -> expr -> 'a) 
-
-val ExprStats : expr -> string
-
-//-------------------------------------------------------------------------
-// Make some common types
-//------------------------------------------------------------------------- 
-
-val mk_nativeptr_typ  : TcGlobals -> typ -> typ
-val mk_array_typ      : TcGlobals -> typ -> typ
-val is_option_ty     : TcGlobals -> typ -> bool
-val dest_option_ty   : TcGlobals -> typ -> typ
-val try_dest_option_ty : TcGlobals -> typ -> typ option
-
-//-------------------------------------------------------------------------
-// Primitives associated with compiling the IEvent idiom to .NET events
-//------------------------------------------------------------------------- 
-
-val is_fslib_IDelegateEvent_ty   : TcGlobals -> typ -> bool
-val dest_fslib_IDelegateEvent_ty : TcGlobals -> typ -> typ 
-val mk_fslib_IEvent2_ty   : TcGlobals -> typ -> typ -> typ
-
-//-------------------------------------------------------------------------
-// Primitives associated with printf format string parsing
-//------------------------------------------------------------------------- 
-
-val mk_lazy_ty : TcGlobals -> typ -> typ
-val mk_format_ty : TcGlobals -> typ -> typ -> typ -> typ -> typ -> typ
-
-//-------------------------------------------------------------------------
-// Classify types
-//------------------------------------------------------------------------- 
-
-val is_il_named_typ      : TcGlobals -> typ -> bool
-val mk_multi_dim_array_typ         : TcGlobals -> int -> typ -> typ
-val is_il_arr_tcref      : TcGlobals -> TyconRef -> bool
-val rank_of_il_arr_tcref : TcGlobals -> TyconRef -> int
-val is_il_arr_typ        : TcGlobals -> typ -> bool
-val is_il_arr1_typ       : TcGlobals -> typ -> bool
-val dest_il_arr1_typ     : TcGlobals -> typ -> typ
-val is_compat_array_typ  : TcGlobals -> typ -> bool
-val is_unit_typ          : TcGlobals -> typ -> bool
-val is_obj_typ           : TcGlobals -> typ -> bool
-val is_void_typ          : TcGlobals -> typ -> bool
-val is_il_ref_typ        : TcGlobals -> typ -> bool
-
-val is_any_array_typ      : TcGlobals -> typ -> bool
-val dest_any_array_typ    : TcGlobals -> typ -> typ
-val rank_of_any_array_typ : TcGlobals -> typ -> int
-
-val is_fsobjmodel_ref_typ         : TcGlobals -> typ -> bool
-val is_struct_tcref               : TyconRef -> bool
-val is_enum_tycon                 : Tycon -> bool
-val is_enum_tcref                 : TyconRef -> bool
-val is_interface_tycon                 : Tycon -> bool
-val is_interface_tcref                 : TyconRef -> bool
-val is_delegate_typ  : TcGlobals -> typ -> bool
-val is_interface_typ : TcGlobals -> typ -> bool
-val is_ref_typ    : TcGlobals -> typ -> bool
-val is_sealed_typ : TcGlobals -> typ -> bool
-val IsComInteropType : TcGlobals -> typ -> bool
-val GetUnderlyingTypeOfEnumType : TcGlobals -> typ -> typ
-val is_struct_typ : TcGlobals -> typ -> bool
-val is_class_typ  : TcGlobals -> typ -> bool
-val is_enum_typ   : TcGlobals -> typ -> bool
-val is_flag_enum_typ   : TcGlobals -> typ -> bool
-
-//-------------------------------------------------------------------------
-// Special semantic constraints
-//------------------------------------------------------------------------- 
-
-val IsUnionTypeWithNullAsTrueValue: TcGlobals -> Tycon -> bool
-val MemberIsCompiledAsInstance : TcGlobals -> TyconRef -> bool -> ValMemberInfo -> Attribs -> bool
-val ValSpecIsCompiledAsInstance : TcGlobals -> Val -> bool
-val ValRefIsCompiledAsInstanceMember : TcGlobals -> ValRef -> bool
-val ModuleNameIsMangled : TcGlobals -> Attribs -> bool
-
-val CompileAsEvent : TcGlobals -> Attribs -> bool
-
-val TypeNullIsExtraValue : TcGlobals -> typ -> bool
-val TypeNullIsTrueValue : TcGlobals -> typ -> bool
-val TypeNullNotLiked : TcGlobals -> typ -> bool
-val TypeNullNever : TcGlobals -> typ -> bool
-
-val TypeSatisfiesNullConstraint : TcGlobals -> typ -> bool
-val TypeHasDefaultValue : TcGlobals -> typ -> bool
-
-val is_partially_implemented_tycon : Tycon -> bool
-
-val ucref_alloc_observable : UnionCaseRef -> bool
-val tycon_alloc_observable : Tycon -> bool
-val tcref_alloc_observable : TyconRef -> bool
-val ecref_alloc_observable : TyconRef -> bool 
-val ucref_rfield_mutable : TcGlobals -> UnionCaseRef -> int -> bool
-val ecref_rfield_mutable : TyconRef -> int -> bool
-
-val use_genuine_field : Tycon -> RecdField -> bool 
-val gen_field_name : Tycon -> RecdField -> string
-
-//-------------------------------------------------------------------------
-// Destruct slotsigs etc.
-//------------------------------------------------------------------------- 
-
-val slotsig_has_void_rty     : SlotSig -> bool
-val actual_rty_of_slotsig    : tinst -> tinst -> SlotSig -> typ option
-
-val rty_of_tmethod : TcGlobals -> ObjExprMethod -> typ option
-
-//-------------------------------------------------------------------------
-// Primitives associated with initialization graphs
-//------------------------------------------------------------------------- 
-
-val mk_refcell              : TcGlobals -> range -> typ -> expr -> expr
-val mk_refcell_get          : TcGlobals -> range -> typ -> expr -> expr
-val mk_refcell_set          : TcGlobals -> range -> typ -> expr -> expr -> expr
-val mk_lazy_delayed         : TcGlobals -> range -> typ -> expr -> expr
-val mk_lazy_force           : TcGlobals -> range -> typ -> expr -> expr
-
-val mk_refcell_contents_rfref : TcGlobals -> RecdFieldRef
-val is_refcell_ty   : TcGlobals -> typ -> bool
-val dest_refcell_ty : TcGlobals -> typ -> typ
-val mk_refcell_ty   : TcGlobals -> typ -> typ
-
-val mk_seq_ty          : TcGlobals -> typ -> typ
-val mk_IEnumerator_ty  : TcGlobals -> typ -> typ
-val mk_list_ty         : TcGlobals -> typ -> typ
-val mk_option_ty       : TcGlobals -> typ -> typ
-val mk_none_ucref      : TcGlobals -> UnionCaseRef
-val mk_some_ucref      : TcGlobals -> UnionCaseRef
-
-val mk_nil  : TcGlobals -> range -> typ -> expr
-val mk_cons : TcGlobals -> typ -> expr -> expr -> expr
-
-//-------------------------------------------------------------------------
-// Make a few more expressions
-//------------------------------------------------------------------------- 
-
-val mk_seq  : SequencePointInfoForSeq -> range -> expr -> expr -> expr
-val mk_compgen_seq  : range -> expr -> expr -> expr
-val mk_seqs : SequencePointInfoForSeq -> TcGlobals -> range -> expr list -> expr   
-val mk_recd : TcGlobals -> RecordConstructionInfo * TyconRef * tinst * RecdFieldRef list * expr list * range -> expr
-val mk_unbox : typ -> expr -> range -> expr
-val mk_isinst : typ -> expr -> range -> expr
-val mk_null : range -> typ -> expr
-val mk_nonnull_test : TcGlobals -> range -> expr -> expr
-val mk_nonnull_poke : TcGlobals -> range -> expr -> expr
-val mk_isinst_cond : TcGlobals -> range -> typ -> expr -> Val -> expr -> expr -> expr
-val mk_throw   : range -> typ -> expr -> expr
-val mk_ldarg0 : range -> typ -> expr
-
-val mk_ilzero : range * typ -> expr
-
-val mk_string    : TcGlobals -> range -> string -> expr
-val mk_int64     : TcGlobals -> range -> int64 -> expr
-val mk_bool      : TcGlobals -> range -> bool -> expr
-val mk_byte      : TcGlobals -> range -> byte -> expr
-val mk_uint16    : TcGlobals -> range -> uint16 -> expr
-val mk_true      : TcGlobals -> range -> expr
-val mk_false     : TcGlobals -> range -> expr
-val mk_unit      : TcGlobals -> range -> expr
-val mk_int32     : TcGlobals -> range -> int32 -> expr
-val mk_int       : TcGlobals -> range -> int -> expr
-val mk_zero      : TcGlobals -> range -> expr
-val mk_one       : TcGlobals -> range -> expr
-val mk_two       : TcGlobals -> range -> expr
-val mk_minus_one : TcGlobals -> range -> expr
-val dest_int32 : expr -> int32 option
-
-//-------------------------------------------------------------------------
-// Primitives associated with quotations
-//------------------------------------------------------------------------- 
- 
-val mk_expr_ty : TcGlobals -> typ -> typ
-val mk_raw_expr_ty : TcGlobals -> typ
-val mspec_Type_GetTypeFromHandle : ILGlobals ->  ILMethodSpec
-val fspec_Missing_Value : ILGlobals ->  ILFieldSpec
-val mk_bytearray_ty : TcGlobals -> typ
-
-//-------------------------------------------------------------------------
-// Construct calls to some intrinsic functions
-//------------------------------------------------------------------------- 
-
-val mk_call_string_compare           : TcGlobals -> range -> expr -> expr -> expr
-val mk_call_new_format              : TcGlobals -> range -> typ -> typ -> typ -> typ -> typ -> expr -> expr
-
-val mk_call_unbox       : TcGlobals -> range -> typ -> expr -> expr
-val mk_call_get_generic_comparer : TcGlobals -> range -> expr
-val mk_call_get_generic_equality_comparer : TcGlobals -> range -> expr
-
-val mk_call_unbox_fast  : TcGlobals -> range -> typ -> expr -> expr
-val can_use_unbox_fast  : TcGlobals -> typ -> bool
-
-val mk_call_dispose     : TcGlobals -> range -> typ -> expr -> expr
-val mk_call_seq         : TcGlobals -> range -> typ -> expr -> expr
-
-val mk_call_istype      : TcGlobals -> range -> typ -> expr -> expr
-val can_use_istype_fast : TcGlobals -> typ -> bool
-
-val mk_call_typeof      : TcGlobals -> range -> typ -> expr 
-
-val mk_call_create_instance          : TcGlobals -> range -> typ -> expr
-val mk_call_array_get                : TcGlobals -> range -> typ -> expr -> expr -> expr
-val mk_call_raise                    : TcGlobals -> range -> typ -> expr -> expr
-
-val mk_call_generic_comparison_outer       : TcGlobals -> range -> typ -> expr -> expr -> expr
-val mk_call_generic_comparison_withc_outer : TcGlobals -> range -> typ -> expr -> expr -> expr -> expr
-val mk_call_generic_equality_outer         : TcGlobals -> range -> typ -> expr -> expr -> expr
-val mk_call_generic_equality_withc_outer   : TcGlobals -> range -> typ -> expr -> expr -> expr -> expr
-//val mk_call_generic_hash_outer             : TcGlobals -> range -> typ -> expr -> expr
-val mk_call_generic_hash_withc_outer       : TcGlobals -> range -> typ -> expr -> expr -> expr
-
-val TryEliminateDesugaredConstants : TcGlobals -> range -> Constant -> expr option
-
-val mk_call_unpickle_quotation     : TcGlobals -> range -> expr -> expr -> expr -> expr -> expr
-val mk_call_cast_quotation     : TcGlobals -> range -> typ -> expr -> expr 
-val mk_call_lift_value : TcGlobals -> range -> typ -> expr -> expr
-val mk_call_seq_map_concat      : TcGlobals -> range -> typ  -> typ -> expr -> expr -> expr
-val mk_call_seq_using           : TcGlobals -> range -> typ  -> typ -> expr -> expr -> expr
-val mk_call_seq_delay           : TcGlobals -> range -> typ  -> expr -> expr
-val mk_call_seq_append          : TcGlobals -> range -> typ -> expr -> expr -> expr
-val mk_call_seq_finally         : TcGlobals -> range -> typ -> expr -> expr -> expr
-val mk_call_seq_generated       : TcGlobals -> range -> typ -> expr -> expr -> expr
-val mk_call_seq_of_functions    : TcGlobals -> range -> typ  -> typ -> expr -> expr -> expr -> expr
-val mk_call_seq_to_array        : TcGlobals -> range -> typ  -> expr -> expr 
-val mk_call_seq_to_list         : TcGlobals -> range -> typ  -> expr -> expr 
-val mk_call_seq_map             : TcGlobals -> range -> typ  -> typ -> expr -> expr -> expr
-val mk_call_seq_singleton       : TcGlobals -> range -> typ  -> expr -> expr
-val mk_call_seq_empty           : TcGlobals -> range -> typ  -> expr
-val mk_ceq                      : TcGlobals -> range -> expr -> expr -> expr
-
-val mk_case : DecisionTreeDiscriminator * DecisionTree -> DecisionTreeCase
-
-//-------------------------------------------------------------------------
-// operations primarily associated with the optimization to fix
-// up loops to generate .NET code that does not include array bound checks
-//------------------------------------------------------------------------- 
-
-val dest_incr : expr -> expr option
-val mk_decr   : TcGlobals -> range -> expr -> expr
-val mk_incr   : TcGlobals -> range -> expr -> expr
-val mk_ldlen  : TcGlobals -> range -> expr -> expr
-
-//-------------------------------------------------------------------------
-// type-of operations on the expression tree
-//------------------------------------------------------------------------- 
-
-val type_of_expr : TcGlobals -> expr -> typ 
-
-//-------------------------------------------------------------------------
-// Analyze attribute sets 
-//------------------------------------------------------------------------- 
-
-val ILThingHasILAttrib : ILTypeRef -> ILAttributes -> bool
-val ILThingDecodeILAttrib   : TcGlobals -> ILTypeRef -> ILAttributes -> (ILAttributeElement list * ILAttributeNamedArg list) option
-val ILThingHasAttrib : Env.BuiltinAttribInfo -> ILAttributes -> bool
-
-val IsMatchingAttrib      : TcGlobals -> Env.BuiltinAttribInfo -> Attrib -> bool
-val HasAttrib             : TcGlobals -> Env.BuiltinAttribInfo -> Attribs -> bool
-val TryFindAttrib         : TcGlobals -> Env.BuiltinAttribInfo -> Attribs -> Attrib option
-val TryFindUnitAttrib     : TcGlobals -> Env.BuiltinAttribInfo -> Attribs -> unit option
-val TryFindBoolAttrib     : TcGlobals -> Env.BuiltinAttribInfo -> Attribs -> bool option
-val TryFindInt32Attrib    : TcGlobals -> Env.BuiltinAttribInfo -> Attribs -> int32 option
-
-val TyconRefTryBindAttrib  : TcGlobals -> Env.BuiltinAttribInfo -> TyconRef -> ((ILAttributeElement list * ILAttributeNamedArg list) -> 'a option) -> (Attrib -> 'a option) -> 'a option
-val TyconRefHasAttrib      : TcGlobals -> Env.BuiltinAttribInfo -> TyconRef -> bool
-
-val IsCompilationMappingAttr    : ILAttribute -> bool
-val IsSignatureDataVersionAttr  : ILAttribute -> bool
-val ILThingHasExtensionAttribute : ILAttributes -> bool
-val TryFindAutoOpenAttr           : ILAttribute -> string option 
-val TryFindInternalsVisibleToAttr : ILAttribute -> string option 
-val IsMatchingSignatureDataVersionAttr : ILVersionInfo -> ILAttribute -> bool
-
-
-val mk_CompilationMappingAttr                         : TcGlobals -> int -> ILAttribute
-val mk_CompilationMappingAttrWithSeqNum               : TcGlobals -> int -> int -> ILAttribute
-val mk_CompilationMappingAttrWithVariantNumAndSeqNum  : TcGlobals -> int -> int -> int             -> ILAttribute
-val mk_SignatureDataVersionAttr                       : TcGlobals -> ILVersionInfo -> ILAttribute
-val mk_CompilerGeneratedAttr                          : TcGlobals -> int -> ILAttribute
-
-val is_definitely_not_serializable : TcGlobals -> typ -> bool
-
-//-------------------------------------------------------------------------
-// More common type construction
-//------------------------------------------------------------------------- 
-
-val is_byref_typ : TcGlobals -> typ -> bool
-val dest_byref_typ : TcGlobals -> typ -> typ
-
-//-------------------------------------------------------------------------
-// Tuple constructors/destructors
-//------------------------------------------------------------------------- 
-
-val typed_expr_for_val : range -> Val -> expr * typ
-
-val mutable use_40_System_Types : bool
-
-val is_tuple : expr -> bool
-val try_dest_tuple : expr -> expr list
-val mk_tupled : TcGlobals -> range -> expr list -> typ list -> expr 
-val mk_tupled_notypes : TcGlobals -> range -> expr list -> expr 
-val mk_tupled_ty : TcGlobals -> typ list -> typ
-val mk_tupled_vars_ty : TcGlobals -> Val list -> typ
-val mk_tupled_vars : TcGlobals -> range -> Val list -> expr 
-val mk_meth_ty : TcGlobals -> typ list list -> typ -> typ
-
-//-------------------------------------------------------------------------
-// 
-//------------------------------------------------------------------------- 
-
-val AdjustValForExpectedArity : TcGlobals -> range -> ValRef -> ValUseFlag -> ValTopReprInfo -> expr * typ
-val AdjustValToTopVal : Val -> ParentRef -> ValTopReprInfo -> unit
-val LinearizeTopMatch : TcGlobals -> ParentRef -> expr -> expr
-val AdjustPossibleSubsumptionExpr : TcGlobals -> expr -> expr list -> (expr * expr list) option
-val NormalizeAndAdjustPossibleSubsumptionExprs : TcGlobals -> expr -> expr
-
-//-------------------------------------------------------------------------
-// XmlDoc signatures, used by both VS mode and XML-help emit
-//------------------------------------------------------------------------- 
-
-val XmlDocArgsEnc : TcGlobals -> typars -> typ list -> string
-val XmlDocSigOfVal : TcGlobals -> string -> Val -> string
-val XmlDocSigOfTycon : TcGlobals -> string -> Tycon -> string
-val XmlDocSigOfSubModul : TcGlobals -> string -> string
-
-
-//---------------------------------------------------------------------------
-// Resolve static optimizations
-//------------------------------------------------------------------------- 
-
-val DecideStaticOptimizations : Env.TcGlobals -> Tast.StaticOptimization list -> int
-val mk_static_optimization_expr     : Env.TcGlobals -> StaticOptimization list * expr * expr * range -> expr
-
-//---------------------------------------------------------------------------
-// Build for loops
-//------------------------------------------------------------------------- 
-
-val mk_fast_for_loop : Env.TcGlobals -> SequencePointInfoForForLoop * range * Val * expr * bool * expr * expr -> expr
-
-//---------------------------------------------------------------------------
-// Active pattern helpers
-//------------------------------------------------------------------------- 
-
-val is_ap_name : string -> bool
-val name_of_apref : ActivePatternElemRef -> string
-val apinfo_of_vname : string * range -> ActivePatternInfo option
-val apinfo_of_vref  : ValRef -> ActivePatternInfo option
-val mk_choices_ucref : Env.TcGlobals -> range -> int -> int -> Tast.UnionCaseRef
-
-val names_of_apinfo      : ActivePatternInfo -> string list 
-val total_of_apinfo      : ActivePatternInfo -> bool
-val mk_apinfo_result_typ : Env.TcGlobals -> range -> ActivePatternInfo -> Tast.typ list-> Tast.typ
-val mk_apinfo_typ        : Env.TcGlobals -> range -> ActivePatternInfo -> Tast.typ -> Tast.typ list-> Tast.typ
-
-//---------------------------------------------------------------------------
-// Structural rewrites
-//------------------------------------------------------------------------- 
-
-type ExprRewritingEnv = 
-    {pre_intercept: ((expr -> expr) -> expr -> expr option) option;
-     post_transform: expr -> expr option;
-     under_quotations: bool }    
-
-val RewriteExpr : ExprRewritingEnv -> expr -> expr
-val RewriteImplFile : ExprRewritingEnv -> TypedImplFile -> TypedImplFile
-
-val IsGenericValWithGenericContraints: TcGlobals -> Val -> bool
-val tcaug_has_interface : TcGlobals -> TyconAugmentation -> Tast.typ -> bool
-val tcaug_has_override : TcGlobals -> TyconAugmentation -> string -> Tast.typ list -> bool
-
-val (|BitwiseOr|_|) : TcGlobals -> expr -> (expr * expr) option
-
-val EvalConstantExpr : TcGlobals -> expr -> expr
-val EvalAttribArg: TcGlobals -> expr -> expr
-
-val (|SpecificAttribNamedArg|_|) : string -> AttribNamedArg -> expr option 
-val (|AttribInt32Arg|_|) : AttribExpr -> int32 option
-val (|AttribBoolArg|_|) : AttribExpr -> bool option
-val (|AttribStringArg|_|) : AttribExpr -> string option
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/tc.ml b/tools/FSharp_1.9.6.16/source/fsharp/tc.ml
deleted file mode 100644
index 951f794d..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/tc.ml
+++ /dev/null
@@ -1,11899 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-/// The typechecker.  Left-to-right constrained type checking 
-/// with generalization at appropriate points.
-module (* internal *) Microsoft.FSharp.Compiler.TypeChecker
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics 
-
-open Microsoft.FSharp.Compiler 
-
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Patcompile
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.AbstractIL.IL (* Abstract IL  *)
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Layout
-open Microsoft.FSharp.Compiler.Outcome
-open Microsoft.FSharp.Compiler.Infos
-open Microsoft.FSharp.Compiler.Infos.AccessibilityLogic
-open Microsoft.FSharp.Compiler.Infos.AttributeChecking
-open Microsoft.FSharp.Compiler.Typrelns
-open Microsoft.FSharp.Compiler.ConstraintSolver
-open Microsoft.FSharp.Compiler.Nameres
-open Microsoft.FSharp.Compiler.PrettyNaming
-
-let generalizeInnerPolymorphism = true
-let polyrec = false
-let recTyparsRigid = TyparWarnIfNotRigid
-let verboseCC = false
-let verboseGeneralization = try System.Environment.GetEnvironmentVariable("FSharp_Verbose") <> null with _ -> false
-
-//-------------------------------------------------------------------------
-// Helpers that should be elsewhere
-//------------------------------------------------------------------------- 
-
-
-let isThreadOrContextStatic g attrs' = 
-    HasAttrib g g.attrib_ThreadStaticAttribute attrs' ||
-    HasAttrib g g.attrib_ContextStaticAttribute attrs' 
-
-let mk_nil_pat g m ty = TPat_unioncase(g.nil_ucref,[ty],[],m)
-let mk_cons_pat g ty ph pt = TPat_unioncase(g.cons_ucref,[ty],[ph;pt],union_ranges (RangeOfPat ph) (RangeOfPat pt))
-
-let mk_compgen_let_in m nm ty e f = 
-    let v,ve = mk_compgen_local m nm ty
-    mk_compgen_let m v e (f (v,ve))
-
-let mk_unit_delay_lambda g m e =
-    let uv,ue = mk_compgen_local m "unitVar" g.unit_ty
-    mk_lambda m uv (e,type_of_expr g e) 
-
-let mk_coerce_if_needed g tgtTy srcTy expr =
-    //if type_definitely_subsumes_type_no_coercion 0 cenv.g cenv.amap m tgtTy srcTy then 
-    if type_equiv g tgtTy srcTy then 
-        expr
-    else 
-        mk_coerce(expr,tgtTy,range_of_expr expr,srcTy)
-
-
-//-------------------------------------------------------------------------
-// Errors.
-//------------------------------------------------------------------------- 
-
-exception BakedInMemberConstraintName of string * range
-exception FunctionExpected of DisplayEnv * Tast.typ * range
-exception NotAFunction of DisplayEnv * Tast.typ * range * range
-exception Recursion of DisplayEnv * ident * Tast.typ * Tast.typ  * range
-exception RecursiveUseCheckedAtRuntime of DisplayEnv * ValRef * range
-exception LetRecEvaluatedOutOfOrder of DisplayEnv * ValRef * ValRef * range
-exception LetRecCheckedAtRuntime of range
-exception LetRecUnsound of DisplayEnv * ValRef list * range
-exception TyconBadArgs of DisplayEnv * TyconRef * int * range
-exception UnionCaseWrongArguments of DisplayEnv * int * int * range
-exception UnionCaseWrongNumberOfArgs of DisplayEnv * int * int * range
-exception FieldsFromDifferentTypes of DisplayEnv * RecdFieldRef * RecdFieldRef * range
-exception FieldGivenTwice of DisplayEnv * Tast.RecdFieldRef * range
-exception MissingFields of string list * range
-exception FunctionValueUnexpected of DisplayEnv * Tast.typ * range
-exception UnitTypeExpected of DisplayEnv * Tast.typ * bool * range
-exception UnionPatternsBindDifferentNames of range
-exception VarBoundTwice of ident
-exception ValueRestriction of DisplayEnv * bool * Val * Typar * range
-exception FieldNotMutable of DisplayEnv * Tast.RecdFieldRef * range
-exception ValNotMutable of DisplayEnv * ValRef * range
-exception ValNotLocal of DisplayEnv * ValRef * range
-exception InvalidRuntimeCoercion of DisplayEnv * Tast.typ * Tast.typ * range
-exception IndeterminateRuntimeCoercion of DisplayEnv * Tast.typ * Tast.typ * range
-exception IndeterminateStaticCoercion of DisplayEnv * Tast.typ * Tast.typ * range
-exception RuntimeCoercionSourceSealed of DisplayEnv * Tast.typ * range
-exception CoercionTargetSealed of DisplayEnv * Tast.typ * range
-exception UpcastUnnecessary of range
-exception TypeTestUnnecessary of range
-exception StaticCoercionShouldUseBox of DisplayEnv * Tast.typ * Tast.typ * range
-exception SelfRefObjCtor of bool * range
-exception VirtualAugmentationOnNullValuedType of range
-exception NonVirtualAugmentationOnNullValuedType of range
-exception UseOfAddressOfOperator of range
-exception DeprecatedThreadStaticBindingWarning of range
-exception IntfImplInIntrinsicAugmentation of range
-exception IntfImplInExtrinsicAugmentation of range
-exception OverrideInIntrinsicAugmentation of range
-exception OverrideInExtrinsicAugmentation of range
-exception NonUniqueInferredAbstractSlot of TcGlobals * DisplayEnv * string * MethInfo * MethInfo * range
-exception IndexOutOfRangeExceptionWarning of range
-exception StandardOperatorRedefinitionWarning of string * range
-       
-
-/// Is this a 'base' call (in the sense of C#) 
-let IsBaseCall objArgs = 
-    match objArgs with 
-    | [TExpr_val(v,_,_)] when v.BaseOrThisInfo  = BaseVal -> true
-    | _ -> false
-
-let RecdFieldInstanceChecks g ad m (rfinfo:RecdFieldInfo) = 
-    if rfinfo.IsStatic then error (Error ("a static field was used where an instance field is expected",m));
-    CheckRecdFieldInfoAttributes g rfinfo m |> CommitOperationResult;        
-    CheckRecdFieldInfoAccessible m ad rfinfo
-
-let ILFieldInstanceChecks  g amap ad m (finfo :ILFieldInfo) =
-    if finfo.IsStatic then error (Error ("a static field was used where an instance field is expected",m));
-    CheckILFieldInfoAccessible g amap m ad finfo;
-    CheckILFieldAttributes g finfo m
-
-let MethInfoChecks g amap isInstance objArgs ad m (minfo:MethInfo)  =
-    if minfo.IsInstance <> isInstance then
-      error (Error (minfo.LogicalName^" is not "^(if isInstance then "an instance" else "a static")^" method",m));
-
-    // Eliminate the 'protected' portion of the accessibility domain for instance accesses
-    let ad = 
-        match objArgs,ad with 
-        | [objArg],AccessibleFrom(paths,Some tcref) -> 
-            let objArgTy = type_of_expr g objArg 
-            let ty = snd (generalize_tcref tcref)
-            // We get to keep our rights if the type we're in subsumes the object argument type
-            if type_feasibly_subsumes_type 0 g amap m ty CanCoerce objArgTy then
-                ad
-            // We get to keep our rights if this is a base call
-            elif IsBaseCall objArgs then 
-                ad
-            else
-                AccessibleFrom(paths,None) 
-        | _ -> ad
-
-    if not (IsMethInfoAccessible amap m  ad minfo) then 
-      error (Error ("method '"^minfo.LogicalName^"' is not accessible from this code location",m));
-    CheckMethInfoAttributes g m minfo |> CommitOperationResult
-
-
-let CheckRecdFieldMutation m denv (rfinfo:RecdFieldInfo) ftinst = 
-    if not rfinfo.RecdField.IsMutable then error (FieldNotMutable(denv,rfinfo.RecdFieldRef,m));
-    if nonNil(ftinst) then error (Error("Fields which are type functions may not be mutated",m))
-
-//-------------------------------------------------------------------------
-// Type environments. 
-//    - Named items in scope (values)
-//    - Record of type variables that can't be generalized
-//    - Our 'location' as a concrete compilation path
-//    - mutable accumulator for the module type currently being accumulated 
-//------------------------------------------------------------------------- 
-
-[]
-type UngeneralizableItem = 
-      { computeFreeTyvars : (unit -> FreeTyvars);
-        // Flag is for: have we determined that this item definitely has 
-        // no free type inference variables? This implies that
-        //   (a)  it will _never_ have any free type inference variables as further constraints are added to the system.
-        //   (b)  its set of FreeTycons will not change as further constraints are added to the system
-        mutable WillNeverHaveFreeTypars: bool;
-        // If WillNeverHaveFreeTypars then we can cache the computation of FreeTycons, since they are invariant.
-        mutable CachedFreeLocalTycons: FreeTycons; 
-        // If WillNeverHaveFreeTypars then we can cache the computation of FreeTraitSolutions, since they are invariant.
-        mutable CachedFreeTraitSolutions: FreeLocals; }
-
-      member item.GetFreeTyvars() = 
-          let fvs = item.computeFreeTyvars()
-          if fvs.FreeTypars.IsEmpty then 
-              item.WillNeverHaveFreeTypars <- true; 
-              item.CachedFreeLocalTycons <- fvs.FreeTycons
-              item.CachedFreeTraitSolutions <- fvs.FreeTraitSolutions
-          fvs
-      
-[]
-type tcEnv =
-    { /// Name resoultion information 
-      eNameResEnv : NameResolutionEnv; 
-
-      /// The list of items in the environment that may contain free inference 
-      /// variables (which may not be generalized). The relevant types may 
-      /// change as a result of inference equations being asserted, hence may need to 
-      /// be recomputed. 
-      eUngeneralizableItems: UngeneralizableItem list;
-      
-      // Two (!) versions of the current module path 
-      // These are used to: 
-      //    - Look up the appropriate point in the corresponding signature 
-      //      see if an item is public or not 
-      //    - Change fslib canonical module type to allow compiler references to these items 
-      //    - Record the cpath for concrete modul_specs, tycon_specs and excon_specs so they can cache their generated IL representation where necessary 
-      //    - Record the pubpath of public, concrete {val,tycon,modul,excon}_specs.  
-      //      This information is used mainly when building non-local references 
-      //      to public items. 
-      // 
-      // Of the two, 'ePath' is the one that's barely used. It's only 
-      // used by curr_stable_fslib_nlpath to modify the CCU while compiling FSharp.Core
-      ePath: ident list; 
-      eCompPath: CompilationPath; 
-      eAccessPath: CompilationPath; 
-      eInternalsVisibleCompPaths: CompilationPath list; // internals under these should be accessible
-
-      /// Mutable accumulator for the current module type 
-      eMtypeAcc: ModuleOrNamespaceType ref; 
-
-      /// Here Some(tcref) indicates we can access protected members in all super types 
-      eFamilyType: TyconRef option; 
-
-      // Information to enforce special restrictions on valid expressions 
-      // for .NET constructors. 
-      eCtorInfo : ctorInfo option
-    } 
-    member tenv.DisplayEnv = tenv.eNameResEnv.DisplayEnv
-
-and ctorInfo = 
-    {
-      // Object model constructors have a very specific form to satisfy .NET limitations.
-      // For "new = \arg. { new C with ... }"; 
-      //     ctor = 3 indicates about to type check "\arg. (body)", 
-      //     ctor = 2 indicates about to type check "body" 
-      //     ctor = 1 indicates actually type checking the body expression 
-      // 0 indicates everywhere else, including auxiliary expressions such e1 in "let x = e1 in { new ... }" 
-      // REVIEW: clean up this rather odd approach ... 
-      ctorShapeCounter: int;
-      
-      /// A handle to a reference cell to hold results of initialized 'this' for 'type X() as x = ...' constructs 
-      /// The reference cell is used throughout the object constructor for any recursive references 
-      /// to 'this'. 
-      ctorThisRefCellVarOpt: ValRef option; 
-      
-      /// Are we in an object constructor, and if so have we complete construction of the 
-      /// ctor?  Used to reduce #of reactive recursion warnings 
-      ctorPreConstruct: bool;
-      ctorIsImplicit: bool  
-    }
-    
-let empty_tenv g =
-    let cpath = CompPath (IL.ecma_mscorlib_scoref,[])
-    { eNameResEnv = NameResolutionEnv.Empty(g);
-      eUngeneralizableItems=[];
-      ePath=[];
-      eCompPath=cpath; (* dummy *)
-      eAccessPath=cpath; (* dummy *)
-      eInternalsVisibleCompPaths=[];
-      eMtypeAcc= ref (empty_mtype Namespace);
-      eFamilyType=None;
-      eCtorInfo=None }
-
-let nenv_of_tenv tenv = tenv.eNameResEnv
-let items_of_tenv tenv = tenv.eNameResEnv.UnqualifiedItems
-
-//-------------------------------------------------------------------------
-// Helpers related to determining if we're in a constructor and/or a class
-// that may be able to access "protected" members.
-//------------------------------------------------------------------------- 
-
-let InitialExplicitCtorInfo(ctorThisVarRefCellOpt) =
-    { ctorShapeCounter=3; 
-      ctorThisRefCellVarOpt = ctorThisVarRefCellOpt;
-      ctorPreConstruct=true; 
-      ctorIsImplicit=false} 
-
-let InitialImplicitCtorInfo() =
-    { ctorShapeCounter=0; 
-      ctorThisRefCellVarOpt = None; 
-      ctorPreConstruct=true; 
-      ctorIsImplicit=true }
-      
-let EnterFamilyRegion tcref env = { env with eFamilyType = Some tcref }
-let ExitFamilyRegion env = 
-    match env.eFamilyType with 
-    | None -> env  // optimization to avoid reallocation  
-    | _ -> { env with eFamilyType = None }
-
-let AreWithinCtorShape         env = match env.eCtorInfo with None -> false    | Some ctorInfo -> ctorInfo.ctorShapeCounter > 0
-let AreWithinCtorPreConstruct  env = match env.eCtorInfo with None -> false    | Some ctorInfo -> ctorInfo.ctorPreConstruct 
-let AreWithinImplicitCtor      env = match env.eCtorInfo with None -> false    | Some ctorInfo -> ctorInfo.ctorIsImplicit
-let GetCtorShapeCounter        env = match env.eCtorInfo with None -> 0        | Some ctorInfo -> ctorInfo.ctorShapeCounter
-let GetRecdInfo                env = match env.eCtorInfo with None -> RecdExpr | Some ctorInfo -> if ctorInfo.ctorShapeCounter = 1 then RecdExprIsObjInit else RecdExpr
-
-let ExitCtorPreConstructRegion    env = {env with eCtorInfo = Option.map (fun ctorInfo -> { ctorInfo with ctorPreConstruct = false }) env.eCtorInfo }
-let AdjustCtorShapeCounter      f env = {env with eCtorInfo = Option.map (fun ctorInfo -> { ctorInfo with ctorShapeCounter = f ctorInfo.ctorShapeCounter }) env.eCtorInfo }
-let ExitCtorShapeRegion           env = AdjustCtorShapeCounter (fun x -> 0) env
-
-//-------------------------------------------------------------------------
-// Add stuff to environments and register things as ungeneralizeable.
-//------------------------------------------------------------------------- 
-
-let free_tyvars_is_empty ftyvs = 
-    Zset.is_empty ftyvs.FreeTypars &&
-    Zset.is_empty ftyvs.FreeTycons 
-
-let add_free_item_of_typ typ eUngeneralizableItems = 
-    let fvs = free_in_type CollectAllNoCaching typ
-    if free_tyvars_is_empty fvs then eUngeneralizableItems 
-    else { computeFreeTyvars = (fun () -> free_in_type CollectAllNoCaching typ);
-           WillNeverHaveFreeTypars=false; 
-           CachedFreeLocalTycons=empty_free_loctycons; 
-           CachedFreeTraitSolutions=empty_free_locvals } :: eUngeneralizableItems
-
-let rec acc_free_in_mtyp (mtyp:ModuleOrNamespaceType) acc =
-    NameMap.foldRange (type_of_val >> acc_free_in_type CollectAllNoCaching) mtyp.AllValuesAndMembers
-      (NameMap.foldRange (fun (mspec:ModuleOrNamespace) acc -> acc_free_in_mtyp mspec.ModuleOrNamespaceType acc) mtyp.ModulesAndNamespacesByDemangledName acc)
-let free_in_mtyp mtyp = acc_free_in_mtyp mtyp empty_free_tyvars
-
-let add_free_item_of_mtyp mtyp eUngeneralizableItems = 
-    let fvs = free_in_mtyp mtyp
-    if free_tyvars_is_empty fvs then eUngeneralizableItems 
-    else { computeFreeTyvars = (fun () -> free_in_mtyp mtyp);
-           WillNeverHaveFreeTypars=false; 
-           CachedFreeLocalTycons=empty_free_loctycons; 
-           CachedFreeTraitSolutions=empty_free_locvals } :: eUngeneralizableItems
-
-let add_vrefs_to_nenv vs nenv = 
-    NameMap.foldRange (fun v nenv -> AddValRefToNameEnv (mk_local_vref v) nenv) vs nenv
-    
-    
-let add_internals_accessibility env (ccu:ccu) =
-    let compPath = CompPath (ccu.ILScopeRef,[])    
-    {env with eInternalsVisibleCompPaths = compPath :: env.eInternalsVisibleCompPaths }
-
-let curr_cpath env = env.eCompPath
-let curr_access_cpath env = env.eAccessPath
-let AccessRightsOfEnv env = AccessibleFrom (curr_access_cpath env :: env.eInternalsVisibleCompPaths ,env.eFamilyType)
-
-let ModifyNameResEnv f env = { env with eNameResEnv = f env.eNameResEnv } 
-
-let AddLocalValPrimitive (v:Val) env =
-    let env = ModifyNameResEnv (AddValRefToNameEnv (mk_local_vref v)) env
-    {env with eUngeneralizableItems =  add_free_item_of_typ v.Type env.eUngeneralizableItems;   } 
-
-
-let AddLocalValMap scopem (vals:Val NameMap) env =
-    let env = ModifyNameResEnv (add_vrefs_to_nenv vals) env
-    let env = {env with eUngeneralizableItems =  NameMap.foldRange (type_of_val >> add_free_item_of_typ) vals env.eUngeneralizableItems;   }
-    CallEnvSink(scopem,nenv_of_tenv env,AccessRightsOfEnv env);
-    env
-
-let AddLocalVal scopem v env = 
-    let env = ModifyNameResEnv (AddValRefToNameEnv (mk_local_vref v)) env
-    let env = {env with eUngeneralizableItems =  add_free_item_of_typ v.Type env.eUngeneralizableItems;   }
-    CallEnvSink(scopem,nenv_of_tenv env,AccessRightsOfEnv env);
-    env
-
-let AddLocalExnDefn scopem (exnc:Tycon) env =
-    let env = ModifyNameResEnv (AddExceptionDeclsToNameEnv (mk_local_ecref exnc)) env
-    (* Also make VisualStudio think there is an identifier in scope at the range of the identifier text of its binding location *)
-    CallEnvSink(exnc.Range,nenv_of_tenv env,AccessRightsOfEnv env);
-    CallEnvSink(scopem,nenv_of_tenv env,AccessRightsOfEnv env);
-    env
- 
-let AddLocalTycons g amap m tycons env = 
-     ModifyNameResEnv (AddTyconRefsToNameEnv g amap m (List.map mk_local_tcref tycons)) env 
-
-let AddLocalTyconsAndReport g amap scopem tycons env = 
-    let env = AddLocalTycons g amap scopem tycons env
-    CallEnvSink(scopem,nenv_of_tenv env,AccessRightsOfEnv env);
-    env
-
-//-------------------------------------------------------------------------
-// Open a structure or an IL namespace 
-//------------------------------------------------------------------------- 
-
-
-
-let top_modrefs_of_nonlocal_ccu (ccu:ccu) = ccu.TopModulesAndNamespaces |> NameMap.map (mk_nonlocal_ccu_top_tcref ccu)
-let top_tcrefs_of_nonlocal_ccu (ccu:ccu)  = ccu.TopTypeAndExceptionDefinitions |> List.map (mk_nonlocal_ccu_top_tcref ccu)
-
-let modrefs_of_top_rooted_mtyp (mtyp:ModuleOrNamespaceType) = mtyp.ModulesAndNamespacesByDemangledName |> NameMap.map mk_local_modref
-let tcrefs_of_top_rooted_mtyp (mtyp:ModuleOrNamespaceType)  = mtyp.TypeAndExceptionDefinitions |> List.map mk_local_tcref
-
-let open_modul g amap scopem env modref =
-    let env = ModifyNameResEnv (AddModuleOrNamespaceContentsToNameEnv g amap (AccessRightsOfEnv env) scopem modref) env
-    CallEnvSink(scopem,nenv_of_tenv env,AccessRightsOfEnv env);
-    env
-
-let open_moduls g amap scopem env mvvs =
-    List.foldBack (fun (_,modref,_) acc -> open_modul g amap scopem acc modref) mvvs env
-
-let add_top_rooted_mrefs g amap m env modrefs  = ModifyNameResEnv (AddModrefsToNameEnv g amap m true (AccessRightsOfEnv env) modrefs) env
-
-let add_nonlocal_ccu g amap scopem env (ccu,internalsVisible) = 
-    let env = add_top_rooted_mrefs g amap scopem env (top_modrefs_of_nonlocal_ccu ccu)
-    let env = ModifyNameResEnv (AddTyconRefsToNameEnv g amap scopem (top_tcrefs_of_nonlocal_ccu ccu)) env
-    let env = if internalsVisible then add_internals_accessibility env ccu else env
-    CallEnvSink(scopem,nenv_of_tenv env,AccessRightsOfEnv env);
-    env
-
-let AddLocalTopRootedModuleOrNamespace g amap scopem env mtyp = 
-    let env = add_top_rooted_mrefs g amap scopem env (modrefs_of_top_rooted_mtyp mtyp)
-    let env = ModifyNameResEnv (AddTyconRefsToNameEnv g amap scopem (tcrefs_of_top_rooted_mtyp mtyp)) env
-    let env = {env with eUngeneralizableItems = add_free_item_of_mtyp mtyp env.eUngeneralizableItems}
-    CallEnvSink(scopem,nenv_of_tenv env,AccessRightsOfEnv env);
-    env
-
-let AddModuleAbbreviation scopem id modrefs env =
-    let env = ModifyNameResEnv (AddModuleAbbrevToNameEnv id modrefs) env
-    CallEnvSink(scopem,nenv_of_tenv env,AccessRightsOfEnv env);
-    CallNameResolutionSink(id.idRange,nenv_of_tenv env,Item_modrefs(modrefs),ItemOccurence.Use,env.DisplayEnv,AccessRightsOfEnv env)
-    env
-
-let AddLocalSubModule g amap m scopem env nm (modul:ModuleOrNamespace) =
-    let env = ModifyNameResEnv (AddModrefToNameEnv g amap m false (AccessRightsOfEnv env) (mk_local_modref modul)) env
-    let env = {env with eUngeneralizableItems = add_free_item_of_mtyp modul.ModuleOrNamespaceType env.eUngeneralizableItems}
-    CallEnvSink(scopem,nenv_of_tenv env,AccessRightsOfEnv env);
-    env
- 
-let RegisterDeclaredTypars typars env = 
-    {env with eUngeneralizableItems =  List.foldBack (mk_typar_ty >> add_free_item_of_typ) typars env.eUngeneralizableItems }
-
-let AddDeclaredTypars check typars env = 
-    let env = ModifyNameResEnv (AddDeclaredTyparsToNameEnv check typars) env
-    RegisterDeclaredTypars typars env
-
-/// Compilation environment for typechecking a compilation unit. Contains the
-/// F# and .NET modules loaded from disk, the search path, a table indicating
-/// how to List.map F# modules to assembly names, and some nasty globals 
-/// related to type inference. These are:
-///   - all the type variables generated for this compilation unit
-///   - the set of active fixups for "letrec" type inference 
-[]
-type cenv = 
-    { 
-
-      g: Env.TcGlobals;
-
-      /// Push an entry every time a recursive value binding is used, 
-      /// in order to be able to fix up recursive type applications as 
-      /// we infer type parameters 
-      /// REVIEW: cleanup this use of mutation? 
-      mutable recUses: ValMultiMap<(expr ref * range * bool)>;
-      
-      /// Are we in a script? if so relax the reporting of discarded-expression warnings at the top level
-      isScript: bool; 
-
-      /// Environment needed to convert IL types to F# types in the importer. 
-      amap: Import.ImportMap; 
-
-      /// Holds a reference to the component being compiled. 
-      /// This field is very rarely used (mainly when fixing up forward references to fslib. 
-      topCcu: ccu; 
-      
-      /// Holds the current inference constraints 
-      css: ConstraintSolverState;
-      
-      /// Are we compiling the signature of a module from fslib? 
-      compilingCanonicalFslibModuleType: bool;
-      isSig: bool;
-      haveSig: bool;
-      
-      niceNameGen: NiceNameGenerator;
-      infoReader: InfoReader;
-      nameResolver: NameResolver;
-      
-      conditionalDefines: string list;
-            
-  }
-
-let new_cenv (g,isScript,niceNameGen,amap,topCcu,isSig,haveSig,conditionalDefines) =
-    
-    let infoReader = new InfoReader(g,amap)
-    let instantiationGenerator m tpsorig = ConstraintSolver.freshen_tps m tpsorig
-    let nameResolver = new NameResolver(g,amap,infoReader,instantiationGenerator)
-    { g=g;
-      amap= amap;
-      recUses=vspec_mmap_empty(); 
-      topCcu = topCcu;
-      isScript=isScript;
-      css= { css_g=g; css_amap=amap; css_cxs= Hashtbl.create 10; css_InfoReader=infoReader } ;
-      infoReader=infoReader;
-      nameResolver=nameResolver;
-      niceNameGen=niceNameGen;
-      isSig=isSig;
-      haveSig=haveSig;
-      compilingCanonicalFslibModuleType=(isSig || not haveSig) && g.compilingFslib;
-      conditionalDefines=conditionalDefines }
-
-
-let new_anon_inference_var cenv info = ConstraintSolver.new_anon_inference_var info
-let new_compgen_inference_var cenv info = ConstraintSolver.new_compgen_inference_var info
-let new_error_tyvar cenv () = ConstraintSolver.new_error_tyvar ()
-let new_inference_typ cenv () = ConstraintSolver.new_inference_typ ()
-let new_error_typ cenv () = ConstraintSolver.new_error_typ ()
-let new_error_measure cenv () = ConstraintSolver.new_error_measure ()
-let new_inference_typs cenv l = ConstraintSolver.new_inference_typs l
-let copy_and_fixup_typars m rigid tpsorig = ConstraintSolver.freshen_and_fixup_typars m rigid [] [] tpsorig
-let new_tinst cenv m tpsorig = ConstraintSolver.new_tinst m tpsorig
-let freshen_tps cenv m tpsorig = ConstraintSolver.freshen_tps m tpsorig
-let FreshenMethInfo cenv m minfo = ConstraintSolver.FreshenMethInfo m minfo
-let unifyE cenv (env:tcEnv) m ty1 ty2 = ConstraintSolver.AddCxTypeEqualsType env.DisplayEnv cenv.css m ty1 ty2
-
-
-
-//-------------------------------------------------------------------------
-// Generate references to the module being generated - used for
-// public items.
-//------------------------------------------------------------------------- 
-
-
-let MakeInnerEnv env nm modKind = 
-    let path = env.ePath @ [nm]
-    (* Note: here we allocate a new module type accumulator *)
-    let mtypeAcc = ref (empty_mtype modKind)
-    let cpath = mk_cpath env.eCompPath nm.idText modKind
-    { env with ePath = path; 
-               eCompPath = cpath;
-               eAccessPath = cpath;
-               eNameResEnv = { env.eNameResEnv with eDisplayEnv = denv_add_open_path (path_of_lid path) env.DisplayEnv};
-               eMtypeAcc = mtypeAcc  },mtypeAcc
-
-
-let MkInnerEnvForTyconRef cenv env tcref isExtrinsicExtension = 
-    if isExtrinsicExtension then 
-        // Extension members don't get access to protected stuff 
-        env  
-    else
-        // Regular members get access to protected stuff 
-        let env = (EnterFamilyRegion tcref env) 
-        // Note: assumes no nesting 
-        let env = { env with eAccessPath = mk_cpath env.eCompPath tcref.MangledName FSharpModule }
-
-        env
-
-let MakeInnerEnvForMember cenv env (v:Val) = 
-    match v.MemberInfo with 
-    | None -> env
-    | Some(memberInfo) -> MkInnerEnvForTyconRef cenv env v.MemberApparentParent v.IsExtensionMember
-
-let GetCurrAccumulatedModuleOrNamespaceType env = !(env.eMtypeAcc) 
-let SetCurrAccumulatedModuleOrNamespaceType env x =  env.eMtypeAcc := x
-
-/// Optimized unification routine that avoids creating new inference 
-/// variables unnecessarily
-let UnifyTupleType cenv denv m ty ps = 
-    let ptys = 
-        if is_tuple_typ cenv.g ty then 
-            let ptys = dest_tuple_typ cenv.g ty
-            if (List.length ps) = (List.length ptys) then ptys 
-            else new_inference_typs cenv ps
-        else new_inference_typs cenv ps
-    AddCxTypeEqualsType denv cenv.css m ty (TType_tuple ptys);
-    ptys
-
-/// Optimized unification routine that avoids creating new inference 
-/// variables unnecessarily
-let UnifyFunctionTypeUndoIfFailed cenv denv m ty =
-    if verbose then  dprintf "--> UnifyFunctionTypeUndoIfFailed\n";
-    if is_fun_typ cenv.g ty then Some(dest_fun_typ cenv.g ty) else
-    let domainTy = new_inference_typ cenv ()
-    let resultTy = new_inference_typ cenv ()
-    if AddCxTypeEqualsTypeUndoIfFailed  denv cenv.css m ty (domainTy --> resultTy) then 
-        Some(domainTy,resultTy)
-    else 
-        None
-
-/// Optimized unification routine that avoids creating new inference 
-/// variables unnecessarily
-let UnifyFunctionType extraInfo cenv denv funm ty =
-    match UnifyFunctionTypeUndoIfFailed cenv denv funm ty with
-    | Some res -> res
-    | None -> 
-        match extraInfo with 
-        | Some argm -> error (NotAFunction(denv,ty,funm,argm))
-        | None ->    error (FunctionExpected(denv,ty,funm))
-
-
-let UnifyUnitType cenv denv m ty exprOpt =
-    if not (AddCxTypeEqualsTypeUndoIfFailed denv cenv.css m ty cenv.g.unit_ty) then 
-      let domainTy = new_inference_typ cenv ()
-      let resultTy = new_inference_typ cenv ()
-      if AddCxTypeEqualsTypeUndoIfFailed denv cenv.css m ty (domainTy --> resultTy) then 
-          warning (FunctionValueUnexpected(denv,ty,m))
-      else
-          let perhapsProp = 
-              type_equiv cenv.g cenv.g.bool_ty ty &&
-              match exprOpt with 
-              | Some(TExpr_app(TExpr_val(vf,_,_),_,_,[_;_],_)) when vf.MangledName = opname_Equals -> true
-              | _ -> false
-          warning (UnitTypeExpected (denv,ty,perhapsProp,m)); 
-      false
-    else
-      true
-
-//-------------------------------------------------------------------------
-// Attribute target flags
-//------------------------------------------------------------------------- 
-
-// See System.AttributeTargets
-let attrTgtAssembly    = 0x00000001
-let attrTgtModule      = 0x00000002
-let attrTgtClass       = 0x00000004
-let attrTgtStruct      = 0x00000008
-let attrTgtEnum        = 0x00000010
-let attrTgtConstructor = 0x00000020
-let attrTgtMethod      = 0x00000040
-let attrTgtProperty    = 0x00000080
-let attrTgtField       = 0x00000100
-let attrTgtEvent       = 0x00000200
-let attrTgtInterface   = 0x00000400
-let attrTgtParameter   = 0x00000800
-let attrTgtDelegate    = 0x00001000
-let attrTgtReturnValue = 0x00002000
-let attrTgtGenericParameter = 0x00004000
-let attrTgtAll         = 0x00007FFF
-
-let attrTgtBinding    = attrTgtField    ||| attrTgtMethod    ||| attrTgtEvent    ||| attrTgtProperty
-let attrTgtFieldDecl  = attrTgtField    ||| attrTgtProperty
-let attrTgtUnionCaseDecl = attrTgtMethod    ||| attrTgtProperty
-let attrTgtTyconDecl  = attrTgtClass    ||| attrTgtInterface ||| attrTgtDelegate ||| attrTgtStruct ||| attrTgtEnum
-let attrTgtExnDecl    = attrTgtClass
-let attrTgtModuleDecl = attrTgtClass
-let attrTgtTop        = attrTgtAssembly ||| attrTgtModule    ||| attrTgtMethod
-
-/// Typecheck constant terms in expressions and patterns
-let TcConst cenv ty m env c =
-    let rec TcMeasure ms =
-        match ms with
-        | Measure_One -> MeasureOne      
-        | Measure_Con(tc,m) ->
-            let ad = AccessRightsOfEnv env
-            let tcref = ForceRaise(ResolveTypeLongIdent cenv.nameResolver ItemOccurence.Use OpenQualified env.eNameResEnv ad tc 0)
-            match tcref.TypeOrMeasureKind with
-            | KindType -> error(Error("Expected unit-of-measure, not type", m))
-            | KindMeasure -> MeasureCon tcref
-
-        | Measure_Power(ms, exponent, m) -> MeasurePower (TcMeasure ms) exponent
-        | Measure_Prod(ms1,ms2,m) -> MeasureProd(TcMeasure ms1, TcMeasure ms2)     
-        | Measure_Quot(ms1, ((Measure_Seq (_::(_::_), _)) as ms2), m) -> 
-          (warning(Error("Implicit product of measures following /",m));
-          MeasureProd(TcMeasure ms1, MeasureInv (TcMeasure ms2)))
-        | Measure_Quot(ms1,ms2,m) -> 
-          MeasureProd(TcMeasure ms1, MeasureInv (TcMeasure ms2))
-        | Measure_Seq(mss,m) -> ProdMeasures (List.map TcMeasure mss)
-        | Measure_Anon _ -> error(InternalError("Unexpected Measure_Anon",m))
-        | Measure_Var(_,m) -> error(Error("Non-zero constants cannot have generic units. For generic zero, write 0.0<_>",m))
-   
-    let unif ty2 = unifyE cenv env m ty ty2
-    let unif_measure_arg iszero tcr c =
-        let measureTy = 
-            match c with 
-            | Const_measure(_, Measure_Anon _) ->
-              (mk_tyapp_ty tcr [TType_measure (MeasureVar (new_anon_inference_var cenv (KindMeasure,m,TyparAnon,(if iszero then NoStaticReq else HeadTypeStaticReq),NoDynamicReq)))])
-
-            | Const_measure(_, ms) -> TType_app(tcr, [TType_measure (TcMeasure ms)])
-            | _ -> TType_app(tcr, [TType_measure MeasureOne])
-        unif measureTy
-
-   
-    match c with 
-    | Const_unit         -> unif cenv.g.unit_ty;       TConst_unit
-    | Const_bool i       -> unif cenv.g.bool_ty;       TConst_bool i
-    | Const_int8 i       -> unif cenv.g.sbyte_ty;      TConst_sbyte i
-    | Const_int16 i      -> unif cenv.g.int16_ty;      TConst_int16 i
-    | Const_int32 i      -> unif cenv.g.int_ty;        TConst_int32 i
-    | Const_int64 i      -> unif cenv.g.int64_ty;      TConst_int64 i
-    | Const_nativeint i  -> unif cenv.g.nativeint_ty;  TConst_nativeint i
-    | Const_uint8 i      -> unif cenv.g.byte_ty;       TConst_byte i
-    | Const_uint16 i     -> unif cenv.g.uint16_ty;     TConst_uint16 i
-    | Const_uint32 i     -> unif cenv.g.uint32_ty;     TConst_uint32 i
-    | Const_uint64 i     -> unif cenv.g.uint64_ty;     TConst_uint64 i
-    | Const_unativeint i -> unif cenv.g.unativeint_ty; TConst_unativeint i
-    | Const_measure(Const_float32 f, _) | Const_float32 f -> unif_measure_arg (f=0.0f) cenv.g.pfloat32_tcr c; TConst_float32 f
-    | Const_measure(Const_float   f, _) | Const_float   f -> unif_measure_arg (f=0.0)  cenv.g.pfloat_tcr c; TConst_float f
-    | Const_measure(Const_decimal s, _) | Const_decimal s -> unif_measure_arg false    cenv.g.pdecimal_tcr c; TConst_decimal s
-    | Const_measure(Const_int8   i, _)  | Const_int8    i -> unif_measure_arg (i=0y)   cenv.g.pint8_tcr c; TConst_sbyte i
-    | Const_measure(Const_int16   i, _) | Const_int16   i -> unif_measure_arg (i=0s)   cenv.g.pint16_tcr c; TConst_int16 i
-    | Const_measure(Const_int32   i, _) | Const_int32   i -> unif_measure_arg (i=0)    cenv.g.pint_tcr c; TConst_int32 i
-    | Const_measure(Const_int64   i, _) | Const_int64   i -> unif_measure_arg (i=0L)   cenv.g.pint64_tcr c; TConst_int64 i
-    | Const_char c       -> unif cenv.g.char_ty;       TConst_char c
-    | Const_string (s,m) -> unif cenv.g.string_ty;     TConst_string s
-    | Const_bignum s     -> error(InternalError("Unexpected big rational constant", m))
-    | Const_measure _    -> error(Error("Units-of-measure supported only on float, float32, decimal and signed integer types", m))
-
-    | Const_uint16array arr -> error(InternalError("Unexpected Const_uint16array",m))
-    | Const_bytearray _ -> error(InternalError("Unexpected Const_bytearray",m))
- 
-/// Convert an Abstract IL ILFieldInit value read from .NET metadata to a TAST constant
-let TcFieldInit m lit = 
-    match lit with 
-    | FieldInit_string s   -> TConst_string s
-    | FieldInit_ref       -> error (InternalError("An error occurred importing a literal value for a field",m))
-    | FieldInit_bool    b -> TConst_bool b
-    | FieldInit_char    c -> TConst_char (char (int c))
-    | FieldInit_int8    x -> TConst_sbyte x
-    | FieldInit_int16   x -> TConst_int16 x
-    | FieldInit_int32   x -> TConst_int32 x
-    | FieldInit_int64   x -> TConst_int64 x
-    | FieldInit_uint8   x -> TConst_byte x
-    | FieldInit_uint16  x -> TConst_uint16 x
-    | FieldInit_uint32  x -> TConst_uint32 x
-    | FieldInit_uint64  x -> TConst_uint64 x
-    | FieldInit_single f -> TConst_float32 f
-    | FieldInit_double f -> TConst_float f 
-
-
-(*-------------------------------------------------------------------------
- * Arities. These serve two roles in the system: 
- *  1. syntactic arities come from the syntactic forms found
- *     signature files and the syntactic forms of function and member definitions.
- *  2. compiled arities representing representation choices w.r.t. internal representations of
- *     functions and members.
- *------------------------------------------------------------------------- *)
-
-// Adjust the arities that came from the parsing of the toptyp (arities) to be a valSynData. 
-// This means replacing the "[unitArg]" arising from a "unit -> ty" with a "[]".
-let AdjustValSynInfoInSignature g ty (ValSynInfo(argsData,retData) as sigMD) = 
-    if is_fun_typ g ty && type_equiv g g.unit_ty (domain_of_fun_typ g ty) && argsData.Length >= 1 && argsData.Head.Length >= 1  then 
-        ValSynInfo(argsData.Head.Tail :: argsData.Tail, retData)
-    else 
-        sigMD 
-
-/// The TopValInfo for a value, except the number of typars is not yet inferred 
-type PartialTopValInfo = PartialTopValInfo of TopArgInfo list list * TopArgInfo 
-
-let TranslateTopArgSynInfo isArg m tcAttribute (ArgSynInfo(attrs,isOpt,nm)) = 
-    let optAttrs = if  isOpt then [Attr(path_to_lid m ["Microsoft";"FSharp";"Core";"OptionalArgument"], mksyn_unit m,None,m)] else []
-    if isArg && nonNil(attrs) && isNone(nm) then 
-        warning(Error("A parameter with attributes must also be given a name, e.g. '[] paramName : paramType'",m));
-
-    if not(isArg) && isSome(nm) then 
-        errorR(Error("Return values may not have names",m));
-       
-    TopArgInfo(tcAttribute (optAttrs@attrs),nm)
-
-/// Members have an arity inferred from their syntax. This "valSynData" is not quite the same as the arities 
-/// used in the middle and backends of the compiler ("topValInfo"). 
-/// "0" in a valSynData (see Ast.arity_of_pat) means a "unit" arg in a topValInfo 
-/// Hence remove all "zeros" from arity and replace them with 1 here. 
-/// Note we currently use the compiled form for choosing unique names, to distinguish overloads because this must match up 
-/// between signature and implementation, and the signature just has "unit". 
-let TranslateTopValSynInfo m tcAttribute (ValSynInfo(argsData,retData)) = 
-    PartialTopValInfo (argsData |> List.mapSquared (TranslateTopArgSynInfo true m (tcAttribute attrTgtParameter)), 
-                       retData |> TranslateTopArgSynInfo false m (tcAttribute attrTgtReturnValue))
-
-let TranslatePartialArity tps (PartialTopValInfo (argsData,retData)) = 
-    TopValInfo(TopValInfo.InferTyparInfo tps,argsData,retData)
-
-
-(*-------------------------------------------------------------------------
- * Members
- *------------------------------------------------------------------------- *)
-
-let ComputeLogicalCompiledName (id:ident) memberFlags = 
-    match memberFlags.MemberKind with 
-    | MemberKindClassConstructor -> ".cctor"
-    | MemberKindConstructor -> ".ctor"
-    | MemberKindMember -> id.idText 
-    | MemberKindPropertyGetSet ->  error(InternalError("MemberKindPropertyGetSet only expected in parse trees",id.idRange))
-    | MemberKindPropertyGet ->  "get_"^id.idText
-    | MemberKindPropertySet ->  "set_"^id.idText 
-
-/// Make the unique "name" for a member.
-//
-// Note: the use of a mangled string as the unique name for a member is one of the reasons 
-// we end up needing things like OverloadID (which is used to make the name unique). 
-//
-// optImplSlotTy = None (for classes) or Some ty (when implementing interface type ty) 
-let MkMemberDataAndUniqueId(g,tcref,isExtrinsic,attrs,optImplSlotTys,memberFlags,valSynData,id)  =
-    let logicalCompiledName = ComputeLogicalCompiledName id memberFlags
-    let optIntfSlotTys = if optImplSlotTys |> List.forall (is_interface_typ g) then optImplSlotTys else []
-    let qualifiedCompiledName = List.foldBack (tcref_of_stripped_typ g >> qualified_mangled_name_of_tcref) optIntfSlotTys logicalCompiledName
-    let memberInfo = 
-        { ApparentParent=tcref; 
-          MemberFlags=memberFlags; 
-          IsImplemented=false;
-          // If this is an interface method impl then the name we use for the method changes 
-          CompiledName=qualifiedCompiledName;
-          // NOTE: This value is initially only set for interface implementations and those overrides 
-          // where we manage to pre-infer which abstract is overriden by the method. It is filled in  
-          // properly when we check the allImplemented implementation checks at the end of the inference scope. 
-          ImplementedSlotSigs=optImplSlotTys |> List.map (fun ity -> TSlotSig(logicalCompiledName,ity,[],[],[],None)) }
-    let isInstance = MemberIsCompiledAsInstance g tcref isExtrinsic memberInfo attrs
-    if (memberFlags.MemberIsVirtual  || memberFlags.MemberIsDispatchSlot || nonNil optIntfSlotTys) then 
-        if not isInstance then
-          errorR(VirtualAugmentationOnNullValuedType(id.idRange));
-    elif memberFlags.MemberIsInstance then 
-        if not isExtrinsic && not isInstance then
-            warning(NonVirtualAugmentationOnNullValuedType(id.idRange))
-    let id = 
-       let tname = tcref.MangledName
-       let text = 
-           match memberFlags.MemberKind with 
-           | MemberKindClassConstructor -> tname^".cctor"
-           | MemberKindConstructor -> tname^".ctor"
-           | MemberKindMember -> tname^"."^id.idText 
-           | MemberKindPropertyGetSet ->  failwith "MkMemberDataAndUniqueId"
-           | MemberKindPropertyGet ->  tname^".get_"^id.idText
-           | MemberKindPropertySet ->  tname^".set_"^id.idText
-       let text = 
-           match memberFlags.OverloadQualifier with
-           | None   -> text^"."^string (List.sum (SynInfo.AritiesOfArgs valSynData))
-           | Some t -> text^".Overloaded."^t
-       let text = if memberFlags.MemberKind <> MemberKindConstructor && memberFlags.MemberKind <> MemberKindClassConstructor && not memberFlags.MemberIsInstance then text^".Static" else text
-       let text = if memberFlags.MemberIsOverrideOrExplicitImpl then text^".Override" else text
-       let text = List.foldBack (tcref_of_stripped_typ g >> qualified_mangled_name_of_tcref) optIntfSlotTys text
-       ident(text,id.idRange)
-    memberInfo,id
-
-
-type OverridesOK = 
-    | OverridesOK 
-    | WarnOnOverrides
-    | ErrorOnOverrides
-
-/// A type to represent information associated with values to indicate what explicit (declared) type parameters
-/// are given and what additional type parameters can be inferred, if any.
-///
-/// The declared type parameters, e.g. let f<'a> (x:'a) = x, plus an indication 
-/// of whether additional polymorphism may be inferred, e.g. let f<'a,..> (x:'a) y = x 
-type ExplicitTyparInfo = ExplicitTyparInfo of Tast.typars * bool
-let permitInferTypars = ExplicitTyparInfo ([],true) 
-let dontInferTypars = ExplicitTyparInfo ([],false) 
-
-type ArgAndRetAttribs = ArgAndRetAttribs of Tast.Attribs list list * Tast.Attribs
-let noArgOrRetAttribs = ArgAndRetAttribs ([],[])
-
-/// A flag to represent the sort of bindings are we processing.
-/// Processing "declaration" and "class" bindings that make up a module (such as "let x = 1 let y = 2") 
-/// shares the same code paths (e.g. TcLetBinding and TcLetrec) as processing expression bindings (such as "let x = 1 in ...") 
-/// Member bindings also use this path. 
-//
-/// However there are differences in how different bindings get processed,
-/// i.e. module bindings get published to the implicitly accumulated module type, but expression 'let' bindings don't. 
-type DeclKind = 
-    | ModuleOrMemberBinding 
-    /// Extensions to a type within the same assembly
-    | IntrinsicExtensionBinding 
-    /// Extensions to a type in a different assembly
-    | ExtrinsicExtensionBinding 
-    | ClassLetBinding 
-    | ObjectExpressionOverrideBinding
-    | ExpressionBinding 
-
-    static member MustHaveArity x = 
-        match x with 
-        | ModuleOrMemberBinding -> true
-        | IntrinsicExtensionBinding  -> true
-        | ExtrinsicExtensionBinding -> true
-        | ClassLetBinding -> false
-        | ObjectExpressionOverrideBinding -> false
-        | ExpressionBinding -> false
-
-    static member IsAccessModifierPermitted  x = 
-        match x with 
-        | ModuleOrMemberBinding -> true
-        | IntrinsicExtensionBinding  -> true
-        | ExtrinsicExtensionBinding -> true
-        | ClassLetBinding 
-        | ObjectExpressionOverrideBinding 
-        | ExpressionBinding -> false
-
-    static member ImplicitlyStatic  x = 
-        match x with 
-        | ModuleOrMemberBinding -> true
-        | IntrinsicExtensionBinding  -> true
-        | ExtrinsicExtensionBinding -> true
-        | ClassLetBinding -> false
-        | ObjectExpressionOverrideBinding -> false
-        | ExpressionBinding -> false
-
-    static member MustAlwaysGeneralize  x = 
-        match x with 
-        | ModuleOrMemberBinding -> true
-        | IntrinsicExtensionBinding  -> true
-        | ExtrinsicExtensionBinding -> true
-        | ClassLetBinding -> true
-        | ObjectExpressionOverrideBinding -> false
-        | ExpressionBinding -> false
-
-    static member CanHaveAttributes  x = 
-        match x with 
-        | ModuleOrMemberBinding -> true
-        | IntrinsicExtensionBinding  -> true
-        | ExtrinsicExtensionBinding -> true
-        | ClassLetBinding -> false
-        | ObjectExpressionOverrideBinding -> true
-        | ExpressionBinding -> false
-
-    // Note: now always true
-    static member CanGeneralizeConstrainedTypars  x = 
-        match x with 
-        | ModuleOrMemberBinding -> true
-        | IntrinsicExtensionBinding  -> true
-        | ExtrinsicExtensionBinding -> true
-        | ClassLetBinding -> true
-        | ObjectExpressionOverrideBinding -> true
-        | ExpressionBinding -> true
-        
-    static member ConvertToLinearBindings  x = 
-        match x with 
-        | ModuleOrMemberBinding -> true
-        | IntrinsicExtensionBinding  -> true
-        | ExtrinsicExtensionBinding -> true
-        | ClassLetBinding -> true
-        | ObjectExpressionOverrideBinding -> true
-        | ExpressionBinding -> false 
-
-    static member CanOverrideOrImplement x = 
-        match x with 
-        | ModuleOrMemberBinding -> OverridesOK
-        | IntrinsicExtensionBinding -> WarnOnOverrides
-        | ExtrinsicExtensionBinding -> ErrorOnOverrides
-        | ClassLetBinding -> ErrorOnOverrides 
-        | ObjectExpressionOverrideBinding -> OverridesOK
-        | ExpressionBinding -> ErrorOnOverrides 
-
-//-------------------------------------------------------------------------
-// Data structures that track the gradual accumualtion of information
-// about values and members during inference.
-//------------------------------------------------------------------------- 
-
-/// The results of preliminary pass over patterns to extract variables being declared.
-type PrelimValScheme1 = 
-    PrelimValScheme1 of 
-        ident * 
-        ExplicitTyparInfo * 
-        Tast.typ * 
-        PartialTopValInfo option *
-        ValMemberInfo option * 
-        bool * 
-        ValInlineInfo * 
-        ValBaseOrThisInfo * 
-        ArgAndRetAttribs * 
-        access option * 
-        bool
-
-/// The results of applying let-style generalization after type checking. 
-type PrelimValScheme2 = 
-    PrelimValScheme2 of 
-        ident * 
-        TypeScheme * 
-        PartialTopValInfo option *
-        ValMemberInfo option  * 
-        bool * 
-        ValInlineInfo * 
-        ValBaseOrThisInfo * 
-        ArgAndRetAttribs * 
-        access option * 
-        bool *
-        bool (* hasDeclaredTypars *) 
-        
-
-/// The results of applying arity inference to PrelimValScheme2 
-type ValScheme = 
-    ValScheme of 
-        ident * 
-        TypeScheme * 
-        ValTopReprInfo option * 
-        ValMemberInfo option  * 
-        bool * 
-        ValInlineInfo * 
-        ValBaseOrThisInfo * 
-        access option * 
-        bool * (* compgen *) 
-        bool * (* isIncrClass *) 
-        bool (* isTyFunc *) 
-
-        
-//-------------------------------------------------------------------------
-// Data structures that track the whole process of taking a syntactic binding and
-// checking it.
-//------------------------------------------------------------------------- 
-
-/// Translation of patterns is List.unzip into three phases. The first collects names. 
-/// The second is run after val_specs have been created for those names and inference 
-/// has been resolved. The second phase is run by applying a function returned by the 
-/// first phase. The input to the second phase is a List.map that gives the Val and type scheme 
-/// for each value bound by the pattern. 
-type TcPatPhase2Input = 
-    TcPatPhase2Input of (Val * TypeScheme) NameMap
-
-
-/// The first phase of translation of binding leaves a whole goop of information. 
-/// This is a bit of a mess: much of this information is carried on a per-value basis by the 
-/// "PrelimValScheme1 NameMap". 
-type TBindingInfo = 
-    TBindingInfo of 
-       ValInlineInfo * 
-       bool *   (* immutable? *)
-       Tast.Attribs * 
-       XmlDoc * 
-       (TcPatPhase2Input -> Patcompile.pat) * 
-       ExplicitTyparInfo * 
-       PrelimValScheme1 NameMap * 
-       expr * 
-       ArgAndRetAttribs * 
-       Tast.typ * 
-       range *
-       SequencePointInfoForBinding * 
-       bool * (* compiler generated? *)
-       Constant option (* literal value? *)
-
-//-------------------------------------------------------------------------
-// Helpers related to type schemes
-//------------------------------------------------------------------------- 
-
-let GeneralizedTypeForTypeScheme typeScheme = 
-    let (TypeScheme(generalizedTypars,_,tau)) = typeScheme
-    try_mk_forall_ty generalizedTypars tau
-
-let NonGenericTypeScheme ty = TypeScheme([],[],ty)
-
-//-------------------------------------------------------------------------
-// Helpers related to publishing values, types and members into the
-// elaborated representation.
-//------------------------------------------------------------------------- 
-
-let curr_stable_fslib_nlpath cenv env = NLPath(cenv.topCcu, arr_path_of_lid env.ePath)
-
-let UpdateAccModuleOrNamespaceType cenv env f = 
-    // Change fslib CCU to ensure forward stable references used by 
-    // the compiler can be resolved ASAP. Not at all pretty but it's hard to 
-    // find good ways to do references from the compiler into a term graph 
-    if cenv.compilingCanonicalFslibModuleType then 
-        let modul = (curr_stable_fslib_nlpath cenv env).Deref
-        if verbose then dprintf "updating contents of CCU-held fslib module %s in case forward references occur form the compiler to this construct\n" modul.MangledName;
-        modul.Data.entity_modul_contents <- notlazy (f true modul.ModuleOrNamespaceType);
-    SetCurrAccumulatedModuleOrNamespaceType env (f false (GetCurrAccumulatedModuleOrNamespaceType env))
-  
-let PublishModuleDefn cenv env mspec = 
-    UpdateAccModuleOrNamespaceType cenv env (fun intoFslibCcu mty -> 
-       if intoFslibCcu then mty
-       else mty.AddEntity(mspec))
-    CallNameResolutionSink(mspec.Range,nenv_of_tenv env,Item_modrefs([mk_local_modref mspec]),ItemOccurence.Binding,env.DisplayEnv,AccessRightsOfEnv env)
-
-let PublishTypeDefn cenv env tycon = 
-    UpdateAccModuleOrNamespaceType cenv env (fun _ mty -> 
-       mty.AddEntity(tycon))
-
-let PublishValueDefnPrim cenv env (vspec:Val) = 
-    UpdateAccModuleOrNamespaceType cenv env (fun _ mty -> 
-        if verbose then dprintf "adding value %s#%d\n" vspec.MangledName vspec.Stamp;
-        mty.AddVal(vspec))
-
-let CheckForValueNameClashes cenv env (v:Val) =
-    if v.IsCompilerGenerated then () else
-    match v.ActualParent with 
-    | ParentNone ->  ()
-    | Parent tcref -> 
-        let hasDefaultAugmentation = 
-            match TryFindAttrib cenv.g cenv.g.attrib_DefaultAugmentationAttribute tcref.Attribs with
-            | Some(Attrib(_,_,[ AttribBoolArg(b) ],_,_)) -> b
-            | _ -> true (* not hiddenRepr *)
-
-        let kind = (if v.IsMember then "member" else "value")
-        if (GetCurrAccumulatedModuleOrNamespaceType env).AllValuesAndMembers.ContainsKey(v.MangledName) then
-            error(Duplicate(kind,v.DisplayName,v.Range));
-        let check skipValCheck nm = 
-            if not skipValCheck && v.IsModuleBinding && (GetCurrAccumulatedModuleOrNamespaceType env).AllValuesAndMembers.ContainsKey(nm) then
-                error(Duplicate(kind,v.DisplayName,v.Range));
-            if (hasDefaultAugmentation) then 
-                match tcref.GetUnionCaseByName(nm) with 
-                | Some(uc) -> error(NameClash(nm,kind,v.DisplayName,v.Range,"union case",uc.DisplayName,uc.Range));
-                | None -> ()
-            // Default augmentation contains the nasty 'Case' etc.
-            if nm.StartsWith "Case" then
-                match tcref.GetUnionCaseByName(nm.[4..]) with 
-                | Some(uc) -> error(NameClash(nm,kind,v.DisplayName,v.Range,"compiled form of the union case",uc.DisplayName,uc.Range));
-                | None -> ()
-            // Default augmentation contains the nasty 'Is' etc.
-            if nm.StartsWith "Is" && hasDefaultAugmentation then
-                match tcref.GetUnionCaseByName(nm.[2..]) with 
-                | Some(uc) -> error(NameClash(nm,kind,v.DisplayName,v.Range,"default augmentation of the union case",uc.DisplayName,uc.Range));
-                | None -> ()
-            // Default augmentation contains the nasty 'Get1' etc.
-            if nm.StartsWith "Get" && hasDefaultAugmentation  then
-                // Check it has a number on the end
-                let baseName = nm.[3..]
-                let trimmedName = baseName.TrimEnd [| '0' .. '9' |]
-                if trimmedName <> baseName then 
-                    match tcref.GetUnionCaseByName(trimmedName) with 
-                    | Some(uc) -> error(NameClash(nm,kind,v.DisplayName,v.Range,"default augmentation of the union case", uc.DisplayName,uc.Range));
-                    | None -> ()
-
-            match tcref.GetFieldByName(nm) with 
-            | Some(rf) -> error(NameClash(nm,kind,v.DisplayName,v.Range,"field",rf.Name,rf.Range));
-            | None -> ()
-
-        check false v.MangledName
-        check false v.DisplayName
-        check false v.CompiledName
-        // Properties get 'get_X'
-        match v.TopValInfo with 
-        | Some arity when arity.NumCurriedArgs = 0 && arity.NumTypars = 0 -> check false ("get_"^v.DisplayName)
-        | _ -> ()
-        match v.TopValInfo with 
-        | Some arity when v.IsMutable && arity.NumCurriedArgs = 0 && arity.NumTypars = 0 -> check false ("set_"^v.DisplayName)
-        | _ -> ()
-        match TryChopPropertyName v.DisplayName with 
-        | Some res -> check true res 
-        | None -> ()
-           
-        
-let PublishValueDefn cenv env declKind (vspec:Val) =
-    if (declKind = ModuleOrMemberBinding) && 
-       ((GetCurrAccumulatedModuleOrNamespaceType env).ModuleOrNamespaceKind = Namespace) && 
-       (isNone vspec.MemberInfo) then 
-           errorR(Error("Namespaces may not contain values. Consider using a module to hold your value declarations",vspec.Range));
-
-    if (declKind = ExtrinsicExtensionBinding) && 
-       ((GetCurrAccumulatedModuleOrNamespaceType env).ModuleOrNamespaceKind = Namespace) then 
-           errorR(Error("Namespaces may not contain extension members except in the same file and namespace where the type is defined. Consider using a module to hold declarations of extension members",vspec.Range));
-
-    try CheckForValueNameClashes cenv env vspec with e -> errorRecovery e vspec.Range; 
-
-    // Publish the value to the module type being generated. 
-    if (match declKind with 
-        | ModuleOrMemberBinding -> true
-        | ExtrinsicExtensionBinding -> true
-        | IntrinsicExtensionBinding -> true
-        | _ -> false) then 
-        PublishValueDefnPrim cenv env vspec
-
-    match vspec.MemberInfo with 
-    | Some memberInfo when 
-        (not vspec.IsCompilerGenerated && 
-         // Extrinsic extensions don't get added to the tcaug
-         not (declKind = ExtrinsicExtensionBinding) && 
-         // Static initializers don't get published to the tcaug 
-         not (memberInfo.MemberFlags.MemberKind = MemberKindClassConstructor)) -> 
-        
-        // tcaug_adhoc cleanup: we should not need this table nor this mutation 
-        // The values should be carried in the environment and in the generated module type. 
-        // Opening module types should add the values to the environment. 
-        let tcaug = vspec.MemberApparentParent.TypeContents
-        tcaug.tcaug_adhoc <- NameMultiMap.add memberInfo.CompiledName (mk_local_vref vspec) tcaug.tcaug_adhoc
-    |  _ -> ()
-
-let CombineVisibilityAttribs vis1 vis2 m = 
-   if isSome vis1 && isSome vis2 then 
-        errorR(Error("Multiple visibility attributes have been specified for this identifier",m));
-   if isSome vis1 then vis1 else vis2
-
-let ComputeAccessAndCompPath env declKindOpt m vis actualParent = 
-    let accessPath = curr_access_cpath env
-    let accessModPermitted = 
-        match declKindOpt with 
-        | None -> true
-        | Some declKind -> DeclKind.IsAccessModifierPermitted declKind
-
-    if isSome vis && not accessModPermitted then 
-        errorR(Error("Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions",m)); 
-    let vis = 
-        match vis with 
-        | None -> taccessPublic (* a module or member binding defaults to "public" *)
-        | Some a when a = accessPublic -> taccessPublic
-        | Some a when a = accessPrivate -> TAccess [accessPath]
-        | Some a when a = accessInternal -> 
-            let (CompPath(scoref,_)) = accessPath
-            TAccess [CompPath(scoref,[])]
-        | _ -> 
-            errorR(InternalError("Unrecognized accessibility specification",m));
-            taccessPublic
-
-    let vis = 
-        match actualParent with 
-        | ParentNone -> vis 
-        | Parent tcref -> 
-             combineAccess vis tcref.Accessibility
-    let cpath = curr_cpath env
-    let cpath = (if accessModPermitted then Some cpath else None)
-    vis,cpath 
-
-let CheckForAbnormalOperatorNames cenv idRange opName isMember =
-    
-
-    if (end_col_of_range idRange - start_col_of_range idRange <= 5) && 
-       not cenv.g.compilingFslib  then 
-        
-        match opName, isMember with 
-        | PrettyNaming.Relational   ,true  -> warning(StandardOperatorRedefinitionWarning(sprintf "The name '(%s)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other .NET languages then use the name '%s' instead" opName (CompileOpName opName),idRange))
-        | PrettyNaming.Equality ,true  -> warning(StandardOperatorRedefinitionWarning(sprintf "The name '(%s)' should not be used as a member name. To define equality semantics for a type, override the 'Object.Equals' member. If defining a static member for use from other .NET languages then use the name '%s' instead" opName (CompileOpName opName),idRange))
-        | PrettyNaming.Control,true  -> warning(StandardOperatorRedefinitionWarning(sprintf "The name '(%s)' should not be used as a member name. If defining a static member for use from other .NET languages then use the name '%s' instead" opName (CompileOpName opName),idRange))
-        | PrettyNaming.FixedTypes,true  -> warning(StandardOperatorRedefinitionWarning(sprintf "The name '(%s)' should not be used as a member name because it is given a standard definition in the F# library over fixed types" opName,idRange))
-        | PrettyNaming.Indexer,true  -> ()
-        | PrettyNaming.Relational  ,false -> warning(StandardOperatorRedefinitionWarning(sprintf "The '%s' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type" opName,idRange))
-        | PrettyNaming.Equality ,false -> warning(StandardOperatorRedefinitionWarning(sprintf "The '%s' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type" opName,idRange))
-        | PrettyNaming.Control,false -> warning(StandardOperatorRedefinitionWarning(sprintf "The '%s' operator should not normally be redefined. Consider using a different operator name" opName,idRange))
-        | PrettyNaming.Indexer,false -> error(StandardOperatorRedefinitionWarning(sprintf "The '%s' operator may not be redefined. Consider using a different operator name" opName,idRange))
-        | PrettyNaming.FixedTypes,_ -> ()
-        | PrettyNaming.Other,_ -> ()
-
-let MakeAndPublishVal cenv env (altActualParent,inSig,declKind,vrec,(ValScheme(id,typeScheme,topValData,memberInfoOpt,mut,inlineFlag,baseOrThis,vis,compgen,isIncrClass,isTyFunc)),attrs,doc,konst) =
-    (* dprintf "MakeAndPublishVal, id = %s\n" id.idText; *)
-    let ty = GeneralizedTypeForTypeScheme typeScheme
-    let m = id.idRange
-    let isIntfImpl = 
-        match memberInfoOpt with 
-        | None -> false 
-        | Some memberInfo -> MemberIsExplicitImpl cenv.g memberInfo
-
-    let isTopBinding = 
-        match declKind with 
-        | ModuleOrMemberBinding -> true
-        | ExtrinsicExtensionBinding -> true
-        | IntrinsicExtensionBinding -> true
-        | _ -> false
-
-    let isExtrinsic = (declKind=ExtrinsicExtensionBinding)
-    let actualParent = 
-        // Use the parent of the member if it's available 
-        // If it's an extrinsic extension member of not a member then use the containing module. 
-        match memberInfoOpt with 
-        | Some memberInfo when not isExtrinsic -> 
-            if memberInfo.ApparentParent.IsModuleOrNamespace then 
-                errorR(InternalError("expected module or namespace parent "^id.idText,m));
-
-            Parent(memberInfo.ApparentParent)
-        | _ -> altActualParent
-             
-    let vis,cpath = ComputeAccessAndCompPath env (Some declKind) id.idRange vis actualParent
-
-    let inlineFlag = 
-        if HasAttrib cenv.g cenv.g.attrib_DllImportAttribute attrs then begin 
-            if inlineFlag = PseudoValue || inlineFlag = AlwaysInline then 
-              errorR(Error("DLLImport stubs may not be inlined",m)); 
-            NeverInline 
-        end else inlineFlag
-
-    let vspec = 
-        NewVal (id,ty,
-                      (if ((* (is_byref_typ cenv.g ty) || *) mut) then Mutable else Immutable),
-                      compgen,topValData,cpath,vis,vrec,memberInfoOpt,baseOrThis,attrs,inlineFlag,doc, isTopBinding, isExtrinsic,isIncrClass,isTyFunc,konst,actualParent)
-
-    CheckForAbnormalOperatorNames cenv id.idRange (DecompileOpName vspec.CoreDisplayName) (isSome memberInfoOpt)
-
-    PublishValueDefn cenv env declKind vspec;
-
-  (*  dprintf "register val, inSig = %b, v = %s, scopem = %a\n" inSig vspec.MangledName output_range vspec.Range ; *)
-
-    // Notify the Language Service or another development environment that 
-    // the value in scope at the binding point (i.e. the range of the 
-    // identifier text for the value). 'unqualified' is true if the name at the 
-    // binding location in the original source appears unqualified, as 
-    // in the case of both static and instance members in signatures 
-    // and all static members in classes. 
-    // REVIEW: this logic is to some extent part of the name resolution rules, i.e. how 
-    // different kinds of 'values' (including members) appear in the name environment at 
-    // different points. 
-    begin 
-        let unqualified = 
-             match vspec.MemberInfo with 
-             | None -> true
-             | Some memberInfo -> inSig || not memberInfo.MemberFlags.MemberIsInstance
-
-        match !GlobalTypecheckResultsSink with 
-        | None -> ()
-        | Some _ -> 
-            if unqualified && not vspec.IsCompilerGenerated && not (String.hasPrefix vspec.MangledName "_") then 
-                let nenv = AddFakeNamedValRefToNameEnv vspec.DisplayName (mk_local_vref vspec) (nenv_of_tenv env)
-                CallEnvSink(vspec.Range,nenv,AccessRightsOfEnv env)
-                CallNameResolutionSink(vspec.Range,nenv,Item_val(mk_local_vref vspec),ItemOccurence.Binding,nenv.eDisplayEnv,AccessRightsOfEnv env);
-    end;
-
-    vspec
-
-let MakeAndPublishVals cenv env (altActualParent,inSig,declKind,vrec,valSchemes,attrs,doc,konst) =
-    Map.fold_right
-        (fun name (ValScheme(_,typeScheme,_,_,_,_,_,_,_,_,_) as valscheme) values -> 
-          Map.add name (MakeAndPublishVal cenv env (altActualParent,inSig,declKind,vrec,valscheme,attrs,doc,konst), typeScheme) values)
-        valSchemes
-        Map.empty
-
-let MakeAndPublishBaseVal cenv env baseIdOpt ty = 
-    baseIdOpt |> Option.map (fun (id:ident) ->
-       let valscheme = ValScheme(id,NonGenericTypeScheme(ty),None,None,false,NeverInline,BaseVal,None,false,false,false)
-       MakeAndPublishVal cenv env (ParentNone,false,ExpressionBinding,ValNotInRecScope,valscheme,[],emptyXmlDoc,None))
-
-let MakeAndPublishCtorThisRefCellVal cenv env (thisIdOpt: ident option) thisTy = 
-    match thisIdOpt with 
-    | Some thisId -> 
-        if not (is_fsobjmodel_typ cenv.g thisTy) then 
-            errorR(Error("Structs may only bind a 'this' parameter at member declarations",thisId.idRange));
-
-        let thisValScheme = ValScheme(thisId,NonGenericTypeScheme(mk_refcell_ty cenv.g thisTy),None,None,false,NeverInline,CtorThisVal,None,false,false,false)
-        Some(MakeAndPublishVal cenv env (ParentNone,false,ExpressionBinding,ValNotInRecScope,thisValScheme,[],emptyXmlDoc,None))
-    | None -> None 
-
-
-//-------------------------------------------------------------------------
-// Helpers for type inference for recursive bindings
-//------------------------------------------------------------------------- 
-
-/// Fixup the type instantiation at recursive references. Used after the bindings have been
-/// checked. The fixups are applied by using mutation.
-let AdjustAndForgetUsesOfRecValue cenv vrefTgt (ValScheme(id,typeScheme,toparity,_,_,_,_,_,_,_,_)) =
-    let (TypeScheme(generalizedTypars,_,ty)) = typeScheme
-    let fty = GeneralizedTypeForTypeScheme typeScheme
-    let lvrefTgt = deref_val vrefTgt
-    if nonNil(generalizedTypars) then begin
-        // Find all the uses of this recursive binding and use mutation to adjust the expressions 
-        // at those points in order to record the inferred type parameters. 
-        let recUses = vspec_mmap_find lvrefTgt cenv.recUses
-        recUses |> List.iter  (fun (fixupPoint,m,isComplete) -> 
-          if not isComplete then 
-              // Keep any values for explicit type arguments 
-              let fixedUpExpr = 
-                  let vrefFlags,tyargs0 = 
-                      match !fixupPoint with 
-                      | TExpr_app(TExpr_val (_,vrefFlags,_),_,tyargs0,[],m) -> vrefFlags,tyargs0
-                      | TExpr_val(_,vrefFlags,_) -> vrefFlags,[] 
-                      | _ -> errorR(Error("Unexpected expression at recursive inference point",m)); NormalValUse,[]
-                  
-                  let ityargs = generalize_typars (List.drop (List.length tyargs0) generalizedTypars)
-                  prim_mk_app (TExpr_val (vrefTgt,vrefFlags,m),fty) (tyargs0 @ ityargs) [] m
-              fixupPoint :=   fixedUpExpr)
-    end;
-    cenv.recUses <- vspec_map_remove lvrefTgt cenv.recUses
-     
-
-/// Set the properties of recursive values that are only fully known after inference is complete 
-let AdjustRecType cenv (vspec:Val) (ValScheme(id,typeScheme,topValData,_,_,_,_,_,_,_,_)) =
-    let fty = GeneralizedTypeForTypeScheme typeScheme
-    vspec.Data.val_type <- fty;
-    vspec.Data.val_top_repr_info <- topValData;
-    set_vrec_of_vflags vspec.Data ValNotInRecScope
-       
-/// Record the generated value expression as a place where we will have to 
-/// adjust using AdjustAndForgetUsesOfRecValue at a letrec point. Every use of a value 
-/// under a letrec gets used at the _same_ type instantiation. 
-let RecordUseOfRecValue cenv vrec vrefTgt vexp m = 
-    match vrec with 
-    | ValInRecScope isComplete -> 
-        let fixupPoint = ref vexp
-        cenv.recUses <- vspec_mmap_add (deref_val vrefTgt) (fixupPoint,m,isComplete) cenv.recUses;
-        TExpr_link (fixupPoint)
-    | ValNotInRecScope -> 
-        vexp
-
-type RecursiveUseFixupPoints = RecursiveUseFixupPoints of (expr ref * range) list
-
-/// Get all recursive references, for fixing up delayed recursion using laziness 
-let GetAllUsesOfRecValue cenv vrefTgt = 
-    RecursiveUseFixupPoints (vspec_mmap_find vrefTgt cenv.recUses |> List.map (fun (fixupPoint,m,isComplete) -> (fixupPoint,m)))
-
-
-//-------------------------------------------------------------------------
-// Helpers for Generalization
-//------------------------------------------------------------------------- 
-
-let ChooseCanonicalDeclaredTyparsAfterInference g denv declaredTypars m =
-
-    declaredTypars |> List.iter (fun tp -> 
-      let ty = mk_typar_ty tp
-      if not (is_anypar_typ g ty) then 
-          error(Error("This code is less generic than required by its annotations because the explicit type variable '"^tp.Name ^"' could not be generalized. It was constrained to be '"^NicePrint.pretty_string_of_typ denv ty^"'",tp.Range)));
-    
-    let declaredTypars = NormalizeDeclaredTyparsForEquiRecursiveInference g declaredTypars
-    if (ListSet.setify typar_ref_eq declaredTypars).Length <> declaredTypars.Length then 
-        errorR(Error("One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types",m));
-    declaredTypars
-
-let ChooseCanonicalValSchemeAfterInference g denv valscheme m =
-    let (ValScheme(id,typeScheme,arityInfo,memberInfoOpt,mut,inlineFlag,baseOrThis,vis,compgen,isIncrClass,isTyFunc)) = valscheme
-    let (TypeScheme(generalizedTypars,freeChoiceTypars,ty)) = typeScheme
-    let generalizedTypars = ChooseCanonicalDeclaredTyparsAfterInference g denv generalizedTypars m
-    let typeScheme = TypeScheme(generalizedTypars,freeChoiceTypars,ty)
-    let valscheme = ValScheme(id,typeScheme,arityInfo,memberInfoOpt,mut,inlineFlag,baseOrThis,vis,compgen,isIncrClass,isTyFunc)
-    valscheme
-
-let PlaceTyparsInDeclarationOrder declaredTypars generalizedTypars  =
-    declaredTypars @ (generalizedTypars |> List.filter (fun tp -> not (ListSet.mem typar_ref_eq tp declaredTypars)))
-
-let SetTyparRigid g denv m (tp:Typar) = 
-    begin match tp.Solution with 
-    | None -> ()
-    | Some ty -> 
-        if tp.IsCompilerGenerated then 
-            errorR(Error("A generic type parameter has been used in a way that constrains it to always be '"^NicePrint.pretty_string_of_typ denv ty^"'",m))
-        else 
-            errorR(Error("This type parameter has been used in a way that constrains it to always be '"^NicePrint.pretty_string_of_typ denv ty^"'",tp.Range))
-    end;
-    set_rigid_of_tpdata tp.Data TyparRigid
-
-let GeneralizeVal cenv denv enclosingDeclaredTypars generalizedTyparsForRecursiveBlock generalizedTyparsForThisBinding 
-        (PrelimValScheme1(id,iflex,ty,partialTopValInfo,memberInfoOpt,mut,inlineFlag,baseOrThis,argAttribs,vis,compgen)) = 
-    let (ExplicitTyparInfo(declaredTypars,_)) = iflex
-    let m = id.idRange
-    let allDeclaredTypars = enclosingDeclaredTypars@declaredTypars
-    let allDeclaredTypars = ChooseCanonicalDeclaredTyparsAfterInference  cenv.g denv allDeclaredTypars m
-    (* Trim out anything not in type of the value (as opposed to the type of the r.h.s) *)
-    (* This is important when a single declaration binds *)
-    (* multiple generic items, where each item does not use all the polymorphism *)
-    (* of the r.h.s. , e.g. let x,y = None,[] *)
-    let computeRelevantTypars thruFlag = 
-        let ftps = (free_in_type_lr cenv.g thruFlag ty)
-        let generalizedTypars = generalizedTyparsForThisBinding |> List.filter (fun tp -> ListSet.mem typar_ref_eq tp ftps)
-        (* Put declared typars first *)
-        let generalizedTypars = PlaceTyparsInDeclarationOrder allDeclaredTypars generalizedTypars  
-        generalizedTypars
-
-    let generalizedTypars = computeRelevantTypars false
-
-    // Check stability of existence and ordering of type parameters under erasure of type abbreviations
-    let generalizedTyparsLookingThroughTypeAbbreviations = computeRelevantTypars true
-    if not (generalizedTypars.Length = generalizedTyparsLookingThroughTypeAbbreviations.Length && 
-            List.for_all2 typar_ref_eq generalizedTypars generalizedTyparsLookingThroughTypeAbbreviations) then
-        warning(Error("the type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int   or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x)",m));
-
-    // Some recursive bindings result in free type variables, e.g. 
-    //    let rec f (x:'a) = ()  
-    //    and g() = (\y. f y); () 
-    // What is the type of y? Type inference equates it to 'a. 
-    // But "g" is not polymorphic in 'a. Hence we get a free choice of "'a" 
-    // in the scope of "g". Thus at each individual recursive binding we record all 
-    // type variables for which we have a free choice, which is precisely the difference 
-    // between the union of all sets of generalized type variables and the set generalized 
-    // at each particular binding. 
-    //
-    // We record an expression node that indicates that a free choice can be made 
-    // for these. This expression node effectively binds the type variables. 
-    let freeChoiceTypars = ListSet.subtract typar_ref_eq generalizedTyparsForRecursiveBlock generalizedTypars
-    (* printf "GeneralizeVal: %s generalizedTypars=%s epts=%s\n" id.idText (TyparsL generalizedTypars |> showL) (TyparsL freeChoiceTypars |> showL); *)
-
-    (* if nonNil freeChoiceTypars then dprintf "#freeChoiceTypars = %d, #generalizedTypars=%d, #generalizedTyparsForRecursiveBlock=%d, #declaredTypars=%d @ %a\n" (List.length freeChoiceTypars) (List.length generalizedTypars) (List.length generalizedTyparsForRecursiveBlock) (List.length declaredTypars) output_range m; *)
-
-    let hasDeclaredTypars = nonNil(declaredTypars)
-    // This is just about the only place we form a TypeScheme 
-    let tyScheme = TypeScheme(generalizedTypars, freeChoiceTypars, ty)
-    PrelimValScheme2(id,tyScheme,partialTopValInfo,memberInfoOpt,mut,inlineFlag,baseOrThis,argAttribs,vis,compgen,hasDeclaredTypars)
-
-let GeneralizeVals cenv denv enclosingDeclaredTypars generalizedTyparsForRecursiveBlock generalizedTypars types = 
-    NameMap.map (GeneralizeVal cenv denv enclosingDeclaredTypars generalizedTyparsForRecursiveBlock generalizedTypars) types
-
-let DontGeneralizeVals types = 
-    let dontGeneralizeVal (PrelimValScheme1(id,_,ty,partialTopValInfoOpt,memberInfoOpt,mut,inlineFlag,baseOrThis,argAttribs,vis,compgen)) = 
-        PrelimValScheme2(id, NonGenericTypeScheme(ty), partialTopValInfoOpt,memberInfoOpt,mut,inlineFlag,baseOrThis,argAttribs,vis,compgen,false)
-    NameMap.map dontGeneralizeVal types
-
-let InferGenericArityFromTyScheme (TypeScheme(generalizedTypars,_,_)) partialTopValInfo =
-    TranslatePartialArity generalizedTypars partialTopValInfo
-
-let ComputeIsTyFunc(id:ident,hasDeclaredTypars,arityInfo:ValTopReprInfo option) = 
-    hasDeclaredTypars && 
-    (match arityInfo with 
-     | None -> error(Error("Explicit type parameters may only be used on module or member bindings",id.idRange)) 
-     | Some info -> info.NumCurriedArgs = 0) 
-
-let UseSyntacticArity declKind typeScheme partialTopValInfo = 
-    if DeclKind.MustHaveArity declKind then 
-        Some(InferGenericArityFromTyScheme typeScheme partialTopValInfo)
-    else 
-        None
-
-/// Combine the results of InferValSynData and InferArityOfExpr. 
-//
-// The F# spec says that we infer arities from declaration forms and types.
-//
-// For example
-//     let f (a,b) c = 1                  // gets arity [2;1] 
-//     let f (a:int*int) = 1              // gets arity [2], based on type
-//     let f () = 1                       // gets arity [0]
-//     let f = (fun (x:int) (y:int) -> 1) // gets arity [1;1]
-//     let f = (fun (x:int*int) y -> 1)   // gets arity [2;1]
-//
-// Some of this arity inference is purely syntax directed and done in InferValSynData in ast.ml
-// Some is done by InferArityOfExpr. 
-//
-// However, there are some corner cases in this specification. In particular, consider
-//   let f () () = 1             // [0;1] or [0;0]?  Answer: [0;1]
-//   let f (a:unit) = 1          // [0] or [1]?      Answer: [1]
-//   let f = (fun () -> 1)       // [0] or [1]?      Answer: [0]
-//   let f = (fun (a:unit) -> 1) // [0] or [1]?      Answer: [1]
-//
-// The particular choice of [1] for
-//   let f (a:unit) = 1          
-// is intended to give a disambiguating form for members that override methods taking a single argument 
-// instantiated to type "unit", e.g.
-//    type Base<'a> = 
-//        abstract M : 'a -> unit
-//
-//    { new Base with 
-//        member x.M(v:int) = () }
-//
-//    { new Base with 
-//        member x.M(v:unit) = () }
-//
-let CombineSyntacticAndInferredArities g declKind rhsExpr prelimScheme = 
-    let (PrelimValScheme2(id,typeScheme,partialTopValInfoOpt,memberInfoOpt,mut,_,_,ArgAndRetAttribs(argAttribs,retAttribs),_,_,_)) = prelimScheme
-    match partialTopValInfoOpt, DeclKind.MustHaveArity declKind with
-    | _        ,false -> None
-    | None     ,true  -> Some(PartialTopValInfo([],TopValInfo.unnamedRetVal))
-    // Don't use any expression information for members, where syntax dictates the arity completely
-    | _ when memberInfoOpt.IsSome -> 
-        partialTopValInfoOpt
-    | Some(partialTopValInfoFromSyntax),true  -> 
-        let (PartialTopValInfo(curriedArgInfosFromSyntax,retInfoFromSyntax)) = partialTopValInfoFromSyntax
-        let partialArityInfo = 
-            if mut then 
-                PartialTopValInfo ([],retInfoFromSyntax)
-            else
-            
-                let (TopValInfo (_,curriedArgInfosFromExpression,_)) = 
-                    InferArityOfExpr g (GeneralizedTypeForTypeScheme typeScheme) argAttribs retAttribs rhsExpr
-
-                // Choose between the syntactic arity and the expression-inferred arity
-                // If the syntax specifies an eliminated unit arg, then use that
-                let choose ai1 ai2 = 
-                    match ai1,ai2 with 
-                    | [],ai -> []
-                    // Dont infer eliminated unit args from the expression if they don't occur syntactically.
-                    | ai,[] -> ai
-                    // If we infer a tupled argument from the expression and/or type then use that
-                    | _ when ai1.Length < ai2.Length -> ai2
-                    | _ -> ai1
-                let rec loop ais1 ais2 =
-                    match ais1,ais2 with 
-                    // If the expression infers additional arguments then use those (this shouldn't happen, since the
-                    // arity inference done on the syntactic form should give identical results)
-                    | [],ais | ais,[] -> ais
-                    | (h1::t1),(h2::t2) -> choose h1 h2 :: loop t1 t2
-                let curriedArgInfos = loop curriedArgInfosFromSyntax curriedArgInfosFromExpression
-                PartialTopValInfo (curriedArgInfos,retInfoFromSyntax)
-
-        Some(partialArityInfo)
-
-let BuildValScheme declKind partialArityInfoOpt prelimScheme = 
-    let (PrelimValScheme2(id,typeScheme,_,memberInfoOpt,mut,inlineFlag,baseOrThis,ArgAndRetAttribs(argAttribs,retAtrribs),vis,compgen,hasDeclaredTypars)) = prelimScheme
-    let topValInfo = 
-        if DeclKind.MustHaveArity declKind then 
-            Option.map (InferGenericArityFromTyScheme typeScheme) partialArityInfoOpt
-        else
-            None
-    let isTyFunc = ComputeIsTyFunc(id,hasDeclaredTypars,topValInfo)
-    ValScheme(id,typeScheme,topValInfo,memberInfoOpt,mut,inlineFlag,baseOrThis,vis,compgen,false,isTyFunc)
-
-let UseCombinedArity g declKind rhsExpr prelimScheme = 
-    let partialArityInfoOpt = CombineSyntacticAndInferredArities g declKind rhsExpr prelimScheme 
-    BuildValScheme declKind partialArityInfoOpt prelimScheme
-    
-let UseNoArity prelimScheme = 
-    BuildValScheme ExpressionBinding None prelimScheme
-
-let MakeSimpleVals cenv env m names =
-    let tyschemes  = DontGeneralizeVals names
-    let valSchemes = NameMap.map UseNoArity tyschemes
-    let values     = MakeAndPublishVals cenv env (ParentNone,false,ExpressionBinding,ValNotInRecScope,valSchemes,[],emptyXmlDoc,None)
-    let vspecMap   = NameMap.map fst values
-    values,vspecMap
-    
-let MakeAndPublishSimpleVals cenv env m names =
-    let values,vspecMap   = MakeSimpleVals cenv env m names
-    let envinner   = AddLocalValMap m vspecMap env
-    envinner,values,vspecMap
-
-
-
-//-------------------------------------------------------------------------
-// Helpers to freshen existing types and values, i.e. when a reference
-// to C<_> occurs then generate C for a fresh type inference variable ?ty.
-//------------------------------------------------------------------------- 
-   
-// REVIEW: we should ideally never need to pass in rigid=false here 
-// REVIEW: this is related to how we typecheck recursive bindings in the presence 
-// REVIEW: of explicit type parameters, including type parameters arising from classes. 
-let FreshenTyconRef m rigid (tcref:TyconRef) declaredTyconTypars = 
-    let tpsorig = declaredTyconTypars
-    let tps = CopyTypars tpsorig
-    if rigid <> TyparRigid then 
-      tps |> List.iter (fun tp -> set_rigid_of_tpdata tp.Data rigid);  
-        
-    let renaming,tinst = FixupNewTypars m [] [] tpsorig tps
-    TType_app(tcref,List.map mk_typar_ty tpsorig),tps,renaming,TType_app(tcref,tinst)
-    
-let FreshenPossibleForallTy g m rigid ty = 
-    let tpsorig,tau =  try_dest_forall_typ g ty
-    if isNil tpsorig then [],[],tau
-    else
-        // tps may be have been equated to other tps in equi-recursive type inference and units-of-measure type inference. Normalize them here 
-        let tpsorig = NormalizeDeclaredTyparsForEquiRecursiveInference g tpsorig
-        let tps,renaming,tinst = copy_and_fixup_typars m rigid tpsorig
-        tps,tinst,InstType renaming tau
-
-let info_of_tcref cenv m env (tcref:TyconRef) = 
-    let tps,renaming,tinst = new_tinst cenv m (tcref.Typars(m))
-    tps,renaming,tinst,TType_app (tcref,tinst)
-
-
-/// Given a abstract method, which may be a generic method, freshen the type in preparation 
-/// to apply it as a constraint to the method that implements the abstract slot 
-let FreshenAbstractSlot g amap m synTyparDecls absMethInfo = 
-
-    // Work out if an explicit instantiation has been given. If so then the explicit type 
-    // parameters will be made rigid and checked for generalization. If not then auto-generalize 
-    // by making the copy of the type parameters on the virtual being overriden rigid. 
-
-    let typarsFromAbsSlotAreRigid = 
-        
-        match synTyparDecls with 
-        | SynValTyparDecls(synTypars,infer,_) -> 
-            if nonNil synTypars && infer then errorR(Error("You must explicitly declare either all or no type parameters when overriding a generic abstract method",m));
-            isNil synTypars
-            
-    let argtys,retTy,fmtps,_ = CompiledSigOfMeth g amap m absMethInfo
-    (* dprintf "nm = %s, #fmtps = %d\n" absMethInfo.LogicalName (List.length fmtps); *) 
-    
-    (* If the virual method is a generic method then copy its type parameters *)
-    let typarsFromAbsSlot,typarInstFromAbsSlot,_ = 
-        let ttps = (FormalTyparsOfEnclosingTypeOfMethInfo m absMethInfo)
-        let ttinst = tinst_of_stripped_typ g absMethInfo.EnclosingType
-        let rigid = (if typarsFromAbsSlotAreRigid then TyparRigid else TyparWarnIfNotRigid)
-        ConstraintSolver.freshen_and_fixup_typars m rigid ttps ttinst fmtps
-
-   (*  dprintf "#typarsFromAbsSlot = %d\n" (List.length typarsFromAbsSlot); *)
-
-    (* Work out the required type of the member *)
-    let argTysFromAbsSlot = argtys |> List.mapSquared (InstType typarInstFromAbsSlot) 
-    let retTyFromAbsSlot = retTy  |> GetFSharpViewOfReturnType g |> InstType typarInstFromAbsSlot 
-    typarsFromAbsSlotAreRigid,typarsFromAbsSlot,argTysFromAbsSlot, retTyFromAbsSlot
-
-
-//-------------------------------------------------------------------------
-// Helpers to typecheck expressions and patterns
-//------------------------------------------------------------------------- 
-
-let BuildFieldMap cenv env isPartial ty flds m = 
-    let ad = AccessRightsOfEnv env
-    if isNil flds then invalidArg "flds" "BuildFieldMap";
-    
-    let frefSets = 
-        flds |> List.map (fun (fld,fldExpr) -> 
-            let frefSet = ResolveField cenv.nameResolver env.eNameResEnv ad ty fld
-            fld,frefSet, fldExpr)
-    let relevantTypeSets = 
-        frefSets |> List.map (fun (_,frefSet,_) -> frefSet |> List.choose (fun (tcref,isRecdField) -> if isRecdField then Some(tcref.TyconRef) else None))
-    
-    let tcref = 
-        match List.fold (ListSet.intersect (tcref_eq cenv.g)) (List.hd relevantTypeSets) (List.tl relevantTypeSets) with
-        | [tcref] -> tcref
-        | _ -> 
-            if isPartial then 
-                warning (Error("The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type",m));
-            // OK, there isn't a unique type dictated by the intersection for the field refs. 
-            // We're going to get an error of some kind below. 
-            // Just choose one field ref and let the error come later 
-            let (_,frefSet1,_) = List.hd frefSets
-            let fref1 = fst (List.hd frefSet1)
-            fref1.TyconRef
-    
-    let fldsmap,rfldsList = 
-        ((Map.empty,[]), frefSets) ||> List.fold (fun (fs,rfldsList) (fld,frefs,fldExpr) -> 
-                match frefs |> List.filter (fun (fref2,isRecdField) -> tcref_eq cenv.g tcref fref2.TyconRef) with
-                | [(fref2,isRecdField)] -> 
-
-                    // Record the precise resolution of the field for intellisense
-                    CallNameResolutionSink(snd(fld).idRange,nenv_of_tenv env,FreshenRecdFieldRef cenv.nameResolver m fref2,ItemOccurence.Use,env.DisplayEnv,ad)
-
-                    if not isRecdField then errorR(DeprecatedClassFieldInference(m));
-                    CheckRecdFieldAccessible m (AccessRightsOfEnv env) fref2 |> ignore;
-                    CheckFSharpAttributes cenv.g fref2.PropertyAttribs m |> CommitOperationResult;        
-                    if  Map.mem fref2.FieldName fs then 
-                        errorR (Error("The field "^fref2.FieldName^" appears twice in this record expression or pattern",m));
-                    if  not (tcref_eq cenv.g tcref fref2.TyconRef) then 
-                        let (_,frefSet1,_) = List.hd frefSets
-                        let fref1 = fst (List.hd frefSet1)
-                        errorR (FieldsFromDifferentTypes(env.DisplayEnv,fref1,fref2,m));
-                        (fs,rfldsList)
-                    else (Map.add fref2.FieldName fldExpr fs,
-                          (fref2.FieldName,fldExpr)::rfldsList)
-                | _ -> error(Error("This record contains fields from inconsistent types",m)))
-    tcref,fldsmap,List.rev rfldsList
-
-let rec gen_constr_unify (mk_ucasef,mk_exnconstrf) m cenv env ty item =
-    let ad = AccessRightsOfEnv env
-    match item with 
-    | Item_ecref ecref -> 
-        CheckEntityAttributes cenv.g ecref m  |> CommitOperationResult;
-        unifyE cenv env m ty cenv.g.exn_ty;
-        CheckTyconAccessible m ad ecref |> ignore;
-        let mkf = mk_exnconstrf(ecref)
-        mkf,typs_of_ecref_rfields ecref
-    | Item_ucase ucinfo ->   
-        let ucref = ucinfo.UnionCaseRef 
-        CheckUnionCaseAttributes cenv.g ucref m  |> CommitOperationResult;
-        CheckUnionCaseAccessible m ad ucref |> ignore;
-        //let _,inst,tinst,_ = info_of_tcref cenv m env ucref.TyconRef
-        let gtyp2 = rty_of_uctyp ucref ucinfo.TypeInst
-        let inst = mk_typar_inst ucref.TyconRef.TyparsNoRange ucinfo.TypeInst
-        unifyE cenv env m ty gtyp2;
-        let mkf = mk_ucasef(ucref,ucinfo.TypeInst)
-        mkf,typs_of_ucref_rfields inst ucref 
-    | _ -> invalidArg "item" "not a union case or exception reference"
-
-let expr_constr_unify m cenv env ty c = 
-  gen_constr_unify ((fun (a,b) args -> mk_ucase(a,b,args,m)),
-                    (fun a args -> mk_exnconstr (a,args,m))) m cenv env ty c
-      
-let pat_constr_unify m cenv env ty c = 
-  gen_constr_unify ((fun (a,b) args -> TPat_unioncase(a,b,args,m)),
-                    (fun a args -> TPat_exnconstr(a,args,m))) m cenv env ty c
-
-let gen_constr_check (env:tcEnv) nargtys nargs m =
-  if nargs <> nargtys then error (UnionCaseWrongArguments(env.DisplayEnv,nargtys,nargs,m))
-
-let TcUnionCaseField cenv (env:tcEnv) ty1 m c n funcs =
-    let ad = AccessRightsOfEnv env
-    let mkf,argtys = 
-      match ResolvePatternLongIdent cenv.nameResolver AllIdsOK false m ad env.eNameResEnv DefaultTypeNameResInfo c with
-      | (Item_ucase _ | Item_ecref _) as item ->
-        gen_constr_unify funcs m cenv env ty1 item
-      | _ -> error(Error("unknown union case",m))
-    if n >= List.length argtys then 
-      error (UnionCaseWrongNumberOfArgs(env.DisplayEnv,List.length argtys,n,m));
-    let ty2 = List.nth argtys n
-    mkf,ty2
-
-//-------------------------------------------------------------------------
-// Environment of explicit type parameters, e.g. 'a in "(x : 'a)"
-//------------------------------------------------------------------------- 
-
-type SyntacticUnscopedTyparEnv = UnscopedTyparEnv of NameMap
-
-let emptyTyparEnv : SyntacticUnscopedTyparEnv = UnscopedTyparEnv (Map.empty)
-
-let AddUnscopedTypar n p (UnscopedTyparEnv tab) = UnscopedTyparEnv (Map.add n p tab)
-
-let TryFindUnscopedTypar n (UnscopedTyparEnv tab) = Map.tryfind n tab
-
-let HideUnscopedTypars typars (UnscopedTyparEnv tab) = 
-    UnscopedTyparEnv (List.fold (fun acc (tp:Typar) -> Map.remove tp.Name acc) tab typars)
-
-//-------------------------------------------------------------------------
-// Helpers for generalizing type variables
-//------------------------------------------------------------------------- 
-
-type GeneralizeConstrainedTyparOptions = 
-    | CanGeneralizeConstrainedTypars 
-    | DoNotGeneralizeConstrainedTypars
-
-
-module GeneralizationHelpers = 
-    let ComputeUngeneralizableTypars env = 
-        let acc_in_free_item acc item =
-           if item.WillNeverHaveFreeTypars then acc else
-           let ftps = 
-               let ftyvs = item.GetFreeTyvars()
-               ftyvs.FreeTypars
-           if ftps.IsEmpty then acc else union_free_loctypars ftps acc
-
-        List.fold acc_in_free_item empty_free_loctypars env.eUngeneralizableItems 
-
-    let ComputeUnabstractableTycons env = 
-        let acc_in_free_item acc item = 
-            let ftycs = 
-                if item.WillNeverHaveFreeTypars then item.CachedFreeLocalTycons else 
-                let ftyvs = item.GetFreeTyvars()
-                ftyvs.FreeTycons
-            if ftycs.IsEmpty then acc else union_free_loctycons ftycs acc
-
-        List.fold acc_in_free_item empty_free_loctycons env.eUngeneralizableItems 
-
-    let ComputeUnabstractableTraitSolutions env = 
-        let acc_in_free_item acc item = 
-            let ftycs = 
-                if item.WillNeverHaveFreeTypars then item.CachedFreeTraitSolutions else 
-                let ftyvs = item.GetFreeTyvars()
-                ftyvs.FreeTraitSolutions
-            if ftycs.IsEmpty then acc else union_free_locvals ftycs acc
-
-        List.fold acc_in_free_item empty_free_locvals env.eUngeneralizableItems 
-
-    let rec IsGeneralizableValue g t = 
-        match t with 
-        | TExpr_lambda _ | TExpr_tlambda _ | TExpr_const _ | TExpr_val _ -> true
-
-        // Look through coercion nodes corresponding to introduction of subsumption 
-        | TExpr_op(TOp_coerce,[inputTy;actualTy],[e1],_) when is_fun_typ g actualTy && is_fun_typ g inputTy -> 
-            IsGeneralizableValue g e1
-
-        | TExpr_op(op,_,args,_) ->
-            match op with 
-            | TOp_tuple  -> true
-            | TOp_ucase uc -> not (ucref_alloc_observable uc)
-            | TOp_recd(ctorInfo,tcref) -> 
-                match ctorInfo with 
-                | RecdExpr ->  not (tcref_alloc_observable tcref)
-                | RecdExprIsObjInit -> false
-            | TOp_array ->  isNil args
-            | TOp_exnconstr ec -> not (ecref_alloc_observable ec)
-
-            | TOp_asm([],_) -> true
-
-            | _ -> false
-            && List.forall (IsGeneralizableValue g) args
-
-        | TExpr_letrec(binds,body,_,_)  ->
-            FlatList.forall (rhs_of_bind >> IsGeneralizableValue g) binds &&
-            IsGeneralizableValue g body
-        | TExpr_let(bind,body,_,_) -> 
-            (rhs_of_bind >> IsGeneralizableValue g) bind &&
-            IsGeneralizableValue g body
-
-
-        // Applications of type functions are _not_ normally generalizable unless explicitly marked so 
-        | TExpr_app(TExpr_val (vref,_,_),_,_,[],_) when vref.IsTypeFunction -> 
-            HasAttrib g g.attrib_GeneralizableValueAttribute vref.Attribs
-             
-        
-        | TExpr_app(e1,_,_,[],_) -> IsGeneralizableValue g e1
-        | TExpr_tchoose(_,b,_) -> IsGeneralizableValue g b
-    (*
-        | TExpr_quote _ -> true
-    *)
-        | TExpr_obj (_,ty,_,_,_,_,_,_) -> is_interface_typ g ty || is_delegate_typ g ty
-        | _ -> false  
-
-    let CanGeneralizeConstrainedTyparsForDecl declKind = 
-        if DeclKind.CanGeneralizeConstrainedTypars declKind 
-        then CanGeneralizeConstrainedTypars 
-        else DoNotGeneralizeConstrainedTypars
-        
-    /// Recursively knock out typars we can't generalize. 
-    /// For non-generalized type variables be careful to iteratively knock out 
-    /// both the typars and any typars free in the constraints of the typars
-    /// into the set that are considered free in the environment. 
-    let rec TrimUngeneralizableTypars genConstrainedTyparFlag inlineFlag (generalizedTypars:Typar list) freeInEnv = 
-        // Do not generalize type variables with a static requirement unless function is marked 'inline' 
-        let generalizedTypars,ungeneralizableTypars1 =  
-            if inlineFlag = PseudoValue then generalizedTypars,[]
-            else generalizedTypars |> List.partition (fun tp -> tp.StaticReq = NoStaticReq) 
-
-        // Do not generalize type variables which would escape their scope 
-        // because they are free in the environment 
-        let generalizedTypars,ungeneralizableTypars2 = 
-            List.partition (fun x -> not (Zset.mem x freeInEnv)) generalizedTypars
-
-        // Some situations, e.g. implicit class constructions that represent functions as fields, 
-        // do not allow generalisation over constrained typars. (since they can not be represented as fields 
-        let generalizedTypars,ungeneralizableTypars3 = 
-            generalizedTypars |> List.partition (fun tp -> 
-                genConstrainedTyparFlag = CanGeneralizeConstrainedTypars || 
-                tp.Constraints.IsEmpty) 
-
-        if isNil ungeneralizableTypars1 && isNil ungeneralizableTypars2 && isNil ungeneralizableTypars3 then
-            generalizedTypars, freeInEnv
-        else 
-            let freeInEnv = 
-                union_free_loctypars 
-                    (acc_free_tprefs CollectAllNoCaching ungeneralizableTypars1 
-                        (acc_free_tprefs CollectAllNoCaching ungeneralizableTypars2 
-                            (acc_free_tprefs CollectAllNoCaching ungeneralizableTypars3 empty_free_tyvars))).FreeTypars 
-                    freeInEnv
-            TrimUngeneralizableTypars genConstrainedTyparFlag inlineFlag generalizedTypars freeInEnv
-
-    /// Condense type variables in positive position
-    let rec CondenseTypars(cenv,env:tcEnv,m,freeInEnv,generalizedTypars:typars,tauTy) =
-
-        // The type of the value is ty11 * ... * ty1N -> ... -> tyM1 * ... * tyMM -> retTy
-        // This is computed REGARDLESS of the arity of the expression.
-        let curriedArgTys,retTy = strip_fun_typ cenv.g tauTy
-        let allUntupledArgTys = curriedArgTys |> List.collect (try_dest_tuple_typ cenv.g)
-        if verboseGeneralization then dprintfn "#allUntupledArgTys = %d" allUntupledArgTys.Length
-
-        // Compute the type variables in 'retTy'
-        let returnTypeFreeTypars = free_in_type_lr cenv.g false retTy
-        let allUntupledArgTysWithFreeVars = allUntupledArgTys |> List.map (fun ty -> (ty, free_in_type_lr cenv.g false ty))
-
-        let relevantUniqueSubtypeConstraint (tp:Typar) = 
-            // Find a single subtype constraint
-            match tp.Constraints |> List.partition (function (TTyparCoercesToType(cxty,_)) -> true | _ -> false) with 
-            | ([TTyparCoercesToType(cxty,_)] as cxs), others -> 
-                 // Throw away null constraints if they are implied 
-                 match others |> List.filter (function (TTyparSupportsNull(_)) -> not (TypeSatisfiesNullConstraint cenv.g cxty) | _ -> true) with
-                 | [] -> Some cxty
-                 | _ -> None
-            | _ -> None
-                 
-
-        // Condensation typars can't be used in the constraints of any candidate condensation typars. So compute all the
-        // typars free in the constraints of tyIJ
-
-        let lhsConstraintTypars = 
-            allUntupledArgTys |> List.collect (fun ty -> 
-                if is_typar_typ cenv.g ty then 
-                    let tp = dest_typar_typ cenv.g ty 
-                    match relevantUniqueSubtypeConstraint tp with 
-                    | Some cxty -> free_in_type_lr cenv.g false cxty
-                    | None -> []
-                else [])
-
-        let IsCondensationTypar (tp:Typar) = 
-            // A condensation typar may not a user-generated type variable nor has it been unified with any user type variable
-            (tp.DynamicReq = NoDynamicReq) && 
-            // A condensation typar must have a single constraint "'a :> A"
-            (isSome (relevantUniqueSubtypeConstraint tp)) &&
-            // This is type variable is not used on the r.h.s. of the type
-            not (ListSet.mem typar_ref_eq tp returnTypeFreeTypars) &&
-            // A condensation typar can't be used in the constraints of any candidate condensation typars
-            not (ListSet.mem typar_ref_eq tp lhsConstraintTypars) &&
-            // A condensation typar must occur precisely once in tyIJ, and must not occur free in any other tyIJ
-            (match allUntupledArgTysWithFreeVars |> List.partition (fun (ty,_) -> is_typar_typ cenv.g ty && typar_ref_eq (dest_typar_typ cenv.g ty) tp) with
-             | [_], rest -> not (rest |> List.exists (fun (_,fvs) -> ListSet.mem typar_ref_eq tp fvs))
-             | _ -> false)
-             
-        let condensationTypars, generalizedTypars = generalizedTypars |> List.partition IsCondensationTypar
-
-        if verboseGeneralization then dprintfn "#condensationTypars = %d" condensationTypars.Length
-
-        // Condensation solves type variables eagerly and removes them from the generalization set 
-        condensationTypars |> List.iter (fun tp -> 
-            ConstraintSolver.ChooseTyparSolutionAndSolve cenv.css env.DisplayEnv tp);
-        generalizedTypars
-
-    let verboseA = false
-
-    let CanonicalizePartialInferenceProblem (cenv,denv,m) tps =
-        // Canonicalize constraints prior to generalization 
-        let csenv = (MakeConstraintSolverEnv cenv.css m denv)
-        TryD (fun () -> ConstraintSolver.CanonicalizeRelevantMemberConstraints csenv 0 NoTrace tps)
-             (fun res -> ErrorD (ErrorFromAddingConstraint(denv,res,m))) 
-        |> RaiseOperationResult
-
-    let ComputeGeneralizedTypars (cenv,env:tcEnv,m,immut,
-                                  freeInEnv:FreeTypars,
-                                  canInferTypars,
-                                  genConstrainedTyparFlag,
-                                  inlineFlag,
-                                  exprOpt,
-                                  allDeclaredTypars:typars,
-                                  maxInferredTypars:typars,
-                                  tauTy,
-                                  resultFirst) =
-        let prTypar tp = showL (typeL (mk_typar_ty tp))
-        if verboseA then 
-            dprintf "%a: ComputeGeneralizedTypars (0), freeInEnv = %s maxInferredTypars = %s allDeclaredTypars = %s tauTy = %s\n" output_range m 
-              (String.concat "," (freeInEnv |> Zset.elements |> List.map (fun tp -> tp.Name)))
-              (String.concat "," (maxInferredTypars |> List.map (fun tp -> tp.Name)))
-              (String.concat "," (allDeclaredTypars |> List.map prTypar))
-              (showL (typeL tauTy));
-        let denv = env.DisplayEnv
-
-        let allDeclaredTypars = NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g allDeclaredTypars
-        let typarsToAttemptToGeneralize = 
-            if immut && (match exprOpt with None -> true | Some e -> IsGeneralizableValue cenv.g e) 
-            then (ListSet.unionFavourLeft typar_ref_eq  allDeclaredTypars maxInferredTypars)
-            else allDeclaredTypars
-
-        if verboseA then dprintf "ComputeGeneralizedTypars (1), resultFirst = %s typarsToAttemptToGeneralize = %s\n" (if resultFirst then "yes" else "no") (String.concat "," (typarsToAttemptToGeneralize  |> List.map prTypar));
-
-        let generalizedTypars,freeInEnv = 
-            TrimUngeneralizableTypars genConstrainedTyparFlag inlineFlag typarsToAttemptToGeneralize freeInEnv
-
-        if verboseA then dprintf "ComputeGeneralizedTypars (2), tauTy = %s generalizedTypars = %s\n" (showL (typeL tauTy)) (String.concat "," (generalizedTypars  |> List.map prTypar));
-
-        allDeclaredTypars |> List.iter (fun tp -> 
-              if Zset.mem_of freeInEnv tp then
-                let ty =  mk_typar_ty tp
-                error(Error(sprintf "This code is not sufficiently generic. The type variable %s could not be generalized because it would escape its scope" (NicePrint.pretty_string_of_typ denv ty),m)));
-            
-        let generalizedTypars = CondenseTypars(cenv,env,m,freeInEnv,generalizedTypars,tauTy)    
-
-        let generalizedTypars =  
-            if canInferTypars then generalizedTypars 
-            else generalizedTypars |> List.filter (fun tp -> ListSet.mem typar_ref_eq tp allDeclaredTypars)
-
-        let generalizedTypars = ConstraintSolver.SimplifyMeasuresInTypeScheme cenv.g resultFirst generalizedTypars tauTy
-
-        if verboseA then dprintf "ComputeGeneralizedTypars (3), tauTy = %s generalized = %s\n" (showL (typeL tauTy)) (String.concat "," (generalizedTypars  |> List.map prTypar));
-
-        let allDeclaredTypars = ChooseCanonicalDeclaredTyparsAfterInference cenv.g denv allDeclaredTypars m
-
-        if verboseA then dprintf "ComputeGeneralizedTypars (4), allDeclaredTypars = %s\n" (String.concat "," (allDeclaredTypars  |> List.map prTypar));
-        
-        // Generalization turns inference type variables into rigid, quantified type variables. 
-        generalizedTypars |> List.iter (SetTyparRigid cenv.g denv m);
-        
-        // Generalization removes constraints related to generalized type variables
-        let csenv = MakeConstraintSolverEnv cenv.css m denv
-        EliminateConstraintsForGeneralizedTypars csenv NoTrace generalizedTypars;
-        
-        generalizedTypars
-
-    //-------------------------------------------------------------------------
-    // Helpers to freshen existing types and values, i.e. when a reference
-    // to C<_> occurs then generate C for a fresh type inference variable ?ty.
-    //------------------------------------------------------------------------- 
-
-
-    let private ComputeExtraTyparsFeasible(memFlagsOpt,declaredTypars,m) = 
-        (* Properties and Constructors may only generalize the variables associated with the containing class (retrieved from the 'this' pointer) *)
-        (* Also check they don't declare explicit typars. *)
-        match memFlagsOpt with 
-        | None -> true
-        | Some(memberFlags) -> 
-            match memberFlags.MemberKind with 
-            (* can't infer extra polymorphism for properties *)
-            | MemberKindPropertyGet 
-            | MemberKindPropertySet  -> 
-                 if nonNil(declaredTypars) then 
-                     errorR(Error("A property may not have explicit type parameters. Consider using a method instead",m));
-                 false
-            (* can't infer extra polymorphism for class constructors *)
-            | MemberKindClassConstructor ->  
-                 false
-            (* can't infer extra polymorphism for constructors *)
-            | MemberKindConstructor -> 
-                 if nonNil(declaredTypars) then 
-                     errorR(Error("A constructor may not have explicit type parameters. Consider using a static construction method instead",m));
-                 false 
-            | _ -> 
-                 (* feasible to infer extra polymorphism *)
-                 true                     
-
-    let ComputeCanInferTypars(declKind,parentRef,canInferTypars,memFlagsOpt,declaredTypars,m) =  
-            (match parentRef with Parent tcref -> not tcref.IsFSharpDelegateTycon | _ -> true) &&  // no generic paramters inferred for 'Invoke' method
-            ComputeExtraTyparsFeasible(memFlagsOpt,declaredTypars,m) &&
-            canInferTypars &&
-            (generalizeInnerPolymorphism || DeclKind.MustAlwaysGeneralize declKind) 
-
-
-//-------------------------------------------------------------------------
-// ComputeInlineFlag 
-//-------------------------------------------------------------------------
-
-let ComputeInlineFlag memFlagsOption pseudo mut attrs = 
-    // Mutable values may never be inlined 
-    // Constructors may never be inlined 
-    // Calls to virtual/abstract slots may never be inlined 
-    if mut || 
-       (match memFlagsOption with 
-        | None -> false
-        | Some x -> (x.MemberKind = MemberKindConstructor) || x.MemberIsDispatchSlot) 
-    then NeverInline 
-    elif pseudo then PseudoValue 
-    else OptionalInline
-
-
-//-------------------------------------------------------------------------
-// Binding normalization.
-//
-// Determine what sort of value is being bound (normal value, instance
-// member, normal function, static member etc.) and make some
-// name-resolution-sensitive adjustments to the syntax tree.
-//
-// One part of this "normalization" ensures: 
-//        "let Pat_lid(f) = e" when f not a datatype constructor --> let Pat_var(f) = e" 
-//        "let Pat_lid(f) pat = e" when f not a datatype constructor --> let Pat_var(f) = \pat. e" 
-//        "let (Pat_lid(f) : ty) = e" when f not a datatype constructor --> let (Pat_var(f) : ty) = e" 
-//        "let (Pat_lid(f) : ty) pat = e" when f not a datatype constructor --> let (Pat_var(f) : ty) = \pat. e" 
-// 
-// This is because the first lambda in a function definition "let F x = e" 
-// now looks like a constructor application, i.e. let (F x) = e ... 
-//  also let A.F x = e ... 
-//  also let f x = e ... 
-//
-// The other parts turn property definitions into method definitions.
-//------------------------------------------------------------------------- 
-
- 
-let PushOnePatternToRhs isMember p (BindingRhs(spatsL,rtyOpt,rhsExpr)) = 
-    let spats,rhsExpr = PushPatternToExpr isMember p rhsExpr
-    BindingRhs(spats::spatsL, rtyOpt,rhsExpr)
-
-type NormalizedBindingPatternInfo = 
-    NormalizedBindingPat of SynPat * BindingRhs * ValSynData * SynValTyparDecls (* pat,rhsExpr,memberInfo,typars *)
-
-/// Represents a syntactic, unchecked binding after the resolution of the name resolution status of pattern
-/// constructors and after "pushing" all complex patterns to the right hand side.
-type NormalizedBinding = 
-  | NormalizedBinding of 
-      access option *
-      SynBindingKind *
-      bool *  (* pesudo/mustinline value? *)
-      bool *  (* mutable *)
-      SynAttributes * 
-      XmlDoc *
-      SynValTyparDecls * 
-      ValSynData * 
-      SynPat * 
-      BindingRhs *
-      range *
-      SequencePointInfoForBinding
-
-
-type IsObjExprBinding = 
-    | ObjExprBinding 
-    | ValOrMemberBinding
-
-
-
-module BindingNormalization =
-    /// Push a bunch of pats at once. They may contain patterns, e.g. let f (A x) (B y) = ... 
-    /// In this case the sematnics is let f a b = let A x = a in let B y = b 
-    let private PushMultiplePatternsToRhs isMember ps (BindingRhs(spatsL,rtyOpt,rhsExpr)) = 
-        let spatsL2,rhsExpr = PushCurriedPatternsToExpr (range_of_synexpr rhsExpr) isMember ps rhsExpr
-        BindingRhs(spatsL2@spatsL, rtyOpt,rhsExpr)
-
-
-    let private MkNormalizedStaticOrValBinding isObjExprBinding id vis typars args rhsExpr valSynData : NormalizedBindingPatternInfo = 
-        let (ValSynData(memberFlagsOpt,_,_)) = valSynData 
-        NormalizedBindingPat(mksyn_pat_var vis id, PushMultiplePatternsToRhs ((isObjExprBinding = ObjExprBinding) or isSome memberFlagsOpt) args rhsExpr,valSynData,typars)
-
-    let private MkNormalizedInstanceMemberBinding thisId memberId vis m typars args rhsExpr valSynData = 
-        NormalizedBindingPat(Pat_instance_member(thisId, memberId,vis,m), PushMultiplePatternsToRhs true args rhsExpr,valSynData,typars)
-
-    let private NormalizeStaticMemberBinding memberFlags valSynData id vis typars args m rhsExpr = 
-        let (ValSynData(_,valSynInfo,thisIdOpt)) = valSynData 
-        if memberFlags.MemberIsInstance then 
-            (* instance method without adhoc "this" argument *)
-            error(Error("This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'",m));
-        match args, memberFlags.MemberKind  with 
-        | _,MemberKindPropertyGetSet    -> error(Error("Unexpected source-level property specification in syntax tree",m))
-        | [],MemberKindClassConstructor -> error(Error("A static initializer requires an argument",m))
-        | [],MemberKindConstructor     -> error(Error("An object constructor requires an argument",m))
-        | [_],MemberKindClassConstructor  
-        | [_],MemberKindConstructor  -> MkNormalizedStaticOrValBinding ValOrMemberBinding id vis typars args rhsExpr valSynData
-        // Static property declared using 'static member P = expr': transformed to a method taking a "unit" argument 
-        // static property: these transformed into methods taking one "unit" argument 
-        | [],MemberKindMember -> 
-            let memberFlags = {memberFlags with MemberKind = MemberKindPropertyGet} 
-            let valSynData = ValSynData(Some(memberFlags),valSynInfo,thisIdOpt)
-            NormalizedBindingPat(mksyn_pat_var vis id,
-                                 PushOnePatternToRhs true (Pat_const(Const_unit,m)) rhsExpr,
-                                 valSynData,
-                                 typars)
-        | _ -> MkNormalizedStaticOrValBinding ValOrMemberBinding id vis typars args rhsExpr valSynData
-
-    let private NormalizeInstanceMemberBinding memberFlags valSynData thisId memberId vis typars args m rhsExpr = 
-        let (ValSynData(_,valSynInfo,thisIdOpt)) = valSynData 
-        if not memberFlags.MemberIsInstance then 
-            // static method with adhoc "this" argument 
-            error(Error("This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'",m));
-        match args, memberFlags.MemberKind  with 
-        | _,MemberKindClassConstructor  -> error(Error("An explicit static initializer should use the syntax 'static new(args) = expr'",m))
-        | _,MemberKindConstructor  -> error(Error("An explicit object constructor should use the syntax 'new(args) = expr'",m))
-        | _,MemberKindPropertyGetSet  -> error(Error("Unexpected source-level property specification",m))
-        // Instance property declared using 'x.Member': transformed to methods taking a "this" and a "unit" argument 
-        // We push across the 'this' arg in mk_rec_binds 
-        | [],MemberKindMember -> 
-            let memberFlags = {memberFlags with MemberKind = MemberKindPropertyGet}
-            NormalizedBindingPat
-                (Pat_instance_member(thisId, memberId,vis,m), 
-                 PushOnePatternToRhs true (Pat_const(Const_unit,m)) rhsExpr,
-                 (* Update the member info to record that this is a MemberKindPropertyGet *)
-                 ValSynData(Some(memberFlags),valSynInfo,thisIdOpt),
-                 typars)
-
-        | _ -> MkNormalizedInstanceMemberBinding thisId memberId vis m typars args rhsExpr valSynData
-
-    let private NormalizeBindingPattern nameResolver isObjExprBinding (env:tcEnv) valSynData pat rhsExpr =
-        let ad = AccessRightsOfEnv env
-        let (ValSynData(memberFlagsOpt,valSynInfo,thisIdOpt)) = valSynData 
-        let rec normPattern pat = 
-            // One major problem with versions of F# prior to 1.9.x was that data constructors easily 'pollute' the namespace 
-            // of available items, to the point that you can't even define a function with the same name as an existing union case. 
-            match pat with 
-            | Pat_lid (lid,tyargs,args,vis,m) ->
-                let typars = (match tyargs with None -> inferredTyparDecls | Some typars -> typars)
-                match memberFlagsOpt with 
-                | None ->                
-                    match ResolvePatternLongIdent nameResolver AllIdsOK true m ad env.eNameResEnv DefaultTypeNameResInfo lid with
-                    | Item_newdef id -> 
-                        if id.idText = opname_Cons  then
-                            NormalizedBindingPat(pat,rhsExpr,valSynData,typars)
-                        else
-                            if (isObjExprBinding = ObjExprBinding) then 
-                                warning(Deprecated("This form of object expression is deprecated. Use 'member this.MemberName ... = ...' to define member implementations in object expressions",m))
-                            MkNormalizedStaticOrValBinding isObjExprBinding id vis typars args rhsExpr valSynData
-                    | res -> 
-                        error(Error("Invalid declaration",m))
-
-                | Some memberFlags ->                
-                    match lid with 
-                    // x.Member in member binding patterns. 
-                    | [thisId;memberId] -> NormalizeInstanceMemberBinding memberFlags valSynData thisId memberId vis typars args m rhsExpr 
-                    | [memberId]        -> NormalizeStaticMemberBinding memberFlags valSynData memberId vis typars args m rhsExpr 
-                    | _                 -> NormalizedBindingPat(pat,rhsExpr,valSynData,typars)
-
-            // Object constructors are normalized in TcLetrec 
-            // Here we are normalizing member definitions with simple (not long) ids, 
-            // e.g. "static member x = 3" and "member x = 3" (instance with missing "this." comes through here. It is trapped and generates a warning) 
-            | Pat_as (Pat_wild _, id, false, vis, m) 
-                when 
-                   (match memberFlagsOpt with 
-                    | None -> false 
-                    | Some(memberFlags) -> 
-                         not (memberFlags.MemberKind = MemberKindConstructor) &&
-                         not (memberFlags.MemberKind = MemberKindClassConstructor)) ->            
-                NormalizeStaticMemberBinding (the memberFlagsOpt) valSynData id vis inferredTyparDecls [] m rhsExpr 
-
-            | Pat_typed(pat',x,y) ->             
-                let (NormalizedBindingPat(pat'',e'',valSynData,typars)) = normPattern pat'
-                NormalizedBindingPat(Pat_typed(pat'',x,y), e'',valSynData,typars)
-
-            | Pat_attrib(pat',x,m) ->             
-                error(Error("Attributes are not allowed within patterns",m));
-                //let (NormalizedBindingPat(pat'',e'',valSynData,typars)) = normPattern pat'
-                //NormalizedBindingPat(Pat_attrib(pat'',x,m), e'',valSynData,typars)
-
-            | _ ->
-                NormalizedBindingPat(pat,rhsExpr,valSynData,inferredTyparDecls) 
-        normPattern pat
-
-    let NormalizeBinding isObjExprBinding cenv (env:tcEnv) b = 
-        match b with 
-        | Binding (vis,bkind,pseudo,mut,attrs,doc,valSynData,p,rhsExpr,bindingRange,spBind) ->
-            let (NormalizedBindingPat(pat,rhsExpr,valSynData,typars)) = 
-                NormalizeBindingPattern cenv.nameResolver isObjExprBinding env valSynData p rhsExpr
-            NormalizedBinding(vis,bkind,pseudo,mut,attrs,doc.ToXmlDoc(),typars,valSynData,pat,rhsExpr,bindingRange,spBind)
-
-//-------------------------------------------------------------------------
-// input is:
-//    []
-//    member x.P with get = fun () -> e
-// --> 
-//    member x.add_P(argName) = (e).AddHandler(argName)
-//    member x.remove_P(argName) = (e).RemoveHandler(argName)
-
-module EventDeclarationNormalization = 
-    let ConvertSynInfo m (ValSynInfo(argInfos,retInfo)) = 
-       // reconstitute valSynInfo by adding the argument
-       let argInfos = 
-           match argInfos with 
-           | [[thisArgInfo];[]] ->  [[thisArgInfo];SynInfo.unnamedTopArg] // instance property getter
-           | [[]] -> [SynInfo.unnamedTopArg] // static property getter
-           | _ -> error(BadEventTransformation(m))
-
-       // reconstitute valSynInfo
-       ValSynInfo(argInfos,retInfo)
-
-    // THe property x.P becomes methods x.add_P and x.remove_P
-    let ConvertMemberFlags  memberFlags = { memberFlags with MemberKind= MemberKindMember } 
-
-    let private ConvertMemberFlagsOpt m memberFlagsOpt =
-        match memberFlagsOpt with 
-        | Some memberFlags -> Some (ConvertMemberFlags memberFlags)
-        | _ -> error(BadEventTransformation(m))
-
-    let private ConvertSynData m valSynData =
-        let (ValSynData(memberFlagsOpt,valSynInfo,thisIdOpt)) = valSynData 
-        let memberFlagsOpt = ConvertMemberFlagsOpt m memberFlagsOpt
-        let valSynInfo = ConvertSynInfo m valSynInfo
-        ValSynData(memberFlagsOpt,valSynInfo,thisIdOpt)
-     
-    let rec private  RenameBindingPattern f declPattern = 
-        match declPattern with  
-        | Pat_typed(pat',cty,_) -> RenameBindingPattern f pat'
-        | Pat_as (Pat_wild m1, id,x2,vis2,m) -> Pat_as (Pat_wild m1, ident(f id.idText,id.idRange) ,x2,vis2,m) 
-        | Pat_instance_member(thisId, id,vis2,m) -> Pat_instance_member(thisId, ident(f id.idText,id.idRange),vis2,m)
-        | _ -> error(Error("only simple variable patterns can be bound in 'let rec' constructs",range_of_synpat declPattern))
-
-    let GenerateExtraBindings (g,bindingAttribs,binding) =
-        let (NormalizedBinding(vis1,bindingKind,isInline,isMutable,bindingSynAttribs,bindingXmlDoc,synTyparDecls,valSynData,declPattern,bindingRhs,bindingRange,spBind)) = binding
-        if CompileAsEvent g bindingAttribs then 
-
-            let MakeOne (prefix,target) = 
-                let declPattern = RenameBindingPattern (fun s -> prefix^s) declPattern
-                let argName = "handler"
-                // modify the rhs and argument data
-                let bindingRhs,valSynData = 
-                   let (BindingRhs(_,_,rhsExpr)) = bindingRhs
-                   let m = range_of_synexpr rhsExpr
-                   // reconstitute valSynInfo by adding the argument
-                   let valSynData = ConvertSynData m valSynData
-
-                   match rhsExpr with 
-                   // Detect 'fun () -> e'
-                   | Expr_lambda (_,_,SPats([],_), trueRhsExpr,m) ->
-                       let rhsExpr = Expr_app(ExprAtomicFlag.NonAtomic,Expr_lvalue_get(Expr_paren(trueRhsExpr,m),[ident(target,m)],m),Expr_id_get(ident(argName,m)),m)
-                       
-                       // reconstitute rhsExpr
-                       let bindingRhs = BindingRhs([],None,rhsExpr)
-
-                       // add the argument to the expression 
-                       let bindingRhs = PushOnePatternToRhs true (mksyn_pat_var None (ident (argName,bindingRange))) bindingRhs 
-                       
-                       bindingRhs,valSynData
-                   | _ -> 
-                       error(BadEventTransformation(m))
-
-                // reconstitute the binding
-                NormalizedBinding(vis1,bindingKind,isInline,isMutable,[],bindingXmlDoc,synTyparDecls,valSynData,declPattern,bindingRhs,bindingRange,spBind) 
-
-            [ MakeOne ("add_","AddHandler"); MakeOne ("remove_","RemoveHandler") ]
-        else 
-            []
-
-(*-------------------------------------------------------------------------
- * Helpers to adjust the 'this' pointer before making a call.
- *------------------------------------------------------------------------- *)
-
-type ObjectArgCoercionInfo = 
-    | CoerceThisBeforeCall of Tast.typ * Tast.typ 
-    | DontCoerceThisBeforeCall
-
-/// Compute whether we insert a 'coerce' on the 'this' pointer for an object model call 
-/// For example, when calling an interface method on a struct, or a method on a constrained 
-/// variable type. 
-let ComputeObjectArgCoercion cenv m (objArgs,methArgTy) =
-    match objArgs with 
-    | [objArgExpr] -> 
-        let objArgExprTy = type_of_expr cenv.g objArgExpr
-        if type_definitely_subsumes_type_no_coercion 0 cenv.g cenv.amap m methArgTy objArgExprTy then 
-            DontCoerceThisBeforeCall
-        else
-            CoerceThisBeforeCall (objArgExprTy, methArgTy)
-    | _ -> 
-        DontCoerceThisBeforeCall
-
-/// Adjust the 'this' pointer before making a call 
-/// Take the address of a struct, and coerce to an interface/base/constraint type if necessary 
-let TakeObjAddr cenv (minfo:MethInfo) mut m objArgs f =
-    let boxopts = ComputeObjectArgCoercion cenv m (objArgs,minfo.EnclosingType) 
-    let valu = minfo_is_struct cenv.g minfo && not minfo.IsExtensionMember  // don't take the address of a struct when passing to an extension member
-    let wrap,objArgs = 
-        match objArgs with
-        | [h] -> 
-            let hty = type_of_expr cenv.g h
-            let wrap,h' = mk_expra_of_expr cenv.g valu mut h m 
-            let h' = 
-              match boxopts with 
-              | CoerceThisBeforeCall(srcTy,tgtTy) -> mk_coerce(h',tgtTy,m,srcTy)
-              | DontCoerceThisBeforeCall -> h'
-            wrap,[h'] 
-        | _ -> (fun x -> x), objArgs
-    let e,ety = f objArgs
-    wrap e,ety
-
-let FreshenObjectArgType cenv m rigid tcref isExtrinsic declaredTyconTypars = 
-    let tcrefObjTy,enclosingDeclaredTypars,renaming,objTy = FreshenTyconRef m rigid tcref declaredTyconTypars
-    // Struct members have a byref 'this' type (unless they are extrinsic extension members)
-    let thisTy = 
-        if is_struct_tcref tcref && not isExtrinsic then 
-            mk_byref_typ cenv.g objTy 
-        else 
-            objTy
-    tcrefObjTy,enclosingDeclaredTypars,renaming,objTy,thisTy
-
-
-
-/// TcVal. "Use" a value, normally at a fresh type instance (unless optInst is
-/// given). optInst is set when an explicit type instantiation is given, e.g. 
-///     Seq.empty
-/// In this case the vrefFlags inside optInst are just NormalValUse.
-///
-/// optInst is is also set when building the final call for a reference to an
-/// F# object model member, in which case the optInst is the type instantiation
-/// inferred by member overload resolution, and vrefFlags indicate if the
-/// member is being used in a special way, i.e. may be one of:
-///    | CtorValUsedAsSuperInit    "inherit Panel()"
-///    | CtorValUsedAsSelfInit     "new() = new OwnType(3)"
-///    | VSlotDirectCall           "base.OnClick(eventArgs)"
-let TcVal cenv env tpenv (vref:ValRef) optInst m =
-    let v = deref_val vref
-    let vrec = v.RecursiveValInfo
-    CheckValAccessible m (AccessRightsOfEnv env) vref;
-    CheckValAttributes cenv.g vref m  |> CommitOperationResult;
-    let vty = vref.Type
-    (* byref types get dereferenced *)
-    if is_byref_typ cenv.g vty then 
-        let isSpecial = true
-        mk_lval_get m vref,isSpecial,dest_byref_typ cenv.g vty,tpenv
-    else 
-      match v.LiteralValue with 
-      | Some c -> 
-          // Literal values go to constants 
-          let isSpecial = true
-          // The value may still be generic, e.g. 
-          //   []
-          //   let Null = null
-          let _,_,tau = FreshenPossibleForallTy cenv.g m TyparFlexible vty 
-          TExpr_const(c,m,tau),isSpecial,tau,tpenv
-
-      | None -> 
-          // References to 'this' in classes get dereferenced from their implicit reference cell and poked
-        if v.BaseOrThisInfo = CtorThisVal then 
-            let exprForVal = expr_for_vref m vref
-            if AreWithinCtorPreConstruct env then 
-                warning(SelfRefObjCtor(AreWithinImplicitCtor env, m));
-
-            let ty = (dest_refcell_ty cenv.g vty)
-            let isSpecial = true
-            mk_nonnull_poke cenv.g m (mk_refcell_get cenv.g m ty exprForVal), isSpecial,ty, tpenv
-        else 
-          // Instantiate the value 
-          let vrefFlags,tinst,tau,tpenv = 
-              // Have we got an explicit instantiation? 
-              match optInst with 
-              // No explicit instantiation (the normal case)
-              | None -> 
-                  if HasAttrib cenv.g cenv.g.attrib_RequiresExplicitTypeArgumentsAttribute v.Attribs then
-                       errorR(Error("The generic function '"^v.DisplayName^"' must be given explicit type argument(s)",m));
-              
-                  match vrec with 
-                  | ValInRecScope(false) -> 
-                      let tps,tau =  vref.TypeScheme
-                      let tinst = tps |> List.map mk_typar_ty
-                      NormalValUse,tinst,tau,tpenv
-                  | ValInRecScope(true) 
-                  | ValNotInRecScope ->
-                      let tps,tinst,tau = FreshenPossibleForallTy cenv.g m TyparFlexible vty 
-                      NormalValUse,tinst,tau,tpenv
-
-              // If we have got an explicit instantiation then use that 
-              | Some(vrefFlags,checkTys) -> 
-                      match vrec with 
-                      | ValInRecScope(false) -> 
-                          let tpsorig,tau =  vref.TypeScheme
-                          let (tinst:Tast.tinst),tpenv = checkTys tpenv (tpsorig |> List.map (fun tp -> tp.Kind))
-                          if tpsorig.Length <> tinst.Length then error(Error(sprintf "This value expects %d type parameter(s) but is given %d" tpsorig.Length tinst.Length,m));
-                          let tau2 = InstType (mk_typar_inst tpsorig tinst) tau
-                          List.iter2
-                            (fun tp ty -> 
-                              try unifyE cenv env m (mk_typar_ty tp) ty
-                              with _ -> error (Recursion(env.DisplayEnv,v.Id,tau2,tau,m))) 
-                            tpsorig 
-                            tinst;
-                          vrefFlags,tinst,tau2,tpenv  
-                      | ValInRecScope(true) 
-                      | ValNotInRecScope ->
-                          let tps,tptys,tau = FreshenPossibleForallTy cenv.g m TyparFlexible vty 
-                          //dprintfn "After Freshen: tau = %s" (Layout.showL (typeL tau));
-                          let (tinst:Tast.tinst),tpenv = checkTys tpenv (tps |> List.map (fun tp -> tp.Kind))
-                          //dprintfn "After Check: tau = %s" (Layout.showL (typeL tau));
-                          if tptys.Length <> tinst.Length then error(Error(sprintf "This value expects %d type parameter(s) but is given %d" (List.length tps) (List.length tinst),m));
-                          List.iter2 (unifyE cenv env m) tptys tinst;
-                          //dprintfn "After Unify: tau = %s" (Layout.showL (typeL tau));
-                          vrefFlags,tinst,tau,tpenv  
-                  
-          let exprForVal = TExpr_val (vref,vrefFlags,m)
-          let exprForVal = mk_tyapp m (exprForVal,vty) tinst
-          //dprintfn "typeof(vty) = %s" (Layout.showL (typeL vty));
-          //for ty in tinst do 
-          //    dprintfn "(tinst) : ty = %s" (Layout.showL (typeL ty));
-          //dprintfn "typeof(exprForVal) = %s" (Layout.showL (typeL (type_of_expr cenv.g exprForVal)));
-          //if is_forall_typ vty then 
-          //    dprintfn "reduce_forall_typ vty tinst = %s" (Layout.showL (typeL (reduce_forall_typ cenv.g vty tinst)));
-          //dprintfn "After All: tau = %s" (Layout.showL (typeL tau));
-          let isSpecial = 
-              (vrefFlags <> NormalValUse) ||  
-              cenv.g.vref_eq vref cenv.g.splice_expr_vref || 
-              cenv.g.vref_eq vref cenv.g.splice_raw_expr_vref 
-          
-          let exprForVal =  RecordUseOfRecValue cenv vrec vref exprForVal m
-
-          exprForVal,isSpecial,tau,tpenv
-
-/// Mark points where we decide whether an expression will support automatic
-/// decondensation or not. This is somewhat a relic of a previous implementation of decondensation and could
-/// be removed
-
-type ApplicableExpr = 
-    | ApplicableExpr of 
-           // context
-           cenv * 
-           // the function-valued expression
-           Tast.expr
-    member x.Range = 
-        match x with 
-        | ApplicableExpr (cenv,e) -> range_of_expr e
-    member x.Type = 
-        match x with 
-        | ApplicableExpr (cenv,e) -> type_of_expr cenv.g e 
-    member x.SupplyArgument(e2,m) =
-        match x with 
-        | ApplicableExpr (cenv,e) -> ApplicableExpr(cenv,mk_appl cenv.g ((e,type_of_expr cenv.g e),[],[e2],m))
-    member x.Expr =
-        match x with 
-        | ApplicableExpr(_,e) ->  e
- 
-let MkApplicableExprNoFlex cenv expr =
-    ApplicableExpr (cenv,expr)
-
-/// This function reverses the effect of condensation for a named function value (indeed it can
-/// work for any expression, though we only invoke it immediately after a call to TcVal).
-///
-/// De-condensation is determined BEFORE any arguments are checked. Thus
-///      let f (x:'a) (y:'a) = ()
-///
-///      f  (new obj()) "string"
-///
-/// does not type check (the argument instantiates 'a to "obj" but there is no flexibility on the
-/// second argument position.
-///
-/// De-condensation is applied AFTER taking into account an explicit type instantiation. This
-///      let f<'a> (x:'a) = ()
-///
-///      f("string)"
-///
-/// will type check but
-///
-/// Sealed types and 'obj' do not introduce generic flexibility when functions are used as first class
-/// values. 
-///
-/// For 'obj' this is because introducing this flexibility would NOT be the reverse of condensation,
-/// since we don't condense 
-///     f : 'a -> unit
-/// to
-///     f : obj -> unit
-///
-/// We represent the flexibility in the TAST by leaving a function-to-function coercion node in the tree
-/// This "special" node is immediately eliminated by the use of IteratedFlexibleAdjustArityOfLambdaBody as soon as we 
-/// first transform the tree (currently in optimization)
-
-let MkApplicableExprWithFlex cenv (env:tcEnv) expr =
-    let exprTy = type_of_expr cenv.g expr
-    let m = range_of_expr expr
-    
-    let IsNonFlexibleType ty = is_sealed_typ cenv.g ty (* || is_obj_typ cenv.g ty *)
-    
-    let argTys,retTy = strip_fun_typ cenv.g exprTy
-    let curriedActualTypes = argTys |> List.map (try_dest_tuple_typ cenv.g)
-    if (curriedActualTypes.IsEmpty ||
-        curriedActualTypes |> List.exists (List.exists (is_byref_typ cenv.g)) ||
-        curriedActualTypes |> List.forall (List.forall IsNonFlexibleType)) then 
-       
-        ApplicableExpr (cenv,expr)
-    else
-        let curriedFlexibleTypes = 
-            curriedActualTypes |> List.mapSquared (fun actualType -> 
-                if IsNonFlexibleType actualType 
-                then actualType 
-                else 
-                   let flexibleType = new_inference_typ cenv ()
-                   AddCxTypeMustSubsumeType env.DisplayEnv cenv.css m NoTrace actualType flexibleType;
-                   flexibleType)
-
-        // Create a coercion to represent the expansion of the application
-        let expr = mk_coerce (expr,mk_iterated_fun_ty (List.map (mk_tupled_ty cenv.g) curriedFlexibleTypes) retTy,m,exprTy)
-        ApplicableExpr (cenv,expr)
-
-
-///  Checks, warnings and constraint assertions for downcasts 
-let TcRuntimeTypeTest cenv denv m tgty srcTy =
-    if type_definitely_subsumes_type_no_coercion 0 cenv.g cenv.amap m tgty srcTy then 
-      warning(TypeTestUnnecessary(m));
-
-    if is_typar_typ cenv.g srcTy then 
-        error(IndeterminateRuntimeCoercion(denv,srcTy,tgty,m));
-
-    if is_sealed_typ cenv.g srcTy then 
-        error(RuntimeCoercionSourceSealed(denv,srcTy,m));
-
-    if is_sealed_typ cenv.g tgty ||
-       is_typar_typ cenv.g tgty ||
-       not (is_interface_typ cenv.g srcTy) then 
-        AddCxTypeMustSubsumeType denv cenv.css m NoTrace srcTy tgty
-
-///  Checks, warnings and constraint assertions for upcasts 
-let TcStaticUpcast cenv denv m tgty srcTy =
-    if is_typar_typ cenv.g tgty then 
-        error(IndeterminateStaticCoercion(denv,srcTy,tgty,m)); 
-
-    if is_sealed_typ cenv.g tgty then 
-        warning(CoercionTargetSealed(denv,tgty,m));
-
-    if type_equiv cenv.g srcTy tgty then 
-        warning(UpcastUnnecessary(m)); 
-
-    AddCxTypeMustSubsumeType denv cenv.css m NoTrace tgty srcTy
-
-
-/// Build an expression that calls a given method info. 
-/// This is called after overload resolution, and also to call other 
-/// methods such as 'setters' for properties. 
-//   isProp: is it a property get? 
-//   minst: the instantiation to apply for a generic method 
-//   objArgs: the 'this' argument, if any 
-//   args: the arguments, if any 
-let BuildMethodCall cenv env mut m isProp minfo vFlags minst objArgs args =
-    let direct = IsBaseCall objArgs
-    let vFlags = if (direct && vFlags = NormalValUse) then VSlotDirectCall else vFlags
-
-    let conditionalCallDefine = 
-        TryBindMethInfoAttribute cenv.g cenv.g.attrib_ConditionalAttribute minfo 
-                     (function ([CustomElem_string (Some(msg)) ],_) -> Some(msg) | _ -> None) 
-                     (function (Attrib(_,_,[ AttribStringArg(msg) ],_,_)) -> Some(msg) | _ -> None)
-
-    match conditionalCallDefine with 
-    | Some(d) when not (List.mem d cenv.conditionalDefines) -> 
-
-        // Methods marked with 'Conditional' must return 'unit' 
-        unifyE cenv env m cenv.g.unit_ty (FSharpReturnTyOfMeth cenv.amap m minfo minst);
-        mk_unit cenv.g m, cenv.g.unit_ty
-
-    | _ -> 
-
-        TakeObjAddr cenv minfo mut m objArgs (fun objArgs -> 
-            let allArgs = (objArgs @ args)
-            match minfo with 
-            
-            // Build a call to a .NET method 
-            | ILMeth(g,ilminfo) -> 
-                mk_il_minfo_call cenv.g cenv.amap m isProp ilminfo vFlags minst direct allArgs
-
-            // Build a call to an F# method 
-            | FSMeth(g,typ,vref) -> 
-
-                // Go see if this is a use of a recursive definition... Note we know the value instantiation 
-                // we want to use so we pass that in in order not to create a new one. 
-                let vexp, _,vexpty, _ = TcVal cenv env emptyTyparEnv vref (Some(vFlags,fun tpenv _ -> (tinst_of_stripped_typ cenv.g typ @ minst, tpenv))) m
-
-                if verbose then dprintf "--> Build Method Call to %s, typ = %s\n" minfo.LogicalName (showL (typeL typ));
-                if verbose then dprintf "--> Build Method Call to %s, vexpty = %s\n" minfo.LogicalName (showL (typeL vexpty));
-
-                BuildFSharpMethodApp cenv.g m vref vexp vexpty allArgs
-
-            // Build a 'call' to a struct default constructor 
-            | DefaultStructCtor (g,typ) -> 
-                if not (TypeHasDefaultValue g typ) then 
-                    errorR(Deprecated("The default, zero-initializing constructor of a struct type may only be called directly if all the fields of the struct type admit default initialization",m));
-                mk_ilzero (m,typ), typ)
-
-
-
-/// Build the 'test and dispose' part of a 'use' statement 
-let BuildDisposableCleanup cenv env m  (v:Val) = 
-    let ad = AccessRightsOfEnv env
-    let disv,dise = Tastops.mk_compgen_local m "objectToDispose" cenv.g.system_IDisposable_typ
-    let disposeMethod = 
-        match TryFindMethInfo cenv.infoReader m ad "Dispose" cenv.g.system_IDisposable_typ with 
-        | [x] ->  x 
-        | _ -> error(InternalError("Couldn't find Dispose on IDisposable, or it was overloaded",m)) 
-    let disposeE,_ = BuildMethodCall cenv env PossiblyMutates   m false disposeMethod NormalValUse [] [dise] []
-    let inpe = mk_coerce(expr_for_val v.Range v,cenv.g.obj_ty,m,v.Type)
-    mk_isinst_cond cenv.g m cenv.g.system_IDisposable_typ inpe disv disposeE (mk_unit cenv.g m) 
-
-let BuildILFieldGet g amap m objExpr (finfo:ILFieldInfo) = 
-    let fref = finfo.ILFieldRef
-    let isValueType = finfo.IsValueType
-    let valu = if isValueType then AsValue else AsObject
-    let tinst = finfo.TypeInst
-    let fieldType = FieldTypeOfILFieldInfo amap m  finfo
-
-    let wrap,objExpr = mk_expra_of_expr g isValueType NeverMutates objExpr m 
-      // The empty instantiation on the AbstractIL fspec is OK, since we make the correct fspec in Ilxgen.GenAsm 
-      // This ensures we always get the type instantiation right when doing this from 
-      // polymorphic code, after inlining etc. *
-    let fspec = mk_fspec(fref,mk_named_typ valu fref.EnclosingTypeRef [])
-    // Add an I_nop if this is an initonly field to make sure we never recognize it as an lvalue. See mk_expra_of_expr. 
-    wrap (mk_asm (([ mk_normal_ldfld fspec ] @ (if finfo.IsInitOnly then [ I_arith AI_nop ] else [])), tinst,[objExpr],[fieldType],m)) 
-
-let BuildILFieldSet g m objExpr (finfo:ILFieldInfo) argExpr = 
-    let fref = finfo.ILFieldRef
-    let isValueType = finfo.IsValueType
-    let valu = if isValueType then AsValue else AsObject
-    let tinst = finfo.TypeInst
-      // The empty instantiation on the AbstractIL fspec is OK, since we make the correct fspec in Ilxgen.gen_asm 
-      // This ensures we always get the type instantiation right when doing this from 
-      // polymorphic code, after inlining etc. *
-    let fspec = mk_fspec(fref,mk_named_typ valu fref.EnclosingTypeRef [])
-    if finfo.IsInitOnly then error (Error ("this field is readonly",m));
-    let wrap,objExpr = mk_expra_of_expr g isValueType DefinitelyMutates objExpr m 
-    (mk_asm ([ mk_normal_stfld fspec ], tinst,[objExpr; argExpr],[],m)) 
-
-let BuildILStaticFieldSet g m (finfo:ILFieldInfo) argExpr = 
-    let fref = finfo.ILFieldRef
-    let isValueType = finfo.IsValueType
-    let valu = if isValueType then AsValue else AsObject
-    let tinst = finfo.TypeInst
-      // The empty instantiation on the AbstractIL fspec is OK, since we make the correct fspec in Ilxgen.gen_asm 
-      // This ensures we always get the type instantiation right when doing this from 
-      // polymorphic code, after inlining etc. 
-    let fspec = mk_fspec(fref,mk_named_typ valu fref.EnclosingTypeRef [])
-    if finfo.IsInitOnly then error (Error ("this field is readonly",m));
-    mk_asm ([ mk_normal_stsfld fspec ], tinst,[argExpr],[],m)
-    
-let BuildRecdFieldSet g m denv objExpr (rfinfo:RecdFieldInfo) ftinst argExpr = 
-    let tgty = rfinfo.EnclosingType
-    let valu = is_struct_typ g tgty
-    let objExpr = if valu then objExpr else mk_coerce(objExpr,tgty,m,type_of_expr g objExpr)
-    mk_recd_field_set g (objExpr,rfinfo.RecdFieldRef,rfinfo.TypeInst,argExpr,m) 
-    
-    
-(*-------------------------------------------------------------------------
- * Helpers dealing with named and optional args at callsites
- *------------------------------------------------------------------------- *)
-
-/// Detect a named argument at a callsite
-let TryGetNamedArg e = 
-    match e with 
-    | Expr_app (_, Expr_app(_, Expr_single_id_get(nm), 
-                         Expr_lid_or_id_get(isOpt,[a],_),_),b,_) when nm = opname_Equals ->
-        Some(isOpt,a,b)
-    | _ -> None 
-
-let IsNamedArg e = isSome (TryGetNamedArg e)
-
-/// Get the method arguments at a callsite, taking into account optional arguments
-let GetMethodArgs arg =
-    if verbose then  dprintf "--> tc_get_method_args\n";
-    let args = 
-        match arg with 
-        | Expr_const (Const_unit,m) -> []
-        | Expr_paren(Expr_tuple (args,m),_) | Expr_tuple (args,m) -> args
-        | Expr_paren(arg,_) | arg -> [arg]
-    let unnamedCallerArgs,namedCallerArgs = List.takeUntil IsNamedArg args
-    let namedCallerArgs = 
-        namedCallerArgs |> List.choose (fun e -> 
-          if not (IsNamedArg e) then 
-              error(Error("Named arguments must appear after all other arguments",range_of_synexpr e)); 
-          TryGetNamedArg e)
-    if verbose then  dprintf "in GetMethodArgs\n";
-    unnamedCallerArgs, namedCallerArgs
-
-
-//-------------------------------------------------------------------------
-// Helpers dealing with adhoc conversions (functions to delegates)
-//------------------------------------------------------------------------- 
-
-/// Implements the elaborated form of adhoc conversions from functions to delegates at member callsites
-let BuildNewDelegateExpr (eventInfoOpt:EventInfo option) cenv delty (minfo,delArgTys) (f,fty) m =
-    if verbose then dprintf "--> BuildNewDelegateExpr\n";
-    let slotsig = SlotSigOfMethodInfo cenv.amap m minfo
-    let delArgVals,expr = 
-        let topValInfo = TopValInfo([],List.replicate (List.length delArgTys) TopValInfo.unnamedTopArg, TopValInfo.unnamedRetVal)
-
-        // Try to pull apart an explicit lambda and use it directly 
-        // Don't do this in the case where we're adjusting the arguments of a function used to build a .NET-compatible event handler 
-        match (if isSome eventInfoOpt then None 
-               else try_dest_top_lambda_upto cenv.g cenv.amap topValInfo (f, fty)) with 
-        | None -> 
-        
-            if List.exists (is_byref_typ cenv.g) delArgTys then
-                    error(Error("This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking "^string(List.length delArgTys)^" arguments",m)); 
-
-            let delArgVals = delArgTys |> List.map (fun argty -> fst (mk_compgen_local m "delegateArg" argty)) 
-            let expr = 
-                let args = 
-                    match eventInfoOpt with 
-                    | Some einfo -> 
-                        match delArgVals with 
-                        | [] -> error(nonStandardEventError einfo.EventName m)
-                        | h :: _ when not (is_obj_typ cenv.g h.Type) -> error(nonStandardEventError einfo.EventName m)
-                        | _ :: t -> [mk_tupled_vars cenv.g m t] 
-                    | None -> if isNil delArgTys then [mk_unit cenv.g m] else List.map (expr_for_val m) delArgVals
-                mk_appl cenv.g ((f,fty),[],args,m)
-            delArgVals,expr
-            
-        | Some _ -> 
-           if isNil delArgTys then [], mk_appl cenv.g ((f,fty),[],[mk_unit cenv.g m],m) 
-           else 
-               let _,_,vsl,body,_ = IteratedAdjustArityOfLambda cenv.g cenv.amap topValInfo f
-               List.concat vsl, body
-            
-    let meth = TObjExprMethod(slotsig,[],[delArgVals],expr,m)
-    mk_obj_expr(delty,None,mk_obj_ctor_call cenv.g m,[meth],[],m)
-
-
-//-------------------------------------------------------------------------
-// Helpers dealing with pattern match compilation
-//------------------------------------------------------------------------- 
-
-let CompilePatternForMatch cenv (env:tcEnv) exprm matchm warnOnUnused actionOnFailure (v,generalizedTypars) clauses resultTy =
-    let dtree,targets = CompilePattern cenv.g env.DisplayEnv cenv.amap exprm matchm warnOnUnused actionOnFailure (v,generalizedTypars) clauses resultTy
-    mk_and_optimize_match NoSequencePointAtInvisibleBinding exprm matchm resultTy dtree targets
-
-/// Compile a pattern
-let CompilePatternForMatchClauses cenv env exprm matchm warnOnUnused actionOnFailure inputTy resultTy tclauses = 
-    // avoid creating a dummy in the common cases where we are about to bind a name for the expression 
-    // REVIEW: avoid code duplication with code further below, i.e.all callers should call CompilePatternForMatch 
-    match tclauses with 
-    | [TClause(TPat_as (pat1,PBind (v,TypeScheme(generalizedTypars,_,_)),m1),None,TTarget(vs,e,spTarget),m2) as clause] ->
-        let expr = CompilePatternForMatch cenv env exprm matchm warnOnUnused actionOnFailure (v,generalizedTypars) [TClause(pat1,None,TTarget(FlatListSet.remove vspec_eq v vs,e,spTarget),m2)] resultTy
-        v,expr
-    | _ -> 
-        let idv,idve = Tastops.mk_compgen_local exprm "matchValue" inputTy
-        let expr = CompilePatternForMatch cenv env exprm matchm warnOnUnused actionOnFailure (idv,[]) tclauses resultTy
-        idv,expr
-
-
-//-------------------------------------------------------------------------
-// Helpers dealing with sequence expressions
-//------------------------------------------------------------------------- 
-
-   
-/// Get the fragmentary expressions resulting from turning 
-/// an expression into an enumerable value, e.g. at 'for' loops 
-
-// REVIEW: do this in a 'lowering' phase later in compilation 
-// to ensure the quotation contains a higher level view of the expression 
-let AnalyzeArbitraryExprAsEnumerable cenv (env:tcEnv) m exprty expr =
-    let ad = AccessRightsOfEnv env
-    let exprToSearchForGetEnumeratorAndItem,tyToSearchForGetEnumeratorAndItem = 
-        let argty = new_inference_typ cenv ()
-        let exprty_as_seq = mk_seq_ty cenv.g argty
-        if (AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m exprty_as_seq exprty) then 
-           mk_coerce(expr,exprty_as_seq,range_of_expr expr,exprty),exprty_as_seq
-        else
-           expr,exprty
-
-    let findMethInfo g amap m nm ty = 
-        match TryFindMethInfo cenv.infoReader m ad nm ty with 
-        | [] -> error(Error("The type '"^NicePrint.pretty_string_of_typ env.DisplayEnv ty^"' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method",m));
-        | res :: _ -> res  
-        (* We can't apply this condition because IEnumerable<_> itself has multiple GetEnumerator etc. methods *)
-        (* | _ -> error(Error("The type '"^NicePrint.pretty_string_of_typ env.DisplayEnv ty^"' has an overloaded '"^nm^" method and may not be enumerated using an enumeration loop",m)) *)
-       
-      
-    let getEnumerator_minfo    = findMethInfo cenv.g cenv.amap m "GetEnumerator" tyToSearchForGetEnumeratorAndItem
-    let retTypeOfGetEnumerator = FSharpReturnTyOfMeth cenv.amap m getEnumerator_minfo []
-
-    let moveNext_minfo         = findMethInfo cenv.g cenv.amap m "MoveNext" retTypeOfGetEnumerator
-    let get_Current_minfo      = findMethInfo cenv.g cenv.amap m "get_Current" retTypeOfGetEnumerator
-    let argty                  = FSharpReturnTyOfMeth cenv.amap m get_Current_minfo []
-    
-    // Compute the element type of the strongly typed enumerator
-    //
-    // Like C#, we detect the 'GetEnumerator' pattern for .NET version 1.x abstractions that don't 
-    // support the correct generic interface. However unlike C# we also go looking for a 'get_Item' or 'Item' method
-    // with a single integer indexer argument to try to get a strong type for the enumeration should the Enumerator
-    // not provide anything useful. For some legacy COM APIs the single integer indexer argument is allowed to have type 'object'
-    //
-    let argty = 
-        if is_obj_typ cenv.g argty then 
-
-            // Look for an 'Item' property, or a set of these with consistent return types 
-            let allEquivReturnTypes minfo others = 
-                let returnTy = FSharpReturnTyOfMeth cenv.amap m minfo []
-                others |> List.forall (fun other -> type_equiv cenv.g (FSharpReturnTyOfMeth cenv.amap m other []) returnTy)
-            
-            let isInt32Indexer minfo = 
-                match ParamTypesOfMethInfo cenv.amap m minfo [] with
-                | [[ty]] -> 
-                    // e.g. MatchCOlelction
-                    type_equiv cenv.g cenv.g.int32_ty ty || 
-                    // e.g. EnvDTE.Documents.Item
-                    type_equiv cenv.g cenv.g.obj_ty ty
-                | _ -> false
-            
-            match TryFindMethInfo cenv.infoReader m ad "get_Item" tyToSearchForGetEnumeratorAndItem with
-            | (minfo :: others) when allEquivReturnTypes minfo others -> 
-
-            //| (minfo :: others) when (allEquivReturnTypes minfo others &&
-            //                          List.forall isInt32Indexer (minfo :: others)) -> 
-                FSharpReturnTyOfMeth cenv.amap m minfo []
-            
-            | _ -> 
-            
-            // Some types such as XmlNodeList have only an Item method  
-            match TryFindMethInfo cenv.infoReader m ad "Item" tyToSearchForGetEnumeratorAndItem with
-            | (minfo :: others) when allEquivReturnTypes minfo others -> 
-            //| (minfo :: others) when (allEquivReturnTypes minfo others &&
-            //                          List.forall isInt32Indexer (minfo :: others)) -> 
-                FSharpReturnTyOfMeth cenv.amap m minfo []
-            
-            | _ -> argty
-        else 
-            argty
-
-    if verbose then  dprintf "argty = %s @ %a\n" (NicePrint.pretty_string_of_typ (empty_denv cenv.g) argty) output_range m;
-    let ienumeratorv,ienumeratore = Tastops.mk_mut_compgen_local m "enumerator" retTypeOfGetEnumerator
-    let getEnumE  ,getEnumTy  = BuildMethodCall cenv env PossiblyMutates   m false getEnumerator_minfo NormalValUse [] [exprToSearchForGetEnumeratorAndItem] []
-    let guarde  ,guardty      = BuildMethodCall cenv env DefinitelyMutates m false moveNext_minfo      NormalValUse [] [ienumeratore] []
-    let currente,currentty    = BuildMethodCall cenv env DefinitelyMutates m true get_Current_minfo   NormalValUse [] [ienumeratore] []
-    let better_currente  = mk_coerce(currente,argty,range_of_expr currente,currentty)
-    ienumeratorv, ienumeratore,retTypeOfGetEnumerator,argty,getEnumE,getEnumTy, guarde,guardty, better_currente
-    
-    
-let ConvertArbitraryExprToEnumerable cenv ty (env:tcEnv) expr =
-    let m = (range_of_expr expr)
-    let argty = new_inference_typ cenv ()
-    if (AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m ( mk_seq_ty cenv.g argty) ty) then 
-        expr,argty
-    else          
-        let enumv,enume = mk_compgen_local m "inputSequence" ty
-        let ienumeratorv, _,retTypeOfGetEnumerator,argty,getEnumE,getEnumTy,guarde,guardty,better_currente = AnalyzeArbitraryExprAsEnumerable cenv env m ty enume
-        if is_struct_typ cenv.g getEnumTy then errorR(Error("This expression has a method called GetEnumerator, but its return type is a value type. Methods returning struct enumerators cannot be used in this expression form",m));
-        let getEnumE = mk_unit_delay_lambda cenv.g m getEnumE
-        let expr = 
-           mk_compgen_let m enumv expr (mk_call_seq_of_functions cenv.g m retTypeOfGetEnumerator argty getEnumE 
-                                             (mk_lambda m ienumeratorv (guarde,guardty)) 
-                                             (mk_lambda m ienumeratorv (better_currente,argty)))
-        expr,argty           
-
-let mk_seq_empty cenv env m genTy =
-    (* We must discover the 'zero' of the monadic algebra being generated in order to compile failing matches. *)
-    let genResultTy = new_inference_typ cenv ()
-    unifyE cenv env m genTy (mk_seq_ty cenv.g genResultTy);
-    mk_call_seq_empty cenv.g m genResultTy 
-
-let mk_seq_map_concat cenv env m enumElemTy genTy lam enumExpr =
-    let genResultTy = new_inference_typ cenv ()
-    unifyE cenv env m genTy (mk_seq_ty cenv.g genResultTy);
-    let enumExpr = mk_coerce_if_needed cenv.g (mk_seq_ty cenv.g enumElemTy) (type_of_expr cenv.g enumExpr) enumExpr
-    mk_call_seq_map_concat cenv.g m enumElemTy genResultTy lam enumExpr
-
-let mk_seq_using cenv (env:tcEnv) m resourceTy genTy resourceExpr lam =
-    AddCxTypeMustSubsumeType env.DisplayEnv cenv.css m NoTrace cenv.g.system_IDisposable_typ resourceTy;
-    let genResultTy = new_inference_typ cenv ()
-    unifyE cenv  env m genTy (mk_seq_ty cenv.g genResultTy);
-    mk_call_seq_using cenv.g m resourceTy genResultTy resourceExpr lam 
-
-let mk_seq_delay cenv env m genTy lam =
-    let genResultTy = new_inference_typ cenv ()
-    unifyE cenv env m genTy (mk_seq_ty cenv.g genResultTy);
-    mk_call_seq_delay cenv.g m genResultTy (mk_unit_delay_lambda cenv.g m lam) 
-
-
-let mk_seq_append cenv env m genTy e1 e2 =
-    let genResultTy = new_inference_typ cenv ()
-    unifyE cenv env m genTy (mk_seq_ty cenv.g genResultTy);
-    let e1 = mk_coerce_if_needed cenv.g (mk_seq_ty cenv.g genResultTy) (type_of_expr cenv.g e1) e1
-    let e2 = mk_coerce_if_needed cenv.g (mk_seq_ty cenv.g genResultTy) (type_of_expr cenv.g e2) e2
-    mk_call_seq_append cenv.g m genResultTy e1 e2 
-
-let mk_seq_generated cenv env m genTy e1 e2 =
-    let genResultTy = new_inference_typ cenv ()
-    unifyE cenv env m genTy (mk_seq_ty cenv.g genResultTy);
-    let e2 = mk_coerce_if_needed cenv.g (mk_seq_ty cenv.g genResultTy) (type_of_expr cenv.g e2) e2
-    mk_call_seq_generated cenv.g m genResultTy e1 e2 
-
-let mk_seq_finally cenv env m genTy e1 e2 =
-    let genResultTy = new_inference_typ cenv ()
-    unifyE cenv env m genTy (mk_seq_ty cenv.g genResultTy);
-    let e1 = mk_coerce_if_needed cenv.g (mk_seq_ty cenv.g genResultTy) (type_of_expr cenv.g e1) e1
-    mk_call_seq_finally cenv.g m genResultTy e1 e2 
-
-let mk_monadic_match_clauses (pat',vspecs) innerExpr = 
-    [ TClause(pat',None,TTarget(vspecs, innerExpr,SequencePointAtTarget),RangeOfPat pat') ]
-
-let mk_seq_match_clauses cenv env (pat',vspecs) genTy innerExpr m = 
-    [TClause(pat',None,TTarget(vspecs, innerExpr,SequencePointAtTarget),RangeOfPat pat') ] 
-
-let conv_tcomp_match_clauses cenv env inputExprMark (pat',vspecs) innerExpr bindPatTy genInnerTy wholeExprMark = 
-    let patMark = (RangeOfPat pat')
-    let tclauses = mk_seq_match_clauses cenv env (pat',vspecs) genInnerTy innerExpr wholeExprMark
-    CompilePatternForMatchClauses cenv env inputExprMark patMark false Incomplete bindPatTy genInnerTy tclauses 
-
-
-let elim_fast_integer_for_loop (spBind,id,start,dir,finish,innerExpr,m) = 
-    let pseudoEnumExpr = 
-        if dir then mksyn_infix m m start ".." finish
-        else  mksyn_trifix m ".. .." start (Expr_const(Const_int32 (-1),range_of_synexpr start)) finish
-    Expr_foreach (spBind,SeqExprOnly(false),mksyn_pat_var None id,pseudoEnumExpr,innerExpr,m)
-
-/// Determine if a syntactic expression inside 'seq { ... }' or '[...]' counts as a "simple sequence
-/// of semicolon separated values". For example [1;2;3].
-/// 'acceptDeprecated' is true for the '[ ... ]' case, where we allow the syntax '[ if g then t else e ]' but ask it to be parenthesized
-///
-let (|SimpleSemicolonSequence|_|) acceptDeprecated c = 
-
-    let rec YieldFree expr = 
-        match expr with 
-        | Expr_seq (_,_,e1,e2,_) -> YieldFree e1 && YieldFree e2
-        | Expr_cond (_,e2,e3opt,_,_,_) -> YieldFree e2 && Option.for_all YieldFree e3opt
-        | Expr_try_catch (e1,_,clauses,_,_,_,_) -> YieldFree e1 && clauses |> List.forall (fun (Clause(_,_,e,_,_)) -> YieldFree e)
-        | Expr_match (_,_,clauses,_,_) -> clauses |> List.forall (fun (Clause(_,_,e,_,_)) -> YieldFree e)
-        | Expr_for (_,_,_,_,_,body,_) 
-        | Expr_try_finally (body,_,_,_,_)
-        | Expr_let (_,_,_,body,_) 
-        | Expr_while (_,_,body,_) 
-        | Expr_foreach (_,_,_,_,body,_) -> YieldFree body
-        | Comp_yieldm _ 
-        | Comp_yield _ 
-        | Comp_bind _ 
-        | Comp_zero _ 
-        | Expr_do _ -> false
-        | e -> true
-
-    let rec IsSimpleSemicolonSequenceElement expr = 
-        match expr with 
-        | Expr_cond _ when acceptDeprecated && YieldFree expr -> true
-        | Expr_cond _ 
-        | Expr_try_catch _ 
-        | Expr_match _ 
-        | Expr_for _ 
-        | Expr_foreach _ 
-        | Expr_try_finally _ 
-        | Comp_yieldm _ 
-        | Comp_yield _ 
-        | Expr_let _ 
-        | Expr_do _ 
-        | Comp_bind _ 
-        | Comp_zero _ 
-        | Expr_while _ -> false
-        | e -> true
-
-    let rec GetSimpleSemicolonSequenceOfComprehension expr acc = 
-        match expr with 
-        | Expr_seq(_,true,e1,e2,_) -> 
-            if IsSimpleSemicolonSequenceElement e1 then 
-                GetSimpleSemicolonSequenceOfComprehension e2 (e1::acc)
-            else
-                None 
-        | e -> 
-            if IsSimpleSemicolonSequenceElement e then 
-                Some(List.rev (e::acc))
-            else 
-                None 
-
-    if YieldFree c then 
-        GetSimpleSemicolonSequenceOfComprehension c []
-    else
-        None
-
-
-//-------------------------------------------------------------------------
-// Post-transform initialization graphs using the 'lazy' interpretation.
-// See ML workshop paper.
-//------------------------------------------------------------------------- 
-
-type InitializationGraphAnalysisState = 
-    | Top
-    | InnerTop
-    | DefinitelyStrict
-    | MaybeLazy
-    | DefinitelyLazy
-
-let EliminateInitializationGraphs g mustHaveArity denv fixupsAndBindingsWithoutLaziness bindsm =
-    (* BEGIN INITIALIZATION GRAPHS *)
-    (* Check for safety and determine if we need to insert lazy thunks *)
-    let fixupsl,bindsWithoutLaziness = List.unzip fixupsAndBindingsWithoutLaziness
-    let fixupsl : RecursiveUseFixupPoints list = fixupsl
-    let rvs = bindsWithoutLaziness |> List.map (fun (TBind(v,_,_)) -> mk_local_vref v) 
-    let outOfOrder = ref false
-    let runtimeChecks = ref false
-    let directRecursiveData = ref false
-    let reportedEager = ref false
-    let definiteDependencies = ref []
-    let check availIfInOrder boundv expr = 
-        let strict = function
-            | MaybeLazy -> MaybeLazy
-            | DefinitelyLazy -> DefinitelyLazy
-            | Top | DefinitelyStrict | InnerTop -> DefinitelyStrict
-        let lzy = function 
-            | Top | InnerTop | DefinitelyLazy -> DefinitelyLazy 
-            | MaybeLazy | DefinitelyStrict -> MaybeLazy
-        let fixable = function 
-            | Top | InnerTop -> InnerTop
-            | DefinitelyStrict -> DefinitelyStrict
-            | MaybeLazy -> MaybeLazy
-            | DefinitelyLazy -> DefinitelyLazy
-
-        let rec CheckExpr st e = 
-            if verbose then  dprintf "--> CheckExpr@%a\n" output_range (range_of_expr e);
-            match strip_expr e with 
-              (* Expressions with some lazy parts *)
-            | TExpr_lambda (_,_,_,b,_,_,_) | TExpr_tlambda (_,_,b,_,_,_) -> checkDelayed st b
-            | TExpr_obj (_,ty,_,e,overrides,extraImpls,_,_) -> 
-                (* NOTE: we can't fixup recursive references inside delegates since the closure delegee of a delegate is not accessible *)
-                (* from outside. Object expressions implementing interfaces can, on the other hand, be fixed up. See FSharp 1.0 bug 1469 *)
-                if is_interface_typ g ty (* || is_delegate_typ ty *) then 
-                    List.iter (fun (TObjExprMethod(_,_,_,e,m)) ->  checkDelayed st e) overrides;
-                    List.iter (snd >> List.iter (fun (TObjExprMethod(_,_,_,e,m)) ->  checkDelayed st e)) extraImpls;
-                else 
-                    CheckExpr (strict st) e;
-                    List.iter (fun (TObjExprMethod(_,_,_,e,m)) ->  CheckExpr (lzy (strict st)) e) overrides;
-                    List.iter (snd >> List.iter (fun (TObjExprMethod(_,_,_,e,m)) ->  CheckExpr (lzy (strict st)) e)) extraImpls;
-                
-              (* Expressions where fixups may be needed *)
-            | TExpr_val (v,_,m) -> CheckValSpec st v m
-
-              (* Expressions where subparts may be fixable *)
-            | TExpr_op((TOp_tuple | TOp_ucase _ | TOp_recd _),_,args,_) -> 
-                     (* REVIEW: ONLY FIXABLE WHEN (item_ref_in_this_assembly accessible_ccus tycon) *)
-                List.iter (CheckExpr (fixable st)) args
-
-              (* Composite expressions *)
-            | TExpr_const _ -> ()
-            | TExpr_letrec (binds,e,_,_)  ->
-                binds |> FlatList.iter (CheckBinding (strict st)) ; 
-                CheckExpr (strict st) e
-            | TExpr_let (bind,e,_,_) ->  
-                CheckBinding (strict st) bind; 
-                CheckExpr (strict st) e
-            | TExpr_match (_,_,pt,targets,_,_,_) -> 
-                CheckDecisionTree (strict st) pt; 
-                Array.iter (CheckDecisionTreeTarget (strict st)) targets 
-            | TExpr_app(e1,_,_,args,_) -> 
-                CheckExpr (strict st) e1;  
-                List.iter (CheckExpr (strict st)) args 
-          (* Binary expressions *)
-            | TExpr_seq (e1,e2,_,_,_)
-            | TExpr_static_optimization (_,e1,e2,_) ->
-                 CheckExpr (strict st) e1;  CheckExpr (strict st) e2
-          (* n-ary expressions *)
-            | TExpr_op(op,_,args,m)  -> CheckExprOp st op m;  List.iter (CheckExpr (strict st)) args
-          (* misc *)
-            | TExpr_link(eref) -> CheckExpr st !eref
-            | TExpr_tchoose (_,b,_)  -> CheckExpr st b
-            | TExpr_quote _  -> ()
-
-        and CheckMethod st (TObjExprMethod(_,_,_,e,m)) =  CheckExpr (lzy (strict st)) e
-        and CheckBinding st (TBind(v,e,_)) = CheckExpr st e 
-        and CheckDecisionTree st = function
-            | TDSwitch(e1,csl,dflt,_) -> CheckExpr st e1; List.iter (fun (TCase(_,d)) -> CheckDecisionTree st d) csl; Option.iter (CheckDecisionTree st) dflt
-            | TDSuccess (es,n) -> es |> FlatList.iter (CheckExpr st) 
-            | TDBind(bind,e) -> CheckBinding st bind; CheckDecisionTree st e
-        and CheckDecisionTreeTarget st (TTarget(vs,e,_)) = CheckExpr st e
-
-        and CheckExprOp st op m = 
-            match op with 
-            | TOp_lval_op (kind,lvr) -> CheckValSpec (strict st) lvr m
-            | _ -> ()
-          
-        and CheckValSpec st v m = 
-            match st with 
-            | MaybeLazy -> 
-                if ListSet.mem g.vref_eq v rvs then 
-                    warning (RecursiveUseCheckedAtRuntime (denv,v,m)); 
-                    if not !reportedEager then 
-                      (warning (LetRecCheckedAtRuntime m); reportedEager := true);
-                    runtimeChecks := true;
-
-            | Top | DefinitelyStrict ->
-                if ListSet.mem g.vref_eq v rvs then 
-                    if not (ListSet.mem g.vref_eq v availIfInOrder) then 
-                        warning (LetRecEvaluatedOutOfOrder (denv,boundv,v,m)); 
-                        outOfOrder := true;
-                        if not !reportedEager then 
-                          (warning (LetRecCheckedAtRuntime m); reportedEager := true);
-                    definiteDependencies := (boundv,v) :: !definiteDependencies
-            | InnerTop -> 
-                if ListSet.mem g.vref_eq v rvs then 
-                    directRecursiveData := true
-            | DefinitelyLazy -> () 
-        and checkDelayed st b = 
-            match st with 
-            | MaybeLazy | DefinitelyStrict -> CheckExpr MaybeLazy b
-            | DefinitelyLazy | Top | InnerTop -> () 
-          
-       
-        CheckExpr Top expr
-   
-
-    List.fold 
-         (fun availIfInOrder (TBind(v,e,_)) -> 
-           check availIfInOrder (mk_local_vref v) e; 
-           (mk_local_vref v::availIfInOrder))
-         [] bindsWithoutLaziness |> ignore;
-    
-     (* ddg = definiteDependencyGraph *)
-    let ddgNodes = bindsWithoutLaziness |> List.map (fun (TBind(v,_,_)) -> mk_local_vref v) 
-    let ddg = NodeGraph.mk_graph ((fun (v:ValRef) -> v.Stamp), Int64.order) ddgNodes (!definiteDependencies |> List.map (fun (v1,v2) -> v1.Stamp, v2.Stamp))
-    ddg |> NodeGraph.iterate_cycles (fun path -> error (LetRecUnsound (denv,path,path.Head.Range))) ;
-
-    let requiresLazyBindings = !runtimeChecks || !outOfOrder
-    if !directRecursiveData && requiresLazyBindings then 
-        error(Error("This recursive binding uses an invalid mixture of recursive forms",bindsm));
-
-    let bindsBefore, bindsAfter = 
-      if requiresLazyBindings then 
-          let bindsBeforeL, bindsAfterL = 
-            
-              (fixupsl, bindsWithoutLaziness) 
-              ||> List.map2 (fun (RecursiveUseFixupPoints(fixupPoints)) (TBind(v,e,seqPtOpt)) -> 
-                   match strip_expr e with
-                   | TExpr_lambda _ | TExpr_tlambda _ -> 
-                       [mk_invisible_bind v e],[] 
-                   | _ -> 
-                       if verbose then  dprintf "value '%s' will use lazy thunks and runtime checks\n" v.MangledName;
-                       let ty = v.Type
-                       let m = v.Range
-                       let vty = (mk_lazy_ty g ty)
-
-                       let fty = (g.unit_ty --> ty)
-                       let flazy,felazy = Tastops.mk_compgen_local m  v.MangledName fty 
-                       let frhs = mk_unit_delay_lambda g m e
-                       if mustHaveArity then flazy.Data.val_top_repr_info <- Some(InferArityOfExpr g fty [] [] frhs);
-
-                       let vlazy,velazy = Tastops.mk_compgen_local m  v.MangledName vty 
-                       let vrhs = (mk_lazy_delayed g m ty felazy)
-                       
-                       if mustHaveArity then vlazy.Data.val_top_repr_info <- Some(InferArityOfExpr g vty [] [] vrhs);
-                       fixupPoints |> List.iter (fun (fp,m) -> fp := mk_lazy_force g (range_of_expr !fp) ty velazy);
-
-                       [mk_invisible_bind flazy frhs; mk_invisible_bind vlazy vrhs],
-                       [mk_bind seqPtOpt v (mk_lazy_force g m ty velazy)])
-               |> List.unzip
-          List.concat bindsBeforeL, List.concat bindsAfterL
-      else
-          bindsWithoutLaziness,[]
-    bindsBefore @ bindsAfter
-
-//-------------------------------------------------------------------------
-// Check the shape of an object constructor and rewrite calls 
-//------------------------------------------------------------------------- 
-
-let CheckAndRewriteObjectCtor g env ctorLambaExpr =
-
-    let m = range_of_expr ctorLambaExpr
-    let tps,vsl,body,returnTy = dest_top_lambda (ctorLambaExpr,type_of_expr g ctorLambaExpr)
-
-    // Rewrite legitimate self-construction calls to CtorValUsedAsSelfInit 
-    let error(expr) = 
-        errorR(Error(sprintf "This is not a valid object construction expression. Object constructors can only be implemented by a limited range of expressions",range_of_expr expr));
-        expr
-
-    // Build an assignment into the mutable reference cell that holds recursive references to 'this' 
-    let rewriteContruction recdExpr = 
-       match env.eCtorInfo with 
-       | None -> recdExpr
-       | Some ctorInfo -> 
-           match ctorInfo.ctorThisRefCellVarOpt with 
-           | None -> recdExpr
-           | Some vref -> 
-               let ty = type_of_expr g recdExpr
-               TExpr_seq(recdExpr,(mk_refcell_set g  m ty (expr_for_vref m vref) (mk_ldarg0 m ty)),ThenDoSeq,SuppressSequencePointOnExprOfSequential,m)
-
-    let rec checkAndRewrite expr = 
-        match expr with 
-        (*  = { fields } *)
-        // The constructor ends in an object initialization expression - good 
-        | TExpr_op(TOp_recd(RecdExprIsObjInit,_),_,_,_) -> rewriteContruction expr
-
-        //  = "a; " 
-        | TExpr_seq(a,body,NormalSeq,spSeq,b)  -> TExpr_seq(a,checkAndRewrite body,NormalSeq,spSeq,b) 
-
-        //  = " then " 
-        | TExpr_seq(body,a,ThenDoSeq,spSeq,b) -> TExpr_seq(checkAndRewrite body,a,ThenDoSeq,spSeq,b)
-
-        //  = "let pat = expr in " 
-        | TExpr_let(bind,body,m,_)  -> mk_let_bind m bind (checkAndRewrite body)
-
-        // The constructor is a sequence "let pat = expr in " 
-        | TExpr_match(spBind,a,b,targets,c,d,e)  -> TExpr_match(spBind,a,b, (targets |> Array.map (fun (TTarget(vs,body,spTarget)) -> TTarget(vs, checkAndRewrite body,spTarget))),c,d,e)
-
-        //  = "let rec binds in " 
-        | TExpr_letrec(a,body,_,b) -> TExpr_letrec (a,checkAndRewrite body ,m,NewFreeVarsCache())
-
-        //  = "new C(...)" 
-        | TExpr_app(f,b,c,d,m) -> 
-            // The application had better be an application of a ctor 
-            let f = checkAndRewriteCtorUsage f
-            let expr = TExpr_app(f,b,c,d,m)
-            rewriteContruction expr 
-
-        | _ -> 
-            error(expr)
-
-    and checkAndRewriteCtorUsage expr = 
-         match expr with 
-         | TExpr_link eref -> 
-               let e = checkAndRewriteCtorUsage !eref
-               eref := e;
-               expr
-               
-         // Type applications are ok, e.g. 
-         //     type C<'a>(x:int) = 
-         //         new() = C<'a>(3) 
-         | TExpr_app(f,fty,tyargs,[],m) -> 
-             let f = checkAndRewriteCtorUsage f
-             TExpr_app(f,fty,tyargs,[],m)
-
-         // Self-calls are OK and get rewritten. 
-         | TExpr_val(vref,NormalValUse,a) ->
-           let isCtor = 
-               match vref.MemberInfo with 
-               | None -> false
-               | Some(memberInfo) -> (memberInfo.MemberFlags.MemberKind = MemberKindConstructor)
-
-           if not isCtor then error(expr) else
-           TExpr_val(vref,CtorValUsedAsSelfInit,a)
-         | _ -> 
-            error(expr)
-    
-    let body = checkAndRewrite body
-    mk_multi_lambdas m tps vsl (body, returnTy) 
-    
-
-
-/// Post-typechecking normalizations to enforce semantic constraints
-/// lazy and, lazy or, rethrow, address-of
-let build_app cenv expr exprty arg m = 
-    match expr,arg with        
-    | ApplicableExpr(_, TExpr_app(TExpr_val(vf,_,_),_,_,[x0],_)) , _ 
-         when cenv.g.vref_eq vf cenv.g.and_vref 
-           || cenv.g.vref_eq vf cenv.g.and2_vref  -> 
-        MkApplicableExprNoFlex cenv (mk_lazy_and cenv.g m x0 arg)
-    | ApplicableExpr(_, TExpr_app(TExpr_val(vf,_,_),_,_,[x0],_)), _ 
-         when cenv.g.vref_eq vf cenv.g.or_vref
-           || cenv.g.vref_eq vf cenv.g.or2_vref -> 
-        MkApplicableExprNoFlex cenv (mk_lazy_or cenv.g m x0 arg )
-    | ApplicableExpr(_, TExpr_app(TExpr_val(vf,_,_),_,_,[],_)), _ 
-         when cenv.g.vref_eq vf cenv.g.rethrow_vref -> 
-        // exprty is of type: "unit -> 'a". Break it and store the 'a type here, used later as return type. 
-        let _unit_ty,rtn_ty = dest_fun_typ cenv.g exprty 
-        MkApplicableExprNoFlex cenv (mk_compgen_seq m arg (mk_rethrow m rtn_ty))
-    | ApplicableExpr(_, TExpr_app(TExpr_val(vf,_,_),_,_,[],_)), _ 
-         when (cenv.g.vref_eq vf cenv.g.addrof_vref || 
-               cenv.g.vref_eq vf cenv.g.addrof2_vref) -> 
-        if cenv.g.vref_eq vf cenv.g.addrof2_vref then warning(UseOfAddressOfOperator(m));
-        let wrap,e1a' = mk_expra_of_expr cenv.g true DefinitelyMutates arg m 
-        MkApplicableExprNoFlex cenv (wrap(e1a'))
-    | _ -> 
-        expr.SupplyArgument(arg,m) 
-            
-
-//-------------------------------------------------------------------------
-// Additional data structures used by type checking
-//------------------------------------------------------------------------- 
-
-type DelayedItem = 
-  | DelayedTypeApp of Ast.SynType list * Range.range
-  | DelayedApp of ExprAtomicFlag * Ast.SynExpr * Range.range
-  | DelayedDotLookup of Ast.ident list * Range.range
-  | DelayedSet of Ast.SynExpr * Range.range
-
-let MakeDelayedSet(e,m) = 
-    // We have lid <- e. Wrap 'e' in another pair of parentheses to ensure it's never interpreted as 
-    // a named argument, e.g. for "el.Checked <- (el = el2)" 
-    DelayedSet (Expr_paren (e, range_of_synexpr e), m)
-
-type NewSlotsOK = 
-    | NewSlotsOK 
-    | NoNewSlots
-
-
-type ImplictlyBoundTyparsAllowed = 
-    | NewTyparsOKButWarnIfNotRigid 
-    | NewTyparsOK 
-    | NoNewTypars
-
-type CheckConstraints = 
-    | CheckCxs 
-    | NoCheckCxs
-
-type TypeRealizationPass = 
-    | FirstPass 
-    | SecondPass 
-
-/// Provides information about the context for a value or member definition 
-type ContainerInfo = 
-    | ContainerInfo of 
-                                      (*parent:*)
-                                      ParentRef *  // The nearest containing module. Used as the 'actual' parent for extension members and values 
-                                      // For members:
-                                      Option<(TyconRef *                        // tcref: The logical apparent parent of a value/member, either a module, type or exception 
-                                              (Tast.typ * SlotImplSet) option * // optIntfSlotTy
-                                              Val option *                      // optBaseVal
-                                              typars                            // declaredTyconTypars
-                                             )>
-    member x.ParentRef = (let (ContainerInfo(v,_)) = x in v)
-    
-/// Indicates a declaration is contained in an expression 
-let ExprContainerInfo = ContainerInfo(ParentNone,None)
-/// Indicates a declaration is contained in the given module 
-let ModuleOrNamespaceContainerInfo modref = ContainerInfo(Parent(modref),Some(modref,None,None,[]))
-/// Indicates a declaration is contained in the given type definition in the given module 
-let TyconContainerInfo (parent,tcref,declaredTyconTypars) = ContainerInfo(parent,Some(tcref,None,None,declaredTyconTypars))
-
-type RecursiveBindingDefnInfo = RecBindingDefn of ContainerInfo * NewSlotsOK * DeclKind * SynBinding
-
-type NormalizedRecBindingDefn = NormalizedRecBindingDefn of ContainerInfo * NewSlotsOK * DeclKind * NormalizedBinding
-
-type TyconBindingDefn = TyconBindingDefn of ContainerInfo * NewSlotsOK * DeclKind * SynClassMemberDefn * range
-
-type TyconBindingDefns = TyconBindingDefns of TyconRef * TyconBindingDefn list
-
-type TyconMemberData = TyconMemberData of DeclKind * TyconRef * Val option * typars * SynClassMemberDefn list * range * NewSlotsOK
-
-type ValSpecResult = ValSpecResult of ParentRef * ValMemberInfo option * ident * typars * typars * Tast.typ * PartialTopValInfo * DeclKind 
-
-
-/// RecursiveBindingInfo - flows through initial steps of TcLetrec 
-type RecursiveBindingInfo =
-    RBInfo of
-      ContainerInfo * 
-      typars * 
-      ValInlineInfo * 
-      Val * 
-      ExplicitTyparInfo * 
-      PartialTopValInfo * 
-      ValMemberInfo option  * 
-      Val option * 
-      Val option * 
-      access option * 
-      Tast.typ * 
-      DeclKind
-
-
-/// Check specifications of contraints on type parameters 
-let rec TcTyparConstraint ridx cenv newOk checkCxs env tpenv c = 
-    match c with 
-    | WhereTyparEqualsType(tp,ty,m) ->
-       let ty',tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv ty
-       let tp',tpenv = TcTypar cenv env newOk tpenv tp
-       if (newOk = NoNewTypars) then errorR(Error("invalid constraint",m));
-       unifyE cenv env m (mk_typar_ty tp') ty';
-       tpenv
-
-    | WhereTyparDefaultsToType(tp,ty,m) ->
-       let ty',tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv ty
-       let tp',tpenv = TcTypar cenv env newOk tpenv tp
-       let csenv = (MakeConstraintSolverEnv cenv.css m env.DisplayEnv)
-       AddConstraint csenv 0 m NoTrace tp' (TTyparDefaultsToType(ridx,ty',m)) |> CommitOperationResult;
-       tpenv
-
-    | WhereTyparSubtypeOfType(tp,ty,m) ->
-       let ty',tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv ty
-       let tp',tpenv = TcTypar cenv env newOk tpenv tp
-       if (newOk = NoNewTypars) && is_sealed_typ cenv.g ty' then 
-           errorR(Error("invaid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution",m));
-       AddCxTypeMustSubsumeType env.DisplayEnv cenv.css m NoTrace  ty' (mk_typar_ty tp') ;
-       tpenv
-
-    | WhereTyparSupportsNull(tp,m) ->
-       let tp',tpenv = TcTypar cenv env newOk tpenv tp
-       AddCxTypeMustSupportNull env.DisplayEnv cenv.css m NoTrace (mk_typar_ty tp') ;
-       tpenv
-
-    | WhereTyparIsReferenceType(tp,m) ->
-       let tp',tpenv = TcTypar cenv env newOk tpenv tp
-       AddCxTypeIsReferenceType env.DisplayEnv cenv.css m NoTrace (mk_typar_ty tp') ;
-       tpenv
-
-    | WhereTyparIsValueType(tp,m) ->
-       let tp',tpenv = TcTypar cenv env newOk tpenv tp
-       AddCxTypeIsValueType env.DisplayEnv cenv.css m NoTrace (mk_typar_ty tp') ;
-       tpenv
-
-    | WhereTyparIsEnum(tp,tyargs,m) ->
-       let tp',tpenv = TcTypar cenv env newOk tpenv tp
-       match tyargs with 
-       | [underlying] -> 
-           let underlying',tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv underlying
-           AddCxTypeIsEnum env.DisplayEnv cenv.css m NoTrace (mk_typar_ty tp') underlying';
-       | _ -> errorR(Error("an 'enum' constraint must be of the form 'enum'",m));
-       tpenv
-
-    | WhereTyparIsDelegate(tp,tyargs,m) ->
-       let tp',tpenv = TcTypar cenv env newOk tpenv tp
-       match tyargs with 
-       | [a;b] -> 
-           let a',tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv a
-           let b',tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv b
-           AddCxTypeIsDelegate env.DisplayEnv cenv.css m NoTrace (mk_typar_ty tp') a' b';
-           tpenv
-       | _ -> 
-           errorR(Error("an 'enum' constraint must be of the form 'enum'",m));
-           tpenv
-
-    | WhereTyparSupportsMember(tps,memSpfn,m) ->
-        let tps',tpenv = List.mapfold (TcTypar cenv env newOk) tpenv tps
-        let traitInfo,tpenv = TcPseudoMemberSpec cenv newOk checkCxs env tps tpenv memSpfn m
-        match traitInfo with 
-        | TTrait(objtys,".ctor",memberFlags,argtys,returnTy,_) when (memberFlags.MemberKind=MemberKindConstructor) ->
-            match objtys,argtys with 
-            | [ty],[] when type_equiv cenv.g ty (GetFSharpViewOfReturnType cenv.g returnTy) ->
-                AddCxTypeMustSupportDefaultCtor env.DisplayEnv cenv.css m NoTrace ty ;
-                tpenv
-            | _ ->            
-                errorR(Error("'new' constraints must take one argument of type 'unit' and return the constructed type",m));
-                tpenv
-        | _ ->  
-            AddCxMethodConstraint env.DisplayEnv cenv.css m NoTrace traitInfo;
-            tpenv
-      
-and TcPseudoMemberSpec cenv newOk checkCxs env tps tpenv memSpfn m = 
-    let tps',tpenv = List.mapfold (TcTypar cenv env newOk) tpenv tps
-    let tys = List.map mk_typar_ty tps'
-    match memSpfn with 
-    | ClassMemberSpfn_binding (valSpfn,memberFlags,m) ->
-        let members,tpenv = TcValSpec cenv env ModuleOrMemberBinding (ExprContainerInfo) (Some memberFlags) (Some (List.hd tys)) tpenv valSpfn []
-        match members with 
-        | [ValSpecResult(_,_,id,_,_,ty',partialTopValInfo,_)] -> 
-            (* REVIEW: Test pseudo constraints cannot refer to polymorphic methods, *)
-            let tps,_ = try_dest_forall_typ cenv.g ty'
-            let topValInfo = TranslatePartialArity tps partialTopValInfo
-            let tps,curriedArgInfos,returnTy,_ = GetTopValTypeInCompiledForm cenv.g topValInfo ty' m
-            let argtys = List.concat curriedArgInfos
-            let argtys = List.map fst argtys
-            let logicalCompiledName = ComputeLogicalCompiledName id memberFlags
-            TTrait(tys,logicalCompiledName,memberFlags,argtys,returnTy, ref None),tpenv
-        | _ -> error(Error("This constraint is invalid",m))
-    | _ -> error(Error("This constraint is invalid",m))
-
-
-/// Check a value specification, e.g. in a signature or a constraint
-and TcValSpec cenv env declKind containerInfo memFlagsOpt thisTyOpt tpenv (ValSpfn(attrs,id,SynValTyparDecls(synTypars,_,synTyparConstraints), ty, valSynInfo, _,mutableFlag,doc, vis,literalExprOpt,m)) attrs' =
-    (*printf "TcValSpec: id=%s\n" id.idText;*)
-    let declaredTypars = TcTyparDecls cenv env synTypars
-    let (ContainerInfo(altActualParent,tcrefContainerInfo)) = containerInfo
-    let enclosingDeclaredTypars,memberContainerInfo,thisTyOpt,declKind = 
-        match tcrefContainerInfo with 
-        | Some(tcref,_,_,declaredTyconTypars) -> 
-            let isExtrinsic = (declKind = ExtrinsicExtensionBinding)
-            let _,enclosingDeclaredTypars,_,_,thisTy = FreshenObjectArgType cenv m TyparRigid tcref isExtrinsic declaredTyconTypars
-            // An implemented interface type is in terms of the type's type parameters. 
-            // We need a signature in terms of the values' type parameters. 
-            // let optIntfSlotTy = Option.map (InstType renaming) optIntfSlotTy in  
-            enclosingDeclaredTypars,Some(tcref),Some(thisTy),declKind
-        | None -> 
-            [],None,thisTyOpt, ModuleOrMemberBinding
-    let allDeclaredTypars = (enclosingDeclaredTypars@declaredTypars)
-    let envinner = AddDeclaredTypars NoCheckForDuplicateTypars allDeclaredTypars env
-    let newOk = NewTyparsOK
-    let checkCxs = CheckCxs
-    let tpenv = TcTyparConstraints cenv newOk checkCxs envinner tpenv synTyparConstraints
-    // Process the type, including any constraints 
-    // REVIEW: check full ramifications of allowing NewTyparsOK here 
-    let declaredTy,tpenv = TcTypeAndRecover cenv newOk checkCxs envinner tpenv ty  
-
-    // Enforce "no more constraints allowed on declared typars "
-    allDeclaredTypars |> List.iter (SetTyparRigid cenv.g env.DisplayEnv m);
-    
-    match memFlagsOpt,thisTyOpt with 
-    | Some(memberFlags),Some(thisTy) -> 
-        let generateOneMember(memberFlags) = 
-        
-            // Decode members in the signature
-            let ty',valSynInfo = 
-                match memberFlags.MemberKind with 
-                | MemberKindClassConstructor
-                | MemberKindConstructor
-                | MemberKindMember -> 
-                    declaredTy,valSynInfo
-                | MemberKindPropertyGet 
-                | MemberKindPropertySet ->  
-                    let fakeTopArgInfos = [ for n in SynInfo.AritiesOfArgs valSynInfo do yield [ for i in 1 .. n do yield TopValInfo.unnamedTopArg1 ] ]
-                    let arginfos,returnTy = GetTopTauTypeInFSharpForm cenv.g fakeTopArgInfos declaredTy m
-                    if arginfos.Length > 1 then error(Error("This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'",m))
-                    match memberFlags.MemberKind with 
-                    | MemberKindPropertyGet ->
-                        if SynInfo.HasNoArgs valSynInfo then 
-                          (cenv.g.unit_ty --> declaredTy), (SynInfo.IncorporateEmptyTupledArg valSynInfo)
-                        else
-                          declaredTy,valSynInfo
-                    | _ -> 
-                        let setterTy = (mk_tupled_ty cenv.g (List.map fst (List.concat arginfos) @ [returnTy]) --> cenv.g.unit_ty)
-                        let synInfo = SynInfo.IncorporateSetterArg valSynInfo
-                        setterTy, synInfo
-                | MemberKindPropertyGetSet -> 
-                    error(InternalError("Unexpected MemberKindPropertyGetSet from signature parsing",m))
-
-            // Take "unit" into account in the signature
-            let valSynInfo = AdjustValSynInfoInSignature cenv.g ty' valSynInfo
-
-            let ty',valSynInfo = 
-                if memberFlags.MemberIsInstance then 
-                  (thisTy --> ty'), (SynInfo.IncorporateSelfArg valSynInfo)
-                else
-                  ty',valSynInfo
-
-            let reallyGenerateOneMember(id,valSynInfo,ty',memberFlags) = 
-                let (PartialTopValInfo(argsData,retData)) as partialTopValInfo = 
-                    TranslateTopValSynInfo m (TcAttributes cenv env) valSynInfo
-
-
-                // Fold in the optional arugment information 
-                // Resort to using the syntactic arugment information since that is what tells us 
-                // what is optional and what is not. 
-                let ty' = 
-
-                    if SynInfo.HasOptionalArgs valSynInfo then 
-                        let argtysl,returnTy = GetTopTauTypeInFSharpForm cenv.g argsData ty' m
-                        let argtysl = 
-                            (List.zip (List.mapSquared fst argtysl) valSynInfo.ArgInfos) 
-                            |> List.map (fun (argtys,argInfos) ->
-                                 (List.zip argtys argInfos)
-                                 |> List.map (fun (argty,argInfo) ->
-                                     if SynInfo.IsOptionalArg argInfo then mk_option_ty cenv.g argty
-                                     else argty))
-                        mk_iterated_fun_ty (List.map (mk_tupled_ty cenv.g) argtysl) returnTy
-                    else ty' 
-                        
-                let memberInfoOpt,id = 
-                    match memberContainerInfo with 
-                    | Some(tcref) -> 
-                        let isExtrinsic = (declKind = ExtrinsicExtensionBinding)
-                        let memberInfo,id = MkMemberDataAndUniqueId(cenv.g,tcref,isExtrinsic,attrs',[],memberFlags,valSynInfo,id)
-                        Some(memberInfo),id
-                    | None -> 
-                        None,id
-            
-                ValSpecResult(altActualParent,memberInfoOpt,id,enclosingDeclaredTypars,declaredTypars,ty',partialTopValInfo,declKind)
-
-            [ yield reallyGenerateOneMember(id,valSynInfo,ty',memberFlags)
-              if CompileAsEvent cenv.g attrs' then 
-                    let valSynInfo = EventDeclarationNormalization.ConvertSynInfo m valSynInfo
-                    let memberFlags = EventDeclarationNormalization.ConvertMemberFlags memberFlags
-                    let delTy = FindDelegateTypeOfPropertyEvent cenv.g cenv.amap id.idText m declaredTy 
-                    let ty = 
-                       if memberFlags.MemberIsInstance then 
-                         thisTy --> (delTy --> cenv.g.unit_ty)
-                       else 
-                         (delTy --> cenv.g.unit_ty)
-                    yield reallyGenerateOneMember(ident("add_"^id.idText,id.idRange),valSynInfo,ty,memberFlags)
-                    yield reallyGenerateOneMember(ident("remove_"^id.idText,id.idRange),valSynInfo,ty,memberFlags) ]
-                
-              
-            
-        match memberFlags.MemberKind with 
-        | MemberKindClassConstructor
-        | MemberKindConstructor
-        | MemberKindMember 
-        | MemberKindPropertyGet 
-        | MemberKindPropertySet ->
-            generateOneMember(memberFlags), tpenv
-        | MemberKindPropertyGetSet ->
-            [ yield! generateOneMember({memberFlags with MemberKind=MemberKindPropertyGet});
-              yield! generateOneMember({memberFlags with MemberKind=MemberKindPropertySet}); ], tpenv
-    | _ ->
-        let valSynInfo = AdjustValSynInfoInSignature cenv.g declaredTy valSynInfo
-        let partialTopValInfo = TranslateTopValSynInfo m (TcAttributes cenv env) valSynInfo
-        [ ValSpecResult(altActualParent,None,id,enclosingDeclaredTypars,declaredTypars,declaredTy,partialTopValInfo,declKind) ], tpenv
-
-
-(*-------------------------------------------------------------------------
- * Bind types 
- *------------------------------------------------------------------------- *)
-
-/// Check and elaborate a type or measure parameter occurrence
-/// If optKind=Some kind, then this is the kind we're expecting (we're in *analysis* mode)
-/// If optKind=None, we need to determine the kind (we're in *synthesis* mode)
-///
-and TcTyparOrMeasurePar optKind cenv env newOk tpenv (Typar(id,_,_) as tp) =
-    let checkRes (res:Typar) =
-        match optKind, res.Kind with
-        | Some KindMeasure, KindType -> error (Error("Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [] attribute", id.idRange)); res, tpenv
-        | Some KindType, KindMeasure -> error (Error("Expected type parameter, not unit-of-measure parameter", id.idRange)); res, tpenv
-        | _, _ -> res, tpenv
-    let key = id.idText
-    match Map.tryfind key env.eNameResEnv.eTypars with
-    | Some res -> checkRes res
-    | None -> 
-    match TryFindUnscopedTypar key tpenv with
-    | Some res -> checkRes res
-    | None -> 
-        if newOk = NoNewTypars then error (UndefinedName(0,"type parameter",id,[""]));
-        // OK, this is an implicit declaration of a type parameter 
-        // The kind defaults to Type
-        let tp' = NewTypar ((match optKind with None -> KindType | Some kind -> kind), TyparWarnIfNotRigid,tp,false,DynamicReq,[])
-        tp',AddUnscopedTypar key tp' tpenv
-
-and TcTypar cenv env newOk tpenv tp =
-    TcTyparOrMeasurePar (Some KindType) cenv env newOk tpenv tp
-
-and TcTyparDecl cenv env (TyparDecl(attrs,(Typar(id,_,_) as tp))) =
-    let attrs' = TcAttributes cenv env attrTgtGenericParameter  attrs
-    let hasMeasureAttr = HasAttrib cenv.g cenv.g.attrib_MeasureAttribute attrs'
-    let attrs' = attrs' |> List.filter (IsMatchingAttrib cenv.g cenv.g.attrib_MeasureAttribute >> not)
-    NewTypar ((if hasMeasureAttr then KindMeasure else KindType), TyparWarnIfNotRigid,tp,false,DynamicReq,attrs')
-
-and TcTyparDecls cenv env synTypars = List.map (TcTyparDecl cenv env) synTypars
-
-/// Check and elaborate a syntactic type or measure
-/// If optKind=Some kind, then this is the kind we're expecting (we're in *analysis* mode)
-/// If optKind=None, we need to determine the kind (we're in *synthesis* mode)
-///
-and TcTypeOrMeasure optKind cenv newOk checkCxs env (tpenv:SyntacticUnscopedTyparEnv) ty =
-    if verbose then  dprintf "--> tc_t ype@%a\n" output_range (range_of_syntype ty); 
-
-    match ty with 
-    | Type_lid(tc,m) -> 
-        let ad = AccessRightsOfEnv env
-        let tcref = ForceRaise(ResolveTypeLongIdent cenv.nameResolver ItemOccurence.Use OpenQualified env.eNameResEnv ad tc 0)
-        //if tcref_eq cenv.g tcref cenv.g.system_IndexOutOfRangeException_tcref then 
-        //    warning(IndexOutOfRangeExceptionWarning(m)); 
-        match optKind, tcref.TypeOrMeasureKind with
-        | Some KindType, KindMeasure ->
-          error(Error("Expected type, not unit-of-measure", m)); 
-          new_error_typ cenv (), tpenv
-        | Some KindMeasure, KindType ->
-          error(Error("Expected unit-of-measure, not type", m)); 
-          TType_measure (new_error_measure cenv ()), tpenv
-        | _, KindMeasure ->
-          TType_measure (MeasureCon tcref), tpenv
-        | _, KindType ->
-          TcTypeApp cenv newOk checkCxs env tpenv m tcref [] []
-
-    | Type_app (Type_lid(tc,_),args,postfix,m) -> 
-        let ad = AccessRightsOfEnv env
-        let tcref = ForceRaise(ResolveTypeLongIdent cenv.nameResolver ItemOccurence.Use OpenQualified env.eNameResEnv ad tc (List.length args))
-        //if tcref_eq cenv.g tcref cenv.g.system_IndexOutOfRangeException_tcref then 
-        //    warning(IndexOutOfRangeExceptionWarning(m)); 
-        match optKind, tcref.TypeOrMeasureKind with
-        | Some KindType, KindMeasure ->
-          error(Error("Expected type, not unit-of-measure", m)); 
-          new_error_typ cenv (), tpenv
-        | Some KindMeasure, KindType ->
-          error(Error("Expected unit-of-measure, not type", m)); 
-          TType_measure (new_error_measure cenv ()), tpenv
-        | _, KindType ->
-          if postfix && tcref.Typars(m) |> List.exists (fun tp -> match tp.Kind with KindMeasure -> true | _ -> false) 
-          then error(Error("Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets", m));
-          TcTypeApp cenv newOk checkCxs env tpenv m tcref [] args 
-        | _, KindMeasure ->
-          match args,postfix with
-            [arg], true ->
-            let ms,tpenv = TcMeasure cenv newOk checkCxs env tpenv arg m
-            TType_measure (MeasureProd(MeasureCon tcref, ms)), tpenv
-            
-          | _, _ ->
-            errorR(Error("Unit-of-measure cannot be used in type constructor application", m));
-            new_error_typ cenv (), tpenv          
-
-    | Type_proj_then_app (ltyp,lid,args,m) -> 
-        let ad = AccessRightsOfEnv env
-        let ltyp,tpenv = TcType cenv newOk checkCxs env tpenv ltyp
-        if not (is_stripped_tyapp_typ cenv.g ltyp) then error(Error("This type has no nested types",m));
-        let tcref,tinst = dest_stripped_tyapp_typ cenv.g ltyp
-        let tcref = ResolveTypeLongIdentInType cenv.nameResolver env.eNameResEnv (ResolveTypeNamesToTypeRefs,Some(List.length args)) ad m tcref lid 
-        TcTypeApp cenv newOk checkCxs env tpenv m tcref tinst args 
-
-    | Type_tuple(args,m) ->
-        match optKind with
-          Some KindMeasure ->
-          let ms,tpenv = TcMeasuresAsTuple cenv newOk checkCxs env tpenv args m
-          TType_measure ms,tpenv
-
-        | _ ->
-          let args',tpenv = TcTypesAsTuple cenv newOk checkCxs env tpenv args m
-          TType_tuple(args'),tpenv
-
-    | Type_fun(domainTy,resultTy,m) -> 
-        let domainTy',tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv domainTy
-        let resultTy',tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv resultTy
-        (domainTy' --> resultTy'), tpenv
-
-    // Deprecated OCaml-compat generic record field type
-    | Type_forall (td,resultTy,m) -> 
-        (* note: no constraints allowed here *)
-        let tp' = TcTyparDecl cenv env td
-        SetTyparRigid cenv.g env.DisplayEnv m tp';
-        let resultTy',tpenv = TcTypeAndRecover cenv newOk checkCxs (AddDeclaredTypars NoCheckForDuplicateTypars [tp'] env) tpenv resultTy
-        ([tp'] +-> resultTy'), tpenv
-
-    | Type_arr (n,elemTy,m) -> 
-        let elemTy,tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv elemTy
-        mk_multi_dim_array_typ cenv.g n elemTy, tpenv
-
-    | Type_lazy (elemTy,m) -> 
-        let elemTy,tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv elemTy
-        mk_lazy_ty cenv.g elemTy, tpenv
-
-    | Type_var (tp,m) -> 
-        let tp',tpenv = TcTyparOrMeasurePar optKind cenv env newOk tpenv tp
-        match tp'.Kind with
-        | KindMeasure -> TType_measure (MeasureVar tp'), tpenv
-        | KindType -> mk_typar_ty tp',tpenv
-
-    | Type_anon m ->           (* _ *)
-        let tp:Typar = TcAnonTypeOrMeasure optKind cenv TyparAnon NoDynamicReq newOk m
-        match tp.Kind with
-        | KindMeasure -> TType_measure (MeasureVar tp), tpenv
-        | KindType -> mk_typar_ty tp,tpenv
-
-    | Type_with_global_constraints(ty,wcs,m) ->
-        let cty,tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv ty
-        let tpenv = TcTyparConstraints cenv newOk checkCxs env tpenv wcs
-        cty,tpenv
-
-    | Type_anon_constraint(ty,m) ->  (* #typ *)
-        let tp' = TcAnonTypeOrMeasure (Some KindType) cenv TyparWarnIfNotRigid DynamicReq newOk m
-        let ty',tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv ty
-        AddCxTypeMustSubsumeType env.DisplayEnv cenv.css m NoTrace  ty' (mk_typar_ty tp') ;
-        TType_var tp', tpenv
-
-    | Type_dimensionless m ->
-        match optKind with
-          Some KindType -> 
-          errorR(Error("Unexpected integer literal in type expression", m)); 
-          new_error_typ cenv (), tpenv
-        | _ -> 
-          TType_measure MeasureOne, tpenv
-
-    | Type_power(typ, exponent, m) ->
-        match optKind with
-          Some KindType -> 
-          errorR(Error("Unexpected ^ in type expression", m)); 
-          new_error_typ cenv (), tpenv
-        | _ ->          
-          let ms,tpenv = TcMeasure cenv newOk checkCxs env tpenv typ m
-          TType_measure (Tastops.MeasurePower ms exponent), tpenv
-
-    | Type_quotient(typ1, typ2, m) -> 
-        match optKind with
-          Some KindType -> 
-          errorR(Error("Unexpected / in type expression", m)); 
-          new_error_typ cenv (), tpenv
-        | _ ->
-          let ms1,tpenv = TcMeasure cenv newOk checkCxs env tpenv typ1 m
-          let ms2,tpenv = TcMeasure cenv newOk checkCxs env tpenv typ2 m
-          TType_measure (MeasureProd(ms1,MeasureInv ms2)), tpenv
-
-    | Type_app((Type_var(_,m1) | Type_power(_,_,m1)) as arg1,args,postfix,m) ->
-        match optKind, args, postfix with
-        | (None | Some KindMeasure), [arg2], true ->
-          let ms1,tpenv = TcMeasure cenv newOk checkCxs env tpenv arg1 m1
-          let ms2,tpenv = TcMeasure cenv newOk checkCxs env tpenv arg2 m
-          TType_measure (MeasureProd(ms1, ms2)), tpenv
-
-        | _, _, _ ->
-          errorR(Error("Type parameter cannot be used as type constructor", m)); 
-          new_error_typ cenv (), tpenv
-
-    | Type_app(_, _, _, m) ->
-        errorR(Error("Illegal syntax in type expression", m));
-        new_error_typ cenv (), tpenv
-
-and TcType cenv newOk checkCxs env (tpenv:SyntacticUnscopedTyparEnv) ty = 
-    TcTypeOrMeasure (Some KindType) cenv newOk checkCxs env tpenv ty
-
-and TcMeasure cenv newOk checkCxs env (tpenv:SyntacticUnscopedTyparEnv) ty m = 
-    match ty with
-    | Type_anon m ->
-      error(Error("Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression", m));
-      new_error_measure cenv (), tpenv
-    | _ ->
-      match TcTypeOrMeasure (Some KindMeasure) cenv newOk checkCxs env tpenv ty with
-      | TType_measure ms, tpenv -> ms,tpenv
-      | _, _ -> 
-        error(Error("Expected unit-of-measure, not type", m)); 
-        new_error_measure cenv (), tpenv
-
-
-and TcAnonTypeOrMeasure optKind cenv rigid dyn newOk m =
-    if newOk = NoNewTypars then errorR (Error("anonymous type variables are not permitted in this declaration",m));
-    let rigid = (if rigid = TyparAnon && newOk = NewTyparsOKButWarnIfNotRigid then TyparWarnIfNotRigid else rigid)
-    let kind = match optKind with Some KindMeasure -> KindMeasure | _ -> KindType
-    new_anon_inference_var cenv (kind,m,rigid,NoStaticReq,dyn)
- 
-and TcTypes cenv newOk checkCxs env tpenv args =
-    List.mapfold (TcTypeAndRecover cenv newOk checkCxs env) tpenv args 
-
-and TcTypesAsTuple cenv newOk checkCxs env tpenv args m = 
-    match args with
-    | [] -> error(InternalError("empty tuple type",m))
-    | [(_,typ)] -> let typ,tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv typ in [typ],tpenv
-    | (isquot,typ)::args -> 
-      let ty,tpenv = TcTypeAndRecover cenv newOk checkCxs env tpenv typ
-      let tys,tpenv = TcTypesAsTuple cenv newOk checkCxs env tpenv args m
-      if isquot then errorR(Error("Unexpected / in type",m));
-      ty::tys,tpenv
-
-// Type-check a list of measures separated by juxtaposition, * or /
-and TcMeasuresAsTuple cenv newOk checkCxs env (tpenv:SyntacticUnscopedTyparEnv) args m = 
-  let rec gather args tpenv isquot acc =
-    match args with
-    | [] -> acc,tpenv
-    | (nextisquot,typ)::args -> 
-      let ms1,tpenv = TcMeasure cenv newOk checkCxs env tpenv typ m
-      gather args tpenv nextisquot (if isquot then MeasureProd(acc,MeasureInv ms1) else MeasureProd(acc,ms1))
-  gather args tpenv false MeasureOne
-
-
-and TcTypesOrMeasures optKinds cenv newOk checkCxs env tpenv args m =
-    match optKinds with
-      None ->
-      List.mapfold (TcTypeOrMeasure None cenv newOk checkCxs env) tpenv args
-    | Some kinds ->
-      if List.length kinds = List.length args
-      then List.mapfold (fun tpenv (arg,kind) -> TcTypeOrMeasure (Some kind) cenv newOk checkCxs env tpenv arg) tpenv (List.zip args kinds)
-      else if kinds.Length = 0
-      then error(Error("Unexpected type arguments", m))
-      else error(Error(sprintf "Expected %d type parameter(s) but was given %d" (List.length kinds) (List.length args), m))
-
-and TcTyparConstraints cenv newOk checkCxs env tpenv wcs =
-    (* Mark up default constraints with a priority in reverse order: last gets 0, second last gets 1 etc. See comment on TTyparDefaultsToType *)
-    let _,tpenv = List.fold (fun (ridx,tpenv) tc -> ridx - 1, TcTyparConstraint ridx cenv newOk checkCxs env tpenv tc) (List.length wcs - 1, tpenv) wcs
-    tpenv
-
-// Note the args may only be the instantation of a suffix of the tps. In this case, pathTypeArgs should 
-// contain the right instantation for the prefix. However we have to check that the right number of arguments 
-// are given!
-and TcTypeApp cenv newOk checkCxs env tpenv m tcref pathTypeArgs args =
-    CheckTyconAccessible m (AccessRightsOfEnv env) tcref |> ignore;
-    CheckEntityAttributes cenv.g tcref m |> CommitOperationResult;
-    let tps,inst,tinst,gtyp = info_of_tcref cenv m env tcref
-    // If we're not checking constraints, i.e. when we first assert the super/interfaces of a type definition, then just 
-    // clear the constaint lists of the freshly generated type variables. A little ugly but fairly localized. 
-    if checkCxs = NoCheckCxs then tps |> List.iter (fun tp -> tp.Data.typar_constraints <- []);
-    if tinst.Length <> pathTypeArgs.Length + args.Length then 
-        error (TyconBadArgs(env.DisplayEnv,tcref,pathTypeArgs.Length + args.Length,m));
-    let args',tpenv = 
-        // Get the suffix of typars
-        let tpsForArgs = List.drop (tps.Length - args.Length) tps
-        let kindsForArgs = tpsForArgs |> List.map (fun tp -> tp.Kind)
-        TcTypesOrMeasures (Some kindsForArgs) cenv newOk checkCxs env tpenv args m
-    let args' = pathTypeArgs @ args'
-    List.iter2 (unifyE cenv env m) tinst args';
-    TType_app(tcref,args'),tpenv
-    
-and TcTypeOrMeasureAndRecover optKind cenv newOk checkCxs env tpenv ty   =
-    try TcTypeOrMeasure optKind cenv newOk checkCxs env tpenv ty 
-    with e -> 
-        errorRecovery e (range_of_syntype ty); 
-        (if newOk <> NoNewTypars then new_error_typ cenv () else cenv.g.obj_ty),tpenv 
-
-and TcTypeAndRecover cenv newOk checkCxs env tpenv ty   =
-    TcTypeOrMeasureAndRecover (Some KindType) cenv newOk checkCxs env tpenv ty
-
-and TcNestedTypeApplication cenv newOk checkCxs env tpenv m typ tyargs =
-    if not (is_stripped_tyapp_typ cenv.g typ) then error(Error("This type has no nested types",m));
-    match typ with 
-    | TType_app(tcref,tinst) -> 
-        let pathTypeArgs,_ = List.chop (max (tinst.Length - tcref.Typars(m).Length) 0) tinst
-        TcTypeApp cenv newOk checkCxs env tpenv m tcref pathTypeArgs tyargs 
-    | _ -> error(InternalError("TcNestedTypeApplication: expected type application",m))
-
-
-/// Bind the patterns used in a lambda. Not clear why we don't use TcPat.
-and TcSimplePat optArgsOK cenv ty env (tpenv,names,takenNames) p = 
-    match p with 
-    | SPat_as (id,compgen,isMemberThis,isOpt,m) -> 
-        if isOpt && not optArgsOK then errorR(Error("optional arguments are only permitted on type members",m));
-        if isOpt then 
-            let tyarg = new_inference_typ cenv ()
-            unifyE cenv env m ty (mk_option_ty cenv.g tyarg);
-                
-        let _,names,takenNames = TcPatBindingName cenv env id ty isMemberThis None None (OptionalInline,permitInferTypars,noArgOrRetAttribs,false,None,compgen) (names,takenNames)
-        id.idText, 
-        (tpenv,names,takenNames)
-
-    | SPat_typed (p,cty,m) ->
-        let cty',tpenv = TcTypeAndRecover cenv NewTyparsOK CheckCxs env tpenv cty
-        match p with 
-        // Optional arguments on members 
-        | SPat_as(_,_,_,true,_) -> unifyE cenv env m ty (mk_option_ty cenv.g cty');
-        | _ -> unifyE cenv env m ty cty';
-
-        TcSimplePat optArgsOK cenv ty env (tpenv,names,takenNames) p
-
-    | SPat_attrib (p,_,m) ->
-        TcSimplePat optArgsOK cenv ty env (tpenv,names,takenNames) p
-
-/// Bind the patterns used in argument position for a function, method or lambda. 
-and TcSimplePats cenv optArgsOK  ty env (tpenv,names,takenNames:Set<_>) p = 
-    match p with 
-    | SPats ([],m) -> 
-        // Unit "()" patterns in argument position become SPats([],_) in the
-        // syntactic translation when building bindings. This is done because the
-        // use of "()" has special significance for arity analysis and argument counting.
-        //
-        // Here we give a name to the single argument implied by those patterns.
-        // This is a little awkward since it would be nice if this was
-        // uniform with the process where we give names to other (more complex)
-        // patterns used in argument position, e.g. "let f (D(x)) = ..."
-        let id = ident("unitVar"^string takenNames.Count,m)
-        unifyE cenv env m ty cenv.g.unit_ty;
-        let _,names,takenNames = TcPatBindingName cenv env id ty false None None (OptionalInline,permitInferTypars,noArgOrRetAttribs,false,None,true) (names,takenNames)
-        [id.idText],(tpenv,names,takenNames)
-
-    | SPats ([p],m) -> 
-        let v,(tpenv,names,takenNames) = TcSimplePat optArgsOK cenv ty env (tpenv,names,takenNames) p
-        [v],(tpenv,names,takenNames)
-
-    | SPats (ps,m) -> 
-        let ptys = UnifyTupleType cenv env.DisplayEnv m ty ps
-        let ps',(tpenv,names,takenNames) = List.mapfold (fun tpenv (ty,e) -> TcSimplePat optArgsOK cenv ty env tpenv e) (tpenv,names,takenNames) (List.zip ptys ps)
-        ps',(tpenv,names,takenNames)
-
-    | SPats_typed (p,cty,m) ->
-        let cty',tpenv = TcTypeAndRecover cenv NewTyparsOK CheckCxs env tpenv cty
-
-        match p with 
-        // Solitary optional arguments on members 
-        | SPats([SPat_as(_,_,_,true,_)],_) -> unifyE cenv env m ty (mk_option_ty cenv.g cty');
-        | _ -> unifyE cenv env m ty cty';
-
-        TcSimplePats cenv optArgsOK  ty env (tpenv,names,takenNames) p
-
-and TcPatBindingName cenv env id ty isMemberThis vis1 topValData (inlineFlag,declaredTypars,argAttribs,mut,vis2,compgen) (names,takenNames:Set) = 
-    let vis = if isSome vis1 then vis1 else vis2
-    if takenNames.Contains id.idText then errorR (VarBoundTwice id);
-    let baseOrThis = if isMemberThis then MemberThisVal else NormalVal
-    let names = Map.add id.idText (PrelimValScheme1(id,declaredTypars,ty,topValData,None,mut,inlineFlag,baseOrThis,argAttribs,vis,compgen)) names
-    let takenNames = Set.add id.idText takenNames
-    (fun (TcPatPhase2Input values) -> 
-        let (vspec,typeScheme) = 
-            match Map.tryfind id.idText values with
-            | Some x -> x
-            | None -> error(Error("Name "^id.idText^" not bound in pattern context",id.idRange))
-        PBind(vspec,typeScheme)),
-    names,takenNames
-
-/// Typecheck a pattern. Patterns are type-checked in three phases: 
-/// 1. TcPat builds a List.map from simple variable names to inferred types for 
-///   those variables. It also returns a function to perform the second phase.
-/// 2. The second phase assumes the caller has built the actual value_spec's 
-///    for the values being defined, and has decided if the types of these 
-///    variables are to be generalized. The caller hands this information to
-///    the second-phase function in terms of a List.map from names to actual
-///    value specifications. 
-and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv,names,takenNames) ty pat = 
-    let ad = AccessRightsOfEnv env
-    if verbose then  dprintf "--> TcPat@%a\n" output_range (range_of_synpat pat);
-    match pat with 
-    | Pat_const (c,m) -> 
-        match c with 
-        | Const_bytearray (bytes,m) -> 
-            unifyE cenv env m ty (mk_bytearray_ty cenv.g); 
-            TcPat warnOnUpper cenv env None vFlags (tpenv,names,takenNames) ty (Pat_array_or_list (true,[ for b in bytes -> Pat_const(Const_uint8 b,m) ],m))
-        | Const_bignum _ -> 
-            error(Error("Non-primitive numeric literal constants may not be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when  = ' at the end of the match clause",m))
-        | _ -> 
-            let c' = TcConst cenv ty m env c
-            (fun (_:TcPatPhase2Input) -> TPat_const(c',m)),(tpenv,names,takenNames)
-        
-    | Pat_wild m ->
-        (fun _ -> TPat_wild m), (tpenv,names,takenNames)
-
-    | Pat_isinst(cty,m) 
-    | Pat_as (Pat_isinst(cty,m),_,_,_,_) -> 
-        let srcTy = ty
-        let tgty,tpenv = TcTypeAndRecover cenv NewTyparsOKButWarnIfNotRigid CheckCxs env tpenv cty
-        TcRuntimeTypeTest cenv env.DisplayEnv m tgty srcTy;
-        match pat with 
-        | Pat_isinst(cty,m) ->
-            (fun _ -> TPat_isinst (srcTy,tgty,None,m)),(tpenv,names,takenNames)
-        | Pat_as (Pat_isinst(cty,_),id,isMemberThis,vis,m) -> 
-            let bindf,names,takenNames = TcPatBindingName cenv env id tgty isMemberThis vis None vFlags (names,takenNames)
-            (fun values -> TPat_isinst (srcTy,tgty,Some(bindf values),m)),
-            (tpenv,names,takenNames)
-        | _ -> failwith "TcPat"
-
-    | Pat_opt_var (_,m) -> 
-        error(Error("optional arguments are only permitted on type members",m))
-
-    | Pat_as (p,id,isMemberThis,vis,m) -> 
-        let bindf,names,takenNames = TcPatBindingName cenv env id ty isMemberThis vis topValInfo vFlags (names,takenNames)
-        let pat',acc = TcPat warnOnUpper cenv env None vFlags (tpenv,names,takenNames) ty p
-        (fun values -> TPat_as (pat' values,bindf values,m)), 
-        acc
-
-    | Pat_typed (p,cty,m) ->
-        let cty',tpenv = TcTypeAndRecover cenv NewTyparsOK CheckCxs env tpenv cty
-        unifyE cenv env m ty cty';
-        TcPat warnOnUpper cenv env topValInfo vFlags (tpenv,names,takenNames) ty p
-
-    | Pat_attrib (p,attrs,m) ->
-        error(Error("Attributes are not allowed within patterns",m));
-        //let attrs' = TcAttributes cenv env attrTgtBinding  attrs
-        //TcPat warnOnUpper cenv env None vFlags (tpenv,names,takenNames) ty p
-
-    | Pat_disj (pat1,pat2,m) ->
-        let pat1',(tpenv,names1,takenNames1) = TcPat warnOnUpper cenv env None vFlags (tpenv,names,takenNames) ty pat1
-        let pat2',(tpenv,names2,takenNames2) = TcPat warnOnUpper cenv env None vFlags (tpenv,names,takenNames) ty pat2
-        if not (takenNames1 = takenNames2) then
-          // We don't try to recover from this error since we get later bad internal errors during pattern
-          // matching 
-          error (UnionPatternsBindDifferentNames m);
-        names1 |> Map.iter (fun u (PrelimValScheme1(id1,_,ty1,_,_,_,_,_,_,_,_)) -> 
-          match Map.tryfind id1.idText names2 with 
-          | None -> () 
-          | Some (PrelimValScheme1(id2,_,ty2,_,_,_,_,_,_,_,_)) -> 
-              unifyE cenv env m ty1 ty2);
-        (fun values -> TPat_disjs ([pat1' values;pat2' values],m)), (tpenv,names1,takenNames1)
-
-    | Pat_conjs (pats,m) ->
-        let pats',acc = TcPatterns warnOnUpper cenv env vFlags (tpenv,names,takenNames) (List.map (fun pat -> ty) pats) pats
-        (fun values -> TPat_conjs(List.map (fun f -> f values) pats',m)), acc
-
-    | Pat_lid (lid,tyargs,args,vis,m) ->
-        if isSome tyargs then errorR(Error("Type arguments may not be specified here",m));
-        let warnOnUpper = if isNil args then warnOnUpper else AllIdsOK
-        begin match ResolvePatternLongIdent cenv.nameResolver warnOnUpper false m ad env.eNameResEnv DefaultTypeNameResInfo lid with
-        | Item_newdef id -> 
-          match args with 
-          | [] -> TcPat warnOnUpper cenv env topValInfo vFlags (tpenv,names,takenNames) ty (mksyn_pat_var vis id)
-          | _ -> error (UndefinedName(0,"pattern discriminator",id,[]))
-
-        | Item_apelem(APElemRef(apinfo,vref,idx) as apref) as item -> 
-            (* TOTAL/PARTIAL ACTIVE PATTERNS *)
-            let vexp, _,_, _ = TcVal cenv env tpenv vref None m
-            let vexp = MkApplicableExprWithFlex cenv env vexp
-            let vexpty = vexp.Type
-
-            let exprargs,patarg = match args with | [x] -> [],x | [] -> [],Pat_const(Const_unit,m) | _ -> List.frontAndBack args
-            if nonNil exprargs && List.length (names_of_apinfo apinfo) <> 1 then 
-                error(Error("Only active patterns returning exactly one result may accept arguments.",m));
-            (* if nonNil exprargs then warning(Experimental("The syntax for parameterized active patterns is under review and may change in a future release",m)); *)
-
-            (* Note we parse arguments to parameterized pattern labels as patterns, not expressions. *)
-            (* This means the range of syntactic expression forms that can be used here is limited. *)
-            let rec convSynPatToSynExpr x = 
-                match x with
-                | Pat_const (c,m) -> Expr_const(c,m)
-                | Pat_as (Pat_wild _,id,_,None,m) -> Expr_id_get(id)
-                | Pat_typed (p,cty,m) -> Expr_typed (convSynPatToSynExpr p,cty,m)
-                | Pat_lid (lid,tyargs,args,None,m) -> List.fold (fun f x -> Expr_app(ExprAtomicFlag.NonAtomic, f,convSynPatToSynExpr x,m)) (Expr_lid_get(false,lid,m)) args
-                | Pat_tuple (args,m) -> Expr_tuple(List.map convSynPatToSynExpr args,m)
-                | Pat_paren (p,m) -> convSynPatToSynExpr p
-                | Pat_array_or_list (isArray,args,m) -> Expr_array_or_list(isArray,List.map convSynPatToSynExpr args,m)
-                | Pat_expr (e,m) -> e
-                | Pat_null m -> Expr_null(m)
-                | _ -> error(Error("Invalid argument to parameterized pattern label",range_of_synpat x))
-            let exprargs = List.map convSynPatToSynExpr exprargs
-
-            let restys = new_inference_typs cenv (names_of_apinfo apinfo)
-            let act_pat_ty = mk_apinfo_typ cenv.g m apinfo ty restys 
-
-            let pexprty = new_inference_typ cenv ()
-            let pexp, tpenv = PropagateThenTcDelayed cenv act_pat_ty env tpenv m vexp vexpty ExprAtomicFlag.NonAtomic (List.map (fun e -> DelayedApp(ExprAtomicFlag.NonAtomic,e,range_of_synexpr e)) exprargs)
-
-            if idx >= restys.Length then error(Error("intenal error: Invalid index into active pattern array",m));
-            let argty = List.nth restys idx 
-                
-            let arg',(tpenv,names,takenNames) = TcPat warnOnUpper cenv env None vFlags (tpenv,names,takenNames) argty patarg
-            (* If there are any expression args then we've lost identity. *)
-            let identityVrefOpt = (if nonNil exprargs then None else Some vref)
-            (fun values -> 
-                // Report information about the 'active recognizer' occurence to IDE
-                CallNameResolutionSink(range_of_lid lid,nenv_of_tenv env,item,ItemOccurence.Pattern,env.DisplayEnv,AccessRightsOfEnv env)
-                TPat_query((pexp, restys, identityVrefOpt,idx,apinfo), arg' values, m)), 
-            (tpenv,names,takenNames)
-
-        | (Item_ucase _ | Item_ecref _) as item ->
-            (* DATA MATCH CONSTRUTORS *)
-            let mkf,argtys = pat_constr_unify m cenv env ty item
-            let nargtys = argtys.Length
-            let args = 
-              match args with 
-              | []-> []
-              (* note: the next will always be parenthesized *)
-              | [(Pat_tuple (args,m)) | Pat_paren(Pat_tuple (args,m),_)] when nargtys > 1 -> args
-
-              (* note: like OCaml we allow both 'C _' and 'C (_)' regardless of number of argument of the pattern *)
-              | [(Pat_wild m as e) | Pat_paren(Pat_wild m as e,_)] -> Array.to_list (Array.create nargtys e)
-              | [arg] -> [arg] 
-              | _ when nargtys = 0 -> error(Error("This union case does not take arguments",m)) 
-              | _ when nargtys = 1 -> error(Error("This union case takes one argument",m)) 
-              | _ -> error(Error("This union case expects "^string nargtys^" arguments in tupled form",m))
-            gen_constr_check env nargtys args.Length m;
-            let args',acc = TcPatterns warnOnUpper cenv env vFlags (tpenv,names,takenNames) argtys args
-            (fun values -> 
-                // Report information about the case occurence to IDE
-                CallNameResolutionSink(range_of_lid lid,nenv_of_tenv env,item,ItemOccurence.Pattern,env.DisplayEnv,AccessRightsOfEnv env)
-                mkf(List.map (fun f -> f values) args')), acc
-                
-        | Item_il_field finfo ->
-            (* LITERAL .NET FIELDS *)
-            CheckILFieldInfoAccessible cenv.g cenv.amap m (AccessRightsOfEnv env) finfo;
-            if not finfo.IsStatic then errorR (Error (sprintf "field '%s' is not static" finfo.FieldName,m));
-            CheckILFieldAttributes cenv.g finfo m;
-            match finfo.LiteralValue with 
-            | None -> error (Error("this field is not a literal and cannot be used in a pattern", m));
-            | Some lit -> 
-                unifyE cenv env m ty (FieldTypeOfILFieldInfo cenv.amap m finfo);
-                let c' = TcFieldInit m lit
-                (fun _ -> TPat_const (c',m)),(tpenv,names,takenNames)             
-            
-        | Item_recdfield rfinfo ->
-            (* LITERAL F# FIELDS *)
-            CheckRecdFieldInfoAccessible m (AccessRightsOfEnv env) rfinfo;
-            if not rfinfo.IsStatic then errorR (Error (sprintf "field '%s' is not static" rfinfo.Name,m));
-            CheckRecdFieldInfoAttributes cenv.g rfinfo m  |> CommitOperationResult;        
-            match rfinfo.LiteralValue with 
-            | None -> error (Error("this field is not a literal and cannot be used in a pattern", m));
-            | Some lit -> 
-                unifyE cenv env m ty rfinfo.FieldType;
-                (fun _ -> TPat_const (lit,m)),(tpenv,names,takenNames)             
-
-        | Item_val vref ->
-            match vref.LiteralValue with 
-            | None -> error (Error("this value is not a literal and cannot be used in a pattern", m));
-            | Some lit -> 
-                let (vexp,_,vexpty,_) = TcVal cenv env tpenv vref None m
-                CheckValAccessible m (AccessRightsOfEnv env) vref;
-                CheckFSharpAttributes cenv.g vref.Attribs m |> CommitOperationResult;
-                unifyE cenv env m ty vexpty;
-                (fun _ -> TPat_const (lit,m)),(tpenv,names,takenNames)             
-
-        |  _ -> error (Error("this is not a variable, constant, active recognizer or literal",m))
-        end
-
-    | Pat_expr(exp,m) -> error (Error("this is not a valid pattern",m))
-          
-    | Pat_tuple (args,m) ->
-        let argtys = new_inference_typs cenv args
-        unifyE cenv env m ty (TType_tuple argtys);
-        let args',acc = TcPatterns warnOnUpper cenv env vFlags (tpenv,names,takenNames) argtys args
-        (fun values -> TPat_tuple(List.map (fun f -> f values) args',argtys,m)), acc
-
-    | Pat_paren (p,m) ->
-        TcPat warnOnUpper cenv env None vFlags (tpenv,names,takenNames) ty p
-
-    | Pat_array_or_list (isArray,args,m) ->
-        let argty = new_inference_typ cenv ()
-        unifyE cenv env m ty (if isArray then mk_array_typ cenv.g argty else Tastops.mk_list_ty cenv.g argty);
-        let args',acc = TcPatterns warnOnUpper cenv env vFlags (tpenv,names,takenNames) (List.map (fun _ -> argty) args) args
-        (fun values -> 
-            let args' = List.map (fun f -> f values) args'
-            if isArray then TPat_array(args', argty, m)
-            else List.foldBack (mk_cons_pat cenv.g argty) args' (mk_nil_pat cenv.g m argty)), acc
-
-    | Pat_recd (flds,m) ->
-        let tcref,fldsmap,fldsList (* REVIEW: use this *) = BuildFieldMap cenv env true ty flds m
-        (* REVIEW: use fldsList to type check pattern in code order not field defn order *) 
-        let _,inst,tinst,gtyp = info_of_tcref cenv m env tcref
-        unifyE cenv env m ty gtyp;
-        let fields = tcref.TrueInstanceFieldsAsList
-        let ftys = List.map (fun fsp -> FreshenPossibleForallTy cenv.g m TyparFlexible (typ_of_rfield inst fsp),fsp) fields
-        let fldsmap',acc = 
-          List.mapfold 
-            (fun s ((_,ftinst,ty),fsp) -> 
-              if Map.mem fsp.rfield_id.idText  fldsmap then 
-                let f,s = TcPat warnOnUpper cenv env None vFlags s ty (Map.find fsp.rfield_id.idText fldsmap)
-                (ftinst,f),s
-              else ([],(fun values -> TPat_wild m)),s)
-            (tpenv,names,takenNames)
-            ftys
-        (fun values -> TPat_recd (tcref,tinst,List.map (fun (ftinst,f) -> (ftinst,f values)) fldsmap',m)), 
-        acc
-
-    | Pat_range (c1,c2,m) -> 
-        warning(Deprecated("Character range matches will be removed in a future version of F#. Consider using a 'when' pattern guard instead",m));
-        unifyE cenv env m ty (cenv.g.char_ty);
-        (fun values -> TPat_range(c1,c2,m)),(tpenv,names,takenNames)
-
-    | Pat_null m -> 
-        AddCxTypeMustSupportNull env.DisplayEnv cenv.css m NoTrace ty;
-        (fun _ -> TPat_null m),(tpenv,names,takenNames)
-
-    | Pat_instance_member (_,_,_,m) -> 
-        errorR(Error("illegal pattern",range_of_synpat pat));
-        (fun _ -> TPat_wild m), (tpenv,names,takenNames)
-
-and TcPatterns warnOnUpper cenv env vFlags s argtys args = 
-    assert (List.length args  = List.length argtys);
-    List.mapfold (fun s (ty,pat) -> TcPat warnOnUpper cenv env None vFlags s ty pat) s (List.zip argtys args)
-
-
-and solveTypAsError cenv denv m ty =
-    let ty2 = new_error_typ cenv ()
-    assert((dest_typar_typ cenv.g ty2).IsFromError);
-    SolveTypEqualsTypKeepAbbrevs (MakeConstraintSolverEnv cenv.css m denv) 0 m NoTrace ty ty2 |> ignore
-
-and TcExprOfUnknownType cenv env tpenv expr =
-    let exprty = new_inference_typ cenv ()
-    let expr',tpenv = TcExpr cenv exprty env tpenv expr
-    expr',exprty,tpenv
-
-and TcExprFlex cenv flex ty (env:tcEnv) tpenv e =
-    if flex then
-        let argty = new_inference_typ cenv ()
-        let m = range_of_synexpr e
-        AddCxTypeMustSubsumeType env.DisplayEnv cenv.css m NoTrace ty argty ;
-        let e',tpenv  = TcExpr cenv argty env tpenv e 
-        let e' = mk_coerce_if_needed cenv.g ty argty e'
-        e',tpenv
-    else
-        TcExpr cenv ty env tpenv e
-    
-
-and TcExpr cenv ty (env:tcEnv) tpenv expr =
-    let m = range_of_synexpr expr
-
-    if verbose then  dprintf "--> TcExpr@%a\n" output_range (range_of_synexpr expr);
-
-    // Start an error recovery handler 
-    // Note the try/catch can lead to tail-recursion problems for iterated constructs, e.g. let... in... 
-    // So be careful! 
-    try 
-        /// Count our way through the expression shape that makes up an object constructor 
-        /// See notes at definition of "ctor" re. object model constructors. 
-        let env = 
-            if GetCtorShapeCounter env > 0 then AdjustCtorShapeCounter (fun x -> x - 1) env 
-            else env
-
-        let tm,tpenv = TcExprThen cenv ty env tpenv expr []
-
-        if verbose then  dprintf "<-- TcExpr@%a\n" output_range (range_of_synexpr expr);
-        tm,tpenv
-    with e -> 
-        if verbose then  dprintf "!!! TcExpr@%a\n" output_range (range_of_synexpr expr);
-
-        // Error recovery - return some rubbish expression, but replace/annotate 
-        // the type of the current expression with a type variable that indicates an error 
-        errorRecovery e m; 
-        solveTypAsError cenv env.DisplayEnv m ty;
-        if verbose then  dprintf "<-- TcExpr@%a\n" output_range (range_of_synexpr expr);
-        mk_throw m ty (mk_one cenv.g m), tpenv
-
-
-/// This is used to typecheck legitimate 'main body of constructor' expressions 
-and TcExprThatIsCtorBody ctorThisVarRefCellOpt cenv ty env tpenv expr =
-    let env = {env with eCtorInfo = Some(InitialExplicitCtorInfo(ctorThisVarRefCellOpt)) }
-    let expr,tpenv = TcExpr cenv ty env tpenv expr
-    let expr = CheckAndRewriteObjectCtor cenv.g env expr
-    expr,tpenv
-
-/// This is used to typecheck all ordinary expressions including constituent 
-/// parts of ctor. 
-and TcExprThatCanBeCtorBody cenv ty env tpenv expr =
-    let env = if AreWithinCtorShape env then AdjustCtorShapeCounter (fun x -> x + 1) env else env
-    TcExpr cenv ty env tpenv expr
-
-/// This is used to typecheck legitimate 'non-main body of object constructor' expressions 
-and TcExprThatCantBeCtorBody cenv ty env tpenv expr =
-    let env = if AreWithinCtorShape env then ExitCtorShapeRegion env else env
-    TcExpr cenv ty env tpenv expr
-
-/// This is used to typecheck legitimate 'non-main body of object constructor' expressions 
-and TcStmtThatCantBeCtorBody cenv env tpenv expr =
-    let env = if AreWithinCtorShape env then ExitCtorShapeRegion env else env
-    TcStmt cenv env tpenv expr
-
-and TcStmt cenv env tpenv expr =
-    let expr',ty,tpenv = TcExprOfUnknownType cenv env tpenv expr
-    let m = range_of_synexpr expr
-    let wasUnit = UnifyUnitType cenv env.DisplayEnv m ty (Some expr');
-    if wasUnit then
-      expr',tpenv
-    else
-      mk_compgen_seq m expr' (mk_unit cenv.g m),tpenv
-
-
-
-/// During checking of expressions of the form (x(y)).z(w1,w2) 
-/// keep a stack of things on the right. This lets us recognize 
-/// method applications. 
-and TcExprThen cenv ty env tpenv expr delayed =
-    match expr with 
-
-    | Expr_lid_or_id_get (isOpt,lid,m) ->
-        if isOpt then errorR(Error("syntax error - unexpected '?' symbol",m));
-        TcLongIdentThen cenv ty env tpenv lid delayed
-
-    | Expr_app (hpa,f,x,m) ->
-        TcExprThen cenv ty env tpenv f ((DelayedApp (hpa,x,m)):: delayed)
-
-    | Expr_tyapp (f,x,m) ->
-        TcExprThen cenv ty env tpenv f ((DelayedTypeApp (x,m)):: delayed)
-
-    | Expr_lvalue_get (e1,lid,m) ->
-        TcExprThen cenv ty env tpenv e1 ((DelayedDotLookup (lid,m))::delayed)
-           
-    | Expr_lbrack_get (e1,idx,mDot,m) 
-    | Expr_lbrack_set (e1,idx,_,mDot,m) ->
-        TcIndexerThen cenv env ty m mDot tpenv expr e1 idx delayed
-    
-    | _  ->
-        match delayed with 
-        | [] -> TcExprUndelayed cenv ty env tpenv expr
-        | _ -> 
-            let expr',exprty,tpenv = TcExprUndelayedNoType cenv env tpenv expr
-            PropagateThenTcDelayed cenv ty env tpenv (range_of_expr expr') (MkApplicableExprNoFlex cenv expr') exprty ExprAtomicFlag.NonAtomic delayed
-
-and TcExprs cenv env m tpenv flexes argtys args = 
-    if (List.length args  <> List.length argtys) then error(Error(sprintf "expected %d expressions, got %d" (List.length argtys) (List.length args),m));
-    (tpenv, List.zip3 flexes argtys args) ||> List.mapfold (fun tpenv (flex,ty,e) -> 
-         TcExprFlex cenv flex ty env tpenv e)
-
-
-//-------------------------------------------------------------------------
-// TcExprUndelayed
-//------------------------------------------------------------------------- 
-
-and TcExprUndelayedNoType cenv env tpenv expr =
-    let exprty = new_inference_typ cenv ()
-    let expr',tpenv = TcExprUndelayed cenv exprty env tpenv expr
-    expr',exprty,tpenv
-
-and TcExprUndelayed cenv ty env tpenv expr =
-    let m = range_of_synexpr expr
-    (* dprintf "TcExprUndelayed: %a: isSome(env.eFamilyType) = %b\n" output_range m (isSome env.eFamilyType); *)
-
-    if verbose then  dprintf "--> TcExprUndelayed@%a\n" output_range (range_of_synexpr expr); 
-    match expr with 
-    | Expr_paren (expr2,m2) -> 
-        (* We invoke CallExprHasTypeSink for every construct which is atomic in the syntax, i.e. where a '.' immediately following the *)
-        (* construct is a dot-lookup for the result of the construct. *)
-        CallExprHasTypeSink(m,nenv_of_tenv env,ty, env.DisplayEnv,AccessRightsOfEnv env);
-        TcExpr cenv ty env tpenv expr2
-
-    | Expr_lbrack_get _ | Expr_lbrack_set _
-    | Expr_tyapp _ | Expr_id_get _ | Expr_lid_get _ | Expr_app _ | Expr_lvalue_get _ -> error(Error("TcExprUndelayed: delayed", range_of_synexpr expr))
-
-    | Expr_const (Const_string (s,m),_) -> 
-        CallExprHasTypeSink(m,nenv_of_tenv env,ty, env.DisplayEnv,AccessRightsOfEnv env);
-        TcConstStringExpr cenv ty env m tpenv s
-
-    | Expr_const (c,m) -> 
-        CallExprHasTypeSink(m,nenv_of_tenv env,ty, env.DisplayEnv,AccessRightsOfEnv env);
-        TcConstExpr cenv ty env m tpenv c
-
-    | Expr_lambda _ -> TcIteratedLambdas cenv true env ty Set.empty tpenv expr
-
-    | Expr_match (spMatch,x,matches,isExnMatch,m) ->
-        if verbose then  dprintn "tc Expr_match";
-        let x',inputTy,tpenv = TcExprOfUnknownType cenv env tpenv x
-        let exprm = range_of_expr x'
-        let v,e, tpenv = TcAndPatternCompileMatchClauses exprm m (if isExnMatch then Throw else Incomplete) cenv inputTy ty env tpenv matches
-        (mk_let spMatch exprm v x'  e,tpenv)
-
-    | Expr_assert (x,m) ->
-        TcAssertExpr cenv ty env m tpenv x
-
-    | Expr_typed (e,cty,m) ->
-        let tgty,tpenv = TcTypeAndRecover cenv NewTyparsOK CheckCxs env tpenv cty
-        unifyE cenv env m ty tgty;
-        let e',tpenv = TcExpr cenv ty env tpenv e 
-        e',tpenv
-
-    | Expr_isinst (e,tgty,m) ->
-        let e',srcTy,tpenv = TcExprOfUnknownType cenv env tpenv e 
-        unifyE cenv env m ty cenv.g.bool_ty;
-        let tgty,tpenv = TcType cenv NewTyparsOK CheckCxs env tpenv tgty
-        TcRuntimeTypeTest cenv env.DisplayEnv m tgty srcTy;        
-        let e' = mk_call_istype cenv.g m tgty  e'
-        e', tpenv
-    
-    (* Expr_addrof is noted in the syntax ast in order to recognize it as concrete type information *)
-    (* during type checking, in particular prior to resolving overloads. This helps distinguish *)
-    (* its use at method calls from the use of the conflicting 'ref' mechanism for passing byref parameters *)
-    | Expr_addrof(byref,e,opm,m) -> 
-        TcExpr cenv ty env tpenv (mksyn_prefix opm m (if byref then "~&" else "~&&") e) 
-        
-    | Expr_upcast (e,_,m) | Expr_inferred_upcast (e,m) -> 
-        let e',srcTy,tpenv = TcExprOfUnknownType cenv env tpenv e 
-        let tgty,tpenv = 
-          match expr with
-          | Expr_upcast (e,tgty,m) -> 
-              let tgty,tpenv = TcType cenv NewTyparsOK CheckCxs env tpenv tgty
-              unifyE cenv env m tgty ty;
-              tgty,tpenv
-          | Expr_inferred_upcast (e,m) -> ty,tpenv 
-          | _ -> failwith "upcast"
-        TcStaticUpcast cenv env.DisplayEnv m tgty srcTy;
-        mk_coerce(e',tgty,m,srcTy),tpenv
-
-    | Expr_downcast(e,_,m) | Expr_inferred_downcast (e,m) ->
-        let e',srcTy,tpenv = TcExprOfUnknownType cenv env tpenv e 
-        let tgty,tpenv = 
-          match expr with
-          | Expr_downcast (e,tgty,m) -> 
-              let tgty,tpenv = TcType cenv NewTyparsOK CheckCxs env tpenv tgty
-              unifyE cenv env m tgty ty;
-              tgty,tpenv
-          | Expr_inferred_downcast (e,m) -> ty,tpenv 
-          | _ -> failwith "downcast"
-        TcRuntimeTypeTest cenv env.DisplayEnv m tgty srcTy;
-        (* TcRuntimeTypeTest ensures tgty is a nominal type. Hence we can insert a check here *)
-        (* based on the nullness semantics of the nominal type. *)
-        let e' = mk_call_unbox cenv.g m tgty  e'
-        e',tpenv
-
-    | Expr_null (m) ->
-        AddCxTypeMustSupportNull env.DisplayEnv cenv.css m NoTrace ty;
-        mk_null m ty,tpenv
-
-    | Expr_lazy (e,m) ->
-        let ety = new_inference_typ cenv ()
-        unifyE cenv env m ty (mk_lazy_ty cenv.g ety);
-        let e',tpenv = TcExpr cenv ety env tpenv e 
-        mk_lazy_delayed cenv.g m ety (mk_unit_delay_lambda cenv.g m e'), tpenv
-
-    | Expr_ifnull (e1,e2,m) ->
-        let e1',tpenv = TcExpr cenv ty env tpenv e1 
-        let e2',tpenv = TcExpr cenv ty env tpenv e2 
-        AddCxTypeMustSupportNull env.DisplayEnv cenv.css m NoTrace ty;
-        mk_compgen_let_in m "nullTest" ty e1' (fun (v,ve) -> 
-        mk_nonnull_cond cenv.g m ty ve ve e2'),tpenv
-
-    | Expr_tuple (args,m) -> 
-        let argtys = UnifyTupleType cenv env.DisplayEnv m ty args
-        // No subsumption at tuple construction
-        let flexes = argtys |> List.map (fun _ -> false)
-        let args',tpenv = TcExprs cenv env m tpenv flexes argtys args
-        mk_tupled cenv.g m args' argtys, tpenv
-
-    | Expr_array_or_list (isArray,args,m) -> 
-        CallExprHasTypeSink(m,nenv_of_tenv env,ty, env.DisplayEnv,AccessRightsOfEnv env);
-
-        let argty = new_inference_typ cenv ()
-        unifyE cenv env m ty (if isArray then mk_array_typ cenv.g argty else Tastops.mk_list_ty cenv.g argty);
-        // Always allow subsumption once a nominal type is known
-        let args',tpenv = List.mapfold (TcExpr cenv argty env) tpenv args
-        
-        let expr = 
-            if isArray then TExpr_op(TOp_array, [argty],args',m)
-            else List.foldBack (mk_cons cenv.g argty) args' (mk_nil cenv.g m argty)
-        expr,tpenv
-
-    | Expr_new (superInit,objTy,arg,m) -> 
-        let objTy',tpenv = TcType cenv NewTyparsOK CheckCxs env tpenv objTy
-        unifyE cenv env m ty objTy';
-        TcNewExpr cenv env tpenv objTy' (Some (range_of_syntype objTy)) superInit arg m
-
-    | Expr_impl(objTy,argopt,binds,extraImpls,m) ->
-        CallExprHasTypeSink(m,nenv_of_tenv env,ty, env.DisplayEnv,AccessRightsOfEnv env);
-        TcObjectExpr cenv ty env tpenv (objTy,argopt,binds,extraImpls,m)
-            
-    | Expr_recd (inherits,optOrigExpr, flds, m) -> 
-        CallExprHasTypeSink(m,nenv_of_tenv env,ty, env.DisplayEnv,AccessRightsOfEnv env);
-        TcRecdExpr cenv ty env tpenv (inherits,optOrigExpr,flds,m)
-
-    | Expr_while (spWhile,e1,e2,m) ->
-        unifyE cenv env m ty cenv.g.unit_ty;
-        let e1',tpenv = TcExpr cenv (cenv.g.bool_ty) env tpenv e1
-        let e2',tpenv = TcStmt cenv env tpenv e2
-        mk_while cenv.g (spWhile,e1',e2',m),tpenv
-
-    | Expr_for (spBind,id,start,dir,finish,body,m) ->
-        unifyE cenv env m ty cenv.g.unit_ty;
-        let start' ,tpenv = TcExpr cenv (cenv.g.int_ty) env tpenv start
-        let finish',tpenv = TcExpr cenv (cenv.g.int_ty) env tpenv finish
-        let idv,ide = Tastops.mk_local id.idRange  id.idText cenv.g.int_ty
-        let envinner = AddLocalVal m idv env
-        let body',tpenv = TcStmt cenv envinner tpenv body
-        mk_fast_for_loop  cenv.g (spBind,m,idv,start',dir,finish',body'), tpenv
-        
-    | Expr_foreach (spBind,SeqExprOnly(seqExprOnly),pat,enumExpr,body,m) ->
-        if seqExprOnly then warning (Error("This expression form may only be used in sequence and computation expressions",m));
-        TcForEachExpr cenv ty env tpenv (pat,enumExpr,body,m,spBind)
-
-    | Expr_comprehension (isArrayOrList,isNotNakedRefCell,comp,m) ->
-        let env = ExitFamilyRegion env
-        if not isArrayOrList then 
-            match comp with 
-            | Expr_new _ -> 
-                errorR(Error("Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces",m));
-            | SimpleSemicolonSequence false _ -> 
-                errorR(Error("Invalid object, sequence or record expression",m));
-            | _ -> 
-                ()
-        if not !isNotNakedRefCell && not cenv.g.compilingFslib then 
-            warning(Error("Sequence expressions should be of the form 'seq { ... }'. Sequence expressions without a 'seq' prefix are deprecated",m));
-        
-        TcComputationExpression cenv env ty m None tpenv comp
-        
-    | Expr_array_or_list_of_seq (isArray,comp,m)  ->
-        CallExprHasTypeSink(m,nenv_of_tenv env,ty, env.DisplayEnv,AccessRightsOfEnv env);
-
-        
-        match comp with 
-        | Expr_comprehension(_,_,(SimpleSemicolonSequence true elems as body),_) -> 
-            match body with 
-            | SimpleSemicolonSequence false _ -> 
-                ()
-            | _ -> 
-                warning(Deprecated("This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression",m));
-
-            let replacementExpr = 
-                if isArray then 
-                    (* This are to improve parsing/processing speed for parser tables by converting to an array blob ASAP *)
-                    let nelems = elems.Length 
-                    if nelems > 0 && List.forall (function Expr_const(Const_uint16 _,_) -> true | _ -> false) elems 
-                    then Expr_const (Const_uint16array (Array.of_list (List.map (function Expr_const(Const_uint16 x,_) -> x | _ -> failwith "unreachable") elems)), m)
-                    elif nelems > 0 && List.forall (function Expr_const(Const_uint8 _,_) -> true | _ -> false) elems 
-                    then Expr_const (Const_bytearray (Array.of_list (List.map (function Expr_const(Const_uint8 x,_) -> x | _ -> failwith "unreachable") elems), m), m)
-                    else Expr_array_or_list(isArray, elems, m)
-                else 
-                    if List.length elems > 500 then 
-                        error(Error("This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList",m));
-                    Expr_array_or_list(isArray, elems, m)
-
-            TcExprUndelayed cenv ty env tpenv replacementExpr
-        | _ -> 
-            let genCollElemTy = new_inference_typ cenv ()
-            let genCollTy =  (if isArray then mk_array_typ else mk_list_ty) cenv.g genCollElemTy
-            unifyE cenv env m ty genCollTy;
-            let exprty = new_inference_typ cenv ()
-            let genEnumTy =  mk_seq_ty cenv.g genCollElemTy
-            AddCxTypeMustSubsumeType env.DisplayEnv cenv.css m NoTrace genEnumTy exprty; 
-            let expr,tpenv = TcExpr cenv exprty env tpenv comp
-            let expr = mk_coerce_if_needed cenv.g genEnumTy (type_of_expr cenv.g expr) expr
-            (if isArray then mk_call_seq_to_array else mk_call_seq_to_list) cenv.g m genCollElemTy 
-                // We add a call to 'seq ... ' to make sure sequence expression compilation gets applied to the contents of the
-                // comprehension. But don't do this in FSharp.Core.dll since 'seq' may not yet be defined.
-                ((if cenv.g.compilingFslib then id else mk_call_seq cenv.g m genCollElemTy)
-                    (mk_coerce(expr,genEnumTy,range_of_expr expr,exprty))),tpenv
-
-    | Expr_let (isRec,isUse,binds,body,m) ->
-        TcLinearLetExprs (TcExprThatCanBeCtorBody cenv) cenv env ty (fun x -> x) tpenv (true(*consume use bindings*),isRec,isUse,binds,body,m) 
-
-    | Expr_try_catch (e1,mTryToWith,clauses,mWithToLast,mTryToLast,spTry,spWith) ->
-        let e1',tpenv = TcExpr cenv ty env tpenv e1
-        (* Compile the pattern twice, once as a List.filter with all succeeding targets returning "1", and once as a proper catch block. *)
-        let filterClauses = clauses |> List.map (function (Clause(pat,optWhenExpr,e,m,_)) -> Clause(pat,optWhenExpr,(Expr_const(Const_int32 1,m)),m,SuppressSequencePointAtTarget))
-        let checkedFilterClauses, tpenv = TcMatchClauses cenv cenv.g.exn_ty cenv.g.int_ty env tpenv filterClauses
-        let checkedHandlerClauses, tpenv = TcMatchClauses cenv cenv.g.exn_ty ty env tpenv clauses
-        let v1,filter_expr = CompilePatternForMatchClauses cenv env mWithToLast mWithToLast true FailFilter cenv.g.exn_ty cenv.g.int_ty checkedFilterClauses
-        let v2,handler_expr = CompilePatternForMatchClauses cenv env mWithToLast mWithToLast true Rethrow cenv.g.exn_ty ty checkedHandlerClauses
-        mk_try_catch cenv.g (e1',v1,filter_expr,v2,handler_expr,mTryToLast,ty,spTry,spWith),tpenv
-
-    | Expr_try_finally (e1,e2,mTryToLast,spTry,spFinally) ->
-        let e1',tpenv = TcExpr cenv ty env tpenv e1
-        let e2',tpenv = TcStmt cenv env tpenv e2
-        mk_try_finally cenv.g (e1',e2',mTryToLast,ty,spTry,spFinally),tpenv
-
-    | Expr_arb m -> 
-        mk_ilzero(m,ty), tpenv
-
-    | Expr_throwaway (e1,m) -> 
-        let _,_,tpenv = TcExprOfUnknownType cenv env tpenv e1
-        mk_ilzero(m,ty),tpenv
-
-    | Expr_seq (sp,dir,e1,e2,m) ->
-        if dir then 
-            // Use continuations to cope with long linear sequences 
-            let rec TcLinearSeqs expr cont = 
-                match expr with 
-                | Expr_seq (sp,true,e1,e2,m) ->
-                  let e1',tpenv = TcStmtThatCantBeCtorBody cenv env tpenv e1
-                  TcLinearSeqs e2 (fun (e2',tpenv) -> 
-                      cont (TExpr_seq(e1',e2',NormalSeq,sp,m),tpenv))
-
-                | _ -> 
-                  cont (TcExprThatCanBeCtorBody cenv ty env tpenv expr)
-            TcLinearSeqs expr (fun res -> res)
-        else 
-          (* Constructors using "new (...) =  then " *)
-          let e1',tpenv = TcExprThatCanBeCtorBody cenv ty env tpenv e1
-          if (GetCtorShapeCounter env) <> 1 then 
-              errorR(Error("the expression form 'expr then expr' may only be used as part of an explicit object constructor",m));
-          let e2',tpenv = TcStmtThatCantBeCtorBody cenv (ExitCtorPreConstructRegion env) tpenv e2
-          TExpr_seq(e1',e2',ThenDoSeq,sp,m),tpenv
-    | Expr_do (e1,m) ->
-          unifyE cenv env m ty cenv.g.unit_ty;
-          TcStmtThatCantBeCtorBody cenv env tpenv e1
-
-    | Expr_cond (e1,e2,e3opt,spIfToThen,mIfToThen,m) ->
-        let e1',tpenv = TcExprThatCantBeCtorBody cenv cenv.g.bool_ty env tpenv e1  
-        (if isNone e3opt then unifyE cenv env m ty cenv.g.unit_ty);
-        let e2',tpenv = TcExprThatCanBeCtorBody cenv ty env tpenv e2
-        let e3',tpenv = 
-            match e3opt with 
-            | None -> mk_unit cenv.g mIfToThen,tpenv // the fake 'unit' value gets exactly the same range as spIfToThen
-            | Some e3 -> TcExprThatCanBeCtorBody cenv ty env tpenv e3 
-        mk_cond spIfToThen SequencePointAtTarget m ty e1' e2' e3', tpenv
-
-    (* This is for internal use in the libraries only *)
-    | Expr_static_optimization (constraints,e2,e3,m) ->
-        let constraints',tpenv = List.mapfold (TcStaticOptimizationConstraint cenv env) tpenv constraints
-        (* Do not force the types of the two expressions to be equal *)
-        (* REVIEW: check the types are the same after applying the constraints *)
-        let e2',_, tpenv = TcExprOfUnknownType cenv env tpenv e2
-        let e3',tpenv = TcExpr cenv ty env tpenv e3
-        TExpr_static_optimization(constraints',e2',e3',m), tpenv
-
-    | Expr_lvalue_set (e1,f,e2,m) ->
-        TcExprThen cenv ty env tpenv e1 [DelayedDotLookup(f,union_ranges (range_of_synexpr e1) (range_of_lid f)); MakeDelayedSet(e2,m)]
-
-    | Expr_lvalue_indexed_set (e1,f,e2,e3,m) ->
-        TcExprThen cenv ty env tpenv e1 [DelayedDotLookup(f,union_ranges (range_of_synexpr e1) (range_of_lid f)); DelayedApp(ExprAtomicFlag.Atomic,e2,m); MakeDelayedSet(e3,m)]
-
-    | Expr_lid_set (lid,e2,m) -> 
-        TcLongIdentThen cenv ty env tpenv lid [ MakeDelayedSet(e2, m) ]
-    
-    (* Type.Items(e1) <- e2 *)
-    | Expr_lid_indexed_set (lid,e1,e2,m) ->
-        TcLongIdentThen cenv ty env tpenv lid [ DelayedApp(ExprAtomicFlag.Atomic,e1,m); MakeDelayedSet(e2,m) ]
-
-    | Expr_trait_call(tps,memSpfn,arg,m) ->
-        let (TTrait(_,logicalCompiledName,_,argtys,returnTy,_) as traitInfo),tpenv = TcPseudoMemberSpec cenv NewTyparsOK CheckCxs env tps  tpenv memSpfn m
-        if List.mem logicalCompiledName BakedInTraitConstraintNames then 
-            warning(BakedInMemberConstraintName(logicalCompiledName,m))
-        
-        let returnTy = GetFSharpViewOfReturnType cenv.g returnTy
-        let args,namedCallerArgs = GetMethodArgs arg 
-        if nonNil namedCallerArgs then errorR(Error("Named arguments may not be given to member trait calls",m));
-        // Subsumption at trait calls if arguments have nominal type prior to unification of any arguments or return type
-        let flexes = argtys |> List.map (is_typar_typ cenv.g >> not)
-        let args',tpenv = TcExprs cenv env m tpenv flexes argtys args
-        AddCxMethodConstraint env.DisplayEnv cenv.css m NoTrace traitInfo;
-        unifyE cenv env m ty returnTy;      
-        TExpr_op(TOp_trait_call(traitInfo), [], args', m), tpenv
-          
-    | Expr_typeof(sty,m) ->
-        if not cenv.g.compilingFslib then 
-            errorR(Deprecated("Use 'typeof<_>' instead",m));
-        let sty',tpenv = TcType cenv NewTyparsOK CheckCxs env tpenv sty
-        unifyE cenv env m ty cenv.g.system_Type_typ;      
-        mk_call_typeof cenv.g m sty', tpenv
-
-    | Expr_constr_field_get (e1,c,n,m) ->
-        let e1',ty1,tpenv = TcExprOfUnknownType cenv env tpenv e1
-        let mkf,ty2 = TcUnionCaseField cenv env ty1 m c n 
-                          ((fun (a,b) n -> mk_ucase_field_get_unproven(e1',a,b,n,m)),
-                           (fun a n -> mk_exnconstr_field_get(e1',a,n,m)))
-        unifyE cenv env m ty ty2;
-        mkf n,tpenv
-
-    | Expr_constr_field_set (e1,c,n,e2,m) ->
-        unifyE cenv env m ty cenv.g.unit_ty;
-        let e1',ty1,tpenv = TcExprOfUnknownType cenv env tpenv e1
-        let mkf,ty2 = TcUnionCaseField cenv  env ty1 m c n
-                          ((fun (a,b) n e2' -> 
-                             if not (ucref_rfield_mutable cenv.g a n) then errorR(Error("this field is not mutable",m));
-                             mk_ucase_field_set(e1',a,b,n,e2',m)),
-                           (fun a n e2' -> 
-                             if not (ecref_rfield_mutable a n) then errorR(Error("this field is not mutable",m));
-                             mk_exnconstr_field_set(e1',a,n,e2',m)))
-        let e2',tpenv = TcExpr cenv ty2 env tpenv e2
-        mkf n e2',tpenv
-
-    | Expr_asm (s,tyargs,args,rtys,m) ->
-        let argtys = new_inference_typs cenv args
-        let tyargs',tpenv = TcTypes cenv NewTyparsOK CheckCxs env tpenv tyargs
-        // No subsumption at uses of IL assembly code
-        let flexes = argtys |> List.map (fun _ -> false)
-        let args',tpenv = TcExprs cenv env m tpenv flexes argtys args
-        let rtys',tpenv = TcTypes cenv NewTyparsOK CheckCxs env tpenv rtys
-        let returnTy = 
-            match rtys' with 
-            | [] -> cenv.g.unit_ty
-            | [ returnTy ] -> returnTy
-            | _ -> error(InternalError("Only zero or one pushed items are permitted in IL assembly code",m))
-        unifyE cenv env m ty returnTy;
-        mk_asm(Array.to_list s,tyargs',args',rtys',m),tpenv
-
-    | Expr_quote(oper,raw,ast,m) ->
-        CallExprHasTypeSink(m,nenv_of_tenv env,ty, env.DisplayEnv,AccessRightsOfEnv env);
-        TcQuotationExpr cenv ty env tpenv (oper,raw,ast,m) 
-
-    | Comp_yield ((isTrueYield,isTrueReturn),_,m)
-    | Comp_yieldm ((isTrueYield,isTrueReturn),_,m) when isTrueYield -> 
-         error(Error("This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq { ... }', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements",m))
-    | Comp_yield ((isTrueYield,isTrueReturn),_,m)
-    | Comp_yieldm ((isTrueYield,isTrueReturn),_,m) when isTrueReturn -> 
-         error(Error("This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'",m))
-    | Comp_yield (_,_,m)
-    | Comp_yieldm (_,_,m) 
-    | Comp_zero (m) ->
-         error(Error("This construct may only be used within sequence or computation expressions",m))
-    | Comp_do_bind  (_,m) 
-    | Comp_bind  (_,_,_,_,_,m) -> 
-         error(Error("This construct may only be used within computation expressions",m))
-
-/// Check lambdas as a group, to catch duplicate names in patterns
-and TcIteratedLambdas cenv isFirst (env:tcEnv) ty takenNames tpenv e = 
-    match e with 
-    | Expr_lambda (isMember,isSubsequent,spats,bodyExpr,m) when isMember || isFirst || isSubsequent ->
-        let domainTy,resultTy = UnifyFunctionType None cenv env.DisplayEnv m ty
-        let vs, (tpenv,names,takenNames) = TcSimplePats cenv isMember domainTy env (tpenv,Map.empty,takenNames) spats
-        let envinner,_,vspecMap = MakeAndPublishSimpleVals cenv env m names
-        let envinner = if isMember then envinner else ExitFamilyRegion envinner
-        let bodyExpr,tpenv = TcIteratedLambdas cenv false envinner resultTy takenNames tpenv bodyExpr
-        mk_multi_lambda m (List.map (fun nm -> NameMap.find nm vspecMap) vs) (bodyExpr,resultTy),tpenv 
-    | e -> 
-        TcExpr cenv ty env tpenv e
-
-// Check expr.[idx] 
-// This is a little over complicated for my liking. Basically we want to intepret e1.[idx] as e1.Item(idx). 
-// However it's not so simple as all that. First "Item" can have a different name according to an attribute in 
-// .NET metadata. Next, we want to give good warning messages for F#'s "old" way of doing things for OCaml 
-// compatibility. This means we manually typecheck 'e1' and look to see if it has a nominal type. We then 
-// do the right thing in each case. 
-and TcIndexerThen cenv env ty m mDot tpenv expr e1 idxs delayed = 
-    
-    let ad = AccessRightsOfEnv env
-    let e1',e1ty,tpenv = TcExprOfUnknownType cenv env tpenv e1
-    
-    // Find the first type in the effective hierarchy that either has a DefaultMember attribute OR 
-    // has a member called 'Item' 
-    let propName = 
-        match idxs with 
-        | [_] -> 
-            FoldPrimaryHierarchyOfType (fun typ acc -> 
-                match acc with
-                | None ->
-                    let isNominal = is_stripped_tyapp_typ cenv.g typ
-                    if isNominal then 
-                        let tcref = tcref_of_stripped_typ cenv.g typ
-                        TyconRefTryBindAttrib cenv.g cenv.g.attrib_DefaultMemberAttribute tcref 
-                                 (function ([CustomElem_string (Some(msg)) ],_) -> Some msg | _ -> None)
-                                 (function (Attrib(_,_,[ AttribStringArg(msg) ],_,_))  -> Some(msg) | _ -> None)
-                     else
-                        match AllPropInfosOfTypeInScope cenv.infoReader (nenv_of_tenv env).eExtensionMembers (Some("Item"), ad) IgnoreOverrides m typ with
-                        | [] -> None
-                        | _ -> Some("Item")
-                 | _ -> acc)
-              cenv.g 
-              cenv.amap 
-              m 
-              e1ty
-              None
-        | _ -> Some "GetSlice"
-
-    let isNominal = is_stripped_tyapp_typ cenv.g e1ty
-    
-    
-    (* NOTE: It looks like we need to make "array" different on this codepath *)
-    (* NOTE: Array lookups should map to ArrayGet nodes in quotation trees. This is not currently happening *)
-    (*       because they map to one of two (.[]) operators (one for legacy non-nominal lookups and one for nominal lookups *)
-    (* NOTE: String lookups should map to direct calls to the Chars indexer property *)
-    
-    // REVIEW: it would be best to adjust this so that array goes through the nominal codepath 
-    // so we can scrap the variable path altogether
-    let isArray = IsArrayTypeWithIndexer cenv.g e1ty 
-    let isString = type_equiv cenv.g cenv.g.string_ty e1ty 
-
-    let idxRange = List.reduce_left union_ranges (List.map range_of_synexpr idxs)
-    let MakeIndexParam vopt = 
-        match idxs @ Option.to_list vopt with 
-        | []  -> failwith "unexpected empty index list"
-        | [h] -> Expr_paren(h,idxRange)
-        | es -> Expr_paren(Expr_tuple(es,idxRange),idxRange)
-
-    if isArray || isString then 
-
-        let indexOpPath = ["Microsoft";"FSharp";"Core";"LanguagePrimitives";"IntrinsicFunctions"]
-        let sliceOpPath = ["Microsoft";"FSharp";"Core";"Operators";"OperatorIntrinsics"]
-        let mk_args es = Expr_tuple (es,m)
-        let path,fnm,idxs = 
-            match isString,isArray,expr with 
-            | false,true,Expr_lbrack_get(_,[Expr_tuple ([_;_] as idxs,_)],_,_)         -> indexOpPath,"GetArray2D", idxs
-            | false,true,Expr_lbrack_get(_,[Expr_tuple ([_;_;_] as idxs,_)],_,_)       -> indexOpPath,"GetArray3D", idxs
-            | false,true,Expr_lbrack_get(_,[Expr_tuple ([_;_;_;_] as idxs,_)],_,_)     -> indexOpPath,"GetArray4D", idxs
-            | false,true,Expr_lbrack_get(_,[_],_,_)                                    -> indexOpPath,"GetArray", idxs
-            | false,true,Expr_lbrack_set(_,[Expr_tuple ([_;_] as idxs,_)] ,e3,_,_)    -> indexOpPath,"SetArray2D", (idxs @ [e3])
-            | false,true,Expr_lbrack_set(_,[Expr_tuple ([_;_;_] as idxs,_)] ,e3,_,_)   -> indexOpPath,"SetArray3D", (idxs @ [e3])
-            | false,true,Expr_lbrack_set(_,[Expr_tuple ([_;_;_;_] as idxs,_)] ,e3,_,_) -> indexOpPath,"SetArray4D", (idxs @ [e3])
-            | false,true,Expr_lbrack_set(_,[_],e3,_,_)                        -> indexOpPath,"SetArray", (idxs @ [e3])
-            | true,false,Expr_lbrack_get(_,[_;_],_,_)                -> sliceOpPath,"GetStringSlice", idxs
-            | true,false,Expr_lbrack_get(_,[_],_,_)                  -> indexOpPath,"GetString", idxs
-            | false,true,Expr_lbrack_get(_,[_;_],_,_)                -> sliceOpPath,"GetArraySlice", idxs
-            | false,true,Expr_lbrack_get(_,[_;_;_;_],_,_)            -> sliceOpPath,"GetArraySlice2D", idxs
-            | false,true,Expr_lbrack_get(_,[_;_;_;_;_;_],_,_)        -> sliceOpPath,"GetArraySlice3D", idxs
-            | false,true,Expr_lbrack_get(_,[_;_;_;_;_;_;_;_],_,_)    -> sliceOpPath,"GetArraySlice4D", idxs
-            | false,true,Expr_lbrack_set(_,[_;_],e3,_,_)             -> sliceOpPath,"SetArraySlice", (idxs @ [e3])
-            | false,true,Expr_lbrack_set(_,[_;_;_;_],e3,_,_)         -> sliceOpPath,"SetArraySlice2D", (idxs @ [e3])
-            | false,true,Expr_lbrack_set(_,[_;_;_;_;_;_],e3,_,_)     -> sliceOpPath,"SetArraySlice3D", (idxs @ [e3])
-            | false,true,Expr_lbrack_set(_,[_;_;_;_;_;_;_;_],e3,_,_) -> sliceOpPath,"SetArraySlice4D", (idxs @ [e3])
-            | _ -> error(Error("invalid indexer expression",m))
-        let operPath = (mksyn_lid_get mDot path (CompileOpName fnm))
-        let f,fty,tpenv = TcExprOfUnknownType cenv env tpenv operPath
-        let domainTy,resultTy = UnifyFunctionType (Some m) cenv env.DisplayEnv m fty
-        unifyE cenv env m domainTy e1ty; 
-        let f' = build_app cenv (MkApplicableExprNoFlex cenv f) fty e1' m
-        let delayed = DelayedApp(ExprAtomicFlag.Atomic,(match idxs with [idx] -> idx | _ -> Expr_tuple(idxs,m)),m) :: delayed // atomic, otherwise no ar.[1] <- xyz
-        PropagateThenTcDelayed cenv ty env tpenv m f' resultTy ExprAtomicFlag.Atomic delayed 
-
-    elif (isNominal || isSome propName) then 
-
-        let nm = 
-            match propName with 
-            | None -> "Item"
-            | Some(nm) -> nm
-        let delayed = 
-            match expr with 
-            | Expr_lbrack_get _ -> 
-                DelayedDotLookup([ident(nm,m)],m) :: DelayedApp(ExprAtomicFlag.Atomic,MakeIndexParam None,m) :: delayed
-            | Expr_lbrack_set(_,_,e3,_,_) -> 
-                match idxs with 
-                | [idx] -> DelayedDotLookup([ident(nm,m)],m) :: DelayedApp(ExprAtomicFlag.Atomic,MakeIndexParam None,m) :: MakeDelayedSet(e3,m) :: delayed
-                | _ -> DelayedDotLookup([ident("SetSlice",m)],m) :: DelayedApp(ExprAtomicFlag.Atomic,MakeIndexParam (Some e3),m) :: delayed
-                
-            | _ -> error(InternalError("unreachable",m))
-        PropagateThenTcDelayed cenv ty env tpenv mDot (MkApplicableExprNoFlex cenv e1') e1ty ExprAtomicFlag.Atomic delayed 
-
-    else 
-        // Build an old fashioned, deprecated constrained lookup 
-        error(Error("The operator 'expr.[idx]' has been used an object of indeterminate type based on information prior to this program point. This is deprecated. Consider adding further type constraints",m));
-
-
-(* Check a 'new Type(args)' expression, also an 'inheritedTys declaration in an implicit or explicit class *)
-and TcNewExpr cenv env tpenv objTy objTyRangeOpt superInit arg m =
-    let ad = AccessRightsOfEnv env
-    (* Handle the case 'new 'a()' *)
-    if (is_typar_typ cenv.g objTy) then 
-        if superInit then error(Error("cannot inherit from a variable type",m));
-        AddCxTypeMustSupportDefaultCtor env.DisplayEnv cenv.css m NoTrace objTy;
-        
-        match arg with 
-        | Expr_const (Const_unit,_) -> ()
-        | _ -> errorR(Error("Calls to object constructors on type parameters can not be given arguments",m))
-        
-        mk_call_create_instance cenv.g m objTy ,tpenv
-    else 
-        if not (is_stripped_tyapp_typ cenv.g objTy) then error(Error(sprintf "'%s' may only be used with named types" (if superInit then "inherit" else "new"),m));
-        let item,rest = ForceRaise (ResolveObjectConstructor cenv.nameResolver env.DisplayEnv m ad objTy)
-        
-        let nenv = nenv_of_tenv env
-        // Re-record the name resolution since we now know it's a constructor call
-        match objTyRangeOpt with 
-        | Some objTyRange -> CallNameResolutionSink(objTyRange,nenv,item,ItemOccurence.Use,nenv.eDisplayEnv,AccessRightsOfEnv env);
-        | None -> ()
-        
-        TcCtorCall false cenv env tpenv objTy objTy item superInit arg m (delay_rest rest m [])
-
-(* Check an 'inheritedTys declaration in an implicit or explicit class *)
-and TcCtorCall isNaked cenv env tpenv typ objTy item superInit arg m delayed =
-    let ad = AccessRightsOfEnv env
-    let isSuperInit = (if superInit then CtorValUsedAsSuperInit else NormalValUse)
-
-    if is_interface_typ cenv.g objTy then 
-      error(Error((if superInit then  "'inherit' may not be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead"
-                   else            "'new' may not be used on interface types. Consider using an object expression '{ new ... with ... }' instead"),m));
-    let tycon = (deref_tycon (tcref_of_stripped_typ cenv.g objTy))
-    if not superInit && is_partially_implemented_tycon tycon then 
-      error(Error("Instances of this type cannot be created since it has been marked 'abstract' or not all methods have been given implementations. Consider using an object expression '{ new ... with ... }' instead",m));
-    match item with 
-    | Item_ctor_group(methodName,minfos) ->
-
-        let meths = List.map (fun minfo -> minfo,None) minfos
-        if isNaked && type_feasibly_subsumes_type 0 cenv.g cenv.amap m cenv.g.system_IDisposable_typ NoCoerce objTy then
-          warning(Error("It is recommended that objects that support the IDisposable interface are created using 'new Type(args)' rather than 'Type(args)' to indicate that resources may be owned by the generated value",m));
-        TcMethodApplicationThen cenv env typ tpenv None [] m methodName ad PossiblyMutates false meths isSuperInit [arg] ExprAtomicFlag.NonAtomic delayed 
-    | Item_delegate_ctor typ ->
-        TcNewDelegateThen cenv objTy env tpenv m typ arg ExprAtomicFlag.NonAtomic delayed
-    | _ -> error(Error(sprintf "'%s' may only be used to construct object types" (if superInit then "inherit" else "new"),m))
-
-
-//-------------------------------------------------------------------------
-// TcRecordConstruction
-//------------------------------------------------------------------------- 
-  
-// Check a record consutrction expression 
-and TcRecordConstruction cenv ty env tpenv optOrigExpr objTy fldsList m =
-    let tcref = tcref_of_stripped_typ cenv.g objTy
-    let tycon = deref_tycon tcref
-    let tinst = Tastops.tinst_of_stripped_typ cenv.g objTy
-    unifyE cenv env m ty objTy;
-
-    // Types with implicit constructors can't use record or object syntax: all constructions must go through the implicit constructor 
-    if tycon.TypeContents.tcaug_adhoc |> NameMultiMap.existsInRange (fun v -> v.IsIncrClassConstructor) then 
-        errorR(Error(sprintf "Constructors for the type '%s' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression" (tycon.DisplayName),m));
-                
-    let fspecs = tycon.TrueInstanceFieldsAsList
-    // Freshen types and work out their subtype flexibility
-    let fldsList = 
-        fldsList |> List.map (fun (fname,fexpr) -> 
-              let fspec = try  fspecs |> List.find (fun fspec -> fspec.Name = fname) 
-                          with Not_found -> error (Error("The field '" ^ fname ^ "' has been been given a value, but is not present in the type '"^NicePrint.pretty_string_of_typ env.DisplayEnv objTy^"'",m))
-              let (declaredTypars,ftinst,fty) = FreshenPossibleForallTy cenv.g m TyparRigid (actual_typ_of_rfield tycon tinst fspec)
-              let flex = not (is_typar_typ cenv.g fty)
-              (fname,fexpr,declaredTypars,ftinst,fty,flex))
-
-    // Type check and generalize the supplied bindings 
-    let fldsList,tpenv = 
-        (tpenv,fldsList) ||> List.mapfold (fun tpenv (fname,fexpr,declaredTypars,ftinst,fty,flex) -> 
-              let fieldExpr,tpenv = TcExprFlex cenv flex fty env tpenv fexpr
-              (* Polymorphic fields require generializeable expressions. *)
-              if nonNil(declaredTypars) then
-              
-                  (* Canonicalize constraints prior to generalization *)
-                  let denv = env.DisplayEnv
-                  GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv,denv,m) declaredTypars;
-
-                  let freeInEnv = GeneralizationHelpers.ComputeUngeneralizableTypars env
-                  let generalizedTypars = GeneralizationHelpers.ComputeGeneralizedTypars(cenv,env,m,true,freeInEnv,false,CanGeneralizeConstrainedTypars,OptionalInline,Some(fieldExpr),declaredTypars,[],fty,false)
-                  (fname,mk_tlambda m declaredTypars (fieldExpr,fty)), tpenv
-              else  
-                  (fname,fieldExpr),tpenv)
-              
-    (* Add rebindings for unbound field when an "old value" is available *)
-    let oldFldsList = 
-      match optOrigExpr with
-      | None -> []
-      | Some (_,_,oldve') -> 
-             (* When we have an "old" value, append bindings for the unbound fields. *)
-             (* Effect order - mutable fields may get modified by other bindings... *)
-             let fieldNameUnbound nom = List.forall (fun (name,exp) -> name <> nom) fldsList
-             fspecs 
-             |> List.filter (fun rfld -> rfld.Name |> fieldNameUnbound)
-             |> List.map (fun fspec ->
-                 (* CODE REVIEW: check next line is ok to be repeated *)
-                 let (_,ftinst,fty) = FreshenPossibleForallTy cenv.g m TyparRigid (actual_typ_of_rfield tycon tinst fspec)
-                 fspec.Name, mk_recd_field_get cenv.g (oldve',rfref_of_rfield tcref fspec,tinst,ftinst,m))
-
-    let fldsList = fldsList @ oldFldsList
-
-    (* From now on only interested in fspecs that truly need values. *)
-    let fspecs = fspecs |> List.filter (fun f -> not f.IsZeroInit)
-    
-    (* Check all fields are bound *)
-    fspecs |> List.iter (fun fspec ->
-      if not (fldsList |> List.exists (fun (fname,fexpr) -> fname = fspec.Name)) then
-        error(Error("no assignment given for field '"^fspec.rfield_id.idText^"'",m)));
-
-    (* Other checks (overlap with above check now clear) *)
-    if isNone optOrigExpr then begin
-      let ns1 = Nameset.of_list (List.map fst fldsList)
-      let ns2 = Nameset.of_list (List.map (fun x -> x.rfield_id.idText) fspecs)
-      if  not (Zset.subset ns2 ns1) then 
-        error (MissingFields(Zset.elements (Zset.diff ns2 ns1),m));
-      if  not (Zset.subset ns1 ns2) then 
-        error (Error("Extraneous fields have been given values",m));
-    end;
-    (* Build record *)
-    let rfrefs = List.map (fst >> mk_rfref tcref) fldsList
-
-    (* Check accessibility: this is also done in BuildFieldMap, but also need to check *)
-    (* for fields in { new R with a=1 and b=2 } constructions and { r with a=1 }  copy-and-update expressions *)
-    rfrefs |> List.iter (fun rfref -> 
-        CheckRecdFieldAccessible m (AccessRightsOfEnv env) rfref |> ignore;
-        CheckFSharpAttributes cenv.g rfref.PropertyAttribs m |> CommitOperationResult);        
-
-    let args   = List.map snd fldsList
-    
-    let expr = mk_recd cenv.g (GetRecdInfo env, tcref, tinst, rfrefs, args, m)
-
-    let expr = 
-      match optOrigExpr with 
-      | None ->
-          (* '{ recd fields }'. *)
-          expr
-          
-      | Some (old',oldv',_) -> 
-          (* '{ recd with fields }'. *)
-          (* Assign the first object to a tmp and then construct *)
-          mk_compgen_let m oldv' old' expr
-
-    expr, tpenv
-
-//-------------------------------------------------------------------------
-// TcObjectExpr
-//------------------------------------------------------------------------- 
-
-and GetNameAndArityOfObjExprBinding cenv env b =
-    let (NormalizedBinding (_,_,_,_,_,_,_,valSynData,pat,rhsExpr,bindingRange,_)) = b
-    let (ValSynData(memberFlagsOpt,valSynInfo,_)) = valSynData 
-    match pat,memberFlagsOpt with 
-
-    // This is the normal case for F# 'with member x.M(...) = ...'
-    | Pat_instance_member(thisId,memberId,None,m),Some(memberFlags) ->
-         let logicalMethId = ident (ComputeLogicalCompiledName memberId memberFlags,memberId.idRange)
-         logicalMethId.idText,valSynInfo
-
-    | _ -> 
-        // This is for the deprecated form 'with M(...) = ...'
-        let rec lookPat pat =
-            match pat with 
-            | Pat_typed(pat,_,_) -> lookPat pat
-            | Pat_as (Pat_wild _, id,_,None,_) -> 
-                 (* let e = PushOnePatternToRhs (mksyn_this_pat_var (ident "_this" id.idRange)) e in  *)
-                let (BindingRhs(pushedPats,_,_)) = rhsExpr
-                let infosForExplicitArgs = pushedPats |> List.map SynInfo.InferArgSynInfoFromSimplePats
-                let infosForExplicitArgs = SynInfo.AdjustMemberArgs MemberKindMember infosForExplicitArgs
-                let infosForExplicitArgs = SynInfo.AdjustArgsForUnitElimination infosForExplicitArgs 
-                let argInfos = [SynInfo.selfMetadata] @ infosForExplicitArgs
-                let retInfo = SynInfo.unnamedRetVal //SynInfo.InferSynReturnData pushedRetInfoOpt
-                let valSynData = ValSynInfo(argInfos,retInfo)
-                (id.idText,valSynData)
-
-            | _ -> error(Error("Only overrides of abstract and virtual members may be specified in object expressions",bindingRange)); 
-
-        lookPat pat
-
-
-and FreshenObjExprAbstractSlot cenv (env:tcEnv) implty virtNameAndArityPairs (bind,bindName,absSlots:(_ * MethInfo) list) = 
-    let (NormalizedBinding (_,_,_,_,_,_,synTyparDecls,valSynData,_,_,bindingRange,_)) = bind 
-    match absSlots with 
-    | [] -> 
-        let absSlotsByName = List.filter (fst >> fst >> (=) bindName) virtNameAndArityPairs
-        
-        match absSlotsByName with 
-        | []              -> errorR(Error(sprintf "The member %s does not correspond to any abstract or virtual method available to override or implement" bindName,bindingRange));
-        | [(_,absSlot:MethInfo)]     -> errorR(Error(sprintf "The member %s does not accept the correct number of arguments, %d arguments are expected" bindName (List.sum absSlot.NumArgs),bindingRange));
-        | (_,absSlot:MethInfo) :: _  -> errorR(Error(sprintf "The member %s does not accept the correct number of arguments. One overload accepts %d arguments" bindName (List.sum absSlot.NumArgs),bindingRange));
-        
-        None
-        
-    | [(_,absSlot)] -> 
-        (* dprintf "nm = %s, #fmtps = %d\n" absSlot.LogicalName (List.length fmtps); *) 
-        
-        let typarsFromAbsSlotAreRigid,typarsFromAbsSlot,argTysFromAbsSlot, retTyFromAbsSlot
-           = FreshenAbstractSlot cenv.g cenv.amap bindingRange synTyparDecls absSlot
-
-        // Work out the required type of the member 
-        let bindingTy = implty --> (mk_meth_ty cenv.g argTysFromAbsSlot retTyFromAbsSlot) 
-        
-        Some(typarsFromAbsSlotAreRigid,typarsFromAbsSlot,bindingTy)
-        
-    | (_,absSlot1) :: (_,absSlot2) :: _ -> 
-        //warning(NonUniqueInferredAbstractSlot(cenv.g,env.DisplayEnv, bindName, absSlot1, absSlot2,bindingRange));
-        //fail()
-        None
-
-
-and TcObjectExprBinding cenv (env:tcEnv) tpenv (absSlotInfo,bind) =
-    // 4a1. normalize the binding (note: needlessly repeating what we've done above) 
-    let (NormalizedBinding(vis,bkind,pseudo,mut,attrs,doc,synTyparDecls,valSynData,p,bindingRhs,bindingRange,spBind)) = bind
-    let (ValSynData(memberFlagsOpt,_,_)) = valSynData 
-    // 4a2. adjust the binding, especially in the "member" case, a subset of the logic of AnalyzeAndMakeRecursiveValue 
-    let bindingRhs,logicalMethId,memberFlags = 
-        let rec pat p = 
-            match p,memberFlagsOpt with  
-            | Pat_as (Pat_wild _, id,_,_,_),None -> 
-                let bindingRhs = PushOnePatternToRhs true (mksyn_this_pat_var (ident (CompilerGeneratedName "this",id.idRange))) bindingRhs 
-                let logicalMethId = id
-                let memberFlags = OverrideMemberFlags None MemberKindMember
-                bindingRhs,logicalMethId,memberFlags
-
-            | Pat_instance_member(thisId, memberId,_,_),Some(memberFlags) -> 
-                CheckMemberFlags cenv.g None  NewSlotsOK OverridesOK memberFlags bindingRange;
-                let bindingRhs = PushOnePatternToRhs true (mksyn_this_pat_var thisId) bindingRhs
-                let logicalMethId = ident (ComputeLogicalCompiledName memberId memberFlags,memberId.idRange)
-                bindingRhs,logicalMethId,memberFlags
-            | _ -> 
-                error(InternalError("unexpect member binding",bindingRange))
-        pat p
-    let bind = NormalizedBinding (vis,bkind,pseudo,mut,attrs,doc,synTyparDecls,valSynData,mksyn_pat_var vis logicalMethId,bindingRhs,bindingRange,spBind) 
-    
-    (* 4b. typecheck the binding *)
-    let bindingTy = 
-        match absSlotInfo with
-        | Some(_,_,memberTyFromAbsSlot) -> memberTyFromAbsSlot
-        | _ -> new_inference_typ cenv ()
-
-    let (TBindingInfo(inlineFlag,immut,_,_,_,ExplicitTyparInfo(declaredTypars,_),nameToPrelimValSchemeMap,rhsExpr,_,_,m,_,_,_),tpenv) = 
-        let flex = TcNonrecBindingTyparDecls cenv env tpenv bind
-        TcNormalizedBinding ObjectExpressionOverrideBinding cenv env tpenv bindingTy None ([],flex) bind
-
-    (* 4c. generalize the binding - only relevant when implementing a generic virtual method *)
-    
-    match NameMap.range nameToPrelimValSchemeMap with 
-    | [PrelimValScheme1(id,_,_,_,_,_,_,_,_,_,_)] -> 
-        let denv = env.DisplayEnv
-
-        let declaredTypars = 
-            match absSlotInfo with
-            | Some(typarsFromAbsSlotAreRigid,typarsFromAbsSlot,_) -> 
-                if typarsFromAbsSlotAreRigid then typarsFromAbsSlot else declaredTypars
-            | _ -> 
-                declaredTypars
-        (* Canonicalize constraints prior to generalization *)
-        GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv,denv,m) declaredTypars;
-
-        let freeInEnv = GeneralizationHelpers.ComputeUngeneralizableTypars env
-
-        (* dprintf "id = %s, typarsFromAbsSlotAreRigid = %b, #declaredTypars = %d, #freeInEnv = %d\n" id.idText typarsFromAbsSlotAreRigid (List.length declaredTypars) (List.length (Zset.elements freeInEnv)); *) 
-
-        let generalizedTypars = GeneralizationHelpers.ComputeGeneralizedTypars(cenv,env,m,immut,freeInEnv,false,CanGeneralizeConstrainedTypars,inlineFlag,Some(rhsExpr),declaredTypars,[],bindingTy,false)
-        let declaredTypars = ChooseCanonicalDeclaredTyparsAfterInference cenv.g  env.DisplayEnv declaredTypars m
-
-        (* dprintf "ungen = %b\n" (declaredTypars |> List.exists (Zset.mem_of freeInEnv)); *) 
-
-        let generalizedTypars = PlaceTyparsInDeclarationOrder declaredTypars generalizedTypars  
-        (* dprintf "#generalizedTypars = %d\n" (List.length generalizedTypars); *) 
-        (id,memberFlags,(generalizedTypars +-> bindingTy),rhsExpr),tpenv
-    | _ -> error(Error("A simple method name is required here",m))
-    
-and ComputeObjectExprOverrides cenv (env:tcEnv) tpenv impls =
-    let slotImplSets = DispatchSlotChecking.GetSlotImplSets cenv.infoReader env.DisplayEnv true (impls |> List.map (fun (m,ty,_) -> ty,m))
-
-    let allImpls = 
-        (impls,slotImplSets) ||>  List.map2 (fun (m,ty,binds) implTySet -> 
-            let binds = binds |> List.map (BindingNormalization.NormalizeBinding ObjExprBinding cenv env)
-            m, ty,binds,implTySet) 
-
-    let overridesAndVirts,tpenv = 
-        (tpenv,allImpls) ||>  List.mapfold (fun tpenv (m,implty,binds, SlotImplSet(dispatchSlots,dispatchSlotsKeyed,availPriorOverrides,_) ) ->
-                
-            // 2. collect all name/arity of all overrides 
-            let virtNameAndArityPairs = dispatchSlots |> List.map (fun virt -> 
-                let vkey = (virt.LogicalName,virt.NumArgs) 
-                //dprintfn "vkey = %A" vkey
-                (vkey,virt)) 
-            let bindNameAndSynInfoPairs = binds |> List.map (GetNameAndArityOfObjExprBinding cenv env) 
-            let bindNames = bindNameAndSynInfoPairs |> List.map fst
-            let bindKeys = 
-                bindNameAndSynInfoPairs |> List.map (fun (name,valSynData) -> 
-                    // Compute the argument counts of the member arguments
-                    let argCounts = (SynInfo.AritiesOfArgs valSynData).Tail
-                    //dprintfn "name = %A, argCounts = %A" name argCounts
-                    (name,argCounts))
-
-            // 3. infer must-have types by name/arity 
-            let preAssignedVirtsPerBinding = 
-                bindKeys |> List.map (fun bkey  -> List.filter (fst >> (=) bkey) virtNameAndArityPairs) 
-            
-            let absSlotInfo = 
-               (List.zip3 binds bindNames preAssignedVirtsPerBinding)  
-               |> List.map (FreshenObjExprAbstractSlot cenv env implty virtNameAndArityPairs)
-
-            (* 4. typecheck/typeinfer/generalizer overrides using this information *)
-            let overrides,tpenv = (tpenv,List.zip absSlotInfo binds) ||> List.mapfold (TcObjectExprBinding cenv env)
-
-            (* Convert the syntactic info to actual info *)
-            let overrides = 
-                (overrides,bindNameAndSynInfoPairs) ||> List.map2 (fun (id:ident,memberFlags,ty,e) (_,valSynData) -> 
-                    let partialValInfo = TranslateTopValSynInfo id.idRange (TcAttributes cenv env) valSynData
-                    let tps,_ = try_dest_forall_typ cenv.g ty
-                    let valInfo = TranslatePartialArity tps partialValInfo
-                    DispatchSlotChecking.GetObjectExprOverrideInfo cenv.g cenv.amap (implty,id,memberFlags,ty,valInfo,e))
-
-            (m,implty,dispatchSlots,dispatchSlotsKeyed,availPriorOverrides,overrides),tpenv)
-
-    overridesAndVirts,tpenv
-
-and CheckSuperType cenv typ m = 
-    if type_equiv cenv.g typ cenv.g.system_Value_typ ||
-       type_equiv cenv.g typ cenv.g.system_Enum_typ ||
-       type_equiv cenv.g typ cenv.g.system_Array_typ ||
-       type_equiv cenv.g typ cenv.g.system_MulticastDelegate_typ ||
-       type_equiv cenv.g typ cenv.g.system_Delegate_typ then 
-         error(Error("The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array may not be used as super types in an object expression or class",m));
-       
-   
-and TcObjectExpr cenv ty env tpenv (objTy,argopt,binds,extraImpls,m) = 
-    let objTy',tpenv = TcType cenv NewTyparsOK CheckCxs env tpenv objTy
-    if not (is_stripped_tyapp_typ cenv.g objTy') then error(Error("'new' must be used with a named type",m));
-    if not (is_recd_typ cenv.g objTy') && not (is_interface_typ cenv.g objTy') && is_sealed_typ cenv.g objTy' then errorR(Error("Cannot create an extension of a sealed type",m));
-    
-    CheckSuperType cenv objTy' (range_of_syntype objTy); 
-       
-    (* Object expression members can access protected members of the implemented type *)
-    let env = EnterFamilyRegion (tcref_of_stripped_typ cenv.g objTy') env
-    let ad = AccessRightsOfEnv env
-    
-    if (* record construction *)
-       (is_recd_typ cenv.g objTy') || 
-       (* object construction *)
-       (is_fsobjmodel_typ cenv.g objTy' && not (is_interface_typ cenv.g objTy') && isNone argopt) then  
-
-        if isSome argopt then error(Error("No arguments may be given when constructing a record value",m));
-        if nonNil extraImpls then error(Error("Interface implementations may not be given on construction expressions",m));
-        if is_fsobjmodel_typ cenv.g objTy' && GetCtorShapeCounter env <> 1 then 
-            error(Error("Object construction expressions may only be used to implement constructors in class types",m));
-        let fldsList = 
-            binds |> List.map (fun b -> 
-                match BindingNormalization.NormalizeBinding ObjExprBinding cenv env b with 
-                | NormalizedBinding (_,_,_,_,[],_,_,_,Pat_as(Pat_wild _, id,_,_,_),BindingRhs(_,_,rhsExpr),_,_) -> id.idText,rhsExpr
-                | _ -> error(Error("Only simple bindings of the form 'id = expr' can be used in construction expressions",m)))
-        
-        TcRecordConstruction cenv ty env tpenv None objTy' fldsList m
-    else
-        let item,rest = ForceRaise (ResolveObjectConstructor cenv.nameResolver env.DisplayEnv m ad objTy')
-
-        if nonNil rest then error(InternalError("Unexpected rest from ResolveObjectConstructor",m));
-
-        if is_fsobjmodel_typ cenv.g objTy' && GetCtorShapeCounter env = 1 then 
-            error(Error("Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field",m));
-
-      (* Work out the type of any interfaces to implement *)
-        let extraImpls,tpenv = 
-          (tpenv , extraImpls) ||> List.mapfold (fun tpenv (InterfaceImpl(ity,overrides,m)) -> 
-              let ity',tpenv = TcType cenv NewTyparsOK CheckCxs env tpenv ity
-              if not (is_interface_typ cenv.g ity') then
-                error(Error("Expected an interface type",m));
-              (m,ity',overrides),tpenv)
-
-        let realObjTy = (if is_obj_typ cenv.g objTy' && nonNil extraImpls then (p23 (List.hd extraImpls)) else objTy')
-        unifyE cenv env m ty realObjTy;
-
-        let ctorCall,baseIdOpt,tpenv =
-            match item,argopt with 
-            | Item_ctor_group(methodName,minfos),Some (arg,baseIdOpt) -> 
-                let meths = minfos |> List.map (fun minfo -> minfo,None) 
-                let ad = AccessRightsOfEnv env
-                let expr,tpenv = TcMethodApplicationThen cenv env objTy' tpenv None [] m methodName ad PossiblyMutates false meths CtorValUsedAsSuperInit [arg] ExprAtomicFlag.Atomic [] 
-                // The 'base' value is always bound
-                let baseIdOpt = (match baseIdOpt with None -> Some(ident("base",m)) | Some id -> Some(id))
-                expr,baseIdOpt,tpenv
-            | Item_fake_intf_ctor ityp,None -> 
-                unifyE cenv env m objTy' ityp;
-                let expr = mk_obj_ctor_call cenv.g m
-                expr,None,tpenv
-            | Item_fake_intf_ctor _,Some _ -> 
-                error(Error("Constructor expressions for interfaces do not take arguments",m));
-            | Item_ctor_group _,None -> 
-                error(Error("This object constructor requires arguments",m));
-            | _ -> error(Error("'new' may only be used with object constructors",m))
-
-        let baseValOpt = MakeAndPublishBaseVal cenv env baseIdOpt objTy'
-        let env = Option.fold_right (AddLocalVal m) baseValOpt env
-        
-        
-        let impls = (m,objTy',binds) :: extraImpls
-        
-        
-        (* 1. collect all the relevant abstract slots for each type we have to implement *)
-        
-        let overridesAndVirts,tpenv = ComputeObjectExprOverrides cenv env tpenv impls
-
-    
-        overridesAndVirts |> List.iter (fun (m,implty,dispatchSlots,dispatchSlotsKeyed,availPriorOverrides,overrides) -> 
-            let ovspecs = overrides |> List.map fst
-            DispatchSlotChecking.CheckOverridesAreAllUsedOnce env.DisplayEnv cenv.g cenv.amap (m,implty,dispatchSlotsKeyed,ovspecs);
-            DispatchSlotChecking.CheckDispatchSlotsAreImplemented (env.DisplayEnv,cenv.g,cenv.amap,m,false,implty,dispatchSlots,availPriorOverrides,ovspecs) |> ignore);
-        
-      (* 6c. create the specs of overrides *)
-        let allTypeImpls = 
-          overridesAndVirts |> List.map (fun (m,implty,_,dispatchSlotsKeyed,_,overrides) -> 
-              let overrides' = overrides |> List.map (fun overrideMeth -> 
-                    let (Override(_, id,(mtps,_),_,_,_) as ovinfo),(_,thisVal,methodVars,body) = overrideMeth
-                    let overridden = 
-                        match NameMultiMap.find id.idText dispatchSlotsKeyed |> List.tryfind (fun virt -> DispatchSlotChecking.is_exact_match cenv.g cenv.amap m virt ovinfo) with 
-                        | Some x -> x
-                        | None -> error(Error("At least one override did not correctly implement its corresponding abstract member",range_of_syntype objTy))
-                    //let _,_,methodVars,body',_ = IteratedAdjustArityOfLambdaBody cenv.g (List.map List.length vs) vs body 
-                    TObjExprMethod(SlotSigOfMethodInfo cenv.amap m overridden, mtps, [thisVal]::methodVars,body,id.idRange))
-              (implty,overrides'))
-            
-        let (objTy',overrides') = allTypeImpls.Head
-        let extraImpls = allTypeImpls.Tail
-        
-      (* 7. Build the implementation *)
-        let expr = mk_obj_expr(objTy', baseValOpt, ctorCall, overrides',extraImpls,m)
-        let expr = mk_coerce_if_needed cenv.g realObjTy objTy' expr
-        expr,tpenv
-
-
-
-//-------------------------------------------------------------------------
-// TcConstStringExpr
-//------------------------------------------------------------------------- 
-
-(* Check a constant string expression. It might be a 'printf' format string *)
-and TcConstStringExpr cenv ty env m tpenv s  =
-
-    if (AddCxTypeEqualsTypeUndoIfFailed env.DisplayEnv cenv.css m ty cenv.g.string_ty) then 
-      mk_string cenv.g m s,tpenv
-    else 
-      let aty = new_inference_typ cenv ()
-      let bty = new_inference_typ cenv ()
-      let cty = new_inference_typ cenv ()
-      let dty = new_inference_typ cenv ()
-      let ety = new_inference_typ cenv ()
-      let ty' = mk_format_ty cenv.g aty bty cty dty ety
-      if (not (is_obj_typ cenv.g ty) && AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m ty ty') then 
-        // Parse the format string to work out the phantom types 
-        let aty',ety' = (try Formats.ParseFormatString m cenv.g s bty cty dty with Failure s -> error (Error(s,m)))
-        unifyE cenv env m aty aty';
-        unifyE cenv env m ety ety';
-        mk_call_new_format cenv.g m aty bty cty dty ety (mk_string cenv.g m s),tpenv
-      else 
-        unifyE cenv env m ty cenv.g.string_ty;
-        mk_string cenv.g m s,tpenv
-
-//-------------------------------------------------------------------------
-// TcConstExpr
-//------------------------------------------------------------------------- 
-
-(* Check a constant expression. *)
-and TcConstExpr cenv ty env m tpenv c  =
-    match c with 
-
-    (* NOTE: these aren't "really" constants *)
-    | Const_bytearray (bytes,m) -> 
-       unifyE cenv env m ty (mk_bytearray_ty cenv.g); 
-       TExpr_op(TOp_bytes bytes,[],[],m),tpenv
-
-    | Const_uint16array arr -> 
-       unifyE cenv env m ty (mk_array_typ cenv.g cenv.g.uint16_ty); TExpr_op(TOp_uint16s arr,[],[],m),tpenv
-
-    | Const_bignum (s,suffix) -> 
-        let expr = 
-            let modName = ("NumericLiteral"^suffix)
-            let ad = AccessRightsOfEnv env
-            match ResolveLongIndentAsModuleOrNamespace OpenQualified env.eNameResEnv ad [ident (modName,m)] with 
-            | Result []
-            | Exception _ -> error(Error(sprintf "This numeric literal requires that a module '%s' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope" modName,m))
-            | Result ((_,mref,mtyp) :: _) -> 
-                let expr = 
-                    try 
-                        let i32 = int32 s  
-                        if i32 = 0 then Expr_app(ExprAtomicFlag.Atomic, mksyn_lid_get m [modName] "FromZero",Expr_const(Const_unit,m),m)
-                        elif i32 = 1 then Expr_app(ExprAtomicFlag.Atomic, mksyn_lid_get m [modName] "FromOne",Expr_const(Const_unit,m),m)
-                        else Expr_app(ExprAtomicFlag.Atomic, mksyn_lid_get m [modName] "FromInt32",Expr_const(Const_int32 i32,m),m)
-                    with _ -> 
-                      try 
-                         let i64 = int64 s  
-                         Expr_app(ExprAtomicFlag.Atomic, mksyn_lid_get m [modName] "FromInt64",Expr_const(Const_int64 i64,m),m)
-                      with _ ->             
-                        Expr_app(ExprAtomicFlag.Atomic, mksyn_lid_get m [modName] "FromString",Expr_const(Const_string (s,m),m),m) 
-                let ccu = ccu_of_tcref mref
-                if isSome ccu && ccu_eq ccu.Value cenv.g.fslibCcu && suffix = "I" then 
-                    Expr_typed(expr,Type_lid(path_to_lid m ["Microsoft";"FSharp";"Math";"bigint"],m),m)
-                else
-                    expr
-
-        TcExpr cenv ty env tpenv expr
-
-    | _ -> 
-        let c' = TcConst cenv ty m env c
-        TExpr_const (c',m,ty),tpenv
-
-
-//-------------------------------------------------------------------------
-// TcAssertExpr
-//------------------------------------------------------------------------- 
-
-(* Check an 'assert(x)' expression. *)
-and TcAssertExpr cenv ty env m tpenv x  =
-    let callDiagnosticsExpr = Expr_app(ExprAtomicFlag.Atomic, mksyn_lid_get m ["System";"Diagnostics";"Debug"] "Assert", 
-                                       (* wrap an extra parentheses so 'assert(x=1) isn't considered a named argument to a method call *)
-                                       Expr_paren(x,m), m)
-
-    TcExpr cenv ty env tpenv callDiagnosticsExpr
-
-
-
-//-------------------------------------------------------------------------
-// TcRecdExpr
-//------------------------------------------------------------------------- 
-
-and TcRecdExpr cenv ty env tpenv (inherits,optOrigExpr,flds,m) =
-
-    let requiresCtor = (GetCtorShapeCounter env = 1) (* Get special expression forms for constructors *)
-    let haveCtor = (isSome inherits)
-
-    let optOrigExpr,tpenv = 
-      match optOrigExpr with 
-      | None -> None, tpenv 
-      | Some e -> 
-          if isSome inherits then error(Error("Invalid record construction",m));
-          let e',tpenv = TcExpr cenv ty env tpenv e
-          let v',ve' = Tastops.mk_compgen_local m "inputRecord" ty
-          Some (e',v',ve'), tpenv
-
-    let fldsList = 
-        match flds with 
-        | [] -> []
-        | _ -> 
-            let tcref,fldsmap,fldsList = BuildFieldMap cenv env (isSome(optOrigExpr)) ty flds m
-            let _,_,_,gtyp = info_of_tcref cenv m env tcref
-            unifyE cenv env m ty gtyp;      
-            fldsList
-
-    if isSome optOrigExpr && not (is_recd_typ cenv.g ty) then 
-        errorR(Error("The expression form { expr with ... } may only be used with record types. To build object types use { new Type(...) with ... }",m));
-
-    if requiresCtor || haveCtor then 
-        if not (is_fsobjmodel_typ cenv.g ty) then 
-            // Deliberate no-recovery failure here to prevent cascading internal errors
-            error(Error("The inherited type is not an object model type",m));
-        if not requiresCtor then 
-            errorR(Error("Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors",m));
-    else
-        if isNil flds then error(Error("'{ }' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'",m));
-        if is_fsobjmodel_typ cenv.g ty then errorR(Error("This type is not a record type. Values of class and struct types must be created using calls to object constructors",m))
-        elif not (is_recd_typ cenv.g ty) then errorR(Error("This type is not a record type",m));
-
-    let superTy,tpenv = 
-        match inherits, SuperTypeOfType cenv.g cenv.amap m ty with 
-        | Some (superTyp,arg,m), Some(realSuperTyp) ->
-            (* Constructor expression, with an explicit 'inheritedTys clause. Check the inherits clause. *)
-            let e,tpenv = TcExpr cenv realSuperTyp  env tpenv (Expr_new(true,superTyp,arg,m))
-            Some(e),tpenv
-        | None, Some(realSuperTyp) when requiresCtor -> 
-            (* Constructor expression, No 'inheritedTys clause, hence look for a default constructor *)
-            let e,tpenv = TcNewExpr cenv env tpenv realSuperTyp None true (Expr_const (Const_unit,m)) m
-            Some(e),tpenv
-        | None,_ -> 
-            None,tpenv
-        | _, None -> 
-            errorR(InternalError("Unexpected failure in getting super type",m));
-            None,tpenv
-
-    let expr,tpenv = 
-        TcRecordConstruction cenv ty env tpenv optOrigExpr  ty fldsList m
-
-    let expr = 
-        match superTy with 
-        | _ when is_struct_typ cenv.g ty -> expr
-        | Some(e) -> mk_compgen_seq m e expr
-        | None -> expr
-    expr,tpenv
-
-
-//-------------------------------------------------------------------------
-// TcForEachExpr 
-//------------------------------------------------------------------------- 
- 
-and TcForEachExpr cenv ty env tpenv (pat,enumExpr,body,m,spForLoop)  =
-    unifyE cenv env m ty cenv.g.unit_ty;
-    let enumExpr',iety,tpenv = 
-        let env = ExitFamilyRegion env
-        TcExprOfUnknownType cenv env tpenv enumExpr
-    let ienumeratorv, ienumeratore,_,enumElemTy,getEnumE,getEnumTy,guarde,_,currente = AnalyzeArbitraryExprAsEnumerable cenv env (range_of_expr enumExpr') iety enumExpr'
-    let pat',_,vspecs,envinner,tpenv = TcMatchPattern cenv enumElemTy env tpenv (pat,None)
-    let idv,ide,pat'' =      
-        (* nice: don't introduce awful temporary for r.h.s. in the 99% case where we know what we're binding it to *)
-        match pat' with
-        | TPat_as (pat1,PBind(v,TypeScheme([],_,_)),m1) -> 
-              v,expr_for_val v.Range v, pat1
-        | _ -> 
-              let tmp,tmpe = Tastops.mk_compgen_local m "forLoopVar" enumElemTy
-              tmp,tmpe,pat'
-
-(*      let idv,ide = Tastops.mk_local id.idRange id.idText enumElemTy in *)
-(*      let envinner = AddLocalVal m idv env in  *)
-    let body',tpenv = TcStmt cenv envinner tpenv body
-    let body' = 
-        let valsDefinedByMatching = FlatListSet.remove vspec_eq idv vspecs
-        CompilePatternForMatch cenv env m m false Incomplete (idv,[]) 
-            [TClause(pat'',None,TTarget(valsDefinedByMatching,body',SequencePointAtTarget),m);
-             TClause(TPat_wild(range_of_expr body'),None,TTarget(FlatList.empty,mk_unit cenv.g m,SuppressSequencePointAtTarget),m) ] ty
-    let forLoop =  
-        match enumExpr' with 
-        (* optimize 'for i in n .. m do' *)
-        | TExpr_app(TExpr_val(vf,_,_),_,[tyarg],[start';finish'],_) 
-             when cenv.g.vref_eq vf cenv.g.range_op_vref && type_equiv cenv.g tyarg cenv.g.int_ty -> 
-               mk_fast_for_loop  cenv.g (spForLoop,m,idv,start',true,finish',body')
-        | _ -> 
-
-            let cleanupE = BuildDisposableCleanup cenv env m ienumeratorv
-            let spBind = (match spForLoop with SequencePointAtForLoop(spStart) -> SequencePointAtBinding(spStart) | NoSequencePointAtForLoop -> NoSequencePointAtStickyBinding)
-            (mk_let spBind (range_of_expr getEnumE)  ienumeratorv getEnumE
-                (mk_try_finally cenv.g (mk_while cenv.g (NoSequencePointAtWhileLoop, guarde,mk_compgen_let (range_of_expr body') idv currente body',m),cleanupE,m,cenv.g.unit_ty,NoSequencePointAtTry,NoSequencePointAtFinally)))
-    forLoop, tpenv
-
-//-------------------------------------------------------------------------
-// TcQuotationExpr
-//------------------------------------------------------------------------- 
-
-and TcQuotationExpr cenv ty env tpenv (oper,raw,ast,m) =
-    let astTy = new_inference_typ cenv ()
-
-    // Assert the overall type for the domain of the quotation template
-    unifyE cenv env m ty (if raw then mk_raw_expr_ty cenv.g else mk_expr_ty cenv.g astTy); 
-
-    // Check the expression 
-    let expr,tpenv = TcExpr cenv astTy env tpenv ast  
-    
-    // Wrap the expression
-    let expr = TExpr_quote(expr,ref None, m,ty)
-
-    // Coerce it if needed
-    let expr = if raw then mk_coerce(expr,(mk_raw_expr_ty cenv.g),m,(type_of_expr cenv.g expr)) else expr
-
-    // We serialize the quoted expression to bytes in Ilxgen after type inference etc. is complete. 
-    expr,tpenv
-
-
-//-------------------------------------------------------------------------
-// TcComputationExpression
-//------------------------------------------------------------------------- 
-
-and TcComputationExpression cenv (env:tcEnv) ty m interpValOpt tpenv comp = 
-    //dprintfn "TcComputationExpression, comp = \n%A\n-------------------\n" comp
-    let ad = AccessRightsOfEnv env
-
-    match interpValOpt with 
-    
-    // This case is used for all computation expressions except sequence expressions
-    | Some (interpExpr,interpExprTy) -> 
-
-        let interpVarName = CompilerGeneratedName "builder"
-        let interpVarRange = range_of_expr interpExpr
-        let interpVar = mksyn_item interpVarRange interpVarName
-
-        let mksynCall nm m args = 
-            let args = 
-                match args with 
-                | [] -> Expr_const(Const_unit,m)
-                | [arg] -> Expr_paren(Expr_paren(arg,m),m)
-                | args -> Expr_paren(Expr_tuple(args,m),m)
-                
-            Expr_app (ExprAtomicFlag.NonAtomic, Expr_lvalue_get(interpVar,[mksyn_id m nm], m), args,m)
-
-        let rec tryTrans comp =
-            match comp with 
-            | Expr_foreach (spForLoop,SeqExprOnly(seqExprOnly),pat,pseudoEnumExpr,innerComp,_) -> 
-                let m = (range_of_synexpr pseudoEnumExpr)
-                let spBind = (match spForLoop with SequencePointAtForLoop(spStart) -> SequencePointAtBinding(spStart) | NoSequencePointAtForLoop -> NoSequencePointAtStickyBinding)
-                Some(mksynCall "For" m [pseudoEnumExpr; mksyn_match_lambda(false,false,m,[Clause(pat,None, trans innerComp,m,SequencePointAtTarget)],spBind) ])
-
-            | Expr_for (spBind,id,start,dir,finish,innerComp,m) ->
-                Some(trans (elim_fast_integer_for_loop (spBind,id,start,dir,finish,innerComp,m)))
-
-            | Expr_while (spWhile,guardExpr,innerComp,m) -> 
-                let guardRange = (range_of_synexpr guardExpr)
-                let innerRange = (range_of_synexpr innerComp)
-                Some(mksynCall "While" m [mksyn_delay guardRange guardExpr; mksynCall "Delay" innerRange [mksyn_delay innerRange (trans innerComp)]])
-
-            | Expr_try_finally (innerComp,unwindExpr,mTryToLast,spTry,spFinally) ->
-                let m = (range_of_synexpr unwindExpr)
-                Some(mksynCall "TryFinally" mTryToLast [mksynCall "Delay" mTryToLast [mksyn_delay (range_of_synexpr innerComp) (trans innerComp)]; mksyn_delay m unwindExpr])
-
-            | Expr_paren (_,m) -> 
-                error(Error("This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder { ... }'",m))
-
-            | Comp_zero m -> 
-                Some(mksynCall "Zero" m [])
-
-            // "do! expr; cexpr" is treated as { let! () = expr in cexpr }
-            // "expr; cexpr" is treated as sequential execution
-            // "cexpr; cexpr" is treated as builder.Combine(cexpr1,cexpr1)
-            | Expr_seq(sp,true,innerComp1, innerComp2,m) -> 
-                match tryTrans innerComp1 with 
-                | Some c -> 
-                    let m1 = (range_of_synexpr innerComp1)
-                    let m2 = (range_of_synexpr innerComp2)
-                    Some(mksynCall "Combine" m1 [c; mksynCall "Delay" m2 [mksyn_delay m2 (trans innerComp2)]])
-                | None -> 
-                    match innerComp1 with 
-                    | Comp_do_bind(synInputExpr,m) -> 
-                        let sp = 
-                           match sp with 
-                           | SuppressSequencePointOnStmtOfSequential -> SequencePointAtBinding m
-                           | SuppressSequencePointOnExprOfSequential -> NoSequencePointAtDoBinding 
-                           | SequencePointsAtSeq -> SequencePointAtBinding m
-                        Some(trans (Comp_bind(sp, false,Pat_const(Const_unit,range_of_synexpr synInputExpr), synInputExpr,innerComp2,m)))
-                    | _ -> 
-                        Expr_seq(sp,true, innerComp1, trans innerComp2,m) |> Some
-
-            | Expr_cond (guardExpr,thenComp,elseCompOpt,spIfToThen,mIfToThen,mIfToEndOfElseBranch) ->
-                //if seqExprOnly then warning (Error("'when' clauses should only be used inside compact sequence expressions. Consider using 'if guardExpr then ...' in computation expressions",m));
-                let elseComp = (match elseCompOpt with Some c -> c | None -> Comp_zero mIfToThen)
-                Some(Expr_cond(guardExpr, trans thenComp, Some(trans elseComp), spIfToThen,mIfToThen,mIfToEndOfElseBranch))
-
-            // 'let binds in expr'
-            | Expr_let (isRec,false,binds,innerComp,m) ->
-                Some(Expr_let (isRec,false,binds,trans innerComp,m))
-
-            // 'use x = expr in expr'
-            | Expr_let (isRec,true,[Binding (vis,NormalBinding,pseudo,mut,attrs,doc,valSynData,pat,BindingRhs([],_,rhsExpr),bindingRange,spBind)],innerComp,m) ->
-                let consumeExpr = mksyn_match_lambda(false,false,m,[Clause(pat,None, trans innerComp,range_of_synexpr innerComp,SequencePointAtTarget)],spBind)
-                Some(mksynCall "Using" m [rhsExpr; consumeExpr ])
-
-            // 'let! x = expr in expr'
-            | Comp_bind(spBind,false,pat,synInputExpr,innerComp,m) -> 
-
-                let bindRange = match spBind with SequencePointAtBinding(m) -> m | _ -> range_of_synexpr synInputExpr
-                let innerRange = range_of_synexpr innerComp
-                let consumeExpr = mksyn_match_lambda(false,false,innerRange,[Clause(pat,None, trans innerComp,innerRange,SequencePointAtTarget)],spBind)
-                Some(mksynCall "Bind"  bindRange [synInputExpr; consumeExpr ])
-
-            // 'use! x = e1 in e2' --> build.Bind(e1,(fun x -> build.Using(x,(fun () -> e2))))
-            | Comp_bind(spBind,true,(Pat_as (Pat_wild _, id, false, _, _) as pat) ,synInputExpr,innerComp,m) -> 
-
-                let consumeExpr = mksyn_match_lambda(false,false,m,[Clause(pat,None, trans innerComp,range_of_synexpr innerComp,SequencePointAtTarget)],spBind)
-                let consumeExpr = mksynCall "Using" m [Expr_id_get(id); consumeExpr ]
-                let consumeExpr = mksyn_match_lambda(false,false,m,[Clause(pat,None, consumeExpr,m,SequencePointAtTarget)],spBind)
-                Some(mksynCall "Bind" m [synInputExpr; consumeExpr])
-
-            | Expr_match (spMatch,expr,clauses,false,m) ->
-                let clauses = clauses |> List.map (fun (Clause(pat,cond,innerComp,patm,sp)) -> Clause(pat,cond,trans innerComp,patm,sp))
-                Some(Expr_match(spMatch,expr, clauses, false,m))
-
-            | Expr_try_catch (innerComp,mTryToWith,clauses,mWithToLast,mTryToLast,spTry,spWith) ->
-                let clauses = clauses |> List.map (fun (Clause(pat,cond,innerComp,patm,sp)) -> Clause(pat,cond,trans innerComp,patm,sp))
-                let consumeExpr = mksyn_match_lambda(false,true,m,clauses,NoSequencePointAtStickyBinding)
-                Some(mksynCall "TryWith" mTryToLast [mksynCall "Delay" m [mksyn_delay m (trans innerComp)]; consumeExpr])
-
-            | Comp_yieldm((isTrueYield,isTrueReturn),yieldExpr,m) -> 
-                if not isTrueReturn then errorR(Error("Within computation expressions, use 'return!' instead of '->>' or 'yield! ",m));
-                Some(yieldExpr )
-
-            | Comp_yield((isTrueYield,isTrueReturn),yieldExpr,m) -> 
-                Some(mksynCall (if isTrueYield then "Yield" else "Return") m [yieldExpr])
-
-            | e -> None
-        and trans c = 
-            match tryTrans c with 
-            | Some e -> e
-            | None -> 
-                // This only occurs in final position in a sequence
-                match c with 
-                // "do! expr;" in final position is treated as { let! () = expr in return () }
-                | Comp_do_bind(synInputExpr,m) -> 
-                    trans (Comp_bind(NoSequencePointAtDoBinding, false,Pat_const(Const_unit,range_of_synexpr synInputExpr), synInputExpr,Comp_yield((false,true),Expr_const(Const_unit,m),m),m))
-                // "expr;" in final position is treated as { expr; zero }
-                // Suppress the sequence point on the "zero"
-                | _ -> 
-                    Expr_seq(SuppressSequencePointOnStmtOfSequential,true, c,trans (Comp_zero m),m) 
-
-        let coreSynExpr = trans comp
-
-        let delayedExpr = 
-            let m = range_of_synexpr coreSynExpr
-            match TryFindMethInfo cenv.infoReader m ad "Delay" interpExprTy with 
-            | [] -> coreSynExpr
-            | _ -> mksynCall "Delay" m [(mksyn_delay m coreSynExpr)]
-            
-        let runExpr = 
-            let m = range_of_synexpr delayedExpr
-            match TryFindMethInfo cenv.infoReader m ad "Run" interpExprTy with 
-            | [] -> delayedExpr
-            | _ -> mksynCall "Run" m [delayedExpr]
-
-        let lambdaExpr = Expr_lambda (false,false,SPats ([mksyn_spat_var false (mksyn_id interpVarRange interpVarName)],interpVarRange), runExpr, interpVarRange)
-
-        let lambdaExpr ,tpenv= TcExpr cenv (interpExprTy --> ty) env tpenv lambdaExpr
-        // beta-var-reduce to bind the builder using a 'let' binding
-        let coreExpr = mk_appl cenv.g ((lambdaExpr,type_of_expr cenv.g lambdaExpr),[],[interpExpr],interpVarRange)
-
-        coreExpr,tpenv
-
-    // This case is used for sequence expressions
-    | None -> 
-
-        let mkDelayedExpr coreExpr = 
-            let m = range_of_expr coreExpr
-            let ty = type_of_expr cenv.g coreExpr
-            mk_seq_delay cenv env m ty coreExpr
-
-        let rec try_tc_comp env genOuterTy tpenv comp =
-            match comp with 
-            | Expr_foreach (spBind,SeqExprOnly(seqExprOnly),pat,pseudoEnumExpr,innerComp,m) -> 
-                // This expression is not checked with the knowledge it is an IEnumerable, since we permit other enumerable types with GetEnumerator/MoveNext methods, as does C# 
-                let pseudoEnumExpr,arb_ty,tpenv = TcExprOfUnknownType cenv env tpenv pseudoEnumExpr
-                let enumExpr,enumElemTy = ConvertArbitraryExprToEnumerable cenv arb_ty env pseudoEnumExpr
-                let pat',_,vspecs,envinner,tpenv = TcMatchPattern cenv enumElemTy env tpenv (pat,None)
-                let innerExpr,tpenv = tc_comp envinner genOuterTy tpenv innerComp
-                
-                match pat', vspecs, innerExpr with 
-                // peephole optimization: "for x in e1 -> e2" == "e1 |> List.map (fun x -> e2)" *)
-                | (TPat_as (TPat_wild _,PBind (v,_),_), 
-                   vs,  
-                   TExpr_app(TExpr_val(vf,_,_),_,[genEnumElemTy],[yexpr],_)) 
-                      when vs.Length = 1 && cenv.g.vref_eq vf cenv.g.seq_singleton_vref ->
-          
-                    let enumExprMark = (range_of_expr enumExpr)
-                    let lam = mk_lambda enumExprMark v (yexpr,genEnumElemTy)
-                    
-                    // SEQUENCE POINTS: need to build a let here consuming spBind
-                    let enumExpr = mk_coerce_if_needed cenv.g (mk_seq_ty cenv.g enumElemTy) (type_of_expr cenv.g enumExpr) enumExpr
-                    Some(mk_call_seq_map cenv.g m enumElemTy genEnumElemTy lam enumExpr,tpenv)
-
-                | _ -> 
-                    let enumExprMark = (range_of_expr enumExpr)
-
-                    // SEQUENCE POINTS: need to build a let here consuming spBind
-
-                    let matchv,matchExpr = conv_tcomp_match_clauses cenv env enumExprMark (pat',vspecs) innerExpr enumElemTy genOuterTy m
-                    let lam = mk_lambda enumExprMark matchv (matchExpr,type_of_expr cenv.g matchExpr)
-                    Some(mk_seq_map_concat cenv env m enumElemTy genOuterTy lam enumExpr , tpenv)
-
-            | Expr_for (spBind,id,start,dir,finish,innerComp,m) ->
-                Some(tc_comp env genOuterTy tpenv (elim_fast_integer_for_loop (spBind,id,start,dir,finish,innerComp,m)))
-
-            | Expr_while (spWhile,guardExpr,innerComp,m) -> 
-                let guardExpr,tpenv = TcExpr cenv cenv.g.bool_ty env tpenv guardExpr
-                let innerExpr,tpenv = tc_comp env genOuterTy tpenv innerComp
-    
-                let guardExprMark = (range_of_expr guardExpr)
-                let guardExpr = mk_unit_delay_lambda cenv.g guardExprMark guardExpr
-                let innerExpr = mkDelayedExpr innerExpr
-                Some(mk_seq_generated cenv env guardExprMark genOuterTy guardExpr innerExpr, tpenv)
-
-            | Expr_try_finally (innerComp,unwindExpr,mTryToLast,spTry,spFinally) ->
-                let m = range_of_synexpr unwindExpr
-                let innerExpr,tpenv = tc_comp env genOuterTy tpenv innerComp
-                let unwindExpr,tpenv = TcExpr cenv cenv.g.unit_ty env tpenv unwindExpr
-            
-                let unwindExprMark = (range_of_expr unwindExpr)
-                let unwindExpr = mk_unit_delay_lambda cenv.g unwindExprMark unwindExpr
-                let innerExpr = mkDelayedExpr innerExpr
-                let innerExprMark = (range_of_expr innerExpr)
-                
-                Some(mk_seq_finally cenv env innerExprMark genOuterTy innerExpr unwindExpr, tpenv)
-            | Expr_paren (_,m) -> 
-                error(Error("This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {... }'",m))
-
-            | Comp_zero m -> 
-                Some(mk_seq_empty cenv env m genOuterTy,tpenv )
-
-            | Comp_do_bind(synInputExpr,m) -> 
-                error(Error("'do!' may not be used within sequence expressions",m))
-
-            | Expr_seq(sp,true,innerComp1, innerComp2,m) -> 
-                // "expr; cexpr" is treated as sequential execution
-                // "cexpr; cexpr" is treated as append
-                match try_tc_comp env genOuterTy tpenv innerComp1 with 
-                | None -> 
-                    let innerExpr1,tpenv = TcStmtThatCantBeCtorBody cenv env tpenv innerComp1
-                    let innerExpr2,tpenv = tc_comp env genOuterTy tpenv innerComp2
-
-                    Some(TExpr_seq(innerExpr1,innerExpr2,NormalSeq,sp,m),tpenv)
-
-                | Some (innerExpr1,tpenv) ->
-                    let innerExpr2,tpenv = tc_comp env genOuterTy tpenv innerComp2
-                    let innerExpr2 = mkDelayedExpr innerExpr2
-                    Some(mk_seq_append cenv env (range_of_synexpr innerComp1) genOuterTy innerExpr1 innerExpr2, tpenv)
-
-            | Expr_cond (guardExpr,thenComp,elseCompOpt,spIfToThen,mIfToThen,mIfToEndOfElseBranch) ->
-                let guardExpr',tpenv = TcExpr cenv cenv.g.bool_ty env tpenv guardExpr
-                let thenExpr,tpenv = tc_comp env genOuterTy tpenv thenComp
-                let elseComp = (match elseCompOpt with Some c -> c | None -> Comp_zero mIfToThen)
-                let elseExpr,tpenv = tc_comp env genOuterTy tpenv elseComp
-                Some(mk_cond spIfToThen SequencePointAtTarget mIfToEndOfElseBranch genOuterTy guardExpr' thenExpr elseExpr, tpenv)
-
-            // 'let x = expr in expr'
-            | Expr_let (isRec,false (* not a 'use' binding *),binds,body,m) ->
-                TcLinearLetExprs 
-                    (fun ty envinner tpenv e -> tc_comp envinner ty tpenv e) 
-                    cenv env ty 
-                    (fun x -> x) 
-                    tpenv 
-                    (false(* don't consume 'use' bindings*),isRec,false,binds,body,m)  |> Some
-
-            // 'use x = expr in expr'
-            | Expr_let (isRec,true,[Binding (vis,NormalBinding,_,_,_,_,_,pat,BindingRhs([],_,synInputExpr),_,spBind)],innerComp,wholeExprMark) ->
-
-                let bindPatTy = new_inference_typ cenv ()
-                let inputExprTy = new_inference_typ cenv ()
-                let pat',_,vspecs,envinner,tpenv = TcMatchPattern cenv bindPatTy env tpenv (pat,None)
-                unifyE cenv env m inputExprTy bindPatTy;
-                let inputExpr,tpenv = TcExpr cenv inputExprTy env tpenv synInputExpr
-                let innerExpr,tpenv = tc_comp envinner genOuterTy tpenv innerComp
-                let inputExprTy = type_of_expr cenv.g inputExpr
-                let innerExprMark = range_of_expr innerExpr  
-                let inputExprMark = range_of_expr inputExpr
-                let matchv,matchExpr = conv_tcomp_match_clauses cenv env inputExprMark (pat',vspecs) innerExpr bindPatTy genOuterTy wholeExprMark
-                let consumeExpr = mk_lambda wholeExprMark matchv (matchExpr,genOuterTy)
-                //SEQPOINT NEEDED - we must consume spBind on this path
-                Some(mk_seq_using cenv env wholeExprMark bindPatTy genOuterTy inputExpr consumeExpr, tpenv)
-
-            | Comp_bind(spBind,isUse,pat,synInputExpr,innerComp,m) -> 
-                error(Error("The use of 'let! x = coll' in sequence expressions is no longer permitted. Use 'for x in coll' instead",m))
-
-            | Expr_match (spMatch,expr,clauses,false,m) ->
-                let inputExpr,matchty,tpenv = TcExprOfUnknownType cenv env tpenv expr
-                let tclauses,tpenv = 
-                    List.mapfold 
-                        (fun tepnv (Clause(pat,cond,innerComp,patm,sp)) ->
-                              let pat',cond',vspecs,envinner,tpenv = TcMatchPattern cenv matchty env tpenv (pat,cond)
-                              let innerExpr,tpenv = tc_comp envinner genOuterTy tpenv innerComp
-                              TClause(pat',cond',TTarget(vspecs, innerExpr,sp),RangeOfPat pat'),tpenv)
-                        tpenv
-                        clauses
-                let inputExprTy = type_of_expr cenv.g inputExpr
-                let inputExprMark = (range_of_expr inputExpr)
-                let matchv,matchExpr = CompilePatternForMatchClauses cenv env inputExprMark inputExprMark true Incomplete inputExprTy genOuterTy tclauses 
-                Some(mk_let spMatch inputExprMark matchv inputExpr matchExpr, tpenv)
-
-            | Expr_try_catch (innerComp,mTryToWith,clauses,mWithToLast,mTryToLast,spTry,spWith) ->
-                error(Error("'try'/'with' may not be used within sequence expressions",mTryToWith))
-
-            | Comp_yieldm((isTrueYield,isTrueReturn),yieldExpr,m) -> 
-                let resultExpr,genExprTy,tpenv = TcExprOfUnknownType cenv env tpenv yieldExpr
-
-                if not isTrueYield then errorR(Error("In sequence expressions, multiple results are generated using 'yield!'",m)) ;
-
-                AddCxTypeMustSubsumeType env.DisplayEnv cenv.css m  NoTrace genOuterTy genExprTy;
-                Some(mk_coerce(resultExpr,genOuterTy,m,genExprTy), tpenv)
-
-            | Comp_yield((isTrueYield,isTrueReturn),yieldExpr,m) -> 
-                let genResultTy = new_inference_typ cenv ()
-                if not isTrueYield then errorR(Error("In sequence expressions, results are generated using 'yield'",m)) ;
-                unifyE cenv env m genOuterTy (mk_seq_ty cenv.g genResultTy);
-
-                let resultExpr,tpenv = TcExpr cenv genResultTy env tpenv yieldExpr
-                Some(mk_call_seq_singleton cenv.g m genResultTy resultExpr, tpenv )
-
-            | e -> None
-                
-        and tc_comp env genOuterTy tpenv comp =
-            match try_tc_comp env genOuterTy tpenv comp with 
-            | Some e -> e
-            | None -> 
-                // seq { ...; expr } is treated as 'seq { ... ; expr; yield! Seq.empty }'
-                // Note this means seq { ...; () } is treated as 'seq { ... ; (); yield! Seq.empty }'
-                let m = range_of_synexpr comp 
-                let expr,tpenv = TcStmtThatCantBeCtorBody cenv env tpenv comp
-                TExpr_seq(expr,mk_seq_empty cenv env m genOuterTy,NormalSeq,SuppressSequencePointOnStmtOfSequential,m),tpenv
-
-        let genEnumElemTy = new_inference_typ cenv ()
-        unifyE cenv env m ty (mk_seq_ty cenv.g genEnumElemTy);
-
-        let coreExpr,tpenv = tc_comp env ty tpenv comp
-        let delayedExpr = mkDelayedExpr coreExpr
-        delayedExpr,tpenv
-
-//-------------------------------------------------------------------------
-// Typecheck "expr ... " constructs where "..." is a sequence of applications,
-// type applications and dot-notation projections. First extract known
-// type information from the "..." part to use during type checking.
-//
-// 'ty' is the type expected for the entire chain of expr + lookups.
-// 'exprty' is the type of the expression on the left of the lookup chain.
-//
-// Unsophisticated applications can propagate information from the expected overall type 'ty' 
-// through to the leading function type 'exprty'. This is because the application 
-// unambiguously implies a function type 
-//------------------------------------------------------------------------- 
-
-and PropagateThenTcDelayed cenv ty env tpenv m expr exprty (atomicFlag:ExprAtomicFlag) delayed = 
-    
-    let rec propagate delayed' exprm exprty = 
-      match delayed' with 
-      | [] -> 
-          // Avoid unifying twice: we're about to unify in TcDelayed 
-          if nonNil delayed then 
-              unifyE cenv env exprm ty exprty
-      | DelayedSet _ :: _
-      | DelayedDotLookup _ :: _ -> ()
-      | DelayedTypeApp (x,appm) :: delayed'' ->
-          // Note this case should not occur: would eventually give an "Unexpected type application" error in TcDelayed 
-          propagate delayed'' appm exprty 
-
-      | DelayedApp (_, arg,appm) :: delayed'' ->
-          let denv = env.DisplayEnv
-          match UnifyFunctionTypeUndoIfFailed cenv denv m exprty with
-          | Some (_,resultTy) -> 
-              propagate delayed'' appm resultTy 
-          | None -> 
-              let argm = range_of_synexpr arg
-              match arg with 
-              | Expr_comprehension (_,isNotNakedRefCell,comp,_) -> ()
-              | _ -> 
-                 error (NotAFunction(denv,ty,exprm,argm)) 
-              
-    propagate delayed expr.Range exprty;
-    TcDelayed cenv ty env tpenv m expr exprty atomicFlag delayed
-
-
-/// Typecheck "expr ... " constructs where "..." is a sequence of applications,
-/// type applications and dot-notation projections.
-and TcDelayed cenv ty env tpenv m expr exprty (atomicFlag:ExprAtomicFlag) delayed = 
-
-    // OK, we've typechecked the thing on the left of the delayed lookup chain. 
-    // We can now record for posterity the type of this expression and the location of the expression. 
-    if (atomicFlag = ExprAtomicFlag.Atomic) then
-        CallExprHasTypeSink(m,nenv_of_tenv env,exprty, env.DisplayEnv,AccessRightsOfEnv env);
-
-    match delayed with 
-    | [] -> unifyE cenv env m ty exprty; expr.Expr,tpenv
-    // expr.m(args) where x.m is a .NET method or index property 
-    // expr.m(args) where x.m is a .NET method or index property 
-    // expr.m where x.m is a .NET method or index property 
-    | DelayedDotLookup (lid,m) :: delayed' ->
-         TcLookupThen cenv ty env tpenv expr.Expr exprty lid delayed' m
-    // f x 
-    | DelayedApp (hpa,arg,appm) :: delayed' ->
-        TcFunctionApplicationThen cenv ty env tpenv appm expr exprty arg hpa delayed'
-    // f 
-    | DelayedTypeApp (x,m) :: delayed' ->
-        error(Error("Unexpected type application",m))
-    | DelayedSet _ :: delayed' ->      
-        error(Error("Invalid assignment",m))
-
-
-and delay_rest rest m delayed = 
-    match rest with 
-    | [] -> delayed 
-    | lid -> (DelayedDotLookup (rest,union_ranges m (range_of_lid lid)) :: delayed)
-
-
-//-------------------------------------------------------------------------
-// TcFunctionApplicationThen: Typecheck "expr x" + projections
-//------------------------------------------------------------------------- 
-
-and TcFunctionApplicationThen cenv ty env tpenv appm expr exprty arg atomicFlag delayed' = 
-    
-    let denv = env.DisplayEnv
-    let argm = range_of_synexpr arg
-    let funm = expr.Range
-    match UnifyFunctionTypeUndoIfFailed cenv denv funm exprty with
-    | Some (domainTy,resultTy) -> 
-
-        // Notice the special case 'seq { ... }'
-        // Set a flag in the syntax tree to say we noticed a leading 'seq'
-        match arg with 
-        | Expr_comprehension (false,isNotNakedRefCell,comp,m) -> 
-            isNotNakedRefCell := 
-                !isNotNakedRefCell
-                || 
-                (match expr with 
-                 | ApplicableExpr(_,TExpr_op(TOp_coerce,_,[TExpr_app(TExpr_val(vf,_,_),_,_,_,_)],_)) when cenv.g.vref_eq vf cenv.g.seq_vref -> 
-                    //dprintfn "FOUND 'seq { ... }'"
-                    true 
-                 | _ -> 
-                    //dprintfn "DID NOT FIND 'seq { ... }'"
-                    false)
-        | _ -> ()
-
-        let arg',tpenv = TcExpr cenv domainTy env tpenv arg
-        let expr' = build_app cenv expr exprty arg' appm
-        TcDelayed cenv ty env tpenv appm expr' resultTy atomicFlag delayed'
-    | None -> 
-        match arg with 
-        | Expr_comprehension (false,isNotNakedRefCell,comp,m) -> 
-            let expr',tpenv = TcComputationExpression cenv env ty funm (Some(expr.Expr,exprty)) tpenv comp
-            TcDelayed cenv ty env tpenv appm (MkApplicableExprNoFlex cenv expr') (type_of_expr cenv.g expr') ExprAtomicFlag.NonAtomic delayed' 
-        | _ -> 
-            error (NotAFunction(denv,ty,funm,argm)) 
-
-//-------------------------------------------------------------------------
-// TcLongIdentThen : Typecheck "A.B.C.E.F ... " constructs
-//------------------------------------------------------------------------- 
-
-and TcLongIdentThen cenv ty env tpenv lid delayed =
-
-    let ad = AccessRightsOfEnv env
-    let typeNameResInfo = 
-        (* Given 'MyOverloadedType.MySubType...' use arity of #given type arguments to help *)
-        (* resolve type name lookup of 'MyOverloadedType' *)
-        (* Also determine if type names should resolve to Item_typs or Item_ctor_group *)
-        match delayed with 
-        | DelayedTypeApp (tyargs,_) :: DelayedApp _ :: _ -> 
-            (ResolveTypeNamesToCtors, Some(List.length tyargs))
-
-        | DelayedTypeApp (tyargs,_) :: _ -> 
-            // cases like 'MyType.Sth' but also only 'MyType.' 
-            // (without LValue_get), which is needed for VS (when typing)
-            (ResolveTypeNamesToTypeRefs, Some(List.length tyargs)) 
-
-        | _ -> DefaultTypeNameResInfo
-
-    let itemAndRest = ResolveLongIdentAsExprAndComputeRange cenv.nameResolver (range_of_lid lid) ad env.eNameResEnv typeNameResInfo lid
-    TcItemThen cenv ty env tpenv itemAndRest delayed
-
-//-------------------------------------------------------------------------
-// Typecheck "item+projections" 
-//------------------------------------------------------------------------- *)
-
-and TcItemThen cenv overallTy env tpenv (item,m,rest) delayed =
-
-    let delayed = delay_rest rest m delayed
-    let ad = AccessRightsOfEnv env
-    match item with
-    (* x where x is a union case or active pattern result tag. *)
-    | (Item_ucase _ | Item_ecref _ | Item_apres _) as item -> 
-        (* ucaseAppTy is the type of the union constructor applied to its (optional) argument *)
-        let ucaseAppTy = new_inference_typ cenv ()
-        let mkConstrApp,argtys = 
-          match item with 
-          | Item_apres(apinfo, _, n) -> 
-              let aparity = List.length (names_of_apinfo apinfo)
-              match aparity with 
-              | 0 | 1 -> 
-                  let mkConstrApp = function [arg] -> arg | _ -> error(InternalError("gen_constr_unify",m))
-                  mkConstrApp, [ucaseAppTy]
-              | _ ->
-                  let ucref = mk_choices_ucref cenv.g m aparity n
-                  let _,inst,tinst,_ = info_of_tcref cenv m env ucref.TyconRef
-                  let ucinfo = UnionCaseInfo(tinst,ucref)
-                  expr_constr_unify m cenv env ucaseAppTy (Item_ucase ucinfo)
-          | _ -> 
-              expr_constr_unify m cenv env ucaseAppTy item
-        let nargtys = List.length argtys
-        // Subsumption at data constructions if argument type is nominal prior to equations for any arguments or return types
-        let flexes = argtys |> List.map (is_typar_typ cenv.g >> not)
-        match delayed with 
-        // This is where the constructor is applied to an argument 
-        | ((DelayedApp (atomicFlag, arg,appm))::delayed') ->
-            if isNil(delayed') then 
-                unifyE cenv env appm overallTy ucaseAppTy; 
-                  
-            let args = 
-              match arg with 
-              | Expr_paren(Expr_tuple(args,appm),_)
-              | Expr_tuple(args,appm)     when nargtys > 1 -> args
-              | Expr_paren(arg,_)
-              | arg -> [arg]
-            let nargs = List.length args
-            gen_constr_check env nargtys nargs appm;
-            let args',tpenv = TcExprs cenv env appm tpenv flexes argtys args
-            PropagateThenTcDelayed cenv overallTy env tpenv appm (MkApplicableExprNoFlex cenv (mkConstrApp args')) ucaseAppTy atomicFlag delayed'
-        | DelayedTypeApp (x,tyappm) :: delayed' ->
-            error(Error("Unexpected type application",tyappm))
-        | _ -> 
-            // Work out how many syntactic arguments we really expect. Also return a function that builds the overall 
-            // expression, but don't apply this function until after we've checked that the number of arguments is OK 
-            // (or else we would be building an invalid expression) 
-            
-            // Unit-taking active pattern result can be applied to no args 
-            let nargs,mkExpr = 
-                // This is where the constructor is an active pattern result applied to no argument 
-                // Unit-taking active pattern result can be applied to no args 
-                if (nargtys = 1 && match item with Item_apres _ -> true | _ -> false) then 
-                    unifyE cenv env m (List.hd argtys) cenv.g.unit_ty;
-                    1,(fun () -> mkConstrApp [mk_unit cenv.g m])
-
-                // This is where the constructor expects no arguments and is applied to no argument 
-                elif nargtys = 0 then 
-                    0,(fun () -> mkConstrApp []) 
-                else 
-                    // This is where the constructor expects arguments but is not applied to arguments, hence build a lambda 
-                    nargtys, 
-                    (fun () -> 
-                        let vs,args = argtys |> List.mapi (fun i ty -> mk_compgen_local m ("arg"^string i) ty) |> List.unzip
-                        let constrApp = mkConstrApp args
-                        let lam = mk_multi_lambda m vs (constrApp, type_of_expr cenv.g constrApp)
-                        lam)
-            gen_constr_check env nargtys nargs m;
-            let expr = mkExpr()
-            let exprTy = type_of_expr cenv.g expr
-            PropagateThenTcDelayed cenv overallTy env tpenv m (MkApplicableExprNoFlex cenv expr) exprTy ExprAtomicFlag.Atomic delayed 
-
-    | Item_typs(nm,(typ::_)) -> 
-    
-        match delayed with 
-        | ((DelayedTypeApp(tyargs,tyappm))::(DelayedDotLookup (lid,_))::delayed') ->
-
-            // If Item_typs is returned then the typ will be of the form TType_app(tcref,genericTyargs) where tyargs 
-            // is a fresh instantiation for tcref. TcNestedTypeApplication will chop off precisely #genericTyargs args 
-            // and replace them by 'tyargs' 
-            let typ,tpenv = TcNestedTypeApplication cenv NewTyparsOK CheckCxs env tpenv tyappm typ tyargs
-
-            // Report information about the whole expression including type arguments to VS
-            CallNameResolutionSink(tyappm,nenv_of_tenv env,Item_typs(nm, [typ]),ItemOccurence.Use,env.DisplayEnv,AccessRightsOfEnv env)
-            TcItemThen cenv overallTy env tpenv (ResolveExprDotLongIdentAndComputeRange cenv.nameResolver m ad env.eNameResEnv typ lid IgnoreOverrides) delayed'
-            
-        | ((DelayedTypeApp(tyargs,tyappm))::delayed') ->
-            // A case where we have an incomplete name e.g. 'Foo.' - we still want to report it to VS!
-            let typ,tpenv = TcNestedTypeApplication cenv NewTyparsOK CheckCxs env tpenv tyappm typ tyargs
-            CallNameResolutionSink(tyappm,nenv_of_tenv env,Item_typs(nm, [typ]),ItemOccurence.Use,env.DisplayEnv,AccessRightsOfEnv env)
-            
-            // Same error as in the following case
-            error(Error("Invalid use of a type name",m));
-            
-        | _ -> 
-            (* In this case the type is not generic, and indeed we should never have returned Item_typs. *)
-            (* That's because ResolveTypeNamesToCtors should have been set at the original *)
-            (* call to ResolveLongIdentAsExprAndComputeRange *)
-            error(Error("Invalid use of a type name",m));
-
-    | Item_meth_group (methodName,minfos) -> 
-        // Static method calls Type.Foo(arg1,...,argn) 
-        let meths = List.map (fun minfo -> minfo,None) minfos
-        match delayed with 
-        | (DelayedApp (atomicFlag, arg,m)::delayed') ->
-            TcMethodApplicationThen cenv env overallTy tpenv None [] m methodName ad NeverMutates false meths NormalValUse [arg] atomicFlag delayed'
-
-        | (DelayedTypeApp(tys,tyappm)::DelayedApp (atomicFlag, arg,m)::delayed') ->
-            let tyargs,tpenv = TcTypesOrMeasures None cenv NewTyparsOK CheckCxs env tpenv tys m
-            
-            // NOTE: This doesn't take instantiation into account
-            CallNameResolutionSink(tyappm,nenv_of_tenv env,item (* ! *),ItemOccurence.Use,env.DisplayEnv,AccessRightsOfEnv env)                        
-            TcMethodApplicationThen cenv env overallTy tpenv (Some tyargs) [] m methodName ad NeverMutates false meths NormalValUse [arg] atomicFlag delayed'
-        | _ -> 
-            TcMethodApplicationThen cenv env overallTy tpenv None [] m methodName ad NeverMutates false meths NormalValUse [] ExprAtomicFlag.Atomic delayed 
-
-    | Item_ctor_group(_,minfos) ->
-        let objTy = 
-            match minfos with 
-            | (minfo :: _) -> minfo.EnclosingType
-            | [] -> error(Error("This type has no accessible object constructors",m))
-        match delayed with 
-        | ((DelayedApp (_, arg,argm))::delayed') ->
-
-            // REVIEW: the langauge currently allows 'KeyValuePair(k,v)' 
-            // REVIEW: this should perhaps be reconsidered. 
-            // Here is the code to enforce the check: 
-            //   This checks that the type really doesn't expect any type arguments. 
-            //   let objTy,tpenv = TcNestedTypeApplication cenv NewTyparsOK CheckCxs env tpenv m objTy [] in 
-            //   This should be a nop but is included to keep symmetry with the next case 
-            //   minfos |> List.iter (fun minfo -> unifyE cenv env m (typ_of_minfo minfo) objTy); 
-            TcCtorCall true cenv env tpenv overallTy objTy item false arg argm delayed'
-
-        | ((DelayedTypeApp(tyargs,tyappm))::(DelayedApp (_, arg,m))::delayed') ->
-            let objTy,tpenv = TcNestedTypeApplication cenv NewTyparsOK CheckCxs env tpenv tyappm objTy tyargs
-            minfos |> List.iter (fun minfo -> unifyE cenv env tyappm minfo.EnclosingType objTy);
-            
-            // NOTE: This doesn't take instantiation into account
-            CallNameResolutionSink(tyappm,nenv_of_tenv env,item (* ! *),ItemOccurence.Use,env.DisplayEnv,AccessRightsOfEnv env)
-            TcCtorCall true cenv env tpenv overallTy objTy item false arg m delayed'
-
-        | _ -> 
-            let text = List.map (string_of_minfo cenv.amap m env.DisplayEnv) minfos
-            error(Error("Invalid use of a type name and/or object constructor. If necessary use 'new' and apply the constructor to its arguments, e.g. 'new Type(args)'"^
-                         (if nonNil minfos then ". Overloads are:  \n\t"^String.concat "\n\t" text else ""),m))
-
-    | Item_fake_intf_ctor _ ->
-        error(Error("Invalid use of an interface type",m))
-    | Item_implicit_op id ->
-
-        let isPrefix = PrettyNaming.IsPrefixOperator id.idText
-
-        let argData = 
-            if isPrefix then 
-                [ Typar(mksyn_id m (new_arg_name()), HeadTypeStaticReq,true) ]
-            else
-                [ Typar(mksyn_id m (new_arg_name()), HeadTypeStaticReq,true);
-                  Typar(mksyn_id m (new_arg_name()), HeadTypeStaticReq,true) ]
-                
-        let retTyData = Typar(mksyn_id m (new_arg_name()), HeadTypeStaticReq,true)
-        let argTypars = argData |> List.map (fun d -> NewTypar (KindType, TyparFlexible,d,false,DynamicReq,[]))
-        let retTypar = NewTypar (KindType, TyparFlexible,retTyData,false,DynamicReq,[])
-        let argTys = argTypars |> List.map mk_typar_ty 
-        let retTy = mk_typar_ty retTypar
-
-        let vs,ves = argTys |> List.mapi (fun i ty -> mk_compgen_local m ("arg"^string i) ty) |> List.unzip
-
-        let memberFlags = StaticMemberFlags None MemberKindMember
-        let logicalCompiledName = ComputeLogicalCompiledName id memberFlags
-        let traitInfo = TTrait(argTys,logicalCompiledName,memberFlags,argTys,Some retTy,ref None)
-
-        AddCxMethodConstraint env.DisplayEnv cenv.css m NoTrace traitInfo;
-      
-        let expr = TExpr_op(TOp_trait_call(traitInfo), [], ves, m)
-        let expr = mk_lambdas m [] vs (expr,retTy)
-        PropagateThenTcDelayed cenv overallTy env tpenv m (MkApplicableExprNoFlex cenv expr) (type_of_expr cenv.g expr) ExprAtomicFlag.NonAtomic delayed
-        
-    | Item_delegate_ctor typ ->
-        match delayed with 
-        | ((DelayedApp (atomicFlag, arg,m))::delayed') ->
-            TcNewDelegateThen cenv overallTy env tpenv m typ arg atomicFlag delayed'
-        | ((DelayedTypeApp(tyargs,tyappm))::(DelayedApp (atomicFlag, arg,m))::delayed') ->
-            let typ,tpenv = TcNestedTypeApplication cenv NewTyparsOK CheckCxs env tpenv tyappm typ tyargs
-            
-            // NOTE: This doesn't take instantiation into account
-            CallNameResolutionSink(tyappm,nenv_of_tenv env,item (* ! *),ItemOccurence.Use,env.DisplayEnv,AccessRightsOfEnv env)            
-            TcNewDelegateThen cenv overallTy env tpenv m typ arg atomicFlag delayed'
-        | _ -> error(Error("Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'",m))
-
-    | Item_val vref -> 
-
-        match delayed with 
-        // Mutable value set: 'v <- e' 
-        | DelayedSet(e2,m) :: delayed' ->
-            if nonNil(delayed') then error(Error("Invalid assignment",m));
-            unifyE cenv env m overallTy (cenv.g.unit_ty);
-            let vty = vref.Type
-            let vty2 = if is_byref_typ cenv.g vty then dest_byref_typ cenv.g vty else vty 
-            // Always allow subsumption on asignment to fields
-            let e2',tpenv = TcExprFlex cenv true vty2 env tpenv e2
-            let vexp,tepnv = 
-                if is_byref_typ cenv.g vty then 
-                  mk_lval_set m vref e2', tpenv
-                else 
-                  if not vref.IsMutable then error (ValNotMutable(env.DisplayEnv,vref,m));
-                  mk_val_set m vref e2', tpenv
-                
-            PropagateThenTcDelayed cenv overallTy env tpenv m (MkApplicableExprNoFlex cenv vexp) (type_of_expr cenv.g vexp) ExprAtomicFlag.NonAtomic delayed'
-
-        // Value instantiation: v ... 
-        | (DelayedTypeApp(tys,tyappm)::delayed') ->
-            // Note: we know this is a NormalValUse because: 
-            //   - it isn't a CtorValUsedAsSuperInit 
-            //   - it isn't a CtorValUsedAsSelfInit 
-            //   - it isn't a VSlotDirectCall (uses of base values do not take type arguments 
-            let checkTys tpenv kinds = TcTypesOrMeasures (Some kinds) cenv NewTyparsOK CheckCxs env tpenv tys m
-            let (vexp,isSpecial,_,tpenv) = TcVal cenv env tpenv vref (Some (NormalValUse, checkTys)) m
-            let vexp = (if isSpecial then MkApplicableExprNoFlex cenv vexp else MkApplicableExprWithFlex cenv env vexp)
-            // type of the expression (e.g. For the source text "sizeof" vexpty will be the TAST type for int32)
-            let vexpty = vexp.Type 
-            
-            // We need to eventually record the type resolution for an expression, but this is done
-            // inside PropagateThenTcDelayed, so we don't have to explicitly call 'CallExprHasTypeSink' here            
-            PropagateThenTcDelayed cenv overallTy env tpenv tyappm vexp vexpty ExprAtomicFlag.Atomic delayed'
-
-        // Value get 
-        | _ ->  
-            let (vexp,isSpecial ,_,tpenv) = TcVal cenv env tpenv vref None m
-            let vexp = (if isSpecial then MkApplicableExprNoFlex cenv vexp else MkApplicableExprWithFlex cenv env vexp)
-            let vexpty = vexp.Type
-            PropagateThenTcDelayed cenv overallTy env tpenv m vexp vexpty ExprAtomicFlag.Atomic delayed
-        
-    | Item_property (nm,pinfos) ->
-        if isNil pinfos then error (InternalError ("Unexpected error: empty property list",m));
-        let pinfo = List.hd pinfos
-        let _, tyargsOpt,args,delayed,tpenv = 
-            if pinfo.IsIndexer 
-            then GetMemberApplicationArgs delayed cenv env tpenv m 
-            else ExprAtomicFlag.Atomic,None,[mksyn_unit m],delayed,tpenv
-        if not pinfo.IsStatic then error (Error (sprintf "property '%s' is not static" nm,m));
-        match delayed with 
-        | DelayedSet(e2,m) :: delayed' ->
-            let args = if pinfo.IsIndexer then args else []
-            if nonNil(delayed') then error(Error("Invalid assignment",m));
-            // Static Property Set (possibly indexer) 
-            unifyE cenv env m overallTy (cenv.g.unit_ty);
-            let meths = pinfos |> List.choose (fun pinfo -> if pinfo.HasSetter then Some(pinfo.SetterMethod,Some pinfo) else None)
-            TcMethodApplicationThen cenv env overallTy tpenv tyargsOpt [] m nm ad DefinitelyMutates true meths NormalValUse (args@[e2]) ExprAtomicFlag.NonAtomic delayed'
-        | _ -> 
-            // Static Property Get (possibly indexer) 
-            let meths = pinfos |> List.choose (fun pinfo -> if pinfo.HasGetter then Some(pinfo.GetterMethod,Some pinfo) else None) 
-            if isNil(meths) then error (Error (sprintf "property '%s' is not readable" nm,m));
-            TcMethodApplicationThen cenv env overallTy tpenv tyargsOpt [] m nm ad PossiblyMutates true meths NormalValUse args ExprAtomicFlag.Atomic delayed
-
-    | Item_il_field finfo -> 
-
-        CheckILFieldInfoAccessible cenv.g cenv.amap m ad finfo;
-        if not finfo.IsStatic then error (Error (sprintf "field '%s' is not static" finfo.FieldName,m));
-        CheckILFieldAttributes cenv.g finfo m;
-        let fref = finfo.ILFieldRef
-        let exprty = FieldTypeOfILFieldInfo cenv.amap m  finfo
-        match delayed with 
-        | DelayedSet(e2,m) :: delayed' ->
-            unifyE cenv env m overallTy (cenv.g.unit_ty);
-            // Always allow subsumption on asignment to fields
-            let e2',tpenv = TcExprFlex cenv true exprty env tpenv e2
-            let expr = BuildILStaticFieldSet cenv.g m finfo e2'
-            expr,tpenv
-        | _ -> 
-           (* Get static IL field *)
-            let expr = 
-              match finfo.LiteralValue with 
-              | Some lit -> 
-                  TExpr_const(TcFieldInit m lit,m,exprty) 
-              | None -> 
-                let isValueType = finfo.IsValueType
-                let valu = if isValueType then AsValue else AsObject
-                (* The empty instantiation on the fspec is OK, since we make the correct fspec in Ilxgen.gen_asm *)
-                (* This ensures we always get the type instantiation right when doing this from *)
-                (* polymorphic code, after inlining etc. *) 
-                (* REVIEW: stop generating ABSIL instructions here. This causes a number of minor problems (e.g. with quotation reflection) *)
-                let fspec = mk_fspec(fref,mk_named_typ valu fref.EnclosingTypeRef [])
-                (* Add an I_nop if this is an initonly field to make sure we never recognize it as an lvalue. See mk_expra_of_expr. *)
-                mk_asm ([ mk_normal_ldsfld fspec ] @ (if finfo.IsInitOnly then [ I_arith AI_nop ] else []), 
-                        finfo.TypeInst,[],[exprty],m)
-            PropagateThenTcDelayed cenv overallTy env tpenv m (MkApplicableExprWithFlex cenv env expr) exprty ExprAtomicFlag.Atomic delayed
-
-    | Item_recdfield rfinfo -> 
-        (* Get static F# field or literal *)
-        CheckRecdFieldInfoAccessible m ad rfinfo;
-        if not rfinfo.IsStatic then error (Error (sprintf "field '%s' is not static" rfinfo.Name,m));
-        CheckRecdFieldInfoAttributes cenv.g rfinfo m |> CommitOperationResult;        
-        let fref = rfinfo.RecdFieldRef
-        let fieldTy = rfinfo.FieldType
-        match delayed with 
-        | DelayedSet(e2,m) :: delayed' ->
-            if nonNil(delayed') then error(Error("Invalid assignment",m));
-        
-            // Set static F# field 
-            CheckRecdFieldMutation m env.DisplayEnv rfinfo [];
-            unifyE cenv env m overallTy cenv.g.unit_ty;
-            let fieldTy = rfinfo.FieldType
-            // Always allow subsumption on asignment to fields
-            let e2',tpenv = TcExprFlex cenv true fieldTy env tpenv e2
-            let expr = mk_static_rfield_set (rfinfo.RecdFieldRef,rfinfo.TypeInst,e2',m)
-            expr,tpenv
-            
-        | _  ->
-            let exprty = fieldTy
-            let expr = 
-              match rfinfo.LiteralValue with 
-              (* Get literal F# field *)
-              | Some lit -> TExpr_const(lit,m,exprty)
-              (* Get static F# field *)
-              | None -> mk_static_rfield_get (fref,rfinfo.TypeInst,m) 
-            PropagateThenTcDelayed cenv overallTy env tpenv m (MkApplicableExprWithFlex cenv env expr) exprty ExprAtomicFlag.Atomic delayed
-
-    | Item_event einfo -> 
-        // Instance IL event (fake up event-as-value) 
-        TcEventValueThen cenv overallTy env tpenv m None einfo delayed
-     
-    | _ -> error(Error("This lookup may not be used here", m))
-
-
-//-------------------------------------------------------------------------
-// Typecheck "expr.A.B.C ... " constructs
-//------------------------------------------------------------------------- 
-
-and GetMemberApplicationArgs delayed cenv env tpenv m =
-    match delayed with 
-    | DelayedApp (atomicFlag, arg,m) :: delayed' -> atomicFlag,None,[arg],delayed',tpenv
-    | DelayedTypeApp(tyargs,_) :: DelayedApp (atomicFlag, arg,m) :: delayed' ->
-        let tyargs,tpenv = TcTypesOrMeasures None cenv NewTyparsOK CheckCxs env tpenv tyargs m
-        atomicFlag,Some(tyargs),[arg],delayed',tpenv
-    | delayed' ->
-        ExprAtomicFlag.NonAtomic,None,[],delayed',tpenv
-
-
-and TcLookupThen cenv overallTy env tpenv objExpr objExprTy lid delayed m =
-    let objArgs = [objExpr]
-    let ad = AccessRightsOfEnv env
-
-    // 'base' calls use a different resolution strategy when finding methods. 
-    let findFlag = 
-        let baseCall = IsBaseCall objArgs
-        (if baseCall then PreferOverrides else IgnoreOverrides)
-        
-    // Canonicalize inference problem prior to '.' lookup on variable types 
-    if is_typar_typ cenv.g objExprTy then 
-        GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv,env.DisplayEnv,m) (free_in_type_lr cenv.g false objExprTy);
-    
-    let item,m,rest = ResolveExprDotLongIdentAndComputeRange cenv.nameResolver m ad env.eNameResEnv objExprTy lid findFlag
-    let delayed = delay_rest rest m delayed
-
-    match item with
-    | Item_meth_group (methodName,minfos) -> 
-        let atomicFlag,tyargsOpt,args,delayed,tpenv = GetMemberApplicationArgs delayed cenv env tpenv m
-        let meths = List.map (fun minfo -> minfo,None) minfos
-        (* We pass PossiblyMutates here because these may actually mutate a value type object *) 
-        (* To get better warnings we special case some of the few known mutate-a-struct method names *) 
-        let mutates = (if methodName = "MoveNext" || methodName = "GetNextArg" then DefinitelyMutates else PossiblyMutates)
-        TcMethodApplicationThen cenv env overallTy tpenv tyargsOpt objArgs m methodName ad mutates false meths NormalValUse args atomicFlag delayed 
-
-    | Item_property (nm,pinfos) ->
-        // Instance property 
-        if isNil pinfos then error (Error ("Unexpected error: empty property list",m));
-        let pinfo = List.hd pinfos
-        let atomicFlag,tyargsOpt,args,delayed,tpenv = 
-            if pinfo.IsIndexer
-            then GetMemberApplicationArgs delayed cenv env tpenv m 
-            else ExprAtomicFlag.Atomic,None,[mksyn_unit m],delayed,tpenv
-        if pinfo.IsStatic then error (Error (sprintf "property '%s' is static" nm,m));
-        match delayed with 
-        | DelayedSet(e2,m) :: delayed' ->
-            let args = if pinfo.IsIndexer then args else []
-            if nonNil(delayed') then error(Error("Invalid assignment",m));
-        
-            // Instance property setter 
-            unifyE cenv env m overallTy (cenv.g.unit_ty);
-            let meths = pinfos |> List.choose (fun pinfo -> if pinfo.HasSetter then Some(pinfo.SetterMethod,Some pinfo) else None) 
-            if isNil meths then error (Error (sprintf "Property '%s' may not be set" nm,m));
-            TcMethodApplicationThen cenv env overallTy tpenv tyargsOpt objArgs m nm ad DefinitelyMutates true meths NormalValUse (args @ [e2]) atomicFlag [] 
-        | _ ->                   
-            // Instance property getter
-            let meths = pinfos |> List.choose (fun pinfo -> if pinfo.HasGetter then Some(pinfo.GetterMethod,Some pinfo) else None) 
-            if isNil meths then error (Error (sprintf "Property '%s' is not readable" nm,m));
-            TcMethodApplicationThen cenv env overallTy tpenv tyargsOpt objArgs m nm ad PossiblyMutates true meths NormalValUse args atomicFlag delayed 
-        
-    | Item_recdfield rfinfo ->
-        // Get or set instance F# field or literal 
-        RecdFieldInstanceChecks cenv.g ad m rfinfo;
-        let tgty = rfinfo.EnclosingType
-        let valu = is_struct_typ cenv.g tgty
-        AddCxTypeMustSubsumeType env.DisplayEnv cenv.css m NoTrace tgty objExprTy; 
-        let objExpr = if valu then objExpr else mk_coerce(objExpr,tgty,m,objExprTy)
-        let _,ftinst,fieldTy = FreshenPossibleForallTy cenv.g m TyparFlexible (rfinfo.FieldType)
-        match delayed with 
-        | DelayedSet(e2,stmtRange) :: delayed' ->
-            // Mutable value set: 'v <- e' 
-            if nonNil(delayed') then error(Error("Invalid assignment",m));
-            CheckRecdFieldMutation m env.DisplayEnv rfinfo ftinst;
-            unifyE cenv env stmtRange overallTy (cenv.g.unit_ty);
-            // Always allow subsumption on asignment to fields
-            let e2',tpenv = TcExprFlex cenv true fieldTy env tpenv e2
-            BuildRecdFieldSet cenv.g stmtRange env.DisplayEnv objExpr rfinfo ftinst e2',tpenv
-
-        | _ ->
-
-            // Instance F# Record or Class field 
-            let objExpr' = mk_recd_field_get cenv.g (objExpr,rfinfo.RecdFieldRef,rfinfo.TypeInst,ftinst,m)
-            PropagateThenTcDelayed cenv overallTy env tpenv m (MkApplicableExprWithFlex cenv env objExpr') fieldTy ExprAtomicFlag.Atomic delayed 
-        
-    | Item_il_field (ILFieldInfo(tinfo,fdef) as finfo) -> 
-        // Get or set instance IL field 
-        ILFieldInstanceChecks  cenv.g cenv.amap ad m finfo;
-        let fref = finfo.ILFieldRef
-        let exprty = FieldTypeOfILFieldInfo cenv.amap m  finfo
-        let isValueType = finfo.IsValueType
-        let valu = if isValueType then AsValue else AsObject
-        let tinst = tinfo.TypeInst
-        
-        match delayed with 
-        // Set instance IL field 
-        | DelayedSet(e2,m) :: delayed' ->
-            unifyE cenv env m overallTy (cenv.g.unit_ty);
-            // Always allow subsumption on asignment to fields
-            let e2',tpenv = TcExprFlex cenv true exprty env tpenv e2
-            let expr = BuildILFieldSet cenv.g m objExpr finfo e2'
-            expr,tpenv
-        | _ ->        
-            let expr = BuildILFieldGet cenv.g cenv.amap m objExpr finfo 
-            PropagateThenTcDelayed cenv overallTy env tpenv m (MkApplicableExprWithFlex cenv env expr) exprty ExprAtomicFlag.Atomic delayed 
-
-    | Item_event einfo -> 
-        // Instance IL event (fake up event-as-value) 
-        TcEventValueThen cenv overallTy env tpenv m (Some(objExpr,objExprTy)) einfo delayed
-     
-    | (Item_fake_intf_ctor _ | Item_delegate_ctor _) -> error (Error ("Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'", m))
-    | _ -> error (Error ("The syntax 'expr.id' may only be used with record labels, properties and fields", m))
-
-and TcEventValueThen cenv overallTy env tpenv m objDetails (einfo:EventInfo) delayed = 
-    // Instance IL event (fake up event-as-value) 
-    //let (ILEventInfo(tinfo,edef)) = einfo 
-    let nm = einfo.EventName
-    let ad = AccessRightsOfEnv env
-    match objDetails, einfo.IsStatic with 
-    | Some _, true -> error (Error (sprintf "event '%s' is static" nm,m));
-    | None, false -> error (Error (sprintf "event '%s' is not static" nm,m));
-    | _ -> ()
-
-    let delegateType = einfo.GetDelegateType(cenv.amap,m)
-    let invoke_minfo,delArgTys,delRetTy,_ = GetSigOfFunctionForDelegate cenv.infoReader delegateType m ad
-    let objArgs = (Option.to_list (Option.map fst objDetails))
-    MethInfoChecks cenv.g cenv.amap true objArgs (AccessRightsOfEnv env) m invoke_minfo;
-    
-    (* This checks for and drops the 'object' sender *)
-    let args_ty = ArgsTypOfEventInfo cenv.infoReader m ad einfo
-    if not (slotsig_has_void_rty (SlotSigOfMethodInfo cenv.amap m invoke_minfo)) then errorR (nonStandardEventError einfo.EventName m);
-    let devent_ty = mk_fslib_IEvent2_ty cenv.g delegateType args_ty
-    let ctorCall = mk_obj_ctor_call cenv.g m
-
-    let valu = einfo.IsValueType
-
-    let bindObjArgs f =
-        match objDetails with 
-        | None -> f []
-        | Some (objExpr,objExprTy) -> mk_compgen_let_in m "eventTarget" objExprTy objExpr (fun (_,ve) -> f [ve]) 
-
-    (* Bind the object target expression to make sure we only run its sdie effects once, and to make *)
-    (* sure if it's a mutable reference then we dereference it - see FSharp 1.0 bug 942 *)
-    let expr = 
-        bindObjArgs (fun objVars -> 
-            let mk_event_override nm (minfo:MethInfo) = 
-               let thisVal,thise = mk_compgen_local m "this" devent_ty
-               let dv,de = mk_compgen_local m "eventDelegate" delegateType
-               let callExpr,_ = BuildMethodCall cenv env PossiblyMutates m false minfo NormalValUse [] objVars [de]
-               TObjExprMethod(mk_slotsig(nm,devent_ty,[vara;varb], [],[[mk_slotparam (vara_ty,TopValInfo.unnamedTopArg1)]], None),[], [[thisVal];[dv]],callExpr,m)
-       
-            let overrides =
-              let add_minfo = einfo.GetAddMethod(m)
-              let remove_minfo = einfo.GetRemoveMethod(m)
-              [ mk_event_override "AddHandler" add_minfo;
-                mk_event_override "RemoveHandler" remove_minfo;
-                (let fvty = (args_ty  --> cenv.g.unit_ty)
-                 let fv,fe = mk_compgen_local m "eventDelegate" fvty
-                 let thisVal,_ = mk_compgen_local m "this" devent_ty
-                 let de = BuildNewDelegateExpr (Some einfo) cenv delegateType (invoke_minfo,delArgTys) (fe,fvty) m
-                 let callExpr,_ = BuildMethodCall cenv env PossiblyMutates m false add_minfo NormalValUse [] objVars [de]
-                 TObjExprMethod(mk_slotsig("Add",devent_ty,[vara;varb], [],
-                                    [[mk_slotparam (varb_ty  --> cenv.g.unit_ty,TopValInfo.unnamedTopArg1)]], None),
-                         [], [[thisVal];[fv]],callExpr,m));
-               ]
-            TExpr_obj(new_uniq(), devent_ty, None, ctorCall, overrides,[],m,SkipFreeVarsCache()))
-    let exprty = devent_ty
-    PropagateThenTcDelayed cenv overallTy env tpenv m (MkApplicableExprNoFlex cenv expr) exprty ExprAtomicFlag.Atomic delayed 
- 
-
-//-------------------------------------------------------------------------
-// Method uses can calls
-//------------------------------------------------------------------------- 
-
-/// Typecheck method/member calls and uses of members as first-class values.
-and TcMethodApplicationThen 
-       cenv 
-       env
-       overallTy           // The type of the overall expression including "delayed". THe method "application" may actually be a use of a member as 
-                    // a first-class function value, when this would be a function type. 
-       tpenv 
-       userTypeArgs // The return type of the overall expression including "delayed" 
-       objArgs      // The 'obj' arguments in obj.M(...) and obj.M, if any 
-       m           // The range of the whole application (REVIEW: check this in all cases)
-       methodName  // string, name of the method 
-       ad          // accessibility rights of the caller 
-       mut         // what do we know/assume about whether this method will mutate or not? 
-       isProp      // is this a property call? Used for better error messages and passed to BuildMethodCall 
-       meths       // the set of methods we may be calling 
-       isSuperInit // is this a special invocation, e.g. a super-class constructor call. Passed through to BuildMethodCall 
-       args        // the _syntactic_ method arguments, not yet type checked. 
-       atomicFlag  // is the expression atomic or not? 
-       delayed     // further lookups and applications that follow this 
-     =
-
-    // Nb. args is always of List.length <= 1 except for indexed setters, when it is 2  
-    let m = List.fold (fun m arg -> union_ranges m (range_of_synexpr arg)) m args
-
-    // Work out if we know anything about the return type of the overall expression. If there are any delayed 
-    // lookups then we don't know anything. 
-    let exprTy = if isNil delayed then overallTy else new_inference_typ cenv ()
-
-    // Call the helper below to do the real checking 
-    let (expr,attributeAssignedNamedItems,delayed),tpenv = 
-        TcMethodApplication false cenv env tpenv userTypeArgs objArgs m methodName ad mut isProp meths isSuperInit args exprTy delayed
-
-    (* Give errors if some things couldn't be assigned *)
-    if nonNil attributeAssignedNamedItems then (
-        let (CallerNamedArg(id,CallerArg(_,m,_,_))) = List.hd attributeAssignedNamedItems
-        errorR(Error(sprintf "The named argument '%s' did not match any argument or mutable property" id.idText,id.idRange));
-    );
-
-
-    // Resolve the "delayed" lookups 
-    let exprty = (type_of_expr cenv.g expr)
-
-    PropagateThenTcDelayed cenv overallTy env tpenv m (MkApplicableExprNoFlex cenv expr) exprty atomicFlag delayed 
-
-and GetNewInferenceTypeForMethodArg cenv x =
-    match x with 
-    | Expr_paren(a,_) -> GetNewInferenceTypeForMethodArg cenv a
-    | Expr_addrof(true,a,_,_) -> mk_byref_typ cenv.g (GetNewInferenceTypeForMethodArg cenv a)
-    | Expr_lambda(_,_,_,a,_) -> (new_inference_typ cenv () --> GetNewInferenceTypeForMethodArg cenv a)
-    | _ -> new_inference_typ cenv ()
-
-/// Method calls, property lookups, attribute constructions etc. get checked through here 
-and TcMethodApplication 
-        checkingAttributeCall 
-        cenv 
-        env 
-        tpenv 
-        tyargsOpt
-        objArgs 
-        m 
-        methodName 
-        ad 
-        mut 
-        isProp 
-        calledMethsAndProps 
-        isSuperInit 
-        curriedCallerArgs 
-        exprTy 
-        delayed
-    =
- 
-    let denv = env.DisplayEnv
-    let nenv = nenv_of_tenv env
-
-    let isSimpleFormalArg (isParamArrayArg,isOutArg,optArgInfo) = not isParamArrayArg && not isOutArg && (optArgInfo = NotOptional)    
-    
-    let objArgTys = objArgs |> List.map (type_of_expr cenv.g)
-
-    let calledMeths = calledMethsAndProps |> List.map fst
-
-    // Uses of curried members are ALWAYS treated as if they are first class uses of members. 
-    // Curried members may not be overloaded (checked at use-site for curried members brought into scope through extension members)
-    let curriedCallerArgs,exprTy,delayed = 
-        match calledMeths with 
-        | [calledMeth] when calledMeth.NumArgs.Length > 1 ->
-            [], new_inference_typ cenv (),[ for x in curriedCallerArgs -> DelayedApp(ExprAtomicFlag.NonAtomic,x,range_of_synexpr x) ] @ delayed
-        | _ when calledMeths |> List.exists (fun calledMeth -> calledMeth.NumArgs.Length > 1) ->
-            // This condition should only apply when multiple conflicting curried extension members are brought into scope
-            error(Error("One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form",m))
-        | _ -> 
-            curriedCallerArgs,exprTy,delayed
-
-    let candidates = calledMeths |> List.filter (IsMethInfoAccessible cenv.amap m ad)
-
-    // Split the syntactic arguments (if any) into named and unnamed parameters 
-    //
-    // In one case (the second "single named item" rule) we delay the application of a
-    // argument until we've produced a lambda that detuples an input tuple
-    let curriedCallerArgsOpt, unnamedDelayedCallerArgExprOpt, exprTy = 
-      match curriedCallerArgs with 
-      | [] -> 
-          None,None,exprTy
-      | _ -> 
-          let unnamedCurriedCallerArgs,namedCurriedCallerArgs = curriedCallerArgs |> List.map GetMethodArgs |> List.unzip 
-          
-          // There is an mismatch when _uses_ of indexed property setters in the tc.ml code that calls this function. 
-          // The arguments are passed as if they are curried with arity [numberOfIndexParameters;1], however in the TAST, indexed property setters
-          // are uncurried and have arity [numberOfIndexParameters+1].
-          //
-          // Here we work around this mismatch by crunching all property argument lists to uncirred form. 
-          // Ideally the problem needs to be solved at its root cause at the callsites to this function
-          let unnamedCurriedCallerArgs,namedCurriedCallerArgs = 
-              if isProp then 
-                  [List.concat unnamedCurriedCallerArgs], [List.concat namedCurriedCallerArgs]
-              else 
-                  unnamedCurriedCallerArgs,namedCurriedCallerArgs
-          
-          let MakeUnnamedCallerArgInfo x = (x, GetNewInferenceTypeForMethodArg cenv x,range_of_synexpr x)
-
-          // "single named item" rule. This is where we have a single accessible method 
-          //      member x.M(arg1) 
-          // being used with  
-          //      x.M (x,y) 
-          // Without this rule this requires 
-          //      x.M ((x,y)) 
-          match candidates with 
-          | [calledMeth] 
-                when (namedCurriedCallerArgs |> List.forall (fun x -> List.length x = 0) && 
-                      let curriedCalledArgs = calledMeth |> ParamAttribsOfMethInfo cenv.amap m 
-                      curriedCalledArgs.Length = 1 &&
-                      curriedCalledArgs.Head.Length = 1 && 
-                      curriedCalledArgs.Head.Head |> isSimpleFormalArg) ->
-              let unnamedCurriedCallerArgs = curriedCallerArgs |> List.map (MakeUnnamedCallerArgInfo >> List.singleton)
-              let namedCurriedCallerArgs = namedCurriedCallerArgs |> List.map (fun _ -> [])
-              (Some (unnamedCurriedCallerArgs,namedCurriedCallerArgs), None, exprTy)
-
-          // "single named item" rule. This is where we have a single accessible method 
-          //      member x.M(arg1,arg2) 
-          // being used with  
-          //      x.M p
-          // We typecheck this as if it has been written "(fun (v1,v2) -> x.M(v1,v2))  p" 
-          // Without this rule this requires 
-          //      x.M (fst p,snd p) 
-          | [calledMeth] 
-                when (namedCurriedCallerArgs |> List.forall (fun x -> List.length x = 0) && 
-                      unnamedCurriedCallerArgs.Length = 1 &&
-                      unnamedCurriedCallerArgs.Head.Length = 1 && 
-                      let curriedCalledArgs = calledMeth |> ParamAttribsOfMethInfo cenv.amap m 
-                      curriedCalledArgs.Length = 1 &&
-                      curriedCalledArgs.Head.Length > 1 &&
-                      curriedCalledArgs.Head |> List.forall isSimpleFormalArg) ->
-
-              // The call lambda has function type
-              let exprTy = mk_fun_ty (new_inference_typ cenv ()) exprTy
-              
-              (None, Some unnamedCurriedCallerArgs.Head.Head, exprTy)
-
-          | _ ->
-              let unnamedCurriedCallerArgs = unnamedCurriedCallerArgs |> List.mapSquared MakeUnnamedCallerArgInfo
-              let namedCurriedCallerArgs = namedCurriedCallerArgs |> List.mapSquared (fun (isOpt,nm,x) -> nm,isOpt,x,GetNewInferenceTypeForMethodArg cenv x,range_of_synexpr x)
-
-              (Some (unnamedCurriedCallerArgs, namedCurriedCallerArgs), None, exprTy)
-    
-
-    let CalledMethHasSingleArgumentGroupOfThisLength n (calledMeth:MethInfo) =
-       let curriedMethodArgAttribs = ParamAttribsOfMethInfo cenv.amap m calledMeth
-       curriedMethodArgAttribs.Length = 1 && 
-       curriedMethodArgAttribs.Head.Length = n
-
-    let GenerateMatchingSimpleArgumentTypes (calledMeth:MethInfo) =
-        let curriedMethodArgAttribs = ParamAttribsOfMethInfo cenv.amap m calledMeth
-        curriedMethodArgAttribs 
-        |> List.map (List.filter isSimpleFormalArg)
-        |> List.map (new_inference_typs cenv)
-
-    let UnifyMatchingSimpleArgumentTypes exprTy (calledMeth:MethInfo) =
-        let curriedArgTys = GenerateMatchingSimpleArgumentTypes calledMeth
-        let returnTy = 
-            (exprTy,curriedArgTys) ||>  List.fold (fun exprTy argTys -> 
-                let domainTy,resultTy = UnifyFunctionType None cenv denv m exprTy
-                unifyE cenv env m  domainTy (mk_tupled_ty cenv.g argTys);
-                resultTy);
-        curriedArgTys,returnTy
-
-    // STEP 1. UnifyUniqueOverloading. This happens BEFORE we type check the arguments. 
-    // Extract what we know about the caller arguments, either type-directed if 
-    // no arguments are given or else based on the syntax of the arguments. 
-    let uniquelyResolved,preArgumentTypeCheckingCalledMethGroup = 
-        let dummyExpr = mk_unit cenv.g m
-      
-        // Build the CallerArg values for the caller's arguments. 
-        // Fake up some arguments if this is the use of a method as a first class function 
-        let unnamedCurriedCallerArgs,namedCurriedCallerArgs = 
-
-            match curriedCallerArgsOpt,candidates with 
-            // "single named item" rule. This is where we have a single accessible method 
-            //      memeber x.M(arg1,...,argN) 
-            // being used in a first-class way, i.e. 
-            //      x.M  
-            // Because there is only one accessible method info available based on the name of the item 
-            // being accessed we know the number of arguments the first class use of this 
-            // method will take. Optional and out args are _not_ included, which means they will be resolved 
-            // to their default values (for optionals) and be part of the return tuple (for out args). 
-            | None,[calledMeth] -> 
-                let curriedArgTys,_ = UnifyMatchingSimpleArgumentTypes exprTy calledMeth
-                let unnamedCurriedCallerArgs = curriedArgTys |> List.mapSquared (fun ty -> CallerArg(ty,m,false,dummyExpr))  
-                let namedCurriedCallerArgs = unnamedCurriedCallerArgs |> List.map (fun _ -> [])
-                unnamedCurriedCallerArgs, namedCurriedCallerArgs
-                
-            // "type directed" rule for first-class uses of ambiguous methods. 
-            // By context we know a type for the input argument. If it's a tuple 
-            // this gives us the a potential number of arguments expected. Indeed even if it's a variable 
-            // type we assume the number of arguments is just "1". 
-            | None,_ ->
-            
-                let domainTy,resultTy = UnifyFunctionType None cenv denv m exprTy
-                let argTys = if is_unit_typ cenv.g domainTy then [] else  try_dest_tuple_typ cenv.g domainTy
-                // Only apply this rule if a candidate method exists with this number of arguments
-                let argTys = 
-                    if candidates |> List.exists (CalledMethHasSingleArgumentGroupOfThisLength argTys.Length) then 
-                       argTys
-                    else 
-                       [domainTy]
-                let unnamedCurriedCallerArgs = [argTys |> List.map (fun ty -> CallerArg(ty,m,false,dummyExpr)) ]
-                let namedCurriedCallerArgs = unnamedCurriedCallerArgs |> List.map (fun _ -> [])
-                unnamedCurriedCallerArgs, namedCurriedCallerArgs
-                
-
-            | Some (unnamedCurriedCallerArgs,namedCurriedCallerArgs),_ -> 
-                let unnamedCurriedCallerArgs = unnamedCurriedCallerArgs |> List.mapSquared (fun (x,xty,xm) -> CallerArg(xty,xm,false,dummyExpr))
-                let namedCurriedCallerArgs = namedCurriedCallerArgs |> List.mapSquared (fun (id,isOpt,x,xty,xm) -> CallerNamedArg(id,CallerArg(xty,xm,isOpt,dummyExpr))) 
-                unnamedCurriedCallerArgs, namedCurriedCallerArgs
-
-        let callerArgCounts = (List.sumBy List.length unnamedCurriedCallerArgs, List.sumBy List.length namedCurriedCallerArgs)
-
-        let mk_CalledMeth (minfo,pinfoOpt,allowParamArgs) = 
-            let minst = FreshenMethInfo cenv m minfo
-            let userTypeArgs = Option.otherwise tyargsOpt minst
-            let allArgs = List.zip unnamedCurriedCallerArgs namedCurriedCallerArgs
-            MakeCalledMeth(cenv.infoReader,checkingAttributeCall, FreshenMethInfo cenv, m,ad,minfo,minst,userTypeArgs,pinfoOpt,objArgTys,allArgs,allowParamArgs)
-
-        let preArgumentTypeCheckingCalledMethGroup = 
-            [ for (minfo,pinfoOpt) in calledMethsAndProps do
-                let meth = mk_CalledMeth (minfo,pinfoOpt,true) 
-                yield meth
-                if meth.UsesParamArrayConversion then 
-                    yield mk_CalledMeth (minfo,pinfoOpt,false) ]
-                    
-        let csenv = (MakeConstraintSolverEnv cenv.css m denv)
-        let uniquelyResolved = UnifyUniqueOverloading csenv callerArgCounts methodName ad preArgumentTypeCheckingCalledMethGroup |> CommitOperationResult
-        uniquelyResolved,preArgumentTypeCheckingCalledMethGroup
-
-    // STEP 2. Type check arguments 
-    let unnamedCurriedCallerArgs,namedCurriedCallerArgs,lambdaVars,returnTy,tpenv =  
-    
-        // STEP 2a. First extract what we know about the caller arguments, either type-directed if 
-        // no arguments are given or else based on the syntax of the arguments. 
-        let unnamedCurriedCallerArgs,namedCurriedCallerArgs,lambdaVars,returnTy,tpenv = 
-            match curriedCallerArgsOpt with 
-            | None ->
-                let curriedArgTys,returnTy = 
-                    match candidates with 
-                    // "single named item" rule. This is where we have a single accessible method 
-                    //      member x.M(arg1,...,argN) 
-                    // being used in a first-class way, i.e. 
-                    //      x.M  
-                    // Because there is only one accessible method info available based on the name of the item 
-                    // being accessed we know the number of arguments the first class use of this 
-                    // method will take. Optional and out args are _not_ included, which means they will be resolved 
-                    // to their default values (for optionals) and be part of the return tuple (for out args). 
-                    | [calledMeth] -> 
-                        UnifyMatchingSimpleArgumentTypes exprTy calledMeth
-                    | _ -> 
-                        let domainTy,returnTy = UnifyFunctionType None cenv denv m exprTy
-                        let argTys = if is_unit_typ cenv.g domainTy then [] else  try_dest_tuple_typ cenv.g domainTy
-                        // Only apply this rule if a candidate method exists with this number of arguments
-                        let argTys = 
-                            if candidates |> List.exists (CalledMethHasSingleArgumentGroupOfThisLength argTys.Length) then 
-                                argTys                                  
-                            else
-                                [domainTy]
-                        [argTys],returnTy
-                        
-                let lambdaVarsAndExprs = curriedArgTys |> List.mapiSquared (fun i j ty -> mk_compgen_local m ("arg"^string i^string j) ty)
-                let unnamedCurriedCallerArgs = lambdaVarsAndExprs |> List.mapSquared (fun (v,e) -> CallerArg(type_of_expr cenv.g e,range_of_expr e,false,e))
-                let namedCurriedCallerArgs = lambdaVarsAndExprs |> List.map (fun _ -> [])
-                unnamedCurriedCallerArgs,namedCurriedCallerArgs,Some(List.map (List.map fst) lambdaVarsAndExprs), returnTy,tpenv
-
-            | Some (unnamedCurriedCallerArgs,namedCurriedCallerArgs) ->
-                let unnamedCurriedCallerArgs = unnamedCurriedCallerArgs |> List.mapSquared (fun (x,xty,xm) -> CallerArg(xty,xm,false,x)) 
-                let unnamedCurriedCallerArgs,tpenv =  TcMethodArgs cenv env tpenv unnamedCurriedCallerArgs
-                unnamedCurriedCallerArgs,namedCurriedCallerArgs,None,exprTy,tpenv
-
-        // Now check the named arguments
-        let namedCurriedCallerArgs = namedCurriedCallerArgs |> List.mapSquared (fun (id,isOpt,x,xty,xm) -> CallerNamedArg(id,CallerArg(xty,xm,isOpt,x))) 
-        let namedCurriedCallerArgs,tpenv =  TcMethodNamedArgs cenv env tpenv namedCurriedCallerArgs
-        unnamedCurriedCallerArgs,namedCurriedCallerArgs,lambdaVars,returnTy,tpenv
-
-    let preArgumentTypeCheckingCalledMethGroup = 
-       preArgumentTypeCheckingCalledMethGroup |> List.map (fun cmeth -> (cmeth.Method, cmeth.CalledTyArgs, cmeth.AssociatedPropertyInfo, cmeth.UsesParamArrayConversion))
-    
-    // STEP 3. Resolve overloading 
-    /// Select the called method that's the result of overload resolution
-    let (CalledMeth(finalCalledMethInfo,
-                    finalCalledMethInst,
-                    _,
-                    _,
-                    argSets,
-                    _,
-                    assignedNamedProps,
-                    finalCalledPropInfoOpt,_, 
-                    attributeAssignedNamedItems,
-                    unnamedCalledOptArgs,
-                    unnamedCalledOutArgs) as finalCalledMeth) = 
-
-        let mk_CalledMeth2 (minfo:MethInfo,minst,pinfoOpt,usesParamArrayConversion) = 
-            let userTypeArgs = Option.otherwise tyargsOpt minst
-            
-            if verbose then dprintf "--> minfo.Type = %s" (showL (typeL minfo.EnclosingType));
-            
-            let callerArgs = List.zip unnamedCurriedCallerArgs namedCurriedCallerArgs
-            MakeCalledMeth(cenv.infoReader,checkingAttributeCall, FreshenMethInfo cenv, m,ad,minfo,minst,userTypeArgs,pinfoOpt,objArgTys,callerArgs,usesParamArrayConversion)
-          
-        let postArgumentTypeCheckingCalledMethGroup = List.map mk_CalledMeth2 preArgumentTypeCheckingCalledMethGroup
-
-        let rty2 = (returnTy, (* dummy : this is unused *) mk_unit cenv.g m)
-
-        let callerArgCounts = (unnamedCurriedCallerArgs.Length, namedCurriedCallerArgs.Length)
-        let csenv = (MakeConstraintSolverEnv cenv.css m denv)
-        
-        // Commit unassociated constraints prior to member overload resolution where there is ambiguity 
-        // about the possible target of the call. 
-        if not uniquelyResolved then 
-            GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv,denv,m)
-                 (free_in_type_lr cenv.g false returnTy @
-                  (unnamedCurriedCallerArgs |> List.collectSquared  (fun (CallerArg(xty,_,_,_)) -> free_in_type_lr cenv.g false xty)));
-
-        if verbose then dprintf "--> TcMethodApplication (resolve overloading) @%a\n" output_range m;
-        let result, errors = 
-            ResolveOverloading csenv NoTrace methodName callerArgCounts ad postArgumentTypeCheckingCalledMethGroup true (Some rty2) 
-        
-        // Raise the errors from the constraint solving 
-        RaiseOperationResult errors;
-        match result with 
-        | None -> error(InternalError("at least one error should be returned by failed method overloading",m))
-        | Some res ->  res
-
-    let assignedNamedArgs = argSets |> List.collect (fun argSet -> argSet.AssignedNamedArgs)
-    let paramArrayCallerArgs = argSets |> List.collect (fun argSet -> argSet.ParamArrayCallerArgs)
-    let unnamedCalledArgs = argSets |> List.collect (fun argSet -> argSet.UnnamedCalledArgs)
-    let unnamedCallerArgs = argSets |> List.collect (fun argSet -> argSet.UnnamedCallerArgs)
-    
-    // STEP 4. Check the attributes on the method and the corresponding event/property, if any 
-
-    finalCalledPropInfoOpt |> Option.iter (fun pinfo -> CheckPropInfoAttributes pinfo m |> CommitOperationResult) ;
-
-    let isInstance = nonNil objArgs
-    MethInfoChecks cenv.g cenv.amap isInstance objArgs ad m finalCalledMethInfo;
-
-    if (argSets |> List.existsi (fun i argSet -> argSet.UnnamedCalledArgs |> List.existsi (fun j ca -> ca.Position <> (i,j)))) then
-        warning(Deprecated("The unnamed arguments do not form a prefix of the arguments of the method called",m));
-
-
-    // STEP 5. Build the argument list. Adjust for optional arguments, byref arguments and coercions.
-    // For example, if you pass an F# reference cell to a byref then we must get the address of the 
-    // contents of the ref. Likewise lots of adjustments are made for optional arguments etc.
-
-    // Some of the code below must allocate temporary variables or bind other variables to particular values. 
-    // As usual we represent variable allocators by expr -> expr functions 
-    // which we then use to wrap the whole expression. These will either do nothing or pre-bind a variable. It doesn't
-    // matter what order they are applied in as long as they are all composed together.
-    let emptyPreBinder (e:expr) = e
-    
-    // For unapplied 'e.M' we first evaluate 'e' outside the lambda, i.e. 'let v = e in (fun arg -> v.M(arg))' 
-    let objArgPreBinder,objArgs = 
-        match objArgs,lambdaVars with 
-        | [objArg],Some _   -> 
-            let objArgTy = type_of_expr cenv.g objArg
-            let v,ve = mk_compgen_local m "objectArg" objArgTy
-            (fun body -> mk_compgen_let m v objArg body), [ve]
-
-        | _ -> 
-            emptyPreBinder,objArgs
-
-  
-    // Handle optional arguments
-    let optArgPreBinder,allArgs,outArgExprs,outArgTmpBinds = 
-
-        let normalUnnamedArgs = 
-          (unnamedCalledArgs,unnamedCallerArgs) ||> List.map2 (fun called caller -> AssignedCalledArg(None,called,caller)) 
-
-        let paramArrayArgs = 
-          match finalCalledMeth.ParamArrayCalledArgOpt with 
-          | None -> []
-          | Some paramArrayCalledArg -> 
-               let paramArrayCalledArgElementType = dest_il_arr1_typ cenv.g paramArrayCalledArg.Type
-               let es = paramArrayCallerArgs  |> List.map (fun (CallerArg(callerArgTy,_,_,callerArgExpr)) -> mk_coerce_if_needed cenv.g paramArrayCalledArgElementType callerArgTy callerArgExpr)
-               [ AssignedCalledArg(None,paramArrayCalledArg,CallerArg(paramArrayCalledArg.Type,m,false,TExpr_op(TOp_array,[paramArrayCalledArgElementType], es ,m))) ]
-
-        // REVIEW: Move all this code into some isolated file, e.g. "optional.fs"
-        //
-        // Handle CallerSide optional arguments. 
-        //
-        // CallerSide optional arguments are largely for COM interop, e.g. to PIA assemblies for Word etc.
-        // As a result we follow the VB spec here. To quote from an email exchange between the C# and VB teams.
-        //
-        //   "1.        If the parameter is statically typed as System.Object and does not have a value, then there are two cases:
-        //       a.     The parameter may have the IDispatchConstantAttribute or IUnknownConstantAttribute attribute. If this is the case, the VB compiler then create an instance of the System.Runtime.InteropServices.DispatchWrapper /System.Runtime.InteropServices.UnknownWrapper type at the call site to wrap the value Nothing/null.
-        //       b.     If the parameter does not have those two attributes, we will emit Missing.Value.
-        //    2.        Otherwise, if there is a value attribute, then emit the default value.
-        //    3.        Otherwise, we emit default(T).
-        //    4.        Finally, we apply conversions from the value to the parameter type. This is where the nullable conversions take place for VB.
-        //    - VB allows you to mark ref parameters as optional. The semantics of this is that we create a temporary 
-        //        with type = type of parameter, load the optional value to it, and call the method. 
-        //    - VB also allows you to mark arrays with Nothing as the optional value.
-        //    - VB also allows you to pass intrinsic values as optional values to parameters 
-        //        typed as Object. What we do in this case is we box the intrinsic value."
-        //
-        let optArgs,optArgPreBinder = 
-          (emptyPreBinder,unnamedCalledOptArgs)
-            ||> List.mapfold (fun wrapper (CalledArg(_,_,optArgInfo,_,_,calledArgTy) as calledArg) -> 
-                  let wrapper2,expr = 
-
-                      match optArgInfo with 
-                      | NotOptional -> 
-                          error(InternalError("Unexpected NotOptional",m))
-                      | CallerSide dfltVal ->
-                          let rec build = function 
-                              | MissingValue -> 
-                                  (* Add an I_nop if this is an initonly field to make sure we never recognize it as an lvalue. See mk_expra_of_expr. *)
-                                  emptyPreBinder,mk_asm ([ mk_normal_ldsfld (fspec_Missing_Value cenv.g.ilg); I_arith AI_nop ],[],[],[calledArgTy],m)
-                              | DefaultValue -> 
-                                  emptyPreBinder,mk_ilzero(m,calledArgTy)
-                              | Constant fieldInit -> 
-                                  emptyPreBinder,TExpr_const(TcFieldInit m fieldInit,m,calledArgTy)  
-                              | WrapperForIDispatch ->
-                                  let tref = mk_tref(cenv.g.ilg.mscorlib_scoref ,"System.Runtime.InteropServices.DispatchWrapper")
-                                  let mref = mk_ctor_mspec_for_nongeneric_boxed_tref(tref,[cenv.g.ilg.typ_Object]).MethodRef
-                                  let expr = TExpr_op(TOp_ilcall((false,false,false,false,CtorValUsedAsSuperInit,false,false,None,mref),[],[],[cenv.g.obj_ty]),[],[mk_ilzero(m,calledArgTy)],m)
-                                  emptyPreBinder,expr
-                              | WrapperForIUnknown ->
-                                  let tref = mk_tref(cenv.g.ilg.mscorlib_scoref ,"System.Runtime.InteropServices.UnknownWrapper")
-                                  let mref = mk_ctor_mspec_for_nongeneric_boxed_tref(tref,[cenv.g.ilg.typ_Object]).MethodRef
-                                  let expr = TExpr_op(TOp_ilcall((false,false,false,false,CtorValUsedAsSuperInit,false,false,None,mref),[],[],[cenv.g.obj_ty]),[],[mk_ilzero(m,calledArgTy)],m)
-                                  emptyPreBinder,expr
-                              | PassByRef (ty, dfltVal2) -> 
-                                  let v,ve = mk_compgen_local m "defaultByrefArg" ty
-                                  let wrapper2,rhs = build dfltVal2 
-                                  (wrapper2 >> mk_compgen_let m v rhs), mk_val_addr m (mk_local_vref v)
-                          build dfltVal
-
-                      | CalleeSide -> 
-                          emptyPreBinder,mk_ucase(mk_none_ucref cenv.g,[calledArgTy],[],m)
-
-                  // Combine the variable allocators (if any)
-                  let wrapper = (wrapper >> wrapper2)
-                  let callerArg = CallerArg(calledArgTy,m,false,expr)
-                  AssignedCalledArg(None,calledArg,callerArg),wrapper)
-
-
-        // Handle optional arguments
-        let wrapOptionalArg (AssignedCalledArg(idOpt,(CalledArg(_,_,optArgInfo,_,_,calledArgTy) as calledArg) ,CallerArg(callerArgTy,m,isOptCallerArg,expr)) as assignedArg) = 
-            match optArgInfo with 
-            | NotOptional -> 
-                if isOptCallerArg then errorR(Error("The corresponding formal argument is not optional",m));
-                assignedArg
-
-            | _ -> 
-                let expr = 
-                    match optArgInfo with 
-                    | CallerSide _ -> 
-                        if isOptCallerArg then 
-                            mk_ucase_field_get_unproven(expr,mk_some_ucref cenv.g,[dest_option_ty cenv.g callerArgTy],0,m) 
-                        else 
-                            expr
-                    | CalleeSide -> 
-                        if isOptCallerArg then 
-                            // M(?x=bopt) when M(A) --> M(?x=Some(b.Value))
-                            expr 
-                        else                            
-                            // M(x=b) when M(A) --> M(?x=Some(b :> A))
-                            if is_option_ty cenv.g calledArgTy then 
-                                let calledNonOptTy = dest_option_ty cenv.g calledArgTy 
-                                mk_ucase(mk_some_ucref cenv.g,[calledNonOptTy],[mk_coerce_if_needed cenv.g calledNonOptTy callerArgTy expr],m)
-                            else 
-                                expr // should be unreachable 
-                            
-                    | _ -> failwith "Unreachable"
-                AssignedCalledArg(idOpt,calledArg,CallerArg((type_of_expr cenv.g expr),m,isOptCallerArg,expr))
-
-        let outArgsAndExprs,outArgTmpBinds = 
-            unnamedCalledOutArgs 
-              |> List.map (fun (CalledArg(_,_,_,_,_,calledArgTy) as calledArg) -> 
-                let outArgTy = dest_byref_typ cenv.g calledArgTy
-                let outv,outArgExpr = Tastops.mk_mut_compgen_local m "outArg" outArgTy // mutable! 
-                let expr = mk_ilzero(m,outArgTy)
-                let callerArg = CallerArg(calledArgTy,m,false,mk_val_addr m (mk_local_vref outv))
-                (AssignedCalledArg(None,calledArg,callerArg), outArgExpr), mk_compgen_bind outv expr) 
-              |> List.unzip
-
-        let outArgs, outArgExprs = List.unzip outArgsAndExprs
-
-        let allArgs =
-            List.map wrapOptionalArg normalUnnamedArgs @ 
-            List.map wrapOptionalArg assignedNamedArgs @ 
-            paramArrayArgs @
-            optArgs @ 
-            outArgs
-        
-        let allArgs = 
-            allArgs |> List.sortBy (fun x -> x.Position)
-
-        optArgPreBinder,allArgs,outArgExprs,outArgTmpBinds
-  
-    // Handle adhoc argument conversions
-    let coerce (AssignedCalledArg(_,CalledArg(_,_,optArgInfo,isOutArg,_,calledArgTy),CallerArg(callerArgTy,m,isOptCallerArg,e))) = 
-    
-       if is_byref_typ cenv.g calledArgTy && is_refcell_ty cenv.g callerArgTy then 
-           TExpr_op(TOp_get_ref_lval,[dest_refcell_ty cenv.g callerArgTy],[e],m) 
-
-       elif is_delegate_typ cenv.g calledArgTy && is_fun_typ cenv.g callerArgTy then 
-           let minfo,delArgTys,delRetTy,_ = GetSigOfFunctionForDelegate cenv.infoReader calledArgTy m ad
-           BuildNewDelegateExpr None cenv calledArgTy (minfo,delArgTys)  (e,callerArgTy) m
-
-       // Note: out args do not need to be coerced 
-       elif isOutArg then 
-           e
-       // Note: not all these casts are not reported in quotations 
-       else 
-           mk_coerce_if_needed cenv.g calledArgTy callerArgTy e 
-
-    // Record the resolution of the named argument for the Language Service
-    allArgs |> List.iter (fun (AssignedCalledArg(idOpt,CalledArg(_,_,_,_,_,calledArgTy),_)) ->
-        match idOpt with 
-        | None -> ()
-        | Some id -> CallNameResolutionSink(id.idRange,nenv,Item_param_name(id),ItemOccurence.Use,nenv.eDisplayEnv,ad));
-
-    let allArgsCoerced = List.map coerce  allArgs
-
-
-    // Make the call expression 
-    let expr,exprty = 
-        BuildMethodCall cenv env mut m isProp finalCalledMethInfo isSuperInit finalCalledMethInst objArgs allArgsCoerced
-
-    // Bind "out" parameters as part of the result tuple 
-    let expr,exprty = 
-        if isNil outArgTmpBinds then expr,exprty
-        else 
-            let outArgTys = outArgExprs |> List.map (type_of_expr cenv.g)
-            let expr = if is_unit_typ cenv.g exprty then mk_compgen_seq m expr  (mk_tupled cenv.g  m outArgExprs outArgTys)
-                       else  mk_tupled cenv.g  m (expr :: outArgExprs) (exprty :: outArgTys)
-            let expr = mk_lets_bind m outArgTmpBinds expr
-            expr, type_of_expr cenv.g expr
-
-    // Handle post-hoc property assignments 
-    let expr = 
-        if isNil assignedNamedProps then expr else 
-        // This holds the result of the call 
-        let objv,objExpr = Tastops.mk_mut_compgen_local m "returnVal" exprty // mutable in case it's a struct 
-        // This expression  mutates the properties on the result of the call
-        let propSetExpr = 
-            List.fold 
-                (fun acc (AssignedItemSetter(id,setter,CallerArg(callerArgTy,m,isOptCallerArg,argExpr))) ->
-                    if isOptCallerArg then error(Error("invalid optional assignment to a property or field",m));
-                    
-                    let action = 
-                        match setter with 
-                        | AssignedPropSetter(pinfo,pminfo,pminst) -> 
-                            MethInfoChecks cenv.g cenv.amap true [objExpr] ad m pminfo;
-                            let calledArgTy = List.hd (List.hd (ParamTypesOfMethInfo cenv.amap m pminfo pminst))
-                            let argExpr = mk_coerce(argExpr,calledArgTy,m,callerArgTy)
-                            BuildMethodCall cenv env DefinitelyMutates m true pminfo NormalValUse pminst [objExpr] [argExpr] |> fst 
-
-                        | AssignedIlFieldSetter(finfo) ->
-                            // Get or set instance IL field 
-                            ILFieldInstanceChecks  cenv.g cenv.amap ad m finfo;
-                            BuildILFieldSet cenv.g m objExpr finfo argExpr 
-                        
-                        | AssignedRecdFieldSetter(rfinfo) ->
-                            RecdFieldInstanceChecks cenv.g ad m rfinfo; 
-                            let _,ftinst,_ = FreshenPossibleForallTy cenv.g m TyparFlexible (rfinfo.FieldType)
-                            CheckRecdFieldMutation m denv rfinfo ftinst;
-                            BuildRecdFieldSet cenv.g m denv objExpr rfinfo ftinst argExpr 
-
-                    // Record the resolution for the Language Service
-                    CallNameResolutionSink(id.idRange,nenv,Item_prop_name(id),ItemOccurence.Use,nenv.eDisplayEnv,ad);
-
-                    mk_compgen_seq m acc action)
-                (mk_unit cenv.g m) 
-                assignedNamedProps
-
-        // now put them together 
-        let expr = mk_compgen_let m objv expr  (mk_compgen_seq m propSetExpr objExpr)
-        expr
-
-    // Build the lambda expression if any 
-    let expr = 
-        match lambdaVars with 
-        | None -> expr
-        | Some curriedLambdaVars -> 
-            let mkLambda vs expr = 
-                match vs with 
-                | [] -> mk_unit_delay_lambda cenv.g m expr 
-                | _ -> mk_multi_lambda m vs (expr, type_of_expr cenv.g expr)
-            List.foldBack mkLambda curriedLambdaVars expr
-
-    let expr = 
-        match unnamedDelayedCallerArgExprOpt with 
-        | Some synArgExpr -> 
-            match lambdaVars with 
-            | Some [lambdaVars] -> 
-                let argExpr,tpenv = TcExpr cenv (mk_tupled_vars_ty cenv.g lambdaVars) env tpenv synArgExpr 
-                mk_appl cenv.g ((expr,type_of_expr cenv.g expr),[],[argExpr],m)
-            | _ -> 
-                error(InternalError("unreachable - expected some lambda vars for a tuple mismatch",m))
-        | None -> 
-            expr
-
-    // Apply the PreBinders, if any 
-    let expr = optArgPreBinder expr
-    let expr = objArgPreBinder expr
-    
-    (expr,attributeAssignedNamedItems,delayed),tpenv
-            
-and TcMethodArgs cenv env tpenv args =  
-    List.mapfoldSquared (TcMethodArg cenv env) tpenv args
-
-and TcMethodArg  cenv env tpenv (CallerArg(ty,m,isOpt,e)) = 
-    let e',tpenv = TcExpr cenv ty env tpenv e 
-    CallerArg(ty,m,isOpt,e'),tpenv
-
-and TcMethodNamedArgs cenv env tpenv args =  
-    List.mapfoldSquared (TcMethodNamedArg cenv env) tpenv args
-
-and TcMethodNamedArg  cenv env tpenv (CallerNamedArg(id,arg)) = 
-    let arg',tpenv = TcMethodArg cenv env tpenv arg 
-    CallerNamedArg(id,arg'),tpenv
-
-/// Typecheck "new Delegate(fun x y z -> ...)" constructs
-and TcNewDelegateThen cenv overallTy env tpenv m delty arg atomicFlag delayed =
-    let ad = AccessRightsOfEnv env
-    unifyE cenv env m overallTy delty;
-    let minfo,delArgTys,delRetTy,fty = GetSigOfFunctionForDelegate cenv.infoReader delty m ad
-    // We pass isInstance = true here because we're checking the rights to access the "Invoke" method
-    MethInfoChecks cenv.g cenv.amap true [] (AccessRightsOfEnv env) m minfo;
-    let args = GetMethodArgs arg
-    match args with 
-    | [farg],[] -> 
-        let m = range_of_synexpr arg
-        let (CallerArg(_,_,_,farg')),tpenv =  TcMethodArg cenv env tpenv (CallerArg(fty,m,false,farg))
-        let expr = BuildNewDelegateExpr None cenv delty (minfo,delArgTys) (farg',fty) m 
-        PropagateThenTcDelayed cenv overallTy env tpenv m (MkApplicableExprNoFlex cenv expr) delty atomicFlag delayed  
-    | _ ->  error(Error("A delegate constructor must be passed a single function value",m))
-
-
-
-and bind_letrec (binds:Bindings) m e = 
-    if FlatList.isEmpty binds then 
-        e 
-    else 
-        TExpr_letrec (binds,e,m,NewFreeVarsCache()) 
-
-/// Process a sequence of iterated lets "let ... in let ... in ..." in a tail recursive way 
-/// This avoids stack overflow on really larger "let" and "letrec" lists
-and TcLinearLetExprs bodyChecker cenv env overallTy builder tpenv (processUseBindings,isRec,isUse,binds,body,m) =
-    assert (not isUse || processUseBindings)
-
-    if isRec then 
-        // TcLinearLetExprs processes at most one recursive binding
-        let binds = List.map (fun x -> RecBindingDefn(ExprContainerInfo,NoNewSlots,ExpressionBinding,x)) binds
-        if isUse then errorR(Error("A binding may not be marked both 'use' and 'rec'",m));
-        let binds,envinner,tpenv = 
-          TcLetrec ErrorOnOverrides cenv env tpenv (binds,m,m)
-        let body',tpenv = bodyChecker overallTy envinner tpenv body 
-        let body' = bind_letrec (FlatList.of_list binds) m body'
-        fst (builder (body',overallTy)),tpenv
-    else 
-        // TcLinearLetExprs processes multiple 'let' bindings in a tail recursive way
-        // We process one binding, then look for additional linear bindings and accumulate the builder continuation.
-        // Don't processes 'use' bindings (e.g. in sequence expressions) unless directed to.
-        let mkf,envinner,tpenv =
-          TcLetBinding cenv isUse env ExprContainerInfo ExpressionBinding tpenv (binds,m,range_of_synexpr body)
-        let builder' x = builder (mkf x)
-        match body with 
-        | Expr_let (isRec',isUse',binds',body',m') when (not isUse' || processUseBindings) ->
-            TcLinearLetExprs bodyChecker cenv envinner overallTy builder' tpenv (processUseBindings,isRec',isUse',binds',body',m')
-        | _ -> 
-            let body',tpenv = bodyChecker overallTy envinner tpenv body 
-            fst (builder' (body',overallTy)),tpenv
-
-/// Typecheck and compile pattern-matching constructs
-and TcAndPatternCompileMatchClauses exprm matchm actionOnFailure cenv inputTy resultTy env tpenv clauses =
-    let tclauses, tpenv = TcMatchClauses cenv inputTy resultTy env tpenv clauses
-    let v,expr = CompilePatternForMatchClauses cenv env exprm matchm true actionOnFailure inputTy resultTy tclauses
-    v,expr,tpenv
-
-and TcMatchPattern cenv inputTy env tpenv (pat,optWhenExpr) =
-    let m = range_of_synpat pat
-    if verbose then  dprintf "--> TcMatchPattern@%a\n" output_range m;
-    let patf',(tpenv,names,takenNames) = TcPat WarnOnUpperCase cenv env None (OptionalInline,permitInferTypars,noArgOrRetAttribs,false,None,false) (tpenv,Map.empty,Set.empty) inputTy pat
-    let envinner,values,vspecMap = MakeAndPublishSimpleVals cenv env m names
-    let optWhenExpr',tpenv = Option.mapfold (TcExpr cenv cenv.g.bool_ty envinner) tpenv optWhenExpr
-    patf' (TcPatPhase2Input values),optWhenExpr',FlatList.of_list (NameMap.range vspecMap),envinner,tpenv
-
-and TcMatchClauses cenv inputTy resultTy env tpenv clauses =
-    List.mapfold (TcMatchClause cenv inputTy resultTy env) tpenv clauses 
-
-and TcMatchClause cenv inputTy resultTy env tpenv (Clause(pat,optWhenExpr,e,patm,spTgt)) =
-    let pat',optWhenExpr',vspecs,envinner,tpenv = TcMatchPattern cenv inputTy env tpenv (pat,optWhenExpr)
-    let e',tpenv = TcExprThatCanBeCtorBody cenv resultTy envinner tpenv e
-    TClause(pat',optWhenExpr',TTarget(vspecs, e',spTgt),patm),tpenv
-
-and TcStaticOptimizationConstraint cenv env tpenv c = 
-    match c with 
-    | WhenTyparTyconEqualsTycon(tp,ty,m) ->
-        if not cenv.g.compilingFslib then 
-            errorR(Error("Static optimization conditionals are only for use within the F# library",m));
-        let ty',tpenv = TcType cenv NewTyparsOK CheckCxs env tpenv ty
-        let tp',tpenv = TcTypar cenv env NewTyparsOK tpenv tp
-        TTyconEqualsTycon(mk_typar_ty tp', ty'),tpenv
-    | WhenInlined(m) ->
-        if not cenv.g.compilingFslib then 
-            errorR(Error("Static optimization conditionals are only for use within the F# library",m));
-        TTyconEqualsTycon(cenv.g.obj_ty, cenv.g.obj_ty),tpenv
-
-/// Binding checking code, for all bindings including let bindings, let-rec bindings, member bindings and object-expression bindings and 
-and TcNormalizedBinding declKind cenv env tpenv overallTy ctorThisVarRefCellOpt (enclosingDeclaredTypars,(ExplicitTyparInfo(declaredTypars,infer) as flex)) bind =
-    let envinner = AddDeclaredTypars NoCheckForDuplicateTypars (enclosingDeclaredTypars@declaredTypars) env
-    match bind with 
-
-    | NormalizedBinding(vis,bkind,pseudo,mut,attrs,doc,_,valSynData,pat,BindingRhs(spatsL,rtyOpt,rhsExpr),bindingRange,spBind) ->
-        
-        let (ValSynData(memberFlagsOpt,valSynInfo,_)) = valSynData 
-        (* Check the attributes of the binding *)
-        let TcAttrs tgt attrs = 
-            if not (DeclKind.CanHaveAttributes declKind) && nonNil(attrs) then errorR(Error("Attributes are not permitted on 'let' bindings in expressions or classes",bindingRange));
-            TcAttributes cenv envinner tgt attrs
-    
-        let valAttribs = TcAttrs attrTgtBinding  attrs
-        let inlineFlag = ComputeInlineFlag memberFlagsOpt pseudo mut valAttribs
-        let argAttribs = 
-            spatsL |> List.map (SynInfo.InferArgSynInfoFromSimplePats >> List.map (SynInfo.AttribsOfArgData >> TcAttrs attrTgtParameter))
-        let retAttribs = 
-            match rtyOpt with 
-            | Some (_,_,retAttrs) -> TcAttrs attrTgtReturnValue retAttrs 
-            | None -> [] 
-
-        let argAndRetAttribs = ArgAndRetAttribs(argAttribs, retAttribs)
-
-        if HasAttrib cenv.g cenv.g.attrib_DefaultValueAttribute valAttribs then 
-            errorR(Error("The 'DefaultValue' attribute may only be used on 'val' declarations",bindingRange));
-        
-        let isThreadStatic = isThreadOrContextStatic cenv.g valAttribs
-        if isThreadStatic then warning(DeprecatedThreadStaticBindingWarning(bindingRange));
-
-        if HasAttrib cenv.g cenv.g.attrib_ConditionalAttribute valAttribs && isNone(memberFlagsOpt) then 
-            errorR(Error("The 'ConditionalAttribute' attribute may only be used on members",bindingRange));
-
-        if HasAttrib cenv.g cenv.g.attrib_EntryPointAttribute valAttribs then 
-            if isSome(memberFlagsOpt) then 
-                errorR(Error("The 'EntryPointAttribute' attribute may only be used on function definitions in modules",bindingRange))
-            else 
-                unifyE cenv env bindingRange overallTy (mk_array_typ cenv.g cenv.g.string_ty --> cenv.g.int_ty)
-
-        if mut && pseudo then errorR(Error("Mutable values may not be marked 'inline'",bindingRange));
-        if mut && nonNil declaredTypars then errorR(Error("Mutable values may not have generic parameters",bindingRange));
-        let flex = if mut then dontInferTypars else flex
-        if mut && nonNil spatsL then errorR(Error("Mutable function values should be written 'let mutable f = (fun args -> ...)'",bindingRange));
-        let pseudo = 
-            if pseudo && isNil(spatsL) && isNil(declaredTypars) then 
-                errorR(Error("Only functions may be marked 'inline'",bindingRange));
-                false
-            else 
-                pseudo 
-
-        let compgen = false
-        
-        // Use the syntactic arity if we're defining a function 
-        let partialTopValInfo = TranslateTopValSynInfo bindingRange (TcAttributes cenv env) valSynInfo
-
-        // Check the pattern of the l.h.s. of the binding 
-        let tcPatPhase2,(tpenv,nameToPrelimValSchemeMap,takenNames) = 
-            TcPat AllIdsOK cenv envinner (Some(partialTopValInfo)) (inlineFlag,flex,argAndRetAttribs,mut,vis,compgen) (tpenv,NameMap.empty,Set.empty) overallTy pat
-        
-        // Add active pattern result names to the environment 
-        let envinner = 
-            match NameMap.range nameToPrelimValSchemeMap with 
-            | [PrelimValScheme1(id,_,ty,_,_,_,_,_,_,_,_) ] ->
-                begin match apinfo_of_vname (id.idText, id.idRange) with 
-                | None -> envinner
-                | Some apinfo -> ModifyNameResEnv (AddActivePatternResultTagsToNameEnv apinfo ty) envinner 
-                end
-            | _ -> envinner
-        
-        // Now tc the r.h.s. 
-        // If binding a ctor then set the ugly counter that permits us to write ctor expressions on the r.h.s. 
-        let isCtor = (match memberFlagsOpt with Some(memberFlags) -> memberFlags.MemberKind = MemberKindConstructor | _ -> false)
-        let tc = 
-            if isCtor then TcExprThatIsCtorBody ctorThisVarRefCellOpt 
-            else TcExprThatCantBeCtorBody
-
-        let rhsExpr',tpenv = tc cenv overallTy envinner tpenv rhsExpr
-
-        if bkind = StandaloneExpression && not cenv.isScript then 
-            UnifyUnitType cenv env.DisplayEnv bindingRange overallTy (Some rhsExpr') |> ignore;
-
-        let hasLiteralAttr,konst = TcLiteral cenv overallTy env tpenv (valAttribs,rhsExpr)
-        if hasLiteralAttr && isThreadStatic then 
-            errorR(Error("A literal value may not be given the [] or [] attributes",bindingRange));
-        if hasLiteralAttr && mut then 
-            errorR(Error("A literal value may not be marked 'mutable'",bindingRange));
-        if hasLiteralAttr && pseudo then 
-            errorR(Error("A literal value may not be marked 'inline'",bindingRange));
-        if hasLiteralAttr && nonNil declaredTypars then 
-            errorR(Error("Literal values may not have generic parameters",bindingRange));
-
-        TBindingInfo(inlineFlag,true,valAttribs,doc,tcPatPhase2,flex,nameToPrelimValSchemeMap,rhsExpr',argAndRetAttribs,overallTy,bindingRange,spBind,compgen,konst),tpenv
-
-and TcLiteral cenv overallTy env tpenv (attrs',e) = 
-    let hasLiteralAttr = HasAttrib cenv.g cenv.g.attrib_LiteralAttribute attrs'
-    if not hasLiteralAttr then  hasLiteralAttr,None else 
-        let expr',tpenv = TcExpr cenv overallTy env tpenv e
-        let rec eval e = 
-            match strip_expr e with 
-            | TExpr_const(c,_,_) -> c
-            | _ -> 
-                errorR(Error("This is not a valid constant expression",range_of_expr e));
-                TConst_unit
-        hasLiteralAttr,Some(eval expr') 
-    
-and TcBindingTyparDecls rigid cenv env m tpenv (SynValTyparDecls(synTypars,infer,synTyparConstraints)) = 
-    let declaredTypars = TcTyparDecls cenv env synTypars
-    let envinner = AddDeclaredTypars CheckForDuplicateTypars declaredTypars env
-    let tpenv = TcTyparConstraints cenv NoNewTypars CheckCxs envinner tpenv synTyparConstraints
-    if rigid then declaredTypars |> List.iter (SetTyparRigid cenv.g env.DisplayEnv m);
-    ExplicitTyparInfo(declaredTypars,infer) 
-
-and TcNonrecBindingTyparDecls cenv env tpenv bind = 
-    match bind with 
-    | NormalizedBinding(_,_,_,_,_,_,synTyparDecls,_,_,_,m,_) -> TcBindingTyparDecls true cenv env m tpenv synTyparDecls
-
-and TcNonRecursiveBinding declKind cenv env tpenv ty b =
-    let b = BindingNormalization.NormalizeBinding ValOrMemberBinding cenv env b
-    let flex = TcNonrecBindingTyparDecls cenv env tpenv b
-    TcNormalizedBinding declKind cenv env tpenv ty None ([],flex) b 
-
-//-------------------------------------------------------------------------
-// TcAttribute*
-//------------------------------------------------------------------------
-
-and TcAttribute cenv (env:tcEnv) attrTgt (Attr(tycon,arg,targetIndicator,m))  =
-    let (typath,tyid) = List.frontAndBack tycon
-    let tpenv = emptyTyparEnv
-    let ty,tpenv =  
-        let try1 n = 
-            let tyid = mksyn_id tyid.idRange n
-            let tycon = (typath @ [tyid])
-            let ad = AccessRightsOfEnv env
-            match ResolveTypeLongIdent cenv.nameResolver ItemOccurence.Use OpenQualified env.eNameResEnv ad tycon 0 with
-            | Exception err -> raze(err)
-            | _ ->  success(TcTypeAndRecover cenv NoNewTypars CheckCxs env tpenv (Type_app(Type_lid(tycon,m),[],false,m)) )in
-        ForceRaise ((try1 (tyid.idText^"Attribute")) |> Outcome.otherwise (fun () -> (try1 tyid.idText)))
-  (*   if not (ty <: System.Attribute) then error (Error("A custom attribute must be a subclass of System.Attribute",m)); *)
-
-
-    let ad = AccessRightsOfEnv env
-
-    if not (IsTypeAccessible cenv.g ad ty) then  errorR(Error("This type is not accessible from this code location",m));
-
-    let tcref = tcref_of_stripped_typ cenv.g ty
-
-    let conditionalCallDefine = 
-        TyconRefTryBindAttrib cenv.g cenv.g.attrib_ConditionalAttribute tcref 
-                 (function ([CustomElem_string (Some(msg)) ],_) -> Some msg | _ -> None)
-                 (function (Attrib(_,_,[ AttribStringArg(msg) ],_,_))  -> Some(msg) | _ -> None)
-
-    match conditionalCallDefine with 
-    | Some(d) when not (List.mem d cenv.conditionalDefines) -> 
-        []
-    | _ ->
-
-         (* REVIEW: take notice of inherited? *)
-        let validOn,inherited = 
-            let validOnDefault = 0x7fff
-            let inheritedDefault = true
-            if tcref.IsILTycon then 
-                let tdef = tcref.ILTyconRawMetadata
-                let tref = cenv.g.attrib_AttributeUsageAttribute.TypeRef
-                
-                match ILThingDecodeILAttrib cenv.g tref tdef.tdCustomAttrs with 
-                | Some ([CustomElem_int32 validOn ],named) -> 
-                    let inherited = 
-                      (List.tryPick (function ("Inherited",_,_,CustomElem_bool res) -> Some res | _ -> None) named) 
-                      +? (fun () -> inheritedDefault)
-                    (validOn, inherited)
-                | Some ([CustomElem_int32 validOn; CustomElem_bool allowMultiple; CustomElem_bool inherited ],_) -> 
-                    (validOn, inherited)
-                | _ -> 
-                    (validOnDefault, inheritedDefault)
-            else
-                match (TryFindAttrib cenv.g cenv.g.attrib_AttributeUsageAttribute tcref.Attribs) with
-                | Some(Attrib(_,_,[ AttribInt32Arg(validOn) ],_,_)) ->
-                    (validOn, inheritedDefault)
-                | Some(Attrib(_,_,[ AttribInt32Arg(validOn);
-                                    AttribBoolArg(allowMultiple);
-                                    AttribBoolArg(inherited)],_,_)) ->
-                    (validOn, inherited)
-                | Some _  ->
-                    warning(Error("Unexpected condition in imported assembly: failed to decode AttributeUsage attribute",m))
-                    (validOnDefault, inheritedDefault)                    
-                | _ -> 
-                    (validOnDefault, inheritedDefault)
-        let possibleTgts = validOn &&& attrTgt
-        let possibleTgts = 
-            match targetIndicator with
-            | Some id when id.idText = "assembly" -> attrTgtAssembly
-            | Some id when id.idText = "module" -> attrTgtModule
-            | Some id when id.idText = "return" -> attrTgtReturnValue
-            | Some id when id.idText = "field" -> attrTgtField
-            | Some id when id.idText = "property" -> attrTgtProperty
-            | Some id when id.idText = "param" -> attrTgtParameter
-            | Some id when id.idText = "type"    -> attrTgtTyconDecl
-            | Some id when id.idText = "constructor"    -> attrTgtConstructor
-            | Some id when id.idText = "event"    -> attrTgtEvent
-            | Some id     -> 
-                errorR(Error("Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'",id.idRange)); 
-                possibleTgts
-            | _ -> possibleTgts
-        if (possibleTgts &&& attrTgt) = 0 then 
-            if (possibleTgts = attrTgtAssembly || possibleTgts = attrTgtModule) then 
-                errorR(Error("This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module",m))
-            else
-                errorR(Error("This attribute is not valid for use on this language element",m));
-
-        let item,rest = ForceRaise (ResolveObjectConstructor cenv.nameResolver env.DisplayEnv m ad ty)
-        let attrib = 
-            match item with 
-            | Item_ctor_group(methodName,minfos) ->
-                let meths = minfos |> List.map (fun minfo -> minfo,None) 
-
-                let (expr,namedCallerArgs,_),tpenv = 
-                  TcMethodApplication true cenv env tpenv None [] m methodName ad PossiblyMutates false meths NormalValUse [arg] (new_inference_typ cenv ())  []
-
-                unifyE cenv env m ty (type_of_expr cenv.g expr);
-                
-                let mkAttribExpr e = 
-                    AttribExpr(e,EvalAttribArg cenv.g e)
-
-                let namedAttribArgMap = 
-                  namedCallerArgs |> List.map (fun (CallerNamedArg(id,CallerArg(argtyv,m,isOpt,expr))) ->
-                    if isOpt then error(Error("Optional arguments may not be used in custom attributes",m));
-                    let m = range_of_expr expr
-                    let nm,isProp,argty = 
-                      let item,rest = ResolveLongIdentInType cenv.nameResolver (nenv_of_tenv env) Nameres.LookupKind.Expr m ad [id] IgnoreOverrides DefaultTypeNameResInfo ty
-                      let nenv = nenv_of_tenv env 
-                      CallNameResolutionSink(id.idRange,nenv,Item_prop_name(id),ItemOccurence.Use,nenv.eDisplayEnv,ad);
-                      match item with   
-                      | Item_property (_,[pinfo]) -> 
-                          if not pinfo.HasSetter then 
-                            errorR(Error("This property may not be set",m));
-                          id.idText,true,PropertyTypeOfPropInfo cenv.amap m pinfo
-                      | Item_il_field finfo -> 
-                          CheckILFieldInfoAccessible cenv.g cenv.amap m ad finfo;
-                          CheckILFieldAttributes cenv.g finfo m;
-                          id.idText,false,FieldTypeOfILFieldInfo cenv.amap m finfo
-                      | Item_recdfield rfinfo when not rfinfo.IsStatic -> 
-                          CheckRecdFieldInfoAttributes cenv.g rfinfo m  |> CommitOperationResult;        
-                          CheckRecdFieldInfoAccessible m ad rfinfo;
-                          (* This uses the F# backend name mangling of fields.... *)
-                          let nm =  gen_field_name rfinfo.Tycon rfinfo.RecdField
-                          nm,false,rfinfo.FieldType
-                      |  _ -> 
-                          errorR(Error("This property or field was not found on this custom attribute type",m)); 
-                          id.idText,false,cenv.g.unit_ty
-
-                    AddCxTypeMustSubsumeType env.DisplayEnv cenv.css m NoTrace argty argtyv;
-
-                    AttribNamedArg(nm,argty,isProp,mkAttribExpr expr))
-
-                //if tcref_eq cenv.g tcref cenv.g.
-
-                match expr with 
-                | TExpr_op(TOp_ilcall((virt,protect,valu,_,_,_,_,_,mref),[],[],rtys),[],args,m) -> 
-                    if valu then error (Error("A custom attribute must be a reference type",m));
-                    if args.Length <> mref.ArgTypes.Length then error (Error("The number of args for a custom attribute does not match the expected number of args for the attribute constructor",m));
-                    let args = args |> List.map mkAttribExpr
-                    Attrib(tcref,ILAttrib(mref),args,namedAttribArgMap,m)
-
-                | TExpr_app(TExpr_val(vref,_,_),_,_,args,_) -> 
-                    let try_dest_unit_or_tuple = function TExpr_const(TConst_unit,_,_) -> [] | expr -> try_dest_tuple expr
-                    let args = args |> List.collect (try_dest_unit_or_tuple)  |> List.map mkAttribExpr
-                    Attrib(tcref,FSAttrib(vref),args,namedAttribArgMap,m)
-
-                | _ -> 
-                    error (Error("A custom attribute must invoke an object constructor",m))
-
-            | _ -> 
-                error(Error("Attribute expressions must be calls to object constructors",m))
-
-        [ (possibleTgts, attrib) ]
-
-and TcAttributesWithPossibleTargets cenv env attrTgt attrs = 
-
-    attrs |> List.collect (fun attr -> 
-        try 
-            let attribs = TcAttribute cenv env attrTgt attr
-            
-            // This is where we place any checks that completely exclude the use of some particular 
-            // attributes from F#.
-            if HasAttrib cenv.g cenv.g.attrib_TypeForwardedToAttribute (List.map snd attribs) then 
-                let m = match attr with Attr(_,_,_,m) -> m
-                errorR(Error("This attribute may not be used in this version of F#",m));
-            attribs
-        with e -> 
-            let m = match attr with Attr(_,_,_,m) -> m
-            errorRecovery e m; 
-            []) 
-
-and TcAttributes cenv env attrTgt attrs = 
-    TcAttributesWithPossibleTargets cenv env attrTgt attrs |> List.map snd
-
-//-------------------------------------------------------------------------
-// TcLetBinding
-//------------------------------------------------------------------------
-
-and TcLetBinding cenv isUse env containerInfo declKind tpenv (binds,bindsm,scopem) =
-
-    // Typecheck all the bindings...
-    let binds',tpenv = List.mapfold (fun tpenv b -> TcNonRecursiveBinding declKind cenv env tpenv (new_inference_typ cenv ()) b) tpenv binds
-    let (ContainerInfo(altActualParent,tcrefContainerInfo)) = containerInfo
-    
-    // Canonicalize constraints prior to generalization 
-    let denv = env.DisplayEnv
-    GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv,denv,bindsm) 
-        (binds' |> List.collect (fun tbinfo -> 
-            let (TBindingInfo(inlineFlag,immut,attrs,doc,tcPatPhase2,flex,nameToPrelimValSchemeMap,rhsExpr,_,tauTy,m,_,_,_)) = tbinfo
-            let (ExplicitTyparInfo(declaredTypars,canInferTypars)) = flex
-            let maxInferredTypars = (free_in_type_lr cenv.g false tauTy)
-            declaredTypars @ maxInferredTypars));
-
-    let freeInEnv = GeneralizationHelpers.ComputeUngeneralizableTypars env
-
-    // Generalize the bindings...
-    (((fun x -> x), env, tpenv), binds') ||> List.fold (fun (mkf_sofar,env,tpenv) tbinfo -> 
-        let (TBindingInfo(inlineFlag,immut,attrs,doc,tcPatPhase2,flex,nameToPrelimValSchemeMap,rhsExpr,_,tauTy,m,spBind,_,konst)) = tbinfo
-        let enclosingDeclaredTypars  = []
-        let (ExplicitTyparInfo(declaredTypars,canInferTypars)) = flex
-        let allDeclaredTypars  =  enclosingDeclaredTypars @ declaredTypars
-        let generalizedTypars,prelimValSchemes2 = 
-            let canInferTypars = GeneralizationHelpers. ComputeCanInferTypars(declKind,containerInfo.ParentRef,canInferTypars,None,declaredTypars,m)
-
-            let maxInferredTypars = (free_in_type_lr cenv.g false tauTy)
-
-            let generalizedTypars = GeneralizationHelpers.ComputeGeneralizedTypars(cenv,env, m, immut, freeInEnv, canInferTypars, GeneralizationHelpers.CanGeneralizeConstrainedTyparsForDecl(declKind), inlineFlag, Some rhsExpr, allDeclaredTypars, maxInferredTypars,tauTy,false)
-
-            let prelimValSchemes2 = GeneralizeVals cenv denv enclosingDeclaredTypars  [] generalizedTypars nameToPrelimValSchemeMap
-
-            generalizedTypars,prelimValSchemes2
-
-        // REVIEW: this scopes generalized type variables. Ensure this is handled properly 
-        // on all other paths. 
-        let tpenv = HideUnscopedTypars generalizedTypars tpenv
-        let valSchemes = NameMap.map (UseCombinedArity cenv.g declKind rhsExpr) prelimValSchemes2
-        let values = MakeAndPublishVals cenv env (altActualParent,false,declKind,ValNotInRecScope,valSchemes,attrs,doc,konst)
-        let pat' = tcPatPhase2 (TcPatPhase2Input values)
-        let prelimRecValues = NameMap.map fst values
-        
-        // Now bind the r.h.s. to the l.h.s. 
-        let rhse = mk_tlambda m generalizedTypars (rhsExpr,tauTy)
-
-        match pat' with 
-        // Don't introduce temporary or 'let' for 'match against wild' or 'match against unit' 
-
-        | (TPat_wild _ | TPat_const (TConst_unit,_)) when not isUse && isNil generalizedTypars ->
-            let mk_seq_bind (tm,tmty) = (mk_seq SequencePointsAtSeq m rhse tm, tmty)
-            (mk_seq_bind << mkf_sofar,env,tpenv)
-            
-        | _ -> 
-
-        // nice: don't introduce awful temporary for r.h.s. in the 99% case where we know what we're binding it to 
-        let tmp,tmpe,pat'' = 
-                match pat' with 
-                // nice: don't introduce awful temporary for r.h.s. in the 99% case where we know what we're binding it to 
-                | TPat_as (pat1,PBind(v,TypeScheme(generalizedTypars',_,_)),m1) 
-                    when List.lengthsEqAndForall2 tpspec_eq generalizedTypars generalizedTypars' -> 
-                      v,expr_for_val v.Range v, pat1
-
-                | _ when mustinline(inlineFlag)  -> error(Error("invalid inline specification",m))
-
-                | _ -> 
-                    let tmp,tmpe = Tastops.mk_compgen_local m "patternInput" (generalizedTypars +-> tauTy)
-                    if isUse then 
-                        errorR(Error("'use' bindings must be of the form 'use  = '",m));
-                    
-                    // This assignement forces representation as module value, to maintain the invariant from the 
-                    // type checker that anything related to binding module-level values is marked with an 
-                    // val_top_repr_info, val_actual_parent and is_topbind
-                    if (DeclKind.MustHaveArity declKind) then 
-                        AdjustValToTopVal tmp altActualParent (InferArityOfExprBinding cenv.g tmp rhse);
-                    tmp,tmpe,pat'
-        let mk_rhs_bind (tm,tmty) = (mk_let spBind m tmp rhse tm),tmty
-        let allValsDefinedByPattern = (NameMap.range prelimRecValues |> FlatList.of_list)
-        let mk_pat_bind (tm,tmty) =
-            let valsDefinedByMatching = FlatListSet.remove vspec_eq tmp allValsDefinedByPattern
-            let matchx = CompilePatternForMatch cenv env m m true Incomplete (tmp,generalizedTypars) [TClause(pat'',None,TTarget(valsDefinedByMatching,tm,SuppressSequencePointAtTarget),m)] tmty
-            let matchx = if (DeclKind.ConvertToLinearBindings declKind) then LinearizeTopMatch cenv.g altActualParent matchx else matchx
-            matchx,tmty
-
-        let mk_cleanup (tm,tmty) =
-            if isUse then 
-                (allValsDefinedByPattern,(tm,tmty)) ||> FlatList.foldBack (fun v (tm,tmty) ->
-                    AddCxTypeMustSubsumeType denv cenv.css v.Range NoTrace cenv.g.system_IDisposable_typ v.Type;
-                    let cleanupE = BuildDisposableCleanup cenv env m v
-                    mk_try_finally cenv.g (tm,cleanupE,m,tmty,NoSequencePointAtTry,NoSequencePointAtFinally),tmty)
-            else (tm,tmty) 
-                
-        ((mk_rhs_bind << mk_pat_bind << mk_cleanup << mkf_sofar),
-         AddLocalValMap scopem prelimRecValues env,
-         tpenv))
-
-/// Return binds corresponding to the linearised let-bindings.
-/// This reveals the bound items, e.g. when the lets occur in incremental object defns.
-/// RECAP:
-///   The LHS of let-bindings are patterns.
-///   These patterns could fail, e.g. "let Some x = ...".
-///   So letbindings could contain a fork at a match construct, with one branch being the match failure.
-///   If bindings are linearised, then this fork is pushed to the RHS.
-///   In this case, the let bindings type check to a sequence of bindings.
-and TcLetBindings cenv env containerInfo declKind tpenv (binds,bindsm,scopem) =
-    assert(DeclKind.ConvertToLinearBindings declKind);
-    let isUse = false // 'use' bindings not valid in classes 
-    let mkf,env,tpenv = TcLetBinding cenv false env containerInfo declKind tpenv (binds,bindsm,scopem)
-    let unite = mk_unit cenv.g bindsm
-    let expr,ty = mkf (unite,cenv.g.unit_ty)
-    let rec StripLets acc = function
-        | TExpr_let (bind,body,m,_)      ->  StripLets (TMDefLet(bind,m) :: acc) body
-        | TExpr_seq (e1,e2,NormalSeq,_,m)      ->  StripLets (TMDefDo(e1,m) :: acc) e2
-        | TExpr_const (TConst_unit,_,_) -> List.rev acc
-        | _ -> failwith "TcLetBindings: let sequence is non linear. Maybe a LHS pattern was not linearised?"
-    let binds = StripLets [] expr
-    binds,env,tpenv
-
-and CheckMemberFlags g optIntfSlotTy newslotsOK overridesOK memberFlags m = 
-    if newslotsOK = NoNewSlots && (memberFlags.MemberIsVirtual || memberFlags.MemberIsDispatchSlot) then 
-      errorR(Error("Abstract members are not permitted in an augmentation - they must be defined as part of the type itself",m));
-    if overridesOK = WarnOnOverrides && memberFlags.MemberIsOverrideOrExplicitImpl && isNone optIntfSlotTy then 
-      warning(OverrideInIntrinsicAugmentation(m))
-    if overridesOK = ErrorOnOverrides && memberFlags.MemberIsOverrideOrExplicitImpl then 
-      error(Error("Method overrides and interface implementations are not permitted here",m))
-    
-/// Apply the pre-assumed knowledge available to type inference prior to looking at 
-/// the _body_ of the binding. For example, in a letrec we may assume this knowledge 
-/// for each binding in the letrec prior to any type inference. This might, for example, 
-/// tell us the type of the arguments to a recursive function. 
-and ApplyTypesFromArgumentPatterns (cenv,env,optArgsOK,ty,m,tpenv,BindingRhs(pushedPats,retInfoOpt,e),memberFlagsOpt:MemberFlags option) =  
-    match pushedPats with
-    | [] ->
-        match retInfoOpt with 
-        | None -> ()
-        | Some (retInfoTy,m,_) -> 
-            let retInfoTy,_ = TcTypeAndRecover cenv NewTyparsOK CheckCxs env tpenv retInfoTy
-            unifyE cenv env m ty retInfoTy
-        // Property setters always have "unit" return type
-        match memberFlagsOpt with 
-        | Some memFlags when memFlags.MemberKind = MemberKindPropertySet -> 
-            unifyE cenv env m ty cenv.g.unit_ty
-        | _ -> ()
-            
-    | p :: t -> 
-        let domainTy,resultTy = UnifyFunctionType None cenv env.DisplayEnv m ty
-        // We apply the type information from the patterns by type checking the
-        // "simple" patterns against 'domainTy'. They get re-typechecked later. 
-        ignore (TcSimplePats cenv optArgsOK domainTy env (tpenv,Map.empty,Set.empty) p);
-        ApplyTypesFromArgumentPatterns (cenv,env,optArgsOK,resultTy,m,tpenv,BindingRhs(t,retInfoOpt,e),memberFlagsOpt)
-
-
-/// Do the type annotations give the full and complete generic type? If so, enable generic recursion 
-and ComputeIsComplete enclosingDeclaredTypars declaredTypars ty = 
-    Zset.is_empty (List.fold (fun acc v -> Zset.remove v acc) 
-                                  (free_in_type CollectAllNoCaching ty).FreeTypars 
-                                  (enclosingDeclaredTypars@declaredTypars)) 
-
-
-/// Determine if a uniquely-identified-abstract-slot exists for an override member (or interface member implementation) based on the information available 
-/// at the syntactic definition of the member (i.e. prior to type inference). If so, we know the expected signature of the override, and the full slotsig 
-/// it implements. Apply the inferred slotsig. *)
-and ApplyAbstractSlotInference cenv denv envinner (bindingTy,m,synTyparDecls,declaredTypars,memberId,tcrefObjTy,renaming,objTy,optIntfSlotTy,valSynData,memberFlags,attribs) = 
-
-    let ad = AccessRightsOfEnv envinner
-    let typToSearchForAbstractMembers = 
-        match optIntfSlotTy with 
-        | Some (ty, abstractSlots) -> 
-            // The interface type is in terms of the type's type parameters. 
-            // We need a signature in terms of the values' type parameters. 
-            ty,Some(abstractSlots) 
-        | None -> 
-            tcrefObjTy,None
-
-    // Determine if a uniquely-identified-override exists based on the information 
-    // at the member signature. If so, we know the type of this member, and the full slotsig 
-    // it implements. Apply the inferred slotsig. 
-    if memberFlags.MemberIsOverrideOrExplicitImpl then 
-         
-        let makeUniqueBySig meths = meths |> ListSet.setify (MethInfosEquivByNameAndSig EraseNone cenv.g cenv.amap m)
-        match memberFlags.MemberKind with 
-        | MemberKindMember -> 
-             let dispatchSlots,dispatchSlotsArityMatch = 
-                 GetAbstractMethInfosForSynMethodDecl(cenv.infoReader,ad,memberId,m,typToSearchForAbstractMembers,valSynData)
-
-             let uniqueAbstractMethSigs = 
-                 match dispatchSlots with 
-                 | [] -> 
-                     errorR(Error("No abstract or interface member was found that corresponds to this override",memberId.idRange));
-                     []
-
-                 | _ -> 
-                     match dispatchSlotsArityMatch with 
-                     | meths when meths |> makeUniqueBySig |> List.length = 1 -> 
-                         meths
-                     | [] -> 
-                         errorR(Error("This override takes a different number of arguments to the corresponding abstract member",memberId.idRange));
-                         []
-                     | _ -> 
-                         //printfn "no unique matching dispatch slot for %s at %s" memberId.idText (string_of_range memberId.idRange)
-                         // We hit this case when it is ambiguous which abstract method is being implemented. 
-                         []
-               
-             
-             // If we determined a unique member then utilize the type information from the slotsig 
-             let declaredTypars = 
-                 match uniqueAbstractMethSigs with 
-                 | uniqueAbstractMeth :: _ -> 
-
-                     let uniqueAbstractMeth = InstMethInfo cenv.amap m renaming uniqueAbstractMeth
-                     
-                     let typarsFromAbsSlotAreRigid,typarsFromAbsSlot,argTysFromAbsSlot, retTyFromAbsSlot = 
-                         FreshenAbstractSlot cenv.g cenv.amap m synTyparDecls uniqueAbstractMeth
-
-                     let declaredTypars = (if typarsFromAbsSlotAreRigid then typarsFromAbsSlot else declaredTypars)
-
-                     let absSlotTy = mk_meth_ty cenv.g argTysFromAbsSlot retTyFromAbsSlot
-
-                     unifyE cenv envinner m bindingTy absSlotTy;
-                     declaredTypars
-                 | _ -> declaredTypars 
-
-             // OK, detect 'default' members in the same type and mark them as implemented. 
-             // REVIEW: consider moving this to the all-implemented analysis at the end of the 
-             // type-checking scope, since we have inferred full signature types at that point. 
-             // HOWEVER: we need to know which members have default implementations in order to be 
-             // able to typecheck obejct expressions and sub-classes. 
-             match dispatchSlotsArityMatch 
-                       |> List.filter (fun virt -> tcref_eq cenv.g (tcref_of_stripped_typ cenv.g objTy) (tcref_of_stripped_typ cenv.g virt.EnclosingType)) with 
-             | [] -> ()
-             | meths when meths |> makeUniqueBySig |> List.length = 1 -> 
-                 meths |> List.iter (fun meth ->
-                     match meth with 
-                     | (FSMeth(_,_,vref)) -> 
-                         let virtMember = vref.MemberInfo.Value
-                         if virtMember.IsImplemented then errorR(Error("This method already has a default implementation",memberId.idRange));
-                         virtMember.IsImplemented <- true
-                     | _ -> 
-                         ())
-
-             | _ ->  
-                 errorR(Error("The method implemented by this default is ambiguous",memberId.idRange));
-
-             // What's the type containing the abstract slot we're implementing? Used later on in MkMemberDataAndUniqueId. 
-             // This type must be in terms of the enclosing type's formal type parameters, hence the application of revRenaming 
-
-             let optInferredImplSlotTys = 
-                 match optIntfSlotTy with 
-                 | Some (x,_) -> [x]
-                 | None -> uniqueAbstractMethSigs |> List.map (fun x -> x.EnclosingType)
-
-             optInferredImplSlotTys,declaredTypars
-
-        | MemberKindPropertyGet 
-        | MemberKindPropertySet as k ->
-           let dispatchSlots = GetAbstractPropInfosForSynPropertyDecl(cenv.infoReader,ad,memberId,m,typToSearchForAbstractMembers,k,valSynData)
-
-           // Only consider those abstract slots where the get/set flags match the value we're defining 
-           let dispatchSlots = 
-               dispatchSlots 
-               |> List.filter (fun pinfo -> 
-                     (pinfo.HasGetter && k=MemberKindPropertyGet) ||
-                     (pinfo.HasSetter && k=MemberKindPropertySet))
-                                       
-           // Find the unique abstract slot if it exists 
-           let uniqueAbstractPropSigs = 
-               match dispatchSlots with 
-               | [] when not (CompileAsEvent cenv.g attribs) -> 
-                   errorR(Error("No abstract property was found that corresponds to this override",memberId.idRange)); 
-                   []
-               | [uniqueAbstractProp] -> [uniqueAbstractProp]
-               | _ -> 
-                   // We hit this case when it is ambiguous which abstract property is being implemented. 
-                   []
-
-           // If we determined a unique member then utilize the type information from the slotsig 
-           uniqueAbstractPropSigs |> List.iter (fun uniqueAbstractProp -> 
-
-               let kIsGet = (k = MemberKindPropertyGet)
-
-               if not (if kIsGet then uniqueAbstractProp.HasGetter else uniqueAbstractProp.HasSetter) then 
-                   error(Error("This property overrides or implements an abstract property but the abstract property doesn't have a corresponding "^(if kIsGet then "getter" else "setter"),memberId.idRange));
-
-               let uniqueAbstractMeth = if kIsGet then uniqueAbstractProp.GetterMethod else uniqueAbstractProp.SetterMethod
-
-               let uniqueAbstractMeth = InstMethInfo cenv.amap m renaming uniqueAbstractMeth
-
-               let typarsFromAbsSlotAreRigid,typarsFromAbsSlot,argTysFromAbsSlot, retTyFromAbsSlot = 
-                    FreshenAbstractSlot cenv.g cenv.amap m synTyparDecls uniqueAbstractMeth
-
-               if nonNil(typarsFromAbsSlot) then 
-                   errorR(InternalError("Unexpected generic property",memberId.idRange));
-
-               let absSlotTy = 
-                   if (memberFlags.MemberKind = MemberKindPropertyGet) 
-                   then mk_meth_ty cenv.g argTysFromAbsSlot retTyFromAbsSlot 
-                   else 
-                     match argTysFromAbsSlot with 
-                     | [argTysFromAbsSlot] -> mk_tupled_ty cenv.g argTysFromAbsSlot --> cenv.g.unit_ty
-                     | _ -> 
-                         error(Error("Invalid signature for set member",memberId.idRange)); 
-                         retTyFromAbsSlot --> cenv.g.unit_ty
-
-               unifyE cenv envinner m bindingTy absSlotTy);
-           
-
-           // Now detect 'default' members in the type being defined and mark them as implemented. 
-           // REVIEW: consider moving this to the all-implemented analysis at the end of the 
-           // type-checking scope, since we have inferred full signature types at that point. 
-           // HOWEVER: we need to know which members have default implementations in order to be 
-           // able to typecheck object expressions and sub-classes. Hence it MUST be here. 
-           begin 
-               let assertImplements(vref:ValRef) =
-                   let virtMember = the vref.MemberInfo
-                   if virtMember.IsImplemented then errorR(Error("This property already has a default implementation",memberId.idRange));
-                   virtMember.IsImplemented <- true
-               let relevant = 
-                   dispatchSlots 
-                   |> List.filter (fun virt -> tcref_eq cenv.g (tcref_of_stripped_typ cenv.g objTy) (tcref_of_stripped_typ cenv.g virt.EnclosingType))
-               match relevant  with 
-               | [] -> ()
-               | [FSProp(_,_,Some vref,_)] when k=MemberKindPropertyGet -> assertImplements(vref)
-               | [FSProp(_,_,_,Some vref)] when k=MemberKindPropertySet -> assertImplements(vref)
-               | _ ->  errorR(Error("The property implemented by this default is ambiguous",memberId.idRange));
-           end;
-           
-           (* What's the type containing the abstract slot we're implementing? Used later on in MkMemberDataAndUniqueId. *)
-           (* This type must be in terms of the enclosing type's formal type parameters, hence the application of revRenaming *)
-           
-           let optInferredImplSlotTys = 
-               match optIntfSlotTy with 
-               | Some (x,_) -> [ x ]
-               | None -> List.map PropInfo.EnclosingType uniqueAbstractPropSigs
-
-           optInferredImplSlotTys,declaredTypars
-
-        | _ -> 
-           match optIntfSlotTy with 
-           | Some (x,_) -> [x], declaredTypars 
-           | None -> [], declaredTypars
-
-    else
-       CheckForHiddenAbstractSlot (cenv,envinner,typToSearchForAbstractMembers,memberId,valSynData,memberFlags,m)
-
-       [], declaredTypars 
-
-and CheckForHiddenAbstractSlot (cenv,envinner,typToSearchForAbstractMembers,memberId,valSynData,memberFlags,m) =
-     let ad = AccessRightsOfEnv envinner
-     let denv = envinner.DisplayEnv
-     // Check for definition of an instance member that obscures an abstract member. 
-     // REVIEW: consider moving this to the all-implemented analysis at the end of the 
-     // type-checking scope, since we have inferred full signature types at that point. 
-     if memberFlags.MemberIsInstance then 
-         match memberFlags.MemberKind with 
-         | MemberKindMember -> 
-             let dispatchSlots,dispatchSlotsArityMatch = GetAbstractMethInfosForSynMethodDecl(cenv.infoReader,ad,memberId,m,typToSearchForAbstractMembers,valSynData)
-             match dispatchSlotsArityMatch with 
-             | uniqueAbstractMeth2 :: _ -> warning(Error(sprintf "This new member hides the abstract member '%s'. Rename the member or use 'override' instead" (string_of_minfo cenv.amap m denv uniqueAbstractMeth2),memberId.idRange))
-             | [] ->  ()
-         | MemberKindPropertyGet 
-         | MemberKindPropertySet as k ->
-             let dispatchSlots = GetAbstractPropInfosForSynPropertyDecl(cenv.infoReader,ad,memberId,m,typToSearchForAbstractMembers,k,valSynData)
-             let dispatchSlots = dispatchSlots |> List.filter (fun v -> if k = MemberKindPropertyGet then v.HasGetter else v.HasSetter)
-             match dispatchSlots with 
-             | uniqueAbstractProp :: _ -> 
-                 let uniqueAbstractMeth = (if k = MemberKindPropertyGet then uniqueAbstractProp.GetterMethod else uniqueAbstractProp.SetterMethod) 
-                 warning(Error(sprintf "This new member hides the abstract member '%s'. Rename the member or use 'override' instead" (string_of_minfo cenv.amap m denv uniqueAbstractMeth),memberId.idRange))
-             | [] -> ()
-
-         | _ -> ()
-         (* end of lack of "override" warning analysis *)
-
-and CheckForNonAbstractInterface declKind tcref memberFlags m =
-    if is_interface_tcref tcref then 
-        if memberFlags.MemberKind = MemberKindClassConstructor then 
-            error(Error("Interfaces may not contain definitions of static initializers",m))
-        elif memberFlags.MemberKind = MemberKindConstructor then 
-            error(Error("Interfaces may not contain definitions of object constructors",m))
-        elif memberFlags.MemberIsOverrideOrExplicitImpl or memberFlags.MemberIsVirtual then 
-            error(Error("Interfaces may not contain definitions of member overrides",m))
-        elif not (declKind=ExtrinsicExtensionBinding || memberFlags.MemberIsDispatchSlot ) then
-            error(Error("Interfaces may not contain definitions of concrete members. You may need to define a constructor on your type, or use implicit class construction, to indicate that the type is a concrete implementation class",m))
-
-
-//-------------------------------------------------------------------------
-// TcLetrec - AnalyzeAndMakeRecursiveValue(s)
-// 
-//------------------------------------------------------------------------
-
-and AnalyzeRecursiveStaticMemberOrValDecl (cenv,envinner:tcEnv,tpenv,declKind,newslotsOK,overridesOK,tcrefContainerInfo,vis1,id:ident,vis2,declaredTypars,memberFlagsOpt,thisIdOpt,bindingAttribs,valSynInfo,ty,bindingRhs,bindingRange,flex) =
-    let vis = CombineVisibilityAttribs vis1 vis2 bindingRange
-    // Check if we're defining a member, in which case generate the internal unique 
-    // name for the member and the information about which type it is agumenting 
-      
-    match tcrefContainerInfo,memberFlagsOpt with 
-    | (Some(tcref,optIntfSlotTy,baseValOpt,declaredTyconTypars),Some(memberFlags)) -> 
-        assert (isNone(optIntfSlotTy))
-      
-        CheckMemberFlags cenv.g None newslotsOK overridesOK memberFlags bindingRange;
-        CheckForNonAbstractInterface declKind tcref memberFlags id.idRange;
-              
-        if (deref_tycon tcref).IsExceptionDecl && 
-           (memberFlags.MemberKind = MemberKindConstructor) then 
-            error(Error("Constructors may not be specified in exception augmentations",id.idRange));                  
-
-        let isExtrinsic = (declKind = ExtrinsicExtensionBinding)
-        let _,enclosingDeclaredTypars,_,objTy,thisTy = FreshenObjectArgType cenv bindingRange recTyparsRigid tcref isExtrinsic declaredTyconTypars
-        let envinner = AddDeclaredTypars CheckForDuplicateTypars enclosingDeclaredTypars envinner
-        let envinner = MkInnerEnvForTyconRef cenv envinner tcref (declKind = ExtrinsicExtensionBinding)
-
-        (* dprintf "AnalyzeAndMakeRecursiveValue, : enclosingDeclaredTypars = %s, ty = %s\n" (Layout.showL  (TyparsL enclosingDeclaredTypars)) (Layout.showL  (typeL ty));   *)
-
-        let ctorThisVarRefCellOpt,baseValOpt = 
-            match memberFlags.MemberKind with 
-            | MemberKindConstructor  ->
-                // A fairly adhoc place to put this check 
-                if is_struct_tcref tcref && (match valSynInfo with ValSynInfo([[]],_) -> true | _ -> false) then
-                    errorR(Error("Structs may not have an object constructor with no arguments. This is a restriction imposed on all .NET languages as structs automatically support a default constructor",bindingRange));
-
-                if not tcref.IsFSharpObjectModelTycon then 
-                    errorR(Error("Constructors may not be defined for this type",id.idRange));
-
-                let ctorThisVarRefCellOpt = MakeAndPublishCtorThisRefCellVal cenv envinner thisIdOpt thisTy
-                  
-                // baseValOpt is the 'base' variable associated with the inherited portion of a class 
-                // It is declared once on the 'inheritedTys clause, but a fresh binding is made for 
-                // each member that may use it. 
-                let baseValOpt = 
-                    match SuperTypeOfType cenv.g cenv.amap bindingRange objTy with 
-                    | Some(superTy) -> MakeAndPublishBaseVal cenv envinner (Option.map id_of_val baseValOpt) superTy 
-                    | None -> None
-
-                let domainTy = new_inference_typ cenv ()
-
-                // This is the type we pretend a constructor has, because its implementation must ultimately appear to return a value of the given type 
-                // This is somewhat awkward later in codegen etc. 
-                unifyE cenv envinner bindingRange ty (domainTy --> objTy);
-
-                ctorThisVarRefCellOpt,baseValOpt
-                
-            | _ -> 
-                None,None
-          
-        let memberInfo,uniqueName = 
-            let isExtrinsic = (declKind = ExtrinsicExtensionBinding)
-            MkMemberDataAndUniqueId(cenv.g,tcref,isExtrinsic,bindingAttribs,[],memberFlags,valSynInfo,id)
-
-        envinner,tpenv,uniqueName,Some(memberInfo),vis,vis2,ctorThisVarRefCellOpt,enclosingDeclaredTypars,baseValOpt,flex,bindingRhs,declaredTypars
-        
-    // non-member bindings. How easy. 
-    | _ -> 
-        envinner,tpenv,id,None,vis,vis2,None,[],None,flex,bindingRhs,declaredTypars
-    
-
-and AnalyzeRecursiveInstanceMemberDecl (cenv,envinner:tcEnv,tpenv,declKind,synTyparDecls,valSynInfo,flex,newslotsOK,overridesOK,vis1,thisId,memberId:ident,bindingAttribs,vis2,tcrefContainerInfo,memberFlagsOpt,ty,bindingRhs,bindingRange) =
-    let vis = CombineVisibilityAttribs vis1 vis2 bindingRange
-    let denv = envinner.DisplayEnv
-    let (ExplicitTyparInfo(declaredTypars,infer)) = flex
-    match tcrefContainerInfo,memberFlagsOpt with 
-     // Normal instance members. 
-     | (Some(tcref,optIntfSlotTy,baseValOpt,declaredTyconTypars),Some(memberFlags)) -> 
-       
-         CheckMemberFlags cenv.g optIntfSlotTy newslotsOK overridesOK memberFlags bindingRange;
-       
-         // Syntactically push the "this" variable across to be a lambda on the right 
-         let bindingRhs = PushOnePatternToRhs true (mksyn_this_pat_var thisId) bindingRhs
-       
-         // The type being augmented tells us the type of 'this' 
-         let isExtrinsic = (declKind = ExtrinsicExtensionBinding)
-         let tcrefObjTy,enclosingDeclaredTypars,renaming,objTy,thisTy = FreshenObjectArgType cenv bindingRange recTyparsRigid tcref isExtrinsic declaredTyconTypars
-
-         let envinner = AddDeclaredTypars CheckForDuplicateTypars enclosingDeclaredTypars envinner
-
-         // If private, the member's accessibility is related to 'tcref' 
-         let envinner = MkInnerEnvForTyconRef cenv envinner tcref (declKind = ExtrinsicExtensionBinding)
-
-         let baseValOpt = if tcref.IsFSharpObjectModelTycon then baseValOpt else None
-
-         // Apply the known type of 'this' 
-         let bindingTy = new_inference_typ cenv ()
-         unifyE cenv envinner bindingRange ty (thisTy --> bindingTy);
-
-         CheckForNonAbstractInterface declKind tcref memberFlags memberId.idRange; 
-         
-         // Determine if a uniquely-identified-override List.exists based on the information 
-         // at the member signature. If so, we know the type of this member, and the full slotsig 
-         // it implements. Apply the inferred slotsig. 
-         let optInferredImplSlotTys, declaredTypars = 
-             ApplyAbstractSlotInference cenv denv envinner (bindingTy,bindingRange,synTyparDecls,declaredTypars,memberId,tcrefObjTy,renaming,objTy,optIntfSlotTy,valSynInfo,memberFlags,bindingAttribs)
-
-         // Update the ExplicitTyparInfo to reflect the declaredTypars inferred from the abstract slot 
-         let flex = ExplicitTyparInfo(declaredTypars,infer)
-
-         // baseValOpt is the 'base' variable associated with the inherited portion of a class 
-         // It is declared once on the 'inheritedTys clause, but a fresh binding is made for 
-         // each member that may use it. 
-         let baseValOpt = 
-             match SuperTypeOfType cenv.g cenv.amap bindingRange objTy with 
-             | Some(superTy) -> MakeAndPublishBaseVal cenv envinner (Option.map id_of_val baseValOpt) superTy 
-             | None -> None
-
-         let memberInfo,uniqueName = 
-             MkMemberDataAndUniqueId(cenv.g,tcref,isExtrinsic,bindingAttribs,optInferredImplSlotTys,memberFlags,valSynInfo,memberId)
-
-         envinner,tpenv,uniqueName,Some(memberInfo),vis,vis2,None,enclosingDeclaredTypars,baseValOpt,flex,bindingRhs,declaredTypars
-     | _ -> 
-         error(Error("recursive bindings that include member specifications can only occur as a direct augmentation of a type",bindingRange)) 
-
-and AnalyzeRecursiveDecl (cenv,envinner,tpenv,declKind,synTyparDecls,declaredTypars,thisIdOpt,valSynInfo,flex,newslotsOK,overridesOK,vis1,declPattern,bindingAttribs,tcrefContainerInfo,memberFlagsOpt,ty,bindingRhs,bindingRange) =
-    let rec AnalyzeRecursiveDeclPat p = 
-        match p with  
-        | Pat_typed(pat',cty,_) -> 
-            let cty',tpenv = TcTypeAndRecover cenv NewTyparsOK CheckCxs envinner tpenv cty
-            unifyE cenv envinner bindingRange ty cty';
-            AnalyzeRecursiveDeclPat pat' 
-        | Pat_attrib(pat',attribs,m) -> 
-            error(Error("Attributes are not allowed within patterns",m));
-            //AnalyzeRecursiveDeclPat pat' 
-
-        // This is for the construct
-        //    'let rec x = ... and do ... and y = ...' 
-        // DEPRECATED IN pars.mly 
-        | Pat_const (Const_unit, m) -> 
-             let id = ident ("doval",m)
-             AnalyzeRecursiveDeclPat (Pat_as (Pat_wild m, id,false,None,m))
-             
-        | Pat_as (Pat_wild _, id,_,vis2,m) -> 
-            AnalyzeRecursiveStaticMemberOrValDecl (cenv,envinner,tpenv,declKind,newslotsOK,overridesOK,tcrefContainerInfo,vis1,id,vis2,declaredTypars,memberFlagsOpt,thisIdOpt,bindingAttribs,valSynInfo,ty,bindingRhs,bindingRange,flex)
-            
-        | Pat_instance_member(thisId, memberId,vis2,m) -> 
-            AnalyzeRecursiveInstanceMemberDecl (cenv,envinner,tpenv,declKind,synTyparDecls,valSynInfo,flex,newslotsOK,overridesOK,vis1,thisId,memberId,bindingAttribs,vis2,tcrefContainerInfo,memberFlagsOpt,ty,bindingRhs,bindingRange)
-
-        | _ -> error(Error("only simple variable patterns can be bound in 'let rec' constructs",bindingRange))
-    AnalyzeRecursiveDeclPat declPattern
-
-
-/// This is a major routine that generates the Val for a recursive binding 
-/// prior to the analysis of the definition of the binding. This includes
-/// members of all flavours (including properties, implicit class constructors
-/// and overrides). At this point we perform override inference, to infer
-/// which method we are overriding, in order to add constraints to the
-/// implementation of the method.
-and AnalyzeAndMakeRecursiveValue overridesOK cenv (env:tcEnv) (tpenv,nameValueMap) (NormalizedRecBindingDefn(containerInfo,newslotsOK,declKind,binding)) =
-
-    // Pull apart the inputs
-    let (NormalizedBinding(vis1,bindingKind,isInline,isMutable,bindingSynAttribs,bindingXmlDoc,synTyparDecls,valSynData,declPattern,bindingRhs,bindingRange,spBind)) = binding
-    let (BindingRhs(_,_,bindingExpr)) = bindingRhs
-    let (ValSynData(memberFlagsOpt,valSynInfo,thisIdOpt)) = valSynData 
-    let (ContainerInfo(altActualParent,tcrefContainerInfo)) = containerInfo
-
-    // Check the attributes on the declaration
-    let bindingAttribs = TcAttributes cenv env attrTgtBinding bindingSynAttribs
-
-    // Allocate the type inference variable for the inferred type
-    let ty = new_inference_typ cenv () 
-        
-        
-    let inlineFlag = ComputeInlineFlag memberFlagsOpt isInline isMutable bindingAttribs
-    if isMutable then errorR(Error("only record fields and simple 'let' bindings may be marked mutable",bindingRange));
-
-
-    // Typecheck the typar decls, if any
-    let flex = TcBindingTyparDecls false cenv env bindingRange tpenv synTyparDecls
-    let (ExplicitTyparInfo(declaredTypars,infer)) = flex
-    let envinner = AddDeclaredTypars CheckForDuplicateTypars declaredTypars env
-    
-    (* dprintf "AnalyzeAndMakeRecursiveValue: declaredTypars = %s, ty = %s\n" (Layout.showL  (TyparsL declaredTypars)) (Layout.showL  (typeL ty));  *)
-    
-    // OK, analyze the declaration and return lots of information about it
-    let envinner,tpenv,uniqueName,memberInfoOpt,vis,vis2,ctorThisVarRefCellOpt,enclosingDeclaredTypars,baseValOpt,flex,bindingRhs,declaredTypars = 
-        AnalyzeRecursiveDecl (cenv,envinner,tpenv,declKind,synTyparDecls,declaredTypars,thisIdOpt,valSynInfo,flex,newslotsOK,overridesOK,vis1,declPattern,bindingAttribs,tcrefContainerInfo,memberFlagsOpt,ty,bindingRhs,bindingRange)
-
-    let optArgsOK = isSome(memberFlagsOpt)
-
-    // Assert the types given in the argument patterns
-    (* dprintf "ApplyTypesFromArgumentPatterns cenv envinner (2, before): ty = %s\n" (Layout.showL  (typeL ty));  *)
-    ApplyTypesFromArgumentPatterns(cenv,envinner,optArgsOK,ty,bindingRange,tpenv,bindingRhs,memberFlagsOpt);
-
-    (* dprintf "ApplyTypesFromArgumentPatterns (%s): ty = %s, isComplete = %b\n" memberId.idText (Layout.showL  (typeL ty)) isComplete;  *) 
-
-    // Do the type annotations give the full and complete generic type? 
-    // If so, generic recursion can be used when using this type. 
-    let isComplete =  ComputeIsComplete enclosingDeclaredTypars declaredTypars ty
-    
-    // NOTE: The type scheme here is normally not 'complete'!!!! The type is more or less just a type variable at this point. 
-    // NOTE: toparity, type and typars get fixed-up after inference 
-    let prelimTyscheme = TypeScheme(enclosingDeclaredTypars@declaredTypars,[],ty)
-    let partialTopValInfo = TranslateTopValSynInfo bindingRange (TcAttributes cenv envinner) valSynInfo
-    let topValInfo = UseSyntacticArity declKind prelimTyscheme partialTopValInfo
-    let prelimValScheme = ValScheme(uniqueName,prelimTyscheme,topValInfo,memberInfoOpt,false,inlineFlag,NormalVal,vis,false,false,false)
-
-    // Check the literal r.h.s., if any
-    let _, konst = TcLiteral cenv ty env tpenv (bindingAttribs,bindingExpr)
-
-    // Create the value 
-    let vspec = MakeAndPublishVal cenv envinner (altActualParent,false,declKind,ValInRecScope(isComplete),prelimValScheme,bindingAttribs,bindingXmlDoc ,konst)
-
-    let extraBindings,(tpenv,nameValueMap) = 
-       let extraBindings = 
-          [ for extraBinding in EventDeclarationNormalization.GenerateExtraBindings(cenv.g,bindingAttribs,binding) do
-               yield (NormalizedRecBindingDefn(containerInfo,newslotsOK,declKind,extraBinding)) ]
-       List.collectFold (AnalyzeAndMakeRecursiveValue overridesOK cenv env) (tpenv,nameValueMap) extraBindings
-
-    // Reconstitute the binding with the unique name
-    let revisedBinding = NormalizedBinding (vis1,bindingKind,isInline,isMutable,bindingSynAttribs,bindingXmlDoc,synTyparDecls,valSynData,mksyn_pat_var vis2 uniqueName,bindingRhs,bindingRange,spBind)
-
-    // Create the RBInfo to use in later phases
-    let rbinfo = RBInfo(containerInfo,enclosingDeclaredTypars,inlineFlag,vspec,flex,partialTopValInfo,memberInfoOpt,baseValOpt,ctorThisVarRefCellOpt,vis,ty,declKind)
-
-    // Done - add the declared name to the List.map and return the bundle for use by TcLetrec 
-    let nameValueMap = Map.add uniqueName.idText (vspec,prelimTyscheme) nameValueMap
-    let primaryBinding = (rbinfo,revisedBinding)
-    (primaryBinding::extraBindings),(tpenv,nameValueMap)
-    // REVIEW: no more constraints allowed on declared typars 
-    // REVIEW: this is related to changing recTyparsRigid to 'true' 
-    // allDeclaredTypars |> List.iter SetTyparRigid; 
-
-
-and AnalyzeAndMakeRecursiveValues  overridesOK cenv env tpenv binds = 
-    List.collectFold (AnalyzeAndMakeRecursiveValue  overridesOK cenv env) (tpenv,Map.empty) binds
-
-
-//-------------------------------------------------------------------------
-// TcLetrecBinding
-//-------------------------------------------------------------------------
-
-and TcLetrecBinding cenv env scopem prelimRecValues tpenv (rbinfo,bind:NormalizedBinding) = 
-    let (RBInfo(_,enclosingDeclaredTypars,_,v,flex,_,_,baseValOpt,ctorThisVarRefCellOpt,_,tau,declKind)) = rbinfo
-    let (ExplicitTyparInfo(declaredTypars,_)) = flex
-    let allDeclaredTypars = enclosingDeclaredTypars @ declaredTypars
-
-    // dprintf "TcLetrec (before): tau = %s\n" (Layout.showL  (typeL tau));  
-
-    // Notes on FSharp 1.0, 3187:
-    //    - Progressively collect the "eligible for early generalization" set of bindings
-    //    - After checking each binding, check this set to find generalizable bindings
-    //    - The only reason we can't generalize is if a binding refers to type variables to which 
-    //      additional constraints may be applied as part of checking a later binding
-    //    - Compute the set by iteratively knocking out bindings that refer to type variables free in later bindings
-    //    - Implementation notes:
-    //         - Generalize by remap/substitution
-    //         - Pass in "free in later bindings" by passing in the set of inference variables for the bindings, i.e. the binding types
-    //         - For classes the bindings will include all members in a recursive group of types
-    //
-    
-    //  Example 1: 
-    //    let f() = g()   f : unit -> ?b
-    //    and g() = 1     f : unit -> int, can generalize (though now monomorphic)
-
-    //  Example 2: 
-    //    let f() = g()   f : unit -> ?b
-    //    and g() = []    f : unit -> ?c list, can generalize
-    
-    //  Example 3: 
-    //    let f() = []   f : unit -> ?b, can generalize immediately
-    //    and g() = []
-    let envrec = AddLocalValMap scopem prelimRecValues env 
-    let envrec = Option.fold_right (AddLocalVal scopem) baseValOpt envrec
-    let envrec = Option.fold_right (AddLocalVal scopem) ctorThisVarRefCellOpt envrec
-
-    // Members can access protected members of parents of the type, and private members in the type 
-    let envrec = MakeInnerEnvForMember cenv envrec v
-
-    let tbinding',tpenv = 
-        TcNormalizedBinding declKind cenv envrec tpenv tau (Option.map mk_local_vref ctorThisVarRefCellOpt) (enclosingDeclaredTypars,flex) bind
-        
-    // dprintf "TcLetrec (%s, after): tau = %s\n" v.MangledName (Layout.showL  (typeL tau));    
-    (try unifyE cenv env v.Range (allDeclaredTypars +-> tau) v.Type with e -> error (Recursion(env.DisplayEnv,v.Id,tau,v.Type,v.Range)));
-
-    // dprintf "TcLetrec (%s, after unify): type_of_val v = %s\n" v.MangledName (Layout.showL  (typeL v.Type));  
-    
-    (rbinfo,tbinding'),tpenv
-
-//-------------------------------------------------------------------------
-// TcLetrecComputeGeneralizedTyparsForBinding
-//-------------------------------------------------------------------------
-
-/// Compute the type variables which may be generalized 
-and TcLetrecComputeGeneralizedTyparsForBinding cenv env freeInEnv (rbinfo,tbinding) =
-    let (RBInfo(containerInfo,enclosingDeclaredTypars,_,vspec,flex,_,memberInfoOpt,_,_,_,_,declKind)) = rbinfo
-    let m = vspec.Range
-    let (TBindingInfo(inlineFlag,immut,_,_,_,_,_,expr,_,_,m,_,_,_)) = tbinding
-    let (ExplicitTyparInfo(declaredTypars,canInferTypars)) = flex
-    let allDeclaredTypars = enclosingDeclaredTypars @ declaredTypars
-
-    let memFlagsOpt = vspec.MemberInfo |> Option.map (fun memInfo -> memInfo.MemberFlags)
-    let isCtor = (match memFlagsOpt with None -> false | Some memberFlags -> memberFlags.MemberKind = MemberKindConstructor)
-
-    let canInferTypars = GeneralizationHelpers.ComputeCanInferTypars(declKind,containerInfo.ParentRef,canInferTypars,memFlagsOpt,declaredTypars,m)
-
-    let tau = vspec.TauType
-    let maxInferredTypars = (free_in_type_lr cenv.g false tau)
-     
-    GeneralizationHelpers.ComputeGeneralizedTypars (cenv,env,m,immut,freeInEnv,canInferTypars,GeneralizationHelpers.CanGeneralizeConstrainedTyparsForDecl(declKind),inlineFlag, Some(expr), allDeclaredTypars, maxInferredTypars,tau,isCtor)
-
-/// Compute the type variables which may have member constraints that need to be canonicalized prior to generalization 
-and TcLetrecComputeSupportForBinding cenv (rbinfo,tbinding) =
-    let (RBInfo(_,enclosingDeclaredTypars,_,vspec,flex,_,_,_,_,_,_,_)) = rbinfo
-    let (ExplicitTyparInfo(declaredTypars,canInferTypars)) = flex
-    let allDeclaredTypars = enclosingDeclaredTypars @ declaredTypars
-    let maxInferredTypars = free_in_type_lr cenv.g false vspec.TauType
-    allDeclaredTypars @ maxInferredTypars
-
-//-------------------------------------------------------------------------
-// TcLetrecGeneralizeBinding
-//------------------------------------------------------------------------
-
-and TcLetrecGeneralizeBinding cenv denv generalizedTyparsForRecursiveBlock freeInEnv generalizedTypars (rbinfo,tbind) =
-
-    // Generalise generalizedTypars from tbinding.
-    // Any tp in generalizedTyparsForRecursiveBlock \ generalizedTypars has free choice, see comment in GeneralizeVal 
-    let (RBInfo(_,enclosingDeclaredTypars,_,vspec,flex,partialTopValInfo,memberInfoOpt,_,_,vis,_,declKind)) = rbinfo
-    let (TBindingInfo(inlineFlag,immut,attrs,_,_,_,_,expr,argAttribs,_,m,spBind,compgen,_)) = tbind
-     
-    let tps,tau = vspec.TypeScheme
-
-    let pvalscheme1 = PrelimValScheme1(vspec.Id,flex,tau,Some(partialTopValInfo),memberInfoOpt,false,inlineFlag,NormalVal,argAttribs,vis,compgen)
-    let pvalscheme2 = GeneralizeVal cenv denv enclosingDeclaredTypars generalizedTyparsForRecursiveBlock generalizedTypars pvalscheme1
-
-    (*dprintf "TcLetrec (%s, before adjust): tau = %s, #generalizedTyparsForThisBinding = %d\n" vspec.MangledName (Layout.showL  (typeL tau)) (List.length generalizedTyparsForThisBinding); *)
-    let valscheme = UseCombinedArity cenv.g declKind expr pvalscheme2 
-    AdjustRecType cenv vspec valscheme;
-
-    (*dprintf "TcLetrec (%s, after adjust): ty = %s\n" vspec.MangledName (Layout.showL  (typeL vspec.Type));  *)
-    valscheme,TBind(vspec,expr,spBind)  (* NOTE: (vspec,'e) could be a TBind(vspec,'e) : Tast.Binding *)
-
-
-and TcLetrecComputeCtorThisVarRefCellBinding cenv ctorThisVarRefCellOpt =
-    ctorThisVarRefCellOpt |> Option.map (fun (v:Val) -> 
-        let m = v.Range
-        let ty = dest_refcell_ty cenv.g v.Type
-        mk_compgen_bind v (mk_refcell cenv.g m ty (mk_null m ty)))
-
-and TcLetrecBindCtorThisVarRefCell cenv (x,TBind(vspec,expr,spBind)) rbinfo = 
-    let (RBInfo(_,_,_,_,_,_,_,baseValOpt,ctorThisVarRefCellOpt,_,_,_)) = rbinfo
-    let expr = 
-        match TcLetrecComputeCtorThisVarRefCellBinding cenv ctorThisVarRefCellOpt with 
-        | None -> expr
-        | Some bind -> 
-            let m = range_of_expr expr
-            let tps,vsl,body,returnTy = dest_top_lambda (expr,vspec.Type)
-            mk_multi_lambdas m tps vsl (mk_let_bind m bind body, returnTy)
-    let expr = 
-        match baseValOpt with 
-        | None -> expr
-        | _ -> 
-            let m = range_of_expr expr
-            let tps,vsl,body,returnTy = dest_top_lambda (expr,vspec.Type)
-            mk_basev_multi_lambdas m tps baseValOpt vsl (body, returnTy)
-              
-    x,TBind(vspec,expr,spBind)
-
-and FixupLetrecBind cenv denv (valscheme,(TBind(vspec,expr,spBind))) =
-
-    // Check coherence of generalization of variables for memberInfo members in generic classes 
-    match vspec.MemberInfo with 
-    | Some(memberInfo) -> 
-       match PartitionValTypars cenv.g vspec with
-       | Some(parentTypars,memberParentTypars,_,_,tinst) -> 
-          ignore(SignatureConformance.CheckTypars cenv.g denv vspec.Range tyeq_env_empty memberParentTypars parentTypars)
-       | None -> 
-          errorR(Error("this member is not sufficiently generic",vspec.Range))
-    | None -> ()
-
-    // Fixup recursive references... 
-    let (ValScheme(_,typeScheme,_,_,_,_,_,_,_,_,_)) = valscheme
-    let fixupPoints = GetAllUsesOfRecValue cenv vspec
-
-    AdjustAndForgetUsesOfRecValue cenv (mk_local_vref vspec) valscheme;
-
-    // dprintf "TcLetrec (%s, after gen): #fixupPoints = %d, ty = %s\n" vspec.MangledName (List.length fixupPoints) (Layout.showL  (typeL vspec.Type)); 
-
-    let expr = mk_poly_bind_rhs vspec.Range typeScheme expr
-
-    fixupPoints,TBind(vspec,expr,spBind)
-    
-//-------------------------------------------------------------------------
-// TcLetrec
-//------------------------------------------------------------------------
-
-and unionGeneralizedTypars typarSets = List.foldBack (ListSet.unionFavourRight typar_ref_eq) typarSets [] 
-    
-
-and TcLetrec  overridesOK cenv env tpenv (binds,bindsm,scopem) =
-
-    // create prelimRecValues for the recursive items (includes type info from LHS of bindings) *)
-    let binds = binds |> List.map (fun (RecBindingDefn(a,b,c,bind)) -> NormalizedRecBindingDefn(a,b,c,BindingNormalization.NormalizeBinding ValOrMemberBinding cenv env bind))
-    let rbinfosAndBinds,(tpenv,nameToPrelimValueMap) = AnalyzeAndMakeRecursiveValues  overridesOK cenv env tpenv binds
-    let prelimRecValues  = NameMap.map fst nameToPrelimValueMap
-
-    // typecheck bindings 
-    let bindingInfos,tpenv = 
-        List.mapfold (TcLetrecBinding cenv env scopem prelimRecValues) tpenv rbinfosAndBinds
-
-    // Decide which type parameters to generalize per binding 
-    let denv = env.DisplayEnv
-    
-    let supportForBindings = bindingInfos |> List.collect (TcLetrecComputeSupportForBinding cenv)
-    GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv,denv,bindsm) supportForBindings; 
-     
-
-    let freeInEnv = GeneralizationHelpers.ComputeUngeneralizableTypars env
-    let generalizedTyparsL = List.map (TcLetrecComputeGeneralizedTyparsForBinding cenv env freeInEnv) bindingInfos
-    let generalizedTyparsForRecursiveBlock = unionGeneralizedTypars generalizedTyparsL
-
-    if verboseCC then List.iter (fun tp -> printf "TcLetrec: generalizedTyparsForRecursiveBlock = %s\n" (TyparL tp |> Layout.showL)) generalizedTyparsForRecursiveBlock;
-    
-    // Generalize the bindings. This gives valscheme and projects (vspec,x) 
-    let vxbinds = List.map2 (TcLetrecGeneralizeBinding cenv env.DisplayEnv generalizedTyparsForRecursiveBlock freeInEnv) generalizedTyparsL bindingInfos
-    let tpenv = HideUnscopedTypars (List.concat generalizedTyparsL) tpenv
-
-    let vxbinds = List.map2 (TcLetrecBindCtorThisVarRefCell cenv) vxbinds (List.map fst bindingInfos)
-
-    // Now that we know what we've generalized we can adjust the recursive references 
-    let vxbinds = vxbinds |> List.map (FixupLetrecBind cenv env.DisplayEnv) 
-    
-    // Now eliminate any initialization graphs 
-    let binds = 
-        let bindsWithoutLaziness = vxbinds
-        let mustHaveArity = 
-            match rbinfosAndBinds with 
-            | [] -> false
-            | ((rbinfo,_) :: _) -> 
-                let (RBInfo(_,_,_,_,_,_,_,_,_,_,_,declKind)) = rbinfo
-                DeclKind.MustHaveArity declKind
-            
-        EliminateInitializationGraphs cenv.g mustHaveArity env.DisplayEnv bindsWithoutLaziness bindsm
-    
-    // Post letrec env 
-    let envbody = AddLocalValMap scopem prelimRecValues env 
-    binds,envbody,tpenv
-
-//-------------------------------------------------------------------------
-// Bind specifications of values
-//------------------------------------------------------------------------- 
-
-let TcAndPublishValSpec (cenv,env,containerInfo,declKind,memFlagsOpt,tpenv,valSpfn) = 
-  let ((ValSpfn(attrs,id,SynValTyparDecls(_,canInferTypars,_), _, _, pseudo, mutableFlag,doc, vis,literalExprOpt,m))) = valSpfn 
-  let attrs' = TcAttributes cenv env attrTgtBinding attrs
-  let valinfos,tpenv = TcValSpec cenv env declKind containerInfo memFlagsOpt None tpenv valSpfn attrs'
-  let denv = env.DisplayEnv
-  
-  List.mapfold 
-      (fun tpenv (ValSpecResult(altActualParent,memberInfoOpt,id:ident,enclosingDeclaredTypars,declaredTypars,ty,partialTopValInfo,declKind)) -> 
-          let inlineFlag = ComputeInlineFlag (memberInfoOpt |> Option.map (fun memberInfo -> memberInfo.MemberFlags)) pseudo mutableFlag attrs'
-          
-          let freeInType = free_in_type_lr cenv.g false ty
-
-          let allDeclaredTypars = enclosingDeclaredTypars @ declaredTypars
-
-          let flex = ExplicitTyparInfo(declaredTypars,canInferTypars)
-          
-          let canInferTypars = GeneralizationHelpers.ComputeCanInferTypars(declKind,containerInfo.ParentRef,canInferTypars,memFlagsOpt,declaredTypars,m)
-          
-          let generalizedTypars = GeneralizationHelpers.ComputeGeneralizedTypars(cenv,env,id.idRange,canInferTypars,empty_free_loctypars,canInferTypars,CanGeneralizeConstrainedTypars,inlineFlag,None,allDeclaredTypars,freeInType,ty,false)
-          
-          let valscheme1 = PrelimValScheme1(id,flex,ty,Some(partialTopValInfo),memberInfoOpt,mutableFlag,inlineFlag,NormalVal,noArgOrRetAttribs,vis,false)
-
-          let valscheme2 = GeneralizeVal cenv denv enclosingDeclaredTypars  [] generalizedTypars valscheme1
-
-          let tpenv = HideUnscopedTypars generalizedTypars tpenv
-
-          let valscheme = BuildValScheme declKind (Some(partialTopValInfo)) valscheme2 
-
-          let konst = 
-              match literalExprOpt with 
-              | None -> 
-                  let hasLiteralAttr = HasAttrib cenv.g cenv.g.attrib_LiteralAttribute attrs'
-                  if hasLiteralAttr then 
-                      errorR(Error("A declaration may only be the [] attribute if a constant value is also given, e.g. 'val x : int = 1'",m));
-                  None
-
-              
-              | Some(e) -> 
-                  let hasLiteralAttr,konst = TcLiteral cenv ty env tpenv (attrs',e)
-                  if not hasLiteralAttr then 
-                      errorR(Error("A declaration may only be given a value in a signature if the declaration has the [] attribute",range_of_synexpr e));
-                  konst
-
-          let vspec = MakeAndPublishVal cenv env (altActualParent,true,declKind,ValNotInRecScope,valscheme,attrs',doc.ToXmlDoc(),konst)
-          assert(vspec.InlineInfo = inlineFlag);
-
-          vspec,tpenv)
-      tpenv
-      valinfos
-
-
-//-------------------------------------------------------------------------
-// Bind elements of data definitions for exceptions and types (fields, etc.)
-//------------------------------------------------------------------------- 
-
-let CombineReprAccess parent vis = 
-    match parent with 
-    | ParentNone -> vis 
-    | Parent tcref -> combineAccess vis tcref.TypeReprAccessibility
-
-let MakeRecdFieldSpec cenv env parent (stat,konst,ty',attrsForProperty,attrsForField,id,mut,xmldoc,vis,m) =
-    let vis,_ = ComputeAccessAndCompPath env None m vis parent
-    let vis = CombineReprAccess parent vis
-    NewRecdField stat konst id ty' mut attrsForProperty attrsForField xmldoc vis false
-
-let TcFieldDecl cenv env parent  isIncrClass tpenv (stat,attrs,id,ty,mut,xmldoc,vis,m) =
-    let attrs' = TcAttributesWithPossibleTargets cenv env attrTgtFieldDecl attrs
-    let attrsForProperty,attrsForField = attrs' |> List.partition (fun (attrTargets,_) -> (attrTargets &&& attrTgtProperty) <> 0) 
-    let attrsForProperty = (List.map snd attrsForProperty) 
-    let attrsForField = (List.map snd attrsForField)
-    let ty',_ = TcTypeAndRecover cenv NoNewTypars CheckCxs env tpenv ty
-    let zeroInit = HasAttrib cenv.g cenv.g.attrib_DefaultValueAttribute attrsForField
-    
-    let isThreadStatic = isThreadOrContextStatic cenv.g attrsForField
-    if isThreadStatic && (not zeroInit || not stat) then 
-        error(Error("Thread-static and context-static variables must be static and given the [] attribute to indicate that the value is initialized to the default value on each new thread",m));
-
-    if isIncrClass && (not zeroInit || not mut) then errorR(Error("Unintialized 'val' fields in implicit construction types must be mutable and marked with the '[]' attribute. Consider using a 'let' binding instead of a 'val' field",m));
-    if stat && (not zeroInit || not mut) then errorR(Error("Static 'val' fields in types must be mutable and marked with the '[]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'let' binding in a module",m));
-    let konst = if zeroInit then Some(TConst_zero) else None
-    MakeRecdFieldSpec cenv env parent  (stat,konst,ty',attrsForProperty,attrsForField,id,mut,xmldoc,vis,m)
-
-let TcAnonFieldDecl cenv env parent tpenv nm (Field(attribs,stat,id,ty,mut,xmldoc,vis,m)) =
-    let id = (match id with None -> mksyn_id m nm | Some id -> id)
-    TcFieldDecl cenv env parent false tpenv (stat,attribs,id,ty,mut,xmldoc.ToXmlDoc(),vis,m) 
-
-let TcNamedFieldDecl cenv env parent isIncrClass tpenv (Field(attribs,stat,id,ty,mut,xmldoc,vis,m)) =
-    match id with 
-    | None -> error (Error("this field requires a name",m))
-    | Some(id) -> TcFieldDecl cenv env parent isIncrClass  tpenv (stat,attribs,id,ty,mut,xmldoc.ToXmlDoc(),vis,m) 
-
-let CheckDuplicates (idf : _ -> ident) k elems = 
-    elems |> List.iteri (fun i uc1 -> 
-        elems |> List.iteri (fun j uc2 -> 
-            let id1 = (idf uc1)
-            let id2 = (idf uc2)
-            if j > i &&  id1.idText = id2.idText then 
-                errorR (Duplicate(k,id1.idText,id1.idRange))));
-    elems
-
-let TcNamedFieldDecls cenv env parent isIncrClass tpenv fields =
-    fields |> List.map (TcNamedFieldDecl cenv env parent isIncrClass tpenv) |> CheckDuplicates (fun f -> f.Id) "field" 
-
-
-//-------------------------------------------------------------------------
-// Bind other elements of type definitions (constructors etc.)
-//------------------------------------------------------------------------- 
-
-exception NotUpperCaseConstructor of range
-
-let CheckNamespaceModuleOrTypeName (id:ident) = 
-    if id.idText.Contains "." then errorR(Error("Invalid namespace, module, type or union case name",id.idRange))
-
-
-let CheckUnionCaseName realUnionCaseName m =
-    CheckNamespaceModuleOrTypeName (mksyn_id m realUnionCaseName);
-    if not (String.isUpper realUnionCaseName) && realUnionCaseName <> opname_Cons && realUnionCaseName <> opname_Nil then 
-        errorR(NotUpperCaseConstructor(m));
-
-let TcUnionCaseDecl cenv env parent thisTy tpenv (UnionCase (attrs,id,args,xmldoc,vis,m)) =
-    let attrs' = TcAttributes cenv env attrTgtUnionCaseDecl attrs // the attributes of a union case decl get attached to the generated "static factory" method
-    let vis,cpath = ComputeAccessAndCompPath env None m vis parent
-    let vis = CombineReprAccess parent vis
-    let realUnionCaseName =  
-        if id.idText = opname_Cons then "Cons" 
-        elif id.idText = opname_Nil then "Empty"
-        else id.idText
-    
-    CheckUnionCaseName realUnionCaseName id.idRange;
-    let mkName i = (realUnionCaseName^string (i+1))
-    let rfields,recordTy = 
-        match args with
-        | UnionCaseFields flds -> 
-            let rfields = flds |> List.mapi (fun i fld -> TcAnonFieldDecl cenv env parent tpenv (mkName i) fld) 
-            rfields,thisTy
-        | UnionCaseFullType (ty,arity) -> 
-            let ty',tpenv = TcTypeAndRecover cenv NoNewTypars CheckCxs env tpenv ty
-            let argtysl,recordTy = GetTopTauTypeInFSharpForm cenv.g (arity |> TranslateTopValSynInfo m (TcAttributes cenv env) |> TranslatePartialArity []).ArgInfos ty' m
-            if argtysl.Length > 1 then 
-                errorR(Error("Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy'",m));   
-            let rfields = 
-                argtysl |> List.concat |> List.mapi (fun i (argty,TopArgInfo(_,nmOpt)) ->
-                    let id = (match nmOpt with Some id -> id | None -> mksyn_id m (mkName i))
-                    MakeRecdFieldSpec cenv env parent (false,None,argty,[],[],id,false,emptyXmlDoc,None,m))
-            if not (type_equiv cenv.g recordTy thisTy) then 
-                error(Error("Return types of union cases must be identical to the type being defined, up to abbreviations",m))
-            rfields,recordTy
-    NewUnionCase id realUnionCaseName rfields recordTy attrs' (xmldoc.ToXmlDoc()) vis
-
-let TcUnionCaseDecls cenv env parent thisTy tpenv unionCases =
-    let unionCases' = unionCases |> List.map (TcUnionCaseDecl cenv env parent thisTy tpenv) 
-    unionCases' |> CheckDuplicates (fun uc -> uc.Id) "union case" 
-
-let TcEnumDecl cenv env parent thisTy fieldTy (EnumCase (attrs,id,v,xmldoc,m)) =
-    let attrs' = TcAttributes cenv env attrTgtField attrs
-    match v with 
-    | Const_bytearray _
-    | Const_uint16array _
-    | Const_bignum _ -> error(Error("This is not a valid value for an enumeration literal",m))
-    | _ -> 
-        let v = TcConst cenv fieldTy m env v
-        let vis,cpath = ComputeAccessAndCompPath env None m None parent
-        let vis = CombineReprAccess parent vis
-        if id.idText = "value__" then errorR(Error("This is not a valid name for an enumeration case",id.idRange));
-        NewRecdField true (Some v) id thisTy false [] attrs' emptyXmlDoc vis false
-  
-let TcEnumDecls cenv env parent thisTy enumCases =
-    let fieldTy = new_inference_typ cenv ()
-    let enumCases' = enumCases |> List.map (TcEnumDecl cenv env parent thisTy fieldTy)  |> CheckDuplicates (fun f -> f.Id) "enum element"
-    fieldTy,enumCases'
-
-
-//-------------------------------------------------------------------------
-// Bind elements of classes
-//------------------------------------------------------------------------- 
-
-let PublishInterface cenv denv (tcref:TyconRef) m compgen ty' = 
-    if not (is_interface_typ cenv.g ty') then errorR(Error(sprintf "The type '%s' is not an interface type" (NicePrint.pretty_string_of_typ denv ty'),m));
-    let tcaug = tcref.TypeContents
-    if tcaug_has_interface cenv.g tcaug ty'  then 
-        errorR(Error("duplicate specification of an interface",m));
-    tcaug.tcaug_implements <- (ty',compgen,m) :: tcaug.tcaug_implements
-
-let TcAndPublishMemberSpec newslotsOK cenv env containerInfo declKind tcref tpenv memb = 
-    match memb with 
-    | ClassMemberSpfn_field(fdecl,m) -> error(Error("A field/val declaration is not permitted here",m))
-    | ClassMemberSpfn_inherit(typ,m) -> error(Error("A inheritance declaration is not permitted here",m))
-    | ClassMemberSpfn_tycon(_,m) -> error(Error("Types may not contain nested type definitions",m))
-    | ClassMemberSpfn_binding(valSpfn,memberFlags,m) -> 
-        TcAndPublishValSpec (cenv,env,containerInfo,declKind,Some(memberFlags),tpenv,valSpfn)
-    | ClassMemberSpfn_interface(ty,m) -> 
-        // These are done in TcTyconDefnCores
-        [],tpenv
-
-  
-let TcTyconMemberSpecs newslotsOK cenv env containerInfo declKind tcref tpenv (augSpfn: SynClassSpfn)  =
-    let members,tpenv = List.mapfold (TcAndPublishMemberSpec newslotsOK cenv env containerInfo declKind tcref) tpenv augSpfn
-    List.concat members,tpenv
-
-
-//-------------------------------------------------------------------------
-// Bind 'open' declarations
-//------------------------------------------------------------------------- 
-
-let TcModuleOrNamespaceLidAndPermitAutoResolve env lid =
-    let ad = AccessRightsOfEnv env
-    match ResolveLongIndentAsModuleOrNamespace OpenQualified env.eNameResEnv ad lid  with 
-    | Result res -> Result res
-    | Exception err ->  raze err
-
-let TcOpenDecl g amap m scopem env (lid : ident list)  = 
-    let modrefs = ForceRaise (TcModuleOrNamespaceLidAndPermitAutoResolve env lid)
-
-    let IsPartiallyQualifiedNamespace (modref: ModuleOrNamespaceRef) = 
-        let (CompPath(_,p)) = modref.CompilationPath 
-        // Bug FSharp 1.0 3274: FSI paths don't count when determining this warning
-        let p = 
-            match p with 
-            | [] -> []
-            | (h,_):: t -> if h.StartsWith(DynamicModulePrefix,System.StringComparison.Ordinal) then t else p
-        modref.IsNamespace && p.Length >= lid.Length 
-
-    modrefs |> List.iter (fun (_,modref,_) ->
-       if modref.IsModule && HasAttrib g g.attrib_RequireQualifiedAccessAttribute modref.Attribs then 
-           warning(Error(sprintf "This declaration opens the module '%s', which is marked as 'RequireQualifiedAccess'. In a future version of F#, it will be an error to open this module. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries" (full_display_text_of_modref modref),m)))
-
-    // Bug FSharp 1.0 3133: 'open Lexing'. Skip this warning if we successfully resolved to at least a module name
-    if not (modrefs |> List.exists (fun (_,modref,_) -> modref.IsModule && not (HasAttrib g g.attrib_RequireQualifiedAccessAttribute modref.Attribs))) then
-        modrefs |> List.iter (fun (_,modref,_) ->
-            if IsPartiallyQualifiedNamespace modref  then 
-                 warning(Error(sprintf "This declaration opens the namespace or module '%s' through a partially qualified path. Please adjust this code to use the full path of the namespace. A future version of F# will require this. This change will make your code more robust as new constructs are added to the F# and .NET libraries" (full_display_text_of_modref modref),m)))
-        
-    modrefs |> List.iter (fun (_,modref,_) -> CheckEntityAttributes g modref m |> CommitOperationResult);        
-
-    let env = open_moduls g amap scopem env modrefs 
-    env    
-
-
-exception ParameterlessStructCtor of range
-
-/// Incremental class definitions
-module IncrClassChecking = 
-
-    type IncrClassBindingGroup = 
-      | IncrClassBindingGroup of Tast.Binding list * (*isStatic:*) bool* (*recursive:*) bool
-      | IncrClassDo of Tast.expr * (*isStatic:*) bool
-
-    /// Typechecked info for implicit constructor and it's arguments 
-    type IncrClassCtorLhs = 
-        {incrClassTcref                            : TyconRef;
-         incrClassInstanceCtorDeclaredTypars       : typars;     
-         incrClassRevTypeInst                      : TyparInst;
-         // Lazy to ensure the static ctor value is ony published if needed
-         incrClassStaticCtorValInfo                : Lazy<(Val list * Val * ValScheme)>;
-         incrClassInstanceCtorVal                  : Val;
-         incrClassInstanceCtorValScheme            : ValScheme;
-         incrClassInstanceCtorArgs                 : Val list;
-         incrClassInstanceCtorThisVarRefCellOpt    : Val option;
-         incrClassInstanceCtorBaseValOpt           : Val option;
-         incrClassInstanceCtorThisVar              : Val;
-         incrClassNameGenerator : NiceNameGenerator;
-        }
-
-    let TcSimplePatsOfUnknownType cenv optArgsOK env tpenv spats =
-        let argty = new_inference_typ cenv ()
-        TcSimplePats cenv optArgsOK argty env (tpenv,NameMap.empty,Set.empty) spats
-
-    /// Check and elaborate the "left hand side" of the implicit class construction 
-    /// syntax.
-    let TcImplictCtorLhsPassA(cenv,env,tpenv,tcref:TyconRef,vis,attrs,spats,thisIdOpt,baseValOpt,m) =
-
-        // Make fresh version of the class type for type checking the members and lets *
-        let isExtrinsic = false
-        let tcrefObjTy,ctorDeclaredTypars,renaming,objTy,thisTy = FreshenObjectArgType cenv m TyparRigid tcref isExtrinsic (tcref.Typars(m))
-
-        // Note: tcrefObjTy contains the original "formal" typars, thisTy is the "fresh" one... f<>fresh. 
-        let incrClassRevTypeInst = List.zip ctorDeclaredTypars (tcref.Typars(m) |> List.map mk_typar_ty)
-
-        let baseValOpt = 
-            match SuperTypeOfType cenv.g cenv.amap m objTy with 
-            | Some(superTy) -> MakeAndPublishBaseVal cenv env (Option.map id_of_val baseValOpt) superTy
-            | None -> None
-
-        // Use class type directly for type checking the members and lets 
-        // The (instance) members get fresh tyvar if their "this" requires it.
-        // Those typar are not "rigid" so they can be equated to each other through their mutual recursion.
-        // The types typar are made rigid in the "cores" pass.
-         
-        // These typars should not be instantiated.
-        // Post TC they should still be unique typars.
-        // Setting rigid ensures they do not get substituted for another typar either.
-        ctorDeclaredTypars |> List.iter (SetTyparRigid cenv.g env.DisplayEnv m) ; 
-
-        if verboseCC then dprintf "ctorDeclaredTypars: %s\n" (showL (TyparsL ctorDeclaredTypars));    
-
-        // Add class typars to env 
-        let env = AddDeclaredTypars CheckForDuplicateTypars ctorDeclaredTypars env
-
-        // Type check arguments by processing them as 'simple' patterns 
-        //     NOTE: if we allow richer patterns here this is where we'd process those patterns 
-        let ctorArgNames,(tpenv,names,takenNames) = TcSimplePatsOfUnknownType cenv true env tpenv (SPats (spats,m))
-        
-        // Create the values with the given names 
-        let _,vspecs = MakeSimpleVals cenv env m names
-
-        if is_struct_tcref tcref && isNil spats then 
-            errorR (ParameterlessStructCtor(tcref.Range));
-        
-        // Put them in order 
-        let ctorArgs = List.map (fun v -> NameMap.find v vspecs) ctorArgNames
-        let ctorThisVarRefCellOpt = MakeAndPublishCtorThisRefCellVal cenv env thisIdOpt thisTy
-        
-        // NOTE: the type scheme here is not complete!!! The ctorTy is more or less 
-        // just a type variable. The type and typars get fixed-up after inference 
-        let ctorValScheme,ctorVal = 
-            let argty = mk_tupled_ty cenv.g (types_of_vals ctorArgs)
-            // Initial type has known information 
-            let ctorTy = mk_fun_ty argty objTy    
-            // NOTE: no OverloadID can be specified for the implicit constructor 
-            let OverloadQualifier = None  
-            // REVIEW: no attributes can currently be specified for the implicit constructor 
-            let attribs = TcAttributes cenv env (attrTgtConstructor ||| attrTgtMethod) attrs
-            let memberFlags      = CtorMemberFlags OverloadQualifier
-                                  
-            let synArgInfos   = List.map (SynInfo.InferArgSynInfoFromSimplePat []) spats
-            let valSynData = ValSynInfo([synArgInfos],SynInfo.unnamedRetVal)
-            let id            = ident ("new",m)
-
-            CheckForNonAbstractInterface ModuleOrMemberBinding tcref memberFlags id.idRange;
-            let memberInfo,uniqueName  = MkMemberDataAndUniqueId(cenv.g,tcref,false,attribs,[],memberFlags,valSynData,id)
-            let partialTopValInfo = TranslateTopValSynInfo m (TcAttributes cenv env) valSynData
-            let prelimTyschemeG = TypeScheme(ctorDeclaredTypars,[],ctorTy)
-            let isComplete = ComputeIsComplete ctorDeclaredTypars [] ctorTy
-            let topValInfo = InferGenericArityFromTyScheme prelimTyschemeG partialTopValInfo
-            let ctorValScheme = ValScheme(uniqueName,prelimTyschemeG,Some(topValInfo),Some(memberInfo),false,NeverInline,NormalVal,vis,false,true,false)
-            let ctorVal = MakeAndPublishVal cenv env (Parent(tcref),false,ModuleOrMemberBinding,ValInRecScope(isComplete),ctorValScheme,attribs,emptyXmlDoc,None) 
-            ctorValScheme,ctorVal
-
-        // We only generate the cctor on demand, because wew don't need it if there are no cctor actions. 
-        // The code below has a side-effect (MakeAndPublishVal), so we only want to run it once if at all. 
-        // The .cctor is never referenced by any other code.
-        let cctorValInfo = 
-            lazy 
-               (let cctorArgs = [ fst(mk_compgen_local m "unitVar" cenv.g.unit_ty) ]
-
-                let cctorTy = mk_fun_ty cenv.g.unit_ty cenv.g.unit_ty
-                let valSynData = ValSynInfo([[]],SynInfo.unnamedRetVal)
-                let id = ident ("cctor",m)
-                CheckForNonAbstractInterface ModuleOrMemberBinding tcref ClassCtorMemberFlags id.idRange;
-                let memberInfo,uniqueName  = MkMemberDataAndUniqueId(cenv.g,tcref,false,[(*no attributes*)],[],ClassCtorMemberFlags,valSynData,id)
-                let partialTopValInfo = TranslateTopValSynInfo m (TcAttributes cenv env) valSynData
-                let prelimTyschemeG = TypeScheme(ctorDeclaredTypars,[],cctorTy)
-                let topValInfo = InferGenericArityFromTyScheme prelimTyschemeG partialTopValInfo
-                let cctorValScheme = ValScheme(uniqueName,prelimTyschemeG,Some(topValInfo),Some(memberInfo),false,NeverInline,NormalVal,None,false,true,false)
-                 
-                let cctorVal = MakeAndPublishVal cenv env (Parent(tcref),false,ModuleOrMemberBinding,ValNotInRecScope,cctorValScheme,[(* no attributes*)],emptyXmlDoc,None) 
-                cctorArgs,cctorVal,cctorValScheme)
-
-        let thisVal = 
-            // --- Create this for use inside constructor 
-            let thisId  = ident ("this",m)
-            let thisValScheme  = ValScheme(thisId,NonGenericTypeScheme(thisTy),None,None,false,NeverInline,NormalVal,None,false,false,false)
-            let thisVal    = MakeAndPublishVal cenv env (ParentNone,false,ClassLetBinding,ValNotInRecScope,thisValScheme,[],emptyXmlDoc,None)
-            if verboseCC then dprintf "mk_thisVar: v = %s\n" (showL (TypeOfvalL thisVal));
-            thisVal
-
-        {incrClassTcref                         = tcref;
-         incrClassInstanceCtorDeclaredTypars    = ctorDeclaredTypars;
-         incrClassRevTypeInst                   = incrClassRevTypeInst;
-         incrClassStaticCtorValInfo             = cctorValInfo;
-         incrClassInstanceCtorArgs              = ctorArgs;
-         incrClassInstanceCtorVal               = ctorVal;
-         incrClassInstanceCtorValScheme         = ctorValScheme;
-         incrClassInstanceCtorBaseValOpt        = baseValOpt;
-         incrClassInstanceCtorThisVarRefCellOpt = ctorThisVarRefCellOpt;
-         incrClassInstanceCtorThisVar           = thisVal;
-         // For generating names of local fields
-         incrClassNameGenerator                 = NiceNameGenerator()
-
-        }
-
-
-    // Partial class defns - local val mapping to fields
-      
-    /// Create the field for a "let" binding in a type definition.
-    ///
-    /// The "v" is the local typed w.r.t. tyvars of the implicit ctor.
-    /// The formalTyparInst does the formal-typars/implicit-ctor-typars subst.
-    /// Field specifications added to a tcref must be in terms of the tcrefs formal typars.
-    let MakeIncrClassField(cpath,formalTyparInst:TyparInst,v:Val,isStatic,rfref:RecdFieldRef) =
-        let name = rfref.FieldName
-        let id  = ident (name,v.Range)
-        let ty  = v.Type |> InstType formalTyparInst
-        let mut = v.IsMutable
-
-        let taccess = TAccess [cpath]
-        NewRecdField isStatic None id ty mut [(*no property attributes*)] [(*no field attributes *)] emptyXmlDoc taccess (*secret:*)true
-
-    type IncrClassValRepr = 
-        // e.g representation for 'let v = 3' if it is not used in anything given a method representation
-        | InVar of (* isArg: *) bool 
-        // e.g representation for 'let v = 3'
-        | InField of (*isStatic:*)bool * RecdFieldRef
-        // e.g representation for 'let f x = 3'
-        | InMethod of (*isStatic:*)bool * Val * ValTopReprInfo
-
-    /// IncrClassReprInfo represents the decisions we make about the representation of 'let' and 'do' bindings in a
-    /// type defined with implicit class construction.
-    type IncrClassReprInfo = 
-        { TakenFieldNames:Set;
-          RepInfoTcGlobals:TcGlobals;
-          /// vals mapped to representations
-          ValReprs  : Zmap.t; 
-          /// vals represented as fields or members from this point on 
-          ValsWithRepresentation  : Val Zset.t; }
-
-        static member Empty(g) = 
-            { TakenFieldNames=Set.empty;
-              RepInfoTcGlobals=g;
-              ValReprs = Zmap.empty val_spec_order; 
-              ValsWithRepresentation = Zset.empty val_spec_order }
-
-        /// Find the representation of a value
-        member localRep.LookupRepr (v:Val) = 
-            let g = localRep.RepInfoTcGlobals 
-            match Zmap.tryfind v localRep.ValReprs with 
-            | None -> error(InternalError("LookupRepr: failed to find representation for value",v.Range))
-            | Some res -> res
-
-        static member IsMethodRepr cenv (bind:Binding) = 
-            let v = bind.Var
-            // unit fields are not stored, just run rhs for effects
-            if is_unit_typ cenv.g v.Type then 
-                false
-            else 
-                let arity = InferArityOfExprBinding cenv.g v bind.Expr 
-                not arity.HasNoArgs && not v.IsMutable
-
-
-        /// Choose how a binding is represented
-        static member ChooseRepresentation (cenv,env:tcEnv,isStatic,isCtorArg,
-                                            ctorInfo:IncrClassCtorLhs,
-                                            /// The vars forced to be fields due to static member bindings, instance initialization expressions or instance member bindings
-                                            staticForcedFieldVars:FreeLocals,
-                                            /// The vars forced to be fields due to instance member bindings
-                                            instanceForcedFieldVars:FreeLocals,
-                                            takenFieldNames: Set,
-                                            bind:Binding) = 
-            let g = cenv.g 
-            let v = bind.Var
-            let relevantForcedFieldVars = (if isStatic then staticForcedFieldVars else instanceForcedFieldVars)
-            
-            // REVIEW: we would very much like to avoid generating a fresh compiler generated name here
-            let tcref = ctorInfo.incrClassTcref
-            let name,takenFieldNames = 
-                let nm = 
-                    if isSome (tcref.GetFieldByName(v.MangledName)) || takenFieldNames.Contains(v.MangledName) then
-                        ctorInfo.incrClassNameGenerator.FreshCompilerGeneratedName (v.MangledName,v.Range)
-                    else 
-                        v.MangledName
-                nm, takenFieldNames.Add(nm)
-                 
-            let repr = 
-                match InferArityOfExprBinding g v bind.Expr with 
-                | arity when arity.HasNoArgs || v.IsMutable -> 
-                    // all mutable variables are forced into fields, since they may escape into closures within the implicit constructor
-                    // e.g. 
-                    //     type C() =  
-                    //        let mutable m = 1
-                    //        let n = ... (fun () -> m) ....
-                    
-                    if v.IsMutable || relevantForcedFieldVars.Contains v then 
-                        //dprintfn "Representing %s as a field %s" v.MangledName name
-                        let rfref = RFRef(tcref,name)
-                        InField (isStatic,rfref)
-                    else
-                        //dprintfn 
-                        //    "Representing %s as a local variable %s, staticForcedFieldVars = %s, instanceForcedFieldVars = %s" 
-                        //    v.MangledName name 
-                        //    (staticForcedFieldVars |> Seq.map (fun v -> v.MangledName) |> String.concat ",")
-                        //    (instanceForcedFieldVars |> Seq.map (fun v -> v.MangledName) |> String.concat ",")
-                        InVar isCtorArg
-                | topValInfo -> 
-                    //dprintfn "Representing %s as a method %s" v.MangledName name
-                    let tps, argInfos, _, _ = GetTopValTypeInCompiledForm g topValInfo v.Type v.Range
-
-                    let valSynInfo = ValSynInfo(argInfos |> List.mapSquared (fun (_,TopArgInfo(_,nm)) -> ArgSynInfo([],false,nm)),SynInfo.unnamedRetVal)
-                    let memberFlags = (if isStatic then StaticMemberFlags else NonVirtualMemberFlags) None MemberKindMember
-                    let memberInfo,id = MkMemberDataAndUniqueId(g,tcref,false,[],[],memberFlags,valSynInfo,mksyn_id v.Range name)
-                    let curriedArgTys = argInfos |> List.mapSquared fst |> List.map (mk_tupled_ty g)
-
-                    let ctorDeclaredTypars = ctorInfo.incrClassInstanceCtorDeclaredTypars
-                    // Add the 'this' pointer on to the function
-                    let memberTauTy,topValInfo = 
-                        let tauTy = v.TauType
-                        if isStatic then 
-                            tauTy,topValInfo 
-                        else 
-                            let tauTy = ctorInfo.incrClassInstanceCtorThisVar.Type --> v.TauType
-                            let (TopValInfo(tpNames,args,ret)) = topValInfo
-                            let topValInfo = TopValInfo(tpNames, TopValInfo.selfMetadata::args, ret)
-                            tauTy, topValInfo
-                    // Add the enclosing type parameters on to the function
-                    let topValInfo = 
-                        let (TopValInfo(tpNames,args,ret)) = topValInfo
-                        TopValInfo(tpNames@TopValInfo.InferTyparInfo(ctorDeclaredTypars), args, ret)
-                                          
-                    //let synArgInfos   = List.map (SynInfo.InferArgSynInfoFromSimplePat []) spats
-                    //let valSynData = ValSynInfo([synArgInfos],SynInfo.unnamedRetVal)
-
-                    let prelimTyschemeG = TypeScheme(ctorDeclaredTypars@tps,[],memberTauTy)
-                    let memberValScheme = ValScheme(id,prelimTyschemeG,Some(topValInfo),Some(memberInfo),false,NeverInline,NormalVal,None,true (* isCompilerGenerated *) ,true (* isIncrClass *) ,false)
-                    let methodVal = MakeAndPublishVal cenv env (Parent(tcref),false,ModuleOrMemberBinding,ValNotInRecScope,memberValScheme,[(* no attributes*)],emptyXmlDoc,None) 
-                    InMethod(isStatic,methodVal,topValInfo)
-            repr, takenFieldNames
-
-        /// Extend the known local representations by choosing a representation for a binding
-        member localRep.ChooseAndAddRepresentation(cenv,env:tcEnv,isStatic,isCtorArg,ctorInfo:IncrClassCtorLhs,staticForcedFieldVars:FreeLocals,instanceForcedFieldVars: FreeLocals,bind:Binding) = 
-            let g = localRep.RepInfoTcGlobals 
-            let v = bind.Var
-            let tcref = ctorInfo.incrClassTcref
-            let repr,takenFieldNames = IncrClassReprInfo.ChooseRepresentation (cenv,env,isStatic,isCtorArg,ctorInfo,staticForcedFieldVars,instanceForcedFieldVars,localRep.TakenFieldNames,bind )
-            // OK, representation chosen, now add it 
-            {localRep with 
-                TakenFieldNames=takenFieldNames; 
-                ValReprs = Zmap.add v repr localRep.ValReprs}  
-
-        member localRep.ValNowWithRepresentation (v:Val) = 
-            {localRep with ValsWithRepresentation = Zset.add v localRep.ValsWithRepresentation}
-
-        member localRep.IsValWithRepresentation (v:Val) = 
-                localRep.ValsWithRepresentation.Contains(v) 
-
-        /// Make the elaborated expression that represents a use of a 
-        /// a "let v = ..." class binding
-        member localRep.MakeValueLookup thisVarOpt tinst v tyargs m =
-            let g = localRep.RepInfoTcGlobals 
-            match localRep.LookupRepr v, thisVarOpt with 
-            | InVar _,_ -> 
-                expr_for_val m v
-            | InField(false,rfref),Some(thisVal) -> 
-                let thise = expr_for_val m thisVal
-                mk_recd_field_get_via_expra(thise,rfref,tinst,m)
-            | InField(false,rfref),None -> 
-                error(InternalError("Unexpected missing 'this' variable in MakeValueLookup",m))
-            | InField(true,rfref),_ -> 
-                mk_static_rfield_get(rfref,tinst,m)
-            | InMethod(isStatic,methodVal,topValInfo),_ -> 
-                //dprintfn "Rewriting application of %s to be call to method %s" v.MangledName methodVal.MangledName
-                let expr,exprty = AdjustValForExpectedArity g m (mk_local_vref methodVal) NormalValUse topValInfo 
-                // Prepend the the type arguments for the class
-                let tyargs = tinst @ tyargs 
-                let thisArgs =
-                    if isStatic then []
-                    else Option.to_list (Option.map (expr_for_val m) thisVarOpt)
-                MakeApplicationAndBetaReduce g (expr,exprty,[tyargs],thisArgs,m) 
-
-        /// Make the elaborated expression that represents an assignment 
-        /// to a "let mutable v = ..." class binding
-        member localRep.MakeValueAssign thisVarOpt tinst v expr m =
-            let g = localRep.RepInfoTcGlobals 
-            match localRep.LookupRepr v, thisVarOpt with 
-            | InField(false,rfref),Some(thisVal) -> 
-                let thise = expr_for_val m thisVal
-                mk_recd_field_set_via_expra(thise,rfref,tinst,expr,m)
-            | InField(false,rfref),None -> 
-                error(InternalError("Unexpected missing 'this' variable in MakeValueAssign",m))
-            | InVar _,_ -> 
-                mk_val_set m (mk_local_vref v) expr
-            | InField(true,rfref),_ -> 
-                mk_static_rfield_set(rfref,tinst,expr,m)
-            | InMethod _,_ -> 
-                error(InternalError("Local was given method storage, yet later it's been assigned to",m))
-          
-        member localRep.MakeValueGetAddress thisVarOpt tinst v m =
-            let g = localRep.RepInfoTcGlobals 
-            match localRep.LookupRepr v,thisVarOpt with 
-            | InField(false,rfref),Some(thisVal) -> 
-                let thise = expr_for_val m thisVal
-                mk_recd_field_get_addr_via_expra(thise,rfref,tinst,m)
-            | InField(false,rfref),None -> 
-                error(InternalError("Unexpected missing 'this' variable in MakeValueGetAddress",m))
-            | InField(true,rfref),_ -> 
-                mk_static_rfield_get_addr(rfref,tinst,m)
-            | InVar _,_ -> 
-                mk_val_addr m (mk_local_vref v)
-            | InMethod _,_ -> 
-                error(InternalError("Local was given method storage, yet later it's address was required",m))
-
-        /// Mutate a type definition by adding fields 
-        /// Used as part of processing "let" bindings in a type definition. 
-        member localRep.PublishIncrClassFields cpath (ctorInfo:IncrClassCtorLhs) =   
-
-            let tcref = ctorInfo.incrClassTcref
-            let rfspecs   = 
-                [ for KeyValue(v,repr) in localRep.ValReprs do
-                      match repr with 
-                      | InField(isStatic,rfref) -> yield MakeIncrClassField(cpath,ctorInfo.incrClassRevTypeInst,v,isStatic,rfref)
-                      | _ -> yield! [] ]
-
-            let recdFields = MakeRecdFieldsTable (rfspecs @ tcref.AllFieldsAsList)
-            let obspec = tcref.FSharpObjectModelTypeInfo
-            let obspec = {obspec with fsobjmodel_rfields = recdFields}
-            // Mutate the entity_tycon_repr to publish the field
-            tcref.Deref.Data.entity_tycon_repr <- Some (TFsObjModelRepr obspec)  
-
-
-        /// Given localRep saying how locals have been represented, e.g. as fields.
-        /// Given an expr under a given thisVal context.
-        //
-        /// Fix up the references to the locals, e.g. 
-        ///     v -> this.fieldv
-        ///     f x -> this.method x
-        member localRep.FixupIncrClassExprPassC thisVarOpt (thisTyInst:tinst) expr = 
-            // fixup: intercept and expr rewrite
-            let FixupExprNode e =
-                //dprintfn "Fixup %s" (showL (ExprL e))
-                match e with
-                // Rewrite references to generic methods
-                | TExpr_app(TExpr_val (ValDeref(v),flags,_),_,tyargs,args,m) 
-                    when (localRep.IsValWithRepresentation(v) &&
-                          (match localRep.LookupRepr(v) with 
-                           | InMethod (_,methodVal,_)  -> (methodVal.Typars.Length > thisTyInst.Length)
-                           | _ -> false )) -> 
-
-                        //dprintfn "Found application of %s" v.MangledName
-                        let g = localRep.RepInfoTcGlobals
-                        let expr = localRep.MakeValueLookup thisVarOpt thisTyInst v tyargs m
-                        Some (MakeApplicationAndBetaReduce g (expr,(type_of_expr g expr),[],args,m)) 
-                        
-
-                // Rewrite references to values stored as fields and non-generic methods
-                | TExpr_val (ValDeref(v),flags,m)                         
-                    when (localRep.IsValWithRepresentation(v) &&
-                          (match localRep.LookupRepr(v) with 
-                           | InMethod (_,methodVal,_) -> (methodVal.Typars.Length <= thisTyInst.Length)
-                           | _ -> true)) -> 
-
-                        //dprintfn "Found use of %s" v.MangledName
-                        Some (localRep.MakeValueLookup thisVarOpt thisTyInst v [] m)
-
-                // Rewrite assignments to mutable values stored as fields 
-                | TExpr_op(TOp_lval_op (LSet,ValDeref(v))    ,[],[arg],m) 
-                    when localRep.IsValWithRepresentation(v) ->
-                        Some (localRep.MakeValueAssign thisVarOpt thisTyInst v arg m)
-
-                // Rewrite taking the address of mutable values stored as fields 
-                | TExpr_op(TOp_lval_op (LGetAddr,ValDeref(v)),[],[]   ,m) 
-                    when localRep.IsValWithRepresentation(v) ->
-                        Some (localRep.MakeValueGetAddress thisVarOpt thisTyInst v m)
-
-                | other -> None
-            Tastops.RewriteExpr { pre_intercept= None; 
-                                   post_transform = FixupExprNode;
-                                   under_quotations=true } expr 
-
-
-    type IncrClassConstructionBindingsPassC =
-      | PassCBindings of IncrClassBindingGroup list
-      | PassCCtorComplete     
-
-    /// Given a set of 'let' bindings (static or not, recursive or not) that make up a class, 
-    /// generate their initialization expression(s).  
-    let MakeCtorForIncrClassConstructionPassC 
-               (cenv,
-                env:tcEnv,
-                tpenv ,
-                /// The lhs information about the implicit constructor
-                ctorInfo:IncrClassCtorLhs,
-                /// The call to the super class constructor
-                inheritsExpr,
-                /// Should we place a sequence point at the 'inheritedTys call?
-                inheritsIsVisible,
-                /// The declarations
-                decs : IncrClassConstructionBindingsPassC list,
-                memberBinds : Binding list,
-                /// Record any unconstrained type parameters generalized for the outer members as "free choices" in the let bindings 
-                generalizedTyparsForRecursiveBlock) = 
-
-
-        if verboseCC then dprintf "---- MakeCtorForIncrClassConstructionPassC\n";
-        let denv = env.DisplayEnv 
-        let thisVal      = ctorInfo.incrClassInstanceCtorThisVar 
-
-        let thisTy    = thisVal.Type
-          
-        let m = thisVal.Range
-        let ctorDeclaredTypars = ctorInfo.incrClassInstanceCtorDeclaredTypars
-        if verboseCC then dprintf "ctorDeclaredTypars original : %s\n" (showL (TyparsL ctorDeclaredTypars));
-
-        let ctorDeclaredTypars = ChooseCanonicalDeclaredTyparsAfterInference cenv.g denv ctorDeclaredTypars m
-        if verboseCC then dprintf "ctorDeclaredTypars canonical: %s\n" (showL (TyparsL ctorDeclaredTypars));
-
-        let freeChoiceTypars = ListSet.subtract typar_ref_eq generalizedTyparsForRecursiveBlock ctorDeclaredTypars
-
-        let thisTyInst = List.map mk_typar_ty ctorDeclaredTypars
-
-        let acc_free_in_expr acc expr =
-            union_freevars acc (free_in_expr CollectLocalsNoCaching expr) 
-            
-        let acc_free_in_binding acc (bind:Binding) = 
-            acc_free_in_expr acc bind.Expr
-            
-        let acc_free_in_bindings acc (binds:Binding list) = 
-            (acc,binds) ||> List.fold acc_free_in_binding
-
-        // Find all the variables used in any method. These become fields.
-        //   staticForcedFieldVars:FreeLocals: the vars forced to be fields due to static member bindings, instance initialization expressions or instance member bindings
-        //   instanceForcedFieldVars: FreeLocals: the vars forced to be fields due to instance member bindings
-                                            
-        let staticForcedFieldVars,instanceForcedFieldVars = 
-             let (staticForcedFieldVars,instanceForcedFieldVars) = 
-                 ((empty_freevars,empty_freevars),decs) ||> List.fold (fun (staticForcedFieldVars,instanceForcedFieldVars) dec -> 
-                    match dec with 
-                    // Construction is done so we can set the ref cell 
-                    | PassCCtorComplete ->  (staticForcedFieldVars,instanceForcedFieldVars)
-                    | PassCBindings decs ->
-                        ((staticForcedFieldVars,instanceForcedFieldVars),decs) ||> List.fold (fun (staticForcedFieldVars,instanceForcedFieldVars) dec -> 
-                            match dec with 
-                            | IncrClassBindingGroup(binds,isStatic,isRec) -> 
-                                let methodBinds = binds |> List.filter (IncrClassReprInfo.IsMethodRepr cenv) 
-                                let staticForcedFieldVars = 
-                                    if isStatic then 
-                                        // Any references to static variables in any static method force the variable to be represented as a field
-                                        (staticForcedFieldVars,methodBinds) ||> acc_free_in_bindings
-                                    else
-                                        // Any references to static variables in any instance bindings force the variable to be represented as a field
-                                        (staticForcedFieldVars,binds) ||> acc_free_in_bindings
-                                        
-                                let instanceForcedFieldVars = 
-                                    // Any references to instance variables in any methods force the variable to be represented as a field
-                                    (instanceForcedFieldVars,methodBinds) ||> acc_free_in_bindings
-                                        
-                                (staticForcedFieldVars,instanceForcedFieldVars)
-                            | IncrClassDo (e,isStatic) -> 
-                                let staticForcedFieldVars = 
-                                    if isStatic then 
-                                        staticForcedFieldVars
-                                    else
-                                        union_freevars staticForcedFieldVars (free_in_expr CollectLocalsNoCaching e)
-                                (staticForcedFieldVars,instanceForcedFieldVars)))
-             let staticForcedFieldVars  = (staticForcedFieldVars,memberBinds) ||> acc_free_in_bindings 
-             let instanceForcedFieldVars = (instanceForcedFieldVars,memberBinds) ||> acc_free_in_bindings 
-             
-             // Any references to static variables in the 'inherits' expression force those static variables to be represented as fields
-             let staticForcedFieldVars = (staticForcedFieldVars,inheritsExpr) ||> acc_free_in_expr
-
-             (staticForcedFieldVars.FreeLocals,instanceForcedFieldVars.FreeLocals)
-
-
-        // Compute the implicit construction side effects of single 
-        // 'let' or 'let rec' binding in the implicit class construction sequence 
-        let TransBind (reps:IncrClassReprInfo) (TBind(v,rhs,spBind)) =
-            // move to CheckMembersForm?? 
-            if v.MustInline then
-                error(Error("Local class bindings may not be marked inline. Consider lifting the definition out of the class or else do not mark it as inline",v.Range));
-            let rhs = reps.FixupIncrClassExprPassC (Some(thisVal)) thisTyInst rhs
-            
-            match reps.LookupRepr v with
-            | InMethod(isStatic,methodVal,_) -> 
-                let _,chooseTps,tauExpr,tauTy,m = 
-                    match rhs with 
-                    | TExpr_tchoose(chooseTps,b,_) -> [],chooseTps,b,(type_of_expr cenv.g b),m 
-                    | TExpr_tlambda (_,tps,TExpr_tchoose(chooseTps,b,_),m,returnTy,_) -> tps,chooseTps,b,returnTy,m 
-                    | TExpr_tlambda (_,tps,b,m,returnTy,_) -> tps,[],b,returnTy,m 
-                    | e -> [],[],e,(type_of_expr cenv.g e),range_of_expr e
-                    
-                let chooseTps = chooseTps @ freeChoiceTypars
-                // Add the 'this' variable as an argument
-                let tauExpr,tauTy = 
-                    if isStatic then 
-                        tauExpr,tauTy
-                    else
-                        let e = mk_lambda m thisVal (tauExpr,tauTy)
-                        e, type_of_expr cenv.g e
-                // Replace the type parameters that used to be on the rhs with 
-                // the full set of type parameters including the type parameters of the enclosing class
-                let rhs = mk_tlambda m methodVal.Typars (mk_tchoose m chooseTps tauExpr,tauTy)
-                (fun e -> e), [TBind (methodVal,rhs,spBind)]
-            
-            // If it's represented as a non-escaping local variable then just bind it to its value
-            // If it's represented as a non-escaping local arg then no binding necessary (ctor args are already bound)
-            
-            | InVar isArg ->
-                (fun e -> if isArg then e else mk_let_bind m (TBind(v,rhs,spBind)) e), []
-            | _ ->
-                 // Use spBind if it available as the span for the assignment into the field
-                let m =
-                     match spBind,rhs with 
-                     // Don't generate big sequence points for functions in classes
-                     | _, (TExpr_lambda  _ | TExpr_tlambda _) -> v.Range
-                     | SequencePointAtBinding m,_ -> m 
-                     | _ -> v.Range
-                let assignExpr = reps.MakeValueAssign (Some(thisVal)) thisTyInst v rhs m
-                (fun e -> mk_seq SequencePointsAtSeq m assignExpr e), []
-
-        /// Work out the implicit construction side effects of a 'let', 'let rec' or 'do' 
-        /// binding in the implicit class construction sequence 
-        let TransTrueDec isCtorArg (reps:IncrClassReprInfo) dec = 
-              match dec with 
-              | (IncrClassBindingGroup(binds,isStatic,isRec)) ->
-                  let actions,reps,methodBinds = 
-                      let reps     = (reps,binds) ||> List.fold (fun rep bind -> rep.ChooseAndAddRepresentation(cenv,env,isStatic,isCtorArg,ctorInfo,staticForcedFieldVars,instanceForcedFieldVars,bind)) // extend
-                      if isRec then
-                          // Note: the recursive calls are made via members on the object
-                          // or via access to fiels. THis means the recursive loop is "broken", 
-                          // and we can collapse to sequential bindings 
-                          let reps     = (reps,binds) ||> List.fold (fun rep bind -> rep.ValNowWithRepresentation bind.Var) // inscope before
-                          let actions,methodBinds = binds |> List.map (TransBind reps) |> List.unzip // since can occur in RHS of own defns 
-                          actions,reps,methodBinds
-                      else 
-                          if debug then dprintf "TransDec: %d bindings, isRec=%b\n" binds.Length isRec;
-                          let actions,methodBinds = binds |> List.map (TransBind reps)  |> List.unzip
-                          let reps     = (reps,binds) ||> List.fold (fun rep bind -> rep.ValNowWithRepresentation bind.Var) // inscope after
-                          actions,reps,methodBinds
-                  let methodBinds = List.concat methodBinds
-                  if isStatic then (actions,[],methodBinds),reps
-                  else ([],actions,methodBinds),reps
-
-              | IncrClassDo (doExpr,isStatic) -> 
-                  let doExpr = reps.FixupIncrClassExprPassC (Some(thisVal)) thisTyInst doExpr
-                  let binder = (fun e -> mk_seq SequencePointsAtSeq (range_of_expr doExpr) doExpr e)
-                  if isStatic then ([binder],[],[]),reps
-                  else ([],[binder],[]),reps
-
-
-        /// Work out the implicit construction side effects of each declaration 
-        /// in the implicit class construction sequence 
-        let TransDec (reps:IncrClassReprInfo) dec = 
-            match dec with 
-            // Construction is done so we can set the ref cell 
-            | PassCCtorComplete ->  
-                let binders = 
-                    match ctorInfo.incrClassInstanceCtorThisVarRefCellOpt with 
-                    | None ->  []
-                    | Some v -> 
-                        let thisVarRefCellSetExpr = reps.FixupIncrClassExprPassC (Some(thisVal)) thisTyInst (mk_refcell_set cenv.g m ctorInfo.incrClassInstanceCtorThisVar.Type (expr_for_val m v) (expr_for_val m ctorInfo.incrClassInstanceCtorThisVar))
-                        let binder = (fun e -> mk_seq SequencePointsAtSeq (range_of_expr thisVarRefCellSetExpr) thisVarRefCellSetExpr e)
-                        [ binder ]
-                ([],binders,[]),reps
-                
-            | PassCBindings decs -> 
-                let initActions,reps = List.mapfold (TransTrueDec false) reps decs 
-                let cctorInitActions,ctorInitActions,methodBinds = List.unzip3 initActions
-                (List.concat cctorInitActions, List.concat ctorInitActions, List.concat methodBinds), reps 
-
-                
-
-        let reps = (IncrClassReprInfo.Empty(cenv.g))
-
-        // Bind the IsArg(true) representations of the object constructor arguments and assign them to fields
-        // if they escape to the members. We do this by running the instance bindings 'let x = x' through TransTrueDec
-        // for each constructor argument 'x', but with the special flag 'isCtorArg', which helps TransBind know that 
-        // the value is already available as an argument, and that nothing special needs to be done unless the 
-        // value is being stored into a field.
-        let (cctorInitActions1, ctorInitActions1,methodBinds1),reps = 
-            let binds = ctorInfo.incrClassInstanceCtorArgs |> List.map (fun v -> mk_invisible_bind v (expr_for_val v.Range v))
-            TransTrueDec true reps (IncrClassBindingGroup(binds,false,false))
-
-        // We expect that only ctorInitActions1 will be non-empty here, and even then only if some elements are stored in the field
-        assert (isNil cctorInitActions1)
-        assert (isNil methodBinds1)
-
-        // Now deal with all the 'let' and 'member' declarations
-        let initActions,reps = List.mapfold TransDec reps decs
-        let cctorInitActions2, ctorInitActions2,methodBinds2 = List.unzip3 initActions
-        let cctorInitActions = cctorInitActions1 @  List.concat cctorInitActions2
-        let ctorInitActions = ctorInitActions1 @ List.concat ctorInitActions2
-        let methodBinds = methodBinds1 @ List.concat methodBinds2
-
-        let ctorBody =
-            // REVIEW: the sequence points aren't right here.
-            let ctorInitAction = List.foldBack (fun binder acc -> binder acc) ctorInitActions (mk_unit cenv.g m)
-            let ldarg0   = mk_ldarg0 m thisTy
-            let ctorBody = mk_seq (if inheritsIsVisible then SequencePointsAtSeq else SuppressSequencePointOnExprOfSequential) m inheritsExpr (mk_invisible_let m thisVal ldarg0 ctorInitAction)
-            let ctorBody = mk_basev_multi_lambdas m [] ctorInfo.incrClassInstanceCtorBaseValOpt [ctorInfo.incrClassInstanceCtorArgs] (ctorBody,cenv.g.unit_ty)
-            ctorBody
-
-        let cctorBodyOpt =
-            /// Omit the .cctor if it's empty 
-            match cctorInitActions with
-            | [] -> None 
-            | _ -> 
-                let cctorInitAction = List.foldBack (fun binder acc -> binder acc) cctorInitActions (mk_unit cenv.g m)
-                let m = thisVal.Range
-                let cctorArgs,_,_ = ctorInfo.incrClassStaticCtorValInfo.Force()
-                let cctorBody = mk_basev_multi_lambdas m [] None [cctorArgs] (cctorInitAction,cenv.g.unit_ty)
-                Some(cctorBody)
-        
-        ctorBody,cctorBodyOpt,methodBinds,reps
-
-// Checking of members and 'let' bindings in classes
-module TyconBindingChecking = begin 
-
-    open IncrClassChecking 
-
-    // Technique: multiple passes.
-    //   - create val_specs for recursive items given names and args
-    //   - type check AST to TAST collecting (sufficient) type constraints
-    //   - determine typars to generalize over
-    //   - generalize definitions (fixing up recursive instances)
-    //   - build ctor binding
-    //   - Yields set of recursive bindings for the ctors and members of the types.
-    
-    type TyconBindingsPassA =
-      | PassAIncrClassCtor     of IncrClassCtorLhs
-      | PassAInherit           of SynType * SynExpr * (*base:*)Val option * range
-      | PassAIncrClassBindings of TyconRef * Ast.SynBinding list * (* isStatic:*) bool * (*recursive:*) bool * range
-      | PassAMember            of RecursiveBindingInfo * NormalizedBinding
-      | PassAOpen              of LongIdent * range
-      // Indiates the last 'field' has been initialized, only 'do' comes after 
-      | PassAIncrClassCtorComplete 
-
-    type TyconBindingsPassB =
-      | PassBIncrClassCtor     of IncrClassCtorLhs * Tast.Binding option
-      | PassBInherit           of expr * Val option
-      | PassBIncrClassBindings of IncrClassBindingGroup list
-      | PassBMember            of RecursiveBindingInfo * TBindingInfo * typars
-      // Indicates the last 'field' has been initialized, only 'do' comes after 
-      | PassBIncrClassCtorComplete of FreeTypars 
-      | PassBOpen              of LongIdent * range
-
-    type TyconBindingsPassC =
-      | PassCIncrClassCtor     of IncrClassCtorLhs * Tast.Binding option
-      | PassCInherit           of expr * Val option
-      | PassCIncrClassBindings of IncrClassBindingGroup list
-      | PassCMember            of RecursiveUseFixupPoints * Tast.Binding
-      | PassCOpen              of LongIdent * range
-      // Indicates the last 'field' has been initialized, only 'do' comes after 
-      | PassCIncrClassCtorComplete     
-
-    /// Get the "this" variable from an instance member binding
-    let GetInstanceMemberThisVariable (v:Val,x) =
-        // Skip over LAM tps. Choose 'a. 
-        if v.IsInstanceMember then
-            let rec firstArg e =
-              match e with
-                | TExpr_tlambda (_,tps,b,_,returnTy,_) -> firstArg b
-                | TExpr_tchoose (_,b,_) -> firstArg b
-                | TExpr_lambda  (_,_,[v],b,_,_,_) -> Some v
-                | _ -> failwith "GetInstanceMemberThisVariable: instance member did not have expected internal form"
-           
-            firstArg x
-        else
-            None
-
-
-    /// Main routine
-    let TcTyconBindings cenv (env:tcEnv) tpenv bindsm scopem (bindsl : TyconBindingDefns list) =
-        
-        let ad = AccessRightsOfEnv env
-        let denv = env.DisplayEnv
-        let envInitial = env
-        let env = ()
-        
-        // PassA: create member prelimRecValues for "recursive" items, i.e. ctor val and member vals 
-        // PassA: also processes their arg patterns - collecting type assertions 
-        let defnsAs, (tpenv,prelimRecValues) =
-            if verboseCC then dprintf "---------- passA: --------------------\n";
-
-            ((tpenv,NameMap.empty),bindsl) ||> List.mapfold (fun (tpenv,prelimRecValues) (TyconBindingDefns(tcref, binds)) -> 
-
-                (* Class members can access protected members of the implemented type *)
-                (* Class members can access private members in the type *)
-                let envForTycon = MkInnerEnvForTyconRef cenv envInitial tcref false
-                // Re-add the type constructor to make it take precedence for record label field resolutions
-                let envForTycon = AddLocalTycons cenv.g cenv.amap tcref.Range [tcref.Deref] envForTycon
-                let cpath = curr_access_cpath envForTycon
-                let defnAs,(_,envForTycon,tpenv,prelimRecValues) = 
-                    ((None,envForTycon,tpenv,prelimRecValues),binds) ||> List.collectFold (fun (incrClassCtorLhsOpt,env,tpenv,prelimRecValues) (TyconBindingDefn(containerInfo,newslotsOK,declKind,classMemberDef,m)) ->
-
-                        if tcref.IsTypeAbbrev then error(Error("Type abbreviations may not have members",m));
-                        if is_enum_tcref tcref then error(Error("Enumerations may not have members",m));
-
-                        match classMemberDef, containerInfo with
-                        
-                          | ClassMemberDefn_implicit_ctor (vis,attrs,spats,thisIdOpt, m), ContainerInfo(_,Some(tcref,_,baseValOpt,_)) ->
-                              match tcref.TypeOrMeasureKind with KindMeasure -> error(Error("Measure declarations may have only static members", m)) | _ -> ();
-
-                              (* note; ContainerInfo is certain to be an option *)
-                              (* PassA: make incrClassCtorLhs - ctorv, thisVal etc, type depends on argty(s) *)
-                              let incrClassCtorLhs = TcImplictCtorLhsPassA(cenv,env,tpenv,tcref,vis,attrs,spats,thisIdOpt,baseValOpt,m)
-                              (* PassA: Add ctorDeclaredTypars from incrClassCtorLhs - or from tcref *)
-                              let env = AddDeclaredTypars CheckForDuplicateTypars incrClassCtorLhs.incrClassInstanceCtorDeclaredTypars env
-                              [PassAIncrClassCtor incrClassCtorLhs],
-                              (Some(incrClassCtorLhs),env,tpenv,prelimRecValues)
-                              
-                          | ClassMemberDefn_implicit_inherit (typ,arg,baseIdOpt,m),_ ->
-                              match tcref.TypeOrMeasureKind with KindMeasure -> error(Error("Measure declarations may have only static members", m)) | _ -> ();
-                              (* PassA: inherit typ(arg) as base - pass through *)
-                              let baseValOpt = incrClassCtorLhsOpt |> Option.bind (fun x -> x.incrClassInstanceCtorBaseValOpt)
-                              [PassAInherit (typ,arg,baseValOpt,m)],   (* pick up baseValOpt! *)
-                              (incrClassCtorLhsOpt,env,tpenv,prelimRecValues)
-                              
-                          | ClassMemberDefn_let_bindings (letBinds,isStatic,isRec,m),_ ->
-                              match tcref.TypeOrMeasureKind,isStatic with KindMeasure,false -> error(Error("Measure declarations may have only static members", m)) | _,_ -> ();
-
-                              if is_struct_tcref tcref && not isStatic then 
-                                   let allDo = letBinds |> List.forall (function (Binding(_,DoBinding,_,_,_,_,_,_,_,_,_)) -> true | _ -> false)
-                                   if allDo then 
-                                      errorR(Deprecated("Structs may not contain 'do' bindings because the default constructor for structs would not execute these bindings",m));
-                                   else
-                                      errorR(Error("Structs may not contain 'let' bindings because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type",m));
-
-                              if isStatic && isNone incrClassCtorLhsOpt then 
-                                  errorR(Error("Static 'let' bindings may only be defined in class types with implicit constructors",m));
-                              
-                              (* PassA: let-bindings - pass through *)
-                              [PassAIncrClassBindings (tcref,letBinds,isStatic,isRec,m)],
-                              (incrClassCtorLhsOpt,env,tpenv,prelimRecValues)     
-                              
-                          | ClassMemberDefn_member_binding (bind,m),_ ->
-                              if verboseCC then dprintf "PassA: member\n";
-                              (* PassA: member binding - create prelim valspec (for recursive reference) and RecursiveBindingInfo *)
-                              let (NormalizedBinding(_,_,_,_,_,_,_,valSynData,_,_,_,_)) as bind = BindingNormalization.NormalizeBinding ValOrMemberBinding cenv env bind
-                              let (ValSynData(memberFlagsOpt,_,_)) = valSynData 
-                              match tcref.TypeOrMeasureKind with
-                              | KindType -> ()
-                              | KindMeasure ->
-                                (match memberFlagsOpt with 
-                                | None -> () 
-                                | Some memberFlags -> 
-                                  if memberFlags.MemberIsInstance then error(Error("Measure declarations may have only static members", m));
-                                  match memberFlags.MemberKind with 
-                                  | MemberKindConstructor -> error(Error("Measure declarations may have only static members: constructors are not available", m))
-                                  | _ -> ()
-                                );
-                              let rbind = NormalizedRecBindingDefn(containerInfo,newslotsOK,declKind,bind)
-                              let overridesOK  = DeclKind.CanOverrideOrImplement(declKind)
-                              let binds,(tpenv,prelimRecValues) = AnalyzeAndMakeRecursiveValue overridesOK cenv env (tpenv,prelimRecValues) rbind
-                              [ for (rbinfo,bind) in binds -> PassAMember (rbinfo,bind) ],
-                              (incrClassCtorLhsOpt,env,tpenv,prelimRecValues)
-                        
-                          | ClassMemberDefn_open (mp,m),_ ->
-                              [ PassAOpen (mp,m) ],
-                              (incrClassCtorLhsOpt,env,tpenv,prelimRecValues)
-                        
-                          | _ -> 
-                              error(InternalError("Unexpected definition",m)))
-
-                let defnAs = 
-                    (* Insert PassAIncrClassCtorComplete at the point where local construction is known to have been finished *)
-                    (* REVIEW: this is quadratic *)
-                    let rec insertDone defns = 
-                        if defns |> List.forall (function 
-                          | PassAOpen _ | PassAIncrClassCtor _ | PassAInherit _ | PassAIncrClassCtorComplete -> false
-                          | PassAIncrClassBindings (_,binds,isStatic,isRec,_) -> 
-                              (* Detect 'let _ =' and 'let () =' bindings, which are 'do' bindings. *)
-                              binds |> List.forall (function (Binding (_,DoBinding,_,_,_,_,_,_,_,_,_)) -> true | _ -> false)
-                          | PassAMember _ -> true)
-                        then PassAIncrClassCtorComplete :: defns 
-                        else List.hd defns :: insertDone (List.tl defns)
-                    insertDone defnAs
-
-                (envForTycon,defnAs),(tpenv,prelimRecValues))
-
-
-        let prelimRecValues = NameMap.map fst prelimRecValues
-     
-        // PassB: type check pass, convert from ast to tast and collects type assertions 
-
-        if verboseCC then dprintf "---------- passB: --------------------\n";        
-
-        let defnsBs,tpenv = 
-
-
-            // Loop through the types being defined...
-            (tpenv,defnsAs) ||> List.mapfold (fun tpenv (envForTycon, defnAs) -> 
-                // Add prelimRecValues to env (breaks recursion) and vrec=true 
-                let envForTycon = AddLocalValMap scopem prelimRecValues envForTycon
-                if verboseCC then 
-                    prelimRecValues |> NameMap.iteri (fun name v -> dprintf "prelim %s : %s\n" name ((DebugPrint.showType v.Type))) ;
-                
-                // Set up the environment so use-before-definition warnings are given, at least 
-                // until we reach a PassAIncrClassCtorComplete. 
-                let envForTycon = { envForTycon with eCtorInfo = Some (InitialImplicitCtorInfo()) }
-                    
-                // Loop through the definition elements in a type...
-                let defnBs,(tpenv,_,_) = 
-                    ((tpenv,envForTycon,envForTycon),defnAs) ||> List.mapfold  (fun (tpenv,envInstance,envStatic) defnA -> 
-                        match defnA with
-                        | PassAIncrClassCtor incrClassCtorLhs ->
-                            if verboseCC then dprintf "PassB: ctor\n";
-                            (* PassB: enrich envInstance with implicit ctor args *)
-                            let envInstance = match incrClassCtorLhs.incrClassInstanceCtorThisVarRefCellOpt with Some v -> AddLocalVal scopem v envInstance | None -> envInstance
-                            let envInstance = List.foldBack AddLocalValPrimitive incrClassCtorLhs.incrClassInstanceCtorArgs envInstance 
-                            let thisVarRefCellBindOpt = TcLetrecComputeCtorThisVarRefCellBinding cenv incrClassCtorLhs.incrClassInstanceCtorThisVarRefCellOpt
-                            PassBIncrClassCtor (incrClassCtorLhs,thisVarRefCellBindOpt),
-                            (tpenv,envInstance,envStatic)
-                            
-                        | PassAInherit (sty,arg,baseValOpt,m) ->
-                            (* PassB: build new object expr for the inherit-call *)
-                            let ty,tpenv = TcType cenv NoNewTypars CheckCxs envInstance tpenv sty
-                            let inheritsExpr,tpenv = TcNewExpr cenv envInstance tpenv ty (Some (range_of_syntype sty)) true arg m
-                            let envInstance = 
-                                match baseValOpt with 
-                                | Some baseVal -> AddLocalVal scopem baseVal envInstance 
-                                | None -> envInstance
-                            PassBInherit (inheritsExpr,baseValOpt),
-                            (tpenv,envInstance,envStatic)
-                            
-                        | PassAIncrClassBindings (tcref,binds,isStatic,isRec,bindsm) ->
-                            if verboseCC then dprintf "PassB: bindings\n";
-                            let envForMember = if isStatic then envStatic else envInstance
-                            (* PassB: let bindings *)
-                            let binds,bindRs,env,tpenv = 
-                                if isRec then
-                                    (* type check local recursive binding *)
-                                    let binds = binds |> List.map (fun bind -> RecBindingDefn(ExprContainerInfo,NoNewSlots,ClassLetBinding,bind))
-                                    let binds,env,tpenv = TcLetrec ErrorOnOverrides cenv envForMember tpenv (binds,scopem(*bindsm*),scopem)
-                                    let bindRs = [IncrClassBindingGroup(binds,isStatic,true)]
-                                    binds,bindRs,env,tpenv 
-                                else
-                                    (* type check local binding *)
-                                    let binds,env,tpenv = TcLetBindings cenv envForMember ExprContainerInfo ClassLetBinding tpenv (binds,bindsm,scopem)
-                                    let binds,bindRs = 
-                                        binds 
-                                        |> List.map (function
-                                            | TMDefLet(bind,_) -> [bind],IncrClassBindingGroup([bind],isStatic,false)
-                                            | TMDefDo(e,_) -> [],IncrClassDo(e,isStatic)
-                                            | _ -> error(InternalError("unexpected definition kind",tcref.Range)))
-                                        |> List.unzip
-                                    List.concat binds,bindRs,env,tpenv
-
-                            // Check to see that local bindings and members don't have the same name
-                            for bind in binds do 
-                                let nm = bind.Var.DisplayName
-                                let ty = snd (generalize_tcref tcref)
-                                match TryFindMethInfo cenv.infoReader bind.Var.Range ad nm ty,
-                                      TryFindPropInfo cenv.infoReader bind.Var.Range ad nm ty with 
-                                | [],[] -> ()
-                                | _ -> errorR (Error(sprintf "A member and a local class binding both have the name '%s'" nm,bind.Var.Range));
-
-                            // Also add static entries to the envInstance if necessary 
-                            let envInstance = (if isStatic then List.foldBack (var_of_bind >> AddLocalVal scopem) binds envInstance else env)
-                            let envStatic = (if isStatic then env else envStatic)
-                            PassBIncrClassBindings bindRs,
-                            (tpenv,envInstance,envStatic)
-                              
-                        | PassAIncrClassCtorComplete -> 
-                            (* Lift the restriction that results in use-before-initialization warnings *)
-                            PassBIncrClassCtorComplete empty_free_loctypars, (* <-- PATCHED: the ungeneralisable typars are computed in PassB2 below *)
-                            (tpenv, ExitCtorPreConstructRegion envInstance,envStatic)
-                            
-                        | PassAOpen(mp,m) -> 
-                            let envInstance = TcOpenDecl cenv.g cenv.amap m scopem envInstance mp
-                            let envStatic = TcOpenDecl cenv.g cenv.amap m scopem envStatic mp
-                            PassBOpen(mp,m),
-                            (tpenv, envInstance,envStatic  )
-
-                        (* Note: this path doesn't add anything the environment, because the member is already available off via its type *)
-                        | PassAMember (rbinfo,bind) ->
-                            if verboseCC then dprintf "PassB: member\n";
-                            (* PassB: Typecheck member binding, generalize them later, when all type constraints are known *)
-                            (* static members are checked under envStatic.
-                             * envStatic contains class typars and the (ungeneralized) members on the class(es).
-                             * envStatic has no instance-variables (local let-bindings or ctor args). *)
-                            let (RBInfo(_,_,_,v,_,_,_,_,_,_,_,_)) = rbinfo
-
-                            let envForMember = if v.IsInstanceMember then envInstance else envStatic
-
-                            let (rbinfo,tbind),tpenv = TcLetrecBinding cenv envForMember scopem prelimRecValues tpenv (rbinfo,bind)
-                             
-                            if verboseCC then dprintf "PassBMember: vspec = %s\n" (TypeOfvalL v |> showL);
-                            
-                            let uncomputedGeneralizedTypars= [] // <-- PATCHED: generalized typars are computed in PassB2 below 
-                            
-                            PassBMember (rbinfo,tbind,uncomputedGeneralizedTypars),
-                            (tpenv,envInstance,envStatic))
-                defnBs,tpenv)
-
-        defnsBs |> List.iter (fun defnBs -> 
-            // Take ctor (and inherit if present) and build ctor binding rhs expr.
-            // Also yields fixup function to fixup references to local state.
-            // That must be applied to the expr in the member definitions - and - doing so makes some type assertions on the member this typars.
-            // Q: can the member this typars ever be anything other than free typars???
-            //------
-            // Is it enough to make all the "this" arguments type equal?
-            // If they refer to a local state variable, then this assertion will be made.
-            // If they dont, is there harm in making that assertion??
-            // Surely, those typars must after typechecking still be a unique set of typar?
-            match defnBs with 
-            | PassBIncrClassCtor (incrClassCtorLhs,thisVarRefCellBindOpt) :: otherDefnBs ->
-                (* Assert the types of 'this' *)
-                otherDefnBs |> List.iter (function
-                    | PassBMember (rbinfo,tbind,_) ->
-                        let (RBInfo(_,_,_,vspec,_,_,_,_,_,_,_,_)) = rbinfo
-                        let (TBindingInfo(_,_,_,_,_,_,_,expr,_,_,m,_,_,_)) = tbind
-                        (match GetInstanceMemberThisVariable (vspec,expr) with
-                           | None -> ()
-                           | Some vx_thisv ->
-                               let incrClassInstanceCtorThisVar = incrClassCtorLhs.incrClassInstanceCtorThisVar
-                               if verboseCC then dprintf "vx_thisv.Type = %s, incrClassInstanceCtorThisVar.Type = %s \n" (TypeOfvalL vx_thisv |> showL) (showL (typeL incrClassInstanceCtorThisVar.Type));
-                               unifyE cenv envInitial m vx_thisv.Type incrClassInstanceCtorThisVar.Type)
-                    | _ -> ())
-            | _ -> ());
-          
-        // Note: we now have enough information to proceed with generalisation.
-
-        // Pass B2: This computes the ungeneralisable typars for the member block(s).
-        // These typars are:
-        // - those typars free in envInitial
-        // - those typars free in the let-bindings inscope over the members,
-        //   in particular, these dangling typars are allowed to remain,
-        //   to be resolved later in the file, but they must not be generalized.
-        //   CONSIDER: ungeneralized typars could generate a warning.
-        // Implementation:
-        //   For each type,
-        //     We add the defns to an environment based on envInitial (not envinner).
-        //     Note, envinner = envInitial + prelimRecValues, and the prelimRecValues are the members.
-        //   The free typars of each type's env determines ungeneralisable typars.
-        //   The union of the these are ungeneralisable over the members letrec block.
-        let defnsBs = 
-            defnsBs |> List.map (fun defnBs ->
-                let defnBs,_ = 
-                    (envInitial,defnBs) ||> List.mapfold (fun env defnB ->
-                      match defnB with
-                        | PassBIncrClassCtor (incrClassCtorLhs,_) ->
-                            if verboseCC then dprintf "PassB2: ctor\n";
-                            let env = match incrClassCtorLhs.incrClassInstanceCtorThisVarRefCellOpt with Some v -> AddLocalVal scopem v env | None -> env
-                            let env = List.foldBack AddLocalValPrimitive incrClassCtorLhs.incrClassInstanceCtorArgs env 
-                            defnB,env
-                        | PassBInherit (inheritsExpr,baseValOpt) ->
-                            let env = match baseValOpt with Some baseVal -> AddLocalVal scopem baseVal env | None -> env
-                            defnB,env
-                        | PassBIncrClassBindings bindRs ->
-                            let collectBind env (bind:Binding) = AddLocalValPrimitive bind.Var env
-                            let collectBindRs env b = 
-                                match b with 
-                                | (IncrClassBindingGroup(binds,_,_)) -> List.fold collectBind env binds
-                                | IncrClassDo (e,_) -> env
-                            let env = List.fold collectBindRs env bindRs
-                            defnB,env
-                        | PassBIncrClassCtorComplete ignoredSinceItIsComputedHere ->
-                            PassBIncrClassCtorComplete (GeneralizationHelpers.ComputeUngeneralizableTypars env),  (* <--- PATCHING: this pass computes this typar set *)
-                            env
-                        | PassBMember _ ->
-                            defnB,env
-                        | PassBOpen (_,m) -> error(Error("'open' declarations may not be used in classes",m)))
-                defnBs)
-
-        begin         
-            let supportForBindings = 
-                defnsBs |> List.collect (fun defnBs -> 
-                    defnBs |> List.collect (fun defnB -> 
-                        match defnB with
-                          | PassBOpen _ | PassBIncrClassCtor  _ | PassBInherit _  | PassBIncrClassBindings _ | PassBIncrClassCtorComplete _ -> []
-                          | PassBMember (rbinfo ,tbind,ignoredSinceItIsComputedHere) -> TcLetrecComputeSupportForBinding cenv (rbinfo,tbind)))
-            GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv,denv,bindsm) supportForBindings; 
-        end;
-
-        let freeInEnv = 
-            let freeInEnvBase = GeneralizationHelpers.ComputeUngeneralizableTypars envInitial
-            let freeInEnvForMembers = List.reduce_left Zset.union (defnsBs |> List.concat |> List.choose (function PassBIncrClassCtorComplete ungeneralizableTypars -> Some ungeneralizableTypars | _ -> None))
-            (* The type variables on the type and associated with the constructor are generalizable in the members. *)
-            (* UnGen = freeInEnv(Ctor) + (freeInEnv(Members) - freeInEnv(ctorTyVars)) *)
-            
-            let freeInEnvForMembersMinusCtorVars = 
-                List.foldBack (fun defnBs acc -> 
-                    match defnBs with 
-                    | PassBIncrClassCtor (incrClassCtorLhs,thisVarRefCellBindOpt) :: otherDefnBs ->
-                        List.foldBack Zset.remove incrClassCtorLhs.incrClassInstanceCtorDeclaredTypars acc 
-                    | _ -> acc)
-                    defnsBs
-                    freeInEnvForMembers
-            let ungeneralizableTypars  = Zset.union freeInEnvBase freeInEnvForMembersMinusCtorVars
-            ungeneralizableTypars
-
-        // PassB3: fill in generalizedTypars now all equations/constraints are known 
-        if verboseCC then dprintf "---------- passB3: --------------------\n";    
-
-        let defnsBs = 
-            defnsBs |> List.map (fun defnBs -> 
-                defnBs |> List.map (fun defnB -> 
-                    match defnB with
-                      | PassBOpen _ | PassBIncrClassCtor  _ | PassBInherit _  | PassBIncrClassBindings _ | PassBIncrClassCtorComplete _ -> defnB
-                      | PassBMember (rbinfo ,tbind,ignoredSinceItIsComputedHere) ->
-                          let generalizedTypars = TcLetrecComputeGeneralizedTyparsForBinding cenv envInitial freeInEnv (rbinfo,tbind)
-                          if verboseCC then dprintf "PassB3: member generalizedTypars = %s\n" (showL (TyparsL generalizedTypars));
-                          PassBMember (rbinfo,tbind,generalizedTypars))) // <--- PATCHING: filling in generalizedTypars 
-
-        // Compute the entire set of generalized typars, including those on ctors 
-        let generalizedTyparsForRecursiveBlock =
-            defnsBs 
-            |> List.map (List.choose (function
-                               | PassBMember(_,_,generalizedTypars) -> Some generalizedTypars
-                               | PassBIncrClassCtor (incrClassCtorLhs,_) -> Some (incrClassCtorLhs.incrClassInstanceCtorDeclaredTypars)
-                               | _ -> None) 
-                    >> unionGeneralizedTypars)
-            |> unionGeneralizedTypars
-
-        if verboseCC then dprintf "PassB3: generalizedTyparsForRecursiveBlock = %s\n" (TyparsL generalizedTyparsForRecursiveBlock |> Layout.showL);
-
-        (* PassC: generalize - both ctor and members *)
-        if verboseCC then dprintf "---------- passC: --------------------\n";
-
-        let defnsCs,tpenv = 
-            (tpenv,defnsBs) ||> List.mapfold (fun tpenv defnBs -> 
-                (tpenv,defnBs) ||> List.mapfold (fun tpenv defnB -> 
-
-                    // PassC: Generalise implicit ctor val 
-                    match defnB with
-                    | PassBIncrClassCtor (incrClassCtorLhs,thisVarRefCellBindOpt) ->
-                        let valscheme = incrClassCtorLhs.incrClassInstanceCtorValScheme
-                        let valscheme = ChooseCanonicalValSchemeAfterInference cenv.g denv valscheme scopem
-                        AdjustRecType cenv incrClassCtorLhs.incrClassInstanceCtorVal valscheme;
-                        PassCIncrClassCtor (incrClassCtorLhs,thisVarRefCellBindOpt),tpenv
-
-                    | PassBInherit (inheritsExpr,basevOpt) -> 
-                        PassCInherit (inheritsExpr,basevOpt),tpenv
-
-                    | PassBIncrClassBindings bindRs             -> 
-                        PassCIncrClassBindings bindRs,tpenv
-
-                    | PassBIncrClassCtorComplete _ -> 
-                        PassCIncrClassCtorComplete, tpenv
-
-                    | PassBOpen(mp,m) -> 
-                        PassCOpen(mp,m), tpenv
-
-                    | PassBMember (rbinfo,tbind,generalizedTypars)  ->
-                        // PassC: Generalise member bindings 
-                        let vxbind = TcLetrecGeneralizeBinding cenv denv generalizedTyparsForRecursiveBlock freeInEnv generalizedTypars (rbinfo,tbind)
-                        let tpenv = HideUnscopedTypars generalizedTypars tpenv
-                        let vxbind = TcLetrecBindCtorThisVarRefCell cenv vxbind rbinfo
-                        let fixups,vxbind = FixupLetrecBind cenv envInitial.DisplayEnv vxbind
-                        PassCMember (fixups,vxbind),
-                        tpenv))
-                        
-        if verboseCC then dprintf "---------- make inherit expression --------------------\n";
-
-        // --- Extract local vals from let-bindings 
-        let fixupValueExprBinds,methodBinds =
-            defnsCs |> List.map (fun defnCs -> 
-                match defnCs with 
-
-                // Cover the case where this is not a class with an implicit constructor
-                | PassCIncrClassCtor (incrClassCtorLhs,thisVarRefCellBindOpt) :: defnCs -> 
-
-                    // This is the type definition we're processing  
-                    let tcref = incrClassCtorLhs.incrClassTcref
-
-                    // Assumes inhert call immediately follows implicit ctor. Checked by CheckMembersForm 
-                    let inheritsExpr,inheritsIsVisible,baseValOpt,defnCs = 
-                        match defnCs with
-                        | PassCInherit (inheritsExpr,baseValOpt) :: defnCs -> 
-                            inheritsExpr,true,baseValOpt,defnCs
-
-                        | defnCs ->
-                            if is_struct_tcref tcref then 
-                                mk_unit cenv.g tcref.Range, false,None, defnCs
-                            else
-                                let inheritsExpr,tpenv = TcNewExpr cenv envInitial tpenv cenv.g.obj_ty None true (Expr_const(Const_unit,tcref.Range)) tcref.Range
-                                inheritsExpr,false,None,defnCs
-                       
-                    let envForTycon = MkInnerEnvForTyconRef cenv envInitial tcref false
-
-                    // Compute the cpath used when creating the hidden fields 
-                    let cpath = curr_access_cpath envForTycon
-
-                    let localDecs  = defnCs |> List.filter (function PassCIncrClassBindings _ | PassCIncrClassCtorComplete -> true | _ -> false)
-                    let memberBindsWithFixups = defnCs |> List.choose (function PassCMember(fixups,vxbind) -> Some (fixups,vxbind) | _ -> None) 
-
-                    // Extend localDecs with "let ctorv = ref null" if there is a ctorv 
-                    let localDecs  = 
-                        match thisVarRefCellBindOpt with 
-                        | None -> localDecs 
-                        | Some bind -> PassCIncrClassBindings [IncrClassBindingGroup([bind],false,false)] :: localDecs
-                        
-                    // // Extend localDecs with "let arg = arg" bindings for each ctor arg, which is 
-                    // // current mechanism for storing them as fields when they are captured by something
-                    // // represented as a method
-                    // let localDecs  = 
-                    //    let binds = incrClassCtorLhs.incrClassInstanceCtorArgs |> List.map (fun v -> mk_invisible_bind v (expr_for_val v.Range v))
-                    //    let ctorArgBinds = IncrClassBindingGroup(binds,false,false)
-                    //    PassCIncrClassBindings [ctorArgBinds] :: localDecs
-
-                    // Carve out the initialization sequence and decide on the localRep 
-                    let ctorBodyLambdaExpr,cctorBodyLambdaExprOpt,methodBinds,localReps = 
-                        
-                        let localDecs = 
-                            localDecs |> List.collect (function PassCIncrClassBindings(binds) -> [PassCBindings binds]
-                                                                 | PassCIncrClassCtorComplete    -> [PassCCtorComplete]
-                                                                 | _ -> [])
-                        MakeCtorForIncrClassConstructionPassC(cenv,envForTycon,tpenv,incrClassCtorLhs,inheritsExpr,inheritsIsVisible,localDecs,List.map snd memberBindsWithFixups,generalizedTyparsForRecursiveBlock)
-
-                    // Generate the (value,expr) pairs for the implicit 
-                    // object constructor and implicit static initializer 
-                    let ctorValueExprBindings = 
-                        [ (let ctorValueExprBinding = TBind(incrClassCtorLhs.incrClassInstanceCtorVal,ctorBodyLambdaExpr,NoSequencePointAtStickyBinding)
-                           FixupLetrecBind cenv envInitial.DisplayEnv (incrClassCtorLhs.incrClassInstanceCtorValScheme ,ctorValueExprBinding)) ]
-                        @ 
-                        ( match cctorBodyLambdaExprOpt with 
-                          | None -> []
-                          | Some(cctorBodyLambdaExpr) -> 
-                             [ (let _,cctorVal, cctorValScheme = incrClassCtorLhs.incrClassStaticCtorValInfo.Force()
-                                let cctorValueExprBinding = TBind(cctorVal,cctorBodyLambdaExpr,NoSequencePointAtStickyBinding)
-                                FixupLetrecBind cenv envInitial.DisplayEnv (cctorValScheme,cctorValueExprBinding)) ] ) 
-
-                    // Publish the fields of the representation to the type 
-                    begin 
-                        if verboseCC then dprintf "add fields to tcref\n";
-                        localReps.PublishIncrClassFields cpath incrClassCtorLhs; (* mutation *)    
-                    end;
-                    
-                    (* --- Members *)
-                    // REVIEW: We should report information about the member to the name resolution sink
-                    
-                    if verboseCC then dprintf "---- fixup members\n";      
-                    let memberBindsWithFixups = 
-                        let applySubToVXBind (TBind(v,x,spBind)) =
-                            let m = v.Range
-                            // Work out the 'this' variable and type instantiation for field fixups. 
-                            // We use the instantiation from the instance member if any. Note: It is likely this is not strictly needed 
-                            // since we unify the types of the 'this' variables with those of the ctor declared typars. 
-                            let thisVarOpt = GetInstanceMemberThisVariable (v,x)
-                            // Members have at least as many type parameters as the
-                            // enclosing class. Just grab the type variables from the member
-                            let thisTyInst = List.map mk_typar_ty (List.take (tcref.Typars(m).Length) v.Typars)
-                                    
-                            let x = localReps.FixupIncrClassExprPassC thisVarOpt thisTyInst x 
-                            TBind(v,x,spBind)
-                        
-                        let memberBindsWithFixups = memberBindsWithFixups |> List.map (map2'2 applySubToVXBind) 
-                        memberBindsWithFixups
-                        
-                    ctorValueExprBindings @ memberBindsWithFixups, methodBinds  
-                
-                // Cover the case where this is not a class with an implicit constructor
-                | defnCs -> 
-                    let memberBindsWithFixups = defnCs |> List.choose (function PassCMember(fixups,vxbind) -> Some (fixups,vxbind) | _ -> None) 
-                    memberBindsWithFixups,[])
-            |> List.unzip
-        let fixupValueExprBinds = List.concat fixupValueExprBinds
-        let methodBinds = List.concat methodBinds 
-        if verboseCC then dprintf "---- init graphs\n";          
-        
-        // INITIALIZATION GRAPHS 
-        let binds = EliminateInitializationGraphs cenv.g true envInitial.DisplayEnv fixupValueExprBinds bindsm
-
-        let binds = binds @ methodBinds
-        
-        // Post letrec env 
-        let envbody = AddLocalValMap scopem prelimRecValues envInitial 
-        if verboseCC then dprintf "TcTyconBindings: done\n";
-        binds,envbody,tpenv
-
-end
-
-//-------------------------------------------------------------------------
-// The member portions of class defns
-//------------------------------------------------------------------------- 
-    
-let TcTyconMemberDefns cenv env parent bindsm scopem membersl = 
-    let interfacesFromTypeDefn (TyconMemberData(declKind,tcref,_,declaredTyconTypars,members,m,_)) =
-        let overridesOK  = DeclKind.CanOverrideOrImplement(declKind)
-        members |> List.collect (function 
-            | ClassMemberDefn_interface(ity,defnOpt,m) -> 
-                  if tcref.IsTypeAbbrev then error(Error("Type abbreviations may not have interface declarations",m));
-                  if is_enum_tcref tcref then error(Error("Enumerations may not have interface declarations",m));
-
-                  begin match defnOpt with 
-                  | Some(defn) -> 
-                      let tcaug = tcref.TypeContents
-                      let ity' = 
-                          let envinner = AddDeclaredTypars CheckForDuplicateTypars declaredTyconTypars env
-                          TcTypeAndRecover cenv NoNewTypars CheckCxs envinner emptyTyparEnv ity |> fst
-                      if not (is_interface_typ cenv.g ity') then errorR(Error("This type is not an interface type",range_of_syntype ity));
-                      
-                      if not (tcaug_has_interface cenv.g tcaug ity') then 
-                          error(Error("All implemented interfaces should be declared on the initial declaration of the type",range_of_syntype ity));
-                      if (type_equiv cenv.g ity' cenv.g.mk_IComparable_ty && isSome(tcaug.tcaug_compare)) || 
-                          (type_equiv cenv.g ity' cenv.g.mk_IStructuralComparable_ty && isSome(tcaug.tcaug_compare_withc)) ||
-                          (type_equiv cenv.g ity' cenv.g.mk_IStructuralEquatable_ty && isSome(tcaug.tcaug_hash_and_equals_withc)) then
-                          errorR(Error("A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type",range_of_syntype ity));
-                      if overridesOK = WarnOnOverrides then  
-                          warning(IntfImplInIntrinsicAugmentation(range_of_syntype ity));
-                      if overridesOK = ErrorOnOverrides then  
-                          errorR(IntfImplInExtrinsicAugmentation(range_of_syntype ity));
-                      [ (ity',defn,m) ]
-                  | _-> []
-                  end
-                  
-            | _ -> []) 
-
-    let interfaceMembersFromTypeDefn (TyconMemberData(declKind,tcref,baseValOpt,declaredTyconTypars,_,m,newslotsOK)) (ity',defn,m) implTySet =
-        let tcaug = tcref.TypeContents
-        let containerInfo = ContainerInfo(parent,Some(tcref,Some(ity',implTySet),baseValOpt,declaredTyconTypars))
-        defn  |> List.choose (fun mem ->
-                match mem with
-                | ClassMemberDefn_member_binding(b,m) -> 
-                    Some(TyconBindingDefn(containerInfo,newslotsOK,declKind,mem,m))
-                | ClassMemberDefn_let_bindings(_,_,_,m)    (* <-- possible design suggestion: relax this *)
-                | ClassMemberDefn_implicit_ctor(_,_,_,_,m)
-                | ClassMemberDefn_implicit_inherit(_,_,_,m)
-                | ClassMemberDefn_interface(_,_,m) 
-                | ClassMemberDefn_slotsig(_,_,m)
-                | ClassMemberDefn_inherit(_,_,m)
-                | ClassMemberDefn_field(_,m)
-                | ClassMemberDefn_open (_,m)
-                | ClassMemberDefn_tycon(_,_,m) -> errorR(Error("This member is not permitted in an interface implementation",m)); None)
-
-    let tpenv = emptyTyparEnv
-    if verboseCC then dprintf "TcTyconMemberDefns:\n";
-    if verboseCC then membersl |> List.iter (fun (TyconMemberData(declKind,tcref,baseValOpt,declaredTyconTypars,members,m,newslotsOK)) -> dprintf "members: %d\n" (List.length members));
-    try
-      (* Some preliminary checks *)
-      membersl |> List.iter (fun (TyconMemberData(declKind,tcref,baseValOpt,declaredTyconTypars,members,m,newslotsOK)) -> 
-             let tcaug = tcref.TypeContents
-             if tcaug.tcaug_closed && declKind <> ExtrinsicExtensionBinding then 
-               error(InternalError("Intrinsic augmentations of types are only permitted in the same file as the definition of the type",m));
-             members |> List.iter (function 
-                    | ClassMemberDefn_member_binding _ -> ()
-                    | ClassMemberDefn_interface _ -> () 
-                    | ClassMemberDefn_open _ 
-                    | ClassMemberDefn_let_bindings _  (* accept local definitions *)
-                    | ClassMemberDefn_implicit_ctor _ (* accept implicit ctor pattern, should be first! *)
-                    | ClassMemberDefn_implicit_inherit _ when newslotsOK = NewSlotsOK -> () (* accept implicit ctor pattern, should be first! *)
-                    (* The follow should have been removed by splitting, they belong to "core" (they are "shape" of type, not implementation) *)
-                    | ClassMemberDefn_open (_,m) 
-                    | ClassMemberDefn_let_bindings(_,_,_,m) 
-                    | ClassMemberDefn_implicit_ctor(_,_,_,_,m)
-                    | ClassMemberDefn_implicit_inherit(_,_,_,m) 
-                    | ClassMemberDefn_slotsig(_,_,m)
-                    | ClassMemberDefn_inherit(_,_,m)
-                    | ClassMemberDefn_field(_,m)
-                    | ClassMemberDefn_tycon(_,_,m) -> error(Error("This declaration element is not permitted in an augmentation",m))));
-
-      let tyconBindingsOfTypeDefn (TyconMemberData(declKind,tcref,baseValOpt,declaredTyconTypars,members,m,newslotsOK)) =
-          let containerInfo = ContainerInfo(parent,Some(tcref,None,baseValOpt,declaredTyconTypars))
-          members 
-          |> List.choose (fun memb ->
-              match memb with 
-              | ClassMemberDefn_implicit_ctor(_,_,_,_,m)
-              | ClassMemberDefn_implicit_inherit(_,_,_,m) 
-              | ClassMemberDefn_let_bindings(_,_,_,m) 
-              | ClassMemberDefn_member_binding(_,m) 
-              | ClassMemberDefn_open (_,m) 
-                  -> Some(TyconBindingDefn(containerInfo,newslotsOK,declKind,memb,m))
-
-              (* Interfaces exist in the member list - handled above in interfaceMembersFromTypeDefn *)
-              | ClassMemberDefn_interface _  -> None
-
-              (* The following should have been List.unzip out already in SplitTyconDefn *)
-              | ClassMemberDefn_slotsig (_,_,m) 
-              | ClassMemberDefn_field (_,m)             
-              | ClassMemberDefn_inherit (_,_,m)    -> error(InternalError("Unexpected declaration element",m))
-              | ClassMemberDefn_tycon (_,_,m)      -> error(Error("Types may not contain nested type definitions",m)))
-          
-      let binds  = 
-          membersl |> List.map (fun (TyconMemberData(_,tcref,_,_,_,_,_) as tyconMemberData) -> 
-              let obinds = tyconBindingsOfTypeDefn tyconMemberData
-              let ibinds  = 
-                      let intfTypes = interfacesFromTypeDefn tyconMemberData
-                      let slotImplSets = DispatchSlotChecking.GetSlotImplSets cenv.infoReader env.DisplayEnv false (List.map (fun (ity,_,m) -> (ity,m)) intfTypes)
-                      List.concat (List.map2 (interfaceMembersFromTypeDefn tyconMemberData) intfTypes slotImplSets)
-              if verboseCC then dprintf "obinds: %d\n" (List.length obinds);
-              if verboseCC then dprintf "ibinds: %d\n" (List.length ibinds);
-              TyconBindingDefns(tcref, obinds @ ibinds))
-      
-      let results = TyconBindingChecking.TcTyconBindings cenv env tpenv bindsm scopem binds
-      let binds,envbody,tpenv = results
-      binds,envbody
-
-    with e -> errorRecovery e scopem; [], env
-
-//-------------------------------------------------------------------------
-// Bind exception definitions
-//------------------------------------------------------------------------- 
-
-let tcaug_has_nominal_interface g tcaug tcref =
-    tcaug.tcaug_implements |> List.exists (fun (x,_,_) -> 
-        is_stripped_tyapp_typ g x && tcref_eq g (tcref_of_stripped_typ g x) tcref)
-
-let AddGenericCompareDeclarations cenv (env:tcEnv) (tycon:Tycon) =
-    if Augment.TyconIsAugmentedWithCompare cenv.g tycon then 
-        let tcref = mk_local_tcref tycon
-        let tcaug = tycon.TypeContents
-        let m = tycon.Range
-        let ty = if tycon.IsExceptionDecl then [], cenv.g.exn_ty else generalize_tcref tcref
-        //let genericIComparableTy = mk_tyapp_ty cenv.g.system_GenericIComparable_tcref [ty]
-
-        let hasExplicitIComparable = tcaug_has_interface cenv.g tcaug cenv.g.mk_IComparable_ty 
-        let hasExplicitGenericIComparable = tcaug_has_nominal_interface cenv.g tcaug cenv.g.system_GenericIComparable_tcref    
-        let hasExplicitIStructuralComparable = tcaug_has_interface cenv.g tcaug cenv.g.mk_IStructuralComparable_ty
-
-        if hasExplicitIComparable then 
-            errorR(Error("The struct, record or union type '"^tycon.DisplayName^"' implements the interface 'System.IComparable' explicitly. You must apply the '[]' attribute to the type",m)); 
-  
-        elif hasExplicitGenericIComparable then 
-            errorR(Error("The struct, record or union type '"^tycon.DisplayName^"' implements the interface 'System.IComparable<_>' explicitly. You must apply the '[]' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable",m)); 
-        elif hasExplicitIStructuralComparable then
-            errorR(Error("The struct, record or union type '"^tycon.DisplayName^"' implements the interface 'System.IStructuralComparable' explicitly. Apply the '[]' attribute to the type",m)); 
-        else
-            //let hasExplicitGenericIComparable = tcaug_has_interface cenv.g tcaug genericIComparableTy
-            let cvspec1,cvspec2 = Augment.MakeValsForCompareAugmentation cenv.g tcref
-            let cvspec3 = Augment.MakeValsForCompareWithComparerAugmentation cenv.g tcref
-
-            PublishInterface cenv env.DisplayEnv tcref m true cenv.g.mk_IStructuralComparable_ty;
-            PublishInterface cenv env.DisplayEnv tcref m true cenv.g.mk_IComparable_ty;
-            //if not tycon.IsExceptionDecl && not hasExplicitGenericIComparable then 
-            //    PublishInterface cenv env.DisplayEnv tcref m true genericIComparableTy;
-            set_tcaug_compare tcaug (mk_local_vref cvspec1, mk_local_vref cvspec2);
-            set_tcaug_compare_withc tcaug (mk_local_vref cvspec3);
-            PublishValueDefn cenv env ModuleOrMemberBinding cvspec1
-            PublishValueDefn cenv env ModuleOrMemberBinding cvspec2
-            PublishValueDefn cenv env ModuleOrMemberBinding cvspec3
-
-           
-        
-
-let AddGenericEqualityWithComparerDeclarations cenv (env:tcEnv) (tycon:Tycon) =
-    if Augment.TyconIsAugmentedWithEquals cenv.g tycon then 
-        let tcref = mk_local_tcref tycon
-        let tcaug = tycon.TypeContents
-        let m = tycon.Range
-
-        let hasExplicitIStructuralEquatable = tcaug_has_interface cenv.g tcaug cenv.g.mk_IStructuralEquatable_ty
-        let hasExplicitGenericIEquatable = tcaug_has_nominal_interface cenv.g tcaug cenv.g.system_GenericIEquatable_tcref
-
-        // This type gets defined in prim-types, before we can add attributes to F# type definitions
-        let isUnit = cenv.g.compilingFslib && tycon.DisplayName = "Unit"
-        
-        if hasExplicitIStructuralEquatable then
-            errorR(Error("The struct, record or union type '"^tycon.DisplayName^"' implements the interface 'System.IStructuralEquatable' explicitly. Apply the '[]' attribute to the type",m)); 
-        elif hasExplicitGenericIEquatable then 
-            errorR(Error("The struct, record or union type '"^tycon.DisplayName^"' implements the interface 'System.IEquatable<_>' explicitly. You must apply the '[]' attribute to the type, and should also provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'",m)); 
-        else
-            let evspec1,evspec2 = Augment.MakeValsForEqualityWithComparerAugmentation cenv.g tcref
-            PublishInterface cenv env.DisplayEnv tcref m true cenv.g.mk_IStructuralEquatable_ty;
-            set_tcaug_hash_and_equals_withc tcaug (mk_local_vref evspec1, mk_local_vref evspec2)
-            PublishValueDefn cenv env ModuleOrMemberBinding evspec1
-            PublishValueDefn cenv env ModuleOrMemberBinding evspec2
-
-            
-let AddGenericCompareBindings cenv (env:tcEnv) (tycon:Tycon) =
-    if Augment.TyconIsAugmentedWithCompare cenv.g tycon && isSome tycon.TypeContents.tcaug_compare then 
-        Augment.MakeBindingsForCompareAugmentation cenv.g tycon
-    else
-        []
-        
-let AddGenericCompareWithComparerBindings cenv (env:tcEnv) (tycon:Tycon) =
-    if Augment.TyconIsAugmentedWithCompare cenv.g tycon && isSome tycon.TypeContents.tcaug_compare_withc  then
-         (Augment.MakeBindingsForCompareWithComparerAugmentation cenv.g tycon)
-     else
-        []
-         
-let AddGenericEqualityWithComparerBindings cenv (env:tcEnv) (tycon:Tycon) =
-    if Augment.TyconIsAugmentedWithEquals cenv.g tycon  && isSome tycon.TypeContents.tcaug_hash_and_equals_withc then
-        (Augment.MakeBindingsForEqualityWithComparerAugmentation cenv.g tycon)
-    else
-        []
-
-let AddGenericHashAndComparisonDeclarations cenv env tycon =
-    AddGenericCompareDeclarations cenv env tycon
-    AddGenericEqualityWithComparerDeclarations cenv env tycon
-
-
-let AddGenericHashAndComparisonBindings cenv env tycon =
-    AddGenericCompareBindings cenv env tycon @ AddGenericCompareWithComparerBindings cenv env tycon @ AddGenericEqualityWithComparerBindings cenv env tycon
-
-
-// We can only add the Equals override after we've done the augmentation becuase we have to wait until tcaug_has_override can give correct results 
-let AddGenericEqualityBindings cenv env tycon =
-    if Augment.TyconIsAugmentedWithEquals cenv.g tycon then 
-        let tcref = mk_local_tcref tycon
-        let tcaug = tycon.TypeContents
-        // Note: tcaug_has_override only gives correct results after we've done the type augmentation 
-        let hasExplicitObjectEqualsOverride = tcaug_has_override cenv.g tcaug "Equals" [cenv.g.obj_ty]
-
-        // Note: only provide the equals method if IComparable not implemented explicitly 
-        // Prior to F# 1.9.3.14 you only had to implement 'System.IComparable' to customize structural comparison AND equality on F# types 
-        // Post 1.9.3.14 this is insufficient: you must override Equals as well. For compat we currently 
-        // give a warning in this situation (see ilxgen.ml) and use the IComparable implementation instead 
-        if not (Augment.TyconIsAugmentedWithCompare cenv.g tycon  && isNone tcaug.tcaug_compare) &&
-           not hasExplicitObjectEqualsOverride then 
-
-             let vspec1,vspec2 = Augment.MakeValsForEqualsAugmentation cenv.g tcref
-             set_tcaug_equals tcaug (mk_local_vref vspec1, mk_local_vref vspec2);
-             PublishValueDefn cenv env ModuleOrMemberBinding vspec1;
-             PublishValueDefn cenv env ModuleOrMemberBinding vspec2;
-             Augment.MakeBindingsForEqualsAugmentation cenv.g tycon
-        else []
-    else []
-
-//-------------------------------------------------------------------------
-// Bind exception definitions
-//------------------------------------------------------------------------- 
-
-let CheckForDuplicateConcreteType cenv env nm m  = 
-    let curr = GetCurrAccumulatedModuleOrNamespaceType env
-    if Map.mem nm curr.AllEntities then 
-        (* Use 'error' instead of 'errorR' here to avoid cascading errors - see bug 1177 in FSharp 1.0 *)
-        error (Duplicate("type, exception or module",nm,m))
-
-let CheckForDuplicateModule cenv env nm m  = 
-    let curr = GetCurrAccumulatedModuleOrNamespaceType env
-    if curr.ModulesAndNamespacesByDemangledName.ContainsKey(nm) then 
-        errorR (Duplicate("type or module",nm,m))
-
-let TcExnDefnCore cenv env parent tpenv (ExconCore(attrs,UnionCase(_,id,args,_,_,_),repr,doc,vis,m), scopem) =
-    let attrs' = TcAttributes cenv env attrTgtExnDecl attrs
-    let args = match args with (UnionCaseFields args) -> args | _ -> error(Error("Explicit type specifications may not be used for exception constructors",m))
-    let ad = AccessRightsOfEnv env
-    
-    let args' = List.mapi (fun i fdef -> TcAnonFieldDecl cenv env parent tpenv ("Data"^string i) fdef) args
-    if not (String.isUpper id.idText) then errorR(NotUpperCaseConstructor(m));
-    let vis,cpath = ComputeAccessAndCompPath env None m vis parent
-    let vis = CombineReprAccess parent vis
-    let exnc = 
-      match repr with 
-      | Some lid ->
-          (* REVIEW: permit type arguments in this lid. *)
-          begin match ResolveExprLongIdent cenv.nameResolver m ad env.eNameResEnv DefaultTypeNameResInfo lid with
-          | Item_ecref exnc, [] -> 
-              CheckTyconAccessible m (AccessRightsOfEnv env) exnc |> ignore;
-              if List.length args' <> 0 then 
-                errorR (Error("Exception abbreviations should not have argument lists",m));
-              NewExn cpath id vis (TExnAbbrevRepr exnc) attrs' (doc.ToXmlDoc())
-          | Item_ctor_group(_,meths) , [] -> 
-              (* REVIEW: check this really is an exception type *)
-              match args' with 
-              | [] -> ()
-              | _ -> error (Error("Abbreviations for .NET exceptions may not take arguments",m));
-              let candidates = 
-                  meths |> List.filter (fun minfo -> 
-                      minfo.NumArgs = [args'.Length] &&
-                      (* & (List.length args' <> 1 or  typ_of_param (List.hd md.mdParams) = Il.typ_String) *) 
-                      minfo.GenericArity = 0) 
-              match candidates with 
-              | [minfo] -> 
-                  let err() = 
-                      Error("Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception",m)
-                  if not (type_definitely_subsumes_type_no_coercion 0 cenv.g cenv.amap m cenv.g.exn_ty minfo.EnclosingType) then 
-                    errorR(err());
-                  let tref = 
-                      match minfo with 
-                      | ILMeth(_,minfo) -> minfo.ILTypeRef
-                      | FSMeth _ -> 
-                          match (tcref_of_stripped_typ cenv.g minfo.EnclosingType).CompiledRepresentation with 
-                          | TyrepNamed (tref,_) -> tref
-                          | _ -> 
-                              error (err()) 
-                      | _ -> error (err()) 
-                  NewExn  cpath id vis (TExnAsmRepr tref) attrs' (doc.ToXmlDoc())
-              | _ -> 
-                  error (Error("Abbreviations for .NET exception types must have a matching object constructor",m))
-          | _ ->
-              error (Error("not an exception",m))
-          end
-      | None -> 
-         NewExn cpath id vis (TExnFresh (MakeRecdFieldsTable args')) attrs' (doc.ToXmlDoc())
-
-    let tcaug = exnc.TypeContents
-    tcaug.tcaug_super <- Some cenv.g.exn_ty;
-
-    CheckForDuplicateConcreteType cenv env (id.idText ^ "Exception") id.idRange;
-    CheckForDuplicateConcreteType cenv env id.idText id.idRange;
-    PublishTypeDefn cenv env exnc;
-    (* let env = AddLocalExnDefn scopem exnc (AddLocalTycons g amap scopem [exnc] env) in  *)
-    (* Augment the exception constructor with comparison and hash methods if needed *)
-    AddGenericHashAndComparisonDeclarations cenv env exnc
-    let binds = 
-      match exnc.ExceptionInfo with 
-      | TExnAbbrevRepr _ | TExnNone | TExnAsmRepr _ -> []
-      | TExnFresh _ -> AddGenericHashAndComparisonBindings cenv env exnc
-    binds,
-    exnc,
-    AddLocalExnDefn scopem exnc (AddLocalTycons cenv.g cenv.amap scopem [exnc] env)
-
-let TcExnDefn cenv env parent tpenv (ExconDefn(core,aug,m),scopem) = 
-    let binds1,exnc,env = TcExnDefnCore cenv env parent tpenv (core,scopem)
-    let binds2,env = TcTyconMemberDefns cenv env parent m scopem [TyconMemberData(ModuleOrMemberBinding ,(mk_local_ecref exnc),None,[],aug,m,NoNewSlots)]
-    (* Augment types with references to values that implement the pre-baked semantics of the type *)
-    let binds3 = AddGenericEqualityBindings cenv env exnc
-    binds1 @ binds2 @ binds3,exnc,env
-
-let TcExnSignature cenv env parent tpenv (ExconSpfn(core,aug,m),scopem) = 
-    let binds,exnc,env = TcExnDefnCore cenv env parent tpenv (core,scopem)
-    let ecref = mk_local_ecref exnc
-    let vals,_ = TcTyconMemberSpecs NoNewSlots cenv env (ContainerInfo(parent,Some(ecref,None,None,[]))) ModuleOrMemberBinding ecref tpenv aug
-    binds,vals,ecref,env
-
-
-let ComputeIsModule kind parms constraints im = 
-    if nonNil parms || nonNil constraints then 
-        error(Error("Unexpected constraints or parameters on module specification",im))
-    match kind with 
-     | TMK_Module -> true 
-     | TMK_Namespace -> false 
-     | TMK_Tycon -> error(Error("Unexpected constraint or type definition",im))
-
-let ComputeModuleName (longPath: ident list) = 
-    if longPath.Length <> 1 then error(Error("invalid module name",(List.hd longPath).idRange));
-    List.hd longPath 
-
-///-------------------------------------------------------------------------
-/// Bind type definitions
-///
-/// We first establish the cores of a set of type definitions (i.e. everything
-/// about the type definitions that doesn't involve values or expressions)
-///
-/// This is a non-trivial multi-phase algorithm. The technique used
-/// is to gradually "fill in" the fields of the type constructors. 
-///
-/// This use of mutation is very problematic. This has many dangers, 
-/// since the process of filling in the fields
-/// involves creating, traversing and analyzing types that may recursively
-/// refer to the types being defined. However a functional version of this
-/// would need to re-implement certain type relations to work over a 
-/// partial representation of types.
-///------------------------------------------------------------------------- 
-module EstablishTypeDefinitionCores = begin
- 
-    let private ComputeTyconName (longPath: ident list) doErase (typars:Typar list) = 
-        if longPath.Length <> 1 then error(Error("invalid type extension",longPath.Head.idRange));
-        let id = List.hd longPath
-        let erasedArity = 
-            if doErase then 
-                List.foldBack (fun (tp:Typar) n -> if tp.IsErased then n else n+1) typars 0 
-            else typars.Length
-        mksyn_id id.idRange (if erasedArity = 0 then id.idText else id.idText ^ "`" ^string erasedArity)
- 
-    let private GetTyconAttribs g attrs = 
-        let hasClassAttr         = HasAttrib g g.attrib_ClassAttribute attrs
-        let hasAbstractClassAttr = HasAttrib g g.attrib_AbstractClassAttribute attrs
-        let hasInterfaceAttr     = HasAttrib g g.attrib_InterfaceAttribute attrs
-        let hasStructAttr        = HasAttrib g g.attrib_StructAttribute attrs
-        let hasMeasureAttr       = HasAttrib g g.attrib_MeasureAttribute attrs
-        (hasClassAttr,hasAbstractClassAttr,hasInterfaceAttr,hasStructAttr,hasMeasureAttr)
-
-    //-------------------------------------------------------------------------
-    // Type kind inference 
-    //------------------------------------------------------------------------- 
-       
-    let private InferTyconKind g (kind,attrs',slotsigs,fields,inSig ,isConcrete,m) =
-        let (hasClassAttr,hasAbstractClassAttr,hasInterfaceAttr,hasStructAttr,hasMeasureAttr) = GetTyconAttribs g attrs'
-        let bi b = (if b then 1 else 0)
-        if (bi hasClassAttr + bi hasInterfaceAttr + bi hasStructAttr + bi hasMeasureAttr) > 1 ||
-           (bi hasAbstractClassAttr + bi hasInterfaceAttr + bi hasStructAttr + bi hasMeasureAttr) > 1 then
-           error(Error("The attributes of this type specify multiple kinds for the type",m));
-        
-        match kind with 
-        | TyconUnspecified ->
-            if hasClassAttr || hasAbstractClassAttr || hasMeasureAttr then TyconClass        
-            elif hasInterfaceAttr then TyconInterface
-            elif hasStructAttr then TyconStruct
-            elif isConcrete or nonNil(fields) (* or isNil(slotsigs) *)  then TyconClass
-            elif isNil(slotsigs) && inSig  then TyconHiddenRepr
-            else TyconInterface
-        | k -> 
-            if hasClassAttr && (k <> TyconClass) || 
-               hasMeasureAttr && (k <> TyconClass && k <> TyconAbbrev && k <> TyconHiddenRepr) || 
-               hasInterfaceAttr && (k <> TyconInterface) || 
-               hasStructAttr && (k <> TyconStruct) then 
-                error(Error("The kind of the type specified by its attributes does not match the kind implied by its definition",m));
-            k
-
-
-    // Establish 'type  C < T1... TN >  =  ...' including 
-    //    - computing the mangled name for C
-    // but 
-    //    - we don't yet 'properly' establish constraints on type parameters
-    let private TcTyconDefnCore_Phase0_BuildInitialTycon cenv env parent (synTyconInfo,synTyconRepr,_) = 
-        let (ComponentInfo(attrs,kind,typars, cs,id,doc,preferPostfix, vis,_)) = synTyconInfo
-        let typars' = TcTyparDecls cenv env typars
-        id |> List.iter CheckNamespaceModuleOrTypeName;
-        let id = ComputeTyconName id (match synTyconRepr with TyconCore_abbrev _ -> false | _ -> true) typars'
-
-        // Augmentations of type definitions are allowed within the same file as long as no new type representation or abbreviation is given 
-        CheckForDuplicateConcreteType cenv env id.idText id.idRange;
-        CheckForDuplicateModule cenv env id.idText id.idRange;
-        let vis,cpath = ComputeAccessAndCompPath env None id.idRange vis parent
-
-        // Establish the visibility of the representation, e.g.
-        //   type R = 
-        //      private { f:int }
-        //      member x.P = x.f + x.f
-        let visOfRepr = 
-            match synTyconRepr with 
-            | TyconCore_no_repr _ -> None
-            | TyconCore_abbrev _ -> None
-            | TyconCore_union (vis,_,_) -> vis
-            | TyconCore_asm _ -> None
-            | TyconCore_recd (vis,_,_) -> vis
-            | TyconCore_general _ -> None
-            | TyconCore_enum _ -> None
-         
-        let visOfRepr,_ = ComputeAccessAndCompPath env None id.idRange visOfRepr parent
-        let visOfRepr = combineAccess vis visOfRepr 
-        // REVIEW: nested values, types and modules 
-        let lmtyp = notlazy (empty_mtype FSharpModule)
-        NewTycon cpath (id.idText,id.idRange) vis visOfRepr KindType (LazyWithContext.NotLazy typars') (doc.ToXmlDoc()) preferPostfix lmtyp
-
-
-    //-------------------------------------------------------------------------
-    /// Establishing type definitions: early phase: work out the basic kind of the type definition
-    ///
-    ///    On entry: the Tycon for the type definition has been created but many of its fields are not
-    ///              yet filled in.
-    ///    On exit: the entity_tycon_repr field of the tycon has been filled in with a dummy value that
-    ///             indicates the kind of the type constructor
-    /// Also, some adhoc checks are made.
-    ///
-    ///  synTyconInfo: Syntactic AST for the name, attributes etc. of the type constructor
-    ///  synTyconRepr: Syntactic AST for the RHS of the type definition
-    let private TcTyconDefnCore_Phase1_EstablishBasicKind cenv inSig envinner (synTyconInfo,synTyconRepr,_) (tycon:Tycon) = 
-        let (ComponentInfo(attrs,_,typars, cs,id, _, _,_,_)) = synTyconInfo
-        let m = tycon.Range
-        let id = tycon.Id
-        // 'Check' the attributes. We end up discarding the results from this 
-        // particular check since we re-check them in all other phases. 
-        let attrs' = TcAttributes cenv envinner attrTgtTyconDecl attrs
-        let hasMeasureAttr = HasAttrib cenv.g cenv.g.attrib_MeasureAttribute attrs'
-        let hasMeasureableAttr = HasAttrib cenv.g cenv.g.attrib_MeasureableAttribute attrs'
-
-        if hasMeasureAttr then 
-            tycon.Data.entity_kind <- KindMeasure;
-            if nonNil typars then error(Error("Measure definitions may not have type parameters",m));
-
-        let repr = 
-            match synTyconRepr with 
-            | TyconCore_no_repr m -> 
-                // Run InferTyconKind to raise errors on inconsistent attribute sets
-                InferTyconKind cenv.g (TyconHiddenRepr,attrs',[],[],inSig,true,m)  |> ignore
-                if not inSig && not hasMeasureAttr then 
-                    errorR(Error("This type requires a definition",m));
-                if hasMeasureAttr
-                then Some(TFsObjModelRepr { fsobjmodel_kind=TTyconClass; 
-                                            fsobjmodel_vslots=[];
-                                            fsobjmodel_rfields=MakeRecdFieldsTable [] })
-                else None
-
-            | TyconCore_abbrev(eq,_) -> 
-                // Run InferTyconKind to raise errors on inconsistent attribute sets
-                InferTyconKind cenv.g (TyconAbbrev,attrs',[],[],inSig,true,m) |> ignore
-                None
-
-            | TyconCore_union (_,_,m) -> 
-                // Run InferTyconKind to raise errors on inconsistent attribute sets
-                InferTyconKind cenv.g (TyconUnion,attrs',[],[],inSig,true,m) |> ignore
-                // Note: the table of union cases is initially empty
-                Some (MakeUnionRepr [])
-
-            | TyconCore_asm (s,m) -> 
-                // Run InferTyconKind to raise errors on inconsistent attribute sets
-                InferTyconKind cenv.g (TyconILAssemblyCode,attrs',[],[],inSig,true,m) |> ignore
-                Some (TAsmRepr s)
-
-            | TyconCore_recd (_,_,m) -> 
-                // Run InferTyconKind to raise errors on inconsistent attribute sets
-                InferTyconKind cenv.g (TyconRecord,attrs',[],[],inSig,true,m) |> ignore
-                // Note: the table of record fields is initially empty
-                Some (TRecdRepr (MakeRecdFieldsTable  []) )
-
-            | TyconCore_general (kind,inherits,slotsigs,fields,isConcrete,isIncrClass,_) ->
-                let kind = InferTyconKind cenv.g (kind,attrs',slotsigs,fields,inSig,isConcrete,m)
-                match kind with 
-                | TyconHiddenRepr -> 
-                    None
-                | _ -> 
-                    let kind = 
-                        match kind with
-                        | TyconClass               -> TTyconClass
-                        | TyconInterface           -> TTyconInterface
-                        | TyconDelegate (ty,arity) -> TTyconDelegate (mk_slotsig("Invoke",cenv.g.unit_ty,[],[],[], None))
-                        | TyconStruct              -> TTyconStruct 
-                        | _ -> error(InternalError("should have inferred tycon kind",m))
-                    let repr = { fsobjmodel_kind=kind; 
-                                 fsobjmodel_vslots=[];
-                                 fsobjmodel_rfields=MakeRecdFieldsTable [] }
-                    Some(TFsObjModelRepr repr)
-
-            | TyconCore_enum (decls,m) -> 
-                let kind = TTyconEnum
-                let repr = { fsobjmodel_kind=kind; 
-                             fsobjmodel_vslots=[];
-                             fsobjmodel_rfields=MakeRecdFieldsTable [] }
-                Some(TFsObjModelRepr repr)
-
-        // OK, now fill in the (partially computed) type representation
-        tycon.Data.entity_tycon_repr <- repr
-
-    /// Establish any type abbreviations
-    ///
-    /// e.g. for  
-    ///    type B<'a when 'a :  C> = DDD of C
-    ///    and  C = B
-    ///
-    /// we establish
-    ///
-    ///   Entity('B) 
-    ///       TypeAbbrev = TType_app(Entity('int'),[])
-    ///
-    /// and for
-    ///
-    ///    type C = B
-    ///
-    /// we establish
-    ///       TypeAbbrev = TType_app(Entity('B'),[])
-    ///
-    /// Note that for 
-    ///              type PairOfInts = int * int
-    /// then after running this phase and checking for cycles, operations 
-    // such as 'is_tuple_typ' will return reliable results, e.g. is_tuple_typ on the 
-    /// TAST type for 'PairOfInts' will report 'true' 
-    //
-    let private TcTyconDefnCore_Phase2_Phase4_EstablishAbbreviations cenv envinner tpenv inSig pass (tinfo,synTyconRepr,_) (tycon:Tycon ) =
-        let m = tycon.Range
-        let checkCxs = if (pass = SecondPass) then CheckCxs else NoCheckCxs
-        let firstPass = (pass = FirstPass)
-        try 
-            let (ComponentInfo(attrs,compKind,typars, cs,id, _, _,_,_)) = tinfo
-            let id = tycon.Id
-            let thisTyconRef = mk_local_tcref tycon
-            let attrs' = TcAttributes cenv envinner attrTgtTyconDecl attrs
-
-            let hasMeasureAttr = HasAttrib cenv.g cenv.g.attrib_MeasureAttribute attrs'
-            let hasMeasureableAttr = HasAttrib cenv.g cenv.g.attrib_MeasureableAttribute attrs'
-
-            let envinner = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) envinner
-            let envinner = MkInnerEnvForTyconRef cenv envinner thisTyconRef false
-
-            match synTyconRepr with 
-
-            // This unfortunate case deals with "type x = A" 
-            // In F# this only defines a new type if A is not in scope 
-            // as a type constructor, or if the form type A = A is used. 
-            // "type x = | A" can always be used instead. 
-            | TyconCore_abbrev(Type_lid([tcn],_),_) 
-                          when 
-                            (not hasMeasureAttr && 
-                             (isNil (LookupTypeNameInEnvNoArity tcn.idText envinner.eNameResEnv) || 
-                              id.idText = tcn.idText)) -> ()
-            
-            | TyconCore_abbrev(eq,_) ->
-                /// This case deals with the "Measurable" attribute, which does not introduce a true abbreviation
-                if not hasMeasureableAttr then 
-                    let kind = if hasMeasureAttr then KindMeasure else KindType
-                    let ty,_ = TcTypeOrMeasureAndRecover (Some kind) cenv NoNewTypars checkCxs envinner tpenv eq
-
-                    if not firstPass then 
-                        let ftyvs = free_in_type_lr cenv.g false ty 
-                        let typars = tycon.Typars(m)
-                        if ftyvs.Length <> typars.Length then 
-                            warning(Deprecated("This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'",tycon.Range))
-                        //elif not ((ftyvs,typars) ||> List.for_all2 typar_ref_eq) then 
-                        //    warning(Deprecated("The declared type parameters of this type abbreviation are not declared in the same order they are used in the type being abbreviated. Consider reordering the type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a,'b> = C of ...'",tycon.Range))
-
-                    if firstPass then
-                        tycon.Data.entity_tycon_abbrev <- Some ty
-
-            | _ -> ()
-        
-        with e -> 
-            errorRecovery e m
-
-    // Third phase: check and publish the supr types. Run twice, once before constraints are established
-    // and once after
-    let private TcTyconDefnCore_Phase3_Phase5_EstablishSuperTypesAndInterfaceTypes cenv envinner tpenv inSig tdefs (tycons:Tycon list) pass = 
-        let checkCxs = if (pass = SecondPass) then CheckCxs else NoCheckCxs
-        let firstPass = (pass = FirstPass)
-
-        // Publish the immediately declared interfaces. 
-        let implementsL = 
-            (tdefs,tycons) ||> List.map2 (fun (synTyconInfo,synTyconRepr,explicitImplements) tycon -> 
-                let (ComponentInfo(attrs,_,_, cs,id, _, _,_,_)) = synTyconInfo
-                let m = tycon.Range
-                let tcref = mk_local_tcref tycon
-                let envinner = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) envinner
-                let envinner = MkInnerEnvForTyconRef cenv envinner tcref false
-                
-                let implementedTys,_ = List.mapfold (map_acc_fst (TcTypeAndRecover cenv NoNewTypars checkCxs envinner)) tpenv explicitImplements
-
-                // Review: should skip checking constraints while checking attributes on first pass, though it's hard to imagine when that would matter 
-                let attrs' = TcAttributes cenv envinner attrTgtTyconDecl attrs
-
-                if firstPass then 
-                    tycon.Data.entity_attribs <- attrs';
-
-                let implementedTys,inheritedTys = 
-                    match synTyconRepr with 
-                    | TyconCore_general (kind,inherits,slotsigs,fields,isConcrete,isIncrClass,m) ->
-                        let kind = InferTyconKind cenv.g (kind,attrs',slotsigs,fields,inSig,isConcrete,m)
-
-                        let inherits = inherits |> List.map (fun (ty,m,baseIdOpt) -> (ty,m)) 
-                        let inheritedTys = fst(List.mapfold (map_acc_fst (TcTypeAndRecover cenv NoNewTypars checkCxs envinner)) tpenv inherits)
-                        let implementedTys,inheritedTys =   
-                            if kind = TyconInterface then (implementedTys @ inheritedTys),[] 
-                            else implementedTys,inheritedTys
-                        implementedTys,inheritedTys 
-                    | TyconCore_enum _ | TyconCore_no_repr _ | TyconCore_abbrev _
-                    
-                    | TyconCore_union _ | TyconCore_asm _ | TyconCore_recd _ -> 
-                        // REVIEW: we could do the IComparable/IStructuralHash interface analysis here. 
-                        // This would let the type satisfy more recursive IComparable/IStructuralHash constraints 
-                        implementedTys,[]
-
-
-                // Publish interfaces, but only on the first pass, to avoid a duplicate interface check 
-                if firstPass then 
-                    implementedTys |> List.iter (fun (ty,m) -> PublishInterface cenv envinner.DisplayEnv tcref m false ty) ;
-
-                attrs',inheritedTys)
-
-        // Publish the attributes and supertype  
-        (implementsL,tdefs,tycons) |||> List.iter3 (fun (attrs',inheritedTys) (synTyconInfo,synTyconRepr,_) tycon -> 
-          let m = tycon.Range
-          try 
-              if verbose then  dprintf "--> TcTyconDefnCores (representations of %s)@%a\n" tycon.MangledName output_range m;
-              let (ComponentInfo(attrs,_,_, cs,id, _, _,_,_)) = synTyconInfo
-              let thisTyconRef = mk_local_tcref tycon
-              let envinner = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) envinner
-              let envinner = MkInnerEnvForTyconRef cenv envinner thisTyconRef false
-              let super = 
-                  match synTyconRepr with 
-                  | TyconCore_no_repr _ -> None
-                  | TyconCore_abbrev _ -> None
-                  | TyconCore_union _ -> None
-                  | TyconCore_asm _ -> None
-                  | TyconCore_recd _ -> None
-                  | TyconCore_general (kind,_,slotsigs,fields,isConcrete,_,_) ->
-                      let kind = InferTyconKind cenv.g (kind,attrs',slotsigs,fields,inSig,isConcrete,m)
-                                           
-                      match inheritedTys with 
-                      | [] -> 
-                          match kind with 
-                          | TyconStruct -> Some(cenv.g.system_Value_typ)
-                          | TyconDelegate _ -> Some(cenv.g.system_MulticastDelegate_typ )
-                          | TyconHiddenRepr | TyconClass | TyconInterface -> None
-                          | _ -> error(InternalError("should have inferred tycon kind",m)) 
-
-                      | [(ty,m)] -> 
-                          if not firstPass && kind <> TyconClass then 
-                              errorR (Error("Structs, interfaces, enums and delegates may not inherit from other types",m)); 
-                          CheckSuperType cenv ty m; 
-                          if is_typar_typ cenv.g ty then 
-                              if firstPass  then 
-                                  errorR(Error("cannot inherit from a variable type",m)) 
-                              Some cenv.g.obj_ty // a "super" that is a variable type causes grief later
-                          else                          
-                              Some ty 
-                      | _ -> 
-                          error(Error("Types may not inherit from multiple concrete types",m))
-
-                  | TyconCore_enum _ -> 
-                      Some(cenv.g.system_Enum_typ) 
-
-              // Publish the super type
-              tycon.TypeContents.tcaug_super <- super
-              
-           with e -> errorRecovery e m)
-
-    /// Establish the fields, dispatch slots and union cases of a type
-    let private TcTyconDefnCore_Phase6_EstablishRepresentation cenv envinner tpenv inSig (tinfo,synTyconRepr,_) (tycon:Tycon ) =
-        let m = tycon.Range
-        try 
-            let (ComponentInfo(attrs,compKind,_, cs,id, _, _,_,_)) = tinfo
-            let id = tycon.Id
-            let thisTyconRef = mk_local_tcref tycon
-            let innerParent = Parent(thisTyconRef)
-            let thisTyInst,thisTy = generalize_tcref thisTyconRef
-            let attrs' = TcAttributes cenv envinner attrTgtTyconDecl attrs
-
-
-            let hasAbstractAttr = HasAttrib cenv.g cenv.g.attrib_AbstractClassAttribute attrs'
-            let hasSealedAttr = TryFindBoolAttrib cenv.g cenv.g.attrib_SealedAttribute attrs'
-            let hasMeasureAttr = HasAttrib cenv.g cenv.g.attrib_MeasureAttribute attrs'
-            let hasMeasureableAttr = HasAttrib cenv.g cenv.g.attrib_MeasureableAttribute attrs'
-            let hasStructLayoutAttr = HasAttrib cenv.g cenv.g.attrib_StructLayoutAttribute attrs'
-
-            if hasAbstractAttr then 
-                tycon.TypeContents.tcaug_abstract <- true;
-
-            tycon.Data.entity_attribs <- attrs';
-            let noAbstractClassAttributeCheck() = 
-                if hasAbstractAttr then errorR (Error("Only classes may be given the 'AbstractClass' attribute",m))
-                
-            let structLayoutAttributeCheck(allowed) = 
-                if hasStructLayoutAttr  then 
-                    if allowed then 
-                        warning(PossibleUnverifiableCode(m));
-                    elif thisTyconRef.Typars(m).Length > 0 then 
-                        errorR (Error("Generic types may not be given the 'StructLayout' attribute",m))
-                    else
-                        errorR (Error("Only structs and classes without implicit constructors may be given the 'StructLayout' attribute",m))
-                
-            let hiddenReprChecks(hasRepr) =
-                 structLayoutAttributeCheck(false);
-                 if hasSealedAttr = Some(false) || (hasRepr && hasSealedAttr <> Some(true) && not (id.idText = "Unit" && cenv.g.compilingFslib) ) then 
-                    errorR(Error("The representation of this type is hidden by the signature. It must be given an attribute such as [], [] or [] to indicate the characteristics of the type",m));
-                 if hasAbstractAttr then 
-                     errorR (Error("Only classes may be given the 'AbstractClass' attribute",m))
-
-            let noMeasureAttributeCheck() = 
-                if hasMeasureAttr then errorR (Error("Only types representing units-of-measure may be given the 'Measure' attribute",m))
-                
-            let noSealedAttributeCheck(k) = 
-                if hasSealedAttr = Some(true) then errorR (Error(sprintf "%s types are always sealed" k,m));
-
-            let noFieldsCheck(fields':RecdField list) = 
-                match fields' with 
-                | (rf :: _) -> errorR (Error("Interface types and delegate types may not contain fields",rf.Range))
-                | _ -> ()
-
-                
-            let envinner = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) envinner
-            let envinner = MkInnerEnvForTyconRef cenv envinner thisTyconRef false
-
-
-            // Notify the Language Service about field names in record/class declaration
-            let ad = AccessRightsOfEnv envinner
-            let writeFakeRecordFieldsToSink (fields:RecdField list) =
-                let nenv = nenv_of_tenv envinner
-                // Record fields should be visible from IntelliSense, so add fake names for them (similarly to "let a = ..")
-                for fspec in (fields |> List.filter (fun fspec -> not fspec.IsCompilerGenerated)) do
-                    let info = RecdFieldInfo(thisTyInst, rfref_of_rfield thisTyconRef fspec)
-                    let nenv' = AddFakeNameToNameEnv fspec.Name (Item_recdfield info) nenv
-                    // Name resolution gives better info for tooltips
-                    CallNameResolutionSink(fspec.Range,nenv,FreshenRecdFieldRef cenv.nameResolver m (rfref_of_rfield thisTyconRef fspec),ItemOccurence.Binding,nenv.eDisplayEnv,ad)
-                    // Environment is needed for completions
-                    CallEnvSink(fspec.Range, nenv', ad)
-
-            // Notify the Language Service about constructors in discriminated union declaration
-            let writeFakeUnionCtorsToSink unionCases = 
-                let nenv = nenv_of_tenv envinner
-                // Constructors should be visible from IntelliSense, so add fake names for them 
-                for unionCase in unionCases do
-                    let info = UnionCaseInfo(thisTyInst,mk_ucref thisTyconRef unionCase.ucase_id.idText)
-                    let nenv' = AddFakeNameToNameEnv unionCase.ucase_id.idText (Item_ucase info) nenv
-                    // Report to both - as in previous function
-                    CallNameResolutionSink(unionCase.Range,nenv,Item_ucase info,ItemOccurence.Binding,nenv.eDisplayEnv,ad)
-                    CallEnvSink(unionCase.ucase_id.idRange, nenv', ad)
-            
-            let theTypeRepresentation,baseValOpt = 
-                match synTyconRepr with 
-
-                | TyconCore_no_repr _ -> 
-                    hiddenReprChecks(false)
-                    if hasMeasureAttr
-                    then Some(TFsObjModelRepr { fsobjmodel_kind=TTyconClass; 
-                                                fsobjmodel_vslots=[];
-                                                fsobjmodel_rfields= MakeRecdFieldsTable [] }), None
-                    else None,None
-
-                // This unfortunate case deals with "type x = A" 
-                // In F# this only defines a new type if A is not in scope 
-                // as a type constructor, or if the form type A = A is used. 
-                // "type x = | A" can always be used instead. 
-                | TyconCore_abbrev(Type_lid([tcn],_),_) 
-                              when 
-                                (not hasMeasureAttr && 
-                                 (isNil (LookupTypeNameInEnvNoArity tcn.idText envinner.eNameResEnv) || 
-                                  id.idText = tcn.idText)) -> 
-                          
-                    structLayoutAttributeCheck(false);
-                    CheckUnionCaseName tcn.idText tcn.idRange;
-                    let unionCase = NewUnionCase tcn tcn.idText [] thisTy [] emptyXmlDoc tycon.Accessibility
-                    Some (MakeUnionRepr [ unionCase ]),None
-
-                | TyconCore_abbrev(eq,_) ->
-                    if hasSealedAttr = Some(true) then 
-                        errorR (Error("Abbreviated types may not be given the 'Sealed' attribute",m));
-                    noAbstractClassAttributeCheck();
-                    if hasMeasureableAttr  then 
-                        let kind = if hasMeasureAttr then KindMeasure else KindType
-                        let theTypeAbbrev,_ = TcTypeOrMeasureAndRecover (Some kind) cenv NoNewTypars CheckCxs envinner tpenv eq
-
-                        Some(TMeasureableRepr theTypeAbbrev),None
-                    else 
-                        None,None
-
-                | TyconCore_union (_,unionCases,_) -> 
-                    noMeasureAttributeCheck();
-                    noSealedAttributeCheck "Discriminated union";
-                    noAbstractClassAttributeCheck();
-                    structLayoutAttributeCheck(false);
-                    let unionCases = TcUnionCaseDecls cenv envinner innerParent thisTy tpenv unionCases
-                    writeFakeUnionCtorsToSink unionCases
-                    Some (MakeUnionRepr unionCases),None
-
-                | TyconCore_recd (_,fields,_) -> 
-                    noMeasureAttributeCheck();
-                    noSealedAttributeCheck "Record";
-                    noAbstractClassAttributeCheck();
-                    structLayoutAttributeCheck(true);  // these are allowed for records
-                    let recdFields = TcNamedFieldDecls cenv envinner innerParent false tpenv fields
-                    writeFakeRecordFieldsToSink recdFields
-                    Some (TRecdRepr (MakeRecdFieldsTable recdFields))  ,None
-
-                | TyconCore_asm (s,_) -> 
-                    noMeasureAttributeCheck();
-                    noSealedAttributeCheck "Assembly code";
-                    structLayoutAttributeCheck(false);
-                    noAbstractClassAttributeCheck();
-                    Some (TAsmRepr s),None
-
-                | TyconCore_general (kind,inherits,slotsigs,fields,isConcrete,isIncrClass,_) ->
-                    let fields' = TcNamedFieldDecls cenv envinner innerParent isIncrClass tpenv fields
-                    writeFakeRecordFieldsToSink fields'
-                    
-                    let superTy = tycon.TypeContents.tcaug_super
-                    let typToSearchForAbstractMembers = ((match superTy with None -> cenv.g.obj_ty | Some ty -> ty),None)
-                    let containerInfo = (TyconContainerInfo(innerParent,thisTyconRef,thisTyconRef.Typars(m)))
-                    let kind = InferTyconKind cenv.g (kind,attrs',slotsigs,fields,inSig,isConcrete,m)
-                    match kind with 
-                    | TyconHiddenRepr  -> 
-                        hiddenReprChecks(true)
-                        None,None
-                    | _ ->
-
-                        // Note: for a mutually recursive set we can't check this condition 
-                        // until "is_sealed_typ" and "is_class_typ" give reliable results. 
-                        superTy |> Option.iter (fun ty -> 
-                            let m = match inherits with | [] -> m | ((_,m,_) :: _) -> m
-                            if is_sealed_typ cenv.g ty then 
-                                errorR(Error("Cannot inherit a sealed type",m))
-                            elif not (is_class_typ cenv.g ty) then 
-                                errorR(Error("Cannot inherit from interface type. Use interface ... with instead",m)));
-
-                        let kind = 
-                            match kind with 
-                              | TyconStruct -> 
-                                  noSealedAttributeCheck "Struct";
-                                  noAbstractClassAttributeCheck();
-                                  if nonNil slotsigs then 
-                                    errorR (Error("Struct types may not not contain abstract members",m)); 
-                                  structLayoutAttributeCheck(true);
-
-                                  TTyconStruct
-                              | TyconInterface -> 
-                                  if hasSealedAttr = Some(true) then errorR (Error("Interface types may not be sealed",m))
-                                  structLayoutAttributeCheck(false);
-                                  noAbstractClassAttributeCheck();
-                                  noFieldsCheck(fields');
-                                  TTyconInterface
-                              | TyconClass -> 
-                                  structLayoutAttributeCheck(not isIncrClass);
-                                  TTyconClass
-                              | TyconDelegate (ty,arity) -> 
-                                  noSealedAttributeCheck "Delegate";
-                                  structLayoutAttributeCheck(false);
-                                  noAbstractClassAttributeCheck();
-                                  noFieldsCheck(fields');
-                                  let ty',_ = TcTypeAndRecover cenv NoNewTypars CheckCxs envinner tpenv ty
-                                  let _,curriedArgInfos,returnTy,_ = GetTopValTypeInCompiledForm cenv.g (arity |> TranslateTopValSynInfo m (TcAttributes cenv envinner)  |> TranslatePartialArity []) ty' m
-                                  if curriedArgInfos.Length < 1 then error(Error("Delegate specifications must be of the form 'typ -> typ'",m));
-                                  if curriedArgInfos.Length > 1 then error(Error("Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values",m));
-                                  let ttps = thisTyconRef.Typars(m)
-                                  let fparams = curriedArgInfos.Head |> List.map mk_slotparam 
-                                  TTyconDelegate (mk_slotsig("Invoke",thisTy,ttps,[],[fparams], returnTy))
-                              | _ -> 
-                                  error(InternalError("should have inferred tycon kind",m))
-
-                        let baseIdOpt = 
-                            match synTyconRepr with 
-                            | TyconCore_no_repr _ -> None
-                            | TyconCore_abbrev _ -> None
-                            | TyconCore_union _ -> None
-                            | TyconCore_asm _ -> None
-                            | TyconCore_recd _ -> None
-                            | TyconCore_enum _ -> None
-                            | TyconCore_general (_,inherits,slotsigs,fields,isConcrete,isIncrClass,m) ->
-                                match inherits with 
-                                | [] -> None
-                                | ((ty,m,baseIdOpt) :: _) -> 
-                                    match baseIdOpt with 
-                                    | None -> Some(ident("base",m)) 
-                                    | Some id -> Some(id)
-                            
-                        let abstractSlots = 
-                            [ for (valSpfn,memberFlags) in slotsigs do 
-                                  CheckMemberFlags cenv.g None NewSlotsOK OverridesOK memberFlags m;
-                                  let ((ValSpfn(attrs,id,_, _, valSynData, pseudo, mutableFlag,doc, vis,literalExprOpt,m))) = valSpfn 
-                                  CheckForHiddenAbstractSlot (cenv,envinner,typToSearchForAbstractMembers,id,valSynData,memberFlags,m)
-                                  
-                                  let slots = fst (TcAndPublishValSpec (cenv,envinner,containerInfo,ModuleOrMemberBinding,Some(memberFlags),tpenv,valSpfn))
-                                  // Multiple slots may be returned, e.g. for 
-                                  //    abstract P : int with get,set
-                                  
-                                  for slot in slots do 
-                                      yield mk_local_vref slot ]
-
-                        let baseValOpt = MakeAndPublishBaseVal cenv envinner baseIdOpt (super_of_tycon cenv.g tycon)
-                        let repr = 
-                            TFsObjModelRepr 
-                                { fsobjmodel_kind=kind; 
-                                  fsobjmodel_vslots= abstractSlots;
-                                  fsobjmodel_rfields=MakeRecdFieldsTable fields'}
-                        Some(repr), baseValOpt
-                | TyconCore_enum (decls,m) -> 
-                    let fieldTy,fields' = TcEnumDecls cenv envinner innerParent thisTy decls
-                    let kind = TTyconEnum
-                    structLayoutAttributeCheck(false);
-                    noSealedAttributeCheck "Enum";
-                    let vfld = NewRecdField false None (ident("value__",m))  fieldTy false [] [] emptyXmlDoc taccessPublic true
-                    
-                    if not (ListSet.mem (type_equiv cenv.g) fieldTy [ cenv.g.int32_ty; cenv.g.int16_ty; cenv.g.sbyte_ty; cenv.g.int64_ty; cenv.g.char_ty; cenv.g.bool_ty; cenv.g.uint32_ty; cenv.g.uint16_ty; cenv.g.byte_ty; cenv.g.uint64_ty ]) then 
-                        errorR(Error("Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char",m));
-
-                    let nenv = nenv_of_tenv envinner
-                    writeFakeRecordFieldsToSink fields' 
-                    let repr = 
-                        TFsObjModelRepr 
-                            { fsobjmodel_kind=kind; 
-                              fsobjmodel_vslots=[];
-                              fsobjmodel_rfields= MakeRecdFieldsTable (vfld :: fields') }
-                    Some(repr), None
-            
-            if verbose then  dprintf "--> EstablishTypeDefinitionCores (adjust representations)@%a\n" output_range m;
-            tycon.Data.entity_tycon_repr <- theTypeRepresentation;
-            baseValOpt
-        with e -> 
-            errorRecovery e m; None
-
-    /// Check that a set of type definitions is free of cycles in abbreviations
-    let private CheckForCyclicAbbreviations cenv tycons = 
-
-        let edges (tycon:Tycon) =
-
-            let insert tcref acc = 
-                let tycon' = deref_tycon tcref
-                if ListSet.mem (===) tycon' tycons  then (tycon,tycon') ::acc else acc
-            let rec accInAbbrevType ty acc  = 
-                match strip_tpeqns ty with 
-                | TType_tuple l -> 
-                    accInAbbrevTypes l acc
-                
-                // REVIEW: this algorithm is not yet correct for all cases 
-                | TType_ucase (UCRef(tc,_),tinst) 
-                | TType_app (tc,tinst) -> 
-                    let tycon2 = (deref_tycon tc)
-                    let acc = accInAbbrevTypes tinst  acc
-                    // Record immediate recursive references 
-                    if ListSet.mem (===) tycon2 tycons  then 
-                        (tycon,tycon2) ::acc 
-                    // Expand the representation of abbreviations 
-                    elif tc.IsTypeAbbrev  then
-                        accInAbbrevType (reduce_tcref_abbrev tc tinst) acc
-                    // Otherwise H - explore the instantiation. 
-                    else 
-                        acc
-
-                | TType_fun (d,r) -> 
-                    accInAbbrevType d (accInAbbrevType r acc)
-                
-                | TType_var r -> acc
-                
-                | TType_forall (tps,r) -> accInAbbrevType r acc
-                
-                | TType_modul_bindings -> failwith "accInAbbrevType: naked unknown"
-
-                | TType_measure ms -> accInMeasure ms acc
-            and accInMeasure ms acc =
-                match strip_upeqns ms with
-                | MeasureCon tc when ListSet.mem (===) (deref_tycon tc) tycons  ->  
-                    (tycon, (deref_tycon tc)) :: acc
-                | MeasureCon tc when tc.IsTypeAbbrev  ->              
-                    accInMeasure (reduce_tcref_abbrev_measure tc) acc
-                | MeasureProd (ms1, ms2) -> accInMeasure ms1 (accInMeasure ms2 acc)
-                | MeasureInv ms -> accInMeasure ms acc
-                | _ -> acc
-
-            and accInAbbrevTypes tys acc = 
-                List.foldBack accInAbbrevType tys acc
-                
-            let acc = []
-            let acc = 
-                match tycon.TypeAbbrev with 
-                | None -> acc
-                | Some ty -> 
-                    if not cenv.isSig && not cenv.haveSig && (tycon.Accessibility <> taccessPublic || tycon.TypeReprAccessibility <> taccessPublic) then 
-                       errorR(Error("Type abbreviations must be public. If you want to use a private type abbreviation you must use an explicit signature",tycon.Range));
-                    accInAbbrevType ty acc
-
-            acc
-
-        let graph = NodeGraph.mk_graph (stamp_of_tycon,Int64.order) tycons (List.map (fun (tc1:Tycon,tc2:Tycon) -> tc1.Stamp, tc2.Stamp) (List.collect edges tycons))
-        graph |> NodeGraph.iterate_cycles (fun path -> 
-            let tycon = path.Head 
-            // The thing is cyclic. Set the abbreviation and representation to be "None" to stop later VS crashes
-            tycon.Data.entity_tycon_abbrev <- None
-            tycon.Data.entity_tycon_repr <- None 
-            errorR(Error("This type definition involves an immediate cyclic reference through an abbreviation",tycon.Range)));
-
-
-    /// Check that a set of type definitions is free of inheritance cycles
-    let CheckForCyclicStructsAndInheritance cenv tycons = 
-        let edges (tycon:Tycon) =
-
-            let insert tcref acc = 
-                let tycon' = deref_tycon tcref
-                if ListSet.mem (===) tycon' tycons  then (tycon,tycon') ::acc else acc
-
-            /// Analyze a type used as a struct field, perhaps in a nested struct
-            let rec accStructField structTycon structTyInst fspec acc  = 
-                let fieldTy = actual_typ_of_rfield structTycon structTyInst fspec
-                accStructFieldType structTycon structTyInst fspec fieldTy acc
-
-            and accStructFieldType structTycon structTyInst fspec fieldTy acc  = 
-                match strip_tpeqns fieldTy with 
-                // Analyze nested structs
-                | TType_app (tcref2 ,tinst2) when is_struct_tcref tcref2  ->
-                    let tycon2 = (deref_tycon tcref2)
-                    // Of course structs are not allowed to contain instance fields of their own type:
-                    //  type S = struct { field x : S } 
-                    //
-                    // In addition, see bug 3429. In the .NET IL structs are allowed to contain 
-                    // static fields of their exact generic type, e.g.
-                    //  type S = struct { static field x : S } 
-                    //  type S = struct { static field x : S } 
-                    // but not
-                    //  type S = struct { static field x : S } 
-                    //  type S = struct { static field x : S } 
-                    // etc.
-                    //
-                    // Ideally structs would allow static fields of any type. However
-                    // rhis is a restriction and exemption that originally stems from 
-                    // the way the Microsoft desktop CLR class loader works.
-                    if fspec.IsStatic && 
-                       (structTycon === tycon2) && 
-                       (structTyInst,tinst2) ||> List.lengthsEqAndForall2 (fun ty1 ty2 -> is_typar_typ cenv.g ty1 && is_typar_typ cenv.g ty2 && typar_ref_eq (dest_typar_typ cenv.g ty1) (dest_typar_typ cenv.g ty2)) 
-                    then
-                       acc
-                    elif ListSet.mem (===) tycon2 tycons  then 
-                        let visited = ListAssoc.containsKey (===) tycon2 acc
-                        if visited then 
-                            acc
-                        else
-                            let acc = (tycon,tycon2) ::acc 
-                            accStructFields tycon2 tinst2 acc
-                    else
-                        accStructFields tycon2 tinst2 acc
-                // Analyze abbreviations used within struct fields
-                | TType_app (tcref2 ,tinst2) when tcref2.IsTypeAbbrev  ->
-                    accStructFieldType structTycon structTyInst fspec (reduce_tcref_abbrev tcref2 tinst2) acc
-                | _ -> acc
-
-            and accStructFields (structTycon:Tycon) tinst acc  = 
-                // Accumulate over _all_ struct fields - see bug 3429
-                (structTycon.AllFieldsAsList,acc) ||> List.foldBack (accStructField  structTycon tinst )
-
-            let acc = []
-
-            let acc = 
-                if tycon.IsStructTycon then
-                    let tinst,ty = generalize_tcref (mk_local_tcref tycon)
-                    accStructFields tycon tinst acc
-                else
-                    acc
-
-            let checkInsert ty acc = 
-                if is_stripped_tyapp_typ cenv.g ty then // guard against possible earlier failure
-                    insert (tcref_of_stripped_typ cenv.g ty) acc
-                else
-                    acc
-
-            let acc =
-                // Note: only the nominal type counts 
-                let super = super_of_tycon cenv.g tycon
-                checkInsert super acc
-            let acc =
-                // Note: only the nominal type counts 
-                let interfaces = implements_of_tycon cenv.g tycon
-                List.foldBack checkInsert interfaces acc
-            acc
-        let edges = (List.collect edges tycons)
-        let graph = NodeGraph.mk_graph (stamp_of_tycon,Int64.order) tycons (List.map (fun (tc1:Tycon,tc2:Tycon) -> tc1.Stamp, tc2.Stamp) edges)
-        graph |> NodeGraph.iterate_cycles (fun path -> 
-            let tycon = path.Head 
-            // The thing is cyclic. Set the abbreviation and representation to be "None" to stop later VS crashes
-            tycon.Data.entity_tycon_abbrev <- None
-            tycon.Data.entity_tycon_repr <- None 
-            errorR(Error("This type definition involves an immediate cyclic reference through a struct field or inheritance relation",tycon.Range)));
-
-
-        
-    let TcTyconDefnCores cenv env inSig parent tpenv (tdefs,m,scopem) =
-
-        // First define the type constructors and the abbreviations, if any. 
-        if verbose then  dprintf "--> TcTyconDefnCores@%a\n" output_range m;
-        let tycons = tdefs |> List.map (TcTyconDefnCore_Phase0_BuildInitialTycon cenv env parent)
-
-        // Publish the preliminary tycons 
-        tycons |> List.iter (PublishTypeDefn cenv env);
-
-        // Add them to the environment, though this does not add the fields and 
-        // constructors (because we haven't established them yet). 
-        // We re-add them to the original environment later on. 
-        // We don't report them to the Language Service yet as we don't know if 
-        // they are well-formed (e.g. free of abbreviation cycles - see bug 952) 
-        let envinner = AddLocalTycons cenv.g cenv.amap scopem tycons env
-
-
-        // Establish the kind of each type constructor 
-        // Here we run InferTyconKind and record partial information about the kind of the type constructor. 
-        // This means TyconObjModelKind is set, which means is_sealed_typ, is_interface_typ etc. give accurate results. 
-        (tdefs,tycons) ||> List.iter2 (TcTyconDefnCore_Phase1_EstablishBasicKind cenv inSig envinner)
-            
-        // Establish the abbreviations (no constraint checking, because constraints not yet established)
-        (tdefs,tycons) ||> List.iter2 (TcTyconDefnCore_Phase2_Phase4_EstablishAbbreviations cenv envinner tpenv inSig FirstPass)
-
-        // Check for cyclic abbreviations. If this succeeds we can start reducing abbreviations safely.
-        CheckForCyclicAbbreviations cenv tycons;
-
-        // Establish the super type and interfaces  (no constraint checking, because constraints not yet established)     
-        TcTyconDefnCore_Phase3_Phase5_EstablishSuperTypesAndInterfaceTypes cenv envinner tpenv inSig tdefs tycons FirstPass;
-
-        // REVIEW: we should separate the checking for cyclic hierarchies and cyclic structs
-        // REVIEW: this is because in some extreme cases the TcTyparConstraints call below could
-        // exercise a cyclic hierarchy (and thus not terminate) before the cycle checking has been
-        // performed. Likewise operations in phases 3-6 could also exercise a cyclic hierarchy
-        
-        // Check and publish the explicit constraints. 
-        (tdefs,tycons) ||> List.iter2 (fun (synTyconInfo,synTyconRepr,_) tycon -> 
-            let (ComponentInfo(_,kind,_, wcs,_,_,_, _,im)) = synTyconInfo
-            let envinner = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) envinner
-            let thisTyconRef = mk_local_tcref tycon
-            let envinner = MkInnerEnvForTyconRef cenv envinner thisTyconRef false
-            try TcTyparConstraints cenv NoNewTypars CheckCxs envinner tpenv  wcs |> ignore
-            with e -> errorRecovery e m);
-
-        // No more constraints allowed on declared typars 
-        tycons |> List.iter (fun tc -> tc.Typars(m) |> List.iter (SetTyparRigid cenv.g env.DisplayEnv m));
-        
-        // OK, now recheck the abbreviations and super/interface types (this time checking constraints)
-        (tdefs,tycons) ||> List.iter2 (TcTyconDefnCore_Phase2_Phase4_EstablishAbbreviations cenv envinner tpenv inSig SecondPass)
-        TcTyconDefnCore_Phase3_Phase5_EstablishSuperTypesAndInterfaceTypes cenv envinner tpenv inSig tdefs tycons SecondPass;
-
-        // Now all the type parameters, abbreviations, constraints and kind information is established.
-        // Now do the representations.
-        let baseVals = (tdefs,tycons) ||> List.map2 (TcTyconDefnCore_Phase6_EstablishRepresentation cenv envinner tpenv inSig)
-                
-        // Now check for cyclic structs and inheritance. It's possible these should be checked as separate conditions. 
-        // REVIEW: checking for cyclic inheritance is happening too late. See note above.
-        CheckForCyclicStructsAndInheritance cenv tycons;
-
-        tycons |> List.iter (AddGenericHashAndComparisonDeclarations cenv env)
-
-        // Add the tycons again to the environment (again) - this will add the constructors and fields. 
-        let env = AddLocalTyconsAndReport cenv.g cenv.amap scopem tycons env
-
-        (tycons,env,baseVals)
-
-end // module EstablishTypeDefinitionCores
-
-
-/// Given a type definition, compute whether its members form an extension of an existing type, and if so if it is an 
-/// intrinsic or extrinsic extension
-let ComputeTyconDeclKind isAtOriginalTyconDefn cenv env parent inSig m typars cs longPath = 
-    let ad = AccessRightsOfEnv env
-    let tcref = 
-        match ResolveTypeLongIdent cenv.nameResolver ItemOccurence.Binding OpenQualified env.eNameResEnv ad longPath (List.length typars) with
-        | Result res -> res
-        | res when inSig && longPath.Length = 1 ->
-            errorR(Deprecated("The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[] attribute to the type declaration in the signature",m));
-            ForceRaise res
-        | res -> ForceRaise res            
-
-    let isInterfaceOrDelegateOrEnum = 
-        (deref_tycon tcref).IsFSharpInterfaceTycon || 
-        (deref_tycon tcref).IsFSharpDelegateTycon ||
-        (deref_tycon tcref).IsFSharpEnumTycon
-
-    let isInSameModuleOrNamespace = 
-         match env.eMtypeAcc.Value.TypesByMangledName.TryFind(tcref.MangledName) with 
-          | Some tycon -> (tycon_spec_order tcref.Deref tycon = 0)
-          | None -> false
-    
-    let reqTypars = tcref.Typars(m)
-
-    // Member definitions are intrinsic (added directly to the type) if:
-    // a) For interfaces, only if it is in the original defn.
-    //    Augmentations to interfaces via partial type defns will always be extensions, e.g. extension members on interfaces.
-    // b) For other types, if the type is isInSameModuleOrNamespace
-    let declKind,typars = 
-        if isAtOriginalTyconDefn then 
-            ModuleOrMemberBinding, reqTypars
-
-        elif isInSameModuleOrNamespace && not isInterfaceOrDelegateOrEnum then 
-            IntrinsicExtensionBinding, reqTypars
-        else 
-            if isInSameModuleOrNamespace && isInterfaceOrDelegateOrEnum then 
-                errorR(Error("Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by clioent code to bring the extension members into scope",tcref.Range))
-            let nReqTypars = reqTypars.Length
-            if nReqTypars <> typars.Length then 
-                // not recoverable
-                error(Error(sprintf "The declared type parameters for this type extension do not match the declared type parameters on the original type '%s'" tcref.DisplayNameWithUnderscoreTypars,m))
-
-            let declaredTypars = TcTyparDecls cenv env typars
-            let envinner = AddDeclaredTypars CheckForDuplicateTypars declaredTypars env
-            let tpenv = TcTyparConstraints cenv NoNewTypars CheckCxs envinner emptyTyparEnv cs
-            declaredTypars |> List.iter (SetTyparRigid cenv.g env.DisplayEnv m);
-            if not (typar_decls_aequiv cenv.g tyeq_env_empty reqTypars declaredTypars) then 
-                errorR(Error(sprintf "The declared type parameters for this type extension do not match the declared type parameters on the original type '%s'" tcref.DisplayNameWithUnderscoreTypars,m))
-            ExtrinsicExtensionBinding, declaredTypars
-
-
-    declKind, tcref, typars
-
-
-let is_member          = function ClassMemberDefn_member_binding _   -> true | _ -> false
-let is_implicit_ctor    = function ClassMemberDefn_implicit_ctor _    -> true | _ -> false
-let is_implicit_inherit = function ClassMemberDefn_implicit_inherit _ -> true | _ -> false
-let is_bindings         = function ClassMemberDefn_let_bindings _     -> true | _ -> false
-let is_slotsig          = function ClassMemberDefn_slotsig _          -> true | _ -> false
-let is_interface        = function ClassMemberDefn_interface _        -> true | _ -> false
-let is_inherit          = function ClassMemberDefn_inherit _          -> true | _ -> false
-let is_field            = function ClassMemberDefn_field _            -> true | _ -> false
-let is_tycon            = function ClassMemberDefn_tycon _            -> true | _ -> false
-
-let allFalse ps x = List.fold (fun acc p -> acc && not (p x)) true ps
-
-/// Check the ordering on the bindings and members in a class construction
-// Accepted forms:
-//
-// Implicit Construction:
-//   implicit_ctor
-//   optional implicit_inherit
-//   multiple bindings
-//   multiple member-binding(includes-overrides) or abstract-slot-declaration or interface-bindings
-//
-// Classic construction:
-//   multiple (binding or slotsig or field or interface or inherit).
-//   i.e. not local-bindings, implicit ctor or implicit inherit (or tycon?).
-//   atMostOne inherit.
-let CheckMembersForm ds = 
-    match ds with
-    | d::ds when is_implicit_ctor d ->
-        // Implicit construction 
-        let ds = match ds with
-                 | d::ds when is_implicit_inherit d -> ds  (* skip inherit call if it comes next *)
-                 | ds -> ds
-        let localbindings ,ds = ds |> List.takeUntil (is_bindings >> not) 
-        let memberbindings,ds = ds |> List.takeUntil (allFalse [is_member;is_slotsig;is_interface]) 
-        match ds with
-         | ClassMemberDefn_member_binding (_,m)       :: _ -> errorR(InternalError("List.takeUntil is wrong, have binding",m))
-         | ClassMemberDefn_slotsig (_,_,m)            :: _ -> errorR(InternalError("List.takeUntil is wrong, have slotsig",m))
-         | ClassMemberDefn_interface (_,_,m)          :: _ -> errorR(InternalError("List.takeUntil is wrong, have interface",m))
-         | ClassMemberDefn_implicit_ctor (_,_,_,_,m)  :: _ -> errorR(InternalError("implicit class construction with two implicit constructions",m))
-         | ClassMemberDefn_implicit_inherit (_,_,_,m) :: _ -> errorR(Error("Type definitions using implicit construction may only have one 'inherit' specification and it must be the first declaration",m))
-         | ClassMemberDefn_let_bindings (_,_,_,m)     :: _ -> errorR(Error("Type definitions using implicit construction must have local let/do-bindings preceding member and interface definitions",m))
-         | ClassMemberDefn_inherit (_,_,m)            :: _ -> errorR(Error("This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'",m))
-(*         | ClassMemberDefn_field (_,m)              :: _ -> errorR(Error("Class definitions using both an implicit construction sequence and field specifications are not yet implemented",m)) *)
-         | ClassMemberDefn_tycon (_,_,m)              :: _ -> errorR(Error("Types may not contain nested type definitions",m))
-         | _ -> ()
-    | ds ->
-        // Classic class construction 
-        let memberbindings,ds = List.takeUntil (allFalse [is_member;is_slotsig;is_interface;is_inherit;is_field;is_tycon]) ds
-        match ds with
-         | ClassMemberDefn_member_binding (_,m)       :: _ -> errorR(InternalError("CheckMembersForm: List.takeUntil is wrong",m))
-         | ClassMemberDefn_implicit_ctor (_,_,_,_,m)  :: _ -> errorR(InternalError("CheckMembersForm: implicit ctor line should be first",m))
-         | ClassMemberDefn_implicit_inherit (_,_,_,m) :: _ -> errorR(Error("This 'inherit' construction call is not part of an implicit construction sequence. Only the inherited type should be specified at this point. Calls to the inherited constructor should be placed inside the object intialization expression of your object constructor. Alternatively use an implicit construction sequence by modifying the type declaration to include arguments, e.g. 'type X(args) = ...'",m))
-         | ClassMemberDefn_let_bindings (_,false,_,m) :: _ -> errorR(Error("'let' and 'do' bindings are not permitted in class definitions unless an implicit construction sequence is used. You can use an implicit construction sequence by modifying the type declaration to include arguments, e.g. 'type X(args) = ...'",m))
-         | ClassMemberDefn_slotsig (_,_,m)            :: _ 
-         | ClassMemberDefn_interface (_,_,m)          :: _ 
-         | ClassMemberDefn_inherit (_,_,m)            :: _ 
-         | ClassMemberDefn_field (_,m)                :: _ 
-         | ClassMemberDefn_tycon (_,_,m)              :: _ -> errorR(InternalError("CheckMembersForm: List.takeUntil is wrong",m))
-         | _ -> ()
-                 
-
-/// Parallels SplitTyconSignature/SplitTyconDefn]
-/// Separates the definition into core (shape) and body.
-/// core = synTyconInfo,simpleRepr,interfaceTypes
-///        where simpleRepr can contain inherit type, declared fields and virtual slots.
-/// body = members
-///        where members contain methods/overrides, also implicit ctor, inheritCall and local definitions.
-///------
-/// The tinfos arg are the enclosing types when processing nested types...
-/// The tinfos arg is not currently used... just stacked up.
-let rec SplitTyconDefn tinfos (TyconDefn(synTyconInfo,trepr,extraMembers,_)) =
-    let implements1 = List.choose (function ClassMemberDefn_interface (f,_,m) -> Some(f,m) | _ -> None) extraMembers
-    match trepr with
-    | TyconDefnRepr_class(kind,cspec,m) ->
-        CheckMembersForm cspec;
-        let fields      = cspec |> List.choose (function ClassMemberDefn_field (f,_) -> Some(f) | _ -> None)
-        let implements2 = cspec |> List.choose (function ClassMemberDefn_interface (ty,_,m) -> Some(ty,m) | _ -> None)
-        let inherits    = cspec |> List.choose (function 
-                                                      | ClassMemberDefn_inherit          (ty,idOpt,m)     -> Some(ty,m,idOpt)
-                                                      | ClassMemberDefn_implicit_inherit (ty,arg,idOpt,m) -> Some(ty,m,idOpt)
-                                                      | _ -> None)
-        let tycons      = cspec |> List.choose (function ClassMemberDefn_tycon (x,_,_) -> Some(x) | _ -> None)
-        let slotsigs    = cspec |> List.choose (function ClassMemberDefn_slotsig (x,y,_) -> Some(x,y) | _ -> None)
-        let members     = cspec |> List.filter (function 
-                                                    | ClassMemberDefn_interface _
-                                                    | ClassMemberDefn_member_binding _ 
-                                                    | ClassMemberDefn_let_bindings _
-                                                    | ClassMemberDefn_implicit_ctor _
-                                                    | ClassMemberDefn_open _
-                                                    | ClassMemberDefn_implicit_inherit _ -> true
-                                                    | ClassMemberDefn_tycon  (_,_,m)  -> error(Error("Types may not contain nested type definitions",m)); false
-                                                    | ClassMemberDefn_field _   -> false (* covered above *)
-                                                    | ClassMemberDefn_inherit _ -> false (* covered above *)
-                                                    | ClassMemberDefn_slotsig _ -> false (* covered above *)
-                                                    )
-        let a,b = SplitTyconDefns (tinfos @ [synTyconInfo]) tycons
-
-        let isConcrete = 
-            members |> List.exists (function 
-                | ClassMemberDefn_member_binding(Binding(_,_,_,_,_,_,ValSynData(Some(memberFlags),_,_),_,_,_,_),_) -> not memberFlags.MemberIsDispatchSlot 
-                | ClassMemberDefn_interface (_,defOpt,_) -> isSome defOpt
-                | ClassMemberDefn_let_bindings _ -> true
-                | ClassMemberDefn_implicit_ctor _ -> true
-                | ClassMemberDefn_implicit_inherit _ -> true
-                | _ -> false)
-
-        let isIncrClass = 
-            members |> List.exists (function 
-                | ClassMemberDefn_implicit_ctor _ -> true
-                | _ -> false)
-                
-        let core = (synTyconInfo, TyconCore_general(kind,inherits,slotsigs,fields,isConcrete,isIncrClass,m), implements2@implements1)
-        core :: a,
-        members :: b
-    | TyconDefnRepr_simple(r,_) -> [(synTyconInfo,r,implements1)],[ [] ]
-
-and SplitTyconDefns tinfos tycons = 
-    let a,b = List.unzip (List.map (SplitTyconDefn tinfos) tycons)
-    List.concat a, List.concat b 
-
-let PrepareTyconMemberDefns isAtOriginalTyconDefn cenv env  parent (synTyconInfo,baseValOpt,members,m) =
-    let (ComponentInfo(_,kind,typars, cs,longPath, _, _, _,im)) = synTyconInfo
-    let declKind,tcref, declaredTyconTypars = ComputeTyconDeclKind isAtOriginalTyconDefn cenv env parent false m typars cs longPath
-
-    let newslotsOK = (if isAtOriginalTyconDefn && tcref.IsFSharpObjectModelTycon then NewSlotsOK else NoNewSlots) // NewSlotsOK only on fsobjs 
-    if nonNil(members) && tcref.IsTypeAbbrev then errorR(Error("Type abbreviations may not have augmentations",m));
-    if verboseCC then dprintf "PrepareTyconMemberDefns: #members=%d\n" (List.length members);
-    TyconMemberData(declKind,tcref,baseValOpt,declaredTyconTypars,members,m,newslotsOK)
-
-//-------------------------------------------------------------------------
-// Bind type definitions - main
-//------------------------------------------------------------------------- 
-
-let TcTyconDefns cenv env parent tpenv (tdefs: SynTyconDefn list,m,scopem) =
-    let cores,membersl = SplitTyconDefns [] tdefs
-    let tycons,env,baseValOpt = EstablishTypeDefinitionCores.TcTyconDefnCores cenv env false parent tpenv (cores,m,scopem)
-    let augments = 
-        (tdefs, baseValOpt, membersl) |||> List.map3 (fun (TyconDefn(synTyconInfo,_,extraMembers,m)) baseValOpt members -> 
-               PrepareTyconMemberDefns true cenv env parent (synTyconInfo,baseValOpt,members@extraMembers,m))
-          
-    let valExprBuilders,env = TcTyconMemberDefns cenv env parent m scopem augments
-
-    // Note: generating these bindings must come after generating the members, since some in the case of structs some fields
-    // may be added by generating the implicit construction syntax 
-    let binds = tycons |> List.collect (AddGenericHashAndComparisonBindings cenv env)
-    let binds3 = tycons |> List.collect (AddGenericEqualityBindings cenv env)
-
-    // Check for cyclic structs and inheritance all over again, since we may have added some fields to the struct when generating the implicit construction syntax 
-    EstablishTypeDefinitionCores.CheckForCyclicStructsAndInheritance cenv tycons;
-
-    (binds @ valExprBuilders @ binds3),tycons,env  
-
-
-//-------------------------------------------------------------------------
-// Bind type specifications
-//------------------------------------------------------------------------- 
-
-/// Parallels split_tycon[Spfn/Defn] 
-let rec SplitTyconSignature tinfos (TyconSpfn(synTyconInfo,trepr,extraMembers,m)) = 
-    let implements1 = 
-        extraMembers |> List.choose (function ClassMemberSpfn_interface (f,m) -> Some(f,m) | _ -> None) 
-    match trepr with
-    | TyconSpfnRepr_class(kind,cspec,m) -> 
-        let fields      = cspec |> List.choose (function ClassMemberSpfn_field (f,_) -> Some(f) | _ -> None)
-        let implements2 = cspec |> List.choose (function ClassMemberSpfn_interface (ty,m) -> Some(ty,m) | _ -> None)
-        let inherits    = cspec |> List.choose (function ClassMemberSpfn_inherit (ty,_) -> Some(ty,m,None) | _ -> None)
-        let nestedTycons = cspec |> List.choose (function ClassMemberSpfn_tycon (x,_) -> Some(x) | _ -> None)
-        let slotsigs    = cspec |> List.choose (function ClassMemberSpfn_binding (v,fl,_) when fl.MemberIsVirtual || fl.MemberIsDispatchSlot -> Some(v,fl) | _ -> None)
-        let members     = cspec |> List.filter (function   
-                                                      | ClassMemberSpfn_interface _ -> true
-                                                      | ClassMemberSpfn_binding (_,memberFlags,_) when not memberFlags.MemberIsDispatchSlot -> true
-                                                      | ClassMemberSpfn_tycon  (_,m) -> error(Error("Types may not contain nested type definitions",m)); false
-                                                      | _ -> false)
-        let isConcrete = 
-            members |> List.exists (function 
-                | ClassMemberSpfn_binding (_,memberFlags,_) -> memberFlags.MemberKind=MemberKindConstructor 
-                | _ -> false)
-
-        let a,b = nestedTycons |> SplitTyconSignatures (tinfos @ [synTyconInfo]) 
-        [ (synTyconInfo, TyconCore_general(kind,inherits,slotsigs,fields,isConcrete,false,m),implements2@implements1) ] @ a,
-        [ (synTyconInfo,true,members@extraMembers) ] @ b
-    // 'type X with ...' in a signature is always interpreted as an extrinsic extension.
-    // Representation-hidden types with members and interfaces are written 'type X = ...' 
-    | TyconSpfnRepr_simple(TyconCore_no_repr _,_) when nonNil extraMembers -> 
-        let isAtOriginalTyconDefn = false
-        [],[ (synTyconInfo,isAtOriginalTyconDefn,extraMembers) ]
-    | TyconSpfnRepr_simple(r,_) -> 
-        [(synTyconInfo,r,implements1)],[ (synTyconInfo,true,extraMembers) ] 
-
-and SplitTyconSignatures tinfos tycons = 
-    let a,b = tycons |> List.map (SplitTyconSignature tinfos) |> List.unzip 
-    List.concat a, List.concat b 
-
-let TcTyconSignatureMemberSpecs cenv env parent tpenv membersl =
-    (tpenv, membersl) ||> List.mapfold (fun tpenv (synTyconInfo,isAtOriginalTyconDefn,members) -> 
-        let (ComponentInfo(_,_,typars,cs,longPath, _, _, _,m)) = synTyconInfo
-        let declKind,tcref,declaredTyconTypars = ComputeTyconDeclKind isAtOriginalTyconDefn cenv env parent true m typars cs longPath
-
-        let envinner = AddDeclaredTypars CheckForDuplicateTypars declaredTyconTypars env
-        let envinner = MkInnerEnvForTyconRef cenv envinner tcref (declKind = ExtrinsicExtensionBinding)
-
-        TcTyconMemberSpecs true cenv envinner (TyconContainerInfo(parent,tcref,declaredTyconTypars)) declKind tcref tpenv members)
-
-let TcTyconSignatures cenv env parent tpenv (tspecs:SynTyconSpfn list,m,scopem) =
-    let cores,membersl = SplitTyconSignatures [] tspecs
-    let tycons,env,_ = EstablishTypeDefinitionCores.TcTyconDefnCores cenv env true parent tpenv (cores,m,scopem)
-    let vals1,tpenv = TcTyconSignatureMemberSpecs cenv env parent tpenv membersl
-    env
-
-//-------------------------------------------------------------------------
-// Bind module types
-//------------------------------------------------------------------------- 
-
-let AdjustModuleName modKind nm = (match modKind with FSharpModuleWithSuffix -> nm^FSharpModuleSuffix | _ -> nm)
-
-
-let rec TcSignatureElement cenv parentModule endm (env:tcEnv) e =
-    let parent = Parent(parentModule)
-    let containerInfo = ModuleOrNamespaceContainerInfo(parentModule)
-    try 
-        match e with 
-        | Spec_exn (edef,m) ->
-            let scopem = union_ranges (end_range_of_range m) endm
-            let _,_,_,env = TcExnSignature cenv env parent emptyTyparEnv (edef,scopem)
-            env
-
-        | Spec_tycon (tspecs,m) -> 
-            let scopem = union_ranges m endm
-            let env = TcTyconSignatures cenv env parent emptyTyparEnv (tspecs,m,scopem)
-            env 
-
-        | Spec_open (mp,m) -> 
-            let scopem = union_ranges (end_range_of_range m) endm
-            TcOpenDecl cenv.g cenv.amap m scopem env mp
-
-        | Spec_val (vspec,m) -> 
-            let idvs,_ = TcAndPublishValSpec (cenv,env,containerInfo,ModuleOrMemberBinding,None,emptyTyparEnv,vspec)
-            let scopem = union_ranges m endm
-            List.foldBack (AddLocalVal scopem) idvs env
-
-        | Spec_module(ComponentInfo(attribs,kind,parms, constraints,longPath,xml,preferPostfix,vis,im),mdefs,m) ->
-            let id = ComputeModuleName longPath
-            let isModule =  ComputeIsModule kind parms constraints im
-            let vis,_ = ComputeAccessAndCompPath env None im vis parent
-            let mspec,_ = TcModuleOrNamespaceSignature cenv env (id,isModule,mdefs,xml,attribs,vis,m)
-            let scopem = union_ranges m endm
-            PublishModuleDefn cenv env mspec; 
-            AddLocalSubModule cenv.g cenv.amap m  scopem env (text_of_id id) mspec
-            
-        | Spec_module_abbrev (id,p,m) -> 
-            let ad = AccessRightsOfEnv env
-            let mvvs = ForceRaise (ResolveLongIndentAsModuleOrNamespace OpenQualified env.eNameResEnv ad p)
-            let scopem = union_ranges m endm
-            let modrefs = mvvs |> List.map p23 
-            if modrefs.Length > 0 && modrefs |> List.forall (fun modref -> modref.IsNamespace) then 
-                warning(Error(sprintf "This module abbreviation abbreviates the namespace '%s'. This is deprecated and ignored: module abbreviations may now only abbreviate modules" (full_display_text_of_modref (List.hd modrefs)),m));
-            let modrefs = modrefs |> List.filter (fun modref -> not modref.IsNamespace)
-            modrefs |> List.iter (fun modref -> CheckEntityAttributes cenv.g modref m |> CommitOperationResult);        
-            
-            if modrefs.Length > 0 then AddModuleAbbreviation scopem id modrefs env else env
-
-        | Spec_hash _ -> env
-
-    with e -> errorRecovery e endm; env
-
-and TcSignatureElements cenv parentModule endm env defs = 
-    List.fold (TcSignatureElement cenv parentModule endm) env defs
-
-
-and ComputeModuleOrNamespaceKind g isModule attribs = 
-    if not isModule then Namespace 
-    elif ModuleNameIsMangled g attribs then FSharpModuleWithSuffix 
-    else FSharpModule
-
-and TcModuleOrNamespaceSignature cenv env (id:ident,isModule,defs,xml,attribs,vis,m) =
-    if verbose then  dprintf "TcModuleOrNamespaceSignature...\n";
-    let attribs = TcAttributes cenv env attrTgtModuleDecl attribs
-    CheckNamespaceModuleOrTypeName id;
-    let modKind = ComputeModuleOrNamespaceKind cenv.g isModule attribs
-    if isModule then CheckForDuplicateConcreteType cenv env (AdjustModuleName modKind id.idText) id.idRange;
-    if isModule then CheckForDuplicateModule cenv env id.idText id.idRange;
-
-    // Now typecheck the signature, accumulating and then recording the submodule description. 
-    let id = ident (AdjustModuleName modKind id.idText, id.idRange)
-    let envinner,mtypeAcc = MakeInnerEnv env id modKind
-    let mspec = NewModuleOrNamespace  (Some(curr_cpath env)) vis id (xml.ToXmlDoc()) attribs (notlazy (empty_mtype modKind)) 
-
-    let innerParent = mk_local_modref mspec
-    
-    let mtyp,envAtEnd = TcModuleOrNamespaceSignatureElements cenv innerParent env (id,modKind,defs,m,xml)
-
-    if !verboseStamps then 
-        dprintf "TcModuleOrNamespaceSignature: %s#%d, vis = %s\n" mspec.MangledName mspec.Stamp (string_of_access vis);
-
-    mspec.Data.entity_modul_contents <- notlazy mtyp; 
-    
-    mspec, envAtEnd
-
-and TcModuleOrNamespaceSignatureElements cenv parentModule env (id,modKind,defs,m,xml) =
-
-    let endm = end_range_of_range m // use end of range for errors 
-
-    if verbose then  dprintf "--> TcModuleOrNamespaceSignatureElements, endm = %a\n" output_range endm;
-    // Create the module type that will hold the results of type checking.... 
-    let envinner,mtypeAcc = MakeInnerEnv env id modKind
-
-    // Ensure the deref_nlpath call in UpdateAccModuleOrNamespaceType succeeds 
-    if cenv.compilingCanonicalFslibModuleType then 
-        ensure_fslib_has_submodul_at cenv.topCcu envinner.ePath (curr_cpath envinner) (xml.ToXmlDoc());
-
-    // Now typecheck the signature, using mutation to fill in the submodule description. 
-    let envAtEnd = TcSignatureElements cenv parentModule endm envinner defs
-    
-    // mtypeAcc has now accumulated the module type 
-    !mtypeAcc, envAtEnd
-
-//-------------------------------------------------------------------------
-// Bind definitions within modules
-//------------------------------------------------------------------------- 
-
-let rec TcModuleOrNamespaceElement cenv parentModule scopem env e = // : ((ModuleOrNamespaceExpr list -> ModuleOrNamespaceExpr list) * _) * tcEnv =
-  eventually {
-    let tpenv = emptyTyparEnv
-    let parent = Parent(parentModule)
-    let containerInfo = ModuleOrNamespaceContainerInfo(parentModule)
-    try 
-      if verbose then  dprintf "--> TcModuleOrNamespaceElement@%a\n" output_range (range_of_syndecl e);
-      match e with 
-
-      | Def_module_abbrev (id,p,m) -> 
-          let ad = AccessRightsOfEnv env
-          let mvvs = ForceRaise (ResolveLongIndentAsModuleOrNamespace OpenQualified env.eNameResEnv ad p)
-          let modrefs = mvvs |> List.map p23 
-          if modrefs.Length > 0 && modrefs |> List.forall (fun modref -> modref.IsNamespace) then 
-              warning(Error(sprintf "This module abbreviation abbreviates the namespace '%s'. This is deprecated and ignored: module abbreviations may now only abbreviate modules" (full_display_text_of_modref (List.hd modrefs)),m));
-          let modrefs = modrefs |> List.filter (fun mvv -> not mvv.IsNamespace)
-          modrefs |> List.iter (fun modref -> CheckEntityAttributes cenv.g modref m |> CommitOperationResult);        
-          return ((fun e -> e), []), (if modrefs.Length > 0 then AddModuleAbbreviation scopem id modrefs env else env)
-
-      | Def_exn (edef,m) -> 
-          let binds,decl,env = TcExnDefn cenv env parent tpenv (edef,scopem)
-          return ((fun e -> TMDefRec([decl], FlatList.of_list binds, [],m) :: e),[]), env
-
-      | Def_tycons (tdefs,m) -> 
-          let scopem = union_ranges m scopem
-          let binds,tycons,env' = TcTyconDefns cenv env parent tpenv (tdefs,m,scopem)
-          (* check the non-escaping condition as we build the expression on the way back up *)
-          let exprfWithEscapeCheck e = 
-              let freeInEnv = GeneralizationHelpers.ComputeUnabstractableTycons env
-              tycons |> List.iter(fun tycon -> 
-                  let nm = tycon.DisplayName
-                  if Zset.mem tycon freeInEnv then errorR(Error(sprintf "The type '%s' is used in an invalid way. A value prior to '%s' has an inferred type involving '%s', which is an invalid forward reference" nm nm nm, tycon.Range)));
-              TMDefRec(tycons,FlatList.of_list binds,[],m) :: e
-          return (exprfWithEscapeCheck,[]),env'
-      | Def_partial_tycon (tcinfo,members,m) -> 
-          let scopem = union_ranges m scopem
-          let augment = PrepareTyconMemberDefns false cenv env parent (tcinfo,None,members,m)
-          let binds,env = TcTyconMemberDefns cenv env parent m scopem [augment]
-          // Check the non-escaping condition for potential trait solutions as we build the expression on the way back up 
-          
-          let exprfWithEscapeCheck e = 
-              let freeInEnv = GeneralizationHelpers.ComputeUnabstractableTraitSolutions env
-              binds |> List.iter(fun bind -> 
-                  let nm = bind.Var.DisplayName
-                  if Zset.mem bind.Var freeInEnv then errorR(Error(sprintf "The member '%s' is used in an invalid way. A use of '%s' has been inferred prior to the definition of '%s', which is an invalid forward reference" nm nm nm, bind.Var.Range)));
-              TMDefRec([],FlatList.of_list binds,[],m) :: e
-
-          (* REVIEW: record a TDecl_partial_tycon instead of mutating the type constructor *)
-          return (exprfWithEscapeCheck,[]),env 
-
-      | Def_open (mp,m) -> 
-          let scopem = union_ranges (end_range_of_range m) scopem
-          return ((fun e -> e),[]), TcOpenDecl cenv.g cenv.amap m scopem env mp
-
-      | Def_let (letrec, binds, m) -> 
-          if letrec then 
-            let scopem = union_ranges m scopem
-            let binds = binds |> List.map (fun bind -> RecBindingDefn(containerInfo,NoNewSlots,ModuleOrMemberBinding,bind))
-            let binds,env,_ = TcLetrec  WarnOnOverrides cenv env tpenv (binds,m, scopem)
-            return ((fun e -> TMDefRec([],FlatList.of_list binds,[],m) :: e),[]),env
-          else 
-            let binds,env,_ = TcLetBindings cenv env containerInfo ModuleOrMemberBinding tpenv (binds,m,scopem)
-            return ((fun e -> binds@e),[]),env 
-
-      | Def_expr (spExpr,expr, m) -> 
-
-          let bind = 
-              Binding (None,
-                       StandaloneExpression,
-                       false,false,[],emptyPreXmlDoc,SynInfo.emptyValSynData,
-                       Pat_wild m,
-                       BindingRhs([],None,expr),m,spExpr)
-
-          return! TcModuleOrNamespaceElement cenv parentModule scopem env (Def_let(false,[bind],m))
-
-      | Def_attributes (attrs,_) -> 
-          let attrs' = TcAttributesWithPossibleTargets cenv env attrTgtTop attrs
-          return ((fun e -> e), attrs'), env
-
-      | Def_hash (i,m) -> 
-          return ((fun e -> e), []), env
-
-      | Def_module(ComponentInfo(attribs,kind,parms, constraints,longPath,xml,preferPostfix,vis,im),mdefs,explicitSigOpt,m) ->
-          let id = ComputeModuleName longPath
-          let isModule =  ComputeIsModule kind parms constraints im
-
-          let modAttrs = TcAttributes cenv env attrTgtModuleDecl attribs
-          let modKind = ComputeModuleOrNamespaceKind cenv.g isModule modAttrs
-          if verbose then  dprintf "Def_module\n";
-          if isModule then CheckForDuplicateConcreteType cenv env (AdjustModuleName modKind id.idText) im;
-          if isModule then CheckForDuplicateModule cenv env id.idText id.idRange;
-          let vis,_ = ComputeAccessAndCompPath env None id.idRange vis parent
-             
-          let! (topAttrsNew, _,TMBind(mspecPriorToOuterOrExplicitSig,mexpr)),_ =
-              TcModuleOrNamespace cenv env (id,isModule,mdefs,xml,modAttrs,vis,m)
-
-          let mspec,mdef = 
-              match explicitSigOpt with 
-              | None -> mspecPriorToOuterOrExplicitSig,TMDefRec([],FlatList.empty,[TMBind(mspecPriorToOuterOrExplicitSig,mexpr)],m)
-              | Some (Sign_explicit signElements) -> 
-                  error(Error("Explicit signatures within implementation files may no longer be used",m))
- 
-#if INNER_SIGNATURES
-                  (* Take the implementation and build a new module with a different module type *)
-                  let mspecExplicitSig = mspecPriorToOuterOrExplicitSig |> NewModifiedModuleOrNamespace (fun mtyp -> mtyp)
-                  let explicitSigParent = mk_local_modref mspecExplicitSig
-                  let explicitSig,_ = TcModuleOrNamespaceSignatureElements cenv explicitSigParent env (id,modKind,signElements,m,emptyXmlDoc)
-                  mspecExplicitSig.Data.entity_modul_contents <- notlazy mtyp; 
-
-                  (* Check the module signature *)
-                  begin
-                      (* Compute the alpha-conversion mapping between type contructors in signature and implementation *)
-                      let aenv = 
-                          let remapInfo ,hidingInfo = mk_mtyp_to_mtyp_remapping mspecPriorToOuterOrExplicitSig.ModuleOrNamespaceType explicitSig
-                          { tyeq_env_empty with ae_tcrefs = tcref_map_of_list remapInfo.mrpiTycons }
-                          
-                      SignatureConformance.CheckModuleOrNamespace cenv.g cenv.amap env.DisplayEnv aenv (mk_local_modref mspecPriorToOuterOrExplicitSig) explicitSig |> ignore;
-                  end;
-
-                  mspecExplicitSig,TMAbstract(TMTyped(explicitSig,TMDefRec([],[],[TMBind(mspecPriorToOuterOrExplicitSig,mexpr)],m),im))
-#endif
-
-              |  Some (Sign_named _) -> error(Error("Modules may not use named module signature definitions",im))
-
-          PublishModuleDefn cenv env mspec; 
-          let env = AddLocalSubModule cenv.g cenv.amap m scopem env (text_of_id id) mspec
-          return ((fun e -> mdef :: e),topAttrsNew), env
-      
-    with exn -> 
-        errorRecovery exn (range_of_syndecl e); 
-        return ((fun e -> e), []),env
- }
- 
-and TcModuleOrNamespaceElements cenv parent endm (defsSoFar,env) moreDefs =
- eventually {
-    match moreDefs with 
-    | (h1 :: t) ->
-        (* lookahead one to find out the scope of the next declaration *)
-        let scopem = 
-            if isNil t then union_ranges (range_of_syndecl h1) endm
-            else union_ranges (range_of_syndecl (List.hd t)) endm
-
-        // Possibly better:
-        //let scopem = union_ranges (end_range_of_range (range_of_syndecl h1)) endm
-        
-        let! h1',env' = TcModuleOrNamespaceElement cenv parent scopem env h1
-        // tail recursive 
-        return! TcModuleOrNamespaceElements  cenv parent endm ( (h1' :: defsSoFar), env') t
-    | [] -> 
-        return List.rev defsSoFar,env
- }
-   
-and TcModuleOrNamespace cenv env (id,isModule,defs,xml,modAttrs,vis,m) =
-  eventually {
-    if verbose then  dprintf "TcModuleOrNamespace...\n";
-    let endm = end_range_of_range m
-    let modKind = ComputeModuleOrNamespaceKind cenv.g isModule modAttrs
-    let id = ident (AdjustModuleName modKind id.idText, id.idRange)
-    CheckNamespaceModuleOrTypeName id;
-    let envinner,mtypeAcc = MakeInnerEnv env id modKind
-    let cpath = (curr_cpath envinner)
-    
-    // Ensure the deref_nlpath call in UpdateAccModuleOrNamespaceType succeeds 
-    if cenv.compilingCanonicalFslibModuleType then 
-        ensure_fslib_has_submodul_at cenv.topCcu envinner.ePath cpath (xml.ToXmlDoc());
-
-    // Create the new module specification to hold the accumulated results of the type of the module 
-    // Also record this in the environment as the accumulator 
-    let mspec = NewModuleOrNamespace (Some(curr_cpath env)) vis id (xml.ToXmlDoc()) modAttrs (notlazy (empty_mtype modKind))
-
-    if !verboseStamps then 
-        dprintf "TcModuleOrNamespace: %s#%d\n" mspec.MangledName mspec.Stamp;
-
-    let innerParent = mk_local_modref mspec
-
-    // Now typecheck. 
-    let! defs',envAtEnd = TcModuleOrNamespaceElements cenv innerParent endm ([],envinner) defs 
-
-    // Get the inferred type of the decls. It's precisely the one we created before checking 
-    // and mutated as we went. Record it in the mspec. 
-    mspec.Data.entity_modul_contents <- notlazy !mtypeAcc ; 
-
-    // Apply the functions for each declaration to build the overall expression-builder 
-    let mexpr = TMDefs(List.foldBack (fun (f,_) x -> f x) defs' []) 
-
-    if verbose then  dprintf "TcModuleOrNamespace %s, created %d, vis = %s\n" mspec.MangledName mspec.Stamp (string_of_access vis);
-
-    // Collect up the attributes that are global to the file 
-    let topAttrs = List.foldBack (fun (_,y) x -> y@x) defs' []
-    
-    return (topAttrs,mspec,TMBind(mspec,mexpr)), envAtEnd
- }
-
-
-/// Set up the initial environment 
-let LocateEnv ccu env enclosingNamespacePath =
-    let cpath = cpath_of_ccu ccu
-    let env = {env with ePath = []; eCompPath = cpath; eAccessPath=cpath }
-    let env = List.fold (fun env id -> MakeInnerEnv env id Namespace |> fst) env enclosingNamespacePath
-    env
-
-let BuildTopRootedModul enclosingNamespacePath mspec = List.foldBack wrap_modul_in_namespace  enclosingNamespacePath mspec 
-        
-let BuildTopRootedModulBind enclosingNamespacePath mbind = List.foldBack wrap_mbind_in_namespace  enclosingNamespacePath mbind 
-
-//--------------------------------------------------------------------------
-// TypecheckOneImplFile - Typecheck all the namespace fragments in a file.
-//-------------------------------------------------------------------------- 
-
-let AddCcuToTcEnv(g,amap,scopem,env,ccu,autoOpens,internalsVisible) = 
-    let env = add_nonlocal_ccu g amap scopem env (ccu,internalsVisible)
-
-#if AUTO_OPEN_ATTRIBUTES_AS_OPEN
-    let env = List.fold (fun env p -> TcOpenDecl g amap scopem scopem env (path_to_lid scopem (split_namespace p))) env autoOpens
-#else
-    let env = (env,autoOpens) ||> List.fold (fun env p -> 
-                  let warn() = 
-                      warning(Error(sprintf "The attribute 'AutoOpen(\"%s\")' in the assembly '%s' did not refer to a valid module or namespace in that assembly and has been ignored" p ccu.AssemblyName,scopem));
-                      env
-                  let p = split_namespace p in 
-                  if isNil p then warn() else
-                  let h,t = List.frontAndBack p 
-                  let modref = mk_nonlocal_tcref (mk_top_nlpath ccu (Array.of_list h))  t
-                  match modref.TryDeref with 
-                  | None ->  warn()
-                  | Some _ -> open_modul g amap scopem env modref) 
-#endif
-    env
-
-let CreateInitialTcEnv(g,amap,scopem,ccus) =
-    List.fold (fun env (ccu,autoOpens,internalsVisible) -> AddCcuToTcEnv(g,amap,scopem,env,ccu,autoOpens,internalsVisible)) (empty_tenv g) ccus
-
-type conditionalDefines = 
-    string list
-
-
-/// The attributes that don't get attached to any declaration
-type topAttribs =
-    { mainMethodAttrs: Attribs;
-      netModuleAttrs: Attribs;
-      assemblyAttrs : Attribs  }
-
-let EmptyTopAttrs =
-    { mainMethodAttrs=[];
-      netModuleAttrs=[];
-      assemblyAttrs =[]  }
-
-let CombineTopAttrs topAttrs1 topAttrs2 =
-    { mainMethodAttrs = topAttrs1.mainMethodAttrs @ topAttrs2.mainMethodAttrs;
-      netModuleAttrs  = topAttrs1.netModuleAttrs @ topAttrs2.netModuleAttrs;
-      assemblyAttrs   = topAttrs1.assemblyAttrs @ topAttrs2.assemblyAttrs } 
-
-let ImplicitlyOpenOwnNamespace g amap scopem isModule lid env = 
-    assert (nonNil lid)
-    let lid = 
-        if isModule then fst (List.frontAndBack lid)
-        else lid
-    if isNil lid then 
-        env
-    else
-        let ad = AccessRightsOfEnv env
-        match ResolveLongIndentAsModuleOrNamespace OpenQualified env.eNameResEnv ad lid  with 
-        | Result modrefs -> open_moduls g amap scopem env modrefs 
-        | Exception _ ->  env
-
-
-/// Check a single fragment within an implementation file
-let TcNamespaceFragment cenv
-                 (topAttrs,env,envAtEnd,fragTypesPriorToSig,implFileBinds) 
-                 (ModuleOrNamespaceImpl(lid,isModule,defs,xml,attribs,vis,m)) =
-  eventually {               
-    if !progress then dprintn ("Typecheck implementation "^text_of_lid lid);
-    let endm = end_range_of_range m
-
-    let enclosingNamespacePath,moduleName = List.frontAndBack lid
-    let envinner = LocateEnv cenv.topCcu env enclosingNamespacePath
-    let envinner = ImplicitlyOpenOwnNamespace cenv.g cenv.amap m isModule lid envinner
-
-    let vis,_ = ComputeAccessAndCompPath envinner None endm vis ParentNone
-
-    let modAttrs = TcAttributes cenv envinner attrTgtModuleDecl attribs
-    let! (topAttrsNew,mspec,mbind), envAtEnd  = TcModuleOrNamespace cenv envinner (moduleName,isModule,defs,xml,modAttrs,vis,m)
-
-    let implFileSpecPriorToSig = BuildTopRootedModul enclosingNamespacePath mspec
-    let mbindTopRooted = BuildTopRootedModulBind enclosingNamespacePath mbind
-    let topAttrsNew = 
-        let il_main_attrs,others = topAttrsNew |> List.partition (fun (possTargets,_) -> possTargets &&& attrTgtMethod <> 0) 
-        let il_assem_attrs,others = others |> List.partition (fun (possTargets,_) -> possTargets &&& attrTgtAssembly <> 0) 
-        let il_module_attrs,others = others |> List.partition (fun (possTargets,_) -> possTargets &&& attrTgtModule <> 0)
-        { mainMethodAttrs = List.map snd il_main_attrs;
-          netModuleAttrs  = List.map snd il_module_attrs;
-          assemblyAttrs   = List.map snd il_assem_attrs}
-          
-    let env = AddLocalTopRootedModuleOrNamespace cenv.g cenv.amap m env (wrap_modul_as_mtyp_in_namespace implFileSpecPriorToSig)
-    
-    let topAttrs = CombineTopAttrs topAttrs topAttrsNew
-    let fragTypesPriorToSig = fragTypesPriorToSig@[implFileSpecPriorToSig]
-    let implFileBinds = implFileBinds @ [TMDefRec([],FlatList.empty,[mbindTopRooted],m)]
-    return (topAttrs,env,envAtEnd,fragTypesPriorToSig,implFileBinds)
- }
-
-let rec IterTyconsOfModuleOrNamespaceType f (mty:ModuleOrNamespaceType) = 
-    mty.AllEntities |> Map.iter (fun _ tycon -> f tycon);
-    mty.ModuleAndNamespaceDefinitions |> List.iter (fun v -> 
-        IterTyconsOfModuleOrNamespaceType f v.ModuleOrNamespaceType)
-
-
-/// Check an entire implementation file
-/// Typecheck, then close the inference scope and then check the file meets its signature (if any)
-let TypecheckOneImplFile 
-       (* checkWeShouldContinue: A function to help us stop reporting cascading errors *)        
-       (g,niceNameGen,amap,topCcu,checkWeShouldContinue,conditionalDefines) 
-       env 
-       (topRootedSigOpt : ModuleOrNamespaceType option)
-       (ImplFile(fileName,isScript,qualNameOfFile,scopedPragmas,_,implFileFrags,canContainEntryPoint) as implFile) =
-
- eventually {
-    let cenv = new_cenv (g,isScript,niceNameGen,amap,topCcu,false,isSome(topRootedSigOpt),conditionalDefines)    
-
-    let! (topAttrs,env,envAtEnd,fragTypesPriorToSig,implFileBinds) = 
-        ((EmptyTopAttrs,env,env,[],[]),implFileFrags) ||> Eventually.fold (TcNamespaceFragment cenv)
-
-    // Note: we currently give errors w.r.t. the display environment that includes ALL 'opens' from ALL the namespace fragments 
-    let denvAtEnd = envAtEnd.DisplayEnv
-    let fragDefn = TMDefs(implFileBinds)
-
-    // Note: unless we can do better, any errors are given w.r.t. 'qualNameOfFile.Range', i.e. the range of the leading module/namespace declaration 
-    let m = qualNameOfFile.Range
-
-    // Combine the fragments 
-    let implFileTypePriorToSig = combine_mtyps [] m (List.map wrap_modul_as_mtyp_in_namespace fragTypesPriorToSig)
-    let implFileSpecPriorToSig = wrap_mtyp_as_mspec qualNameOfFile.Id (cpath_of_ccu topCcu) implFileTypePriorToSig
-
-    // Defaults get applied before the module signature is checked and before the implementation conditions on virtuals/overrides. 
-    // Defaults get applied in priority order. Defaults listed last get priority 0 (lowest), 2nd last priority 1 etc. 
-
-    let extraAttribs = topAttrs.mainMethodAttrs@topAttrs.netModuleAttrs@topAttrs.assemblyAttrs
-    
-    let _ = 
-        try
-            let unsolved = Microsoft.FSharp.Compiler.FindUnsolved.unsolved_typars_of_mdef g cenv.amap denvAtEnd (fragDefn,extraAttribs)
-
-            if verboseCC then dprintf "calling CanonicalizePartialInferenceProblem\n" ;
-            GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv,denvAtEnd,m) unsolved;
-
-            if verboseCC then dprintf "applying defaults..." ;
-    
-            let applyDefaults priority =
-                 if verboseCC then dprintf "assigning defaults to pseudo variables at priority %d...\n" priority;
-                 unsolved |> List.iter (fun tp -> 
-                    if not (tpref_is_solved tp) then 
-                        (* Apply the first default. If we're defaulting one type variable to another then *)
-                        (* the defaults will be propagated to the new type variable. *)
-                        tp.Constraints |> List.iter (fun tpc -> 
-                            match tpc with 
-                            | TTyparDefaultsToType(priority2,ty2,m) when priority2 = priority -> 
-                                let ty1 = (mk_typar_ty tp)
-                                if (tpref_is_solved tp) || (type_equiv cenv.g ty1 ty2) then (
-                                    if verbose then dprintf "skipping solved/equal default '%s' for variable '%s' near %a at priority %d\n" ((DebugPrint.showType ty2)) ((DebugPrint.showType ty1)) output_range m priority2;
-                                ) else (
-                                    if verbose then dprintf "assigning default '%s' for variable '%s' near %a at priority %d\n" ((DebugPrint.showType ty2)) ((DebugPrint.showType ty1)) output_range m priority2;
-                                    let csenv = (MakeConstraintSolverEnv cenv.css m denvAtEnd)
-                                    TryD (fun () -> ConstraintSolver.SolveTyparEqualsTyp csenv 0 m NoTrace ty1 ty2)
-                                         (fun e -> solveTypAsError cenv denvAtEnd m ty1;
-                                                   ErrorD(ErrorFromApplyingDefault(g,denvAtEnd,tp,ty2,e,m)))
-                                    |> RaiseOperationResult;
-                                )
-                            | _ -> ()))
-                    
-            for priority = 10 downto 0 do
-                applyDefaults priority
-            done;
-
-            (* OK, now apply defaults for any unsolved HeadTypeStaticReq *)
-            unsolved |> List.iter (fun tp ->     
-                if not (tpref_is_solved tp) then 
-                    if (tp.StaticReq <> NoStaticReq) then
-                        ConstraintSolver.ChooseTyparSolutionAndSolve cenv.css envAtEnd.DisplayEnv tp);
-        with e -> errorRecovery e m
-
-    // Check completion of all classes defined across this file. 
-    // REVIEW: this is not a great technique if inner signatures are permitted to hide 
-    // virtual dispatch slots. 
-    if (checkWeShouldContinue()) then  
-        if verboseCC then dprintf "checking all virtual promises implemented...\n";
-        try implFileTypePriorToSig |> IterTyconsOfModuleOrNamespaceType (FinalTypeDefinitionChecksAtEndOfInferenceScope cenv.infoReader true denvAtEnd);
-        with e -> errorRecovery e m 
-
-    // Check the value restriction. Only checked if there is no signature.
-    if (checkWeShouldContinue() && isNone topRootedSigOpt) then 
-        if verboseCC then dprintf "checking generalization of exported things...\n";
-
-        // REVIEW: This is checking things in a somewhat arbitrary order
-        let rec check (mty:ModuleOrNamespaceType) =
-            mty.AllValuesAndMembers |> Map.iter (fun _ v -> 
-                let ftyvs = (free_in_val CollectTyparsNoCaching v).FreeTypars |> Zset.elements
-                if not v.IsCompilerGenerated && not (ftyvs |> List.exists (fun tp -> tp.IsFromError)) then 
-                  match ftyvs with 
-                  | tp :: _ -> errorR (ValueRestriction(envAtEnd.eNameResEnv.eDisplayEnv,false,v, tp,v.Range))
-                  | _ -> ());
-            mty.ModulesAndNamespacesByDemangledName |> Map.iter (fun _ v -> check v.ModuleOrNamespaceType) 
-        try check implFileTypePriorToSig with e -> errorRecovery e m
-
-
-    // Solve unsolved internal type variables 
-    if (checkWeShouldContinue()) then  
-        if verboseCC then dprintf "solving non-default unresolved typars...\n";
-
-        let unsolved = Microsoft.FSharp.Compiler.FindUnsolved.unsolved_typars_of_mdef g cenv.amap envAtEnd.DisplayEnv (fragDefn,extraAttribs)
-
-        if verboseCC then dprintf "#unsolved = %d\n" (List.length unsolved);
-
-        unsolved |> List.iter (fun tp -> 
-                if (tp.Rigidity <> TyparRigid) && not (tpref_is_solved tp) then 
-                    ConstraintSolver.ChooseTyparSolutionAndSolve cenv.css envAtEnd.DisplayEnv tp);
-
-    // Check the module matches the signature 
-    let implFileExprAfterSig = 
-        if verboseCC then dprintf "checking implementation meets signature...\n";
-        match topRootedSigOpt with 
-        | None -> 
-            (* Deep copy the inferred type of the module *)
-            let implFileTypePriorToSigCopied = 
-                if !verboseStamps then dprintf "Compilation unit type before copy:\n%s\n" (Layout.showL (Layout.squashTo 192 (EntityTypeL implFileTypePriorToSig)));
-                let res = copy_mtyp g CloneAll implFileTypePriorToSig
-                if !verboseStamps then dprintf "Compilation unit type after copy:\n%s\n" (Layout.showL (Layout.squashTo 192 (EntityTypeL res)));
-                res
-
-            TMTyped(implFileTypePriorToSigCopied,fragDefn,m)
-            
-        | Some sigFileType -> 
-
-            if verbose then dprintf "Compilation unit constrained type:\n%s\n" (Layout.showL (Layout.squashTo 192 (EntityTypeL sigFileType)));
- 
-            (* We want to show imperative type variables in any types in error messages at this late point *)
-            let denv = { envAtEnd.eNameResEnv.eDisplayEnv with showImperativeTyparAnnotations=true; }
-            begin 
-                try 
-                
-                    (* As typechecked the signature and implementation use different tycons etc. *)
-                    (* Here we (a) check there are enough names, (b) match them up to build a renaming and   *)
-                    (* (c) check subsumption up to this renaming. *)
-                    if not (SignatureConformance.CheckNamesOfModuleOrNamespace denv (mk_local_tcref implFileSpecPriorToSig) sigFileType) then 
-                        raise ReportedError;
-
-                    let remapInfo ,hidingInfo = mk_mtyp_to_mtyp_remapping implFileTypePriorToSig sigFileType
-                     
-                    (*
-                    dprintf "implFileSpecPriorToSig = \n-----------\n%s\n\n" (showL (EntityL implFileSpecPriorToSig));
-                    dprintf "modulImplTopRootedPriorToSigRemapped = \n-----------\n%s\n\n" (showL (EntityL modulImplTopRootedPriorToSigRemapped));
-                    dprintf "sigFileType = \n-----------\n%s\n\n" (showL (EntityL sigFileType));
-                    *)
-                    
-                    let aenv = { tyeq_env_empty with ae_tcrefs = tcref_map_of_list remapInfo.mrpiTycons }
-                    
-                    if not (SignatureConformance.CheckModuleOrNamespace cenv.g cenv.amap denv aenv (mk_local_modref implFileSpecPriorToSig) sigFileType) then  (
-                        (* we can just raise 'ReportedError' since CheckModuleOrNamespace raises its own error *)
-                        raise ReportedError;
-                    )
-                with e -> errorRecovery e m;
-            end;
-            if verbose then dprintf "adjusting signature...\n";
-            
-            TMTyped(sigFileType,TMDefs(implFileBinds),m)
-
-    let implFile = TImplFile(qualNameOfFile,scopedPragmas, implFileExprAfterSig)
-    
-    // We ALWAYS run the PostTypecheckSemanticChecks phase, though we if we have already encountered some
-    // errors we turn off error reporting. THis is because it performs various fixups over the TAST, e.g. 
-    // assigning nice names for inference variables.
-    try  
-        let reportErrors = checkWeShouldContinue()
-        Microsoft.FSharp.Compiler.PostTypecheckSemanticChecks.CheckTopImpl (g,cenv.amap,reportErrors,cenv.infoReader,env.eInternalsVisibleCompPaths,cenv.topCcu,envAtEnd.DisplayEnv, implFile,extraAttribs,canContainEntryPoint);
-    with e -> 
-        errorRecovery e m
-
-
-    if verbose then dprintf "<-- TypecheckOneImplFile, nm = %s\n" implFileSpecPriorToSig.MangledName;
-    return (topAttrs,implFile,envAtEnd)
- } 
-   
-/// Check a single namespace fragment in a signature file
-let TcSigFileFragment 
-        (g,niceNameGen,amap,topCcu,checkWeShouldContinue,conditionalDefines) 
-        env 
-        (ModuleOrNamespaceSpec(lid,isModule,defs,xml,attribs,vis,m)) = 
-
-    if verbose then  dprintn ("Typecheck interface "^text_of_lid lid);
-    let cenv = new_cenv (g,false,niceNameGen,amap,topCcu,true,false,conditionalDefines)
-    
-
-    let enclosingNamespacePath,id = List.frontAndBack lid
-    let envinner = LocateEnv cenv.topCcu env enclosingNamespacePath
-    let envinner = ImplicitlyOpenOwnNamespace g amap m isModule lid envinner
-    let vis,_ = ComputeAccessAndCompPath envinner None id.idRange vis ParentNone
-    let spec = (id,isModule,defs,xml,attribs,vis,m)
-      
-    let mspec,envAtEnd = TcModuleOrNamespaceSignature cenv envinner spec
-    
-    // Record the declKind-level definition of the module type, partly to be able to check if all signatures 
-    // have corresponding implementations.... 
-    let sigFileFragType = wrap_modul_as_mtyp_in_namespace (BuildTopRootedModul enclosingNamespacePath mspec)
-
-    if (checkWeShouldContinue()) then  
-        if verboseCC then dprintf "checking all virtual promises implemented...\n";
-        try sigFileFragType |> IterTyconsOfModuleOrNamespaceType (FinalTypeDefinitionChecksAtEndOfInferenceScope cenv.infoReader false envAtEnd.DisplayEnv);
-        with e -> errorRecovery e m 
-
-    sigFileFragType,envAtEnd
-
-/// Check an entire sginature file
-let TypecheckOneSigFile  
-       (g,niceNameGen,amap,topCcu,checkWeShouldContinue,conditionalDefines) 
-       tcEnv 
-       (SigFile(fileName,qualNameOfFile,_, _,sigFileFrags)) = 
- eventually {       
-    // Iterate through the namespace fragments in the signature file and check each one
-    let (tcEnvAtEnd,tcEnv,sigFileFragTypes) = 
-       ((tcEnv,tcEnv,[]) , sigFileFrags) ||> List.fold 
-           (fun // The state
-                (tcEnvAtEnd,tcEnv,sigFileFragTypes) 
-                // The input
-                (ModuleOrNamespaceSpec(lid,_,_,_,_,_,m) as mspec) ->
-              let smodulTypeTopRooted,tcEnvAtEnd = TcSigFileFragment (g,niceNameGen,amap,topCcu,checkWeShouldContinue,conditionalDefines) tcEnv mspec
-              let tcEnv = AddLocalTopRootedModuleOrNamespace g amap m tcEnv smodulTypeTopRooted
-              let sigFileFragTypes = sigFileFragTypes@[smodulTypeTopRooted]
-              tcEnvAtEnd, tcEnv,sigFileFragTypes)
-    let m = qualNameOfFile.Range
-    let sigFileType = combine_mtyps [] m sigFileFragTypes
-    return (tcEnvAtEnd,tcEnv,sigFileType)
- }
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/tc.mli b/tools/FSharp_1.9.6.16/source/fsharp/tc.mli
deleted file mode 100644
index 96ab5711..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/tc.mli
+++ /dev/null
@@ -1,109 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-module (* internal *) Microsoft.FSharp.Compiler.TypeChecker
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler 
-
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Infos
-
-[]
-type tcEnv =
-    member DisplayEnv : DisplayEnv
-
-(* Incremental construction of environments, e.g. for F# Interactive *)
-val internal CreateInitialTcEnv        : Env.TcGlobals * Import.ImportMap * range * (ccu * string list * bool) list -> tcEnv 
-val internal AddCcuToTcEnv             : Env.TcGlobals * Import.ImportMap * range * tcEnv * ccu * autoOpens: string list * bool -> tcEnv 
-val internal AddLocalTopRootedModuleOrNamespace : Env.TcGlobals -> Import.ImportMap -> range -> tcEnv -> ModuleOrNamespaceType -> tcEnv
-val internal TcOpenDecl         : Env.TcGlobals -> Import.ImportMap -> range -> range -> tcEnv -> Ast.LongIdent -> tcEnv 
-
-type topAttribs =
-    { mainMethodAttrs : Attribs;
-      netModuleAttrs  : Attribs;
-      assemblyAttrs   : Attribs  }
-
-type conditionalDefines = 
-    string list
-
-val internal EmptyTopAttrs : topAttribs
-val internal CombineTopAttrs : topAttribs -> topAttribs -> topAttribs
-
-val internal TypecheckOneImplFile : 
-      Env.TcGlobals * NiceNameGenerator * Import.ImportMap * ccu * (unit -> bool) * conditionalDefines
-      -> tcEnv 
-      -> Tast.ModuleOrNamespaceType option
-      -> implFile
-      -> Eventually
-
-val internal TypecheckOneSigFile : 
-      Env.TcGlobals * NiceNameGenerator * Import.ImportMap * ccu  * (unit -> bool) * conditionalDefines
-      -> tcEnv                             
-      -> sigFile
-      -> Eventually
-
-(*-------------------------------------------------------------------------
- * exceptions arising from type checking 
- *------------------------------------------------------------------------- *)
-
-exception internal BakedInMemberConstraintName of string * range
-exception internal FunctionExpected of DisplayEnv * typ * range
-exception internal NotAFunction of DisplayEnv * typ * range * range
-exception internal Recursion of DisplayEnv * Ast.ident * typ * typ * range
-exception internal RecursiveUseCheckedAtRuntime of DisplayEnv * ValRef * range
-exception internal LetRecEvaluatedOutOfOrder of DisplayEnv * ValRef * ValRef * range
-exception internal LetRecCheckedAtRuntime of range
-exception internal LetRecUnsound of DisplayEnv * ValRef list * range
-exception internal TyconBadArgs of DisplayEnv * TyconRef * int * range
-exception internal UnionCaseWrongArguments of DisplayEnv * int * int * range
-exception internal UnionCaseWrongNumberOfArgs of DisplayEnv * int * int * range
-exception internal FieldsFromDifferentTypes of DisplayEnv * RecdFieldRef * RecdFieldRef * range
-exception internal FieldGivenTwice of DisplayEnv * RecdFieldRef * range
-exception internal MissingFields of string list * range
-exception internal UnitTypeExpected of DisplayEnv * Tast.typ * bool * range
-exception internal FunctionValueUnexpected of DisplayEnv * Tast.typ * range
-exception internal UnionPatternsBindDifferentNames of range
-exception internal VarBoundTwice of Ast.ident
-exception internal ValueRestriction of DisplayEnv * bool * Val * Typar * range
-exception internal FieldNotMutable of DisplayEnv * RecdFieldRef * range
-exception internal ValNotMutable of DisplayEnv * ValRef * range
-exception internal ValNotLocal of DisplayEnv * ValRef * range
-exception internal InvalidRuntimeCoercion of DisplayEnv * typ * typ * range
-exception internal IndeterminateRuntimeCoercion of DisplayEnv * typ * typ * range
-exception internal IndeterminateStaticCoercion of DisplayEnv * typ * typ * range
-exception internal StaticCoercionShouldUseBox of DisplayEnv * typ * typ * range
-exception internal RuntimeCoercionSourceSealed of DisplayEnv * typ * range
-exception internal CoercionTargetSealed of DisplayEnv * typ * range
-exception internal UpcastUnnecessary of range
-exception internal TypeTestUnnecessary of range
-exception internal SelfRefObjCtor of bool * range
-exception internal VirtualAugmentationOnNullValuedType of range
-exception internal NonVirtualAugmentationOnNullValuedType of range
-exception internal UseOfAddressOfOperator of range
-exception internal DeprecatedThreadStaticBindingWarning of range
-exception internal NotUpperCaseConstructor of range
-exception internal IntfImplInIntrinsicAugmentation of range
-exception internal IntfImplInExtrinsicAugmentation of range
-exception internal OverrideInIntrinsicAugmentation of range
-exception internal OverrideInExtrinsicAugmentation of range
-exception internal NonUniqueInferredAbstractSlot of Env.TcGlobals * DisplayEnv * string * MethInfo * MethInfo * range
-exception internal IndexOutOfRangeExceptionWarning of range
-exception internal StandardOperatorRedefinitionWarning of string * range
-exception internal ParameterlessStructCtor of range
-
-val internal TcFieldInit : range -> ILFieldInit -> Tast.Constant
-val public nenv_of_tenv : tcEnv -> Nameres.NameResolutionEnv
-val public items_of_tenv : tcEnv -> Nameres.NamedItem NameMap
-
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/tlr.ml b/tools/FSharp_1.9.6.16/source/fsharp/tlr.ml
deleted file mode 100644
index 4c20d9e9..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/tlr.ml
+++ /dev/null
@@ -1,1357 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-#light
-
-module internal Microsoft.FSharp.Compiler.Tlr 
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library 
-
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.Layout
-open Microsoft.FSharp.Compiler.Detuple.GlobalUsageAnalysis
-open Microsoft.FSharp.Compiler.Lib
-
-let verboseTLR = false
-
-/// Turns on explicit lifting of TLR constants to toplevel
-/// e.g. use true if want the TLR constants to be initialised once.
-///
-/// NOTE: liftTLR is incomplete and disabled
-///       Approach is to filter Top* let binds whilst "under lambdas",
-///       and wrap them around that expr ASAP (when get to TopLevel position).
-///       However, for arity assigned public vals (not TLR at moment),
-///       assumptions that their RHS are lambdas get broken since the
-///       lambda can be wrapped with bindings...
-let liftTLR    = ref false
-
-//-------------------------------------------------------------------------
-// library helpers
-//-------------------------------------------------------------------------
-
-let internalError str = dprintf "Error: %s\n" str;raise (Failure str)  
-
-module Zmap = 
-    let force k   mp (str,soK) = try Zmap.find k mp with e -> dprintf "forceM': %s %s\n" str (soK k); raise e
-
-let forceM' k   mp (str,soK) = try Zmap.find k mp with e -> dprintf "forceM: %s %s\n" str (soK k); raise e
-
-//-------------------------------------------------------------------------
-// misc
-//-------------------------------------------------------------------------
-
-/// tree, used to store dec sequence 
-type 'a tree =
-    | TreeNode of 'a tree list
-    | LeafNode of 'a
-
-let fringeTR tr =
-    let rec collect tr acc =
-        match tr with
-        | TreeNode subts -> List.foldBack collect subts acc
-        | LeafNode x     -> x::acc
-   
-    collect tr []
-
-let emptyTR = TreeNode[]
-
-
-//-------------------------------------------------------------------------
-// misc
-//-------------------------------------------------------------------------
-
-/// Collapse reclinks on app and combine apps if possible 
-/// recursive ids are inside reclinks and maybe be type instanced with a TExpr_app 
-
-// CLEANUP NOTE: mk_appl ensures applications are kept in a collapsed 
-// and combined form, so this function should not be needed 
-let DestApp (f,fty,tys,args,m) =
-    match strip_expr f with
-    | TExpr_app (f2,fty2,tys2,[]     ,m2) -> (f2,fty2,tys2 @ tys,args,m)
-    | TExpr_app (f2,fty2,tys2,argtys2,m2) -> (f,fty,tys,args,m) (* has args, so not combine ty args *)
-    | f                                   -> (f,fty,tys,args,m)
-
-let soTyparSet tps = showL (commaListL (List.map TyparL (Zset.elements tps)))    
-let soTyp t = (DebugPrint.showType t)    
-let soLength xs = string (List.length xs)
-
-// CLEANUP NOTE: don't like the look of this function - this distinction 
-// should never be needed 
-let isDelayedRepr (f:Val) e = 
-    let tps,vss,b,rty = dest_top_lambda (e,f.Type)
-    List.length vss>0
-
-
-// REVIEW: these should just be replaced by direct calls to mk_local, mk_compgen_local etc. 
-// REVIEW: However these set an arity whereas the others don't 
-let mkLocalNameTypeArity compgen m name ty topValInfo =
-    NewVal(ident(name,m),ty,Immutable,compgen,topValInfo,None,taccessPublic,ValNotInRecScope,None,NormalVal,[],OptionalInline,emptyXmlDoc,false,false,false,false,None,ParentNone)
-
-let mkLocal m name ty = mkLocalNameTypeArity true m name ty None
-
-//-------------------------------------------------------------------------
-// definitions: TLR, arity, arity-met, arity-short
-//-------------------------------------------------------------------------
-
-(* DEFN: An f is TLR with arity wf if
-         (a) it's repr is "LAM tps. lam x1...xN. body" and have N<=wf (i.e. have enough args)
-         (b) it has no free tps
-         (c) for g:freevars(repr), both
-             (1) g is TLR with arity wg, and
-             (2) g occurs in arity-met occurance.
-         (d) if N=0, then further require that body be a TLR-constant.
-
-   Conditions (a-c) are required if f is to have a static method/field represenation.
-   Condition (d) chooses which constants can be lifted. (no effects, non-trivial).
-
-   DEFN: An arity-met occurance of g is a g application with enough args supplied,
-         ie. (g tps args) where wg <= |args|.
-
-   DEFN: An arity-short occurance does not have enough args.
-
-   DEFN: A TLR-constant:
-         - can have constructors (tuples, datatype, records, exn).
-         - should be non-trivial (says, causes allocation).
-         - if calls are allowed, they must be effect free (since eval point is moving).
-*)
-
-
-//-------------------------------------------------------------------------
-// OVERVIEW
-//-------------------------------------------------------------------------
-
-(* Overview of passes (over term) and steps (not over term):
-
-   pass1 - decide which f will be TLR and determine their arity.
-   pass2 - what closures are needed? Finds etps(f) and envReq(f) for TLR f.
-           Depends on the arity choice, so must follow pass1.
-   step3 - choose env packing, create fHats.
-   pass4 - rewrite term fixing up definitions and callsites.
-           Depends on closure and env packing, so must follow pass2 (and step 3).
-   pass5 - copy_expr call to topexpr to ensure all bound ids are unique.
-           For complexity reasons, better to re-recurse over expr once.
-   pass6 - sanity check, confirm that all TLR marked bindings meet DEFN.
-
-*)   
-
-//-------------------------------------------------------------------------
-// pass1: GetValsBoundUnderMustInline (see comment further below)
-//-------------------------------------------------------------------------
-
-let GetValsBoundUnderMustInline ccu xinfo =
-    let accRejectFrom (v:Val) repr rejectS =
-      if v.InlineInfo = PseudoValue then
-        Zset.union (GetValsBoundInExpr repr) rejectS
-      else rejectS
-    let rejectS = Zset.empty val_spec_order
-    let rejectS = Zmap.fold accRejectFrom xinfo.xinfo_eqns rejectS
-    rejectS
-
-//-------------------------------------------------------------------------
-// pass1: isTLRConstant
-//-------------------------------------------------------------------------
-
-(*
-let rec trivialExpr x =
-  match x with
-  | TExpr_val _                       -> true
-  | TExpr_op(TOp_ucase (_),tyargs,[],_)    -> true
-  | TExpr_const _                     -> true
-  | TExpr_app((f0,f0ty),tyargsl,[],m) -> not (is_tyfunc_vref_expr f0) && trivialExpr f0
-  | _                                 -> false
-
-let rec const_expr x =
-  (* For now: constructions around constants
-   * Later, can also refer to *PRIOR* TLR constants (i.e. CSE) - need declaration order.
-   *)
-  match x with
-  | TExpr_const _                    -> true
-  | TExpr_op(TOp_tuple, tys,args,m)        -> const_exprs args
-  | TExpr_op(TOp_ucase cr,tinst,args,m)   -> const_exprs args && not (tcref_alloc_observable (fst cr))
-  | TExpr_op(TOp_recd   (ctor,tcr),tinst,args,m)  -> ctor = None && const_exprs args && not (tcref_alloc_observable tcr)
-(*| TExpr_lambda _ | TExpr_tlambda _ -> true -- these should be ok *)
-(*| could also allow calls to functions which have no known effect *)
-  | _                                -> false
-and const_exprs es = List.forall const_expr es
-
-let isTLRConstant x = const_expr x && not (trivialExpr x)
-*)
-
-//-------------------------------------------------------------------------
-// pass1: IsRefusedTLR
-//-------------------------------------------------------------------------
-       
-let IsRefusedTLR g (f:Val) =  
-    let mutableVal = f.IsMutable
-    // things marked NeverInline are special 
-    let dllImportStubOrOtherNeverInline = (f.InlineInfo = NeverInline)
-    // Cannot have static fields of byref type 
-    let byrefVal = is_byref_typ g f.Type
-    // Special values are instance methods etc. on .NET types.  For now leave these alone 
-    let specialVal = isSome(f.MemberInfo)
-    let alreadyChosen = f.TopValInfo.IsSome
-    let refuseTest = alreadyChosen || mutableVal || byrefVal || specialVal || dllImportStubOrOtherNeverInline
-    refuseTest
-
-let IsMandatoryTopLevel (f:Val) = 
-    let specialVal = isSome(f.MemberInfo)
-    let isModulBinding = f.IsMemberOrModuleBinding
-    specialVal || isModulBinding
-
-let IsMandatoryNonTopLevel g (f:Val) =
-    let byrefVal = is_byref_typ g f.Type
-    byrefVal
-
-
-//-------------------------------------------------------------------------
-// pass1: decide which f are to be TLR? and if so, arity(f)
-//-------------------------------------------------------------------------
-
-module Pass1_DetermineTLRAndArities = 
-
-    let GetMaxNumArgsAtUses xinfo f =
-       match Zmap.tryfind f xinfo.xinfo_uses with
-       | None       -> 0 (* no call sites *)
-       | Some sites -> 
-           sites |> List.map (fun (accessors,tinst,args) -> List.length args) |> List.max
-
-    let SelectTLRVals g xinfo f e =
-        if IsRefusedTLR g f then None 
-        else if Zset.mem f xinfo.xinfo_dtree then None
-        else
-            (* Could the binding be TLR? with what arity? *)
-            let atTopLevel = Zset.mem f xinfo.xinfo_toplevel
-            let tps,vss,b,rty = dest_top_lambda (e,f.Type)
-            let nFormals    = List.length vss
-            let nMaxApplied = GetMaxNumArgsAtUses xinfo f  
-            let arity       = Operators.min nFormals nMaxApplied
-            if atTopLevel or arity<>0 or nonNil tps then Some (f,arity)
-            else None
-
-    /// Check if f involves any value recursion (so can skip those).
-    /// ValRec considered: recursive && some f in mutual binding is not bound to a lambda
-    let IsValueRecursionFree xinfo f =
-
-        let hasDelayedRepr f = isDelayedRepr f (forceM' f xinfo.xinfo_eqns ("IsValueRecursionFree - hasDelayedRepr",name_of_val))
-        let recursive,mudefs = forceM' f xinfo.xinfo_mubinds ("IsValueRecursionFree",name_of_val)
-        not recursive || FlatList.forall hasDelayedRepr mudefs
-
-    let DumpArity arityM =
-        let dump f n = dprintf "tlr: arity %50s = %d\n" (showL (valL f)) n
-        Zmap.iter dump arityM
-
-    let DetermineTLRAndArities ccu g expr  =
-       if verboseTLR then dprintf "DetermineTLRAndArities------\n";
-       let xinfo = GetUsageInfoOfImplFile g expr
-       let fArities = Zmap.chooseL (SelectTLRVals g xinfo) xinfo.xinfo_eqns
-       let fArities = List.filter (fst >> IsValueRecursionFree xinfo) fArities
-       // Do not TLR v if it is bound under a mustinline defn 
-       // There is simply no point - the original value will be duplicated and TLR'd anyway 
-       // However we could report warnings for such values as they lead to duplication 
-       // which could be avoided by making inlineable versions of the TLR'd values 
-       // also available. 
-       let rejectS = GetValsBoundUnderMustInline ccu xinfo
-       let fArities = List.filter (fun (v,_) -> not (Zset.mem v rejectS)) fArities
-       (*-*)
-       let tlrS   = Zset.of_list val_spec_order (List.map fst fArities)
-       let topValS   = xinfo.xinfo_toplevel in                    (* genuinely top level *)
-       let topValS   = Zset.filter (IsMandatoryNonTopLevel g >> not) topValS in    (* restrict *)
-    (*
-       let fUsedOnce = Zmap.List.choose (selectUsedOnce g xinfo) xinfo.xinfo_eqns
-       let fUsedOnce = List.filter (isInRecursiveBinding xinfo >> not) fUsedOnce
-       let fUsedOnce = List.filter (fun v -> not (Zset.mem v rejectS)) fUsedOnce
-       let fUsedOnce = List.filter (fun v -> not (Zset.mem v tlrS)) fUsedOnce
-       let fUsedOnce = List.filter (fun v -> not (Zset.mem v topValS)) fUsedOnce
-       dprintf "#fUsedOnce = %d\n" (List.length fUsedOnce);
-       fUsedOnce |> List.iter (fun v -> v.Data.val_mustinline <- PseudoValue);
-    *)
-       (* REPORT MISSED CASES *)
-       begin 
-         if verboseTLR then 
-           let missed = Zset.diff  xinfo.xinfo_toplevel tlrS
-           missed |> Zset.iter (fun v -> dprintf "TopLevel but not TLR = %s\n" v.MangledName) 
-       end;
-       (* REPORT OVER *)   
-       let arityM = Zmap.of_list val_spec_order fArities
-       if verboseTLR then DumpArity arityM;
-       tlrS,topValS, arityM
-
-     
-
-(* NOTES:
-   For constants,
-     Want to fold in a declaration order,
-     so can make decisions about TLR given TLR-knowledge about prior constants.
-     Assuming ilxgen will fix up initialisations.
-   So,
-     xinfo to be extended to include some scoping representation.
-     Maybe a telescope tree which can be walked over.
- *)
-
-//-------------------------------------------------------------------------
-// pass2: determine etps(f) and envreq(f) - notes
-//-------------------------------------------------------------------------
-
-/// What are the closing types/values for {f1,f2...} mutally defined?
-///
-//   Note: arity-met g-applications (g TLR) will translated as:
-//           [[g @ tps ` args]] -> gHAT @ etps(g) tps ` env(g) args
-//         so they require availability of closing types/values for g.
-//
-//   If g is free wrt f1,f2... then g's closure must be included.
-//
-//   Note: mutual definitions have a common closure.
-//
-//   For f1,f2,... = fBody1,fbody2... mutual bindings:
-//
-//   DEFN: The generators are the free-values of fBody1,fBody2...
-//  
-//   What are the closure equations?
-//
-//   etps(f1,f2..)    includes free-tps(f)
-//   etps(f1,f2..)    includes etps(g) if fBody has arity-met g-occurance (g TLR).
-//
-//   envReq(f1,f2...) includes ReqSubEnv(g) if fBody has arity-met   g-occurance (g TLR)
-//   envReq(f1,f2...) includes ReqVal(g)    if fBody has arity-short g-occurance (g TLR)
-//   envReq(f1,f2...) includes ReqVal(g)    if fBody has g-occurance (g not TLR)
-//
-//   and only collect requirements if g is a generator (see next notes).
-//
-//   Note: "env-availability"
-//     In the translated code, env(h) will be defined at the h definition point.
-//     So, where-ever h could be called (recursive or not),
-//     the env(h) will be available (in scope).
-//   
-//   Note (subtle): "sub-env-requirement-only-for-generators"
-//     If have an arity-met call to h inside fBody, but h is not a freevar for f,
-//     then h does not contribute env(h) to env(f), the closure for f.
-//     It is true that env(h) will be required at the h call-site,
-//     but the env(h) will be available there (by "env-availability"),
-//     since h must be bound inside the fBody since h was not a freevar for f.
-//     .
-//     [note, f and h may mutally recurse and formals of f may be in env(h),
-//      so env(f) may be properly inside env(h),
-//      so better not have env(h) in env(f)!!!].
-
-
-/// The subset of ids from a mutal binding that are chosen to be TLR.
-/// They share a common env.
-/// [Each fclass has an env, the fclass are the handles to envs.]
-type fclass =
-    FC of FlatVals
-
-let fclass_order ccu = orderOn (fun (FC fs) -> fs) (FlatList.order val_spec_order)
-let fclassPairs ((FC fs) as fc) = fs |> FlatList.map (fun f -> (f,fc)) 
-let memFC (f:Val) (FC fs) = fs |> FlatList.exists (fun v -> v.Stamp = f.Stamp) 
-let isEmptyFC (FC fs) = FlatList.isEmpty fs
-let showFC (FC fs) = "+" + String.concat "+" (FlatList.map name_of_val fs)
-
-/// It is required to make the TLR closed wrt it's freevars (the env generators).
-/// For g a generator,
-///   An arity-met g occurance contributes the env required for that g call.
-///   Other occurances contribute the value g.
-type envItem =
-    | ReqSubEnv of Val
-    | ReqVal    of Val
-
-let envItem_order ccu =
-    let rep = function
-        ReqSubEnv v -> true ,v
-      | ReqVal    v -> false,v
-   
-    orderOn rep (Pair.order (Bool.order,val_spec_order))
-
-/// An env says what is needed to close the corresponding defn(s).
-/// The etps   are the free etps of the defns, and those required by any direct TLR arity-met calls.
-/// The envReq are the ids/subEnvs required from calls to freeVars.
-type env =
-   { etps   : Typar Zset.set;
-     envReq : envItem    Zset.set;
-     m      : Range.range; }
-   
-let env0 ccu m =
-    {etps   = Zset.empty typar_spec_order;
-     envReq = Zset.empty (envItem_order ccu);
-     m      = m }
-
-let extendEnv (typars,items) env = 
-     {env with
-            etps   = Zset.addList typars env.etps;
-            envReq = Zset.addList items  env.envReq}
-
-let envSubEnvs env =
-    let select = function ReqSubEnv f -> Some f | ReqVal _ -> None
-    List.choose select (Zset.elements env.envReq)
-
-let envVals env =
-    let select = function ReqSubEnv f -> None | ReqVal f -> Some f
-    List.choose select (Zset.elements env.envReq)
-     
-(*--debug-stuff--*)
-
-let showEnvItem = function
-  | ReqSubEnv f -> "&" ^ f.MangledName
-  | ReqVal    f -> f.MangledName
-
-let soEnv env =
-    (showL (commaListL (List.map TyparL (Zset.elements (env.etps))))) ^ "--" ^ 
-    (String.concat "," (List.map showEnvItem (Zset.elements env.envReq)))
-
-
-//-------------------------------------------------------------------------
-// pass2: collector - state
-//-------------------------------------------------------------------------
-
-type generators = Val Zset.set
-
-/// check a named function value applied to sufficient arguments 
-let IsArityMet (vref:ValRef)  wf tys args = 
-  (List.length tys = vref.Typars.Length) && (wf <= List.length args) 
-
-
-module Pass2_DetermineTLREnvs = 
-
-
-    // IMPLEMENTATION PLAN:
-    //
-    // fold over expr.
-    //
-    // - at an instance g,
-    //   - (a) g arity-met,   LogRequiredFrom g - ReqSubEnv(g) -- direct call will require env(g) and etps(g)
-    //   - (b) g arity-short, LogRequiredFrom g - ReqVal(g)    -- remains g call
-    //   - (c) g non-TLR,     LogRequiredFrom g - ReqVal(g)    -- remains g
-    //  where
-    //   LogRequiredFrom g ... = logs info into (generators,env) if g in generators.
-    //
-    // - at some mu-bindings, f1,f2... = fBody1,fBody2,...
-    //  "note generators, push (generators,env), fold-over bodies, pop, fold rest"
-    //   
-    //  - let fclass = ff1,... be the fi which are being made TLR.
-    //  - required to find an env for these.
-    //  - start a new envCollector:
-    //      freetps = freetypars of (fBody1,fBody2,...)
-    //      freevs  = freevars   of ..
-    //      initialise:
-    //        etps       = freetps
-    //        envReq     = []      -- info collected from generator occurances in bindings
-    //        generators = freevs
-    //  - fold bodies, collecting info for generators.
-    //  - pop and save env.
-    //    - note: - etps(fclass) are only the freetps
-    //            - they need to include etps(g) for each direct call to g (g a generator for fclass)
-    //            - the etps(g) may not yet be known,
-    //              e.g. if we are inside the definition of g and had recursively called it.
-    //            - so need to FIX up the etps(-) function when collected info for all fclass.
-    //  - fold rest (after binding)
-    //
-    // fix up etps(-) according to direct call dependencies.
-    //
-
-
-    /// This state collects:
-    ///   envM          - fclass -> env
-    ///   fclassM       - f      -> fclass
-    ///   declist       - fclass list
-    ///   recShortCallS - the f which are "recursively-called" in arity short instance.
-    ///
-    /// When walking expr, at each mutual binding site,
-    /// push a (generator,env) collector frame on stack.
-    /// If occurances in body are relevant (for a generator) then it's contribution is logged.
-    ///
-    /// recShortCalls to f will require a binding for f in terms of fHat within the fHatBody.
-    type state =
-        { stack         : (fclass * generators * env) list;
-          envM          : Zmap.map;
-          fclassM       : Zmap.map;
-          revDeclist    : fclass list;
-          recShortCallS : Zset.set;
-        }
-
-    let state0 ccu =
-        { stack         = [];
-          envM          = Zmap.empty (fclass_order ccu);
-          fclassM       = Zmap.empty val_spec_order;
-          revDeclist    = [];
-          recShortCallS = Zset.empty val_spec_order; }
-
-    let soVSet fs = (showL (commaListL (List.map valL (Zset.elements fs))))
-
-    /// PUSH = start collecting for fclass 
-    let PushFrame ccu fclass (etps0,generators,m) state =
-        if isEmptyFC fclass then state else
-          ( (if verboseTLR then dprintf "PushFrame: %s\n - generators = %s\n" (showFC fclass) (soVSet generators));
-            {state with
-               revDeclist = fclass :: state.revDeclist;
-               stack = (let env = extendEnv (etps0,[]) (env0 ccu m) in (fclass,generators,env)::state.stack); })
-
-    /// POP & SAVE = end collecting for fclass and store 
-    let SaveFrame     fclass state = 
-        if isEmptyFC fclass then state else
-        if verboseTLR then dprintf "SaveFrame: %s\n" (showFC fclass);
-        match state.stack with
-        | []                             -> internalError "trl: popFrame has empty stack"
-        | (fclass,generators,env)::stack -> (* ASSERT: same fclass *)
-            {state with
-               stack      = stack;
-               envM       = Zmap.add  fclass env   state.envM;
-               fclassM    = FlatList.fold (fun mp (k,v) -> Zmap.add k v mp) state.fclassM (fclassPairs fclass) }
-
-    /// Log requirements for g in the relevant stack frames 
-    let LogRequiredFrom g items state =
-        let logIntoFrame (fclass,generators,env) =
-           let env = 
-               if Zset.mem g generators then
-                   // dprintf "          : logging for generators=%s\n" (soVSet generators); 
-                   let typars = []
-                   extendEnv (typars,items) env
-               else env
-         
-           fclass,generators,env
-       
-        {state with stack = List.map logIntoFrame state.stack}
-
-    let LogShortCall g state =
-        let frameFor g (fclass,generators,env) = memFC g fclass
-        if List.exists (frameFor g) state.stack then
-          ((if verboseTLR then dprintf "shortCall:     rec: %s\n" g.MangledName);
-           (* Have short call to g within it's (mutual) definition(s) *)
-           {state with
-               recShortCallS = Zset.add g state.recShortCallS})
-        else
-          ((if verboseTLR then dprintf "shortCall: not-rec: %s\n" g.MangledName);
-           state)
-
-    let getEnv f state =
-        match Zmap.tryfind f state.fclassM with
-        | Some fclass -> (* env(f) is known, f prior *)
-                         ((if verboseTLR then dprintf "getEnv: fclass=%s\n" (showFC fclass));
-                          let env = forceM' fclass state.envM ("getEnv",showFC)
-                          Some env)
-        | None        -> (* env(f) unknown, perhaps in body of it's defn *)
-                         None
-
-
-
-    let FreeInBindings bs = FlatList.fold (foldOn (free_in_rhs CollectTyparsAndLocals) union_freevars) empty_freevars bs
-
-    /// Intercepts selected exprs.
-    ///   "letrec f1,f2,... = fBody1,fBody2,... in rest" - 
-    ///   "val v"                                        - free occurance
-    ///   "app (f,tps,args)"                             - occurance
-    ///
-    /// On intercepted nodes, must exprF fold to collect from subexpressions.
-    let ExprEnvIntercept ccu (tlrS,arityM) exprF z expr = 
-         let accInstance z (fvref,tps,args) (* f known local *) = 
-             let f = deref_val fvref
-             match Zmap.tryfind f arityM with
-             
-             | Some wf -> 
-                 // f is TLR with arity wf 
-                 if IsArityMet fvref wf tps args then
-                     // arity-met call to a TLR g 
-                     LogRequiredFrom f [ReqSubEnv f] z                 
-                 else
-                     // arity-short instance 
-                     let z = LogRequiredFrom f [ReqVal f] z          
-                     // LogShortCall - logs recursive short calls 
-                     let z = LogShortCall f z                   
-                     z
-             
-             | None    -> 
-                 // f is non-TLR 
-                 LogRequiredFrom f [ReqVal f] z                    
-        
-         let accBinds m z (binds: Bindings) =
-             let tlrBs,nonTlrBs = binds |> FlatList.partition (fun b -> Zset.mem b.Var tlrS) 
-             // For bindings marked TLR, collect implied env 
-             let fclass = FC (vars_of_Bindings tlrBs)
-             // what determines env? 
-             let frees      = FreeInBindings tlrBs
-             let etps0      = frees.FreeTyvars.FreeTypars   |> Zset.elements      (* put in env *)
-             // occurances contribute to env 
-             let generators = (frees.FreeLocals |> Zset.elements) 
-             // tlrBs are not generators for themselves 
-             let generators = List.filter (fun g -> not (memFC g fclass)) generators
-             let generators = Zset.of_list val_spec_order generators
-             // collect into env over bodies 
-             let z          = PushFrame ccu fclass (etps0,generators,m) z
-             let z          = FlatList.fold (foldOn rhs_of_bind exprF) z tlrBs
-             let z          = SaveFrame     fclass z
-             (* for bindings not marked TRL, collect *)
-             let z          = FlatList.fold (foldOn rhs_of_bind exprF) z nonTlrBs
-             z
-        
-         match expr with
-         | TExpr_val (v,_,m) -> 
-             let z = accInstance z (v,[],[])
-             Some z
-         | TExpr_op (TOp_lval_op (_,v),tys,args,m) -> 
-             let z = accInstance z (v,[],[])
-             let z = List.fold exprF z args
-             Some z
-         | TExpr_app (f,fty,tys,args,m) -> 
-             let f,fty,tys,args,m = DestApp (f,fty,tys,args,m)
-             match f with
-             | TExpr_val (f,_,_) ->
-                  // // YES: APP vspec tps args - log 
-                 let z = accInstance z (f,tys,args)
-                 let z = List.fold exprF z args
-                 Some z
-             | _ ->
-                 (* NO: app, but function is not val - no log *)
-                 None
-         | TExpr_letrec (binds,body,m,_) -> 
-             let z = accBinds m z binds
-             let z = exprF z body
-             Some z
-         | TExpr_let    (bind,body,m,_) -> 
-             let z = accBinds m z (FlatList.one bind)
-             let z = exprF z body
-             Some z
-         | _ -> None (* NO: no intercept *)
-        
-
-    /// Initially, etps(fclass) = freetps(bodies).
-    /// For each direct call to a g, a generator for fclass,
-    /// Required to include the etps(g) in etps(fclass).
-    let CloseEnvETps fclassM envM =
-        if verboseTLR then dprintf "CloseEnvETps------\n";
-        let etpsFor envM f =
-            let fc  = forceM' f  fclassM ("etpsFor",name_of_val)
-            let env = forceM' fc envM    ("etpsFor",showFC)       
-            env.etps
-       
-        let closeStep envM changed fc env =
-            let directCallFs   = envSubEnvs env
-            let directCallETps = List.map (etpsFor envM) directCallFs
-            let etps0 = env.etps
-            let etps  = List.fold Zset.union etps0 directCallETps
-            let changed = changed || (not (Zset.equal etps0 etps))
-            let env   = {env with etps = etps}
-            if verboseTLR then 
-                dprintf "closeStep: fc=%30s nSubs=%d etps0=%s etps=%s\n" (showFC fc) directCallFs.Length (soTyparSet etps0) (soTyparSet etps);
-                directCallFs |> List.iter (fun f    -> dprintf "closeStep: dcall    f=%s\n" f.MangledName)          
-                directCallFs |> List.iter (fun f    -> dprintf "closeStep: dcall   fc=%s\n" (showFC (Zmap.find f fclassM)))
-                directCallETps |> List.iter (fun etps -> dprintf "closeStep: dcall etps=%s\n" (soTyparSet etps0)) 
-            changed,env
-       
-        let rec fixpoint envM =
-            let changed = false
-            let changed,envM = Zmap.fmap (closeStep envM) changed envM
-            if changed then
-                fixpoint envM
-            else
-                envM
-       
-        fixpoint envM
-
-    let DumpEnvM envM =
-        let dump fc env = dprintf "CLASS=%s\n env=%s\n" (showFC fc) (soEnv env)
-        Zmap.iter dump envM
-
-    let DetermineTLREnvs ccu (tlrS,arityM) expr =
-        if verboseTLR then dprintf "DetermineTLREnvs------\n";
-        let folder = {ExprFolder0 with exprIntercept = ExprEnvIntercept ccu (tlrS,arityM)}
-        let z = state0 ccu
-        let z = FoldImplFile folder z expr
-        (* project *)
-        let envM          = z.envM
-        let fclassM       = z.fclassM
-        let declist       = List.rev z.revDeclist
-        let recShortCallS = z.recShortCallS
-        (* diagnostic dump *)
-        (if verboseTLR then DumpEnvM envM);
-        (* close the etps under the subEnv reln *)
-        let envM    = CloseEnvETps fclassM envM
-        (* filter out trivial fclass - with no TLR defns *)
-        let envM    = Zmap.remove (FC FlatList.empty) envM
-        (* restrict declist to those with envM bindings (the non-trivial ones) *)
-        let declist = List.filter (Zmap.mem_of envM) declist
-        (* diagnostic dump *)
-        if verboseTLR then
-             DumpEnvM envM;
-             declist |> List.iter (fun fc -> dprintf "Declist: %s\n" (showFC fc)) 
-             recShortCallS |> Zset.iter (fun f -> dprintf "RecShortCall: %s\n" f.MangledName) 
-
-        envM,fclassM,declist,recShortCallS 
-
-//-------------------------------------------------------------------------
-// step3: envPack
-//-------------------------------------------------------------------------
-
-/// Each env is represented by some carrier values, the aenvs.
-/// An env packing defines these, and the pack/unpack bindings.
-/// The bindings are in terms of the fvs directly.
-///
-/// When defining a new TLR f definition,
-///   the fvs   will become bound by the unpack bindings,
-///   the aenvs will become bound by the new lam, and
-///   the etps  will become bound by the new LAM.
-/// For uniqueness of bound ids,
-///   all these ids (Typar/Val) will need to be freshened up.
-/// It is OK to break the uniqueness-of-bound-ids rule during the rw,
-/// provided it is fixed up via a copy_expr call on the final expr.
-
-type envPack =
-    { /// The actual typars            
-      ep_etps   : typars; 
-      /// The actual env carrier values 
-      ep_aenvs  : Val   list; 
-      /// Sequentially define the aenvs in terms of the fvs   
-      ep_pack   : Bindings;       
-      /// Sequentially define the fvs   in terms of the aenvs 
-      ep_unpack : Bindings;       
-    }
-
-
-//-------------------------------------------------------------------------
-// step3: FlatEnvPacks
-//-------------------------------------------------------------------------
-
-exception AbortTLR of Range.range
-
-/// A naive packing of environments.
-/// Chooses to pass all env values as explicit args (no tupling).
-/// Note, tupling would cause an allocation,
-/// so, unless arg lists get very long, this flat packing will be preferable.
-
-/// Given (fclass,env).
-/// Have env = ReqVal vj, ReqSubEnv subEnvk -- ranging over j,k
-/// Define vals(env) = {vj}|j union vals(subEnvk)|k -- trans closure of vals of env.
-/// Define  for each vi in vals(env).
-///  This is the cmap for the env.
-
-///  etps     = env.etps
-///  carriers = aenvi|i
-///  pack     = TBIND(aenvi = vi)            for each (aenvi,vi) in cmap
-///  unpack   = TBIND(vj = aenvFor(vj))      for each vj in reqvals(env).
-///         and TBIND(asubEnvi = aenvFor(v)) for each (asubEnvi,v) in cmap(subEnvk) ranging over required subEnvk.
-/// where
-///   aenvFor(v) = aenvi where (v,aenvi) in cmap.
-let FlatEnvPacks g ccu fclassM topValS declist envM =
-   let fclassOf f = forceM' f fclassM ("fclassM",name_of_val)
-   let packEnv carrierMaps (fc:fclass) =
-       if verboseTLR then dprintf "\ntlr: packEnv fc=%s\n" (showFC fc);
-       let env = forceM' fc envM ("packEnv",showFC)
-
-       // carrierMaps = (fclass,(v,aenv)map)map 
-       let carrierMapFor f = forceM' (fclassOf f) carrierMaps ("carrierMapFor",showFC)
-       let valsSubEnvFor f = Zmap.keys (carrierMapFor f)
-
-       // determine vals(env) - transclosure 
-       let vals = envVals env @ List.collect valsSubEnvFor (envSubEnvs env) in // list, with repeats 
-       let vals = List.noRepeats val_spec_order vals                                 // noRepeats 
-       let vals = vals |> FlatList.of_list
-
-       // Remove genuinely toplevel, need not close over 
-       let vals = vals |> FlatList.filter (IsMandatoryTopLevel >> not) 
-       let vals = vals |> FlatList.filter (Zset.mem_of topValS >> not) 
-       
-       // Carrier sets cannot include constrained polymorphic values. We can't just take such a value out, so for the moment 
-       // we'll just abandon TLR altogether and give a warning about this condition. 
-       (match vals |> FlatList.tryfind (IsGenericValWithGenericContraints g) with None -> () | Some v -> raise (AbortTLR v.Range));
-
-       // build cmap for env 
-       let cmapPairs = vals |> FlatList.mapi (fun i v -> (v,(mk_compgen_local env.m v.MangledName v.Type |> fst))) 
-       let cmap      = Zmap.of_FlatList val_spec_order cmapPairs
-       let aenvFor     v = forceM' v cmap ("aenvFor",name_of_val)
-       let aenvExprFor v = expr_for_val env.m (aenvFor v)
-
-       // build envPack 
-       let etps   = env.etps
-       let aenvs  = Zmap.values cmap
-       let pack   = cmapPairs |> FlatList.map (fun (v,aenv) -> mk_invisible_bind aenv (expr_for_val env.m v))
-       let unpack = 
-           let unpackCarrier (v,aenv) = mk_invisible_bind (set_val_has_no_arity v) (expr_for_val env.m aenv)
-           let unpackSubenv f = 
-               let subCMap  = carrierMapFor f    
-               let vaenvs   = Zmap.to_list subCMap
-               vaenvs |> List.map (fun (subv,subaenv) -> mk_bind NoSequencePointAtInvisibleBinding subaenv (aenvExprFor subv))
-           List.map unpackCarrier (Zmap.to_list cmap) @
-           List.collect unpackSubenv (envSubEnvs env)
-      
-       // extend carrierMaps 
-       let carrierMaps = Zmap.add fc cmap carrierMaps
-
-       // dump 
-       if verboseTLR then
-           dprintf "tlr: packEnv envVals =%s\n" (showL (listL valL  (envVals env)));
-           dprintf "tlr: packEnv envSubs =%s\n" (showL (listL valL  (envSubEnvs env)));
-           dprintf "tlr: packEnv vals    =%s\n" (showL (listL valL (FlatList.to_list vals)));
-           dprintf "tlr: packEnv aenvs   =%s\n" (showL (listL valL aenvs));
-           dprintf "tlr: packEnv pack    =%s\n" (showL (listL BindingL  (FlatList.to_list pack)));
-           dprintf "tlr: packEnv unpack  =%s\n" (showL (listL BindingL  unpack))
-
-       // result 
-       carrierMaps,
-       (fc, { ep_etps   = Zset.elements etps;
-              ep_aenvs  = aenvs;
-              ep_pack   = pack;
-              ep_unpack = FlatList.of_list unpack})
-  
-   let carriedMaps = Zmap.empty (fclass_order ccu)
-   let carriedMaps,envPacks = List.fmap packEnv carriedMaps declist   (* List.fmap in dec order *)
-   let envPacks = Zmap.of_list (fclass_order ccu) envPacks
-   envPacks
-
-
-(*-------------------------------------------------------------------------
- * step3: chooseEnvPacks
- *-------------------------------------------------------------------------*)
-
-let DumpEnvPackM envPackM =
-    let dump fc envPack =
-        dprintf "envPack: fc     = %s\n" (showFC fc);
-        dprintf "         etps   = %s\n" (showL (commaListL (List.map TyparL envPack.ep_etps)));
-        dprintf "         aenvs  = %s\n" (showL (commaListL (List.map valL envPack.ep_aenvs)));
-        dprintf "         pack   = %s\n" (showL (semiListL (FlatList.to_list (FlatList.map BindingL envPack.ep_pack))));
-        dprintf "         unpack = %s\n" (showL (semiListL (FlatList.to_list (FlatList.map BindingL envPack.ep_unpack))));
-        dprintf "\n"
-  
-    Zmap.iter dump envPackM
-
-/// For each fclass, have an env.
-/// Required to choose an envPack,
-/// e.g. deciding whether to tuple up the environment or not.
-/// e.g. deciding whether to use known values for required sub environments.
-///
-/// Scope for optimisating env packing here.
-/// For now, pass all environments via arguments since aiming to eliminate allocations.
-/// Later, package as tuples if arg lists get too long.
-let ChooseEnvPackings g ccu fclassM topValS  declist envM =
-    if verboseTLR then dprintf "ChooseEnvPackings------\n";
-    let envPackM = FlatEnvPacks g ccu fclassM topValS  declist envM
-    let envPackM : (fclass,envPack) Zmap.map = envPackM
-    if verboseTLR then DumpEnvPackM envPackM;
-    envPackM
-
-
-//-------------------------------------------------------------------------
-// step3: CreateFHatM
-//-------------------------------------------------------------------------
-
-/// arity info where nothing is untupled 
-(* REVIEW: could do better here by preserving names *)
-let MkSimpleArityInfo tps n = TopValInfo (TopValInfo.InferTyparInfo tps,List.replicate n TopValInfo.unnamedTopArg,TopValInfo.unnamedRetVal)
-
-let CreateFHatM g ccu tlrS arityM fclassM envPackM = 
-    if verboseTLR then dprintf "CreateFHatM------\n";
-    let createFHat (f:Val) =
-        let wf     = forceM' f arityM ("createFHat - wf",(fun v -> showL (valL v)))
-        let fc     = forceM' f fclassM ("createFHat - fc",name_of_val)
-        let envp   = forceM' fc envPackM ("CreateFHatM - envp",showFC)
-        let name   = f.MangledName (* ^ "_TLR_" ^ string wf *)
-        let m      = f.Range
-        let tps,tau    = f.TypeScheme
-        let argtys,res = strip_fun_typ g tau
-        let newTps    = envp.ep_etps @ tps
-        let fHatTy = 
-            let newArgtys = List.map type_of_val envp.ep_aenvs @ argtys
-            mk_lambda_ty newTps newArgtys res
-        let fHatArity = MkSimpleArityInfo newTps (List.length envp.ep_aenvs + wf)
-        let fHatName =  globalNng.FreshCompilerGeneratedName(name,m)
-
-        let fHat = mkLocalNameTypeArity f.IsCompilerGenerated m fHatName fHatTy (Some fHatArity)
-        (if verboseTLR then dprintf "new %50s : %s\n" fHat.MangledName ((DebugPrint.showType fHat.Type)));
-        fHat
-   
-    let fs     = Zset.elements tlrS
-    let ffHats = List.map (fun f -> f,createFHat f) fs
-    let fHatM  = Zmap.of_list val_spec_order ffHats
-    fHatM
-
-
-//-------------------------------------------------------------------------
-// pass4: rewrite - penv
-//-------------------------------------------------------------------------
-
-type penv =
-   { ccu           : ccu;
-     g             : Env.TcGlobals;
-     tlrS          : Zset.set ;
-     topValS       : Zset.set ;
-     arityM        : Zmap.map ;
-     fclassM       : Zmap.map ;
-     recShortCallS : Zset.set ;
-     envPackM      : Zmap.map;
-     /// The mapping from 'f' values to 'fHat' values
-     fHatM         : Zmap.map ;
-   }
-
-
-//-------------------------------------------------------------------------
-// pass4: rwstate (z state)
-//-------------------------------------------------------------------------
-
-type IsRecursive   = IsRec | NotRec
-type LiftedDeclaration  = IsRecursive * Bindings (* where bool=true if letrec *)    
-
-/// This state is related to lifting to top-level (which is actually disabled right now)
-/// This is to ensure the TLR constants get initialised once.
-///
-/// Top-level status ends when stepping inside a lambda, where a lambda is:
-///   TExpr_tlambda, TExpr_lambda, TExpr_obj (and tmethods).
-///   [... also, try_catch handlers, and switch targets...]
-///
-/// Top* repr bindings already at top-level do not need moving...
-///   [and should not be, since they may lift over unmoved defns on which they depend].
-/// Any TLR repr bindings under lambdas can be filtered out (and collected),
-/// giving pre-declarations to insert before the outermost lambda expr.
-type rwstate =
-    { rws_mustinline: bool;
-      /// counts level of enclosing "lambdas"  
-      rws_innerLevel : int;        
-      /// collected preDecs (fringe is in-order) 
-      rws_preDecs    : tree  
-    }
-
-let rws0 = {rws_mustinline=false;rws_innerLevel=0;rws_preDecs=emptyTR}
-
-// move in/out of lambdas (or lambda containing construct) 
-let EnterInner z = {z with rws_innerLevel = z.rws_innerLevel + 1}
-let ExitInner  z = {z with rws_innerLevel = z.rws_innerLevel - 1}
-
-let EnterMustInline b z f = 
-    let orig = z.rws_mustinline
-    let z',x = f (if b then {z with rws_mustinline = true } else z)
-    {z' with rws_mustinline = orig },x
-
-/// extract PreDecs (iff at top-level) 
-let ExtractPreDecs z =
-    // If level=0, so at top-level, then pop decs,
-    // else keep until get back to a top-level point.
-    if z.rws_innerLevel=0 then
-      // at top-level, extract preDecs 
-      let preDecs = fringeTR z.rws_preDecs
-      {z with rws_preDecs=emptyTR}, preDecs
-    else 
-      // not yet top-level, keep decs 
-      z,[]
-
-/// pop and set preDecs  as "LiftedDeclaration tree" 
-let PopPreDecs z     = {z with rws_preDecs=emptyTR},z.rws_preDecs
-let SetPreDecs z pdt = {z with rws_preDecs=pdt}
-
-/// collect Top* repr bindings - if needed... 
-let LiftTopBinds isRec penv z binds =
-    let isTopBind bind = isSome (chosen_arity_of_bind bind)
-    let topBinds,otherBinds = FlatList.partition isTopBind binds
-    let liftTheseBindings =
-        !liftTLR &&             // lifting enabled 
-        not z.rws_mustinline &&   // can't lift bindings in a mustinline context - they would become private an not inlined 
-        z.rws_innerLevel>0 &&   // only collect Top* bindings when at inner levels (else will drop them!) 
-        not (FlatList.isEmpty topBinds) // only collect topBinds if there are some! 
-   
-    if liftTheseBindings then
-        let LiftedDeclaration = isRec,topBinds                                           // LiftedDeclaration Top* decs 
-        let z = {z with rws_preDecs = TreeNode [z.rws_preDecs;LeafNode LiftedDeclaration]}   // logged at end 
-        z,otherBinds
-    else
-        z,binds (* not "topBinds @ otherBinds" since that has changed order... *)
-      
-/// Wrap preDecs (in order) over an expr - use letrec/let as approp 
-let MakePreDec  m (isRec,binds) expr = 
-    if isRec=IsRec then 
-        mk_letrec_binds m binds expr
-    else 
-        mk_lets_from_Bindings  m binds expr
-
-let MakePreDecs m preDecs expr = List.foldBack (MakePreDec m) preDecs expr
-
-let RecursivePreDecs pdsA pdsB =
-    let pds = fringeTR (TreeNode[pdsA;pdsB])
-    let decs = pds |> List.collect (fun (_,x) -> FlatList.to_list x)  |> FlatList.of_list
-    LeafNode (IsRec,decs)
-
-
-(*-------------------------------------------------------------------------
- * pass4: lowertop - convert_vterm_bind on TopLevel binds
- *-------------------------------------------------------------------------*)
-
-let ConvertBind g (TBind(v,repr,_) as bind)  =
-    match v.TopValInfo with 
-    | None -> v.Data.val_top_repr_info <- Some (InferArityOfExprBinding g v repr )
-    | Some _ -> ()
-    
-    bind
-
-(*-------------------------------------------------------------------------
- * pass4: transBind (translate)
- *-------------------------------------------------------------------------*)
-
-// Transform
-//   let f vss = f_body[,f_freeVars]
-// To
-//   let f vss = fHat f_freeVars vss
-//   let fHat f_freeVars vss = f_body[,f_freeVars]
-let TransTLRBindings penv (binds:Bindings) = 
-    if FlatList.isEmpty binds then FlatList.empty,FlatList.empty else
-    let fc   = FC (vars_of_Bindings binds)
-    let envp = forceM' fc penv.envPackM ("TransTLRBindings",showFC)
-    
-    let fRebinding (TBind(fOrig,b,letSeqPtOpt)) =
-        let m = fOrig.Range
-        let tps,vss,b,rty = dest_top_lambda (b,fOrig.Type)
-        let aenvExprs = envp.ep_aenvs |> List.map (expr_for_val m) 
-        let vsExprs   = vss |> List.map (mk_tupled_vars penv.g m) 
-        let fHat      = forceM' fOrig penv.fHatM ("fRebinding",name_of_val) 
-        let w         = 0    
-        (* REVIEW: is this mutation really, really necessary? *)
-        (* Why are we applying TLR if the thing already has an arity? *)
-        let fOrig = set_val_has_no_arity fOrig
-        let fBind = 
-           mk_multi_lambda_bind fOrig letSeqPtOpt m tps vss 
-               (mk_appl penv.g 
-                        (typed_expr_for_val m fHat,
-                         [List.map mk_typar_ty (envp.ep_etps @ tps)],
-                         aenvExprs @ vsExprs,m),rty)
-        fBind                                
-
-    let fHatNewBinding (shortRecBinds:Bindings) (TBind(f,b,letSeqPtOpt)) =
-        let wf   = forceM' f penv.arityM ("fHatNewBinding - arityM",name_of_val)
-        let fHat = forceM' f penv.fHatM  ("fHatNewBinding - fHatM",name_of_val)
-        // Take off the variables
-        let tps,vss,b,rty = dest_top_lambda (b,f.Type)
-        // Don't take all the variables - only up to length wf
-        let vssTake,vssDrop = List.chop wf vss
-        // put the variables back on
-        let b,rty = mk_multi_lambdas_core (range_of_expr b) vssDrop (b,rty)
-        // fHat, args 
-        let m = fHat.Range
-        // Add the type variables to the front
-        let fHat_tps  = envp.ep_etps @ tps
-        // Add the 'aenv' and original taken variables to the front
-        let fHat_args = List.map List.singleton envp.ep_aenvs @ vssTake
-        let fHat_body = mk_lets_from_Bindings m envp.ep_unpack b        
-        let fHat_body = mk_lets_from_Bindings m shortRecBinds  fHat_body  // bind "f" if have short recursive calls (somewhere) 
-        // fHat binding, f rebinding 
-        let wfHat      = List.length envp.ep_aenvs + wf
-        let fHatBind   = mk_multi_lambda_bind fHat letSeqPtOpt m fHat_tps fHat_args (fHat_body,rty)
-        fHatBind
-    let rebinds = binds |> FlatList.map fRebinding 
-    let shortRecBinds = rebinds |> FlatList.filter (fun b -> penv.recShortCallS.Contains(b.Var)) 
-    let newBinds      = binds |> FlatList.map (fHatNewBinding shortRecBinds) 
-    newBinds,rebinds
-
-let GetAEnvBindings penv fc =
-    match Zmap.tryfind fc penv.envPackM with
-    | None      -> FlatList.empty           // no env for this mutual binding 
-    | Some envp -> envp.ep_pack // environment pack bindings 
-
-let TransBindings xisRec penv (binds:Bindings) =
-    let tlrBs,nonTlrBs = binds |> FlatList.partition (fun b -> Zset.mem b.Var penv.tlrS) 
-    let fclass = FC (vars_of_Bindings tlrBs)
-    // Trans each TLR f binding into fHat and f rebind 
-    let newTlrBinds,tlrRebinds = TransTLRBindings penv tlrBs
-    let aenvBinds = GetAEnvBindings penv fclass
-    // lower nonTlrBs if they are GTL 
-    // QUERY: we repeat this logic in Lowertop.  Do we really need to do this here? 
-    // QUERY: yes and no - if we don't, we have an unrealizable term, and many decisions must 
-    // QUERY: correlate with Lowertop.  
-    let forceTopBindToHaveArity (bind:Binding) = 
-        if penv.topValS.Contains(bind.Var) then ConvertBind penv.g bind 
-        else bind
-
-    let nonTlrBs = nonTlrBs |> FlatList.map forceTopBindToHaveArity 
-    let tlrRebinds = tlrRebinds |> FlatList.map forceTopBindToHaveArity 
-    // assemble into replacement bindings 
-    let bindAs,rebinds = 
-        match xisRec with
-        | IsRec  -> FlatList.to_list newTlrBinds @ FlatList.to_list tlrRebinds @ FlatList.to_list nonTlrBs @ FlatList.to_list aenvBinds,[]    (* note: aenv last, order matters in letrec! *)
-        | NotRec -> FlatList.to_list aenvBinds @ FlatList.to_list newTlrBinds, FlatList.to_list tlrRebinds @ FlatList.to_list nonTlrBs (* note: aenv go first, they may be used *)
-    FlatList.of_list bindAs, FlatList.of_list rebinds
-
-
-(*-------------------------------------------------------------------------
- * pass4: TransApp (translate)
- *-------------------------------------------------------------------------*)
-
-let TransApp penv (fx,fty,tys,args,m) =
-    // Is it a val app, where the val f is TLR with arity wf? 
-    // CLEANUP NOTE: should be using a mk_appl to make all applications 
-    match fx with
-    | TExpr_val (fvref,_,m) when 
-            (Zset.mem (deref_val fvref) penv.tlrS) &&
-            (let wf = forceM' (deref_val fvref) penv.arityM ("TransApp - wf",name_of_val)
-             IsArityMet fvref wf tys args) ->
-
-               let f = deref_val fvref
-               (* replace by direct call to corresponding fHat (and additional closure args) *)
-               let fc   = forceM' f  penv.fclassM ("TransApp - fc",name_of_val)in   
-               let envp = forceM' fc penv.envPackM ("TransApp - envp",showFC)
-               let fHat = forceM' f  penv.fHatM ("TransApp - fHat",name_of_val)in
-               let tys  = (List.map mk_typar_ty envp.ep_etps) @ tys
-               let aenvExprs = List.map (expr_for_val m) envp.ep_aenvs
-               let args = aenvExprs @ args
-               mk_appl penv.g (typed_expr_for_val m fHat,[tys],args,m) (* change, direct fHat call with closure (etps,aenvs) *)
-    | _ -> 
-        if isNil tys && isNil args then 
-            fx 
-        else TExpr_app (fx,fty,tys,args,m)
-                          (* no change, f is expr *)
-
-(*-------------------------------------------------------------------------
- * pass4: pass (over expr)
- *-------------------------------------------------------------------------*)
-
-/// Must WrapPreDecs around every construct that could do EnterInner (which filters TLR decs).
-/// i.e. let,letrec (bind may...), ilobj, lambda, tlambda.
-let WrapPreDecs m pds x =
-    MakePreDecs m pds x
-
-/// At bindings, fixup any TLR bindings.
-/// At applications, fixup calls  if they are arity-met instances of TLR.
-/// At free vals,    fixup 0-call if it is an arity-met constant.
-/// Other cases rewrite structurally.
-let rec TransExpr (penv:penv) z expr =
-    match expr with
-    // Use TransLinearExpr with a rebuild-continuation for some forms to avoid stack overflows on large terms *)
-    | TExpr_letrec _ | TExpr_let    _ -> 
-         TransLinearExpr penv z expr (fun res -> res)
-
-    // app - call sites may require z.
-    //     - match the app (collapsing reclinks and type instances).
-    //     - patch it.
-    | TExpr_app (f,fty,tys,args,m) ->
-       // pass over f,args subexprs 
-       let z,f      = TransExpr penv z f
-       let z,args = List.fmap (TransExpr penv) z args
-       // match app, and fixup if needed 
-       let f,fty,tys,args,m = DestApp (f,fty,tys,args,m)
-       let expr = TransApp penv (f,fty,tys,args,m)
-       z,expr
-
-    | TExpr_val (v,_,m) ->
-       // consider this a trivial app 
-       let fx,fty = expr,v.Type
-       let expr = TransApp penv (fx,fty,[],[],m)
-       z,expr
-
-    // reclink - suppress 
-    | TExpr_link r ->
-        TransExpr penv z (!r)
-
-    // ilobj - has implicit lambda exprs and recursive/base references 
-    | TExpr_obj (_,ty,basev,basecall,overrides,iimpls,m,_) ->
-        let z,basecall  = TransExpr penv                            z basecall 
-        let z,overrides = List.fmap (TransMethod penv)                  z overrides
-        let z,iimpls    = List.fmap (fmap2'2 (List.fmap (TransMethod penv))) z iimpls   
-        let expr = TExpr_obj(new_uniq(),ty,basev,basecall,overrides,iimpls,m,SkipFreeVarsCache())
-        let z,pds = ExtractPreDecs z
-        z,WrapPreDecs m pds expr (* if TopLevel, lift preDecs over the ilobj expr *)
-
-    // lambda, tlambda - explicit lambda terms 
-    | TExpr_lambda(_,basevopt,argvs,body,m,rty,_) ->
-        let z = EnterInner z
-        let z,body = TransExpr penv z body
-        let z = ExitInner z
-        let z,pds = ExtractPreDecs z
-        z,WrapPreDecs m pds (mk_basev_multi_lambda m basevopt argvs (body,rty))
-
-    | TExpr_tlambda(_,argtyvs,body,m,rty,_) ->
-        let z = EnterInner z
-        let z,body = TransExpr penv z body
-        let z = ExitInner z
-        let z,pds = ExtractPreDecs z
-        z,WrapPreDecs m pds (mk_tlambda m argtyvs (body,rty))
-
-    /// Lifting TLR out over constructs (disabled)
-    /// Lift minimally to ensure the defn is not lifted up and over defns on which it depends (disabled)
-    | TExpr_match(spBind,exprm,dtree,targets,m,ty,_) ->
-        let targets = Array.to_list targets
-        let z,dtree   = TransDecisionTree penv z dtree
-        let z,targets = List.fmap (TransDecisionTreeTarget penv) z targets
-        // TransDecisionTreeTarget wraps EnterInner/exitInnter, so need to collect any top decs 
-        let z,pds = ExtractPreDecs z
-        z,WrapPreDecs m pds (mk_and_optimize_match spBind exprm m ty dtree targets)
-
-    // all others - below - rewrite structurally - so boiler plate code after this point... 
-    | TExpr_const _ -> z,expr (* constant wrt Val *)
-    | TExpr_quote (a,{contents=Some(argTypes,argExprs,data)},m,ty) -> 
-        let z,argExprs = List.fmap (TransExpr penv) z argExprs
-        z,TExpr_quote(a,{contents=Some(argTypes,argExprs,data)},m,ty)
-    | TExpr_quote (a,{contents=None},m,ty) -> 
-        z,TExpr_quote(a,{contents=None},m,ty)
-    | TExpr_op (c,tyargs,args,m) -> 
-        let z,args = List.fmap (TransExpr penv) z args
-        z,TExpr_op(c,tyargs,args,m)
-    | TExpr_seq (e1,e2,dir,spSeq,m) -> 
-        let z,e1 = TransExpr penv z e1
-        let z,e2 = TransExpr penv z e2
-        z,TExpr_seq(e1,e2,dir,spSeq,m)
-    | TExpr_static_optimization (constraints,e2,e3,m) ->
-        let z,e2 = TransExpr penv z e2
-        let z,e3 = TransExpr penv z e3
-        z,TExpr_static_optimization(constraints,e2,e3,m)
-    | TExpr_tchoose (_,_,m) -> error(Error("Unexpected TExpr_tchoose",m))
-
-/// Walk over linear structured terms in tail-recursive loop, using a continuation 
-/// to represent the rebuild-the-term stack 
-and TransLinearExpr penv z expr contf =
-    match expr with 
-     // letrec - pass_recbinds does the work 
-     | TExpr_letrec (binds,e,m,_) ->
-         let z = EnterInner z
-         // For letrec, preDecs from RHS must mutually recurse with those from the bindings 
-         let z,pdsPrior    = PopPreDecs z
-         let z,binds       = FlatList.fmap (TransBindingRhs penv) z binds
-         let z,pdsRhs      = PopPreDecs z
-         let binds,rebinds = TransBindings   IsRec penv binds
-         let z,binds       = LiftTopBinds IsRec penv z   binds in  (* factor Top* repr binds *)
-         let z,rebinds     = LiftTopBinds IsRec penv z rebinds
-         let z,pdsBind     = PopPreDecs z
-         let z             = SetPreDecs z (TreeNode [pdsPrior;RecursivePreDecs pdsBind pdsRhs])
-         let z = ExitInner z
-         let z,pds = ExtractPreDecs z
-         TransLinearExpr penv z e (contf << (fun (z,e) -> 
-             let e = mk_lets_from_Bindings m rebinds e
-             z,WrapPreDecs m pds (TExpr_letrec (binds,e,m,NewFreeVarsCache()))))
-
-     // let - can consider the mu-let bindings as mu-letrec bindings - so like as above 
-     | TExpr_let    (bind,e,m,_) ->
-
-         // For let, preDecs from RHS go before those of bindings, which is collection order 
-         let z,bind       = TransBindingRhs penv z bind
-         let binds,rebinds = TransBindings   NotRec penv (FlatList.one bind)
-         // factor Top* repr binds 
-         let z,binds       = LiftTopBinds NotRec penv z   binds  
-         let z,rebinds     = LiftTopBinds NotRec penv z rebinds
-         // any lifted PreDecs from binding, if so wrap them... 
-         let z,pds = ExtractPreDecs z
-         TransLinearExpr penv z e (contf << (fun (z,e) -> 
-             let e = mk_lets_from_Bindings m rebinds e
-             z,WrapPreDecs m pds (mk_lets_from_Bindings m binds e)))
-
-     | _ -> 
-        contf (TransExpr penv z expr)
-  
-and TransMethod penv z (TObjExprMethod(slotsig,tps,vs,e,m)) =
-    let z = EnterInner z 
-    let z,e = TransExpr penv z e
-    let z = ExitInner z 
-    z,TObjExprMethod(slotsig,tps,vs,e,m)
-
-and TransBindingRhs penv z (TBind(v,e,letSeqPtOpt)) = 
-    let mustInline = v.MustInline
-    let z,e = EnterMustInline mustInline z (fun z -> TransExpr penv z e)
-    z,TBind (v,e,letSeqPtOpt)
-
-and TransDecisionTree penv z x =
-   match x with 
-   | TDSuccess (es,n) -> 
-       let z,es = FlatList.fmap (TransExpr penv) z es
-       z,TDSuccess(es,n)
-   | TDBind (bind,rest) -> 
-       let z,bind       = TransBindingRhs penv z bind
-       let z,rest = TransDecisionTree penv z rest
-       z,TDBind(bind,rest)
-   | TDSwitch (e,cases,dflt,m) ->
-       let z,e = TransExpr penv z e
-       let TransDecisionTreeCase penv z (TCase (discrim,dtree)) =
-           let z,dtree = TransDecisionTree penv z dtree
-           z,TCase(discrim,dtree)
-      
-       let z,cases = List.fmap (TransDecisionTreeCase penv) z cases
-       let z,dflt  = Option.fmap (TransDecisionTree penv)      z dflt
-       z,TDSwitch (e,cases,dflt,m)
-
-and TransDecisionTreeTarget penv z (TTarget(vs,e,spTarget)) =
-    let z = EnterInner z 
-    let z,e = TransExpr penv z e
-    let z = ExitInner z
-    z,TTarget(vs,e,spTarget)
-
-and TransValBinding penv z bind = TransBindingRhs penv z bind 
-and TransValBindings penv z binds = FlatList.fmap (TransValBinding penv) z  binds
-and TransModuleExpr penv z x = 
-    match x with  
-    | TMTyped(mty,def,m) ->  
-        let z,def = TransModuleDef penv z def
-        z,TMTyped(mty,def,m)
-    
-and TransModuleDefs penv z x = List.fmap (TransModuleDef penv) z x
-and TransModuleDef penv (z:rwstate) x = 
-    match x with 
-    | TMDefRec(tycons,binds,mbinds,m) -> 
-        let z,binds = TransValBindings penv z binds
-        let z,mbinds = TransModuleBindings penv z mbinds
-        z,TMDefRec(tycons,binds,mbinds,m)
-    | TMDefLet(bind,m)            -> 
-        let z,bind = TransValBinding penv z bind
-        z,TMDefLet(bind,m)
-    | TMDefDo(e,m)            -> 
-        let z,bind = TransExpr penv z e
-        z,TMDefDo(e,m)
-    | TMDefs(defs)   -> 
-        let z,defs = TransModuleDefs penv z defs
-        z,TMDefs(defs)
-    | TMAbstract(mexpr) -> 
-        let z,mexpr = TransModuleExpr penv z mexpr
-        z,TMAbstract(mexpr)
-and TransModuleBindings penv z binds = List.fmap (TransModuleBinding penv) z  binds
-and TransModuleBinding penv z (TMBind(nm, rhs)) =
-    let z,rhs = TransModuleDef penv z rhs
-    z,TMBind(nm,rhs)
-
-let TransImplFile penv z mv = fmapTImplFile (TransModuleExpr penv) z mv
-
-let TransAssembly penv z (TAssembly(mvs)) = 
-    let z,mvs = List.fmap (TransImplFile penv) z mvs 
-    TAssembly(mvs)
-(*-------------------------------------------------------------------------
- * pass5: copy_expr
- *-------------------------------------------------------------------------*)
-
-let RecreateUniqueBounds g expr = 
-    copy_ImplFile g OnlyCloneExprVals expr
-
-(*-------------------------------------------------------------------------
- * entry point
- *-------------------------------------------------------------------------*)
-
-let MakeTLRDecisions ccu g expr =
-   try
-      // pass1: choose the f to be TLR with arity(f) 
-      let tlrS,topValS, arityM = Pass1_DetermineTLRAndArities.DetermineTLRAndArities ccu g expr
-
-      // pass2: determine the typar/freevar closures, f->fclass and fclass declist 
-      let envM,fclassM,declist,recShortCallS = Pass2_DetermineTLREnvs.DetermineTLREnvs ccu (tlrS,arityM) expr
-
-      // pass3
-      let envPackM = ChooseEnvPackings g ccu fclassM topValS  declist envM
-      let fHatM    = CreateFHatM g ccu tlrS arityM fclassM envPackM
-
-      // pass4: rewrite 
-      if verboseTLR then dprintf "TransExpr(rw)------\n";
-      let penv = {ccu=ccu; g=g; tlrS=tlrS; topValS=topValS; arityM=arityM; fclassM=fclassM; recShortCallS=recShortCallS; envPackM=envPackM; fHatM=fHatM}
-      let z = rws0
-      let _,expr = TransImplFile penv z expr
-
-      // pass5: copy_expr to restore "each bound is unique" property 
-      // aka, copy_expr 
-      if verboseTLR then dprintf "copy_expr------\n";
-      let expr = RecreateUniqueBounds g expr 
-      if verboseTLR then dprintf "TLR-done------\n";
-
-      // Summary:
-      //   GTL = genuine top-level
-      //   TLR = TopLevelRep = identified by this pass
-      //   Note, some GTL are skipped until sort out the initial env...
-      // if verboseTLR then dprintf "note: tlr = %d inner-TLR + %d GenuineTopLevel-TLR + %d GenuineTopLevel skipped TLR (public)\n"
-      //  (lengthS (Zset.diff  tlrS topValS))
-      //  (lengthS (Zset.inter topValS tlrS))
-      //  (lengthS (Zset.diff  topValS tlrS))
-      
-      // DONE 
-      expr
-   with AbortTLR m -> 
-       warning(Error("Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition",m));
-       expr
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/tlr.mli b/tools/FSharp_1.9.6.16/source/fsharp/tlr.mli
deleted file mode 100644
index 8daeb3af..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/tlr.mli
+++ /dev/null
@@ -1,9 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-#light
-
-module internal Microsoft.FSharp.Compiler.Tlr 
-
-open Microsoft.FSharp.Compiler 
-
-val MakeTLRDecisions : Tast.ccu -> Env.TcGlobals -> Tast.TypedImplFile -> Tast.TypedImplFile
-val liftTLR : bool ref
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/typrelns.ml b/tools/FSharp_1.9.6.16/source/fsharp/typrelns.ml
deleted file mode 100644
index 7f95fa2d..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/typrelns.ml
+++ /dev/null
@@ -1,1558 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-
-#light
-
-/// Primary relations on types and signatures (with the exception of
-/// the constraint solving engine and method overload resolution)
-module (* internal *) Microsoft.FSharp.Compiler.Typrelns
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-open System.Text
-
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.AbstractIL 
-open Microsoft.FSharp.Compiler.AbstractIL.IL 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal 
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library 
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics 
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.AbstractIL.IL (* Abstract IL  *)
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Infos
-open Microsoft.FSharp.Compiler.PrettyNaming
-open Microsoft.FSharp.Compiler.Infos.AccessibilityLogic
-
-//-------------------------------------------------------------------------
-// a :> b without coercion based on finalized (no type variable) types
-//------------------------------------------------------------------------- 
-
-
-// QUERY: This relation is barely used in the implementation and is 
-// not part of the language specification. It is in general only used for 
-// optimizations and warnings and to omit upcast coercions in the TAST 
-let rec type_definitely_subsumes_type_no_coercion ndeep g amap m ty1 ty2 = 
-  if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in type_definitely_subsumes_type_no_coercion), ty1 = "^(DebugPrint.showType ty1),m));
-  if ty1 === ty2 then true 
-  // QUERY : quadratic
-  elif type_equiv g ty1 ty2 then true
-  else
-    let ty1 = strip_tpeqns_and_tcabbrevs g ty1
-    let ty2 = strip_tpeqns_and_tcabbrevs g ty2
-    match ty1,ty2 with 
-    | TType_app (tc1,l1)  ,TType_app (tc2,l2) when tcref_eq g tc1 tc2  ->  
-        List.lengthsEqAndForall2 (type_equiv g) l1 l2
-    | TType_ucase (tc1,l1)  ,TType_ucase (tc2,l2) when g.ucref_eq tc1 tc2  ->  
-        List.lengthsEqAndForall2 (type_equiv g) l1 l2
-    | TType_tuple l1    ,TType_tuple l2     -> 
-        List.lengthsEqAndForall2 (type_equiv g) l1 l2 
-    | TType_fun (d1,r1)  ,TType_fun (d2,r2)   -> 
-        type_equiv g d1 d2 && type_equiv g r1 r2
-    | TType_measure measure1, TType_measure measure2 ->
-        measure_equiv g measure1 measure2
-    | _ ->  
-        (type_equiv g ty1 g.obj_ty && is_ref_typ g ty2) || (* F# reference types are subtypes of type 'obj' *)
-        (is_stripped_tyapp_typ g ty2 &&
-         is_ref_typ g ty2 && 
-         let tcref,tinst = dest_stripped_tyapp_typ g ty2
-
-         (match SuperTypeOfType g amap m ty2 with 
-         | None -> false
-         | Some ty -> type_definitely_subsumes_type_no_coercion (ndeep+1) g amap m ty1 ty) ||
-
-         (is_interface_typ g ty1 &&
-          ty2 |> ImplementsOfType g amap m 
-              |> List.exists (type_definitely_subsumes_type_no_coercion (ndeep+1) g amap m ty1)))
-
-
-
-type canCoerce = CanCoerce | NoCoerce
-
-/// The feasible coercion relation. Part of the language spec.
-
-let rec type_feasibly_subsumes_type ndeep g amap m ty1 canCoerce ty2 = 
-    if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in type_feasibly_subsumes_type), ty1 = "^(DebugPrint.showType ty1),m));
-    let ty1 = strip_tpeqns_and_tcabbrevs g ty1
-    let ty2 = strip_tpeqns_and_tcabbrevs g ty2
-    match ty1,ty2 with 
-    | TType_var r , _  | _, TType_var r -> true
-
-    | TType_app (tc1,l1)  ,TType_app (tc2,l2) when tcref_eq g tc1 tc2  ->  
-        List.lengthsEqAndForall2 (type_feasibly_equiv ndeep g amap m) l1 l2
-    | TType_tuple l1    ,TType_tuple l2     -> 
-        List.lengthsEqAndForall2 (type_feasibly_equiv ndeep g amap m) l1 l2 
-    | TType_fun (d1,r1)  ,TType_fun (d2,r2)   -> 
-        (type_feasibly_equiv ndeep g amap m) d1 d2 && (type_feasibly_equiv ndeep g amap m) r1 r2
-    | TType_measure ms1, TType_measure ms2 ->
-        measure_equiv g ms1 ms2
-    | _ -> 
-        (* F# reference types are subtypes of type 'obj' *) 
-        (is_obj_typ g ty1 && (canCoerce = CanCoerce || is_ref_typ g ty2)) 
-        ||
-        (is_stripped_tyapp_typ g ty2 &&
-         (canCoerce = CanCoerce || is_ref_typ g ty2) && 
-         let tcref,tinst = dest_stripped_tyapp_typ g ty2
-         begin match SuperTypeOfType g amap m ty2 with 
-         | None -> false
-         | Some ty -> type_feasibly_subsumes_type (ndeep+1) g amap m ty1 NoCoerce ty
-         end or
-         ty2 |> ImplementsOfType g amap m 
-             |> List.exists (type_feasibly_subsumes_type (ndeep+1) g amap m ty1 NoCoerce))
-                   
-and type_feasibly_equiv ndeep g amap m ty1 ty2 = 
-
-    if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in type_feasibly_subsumes_type), ty1 = "^(DebugPrint.showType ty1),m));
-    let ty1 = strip_tpeqns_and_tcabbrevs g ty1
-    let ty2 = strip_tpeqns_and_tcabbrevs g ty2
-    match ty1,ty2 with 
-    | TType_var r , _  | _, TType_var r -> true
-    | TType_app (tc1,l1)  ,TType_app (tc2,l2) when tcref_eq g tc1 tc2  ->  
-        List.lengthsEqAndForall2 (type_feasibly_equiv ndeep g amap m) l1 l2
-    | TType_tuple l1    ,TType_tuple l2     -> 
-        List.lengthsEqAndForall2 (type_feasibly_equiv ndeep g amap m) l1 l2 
-    | TType_fun (d1,r1)  ,TType_fun (d2,r2)   -> 
-        (type_feasibly_equiv ndeep g amap m) d1 d2 && (type_feasibly_equiv ndeep g amap m) r1 r2
-    | TType_measure ms1, TType_measure ms2 ->
-        measure_equiv g ms1 ms2
-    | _ -> 
-        false
-
-
-/// Choose solutions for TExpr_tchoose type "hidden" variables introduced
-/// by letrec nodes. Also used by the pattern match compiler to choose type
-/// variables when compiling patterns at generalized bindings.
-///     e.g. let ([],x) = ([],[])
-/// Here x gets a generalized type "list<'a>".
-let choose_typar_solution_and_range g amap (tp:Typar) =
-    let m = tp.Range
-    if verbose then dprintf "choose_typar_solution, arbitrary: tp = %s\n" (Layout.showL (TyparsL [tp]));
-    let max,m = 
-         List.fold (fun (maxSoFar,_) tpc -> 
-             let join m x = 
-               if type_feasibly_subsumes_type 0 g amap m x CanCoerce maxSoFar then maxSoFar
-               elif type_feasibly_subsumes_type 0 g amap m maxSoFar CanCoerce x then x
-               else 
-                   errorR(Error(Printf.sprintf "The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '%s' and '%s'. Consider using type annotations to resolve the ambiguity" (DebugPrint.showType x) (DebugPrint.showType maxSoFar),m)); maxSoFar
-             (* Don't continue if an error occurred and we set the value eagerly *)
-             if tpref_is_solved tp then maxSoFar,m else
-             match tpc with 
-             | TTyparCoercesToType(x,m) -> 
-                 join m x,m
-             | TTyparMayResolveMemberConstraint(TTrait(_,nm,_,_,_,_),m) -> 
-                 errorR(Error("Could not resolve the ambiguity inherent in the use of the overloaded operator '"^DemangleOperatorName nm^"' at or near this program point. Consider using type annotations to resolve the ambiguity",m));
-                 maxSoFar,m
-             | TTyparSimpleChoice(_,m) -> 
-                 errorR(Error("Could not resolve the ambiguity inherent in the use of a 'printf'-style format string",m));
-                 maxSoFar,m
-             | TTyparSupportsNull m -> 
-                 maxSoFar,m
-             | TTyparIsEnum(_,m) -> 
-                 errorR(Error("Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position",m));
-                 maxSoFar,m
-             | TTyparIsDelegate(_,_,m) -> 
-                 errorR(Error("Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position",m));
-                 maxSoFar,m
-             | TTyparIsNotNullableValueType m -> 
-                 join m g.int_ty,m
-             | TTyparRequiresDefaultConstructor m -> 
-                 (* errorR(Error("Could not resolve the ambiguity inherent in the use of a generic construct at or near this program point. Consider using type annotations to resolve the ambiguity",m)); *)
-                 maxSoFar,m
-             | TTyparIsReferenceType m -> 
-                 maxSoFar,m
-             | TTyparDefaultsToType(priority,ty,m) -> 
-                 maxSoFar,m)
-           ((match tp.Kind with KindType -> g.obj_ty | KindMeasure -> TType_measure MeasureOne),m)
-           tp.Constraints
-    max,m
-
-let choose_typar_solution g amap tp = 
-    let ty,m = choose_typar_solution_and_range g amap tp
-    if tp.Rigidity = TyparAnon && type_equiv g ty (TType_measure MeasureOne)
-    then warning(Error("This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'",tp.Range));
-    ty
-
-let choose_typar_solutions_for_tchoose g amap e = 
-    match e with 
-    | TExpr_tchoose(tps,e1,m)  -> 
-    
-        /// Only make choices for variables that are actually used in the expression 
-        let ftvs = (free_in_expr CollectTyparsNoCaching e1).FreeTyvars.FreeTypars
-        let tps = tps |> List.filter (Zset.mem_of ftvs)
-        
-        let tpenv = mk_typar_inst tps (List.map (choose_typar_solution g amap) tps)
-        inst_expr g tpenv e1
-    | _ -> e
-                 
-
-/// Break apart lambdas. Needs choose_typar_solutions_for_tchoose because it's used in
-/// PostTypecheckSemanticChecks before we've eliminated these nodes.
-let try_dest_top_lambda_upto g amap (TopValInfo (tpNames,_,_) as tvd) (e,ty) =
-    let rec strip_lambda_upto n (e,ty) = 
-        match e with 
-        | TExpr_lambda (_,None,v,b,_,retTy,_) when n > 0 -> 
-            let (vs',b',retTy') = strip_lambda_upto (n-1) (b,retTy)
-            (v :: vs', b', retTy') 
-        | _ -> ([],e,ty)
-
-    let rec start_strip_lambda_upto n (e,ty) = 
-        match e with 
-        | TExpr_lambda (_,basevopt,v,b,_,retTy,_) when n > 0 -> 
-            let (vs',b',retTy') = strip_lambda_upto (n-1) (b,retTy)
-            (basevopt, (v :: vs'), b', retTy') 
-        | TExpr_tchoose (tps,b,_) -> 
-            start_strip_lambda_upto n (choose_typar_solutions_for_tchoose g amap e, ty)
-        | _ -> (None,[],e,ty)
-
-    let n = tvd.NumCurriedArgs
-    let tps,taue,tauty = 
-        match e with 
-        | TExpr_tlambda (_,tps,b,_,retTy,_) when nonNil tpNames -> tps,b,retTy 
-        | _ -> [],e,ty
-    let basevopt,vsl,body,retTy = start_strip_lambda_upto n (taue,tauty)
-    if vsl.Length <> n then 
-        None 
-    else
-        Some (tps,basevopt,vsl,body,retTy)
-
-let dest_top_lambda_upto g amap topValInfo (e,ty) = 
-    match try_dest_top_lambda_upto g amap topValInfo (e,ty) with 
-    | None -> error(Error("Invalid value", range_of_expr e));
-    | Some res -> res
-    
-let IteratedAdjustArityOfLambdaBody g arities vsl body  =
-      (arities, vsl, ([],body)) |||> List.foldBack2 (fun arities vs (allvs,body) -> 
-          let vs,body = AdjustArityOfLambdaBody g arities vs body
-          vs :: allvs, body)
-
-/// Do AdjustArityOfLambdaBody for a series of  
-/// iterated lambdas, producing one method.  
-/// The required iterated function arity (List.length topValInfo) must be identical 
-/// to the iterated function arity of the input lambda (List.length vsl) 
-let IteratedAdjustArityOfLambda g amap topValInfo e =
-    let tps,basevopt,vsl,body,bodyty = dest_top_lambda_upto g amap topValInfo (e, type_of_expr g e)
-    let arities = topValInfo.AritiesOfArgs
-    if List.length arities <> List.length vsl then (
-      errorR(InternalError(sprintf "IteratedAdjustArityOfLambda, List.length arities = %d, List.length vsl = %d" (List.length arities) (List.length vsl), range_of_expr body))
-    );
-    let vsl,body = IteratedAdjustArityOfLambdaBody g arities vsl body
-    tps,basevopt,vsl,body,bodyty
-
-
-exception RequiredButNotSpecified of DisplayEnv * Tast.ModuleOrNamespaceRef * string * (StringBuilder -> unit) * range
-exception ValueNotContained       of DisplayEnv * Tast.ModuleOrNamespaceRef * Val * Val * string
-exception ConstrNotContained      of DisplayEnv * UnionCase * UnionCase * string
-exception ExnconstrNotContained   of DisplayEnv * Tycon * Tycon * string
-exception FieldNotContained       of DisplayEnv * RecdField * RecdField * string 
-exception InterfaceNotRevealed    of DisplayEnv * Tast.typ * range
-
-
-/// Containment relation for module types
-module SignatureConformance = begin
-
-    let rec internal CheckTypars g denv m aenv (atps:typars) (ftps:typars) = 
-        if atps.Length <> ftps.Length then  (errorR (Error("The signature and implementation are not compatible because the respective type parameter counts differ",m)); false)
-        else 
-          let aenv = bind_tyeq_env_typars atps ftps aenv
-          (atps,ftps) ||> List.forall2 (fun atp ftp -> 
-              let m = ftp.Range
-              if atp.StaticReq <> ftp.StaticReq then 
-                  errorR (Error("The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation", m));          
-              
-              // Adjust the actual type parameter name to look look like the signature
-              atp.Data.typar_id <- mksyn_id atp.Range ftp.Id.idText     
-              // Mark it as "not compiler generated", now that we've got a good name for it
-              set_compgen_of_tpdata atp.Data false 
-
-              atp.Constraints |> List.forall (fun atpc -> 
-                  match atpc with 
-                  // defaults can be dropped in the signature 
-                  | TTyparDefaultsToType(_,acty,_) -> true
-                  | _ -> 
-                      if not (List.exists  (typarConstraints_aequiv g aenv atpc) ftp.Constraints)
-                      then (errorR(Error("The signature and implementation are not compatible because the declaration of the type parameter '"^ftp.Name^"' requires a constraint of the form "^Layout.showL(NicePrint.constraintL denv (atp,atpc)),m)); false)
-                      else  true) &&
-              ftp.Constraints |> List.forall (fun ftpc -> 
-                  match ftpc with 
-                  // defaults can be present in the signature and not in the implementation 
-                  | TTyparDefaultsToType(_,acty,_) -> true
-                  | _ -> 
-                      if not (List.exists  (fun atpc -> typarConstraints_aequiv g aenv atpc ftpc) atp.Constraints)
-                      then (errorR(Error("The signature and implementation are not compatible because the type parameter '"^ftp.Name^"' has a constraint of the form "^Layout.showL(NicePrint.constraintL denv (ftp,ftpc))^" but the implementation does not. Either remove this constraint from the signature or add it to the implementation",m)); false)
-                      else  true))
-
-(*
-    and private CheckAttribs g amap denv aenv (actualAttribs:Attribs) (formalAttribs:Attribs) =
-        let allActualAttribs = new ResizeArray<_>()
-        
-        let mutable remaining = List.map (fun x -> (x,true)) actualAttribs @  List.map (fun x -> (x,false)) formalAttribs 
-        while nonNil remaining do 
-            let (Attrib(tcref,_,_,_,_),isActual) = List.hd remaining
-            let sameTypeActual, rest =  remaining |> List.partition (fun (Attrib(tcref2,_,_,_,_),isActual2) -> isActual2 && tcref_aequiv g aenv tcref tcref2) |> pair_map (List.map fst) id
-            let sameTypeFormal, rest =  rest |> List.partition (fun (Attrib(tcref2,_,_,_,_),isActual2) -> not isActual2 && tcref_aequiv g aenv tcref tcref2) |> pair_map (List.map fst) id
-            let sameActual, sameTypeActual =  sameTypeActual |> List.partition (fun (Attrib(_,kind2,exprs2,namedArgs2,_)) -> true) 
-            let sameFormal, sameFormalActual =  sameTypeFormal  |> List.partition (fun (Attrib(_,kind2,exprs2,namedArgs2,_)) -> true) 
-            match sameFormal.Length, sameActual.Length with 
-            | n,m when n = m -> for x in sameActual do allActualAttribs.Add (sameActual)
-            | 1,m when n = m -> for x in sameActual do allActualAttribs.Add (sameActual)
-            remaining <- rest
-            
-        true
-*)
-
-    and private CheckTypeDef g amap denv aenv (atc:Tycon) (ftc:Tycon) =
-        let m = atc.Range
-        let err s =  Error("The " ^ atc.TypeOrMeasureKind.ToString() ^ " definitions in the signature and implementation are not compatible because "^s,m)
-        if atc.MangledName <> ftc.MangledName then  (errorR (err "the names differ"); false) else
-        CheckExnInfo g m denv  (fun s -> ExnconstrNotContained(denv,atc,ftc,s)) aenv atc.ExceptionInfo ftc.ExceptionInfo &&
-        let atps = atc.Typars(m)
-        let ftps = ftc.Typars(m)
-        if List.length atps <> List.length ftps then  (errorR (err("the respective type parameter counts differ")); false)
-        elif IsLessAccessible atc.Accessibility ftc.Accessibility then (errorR(err "the accessibility specified in the signature is more than that specified in the implementation"); false)
-        else 
-          let aenv = bind_tyeq_env_typars atps ftps aenv
-          let aintfs = List.map p13 (List.filter (fun (_,compgen,_) -> not compgen) atc.TypeContents.tcaug_implements)
-          let fintfs = List.map p13 (List.filter (fun (_,compgen,_) -> not compgen) ftc.TypeContents.tcaug_implements)
-          let aintfs = ListSet.setify (type_equiv g) (List.collect (AllSuperTypesOfType g amap m) aintfs)
-          let fintfs = ListSet.setify (type_equiv g) (List.collect (AllSuperTypesOfType g amap m) fintfs)
-        
-          let unimpl = ListSet.subtract (fun fity aity -> type_aequiv g aenv aity fity) fintfs aintfs
-          (unimpl |> List.forall (fun ity -> errorR (err ("the signature requires that the type supports the interface "^NicePrint.pretty_string_of_typ denv ity^" but the interface has not been implemented")); false)) &&
-          let hidden = ListSet.subtract (type_aequiv g aenv) aintfs fintfs
-          hidden |> List.iter (fun ity -> (if atc.IsFSharpInterfaceTycon then error else warning) (InterfaceNotRevealed(denv,ity,atc.Range)));
-          let aNull = IsUnionTypeWithNullAsTrueValue g atc
-          let fNull = IsUnionTypeWithNullAsTrueValue g ftc
-          if aNull && not fNull then 
-            errorR(err("the implementation says this type may use nulls as a representation but the signature does not"))
-          elif fNull && not aNull then 
-            errorR(err("the signature says this type may use nulls as a representation but the implementation does not"));
-          let aSealed = is_sealed_typ g (snd (generalize_tcref (mk_local_tcref atc)))
-          let fSealed = is_sealed_typ g (snd (generalize_tcref (mk_local_tcref ftc)))
-          if  aSealed && not fSealed  then 
-            errorR(err("the implementation type is sealed but the signature implies it is not. Consider adding the [] attribute to the signature"));
-          if  not aSealed && fSealed  then 
-            errorR(err("the implementation type is not sealed but signature implies is. Consider adding the [] attribute to the implementation"));
-          let aPartial = is_partially_implemented_tycon atc
-          let fPartial = is_partially_implemented_tycon ftc
-          if aPartial && not fPartial then 
-            errorR(err("the implementation is an abstract class but the signature is not. Consider adding the [] attribute to the signature"));
-          if not aPartial && fPartial then 
-            errorR(err("the signature is an abstract class but the implementation is not. Consider adding the [] attribute to the implementation"));
-          if not (type_aequiv g aenv (super_of_tycon g atc) (super_of_tycon g ftc)) then 
-              errorR (err("the types have different base types"));
-          CheckTypars g denv m aenv atps ftps &&
-          CheckTypeRepr g denv err aenv atc.TypeReprInfo ftc.TypeReprInfo &&
-          CheckTypeAbbrev g denv err aenv atc.TypeOrMeasureKind ftc.TypeOrMeasureKind atc.TypeAbbrev ftc.TypeAbbrev 
-        
-    and private CheckValInfo err (id:ident) aarity farity = 
-        match aarity,farity with 
-        | _,None -> true
-        | None, Some _ -> err("An arity was not inferred for this value")
-        | Some (TopValInfo (tpNames1,_,_) as info1), Some (TopValInfo (tpNames2,_,_) as info2) ->
-            let ntps = tpNames1.Length
-            let mtps = tpNames2.Length
-            let n = info1.AritiesOfArgs
-            let m = info2.AritiesOfArgs
-            if ntps = mtps && m.Length <= n.Length && List.forall2 (fun x y -> x <= y) m (fst (List.chop m.Length n)) then true
-            elif ntps <> mtps then
-              err("The number of generic parameters in the signature and implementation differ (the signature declares "^string mtps^" but the implementation declares "^string ntps) 
-            elif info1.KindsOfTypars <> info2.KindsOfTypars then
-              err("The generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [] attribute")
-            else 
-              err("The arities in the signature and implementation differ. The signature specifies that '"^id.idText^"' is function definition or lambda expression accepting at least "^string (List.length m)^" argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval "^id.idText^": int -> (int -> int)\ninstead of\n\tval "^id.idText^": int -> int -> int")
-
-    and private CheckVal g amap denv implModRef aenv (implVal:Val) (sigVal:Val) =
-
-        // Propagate defn location information from implementation to signature . 
-        sigVal.Data.val_defn_range <- implVal.DefinitionRange;
-
-        if verbose then  dprintf "checking value %s, %d, %d\n" implVal.MangledName implVal.Stamp sigVal.Stamp;
-        let mk_err denv s = ValueNotContained(denv,implModRef,implVal,sigVal,s)
-        let err denv s = errorR(mk_err denv s); false
-        let m = implVal.Range
-        if implVal.IsMutable <> sigVal.IsMutable then (err denv "The mutability attributes differ")
-        elif implVal.MangledName <> sigVal.MangledName then (err denv "The names differ")
-        elif IsLessAccessible implVal.Accessibility sigVal.Accessibility then (err denv "The accessibility specified in the signature is more than that specified in the implementation")
-        elif implVal.MustInline <> sigVal.MustInline then (err denv "The inline flags differ")
-        elif implVal.LiteralValue <> sigVal.LiteralValue then (err denv "The literal constant values and/or attributes differ")
-        elif implVal.IsTypeFunction <> sigVal.IsTypeFunction then (err denv "One is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation")
-        else 
-            let atps,atau = implVal.TypeScheme
-            let ftps,ftau = sigVal.TypeScheme
-            if atps.Length <> ftps.Length then (err {denv with showTyparBinding=true} "The respective type parameter counts differ") else
-            let aenv = bind_tyeq_env_typars atps ftps aenv
-            CheckTypars g denv m aenv atps ftps &&
-            let res = 
-              if not (type_aequiv g aenv atau ftau) then err denv "The types differ" 
-              elif not (CheckValInfo (err denv) implVal.Id implVal.TopValInfo sigVal.TopValInfo) then false
-              elif not (implVal.IsExtensionMember = sigVal.IsExtensionMember) then err denv "One is an extension member and the other is not"
-              elif not (CheckMemberDatasConform g (err denv) (implVal.Attribs, implVal,implVal.MemberInfo) (sigVal.Attribs,sigVal,sigVal.MemberInfo)) then false
-              else true
-
-            // Propagate information signature to implementation
-
-            // Update the arity of the value to reflect the constraint of the signature 
-            // This ensures that the compiled form of the value matches the signature rather than 
-            // the implementation. This also propagates argument names from signature to implementation
-            implVal.Data.val_top_repr_info <- sigVal.Data.val_top_repr_info;
-            res
-
-    and private CheckExnInfo g m denv err aenv arepr frepr =
-        match arepr,frepr with 
-        | TExnAsmRepr _, TExnFresh _ -> 
-            (errorR (err "a .NET exception mapping is being hidden by a signature. The exception mapping must be visible to other modules"); false)
-        | TExnAsmRepr tcr1, TExnAsmRepr tcr2  -> 
-            if tcr1 <> tcr2 then  (errorR (err "the .NET representations differ"); false) else true
-        | TExnAbbrevRepr _, TExnFresh _ -> 
-            (errorR (err "the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other .NET languages. Consider making the abbreviation visible in the signature"); false)
-        | TExnAbbrevRepr ecr1, TExnAbbrevRepr ecr2 -> 
-            if not (tcref_aequiv g aenv ecr1 ecr2) then 
-              (errorR (err "the exception abbreviations in the signature and implementation differ"); false)
-            else true
-        | TExnFresh r1, TExnFresh  r2-> CheckRecordFields g denv err aenv r1 r2
-        | TExnNone,TExnNone -> true
-        | _ -> 
-            (errorR (err "the exception declrations differ"); false)
-
-    and private CheckUnionCase g denv aenv c1 c2 =
-        let err msg = errorR(ConstrNotContained(denv,c1,c2,msg));false
-        if c1.ucase_id.idText <> c2.ucase_id.idText then  err "The names differ"
-        elif c1.RecdFields.Length <> c2.RecdFields.Length then err "The respective number of data fields differ"
-        elif not (List.forall2 (CheckField g denv aenv) c1.RecdFields c2.RecdFields) then err "The types of the fields differ"
-        elif IsLessAccessible c1.Accessibility c2.Accessibility then err "the accessibility specified in the signature is more than that specified in the implementation"
-        else true
-
-    and private CheckField g denv aenv f1 f2 =
-        let err msg = errorR(FieldNotContained(denv,f1,f2,msg)); false
-        if f1.rfield_id.idText <> f2.rfield_id.idText then err "The names differ"
-        elif IsLessAccessible f1.Accessibility f2.Accessibility then err "the accessibility specified in the signature is more than that specified in the implementation"
-        elif f1.IsStatic <> f2.IsStatic then err "The 'static' modifiers differ"
-        elif f1.IsMutable <> f2.IsMutable then err "The 'mutable' modifiers differ"
-        elif f1.LiteralValue <> f2.LiteralValue then err "The 'literal' modifiers differ"
-        elif not (type_aequiv g aenv f1.FormalType f2.FormalType) then err "The types differ"
-        else true
-
-    and private CheckMemberDatasConform g err  (implAttrs,implVal,implMemberInfo) (sigAttrs, sigVal,sigMemberInfo)  =
-        match implMemberInfo,sigMemberInfo with 
-        | None,None -> true
-        | Some avspr, Some fvspr -> 
-            if not (avspr.CompiledName = fvspr.CompiledName) then 
-              err("The .NET member names differ")
-            elif not (avspr.MemberFlags.OverloadQualifier = fvspr.MemberFlags.OverloadQualifier) then 
-              err("The overload resolution identifier attributes differ")
-            elif not (avspr.MemberFlags.MemberIsInstance = fvspr.MemberFlags.MemberIsInstance) then 
-              err("One is static and the other isn't")
-            elif not (avspr.MemberFlags.MemberIsVirtual = fvspr.MemberFlags.MemberIsVirtual) then 
-              err("One is virtual and the other isn't")
-            elif not (avspr.MemberFlags.MemberIsDispatchSlot = fvspr.MemberFlags.MemberIsDispatchSlot) then 
-              err("One is abstract and the other isn't")
-           (* I've weakened this check: *)
-           (*     classes have non-final CompareTo/Hash methods *)
-           (*     abstract have non-final CompareTo/Hash methods *)
-           (*     records  have final CompareTo/Hash methods *)
-           (*     unions  have final CompareTo/Hash methods *)
-           (* Therefore it is OK for the signaure to say 'non-final' when the implementation says 'final' *)
-            elif not avspr.MemberFlags.MemberIsFinal && fvspr.MemberFlags.MemberIsFinal then 
-              err("One is final and the other isn't")
-            elif not (avspr.MemberFlags.MemberIsOverrideOrExplicitImpl = fvspr.MemberFlags.MemberIsOverrideOrExplicitImpl) then 
-              err("One is marked as an override and the other isn't")
-            elif not (avspr.MemberFlags.MemberKind = fvspr.MemberFlags.MemberKind) then 
-              err("One is a constructor/property and the other is not")
-            else  
-               let finstance = ValSpecIsCompiledAsInstance g sigVal
-               let ainstance = ValSpecIsCompiledAsInstance g implVal
-               if  finstance && not ainstance then 
-                  err "The compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member"
-               elif not finstance && ainstance then 
-                  err "The compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member"
-               else true
-
-        | _ -> false
-
-    and CheckRecordFields g denv err aenv (afields:TyconRecdFields) (ffields:TyconRecdFields) =
-        let afields = afields.TrueFieldsAsList
-        let ffields = ffields.TrueFieldsAsList
-        let m1 = afields |> NameMap.of_keyed_list (fun rfld -> rfld.Name)
-        let m2 = ffields |> NameMap.of_keyed_list (fun rfld -> rfld.Name)
-        NameMap.suball2 (fun s _ -> errorR(err ("the field "^s^" was required by the signature but was not specified by the implementation")); false) (CheckField g denv aenv)  m1 m2 &&
-        NameMap.suball2 (fun s _ -> errorR(err ("the field "^s^" was present in the implementation but not in the signature")); false) (fun x y -> CheckField g denv aenv y x)  m2 m1 &&
-        (* This check is required because constructors etc. are externally visible *)
-        (* and thus compiled representations do pick up dependencies on the field order  *)
-        (if List.forall2 (fun f1 f2 -> CheckField g denv aenv f1 f2)  afields ffields
-         then true
-         else (errorR(err ("the order of the fields is different in the signature and implementation")); false))
-
-    and CheckVirtualSlots g denv err aenv avslots fvslots =
-        let m1 = NameMap.of_keyed_list (fun (v:ValRef) -> v.MangledName) avslots
-        let m2 = NameMap.of_keyed_list (fun (v:ValRef) -> v.MangledName) fvslots
-        NameMap.suball2 (fun s vref -> errorR(err ("the abstract member '"^ Layout.showL(NicePrint.valL denv (deref_val vref)) ^"' was required by the signature but was not specified by the implementation")); false) (fun x y -> true)  m1 m2 &&
-        NameMap.suball2 (fun s vref -> errorR(err ("the abstract member '"^ Layout.showL(NicePrint.valL denv (deref_val vref)) ^"' was present in the implementation but not in the signature")); false) (fun x y -> true)  m2 m1
-
-    and CheckClassFields isStruct g denv err aenv (afields:TyconRecdFields) (ffields:TyconRecdFields) =
-        let afields = afields.TrueFieldsAsList
-        let ffields = ffields.TrueFieldsAsList
-        let m1 = afields |> NameMap.of_keyed_list (fun rfld -> rfld.Name) 
-        let m2 = ffields |> NameMap.of_keyed_list (fun rfld -> rfld.Name) 
-        NameMap.suball2 (fun s _ -> errorR(err ("the field "^s^" was required by the signature but was not specified by the implementation")); false) (CheckField g denv aenv)  m1 m2 &&
-        (if isStruct then 
-            NameMap.suball2 (fun s _ -> warning(err ("the field "^s^" was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'")); false) (fun x y -> CheckField g denv aenv y x)  m2 m1 
-         else
-            true)
-        
-
-    and CheckTypeRepr g denv err aenv arepr frepr =
-        let reportNiceError k s1 s2 = 
-          let aset = Nameset.of_list s1
-          let fset = Nameset.of_list s2
-          match Zset.elements (Zset.diff aset fset) with 
-          | [] -> 
-              match Zset.elements (Zset.diff fset aset) with             
-              | [] -> (errorR (err ("the number of "^k^"s differ")); false)
-              | l -> (errorR (err ("the signature defines the "^k^" '"^String.concat ";" l^"' but the implementation does not (or does, but not in the same order)")); false)
-          | l -> (errorR (err ("the implementation defines the "^k^" '"^String.concat ";" l^"' but the signature does not (or does, but not in the same order)")); false)
-
-        match arepr,frepr with 
-        | Some (TRecdRepr _ | TFiniteUnionRepr _ | TILObjModelRepr _ ), None  -> true
-        | Some (TFsObjModelRepr r), None  -> 
-            if r.fsobjmodel_kind = TTyconStruct or r.fsobjmodel_kind = TTyconEnum then 
-              (errorR (err "the implementation defines a struct but the signature defines a type with a hidden representation"); false)
-            else true
-        | Some (TAsmRepr _), None -> 
-            (errorR (err "a .NET type representation is being hidden by a signature"); false)
-        | Some (TMeasureableRepr _), None -> 
-            (errorR (err "a type representation is being hidden by a signature"); false)
-        | Some (TFiniteUnionRepr r1), Some (TFiniteUnionRepr r2) -> 
-            let ucases1 = r1.UnionCasesAsList
-            let ucases2 = r2.UnionCasesAsList
-            if ucases1.Length <> ucases2.Length then
-              let names l = List.map (fun c -> c.ucase_id.idText) l
-              reportNiceError "union case" (names ucases1) (names ucases2) 
-            else List.forall2 (CheckUnionCase g denv aenv) ucases1 ucases2
-        | Some (TRecdRepr afields), Some (TRecdRepr ffields) -> 
-            CheckRecordFields g denv err aenv afields ffields
-        | Some (TFsObjModelRepr r1), Some (TFsObjModelRepr r2) -> 
-            if not (match r1.fsobjmodel_kind,r2.fsobjmodel_kind with 
-                     | TTyconClass,TTyconClass -> true
-                     | TTyconInterface,TTyconInterface -> true
-                     | TTyconStruct,TTyconStruct -> true
-                     | TTyconEnum, TTyconEnum -> true
-                     | TTyconDelegate (TSlotSig(nm1,typ1,ctps1,mtps1,ps1, rty1)), 
-                       TTyconDelegate (TSlotSig(nm2,typ2,ctps2,mtps2,ps2, rty2)) -> 
-                         (type_aequiv g aenv typ1 typ2) &&
-                         (ctps1.Length = ctps2.Length) &&
-                         (let aenv = bind_tyeq_env_typars ctps1 ctps2 aenv
-                          (typar_decls_aequiv g aenv ctps1 ctps2) &&
-                          (mtps1.Length = mtps2.Length) &&
-                          (let aenv = bind_tyeq_env_typars mtps1 mtps2 aenv
-                           (typar_decls_aequiv g aenv mtps1 mtps2) &&
-                           ((ps1,ps2) ||> List.lengthsEqAndForall2 (List.lengthsEqAndForall2 (fun p1 p2 -> type_aequiv g aenv p1.Type p2.Type))) &&
-                           (return_types_aequiv g aenv rty1 rty2)))
-                     | _,_ -> false) then 
-              (errorR (err "the types are of different kinds"); false)
-            else 
-              CheckClassFields (r1.fsobjmodel_kind = TTyconStruct) g denv err aenv r1.fsobjmodel_rfields r2.fsobjmodel_rfields &&
-              CheckVirtualSlots g denv err aenv r1.fsobjmodel_vslots r2.fsobjmodel_vslots
-        | Some (TAsmRepr tcr1),  Some (TAsmRepr tcr2) -> 
-            if tcr1 <> tcr2 then  (errorR (err "the IL representations differ"); false) else true
-        | Some (TMeasureableRepr ty1),  Some (TMeasureableRepr ty2) -> 
-            if type_aequiv g aenv ty1 ty2 then true else (errorR (err "the representations differ"); false)
-        | Some _, Some _ -> (errorR (err "the representations differ"); false)
-        | None, Some _ -> (errorR (err "the representations differ"); false)
-        | None, None -> true
-
-    and CheckTypeAbbrev g denv err aenv kind1 kind2 abbrev1 abbrev2 =
-        if kind1 <> kind2 then (errorR (err ("the signature declares a " ^ kind2.ToString() ^ " while the implementation declares a " ^ kind1.ToString())); false)
-        else
-          match abbrev1,abbrev2 with 
-          | Some ty1, Some ty2 -> if not (type_aequiv g aenv ty1 ty2) then (errorR (err ("the abbreviations differ: " ^ Layout.showL (typeL ty1) ^ " vs " ^  Layout.showL (typeL ty2))); false) else true
-          | None,None -> true
-          | Some _, None -> (errorR (err ("an abbreviation is being hidden by a signature. The abbreviation must be visible to other .NET languages. Consider making the abbreviation visible in the signature")); false)
-          | None, Some _ -> (errorR (err "the signature has an abbreviation while the implementation does not"); false)
-
-    and CheckModuleOrNamespaceContents m g amap denv aenv (implModRef:ModuleOrNamespaceRef) (signModType:ModuleOrNamespaceType) = 
-        let implModType = implModRef.ModuleOrNamespaceType
-        (if implModType.ModuleOrNamespaceKind <> signModType.ModuleOrNamespaceKind then errorR(Error("The namespace or module attributes differ between signature and implementation",m)));
-        NameMap.suball2 
-            (fun s fx -> errorR(RequiredButNotSpecified(denv,implModRef,"type",(fun os -> Printf.bprintf os "%s" s),m)); false) 
-            (CheckTypeDef g amap denv aenv)  
-            implModType.TypesByMangledName 
-            signModType.TypesByMangledName &&
-
-        (implModType.ModulesAndNamespacesByDemangledName, signModType.ModulesAndNamespacesByDemangledName ) 
-          ||> NameMap.suball2 
-               (fun s fx -> errorR(RequiredButNotSpecified(denv,implModRef,(if fx.IsModule then "module" else "namespace"),(fun os -> Printf.bprintf os "%s" s),m)); false) 
-               (fun x1 (x2:ModuleOrNamespace) -> CheckModuleOrNamespace g amap denv aenv (mk_local_modref x1) x2.ModuleOrNamespaceType)  &&
-
-        NameMap.suball2 
-            (fun s (fx:Val) -> 
-                errorR(RequiredButNotSpecified(denv,implModRef,"value",(fun os -> 
-                   (* In the case of missing members show the full required enclosing type and signature *)
-                   if fx.IsMember then 
-                       Printf.bprintf os "%a" (NicePrint.output_qualified_val_spec denv) fx
-                   else
-                       Printf.bprintf os "%s" fx.DisplayName),m)); false)
-            (CheckVal g amap denv implModRef aenv) 
-            implModType.AllValuesAndMembers 
-            signModType.AllValuesAndMembers
-
-    and CheckModuleOrNamespace g amap denv aenv (implModRef:ModuleOrNamespaceRef) signModType = 
-        CheckModuleOrNamespaceContents implModRef.Range g amap denv aenv implModRef signModType
-
-
-    /// Check the names add up between a signature and its implementation. We check this first.
-    let rec CheckNamesOfModuleOrNamespaceContents denv (implModRef:ModuleOrNamespaceRef) (signModType:ModuleOrNamespaceType) = 
-        let m = implModRef.Range 
-        let implModType = implModRef.ModuleOrNamespaceType
-        NameMap.suball2 
-            (fun s fx -> errorR(RequiredButNotSpecified(denv,implModRef,"type",(fun os -> Printf.bprintf os "%s" s),m)); false) 
-            (fun _ _ -> true)  
-            implModType.TypesByMangledName 
-            signModType.TypesByMangledName &&
-
-        (implModType.ModulesAndNamespacesByDemangledName, signModType.ModulesAndNamespacesByDemangledName ) 
-          ||> NameMap.suball2 
-                (fun s fx -> errorR(RequiredButNotSpecified(denv,implModRef,(if fx.IsModule then "module" else "namespace"),(fun os -> Printf.bprintf os "%s" s),m)); false) 
-                (fun x1 (x2:ModuleOrNamespace) -> CheckNamesOfModuleOrNamespace denv (mk_local_modref x1) x2.ModuleOrNamespaceType)  &&
-
-        NameMap.suball2 
-            (fun s (fx:Val) -> 
-                errorR(RequiredButNotSpecified(denv,implModRef,"value",(fun os -> 
-                   (* In the case of missing members show the full required enclosing type and signature *)
-                   if isSome (fx.MemberInfo) then 
-                       Printf.bprintf os "%a" (NicePrint.output_qualified_val_spec denv) fx
-                   else
-                       Printf.bprintf os "%s" fx.DisplayName),m)); false)
-            (fun _ _ -> true) 
-            implModType.AllValuesAndMembers 
-            signModType.AllValuesAndMembers
-
-
-    and CheckNamesOfModuleOrNamespace denv (implModRef:ModuleOrNamespaceRef) signModType = 
-        CheckNamesOfModuleOrNamespaceContents denv implModRef signModType
-
-end
-
-//-------------------------------------------------------------------------
-// Completeness of classes
-//------------------------------------------------------------------------- 
-
-type OverrideCanImplement = 
-    | CanImplementAnyInterfaceSlot
-    | CanImplementAnyClassHierarchySlot
-    | CanImplementAnySlot
-    | CanImplementNoSlots
-    
-type OverrideInfo = 
-    | Override of OverrideCanImplement * ident * (typars * TyparInst) * Tast.typ list list * Tast.typ option * (*isFakeEventProperty:*)bool
-    member x.IsFakeEventProperty = let (Override(_,_,_,_,_,b)) = x in b
-    member x.LogicalName = let (Override(_,id,_,_,_,_)) = x in id.idText
-    member x.Range = let (Override(_,id,_,_,_,_)) = x in id.idRange
-
-type AvailPriorPropertySlotImpl = AvailPriorPropertySlotImpl of PropInfo
-
-type SlotImplSet = SlotImplSet of MethInfo list * NameMultiMap * OverrideInfo list * PropInfo list
-
-exception TypeIsImplicitlyAbstract of range
-exception OverrideDoesntOverride of DisplayEnv * OverrideInfo * MethInfo option * TcGlobals * Import.ImportMap * range
-
-
-
-module DispatchSlotChecking =
-    /// The overall information about a method implementation in a class or obeject expression 
-
-    let PrintOverrideToBuffer denv os (Override(_,id,(mtps,memberToParentInst),argTys,retTy,_)) = 
-       let denv = { denv with showTyparBinding = true }
-       let retTy = (retTy  |> GetFSharpViewOfReturnType denv.g)
-       let argInfos = 
-           match argTys with 
-           | [] -> [[(denv.g.unit_ty,TopValInfo.unnamedTopArg1)]]
-           | _ -> argTys |> List.mapSquared (fun ty -> (ty, TopValInfo.unnamedTopArg1)) 
-       Layout.bufferL os (NicePrint.memberSigL denv (memberToParentInst,id.idText,mtps, argInfos, retTy))
-
-    let PrintMethInfoSigToBuffer g amap m denv os minfo =
-        let denv = { denv with showTyparBinding = true }
-        let argTys,retTy,fmtps,ttpinst = CompiledSigOfMeth g amap m minfo
-        let retTy = (retTy  |> GetFSharpViewOfReturnType g)
-        let argInfos = argTys |> List.mapSquared (fun ty -> (ty, TopValInfo.unnamedTopArg1))
-        let nm = minfo.LogicalName
-        Layout.bufferL os (NicePrint.memberSigL denv (ttpinst,nm,fmtps, argInfos, retTy))
-
-    let FormatOverride denv d = bufs (fun buf -> PrintOverrideToBuffer denv buf d)
-    let FormatMethInfoSig g amap m denv d = bufs (fun buf -> PrintMethInfoSigToBuffer g amap m denv buf d)
-
-    let GetInheritedMemberOverrideInfo g amap m parentType (minfo:MethInfo) = 
-        let nm = minfo.LogicalName
-        let argTys,retTy,fmtps,ttpinst = CompiledSigOfMeth g amap m minfo
-
-        let isFakeEventProperty = minfo.IsFSharpEventProperty
-        Override(parentType,mksyn_id m nm, (fmtps,ttpinst),argTys,retTy,isFakeEventProperty)
-
-    let GetTypeMemberOverrideInfo g reqdTy (overrideBy:ValRef) = 
-        let _,argInfos,retTy,_ = GetTypeOfMemberInMemberForm g overrideBy
-        let nm = overrideBy.MemberInfo.Value.LogicalName
-
-        let argTys = argInfos |> List.mapSquared fst
-        
-        let memberMethodTypars,memberToParentInst,argTys,retTy = 
-            match PartitionValRefTypars g overrideBy with
-            | Some(_,_,memberMethodTypars,memberToParentInst,tinst) -> 
-                let argTys = argTys |> List.mapSquared (InstType memberToParentInst) 
-                let retTy = retTy |> Option.map (InstType memberToParentInst) 
-                memberMethodTypars, memberToParentInst,argTys, retTy
-            | None -> 
-                error(Error("this method is over-constrained in its type parameters",overrideBy.Range))
-        let implKind = 
-            if MemberIsExplicitImpl g overrideBy.MemberInfo.Value then 
-                
-                let belongsToReqdTy = 
-                    match overrideBy.MemberInfo.Value.ImplementedSlotSigs with
-                    | [] -> false
-                    | ss :: _ -> is_interface_typ g ss.ImplementedType && type_equiv g reqdTy ss.ImplementedType
-                if belongsToReqdTy then 
-                    CanImplementAnyInterfaceSlot
-                else
-                    CanImplementNoSlots
-            else if MemberRefIsDispatchSlot overrideBy then 
-                CanImplementNoSlots
-                // abstract slots can only implement interface slots
-                //CanImplementAnyInterfaceSlot  <<----- Change to this to enable implicit interface implementation
-            
-            else 
-                CanImplementAnyClassHierarchySlot
-                //CanImplementAnySlot  <<----- Change to this to enable implicit interface implementation
-
-        let isFakeEventProperty = overrideBy.IsFSharpEventProperty(g)
-        Override(implKind,mksyn_id overrideBy.Range nm, (memberMethodTypars,memberToParentInst),argTys,retTy,isFakeEventProperty)
-
-    let GetObjectExprOverrideInfo g amap (implty,id:ident,memberFlags,ty,arityInfo,expr) = 
-        if verbose then  dprintf "--> GetObjectExprOverrideInfo\n";
-        // Dissect the type
-        let tps,argInfos,retTy,_ = GetMemberTypeInMemberForm g memberFlags arityInfo ty id.idRange
-        // Drop 'this'
-        let argTys = argInfos |> List.mapSquared fst
-        // Dissect the implementation
-        let _,basevopt,vsl,body,_ = dest_top_lambda_upto g amap arityInfo (expr,ty)
-        match vsl with 
-        | [thisv]::vs -> 
-            // Check for empty variable list from a () arg
-            let vs = if vs.Length = 1 && argInfos.IsEmpty then [] else vs
-            let implKind = 
-                if is_interface_typ g implty then 
-                    CanImplementAnyInterfaceSlot 
-                else 
-                    CanImplementAnyClassHierarchySlot
-                    //CanImplementAnySlot  <<----- Change to this to enable implicit interface implementation
-            let overrideByInfo = Override(implKind,id,(tps,[]),argTys,retTy,false )
-            overrideByInfo,(basevopt,thisv,vs,body)
-        | _ -> 
-            error(InternalError("Unexpected shape for object expression override",id.idRange))
-          
-    let is_name_match (dispatchSlot:MethInfo) (overrideBy: OverrideInfo) = 
-        (overrideBy.LogicalName = dispatchSlot.LogicalName)
-          
-    let is_impl_match g amap m (dispatchSlot:MethInfo) (Override(implKind,_,_,_,_,_)) = 
-        // If the override is listed as only relevant to one type, and we're matching it against an abstract slot of an interface type,
-        // then check that interface type is the right type.
-        (match implKind with 
-         | CanImplementNoSlots -> false
-         | CanImplementAnySlot -> true 
-         | CanImplementAnyClassHierarchySlot -> not (is_interface_typ g dispatchSlot.EnclosingType)
-         //| CanImplementSpecificInterfaceSlot parentTy -> is_interface_typ g dispatchSlot.EnclosingType && type_equiv g parentTy dispatchSlot.EnclosingType 
-         | CanImplementAnyInterfaceSlot -> is_interface_typ g dispatchSlot.EnclosingType)
-
-    let is_typar_kind_match g amap m (dispatchSlot:MethInfo) (Override(_,_,(mtps,_),_,_,_) as overrideBy) = 
-        let vargtys,_,fvmtps,_ = CompiledSigOfMeth g amap m dispatchSlot 
-        List.lengthsEqAndForall2 (fun (tp1:Typar) (tp2:Typar) -> tp1.Kind = tp2.Kind) mtps fvmtps
-        
-    let is_partial_match g amap m (dispatchSlot:MethInfo) (Override(implKind,_,(mtps,_),argTys,retTy,_) as overrideBy) = 
-        is_name_match dispatchSlot overrideBy &&
-        let vargtys,_,fvmtps,_ = CompiledSigOfMeth g amap m dispatchSlot 
-        mtps.Length = fvmtps.Length &&
-        is_typar_kind_match g amap m dispatchSlot overrideBy && 
-        argTys.Length = vargtys.Length &&
-        is_impl_match g amap m dispatchSlot overrideBy  
-          
-    let reverse_renaming g tinst = 
-        tinst |> List.map (fun (tp,ty) -> (dest_typar_typ g ty, mk_typar_ty tp))
-
-    let compose_inst inst1 inst2 = 
-        inst1 |> List.map (map2'2 (InstType inst2)) 
-     
-    let is_exact_match g amap m dispatchSlot (Override(_,id,(mtps,mtpinst),argTys,retTy,_) as overrideBy) =
-        is_partial_match g amap m dispatchSlot overrideBy &&
-        let vargtys,vrty,fvmtps,ttpinst = CompiledSigOfMeth g amap m dispatchSlot
-
-        (* Compare the types. CompiledSigOfMeth, GetObjectExprOverrideInfo and GetTypeMemberOverrideInfo have already *)
-        (* applied all relevant substitutions except the renamings from fvtmps <-> mtps *)
-
-        let aenv = 
-           tyeq_env_empty  
-           |> bind_tyeq_env_typars fvmtps mtps
-
-        List.forall2 (List.lengthsEqAndForall2 (type_aequiv g aenv)) vargtys argTys &&
-        return_types_aequiv g aenv vrty retTy &&
-        
-        (* Comparing the method typars and their constraints is much trickier since the substitutions have not been applied 
-           to the constraints of these babies. This is partly because constraints are directly attached to typars so it's 
-           difficult to apply substitutions to them unless we separate them off at some point, which we don't as yet.        
-
-           Given   C
-                   D
-                   dispatchSlot :   C.M(...)
-                   overrideBy:  parent: D  value: ! (...) 
-                   
-               where X[dtps] indicates that X may involve free type variables dtps
-               
-               we have 
-                   ttpinst maps  ctps --> ctys[dtps] 
-                   mtpinst maps  ttps --> dtps
-               
-               compare fvtmps[ctps] and mtps[ttps] by 
-                  fvtmps[ctps]  @ ttpinst     -- gives fvtmps[dtps]
-                  fvtmps[dtps] @ rev(mtpinst) -- gives fvtmps[ttps]
-                  
-               Now fvtmps[ttps] and mtpinst[ttps] are comparable, i.e. have sontraints w.r.t. the same set of type variables 
-                   
-          i.e.  Compose the substitutions ttpinst and rev(mtpinst) *)
-
-              
-        (* Compose the substitutions *)
-        
-        let ttpinst = 
-            (* check we can reverse - in some error recovery situations we can't *)
-            if mtpinst |> List.exists (snd >> is_typar_typ g >> not) then ttpinst 
-            else compose_inst ttpinst (reverse_renaming g mtpinst)
-
-        (* Compare under the composed substitutions *)
-        let aenv = bind_tyeq_env_tpinst ttpinst tyeq_env_empty
-        
-        typar_decls_aequiv g aenv fvmtps mtps
-
-    /// 6a. check all interface and abstract methods are implemented 
-          
-    let CheckDispatchSlotsAreImplemented (denv,g,amap,m,
-                                          isOverallTyAbstract,
-                                          reqdTy,
-                                          dispatchSlots:MethInfo list,
-                                          availPriorOverridesKeyed:OverrideInfo list,
-                                          overrides:OverrideInfo list) = 
-
-        let isReqdTyInterface = is_interface_typ g reqdTy 
-        let showMissingMethodsAndRaiseErrors = (isReqdTyInterface || not isOverallTyAbstract)
-        let res = ref true
-        let fail exn = (res := false ; if showMissingMethodsAndRaiseErrors then errorR exn)
-        
-        // Index the availPriorOverrides and overrides by name
-        let availPriorOverridesKeyed = availPriorOverridesKeyed |> NameMultiMap.initBy (fun ov -> ov.LogicalName)
-        let overridesKeyed = overrides |> NameMultiMap.initBy (fun ov -> ov.LogicalName)
-        
-        dispatchSlots |> List.iter (fun dispatchSlot -> 
-          
-            match NameMultiMap.find dispatchSlot.LogicalName overridesKeyed |> List.filter (is_exact_match g amap m dispatchSlot)  with
-            | [h] -> 
-                ()
-            | [] -> 
-                if not (NameMultiMap.find  dispatchSlot.LogicalName availPriorOverridesKeyed |> List.exists (is_exact_match g amap m dispatchSlot)) then 
-                    (* error reporting path *)
-                    let vargtys,vrty,fvmtps,_ = CompiledSigOfMeth g amap m dispatchSlot
-                    let noimpl() = fail(Error("No implementation was given for '"^string_of_minfo amap m denv dispatchSlot^"'"^
-                                                (if isReqdTyInterface then ". Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'"
-                                                 else ""),m))
-                    match  overrides |> List.filter (is_partial_match g amap m dispatchSlot)  with 
-                    | [] -> 
-                        match overrides |> List.filter (fun overrideBy -> is_name_match dispatchSlot overrideBy && 
-                                                                            is_impl_match g amap m dispatchSlot overrideBy)  with 
-                        | [] -> 
-                            noimpl()
-                        | [ Override(_,_,(mtps,_),argTys,_,_) as overrideBy ] -> 
-                            let explanation = 
-                                if argTys.Length <> vargtys.Length then "does not have the correct number of arguments"
-                                elif mtps.Length <> fvmtps.Length then "does not have the correct number of method type parameters"
-                                elif not (is_typar_kind_match g amap m dispatchSlot overrideBy) then  "does not have the correct kinds of generic parameters"
-                                else "can not be used to implement '" ^ string_of_minfo amap m denv dispatchSlot ^ "'"
-                            fail(Error("The member '"^FormatOverride denv overrideBy^"' " ^ explanation ^ ". The required signature is '"^FormatMethInfoSig g amap m denv dispatchSlot^"'",overrideBy.Range))
-                        | overrideBy :: _ -> 
-                            errorR(Error("No implementations of '"^FormatMethInfoSig g amap m denv dispatchSlot^"' had the correct number of arguments and type parameters. The required signature is '"^FormatMethInfoSig g amap m denv dispatchSlot^"'",overrideBy.Range))
-
-                    | [ overrideBy ] -> 
-
-                        match dispatchSlots  |> List.filter (fun dispatchSlot -> is_exact_match g amap m dispatchSlot overrideBy) with 
-                        | [] -> 
-                            // Error will be reported below in CheckOverridesAreAllUsedOnce 
-                            ()
-                        | _ -> 
-                            noimpl()
-                        
-                    | _ -> 
-                        fail(Error("The override for '"^FormatMethInfoSig g amap m denv dispatchSlot^"' was ambiguous",m))
-            | _ -> fail(Error("More than one override implements '"^FormatMethInfoSig g amap m denv dispatchSlot^"'",m)));
-        !res
-
-    /// 6b. check all implementations implement some virtual method 
-    let CheckOverridesAreAllUsedOnce denv g amap (m,reqdTy,dispatchSlotsKeyed,overrides) = 
-        // Index the virtuals by name
-        
-        overrides |> List.iter  (fun (Override(_,_,_,argTys,retTy,_) as overrideBy) -> 
-          if not overrideBy.IsFakeEventProperty then
-            let m = overrideBy.Range
-            let relevantVirts = NameMultiMap.find overrideBy.LogicalName dispatchSlotsKeyed
-            // For the purposes of the "how many abstract slots can this override implement" relation,
-            // we are only interested in interface slots. That is, a single override is allowed
-            // to implement two distinct class-hierarchy abstract slots
-            //
-            // So here we merge all
-            let mergeClassHierarchyAbstractSlots (dispatchSlots:MethInfo list) = 
-                dispatchSlots |> ListSet.setify (fun v1 v2 -> not (is_interface_typ g v1.EnclosingType) && 
-                                                              not (is_interface_typ g v2.EnclosingType) &&
-                                                              MethInfosEquivByNameAndSig EraseNone g amap m v1 v2) 
-            
-            match relevantVirts  
-                     |> List.filter (fun dispatchSlot -> is_exact_match g amap m dispatchSlot overrideBy) 
-                     |> mergeClassHierarchyAbstractSlots with
-            | [] -> 
-                match relevantVirts 
-                        |> List.filter (fun dispatchSlot -> is_partial_match g amap m dispatchSlot overrideBy) 
-                        |> mergeClassHierarchyAbstractSlots with 
-                | [dispatchSlot] -> 
-                    errorR(OverrideDoesntOverride(denv,overrideBy,Some(dispatchSlot),g,amap,m))
-                | _ -> 
-                    match relevantVirts 
-                            |> List.filter (fun dispatchSlot -> is_name_match dispatchSlot overrideBy) 
-                            |> mergeClassHierarchyAbstractSlots with 
-                    | [dispatchSlot] -> 
-                        errorR(OverrideDoesntOverride(denv,overrideBy,Some(dispatchSlot),g,amap,m))
-                    | _ -> 
-                        errorR(OverrideDoesntOverride(denv,overrideBy,None,g,amap,m))
-            | [dispatchSlot] -> 
-                if dispatchSlot.IsFinal && not (type_equiv g reqdTy dispatchSlot.EnclosingType) then 
-                    errorR(Error("The method '"^string_of_minfo amap m denv dispatchSlot^"' is sealed and may not be overridden",m))
-            | h1 :: h2 :: _ -> 
-                errorR(Error(Printf.sprintf "The override '%s' implements more than one abstract slot, e.g. '%s' and '%s'" (FormatOverride denv overrideBy) (string_of_minfo amap m denv h1) (string_of_minfo amap m denv h2),m)))
-
-    //-------------------------------------------------------------------------
-
-    /// Get the slots of a type that can or must be implemented. This depends
-    /// partly on the full set of interface types that are being implemented
-    /// simultaneously, e.g.
-    ///    { new C with  interface I2 = ... interface I3 = ... }
-    /// allReqdTys = {C;I2;I3}
-    ///
-    /// allReqdTys can include one class/record/union type. 
-    let GetSlotImplSets (infoReader:InfoReader) denv isObjExpr allReqdTys = 
-
-        let g = infoReader.g
-        let amap = infoReader.amap
-        // For each implemented type, get a list containing the transitive closure of
-        // interface types implied by the type. This includes the implemented type itself if the implemented type
-        // is an interface type.
-        let intfSets = 
-            allReqdTys |> List.mapi (fun i (reqdTy,m) -> 
-                let interfaces = AllSuperTypesOfType g amap m reqdTy |> List.filter (is_interface_typ g)
-                let impliedTys = (if is_interface_typ g reqdTy then interfaces else reqdTy :: interfaces)
-                (i, reqdTy, impliedTys,m))
-
-        // For each implemented type, reduce its list of implied interfaces by subtracting out those implied 
-        // by another implemented interface type.
-        //
-        // REVIEW: Note complexity O(ity*jty)
-        let reqdTyInfos = 
-            intfSets |> List.map (fun (i,reqdTy,impliedTys,m) -> 
-                let reduced = 
-                    (impliedTys,intfSets) ||> List.fold (fun acc (j,jty,impliedTys2,m) -> 
-                         if i <> j && type_feasibly_subsumes_type 0 g amap m jty CanCoerce reqdTy 
-                         then ListSet.subtract (type_feasibly_equiv 0 g amap m) acc impliedTys2
-                         else acc ) 
-                (i, reqdTy, m, reduced))
-
-        // Check that, for each implemented type, at least one implemented type is implied. This is enough to capture
-        // duplicates.
-        for (i, reqdTy, m, impliedTys) in reqdTyInfos do
-            if is_interface_typ g reqdTy && isNil impliedTys then 
-                errorR(Error("Duplicate or redundant interface",m));
-
-        // Check that no interface type is implied twice
-        //
-        // REVIEW: Note complexity O(reqdTy*reqdTy)
-        for (i, reqdTy, im, impliedTys) in reqdTyInfos do
-            for (j,reqdTy2,jm,impliedTys2) in reqdTyInfos do
-                if i > j then  
-                    let overlap = ListSet.intersect (type_feasibly_equiv 0 g amap im) impliedTys impliedTys2
-                    overlap |> List.iter (fun overlappingTy -> 
-                        if nonNil(GetImmediateIntrinsicMethInfosOfType (None,AccessibleFromSomewhere) g amap im overlappingTy |> List.filter MethInfo.IsVirtual) then                                
-                            errorR(Error("The interface "^NicePrint.pretty_string_of_typ denv (List.hd overlap)^" is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface",im)));
-
-        // Get the SlotImplSet for each implemented type
-        // This contains the list of required members and the list of available members
-        [ for (_,reqdTy,im,impliedTys) in reqdTyInfos do
-
-            // Build a table of the implied interface types, for quicker lookup
-            let isImpliedInterfaceTable = 
-                impliedTys 
-                |> List.filter (is_interface_typ g) 
-                |> List.map (fun ty -> tcref_of_stripped_typ g ty, ()) 
-                |> tcref_map_of_list 
-            
-            // Is a member an abstract slot of one of the implied interface types?
-            let isImpliedInterfaceType ty =
-                isImpliedInterfaceTable |> tcref_map_mem (tcref_of_stripped_typ g ty) &&
-                impliedTys |> List.exists (type_feasibly_equiv 0 g amap im ty)
-
-            let isSlotImpl (minfo:MethInfo) = 
-                not minfo.IsAbstract && minfo.IsVirtual 
-
-            // Compute the abstract slots that require implementations
-            let dispatchSlots = 
-                [ if is_interface_typ g reqdTy then 
-                      for impliedTy in impliedTys  do
-                          yield! GetImmediateIntrinsicMethInfosOfType (None,AccessibleFromSomewhere) g amap im impliedTy 
-                  else
-                      
-                      // In the normal case, the requirements for a class are precisely all the abstract slots up the whole hierarchy.
-                      // So here we get and yield all of those.
-                      for minfo in reqdTy |> GetIntrinsicMethInfosOfType infoReader (None,AccessibleFromSomewhere) IgnoreOverrides im do
-                         if minfo.IsDispatchSlot then 
-                             yield minfo ]
-                
-                
-            // Compute the methods that are available to implement abstract slots from the base class
-            //
-            // THis is used in CheckDispatchSlotsAreImplemented when we think a dispatch slot may not
-            // have been implemented. 
-            let availPriorOverridesKeyed : OverrideInfo list = 
-                if is_interface_typ g reqdTy then 
-                    []
-                else 
-                    [ // Get any class hierarchy methods on this type 
-                      //
-                      // NOTE: This is may not 100% correct. What we have below may be an over-approximation that will get too many methods 
-                      // and will not correctly relating them to the slots they implement. For example, 
-                      // we may get an override from a base class and believe it implements a fresh, new abstract
-                      // slot in a subclass. We may have to move to a model where the availPriorOverridesKeyed is computed as a mapping
-                      // rather than as a set of "available overrides".
-                      for minfos in infoReader.GetRawIntrinsicMethodSetsOfType(None,AccessibleFromSomewhere,im,reqdTy) do
-                        for minfo in minfos do
-                          if not minfo.IsAbstract then 
-                              yield GetInheritedMemberOverrideInfo g amap im CanImplementAnyClassHierarchySlot minfo   ]
-                     
-            // We also collect up the properties. This is used for abstract slot inference when overriding properties
-            let isRelevantRequiredProperty (x:PropInfo) = 
-                (x.IsVirtualProperty && not (is_interface_typ g reqdTy)) ||
-                isImpliedInterfaceType x.EnclosingType
-                
-            let reqdProperties = 
-                GetIntrinsicPropInfosOfType infoReader (None,AccessibleFromSomewhere) IgnoreOverrides im reqdTy 
-                |> List.filter isRelevantRequiredProperty
-                
-            let dispatchSlotsKeyed = dispatchSlots |> NameMultiMap.initBy (fun v -> v.LogicalName) 
-            yield SlotImplSet(dispatchSlots, dispatchSlotsKeyed, availPriorOverridesKeyed, reqdProperties) ]
-
-
-    let CheckImplementationRelationAtEndOfInferenceScope (infoReader:InfoReader,denv,tycon:Tycon,isImplementation) =
-
-        let g = infoReader.g
-        let amap = infoReader.amap
-        let m = tycon.Range
-
-        let tcaug = tycon.TypeContents
-        let interfaces = tcaug.tcaug_implements
-        
-        let interfaces = interfaces |> List.map (fun (ity,compgen,m) -> (ity,m))
-
-        let _,overallTy = generalize_tcref (mk_local_tcref tycon)
-
-        let allReqdTys = (overallTy,tycon.Range) :: interfaces 
-
-        // Get all the members that are immediately part of this type
-        // Include the auto-generated members
-        let allImmediateMembers = 
-            (NameMultiMap.range tcaug.tcaug_adhoc @
-             (match tcaug.tcaug_compare with None -> [] | Some(a,b) -> [a;b]) @
-             (match tcaug.tcaug_compare_withc with None -> [] | Some(a) -> [a]) @
-             (match tcaug.tcaug_equals with None -> [] | Some(a,b) -> [a;b]) @
-             (match tcaug.tcaug_hash_and_equals_withc with None -> [] | Some(a,b) -> [a;b])) 
-
-        // Get all the members we have to implement, organized by each type we explicitly implement
-        let slotImplSets = GetSlotImplSets infoReader denv false allReqdTys
-
-        let allImpls = List.zip allReqdTys slotImplSets
-
-
-        // Find the methods relevant to implementing the abstract slots listed under the reqdType being checked.
-        let allImmediateMembersThatMightImplementDispatchSlots = 
-            allImmediateMembers 
-            |> List.filter (fun overrideBy -> overrideBy.IsInstanceMember && not (MemberRefIsAbstract overrideBy))
-
-        let mustOverrideSomething reqdTy (overrideBy:ValRef) =
-           let memberInfo = overrideBy.MemberInfo.Value
-           not (overrideBy.IsFSharpEventProperty(g)) &&
-           memberInfo.MemberFlags.MemberIsOverrideOrExplicitImpl && 
-    
-           match memberInfo.ImplementedSlotSigs with 
-           | [] -> 
-                // Are we looking at the implementation of the class hierarchy? If so include all the override members
-                not (is_interface_typ g reqdTy)
-           | ss -> 
-                 ss |> List.forall (fun ss -> 
-                     let ty = ss.ImplementedType
-                     if is_interface_typ g ty then 
-                         // Is this a method impl listed under the reqdTy?
-                         type_equiv g ty reqdTy
-                     else
-                         not (is_interface_typ g reqdTy) )
-        
-
-        // We check all the abstracts related to the class hierarchy and then check each interface implementation
-        for ((reqdTy,m),slotImplSet) in allImpls do
-            let (SlotImplSet(dispatchSlots, dispatchSlotsKeyed, availPriorOverridesKeyed,_)) = slotImplSet
-            try 
-
-                // Now extract the information about each overriding method relevant to this SLotImplSet
-                let allImmediateMembersThatMightImplementDispatchSlots = 
-                    allImmediateMembersThatMightImplementDispatchSlots
-                    |> List.map (fun overrideBy -> overrideBy,GetTypeMemberOverrideInfo g reqdTy overrideBy)
-                
-                // Now check the implementation
-                // We don't give missing method errors for abstract classes 
-                
-                if isImplementation && not (is_interface_typ g overallTy) then 
-                    let overrides = allImmediateMembersThatMightImplementDispatchSlots |> List.map snd 
-                    let allCorrect = CheckDispatchSlotsAreImplemented (denv,g,amap,m,tcaug.tcaug_abstract,reqdTy,dispatchSlots,availPriorOverridesKeyed,overrides)
-                    
-                    // Tell the user to mark the thing abstract if it was missing implementations
-                    if not allCorrect && not tcaug.tcaug_abstract && not (is_interface_typ g reqdTy) then 
-                        errorR(TypeIsImplicitlyAbstract(m));
-                    
-                    
-                    let overridesToCheck = 
-                        allImmediateMembersThatMightImplementDispatchSlots 
-                           |> List.filter (fst >> mustOverrideSomething reqdTy)
-                           |> List.map snd
-                    CheckOverridesAreAllUsedOnce denv g amap (m,reqdTy,dispatchSlotsKeyed,overridesToCheck);
-
-            with e -> errorRecovery e m; ()
-
-        // Now record the full slotsigs of the abstract members implemented by each override.
-        // This is used to generate IL MethodImpls in the code generator.
-        allImmediateMembersThatMightImplementDispatchSlots |> List.iter (fun overrideBy -> 
-
-            let isFakeEventProperty = overrideBy.IsFSharpEventProperty(g)
-            if not isFakeEventProperty then 
-                
-                let overriden = 
-                    [ for ((reqdTy,m),(SlotImplSet(dispatchSlots,dispatchSlotsKeyed,_,_))) in allImpls do
-                          let overrideByInfo = GetTypeMemberOverrideInfo g reqdTy overrideBy
-                          let overridenForThisSlotImplSet = 
-                              [ for dispatchSlot in NameMultiMap.find overrideByInfo.LogicalName dispatchSlotsKeyed do 
-                                    if is_exact_match g amap m dispatchSlot overrideByInfo then 
-                                        // Get the slotsig of the overriden method 
-                                        let slotsig = SlotSigOfMethodInfo amap m dispatchSlot
-
-                                        // The slotsig from the overriden method is in terms of the type parameters on the parent type of the overriding method,
-                                        // Modify map the slotsig so it is in terms of the type parameters for the overriding method 
-                                        let slotsig = ReparentSlotSigToUseMethodTypars g amap m overrideBy slotsig
-                     
-                                        // Record the slotsig via mutation 
-                                        yield slotsig ] 
-                          //if mustOverrideSomething reqdTy overrideBy then 
-                          //    assert nonNil overridenForThisSlotImplSet
-                          yield! overridenForThisSlotImplSet ]
-                overrideBy.MemberInfo.Value.ImplementedSlotSigs <- overriden);
-
-//-------------------------------------------------------------------------
-// Sets of methods involved in overload resolution and trait constraint
-// satisfaction.
-//------------------------------------------------------------------------- 
-
-/// In the following, 'a gets instantiated to: 
-///   1. the expression being supplied for an argument 
-///   2. "unit", when simply checking for the existence of an overload that satisfies 
-///      a signature, or when finding the corresponding witness. 
-/// Note the parametricity helps ensure that overload resolution doesn't depend on the 
-/// expression on the callside (though it is in some circumstances allowed 
-/// to depend on some type information inferred syntactically from that 
-/// expression, e.g. a lambda expression may be converted to a delegate as 
-/// an adhoc conversion. 
-///
-/// The bool indicates if named using a '?' 
-type CallerArg<'a> = 
-    | CallerArg of Tast.typ * range * bool * 'a  
-    member x.Type = (let (CallerArg(ty,_,_,_)) = x in ty)
-    
-/// CalledArg(pos,isParamArray,optArgInfo,isOutArg,nmOpt,argType)
-type CalledArg = 
-    | CalledArg of (int * int) * bool (* isParamArray *) * OptionalArgInfo * bool (* isOutArg *) * string option * Tast.typ 
-    member x.Type = (let (CalledArg(_,_,_,_,_,ty)) = x in ty)
-    member x.Position = (let (CalledArg(i,_,_,_,_,_)) = x in i)
-
-type AssignedCalledArg<'a> = 
-    | AssignedCalledArg of ident option * CalledArg * CallerArg<'a>
-    member x.CalledArg = (let (AssignedCalledArg(_,calledArg,_)) = x in calledArg)
-    member x.Position = x.CalledArg.Position
-
-type AssignedItemSetterTarget = 
-    | AssignedPropSetter of PropInfo * MethInfo * Tast.tinst   (* the MethInfo is a non-indexer setter property *)
-    | AssignedIlFieldSetter of ILFieldInfo 
-    | AssignedRecdFieldSetter of RecdFieldInfo 
-
-type AssignedItemSetter<'a> = AssignedItemSetter of ident * AssignedItemSetterTarget * CallerArg<'a> 
-
-type CallerNamedArg<'a> = 
-    | CallerNamedArg of ident * CallerArg<'a>  
-    member x.Ident = (let (CallerNamedArg(id,carg)) = x in id)
-    member x.Name = x.Ident.idText
-
-type CalledMethArgSet<'a> = 
-    | CalledMethArgSet of 
-        // The called arguments corresponding to "unnamed" arguments
-        CalledArg list * 
-        // Any unnamed caller arguments not otherwise assigned 
-        CallerArg<'a> list * 
-        // The called "ParamArray" argument, if any
-        CalledArg option * 
-        // Any unnamed caller arguments assigned to a "param array" argument
-        CallerArg<'a> list * 
-        // named args
-        AssignedCalledArg<'a> list 
-    member x.UnnamedCalledArgs      = match x with (CalledMethArgSet(unnamedCalledArgs,_,_,_,_)) -> unnamedCalledArgs 
-    member x.UnnamedCallerArgs      = match x with (CalledMethArgSet(_,unnamedCallerArgs,_,_,_)) -> unnamedCallerArgs 
-    member x.ParamArrayCalledArgOpt = match x with (CalledMethArgSet(_,_,paramArrayCalledArgOpt,_,_)) -> paramArrayCalledArgOpt 
-    member x.ParamArrayCallerArgs   = match x with (CalledMethArgSet(_,_,_,paramArrayCallerArgs,_)) -> paramArrayCallerArgs 
-    member x.AssignedNamedArgs           = match x with (CalledMethArgSet(_,_,_,_,namedArgs)) -> namedArgs
-    member x.NumUnnamedCallerArgs = x.UnnamedCallerArgs.Length
-    member x.NumAssignedNamedArgs = x.AssignedNamedArgs.Length
-    member x.NumUnnamedCalledArgs = x.UnnamedCalledArgs.Length
-
-
-// CLEANUP: make this a record or class
-type CalledMeth<'a> = 
-    | CalledMeth of 
-        // the method we're attempting to call 
-        MethInfo * 
-        // the instantiation of the method we're attempting to call 
-        Tast.tinst * 
-        // the formal instantiation of the method we're attempting to call 
-        Tast.tinst * 
-        // The types of the actual object arguments, if any
-        Tast.typ list * 
-
-        // The argument analysis for each set of curried arguments
-        CalledMethArgSet<'a> list *
-
-        // return type
-        Tast.typ * 
-        // named property setters
-        AssignedItemSetter<'a> list * 
-        // the property related to the method we're attempting to call, if any  
-        PropInfo option * 
-        // unassigned args
-        CallerNamedArg<'a> list * 
-        // args assigned to specifiy values for attribute fields and properties (these are not necessarily "property sets")
-        CallerNamedArg<'a> list  * 
-        // unnamed called optional args: pass defaults for these
-        CalledArg list *
-        // unnamed called out args: return these as part of the return tuple
-        CalledArg list
-
-    member x.Method                 = match x with (CalledMeth(minfo,_,_,_,_,_,_,_,_,_,_,_)) -> minfo
-    static member GetMethod (x:CalledMeth<'a>) = x.Method
-
-    member x.CalledTyArgs           = match x with (CalledMeth(_,minst,_,_,_,_,_,_,_,_,_,_)) -> minst
-    member x.CallerTyArgs           = match x with (CalledMeth(_,_,userTypeArgs,_,_,_,_,_,_,_,_,_)) -> userTypeArgs
-    member x.CallerObjArgTys        = match x with (CalledMeth(_,_,_,callerObjArgTys,_,_,_,_,_,_,_,_)) -> callerObjArgTys
-    member x.ArgSets                = match x with (CalledMeth(_,_,_,_,argSets,_,_,_,_,_,_,_)) -> argSets
-    member x.NumArgSets             = x.ArgSets.Length
-
-    member x.AssignedProps          = match x with (CalledMeth(_,_,_,_,_,_,namedProps,_,_,_,_,_)) -> namedProps
-    member x.AssociatedPropertyInfo = match x with (CalledMeth(_,_,_,_,_,_,_,x,_,_,_,_)) -> x
-    member x.UnassignedNamedArgs    = match x with (CalledMeth(_,_,_,_,_,_,_,_,unassignedNamedItems,_,_,_)) -> unassignedNamedItems
-    member x.AttributeAssignedNamedArgs = match x with (CalledMeth(_,_,_,_,_,_,_,_,_,x,_,_)) -> x
-    member x.HasOptArgs             = match x with (CalledMeth(_,_,_,_,_,_,_,_,_,_,unnamedCalledOptArgs,_)) -> nonNil unnamedCalledOptArgs
-    member x.HasOutArgs             = match x with (CalledMeth(_,_,_,_,_,_,_,_,_,_,_,unnamedCalledOutArgs)) -> nonNil unnamedCalledOutArgs
-    member x.UsesParamArrayConversion = 
-        x.ArgSets |> List.exists (fun argSet -> argSet.ParamArrayCalledArgOpt.IsSome)
-    member x.ParamArrayCalledArgOpt = 
-        x.ArgSets |> List.tryPick (fun argSet -> argSet.ParamArrayCalledArgOpt)
-    member x.ParamArrayCallerArgs = 
-        x.ArgSets |> List.tryPick (fun argSet -> if isSome argSet.ParamArrayCalledArgOpt then Some argSet.ParamArrayCallerArgs else None )
-    member x.ParamArrayElementType(g) = 
-        assert (x.UsesParamArrayConversion)
-        x.ParamArrayCalledArgOpt.Value.Type |> dest_il_arr1_typ g 
-    member x.NumAssignedProps = x.AssignedProps.Length
-    member x.CalledObjArgTys(amap,m) = ObjTypesOfMethInfo amap m x.Method x.CalledTyArgs
-    member x.NumCalledTyArgs = x.CalledTyArgs.Length
-    member x.NumCallerTyArgs = x.CallerTyArgs.Length 
-
-    member x.AssignsAllNamedArgs = isNil x.UnassignedNamedArgs
-
-    member x.HasCorrectArity =
-      (x.NumCalledTyArgs = x.NumCallerTyArgs)  &&
-      x.ArgSets |> List.forall (fun argSet -> argSet.NumUnnamedCalledArgs = argSet.NumUnnamedCallerArgs) 
-
-    member x.HasCorrectGenericArity =
-      (x.NumCalledTyArgs = x.NumCallerTyArgs)  
-
-    member x.IsAccessible(amap,m,ad) = 
-        IsMethInfoAccessible amap m ad x.Method 
-
-    member x.HasCorrectObjArgs(amap,m,ad) = 
-        x.CalledObjArgTys(amap,m).Length = x.CallerObjArgTys.Length 
-
-    member x.IsCandidate(g,amap,m,ad) =
-        x.IsAccessible(amap,m,ad) &&
-        x.HasCorrectArity && 
-        x.HasCorrectObjArgs(amap,m,ad) &&
-        x.AssignsAllNamedArgs
-    member x.AllUnnamedCalledArgs = x.ArgSets |> List.collect (fun x -> x.UnnamedCalledArgs)
-    member x.TotalNumUnnamedCalledArgs = x.ArgSets |> List.sumBy (fun x -> x.NumUnnamedCalledArgs)
-    member x.TotalNumUnnamedCallerArgs = x.ArgSets |> List.sumBy (fun x -> x.NumUnnamedCallerArgs)
-    member x.TotalNumAssignedNamedArgs = x.ArgSets |> List.sumBy (fun x -> x.NumAssignedNamedArgs)
-
-let MakeCalledArgs amap m minfo minst =
-    // Mark up the arguments with their position, so we can sort them back into order later 
-    let paramDatas = ParamDatasOfMethInfo amap m minfo minst
-    paramDatas |> List.mapiSquared (fun i j (ParamData(isParamArrayArg,isOutArg,optArgInfo,nmOpt,typeOfCalledArg))  -> 
-        let isOptArg = optArgInfo <> NotOptional
-        CalledArg((i,j),isParamArrayArg,optArgInfo,isOutArg,nmOpt,typeOfCalledArg))  
-
-let MakeCalledMeth 
-      (infoReader:InfoReader,
-       checkingAttributeCall, 
-       freshenMethInfo,// a function to help generate fresh type variables the property setters methods in generic classes 
-       m, 
-       ad,                // the access domain of the place where the call is taking place
-       minfo,             // the method we're attempting to call 
-       minst,             // the instantiation of the method we're attempting to call 
-       uminst,            // the formal instantiation of the method we're attempting to call 
-       pinfoOpt,          // the property related to the method we're attempting to call, if any  
-       objArgs,           // the types of the actual object argument, if any 
-       callerArgs: (CallerArg<_> list * CallerNamedArg<_> list) list,     // the data about any arguments supplied by the caller 
-       allowParamArgs:bool)   // do we allow the use of a param args method in its "expanded" form?
-    =
-    let g = infoReader.g
-    let amap = infoReader.amap
-    let methodRetTy = FSharpReturnTyOfMeth amap m minfo minst
-
-    if verbose then dprintf "--> methodRetTy = %s\n" (Layout.showL (typeL methodRetTy));
-    if verbose then dprintf "--> minfo.Type = %s\n" (Layout.showL (typeL minfo.EnclosingType));
-
-    let fullCalledArgs = MakeCalledArgs amap m minfo minst
-    assert (callerArgs.Length = fullCalledArgs.Length)
- 
-    let argSetInfos = 
-        (callerArgs, fullCalledArgs) ||> List.map2 (fun (unnamedCallerArgs,namedCallerArgs) fullCalledArgs -> 
-            // Find the arguments not given by name 
-            let unnamedCalledArgs = 
-                fullCalledArgs |> List.filter (function 
-                    | (CalledArg(_,_,_,_,Some nm,_)) -> 
-                        namedCallerArgs |> List.forall (fun (CallerNamedArg(nm2,e)) -> nm <> nm2.idText)   
-                    | _ -> true)
-
-            // See if any of them are 'out' arguments being returned as part of a return tuple 
-            let unnamedCalledArgs, unnamedCalledOptArgs, unnamedCalledOutArgs = 
-                let nUnnamedCallerArgs = unnamedCallerArgs.Length
-                if nUnnamedCallerArgs < unnamedCalledArgs.Length then
-                    let unnamedCalledArgsTrimmed,unnamedCalledOptOrOutArgs = List.chop nUnnamedCallerArgs unnamedCalledArgs
-                    
-                    // Check if all optional/out arguments are byref-out args
-                    if unnamedCalledOptOrOutArgs |> List.forall (fun (CalledArg(i,_,_,isOutArg,_,typeOfCalledArg)) -> isOutArg && is_byref_typ g typeOfCalledArg) then 
-                        let unnamedCalledOutArgs = unnamedCalledOptOrOutArgs |> List.map (fun (CalledArg(i,isParamArrayArg,optArgInfo,isOutArg,nmOpt,typeOfCalledArg)) -> (CalledArg(i,isParamArrayArg,optArgInfo,isOutArg,nmOpt,typeOfCalledArg)))
-                        unnamedCalledArgsTrimmed,[],unnamedCalledOutArgs
-                    // Check if all optional/out arguments are optional args
-                    elif unnamedCalledOptOrOutArgs |> List.forall (fun (CalledArg(i,_,optArgInfo,isOutArg,_,typeOfCalledArg)) -> optArgInfo <> NotOptional) then 
-                        let unnamedCalledOptArgs = unnamedCalledOptOrOutArgs
-                        unnamedCalledArgsTrimmed,unnamedCalledOptArgs,[]
-                    // Otherwise drop them on the floor
-                    else
-                        unnamedCalledArgs,[],[]
-                else 
-                    unnamedCalledArgs,[],[]
-
-            let (unnamedCallerArgs,paramArrayCallerArgs),unnamedCalledArgs,paramArrayCalledArgOpt = 
-                let minArgs = unnamedCalledArgs.Length - 1
-                let supportsParamArgs = 
-                    allowParamArgs && 
-                    minArgs >= 0 && 
-                    unnamedCalledArgs |> List.last |> (fun (CalledArg(_,isParamArray,_,_,_,ty)) -> isParamArray && is_il_arr1_typ g ty)
-
-                if supportsParamArgs  && unnamedCallerArgs.Length >= minArgs then
-                    let a,b = List.frontAndBack unnamedCalledArgs
-                    List.chop minArgs unnamedCallerArgs, a, Some(b)
-                else
-                    (unnamedCallerArgs, []),unnamedCalledArgs, None
-            //dprintfn "Calling %s: paramArrayCallerArgs = %d, paramArrayCalledArgOpt = %d" minfo.LogicalName paramArrayCallerArgs.Length (Option.length paramArrayCalledArgOpt)
-
-            let assignedNamedArgs = fullCalledArgs |> List.choose (function CalledArg(_,_,_,_,Some nm,_) as arg -> List.tryPick (fun (CallerNamedArg(nm2,arg2)) -> if nm = nm2.idText then Some (AssignedCalledArg(Some(nm2),arg,arg2)) else None)  namedCallerArgs | _ -> None)
-            let unassignedNamedItem = namedCallerArgs |> List.filter (fun (CallerNamedArg(nm,e)) -> List.forall (function CalledArg(_,_,_,_,Some nm2,_) -> nm.idText <> nm2 | _ -> true) fullCalledArgs)
-
-            let attributeAssignedNamedItems,unassignedNamedItem = 
-                if checkingAttributeCall then 
-                    // the assignment of names to properties is substantially for attribute specifications 
-                    // permits bindings of names to non-mutable fields and properties, so we do that using the old 
-                    // reliable code for this later on. 
-                    unassignedNamedItem,[]
-                 else 
-                    [],unassignedNamedItem
-
-            let assignedNamedProps,unassignedNamedItem = 
-                let returnedObjTy = if minfo.IsConstructor then minfo.EnclosingType else methodRetTy
-                unassignedNamedItem |> List.splitChoose (fun (CallerNamedArg(id,e) as arg) -> 
-                    let nm = id.idText
-                    let pinfos = GetIntrinsicPropInfoSetsOfType infoReader (Some(nm),ad) IgnoreOverrides id.idRange returnedObjTy
-                    let pinfos = pinfos |> ExcludeHiddenOfPropInfos g amap m 
-                    match pinfos with 
-                    | [pinfo] when pinfo.HasSetter && not pinfo.IsIndexer -> 
-                        let pminfo = pinfo.SetterMethod
-                        let pminst = freshenMethInfo m pminfo
-                        Choice1Of2(AssignedItemSetter(id,AssignedPropSetter(pinfo,pminfo, pminst), e))
-                    | _ ->
-                        match infoReader.GetILFieldInfosOfType(Some(nm),ad,m,returnedObjTy) with
-                        | finfo :: _ -> 
-                            Choice1Of2(AssignedItemSetter(id,AssignedIlFieldSetter(finfo), e))
-                        | _ ->              
-                          match infoReader.TryFindRecdFieldInfoOfType(nm,m,returnedObjTy) with
-                          | Some rfinfo -> 
-                              Choice1Of2(AssignedItemSetter(id,AssignedRecdFieldSetter(rfinfo), e))
-                          | None -> 
-                              Choice2Of2(arg))
-
-            let names = namedCallerArgs |> List.map (function CallerNamedArg(nm,_) -> nm.idText) 
-
-            if (List.noRepeats String.order names).Length <> namedCallerArgs.Length then
-                errorR(Error("a named argument has been assigned more than one value",m));
-                
-            if verbose then dprintf "#fullCalledArgs = %d, #unnamedCalledArgs = %d, #assignedNamedArgs = %d, #residueNamedArgs = %d, #attributeAssignedNamedItems = %d\n"
-                                        fullCalledArgs.Length unnamedCalledArgs.Length assignedNamedArgs.Length unassignedNamedItem.Length attributeAssignedNamedItems.Length;
-            let argSet = CalledMethArgSet(unnamedCalledArgs,unnamedCallerArgs,paramArrayCalledArgOpt,paramArrayCallerArgs,assignedNamedArgs)
-            (argSet,assignedNamedProps,unassignedNamedItem,attributeAssignedNamedItems,unnamedCalledOptArgs,unnamedCalledOutArgs))
-
-    let argSets                     = argSetInfos |> List.map     (fun (x,_,_,_,_,_) -> x)
-    let assignedNamedProps          = argSetInfos |> List.collect (fun (_,x,_,_,_,_) -> x)
-    let unassignedNamedItems        = argSetInfos |> List.collect (fun (_,_,x,_,_,_) -> x)
-    let attributeAssignedNamedItems = argSetInfos |> List.collect (fun (_,_,_,x,_,_) -> x)
-    let unnamedCalledOptArgs        = argSetInfos |> List.collect (fun (_,_,_,_,x,_) -> x)
-    let unnamedCalledOutArgs        = argSetInfos |> List.collect (fun (_,_,_,_,_,x) -> x)
-    CalledMeth(minfo,minst,uminst,objArgs,argSets,methodRetTy,assignedNamedProps,pinfoOpt,unassignedNamedItems,attributeAssignedNamedItems,unnamedCalledOptArgs,unnamedCalledOutArgs)
-    
-let NamesOfCalledArgs calledArgs = 
-    calledArgs |> List.choose (fun (CalledArg(_,_,_,_,nmOpt,_)) -> nmOpt) 
-
-
-let showAccessDomain ad =
-    match ad with 
-    | AccessibleFromEverywhere -> "public" 
-    | AccessibleFrom(_,_) -> "accessible"
-    | AccessibleFromSomeFSharpCode -> "public, protected or internal" 
-    | AccessibleFromSomewhere -> ""
-
-
-
-
-/// "Type Completion" inference and a few other checks at the end of the
-/// inference scope
-let FinalTypeDefinitionChecksAtEndOfInferenceScope (infoReader:InfoReader) isImplementation denv (tycon:Tycon) =
-
-    let g = infoReader.g
-    let amap = infoReader.amap
-    let m = tycon.Range
-
-    let tcaug = tycon.TypeContents
-    tcaug.tcaug_closed <- true
-  
-    // Note you only have to explicitly implement 'System.IComparable' to customize structural comparison AND equality on F# types 
-    if isImplementation &&
-       isNone tcaug.tcaug_compare &&
-        tcaug_has_interface g tcaug g.mk_IComparable_ty && 
-        not (tcaug_has_override g tcaug "Equals" [g.obj_ty]) && 
-        not tycon.IsFSharpInterfaceTycon
-     then
-        (* Warn when we're doing this for class types *)
-        if Augment.TyconIsAugmentedWithEquals g tycon then
-            warning(Error("The type '"^tycon.DisplayName^"' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals'",tycon.Range))
-        else
-            warning(Error("The type '"^tycon.DisplayName^"' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly",tycon.Range))
-
-    // Check some conditions about generic comparison and hashing. We can only check this condition after we've done the augmentation 
-    if isImplementation then
-        Augment.CheckAugmentationAttribs g tycon;
-
-        let tcaug = tycon.TypeContents
-        let m = tycon.Range
-        let hasExplicitObjectGetHashCode = tcaug_has_override g tcaug "GetHashCode" []
-        let hasExplicitObjectEqualsOverride = tcaug_has_override g tcaug "Equals" [g.obj_ty]
-
-        if (isSome tcaug.tcaug_hash_and_equals_withc || isSome tcaug.tcaug_compare || isSome tcaug.tcaug_compare_withc) && 
-           (hasExplicitObjectGetHashCode || hasExplicitObjectEqualsOverride) then 
-            errorR(Error("The struct, record or union type '"^tycon.DisplayName^"' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the '[]' attribute to the type",m)); 
-
-        if not hasExplicitObjectEqualsOverride && hasExplicitObjectGetHashCode then 
-            warning(Error("The struct, record or union type '"^tycon.DisplayName^"' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)'",m)); 
-
-        if hasExplicitObjectEqualsOverride && not hasExplicitObjectGetHashCode then 
-            warning(Error("The struct, record or union type '"^tycon.DisplayName^"' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()'",m)); 
-
-
-        // remember these values to ensure we don't generate these methods during codegen 
-        set_tcaug_hasObjectGetHashCode tcaug hasExplicitObjectGetHashCode;
-
-        if not tycon.IsHiddenReprTycon
-           && not tycon.IsTypeAbbrev
-           && not tycon.IsMeasureableReprTycon
-           && not tycon.IsAsmReprTycon
-           && not tycon.IsFSharpInterfaceTycon
-           && not tycon.IsFSharpDelegateTycon then 
-
-            DispatchSlotChecking.CheckImplementationRelationAtEndOfInferenceScope (infoReader,denv,tycon,isImplementation) 
-    
-/// "Single Feasible Type" inference
-/// Look for the unique supertype of ty2 for which ty2 :> ty1 might feasibly hold
-/// REVIEW: eliminate this use of type_feasibly_subsumes_type
-/// We should be able to look for identical head types.
-let FindUniqueFeasibleSupertype g amap m ty1 ty2 =  
-    if not (is_stripped_tyapp_typ g ty2) then None else
-    let tcref,tinst = dest_stripped_tyapp_typ g ty2
-    let supertypes = Option.to_list (SuperTypeOfType g amap m ty2) @ (ImplementsOfType g amap m ty2)
-    supertypes |> List.tryfind (type_feasibly_subsumes_type 0 g amap m ty1 NoCoerce) 
-    
-
-
-/// Get the methods relevant to deterimining if a uniquely-identified-override exists based on the syntactic information 
-/// at the member signature prior to type inference. This is used to pre-assign type information if it does 
-let GetAbstractMethInfosForSynMethodDecl (infoReader:InfoReader,ad,memberName:ident,bindm,typToSearchForAbstractMembers,valSynData) =
-    let g = infoReader.g
-    let amap = infoReader.amap
-    let minfos = 
-        match typToSearchForAbstractMembers with 
-        | _,Some(SlotImplSet(_, dispatchSlotsKeyed,_,_)) -> 
-            NameMultiMap.find  memberName.idText dispatchSlotsKeyed
-        | ty, None -> 
-            GetIntrinsicMethInfosOfType infoReader (Some(memberName.idText),ad) IgnoreOverrides bindm ty
-    let dispatchSlots = minfos |> List.filter (fun minfo -> minfo.IsDispatchSlot)
-    let topValSynArities = SynInfo.AritiesOfArgs valSynData
-    let topValSynArities = if topValSynArities.Length > 0 then topValSynArities.Tail else topValSynArities
-    let dispatchSlotsArityMatch = dispatchSlots |> List.filter (fun minfo -> minfo.NumArgs = topValSynArities) 
-    dispatchSlots,dispatchSlotsArityMatch 
-
-/// Get the proeprties relevant to deterimining if a uniquely-identified-override exists based on the syntactic information 
-/// at the member signature prior to type inference. This is used to pre-assign type information if it does 
-let GetAbstractPropInfosForSynPropertyDecl (infoReader:InfoReader,ad,memberName:ident,bindm,typToSearchForAbstractMembers,k,valSynData) = 
-    let pinfos = 
-        match typToSearchForAbstractMembers with 
-        | _,Some(SlotImplSet(_,_,_,reqdProps)) -> 
-            reqdProps |> List.filter (fun pinfo -> pinfo.PropertyName = memberName.idText) 
-        | ty, None -> 
-            GetIntrinsicPropInfosOfType infoReader (Some(memberName.idText),ad) IgnoreOverrides bindm ty
-        
-    let dispatchSlots = pinfos |> List.filter (fun pinfo -> pinfo.IsVirtualProperty)
-    dispatchSlots
-
-let HaveSameHeadType g ty1 ty2 = 
-    is_stripped_tyapp_typ g ty1 && is_stripped_tyapp_typ g ty2 &&
-    tcref_eq g (tcref_of_stripped_typ g ty1) (tcref_of_stripped_typ g ty2)
-
-let ExistsSameHeadTypeInHierarchy g amap m typeToSearchFrom typeWithToLookFor = 
-     ExistsInEntireHierarchyOfType (HaveSameHeadType g typeWithToLookFor)  g amap m typeToSearchFrom
-  
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/unilex.ml b/tools/FSharp_1.9.6.16/source/fsharp/unilex.ml
deleted file mode 100644
index 41a6a87b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/unilex.ml
+++ /dev/null
@@ -1,39 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-#light
-
-module Microsoft.FSharp.Compiler.UnicodeLexing
-
-//------------------------------------------------------------------
-// Functions for Unicode char-based lexing (new code).
-//
-
-open Internal.Utilities
-open System.IO 
-
-open Internal.Utilities.Text.Lexing
-
-type Lexbuf =  LexBuffer
-
-let StringAsLexbuf (s:string) : Lexbuf =
-    LexBuffer.FromChars [| for c in s -> c |] 
-  
-let FunctionAsLexbuf (bufferFiller: char[] * int * int -> int) : Lexbuf =
-    LexBuffer.FromFunction bufferFiller 
-    
-     
-/// Standard utility to create a Unicode LexBuffer
-///
-/// One small annoyance is that LexBuffers and not IDisposable. This means 
-/// we can't just return the LexBuffer object, since the file it wraps wouldn't
-/// get closed when we're finished with the LexBuffer. Hence we return the stream,
-/// the reader and the LexBuffer. The caller should dispose the first two when done.
-let UnicodeFileAsLexbuf (filename,codePage : int option) : FileStream * StreamReader * Lexbuf =
-    // Use the .NET functionality to auto-detect the unicode encoding
-    let stream  = Internal.Utilities.FileSystem.File.SafeNewFileStream(filename,FileMode.Open,FileAccess.Read,FileShare.Read) 
-    let reader = 
-        match codePage with 
-        | None -> new  StreamReader(stream,true)
-        | Some n -> new  StreamReader(stream,System.Text.Encoding.GetEncoding(n)) 
-    let lexbuf = LexBuffer.FromCharFunction(fun buf n -> reader.Read(buf,0,n))  
-    stream, reader, lexbuf
-
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/unilex.mli b/tools/FSharp_1.9.6.16/source/fsharp/unilex.mli
deleted file mode 100644
index 97192a57..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/unilex.mli
+++ /dev/null
@@ -1,12 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-#light
-
-module  Microsoft.FSharp.Compiler.UnicodeLexing
-
-open Microsoft.FSharp.Text
-open Internal.Utilities.Text.Lexing
-
-type Lexbuf = LexBuffer
-val internal StringAsLexbuf : string -> Lexbuf
-val public FunctionAsLexbuf : (char [] * int * int -> int) -> Lexbuf
-val public UnicodeFileAsLexbuf :string * int option -> System.IO.FileStream * System.IO.StreamReader * Lexbuf
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/unsolved.ml b/tools/FSharp_1.9.6.16/source/fsharp/unsolved.ml
deleted file mode 100644
index 1bf87f3e..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/unsolved.ml
+++ /dev/null
@@ -1,247 +0,0 @@
-(*-------------------------------------------------------------------------
- * Apply default values to unresolved type variables throughout an expression
- *------------------------------------------------------------------------- *)
-
-#light
-
-module internal Microsoft.FSharp.Compiler.FindUnsolved
-
-open Internal.Utilities
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-open Microsoft.FSharp.Compiler
-
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Env
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.Layout
-open Microsoft.FSharp.Compiler.AbstractIL.IL
-open Microsoft.FSharp.Compiler.Typrelns
-open Microsoft.FSharp.Compiler.Infos
-
-type env = Nix
-
-type cenv = { g: TcGlobals; amap: Import.ImportMap; denv: DisplayEnv; mutable unsolved: typars }
-let mk_cenv  g amap denv =  { g =g ; amap=amap; denv=denv; unsolved = [] }
-
-(*--------------------------------------------------------------------------
-!* eliminate internal uninstantiated type variables
- *--------------------------------------------------------------------------*)
-
-let acc_ty cenv env ty =
-    (free_in_type CollectTyparsNoCaching ty).FreeTypars |> Zset.iter (fun tp -> 
-            if (tp.Rigidity <> TyparRigid) then 
-                cenv.unsolved <- tp :: cenv.unsolved) 
-
-let acc_tinst cenv env tyargs =
-  tyargs |> List.iter (acc_ty cenv env)
-
-(*--------------------------------------------------------------------------
-!* check exprs etc
- *--------------------------------------------------------------------------*)
-  
-let rec acc_expr   (cenv:cenv) (env:env) expr =     
-    let expr = strip_expr expr 
-    match expr with
-    | TExpr_seq (e1,e2,_,_,_) -> 
-        acc_expr cenv env e1; 
-        acc_expr cenv env e2
-    | TExpr_let (bind,body,_,_) ->  
-        acc_bind cenv env bind ; 
-        acc_expr cenv env body
-    | TExpr_const (_,_,ty) -> 
-        acc_ty cenv env ty 
-    
-    | TExpr_val (v,vFlags,m) -> ()
-    | TExpr_quote(ast,_,m,ty) -> 
-          acc_expr cenv env ast;
-          acc_ty cenv env ty;
-    | TExpr_obj (_,typ,basev,basecall,overrides,iimpls,m,_) -> 
-          acc_expr cenv env basecall;
-          acc_methods cenv env basev overrides ;
-          acc_iimpls cenv env basev iimpls;
-    | TExpr_op (c,tyargs,args,m) ->
-          acc_op cenv env (c,tyargs,args,m) 
-    | TExpr_app(f,fty,tyargs,argsl,m) ->
-          acc_ty cenv env fty;
-          acc_tinst cenv env tyargs;
-          acc_expr cenv env f;
-          acc_exprs cenv env argsl
-    (* REVIEW: fold the next two cases together *)
-    | TExpr_lambda(lambda_id,basevopt,argvs,body,m,rty,_) -> 
-        let topValInfo = TopValInfo ([],[argvs |> List.map (fun _ -> TopValInfo.unnamedTopArg1)],TopValInfo.unnamedRetVal) in 
-        let ty = mk_multi_lambda_ty m argvs rty in 
-        acc_lambdas cenv env topValInfo expr ty
-    | TExpr_tlambda(lambda_id,tps,body,m,rty,_)  -> 
-        let topValInfo = TopValInfo (TopValInfo.InferTyparInfo tps,[],TopValInfo.unnamedRetVal) in
-        acc_ty cenv env rty;
-        let ty = try_mk_forall_ty tps rty in 
-        acc_lambdas cenv env topValInfo expr ty
-    | TExpr_tchoose(tps,e1,m)  -> 
-        acc_expr cenv env e1 
-    | TExpr_match(_,exprm,dtree,targets,m,ty,_) -> 
-        acc_ty cenv env ty;
-        acc_dtree cenv env dtree;
-        acc_targets cenv env m ty targets;
-    | TExpr_letrec (binds,e,m,_) ->  
-        acc_binds cenv env binds;
-        acc_expr cenv env e
-    | TExpr_static_optimization (constraints,e2,e3,m) -> 
-        acc_expr cenv env e2;
-        acc_expr cenv env e3;
-        constraints |> List.iter (fun (TTyconEqualsTycon(ty1,ty2)) -> 
-            acc_ty cenv env ty1;
-            acc_ty cenv env ty2)
-    | TExpr_link eref -> failwith "Unexpected reclink"
-
-and acc_methods cenv env basevopt l = List.iter (acc_method cenv env basevopt) l
-and acc_method cenv env basevopt (TObjExprMethod(slotsig,tps,vs,e,m)) = 
-    vs |> List.iterSquared (acc_val cenv env);
-    acc_expr cenv env e
-
-and acc_iimpls cenv env basevopt l = List.iter (acc_iimpl cenv env basevopt) l
-and acc_iimpl cenv env basevopt (ty,overrides) = acc_methods cenv env basevopt overrides 
-
-and acc_op cenv env (op,tyargs,args,m) =
-    (* Special cases *)
-    acc_tinst cenv env tyargs;
-    acc_exprs cenv env args;
-    match op with 
-    (* Handle these as special cases since mutables are allowed inside their bodies *)
-    | TOp_ilcall ((virt,protect,valu,newobj,superInit,prop,isDllImport,boxthis,mref),enclTypeArgs,methTypeArgs,tys) ->
-        acc_tinst cenv env enclTypeArgs;
-        acc_tinst cenv env methTypeArgs;
-        acc_tinst cenv env tys
-    | TOp_trait_call(TTrait(tys,nm,_,argtys,rty,sln)) -> 
-        argtys |> acc_tinst cenv env ;
-        rty |> Option.iter (acc_ty cenv env)
-        tys |> List.iter (acc_ty cenv env)
-        
-    | TOp_asm (_,tys) ->
-        acc_tinst cenv env tys
-    | _ ->    ()
-
-and acc_lambdas cenv env topValInfo e ety =
-    match e with
-    | TExpr_tchoose(tps,e1,m)  -> acc_lambdas cenv env topValInfo e1 ety      
-    | TExpr_lambda (lambda_id,_,_,_,m,_,_)  
-    | TExpr_tlambda(lambda_id,_,_,m,_,_) ->
-        let tps,basevopt,vsl,body,bodyty = dest_top_lambda_upto cenv.g cenv.amap topValInfo (e, ety) in
-        acc_ty cenv env bodyty;
-        vsl |> List.iterSquared (acc_val cenv env);
-        basevopt |> Option.iter (acc_val cenv env);
-        acc_expr cenv env body;
-    | _ -> 
-        acc_expr cenv env e
-
-and acc_exprs            cenv env exprs = exprs |> List.iter (acc_expr cenv env) 
-and acc_FlatExprs        cenv env exprs = exprs |> FlatList.iter (acc_expr cenv env) 
-and acc_targets cenv env m ty targets = Array.iter (acc_target cenv env m ty) targets
-
-and acc_target cenv env m ty (TTarget(vs,e,_)) = acc_expr cenv env e;
-
-and acc_dtree cenv env x =
-    match x with 
-    | TDSuccess (es,n) -> acc_FlatExprs cenv env es;
-    | TDBind(bind,rest) -> acc_bind cenv env bind; acc_dtree cenv env rest 
-    | TDSwitch (e,cases,dflt,m) -> acc_switch cenv env (e,cases,dflt,m)
-
-and acc_switch cenv env (e,cases,dflt,m) =
-    acc_expr cenv env e;
-    List.iter (fun (TCase(discrim,e)) -> acc_discrim cenv env discrim; acc_dtree cenv env e) cases;
-    Option.iter (acc_dtree cenv env) dflt
-
-and acc_discrim cenv env d =
-    match d with 
-    | TTest_unionconstr(ucref,tinst) -> acc_tinst cenv env tinst 
-    | TTest_array_length(_,ty) -> acc_ty cenv env ty
-    | TTest_const _
-    | TTest_isnull -> ()
-    | TTest_isinst (srcty,tgty) -> acc_ty cenv env srcty; acc_ty cenv env tgty
-    | TTest_query (exp, tys, vref, idx, apinfo) -> 
-        acc_expr cenv env exp;
-        acc_tinst cenv env tys
-
-and acc_attrib cenv env (Attrib(_,k,args,props,m)) = 
-    args |> List.iter (fun (AttribExpr(e1,_)) -> acc_expr cenv env e1);
-    props |> List.iter (fun (AttribNamedArg(nm,ty,flg,AttribExpr(expr,_))) -> acc_expr cenv env expr)
-  
-and acc_attribs cenv env attribs = List.iter (acc_attrib cenv env) attribs
-
-and acc_topValInfo cenv env (TopValInfo(_,args,ret)) =
-    args |> List.iterSquared (acc_topArgInfo cenv env);
-    ret |> acc_topArgInfo cenv env;
-
-and acc_topArgInfo cenv env (TopArgInfo(attribs,_)) = 
-    acc_attribs cenv env attribs
-
-and acc_val cenv env v =
-    v.Attribs |> acc_attribs cenv env;
-    v.TopValInfo |> Option.iter (acc_topValInfo cenv env);
-    v.Type |> acc_ty cenv env 
-
-and acc_bind cenv env (TBind(v,e,_) as bind) =
-    acc_val cenv env v;    
-    let topValInfo  = match chosen_arity_of_bind bind with Some info -> info | _ -> TopValInfo.emptyValData in
-    acc_lambdas cenv env topValInfo e v.Type;
-
-and acc_binds cenv env xs = xs |> FlatList.iter (acc_bind cenv env) 
-
-let modul_rights cpath = Infos.AccessibleFrom ([cpath],None) // review:
-
-(*--------------------------------------------------------------------------
-!* check tycons
- *--------------------------------------------------------------------------*)
-  
-let acc_tycon_rfield cenv env tycon (rfield:RecdField) = 
-    acc_attribs cenv env rfield.PropertyAttribs;
-    acc_attribs cenv env rfield.FieldAttribs
-
-let acc_tycon cenv env (tycon:Tycon) =
-    acc_attribs cenv env tycon.Attribs;
-    tycon.AllFieldsArray |> Array.iter (acc_tycon_rfield cenv env tycon);
-    if tycon.IsUnionTycon then                             (* This covers finite unions. *)
-      tycon.UnionCasesAsList |> List.iter (fun uc ->
-          acc_attribs cenv env uc.Attribs;
-          uc.RecdFields |> List.iter (acc_tycon_rfield cenv env tycon))
-  
-
-let acc_tycons cenv env tycons = List.iter (acc_tycon cenv env) tycons
-
-(*--------------------------------------------------------------------------
-!* check modules
- *--------------------------------------------------------------------------*)
-
-let rec acc_mexpr cenv env x = 
-    match x with  
-    | TMTyped(mty,def,m) -> acc_mdef cenv env def
-    
-and acc_mdefs cenv env x = List.iter (acc_mdef cenv env) x
-
-and acc_mdef cenv env x = 
-    match x with 
-    | TMDefRec(tycons,binds,mbinds,m) -> 
-        acc_tycons cenv env tycons; 
-        acc_binds cenv env binds;
-        acc_mbinds cenv env mbinds 
-    | TMDefLet(bind,m)  -> acc_bind cenv env bind 
-    | TMDefDo(e,m)  -> acc_expr cenv env e
-    | TMAbstract(def)  -> acc_mexpr cenv env def
-    | TMDefs(defs) -> acc_mdefs cenv env defs 
-and acc_mbinds cenv env xs = List.iter (acc_mbind cenv env) xs
-and acc_mbind cenv env (TMBind(mspec, rhs)) = acc_tycon cenv env mspec; acc_mdef cenv env rhs 
-
-let unsolved_typars_of_mdef g amap denv (mdef,extraAttribs) =
-   let cenv = mk_cenv  g amap denv in 
-   acc_mdef cenv Nix mdef;
-   acc_attribs cenv Nix extraAttribs;
-   List.rev cenv.unsolved
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/vs/IncrementalBuild.fs b/tools/FSharp_1.9.6.16/source/fsharp/vs/IncrementalBuild.fs
deleted file mode 100644
index 71e2d728..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/vs/IncrementalBuild.fs
+++ /dev/null
@@ -1,1501 +0,0 @@
-#light
-
-namespace Microsoft.FSharp.Compiler
-#nowarn "57"
-open Internal.Utilities.Debug
-open System
-open System.IO
-open System.Reflection             
-open System.Diagnostics
-open System.Collections.Generic
-open System
-
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library 
-module Il = Microsoft.FSharp.Compiler.AbstractIL.IL 
-
-module IncrementalBuild =
-    
-    /// A particular node in the Expr language. Use an int for keys instead of the entire Expr to avoid extra hashing.
-    type Id = 
-        | Id of int
-        static member toInt = function Id(id)->id
-        override id.ToString() = match id with Id(n)->sprintf "Id(%d)" n
-            
-    type ScalarExpr = 
-        | ScalarInput of Id * (*name*)string
-        | ScalarDemultiplex of Id * (*name*)string * (*input*) VectorExpr * (*task function*) (obj array -> obj)
-        | ScalarMap of Id * (*name*) string * (*input*) ScalarExpr * (*task function*) (obj->obj)
-        /// Get the Id for the given ScalarExpr.
-        static member GetId = function
-            | ScalarInput(id,_)->id
-            | ScalarDemultiplex(id,_,_,_)->id
-            | ScalarMap(id,_,_,_)->id
-        /// Get the Name for the givenScalarExpr.
-        static member GetName = function
-            | ScalarInput(_,n)->n                
-            | ScalarDemultiplex(_,n,_,_)->n
-            | ScalarMap(_,n,_,_)->n                
-        override ve.ToString() = 
-            match ve with 
-            | ScalarInput(Id(id),name)->sprintf "InputScalar(%d,%s)" id name
-            | ScalarDemultiplex(Id(id),name,_,_)->sprintf "ScalarDemultiplex(%d,%s)" id name
-            | ScalarMap(Id(id),name,_,_)->sprintf "ScalarMap(%d,%s)" id name
-    and VectorExpr = 
-        | VectorInput of Id * (*name*)string * Type
-        | VectorScanLeft of Id * (*name*)string * (*accumulator*)ScalarExpr * (*input vector*)VectorExpr * (*task function*)(obj->obj->Eventually)
-        | VectorMap of Id * (*taskname*)string * (*input*)VectorExpr * (*task function*)(obj->obj) 
-        | VectorStamp of Id * (*taskname*)string * (*input*)VectorExpr * (*task function*)(obj->DateTime)
-        | VectorMultiplex of Id * (*taskname*)string * (*input*)ScalarExpr * (*task function*)(obj->obj array)
-        /// Get the Id for the given VectorExpr.
-        static member GetId = function
-            | VectorInput(id,_,_)->id
-            | VectorScanLeft(id,_,_,_,_)->id
-            | VectorMap(id,_,_,_)->id
-            | VectorStamp(id,_,_,_)->id
-            | VectorMultiplex(id,_,_,_)->id
-        /// Get the Name for the given VectorExpr.
-        static member GetName = function
-            | VectorInput(_,n,_)->n
-            | VectorScanLeft(_,n,_,_,_)->n
-            | VectorMap(_,n,_,_)->n
-            | VectorStamp(_,n,_,_)->n
-            | VectorMultiplex(_,n,_,_)->n
-        override ve.ToString() = 
-            match ve with 
-            | VectorInput(Id(id),name,_)->sprintf "VectorInput(%d,%s)" id name
-            | VectorScanLeft(Id(id),name,_,_,_)->sprintf "VectorScanLeft(%d,%s)" id name
-            | VectorMap(Id(id),name,_,_)->sprintf "VectorMap(%d,%s)" id name
-            | VectorStamp(Id(id),name,_,_)->sprintf "VectorStamp(%d,%s)" id name
-            | VectorMultiplex(Id(id),name,_,_)->sprintf "VectorMultiplex(%d,%s)" id name
-        
-    type Expr =
-        | ScalarExpr of ScalarExpr
-        | VectorExpr of VectorExpr      
-        /// Get the Id for the given Expr.
-        static member GetId = function
-            | ScalarExpr(se)->ScalarExpr.GetId(se)
-            | VectorExpr(ve)->VectorExpr.GetId(ve)      
-        /// Get the Name for the given Expr.
-        static member GetName= function
-            | ScalarExpr(se)->ScalarExpr.GetName(se)
-            | VectorExpr(ve)->VectorExpr.GetName(ve)      
-        override e.ToString() = 
-            match e with 
-            | ScalarExpr(se)->sprintf "ScalarExpr(se)" 
-            | VectorExpr(ve)->sprintf "VectorExpr(ve)"
-
-    // Ids of exprs            
-    let nextid = ref 999 // Number ids starting with 1000 to discern them
-    let NextId() =
-        nextid:=!nextid+1
-        Id(!nextid)                    
-        
-    type IScalar = 
-        abstract GetScalarExpr : unit -> ScalarExpr
-    type IVector =
-        abstract GetVectorExpr : unit-> VectorExpr
-            
-    type Scalar<'T> =  interface 
-        end
-
-    type Vector<'T> = interface 
-        end
-    
-    /// The outputs of a build        
-    type NamedOutput = 
-        | NamedVectorOutput of string * IVector
-        | NamedScalarOutput of string * IScalar
-
-    /// Visit each task and call op with the given accumulator.
-    let ForeachExpr(rules, op, acc)=
-        let rec VisitVector (ve:VectorExpr) acc = 
-            match ve with
-            | VectorInput(_)->op (VectorExpr ve) acc
-            | VectorScanLeft(_,_,a,i,_)->op (VectorExpr ve) (VisitVector i (VisitScalar a acc))
-            | VectorMap(_,_,i,_)
-            | VectorStamp(_,_,i,_)->op (VectorExpr ve) (VisitVector i acc)
-            | VectorMultiplex(_,_,i,_)->op (VectorExpr ve) (VisitScalar i acc)
-        and VisitScalar (se:ScalarExpr) acc = 
-            match se with
-            | ScalarInput(_)->op (ScalarExpr se) acc
-            | ScalarDemultiplex(_,_,i,_)->op (ScalarExpr se) (VisitVector i acc)
-            | ScalarMap(_,_,i,_)->op (ScalarExpr se) (VisitScalar i acc)
-        let rec Visit (expr:Expr) acc =  
-            match expr with
-            | ScalarExpr(se)->VisitScalar se acc
-            | VectorExpr(ve)->VisitVector ve acc
-        List.foldBack Visit (rules |> List.map(snd)) acc            
-    
-    /// Convert from interfaces into discriminated union.
-    let ToBuild (names:NamedOutput list) : (string * Expr) list = 
-
-        // Create the rules.
-        let CreateRules() = names |> List.map(function NamedVectorOutput(n,v) -> n,VectorExpr(v.GetVectorExpr())
-                                                     | NamedScalarOutput(n,s) -> n,ScalarExpr(s.GetScalarExpr()))
-        
-        // Ensure that all names are unique.
-        let EnsureUniqueNames (expr:Expr) (acc:Map) = 
-            let AddUniqueIdToNameMapping(id,name)=
-                match acc.TryFind name with
-                 | Some(priorId)-> 
-                    if id<>priorId then failwith (sprintf "Two build expressions had the same name: %s" name)
-                    else acc
-                 | None-> Map.add name id acc
-            let id = Expr.GetId(expr)
-            let name = Expr.GetName(expr)
-            AddUniqueIdToNameMapping(id,name)
-        
-        // Validate the rule tree
-        let ValidateRules(rules:(string*Expr) list) =
-            ForeachExpr(rules,EnsureUniqueNames,Map.empty) |> ignore
-        
-        // Convert and validate
-        let rules = CreateRules()
-        ValidateRules(rules)
-        rules
-
-    /// These describe the input conditions for a result. If conditions change then the result is invalid.
-    type InputSignature =
-        | SingleMappedVectorInput of InputSignature array
-        | EmptyTimeStampedInput of DateTime
-        | BoundInputScalar // An external input into the build
-        | BoundInputVector // An external input into the build
-        | IndexedValueElement of DateTime
-        | UnevaluatedInput
-        /// Return true if the result is fully evaluated
-        member is.IsEvaluated() = 
-        
-            let rec IsEvaluated(is) =
-                match is with
-                | UnevaluatedInput -> false
-                | SingleMappedVectorInput iss -> iss |> Array.forall IsEvaluated
-                | _ -> true
-            IsEvaluated(is)
-        override is.ToString() = sprintf "%A" is
-            
-    
-    /// A slot for holding a single result.
-    type Result =
-        | NotAvailable
-        | InProgress of (unit -> Eventually) * DateTime 
-        | Available of obj * DateTime * InputSignature
-        /// Get the available result. Throw an exception if not available.
-        static member GetAvailable = function Available(o,_,_)->o  | _->failwith "No available result"
-        /// Get the time stamp if available. Otheriwse MaxValue.        
-        static member Timestamp = function Available(_,ts,_)->ts | InProgress(_,ts) -> ts | _-> DateTime.MaxValue
-        /// Get the time stamp if available. Otheriwse MaxValue.        
-        static member InputSignature = function Available(_,_,signature)->signature | _-> UnevaluatedInput
-        
-        member x.ResultIsInProgress =  match x with | InProgress _ -> true | _ -> false
-        member x.GetInProgressContinuation() =  match x with | InProgress (f,_) -> f() | _ -> failwith "not in progress"
-        member x.TryGetAvailable() =  match x with | InProgress _ | NotAvailable -> None | Available(obj,dt,i) -> Some(obj,dt,i)
-
-        override r.ToString() = 
-            match r with 
-            | NotAvailable -> "NotAvailable"
-            | InProgress _ -> "InProgress"
-            | Available(o,ts,signature) -> sprintf "Available(as of %A)" ts
-            
-    /// An immutable sparse vector of results.                
-    type ResultVector(size,zeroElementTimestamp,map) =
-        let get(slot) = 
-            match Map.tryfind slot map with
-            | Some(result)->result
-            | None->NotAvailable                   
-        let asList = lazy List.map (fun i->i,get(i)) [0..size-1]
-
-        static member OfSize(size) = ResultVector(size,DateTime.MinValue,Map.empty)
-        member rv.Size = size
-        member rv.Get(slot) = get(slot)
-        member rv.Resize(newsize) = 
-            if size<>newsize then 
-                ResultVector(newsize, zeroElementTimestamp, map|>Map.filter(fun s v -> s=size then failwith "ResultVector slot too big"
-            #endif
-            ResultVector(size, zeroElementTimestamp, Map.add slot value map)
-        member rv.MaxTimestamp() =
-//            use t = Trace.Call("IncrementalBuildVerbose", "MaxTimestamp",  fun _->sprintf "vector of size=%d" size)
-            let Maximize (lasttimestamp:DateTime) (_,result) = 
-                let thistimestamp = Result.Timestamp result
-                let m = max lasttimestamp thistimestamp
-//                use t = Trace.Call("IncrementalBuildVerbose", "Maximize",  fun _->sprintf "last=%s this=%s max=%s" (lasttimestamp.ToString()) (thistimestamp.ToString()) (m.ToString()))
-                m
-            List.fold Maximize zeroElementTimestamp (asList.Force())
-        member rv.Signature() =
-            let l = asList.Force()
-            let l = l |> List.map(fun (_,result)->Result.InputSignature result)
-            SingleMappedVectorInput (l|>List.to_array)
-                                  
-        member rv.FoldLeft f s : 'a = List.fold f s (asList.Force())
-        override rv.ToString() = asList.ToString()   // NOTE: Force()ing this inside ToString() leads to StackOverflowException and very undesirable debugging behavior for all of F#
-                
-    /// A result of performing build actions
-    type ResultSet =
-        | ScalarResult of Result
-        | VectorResult of ResultVector
-        override rs.ToString() = 
-            match rs with
-            | ScalarResult(sr)->sprintf "ScalarResult(%s)" (sr.ToString())
-            | VectorResult(rs)->sprintf "VectorResult(%s)" (rs.ToString())
-                            
-    /// Action timing
-    module Time =     
-        let sw = new Stopwatch()
-        let Action<'T> taskname slot func : 'T= 
-            if Trace.ShouldLog("IncrementalBuildWorkUnits") then 
-                let slotMessage = 
-                    if slot= -1 then sprintf "%s" taskname
-                    else sprintf "%s over slot %d" taskname slot
-                // Timings and memory
-                let maxGen = System.GC.MaxGeneration
-                let ptime = System.Diagnostics.Process.GetCurrentProcess()
-                let timePrev = ptime.UserProcessorTime.TotalSeconds
-                let gcPrev = [| for i in 0 .. maxGen -> System.GC.CollectionCount(i) |]
-                let pbPrev = ptime.PrivateMemorySize64 in                
-
-                // Call the function
-                let result = func()
-                
-                // Report.
-                let timeNow = ptime.UserProcessorTime.TotalSeconds
-                let gcNow = [| for i in 0 .. maxGen -> System.GC.CollectionCount(i) |]
-                let pbNow = ptime.PrivateMemorySize64
-                let spanGC = [| for i in 0 .. maxGen -> System.GC.CollectionCount(i) - gcPrev.[i] |]
-                
-                Trace.PrintLine("IncrementalBuildWorkUnits", fun _ ->
-                                                        sprintf "%s TIME: %4.3f MEM: %3d (delta) G0: %3d G1: %2d G2: %2d" 
-                                                            slotMessage
-                                                            (timeNow - timePrev) 
-                                                            (pbNow - pbPrev)
-                                                            spanGC.[min 0 maxGen] 
-                                                            spanGC.[min 1 maxGen] 
-                                                            spanGC.[min 2 maxGen])
-                result
-            else func()            
-        
-    /// Result of a particular action over the bound build tree
-    type ActionResult = 
-        | IndexedResult of Id * int * (*slotcount*) int * Eventually * DateTime 
-        | ScalarValuedResult of Id * obj * DateTime * InputSignature
-        | VectorValuedResult of Id * obj array * DateTime * InputSignature
-        | ResizeResult of Id * (*slotcount*) int
-        override ar.ToString() = 
-            match ar with
-            | IndexedResult(id,slot,slotcount,obj,dt)->sprintf "IndexedResult(%d,%d,%d,obj,%A)" (Id.toInt id) slot slotcount dt
-            | ScalarValuedResult(id,obj,dt,inputsig)->sprintf "ScalarValuedResult(%d,obj,%A,%A)" (Id.toInt id) dt inputsig
-            | VectorValuedResult(id,obj,dt,inputsig)->sprintf "VectorValuedResult(%d,obj array,%A,%A)" (Id.toInt id) dt inputsig
-            | ResizeResult(id,slotcount)->sprintf "ResizeResult(%d,%d)" (Id.toInt id) slotcount
-        
-        
-    /// A pending action over the bound build tree
-    type Action = 
-        | IndexedAction of Id * (*taskname*)string * int * (*slotcount*) int * DateTime * (unit->Eventually)
-        | ScalarAction of Id * (*taskname*)string * DateTime * InputSignature * (unit->obj)
-        | VectorAction of Id * (*taskname*)string * DateTime * InputSignature *  (unit->obj array)
-        | ResizeResultAction of Id * (*slotcount*) int 
-        /// Execute one action and return a corresponding result.
-        static member Execute action = 
-            match action with
-            | IndexedAction(id,taskname,slot,slotcount,timestamp,func) -> IndexedResult(id,slot,slotcount,Time.Action taskname slot func,timestamp)
-            | ScalarAction(id,taskname,timestamp,inputsig,func) -> ScalarValuedResult(id,Time.Action taskname (-1) func,timestamp,inputsig)
-            | VectorAction(id,taskname,timestamp,inputsig,func) -> VectorValuedResult(id,Time.Action taskname (-1) func,timestamp,inputsig)
-            | ResizeResultAction(id,slotcount) -> ResizeResult(id,slotcount)
-     
-    /// String helper functions for when there's no %A
-    type String = 
-        static member OfList2 l =
-            " ["^String.Join(",\n ", List.to_array (l|>List.map (fun (v1,v2)->((box v1).ToString())^";"^((box v2).ToString()))))^" ]"
-            
-    /// A set of build rules and the corresponding, possibly partial, results from building.
-    []
-    type Build(rules:(string * Expr) list, 
-               results:Map) = 
-        member bt.Rules = rules
-        member bt.Results = results
-        override bt.ToString() = 
-            let sb = new System.Text.StringBuilder()
-            results |> Map.iter(fun id result->
-                                    let id = Id.toInt id
-                                    let s = sprintf " {Id=%d,ResultSet=%s}\n" id (result.ToString())
-                                    let _ = sb.Append(s)
-                                    ())
-            sprintf "{Rules=%s\n Results=%s}" (String.OfList2 rules) (sb.ToString())
-   
-    /// Given an expression, find the expected width.
-    let rec GetVectorWidthByExpr(bt:Build,ve:VectorExpr) = 
-        let KnownValue(ve) = 
-            match bt.Results.TryFind(VectorExpr.GetId(ve)) with 
-            | Some(resultSet) ->
-                match resultSet with
-                | VectorResult(rv)->Some(rv.Size)
-                | _ -> failwith "Expected vector to have vector result."
-            | None-> None
-        match ve with
-        | VectorScanLeft(_,_,_,i,_)
-        | VectorMap(_,_,i,_)
-        | VectorStamp(_,_,i,_)->
-            match GetVectorWidthByExpr(bt,i) with
-            | Some(width) as r -> r
-            | None->KnownValue(ve)  
-        | VectorInput(_,_,_) 
-        | VectorMultiplex(_,_,_,_)->KnownValue(ve)  
-        
-    /// Given an expression name, get the corresponding expression.    
-    let GetTopLevelExprByName(bt:Build, seek:string) =
-        bt.Rules |> List.filter(fun(name,_)->name=seek) |> List.map(fun(_,root)->root) |> List.hd
-    
-    /// Get an expression matching the given name.
-    let GetExprByName(bt:Build, seek:string) : Expr = 
-        let MatchName (expr:Expr) (acc:Expr option) : Expr option =
-            let name = Expr.GetName(expr)
-            if name = seek then Some(expr) else acc
-        let matchOption = ForeachExpr(bt.Rules,MatchName,None)
-        Option.get matchOption
-
-    // Given an Id, find the corresponding expression.
-    let GetExprById(bt:Build, seek:Id) : Expr= 
-        let rec VectorExprOfId(ve) =
-            match ve with
-            | VectorInput(id,_,_)->if seek=id then Some(VectorExpr(ve)) else None
-            | VectorScanLeft(id,_,a,i,_)->
-                if seek=id then Some(VectorExpr(ve)) else
-                    let result = ScalarExprOfId(a) 
-                    match result with Some(_) -> result | None->VectorExprOfId(i)
-            | VectorMap(id,_,i,_)->if seek=id then Some(VectorExpr(ve)) else VectorExprOfId(i)
-            | VectorStamp(id,_,i,_)->if seek=id then Some(VectorExpr(ve)) else VectorExprOfId(i)
-            | VectorMultiplex(id,_,i,_)->if seek=id then Some(VectorExpr(ve)) else ScalarExprOfId(i)
-        and ScalarExprOfId(se) =
-            match se with
-            | ScalarInput(id,_)->if seek=id then Some(ScalarExpr(se)) else None
-            | ScalarDemultiplex(id,_,i,_)->if seek=id then Some(ScalarExpr(se)) else VectorExprOfId(i)
-            | ScalarMap(id,_,i,_)->if seek=id then Some(ScalarExpr(se)) else ScalarExprOfId(i)
-        let ExprOfId(expr:Expr) = 
-            match expr with
-            | ScalarExpr(se)->ScalarExprOfId(se)
-            | VectorExpr(ve)->VectorExprOfId(ve)
-        let exprs = bt.Rules |> List.map(fun(_,root)->ExprOfId(root)) |> List.filter(Option.is_some)
-        match exprs with
-        | Some(expr)::_ -> expr
-        | unk -> failwith (sprintf "GetExprById did not find an expression for Id %d" (Id.toInt seek))
-
-    let GetVectorWidthById (bt:Build) seek = 
-        match GetExprById(bt,seek) with 
-        | ScalarExpr(_)->failwith "Attempt to get width of scalar." 
-        | VectorExpr(ve)->Option.get (GetVectorWidthByExpr(bt,ve))
-
-    let GetScalarExprResult(bt:Build, se:ScalarExpr) =
-        match bt.Results.TryFind(ScalarExpr.GetId(se)) with 
-        | Some(resultSet) ->
-            match se,resultSet with
-            | ScalarInput(_),ScalarResult(r)
-            | ScalarMap(_),ScalarResult(r)
-            | ScalarDemultiplex(_),ScalarResult(r)->r
-            | se,result->failwith (sprintf "GetScalarExprResult had no match for %A,%A" se result) 
-        | None->NotAvailable
-
-    let GetVectorExprResultVector(bt:Build, ve:VectorExpr) =
-        match bt.Results.TryFind(VectorExpr.GetId(ve)) with 
-        | Some(resultSet) ->
-            match ve,resultSet with
-            | VectorScanLeft(_),VectorResult(rv)
-            | VectorMap(_),VectorResult(rv)
-            | VectorInput(_),VectorResult(rv)
-            | VectorStamp(_),VectorResult(rv)
-            | VectorMultiplex(_),VectorResult(rv) -> Some(rv)
-            | ve,result->failwith (sprintf "GetVectorExprResultVector had no match for %A,%A" ve result) 
-        | None->None
-
-    let GetVectorExprResult(bt:Build, ve:VectorExpr, slot) =
-        match bt.Results.TryFind(VectorExpr.GetId(ve)) with 
-        | Some(resultSet) ->
-            match ve,resultSet with
-            | VectorScanLeft(_),VectorResult(rv)
-            | VectorMap(_),VectorResult(rv)
-            | VectorInput(_),VectorResult(rv)
-            | VectorStamp(_),VectorResult(rv) -> rv.Get(slot)
-            | VectorMultiplex(_),VectorResult(rv) -> rv.Get(slot)
-            | ve,result->failwith (sprintf "GetVectorExprResult had no match for %A,%A" ve result) 
-        | None->NotAvailable
-
-    /// Get the maximum build stamp for an output.
-    let MaxTimestamp(bt:Build,id,inputstamp) = 
-        match bt.Results.TryFind(id) with
-        | Some(resultset) -> 
-            match resultset with 
-            | ScalarResult(rs) -> Result.Timestamp rs
-            | VectorResult(rv) -> rv.MaxTimestamp()
-        | None -> DateTime.MaxValue
-        
-    let Signature(bt:Build,id) =
-        match bt.Results.TryFind(id) with
-        | Some(resultset) -> 
-            match resultset with 
-            | ScalarResult(rs) -> Result.InputSignature rs
-            | VectorResult(rv) -> rv.Signature()
-        | None -> UnevaluatedInput               
-     
-    /// Get all the results for the given expr.
-    let AllResultsOfExpr extractor (bt:Build) expr = 
-        let GetAvailable (rv:ResultVector) = 
-            let Extract acc (slot:int,result) = (extractor result)::acc
-            List.rev (rv.FoldLeft Extract [])
-        let GetVectorResultById id = 
-            match bt.Results.TryFind(id) with
-            | Some(found) ->
-                match found with
-                | VectorResult(rv)->GetAvailable rv
-                | _ -> failwith "wrong result type"
-            | None -> []
-            
-        GetVectorResultById(VectorExpr.GetId(expr))
-
-
-   
-        
-    let AvailableAllResultsOfExpr bt expr = 
-        let msg = "Expected all results to be available"
-        AllResultsOfExpr (function Available(o,_,_)->o|x->failwith msg) bt expr
-        
-    /// Bind a set of build rules to a set of input values.
-    let ToBound(build:(string*Expr) list, vectorinputs, scalarinputs) = 
-        let now = DateTime.Now
-        let rec ApplyScalarExpr(se,results) =
-            match se with
-            | ScalarInput(id,n) -> 
-                let matches = scalarinputs 
-                                |> List.filter (fun (inputname,_)->inputname=n) 
-                                |> List.map (fun (_,inputvalue:obj)-> ScalarResult(Available(inputvalue,now,BoundInputScalar)))
-                List.foldBack (Map.add id) matches results
-            | ScalarMap(_,_,se,_) ->ApplyScalarExpr(se,results)
-            | ScalarDemultiplex(_,_,ve,_) ->ApplyVectorExpr(ve,results)
-        and ApplyVectorExpr(ve,results) =
-            match ve with
-            | VectorInput(id,n,t) ->
-                let matches = vectorinputs 
-                                |> List.filter (fun (inputname,_,_)->inputname=n) 
-                                |> List.map (fun (_,size,inputvalues:obj list)->
-                                                        let results = inputvalues|>List.mapi(fun i value->i,Available(value,now,BoundInputVector))
-                                                        VectorResult(ResultVector(size,DateTime.MinValue,results|>Map.of_list))
-                                                        )
-                List.foldBack (Map.add id) matches results
-            | VectorScanLeft(_,_,a,i,_)->ApplyVectorExpr(i,ApplyScalarExpr(a,results))
-            | VectorMap(_,_,i,_)
-            | VectorStamp(_,_,i,_)->ApplyVectorExpr(i,results)
-            | VectorMultiplex(_,_,i,_)->ApplyScalarExpr(i,results)
-        let ApplyExpr expr results =
-            match expr with
-            | ScalarExpr(se)->ApplyScalarExpr(se,results)
-            | VectorExpr(ve)->ApplyVectorExpr(ve,results)
-                                                                             
-        // Place vector inputs into results map.
-        let results = List.foldBack ApplyExpr (build|>List.map(snd)) (Map.empty)
-        Build(build,results)
-        
-        
-    /// Visit each executable action and call actionFunc with the given accumulator.
-    let ForeachAction output bt (actionFunc:Action->'acc->'acc) (acc:'acc) =
-        use t = Trace.Call("IncrementalBuildVerbose", "ForeachAction",  fun _->sprintf "name=%s" output)
-        let seen = Dictionary<_,_>()
-        let Seen(id) = 
-            if seen.ContainsKey(id) then true
-            else seen.[id]<-true
-                 false
-                 
-        let HasChanged(inputtimestamp,outputtimestamp) =
-           if inputtimestamp<>outputtimestamp then
-               Trace.PrintLine("IncrementalBuildVerbose", fun _ -> sprintf "Input timestamp is %A. Output timestamp is %A." inputtimestamp outputtimestamp)
-               true
-           else false
-           
-           
-        let ShouldEvaluate(bt,currentsig:InputSignature,id) =
-            let isAvailable = currentsig.IsEvaluated()
-            if isAvailable then 
-                let priorsig = Signature(bt,id)
-                currentsig<>priorsig
-            else false
-            
-        /// Make sure the result vector saved matches the size of expr
-        let ResizeVectorExpr(ve:VectorExpr,acc)  = 
-            let id = VectorExpr.GetId(ve)
-            match GetVectorWidthByExpr(bt,ve) with
-            | Some(expectedWidth) ->
-                match bt.Results.TryFind(id) with
-                | Some(found) ->
-                    match found with
-                    | VectorResult(rv)->
-                        if rv.Size<> expectedWidth then 
-                            actionFunc (ResizeResultAction(id,expectedWidth)) acc
-                        else acc
-                    | _ -> acc
-                | None -> acc        
-            | None -> acc           
-        
-        let rec VisitVector ve acc =
-        
-            if Seen(VectorExpr.GetId(ve)) then acc
-            else
-                Trace.PrintLine("IncrementalBuildVerbose", fun _ -> sprintf "In ForeachAction at vector expression %s" (ve.ToString()))
-                let acc = ResizeVectorExpr(ve,acc)        
-                match ve with
-                | VectorInput(_)->acc
-                | VectorScanLeft(id,taskname,accumulatorExpr,inputExpr,func)->
-                    let acc =
-                        match GetVectorWidthByExpr(bt,ve) with
-                        | Some(cardinality) ->                    
-                            let GetInputAccumulator(slot) =
-                                if slot=0 then GetScalarExprResult(bt,accumulatorExpr) 
-                                else GetVectorExprResult(bt,ve,slot-1)
-                        
-                            let Scan slot =
-                                let accumulatorResult = GetInputAccumulator(slot)
-                                let inputResult = GetVectorExprResult(bt,inputExpr,slot)
-                                match accumulatorResult,inputResult with 
-                                | Available(accumulator,accumulatortimesamp,accumulatorInputSig),Available(input,inputtimestamp,inputSig)->
-                                    let inputtimestamp = max inputtimestamp accumulatortimesamp
-                                    let prevoutput = GetVectorExprResult(bt,ve,slot)
-                                    let outputtimestamp = Result.Timestamp prevoutput
-                                    let scanOp = 
-                                        if HasChanged(inputtimestamp,outputtimestamp) then
-                                            Some (fun () -> func accumulator input)
-                                        elif prevoutput.ResultIsInProgress then
-                                            Some prevoutput.GetInProgressContinuation
-                                        else 
-                                            // up-to-date and complete, no work required
-                                            None
-                                    match scanOp with 
-                                    | Some scanOp -> Some(actionFunc (IndexedAction(id,taskname,slot,cardinality,inputtimestamp,scanOp)) acc)
-                                    | None -> None
-                                | _ -> None                            
-                                
-                            match ([0..cardinality-1]|>List.tryPick Scan) with Some(acc)->acc | None->acc
-                        | None -> acc
-                    
-                    // Check each slot for an action that may be performed.
-                    VisitVector inputExpr (VisitScalar accumulatorExpr acc)
-                | VectorMap(id, taskname, inputExpr, func)->
-                    let acc =
-                        match GetVectorWidthByExpr(bt,ve) with
-                        | Some(cardinality) ->       
-                            if cardinality=0 then
-                                // For vector length zero, just propagate the prior timestamp.
-                                let inputtimestamp = MaxTimestamp(bt,VectorExpr.GetId(inputExpr),DateTime.MinValue)
-                                let outputtimestamp = MaxTimestamp(bt,id,DateTime.MinValue)
-                                if HasChanged(inputtimestamp,outputtimestamp) then
-                                    Trace.PrintLine("IncrementalBuildVerbose", fun _ -> sprintf "Vector Map with cardinality zero setting output timestamp to %A." inputtimestamp)
-                                    actionFunc (VectorAction(id,taskname,inputtimestamp,EmptyTimeStampedInput inputtimestamp, fun _ ->[||])) acc
-                                else acc
-                            else                                                
-                                let MapResults acc slot =
-                                    let inputtimestamp = Result.Timestamp (GetVectorExprResult(bt,inputExpr,slot))
-                                    let outputtimestamp = Result.Timestamp (GetVectorExprResult(bt,ve,slot))
-                                    if HasChanged(inputtimestamp,outputtimestamp) then
-                                        let OneToOneOp() =
-                                            Eventually.Done (func (Result.GetAvailable (GetVectorExprResult(bt,inputExpr,slot))))
-                                        actionFunc (IndexedAction(id,taskname,slot,cardinality,inputtimestamp,OneToOneOp)) acc
-                                    else acc
-                                [0..cardinality-1] |> List.fold MapResults acc                         
-                        | None -> acc
-                    VisitVector inputExpr acc
-                | VectorStamp(id, taskname, inputExpr, func)-> 
-               
-                    // For every result that is available, check time stamps.
-                    let acc =
-                        match GetVectorWidthByExpr(bt,ve) with
-                        | Some(cardinality) ->    
-                            if cardinality=0 then
-                                // For vector length zero, just propagate the prior timestamp.
-                                let inputtimestamp = MaxTimestamp(bt,VectorExpr.GetId(inputExpr),DateTime.MinValue)
-                                let outputtimestamp = MaxTimestamp(bt,id,DateTime.MinValue)
-                                if HasChanged(inputtimestamp,outputtimestamp) then
-                                    Trace.PrintLine("IncrementalBuildVerbose", fun _ -> sprintf "Vector Stamp with cardinality zero setting output timestamp to %A." inputtimestamp)
-                                    actionFunc (VectorAction(id,taskname,inputtimestamp,EmptyTimeStampedInput inputtimestamp,fun _ ->[||])) acc
-                                else acc
-                            else                 
-                                let CheckStamp acc slot = 
-                                    let inputresult = GetVectorExprResult(bt,inputExpr,slot)
-                                    match inputresult with
-                                    | Available(ires,_,inputsig)->
-                                        let oldtimestamp = Result.Timestamp (GetVectorExprResult(bt,ve,slot))
-                                        let newtimestamp = func ires
-                                        if newtimestamp<>oldtimestamp then 
-                                            Trace.PrintLine("IncrementalBuildVerbose", fun _ -> sprintf "Old timestamp was %A. New timestamp is %A." oldtimestamp newtimestamp)
-                                            actionFunc (IndexedAction(id,taskname,slot,cardinality,newtimestamp, fun _ -> Eventually.Done ires)) acc
-                                        else acc
-                                    | _ -> acc
-                                [0..cardinality-1] |> List.fold CheckStamp acc
-                        | None -> acc
-                    VisitVector inputExpr acc
-                | VectorMultiplex(id, taskname, inputExpr, func)-> 
-                    VisitScalar inputExpr
-                        (match GetScalarExprResult(bt,inputExpr) with
-                         | Available(inp,inputtimestamp,inputsig) ->
-                           let outputtimestamp = MaxTimestamp(bt,id,inputtimestamp)
-                           if HasChanged(inputtimestamp,outputtimestamp) then
-                               let MultiplexOp() = func inp
-                               actionFunc (VectorAction(id,taskname,inputtimestamp,inputsig,MultiplexOp)) acc
-                           else acc
-                         | _->acc)                
-        and VisitScalar se acc =
-            if Seen(ScalarExpr.GetId(se)) then acc
-            else
-                Trace.PrintLine("IncrementalBuildVerbose", fun _ -> sprintf "In ForeachAction at scalar expression %s" (se.ToString()))
-                match se with
-                | ScalarInput(_)->acc
-                | ScalarDemultiplex(id,taskname,inputExpr,func)->
-                    VisitVector inputExpr 
-                            (
-                                match GetVectorExprResultVector(bt,inputExpr) with
-                                | Some(inputresult) ->   
-                                    let currentsig = inputresult.Signature()
-                                    if ShouldEvaluate(bt,currentsig,id) then
-                                        let inputtimestamp = MaxTimestamp(bt, VectorExpr.GetId(inputExpr), DateTime.MaxValue) 
-                                        let priorsig = Signature(bt,id)
-                                        let DemultiplexOp() = 
-                                            let input = AvailableAllResultsOfExpr bt inputExpr |> List.to_array
-                                            func input
-                                        actionFunc (ScalarAction(id,taskname,inputtimestamp,currentsig,DemultiplexOp)) acc
-                                    else acc
-                                | None -> acc
-                            )
-                | ScalarMap(id,taskname,inputExpr,func)->
-                    VisitScalar inputExpr
-                        (match GetScalarExprResult(bt,inputExpr) with
-                         | Available(inp,inputtimestamp,inputsig) ->
-                           let outputtimestamp = MaxTimestamp(bt, id, inputtimestamp)
-                           if HasChanged(inputtimestamp,outputtimestamp) then
-                               let MapOp() = func inp
-                               actionFunc (ScalarAction(id,taskname,inputtimestamp,inputsig,MapOp)) acc
-                           else acc
-                         | _->acc)
-                         
-        let Visit expr acc = 
-            match expr with
-            | ScalarExpr(se)->VisitScalar se acc
-            | VectorExpr(ve)->VisitVector ve acc                    
-                    
-        let filtered = bt.Rules |> List.filter (fun (s,e)->s=output) |> List.map(snd)
-        List.foldBack Visit filtered acc
-    
-    /// Given the result of a single action, apply that action to the Build
-    let ApplyResult(actionResult:ActionResult,bt:Build) = 
-        use t = Trace.Call("IncrementalBuildVerbose", "ApplyResult", fun _ -> "")
-        let result = 
-            match actionResult with 
-            | ResizeResult(id,slotcount) ->
-                match bt.Results.TryFind(id) with
-                | Some(resultSet) ->
-                    match resultSet with 
-                    | VectorResult(rv) -> 
-                        let rv = rv.Resize(slotcount)
-                        let results = Map.add id (VectorResult rv) bt.Results
-                        Build(bt.Rules,results)
-                    | _ -> failwith "Unexpected"                
-                | None -> failwith "Unexpected"
-            | ScalarValuedResult(id,value,timestamp,inputsig)->
-                Build(bt.Rules, Map.add id (ScalarResult(Available(value,timestamp,inputsig))) bt.Results)
-            | VectorValuedResult(id,values,timestamp,inputsig)->
-                let Append acc slot = 
-                    Map.add slot (Available(values.[slot],timestamp,inputsig)) acc
-                let results = [0..values.Length-1]|>List.fold Append (Map.empty)
-                let results = VectorResult(ResultVector(values.Length,timestamp,results))
-                let bt = Build(bt.Rules, Map.add id results bt.Results)
-                bt
-                
-            | IndexedResult(id,index,slotcount,value,timestamp)->
-                let width = (GetVectorWidthById bt id)
-                let priorResults = bt.Results.TryFind(id) 
-                let prior =
-                    match priorResults with
-                    | Some(prior)->prior
-                    | None->VectorResult(ResultVector.OfSize width)
-                match prior with
-                | VectorResult(rv)->                                
-                    let result = 
-                        match value with 
-                        | Eventually.Done res -> 
-                            Trace.PrintLine("FSharpBackgroundBuildVerbose", fun _ -> "Eventually.Done...")
-                            Available(res,timestamp, IndexedValueElement timestamp)
-                        | Eventually.NotYetDone f -> 
-                            Trace.PrintLine("FSharpBackgroundBuildVerbose", fun _ -> "Eventually.NotYetDone...")
-                            InProgress (f,timestamp)
-                    let results = rv.Resize(slotcount).Set(index,result)
-                    Build(bt.Rules, Map.add id (VectorResult(results)) bt.Results)
-                | _->failwith "Unexpected"
-        result
-        
-    /// Evaluate the result of a single output
-    let EvalLeafsFirst output bt =
-        use t = Trace.Call("IncrementalBuildVerbose", "EvalLeafsFirst", fun _->sprintf "name=%s" output)
-
-        let ExecuteApply action bt = 
-            let actionResult = Action.Execute(action)
-            ApplyResult(actionResult,bt)
-        let rec Eval(bt,gen) =
-            Trace.PrintLine("FSharpBackgroundBuildVerbose", fun _ -> sprintf "---- Build generation %d ----" gen)
-            #if DEBUG
-            // This can happen, for example, if there is a task whose timestamp never stops increasing.
-            // Possibly could detect this case directly.
-            if gen>5000 then failwith "Infinite loop in incremental builder?"
-            #endif
-            let newBt = ForeachAction output bt ExecuteApply bt
-            if newBt=bt then bt else Eval(newBt,gen+1)
-        Eval(bt,0)
-        
-    let Step output (bt:Build) = 
-        use t = Trace.Call("IncrementalBuildVerbose", "Step", fun _->sprintf "name=%s" output)
-        
-        let BuildActionList() = 
-            use t = Trace.Call("IncrementalBuildVerbose", "BuildActionList", fun _->sprintf "name=%s" output)
-            let Cons action list =  action :: list  
-            // Hey look, we're building up the whole list, executing one thing and then throwing
-            // the list away. What about saving the list inside the Build instance?
-            ForeachAction output bt Cons []
-            
-        let ExecuteOneAction(worklist) = 
-            use t = Trace.Call("IncrementalBuildVerbose", "ExecuteOneAction", fun _->sprintf "name=%s" output)
-            match worklist with 
-            | action::_ ->
-                let actionResult = Action.Execute(action)
-                Some(ApplyResult(actionResult,bt))
-            | _->None
-            
-        ExecuteOneAction(BuildActionList())                
-        
-    /// Eval by calling step over and over until done.
-    let rec EvalStepwise output bt = 
-        use t = Trace.Call("IncrementalBuildVerbose", "EvalStepwise", fun _->sprintf "name=%s" output)
-        let rec Evaluate(output,bt)= 
-            let newBt = Step output bt
-            match newBt with
-            | Some(newBt)-> Evaluate(output,newBt)
-            | None->bt
-        Evaluate(output,bt)
-        
-    // Note: this discards its slot. This causes TypecheckStates to be evaluated for all files
-    // even if we only need one such state. This is especially noticeable on startup of
-    // large solutions, where no intellisense is available until all files have been typechecked
-    let EvalSlot(output,slot,bt) = EvalLeafsFirst output bt
-        
-    let Eval = EvalLeafsFirst
-
-    let GetScalarResult<'T>(name,bt) : ('T*DateTime) option = 
-        use t = Trace.Call("IncrementalBuildVerbose", "GetScalarResult", fun _->sprintf "name=%s" name)
-        match GetTopLevelExprByName(bt,name) with 
-        | ScalarExpr(se)->
-            let id = ScalarExpr.GetId(se)
-            match bt.Results.TryFind(id) with
-            | Some(result) ->
-                match result with 
-                | ScalarResult(sr) ->
-                    match sr.TryGetAvailable() with                     
-                    | Some(r,timestamp,inputsig) -> Some(downcast r, timestamp)
-                    | None -> None
-                | _ ->failwith "Expected a scalar result."
-            | None->None
-        | VectorExpr(ve)->failwith "Expected scalar."
-    
-    let GetVectorResult<'T>(name,bt) : 'T array = 
-        match GetTopLevelExprByName(bt,name) with 
-        | ScalarExpr(se)->failwith "Expected vector."
-        | VectorExpr(ve)->AvailableAllResultsOfExpr bt ve |> List.map(unbox) |> Array.of_list
-        
-    let GetVectorResultBySlot<'T>(name,slot,bt) : ('T*DateTime) option = 
-        match GetTopLevelExprByName(bt,name) with 
-        | ScalarExpr(se)->failwith "Expected vector expression"
-        | VectorExpr(ve)->
-            match GetVectorExprResult(bt,ve,slot).TryGetAvailable() with
-            | Some(o,timestamp,inputsig) -> Some(downcast o,timestamp)
-            | None->None
-
-    /// Given an input value, find the corresponding slot.        
-    let GetSlotByInput<'T>(name:string,input:'T,build:Build,equals:'T->'T->bool) : int = 
-        let expr = GetExprByName(build,name)
-        let id =Expr.GetId(expr)
-        let resultSet = Option.get ( build.Results.TryFind(id))
-        match resultSet with 
-        | VectorResult(rv)->
-            let MatchNames acc (slot,result) = 
-                match result with
-                | Available(o,_,_)->
-                    let o = o :?> 'T
-                    if equals o input then Some(slot) else acc
-                | _ -> acc
-            let slotOption = rv.FoldLeft MatchNames None
-            match slotOption with 
-            | Some(slot) -> slot
-            | _ -> failwith (sprintf "Could not find requested input %A in set %s" input (rv.ToString()))
-        | _ -> failwith (sprintf "Could not find requested input: %A" input)
-
-    
-    // Redeclare functions in the incremental build scope-----------------------------------------------------------------------
-
-    // Methods for declaring inputs and outputs            
-
-    let InputVector name = 
-        let expr = VectorInput(NextId(),name,typeof<'T>) 
-        { new Vector<'T>
-          interface IVector with
-               override pe.GetVectorExpr() = expr }
-
-    let InputScalar name = 
-        let expr = ScalarInput(NextId(),name)
-        { new Scalar<'T>
-          interface IScalar with
-               override pe.GetScalarExpr() = expr }
-    
-    module Scalar =
-    
-        let Map (taskname:string) (task:'I->'O) (input:Scalar<'I>) : Scalar<'O> =
-            let BoxingMap i = box(task(unbox(i)))
-            let input = (input:?>IScalar).GetScalarExpr()
-            let expr = ScalarMap(NextId(),taskname,input,BoxingMap)
-            { new Scalar<'O>
-              interface IScalar with
-                   override pe.GetScalarExpr() = expr}
-                   
-        let Multiplex (taskname:string) (task:'I -> 'O array) (input:Scalar<'I>) : Vector<'O> =      
-            let BoxingMultiplex i = Array.map box (task(unbox(i)))
-            let input = (input:?>IScalar).GetScalarExpr()
-            let expr = VectorMultiplex(NextId(),taskname,input,BoxingMultiplex) 
-            { new Vector<'O>
-              interface IVector with
-                   override pe.GetVectorExpr() = expr}    
-            
-    module Vector =
-        let Map (taskname:string) (task:'I ->'O) (input:Vector<'I>) : Vector<'O> = 
-            let BoxingMapVector i =
-                box(task(unbox i))
-            let input = (input:?>IVector).GetVectorExpr()
-            let expr = VectorMap(NextId(),taskname,input,BoxingMapVector) 
-            { new Vector<'O>
-              interface IVector with
-                   override pe.GetVectorExpr() = expr }            
-            
-        
-        let ScanLeft (taskname:string) (task:'A -> 'I -> Eventually<'A>) (acc:Scalar<'A>) (input:Vector<'I>) : Vector<'A> =
-            let BoxingScanLeft a i =
-                Eventually.box(task (unbox a) (unbox i))
-            let acc = (acc:?>IScalar).GetScalarExpr()
-            let input = (input:?>IVector).GetVectorExpr()
-            let expr = VectorScanLeft(NextId(),taskname,acc,input,BoxingScanLeft) 
-            { new Vector<'A>
-              interface IVector with
-                   override pe.GetVectorExpr() = expr }    
-            
-        let Demultiplex (taskname:string) (task:'I array -> 'O) (input:Vector<'I>) : Scalar<'O> =
-            let BoxingDemultiplex i =
-                box(task (Array.map unbox i) )
-            let input = (input:?>IVector).GetVectorExpr()
-            let expr = ScalarDemultiplex(NextId(),taskname,input,BoxingDemultiplex)
-            { new Scalar<'O>
-              interface IScalar with
-                   override pe.GetScalarExpr() = expr }                
-            
-        let Stamp (taskname:string) (task:'I -> DateTime) (input:Vector<'I>) : Vector<'I> =
-            let BoxingTouch i =
-                task(unbox i)
-            let input = (input:?>IVector).GetVectorExpr()
-            let expr = VectorStamp(NextId(),taskname,input,BoxingTouch) 
-            { new Vector<'I>
-              interface IVector with
-                   override pe.GetVectorExpr() = expr }    
-                  
-        let AsScalar (taskname:string) (input:Vector<'I>) : Scalar<'I array> = 
-            Demultiplex taskname (fun v->v) input
-                   
-    type BuildScope() =
-        let outputs = ref []
-        member b.DeclareScalarOutput(name,output:Scalar<'t>)=
-            let output:IScalar = output:?>IScalar
-            outputs := NamedScalarOutput(name,output) :: !outputs
-        member b.DeclareVectorOutput(name,output:Vector<'t>)=
-            let output:IVector = output:?>IVector
-            outputs := NamedVectorOutput(name,output) :: !outputs
-        member b.GetConcreteBuild(vectorinputs,scalarinputs) =
-            ToBound(ToBuild(!outputs),vectorinputs,scalarinputs)   
-
-
-// ------------------------------------------------------------------------------------------
-// The incremental build definition for parsing and typechecking F#
-// ------------------------------------------------------------------------------------------
-module FsiGeneration =
-
-    open Internal.Utilities
-    open Internal.Utilities.Collections
-
-    open IncrementalBuild
-    open Microsoft.FSharp.Compiler.Build
-    open Microsoft.FSharp.Compiler.Fscopts
-    open Microsoft.FSharp.Compiler.Ast
-    open Microsoft.FSharp.Compiler.ErrorLogger
-    open Microsoft.FSharp.Compiler.Env
-    open Microsoft.FSharp.Compiler.TypeChecker
-    open Microsoft.FSharp.Compiler.Tast 
-    open Microsoft.FSharp.Compiler.Range
-    open Microsoft.FSharp.Compiler
-    open Microsoft.FSharp.Compiler.AbstractIL.Internal
-
-    module Tc = Microsoft.FSharp.Compiler.TypeChecker
-
-    open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics 
-    open Internal.Utilities.Debug
-
-    module Renderer =
-      open Microsoft.FSharp.Compiler.Layout
-
-      type Mapping = Dictionary 
-
-      let posTrackMappingBuildingR (header:string list option) (xySt:(int * int * Mapping)) (rend: ('a, 'b) render) :  ('a * (int * int * Mapping), 'b * (int * int * Mapping)) render =
-        { new render<_,_> with 
-            member r.Start () = 
-                let st = rend.Start ()
-                let (x, y, m) = xySt
-                let (x, y, st) =
-                  match header with
-                  | Some h -> let renderWithBreak st s =
-                                let st = rend.AddText st s
-                                rend.AddBreak st 0
-                              let st = List.fold renderWithBreak st h
-                              (0, y + List.length h, st)
-                  | None   -> (x, y, st)
-                (st, (x, y, m)) ;
-            member r.AddText  ((st, (x, y, m))) text = (rend.AddText st text, (x + text.Length, y, m)) ;
-            member r.AddBreak ((st, (x, y, m))) n = (rend.AddBreak st n, (n, y + 1, m)) ;
-            member r.AddTag   ((st, ((x, y, m) as xySt))) (tag, attrs, start) = 
-                let addToMap k v =
-                  if m.ContainsKey(k) then () // this keeps the first binding that we find for an identifier
-                  else m.Add(k,v)
-                if start && tag = "goto:path" then
-                      addToMap (List.map fst attrs) (x,y) 
-                      (st, (x, y, m))
-                else (rend.AddTag st (tag, attrs, start), xySt) ;
-            member r.Finish ((st, (x, y, m))) = (rend.Finish st, (x, y, m)) } 
-
-      /// given:
-      /// initial state : (x : int * y : int * Map)
-      /// render a GotoDefinition-annotated AST and return a final state (mapping
-      /// fully-qualified names to (x, y) positions in the rendered file                                                                    
-      let showForGotoDefinition os showHeader st =
-        let h =
-          if showHeader
-             then Some [ "// This file was automatically generated by a call to Goto Definition."
-                         "#light"
-                         ""
-                       ]
-             else None
-        posTrackMappingBuildingR h st (channelR os) |> renderL
-    
-    type FsiGenerationResult = (string * Dictionary * string list) option
-
-    /// Compute a probably-safe directory where .fsi's can be generated without
-    /// interfering with user files. We'll create a well-known-named directory
-    /// in the system-reported temp path.
-    let PathForGeneratedVisualStudioFSharpTempFiles =
-        let p = Filename.concat (Path.GetTempPath ()) "MicrosoftVisualStudioFSharpTemporaryFiles"
-        if not (Directory.Exists p)
-           then Directory.CreateDirectory p |> ignore
-        p
-
-    /// For an assembly stored in `\.dll`, generate the .fsi
-    /// into `\.temp.fsi`
-    let GeneratedFsiNameGenerator s =
-        let baseName = PathForGeneratedVisualStudioFSharpTempFiles
-        let extn     = ".temp.fsi"
-        s |> Filename.basename |> Filename.chop_extension |> (fun x -> x + extn) |> Filename.concat baseName
-      
-    /// Generate an F# signature file for an assembly; this is intended for
-    /// use with GotoDefinition
-    ///
-    /// nameFixer is a function to convert filenames to a canonical form
-    /// s         is the name of the .dll for which an .fsi ought to be
-    ///           generated
-    let GenerateFsiFile (tcConfig:TcConfig,tcGlobals,tcImports:TcImports,gotoCache) nameFixer s =
-
-      let denv      = empty_denv tcGlobals
-      let denv      = { denv with
-                             showImperativeTyparAnnotations = true ;
-                             showAttributes                 = true ;
-                             openTopPaths                   = [ lib_MF_path
-                                                                lib_MFCore_path
-                                                                lib_MFColl_path
-                                                                lib_MFControl_path
-                                                                Il.split_namespace lib_FSLib_Pervasives_name
-                                                                Il.split_namespace lib_MLLib_OCaml_name
-                                                                Il.split_namespace lib_MLLib_FSharp_name
-                                                                Il.split_namespace lib_MLLib_Pervasives_name
-                                                              ]
-                      }.Normalize ()
-
-      let fixedName = nameFixer s
-      match Map.tryfind fixedName !gotoCache with
-      | Some (Some (outName, _, _) as res) when Internal.Utilities.FileSystem.File.SafeExists outName -> res
-      | Some None                                                   -> None
-      | _                                                           -> 
-         let res =
-             let s            = fixedName
-             let outName      = GeneratedFsiNameGenerator s
-
-             let relevantCcus         = 
-                 tcImports.GetCcuInfos () 
-                    |> List.map (fun asm -> asm.FSharpViewOfMetadata)
-                    |> List.filter (fun ccu -> 
-                                 match ccu.FileName with
-                                  | Some s' -> nameFixer s' = s
-                                  | None    -> false)
-
-             let writeModul   isFirst os st (ccu:ccu) = 
-                ccu.Contents |> NicePrint.AssemblyL denv |> Renderer.showForGotoDefinition os isFirst st |> snd
-
-             match relevantCcus with
-             | []      -> None
-             | c :: cs -> 
-                if Internal.Utilities.FileSystem.File.SafeExists outName
-                   then File.SetAttributes (outName, FileAttributes.Temporary)
-                        File.Delete outName
-
-                let outFile = File.CreateText outName
-                let outStrm = outFile :> System.IO.TextWriter
-                let initSt  = (0, 0, new Dictionary<_,_>())
-
-                let st              = writeModul true outStrm initSt c
-                let (_, _, mapping) = List.fold (writeModul false outStrm) st cs
-
-                outFile.Close ()
-                File.SetAttributes (outName, FileAttributes.Temporary ||| FileAttributes.ReadOnly)
-
-                Some (outName, mapping, tcConfig.referencedDLLs |> List.map (fun r -> nameFixer r.Text) )
-         gotoCache := Map.add fixedName res !gotoCache
-         res
-    
-// ------------------------------------------------------------------------------------------
-// The incremental build definition for parsing and typechecking F#
-// ------------------------------------------------------------------------------------------
-module IncrementalFSharpBuild =
-
-    open Internal.Utilities
-    open Internal.Utilities.Collections
-
-    open IncrementalBuild
-    open Microsoft.FSharp.Compiler.Build
-    open Microsoft.FSharp.Compiler.Fscopts
-    open Microsoft.FSharp.Compiler.Ast
-    open Microsoft.FSharp.Compiler.ErrorLogger
-    open Microsoft.FSharp.Compiler.Env
-    open Microsoft.FSharp.Compiler.TypeChecker
-    open Microsoft.FSharp.Compiler.Tast 
-    open Microsoft.FSharp.Compiler.Range
-    open Microsoft.FSharp.Compiler
-    open Microsoft.FSharp.Compiler.AbstractIL.Internal
-
-    module Tc = Microsoft.FSharp.Compiler.TypeChecker
-
-    open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics 
-    open Internal.Utilities.Debug
-    
-    /// Callbacks for things that happen in the build.                  
-    type BuildEvents = 
-        { BeforeTypeCheckFile: string -> unit }
-        static member Default = { BeforeTypeCheckFile=fun filename->() }
-    
-    type FileDependency = {
-            // Name of the file
-            Filename : string
-            // If true, then deletion or creation of this file should trigger an entirely fresh build
-            ExistenceDependency : bool
-            // If true, then changing this file should trigger and call to incrementally build
-            IncrementalBuildDependency : bool }        
-
-    /// Accumulated results of type checking.
-    type TypeCheckAccumulator = {
-        tcState:tcState;
-        tcImports:TcImports;
-        tcGlobals:TcGlobals;
-        tcConfig:TcConfig;
-        tcEnv:tcEnv;
-        topAttribs:topAttribs option;
-        typedImplFiles:TypedImplFile list;
-    }
-
-    /// Maximum time share for a piece of background work before it should (cooperatively) yield
-    /// to enable other requests to be serviced. Yielding means returning a continuation function
-    /// (via an Eventually<_> value of case NotYetDone) that can be called as the next piece of work. 
-    let maxTimeShareMilliseconds = 
-        match System.Environment.GetEnvironmentVariable("mFSharp_MaxTimeShare") with 
-        | null | "" -> 50L
-        | s -> int64 s
-
-      
-    /// Global service state
-    let private frameworkTcImportsCache = AgedLookup<(*resolvedpath*)string list * string * (*ClrRoot*)string list* (*fsharpBinaries*)string,(TcGlobals * TcImports)>(8) 
-
-    /// This function strips the "System" assemblies from the tcConfig and returns a age-cached TcImports for them.
-    let GetFrameworkTcImports(tcConfig:TcConfig) =
-        // Split into installed and not installed.
-        let frameworkDLLs,nonFrameworkResolutions,unresolved = TcAssemblyResolutions.SplitNonFoundationalResolutions(tcConfig)
-        let frameworkDLLsKey = 
-            frameworkDLLs 
-            |> List.map(fun ar->ar.resolvedPath) // The cache key. Just the minimal data.
-            |> List.sort  // Sort to promote cache hits.
-        let tcGlobals,frameworkTcImports = 
-            // Prepare the frameworkTcImportsCache
-            //
-            // The data elements in this key are very important. There should be nothing else in the TcConfig that logically affects
-            // the import of a set of framework DLLs into F# CCUs. That is, the F# CCUs that result from a set of DLLs (including
-            // FSharp.Core.dll andb mscorlib.dll) must be logically invariant of all the other compiler configuration parameters.
-            let key = (frameworkDLLsKey,
-                       tcConfig.mscorlibAssemblyName, 
-                       tcConfig.ClrRoot,
-                       tcConfig.fsharpBinariesDir)
-            match frameworkTcImportsCache.TryGet key with 
-            | Some(res)-> res
-            | None -> 
-                let tcConfigP = TcConfigProvider.Constant(tcConfig)
-                let ((tcGlobals,tcImports) as res) = TcImports.BuildFrameworkTcImports (tcConfigP,frameworkDLLs)
-                frameworkTcImportsCache.Put(key,res)
-                tcGlobals,tcImports
-        tcGlobals,frameworkTcImports,nonFrameworkResolutions,unresolved
-
-    (*------------------------------------------------------------------------------------
-     * Rules for reactive building.
-     *
-     * This phrases the compile as a series of vector functions and vector manipulations.
-     * Rules written in this language are then transformed into a plan to execute the 
-     * various steps of the process (possible in parallel).
-     *-----------------------------------------------------------------------------------*)
-
-    let Create (tcConfig : TcConfig, projectDirectory : string, assemblyName, niceNameGen, resourceManager,
-                sourceFiles:string list, ensureReactive, buildEvents:BuildEvents, errorLogger:ErrorLogger, 
-                errorRecovery : exn -> range -> unit)
-               =
-        use t = Trace.Call("IncrementalBuildVerbose", "Create", fun _ -> sprintf " tcConfig.includes = %A" tcConfig.includes)
-        
-        let tcConfigP = TcConfigProvider.Constant(tcConfig)
-        
-
-        /// An error logger that captures errors and eventually sends a single error or warning for all the errors and warning in a file
-        let CompilationErrorLogger(sourceRange) = 
-            
-            let warningsSeenInScope = new ResizeArray()
-            let errorsSeenInScope = new ResizeArray()
-
-            let errorLogger = 
-                { new ErrorLogger with
-                    member x.WarnSink(exn) = 
-                        warningsSeenInScope.Add(exn)
-                        errorLogger.WarnSink(exn)
-                    member x.ErrorSink(exn) = 
-                        errorsSeenInScope.Add(exn)
-                        errorLogger.ErrorSink(exn)
-                    member x.ErrorCount = errorLogger.ErrorCount }
-
-            let reportErrors () =
-                let warns = warningsSeenInScope |> ResizeArray.to_list
-                let errs = errorsSeenInScope |> ResizeArray.to_list
-                if (warns.Length <> 0 || errs.Length <> 0) && (sourceRange <> rangeStartup) then
-                    // Need to reoprt issues associated with a hashload file.
-                    if errs.Length = 0 then warning(HashLoadedSourceHasIssues(warns,errs,sourceRange))
-                    else errorR(HashLoadedSourceHasIssues(warns,errs,sourceRange))             
-            // Return the error logger and a function to run when we want the errors reported
-            errorLogger,reportErrors
-
-
-        /// Use to reset error and warning handlers            
-        let CompilationGlobalsScope(errorLogger) = 
-            let savedEnvSink = !(Nameres.GlobalTypecheckResultsSink)
-#if TRYING_TO_FIX_4577
-#else
-            let savedDirectory = System.IO.Directory.GetCurrentDirectory()
-#endif
-            Nameres.GlobalTypecheckResultsSink := None
-#if TRYING_TO_FIX_4577
-#else
-            System.IO.Directory.SetCurrentDirectory(projectDirectory)
-#endif
-            let unwind2 = InstallGlobalErrorLogger (fun _ -> errorLogger)
-            // Return the disposable object that cleans up
-            {new IDisposable with
-                member d.Dispose() = 
-                    unwind2.Dispose();
-#if TRYING_TO_FIX_4577
-#else
-                    System.IO.Directory.SetCurrentDirectory(savedDirectory)
-#endif
-                    Nameres.GlobalTypecheckResultsSink:=savedEnvSink}
-                            
-        
-        let CompilationGlobalsAndErrorLoggerScopeWithSourceRange(sourceRange) = 
-            let errorLogger,reportErrors = CompilationErrorLogger(sourceRange)
-            let unwind2 = CompilationGlobalsScope (errorLogger)
-            // Return the disposable object that cleans up
-            errorLogger,
-            {new IDisposable with
-                member d.Dispose() = 
-                    unwind2.Dispose();
-                    reportErrors() }
-
-        let CompilationGlobalsAndErrorLoggerScope() = 
-            CompilationGlobalsAndErrorLoggerScopeWithSourceRange(rangeStartup)
-
-        // Strip out and cache a level of "system" references.
-        let tcGlobals,frameworkTcImports,nonFrameworkResolutions,unresolvedReferences = GetFrameworkTcImports(tcConfig)
-        
-        // Check for the existence of loaded sources and prepend them to the sources list if present.
-        let sourceFiles = tcConfig.GetAvailableLoadedSources() @ (sourceFiles|>List.map(fun s -> rangeStartup,s))
-        // Mark up the source files with an indicator flag indicating if they are the last source file in the project
-        let sourceFiles = 
-            let flags = tcConfig.ComputeCanContainEntryPoint(sourceFiles |> List.map snd)
-            (sourceFiles,flags) ||> List.map2 (fun (m,nm) flag -> (m,nm,flag))
-        
-        // Get the original referenced assembly names
-        System.Diagnostics.Debug.Assert(not((sprintf "%A" nonFrameworkResolutions).Contains("System.dll")),sprintf "Did not expect a system import here. %A" nonFrameworkResolutions)
-        
-        // Keep this around for disposing
-        let scopeOfPriorTcImports : TcImports option ref = ref None
-        
-        /// Get the timestamp of the given file name.
-        let StampFilename (m:range,filename:string,canContainEntryPoint:bool) =
-            File.GetLastWriteTime(filename)
-                            
-        /// Parse the given files and return the given inputs. This function is expected to be
-        /// able to be called with a subset of sourceFiles and return the corresponding subset of
-        /// parsed inputs. 
-        let Parse (sourceRange:range,filename:string,canContainEntryPoint) =
-            let errorLogger, sDisposable = CompilationGlobalsAndErrorLoggerScopeWithSourceRange(sourceRange)
-            use s = sDisposable
-            Trace.Print("FSharpBackgroundBuild", fun _ -> sprintf "Parsing %s..." filename)
-            
-            try  
-                let result = ParseOneInputFile(tcConfig,resourceManager,[],filename ,canContainEntryPoint,errorLogger)
-                Trace.PrintLine("FSharpBackgroundBuildVerbose", fun _ -> sprintf "done.")
-                result,sourceRange,filename
-            with e -> 
-                System.Diagnostics.Debug.Assert(false, sprintf "unexpected failure in IncrementalFSharpBuild.Parse\nerror = %s" (e.ToString()))
-                failwith "last chance failure"  
-                
-        /// Get the names of all referenced assemblies.
-        let GetReferencedAssemblyNames _ : (range*string*DateTime) array =
-            let errorLogger, sDisposable = CompilationGlobalsAndErrorLoggerScope()
-            use s = sDisposable
-                                    
-            let result = 
-                nonFrameworkResolutions
-                         |> List.map(fun r ->
-                            let originaltimestamp = 
-                                try 
-                                    if Internal.Utilities.FileSystem.File.SafeExists(r.resolvedPath) then
-                                        let result = File.GetLastWriteTime(r.resolvedPath)
-                                        Trace.Print("FSharpBackgroundBuildVerbose", fun _ -> sprintf "Found referenced assembly '%s'.\n" r.resolvedPath)
-                                        result
-                                    else
-                                        Trace.Print("FSharpBackgroundBuildVerbose", fun _ -> sprintf "Did not find referenced assembly '%s' on disk.\n" r.resolvedPath)
-                                        DateTime.Now                               
-                                with e -> 
-                                    Trace.Print("FSharpBackgroundBuildVerbose", fun _ -> sprintf "Did not find referenced assembly '%s' due to exception.\n" r.resolvedPath)
-                                    errorLogger.WarnSink(e)
-                                    DateTime.Now                               
-                            r.originalReference.Range,r.resolvedPath,originaltimestamp) 
-                         |> List.to_array
-            result
-            
-        
-        /// Timestamps of referenced assemblies are taken from the file's timestamp.
-        let TimestampReferencedAssembly (range,filename,originaltimestamp) =
-            let errorLogger, sDisposable = CompilationGlobalsAndErrorLoggerScope()
-            use s = sDisposable
-            let timestamp = 
-                try
-                    if Internal.Utilities.FileSystem.File.SafeExists(filename) then
-                        let ts = File.GetLastWriteTime(filename)
-                        if ts<>originaltimestamp then 
-                            Trace.PrintLine("FSharpBackgroundBuildVerbose", fun _ -> sprintf "Noticing change in timestamp of file %s from %A to %A" filename originaltimestamp ts)
-                        else    
-                            Trace.PrintLine("FSharpBackgroundBuildVerbose", fun _ -> sprintf "Noticing no change in timestamp of file %s (still %A)" filename originaltimestamp)
-                        ts
-                    else
-                        Trace.PrintLine("FSharpBackgroundBuildVerbose", fun _ -> sprintf "Noticing that file %s was deleted, but ignoring that for timestamp checking" filename)
-                        originaltimestamp
-                with e -> 
-                    // For example, malformed filename
-                    Trace.PrintLine("FSharpBackgroundBuildVerbose", fun _ -> sprintf "Exception when checking stamp of file %s, using old stamp %A" filename originaltimestamp)
-                    errorLogger.WarnSink(e)
-                    originaltimestamp                      
-            timestamp
-                
-         
-        // Link all the assemblies together and produce the input typecheck accumulator               
-        let CombineImportedAssemblies _ : TypeCheckAccumulator =
-            let errorLogger, sDisposable = CompilationGlobalsAndErrorLoggerScope()
-            use s = sDisposable
-            
-            let tcImports = 
-                try
-                    Trace.PrintLine("FSharpBackgroundBuild", fun _ -> "About to (re)create tcImports")
-                    let tcImports = TcImports.BuildNonFrameworkTcImports(tcConfigP,tcGlobals,frameworkTcImports,nonFrameworkResolutions)  
-                    Trace.PrintLine("FSharpBackgroundBuild", fun _ -> "(Re)created tcImports")
-                    tcImports
-                with e -> 
-                    System.Diagnostics.Debug.Assert(false, sprintf "Could not BuildAllReferencedDllTcImports %A" e)
-                    Trace.PrintLine("FSharpBackgroundBuild", fun _ -> "Failed to recreate tcImports\n  %A")
-                    errorLogger.WarnSink(e)
-                    frameworkTcImports                               
-                    
-            let tcEnv0 = GetInitialTypecheckerEnv (Some assemblyName) rangeStartup tcConfig tcImports tcGlobals
-            let tcState0 = TypecheckInitialState (rangeStartup,assemblyName,tcConfig,tcGlobals,niceNameGen,tcEnv0)
-            let tcAcc = {
-                tcGlobals=tcGlobals
-                tcImports=tcImports
-                tcState=tcState0
-                tcConfig=tcConfig
-                tcEnv = tcEnv0
-                topAttribs=None
-                typedImplFiles=[]
-                }   
-            tcAcc    
-                
-
-        
-        /// Type check all files.     
-        let TypeCheck (tcAcc:TypeCheckAccumulator) input =    
-            match input with 
-            | Some(input),sourceRange,filename->
-                
-                let errorLogger,reportErrors = CompilationErrorLogger(sourceRange)
-                let errorLogger = GetErrorLoggerFilteringByScopedPragmas(false,GetScopedPragmasForInput(input),errorLogger)
-                let fullComputation = 
-                    eventually {
-                        try 
-                            Trace.PrintLine("FSharpBackgroundBuild", fun _ -> sprintf "Typechecking %s..." filename)                
-                            buildEvents.BeforeTypeCheckFile(filename)
-                            let! (tcEnv,topAttribs,typedImplFiles),tcState = TypecheckOneInputEventually(fun () -> errorLogger.ErrorCount = 0) tcConfig tcAcc.tcImports tcAcc.tcGlobals None tcAcc.tcState input
-                            Trace.PrintLine("FSharpBackgroundBuild", fun _ -> sprintf "done.")
-                            return {tcAcc with tcState=tcState; tcEnv=tcEnv; topAttribs=Some(topAttribs); typedImplFiles=typedImplFiles } 
-                        finally 
-                            reportErrors()
-                    }
-                    
-                // Run part of the Eventually<_> computation until a timeout is reached. If not complete, 
-                // return a new Eventually<_> computation which recursively runs more of the computation.
-                //   - When the whole thing is finished commit the error results sent through the errorLogger.
-                //   - Each time we do real work we reinstall the CompilationGlobalsScope
-                if ensureReactive then 
-                    let timeSlicedComputation = 
-                        fullComputation |> 
-                           Eventually.repeatedlyProgressUntilDoneOrTimeShareOver 
-                              maxTimeShareMilliseconds
-                              (fun f -> 
-                                  // Reinstall the compilation globals each time we start or restart
-                                  use unwind = CompilationGlobalsScope (errorLogger) 
-                                  Trace.Print("FSharpBackgroundBuildVerbose", fun _ -> sprintf "continuing %s.\n" filename)
-                                  f())
-                               
-                    timeSlicedComputation
-                else 
-                    use unwind = CompilationGlobalsScope (errorLogger) 
-                    fullComputation |> Eventually.force |> Eventually.Done 
-            | _ -> 
-                Eventually.Done tcAcc
-                
-        /// Finish up the typechecking to produce outputs for the rest of the compilation process
-        let FinalizeTypeCheck (tcStates:TypeCheckAccumulator array) = 
-            Trace.PrintLine("FSharpBackgroundBuildVerbose", fun _ -> sprintf "Finalizing Type Check" )
-            let finalAcc = tcStates.[tcStates.Length-1]
-            let results : (tcEnv * topAttribs * TypedImplFile list) list = tcStates |> List.of_array |> List.map (fun acc-> acc.tcEnv, (Option.get acc.topAttribs), acc.typedImplFiles)
-            let (tcEnvAtEndOfLastFile,topAttrs,mimpls),tcState = TypecheckMultipleInputsFinish (results,finalAcc.tcState)
-            let tcState,tassembly = TypecheckClosedInputSetFinish (mimpls,tcState)
-            tcState, topAttrs, tassembly, tcEnvAtEndOfLastFile, finalAcc.tcImports, finalAcc.tcGlobals, finalAcc.tcConfig
-
-        let gotoCache = ref (Map.empty : Map) // avoid regenerating the same file
-        
-        let unresolvedFileDependencies = 
-            unresolvedReferences
-            |> List.map (function Microsoft.FSharp.Compiler.Build.UnresolvedReference(referenceText,ranges) -> referenceText)
-            |> List.map (fun file->{Filename =  file; ExistenceDependency = true; IncrementalBuildDependency = true })
-        let resolvedFileDependencies = 
-            nonFrameworkResolutions |> List.map (fun r -> {Filename =  r.resolvedPath ; ExistenceDependency = true; IncrementalBuildDependency = true })
-        let fileDependencies = List.concat [unresolvedFileDependencies;resolvedFileDependencies]
-#if DEBUG
-        resolvedFileDependencies |> List.iter (fun x -> System.Diagnostics.Debug.Assert(System.IO.Path.IsPathRooted(x.Filename), sprintf "file dependency should be absolute path: '%s'" x.Filename))
-#endif        
-#if TRACK_DOWN_EXTRA_BACKSLASHES        
-        fileDependencies |> List.iter(fun dep ->
-            Debug.Assert(not(dep.Filename.Contains(@"\\")), "IncrementalBuild.Create results in a non-canonical filename with extra backslashes: "^dep.Filename)
-            )
-#endif        
-        
-        // ---------------------------------------------------------------------------------------------            
-        let build                       = new BuildScope ()
-
-        // Inputs
-        let filenames                   = InputVector "Filenames"
-        let emptysource                 = InputScalar "EmptySource"
-        
-        // Build
-        let stampedFilenames            = Vector.Stamp "SourceFileTimeStamps" StampFilename filenames
-        let parseTrees                  = Vector.Map "Parse" Parse stampedFilenames
-        let scalarParseTree             = Vector.AsScalar "ScalarizeParseTrees" parseTrees
-        let triggerOfParseTrees         = Scalar.Map "TriggerOfParseTrees" (fun _ -> 1) scalarParseTree // Create a timestamped trigger from the parse trees.
-        let referencedAssemblies        = Scalar.Multiplex "GetReferencedAssemblyNames" GetReferencedAssemblyNames triggerOfParseTrees
-        let stampedReferencedAssemblies = Vector.Stamp "TimestampReferencedAssembly" TimestampReferencedAssembly referencedAssemblies
-        let initialTcAcc                = Vector.Demultiplex "CombineImportedAssemblies" CombineImportedAssemblies stampedReferencedAssemblies
-        let tcStates                    = Vector.ScanLeft "TypeCheck" TypeCheck initialTcAcc parseTrees
-        let finalizedTypeCheck          = Vector.Demultiplex "FinalizeTypeCheck" FinalizeTypeCheck tcStates
-        let generatedSignatureFiles     = Scalar.Map "GenerateSignatureFiles" (fun tcAcc -> FsiGeneration.GenerateFsiFile(tcAcc.tcConfig,tcAcc.tcGlobals, tcAcc.tcImports,gotoCache)) initialTcAcc
-
-        // Outputs
-        build.DeclareVectorOutput ("TypeCheckingStates",tcStates)
-        build.DeclareScalarOutput ("InitialTcAcc", initialTcAcc)
-        build.DeclareScalarOutput ("FinalizeTypeCheck", finalizedTypeCheck)
-        build.DeclareScalarOutput ("GenerateSignatureFiles", generatedSignatureFiles)
-        // ---------------------------------------------------------------------------------------------            
-        build.GetConcreteBuild (["Filenames", sourceFiles.Length, sourceFiles |> List.map box], []), fileDependencies
-
-    // Expose methods to operate on F# build in a strongly typed way----------------------------------
-    
-    let Step(build) = 
-        IncrementalBuild.Step "TypeCheckingStates" build
-    
-    let EvalTypeCheckSlot(slotOfFile,build) = 
-        let build = EvalSlot("InitialTcAcc",slotOfFile,build)  
-        let build = EvalSlot("TypeCheckingStates",slotOfFile,build)  
-        build
-        
-    let GetAntecedentTypeCheckResultsBySlot(slotOfFile,build) = 
-        let result = 
-            match slotOfFile with
-            | (*first file*) 0 -> GetScalarResult("InitialTcAcc",build)
-            | _ -> GetVectorResultBySlot("TypeCheckingStates",slotOfFile-1,build)  
-        
-        match result with
-        | Some({tcState=tcState; tcGlobals=tcGlobals; tcConfig=tcConfig; tcImports=tcImports},timestamp)->
-            Some(tcState,tcImports,tcGlobals,tcConfig,timestamp)
-        | _->None
-        
-    let TypeCheck(build) = 
-        let build = IncrementalBuild.Eval "FinalizeTypeCheck" build
-        match GetScalarResult("FinalizeTypeCheck",build) with
-        | Some((tcState,topAttribs,TypedAssembly,tcEnv,tcImports,tcGlobals,tcConfig),ts)->build,tcState,topAttribs,TypedAssembly,tcEnv,tcImports,tcGlobals,tcConfig
-        | None -> failwith "Build was not evaluated."
-        
-    let GetSlotOfFileName(filename:string,build:Build) =
-        // Get the slot of the given file and force it to build.
-        let CompareFileNames (_,f1,_) (_,f2,_) = 
-            let result = 
-                   System.String.Compare(f1,f2,StringComparison.CurrentCultureIgnoreCase)=0
-                || System.String.Compare(Path.GetFullPath(f1),Path.GetFullPath(f2),StringComparison.CurrentCultureIgnoreCase)=0
-            result
-        GetSlotByInput("Filenames",(rangeStartup,filename,false),build,CompareFileNames)
-        
-    /// Get a list of on-demand generators of F# signature files for referenced assemblies.
-    let GetFsiGenerators (build : Build) : ((string -> string) -> string -> FsiGeneration.FsiGenerationResult) * Build =
-      let build = IncrementalBuild.Eval "GenerateSignatureFiles" build
-      let gens  = match IncrementalBuild.GetScalarResult<_> ("GenerateSignatureFiles", build) with
-                  | Some (gens, _) -> gens
-                  | None           -> failwith "Build was not evaluated."
-      (gens, build)
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/vs/IncrementalBuild.fsi b/tools/FSharp_1.9.6.16/source/fsharp/vs/IncrementalBuild.fsi
deleted file mode 100644
index 87193bc5..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/vs/IncrementalBuild.fsi
+++ /dev/null
@@ -1,133 +0,0 @@
-#light
-namespace Microsoft.FSharp.Compiler
-
-open Microsoft.FSharp.Compiler
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
-
-/// Generalized Incremental Builder. This is exposed only for unittesting purposes.
-module IncrementalBuild =
-  // A build scalar.
-  type Scalar<'T> = interface
-    end
-  /// A build vector.        
-  type Vector<'T> = interface
-    end
-  type Build
-  /// Declares a vector build input.
-  val InputScalar : string -> Scalar<'T>
-  /// Declares a scalar build input.
-  val InputVector : string -> Vector<'T>
-  /// Methods for acting on build Scalars
-  module Scalar = 
-      /// Apply a function to one scalar to produce another.
-      val Map : string -> ('I -> 'O) -> Scalar<'I> -> Scalar<'O>
-      /// Apply a function to scalar value to produce a vector.
-      val Multiplex : string -> ('I -> 'O array)->Scalar<'I> -> Vector<'O>
-
-  /// Methods for acting on build Vectors
-  module Vector = 
-      /// Maps one vector to another using the given function.    
-      val Map : string -> ('I -> 'O) -> Vector<'I> -> Vector<'O>
-      /// Updates the creates a new vector with the same items but with 
-      /// timestamp specified by the passed-in function.  
-      val Stamp : string -> ('I -> System.DateTime) -> Vector<'I> -> Vector<'I>
-      /// Apply a function to each element of the vector, threading an accumulator argument
-      /// through the computation. Returns intermediate results in a vector.
-      val ScanLeft : string -> ('A -> 'I -> Eventually<'A>) -> Scalar<'A> -> Vector<'I> -> Vector<'A>
-      /// Apply a function to a vector to get a scalar value.
-      val Demultiplex : string -> ('I array -> 'O)->Vector<'I> -> Scalar<'O>
-      /// Convert a Vector into a Scalar.
-      val AsScalar: string -> Vector<'I> -> Scalar<'I array> 
-
-  /// Evaluate a build.
-  val Eval : (string -> Build -> Build)
-  /// Evaluate a single slot.
-  val EvalSlot : (string * 'a * Build -> Build)
-  /// Do one step in the build.
-  val Step : (string -> Build -> Build option)
-  /// Get a scalar vector. Result must be available
-  val GetScalarResult<'T> : string * Build -> ('T * System.DateTime) option
-  /// Get a result vector. All results must be available or thrown an exception.
-  val GetVectorResult<'T> : string * Build -> 'T array
-  /// Get an element of vector result or None if there were no results.
-  val GetVectorResultBySlot<'T> : string*int*Build -> ('T * System.DateTime) option
-  
-  /// Declare build outputs and bind them to real values.
-  type BuildScope = 
-       new : unit -> BuildScope
-       /// Declare a named scalar output.
-       member DeclareScalarOutput : name:string * output:Scalar<'T> -> unit
-       /// Declare a named vector output.
-       member DeclareVectorOutput : name:string * output:Vector<'T> -> unit
-       /// Set the conrete inputs for this build
-       member GetConcreteBuild : vectorinputs:(string * int * obj list) list * scalarinputs:(string*obj) list -> Build
-
-/// Incremental builder for F# parsing and type checking.  
-module FsiGeneration =
-  /// Result of generating an interface file (probably for GotoDefinition); this
-  /// is (name-of-generated-file,
-  ///     map-from-fully-qualified-name-to-position-in-file,
-  ///     referenced-assemblies-needed-to-resolve-names-in-file)
-  type FsiGenerationResult = (string * System.Collections.Generic.Dictionary * string list) option
-
-  /// Given a .dll name, predictably generate a name for the corresponding .fsi file that we generate.
-  val GeneratedFsiNameGenerator                   : string -> string
-  /// The directory where generated .fsi files can be placed (and deleted) without interfering with user files.
-  val PathForGeneratedVisualStudioFSharpTempFiles : string
-
-/// Incremental builder for F# parsing and type checking.  
-module IncrementalFSharpBuild =
-
-  /// Callbacks for things that happen in the build.                  
-  type BuildEvents = 
-    { BeforeTypeCheckFile: string -> unit }
-    static member Default : BuildEvents
-    
-  type FileDependency = {
-        // Name of the file
-        Filename : string
-        // If true, then deletion or creation of this file should trigger an entirely fresh build
-        ExistenceDependency : bool
-        // If true, then changing this file should trigger an incremental rebuild
-        IncrementalBuildDependency : bool
-      }    
-    
-                        
-  val Create :
-    tcConfig : Build.TcConfig *
-    projectDirectory : string *
-    assemblyName : string *
-    niceNameGen : Microsoft.FSharp.Compiler.Ast.NiceNameGenerator *
-    resourceManager : Microsoft.FSharp.Compiler.Lexhelp.LexResourceManager *
-    sourceFiles : string list *
-    ensureReactive : bool *
-    buildEvents : BuildEvents *
-    errorLogger : ErrorLogger * 
-    errorRecovery: (exn -> Range.range -> unit)  
-      -> IncrementalBuild.Build * FileDependency list
-
-  /// Perform one step in the F# build.
-  val Step : IncrementalBuild.Build -> IncrementalBuild.Build option
-
-  /// Ensure that the given file has been typechecked.
-  val EvalTypeCheckSlot :
-    'a * IncrementalBuild.Build -> IncrementalBuild.Build
-
-  /// Get the preceding typecheck state of a slot, allow stale results.
-  val GetAntecedentTypeCheckResultsBySlot :
-    int * IncrementalBuild.Build ->
-    (Build.tcState * Build.TcImports * Microsoft.FSharp.Compiler.Env.TcGlobals * Build.TcConfig * System.DateTime) option
-
-  /// Get the final typecheck result.
-  val TypeCheck :
-    IncrementalBuild.Build ->
-    IncrementalBuild.Build * Build.tcState * TypeChecker.topAttribs * Tast.TypedAssembly * TypeChecker.tcEnv * Build.TcImports * Env.TcGlobals * Build.TcConfig
-
-  /// Attempts to find the slot of the given input file name. Throws an exception if it couldn't find it.    
-  val GetSlotOfFileName :
-    string * IncrementalBuild.Build -> int
-
-  /// Returns a function that tries to generate an interface (.fsi) file given the name of an assembly's .dll.
-  val GetFsiGenerators                            : IncrementalBuild.Build -> ((string -> string) -> string -> FsiGeneration.FsiGenerationResult) * IncrementalBuild.Build
-
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/vs/service.ml b/tools/FSharp_1.9.6.16/source/fsharp/vs/service.ml
deleted file mode 100644
index 9d94aeb3..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/vs/service.ml
+++ /dev/null
@@ -1,4240 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-//----------------------------------------------------------------------------
-// Open up the compiler as an incremental service for lexing, parsing,
-// type checking and intellisense-like environment-reporting.
-//--------------------------------------------------------------------------
-
-#light
-
-namespace Microsoft.FSharp.Compiler.SourceCodeServices
-
-open Internal.Utilities
-open System
-open System.IO
-open System.Text
-open System.Threading
-open System.Collections.Generic
- 
-open Microsoft.FSharp.Text.Printf
-open Microsoft.FSharp.Compiler.AbstractIL
-open Microsoft.FSharp.Compiler.AbstractIL.Internal  
-open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library  
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.MSBuildResolver
-open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics 
-open Microsoft.FSharp.Compiler.PrettyNaming
-open Internal.Utilities.Collections
-open Internal.Utilities.Debug
-open System.Security.Permissions
-
-open Microsoft.FSharp.Compiler.Env 
-open Microsoft.FSharp.Compiler.Parser
-open Microsoft.FSharp.Compiler.Range
-open Microsoft.FSharp.Compiler.Ast
-open Microsoft.FSharp.Compiler.ErrorLogger
-open Microsoft.FSharp.Compiler.Lexhelp
-open Microsoft.FSharp.Compiler.Build
-open Microsoft.FSharp.Compiler.Tast
-open Microsoft.FSharp.Compiler.Tastops
-open Microsoft.FSharp.Compiler.Lib
-open Microsoft.FSharp.Compiler.AbstractIL.IL 
-open Microsoft.FSharp.Compiler.Layout
-open Microsoft.FSharp.Compiler.TypeChecker
-open Microsoft.FSharp.Compiler.Infos
-open Microsoft.FSharp.Compiler.Nameres
-
-/// Methods for dealing with F# sources files.
-module SourceFile =
-    /// Source file extensions
-    let private compilableExtensions = Build.sigSuffixes @ Build.implSuffixes @ Build.scriptSuffixes
-    /// Single file projects extensions
-    let private singleFileProjectExtensions = Build.scriptSuffixes
-    /// Whether or not this file is compilable
-    let IsCompilable file =
-        let ext = Path.GetExtension(file)
-        compilableExtensions |> List.exists(fun e->0 = String.Compare(e,ext,StringComparison.OrdinalIgnoreCase))
-    /// Whether or not this file should be a single-file project
-    let MustBeSingleFileProject file =
-        let ext = Path.GetExtension(file)
-        singleFileProjectExtensions |> List.exists(fun e-> 0 = String.Compare(e,ext,StringComparison.OrdinalIgnoreCase))
-    /// Whether or not this is an fsi generated by goto metadata.
-    let IsFSharpLanguageServiceGenerated s =
-        let genExtns = [ ".fsi" ] // REVIEW: decide if we like the extension check or if we ought to skip it
-        let extn     = Path.GetExtension s
-        if List.mem extn genExtns then
-            let dirName  = Path.GetDirectoryName s
-            dirName = FsiGeneration.PathForGeneratedVisualStudioFSharpTempFiles        
-        else false
-    /// Additonal #defines that should be in place when editing a file in a file editor
-    /// such as VS.
-    let AdditionalDefinesForUseInEditor(filename) =
-        if Build.IsScript(filename) then ["INTERACTIVE";"EDITING"]
-        else ["COMPILED";"EDITING"]
-
-
-
-/// Test hooks for tweaking internals
-module TestHooks = 
-    /// Function used to construct memebr info text in data tips.
-    let ConstructMemberInfoText: ((unit->unit)->unit) option ref = ref None
-
-    let HookScope(command:string,hook:(unit->unit)->unit) : System.IDisposable = 
-        match command with
-        | "HookConstructMemberInfoText" ->
-                ConstructMemberInfoText := Some(hook)
-                {new IDisposable with
-                    member d.Dispose() = 
-                        ConstructMemberInfoText := None}     
-        | _ -> failwith "Unknown test hook" 
-
-
-    /// Enable/disable generation of interface file in the 'Find Declaration'
-    /// By default, the feature is turned off in the current version
-    let enableFsiGenerationHook = ref false  
-    
-    /// Turns the generation on and returns IDisposable that disables it again
-    let EnableFsiGenerationHook () = 
-        let oldFsiGenerationHook = !enableFsiGenerationHook
-        enableFsiGenerationHook := true
-        { new IDisposable with
-              member x.Dispose() =
-                  enableFsiGenerationHook := oldFsiGenerationHook }
-        
-/// This corresponds to a token categorization originally used in Visual Studio 2003.
-/// 
-/// NOTE: This corresponds to a token categorization originally used in Visual Studio 2003 and the original Babel source code.
-/// It is not clear it is a primary logical classification that should be being used in the 
-/// more recent language service work.
-type TokenColorKind =
-      Default = 0
-    | Text = 0
-    | Keyword = 1
-    | Comment = 2
-    | Identifier = 3
-    | String = 4
-    | UpperIdentifier = 5
-    | InactiveCode = 7
-    | PreprocessorKeyword = 8
-    | Number = 9
-
-/// Categorize an action the editor should take in respons to a token, e.g. brace matching
-/// 
-/// NOTE: This corresponds to a token categorization originally used in Visual Studio 2003 and the original Babel source code.
-/// It is not clear it is a primary logical classification that should be being used in the 
-/// more recent language service work.
-type TriggerClass =
-      None         = 0x00000000
-    | MemberSelect = 0x00000001
-    | MatchBraces  = 0x00000002 
-    | ChoiceSelect = 0x00000004
-    | MethodTip    = 0x000000F0
-    | ParamStart   = 0x00000010
-    | ParamNext    = 0x00000020
-    | ParamEnd     = 0x00000040
-    
-    
-/// This corresponds to a token categorization originally used in Visual Studio 2003.
-/// 
-/// NOTE: This corresponds to a token categorization originally used in Visual Studio 2003 and the original Babel source code.
-/// It is not clear it is a primary logical classification that should be being used in the 
-/// more recent language service work.
-type TokenCharKind = 
-      Default     = 0x00000000
-    | Text        = 0x00000000
-    | Keyword     = 0x00000001
-    | Identifier  = 0x00000002
-    | String      = 0x00000003
-    | Literal     = 0x00000004
-    | Operator    = 0x00000005
-    | Delimiter   = 0x00000006
-    | WhiteSpace  = 0x00000008
-    | LineComment = 0x00000009
-    | Comment     = 0x0000000A    
-
-
-/// Information about a particular token from the tokenizer
-type TokenInformation = {
-    LeftColumn:int;
-    RightColumn:int;
-    ColorClass:TokenColorKind;
-    CharClass:TokenCharKind;
-    TriggerClass:TriggerClass;
-    Tag:int
-    TokenName:string }
-
-//----------------------------------------------------------------------------
-// Flags
-//--------------------------------------------------------------------------
-
-module Flags = 
-#if DEBUG
-    let loggingTypes             = System.Environment.GetEnvironmentVariable("mFSharp_Logging")
-    let logging                  = not (String.IsNullOrEmpty(loggingTypes))
-    let initialLoggingGUITypes   = loggingTypes
-    let loggingGUI               = not (String.IsNullOrEmpty(System.Environment.GetEnvironmentVariable("mFSharp_LogToWinForm")))
-    let loggingStdOut            = not (String.IsNullOrEmpty(System.Environment.GetEnvironmentVariable("mFSharp_LogToStdOut")))
-#else
-    let loggingTypes             = ""
-    let logging                  = false
-    let initialLoggingGUITypes   = ""
-    let loggingGUI               = false
-    let loggingStdOut            = false
-#endif
-    let _ = 
-        if logging && not loggingGUI  && not loggingStdOut then  
-            let logFile = ("c:\\fsharp\\log-m"^System.AppDomain.CurrentDomain.FriendlyName^".log") 
-            let traceFile = ("c:\\fsharp\\trace-m"^System.AppDomain.CurrentDomain.FriendlyName^".txt") 
-            try
-                let log = (File.CreateText logFile  :> TextWriter)
-                setDiagnosticsChannel(Some(log));
-                progress := true;
-            with e->
-                // Don't kill the language service just because we couldn't log.
-                ()
-            if logging then 
-                dprintf "Opened log file %s for ML, config follows\n" logFile
-                dprintf "logging types = %s\n" loggingTypes
-            Trace.Log <- loggingTypes
-            Trace.Out <- new StreamWriter(traceFile,append=false,encoding=System.Text.Encoding.UTF8)
-        elif loggingStdOut then 
-            Trace.Log <- initialLoggingGUITypes
-            Trace.Out <- System.Console.Out
-        elif loggingGUI then 
-            let f = new System.Windows.Forms.Form(Visible=true,TopMost=true,Width=600,Height=600)
-            let rb = new System.Windows.Forms.RichTextBox(Dock=System.Windows.Forms.DockStyle.Fill, Font=new System.Drawing.Font("courier new",8.0f))
-            f.Controls.Add(rb)
-            rb.DoubleClick.Add(fun _ -> rb.Clear())
-            let lab = new System.Windows.Forms.Label(Dock=System.Windows.Forms.DockStyle.Top, Font=new System.Drawing.Font("courier new",8.0f))
-            f.Controls.Add(lab)
-            let tb = new System.Windows.Forms.TextBox(Text=initialLoggingGUITypes,Height=10,Multiline=false,Dock=System.Windows.Forms.DockStyle.Top, Font=new System.Drawing.Font("courier new",8.0f))
-            f.Controls.Add(tb)
-            tb.TextChanged.Add (fun ev -> Trace.Log <- tb.Text) 
-            
-            let log = 
-                let addTextOnGuiThread text = 
-                    if not rb.IsDisposed then 
-                        rb.AppendText(text); 
-                        if text.Contains "\n" then 
-                            rb.ScrollToCaret();
-                            if rb.TextLength > 20000 then 
-                               let s = rb.Text
-                               rb.Text <- s.[s.Length - 15000..s.Length-1]
-                let addText text = 
-                    if f.InvokeRequired then 
-                        f.BeginInvoke(new System.Windows.Forms.MethodInvoker(fun () -> addTextOnGuiThread text)) |> ignore
-                    else
-                        addTextOnGuiThread text
-                    
-                { new System.IO.TextWriter() with 
-                      member x.Write(c:char) = addText (string c)
-                      member x.Write(s:string) =  addText  s
-                      member x.Encoding = System.Text.Encoding.Unicode } 
-            setDiagnosticsChannel(Some(log));
-            Trace.Log <- initialLoggingGUITypes
-            Trace.Out <- log
-        else 
-            // Would be nice to leave this at whatever channel was originally assigned.
-            // This currently defeats NUnit's ability to capture logging output.
-            setDiagnosticsChannel(None) (* VS does not support stderr! *)
-
-    /// Reads the flag specifying whether interface generation is enabled in the 'Go To Definition' feature
-    let enableInterfaceGeneration() = !TestHooks.enableFsiGenerationHook
-    //let stripFSharpCoreReferences   = not (String.IsNullOrEmpty(System.Environment.GetEnvironmentVariable("mFSharp_StripFSharpCoreReferences")))
-    let GetEnvInteger e dflt = match System.Environment.GetEnvironmentVariable(e) with null -> dflt | t -> try int t with _ -> dflt
-    let definesCacheSize   = GetEnvInteger "mFSharp_DefinesCacheSize" 5
-    let buildCacheSize   = GetEnvInteger "mFSharp_BuildCacheSize" 3
-    let recentForgroundTypeCheckLookupSize = GetEnvInteger "mFSharp_RecentForegroundTypeCheckCacheSize" 5
-    let braceMatchCacheSize = GetEnvInteger "mFSharp_BraceMatchCacheSize" 5
-    let getDataTipTextCache = GetEnvInteger "mFSharp_GetDataTipTextCache" 20
-    let maxErrorsOutOfProjectContext = GetEnvInteger "mFSharp_MaxErrorsOutOfProjectContext" 3
-        
-open Flags
-
-
-
-//----------------------------------------------------------------------------
-// Babel flags
-//--------------------------------------------------------------------------
-
-module TokenClassifications = 
-
-    //----------------------------------------------------------------------------
-    //From tokens to flags  
-    //--------------------------------------------------------------------------
-
-    let tokenInfo token = 
-        match token with 
-        | IDENT s
-          -> 
-            if System.Char.ToUpperInvariant s.[0] = s.[0] then
-              (TokenColorKind.UpperIdentifier,TokenCharKind.Identifier,TriggerClass.None)
-            else
-              (TokenColorKind.Identifier,TokenCharKind.Identifier,TriggerClass.None)  
-
-        | DECIMAL _
-        | BIGNUM _ | INT8 _  | UINT8 _ | INT16 _  | UINT16 _ | INT32 _ | UINT32 _ | INT64 _ | UINT64 _ 
-        | UNATIVEINT _ | NATIVEINT _ | IEEE32 _ |  IEEE64 _
-          -> (TokenColorKind.Number,TokenCharKind.Literal,TriggerClass.None)
-
-        | INT32_DOT_DOT _ 
-          // This will color the whole "1.." expression in a 'number' color 
-          // (this isn't entirely correct, but it'll work for now - see bug 3727)
-          -> (TokenColorKind.Number,TokenCharKind.Operator,TriggerClass.None)
-        
-        | INFIX_STAR_DIV_MOD_OP ("mod"  | "land" |  "lor" | "lxor")
-        | INFIX_STAR_STAR_OP ("lsl" | "lsr" | "asr")
-          -> (TokenColorKind.Keyword,TokenCharKind.Keyword,TriggerClass.None)
-
-        | LPAREN_STAR_RPAREN
-        | DOLLAR | INFIX_STAR_STAR_OP _ | INFIX_COMPARE_OP _ | COLON_GREATER  | COLON_COLON  
-        | PERCENT_OP _ | INFIX_AT_HAT_OP _ | INFIX_BAR_OP _ | PLUS_MINUS_OP _ | PREFIX_OP _ | COLON_QMARK_GREATER   
-        | INFIX_STAR_DIV_MOD_OP _ | INFIX_AMP_OP _ | AMP   | AMP_AMP  | BAR_BAR  | LESS   | GREATER  | QMARK   | QMARK_QMARK | COLON_QMARK
-        | DOT_DOT       | QUOTE   | STAR  | HIGH_PRECEDENCE_TYAPP 
-        | COLON    | COLON_EQUALS   | LARROW   | EQUALS | GREATER_DOT | RQUOTE_DOT _
-        | MINUS | ADJACENT_PREFIX_PLUS_MINUS_OP _   | FUNKY_OPERATOR_NAME _
-
-          -> (TokenColorKind.Text,TokenCharKind.Operator,TriggerClass.None)
-
-        | COMMA
-          -> (TokenColorKind.Text,TokenCharKind.Delimiter,TriggerClass.None)
-              
-        | DOT 
-          -> (TokenColorKind.Text,TokenCharKind.Delimiter,TriggerClass.MemberSelect)
-              
-        | BAR
-          -> (TokenColorKind.Text,TokenCharKind.Delimiter,TriggerClass.None (* TriggerClass.ChoiceSelect *))
-              
-        | HASH | UNDERSCORE   
-        | SEMICOLON    | SEMICOLON_SEMICOLON
-          -> (TokenColorKind.Text,TokenCharKind.Delimiter,TriggerClass.None)
-              
-        | LPAREN
-          // We need 'ParamStart' to trigger the 'GetDeclarations' method to show param info automatically
-          // this is needed even if we don't use MPF for determining information about params
-          -> (TokenColorKind.Text,TokenCharKind.Delimiter, TriggerClass.ParamStart ||| TriggerClass.MatchBraces)
-              
-        | RPAREN
-          -> (TokenColorKind.Text,TokenCharKind.Delimiter,(* TriggerClass.ParamEnd; ||| *) TriggerClass.MatchBraces )
-              
-        | SPLICE_SYMBOL _ | LBRACK_LESS  | LBRACE_LESS
-          -> (TokenColorKind.Text,TokenCharKind.Delimiter,TriggerClass.None )
-          
-        | LQUOTE _  | LBRACK  | LBRACE | LBRACK_BAR 
-          -> (TokenColorKind.Text,TokenCharKind.Delimiter,TriggerClass.MatchBraces )
-          
-        | GREATER_RBRACE   | GREATER_RBRACK  | GREATER_BAR_RBRACK
-          -> (TokenColorKind.Text,TokenCharKind.Delimiter,TriggerClass.None )
-
-        | RQUOTE _  | RBRACK  | RBRACE | BAR_RBRACK   
-          -> (TokenColorKind.Text,TokenCharKind.Delimiter,TriggerClass.MatchBraces )
-              
-        | PUBLIC | PRIVATE | INTERNAL | BASE
-        | CONSTRAINT | INSTANCE | DELEGATE | INHERIT|CONSTRUCTOR|DEFAULT|OVERRIDE|ABSTRACT|VIRTUAL|CLASS
-        | MEMBER | STATIC | NAMESPACE
-        | ODECLEND | OBLOCKSEP | OEND | OBLOCKBEGIN | ORIGHT_BLOCK_END | OBLOCKEND | OTHEN | OELSE | OLET(_) | OBINDER _ | BINDER _ | ODO | OWITH | OFUNCTION | OFUN | ORESET | ODUMMY _ | DO_BANG | ODO_BANG | YIELD _ | YIELD_BANG  _ | OINTERFACE_MEMBER
-        | ELIF | RARROW | RARROW2 | SIG | STRUCT 
-        | UPCAST   | DOWNCAST   | NULL   | RESERVED    | MODULE    | AND    | AS   | ASSERT   | ASR
-        | DOWNTO   | EXCEPTION   | FALSE   | FOR   | FUN   | FUNCTION
-        | FINALLY   | LAZY   | MATCH   | METHOD   | MUTABLE   | NEW   | OF    | OPEN   | OR | VOID | EXTERN
-        | INTERFACE | REC   | TO   | TRUE   | TRY   | TYPE   | VAL   | INLINE   | WHEN  | WHILE   | WITH
-        | IF | THEN  | ELSE | DO | DONE | LET(_) | IN (*| NAMESPACE*)
-        | HIGH_PRECEDENCE_APP
-          -> (TokenColorKind.Keyword,TokenCharKind.Keyword,TriggerClass.None)
-              
-        | BEGIN  
-          -> (TokenColorKind.Keyword,TokenCharKind.Keyword,TriggerClass.None)
-
-        | END 
-          -> (TokenColorKind.Keyword,TokenCharKind.Keyword,TriggerClass.None)
-        | HASH_LIGHT _
-        | HASH_LINE _
-        | HASH_IF _
-        | HASH_ELSE _
-        | HASH_ENDIF _ -> 
-            (TokenColorKind.PreprocessorKeyword,TokenCharKind.WhiteSpace,TriggerClass.None)
-        | INACTIVECODE _ -> 
-            (TokenColorKind.InactiveCode,TokenCharKind.WhiteSpace,TriggerClass.None)
-          
-
-        | LEX_FAILURE _
-        | WHITESPACE _ -> 
-            (TokenColorKind.Default,TokenCharKind.WhiteSpace,TriggerClass.None)
-        | COMMENT _ -> 
-            (TokenColorKind.Comment,TokenCharKind.Comment,TriggerClass.None)
-        | LINE_COMMENT _ -> 
-            (TokenColorKind.Comment,TokenCharKind.LineComment,TriggerClass.None)
-        | STRING_TEXT _ -> 
-            (TokenColorKind.String,TokenCharKind.String,TriggerClass.None)
-        | BYTEARRAY _ | STRING  _
-        | CHAR _ (* bug://2863 asks to color 'char' as "string" *)
-          -> (TokenColorKind.String,TokenCharKind.String,TriggerClass.None)
-        | EOF _ -> failwith "tokenInfo"
-
-module TestExpose = 
-  let TokenInfo tok = TokenClassifications.tokenInfo tok
-  
-    //----------------------------------------------------------------------------
-    // Lexer states encoded to/from integers
-    //--------------------------------------------------------------------------
-type LexState = int64
-
-type ColorState =
-    | Token = 1
-    | IfDefSkip = 3
-    | String = 4
-    | Comment = 5
-    | CommentString = 6
-    | CommentVString = 7
-    | CamlOnly = 8
-    | VString = 9
-    | TokenizedComment = 10
-    | EndLineThenSkip = 11
-    | EndLineThenToken = 12
-    
-    | InitialState = 0 
-    
-
-module LexerStateEncoding = 
-
-    let computeNextLexState token (prevLexcont:lexcont) = 
-      match token with 
-      | HASH_LINE s
-      | HASH_LIGHT s
-      | HASH_IF(_, _, s)
-      | HASH_ELSE(_, _, s)
-      | HASH_ENDIF(_, _, s)
-      | INACTIVECODE s
-      | WHITESPACE s  
-      | COMMENT s 
-      | LINE_COMMENT s 
-      | STRING_TEXT s 
-      | EOF s -> s
-      | BYTEARRAY _ | STRING _ -> AT_token(prevLexcont.IfdefStack)
-      | _ -> prevLexcont
-
-    // Note that this will discard all lexcont state, including the ifdefStack.
-    let revert_to_default_lexcont = AT_token []
-
-    let resize32 (i:int32) : LexState = ((int64)i)
-
-    let lexstate_nbits = 4
-    let ncomments_nbits = 2
-    let start_pos_nbits = Range.pos_nbits
-    let hardwhite_nbits = 1
-    let ifdefstack_count_nbits = 4
-    let ifdefstack_nbits = 16           // 0 means if, 1 means else
-    let _ = assert (lexstate_nbits 
-                    + ncomments_nbits 
-                    + start_pos_nbits 
-                    + hardwhite_nbits 
-                    + ifdefstack_count_nbits 
-                    + ifdefstack_nbits <= 64)
-
-    let lexstate_start          = 0
-    let ncomments_start         = lexstate_nbits
-    let start_pos_start         = lexstate_nbits+ncomments_nbits
-    let hardwhite_pos_start     = lexstate_nbits+ncomments_nbits+start_pos_nbits
-    let ifdefstack_count_start  = lexstate_nbits+ncomments_nbits+start_pos_nbits+hardwhite_nbits
-    let ifdefstack_start        = lexstate_nbits+ncomments_nbits+start_pos_nbits+hardwhite_nbits+ifdefstack_count_nbits
-    
-    let lexstate_mask           = Bits.mask64 lexstate_start lexstate_nbits
-    let ncomments_mask          = Bits.mask64 ncomments_start ncomments_nbits
-    let start_pos_mask          = Bits.mask64 start_pos_start start_pos_nbits
-    let hardwhite_pos_mask      = Bits.mask64 hardwhite_pos_start hardwhite_nbits
-    let ifdefstack_count_mask   = Bits.mask64 ifdefstack_count_start ifdefstack_count_nbits
-    let ifdefstack_mask         = Bits.mask64 ifdefstack_start ifdefstack_nbits
-
-    let bits_of_bool b = if b then 1 else 0
-    let bool_of_bits n = (n = 1L)
-        
-    let encode_lexcont (colorState:ColorState) ncomments (b:pos) ifdefStack light = 
-        let mutable ifdefStackCount = 0
-        let mutable ifdefStackBits = 0
-        for ifOrElse in ifdefStack do
-            match ifOrElse with 
-                | (IfDefIf,_) -> ()
-                | (IfDefElse,_) -> 
-                    ifdefStackBits <- (ifdefStackBits ||| (1 <<< ifdefStackCount))
-            ifdefStackCount <- ifdefStackCount + 1
-
-        let lexstate = int64 colorState
-        ((lexstate <<< lexstate_start)  &&& lexstate_mask)
-        ||| ((ncomments <<< ncomments_start) &&& ncomments_mask)
-        ||| ((resize32 (bits_of_pos b) <<< start_pos_start) &&& start_pos_mask)
-        ||| ((resize32 (bits_of_bool light) <<< hardwhite_pos_start) &&& hardwhite_pos_mask)
-        ||| ((resize32 ifdefStackCount <<< ifdefstack_count_start) &&& ifdefstack_count_mask)
-        ||| ((resize32 ifdefStackBits <<< ifdefstack_start) &&& ifdefstack_mask)
-    
-    let decode_lexcont (state:LexState) = 
-        let mutable ifDefs = []
-        let ifdefStackCount = (int32) ((state &&& ifdefstack_count_mask) >>> ifdefstack_count_start)
-        if ifdefStackCount>0 then 
-            let ifdefStack = (int32) ((state &&& ifdefstack_mask) >>> ifdefstack_start)
-            for i in 1..ifdefStackCount do
-                let bit = ifdefStackCount-i
-                let mask = 1 <<< bit
-                let ifDef = (if ifdefStack &&& mask = 0 then IfDefIf else IfDefElse)
-                ifDefs<-(ifDef,range0)::ifDefs
-        enum (int32 ((state &&& lexstate_mask)  >>> lexstate_start)),
-        (int32) ((state &&& ncomments_mask) >>> ncomments_start),
-        pos_of_bits ((int32)((state &&& start_pos_mask) >>> start_pos_start)),
-        ifDefs,
-        bool_of_bits ((state &&& hardwhite_pos_mask) >>> hardwhite_pos_start)
-
-    let encode_lexint lightSyntaxStatus (lexcont:lexcont) = 
-        let tag,n1,p1,ifd = 
-            match lexcont with 
-            | AT_token ifd                   -> ColorState.Token,0L,pos0,ifd
-            | AT_ifdef_skip (ifd,n,m)        -> ColorState.IfDefSkip,resize32 n,start_of_range m,ifd
-            | AT_endline(ENDL_skip(ifd,n,m)) -> ColorState.EndLineThenSkip,resize32 n,start_of_range m,ifd
-            | AT_endline(ENDL_token(ifd))    -> ColorState.EndLineThenToken,0L,pos0,ifd
-            | AT_string (ifd,m)              -> ColorState.String,0L,start_of_range m,ifd
-            | AT_comment (ifd,n,m)           -> ColorState.Comment,resize32 n,start_of_range m,ifd
-            | AT_tokenized_comment (ifd,n,m) -> ColorState.TokenizedComment,resize32 n,start_of_range m,ifd
-            | AT_comment_string (ifd,n,m)    -> ColorState.CommentString,resize32 n,start_of_range m,ifd
-            | AT_comment_vstring (ifd,n,m)   -> ColorState.CommentVString,resize32 n,start_of_range m,ifd
-            | AT_camlonly (ifd,m)            -> ColorState.CamlOnly,0L,start_of_range m,ifd
-            | AT_vstring (ifd,m)             -> ColorState.VString,0L,start_of_range m,ifd
-        encode_lexcont tag n1 p1 ifd lightSyntaxStatus
-        
-
-    let decode_lexint (state:LexState) = 
-        let tag,n1,p1,ifd,lightSyntaxStatusInital = decode_lexcont state 
-        let lexcont = 
-            match tag with 
-            |  ColorState.Token -> AT_token ifd
-            |  ColorState.IfDefSkip -> AT_ifdef_skip (ifd,n1,mk_range "file" p1 p1)
-            |  ColorState.String -> AT_string (ifd,mk_range "file" p1 p1)
-            |  ColorState.Comment -> AT_comment (ifd,n1,mk_range "file" p1 p1)
-            |  ColorState.TokenizedComment -> AT_tokenized_comment (ifd,n1,mk_range "file" p1 p1)
-            |  ColorState.CommentString -> AT_comment_string (ifd,n1,mk_range "file" p1 p1)
-            |  ColorState.CommentVString -> AT_comment_vstring (ifd,n1,mk_range "file" p1 p1)
-            |  ColorState.CamlOnly -> AT_camlonly (ifd,mk_range "file" p1 p1)
-            |  ColorState.VString -> AT_vstring (ifd,mk_range "file" p1 p1)
-            |  ColorState.EndLineThenSkip -> AT_endline(ENDL_skip(ifd,n1,mk_range "file" p1 p1))
-            |  ColorState.EndLineThenToken -> AT_endline(ENDL_token(ifd))
-            | _ -> AT_token [] 
-        lightSyntaxStatusInital,lexcont
-
-    let call_lexcont lexcont args skip lexbuf = 
-        let argsWithIfDefs ifd = {args with ifdefStack = ref ifd}
-        match lexcont with 
-        | AT_endline(cont)              -> Lexer.endline cont args skip lexbuf
-        | AT_token ifd                  -> Lexer.token (argsWithIfDefs ifd) skip lexbuf 
-        | AT_ifdef_skip (ifd,n,m)       -> Lexer.ifdef_skip n m (argsWithIfDefs ifd) skip lexbuf 
-                                                                           //v-- What's this magic number for? 
-                                                                           // answer: it's just an initial buffer size. 
-        | AT_string (ifd,m)             -> Lexer.string (Bytes.Bytebuf.create 100,default_string_finish,m,(argsWithIfDefs ifd)) skip lexbuf
-        | AT_comment (ifd,n,m)          -> Lexer.comment(n,m,(argsWithIfDefs ifd)) skip lexbuf
-        | AT_tokenized_comment (ifd,n,m)-> 
-            // The first argument is 'None' because we don't need XML comments when called from VS
-            Lexer.tokenized_comment(None,n,m,(argsWithIfDefs ifd)) skip lexbuf
-        | AT_comment_string (ifd,n,m)   -> Lexer.comment_string n m (argsWithIfDefs ifd) skip lexbuf
-        | AT_comment_vstring (ifd,n,m)  -> Lexer.comment_vstring n m (argsWithIfDefs ifd) skip lexbuf
-        | AT_camlonly (ifd,m)           -> Lexer.camlonly m (argsWithIfDefs ifd) skip lexbuf
-        | AT_vstring (ifd,m)            -> Lexer.vstring (Bytes.Bytebuf.create 100,default_string_finish,m,(argsWithIfDefs ifd)) skip lexbuf
-
-//----------------------------------------------------------------------------
-// Colorization
-//----------------------------------------------------------------------------
-
-// Information beyond just tokens that can be derived by looking at just a single line.
-// For example metacommands like #load.
-type SingleLineTokenState =
-    | BeforeHash = 0
-    | NoFurtherMatchPossible = 1
-
-/// Split a line into tokens and attach information about the tokens. This information is used by Visual Studio.
-[]
-type Tokenizer(text:string, defineConstants : string list, filename : string) = 
-
-    let skip = false   // don't skip whitespace in the lexer 
-    let concreteSyntaxSink = None
-    let lexResourceManager = new Lexhelp.LexResourceManager() 
-    let lexbuf = UnicodeLexing.StringAsLexbuf text
-    
-    let mutable singleLineTokenState = SingleLineTokenState.BeforeHash
-    let fsx = Build.IsScript(filename)
-
-    // ----------------------------------------------------------------------------------
-    // This implements post-processing of #directive tokens - not very elegant, but it works...
-    // We get the whole "   #if IDENT // .. .. " thing as a single token from the lexer,
-    // so we need to split it into tokens that are used by VS for colorization
-    
-    // Stack for tokens that are split during postrpocessing    
-    let mutable tokenStack = new Stack<_>()
-    let delayToken tok = tokenStack.Push(tok)
-
-    // Process: anywhite* #
-    let processDirective (str:string) directiveLength delay cont =
-        let hashIdx = str.IndexOf("#")
-        if (hashIdx <> 0) then delay(WHITESPACE cont, 0, hashIdx - 1)
-        delay(HASH_IF(range0, "", cont), hashIdx, hashIdx + directiveLength)
-        hashIdx + directiveLength + 1
-    
-    // Process: anywhite* ("//" [^'\n''\r']*)?
-    let processWhiteAndComment (str:string) offset delay cont = 
-        let rest = str.Substring(offset, str.Length - offset)
-        let comment = rest.IndexOf('/')
-        let spaceLength = if comment = -1 then rest.Length else comment
-        if (spaceLength > 0) then delay(WHITESPACE cont, offset, offset + spaceLength - 1)
-        if (comment <> -1) then delay(COMMENT(cont), offset + comment, offset + rest.Length - 1)
-    
-    // Split a directive line from lexer into tokens usable in VS
-    let processDirectiveLine ofs f =
-        let delayed = new ResizeArray<_>()
-        f (fun (tok, s, e) -> delayed.Add (tok, s + ofs, e + ofs) )
-        // delay all the tokens and return the remaining one
-        for i = delayed.Count - 1 downto 1 do delayToken delayed.[i]
-        delayed.[0]
-      
-    // Split the following line:
-    //  anywhite* ("#else"|"#endif") anywhite* ("//" [^'\n''\r']*)?
-    let processHashEndElse ofs (str:string) length cont = 
-        processDirectiveLine ofs (fun delay ->
-            // Process: anywhite* "#else"   /   anywhite* "#endif"
-            let offset = processDirective str length delay cont
-            // Process: anywhite* ("//" [^'\n''\r']*)?
-            processWhiteAndComment str offset delay cont )            
-          
-    // Split the following line:
-    //  anywhite* "#if" anywhite+ ident anywhite* ("//" [^'\n''\r']*)?
-    let processHashIfLine ofs (str:string) cont =
-        let ( $? ) n m = if (n < 0) then m else n
-        processDirectiveLine ofs (fun delay ->
-            // Process: anywhite* "#if"
-            let offset = processDirective str 2 delay cont      
-            // Process: anywhite+ ident
-            let rest, spaces = 
-                (let w = str.Substring(offset)
-                 let r = w.TrimStart([| ' '; '\t' |])
-                 r, w.Length - r.Length)      
-            let beforeIdent = offset + spaces      
-            let identLength = rest.IndexOfAny([| '/'; '\t'; ' ' |]) $? rest.Length
-            delay(WHITESPACE cont, offset, beforeIdent - 1)
-            delay(IDENT(rest.Substring(0, identLength)), beforeIdent, beforeIdent + identLength - 1)           
-            // Process: anywhite* ("//" [^'\n''\r']*)?
-            let offset = beforeIdent + identLength
-            processWhiteAndComment str offset delay cont )
-      
-    // ----------------------------------------------------------------------------------
-          
-    // We don't need any error reporting for tokenzier here - 
-    // the errors are reported with the wrong range anyway!
-    let noReportLogger = 
-         { new ErrorLogger with 
-               member x.WarnSink (e:exn) = ()
-               member x.ErrorSink (e:exn) = ()
-               member x.ErrorCount = 0 }
-
-    do resetLexbufPos filename lexbuf 
-    
-    member t.StartNewLine() = 
-        singleLineTokenState <- SingleLineTokenState.BeforeHash
-
-    member x.ScanToken(lexintInitial) : Option * LexState = 
-        // Crack the whitespace syntax flag
-        // Ideally we would explicitly install DiscardErrorsLogger here. However different threads are using the error logger!
-        // Indeed we really have to move to a model where the error logger is passed explicitly everywhere in the codebase.
-        // For the moment we jsut make the default global error logger discard errors.
-        //use unwind = InstallGlobalErrorLogger (fun _ -> DiscardErrorsLogger)
-        let lightSyntaxStatusInital, lexcontInitial = LexerStateEncoding.decode_lexint lexintInitial 
-        let lightSyntaxStatus = LightSyntaxStatus(lightSyntaxStatusInital,false)  
-
-        // Build the arguments to the lexer function
-        let dummySourceDirectoryFun = fun()->"C:\\" // the tokenizer doesn't need the value of __SOURCE_DIRECTORY__, so any value is fine
-        let lexargs = mkLexargs(dummySourceDirectoryFun,filename,defineConstants,lightSyntaxStatus,lexResourceManager, ref [],noReportLogger) 
-
-        let GetTokenWithPosition(lexcontInitial) = 
-            // Column of token
-            let ColumnsOfCurrentToken() = 
-                let leftp = lexbuf.StartPos 
-                let rightp = lexbuf.EndPos 
-                let leftc = leftp.Column 
-                let rightc = if rightp.Line > leftp.Line then text.Length else rightp.Column 
-                let rightc = rightc - 1   
-                leftc,rightc
-
-            // Get the token & position - either from a stack or from the lexer        
-            try 
-                if (tokenStack.Count > 0) then true, tokenStack.Pop()
-                else                    
-                  // Choose which lexer entrypoint to call and call it
-                  let token = LexerStateEncoding.call_lexcont lexcontInitial lexargs skip lexbuf 
-                  let leftc, rightc = ColumnsOfCurrentToken()
-                  
-                  // Splits tokens like ">." into multiple tokens - this duplicates behavior from the 'lexfilter'
-                  // which cannot be (easily) used from the langauge service. The rules here are not always valid,
-                  // because sometimes token shouldn't be split. However it is just for colorization & 
-                  // for VS (which needs to recognize when user types ".") - note, this doesn't show any intellisense
-                  // if you have custom operator (e.g. ">.>", because there won't be any info available)
-                  match token with
-                  | HASH_IF(m, lineStr, cont) when lineStr <> "" ->
-                      false, processHashIfLine (start_col_of_range m) lineStr cont
-                  | HASH_ELSE(m, lineStr, cont) when lineStr <> "" ->
-                      false, processHashEndElse (start_col_of_range m) lineStr 4 cont                  
-                  | HASH_ENDIF(m, lineStr, cont) when lineStr <> "" ->
-                      false, processHashEndElse (start_col_of_range m) lineStr 5 cont
-                  | GREATER_DOT -> 
-                      delayToken(DOT, leftc + 1, rightc)
-                      false, (GREATER, leftc, rightc - 1)
-                  | RQUOTE_DOT (s,raw) -> 
-                      delayToken(DOT, rightc, rightc)
-                      false, (RQUOTE (s,raw), leftc, rightc - 1)
-                  | INFIX_COMPARE_OP (Lexfilter.TyparsCloseOp(greaters,afterOp) as opstr) -> 
-                      match afterOp with
-                      | None -> ()
-                      | Some tok -> delayToken(tok, leftc + greaters.Length, rightc)
-                      for i = greaters.Length - 1 downto 1 do
-                          delayToken(greaters.[i], leftc + i, rightc - opstr.Length + i + 1)
-                      false, (greaters.[0], leftc, rightc - opstr.Length + 1)
-                  | _ -> false, (token, leftc, rightc)
-            with
-            | e -> false, (EOF LexerStateEncoding.revert_to_default_lexcont, 0, 0) // REVIEW: report lex failure here        
-        
-        // Grab a token
-        let isCached, (token, leftc, rightc) = GetTokenWithPosition(lexcontInitial)
-                 
-        // Check for end-of-string and failure
-        let tokenDataOption, lexcontFinal, tokenTag = 
-            match token with 
-            | EOF lexcont -> 
-                // End of text! No more tokens.
-                None,lexcont,0 
-            | LEX_FAILURE s -> 
-                // REVIEW: report this error
-                Trace.PrintLine("Lexing", fun _ -> sprintf "LEX_FAILURE:%s\n" s)
-                None, LexerStateEncoding.revert_to_default_lexcont, 0
-            | _ ->
-                // Get the information about the token
-                let (colorClass,charClass,triggerClass) = TokenClassifications.tokenInfo token 
-                let lexcontFinal = 
-                    // If we're using token from cache, we don't move forward with lexing
-                    if isCached then lexcontInitial else LexerStateEncoding.computeNextLexState token lexcontInitial 
-                let tokenTag = tagOfToken token 
-                let name = (token_to_string token).ToLower(Globalization.CultureInfo.InvariantCulture);
-                let tokenData = {TokenName = name; LeftColumn=leftc; RightColumn=rightc;ColorClass=colorClass;CharClass=charClass;TriggerClass=triggerClass;Tag=tokenTag} 
-                Some(tokenData), lexcontFinal, tokenTag
-                
-        // Get the final lex int and color state                
-        let FinalState(lexcontFinal) = 
-            LexerStateEncoding.encode_lexint lightSyntaxStatus.Status lexcontFinal 
-                
-        // Check for patterns like #-IDENT and see if they look like meta commands for .fsx files. If they do then merge them into a single token.
-        let tokenDataOption,lexintFinal = 
-            let lexintFinal = FinalState(lexcontFinal)
-            match tokenDataOption, singleLineTokenState, tokenTagToTokenId tokenTag with 
-            | Some(tokenData), SingleLineTokenState.BeforeHash, TOKEN_HASH ->
-                // Don't allow further matches.
-                singleLineTokenState <- SingleLineTokenState.NoFurtherMatchPossible
-                // Peek at the next token
-                let isCached, (nextToken, _, rightc) = GetTokenWithPosition(lexcontInitial)
-                match nextToken with 
-                | IDENT possibleMetacommand -> 
-                    match fsx,possibleMetacommand with
-                    // These are for script (.fsx and .fsscript) files.
-                    | true,"r" 
-                    | true,"reference" 
-                    | true,"I" 
-                    | true,"load" 
-                    | true,"time" 
-                    | true,"cd" 
-#if DEBUG
-                    | true,"terms" 
-                    | true,"types" 
-                    | true,"savedll" 
-                    | true,"nosavedll" 
-#endif
-                    | true,"silentCd" 
-                    | true,"q" 
-                    | true,"quit" 
-                    | true,"help" 
-                    // These are for script and non-script
-                    | _,"nowarn" -> 
-                        // Merge both tokens into one.
-                        let lexcontFinal = if (isCached) then lexcontInitial else LexerStateEncoding.computeNextLexState token lexcontInitial 
-                        let tokenTag = tagOfToken token 
-                        let tokenData = {tokenData with RightColumn=rightc;ColorClass=TokenColorKind.PreprocessorKeyword;CharClass=TokenCharKind.Keyword;TriggerClass=TriggerClass.None} 
-                        let lexintFinal = FinalState(lexcontFinal)
-                        Some(tokenData),lexintFinal
-                    | _ -> tokenDataOption,lexintFinal
-                | _ -> tokenDataOption,lexintFinal
-            | _, SingleLineTokenState.BeforeHash, TOKEN_WHITESPACE -> 
-                // Allow leading whitespace.
-                tokenDataOption,lexintFinal
-            | _ -> 
-                singleLineTokenState <- SingleLineTokenState.NoFurtherMatchPossible
-                tokenDataOption,lexintFinal
-            
-        tokenDataOption, lexintFinal
-
-
-
-type Severity = Warning | Error
-
-type ErrorInfo = {
-    StartLine:int
-    EndLine:int
-    StartColumn:int
-    EndColumn:int
-    Severity:Severity
-    Message:string } with 
-    override e.ToString()=
-        sprintf "(%d,%d)-(%d,%d) %s %s" 
-            e.StartLine e.StartColumn e.EndLine e.EndColumn
-            (if e.Severity=Warning then "warning" else "error") 
-            e.Message    
-            
-    /// Decompose a warning or error into parts: position, severity, message
-    static member CreateFromExceptionAndAdjustEof(exn,warn,trim:bool,fallbackRange:range, (linesCount:int, lastLength:int)) = 
-        let r = ErrorInfo.CreateFromException(exn,warn,trim,fallbackRange)
-                
-        // Adjust to make sure that errors reported at Eof are shown at the linesCount        
-        let startline, schange = min (r.StartLine, false) (linesCount, true)
-        let endline,   echange = min (r.EndLine, false)   (linesCount, true)
-        
-        if not (schange || echange) then r
-        else
-            let r = if schange then { r with StartLine = startline; StartColumn = lastLength } else r
-            if echange then { r with EndLine = endline; EndColumn = 1 + lastLength } else r
-
-    /// Decompose a warning or error into parts: position, severity, message
-    static member CreateFromException(exn,warn,trim:bool,fallbackRange:range) = 
-        let adjust p = (line_of_pos p - 1),(col_of_pos p) 
-        let m = match RangeOfError exn with Some m -> m | None -> fallbackRange 
-        let (s1:int),(s2:int) = adjust (start_of_range m)
-        let (s3:int),(s4:int) = adjust (if trim then start_of_range m else end_of_range m);
-        let msg = bufs (fun buf -> OutputException buf exn false)
-        {StartLine=s1; StartColumn=s2; EndLine=s3; EndColumn=s4; Severity=(if warn then Warning else Error); Message=msg}
-        
-    /// Create an error info from individual parts
-    static member CreateFromMessage(severity, message) = 
-        {StartLine=0; StartColumn=0; EndLine=0; EndColumn=0; Severity=severity; Message=message}
-        
-
-/// Use to reset error and warning handlers            
-type ErrorScope() as x = 
-    let mutable errors = [] 
-    static let mutable mostRecentError = None
-
-    let unwind = 
-        InstallGlobalErrorLogger (fun oldLogger -> 
-            { new ErrorLogger with 
-                member x.WarnSink(exn) = 
-                      errors <- ErrorInfo.CreateFromException(exn,true,false,0L):: errors
-                member x.ErrorSink(exn) = 
-                      let err = ErrorInfo.CreateFromException(exn,false,false,0L)
-                      errors <- err :: errors
-                      mostRecentError <- Some(err)
-                member x.ErrorCount = errors.Length })
-        
-    member x.Errors = errors |> List.filter (fun error -> error.Severity = Error)
-    member x.Warnings = errors |> List.filter (fun error -> error.Severity = Warning)
-    member x.ErrorsAndWarnings = errors
-    member x.TryGetFirstErrorText() =
-        match x.Errors with 
-        | error :: rest -> Some(error.Message)
-        | [] -> None
-    
-    interface IDisposable with
-          member d.Dispose() = 
-              unwind.Dispose()
-
-    static member MostRecentError = mostRecentError
-    
-    static member Protect<'a> (m:range) (f:unit->'a) (err:string->'a) : 'a = 
-        use errorScope = new ErrorScope()
-        let res = 
-            try 
-                Some(f())
-            with e -> errorRecovery e m; None
-        match res with 
-        | Some(res) ->res
-        | None -> 
-            match errorScope.TryGetFirstErrorText() with 
-            | Some text -> err text
-            | None -> err ""
-
-    static member ProtectWithDefault m f dflt = 
-        ErrorScope.Protect m f (fun _ -> dflt)
-
-    static member ProtectAndDiscard m f = 
-        ErrorScope.Protect m f (fun _ -> ())
-
-
-//----------------------------------------------------------------------------
-// Display characteristics of typechecking items
-//--------------------------------------------------------------------------
-
-
-(* First of Pair: text
-  Second of Pair: Option 
-      - if present the text for latter is appended by the VS C++ code because it queries a VS C++ API *)
-type TextWithXmlSig = string * (string * string) option
-
-
-/// Interface that defines methods for comparing objects using partial equality relation
-type IPartialEqualityComparer<'a> = 
-    inherit IEqualityComparer<'a>
-    /// Can the specified object be tested for equality?
-    abstract InEqualityRelation : 'a -> bool
-
-
-type iDeclarationSet = int
-
-module ItemDescriptions = 
-
-    // Hardwired constants from older versions of Visual Studio. These constants were used with Babel and VS internals.
-    let iIconGroupClass = 0x0000
-    let iIconGroupConstant = 0x0001
-    let iIconGroupDelegate = 0x0002 
-    let iIconGroupEnum = 0x0003
-    let iIconGroupEnumMember = 0x0004
-    let iIconGroupEvent = 0x0005
-    let iIconGroupException = 0x0006
-    let iIconGroupFieldBlue = 0x0007
-    let iIconGroupInterface = 0x0008 // Absolute = 48
-    let iIconGroupTextLine = 0x0009
-    let iIconGroupScript = 0x000a
-    let iIconGroupScript2 = 0x000b
-    let iIconGroupMethod = 0x000c
-    let iIconGroupMethod2 = 0x000d
-    let iIconGroupModule = 0x000e
-    let iIconGroupNameSpace = 0x000f // Absolute = 90
-    let iIconGroupFormula = 0x0010
-    let iIconGroupProperty = 0x00011
-    let iIconGroupStruct = 0x00012
-    let iIconGroupTemplate = 0x00013
-    let iIconGroupTypedef = 0x00014
-    let iIconGroupType = 0x00015
-    let iIconGroupUnion = 0x00016
-    let iIconGroupVariable = 0x00017
-    let iIconGroupValueType = 0x00018 // Absolute = 144
-    let iIconGroupIntrinsic = 0x00019
-    let iIconGroupError = 0x0001f
-    let iIconGroupFieldYellow = 0x0020
-    let iIconGroupMisc1 = 0x00021
-    let iIconGroupMisc2 = 0x0022
-    let iIconGroupMisc3 = 0x00023
-
-    let iIconItemPublic = 0x0000
-    let iIconItemInternal = 0x0001
-    let iIconItemSpecial = 0x0002
-    let iIconItemProtected = 0x0003
-    let iIconItemPrivate = 0x0004
-    let iIconItemShortCut = 0x0005
-    let iIconItemNormal  = iIconItemPublic
-
-    let iIconBlackBox = 162
-    let iIconLibrary = 163
-    let iIconProgram = 164
-    let iIconWebProgram = 165
-    let iIconProgramEmpty = 166
-    let iIconWebProgramEmpty = 167
-
-    let iIconComponents = 168
-    let iIconEnvironment = 169
-    let iIconWindow = 170
-    let iIconFolderOpen = 171
-    let iIconFolder = 172
-    let iIconArrowRight = 173
-
-    let iIconAmbigious = 174
-    let iIconShadowClass = 175
-    let iIconShadowMethodPrivate = 176
-    let iIconShadowMethodProtected = 177
-    let iIconShadowMethod = 178
-    let iIconInCompleteSource = 179
-
-    let is_function g typ =
-      let tps,tau = try_dest_forall_typ g typ
-      is_fun_typ g tau 
-
-    let boutput_xmldoc os (XmlDoc s) = 
-      match s with 
-      | [| |] -> ()
-      | l -> 
-          bprintf os "\n"; 
-          l |> Array.iter (fun (s:string) -> 
-             
-             // Bug FSharp1.0:3232: replace some common XmlDoc characters
-             let s = s.Replace("","").Replace("","").Replace("<","<").Replace(">",">").Replace("&","&")
-             
-             bprintf os "\n%s" s) 
-     
-    let boutput_fullname ppF fnF os r = 
-        match ppF r with 
-        | None -> ()
-        | Some _ -> bprintf os "\n\nFull name: %s" (fnF r)
-          
-    // Format the supertypes and other useful information about a type to a buffer
-    let OutputUsefulTypeInfo (infoReader:InfoReader) m denv os ty = 
-        let g = infoReader.g
-        let amap = infoReader.amap
-        let GetSuperTypes() =
-            let supertypes = AllSuperTypesOfType g amap m ty
-            let supertypes = supertypes |> List.filter (AccessibilityLogic.IsTypeAccessible g AccessibleFromSomewhere) 
-            let supertypes = supertypes |> List.filter (type_equiv g g.obj_ty >> not) 
-            let selfs,supertypes = supertypes |> List.partition (type_equiv g ty) 
-            let supertypesC,supertypesI = supertypes |> List.partition (is_interface_typ g)
-            let supertypes = selfs @ supertypesC @ supertypesI
-            supertypes
-
-        let ConstructUsefulTypeInfo() =  
-            let supertypes = GetSuperTypes()
-            let supertypeLs,_ = NicePrint.typesAndConstraintsL denv supertypes 
-            if List.length supertypes > 1 then 
-                bprintf os "\n\n";
-                List.zip supertypes supertypeLs |> List.iter (fun (superty,supertyL) -> 
-                    if type_equiv g superty ty then bprintf os "  type: %a\n" bufferL supertyL
-                    elif is_class_typ g superty or is_interface_typ g ty then bprintf os "  inherits: %a\n" bufferL supertyL
-                    else bprintf os "  implements: %a\n" bufferL supertyL)
-                    
-            if is_enum_typ g ty then 
-                bprintf os "\n";
-                infoReader.GetILFieldInfosOfType(None,AccessibleFromEverywhere,m,ty)
-                |> List.filter (fun finfo -> finfo.IsStatic ) 
-                |> List.filter (AccessibilityLogic.IsILFieldInfoAccessible g amap m AccessibleFromSomewhere) 
-                |> List.iter (fun finfo -> 
-                      bprintf os "\nconst %a.%s"  (NicePrint.output_tref denv)  finfo.ILTypeRef finfo.FieldName;
-                      match finfo.LiteralValue with 
-                      | None -> ()
-                      | Some v -> 
-                         try bprintf os " = %s" (Layout.showL ( NicePrint.constL (TypeChecker.TcFieldInit m v) )) 
-                         with _ -> ())                  
-        ErrorScope.ProtectAndDiscard m (fun () -> ConstructUsefulTypeInfo())
-           
-
-    let range_of_pinfo (pinfo:PropInfo) = pinfo.ArbitraryValRef |> Option.map (fun v -> v.Range)
-    let range_of_minfo (minfo:MethInfo) = minfo.ArbitraryValRef |> Option.map (fun v -> v.Range)
-      
-    let range_of_item g isDecl d = 
-        // skip all default generated constructors for structs
-        let (|FilterDefaultStructCtors|) ctors =
-            ctors |> List.filter (function DefaultStructCtor _ -> false | _ -> true)
-
-        match d with
-        | Item_val vref -> Some(if isDecl then vref.Range else vref.DefinitionRange)
-        | Item_ucase(ucr) -> Some(ucr.UnionCase.Range)
-        | Item_apelem(apref) -> Some(apref.ActivePatternVal.Range)
-        | Item_ecref(ecr) -> Some(ecr.Range)
-        | Item_recdfield(rfinfo) -> Some(rfinfo.RecdFieldRef.Range)
-        | Item_event _ | Item_il_field _ -> None
-        | Item_property(_,pinfos) -> (List.hd pinfos) |> range_of_pinfo 
-        | Item_meth_group(_,(minfo :: _)) 
-        | Item_ctor_group(_,FilterDefaultStructCtors(minfo :: _)) -> range_of_minfo minfo
-        | Item_typs(_,(typ :: _)) -> Some((tcref_of_stripped_typ g typ).Range)
-        | Item_modrefs(modref :: _) -> Some(modref.Range)
-        | Item_apres(APInfo(_, _, m),_, _) -> Some(m)
-        | _ -> None
-
-    let ccu_of_item g d = 
-        match d with
-        | Item_val vref -> ccu_of_vref vref 
-        | Item_ucase(ucr) -> ccu_of_tcref ucr.TyconRef
-        | Item_apelem(apref) -> ccu_of_vref apref.ActivePatternVal
-        | Item_ecref(ecr) -> ccu_of_tcref ecr
-        | Item_recdfield(rfinfo) -> ccu_of_tcref rfinfo.RecdFieldRef.TyconRef
-        | Item_event _ | Item_il_field _ -> None
-        | Item_property(_,pinfos) -> (List.hd pinfos).ArbitraryValRef |> Option.bind ccu_of_vref
-        | Item_meth_group(_,(minfo :: _)) 
-        | Item_ctor_group(_,(minfo :: _)) -> minfo.ArbitraryValRef |> Option.bind ccu_of_vref
-        | Item_typs(_,(typ :: _)) -> ccu_of_tcref (tcref_of_stripped_typ g typ)
-        | Item_modrefs(modref :: _) -> ccu_of_tcref modref
-        | _ -> None
-
-    /// Work out the likely source file for an item
-    let filename_of_item g qualProjectDir m h =
-        let file = file_of_range m in 
-        dprintf "file stored in metadata is '%s'\n" file
-        if Filename.is_relative file then 
-            match (ccu_of_item g h) with 
-            | Some ccu -> 
-                
-                // Note: For F# library DLLs, the code in build.ml fixes uo the SourceCodeDirectory (compile_time_working_dir)
-                // to be defaultFSharpBinariesDir\..\lib\, i.e. the location of the source for the 
-                // file in the F# installation location
-                
-                Filename.concat ccu.SourceCodeDirectory file 
-            | None -> 
-                match qualProjectDir with 
-                | None     -> file
-                | Some dir -> Filename.concat dir file 
-         else file
-
-    /// Cut long filenames to make them visually appealing 
-    let cutFileName s = if String.length s > 40 then String.sub s 0 10 ^ "..."^String.sub s (String.length s - 27) 27 else s
-
-    /// Output where an item is defined
-    let boutput_range_of_item os x =  ()
-(*
-       let mDefnOpt = range_of_item false x
-       let mDeclOpt = range_of_item true x
-       match mDeclOpt with 
-       | None -> () 
-       | Some mDecl ->
-         let filenameDecl = filename_of_item None mDecl x |> cutFileName
-         bprintf os "\nDeclared at %s, line %d" filenameDecl (line_of_pos (start_of_range mDecl));
-         match mDefnOpt with 
-         | None -> () 
-         | Some mDefn ->
-           if mDefn <> mDecl then 
-               let filenameDefn = filename_of_item None mDefn x |> cutFileName
-               bprintf os "\nDefined at %s, line %d" filenameDefn (line_of_pos (start_of_range mDefn))
-*)
-
-    /// Output a method info
-    let FormatMemberInfosToBuffer (infoReader:InfoReader) m denv os d minfos = 
-        let g = infoReader.g
-        let amap = infoReader.amap
-        let FormatMethInfoToBuffer_first minfo = 
-            FormatMethInfoToBuffer amap m denv os minfo;
-            boutput_xmldoc os minfo.XmlDoc;
-            boutput_range_of_item os d
-
-        let ConstructMemberInfoText() =
-            if List.length minfos >= 1 then (FormatMethInfoToBuffer_first (List.nth minfos 0));
-            if List.length minfos >= 2 then (bprintf os "\n"; FormatMethInfoToBuffer amap m denv os (List.nth minfos 1));
-            if List.length minfos >= 3 then (bprintf os "\n"; FormatMethInfoToBuffer amap m denv os (List.nth minfos 2));
-            if List.length minfos >= 4 then (bprintf os "\n"; FormatMethInfoToBuffer amap m denv os (List.nth minfos 3));
-            if List.length minfos >= 5 then (bprintf os "\n"; FormatMethInfoToBuffer amap m denv os (List.nth minfos 4));
-            if List.length minfos >= 6 then (bprintf os "\n"; bprintf os "and %d other overloads" (List.length minfos - 5))
-
-        match !TestHooks.ConstructMemberInfoText with 
-        | Some(hook) -> hook(ConstructMemberInfoText)
-        | None -> ConstructMemberInfoText()
-        
-    let pubpath_of_vref         (v:ValRef) = v.PublicPath        
-    let pubpath_of_tcref        (x:TyconRef) = x.PublicPath
-
-
-    // Wrapper type for use by the 'partial_distinct_by' function
-    type WrapType<'a> = Wrap of 'a
-    
-    // Like Seq.distinct_by but only filters out duplicates for some of the elements
-    let partial_distinct_by (per:IPartialEqualityComparer<_>) seq =
-        // Wrap a Wrap(_) aroud all keys in case the key type is itself a type using null as a representation
-        let dict = new Dictionary<'a WrapType,obj>(per)
-        seq |> List.filter (fun v -> 
-            let v = Wrap(v)
-            if (per.InEqualityRelation(v)) then 
-                if dict.ContainsKey(v) then false else (dict.[v] <- null; true)
-            else true)
-
-
-    /// Specifies functions for comparing 'NamedItem' objects with respect to the user 
-    /// (this means that some values that are not technically equal are treated as equal 
-    ///  if this is what we want to show to the user, because we're comparing just the name
-    //   for some cases e.g. when using 'full_display_text_of_modref')
-    let ItemDisplayPartialEquality g = 
-      { new IPartialEqualityComparer<_> with   
-          member x.InEqualityRelation item = 
-              match item  with 
-              | Wrap(Item_typs(_,[_])) -> true
-              | Wrap(Item_il_field(ILFieldInfo(_, _))) -> true
-              | Wrap(Item_recdfield(_)) -> true
-              | Wrap(Item_prop_name(_)) -> true
-              | Wrap(Item_modrefs(_ :: _)) -> true
-              | Wrap(Item_meth_group(_, _)) -> true
-              | Wrap(Item_val(_)) -> true
-              | Wrap(Item_apelem(APElemRef(apinfo, vref, idx))) -> true
-              | Wrap(Item_delegate_ctor(_)) -> true
-              | Wrap(Item_ucase(_)) -> true
-              | Wrap(Item_ecref(_)) -> true              
-              | Wrap(Item_event(_)) -> true
-              | Wrap(Item_property(_)) -> true
-              | _ -> false
-              
-          member x.Equals(item1, item2) = 
-              let equalTypes(ty1, ty2) =
-                  if is_stripped_tyapp_typ g ty1 && is_stripped_tyapp_typ g ty2 then tcref_eq g (tcref_of_stripped_typ g ty1) (tcref_of_stripped_typ g ty2) 
-                  else type_equiv g ty1 ty2
-              match item1,item2 with 
-              | Wrap(Item_delegate_ctor(ty1)), Wrap(Item_delegate_ctor(ty2)) -> equalTypes(ty1, ty2)
-              | Wrap(Item_typs(dn1,[ty1])), Wrap(Item_typs(dn2,[ty2])) -> 
-                  // Bug 4403: We need to compare names as well, because 'int' and 'Int32' are physically the same type, but we want to show both
-                  dn1 = dn2 && equalTypes(ty1, ty2) 
-              | Wrap(Item_ecref(tcref1)), Wrap(Item_ecref(tcref2)) -> tcref_eq g tcref1 tcref2
-              | Wrap(Item_il_field(ILFieldInfo(_, fld1))), Wrap(Item_il_field(ILFieldInfo(_, fld2))) -> 
-                  fld1 === fld2 // reference equality on the object identity of the AbstractIL metadata blobs for the fields
-              | Wrap(Item_modrefs(modref1 :: _)), Wrap(Item_modrefs(modref2 :: _)) -> full_display_text_of_modref modref1 = full_display_text_of_modref modref2
-              | Wrap(Item_prop_name(id1)), Wrap(Item_prop_name(id2)) -> (id1.idRange, id1.idText) = (id2.idRange, id2.idText)
-              | Wrap(Item_meth_group(_, meths1)), Wrap(Item_meth_group(_, meths2)) -> 
-                  Seq.zip meths1 meths2 |> Seq.forall (fun (m1, m2) ->
-                    Infos.MethInfosUseIdenticalDefinitions () m1 m2)
-              | Wrap(Item_val(vref1)), Wrap(Item_val(vref2)) -> g.vref_eq vref1 vref2
-              | Wrap(Item_apelem(APElemRef(apinfo1, vref1, idx1))), Wrap(Item_apelem(APElemRef(apinfo2, vref2, idx2))) ->
-                  idx1 = idx2 && g.vref_eq vref1 vref2
-              | Wrap(Item_ucase(UnionCaseInfo(_, ur1))), Wrap(Item_ucase(UnionCaseInfo(_, ur2))) -> g.ucref_eq ur1 ur2
-              | Wrap(Item_recdfield(RecdFieldInfo(_, RFRef(tcref1, n1)))), Wrap(Item_recdfield(RecdFieldInfo(_, RFRef(tcref2, n2)))) -> 
-                  (tcref_eq g tcref1 tcref2) && (n1 = n2) // there is no direct function as in the previous case
-              | Wrap(Item_property(_, pi1s)), Wrap(Item_property(_, pi2s)) -> 
-                  List.zip pi1s pi2s |> List.forall(fun (pi1, pi2) -> Infos.PropInfosUseIdenticalDefinitions pi1 pi2)
-              | Wrap(Item_event(evt1)), Wrap(Item_event(evt2)) -> Infos.EventInfosUseIdenticalDefintions evt1 evt2
-              | _ -> false
-              
-          member x.GetHashCode item =
-              match item with 
-              | Wrap(Item_delegate_ctor(ty)) 
-              | Wrap(Item_typs(_,[ty]))  -> 
-                  if is_stripped_tyapp_typ g ty then hash (tcref_of_stripped_typ g ty).Stamp
-                  else 1010
-              | Wrap(Item_il_field(ILFieldInfo(_, fld))) -> 
-                  fld.GetHashCode()  // hash on the object identity of the AbstractIL metadata blob for the field
-              | Wrap(Item_modrefs(modref :: _)) -> hash (full_display_text_of_modref modref)          
-              | Wrap(Item_prop_name(id)) -> hash (id.idRange, id.idText)
-              | Wrap(Item_meth_group(_, meths)) -> meths |> List.fold (fun st a -> st + (Infos.GetMethInfoHashCode(a))) 0
-              | Wrap(Item_val(vref)) -> hash vref.MangledName
-              | Wrap(Item_apelem(APElemRef(apinfo, vref, idx))) -> hash (vref.MangledName, idx)
-              | Wrap(Item_ecref(tcref)) -> hash tcref.Stamp
-              | Wrap(Item_ucase(UnionCaseInfo(_, UCRef(tcref, n)))) -> hash(tcref.Stamp, n)
-              | Wrap(Item_recdfield(RecdFieldInfo(_, RFRef(tcref, n)))) -> hash(tcref.Stamp, n)
-              | Wrap(Item_event(evt)) -> Infos.GetEventInfoHashCode(evt)
-              | Wrap(Item_property(name, pis)) -> hash (pis |> List.map Infos.GetPropInfoHashCode)
-              | _ -> failwith "unreachable" }
-    
-    let getPartialStructuralComparerBy f = 
-        let hid = HashIdentity.Structural
-        { new IPartialEqualityComparer<_> with
-            member x.InEqualityRelation (Wrap(item)) = f(item) |> Option.is_some
-            member x.Equals(Wrap(item1), Wrap(item2)) = hid.Equals(item1, item2)
-            member x.GetHashCode(Wrap(item)) = hid.GetHashCode(item) }
-    
-    // Remove items containing the same module references, where f projects out the module reference
-    let RemoveDuplicateModuleRefs f xs  = 
-        xs |> partial_distinct_by (getPartialStructuralComparerBy (f >> Option.map full_display_text_of_modref))
-
-    /// Remove all duplicate items
-    let RemoveDuplicateItems g items = partial_distinct_by (ItemDisplayPartialEquality g) items
-
-    /// Filter types that are explicitly suppressed from the IntelliSense (such as uppercase "FSharpList", "Option", etc.)
-    let RemoveExplicitlySuppressed g items = 
-      items |> List.filter (function
-        | Item_typs(it, [ty]) -> g.suppressed_types |> List.forall (fun supp -> 
-            if is_stripped_tyapp_typ g ty then 
-              // check if they are the same logical type (after removing all abbreviations)
-              let tcr1 = tcref_of_stripped_typ g ty
-              let tcr2 = tcref_of_stripped_typ g (snd(generalize_tcref supp) ) 
-              not(tcref_eq g tcr1 tcr2 && 
-                  // check the display name is precisely the one we're suppressing
-                  it = supp.DisplayName)
-            else true ) 
-        | _ -> true )
-    
-    let SimplerDisplayEnv denv = { denv with suppressInlineKeyword=true; shortConstraints=true; showConstraintTyparAnnotations=false; abbreviateAdditionalConstraints=false }
-
-    /// Output a the description of a language item
-    let FormatItemDescriptionToBuffer (infoReader:InfoReader) m denv os d = 
-        let g = infoReader.g
-        let amap = infoReader.amap
-        let denv = SimplerDisplayEnv denv
-        match d with
-        | Item_val v -> 
-             bprintf os "%a%a%a" 
-                 (NicePrint.output_qualified_val_spec denv) (deref_val v) 
-                 boutput_xmldoc  v.XmlDoc 
-                 (boutput_fullname pubpath_of_vref full_display_text_of_vref) v;
-
-             // adjust the type in case this is the 'this' pointer stored in a reference cell
-             let ty = if v.BaseOrThisInfo = CtorThisVal && is_refcell_ty g v.Type then dest_refcell_ty g v.Type else v.Type
-
-             OutputUsefulTypeInfo infoReader m denv os ty;
-             boutput_range_of_item os d
-        // Union tags (constructors)
-        | Item_ucase(ucr) -> 
-            let uc = ucr.UnionCase 
-            let rty =snd(generalize_tcref ucr.TyconRef) 
-            let recd = uc.RecdFields 
-            let ty = if recd = [] then rty else (mk_tupled_ty g (recd |> List.map (fun rfld -> rfld.FormalType))) --> rty 
-            bprintf os "union case %a.%s: %a%a" 
-                (NicePrint.output_tcref denv) ucr.TyconRef
-                (DecompileOpName uc.ucase_id.idText) 
-                (NicePrint.output_typ denv) ty 
-                boutput_xmldoc uc.ucase_xmldoc;
-             boutput_range_of_item os d 
-
-        // Active pattern tag inside the declaration (result)             
-        | Item_apres(APInfo(_, items, _), ty, idx) ->
-            bprintf os "active pattern result %s: %a" (List.nth items idx) (NicePrint.output_typ denv) ty
-            
-        // Active pattern tags 
-        | Item_apelem(apref) -> 
-            
-            let v = apref.ActivePatternVal
-            let tps,tau = v.TypeScheme
-            let args,res = strip_fun_typ g tau
-            let apinfo = the (apinfo_of_vref v)
-            let apnames = names_of_apinfo apinfo
-            let aparity = List.length apnames
-            
-            let rty = if aparity <= 1 then res else List.nth (tinst_of_stripped_typ g res) apref.CaseIndex
-            let ty =  mk_iterated_fun_ty args rty
-            
-            // Format the type parameters to get e.g. ('a -> 'a) rather than ('?1234 -> '?1234)
-            let tps,tau = v.TypeScheme
-            let tprenaming,ptau,cxs = PrettyTypes.PrettifyTypes1 denv.g tau
-            let ptps = 
-              tps  
-                |> generalize_typars 
-                |> List.map (InstType tprenaming)
-                |> List.filter (is_anypar_typ denv.g) 
-                |> List.map (dest_anypar_typ denv.g)
-
-            bprintf os "active recognizer %s: %a%a%a" 
-                (name_of_apref apref)
-                (NicePrint.output_typ denv) ptau 
-                boutput_xmldoc v.XmlDoc 
-                (boutput_fullname pubpath_of_vref full_display_text_of_vref) v
-        // F# exception names
-        | Item_ecref(ecref: TyconRef) -> 
-            bprintf os "%a%a%a" (NicePrint.output_exnc denv) (deref_tycon ecref)
-              boutput_xmldoc   ecref.XmlDoc
-              (boutput_fullname pubpath_of_tcref full_display_text_of_ecref) ecref;
-            boutput_range_of_item os d
-
-        // F# record field names
-        | Item_recdfield(rfinfo) ->
-            let f = rfinfo.RecdField
-            let _,ty,tpcs = PrettyTypes.PrettifyTypes1 g rfinfo.FieldType
-            bprintf os "%a.%s: %a"  
-                (NicePrint.output_tcref denv) rfinfo.TyconRef
-                (DecompileOpName f.Name) 
-                (NicePrint.output_typ denv) ty;
-            match rfinfo.LiteralValue with 
-            | None -> ()
-            | Some lit -> 
-               try bprintf os " = %s" (Layout.showL ( NicePrint.constL lit )) with _ -> ()
-            bprintf os "%a"  
-                boutput_xmldoc f.rfield_xmldoc;
-            boutput_range_of_item os d 
-            
-        // Not used
-        | Item_newdef(id) -> bprintf os "patvar %s" id.idText
-
-        // .NET fields
-        | Item_il_field(finfo) ->
-            bprintf os "field %a.%s" (NicePrint.output_tref denv) finfo.ILTypeRef finfo.FieldName;
-            match finfo.LiteralValue with 
-            | None -> ()
-            | Some v -> 
-               try bprintf os " = %s" (Layout.showL ( NicePrint.constL (TypeChecker.TcFieldInit m v) )) 
-               with _ -> ()
-
-        // .NET events
-        | Item_event(ILEvent(g,ilEventInfo) as einfo) ->
-            let rty = PropTypOfEventInfo infoReader m AccessibleFromSomewhere einfo
-            let _,rty,tpcs = PrettyTypes.PrettifyTypes1 g rty
-            bprintf os "event %a.%s: %a" (NicePrint.output_tref denv) ilEventInfo.TypeRef einfo.EventName
-              (NicePrint.output_typ denv) rty
-
-        // F# and .NET properties
-        | Item_property(_,pinfos) -> 
-            let pinfo = List.hd pinfos 
-            let rty = PropertyTypeOfPropInfo amap m pinfo 
-            let _,rty,tpcs = PrettyTypes.PrettifyTypes1 g rty
-            let ty = if pinfo.IsIndexer then mk_tupled_ty g (List.map snd (ParamNamesAndTypesOfPropInfo amap m pinfo)) --> rty else  rty 
-            bprintf os "property %a.%s: %a%a" 
-                (NicePrint.output_tcref denv) (tcref_of_stripped_typ g pinfo.EnclosingType)
-                pinfo.PropertyName  
-                (NicePrint.output_typ denv) rty
-                boutput_xmldoc  pinfo.XmlDoc;
-            boutput_range_of_item os d
-
-        // F# constructors
-        | Item_ctor_group(_,minfos) -> 
-            FormatMemberInfosToBuffer infoReader m denv os d minfos
-        | Item_meth_group(_,minfos) ->
-            FormatMemberInfosToBuffer infoReader m denv os d minfos
-        
-        // The 'fake' zero-argument constructors of .NET structs 
-        | Item_fake_intf_ctor typ ->
-           let _,typ,tpcs = PrettyTypes.PrettifyTypes1 g typ
-           bprintf os "%a" (NicePrint.output_tcref denv) (tcref_of_stripped_typ g typ)
-        
-        // The 'fake' representation of constructors of .NET delegate types
-        | Item_delegate_ctor delty -> 
-           let _,delty,tpcs = PrettyTypes.PrettifyTypes1 g delty
-           let minfo, argtys,rty,fty = GetSigOfFunctionForDelegate infoReader delty m AccessibleFromSomewhere
-           bprintf os "%a(%a)" (NicePrint.output_tcref denv) (tcref_of_stripped_typ g delty) (NicePrint.output_typ denv) fty;
-           boutput_range_of_item os d
-
-        // Types.
-        | Item_typs(_,((TType_app(tcref,_) as typ):: _)) -> 
-            bprintf os "%a" (NicePrint.output_tycon denv) (deref_tycon tcref);
-            boutput_xmldoc os tcref.XmlDoc;
-            boutput_fullname pubpath_of_tcref full_display_text_of_tcref os tcref;
-            OutputUsefulTypeInfo infoReader m denv os typ;
-            boutput_range_of_item os d
-
-        // F# Modules and namespaces
-        | Item_modrefs((modref :: _) as modrefs) -> 
-            let modrefs = modrefs |> RemoveDuplicateModuleRefs (fun x -> Some(x)) 
-            let definiteNamespace = modrefs |> List.forall (fun modref -> modref.IsNamespace)
-            let kind = 
-                if definiteNamespace then "namespace"
-                elif modrefs |> List.forall (fun modref -> modref.IsModule) then "module"
-                else "namespace/module"
-            bprintf os "%s %s" kind (if definiteNamespace then full_display_text_of_modref modref else demangled_name_of_modref modref)
-            if not definiteNamespace then
-                let namesToAdd = modrefs |> Seq.fold (fun st modref -> 
-                    match full_display_text_of_parent_of_modref modref with 
-                    | Some(txt) -> txt::st | _ -> st) [] |> Seq.mapi (fun i x -> i,x) |> Seq.to_list
-                if namesToAdd <> [] then 
-                    bprintf os "\n"
-                for i, txt in namesToAdd do
-                    bprintf os "\n%s %s" (if i = 0 then "from" else "also from") txt
-                boutput_xmldoc os modref.XmlDoc
-                boutput_range_of_item os d
-
-        // Named parameters
-        | Item_param_name(id) -> 
-            //let _,typ,tpcs = PrettyTypes.PrettifyTypes1 typ
-            bprintf os "argument %s" id.idText; // (NicePrint.output_typ denv) typ
-            
-        | Item_prop_name(id) -> 
-            bprintf os "property %s" id.idText; // (NicePrint.output_typ denv) typ
-            
-        |  _ -> ()
-
-    // Format the return type of an item
-    let FormatItemReturnTypeToBuffer (infoReader:InfoReader) m denv os d = 
-        let g = infoReader.g
-        let amap = infoReader.amap
-        let denv = SimplerDisplayEnv denv
-        match d with
-        | Item_val vref -> 
-            let tps,tau = vref.TypeScheme
-            (* Note: prettify BEFORE we strip to make sure params look the same as types *)
-            if is_fun_typ g tau then 
-              let dtau,rtau = dest_fun_typ g tau
-              let ptausL,tpcsL = NicePrint.typesAndConstraintsL denv [dtau;rtau]
-              let _,prtauL = List.frontAndBack ptausL
-              bprintf os "%a %a" bufferL prtauL bufferL tpcsL
-            else
-              bufferL os (NicePrint.topTypAndConstraintsL denv [] tau) 
-        | Item_ucase(ucr) -> 
-            let uc = ucr.UnionCase
-            let rty =snd(generalize_tcref ucr.TyconRef)
-            bprintf os "%a" (NicePrint.output_typ denv) rty
-        | Item_apelem(apref) -> 
-            let v = apref.ActivePatternVal
-            let tps,tau = v.TypeScheme
-            let args,res = strip_fun_typ g tau
-            let apinfo = the (apinfo_of_vref v)
-            let apnames = names_of_apinfo apinfo
-            let aparity = apnames.Length
-            
-            let rty = if aparity <= 1 then res else List.nth (tinst_of_stripped_typ g res) apref.CaseIndex
-            bprintf os "%a" (NicePrint.output_typ denv) rty
-        | Item_ecref(ecr) -> 
-            bufferL os (NicePrint.topTypAndConstraintsL denv [] g.exn_ty) 
-        | Item_recdfield(rfinfo) ->
-            bufferL os (NicePrint.topTypAndConstraintsL denv [] rfinfo.FieldType);
-        | Item_il_field(finfo) ->
-            bufferL os (NicePrint.topTypAndConstraintsL denv [] (FieldTypeOfILFieldInfo amap m finfo))
-        | Item_event(einfo) ->
-            bufferL os (NicePrint.topTypAndConstraintsL denv [] (PropTypOfEventInfo infoReader m AccessibleFromSomewhere einfo))
-        | Item_property(_,pinfos) -> 
-            let pinfo = List.hd pinfos
-            let rty = PropertyTypeOfPropInfo amap m pinfo
-            bufferL os (NicePrint.topTypAndConstraintsL denv [] rty) 
-        | Item_meth_group(_,(minfo :: _)) 
-        | Item_ctor_group(_,(minfo :: _)) -> 
-            let rty = FSharpReturnTyOfMeth amap m minfo minfo.FormalMethodInst
-            bufferL os (NicePrint.topTypAndConstraintsL denv [] rty) 
-        | Item_fake_intf_ctor typ 
-        | Item_delegate_ctor typ -> 
-           bufferL os (NicePrint.topTypAndConstraintsL denv [] typ) 
-            
-        | _ -> ()
-
-    // Find the name of the metadata file for this external definition 
-    let ftinfo_of_il_tcref (infoReader:InfoReader) m tcref = 
-        let g = infoReader.g
-        match tcref with 
-        | ERef_private _ -> None
-        | ERef_nonlocal nlref -> 
-        match (ccu_of_nlpath (nlpath_of_nlref nlref)).FileName with
-        | None -> None
-        | Some libfile -> 
-        (* Generalize the pinfo to get a formal signature *)
-        let ftctps = tcref.Typars(m)
-        let ftinst = generalize_typars ftctps
-        let ftinfo = tinfo_of_il_typ g (TType_app(tcref,ftinst))
-        Some(libfile,ftctps,ftinfo)
-        
-
-    // This function gets the signature to pass to Visual Studio to use its lookup functions for .NET stuff. 
-    // NOTE: XmlDoc for F# items is added by FormatItemDescriptionToBuffer 
-    let GetXmlDocHelpSigOfItemForLookup (infoReader:InfoReader) m d = 
-        let g = infoReader.g
-        let amap = infoReader.amap
-        match d with
-        | Item_val v -> None
-        | Item_ucase(ucr) -> None
-        | Item_ecref(ecr) -> None
-        | Item_recdfield(rfinfo) -> None
-        | Item_newdef(id) -> None
-        | Item_il_field(ILFieldInfo(tinfo, fdef)) -> 
-             let tcref = tinfo.TyconRef 
-             ftinfo_of_il_tcref infoReader m tcref 
-             |> Option.map (fun (libfile,ftctps,ftinfo) -> 
-                 (libfile,
-                  "F:"^ftinfo.ILTypeRef.FullName^"."^fdef.fdName))
-        | Item_typs(_,((TType_app(tcref,_) as typ) :: _)) -> 
-             // Find the name of the metadata file for this external definition 
-             if tcref.IsILTycon then 
-               ftinfo_of_il_tcref infoReader m tcref 
-               |> Option.map (fun (libfile,ftctps,ftinfo) -> 
-                 (libfile,"T:"^ftinfo.ILTypeRef.FullName))
-             else None
-        | Item_modrefs(modref :: _) -> None
-        | Item_property(_,(pinfo :: _)) -> 
-            match pinfo with 
-            | FSProp _ -> None 
-            | ILProp(g, (ILPropInfo(tinfo,pdef) as ilpinfo)) -> 
-               let tcref = tinfo.TyconRef
-               ftinfo_of_il_tcref infoReader m tcref 
-               |> Option.map (fun (libfile,ftctps,ftinfo) -> 
-                   let filpinfo = ILPropInfo(ftinfo,pdef)
-                   (libfile,
-                    "P:"^ftinfo.ILTypeRef.FullName^"."^pdef.propName^
-                    XmlDocArgsEnc g ftctps (List.map snd (params_of_il_pinfo amap m filpinfo))))
-        | Item_event(ILEvent(g,ilEventInfo) as einfo) ->
-            let tinfo = ilEventInfo.ILTypeInfo 
-            let tcref = tinfo.TyconRef 
-            ftinfo_of_il_tcref infoReader m tcref 
-            |> Option.map (fun (libfile,ftctps,ftinfo) -> 
-                (libfile,
-                 "E:"^ftinfo.ILTypeRef.FullName^"."^einfo.EventName))
-        | Item_meth_group(_,minfos) 
-        | Item_ctor_group(_,minfos) -> 
-            match minfos with 
-            | [] -> None
-            | FSMeth _ :: _ -> None
-            | (ILMeth (g,ILMethInfo(tinfo,isExt,mdef,fmtps)) as minfo) :: _ -> 
-               // REVIEW: this is not right for extension members
-               // Generalize the minfo to get a formal signature 
-               let tcref = tinfo.TyconRef 
-               ftinfo_of_il_tcref infoReader m tcref 
-               |> Option.map (fun (libfile,ftctps,ftinfo) -> 
-                   let filminfo = ILMethInfo(ftinfo,isExt,mdef,fmtps) 
-                   (libfile,
-                    "M:"^tinfo.ILTypeRef.FullName^"."^mdef.mdName^
-                    XmlDocArgsEnc g (ftctps@fmtps) (filminfo.ArgTypes(amap,m,minfo.FormalMethodInst))))
-            | (DefaultStructCtor _ :: _) -> None
-
-        |  _ -> None
-
-    let GetF1Keyword (infoReader:InfoReader) m d : string option = 
-        let g = infoReader.g
-        let amap = infoReader.amap
-        match d with
-        | Item_val v -> None
-        | Item_ucase(ucr) -> None
-        | Item_ecref(ecr) -> None
-        | Item_recdfield(rfinfo) -> None
-        | Item_newdef(id) -> None
-        | Item_il_field(ILFieldInfo(tinfo, fdef)) -> 
-             let tcref = tinfo.TyconRef 
-             ftinfo_of_il_tcref infoReader m tcref 
-             |> Option.map (fun (libfile,ftctps,ftinfo) -> 
-                  (tcref |> ticks_and_argcount_text_of_tcref)^"."^fdef.fdName)
-        | Item_typs(_,((TType_app(tcref,_) as typ) :: _)) -> 
-             Some (ticks_and_argcount_text_of_tcref tcref)
-        | Item_modrefs(modref :: _) -> None
-        | Item_property(_,(pinfo :: _)) -> 
-            match pinfo with 
-            | FSProp _ -> None 
-            | ILProp(g, (ILPropInfo(tinfo,pdef) as ilpinfo)) -> 
-               let tcref = tinfo.TyconRef
-               begin
-                   ftinfo_of_il_tcref infoReader m tcref 
-                   |> Option.map (fun (libfile,ftctps,ftinfo) -> 
-                       let filpinfo = ILPropInfo(ftinfo,pdef)
-                       (tcref |> ticks_and_argcount_text_of_tcref)^"."^pdef.propName)
-               end
-        | Item_event(ILEvent(g,ilEventInfo) as einfo) ->
-            let tinfo = ilEventInfo.ILTypeInfo
-            let tcref = tinfo.TyconRef 
-            ftinfo_of_il_tcref infoReader m tcref 
-            |> Option.map (fun (libfile,ftctps,ftinfo) -> (tcref |> ticks_and_argcount_text_of_tcref)^"."^einfo.EventName)            
-            
-        | Item_ctor_group(_,minfos) ->
-            match minfos with 
-            | [] -> None
-            | FSMeth _ :: _ -> None
-            | (ILMeth (g,ILMethInfo(tinfo,isExt,mdef,fmtps)) as minfo) :: _ -> 
-               let tcref = tinfo.TyconRef 
-               ftinfo_of_il_tcref infoReader m tcref 
-               |> Option.map (fun (libfile,ftctps,ftinfo) -> 
-                   let filminfo = ILMethInfo(ftinfo,isExt,mdef,fmtps) 
-                   //tinfo.ILTypeRef.FullName^".#ctor" // dmilom: spec suggests I need to name it #ctor 
-                   (tcref |> ticks_and_argcount_text_of_tcref)^"."^tcref.DisplayName) // but this is what works
-            | (DefaultStructCtor _ :: _) -> None                    
-            
-        | Item_meth_group(_,minfos) -> 
-            match minfos with 
-            | [] -> None
-            | FSMeth _ :: _ -> None
-            | (ILMeth (g,ILMethInfo(tinfo,isExt,mdef,fmtps)) as minfo) :: _ -> 
-               // REVIEW: this is not right for extension members
-               // Generalize the minfo to get a formal signature 
-               let tcref = tinfo.TyconRef 
-               ftinfo_of_il_tcref infoReader m tcref 
-               |> Option.map (fun (_,ftctps,ftinfo) -> 
-                    let filminfo = ILMethInfo(ftinfo,isExt,mdef,fmtps) 
-                    let nGenericParams = mdef.GenericParams.Length
-                    let paramString = 
-                        if nGenericParams > 0 then "`"^(nGenericParams.ToString()) else ""
-                    (tcref |> ticks_and_argcount_text_of_tcref)^"."^mdef.mdName^paramString)
-                   
-            | (DefaultStructCtor _ :: _) -> None
-
-        |  _ -> None
-
-
-    let FormatDescriptionOfItem (infoReader:InfoReader)  m denv d = 
-        ErrorScope.Protect m 
-            (fun () -> 
-                let g = infoReader.g
-                let amap = infoReader.amap
-                let text,xmlSigToAdd = 
-                    bufs (fun buf -> FormatItemDescriptionToBuffer infoReader m denv buf d), GetXmlDocHelpSigOfItemForLookup infoReader m d
-                if verbose then xmlSigToAdd |> Option.iter (fun (lib,sg) -> dprintf "FormatDescriptionOfItem: libOfXmlSigToAdd = %s, xmlSigToAdd = %s\n" lib sg);
-                (text,xmlSigToAdd))
-            (fun err -> err,None)
-        
-    let FormatReturnTypeOfItem (infoReader:InfoReader) m denv d = 
-        ErrorScope.Protect m (fun () -> bufs (fun buf -> FormatItemReturnTypeToBuffer infoReader m denv buf d)) (fun err -> err)
-
-    // Compute the index of the VS glyph shown with an item in the Intellisense menu
-    let GlyphOfItem(denv,d) = 
-
-         /// Find the glyph for the given representation.    
-         let ReprToGlyph(repr) = 
-            match repr with
-            | TFsObjModelRepr om -> 
-                match om.fsobjmodel_kind with 
-                | TTyconClass -> iIconGroupClass
-                | TTyconInterface -> iIconGroupInterface
-                | TTyconStruct -> iIconGroupStruct
-                | TTyconDelegate _ -> iIconGroupDelegate
-                | TTyconEnum _ -> iIconGroupEnum
-            | TRecdRepr _ -> iIconGroupType
-            | TFiniteUnionRepr _ -> iIconGroupUnion
-            | TILObjModelRepr(_,_,{tdKind=kind}) -> 
-                match kind with 
-                | TypeDef_class -> iIconGroupClass
-                | TypeDef_valuetype -> iIconGroupStruct
-                | TypeDef_interface -> iIconGroupInterface
-                | TypeDef_enum -> iIconGroupEnum
-                | TypeDef_delegate -> iIconGroupDelegate
-                | TypeDef_other _ -> iIconGroupTypedef
-            | TAsmRepr _ -> iIconGroupTypedef
-            | TMeasureableRepr _-> iIconGroupTypedef
-         
-         /// Find the glyph for the given type representation.
-         let rec TypToGlyph(typ) = 
-            if is_stripped_tyapp_typ denv.g typ then 
-                let tcref = tcref_of_stripped_typ denv.g typ
-                tcref.TypeReprInfo |> (function None -> iIconGroupClass | Some repr -> ReprToGlyph repr)
-            elif is_tuple_typ denv.g typ then iIconGroupStruct
-            elif is_function denv.g typ then iIconGroupDelegate
-            elif is_typar_typ denv.g typ then iIconGroupStruct
-            else iIconGroupTypedef
-
-            
-         /// Find the glyph for the given value representation.
-         let ValueToGlyph(typ) = 
-            if is_function denv.g typ then iIconGroupMethod
-            else iIconGroupConstant
-              
-         /// Find the major glyph of the given named item.       
-         let NamedItemToMajorGlyph = function
-              | Item_val(vref) -> ValueToGlyph(vref.Type)
-              | Item_typs(_,typ::_) -> TypToGlyph(strip_tpeqns_and_tcabbrevs denv.g typ)    
-              | Item_ucase _
-              | Item_apelem _ -> iIconGroupEnumMember   
-              | Item_ecref _ -> iIconGroupException   
-              | Item_recdfield _ -> iIconGroupFieldBlue   
-              | Item_il_field _ -> iIconGroupFieldBlue    
-              | Item_event _ -> iIconGroupEvent   
-              | Item_property _ -> iIconGroupProperty   
-              | Item_ctor_group _ 
-              | Item_delegate_ctor _ 
-              | Item_fake_intf_ctor _
-              | Item_meth_group _  -> iIconGroupMethod   
-              | Item_typs _ -> iIconGroupClass   
-              | Item_modrefs(modref::_) -> 
-                    if modref.IsNamespace then iIconGroupNameSpace else iIconGroupModule
-              | Item_param_name _ -> iIconGroupVariable
-              | Item_prop_name _ -> iIconGroupVariable
-              | x -> iIconGroupError   
-
-         /// Find the minor glyph of the given named item.       
-         let NamedItemToMinorGlyph = function
-              | Item_val(vref) when is_function denv.g vref.Type -> iIconItemSpecial
-              | _ -> iIconItemNormal
-
-         (6 * NamedItemToMajorGlyph(d)) + NamedItemToMinorGlyph(d)
-
-     
-    let string_is_prefix_of m n  = String.length n >= String.length m && String.sub n 0 (String.length m) = m
-
-
-
-open ItemDescriptions
-
-//----------------------------------------------------------------------------
-// Scopes etc. for intellisense
-//--------------------------------------------------------------------------
-
-type Names = string list 
-type NamesWithResidue = Names * string 
-
-
-//----------------------------------------------------------------------------
-// Declarations
-//--------------------------------------------------------------------------
-[]
-type TextResult(v: TextWithXmlSig) =
-    member x.TextWithXmlSig = v
-    member x.Text= fst v 
-    member x.XMLFileAndSig = snd v
-          
-/// An intellisense declaration
-[]
-type Declaration(name, description:TextWithXmlSig Lazy.t, glyph:int, syncop:(unit->unit)->unit) =
-    let mutable descriptionText:TextResult option = None
-    member decl.Name = name
-    member decl.DescriptionText = 
-        match descriptionText with
-        | Some(descriptionText) -> descriptionText
-        | None ->
-            // syncop "Synchronous Operation" causes the lambda to execute inside the background compiler.
-            syncop (fun () -> descriptionText<-Some(TextResult(Lazy.force description)))
-            descriptionText.Value
-    member decl.Glyph = glyph      
-      
-/// A table of declarations for Intellisense completion 
-[]
-type Decls(d: Declaration array) = 
-
-    member self.Items = d  
-    
-    member self.Count = 
-        Array.length d
-
-    member self.Name i : string = 
-        d.[i].Name
-
-    member self.Description i : TextWithXmlSig = 
-        ErrorScope.Protect Range.range0 (fun () -> d.[i].DescriptionText.TextWithXmlSig) (fun err -> err, None)
-
-    member self.Glyph i = d.[i].Glyph
-            
-    // Make a 'Declarations' object for a set of selected items
-    static member Create(infoReader:InfoReader,m,denv,items, syncop:(unit->unit)->unit) = 
-        let g = infoReader.g
-        
-        // Remove all duplicates first
-        let items = items |> RemoveDuplicateItems g
-        let items = items |> RemoveExplicitlySuppressed g
-        
-        // Bag by name using multi-maps 
-        let items = items |> List.map (fun d -> DisplayNameOfItem g d, d) 
-        let items = List.foldBack (fun (n,d) acc -> NameMultiMap.add n d  acc) items NameMultiMap.empty 
-
-        // Prefer to show types first - they usually have very useful XmlDocs 
-        let items = items |> NameMap.to_list 
-        let items = 
-            items 
-            |> List.map (fun (nm,bag) -> 
-              nm,
-              bag |> List.sortWith (fun a b -> 
-                match a,b with  
-                | Item_ctor_group _, Item_typs _ -> 1
-                | Item_typs _, Item_ctor_group _ -> -1
-                | _ -> 0))
-              
-        // Sort by name 
-        let items = items |> List.sortBy fst
-        if verbose then dprintf "service.ml: mkDecls: %d found after filtering\n" (List.length items); 
-
-        // Get the descriptions, lazily
-        let getDescription item rest = 
-            lazy (let text,xmlSigToAdd = FormatDescriptionOfItem infoReader m denv item 
-                  let text = System.String.Join("\n-------------\n", Array.of_list (text :: (rest |> List.map (FormatDescriptionOfItem infoReader m denv >> fst))))
-                  text, xmlSigToAdd)
-        
-        let decls = 
-            // Filter out operators
-            let items = items |> List.filter (fun (nm,d) -> not (IsOpName nm) || (is_ap_name nm)) 
-            
-            // Filter out duplicate names
-            items |> List.map (fun (nm,itemsWithSameName) -> 
-                match itemsWithSameName with
-                | [] -> failwith "Unexpected empty bag"
-                | item :: rest -> 
-                    let desc = getDescription item rest 
-                    Declaration(nm,desc,GlyphOfItem(denv,item),syncop))
-                      
-        new Decls(Array.of_list decls)
-
-      
-//----------------------------------------------------------------------------
-// Methods
-//--------------------------------------------------------------------------
-
-
-type Param = 
-    { Name: string;
-      Display: string;
-      Description: string }
-
-/// Format parameters for Intellisense completion
-module Params = 
-    let param_of_typL denv tyL =
-        { Name= "";
-          Display =  Layout.showL tyL;
-          Description = "" }
-
-    let ParamOfRecdField denv f =
-        { Name= "" (* f.rfield_id.idText *) ;
-          Display = NicePrint.pretty_string_of_typ denv f.rfield_type;
-          Description = "" }
-    let ParamOfParamData  denv paramData =
-        { Name= ""; //(match pname with None -> "" | Some pn -> pn);
-          Display = string_of_param_data denv paramData;
-          Description = "" }
-
-    let ParamsOfParamDatas  denv (paramDatas:ParamData list) rty = 
-        let paramPrefixes,paramTypes = 
-            paramDatas 
-            |> List.map (fun (ParamData(_,_,optArgInfo,nmOpt,pty)) -> 
-                let isOptArg = optArgInfo <> NotOptional
-                match nmOpt, isOptArg, try_dest_option_ty denv.g pty with 
-                // Layout an optional argument 
-                | Some(nm), true, Some(pty) -> 
-                    (sprintf "?%s:" nm),  pty
-                // Layout an unnamed argument 
-                | None, _,_ -> 
-                    "", pty;
-                // Layout a named argument 
-                | Some nm,_,_ -> 
-                    (sprintf "%s: " nm),pty)
-            |> List.unzip
-        let paramTypeAndRetLs,_ = NicePrint.typesAndConstraintsL denv (paramTypes@[rty])
-        let paramTypeLs,_ = List.frontAndBack  paramTypeAndRetLs
-        (paramPrefixes,paramTypeLs) ||> List.map2 (fun paramPrefix tyL -> 
-            { Name= ""; 
-              Display = paramPrefix^(showL tyL);
-              Description = "" })
-
-    let ParamsOfTypes denv args rtau = 
-        (*let arg,rtau = dest_fun_typ rtau 
-        let args = try_dest_tuple_typ arg  *)
-        let ptausL,tpcsL = NicePrint.typesAndConstraintsL denv (args@[rtau]) 
-        let argsL,_ = List.frontAndBack ptausL 
-        List.map (param_of_typL denv) argsL
-
-    let ParamsOfItem (infoReader:InfoReader) m denv d = 
-        let g = infoReader.g
-        let amap = infoReader.amap
-        match d with
-        | Item_val vref -> 
-            let tps,tau = vref.TypeScheme
-            if is_fun_typ denv.g tau then 
-                let arg,rtau = dest_fun_typ denv.g tau 
-                let args = try_dest_tuple_typ denv.g arg 
-                ParamsOfTypes denv args rtau
-            else []
-        | Item_ucase(ucr)   -> ucr.UnionCase.RecdFields |> List.map (ParamOfRecdField denv) 
-        | Item_apelem(apref)   -> 
-            let v = apref.ActivePatternVal 
-            let tps,tau = v.TypeScheme
-            let args,res = strip_fun_typ denv.g tau 
-            ParamsOfTypes denv args tau
-        | Item_ecref(ecref)     -> 
-            ecref |> rfields_of_ecref |> List.map (ParamOfRecdField denv) 
-        | Item_property(_,pinfo :: _) -> 
-            let paramDatas = 
-                ParamNamesAndTypesOfPropInfo amap m pinfo  
-                |> List.map (fun (nm,pty) -> ParamData(false,false,NotOptional,nm, pty))
-            
-            let rty = PropertyTypeOfPropInfo amap m pinfo 
-            ParamsOfParamDatas denv paramDatas rty
-        | Item_ctor_group(_,(minfo :: _)) 
-        | Item_meth_group(_,(minfo :: _)) -> 
-            let paramDatas = ParamDatasOfMethInfo amap m minfo minfo.FormalMethodInst |> List.hd
-            let rty = FSharpReturnTyOfMeth amap m minfo minfo.FormalMethodInst 
-            ParamsOfParamDatas denv paramDatas rty
-        | Item_fake_intf_ctor typ -> []
-        | Item_delegate_ctor delty -> 
-            let minfo, argtys,rty,fty = GetSigOfFunctionForDelegate infoReader delty m AccessibleFromSomeFSharpCode
-            ParamsOfParamDatas denv [ParamData(false,false,NotOptional,None, fty)] delty
-        |  _ -> []
-
-
-/// A single method for Intellisense completion
-type Method = 
-    { Description: TextResult; 
-      Type: string;
-      Parameters: Param array }
-
-
-/// A table of methods for Intellisense completion
-[]
-type MethodOverloads( name: string, methods: Method array) = 
-    member x.Name = name
-    member x.Methods = methods
-
-    member meths.Count = 
-        try 
-            methods.Length
-        with | e -> 
-            Trace.PrintLine("CompilerServices", fun _ -> sprintf "Unexpected error (Methods.getCount): %s\n" (e.ToString())); 
-            0
-
-    member meths.Description i : TextResult = 
-        ErrorScope.Protect Range.range0 (fun () -> methods.[i].Description) (fun err -> TextResult((err, None)))
- 
-    member meths.Type i : string = 
-        ErrorScope.ProtectWithDefault Range.range0 (fun () -> methods.[i].Type) ""
-
-    member meths.ParameterCount i = 
-        ErrorScope.ProtectWithDefault Range.range0 (fun () -> methods.[i].Parameters.Length) 0
-
-    member meths.ParameterInfo i j : Param = 
-        ErrorScope.Protect Range.range0 (fun () -> methods.[i].Parameters.[j]) (fun err -> { Name=  "";Display =  "";Description =  err })
-
-    static member Create(infoReader:InfoReader,m,denv,items) = 
-        let g = infoReader.g
-        let amap = infoReader.amap
-        if verbose then dprintf "mkMethods: %d items on input\n" (List.length items); 
-        if items = [] then new MethodOverloads("", [| |]) else
-        let name = DisplayNameOfItem g (List.hd items) 
-        let items = 
-          items |> List.collect (fun item -> 
-               match item with 
-               | Item_meth_group(nm,minfos) -> List.map (fun minfo -> Item_meth_group(nm,[minfo])) minfos 
-               | Item_ctor_group(nm,cinfos) -> List.map (fun minfo -> Item_ctor_group(nm,[minfo])) cinfos 
-               | Item_fake_intf_ctor _
-               | Item_delegate_ctor _ -> [item]
-               | Item_newdef _ 
-               | Item_il_field _ -> []
-               | Item_event _ -> []
-               | Item_recdfield(rfinfo) -> 
-                   if is_function g rfinfo.FieldType then [item] else []
-               | Item_val v -> 
-                   if is_function g v.Type then [item] else []
-               | Item_ucase(ucr) -> 
-                   if not ucr.UnionCase.IsNullary then [item] else []
-               | Item_ecref(ecr) -> 
-                   if rfields_of_ecref ecr |> nonNil then [item] else []
-               | Item_property(_,pinfos) -> 
-                   let pinfo = List.hd pinfos 
-                   let rty = PropertyTypeOfPropInfo amap m pinfo 
-                   if pinfo.IsIndexer then [item] else []
-               | _ -> [])
-
-        if verbose then dprintf "mkMethods: %d items after filtering for methodness\n" (List.length items);         
-
-        let methods = 
-            items |> Array.of_list |> Array.map (fun item -> 
-                { Description= TextResult(FormatDescriptionOfItem infoReader m denv item);
-                  Type= (FormatReturnTypeOfItem infoReader m denv item);
-                  Parameters = Array.of_list (Params.ParamsOfItem infoReader m denv item) })
-
-        new MethodOverloads(name, methods)
-
-//----------------------------------------------------------------------------
-// Scopes. 
-//--------------------------------------------------------------------------
-
-type Position = int * int
-type Range = Position * Position
-                                                                             
-type FindDeclResult = 
-    ///  no identifier at this locn 
-    | IdNotFound    
-    /// no decl info in this buffer at the moment 
-    | NoDeclInfo   
-    /// found declaration; return (position-in-file, name-of-file, names-of-referenced-assemblies)
-    | DeclFound      of Position * string * (string list)
-    /// found declaration but source file doesn't exist; try to generate an .fsi
-    | NeedToGenerate of string * (string -> string) * (string list)
-
-
-/// This type is used to describe what was found during the name resolution.
-/// (Depending on the kind of the items, we may stop processing or continue to find better items)
-[]
-type NameResResult = 
-    | Members of (NamedItem list * DisplayEnv * range)
-    | Cancel of DisplayEnv * range
-    | Empty
-    
-    
-// A scope represents everything we get back from the typecheck of a file.
-// It acts like an in-memory database about the file.
-// It is effectively immutable and not updated: when we re-typecheck we just drop the previous
-// scope object on the floor and make a new one.
-[]
-type Scope(/// Information corresponding to miscellaneous command-line options (--define, etc).
-           sTcConfig: Build.TcConfig,
-           g: Env.TcGlobals,
-           /// AssemblyName -> IL-Module 
-           amap: Import.ImportMap,
-           /// project directory, or directory containing the file that generated this scope if no project directory given 
-           sProjectDir: string ,
-           sFile:string,
-           /// Name resolution environments for every interesting region in the file. These regions may
-           /// overlap, in which case the smallest region applicable should be used.
-           sEnvs: ResizeArray,
-           /// This is a name resolution environment to use if no better match can be found.
-           sFallback:Nameres.NameResolutionEnv,
-           /// Information of exact types found for expressions, that can be to the left of a dot.
-           /// Also for exact name resolutions
-           /// pos -- line and column
-           /// typ - the inferred type for an expression
-           /// NamedItem -- named item
-           /// DisplayEnv -- information about printing. For example, should redundant keywords be hidden?
-           /// NameResolutionEnv -- naming environment--for example, currently open namespaces.
-           /// range -- the starting and ending position      
-           capturedExprTypings: ResizeArray<(pos * typ * DisplayEnv * Nameres.NameResolutionEnv * AccessorDomain * range)>,
-           capturedNameResolutions: ResizeArray<(pos * NamedItem * ItemOccurence * DisplayEnv * Nameres.NameResolutionEnv * AccessorDomain * range)>,
-           capturedReferenceResolutions : AssemblyResolution list,
-           syncop:(unit->unit)->unit) = 
-           
-    // These strings are potentially large and the editor may choose to hold them for a while.
-    // Use this cache to fold together data tip text results that are the same. 
-    // Is not keyed on 'Names' collection because this is invariant for the current position in 
-    // this unchanged file. Keyed on lineStr though to prevent a change to the currently line
-    // being available against a stale scope.
-    let getDataTipTextCache = AgedLookup(recentForgroundTypeCheckLookupSize)
-
-    let infoReader = new InfoReader(g,amap)
-    let ncenv = new NameResolver(g,amap,infoReader,Nameres.FakeInstantiationGenerator)
-    
-    // Visual Studio uses line counts starting at 0, F# uses them starting at 1 
-    let mkPos line idx = mk_pos (line+1) idx 
-
-    /// Find the most precise naming environment for the given line and column
-    let GetBestEnvForPos cursorPos  =
-        
-        let bestSoFar = ref None
-
-        // Find the most deeply nested enclosing scope 
-        sEnvs |> ResizeArray.iter (fun (possm,env,ad) -> 
-            Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "Examining range %s for strict inclusion\n" (string_of_range possm))
-            if range_contains_pos possm cursorPos then
-                match !bestSoFar with 
-                | Some (bestm,_,_) -> 
-                    if range_contains_range bestm possm then 
-                      bestSoFar := Some (possm,env,ad)
-                | None -> 
-                    bestSoFar := Some (possm,env,ad));
-
-        let mostDeeplyNestedEnclosingScope = !bestSoFar 
-        
-        match mostDeeplyNestedEnclosingScope with 
-        | Some (m,env,ad) -> Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "Strict Inclusion found env for range %s\n" (string_of_range m))
-        | None ->Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "Strict Inclusion found no environment, cursorPos = %s\n" (string_of_pos cursorPos))
-        
-        // Look for better subtrees on the r.h.s. of the subtree to the left of where we are 
-        // Should really go all the way down the r.h.s. of the subtree to the left of where we are 
-        // This is all needed when the index is floating free in the area just after the environment we really want to capture 
-        // We guarantee to only refine to a more nested environment.  It may not be strictly  
-        // the right environment, but will alwauys be at least as rich 
-
-        let bestAlmostIncludedSoFar = ref None 
-
-        sEnvs |> ResizeArray.iter (fun (possm,env,ad) -> 
-            if range_before_pos possm cursorPos then 
-                let contained = 
-                    match mostDeeplyNestedEnclosingScope with 
-                    | Some (bestm,_,_) -> range_contains_range bestm possm 
-                    | None -> true 
-                
-                if contained then 
-                    match  !bestAlmostIncludedSoFar with 
-                    | Some (rightm,_,_) -> 
-                        if pos_gt (end_of_range possm) (end_of_range rightm) || 
-                          (pos_eq (end_of_range possm) (end_of_range rightm) && 
-                           pos_gt (start_of_range possm) (start_of_range rightm)) then
-                            bestAlmostIncludedSoFar := Some (possm,env,ad)
-                    | _ -> bestAlmostIncludedSoFar := Some (possm,env,ad));
-
-        let resEnv = 
-            match !bestAlmostIncludedSoFar with 
-            | Some (m,env,ad) -> 
-                Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "Chose refined-rightmost env covering range %s\n" (string_of_range m))
-                env,ad
-            | None -> 
-                match mostDeeplyNestedEnclosingScope with 
-                | Some (m,env,ad) -> 
-                    Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "Chose refined env covering range %s\n" (string_of_range m))
-                    env,ad
-                | None -> 
-                    Trace.PrintLine("CompilerServicesVerbose", fun () -> "Using fallback global env\n")
-                    (sFallback,AccessibleFromSomeFSharpCode)
-        let pm = mk_range sFile cursorPos cursorPos 
-
-        resEnv,pm
-
-    /// The items that come back from ResolveCompletionsInType are a bit
-    /// noisy. Filter a few things out.
-    ///
-    /// e.g. prefer types to constructors for DataTipText 
-    let FilterItemsForCtors filterCtors items = 
-        let items = items |> List.filter (function (Item_ctor_group _) when filterCtors = ResolveTypeNamesToTypeRefs -> false | _ -> true) 
-        items
-        
-    /// Looks at the exact name resolutions that occurred during type checking
-    /// If 'membersByResidue' is specified, we look for members of the item obtained 
-    /// from the name resultion and fitler them by the specified residue (?)
-    let GetPreciseItemsFromNameResolution(line,colAtEndOfNames,membersByResidue,filterCtors) = 
-        let endOfNamesPos = mkPos line colAtEndOfNames
-        Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetPreciseItemsFromNameResolution: line = %d, colAtEndOfNames = %d, endOfNamesPos = %s\n" line colAtEndOfNames (string_of_pos endOfNamesPos))
-
-        let quals = 
-            capturedNameResolutions 
-            |> ResizeArray.filter (fun (pos,_,_,_,_,_,_) -> 
-                Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "Checking position %s = %s\n" (string_of_pos endOfNamesPos) (string_of_pos pos))
-                pos_eq pos endOfNamesPos)
-        Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetPreciseItemsFromNameResolution: Found %d relevant quals\n" quals.Count)
-        
-        let items = quals |> ResizeArray.to_list         
-        
-        // Filter items to show only valid & return Some if there are any
-        let returnItemsOfType items g denv m f =
-          let items = items |> RemoveDuplicateItems g
-          let items = items |> RemoveExplicitlySuppressed g
-          let items = items |> FilterItemsForCtors filterCtors
-          if (items <> []) then
-            Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetPreciseItemsFromNameResolution: Results in %d items!\n" items.Length)
-            f(items, denv, m) 
-          else NameResResult.Empty        
-      
-        match items, membersByResidue with 
-        
-        // If we're looking for members using a residue, we'd expect only
-        // a single item (pick the first one) and we need the residue (which may be "")
-        | (_,Item_typs(_,(typ::_)),_,denv,nenv,ad,m)::_, Some(_) -> 
-            let items = ResolveCompletionsInType ncenv nenv m ad true typ 
-            returnItemsOfType items g denv m NameResResult.Members
-        
-        // Value reference from the name resolution. Primarilly to disallow "let x.$ = 1"
-        // In most of the cases, value references can be obtained from expression typings or from environment,
-        // so we wouldn't have to handle values here. However, if we have something like:
-        //   let varA = "string"
-        //   let varA = if b then 0 else varA.
-        // then the expression typings get confused (thinking 'varA:int'), so we use name resolution even for usual values.
-        
-        | (_, Item_val(vref), occurence, denv, nenv, ad, m)::_, Some(_) ->
-            if (occurence <> ItemOccurence.Use) then 
-              // Return empty list to stop further lookup - for value declarations
-              NameResResult.Cancel(denv, m)
-            else 
-              // If we have any valid items for the value, then return completions for its type now
-              let items = ResolveCompletionsInType ncenv nenv m ad false vref.TauType
-              returnItemsOfType items g denv m NameResResult.Members
-        
-        // No residue, so the items are the full resolution of the name
-        
-        // Grab the first resolution (note the capturedNameResolutions come in in reversed order: latest recorded comes 
-        // first, so this will be the last name resolution recorded for this text in the file. This is used to update the 
-        // resolution for an expression
-        //     new Type
-        // to an Item_ctor_group rather than an Item_typs
-        | (_,_,_,denv,nenv,ad,m) :: _, None -> 
-            Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetPreciseItemsFromNameResolution: No residue, precise results found\n")
-            let items = items |> List.map (fun (_,item,_,_,_,_,_) -> item)
-            let items = items |> RemoveDuplicateItems g
-            let items = items |> RemoveExplicitlySuppressed g
-            NameResResult.Members(items, denv,m)
-        | _ , _ -> NameResResult.Empty
-
-
-    /// Looks at the exact expression types at the position to the left of the 
-    /// residue then the source when it was typechecked.
-    let GetPreciseCompletionListFromExprTypings(line,colAtEndOfNames,filterCtors) = 
-        let endOfExprPos = mkPos line colAtEndOfNames
-        Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetPreciseCompletionListFromExprTypings: line = %d, colAtEndOfNames = %d, endOfExprPos = %s\n" line colAtEndOfNames (string_of_pos endOfExprPos))
-        let quals = 
-            capturedExprTypings 
-            |> ResizeArray.filter (fun (pos,_,_,_,_,_) -> 
-                Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "Checking position %s = %s\n" (string_of_pos endOfExprPos) (string_of_pos pos))
-                pos_eq pos endOfExprPos) 
-            |> ResizeArray.to_list
-        Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetPreciseCompletionListFromExprTypings: Found %d relevant quals\n" quals.Length)
-
-        // Note the capturedExprTypings come in in reversed order (latest recorded comes first).
-        // If expressions overlap we want to find the last one pushed. 
-        // e.g. this happens with expressions of the form 
-        //          (a + b) 
-        // which are really 
-        //          ((+) a) b
-        // but where both applications are marked to be at the same position
-
-        // Heuristic "not (is_fun_typ typ)":
-        // Generally, we prefer qualItems since it is the result of resolving the particular thing we're dotting off of.
-        //
-        // However, qualItems isn't guaranteed to be accurate because it's the result of a type check on possibly incomplete
-        // code. See bug 2584 for example.
-        //
-        // We can do a little better when the thing being dotted is thought to be a function by qualItems. In this case, dotting
-        // the function will just show methods for System.Object anyway so we can return the best named environment instead since
-        // it will also contain the methods for System.Object.
-
-        quals |> List.iter (fun (_,typ,denv,nenv,ad,m)  -> 
-            Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetPreciseCompletionListFromExprTypings: before filter, type '%s', is_typar_ty=%b, IsFromError=%b\n" (showL (typeL typ)) (is_typar_typ g typ) (is_typar_typ g typ && (dest_typar_typ g typ).IsFromError)))
-
-        let quals = 
-            quals |> List.filter (fun (_,typ,denv,nenv,ad,m) -> 
-                not (is_fun_typ denv.g typ) && 
-                not (is_typar_typ denv.g typ && (dest_typar_typ denv.g typ).IsFromError))
-
-        quals |> List.iter (fun (_,typ,denv,nenv,ad,m)  -> 
-            Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetPreciseCompletionListFromExprTypings: after filter, type '%s'\n" (showL (typeL typ))))
-
-        match quals |> List.rev with
-        | (_,typ,denv,nenv,ad,m) :: _  -> 
-            let items = ResolveCompletionsInType ncenv nenv m ad false typ 
-            Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetPreciseCompletionListFromExprTypings: Results in %d items!\n" items.Length)
-            let items = items |> RemoveDuplicateItems g
-            let items = items |> RemoveExplicitlySuppressed g
-            let items = items |> FilterItemsForCtors filterCtors 
-            Some(items,denv,m)
-        | _ -> None
-
-    /// Find items in the best naming environment.
-    let GetEnvironmentLookupResolutions(line,colAtEndOfNamesAndResidue,plid,filterCtors,showObsolete) = 
-        Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetEnvironmentLookupResolutions: line = %d, colAtEndOfNamesAndResidue = %d, plid = %+A, showObsolete = %b\n" line colAtEndOfNamesAndResidue plid showObsolete)
-        let cursorPos = mkPos line colAtEndOfNamesAndResidue
-        let (nenv,ad),m = GetBestEnvForPos cursorPos
-        let items = Nameres.ResolvePartialLongIdent ncenv nenv m ad plid showObsolete
-        let items = items |> RemoveDuplicateItems g 
-        let items = items |> RemoveExplicitlySuppressed g
-        let items = items |> FilterItemsForCtors filterCtors 
-         
-        Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "GetEnvironmentLookupResolutions: found %d item groups by looking up long identifier chain in environment\n" (List.length items))
-        items, nenv.DisplayEnv,m 
-
-
-    /// Resolve a location and/or text to items.
-    //   Three techniques are used
-    //        - look for an exact known name resolution from type checking
-    //        - use the known type of an expression, e.g. (expr).Name, to generate an item list  
-    //        - lookup an entire name in the name resolution environment, e.g. A.B.Name, to generate an item list
-    //
-    // The overall aim is to resolve as accurately as possible based on what we know from type inference
-    
-    let GetDeclItemsForNamesAtPosition(origLongIdentOpt: string list option,residueOpt,line,(lineStr:string),colAtEndOfNamesAndResidue,filterCtors) = 
-        use t = Trace.Call("CompilerServices","GetDeclItemsForNamesAtPosition", fun _->sprintf " plid=%+A residueOpt=%+A line=%d colAtEndOfNames=%d" origLongIdentOpt (residueOpt:option) line colAtEndOfNamesAndResidue)
-                
-        // Try to use the exact results of name resolution during type checking to generate the results
-        // This is based on position (i.e. colAtEndOfNamesAndResidue). This is not used if a residueOpt is given.
-        let nameResItems = 
-            match residueOpt with 
-            | None -> GetPreciseItemsFromNameResolution(line, colAtEndOfNamesAndResidue, None, filterCtors)
-            | Some(residue) when 
-                  (let loc = colAtEndOfNamesAndResidue - residue.Length - 1
-                   loc >= 0 && loc < lineStr.Length && lineStr.[loc] = '.') -> 
-                // for "Foo.B", get location at the end of Foo (or "Foo")
-                let colAtEndOfNames = max 0 (colAtEndOfNamesAndResidue - residue.Length - 1) 
-                GetPreciseItemsFromNameResolution(line, colAtEndOfNames, Some(residue), filterCtors)
-            | _ -> NameResResult.Empty
-        
-        // Normalize to form A.B.C.D where D is the residue. It may be empty for "A.B.C."
-        let plid, residue = 
-            match origLongIdentOpt, residueOpt with
-            | None, _ -> [], ""
-            | Some(origLongIdent), Some(r) -> origLongIdent,r
-            | Some(origLongIdent), None ->
-                assert (nonNil origLongIdent) 
-                List.frontAndBack origLongIdent
-                
-        /// Post-filter items to make sure they have precisely the right name
-        /// This also checks that there are some remaining results 
-        let (|FilterRelevantItems|_|) ((items,denv,m) as orig) =
-
-            // Return only items with the specified name
-            let filterDeclItemsByResidue items = 
-                items |> List.filter (fun item -> 
-                    let n1 =  DisplayNameOfItem g item 
-                    Trace.PrintLine("CompilerServicesVerbose", fun () -> sprintf "\nn1 = <<<%s>>>\nn2 = <<<%s>>>\n" n1 residue)
-                    match item with
-                    | Item_typs _ | Item_ctor_group _ -> residue + "Attribute" = n1 || residue = n1
-                    | _ -> residue = n1 )
-
-            // Are we looking for items with precisely the given name?
-            if origLongIdentOpt <> None && items <> [] && isNone residueOpt then
-                Trace.PrintLine("CompilerServices", fun _ -> sprintf "looking through %d items before filtering by residue\n" (List.length items))       
-                let items = items |> filterDeclItemsByResidue 
-                if nonNil items then Some(items,denv,m) else None        
-            else 
-                // When (items = []) we must returns Some([],..) and not None
-                // because this value is used if we want to stop further processing (e.g. let x.$ = ...)
-                Some(orig)
-
-        match nameResItems with            
-        | NameResResult.Cancel(denv,m) -> Some([], denv, m)
-        | NameResResult.Members(FilterRelevantItems(items)) -> 
-            Trace.PrintLine("CompilerServices", fun _ -> sprintf "GetDeclItemsForNamesAtPosition: lookup based on name resolution results successful, #items = %d, exists ctor = %b\n" (p13 items).Length (items |> p13 |> List.exists (function Item_ctor_group _ -> true | _ -> false)))       
-            Some items
-        | _ ->
-        
-        match origLongIdentOpt with
-        | None -> None
-        | Some(_) -> 
-            Trace.PrintLine("CompilerServices", fun _ -> sprintf "GetDeclItemsForNamesAtPosition: plid = %+A, residue = %+A, colAtEndOfNamesAndResidue = %+A\n" plid residue colAtEndOfNamesAndResidue)       
-
-            // Try to use the type of the expression on the left to help generate a completion list
-            let qualItems = 
-                // we're looking for 'expr.residue'. Drop the residue and the "."
-                if isNil plid then
-                    None
-                else
-                    let colAtEndOfNames = max 0 (colAtEndOfNamesAndResidue - residue.Length - 1) 
-                    GetPreciseCompletionListFromExprTypings(line,colAtEndOfNames,filterCtors)
-
-            match qualItems with            
-            | Some(FilterRelevantItems(items)) 
-                    // Initially we only use the expression typings when looking up, e.g. (expr).Nam or (expr).Name1.Nam
-                    // These come through as a long identifier with plid starting with "". Otherwise we try an environment lookup
-                    // and then return to the qualItems. This is because the expression typings are a little inaccurate, primarily because
-                    // it appears we're getting some typings recorded for non-atomic expressions like "f x"
-                    when (match plid with "" :: _ -> true | _ -> false)  -> 
-                Trace.PrintLine("CompilerServices", fun _ -> sprintf "GetDeclItemsForNamesAtPosition: lookup based on expression typings successful\n")       
-                Some items
-            | _ ->         
-            // Use an environment lookup as the last resort
-            
-            // Do we need to look for obsolete modules & types? 
-            // This will be true when we're after a dot and we want completions in an (otherwise) unseen module.
-            // Note this doesn't mean that we want any unseen things (e.g. private) - only 'Obsolete'!
-            // e.g.:   SomeModuleName.SomeObsoleteModule.<$>   ~> residueOpt = Some("")
-            let showObsolete = residueOpt.IsSome
-            
-            let envItems = GetEnvironmentLookupResolutions(line,colAtEndOfNamesAndResidue-1,plid,filterCtors,showObsolete) // we should check whether the skipped char is '.'
-            match nameResItems, envItems, qualItems with            
-            
-            // First, use unfiltered name resolution items, if they're not empty
-            | NameResResult.Members(items, denv, m), _, _ when items <> [] -> 
-                Trace.PrintLine("CompilerServices", fun _ -> sprintf "GetDeclItemsForNamesAtPosition: lookup based on name resolution results successful, #items = %d, exists ctor = %b\n" (items).Length (items |> List.exists (function Item_ctor_group _ -> true | _ -> false)))       
-                Some(items, denv, m)                
-            
-            // If we have nonempty items from environment that were resolved from a type, then use them... 
-            // (that's better than the next case - here we'd return 'int' as a type)
-            | _, FilterRelevantItems(items, denv, m), _ when items <> [] ->
-                Trace.PrintLine("CompilerServices", fun _ -> sprintf "GetDeclItemsForNamesAtPosition: lookup based on name and environment successful\n")       
-                Some(items, denv, m)
-
-            // Try again with the qualItems
-            | _, _, Some(FilterRelevantItems(items)) ->
-                Some(items)
-                
-            | _ -> None
-
-    member x.GetDeclarations line lineStr colAtEndOfNames (names,residue) : Decls =
-        use t = Trace.Call("CompilerServices","GetDeclarations", fun _->sprintf " line=%+A,colAtEndOfNames=%+A,names=%+A" line colAtEndOfNames names)
-        ErrorScope.Protect 
-            Range.range0 
-            (fun () -> 
-                match GetDeclItemsForNamesAtPosition(Some(names),Some(residue),line,lineStr,colAtEndOfNames,ResolveTypeNamesToTypeRefs) with
-                | None -> Decls [| |]
-                | Some(items,denv,m) -> Decls.Create(infoReader,m,denv,items,syncop))
-            (fun msg -> 
-//#if DEBUG
-                Decls [| Declaration("", (lazy(msg,None)), 0, syncop) |] 
-//#else
-//                Decls [|  |] 
-//#endif
-            )
-    member scope.GetReferenceResolutionDataTipText(line,lineStr,col) : TextWithXmlSig = 
-        let pos = Range.mk_pos (line+1) col
-        let LineIfExists(append) =
-            if not(String.IsNullOrEmpty(append)) then append.Trim([|' '|])+"\n"
-            else ""        
-
-        ErrorScope.Protect 
-            Range.range0 
-            (fun () ->        
-                let matches =
-                    capturedReferenceResolutions 
-                    |> List.filter(fun resolved->(Range.range_contains_pos resolved.originalReference.Range pos) && (resolved.originalReference.Range <> rangeStartup))
-                match matches with 
-                | [resolved] -> 
-                    let tip =                 
-                        match resolved.resolvedFrom with 
-                        | AssemblyFolders ->
-                            LineIfExists(resolved.resolvedPath)
-                            + LineIfExists(resolved.fusionName)
-                            + "Found by AssemblyFolders registry key"
-                        | AssemblyFoldersEx -> 
-                            LineIfExists(resolved.resolvedPath)
-                            + LineIfExists(resolved.fusionName)
-                            + "Found by AssemblyFoldersEx registry key"
-                        | TargetFrameworkDirectory -> 
-                            LineIfExists(resolved.resolvedPath)
-                            + LineIfExists(resolved.fusionName)
-                            + ".NET Framework"
-                        | RawFileName -> 
-                            LineIfExists(resolved.fusionName)
-                        | GlobalAssemblyCache -> 
-                            LineIfExists(resolved.fusionName)
-                            + "Global Assembly Cache\n"
-                            + LineIfExists(resolved.redist)
-                        | Unknown 
-                        | Path _ ->
-                            LineIfExists(resolved.resolvedPath)
-                            + LineIfExists(resolved.fusionName)                        
-                    (tip.TrimEnd([|'\n'|])) ,None  
-                | _::_ -> failwith "Did not expect multiple results"
-                | [] -> "",None)
-            (fun err -> err,None)
-
-    // GetDataTipText: return the "pop up" (or "Quick Info") text given a certain context.
-    member x.GetDataTipText line lineStr colAtEndOfNames names : TextWithXmlSig  = 
-        use t = Trace.Call("CompilerServices","GetDataTipText", fun _->sprintf " line=%+A,idx=%+A,names=%+A" line colAtEndOfNames names)
-        
-        let Compute() = 
-            ErrorScope.Protect 
-                Range.range0 
-                (fun () -> 
-                    match GetDeclItemsForNamesAtPosition(Some(names),None,line,lineStr,colAtEndOfNames,ResolveTypeNamesToTypeRefs) with
-                    | None -> "", None
-                    | Some(items,denv,m) ->
-                        match items with 
-                        | [] ->  "",None
-                        | item :: rest ->
-                            let item,xmlSigToAdd = FormatDescriptionOfItem infoReader m denv item 
-                            let restText =  rest |> List.map (FormatDescriptionOfItem infoReader m denv >> fst) 
-                            // Note: If you change the formatting of ToolTips to not contain "----" when multiple items
-                            // were returned, make sure to change the test "Quickinfo.OnlyClassInfo" and "Quickinfo.AsyncToolTips" as well.
-                            let text =  System.String.Join("\n-------------\n", Array.of_list (item :: restText))
-                            (text,xmlSigToAdd))
-                (fun err -> err,None)
-                
-        // See devdiv bug 646520 for rationale behind truncating and caching these quick infos (they can be big!)
-        let key = line,colAtEndOfNames,lineStr
-        let maxLinesInText = 45
-        match getDataTipTextCache.TryGet(key) with 
-        | Some(res) -> res
-        | None ->
-            let text,xmlSigToAdd = Compute()
-            // Trim it down to a reasonable size if necessary.
-            let lines = text.Split([|'\n'|],maxLinesInText+1) // Need one more than max to determine whether there is truncation.
-            let truncate = lines.Length>maxLinesInText            
-            let lines = lines |> Seq.truncate maxLinesInText 
-            let lines = if truncate then Seq.append lines ["..."] else lines
-            let lines = lines |> Seq.to_array
-            let join = String.Join("\n",lines)
-            let res = (join,xmlSigToAdd)
-            getDataTipTextCache.Put(key,res)
-            res
-            
-
-    member x.GetF1Keyword line lineStr colAtEndOfNames names : string option =
-       use t = Trace.Call("CompilerServices","GetF1Keyword", fun _->sprintf " line=%+A,idx=%+A,names=%+A" line colAtEndOfNames names) 
-       ErrorScope.Protect
-            Range.range0
-            (fun () ->
-                match GetDeclItemsForNamesAtPosition(Some(names),None,line,lineStr,colAtEndOfNames,ResolveTypeNamesToTypeRefs) with
-                | None -> None
-                | Some(items,denv,m) ->
-                    match items with
-                    | [] -> None
-                    | item :: _ ->
-                        GetF1Keyword infoReader (Microsoft.FSharp.Compiler.Range.range0) item                        
-            )    
-            (fun _ -> None)
-                        
-    member scope.GetMethods line lineStr colAtEndOfNames namesOpt : MethodOverloads =
-        ErrorScope.Protect 
-            Range.range0 
-            (fun () -> 
-                use t = Trace.Call("CompilerServices", "GetMethods", fun _ -> sprintf "line = %d, idx = %d, names = %+A" line colAtEndOfNames namesOpt)
-                match GetDeclItemsForNamesAtPosition(namesOpt,None,line,lineStr,colAtEndOfNames,ResolveTypeNamesToCtors) with
-                | None -> MethodOverloads("",[| |])
-                | Some(items,denv,m) -> MethodOverloads.Create(infoReader,m,denv,items))
-            (fun msg -> 
-                MethodOverloads(msg,[| |]))
-
-    member scope.GetDeclarationLocationInternal (forceFsiGeneration : bool)(line : int)(lineStr : string)(idx : int)(names : Names)(tag : tokenId option)(isDecl : bool) : FindDeclResult =
-      // Get the fully-qualified name of a `namedItemInEnv`
-      //
-      // This code relies on the fact that the pretty printing code in tastops.ml has been augmented (in subtle ways) 
-      // to attach "mangled paths" to each item that is pretty printed. These paths
-      // are then attached as attributes to the layout object generated by the pretty printing. A somewhat baroque piece of 
-      // code in FsiGeneration.Renderer (posTrackMappingBuildingR) consumes these attributes during the rendering process
-      // and uses them to build up a dicitonary that tracks the "path --> line number" mapping as the printing proceeds. 
-      // This dictionary is saved. When queried (here), the paths are re-generated using 'fullMangledNameOfItemForFsiGeneration', and 
-      // this path is used as a key into the dictionary. 
-      //
-      // Thus the behaviour of fullMangledNameOfItemForFsiGeneration must patch the mangled path generation during the recursive-decent pretty printing.
-      //
-      // It would be better to get remove these pseudo-unique paths altogether and instead simply
-      // attach the stamp of the item via a (non-string) attribute to the pretty printing layout object and 
-      // do the lookup based on the unique integer stamp. However this would require
-      //    (a) rely on having unique stamps for:
-      //         - each Abstract IL declaration entity (ILTypeDef, ILMethodDef, ILFieldDef etc.)
-      //         - each UnionCase and RecordField declaration entity
-      //        (both would be "Good" to have for other reasons, e.g. get rid of pointer equality on these elements in several places)
-      //    (b) require us to change the attribution object on layouts to "obj" or some other generic type
-      
-      let rec fullMangledNameOfItemForFsiGeneration x =
-          let stringName =
-              match x with
-              | Item_val v                             -> approx_full_mangled_name_of_vref v
-              | Item_ucase (UnionCaseInfo(_,v))        -> approx_full_mangled_name_of_ucref v
-              | Item_ecref v                           -> approx_full_mangled_name_of_ecref v
-              | Item_recdfield (RecdFieldInfo (_, v))  -> approx_full_mangled_name_of_rfref v
-              | Item_typs (_, (TType_app (v, _)) :: _) -> approx_full_mangled_name_of_tcref v
-              | Item_modrefs (v :: _)                  -> approx_full_mangled_name_of_modref v
-              | Item_meth_group (s, meth :: _)         -> 
-                  match meth with // grab just the first overload
-                  | FSMeth (_,_, v)                    -> approx_full_mangled_name_of_vref v
-                  | ILMeth (_,ILMethInfo (t, _, i, _)) -> 
-                      let methName  = i.Name // this is the name only of the method, so we'll have to look up the class's full name also
-                      let className = Item_typs ("", [ t.ToType ]) |> fullMangledNameOfItemForFsiGeneration
-                      className @ [ methName ] |> PrettyNaming.JoinNamesForFsiGenerationPath
-                  | _  -> ""
-              | Item_il_field (ILFieldInfo (ti, fd))   -> 
-                  let className = Item_typs ("", [ ti.ToType ]) |> fullMangledNameOfItemForFsiGeneration
-                  className @ [fd.Name] |> PrettyNaming.JoinNamesForFsiGenerationPath
-              | _                                      -> ""
-          stringName |> PrettyNaming.SplitNamesForFsiGenerationPath |> PrettyNaming.ChopUnshowableInFsiGenerationPath
-
-      match tag with
-      | None // we have to be charitable in this case -- this makes `scope.GetDeclarationLocation` backward-compatible
-      | Some TOKEN_IDENT -> 
-          match GetDeclItemsForNamesAtPosition (Some(names), None, line, lineStr, idx, ResolveTypeNamesToTypeRefs) with
-          | None
-          | Some ([], _, _)         -> FindDeclResult.IdNotFound
-          | Some (h :: _ , denv, m) -> 
-              let h' =
-                  match h with
-                  | Item_meth_group (_, (ILMeth (_,ilinfo)) :: _) // range_of_item, ccu_of_item don't work on IL methods or fields; we'll be okay, though, looking up the method's *type* instead because they've the same CCU / source file
-                  | Item_ctor_group (_, (ILMeth (_,ilinfo)) :: _) ->
-                      let (ILMethInfo (typeInfo,_,_,_)) = ilinfo
-                      Item_typs ("", [ typeInfo.ToType ])
-                  | Item_il_field (ILFieldInfo (typeInfo, _)) -> Item_typs ("", [ typeInfo.ToType ])
-                  | _                                         -> h
-              match range_of_item g isDecl h' with
-              | None   -> FindDeclResult.IdNotFound
-              | Some m -> 
-                  if verbose then dprintf "tcConfig.fsharpBinariesDir = '%s'\n" sTcConfig.fsharpBinariesDir
-
-                  let filename       = filename_of_item g (Some sProjectDir) m h'
-
-                  let resultInFile   = FindDeclResult.DeclFound ((start_line_of_range m - 1, start_col_of_range m), filename, []) // REVIEW: WHAT WAS I THINKING HERE? SINCE I JUST GET THE FILENAME (I.E., NOT THE PROJECT) I'M NOT SURE WHERE I'D FIND THE REF'D ASSEMBLIES FOR A SOURCE FILE
-                  let generateFsi () =
-                      match ccu_of_item g h' with
-                      | Some ccu -> 
-                          match ccu.FileName with
-                          | Some n when enableInterfaceGeneration() -> 
-                              // Generation of source from assembly is currently disabled
-                              // it can be turned on using the 'enableInterfaceGeneration' flag
-                              FindDeclResult.NeedToGenerate (n, Filename.fullpath g.directoryToResolveRelativePaths, fullMangledNameOfItemForFsiGeneration h)
-                          | _ -> FindDeclResult.IdNotFound
-                      | _        -> FindDeclResult.IdNotFound
-
-                  if forceFsiGeneration
-                      then generateFsi ()
-                      else if Internal.Utilities.FileSystem.File.SafeExists filename
-                              then resultInFile
-                              else generateFsi ()
-      | _                -> FindDeclResult.IdNotFound
-
-    member scope.GetDeclarationLocation (line:int)(lineStr:string)(idx:int)(names: Names)(isDecl:bool) : FindDeclResult = scope.GetDeclarationLocationInternal false line lineStr idx names None isDecl
-
-//----------------------------------------------------------------------------
-// Navigation items. 
-//--------------------------------------------------------------------------
-
-/// Represents an item to be displayed in the navigation bar
-[]
-type DeclarationItem(uniqueName : string, name : string, glyph : int, range : range, bodyRange : range, singleTopLevel:bool) = 
-    
-    let range_of_m m = 
-        ((start_col_of_range m, start_line_of_range m),
-         (end_col_of_range m, end_line_of_range m))
-    member x.bodyRange = bodyRange
-    
-    member x.UniqueName = uniqueName
-    member x.Name = name
-    member x.Glyph = glyph
-    member x.Range = range_of_m range
-    member x.BodyRange = range_of_m bodyRange 
-    member x.IsSingleTopLevel = singleTopLevel
-    member x.WithUniqueName(uniqueName : string) =
-      DeclarationItem(uniqueName, name, glyph, range, bodyRange, singleTopLevel)
-    static member Create(name : string, glyph : int, range : range, bodyRange : range, singleTopLevel:bool) = 
-      DeclarationItem("", name, glyph, range, bodyRange, singleTopLevel)
-
-/// Represents top-level declarations (that should be in the type drop-down)
-/// with nested declarations (that can be shown in the member drop-down)
-type TopLevelDeclaration = 
-    { Declaration : DeclarationItem
-      Nested : DeclarationItem[] }
-      
-/// Represents result of 'GetNavigationItems' operation - this contains
-/// all the members and currently selected indices. First level correspond to
-/// types & modules and second level are methods etc.
-[]
-type NavigationItems(declarations:TopLevelDeclaration[]) =
-    member x.Declarations = declarations
-   
-//----------------------------------------------------------------------------
-// Untyped scope
-//----------------------------------------------------------------------------
-
-type UntypedParseResults = 
-  { // Error infos
-    Errors : ErrorInfo array
-    // Untyped AST
-    Input : input option
-    // Do not report errors from the type checker
-    StopErrorReporting : bool
-    /// When these files change then the build is invalid
-    DependencyFiles : string list
-    }
-
-/// 
-[]
-type UntypedParseInfo(parsed:UntypedParseResults, syncop:(unit -> unit) -> unit) = 
-
-    let union_ranges_checked r1 r2 = if r1 = 0L then r2 elif r2 = 0L then r1 else union_ranges r1 r2
-    
-    let range_of_decls' f decls = 
-      match (decls |> List.map (f >> (fun (d:DeclarationItem) -> d.bodyRange))) with 
-      | hd::tl -> tl |> List.fold (union_ranges_checked) hd
-      | [] -> 0L
-    
-    let range_of_decls = range_of_decls' fst
-
-    let moduleRange idm others = 
-      union_ranges_checked (end_range_of_range idm) (range_of_decls' (fun (a, _, _) -> a) others)
-    
-    let fldspec_range fldspec =
-      match fldspec with
-      | UnionCaseFields(flds) -> flds |> List.fold (fun st (Field(_, _, _, _, _, _, _, m)) -> union_ranges_checked m st) 0L
-      | UnionCaseFullType(ty, _) -> range_of_syntype ty
-      
-    let bodyRange mb decls =
-      union_ranges_checked (range_of_decls decls) mb
-          
-    /// Get information for implementation file        
-    let getNavigationFromImplFile (name:string) (modules:moduleImpl list) =
-
-        // Map for dealing with name conflicts
-        let nameMap = ref Map.empty 
-        let addItemName name = 
-            let count = defaultArg (!nameMap |> Map.tryFind name) 0
-            nameMap := (Map.add name (count + 1) (!nameMap))
-            (count + 1)
-        let uniqueName name idx = 
-            let total = Map.find name (!nameMap)
-            sprintf "%s_%d_of_%d" name idx total
-
-        // Create declaration (for the left dropdown)                
-        let createDeclLid(baseName, lid, baseGlyph, m, bodym, nested) =
-            let name = (if baseName <> "" then baseName + "." else "") + (text_of_lid lid)
-            DeclarationItem.Create
-              (name, baseGlyph * 6, m, bodym, false), (addItemName name), nested
-            
-        let createDecl(baseName, (id:ident), baseGlyph, m, bodym, nested) =
-            let name = (if baseName <> "" then baseName + "." else "") + (id.idText)
-            DeclarationItem.Create
-              (name, baseGlyph * 6, m, bodym, false), (addItemName name), nested
-         
-        // Create member-kind-of-thing for the right dropdown
-        let createMemberLid(lid, baseGlyph, m) =
-            DeclarationItem.Create(text_of_lid lid, baseGlyph * 6, m, m, false), (addItemName(text_of_lid lid))
-
-        let createMember((id:ident), baseGlyph, m) =
-            DeclarationItem.Create(id.idText, baseGlyph * 6, m, m, false), (addItemName(id.idText))
-            
-
-        // Process let-binding
-        let processBinding isMember (Binding(_, kind, _, _, _, _, ValSynData(memebrOpt, _, _), synPat, BindingRhs(_, _, synExpr), m, _)) =
-            let m = match synExpr with 
-                    | Expr_typed(e, _, _) -> range_of_synexpr e // fix range for properties with type annotations
-                    | _ -> range_of_synexpr synExpr
-            match synPat, memebrOpt with
-            | Pat_lid(lid, _, _, _, _), Some(flags) when isMember -> 
-                let icon =
-                  match flags.MemberKind with
-                  | MemberKindClassConstructor
-                  | MemberKindConstructor
-                  | MemberKindMember -> if (flags.MemberIsOverrideOrExplicitImpl || flags.MemberIsVirtual) then iIconGroupMethod2 else iIconGroupMethod
-                  | MemberKindPropertyGetSet
-                  | MemberKindPropertySet
-                  | MemberKindPropertyGet -> iIconGroupProperty
-                let lidShow, rangeMerge = 
-                  match lid with 
-                  | slf::nm::_ -> (List.tl lid, nm.idRange) 
-                  | hd::_ -> (lid, hd.idRange) 
-                  | _ -> (lid, m)
-                [ createMemberLid(lidShow, icon, union_ranges rangeMerge m) ]
-            | Pat_lid(lid, _, _, _, _), _ -> [ createMemberLid(lid, iIconGroupConstant, union_ranges (List.hd lid).idRange m) ]
-            | _ -> []
-        
-        // Process a class declaration or F# type declaration
-        let rec processTycon baseName (TyconDefn(ComponentInfo(_, _, _, _, lid, _, _, _, _), repr, membDefns, m)) =
-            let topMembers = processMembers membDefns |> snd
-            match repr with
-            | TyconDefnRepr_class(kind, membDefns, mb) -> // mb is odd
-                // F# class declaration
-                let members = processMembers membDefns |> snd
-                let nested = members@topMembers
-                ([ createDeclLid(baseName, lid, iIconGroupClass, m, bodyRange (start_range_of_range mb) nested, nested) ] : ((DeclarationItem * int * _) list))
-            | TyconDefnRepr_simple(simple, _) ->
-                // F# type declaration
-                match simple with
-                | TyconCore_union(_, cases, mb) -> // mb has wrong end, we use only start
-                    let cases = 
-                        [ for (UnionCase(_, id, fldspec, _, _, m)) in cases -> 
-                            createMember(id, iIconGroupValueType, union_ranges (fldspec_range fldspec) id.idRange) ]
-                    let nested = cases@topMembers              
-                    [ createDeclLid(baseName, lid, iIconGroupUnion, m, bodyRange (start_range_of_range mb) nested, nested) ]
-                | TyconCore_enum(cases, mb) -> // mb is wrong
-                    let cases = 
-                        [ for (EnumCase(_, id, _, _, m)) in cases ->
-                            createMember(id, iIconGroupEnumMember, m) ]
-                    let nested = cases@topMembers
-                    [ createDeclLid(baseName, lid, iIconGroupEnum, m, bodyRange (start_range_of_range mb) nested, nested) ]
-                | TyconCore_recd(_, fields, mb) ->
-                    let fields = 
-                        [ for (Field(_, _, id, _, _, _, _, m)) in fields do
-                            if (id.IsSome) then
-                              yield createMember(id.Value, iIconGroupFieldBlue, m) ]
-                    let nested = fields@topMembers
-                    [ createDeclLid(baseName, lid, iIconGroupType, m, bodyRange mb nested, nested) ]                // no start_range_of_range here, records work fine
-                | TyconCore_abbrev(_, mb) ->
-                    [ createDeclLid(baseName, lid, iIconGroupTypedef, m, bodyRange mb topMembers, topMembers) ]                // should be ok too
-                          
-                //| TyconCore_general of TyconKind * (SynType * range * ident option) list * (valSpfn * MemberFlags) list * fieldDecls * bool * bool * range 
-                //| TyconCore_asm of ILType * range
-                //| TyconCore_repr_hidden of range
-                | _ -> [] 
-                  
-        // Returns class-members for the right dropdown                  
-        and processMembers members : (int64 * list) = 
-            let members = members |> List.map (fun memb ->
-               (range_of_classmember memb,
-                match memb with
-                | ClassMemberDefn_let_bindings(binds, _, _, _) -> List.collect (processBinding false) binds
-                | ClassMemberDefn_member_binding(bind, _) -> processBinding true bind
-                | ClassMemberDefn_field(Field(_, _, Some(rcid), ty, _, _, _, _), _) ->
-                    [ createMember(rcid, iIconGroupFieldBlue, (range_of_syntype ty)) ]
-                | ClassMemberDefn_slotsig(ValSpfn(_, id, _, ty, _, _, _, _, _, _, _), flags, _) ->
-                    [ createMember(id, iIconGroupMethod2, (range_of_syntype ty)) ]
-                | ClassMemberDefn_tycon(tycon, _, m3) -> failwith "tycon as member????" //processTycon tycon                
-                | ClassMemberDefn_interface(synty, Some(membs), _) ->
-                    processMembers membs |> snd
-                | _ -> []  )) 
-            ((members |> Seq.map fst |> Seq.fold union_ranges_checked 0L),
-             (members |> List.map snd |> List.concat))
-
-        // Process declarations in a module that belong to the right drop-down (let bindings)
-        let processNestedDeclarations decls = decls |> List.collect (function
-            | Def_let(_, binds, _) -> List.collect (processBinding false) binds
-            | _ -> [] )        
-
-        // Process declarations nested in a module that should be displayed in the left dropdown
-        // (such as type declarations, nested modules etc.)                            
-        let rec processTopLevelDeclarations(baseName, decls) = decls |> List.collect (function
-            | Def_module_abbrev(id, lid, m) ->
-                [ createDecl(baseName, id, iIconGroupModule, m, range_of_lid lid, []) ]
-                
-            | Def_module(ComponentInfo(_, _, _, _, lid, _, _, _, _), decls, _, m) ->                
-                // Find let bindings (for the right dropdown)
-                let nested = processNestedDeclarations(decls)
-                let newBaseName = (if (baseName = "") then "" else baseName+".") + (text_of_lid lid)
-                
-                // Get nested modules and types (for the left dropdown)
-                let other = processTopLevelDeclarations(newBaseName, decls)
-                createDeclLid(baseName, lid, iIconGroupModule, m, union_ranges_checked (range_of_decls nested) (moduleRange (range_of_lid lid) other), nested)::other
-                  
-            | Def_tycons(tydefs, _) -> tydefs |> List.collect (processTycon baseName)                                    
-            | Def_partial_tycon(ComponentInfo(_, _, _, _, lid, _, _, _, mimpl), membDefns, m) ->
-                // Type augmentation / extension
-                let membersM, nested = processMembers membDefns
-                [ createDeclLid(baseName, lid, iIconGroupClass, m, union_ranges (start_range_of_range membersM) (range_of_decls nested), nested) ]
-                            
-            | Def_exn(ExconDefn(ExconCore(_, (UnionCase(_, id, fldspec, _, _, _)), _, _, _, _), membDefns, _), m) ->
-                // Exception declaraton
-                let nested = processMembers membDefns |> snd
-                [ createDecl(baseName, id, iIconGroupException, m, fldspec_range fldspec, nested) ] 
-            | _ -> [] )            
-                  
-        // Collect all the items  
-        let items = 
-            // Show base name for this module only if it's not the root one
-            let singleTopLevel = (modules.Length = 1)
-            modules |> List.collect (fun (ModuleOrNamespaceImpl(id,isModule,decls,_,_,_,m)) ->
-                let baseName = if (not singleTopLevel) then text_of_lid id else ""
-                // Find let bindings (for the right dropdown)
-                let nested = processNestedDeclarations(decls)
-                // Get nested modules and types (for the left dropdown)
-                let other = processTopLevelDeclarations(baseName, decls)
-                
-                // Create explicitly - it can be 'single top level' thing that is hidden
-                let decl =
-                    DeclarationItem.Create
-                        (text_of_lid id, iIconGroupModule * 6, m, 
-                         union_ranges_checked (range_of_decls nested) (moduleRange (range_of_lid id) other), 
-                         singleTopLevel), (addItemName(text_of_lid id)), nested
-                decl::other )
-                  
-        let items = 
-            items 
-            |> Array.of_list 
-            |> Array.map (fun (d, idx, nest) -> 
-                let nest = nest |> Array.of_list |> Array.map (fun (decl, idx) -> decl.WithUniqueName(uniqueName d.Name idx))
-                nest |> Array.sortInPlaceWith (fun a b -> compare a.Name b.Name)
-                { Declaration = d.WithUniqueName(uniqueName d.Name idx); Nested = nest } )                  
-        items |> Array.sortInPlaceWith (fun a b -> compare a.Declaration.Name b.Declaration.Name)
-        new NavigationItems(items)
-
-    member scope.Results = parsed
-    
-    /// Get declaraed items and the selected item at the specified location
-    member private scope.GetNavigationItemsImpl() =
-       ErrorScope.Protect 
-            Range.range0 
-            (fun () -> 
-                use t = Trace.Call("CompilerServices", "GetNavigationItems", fun _ -> "")
-                match parsed.Input with
-                | Some(ImplFileInput(ImplFile(modname,isScript,qualName,pragmas,hashDirectives,modules,canContainEntryPoint))) ->
-                    getNavigationFromImplFile modname modules 
-                | Some(SigFileInput(SigFile(modname,qualName,pragmas,hashDirectives,modules))) ->
-                    new NavigationItems([| |])
-                | _ -> 
-                    new NavigationItems([| |]) )
-            (fun msg -> new NavigationItems([| |]))   
-            
-    member private scope.ValidateBreakpointLocationImpl((line,col)) =
-
-        
-        let pos = mk_pos (line+1) col
-        let adjust p = (line_of_pos p - 1),(col_of_pos p) 
-        let adjustRange m = adjust (start_of_range m), adjust (end_of_range m)
-        
-        // Process let-binding
-        let findBreakPoints allowSameLine = 
-            let checkRange m = [ if range_contains_pos m pos || (allowSameLine && start_line_of_range m = line_of_pos pos) then 
-                                     yield adjustRange m ]
-            let walkBindSeqPt sp = [ match sp with SequencePointAtBinding m -> yield! checkRange m | _ -> () ]
-            let walkForSeqPt sp = [ match sp with SequencePointAtForLoop m -> yield! checkRange m | _ -> () ]
-            let walkWhileSeqPt sp = [ match sp with SequencePointAtWhileLoop m -> yield! checkRange m | _ -> () ]
-            let walkTrySeqPt sp = [ match sp with SequencePointAtTry m -> yield! checkRange m | _ -> () ]
-            let walkWithSeqPt sp = [ match sp with SequencePointAtWith m -> yield! checkRange m | _ -> () ]
-            let walkFinallySeqPt sp = [ match sp with SequencePointAtFinally m -> yield! checkRange m | _ -> () ]
-
-            let rec walkBind (Binding(_, _, _, _, _, _, ValSynData(memFlagsOpt,_,_), pat, BindingRhs(_,_,e), _, spInfo)) =
-                [ // Don't yield the binding sequence point if there are any arguments, i.e. we're defining a function or a method
-                  let isFunction = 
-                      isSome memFlagsOpt ||
-                      match pat with 
-                      | Pat_lid (_,_,args,_,_) when nonNil args -> true
-                      | _ -> false
-                  if not isFunction then 
-                      yield! walkBindSeqPt spInfo
-                  yield! walkExpr (isFunction || (match spInfo with SequencePointAtBinding _ -> false | _-> true)) e ]
-
-            and walkExprs es = [ for e in es do yield! walkExpr false e ]
-            and walkBinds es = [ for e in es do yield! walkBind e ]
-            and walkMatchClauses cl = 
-                [ for (Clause(_,whenExpr,e,_,_)) in cl do 
-                    match whenExpr with Some e -> yield! walkExpr false e | _ -> ()
-                    yield! walkExpr true e; ]
-
-            and walkExprOpt (spAlways:bool) eOpt = [ match eOpt with Some e -> yield! walkExpr spAlways e | _ -> () ]
-            
-            // Determine the breakpoint locations for an expression. spAlways indicates we always
-            // emit a breakpoing location for the expression unless it is a syntactic control flow construct
-            and walkExpr (spAlways:bool)  e = 
-                [ if spAlways && not (IsControlFlowExpression e) then 
-                      yield! checkRange (range_of_synexpr e)
-                  match e with 
-
-                  | Expr_arb _ 
-                  | Expr_lid_get _
-                  | Expr_quote _
-                  | Expr_asm _
-                  | Expr_static_optimization _
-                  | Expr_null _
-                  | Expr_typeof _
-                  | Expr_id_get _
-                  | Comp_zero _
-                  | Expr_const _ -> 
-                     ()
-
-                  | Expr_isinst (e,_,_)
-                  | Expr_upcast (e,_,_)
-                  | Expr_addrof (_,e,_,_)
-                  | Expr_comprehension (_,_,e,_) 
-                  | Expr_array_or_list_of_seq (_,e,_)
-                  | Expr_typed (e,_,_)
-                  | Expr_throwaway (e,_) 
-                  | Expr_do (e,_)
-                  | Expr_assert (e,_)
-                  | Expr_lvalue_get (e,_,_) 
-                  | Expr_lid_set (_,e,_)
-                  | Expr_new (_,_,e,_) 
-                  | Expr_tyapp (e,_,_) 
-                  | Expr_constr_field_get (e,_,_,_) 
-                  | Expr_downcast (e,_,_)
-                  | Expr_inferred_upcast (e,_)
-                  | Expr_inferred_downcast (e,_)
-                  | Expr_lazy (e, _)
-                  | Expr_trait_call(_,_,e,_)
-                  | Comp_yield (_,e,_)
-                  | Comp_yieldm (_,e,_)
-                  | Comp_do_bind  (e,_)
-                  | Expr_paren(e,_) -> 
-                      yield! walkExpr false e
-
-                  | Expr_lid_indexed_set (_,e1,e2,_)
-                  | Expr_lvalue_set (e1,_,e2,_)
-                  | Expr_constr_field_set (e1,_,_,e2,_)
-                  | Expr_ifnull (e1,e2,_) 
-                  | Expr_app (_,e1,e2,_) -> 
-                      yield! walkExpr false e1; 
-                      yield! walkExpr false e2;
-
-                  | Expr_array_or_list (_,es,_)
-                  | Expr_tuple (es,_) -> 
-                      yield! walkExprs es
-
-                  | Expr_recd (_,_,fs,_) -> 
-                      yield! walkExprs (List.map snd fs)
-
-                  | Expr_impl (_,_,bs,is,_) -> 
-                      yield! walkBinds bs ; 
-                      for (InterfaceImpl(_,bs,_)) in is do yield! walkBinds bs
-                  | Expr_while (spWhile,e1,e2,_) -> 
-                      yield! walkWhileSeqPt spWhile
-                      yield! walkExpr false e1; 
-                      yield! walkExpr true e2;
-                  | Expr_for (spFor,_,e1,_,e2,e3,_) -> 
-                      yield! walkForSeqPt spFor
-                      yield! walkExpr false e1; 
-                      yield! walkExpr true e2; 
-                      yield! walkExpr true e3;
-                  | Expr_foreach (spFor,_,_,e1,e2,_) ->
-                      yield! walkForSeqPt spFor
-                      yield! walkExpr false e1; 
-                      yield! walkExpr true e2; 
-                  | Expr_lambda (_,_,_,e,_) -> 
-                      yield! walkExpr true e; 
-                  | Expr_match (spBind,e,cl,_,_) ->
-                      yield! walkBindSeqPt spBind
-                      yield! walkExpr false e; 
-                      for (Clause(_,whenExpr,e,_,_)) in cl do 
-                          yield! walkExprOpt false whenExpr
-                          yield! walkExpr true e; 
-                  | Expr_let (_,_,bs,e,_) -> 
-                      yield! walkBinds bs ; 
-                      yield! walkExpr true e;
-
-                  | Expr_try_catch (e,_,cl,_,_,spTry,spWith) -> 
-                      yield! walkTrySeqPt spTry
-                      yield! walkWithSeqPt spWith
-                      yield! walkExpr true e 
-                      yield! walkMatchClauses cl
-                  
-                  | Expr_try_finally (e1,e2,_,spTry,spFinally) ->
-                      yield! walkExpr true e1
-                      yield! walkExpr true e2
-                      yield! walkTrySeqPt spTry
-                      yield! walkFinallySeqPt spFinally
-                  | Expr_seq (spSeq,_,e1,e2,_) -> 
-                      yield! walkExpr (match spSeq with SuppressSequencePointOnStmtOfSequential -> false | _ -> true) e1
-                      yield! walkExpr (match spSeq with SuppressSequencePointOnExprOfSequential -> false | _ -> true) e2
-                  | Expr_cond (e1,e2,e3opt,spBind,_,_) ->
-                      yield! walkBindSeqPt spBind
-                      yield! walkExpr false e1
-                      yield! walkExpr true e2
-                      yield! walkExprOpt true e3opt
-                  | Expr_lbrack_get (e1,es,_,_) -> 
-                      yield! walkExpr false e1; 
-                      yield! walkExprs es;
-
-                  | Expr_lbrack_set (e1,es,e2,_,_) ->
-                      yield! walkExpr false e1; 
-                      yield! walkExprs es;
-                      yield! walkExpr false e2; 
-                  | Expr_lvalue_indexed_set (e1,_,e2,e3,_) ->
-                      yield! walkExpr false e1; 
-                      yield! walkExpr false e2; 
-                      yield! walkExpr false e3; 
-
-                  | Comp_bind  (spBind,_,_,e1,e2,_) -> 
-                      yield! walkBindSeqPt spBind
-                      yield! walkExpr true e1
-                      yield! walkExpr true e2 ]
-            
-            // Process a class declaration or F# type declaration
-            let rec walkTycon (TyconDefn(ComponentInfo(_, _, _, _, lid, _, _, _, _), repr, membDefns, m)) =
-                [ for m in membDefns do yield! walkMember m 
-                  match repr with
-                  | TyconDefnRepr_class(_, membDefns, _) -> 
-                      for m in membDefns do yield! walkMember m 
-                  | _ -> () ]
-                      
-            // Returns class-members for the right dropdown                  
-            and walkMember memb  = 
-                [ match memb with
-                  | ClassMemberDefn_let_bindings(binds, _, _, _) -> yield! walkBinds binds
-                  | ClassMemberDefn_implicit_ctor(_,_,_,_,m) -> yield! checkRange m
-                  | ClassMemberDefn_member_binding(bind, _) -> yield! walkBind bind
-                  | ClassMemberDefn_interface(synty, Some(membs), _) -> for m in membs do yield! walkMember m
-                  | ClassMemberDefn_inherit(_, _, m) -> 
-                      // can break on the "inherit" clause
-                      yield! checkRange m
-                  | _ -> ()  ]
-
-            // Process declarations nested in a module that should be displayed in the left dropdown
-            // (such as type declarations, nested modules etc.)                            
-            let rec walkDecl decl = 
-                [ match decl with 
-                  | Def_let(_, binds, m) -> 
-                      if range_contains_pos m pos then 
-                          yield! walkBinds binds
-                  | Def_expr(spExpr,expr, m) ->  
-                      yield! walkBindSeqPt spExpr
-                      yield! walkExpr false expr
-                  | Def_module_abbrev(id, lid, m) -> 
-                      ()
-                  | Def_module(ComponentInfo(_, _, _, _, lid, _, _, _, _), decls, _, m) ->                
-                      if range_contains_pos m pos then 
-                          for d in decls do yield! walkDecl d
-                  | Def_tycons(tydefs, m) -> 
-                      if range_contains_pos m pos then 
-                          for d in tydefs do yield! walkTycon d
-                  | Def_partial_tycon(ComponentInfo(_, _, _, _, lid, _, _, _, mimpl), membDefns, m) ->
-                      if range_contains_pos m pos then 
-                          for m in membDefns do yield! walkMember m
-                  | Def_exn(ExconDefn(ExconCore(_, _, _, _, _, _), membDefns, _), m) ->
-                      if range_contains_pos m pos then 
-                          for m in membDefns do yield! walkMember m
-                  | _ ->
-                      () ] 
-                      
-            // Collect all the items  
-            let walkModule (ModuleOrNamespaceImpl(id,isModule,decls,_,_,_,m)) =
-                if range_contains_pos m pos then 
-                    [ for d in decls do yield! walkDecl d ]
-                else
-                    []
-                      
-           /// Get information for implementation file        
-            let walkImplFile (modules:moduleImpl list) =
-                [ for x in modules do yield! walkModule x ]
-                     
-            match parsed.Input with
-            | Some(ImplFileInput(ImplFile(_,_,_,_,_,modules,_))) -> walkImplFile modules 
-            | _ -> []
- 
-        ErrorScope.Protect 
-            Range.range0 
-            (fun () -> 
-                // Find the last breakpoint reported where the position is inside the region
-                match findBreakPoints false |> List.rev with
-                | h::t -> Some(h)
-                | _ -> 
-                    // If there is no such breakpoint, look for any breakpoint beginning on this line
-                    match findBreakPoints true with
-                    | h::t -> Some(h)
-                    | _ -> None)
-            (fun msg -> None)   
-            
-    /// When these files appear or disappear the configuration for the current project is invalidated.
-    member scope.DependencyFiles() : string list =
-        parsed.DependencyFiles
-                    
-    member scope.FileName =
-      match parsed.Input with
-      | Some(ImplFileInput(ImplFile(modname, _, _, _, _, _, _))) 
-      | Some(SigFileInput(SigFile(modname, _, _, _, _))) -> modname
-      | _ -> ""
-    
-    // Get items for the navigation drop down bar       
-    member scope.GetNavigationItems() =
-        use t = Trace.Call("SyncOp","GetNavigationItems", fun _->"")
-        // This does not need to be run on the background thread
-        scope.GetNavigationItemsImpl()
-
-    member scope.ValidateBreakpointLocation(pos:Position) =
-        use t = Trace.Call("SyncOp","ValidateBreakpointLocation", fun _->"")
-        // This does not need to be run on the background thread
-        scope.ValidateBreakpointLocationImpl(pos)
-    
-//----------------------------------------------------------------------------
-// parseSource builds all the information necessary to report errors, match braces and build scopes 
-// See service.cpp for the code that picks up the generated data.  We don't call the C++ sinks 
-// functions directly (i.e. via 'external' calls) since I've had problems
-// using to build DLLs that call from C to and back again. Instead
-// we return an array of specifications of calls that need to be made.  
-//--------------------------------------------------------------------------
-
-module Parser = 
-
-    //----------------------------------------------------------------------------
-    // Error handling for parsing & type checking
-    //--------------------------------------------------------------------------
-
-    let push r x = r := x :: !r
-                        
-    type ErrorHandler(reportErrors, mainInputFileName, tcConfig : TcConfig, source:string) = 
-      let errors = ref false 
-      let errorsAndWarningsCollector = ref [] 
-      let errorCount = ref 0
-      let errorsAreOn = ref false 
-      let errorsAreFullyOff = ref false 
-         
-      // We'll need number of lines for adjusting error messages at EOF
-      let fileInfo = 
-          (source |> Seq.sum_by (fun c -> if c = '\n' then 1 else 0), // number of lines in the source file
-           source.Length - source.LastIndexOf("\n",StringComparison.Ordinal) - 1)             // length of the last line
-         
-      // This function gets called whenever an error happens during parsing or checking
-      let errorSink warn exn = 
-          if reportErrors then 
-              let warn = warn && not (ReportWarningAsError tcConfig.globalWarnLevel tcConfig.specificWarnOff tcConfig.specificWarnAsError tcConfig.globalWarnAsError exn)                
-              if (!errorsAreOn && not !errorsAreFullyOff && (not warn or ReportWarning tcConfig.globalWarnLevel tcConfig.specificWarnOff exn)) then 
-                  let oneError trim exn = 
-                      // We use the first line of the file as a fallbackRange for reporting unexpected errors.
-                      // Not ideal, but it's hard to see what else to do.
-                      let fallbackRange = rangeN mainInputFileName 1
-                      let ei = ErrorInfo.CreateFromExceptionAndAdjustEof(exn,warn,trim,fallbackRange,fileInfo)
-                      Trace.PrintLine("UntypedParseAux", fun _ -> sprintf "Reporting one error: %s\n" (ei.ToString()))
-                      push errorsAndWarningsCollector ei
-                      if not warn then 
-                          errors := true;
-                          incr errorCount
-                      
-                  let mainError,relatedErrors = Build.SplitRelatedErrors exn 
-                  oneError false mainError
-                  List.iter (oneError true) relatedErrors
-      
-      let errorLogger = 
-          { new ErrorLogger with 
-              member x.WarnSink(exn) = errorSink true exn
-              member x.ErrorSink(exn) = errorSink false exn
-              member x.ErrorCount = !errorCount }
-      
-      let errorsOn () =  errorsAreOn := true
-      let errorsOff() = errorsAreOn := false
-
-      (* Errors on while parsing project arguments *)            
-      do errorsOn()
-      
-      
-      // Public members
-      member x.GetErrorsState() = !errorsAreOn
-      member x.ErrorLogger = errorLogger
-      member x.ErrorSink = errorSink
-      member x.PushErrorInfo ei = 
-        push errorsAndWarningsCollector ei
-        incr errorCount
-      member x.CollectedErrorsAndWarnings = !errorsAndWarningsCollector
-      member x.ErrorCount = !errorCount
-      
-      // switch error logging on/off
-      member x.ErrorsOn() = errorsOn()
-      member x.ErrorsOff() = errorsOff()
-      member x.ErrorsFullyOff() = errorsAreFullyOff := true;
-      member x.AnyErrors = !errors
-            
-    
-    /// Locate addition #r references for script file.
-    let AdditionalReferencesFromScript(mainInputFileName,tcConfig,parseResult,tcImports,tcGlobals,projectDir,tcStateForPriorInputs:tcState,lexResourceManager,(errHandler:ErrorHandler)) =
-        if Build.IsScript(mainInputFileName) then
-            // Process meta commands to get referenced DLLs
-            let fileSpecificTcConfig = ApplyMetaCommandsFromInputToTcConfig tcConfig parseResult 
-            let capturedReferenceResolutions = GetResolvedAssemblyInformation(fileSpecificTcConfig)
-            
-            Trace.PrintLine("UntypedParseAux", fun () -> sprintf "Computing parse for fsx with referenced DLLs %+A" fileSpecificTcConfig.referencedDLLs)
-            
-            // Handle errors and warnings of #loaded files. See 3149.
-            let FilterByHashLoaded handler = function
-                | HashLoadedSourceHasIssues _ as loadproblem -> handler loadproblem
-                | _ -> ()                            
-
-            // From here, we're assuming this is a script project and that there are no other files in the project.
-            
-            let priorErrorsAreOn = errHandler.GetErrorsState()
-            errHandler.ErrorsOn() // Don't show errors for prior parsing.
-            
-            let errorLogger =
-                { new ErrorLogger with 
-                         member x.ErrorCount=0;
-                         member x.WarnSink(err) = FilterByHashLoaded errHandler.ErrorLogger.WarnSink err;
-                         member x.ErrorSink(err) = FilterByHashLoaded errHandler.ErrorLogger.ErrorSink err }
-            let build,dependencyFiles = 
-                IncrementalFSharpBuild.Create 
-                    (fileSpecificTcConfig, projectDir, "myscript.dll", 
-                     tcStateForPriorInputs.NiceNameGenerator, lexResourceManager, 
-                     [], // Files come from loaded sources.
-                     true, 
-                     IncrementalFSharpBuild.BuildEvents.Default,errorLogger,
-                     (fun (e:exn) (m:range) ->raise e));                         
-                    
-            if priorErrorsAreOn then errHandler.ErrorsOn() else errHandler.ErrorsOff() // Don't show errors for prior parsing.
-
-            let loadedSourcesCount = List.length (fileSpecificTcConfig.GetAvailableLoadedSources())
-            let build = IncrementalFSharpBuild.EvalTypeCheckSlot(loadedSourcesCount,build)                              
-            match IncrementalFSharpBuild.GetAntecedentTypeCheckResultsBySlot(loadedSourcesCount,build) with 
-            | Some(tcState,tcImports,tcGlobals,tcConfig,_) -> tcImports, tcState, tcGlobals,tcConfig,capturedReferenceResolutions
-            | None -> tcImports,tcStateForPriorInputs, tcGlobals,tcConfig,capturedReferenceResolutions
-        else 
-            // Process meta commands to get warnings for referenced DLLs 
-            ApplyMetaCommandsFromInputToTcConfig tcConfig parseResult |> ignore
-            tcImports,tcStateForPriorInputs,tcGlobals,tcConfig,[]    
-                
-    //----------------------------------------------------------------------------
-    // Parsing
-    //--------------------------------------------------------------------------
-
-    let parseSource
-          (source: string) 
-          (matchBracesOnly:bool)
-          (reportErrors:bool)
-          (mainInputFileName:string)
-          (projectSourceFiles : string list)
-          (tcConfig : TcConfig)
-          : 
-            ( 
-              // Error infos
-              ErrorInfo array * 
-              // Brace matchin
-              (int * int * int * int * int * int * int * int) array (* MatchPair*) * 
-              // Untyped AST
-              input option * 
-              // Any errors during parsing
-              bool              
-            ) = 
-
-      try 
-        Trace.PrintLine("CompilerServices", fun _ -> sprintf "Service.parseSource %s, matchBraces = %b, reportErrors = %b" mainInputFileName matchBracesOnly reportErrors)
-
-        // Initialize the error handler 
-        let errHandler = new ErrorHandler(reportErrors, mainInputFileName, tcConfig, source)
-
-        // This helps reason=MethodTip to work - todo: investigate why.  reason=MethodTip 
-        // calls with only partial text.  Preumably adding this causes the final EndParameters 
-        // call to refer to a different line than the StartParameters call we're really interested in 
-        // Or something like that.  Yuck. 
-        let source = source ^ "\n\n\n"
-        let lexbuf = UnicodeLexing.StringAsLexbuf source
-
-        let adjust p = (line_of_pos p - 1),(col_of_pos p) 
-        
-        let matchPairRef = ref [] 
-        let matchPairSink m1 m2 =  
-            if matchBracesOnly then 
-                let s1,s2 = adjust (start_of_range m1)
-                let s3,s4 = adjust (end_of_range m1)
-                let s5,s6 = adjust (start_of_range m2)
-                let s7,s8 = adjust (end_of_range m2)
-                Trace.PrintLine("MatchPairs", fun _ -> sprintf "MatchPair: (%s,%s)\n" (string_of_range m1) (string_of_range m2));
-                push matchPairRef (s1,s2,s3,s4,s5,s6,s7,s8)
-
-        use unwind = InstallGlobalErrorLogger (fun oldLogger -> errHandler.ErrorLogger)
-
-        (* Errors on while parsing project arguments *)            
-
-        let parseResult = 
-          if verbose then dprintf "Parsing, text = \n<<<\n%s\n>>>\n" source; 
-
-          // If we're editing a script then we define INTERACTIVE otherwise COMPILED. Since this parsing for intellisense we always
-          // define EDITING
-          let conditionalCompilationDefines =
-            SourceFile.AdditionalDefinesForUseInEditor(mainInputFileName) @ tcConfig.conditionalCompilationDefines 
-        
-          (* Note: there is currently no way to override this *)
-          
-          let syntaxFlagRequired = tcConfig.ComputeSyntaxFlagRequired(mainInputFileName)
-          let lightSyntaxStatusInital = tcConfig.ComputeLightSyntaxInitialStatus mainInputFileName
-          let lightSyntaxStatus = LightSyntaxStatus(lightSyntaxStatusInital,true)
-
-          // Note: we don't really attempt to intern strings across a large scope
-          let lexResourceManager = new Lexhelp.LexResourceManager()
-          let lexargs = mkLexargs((fun () -> tcConfig.implicitIncludeDir),
-                                  mainInputFileName,
-                                  conditionalCompilationDefines,
-                                  lightSyntaxStatus,
-                                  lexResourceManager,
-                                  ref [],
-                                  errHandler.ErrorLogger)
-          Lexhelp.usingLexbufForParsing (lexbuf, mainInputFileName, None) (fun lexbuf -> 
-              try 
-                let skip = true
-                let tokenizer = Lexfilter.create syntaxFlagRequired lightSyntaxStatus (Lexer.token lexargs skip) lexbuf
-                let lexfun = tokenizer.lexer 
-                if matchBracesOnly then 
-                    (* Quick bracket matching parse  *)
-                    let parenTokensBalance t1 t2 = 
-                        match t1,t2 with 
-                        | (LPAREN,RPAREN) 
-                        | (LBRACE,RBRACE) 
-                        | (SIG,END) 
-                        | (STRUCT,END) 
-                        | (LBRACK_BAR,BAR_RBRACK)
-                        | (LBRACK,RBRACK)
-                        | (BEGIN,END) -> true 
-                        | (LQUOTE q1,RQUOTE q2) when q1 = q2 -> true 
-                        | _ -> false
-                    let rec matchBraces stack = 
-                        match lexfun lexbuf,stack with 
-                        | tok2,((tok1,m1) :: stack') when parenTokensBalance tok1 tok2-> matchPairSink m1 (Ast.GetLexerRange lexbuf); matchBraces stack'
-                        | ((LPAREN | LBRACE | LBRACK | LBRACK_BAR | LQUOTE _) as tok),_ -> matchBraces ((tok,Ast.GetLexerRange lexbuf) :: stack)
-                        | (EOF _ | LEX_FAILURE _),_ -> ()
-                        | _ -> matchBraces stack
-
-                    matchBraces [];
-                    None
-                else 
-                    let canContainEntryPoint = 
-                        tcConfig.target.IsExe && 
-                        projectSourceFiles.Length >= 1 && 
-                        System.String.Compare(List.last projectSourceFiles,mainInputFileName,StringComparison.CurrentCultureIgnoreCase)=0
-
-                    let parseResult = ParseInput(lexfun,errHandler.ErrorLogger,lexbuf,None,mainInputFileName,canContainEntryPoint)
-                    Some(parseResult)
-              with e -> 
-                Trace.PrintLine("CompilerServices", fun _ -> sprintf "Could not recover from errors while parsing: %s\n" (e.ToString()))
-                errHandler.ErrorSink false e
-                None)
-                
-        Trace.PrintLine("CompilerServices", fun _ -> sprintf "#errors = %d\n" errHandler.CollectedErrorsAndWarnings.Length);
-
-        Array.of_list (List.rev errHandler.CollectedErrorsAndWarnings),
-        Array.of_list (List.rev !matchPairRef),
-        parseResult,
-        errHandler.AnyErrors        
-      with 
-      | e -> 
-        System.Diagnostics.Debug.Assert(false, sprintf "Bug seen in service-level parse source: %s\n"  (e.ToString()))
-        Trace.PrintLine("CompilerServices", fun _ -> sprintf "Unexpected error %s\n" (e.ToString())); 
-        [| |],
-        [| |],
-        None,
-        true
-
-    type TypecheckResultsSink() =
-        let capturedEnvs = new ResizeArray<_>(100)
-        let capturedExprTypings = new ResizeArray<_>(100)
-        let capturedNameResolutions = new ResizeArray<_>(100)
-        interface Nameres.ITypecheckResultsSink with
-            member sink.NotifyEnvWithScope(scopem,nenv,ad) = capturedEnvs.Add((scopem,nenv,ad)) 
-            member sink.NotifyExprHasType(endPos,ty,denv,nenv,ad,m) = capturedExprTypings.Add((endPos,ty,denv,nenv,ad,m))
-            member sink.NotifyNameResolution(endPos,item,occurenceType,denv,nenv,ad,m) = capturedNameResolutions.Add((endPos,item,occurenceType,denv,nenv,ad,m)) 
-        member x.CapturedEnvs = capturedEnvs
-        member x.CapturedExprTypings = capturedExprTypings
-        member x.CapturedNameResolutions = capturedNameResolutions
-
-    let InstallTypecheckResultsSink sink = 
-        Nameres.GlobalTypecheckResultsSink := Some sink
-        { new IDisposable with member x.Dispose() = Nameres.GlobalTypecheckResultsSink := None }
-                
-    //----------------------------------------------------------------------------
-    // Type-checking
-    //--------------------------------------------------------------------------
-
-    let typeCheckSource
-          (parseResult:input option)
-          (source: string) 
-          (mainInputFileName:string)
-          (projectFileName:string)
-          (tcConfig : TcConfig)
-          (tcGlobals : TcGlobals)
-          (tcImports : TcImports)
-          (tcState : tcState)
-          (syncop:(unit->unit)->unit)
-          (suppressTypecheckErrors : bool)
-          : (ErrorInfo array * 
-             Scope option) = 
-      try
-        let projectDir = Filename.dirname (if projectFileName = "" then mainInputFileName else projectFileName)
-        Trace.PrintLine("CompilerServices", fun _ -> sprintf "Service.typeCheckSource %s, projectDir = %s" mainInputFileName projectDir)
-        match parseResult with 
-        // When processing the following cases, we don't need to type-check
-        | None -> [| |], None
-               
-        // Run the type checker...
-        | Some parsedMainInput -> 
-                    
-            // Initialize the error handler 
-            let errHandler = new ErrorHandler(true,mainInputFileName,tcConfig, source)
-
-            // TODO: get rid of this use of global state and pass the sink as a parameter to the type checker
-            use unwind = InstallGlobalErrorLogger (fun oldLogger -> errHandler.ErrorLogger)
-
-            // If additional references were brought in by the preprocessor then we need to process them
-            let lexResourceManager = new Lexhelp.LexResourceManager()
-            let tcImportsAfterParse,tcStateForPriorInputs,tcGlobals,tcConfig,capturedReferenceResolutions = 
-              AdditionalReferencesFromScript(mainInputFileName,tcConfig,parsedMainInput,tcImports,tcGlobals,projectDir,
-                                             tcState,lexResourceManager,errHandler)
-
-            // If we got real errors during parsing don;t report any more errors at all, but typecheck for intellisense 
-            if suppressTypecheckErrors then errHandler.ErrorsFullyOff()
-
-            if verbose then 
-                tcConfig.includes |> List.iter (fun p -> Trace.PrintLine("CompilerServicesVerbose", fun _ -> sprintf "include directory '%s'\n" p)) ;
-                tcConfig.implicitOpens |> List.iter (fun p -> Trace.PrintLine("CompilerServicesVerbose", fun _ -> sprintf "implicit open '%s'\n" p)) ;
-                tcConfig.referencedDLLs |> List.iter (fun r -> Trace.PrintLine("CompilerServicesVerbose", fun _ -> sprintf "dll from flags '%s'\n" r.Text)) ;
-            
-            // A problem arises with nice name generation, which really should only 
-            // be done in the backend, but is also done in the typechecker for better or worse. 
-            // If we don't do this the NNG accumulates data and 
-            // we get a memory leak. 
-            tcStateForPriorInputs.NiceNameGenerator.Reset();
-            
-            // Typecheck the real input.  
-            let sink = TypecheckResultsSink()
-            
-            // TODO: get rid of this use of global state and pass the sink as a parameter to the type checker
-            use unwind2 = InstallTypecheckResultsSink sink
-
-            let amap = tcImportsAfterParse.GetImportMap()
-            let tcEnvAtEnd =
-                try
-                    // Note: this is a long running operation which will make the background build thread unavailable.
-                    // Ideally we should convert this into an Eventually computation, and time slice it, and perform the continuation 
-                    // as a new SyncOp
-                    let (tcEnvAtEnd,_,mimpls),_ = TypecheckMultipleInputs ((fun () -> errHandler.ErrorCount = 0),tcConfig,tcImportsAfterParse,tcGlobals,None,tcStateForPriorInputs,[parsedMainInput])
-                    tcEnvAtEnd
-                with e ->
-                    errHandler.ErrorSink false e 
-                    tcStateForPriorInputs.TcEnvFromSignatures
-
-            Trace.PrintLine("CompilerServicesVerbose", fun _ -> sprintf "Building and returning scope\n");
-            Array.of_list (List.rev errHandler.CollectedErrorsAndWarnings),
-            Some (new Scope(tcConfig,tcGlobals, amap ,projectDir,mainInputFileName ,
-                            sink.CapturedEnvs ,(nenv_of_tenv tcEnvAtEnd),
-                            sink.CapturedExprTypings,
-                            sink.CapturedNameResolutions,
-                            capturedReferenceResolutions,
-                            syncop))
-      with 
-      | e -> 
-        System.Diagnostics.Debug.Assert(false, sprintf "Bug seen in service-level parse source: %s\n"  (e.ToString()))
-        Trace.PrintLine("CompilerServices", fun _ -> sprintf "Unexpected error %s\n" (e.ToString())); 
-        [| |], None
-
-open TokenClassifications
-open ItemDescriptions
-
-
-
-// NOTE: may be better just to move to optional arguments here
-type ParseOptions =
-    { FileName: string
-      ProjectFileName: string
-      ProjectFileNames: string array
-      ProjectOptions: string array
-      IsIncompleteTypeCheckEnvironment : bool;
-    }
-    static member Defaults = 
-         { FileName=""; 
-           ProjectFileName="";
-           ProjectFileNames= Array.empty; 
-           ProjectOptions=Array.empty;  
-           IsIncompleteTypeCheckEnvironment = false;
-         }
-    /// Whether the two parse options refer to the same project.
-    static member AreSameProjectName(options1,options2) =
-        options1.ProjectFileName = options2.ProjectFileName          
-    /// Compare two options sets with respect to the parts of the options that are important to building.
-    static member AreSameProject(options1,options2) =
-        ParseOptions.AreSameProjectName(options1,options2) &&
-        options1.ProjectFileNames = options2.ProjectFileNames &&
-        options1.ProjectOptions = options2.ProjectOptions 
-    /// Compute the project directory.
-    member po.ProjectDirectory 
-        with get() = System.IO.Path.GetDirectoryName(po.ProjectFileName)
- 
-/// A thin wrapper over a Decls object (we could eventually eleiminate one for the other)
-[]
-type DeclarationSet(v: Decls) =
-    member x.Items = v.Items
-    
-[]
-type TypeCheckInfo(scope: Scope, fsiGens : (string -> string) -> string -> FsiGeneration.FsiGenerationResult, syncop: (unit->unit)->unit) =
-
-    
-    let runSyncOp f = 
-        let result = ref None
-        syncop (fun () -> result := Some(f()))
-        Option.get !result
-
-    /// Resolve the names at the given location to a set of declarations
-    member info.GetDeclarations((line,colAtEndOfNames),lineStr,names:NamesWithResidue,tokenTag:int) = 
-        use t = Trace.Call("SyncOp","GetDeclarations", fun _->sprintf " at=(%d:%d),names=%+A" line colAtEndOfNames names)
-        runSyncOp (fun () -> DeclarationSet(scope.GetDeclarations line lineStr colAtEndOfNames names))
-
-    /// Resolve the names at the given location to give a data tip 
-    member info.GetDataTipText((x1,x2),lineStr,names:Names,tokenTag:int) = 
-        use t = Trace.Call("SyncOp","GetDataTipText", fun _->sprintf " at=(%d:%d),names=%+A tag=%d tokenId=%+A" x1 x2 names tokenTag (tokenTagToTokenId tokenTag))
-        match tokenTagToTokenId tokenTag with 
-        | TOKEN_IDENT -> 
-            runSyncOp (fun () -> TextResult(scope.GetDataTipText x1 lineStr x2 names))
-        | TOKEN_STRING | TOKEN_STRING_TEXT -> 
-            runSyncOp (fun () -> TextResult(scope.GetReferenceResolutionDataTipText(x1,lineStr,x2)))        
-        | _ -> TextResult(("",None))
-
-    member info.GetF1Keyword ((line,colAtEndOfNames),lineStr,names) : string option =
-        use t = Trace.Call("SyncOp","GetF1Keyword", fun _->sprintf " at=(%d:%d),names=%+A" line colAtEndOfNames names)
-        runSyncOp (fun () -> scope.GetF1Keyword line lineStr colAtEndOfNames names)
-
-
-    // Resolve the names at the given location to a set of methods
-    member info.GetMethods((x1,x2):Position,lineStr:string,names:Names option,tokenTag:int) =
-        use t = Trace.Call("SyncOp","GetMethods", fun _->sprintf " at=(%d:%d),names=%+A" x1 x2 names)
-        runSyncOp (fun () -> scope.GetMethods x1 lineStr x2 names)
-            
-    member info.GetDeclarationLocationInternal (forceFsiGeneration : bool)((x1, x2) : Position, lineStr:string, names : Names, tokenTag : int, flag : bool) = 
-        use t = Trace.Call("SyncOp","GetDeclarationLocation", fun _->sprintf " at=(%d:%d),names=%+A,flag=%+A" x1 x2 names flag)
-        let result = ref None
-        let GetDeclarationLocation() = 
-            let res = scope.GetDeclarationLocationInternal forceFsiGeneration x1 lineStr x2 names (Some (tokenTagToTokenId tokenTag)) flag 
-            let res =
-                match res with
-                | FindDeclResult.NeedToGenerate (s, fnf, nm) -> 
-                    // NOTE: This will be called only when 'enableInterfaceGeneration' is set to 'true'
-                    assert(enableInterfaceGeneration())
-                    match (fsiGens fnf s) with
-                    | Some (f, m, assms) -> 
-                        
-
-                        // Search for the item that has specified name as the prefix
-                        // This fixes the issue when reported name contains additional items (to be unique)
-                        // such as ["Class"; "foo"; "1"; "Static"] and we're looking for ["Class"; "foo"]
-                        let rec tryGetValueUsingPrefix (names:ResizeArray) =
-                            let ok, point = m.TryGetValue(List.of_seq names) 
-                            if ok then ok, point
-                            else 
-                                names.RemoveAt(names.Count - 1)
-                                tryGetValueUsingPrefix names
-                    
-                        let ok,point = tryGetValueUsingPrefix (ResizeArray.of_list nm)
-                        if ok then 
-                            let x,y = point
-                            FindDeclResult.DeclFound ((y, x), f, assms)
-                        else FindDeclResult.DeclFound ((0, 0), f, assms) // couldn't find the identifier; let's show the file anyhow
-                    | None -> FindDeclResult.NoDeclInfo
-                | _ -> res
-            result:=Some(res)
-        syncop GetDeclarationLocation
-        Option.get !result
-
-    /// Resolve the names at the given location to the declaration location of the corresponding construct
-    member info.GetDeclarationLocation (p, lineStr, names, tokenTag, flag) = info.GetDeclarationLocationInternal false (p, lineStr, names, tokenTag, flag)
-
-/// Information about the compilation environment    
-module CompilerEnvironment =
-    /// These are the names of assemblies that should be referenced for scripting (.fsx)
-    let DefaultReferencesForScripting = scriptingFramework
-    
-    /// These are the names of assemblies that should be referenced for .fs, .ml, .fsi, .mli files that
-    /// are not asscociated with a project
-    let DefaultReferencesForOrphanSources = coreFramework @ extendedFramework
-    
-    // Apply command-line arguments.
-    let ApplyCommandLineArgumentsToTcConfig(commandLineArgs, tcConfig) =
-        try
-            ParseCompilerOptions
-                (fun sourceOrDll -> () )
-                (Fscopts.GetCoreServiceCompilerOptions tcConfig)
-                commandLineArgs             
-        with e -> errorRecovery e range0
-
-#if TRYING_TO_FIX_4577
-#else
-    let ProjectGlobalsScope(projectDir) = 
-        if String.IsNullOrEmpty(projectDir) then null
-        else 
-            let savedDirectory = System.IO.Directory.GetCurrentDirectory()
-            System.IO.Directory.SetCurrentDirectory(projectDir)
-            {new IDisposable with
-                member d.Dispose() = 
-                    System.IO.Directory.SetCurrentDirectory(savedDirectory) }
-#endif        
-
-    /// Create a type-check configuration
-    let CreateTcConfig(projectDir,commandLineArgs,mainFileName:string) =  
-        let defaultFSharpBinariesDir = 
-            match Internal.Utilities.FSharpEnvironment.FSharpRunningBinFolder with 
-                  Some(dir)->dir 
-                | None -> System.Environment.GetEnvironmentVariable("mFSharp_BinDir")     
-    
-#if TRYING_TO_FIX_4577
-#else
-        use unwind = ProjectGlobalsScope(projectDir)
-#endif        
-        let tcConfigB = Build.TcConfigBuilder.CreateNew(defaultFSharpBinariesDir, true (* optimize for memory *), projectDir) 
-        // The following uses more memory but means we don't take read-exclusions on the DLLs we reference 
-        // Could detect well-known assemblies--ie System.dll--and open them with read-locks 
-        tcConfigB.openBinariesInMemory <- true;
-        tcConfigB.resolutionEnvironment 
-            <- if SourceFile.MustBeSingleFileProject(mainFileName) 
-                then MSBuildResolver.RuntimeLike 
-                else MSBuildResolver.CompileTimeLike
-
-        ApplyCommandLineArgumentsToTcConfig(commandLineArgs, tcConfigB)
-        
-        if tcConfigB.framework then
-            // ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
-            // If you see a failure here running unittests consider whether it it caused by 
-            // a mismatched version of Microsoft.Build.Framework. Run unittests under a debugger. If
-            // you see an old version of Microsoft.Build.*.dll getting loaded it it is likely caused by
-            // using an old ITask or ITaskItem from some tasks assembly.
-            // I solved this problem by adding a Unittests.config.dll which has a binding redirect to 
-            // the current (right now, 4.0.0.0) version of the tasks assembly.
-            // ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
-            System.Diagnostics.Debug.Assert(false, "Language service requires --noframework flag")
-            tcConfigB.framework<-false
-        tcConfigB 
-
-    /// Gets compiler defines.
-    let CreateEditorDefines(filename:string, compilerFlags :string list) =
-        use t = Trace.Call("CompilerEnvironment","CreateEditorDefines", fun () -> sprintf "filename = %s, compilerFlags = %A" filename compilerFlags)
-        // Ignore errors in command line args on this path
-        // Ideally we would explicitly install DiscardErrorsLogger here. However different threads are using the error logger!
-        // Indeed we really have to move to a model where the error logger is passed explicitly everywhere in the codebase.
-        // For the moment we jsut make the default global error logger discard errors.
-        // use unwind = InstallGlobalErrorLogger (fun _ -> DiscardErrorsLogger)
-        let tcConfigB = CreateTcConfig(@"C:\" (*dummy path unused*), compilerFlags, filename) 
-        let tcConfig = TcConfig.Create(tcConfigB,validate=false)
-        
-        let defines = tcConfig.conditionalCompilationDefines  
-        let defines = SourceFile.AdditionalDefinesForUseInEditor(filename) @ defines
-        defines    
-                
-    let definesCache = MruCache(Flags.definesCacheSize, CreateEditorDefines)              
-    
-    /// Publish compiler-flags parsing logic
-    let GetCompilationDefinesForEditing(filename:string, compilerFlags : string list) =
-        definesCache.Get((filename,compilerFlags))
-
-/// Information about the debugging environment
-module DebuggerEnvironment =
-    /// Return the language ID, which is the expression evaluator id that the
-    /// debugger will use.
-    let GetLanguageID() =
-        System.Guid(0xAB4F38C9u, 0xB6E6us, 0x43baus, 0xBEuy, 0x3Buy, 0x58uy, 0x08uy, 0x0Buy, 0x2Cuy, 0xCCuy, 0xE3uy)
-        
-[]
-type TypeCheckResults(errors: ErrorInfo array,
-                      scope: TypeCheckInfo option,
-                      untypedInfo : UntypedParseInfo) =
-    member pr.Errors = errors
-    member pr.TypeCheckInfo = scope
-    member pr.UntypedParse = untypedInfo
-    
-/// Callbacks to notify of background changes
-[]  
-type BackgroundCompilerEvents = 
-    {   FileTypeCheckStateIsDirty: string -> unit }
-
-// Identical to _VSFILECHANGEFLAGS in vsshell.idl
-type DependencyChangeCode =
-    | Nil = 0x00000000 // Not an actual value - here to make FxCop happy
-    | FileChanged = 0x00000001
-    | TimeChanged = 0x00000002
-    | Size = 0x00000004
-    | Deleted = 0x00000008
-    | Added = 0x00000010        
-    
-module Reactor =
-    open Microsoft.FSharp.Control
-
-      
-
-    type ReactorCommands = 
-        /// Kick off a build.
-        | StartBuild of ParseOptions                                  
-        /// Kick off the most recently known build.
-        | StartRecentBuild                                            
-        /// Do a bit of work on the given build.
-        | Step                                                        
-        /// Do some work synchronized in the mailbox.
-        | SyncOp of (unit->unit) * AsyncReplyChannel>  
-        /// Do some work not synchronized in the mailbox.
-        | AsyncOp of (unit->unit) 
-        /// Stop building after finishing the current unit of work.
-        | StopBuild of AsyncReplyChannel>              
-        /// Finish building.
-        | FinishBuild of AsyncReplyChannel>            
-        override rc.ToString() = 
-            match rc with
-            | StartBuild _->"StartBuild" 
-            | StartRecentBuild -> "StartRecentBuild"
-            | Step->"Step"
-            | SyncOp _->"SyncOp" 
-            | AsyncOp _->"AsyncOp" 
-            | StopBuild _->"StopBuild"
-            | FinishBuild _->"FinishBuild"
-        
-    type ReactorState = 
-        | Idling
-        | ActivelyBuilding of ParseOptions
-        | FinishingBuild of ParseOptions * AsyncReplyChannel>
-        | BackgroundError of Exception                                         // An exception was seen in a prior state. The exception is preserved so it can be thrown back to the calling thread.
-        override rs.ToString() = 
-            match rs with 
-            | Idling->"Idling" 
-            | ActivelyBuilding _->"ActivelyBuilding"
-            | FinishingBuild _->"FinishingBuild" 
-            | BackgroundError _->"BackgroundError"
-
-     []
-     /// There is one global Reactor for the entire language service, no matter how many projects or files
-     /// are open. 
-     type Reactor(backgroundCompilerEvents:BackgroundCompilerEvents) = 
-        //------------------------------------------------------------------------------------
-        // Rules for reactive building.
-        //
-        // This phrases the compile as a series of vector functions and vector manipulations.
-        //
-        // Rules written in this language are then transformed into a plan to execute the 
-        // various steps of the process in small parts.
-        //-----------------------------------------------------------------------------------
-        let CreateIncrementalBuilder (options:ParseOptions) =
-            use t = Trace.Call("Reactor","CreateIncrementalBuilder", fun () -> sprintf "options = %+A" options)
-#if TRYING_TO_FIX_4577
-#else
-            // Set the project directory
-            use unwind = CompilerEnvironment.ProjectGlobalsScope(options.ProjectDirectory)
-#endif            
-            // Trap and report warnings and errors from creation.
-            use errorScope = new ErrorScope()
-
-            // Create the builder.         
-            let resourceManager = new Lexhelp.LexResourceManager() 
-            let sourceFiles = (options.ProjectFileNames|>Array.to_list)
-            
-            let commandLineArgs = options.ProjectOptions |> Array.to_list 
-
-            // Build initial TC config
-            let tcConfigB = CompilerEnvironment.CreateTcConfig(options.ProjectDirectory, commandLineArgs, options.FileName)
-            let outfile,pdbfile,assemblyName = tcConfigB.DecideNames sourceFiles
-            
-            let tcConfig = TcConfig.Create(tcConfigB,validate=true)
-            // Share intern'd strings across all lexing/parsing
-            let niceNameGen = NiceNameGenerator()
-            let lexResourceManager = new Lexhelp.LexResourceManager()             
-            
-            // Sink internal errors and warnings.
-            let warnSink (exn:exn) = Trace.PrintLine("IncrementalBuild", (exn.ToString >> sprintf "Background warning: %s"))
-            let errorSink (exn:exn) = Trace.PrintLine("IncrementalBuild", (exn.ToString >> sprintf "Background error: %s"))
-
-            //--------------------------------------------------------------------------------------------------------
-            // Background notifications switched back to the given thread context.
-            //--------------------------------------------------------------------------------------------------------
-            let HandleBackgroundBeforeTypeCheckFile(filename:string) =
-                backgroundCompilerEvents.FileTypeCheckStateIsDirty(filename)                
-                            
-            let builder, dependencyFiles = 
-                let errorLogger =
-                    { new ErrorLogger with 
-                         member x.ErrorCount=0;
-                         member x.WarnSink(e)=warnSink e;
-                         member x.ErrorSink(e)=errorSink e }
-                IncrementalFSharpBuild.Create (tcConfig, options.ProjectDirectory, assemblyName, niceNameGen,
-                                               resourceManager, sourceFiles, 
-                                               true, // stay reactive
-                                               { BeforeTypeCheckFile = HandleBackgroundBeforeTypeCheckFile },
-                                               errorLogger,
-                                               (fun (e:exn)->raise e))
-                                     
-            Trace.PrintLine("IncrementalBuild", fun () -> sprintf "CreateIncrementalBuilder: %A" dependencyFiles)
-#if DEBUG
-            dependencyFiles |> List.iter (fun df -> System.Diagnostics.Debug.Assert(System.IO.Path.IsPathRooted(df.Filename), sprintf "dependency file was not absolute: '%s'" df.Filename))
-#endif
-            (tcConfig, builder, dependencyFiles, errorScope.ErrorsAndWarnings)
-                                      
-        /// Cache of builds keyed by options.        
-        let buildCache = MruCache(Flags.buildCacheSize, CreateIncrementalBuilder, areSame = ParseOptions.AreSameProject, areSameForSubsumption = ParseOptions.AreSameProjectName)
-        
-        /// See if the build cache needs to be invalidated. Return true if there was an invalidation.
-        let InvalidateBuildCacheEntry(options,changedFiles: (string * DependencyChangeCode) list) = 
-            let t = Trace.Call("ChangeEvents","InvalidateBuildCacheEntry", fun _ -> sprintf "Received notification to invalidate build. Changed files are:\n%A" changedFiles)
-          
-            match buildCache.GetAvailable(options) with
-            | None -> ()
-            | Some(tcConfigA,builderA,dependencyFilesA,errorsA) ->
-                let IsExistentialChangeCode(file,code) =
-                    (int (code &&& (DependencyChangeCode.Added ||| DependencyChangeCode.Deleted)))<>0
-            
-                // The list of adds and deletes                              
-                let existenceChange = changedFiles 
-                                        |> List.filter IsExistentialChangeCode
-                                        |> List.map fst
-    
-                // The list of files for which an add or delete would cause a refresh of the TcConfig                                        
-                let existenceDependencies = dependencyFilesA 
-                                            |> List.filter(fun dep -> dep.ExistenceDependency) 
-                                            |> List.map(fun dep -> dep.Filename)
-                
-                // REVIEW: this doesn't look correct - we are ignoring the names in 'existenceChange'
-                let acc (last:bool) (file:string) : bool = 
-                    last or List.exists (fun s->true) existenceChange
-                let configurationRefresh = existenceDependencies |> List.fold acc false
-            
-                if configurationRefresh then 
-                    Trace.PrintLine("ChangeEvents", fun _ -> "Refreshing configuration")
-                
-                    let tcConfigB, builderB, dependencyFilesB, errorsB = CreateIncrementalBuilder(options)
-                    buildCache.SetAlternate(options, (tcConfigB, builderB, dependencyFilesB, errorsB))
-                else 
-                    Trace.PrintLine("ChangeEvents", fun _ -> "Not refreshing configuration because the change indicated only an incremental build is needed")
-            
-
-
-        /// Get the antecedant typecheck state for the give file (in the options). Return none if not available.        
-        let GetAntecendantResultWithoutSideEffects(options) = 
-            match buildCache.GetAvailable(options) with
-            | Some(_,build,dependencyFiles,createErrors) ->
-                let slotOfFile = IncrementalFSharpBuild.GetSlotOfFileName(options.FileName, build)
-                Some(build, dependencyFiles, createErrors, IncrementalFSharpBuild.GetAntecedentTypeCheckResultsBySlot(slotOfFile,build))
-            | None->None        
-        
-        
-        /// Parses the source file and returns untyped AST
-        let UntypedParseImpl (source,options) syncop =         
-            Trace.PrintLine("CompilerServices", fun _ -> "Service.UntypedParseImpl")
-            use t = Trace.CallByThreadNamed("Reactor", "UntypedParseImpl", "ThreadPool", fun _->"")  
-            
-            let tcConfig,_,dependencyFiles,_ = buildCache.Get(options) // Q: Whis it it ok to ignore createErrors in the build cache? A: These errors will be appended into the typecheck results
-                
-            // Do the parsing.
-            let parseErrors, matchPairs, inputOpt, anyErrors = 
-                Parser.parseSource
-                    source 
-                    false
-                    true
-                    options.FileName
-                    (options.ProjectFileNames |> Array.to_list)
-                    tcConfig
-                     
-            // Strip everything but the file name.
-            let dependencyFiles = dependencyFiles |> List.map (fun dep->dep.Filename)
-
-            UntypedParseInfo(parsed = { Errors = parseErrors; 
-                                        Input = inputOpt;  
-                                        StopErrorReporting = anyErrors
-                                        DependencyFiles = dependencyFiles},
-                             syncop = syncop) 
-
-        /// Parses the source file and returns untyped AST
-        let MatchBracesImpl (source,options) syncop =         
-            Trace.PrintLine("CompilerServices", fun _ -> "Service.MatchBracesImpl")
-            use t = Trace.CallByThreadNamed("Reactor", "MatchBracesImpl", "ThreadPool", fun _->"")  
-            let tcConfig,_,_,_ = buildCache.Get(options)
-            // Do the parsing.
-            let parseErrors, matchPairs, inputOpt, anyErrors = 
-                Parser.parseSource
-                    source 
-                    true
-                    false
-                    options.FileName
-                    (options.ProjectFileNames |> Array.to_list)
-                    tcConfig
-                     
-            matchPairs |> Array.map (fun (s1,s2,s3,s4,s5,s6,s7,s8) -> ((s1,s2),(s3,s4)),((s5,s6),(s7,s8)))
-            
-        /// Type-check the result obtained by parsing
-        /// The input should be first parsed using 'UntypedParseImpl'
-        let TypeCheckSourceImpl (parseResult:UntypedParseResults) source options syncop = 
-            use t = Trace.CallByThreadNamed("Reactor", "TypeCheckSourceImpl", "ThreadPool", fun _->"")  
-            match GetAntecendantResultWithoutSideEffects(options) with
-            | Some(build,dependencyFiles,createErrors,Some(tcPriorState,tcImports,tcGlobals,tcConfig,antecedantTimeStamp)) -> 
-            
-                // Run the function
-                let suppressTypecheckErrors = parseResult.StopErrorReporting 
-                let tcErrors, scopeOpt = 
-                  Parser.typeCheckSource
-                    parseResult.Input
-                    source
-                    options.FileName
-                    options.ProjectFileName                    
-                    tcConfig
-                    tcGlobals
-                    tcImports   
-                    tcPriorState
-                    syncop
-                    suppressTypecheckErrors
-                          
-                // Collect thunks for .fsi generators used by GotoDefinition
-                let (generators, build) = IncrementalFSharpBuild.GetFsiGenerators build                       
-                                                    
-                // Append all the errors together.
-                let errors = 
-                    [| yield! createErrors; 
-                       yield! parseResult.Errors
-                       if options.IsIncompleteTypeCheckEnvironment then 
-                           yield! Seq.truncate Flags.maxErrorsOutOfProjectContext tcErrors
-                       else 
-                           yield! tcErrors |]
-                
-                let res = 
-                    TypeCheckResults (errors              = errors,
-                                      scope               = (scopeOpt |> Option.map (fun v -> TypeCheckInfo (v, generators, syncop))),
-                                      untypedInfo         = new UntypedParseInfo(parseResult, syncop))   
-                
-                Some res
-            | _ -> 
-                // Either the builder did not exist or the antecedent to the slot was not ready. Return 'None'.
-                // The caller will send a request for a background build of this project. This
-                // will create the builder and notify the UI when the antecedent to the slot is ready. 
-                None  
-
-        /// Mailbox dispatch function.                
-        let Dispatch (inbox:MailboxProcessor<_>) =
-        
-            // Post an exception back to FinishingBuild channel.
-            let UnexpectedFinishingBuild commandName (channel:AsyncReplyChannel<_>) = 
-                channel.Reply(Exception (new Exception(sprintf "[Bug]Did not expect %s during FinishingBuild." commandName)))        
-                
-            // Kick off a build.
-            let HandleStartBuild options state = 
-                inbox.Post Step
-                match state with 
-                | ActivelyBuilding(_) 
-                | Idling -> ActivelyBuilding options 
-                | FinishingBuild(_) -> state
-                | BackgroundError(_)-> state
-                
-            // Kick off a build of the most recently known project if there is one.
-            let HandleStartRecentBuild = function
-                | Idling -> 
-                    match buildCache.MostRecent with
-                    | Some(options,_)->HandleStartBuild options Idling
-                    | None -> Idling
-                | state -> state
-                
-            // Stop the build.
-            let HandleStopBuild (channel:AsyncReplyChannel<_>) state = 
-                buildCache.Clear()
-                match state with 
-                  | ActivelyBuilding(_) 
-                  | Idling -> channel.Reply(Result ())
-                  | FinishingBuild(options,channel) -> UnexpectedFinishingBuild "StopBuild" channel
-                  | BackgroundError(e)-> channel.Reply(Exception e)
-                Idling
-                
-            // Do the given operation
-            let HandleAsyncOp op state = 
-                use t = Trace.CallByThreadNamed("Reactor", "HandleAsyncOp", "ThreadPool", fun _->sprintf "state=%+A" state)            
-                match state with
-                  | ActivelyBuilding(_) 
-                  | BackgroundError(_)
-                  | Idling -> 
-                        try 
-                            op()
-                            state                            
-                        with e->
-                            System.Diagnostics.Debug.Assert(false, sprintf "Bug in target of HandleAsyncOp: %A: %s\nThe most recent error reported to an error scope: %A\n%+A\n" (e.GetType()) e.Message ErrorScope.MostRecentError e.StackTrace)
-                            state
-                  | FinishingBuild(options,oldChannel) -> 
-                        UnexpectedFinishingBuild "AsyncOp" oldChannel
-                        Idling
-                
-            // Do the given operation and reply
-            let HandleSyncOp op (channel:AsyncReplyChannel<_>) state = 
-                use t = Trace.CallByThreadNamed("Reactor", "HandleSyncOp", "ThreadPool", fun _->sprintf "state=%+A" state)            
-                match state with
-                  | ActivelyBuilding(_) 
-                  | Idling -> 
-                        try 
-                            op()
-                            channel.Reply(Result ())
-                            state                            
-                        with e->
-                            System.Diagnostics.Debug.Assert(false, sprintf "Bug in target of HandleSyncOp: %A: %s\nThe most recent error reported to an error scope: %A\n%+A\n" (e.GetType()) e.Message ErrorScope.MostRecentError e.StackTrace)
-                            channel.Reply(Exception e)
-                            state
-                  | FinishingBuild(options,oldChannel) -> 
-                        UnexpectedFinishingBuild "SyncOp" channel
-                        UnexpectedFinishingBuild "SyncOp" oldChannel
-                        Idling
-                  | BackgroundError(e)->
-                        channel.Reply(Exception e)
-                        Idling
-                
-            // Do a step in the build.
-            let HandleStep state = 
-                use t = Trace.CallByThreadNamed("Reactor", "HandleStep", "ThreadPool", fun _->sprintf "state=%+A" state)            
-                match state with
-                | FinishingBuild(options,_) 
-                | ActivelyBuilding options -> 
-                    // Gather any require reply channel.
-                    let replyChannel = 
-                        match state with 
-                        | Idling | ActivelyBuilding(_) | BackgroundError(_)->None
-                        | FinishingBuild(_,channel)->Some(channel)
-                    
-                    try
-                        // Do the step.
-                        let tcConfig,last,dependencyFiles,createErrors = buildCache.Get(options)
-                        let next = IncrementalFSharpBuild.Step(last)
-                        
-                        // Did the step do work?
-                        match next with
-                        | Some(next)->
-                            buildCache.SetAlternate(options,(tcConfig,next,dependencyFiles,createErrors))
-                            inbox.Post Step
-                            state
-                        | None-> 
-                            match replyChannel with
-                             | Some(replyChannel)-> replyChannel.Reply(Result ())    
-                             | None->()
-                            
-                            // Switch to idle state.
-                            Idling
-                     with e->
-                        System.Diagnostics.Debug.Assert(false, sprintf "[Bug]Failure in HandleStep: %s" (e.ToString()))
-                        Trace.PrintLine("CompilerServices", fun _ -> sprintf "[Bug]Failure in HandleStep: %+A\n" e)
-                        match replyChannel with
-                        | Some(replyChannel)->
-                            replyChannel.Reply(Exception e)
-                            Idling
-                        | None->BackgroundError e                 
-                | Idling -> Idling
-                | BackgroundError(e)->state
-                        
-            
-            let HandleFinishBuilding (channel:AsyncReplyChannel<_>) = function
-                | ActivelyBuilding(options)->
-                    inbox.Post Step
-                    FinishingBuild(options,channel)
-                | FinishingBuild(options,channelOld)->
-                    // Don't expect to get here. If this is required then we need to keep all channels and post back to each
-                    // when the build finishes. For now, throw an exception back.                    
-                    UnexpectedFinishingBuild "FinishBuilding" channel
-                    UnexpectedFinishingBuild "FinishBuilding" channelOld
-                    Idling
-                | Idling->
-                    channel.Reply(Result ())
-                    Idling
-                | BackgroundError e->
-                    // We have a waiting channel to post our exception to.
-                    channel.Reply(Exception e)
-                    Idling
-                    
-                                             
-            // Async workflow which receives messages and dispatches to worker functions.
-            let rec Loop (state:ReactorState) = 
-                Trace.PrintLine("Reactor", fun () -> sprintf "Background compiler state is now: %s\n" (state.ToString()))
-                async { let! msg = inbox.Receive()
-                        Trace.PrintLine("Reactor", fun () -> sprintf "Background compiler about to process message %s\n" (msg.ToString()))
-                        match msg with
-                        | StartBuild options -> return! Loop(HandleStartBuild options state)
-                        | StartRecentBuild -> return! Loop(HandleStartRecentBuild state)
-                        | Step -> return! Loop(HandleStep state)
-                        | SyncOp(op,channel) -> return! Loop(HandleSyncOp op channel state)
-                        | AsyncOp(op) -> return! Loop(HandleAsyncOp op state)
-                        | StopBuild(channel) -> return! Loop(HandleStopBuild channel state)
-                        | FinishBuild(channel) -> return! Loop(HandleFinishBuilding channel state)
-                      }
-            Loop Idling
-            
-        let builder = MailboxProcessor<_>.Start(Dispatch)
-
-        // [Foreground Mailbox Accessors] -----------------------------------------------------------                
-        member r.StartBuilding(options) = builder.Post(StartBuild options)
-        member r.StartBuildingRecent() = builder.Post(StartRecentBuild)
-        member r.StopBuilding() = 
-            match builder.PostAndReply(fun replyChannel->StopBuild(replyChannel)) with
-            | Result result->result
-            | Exception excn->
-                Trace.PrintLine("CompilerServices", fun _ -> sprintf "[Bug]Exception in StopBuilding. Inner exception was:\n%+A\n%s" excn excn.StackTrace)
-                raise excn
-        member r.SyncOp(op) =
-            match builder.PostAndReply(fun replyChannel->SyncOp(op,replyChannel)) with
-            | Result result->result
-            | Exception excn->
-                Trace.PrintLine("CompilerServices", fun _ -> sprintf "[Bug]Exception in SyncOp Inner exception was:\n%+A\n%s" excn excn.StackTrace)
-                raise excn
-
-        member r.AsyncOp(op) =
-            builder.Post(AsyncOp(op)) 
-
-        member r.UntypedParse(inputs)=
-            use t = Trace.Call("SyncOp","UntypedParse", fun _->"")
-            let result = ref None
-            let UntypedParseOp () =
-                result:=Some(UntypedParseImpl inputs r.SyncOp)
-            r.SyncOp UntypedParseOp
-            Option.get !result
-        member r.MatchBraces(inputs)=
-            use t = Trace.Call("SyncOp","MatchBraces", fun _->"")
-            let result = ref None
-            let MatchBracesOp () =
-                result:=Some(MatchBracesImpl inputs r.SyncOp)
-            r.SyncOp MatchBracesOp
-            Option.get !result
-
-        member r.TypeCheckSource(parseSourceRes,source,options)=
-            use t = Trace.Call("SyncOp","TypeCheckSource", fun _->"")
-            let result = ref None
-            let TypeCheckSourceOp () =
-                result:=Some(TypeCheckSourceImpl parseSourceRes source options r.SyncOp)
-            r.SyncOp TypeCheckSourceOp
-            Option.get !result
-            
-        member r.InvalidateConfiguration(options : ParseOptions, changedFiles: (string * DependencyChangeCode) list) =
-            use t = Trace.Call("SyncOp","InvalidateConfiguration", fun _->"")
-            r.AsyncOp (fun () -> InvalidateBuildCacheEntry(options,changedFiles))
-            r.StartBuilding(options) 
-            ()
-                    
-        member r.WaitForBackgroundCompile() =
-            match builder.PostAndReply(fun replyChannel->FinishBuild(replyChannel)) with
-            | Result result->result
-            | Exception excn->
-                Trace.PrintLine("CompilerServices", fun _ -> sprintf "[Bug]Exception in WaitForBackgroundCompile Inner exception was:\n%+A\n%s" excn excn.StackTrace)
-                raise excn
-    
-
-[]
-[]
-type InteractiveChecker(backgroundCompilerEvents) = 
-    let reactor = new Reactor.Reactor(backgroundCompilerEvents)
-    static let mutable foregroundParseCount = 0
-    static let mutable foregroundTypeCheckCount = 0
-    
-    
-    /// Determine whether two sets of sources and parse options are the same.
-    let AreSameForParsing((s1,o1),(s2,o2:ParseOptions)) =
-        let same = 
-            o1.FileName=o2.FileName
-            && ParseOptions.AreSameProject(o1,o2)
-        same && s1 = s2
-        
-    /// Determine whether two sets of sources and parse options should be subsumed under the same project.
-    let AreSubsumableForParsing((s1,o1),(s2,o2)) =
-        ParseOptions.AreSameProjectName(o1,o2)
-        
-    // Parse using reactor
-    let ComputeBraceMatching(source,options) = 
-        Trace.PrintLine("CompilerServices", fun () -> sprintf "ComputeBraceMatching, FileName = %s\n  " options.FileName) 
-        reactor.MatchBraces(source,options)
-
-
-    let braceMatchMru = MruCache<_,_>(Flags.braceMatchCacheSize,ComputeBraceMatching,areSame=AreSameForParsing,areSameForSubsumption=AreSubsumableForParsing,isStillValid=(fun _ -> true)) 
-
-    // /// Cache which holds recently seen parses, up to one for each file, keyed by source text and parse/project options for the file
-    // let parseLookup = AgedLookup<(string * ParseOptions),UntypedParseInfo>(8) 
-    
-    /// Cache which holds recently seen type-checks, no more than one for each file.
-    /// This cache may hold out-of-date entries, in two senses
-    ///    - there may be a more recent antecedent state available because the background build has made it available
-    ///    - the source for the file may have changed
-    
-    let typeCheckLookup = AgedLookup(recentForgroundTypeCheckLookupSize) 
-
-    /// Instantiate an interactive checker.    
-    static member Create (backgroundCompilerEvents) = new InteractiveChecker(backgroundCompilerEvents)
-
-    /// Parse a source code file, returning an information about the untyped results
-    /// and the results needed for further processing using 'TypeCheckSource'
-    member ic.MatchBraces(source,options) =
-        let pair = (source,options)
-        braceMatchMru.Get(pair)
-
-    /// Parse a source code file, returning an information about the untyped results
-    /// and the results needed for further processing using 'TypeCheckSource'
-    member ic.UntypedParse(source,options) =
-        Trace.PrintLine("CompilerServices", fun () -> sprintf "UntypedParse, FileName = %s\n  " options.FileName) 
-        foregroundParseCount <- foregroundParseCount + 1
-        reactor.UntypedParse(source,options)
-        
-    /// Try to get recent approximate type check results for a file. 
-    member ic.TryGetRecentTypeCheckResultsForFile(options) =
-        match typeCheckLookup.TryGet(options) with
-        | Some res -> 
-            Trace.PrintLine("CompilerServices", fun () -> sprintf "TryGetRecentTypeCheckResults, OK, FileName = %s\n  " options.FileName) 
-            Some res
-        | _ -> 
-            None
-            
-    /// This function is called when the configuration is known to have changed for reasons not encoded in the ParseOptions.
-    /// For example, dependent references may have been deleted or created.
-    member ic.InvalidateConfiguration(options : ParseOptions, changedFiles: (string * DependencyChangeCode) list) =
-        reactor.InvalidateConfiguration(options,changedFiles)         
-              
-    /// TypeCheck a source code file, returning a handle to the results of the 
-    /// parse including the reconstructed types in the file.
-    member ic.TypeCheckSource(parseRes:UntypedParseInfo,source,options) =        
-        Trace.PrintLine("CompilerServices", fun () -> sprintf "TypeCheckSource, FileName = %s\n  " options.FileName) 
-        match reactor.TypeCheckSource(parseRes.Results,source,options) with 
-        | None ->
-            reactor.StartBuilding(options) 
-            None
-        | Some typedResults -> 
-            foregroundTypeCheckCount <- foregroundTypeCheckCount + 1
-            typeCheckLookup.Put(options,(parseRes,typedResults))            
-            Some typedResults
-        
-    /// Begin background parsing the given project.
-    member ic.StartBackgroundCompile(options) = reactor.StartBuilding(options) 
-    /// Stop the background compile.
-    member ic.StopBackgroundCompile() = reactor.StopBuilding()
-    /// Block until the background compile finishes.
-    member ic.WaitForBackgroundCompile() = reactor.WaitForBackgroundCompile()
-
-    static member GlobalForegroundParseCountStatistic = foregroundParseCount
-    static member GlobalForegroundTypeCheckCountStatistic = foregroundTypeCheckCount
-
-//----------------------------------------------------------------------------
-//INDEX: FsiIntelisense
-//----------------------------------------------------------------------------
-
-module FsiIntelisense =
-
-    let rec getLineIndex (text:string,offset) =
-        let crIndex = text.IndexOf("\n",StringComparison.Ordinal)
-        if crIndex <> -1 then
-            if offset <= crIndex then
-                0,offset,text
-            else
-                let text = text.Substring(crIndex + 1)
-                let line,index,text = getLineIndex (text,offset - (crIndex+1))
-                line+1,index,text
-        else
-            0,offset,text
-
-    let getDeclarations (tcConfig,tcGlobals,tcImports,tcState) (text:string)  names =
-        let syncop f = f() : unit
-        let mockFileName = "stdin.fs" (* Note: build.ml:ParseInput parses differently based on filename extension... *)
-        let _, _, inp, suppressTypecheckErrors = Parser.parseSource text false false mockFileName [] tcConfig 
-        let _, scopeOpt = Parser.typeCheckSource inp text mockFileName "project" tcConfig tcGlobals tcImports tcState syncop suppressTypecheckErrors
-        
-        match scopeOpt with
-          | Some scope when Array.length names > 0 -> 
-              let line,index,lineStr = getLineIndex (text,text.Length)                        
-              let res = scope.GetDeclarations line lineStr index (List.frontAndBack (List.of_array names))
-              let project i = 
-                  let name  = res.Name(i)
-                  let desc  = res.Description(i) |> fst
-                  let glyph = res.Glyph(i)
-                  let displ = name
-                  name,desc,displ,glyph
-              let results = Array.init res.Count project
-              results
-          | _       -> [| |]
-          
-module PrettyNaming =
-    let IsIdentifierPartCharacter     = Microsoft.FSharp.Compiler.PrettyNaming.IsIdentifierPartCharacter
-    let IsLongIdentifierPartCharacter = Microsoft.FSharp.Compiler.PrettyNaming.IsLongIdentifierPartCharacter
-    let GetLongNameFromString         = Microsoft.FSharp.Compiler.PrettyNaming.SplitNamesForFsiGenerationPath
diff --git a/tools/FSharp_1.9.6.16/source/fsharp/vs/service.mli b/tools/FSharp_1.9.6.16/source/fsharp/vs/service.mli
deleted file mode 100644
index d3cfc303..00000000
--- a/tools/FSharp_1.9.6.16/source/fsharp/vs/service.mli
+++ /dev/null
@@ -1,319 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved
-(*----------------------------------------------------------------------------
- * API to the compiler as an incremental service for lexing, parsing,
- * type checking and intellisense-like environment-reporting.
- *--------------------------------------------------------------------------*)
-
-#light 
-namespace Microsoft.FSharp.Compiler.SourceCodeServices
-
-open Microsoft.FSharp.Compiler 
-open Microsoft.FSharp.Compiler.Range
-open System.Collections.Generic
-
-/// Represents encoded information for the end-of-line continutation of lexing
-type LexState = int64
-
-/// A line/column pair
-type Position = int * int
-/// A start-position/end-position pair
-type Range = Position * Position
-
-type TokenColorKind =
-    | Default = 0
-    | Text = 0
-    | Keyword = 1
-    | Comment = 2
-    | Identifier = 3
-    | String = 4
-    | UpperIdentifier = 5
-    | InactiveCode = 7
-    | PreprocessorKeyword = 8
-    | Number = 9
-    
-type TriggerClass =
-    | None         = 0x00000000
-    | MemberSelect = 0x00000001
-    | MatchBraces  = 0x00000002
-    | ChoiceSelect = 0x00000004
-    | MethodTip    = 0x000000F0
-    | ParamStart   = 0x00000010
-    | ParamNext    = 0x00000020
-    | ParamEnd     = 0x00000040    
-    
-type TokenCharKind = 
-    | Default     = 0x00000000
-    | Text        = 0x00000000
-    | Keyword     = 0x00000001
-    | Identifier  = 0x00000002
-    | String      = 0x00000003
-    | Literal     = 0x00000004
-    | Operator    = 0x00000005
-    | Delimiter   = 0x00000006
-    | WhiteSpace  = 0x00000008
-    | LineComment = 0x00000009
-    | Comment     = 0x0000000A    
-    
-/// Information about a particular token from the tokenizer
-type TokenInformation = {
-    /// Left column of the token.
-    LeftColumn:int;
-    /// Right column of the token.
-    RightColumn:int;
-    ColorClass:TokenColorKind;
-    CharClass:TokenCharKind;
-    TriggerClass:TriggerClass;
-    /// The tag is an integer identifier for the token
-    Tag:int
-    /// Provides additional information about the token
-    TokenName:string }
-
-type Severity = Warning | Error
-
-type ErrorInfo = {
-    StartLine:int
-    EndLine:int
-    StartColumn:int
-    EndColumn:int
-    Severity:Severity
-    Message:string }
-    
-[]
-type TextResult =
-    /// The text to be displayed
-    member Text: string
-    /// The file related to the construct for which the DataTipText is being displayed and the XmlDoc string for the construct
-    member XMLFileAndSig: (string * string) option    
-    
-[]
-type Declaration =
-    member Name : string
-    member DescriptionText : TextResult
-    member Glyph : int
-    
-[]
-type DeclarationSet =
-    member Items : Declaration array
-    
-type Param = 
-    { Name: string;
-      Display: string;
-      Description: string }
-
-type Method = 
-    { Description : TextResult;
-      Type: string;
-      Parameters: Param array }
-
-[]
-type MethodOverloads = 
-    member Name: string;
-    member Methods: Method array 
-
-
-
-
-/// Represents an item to be displayed in the navigation bar
-[]
-type DeclarationItem = 
-    member Name : string
-    member UniqueName : string
-    member Glyph : int
-    member Range : Range
-    member BodyRange : Range
-    member IsSingleTopLevel : bool
-
-/// Represents top-level declarations (that should be in the type drop-down)
-/// with nested declarations (that can be shown in the member drop-down)
-type TopLevelDeclaration = 
-    { Declaration : DeclarationItem
-      Nested : DeclarationItem[] }
-      
-/// Represents result of 'GetNavigationItems' operation - this contains
-/// all the members and currently selected indices. First level correspond to
-/// types & modules and second level are methods etc.
-[]
-type NavigationItems =
-    member Declarations : TopLevelDeclaration[]
-    
-type FindDeclResult = 
-    ///  no identifier at this locn 
-    | IdNotFound    
-    /// no decl info in this buffer at the moment 
-    | NoDeclInfo   
-    /// found declaration; return (position-in-file, name-of-file, names-of-referenced-assemblies)
-    | DeclFound      of Position * string * (string list)
-    /// found declaration but source file doesn't exist; try to generate an .fsi
-    | NeedToGenerate of (*filename of .dll*) string * (*name-fixing function*)(string -> string) * (*fully-qualified identifier to goto*)(string list)
-     
-type Names = string list 
-type NamesWithResidue = Names * string 
-
-[]
-/// A handle to type information gleaned from typechecking the file. 
-type TypeCheckInfo  =
-    /// Resolve the names at the given location to a set of declarations
-    member GetDeclarations                : Position * string * NamesWithResidue * (*tokentag:*)int -> DeclarationSet
-    /// Resolve the names at the given location to give a data tip 
-    member GetDataTipText                 : Position * string * Names * (*tokentag:*)int -> TextResult
-    /// Resolve the names at the given location to give F1 keyword
-    member GetF1Keyword                   : Position * string * Names -> string option
-    // Resolve the names at the given location to a set of methods
-    member GetMethods                     : Position * string * Names option * (*tokentag:*)int -> MethodOverloads
-    /// Resolve the names at the given location to the declaration location of the corresponding construct
-    member GetDeclarationLocation         : Position * string * Names * (*tokentag:*)int * bool -> FindDeclResult
-    /// A version of `GetDeclarationLocation` augmented with the option (via the `bool`) parameter to force .fsi generation (even if source exists); this is primarily for testing
-    member GetDeclarationLocationInternal : bool -> Position * string * Names * (*tokentag:*)int * bool -> FindDeclResult
-
-[]
-/// A handle to the results of TypeCheckSource
-type TypeCheckResults =
-    /// The errors returned by parsing a source file
-    member Errors : ErrorInfo array
-    /// A handle to type information gleaned from typechecking the file. 
-    member TypeCheckInfo: TypeCheckInfo option
-
-[]
-type UntypedParseInfo = 
-    /// Name of the file for which this information were created
-    member FileName                       : string
-    /// Get declaraed items and the selected item at the specified location
-    member GetNavigationItems             : unit -> NavigationItems
-    /// Return the inner-most range associated with a possible breakpoint location
-    member ValidateBreakpointLocation : Position -> Range option
-    /// When these files change then the build is invalid
-    member DependencyFiles : unit -> string list
-    
-/// This type represents results obtained from parsing, before the type checking is performed
-/// It can be used for populating navigation information and for running the 
-/// 'TypeCheckSource' method to get the full information.
-type UntypedParseResults
-
-type ParseOptions =
-    { 
-      // The FileName is relevant to the ParseOptions because some aspects of the
-      // default environment depend on whether the file is a .fsx or .fs
-      FileName: string;
-      ProjectFileName: string;
-      ProjectFileNames: string array;
-      ProjectOptions: string array;
-      /// When true, the typechecking environment is known a priori to be incomplete. 
-      /// This can happen, for example, when a .fs file is opened outside of a project.
-      /// It may be appropriate, then, to not show error messages related to type checking
-      /// since they will just be noise.
-      IsIncompleteTypeCheckEnvironment : bool;
-    }
-    static member Defaults : ParseOptions
-         
-          
-/// Object to tokenize a line of F# source code, starting with the given lexState.  The lexState should be 0 for
-/// the first line of text. Returns an array of ranges of the text and two enumerations categorizing the
-/// tokens and characters covered by that range, i.e. TokenColorKind and TokenCharKind.  The enumerations
-/// are somewhat adhoc but useful enough to give good colorization options to the user in an IDE.
-///
-/// A new lexState is also returned.  An IDE-plugin should in general cache the lexState 
-/// values for each line of the edited code.
-[]
-type Tokenizer =
-    new : string * string list * string -> Tokenizer
-    member StartNewLine : unit -> unit 
-    member ScanToken : LexState -> Option * LexState
-    
-/// Information about the compilation environment    
-module CompilerEnvironment =
-    /// These are the names of assemblies that should be referenced for scripting (.fsx)
-    val DefaultReferencesForScripting : string list
-    /// These are the names of assemblies that should be referenced for .fs, .ml, .fsi, .mli files that
-    /// are not asscociated with a project.
-    val DefaultReferencesForOrphanSources : string list
-    /// Return the compilation defines that should be used when editing the given file.
-    val GetCompilationDefinesForEditing : filename : string * compilerFlags : string list -> string list
-
-/// Information about the debugging environment
-module DebuggerEnvironment =
-    /// Return the language ID, which is the expression evaluator id that the
-    /// debugger will use.
-    val GetLanguageID : unit -> System.Guid
-    
-/// Callbacks to notify of background changes.
-/// These will be called with a Post to the given SynchronizationContext
-[]
-type BackgroundCompilerEvents = 
-    {   /// This file has become eligible to be re-typechecked.
-        FileTypeCheckStateIsDirty: string -> unit }
-        
-// Identical to _VSFILECHANGEFLAGS in vsshell.idl
-type DependencyChangeCode =
-    | FileChanged = 0x00000001
-    | TimeChanged = 0x00000002
-    | Deleted = 0x00000008
-    | Added = 0x00000010        
-
-[]
-[]      
-type InteractiveChecker =
-    /// Create an instance of an InteractiveChecker.  Currently resources are not reclaimed.
-    static member Create : BackgroundCompilerEvents -> InteractiveChecker
-    /// Parse a source code file, returning information about brace matching in the file
-    /// Return an enumeration of the matching parethetical tokens in the file
-    member MatchBraces : source: string * options: ParseOptions -> (Range * Range) array
-    /// Parse a source code file, returning a handle that can be used for obtaining navigation bar information
-    /// To get the full information, call 'TypeCheckSource' method on the result
-    member UntypedParse : source: string * options: ParseOptions -> UntypedParseInfo
-
-    /// Typecheck a source code file, returning a handle to the results of the parse including
-    /// the reconstructed types in the file.
-    ///
-    /// Return None if the background builder is not yet done prepring the type check results for the antecedent to the 
-    /// file.
-    member TypeCheckSource : parsed: UntypedParseInfo * source: string * options: ParseOptions -> TypeCheckResults option
-
-    /// Try to get recent type check results for a file. This may arbitrarily refuse to return any
-    /// results if the InteractiveChecker would like a chance to recheck the file, in which case
-    /// UntypedParse and TypeCheckSource should be called. If the source of the file
-    /// has changed the results returned by this function may be out of date, though may
-    /// still be usable for generating intellsense menus and information.
-    member TryGetRecentTypeCheckResultsForFile : options: ParseOptions -> (UntypedParseInfo * TypeCheckResults) option
-        
-    /// This function is called when the configuration is known to have changed for reasons not encoded in the ParseOptions.
-    /// For example, dependent references may have been deleted or created.
-    member InvalidateConfiguration : options : ParseOptions * (string * DependencyChangeCode) list -> unit    
-
-    /// Begin background parsing the given project.
-    member StartBackgroundCompile : ParseOptions -> unit
-    /// Stop the background compile.
-    member StopBackgroundCompile : unit -> unit
-    /// Block until the background compile finishes.
-    member WaitForBackgroundCompile : unit -> unit
-    
-    /// Report a statistic for testability
-    static member GlobalForegroundParseCountStatistic : int
-
-    /// Report a statistic for testability
-    static member GlobalForegroundTypeCheckCountStatistic : int
-
-
-// These functions determine all declarations, called by fsi.fs for fsi-server requests.
-module FsiIntelisense =
-    val getDeclarations : Build.TcConfig * Env.TcGlobals * Build.TcImports * Build.tcState -> string -> string array -> (string * string * string * int) array
-
-module TestHooks =
-    val HookScope                                    : string * ((unit->unit)->unit) -> System.IDisposable
-    val EnableFsiGenerationHook                      : unit -> System.IDisposable
-    
-module TestExpose =     
-    val TokenInfo                                    : Parser.token -> (TokenColorKind * TokenCharKind * TriggerClass) 
-
-module PrettyNaming =
-    val IsIdentifierPartCharacter     : (char -> bool)
-    val IsLongIdentifierPartCharacter : (char -> bool)
-    val GetLongNameFromString         : (string -> Names)
-
-/// Information about F# source file names
-module SourceFile =
-   /// Whether or not this file is compilable
-   val IsCompilable : string -> bool
-   /// Whether or not this file should be a single-file project
-   val MustBeSingleFileProject : string -> bool
-   /// Is a file generated by the language service?
-   val IsFSharpLanguageServiceGenerated : string -> bool
diff --git a/tools/FSharp_1.9.6.16/source/fsppack-build.proj b/tools/FSharp_1.9.6.16/source/fsppack-build.proj
deleted file mode 100644
index e710a111..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack-build.proj
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-  
-    .
-  
-
-  
-
-  
-    
-  
-
-  
-  
-    
-    
-    
-    
-    
-    
-    
-  
-
-  
-  
-  
-    
-    
-    
-    
-    
-  
-
-  
-
-  
-
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack-proto-build.proj b/tools/FSharp_1.9.6.16/source/fsppack-proto-build.proj
deleted file mode 100644
index 2d4bf112..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack-proto-build.proj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-  
-    Proto
-  
-
-  
-  
-    
-    
-  
-
-  
-
-  
-
-
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/CodePlex.Settings.targets b/tools/FSharp_1.9.6.16/source/fsppack/CodePlex.Settings.targets
deleted file mode 100644
index 686ef8c3..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/CodePlex.Settings.targets
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-  
-    
-    Debug
-    AnyCPU
-  
-  
-    
-    bin\$(Configuration)
-    3
-  
-  
-  
-    full
-    false
-    DEBUG;TRACE
-    prompt
-  
-  
-    pdbonly
-    true
-    TRACE
-    prompt
-  
-
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/CodePlex.targets b/tools/FSharp_1.9.6.16/source/fsppack/CodePlex.targets
deleted file mode 100644
index f74da242..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/CodePlex.targets
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-  
-  
-          
-          true
-          1.9.6.15
-          $(FSharpSourcesRoot)\source-build-version 
-          true
-          $(FSharpSourcesRoot)\fsppack\$(Configuration)\bin
-  
-
-  
-
-  
-          
-  
-
-  
-  
-
-          $(FSharpSourcesRoot)\fsppack\Proto\bin
-          fslex-proto.exe
-          $(FSharpSourcesRoot)\fsppack\Proto\bin
-          fsyacc-proto.exe
-  
-
-  
-  
-
-          $(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin
-
-          $(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin
-          fsc.exe
-          $(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin
-          fslex.exe
-          $(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin
-          fsyacc.exe
-  
-
-
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/Fsharp.Compiler.CodeDom.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/Fsharp.Compiler.CodeDom.fsproj
deleted file mode 100644
index 1f516ca3..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/Fsharp.Compiler.CodeDom.fsproj
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-   ..\..  
-  
-  
-  
-    Debug
-    AnyCPU
-    {9EF49218-FD64-43A8-922B-84B1FF576773}
-    Library
-    FSharp.Compiler.CodeDom
-    true
-    v2.0
-    $(DefineConstants);INTERNALIZED_POWER_PACK
-  
-  
-    
-      assemblyinfo.FSharp.Compiler.CodeDom.dll.fs
-    
-    
-      CompilerLocationUtils.fs
-    
-    
-      HashSet.fsi
-    
-    
-      HashSet.fs
-    
-    
-    
-    
-    
-    
-  
-  
-    
-    
-      {DED3BBD7-53F4-428A-8C9F-27968E768605}
-      FSharp.Core
-    
-  
-  
-  
-  
-
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/assemblyinfo.FSharp.Compiler.CodeDom.dll.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/assemblyinfo.FSharp.Compiler.CodeDom.dll.fs
deleted file mode 100644
index 6c7a522d..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/assemblyinfo.FSharp.Compiler.CodeDom.dll.fs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Microsoft.FSharp
-open System.Reflection
-[]
-[]
-[]
-[]
-[]
-do()
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/codedomvisitor.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/codedomvisitor.fs
deleted file mode 100644
index ec8e954b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/codedomvisitor.fs
+++ /dev/null
@@ -1,100 +0,0 @@
-namespace Microsoft.FSharp.Compiler.CodeDom.Internal
-
-open System
-open System.IO
-open System.Text
-open System.Collections
-open System.CodeDom
-open System.CodeDom.Compiler
-
-//---------------------------------------------------------------------------------------------
-// This module contains several utility functions for walking through CodeDom tree
-module Visitor = 
-
-  // Get all relevant CodeDom properties of an object 
-  // - more functions can return properties for one object because of class hierarchy 
-  let memberMap = [
-      (fun (c:obj) -> match c with | :? CodeArrayCreateExpression as co -> [(co.CreateType:>obj); (co.Initializers:>obj); (co.SizeExpression:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeArrayIndexerExpression as co -> [(co.Indices:>obj); (co.TargetObject:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeAssignStatement as co -> [(co.Left:>obj); (co.Right:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeAttachEventStatement as co -> [(co.Event:>obj); (co.Listener:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeAttributeArgument as co -> [(co.Value:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeAttributeDeclaration as co -> [(co.AttributeType:>obj); (co.Arguments:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeBinaryOperatorExpression as co -> [(co.Left:>obj); (co.Operator:>obj); (co.Right:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeCastExpression as co -> [(co.Expression:>obj); (co.TargetType:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeCatchClause as co -> [(co.CatchExceptionType:>obj); (co.Statements:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeCommentStatement as co -> [(co.Comment:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeCompileUnit as co -> [(co.AssemblyCustomAttributes:>obj); (co.EndDirectives:>obj); (co.Namespaces:>obj); (co.StartDirectives:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeConditionStatement as co -> [(co.Condition:>obj); (co.FalseStatements:>obj); (co.TrueStatements:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeConstructor as co -> [(co.BaseConstructorArgs:>obj); (co.ChainedConstructorArgs:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeDefaultValueExpression as co -> [(co.Type:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeDelegateCreateExpression as co -> [(co.TargetObject:>obj); (co.DelegateType:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeDelegateInvokeExpression as co -> [(co.TargetObject:>obj); (co.Parameters:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeDirectionExpression as co -> [(co.Expression:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeEventReferenceExpression as co -> [(co.TargetObject:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeExpressionStatement as co -> [(co.Expression:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeFieldReferenceExpression as co -> [(co.TargetObject:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeIndexerExpression as co -> [(co.Indices:>obj); (co.TargetObject:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeIterationStatement as co -> [(co.IncrementStatement:>obj); (co.InitStatement:>obj); (co.Statements:>obj); (co.TestExpression:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeLabeledStatement as co -> [(co.Statement:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeMemberEvent as co -> [(co.ImplementationTypes:>obj); (co.PrivateImplementationType:>obj); (co.Type:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeMemberField as co -> [(co.InitExpression:>obj); (co.Type:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeMemberMethod as co -> [(co.ImplementationTypes:>obj); (co.Parameters:>obj); (co.PrivateImplementationType:>obj); (co.ReturnType:>obj); (co.ReturnTypeCustomAttributes:>obj); (co.Statements:>obj); (co.TypeParameters:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeMemberProperty as co -> [(co.GetStatements:>obj); (co.ImplementationTypes:>obj); (co.Parameters:>obj); (co.PrivateImplementationType:>obj); (co.SetStatements:>obj); (co.Type:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeMethodInvokeExpression as co -> [(co.Method:>obj); (co.Parameters:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeMethodReferenceExpression as co -> [(co.TargetObject:>obj); (co.TypeArguments:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeMethodReturnStatement as co -> [(co.Expression:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeNamespace as co -> [(co.Comments:>obj); (co.Imports:>obj); (co.Types:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeNamespaceImport as co -> [(co.LinePragma:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeObjectCreateExpression as co -> [(co.CreateType:>obj); (co.Parameters:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeParameterDeclarationExpression as co -> [(co.CustomAttributes:>obj); (co.Direction:>obj); (co.Type:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodePropertyReferenceExpression as co -> [(co.TargetObject:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeRemoveEventStatement as co -> [(co.Event:>obj); (co.Listener:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeStatement as co -> [(co.EndDirectives:>obj); (co.StartDirectives:>obj); (co.LinePragma:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeThrowExceptionStatement as co -> [(co.ToThrow:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeTryCatchFinallyStatement as co -> [(co.CatchClauses:>obj); (co.FinallyStatements:>obj); (co.TryStatements:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeTypeDeclaration as co -> [(co.BaseTypes:>obj); (co.Members:>obj); (co.TypeAttributes:>obj); (co.TypeParameters:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeTypeDelegate as co -> [(co.Parameters:>obj); (co.ReturnType:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeTypeMember as co -> [(co.Attributes:>obj); (co.Comments:>obj); (co.CustomAttributes:>obj); (co.EndDirectives:>obj); (co.LinePragma:>obj); (co.StartDirectives:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeTypeOfExpression as co -> [(co.Type:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeTypeParameter as co -> [(co.Constraints:>obj); (co.CustomAttributes:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeTypeReference as co -> [(co.ArrayElementType:>obj); (co.TypeArguments:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeTypeReferenceExpression as co -> [(co.Type:>obj);] | _ -> []);
-      (fun (c:obj) -> match c with | :? CodeVariableDeclarationStatement as co -> [(co.InitExpression:>obj); (co.Type:>obj);] | _ -> []) ];
-
-  let children o = memberMap |> Seq.collect (fun e -> e o) 
-
-  let rec codeDomFold' f st o = 
-    match box o with 
-      | :? CollectionBase as cl -> 
-           cl |> Seq.cast |> Seq.fold (codeDomFold' f) st;
-      | _ ->
-           let (nst,recurse) = f st o;
-           if (recurse) then
-             o |> children |> Seq.fold (codeDomFold' f) nst;
-           else nst
-
-  let codeDomCallbackWithScope' f  = 
-    let rec callback oscope res o =
-        match box o with 
-          | :? CollectionBase as cl -> 
-              cl |> Seq.cast |> Seq.fold (f callback oscope) res;
-          | _ ->
-              o |> children |> Seq.fold (f callback oscope) res;
-    f callback;
-                       
-  /// Search for members and return flat list of selected members
-  /// Function given as an argument returns tuple - first item specifies
-  /// if the current element should be included in the result, the second
-  /// specifies if we should walk through child members of the current object
-  let codeDomFlatFilter f o = codeDomFold' ( fun st o -> let (inc,rc) = (f o) in if (inc) then (o::st,rc) else (st,rc) ) [] (box o)            
-  
-  /// Walks through the CodeDom tree and keeps current "scope" and the result.
-  /// The result is collected through entire tree, but the modified scope is 
-  /// passed only to sub-nodes of the current node.
-  ///
-  /// First argument is a function that is called for nodes and has a 
-  /// function as a first argument, scope and result as a second and current node as a third.
-  /// The function argument can be used to walk deeper in the tree if wanted.
-  let codeDomCallbackWithScope f scope st o = codeDomCallbackWithScope' f scope st (box o)
-  let codeDomCallBackNoScope f st o = codeDomCallbackWithScope (fun rcall () res x -> f (rcall ()) res x) () st o
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/codeprovider.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/codeprovider.fs
deleted file mode 100644
index 1bfc4473..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/codeprovider.fs
+++ /dev/null
@@ -1,292 +0,0 @@
-#nowarn "62" // This construct is for compatibility with OCaml.
-
-//-------------------------------------------------------------------------------------------------
-// Internal members
-
-namespace Microsoft.FSharp.Compiler.CodeDom.Internal
-
-    open System
-    open System.IO
-    open System.Text
-    open System.Collections
-    open System.CodeDom
-    open System.CodeDom.Compiler
-
-    open Microsoft.FSharp.Compiler.CodeDom.Internal
-    module AspNetUtils = 
-      
-        /// Preprocessing of the CodeDom compile unit from ASP.NET
-        let aspNetPreProcessCompileUnit (c:CodeCompileUnit) =
-        
-            // Remove partial calsses from ASP.NET generated code (we can leave empty namespaces)
-            // F# doesn't support partial classes, so we need to remove generated 'second' part of the 
-            // handwritten class that contains fields for all controls - these have to be written 
-            // manually in the handwritten code...
-            (* if false then  *)
-            begin
-                for ns in c.Namespaces do
-                    // Phase 1. Find classes to remove
-                    let toRemove = 
-                        ns.Types 
-                        |> Seq.cast
-                        |> Seq.filter (fun (t:CodeTypeDeclaration)  -> t.IsPartial ) 
-                        |> Seq.to_list
-                    // Phase 2. remove (destructive). 
-                    toRemove |> List.iter ns.Types.Remove;
-            end;
-
-            
-            // Fix one very specific bug in ASP.NET generated CodeDom tree.
-            // In one case it generates ".SetStringResourcePointer" instead of
-            // "this.SetStringResourcePointer" (Reported here: 
-            // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=164512)
-            for ns in c.Namespaces do
-              for t in ns.Types do 
-                for m in t.Members do 
-                  match m with 
-                    | :? CodeMemberMethod as meth ->
-                        if (meth.Name = "FrameworkInitialize") then 
-                          for smt in meth.Statements do
-                            match smt with 
-                            | :? CodeExpressionStatement as stm -> 
-                                match stm.Expression with 
-                                  | :? CodeMethodInvokeExpression as inv ->
-                                    if ((inv.Method.TargetObject = null) && (inv.Method.MethodName = "SetStringResourcePointer")) then 
-                                      inv.Method.TargetObject <- new CodeThisReferenceExpression();
-                                  | _ -> ();
-                            | _ -> ();
-                        else ();
-                    | _ -> ();
-              
-
-        // Sorts ASP.NET source files
-        // ASP.NET compiler sends three kinds of files
-        // - CodeDOM generated file from ASPX file
-        // - handwritten file (codebehind for the previous)
-        // - fast factory for creating the first one
-        // 
-        // We need to send them to compiler in following order:
-        // - handwritten, aspx, handwritten, aspx, ..., factory
-        // 
-        // File name is: "Something.num.fs" where num is an index, but the array isn't
-        // sorted so we sort them using the index. Then we find all ASPX and swap 
-        // ASPX and handwritten file. Factory should be the last file.
-        
-
-        /// Does the file contain the given text?
-        let fileContains (text:string) (filename:string) = 
-          try
-            use fs = new IO.StreamReader(filename)
-            let rec testLine () = 
-                let line = fs.ReadLine()
-                (line <> null) && (line.IndexOf(text) <> -1 or testLine())
-            testLine()
-          with _ -> false
-
-        /// Swap two elements of an array
-        let swap (arr:'a[]) i j = 
-            let tmp = arr.[j] 
-            arr.[j] <- arr.[i]
-            arr.[i] <- tmp
-
-
-        /// Compiled forms of ASPX source files always contain "(__initialized:bool)".
-        /// The factory file contains "static member Create_ASP_"
-        let isFactoryFile filename = 
-            fileContains "static member Create_ASP_" filename &&
-            fileContains "FastObjectFactory" filename 
-
-        let isGeneratedFromAspxFile filename = 
-            fileContains "static val mutable __initialized:bool" filename &&
-            fileContains "" filename
-
-        let isUserFile filename = 
-            not (isGeneratedFromAspxFile filename)  &&
-            not (isFactoryFile filename) 
-
-          // REVIEW: will "Temporary ASP.NET Files" survive internationalization????
-        let indexOfAspNetFile(el:string) = 
-              let n = 
-                try
-                  let bnum = el.LastIndexOf(".", el.Length - 4)
-                  Int32.Parse(el.Substring(bnum + 1, el.Length - bnum - 4))
-                with _ -> -1
-              if (el.IndexOf("Temporary ASP.NET Files") <> -1) 
-              then n
-              else -1
-      
-          
-        let aspNetSortFiles (files:string array) =
-
-            // Verify that files are from ASP.NET & sort them.
-            let aspFiles = files |> Array.map (fun el -> indexOfAspNetFile el, el)              
-            let allAspNet = aspFiles |> Array.forall (fun (n, a) -> n <> -1)
-            
-            let sortedFiles = 
-                if (allAspNet) then
-                    Array.sortInPlaceWith (fun (n1, _) (n2, _) -> n1 - n2) aspFiles
-                    let filesMod = aspFiles |> Array.map snd 
-                    
-                    //System.Windows.Forms.MessageBox.Show(sprintf "filesMod = %A" filesMod) |> ignore
-                    // Rearrange files
-                    // NOTE: ack! surely there's a nicer way to do this!
-                    let mutable i = 0
-                    while (i < filesMod.Length) do
-                        if  (isGeneratedFromAspxFile filesMod.[i]
-                             && not (isFactoryFile filesMod.[i]) 
-                             && isUserFile filesMod.[i+1]) 
-                        then
-                            swap filesMod i (i+1)
-                            i <- i + 1
-                        i <- i + 1
-                    filesMod
-                else
-                    files
-            //System.Windows.Forms.MessageBox.Show(sprintf "sortedFiles = %A" sortedFiles) |> ignore
-            sortedFiles
-
-    // Generic code generator that can be specialized with preprocessing function and additional 
-    // CodeGenerator configuration options (this is used by ASP.NET generator)
-    //   preprocCu: 
-    module FSharpCodeGenerator = 
-        let Create(preprocCu, addop) = 
-      
-            let usingStringWriter f =
-                let sb = new StringBuilder()
-                use sw = new StringWriter(sb)
-                f (sw :> TextWriter);
-                let res = sb.ToString();
-                res
-          
-            { new ICodeGenerator with
-                // Identifier related functions            
-                member this.CreateEscapedIdentifier (value:string) : string =
-                  Generator.makeEscapedIdentifier value
-                member this.CreateValidIdentifier (value:string) : string =
-                  Generator.makeValidIdentifier value
-                member this.IsValidIdentifier (value:string) : bool =
-                  Generator.isValidIdentifier value; 
-                member this.ValidateIdentifier (value:string) : unit =
-                  if (not (Generator.isValidIdentifier value)) then 
-                    raise (ArgumentException(sprintf "'%s' is not a valid F# identifier!" value))
-      
-                // Implementations of code generation related functions
-                member this.GenerateCodeFromCompileUnit(compileUnit, textWriter, options) =
-                    (Generator.createContext textWriter options addop) 
-                    |> (Generator.generateCompileUnit compileUnit preprocCu) 
-                    |> ignore
-                
-                member this.GenerateCodeFromExpression(codeExpr, textWriter, options) : unit =
-                    (Generator.createContext textWriter options addop) 
-                    |> (Generator.generateExpression codeExpr) 
-                    |> ignore
-                
-                member this.GenerateCodeFromNamespace(codeNamespace, textWriter, options) : unit =
-                    (Generator.createContext textWriter options addop) 
-                    |> (Generator.generateNamespace codeNamespace) 
-                    |> ignore
-                
-                member this.GenerateCodeFromStatement(codeStatement, textWriter, options) : unit =
-                    (Generator.createContext textWriter options addop) 
-                    |> (Generator.generateStatement codeStatement) 
-                    |> ignore
-                    
-                member this.GenerateCodeFromType(codeTypeDecl, textWriter, options) : unit =
-                    (Generator.createContext textWriter options addop) 
-                    |> (Generator.generateTypeDeclOnly codeTypeDecl) 
-                    |> ignore
-                member this.GetTypeOutput (t:CodeTypeReference) : string =
-                    usingStringWriter (fun sw ->
-                      (Generator.createContext sw (CodeGeneratorOptions()) addop) 
-                      |> (Generator.generateTypeRef t) |> ignore)
-
-                member this.Supports (supports:GeneratorSupport) : bool =
-                  (supports &&&  (GeneratorSupport.ReturnTypeAttributes ||| GeneratorSupport.ParameterAttributes ||| 
-                                  GeneratorSupport.AssemblyAttributes ||| GeneratorSupport.StaticConstructors ||| 
-                                  GeneratorSupport.NestedTypes ||| GeneratorSupport.EntryPointMethod |||
-                                  GeneratorSupport.GotoStatements ||| GeneratorSupport.MultipleInterfaceMembers |||
-                                  GeneratorSupport.ChainedConstructorArguments
-                                  ) = enum 0) }
-
-    // Generic code compiler - the argument is a function for sorting files that can be used by
-    // tool-specific providers if needed (like in case of ASP.NET)
-    module FSharpCodeCompiler = 
-        let Create(sortFiles) =
-            { new ICodeCompiler with       
-                member this.CompileAssemblyFromDom ((options:CompilerParameters),(compileUnit:CodeCompileUnit)) : CompilerResults =
-                  this.CompileAssemblyFromDomBatch (options, [|compileUnit|]);
-                member this.CompileAssemblyFromSource ((options:CompilerParameters),(source:string)) : CompilerResults =
-                  this.CompileAssemblyFromSourceBatch (options, [|source|]);                
-                member this.CompileAssemblyFromFile ((options:CompilerParameters),(fileName:string)) : CompilerResults =
-                  this.CompileAssemblyFromFileBatch (options, [|fileName|]);
-                    
-                member this.CompileAssemblyFromDomBatch ((options:CompilerParameters),(compilationUnits:CodeCompileUnit array)) : CompilerResults =
-                  let res = new CompilerResults(options.TempFiles);
-                  let files = 
-                      compilationUnits 
-                      |> Array.map ( fun cu -> 
-                          let fn = res.TempFiles.AddExtension("fs", false)
-                          use wr = new StreamWriter(fn, false, Encoding.UTF8)
-                          Generator.createContext wr (CodeGeneratorOptions()) Generator.AdditionalOptions.None 
-                              |> (Generator.generateCompileUnit cu (fun _ -> ())) |> ignore
-                          fn)        
-                  Compiler.compileAssemblyFromFileBatch options files res sortFiles
-
-                member this.CompileAssemblyFromSourceBatch ((options:CompilerParameters),(sources:string array)) : CompilerResults =
-                  let res = new CompilerResults(options.TempFiles);
-                  let files = sources |> Array.map ( fun src -> 
-                      let fn = res.TempFiles.AddExtension("fs", false)
-                      use wr = new StreamWriter(fn)
-                      wr.Write(src) 
-                      fn)
-                  Compiler.compileAssemblyFromFileBatch options files res sortFiles       
-                  
-                member this.CompileAssemblyFromFileBatch ((options:CompilerParameters),(fileNames:string array)) : CompilerResults =
-                  Compiler.compileAssemblyFromFileBatch options fileNames (new CompilerResults(options.TempFiles)) sortFiles
-            }
-          
-
-//-------------------------------------------------------------------------------------------------
-// Public types
-
-namespace Microsoft.FSharp.Compiler.CodeDom
-
-    open System
-    open System.IO
-    open System.Text
-    open System.Collections
-    open System.CodeDom
-    open System.CodeDom.Compiler
-
-    open Microsoft.FSharp.Compiler.CodeDom.Internal
-
-    type FSharpCodeProvider() = 
-        inherit CodeDomProvider()
-        override this.FileExtension = "fs";
-        
-        override this.CreateCompiler() =
-            FSharpCodeCompiler.Create(AspNetUtils.aspNetSortFiles)
-            
-        override this.CreateGenerator() =
-            FSharpCodeGenerator.Create((fun _ -> ()), Generator.AdditionalOptions.None)
-
-    type FSharpAspNetCodeProvider() = 
-        inherit CodeDomProvider()
-        override this.FileExtension = "fs";
-        
-        override this.CreateCompiler() =
-            FSharpCodeCompiler.Create(AspNetUtils.aspNetSortFiles)
-            
-        override this.CreateGenerator() =
-            
-            // If you set the options to "Generator.AdditionalOptions.UnknonwFieldsAsLocals"
-            // than the generator will treat all fields that are not declared in the class as locals
-            // (and will generated "fld" instead of "this.fld")            
-            // This will make it possible to use implicit class syntax in ASP.NET, but only when
-            // the fields will have non-private visibility (because we need to access them from inherited class
-            
-            // AspNetArrays is workaround for ASP.NET which generates wrong type in array initializers
-            // (according to the CodeDOM test suite it should be "int[]" for [| 1; 2 |], but ASP.NET gives us "int" !! 
-            let opts = Generator.AdditionalOptions.AspNetArrays
-            FSharpCodeGenerator.Create(AspNetUtils.aspNetPreProcessCompileUnit, opts)
-        
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/codeprovider.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/codeprovider.fsi
deleted file mode 100644
index ff852341..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/codeprovider.fsi
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace Microsoft.FSharp.Compiler.CodeDom
-
-open System.CodeDom.Compiler
-
-/// Implementation of the CodeDomProvider for the F# language.
-/// If you intend to use CodeDom with ASP.NET you should use FSharpAspNetCodeProvider instead.
-type FSharpCodeProvider = 
-    inherit CodeDomProvider 
-    new : unit -> FSharpCodeProvider
-
-/// Implementation of the CodeDomProvider for the F# language.
-/// This is specialized version that can be used with ASP.NET.
-type FSharpAspNetCodeProvider = 
-    inherit CodeDomProvider 
-    new : unit -> FSharpAspNetCodeProvider
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/compiler.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/compiler.fs
deleted file mode 100644
index 2f9cf51a..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/compiler.fs
+++ /dev/null
@@ -1,180 +0,0 @@
-namespace Microsoft.FSharp.Compiler.CodeDom.Internal
-
-open System
-open System.IO
-open System.Text
-open System.Text.RegularExpressions
-open System.Collections
-open System.Diagnostics
-open System.CodeDom
-open System.Security
-open System.Security.Permissions
-open System.CodeDom.Compiler
-
-module internal AssemblyAttributes = 
-    //[]
-    do()
-
-//-------------------------------------------------------------------------------------------------
-module internal Global = 
-    let debug_commandline_args = true
-    let (++) x y = Path.Combine(x,y)
-    
-    // search for "fsc.exe"
-    let FscExeBaseName = "fsc.exe"
-
-    let FSharpRunningVersion = Internal.Utilities.FSharpEnvironment.FSharpRunningVersion 
-        
-    let FSharpBinFromRegistry = Internal.Utilities.FSharpEnvironment.FSharpRunningBinFolder 
-
-    let FSharpBinFromEnvironmentVariable = 
-        try match System.Environment.GetEnvironmentVariable("FSHARP_BIN") with 
-            | null -> None
-            | s -> Some(s)
-        with _ -> None
-
-    // Note: this techniue is now deprecated by FSharpBinFromRegistry above
-    let FSharpBinFromInstallLocationGuess = 
-        try match FSharpRunningVersion with 
-            | Some v -> Some(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) ++ "FSharp-" +  v)
-            | _ -> None
-        with _ -> None
-
-             
-    let FscPath = 
-        let tryFscPath x = 
-            match x with 
-            | None -> None
-            | Some dir -> 
-                 let fscName = dir  ++ FscExeBaseName 
-                 if File.Exists(fscName) then Some(fscName) else None
-
-        let search0 = tryFscPath(FSharpBinFromRegistry) in
-        match search0 with 
-        | Some(res) -> res
-        | None -> 
-        
-        let search1 = tryFscPath(FSharpBinFromEnvironmentVariable)
-        match search1 with 
-        | Some(res) -> res
-        | None -> 
-            
-        let search2 = tryFscPath(FSharpBinFromInstallLocationGuess)
-        match search2 with 
-        | Some(res) -> res
-        | None -> 
-        FscExeBaseName
-    
-    // regular expressions for parsing result         
-    let regParseFsOutput = Regex(@"(?[^\(]*)\((?[0-9]*),(?[0-9]*)\):\s(?[^:]*)\s(?[^:]*):\s(?.*)", RegexOptions.Compiled);
-    let regParseFsOutputNoNum = Regex(@"(?[^\(]*)\((?[0-9]*),(?[0-9]*)\):\s(?[^:]*)\s(?.*)", RegexOptions.Compiled);
-
-//-------------------------------------------------------------------------------------------------
-module internal Compiler = 
-    let id a = a
-    let (+>) (ctx:StringBuilder) (foo:StringBuilder -> StringBuilder) = foo ctx;
-    let (--) (ctx:StringBuilder) (str:String) = ctx.Append(str)
-    let untyped_fold f col st = Seq.fold f st (Seq.cast col)
-     
-    // Generate command-line arguments for FSC
-    let cmdArgsFromParameters (o:CompilerParameters) filenames = 
-      let sb = new StringBuilder(50)
-      (sb 
-        +> if (not o.GenerateExecutable) then (fun ctx -> ctx -- "-a ") else id
-        +> untyped_fold (fun ctx e -> ctx -- "-r:\"" -- e -- "\" ") o.ReferencedAssemblies
-        -- "--nologo -o:\"" -- o.OutputAssembly -- "\" "        
-        +> if (o.IncludeDebugInformation) then (fun ctx -> ctx -- "--debug+ ") else id        
-        +> if (o.Win32Resource <> null) then (fun ctx -> ctx -- "--win32res \"" -- o.Win32Resource -- "\" ") else id 
-        +> if (o.CompilerOptions <> null) then (fun ctx -> ctx -- o.CompilerOptions -- " ") else id) 
-        
-        // Never treat warnings as errors - this overrides "#nowarn", but the generated code
-        // will contain some warnings in almost any case...
-        //   +> if (o.TreatWarningsAsErrors) then (fun ctx -> ctx -- "--warnaserror ") else id
-        
-        |> ignore  
-        
-      filenames |> Array.iter ( fun (fn:string) ->
-        ignore (sb.AppendFormat(" \"{0}\"", fn)) )
-      sb.ToString();
-
-    // Process FSC output
-    let processMsg msg (res:CompilerResults) = 
-      let m = 
-        let t1 = Global.regParseFsOutput.Match(msg) in
-          if (t1.Success) then t1 else Global.regParseFsOutputNoNum.Match(msg)
-      let ce = 
-        if (m.Success) then 
-          let errNo = (if (m.Groups.Item("err") <> null) then (m.Groups.Item("err")).Value else "") 
-          let ce = CompilerError(m.Groups.Item("file").Value, Int32.Parse(m.Groups.Item("line").Value), 
-                                 Int32.Parse(m.Groups.Item("col").Value), errNo, m.Groups.Item("msg").Value);
-          ce.IsWarning <- ((m.Groups.Item("type")).Value = "warning");
-          ce
-        else new CompilerError("unknown-file", 0, 0, "0", msg);
-      res.Errors.Add(ce) |> ignore      
-      
-    // Invoke FSC compiler and parse output  
-    let compileFiles args (res:CompilerResults) =
-        let p = new Process() in
-        p.StartInfo.FileName <- Global.FscPath;
-        p.StartInfo.UseShellExecute <- false;
-        p.StartInfo.Arguments <- args;
-        p.StartInfo.RedirectStandardError <- true;
-        p.StartInfo.CreateNoWindow <- true;
-        p.Start() |> ignore
-
-        // useful when debugging
-        if (Global.debug_commandline_args) then
-          let s = res.TempFiles.AddExtension("cmdargs")
-          use sw = new StreamWriter(s);
-          sw.WriteLine(args);
-        
-        let mutable serr = "" 
-        let mutable smsg = ""
-        while (serr <- p.StandardError.ReadLine(); serr <> null) do 
-          if (serr.Trim().Length = 0 && smsg <> "") then 
-            processMsg smsg res; smsg <- "";
-          else 
-            smsg <- smsg + " " + (serr.Trim());
-        if (smsg <> "") then processMsg smsg res;
-        p.WaitForExit();
-        res.NativeCompilerReturnValue <- p.ExitCode;
-
-    // Compile assembly from given array of files
-    let compileAssemblyFromFileBatch (options:CompilerParameters) (fileNames:string array) 
-                                     (results:CompilerResults) sortf : CompilerResults =
-                                     
-      // Call 'fix' sorting function                                      
-      let fileNames = sortf fileNames
-      let createdAssembly = 
-        if (options.OutputAssembly = null || options.OutputAssembly.Length = 0) then begin
-          let extension = if (options.GenerateExecutable) then "exe" else "dll" 
-          options.OutputAssembly <- results.TempFiles.AddExtension(extension, not options.GenerateInMemory)
-
-          // Create an empty assembly, so the file can be later accessed using current credential.  
-          let fs = new FileStream(options.OutputAssembly, FileMode.Create, FileAccess.ReadWrite) in 
-          fs.Close();
-          true;
-        end else false in
-      ignore(results.TempFiles.AddExtension("pdb"));
-        
-      // Compile..      
-      let args = cmdArgsFromParameters options fileNames 
-      compileFiles args results;
-        
-      if (options.GenerateInMemory) then
-        use fs = new FileStream(options.OutputAssembly, FileMode.Open, FileAccess.Read, FileShare.Read)
-        let count = int32 fs.Length 
-        if (count > 0) then
-          let buffer = (Array.zeroCreate count) 
-          fs.Read(buffer, 0, count) |> ignore
-          (new SecurityPermission(SecurityPermissionFlag.ControlEvidence)).Assert();
-          try
-            results.CompiledAssembly <- System.Reflection.Assembly.Load(buffer, null, options.Evidence);
-          finally
-            CodeAccessPermission.RevertAssert();
-      else 
-        results.PathToAssembly <- options.OutputAssembly;
-
-      // Delete the assembly if we created it
-      if (createdAssembly) then File.Delete(options.OutputAssembly);
-      results      
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/generator.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/generator.fs
deleted file mode 100644
index ec78b26e..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.Compiler.CodeDom/generator.fs
+++ /dev/null
@@ -1,1729 +0,0 @@
-namespace Microsoft.FSharp.Compiler.CodeDom.Internal
-#nowarn "57" // parametrized active patterns
-#nowarn "62" // This construct is for compatibility with OCaml.
-
-open System
-open System.IO
-open System.Text
-open System.Reflection
-open System.Collections
-open System.Collections.Generic
-open System.CodeDom
-open System.CodeDom.Compiler
-
-open Internal.Utilities // for HashSet
-open Microsoft.FSharp.Compiler.CodeDom.Internal.Visitor
-
-module Generator =
-
-    type ResizeArray<'a> = System.Collections.Generic.List<'a> // alias
-  
-    //---------------------------------------------------------------------------------------------
-    // Context and configuration
-    
-    type AdditionalOptions =
-      /// No extra configuration
-      | None = 0                      
-      
-      /// Reference inherited fields using "fld" instead of "this.fld" 
-      /// (could be used in the future to allow implicit classes in ASP.NET?)
-      | UnknonwFieldsAsLocals = 1     
-                                      
-      /// Hacking for ASP.NET incorrect array initializers 
-      /// They generate "string" where codedom test suite uses "string[]"
-      | AspNetArrays = 2              
-                                      
-    
-    type Context = 
-      {
-        /// Some unique ID for every namespace (so we don't have name clashes)
-        UniqueID:string
-        
-        /// Options, output, ...
-        Options:AdditionalOptions
-        Writer:IndentedTextWriter
-        
-        // *** Method/type scope ***
-        
-        /// Names of all type arguments in scope (need to rename T -> 'T etc.)
-        TypeArgumentNames:Set
-        /// Types of all local variables in the method
-        LocalVariableTypes:Map;
-        /// Type of the method 
-        CurrentMethodReturnType:CodeTypeReference option;
-        /// We use exception for returning value when generating complex
-        /// code that returns using imperative "return" statement
-        ReturnUsingException:bool;
-      
-        // *** Information for the current class *** 
-        
-        CurrentType:CodeTypeDeclaration;
-        BaseTypes:CodeTypeReference option * CodeTypeReference list
-        FieldTypes:Map;
-        PropertyTypes:Map;
-        DeclaredEvents:CodeMemberEvent list;
-          
-        // *** Namespace scope ***         
-        
-        // Renamed types (when flattening nested classes)
-        TypeRenames:Map
-        // Current namespace (can't be used in the type reference expression)
-        CurrentNamespace:string; 
-        // Set of interface names declared in the current namespace
-        DeclaredInterfaces:Set
-        // A static Main method declared by one of the classes in this namespace
-        MainMethodForCurrentNamespace:(CodeEntryPointMethod * CodeTypeDeclaration) option
-      }
-    
-    /// Create context using specified text writer and options
-    let createContext (wr:TextWriter) (opts:CodeGeneratorOptions) (addopts) = 
-      { UniqueID = (Guid.NewGuid()).ToString("N")
-        Writer = new IndentedTextWriter(wr); TypeRenames = Map.empty; 
-        CurrentType = null; CurrentNamespace = ""; DeclaredEvents = []; BaseTypes = (None, []); FieldTypes = Map.empty 
-        CurrentMethodReturnType = None; LocalVariableTypes = Map.empty; ReturnUsingException = false; PropertyTypes = Map.empty
-        Options = addopts; DeclaredInterfaces = Set.empty; TypeArgumentNames = Set.empty; MainMethodForCurrentNamespace = None }    
-
-    /// Where are we generating member?
-    type MemberGenerateType = 
-      | InsideInterface = 0
-      | InsideStruct = 1
-      | InsideClass = 2
-      
-    //---------------------------------------------------------------------------------------------
-    // Collections and combinators for generating
-
-    /// Function composition operator
-    let (+>) (ctx:Context -> Context) (foo:Context -> Context) x =
-      foo (ctx x);
-
-    /// Print unique id using: "+> uniqid"
-    let uniqid (c:Context) =
-      c.Writer.Write(c.UniqueID);
-      c;
-
-    /// Break-line and append specified string
-    let (++) (ctx:Context -> Context) (str:String) x =
-      let c = (ctx x)
-      c.Writer.WriteLine();
-      c.Writer.Write(str);
-      c;
-
-    /// Append specified string without line-break
-    let (--) (ctx:Context -> Context) (str:String) x =
-      let c = (ctx x)
-      c.Writer.Write(str);
-      c;
-
-    /// Call function, but give it context as an argument      
-    let delay f x =
-      (f x) x;
-      
-    /// Identity function
-    let id a = a
-
-    /// Print object converted to string
-    let str (o: 'a) (ctx:Context) =
-      ctx.Writer.Write(o :> obj);
-      ctx;
-
-    /// Create closure to do the counting 
-    /// (this is usend when we need indexing during collection processing)
-    let createCounter() =   
-      let i = ref (-1)
-      (fun () -> i := (!i) + 1; !i)
-      
-    /// Perform map and filter operations in one 
-    let rec mapFilter f l =
-      match l with
-      | [] -> [];
-      | a::r -> match (f a) with | None -> (mapFilter f r) | Some el -> el::(mapFilter f r)
-
-    /// Process collection - keeps context through the whole processing
-    /// calls 'f' for every element in sequence and 'fs' between every two elements 
-    /// as a separator
-    let col fs (c:IEnumerable) f (ctx:Context) = 
-      let mutable tryPick = true in
-      let mutable st = ctx
-      let e = c.GetEnumerator()
-      while (e.MoveNext()) do
-        if (tryPick) then tryPick <- false else st <- fs st
-        st <- f (unbox e.Current) st
-      st
-    
-    /// Process collection - keeps context through the whole processing
-    /// calls 'f' for every element in sequence and 'fs' between every two elements 
-    /// as a separator. This is a variant that works on typed collections.
-    let colT fs (c:seq<'a>) f (ctx:Context) =
-      let mutable tryPick = true in
-      let mutable st = ctx
-      let e = c.GetEnumerator();
-      while (e.MoveNext()) do
-        if (tryPick) then tryPick <- false else st <- fs st;
-        st <- f (e.Current) st;
-      st
-        
-    /// Call specified function only on elements of specified type.
-    /// (performs dynamic type test using x.GetType())
-    let colFilterT<'a> fs (c:IEnumerable) (f: 'a -> Context -> Context) ctx =
-      let sq : seq<'a>
-          = c |> Seq.cast |> Seq.filter (fun (o:obj) -> o.GetType() = typeof<'a>) |> Seq.cast
-      colT fs sq f ctx
-
-    let colFilter<'a> fs (c:IEnumerable) (f: 'a -> Context -> Context) ctx =
-      let sq = c |> Seq.cast |> Seq.filter (fun (o:obj) -> o.GetType() = typeof<'a>)
-      col fs sq f ctx
-
-    // Separator functions        
-    let sepDot          = id -- "."
-    let sepWordAnd      = id -- " and "      
-    let sepSpace        = id -- " "      
-    let sepNln          = id ++ ""
-    let sepArgs         = id -- ", "
-    let sepArgsSemi     = id -- "; "
-    let sepNone         = id
-    let sepStar         = id -- " * "
-    let sepNlnSemiSpace = id -- ";" ++ "  "
-    
-    //---------------------------------------------------------------------------------------------
-    // F# keywords and identifiers and also type resolving for standard .NET libraries
-    
-    let fsKeyWords = 
-      new HashSet<_>
-         (["abstract"; "and"; "as"; "assert"; "asr"; "base"; "begin"; "class"; "default"; "delegate"; "do"; "done";
-           "downcast"; "downto"; "elif"; "else"; "end"; "exception"; "extern"; "false"; "finally"; "for"; "fun";
-           "function"; "if"; "in"; "inherit"; "inline"; "interface"; "internal"; "land"; "lazy"; "let"; "lor"; "lsl"; "lsr"; "lxor";
-           "match"; "member"; "method"; "mod"; "module"; "mutable"; "namespace"; "new"; "null"; "of"; "open"; "or"; "override";
-           "private"; "public"; "rec"; "return"; "sig"; "static"; "struct"; "then"; "to"; "true"; "try"; "type"; "upcast"; "use"; "val"; "virtual"; "void"; "when"; 
-           "while"; "with"; "yield";
-           
-           "atomic"; "break"; 
-           "checked"; "component"; "const"; "constraint"; "constructor"; "continue"; 
-           "eager"; 
-           "fixed"; "fori"; "functor"; "global";
-           "include";  (* "instance"; *)
-           "mixin"; 
-           "object"; "parallel"; "params";  "process"; "protected"; "pure"; (* "pattern"; *)
-           "sealed"; "trait";  "tailcall";
-           "volatile"; ])
-
-    let isValidIdentifier str = 
-      not (fsKeyWords.Contains(str))
-
-    let makeEscapedIdentifier str = 
-      if (fsKeyWords.Contains(str)) then "i'"+str+"'" else str;
-
-    let makeValidIdentifier str = 
-      if (fsKeyWords.Contains(str)) then "_"+str else str;
-      
-    let freshName = 
-      let counter = createCounter ()
-      (fun () -> "UnnamedMethod_" + counter().ToString())
-
-    // List of "known" libraries that we try to search when we need to resolve a type
-    let coreAssemblies = 
-       ["mscorlib"; "System"; "System.Web"; "System.Xml"; 
-        "System.Data"; "System.Deployment"; "System.Design"; "System.DirectoryServices"; 
-        "System.Drawing.Design"; "System.Drawing"; "System.EnterpriseServices"; 
-        "System.Management"; "System.Messaging"; "System.Runtime.Remoting"; 
-        "System.Security"; "System.ServiceProcess"; "System.Transactions"; 
-        "System.Configuration"; "System.Web.Mobile"; "System.Web.RegularExpressions"; 
-        "System.Web.Services"; "System.Windows.Forms";
-        "PresentationCore"; "PresentationFramework"; "WindowsBase"; "WindowsFormsIntegration"]
-      |> List.map ( fun n -> lazy(try Some(System.Reflection.Assembly.LoadWithPartialName(n)) with _ -> None); );
-
-    let dict = new Dictionary();
-
-    /// Tries to find .NET type for specified type name
-    /// This is used when we need to know type in order to generate something correctly,
-    /// but it's just a fallback case
-    let (|FoundSystemType|_|) s =
-      if (dict.ContainsKey(s)) then Some dict.[s] else
-      let ty = coreAssemblies |> Seq.tryPick ( fun lazyAsm -> 
-        match lazyAsm.Force() with 
-        | None -> None
-        | Some asm -> 
-            match (try asm.GetType(s) with _ -> null) with
-            | null -> None
-            | t -> Some t ) 
-      match ty with | Some t -> dict.Add(s, t) | _ -> ()
-      ty
-
-    //---------------------------------------------------------------------------------------------
-    // Interface recognition magic
-
-    // If the name of the type matches a name of interface declared in this file 
-    // (stored in a set in the context) than we treat it as an interface, otherwise
-    // we rely on .NET naming pattern (starts with I followed by uppercase letter)
-    // We could search known DLLs, but that's useless since all DLLs we could find
-    // follow this naming pattern...
-    let isInterface (t:CodeTypeReference) (ctx:Context) = 
-      let tn = t.BaseType.Substring(t.BaseType.LastIndexOf(".") + 1) 
-      let decLoc = Set.contains tn ctx.DeclaredInterfaces
-      decLoc || (tn.StartsWith("I") && (((tn.ToUpper()).[1]) = (tn.[1])))
-
-
-    // Splits base types into base class and implemented interfaces
-    // using rules described in isInterface
-    // Returns optional base class and list of interfaces
-    let resolveHierarchy (c:CodeTypeDeclaration) ctx =
-      let (interf, bcl) = 
-        c.BaseTypes |> Seq.cast |> Seq.to_list
-          |> List.partition ( fun (r:CodeTypeReference) -> isInterface r ctx )
-          
-      if (bcl.Length = 0) then 
-        // All supertypes all interfaces
-        (None, interf)
-      elif (bcl.Length = 1) then 
-        // Exactly one supertype is class, other were recognized as interfaces
-        (Some (List.hd bcl), interf) 
-      else 
-        // Fallback case - we found more than one supertypes that look like a class
-        // so we just return the tryPick one and treat other as interfaces
-        (Some (List.hd bcl), (List.tl bcl)@interf) 
-        
-    
-    //---------------------------------------------------------------------------------------------
-    // Generating strings and working with context   
-    
-    let incIndent (ctx:Context) = 
-      ctx.Writer.Indent <- ctx.Writer.Indent + 1
-      ctx
-
-    let decIndent (ctx:Context) = 
-      ctx.Writer.Indent <- ctx.Writer.Indent - 1
-      ctx
-
-    /// Output string as a valid F# identifier
-    let (-!) (ctx:Context -> Context) (str:String) x =
-      let c = (ctx x)
-      c.Writer.Write(makeValidIdentifier str);
-      c;
-      
-    //---------------------------------------------------------------------------------------------
-    // Default values, types, generic parameters
-    
-    
-    
-    
-    
-    
-    let generateDefaultValue (t:CodeTypeReference) = 
-      if (t.ArrayElementType <> null) then
-        id -- "Unchecked.defaultof<_>"
-      else
-        match t.BaseType with 
-          | "System.Single" -> id -- "0.0f"
-          | "System.Double" -> id -- "0.0"
-          | "System.Char" -> id -- "'\000'"
-          | "System.Int16" -> id -- "0s"
-          | "System.Int32" -> id -- "0"
-          | "System.Int64" -> id -- "0L"
-          | "System.Byte" -> id -- "0uy"
-          | "System.SByte" -> id -- "0y"
-          | "System.UInt16" -> id -- "0us"
-          | "System.UInt32" -> id -- "0u"
-          | "System.UInt64" -> id -- "0UL"
-          | "System.String" -> id -- "\"\""
-          | "System.Boolean" -> id -- "false"
-          | _ -> id -- "Unchecked.defaultof<_>" 
-    
-    /// Get System.Type of know type (either standard type or resolved)  
-    let tryGetSystemType (cr:CodeTypeReference option) =
-      match cr with 
-        | None -> None
-        | Some cr when (cr.ArrayRank = 0) ->
-          match cr.BaseType with 
-          | "System.Single" -> Some (typeof)
-          | "System.Double" -> Some (typeof)
-          | "System.Char" -> Some (typeof)
-          | "System.Int16" -> Some (typeof)
-          | "System.Int32" -> Some (typeof)
-          | "System.Int64" -> Some (typeof)
-          | "System.UInt16" -> Some (typeof)
-          | "System.UInt32" -> Some (typeof)
-          | "System.UInt64" -> Some (typeof)
-          | "System.String" -> Some (typeof)
-          | "System.Boolean" -> Some (typeof)
-          | FoundSystemType t -> Some t
-          | _ -> None;      
-        | _ -> None
-
-    /// Tries to resolve type of a variable and adds it to the Context dictionary
-    let tryAddVariableType (name:string) (cr:CodeTypeReference) (varTypes:Map) =
-      let ret t = Map.add name t varTypes
-      match tryGetSystemType (Some cr) with 
-        | Some t -> ret t; 
-        | _ -> varTypes
-
-    // Returns string with type arguments
-    let rec getTypeArgs (tya:CodeTypeReferenceCollection) renames ns tyParams fsSyntax =
-      if (tya.Count > 0) then
-        let sb = new StringBuilder()
-        sb.Append("<") |> ignore
-        for a in tya do
-          let str = (getTypeRef a renames ns tyParams fsSyntax):string
-          sb.Append(str).Append(", ") |> ignore
-        let s = sb.ToString()
-        s.Substring(0, s.Length - 2) + ">"
-      else
-        ""
-        
-    /// Generates type reference (not for arrays)
-    and getBaseTypeRef (cr:CodeTypeReference) renames (ns:string) (tyParams:Set) fsSyntax =
-      let s = 
-      
-        // Remove current namespace name, because it can't be used in this scope
-        let bst = 
-          if (cr.BaseType.StartsWith(ns+".")) then 
-            cr.BaseType.Substring(ns.Length+1) else cr.BaseType
-      
-        // Several standard renaming tricks      
-        match Map.tryFind bst renames with
-          // Renamed type (former nested type)
-          | Some nn -> nn
-          
-          // It is a type paramter - rename T to 'T
-          | None when Set.contains cr.BaseType tyParams ->
-              "'" + cr.BaseType
-              
-          // Try if it's standard F# type
-          // This also renames Void to unit, which may not be completly correct, 
-          // but it works much better than if we don't do it
-          | None when fsSyntax ->
-              match cr.BaseType with 
-              | "System.Void" -> "unit"
-              | "System.Object" -> "obj"
-              | "System.String" -> "string"
-              | "System.Single" -> "float32"
-              | "System.Double" -> "float"
-              | "System.Char" -> "char"
-              | "System.Int16" -> "int16" 
-              | "System.Int32" -> "int" 
-              | "System.Int64" -> "int64" 
-              | "System.UInt16" -> "uint16" 
-              | "System.UInt32" -> "uint32" 
-              | "System.UInt64" -> "uint64" 
-              | "System.Boolean" -> "bool"
-              | _ -> bst;
-          | _ -> bst;          
-      // drop `xyz, replace "+" for nested classes with "."
-      let sb = new StringBuilder()
-      let mutable i = 0 
-      while i < s.Length do
-        let c = s.[i]
-        match c with
-          | _ when c = '+' || c = '.' -> sb.Append('.') |> ignore;
-          | '`' -> i <- i + 1;
-                   while (i='0' && s.[i]<='9') do 
-                     i <- i + 1
-          | _ -> sb.Append(c) |> ignore
-        i <- i + 1      
-      // generate type arguments
-      sb.Append(getTypeArgs cr.TypeArguments renames ns tyParams fsSyntax).ToString()
-      
-    /// Generate type reference with empty context
-    and getBaseTypeRefString (s:string) =
-      getBaseTypeRef (CodeTypeReference(s)) Map.empty "" Set.empty true
-    
-    
-    /// Get full type reference using information from context  
-    and getTypeRef (c:CodeTypeReference) (rens:Map) (ns:string) (tyParams:Set) (fsSyntax:bool) =
-      if (c = null) then  
-        ""
-      elif (c.ArrayRank = 0) then 
-        getBaseTypeRef c rens ns tyParams fsSyntax
-      else      
-        let baseType = (getTypeRef c.ArrayElementType rens ns tyParams fsSyntax)
-        baseType + "[" + (System.String.Concat (Array.create (c.ArrayRank - 1) ",")) + "]"
-
-    /// Get full type reference string using empty context
-    and getTypeRefSimple (c:CodeTypeReference) = getTypeRef c Map.empty "" Set.empty true
-    
-    /// Get type reference, but don't rename .NET types to F# types
-    /// (this is only needed when calling static methods on the type)
-    let generateTypeRefNet (c:CodeTypeReference) =
-      id +> delay ( fun ctx -> id -- getTypeRef c ctx.TypeRenames ctx.CurrentNamespace ctx.TypeArgumentNames false )
-    
-    /// Generate type reference using context
-    /// (this is most commonly used method)  
-    let generateTypeRef (c:CodeTypeReference) =
-      id +> delay ( fun ctx -> id -- getTypeRef c ctx.TypeRenames ctx.CurrentNamespace ctx.TypeArgumentNames true )
-             
-    /// Generate type arguments using context
-    let generateTypeArgs (c:CodeTypeReferenceCollection) =
-      id +> delay ( fun ctx -> id -- getTypeArgs c ctx.TypeRenames ctx.CurrentNamespace ctx.TypeArgumentNames true )
-             
-    
-    /// Record specified type parameters in the context, call generating function
-    /// and then restore the original type parameters
-    /// (this works if someone uses nested type parameters with the same name)
-    let usingTyParams tyArgs f (x:Context) =
-      let o = x.TypeArgumentNames
-      let n = Array.fold_right Set.add (Array.of_seq tyArgs) o
-      let x = f { x with TypeArgumentNames = n }
-      { x with TypeArgumentNames = o }      
-
-
-    /// Preprocess collection with type parameters
-    /// Returns array to be used with usingTyParams and
-    /// function to be called to generate < ... > code
-    let processTypeArgs (args:CodeTypeParameterCollection) =     
-      let tyargs = seq { for (p:CodeTypeParameter) in args -> p.Name }       
-      let genTyArgs =
-        if (args.Count = 0) then id else
-        let s = tyargs |> Seq.fold (fun ctx s -> ctx + ", '" + s) ""
-        id 
-        -- "<" -- s.Substring(2, s.Length-2)
-        +> if (args.Count = 0) then id -- ">" else
-             let argsWithConstr = args |> Seq.cast |> Seq.filter (fun (p:CodeTypeParameter) -> 
-               p.Constraints.Count <> 0 || p.HasConstructorConstraint) |> Seq.cast |> Seq.to_list
-             if (argsWithConstr.Length <> 0) then
-               id -- " when " +>
-               col sepWordAnd argsWithConstr (fun (p:CodeTypeParameter) -> 
-                 col sepWordAnd p.Constraints (fun impl ->
-                   id -- "'" -- p.Name -- " :> " +> generateTypeRef impl)
-                 +> if (not p.HasConstructorConstraint) then id else
-                      if (p.Constraints.Count <> 0) then id -- " and " else id
-                      -- "'" -- p.Name -- " : (new:unit->'" -- p.Name -- ")")
-               -- ">"
-             else id -- ">"
-      tyargs, genTyArgs
-    
-    //---------------------------------------------------------------------------------------------
-    // Binary operators and numeric functions
-    
-    /// Generates code for binary operator using function for left and right operand
-    let binaryOp (op:CodeBinaryOperatorType) fleft fright =
-      id -- "(" +>
-      match op with    
-        | CodeBinaryOperatorType.Add -> fleft -- "+" +> fright;
-        | CodeBinaryOperatorType.BitwiseAnd -> fleft -- "&&&" +> fright;
-        | CodeBinaryOperatorType.BitwiseOr -> fleft -- "|||" +> fright;
-        | CodeBinaryOperatorType.BooleanAnd -> fleft -- "&&" +> fright;
-        | CodeBinaryOperatorType.BooleanOr -> fleft -- "||" +> fright;
-        | CodeBinaryOperatorType.Divide -> fleft -- "/" +> fright;
-        | CodeBinaryOperatorType.GreaterThan -> fleft -- ">" +> fright;
-        | CodeBinaryOperatorType.GreaterThanOrEqual -> fleft -- ">=" +> fright;
-        | CodeBinaryOperatorType.LessThan -> fleft -- "<" +> fright;
-        | CodeBinaryOperatorType.LessThanOrEqual -> fleft -- "<=" +> fright;
-        | CodeBinaryOperatorType.Modulus -> fleft -- "%" +> fright;
-        | CodeBinaryOperatorType.Multiply -> fleft -- "*" +> fright;
-        | CodeBinaryOperatorType.Subtract -> fleft -- "-" +> fright;
-        
-        // REVIEW: this is not used in any tests and it is not sure what it means
-        | CodeBinaryOperatorType.Assign -> fleft -- "<-" +> fright; 
-        
-        // REVIEW: reference and value equality use C# semantics, so it is not sure what we should generate
-        | CodeBinaryOperatorType.ValueEquality -> fleft -- "=" +> fright;  
-        | CodeBinaryOperatorType.IdentityEquality -> id -- "System.Object.ReferenceEquals((" +> fleft -- " :> obj), (" +> fright -- " :> obj))"; 
-        | CodeBinaryOperatorType.IdentityInequality -> id -- "not (System.Object.ReferenceEquals((" +> fleft -- " :> obj), (" +> fright -- " :> obj)))"; 
-        | _ -> failwithf "unimplemented binary operator type '%A'" op;
-      -- ")"
-    
-    /// Are both types numerical types where numeric conversion function can be applied?
-    let rec isNumericConversion (src:Type) (target:Type) = 
-      convertFunc src <> "" && convertFunc target <> ""
-    
-    
-    /// Returns F# conversion function for the specified type (or empty string)
-    and convertFunc (ty:Type) = 
-      if (ty = (typeof)) then "int16"
-      elif (ty = (typeof)) then "int32"
-      elif (ty = (typeof)) then "int64"
-      elif (ty = (typeof)) then "uint16"
-      elif (ty = (typeof)) then "uint32"
-      elif (ty = (typeof)) then "uint64"
-      elif (ty = (typeof)) then "float"
-      elif (ty = (typeof)) then "float32"
-      elif (ty = (typeof)) then "decimal"
-      elif (ty = (typeof)) then "byte"
-      elif (ty = (typeof)) then "sbyte"
-      else ""
-    
-    
-    /// Generate value of primitive expression  
-    let generatePrimitiveExpr (reqty:Type option) (c:CodePrimitiveExpression) =
-      let tostr v par =   
-        if par then "(" + sprintf "%A" v + ")" else sprintf "%A" v;
-      let (value, typ) = 
-        match c.Value with
-          | :? Char as c -> ("'" + c.ToString() + "'", Some(typeof))
-          | :? String as s -> (sprintf "%A" s, Some(typeof)) 
-          | :? Boolean as b -> ((if (b) then "true" else "false"), Some(typeof))
-          | :? Single as f -> (tostr f (f<0.0f), Some(typeof))
-          | :? Double as f -> (tostr f (f<0.0), Some(typeof))
-          | :? Byte as i -> (tostr i (i<0uy), Some(typeof))
-          | :? SByte as i -> (tostr i (i<0y), Some(typeof))
-          | :? Int16 as i -> (tostr i (i<0s), Some(typeof))
-          | :? Int32 as i -> (tostr i (i<0), Some(typeof))
-          | :? Int64 as i -> (tostr i (i<0L), Some(typeof))
-          | :? UInt16 as i -> (tostr i (i<0us), Some(typeof))
-          | :? UInt32 as i -> (tostr i (i<0u), Some(typeof))
-          | :? UInt64 as i -> (tostr i (i<0UL), Some(typeof))
-          | null -> ("null", None)
-          | _ -> ("(* Unknown primitive value '"+c.Value.ToString()+"' of type '"+
-                  c.Value.GetType().Name+"'. Please report this to the F# team. *)", None) 
-      match typ, reqty with        
-        | Some t, Some rt when t <> rt -> id -- convertFunc rt -- " (" -- value -- ")"
-        | _, _ ->  id -- value
-        
-        
-    /// Generate array initializer. Checks generator options for ASP.NET workaround.
-    let rec generateArrayCreateExpr (c:CodeArrayCreateExpression) =
-      if (c.Initializers<>null && c.Initializers.Count>0) then
-        id
-        -- "([| " +> col sepArgsSemi c.Initializers generateBoxedExpression -- " |] : "
-        +> delay (fun ctx -> 
-            generateTypeRef c.CreateType          
-            -- if (ctx.Options &&& AdditionalOptions.AspNetArrays <> enum 0) then "[]" else "")
-        -- ")" 
-      else
-        id
-        -- "(Array.zeroCreate "
-        +> if (c.SizeExpression <> null) then
-              id -- "(" +> generateExpression c.SizeExpression -- ")"
-           else
-              id +> str c.Size
-        -- ":"
-        +> delay (fun ctx -> 
-            generateTypeRef c.CreateType          
-            -- if (ctx.Options &&& AdditionalOptions.AspNetArrays <> enum 0) then "[]" else "")
-        -- ")";
-    
-    /// Tries to resolve if type is an array, so we can generate 
-    /// appropriate code (it can be either indexer or array, but we need to generate
-    /// .Item call for indexers (no overloading is supported by .[]).
-    /// Returns: "None" - can't resolve, "Some" resovled (true/false - is it an array?)
-    and tryIsExpressionArray c (ctx:Context) = 
-      match (c :> CodeExpression) with
-        | :? CodeFieldReferenceExpression as ce when 
-             (ce.TargetObject :? CodeThisReferenceExpression) -> 
-             match Map.tryFind ce.FieldName ctx.FieldTypes with 
-               | Some t -> Some (t.ArrayRank > 0)
-               | None -> None
-        | :? CodePropertyReferenceExpression as ce when 
-             (ce.TargetObject :? CodeThisReferenceExpression) -> 
-             match Map.tryFind ce.PropertyName ctx.PropertyTypes with 
-               | Some t -> Some (t.ArrayRank > 0)
-               | None -> None
-        | _ -> None    
-    
-    
-    /// Tries to resolve type of an expression using a few tricks:
-    /// * Fields of current type may have known type
-    /// * Properties of current type as well
-    /// * We can also try to resolve other properties (sometimes it helps)
-    /// * Resolve type for local variables or argument reference 
-    and tryGetExpressionType c (ctx:Context) = 
-      match (c :> CodeExpression) with
-        | :? CodeFieldReferenceExpression as ce when 
-             (ce.TargetObject :? CodeThisReferenceExpression) -> 
-             tryGetSystemType (Map.tryFind ce.FieldName ctx.FieldTypes)
-        | :? CodePropertyReferenceExpression as ce when 
-             (ce.TargetObject :? CodeThisReferenceExpression) -> 
-             tryGetSystemType (Map.tryFind ce.PropertyName ctx.PropertyTypes)
-        | :? CodePropertyReferenceExpression as ce ->
-               match (tryGetExpressionType ce.TargetObject ctx) with
-                 | None -> None
-                 | Some t ->
-                     try 
-                       Some (t.GetProperty(ce.PropertyName).PropertyType)
-                     with _ ->
-                       None
-        | :? CodeArgumentReferenceExpression as ce ->                              
-               Map.tryFind ce.ParameterName ctx.LocalVariableTypes  
-               // NOTE:
-               // XSD generates incorrect referenece (uses argument ref where it should be variable ref)
-               // and unfortunately it is followed by wrong numeric type, so we need to workaround this
-        | :? CodeVariableReferenceExpression as ce ->
-               Map.tryFind ce.VariableName ctx.LocalVariableTypes 
-        | _ -> None
-      
-    //---------------------------------------------------------------------------------------------
-    // Generating code for expressions
-          
-    /// Generates expression which is casted to the inferred type using "(unbox (box e))"
-    /// this is useful if the environment where it is used specifies the type explicitly
-    /// for example in array initializers
-    and generateBoxedExpression c = 
-      id -- "unbox (box (" +> generateExpression c -- "))"
-
-    /// Generates expression, but generates "this" if the expression is null
-    /// (used in field reference etc. because some CodeDOM generators do this 
-    ///  though I believe it is a mistake)
-    and generateExpressionDefaultThis c = 
-      if (c = null) then id -- "this"
-        else generateExpression c
-        
-    /// Matches array or indexer expression and corrects it if the generated CodeDOM is incorrect
-    and (|CodeArrayAccessOrIndexer|_|) (ctx:Context) (c:CodeExpression) =
-      let noneT b = match b with Some v -> v | _ -> true
-      let noneF b = match b with Some v -> v | _ -> false
-      match c with 
-        | :? CodeArrayIndexerExpression as ce -> 
-             Some(true && (noneT (tryIsExpressionArray ce.TargetObject ctx)), ce.TargetObject, ce.Indices)
-        | :? CodeIndexerExpression as ce -> 
-             Some(false || (noneF (tryIsExpressionArray ce.TargetObject ctx)), ce.TargetObject, ce.Indices)
-        | _ -> None
-      
-    /// Generate expression - with unkonw type
-    and generateExpression c = generateExpressionTyped None c    
- 
-    // Generates code for CodeExpression
-    // If the caller knows the expected type of the expression it can be given as an argument,
-    // but currently it is used only when generating primitve expression to convert value to the right type
-    and generateExpressionTyped ty c ctx = 
-      (match c with 
-        | :? CodeArgumentReferenceExpression as ce ->
-              id -! ce.ParameterName
-        | :? CodeArrayCreateExpression as ce ->
-              id +> generateArrayCreateExpr ce              
-        
-        // for indexers we generate get_Item to handle overloading
-        | CodeArrayAccessOrIndexer ctx (isArray, target, indices) ->
-              id
-              +> generateExpression target -- "."
-              +> id -- "[" +> col sepArgs indices generateExpression -- "]" 
-              
-        | :? CodeBaseReferenceExpression as ce ->
-              id -- "base"
-              
-        | :? CodeBinaryOperatorExpression as ce ->
-              binaryOp ce.Operator (generateExpressionTyped ty ce.Left) (generateExpressionTyped ty ce.Right)
-        
-        // casting can also represent numeric conversion - we try to detect that case      
-        | :? CodeCastExpression as ce -> 
-              id 
-              +> delay (fun ctx -> 
-                  match tryGetExpressionType (ce.Expression) ctx, tryGetSystemType (Some ce.TargetType) with
-                  | Some(t1), Some(t2) when isNumericConversion t1 t2 ->
-                      id
-                      -- "(" -- (convertFunc t2)
-                      -- "(" +> generateExpression ce.Expression -- "))"
-                  | _ ->
-                    id
-                    -- "((" +> generateExpression ce.Expression 
-                    -- " :> obj) :?> " +> generateTypeRef ce.TargetType -- ")" )
-        
-        // argument for "ref" or "out" C# parameter - both generated as byref in F#
-        | :? CodeDirectionExpression as ce ->
-              id -- "&" +> generateExpression ce.Expression
-        
-        // for delegates, we use 'FuncFromTupled' to get the right function type      
-        | :? CodeDelegateCreateExpression as ce ->
-              id 
-              -- "new " +> generateTypeRef ce.DelegateType -- "(Microsoft.FSharp.Core.FuncConvert.FuncFromTupled " 
-              +> generateExpression ce.TargetObject 
-              -- "." -- ce.MethodName -- ")";
-        
-        | :? CodeDelegateInvokeExpression as ce ->
-              id
-              +> match ce.TargetObject with 
-                  // "this.( ... )" - will be translated to a raise function returned
-                  // by create_DelegateEvent
-                  | :? CodeEventReferenceExpression as eref when  
-                      (eref.TargetObject :? CodeThisReferenceExpression) 
-                      && ((ctx.DeclaredEvents |> List.tryFind (fun e -> e.Name = eref.EventName)) <> None) -> 
-                      // F# declared event..
-                      id
-                      -- "this._invoke_" -- eref.EventName -- " [| "
-                      +> col sepArgsSemi ce.Parameters (fun (e:CodeExpression) ->
-                           id
-                           -- " box (" 
-                           +> generateExpression e
-                           -- ")" ) -- " |]"
-                  // other than this.(). This may not be correct (but works on cases in test suite)
-                  | _ -> 
-                      generateExpression ce.TargetObject 
-                      -- ".Invoke((" +> col sepArgs ce.Parameters generateExpression -- "))"
-        
-        // this prevents using mutable variable in a way it would escape its scope
-        | :? CodeEventReferenceExpression as ce ->
-              id -- "let __e = " +> generateExpression ce.TargetObject -- " in __e." -- ce.EventName
-                          
-        | :? CodeFieldReferenceExpression as ce -> 
-              delay (fun ctx ->  
-              
-                // if 'UnknonwFieldsAsLocals' is set than the code will generate
-                // "fld" instead of "this.fld" when accessing field that is not known
-                let sft =
-                  match ce.TargetObject with
-                  | :? CodeThisReferenceExpression as t when 
-                       (ctx.Options &&& AdditionalOptions.UnknonwFieldsAsLocals <> enum 0) ->
-                       Option.isNone (Map.tryFind ce.FieldName ctx.FieldTypes)
-                  | _ -> false
-                if sft then
-                  id -! ce.FieldName
-                else
-                  id +> generateExpressionDefaultThis ce.TargetObject 
-                     -- "." -- ce.FieldName )
-              
-        | :? CodeMethodInvokeExpression as ce ->
-              id 
-              +> generateExpression (ce.Method :> CodeExpression) 
-              -- "(" +> col sepArgs ce.Parameters generateExpression -- ")" 
-              
-        | :? CodeMethodReferenceExpression as ce ->
-              id 
-              +> match ce.TargetObject with 
-                   | :? CodeTypeReferenceExpression as ct ->
-                         id +> generateTypeRefNet ct.Type
-                   | _ -> generateExpressionDefaultThis ce.TargetObject
-              -- "." -- ce.MethodName 
-              +> generateTypeArgs ce.TypeArguments
-              
-        | :? CodeObjectCreateExpression as ce ->
-              id
-              -- "new " +> generateTypeRef ce.CreateType 
-              -- "(" +> col sepArgs ce.Parameters generateExpression -- ")" 
-              
-        | :? CodePrimitiveExpression as ce -> 
-              id +> generatePrimitiveExpr ty ce 
-              
-        | :? CodePropertyReferenceExpression as ce ->
-              id +> generateExpressionDefaultThis ce.TargetObject -- "." -- ce.PropertyName 
-              
-        | :? CodePropertySetValueReferenceExpression as ce ->  
-              id -- "value"
-              
-        // we move all lines of "snippets" by 100 columns so it isn't violating #light rules
-        | :? CodeSnippetExpression as ce ->
-              let strs = 
-                ce.Value.Split([| '\r'; '\n' |], StringSplitOptions.RemoveEmptyEntries)
-                |> Array.map (fun s -> String(' ',100) + s )
-              colT sepNone strs (fun s -> id ++ s)
-
-        | :? CodeThisReferenceExpression as ce ->  
-              id -- "this"
-              
-        | :? CodeTypeOfExpression as ce ->  
-              id -- "(typeof<" +> generateTypeRef ce.Type -- ">)"
-              
-        | :? CodeTypeReferenceExpression as ce ->  
-              id +> generateTypeRef ce.Type 
-              
-        | :? CodeVariableReferenceExpression as ce ->            
-              match ty with 
-              | Some t when (convertFunc t) <> "" -> id -- "(" -- (convertFunc t) -- " " -! ce.VariableName -- ")"
-              | _ -> id -! ce.VariableName
-              
-        | null ->
-            id 
-            
-        | _ -> id 
-               -- "(* Unknown expression type '" -- (c.GetType().Name) 
-               -- "' please report this to the F# team. *)") ctx
-    
-    //---------------------------------------------------------------------------------------------
-    // Generating code for statements
-      
-    and generateVariableDeclStmt (c:CodeVariableDeclarationStatement) =
-      id
-      +> (fun ctx -> { ctx with LocalVariableTypes = tryAddVariableType c.Name c.Type ctx.LocalVariableTypes } )
-      ++ "let mutable (" -! c.Name -- ":" +> generateTypeRef c.Type -- ") = "
-      +> if (c.InitExpression <> null) then 
-           (generateExpressionTyped (tryGetSystemType (Some c.Type))) c.InitExpression 
-         else 
-           (generateDefaultValue c.Type);
-    
-    // REVIEW: Line pragmas don't work with the #light syntax
-    let generateLinePragma (l:CodeLinePragma) = 
-      if (l = null) then id else
-        id 
-        // ++ "# " +> str l.LineNumber -- " \"" -- l.FileName -- "\""
-        
-    let rec generateCatchClause (c:CodeCatchClause) =
-      id
-      ++ "| :? " +> generateTypeRef c.CatchExceptionType 
-      -- " as " -- c.LocalName -- " ->" +> incIndent
-      +> generateStatements c.Statements +> decIndent
-
-    and generateStatements (sts:CodeStatementCollection) = 
-      let fix = 
-        if (sts.Count = 0 || (sts.[sts.Count - 1] :? CodeVariableDeclarationStatement))
-          then id ++ "()" else id
-      col sepNone sts generateStatement +> fix      
-
-    // Generates block of statements which can return a value
-    and generateStatementBlock typ (statements:CodeStatementCollection) =        
-      // determine if the block uses only "safe" return statements
-      // that can be translated to functional returns without using exceptions
-      let safeReturns = 
-        statements 
-        |> codeDomCallbackWithScope (fun rcall safeScope res o -> 
-            match o with 
-            | :? CodeMethodReturnStatement as ret -> safeScope && res
-            | :? CodeTryCatchFinallyStatement as tfs -> rcall (safeScope && (tfs.CatchClauses.Count = 0)) res o
-            | :? CodeStatementCollection -> rcall safeScope res o
-            | _ -> rcall false res o ) true true
-    
-      id
-      +> incIndent
-      +> (fun ctx -> { ctx with CurrentMethodReturnType=typ; 
-                                LocalVariableTypes = Map.empty; 
-                                ReturnUsingException = not safeReturns })
-      // if returning using exception - wrap inside try .. catch
-      +> if (not safeReturns) then id ++ "try" +> incIndent else id
-      +> generateStatements statements
-      +> if (safeReturns) then id else
-           match typ with 
-           | Some t when t.BaseType <> "System.Void" -> 
-               id ++ "failwith \"Code branch didn't return any value!\";"
-               +> decIndent
-               ++ "with" ++ "    | ReturnException" +> uniqid -- " v -> (v :?> " +> generateTypeRef t -- ")"
-           | _ ->  
-               id ++ "raise ReturnNoneException" +> uniqid 
-               +> decIndent
-               ++ "with" ++ "    | ReturnNoneException" +> uniqid -- " -> ()"
-      +> (fun ctx -> {ctx with CurrentMethodReturnType=None; 
-                               LocalVariableTypes = Map.empty; 
-                               ReturnUsingException = false })
-      +> decIndent
-
-    and generateComment (c:CodeComment) =
-      id 
-      -- if c.DocComment then "/// " else "// " 
-      -- (c.Text);
-          
-    and generateStatement (c:CodeStatement) = 
-      (generateLinePragma c.LinePragma) +>
-      (match c with 
-        | :? CodeAssignStatement as cs -> 
-              match cs.Left with 
-                | :? CodeIndexerExpression as ci ->
-                    id ++ "" 
-                    +> generateExpressionDefaultThis ci.TargetObject -- ".set_Item(" 
-                    +> col sepArgs ci.Indices generateExpression -- ", "
-                    +> delay (fun ctx -> generateExpressionTyped (tryGetExpressionType cs.Left ctx) cs.Right)
-                    -- ")"
-                | _ ->
-                    id ++ "" +> generateExpression cs.Left 
-                    -- " <- " 
-                    +> delay (fun ctx -> generateExpressionTyped (tryGetExpressionType cs.Left ctx) cs.Right)
-                    
-        | :? CodeAttachEventStatement as cs ->
-              id ++ "" +> generateExpression (cs.Event :> CodeExpression) 
-              -- ".AddHandler(" +> generateExpression cs.Listener -- ")"
-              
-        | :? CodeCommentStatement as cs -> 
-              id ++ "" +> generateComment cs.Comment 
-              
-        | :? CodeConditionStatement as cs ->
-              id 
-              ++ "if " +> generateExpression cs.Condition -- " then"
-              +> incIndent +> col sepNone cs.TrueStatements generateStatement +> decIndent
-              +> if (cs.FalseStatements<>null && cs.FalseStatements.Count>0) then 
-                   id 
-                   ++ "else" +> incIndent 
-                   +> col sepNone cs.FalseStatements generateStatement +> decIndent else id                
-                   
-        | :? CodeExpressionStatement as cs -> 
-              id ++ "" +> generateExpression cs.Expression -- " |> ignore";
-              
-        | :? CodeIterationStatement as cs ->
-              id 
-              +> generateStatement cs.InitStatement
-              ++ "while " +> generateExpression cs.TestExpression -- " do"
-              +> incIndent
-              +> col sepNone cs.Statements generateStatement 
-              +> generateStatement cs.IncrementStatement
-              +> decIndent
-              
-        // Return - either throw "ReturnException" or just generate F# expression with the value
-        | :? CodeMethodReturnStatement as cs -> 
-              id
-              +> delay (fun ctx -> 
-                   if (ctx.ReturnUsingException) then
-                     id 
-                     ++ "raise "
-                     +> match ctx.CurrentMethodReturnType with
-                        | Some t when t.BaseType <> "System.Void" -> 
-                            id -- "(ReturnException" +> uniqid -- "(" 
-                            -- "((" +> generateExpression cs.Expression -- " :> obj) :?> " +> generateTypeRef t -- ")" 
-                            -- " :> obj))"
-                        | _ -> 
-                            id -- "ReturnNoneException" +> uniqid
-                   else 
-                     match ctx.CurrentMethodReturnType with
-                     | Some t when t.BaseType <> "System.Void" -> 
-                        id ++ "((" +> generateExpression cs.Expression -- " :> obj) :?> " +> generateTypeRef t -- ")" 
-                     | _ ->      id ++ "")
-                     
-        | :? CodeSnippetStatement as cs ->
-              let strs = cs.Value.Split([| '\r'; '\n' |], StringSplitOptions.RemoveEmptyEntries);
-              colT sepNone strs (fun s -> id ++ s)
-              
-        | :? CodeVariableDeclarationStatement as cs -> 
-              id +> generateVariableDeclStmt cs
-              
-        | :? CodeThrowExceptionStatement as cs ->            
-              id ++ "raise (" +> generateExpression cs.ToThrow -- ")"
-        
-        // try .. catch .. finaly is generated as try (try .. catch) finally      
-        | :? CodeTryCatchFinallyStatement as cs -> 
-              let hasCatch = (cs.CatchClauses<>null && cs.CatchClauses.Count>0) 
-              let hasFinally = (cs.FinallyStatements<>null && cs.FinallyStatements.Count>0) 
-              id 
-              ++ "try" +> incIndent
-              +> if (hasCatch && hasFinally) then id ++ "try" +> incIndent else id
-              +> generateStatements cs.TryStatements 
-              +> if (cs.CatchClauses<>null && cs.CatchClauses.Count>0) then 
-                   decIndent 
-                   ++ "with" +> incIndent 
-                   +> col sepNone cs.CatchClauses generateCatchClause
-                   +> decIndent else id;
-              +> if (cs.FinallyStatements<>null && cs.FinallyStatements.Count>0) then 
-                   decIndent
-                   ++ "finally" +> incIndent 
-                   +> col sepNone cs.FinallyStatements generateStatement
-                   +> decIndent else id;
-                   
-        | _ -> id 
-               -- "(* Unknown statement type '" -- (c.GetType().Name) 
-               -- "' please report this to the F# team. *)")
-
-    //---------------------------------------------------------------------------------------------
-    // Support for class members (Custom attributes, paramters, etc..)
-        
-    let generateAttributeArg (c:CodeAttributeArgument) =
-      id
-      +> if (c.Name<> null && c.Name.Length>0) then 
-          id -- c.Name -- "=" else id
-      +> generateExpression c.Value;
-      
-    let generateCustomAttrDecl (c:CodeAttributeDeclaration) =
-      id
-      -- (getBaseTypeRefString c.Name)
-      +> if (c.Arguments.Count = 0) then id else
-           id -- "(" +> (col sepArgs c.Arguments generateAttributeArg) -- ")" 
-          
-    let generateCustomAttrDeclsList (c:CodeAttributeDeclaration list) =
-      id 
-      +> if (c.Length = 0) then id else 
-           id ++ "[<" +> (colT sepNlnSemiSpace c generateCustomAttrDecl) -- ">]"
-          
-    let generateCustomAttrDeclsForType (c:CodeAttributeDeclaration list) (a:Reflection.TypeAttributes) =
-      id 
-      +> if (c.Length = 0)
-            && (a &&& TypeAttributes.Abstract  = enum 0)
-            && (a &&& TypeAttributes.Sealed  = enum 0) then id 
-         else 
-           id ++ "[<" 
-                 +> (colT sepNlnSemiSpace [ for x in c do yield generateCustomAttrDecl x
-                                            if a &&& TypeAttributes.Abstract <> enum 0 then yield (id -- "Microsoft.FSharp.Core.AbstractClassAttribute" +> sepNlnSemiSpace)
-                                            if a &&& TypeAttributes.Sealed   <> enum 0 then yield (id -- "Microsoft.FSharp.Core.SealedAttribute" +> sepNlnSemiSpace) ]
-                                          (fun c -> c) )                                           
-              -- ">]"
-          
-(*
-VisibilityMask Specifies type visibility information. 
- NotPublic Specifies that the class is not public. 
- Public Specifies that the class is public. 
- NestedPublic Specifies that the class is nested with public visibility. 
- NestedPrivate Specifies that the class is nested with private visibility. 
- NestedFamily Specifies that the class is nested with family visibility, and is thus accessible only by methods within its own type and any subtypes. 
- NestedAssembly Specifies that the class is nested with assembly visibility, and is thus accessible only by methods within its assembly. 
- NestedFamANDAssem Specifies that the class is nested with assembly and family visibility, and is thus accessible only by methods lying in the intersection of its family and assembly. 
- NestedFamORAssem Specifies that the class is nested with family or assembly visibility, and is thus accessible only by methods lying in the union of its family and assembly. 
- LayoutMask Specifies class layout information. 
- AutoLayout Specifies that class fields are automatically laid out by the common language runtime. 
- SequentialLayout Specifies that class fields are laid out sequentially, in the order that the fields were emitted to the metadata. 
- ExplicitLayout Specifies that class fields are laid out at the specified offsets. 
- ClassSemanticsMask Specifies class semantics information; the current class is contextful (else agile). 
- Class Specifies that the type is a class. 
- Interface Specifies that the type is an interface. 
-    DONE: Abstract Specifies that the type is abstract. 
-    DONE: Sealed Specifies that the class is concrete and cannot be extended. 
- SpecialName Specifies that the class is special in a way denoted by the name. 
- Import Specifies that the class or interface is imported from another module. 
- Serializable Specifies that the class can be serialized. 
- StringFormatMask Used to retrieve string information for native interoperability. 
- AnsiClass LPTSTR is interpreted as ANSI. 
- UnicodeClass LPTSTR is interpreted as UNICODE. 
- AutoClass LPTSTR is interpreted automatically. 
- CustomFormatClass LPSTR is interpreted by some implementation-specific means, which includes the possibility of throwing a NotSupportedException. 
- CustomFormatMask Used to retrieve non-standard encoding information for native interop. The meaning of the values of these 2 bits is unspecified. 
- BeforeFieldInit Specifies that calling static methods of the type does not force the system to initialize the type. 
- ReservedMask Attributes reserved for runtime use. 
- RTSpecialName Runtime should check name encoding. 
- HasSecurity 
-*)
-
-    let generateCustomAttrDecls (c:CodeAttributeDeclarationCollection) = 
-      generateCustomAttrDeclsList (c |> Seq.cast |> Seq.to_list)
-      
-    // NOTE: may contain custom attributes - this isn't supported
-    let generateParamDecl (c:CodeParameterDeclarationExpression) =
-      let dir = if (c.Direction <> FieldDirection.In) then " byref" else ""
-      id 
-      -! c.Name -- ":" +> generateTypeRef c.Type -- dir;
-
-    // NOTE: may contain custom attributes - this isn't supported
-    let generateAbstractParamDecl (c:CodeParameterDeclarationExpression) =
-      let dir = if (c.Direction <> FieldDirection.In) then " byref" else ""
-      id +> generateTypeRef c.Type -- dir
-
-    // Find all overloads of the method, so we can produce []
-    let getMethodOverloads (membs:CodeTypeMemberCollection) = 
-      let getMethodOverload map (n:CodeMemberMethod) = 
-        let n = (n.Name, getTypeRefSimple n.PrivateImplementationType)
-        match Map.tryFind n map with 
-          | Some v -> v 
-          | None -> 0
-      let incMethodOverload (n:CodeMemberMethod) map = 
-        let n = (n.Name, getTypeRefSimple n.PrivateImplementationType)
-        match Map.tryFind n map with 
-          | Some v -> Map.add n (v+1) map
-          | None -> Map.add n 1 map          
-      let m,a = 
-        membs 
-        |> codeDomCallBackNoScope 
-            (fun rcall (res,mlst) o -> 
-                match o with 
-                  | :? CodeMemberMethod as meth when meth.GetType() = (typeof) -> 
-                      // we have found another method
-                      (incMethodOverload meth res, 
-                       ( meth, 
-                         getMethodOverload res meth,
-                         getTypeRefSimple meth.PrivateImplementationType
-                       )::mlst)
-                  | :? CodeTypeMemberCollection -> 
-                       // recursively walk through member collection
-                       rcall (res,mlst) o
-                  | _ -> (res,mlst))
-            (Map.empty, [])
-      getMethodOverload m, a
-      
-    //---------------------------------------------------------------------------------------------
-    // Fields, properties, constructors, methods
-    
-    /// fields 
-    let generateField (c:CodeMemberField) =    
-      id
-      +> generateCustomAttrDecls c.CustomAttributes
-      +> if ((c.Attributes &&& MemberAttributes.ScopeMask) = MemberAttributes.Static) then
-            id
-            ++ "[]"
-            ++ "static val mutable " -- c.Name -- ":" +> generateTypeRef c.Type
-         elif ((c.Attributes &&& MemberAttributes.ScopeMask) = MemberAttributes.Const) then
-            id
-            ++ "static member " -- c.Name -- " = " +> generateExpression c.InitExpression // should have initial value!
-         else
-             match c.InitExpression with 
-             | null -> 
-                id ++ "[]"
-                   ++ "val mutable " -- c.Name -- ":" +> generateTypeRef c.Type
-             | e -> 
-                id ++ "val mutable " -- c.Name -- ":" +> generateTypeRef c.Type
-    
-    /// Abstract property in the interface 
-    let generateInterfaceMemberProperty (c:CodeMemberProperty) =    
-      id 
-      ++ "abstract " -- c.Name -- " : " 
-      +> (if c.Parameters.Count  > 0 then col sepStar c.Parameters generateAbstractParamDecl -- " -> " else id) 
-      +> generateTypeRef c.Type -- " with " -- (if c.HasGet && not c.HasSet then "get" elif c.HasGet && c.HasSet then "get,set" else "set")
-
-    // REVIEW: this is not correct, it should follow same abstract/default/override logic
-    // as methods. Unfortunately it isn't possible to declare "abstract" property with "default" implementation
-    let generateClassProperty (typ:MemberGenerateType)  (p:CodeMemberProperty) =    
-    
-      (if typ = MemberGenerateType.InsideStruct or
-          p.Attributes &&& MemberAttributes.ScopeMask = MemberAttributes.Override or 
-          p.Attributes &&& MemberAttributes.ScopeMask = MemberAttributes.Static 
-       then id
-       else (id 
-             ++ ""
-             +> generateInterfaceMemberProperty p))
-      +> generateCustomAttrDecls p.CustomAttributes
-      ++ if typ = MemberGenerateType.InsideStruct then "member this."
-         elif (p.Attributes &&& MemberAttributes.ScopeMask = MemberAttributes.Override) then "override  this." 
-         elif (p.Attributes &&& MemberAttributes.ScopeMask = MemberAttributes.Static) then "static member " 
-         else "default this."
-      -- p.Name  
-
-      +> if (not p.HasGet) then id else 
-         incIndent
-         ++ "with get("
-         +> col sepArgs p.Parameters generateParamDecl
-         -- ") : " +> generateTypeRef p.Type -- " =" 
-         +> generateStatementBlock (Some p.Type) p.GetStatements 
-         +> decIndent
-      +> if (not p.HasSet) then id else 
-         incIndent
-         ++ (if p.HasGet then "and" else "with") -- " set(" 
-         +> col sepNone p.Parameters (fun p -> (generateParamDecl p) -- ", ")
-         -- "value:" +> generateTypeRef p.Type 
-         -- ") : unit =" 
-         +> generateStatementBlock None p.SetStatements 
-         +> decIndent
-    
-    // The argument 'c' can be null when generating default ctor 
-    // (which is not generated by the compiler as in C#)
-    let generateConstructor (c:CodeConstructor) =    
-      id
-      +> (if c <> null then generateCustomAttrDecls c.CustomAttributes else id)
-      ++ "new(" 
-      +> if (c <> null) then (col sepArgs c.Parameters generateParamDecl) else id
-      -- ") as this ="
-      +> incIndent
-      +> delay ( fun x -> 
-           colT sepNone x.DeclaredEvents ( fun e -> 
-             id 
-             ++ "let t_event_" -- e.Name -- " = new DelegateEvent<"
-             +> generateTypeRef e.Type -- ">();" ) )    
-      ++ "{"
-      +> incIndent
-      
-      // Calling base constructor?
-      +> if (c = null || c.BaseConstructorArgs = null || c.BaseConstructorArgs.Count = 0) then id else
-           delay (fun x -> 
-             let (b, i) = x.BaseTypes
-             match b with 
-               | None -> failwith "Calling constructor of nonexisting base?"
-               | Some t -> 
-                  id 
-                  ++ "inherit " +> generateTypeRef t -- "("
-                  +> col sepArgs c.BaseConstructorArgs generateExpression
-                  --");"; )
-      // Generate events
-      +> delay ( fun x -> 
-           colT sepNone x.DeclaredEvents ( fun e -> 
-             id 
-             ++ "_event_" -- e.Name -- " = t_event_" -- e.Name -- ".Publish;"
-             ++ "_invoke_" -- e.Name -- " = t_event_" -- e.Name -- ".Trigger;" ) )    
-      // Initialize fields
-      +> delay (fun x ->
-           // Find all (non-static) fields
-           let fields = 
-             x.CurrentType.Members
-               |> codeDomFlatFilter (fun o -> 
-                    match o with 
-                      | :? CodeMemberField as fl -> 
-                        let st = 
-                          (fl.Attributes &&& MemberAttributes.ScopeMask = MemberAttributes.Static) ||
-                          (fl.Attributes &&& MemberAttributes.ScopeMask = MemberAttributes.Const)  
-                        (not st, false) 
-                      | _ -> (false, false) )
-               |> List.map ( fun f -> f :?> CodeMemberField )
-           id
-           // Assign initial expression or default value
-           +> colT sepNone fields (fun fld -> 
-                match fld.InitExpression with 
-                | null -> id
-                | e -> id ++ fld.Name -- " = " +> generateExpression e -- ";" ))
-      +> decIndent
-      ++ "}"
-      +> decIndent
-      +> if (c <> null && c.Statements.Count > 0) then
-           id
-           -- " then"
-           +> incIndent
-           +> generateStatementBlock (None) c.Statements  
-           +> decIndent
-         else 
-           id
-
-    /// Abstract method in the interface
-    let generateInterfaceMemberMethod (c:CodeMemberMethod, overloadId:int) =
-      let custAttrs = (c.CustomAttributes |> Seq.cast |> Seq.to_list)
-      let custAttrs = 
-        match overloadId with 
-          | (-1) -> custAttrs
-          | n -> (new CodeAttributeDeclaration("OverloadID", [| new CodeAttributeArgument(new CodePrimitiveExpression(c.Name+"_"+(box n).ToString())) |] ))::custAttrs    
-
-      let tyargs, genTyArgs = processTypeArgs c.TypeParameters       
-      usingTyParams tyargs 
-        (id
-        +> col sepNone c.Comments generateStatement
-        +> generateCustomAttrDeclsList custAttrs
-        ++ "abstract "
-        -- c.Name 
-        +> genTyArgs
-        -- " : "
-        +> if (c.Parameters.Count > 0) then
-             id +> col sepStar c.Parameters generateAbstractParamDecl
-           else
-             id -- "unit"
-        -- " -> "
-        +> generateTypeRef c.ReturnType)
-      
-    /// By default all CodeDOM generated methods are 'virtual' which means that 
-    /// we have to generate "abstract and default" (unless we're in struct or
-    /// we're implementing an interface, or the method is overriden)
-    /// (NOTE: the same logic isn't properly implemented for properties)
-    let generateMethod (typ:MemberGenerateType) (c:CodeMemberMethod) genAttrFunc =    
-      
-      let prefx, mnm =
-        if (typ = MemberGenerateType.InsideInterface) then
-          id, "member this."
-        elif (typ = MemberGenerateType.InsideStruct) then
-          id, "member this."
-        elif (c.Attributes &&& MemberAttributes.ScopeMask = MemberAttributes.Static) then 
-          id, "static member "
-        elif (c :? CodeEntryPointMethod) then
-          id, "static member "
-        elif (c.Attributes &&& MemberAttributes.ScopeMask = MemberAttributes.Abstract) then 
-          (id +> generateInterfaceMemberMethod (c, -1)),
-          ""
-        elif (c.Attributes &&& MemberAttributes.ScopeMask = MemberAttributes.Override) then 
-          id, "override this." 
-        else
-          (id +> generateInterfaceMemberMethod (c, -1)),
-          "default this."
-
-      //REVIEW: This is mutating the CodeMemberMethod which is a little questionable
-      if c.Name = "" then c.Name <- freshName ()
-      if (mnm = "") then prefx else
-      let tyargs, genTyArgs = processTypeArgs c.TypeParameters       
-      usingTyParams tyargs 
-        (prefx
-        +> genAttrFunc
-        ++ mnm -- c.Name +> genTyArgs -- " "
-        -- " (" +> col sepArgs c.Parameters generateParamDecl -- ")"
-        -- " ="
-        
-        // We need to create mutable copy of all arguments except for "byref" arguments which are mutable
-        +> incIndent
-        +> col sepNone c.Parameters (fun (c:CodeParameterDeclarationExpression) ->  
-             if (c.Direction <> FieldDirection.In) then id else
-               id ++ "let mutable " -- c.Name -- " = " -- c.Name ) 
-        +> decIndent     
-        +> generateStatementBlock (Some c.ReturnType) c.Statements)
-
-    /// Generates method code, adds OverloadID attribute when index isn't "-1"
-    /// Generates comments and than calls 'generatMethod'
-    let generateClassMemberMethod (typ:MemberGenerateType) (c:CodeMemberMethod, overloadId:int) =
-      let custAttrs = (c.CustomAttributes |> Seq.cast |> Seq.to_list)
-      let custAttrs = 
-        match overloadId with 
-          | (-1) -> custAttrs
-          | n -> CodeAttributeDeclaration
-                   ("OverloadID", 
-                    [| CodeAttributeArgument
-                        (CodePrimitiveExpression(c.Name+"_"+(box n).ToString())) |] )::custAttrs    
-      id
-      +> col sepNone c.Comments generateStatement
-      +> generateMethod typ c (generateCustomAttrDeclsList custAttrs)
-    
-    let generateEntryPointMethod (typ:MemberGenerateType) (c:CodeEntryPointMethod)  = 
-      id
-      +> (fun ctx -> {ctx with MainMethodForCurrentNamespace = Some (c, ctx.CurrentType)})
-      +> (generateClassMemberMethod typ ((c :> CodeMemberMethod), -1))
-    
-    let generateEvent (c:CodeMemberEvent) = 
-      id
-      +> generateCustomAttrDecls c.CustomAttributes
-      ++ "[]"
-      ++ "member this." -- c.Name -- " ="
-      +> incIndent
-      ++ "this._event_" -- c.Name
-      +> decIndent
-    
-    let generateEventField (c:CodeMemberEvent) =
-      id
-      +> (fun ctx -> { ctx with DeclaredEvents = c::ctx.DeclaredEvents })
-      ++ "val _event_" -- c.Name -- " : IDelegateEvent<" +> generateTypeRef c.Type -- ">;"
-      ++ "val _invoke_" -- c.Name -- " : obj[] -> unit;";
-    
-
-    let generateCodeSnippetMember (c:CodeSnippetTypeMember) =
-      
-      // Remove additional spaces to make sure that the code aligns with the rest
-      // CONSIDER: what to do with '\t' ?
-      let countSpaces (s:string) =
-        let rec countSpacesAux (s:string) i n = 
-          if i >= s.Length then n
-          elif s.[i] = ' ' then countSpacesAux s (i + 1) (n + 1)
-          else n
-        countSpacesAux s 0 0
-              
-      let lines = c.Text.Split([| '\n'; '\r' |], StringSplitOptions.RemoveEmptyEntries)
-      if lines.Length > 0 then 
-          let spaces = Array.fold_right (countSpaces >> min) lines Int32.MaxValue
-          let lines = lines |> Array.map (fun s -> s.[spaces..])
-          
-          // ASP.NET doesn’t use any comments or custom attributes, 
-          // but I assume this would be the right order
-          id 
-          +> col sepNone c.Comments generateStatement
-          +> generateLinePragma c.LinePragma
-          +> generateCustomAttrDecls c.CustomAttributes
-          +> colT sepNone lines ((++) id)
-      else 
-          id
-
-            
-    //---------------------------------------------------------------------------------------------
-    // Interfaces and classes and other types
-
-    let generateInterfaceImplementation (ifcnfo:KeyValuePair<_, _>) =
-      let name = ifcnfo.Key
-      let membs = ifcnfo.Value
-      id 
-      ++ "interface " -- name -- " with"
-      +> incIndent
-      +> colT sepNln membs (generateClassMemberMethod MemberGenerateType.InsideInterface)
-      +> decIndent
-      ++ "end"
-
-    let generateClassMember typ (c:CodeTypeMember) =
-      match c with 
-      | :? CodeTypeDeclaration -> id 
-      | :? CodeMemberField 
-      | :? CodeMemberEvent 
-      | :? CodeConstructor 
-      | :? CodeMemberProperty ->
-            id
-            +> col sepNone c.Comments generateStatement
-            +> match c with 
-                 | :? CodeMemberField as cm -> generateField cm
-                 | :? CodeMemberEvent as cm -> generateEvent cm
-                 | :? CodeConstructor as cm -> generateConstructor cm
-                 | :? CodeMemberProperty as cm -> generateClassProperty typ cm
-                 | _ -> failwithf "unimplemented CodeTypeMember '%A'" c
-      | _ ->
-            id ++ "(* Member of type '" +> str (c.GetType().Name) --  "' is not supported by the CodeDOM provider and was omitted *)" 
-
-      
-    let generateClassOrStruct structOrCls (scope:string list) (c:CodeTypeDeclaration) ctx =
-      // affects members
-      let typ = 
-        if (structOrCls = "struct") then MemberGenerateType.InsideStruct 
-          else MemberGenerateType.InsideClass
-        
-      // Find all constructors
-      let ctors = c |> codeDomFlatFilter (fun o -> 
-            match o with 
-              | :? CodeTypeDeclaration as dc -> (false, dc = c)
-              | :? CodeConstructor as c -> (true, true)
-              | _ -> (false, true); ) 
-      let anyCtor = ctors.Length > 0;
-      
-      // Find base classes
-      let (baseClass, interfaces) = resolveHierarchy c ctx
-      
-      // Find fields and their types
-      let (ft, pt) = 
-          c.Members |> codeDomCallBackNoScope (fun rcall (ft, pt) o -> 
-              match o with 
-                | :? CodeMemberField as fld -> (Map.add fld.Name fld.Type ft, pt)
-                | :? CodeMemberProperty as prop -> (ft, Map.add prop.Name prop.Type pt)
-                | :? CodeTypeMemberCollection -> rcall (ft, pt) o
-                | _ -> (ft,pt); ) (Map.empty, Map.empty)
-                          
-      // Find all overloads of the method, so we can produce []
-      let (getOverload, allmeths) = getMethodOverloads(c.Members)
-      
-      // Get tripple with method info, overload id and name of the interface where
-      // it belongs (if it's "PrivateImplementationType")
-      let allmeths = allmeths |> List.map ( fun (cm, ovIdx, intrfcName) -> 
-        match getOverload cm with | 1 -> (cm, -1, intrfcName) | _ -> (cm, ovIdx, intrfcName) )
-        
-      // Split between methods of the class
-      // and methods that implemnet some interface
-      let ifcTable = new Dictionary>()
-      let allmeths = 
-        allmeths |> mapFilter (fun (m, idx, ifn) -> 
-          match m.PrivateImplementationType, m.ImplementationTypes.Count with
-          | null, 0 -> Some((m,idx))
-          | _ , 0 -> 
-            let b,v = ifcTable.TryGetValue(ifn)
-            let v = 
-              if (not b) then 
-                let rs = new ResizeArray()
-                ifcTable.Add(ifn, rs)
-                rs 
-              else v
-            v.Add((m,idx))
-            None
-          | null, n -> 
-            for implementedInterface in m.ImplementationTypes do
-                let b,v = ifcTable.TryGetValue(getTypeRefSimple implementedInterface)
-                let v =
-                  if (not b) then
-                    let rs = new ResizeArray()
-                    ifcTable.Add(getTypeRefSimple implementedInterface, rs)
-                    rs
-                  else v
-                v.Add((m, idx))
-            Some((m,idx))
-          | _, _ -> failwith "CodeMethodMember must not have both ImplementationTypes and PrivateImplementationType set.")
-
-
-      // NOTE: we ignore class visibility and also IsPartial property
-      // Declare type arguments and generate class 
-      let tyargs, genTyArgs = processTypeArgs c.TypeParameters       
-      (usingTyParams tyargs 
-        (id  
-        +> (fun ctx -> { ctx with BaseTypes = (baseClass, interfaces); FieldTypes = ft; PropertyTypes = pt; })   
-        ++ ""    
-        ++ (if c.IsPartial then "(* partial *)" else "")    
-        +> col sepNone scope (fun s -> id -- s -- "_") -- c.Name 
-        +> genTyArgs
-        -- " = " -- structOrCls
-        +> incIndent
-        +> match (baseClass) with
-             | Some (bc) -> id ++ "inherit " +> generateTypeRef bc -- " "
-             | _ -> id
-        
-        // Filter and generate members
-        +> colFilterT     sepNln c.Members generateEventField
-        +> colFilter     sepNln c.Members (generateClassMember typ)
-        +> colFilter sepNln c.Members (generateClassMember typ)
-        +> colFilter     sepNln c.Members (generateClassMember typ)
-        
-        // Generate default empty constructor for classes 
-        // without constructors (but not for structs!)
-        +> if (anyCtor) then
-             colFilter sepNln c.Members (generateClassMember typ)
-           elif (structOrCls = "class" && not c.IsPartial) then
-             generateConstructor null
-           else
-            id 
-            
-        // User code
-        +> colFilterT sepNln c.Members generateCodeSnippetMember
-        // Properties, methods, interface implementations
-        +> colFilter sepNln c.Members (generateClassMember typ)
-        +> colT sepNln allmeths (generateClassMemberMethod typ)
-        +> colT sepNln ifcTable generateInterfaceImplementation
-        +> colFilterT sepNln c.Members (generateEntryPointMethod typ)
-        +> decIndent
-        ++ "end")) ctx
-        
-    let generateInterface (scope:string list) (c:CodeTypeDeclaration) =
-      // handle overloads
-      let (getOverload, allmeths) = getMethodOverloads c.Members 
-      let allmeths = allmeths |> List.map ( fun (cm, ovIdx, _) -> 
-        match getOverload cm with | 1 -> (cm, -1) | _ -> (cm, ovIdx) )
-
-      let castToProp (a:CodeTypeMember) = (a :?> CodeMemberProperty)        
-
-      // NOTE: visibility is ignored
-      let tyargs, genTyArgs = processTypeArgs c.TypeParameters       
-      usingTyParams tyargs 
-        (id  
-        ++ ""    
-        +> col sepNone scope (fun s -> id -- s -- "_") -- c.Name 
-        +> genTyArgs
-        -- " = interface" 
-        +> incIndent
-        +> col sepNln c.BaseTypes (fun (cr:CodeTypeReference) -> id ++ "inherit " +> generateTypeRef cr)
-        +> colFilter sepNln c.Members (castToProp >> generateInterfaceMemberProperty)
-        ++ ""
-        +> colT sepNln allmeths generateInterfaceMemberMethod
-        +> decIndent
-        ++ "end")
-      
-    let generateDelegate (scope:string list) (c:CodeTypeDelegate) =
-      let tyargs, genTyArgs = processTypeArgs c.TypeParameters       
-      usingTyParams tyargs 
-        (id
-        ++ ""
-        +> col sepNone scope (fun s -> id -- s -- "_") -- c.Name 
-        +> genTyArgs
-        -- " = delegate of ("
-        +> if (c.Parameters.Count = 0) then
-             id -- "unit"
-           else
-             col sepStar c.Parameters (fun (p:CodeParameterDeclarationExpression) ->
-               id +> generateTypeRef p.Type )
-        -- ") -> "
-        +> match c.ReturnType with 
-             | null -> id -- "unit"
-             | rt -> generateTypeRef rt)
-      
-    let generateEnumField (index:int) (c:CodeMemberField) =    
-      id 
-      ++ "| " -- c.Name -- " = " 
-      +> match c.InitExpression with
-           | null -> str index
-           | :? CodePrimitiveExpression as p -> generatePrimitiveExpr None p
-           | _ -> failwith "Invalid enum !";
-                     
-    let generateEnum (scope:string list) (c:CodeTypeDeclaration) =
-      let counter = createCounter()
-      id     
-      ++ "" 
-      +> col sepNone scope (fun s -> id -- s -- "_") -- c.Name 
-      -- " =" 
-      +> incIndent
-      +> col sepNone c.Members (fun c -> generateEnumField (counter()) c)
-      +> decIndent
-    
-    let generateTypeDecl index (scope:string list, c:CodeTypeDeclaration) =      
-      id
-      ++ if (index = 0) then "type" else "and"
-      +> incIndent
-      +> col sepNone c.Comments generateStatement 
-      +> generateCustomAttrDeclsForType (c.CustomAttributes |> Seq.cast |> Seq.to_list) c.TypeAttributes
-      +> (fun ctx -> { ctx with CurrentType = c })
-      +> match c with 
-           | :? CodeTypeDelegate as cd -> generateDelegate scope cd
-           | c when c.IsClass -> generateClassOrStruct "class" scope c
-           | c when c.IsInterface -> generateInterface scope c
-           | c when c.IsEnum -> generateEnum scope c
-           | c when c.IsStruct -> generateClassOrStruct "struct" scope c
-           | _ -> 
-            // NOTE: I believe this is full match..
-            id ++ "(* Type '" -- (c.Name) --  "' is not supported by the CodeDOM provider and was omitted. *)"
-      +> decIndent
-      +> (fun ctx -> { ctx with DeclaredEvents = []; CurrentType = null; BaseTypes = (None, []); FieldTypes = Map.empty; PropertyTypes = Map.empty; })
-      
-    /// Generates a main method.
-    let generateMainMethod (c:CodeEntryPointMethod, t:CodeTypeDeclaration) (ns:CodeNamespace) =
-      let retType = getTypeRefSimple c.ReturnType 
-      let custAttrs = 
-        CodeAttributeDeclaration("EntryPoint", [||]) :: (c.CustomAttributes |> Seq.cast |> Seq.to_list)
-      
-      if ((c.Parameters.Count = 0) || (c.Parameters.Count = 1 && (getTypeRefSimple c.Parameters.[0].Type) = "string[]" ))
-         && (retType = "int" || retType = "unit")
-      then
-        id
-        ++ "[]"
-        ++ "module __EntryPoint ="
-        +> incIndent
-        +>   (generateCustomAttrDeclsList custAttrs)  
-        ++   "let Main (args:string[]) ="
-        +> incIndent
-        // REVIEW: Do we need to pass this through the "rename" table?  Could use '(generateTypeRef t)', but we don't have a CodeTypeReference
-        ++ t.Name -- "." -- (c.Name) 
-        +> if c.Parameters.Count = 1 
-           then id -- "(args)"
-           else id -- "()"
-        // F# only supports main methods returning int.  If we're asked to emit one that returns unit, just return 1.
-        +> if retType = "unit" then id ++ "0" else id
-        +> decIndent 
-        +> decIndent
-      else
-        id ++ "(* Could not generate entry point for method '" -- (c.Name) -- "'. *)"
-      
-    //---------------------------------------------------------------------------------------------
-    // Namespaces and compilation units
-    
-    /// Returns CodeNamespace, list of classes with scope (which includes class names 
-    /// of containing classes and sequence of class renames)
-    let preprocessNamespace (c:CodeNamespace) =
-        
-        // Extract flat class structure
-        let flatClasses = 
-            c 
-            |> codeDomCallbackWithScope (fun rcall scope acc o -> 
-                  match o with 
-                    | :? CodeTypeDeclaration as dc -> 
-                        //sprintf "preprocessNamespace: rcall for type c.Name = %s\n" dc.Name |> System.Windows.Forms.MessageBox.Show |> ignore
-                        rcall (dc.Name::scope) ((scope, dc)::acc) (box dc.Members)
-                    | _ -> rcall scope acc o) [] [];
-        let flatClasses = flatClasses |> List.rev
-        
-        // Get all renamed classes - this changes file structure, but at least it works
-        let addNameWithScope n scope acc = 
-            let scn = String.Join("_",Array.of_list scope) + "_" + n
-            let (_, res) = 
-                scope |> List.fold ( fun (prefix,st) e ->
-                  let npref = e + prefix
-                  let nmap = Map.add (npref + n) scn st 
-                  ("." + npref, nmap) ) (".", Map.add n scn acc)
-            res                
-
-        //sprintf "c.Name = %s, #flatClasses = %d\n" c.Name flatClasses.Length |> System.Windows.Forms.MessageBox.Show |> ignore
-
-        let renames = 
-            flatClasses 
-            |> List.fold ( fun acc ((scope:string list), ty) ->
-                  if (scope.Length = 0) then acc 
-                  else addNameWithScope ty.Name scope acc ) Map.empty
-
-        //if (renames |> Seq.length) > 0 then
-        //    sprintf "#renames = %d\n" (renames |> Seq.length) |> System.Windows.Forms.MessageBox.Show |> ignore
-
-        (c, flatClasses, renames |> Map.to_seq);        
-        
-    let generateImport (c:CodeNamespaceImport) = 
-      id  ++ "open " -- c.Namespace
-      
-    /// Generates namespace code - takes output from 'preprocessNamespace'
-    let generateNamespaceInternal ((c:CodeNamespace, flatClasses, _), containing) =
-      let counter = createCounter()
-      let ifcSet = 
-        flatClasses 
-          |> List.fold (fun st (scope, (c:CodeTypeDeclaration)) -> 
-                if (c.IsInterface) then 
-                  let st = Set.add c.Name st 
-                  Set.add (String.Join(".",Array.of_list(scope@[c.Name]))) st
-                else st) Set.empty
-      
-      id
-      +> ( fun ctx -> { ctx with CurrentNamespace = c.Name; DeclaredInterfaces = ifcSet } )
-      +> col sepNone c.Comments generateStatement
-      +> if (c.Name<>null && c.Name.Length>0) then 
-           id ++ "namespace " -! c.Name +> incIndent else id
-      ++ "#nowarn \"49\" // uppercase argument names"
-      ++ "#nowarn \"67\" // this type test or downcast will always hold"
-      ++ "#nowarn \"66\" // this upcast is unnecessary - the types are identical"
-      ++ "#nowarn \"58\" // possible incorrect indentation.." // (when using CodeSnippets ie. in ASP.NET)
-      ++ "#nowarn \"57\" // do not use create_DelegateEvent"
-      ++ "#nowarn \"51\" // address-of operator can occur in the code"
-      +> colT sepNone containing (fun s -> id ++ "open " -- s)
-      +> col sepNone c.Imports generateImport
-      ++ ""              
-      ++ "exception ReturnException" +> uniqid -- " of obj"
-      ++ "exception ReturnNoneException" +> uniqid 
-      ++ ""
-      +> colT sepNln flatClasses (fun c -> generateTypeDecl (counter()) c)
-      +> delay (fun ctx -> match ctx.MainMethodForCurrentNamespace with None -> id | Some mainMethod -> (generateMainMethod mainMethod c))
-      +> if (c.Name<>null && c.Name.Length>0) then decIndent else id
-      +> ( fun ctx -> { ctx with CurrentNamespace = ""; MainMethodForCurrentNamespace = None } )
-    
-    
-    /// Generate code for namespace without compilation unit  
-    let generateNamespace (c:CodeNamespace) = 
-        generateNamespaceInternal ((preprocessNamespace c), [])
-        
-    /// Generate code for type declaration (not included in namespace)                 
-    let generateTypeDeclOnly (c:CodeTypeDeclaration) =
-        let ns = new CodeNamespace()
-        ns.Types.Add(c) |> ignore
-        let ((_, flatClasses, _), containing) = (preprocessNamespace ns, [])
-        let counter = createCounter()
-        id
-        ++ ""              
-        ++ "exception ReturnException" +> uniqid -- " of obj"
-        ++ "exception ReturnNoneException" +> uniqid 
-        ++ ""
-        +> colT sepNln flatClasses (fun c -> generateTypeDecl (counter()) c)
-
-    /// Generate code for compile unit (file)                
-    let generateCompileUnit (c:CodeCompileUnit) (preprocHacks:CodeCompileUnit -> unit) =
-      
-      // Generate code for the compilation unit
-      preprocHacks c;
-      match c with 
-        | :? CodeSnippetCompileUnit as cs -> 
-          id +> generateLinePragma cs.LinePragma ++ cs.Value
-        | _ -> 
-          let preprocNs = c.Namespaces |> Seq.cast |> Seq.map preprocessNamespace
-          let renames = preprocNs |> Seq.collect (fun (_, _, renames) -> renames) 
-          let getContainingNamespaces (c:CodeNamespace) nslist =
-            nslist |> List.filter ( fun (n:string) -> c.Name.StartsWith(n) )
-          let (namespacesWithPrev, _) = 
-            preprocNs |> Seq.fold (fun (res, tmpNames) (c, cls, renames) ->
-              (((c, cls, renames), getContainingNamespaces c tmpNames)::res, c.Name::tmpNames) ) ([], [])
-          let namespacesWithPrev = namespacesWithPrev |> Seq.to_list |> List.rev
-
-          // renames |> Seq.map (fun (s, t) -> sprintf "%s --> %s\n" s t) |> Seq.to_list |> String.concat "\n" |> System.Windows.Forms.MessageBox.Show |> ignore
-          
-          (fun ctx -> { ctx with TypeRenames = Map.of_seq renames; } )        
-          ++ "//------------------------------------------------------------------------------"
-          ++ "// "
-          ++ "//     This code was generated by a tool."
-          ++ "//     Runtime Version: " +> (str System.Environment.Version)
-          ++ "//"
-          ++ "//     Changes to this file may cause incorrect behavior and will be lost if "
-          ++ "//     the code is regenerated."
-          ++ "// "
-          ++ "//------------------------------------------------------------------------------"
-          ++ ""
-          +> colT sepNln namespacesWithPrev generateNamespaceInternal;
-
-    //---------------------------------------------------------------------------------------------
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSLex.Build.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSLex.Build.fs
deleted file mode 100644
index 59db78bc..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSLex.Build.fs
+++ /dev/null
@@ -1,111 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.Build
-
-open System
-open Microsoft.Build.Framework
-open Microsoft.Build.Utilities
-open Internal.Utilities
-
-(**************************************
-MSBuild task for fslex
-
-options:
-        -o : Name the output file.
-        --codepage : Assume input lexer specification file is encoded with the given codepage.
-        --unicode: Produce a lexer for use with 16-bit unicode characters.
-        --help: display this list of options
-        -help: display this list of options
-**************************************)
-
-type FsLex() = 
-    inherit ToolTask()
-
-    let mutable inputFile  : string = null
-    let mutable outputFile : string = null
-    
-    let mutable codePage   : string = null
-    let mutable unicode   = false
-    let mutable otherFlags   = ""
-
-    let mutable toolPath : string = 
-        match FSharpEnvironment.FSharpRunningBinFolder with
-        | Some(s) -> s
-        | None -> ""
-#if FX_ATLEAST_35   
-#else 
-    let mutable toolExe : string = "fslex.exe"
-#endif 
-
-    // []
-    member this.InputFile
-        with get ()  = inputFile
-        and  set (x) = inputFile <- x
-    
-    []
-    member this.OutputFile
-        with get ()  = outputFile
-        and  set (x) = outputFile <- x
-    
-    // --codepage : Assume input lexer specification file is encoded with the given codepage.
-    member this.CodePage
-        with get ()  = codePage
-        and  set (x) = codePage <- x
-    
-    // --unicode: Produce a lexer for use with 16-bit unicode characters.
-    member this.Unicode
-        with get ()  = unicode
-        and  set (x) = unicode <- x
-
-    member this.OtherFlags
-        with get() = otherFlags
-        and set(s) = otherFlags <- s
-
-    // For targeting other versions of fslex.exe, such as "\LKG\" or "\Prototype\"
-    member this.ToolPath
-        with get ()  = toolPath
-        and  set (s) = toolPath <- s
-        
-#if FX_ATLEAST_35   
-#else 
-    // Name of the .exe to call
-    member this.ToolExe
-        with get ()  = toolExe
-        and  set (s) = toolExe <- s        
-#endif
-
-    // ToolTask methods
-    override this.ToolName = "fslex.exe"
-    
-    override this.GenerateFullPathToTool() = 
-        System.IO.Path.Combine(toolPath, this.ToolExe)
-        
-    override this.GenerateCommandLineCommands() =
-    
-        let builder = new CommandLineBuilder()
-        
-        // CodePage
-        builder.AppendSwitchIfNotNull("--codepage ", codePage)
-        
-        // Unicode
-        if unicode then builder.AppendSwitch("--unicode")
-
-        // OutputFile
-        builder.AppendSwitchIfNotNull("-o ", outputFile)
-
-        // OtherFlags - must be second-to-last
-        builder.AppendSwitchUnquotedIfNotNull("", otherFlags)
-
-        builder.AppendSwitchIfNotNull(" ", inputFile)
-        
-        let args = builder.ToString()
-
-        // when doing simple unit tests using API, no BuildEnginer/Logger is attached
-        if this.BuildEngine <> null then
-            let eventArgs = { new CustomBuildEventArgs(message=args,helpKeyword="",senderName="") with member x.Equals(y) = false }
-            this.BuildEngine.LogCustomEvent(eventArgs)
-        args
-    
-    // Expose this to internal components (for unit testing)
-    member internal this.InternalGenerateCommandLineCommands() =
-        this.GenerateCommandLineCommands()
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSLex.Build.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSLex.Build.fsi
deleted file mode 100644
index ee3b4e5e..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSLex.Build.fsi
+++ /dev/null
@@ -1,26 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.Build
-
-type FsLex =
-    inherit Microsoft.Build.Utilities.ToolTask
-
-    new : unit -> FsLex
-    
-    override GenerateCommandLineCommands : unit -> System.String
-    override GenerateFullPathToTool : unit -> System.String
-    override ToolName : System.String
-    
-    member internal InternalGenerateCommandLineCommands : unit -> System.String
-    
-    member InputFile  : string with set
-    []
-    member OutputFile : string with set
-    member CodePage   : string with set
-    member OtherFlags : string with set
-    member Unicode    : bool   with set
-    member ToolPath   : string with set
-#if FX_ATLEAST_35   
-#else 
-    member ToolExe    : string with set    
-#endif
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSYacc.Build.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSYacc.Build.fs
deleted file mode 100644
index 31f51783..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSYacc.Build.fs
+++ /dev/null
@@ -1,142 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.Build
-
-open System
-open Microsoft.Build.Framework
-open Microsoft.Build.Utilities
-open Internal.Utilities
-
-(**************************************
-MSBuild task for fsyacc
-
-options:
-        -o : Name the output file.
-        -v: Produce a listing file.
-        --module : Define the F# module name to host the generated parser.
-        --open : Add the given module to the list of those to open in both the generated signature and implementation.
-        --ml-compatibility: Support the use of the global state from the 'Parsing' module in MLLib.
-        --tokens: Simply tokenize the specification file itself.
-        --codepage : Assume input lexer specification file is encoded with the given codepage.
-        --help: display this list of options
-        -help: display this list of options
-
-NOT SUPPORTED:
-    -v        
-    --tokens
-    --open
-    --module
-
-**************************************)
-
-type FsYacc() = 
-    inherit ToolTask()
-
-    let mutable inputFile  : string = null
-    let mutable outputFile : string = null
-    
-    let mutable codePage   : string = null
-    let mutable otherFlags : string = null
-    let mutable mlCompat   = false
-    
-    let mutable _open  : string = null
-    let mutable _module  : string = null
-
-    let mutable toolPath : string = 
-        match FSharpEnvironment.FSharpRunningBinFolder with
-        | Some(s) -> s
-        | None -> ""
-#if FX_ATLEAST_35
-#else
-    let mutable toolExe : string = "fsyacc.exe"
-#endif
-
-    // []
-    member this.InputFile
-        with get ()  = inputFile
-        and  set (x) = inputFile <- x
-    
-    []
-    member this.OutputFile
-        with get ()  = outputFile
-        and  set (x) = outputFile <- x
-    
-    member this.OtherFlags
-        with get() = otherFlags
-        and set(s) = otherFlags <- s
-
-    // --codepage : Assume input lexer specification file is encoded with the given codepage.
-    member this.CodePage
-        with get ()  = codePage
-        and  set (x) = codePage <- x
-    
-    // --ml-compatibility: Support the use of the global state from the 'Parsing' module in MLLib.
-    member this.MLCompatibility
-        with get ()  = mlCompat
-        and  set (x) = mlCompat <- x
-        
-    // --open
-    member this.Open
-        with get ()  = _open
-        and  set (x) = _open <- x       
-
-   // --module
-    member this.Module
-        with get ()  = _module
-        and  set (x) = _module <- x             
-
-    // For targeting other versions of fslex.exe, such as "\LKG\" or "\Prototype\"
-    member this.ToolPath
-        with get ()  = toolPath
-        and  set (s) = toolPath <- s
-        
-#if FX_ATLEAST_35
-#else
-    // Name of the .exe to call
-    member this.ToolExe
-        with get ()  = toolExe
-        and  set (s) = toolExe <- s        
-#endif
-
-    // ToolTask methods
-    override this.ToolName = "fsyacc.exe"
-    
-    override this.GenerateFullPathToTool() = 
-        System.IO.Path.Combine(toolPath, this.ToolExe)
-        
-    override this.GenerateCommandLineCommands() =
-    
-        let builder = new CommandLineBuilder()
-        
-        // CodePage
-        builder.AppendSwitchIfNotNull("--codepage ", codePage)
-        
-        // ML Compatibility
-        if mlCompat then builder.AppendSwitch("--ml-compatibility")
-
-        // Open
-        builder.AppendSwitchIfNotNull("--open ", _open)
-
-        // Module
-        builder.AppendSwitchIfNotNull("--module ", _module)
-
-        // OutputFile
-        builder.AppendSwitchIfNotNull("-o ", outputFile)
-
-        // OtherFlags - must be second-to-last
-        builder.AppendSwitchUnquotedIfNotNull("", otherFlags)
-
-        builder.AppendSwitchIfNotNull(" ", inputFile)
-        
-        let args = builder.ToString()
-
-        // when doing simple unit tests using API, no BuildEnginer/Logger is attached
-        if this.BuildEngine <> null then
-            let eventArgs = { new CustomBuildEventArgs(message=args,helpKeyword="",senderName="") with member x.Equals(y) = false }
-            this.BuildEngine.LogCustomEvent(eventArgs)
-        
-        args
-    
-    // Expose this to internal components (for unit testing)
-    member internal this.InternalGenerateCommandLineCommands() =
-        this.GenerateCommandLineCommands()
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSYacc.Build.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSYacc.Build.fsi
deleted file mode 100644
index 7d8211da..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSYacc.Build.fsi
+++ /dev/null
@@ -1,28 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.Build
-
-type FsYacc =
-    inherit Microsoft.Build.Utilities.ToolTask
-
-    new : unit -> FsYacc
-    
-    override GenerateCommandLineCommands : unit -> System.String
-    override GenerateFullPathToTool : unit -> System.String
-    override ToolName : System.String
-    
-    member internal InternalGenerateCommandLineCommands : unit -> System.String
-    
-    member InputFile  : string with set
-    []
-    member OutputFile : string with set
-    member CodePage   : string with set
-    member OtherFlags : string with set
-    member MLCompatibility : bool with set
-    member Open : string with set
-    member Module   : string with set
-    member ToolPath   : string with set
-#if FX_ATLEAST_35
-#else
-    member ToolExe   : string with set    
-#endif
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSharp.PowerPack.Build.Tasks.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSharp.PowerPack.Build.Tasks.fsproj
deleted file mode 100644
index 4369398b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/FSharp.PowerPack.Build.Tasks.fsproj
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-   ..\..  
-  
-  
-  
-    Debug
-    AnyCPU
-    2.0
-    {649FA588-F02E-457C-9FCF-87E46407481F}
-    Library
-    FSharp.PowerPack.Build.Tasks
-    true
-    v2.0
-    FSharp.PowerPack.Build.Tasks.xml
-    $(DisabledWarnings);9;44;60;35;42;62;86;47;40
-  
-  
-  
-    --optimize --generatehtml --htmloutputdir:..\..\..\src\WWW\microsoft.com\projects\fsharp\manual --htmlnamespacefile:namespaces.html --htmllocallinks --htmlnamespacefileappend
-  
-  
-    
-      assemblyinfo.FSharp.PowerPack.Build.Tasks.dll.fs
-    
-    
-      CompilerLocationUtils.fs
-    
-    
-    
-    
-    
-    
-      FSharp.PowerPack.targets
-    
-    
-  
-  
-    
-    
-    
-    
-    
-      {DED3BBD7-53F4-428A-8C9F-27968E768605}
-      FSharp.Core
-    
-  
-  
-  
-  
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/assemblyinfo.FSharp.PowerPack.Build.Tasks.dll.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/assemblyinfo.FSharp.PowerPack.Build.Tasks.dll.fs
deleted file mode 100644
index d0978266..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Build.Tasks/assemblyinfo.FSharp.PowerPack.Build.Tasks.dll.fs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Microsoft.FSharp
-open System.Reflection
-[]
-[]
-[]
-[]
-[]
-do()
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/Assembly.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/Assembly.fs
deleted file mode 100644
index de188aa2..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/Assembly.fs
+++ /dev/null
@@ -1,7 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-
-//[]
-[]
-[]
-do()
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/FSharp.PowerPack.Linq.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/FSharp.PowerPack.Linq.fsproj
deleted file mode 100644
index 43984cba..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/FSharp.PowerPack.Linq.fsproj
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-   ..\..  
-  
-  
-  
-    Debug
-    AnyCPU
-    2.0
-    {4c2ed03b-5ace-427b-8285-ad333e60f35e}
-    Library
-    FSharp.PowerPack.Linq
-    true
-    v3.5
-    FSharp.PowerPack.Linq.xml
-    $(DisabledWarnings);9
-  
-  
-  
-    --generatehtml --htmloutputdir:..\..\..\src\WWW\microsoft.com\projects\fsharp\manual --htmlnamespacefile:namespaces.html --htmllocallinks --htmlnamespacefileappend
-  
-  
-  
-    
-    
-      System.Core
-      False
-      System.Core.dll
-    
-    
-      {DED3BBD7-53F4-428A-8C9F-27968E768605}
-      FSharp.Core
-    
-  
-  
-  
-    
-      assemblyinfo.FSharp.PowerPack.Linq.dll.fs
-    
-    
-    
-    
-    
-    
-    
-    
-  
-  
-  
-  
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/FuncConvertExtensions.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/FuncConvertExtensions.fs
deleted file mode 100644
index 4de7219f..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/FuncConvertExtensions.fs
+++ /dev/null
@@ -1,44 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-
-namespace Microsoft.FSharp
-    open System
-    open System.Linq
-
-    []
-    type FuncConvertExtensions = 
-
-        []
-        static member  ToFastFunc( f : Action<_,_>) = (fun a1 a2 -> f.Invoke(a1,a2))
-        []
-        static member  ToFastFunc( f : Func<_>) = (fun () -> f.Invoke())
-        []
-        static member  ToFastFunc( f : Func<_,_>) = (fun a1 -> f.Invoke(a1))
-        []
-        static member  ToFastFunc( f : Func<_,_,_>) = (fun a1 a2 -> f.Invoke(a1,a2))
-        []
-        static member  ToFastFunc( f : Action<_,_,_>) = (fun a1 a2 a3 -> f.Invoke(a1,a2,a3))
-        []
-        static member  ToFastFunc( f : Func<_,_,_,_>) = (fun a1 a2 a3 -> f.Invoke(a1,a2,a3))
-        []
-        static member  ToFastFunc( f : Action<_,_,_,_>) = (fun a1 a2 a3 a4 -> f.Invoke(a1,a2,a3,a4))
-        []
-        static member  ToFastFunc( f : Func<_,_,_,_,_>) = (fun a1 a2 a3 a4 -> f.Invoke(a1,a2,a3,a4))
-        []
-        static member  ToTupledFastFunc( f : Func<_>) = (fun () -> f.Invoke())
-        []
-        static member  ToTupledFastFunc( f : Func<_,_>) = (fun a1 -> f.Invoke(a1))
-        []
-        static member  ToTupledFastFunc( f : Action<_,_>) = (fun (a1,a2) -> f.Invoke(a1,a2))
-        []
-        static member  ToTupledFastFunc( f : Func<_,_,_>) = (fun (a1,a2) -> f.Invoke(a1,a2))
-        []
-        static member  ToTupledFastFunc( f : Action<_,_,_>) = (fun (a1,a2,a3) -> f.Invoke(a1,a2,a3))
-        []
-        static member  ToTupledFastFunc( f : Func<_,_,_,_>) = (fun (a1,a2,a3) -> f.Invoke(a1,a2,a3))
-        []
-        static member  ToTupledFastFunc( f : Action<_,_,_,_>) = (fun (a1,a2,a3,a4) -> f.Invoke(a1,a2,a3,a4))
-        []
-        static member  ToTupledFastFunc( f : Func<_,_,_,_,_>) = (fun (a1,a2,a3,a4) -> f.Invoke(a1,a2,a3,a4))
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/FuncConvertExtensions.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/FuncConvertExtensions.fsi
deleted file mode 100644
index c40dfd8d..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/FuncConvertExtensions.fsi
+++ /dev/null
@@ -1,56 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp
-    open System
-
-    []
-    type FuncConvertExtensions =
-
-        []
-        static member  ToFastFunc       : Func<'U>     -> (unit -> 'U)
-        
-        []
-        static member  ToFastFunc       : Func<'T1,'U>     -> ('T1 -> 'U)
-        
-        []
-        static member  ToFastFunc       : Action<'T1,'T2>           -> ('T1 -> 'T2 -> unit)
-        
-        []
-        static member  ToFastFunc       : Func<'T1,'T2,'U>     -> ('T1 -> 'T2 -> 'U)
-        
-        []
-        static member  ToFastFunc       : Action<'T1,'T2,'T3>       -> ('T1 -> 'T2 -> 'T3 -> unit)
-        
-        []
-        static member  ToFastFunc       : Func<'T1,'T2,'T3,'U> -> ('T1 -> 'T2 -> 'T3 -> 'U)
-
-        []
-        static member  ToFastFunc       : Action<'T1,'T2,'T3,'T4>       -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> unit)
-        
-        []
-        static member  ToFastFunc       : Func<'T1,'T2,'T3,'T4,'U> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U)
-
-        []
-        static member  ToTupledFastFunc : Func<'U>     -> (unit -> 'U)
-        
-        []
-        static member  ToTupledFastFunc : Func<'T1,'U>     -> ('T1 -> 'U)
-        
-        []
-        static member  ToTupledFastFunc : Action<'T1,'T2>           -> ('T1 * 'T2 -> unit)
-        
-        []
-        static member  ToTupledFastFunc : Func<'T1,'T2,'U>     -> ('T1 * 'T2 -> 'U)
-        
-        []
-        static member  ToTupledFastFunc : Action<'T1,'T2,'T3>       -> ('T1 * 'T2 * 'T3 -> unit)
-        
-        []
-        static member  ToTupledFastFunc : Func<'T1,'T2,'T3,'U> -> ('T1 * 'T2 * 'T3 -> 'U)
-
-        []
-        static member  ToTupledFastFunc : Action<'T1,'T2,'T3,'T4>       -> ('T1 * 'T2 * 'T3 * 'T4 -> unit)
-        
-        []
-        static member  ToTupledFastFunc : Func<'T1,'T2,'T3,'T4,'U> -> ('T1 * 'T2 * 'T3 * 'T4 -> 'U)
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/Linq.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/Linq.fs
deleted file mode 100644
index 10c3c963..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/Linq.fs
+++ /dev/null
@@ -1,796 +0,0 @@
-// Copyright (c) Microsoft Corporation 2005-2008.
-// This sample code is provided "as is" without warranty of any kind. 
-// We disclaim all warranties, either express or implied, including the 
-// warranties of merchantability and fitness for a particular purpose. 
-//
-
-
-namespace Microsoft.FSharp.Linq
-
-open System
-open System.Linq
-open System.Collections.Generic
-open System.Linq.Expressions
-open System.Reflection
-open System.Reflection.Emit
-open Microsoft.FSharp
-open Microsoft.FSharp.Quotations
-open Microsoft.FSharp.Quotations.Patterns
-open Microsoft.FSharp.Quotations.DerivedPatterns
-
-
-module QuotationEvaluation = 
-
-
-    let asExpr x = (x :> Expression)
-
-    let bindingFlags = BindingFlags.Public ||| BindingFlags.NonPublic
-    let instanceBindingFlags = BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.DeclaredOnly
-    let isNamedType(typ:Type) = not (typ.IsArray || typ.IsByRef || typ.IsPointer)
-    let equivHeadTypes (ty1:Type) (ty2:Type) = 
-        isNamedType(ty1) &&
-        if ty1.IsGenericType then 
-          ty2.IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(ty2.GetGenericTypeDefinition())
-        else 
-          ty1.Equals(ty2)
-
-    let isFunctionType typ = equivHeadTypes typ (typeof<(int -> int)>)
-    let getFunctionType typ = 
-        if not (isFunctionType typ) then invalidArg "typ" "cannot convert recursion except for function types"
-        let tyargs = typ.GetGenericArguments()
-        tyargs.[0], tyargs.[1]
-    
-    let WhileHelper gd b : 'T = 
-        let rec loop () = if gd() then (b(); loop())
-        loop();
-        unbox (box ())
-
-    let ArrayAssignHelper (arr : 'T[]) (idx:int) (elem:'T) : 'unt = 
-        arr.[idx] <- elem;
-        unbox (box ())
-
-
-    let TryFinallyHelper e h = 
-        try e() 
-        finally h()
-
-    let TryWithHelper e filter handler = 
-        try e() 
-        with e when filter e -> handler e
-
-    let WhileMethod = match <@@ WhileHelper @@> with Lambdas(_,Call(_,minfo,_)) -> minfo | _ -> failwith "couldn't find minfo"
-    let ArrayAssignMethod = match <@@ ArrayAssignHelper @@> with Lambdas(_,Call(_,minfo,_)) -> minfo | _ -> failwith "couldn't find minfo"
-    let TryFinallyMethod = match <@@ TryFinallyHelper @@> with Lambdas(_,Call(_,minfo,_)) -> minfo | _ -> failwith "couldn't find minfo"
-    let TryWithMethod = match <@@ TryWithHelper @@> with Lambdas(_,Call(_,minfo,_)) -> minfo | _ -> failwith "couldn't find minfo"
-
-    module HelperTypes = 
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18, 'T19> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 * 'T19 -> unit
-        type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18, 'T19, 'T20> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 * 'T19 * 'T20 -> unit
-
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'T6
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 -> 'T7 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 -> 'T8 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 -> 'T9 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 -> 'T10 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 -> 'T11 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 -> 'T12 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 -> 'T13 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 -> 'T14 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 -> 'T15 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 -> 'T16 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 -> 'T17 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 -> 'T18 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18, 'T19> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 -> 'T19 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18, 'T19, 'T20> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 * 'T19 -> 'T20 
-        type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18, 'T19, 'T20, 'T21> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 * 'T19 * 'T20 -> 'T21 
-
-    open HelperTypes
-    
-    let GetActionType (args:Type[])  = 
-        if args.Length <= 4 then 
-            Expression.GetActionType args
-        else
-            match args.Length with 
-            | 5 -> typedefof>.MakeGenericType args
-            | 6 -> typedefof>.MakeGenericType args
-            | 7 -> typedefof>.MakeGenericType args
-            | 8 -> typedefof>.MakeGenericType args
-            | 9 -> typedefof>.MakeGenericType args
-            | 10 -> typedefof>.MakeGenericType args
-            | 11 -> typedefof>.MakeGenericType args
-            | 12 -> typedefof>.MakeGenericType args
-            | 13 -> typedefof>.MakeGenericType args
-            | 14 -> typedefof>.MakeGenericType args
-            | 15 -> typedefof>.MakeGenericType args
-            | 16 -> typedefof>.MakeGenericType args
-            | 17 -> typedefof>.MakeGenericType args
-            | 18 -> typedefof>.MakeGenericType args
-            | 19 -> typedefof>.MakeGenericType args
-            | 20 -> typedefof>.MakeGenericType args
-            | _ -> raise <| new NotSupportedException("Quotation expressions with statements or closures containing more then 20 free variables may not be translated in this release of the F# PowerPack. This is due to limitations in the variable binding expression forms available in LINQ expression trees")
-
-    let GetFuncType (args:Type[])  = 
-        if args.Length <= 5 then 
-            Expression.GetFuncType args
-        else
-            match args.Length with 
-            | 6 -> typedefof>.MakeGenericType args
-            | 7 -> typedefof>.MakeGenericType args
-            | 8 -> typedefof>.MakeGenericType args
-            | 9 -> typedefof>.MakeGenericType args
-            | 10 -> typedefof>.MakeGenericType args
-            | 11 -> typedefof>.MakeGenericType args
-            | 12 -> typedefof>.MakeGenericType args
-            | 13 -> typedefof>.MakeGenericType args
-            | 14 -> typedefof>.MakeGenericType args
-            | 15 -> typedefof>.MakeGenericType args
-            | 16 -> typedefof>.MakeGenericType args
-            | 17 -> typedefof>.MakeGenericType args
-            | 18 -> typedefof>.MakeGenericType args
-            | 19 -> typedefof>.MakeGenericType args
-            | 20 -> typedefof>.MakeGenericType args
-            | 21 -> typedefof>.MakeGenericType args
-            | _ -> raise <| new NotSupportedException("Quotation expressions with statements or closures containing more then 20 free variables may not be translated in this release of the F# PowerPack. This is due to limitations in the variable binding expression forms available in LINQ expression trees")
-            
-
-    let LetRec1Helper (F1:System.Func<_,_,_>) (B:System.Func<_,_>) = 
-        let fhole = ref (Unchecked.defaultof<_>)
-        let f = new System.Func<_,_>(fun x -> F1.Invoke(fhole.Value,x))
-        fhole := f
-        B.Invoke f
-
-    let LetRec2Helper (F1:System.Func<_,_,_,_>) (F2:System.Func<_,_,_,_>) (B:System.Func<_,_,_>) = 
-        let f1hole = ref (Unchecked.defaultof<_>)
-        let f2hole = ref (Unchecked.defaultof<_>)
-        let f1 = new System.Func<_,_>(fun x -> F1.Invoke(f1hole.Value,f2hole.Value,x))
-        let f2 = new System.Func<_,_>(fun x -> F2.Invoke(f1hole.Value,f2hole.Value,x))
-        f1hole := f1
-        f2hole := f2
-        B.Invoke(f1,f2)
-
-    let LetRec3Helper (F1:System.Func<_,_,_,_,_>) (F2:System.Func<_,_,_,_,_>) (F3:System.Func<_,_,_,_,_>) (B:System.Func<_,_,_,_>) = 
-        let f1hole = ref (Unchecked.defaultof<_>)
-        let f2hole = ref (Unchecked.defaultof<_>)
-        let f3hole = ref (Unchecked.defaultof<_>)
-        let f1 = new System.Func<_,_>(fun x -> F1.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,x))
-        let f2 = new System.Func<_,_>(fun x -> F2.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,x))
-        let f3 = new System.Func<_,_>(fun x -> F3.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,x))
-        f1hole := f1
-        f2hole := f2
-        f3hole := f3
-        B.Invoke(f1,f2,f3)
-
-    let LetRec4Helper 
-           (F1:FuncHelper<_,_,_,_,_,_>) 
-           (F2:FuncHelper<_,_,_,_,_,_>) 
-           (F3:FuncHelper<_,_,_,_,_,_>) 
-           (F4:FuncHelper<_,_,_,_,_,_>) 
-           (B:System.Func<_,_,_,_,_>) = 
-        let f1hole = ref (Unchecked.defaultof<_>)
-        let f2hole = ref (Unchecked.defaultof<_>)
-        let f3hole = ref (Unchecked.defaultof<_>)
-        let f4hole = ref (Unchecked.defaultof<_>)
-        let f1 = new System.Func<_,_>(fun x -> F1.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,x))
-        let f2 = new System.Func<_,_>(fun x -> F2.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,x))
-        let f3 = new System.Func<_,_>(fun x -> F3.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,x))
-        let f4 = new System.Func<_,_>(fun x -> F4.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,x))
-        f1hole := f1
-        f2hole := f2
-        f3hole := f3
-        f4hole := f4
-        B.Invoke(f1,f2,f3,f4)
-
-
-    let LetRec5Helper 
-           (F1:FuncHelper<_,_,_,_,_,_,_>) 
-           (F2:FuncHelper<_,_,_,_,_,_,_>) 
-           (F3:FuncHelper<_,_,_,_,_,_,_>) 
-           (F4:FuncHelper<_,_,_,_,_,_,_>) 
-           (F5:FuncHelper<_,_,_,_,_,_,_>) 
-           (B:FuncHelper<_,_,_,_,_,_>) = 
-        let f1hole = ref (Unchecked.defaultof<_>)
-        let f2hole = ref (Unchecked.defaultof<_>)
-        let f3hole = ref (Unchecked.defaultof<_>)
-        let f4hole = ref (Unchecked.defaultof<_>)
-        let f5hole = ref (Unchecked.defaultof<_>)
-        let f1 = new System.Func<_,_>(fun x -> F1.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,x))
-        let f2 = new System.Func<_,_>(fun x -> F2.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,x))
-        let f3 = new System.Func<_,_>(fun x -> F3.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,x))
-        let f4 = new System.Func<_,_>(fun x -> F4.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,x))
-        let f5 = new System.Func<_,_>(fun x -> F5.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,x))
-        f1hole := f1
-        f2hole := f2
-        f3hole := f3
-        f4hole := f4
-        f5hole := f5
-        B.Invoke(f1,f2,f3,f4,f5)
-
-    let LetRec6Helper 
-           (F1:FuncHelper<_,_,_,_,_,_,_,_>) 
-           (F2:FuncHelper<_,_,_,_,_,_,_,_>) 
-           (F3:FuncHelper<_,_,_,_,_,_,_,_>) 
-           (F4:FuncHelper<_,_,_,_,_,_,_,_>) 
-           (F5:FuncHelper<_,_,_,_,_,_,_,_>) 
-           (F6:FuncHelper<_,_,_,_,_,_,_,_>) 
-           (B:FuncHelper<_,_,_,_,_,_,_>) = 
-        let f1hole = ref (Unchecked.defaultof<_>)
-        let f2hole = ref (Unchecked.defaultof<_>)
-        let f3hole = ref (Unchecked.defaultof<_>)
-        let f4hole = ref (Unchecked.defaultof<_>)
-        let f5hole = ref (Unchecked.defaultof<_>)
-        let f6hole = ref (Unchecked.defaultof<_>)
-        let f1 = new System.Func<_,_>(fun x -> F1.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,x))
-        let f2 = new System.Func<_,_>(fun x -> F2.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,x))
-        let f3 = new System.Func<_,_>(fun x -> F3.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,x))
-        let f4 = new System.Func<_,_>(fun x -> F4.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,x))
-        let f5 = new System.Func<_,_>(fun x -> F5.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,x))
-        let f6 = new System.Func<_,_>(fun x -> F6.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,x))
-        f1hole := f1
-        f2hole := f2
-        f3hole := f3
-        f4hole := f4
-        f5hole := f5
-        f6hole := f6
-        B.Invoke(f1,f2,f3,f4,f5,f6)
-
-
-    let LetRec7Helper 
-           (F1:FuncHelper<_,_,_,_,_,_,_,_,_>) 
-           (F2:FuncHelper<_,_,_,_,_,_,_,_,_>) 
-           (F3:FuncHelper<_,_,_,_,_,_,_,_,_>) 
-           (F4:FuncHelper<_,_,_,_,_,_,_,_,_>) 
-           (F5:FuncHelper<_,_,_,_,_,_,_,_,_>) 
-           (F6:FuncHelper<_,_,_,_,_,_,_,_,_>) 
-           (F7:FuncHelper<_,_,_,_,_,_,_,_,_>) 
-           (B:FuncHelper<_,_,_,_,_,_,_,_>) = 
-        let f1hole = ref (Unchecked.defaultof<_>)
-        let f2hole = ref (Unchecked.defaultof<_>)
-        let f3hole = ref (Unchecked.defaultof<_>)
-        let f4hole = ref (Unchecked.defaultof<_>)
-        let f5hole = ref (Unchecked.defaultof<_>)
-        let f6hole = ref (Unchecked.defaultof<_>)
-        let f7hole = ref (Unchecked.defaultof<_>)
-        let f1 = new System.Func<_,_>(fun x -> F1.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,x))
-        let f2 = new System.Func<_,_>(fun x -> F2.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,x))
-        let f3 = new System.Func<_,_>(fun x -> F3.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,x))
-        let f4 = new System.Func<_,_>(fun x -> F4.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,x))
-        let f5 = new System.Func<_,_>(fun x -> F5.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,x))
-        let f6 = new System.Func<_,_>(fun x -> F6.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,x))
-        let f7 = new System.Func<_,_>(fun x -> F7.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,x))
-        f1hole := f1
-        f2hole := f2
-        f3hole := f3
-        f4hole := f4
-        f5hole := f5
-        f6hole := f6
-        f7hole := f7
-        B.Invoke(f1,f2,f3,f4,f5,f6,f7)
-
-
-    let LetRec8Helper 
-           (F1:FuncHelper<_,_,_,_,_,_,_,_,_,_>) 
-           (F2:FuncHelper<_,_,_,_,_,_,_,_,_,_>) 
-           (F3:FuncHelper<_,_,_,_,_,_,_,_,_,_>) 
-           (F4:FuncHelper<_,_,_,_,_,_,_,_,_,_>) 
-           (F5:FuncHelper<_,_,_,_,_,_,_,_,_,_>) 
-           (F6:FuncHelper<_,_,_,_,_,_,_,_,_,_>) 
-           (F7:FuncHelper<_,_,_,_,_,_,_,_,_,_>) 
-           (F8:FuncHelper<_,_,_,_,_,_,_,_,_,_>) 
-           (B:FuncHelper<_,_,_,_,_,_,_,_,_>) = 
-        let f1hole = ref (Unchecked.defaultof<_>)
-        let f2hole = ref (Unchecked.defaultof<_>)
-        let f3hole = ref (Unchecked.defaultof<_>)
-        let f4hole = ref (Unchecked.defaultof<_>)
-        let f5hole = ref (Unchecked.defaultof<_>)
-        let f6hole = ref (Unchecked.defaultof<_>)
-        let f7hole = ref (Unchecked.defaultof<_>)
-        let f8hole = ref (Unchecked.defaultof<_>)
-        let f1 = new System.Func<_,_>(fun x -> F1.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,f8hole.Value,x))
-        let f2 = new System.Func<_,_>(fun x -> F2.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,f8hole.Value,x))
-        let f3 = new System.Func<_,_>(fun x -> F3.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,f8hole.Value,x))
-        let f4 = new System.Func<_,_>(fun x -> F4.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,f8hole.Value,x))
-        let f5 = new System.Func<_,_>(fun x -> F5.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,f8hole.Value,x))
-        let f6 = new System.Func<_,_>(fun x -> F6.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,f8hole.Value,x))
-        let f7 = new System.Func<_,_>(fun x -> F7.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,f8hole.Value,x))
-        let f8 = new System.Func<_,_>(fun x -> F8.Invoke(f1hole.Value,f2hole.Value,f3hole.Value,f4hole.Value,f5hole.Value,f6hole.Value,f7hole.Value,f8hole.Value,x))
-        f1hole := f1
-        f2hole := f2
-        f3hole := f3
-        f4hole := f4
-        f5hole := f5
-        f6hole := f6
-        f7hole := f7
-        f8hole := f8
-        B.Invoke(f1,f2,f3,f4,f5,f6,f7,f8)
-
-
-    let IsVoidType (ty:System.Type)  = (ty = typeof)
-
-    let SequentialHelper (x:'T) (y:'U) = y
- 
-    let LinqExpressionHelper (x:'T) : Expression<'T> = failwith ""
-    
-    let MakeFakeExpression (x:Expr) = 
-        let minfo = match <@@ LinqExpressionHelper @@> with Lambda(_,Call(_,minfo,_)) -> minfo | _ -> failwith "couldn't find method info"
-        Expr.Call(minfo.GetGenericMethodDefinition().MakeGenericMethod [| x.Type |], [ x ])
-
-    let showAll = BindingFlags.Public ||| BindingFlags.NonPublic 
-
-    let WrapVoid b objOpt args (env: Map) (e:Expression) = 
-        if b then 
-            let frees (e:Expr) = e.GetFreeVars()
-            let addFrees e acc = List.foldBack Set.add (frees e |> Seq.to_list) acc
-            let fvs = Option.foldBack addFrees objOpt (List.foldBack addFrees args Set.empty) |> Set.to_array
-            let fvsP = fvs |> Array.map (fun v -> (Map.find v env :?> ParameterExpression))
-            let fvtys = fvs |> Array.map (fun v -> v.Type) 
-
-            let dty = GetActionType fvtys 
-            let e = Expression.Lambda(dty,e,fvsP)
-            let d = e.Compile()
-
-            let argtys = (Array.append fvtys [| dty |])
-            let delP = Expression.Parameter(dty, "del")
-
-            let m = new System.Reflection.Emit.DynamicMethod("wrapper",typeof,argtys)
-            let ilg = m.GetILGenerator()
-            
-            ilg.Emit(OpCodes.Ldarg ,fvs.Length)
-            fvs |> Array.iteri (fun i _ -> ilg.Emit(OpCodes.Ldarg ,int16 i))
-            ilg.EmitCall(OpCodes.Callvirt,dty.GetMethod("Invoke",instanceBindingFlags),null)
-            ilg.Emit(OpCodes.Ldnull)
-            ilg.Emit(OpCodes.Ret)
-            let args = Array.append (fvsP |> Array.map asExpr) [| (Expression.Constant(d) |> asExpr) |]
-            Expression.Call((null:Expression),(m:>MethodInfo),args) |> asExpr
-        else
-            e
-
-    let (|GenericEqualityQ|_|) = (|SpecificCall|_|) <@ LanguagePrimitives.GenericEquality @>
-    let (|EqualsQ|_|)    = (|SpecificCall|_|) <@ ( = ) @>
-    let (|GreaterQ|_|)   = (|SpecificCall|_|) <@ ( > ) @>
-    let (|GreaterEqQ|_|) = (|SpecificCall|_|) <@ ( >=) @>
-    let (|LessQ|_|)      = (|SpecificCall|_|) <@ ( <)  @>
-    let (|LessEqQ|_|) = (|SpecificCall|_|) <@ ( <=) @>
-    let (|NotEqQ|_|) = (|SpecificCall|_|) <@ ( <>) @>
-    let (|NotQ|_|) =  (|SpecificCall|_|) <@ not   @>
-    let (|NegQ|_|) = (|SpecificCall|_|) <@ ( ~-) : int -> int @>
-    let (|PlusQ|_|)      = (|SpecificCall|_|) <@ ( + ) @>
-    let (|DivideQ|_|) = (|SpecificCall|_|) <@ ( / ) @> 
-    let (|MinusQ|_|) = (|SpecificCall|_|) <@ ( - ) @>
-    let (|MultiplyQ|_|) = (|SpecificCall|_|) <@ ( * ) @>
-    let (|ModuloQ|_|) = (|SpecificCall|_|) <@ ( % ) @>
-    let (|ShiftLeftQ|_|) = (|SpecificCall|_|) <@ ( <<< ) @>
-    let (|ShiftRightQ|_|) = (|SpecificCall|_|) <@ ( >>> ) @>
-    let (|BitwiseAndQ|_|) = (|SpecificCall|_|) <@ ( &&& ) @>
-    let (|BitwiseOrQ|_|) = (|SpecificCall|_|) <@ ( ||| ) @>
-    let (|BitwiseXorQ|_|) = (|SpecificCall|_|) <@ ( ^^^ ) @>
-    let (|BitwiseNotQ|_|) = (|SpecificCall|_|) <@ ( ~~~ ) @>
-    let (|CheckedNeg|_|) = (|SpecificCall|_|) <@ Checked.( ~-) : int -> int @>
-    let (|CheckedPlusQ|_|)      = (|SpecificCall|_|) <@ Checked.( + ) @>
-    let (|CheckedMinusQ|_|) = (|SpecificCall|_|) <@ Checked.( - ) @>
-    let (|CheckedMultiplyQ|_|) = (|SpecificCall|_|) <@ Checked.( * ) @>
-    let (|ConvCharQ|_|) = (|SpecificCall|_|) <@ char @>
-    let (|ConvDecimalQ|_|) = (|SpecificCall|_|) <@ decimal @>
-    let (|ConvFloatQ|_|) = (|SpecificCall|_|) <@ float @>
-    let (|ConvFloat32Q|_|) = (|SpecificCall|_|) <@ float32 @>
-    let (|ConvSByteQ|_|) = (|SpecificCall|_|) <@ sbyte @>
-    let (|ConvInt16Q|_|) = (|SpecificCall|_|) <@ int16 @>
-    let (|ConvInt32Q|_|) = (|SpecificCall|_|) <@ int32 @>
-    let (|ConvInt64Q|_|) = (|SpecificCall|_|) <@ int64 @>
-    let (|ConvByteQ|_|) = (|SpecificCall|_|) <@ byte @>
-    let (|ConvUInt16Q|_|) = (|SpecificCall|_|) <@ uint16 @>
-    let (|ConvUInt32Q|_|) = (|SpecificCall|_|) <@ uint32 @>
-    let (|ConvUInt64Q|_|) = (|SpecificCall|_|) <@ uint64 @>
-
-    let (|CheckedConvCharQ|_|) = (|SpecificCall|_|) <@ Checked.char @>
-    let (|CheckedConvSByteQ|_|) = (|SpecificCall|_|) <@ Checked.sbyte @>
-    let (|CheckedConvInt16Q|_|) = (|SpecificCall|_|) <@ Checked.int16 @>
-    let (|CheckedConvInt32Q|_|) = (|SpecificCall|_|) <@ Checked.int32 @>
-    let (|CheckedConvInt64Q|_|) = (|SpecificCall|_|) <@ Checked.int64 @>
-    let (|CheckedConvByteQ|_|) = (|SpecificCall|_|) <@ Checked.byte @>
-    let (|CheckedConvUInt16Q|_|) = (|SpecificCall|_|) <@ Checked.uint16 @>
-    let (|CheckedConvUInt32Q|_|) = (|SpecificCall|_|) <@ Checked.uint32 @>
-    let (|CheckedConvUInt64Q|_|) = (|SpecificCall|_|) <@ Checked.uint64 @>
-    let (|LinqExpressionHelperQ|_|) = (|SpecificCall|_|) <@ LinqExpressionHelper @>
-    let (|ArrayLookupQ|_|) = (|SpecificCall|_|) <@ LanguagePrimitives.IntrinsicFunctions.GetArray : int[] -> int -> int @>
-    let (|ArrayAssignQ|_|) = (|SpecificCall|_|) <@ LanguagePrimitives.IntrinsicFunctions.SetArray : int[] -> int * int -> unit @>
-    let (|ArrayTypeQ|_|) (ty:System.Type) = if ty.IsArray && ty.GetArrayRank() = 1 then Some(ty.GetElementType()) else None
-    
-    /// Convert F# quotations to LINQ expression trees.
-    /// A more polished LINQ-Quotation translator will be published
-    /// concert with later versions of LINQ.
-    let rec ConvExpr env (inp:Expr) = 
-       //printf "ConvExpr : %A\n" e;
-        match inp with 
-
-        // Generic cases 
-        | Patterns.Var(v) -> Map.find v env
-        | DerivedPatterns.AndAlso(x1,x2)             -> Expression.AndAlso(ConvExpr env x1, ConvExpr env x2) |> asExpr
-        | DerivedPatterns.OrElse(x1,x2)              -> Expression.OrElse(ConvExpr env x1, ConvExpr env x2)  |> asExpr
-        | Patterns.Value(x,ty)                -> Expression.Constant(x,ty)              |> asExpr
-
-        // REVIEW: exact F# semantics for TypeAs and TypeIs
-        | Patterns.Coerce(x,toTy)             -> Expression.TypeAs(ConvExpr env x,toTy)     |> asExpr
-        | Patterns.TypeTest(x,toTy)           -> Expression.TypeIs(ConvExpr env x,toTy)     |> asExpr
-        
-        // Expr.*Get
-        | Patterns.FieldGet(objOpt,fieldInfo) -> 
-            Expression.Field(ConvObjArg env objOpt, fieldInfo) |> asExpr
-
-        | Patterns.TupleGet(arg,n) -> 
-             let argP = ConvExpr env arg 
-             let rec build ty argP n = 
-                 match Reflection.FSharpValue.PreComputeTuplePropertyInfo(ty,n) with 
-                 | propInfo,None -> 
-                     Expression.Property(argP, propInfo)  |> asExpr
-                 | propInfo,Some(nestedTy,n2) -> 
-                     build nestedTy (Expression.Property(argP,propInfo) |> asExpr) n2
-             build arg.Type argP n
-              
-        | Patterns.PropGet(objOpt,propInfo,args) -> 
-            match args with 
-            | [] -> 
-                Expression.Property(ConvObjArg env objOpt, propInfo) |> asExpr
-            | _ -> 
-                let argsP = ConvExprs env args
-                Expression.Call(ConvObjArg env objOpt, propInfo.GetGetMethod(true),argsP) |> asExpr
-
-        // Expr.*Set
-        | Patterns.PropSet(objOpt,propInfo,args,v) -> 
-            let args = (args @ [v])
-            let argsP = ConvExprs env args 
-            let minfo = propInfo.GetSetMethod(true)
-            Expression.Call(ConvObjArg env objOpt, minfo,argsP) |> asExpr |> WrapVoid (IsVoidType minfo.ReturnType) objOpt args env 
-
-        // Expr.(Call,Application)
-        | Patterns.Call(objOpt,minfo,args) -> 
-            match inp with 
-            // Special cases for this translation
-            |  PlusQ ([ty1;ty2;ty3],[x1;x2]) when (ty1 = typeof) && (ty2 = typeof) ->
-                 ConvExpr env (<@@  System.String.Concat( [| %%x1 ; %%x2 |] : string array ) @@>)
-
-            //| SpecificCall <@ LanguagePrimitives.GenericEquality @>([ty1],[x1;x2]) 
-            //| SpecificCall <@ ( = ) @>([ty1],[x1;x2]) when (ty1 = typeof) ->
-            //     ConvExpr env (<@@  System.String.op_Equality(%%x1,%%x2) @@>)
-
-            | GenericEqualityQ (_,[x1;x2]) 
-            | EqualsQ (_,[x1;x2]) -> Expression.Equal(ConvExpr env x1, ConvExpr env x2)       |> asExpr
-
-            | GreaterQ (_,[x1;x2]) -> Expression.GreaterThan(ConvExpr env x1, ConvExpr env x2)       |> asExpr
-            | GreaterEqQ (_,[x1;x2]) -> Expression.GreaterThanOrEqual(ConvExpr env x1, ConvExpr env x2)       |> asExpr
-            | LessQ (_,[x1;x2]) -> Expression.LessThan(ConvExpr env x1, ConvExpr env x2)       |> asExpr
-            | LessEqQ (_,[x1;x2]) -> Expression.LessThanOrEqual(ConvExpr env x1, ConvExpr env x2)       |> asExpr
-            | NotEqQ (_,[x1;x2]) -> Expression.NotEqual(ConvExpr env x1, ConvExpr env x2)       |> asExpr
-            | NotQ (_,[x1])    -> Expression.Not(ConvExpr env x1)                                   |> asExpr
-                 /// REVIEW: basic comparison with method witnesses
-
-            | NegQ (_,[x1])    -> Expression.Negate(ConvExpr env x1)                                |> asExpr
-            | PlusQ (_,[x1;x2]) -> Expression.Add(ConvExpr env x1, ConvExpr env x2)      |> asExpr
-            | DivideQ (_,[x1;x2]) -> Expression.Divide (ConvExpr env x1, ConvExpr env x2)  |> asExpr
-            | MinusQ (_,[x1;x2]) -> Expression.Subtract(ConvExpr env x1, ConvExpr env x2) |> asExpr
-            | MultiplyQ (_,[x1;x2]) -> Expression.Multiply(ConvExpr env x1, ConvExpr env x2) |> asExpr
-            | ModuloQ (_,[x1;x2]) -> Expression.Modulo (ConvExpr env x1, ConvExpr env x2) |> asExpr
-                 /// REVIEW: basic arithmetic with method witnesses
-                 /// REVIEW: negate,add, divide, multiply, subtract with method witness
-
-            | ShiftLeftQ (_,[x1;x2]) -> Expression.LeftShift(ConvExpr env x1, ConvExpr env x2) |> asExpr
-            | ShiftRightQ (_,[x1;x2]) -> Expression.RightShift(ConvExpr env x1, ConvExpr env x2) |> asExpr
-            | BitwiseAndQ (_,[x1;x2]) -> Expression.And(ConvExpr env x1, ConvExpr env x2) |> asExpr
-            | BitwiseOrQ (_,[x1;x2]) -> Expression.Or(ConvExpr env x1, ConvExpr env x2) |> asExpr
-            | BitwiseXorQ (_,[x1;x2]) -> Expression.ExclusiveOr(ConvExpr env x1, ConvExpr env x2) |> asExpr
-            | BitwiseNotQ (_,[x1]) -> Expression.Not(ConvExpr env x1) |> asExpr
-                 /// REVIEW: bitwise operations with method witnesses
-
-            | CheckedNeg (_,[x1]) -> Expression.NegateChecked(ConvExpr env x1)                                |> asExpr
-            | CheckedPlusQ (_,[x1;x2]) -> Expression.AddChecked(ConvExpr env x1, ConvExpr env x2)      |> asExpr
-            | CheckedMinusQ (_,[x1;x2]) -> Expression.SubtractChecked(ConvExpr env x1, ConvExpr env x2) |> asExpr
-            | CheckedMultiplyQ (_,[x1;x2]) -> Expression.MultiplyChecked(ConvExpr env x1, ConvExpr env x2) |> asExpr
-
-            | ConvCharQ ([ty],[x1])  -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvDecimalQ ([ty],[x1])  -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvFloatQ ([ty],[x1])  -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvFloat32Q ([ty],[x1])  -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvSByteQ ([ty],[x1])  -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvInt16Q ([ty],[x1])  -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvInt32Q ([ty],[x1])  -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvInt64Q ([ty],[x1])  -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvByteQ ([ty],[x1])   -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvUInt16Q ([ty],[x1]) -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvUInt32Q ([ty],[x1]) -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-            | ConvUInt64Q ([ty],[x1]) -> Expression.Convert(ConvExpr env x1, typeof) |> asExpr
-             /// REVIEW: convert with method witness
-
-            | CheckedConvCharQ ([ty],[x1])  -> Expression.ConvertChecked(ConvExpr env x1, typeof) |> asExpr
-            | CheckedConvSByteQ ([ty],[x1])  -> Expression.ConvertChecked(ConvExpr env x1, typeof) |> asExpr
-            | CheckedConvInt16Q ([ty],[x1])  -> Expression.ConvertChecked(ConvExpr env x1, typeof) |> asExpr
-            | CheckedConvInt32Q ([ty],[x1])  -> Expression.ConvertChecked(ConvExpr env x1, typeof) |> asExpr
-            | CheckedConvInt64Q ([ty],[x1])  -> Expression.ConvertChecked(ConvExpr env x1, typeof) |> asExpr
-            | CheckedConvByteQ ([ty],[x1])   -> Expression.ConvertChecked(ConvExpr env x1, typeof) |> asExpr
-            | CheckedConvUInt16Q ([ty],[x1]) -> Expression.ConvertChecked(ConvExpr env x1, typeof) |> asExpr
-            | CheckedConvUInt32Q ([ty],[x1]) -> Expression.ConvertChecked(ConvExpr env x1, typeof) |> asExpr
-            | CheckedConvUInt64Q ([ty],[x1]) -> Expression.ConvertChecked(ConvExpr env x1, typeof) |> asExpr
-            | ArrayLookupQ ([ArrayTypeQ(elemTy);_;_],[x1;x2]) -> 
-                Expression.ArrayIndex(ConvExpr env x1, ConvExpr env x2) |> asExpr
-
-            | ArrayAssignQ ([ArrayTypeQ(elemTy);_;_],[arr;idx;elem]) -> 
-                let minfo = ArrayAssignMethod.GetGenericMethodDefinition().MakeGenericMethod [| elemTy;typeof |]
-                Expression.Call(minfo,[| ConvExpr env arr; ConvExpr env idx; ConvExpr env elem |]) |> asExpr
-            
-            // Throw away markers inserted to satisfy C#'s design where they pass an argument
-            // or type T to an argument expecting Expr.
-            | LinqExpressionHelperQ ([_],[x1]) -> ConvExpr env x1
-             
-              /// ArrayLength
-              /// ListBind
-              /// ListInit
-              /// ElementInit
-            | _ -> 
-                let argsP = ConvExprs env args 
-                Expression.Call(ConvObjArg env objOpt, minfo, argsP) |> asExpr |> WrapVoid (IsVoidType minfo.ReturnType) objOpt args env 
-
-        // f x1 x2 x3 x4 --> InvokeFast4
-        | Patterns.Application(Patterns.Application(Patterns.Application(Patterns.Application(f,arg1),arg2),arg3),arg4) -> 
-            let domainTy1, rangeTy = getFunctionType f.Type
-            let domainTy2, rangeTy = getFunctionType rangeTy
-            let domainTy3, rangeTy = getFunctionType rangeTy
-            let domainTy4, rangeTy = getFunctionType rangeTy
-            let (-->) ty1 ty2 = Reflection.FSharpType.MakeFunctionType(ty1,ty2)
-            let ty = domainTy1 --> domainTy2 
-            let meth = (ty.GetMethods() |> Array.find (fun minfo -> minfo.Name = "InvokeFast" && minfo.GetParameters().Length = 5)).MakeGenericMethod [| domainTy3; domainTy4; rangeTy |]
-            let argsP = ConvExprs env [f; arg1;arg2;arg3; arg4]
-            Expression.Call((null:Expression), meth, argsP) |> asExpr
-
-        // f x1 x2 x3 --> InvokeFast3
-        | Patterns.Application(Patterns.Application(Patterns.Application(f,arg1),arg2),arg3) -> 
-            let domainTy1, rangeTy = getFunctionType f.Type
-            let domainTy2, rangeTy = getFunctionType rangeTy
-            let domainTy3, rangeTy = getFunctionType rangeTy
-            let (-->) ty1 ty2 = Reflection.FSharpType.MakeFunctionType(ty1,ty2)
-            let ty = domainTy1 --> domainTy2 
-            let meth = (ty.GetMethods() |> Array.find (fun minfo -> minfo.Name = "InvokeFast" && minfo.GetParameters().Length = 4)).MakeGenericMethod [| domainTy3; rangeTy |]
-            let argsP = ConvExprs env [f; arg1;arg2;arg3]
-            Expression.Call((null:Expression), meth, argsP) |> asExpr
-
-        // f x1 x2 --> InvokeFast2
-        | Patterns.Application(Patterns.Application(f,arg1),arg2) -> 
-            let domainTy1, rangeTy = getFunctionType f.Type
-            let domainTy2, rangeTy = getFunctionType rangeTy
-            let (-->) ty1 ty2 = Reflection.FSharpType.MakeFunctionType(ty1,ty2)
-            let ty = domainTy1 --> domainTy2 
-            let meth = (ty.GetMethods() |> Array.find (fun minfo -> minfo.Name = "InvokeFast" && minfo.GetParameters().Length = 3)).MakeGenericMethod [| rangeTy |]
-            let argsP = ConvExprs env [f; arg1;arg2]
-            Expression.Call((null:Expression), meth, argsP) |> asExpr
-
-        // f x1 --> Invoke
-        | Patterns.Application(f,arg) -> 
-            let fP = ConvExpr env f
-            let argP = ConvExpr env arg
-            let meth = f.Type.GetMethod("Invoke")
-            Expression.Call(fP, meth, [| argP |]) |> asExpr
-
-        // Expr.New*
-        | Patterns.NewRecord(recdTy,args) -> 
-            let ctorInfo = Reflection.FSharpValue.PreComputeRecordConstructorInfo(recdTy,showAll) 
-            Expression.New(ctorInfo,ConvExprs env args) |> asExpr
-
-        | Patterns.NewArray(ty,args) -> 
-            Expression.NewArrayInit(ty,ConvExprs env args) |> asExpr
-
-        | Patterns.DefaultValue(ty) -> 
-            Expression.New(ty) |> asExpr
-
-        | Patterns.NewUnionCase(unionCaseInfo,args) -> 
-            let methInfo = Reflection.FSharpValue.PreComputeUnionConstructorInfo(unionCaseInfo,showAll)
-            let argsR = ConvExprs env args 
-            Expression.Call((null:Expression),methInfo,argsR) |> asExpr
-
-        | Patterns.UnionCaseTest(e,unionCaseInfo) -> 
-            let methInfo = Reflection.FSharpValue.PreComputeUnionTagMemberInfo(unionCaseInfo.DeclaringType,showAll)
-            let obj = ConvExpr env e 
-            let tagE = 
-                match methInfo with 
-                | :? PropertyInfo as p -> 
-                    Expression.Property(obj,p) |> asExpr
-                | :? MethodInfo as m -> 
-                    Expression.Call((null:Expression),m,[| obj |]) |> asExpr
-                | _ -> failwith "unreachable case"
-            Expression.Equal(tagE, Expression.Constant(unionCaseInfo.Tag)) |> asExpr
-
-        | Patterns.NewObject(ctorInfo,args) -> 
-            Expression.New(ctorInfo,ConvExprs env args) |> asExpr
-
-        | Patterns.NewDelegate(dty,vs,b) -> 
-            let vsP = List.map ConvVar vs 
-            let env = List.foldBack2 (fun (v:Var) vP -> Map.add v (vP |> asExpr)) vs vsP env 
-            let bodyP = ConvExpr env b 
-            Expression.Lambda(dty, bodyP, vsP) |> asExpr 
-
-        | Patterns.NewTuple(args) -> 
-             let tupTy = args |> List.map (fun arg -> arg.Type) |> Array.of_list |> Reflection.FSharpType.MakeTupleType
-             let argsP = ConvExprs env args 
-             let rec build ty (argsP: Expression[]) = 
-                 match Reflection.FSharpValue.PreComputeTupleConstructorInfo(ty) with 
-                 | ctorInfo,None -> Expression.New(ctorInfo,argsP) |> asExpr 
-                 | ctorInfo,Some(nestedTy) -> 
-                     let n = ctorInfo.GetParameters().Length - 1
-                     Expression.New(ctorInfo, Array.append argsP.[0..n-1] [| build nestedTy argsP.[n..] |]) |> asExpr
-             build tupTy argsP
-
-        | Patterns.IfThenElse(g,t,e) -> 
-            Expression.Condition(ConvExpr env g, ConvExpr env t,ConvExpr env e) |> asExpr
-
-        | Patterns.Sequential (e1,e2) -> 
-            let e1P = ConvExpr env e1
-            let e2P = ConvExpr env e2
-            let minfo = match <@@ SequentialHelper @@> with Lambdas(_,Call(_,minfo,_)) -> minfo | _ -> failwith "couldn't find minfo"
-            let minfo = minfo.GetGenericMethodDefinition().MakeGenericMethod [| e1.Type; e2.Type |]
-            Expression.Call(minfo,[| e1P; e2P |]) |> asExpr
-
-        | Patterns.Let (v,e,b) -> 
-            let vP = ConvVar v
-            let envinner = Map.add v (vP |> asExpr) env 
-            let bodyP = ConvExpr envinner b 
-            let eP = ConvExpr env e
-            let ty = GetFuncType [| v.Type; b.Type |] 
-            let lam = Expression.Lambda(ty,bodyP,[| vP |]) |> asExpr
-            Expression.Call(lam,ty.GetMethod("Invoke",instanceBindingFlags),[| eP |]) |> asExpr
-
-        | Patterns.Lambda(v,body) -> 
-            let vP = ConvVar v
-            let env = Map.add v (vP |> asExpr) env 
-            let tyargs = [| v.Type; body.Type |]
-            let bodyP = ConvExpr env body
-            let convType = typedefof>.MakeGenericType tyargs
-            let convDelegate = Expression.Lambda(convType, bodyP, [| vP |]) |> asExpr
-            Expression.Call(typeof,"ToFastFunc",tyargs,[| convDelegate |]) |> asExpr
-    
-        | Patterns.WhileLoop(gd,b) -> 
-            let gdP = ConvExpr env <@@ (fun () -> (%%gd:bool)) @@>
-            let bP = ConvExpr env <@@ (fun () -> (%%b:unit)) @@>
-            let minfo = WhileMethod.GetGenericMethodDefinition().MakeGenericMethod [| typeof |]
-            Expression.Call(minfo,[| gdP; bP |]) |> asExpr
-        
-        | Patterns.TryFinally(e,h) -> 
-            let eP = ConvExpr env (Expr.Lambda(new Var("unitVar",typeof), e))
-            let hP = ConvExpr env <@@ (fun () -> (%%h:unit)) @@>
-            let minfo = TryFinallyMethod.GetGenericMethodDefinition().MakeGenericMethod [| eP.Type |]
-            Expression.Call(minfo,[| eP; hP |]) |> asExpr
-        
-        | Patterns.TryWith(e,vf,filter,vh,handler) -> 
-            let eP = ConvExpr env (Expr.Lambda(new Var("unitVar",typeof), e))
-            let filterP = ConvExpr env (Expr.Lambda(vf,filter))
-            let handlerP = ConvExpr env (Expr.Lambda(vh,handler))
-            let minfo = TryWithMethod.GetGenericMethodDefinition().MakeGenericMethod [| eP.Type |]
-            Expression.Call(minfo,[| eP; filterP; handlerP |]) |> asExpr
-
-        | Patterns.LetRec(binds,body) -> 
-
-            let vfs = List.map fst binds
-            
-            let pass1 = 
-                binds |> List.map (fun (vf,expr) -> 
-                    match expr with 
-                    | Lambda(vx,expr) -> 
-                        let domainTy,rangeTy = getFunctionType vf.Type
-                        let vfdTy = GetFuncType [| domainTy; rangeTy |]
-                        let vfd = new Var("d",vfdTy)
-                        (vf,vx,expr,domainTy,rangeTy,vfdTy,vfd)
-                    | _ -> failwith "cannot convert recursive bindings that do not define functions")
-
-            let trans = pass1 |> List.map (fun (vf,vx,expr,domainTy,rangeTy,vfdTy,vfd) -> (vf,vfd)) |> Map.of_list
-
-            // Rewrite uses of the recursively defined functions to be invocations of the delegates
-            // We do this because the delegate are allocated "once" and we can normally just invoke them efficiently
-            let rec rw t = 
-                match t with 
-                | Application(Var(vf),t) when trans.ContainsKey(vf) -> 
-                     let vfd = trans.[vf]
-                     Expr.Call(Expr.Var(vfd),vfd.Type.GetMethod("Invoke",instanceBindingFlags),[t])
-                | ExprShape.ShapeVar(vf) when trans.ContainsKey(vf)-> 
-                     let vfd = trans.[vf]
-                     let nv = Var("nv",fst(getFunctionType vf.Type)) 
-                     Expr.Lambda(nv,Expr.Call(Expr.Var(vfd),vfd.Type.GetMethod("Invoke",instanceBindingFlags),[Expr.Var(nv)]))
-                | ExprShape.ShapeVar(_) -> t
-                | ExprShape.ShapeCombination(obj,args) -> ExprShape.RebuildShapeCombination(obj,List.map rw args)
-                | ExprShape.ShapeLambda(v,arg) -> Expr.Lambda(v,rw arg)
-
-            let vfdTys    = pass1 |> List.map (fun (vf,vx,expr,domainTy,rangeTy,vfdTy,vfd) -> vfdTy) |> Array.of_list
-            let vfds      = pass1 |> List.map (fun (vf,vx,expr,domainTy,rangeTy,vfdTy,vfd) -> vfd)
-
-            let FPs = 
-                [| for (vf,vx,expr,domainTy,rangeTy,vfdTy,vfd) in pass1 do
-                      let expr = rw expr
-                      let tyF = GetFuncType (Array.append vfdTys [| vx.Type; expr.Type |])
-                      let F = Expr.NewDelegate(tyF,vfds@[vx],expr)
-                      let FP = ConvExpr env F
-                      yield FP |]
-
-            let body = rw body
-
-            let methTys   = 
-                [| for (vf,vx,expr,domainTy,rangeTy,vfdTy,vfd) in pass1 do
-                      yield domainTy
-                      yield rangeTy
-                   yield body.Type |]
-
-            let B = Expr.NewDelegate(GetFuncType (Array.append vfdTys [| body.Type |]),vfds,body)
-            let BP = ConvExpr env B
-
-            let minfo = 
-                let q = 
-                    match vfds.Length with 
-                    | 1 -> <@@ LetRec1Helper @@>
-                    | 2 -> <@@ LetRec2Helper @@>
-                    | 3 -> <@@ LetRec3Helper @@>
-                    | 4 -> <@@ LetRec4Helper @@>
-                    | 5 -> <@@ LetRec5Helper @@>
-                    | 6 -> <@@ LetRec6Helper @@>
-                    | 7 -> <@@ LetRec7Helper @@>
-                    | 8 -> <@@ LetRec8Helper @@>
-                    | _ -> raise <| new NotSupportedException("In this release of the F# Power Pack, mutually recursive function groups involving 9 or more functions may not be converted to LINQ expressions")
-                match q with Lambdas(_,Call(_,minfo,_)) -> minfo | _ -> failwith "couldn't find minfo"
-
-            let minfo = minfo.GetGenericMethodDefinition().MakeGenericMethod methTys
-            Expression.Call(minfo,Array.append FPs [| BP |]) |> asExpr
-
-        | Patterns.AddressOf _ -> raise <| new NotSupportedException("Address-of expressions may not be converted to LINQ expressions")
-        | Patterns.AddressSet _ -> raise <| new NotSupportedException("Address-set expressions may not be converted to LINQ expressions")
-        | Patterns.FieldSet _ -> raise <| new NotSupportedException("Field-set expressions may not be converted to LINQ expressions")
-
-        | _ -> 
-            raise <| new NotSupportedException(sprintf "Could not convert the following F# Quotation to a LINQ Expression Tree\n--------\n%A\n-------------\n" inp)
-
-    and ConvObjArg env objOpt : Expression = 
-        match objOpt with
-        | Some(obj) -> ConvExpr env obj
-        | None -> null
-
-    and ConvExprs env es : Expression[] = 
-        es |> List.map (ConvExpr env) |> Array.of_list 
-
-    and ConvVar (v: Var) = 
-        //printf "** Expression .Parameter(%a, %a)\n" output_any ty output_any nm;
-        Expression.Parameter(v.Type, v.Name)
-
-    let Conv (e: #Expr) = ConvExpr Map.empty (e :> Expr)
-
-    let Compile (e: #Expr) = 
-       let ty = e.Type
-       let e = Expr.NewDelegate(GetFuncType([|typeof; ty |]), [new Var("unit",typeof)],e)
-       let linqExpr = Conv e
-       let linqExpr = (linqExpr :?> LambdaExpression)
-       let d = linqExpr.Compile()
-       (fun () -> 
-           try 
-             d.DynamicInvoke [| box () |]
-           with :? System.Reflection.TargetInvocationException as exn -> 
-               raise exn.InnerException)
-
-    let Eval e = Compile e ()
-
-    type Microsoft.FSharp.Quotations.Expr with 
-        member x.ToLinqExpression() = Conv(x)
-        member x.CompileUntyped() = Compile(x)
-        member x.EvalUntyped() = Eval(x)
-
-    type Microsoft.FSharp.Quotations.Expr<'T> with 
-        member x.Compile() = 
-            let f = Compile(x)  
-            (fun () -> (f()) :?> 'T)
-        member x.Eval() = (Eval(x) :?> 'T)
-
-  
-    
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/Linq.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/Linq.fsi
deleted file mode 100644
index 554b30ed..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/Linq.fsi
+++ /dev/null
@@ -1,124 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.Linq
-
-    open System
-    open System.Linq.Expressions
-
-    /// This module provides Compile and Eval extension members
-    /// for F# quotation values, implemented by translating to LINQ
-    /// expression trees and using the LINQ dynamic compiler.
-    module QuotationEvaluation =
-
-        
-        type Microsoft.FSharp.Quotations.Expr with 
-              /// Convert the quotation expression to LINQ expression trees
-              ///
-              /// This operation will only succeed for a subset of quotation expressions.
-              ///
-              /// Exceptions: InvalidArgumentException will be raised if the input expression is
-              /// not in the subset that can be converted to a LINQ expression tree
-              member ToLinqExpression : unit -> System.Linq.Expressions.Expression
-
-              /// Compile the quotation expression by first converting to LINQ expression trees
-              ///
-              /// Exceptions: InvalidArgumentException will be raised if the input expression is
-              /// not in the subset that can be converted to a LINQ expression tree
-              member CompileUntyped : unit -> (unit -> obj)
-
-              /// Compile the quotation expression by first converting to LINQ expression trees
-              ///
-              /// Exceptions: InvalidArgumentException will be raised if the input expression is
-              /// not in the subset that can be converted to a LINQ expression tree
-              member EvalUntyped : unit -> obj
-
-        type Microsoft.FSharp.Quotations.Expr<'T> with 
-              /// Compile the quotation expression by first converting to LINQ expression trees
-              ///
-              /// Exceptions: InvalidArgumentException will be raised if the input expression is
-              /// not in the subset that can be converted to a LINQ expression tree
-              member Compile : unit -> (unit -> 'T)
-
-              /// Evaluate the quotation expression by first converting to LINQ expression trees
-              ///
-              /// Exceptions: InvalidArgumentException will be raised if the input expression is
-              /// not in the subset that can be converted to a LINQ expression tree
-              member Eval : unit -> 'T
-
-        /// This function should not be called directly. 
-        //
-        // NOTE: when an F# expression tree is converted to a Linq expression tree using ToLinqExpression 
-        // the transformation of LinqExpressionHelper(e) is simple the same as the transformation of
-        // 'e'. This allows LinqExpressionHelper to be used as a marker to satisfy the C# design where 
-        // certain expression trees are constructed using methods with a signature that expects an
-        // expression tree of type Expression<T> but are passed an expression tree of type T.
-        val LinqExpressionHelper : 'T -> Expression<'T>
-
-        /// A set of types used for implementing quotation conversions.
-        /// These are public only because targets of Linq Lambda expressions require them to be so
-        module HelperTypes = 
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18, 'T19> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 * 'T19 -> unit
-            []
-            type ActionHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18, 'T19, 'T20> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 * 'T19 * 'T20 -> unit
-
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'T6
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 -> 'T7 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 -> 'T8 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 -> 'T9 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 -> 'T10 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 -> 'T11 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 -> 'T12 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 -> 'T13 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 -> 'T14 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 -> 'T15 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 -> 'T16 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 -> 'T17 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 -> 'T18 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18, 'T19> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 -> 'T19 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18, 'T19, 'T20> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 * 'T19 -> 'T20 
-            []
-            type FuncHelper<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'T17, 'T18, 'T19, 'T20, 'T21> = delegate of 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8 * 'T9 * 'T10 * 'T11 * 'T12 * 'T13 * 'T14 * 'T15 * 'T16 * 'T17 * 'T18 * 'T19 * 'T20 -> 'T21 
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/LinqQueries.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/LinqQueries.fs
deleted file mode 100644
index 1f86abc0..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/LinqQueries.fs
+++ /dev/null
@@ -1,793 +0,0 @@
-// Copyright (c) Microsoft Corporation 2005-2008.
-// This sample code is provided "as is" without warranty of any kind. 
-// We disclaim all warranties, either express or implied, including the 
-// warranties of merchantability and fitness for a particular purpose. 
-//
-
-namespace Microsoft.FSharp.Linq
-
-open System
-open System.Linq
-open System.Collections.Generic
-open System.Linq.Expressions
-open System.Reflection
-open System.Reflection.Emit
-open Microsoft.FSharp
-open Microsoft.FSharp.Linq.QuotationEvaluation
-open Microsoft.FSharp.Quotations
-open Microsoft.FSharp.Quotations.Patterns
-open Microsoft.FSharp.Quotations.DerivedPatterns
-
-#nowarn "57"
-  
-    
-module Query =
-
-    let debug = false
-        
-    let contains key source = 
-        System.Linq.Enumerable.Contains(source,key)
-
-    let minBy<'T1,'T2> keySelector source = 
-        System.Linq.Enumerable.Min(source,Func<'T1,'T2>(keySelector))
-
-    let maxBy<'T1,'T2> keySelector source = 
-        System.Linq.Enumerable.Max(source,Func<'T1,'T2>(keySelector))
-
-    let groupBy keySelector source = 
-        System.Linq.Enumerable.GroupBy(source,Func<_,_>(keySelector))
-
-    let join  outerSource innerSource outerKeySelector innerKeySelector resultSelector = 
-        System.Linq.Enumerable.Join(outerSource,innerSource,Func<_,_>(outerKeySelector),Func<_,_>(innerKeySelector),Func<_,_,_>(resultSelector))
-
-    let groupJoin  outerSource innerSource outerKeySelector innerKeySelector resultSelector = 
-        System.Linq.Enumerable.GroupJoin(outerSource,innerSource,Func<_,_>(outerKeySelector),Func<_,_>(innerKeySelector),Func<_,_,_>(resultSelector))
-
-    let min_by<'T1,'T2> keySelector source = 
-        System.Linq.Enumerable.Min(source,Func<'T1,'T2>(keySelector))
-
-    let max_by<'T1,'T2> keySelector source = 
-        System.Linq.Enumerable.Max(source,Func<'T1,'T2>(keySelector))
-
-    let group_by keySelector source = 
-        System.Linq.Enumerable.GroupBy(source,Func<_,_>(keySelector))
-
-    let group_join  outerSource innerSource outerKeySelector innerKeySelector resultSelector = 
-        System.Linq.Enumerable.GroupJoin(outerSource,innerSource,Func<_,_>(outerKeySelector),Func<_,_>(innerKeySelector),Func<_,_,_>(resultSelector))
-
-    let ConvVar (v: Var) = 
-        Expression.Parameter(v.Type, v.Name)
-
-    let asExpr x = (x :> Expression)
-            
-    let (|Getter|_|) (prop: #PropertyInfo) =
-        match prop.GetGetMethod(true) with 
-        | null -> None
-        | v -> Some v
-
-    let (|CallPipe|_|) = (|SpecificCall|_|) <@ (|>) @>
-    // Match 'f x' or 'x |> f' or 'x |> (fun x -> f (x :> ty))'
-    let (|SpecificPipedCall0|_|) q = 
-       let (|CallQ|_|) = (|SpecificCall|_|) q
-       function
-       | CallPipe ([_;_],[arg1;Lambda(arg1v,CallQ (tyargs,[arg1E])) ]) -> 
-           let arg1 = arg1E.Substitute (Map.of_seq [ (arg1v,arg1) ]).TryFind 
-           Some(tyargs,arg1)
-
-       | CallQ (tyargs,[arg1]) -> 
-           Some(tyargs,arg1)
-
-       | _ -> None           
-
-    // Match 
-    //     'f x y' or 
-    //     'y |> f x' or
-    //     'y |> (fun y -> f (x :> ty) (y :> ty))'
-    //     'y |> let x = e in (fun y -> f (x :> ty) (y :> ty))'
-    let (|SpecificPipedCall1|_|) q = 
-       let (|CallQ|_|) = (|SpecificCall|_|) q
-       function
-       // Encoded form of some uses of 'T1rg2 |> f arg1'
-       | CallPipe ([_;_],[arg2;Let(arg1v,arg1,Lambda(arg2v,CallQ (tyargs,[arg1E;arg2E]))) ]) -> 
-              let arg1 = arg1E.Substitute (Map.of_seq [ (arg1v,arg1) ]).TryFind 
-              let arg2 = arg2E.Substitute (Map.of_seq [ (arg2v,arg2) ]).TryFind 
-              Some(tyargs,arg1,arg2)
-
-       | CallPipe ([_;_],[arg2;Lambda(arg2v,CallQ (tyargs,[arg1;arg2E])) ]) -> 
-              let arg2 = arg2E.Substitute (Map.of_seq [ (arg2v,arg2) ]).TryFind 
-              Some(tyargs,arg1,arg2)
-
-       | CallQ (tyargs,[arg1;arg2]) -> 
-              Some(tyargs,arg1,arg2)
-       | _ -> None           
-
-        
-    let GetGenericMethodDefinition (m:MethodInfo) = 
-        if m.IsGenericMethod then m.GetGenericMethodDefinition() else m
-
-    let FindGenericStaticMethodInfo mexpr =
-        match mexpr with 
-        | Lambdas(_,Call(None,methInfo,_)) -> GetGenericMethodDefinition methInfo
-        | _ -> failwithf "FindGenericStaticMethodInfo: %A is not a static method call lambda" mexpr
-
-    let CallGenericStaticMethod mexpr  =
-        let m = FindGenericStaticMethodInfo mexpr in
-        //printf "m = %A\n" m;
-        fun (tyargs,args) -> 
-            //printf "invoking %A\n" m;
-            
-            let m = 
-                if m.IsGenericMethod then 
-                    m.MakeGenericMethod(Array.of_list tyargs) 
-                else
-                    m
-            m.Invoke(null,Array.of_list args)
-
-    let QT = typeof
-    let ST = typeof
-    let EGT = typeof>.GetGenericTypeDefinition()
-    let ET = typeof
-    let FT1 = typeof>.GetGenericTypeDefinition()
-    let FT2 = typeof>.GetGenericTypeDefinition()
-    let boolTy = typeof
-    let MakeQueryFuncTy (dty,rty) = FT1.MakeGenericType([| dty; rty |])
-    let MakeQueryFunc2Ty (dty1,dty2,rty) = FT2.MakeGenericType([| dty1; dty2; rty |])
-
-    let IET = typeof>.GetGenericTypeDefinition()
-    let IQT = typeof>.GetGenericTypeDefinition()
-    let MakeIEnumerableTy dty= IET.MakeGenericType([| dty|])
-    let MakeIQueryableTy dty= IQT.MakeGenericType([| dty|])
-
-    let isNamedType(typ:Type) = not (typ.IsArray || typ.IsByRef || typ.IsPointer)
-    let equivHeadTypes (ty1:Type) (ty2:Type) = 
-        isNamedType(ty1) &&
-        if ty1.IsGenericType then 
-          ty2.IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(ty2.GetGenericTypeDefinition())
-        else 
-          ty1.Equals(ty2)
-
-    let IsIQT ty = equivHeadTypes IQT ty
-   
-
-    let CallSeqToList = 
-        let F = CallGenericStaticMethod <@ Seq.to_list @> 
-        fun (srcTy,src) -> 
-            F ([srcTy],[src])
-
-    let CallSeqToArray = 
-        let F = CallGenericStaticMethod <@ Seq.to_array @> 
-        fun (srcTy,src) -> 
-            F ([srcTy],[src])
-
-    let CallQueryableContains = 
-        let F = CallGenericStaticMethod <@ System.Linq.Queryable.Contains : _ * _ -> _ @> 
-        fun (srcTy,src,key:Expression) -> 
-            F ([srcTy],[src;box key])
-
-    let CallQueryableMinBy = 
-        let F = CallGenericStaticMethod <@ System.Linq.Queryable.Min : _ * Expression> -> _ @> 
-        fun (srcTy,destTy,src,predicate:Expression) -> 
-            F ([srcTy;destTy],[src;box predicate])
-
-    let CallQueryableMin = 
-        let F = CallGenericStaticMethod <@ System.Linq.Queryable.Min : _ -> _ @> 
-        fun (srcTy,src) -> 
-            F ([srcTy],[src])
-
-    let CallQueryableMaxBy = 
-        let F = CallGenericStaticMethod <@ System.Linq.Queryable.Max : _ * Expression> -> _ @> 
-        fun (srcTy,destTy,src,predicate:Expression) -> 
-            F ([srcTy;destTy],[src;box predicate])
-
-    let CallQueryableMax = 
-        let F = CallGenericStaticMethod <@ System.Linq.Queryable.Max : _ -> _ @> 
-        fun (srcTy,src) -> 
-            F ([srcTy],[src])
-
-    let CallQueryableAverageBy = 
-        let F_float = CallGenericStaticMethod <@ System.Linq.Queryable.Average : _ * Expression> -> _ @> 
-        let F_float32 = CallGenericStaticMethod <@ System.Linq.Queryable.Average : _ * Expression> -> _ @> 
-        let F_decimal = CallGenericStaticMethod <@ System.Linq.Queryable.Average : _ * Expression> -> _ @> 
-        // Note these don't satisfy the F# constraints anyway
-        let F_int32 = CallGenericStaticMethod <@ System.Linq.Queryable.Average : _ * Expression> -> _ @> 
-        let F_int64 = CallGenericStaticMethod <@ System.Linq.Queryable.Average : _ * Expression> -> _ @> 
-        fun (srcTy,destTy,src,predicate:Expression) -> 
-            match srcTy with 
-            | ty when ty = typeof -> F_float ([destTy],[src;box predicate])
-            | ty when ty = typeof -> F_float32 ([destTy],[src;box predicate])
-            | ty when ty = typeof -> F_decimal ([destTy],[src;box predicate])
-            | ty when ty = typeof -> F_int32 ([destTy],[src;box predicate])
-            | ty when ty = typeof -> F_int64 ([destTy],[src;box predicate])
-            | _ -> failwith "unrecognized use of 'Seq.averageBy'"
-
-
-    let CallQueryableAverage = 
-        let F_float = CallGenericStaticMethod <@ System.Linq.Queryable.Average : IQueryable -> _ @> 
-        let F_float32 = CallGenericStaticMethod <@ System.Linq.Queryable.Average : IQueryable  -> _ @> 
-        let F_decimal = CallGenericStaticMethod <@ System.Linq.Queryable.Average : IQueryable  -> _ @> 
-        // Note these don't satisfy the F# constraints anyway
-        let F_int32 = CallGenericStaticMethod <@ System.Linq.Queryable.Average : IQueryable  -> _ @> 
-        let F_int64 = CallGenericStaticMethod <@ System.Linq.Queryable.Average : IQueryable  -> _ @> 
-        fun (srcTy,src) -> 
-            match srcTy with 
-            | ty when ty = typeof -> F_float ([],[src])
-            | ty when ty = typeof -> F_float32 ([],[src])
-            | ty when ty = typeof -> F_decimal ([],[src])
-            | ty when ty = typeof -> F_int32 ([],[src])
-            | ty when ty = typeof -> F_int64 ([],[src])
-            | _ -> failwith "unrecognized use of 'Seq.average'"
-
-    let CallQueryableSumBy = 
-        let F_float = CallGenericStaticMethod <@ System.Linq.Queryable.Sum : _ * Expression> -> _ @> 
-        let F_float32 = CallGenericStaticMethod <@ System.Linq.Queryable.Sum : _ * Expression> -> _ @> 
-        let F_decimal = CallGenericStaticMethod <@ System.Linq.Queryable.Sum : _ * Expression> -> _ @> 
-        let F_int32 = CallGenericStaticMethod <@ System.Linq.Queryable.Sum : _ * Expression> -> _ @> 
-        let F_int64 = CallGenericStaticMethod <@ System.Linq.Queryable.Sum : _ * Expression> -> _ @> 
-        fun (srcTy,destTy,src,predicate:Expression) -> 
-            match srcTy with 
-            | ty when ty = typeof -> F_float ([destTy],[src;box predicate])
-            | ty when ty = typeof -> F_float32 ([destTy],[src;box predicate])
-            | ty when ty = typeof -> F_decimal ([destTy],[src;box predicate])
-            | ty when ty = typeof -> F_int32 ([destTy],[src;box predicate])
-            | ty when ty = typeof -> F_int64 ([destTy],[src;box predicate])
-            | _ -> failwith "unrecognized use of 'Seq.sumBy'"
-
-    let CallQueryableSum = 
-        let F_float = CallGenericStaticMethod <@ System.Linq.Queryable.Sum : IQueryable -> _ @> 
-        let F_float32 = CallGenericStaticMethod <@ System.Linq.Queryable.Sum : IQueryable  -> _ @> 
-        let F_decimal = CallGenericStaticMethod <@ System.Linq.Queryable.Sum : IQueryable  -> _ @> 
-        // Note these don't satisfy the F# constraints anyway
-        let F_int32 = CallGenericStaticMethod <@ System.Linq.Queryable.Sum : IQueryable  -> _ @> 
-        let F_int64 = CallGenericStaticMethod <@ System.Linq.Queryable.Sum : IQueryable  -> _ @> 
-        fun (srcTy,src) -> 
-            match srcTy with 
-            | ty when ty = typeof -> F_float ([],[src])
-            | ty when ty = typeof -> F_float32 ([],[src])
-            | ty when ty = typeof -> F_decimal ([],[src])
-            | ty when ty = typeof -> F_int32 ([],[src])
-            | ty when ty = typeof -> F_int64 ([],[src])
-            | _ -> failwith "unrecognized use of 'Seq.sum"
-
-    let CallQueryableFirst = 
-        let F = CallGenericStaticMethod <@ System.Linq.Queryable.First : _ -> _ @> 
-        fun (srcTy,src) -> 
-            F ([srcTy],[src])
-
-    let CallQueryableFirstFind = 
-        let F = CallGenericStaticMethod <@ System.Linq.Queryable.First : _ * Expression> -> _ @> 
-        fun (srcTy,src,predicate:Expression) -> 
-            F ([srcTy],[src;box predicate])
-
-    let CallQueryableCount = 
-        let F = CallGenericStaticMethod <@ System.Linq.Queryable.Count : _ -> _ @> 
-        fun (srcTy:Type,src:obj) -> 
-            F ([srcTy],[src])
-
-    let BindGenericMethod (methInfo:MethodInfo) tyargs = 
-        if methInfo.IsGenericMethod then 
-            methInfo.GetGenericMethodDefinition().MakeGenericMethod(Array.of_list tyargs)
-        else
-            methInfo
-
-    let minfo = match <@@ LinqExpressionHelper @@> with Lambda(_,Call(_,minfo,_)) -> minfo | _ -> failwith "couldn't find method info"
-    let MakeFakeExpression (x:Expr) = 
-        Expr.Call(minfo.GetGenericMethodDefinition().MakeGenericMethod [| x.Type |], [ x ])
-
-            
-    let MakeGenericStaticMethod lam  =
-        // Nb. the SelectMany/Where/Select methods theoretically expects an expression, but the
-        // LINQ team decided to only pass it a delegate construction. The coercion from
-        // the delegate construction to the expression is effectively implicit in LINQ, but
-        // not in F# quotations, so we have to use 'Unchecked' version (see also FSBUGS #970)
-        let methInfo = FindGenericStaticMethodInfo lam 
-        (fun (tyargs,args) -> Expr.Call(BindGenericMethod methInfo tyargs,args))
-           
-
-    let MakeQueryableSelect = 
-        let F = MakeGenericStaticMethod <@ (System.Linq.Queryable.Select : _ * Expression> -> _) @>
-        fun (srcTy,targetTy,src,v,f)  -> 
-            
-            let selector = Expr.NewDelegate(MakeQueryFuncTy(srcTy,targetTy), v,f)
-
-            let selector = MakeFakeExpression selector
-            F ([srcTy;targetTy],[src;selector])
-
-    let MakeQueryableAppend = 
-        let F = MakeGenericStaticMethod <@ (System.Linq.Queryable.Concat ) @>
-        fun (srcTy,src1,src2)  -> 
-            F ([srcTy],[src1;src2])
-
-    let MakeQueryableContains = 
-        let F = MakeGenericStaticMethod <@ (System.Linq.Queryable.Contains : _ * _ -> _ ) @>
-        fun (srcTy,src1,src2)  -> 
-            F ([srcTy],[src1;src2])
-
-    let MakeQueryableAsQueryable = 
-        let F = MakeGenericStaticMethod <@ (System.Linq.Queryable.AsQueryable : seq<_>  -> IQueryable<_>) @>
-        fun (ty,src)  -> 
-            F ([ty],[src])
-
-    let MakeEnumerableEmpty = 
-        let F = MakeGenericStaticMethod <@ (System.Linq.Enumerable.Empty : unit -> seq<_>) @>
-        fun (ty)  -> 
-            F ([ty],[])
-
-    let MakeQueryableEmpty = 
-        fun (ty)  -> 
-            MakeQueryableAsQueryable (ty,MakeEnumerableEmpty ty)
-
-    let MakeQueryableSelectMany = 
-        let F = MakeGenericStaticMethod <@ (System.Linq.Queryable.SelectMany : IQueryable<_> * Expression> -> IQueryable<_>) @>
-        fun (srcTy,targetTy,src,v,f)  -> 
-            // REVIEW: Previous notes in this file said that LINQ likes to see a coercion to an interface type
-            // at this point. 
-            //let src = Expr.Coerce(src,MakeIQueryableTy srcTy)
-            let selector = Expr.NewDelegate(MakeQueryFuncTy(srcTy,MakeIEnumerableTy targetTy), [v],f)
-
-            let selector = MakeFakeExpression selector
-            F ([srcTy;targetTy],[src;selector])
-
-    let MakeQueryableWhere = 
-        let F = MakeGenericStaticMethod <@ (System.Linq.Queryable.Where : _ * Expression> -> _) @>
-        fun (srcTy,src,v,f)  -> 
-            let selector = Expr.NewDelegate(MakeQueryFuncTy(srcTy,typeof), [v],f)
-
-            let selector = MakeFakeExpression selector
-            F ([srcTy],[src;selector])
-
-
-
-    let MakeQueryableOrderBy = 
-        let F = MakeGenericStaticMethod <@ System.Linq.Queryable.OrderBy : _ * Expression> -> _ @> 
-        fun (srcTy,keyTy,src,v,keySelector)  -> 
-            
-            let selector = Expr.NewDelegate(MakeQueryFuncTy(srcTy,keyTy), [v],keySelector)
-
-            let selector = MakeFakeExpression selector
-            F ([srcTy;keyTy],[src;selector])
-
-    let MakeQueryableDistinct = 
-        let F = MakeGenericStaticMethod <@ System.Linq.Queryable.Distinct : _ -> _ @> 
-        fun (srcTy,src)  -> 
-            // REVIEW: Previous notes in this file said that LINQ likes to see a coercion to an interface type
-            // at this point.
-            let src = Expr.Coerce(src,MakeIQueryableTy srcTy)
-            F ([srcTy],[src])
-
-    let MakeQueryableTake = 
-        let F = MakeGenericStaticMethod <@ System.Linq.Queryable.Take @> 
-        fun (srcTy,src,count)  -> 
-            // REVIEW: Previous notes in this file said that LINQ likes to see a coercion to an interface type
-            // at this point.
-            let src = Expr.Coerce(src,MakeIQueryableTy srcTy)
-            F ([srcTy],[src;count])
-
-    let MakeQueryableGroupBy = 
-        let F = MakeGenericStaticMethod <@ System.Linq.Queryable.GroupBy : _ * Expression> -> _ @> 
-        fun (srcTy,keyTy,src,v,keySelector)  -> 
-            let keySelector = Expr.NewDelegate(MakeQueryFuncTy(srcTy,keyTy), [v],keySelector) 
-
-            let keySelector = MakeFakeExpression keySelector
-            F ([srcTy;keyTy],[src;keySelector])
-
-    let MakeQueryableMinBy = 
-        let F = MakeGenericStaticMethod <@ System.Linq.Queryable.Min : _ * Expression> -> _ @> 
-        fun (srcTy,keyTy,src,v,keySelector)  -> 
-            let keySelector = Expr.NewDelegate(MakeQueryFuncTy(srcTy,keyTy), [v],keySelector) 
-
-            let keySelector = MakeFakeExpression keySelector
-            F ([srcTy;keyTy],[src;keySelector])
-
-    let MakeQueryableMaxBy = 
-        let F = MakeGenericStaticMethod <@ System.Linq.Queryable.Max : _ * Expression> -> _ @> 
-        fun (srcTy,keyTy,src,v,keySelector)  -> 
-            let keySelector = Expr.NewDelegate(MakeQueryFuncTy(srcTy,keyTy), [v],keySelector) 
-
-            let keySelector = MakeFakeExpression keySelector
-            F ([srcTy;keyTy],[src;keySelector])
-
-    let MakeQueryableAny = 
-        let F = MakeGenericStaticMethod <@ System.Linq.Queryable.Any : _ * Expression> -> _ @> 
-        fun (srcTy,src,v,keySelector)  -> 
-            let keySelector = Expr.NewDelegate(MakeQueryFuncTy(srcTy,boolTy), [v],keySelector) 
-
-            let keySelector = MakeFakeExpression keySelector
-            F ([srcTy],[src;keySelector])
-
-    let MakeQueryableAll = 
-        let F = MakeGenericStaticMethod <@ System.Linq.Queryable.All : _ * Expression> -> _ @> 
-        fun (srcTy,src,v,keySelector)  -> 
-            let keySelector = Expr.NewDelegate(MakeQueryFuncTy(srcTy,boolTy), [v],keySelector) 
-
-            let keySelector = MakeFakeExpression keySelector
-            F ([srcTy],[src;keySelector])
-
-    let MakeQueryableJoin = 
-        let F = MakeGenericStaticMethod <@ System.Linq.Queryable.Join : _ * _ * Expression> * Expression> * Expression> -> _ @> 
-        fun (outerSourceTy,innerSourceTy,keyTy,resultTy,outerSource,innerSource,outerKeyVar,outerKeySelector,innerKeyVar,innerKeySelector,outerResultKeyVar,innerResultKeyVar,resultSelector)  -> 
-            let outerKeySelector = Expr.NewDelegate(MakeQueryFuncTy(outerSourceTy,keyTy), [outerKeyVar],outerKeySelector) |> MakeFakeExpression 
-            let innerKeySelector = Expr.NewDelegate(MakeQueryFuncTy(innerSourceTy,keyTy), [innerKeyVar],innerKeySelector) |> MakeFakeExpression 
-            let resultSelector = Expr.NewDelegate(MakeQueryFunc2Ty(outerSourceTy,innerSourceTy,resultTy), [outerResultKeyVar;innerResultKeyVar],resultSelector) |> MakeFakeExpression 
-            F ([outerSourceTy;innerSourceTy;keyTy;resultTy],[outerSource;innerSource;outerKeySelector;innerKeySelector;resultSelector])
-
-
-    let MakeQueryableGroupJoin = 
-        let F = MakeGenericStaticMethod <@ System.Linq.Queryable.GroupJoin : _ * _ * Expression> * Expression> * Expression> -> _ @> 
-        fun (outerSourceTy,innerSourceTy,keyTy,resultTy,outerSource,innerSource,outerKeyVar,outerKeySelector,innerKeyVar,innerKeySelector,outerResultKeyVar,innerResultKeyVar,resultSelector)  -> 
-            let outerKeySelector = Expr.NewDelegate(MakeQueryFuncTy(outerSourceTy,keyTy), [outerKeyVar],outerKeySelector) |> MakeFakeExpression 
-            let innerKeySelector = Expr.NewDelegate(MakeQueryFuncTy(innerSourceTy,keyTy), [innerKeyVar],innerKeySelector) |> MakeFakeExpression 
-            let resultSelector = Expr.NewDelegate(MakeQueryFunc2Ty(outerSourceTy,MakeIEnumerableTy(innerSourceTy),resultTy), [outerResultKeyVar;innerResultKeyVar],resultSelector) |> MakeFakeExpression 
-            F ([outerSourceTy;innerSourceTy;keyTy;resultTy],[outerSource;innerSource;outerKeySelector;innerKeySelector;resultSelector])
-
-
-
-    let MakeLambda = 
-        let F = CallGenericStaticMethod <@ (fun (a:Expression,b:ParameterExpression[]) -> System.Linq.Expressions.Expression.Lambda<_>(a,b)) @> 
-        fun (srcTy,targetTy,arg:Expression,p:ParameterExpression) -> 
-            (F ([MakeQueryFuncTy(srcTy,targetTy)],[box arg;box [| p |] ]) :?> Expression)
-
-    /// Project F# function expressions to Linq LambdaExpression nodes
-    let FuncExprToLinqFunc2Expression (srcTy,targetTy,v,body) = 
-        Expr.NewDelegate(Linq.Expressions.Expression.GetFuncType [| srcTy; targetTy |], [v],body).ToLinqExpression()
-
-
-    let MakeMapConcat = 
-        let F = MakeGenericStaticMethod <@ Seq.collect @>
-        fun (srcTy,targetTy,f,src)  -> 
-            F ([srcTy;MakeIEnumerableTy targetTy;targetTy],[f;src])
-
-    let MakeFilter = 
-        let F = MakeGenericStaticMethod <@ Seq.filter @>
-        fun (srcTy,f,src)  -> 
-            F ([srcTy],[f;src])
-
-    let (|MacroReduction|_|) (p : Expr) = 
-        match p with 
-        | Applications(Lambdas(vs,body),args) when vs.Length = args.Length && List.forall2 (fun vs arg -> List.length vs = List.length args) vs args -> 
-            let tab = Map.of_seq (List.concat (List.map2 List.zip vs args))
-            let body = body.Substitute tab.TryFind 
-            Some body
-
-        // Macro
-        | PropGet(None,Getter(MethodWithReflectedDefinition(body)),[]) -> 
-            Some body
-
-        // Macro
-        | Call(None,MethodWithReflectedDefinition(Lambdas(vs,body)),args) -> 
-            let tab = Map.of_seq (List.concat (List.map2 (fun (vs:Var list) arg -> match vs,arg with [v],arg -> [(v,arg)] | vs,NewTuple(args) -> List.zip vs args | _ -> List.zip vs [arg]) vs args))
-            let body = body.Substitute tab.TryFind 
-            Some body
-
-        // Macro
-        | Let(v,e,body) ->
-            let tab = Map.of_seq [ (v,e) ]
-            let body = body.Substitute tab.TryFind 
-            Some body
-        | _ -> None
-
-    let rec MacroExpand (p : Expr) = 
-        match p with 
-        // Macro reduction
-        | MacroReduction(reduced) -> 
-            MacroExpand reduced
-        | ExprShape.ShapeCombination(comb,args) ->
-            ExprShape.RebuildShapeCombination(comb, List.map MacroExpand args)
-        | ExprShape.ShapeLambda(v,body) ->
-            Expr.Lambda(v, MacroExpand body)
-        | ExprShape.ShapeVar _ -> p
-
-    let (|PipedCallMapConcat|_|) = (|SpecificPipedCall1|_|) <@ Seq.collect @>
-    let (|CallSingleton|_|) = (|SpecificCall|_|) <@ Seq.singleton @>
-    let (|CallEmpty|_|) = (|SpecificCall|_|) <@ Seq.empty @>
-    let (|PipedCallSortBy|_|) = (|SpecificPipedCall1|_|) <@ Seq.sortBy @>
-    let (|PipedCallSeqGroupBy|_|) = (|SpecificPipedCall1|_|) <@ Seq.groupBy @>
-    let (|PipedCallSeqMinBy|_|) = (|SpecificPipedCall1|_|) <@ Seq.minBy @>
-    let (|PipedCallSeqMaxBy|_|) = (|SpecificPipedCall1|_|) <@ Seq.maxBy @>
-    let (|PipedCallQueryGroupBy|_|) = (|SpecificPipedCall1|_|) <@ groupBy @>
-    let (|PipedCallQueryMinBy|_|) = (|SpecificPipedCall1|_|) <@ minBy @>
-    let (|PipedCallQueryMaxBy|_|) = (|SpecificPipedCall1|_|) <@ maxBy @>
-    let (|PipedCallSeqMap|_|) = (|SpecificPipedCall1|_|) <@ Seq.map @>
-    let (|PipedCallSeqAppend|_|) = (|SpecificPipedCall1|_|) <@ Seq.append @>
-    let (|PipedCallSeqFilter|_|) = (|SpecificPipedCall1|_|) <@ Seq.filter @>
-    let (|PipedCallSeqExists|_|) = (|SpecificPipedCall1|_|) <@ Seq.exists @>
-    let (|PipedCallSeqForAll|_|) = (|SpecificPipedCall1|_|) <@ Seq.forall @>
-    let (|PipedCallSeqDelay|_|) = (|SpecificPipedCall0|_|) <@ Seq.delay @>
-    let (|PipedCallSeqDistinct|_|) = (|SpecificPipedCall0|_|) <@ Seq.distinct @>
-    let (|PipedCallSeqToList|_|) = (|SpecificPipedCall0|_|) <@ Seq.to_list @>
-    let (|PipedCallSeqTake|_|) = (|SpecificPipedCall1|_|) <@ Seq.take @>
-    let (|PipedCallSeqToArray|_|) = (|SpecificPipedCall0|_|) <@ Seq.to_array @>
-    let (|PipedCallSeqMin|_|) = (|SpecificPipedCall0|_|) <@ Seq.min @>
-    let (|PipedCallSeqMax|_|) = (|SpecificPipedCall0|_|) <@ Seq.max @>
-    let (|PipedCallQueryContains|_|) = (|SpecificPipedCall1|_|) <@ contains @>
-    let (|CallSeq|_|) = (|SpecificCall|_|) <@ seq @>
-    let (|CallQueryJoin|_|) = (|SpecificCall|_|) <@ join @>
-    let (|CallQueryGroupJoin|_|) = (|SpecificCall|_|) <@ groupJoin @>
-    let (|PipedCallAverageBy|_|) = (|SpecificPipedCall1|_|) <@ Seq.averageBy : (float -> float) -> seq -> float @> 
-    let (|PipedCallAverage|_|) = (|SpecificPipedCall0|_|) <@ Seq.average: seq -> float @>
-    let (|PipedCallSumBy|_|) = (|SpecificPipedCall1|_|) <@ Seq.sumBy : (float -> float) -> seq -> float @>
-    let (|PipedCallSum|_|) = (|SpecificPipedCall0|_|) <@ Seq.sum: seq -> float @>
-    let (|PipedCallSeqLength|_|) = (|SpecificPipedCall0|_|) <@ Seq.length @>
-    let (|PipedCallSeqHd|_|) = (|SpecificPipedCall0|_|) <@ Seq.hd @>
-    let (|PipedCallSeqFind|_|) = (|SpecificPipedCall1|_|) <@ Seq.find @>
-
-    let query (p : Expr<'T1>) : 'T1 = 
-
-        let body = (p :> Expr)
-        let rec TransInner (tm:Expr) = 
-            match tm with 
-            // Look through coercions, e.g. to IEnumerable 
-            | Coerce (expr,ty) -> 
-                TransInner expr
-            
-            // Seq.collect (fun x -> if P x then tgt else Seq.empty)  sq @> 
-            //    ~~> TRANS(Seq.collect (x -> tgt) (sq.Where(x -> P x))
-            | PipedCallMapConcat ([srcTy;_;targetTy],Lambda(selectorVar, selector),sq) ->
-                let rec TransMapConcatSelector t = 
-                    match t with 
-                    | CallSingleton(_,[res]) -> 
-
-                        MakeQueryableSelect(srcTy,targetTy, TransInner sq, [selectorVar],MacroExpand res)
-
-
-                    | IfThenElse(g,tgt,CallEmpty ([_],[])) ->
-
-                        let sq = MakeFilter(srcTy,Expr.Lambda(selectorVar,g),sq)
-                        let sq = TransInner (MakeMapConcat(srcTy,targetTy,Expr.Lambda(selectorVar,tgt),sq))
-                        sq
-
-                    | MacroReduction(reduced) -> 
-                        TransMapConcatSelector reduced
-
-                    | selectorBody ->
-                        let selectorBody = TransInner selectorBody
-                        // For some reason IQueryable.SelectMany expects an IEnumerable return
-                        // REVIEW: Previous notes in this file said that LINQ likes to see a coercion to an interface type at this point. 
-                        let selectorBody = Expr.Coerce(TransInner selectorBody,MakeIEnumerableTy targetTy)
-                        MakeQueryableSelectMany(srcTy,targetTy, TransInner sq, selectorVar,selectorBody)
-
-                TransMapConcatSelector selector
-            
-            | PipedCallSeqMap ([srcTy;targetTy],Lambda(v,res),sq) ->
-        
-                MakeQueryableSelect(srcTy,targetTy, TransInner sq, [v],MacroExpand res)
-
-            | PipedCallSeqAppend ([srcTy],sq1,sq2) ->
-        
-                MakeQueryableAppend(srcTy, TransInner sq1, TransInner sq2)
-
-            // These occur in the F# quotation form of F# sequence expressions            
-            | PipedCallSeqFilter ([srcTy],Lambda(v,res),sq) ->
-
-                MakeQueryableWhere(srcTy, TransInner sq, v,MacroExpand res)
-
-            // These occur in the F# quotation form of F# sequence expressions            
-            | PipedCallSeqDelay (_,Lambda(_,body)) ->
-        
-                TransInner body
-            
-            // These occur in the F# quotation form of F# sequence expressions            
-            | CallSeq (_,[body]) ->
-        
-                TransInner body
-
-                
-            | IfThenElse(g,t,e) ->
-
-                Expr.IfThenElse(g,TransInner t, TransInner e)
-
-
-            // These occur in the F# quotation form of F# sequence expressions            
-            | CallEmpty ([ty],[]) ->
-        
-                MakeQueryableEmpty ty
-
-
-            | PipedCallSortBy([ srcTy; keyTy ],Lambda(v,keySelector),source) ->
-
-                MakeQueryableOrderBy(srcTy,keyTy, TransInner source, v,MacroExpand keySelector)
-
-            | PipedCallSeqGroupBy _ ->
-
-                failwithf "The operator Seq.group_by may not be used in queries. Use Microsoft.FSharp.Linq.Query.group_by instead, which has a different return type to the standard F# operator" tm 
-
-            | PipedCallQueryGroupBy([ srcTy; keyTy ],Lambda(v,keySelector),source) ->
-
-                MakeQueryableGroupBy(srcTy,keyTy, TransInner source, v,MacroExpand keySelector)
-
-            | PipedCallSeqMinBy _ ->
-
-                failwithf "The operator Seq.min_by may not be used in queries. Use Microsoft.FSharp.Linq.Query.min_by instead, which has a different return type to the standard F# operator" tm 
-
-            | PipedCallQueryMinBy([ srcTy; keyTy ],Lambda(v,keySelector),source) ->
-
-                MakeQueryableMinBy(srcTy,keyTy, TransInner source, v,MacroExpand keySelector)
-
-            | PipedCallSeqMaxBy _ ->
-
-                failwithf "The operator Seq.max_by may not be used in queries. Use Microsoft.FSharp.Linq.Query.max_by instead, which has a different return type to the standard F# operator" tm 
-
-            | PipedCallQueryMaxBy([ srcTy; keyTy ],Lambda(v,keySelector),source) ->
-
-                MakeQueryableMaxBy(srcTy,keyTy, TransInner source, v,MacroExpand keySelector)
-
-            | PipedCallSeqExists([ srcTy],Lambda(v,keySelector),source) ->
-
-                MakeQueryableAny(srcTy,TransInner source, v,MacroExpand keySelector)
-
-            | PipedCallSeqForAll([ srcTy],Lambda(v,keySelector),source) ->
-
-                MakeQueryableAll(srcTy,TransInner source, v,MacroExpand keySelector)
-
-            | CallQueryJoin([ outerSourceTy;innerSourceTy;keyTy;resultTy ],[outerSource;innerSource;Lambda(outerKeyVar,outerKeySelector);Lambda(innerKeyVar,innerKeySelector);Lambdas([[outerResultKeyVar];[innerResultKeyVar]],resultSelector)])->
-
-                MakeQueryableJoin(outerSourceTy,innerSourceTy,keyTy,resultTy,TransInner outerSource,TransInner innerSource,outerKeyVar,MacroExpand outerKeySelector,innerKeyVar,MacroExpand innerKeySelector,outerResultKeyVar,innerResultKeyVar,MacroExpand resultSelector)  
-
-            | CallQueryGroupJoin([ outerSourceTy;innerSourceTy;keyTy;resultTy ],[outerSource;innerSource;Lambda(outerKeyVar,outerKeySelector);Lambda(innerKeyVar,innerKeySelector);Lambdas([[outerResultKeyVar];[innerResultKeyVar]],resultSelector)])->
-
-                MakeQueryableGroupJoin(outerSourceTy,innerSourceTy,keyTy,resultTy,TransInner outerSource,TransInner innerSource,outerKeyVar,MacroExpand outerKeySelector,innerKeyVar,MacroExpand innerKeySelector,outerResultKeyVar,innerResultKeyVar,MacroExpand resultSelector)  
-
-            | PipedCallSeqDistinct([ srcTy ],source) ->
-                MakeQueryableDistinct(srcTy, TransInner source)
-
-
-            | PipedCallSeqTake([ srcTy ],count,sq) ->
-                MakeQueryableTake(srcTy, TransInner sq, MacroExpand count)
-
-            | MacroReduction(reduced) -> 
-                TransInner reduced
-
-            // These occur in the F# quotation form of F# sequence expressions            
-            //
-            //       match i.Data with 
-            //       | 8 -> ...
-            //       | _ -> ()
-            | Sequential(Value( _, unitType), sq) when unitType  = typeof -> 
-        
-                TransInner sq
-
-            | expr when typeof.IsAssignableFrom(expr.Type) ->
-                expr
-
-
-            // Error cases
-            | _  -> 
-                failwithf "The following construct was used in query but is not recognised by the F#-to-LINQ query translator:\n%A\nThis is not a valid query expression. Check the specification of permitted queries and consider moving some of the query out of the quotation" tm 
-
-        let EvalInner (tm:Expr) = (TransInner tm).EvalUntyped()
-
-        let rec EvalOuterWithPostProcess (tm:Expr) = 
-            match tm with
-            
-            // Allow SQL <@ [ for x in ... ] @>
-            | PipedCallSeqToList ([srcTy],sq) ->
-        
-                CallSeqToList (srcTy,EvalInner sq)
-
-            | PipedCallSeqToArray ([srcTy],sq) ->
-        
-                CallSeqToArray (srcTy,EvalInner sq)
-
-            | PipedCallSeqMin ([srcTy],sq) ->
-
-                CallQueryableMin(srcTy,EvalInner sq)
-
-            | PipedCallSeqMax ([srcTy],sq) ->
-
-                CallQueryableMax(srcTy,EvalInner sq)
-
-            | PipedCallQueryContains ([srcTy],v,sq) ->
-
-                CallQueryableContains(srcTy,EvalInner sq,(MacroExpand v).ToLinqExpression())
-
-            | PipedCallAverageBy([srcTy;destTy],Lambda(v,res),sq) ->
-
-                CallQueryableAverageBy(srcTy, destTy, EvalInner sq, FuncExprToLinqFunc2Expression (srcTy,destTy,v,MacroExpand  res))
-
-            | PipedCallAverage ([srcTy],sq) ->
-
-                CallQueryableAverage(srcTy, EvalInner sq)
-
-            | PipedCallSumBy ([srcTy;destTy],Lambda(v,res),sq) ->
-
-                CallQueryableSumBy(srcTy, destTy, EvalInner sq, FuncExprToLinqFunc2Expression (srcTy,destTy,v,MacroExpand  res))
-
-            | PipedCallSum ([srcTy],sq) ->
-
-                CallQueryableSum(srcTy, EvalInner sq)
-
-            | PipedCallSeqLength ([ srcTy ],sq) ->
-                CallQueryableCount(srcTy, EvalInner sq)
-
-            | PipedCallSeqHd ([ srcTy ],sq) ->
-                CallQueryableFirst(srcTy, EvalInner sq)
-
-            | PipedCallSeqFind([ srcTy ],sq, NewDelegate(_,[v],f)) ->
-                CallQueryableFirstFind(srcTy, EvalInner sq, FuncExprToLinqFunc2Expression (srcTy,boolTy,v,MacroExpand f))
-
-            | MacroReduction(reduced) -> 
-                EvalOuterWithPostProcess reduced
-
-            | _  -> 
-                EvalInner tm
-        
-        let res = EvalOuterWithPostProcess body 
-        unbox res
-
-
-    //-------------------------------------------------------------------------
-    // Nullable utilities for F#
-
-(*
-
-    /// This operator compares Nullable values with non-Nullable values using
-    /// structural comparison
-    []
-    let (>=?!) (x : Nullable<'T1>) (y: 'T1) = 
-        x.HasValue && x.Value >= y
-
-    []
-    let (>?!) (x : Nullable<'T1>) (y: 'T1) = 
-        x.HasValue && x.Value > y
-
-    []
-    let (<=?!) (x : Nullable<'T1>) (y: 'T1) = 
-        not x.HasValue || x.Value <= y
-
-    []
-    let () (y: 'T1) = 
-        not x.HasValue || x.Value < y
-
-    []
-    let (=?!) (x : Nullable<'T1>) (y: 'T1) = 
-        x.HasValue && x.Value = y
-
-    []
-    let (<>?!) (x : Nullable<'T1>) (y: 'T1) = 
-        not x.HasValue or x.Value <> y
-
-    /// This overloaded operator divides Nullable values by non-Nullable values
-    /// using the overloaded operator "/".  Inlined to allow use over any type,
-    /// as this resolves the overloading on "/".
-    []
-    let inline (/?!) (x : Nullable<'T1>) (y: 'T1) = 
-        if x.HasValue then new Nullable<'T1>(x.Value / y)
-        else x
-
-    /// This overloaded operator adds Nullable values by non-Nullable values
-    /// using the overloaded operator "+".  Inlined to allow use over any type,
-    /// as this resolves the overloading on "+".
-    []
-    let inline (+?!) (x : Nullable<'T1>) (y: 'T1) = 
-        if x.HasValue then new Nullable<'T1>(x.Value + y)
-        else x
-
-    /// This overloaded operator adds Nullable values by non-Nullable values
-    /// using the overloaded operator "-".  Inlined to allow use over any type,
-    /// as this resolves the overloading on "-".
-    []
-    let inline (-?!) (x : Nullable<'T1>) (y: 'T1) = 
-        if x.HasValue then new Nullable<'T1>(x.Value - y)
-        else x
-
-    /// This overloaded operator adds Nullable values by non-Nullable values
-    /// using the overloaded operator "*".  Inlined to allow use over any type,
-    /// as this resolves the overloading on "*".
-    []
-    let inline ( *?!) (x : Nullable<'T1>) (y: 'T1) = 
-        if x.HasValue then new Nullable<'T1>(x.Value * y)
-        else x
-
-    /// This overloaded operator adds Nullable values by non-Nullable values
-    /// using the overloaded operator "%".  Inlined to allow use over any type,
-    /// as this resolves the overloading on "%".
-    []
-    let inline ( %?!) (x : Nullable<'T1>) (y: 'T1) = 
-        if x.HasValue then new Nullable<'T1>(x.Value % y)
-        else x
-
-*)
-
-    let SQL x = query x
-
-
-    
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/LinqQueries.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/LinqQueries.fsi
deleted file mode 100644
index 019d0a7a..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/LinqQueries.fsi
+++ /dev/null
@@ -1,96 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.Linq
-
-    open System
-
-    module Query =
-
-        /// Evaluate the quotation expression by first converting to a LINQ expression tree
-        /// making use of IQueryable operators and then executing expression tree
-        ///
-        /// Exceptions: InvalidArgumentException will be raised if the input expression is
-        /// not in the subset that can be converted to a LINQ expression tree
-        val query : Quotations.Expr<'T> -> 'T
-
-
-        /// When used in queries, this operator corresponds to the LINQ Min operator and the query convertor recognises it as such
-        /// It differs in return type from Seq.min_by
-        val contains : 
-            key:'T -> 
-            source:seq<'T> -> 
-               bool
-
-        /// When used in queries, this operator corresponds to the LINQ Min operator and the query convertor recognises it as such
-        /// It differs in return type from Seq.min_by
-        val minBy : 
-            keySelector:('T -> 'Key) -> 
-            source:seq<'T> -> 
-               'Key
-
-        /// When used in queries, this operator corresponds to the LINQ Max operator and the query convertor recognises it as such
-        /// It differs in return type from Seq.max_by
-        val maxBy : 
-            keySelector:('T -> 'Key) -> 
-            source:seq<'T> -> 
-               'Key
-
-        /// When used in queries, this operator corresponds to the LINQ Join operator and the query convertor recognises it as such
-        val groupBy : 
-            keySelector:('T -> 'Key) -> 
-            source:seq<'T> -> 
-               seq>
-
-        /// This join operator corresponds to the LINQ Join operator and the query convertor recognises it as such
-        val join : 
-            outerSource:seq<'Outer> -> 
-            innerSource:seq<'Inner> -> 
-            outerKeySelector:('Outer -> 'Key) -> 
-            innerKeySelector:('Inner -> 'Key) -> 
-            resultSelector:('Outer -> 'Inner -> 'Result) ->
-               seq<'Result>
-
-
-        /// This join operator implements the LINQ GroupJoin operator and the query convertor recognises it as such
-        val groupJoin : 
-            outerSource:seq<'Outer> -> 
-            innerSource:seq<'Inner> -> 
-            outerKeySelector:('Outer -> 'Key) -> 
-            innerKeySelector:('Inner -> 'Key) -> 
-            resultSelector:('Outer -> seq<'Inner> -> 'Result) ->
-               seq<'Result>
-
-        /// When used in queries, this operator corresponds to the LINQ Min operator and the query convertor recognises it as such
-        /// It differs in return type from Seq.min_by
-        []
-        val min_by : 
-            keySelector:('T -> 'Key) -> 
-            source:seq<'T> -> 
-               'Key
-
-        /// When used in queries, this operator corresponds to the LINQ Max operator and the query convertor recognises it as such
-        /// It differs in return type from Seq.max_by
-        []
-        val max_by : 
-            keySelector:('T -> 'Key) -> 
-            source:seq<'T> -> 
-               'Key
-
-        /// When used in queries, this operator corresponds to the LINQ Join operator and the query convertor recognises it as such
-        []
-        val group_by : 
-            keySelector:('T -> 'Key) -> 
-            source:seq<'T> -> 
-               seq>
-
-
-        /// This join operator implements the LINQ GroupJoin operator and the query convertor recognises it as such
-        []
-        val group_join : 
-            outerSource:seq<'Outer> -> 
-            innerSource:seq<'Inner> -> 
-            outerKeySelector:('Outer -> 'Key) -> 
-            innerKeySelector:('Inner -> 'Key) -> 
-            resultSelector:('Outer -> seq<'Inner> -> 'Result) ->
-               seq<'Result>
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/assemblyinfo.FSharp.PowerPack.Linq.dll.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/assemblyinfo.FSharp.PowerPack.Linq.dll.fs
deleted file mode 100644
index adc1042a..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Linq/assemblyinfo.FSharp.PowerPack.Linq.dll.fs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Microsoft.FSharp
-open System.Reflection
-[]
-[]
-[]
-[]
-[]
-do()
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.fsproj
deleted file mode 100644
index cec5583b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/FSharp.PowerPack.Metadata.fsproj
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-   ..\..  
-  
-  
-  
-    Debug
-    AnyCPU
-    2.0
-    {816cb737-0648-4889-8662-54484d42824d}
-    Library
-    FSharp.PowerPack.Metadata
-    true
-    v3.5
-    STANDALONE_METADATA;INCLUDE_METADATA_READER;$(DefineConstants)
-    FSharp.PowerPack.Linq.xml
-    $(DisabledWarnings);9;62
-  
-  
-  
-    --generatehtml --htmloutputdir:..\..\..\src\WWW\microsoft.com\projects\fsharp\manual --htmlnamespacefile:namespaces.html --htmllocallinks  --htmlnamespacefileappend
-  
-  
-  
-  
-    
-      assemblyinfo.FSharp.PowerPack.Metadata.dll.fs
-    
-    
-    
-      PrettyNaming.fs
-    
-    
-      il.ml
-    
-    
-      tast.ml
-    
-    
-      pickle.ml
-    
-    
-      CompilerLocationUtils.fs
-    
-    
-    
-    
-  
-  
-    
-    
-      System.Core
-      System.Core.dll
-    
-    
-      {DED3BBD7-53F4-428A-8C9F-27968E768605}
-      FSharp.Core
-    
-  
-  
-  
-  
-
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/Metadata.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/Metadata.fs
deleted file mode 100644
index 27c87749..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/Metadata.fs
+++ /dev/null
@@ -1,628 +0,0 @@
-// Copyright (c) Microsoft Corporation 2005-2008.
-// This sample code is provided "as is" without warranty of any kind. 
-// We disclaim all warranties, either express or implied, including the 
-// warranties of merchantability and fitness for a particular purpose. 
-//
-
-
-namespace FSharp.PowerPack.Metadata
-
-open System.IO
-open System.Collections.Generic
-open System.Reflection
-open FSharp.PowerPack.Metadata.Reader.Internal
-open FSharp.PowerPack.Metadata.Reader.Internal.AbstractIL.IL
-open FSharp.PowerPack.Metadata.Reader.Internal.Tast
-open FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-open FSharp.PowerPack.Metadata.Reader.Internal.Pickle
-
-module Impl = 
-
-    let readToEnd (s : Stream) = 
-        let n = int s.Length 
-        let res = Array.zeroCreate n 
-        let mutable i = 0 
-        while (i < n) do 
-            i <- i + s.Read(res,i,n - i) 
-        res 
-        
-    let makeReadOnlyCollection (arr:seq<'a>) = System.Collections.ObjectModel.ReadOnlyCollection<_>(Seq.to_array arr)
-    
-    let makeXmlDoc (XmlDoc x) = makeReadOnlyCollection(x)
-    
-    let isPublic a = (taccessPublic = a)
-
-open Impl
-
-type [] Env(typars:Typar list) = 
-   let typars = Array.of_list typars
-   member x.Typars = typars
-
-type [] Range(range:range) = 
-   member x.Document    = range.rangeFile
-   member x.StartLine   = range.rangeBegin.posLine
-   member x.StartColumn = range.rangeBegin.posCol
-   member x.EndLine     = range.rangeEnd.posLine
-   member x.EndColumn   = range.rangeEnd.posCol
-
-
-type [] AssemblyLoader() = 
-    static let table = Dictionary(100)
-     
-    static let fslib = AssemblyLoader.Add("FSharp.Core", typedefof>.Assembly)
-     
-    static let globals = 
-        let p = [| "Microsoft"; "FSharp"; "Core" |]
-        { nativeptr_tcr = mk_nonlocal_tcref (NLPath(fslib.RawCcuThunk,p)) "nativeptr`1" 
-          nativeint_tcr= mk_nonlocal_tcref (NLPath(fslib.RawCcuThunk,p)) "nativeint" 
-          byref_tcr= mk_nonlocal_tcref (NLPath(fslib.RawCcuThunk,p)) "byref`1" 
-          il_arr1_tcr= mk_nonlocal_tcref (NLPath(fslib.RawCcuThunk,p)) "[]`1" 
-          il_arr2_tcr= mk_nonlocal_tcref (NLPath(fslib.RawCcuThunk,p)) "[,]`1" 
-          il_arr3_tcr= mk_nonlocal_tcref (NLPath(fslib.RawCcuThunk,p)) "[,,]`1" 
-          il_arr4_tcr= mk_nonlocal_tcref (NLPath(fslib.RawCcuThunk,p)) "[,,,]`1" 
-          unit_tcr= mk_nonlocal_tcref (NLPath(fslib.RawCcuThunk,p)) "unit"  }
-
-
-    static member FSharpLibrary with get()  = fslib
-    static member TcGlobals with get() = globals
-
-    
-    static member TryLoad(name:string) : FSharpAssembly option = 
-        if table.ContainsKey(name) then 
-            Some(FSharpAssembly(table.[name]))
-        else
-            let assembly = Assembly.Load(name)
-            AssemblyLoader.TryAdd(name,assembly)
-
-    static member Add(name,assembly:Assembly) : FSharpAssembly = 
-        match AssemblyLoader.TryAdd(name,assembly) with 
-        | None -> invalidArg "name" (sprintf "could not produce an FSharpAssembly object for the assembly '%s' because this is not an F# assembly" name)
-        | Some res -> res
-
-    static member TryAdd(name,assembly:Assembly) : FSharpAssembly option = 
-        let sref : ILScopeRef = ILScopeRef.Assembly(ILAssemblyRef.FromAssembly(assembly)) 
-        match assembly.GetManifestResourceStream(FSharpSignatureDataResourceName ^ "." ^ name) with 
-        | null -> None
-
-        | resourceStream ->
-            let bytes = resourceStream |> readToEnd
-            let data = unpickle_obj_with_dangling_ccus assembly.FullName sref UnpickleModuleInfo bytes
-            let info = data.RawData
-            let ccuData = 
-                { ccu_scoref=sref;
-                  ccu_stamp = new_stamp();
-                  ccu_filename = None; 
-                  ccu_qname= Some(sref.QualifiedName);
-                  ccu_code_dir = info.compile_time_working_dir; 
-                  ccu_fsharp=true;
-                  ccu_contents = info.mspec; 
-                  ccu_usesQuotations = info.usesQuotations;
-                  ccu_forwarders = lazy Map.empty }
-                    
-            let ccu = CcuThunk.Create(name, ccuData)
-            table.[name] <- ccu
-            let info = data.OptionalFixup(fun nm -> match AssemblyLoader.TryLoad(nm) with Some x -> Some(x.RawCcuThunk) | _ -> None )
-            Some(FSharpAssembly(ccu))
-        
-
-and [] FSharpAssembly(ccu: CcuThunk) = 
-
-    member x.RawCcuThunk = ccu
-
-    static member FSharpLibrary with get() = AssemblyLoader.FSharpLibrary
-    
-    static member FromAssembly(assembly:Assembly) : FSharpAssembly = 
-        AssemblyLoader.Add(assembly.GetName().Name , assembly)
-    
-    static member FromFile(fileName) =
-        let assembly = Assembly.LoadFrom(fileName)
-        FSharpAssembly.FromAssembly(assembly)
-    
-    member x.QualifiedName = ccu.QualifiedName.Value
-      
-    member x.CodeLocation = ccu.SourceCodeDirectory
-      
-    member x.ReflectionAssembly = Assembly.Load(x.QualifiedName)
-    member x.GetEntity(name:string) = 
-        let path = name.Split [| '.' |]
-        if path.Length = 0 then invalidArg "name" "bad entity name"
-        let path1 = path.[0..path.Length-2] 
-        let nm = path.[path.Length-1]
-        let tcref  = mk_nonlocal_tcref (NLPath(ccu,path1)) nm
-        FSharpEntity(tcref)
-      
-    member x.Entities = 
-        let rec loop(entity:Entity) = 
-            [| if entity.IsNamespace then 
-                  for KeyValue(_,entity) in entity.ModuleOrNamespaceType.AllEntities do 
-                      yield! loop entity
-               elif isPublic entity.Accessibility  then
-                   yield FSharpEntity(mk_local_tcref entity) 
-               else
-                   () |]
-        [| for KeyValue(_,entity) in ccu.TopModulesAndNamespaces do 
-              yield! loop entity |] |> makeReadOnlyCollection
-                 
-
-and [] FSharpEntity(v:EntityRef) = 
-    let isExternal() = 
-        match v with 
-        | ERef_nonlocal nlr -> 
-            match nlr.nlr_nlpath with 
-            | (NLPath(ccu,_)) -> ccu.IsUnresolvedReference
-        | _ -> 
-           false
-
-    let isUnresolved() = 
-        not (isExternal()) && v.TryDeref.IsNone 
-
-    let poorQualifiedName() = v.nlr.nlr_nlpath.DisplayName + "." + v.nlr.nlr_item + ", "  + v.nlr.nlr_nlpath.AssemblyName
-
-    let checkIsFSharp() = 
-        if isExternal() then invalidOp (sprintf "The entity '%s' is external to F#. This operation may only be performed on an entity from an F# assembly" (poorQualifiedName()))
-        if isUnresolved() then invalidOp (sprintf "The entity '%s' does not exist or is in an unresolved assembly." (poorQualifiedName()))
-
-    static member FromType (ty: System.Type) = 
-        let assembly = ty.Assembly
-        let fassembly = FSharpAssembly.FromAssembly assembly
-        let gty = (if ty.IsGenericType then ty.GetGenericTypeDefinition() else ty)
-        let path = (if ty.IsGenericType then ty.GetGenericTypeDefinition() else ty).FullName.Split [| '.' |]
-        let path1 = if path.Length = 0 then [| |] else path.[0..path.Length-2] 
-        let nm = if path.Length = 0 then gty.Name else path.[path.Length-1]
-        let tcref  = mk_nonlocal_tcref (NLPath(fassembly.RawCcuThunk,path1)) nm
-        FSharpEntity(tcref)
-
-    member x.Name = checkIsFSharp(); v.MangledName
-
-    member x.QualifiedName = 
-        if isExternal() || isUnresolved() then 
-            poorQualifiedName()     
-        else            
-            if v.IsTypeAbbrev then invalidOp (sprintf "the type abbreviation '%s' does not have a qualified name" x.Name)
-            match v.CompiledRepresentation with 
-            | TyrepNamed(tref,_) -> tref.QualifiedName
-            | TyrepOpen _ -> invalidOp (sprintf "the type %s does not have a qualified name" x.Name)
-        
-
-    member x.Range = checkIsFSharp(); Range(v.Range)
-
-    member x.GenericParameters= 
-        checkIsFSharp(); 
-        let env = Env(v.TyparsNoRange)
-        v.TyparsNoRange |> List.map (fun tp -> FSharpGenericParameter(env,tp)) |> List.to_array |> makeReadOnlyCollection
-
-    member x.IsMeasure = checkIsFSharp(); (v.TypeOrMeasureKind = KindMeasure)
-    member x.IsModule = checkIsFSharp(); v.IsModule
-    member x.HasFSharpModuleSuffix = checkIsFSharp(); v.IsModule && (v.ModuleOrNamespaceType.ModuleOrNamespaceKind = ModuleOrNamespaceKind.FSharpModuleWithSuffix)
-    member x.IsStruct  = checkIsFSharp(); v.IsStructTycon
-
-#if TODO
-    member x.IsClass = (not v.IsNamespace && not v.IsModule && v.TypeOrMeasureKind = TyparKind.KindType)
-    member x.IsInterface = (not v.IsNamespace && not v.IsModule && v.TypeOrMeasureKind = TyparKind.KindType)
-    member x.IsDelegate : bool
-    member x.IsAbstract : bool;                       
-    member x.IsEnum : bool
-#endif
-    
-    member x.IsExceptionDeclaration = checkIsFSharp(); v.IsExceptionDecl
-
-    member x.IsExternal = 
-        // Don't call this: checkIsFSharp()   -- this one is valid on non-F# types
-        isExternal()
-
-    member x.IsAbbreviation = checkIsFSharp(); v.IsTypeAbbrev 
-
-    member x.GetReflectionType() = 
-        // Don't call this: checkIsFSharp()   -- this one is valid on non-F# types
-        System.Type.GetType(x.QualifiedName) 
-
-    member x.HasAssemblyCodeRepresentation = 
-        checkIsFSharp(); 
-        v.IsAsmReprTycon || v.IsMeasureableReprTycon
-
-
-#if TODO
-    member x.GetAssemblyCodeRepresentation : unit -> string 
-    // member TyconDelegateSlotSig : SlotSig option
-    member x.Accessibility: FSharpAccessibility; 
-    member x.RepresentationAccessibility: FSharpAccessibility;
-      
-
-#endif
-
-      /// Interface implementations - boolean indicates compiler-generated 
-    member x.Implements = 
-        checkIsFSharp(); 
-        let env = Env(v.TyparsNoRange)
-        v.TypeContents.tcaug_implements |> List.map (fun (ty,_,_) -> FSharpType(env,ty)) |> makeReadOnlyCollection
-
-      /// Super type, if any 
-    member x.BaseType = 
-        checkIsFSharp(); 
-        let env = Env(v.TyparsNoRange)
-        match v.TypeContents.tcaug_super with 
-        | None -> failwith "has no base type"
-        | Some ty -> FSharpType(env,ty)
-        
-      /// Indicates the type prefers the "tycon<a,b>" syntax for display etc. 
-    member x.UsesPrefixDisplay = 
-        checkIsFSharp(); 
-        v.Deref.Data.entity_uses_prefix_display
-
-
-      /// Properties, methods etc. with implementations
-    member x.MembersOrValues = 
-        checkIsFSharp(); 
-        ((v.TypeContents.tcaug_adhoc 
-          |> NameMultiMap.range 
-          |> List.filter (fun v -> not v.MemberInfo.Value.MemberFlags.MemberIsOverrideOrExplicitImpl) 
-          |> List.map (fun x -> FSharpMemberOrVal(x.Deref)))
-        @
-         (v.ModuleOrNamespaceType.AllValuesAndMembers 
-          |> NameMap.range 
-          |> List.filter (fun v -> not v.IsMember) 
-          |> List.filter (fun x -> isPublic x.Accessibility) 
-          |> List.map (fun x -> FSharpMemberOrVal(x))))
-           
-          |> makeReadOnlyCollection
-
-    member x.XmlDoc = 
-        checkIsFSharp(); 
-        v.XmlDoc |> makeXmlDoc
-
-    member x.NestedEntities = 
-        checkIsFSharp(); 
-        v.ModuleOrNamespaceType.AllEntities 
-        |> NameMap.range 
-        |> List.filter (fun x -> isPublic x.Accessibility) 
-        |> List.map (fun x -> FSharpEntity(mk_local_tcref x)) 
-        |> makeReadOnlyCollection
-
-    member x.UnionCases = 
-        checkIsFSharp(); 
-        let env = Env(v.TyparsNoRange)
-        v.UnionCasesAsList 
-        |> List.filter (fun x -> isPublic x.Accessibility) 
-        |> List.map (fun x -> FSharpUnionCase(env,x)) 
-        |> makeReadOnlyCollection
-
-    member x.RecordFields =
-        checkIsFSharp(); 
-        let env = Env(v.TyparsNoRange)
-        v.AllFieldsAsList 
-        |> List.filter (fun x -> isPublic x.Accessibility) 
-        |> List.map (fun x -> FSharpRecordField(env,x)) 
-        |> makeReadOnlyCollection
-
-    member x.AbbreviatedType   = 
-        checkIsFSharp(); 
-        let env = Env(v.TyparsNoRange)
-        match v.TypeAbbrev with 
-        | None -> failwith "not a type abbreviation"
-        | Some ty -> FSharpType(env,ty)
-
-    member x.Attributes = 
-        checkIsFSharp(); 
-        v.Attribs |> List.map (fun a -> FSharpAttribute(a)) |> makeReadOnlyCollection
-
-and [] FSharpUnionCase(env:Env,v: UnionCase) =
-    member x.Name = v.DisplayName
-    member x.Range = Range(v.Range)
-    member x.Fields = v.RecdFields |> List.map (fun r -> FSharpRecordField(env,r)) |> List.to_array |> makeReadOnlyCollection
-    member x.ReturnType = FSharpType(env,v.ucase_rty)
-    member x.CompiledName = v.ucase_il_name
-    member x.XmlDoc = v.ucase_xmldoc |> makeXmlDoc
-    member x.Attributes = v.Attribs |> List.map (fun a -> FSharpAttribute(a)) |> makeReadOnlyCollection
-    //member x.Accessibility: FSharpAccessibility; 
-
-and [] FSharpRecordField(env:Env,v: RecdField) =
-    member x.IsMutable = v.IsMutable
-    member x.XmlDoc = v.rfield_xmldoc |> makeXmlDoc
-    member x.Type = FSharpType(env,v.FormalType)
-    member x.IsStatic = v.IsStatic
-    member x.Name = v.Name
-    member x.IsCompilerGenerated = v.IsCompilerGenerated
-    member x.Range = Range(v.Range)
-    member x.FieldAttributes = v.FieldAttribs |> List.map (fun a -> FSharpAttribute(a)) |> makeReadOnlyCollection
-    member x.PropertyAttributes = v.PropertyAttribs |> List.map (fun a -> FSharpAttribute(a)) |> makeReadOnlyCollection
-    //member x.LiteralValue = v.Is
-    //member x.Accessibility: FSharpAccessibility; 
-
-and [] FSharpAccessibility() = 
-    //member x.IsPublic : bool
-    //member x.IsPrivate : bool
-    //member x.IsInternal : bool
-    
-and [] FSharpGenericParameter(env:Env,v:Typar) = 
-
-    member x.Name = v.DisplayName
-    member x.Range = Range(v.Range)
-       
-    member x.IsMeasure = (v.Kind = TyparKind.KindMeasure)
-
-    member x.XmlDoc = v.Data.typar_xmldoc |> makeXmlDoc
-
-    member x.IsSolveAtCompileTime = (v.StaticReq = TyparStaticReq.HeadTypeStaticReq)
-       
-    member x.Attributes = v.Attribs |> List.map (fun a -> FSharpAttribute(a)) |> makeReadOnlyCollection
-
-    //member x.Constraints: FSharpGenericParameterConstraint[]; 
-
-and [] FSharpGenericParameterConstraint() = 
-(*
-    /// Indicates a constraint that a type is a subtype of the given type 
-    member x.IsCoercesToType : bool
-    member x.GetCoercesToTypeTarget : unit -> FSharpType 
-
-    /// Indicates a default value for an inference type variable should it be netiher generalized nor solved 
-    member x.IsDefaultsToType : bool
-    member x.GetDefaultsToTypePriority : unit -> int
-    member x.GetDefaultsToTypeTarget : unit -> FSharpType
-
-    /// Indicates a constraint that a type has a 'null' value 
-    member x.IsSupportsNull  : bool
-
-    /// Indicates a constraint that a type has a member with the given signature 
-    member x.IsMayResolveMemberConstraint : bool
-    member x.GetMayResolveMemberConstraintSources : unit -> FSharpType[] 
-    member x.GetMayResolveMemberConstraintMemberName : string 
-    member x.GetMayResolveMemberConstraintIsStatc : bool
-    member x.GetMayResolveMemberConstraintArgumentType : unit -> FSharpType[] 
-    member x.GetMayResolveMemberConstraintReturnType : unit -> FSharpType 
-
-    /// Indicates a constraint that a type is a non-Nullable value type 
-    member x.IsIsNotNullableValueType : bool
-    
-    /// Indicates a constraint that a type is a reference type 
-    member x.IsIsReferenceType  : bool
-
-    /// Indicates a constraint that a type is a simple choice between one of the given ground types. See format.ml 
-    member x.IsSimpleChoice : bool
-    member x.GetSimpleChoiceChoices : unit -> FSharpType[]
-
-    /// Indicates a constraint that a type has a parameterless constructor 
-    member x.IsRequiresDefaultConstructor  : bool
-
-    /// Indicates a constraint that a type is an enum with the given underlying 
-    member x.IsIsEnum : bool
-    member x.GetIsEnumUnderlying : unit -> FSharpType 
-    
-    /// Indicates a constraint that a type is a delegate from the given tuple of args to the given return type 
-    member x.IsIsDelegate : bool
-    member x.GetIsDelegateArgumentType : unit -> FSharpType 
-    member x.GetIsDelegateReturnType : unit -> FSharpType 
-*)
-    
-and FSharpInlineAnnotation = 
-   | PsuedoValue = 3
-   | AlwaysInline = 2
-   | OptionalInline = 1
-   | NeverInline = 0
-
-and [] FSharpMemberOrVal(v:Val) = 
-
-    let g = AssemblyLoader.TcGlobals
-    let is_unit_typ ty = 
-        match ty with 
-        | TType_app (tcr,_) -> prim_tcref_eq false AssemblyLoader.FSharpLibrary.RawCcuThunk g.unit_tcr tcr 
-        | _ -> false
-
-    let is_fun_typ ty = match ty with TType_fun _ -> true | _ -> false
-    let dest_fun_typ ty = match ty with TType_fun (d,r) -> (d,r) | _ -> failwith "dest_fun_typ"
-    let dest_tuple_typ ty = if is_unit_typ ty then [] else match ty with TType_tuple tys -> tys | _ -> [ty]
-
-    let rec strip_fun_typ_upto n ty = 
-        assert (n >= 0);
-        if n > 0 && is_fun_typ ty then 
-            let (d,r) = dest_fun_typ ty
-            let more,rty = strip_fun_typ_upto (n-1) r in d::more, rty
-        else [],ty
-
-    (* A 'tau' type is one with its type paramaeters stripped off *)
-    let GetTopTauTypeInFSharpForm (curriedArgInfos: TopArgInfo list list) tau m =
-
-        let argtys,rty = strip_fun_typ_upto curriedArgInfos.Length tau
-
-        if curriedArgInfos.Length <> argtys.Length then 
-            error(Error("Invalid member signature encountered because of an earlier error",m))
-
-        let argtysl = 
-            (curriedArgInfos,argtys) ||> List.map2 (fun argInfos argty -> 
-                match argInfos with 
-                | [] -> [] //else [ (mk_unit_typ g, TopValInfo.unnamedTopArg1) ]
-                | [argInfo] -> [ (argty, argInfo) ]
-                | _ -> List.zip (dest_tuple_typ argty) argInfos) 
-        argtysl,rty
-
-    member x.MangledName = v.MangledName
-    member x.Range = Range(v.Range)
-
-    member x.GenericParameters = 
-        let env = Env(v.Typars)
-        v.Typars |> List.map (fun tp -> FSharpGenericParameter(env,tp)) |> List.to_array |> makeReadOnlyCollection
-
-    member x.Type = 
-        FSharpType(Env(v.Typars),v.TauType)
-
-    member x.IsCompilerGenerated = v.IsCompilerGenerated
-
-    member x.InlineAnnotation = 
-        match v.InlineInfo with 
-        | ValInlineInfo.PseudoValue -> FSharpInlineAnnotation.PsuedoValue
-        | ValInlineInfo.AlwaysInline -> FSharpInlineAnnotation.AlwaysInline
-        | ValInlineInfo.OptionalInline -> FSharpInlineAnnotation.OptionalInline
-        | ValInlineInfo.NeverInline -> FSharpInlineAnnotation.NeverInline
-
-    member x.IsMutable = v.IsMutable
-
-    member x.IsModuleValueOrMember = v.IsMember || v.IsModuleBinding
-
-    member x.IsExtensionMember = v.IsExtensionMember
-
-    member x.IsImplicitConstructor = v.IsIncrClassConstructor
-    
-    member x.IsTypeFunction = v.IsTypeFunction
-
-    member x.CompiledName = v.CompiledName
-
-    member x.XmlDoc = makeXmlDoc(v.XmlDoc)
-
-
-    member x.CurriedParameterGroups = 
-        let env = Env(v.Typars)
-        match v.TopValInfo with 
-        | None -> failwith "not a module let binding or member"
-        | Some (TopValInfo(typars,curriedArgInfos,retInfo)) -> 
-            let tau = v.TauType
-            let argtysl,_ = GetTopTauTypeInFSharpForm curriedArgInfos tau range0
-            let argtysl = if v.IsInstanceMember then argtysl.Tail else argtysl
-            
-            [ for argtys in argtysl do 
-                 yield 
-                   [ for argty, argInfo in argtys do 
-                        yield FSharpParameter(env,argty,argInfo) ] 
-                   |> makeReadOnlyCollection ]
-             |> makeReadOnlyCollection
-
-        
-    member x.ReturnParameter  = 
-
-        let env = Env(v.Typars)
-        match v.TopValInfo with 
-        | None -> failwith "not a module let binding or member"; 
-        | Some (TopValInfo(typars,argInfos,retInfo)) -> 
-        
-            let tau = v.TauType
-            let _,rty = GetTopTauTypeInFSharpForm argInfos tau range0
-            
-            FSharpParameter(env,rty,retInfo) 
-
-
-    member x.Attributes = v.Attribs |> List.map (fun a -> FSharpAttribute(a)) |> makeReadOnlyCollection
-     
-(*
-    /// Is this "base" in "base.M(...)"
-    member x.IsBaseValue : bool
-
-    /// Is this the "x" in "type C() as x = ..."
-    member x.IsConstructorThisValue : bool
-
-    /// Is this the "x" in "member x.M = ..."
-    member x.IsMemberThisValue : bool
-
-    /// Is this a [<Literal>] value, and if so what value?
-    member x.LiteralValue : obj // may be null
-
-      /// How visible is this? 
-    member x.Accessibility : FSharpAccessibility
-
-      /// Get the module, type or namespace where this value appears. For 
-      /// an extension member this is the type being extended 
-    member x.ApparentParent: FSharpEntity
-
-     /// Get the module, type or namespace where this value is compiled
-    member x.ActualParent: FSharpEntity;
-
-*)
-
-
-and [] FSharpType(env:Env, typ:typ) =
-
-    member x.IsNamed = (match typ with TType_app _ -> true | _ -> false)
-    member x.IsTuple = (match typ with TType_tuple _ -> true | _ -> false)
-
-    member x.NamedEntity = 
-        match typ with 
-        | TType_app (tcref,_) -> FSharpEntity(tcref) 
-        | _ -> invalidOp "not a named type"
-
-    member x.GenericArguments = 
-        match typ with 
-        | TType_app (_,tyargs) 
-        | TType_tuple (tyargs) -> (tyargs |> List.map (fun ty -> FSharpType(env,ty)) |> makeReadOnlyCollection) 
-        | TType_fun(d,r) -> [| FSharpType(env,d); FSharpType(env,r) |] |> makeReadOnlyCollection
-        | _ -> invalidOp "not a named type"
-
-
-    member x.IsFunction = (match typ with TType_fun _ -> true | _ -> false)
-
-    member x.IsGenericParameter= 
-        match typ with 
-        | TType_var _ -> true 
-        | TType_measure (MeasureVar _) -> true 
-        | _ -> false
-
-    member x.GenericParameter = 
-        match typ with 
-        | TType_var tp 
-        | TType_measure (MeasureVar tp) -> 
-            FSharpGenericParameter (env, env.Typars |> Array.find (fun tp2 -> typar_ref_eq tp tp2)) 
-        | _ -> invalidOp "not a generic parameter type"
-
-    member x.GenericParameterIndex = 
-        match typ with 
-        | TType_var tp 
-        | TType_measure (MeasureVar tp) -> 
-            env.Typars |> Array.findIndex (fun tp2 -> typar_ref_eq tp tp2)
-        | _ -> invalidOp "not a generic parameter type"
-
-    //member IsMeasureProduct : bool
-    //member GetMeasureProductLeft : FSharpType
-    //member GetMeasureProductRight : FSharpType
-
-    //member IsMeasureInverse : bool
-    //member GetMeasureProductInverse : FSharpType
-
-    //member IsMeasureOne : bool
-
-and [] FSharpAttribute(attrib) = 
-
-    let (Attrib(tcref,kind,unnamedArgs,propVals,m)) = attrib
-
-    member x.GetReflectionType() : System.Type = 
-        match kind with 
-        | ILAttrib(mspec) -> 
-            System.Type.GetType(mspec.EnclosingTypeRef.QualifiedName)
-        | FSAttrib(vref) -> 
-            System.Type.GetType(tcref.CompiledRepresentationForTyrepNamed.QualifiedName)
-
-    member x.Value = 
-        let ty = x.GetReflectionType()
-        let fail() = failwith "This custom attribute has an argument that can not yet be converted using this API"
-        let evalArg e = 
-            match e with
-            | TExpr_const(c,m,_) -> 
-                match c with 
-                | TConst_bool b -> box b
-                | TConst_sbyte  i  -> box i
-                | TConst_int16  i  -> box  i
-                | TConst_int32 i   -> box i
-                | TConst_int64 i   -> box i  
-                | TConst_byte i    -> box i
-                | TConst_uint16 i  -> box i
-                | TConst_uint32 i  -> box i
-                | TConst_uint64 i  -> box i
-                | TConst_float i   -> box i
-                | TConst_float32 i -> box i
-                | TConst_char i    -> box i
-                | TConst_zero -> null
-                | TConst_string s ->  box s
-                | _ -> fail()
-            | _ -> fail()
-        let args = unnamedArgs |> List.map (fun (AttribExpr(_,e)) -> evalArg e)
-        let res = System.Activator.CreateInstance(ty,args)
-        propVals |> List.iter (fun (AttribNamedArg(nm,_,isField,AttribExpr(_, e))) -> 
-            ty.InvokeMember(nm,BindingFlags.Public ||| BindingFlags.NonPublic ||| (if isField then BindingFlags.SetField else BindingFlags.SetProperty),
-                            null,res,[| evalArg e |]) |> ignore)
-        res
-        
-
-    
-and [] FSharpParameter(env:Env,typ:typ,topArgInfo:TopArgInfo) = 
-    let (TopArgInfo(attribs,idOpt)) = topArgInfo
-    member x.Name = match idOpt with None -> null | Some v -> v.idText
-    member x.Type = FSharpType(env,typ)
-    member x.Range = Range(match idOpt with None -> range0 | Some v -> v.idRange)
-    member x.Attributes = attribs |> List.map (fun a -> FSharpAttribute(a)) |> makeReadOnlyCollection
-    
-    
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/Metadata.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/Metadata.fsi
deleted file mode 100644
index d2f7bcd0..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/Metadata.fsi
+++ /dev/null
@@ -1,376 +0,0 @@
-// (c) Microsoft Corporation 2005-2009
-namespace FSharp.PowerPack.Metadata
-
-open System.Collections.ObjectModel
-
-type [] Range = 
-   member Document : string
-   member StartLine : int
-   member StartColumn : int
-   member EndLine : int
-   member EndColumn : int
-     
-type [] FSharpAssembly = 
-
-    /// Get the object representing the F# core library (FSharp.Core.dll) for the running program
-    static member FSharpLibrary : FSharpAssembly
-
-    /// This is one way of starting the loading process off. Dependencies are automatically
-    /// resolved by calling System.Reflection.Assembly.Load.
-    static member FromAssembly : System.Reflection.Assembly -> FSharpAssembly
-
-    /// This is one way of starting the loading process off. 
-    static member FromFile : fileName: string (* * loader:System.Func *) -> FSharpAssembly
-
-    /// Holds the full qualified assembly name
-    member QualifiedName: string; 
-    
-    /// Return the System.Reflection.Assembly object for the assembly
-    member ReflectionAssembly: System.Reflection.Assembly
-      
-    /// Return the System.Reflection.Assembly object for the assembly
-    member GetEntity : string -> FSharpEntity
-      
-      /// A hint as to where does the code for the CCU live (e.g what was the tcConfig.implicitIncludeDir at compilation time for this DLL?) 
-    member CodeLocation: string; 
-      
-      /// A handle to the full specification of the contents of the module contained in this Assembly 
-    member Entities:  ReadOnlyCollection
-
-and [] FSharpEntity = 
-
-      /// Return the FSharpEntity corresponding to a .NET type
-    static member FromType : System.Type -> FSharpEntity
-
-      /// The name of the type, possibly with `n mangling  
-    member Name: string;
-
-      /// Get the fully qualified name of the type or module
-    member QualifiedName: string; 
-
-
-      /// The declaration location for the type constructor 
-    member Range: Range; 
-
-      /// Indicates the type is a measure, type or exception abbreviation
-    member IsAbbreviation   : bool
-
-      /// Indicates the type is a struct
-    member IsStruct  : bool
-
-
-      /// Indicates the entity is an F# module definition
-    member IsModule: bool; 
-
-      /// Get the generic parameters, possibly including unit-of-measure parameters
-    member GenericParameters: ReadOnlyCollection
-
-      /// Indicates that a module is compiled to a class with the given mangled name. The mangling is reversed during lookup 
-    member HasFSharpModuleSuffix : bool
-
-      /// Indicates the entity is a measure definition
-    member IsMeasure: bool;
-
-      /// Indicates an F# exception declaration
-    member IsExceptionDeclaration: bool; 
-
-    /// If true, then this is a reference to something in some .NET assembly from another .NET language
-    member IsExternal : bool
-
-    /// Return the System.Type for the type
-    ///
-    /// Raises InvalidOperationException if the type is an abbreviation or has an assembly code representation.
-    member GetReflectionType : unit -> System.Type  
-
-
-      /// The declared documentation for the type or module 
-    member XmlDoc: ReadOnlyCollection;
-
-      /// Indicates the type is implemented through a mapping to IL assembly code. THis is only
-      /// true for types in FSharp.Core.dll
-    member HasAssemblyCodeRepresentation: bool 
-
-    
-      /// Indicates the type prefers the "tycon<a,b>" syntax for display etc. 
-    member UsesPrefixDisplay: bool;                   
-
-      /// The declared attributes for the type 
-    member Attributes: ReadOnlyCollection;     
-
-      /// Interface implementations - boolean indicates compiler-generated 
-    member Implements : ReadOnlyCollection;  
-
-      /// Base type, if any 
-    member BaseType : FSharpType;
-
-
-      /// Properties, methods etc. with implementations, also values in a module
-    member MembersOrValues : ReadOnlyCollection;
-
-    member NestedEntities : ReadOnlyCollection
-
-      /// The fields of the class, struct or enum 
-    member RecordFields : ReadOnlyCollection
-
-    member AbbreviatedType   : FSharpType 
-
-      /// The cases of a discriminated union
-    member UnionCases : ReadOnlyCollection
-
-
-#if TODO
-      /// Indicates the type is implemented as IL assembly code using a closed type in ILDASM syntax
-      // NOTE: consider returning a System.Type
-    member GetAssemblyCodeRepresentation : unit -> string 
-
-
-    //   /// Indicates the type is a delegate with the given Invoke signature 
-    // member TyconDelegateSlotSig : SlotSig option
-
-
-      /// The declared accessibility of the type
-    member Accessibility: FSharpAccessibility; 
-
-      /// The declared accessibility of the representation, not taking signatures into account 
-    member RepresentationAccessibility: FSharpAccessibility;
-#endif
-      
-
-and [] FSharpUnionCase =
-      /// Name of the case 
-    member Name: string; 
-      /// Range of the name of the case 
-    member Range : Range
-    /// Data carried by the case. 
-    member Fields: ReadOnlyCollection;
-      /// Return type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it 
-    member ReturnType: FSharpType;
-      /// Name of the case in generated IL code 
-    member CompiledName: string;
-      /// Documentation for the case 
-    member XmlDoc: ReadOnlyCollection;
-
-#if TODO
-      ///  Indicates the declared visibility of the union constructor, not taking signatures into account 
-    member Accessibility: FSharpAccessibility; 
-#endif
-      /// Attributes, attached to the generated static method to make instances of the case 
-    member Attributes: ReadOnlyCollection;
-
-and [] FSharpRecordField =
-    /// Is the field declared in F#? 
-    member IsMutable: bool;
-      /// Documentation for the field 
-    member XmlDoc: ReadOnlyCollection;
-      /// The type of the field, w.r.t. the generic parameters of the enclosing type constructor 
-    member Type: FSharpType;
-      /// Indicates a static field 
-    member IsStatic: bool;
-      /// Indicates a compiler generated field, not visible to Intellisense or name resolution 
-    member IsCompilerGenerated: bool;
-      /// Declaration-location of the field 
-    member Range: Range;
-      /// Attributes attached to generated property 
-    member PropertyAttributes: ReadOnlyCollection; 
-      /// Attributes attached to generated field 
-    member FieldAttributes: ReadOnlyCollection; 
-      /// Name of the field 
-    member Name : string
-
-#if TODO
-      /// The default initialization info, for static literals 
-    member LiteralValue: obj; 
-      ///  Indicates the declared visibility of the field, not taking signatures into account 
-    member Accessibility: FSharpAccessibility; 
-#endif
-
-and [] FSharpAccessibility = 
-#if TODO
-    member IsPublic : bool
-    member IsPrivate : bool
-    member IsInternal : bool
-#endif
-    
-and [] FSharpGenericParameter = 
-    member Name: string
-    member Range : Range; 
-       
-    /// Is this a measure variable
-    member IsMeasure : bool
-
-    /// The documentation for the type parameter. 
-    member XmlDoc : ReadOnlyCollection;
-       
-    /// Is this a ^a type variable
-    member IsSolveAtCompileTime : bool 
-
-    /// The declared attributes of the type parameter. 
-    member Attributes: ReadOnlyCollection;                      
-       
-#if TODO
-    /// The declared or inferred constraints for the type parameter
-    member Constraints: ReadOnlyCollection; 
-#endif
-
-
-/// An F# discriminated union, as an object model
-and [] FSharpGenericParameterConstraint = 
-#if TODO
-    /// Indicates a constraint that a type is a subtype of the given type 
-    member IsCoercesToType : bool
-    member GetCoercesToTypeTarget : unit -> FSharpType 
-
-    /// Indicates a default value for an inference type variable should it be netiher generalized nor solved 
-    member IsDefaultsToType : bool
-    member GetDefaultsToTypePriority : unit -> int
-    member GetDefaultsToTypeTarget : unit -> FSharpType
-
-    /// Indicates a constraint that a type has a 'null' value 
-    member IsSupportsNull  : bool
-
-    /// Indicates a constraint that a type has a member with the given signature 
-    member IsMayResolveMemberConstraint : bool
-    member GetMayResolveMemberConstraintSources : unit -> ReadOnlyCollection
-    member GetMayResolveMemberConstraintMemberName : string 
-    member GetMayResolveMemberConstraintIsStatc : bool
-    member GetMayResolveMemberConstraintArgumentType : unit -> ReadOnlyCollection
-    member GetMayResolveMemberConstraintReturnType : unit -> FSharpType 
-
-    /// Indicates a constraint that a type is a non-Nullable value type 
-    member IsIsNotNullableValueType : bool
-    
-    /// Indicates a constraint that a type is a reference type 
-    member IsIsReferenceType  : bool
-
-    /// Indicates a constraint that a type is a simple choice between one of the given ground types. See format.ml 
-    member IsSimpleChoice : bool
-    member GetSimpleChoiceChoices : unit -> ReadOnlyCollection
-
-    /// Indicates a constraint that a type has a parameterless constructor 
-    member IsRequiresDefaultConstructor  : bool
-
-    /// Indicates a constraint that a type is an enum with the given underlying 
-    member IsIsEnum : bool
-    member GetIsEnumUnderlying : unit -> FSharpType 
-    
-    /// Indicates a constraint that a type is a delegate from the given tuple of args to the given return type *)
-    member IsIsDelegate : bool
-    member GetIsDelegateArgumentType : unit -> FSharpType 
-    member GetIsDelegateReturnType : unit -> FSharpType 
-#endif
-
-and FSharpInlineAnnotation = 
-   | PsuedoValue = 3
-   /// Indictes the value is inlined but the code for the function still exists, e.g. to satisfy interfaces on objects, but that it is also always inlined 
-   | AlwaysInline = 2
-   | OptionalInline = 1
-   | NeverInline = 0
-
-and [] FSharpMemberOrVal = 
-    member Range: Range
-    
-    /// The typars of the member or value
-    member GenericParameters: ReadOnlyCollection
-
-    /// The full type of the member or value when used as a first class value
-    member Type: FSharpType
-
-    /// Is this a compiler generated value
-    member IsCompilerGenerated : bool
-
-    /// Is this a must-inline value
-
-    member InlineAnnotation : FSharpInlineAnnotation
-
-    /// Is this a mutable value
-    member IsMutable : bool
-
-    /// Is this a module or member value
-    member IsModuleValueOrMember : bool
-
-    /// Is this an extension member?
-    member IsExtensionMember : bool
-
-    /// Is this an implicit constructor?
-    member IsImplicitConstructor : bool
-    
-    /// Is this an F# type function
-    member IsTypeFunction : bool
-
-      /// The member name in compiled code
-    member CompiledName: string
-
-    member CurriedParameterGroups : ReadOnlyCollection>
-
-    member ReturnParameter : FSharpParameter
-
-      /// Custom attributes attached to the value. These contain references to other values (i.e. constructors in types). Mutable to fixup  
-      /// these value references after copying a colelction of values. 
-    member Attributes: ReadOnlyCollection
-
-      /// XML documentation attached to a value.
-    member XmlDoc: ReadOnlyCollection; 
-
-     
-#if TODO
-    /// Is this "base" in "base.M(...)"
-    member IsBaseValue : bool
-
-    /// Is this the "x" in "type C() as x = ..."
-    member IsConstructorThisValue : bool
-
-    /// Is this the "x" in "member x.M = ..."
-    member IsMemberThisValue : bool
-
-    /// Is this a [<Literal>] value, and if so what value?
-    member LiteralValue : obj // may be null
-
-      /// How visible is this? 
-    member Accessibility : FSharpAccessibility
-      /// Get the module, type or namespace where this value appears. For 
-      /// an extension member this is the type being extended 
-    member ApparentParent: FSharpEntity
-
-     /// Get the module, type or namespace where this value is compiled
-    member ActualParent: FSharpEntity;
-
-#endif
-
-
-and [] FSharpParameter =
-    member Name: string
-    member Range : Range; 
-    member Type : FSharpType; 
-    member Attributes: ReadOnlyCollection
-
-
-and [] FSharpType =
-
-    /// Indicates the type is constructed using a named entity
-    member IsNamed : bool
-    /// Get the named entity for a type constructed using a named entity
-    member NamedEntity : FSharpEntity 
-    /// Get the generic arguments for a tuple type, a function type or a type constructed using a named entity
-    member GenericArguments : ReadOnlyCollection
-    
-    /// Indicates the type is a tuple type. The GenericArguments property returns the elements of the tuple type.
-    member IsTuple : bool
-
-    /// Indicates the type is a function type. The GenericArguments property returns the domain and range of the function type.
-    member IsFunction : bool
-
-    /// Indicates the type is a variable type, whether declared, generalized or an inference type parameter  
-    member IsGenericParameter : bool
-    /// Get the generic parameter data for a generic parameter type
-    member GenericParameter : FSharpGenericParameter
-    /// Get the index for a generic parameter type
-    member GenericParameterIndex : int
-
-
-and [] FSharpAttribute = 
-    member Value : obj  
-    
-    member GetReflectionType: unit -> System.Type 
-
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/Prelude.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/Prelude.fs
deleted file mode 100644
index 81f60ee5..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/Prelude.fs
+++ /dev/null
@@ -1,196 +0,0 @@
-
-// (c) Microsoft Corporation. All rights reserved
-
-//---------------------------------------------------------------------------
-// This file contains definitions that mimic definitions from parts of the F#
-// compiler as necessary to allow the internal compiler typed abstract
-// syntax tree and metadata deserialization code to be loaded independently
-// of the rest of the compiler.
-//
-// This is used to give FSharp.PowerPack.Metadata.dll a minimal code base support
-// to ensure we can publish the source code for that DLL as an independent
-// sample. At some point we may fork the implementation of this DLL completely.
-//
-// Ideally this file would be empty, and gradually we will align the compiler
-// source to allow this to be the case.
-//---------------------------------------------------------------------------
-
-module FSharp.PowerPack.Metadata.Reader.Internal.Prelude
-
-
-let isSome x = Option.isSome x
-
-type pos =  { posLine: int; posCol: int }  
-
-let mk_pos x y = { posLine=x; posCol=y }
-type range = 
-    { rangeFile: string;
-      rangeBegin: pos;
-      rangeEnd: pos }  
-
-let mk_range file p1 p2 = 
-    { rangeFile = file; rangeBegin=p1; rangeEnd=p2 }
-
-let range0 =  mk_range "unknown" (mk_pos 1 0) (mk_pos 1 80)
-
-[]
-type ident (text:string,range:range) = 
-     member x.idText = text
-     member x.idRange = range
-     override x.ToString() = text
-let mksyn_id m s = ident(s,m)
-
-type MemberFlags =
-  { OverloadQualifier: string option; 
-    MemberIsInstance: bool;
-    MemberIsVirtual: bool;
-    MemberIsDispatchSlot: bool;
-    MemberIsOverrideOrExplicitImpl: bool;
-    MemberIsFinal: bool;
-    MemberKind: MemberKind }
-and MemberKind = 
-    | MemberKindClassConstructor
-    | MemberKindConstructor
-    | MemberKindMember 
-    | MemberKindPropertyGet 
-    | MemberKindPropertySet    
-    | MemberKindPropertyGetSet    
-and TyparStaticReq = 
-    | NoStaticReq 
-    | HeadTypeStaticReq 
-
-and SynTypar = 
-    | Typar of ident * TyparStaticReq * bool 
-
-type LazyWithContext<'a,'ctxt> = 
-    { v: Lazy<'a> }
-    member x.Force(_) = x.v.Force()
-    static member NotLazy (x:'a)  = { v = Lazy.CreateFromValue x }
-    static member Create (f: unit -> 'a)  = { v = Lazy.Create f }
-
-type XmlDoc = XmlDoc of string[]
-
-let emptyXmlDoc = XmlDoc[| |]
-let MergeXmlDoc (XmlDoc lines) (XmlDoc lines') = XmlDoc (Array.append lines lines')
-
-let notlazy v = Lazy.CreateFromValue v
-module String =
-
-
-    let tryDropSuffix s t = 
-        let lens = String.length s
-        let lent = String.length t
-        if (lens >= lent && (s.Substring (lens-lent, lent) = t)) then 
-            Some (s.Substring (0,lens - lent))
-        else
-            None
-
-    let hasSuffix s t = (tryDropSuffix s t).IsSome
-    let dropSuffix s t = match (tryDropSuffix s t) with Some(res) -> res | None -> failwith "dropSuffix"
-
-
-type SequencePointInfoForBinding = unit
-type SequencePointInfoForTarget = unit
-type SequencePointInfoForTry = unit
-type SequencePointInfoForWith = unit
-type SequencePointInfoForFinally = unit
-type SequencePointInfoForSeq = unit
-type SequencePointInfoForForLoop =  unit
-type SequencePointInfoForWhileLoop = unit
-
-let SuppressSequencePointAtTarget = ()
-let NoSequencePointAtStickyBinding = ()
-let NoSequencePointAtTry = ()
-let NoSequencePointAtWith = ()
-let NoSequencePointAtFinally = ()
-let NoSequencePointAtForLoop = ()
-let NoSequencePointAtWhileLoop = ()
-let SuppressSequencePointOnExprOfSequential = ()
-
-let error e = raise e
-let errorR e = raise e
-let Error(s,m) = Failure s
-let InternalError(s,m) = Failure s
-let UnresolvedReferenceNoRange s = Failure ("unresolved reference " + s)
-let UnresolvedPathReferenceNoRange (s,p) = Failure ("unresolved reference " + s + " for path " + p)
-type NameMap<'a> = Map
-type ExprData = unit
-type NameMultiMap<'a> = 'a list NameMap
-
-
-[]
-module NameMap = 
-    let empty = Map.empty
-    let tryfind v (m: 'a NameMap) = Map.tryFind v m 
-    let of_keyed_list f l = List.foldBack (fun x acc -> Map.add (f x) x acc) l Map.empty
-    let range m = List.rev (Map.foldBack (fun _ x sofar -> x :: sofar) m [])
-    let add v x (m: 'a NameMap) = Map.add v x m
-    let foldRange f (l: 'a NameMap) acc = Map.foldBack (fun _ y acc -> f y acc) l acc
-    let mem v (m: 'a NameMap) = Map.contains v m
-    let find v (m: 'a NameMap) = Map.find v m
-
-module List = 
-    let frontAndBack l = 
-        let rec loop acc l = 
-            match l with
-            | [] -> 
-                System.Diagnostics.Debug.Assert(false, "empty list")
-                invalidArg "l" "empty list" 
-            | [h] -> List.rev acc,h
-            | h::t -> loop  (h::acc) t
-        loop [] l
-
-    let mapSquared f xss = xss |> List.map (List.map f)
-
-type cache<'a> = NoCache
-let new_cache() = NoCache
-let cacheOptRef _ f = f ()
-let cached _ f = f()
-type FlatList<'a> = List<'a>
-let (===) x y = LanguagePrimitives.PhysicalEquality x y
-let dprintf fmt = printf fmt
-let text_of_path path = String.concat "." path
-type SkipFreeVarsCache = unit
-type FreeVarsCache = unit cache
-
-[]
-module NameMultiMap = 
-    let find v (m: NameMultiMap<'a>) = match Map.tryFind v m with None -> [] | Some r -> r
-    let add v x (m: NameMultiMap<'a>) = NameMap.add v (x :: find v m) m
-    let empty : NameMultiMap<'a> = Map.empty
-    let range (m: NameMultiMap<'a>) = Map.foldBack (fun _ x sofar -> x @ sofar) m []
-
-
-type 'a nonnull_slot = 'a
-let nullable_slot_empty() = Unchecked.defaultof<'a>
-let nullable_slot_full(x) = x
-
-
-module Bytes = 
-    module Bytestream = 
-        type t = { bytes: byte[]; mutable pos: int; max: int }
-
-        let of_bytes (b:byte[]) n len = 
-            if n < 0 or (n+len) > b.Length then failwith "Bytestream.of_bytes";
-            { bytes = b; pos = n; max = n+len }
-
-        let read_byte b  = 
-            if b.pos >= b.max then failwith "Bytestream.of_bytes.read_byte: end of stream";
-            let res = b.bytes.[b.pos] 
-            b.pos <- b.pos + 1;
-            int32 res 
-          
-        let read_bytes b n  = 
-            if b.pos + n > b.max then failwith "Bytestream.read_bytes: end of stream";
-            let res = Array.sub b.bytes b.pos n in
-            b.pos <- b.pos + n;
-            res 
-
-        let position b = b.pos 
-        let clone_and_seek b pos = { bytes=b.bytes; pos=pos; max=b.max }
-        let skip b n = b.pos <- b.pos + n
-
-        let read_utf8_bytes_as_string (b:t) n = 
-            let res = System.Text.Encoding.UTF8.GetString(b.bytes,b.pos,n) 
-            b.pos <- b.pos + n; res 
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/assemblyinfo.FSharp.PowerPack.Metadata.dll.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/assemblyinfo.FSharp.PowerPack.Metadata.dll.fs
deleted file mode 100644
index 84ffacf2..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack.Metadata/assemblyinfo.FSharp.PowerPack.Metadata.dll.fs
+++ /dev/null
@@ -1,9 +0,0 @@
-
-namespace Microsoft.FSharp
-open System.Reflection
-[]
-[]
-[]
-[]
-[]
-do()
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncOperations.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncOperations.fs
deleted file mode 100644
index 9787057b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncOperations.fs
+++ /dev/null
@@ -1,364 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-namespace Microsoft.FSharp.Control
-
-    open System
-    open Microsoft.FSharp.Control
-
-    /// Represents the reified result of an asynchronous computation
-    type AsyncResult<'T>  =
-        |   AsyncOk of 'T
-        |   AsyncException of exn
-        |   AsyncCanceled of OperationCanceledException
-
-        static member Commit(res:AsyncResult<'T>) = 
-            Async.Primitive (fun (cont,econt,ccont) -> 
-                   match res with 
-                   | AsyncOk v -> cont v 
-                   | AsyncException exn -> econt exn 
-                   | AsyncCanceled exn -> ccont exn)
-
-    /// When using .NET 4.0 you can replace this type by Task<'T>
-    []
-    type AsyncResultCell<'T>() =
-        let mutable result = None
-        // The continuation for the result, if any
-        let mutable savedCont = Unchecked.defaultof<_>
-
-        // Record the result in the AsyncResultCell.
-        // Ignore subsequent sets of the result. This can happen, e.g. for a race between 
-        // a cancellation and a success.
-        member x.RegisterResult (res:AsyncResult<'T>) =
-            let grabbedCont = 
-                lock x (fun () ->
-                    if result.IsSome then  
-                        Unchecked.defaultof<_>
-                    else
-                        result <- Some res;
-                        savedCont)
-            // Run the action outside the lock
-            match box grabbedCont with 
-            | null -> ()
-            | _ -> savedCont res 
-
-        /// Get the reified result 
-        member private x.AsyncPrimitiveResult =
-            Async.Primitive(fun (cont,_,_) -> 
-                let grabbedResult = 
-                    lock x (fun () ->
-                        match result with
-                        | Some res -> 
-                            result
-                        | None ->
-                            // Otherwise save the continuation and call it in RegisterResult
-                            savedCont <- cont
-                            None)
-                // Run the action outside the lock
-                match grabbedResult with 
-                | None -> ()
-                | Some res -> cont res) 
-                           
-
-        /// Get the result and commit it
-        member x.AsyncResult =
-            async { let! res = x.AsyncPrimitiveResult
-                    return! AsyncResult.Commit(res) }
-
-
-    []
-    module AsyncExtensions =
-
-
-#if FX_NO_CREATE_DELEGATE
-#else
-        type private Closure<'T>(f) =
-          member x.Invoke(sender:obj,a:'T) : unit = f(a)
-
-        type Async<'T> with 
-
-            /// Return an asynchronous computation that waits for a single invocation of a .NET event by
-            /// adding a handler to the event. Once the computation completes or is cancelled, the 
-            /// handler is removed from the event.
-            ///
-            /// The computation will respond to cancellation while waiting for the completion
-            /// of the operation, in which case later invocations of the event are ignored.
-            static member AwaitEvent(event:IEvent<'Delegate,'T>, ?cancelAction : (unit -> unit)) : Async<'T> =
-                async { let resultCell = new AsyncResultCell<'T>()
-
-                        let cancelRemovalCell = ref (None : IDisposable option)
-
-                        // Set up the handlers to listen to events and cancellation
-                        let rec onCancel(msg) = 
-                            // We've been cancelled. Call the given cancellation routine
-                            match cancelAction with 
-                            | None -> 
-                                // We've been cancelled without a cancel action. Stop listening to events
-                                event.RemoveHandler(del)
-                                // Register the result. This may race with a sucessful result, but
-                                // AsyncResultCell allows a race and throws away whichever comes last.
-                                resultCell.RegisterResult(AsyncCanceled (OperationCanceledException msg))
-                            | Some cancel -> 
-                                // If we get an exception from a cooperative cancellation function
-                                // we assume the operation has already completed.
-                                try cancel() with _ -> () 
-                        
-                        and obj = 
-                            new Closure<'T>(fun eventArgs ->
-                                // Stop listening to events
-                                event.RemoveHandler(del)
-                                // The callback has been activated, so ensure cancellation is not possible beyond this point
-                                match !cancelRemovalCell with 
-                                | None -> ()  
-                                | Some d -> d.Dispose() 
-                                // Register the result. This may race with a cancellation result, but
-                                // AsyncResultCell allows a race and throws away whichever comes last.
-                                resultCell.RegisterResult(AsyncOk(eventArgs)))
-                        and del = 
-                            System.Delegate.CreateDelegate(typeof<'Delegate>, obj, "Invoke") :?> 'Delegate
-
-                        // Activate cancellation
-                        let! cancelRemoval = Async.OnCancel(onCancel)
-                        cancelRemovalCell := Some cancelRemoval
-
-                        
-                        // Start listening to events
-                        event.AddHandler(del)
-
-                        // Return the async computation that allows us to await the result
-                        return! resultCell.AsyncResult }
-
-#endif
-
-        type Async<'T> with 
-
-            static member FromBeginEndViaCallback(beginAction,endAction,?cancelAction): Async<'T> =
-
-                async { let resultCell = new AsyncResultCell<_>()
-
-                        // Activate cancellation
-                        let! cancelRemoval = 
-                            Async.OnCancel(fun msg -> 
-                                // Call the cancellation routine
-                                match cancelAction with 
-                                | None -> 
-                                    // Register the result. This may race with a sucessful result, but
-                                    // AsyncResultCell allows a race and throws away whichever comes last.
-                                    resultCell.RegisterResult(AsyncCanceled (OperationCanceledException(msg)))
-                                | Some cancel -> 
-                                    // If we get an exception from a cooperative cancellation function
-                                    // we assume the operation has already completed.
-                                    try cancel() with _ -> () )
-
-                        let callback = 
-                            new System.AsyncCallback(fun iar -> 
-                                // The callback has been activated, so ensure cancellation is not possible
-                                // beyond this point
-                                cancelRemoval.Dispose()
-                                // Run the endAction and collect its result.
-                                let res = 
-                                    try AsyncOk(endAction iar) 
-                                    with e -> AsyncException(e)
-                                // Register the result. This may race with a cancellation result, but
-                                // AsyncResultCell allows a race and throws away whichever comes last.
-                                resultCell.RegisterResult(res))
-
-                        // Get the async computation that allows us to await the result
-                        let (_:IAsyncResult) = beginAction (callback,(null:obj)) 
-                        return! resultCell.AsyncResult }
-
-            static member FromBeginEndViaCallback(arg1,beginAction,endAction,?cancelAction): Async<'T> =
-                Async.FromBeginEndViaCallback((fun (iar,state) -> beginAction(arg1,iar,state)), endAction, ?cancelAction=cancelAction)
-
-
-            static member FromBeginEndViaCallback(arg1,arg2,beginAction,endAction,?cancelAction): Async<'T> =
-                Async.FromBeginEndViaCallback((fun (iar,state) -> beginAction(arg1,arg2,iar,state)), endAction, ?cancelAction=cancelAction)
-
-            static member FromBeginEndViaCallback(arg1,arg2,arg3,beginAction,endAction,?cancelAction): Async<'T> =
-                Async.FromBeginEndViaCallback((fun (iar,state) -> beginAction(arg1,arg2,arg3,iar,state)), endAction, ?cancelAction=cancelAction)
-
-        type AsyncIAsyncResult<'T>(ag:AsyncGroup, callback: System.AsyncCallback,state:obj) =
-             let mutable completedSynchronously = true
-             let mutable result = None
-             let ev = new System.Threading.ManualResetEvent(false)
-             member s.SetResult(v: AsyncResult<'T>) =  
-                 result <- Some v; 
-                 ev.Set() |> ignore; 
-                 match callback with
-                 | null -> ()
-                 | d -> 
-                     // The IASyncResult becomes observable here
-                     d.Invoke (s :> System.IAsyncResult)
-             member s.GetResult() = 
-                 ev.WaitOne() |> ignore; 
-                 match result.Value with 
-                 | AsyncOk v -> v
-                 | AsyncException err -> raise err
-                 | AsyncCanceled err -> raise err
-             member x.Close() = ev.Close()
-             member x.CancelAsync() = ag.TriggerCancel()
-             member x.CheckForNotSynchronous() = 
-                 if result.IsNone then 
-                     completedSynchronously <- false
-
-             interface System.IAsyncResult with
-                   member x.IsCompleted = result.IsSome
-                   member x.CompletedSynchronously = completedSynchronously
-                   member x.AsyncWaitHandle = ev :> System.Threading.WaitHandle
-                   member x.AsyncState = state
-                      
-
-        type Async<'T> with 
-
-            static member AsBeginEnd(computation:Async<'T>) : 
-                                        (// The 'Begin' member
-                                         (System.AsyncCallback * obj -> System.IAsyncResult) * 
-                                         // The 'End' member
-                                         (System.IAsyncResult -> 'T) * 
-                                         // The 'Cancel' member
-                                         (System.IAsyncResult -> unit)) =
-  
-               let beginAction(callback,state) = 
-                   let ag = new AsyncGroup()
-                   let aiar = new AsyncIAsyncResult<'T>(ag,callback,state)
-                   let cont v = aiar.SetResult (AsyncOk v)
-                   let econt v = aiar.SetResult (AsyncException v)
-                   let ccont v = aiar.SetResult (AsyncCanceled v)
-                   ag.RunWithContinuations(cont,econt,ccont,computation)
-                   aiar.CheckForNotSynchronous()
-                   (aiar :> IAsyncResult)
-               let endAction(iar:IAsyncResult) =
-                   match iar with 
-                   | :? AsyncIAsyncResult<'T> as aiar ->
-                       let res = aiar.GetResult()
-                       aiar.Close ()
-                       res
-                   | _ -> 
-                       invalidArg "iar" "mismatched IAsyncResult passed to an 'End' operation"
-               let cancelAction(iar:IAsyncResult) =
-                   match iar with 
-                   | :? AsyncIAsyncResult<'T> as aiar ->
-                       aiar.CancelAsync()
-                   | _ -> 
-                       invalidArg "iar" "mismatched IAsyncResult passed to a 'Cancel' operation"
-               beginAction, endAction, cancelAction
-
-    []
-    module FileExtensions =
-
-        let UnblockViaNewThread f =
-            async { do! Async.SwitchToNewThread ()
-                    let res = f()
-                    do! Async.SwitchToThreadPool ()
-                    return res }
-
-
-        type System.IO.File with
-            static member AsyncOpenText(path)   = UnblockViaNewThread (fun () -> System.IO.File.OpenText(path))
-            static member AsyncAppendText(path) = UnblockViaNewThread (fun () -> System.IO.File.AppendText(path))
-            static member AsyncOpenRead(path)   = UnblockViaNewThread (fun () -> System.IO.File.OpenRead(path))
-            static member AsyncOpenWrite(path)  = UnblockViaNewThread (fun () -> System.IO.File.OpenWrite(path))
-#if FX_NO_FILE_OPTIONS
-            static member AsyncOpen(path,mode,?access,?share,?bufferSize) =
-#else
-            static member AsyncOpen(path,mode,?access,?share,?bufferSize,?options) =
-#endif
-                let access = match access with Some v -> v | None -> System.IO.FileAccess.ReadWrite
-                let share = match share with Some v -> v | None -> System.IO.FileShare.None
-#if FX_NO_FILE_OPTIONS
-#else
-                let options = match options with Some v -> v | None -> System.IO.FileOptions.None
-#endif
-                let bufferSize = match bufferSize with Some v -> v | None -> 0x1000
-                UnblockViaNewThread (fun () -> 
-#if FX_NO_FILE_OPTIONS
-                    new System.IO.FileStream(path,mode,access,share,bufferSize))
-#else
-                    new System.IO.FileStream(path,mode,access,share,bufferSize, options))
-#endif
-
-            static member OpenTextAsync(path)   = System.IO.File.AsyncOpenText(path)
-            static member AppendTextAsync(path) = System.IO.File.AsyncAppendText(path)
-            static member OpenReadAsync(path)   = System.IO.File.AsyncOpenRead(path)
-            static member OpenWriteAsync(path)  = System.IO.File.AsyncOpenWrite(path)
-#if FX_NO_FILE_OPTIONS
-            static member OpenAsync(path,mode,?access,?share,?bufferSize) = 
-                System.IO.File.AsyncOpen(path, mode, ?access=access, ?share=share,?bufferSize=bufferSize)
-#else
-            static member OpenAsync(path,mode,?access,?share,?bufferSize,?options) = 
-                System.IO.File.AsyncOpen(path, mode, ?access=access, ?share=share,?bufferSize=bufferSize,?options=options)
-#endif
-
-    []
-    module StreamReaderExtensions =
-        type System.IO.StreamReader with
-
-            member s.AsyncReadToEnd () = FileExtensions.UnblockViaNewThread (fun () -> s.ReadToEnd())
-            member s.ReadToEndAsync () = s.AsyncReadToEnd ()
-
-#if FX_NO_WEB_REQUESTS
-#else
-    []
-    module WebRequestExtensions =
-        open System
-        open System.Net
-        
-        type System.Net.WebRequest with
-            member req.AsyncGetResponse() : Async= 
-                
-                async { try 
-                            // Note that we specify req.Abort as the cancelAction. If successful, this will cause 
-                            // a WebExceptionStatus.RequestCanceled to be raised from the web request.
-                           return! Async.FromBeginEndViaCallback(beginAction=req.BeginGetResponse, 
-                                                                 endAction = req.EndGetResponse, 
-                                                                 cancelAction = req.Abort)
-                        with 
-                           | :? WebException as webExn 
-                                   when webExn.Status = WebExceptionStatus.RequestCanceled -> 
-
-                               return! AsyncResult.Commit(AsyncCanceled (OperationCanceledException webExn.Message)) }
-
-            member req.GetResponseAsync() = req.AsyncGetResponse()
-#endif
-     
-#if FX_NO_WEB_CLIENT
-#else
-    []
-    module WebClientExtensions =
-        open System
-        open System.Net
-        open Microsoft.FSharp.Control
-        
-        type WebClient with
-            member this.AsyncDownloadString (address:Uri) : Async =
-                async { let userToken = new obj()
-                        let cancelAction() = this.CancelAsync()
-                        
-                        this.DownloadStringAsync(address, userToken)
-                        /// Loop until we see a reply with the same token
-                        let rec loop() = 
-                            async { let! args = Async.AwaitEvent(this.DownloadStringCompleted,cancelAction=this.CancelAsync)
-                                    if args.UserState <> userToken then 
-                                        // This was not our request. Keep waiting
-                                        return! loop()
-                                    else
-                                        let result = 
-                                            if args.Cancelled then 
-#if SILVERLIGHT
-                                                AsyncCanceled (new OperationCanceledException("The operation was cancelled"))
-#else
-                                                AsyncCanceled (new OperationCanceledException())
-#endif
-                                            elif args.Error <> null then  AsyncException args.Error
-                                            else  AsyncOk args.Result 
-                                        return! AsyncResult.Commit(result) }
-                        return! loop() }
-#endif
-
-
-//        type Microsoft.FSharp.Control.Async<'T> with 
-//            /// Like Async.BuildPrimitive, but does not wait on a WaitHandle.
-//            static member FromBeginEndViaCallback: beginAction:(System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T>
-//            static member FromBeginEndViaCallback: arg1:'Arg1 * beginAction:('Arg1 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T>
-//            static member FromBeginEndViaCallback: arg1:'Arg1 * arg2: 'Arg2 * beginAction:('Arg1 * 'Arg2 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T>
-//            static member FromBeginEndViaCallback: arg1:'Arg1 * arg2: 'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T>
-//            /// As for AwaitEvent, but the sender of the event is also returned.
-//            static member AwaitEvent: IEvent<'Delegate,'T> * ?cancelAction : (unit -> unit) -> Async when 'Delegate : delegate<'T,unit> and 'Delegate :> System.Delegate 
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncOperations.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncOperations.fsi
deleted file mode 100644
index 8fb90fe2..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncOperations.fsi
+++ /dev/null
@@ -1,146 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Control
-
-    open System
-    open Microsoft.FSharp.Control
-    
-    /// Represents the reified result of an asynchronous computation
-    type AsyncResult<'T>  =
-        | AsyncOk of 'T
-        | AsyncException of exn
-        | AsyncCanceled of OperationCanceledException
-
-        /// Return an asynchronous computation that, when run, either returns a value, raises an exception 
-        /// of cancels according to the value of the asynchronous result.
-        static member Commit : AsyncResult<'T> -> Async<'T>
-
-    []
-    /// A helper type to store a single result from an asynchronous computation and asynchronously
-    /// access its result.
-    /// 
-    /// When using .NET 4.0 you can often use Task<'T> instead of this type
-    type AsyncResultCell<'T> =
-        /// Record the result in the AsyncResultCell.
-        /// Subsequent sets of the result are ignored. This can happen, 
-        /// e.g. for a race between a cancellation and a success.
-        member RegisterResult:AsyncResult<'T> -> unit
-
-        /// Wait for the result and commit it
-        member AsyncResult : Async<'T>
-        /// Create a new result cell
-        new : unit -> AsyncResultCell<'T>
-        
-    []
-    /// Extensions to the F# Microsoft.FSharp.Control.Async module
-    module AsyncExtensions =
-
-
-#if FX_NO_CREATE_DELEGATE
-#else
-        type Microsoft.FSharp.Control.Async<'T> with 
-            /// Return an asynchronous computation that waits for a single invocation of a .NET event by
-            /// internally adding a handler to the event. Once the computation completes or is cancelled, the 
-            /// handler is removed from the event.
-            ///
-            /// The computation will respond to cancellation while waiting for the completion
-            /// of the operation. If 'cancelAction' is specified, cancellation causes the given 
-            /// function to be executed. The computation then continues to wait for the event.
-            /// 
-            /// If 'cancelAction' is not specified, then cancellation causes the computation
-            /// to stop immediately, and if the event is subsequently raised it may
-            /// be ignored.
-            static member AwaitEvent: IEvent<'Delegate,'T> * ?cancelAction : (unit -> unit) -> Async<'T> when 'Delegate : delegate<'T,unit> and 'Delegate :> System.Delegate 
-
-#endif
-
-        type Microsoft.FSharp.Control.Async<'T> with 
-            /// Return three functions that can be used to implement the .NET Asynchronous 
-            /// Programming Model (APM) for a given asynchronous computation.
-            /// 
-            /// The functions should normally be published as members with prefix 'Begin',
-            /// 'End' and 'Cancel', and can be used within a type definition as follows:
-            /// 
-            ///   let beginAction,endAction,cancelAction = Async.AsBeginEnd computation
-            ///   member x.BeginSomeOperation(callback,state) = beginAction(callback,state)
-            ///   member x.EndSomeOperation(iar) = endAction(iar)
-            ///   member x.CancelSomeOperation(iar) = cancelAction(iar)
-            /// 
-            ///
-            /// The resulting API will be familiar to programmers in other .NET languages and 
-            /// is a useful way to publish asynchronous computations in .NET components.
-            static member AsBeginEnd : computation:Async<'T> -> 
-                                         // The 'Begin' member
-                                         (System.AsyncCallback * obj -> System.IAsyncResult) * 
-                                         // The 'End' member
-                                         (System.IAsyncResult -> 'T) * 
-                                         // The 'Cancel' member
-                                         (System.IAsyncResult -> unit)
-
-
-    []
-    module StreamReaderExtensions =
-        open System.IO
-
-        type System.IO.StreamReader with 
-            member AsyncReadToEnd: unit -> Async
-            []
-            member ReadToEndAsync : unit -> Async
-
-    []
-    module FileExtensions =
-        open System.IO
-        type System.IO.File with 
-            /// Return an asynchronous computation that will open the file via a fresh blocking I/O thread.
-            static member AsyncOpenText: path:string -> Async
-
-            /// Return an asynchronous computation that will open the file via a fresh blocking I/O thread.
-            static member AsyncOpenRead: path:string -> Async
-
-            /// Return an asynchronous computation that will open the file via a fresh blocking I/O thread.
-            static member AsyncOpenWrite: path:string -> Async
-
-            /// Return an asynchronous computation that will open the file via a fresh blocking I/O thread.
-            static member AsyncAppendText: path:string -> Async
-
-            /// Return an asynchronous computation that will open the file via a fresh blocking I/O thread.
-            /// Pass 'options=FileOptions.Asynchronous' to enable further asynchronous read/write operations
-            /// on the FileStream.
-#if FX_NO_FILE_OPTIONS
-            static member AsyncOpen: path:string * mode:FileMode * ?access: FileAccess * ?share: FileShare * ?bufferSize: int -> Async
-#else
-            static member AsyncOpen: path:string * mode:FileMode * ?access: FileAccess * ?share: FileShare * ?bufferSize: int * ?options: FileOptions -> Async
-#endif
-
-            []
-            static member OpenTextAsync: path:string -> Async
-            []
-            static member OpenReadAsync: path:string -> Async
-            []
-            static member OpenWriteAsync: path:string -> Async
-            []
-            static member AppendTextAsync: path:string -> Async
-            []
-#if FX_NO_FILE_OPTIONS
-            static member OpenAsync: path:string * mode:FileMode * ?access: FileAccess * ?share: FileShare * ?bufferSize: int -> Async
-#else
-            static member OpenAsync: path:string * mode:FileMode * ?access: FileAccess * ?share: FileShare * ?bufferSize: int * ?options: FileOptions -> Async
-#endif
-
-#if FX_NO_WEB_REQUESTS
-#else
-    []
-    module WebRequestExtensions =
-        type System.Net.WebRequest with 
-            /// Return an asynchronous computation that, when run, will wait for a response to the given WebRequest.
-            member AsyncGetResponse : unit -> Async
-            []
-            member GetResponseAsync : unit -> Async
-#endif
-    
-#if FX_NO_WEB_CLIENT
-#else
-    []
-    module WebClientExtensions =
-        type System.Net.WebClient with
-            member AsyncDownloadString : address:System.Uri -> Async
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncWorker.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncWorker.fs
deleted file mode 100644
index 22cf501b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncWorker.fs
+++ /dev/null
@@ -1,52 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-namespace Microsoft.FSharp.Control
-
-    open System
-    open System.Threading
-    open System.IO
-    open Microsoft.FSharp.Control
-    open Microsoft.FSharp.Collections
-
-#if FX_NO_SYNC_CONTEXT
-#else
-    type AsyncWorker<'T>(p,?asyncGroup) = 
-
-        let syncContext = SynchronizationContext.Current
-        do match syncContext with 
-            | null -> failwith "Failed to capture the synchronization context of the calling thread. The System.Threading.SynchronizationContext.Current of the calling thread is null"
-            | _ -> ()
-
-        let post (syncContext : SynchronizationContext) trigger args =
-                syncContext.Post(SendOrPostCallback(fun _ -> trigger args),state=null)
-
-        // Trigger one of the following events when the iteration completes.
-        let triggerCompleted,completed = Event.create<'T>()
-        let triggerError    ,error     = Event.create()
-        let triggerCanceled,canceled   = Event.create()
-        let triggerProgress ,progress  = Event.create()
-
-        let asyncGroup = match asyncGroup with None -> new AsyncGroup() | Some ag -> ag
-
-        let doWork() = 
-            asyncGroup.RunWithContinuations( (fun res -> post syncContext triggerCompleted res),
-                                             (fun exn -> post syncContext triggerError exn),
-                                             (fun exn -> post syncContext triggerCanceled exn ),
-                                             p)
-                                
-
-        member x.ReportProgress(progressPercentage) = 
-            post syncContext triggerProgress progressPercentage
-        
-        member x.RunAsync()    = 
-            ThreadPool.QueueUserWorkItem(fun args -> doWork())
-
-        member x.CancelAsync(?message) = 
-            asyncGroup.TriggerCancel(?message=message); 
-
-        member x.ProgressChanged     = progress
-        member x.Completed  = completed
-        member x.Canceled   = canceled
-        member x.Error      = error
-
-
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncWorker.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncWorker.fsi
deleted file mode 100644
index 614a0e0a..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/AsyncWorker.fsi
+++ /dev/null
@@ -1,19 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Control
-
-    open System
-    open Microsoft.FSharp.Control
-
-#if FX_NO_SYNC_CONTEXT
-#else
-    type AsyncWorker<'T> =
-        new : Async<'T> * ?asyncGroup: AsyncGroup -> AsyncWorker<'T>
-        member ProgressChanged : IEvent 
-        member Error : IEvent 
-        member Completed : IEvent<'T> 
-        member Canceled : IEvent 
-        member RunAsync : unit -> bool
-        member ReportProgress : int -> unit
-        member CancelAsync : ?message:string -> unit
-
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array.fs
deleted file mode 100644
index 3efd3688..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array.fs
+++ /dev/null
@@ -1,90 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#nowarn "9"
-   
-namespace Microsoft.FSharp.Compatibility
-
-module Array = 
-
-    open System.Runtime.InteropServices
-    
-    let invalidArg arg msg = raise (new System.ArgumentException((msg:string),(arg:string)))        
-    
-    let nonempty (arr: _[]) = (arr.Length <> 0)
-    
-    let inline pinObjUnscoped (obj: obj) =  GCHandle.Alloc(obj,GCHandleType.Pinned) 
-
-    let inline pinObj (obj: obj) f = 
-        let gch = pinObjUnscoped obj 
-        try f gch
-        finally
-            gch.Free()
-    
-    []
-    let inline pin (arr: 'T []) (f : nativeptr<'T> -> 'U) = 
-        pinObj (box arr) (fun _ -> f (NativeInterop.NativePtr.of_array arr 0))
-    
-    []
-    let inline pinUnscoped (arr: 'T []) : nativeptr<'T> * _ = 
-        let gch = pinObjUnscoped (box arr) 
-        NativeInterop.NativePtr.of_array arr 0, gch
-
-    []
-    let inline pin_unscoped arr= pinUnscoped arr 
-      
-    let inline contains x (arr: 'T []) =
-        let mutable found = false
-        let mutable i = 0
-        while not found && i < arr.Length do
-            if x = arr.[i] then
-                found <- true
-            else
-                i <- i + 1
-        found
-
-    let inline mem x arr = contains x arr
-        
-    let scanSubRight f (arr : _[]) start fin initState = 
-        let mutable state = initState 
-        let res = Array.create (2+fin-start) initState 
-        for i = fin downto start do
-          state <- f arr.[i] state;
-          res.[i - start] <- state
-        done;
-        res
-
-    let scanSubLeft f  initState (arr : _[]) start fin = 
-        let mutable state = initState 
-        let res = Array.create (2+fin-start) initState 
-        for i = start to fin do
-          state <- f state arr.[i];
-          res.[i - start+1] <- state
-        done;
-        res
-
-    let scanReduce f (arr : _[]) = 
-        let arrn = arr.Length
-        if arrn = 0 then invalidArg "arr" "the input array is empty"
-        else scanSubLeft f arr.[0] arr 1 (arrn - 1)
-    let scan1_left f arr = scanReduce f arr
-
-    let scanReduceBack f (arr : _[])  = 
-        let arrn = arr.Length
-        if arrn = 0 then invalidArg "arr" "the input array is empty"
-        else scanSubRight f arr 0 (arrn - 2) arr.[arrn - 1]
-    let scan1_right f arr = scanReduceBack f arr
-
-
-    let createJaggedMatrix (n:int) (m:int) (x:'T) = 
-        let arr = (Array.zeroCreate n : 'T [][]) 
-        for i = 0 to n - 1 do 
-            let inner = (Array.zeroCreate m : 'T []) 
-            for j = 0 to m - 1 do 
-                inner.[j] <- x
-            arr.[i] <- inner
-        arr
-
-    let make_matrix n m x = createJaggedMatrix n m x
-
-    let create_matrix n m x = make_matrix n m x
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array.fsi
deleted file mode 100644
index 31624416..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array.fsi
+++ /dev/null
@@ -1,72 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-   
-namespace Microsoft.FSharp.Compatibility
-
-    open System
-
-    /// Compatibility operations on arrays.  
-    []
-    module Array = 
-
-        /// Create a jagged 2 dimensional array.
-        ///
-        ///  This member is primarily provided for compatibility with implementations 
-        ///  of ML. F# also supports non-jagged 2D arrays - see the Array2D module and 
-        ///  types such as "int[,]".
-        val createJaggedMatrix: int -> int -> 'T -> 'T array array
-        /// Is an element in the array, uses (=) equality.
-        val inline contains: 'T -> 'T array -> bool
-
-        /// Like reduce, but return both the intermediary and final results
-        val scanReduce : reduction:('T -> 'T -> 'T) -> 'T array -> 'T array
-
-        /// Like reduceBack, but return both the intermediary and final results
-        val scanReduceBack : reduction:('T -> 'T -> 'T) -> 'T array -> 'T array
-
-
-        /// Pin the given array for the duration of a single call to the given function.  A native pointer to
-        /// the first element in the array is passed to the given function.  Cleanup the GCHandle associated with the 
-        /// pin when the function completes, even if an exception is raised.
-        []
-        []
-        val inline pin: 'T[] -> (nativeptr<'T> -> 'b) -> 'b
-
-        /// As for Array.pin, except that the caller is responsible for calling Free on the returned GCHandle in order
-        /// to release the pin.
-        []
-        []
-        val inline pinUnscoped: 'T[] -> nativeptr<'T> *  System.Runtime.InteropServices.GCHandle
-
-
-
-        []
-        val create_matrix: int -> int -> 'T -> 'T array array
-
-        /// Create a jagged 2 dimensional array.  Synonym for create.
-        ///
-        ///  This member is primarily provided for compatibility with implementations 
-        ///  of ML. F# also supports non-jagged 2D arrays - see the Array2D module and 
-        ///  types such as "int[,]".
-        []
-        val make_matrix: int -> int -> 'T -> 'T array array
-
-        []
-        val inline mem: 'T -> 'T array -> bool
-
-        []
-        val scan1_left : reduction:('T -> 'T -> 'T) -> 'T array -> 'T array
-
-        []
-        val scan1_right : reduction:('T -> 'T -> 'T) -> 'T array -> 'T array
-            
-        []
-        []
-        []
-        val inline pin_unscoped: 'T[] -> nativeptr<'T> *  System.Runtime.InteropServices.GCHandle
-
-
-        /// Return true if the list is not empty.
-        []
-        val nonempty: 'T[] -> bool
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array2D.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array2D.fs
deleted file mode 100644
index c8f725b3..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array2D.fs
+++ /dev/null
@@ -1,30 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#nowarn "9"
-   
-namespace Microsoft.FSharp.Compatibility
-
-module Array2D = 
-    
-    open System.Runtime.InteropServices
-    
-    let inline pinObjUnscoped (obj: obj) =  
-        GCHandle.Alloc(obj,GCHandleType.Pinned) 
-
-    let inline pinObj (obj: obj) f = 
-        let gch = pinObjUnscoped obj 
-        try f gch
-        finally
-            gch.Free()
-
-    []
-    let inline pin (arr: 'T [,]) (f : nativeptr<'T> -> 'U) = 
-        pinObj (box arr) (fun _ -> f (NativeInterop.NativePtr.of_array2 arr 0 0))
-    
-    []
-    let inline pinUnscoped (arr: 'T [,]) : nativeptr<'T> * _ = 
-        let gch = pinObjUnscoped (box arr) in 
-        NativeInterop.NativePtr.of_array2 arr 0 0, gch
-
-    []
-    let inline pin_unscoped arr = pinUnscoped arr
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array2D.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array2D.fsi
deleted file mode 100644
index 3d0c7fec..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Array2D.fsi
+++ /dev/null
@@ -1,25 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.Compatibility
-
-    open System
-
-    module Array2D = 
-
-        /// Pin the given array for the duration of a single call to the given function.  A native pointer to
-        /// the first element in the array is passed to the given function.  Cleanup the GCHandle associated with the 
-        /// pin when the function completes, even if an exception is raised.
-        []
-        []
-        val inline pin: 'T[,] -> (nativeptr<'T> -> 'b) -> 'b
-
-        /// As for Array2D.pin, except that the caller is responsible for calling Free on the returned GCHandle in order
-        /// to release the pin.
-        []
-        []
-        val inline pinUnscoped: 'T[,] -> nativeptr<'T> *  System.Runtime.InteropServices.GCHandle
-        
-        []
-        []
-        []
-        val inline pin_unscoped: 'T[,] -> nativeptr<'T> *  System.Runtime.InteropServices.GCHandle
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.List.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.List.fs
deleted file mode 100644
index 02ae1899..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.List.fs
+++ /dev/null
@@ -1,124 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#nowarn "62"
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities
-#else
-namespace Microsoft.FSharp.Compatibility
-#endif
-
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open System.Collections.Generic
-open System.Diagnostics
-
-module List = 
-
-    let invalidArg arg msg = raise (new System.ArgumentException((msg:string),(arg:string)))        
-
-    let nonempty x = match x with [] -> false | _ -> true
-    let rec contains x l = match l with [] -> false | h::t -> x = h || contains x t
-    let mem x l = contains x l
-    let rec memq x l = match l with [] -> false | h::t -> LanguagePrimitives.PhysicalEquality x h || memq x t
-
-    let rec rev_map2_acc (f:OptimizedClosures.FastFunc2<_,_,_>) l1 l2 acc =
-        match l1,l2 with 
-        | [],[] -> acc
-        | h1::t1, h2::t2 -> rev_map2_acc f t1 t2 (f.Invoke(h1,h2) :: acc)
-        | _ -> invalidArg "l2" "the lists have different lengths"
-
-    let rev_map2 f l1 l2 = 
-        let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f)
-        rev_map2_acc f l1 l2 []
-
-    let rec rev_append l1 l2 = 
-        match l1 with 
-        | [] -> l2
-        | h::t -> rev_append t (h::l2)
-
-
-    let rec rev_map_acc f l acc =
-        match l with 
-        | [] -> acc
-        | h::t -> rev_map_acc f t (f h :: acc)
-
-    let rev_map f l = rev_map_acc f l []
-
-    let indexNotFound() = raise (new System.Collections.Generic.KeyNotFoundException("An index satisfying the predicate was not found in the collection"))
-
-    let rec assoc x l = 
-        match l with 
-        | [] -> indexNotFound()
-        | ((h,r)::t) -> if x = h then r else assoc x t
-
-    let rec try_assoc x l = 
-        match l with 
-        | [] -> None
-        | ((h,r)::t) -> if x = h then Some(r) else try_assoc x t
-
-    let rec mem_assoc x l = 
-        match l with 
-        | [] -> false
-        | ((h,r)::t) -> x = h || mem_assoc x t
-
-    let rec remove_assoc x l = 
-        match l with 
-        | [] -> []
-        | (((h,r) as p) ::t) -> if x = h then t else p:: remove_assoc x t
-
-    let rec assq x l = 
-        match l with 
-        | [] -> indexNotFound()
-        | ((h,r)::t) -> if LanguagePrimitives.PhysicalEquality x h then r else assq x t
-
-    let rec try_assq x l = 
-        match l with 
-        | [] -> None
-        | ((h,r)::t) -> if LanguagePrimitives.PhysicalEquality x h then Some(r) else try_assq x t
-
-    let rec mem_assq x l = 
-        match l with 
-        | [] -> false
-        | ((h,r)::t) -> LanguagePrimitives.PhysicalEquality x h || mem_assq x t
-
-    let rec remove_assq x l = 
-        match l with 
-        | [] -> []
-        | (((h,r) as p) ::t) -> if LanguagePrimitives.PhysicalEquality x h then t else p:: remove_assq x t
-
-    let scanReduce f l = 
-        match l with 
-        | [] -> invalidArg "l" "the input list is empty"
-        | (h::t) -> List.scan f h t
-    let scan1_left f l = scanReduce f l
-
-    let scanArraySubRight<'a,'b> (f:OptimizedClosures.FastFunc2<'a,'b,'b>) (arr:_[]) start fin initState = 
-        let mutable state = initState in 
-        let mutable res = [state] in 
-        for i = fin downto start do
-            state <- f.Invoke(arr.[i], state);
-            res <- state :: res
-        res
-
-
-    let scanReduceBack f l = 
-        match l with 
-        | [] -> invalidArg "l" "the input list is empty"
-        | _ -> 
-            let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f)
-            let arr = Array.of_list l in 
-            let arrn = Array.length arr in
-            scanArraySubRight f arr 0 (arrn - 2) arr.[arrn - 1]
-    let scan1_right f l = scanReduceBack f l
-
-
-    let find_indexi f list = 
-        let rec loop n = function[] -> indexNotFound() | h::t -> if f n h then n else loop (n+1) t
-        loop 0 list
-
-
-    let tryfind_indexi f list = 
-        let rec loop n = function [] -> None | h::t -> if f n h then Some n else loop (n+1) t
-        loop 0 list
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.List.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.List.fsi
deleted file mode 100644
index 92409c38..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.List.fsi
+++ /dev/null
@@ -1,95 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities
-#else
-namespace Microsoft.FSharp.Compatibility
-#endif
-
-open System
-
-/// Compatibility operations on lists.  
-module List = 
-
-    /// Like reduce_left, but return both the intermediary and final results
-    val scanReduce : reduction:('T -> 'T -> 'T) -> 'T list -> 'T list
-
-    /// Like reduce_right, but return both the intermediary and final results
-    val scanReduceBack : reduction:('T -> 'T -> 'T) -> 'T list -> 'T list
-
-    /// Is an element in the list. Elements are compared using generic equality.
-    val contains: 'T -> 'T list -> bool
-
-    /// Is an element in the list. Elements are compared using generic equality.
-    []
-    val mem: 'T -> 'T list -> bool
-
-    /// Lookup key's data in association list, uses (=) equality.
-    /// Raise System.IndexOutOfRangeException exception if key not found, in which case you should typically use try_assoc instead.
-    []
-    val assoc: 'Key -> ('Key * 'T) list -> 'T
-
-    /// Lookup key's data in association list, uses (=) equality,
-    /// returning "Some data" or "None".  
-    []
-    val try_assoc: 'Key -> ('Key * 'T) list -> 'T option
-
-    /// Does the key have pair in the association list?
-    []
-    val mem_assoc: 'Key -> ('Key * 'T) list -> bool
-
-    /// Remove pair for key from the association list (if it's there).
-    []
-    val remove_assoc: 'Key -> ('Key * 'T) list -> ('Key * 'T) list
-
-    /// See assoc, but uses the physical equality operator (==) for equality tests
-    []
-    val assq: 'Key -> ('Key * 'T) list -> 'T
-      
-    /// See try_assoc, but uses the physical equality operator (==) for equality tests.    
-    []
-    val try_assq: 'Key -> ('Key * 'T) list -> 'T option
-
-    /// See mem_assoc, but uses the physical equality operator (==) for equality tests.      
-    []
-    val mem_assq: 'Key -> ('Key * 'T) list -> bool
-
-    /// See remove_assoc, but uses the physical equality operator (==) for equality tests.        
-    []
-    val remove_assq: 'Key -> ('Key * 'T) list -> ('Key * 'T) list
-
-    /// See mem, but uses the physical equality operator (==) for equality tests.        
-    []
-    val memq: 'Key -> 'Key list -> bool
-
-    /// Return true if the list is not empty.
-    []
-    val nonempty: 'Key list -> bool
-
-    /// "rev_map f l1" evaluates to "map f (rev l1)"
-    []
-    val rev_map: mapping:('T -> 'U) -> 'T list -> 'U list
-
-    /// "rev_map2 f l1 l2" evaluates to "map2 f (rev l1) (rev l2)"
-    []
-    val rev_map2: mapping:('T1 -> 'T2 -> 'U) -> 'T1 list -> 'T2 list -> 'U list
-
-    /// "rev_append l1 l2" evaluates to "append (rev l1) l2"
-    []
-    val rev_append: 'T list -> 'T list -> 'T list
-
-    []
-    val scan1_left : reduction:('T -> 'T -> 'T) -> 'T list -> 'T list
-
-    []
-    val scan1_right : reduction:('T -> 'T -> 'T) -> 'T list -> 'T list
-
-    []
-    val tryfind_indexi: predicate:(int -> 'T -> bool) -> list:'T list -> int option
-
-    []
-    val find_indexi: predicate:(int -> 'T -> bool) -> list:'T list -> int 
-
-
-    
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Seq.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Seq.fs
deleted file mode 100644
index b4e41679..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Seq.fs
+++ /dev/null
@@ -1,28 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#nowarn "9"
-   
-namespace Microsoft.FSharp.Compatibility
-
-open System.Collections.Generic
-
-module Seq = 
-    let combine     ie1 ie2  = Seq.zip ie1 ie2
-    let nonempty (ie : seq<'T>)  = use e = ie.GetEnumerator() in e.MoveNext()
-
-    let generate openf compute closef = 
-        seq { let r = openf() 
-              try 
-                let x = ref None
-                while (x := compute r; (!x).IsSome) do
-                    yield (!x).Value
-              finally
-                 closef r }
-    
-    let generate_using (openf : unit -> ('b :> System.IDisposable)) compute = 
-        generate openf compute (fun (s:'b) -> s.Dispose())
-
-    let cons (x:'T) (s: seq<'T>) = 
-        seq { yield x
-              yield! s }
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Seq.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Seq.fsi
deleted file mode 100644
index fdfaf12c..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.Seq.fsi
+++ /dev/null
@@ -1,29 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.Compatibility
-
-    open System
-
-    module Seq = 
-
-
-        val generate   : opener:(unit -> 'b) -> generator:('b -> 'T option) -> closer:('b -> unit) -> seq<'T>
-
-        []
-        val generate_using   : opener:(unit -> ('T :> IDisposable)) -> generator:('T -> 'b option) -> seq<'b>
-
-        /// Return an IEnumerable that when iterated yields
-        /// the given item followed by the items in the given sequence
-        []
-        val cons: 'T -> seq<'T> -> seq<'T>
-
-
-
-
-        /// A synonym for Seq.zip
-        []
-        val combine: seq<'T1> -> seq<'T2> -> seq<'T1 * 'T2>
-
-        /// Return true if the IEnumerable is not empty.
-        []
-        val nonempty: seq<'T> -> bool
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.String.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.String.fs
deleted file mode 100644
index 19fde4ff..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.String.fs
+++ /dev/null
@@ -1,113 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities
-#else
-namespace Microsoft.FSharp.Compatibility
-#endif
-
-module String = 
-    let test_null arg = if arg = null then raise (new System.ArgumentNullException("arg"))
-    let invalidArg arg msg = raise (new System.ArgumentException((msg:string),(arg:string)))        
-
-    let get (str:string) i =
-        test_null str
-        try str.[i]
-        with :? System.ArgumentException -> invalidArg "i" "index out of bounds" 
-
-    let length (str:string) =
-        test_null str
-        str.Length
-
-    let sub (s:string) (start:int) (len:int) =
-        test_null s
-        try s.Substring(start,len)
-        with :? System.ArgumentException -> failwith "String.sub" 
-
-    let compare (x:string) y = compare x y
-
-    let fast_get (s:string) n =
-        test_null s
-        s.[n]
-
-    let of_char (c:char) = System.Char.ToString(c)
-    let make (n: int) (c: char) : string = new System.String(c, n)
-
-    let indexNotFound() = raise (new System.Collections.Generic.KeyNotFoundException("An index for the character was not found in the string"))
-    
-    let index_from (s:string) (start:int) (c:char) =  
-        test_null s
-        try let r = s.IndexOf(c,start) in if r = -1 then indexNotFound() else r
-        with :? System.ArgumentException -> invalidArg "start" "String.index_from" 
-      
-    let rindex_from (s:string) (start:int) (c:char) =
-        test_null s
-        try let r =  s.LastIndexOf(c,start) in if r = -1 then indexNotFound() else r
-        with :? System.ArgumentException -> invalidArg "start" "String.rindex_from" 
-      
-
-    let index (s:string) (c:char) =
-        test_null s
-        index_from s 0 c
-
-    let rindex (s:string) (c:char) =
-        test_null s
-        rindex_from s (length s - 1) c
-
-    let contains_between (s:string) (start:int) (stop:int) (c:char) =
-        test_null s
-        try s.IndexOf(c,start,(stop-start+1)) <> -1
-        with :? System.ArgumentException -> invalidArg "start" "String.contains_between" 
-
-    let contains_from (s:string) (start:int) (c:char) =
-        test_null s
-        let stop = length s - 1 in 
-        try s.IndexOf(c,start,(stop-start+1)) <> -1
-        with :? System.ArgumentException -> invalidArg "start" "String.contains_from" 
-
-    let rcontains_from (s:string) (stop:int) (c:char) =
-        test_null s
-        let start = 0 in
-        try s.IndexOf(c,start,(stop-start+1)) <> -1
-        with :? System.ArgumentException -> invalidArg "stop" "String.rcontains_from" 
-      
-    let contains (s:string) (c:char) = contains_from s 0 c
-
-    let uppercase (s:string) =
-        test_null s
-#if FX_NO_TO_LOWER_INVARIANT
-        s.ToUpper(System.Globalization.CultureInfo.InvariantCulture)
-#else
-        s.ToUpperInvariant()
-#endif
-
-    let lowercase (s:string) =
-        test_null s
-#if FX_NO_TO_LOWER_INVARIANT
-        s.ToLower(System.Globalization.CultureInfo.InvariantCulture)
-#else
-        s.ToLowerInvariant()
-#endif
-
-    let capitalize (s:string) =
-        test_null s
-        if s.Length = 0 then "" 
-        else String.concat "" [uppercase (sub s 0 1); sub s 1 (length s - 1)]
-
-    let uncapitalize (s:string) =
-        test_null s
-        if s.Length = 0 then  ""
-        else String.concat "" [lowercase (sub s 0 1); sub s 1 (length s - 1)]
-
-#if FX_NO_STRING_SPLIT_OPTIONS
-#else
-    let split (c : char list) =
-        let ca = Array.of_list c in 
-        fun (s:string) ->
-            test_null s
-            Array.to_list(s.Split(ca, System.StringSplitOptions.RemoveEmptyEntries))
-#endif
-
-    let trim (c : char list) =
-        let ca = Array.of_list c in 
-        fun (s:string) -> s.Trim(ca)
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.String.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.String.fsi
deleted file mode 100644
index 37232ab9..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Compat.String.fsi
+++ /dev/null
@@ -1,102 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities
-#else
-namespace Microsoft.FSharp.Compatibility
-#endif
-
-/// Compatibility module for string processing.  Richer string operations
-/// are available via the member functions on strings and other functionality in
-/// the System.String type
-/// and the System.Text.RegularExpressions namespace.
-module String = 
-
-    /// Return a string with the first character converted to uppercase.
-    val capitalize: string -> string
-
-    /// Return a string with the first character converted to lowercase.
-    val uncapitalize: string -> string
-
-#if FX_NO_STRING_SPLIT_OPTIONS
-#else
-    /// Split the string using the given list of separator characters.
-    /// Trimming is also performed at both ends of the string and any empty
-    /// strings that result from the split are discarded.
-    val split: char list -> (string -> string list)
-#endif
-
-    /// Removes all occurrences of a set of characters specified in a
-    /// list from the beginning and end of this instance.
-    val trim: char list -> (string -> string)
-
-
-    /// Compare the given strings using ordinal comparison
-    []
-    val compare: string -> string -> int
-
-    /// Returns the character at the specified position in the string
-    []
-    val get: string -> int -> char
-
-    /// Return a substring of length 'length' starting index 'start'.
-    []
-    val sub: string -> start:int -> length:int -> string
-
-    /// Return a new string with all characters converted to lowercase
-    []
-    val lowercase: string -> string
-
-    /// Return a string of the given length containing repetitions of the given character
-    []
-    val make: int -> char -> string
-
-    /// Return s string of length 1 containing the given character
-    []
-    val of_char: char -> string
-
-    /// Return true is the given string contains the given character
-    []
-    val contains: string -> char -> bool
-
-    /// Return true is the given string contains the given character in the
-    /// range specified by the given start index and the given length
-    []
-    val contains_between: string -> start:int -> length:int -> char -> bool
-
-    /// Return true is the given string contains the given character in the
-    /// range from the given start index to the end of the string.
-    []
-    val contains_from: string -> int -> char -> bool
-
-    /// Return the first index of the given character in the
-    /// string.  Raise KeyNotFoundException if
-    /// the string does not contain the given character.
-    []
-    val index: string -> char -> int
-
-    /// Return the first index of the given character in the
-    /// range from the given start position to the end of the string.  
-    /// Raise KeyNotFoundException if
-    /// the string does not contain the given character.
-    []
-    val index_from: string -> start:int -> char -> int
-
-    /// Return true if the string contains the given character prior to the given index
-    []
-    val rcontains_from: string -> start:int -> char -> bool
-
-    /// Return the index of the first occurrence of the given character 
-    /// from the end of the string proceeding backwards
-    []
-    val rindex: string -> char -> int
-
-    /// Return the index of the first occurrence of the given character 
-    /// starting from the given index proceeding backwards.
-    []
-    val rindex_from: string -> start:int -> char -> int
-
-    /// Return a string with all characters converted to uppercase.
-    []
-    val uppercase: string -> string
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/CompilerLocationUtils.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/CompilerLocationUtils.fs
deleted file mode 100644
index 9de836b1..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/CompilerLocationUtils.fs
+++ /dev/null
@@ -1,67 +0,0 @@
-namespace Internal.Utilities
-open System
-open System.IO
-open System.Configuration
-open System.Reflection
-
-#nowarn "44" // ConfigurationSettings is obsolete but the new stuff is horribly complicated. 
-
-module internal FSharpEnvironment =
-
-    let mutable private location : string option option = None
-
-#if FX_ATLEAST_40 
-    /// The .NET runtime version that F# was built against.
-    let DotNetRuntime = sprintf "v%s.%s.%s" Microsoft.BuildSettings.Version.Major Microsoft.BuildSettings.Version.Minor Microsoft.BuildSettings.Version.ProductBuild
-
-    /// Name of this F# product
-    let FSharpProductName = "Microsoft Visual F# 4.0"
-#endif
-
-    let FSharpRunningVersion = 
-        try match (typeof>).Assembly.GetName().Version.ToString() with
-            | null -> None
-            | "" -> None
-            | s  -> Some(s)
-        with _ -> None
-
-    /// The default location of FSharp.Core.dll and fsc.exe based on the version of fsc.exe that is running
-    let FSharpRunningBinFolder = 
-        match  location with 
-        | Some(location) -> location      
-        | None -> 
-            match FSharpRunningVersion with 
-            | None -> None
-            | Some v -> 
-                location 
-                    <- Some(// Check for an app.config setting to redirect the compiler location
-                            let appConfigKey = "fsharp-compiler-location-" + v // Like fsharp-compiler-location-4.0.0.0
-
-                            let locationFromAppConfig = ConfigurationSettings.AppSettings.[appConfigKey]
-                            System.Diagnostics.Debug.Print(sprintf "Considering appConfigKey %s which has value '%s'" appConfigKey locationFromAppConfig) 
-
-                            if not(String.IsNullOrEmpty(locationFromAppConfig)) then 
-                                let exeAssemblyFolder = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)
-                                let locationFromAppConfig = locationFromAppConfig.Replace("{exepath}", exeAssemblyFolder)
-                                System.Diagnostics.Debug.Print(sprintf "Using path %s" locationFromAppConfig) 
-                                Some(locationFromAppConfig)
-                            else 
-#if FX_ATLEAST_40 
-                                let key = sprintf @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\%s\AssemblyFoldersEx\%s" DotNetRuntime FSharpProductName
-#else
-                                let key = @"HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\Microsoft.FSharp-" + v
-#endif
-                                let result = 
-                                    try match Microsoft.Win32.Registry.GetValue(key,null,"") :?> String with
-                                        | null -> None
-                                        | "" -> None
-                                        | s  -> Some(s)
-                                    with _ -> None
-
-// This was failing on rolling build for staging because the prototype compiler doesn't have the key. Disable there.
-#if FX_ATLEAST_40 
-                                System.Diagnostics.Debug.Assert(result<>None, sprintf "Could not find location of compiler at '%s'" key)
-#endif                                
-                                result
-                            )
-                location.Value
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/FSharp.PowerPack.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/FSharp.PowerPack.fsproj
deleted file mode 100644
index ad6a0cb0..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/FSharp.PowerPack.fsproj
+++ /dev/null
@@ -1,278 +0,0 @@
-
-
-   ..\..  
-  
-  
-  
-    Debug
-    AnyCPU
-    2.0
-    {649FA588-F02E-457C-9FCF-87E46407481F}
-    Library
-    FSharp.PowerPack
-    true
-    v2.0
-    FSharp.PowerPack.xml
-    $(DisabledWarnings);9;44;60;35;42;62;86;47;40
-  
-  
-  
-      --generatehtml --htmloutputdir:..\..\..\src\WWW\microsoft.com\projects\fsharp\manual --htmlnamespacefile:namespaces.html --htmllocallinks --htmlnamespacefileappend
-  
-
-  
-    
-      assemblyinfo.FSharp.PowerPack.dll.fs
-    
-    
-    
-    
-      q.fsi
-    
-    
-      q.fs
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-     
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-      INumeric.fsi
-    
-    
-      INumeric.fs
-    
-    
-      complex.fsi
-    
-    
-      complex.fs
-    
-    
-      associations.fsi
-    
-    
-      associations.fs
-    
-    
-      matrix.fsi
-    
-    
-      matrix.fs
-    
-    
-    
-    
-    
-    
-      prim-lexing.fsi
-    
-    
-      prim-lexing.fs
-    
-    
-      prim-parsing.fsi
-    
-    
-      prim-parsing.fs
-    
-    
-      enum.fsi
-    
-    
-      enum.fs
-    
-    
-      byte.fsi
-    
-    
-      byte.fs
-    
-    
-      char.fsi
-    
-    
-      char.fs
-    
-    
-      sbyte.fs
-    
-    
-      int16.fs
-    
-    
-      uint16.fs
-    
-    
-      int32.fsi
-    
-    
-      int32.fs
-    
-    
-      int64.fsi
-    
-    
-      int64.fs
-    
-    
-      uint32.fsi
-    
-    
-      uint32.fs
-    
-    
-      uint64.fsi
-    
-    
-      uint64.fs
-    
-    
-      float.fsi
-    
-    
-      float.fs
-    
-    
-      float32.fsi
-    
-    
-      float32.fs
-    
-    
-      hashtbl.fsi
-    
-    
-      hashtbl.fs
-    
-    
-      arg.fsi
-    
-    
-      arg.fs
-    
-    
-      bytearray.fsi
-    
-    
-      bytearray.fs
-    
-    
-      sys.fsi
-    
-    
-      sys.fs
-    
-    
-      obj.fsi
-    
-    
-      obj.fs
-    
-    
-      filename.fsi
-    
-    
-      filename.fs
-    
-    
-      map.fsi
-    
-    
-      map.fs
-    
-    
-      set.fsi
-    
-    
-      set.fs
-    
-    
-      printexc.fsi
-    
-    
-      printexc.fs
-    
-    
-      pervasives.fsi
-    
-    
-      pervasives.fs
-    
-    
-      buffer.fsi
-    
-    
-      buffer.fs
-    
-    
-      lexing.fsi
-    
-    
-      lexing.fs
-    
-    
-      parsing.fsi
-    
-    
-      parsing.fs
-    
-    
-      big_int.fsi
-    
-    
-      big_int.fs
-    
-    
-      num.fsi
-    
-    
-      num.fs
-    
-    
-      lazylist.fsi
-    
-    
-      lazylist.fs
-    
-    
-  
-  
-    
-    
-    
-      {DED3BBD7-53F4-428A-8C9F-27968E768605}
-      FSharp.Core
-    
-  
-  
-  
-  
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashMultiMap.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashMultiMap.fs
deleted file mode 100644
index ffcaaa52..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashMultiMap.fs
+++ /dev/null
@@ -1,179 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities.Collections
-//open Internal.Utilities.Collections
-#else
-namespace Microsoft.FSharp.Collections
-#endif
-
-open System
-open System.Collections.Generic
-open Microsoft.FSharp.Collections
-                                 
-// Each entry in the HashMultiMap dictionary has at least one entry. Under normal usage each entry has _only_
-// one entry. So use two hash tables: one for the main entries and one for the overflow.
-[]
-type HashMultiMap<'Key,'Value>(hasheq: IEqualityComparer<'Key>,n:int) = 
-    let firstEntries = new Dictionary<_,_>(n,hasheq);
-    let rest = new Dictionary<_,_>(3,hasheq);
- 
-    static member Create(hasheq,n) = new HashMultiMap<'Key,'Value>(hasheq,n)
-
-    []
-    static member inline Create(n) : HashMultiMap<'Key,'Value> = HashMultiMap.Create(HashIdentity.Structural,n)
-
-    static member inline Create() : HashMultiMap<'Key,'Value> = HashMultiMap.Create(11)
-
-    []
-    static member Create(seq : seq<'Key * 'Value>) : HashMultiMap<'Key,'Value> = 
-        let x = new HashMultiMap<'Key,'Value>(11)
-        seq |> Seq.iter (fun (k,v) -> x.Add(k,v))
-        x
-
-    []
-    new (seq : seq<'Key * 'Value>) as x = 
-        new HashMultiMap<'Key,'Value>(11)
-        then 
-           seq |> Seq.iter (fun (k,v) -> x.Add(k,v))
-
-    []
-    new (n:int) = new HashMultiMap<'Key,'Value>(HashIdentity.Structural,n)
-    new () = new HashMultiMap<'Key,'Value>(11)
-
-
-    member x.GetRest(k) = 
-        let mutable res = []
-        let ok = rest.TryGetValue(k,&res)
-        if ok then res else []
-
-    member x.Add(y,z) = 
-        let mutable res = Unchecked.defaultof<'Value>
-        let ok = firstEntries.TryGetValue(y,&res)
-        if ok then 
-            rest.[y] <- res :: x.GetRest(y)
-        firstEntries.[y] <- z
-
-    member x.Clear() = 
-         firstEntries.Clear()
-         rest.Clear()
-
-    member x.FirstEntries = firstEntries
-    member x.Rest = rest
-    member x.Copy() = 
-        let res = HashMultiMap<'Key,'Value>.Create(firstEntries.Comparer, firstEntries.Count) 
-        for kvp in firstEntries do 
-             res.FirstEntries.Add(kvp.Key,kvp.Value)
-        for kvp in rest do 
-             res.Rest.Add(kvp.Key,kvp.Value)
-        res
-
-    member x.Item 
-        with get(y : 'Key) = 
-            let mutable res = Unchecked.defaultof<'Value>
-            let ok = firstEntries.TryGetValue(y,&res)
-            if ok then res else raise (new System.Collections.Generic.KeyNotFoundException("The item was not found in collection"))
-        and set (y:'Key) (z:'Value) = 
-            x.Replace(y,z)
-
-    member x.FindAll(y) = 
-        let mutable res = Unchecked.defaultof<'Value>
-        let ok = firstEntries.TryGetValue(y,&res)
-        if ok then res :: x.GetRest(y) else []
-
-    member x.Fold f acc = 
-        let mutable res = acc
-        for kvp in firstEntries do
-            res <- f kvp.Key kvp.Value res
-            match x.GetRest(kvp.Key)  with
-            | [] -> ()
-            | rest -> 
-                for z in rest do
-                    res <- f kvp.Key z res
-        res
-
-    member x.Iterate(f) =  
-        for kvp in firstEntries do
-            f kvp.Key kvp.Value
-            match x.GetRest(kvp.Key)  with
-            | [] -> ()
-            | rest -> 
-                for z in rest do
-                    f kvp.Key z
-
-    member x.Contains(y) = firstEntries.ContainsKey(y)
-
-    member x.ContainsKey(y) = firstEntries.ContainsKey(y)
-
-    member x.Remove(y) = 
-        let mutable res = Unchecked.defaultof<'Value>
-        let ok = firstEntries.TryGetValue(y,&res)
-        // Note, if not ok then nothing to remove - nop
-        if ok then 
-            // We drop the FirstEntry. Here we compute the new FirstEntry and residue MoreEntries
-            let mutable res = []
-            let ok = rest.TryGetValue(y,&res)
-            if ok then 
-                match res with 
-                | [h] -> 
-                    firstEntries.[y] <- h; 
-                    rest.Remove(y) |> ignore
-                | (h::t) -> 
-                    firstEntries.[y] <- h
-                    rest.[y] <- t
-                | _ -> 
-                    // note: broken invariant
-                    ()
-            else
-                firstEntries.Remove(y) |> ignore 
-
-    member x.Replace(y,z) = 
-        firstEntries.[y] <- z
-
-    member x.TryFind(y) = 
-        let mutable res = Unchecked.defaultof<'Value>
-        let ok = firstEntries.TryGetValue(y,&res)
-        if ok then Some(res) else None
-
-    member x.Count = firstEntries.Count
-
-    interface IEnumerable> with
-        member s.GetEnumerator() = 
-            let elems = new System.Collections.Generic.List<_>(firstEntries.Count + rest.Count)
-            for kvp in firstEntries do
-                elems.Add(kvp)
-                for z in s.GetRest(kvp.Key) do
-                   elems.Add(KeyValuePair(kvp.Key, z))
-            (elems.GetEnumerator() :> IEnumerator<_>)
-
-    interface System.Collections.IEnumerable with
-        member s.GetEnumerator() = ((s :> seq<_>).GetEnumerator() :> System.Collections.IEnumerator)
-
-    interface IDictionary<'Key, 'Value> with 
-        member s.Item 
-            with get x = s.[x]            
-            and  set x v = s.[x] <- v
-            
-        member s.Keys = ([| for kvp in s -> kvp.Key |] :> ICollection<'Key>)
-        member s.Values = ([| for kvp in s -> kvp.Value |] :> ICollection<'Value>)
-        member s.Add(k,v) = s.[k] <- v
-        member s.ContainsKey(k) = s.ContainsKey(k)
-        member s.TryGetValue(k,r) = if s.ContainsKey(k) then (r <- s.[k]; true) else false
-        member s.Remove(k:'Key) = 
-            let res = s.ContainsKey(k) in 
-            s.Remove(k); res
-
-    interface ICollection> with 
-        member s.Add(x) = s.[x.Key] <- x.Value
-        member s.Clear() = s.Clear()            
-        member s.Remove(x) = 
-            let res = s.ContainsKey(x.Key) in 
-            if res && s.[x.Key] = x.Value then 
-                s.Remove(x.Key); 
-            res
-        member s.Contains(x) = s.ContainsKey(x.Key) && s.[x.Key] = x.Value
-        member s.CopyTo(arr,arrIndex) = s |> Seq.iteri (fun j x -> arr.[arrIndex+j] <- x)
-        member s.IsReadOnly = false
-        member s.Count = s.Count
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashMultiMap.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashMultiMap.fsi
deleted file mode 100644
index 7d6c5f07..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashMultiMap.fsi
+++ /dev/null
@@ -1,100 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities.Collections
-#else
-/// This namespace contains FSharp.PowerPack extensions for the F# collection types
-namespace Microsoft.FSharp.Collections
-#endif
-
-open System
-open System.Collections.Generic
-
-
-/// Hash tables, by default based on F# structural "hash" and (=) functions. 
-/// The table may map a single key to multiple bindings.
-[]
-type HashMultiMap<'Key,'Value> =
-    /// Create a new empty mutable HashMultiMap
-    /// with key hash/equality based on the F# structural "hash" and (=) functions.
-    new : unit -> HashMultiMap<'Key,'Value>
-
-    // inline justification: allows specialization of structural hash functions based on type
-    // In the future this may be adjusted to be 'recommended' inline rather than compulsory
-    [(...) instead")>]
-    static member inline Create  : unit -> HashMultiMap<'Key,'Value>
-
-    /// Create a new empty mutable HashMultiMap with an internal bucket array of the given approximate size
-    /// and with key hash/equality based on the F# structural "hash" and (=) functions
-    //
-    // inline justification: allows specialization of structural hash functions based on type
-    // In the future this may be adjusted to be 'recommended' inline rather than compulsory
-    []
-    new : size:int -> HashMultiMap<'Key,'Value>
-
-    []
-    [(...) instead")>]
-    static member inline Create  : size:int -> HashMultiMap<'Key,'Value>
-    
-    /// Create a new empty mutable HashMultiMap with an internal bucket array of the given approximate size
-    /// and with the given key hash/equality functions
-    new : comparer:IEqualityComparer<'Key> * size:int -> HashMultiMap<'Key,'Value>
-    
-    [(...) instead")>]
-    static member Create: IEqualityComparer<'Key> * int -> HashMultiMap<'Key,'Value>
-
-    /// Build a map that contains the bindings of the given IEnumerable
-    []
-    new : entries:seq<'Key * 'Value> -> HashMultiMap<'Key,'Value>
-
-    []
-    [(...) instead")>]
-    static member Create: entries:seq<'Key * 'Value> -> HashMultiMap<'Key,'Value>
-    
-    /// Make a shallow copy of the collection
-    member Copy    : unit    -> HashMultiMap<'Key,'Value>
-    
-    /// Add a binding for the element to the table
-    member Add     : 'Key * 'Value -> unit
-    
-    /// Clear all elements from the collection
-    member Clear   : unit    -> unit
-    
-    /// Test if the collection contains any bindings for the given element
-    []
-    member Contains: 'Key -> bool
-
-    /// Test if the collection contains any bindings for the given element
-    member ContainsKey: 'Key -> bool
-
-    /// Remove the latest binding (if any) for the given element from the table
-    member Remove : 'Key -> unit
-
-    /// Replace the latest binding (if any) for the given element.
-    member Replace : 'Key * 'Value -> unit
-
-    /// Lookup or set the given element in the table. Set replaces all existing bindings for a value with a single
-    /// bindings. Raise KeyNotFoundException if the element is not found.
-    member Item : 'Key -> 'Value with get,set
-
-    /// Lookup the given element in the table, returning the result as an Option
-    member TryFind : 'Key      -> 'Value option
-    
-    /// Find all bindings for the given element in the table, if any
-    member FindAll : 'Key      -> 'Value list
-
-    /// Apply the given function to each element in the collection threading the accumulating parameter
-    /// through the sequence of function applications
-    member Fold    : ('Key -> 'Value -> 'State -> 'State) -> 'State -> 'State
-
-    /// The total number of keys in the hash table
-    member Count   : int
-
-    ///Apply the given function to each binding in the hash table 
-    member Iterate : ('Key -> 'Value -> unit) -> unit
-
-    interface IDictionary<'Key, 'Value>         
-    interface ICollection> 
-    interface IEnumerable>         
-    interface System.Collections.IEnumerable 
-    
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashSet.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashSet.fs
deleted file mode 100644
index 7b0ab455..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashSet.fs
+++ /dev/null
@@ -1,66 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities
-#else
-namespace Microsoft.FSharp.Collections
-#endif
-
-open System
-open System.Collections
-open System.Collections.Generic
-
-// HashSets are currently implemented using the .NET Dictionary type. 
-[]
-type HashSet<'a>(t: Dictionary<'a,int>) = 
-
-    new (size:int,hasheq: IEqualityComparer<'a>) = 
-        new HashSet<_>(new Dictionary<_,_>(size,hasheq))
-
-    []
-    new (size:int) = 
-        new HashSet<'a>(size,HashIdentity.Structural)
-
-    new () = 
-        new HashSet<'a>(11)
-
-    []
-    new (seq:seq<'a>) as t = 
-        new HashSet<'a>(1)
-        then seq |> Seq.iter t.Add
-        
-    static member Create(size:int,hasheq: IEqualityComparer<'a>) = new HashSet<_>(size,hasheq)
-
-    []
-    static member Create(size:int) = new HashSet<'a>(size)
-
-    static member Create() =  new HashSet<'a>()
-
-    []
-    static member Create(seq:seq<'a>) = new HashSet<'a>(seq)
-        
-    member x.Add(y)    = t.[y] <- 0
-
-    member x.Clear() = t.Clear()
-
-    member x.Copy() : HashSet<'a>  = 
-        let t2 = new Dictionary<'a,int>(t.Count,t.Comparer) in 
-        t |> Seq.iter (fun kvp -> t2.[kvp.Key] <- 0); 
-        new HashSet<'a>(t2)
-
-    member x.Fold f acc = 
-        let mutable res = acc
-        for kvp in t do
-            res <- f kvp.Key res
-        res
-
-    member x.Iterate(f) =  t |> Seq.iter (fun kvp -> f kvp.Key)
-
-    member x.Contains(y) = t.ContainsKey(y)
-    member x.Remove(y) = t.Remove(y) |> ignore
-    member x.Count = t.Count
-    interface IEnumerable<'a> with
-        member x.GetEnumerator() = t.Keys.GetEnumerator() :> IEnumerator<_>
-    interface System.Collections.IEnumerable with
-        member x.GetEnumerator() = t.Keys.GetEnumerator()  :> IEnumerator 
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashSet.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashSet.fsi
deleted file mode 100644
index 9a7b6856..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/HashSet.fsi
+++ /dev/null
@@ -1,81 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities
-#else
-namespace Microsoft.FSharp.Collections
-#endif
-
-
-open System
-open System.Collections.Generic
-
-/// Mutable hash sets based by default on F# structural "hash" and (=) functions. Implemented via a hash table and/or Dictionary.
-[]
-type HashSet<'a>  =
-
-    /// Create a new empty mutable hash set 
-    /// with key hash/equality based on the F# structural "hash" and (=) functions
-    new : unit -> HashSet<'a>
-
-    /// Create a new empty mutable hash set with an internal bucket array of the given approximate size
-    /// and with key hash/equality based on the F# structural "hash" and (=) functions
-    []
-    new : size:int -> HashSet<'a>
-
-    /// Create a new empty mutable hash set with an internal bucket array of the given approximate size
-    /// and with the given key hash/equality functions 
-    new : size:int * comparer:IEqualityComparer<'a> -> HashSet<'a>
-
-    /// Create a new mutable hash set containing elements drawn from the given sequence
-    []
-    new : elements:seq<'a> -> HashSet<'a>
-    
-    /// Create a new empty mutable hash set 
-    /// with key hash/equality based on the F# structural "hash" and (=) functions
-    [(...)' instead")>]
-    static member Create : unit -> HashSet<'a>
-
-    /// Create a new empty mutable hash set with an internal bucket array of the given approximate size
-    /// and with key hash/equality based on the F# structural "hash" and (=) functions
-    []
-    [(...)' instead")>]
-    static member Create : size:int -> HashSet<'a>
-
-    /// Create a new empty mutable hash set with an internal bucket array of the given approximate size
-    /// and with the given key hash/equality functions 
-    [(...)' instead")>]
-    static member Create : size:int * comparer:IEqualityComparer<'a> -> HashSet<'a>
-
-    /// Create a new mutable hash set containing elements drawn from the given sequence
-    []
-    [(...)' instead")>]
-    static member Create : elements:seq<'a> -> HashSet<'a>
-    
-    /// Make a shallow copy of the set
-    member Copy    : unit -> HashSet<'a>
-    
-    /// Add an element to the collection
-    member Add     : 'a   -> unit
-    
-    /// Clear all elements from the set
-    member Clear   : unit -> unit
-    
-    /// Test if the set contains the given element
-    member Contains: 'a   -> bool
-    
-    /// Remove the given element from the set
-    member Remove  : 'a   -> unit
-    
-    /// Apply the given function to the set threading the accumulating parameter
-    /// through the sequence of function applications
-    member Fold    : ('a -> 'b -> 'b) -> 'b -> 'b
-
-    /// The total number of elements in the set
-    member Count   : int
-
-    /// Apply the given function to each binding in the hash table 
-    member Iterate : ('a -> unit) -> unit
-
-    interface IEnumerable<'a> 
-    interface System.Collections.IEnumerable 
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Measure.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Measure.fs
deleted file mode 100644
index 8507bd7d..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/Measure.fs
+++ /dev/null
@@ -1,15 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-
-namespace Microsoft.FSharp.Math
-
-#nowarn "42"
-
-module Measure =
-
-    let infinity<[] 'u> : float<'u> = (# "" System.Double.PositiveInfinity : float<'u> #)
-    let nan<[] 'u> : float<'u> = (# "" System.Double.NaN : float<'u> #)
-
-    let infinityf<[] 'u> : float32<'u> = (# "" System.Double.NegativeInfinity : float32<'u> #)
-    let nanf<[] 'u> : float32<'u> = (# "" System.Single.NaN : float32<'u> #)
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/NativeArray.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/NativeArray.fs
deleted file mode 100644
index c4d5a045..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/NativeArray.fs
+++ /dev/null
@@ -1,97 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.NativeInterop
-
-#nowarn "44"
-#nowarn "9" // unverifiable constructs
-
-open System
-open System.Runtime.InteropServices
-open Microsoft.FSharp.NativeInterop
-
-module NativeOps = 
-    []
-    let inline pinObjUnscoped (obj: obj) =  GCHandle.Alloc(obj,GCHandleType.Pinned) 
-    []
-    let inline pinObj (obj: obj) f = 
-        let gch = pinObjUnscoped obj 
-        try f gch
-        finally
-            gch.Free()
-
-[]
-type NativeArray<'T>(ptr : nativeptr<'T>, len: int) =
-    member x.Ptr = ptr
-    []
-    member inline x.Item 
-       with get n = NativePtr.get x.Ptr n
-       and  set n v = NativePtr.set x.Ptr n v
-    member x.Length = len
-
-[]
-type FortranMatrix<'T>(ptr : nativeptr<'T>, nrows: int, ncols:int) = 
-    member x.NumCols = ncols
-    member x.NumRows = nrows
-    member x.Ptr = ptr
-    []
-    member inline x.Item 
-       with get (row,col) = NativePtr.get x.Ptr (row + col*x.NumRows)
-       and  set (row,col) v = NativePtr.set x.Ptr (row + col*x.NumRows) v
-    member x.NativeTranspose = new CMatrix<_>(ptr,ncols,nrows)
-  
-and 
-  []
-  NativeArray2<'T>(ptr : nativeptr<'T>, nrows:int, ncols: int) = 
-    member x.Ptr = ptr
-    member x.NumRows = nrows
-    member x.NumCols = ncols
-    []
-    member inline x.Item 
-       with get (row,col) = NativePtr.get x.Ptr (row*x.NumCols + col)
-       and  set (row,col) v = NativePtr.set x.Ptr (row*x.NumCols + col) v
-    member x.NativeTranspose = new FortranMatrix<_>(x.Ptr,ncols,nrows)
-  
-and CMatrix<'T> = NativeArray2<'T> 
-
-module Ref = 
-    []
-    let inline pin (ref: 'T ref) (f : nativeptr<'T> -> 'b) = 
-        NativeOps.pinObj (box ref) (fun gch -> 
-            f (gch.AddrOfPinnedObject() |> NativePtr.of_nativeint))
-
-open Microsoft.FSharp.Math
-
-[]
-type PinnedArray<'T>(narray: NativeArray<'T>, gch: GCHandle) =
-    []
-    static member inline of_array(arr: 'T[]) =
-        let gch = NativeOps.pinObjUnscoped (box arr) 
-        let ptr = NativeInterop.NativePtr.of_array arr 0      
-        new PinnedArray<'T>(new NativeArray<_>(ptr,Array.length arr),gch)
-
-    member x.Ptr = narray.Ptr
-    member x.Free() = gch.Free()
-    member x.Length = narray.Length
-    member x.NativeArray = narray
-    interface System.IDisposable with 
-        member x.Dispose() = gch.Free()
-        
-
-[]
-type PinnedArray2<'T>(narray: NativeArray2<'T>, gch: GCHandle) =
-
-    []
-    static member inline of_array2(arr: 'T[,]) = 
-        let gch = NativeOps.pinObjUnscoped (box arr) 
-        let ptr = NativeInterop.NativePtr.of_array2 arr 0 0
-        new PinnedArray2<'T>(new NativeArray2<_>(ptr,Array2D.length1 arr,Array2D.length2 arr),gch)
-
-    member x.Ptr = narray.Ptr
-    member x.Free() = gch.Free()
-    member x.NumRows = narray.NumRows
-    member x.NumCols = narray.NumCols
-    member x.NativeArray = narray
-    interface System.IDisposable with 
-        member x.Dispose() = gch.Free()
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/NativeArray.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/NativeArray.fsi
deleted file mode 100644
index 0f41c5ed..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/NativeArray.fsi
+++ /dev/null
@@ -1,158 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.NativeInterop
-
-open System.Runtime.InteropServices
-
-/// This type wraps a pointer to a blob of unmanaged memory assumed to contain
-/// a C-style one-dimensional array of items compatible with the (presumably blittable) 
-/// type 'T.  The blob of memory must be allocated and managed externally, 
-/// e.g. by a computation routine written in C.
-///
-/// All operations on this type are marked inlined
-/// because the code used to implement the operations is not verifiable.  
-///
-/// Any code that uses these operations will be unverifiable and may 
-/// cause memory corruption if not used with extreme care.
-[]
-type NativeArray<'T> =
-
-    /// Creates a C-style one dimensional array from a native pointer and the length of the array
-    /// Nothing is actually copied.
-    new : startAddress: nativeptr<'T> * length: int -> NativeArray<'T>
-
-    /// Pointer to the C-style one-dimensional array
-    member Ptr: nativeptr<'T>
-
-    /// WARNING: use of this function may lead to unverifiable or invalid code
-    []
-    []
-    member inline Item : int -> 'T with get,set
-
-    /// Length of the C-style one-dimensional array
-    member Length : int
-
-/// This type wraps a pointer to a blob of unmanaged memory assumed to contain
-/// a C-style row major two-dimensional matrix of items compatible with the (presumably blittable) 
-/// type 'T. The blob of memory must be allocated and managed externally, 
-/// e.g. by a computation routine written in C.
-///
-/// All operations on this type are marked inlined
-/// because the code used to implement the operations is not verifiable.  
-///
-/// Any code that uses these operations will be unverifiable and may 
-/// cause memory corruption if not used with extreme care.
-
-[]
-type NativeArray2<'T> =
-    /// Creates a C-style row major two-dimensional array from a native pointer, the number of rows and the number of columns.  
-    /// Nothing is actually copied.
-    new : nativeptr<'T> * nrows:int * ncols:int -> NativeArray2<'T>
-
-    /// Pointer to the C-style row major two-dimensional array 
-    member Ptr: nativeptr<'T>
-
-    /// Number of rows of the native array
-    member NumRows : int
-
-    /// Number of columns of the native array
-    member NumCols : int
-
-    /// WARNING: use of this function may lead to unverifiable or invalid code
-    []
-    []
-    member inline Item : int * int -> 'T with get,set
-
-    /// View a CMatrix as a FortranMatrix.  Doesn't actually allocate
-    /// a new matirx - just gives a different label to the same bits, and swaps the
-    /// row/column count information associated with the bits.
-    member NativeTranspose : FortranMatrix<'T>
-
-/// See NativeArray2
-and CMatrix<'T> = NativeArray2<'T> 
-
-/// This type wraps a pointer to a blob of unmanaged memory assumed to contain
-/// a Fortran-style column major two-dimensional matrix of items compatible with the (presumably blittable) 
-/// type 'T. The blob of memory must be allocated and managed externally, 
-/// e.g. by a computation routine written in C.
-///
-/// All operations on this type are marked inlined
-/// because the code used to implement the operations is not verifiable.  
-///
-/// Any code that uses these operations will be unverifiable and may 
-/// cause memory corruption if not used with extreme care.
-and 
-   []
-   FortranMatrix<'T> =
-    new : nativeptr<'T> * nrows:int * ncols:int -> FortranMatrix<'T>
-
-    member Ptr: nativeptr<'T>
-
-    member NumRows : int
-    member NumCols : int
-
-    /// WARNING: use of this function may lead to unverifiable or invalid code
-    []
-    []
-    member inline Item : int * int -> 'T with get,set
-    
-    /// View a FortranMatrix as a CMatrix.  Doesn't actually allocate
-    /// a new matirx - just gives a different label to the same bits, and swaps the
-    /// row/column count information associated with the bits.
-    member NativeTranspose : CMatrix<'T>
-  
-module Ref =
-    /// Pin the given ref for the duration of a single call to the given function.  A native pointer to
-    /// the contents of the ref is passed to the given function.  Cleanup the GCHandle associated with the 
-    /// pin when the function completes, even if an exception is raised.
-    ///
-    /// This function should only be used if 'T is a simple blittable type
-    /// such as "int" that does not contain any further heap references.
-    ///
-    /// WARNING: use of this function may lead to unverifiable or invalid code
-    []
-    []
-    val inline pin : 'T ref -> (nativeptr<'T> -> 'b) -> 'b
-
-/// Represents a pinned handle to a structure with an underlying 1D array, i.e. an underlying NativeArray.
-/// Used when interfacing with native code math libraries such as LAPACK.
-[]
-type PinnedArray<'T> =
-
-    new : NativeArray<'T> * GCHandle -> PinnedArray<'T>
-
-    interface System.IDisposable 
-    member Ptr : nativeptr<'T> 
-
-    member Length : int 
-
-    member NativeArray : NativeArray<'T>
-
-    /// For native interop. Pin the given object
-    []
-    static member inline of_array : 'T[] -> PinnedArray<'T>
-
-    member Free : unit -> unit
-
-/// Represents a pinned handle to a structure with an underlying 2D array, i.e. an underlying NativeArray2.
-/// Used when interfacing with native code math libraries such as LAPACK.
-[]
-type PinnedArray2<'T> =
-
-    interface System.IDisposable 
-    new : NativeArray2<'T> * GCHandle -> PinnedArray2<'T> 
-
-    member Ptr : nativeptr<'T> 
-
-    member NumRows : int 
-
-    member NumCols : int 
-
-    member NativeArray : NativeArray2<'T>
-
-    /// For native interop. Pin the given object
-    []
-    static member inline of_array2 : 'T[,] -> PinnedArray2<'T>
-
-    member Free : unit -> unit
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/PhysicalConstants.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/PhysicalConstants.fs
deleted file mode 100644
index 7d0f556a..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/PhysicalConstants.fs
+++ /dev/null
@@ -1,91 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.Math
-
-open Microsoft.FSharp.Math.SI
-
-/// Fundamental physical constants, with units-of-measure
-// Selected from frequently used constants at http://physics.nist.gov/cuu/Constants/index.html
-module PhysicalConstants =
-
-  /// speed of light in vacuum
-  []
-  let c = 299792458.0
-
-  /// magnetic constant
-  []
-  let mu0 = 12.566370614e-7
-
-  /// electric constant = 1/(mu0 c^2)
-  []
-  let epsilon0 = 8.854187817e-12
-
-  /// Newtonian constant of gravitation
-  []
-  let G = 6.6742867e-11
-  
-  /// Planck constant
-  []
-  let h = 6.6260689633e-34
-
-  /// Dirac constant, also known as the reduced Planck constant = h/2pi
-  []
-  let hbar = 1.05457162853e-34
-
-  /// Elementary charge
-  []
-  let e = 1.60217648740e-19
-
-  /// Magnetic flux quantum h/2e
-  []
-  let Phi0 = 2.06783366752e-15
-
-  /// Conductance quantum 2e^2/h
-  []
-  let G0 = 7.748091700453e-5
-
-  /// Electron mass
-  []
-  let m_e = 9.1093821545e-31
-
-  /// Proton mass
-  []
-  let m_p = 1.67262163783e-27
-
-  /// Fine-structure constant
-  []
-  let alpha = 7.297352537650e-3
-
-  /// Rydberg constant
-  []
-  let R_inf = 10973731.56852773
-
-  /// Avogadro constant
-  []
-  let N_A = 6.0221417930e23
-
-  /// Faraday constant
-  []
-  let F = 96485.339924
-
-  /// Molar gas constant
-  []
-  let R = 8.31447215 
- 
-  /// Boltzmann constant R/N_A
-  []
-  let k = 1.380650424e-23
-
-  /// Stefan-Boltzmann constant
-  []
-  let sigma = 5.67040040e-8
- 
-  /// Electron volt
-  []
-  let eV = 1.60217648740e-19
-
-  /// Unified atomic mass unit
-  []
-  let u = 1.66053878283e-27
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/PowerPack.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/PowerPack.fs
deleted file mode 100644
index a87cebad..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/PowerPack.fs
+++ /dev/null
@@ -1,37 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-module internal Microsoft.FSharp.AssemblyAttributes
-
-//[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-do()
-
-#if FX_NO_SECURITY_PERMISSIONS
-#else
-#if FX_SIMPLE_SECURITY_PERMISSIONS
-[]
-#else
-[]
-[]
-#endif
-#endif
-
-[]
-
-[]
-
-
-#if FX_NO_DEFAULT_DEPENDENCY_TYPE
-#else
-[] 
-#endif
-
-do ()
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/SI.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/SI.fs
deleted file mode 100644
index 8261c8d8..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/SI.fs
+++ /dev/null
@@ -1,112 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.Math
-
-
-// System Internationale. See http://www.bipm.org/en/si/si_brochure/general.html
-/// The International System of Units (SI)
-module SI =
-
-  [] 
-  /// metre (or meter), SI unit of length
-  type m               
-
-  [] 
-  /// kilogram, SI unit of mass
-  type kg
-
-  [] 
-  /// second, SI unit of time
-  type s
-
-  [] 
-  /// ampere, SI unit of electric current
-  type A             
-
-  [] 
-  /// kelvin, SI unit of thermodynamic temperature
-  type K              
-
-  [] 
-  /// mole, SI unit of amount of substance
-  type mol             
-
-  [] 
-  /// candela, SI unit of luminous intensity
-  type cd              
-
-  [] 
-  /// hertz, SI unit of frequency
-  type Hz = s^-1
-
-  [] 
-  /// newton, SI unit of force
-  type N = kg m / s^2 
-
-  [] 
-  /// pascal, SI unit of pressure, stress
-  type Pa = N / m^2
-
-  [] 
-  /// joule, SI unit of energy, work, amount of heat
-  type J = N m
-
-  [] 
-  /// watt, SI unit of power, radiant flux
-  type W = J / s       
-
-  [] 
-  /// coulomb, SI unit of electric charge, amount of electricity
-  type C = s A 
-
-  [] 
-  /// volt, SI unit of electric potential difference, electromotive force
-  type V = W/A        
-
-  [] 
-  /// farad, SI unit of capacitance
-  type F = C/V
-
-  [] 
-  /// ohm, SI unit of electric resistance
-  type ohm = V/A       
-
-  [] 
-  /// siemens, SI unit of electric conductance
-  type S = A/V         
-
-  [] 
-  /// weber, SI unit of magnetic flux
-  type Wb = V s        
-
-  [] 
-  /// tesla, SI unit of magnetic flux density
-  type T = Wb/m^2      
-
-  [] 
-  /// henry, SI unit of inductance
-  type H = Wb/A        
-
-  [] 
-  /// lumen, SI unit of luminous flux
-  type lm = cd        
-
-  [] 
-  /// lux, SI unit of illuminance
-  type lx = lm/m^2 
-
-  [] 
-  /// becquerel, SI unit of activity referred to a radionuclide
-  type Bq = s^-1       
-
-  [] 
-  /// gray, SI unit of absorbed dose
-  type Gy = J/kg       
-
-  [] 
-  /// sievert, SI unit of does equivalent
-  type Sv = J/kg       
-
-  [] 
-  /// katal, SI unit of catalytic activity
-  type kat = mol/s 
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedCollections.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedCollections.fs
deleted file mode 100644
index 00095068..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedCollections.fs
+++ /dev/null
@@ -1,1209 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities.Collections.Tagged
-#else
-namespace Microsoft.FSharp.Collections.Tagged
-#endif
-
-    #nowarn "51"
-    #nowarn "69" // interface implementations in augmentations
-    #nowarn "60" // override implementations in augmentations
-    #nowarn "191" // The struct, record or union type 'Map' has an explicit implementation of 'Object.GetHashCode'. Consider implementing an override for 'System.Object.Equals(obj)
-
-    open Microsoft.FSharp.Core
-    open Microsoft.FSharp.Core.Operators
-    open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-    open System
-    open System.Collections.Generic
-#if INTERNALIZED_POWER_PACK
-    open Internal.Utilities
-    open Internal.Utilities.Collections
-#else
-    open Microsoft.FSharp.Collections
-#endif
-
-
-    []
-    type SetTree<'a> = 
-        | SetEmpty                                          // height = 0   
-        | SetNode of 'a * SetTree<'a> *  SetTree<'a> * int    // height = int 
-#if ONE
-        | SetOne  of 'a                                     // height = 1   
-#endif
-        // OPTIMIZATION: store SetNode(k,SetEmpty,SetEmpty,1) --->  SetOne(k) 
-
-
-    // CONSIDER: SetTree<'a> = SetEmpty | SetNode of 'a  * SetTree<'a> *  SetTree<'a> * int
-    //  with SetOne = SetNode of (x,null,null,1)
-
-    module RawSetOps = 
-        let empty = SetEmpty
-
-        let height t = 
-            match t with 
-            | SetEmpty -> 0
-#if ONE
-            | SetOne _ -> 1
-#endif
-            | SetNode (_,_,_,h) -> h
-
-#if CHECKED
-        let rec checkInvariant t =
-            // A good sanity check, loss of balance can hit perf 
-            match t with 
-            | SetEmpty -> true
-            | SetOne _ -> true
-            | SetNode (k,t1,t2,h) ->
-                let h1 = height t1 in
-                let h2 = height t2 in
-                (-2 <= (h1 - h2) && (h1 - h2) <= 2) && checkInvariant t1 && checkInvariant t2
-#else
-        let inline SetOne(x) = SetNode(x,SetEmpty,SetEmpty,1)
-#endif
-
-        let tolerance = 2
-
-        let mk l hl k r hr = 
-#if ONE
-            if hl = 0 && hr = 0 then SetOne (k)
-            else
-#endif
-              let m = if hl < hr then hr else hl 
-              SetNode(k,l,r,m+1)
-
-        let rebalance t1 k t2 =
-            let t1h = height t1 
-            let t2h = height t2
-            if  t2h > t1h + tolerance then // right is heavier than left 
-                match t2 with 
-                | SetNode(t2k,t2l,t2r,_) -> 
-                    // one of the nodes must have height > height t1 + 1 
-                    let t2lh = height t2l
-                    if t2lh > t1h + 1 then  // balance left: combination 
-                        match t2l with 
-                        | SetNode(t2lk,t2ll,t2lr,t2lh) ->
-                            let l = mk t1 t1h k t2ll (height t2ll)
-                            let r = mk t2lr (height t2lr) t2k t2r (height t2r)
-                            mk l (height l) t2lk r (height r)
-                        | _ -> failwith "rebalance"
-                    else // rotate left 
-                        let l = mk t1 t1h k t2l t2lh
-                        mk l (height l) t2k t2r (height t2r)
-                | _ -> failwith "rebalance"
-            else
-                if  t1h > t2h + tolerance then // left is heavier than right 
-                    match t1 with 
-                    | SetNode(t1k,t1l,t1r,_) -> 
-                        // one of the nodes must have height > height t2 + 1 
-                        let t1rh = height t1r
-                        if t1rh > t2h + 1 then 
-                            // balance right: combination 
-                            match t1r with 
-                            | SetNode(t1rk,t1rl,t1rr,t1rh) ->
-                                let l = mk t1l (height t1l) t1k t1rl (height t1rl)
-                                let r = mk t1rr (height t1rr) k t2 t2h
-                                mk l (height l) t1rk r (height r)
-                            | _ -> failwith "rebalance"
-                        else
-                            let r = mk t1r t1rh k t2 t2h
-                            mk t1l (height t1l) t1k r (height r)
-                    | _ -> failwith "rebalance"
-                else mk t1 t1h k t2 t2h
-
-        let rec add (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) k t = 
-            match t with 
-            | SetNode (k2,l,r,h) -> 
-                let c = comparer.Invoke(k,k2) 
-                if   c < 0 then rebalance (add comparer k l) k2 r
-                elif c = 0 then t
-                else            rebalance l k2 (add comparer k r)
-#if ONE
-            | SetOne(k2) -> 
-                // nb. no check for rebalance needed for small trees, also be sure to reuse node already allocated 
-                let c = comparer.Invoke(k,k2) 
-                if c < 0   then SetNode (k,SetEmpty,t,2)
-                elif c = 0 then t
-                else            SetNode (k,t,SetEmpty,2)                  
-#endif
-            | SetEmpty -> SetOne(k)
-
-        let rec balance comparer t1 k t2 =
-            // Given t1 < k < t2 where t1 and t2 are "balanced",
-            // return a balanced tree for .
-            // Recall: balance means subtrees heights differ by at most "tolerance"
-            match t1,t2 with
-            | SetEmpty,t2  -> add comparer k t2 // drop t1 = empty 
-            | t1,SetEmpty  -> add comparer k t1 // drop t2 = empty 
-#if ONE
-            | SetOne k1,t2 -> add comparer k (add comparer k1 t2)
-            | t1,SetOne k2 -> add comparer k (add comparer k2 t1)
-#endif
-            | SetNode(k1,t11,t12,t1h),SetNode(k2,t21,t22,t2h) ->
-                // Have:  (t11 < k1 < t12) < k < (t21 < k2 < t22)
-                // Either (a) h1,h2 differ by at most 2 - no rebalance needed.
-                //        (b) h1 too small, i.e. h1+2 < h2
-                //        (c) h2 too small, i.e. h2+2 < h1 
-                if   t1h+tolerance < t2h then
-                    // case: b, h1 too small 
-                    // push t1 into low side of t2, may increase height by 1 so rebalance 
-                    rebalance (balance comparer t1 k t21) k2 t22
-                elif t2h+tolerance < t1h then
-                    // case: c, h2 too small 
-                    // push t2 into high side of t1, may increase height by 1 so rebalance 
-                    rebalance t11 k1 (balance comparer t12 k t2)
-                else
-                    // case: a, h1 and h2 meet balance requirement 
-                    mk t1 t1h k t2 t2h
-
-        let rec split (comparer : OptimizedClosures.FastFunc2<'a,'a,int>) pivot t =
-            // Given a pivot and a set t
-            // Return { x in t s.t. x < pivot }, pivot in t? , { x in t s.t. x > pivot } 
-            match t with
-            | SetNode(k1,t11,t12,h1) ->
-                let c = comparer.Invoke(pivot,k1)
-                if   c < 0 then // pivot t1 
-                    let t11_lo,havePivot,t11_hi = split comparer pivot t11
-                    t11_lo,havePivot,balance comparer t11_hi k1 t12
-                elif c = 0 then // pivot is k1 
-                    t11,true,t12
-                else            // pivot t2 
-                    let t12_lo,havePivot,t12_hi = split comparer pivot t12
-                    balance comparer t11 k1 t12_lo,havePivot,t12_hi
-#if ONE
-            | SetOne k1 ->
-                let c = comparer.Invoke(k1,pivot)
-                if   c < 0 then t       ,false,SetEmpty // singleton under pivot 
-                elif c = 0 then SetEmpty,true ,SetEmpty // singleton is    pivot 
-                else            SetEmpty,false,t        // singleton over  pivot 
-#endif
-            | SetEmpty  -> 
-                SetEmpty,false,SetEmpty
-        
-        let rec spliceOutSuccessor t = 
-            match t with 
-            | SetEmpty -> failwith "internal error: Map.splice_out_succ_or_pred"
-#if ONE
-            | SetOne (k2) -> k2,empty
-#endif
-            | SetNode (k2,l,r,_) ->
-                match l with 
-                | SetEmpty -> k2,r
-                | _ -> let k3,l' = spliceOutSuccessor l in k3,mk l' (height l') k2 r (height r)
-
-        let rec remove (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) k t = 
-            match t with 
-            | SetEmpty -> t
-#if ONE
-            | SetOne (k2) -> 
-                let c = comparer.Invoke(k,k2) 
-                if   c = 0 then empty
-                else            t
-#endif
-            | SetNode (k2,l,r,_) -> 
-                let c = comparer.Invoke(k,k2) 
-                if   c < 0 then rebalance (remove comparer k l) k2 r
-                elif c = 0 then 
-                  match l,r with 
-                  | SetEmpty,_ -> r
-                  | _,SetEmpty -> l
-                  | _ -> 
-                      let sk,r' = spliceOutSuccessor r 
-                      mk l (height l) sk r' (height r')
-                else rebalance l k2 (remove comparer k r) 
-
-        let rec mem (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) k t = 
-            match t with 
-            | SetNode(k2,l,r,_) -> 
-                let c = comparer.Invoke(k,k2) 
-                if   c < 0 then mem comparer k l
-                elif c = 0 then true
-                else mem comparer k r
-#if ONE
-            | SetOne(k2) -> (comparer.Invoke(k,k2) = 0)
-#endif
-            | SetEmpty -> false
-
-        let rec iter f t = 
-            match t with 
-            | SetNode(k2,l,r,_) -> iter f l; f k2; iter f r
-#if ONE
-            | SetOne(k2) -> f k2
-#endif
-            | SetEmpty -> ()            
-
-        // Fold, left-to-right. 
-        //
-        // NOTE: This matches OCaml behaviour, though differs from the
-        // behaviour of Map.fold_right which folds right-to-left.
-        let rec fold f m x = 
-            match m with 
-            | SetNode(k,l,r,h) -> fold f r (f k (fold f l x))
-#if ONE
-            | SetOne(k) -> f k x
-#endif
-            | SetEmpty -> x                
-
-        let rec foldr f m x = 
-            match m with 
-            | SetNode(k,l,r,h) -> foldr f l (f k (foldr f r x))
-#if ONE
-            | SetOne(k) -> f k x
-#endif
-            | SetEmpty -> x
-
-        let rec for_all f m = 
-            match m with 
-            | SetNode(k2,l,r,h) -> f k2 && for_all f l && for_all f r
-#if ONE
-            | SetOne(k2) -> f k2
-#endif
-            | SetEmpty -> true          
-
-        let rec exists f m = 
-            match m with 
-            | SetNode(k2,l,r,h) -> f k2 || exists f l || exists f r
-#if ONE
-            | SetOne(k2) -> f k2
-#endif
-            | SetEmpty -> false         
-
-        let is_empty m = match m with  | SetEmpty -> true | _ -> false
-
-        let subset comparer a b  = for_all (fun x -> mem comparer x b) a
-
-        let rec elementsAux m acc = 
-            match m with 
-            | SetNode(k2,l,r,_) -> k2 :: (elementsAux l (elementsAux r acc))
-#if ONE
-            | SetOne(k2) -> k2 :: acc
-#endif
-            | SetEmpty -> acc                
-
-        let elements a  = elementsAux a []
-
-        let rec filterAux comparer f s acc = 
-            match s with 
-            | SetNode(k,l,r,_) -> 
-                let acc = if f k then add comparer k acc else acc 
-                filterAux comparer f l (filterAux comparer f r acc)
-#if ONE
-            | SetOne(k) -> if f k then add comparer k acc else acc
-#endif
-            | SetEmpty -> acc           
-
-        let filter comparer f s = filterAux comparer f s empty
-
-        let rec diffAux comparer m acc = 
-            match m with 
-            | SetNode(k,l,r,_) -> diffAux comparer l (diffAux comparer r (remove comparer k acc))
-#if ONE
-            | SetOne(k) -> remove comparer k acc
-#endif
-            | SetEmpty -> acc           
-
-        let diff comparer a b = diffAux comparer b a
-
-        let rec cardinalAux s acc = 
-            match s with 
-            | SetNode(k,l,r,_) -> cardinalAux l (cardinalAux r (acc+1))
-#if ONE
-            | SetOne(k) -> acc+1
-#endif
-            | SetEmpty -> acc           
-
-        let cardinal s = cardinalAux s 0
-        let size s = cardinal s 
-
-        let rec union comparer t1 t2 =
-            // Perf: tried bruteForce for low heights, but nothing significant 
-            match t1,t2 with               
-            | SetNode(k1,t11,t12,h1),SetNode(k2,t21,t22,h2) -> // (t11 < k < t12) AND (t21 < k2 < t22) 
-                // Divide and Quonquer:
-                //   Suppose t1 is largest.
-                //   Split t2 using pivot k1 into lo and hi.
-                //   Union disjoint subproblems and then combine. 
-                if h1 > h2 then
-                  let lo,_,hi = split comparer k1 t2 in
-                  balance comparer (union comparer t11 lo) k1 (union comparer t12 hi)
-                else
-                  let lo,_,hi = split comparer k2 t1 in
-                  balance comparer (union comparer t21 lo) k2 (union comparer t22 hi)
-            | SetEmpty,t -> t
-            | t,SetEmpty -> t
-#if ONE
-            | SetOne k1,t2 -> add comparer k1 t2
-            | t1,SetOne k2 -> add comparer k2 t1
-#endif
-
-        let rec intersectionAux comparer b m acc = 
-            match m with 
-            | SetNode(k,l,r,_) -> 
-                let acc = intersectionAux comparer b r acc 
-                let acc = if mem comparer k b then add comparer k acc else acc 
-                intersectionAux comparer b l acc
-#if ONE
-            | SetOne(k) -> 
-                if mem comparer k b then add comparer k acc else acc
-#endif
-            | SetEmpty -> acc
-
-        let intersection comparer a b = intersectionAux comparer b a empty
-
-        let partition1 comparer f k (acc1,acc2) = if f k then (add comparer k acc1,acc2) else (acc1,add comparer k acc2) 
-        
-        let rec partitionAux comparer f s acc = 
-            match s with 
-            | SetNode(k,l,r,_) -> 
-                let acc = partitionAux comparer f r acc 
-                let acc = partition1 comparer f k acc
-                partitionAux comparer f l acc
-#if ONE
-            | SetOne(k) -> partition1 comparer f k acc
-#endif
-            | SetEmpty -> acc           
-
-        let partition comparer f s = partitionAux comparer f s (empty,empty)
-
-        // It's easier to get many less-important algorithms right using this active pattern
-        let (|MatchSetNode|MatchSetEmpty|) s = 
-            match s with 
-            | SetNode(k2,l,r,_) -> MatchSetNode(k2,l,r)
-#if ONE
-            | SetOne(k2) -> MatchSetNode(k2,SetEmpty,SetEmpty)
-#endif
-            | SetEmpty -> MatchSetEmpty
-        
-        let rec nextElemCont (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) k s cont = 
-            match s with 
-            | MatchSetNode(k2,l,r) -> 
-                let c = comparer.Invoke(k,k2) 
-                if   c < 0 then nextElemCont comparer k l (function None -> cont(Some(k2)) | res -> res)
-                elif c = 0 then cont(minimumElementOpt r) 
-                else nextElemCont comparer k r cont
-            | MatchSetEmpty -> cont(None)
-
-        and nextElem comparer k s = nextElemCont comparer k s (fun res -> res)
-        
-        and prevElemCont (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) k s cont = 
-            match s with 
-            | MatchSetNode(k2,l,r) -> 
-                let c = comparer.Invoke(k,k2) 
-                if   c > 0 then prevElemCont comparer k r (function None -> cont(Some(k2)) | res -> res)
-                elif c = 0 then cont(maximumElementOpt r) 
-                else prevElemCont comparer k l cont
-            | MatchSetEmpty -> cont(None)
-
-        and prevElem comparer k s = prevElemCont comparer k s (fun res -> res)
-        
-        and minimumElementAux s n = 
-            match s with 
-            | SetNode(k,l,r,_) -> minimumElementAux l k
-#if ONE
-            | SetOne(k) -> k
-#endif
-            | SetEmpty -> n
-
-        and minimumElementOpt s = 
-            match s with 
-            | SetNode(k,l,r,_) -> Some(minimumElementAux l k)
-#if ONE
-            | SetOne(k) -> Some k
-#endif
-            | SetEmpty -> None
-
-        and maximumElementAux s n = 
-            match s with 
-            | SetNode(k,l,r,_) -> maximumElementAux r k
-#if ONE
-            | SetOne(k) -> k
-#endif
-            | SetEmpty -> n             
-
-        and maximumElementOpt s = 
-            match s with 
-            | SetNode(k,l,r,_) -> Some(maximumElementAux r k)
-#if ONE
-            | SetOne(k) -> Some(k)
-#endif
-            | SetEmpty -> None
-
-        let minimumElement s = 
-            match minimumElementOpt s with 
-            | Some(k) -> k
-            | None -> failwith "minimumElement"            
-
-        let maximumElement s = 
-            match maximumElementOpt s with 
-            | Some(k) -> k
-            | None -> failwith "maximumElement"
-
-
-        //--------------------------------------------------------------------------
-        // Imperative left-to-right iterators.
-        //--------------------------------------------------------------------------
-
-        type 'a iterator = { mutable stack: SetTree<'a> list;  // invariant: always collapseLHS result 
-                             mutable started : bool           // true when MoveNext has been called   
-                           }
-
-        // collapseLHS:
-        // a) Always returns either [] or a list starting with SetOne.
-        // b) The "fringe" of the set stack is unchanged.
-        let rec collapseLHS stack =
-            match stack with
-            | []                       -> []
-            | SetEmpty         :: rest -> collapseLHS rest
-#if ONE
-            | SetOne k         :: rest -> stack
-#else
-            | SetNode(k,SetEmpty,SetEmpty,h) :: rest -> stack
-#endif
-            | SetNode(k,l,r,h) :: rest -> collapseLHS (l :: SetOne k :: r :: rest)
-          
-        let mkIterator s = { stack = collapseLHS [s]; started = false }
-
-        let not_started() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext."))
-        let already_finished() = raise (new System.InvalidOperationException("Enumeration already finished."))
-
-        let current i =
-            if i.started then
-                match i.stack with
-#if ONE
-                  | SetOne k :: _ -> k
-#else
-                  | SetNode( k,_,_,_) :: _ -> k
-#endif
-                  | []            -> already_finished()
-                  | _             -> failwith "Please report error: Set iterator, unexpected stack for current"
-            else
-                not_started()
-
-        let rec moveNext i =
-            if i.started then
-                match i.stack with
-#if ONE
-                  | SetOne k :: rest -> 
-#else
-                  | SetNode(k,_,_,_) :: rest -> 
-#endif
-                        i.stack <- collapseLHS rest;
-                        i.stack <> []
-                  | [] -> false
-                  | _ -> failwith "Please report error: Set iterator, unexpected stack for moveNext"
-            else
-                i.started <- true;  // The first call to MoveNext "starts" the enumeration.
-                i.stack <> []
-
-        let mkIEnumerator s = 
-            let i = ref (mkIterator s) 
-            { new IEnumerator<_> with 
-                  member x.Current = current !i
-              interface System.Collections.IEnumerator with 
-                  member x.Current = box (current !i)
-                  member x.MoveNext() = moveNext !i
-                  member x.Reset() = i :=  mkIterator s
-              interface System.IDisposable with 
-                  member x.Dispose() = () }
-
-        //--------------------------------------------------------------------------
-        // Set comparison.  This can be expensive.
-        //--------------------------------------------------------------------------
-
-        let rec compareStacks (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) l1 l2 =
-            match l1,l2 with 
-            | [],[] ->  0
-            | [],_  -> -1
-            | _ ,[] ->  1
-            | (SetEmpty  _ :: t1),(SetEmpty    :: t2) -> compareStacks comparer t1 t2
-#if ONE
-            | (SetOne(n1k) :: t1),(SetOne(n2k) :: t2) -> 
-                 let c = comparer.Invoke(n1k,n2k) 
-                 if c <> 0 then c else compareStacks comparer t1 t2
-            | (SetOne(n1k) :: t1),(SetNode(n2k,SetEmpty,n2r,_) :: t2) -> 
-                 let c = comparer.Invoke(n1k,n2k) 
-                 if c <> 0 then c else compareStacks comparer (empty :: t1) (n2r :: t2)
-            | (SetNode(n1k,(SetEmpty as emp),n1r,_) :: t1),(SetOne(n2k) :: t2) -> 
-                 let c = comparer.Invoke(n1k,n2k) 
-                 if c <> 0 then c else compareStacks comparer (n1r :: t1) (emp :: t2)
-#endif
-            | (SetNode(n1k,(SetEmpty as emp),n1r,_) :: t1),(SetNode(n2k,SetEmpty,n2r,_) :: t2) -> 
-                 let c = comparer.Invoke(n1k,n2k) 
-                 if c <> 0 then c else compareStacks comparer (n1r :: t1) (n2r :: t2)
-#if ONE
-            | (SetOne(n1k) :: t1),_ -> 
-                compareStacks comparer (empty :: SetOne(n1k) :: t1) l2
-#endif
-            | (SetNode(n1k,n1l,n1r,_) :: t1),_ -> 
-                compareStacks comparer (n1l :: SetNode(n1k,empty,n1r,0) :: t1) l2
-#if ONE
-            | _,(SetOne(n2k) :: t2) -> 
-                compareStacks comparer l1 (empty :: SetOne(n2k) :: t2)
-#endif
-            | _,(SetNode(n2k,n2l,n2r,_) :: t2) -> 
-                compareStacks comparer l1 (n2l :: SetNode(n2k,empty,n2r,0) :: t2)
-                
-        let compare comparer s1 s2 = 
-            match s1,s2 with 
-            | SetEmpty,SetEmpty -> 0
-            | SetEmpty,_ -> -1
-            | _,SetEmpty -> 1
-            | _ -> compareStacks comparer [s1] [s2]
-
-        let choose s = minimumElement s
-
-        let to_list s = 
-            let rec loop m x = 
-                match m with 
-                | SetNode(k,l,r,h) -> loop l (k :: (loop r x))
-#if ONE
-                | SetOne(k) -> k :: x
-#endif
-                | SetEmpty -> x
-            loop s []            
-
-        let copyToArray s (arr: _[]) i =
-            let j = ref i 
-            iter (fun x -> arr.[!j] <- x; j := !j + 1) s
-
-        let to_array s = 
-            let n = (cardinal s) 
-            let res = Array.zeroCreate n 
-            copyToArray s res 0;
-            res
-
-        let rec mkFromEnumerator comparer acc (e : IEnumerator<_>) = 
-            if e.MoveNext() then 
-              mkFromEnumerator comparer (add comparer e.Current acc) e
-            else acc
-          
-        let of_seq comparer (c : IEnumerable<_>) =
-            use ie = c.GetEnumerator()
-            mkFromEnumerator comparer empty ie 
-
-        let of_array comparer l = Array.fold (fun acc k -> add comparer k acc) empty l    
-
-
-    []
-    type MapTree<'key,'a> = 
-        | MapEmpty 
-#if ONE 
-        | MapOne of 'key * 'a
-#endif
-        // Note: performance rumour has it that the data held in this node should be
-        // exactly one cache line. It is currently ~7 words. Thus it might be better to
-        // move to a n-way tree.
-        | MapNode of 'key * 'a * MapTree<'key,'a> *  MapTree<'key,'a> * int
-
-
-    module RawMapOps = 
-
-        let empty = MapEmpty 
-
-        let inline height x  = 
-          match x with 
-          | MapEmpty -> 0
-#if ONE 
-          | MapOne _ -> 1
-#endif
-          | MapNode(_,_,_,_,h) -> h
-
-        let is_empty m = 
-            match m with 
-            | MapEmpty -> true
-            | _ -> false
-
-        let mk l k v r = 
-#if ONE 
-            match l,r with 
-            | MapEmpty,MapEmpty -> MapOne(k,v)
-            | _ -> 
-#endif
-                let hl = height l 
-                let hr = height r 
-                let m = if hl < hr then hr else hl 
-                MapNode(k,v,l,r,m+1)
-
-        let rebalance t1 k v t2 =
-            let t1h = height t1 
-            if  height t2 > t1h + 2 then (* right is heavier than left *)
-                match t2 with 
-                | MapNode(t2k,t2v,t2l,t2r,t2h) -> 
-                   (* one of the nodes must have height > height t1 + 1 *)
-                   if height t2l > t1h + 1 then  (* balance left: combination *)
-                     match t2l with 
-                     | MapNode(t2lk,t2lv,t2ll,t2lr,t2lh) ->
-                        mk (mk t1 k v t2ll) t2lk t2lv (mk t2lr t2k t2v t2r) 
-                     | _ -> failwith "rebalance"
-                   else (* rotate left *)
-                     mk (mk t1 k v t2l) t2k t2v t2r
-                | _ -> failwith "rebalance"
-            else
-                let t2h = height t2 
-                if  t1h > t2h + 2 then (* left is heavier than right *)
-                  match t1 with 
-                  | MapNode(t1k,t1v,t1l,t1r,t1h) -> 
-                    (* one of the nodes must have height > height t2 + 1 *)
-                      if height t1r > t2h + 1 then 
-                      (* balance right: combination *)
-                        match t1r with 
-                        | MapNode(t1rk,t1rv,t1rl,t1rr,t1rh) ->
-                            mk (mk t1l t1k t1v t1rl) t1rk t1rv (mk t1rr k v t2)
-                        | _ -> failwith "rebalance"
-                      else
-                        mk t1l t1k t1v (mk t1r k v t2)
-                  | _ -> failwith "rebalance"
-                else mk t1 k v t2
-
-        let rec sizeAux acc m = 
-            match m with  
-            | MapEmpty -> acc
-#if ONE 
-            | MapOne _ -> acc + 1
-#endif
-            | MapNode(k2,v2,l,r,h) -> sizeAux (sizeAux (acc+1) l) r 
-
-#if ONE 
-#else
-        let MapOne(k,v) = MapNode(k,v,MapEmpty,MapEmpty,1)
-#endif
-        
-        let size x = sizeAux 0 x
-
-        let rec add (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) k v m = 
-            match m with 
-            | MapEmpty -> MapOne(k,v)
-#if ONE 
-            | MapOne(k2,v2) -> 
-                let c = comparer.Invoke(k,k2) 
-                if c < 0   then MapNode (k,v,MapEmpty,m,2)
-                elif c = 0 then MapOne(k,v)
-                else            MapNode (k,v,m,MapEmpty,2)
-#endif
-            | MapNode(k2,v2,l,r,h) -> 
-                let c = comparer.Invoke(k,k2) 
-                if c < 0 then rebalance (add comparer k v l) k2 v2 r
-                elif c = 0 then MapNode(k,v,l,r,h)
-                else rebalance l k2 v2 (add comparer k v r) 
-
-        let indexNotFound() = raise (new System.Collections.Generic.KeyNotFoundException("An index satisfying the predicate was not found in the collection"))
-
-        let rec find (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) k m = 
-            match m with 
-            | MapEmpty -> indexNotFound()
-#if ONE 
-            | MapOne(k2,v2) -> 
-                let c = comparer.Invoke(k,k2) 
-                if c = 0 then v2
-                else indexNotFound()
-#endif
-            | MapNode(k2,v2,l,r,_) -> 
-                let c = comparer.Invoke(k,k2) 
-                if c < 0 then find comparer k l
-                elif c = 0 then v2
-                else find comparer k r
-
-        let rec tryfind (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) k m = 
-            match m with 
-            | MapEmpty -> None
-#if ONE 
-            | MapOne(k2,v2) -> 
-                let c = comparer.Invoke(k,k2) 
-                if c = 0 then Some v2
-                else None
-#endif
-            | MapNode(k2,v2,l,r,_) -> 
-                let c = comparer.Invoke(k,k2) 
-                if c < 0 then tryfind comparer k l
-                elif c = 0 then Some v2
-                else tryfind comparer k r
-
-        let partition1 (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) f k v (acc1,acc2) = 
-            if f k v then (add comparer k v acc1,acc2) else (acc1,add comparer k v acc2) 
-        
-        let rec partitionAux (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) f s acc = 
-            match s with 
-            | MapEmpty -> acc
-#if ONE 
-            | MapOne(k,v) -> partition1 comparer f k v acc
-#endif
-            | MapNode(k,v,l,r,_) -> 
-                let acc = partitionAux comparer f r acc 
-                let acc = partition1 comparer f k v acc
-                partitionAux comparer f l acc
-
-        let partition (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) f s = partitionAux comparer f s (empty,empty)
-
-        let filter1 (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) f k v acc = if f k v then add comparer k v acc else acc 
-
-        let rec filterAux (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) f s acc = 
-            match s with 
-            | MapEmpty -> acc
-#if ONE 
-            | MapOne(k,v) -> filter1 comparer f k v acc
-#endif
-            | MapNode(k,v,l,r,_) ->
-                let acc = filterAux comparer f l acc
-                let acc = filter1 comparer f k v acc
-                filterAux comparer f r acc
-
-        let filter (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) f s = filterAux comparer f s empty
-
-        let rec spliceOutSuccessor m = 
-            match m with 
-            | MapEmpty -> failwith "internal error: Map.splice_out_succ_or_pred"
-#if ONE 
-            | MapOne(k2,v2) -> k2,v2,MapEmpty
-#endif
-            | MapNode(k2,v2,l,r,_) ->
-                match l with 
-                | MapEmpty -> k2,v2,r
-                | _ -> let k3,v3,l' = spliceOutSuccessor l in k3,v3,mk l' k2 v2 r
-
-        let rec remove (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) k m = 
-            match m with 
-            | MapEmpty -> empty
-#if ONE 
-            | MapOne(k2,v2) -> 
-                let c = comparer.Invoke(k,k2) 
-                if c = 0 then MapEmpty else m
-#endif
-            | MapNode(k2,v2,l,r,_) -> 
-                let c = comparer.Invoke(k,k2) 
-                if c < 0 then rebalance (remove comparer k l) k2 v2 r
-                elif c = 0 then 
-                  match l,r with 
-                  | MapEmpty,_ -> r
-                  | _,MapEmpty -> l
-                  | _ -> 
-                      let sk,sv,r' = spliceOutSuccessor r 
-                      mk l sk sv r'
-                else rebalance l k2 v2 (remove comparer k r) 
-
-        let rec mem (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) k m = 
-            match m with 
-            | MapEmpty -> false
-#if ONE 
-            | MapOne(k2,v2) -> (comparer.Invoke(k,k2) = 0)
-#endif
-            | MapNode(k2,v2,l,r,_) -> 
-                let c = comparer.Invoke(k,k2) 
-                if c < 0 then mem comparer k l
-                else (c = 0 || mem comparer k r)
-
-        let rec iter f m = 
-            match m with 
-            | MapEmpty -> ()
-#if ONE 
-            | MapOne(k2,v2) -> f k2 v2
-#endif
-            | MapNode(k2,v2,l,r,_) -> iter f l; f k2 v2; iter f r
-
-        let rec first f m = 
-            match m with 
-            | MapEmpty -> None
-#if ONE 
-            | MapOne(k2,v2) -> f k2 v2 
-#endif
-            | MapNode(k2,v2,l,r,_) -> 
-                match first f l with 
-                | Some x as res -> res 
-                | None -> 
-                match f k2 v2 with 
-                | Some x as res -> res 
-                | None -> first f r
-
-        let rec exists f m = 
-            match m with 
-            | MapEmpty -> false
-#if ONE 
-            | MapOne(k2,v2) -> f k2 v2
-#endif
-            | MapNode(k2,v2,l,r,_) -> f k2 v2 || exists f l || exists f r
-
-        let rec for_all f m = 
-            match m with 
-            | MapEmpty -> true
-#if ONE 
-            | MapOne(k2,v2) -> f k2 v2
-#endif
-            | MapNode(k2,v2,l,r,_) -> f k2 v2 && for_all f l && for_all f r
-
-        let rec map f m = 
-            match m with 
-            | MapEmpty -> empty
-#if ONE 
-            | MapOne(k,v) -> MapOne(k,f v)
-#endif
-            | MapNode(k,v,l,r,h) -> let v2 = f v in MapNode(k,v2,map f l, map f r,h)
-
-        let rec mapi f m = 
-            match m with
-            | MapEmpty -> empty
-#if ONE 
-            | MapOne(k,v) -> MapOne(k,f k v)
-#endif
-            | MapNode(k,v,l,r,h) -> let v2 = f k v in MapNode(k,v2, mapi f l, mapi f r,h)
-
-        // Fold, right-to-left. 
-        //
-        // NOTE: This matches OCaml behaviour, when last checked with OCaml 3.08.
-        // However it differs from the behaviour of Set.fold which folds left-to-right.
-        let rec fold f m x = 
-            match m with 
-            | MapEmpty -> x
-#if ONE 
-            | MapOne(k,v) -> f k v x
-#endif
-            | MapNode(k,v,l,r,h) -> fold f l (f k v (fold f r x))
-
-        let foldSection (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) lo hi f m x =
-            let rec fold_from_to f m x = 
-                match m with 
-                | MapEmpty -> x
-#if ONE 
-                | MapOne(k,v) ->
-                    let clo_k = comparer.Invoke(lo,k)
-                    let ck_hi = comparer.Invoke(k,hi)
-                    let x = if clo_k <= 0 && ck_hi <= 0 then f k v x else x
-                    x
-#endif
-                | MapNode(k,v,l,r,h) ->
-                    let clo_k = comparer.Invoke(lo,k)
-                    let ck_hi = comparer.Invoke(k,hi)
-                    let x = if clo_k < 0                then fold_from_to f l x else x
-                    let x = if clo_k <= 0 && ck_hi <= 0 then f k v x                     else x
-                    let x = if ck_hi < 0                then fold_from_to f r x else x
-                    x
-           
-            if comparer.Invoke(lo,hi) = 1 then x else fold_from_to f m x
-
-        let rec fmap (comparer: OptimizedClosures.FastFunc2<'a,'a,int>) f m z acc = 
-            match m with 
-            | MapEmpty -> acc,z
-#if ONE 
-            | MapOne(k,v) -> 
-                let v',z = f k v z
-                add comparer k v' acc,z
-#endif
-            | MapNode(k,v,l,r,h) -> 
-                let acc,z = fmap comparer f r z acc
-                let v',z = f k v z
-                let acc = add comparer k v' acc 
-                fmap comparer f l z acc
-
-        let to_list m = fold (fun k v acc -> (k,v) :: acc) m []
-        let to_array m = m |> to_list |> Array.of_list
-        let of_list comparer l = List.fold (fun acc (k,v) -> add comparer k v acc) empty l
-
-        
-        let rec mkFromEnumerator comparer acc (e : IEnumerator<_>) = 
-            if e.MoveNext() then 
-                let (x,y) = e.Current 
-                mkFromEnumerator comparer (add comparer x y acc) e
-            else acc
-          
-        let of_seq comparer (c : seq<_>) =
-            use ie = c.GetEnumerator()
-            mkFromEnumerator comparer empty ie 
-          
-        let copyToArray s (arr: _[]) i =
-            let j = ref i 
-            s |> iter (fun x y -> arr.[!j] <- KeyValuePair(x,y); j := !j + 1)
-
-
-        /// Imperative left-to-right iterators.
-        type iterator<'key,'a> = 
-             { /// invariant: always collapseLHS result 
-               mutable stack:  MapTree<'key,'a> list;  
-               /// true when MoveNext has been called   
-               mutable started : bool }
-
-        // collapseLHS:
-        // a) Always returns either [] or a list starting with SetOne.
-        // b) The "fringe" of the set stack is unchanged. 
-        let rec collapseLHS stack =
-            match stack with
-            | []                           -> []
-            | MapEmpty             :: rest -> collapseLHS rest
-#if ONE 
-            | MapOne (k,v)         :: rest -> stack
-#else
-            | (MapNode(k,v,MapEmpty,MapEmpty,h)) :: rest -> stack
-#endif
-            | (MapNode(k,v,l,r,h)) :: rest -> collapseLHS (l :: MapOne (k,v) :: r :: rest)
-          
-        let mkIterator s = { stack = collapseLHS [s]; started = false }
-
-        let not_started() = raise (new System.InvalidOperationException("Enumeration has not started. Call MoveNext."))
-        let already_finished() = raise (new System.InvalidOperationException("Enumeration already finished."))
-
-        let current i =
-            if i.started then
-                match i.stack with
-#if ONE
-                  | MapOne (k,v) :: _ -> new KeyValuePair<_,_>(k,v)
-#else
-                  | (MapNode(k,v,MapEmpty,MapEmpty,h)) :: rest -> new KeyValuePair<_,_>(k,v)
-#endif
-                  | []            -> already_finished()
-                  | _             -> failwith "Please report error: Map iterator, unexpected stack for current"
-            else
-                not_started()
-
-        let rec moveNext i =
-          if i.started then
-            match i.stack with
-#if ONE
-              | MapOne _ :: rest -> 
-#else
-              | (MapNode(_,_,MapEmpty,MapEmpty,_)) :: rest -> 
-#endif
-                  i.stack <- collapseLHS rest;
-                  i.stack <> []
-              | [] -> false
-              | _ -> failwith "Please report error: Map iterator, unexpected stack for moveNext"
-          else
-              i.started <- true;  (* The first call to MoveNext "starts" the enumeration. *)
-              i.stack <> []
-
-        let mkIEnumerator s = 
-          let i = ref (mkIterator s) 
-          { new IEnumerator<_> with 
-                member self.Current = current !i
-            interface System.Collections.IEnumerator with
-                member self.Current = box (current !i)
-                member self.MoveNext() = moveNext !i
-                member self.Reset() = i :=  mkIterator s
-            interface System.IDisposable with 
-                member self.Dispose() = ()}
-
-    []
-    type Set<'a,'comparerTag> when 'comparerTag :> IComparer<'a> = 
-        { comparer: OptimizedClosures.FastFunc2<'a,'a,int>;
-          tree: SetTree<'a> }
-        interface System.IComparable 
-        interface ICollection<'a> 
-        interface IEnumerable<'a> 
-        interface System.Collections.IEnumerable
-        override this.Equals(that) = 
-            match that with
-            // Cast to the exact same type as this, otherwise not equal.
-            | :? Set<'a,'comparerTag> as that -> ((this :> System.IComparable).CompareTo(that) = 0)
-            | _ -> false
-
-    open RawSetOps
-    module SetOps = 
-        let baked comparer t = { comparer=comparer ; tree=t }
-        let refresh s t      = { comparer=s.comparer; tree=t }
-        let fresh comparer   = baked comparer empty
-
-    open SetOps
-
-    type Set<'a,'comparerTag> with 
-
-        static member Empty(comparer: 'comparerTag) : Set<'a,'comparerTag> =  
-            let comparer =  ComparisonIdentity.GetFastComparisonFunction(comparer)
-            fresh comparer
-
-        member s.Add(x) : Set<'a,'comparerTag> = refresh s (add s.comparer x s.tree)
-        member s.Remove(x) : Set<'a,'comparerTag> = refresh s (remove s.comparer x s.tree)
-        member s.Count = size s.tree
-        member s.Contains(x) = mem s.comparer  x s.tree
-        member s.Iterate(x) = iter  x s.tree
-        member s.Fold f x  = fold f s.tree x
-
-#if CHECKED
-        member s.CheckBalanceInvariant = checkInvariant s.tree // diagnostics...
-#endif
-        member s.IsEmpty  = is_empty s.tree
-
-        member s.Partition f  : Set<'a,'comparerTag> *  Set<'a,'comparerTag> = 
-            match s.tree with 
-            | SetEmpty -> s,s
-            | _ -> let t1,t2 = partition s.comparer f s.tree in refresh s t1, refresh s t2
-
-        member s.Filter f  : Set<'a,'comparerTag> = 
-            match s.tree with 
-            | SetEmpty -> s
-            | _ -> filter s.comparer f s.tree |> refresh s
-
-        member s.Exists f = exists f s.tree
-
-        member s.ForAll f = for_all f s.tree
-
-        static member (-) ((a: Set<'a,'comparerTag>),(b: Set<'a,'comparerTag>)) = Set<_,_>.Difference(a,b)
-
-        static member (+)  ((a: Set<'a,'comparerTag>),(b: Set<'a,'comparerTag>)) = Set<_,_>.Union(a,b)
-
-        static member Intersection((a: Set<'a,'comparerTag>),(b: Set<'a,'comparerTag>)) : Set<'a,'comparerTag>  = 
-            match b.tree with 
-            | SetEmpty -> b  (* A INTER 0 = 0 *)
-            | _ -> 
-               match a.tree with 
-               | SetEmpty -> a (* 0 INTER B = 0 *)
-               | _ -> intersection a.comparer  a.tree b.tree |> refresh a
-           
-        static member Union((a: Set<'a,'comparerTag>),(b: Set<'a,'comparerTag>)) : Set<'a,'comparerTag>  = 
-            match b.tree with 
-            | SetEmpty -> a  (* A U 0 = A *)
-            | _ -> 
-               match a.tree with 
-               | SetEmpty -> b  (* 0 U B = B *)
-               | _ -> union a.comparer  a.tree b.tree |> refresh a
-
-        static member Difference((a: Set<'a,'comparerTag>),(b: Set<'a,'comparerTag>)) : Set<'a,'comparerTag>  = 
-            match a.tree with 
-            | SetEmpty -> a (* 0 - B = 0 *)
-            | _ -> 
-                match b.tree with 
-                | SetEmpty -> a (* A - 0 = A *)
-                | _ -> diff a.comparer  a.tree b.tree |> refresh a
-
-        static member Equality((a: Set<'a,'comparerTag>),(b: Set<'a,'comparerTag>)) = 
-            (RawSetOps.compare a.comparer  a.tree b.tree = 0)
-
-        static member Compare((a: Set<'a,'comparerTag>),(b: Set<'a,'comparerTag>)) = 
-            RawSetOps.compare a.comparer  a.tree b.tree
-
-        member x.Choose = choose x.tree
-
-        member x.MinimumElement = minimumElement x.tree
-
-        member x.MaximumElement = maximumElement x.tree
-
-        member x.IsSubsetOf((y: Set<'a,'comparerTag>)) = subset x.comparer x.tree y.tree 
-
-        member x.IsSupersetOf((y: Set<'a,'comparerTag>)) = subset x.comparer y.tree x.tree
-
-        member x.ToList () = to_list x.tree
-
-        member x.ToArray () = to_array x.tree
-
-        interface System.IComparable with
-            // Cast s2 to the exact same type as s1, see 4884.
-            // It is not OK to cast s2 to seq<'a>, since different compares could permute the elements.
-            member s1.CompareTo(s2: obj) = RawSetOps.compare s1.comparer s1.tree ((s2 :?> Set<'a,'comparerTag>).tree)
-
-        member this.ComputeHashCode() = 
-                let combineHash x y = (x <<< 1) + y + 631 
-                let mutable res = 0
-                for x in this do
-                    res <- combineHash res (hash x)
-                abs res
-
-        override this.GetHashCode() = this.ComputeHashCode()
-          
-        interface ICollection<'a> with 
-            member s.Add(x) = raise (new System.NotSupportedException("ReadOnlyCollection"))
-            member s.Clear() = raise (new System.NotSupportedException("ReadOnlyCollection"))
-            member s.Remove(x) = raise (new System.NotSupportedException("ReadOnlyCollection"))
-            member s.Contains(x) = mem s.comparer x s.tree
-            member s.CopyTo(arr,i) = copyToArray s.tree arr i
-            member s.get_IsReadOnly() = true
-            member s.get_Count() = cardinal s.tree  
-
-        interface IEnumerable<'a> with
-            member s.GetEnumerator() = mkIEnumerator s.tree
-
-        interface System.Collections.IEnumerable with
-            override s.GetEnumerator() = (mkIEnumerator s.tree :> System.Collections.IEnumerator)
-
-        static member Singleton(comparer,x) : Set<'a,'comparerTag>  = 
-            Set<_,_>.Empty(comparer).Add(x)
-
-        static member Create(comparer : 'comparerTag,l : seq<'a>) : Set<'a,'comparerTag> = 
-            let comparer =  ComparisonIdentity.GetFastComparisonFunction(comparer)
-            baked comparer (of_seq comparer l)
-
-
-    open RawMapOps
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-    []
-#endif
-    []
-    type Map<'key,'a,'comparerTag> when 'comparerTag :> IComparer<'key> =  
-        { comparer: OptimizedClosures.FastFunc2<'key,'key,int>; 
-          tree: MapTree<'key,'a> }
-        interface System.IComparable
-        interface IEnumerable>
-        interface System.Collections.IEnumerable
-        override this.Equals(that) = 
-            match that with
-            // Cast to the exact same type as this, otherwise not equal.
-            | :? Map<'key,'a,'comparerTag> as that -> ((this :> System.IComparable).CompareTo(that) = 0)
-            | _ -> false
-
-    module MapOps = 
-        let baked comparer t =     { comparer=comparer; tree=t }
-        let fresh comparer =       baked comparer empty 
-        let refresh s t =    { comparer=s.comparer;tree=t }
-
-    open MapOps 
-
-    type Map<'key,'a,'comparerTag> with 
-        static member Empty(comparer : ('comparerTag :> IComparer<'key>)) : Map<'key,'a,'comparerTag> = 
-            let comparer =  ComparisonIdentity.GetFastComparisonFunction(comparer)
-            fresh comparer
-        member m.Add(k,v) : Map<'key,'a,'comparerTag> = refresh m (add m.comparer k v m.tree)
-        member m.IsEmpty = is_empty m.tree
-        member m.Item with get(k : 'key) = find m.comparer k m.tree
-        member m.First(f) = first f m.tree 
-        member m.Exists(f) = exists f m.tree 
-        member m.Filter(f)  : Map<'key,'a,'comparerTag> = filter m.comparer f m.tree |> refresh m 
-        member m.ForAll(f) = for_all f m.tree 
-        member m.Fold f acc = fold f m.tree acc
-        member m.FoldSection (lo:'key) (hi:'key) f (acc:'z) = foldSection m.comparer lo hi f m.tree acc 
-        member m.FoldAndMap f z  : Map<'key,'b,'comparerTag> * _ = let tree,z = fmap m.comparer f m.tree z empty in refresh m tree,z
-        member m.Iterate f = iter f m.tree
-        member m.MapRange f  : Map<'key,'b,'comparerTag> = refresh m (map f m.tree)
-        member m.Map f  : Map<'key,'b,'comparerTag> = refresh m (mapi f m.tree)
-        member m.Partition(f)  : Map<'key,'a,'comparerTag> * Map<'key,'a,'comparerTag> = let r1,r2 = partition m.comparer f m.tree  in refresh m r1, refresh m r2
-        member m.Count = size m.tree
-        member m.ContainsKey(k) = mem m.comparer k m.tree
-        member m.Remove(k)  : Map<'key,'a,'comparerTag> = refresh m (remove m.comparer k m.tree)
-        member m.TryFind(k) = tryfind m.comparer k m.tree
-        member m.ToList() = to_list m.tree
-        member m.ToArray() = to_array m.tree
-
-        static member FromList((comparer : ('comparerTag :> IComparer<'key>)),l) : Map<'key,'a,'comparerTag> = 
-            let comparer =  ComparisonIdentity.GetFastComparisonFunction(comparer)
-            baked comparer (of_list comparer l)
-
-        static member Create((comparer : ('comparerTag :> IComparer<'key>)),(ie : IEnumerable<_>)) : Map<'key,'a,'comparerTag> = 
-            let comparer =  ComparisonIdentity.GetFastComparisonFunction(comparer)
-            baked comparer (of_seq comparer ie)
-    
-        interface IEnumerable> with
-            member s.GetEnumerator() = mkIEnumerator s.tree
-
-        interface System.Collections.IEnumerable with
-            override s.GetEnumerator() = (mkIEnumerator s.tree :> System.Collections.IEnumerator)
-
-        interface System.IComparable with 
-             member m1.CompareTo(m2: obj) = 
-                 Seq.compare 
-                   (fun (kvp1 : KeyValuePair<_,_>) (kvp2 : KeyValuePair<_,_>)-> 
-                       let c = m1.comparer.Invoke(kvp1.Key,kvp2.Key) in 
-                       if c <> 0 then c else Operators.compare kvp1.Value kvp2.Value)
-                   // Cast m2 to the exact same type as m1, see 4884.
-                   // It is not OK to cast m2 to seq>, since different compares could permute the KVPs.
-                   m1 (m2 :?> Map<'key,'a,'comparerTag>)
-
-        member this.ComputeHashCode() = 
-            let combineHash x y = (x <<< 1) + y + 631 
-            let mutable res = 0
-            for KeyValue(x,y) in this do
-                res <- combineHash res (hash x)
-                res <- combineHash res (hash y)
-            abs res
-
-        override this.GetHashCode() = this.ComputeHashCode()
-
-
-    type Map<'key,'a> = Map<'key, 'a, IComparer<'key>>    
-    type Set<'a> = Set<'a, IComparer<'a>>    
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedCollections.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedCollections.fsi
deleted file mode 100644
index 1c201ad0..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedCollections.fsi
+++ /dev/null
@@ -1,227 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities.Collections.Tagged
-#else
-/// This namespace contains FSharp.PowerPack extensions for the F# collection types
-namespace Microsoft.FSharp.Collections.Tagged
-#endif
-
-    open System
-    open System.Collections.Generic
-
-
-    /// Immutable sets based on binary trees, default tag
-    type Set<'a> = Set<'a, IComparer<'a>>    
-
-    /// Immutable sets where a constraint tag carries information about the class of key-comparer being used.  
-    and 
-      []
-      Set<'a,'comparerTag> when 'comparerTag :> IComparer<'a> =
-
-        /// A useful shortcut for Set.add.  Note this operation prodcues a new set
-        /// and does not mutate the original set.  The new set will share many storage
-        /// nodes with the original.  See the Set module for further operations on sets.
-        member Add : 'a -> Set<'a,'comparerTag>
-        
-        /// A useful shortcut for Set.remove.  Note this operation produces a new set
-        /// and does not mutate the original set.  The new set will share many storage
-        /// nodes with the original.  See the Set module for further operations on sets.
-        member Remove : 'a -> Set<'a,'comparerTag>
-        
-        /// Return the number of elements in the set
-        member Count : int
-        
-        /// A useful shortcut for Set.mem.  See the Set module for further operations on sets.
-        member Contains : 'a -> bool
-        
-        /// A useful shortcut for Set.is_empty.  See the Set module for further operations on sets.
-        member IsEmpty  : bool
-
-        /// Apply the given function to each binding in the collection
-        member Iterate : ('a -> unit) -> unit
-
-        /// Apply the given accumulating function to all the elements of the set
-        member Fold    : ('a -> 'b -> 'b) -> 'b -> 'b
-
-        /// Build two new sets, one containing the elements for which the given predicate returns 'true',
-        /// and the other the remaining elements.
-        member Partition: predicate:('a -> bool) -> Set<'a,'comparerTag> * Set<'a,'comparerTag>
-
-        /// Return a new collection containing only the elements of the collection
-        /// for which the given predicate returns "true"
-        member Filter: predicate:('a -> bool) -> Set<'a,'comparerTag> 
-
-        /// Test if any element of the collection satisfies the given predicate.
-        /// If the input function is f and the elements are i0...iN then computes 
-        /// p i0 or ... or p iN.
-        member Exists: predicate:('a -> bool) -> bool
-
-        /// Test if all elements of the collection satisfy the given predicate.
-        /// If the input function is f and the elements are i0...iN and j0...jN then 
-        /// computes p i0 && ... && p iN.
-        member ForAll: predicate:('a -> bool) -> bool
-
-        /// A set based on the given comparer containing the given initial elements
-        static member Create: 'comparerTag * seq<'a> -> Set<'a,'comparerTag> 
-        
-        /// The empty set based on the given comparer
-        static member Empty: 'comparerTag -> Set<'a,'comparerTag> 
-        
-        /// A singleton set based on the given comparison operator
-        static member Singleton: 'comparerTag * 'a -> Set<'a,'comparerTag> 
-        
-        /// Compares two sets and returns true if they are equal or false otherwise
-        static member Equality : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> bool
-        
-        /// Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b        
-        static member Compare : a:Set<'a,'comparerTag> * b:Set<'a,'comparerTag> -> int
-
-        /// Return a new set with the elements of the second set removed from the first.
-        static member (-) : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> Set<'a,'comparerTag> 
-
-        /// Compute the union of the two sets.
-        static member (+) : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> Set<'a,'comparerTag> 
-
-        /// Compute the intersection of the two sets.
-        static member Intersection : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> Set<'a,'comparerTag> 
-
-        /// Compute the union of the two sets.
-        static member Union : Set<'a,'comparerTag> * Set<'a,'comparerTag> -> Set<'a,'comparerTag>
-
-        /// Return a new set with the elements of the second set removed from the first.
-        static member Difference: Set<'a,'comparerTag> * Set<'a,'comparerTag> -> Set<'a,'comparerTag> 
-
-        /// The number of elements in the set
-        member Choose : 'a 
-
-        /// Returns the lowest element in the set according to the ordering being used for the set
-        member MinimumElement: 'a
-
-        /// Returns the highest element in the set according to the ordering being used for the set
-        member MaximumElement: 'a
-
-        /// Evaluates to "true" if all elements of the second set are in the first
-        member IsSubsetOf: Set<'a,'comparerTag> -> bool
-
-        /// Evaluates to "true" if all elements of the first set are in the second
-        member IsSupersetOf: Set<'a,'comparerTag> -> bool
-
-        /// The elements of the set as a list.
-        member ToList : unit -> 'a list
-        
-        /// The elements of the set as an array.
-        member ToArray: unit -> 'a array 
-
-        interface ICollection<'a> 
-        interface IEnumerable<'a> 
-        interface System.Collections.IEnumerable
-
-        interface System.IComparable
-        override Equals : obj -> bool
-
-
-    /// Immutable maps.  Keys are ordered by construction function specified
-    /// when creating empty maps or by F# structural comparison if no
-    /// construction function is specified.
-    ///
-    ///  
-    ///   Maps based on structural comparison are  
-    ///   efficient for small keys. They are not a suitable choice if keys are recursive data structures 
-    ///   or require non-structural comparison semantics.
-    /// 
-    type Map<'key,'a> = Map<'key, 'a, IComparer<'key>>    
-
-    /// Immutable maps.  A constraint tag carries information about the class of key-comparers being used.  
-    and  
-      []
-      Map<'key,'a,'comparerTag>  when 'comparerTag :> IComparer<'key> =
-        /// Return a new map with the binding added to the given map.
-        member Add: 'key * 'a -> Map<'key,'a,'comparerTag>
-
-        /// Return true if there are no bindings in the map.
-        member IsEmpty: bool
-
-        /// The empty map, and use the given comparer comparison function for all operations associated
-        /// with any maps built from this map.
-        static member Empty: 'comparerTag -> Map<'key,'a,'comparerTag>
-
-        static member FromList : 'comparerTag * ('key * 'a) list -> Map<'key,'a,'comparerTag>
-
-        /// Build a map that contains the bindings of the given IEnumerable
-        /// and where comparison of elements is based on the given comparison function
-        static member Create: 'comparerTag * seq<'key * 'a> -> Map<'key,'a,'comparerTag> 
-
-        /// Test is an element is in the domain of the map
-        member ContainsKey: 'key -> bool
-
-        /// The number of bindings in the map
-        member Count: int
-
-        /// Lookup an element in the map. Raise KeyNotFoundException if no binding
-        /// exists in the map.
-        member Item : 'key -> 'a with get
-
-        /// Search the map looking for the first element where the given function returns a Some value
-        member First: ('key -> 'a -> 'b option) -> 'b option
-
-        /// Return true if the given predicate returns true for all of the
-        /// bindings in the map. Always returns true if the map is empty.
-        member ForAll: ('key -> 'a -> bool) -> bool
-
-        /// Return true if the given predicate returns true for one of the
-        /// bindings in the map. Always returns false if the map is empty.
-        member Exists: ('key -> 'a -> bool) -> bool
-
-        /// Build a new map containing the bindings for which the given predicate returns 'true'.
-        member Filter: ('key -> 'a -> bool) -> Map<'key,'a,'comparerTag> 
-
-        /// Fold over the bindings in the map.  
-        member Fold: folder:('key -> 'a -> 'state -> 'state) -> 'state -> 'state
-
-        /// Given the start and end points of a key range,
-        /// Fold over the bindings in the map that are in the range,
-        /// and the end points are included if present (the range is considered a closed interval).
-        member FoldSection: 'key -> 'key -> ('key -> 'a -> 'state -> 'state) -> 'state -> 'state
-
-        /// Fold over the bindings in the map.  
-        member FoldAndMap: ('key -> 'a -> 'state -> 'b * 'state) -> 'state -> Map<'key,'b,'comparerTag> * 'state
-
-        /// Apply the given function to each binding in the dictionary
-        member Iterate: action:('key -> 'a -> unit) -> unit
-
-        /// Build a new collection whose elements are the results of applying the given function
-        /// to each of the elements of the collection. The index passed to the
-        /// function indicates the index of element being transformed.
-        member Map: mapping:('key -> 'a -> 'b) -> Map<'key,'b,'comparerTag>
-
-        /// Build a new collection whose elements are the results of applying the given function
-        /// to each of the elements of the collection.
-        member MapRange: mapping:('a -> 'b) -> Map<'key,'b,'comparerTag>
-
-        /// Build two new maps, one containing the bindings for which the given predicate returns 'true',
-        /// and the other the remaining bindings.
-        member Partition: ('key -> 'a -> bool) -> Map<'key,'a,'comparerTag> * Map<'key,'a,'comparerTag>
-
-        /// Remove an element from the domain of the map.  No exception is raised if the element is not present.
-        member Remove: 'key -> Map<'key,'a,'comparerTag>
-
-        /// Lookup an element in the map, returning a Some value if the element is in the domain 
-        /// of the map and None if not.
-        member TryFind: 'key -> 'a option
-
-        /// The elements of the set as a list.
-        member ToList : unit -> ('key * 'a) list
-    
-        /// The elements of the set as an array
-        member ToArray: unit -> ('key * 'a) array 
-
-        interface IEnumerable>
-        
-        interface System.Collections.IEnumerable 
-        interface System.IComparable
-        override Equals : obj -> bool
-
-  
-    
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedHash.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedHash.fs
deleted file mode 100644
index 1a3825a9..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedHash.fs
+++ /dev/null
@@ -1,68 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities.Collections.Tagged
-#else
-namespace Microsoft.FSharp.Collections.Tagged
-#endif
-
-    #nowarn "51"
-
-
-    open System
-    open System.Collections.Generic
-#if INTERNALIZED_POWER_PACK
-    open Internal.Utilities
-    open Internal.Utilities.Collections
-    type UntaggedHashMultiMap<'key,'v> = Internal.Utilities.Collections.HashMultiMap<'key,'v>
-#else
-    open Microsoft.FSharp.Collections
-    type UntaggedHashMultiMap<'key,'v> = Microsoft.FSharp.Collections.HashMultiMap<'key,'v>
-#endif
-
-    type HashMultiMap<'key,'v,'hashTag>
-         when 'hashTag :> IEqualityComparer<'key> =
-        { t : UntaggedHashMultiMap<'key,'v> }
-
-        static member Create(hasheq: 'hashTag,n:int)  : HashMultiMap<'key,'v,'hashTag> = 
-            { t = UntaggedHashMultiMap<_,_>.Create(hasheq,n) }
-
-        member x.Add(y,z) = x.t.Add(y,z)
-        member x.Clear() = x.t.Clear()
-        member x.Copy() : HashMultiMap<'key,'v,'hashTag>  = { t = x.t.Copy() }
-        member x.Item with get(y) = x.t.[y]
-                      and  set y z = x.t.[y] <- z
-        member x.FindAll(y) = x.t.FindAll(y) 
-        member x.Fold f acc =  x.t.Fold f acc
-        member x.Iterate(f) =  x.t.Iterate(f)
-        member x.Contains(y) = x.t.ContainsKey(y)
-        member x.ContainsKey(y) = x.t.ContainsKey(y)
-        member x.Remove(y) = x.t.Remove(y)
-        member x.Replace(y,z) = x.t.Replace(y,z)
-        member x.TryFind(y) = x.t.TryFind(y)
-        member x.Count = x.t.Count
-
-    []
-    type HashSet<'a,'hashTag> 
-         when 'hashTag :> IEqualityComparer<'a>(t:  HashSet<'a>) =
-
-        static member Create(hasheq: ('hashTag :> IEqualityComparer<'a>),size:int) : HashSet<'a,'hashTag> = 
-            new HashSet<'a,'hashTag>(HashSet<_>(size,hasheq))
-
-        member x.Add(y)    = t.Add(y)
-        member x.Clear() = t.Clear()
-        member x.Copy() = new HashSet<'a,'hashTag>(t.Copy())
-        member x.Fold f acc = t.Fold f acc
-        member x.Iterate(f) =  t.Iterate(f)
-        member x.Contains(y) = t.Contains(y)
-        member x.Remove(y) = t.Remove(y)
-        member x.Count = t.Count
-
-        interface IEnumerable<'a> with
-            member x.GetEnumerator() = (t :> seq<_>).GetEnumerator() 
-
-        interface System.Collections.IEnumerable with 
-            member x.GetEnumerator() = (t :> System.Collections.IEnumerable).GetEnumerator()  
-
-    type HashSet<'a> = HashSet<'a, IEqualityComparer<'a>>    
-    type HashMultiMap<'key,'a> = HashMultiMap<'key,'a, IEqualityComparer<'key>>    
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedHash.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedHash.fsi
deleted file mode 100644
index 62200849..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/TaggedHash.fsi
+++ /dev/null
@@ -1,95 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities.Collections.Tagged
-#else
-namespace Microsoft.FSharp.Collections.Tagged
-#endif
-
-    open System
-    open System.Collections.Generic
-
-    /// HashMultiMap, but where a constraint tag tracks information about the hash/equality functions used
-    /// for the hashing. When the tag is Tags.StructuralHash this is identical to HashMultiMap.
-    []
-    type HashMultiMap<'key,'a,'hashTag> when 'hashTag :> IEqualityComparer<'key> =
-        /// Create a new empty mutable hash table with an internal bucket array of the given approximate size
-        /// and with the given key hash/equality functions
-        static member Create: 'hashTag * int             -> HashMultiMap<'key,'a,'hashTag>
-
-        /// Make a shallow copy of the collection
-        member Copy    : unit    -> HashMultiMap<'key,'a,'hashTag>
-
-        /// Add a binding for the element to the table
-        member Add     : 'key * 'a -> unit
-
-        /// Clear all elements from the collection
-        member Clear   : unit    -> unit
-
-        /// Test if the collection contains any bindings for the given element
-        []
-        member Contains: 'key      -> bool
-
-        /// Test if the collection contains any bindings for the given element
-        member ContainsKey: 'key      -> bool
-
-        /// Remove the latest binding (if any) for the given element from the table
-        member Remove  : 'key      -> unit
-
-        /// Replace the latest binding (if any) for the given element.
-        member Replace : 'key * 'a -> unit
-
-        /// Lookup or set the given element in the table.  Raise KeyNotFoundException if the element is not found.
-        member Item : 'key -> 'a with get,set
-
-        /// Lookup the given element in the table, returning the result as an Option
-        member TryFind : 'key      -> 'a option
-        /// Find all bindings for the given element in the table, if any
-        member FindAll : 'key      -> 'a list
-
-        /// Apply the given function to each element in the collection threading the accumulating parameter
-        /// through the sequence of function applications
-        member Fold    : ('key -> 'a -> 'c -> 'c) -> 'c -> 'c
-
-        /// The number of bindings in the hash table
-        member Count   : int
-
-        /// Apply the given function to each binding in the hash table 
-        member Iterate : ('key -> 'a -> unit) -> unit
-
-    type HashMultiMap<'key,'a> = HashMultiMap<'key,'a, IEqualityComparer<'key>>    
-
-    /// Mutable hash sets based on F# structural "hash" and (=) functions. Implemented via a hash table and/or Dictionary.
-    
-    /// Mutable hash sets where a constraint tag tracks information about the hash/equality functions used
-    /// for the hashing. When the tag is Tags.StructuralHash this is identical to HashSet.
-    []
-    type HashSet<'a,'hashTag> when 'hashTag :> IEqualityComparer<'a>  =
-        /// Create a new empty mutable hash set with an internal bucket array of the given approximate size
-        /// and with the given key hash/equality functions 
-        static member Create: 'hashTag * int             -> HashSet<'a,'hashTag>
-
-        /// Make a shallow copy of the set
-        member Copy    : unit -> HashSet<'a,'hashTag>
-        /// Add an element to the collection
-        member Add     : 'a   -> unit
-        /// Clear all elements from the set
-        member Clear   : unit -> unit
-        /// Test if the set contains the given element
-        member Contains: 'a   -> bool
-        /// Remove the given element from the set
-        member Remove  : 'a   -> unit
-        /// Apply the given function to the set threading the accumulating parameter
-        /// through the sequence of function applications
-        member Fold    : ('a -> 'b -> 'b) -> 'b -> 'b
-        
-        /// The number of elements in the set
-        member Count   : int
-
-        /// Apply the given function to each binding in the hash table 
-        member Iterate : ('a -> unit) -> unit
-
-        interface IEnumerable<'a> 
-        interface System.Collections.IEnumerable 
-
-    type HashSet<'a> = HashSet<'a, IEqualityComparer<'a>>    
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/arg.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/arg.fs
deleted file mode 100644
index 2b4514f4..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/arg.fs
+++ /dev/null
@@ -1,115 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Arg
-#else
-module Microsoft.FSharp.Compatibility.Arg
-#endif
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Collections
-
-type spec =
-  | Clear of (bool ref)       
-  | Float of (float -> unit)
-  | Int of (int -> unit)    
-  | Rest of (string -> unit)
-  | Set of (bool ref)
-  | String of (string -> unit)
-  | Unit of (unit -> unit)  
-
-let getUsage specs u =  
-  let sbuf = new System.Text.StringBuilder 100 in 
-  let pstring (s:string) = sbuf.Append s |> ignore in
-  let pendline s = pstring s; pstring "\n" in
-  pendline u;
-  List.iter (function 
-    | (s, (Unit _ | Set _ | Clear _), x) -> pstring "\t"; pstring s; pstring ": "; pendline x
-    | (s, String f, x) -> pstring "\t"; pstring s; pstring " : "; pendline x
-    | (s, Int f, x) -> pstring "\t"; pstring s; pstring " : "; pendline x
-    | (s, Float f, x) ->  pstring "\t"; pstring s; pstring " : "; pendline x
-    | (s, Rest f, x) -> pstring "\t"; pstring s; pstring " ...: "; pendline x)
-    specs;
-  pstring "\t"; pstring "--help"; pstring ": "; pendline "display this list of options";
-  pstring "\t"; pstring "-help"; pstring ": "; pendline "display this list of options";
-  sbuf.ToString()
-
-let incr r = r := !r + 1
-let usage specs u = System.Console.Error.WriteLine (getUsage specs u)
-type argspec = (string * spec * string) 
-
-exception Help of string
-exception Bad of string
-
-let parse_argv cursor argv specs other usageText =
-  let nargs = Array.length argv in 
-  incr cursor;
-  while !cursor < nargs do
-    let arg = argv.[!cursor] in 
-    let rec findMatchingArg (l: argspec  list) = 
-      match l with 
-      | ((s, action, _) :: _) when s = arg -> 
-         let getSecondArg () = 
-           if !cursor + 1 >= nargs then 
-             raise(Bad("option "+s+" needs an argument.\n"+getUsage specs usageText));
-           argv.[!cursor+1] 
-           
-         match action with 
-         | Unit f -> 
-           f (); 
-           incr cursor
-         | Set f ->
-           f := true; 
-           incr cursor
-         | Clear f -> 
-           f := false; 
-           incr cursor
-         | String f-> 
-           let arg2 = getSecondArg() in 
-           f arg2; 
-           cursor := !cursor + 2
-         | Int f -> 
-           let arg2 = getSecondArg () in 
-           let arg2 = try int32 arg2 with _ -> raise(Bad(getUsage specs usageText)) in  
-           f arg2;
-           cursor := !cursor + 2;
-         | Float f -> 
-           let arg2 = getSecondArg() in 
-           let arg2 = try float arg2 with _ -> raise(Bad(getUsage specs usageText)) in 
-           f arg2; 
-           cursor := !cursor + 2;
-         | Rest f -> 
-           incr cursor;
-           while !cursor < nargs do
-               f (argv.[!cursor]);
-               incr cursor;
-
-      | (_ :: more)  -> findMatchingArg more 
-      | [] -> 
-          if arg = "-help" || arg = "--help" then
-              raise (Help (getUsage specs usageText))
-          elif arg.Length>0 && arg.[0] = '-' then
-              raise (Bad ("unrecognized argument: "+ arg + "\n" + getUsage specs usageText))
-          else 
-             other arg;
-             incr cursor
-    findMatchingArg specs 
-  done
-
-#if FX_NO_COMMAND_LINE_ARGS
-#else
-let current = ref 0
-let parse specs other usage = 
-  let argv = System.Environment.GetCommandLineArgs() in 
-  try parse_argv current argv specs other usage
-  with 
-    | Bad h 
-    | Help h -> 
-        System.Console.Error.WriteLine h; 
-        System.Console.Error.Flush();  
-        System.Environment.Exit(1); 
-    | e -> 
-        rethrow ()
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/arg.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/arg.fsi
deleted file mode 100644
index 59963de5..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/arg.fsi
+++ /dev/null
@@ -1,49 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-/// A simple command-line argument processor.
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Arg
-#else
-[]
-module Microsoft.FSharp.Compatibility.Arg
-#endif
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Core.Operators
-
-type argspec = (string * spec * string)
-/// The spec value describes the action of the argument,
-/// and whether it expects a following parameter.
-and spec = 
-  | Clear of bool ref
-  | Float of (float -> unit)
-  | Int of (int -> unit)
-  | Rest of (string -> unit)
-  | Set of bool ref
-  | String of (string -> unit)
-  | Unit of (unit -> unit)
-
-/// "parse specs f use" parses the arguments given by Sys.argv
-/// according to the argument processing specifications "specs".
-/// Arguments begin with "-". Non-arguments are passed to "f" in
-/// order.  "use" is printed as part of the usage line if an error occurs.
-///
-/// Permitted arguments are specified using triples: (arg, action, help).
-/// Actions are:
-///   Unit(f): call f, no subseq. arg
-///   Set(br): set ref to 'true', no subseq. arg.
-///   Clear(br): set ref to 'false, no subseq. arg.
-///   String(f): pass the subseq. arg to f
-///   Int(f): pass the subseq. arg to f
-///   Float(f): pass the subseq. arg to f
-///   Rest(f): pass all subseq. args to f in order
-#if FX_NO_COMMAND_LINE_ARGS
-#else
-val parse: argspec list -> (string -> unit) -> string -> unit
-#endif
-val parse_argv: int ref -> string array -> argspec list -> (string -> unit) -> string -> unit
-
-/// "usage specs use" prints the help for each argument.
-val usage: argspec list -> string -> unit
-exception Bad of string
-exception Help of string
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/assemblyinfo.FSharp.PowerPack.dll.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/assemblyinfo.FSharp.PowerPack.dll.fs
deleted file mode 100644
index 1cf2dfbc..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/assemblyinfo.FSharp.PowerPack.dll.fs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Microsoft.FSharp
-open System.Reflection
-[]
-[]
-[]
-[]
-[]
-do()
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/big_int.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/big_int.fs
deleted file mode 100644
index a89995ef..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/big_int.fs
+++ /dev/null
@@ -1,61 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-module Microsoft.FSharp.Compatibility.OCaml.Big_int
-
-open Microsoft.FSharp.Math
-open Microsoft.FSharp.Compatibility
-open Microsoft.FSharp.Compatibility.OCaml
-open Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-type big_int = bigint
-let zero_big_int = BigInt.Zero
-let unit_big_int = BigInt.One
-let minus_big_int    (a:BigInt) b  = a - b
-let add_big_int      (a:BigInt) b  = a + b
-let succ_big_int     n    = n + BigInt.One
-let add_int_big_int  (a:int) b  = new BigInt(a) + b
-let sub_big_int      (a:BigInt) b  = a - b
-let pred_big_int     (a:BigInt)    = a - BigInt.One
-let mult_big_int     (a:BigInt) b  = a * b
-let mult_int_big_int (a:int) b  = new BigInt(a) * b
-let square_big_int   (a:BigInt)= a  * a
-let quomod_big_int   a b  = BigInt.DivRem (a,b)
-let div_big_int      (a:BigInt) b  =  a / b    
-let mod_big_int      (a:BigInt) b  = a % b    
-let gcd_big_int      a b  = 
-#if FX_ATLEAST_40
-    BigInt.GreatestCommonDivisor (a,b)
-#else
-    BigInt.Gcd (a,b)
-#endif
-#if FX_ATLEAST_40
-#else
-let power_int_positive_int         (x:int) (n:int) = BigInt.Pow (BigInt x, BigInt n)
-let power_big_int_positive_int     x (n:int) = BigInt.Pow  (x, BigInt n)
-let power_int_positive_big_int     (x:int) n = BigInt.Pow  (BigInt x,n)
-let power_big_int_positive_big_int x n = BigInt.Pow   (x,n)
-let sign_big_int    (a:BigInt)   = sign a
-let compare_big_int (x:BigInt) y = (x - y).Sign
-#endif
-let eq_big_int  (x:bigint) (y:bigint) = BigInt.(=) (x,y)
-let le_big_int  (x:bigint) (y:bigint) = BigInt.(<=)   (x,y)
-let ge_big_int  (x:bigint) (y:bigint) = BigInt.(>=)   (x,y)
-let lt_big_int  (x:bigint) (y:bigint) = BigInt.(<)    (x,y)
-let gt_big_int  (x:bigint) (y:bigint) = BigInt.(>)    (x,y)
-let max_big_int (x:BigInt) y = max x y
-let min_big_int (x:BigInt) y = min x y
-let string_of_big_int (x:BigInt) = x.ToString()
-let big_int_of_string (x:string) = BigInt.Parse x
-let int_of_big_int  (x:BigInt)    = 
-#if FX_ATLEAST_40
-    (BigInt.op_Explicit x : int)
-#else
-    int x
-#endif
-let big_int_of_int (x:int)    = new BigInt(x)
-let float_of_big_int (x:BigInt)  = 
-#if FX_ATLEAST_40
-    (BigInt.op_Explicit x : float)
-#else
-    float x
-#endif
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/big_int.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/big_int.fsi
deleted file mode 100644
index 59e54dc4..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/big_int.fsi
+++ /dev/null
@@ -1,54 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.   The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.  The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-
-/// Big_int compatability module for arbitrary sized integers.
-[]
-module Microsoft.FSharp.Compatibility.OCaml.Big_int
-
-open Microsoft.FSharp.Compatibility.OCaml
-open Microsoft.FSharp.Compatibility.OCaml.Pervasives
-open Microsoft.FSharp.Math
-
-type big_int = bigint
-
-val zero_big_int                    : big_int
-val unit_big_int                    : big_int
-val minus_big_int                   : big_int -> big_int -> big_int
-val add_big_int                     : big_int -> big_int -> big_int
-val succ_big_int                    : big_int -> big_int
-val add_int_big_int                 : int     -> big_int -> big_int
-val sub_big_int                     : big_int -> big_int -> big_int
-val pred_big_int                    : big_int -> big_int
-val mult_big_int                    : big_int -> big_int -> big_int
-val mult_int_big_int                : int     -> big_int -> big_int
-val square_big_int                  : big_int -> big_int
-val quomod_big_int                  : big_int -> big_int -> big_int * big_int
-val div_big_int                     : big_int -> big_int -> big_int
-val mod_big_int                     : big_int -> big_int -> big_int
-val gcd_big_int                     : big_int -> big_int -> big_int
-#if FX_ATLEAST_40
-#else
-val power_int_positive_int          : int     -> int -> big_int
-val power_big_int_positive_int      : big_int -> int -> big_int
-val power_int_positive_big_int      : int     -> big_int -> big_int
-val power_big_int_positive_big_int  : big_int -> big_int -> big_int
-val sign_big_int                    : big_int -> int
-val compare_big_int                 : big_int -> big_int -> int
-#endif
-val eq_big_int                      : big_int -> big_int -> bool
-val le_big_int                      : big_int -> big_int -> bool
-val ge_big_int                      : big_int -> big_int -> bool
-val lt_big_int                      : big_int -> big_int -> bool
-val gt_big_int                      : big_int -> big_int -> bool
-val max_big_int                     : big_int -> big_int -> big_int
-val min_big_int                     : big_int -> big_int -> big_int
-val string_of_big_int               : big_int -> string
-val big_int_of_string               : string  -> big_int
-val int_of_big_int                  : big_int -> int    
-val big_int_of_int                  : int     -> big_int
-val float_of_big_int                : big_int -> float
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/buffer.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/buffer.fs
deleted file mode 100644
index 32943690..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/buffer.fs
+++ /dev/null
@@ -1,40 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-module internal Internal.Utilities.Buffer
-
-open Internal.Utilities
-open Internal.Utilities.Pervasives
-#else
-module Microsoft.FSharp.Compatibility.OCaml.Buffer
-
-open Microsoft.FSharp.Compatibility.OCaml
-open Microsoft.FSharp.Compatibility.OCaml.Pervasives
-
-#endif
-
-#nowarn "62" // use of ocaml compat functions from Pervasives
-
-type t = System.Text.StringBuilder
-
-let create (n:int) = new System.Text.StringBuilder(n)
-    
-let contents (t:t) = t.ToString()
-let length (t:t) = t.Length
-let clear (t:t) = ignore (t.Remove(0,length t))
-let reset (t:t) = ignore (t.Remove(0,length t))
-let add_char (t:t) (c:char) = ignore (t.Append(c))
-let add_string (t:t) (s:string) = ignore (t.Append(s))
-let add_substring (t:t) (s:string) n m = ignore (t.Append(s.[n..n+m-1]))
-let add_buffer (t:t) (t2:t) = ignore (t.Append(t2.ToString()))
-
-#if FX_NO_ASCII_ENCODING
-#else
-let add_channel (t:t) (c:in_channel) n = 
-  let b = Array.zeroCreate n  in 
-  really_input c b 0 n;
-  ignore (t.Append(System.Text.Encoding.ASCII.GetString(b, 0, n)))
-#endif
-
-let output_buffer (os:out_channel) (t:t) = 
-  output_string os (t.ToString())
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/buffer.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/buffer.fsi
deleted file mode 100644
index 30740cae..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/buffer.fsi
+++ /dev/null
@@ -1,61 +0,0 @@
-//==========================================================================
-// Buffer: StringBuilder operations for ML compatibility
-//
-// (c) Microsoft Corporation 2005-2008.  The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.  The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-
-/// Imperative buffers for building strings, a shallow interface to System.Text.StringBuilder
-#if INTERNALIZED_POWER_PACK
-module internal Internal.Utilities.Buffer
-open Internal.Utilities.Pervasives
-#else
-[]
-module Microsoft.FSharp.Compatibility.OCaml.Buffer
-open Microsoft.FSharp.Compatibility.OCaml.Pervasives
-#endif
-
-#nowarn "62" // use of ocaml compat types from Pervasives
-
-type t = System.Text.StringBuilder
-
-/// Add second buffer to the first.
-val add_buffer: t -> t -> unit
-
-/// Add character to the buffer.
-val add_char: t -> char -> unit
-
-/// Add string to the buffer.
-val add_string: t -> string -> unit
-
-/// Given a string, start position and length add that substring to the buffer.
-val add_substring: t -> string -> int -> int -> unit
-
-/// Clears the buffer.
-val clear: t -> unit
-
-/// Gets the string built from the buffer.
-val contents: t -> string
-
-/// Create a buffer with suggested size.
-val create: int -> t
-
-/// Number of characters in the buffer.
-val length: t -> int
-
-val output_buffer: out_channel -> t -> unit
-
-/// Clears the buffer (same as Buffer.clear).
-val reset: t -> unit
-
-#if FX_NO_ASCII_ENCODING
-#else
-/// Read the given number of bytes as ASCII and add the resulting string 
-/// to the buffer.  Warning: this assumes an ASCII encoding for the I/O channel, i.e. it uses 
-/// Pervasives.really_input and then use ascii_to_string to produce the string 
-/// to add.  
-val add_channel: t -> in_channel -> int -> unit
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/byte.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/byte.fs
deleted file mode 100644
index 6299438b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/byte.fs
+++ /dev/null
@@ -1,48 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2009.  
-//==========================================================================
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-
-[]
-module Byte= 
-
-    let compare (x:byte) y = compare x y
-
-    let zero = 0uy
-    let one = 1uy
-    let add (x:byte) (y:byte) = x + y
-    let sub (x:byte) (y:byte) = x - y
-    let mul (x:byte) (y:byte) = x * y
-    let div (x:byte) (y:byte) = x / y
-    let rem (x:byte) (y:byte) = x % y
-    let succ (x:byte) = x + 1uy
-    let pred (x:byte) = x - 1uy
-    let max_int = 0xFFuy
-    let min_int = 0uy
-    let logand (x:byte) (y:byte) = x &&& y
-    let logor (x:byte) (y:byte) = x ||| y
-    let logxor (x:byte) (y:byte) = x ^^^ y
-    let lognot (x:byte) = ~~~x
-    let shift_left (x:byte) (n:int) =  x <<< n
-    let shift_right (x:byte) (n:int) =  x >>> n
-    let of_int (n:int) =  byte n
-    let to_int (x:byte) = int x
-    let of_char (n:char) =  byte n
-    let to_char (x:byte) = char x
-    let of_string (s:string) = byte (int32 s)
-      
-    let to_string (x:byte) =  (box x).ToString()
-
-    let of_int32 (n:int32) = byte n
-    let to_int32 (x:uint8) = int32 x
-
-    let of_uint16 (n:uint16) = byte n
-    let to_uint16 (x:uint8)  = uint16 x
-
-    let of_uint32 (n:uint32) = byte n
-    let to_uint32 (x:uint8)  = uint32 x
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/byte.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/byte.fsi
deleted file mode 100644
index 20e306af..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/byte.fsi
+++ /dev/null
@@ -1,79 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2009.  
-//==========================================================================
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-
-[]
-[]
-/// Byte (8-bit) operations.
-module Byte= 
-
-    /// The value zero as a System.Byte
-    val zero: byte
-    /// The value one as a System.Byte
-    val one: byte
-    /// Returns the successor of the argument wrapped around 255uy
-    val succ: byte -> byte
-    /// Returns the predeccessor of the argument wrapped around 0uy
-    val pred: byte -> byte
-
-    /// Returns the sum of a and b
-    val add: a:byte -> b:byte -> byte
-    /// Returns a divided by b 
-    val div: a:byte -> b:byte -> byte
-    /// Returns a multiplied by b 
-    val mul: a:byte -> b:byte -> byte
-    /// Returns a minus b 
-    val sub: a:byte -> b:byte -> byte
-    /// Returns the remainder of a divided by b
-    val rem: a:byte -> b:byte -> byte
-
-    /// Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b
-    val compare: a:byte -> b:byte -> int
-
-    /// Combines the binary representation of a and b by bitwise and
-    val logand: a:byte -> b:byte -> byte
-    /// Returns the bitwise logical negation of a
-    val lognot: a:byte -> byte
-    /// Combines the binary representation of a and b by bitwise or
-    val logor: a:byte -> b:byte -> byte
-    /// Combines the binary representation of a and b by bitwise xor
-    val logxor: a:byte -> b:byte -> byte
-    /// Shifts the binary representation a by n bits to the left
-    val shift_left: a:byte -> n:int -> byte
-    /// Shifts the binary representation a by n bits to the right
-    val shift_right: a:byte -> n:int -> byte
-
-    /// Converts a char to a byte
-    val of_char: c:char -> byte
-    /// Converts a byte to a char 
-    val to_char: b:byte -> char
-
-    /// Converts a 32-bit integer to a byte
-    val of_int: i:int -> byte
-    /// Converts a byte to a 32-bit integer 
-    val to_int: b:byte -> int
-
-    /// Converts a 32-bit integer to a byte
-    val of_int32: i:int32 -> byte
-    /// Converts a byte to a 32-bit integer 
-    val to_int32: b:byte -> int32
-
-    /// Converts a 16-bit integer to a byte
-    val of_uint16: ui:uint16 -> byte
-    /// Converts a byte to a 16-bit integer 
-    val to_uint16: b:byte -> uint16
-
-    /// Converts an unsigned 32-bit integer to a byte
-    val of_uint32: ui:uint32 -> byte
-    /// Converts a byte to an unsigned 32-bit integer 
-    val to_uint32: b:byte -> uint32
-
-    /// Converts a string to a byte
-    val of_string: s:string -> byte
-    /// Converts a byte to a string
-    val to_string: b:byte -> string
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/bytearray.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/bytearray.fs
deleted file mode 100644
index 562a7a15..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/bytearray.fs
+++ /dev/null
@@ -1,41 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-module internal Internal.Utilities.Bytearray
-#else
-module Microsoft.FSharp.Compatibility.Bytearray
-#endif
-
-let compare (x:byte[]) y = compare x y
-
-type bytearray = byte[]
-let length (arr: byte[]) =  Array.length arr
-let get (arr: byte[]) (n:int) =  Array.get arr n
-let set (arr: byte[]) (n:int) (x:byte) =  Array.set arr n x
-let zero_create (n:int) : byte[]= Array.zeroCreate n
-let make  (n:int) = (zero_create n : byte[]) 
-let create (n:int)  = make n
-let init (n:int) (f: int -> byte) =  Array.init n f
-let concat (arrs:byte[] list) = Array.concat arrs
-let append arr1 arr2 = concat [arr1; arr2]
-let sub (arr:byte[]) (start:int) (len:int) = Array.sub arr start len
-let fill (arr:byte[]) (start:int) (len:int) (x:byte) = Array.fill arr start len x
-let copy (arr:byte[]) = Array.copy arr
-let blit (arr1:byte[]) (start1:int) (arr2: byte[]) (start2:int) (len:int) = Array.blit arr1 start1 arr2 start2 len
-let to_list (arr:byte[]) = Array.to_list arr  
-let of_list (l:byte list) = Array.of_list l
-let iter (f : byte -> unit) (arr:byte[]) = Array.iter f arr
-let map (f: byte -> byte) (arr:byte[]) = Array.map f arr
-let iteri (f : int -> byte -> unit) (arr:byte[]) = Array.iteri f arr
-let mapi (f: int -> byte -> byte) (arr:byte[]) = Array.mapi f arr
-let fold_left (f : 'State -> byte -> 'State) (acc: 'State) (arr:byte[]) = Array.fold f acc arr
-let fold_right (f : byte -> 'State -> 'State) (arr:byte[]) (acc: 'State) = Array.foldBack f arr acc
-
-type encoding = System.Text.Encoding
-
-#if FX_NO_ASCII_ENCODING
-#else
-let ascii_to_string (b:byte[]) = System.Text.Encoding.ASCII.GetString(b,0,b.Length)
-  
-let string_to_ascii (s:string) = System.Text.Encoding.ASCII.GetBytes(s)
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/bytearray.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/bytearray.fsi
deleted file mode 100644
index 3edda12d..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/bytearray.fsi
+++ /dev/null
@@ -1,81 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.  The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.  The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-
-
-/// Byte arrays. Arrays of bytes type-compatible with the C# byte[] type
-#if INTERNALIZED_POWER_PACK
-module internal Internal.Utilities.Bytearray
-#else
-[]
-module Microsoft.FSharp.Compatibility.Bytearray
-#endif
-
-type bytearray = byte[]
-
-val append: byte[] -> byte[] -> byte[]
-val blit: byte[] -> int -> byte[] -> int -> int -> unit
-val compare: byte[] -> byte[] -> int
-val concat: byte[] list -> byte[]
-val copy: byte[] -> byte[]
-val create: int -> byte[]
-val fill: byte[] -> int -> int -> byte -> unit
-
-/// Apply 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_left: ('State -> byte -> 'State) -> 'State -> byte[] -> 'State
-
-/// Apply 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 i0 (...(f iN s)).
-val fold_right: (byte -> 'State -> 'State) -> byte[] -> 'State -> 'State
-val get: byte[] -> int -> byte
-val init: int -> (int -> byte) -> byte[]
-
-/// Apply the given function to each element of the collection. 
-val iter: (byte -> unit) -> byte[] -> unit
-
-/// Apply the given function to each element of the collection. The integer passed to the
-/// function indicates the index of element.
-val iteri: (int -> byte -> unit) -> byte[] -> unit
-
-val length: byte[] -> int
-val make: int -> byte[]
-/// Build a new collection whose elements are the results of applying the given function
-/// to each of the elements of the collection.
-val map: (byte -> byte) -> byte[] -> byte[]
-
-/// Build a new collection whose elements are the results of applying the given function
-/// to each of the elements of the collection. The integer index passed to the
-/// function indicates the index of element being transformed.
-val mapi: (int -> byte -> byte) -> byte[] -> byte[]
-
-///Build a collection from the given list
-val of_list: byte list -> byte[]
-val set: byte[] -> int -> byte -> unit
-val sub: byte[] -> int -> int -> byte[]
-
-///Build a list from the given collection
-val to_list: byte[] -> byte list
-val zero_create: int -> byte[]
-
-// --------------------------------------------------------------------
-// Text encodings: convert between Unicode and AsciiTables encodings of
-// textual data.  Other encodings can be accessed very easily,
-// e.g. the functions below are defined as
-//
-// let ascii_to_string (b:byte[]) = System.Text.Encoding.ASCII.GetString(b)
-// let string_to_ascii (s:string) = System.Text.Encoding.ASCII.GetBytes(s)
-// -------------------------------------------------------------------- 
-type encoding = System.Text.Encoding
-
-#if FX_NO_ASCII_ENCODING
-#else
-val ascii_to_string: byte[] -> string
-val string_to_ascii: string -> byte[]
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/char.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/char.fs
deleted file mode 100644
index b773d54b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/char.fs
+++ /dev/null
@@ -1,34 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2009.  
-//==========================================================================
-
-
-#if INTERNALIZED_POWER_PACK
-namespace Internal.Utilities.OCaml
-#else
-namespace Microsoft.FSharp.Compatibility
-#endif
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core.Operators
-
-[]
-#if INTERNALIZED_POWER_PACK
-module internal Char = 
-#else
-module Char = 
-#endif
-
-    let compare (x:char) y = Operators.compare x y
-
-    let code (c:char) = int c 
-    let chr (n:int) =  char n 
-
-#if FX_NO_TO_LOWER_INVARIANT
-    let lowercase (c:char) = System.Char.ToLower(c, System.Globalization.CultureInfo.InvariantCulture)
-    let uppercase (c:char) = System.Char.ToUpper(c, System.Globalization.CultureInfo.InvariantCulture)
-#else
-    let lowercase (c:char) = System.Char.ToLowerInvariant(c)
-    let uppercase (c:char) = System.Char.ToUpperInvariant(c)
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/char.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/char.fsi
deleted file mode 100644
index 25d0c0b8..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/char.fsi
+++ /dev/null
@@ -1,27 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2009.  
-//==========================================================================
-
-#if INTERNALIZED_POWER_PACK
-namespace Internal.Utilities.OCaml
-#else
-namespace Microsoft.FSharp.Compatibility
-#endif
-
-/// Unicode characters, i.e. the System.Char type.  see also the operations
-/// in System.Char and the System.Text.Encoding interfaces if necessary.
-[]
-[]
-[]
-module Char = 
-
-    /// Converts the value of the specified 32-bit signed integer to its equivalent Unicode character
-    val chr: i:int -> char
-    /// Converts the value of the specified Unicode character to the equivalent 32-bit signed integer
-    val code: c:char -> int
-    /// Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b
-    val compare: a:char -> b:char -> int
-    /// Converts the value of a Unicode character to its lowercase equivalent
-    val lowercase: char -> char
-    /// Converts the value of a Unicode character to its uppercase equivalent
-    val uppercase: char -> char 
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/enum.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/enum.fs
deleted file mode 100644
index 615db9e0..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/enum.fs
+++ /dev/null
@@ -1,21 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core.Operators
-
-/// Simple operations to convert between .NET enuemration types and integers
-[]
-module Enum = 
-
-    let to_int<'a  when 'a :> System.Enum> (x:'a) = (unbox (box x) : int)
-    let of_int<'a  when 'a :> System.Enum> (x:int) : 'a = (unbox (box x) : 'a)
-
-    let rec combine_aux l  = 
-      match l with
-      | [] -> 0
-      | h::t -> (to_int h) ||| (combine_aux t) 
-    let combine<'a  when 'a :> System.Enum> (l : 'a list) = (of_int (combine_aux l) : 'a)
-    let test<'a  when 'a :> System.Enum> (x : 'a) (y : 'a) = (to_int x) &&& (to_int y) <> 0
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/enum.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/enum.fsi
deleted file mode 100644
index 9e827cc3..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/enum.fsi
+++ /dev/null
@@ -1,30 +0,0 @@
-//==========================================================================
-// Basic enum-related operations 
-//
-// (c) Microsoft Corporation 2005-2009.  
-//=========================================================================
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-
-/// Simple operations to convert between .NET enuemration types and integers
-[]
-module Enum= 
-
-    /// Convert an enumeration value to an integer.  The argument type is inferred from context.
-    []
-    val to_int: 'T -> int             when 'T :> System.Enum
-    /// Convert an integer to an enumeration value.  The result type is inferred from context.
-    []
-    val of_int: int -> 'T             when 'T :> System.Enum
-
-    /// Combine enum values using 'logical or'. The relevant enumeration type is inferred from context.
-    []
-    val combine: 'T list -> 'T  when 'T :> System.Enum
-
-    /// Test if an enumeration value has a particular flag set, using 'logical and'. 
-    /// The relevant enumeration type is inferred from context.
-    [ enum 0' as a replacement")>]
-    val test: 'T -> 'T -> bool   when 'T :> System.Enum
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/filename.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/filename.fs
deleted file mode 100644
index 886acf3f..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/filename.fs
+++ /dev/null
@@ -1,73 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Filename
-#else
-module Microsoft.FSharp.Compatibility.OCaml.Filename
-#endif
-
-open System.IO
-
-let current_dir_name = "."
-let parent_dir_name =  ".."
-let concat (x:string) (y:string) = Path.Combine (x,y)
-let is_relative (s:string) = not (Path.IsPathRooted(s))
-
-// Case sensitive (original behaviour preserved).
-let check_suffix (x:string) (y:string) = x.EndsWith(y,System.StringComparison.Ordinal) 
-
-let chop_suffix (x:string) (y:string) =
-    if not (check_suffix x y) then 
-        raise (System.ArgumentException("chop_suffix")) // message has to be precisely this, for OCaml compatibility, and no argument name can be set
-    x.[0..x.Length-y.Length-1]
-
-let has_extension (s:string) = 
-    (s.Length >= 1 && s.[s.Length - 1] = '.' && s <> ".." && s <> ".") 
-    || Path.HasExtension(s)
-
-let chop_extension (s:string) =
-    if s = "." then "" else // for OCaml compatibility
-    if not (has_extension s) then 
-        raise (System.ArgumentException("chop_extension")) // message has to be precisely this, for OCaml compatibility, and no argument name can be set
-    Path.Combine (Path.GetDirectoryName s,Path.GetFileNameWithoutExtension(s))
-
-
-let basename (s:string) = 
-    Path.GetFileName(s)
-
-let dirname (s:string) = 
-    if s = "" then "."
-    else 
-      match Path.GetDirectoryName(s) with 
-      | null -> if Path.IsPathRooted(s) then s else "."
-      | res -> if res = "" then "." else res
-
-let is_implicit (s:string) = 
-    is_relative s &&
-      match Path.GetDirectoryName(s) with 
-      | null -> true
-      | res -> (res <> current_dir_name && res <> parent_dir_name)
-
-
-let temp_file (p:string) (s:string) = Path.GetTempFileName()
-
-let quote s = "\'" ^ s ^ "\'"
-
-
-
-
-#if INTERNALIZED_POWER_PACK
-// Suppress FxCop uncalled code warnings when compiled into the Compiler
-open System.Diagnostics.CodeAnalysis  
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-do()
-#else
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/filename.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/filename.fsi
deleted file mode 100644
index 8355ebb5..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/filename.fsi
+++ /dev/null
@@ -1,66 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.   The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.  The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-
-/// Common filename operations.  This module is included to make it possible to cross-compile 
-/// code with other ML compilers.  See also System.IO.Path
-#if INTERNALIZED_POWER_PACK
-module internal Internal.Utilities.Filename
-#else
-[]
-module Microsoft.FSharp.Compatibility.OCaml.Filename
-#endif
-
-/// "check_suffix f s" returns true if filename "f" ends in suffix "s",
-/// e.g. check_suffix "abc.fs" ".fs" returns true.
-val check_suffix: string -> string -> bool
-
-/// "chop_extension f" removes the extension from the given
-/// filename. Raises ArgumentException if no extension is present.
-val chop_extension: string -> string
-
-/// Assuming "check_suffix f s" holds, "chop_suffix f s" returns the
-/// filename "f" with the suffix "s" removed.
-val chop_suffix: string -> string -> string
-
-/// "concat a b" returns System.IO.Path.Combine(a,b), i.e. the
-/// two names conjoined by the appropriate directory separator character
-/// for this architecture.
-val concat: string -> string -> string
-
-/// "dirname" and "basename" decompose a filename into a directory name
-/// and a filename, i.e. "concat (dirname s) (basename s) = s"
-val dirname: string -> string
-
-/// "dirname" and "basename" decompose a filename into a directory name
-/// and a filename, i.e. "concat (dirname s) (basename s) = s"
-val basename: string -> string
-
-/// The name used for the current directory on this OS. 
-val current_dir_name: string
-
-/// "parent_dir_name" returns the name for the directory above the current directory on
-/// this OS.
-val parent_dir_name: string
-
-/// Return true if the filename has a "." extension
-val has_extension: string -> bool
-
-/// Is the path is relative to the current directory or absolute.
-val is_relative: string -> bool
-
-/// Returns true if the path is relative to the current directory but does not begin with 
-/// an explicit "." or ".."
-val is_implicit: string -> bool
-
-/// "quote s" is designed for use to quote a filename when using it
-/// for a system command.  It returns ("\'" ^ s ^ "\'").  
-val quote: string -> string
-
-/// "temp_file f s" returns a hitherto unused new file name.  "f" and "s"
-/// are hints as to a suitable file name and suffix for the file.
-val temp_file: string -> string -> string
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float.fs
deleted file mode 100644
index 19d7be48..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float.fs
+++ /dev/null
@@ -1,61 +0,0 @@
-
-// (c) Microsoft Corporation 2005-2009.  
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-open Microsoft.FSharp.Core.Operators
-
-/// ML-like operations on 64-bit System.Double floating point numbers.
-[]
-module Float = 
-
-    let add (x:float) (y:float) = x + y
-    let div (x:float) (y:float) = x / y
-    let mul (x:float) (y:float) = x * y
-    let sub (x:float) (y:float) = x - y
-    let neg (x:float)   = - x
-
-    let compare (x:float) y = compare x y
-
-    let of_int (x:int) = float x
-    let ceil      (x:float)           = System.Math.Ceiling(x)
-    let floor     (x:float)           = System.Math.Floor(x)
-    let to_int (x:float) = 
-#if FX_NO_TRUNCATE
-         System.Convert.ToInt32(x) // REVIEW: possible implications of not calling Trancate?
-#else
-         System.Convert.ToInt32(System.Math.Truncate(x))
-#endif
-
-    let of_int64 (x:int64) = float x
-    let to_int64 (x:float) = int64 x
-
-    let of_int32 (x:int32) = float x
-    let to_int32 (x:float) = int32 x
-
-    let of_float32 (x:float32) = float x
-    let to_float32 (x:float) = float32 x
-
-    let to_string (x:float) = (box x).ToString()
-    let of_string (s:string) = 
-      (* Note System.Double.Parse doesn't handle -0.0 correctly (it returns +0.0) *)
-      let s = s.Trim()  
-      let l = s.Length 
-      let p = 0 
-      let p,sign = if (l >= p + 1 && s.[p] = '-') then 1,false else 0,true 
-      let n = 
-        try 
-          if p >= l then raise (new System.FormatException()) 
-          System.Double.Parse(s.[p..],System.Globalization.CultureInfo.InvariantCulture)
-        with :? System.FormatException -> failwith "Float.of_string"
-      if sign then n else -n
-
-#if FX_NO_DOUBLE_BIT_CONVERTER
-#else
-    let to_bits (x:float) = System.BitConverter.DoubleToInt64Bits(x)
-    let of_bits (x:int64) = System.BitConverter.Int64BitsToDouble(x)
-#endif
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float.fsi
deleted file mode 100644
index 3b6d2f00..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float.fsi
+++ /dev/null
@@ -1,58 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2009.   
-//=========================================================================
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-
-/// ML-like operations on 64-bit System.Double floating point numbers.
-[]
-[]
-module Float= 
-
-    /// Returns the sum of a and b
-    val add: a:float -> b:float -> float
-    /// Returns a divided by b 
-    val div: a:float -> b:float -> float
-    /// Returns a multiplied by b 
-    val mul: a:float -> b:float -> float
-    /// Returns -a
-    val neg: a:float -> float
-    /// Returns a minus b 
-    val sub: a:float -> b:float -> float
-    /// Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b
-    val compare: a:float -> b:float -> int
-
-    /// Converts a 32-bit integer to a 64-bit float
-    val of_int: i:int -> float
-    /// Converts a 64-bit float to a 32-bit integer
-    val to_int: f:float -> int
-
-    /// Converts a 32-bit integer to a 64-bit float
-    val of_int32: i:int32 -> float
-    /// Converts a 64-bit float to a 32-bit integer
-    val to_int32: f:float -> int32
-
-    /// Converts a 64-bit integer to a 64-bit float
-    val of_int64: i:int64 -> float
-    /// Converts a 64-bit float to a 64-bit integer 
-    val to_int64: f:float -> int64
-
-    /// Converts a 32-bit float to a 64-bit float
-    val of_float32: f32:float32 -> float
-    /// Converts a 64-bit float to a 32-bit float
-    val to_float32: f:float -> float32
-
-    /// Converts a string to a 64-bit float
-    val of_string: s:string -> float
-    /// Converts a 64-bit float to a string
-    val to_string: f:float -> string
-#if FX_NO_DOUBLE_BIT_CONVERTER
-#else
-    /// Converts a raw 64-bit representation to a 64-bit float
-    val of_bits: i64:int64 -> float
-    /// Converts a 64-bit float to raw 64-bit representation 
-    val to_bits: f:float -> int64
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float32.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float32.fs
deleted file mode 100644
index 54166336..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float32.fs
+++ /dev/null
@@ -1,51 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-open Microsoft.FSharp.Core.Operators
-
-/// ML-like operations on 32-bit System.Single floating point numbers.
-[]
-module Float32 = 
-
-    let add (x:float32) (y:float32) = x + y
-    let sub (x:float32) (y:float32) = x - y
-    let mul (x:float32) (y:float32) = x * y
-    let div (x:float32) (y:float32) = x / y
-    let neg (x:float32) =  -x
-
-    let compare (x:float32) y = compare x y
-
-    let of_int (n:int) =  float32 n
-    let to_int (x:float32) = int x
-
-    let of_int64 (x:int64) = float32 x
-    let to_int64 (x:float32) = int64 x
-
-    let of_int32 (x:int32) = float32 x
-    let to_int32 (x:float32) = int32 x
-
-    let of_float (x:float) = float32 x
-    let to_float (x:float32) = float x
-
-    let to_string (x:float32) = string x
-    let of_string (s:string) = 
-      (* Note System.Single.Parse doesn't handle -0.0 correctly (it returns +0.0) *)
-      let s = s.Trim()  
-      let l = s.Length 
-      let p = 0 
-      let p,sign = if (l >= p + 1 && s.[p] = '-') then 1,false else 0,true 
-      let n = 
-        try 
-          if p >= l then raise (new System.FormatException()) 
-          System.Single.Parse(s.[p..],System.Globalization.CultureInfo.InvariantCulture)
-        with :? System.FormatException -> failwith "Float32.of_string"
-      if sign then n else -n
-
-    let to_bits (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0)
-    let of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0)
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float32.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float32.fsi
deleted file mode 100644
index 9cd94855..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/float32.fsi
+++ /dev/null
@@ -1,59 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.  
-//===========================================================================
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-open Microsoft.FSharp.Core.Operators
-
-/// ML-like operations on 32-bit System.Single floating point numbers.
-[]
-[]
-module Float32 = 
-
-    /// Returns the sum of a and b
-    val add: a:float32 -> b:float32 -> float32
-    /// Returns a divided by b 
-    val div: a:float32 -> b:float32 -> float32
-    /// Returns a multiplied by b 
-    val mul: a:float32 -> b:float32 -> float32
-    /// Returns -a
-    val neg: a:float32 -> float32
-    /// Returns a minus b 
-    val sub: a:float32 -> b:float32 -> float32
-    /// Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b
-    val compare: a:float32 -> b:float32 -> int
-
-    /// Converts a 32-bit integer to a 32-bit float
-    val of_int: int -> float32
-    /// Converts a 32-bit float to a 32-bit integer
-    val to_int: float32 -> int
-
-    /// Converts a 32-bit integer to a 32-bit float
-    val of_int32: int32 -> float32
-    /// Converts a 32-bit float to a 32-bit integer
-    val to_int32: float32 -> int32
-
-    /// Converts a 64-bit integer to a 32-bit float
-    val of_int64: int64 -> float32
-    /// Converts a 32-bit float to a 64-bit integer 
-    val to_int64: float32 -> int64
-
-    /// Converts a 64-bit float to a 32-bit float
-    val of_float: float -> float32
-    /// Converts a 32-bit float to a 64-bit float
-    val to_float: float32 -> float
-
-    /// Converts a string to a 32-bit float
-    val of_string: string -> float32
-    /// Converts a 32-bit float to a string
-    val to_string: float32 -> string
-
-    /// Converts a raw 32-bit representation to a 32-bit float
-    val of_bits: int32 -> float32
-    /// Converts a 32-bit float to raw 32-bit representation 
-    val to_bits: float32 -> int32
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/hashtbl.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/hashtbl.fs
deleted file mode 100644
index 74e6a816..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/hashtbl.fs
+++ /dev/null
@@ -1,89 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.  
-//
-//===========================================================================
-
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Hashtbl
-open Internal.Utilities.Collections
-#else
-module Microsoft.FSharp.Compatibility.OCaml.Hashtbl
-open Microsoft.FSharp.Collections
-#endif
-
-open Microsoft.FSharp.Core
-open System.Collections.Generic
-open System.IO
-
-type HashTable<'Key,'Val> = HashMultiMap<'Key,'Val> 
-type ('Key,'Val) t = HashMultiMap<'Key,'Val> 
-
-let inline create (n:int) = HashMultiMap.Create n
-
-let add (t:HashMultiMap<'Key,'Val>) x y = t.Add(x,y)
-let of_list (l : _ list) = 
-     let t = create (List.length l) in 
-     List.iter (fun (x,y) -> add t x y) l; 
-     t
-
-let of_seq (l:seq<_>) = 
-    let arr = Array.of_seq l in 
-    let t = create (Array.length arr) in Array.iter (fun (x,y) -> add t x y) arr; 
-    t
-
-let copy (t:HashMultiMap<'Key,'Val>)  = t.Copy()
-let find (t:HashMultiMap<'Key,'Val>)  x = t.[x]
-let tryfind (t:HashMultiMap<'Key,'Val>)  x = t.TryFind x
-let find_all (t:HashMultiMap<'Key,'Val>)  x = t.FindAll x
-let mem (t:HashMultiMap<'Key,'Val>)  x =  t.ContainsKey x
-let remove (t:HashMultiMap<'Key,'Val>)  x = t.Remove x
-let replace (t:HashMultiMap<'Key,'Val>)  x y = t.Replace(x,y)
-let fold f (t:HashMultiMap<'Key,'Val>)  c = t.Fold f c
-let clear (t:HashMultiMap<'Key,'Val>)  = t.Clear ()
-let iter f (t:HashMultiMap<'Key,'Val>)  = t.Iterate f
-
-let hash x = LanguagePrimitives.GenericHash x
-let hashq x = LanguagePrimitives.PhysicalHash x
-
-#if INTERNALIZED_POWER_PACK
-#else
-
-// Componentized Hash Tables
-type Provider<'Key,'Val,'Tag> 
-     when 'Tag :> IEqualityComparer<'Key> =
-  interface
-    abstract create  : int -> Tagged.HashMultiMap<'Key,'Val,'Tag>;
-    abstract clear   : Tagged.HashMultiMap<'Key,'Val,'Tag> -> unit;
-    abstract add     : Tagged.HashMultiMap<'Key,'Val,'Tag> -> 'Key -> 'Val -> unit;
-    abstract copy    : Tagged.HashMultiMap<'Key,'Val,'Tag> -> Tagged.HashMultiMap<'Key,'Val,'Tag>;
-    abstract find    : Tagged.HashMultiMap<'Key,'Val,'Tag> -> 'Key -> 'Val;
-    abstract find_all: Tagged.HashMultiMap<'Key,'Val,'Tag> -> 'Key -> 'Val list;
-    abstract tryfind : Tagged.HashMultiMap<'Key,'Val,'Tag> -> 'Key -> 'Val option;
-    abstract mem     : Tagged.HashMultiMap<'Key,'Val,'Tag> -> 'Key -> bool;
-    abstract remove  : Tagged.HashMultiMap<'Key,'Val,'Tag> -> 'Key -> unit;
-    abstract replace : Tagged.HashMultiMap<'Key,'Val,'Tag> -> 'Key -> 'Val -> unit;
-    abstract iter    : ('Key -> 'Val -> unit) -> Tagged.HashMultiMap<'Key,'Val,'Tag> -> unit;
-    abstract fold    : ('Key -> 'Val -> 'State -> 'State) -> Tagged.HashMultiMap<'Key,'Val,'Tag> -> 'State -> 'State;
-    
-  end
-
-type Provider<'Key,'Val> = Provider<'Key,'Val,IEqualityComparer<'Key>>
-
-let MakeTagged (ops : 'Tag) : Provider<'Key,'Val,'Tag> when 'Tag :> IEqualityComparer<'Key> = 
-  { new Provider<_,_,_> with 
-      member p.create n = Tagged.HashMultiMap<'Key,'Val,'Tag>.Create(ops,n);
-      member p.clear c = c.Clear();
-      member p.add c x y = c.Add(x,y);
-      member p.copy c = c.Copy();
-      member p.find  c x = c.[x];
-      member p.find_all c x = c.FindAll(x);
-      member p.tryfind c x = c.TryFind(x);
-      member p.mem c x = c.ContainsKey(x);
-      member p.remove c x = c.Remove(x);
-      member p.replace c x y = c.Replace(x,y);
-      member p.iter f c = c.Iterate(f);
-      member p.fold f c acc = c.Fold f acc; }
-
-let Make (hash,eq) = MakeTagged (HashIdentity.FromFunctions hash eq)
-#endif
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/hashtbl.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/hashtbl.fsi
deleted file mode 100644
index f44f3d30..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/hashtbl.fsi
+++ /dev/null
@@ -1,149 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.   The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.  The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-
-
-/// Multi-entry hash tables using the structural "hash" and "equals" functions.  
-///
-///These tables can be used with keys of any type, but you should check that
-///structural hashing and equality are correct for your key type.  
-///Structural hashing is efficient but not a suitable choice in all circumstances, 
-///e.g. may not hash efficiently on non-reference types and deeply-structured types.
-///Better efficiency is typically achieved if key types are F#-generated
-///types.
-///
-///These hash tables may map items to multiple keys (see find_all).
-///
-///The implementations are not safe for concurrent reading/writing,
-///and so users of these tables should take an appropriate lock
-///before reading/writing if used in a concurrent setting.
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Hashtbl
-open Internal.Utilities.Collections
-#else
-[]
-module Microsoft.FSharp.Compatibility.OCaml.Hashtbl
-open Microsoft.FSharp.Collections
-#endif
-
-open System
-open System.IO
-open System.Collections.Generic
-
-
-/// OCaml compatible type name, for use when not opening module, e.g. Hashtbl.t
-type t<'Key,'Value> = HashMultiMap<'Key,'Value> 
-
-/// Create a hash table with the suggested initial size.  
-///
-/// Inlined to enable generation of efficient hash routines for the key type in the common case.
-val inline create  : int -> HashMultiMap<'Key,'Value>
-
-/// Add key and data to the table.
-val add     : HashMultiMap<'Key,'Value> -> 'Key -> 'Value -> unit
-
-/// Create a hash table using the given data
-val of_list : ('Key * 'Value) list -> HashMultiMap<'Key,'Value> 
-
-/// Create hash table using the given data
-///
-/// Inlined to enable generation of efficient hash routines for the key type in the common case.
-val of_seq : seq<'Key * 'Value>  -> HashMultiMap<'Key,'Value> 
-
-/// Empty the table.
-val clear   : HashMultiMap<'Key,'Value> -> unit
-
-/// Create a copy of the table. Remember they are imperative and get mutated. 
-val copy    : HashMultiMap<'Key,'Value> -> HashMultiMap<'Key,'Value>
-
-/// Lookup key's data in the table.
-/// Raises exception is key not in table, if this could happen you should be using tryfind.
-val find    : HashMultiMap<'Key,'Value> -> 'Key -> 'Value
-
-/// Return all bindings for the given key
-val find_all: HashMultiMap<'Key,'Value> -> 'Key -> 'Value list
-
-/// Fold over all bindings
-val fold    : ('Key -> 'Value -> 'State -> 'State) -> HashMultiMap<'Key,'Value> -> 'State -> 'State
-
-///Apply the given function to each binding in the hash table 
-val iter    : ('Key -> 'Value -> unit) -> HashMultiMap<'Key,'Value> -> unit
-
-/// Test for the existence of any bindings for the given key
-val mem    : HashMultiMap<'Key,'Value> -> 'Key -> bool
-
-/// Remove the latest binding for the given key
-val remove : HashMultiMap<'Key,'Value> -> 'Key -> unit
-
-/// Replace the latest binding for the given key
-val replace: HashMultiMap<'Key,'Value> -> 'Key -> 'Value -> unit
-
-/// Lookup the key's data in the table
-val tryfind: HashMultiMap<'Key,'Value> -> 'Key -> 'Value option
-
-/// Hash on the structure of a value according to the F# structural hashing
-/// conventions.  See Pervasives.hash
-val hash : 'Value -> int 
-
-/// Hash on the identity of an object.   See Pervasives.hashq.
-val hashq: 'Value -> int 
-
-
-#if INTERNALIZED_POWER_PACK
-#else
-///A collection of operations for creating and using hash tables based on particular type-tracked hash/equality functions.
-///Generated by the Hashtbl.Make and Hashtbl.MakeTagged functors. This type is for use when you wish to
-///specify a comparison function once and carry around an object that is a provider of (i.e. a factory for) hashtables 
-///that utilize that comparison function.
-///
-///The 'Tag' type parameter is used to track information about the comparison function, which helps ensure 
-///that you don't mixup maps created with different comparison functions
-type Provider<'Key,'Value,'Tag>  
-     when 'Tag :> IEqualityComparer<'Key> =
-  interface
-    abstract create  : int -> Tagged.HashMultiMap<'Key,'Value,'Tag>;
-    abstract clear   : Tagged.HashMultiMap<'Key,'Value,'Tag> -> unit;
-    abstract add     : Tagged.HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value -> unit;
-    abstract copy    : Tagged.HashMultiMap<'Key,'Value,'Tag> -> Tagged.HashMultiMap<'Key,'Value,'Tag>;
-    abstract find    : Tagged.HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value;
-    abstract find_all: Tagged.HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value list;
-    abstract tryfind : Tagged.HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value option;
-    abstract mem     : Tagged.HashMultiMap<'Key,'Value,'Tag> -> 'Key -> bool;
-    abstract remove  : Tagged.HashMultiMap<'Key,'Value,'Tag> -> 'Key -> unit;
-    abstract replace : Tagged.HashMultiMap<'Key,'Value,'Tag> -> 'Key -> 'Value -> unit;
-    abstract iter    : ('Key -> 'Value -> unit) -> Tagged.HashMultiMap<'Key,'Value,'Tag> -> unit;
-    abstract fold    : ('Key -> 'Value -> 'State -> 'State) -> Tagged.HashMultiMap<'Key,'Value,'Tag> -> 'State -> 'State;
-  end
-
-type Provider<'Key,'Value> = Provider<'Key,'Value,IEqualityComparer<'Key>>
-
-/// Same as Make, except track the comparison function being used through an additional type parameter.
-///
-/// To use this function accurately you need to define a new named class that implements IEqualityComparer and
-/// pass an instance of that class as the first argument. For example:
-///      type MyHasher = 
-///        class
-///          new() = { }
-///          interface IEqualityComparer<string> with 
-///            member self.GetHashCode(x) = ...
-///            member self.Equals(x,y) = ...
-///          end
-///        end
-///
-/// let MyStringHashProvider : Hashtbl.Provider<string,int> = Hashtbl.MakeTagged(new MyStringHasher())
-val MakeTagged: ('Tag :> IEqualityComparer<'Key>) -> Provider<'Key,'Value,'Tag>
-
-/// Build a collection of operations for creating and using 
-/// hashtables based on the given hash/equality functions. This returns a record
-/// that contains the functions you use to create and manipulate tables of
-/// this kind.  The returned value is much like an ML module. You should call Make once for 
-/// each new pair of key/value types.  You may need to constrain the result 
-/// to be an instantiation of Provider.
-///
-/// let MyStringHashProvider : Provider<string,int> = Hashtbl.Make(myStringHash,myStringEq)
-val Make: ('Key -> int) * ('Key -> 'Key -> bool) -> Provider<'Key,'Value>
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int16.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int16.fs
deleted file mode 100644
index df9f1327..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int16.fs
+++ /dev/null
@@ -1,44 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-
-[]
-[]
-module Int16 = 
-
-    let compare (x:int16) y = compare x y
-
-    let zero = 0s
-    let one = 1s
-    let minus_one = - 1s
-    let neg (x:int16) =  - x
-    let add (x:int16) (y:int16) = x + y
-    let sub (x:int16) (y:int16) = x - y
-    let mul (x:int16) (y:int16) = x * y 
-    let div (x:int16) (y:int16) = x / y
-    let rem (x:int16) (y:int16) = x % y
-    let succ (x:int16) = x + 1s
-    let pred (x:int16) = x - 1s
-    let abs (x:int16) = if x < zero then neg x else x
-    let max_int = 0x7FFFs
-    let min_int = 0x8000s
-    let logand (x:int16) (y:int16) = x &&& y
-    let logor (x:int16) (y:int16) = x ||| y
-    let logxor (x:int16) (y:int16) = x ^^^ y
-    let lognot (x:int16) = ~~~ x
-    let shift_left (x:int16) (n:int) =  x <<< n
-    let shift_right (x:int16) (n:int) =  x >>> n
-
-    let of_int8 (n:int8)   = int16 n
-    let to_int8 (x:int16) = sbyte x
-
-    let of_int (n:int) =  int16 n
-    let to_int (x:int16) = int x
-
-    let of_int32 (n:int32) =  int16 n
-    let to_int32 (x:int16) = int32 x
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int32.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int32.fs
deleted file mode 100644
index e3d4b3bf..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int32.fs
+++ /dev/null
@@ -1,65 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-
-[]
-module Int32 = 
-
-    let compare (x:int32) y = compare x y
-
-    let zero = 0
-    let one = 1
-    let minus_one = (-1)
-    let neg (x:int32) =  -x
-    let add (x:int32) (y:int32) = x + y
-    let sub (x:int32) (y:int32) = x - y
-    let mul (x:int32) (y:int32) = x * y
-    let div (x:int32) (y:int32) = x / y
-    let rem (x:int32) (y:int32) = x % y
-    let succ (x:int32) = x + 1
-    let pred (x:int32) = x - 1
-    let abs (x:int32) = if x < zero then neg x else x
-    let max_int = 0x7FFFFFFF
-    let min_int = 0x80000000
-    let logand (x:int32) (y:int32) = x &&& y
-    let logor (x:int32) (y:int32) = x ||| y
-    let logxor (x:int32) (y:int32) = x ^^^ y
-    let lognot (x:int32) = ~~~ x
-    let shift_left (x:int32) (n:int) =  x <<< n
-    let shift_right (x:int32) (n:int) =  x >>> n
-
-    let of_uint32 (x:uint32) =  int32 x
-    let to_uint32 (x:int32) =  uint32 x
-
-    let shift_right_logical (x:int32) (n:int) =  of_uint32 (to_uint32 x >>> n)
-    let of_int (n:int) =  n
-    let to_int (x:int32) = x
-    let of_float (x:float) =  int32 x
-    let to_float (x:int32) =  float x
-
-    let of_float32 (x:float32) =  int32 x
-    let to_float32 (x:int32) =  float32 x
-
-    let of_int64 (x:int64) =  int32 x
-    let to_int64 (x:int32) =  int64 x
-
-    let of_nativeint (x:nativeint) =  int32 x 
-    let to_nativeint (x:int32) =  nativeint x
-
-
-    let of_string (s:string) = try int32 s with _ -> failwith "Int32.of_string"
-    let to_string (x:int32) = (box x).ToString()
-
-    let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0)
-    let float32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0)
-
-    let float32_to_float (x:float32) = float x
-    let float_to_float32 (x:float) = float32 x
-
-    let float_of_bits x = float32_to_float (float32_of_bits x)
-    let bits_of_float x = bits_of_float32 (float_to_float32 x)
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int32.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int32.fsi
deleted file mode 100644
index 5e5c18fd..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int32.fsi
+++ /dev/null
@@ -1,108 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-
-/// Basic operations on 32-bit integers. The type int32 is identical to System.Int32. 
-[]
-[]
-module Int32 = 
-
-    /// The value zero as a System.Int32
-    val zero: int32
-    /// The value one as a System.Int32
-    val one: int32
-    /// The value minus one as a System.Int32
-    val minus_one: int32
-    /// Returns the predeccessor of the argument 
-    val pred: int32 -> int32
-    /// Returns the largest 32-bit signed integer
-    val max_int: int32
-    /// Returns the smallest 32-bit signed integer
-    val min_int: int32
-    /// Returns the successor of the argument 
-    val succ: int32 -> int32
-
-    /// Returns the absolute value of the argument
-    val abs: int32 -> int32
-    /// Returns the sum of a and b
-    val add: a:int32 -> b:int32 -> int32
-    /// Returns a divided by b 
-    val div: a:int32 -> b:int32 -> int32
-    /// Returns a multiplied by b 
-    val mul: a:int32 -> b:int32 -> int32    
-    /// Returns -a
-    val neg: a:int32 -> int32
-    /// Returns the remainder of a divided by b
-    val rem: a:int32 -> b:int32 -> int32
-    /// Returns a minus b 
-    val sub: a:int32 -> b:int32 -> int32
-
-    /// Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b
-    val compare: a:int32 -> b:int32 -> int
-
-    /// Combines the binary representation of a and b by bitwise and
-    val logand: a:int32 -> b:int32 -> int32
-    /// Returns the bitwise logical negation of a
-    val lognot: a:int32 -> int32
-    /// Combines the binary representation of a and b by bitwise or
-    val logor: a:int32 -> b:int32 -> int32
-    /// Combines the binary representation of a and b by bitwise xor
-    val logxor: int32 -> int32 -> int32
-    /// Shifts the binary representation a by n bits to the left
-    val shift_left: a:int32 -> n:int -> int32
-    /// Shifts the binary representation a by n bits to the right; high-order empty bits are set to the sign bit
-    val shift_right: a:int32 -> n:int -> int32
-    /// Shifts the binary representation a by n bits to the right; high-order bits are zero-filled
-    val shift_right_logical: a:int32 -> n:int -> int32
-
-    /// Converts a 64-bit float to a 32-bit integer
-    val of_float: float -> int32
-    /// Converts a 32-bit integer to a 64-bit float 
-    val to_float: int32 -> float
-
-    /// Converts a 32-bit float to a 32-bit integer
-    val of_float32: float32 -> int32
-    /// Converts a 32-bit integer to a 32-bit float 
-    val to_float32: int32 -> float32
-
-    (* In F#, type int32 is identical to int.  These operations are *)
-    (* included mostly for compatibility with other versions of ML *)
-    /// Converts a 32-bit integer to a 32-bit integer (included for ML compatability)
-    val of_int: int -> int32
-    /// Converts a 32-bit integer to a 32-bit integer (included for ML compatability)
-    val to_int: int32 -> int
-
-    (* Conversions to integers are to either the same size or same sign *)
-    /// Converts a 32-bit unsigned integer to a 32-bit integer 
-    val of_uint32: uint32 -> int32
-    /// Converts a 32-bit integer to a 32-bit unsigned integer 
-    val to_uint32: int32 -> uint32
-
-    /// Converts a 64-bit unsigned integer to a 32-bit integer 
-    val of_int64: int64 -> int32
-    /// Converts a 32-bit unsigned integer to a 64-bit integer 
-    val to_int64: int32 -> int64
-
-    /// Converts a 32-bit unsigned integer to a 32-bit integer 
-    val of_nativeint: nativeint -> int32
-    /// Converts a 32-bit unsigned integer to a 32-bit integer 
-    val to_nativeint: int32 -> nativeint
-
-    /// Converts a string to a 32-bit integer 
-    val of_string: string -> int32
-    /// Converts a 32-bit integer to a string 
-    val to_string: int32 -> string
-
-    /// Converts a raw 32-bit representation to a 64-bit float
-    val float_of_bits: int32 -> float
-    /// Converts a 64-bit float to a raw 32-bit representation 
-    val bits_of_float: float -> int32
-
-    /// Converts a raw 32-bit representation to a 32-bit float
-    val float32_of_bits: int32 -> float32
-    /// Converts a 32-bit float to a raw 32-bit representation 
-    val bits_of_float32: float32 -> int32
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int64.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int64.fs
deleted file mode 100644
index db1c890d..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int64.fs
+++ /dev/null
@@ -1,60 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-
-[]
-module Int64 = 
-
-    let compare (x:int64) y = compare x y
-
-    let zero = 0L
-    let one = 1L
-    let minus_one = -1L
-    let neg (x:int64) =  -x
-    let add (x:int64) (y:int64) = x + y
-    let sub (x:int64) (y:int64) = x - y
-    let mul (x:int64) (y:int64) = x * y
-    let div (x:int64) (y:int64) = x / y
-    let rem (x:int64) (y:int64) = x % y
-    let succ (x:int64) = x + 1L
-    let pred (x:int64) = x - 1L
-    let abs (x:int64) = if x < zero then neg x else x
-    let max_int = 0x7FFFFFFFFFFFFFFFL
-    let min_int = 0x8000000000000000L
-    let logand (x:int64) (y:int64) = x &&& y
-    let logor (x:int64) (y:int64) = x ||| y
-    let logxor (x:int64) (y:int64) = x ^^^ y
-    let lognot (x:int64) = ~~~x
-    let shift_left (x:int64) (n:int) =  x <<< n
-    let shift_right (x:int64) (n:int) =  x >>> n
-    let of_int (n:int) =  int64 n
-    let to_int (x:int64) = int x
-    let of_int32 (n:int32) =  int64 n
-    let to_int32 (x:int64) = int32 x
-    let of_uint64 (n:uint64) =  int64 n
-    let to_uint64 (x:int64) = uint64 x
-    let shift_right_logical (x:int64) (n:int) =  of_uint64 (to_uint64 x >>> n)
-
-    let of_nativeint (n:nativeint) =  int64 n
-    let to_nativeint (x:int64) = nativeint x
-    let of_float (x:float) =  int64 x
-    let to_float (x:int64) =  float x
-
-    let of_string (s:string) = try int64 s with _ -> failwith "Int64.of_string"
-    let to_string (x:int64) = (box x).ToString()
-
-#if FX_NO_DOUBLE_BIT_CONVERTER
-#else
-    let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x)
-    let float_of_bits (x:int64) = System.BitConverter.Int64BitsToDouble(x)
-#endif
-
-
-    let of_float32 (x:float32) =  int64 x
-    let to_float32 (x:int64) =  float32 x
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int64.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int64.fsi
deleted file mode 100644
index b0d807ad..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/int64.fsi
+++ /dev/null
@@ -1,103 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-
-/// Basic operations on 64-bit integers. The type int64 is identical to System.Int64. 
-[]
-[]
-module Int64 = 
-
-    /// The value zero as a System.Int64
-    val zero: int64
-    /// The value one as a System.Int64
-    val one: int64
-    /// Returns the predeccessor of the argument 
-    val pred: int64 -> int64
-    /// Returns the successor of the argument 
-    val succ: int64 -> int64
-    /// Returns the largest 64-bit signed integer
-    val max_int: int64
-    /// Returns the smallest 64-bit signed integer
-    val min_int: int64
-    /// The value minus one as a System.Int64
-    val minus_one: int64
-
-    /// Returns the absolute value of the argument
-    val abs: int64 -> int64
-    /// Returns the sum of a and b
-    val add: a:int64 -> b:int64 -> int64
-    /// Returns a divided by b 
-    val div: a:int64 -> b:int64 -> int64
-    /// Returns a multiplied by b 
-    val mul: a:int64 -> b:int64 -> int64
-    /// Returns -a
-    val neg: a:int64 -> int64
-    /// Returns the remainder of a divided by b
-    val rem: a:int64 -> b:int64 -> int64
-    /// Returns a minus b 
-    val sub: a:int64 -> b:int64 -> int64
-
-    /// Compares a and b and returns 1 if a > b, -1 if b < a and 0 if a = b
-    val compare: int64 -> int64 -> int
-
-    /// Combines the binary representation of a and b by bitwise and
-    val logand: int64 -> int64 -> int64
-    /// Returns the bitwise logical negation of a
-    val lognot: int64 -> int64
-    /// Combines the binary representation of a and b by bitwise or
-    val logor: int64 -> int64 -> int64
-    /// Combines the binary representation of a and b by bitwise xor
-    val logxor: int64 -> int64 -> int64
-    /// Shifts the binary representation a by n bits to the left
-    val shift_left: a:int64 -> n:int -> int64
-    /// Shifts the binary representation a by n bits to the right; high-order empty bits are set to the sign bit
-    val shift_right: a:int64 -> n:int -> int64
-    /// Shifts the binary representation a by n bits to the right; high-order bits are zero-filled
-    val shift_right_logical: a:int64 -> n:int -> int64
-
-    /// Converts a 32-bit float to a 64-bit integer
-    val of_float32: float32 -> int64
-    /// Converts a 64-bit integer to a 32-bit float 
-    val to_float32: int64 -> float32
-
-    /// Converts a 64-bit float to a 64-bit integer
-    val of_float: float -> int64
-    /// Converts a 64-bit integer to a 64-bit float 
-    val to_float: int64 -> float
-
-    (* Conversions to integers are to either the same size or same sign *)
-    /// Converts a 32-bit integer to a 64-bit integer
-    val of_int: int -> int64
-    /// Converts a 64-bit integer to a 32-bit integer
-    val to_int: int64 -> int
-
-    /// Converts a 32-bit integer to a 64-bit integer
-    val of_int32: int32 -> int64
-    /// Converts a 64-bit integer to a 32-bit integer
-    val to_int32: int64 -> int32
-
-    /// Converts an unsigned 64-bit integer to a 64-bit integer
-    val of_uint64: uint64 -> int64
-    /// Converts a 64-bit integer to an unsigned 64-bit integer
-    val to_uint64: int64 -> uint64
-
-    /// Converts a native integer to a 64-bit integer
-    val of_nativeint: nativeint -> int64
-    /// Converts a 64-bit integer to a native integer 
-    val to_nativeint: int64 -> nativeint
-
-    /// Converts a string to a 64-bit integer 
-    val of_string: string -> int64
-    /// Converts a 64-bit integer to a string
-    val to_string: int64 -> string
-
-#if FX_NO_DOUBLE_BIT_CONVERTER
-#else
-    /// Converts a raw 64-bit representation to a 64-bit float
-    val float_of_bits: int64 -> float
-    /// Converts a 64-bit float to a raw 64-bit representation 
-    val bits_of_float: float -> int64
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazy.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazy.fs
deleted file mode 100644
index bf9e8a38..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazy.fs
+++ /dev/null
@@ -1,27 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Lazy
-#else
-module Microsoft.FSharp.Compatibility.Lazy
-#endif
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Control
-open Microsoft.FSharp.Collections
-
-
-type 'a t = 'a Lazy
-
-exception Undefined = Microsoft.FSharp.Control.Undefined
-
-let force_with_lock (x: Lazy<'T>) = x.SynchronizedForce()
-let force_without_lock (x: Lazy<'T>) = x.UnsynchronizedForce()
-let force (x: Lazy<'T>) = x.Force()
-let force_val (x: Lazy<'T>) = x.Force()
-let lazy_from_fun f = Lazy.Create(f)
-let create f = Lazy.Create(f)
-let lazy_from_val v = Lazy.CreateFromValue(v)
-let lazy_is_val (x: Lazy<'T>) = x.IsForced
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazy.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazy.fsi
deleted file mode 100644
index 1dff36d5..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazy.fsi
+++ /dev/null
@@ -1,47 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Lazy
-#else
-module Microsoft.FSharp.Compatibility.Lazy
-#endif
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Control
-open Microsoft.FSharp.Collections
-open System
-
-type 'T t = Lazy<'T>
-
-exception Undefined = Microsoft.FSharp.Control.Undefined
-
-/// See Lazy.Force
-val force: Lazy<'T> -> 'T
-
-/// See Lazy.Force.
-[]
-val force_val: Lazy<'T> -> 'T
-
-/// Build a lazy (delayed) value from the given computation
-[]
-val lazy_from_fun: (unit -> 'T) -> Lazy<'T>
-
-/// Build a lazy (delayed) value from the given pre-computed value.
-[]
-val lazy_from_val: 'T -> Lazy<'T>
-
-/// Check if a lazy (delayed) value has already been computed
-[]
-val lazy_is_val: Lazy<'T> -> bool
-
-/// See Lazy.SynchronizedForce.
-[]
-val force_with_lock: Lazy<'T> -> 'T
-
-/// See Lazy.UnsynchronizedForce
-[]
-val force_without_lock: Lazy<'T> -> 'T
-
-/// Build a lazy (delayed) value from the given computation
-[]
-val create : (unit -> 'T) -> Lazy<'T>
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazylist.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazylist.fs
deleted file mode 100644
index e502474c..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazylist.fs
+++ /dev/null
@@ -1,222 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-namespace Microsoft.FSharp.Collections
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Control
-open Microsoft.FSharp.Collections
-open System
-open System.Collections.Generic
-
-#nowarn "21" // recursive initialization
-#nowarn "40" // recursive initialization
-
-type LazyList<'T> =
-    { mutable status : LazyCellStatus< 'T > }
-    
-    member x.Force = 
-        match x.status with 
-        | LazyCellStatus.Delayed f -> 
-            x.status <- Exception Undefined; 
-            begin 
-              try let res = f () in x.status <- LazyCellStatus.Value res; res 
-              with e -> x.status <- LazyCellStatus.Exception(e); rethrow()
-            end
-        | LazyCellStatus.Value x -> x
-        | LazyCellStatus.Exception e -> raise e
-    
-    member s.GetEnumeratorImpl() = 
-            let getcell (x : LazyList<'T>) = x.Force
-            let to_seq s = Seq.unfold (fun ll -> match getcell ll with CellEmpty -> None | CellCons(a,b) -> Some(a,b)) s 
-            (to_seq s).GetEnumerator()
-            
-    interface IEnumerable<'T> with
-        member s.GetEnumerator() = s.GetEnumeratorImpl()
-
-    interface System.Collections.IEnumerable with
-        override s.GetEnumerator() = (s.GetEnumeratorImpl() :> System.Collections.IEnumerator)
-
-and LazyCellStatus<'T> =
-    | Delayed of (unit -> LazyListCell <'T> )
-    | Value of LazyListCell <'T> 
-    | Exception of System.Exception
-
-and LazyListCell<'T> = 
-    | CellCons of 'T * LazyList<'T> 
-    | CellEmpty
-
-[]
-module LazyList = 
-
-    let lzy f = { status = Delayed f }
-    let force (x: LazyList<'T>) = x.Force
-
-    let notlazy v = { status = Value v }
-    
-    type 'T t = LazyList<'T>
-    type 'T llist = LazyList<'T>
-
-    type LazyItem<'T> = Cons of 'T * LazyList<'T> | Empty
-    type 'T item = 'T LazyItem
-    let get (x : LazyList<'T>) = match force x with CellCons (a,b) -> Some(a,b) | CellEmpty -> None
-    let getcell (x : LazyList<'T>) = force x 
-    let empty () = notlazy CellEmpty
-    let make x = (x : LazyList<'T>)
-    let consc x l = CellCons(x,l)
-    let cons x l = lzy(fun () -> (consc x l))
-    let consf x l = lzy(fun () -> (consc x (lzy(fun () ->  (force (l()))))))
-
-    let rec unfold f z = 
-      lzy(fun () -> 
-          match f z with
-          | None       -> CellEmpty
-          | Some (x,z) -> CellCons (x,unfold f z))
-
-    let rec append l1  l2 = lzy(fun () ->  (appendc l1 l2))
-    and appendc l1 l2 =
-      match getcell l1 with
-      | CellEmpty -> force l2
-      | CellCons(a,b) -> consc a (append b l2)
-
-    let delayed f = lzy(fun () ->  (getcell (f())))
-    let repeat x = 
-      let rec s = cons x (delayed (fun () -> s)) in s
-
-    let rec map f s = 
-      lzy(fun () ->  
-        match getcell s with
-        | CellEmpty -> CellEmpty
-        | CellCons(a,b) -> consc (f a) (map f b))
-
-    let rec map2 f s1 s2 =  
-      lzy(fun () -> 
-        match getcell s1, getcell s2  with
-        | CellCons(a1,b1),CellCons(a2,b2) -> consc (f a1 a2) (map2 f b1 b2)
-        | _ -> CellEmpty)
-
-    let rec combine s1 s2 = 
-      lzy(fun () -> 
-        match getcell s1, getcell s2  with
-        | CellCons(a1,b1),CellCons(a2,b2) -> consc (a1,a2) (combine b1 b2)
-        | _ -> CellEmpty)
-
-    let rec concat s1 = 
-      lzy(fun () -> 
-        match getcell s1 with
-        | CellCons(a,b) -> appendc a (concat b)
-        | CellEmpty -> CellEmpty)
-      
-    let rec filter p s1= lzy(fun () ->  filterc p s1)
-    and filterc p s1 =
-        match getcell s1 with
-        | CellCons(a,b) -> if p a then consc a (filter p b) else filterc p b
-        | CellEmpty -> CellEmpty
-      
-    let rec first p s1 =
-        match getcell s1 with
-        | CellCons(a,b) -> if p a then Some a else first p b
-        | CellEmpty -> None
-
-    let indexNotFound() = raise (new System.Collections.Generic.KeyNotFoundException("An index satisfying the predicate was not found in the collection"))
-
-    let find p s1 =
-        match first p s1 with
-        | Some a -> a
-        | None   -> indexNotFound()
-
-    let find_all p s1= filter p s1 (* deprecated *)
-    let flatten s1= concat s1      (* deprecated *)
-
-    let rec folds f acc s1 = 
-      lzy(fun () -> 
-        match getcell s1 with
-        | CellCons(a,b) -> let acc' = f acc a in consc acc' (folds f acc' b)
-        | CellEmpty -> CellEmpty)
-
-    let hd s = 
-      match getcell s with
-      | CellCons(a,b) -> a
-      | CellEmpty -> invalidArg "s" "the list is empty"
-
-    let tl s = 
-      match getcell s with
-      | CellCons(a,b) -> b
-      | CellEmpty -> invalidArg "s" "the list is empty"
-
-    let nonempty s1 =
-      match getcell s1 with
-      | CellCons(a,b) -> true
-      | CellEmpty -> false
-
-    let rec take n s = 
-      lzy(fun () -> 
-        if n < 0 then invalidArg "n" "the number must not be negative"
-        elif n = 0 then CellEmpty 
-        else
-          match getcell s with
-          | CellCons(a,s) -> consc a (take (n-1) s)
-          | CellEmpty -> invalidArg "n" "not enough items in the list" )
-
-    let rec drop n s = 
-      lzy(fun () -> 
-        if n < 0 then invalidArg "n" "the value must not be negative"
-        else dropc n s)
-    and dropc n s =
-      if n = 0 then force s 
-      else  
-        match getcell s with
-        | CellCons(a,s) -> dropc (n-1) s
-        | CellEmpty -> invalidArg "n" "not enough items in the list"
-
-    let rec of_list l = 
-      lzy(fun () -> 
-        match l with [] -> CellEmpty | h :: t -> consc h (of_list t))
-      
-    let rec to_list s = 
-      match getcell s with
-      | CellEmpty -> []
-      | CellCons(h,t) -> h :: to_list t
-      
-    let rec copy_from i a = 
-      lzy(fun () -> 
-        if i >= Array.length a then CellEmpty 
-        else consc a.[i] (copy_from (i+1) a))
-      
-    let rec copy_to (arr: _[]) s i = 
-      match getcell s with
-      | CellEmpty -> ()
-      | CellCons(a,b) -> arr.[i] <- a; copy_to arr b (i+1)
-
-      
-    let of_array a = copy_from 0 a
-    let to_array s = Array.of_list (to_list s)
-      
-    let rec mem x s = 
-      match getcell s with
-      | CellEmpty -> false
-      | CellCons(a,b) -> x = a || mem x b
-
-    let rec length_aux n s = 
-      match getcell s with
-      | CellEmpty -> 0
-      | CellCons(_,b) -> length_aux (n+1) b
-
-    let length s = length_aux 0 s
-
-    let to_seq (s: LazyList<'T>) = (s :> IEnumerable<_>)
-
-    // Note: this doesn't dispose of the IEnumerator if the iteration is not run to the end
-    let rec of_fresh_IEnumerator (e : IEnumerator<_>) = 
-      lzy(fun () -> 
-        if e.MoveNext() then 
-          consc e.Current (of_fresh_IEnumerator e)
-        else 
-           e.Dispose()
-           CellEmpty)
-      
-    let of_seq (c : IEnumerable<_>) =
-      of_fresh_IEnumerator (c.GetEnumerator()) 
-      
-    let (|Cons|Nil|) l = match getcell l with CellCons(a,b) -> Cons(a,b) | CellEmpty -> Nil
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazylist.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazylist.fsi
deleted file mode 100644
index 9b176bef..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lazylist.fsi
+++ /dev/null
@@ -1,159 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.Collections
-
-#nowarn "0057";; // active patterns
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Control
-open Microsoft.FSharp.Collections
-open System.Collections.Generic
-
-/// LazyLists are possibly-infinite, cached sequences.  See also IEnumerable/Seq for
-/// uncached sequences. Calling "get" on the same lazy list value you will keep 
-/// getting the same (cached) result.  LazyLists normally involve delayed computations
-/// without side-effects, and calling "get" may cause these computations to be executed.  The results 
-/// of these computations are cached - evaluations will be performed 
-/// only once for each element of the lazy list.  This is different to IEnumerable/Seq where
-/// recomputation happens each time an enumerator is created and the sequence traversed.
-///
-/// LazyLists can represent cached potentially-infinite computations.  Because they are cached they may cause 
-/// memory leaks if some part of your code maintains a live reference to
-/// the head of an infinite or very large lazy list while iterating it, or if a reference is
-/// maintained after the list is no longer required.
-///
-/// Although lazy lists are an abstract type you may pattern match against them using the
-/// LazyList.Cons and LazyList.Nil active patterns. These may force the computation of elements
-/// of the list.
-
-// abstract type: implementation details hidden.
-//[' type instead to implement on-demand sequences of results, and 'Seq.cache' to cache results of an on-demand computation")>]
-[]
-type LazyList<'T> =
-    interface IEnumerable<'T>
-    interface System.Collections.IEnumerable
-    
-
-//[' type instead to implement on-demand sequences of results, and 'Seq.cache' to cache results of an on-demand computation")>]
-[]
-module LazyList =
-
-    [' instead")>]
-    type 'T t      = LazyList<'T>     
-    [' instead")>]
-    type 'T llist  = LazyList<'T>     
-
-    /// Test if a stream contains at least one element.  Forces the evaluation of
-    /// the first element of the stream if it is not already evaluated.
-    val nonempty : LazyList<'T> -> bool
-
-    /// Return the first element of the stream.  Raise 'Invalid_argument "hd"' if the
-    /// stream is empty. Forces the evaluation of
-    /// the first cell of the stream if it is not already evaluated.
-    val hd       : LazyList<'T> -> 'T
-
-    /// Return the stream corresponding to the remaining items in the sequence.  
-    /// Raise 'Invalid_argument "tl"' if the stream is empty. Forces the evaluation of
-    /// the first cell of the stream if it is not already evaluated.
-    val tl       : LazyList<'T> -> LazyList<'T>
-
-    /// Get the first cell of the stream.
-    val get      : LazyList<'T> -> ('T * LazyList<'T>) option  
-
-    /// Return the stream which on consumption will consist of at most 'n' elements of 
-    /// the given stream.  Does not force the evaluation of any cells in the stream.
-    val take     : int -> LazyList<'T> -> LazyList<'T>
-
-    /// Return the stream without the first 'n' elements of the given stream.  Does
-    /// not force the evaluation of any cells in the stream.
-    val drop     : int -> LazyList<'T> -> LazyList<'T>
-
-    /// Apply the given function to successive elements of the list, returning the first
-    /// result where function returns Some(x) for some x. If the function never returns
-    /// true, 'None' is returned.
-    val first    : predicate:('T -> bool) -> LazyList<'T> -> 'T option
-
-    /// Return the first element for which the given function returns true.
-    /// Raise KeyNotFoundException if no such element exists.
-    val find     : predicate:('T -> bool) -> LazyList<'T> -> 'T 
-
-    /// Evaluates to the stream that contains no items
-    val empty    : unit -> LazyList<'T>
-
-    /// Return a new stream which contains on demand the given item followed by the
-    /// given stream.
-    val cons     : 'T -> LazyList<'T>               -> LazyList<'T>
-
-    /// Return a new stream which contains on demand the given item followed by the
-    /// stream returned by the given computation.  The computation is
-    /// not executed until the elements of the stream are consumed.  The
-    /// computation is only executed once.
-    val consf    : 'T -> (unit -> LazyList<'T>)     -> LazyList<'T>
-
-    /// Return the stream which on consumption will consist of an infinite sequence of the given item
-    val repeat   : 'T -> LazyList<'T>
-
-    /// Return a stream that is in effect the stream returned by the given computation.
-    /// The given computation is not executed until the first element on the stream is
-    /// consumed.
-    val delayed  : (unit -> LazyList<'T>)           -> LazyList<'T>
-
-    /// Return a stream that contains the elements returned by the given computation.
-    /// The given computation is not executed until the first element on the stream is
-    /// consumed.  The given argument is passed to the computation.  Subsequent elements
-    /// in the stream are generated by again applying the residual 'b to the computation.
-    val unfold   : ('State -> ('T * 'State) option) -> 'State -> LazyList<'T>
-
-    /// Return the stream which contains on demand the elements of the first stream followed
-    /// by the elements of the second list
-    val append   : LazyList<'T> -> LazyList<'T> -> LazyList<'T>
-
-    /// Return the stream which contains on demand the pair of elements of the first and second list
-    val combine  : LazyList<'T1> -> LazyList<'T2> -> LazyList<'T1 * 'T2>
-
-    /// Return the stream which contains on demand the list of elements of the list of lazy lists.
-    val concat   : LazyList< LazyList<'T>> -> LazyList<'T>
-
-    /// Return a new collection which on consumption will consist of only the elements of the collection
-    /// for which the given predicate returns "true"
-    val filter   : predicate:('T -> bool) -> LazyList<'T> -> LazyList<'T>
-
-    /// Return a new stream consisting of the results of applying the given accumulating function
-    /// to successive elements of the stream
-    val folds    : folder:('State -> 'T -> 'State) -> 'State -> LazyList<'T> -> LazyList<'State>  
-
-    /// Build a new collection whose elements are the results of applying the given function
-    /// to each of the elements of the collection.
-    val map      : mapping:('T -> 'U) -> LazyList<'T> -> LazyList<'U>
-
-    /// Build a new collection whose elements are the results of applying the given function
-    /// to the corresponding elements of the two collections pairwise.
-    val map2     : mapping:('T1 -> 'T2 -> 'U) -> LazyList<'T1> -> LazyList<'T2> -> LazyList<'U>
-
-    /// Build a collection from the given array. This function will eagerly evaluate all of the 
-    /// stream (and thus may not terminate). 
-    val of_array : 'T array -> LazyList<'T>
-
-    /// Build an array from the given collection
-    val to_array : LazyList<'T> -> 'T array
-
-    /// Build a collection from the given list. This function will eagerly evaluate all of the 
-    /// stream (and thus may not terminate). 
-    val of_list  : list<'T> -> LazyList<'T>
-
-    /// Build a list from the given collection This function will eagerly evaluate all of the 
-    /// stream (and thus may not terminate). 
-    val to_list  : LazyList<'T> -> list<'T>
-
-    /// Return a view of the collection as an enumerable object
-    val to_seq: LazyList<'T> -> seq<'T>
-
-    /// Build a new collection from the given enumerable object
-    val of_seq: seq<'T> -> LazyList<'T>
-
-    //--------------------------------------------------------------------------
-    // Lazy list active patterns
-
-    val (|Cons|Nil|) : LazyList<'T> -> Choice<('T * LazyList<'T>),unit>
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lexing.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lexing.fs
deleted file mode 100644
index 6514d8b0..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lexing.fs
+++ /dev/null
@@ -1,72 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2009.  
-//
-//=========================================================================
-
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Compatibility.OCaml.Lexing
-open Internal.Utilities.Text.Lexing
-#else
-module Microsoft.FSharp.Compatibility.OCaml.Lexing
-open Microsoft.FSharp.Text.Lexing
-#endif
-
-open Microsoft.FSharp.Core
-open System.IO
-open System.Text
-
-type position = Position  
-
-type lexbuf =  LexBuffer
-
-let from_function (f: byte[] -> int -> int)  = 
-    LexBuffer.FromByteFunction f
-
-let from_text_reader (enc: System.Text.Encoding) (tr: TextReader) =
-  from_function (fun bytebuf len ->
-    /// Don't read too many characters!
-    let lenc = (len * 99) / enc.GetMaxByteCount(100) in 
-    let charbuf : char[] = Array.zeroCreate lenc in
-    let nRead = tr.Read(charbuf,0,lenc) in
-    if nRead = 0 then 0 
-                 else enc.GetBytes(charbuf,0,nRead,bytebuf,0))
-                 
-let defaultEncoding =
-#if FX_NO_DEFAULT_ENCODING
-        Encoding.UTF8
-#else
-        Encoding.Default
-#endif
-
-let from_channel (is:TextReader)  = from_text_reader defaultEncoding is
-
-let from_bytearray s  = 
-    LexBuffer.FromBytes(s)
-
-#if FX_NO_ASCII_ENCODING
-let from_string s  = from_channel (new StringReader(s))
-#else
-let from_string s  = from_bytearray (System.Text.Encoding.ASCII.GetBytes(s:string))
-#endif
-
-let from_binary_reader (sr: BinaryReader)  = from_function (fun s max -> sr.Read(s,0,max))
-
-let lexeme_char (lb:lexbuf) n =  char (int32 (lb.LexemeChar n))
-let lexeme_start_p (lb:lexbuf) = lb.StartPos
-let lexeme_end_p (lb:lexbuf) = lb.EndPos
-let lexeme_start (lb:lexbuf) = (lexeme_start_p lb).pos_cnum
-let lexeme_end (lb:lexbuf) = (lexeme_end_p lb).pos_cnum
-#if FX_NO_ASCII_ENCODING
-let lexeme_utf8 (lb:lexbuf) = System.Text.Encoding.UTF8.GetString(lb.Lexeme, 0, lb.Lexeme.Length)
-#else
-let lexeme (lb:lexbuf) = System.Text.Encoding.ASCII.GetString(lb.Lexeme, 0, lb.Lexeme.Length)
-let lexeme_utf8 (lb:lexbuf) = System.Text.Encoding.UTF8.GetString(lb.Lexeme, 0, lb.Lexeme.Length)
-#endif
-
-let lexeme_bytes (lb:lexbuf) = lb.Lexeme
-let flush_input (lb: lexbuf) = lb.DiscardInput ()
-
-let lexbuf_curr_p lb = lexeme_end_p lb
-let lexbuf_set_curr_p (lb:lexbuf) (p : position) = lb.EndPos  <- p
-let lexbuf_set_start_p (lb:lexbuf) (p : position) = lb.StartPos <- p
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lexing.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lexing.fsi
deleted file mode 100644
index a4bd9af1..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/lexing.fsi
+++ /dev/null
@@ -1,102 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.   The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.  The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-
-/// Lexing: ML-like lexing support
-///
-/// This file maintains rough compatibility for lexbuffers used by some ML
-/// laxer generators.  The lexbuf carries an associated pair of positions.
-/// Beware that only the "cnum" (absolute character number) field is automatically 
-/// updated as each lexeme is matched.  Upon each successful match the prior end
-/// position is transferred to be the start position and a new start position
-/// is allocated with an updated pos_cnum field.
-//[]
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Compatibility.OCaml.Lexing
-open Internal.Utilities.Text.Lexing
-#else
-[]
-module Microsoft.FSharp.Compatibility.OCaml.Lexing
-open Microsoft.FSharp.Text.Lexing
-#endif
-
-     
-type position = Position
-
-/// ASCII LexBuffers 
-///
-/// The type "lexbuf" is opaque, but has an internal position information field 
-/// that can be updated by setting "lexbuf.EndPos", for example if you wish 
-/// to update the other fields in that position data before or during 
-/// lexing.  You will need to do this if you wish to maintain accurate 
-/// line-count information.  If you do this and wish to maintain strict 
-/// cross-compiling compatibility with OCamlLex and other tools you may need code 
-/// to conditionally use lexbuf_set_curr_p when compiling F# code.
-type lexbuf = LexBuffer
-
-/// Remove all input, though don't discard the  except the current lexeme 
-val flush_input: lexbuf -> unit
-
-/// Fuel a lexer using the given in_channel.  The bytes are read using Pervasives.input.
-/// If the in_channel is a textual channel the bytes are 
-/// presented to the lexer by decoding the characters using System.Text.Encoding.ASCII.
-val from_channel: System.IO.TextReader -> lexbuf
-
-/// Fuel a lexer using the given TextReader or StreamReader.
-/// The characters read are decoded to bytes using the given encoding (e.g. System.Text.Encoding.ASCII)
-/// and the bytes presented to the lexer.  The encoding used to decode the characters
-/// is associated with the expectations of the lexer (e.g. a lexer may be constructed to accept only 
-/// ASCII or pseudo-UTF8 bytes) and will typically be different to 
-/// the encoding used to decode the file.
-val from_text_reader: System.Text.Encoding -> System.IO.TextReader -> lexbuf
-
-/// Fuel a lexer using the given BinaryReader.  
-val from_binary_reader: System.IO.BinaryReader -> lexbuf
-
-/// Fuel a lexer from a string, converted to ascii using System.Text.Encoding.ASCII.GetBytes
-val from_string: string -> lexbuf
-
-/// Fuel a lexer from an array of bytes
-val from_bytearray: byte[] -> lexbuf
-
-/// Fuel a lexer from function that fills an array of bytes up to the given length, returning the
-/// number of bytes filled.
-val from_function: (byte[] -> int -> int) -> lexbuf
-
-#if FX_NO_ASCII_ENCODING
-#else
-/// Return the matched string 
-val lexeme: lexbuf -> string
-#endif
-
-/// Return the matched string interpreting the bytes using the given Unicode text encoding
-val lexeme_utf8: lexbuf -> string
-
-/// Return the bytes for the matched string 
-val lexeme_bytes:  lexbuf -> byte array
-
-/// Return a character from the matched string, innterpreting the bytes using an ASCII encoding
-val lexeme_char: lexbuf -> int -> char
-
-/// Return the positions stored in the lexbuf for the matched string 
-val lexeme_start_p: lexbuf -> position
-/// Return the positions stored in the lexbuf for the matched string 
-val lexeme_end_p: lexbuf -> position
-
-/// same as lexeme_end_p 
-[]
-val lexbuf_curr_p: lexbuf -> position 
-[]
-val lexbuf_set_curr_p: lexbuf -> position -> unit
-[]
-val lexbuf_set_start_p: lexbuf -> position -> unit
-
-/// Return absolute positions into the entire stream of characters
-val lexeme_start: lexbuf -> int
-/// Return absolute positions into the entire stream of characters
-val lexeme_end: lexbuf -> int
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/map.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/map.fs
deleted file mode 100644
index 0f62a67b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/map.fs
+++ /dev/null
@@ -1,68 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-#if INTERNALIZED_POWER_PACK
-namespace Internal.Utilities
-#else
-namespace Microsoft.FSharp.Compatibility
-#endif
-
-    open Microsoft.FSharp.Core
-    open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-    open Microsoft.FSharp.Core.Operators
-    open System.Collections.Generic
-
-#if INTERNALIZED_POWER_PACK
-    type TaggedMap<'Key,'Value,'Tag when 'Tag :> IComparer<'Key> > = Internal.Utilities.Collections.Tagged.Map<'Key,'Value,'Tag>
-    type TaggedMap<'Key,'Value> = Internal.Utilities.Collections.Tagged.Map<'Key,'Value>
-#else
-    type TaggedMap<'Key,'Value,'Tag when 'Tag :> IComparer<'Key> > = Microsoft.FSharp.Collections.Tagged.Map<'Key,'Value,'Tag>
-    type TaggedMap<'Key,'Value> = Microsoft.FSharp.Collections.Tagged.Map<'Key,'Value>
-#endif
-
-    module Map = 
-        /// For use when not opening the Map module, e.g. Map.t
-        type ('Key,'Value) t = Microsoft.FSharp.Collections.Map<'Key,'Value>  
-
-        // Fold, right-to-left. 
-        //
-        // NOTE: This matches OCaml behaviour
-        // However it differs from the behaviour of Set.fold which folds left-to-right.
-        //
-        let fold f (m:Map<_,_>) z = 
-            Map.foldBack f m z
-
-        type Provider<'Key,'T,'Tag> when 'Tag :> IComparer<'Key> =
-            interface
-              abstract empty: TaggedMap<'Key,'T,'Tag>;
-              abstract add: 'Key -> 'T -> TaggedMap<'Key,'T,'Tag> -> TaggedMap<'Key,'T,'Tag>;
-              abstract find: 'Key -> TaggedMap<'Key,'T,'Tag> -> 'T;
-              abstract first: ('Key -> 'T -> 'U option) -> TaggedMap<'Key,'T,'Tag> -> 'U option;
-              abstract tryfind: 'Key -> TaggedMap<'Key,'T,'Tag> -> 'T option;
-              abstract remove: 'Key -> TaggedMap<'Key,'T,'Tag> -> TaggedMap<'Key,'T,'Tag>;
-              abstract mem: 'Key -> TaggedMap<'Key,'T,'Tag> -> bool;
-              abstract iter: ('Key -> 'T -> unit) -> TaggedMap<'Key,'T,'Tag> -> unit;
-              abstract map:  ('T -> 'U) -> TaggedMap<'Key,'T,'Tag> -> TaggedMap<'Key,'U,'Tag>;
-              abstract mapi: ('Key -> 'T -> 'U) -> TaggedMap<'Key,'T,'Tag> -> TaggedMap<'Key,'U,'Tag>;
-              abstract fold: ('Key -> 'T -> 'State -> 'State) -> TaggedMap<'Key,'T,'Tag> -> 'State -> 'State
-            end
-
-        let MakeTagged (cf : 'Tag) : Provider<'Key,'Value,'Tag> when 'Tag :> IComparer<'Key> =
-            { new Provider<_,_,_> with 
-                 member p.empty = TaggedMap<_,_,_>.Empty(cf);
-                 member p.add k v m  = m.Add(k,v);
-                 member p.find x m = m.[x] 
-                 member p.first f m = m.First(f)
-                 member p.tryfind k m = m.TryFind(k)
-                 member p.remove x m = m.Remove(x)
-                 member p.mem x m = m.ContainsKey(x)
-                 member p.iter f m = m.Iterate(f)
-                 member p.map f m = m.MapRange(f)
-                 member p.mapi f m = m.Map(f)
-                 member p.fold f m z = m.Fold f z }
-
-        type Provider<'Key,'Value> = Provider<'Key,'Value,IComparer<'Key>>
-        let Make cf  = MakeTagged (ComparisonIdentity.FromFunction cf)
-
-
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/map.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/map.fsi
deleted file mode 100644
index 40019d62..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/map.fsi
+++ /dev/null
@@ -1,83 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-#if INTERNALIZED_POWER_PACK
-namespace Internal.Utilities
-#else
-namespace Microsoft.FSharp.Compatibility
-#endif
-
-#nowarn "62" // ocaml compat
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open System
-open System.Collections.Generic
-
-/// Extension functionality for maps using structural comparison
-module Map = 
-
-    /// For use when not opening the Map module, e.g. Map.t
-    []
-    type ('Key,'Value) t = Microsoft.FSharp.Collections.Map<'Key,'Value>  
-
-    /// Fold over the bindings in the map 
-    []
-    val fold: ('Key -> 'Value -> 'State -> 'State) -> Map<'Key,'Value> -> 'State -> 'State
-
-
-#if INTERNALIZED_POWER_PACK
-#else
-
-    open Microsoft.FSharp.Collections
-
-    //--------------------------------------------------------------------------
-    // Map.Make functor
-    //
-    // Immutable maps using user-defined comparison.
-
-    /// A collection of operations for creating and using maps based on a particular comparison function.
-    /// The 'Tag type parameter is used to track information about the comparison function.
-    []
-    type Provider<'Key,'T,'Tag> 
-     when 'Tag :> IComparer<'Key> =
-        interface
-          abstract empty: Tagged.Map<'Key,'T,'Tag>;
-          abstract add: 'Key -> 'T -> Tagged.Map<'Key,'T,'Tag> -> Tagged.Map<'Key,'T,'Tag>;
-          abstract find: 'Key -> Tagged.Map<'Key,'T,'Tag> -> 'T;
-          abstract first: ('Key -> 'T -> 'U option) -> Tagged.Map<'Key,'T,'Tag> -> 'U option;
-          abstract tryfind: 'Key -> Tagged.Map<'Key,'T,'Tag> -> 'T option;
-          abstract remove: 'Key -> Tagged.Map<'Key,'T,'Tag> -> Tagged.Map<'Key,'T,'Tag>;
-          abstract mem: 'Key -> Tagged.Map<'Key,'T,'Tag> -> bool;
-          abstract iter: ('Key -> 'T -> unit) -> Tagged.Map<'Key,'T,'Tag> -> unit;
-          abstract map:  ('T -> 'U) -> Tagged.Map<'Key,'T,'Tag> -> Tagged.Map<'Key,'U,'Tag>;
-          abstract mapi: ('Key -> 'T -> 'U) -> Tagged.Map<'Key,'T,'Tag> -> Tagged.Map<'Key,'U,'Tag>;
-          abstract fold: ('Key -> 'T -> 'State -> 'State) -> Tagged.Map<'Key,'T,'Tag> -> 'State -> 'State
-        end
-
-    []
-    type Provider<'Key,'T> = Provider<'Key,'T,IComparer<'Key>>
-    
-    []
-    val Make: ('Key -> 'Key -> int) -> Provider<'Key,'T>
-
-    /// A functor to build a collection of operations for creating and using 
-    /// maps based on the given comparison function. This returns a record that 
-    /// contains the functions you use to create and manipulate maps of
-    /// this kind.  The returned value is much like an ML module. 
-    ///
-    /// Language restrictions related to polymorphism may mean you
-    /// have to create a new instantiation of for each toplevel
-    /// key/value type pair.
-    ///
-    /// To use this function you need to define a new named class that implements IComparer and
-    /// pass an instance of that class as the first argument. For example:
-    ///      type MyComparer = 
-    ///          new() = { }
-    ///          interface IComparer<string> with 
-    ///            member self.Compare(x,y) = ...
-    ///
-    /// let MyStringMapProvider : Map.Provider < string,int > = Map.MakeTagged(new MyComparer())
-    []
-    val MakeTagged: ('Tag :> IComparer<'Key>) -> Provider<'Key,'T,'Tag>
-
-#endif
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/INumeric.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/INumeric.fs
deleted file mode 100644
index ca64994f..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/INumeric.fs
+++ /dev/null
@@ -1,244 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-namespace Microsoft.FSharp.Math
-
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Primitives.Basics
-open Microsoft.FSharp.Math
-open System
-open System.Globalization
-
-type INumeric<'a> =
-    abstract Zero: 'a
-    abstract One: 'a
-    abstract Add: 'a * 'a -> 'a
-    abstract Subtract: 'a * 'a -> 'a
-    abstract Multiply : 'a * 'a -> 'a
-    abstract Negate : 'a -> 'a
-    abstract Sign : 'a -> int
-    abstract Abs : 'a -> 'a
-    abstract ToString : 'a * string * System.IFormatProvider -> string
-    abstract Parse : string * System.Globalization.NumberStyles * System.IFormatProvider -> 'a
-
-type IIntegral<'a> =
-    inherit INumeric<'a>
-    abstract Modulus: 'a * 'a -> 'a
-    abstract Divide : 'a * 'a -> 'a
-    abstract DivRem : 'a * 'a -> 'a * 'a
-    abstract ToBigInt : 'a -> bigint
-    abstract OfBigInt : bigint -> 'a
-  
-type IFractional<'a> =
-    inherit INumeric<'a>
-    abstract Reciprocal : 'a -> 'a
-    abstract Divide : 'a * 'a -> 'a
-
-type IFloating<'a> =
-    inherit IFractional<'a>
-    abstract Pi : 'a
-    abstract Exp : 'a -> 'a
-    abstract Log : 'a -> 'a
-    abstract Sqrt : 'a -> 'a
-    abstract LogN : 'a * 'a -> 'a
-    abstract Sin : 'a -> 'a
-    abstract Cos : 'a -> 'a
-    abstract Tan : 'a -> 'a
-    abstract Asin : 'a -> 'a
-    abstract Acos : 'a -> 'a
-    abstract Atan : 'a -> 'a
-    abstract Atan2 : 'a * 'a -> 'a
-    abstract Sinh : 'a -> 'a
-    abstract Cosh : 'a -> 'a
-    abstract Tanh : 'a -> 'a
-
-type IIEEE<'a> =
-    inherit IFloating<'a>
-    abstract PositiveInfinity : 'a
-    abstract NegativeInfinity : 'a
-    abstract NaN              : 'a
-    abstract EpsilonOne          : 'a
-    abstract IsNaN: 'a -> bool 
-    abstract IsInfinite : 'a -> bool 
-
-type INormFloat<'a> =
-    abstract Norm : 'a -> float
- 
-module Instances = 
-  let Int32Numerics = 
-    { new IIntegral with 
-         member dict.Zero = 0
-         member dict.One = 1
-         member dict.Add(a,b) = a + b
-         member dict.Subtract(a,b) = a - b
-         member dict.Multiply(a,b) = a * b
-         member dict.Negate(a) = - a 
-         member dict.Abs(a) = a
-         member dict.ToBigInt(a) = new BigInt(a)
-         member dict.OfBigInt(a) = 
-#if FX_ATLEAST_40
-             (BigInt.op_Explicit a : int32)
-#else
-             BigInt.ToInt32 a
-#endif
-         member dict.Sign(a) = Math.Sign(a)
-         member dict.Modulus(a,b) = a % b
-         member dict.Divide(a,b) = a / b
-         member dict.DivRem(a,b) = (a / b, a % b)
-         member dict.ToString((x:int32),fmt,fmtprovider) = 
-                x.ToString(fmt,fmtprovider) 
-         member dict.Parse(s,numstyle,fmtprovider) = 
-                System.Int32.Parse(s,numstyle,fmtprovider)
-      interface INormFloat with  
-         member dict.Norm(x) = float (abs x)
-    }
-  let Int64Numerics = 
-    { new IIntegral with 
-         member dict.Zero =0L
-         member dict.One = 1L
-         member dict.Add(a,b) = a + b
-         member dict.Subtract(a,b) = a - b
-         member dict.Multiply(a,b) = a * b
-         member dict.Negate(a) = - a 
-         member dict.Abs(a) = Math.Abs(a)
-         member dict.ToBigInt(a) = new BigInt(a)
-         member dict.OfBigInt(a) = 
-#if FX_ATLEAST_40
-             (BigInt.op_Explicit a : int64)
-#else
-             BigInt.ToInt64 a
-#endif
-         member dict.Sign(a) = Math.Sign(a)
-         member dict.Modulus(a,b) = a % b
-         member dict.Divide(a,b) = a / b
-         member dict.DivRem(a,b) = (a / b, a % b)
-         member dict.ToString((x:int64),fmt,fmtprovider) = x.ToString(fmt,fmtprovider) 
-         member dict.Parse(s,numstyle,fmtprovider) = System.Int64.Parse(s,numstyle,fmtprovider)
-      interface INormFloat with
-         member dict.Norm(x) = float (Math.Abs x)
-    }
-  let FloatNumerics = 
-    { new IIEEE with 
-         member dict.Zero = 0.0
-         member dict.One =  1.0
-         member dict.Add(a,b) =  a + b
-         member dict.Subtract(a,b) = a - b
-         member dict.Multiply(a,b) = a * b
-         member dict.PositiveInfinity = Double.PositiveInfinity
-         member dict.NegativeInfinity = Double.NegativeInfinity
-         member dict.NaN = Double.NaN
-         member dict.EpsilonOne = 0x3CB0000000000000LF
-         member dict.IsInfinite(a) = Double.IsInfinity(a)
-         member dict.IsNaN(a) = Double.IsNaN(a)
-         member dict.Pi = Math.PI
-         member dict.Reciprocal(a) = 1.0/a
-         member dict.Abs(a) = Math.Abs(a)
-         member dict.Sign(a) = Math.Sign(a)
-         member dict.Asin(a) = Math.Asin(a)
-         member dict.Acos(a) = Math.Acos(a)
-         member dict.Atan(a) = Math.Atan(a)
-         member dict.Atan2(a,b) = Math.Atan2(a,b)
-         member dict.Tanh(a) = Math.Tanh(a)
-         member dict.Tan(a) = Math.Tan(a)
-         member dict.Sqrt(a) = Math.Sqrt(a)
-         member dict.Sinh(a) = Math.Sinh(a)
-         member dict.Cosh(a) = Math.Cosh(a)
-         member dict.Sin(a) = Math.Sin(a)
-         member dict.Cos(a) = Math.Cos(a)
-         member dict.LogN(a,n) = 
-#if FX_NO_LOGN
-             raise (System.NotSupportedException("this operation is not supported on this platform"))
-#else
-             Math.Log(a,n)
-#endif
-         member dict.Log(a) = Math.Log(a)
-         member dict.Exp(a) = Math.Exp(a)
-         member dict.Negate(a) = -a 
-         member dict.Divide(a,b) = a / b
-         member dict.ToString((x:float),fmt,fmtprovider) = x.ToString(fmt,fmtprovider) 
-         member dict.Parse(s,numstyle,fmtprovider) = System.Double.Parse(s,numstyle,fmtprovider)
-      interface INormFloat with
-          member dict.Norm(x) = float (Math.Abs x)
-    }
-  let Float32Numerics = 
-    { new IFractional with
-           member dict.Zero = 0.0f
-           member dict.One =  1.0f
-           member dict.Add(a,b) = a + b
-           member dict.Subtract(a,b) = a - b
-           member dict.Multiply(a,b) = a * b
-           member dict.Negate(a) = -a 
-           member dict.Reciprocal(a) = 1.0f/a
-           member dict.Sign(a) = Math.Sign(a)
-           member dict.Abs(a) = Math.Abs(a)
-           member dict.Divide(a,b) = a / b
-           member dict.ToString((x:float32),fmt,fmtprovider) = x.ToString(fmt,fmtprovider) 
-           member dict.Parse(s,numstyle,fmtprovider) = System.Single.Parse(s,numstyle,fmtprovider)
-       interface INormFloat with  
-           member dict.Norm(x) = float (Math.Abs x)
-    }
-
-  let BigNumNumerics = 
-    { new IFractional with 
-         member dict.Zero = BigNum.Zero
-         member dict.One = BigNum.One
-         member dict.Add(a,b)      = a + b
-         member dict.Subtract(a,b) = a - b
-         member dict.Multiply(a,b) = a * b
-         member dict.Divide(a,b)   = a / b
-         member dict.Abs(a) = BigNum.Abs a
-         member dict.Sign(a) = a.Sign
-         member dict.Negate(a) = - a 
-         member dict.Reciprocal(a) = BigNum.One / a 
-         // Note, this ignores fmt, fmtprovider
-         member dict.ToString((x:bignum),fmt,fmtprovider) = x.ToString()
-         // Note, this ignroes numstyle, fmtprovider
-         member dict.Parse(s,numstyle,fmtprovider) = BigNum.Parse(s)
-
-      interface INormFloat with
-         member dict.Norm(x) = float (BigNum.Abs x)
-    }       
-
-  let BigIntNumerics = 
-    let ZeroI = new BigInt(0)
-    { new IIntegral<_> with 
-         member dict.Zero = BigInt.Zero
-         member dict.One =  BigInt.One
-         member dict.Add(a,b) = a + b
-         member dict.Subtract(a,b) = a - b
-         member dict.Multiply(a,b) = a * b
-         member dict.Divide(a,b) = a / b
-         member dict.Negate(a) = -a 
-         member dict.Modulus(a,b) = a % b
-         member dict.DivRem(a,b) = BigInt.DivRem (a,b)
-         member dict.Sign(a) = a.Sign
-         member dict.Abs(a) = abs a
-         member dict.ToBigInt(a) = a 
-         member dict.OfBigInt(a) = a 
-         
-         member dict.ToString(x,fmt,fmtprovider) = 
-#if FX_ATLEAST_40
-             x.ToString(fmt,fmtprovider) 
-#else
-             // Note: this ignores fmt and fmtprovider
-             x.ToString() 
-#endif
-         // Note: this ignores fmt and fmtprovider
-         member dict.Parse(s,numstyle,fmtprovider) = 
-#if FX_ATLEAST_40
-             BigInt.Parse(s,numstyle,fmtprovider)
-#else
-             BigInt.Parse(s)
-#endif
-
-      interface INormFloat with  
-         member dict.Norm(x) = 
-#if FX_ATLEAST_40
-             (BigInt.op_Explicit (BigInt.Abs x) : float)
-#else
-             float (abs x)
-#endif
-    }       
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/INumeric.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/INumeric.fsi
deleted file mode 100644
index 2f6ae371..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/INumeric.fsi
+++ /dev/null
@@ -1,81 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-namespace Microsoft.FSharp.Math
-
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Math
-open System
-
-// A type-class for numeric types
-type INumeric<'a> =
-    abstract Zero: 'a
-    abstract One: 'a
-    abstract Add: 'a * 'a -> 'a
-    abstract Subtract: 'a * 'a -> 'a
-    abstract Multiply : 'a * 'a -> 'a
-    abstract Negate : 'a -> 'a
-    abstract Sign : 'a -> int
-    abstract Abs : 'a -> 'a    
-    abstract ToString : 'a * string * System.IFormatProvider -> string
-    abstract Parse : string * System.Globalization.NumberStyles * System.IFormatProvider -> 'a
-
-type IIntegral<'a> =
-    inherit INumeric<'a>
-    abstract Modulus: 'a * 'a -> 'a
-    abstract Divide : 'a * 'a -> 'a
-    abstract DivRem : 'a * 'a -> 'a * 'a
-    abstract ToBigInt : 'a -> bigint
-    abstract OfBigInt : bigint -> 'a
-  
-type IFractional<'a> =
-    inherit INumeric<'a>
-    abstract Reciprocal : 'a -> 'a
-    abstract Divide : 'a * 'a -> 'a
-
-// Suggestion: IReal (since transcendentals are added here).
-type IFloating<'a> =
-    inherit IFractional<'a>
-    abstract Pi : 'a
-    abstract Exp : 'a -> 'a
-    abstract Log : 'a -> 'a
-    abstract Sqrt : 'a -> 'a
-    abstract LogN : 'a * 'a -> 'a
-    abstract Sin : 'a -> 'a
-    abstract Cos : 'a -> 'a
-    abstract Tan : 'a -> 'a
-    abstract Asin : 'a -> 'a
-    abstract Acos : 'a -> 'a
-    abstract Atan : 'a -> 'a
-    abstract Atan2 : 'a * 'a -> 'a
-    abstract Sinh : 'a -> 'a
-    abstract Cosh : 'a -> 'a
-    abstract Tanh : 'a -> 'a
-
-type INormFloat<'a> =
-    abstract Norm : 'a -> float
-  
-// Direct access to IEEE encoding not easy on .NET
-type IIEEE<'a> =
-    inherit IFloating<'a>
-    abstract PositiveInfinity : 'a
-    abstract NegativeInfinity : 'a
-    abstract NaN              : 'a
-    abstract EpsilonOne       : 'a
-
-    abstract IsNaN: 'a -> bool 
-    abstract IsInfinite : 'a -> bool 
-    //abstract IsDenormalized   : 'a -> bool 
-    //abstract IsNegativeZero   : 'a -> bool 
-    //abstract IsIEEE           : 'a -> bool 
-
-
-module Instances =
-    val Float32Numerics  : IFractional 
-    val FloatNumerics    : IIEEE
-    val Int32Numerics    : IIntegral
-    val Int64Numerics    : IIntegral
-    val BigIntNumerics   : IIntegral
-    val BigNumNumerics   : IFractional  
-
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/NativeArrayExtensions.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/NativeArrayExtensions.fs
deleted file mode 100644
index 815a2ed1..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/NativeArrayExtensions.fs
+++ /dev/null
@@ -1,51 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.NativeInterop
-
-#nowarn "44"
-#nowarn "9" // unverifiable constructs
-
-open System
-open System.Runtime.InteropServices
-open Microsoft.FSharp.NativeInterop
-open Microsoft.FSharp.Math
-open Microsoft.FSharp.Compatibility
-
-[]
-module NativArrayExtensionsForMatrix =
-
-    []
-    let inline pinObjUnscoped (obj: obj) =  GCHandle.Alloc(obj,GCHandleType.Pinned) 
-    []
-    let inline pinObj (obj: obj) f = 
-        let gch = pinObjUnscoped obj 
-        try f gch
-        finally
-            gch.Free()
-
-    type Microsoft.FSharp.NativeInterop.PinnedArray<'T> with
-
-        []
-        static member inline of_vector(m:Vector<'T>) = 
-            let gch = pinObjUnscoped (box m.InternalValues) 
-            let ptr = NativePtr.of_array m.InternalValues 0 
-            new PinnedArray<'T>(new NativeArray<_>(ptr,m.Length),gch)
-
-        []
-        static member inline of_rowvec(m:RowVector<'T>) = 
-            let gch = pinObjUnscoped (box m.InternalValues) 
-            let ptr = NativePtr.of_array m.InternalValues 0 
-            new PinnedArray<'T>(new NativeArray<_>(ptr,m.Length),gch)
-            
-
-    type Microsoft.FSharp.NativeInterop.PinnedArray2<'T> with
-
-        []
-        static member inline of_matrix(m:Matrix<'T>) = 
-            if m.IsDense then
-                let gch = pinObjUnscoped (box m.InternalDenseValues) 
-                let ptr = NativePtr.of_array2 m.InternalDenseValues 0 0
-                new PinnedArray2<'T>(new NativeArray2<_>(ptr,m.NumRows,m.NumCols),gch) 
-            else
-                invalidArg "m" "cannot pin sparse matrices"
-            
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/NativeArrayExtensions.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/NativeArrayExtensions.fsi
deleted file mode 100644
index e3d2e874..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/NativeArrayExtensions.fsi
+++ /dev/null
@@ -1,27 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.NativeInterop
-
-open Microsoft.FSharp.Math
-open System.Runtime.InteropServices
-
-[]
-module NativArrayExtensionsForMatrix =
-
-    type Microsoft.FSharp.NativeInterop.PinnedArray<'T> with
-
-        /// For native interop. Pin the given object
-        []
-        static member inline of_vector : Vector<'T> -> PinnedArray<'T>
-
-        /// For native interop. Pin the given object
-        []
-        static member inline of_rowvec : RowVector<'T> -> PinnedArray<'T>
-
-
-    type Microsoft.FSharp.NativeInterop.PinnedArray2<'T> with
-
-        /// For native interop. Pin the given object
-        []
-        static member inline of_matrix : Matrix<'T> -> PinnedArray2<'T>
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/associations.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/associations.fs
deleted file mode 100644
index 99feaca7..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/associations.fs
+++ /dev/null
@@ -1,58 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.Math
-
-module GlobalAssociations =
-
-    open Microsoft.FSharp.Math
-    open Microsoft.FSharp.Math.Instances
-    open System
-
-    let ComplexNumerics = 
-      { new IFractional<_> with 
-          member ops.Zero = Complex.Zero
-          member ops.One = Complex.One
-          member ops.Add(a,b) = a + b
-          member ops.Subtract(a,b) = a - b
-          member ops.Multiply(a,b) = a * b
-          member ops.Divide(a,b) = a / b
-          member ops.Negate(a) = -a
-          member ops.Abs(a)  = a // not signed
-          member ops.Sign(a) = 1 // not signed
-          member ops.Reciprocal(a) =  Complex.One / a 
-          member ops.ToString((x:complex),fmt,fmtprovider) = x.ToString(fmt,fmtprovider)
-          member ops.Parse(s,numstyle,fmtprovider) = Complex.mkRect (System.Double.Parse(s,numstyle,fmtprovider),0.0) }
-
-    let ht = 
-        let ht = new System.Collections.Generic.Dictionary() 
-        let optab =
-            [ typeof,   (Some(FloatNumerics    :> INumeric) :> obj);
-              typeof,   (Some(Int32Numerics    :> INumeric) :> obj);
-              typeof,   (Some(Int64Numerics    :> INumeric) :> obj);
-              typeof,  (Some(BigIntNumerics   :> INumeric) :> obj);
-              typeof, (Some(Float32Numerics  :> INumeric) :> obj);
-              typeof, (Some(ComplexNumerics :> INumeric) :> obj);
-              typeof,  (Some(BigNumNumerics   :> INumeric) :> obj); ]
-           
-        List.iter (fun (ty,ops) -> ht.Add(ty,ops)) optab;
-        ht
-        
-    let Put (ty: System.Type, d : obj)  =
-        lock ht (fun () -> 
-            if ht.ContainsKey(ty) then invalidArg "ty" ("the type "+ty.Name+" already has a registered numeric association");
-            ht.Add(ty, d))
-      
-    let TryGetNumericAssociation<'a>() = 
-        lock ht (fun () -> 
-            let ty = typeof<'a>  
-            if ht.ContainsKey(ty) then
-                match ht.[ty] with
-                | :? (INumeric<'a> option) as r -> r
-                | _ -> invalidArg "ty" ("The type "+ty.Name+" has a numeric association but it was not of the correct type")
-            else
-                None)
-
-    let GetNumericAssociation() = (TryGetNumericAssociation()).Value
-    let RegisterNumericAssociation (d : INumeric<'a>)  = Put(typeof<'a>, box(Some d))
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/associations.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/associations.fsi
deleted file mode 100644
index 3296c2de..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/associations.fsi
+++ /dev/null
@@ -1,28 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-namespace Microsoft.FSharp.Math
-
-/// Associations are a way of associating dictionaries of
-/// operations with given types at runtime.  Associations are global to a 
-/// .NET application domain.  Once specified an association may not be deleted
-/// or modified.
-///
-/// In this release the system of associations is simply 
-/// limited to a registry of types that support dictionaries (i.e. interface objects)
-/// of numeric operations.  The following types are pre-registered with associated numeric
-/// operations: float, int32, int64, bigint, float32, Complex, bignum.  Other types must be
-/// registered explicitly by user code.
-///
-module GlobalAssociations =
-
-    open Microsoft.FSharp.Math
-
-    /// Attempt to determine a numeric association for the given type, i.e. a registered dictionary of
-    /// numeric operations.  The interface can be queried dynamically for additional functionality in the numerics
-    /// hierarchy.
-    val GetNumericAssociation : unit -> INumeric<'a> 
-
-    val TryGetNumericAssociation : unit -> INumeric<'a>  option
-    /// Record an AppDomain-wide association between the given type and the given dictionary of
-    /// numeric operations.  Raise an error if an existing association already exists. 
-    val RegisterNumericAssociation : INumeric<'a> -> unit
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/complex.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/complex.fs
deleted file mode 100644
index 0e607af0..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/complex.fs
+++ /dev/null
@@ -1,137 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#nowarn "52" // defensive copy of structs warning
-
-namespace Microsoft.FSharp.Math
-
-open Microsoft.FSharp.Math
-open System
-open System.Globalization
-
-[]
-[]
-type Complex(real: float, imaginary: float) =
-    //new() = new Complex(0.0,0.0)
-    member x.r = real
-    member x.i = imaginary
-    override x.ToString() = x.ToString("g")
-    member x.ToString(fmt) = x.ToString(fmt,CultureInfo.InvariantCulture)
-    member x.ToString(fmt,fmtprovider:IFormatProvider) = 
-           x.r.ToString(fmt,fmtprovider)+"r"+(if x.i < 0.0 then "-" else "+")+(System.Math.Abs x.i).ToString(fmt,fmtprovider)+"i"
-    interface IComparable with 
-        member x.CompareTo(obj) = 
-            match obj with 
-            | :? Complex as y -> 
-                 let c = compare x.r y.r
-                 if c <> 0 then c else compare x.i y.i
-            | _ -> invalidArg "obj" "not a Complex number"
-    override x.Equals(obj) = 
-            match obj with 
-            | :? Complex as y -> x.r = y.r && x.i = y.i
-            | _ -> false
-    override x.GetHashCode() = 
-            (hash x.r >>> 5) ^^^  (hash x.r <<< 3) ^^^  (((hash x.i >>> 4) ^^^  (hash x.i <<< 4)) + 0x9e3779b9)
-
-            
-type complex = Complex
-
-[]
-module Complex = 
-  let mkRect(a,b) = new Complex(a,b)
-  let conjugate (c:complex) = mkRect (c.r, -c.i)
-  let mkPolar(a,b) = mkRect (a * Math.Cos(b), a * Math.Sin(b))
-  let cis b = mkPolar(1.0,b)
-  let zero = mkRect(0.,0.)
-  let one = mkRect(1.,0.) 
-  let onei = mkRect(0.,1.) 
-  let magnitude (c:complex) = sqrt(c.r*c.r + c.i*c.i)
-  let phase (c:complex) = Math.Atan2(c.i,c.r)
-  let realPart (c:complex) = c.r
-  let imagPart (c:complex) = c.i  
-  let abs (a:complex) = sqrt (a.r**2.0 + a.i**2.0)
-  let add (a:complex) (b:complex) = mkRect(a.r + b.r, a.i+b.i)
-  let sub (a:complex) (b:complex) = mkRect(a.r - b.r, a.i-b.i)
-  let mul (a:complex) (b:complex) = mkRect(a.r * b.r - a.i * b.i, a.i*b.r + b.i*a.r)
-  let div (x:complex) (y:complex) = 
-      let a = x.r in let b = x.i in 
-      let c = y.r in let d = y.i in 
-      //(a+ib)/(c+id)=(ac+bd+i(bc-ad))/(c2+d2) 
-      let q = c*c + d*d in 
-      mkRect((a*c+b*d)/q, (b*c - a*d)/q)
-  let neg (a:complex) = mkRect(-a.r,-a.i)
-  let smul (a:float)(b:complex) = mkRect(a * b.r, a*b.i)
-  let muls (a:complex) (b:float) = mkRect(a.r *b, a.i*b)
-  let fmt_of_string numstyle fmtprovider (s:string) =
-    mkRect (System.Double.Parse(s,numstyle,fmtprovider),0.0) 
-  let of_string s = fmt_of_string NumberStyles.Any CultureInfo.InvariantCulture s
-
-  // ik.(r + i.th) = -k.th + i.k.r 
-  let iscale k (x:complex) = mkRect (-k * x.i , k * x.r)
-
-  // LogN : 'a * 'a -> 'a
-  // Asin : 'a -> 'a
-  // Acos : 'a -> 'a
-  // Atan : 'a -> 'a
-  // Atan2 : 'a * 'a -> 'a
-  // Sinh : 'a -> 'a
-  // Cosh : 'a -> 'a
-  // Tanh : 'a -> 'a
-
-  let pi    = mkRect (Math.PI,0.0)
-
-  // exp(r+it) = exp(r).(cos(t)+i.sin(t)) - De Moivre Theorem 
-  let exp (x:complex) = smul (exp(x.r)) (mkRect(cos(x.i), sin(x.i)))
-  // x = mag.e^(i.th) = e^ln(mag).e^(i.th) = e^(ln(mag) + i.th) 
-  let log x = mkRect (log(magnitude(x)),phase(x))
-
-  let sqrt x = mkPolar (sqrt(magnitude x),phase x / 2.0)
-
-  // cos(x) = (exp(i.x) + exp(-i.x))/2 
-  let cos x = smul 0.5 (add (exp(iscale 1.0 x)) (exp(iscale -1.0 x)))
-  // sin(x) = (exp(i.x) - exp(-i.x))/2 . (-i) 
-  let sin x = smul 0.5 (sub (exp(iscale 1.0 x)) (exp(iscale -1.0 x))) |> iscale (-1.0)
-  // tan(x) = (exp(i.x) - exp(-i.x)) . (-i) / (exp(i.x) + exp(-i.x)) 
-  //        = (exp(2i.x) - 1.0)      . (-i) / (exp(2i.x) + 1.0)      
-  let tan x = let exp2ix = exp(iscale 2.0 x) in
-              (div (sub exp2ix one) (add exp2ix one)) |> iscale -1.0
-
-
-type Complex with 
-    static member Create(a,b) = Complex.mkRect (a,b)
-    static member CreatePolar(a,b) = Complex.mkPolar (a,b)
-    member x.Magnitude = Complex.magnitude x
-    member x.Phase = Complex.phase x
-    member x.RealPart = x.r
-    member x.ImaginaryPart = x.i
-    member x.Conjugate = Complex.conjugate x
-
-    static member Sin(x) = Complex.sin(x)
-    static member Cos(x) = Complex.cos(x)
-    static member Abs(x) = Complex.abs(x)
-    static member Tan(x) = Complex.tan(x)
-    static member Log(x) = Complex.log(x)
-    static member Exp(x) = Complex.exp(x)
-    static member Sqrt(x) = Complex.sqrt(x)
-    
-    static member Zero = Complex.zero
-    static member One = Complex.one 
-    static member OneI = Complex.onei 
-    static member ( +  ) (a,b) = Complex.add a b
-    static member ( -  ) (a,b) = Complex.sub a b
-    []
-    static member ( *  ) (a,b) = Complex.mul a b
-    static member ( /  ) (a,b) = Complex.div a b
-    static member ( ~- ) a = Complex.neg a
-    []
-    static member ( * ) (a,b) = Complex.smul a b
-    []
-    static member ( * ) (a,b) = Complex.muls a b
-
-
-namespace Microsoft.FSharp.Core
-
-    type complex = Microsoft.FSharp.Math.Complex
-
-    module ComplexCommonExtensions = 
-        let complex x y = Microsoft.FSharp.Math.Complex.mkRect (x,y)
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/complex.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/complex.fsi
deleted file mode 100644
index efd61e42..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/complex.fsi
+++ /dev/null
@@ -1,145 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.Math
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Math
-open System
-
-  
-/// The type of complex numbers stored as pairs of 64-bit floating point numbers in rectangular coordinates
-[]
-[]
-type Complex = 
-    /// The real part of a complex number
-    member r: float
-    /// The imaginary part of a complex number
-    member i: float
-    /// The polar-coordinate magnitude of a complex number
-    member Magnitude: float
-    /// The polar-coordinate phase of a complex number
-    member Phase: float
-    /// The real part of a complex number
-    member RealPart: float
-    /// The imaginary part of a complex number
-    member ImaginaryPart: float
-    /// The conjugate of a complex number, i.e. x-yi
-    member Conjugate: Complex
-    /// Create a complex number x+ij using rectangular coordinates
-    static member Create      : float * float -> Complex
-    /// Create a complex number using magnitude/phase polar coordinates
-    static member CreatePolar : float * float -> Complex
-    /// The complex number 0+0i
-    static member Zero   : Complex
-    /// The complex number 1+0i
-    static member One    : Complex
-    /// The complex number 0+1i
-    static member OneI   : Complex
-    /// Add two complex numbers
-    static member ( +  ) : Complex * Complex -> Complex
-    /// Subtract one complex number from another
-    static member ( -  ) : Complex * Complex -> Complex
-    /// Multiply two complex numbers
-    []
-    static member ( *  ) : Complex * Complex -> Complex
-    /// Complex division of two complex numbers
-    static member ( /  ) : Complex * Complex -> Complex
-    /// Unary negation of a complex number
-    static member ( ~- ) : Complex           -> Complex
-    /// Multiply a scalar by a complex number 
-    []
-    static member ( * ) : float   * Complex -> Complex
-    /// Multiply a complex number by a scalar
-    []
-    static member ( * ) : Complex * float   -> Complex
-
-    static member Sin : Complex -> Complex
-    static member Cos : Complex -> Complex
-    
-    /// Computes the absolute value of a complex number: e.g. Abs x+iy = sqrt(x**2.0 + y**2.0.)
-    /// Note: Complex.Abs(z) is the same as z.Magnitude
-    static member Abs : Complex -> float
-    static member Tan : Complex -> Complex
-    static member Log : Complex -> Complex
-    static member Exp : Complex -> Complex
-    static member Sqrt : Complex -> Complex
-    
-    override ToString : unit -> string
-    override Equals : obj -> bool
-    interface System.IComparable
-    member ToString : format:string -> string
-    member ToString : format:string * provider:System.IFormatProvider -> string
-
-/// The type of complex numbers 
-type complex = Complex
-
-
-[]
-[]
-module Complex =
-
-    val mkRect: float * float -> complex
-
-      /// The polar-coordinate magnitude of a complex number
-    val magnitude: complex -> float
-      /// The polar-coordinate phase of a complex number
-    val phase     : complex -> float
-      /// The real part of a complex number
-    val realPart  : complex -> float
-      /// The imaginary part of a complex number
-    val imagPart  : complex -> float
-      /// Create a complex number using magnitude/phase polar coordinates
-    val mkPolar : float * float -> complex
-    /// A complex of magnitude 1 and the given phase and , i.e. cis x = mkPolar 1.0 x
-    val cis     : float -> complex
-    
-      /// The conjugate of a complex number, i.e. x-yi
-    val conjugate : complex -> complex
-
-      /// The complex number 0+0i
-    val zero    : complex
-      /// The complex number 1+0i
-    val one     : complex
-      /// The complex number 0+1i
-    val onei    : complex
-      /// Add two complex numbers
-    val add     : complex -> complex -> complex
-      /// Subtract one complex number from another
-    val sub     : complex -> complex -> complex
-      /// Multiply two complex numbers
-    val mul     : complex -> complex -> complex
-      /// Complex division of two complex numbers
-    val div     : complex -> complex -> complex
-      /// Unary negation of a complex number
-    val neg     : complex -> complex
-      /// Multiply a scalar by a complex number 
-    val smul    : float -> complex -> complex
-      /// Multiply a complex number by a scalar
-    val muls    : complex -> float -> complex
-
-      /// pi
-    val pi  : Complex
-      /// exp(x) = e^x
-    val exp : Complex -> Complex
-      /// log(x) is natural log (base e)
-    val log : Complex -> Complex
-      /// sqrt(x) and 0 <= phase(x) < pi
-    val sqrt : Complex -> Complex
-      /// Sine
-    val sin : Complex -> Complex    
-      /// Cosine
-    val cos : Complex -> Complex
-      /// Tagent
-    val tan : Complex -> Complex
-    
-
-namespace Microsoft.FSharp.Core
-
-    type complex = Microsoft.FSharp.Math.Complex
-
-    []
-    module ComplexCommonExtensions = 
-        /// Constructs a complex number from both the real and imaginary part.
-        val complex : float -> float -> Microsoft.FSharp.Math.complex
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/FSharp.PowerPack.Math.Providers.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/FSharp.PowerPack.Math.Providers.fsproj
deleted file mode 100644
index 8ac9e7bc..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/FSharp.PowerPack.Math.Providers.fsproj
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-  
-    ..\..\..\..
-  
-  
-  
-  
-    Library
-    2.0
-    true
-    v2.0
-    FSharp.PowerPack.Math.Providers.xml
-    $(DisabledWarnings);58;62
-  
-
-  
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-  
-  
-    
-    
-      {DED3BBD7-53F4-428A-8C9F-27968E768605}
-      FSharp.PowerPack
-    
-  
-  
-  
-  
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_base.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_base.fs
deleted file mode 100644
index 76eeff2b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_base.fs
+++ /dev/null
@@ -1,131 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Math.Bindings.Internals
-#nowarn "51"
-
-open System
-open System.Runtime.InteropServices
-open Microsoft.FSharp.NativeInterop
-open Microsoft.FSharp.Math
-
-///This is an internal interface and not for user usage.
-///It exposes a specialised subset of BLAS/LAPACK functionality.
-///This functionality is used by us to build the exposed APIs.
-///It is those exposed APIs that should be used.
-type ILapack = interface
-    //Matrix-Matrix Multiplication
-    abstract dgemm_ : Math.matrix * Math.matrix -> Math.matrix
-
-    //Matrix-Vector Multiplication
-    abstract dgemv_ : Math.matrix * Math.vector -> Math.vector
-
-    //Solve (linear equations)
-    abstract dgesv_ : Math.matrix * Math.matrix -> Math.matrix * int array * Math.matrix
-
-    //Solve symmetric positive definite matrix (linear equations)
-    abstract dposv_ : Math.matrix * Math.matrix -> Math.matrix * Math.matrix
-
-    //Solve triangular (linear equations)
-    abstract dtrsv_ : char * Math.matrix * Math.vector -> Math.vector
-
-    //Solve triangular (linear equations)
-    abstract dtrsm_ : char * Math.matrix * Math.matrix -> Math.matrix
-
-    //Solve (linear equations) using LU factorization
-    abstract dgesvx_ :
-      Math.matrix * Math.matrix ->
-      Math.matrix * Math.matrix * int array * char * double array * double array *
-      Math.matrix * Math.matrix * float * double array * double array
-
-    //Eigen Value Non-Symmetric
-    abstract dgeev_ : char * Math.matrix -> double array * double array * double [,]    
-
-    //Eigen Value of Symmetric Matrix
-    abstract dsyev_ : char * char * Math.matrix -> Math.matrix * double array
-
-    //Eigen Value of Symmetric Matrix - Divide and Conquer
-    abstract dsyevd_ : char * char * Math.matrix -> Math.matrix * double array
-
-    //Eigen Value for a pair of general matrices
-    abstract dggev_ :
-      Math.matrix * Math.matrix ->
-      Math.matrix * Math.matrix * double array * double array * double array *
-      double [,]
-
-    //Solve least-squares/min-norm.
-    //Note the dimension requirements on second input to match second output.
-    abstract dgels_ : Math.matrix * Math.matrix -> Math.matrix * Math.matrix
-
-    //Solve least-squares/min-norm (with linear equality constraint)
-    abstract dgglse_ :
-      Math.matrix * Math.matrix * Math.vector * Math.vector ->
-      Math.matrix * Math.vector * double array
-
-    //Singular Value Decomposition
-    abstract dgesvd_ :
-      Math.matrix -> double array * Math.matrix * Math.matrix
-
-    //Singular Value Decomposition Divide- Conquer
-    abstract dgesdd_ : Math.matrix -> double array * Math.matrix * Math.matrix
-
-    //Single Value Decomposition for Symmetric Matrices
-    abstract dsygv_ :
-      Math.matrix * Math.matrix -> Math.matrix * Math.matrix * double array
-
-    //Single Value Decomposition for Symetric Matrices Divide and Conquer
-    abstract dsygvd_ :
-      Math.matrix * Math.matrix -> Math.matrix * Math.matrix * double array
-
-    //Cholesky Factorisation
-    abstract dpotrf_ : char * Math.matrix -> Math.matrix
-    
-    abstract dgetrf_ : matrix -> matrix * int[]
-
-    //Cholesky Factorisation - Expert
-    abstract dposvx_ :
-      Math.matrix * Math.matrix ->
-      Math.matrix * Math.matrix * char * double array * Math.matrix * Math.matrix *
-      float * double array * double array
-
-    //QR Factorisation
-    abstract dgeqrf_ : Math.matrix -> Math.matrix * double array
-
-end
-
-
-module NativeUtilities = begin
-    let nativeArray_as_CMatrix_colvec (arr: 'T NativeArray) = new CMatrix<_>(arr.Ptr,arr.Length,1)
-    let nativeArray_as_FortranMatrix_colvec (arr: 'T NativeArray) = new FortranMatrix<_>(arr.Ptr,arr.Length,1)
-    let pinM m = PinnedArray2.of_matrix(m)
-    let pinV v = PinnedArray.of_vector(v)
-    let pinA arr = PinnedArray.of_array(arr)
-    
-    let pinA2 arr = PinnedArray2.of_array2(arr)
-    
-    let pinMV m1 v2 = pinM m1,pinV v2
-    let pinVV v1 v2 = pinV v1,pinV v2
-    let pinAA v1 v2 = pinA v1,pinA v2
-    let pinMVV m1 v2 m3 = pinM m1,pinV v2,pinV m3
-    let pinMM m1 m2  = pinM m1,pinM m2
-    let pinMMM m1 m2 m3 = pinM m1,pinM m2,pinM m3
-    let freeM (pA: PinnedArray2<'T>) = pA.Free()
-    let freeV (pA: PinnedArray<'T>) = pA.Free()
-    let freeA (pA: PinnedArray<'T>) = pA.Free()
-    
-    let freeA2 a = freeM a
-    
-    let freeMV (pA: PinnedArray2<'T>,pB : PinnedArray<'T>) = pA.Free(); pB.Free()
-    let freeVV (pA: PinnedArray<'T>,pB : PinnedArray<'T>) = pA.Free(); pB.Free()
-    let freeAA (pA: PinnedArray<'T>,pB : PinnedArray<'T>) = pA.Free(); pB.Free()
-    let freeMM (pA: PinnedArray2<'T>,(pB: PinnedArray2<'T>)) = pA.Free();pB.Free()
-    let freeMMM (pA: PinnedArray2<'T>,(pB: PinnedArray2<'T>),(pC: PinnedArray2<'T>)) = pA.Free();pB.Free();pC.Free()
-    let freeMVV (pA: PinnedArray2<'T>,(pB: PinnedArray<'T>),(pC: PinnedArray<'T>)) = pA.Free();pB.Free();pC.Free()
-    
-    let matrixDims (m:Matrix<_>) = m.NumRows, m.NumCols
-    let matrixDim1 (m:Matrix<_>) = m.NumRows
-    let matrixDim2 (m:Matrix<_>) = m.NumCols
-    let vectorDim  (v:Vector<_>) = v.Length
-    
-    let assertDimensions functionName (aName,bName) (a,b) =
-      if a=b then () else
-      failwith (sprintf "Require %s = %s, but %s = %d and %s = %d in %s" aName bName aName a bName b functionName)
-end
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service.fs
deleted file mode 100644
index 4eed4e17..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service.fs
+++ /dev/null
@@ -1,5 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Math.Experimental
-// Code abstracted and moved to service.fs.
-// This file will either be removed, or ILapack move here, splitting up from native utilities.
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_mkl.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_mkl.fs
deleted file mode 100644
index 7612bfae..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_mkl.fs
+++ /dev/null
@@ -1,1354 +0,0 @@
-namespace Microsoft.FSharp.Math.Bindings.Internals
-#nowarn "51"
-open Microsoft.FSharp.Math
-open Microsoft.FSharp.Math.Bindings.Internals
-/// Warning:
-/// IMPORTANT WARNING NOTICE:
-/// INTEL MATH KERNEL LIBRARY 9.1 FOR WINDOWS DOES NOT BELONG TO MICROSOFT - IT IS THIRD PARTY TECHNOLOGY.
-/// IT IS CLEARED ONLY FOR USE BY A SPECIFIC MSR RESEARCH TEAM.
-/// DO NOT USE IT UNTIL YOU HAVE CLEARED ITS USE FOR YOUR PROJECT WITH YOUR LEGAL CONTACT.
-/// 
-/// The following stubs bind directly to Intel MKL functionality.
-/// You should not use them without:
-/// a) Intel MKL developer licenses.
-/// b) Seeking local legal approval.
-module LapackMKLStubs = begin
-  []
-  extern void dgemm_(char *transa, char *transb, int *m, int *n, int *k, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc);
-
-  []
-  extern void dtrsv_(char *uplo,char *trans,char *diag,int *n,double *a,int *lda,double *x,int *incx);
-
-  []
-  extern void dtrsm_(char *side,char *uplo,char *trans,char *diag,int *m,int *n,double *alpha,double *a,int *lda,double *b,int *ldb);   
-   
-  []
-  extern void dgesv_(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info);
-
-  []
-  extern void dgeev_(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info);
-  []
-  extern void dposv_(char *uplo, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info);
-  
-  []
-  extern void dgels_(char *trans, int *m,int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *work, int *lwork, int *info);
-  
-  []
-  extern void dgglse_(int *m, int *n, int *p, double *a, int *lda, double *b, int *ldb, double *c, double *d, double *x, double *work, int *lwork, int *info);
-  
-  []
-  extern void dsyev_(char *jobz, char *uplo, int *n, double *a,int *lda, double *w, double *work, int *lwork, int *info);
-  
-  []
-  extern void dsyevd_(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work, int *lwork, int *iwork, int *liwork, int *info);
-  
-  []
-  extern void dgesvd_(char *jobu, char *jobvt, int  *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *info);
-  
-  []
-  extern void dgesdd_(char *JOBZ, int  *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork,int *iwork, int *info);
-  
-  []
-  extern void dsygv_(int *itype, char *jobz, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork, int *info);
-  
-  []     
-  extern void dsygvd_(int *itype, char *jobz, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork,int *iwork, int *liwork, int *info);
-  
-  []     
-  extern void dggev_( char *jobvl, char *jobvr, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai,double *beta,double *vl,int *ldvl,double *vr,int *ldvr,double *work, int *lwork,int *info);
-  
-  []     
-  extern void dgesvx_(char *fact, char *trans, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, char *equed, double *r, double *c, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info);
-  
-  []     
-  extern void  dposvx_(char *fact, char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double  *ferr, double *berr, double *work, int *iwork, int *info);
-
-  []     
-  extern void  dpotrf_(char *uplo, int *n, double *a, int *lda, int *info);
-  
-  []     
-  extern void  dgetrf_(int *m, int *n, double *a, int *lda, int *ipiv, int *info);
-  
-  []     
-  extern void dgeqrf_(int  *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
-  
-  []
-  extern void dgemv_(char* trans, int* m, int* n,double* alpha, double* A, int* lda,double* x, int* incx, double* beta,double* y, int* incy);
-  
-end
-/// Internal provider of Lapack functionality, not for direct user usage.
-type LapackMKLService() = class
- interface ILapack with 
-///Matrix-Matrix Multiplication
- member this.dgemm_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let k = NativeUtilities.matrixDim2 a in
-  NativeUtilities.assertDimensions "dgemm_" ("k","Dim1(b)") (k,NativeUtilities.matrixDim1 b);
-  let n = NativeUtilities.matrixDim2 b in
-  // allocate results
-  let c = Matrix.zero (m) (n)
-  // transpose
-  let c = Matrix.transpose c
-  // setup actuals
-  let mutable arg_transa = 't'
-  let mutable arg_transb = 't'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let mutable arg_k = k
-  let mutable arg_alpha = 1.0
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_ldk = k
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldn = n
-  let mutable arg_beta = 1.0
-  let arg_c = NativeUtilities.pinM c
-  let mutable arg_ldm = m
-  // call function
-  try
-    LapackMKLStubs.dgemm_(&&arg_transa,&&arg_transb,&&arg_m,&&arg_n,&&arg_k,&&arg_alpha,arg_a.Ptr,&&arg_ldk,arg_b.Ptr,&&arg_ldn,&&arg_beta,arg_c.Ptr,&&arg_ldm)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeM arg_c
-  // INFO
-  // fixups
-  let c = Matrix.transpose c
-  // result tuple
-  c
-
-
-///Solve
- member this.dgesv_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dgesv_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dgesv_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  let NRHS = NativeUtilities.matrixDim2 b in
-  // allocate results
-  let ipiv = Array.zeroCreate  (n)
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_n = n
-  let mutable arg_NRHS = NRHS
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_ipiv = NativeUtilities.pinA ipiv
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackMKLStubs.dgesv_(&&arg_n,&&arg_NRHS,arg_a.Ptr,&&arg_lda,arg_ipiv.Ptr,arg_b.Ptr,&&arg_ldb,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_ipiv
-    NativeUtilities.freeM arg_b
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgesv_: n (argument 1)"
-   | -2  -> invalid_arg "dgesv_: NRHS (argument 2)"
-   | -3  -> invalid_arg "dgesv_: a (argument 3)"
-   | -4  -> invalid_arg "dgesv_: lda (argument 4)"
-   | -5  -> invalid_arg "dgesv_: ipiv (argument 5)"
-   | -6  -> invalid_arg "dgesv_: b (argument 6)"
-   | -7  -> invalid_arg "dgesv_: ldb (argument 7)"
-   | -8  -> invalid_arg "dgesv_: info (argument 8)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgesv_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,ipiv,b
-
-
-///Solve dtrsv
- member this.dtrsv_((uplo),(a:matrix),(x:vector)) = 
-  // input copies
-  let a = Matrix.copy a
-  let x = Vector.copy x
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dtrsv_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dtrsv_" ("n","Dim(x)") (n,NativeUtilities.vectorDim  x);
-  // allocate results
-  // transpose
-  // setup actuals
-  let mutable arg_uplo = uplo
-  let mutable arg_transa = 't'
-  let mutable arg_diag = 'N'
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_x = NativeUtilities.pinV x
-  let mutable arg_incx = 1
-  // call function
-  try
-    LapackMKLStubs.dtrsv_(&&arg_uplo,&&arg_transa,&&arg_diag,&&arg_n,arg_a.Ptr,&&arg_lda,arg_x.Ptr,&&arg_incx)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeV arg_x
-  // INFO
-  // fixups
-  // result tuple
-  x
-
-
-///Solve dtrsm
- member this.dtrsm_((uplo),(a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let k = NativeUtilities.matrixDim2 a in
-  NativeUtilities.assertDimensions "dtrsm_" ("m","Dim1(b)") (m,NativeUtilities.matrixDim1 b);
-  let n = NativeUtilities.matrixDim2 b in
-  // allocate results
-  // transpose
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_side = 'L'
-  let mutable arg_uplo = uplo
-  let mutable arg_transa = 't'
-  let mutable arg_diag = 'N'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let mutable arg_alpha = 1.0
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = m
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = m
-  // call function
-  try
-    LapackMKLStubs.dtrsm_(&&arg_side,&&arg_uplo,&&arg_transa,&&arg_diag,&&arg_m,&&arg_n,&&arg_alpha,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-  // INFO
-  // fixups
-  let b = Matrix.transpose b
-  // result tuple
-  b
-
-
-///Solve LSE using GRQ
- member this.dgglse_((a:matrix),(b:matrix),(c:vector),(d:vector)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  let c = Vector.copy c
-  let d = Vector.copy d
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  let p = NativeUtilities.matrixDim1 b in
-  NativeUtilities.assertDimensions "dgglse_" ("n","Dim2(b)") (n,NativeUtilities.matrixDim2 b);
-  NativeUtilities.assertDimensions "dgglse_" ("m","Dim(c)") (m,NativeUtilities.vectorDim  c);
-  NativeUtilities.assertDimensions "dgglse_" ("p","Dim(d)") (p,NativeUtilities.vectorDim  d);
-  // allocate results
-  let x = Array.zeroCreate  (n)
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let mutable arg_p = p
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 p
-  let arg_c = NativeUtilities.pinV c
-  let arg_d = NativeUtilities.pinV d
-  let arg_x = NativeUtilities.pinA x
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackMKLStubs.dgglse_(&&arg_m,&&arg_n,&&arg_p,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_c.Ptr,arg_d.Ptr,arg_x.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-12) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackMKLStubs.dgglse_(&&arg_m,&&arg_n,&&arg_p,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_c.Ptr,arg_d.Ptr,arg_x.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeV arg_c
-    NativeUtilities.freeV arg_d
-    NativeUtilities.freeA arg_x
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgglse_: m (argument 1)"
-   | -2  -> invalid_arg "dgglse_: n (argument 2)"
-   | -3  -> invalid_arg "dgglse_: p (argument 3)"
-   | -4  -> invalid_arg "dgglse_: a (argument 4)"
-   | -5  -> invalid_arg "dgglse_: lda (argument 5)"
-   | -6  -> invalid_arg "dgglse_: b (argument 6)"
-   | -7  -> invalid_arg "dgglse_: ldb (argument 7)"
-   | -8  -> invalid_arg "dgglse_: c (argument 8)"
-   | -9  -> invalid_arg "dgglse_: d (argument 9)"
-   | -10 -> invalid_arg "dgglse_: x (argument 10)"
-   | -11 -> invalid_arg "dgglse_: work (argument 11)"
-   | -12 -> invalid_arg "dgglse_: lwork (argument 12)"
-   | -13 -> invalid_arg "dgglse_: info (argument 13)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgglse_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a,c,x
-
-
-///EigenValue Non-Symetrix
- member this.dgeev_((jobvr),(a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dgeev_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  // allocate results
-  let wr = Array.zeroCreate  (n)
-  let wi = Array.zeroCreate  (n)
-  let vl = Array2D.zeroCreate (n) (n)
-  let vr = Array2D.zeroCreate (n) (n)
-  let work = Array.zeroCreate  ((4*n))
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_jobvl = 'N'
-  let mutable arg_jobvr = jobvr
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = n
-  let arg_wr = NativeUtilities.pinA wr
-  let arg_wi = NativeUtilities.pinA wi
-  let arg_vl = NativeUtilities.pinA2 vl
-  let mutable arg_ldvl = n
-  let arg_vr = NativeUtilities.pinA2 vr
-  let mutable arg_ldvr = n
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = (4*n)
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackMKLStubs.dgeev_(&&arg_jobvl,&&arg_jobvr,&&arg_n,arg_a.Ptr,&&arg_lda,arg_wr.Ptr,arg_wi.Ptr,arg_vl.Ptr,&&arg_ldvl,arg_vr.Ptr,&&arg_ldvr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_wr
-    NativeUtilities.freeA arg_wi
-    NativeUtilities.freeA2 arg_vl
-    NativeUtilities.freeA2 arg_vr
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgeev_: jobvl (argument 1)"
-   | -2  -> invalid_arg "dgeev_: jobvr (argument 2)"
-   | -3  -> invalid_arg "dgeev_: n (argument 3)"
-   | -4  -> invalid_arg "dgeev_: a (argument 4)"
-   | -5  -> invalid_arg "dgeev_: lda (argument 5)"
-   | -6  -> invalid_arg "dgeev_: wr (argument 6)"
-   | -7  -> invalid_arg "dgeev_: wi (argument 7)"
-   | -8  -> invalid_arg "dgeev_: vl (argument 8)"
-   | -9  -> invalid_arg "dgeev_: ldvl (argument 9)"
-   | -10 -> invalid_arg "dgeev_: vr (argument 10)"
-   | -11 -> invalid_arg "dgeev_: ldvr (argument 11)"
-   | -12 -> invalid_arg "dgeev_: work (argument 12)"
-   | -13 -> invalid_arg "dgeev_: lwork (argument 13)"
-   | -14 -> invalid_arg "dgeev_: info (argument 14)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgeev_ : returned %d. The computation failed." n)
-  // fixups
-  // result tuple
-  wr,wi,vr
-
-
-///Solve Cholesky
- member this.dposv_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dposv_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dposv_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  let nrhs = NativeUtilities.matrixDim2 b in
-  // allocate results
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_uplo = 'U'
-  let mutable arg_n = n
-  let mutable arg_nrhs = nrhs
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackMKLStubs.dposv_(&&arg_uplo,&&arg_n,&&arg_nrhs,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dposv_: uplo (argument 1)"
-   | -2  -> invalid_arg "dposv_: n (argument 2)"
-   | -3  -> invalid_arg "dposv_: nrhs (argument 3)"
-   | -4  -> invalid_arg "dposv_: a (argument 4)"
-   | -5  -> invalid_arg "dposv_: lda (argument 5)"
-   | -6  -> invalid_arg "dposv_: b (argument 6)"
-   | -7  -> invalid_arg "dposv_: ldb (argument 7)"
-   | -8  -> invalid_arg "dposv_: info (argument 8)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dposv_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,b
-
-
-///Solve Upper
- member this.dgels_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  NativeUtilities.assertDimensions "dgels_" ("(max m n)","Dim1(b)") ((max m n),NativeUtilities.matrixDim1 b);
-  let nrhs = NativeUtilities.matrixDim2 b in
-  // allocate results
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_transa = 'n'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let mutable arg_nrhs = nrhs
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max m (max 1 n)
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackMKLStubs.dgels_(&&arg_transa,&&arg_m,&&arg_n,&&arg_nrhs,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-10) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackMKLStubs.dgels_(&&arg_transa,&&arg_m,&&arg_n,&&arg_nrhs,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgels_: transa (argument 1)"
-   | -2  -> invalid_arg "dgels_: m (argument 2)"
-   | -3  -> invalid_arg "dgels_: n (argument 3)"
-   | -4  -> invalid_arg "dgels_: nrhs (argument 4)"
-   | -5  -> invalid_arg "dgels_: a (argument 5)"
-   | -6  -> invalid_arg "dgels_: lda (argument 6)"
-   | -7  -> invalid_arg "dgels_: b (argument 7)"
-   | -8  -> invalid_arg "dgels_: ldb (argument 8)"
-   | -9  -> invalid_arg "dgels_: work (argument 9)"
-   | -10 -> invalid_arg "dgels_: lwork (argument 10)"
-   | -11 -> invalid_arg "dgels_: info (argument 11)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgels_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,b
-
-
-///Eigen Value of Symetric Matrix
- member this.dsyev_((jobz),(uplo),(a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dsyev_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  // allocate results
-  let w = Array.zeroCreate  (n)
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_jobz = jobz
-  let mutable arg_uplo = uplo
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_w = NativeUtilities.pinA w
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackMKLStubs.dsyev_(&&arg_jobz,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-8) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackMKLStubs.dsyev_(&&arg_jobz,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_w
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dsyev_: jobz (argument 1)"
-   | -2  -> invalid_arg "dsyev_: uplo (argument 2)"
-   | -3  -> invalid_arg "dsyev_: n (argument 3)"
-   | -4  -> invalid_arg "dsyev_: a (argument 4)"
-   | -5  -> invalid_arg "dsyev_: lda (argument 5)"
-   | -6  -> invalid_arg "dsyev_: w (argument 6)"
-   | -7  -> invalid_arg "dsyev_: work (argument 7)"
-   | -8  -> invalid_arg "dsyev_: lwork (argument 8)"
-   | -9  -> invalid_arg "dsyev_: info (argument 9)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dsyev_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a,w
-
-
-///Eigen Value of Symetric Matrix - Divide and Conquer
- member this.dsyevd_((jobz),(uplo),(a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dsyevd_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  // allocate results
-  let w = Array.zeroCreate  (n)
-  let work = Array.zeroCreate  (1)
-  let iwork = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_jobz = jobz
-  let mutable arg_uplo = uplo
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_w = NativeUtilities.pinA w
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let arg_iwork = NativeUtilities.pinA iwork
-  let mutable arg_liwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackMKLStubs.dsyevd_(&&arg_jobz,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_liwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  if arg_info = 0   or arg_info=(-8)  or arg_info=(-10) then
-    arg_lwork <- int32 work.[0]
-    arg_liwork <-  iwork.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  let arg_iwork = NativeUtilities.pinA (Array.zeroCreate arg_liwork : int[])
-  // call function
-  try
-    LapackMKLStubs.dsyevd_(&&arg_jobz,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_liwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_w
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dsyevd_: jobz (argument 1)"
-   | -2  -> invalid_arg "dsyevd_: uplo (argument 2)"
-   | -3  -> invalid_arg "dsyevd_: n (argument 3)"
-   | -4  -> invalid_arg "dsyevd_: a (argument 4)"
-   | -5  -> invalid_arg "dsyevd_: lda (argument 5)"
-   | -6  -> invalid_arg "dsyevd_: w (argument 6)"
-   | -7  -> invalid_arg "dsyevd_: work (argument 7)"
-   | -8  -> invalid_arg "dsyevd_: lwork (argument 8)"
-   | -9  -> invalid_arg "dsyevd_: iwork (argument 9)"
-   | -10 -> invalid_arg "dsyevd_: liwork (argument 10)"
-   | -11 -> invalid_arg "dsyevd_: info (argument 11)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dsyevd_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a,w
-
-
-///Singular Value Decomposition
- member this.dgesvd_((a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  // allocate results
-  let s = Array.zeroCreate  (min m n)
-  let u = Matrix.zero (m) (min m n)
-  let vt = Matrix.zero (n) (n)
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  let u = Matrix.transpose u
-  let vt = Matrix.transpose vt
-  // setup actuals
-  let mutable arg_jobu = 'A'
-  let mutable arg_jobvt = 'A'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_s = NativeUtilities.pinA s
-  let arg_u = NativeUtilities.pinM u
-  let mutable arg_ldu = m
-  let arg_vt = NativeUtilities.pinM vt
-  let mutable arg_ldvt = n
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackMKLStubs.dgesvd_(&&arg_jobu,&&arg_jobvt,&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_s.Ptr,arg_u.Ptr,&&arg_ldu,arg_vt.Ptr,&&arg_ldvt,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-13) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackMKLStubs.dgesvd_(&&arg_jobu,&&arg_jobvt,&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_s.Ptr,arg_u.Ptr,&&arg_ldu,arg_vt.Ptr,&&arg_ldvt,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_s
-    NativeUtilities.freeM arg_u
-    NativeUtilities.freeM arg_vt
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgesvd_: jobu (argument 1)"
-   | -2  -> invalid_arg "dgesvd_: jobvt (argument 2)"
-   | -3  -> invalid_arg "dgesvd_: m (argument 3)"
-   | -4  -> invalid_arg "dgesvd_: n (argument 4)"
-   | -5  -> invalid_arg "dgesvd_: a (argument 5)"
-   | -6  -> invalid_arg "dgesvd_: lda (argument 6)"
-   | -7  -> invalid_arg "dgesvd_: s (argument 7)"
-   | -8  -> invalid_arg "dgesvd_: u (argument 8)"
-   | -9  -> invalid_arg "dgesvd_: ldu (argument 9)"
-   | -10 -> invalid_arg "dgesvd_: vt (argument 10)"
-   | -11 -> invalid_arg "dgesvd_: ldvt (argument 11)"
-   | -12 -> invalid_arg "dgesvd_: work (argument 12)"
-   | -13 -> invalid_arg "dgesvd_: lwork (argument 13)"
-   | -14 -> invalid_arg "dgesvd_: info (argument 14)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgesvd_ : returned %d. The computation failed." n)
-  // fixups
-  let u = Matrix.transpose u
-  let vt = Matrix.transpose vt
-  // result tuple
-  s,u,vt
-
-
-///Singular Value Decomposition Divide- Conquer
- member this.dgesdd_((a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  // allocate results
-  let s = Array.zeroCreate  (min m n)
-  let u = Matrix.zero (m) (m)
-  let vt = Matrix.zero (n) (n)
-  let work = Array.zeroCreate  (1)
-  let iwork = Array.zeroCreate  (8*(min m n))
-  // transpose
-  let a = Matrix.transpose a
-  let u = Matrix.transpose u
-  let vt = Matrix.transpose vt
-  // setup actuals
-  let mutable arg_JOBZ = 'A'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_s = NativeUtilities.pinA s
-  let arg_u = NativeUtilities.pinM u
-  let mutable arg_ldu = m
-  let arg_vt = NativeUtilities.pinM vt
-  let mutable arg_ldvt = n
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let arg_iwork = NativeUtilities.pinA iwork
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackMKLStubs.dgesdd_(&&arg_JOBZ,&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_s.Ptr,arg_u.Ptr,&&arg_ldu,arg_vt.Ptr,&&arg_ldvt,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-12) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackMKLStubs.dgesdd_(&&arg_JOBZ,&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_s.Ptr,arg_u.Ptr,&&arg_ldu,arg_vt.Ptr,&&arg_ldvt,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_s
-    NativeUtilities.freeM arg_u
-    NativeUtilities.freeM arg_vt
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgesdd_: JOBZ (argument 1)"
-   | -2  -> invalid_arg "dgesdd_: m (argument 2)"
-   | -3  -> invalid_arg "dgesdd_: n (argument 3)"
-   | -4  -> invalid_arg "dgesdd_: a (argument 4)"
-   | -5  -> invalid_arg "dgesdd_: lda (argument 5)"
-   | -6  -> invalid_arg "dgesdd_: s (argument 6)"
-   | -7  -> invalid_arg "dgesdd_: u (argument 7)"
-   | -8  -> invalid_arg "dgesdd_: ldu (argument 8)"
-   | -9  -> invalid_arg "dgesdd_: vt (argument 9)"
-   | -10 -> invalid_arg "dgesdd_: ldvt (argument 10)"
-   | -11 -> invalid_arg "dgesdd_: work (argument 11)"
-   | -12 -> invalid_arg "dgesdd_: lwork (argument 12)"
-   | -13 -> invalid_arg "dgesdd_: iwork (argument 13)"
-   | -14 -> invalid_arg "dgesdd_: info (argument 14)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgesdd_ : returned %d. The computation failed." n)
-  // fixups
-  let u = Matrix.transpose u
-  let vt = Matrix.transpose vt
-  // result tuple
-  s,u,vt
-
-
-///Single Value Decomposition for Symetric Matrices
- member this.dsygv_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dsygv_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dsygv_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  NativeUtilities.assertDimensions "dsygv_" ("n","Dim2(b)") (n,NativeUtilities.matrixDim2 b);
-  // allocate results
-  let w = Array.zeroCreate  (n)
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_itype = 1
-  let mutable arg_JOBZ = 'V'
-  let mutable arg_uplo = 'U'
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let arg_w = NativeUtilities.pinA w
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackMKLStubs.dsygv_(&&arg_itype,&&arg_JOBZ,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-11) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackMKLStubs.dsygv_(&&arg_itype,&&arg_JOBZ,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeA arg_w
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dsygv_: itype (argument 1)"
-   | -2  -> invalid_arg "dsygv_: JOBZ (argument 2)"
-   | -3  -> invalid_arg "dsygv_: uplo (argument 3)"
-   | -4  -> invalid_arg "dsygv_: n (argument 4)"
-   | -5  -> invalid_arg "dsygv_: a (argument 5)"
-   | -6  -> invalid_arg "dsygv_: lda (argument 6)"
-   | -7  -> invalid_arg "dsygv_: b (argument 7)"
-   | -8  -> invalid_arg "dsygv_: ldb (argument 8)"
-   | -9  -> invalid_arg "dsygv_: w (argument 9)"
-   | -10 -> invalid_arg "dsygv_: work (argument 10)"
-   | -11 -> invalid_arg "dsygv_: lwork (argument 11)"
-   | -12 -> invalid_arg "dsygv_: info (argument 12)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dsygv_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,b,w
-
-
-///Single Value Decomposition for Symetric Matrices Divide and Conquer
- member this.dsygvd_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dsygvd_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dsygvd_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  NativeUtilities.assertDimensions "dsygvd_" ("n","Dim2(b)") (n,NativeUtilities.matrixDim2 b);
-  // allocate results
-  let w = Array.zeroCreate  (n)
-  let work = Array.zeroCreate  (1)
-  let iwork = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_itype = 1
-  let mutable arg_JOBZ = 'V'
-  let mutable arg_uplo = 'U'
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let arg_w = NativeUtilities.pinA w
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let arg_iwork = NativeUtilities.pinA iwork
-  let mutable arg_liwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackMKLStubs.dsygvd_(&&arg_itype,&&arg_JOBZ,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_liwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  if arg_info = 0   or arg_info=(-11)  or arg_info=(-13) then
-    arg_lwork <- int32 work.[0]
-    arg_liwork <-  iwork.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  let arg_iwork = NativeUtilities.pinA (Array.zeroCreate arg_liwork : int[])
-  // call function
-  try
-    LapackMKLStubs.dsygvd_(&&arg_itype,&&arg_JOBZ,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_liwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeA arg_w
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dsygvd_: itype (argument 1)"
-   | -2  -> invalid_arg "dsygvd_: JOBZ (argument 2)"
-   | -3  -> invalid_arg "dsygvd_: uplo (argument 3)"
-   | -4  -> invalid_arg "dsygvd_: n (argument 4)"
-   | -5  -> invalid_arg "dsygvd_: a (argument 5)"
-   | -6  -> invalid_arg "dsygvd_: lda (argument 6)"
-   | -7  -> invalid_arg "dsygvd_: b (argument 7)"
-   | -8  -> invalid_arg "dsygvd_: ldb (argument 8)"
-   | -9  -> invalid_arg "dsygvd_: w (argument 9)"
-   | -10 -> invalid_arg "dsygvd_: work (argument 10)"
-   | -11 -> invalid_arg "dsygvd_: lwork (argument 11)"
-   | -12 -> invalid_arg "dsygvd_: iwork (argument 12)"
-   | -13 -> invalid_arg "dsygvd_: liwork (argument 13)"
-   | -14 -> invalid_arg "dsygvd_: info (argument 14)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dsygvd_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,b,w
-
-
-///LU factorization to compute the solution to a real  system of linear equations 
- member this.dgesvx_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dgesvx_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dgesvx_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  let nrhs = NativeUtilities.matrixDim2 b in
-  // allocate results
-  let af = Matrix.zero (n) (n)
-  let ipiv = Array.zeroCreate  (n)
-  let r = Array.zeroCreate  (n)
-  let c = Array.zeroCreate  (n)
-  let x = Matrix.zero (n) (nrhs)
-  let ferr = Array.zeroCreate  (nrhs)
-  let berr = Array.zeroCreate  (nrhs)
-  let work = Array.zeroCreate  (4*n)
-  let iwork = Array.zeroCreate  (n)
-  // transpose
-  let a = Matrix.transpose a
-  let af = Matrix.transpose af
-  let b = Matrix.transpose b
-  let x = Matrix.transpose x
-  // setup actuals
-  let mutable arg_fact = 'E'
-  let mutable arg_transx = 'n'
-  let mutable arg_n = n
-  let mutable arg_nrhs = nrhs
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_af = NativeUtilities.pinM af
-  let mutable arg_ldaf = max 1 n
-  let arg_ipiv = NativeUtilities.pinA ipiv
-  let mutable arg_equed = 'n'
-  let arg_r = NativeUtilities.pinA r
-  let arg_c = NativeUtilities.pinA c
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let arg_x = NativeUtilities.pinM x
-  let mutable arg_ldx = max 1 n
-  let mutable arg_rcond = 0.0
-  let arg_ferr = NativeUtilities.pinA ferr
-  let arg_berr = NativeUtilities.pinA berr
-  let arg_work = NativeUtilities.pinA work
-  let arg_iwork = NativeUtilities.pinA iwork
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackMKLStubs.dgesvx_(&&arg_fact,&&arg_transx,&&arg_n,&&arg_nrhs,arg_a.Ptr,&&arg_lda,arg_af.Ptr,&&arg_ldaf,arg_ipiv.Ptr,&&arg_equed,arg_r.Ptr,arg_c.Ptr,arg_b.Ptr,&&arg_ldb,arg_x.Ptr,&&arg_ldx,&&arg_rcond,arg_ferr.Ptr,arg_berr.Ptr,arg_work.Ptr,arg_iwork.Ptr,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_af
-    NativeUtilities.freeA arg_ipiv
-    NativeUtilities.freeA arg_r
-    NativeUtilities.freeA arg_c
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeM arg_x
-    NativeUtilities.freeA arg_ferr
-    NativeUtilities.freeA arg_berr
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgesvx_: fact (argument 1)"
-   | -2  -> invalid_arg "dgesvx_: transx (argument 2)"
-   | -3  -> invalid_arg "dgesvx_: n (argument 3)"
-   | -4  -> invalid_arg "dgesvx_: nrhs (argument 4)"
-   | -5  -> invalid_arg "dgesvx_: a (argument 5)"
-   | -6  -> invalid_arg "dgesvx_: lda (argument 6)"
-   | -7  -> invalid_arg "dgesvx_: af (argument 7)"
-   | -8  -> invalid_arg "dgesvx_: ldaf (argument 8)"
-   | -9  -> invalid_arg "dgesvx_: ipiv (argument 9)"
-   | -10 -> invalid_arg "dgesvx_: equed (argument 10)"
-   | -11 -> invalid_arg "dgesvx_: r (argument 11)"
-   | -12 -> invalid_arg "dgesvx_: c (argument 12)"
-   | -13 -> invalid_arg "dgesvx_: b (argument 13)"
-   | -14 -> invalid_arg "dgesvx_: ldb (argument 14)"
-   | -15 -> invalid_arg "dgesvx_: x (argument 15)"
-   | -16 -> invalid_arg "dgesvx_: ldx (argument 16)"
-   | -17 -> invalid_arg "dgesvx_: rcond (argument 17)"
-   | -18 -> invalid_arg "dgesvx_: ferr (argument 18)"
-   | -19 -> invalid_arg "dgesvx_: berr (argument 19)"
-   | -20 -> invalid_arg "dgesvx_: work (argument 20)"
-   | -21 -> invalid_arg "dgesvx_: iwork (argument 21)"
-   | -22 -> invalid_arg "dgesvx_: info (argument 22)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgesvx_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let af = Matrix.transpose af
-  let b = Matrix.transpose b
-  let x = Matrix.transpose x
-  // result tuple
-  a,af,ipiv,arg_equed,r,c,b,x,arg_rcond,ferr,berr
-
-
-///Cholesky Factorisation - Expert
- member this.dposvx_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dposvx_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dposvx_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  let nrhs = NativeUtilities.matrixDim2 b in
-  // allocate results
-  let af = Matrix.zero (n) (n)
-  let s = Array.zeroCreate  (n)
-  let x = Matrix.zero (n) (nrhs)
-  let ferr = Array.zeroCreate  (nrhs)
-  let berr = Array.zeroCreate  (nrhs)
-  let work = Array.zeroCreate  (3*n)
-  let iwork = Array.zeroCreate  (n)
-  // transpose
-  let a = Matrix.transpose a
-  let af = Matrix.transpose af
-  let b = Matrix.transpose b
-  let x = Matrix.transpose x
-  // setup actuals
-  let mutable arg_fact = 'E'
-  let mutable arg_uplo = 'U'
-  let mutable arg_n = n
-  let mutable arg_nrhs = nrhs
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_af = NativeUtilities.pinM af
-  let mutable arg_ldaf = max 1 n
-  let mutable arg_equed = 'n'
-  let arg_s = NativeUtilities.pinA s
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let arg_x = NativeUtilities.pinM x
-  let mutable arg_ldx = max 1 n
-  let mutable arg_rcond = 0.0
-  let arg_ferr = NativeUtilities.pinA ferr
-  let arg_berr = NativeUtilities.pinA berr
-  let arg_work = NativeUtilities.pinA work
-  let arg_iwork = NativeUtilities.pinA iwork
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackMKLStubs.dposvx_(&&arg_fact,&&arg_uplo,&&arg_n,&&arg_nrhs,arg_a.Ptr,&&arg_lda,arg_af.Ptr,&&arg_ldaf,&&arg_equed,arg_s.Ptr,arg_b.Ptr,&&arg_ldb,arg_x.Ptr,&&arg_ldx,&&arg_rcond,arg_ferr.Ptr,arg_berr.Ptr,arg_work.Ptr,arg_iwork.Ptr,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_af
-    NativeUtilities.freeA arg_s
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeM arg_x
-    NativeUtilities.freeA arg_ferr
-    NativeUtilities.freeA arg_berr
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dposvx_: fact (argument 1)"
-   | -2  -> invalid_arg "dposvx_: uplo (argument 2)"
-   | -3  -> invalid_arg "dposvx_: n (argument 3)"
-   | -4  -> invalid_arg "dposvx_: nrhs (argument 4)"
-   | -5  -> invalid_arg "dposvx_: a (argument 5)"
-   | -6  -> invalid_arg "dposvx_: lda (argument 6)"
-   | -7  -> invalid_arg "dposvx_: af (argument 7)"
-   | -8  -> invalid_arg "dposvx_: ldaf (argument 8)"
-   | -9  -> invalid_arg "dposvx_: equed (argument 9)"
-   | -10 -> invalid_arg "dposvx_: s (argument 10)"
-   | -11 -> invalid_arg "dposvx_: b (argument 11)"
-   | -12 -> invalid_arg "dposvx_: ldb (argument 12)"
-   | -13 -> invalid_arg "dposvx_: x (argument 13)"
-   | -14 -> invalid_arg "dposvx_: ldx (argument 14)"
-   | -15 -> invalid_arg "dposvx_: rcond (argument 15)"
-   | -16 -> invalid_arg "dposvx_: ferr (argument 16)"
-   | -17 -> invalid_arg "dposvx_: berr (argument 17)"
-   | -18 -> invalid_arg "dposvx_: work (argument 18)"
-   | -19 -> invalid_arg "dposvx_: iwork (argument 19)"
-   | -20 -> invalid_arg "dposvx_: info (argument 20)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dposvx_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let af = Matrix.transpose af
-  let b = Matrix.transpose b
-  let x = Matrix.transpose x
-  // result tuple
-  a,af,arg_equed,s,b,x,arg_rcond,ferr,berr
-
-
-///Cholesky factorisation of a real symmetric positive definite matrix
- member this.dpotrf_((uplo),(a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dpotrf_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  // allocate results
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_uplo = uplo
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackMKLStubs.dpotrf_(&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dpotrf_: uplo (argument 1)"
-   | -2  -> invalid_arg "dpotrf_: n (argument 2)"
-   | -3  -> invalid_arg "dpotrf_: a (argument 3)"
-   | -4  -> invalid_arg "dpotrf_: lda (argument 4)"
-   | -5  -> invalid_arg "dpotrf_: info (argument 5)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dpotrf_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a
-
-
-///LU factorisation of general matrix using partial pivoting and row interchanges
- member this.dgetrf_((a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  // allocate results
-  let ipiv = Array.zeroCreate  (min m n)
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_ipiv = NativeUtilities.pinA ipiv
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackMKLStubs.dgetrf_(&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_ipiv.Ptr,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_ipiv
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgetrf_: m (argument 1)"
-   | -2  -> invalid_arg "dgetrf_: n (argument 2)"
-   | -3  -> invalid_arg "dgetrf_: a (argument 3)"
-   | -4  -> invalid_arg "dgetrf_: lda (argument 4)"
-   | -5  -> invalid_arg "dgetrf_: ipiv (argument 5)"
-   | -6  -> invalid_arg "dgetrf_: info (argument 6)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgetrf_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a,ipiv
-
-
-///QR Factorisation
- member this.dgeqrf_((a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  // allocate results
-  let tau = Array.zeroCreate  (min m n)
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_tau = NativeUtilities.pinA tau
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackMKLStubs.dgeqrf_(&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_tau.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-7) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackMKLStubs.dgeqrf_(&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_tau.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_tau
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgeqrf_: m (argument 1)"
-   | -2  -> invalid_arg "dgeqrf_: n (argument 2)"
-   | -3  -> invalid_arg "dgeqrf_: a (argument 3)"
-   | -4  -> invalid_arg "dgeqrf_: lda (argument 4)"
-   | -5  -> invalid_arg "dgeqrf_: tau (argument 5)"
-   | -6  -> invalid_arg "dgeqrf_: work (argument 6)"
-   | -7  -> invalid_arg "dgeqrf_: lwork (argument 7)"
-   | -8  -> invalid_arg "dgeqrf_: info (argument 8)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgeqrf_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a,tau
-
-
-///Matrix Vector Multiplication
- member this.dgemv_((a:matrix),(x:vector)) = 
-  // input copies
-  let a = Matrix.copy a
-  let x = Vector.copy x
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  NativeUtilities.assertDimensions "dgemv_" ("n","Dim(x)") (n,NativeUtilities.vectorDim  x);
-  // allocate results
-  let y = Vector.zero (m)
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_trans = 'n'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let mutable arg_alpha = 1.0
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_x = NativeUtilities.pinV x
-  let mutable arg_incx = 1
-  let mutable arg_beta = 1.0
-  let arg_y = NativeUtilities.pinV y
-  let mutable arg_incx = 1
-  // call function
-  try
-    LapackMKLStubs.dgemv_(&&arg_trans,&&arg_m,&&arg_n,&&arg_alpha,arg_a.Ptr,&&arg_lda,arg_x.Ptr,&&arg_incx,&&arg_beta,arg_y.Ptr,&&arg_incx)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeV arg_x
-    NativeUtilities.freeV arg_y
-  // INFO
-  // fixups
-  // result tuple
-  y
-
-
-///EigenValues and Eigen Vectors for nonsymetruc matrices
- member this.dggev_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dggev_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dggev_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  NativeUtilities.assertDimensions "dggev_" ("n","Dim2(b)") (n,NativeUtilities.matrixDim2 b);
-  // allocate results
-  let alphar = Array.zeroCreate  (n)
-  let alphai = Array.zeroCreate  (n)
-  let beta = Array.zeroCreate  (n)
-  let vl = Array2D.zeroCreate (n) (n)
-  let vr = Array2D.zeroCreate (n) (n)
-  let work = Array.zeroCreate  ((8*n))
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_jobvl = 'N'
-  let mutable arg_jobvr = 'V'
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let arg_alphar = NativeUtilities.pinA alphar
-  let arg_alphai = NativeUtilities.pinA alphai
-  let arg_beta = NativeUtilities.pinA beta
-  let arg_vl = NativeUtilities.pinA2 vl
-  let mutable arg_ldvl = n
-  let arg_vr = NativeUtilities.pinA2 vr
-  let mutable arg_ldvr = n
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = (8*n)
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackMKLStubs.dggev_(&&arg_jobvl,&&arg_jobvr,&&arg_n,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_alphar.Ptr,arg_alphai.Ptr,arg_beta.Ptr,arg_vl.Ptr,&&arg_ldvl,arg_vr.Ptr,&&arg_ldvr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeA arg_alphar
-    NativeUtilities.freeA arg_alphai
-    NativeUtilities.freeA arg_beta
-    NativeUtilities.freeA2 arg_vl
-    NativeUtilities.freeA2 arg_vr
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dggev_: jobvl (argument 1)"
-   | -2  -> invalid_arg "dggev_: jobvr (argument 2)"
-   | -3  -> invalid_arg "dggev_: n (argument 3)"
-   | -4  -> invalid_arg "dggev_: a (argument 4)"
-   | -5  -> invalid_arg "dggev_: lda (argument 5)"
-   | -6  -> invalid_arg "dggev_: b (argument 6)"
-   | -7  -> invalid_arg "dggev_: ldb (argument 7)"
-   | -8  -> invalid_arg "dggev_: alphar (argument 8)"
-   | -9  -> invalid_arg "dggev_: alphai (argument 9)"
-   | -10 -> invalid_arg "dggev_: beta (argument 10)"
-   | -11 -> invalid_arg "dggev_: vl (argument 11)"
-   | -12 -> invalid_arg "dggev_: ldvl (argument 12)"
-   | -13 -> invalid_arg "dggev_: vr (argument 13)"
-   | -14 -> invalid_arg "dggev_: ldvr (argument 14)"
-   | -15 -> invalid_arg "dggev_: work (argument 15)"
-   | -16 -> invalid_arg "dggev_: lwork (argument 16)"
-   | -17 -> invalid_arg "dggev_: info (argument 17)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dggev_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,b,alphar,alphai,beta,vr
-
- end
-end
-module LapackMKL = begin
- let MKLProvider = new Microsoft.FSharp.Math.Experimental.Provider<_>("MKL",[|"mkl_def.dll";"mkl_lapack.dll"|],fun () -> new LapackMKLService() :> ILapack)
-end
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_mkl.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_mkl.fsi
deleted file mode 100644
index 218657d3..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_mkl.fsi
+++ /dev/null
@@ -1,5 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Math.Bindings.Internals
-module LapackMKL =
-  val MKLProvider : Microsoft.FSharp.Math.Experimental.Provider
-module LapackMKLStubs = begin end
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_netlib.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_netlib.fs
deleted file mode 100644
index 65ed2df2..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_netlib.fs
+++ /dev/null
@@ -1,1345 +0,0 @@
-namespace Microsoft.FSharp.Math.Bindings.Internals
-#nowarn "51"
-open Microsoft.FSharp.Math
-open Microsoft.FSharp.Math.Bindings.Internals
-/// Notice: This file generates bindings for netlib.org BLAS/LAPACK DLLs
-module LapackNetlibStubs = begin
-  []
-  extern void dgemm_(char *transa, char *transb, int *m, int *n, int *k, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc);
-
-  []
-  extern void dtrsv_(char *uplo,char *trans,char *diag,int *n,double *a,int *lda,double *x,int *incx);
-
-  []
-  extern void dtrsm_(char *side,char *uplo,char *trans,char *diag,int *m,int *n,double *alpha,double *a,int *lda,double *b,int *ldb);   
-   
-  []
-  extern void dgesv_(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info);
-
-  []
-  extern void dgeev_(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info);
-  []
-  extern void dposv_(char *uplo, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info);
-  
-  []
-  extern void dgels_(char *trans, int *m,int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *work, int *lwork, int *info);
-  
-  []
-  extern void dgglse_(int *m, int *n, int *p, double *a, int *lda, double *b, int *ldb, double *c, double *d, double *x, double *work, int *lwork, int *info);
-  
-  []
-  extern void dsyev_(char *jobz, char *uplo, int *n, double *a,int *lda, double *w, double *work, int *lwork, int *info);
-  
-  []
-  extern void dsyevd_(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work, int *lwork, int *iwork, int *liwork, int *info);
-  
-  []
-  extern void dgesvd_(char *jobu, char *jobvt, int  *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *info);
-  
-  []
-  extern void dgesdd_(char *JOBZ, int  *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork,int *iwork, int *info);
-  
-  []
-  extern void dsygv_(int *itype, char *jobz, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork, int *info);
-  
-  []     
-  extern void dsygvd_(int *itype, char *jobz, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork,int *iwork, int *liwork, int *info);
-  
-  []     
-  extern void dggev_( char *jobvl, char *jobvr, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai,double *beta,double *vl,int *ldvl,double *vr,int *ldvr,double *work, int *lwork,int *info);
-  
-  []     
-  extern void dgesvx_(char *fact, char *trans, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, char *equed, double *r, double *c, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info);
-  
-  []     
-  extern void  dposvx_(char *fact, char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double  *ferr, double *berr, double *work, int *iwork, int *info);
-
-  []     
-  extern void  dpotrf_(char *uplo, int *n, double *a, int *lda, int *info);
-  
-  []     
-  extern void  dgetrf_(int *m, int *n, double *a, int *lda, int *ipiv, int *info);
-  
-  []     
-  extern void dgeqrf_(int  *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
-  
-  []
-  extern void dgemv_(char* trans, int* m, int* n,double* alpha, double* A, int* lda,double* x, int* incx, double* beta,double* y, int* incy);
-  
-end
-/// Internal provider of Lapack functionality, not for direct user usage.
-type LapackNetlibService() = class
- interface ILapack with 
-///Matrix-Matrix Multiplication
- member this.dgemm_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let k = NativeUtilities.matrixDim2 a in
-  NativeUtilities.assertDimensions "dgemm_" ("k","Dim1(b)") (k,NativeUtilities.matrixDim1 b);
-  let n = NativeUtilities.matrixDim2 b in
-  // allocate results
-  let c = Matrix.zero (m) (n)
-  // transpose
-  let c = Matrix.transpose c
-  // setup actuals
-  let mutable arg_transa = 't'
-  let mutable arg_transb = 't'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let mutable arg_k = k
-  let mutable arg_alpha = 1.0
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_ldk = k
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldn = n
-  let mutable arg_beta = 1.0
-  let arg_c = NativeUtilities.pinM c
-  let mutable arg_ldm = m
-  // call function
-  try
-    LapackNetlibStubs.dgemm_(&&arg_transa,&&arg_transb,&&arg_m,&&arg_n,&&arg_k,&&arg_alpha,arg_a.Ptr,&&arg_ldk,arg_b.Ptr,&&arg_ldn,&&arg_beta,arg_c.Ptr,&&arg_ldm)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeM arg_c
-  // INFO
-  // fixups
-  let c = Matrix.transpose c
-  // result tuple
-  c
-
-
-///Solve
- member this.dgesv_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dgesv_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dgesv_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  let NRHS = NativeUtilities.matrixDim2 b in
-  // allocate results
-  let ipiv = Array.zeroCreate  (n)
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_n = n
-  let mutable arg_NRHS = NRHS
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_ipiv = NativeUtilities.pinA ipiv
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackNetlibStubs.dgesv_(&&arg_n,&&arg_NRHS,arg_a.Ptr,&&arg_lda,arg_ipiv.Ptr,arg_b.Ptr,&&arg_ldb,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_ipiv
-    NativeUtilities.freeM arg_b
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgesv_: n (argument 1)"
-   | -2  -> invalid_arg "dgesv_: NRHS (argument 2)"
-   | -3  -> invalid_arg "dgesv_: a (argument 3)"
-   | -4  -> invalid_arg "dgesv_: lda (argument 4)"
-   | -5  -> invalid_arg "dgesv_: ipiv (argument 5)"
-   | -6  -> invalid_arg "dgesv_: b (argument 6)"
-   | -7  -> invalid_arg "dgesv_: ldb (argument 7)"
-   | -8  -> invalid_arg "dgesv_: info (argument 8)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgesv_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,ipiv,b
-
-
-///Solve dtrsv
- member this.dtrsv_((uplo),(a:matrix),(x:vector)) = 
-  // input copies
-  let a = Matrix.copy a
-  let x = Vector.copy x
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dtrsv_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dtrsv_" ("n","Dim(x)") (n,NativeUtilities.vectorDim  x);
-  // allocate results
-  // transpose
-  // setup actuals
-  let mutable arg_uplo = uplo
-  let mutable arg_transa = 't'
-  let mutable arg_diag = 'N'
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_x = NativeUtilities.pinV x
-  let mutable arg_incx = 1
-  // call function
-  try
-    LapackNetlibStubs.dtrsv_(&&arg_uplo,&&arg_transa,&&arg_diag,&&arg_n,arg_a.Ptr,&&arg_lda,arg_x.Ptr,&&arg_incx)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeV arg_x
-  // INFO
-  // fixups
-  // result tuple
-  x
-
-
-///Solve dtrsm
- member this.dtrsm_((uplo),(a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let k = NativeUtilities.matrixDim2 a in
-  NativeUtilities.assertDimensions "dtrsm_" ("m","Dim1(b)") (m,NativeUtilities.matrixDim1 b);
-  let n = NativeUtilities.matrixDim2 b in
-  // allocate results
-  // transpose
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_side = 'L'
-  let mutable arg_uplo = uplo
-  let mutable arg_transa = 't'
-  let mutable arg_diag = 'N'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let mutable arg_alpha = 1.0
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = m
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = m
-  // call function
-  try
-    LapackNetlibStubs.dtrsm_(&&arg_side,&&arg_uplo,&&arg_transa,&&arg_diag,&&arg_m,&&arg_n,&&arg_alpha,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-  // INFO
-  // fixups
-  let b = Matrix.transpose b
-  // result tuple
-  b
-
-
-///Solve LSE using GRQ
- member this.dgglse_((a:matrix),(b:matrix),(c:vector),(d:vector)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  let c = Vector.copy c
-  let d = Vector.copy d
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  let p = NativeUtilities.matrixDim1 b in
-  NativeUtilities.assertDimensions "dgglse_" ("n","Dim2(b)") (n,NativeUtilities.matrixDim2 b);
-  NativeUtilities.assertDimensions "dgglse_" ("m","Dim(c)") (m,NativeUtilities.vectorDim  c);
-  NativeUtilities.assertDimensions "dgglse_" ("p","Dim(d)") (p,NativeUtilities.vectorDim  d);
-  // allocate results
-  let x = Array.zeroCreate  (n)
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let mutable arg_p = p
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 p
-  let arg_c = NativeUtilities.pinV c
-  let arg_d = NativeUtilities.pinV d
-  let arg_x = NativeUtilities.pinA x
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackNetlibStubs.dgglse_(&&arg_m,&&arg_n,&&arg_p,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_c.Ptr,arg_d.Ptr,arg_x.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-12) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackNetlibStubs.dgglse_(&&arg_m,&&arg_n,&&arg_p,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_c.Ptr,arg_d.Ptr,arg_x.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeV arg_c
-    NativeUtilities.freeV arg_d
-    NativeUtilities.freeA arg_x
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgglse_: m (argument 1)"
-   | -2  -> invalid_arg "dgglse_: n (argument 2)"
-   | -3  -> invalid_arg "dgglse_: p (argument 3)"
-   | -4  -> invalid_arg "dgglse_: a (argument 4)"
-   | -5  -> invalid_arg "dgglse_: lda (argument 5)"
-   | -6  -> invalid_arg "dgglse_: b (argument 6)"
-   | -7  -> invalid_arg "dgglse_: ldb (argument 7)"
-   | -8  -> invalid_arg "dgglse_: c (argument 8)"
-   | -9  -> invalid_arg "dgglse_: d (argument 9)"
-   | -10 -> invalid_arg "dgglse_: x (argument 10)"
-   | -11 -> invalid_arg "dgglse_: work (argument 11)"
-   | -12 -> invalid_arg "dgglse_: lwork (argument 12)"
-   | -13 -> invalid_arg "dgglse_: info (argument 13)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgglse_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a,c,x
-
-
-///EigenValue Non-Symetrix
- member this.dgeev_((jobvr),(a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dgeev_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  // allocate results
-  let wr = Array.zeroCreate  (n)
-  let wi = Array.zeroCreate  (n)
-  let vl = Array2D.zeroCreate (n) (n)
-  let vr = Array2D.zeroCreate (n) (n)
-  let work = Array.zeroCreate  ((4*n))
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_jobvl = 'N'
-  let mutable arg_jobvr = jobvr
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = n
-  let arg_wr = NativeUtilities.pinA wr
-  let arg_wi = NativeUtilities.pinA wi
-  let arg_vl = NativeUtilities.pinA2 vl
-  let mutable arg_ldvl = n
-  let arg_vr = NativeUtilities.pinA2 vr
-  let mutable arg_ldvr = n
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = (4*n)
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackNetlibStubs.dgeev_(&&arg_jobvl,&&arg_jobvr,&&arg_n,arg_a.Ptr,&&arg_lda,arg_wr.Ptr,arg_wi.Ptr,arg_vl.Ptr,&&arg_ldvl,arg_vr.Ptr,&&arg_ldvr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_wr
-    NativeUtilities.freeA arg_wi
-    NativeUtilities.freeA2 arg_vl
-    NativeUtilities.freeA2 arg_vr
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgeev_: jobvl (argument 1)"
-   | -2  -> invalid_arg "dgeev_: jobvr (argument 2)"
-   | -3  -> invalid_arg "dgeev_: n (argument 3)"
-   | -4  -> invalid_arg "dgeev_: a (argument 4)"
-   | -5  -> invalid_arg "dgeev_: lda (argument 5)"
-   | -6  -> invalid_arg "dgeev_: wr (argument 6)"
-   | -7  -> invalid_arg "dgeev_: wi (argument 7)"
-   | -8  -> invalid_arg "dgeev_: vl (argument 8)"
-   | -9  -> invalid_arg "dgeev_: ldvl (argument 9)"
-   | -10 -> invalid_arg "dgeev_: vr (argument 10)"
-   | -11 -> invalid_arg "dgeev_: ldvr (argument 11)"
-   | -12 -> invalid_arg "dgeev_: work (argument 12)"
-   | -13 -> invalid_arg "dgeev_: lwork (argument 13)"
-   | -14 -> invalid_arg "dgeev_: info (argument 14)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgeev_ : returned %d. The computation failed." n)
-  // fixups
-  // result tuple
-  wr,wi,vr
-
-
-///Solve Cholesky
- member this.dposv_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dposv_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dposv_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  let nrhs = NativeUtilities.matrixDim2 b in
-  // allocate results
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_uplo = 'U'
-  let mutable arg_n = n
-  let mutable arg_nrhs = nrhs
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackNetlibStubs.dposv_(&&arg_uplo,&&arg_n,&&arg_nrhs,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dposv_: uplo (argument 1)"
-   | -2  -> invalid_arg "dposv_: n (argument 2)"
-   | -3  -> invalid_arg "dposv_: nrhs (argument 3)"
-   | -4  -> invalid_arg "dposv_: a (argument 4)"
-   | -5  -> invalid_arg "dposv_: lda (argument 5)"
-   | -6  -> invalid_arg "dposv_: b (argument 6)"
-   | -7  -> invalid_arg "dposv_: ldb (argument 7)"
-   | -8  -> invalid_arg "dposv_: info (argument 8)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dposv_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,b
-
-
-///Solve Upper
- member this.dgels_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  NativeUtilities.assertDimensions "dgels_" ("(max m n)","Dim1(b)") ((max m n),NativeUtilities.matrixDim1 b);
-  let nrhs = NativeUtilities.matrixDim2 b in
-  // allocate results
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_transa = 'n'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let mutable arg_nrhs = nrhs
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max m (max 1 n)
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackNetlibStubs.dgels_(&&arg_transa,&&arg_m,&&arg_n,&&arg_nrhs,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-10) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackNetlibStubs.dgels_(&&arg_transa,&&arg_m,&&arg_n,&&arg_nrhs,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgels_: transa (argument 1)"
-   | -2  -> invalid_arg "dgels_: m (argument 2)"
-   | -3  -> invalid_arg "dgels_: n (argument 3)"
-   | -4  -> invalid_arg "dgels_: nrhs (argument 4)"
-   | -5  -> invalid_arg "dgels_: a (argument 5)"
-   | -6  -> invalid_arg "dgels_: lda (argument 6)"
-   | -7  -> invalid_arg "dgels_: b (argument 7)"
-   | -8  -> invalid_arg "dgels_: ldb (argument 8)"
-   | -9  -> invalid_arg "dgels_: work (argument 9)"
-   | -10 -> invalid_arg "dgels_: lwork (argument 10)"
-   | -11 -> invalid_arg "dgels_: info (argument 11)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgels_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,b
-
-
-///Eigen Value of Symetric Matrix
- member this.dsyev_((jobz),(uplo),(a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dsyev_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  // allocate results
-  let w = Array.zeroCreate  (n)
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_jobz = jobz
-  let mutable arg_uplo = uplo
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_w = NativeUtilities.pinA w
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackNetlibStubs.dsyev_(&&arg_jobz,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-8) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackNetlibStubs.dsyev_(&&arg_jobz,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_w
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dsyev_: jobz (argument 1)"
-   | -2  -> invalid_arg "dsyev_: uplo (argument 2)"
-   | -3  -> invalid_arg "dsyev_: n (argument 3)"
-   | -4  -> invalid_arg "dsyev_: a (argument 4)"
-   | -5  -> invalid_arg "dsyev_: lda (argument 5)"
-   | -6  -> invalid_arg "dsyev_: w (argument 6)"
-   | -7  -> invalid_arg "dsyev_: work (argument 7)"
-   | -8  -> invalid_arg "dsyev_: lwork (argument 8)"
-   | -9  -> invalid_arg "dsyev_: info (argument 9)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dsyev_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a,w
-
-
-///Eigen Value of Symetric Matrix - Divide and Conquer
- member this.dsyevd_((jobz),(uplo),(a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dsyevd_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  // allocate results
-  let w = Array.zeroCreate  (n)
-  let work = Array.zeroCreate  (1)
-  let iwork = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_jobz = jobz
-  let mutable arg_uplo = uplo
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_w = NativeUtilities.pinA w
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let arg_iwork = NativeUtilities.pinA iwork
-  let mutable arg_liwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackNetlibStubs.dsyevd_(&&arg_jobz,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_liwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  if arg_info = 0   or arg_info=(-8)  or arg_info=(-10) then
-    arg_lwork <- int32 work.[0]
-    arg_liwork <-  iwork.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  let arg_iwork = NativeUtilities.pinA (Array.zeroCreate arg_liwork : int[])
-  // call function
-  try
-    LapackNetlibStubs.dsyevd_(&&arg_jobz,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_liwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_w
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dsyevd_: jobz (argument 1)"
-   | -2  -> invalid_arg "dsyevd_: uplo (argument 2)"
-   | -3  -> invalid_arg "dsyevd_: n (argument 3)"
-   | -4  -> invalid_arg "dsyevd_: a (argument 4)"
-   | -5  -> invalid_arg "dsyevd_: lda (argument 5)"
-   | -6  -> invalid_arg "dsyevd_: w (argument 6)"
-   | -7  -> invalid_arg "dsyevd_: work (argument 7)"
-   | -8  -> invalid_arg "dsyevd_: lwork (argument 8)"
-   | -9  -> invalid_arg "dsyevd_: iwork (argument 9)"
-   | -10 -> invalid_arg "dsyevd_: liwork (argument 10)"
-   | -11 -> invalid_arg "dsyevd_: info (argument 11)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dsyevd_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a,w
-
-
-///Singular Value Decomposition
- member this.dgesvd_((a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  // allocate results
-  let s = Array.zeroCreate  (min m n)
-  let u = Matrix.zero (m) (min m n)
-  let vt = Matrix.zero (n) (n)
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  let u = Matrix.transpose u
-  let vt = Matrix.transpose vt
-  // setup actuals
-  let mutable arg_jobu = 'A'
-  let mutable arg_jobvt = 'A'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_s = NativeUtilities.pinA s
-  let arg_u = NativeUtilities.pinM u
-  let mutable arg_ldu = m
-  let arg_vt = NativeUtilities.pinM vt
-  let mutable arg_ldvt = n
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackNetlibStubs.dgesvd_(&&arg_jobu,&&arg_jobvt,&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_s.Ptr,arg_u.Ptr,&&arg_ldu,arg_vt.Ptr,&&arg_ldvt,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-13) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackNetlibStubs.dgesvd_(&&arg_jobu,&&arg_jobvt,&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_s.Ptr,arg_u.Ptr,&&arg_ldu,arg_vt.Ptr,&&arg_ldvt,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_s
-    NativeUtilities.freeM arg_u
-    NativeUtilities.freeM arg_vt
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgesvd_: jobu (argument 1)"
-   | -2  -> invalid_arg "dgesvd_: jobvt (argument 2)"
-   | -3  -> invalid_arg "dgesvd_: m (argument 3)"
-   | -4  -> invalid_arg "dgesvd_: n (argument 4)"
-   | -5  -> invalid_arg "dgesvd_: a (argument 5)"
-   | -6  -> invalid_arg "dgesvd_: lda (argument 6)"
-   | -7  -> invalid_arg "dgesvd_: s (argument 7)"
-   | -8  -> invalid_arg "dgesvd_: u (argument 8)"
-   | -9  -> invalid_arg "dgesvd_: ldu (argument 9)"
-   | -10 -> invalid_arg "dgesvd_: vt (argument 10)"
-   | -11 -> invalid_arg "dgesvd_: ldvt (argument 11)"
-   | -12 -> invalid_arg "dgesvd_: work (argument 12)"
-   | -13 -> invalid_arg "dgesvd_: lwork (argument 13)"
-   | -14 -> invalid_arg "dgesvd_: info (argument 14)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgesvd_ : returned %d. The computation failed." n)
-  // fixups
-  let u = Matrix.transpose u
-  let vt = Matrix.transpose vt
-  // result tuple
-  s,u,vt
-
-
-///Singular Value Decomposition Divide- Conquer
- member this.dgesdd_((a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  // allocate results
-  let s = Array.zeroCreate  (min m n)
-  let u = Matrix.zero (m) (m)
-  let vt = Matrix.zero (n) (n)
-  let work = Array.zeroCreate  (1)
-  let iwork = Array.zeroCreate  (8*(min m n))
-  // transpose
-  let a = Matrix.transpose a
-  let u = Matrix.transpose u
-  let vt = Matrix.transpose vt
-  // setup actuals
-  let mutable arg_JOBZ = 'A'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_s = NativeUtilities.pinA s
-  let arg_u = NativeUtilities.pinM u
-  let mutable arg_ldu = m
-  let arg_vt = NativeUtilities.pinM vt
-  let mutable arg_ldvt = n
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let arg_iwork = NativeUtilities.pinA iwork
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackNetlibStubs.dgesdd_(&&arg_JOBZ,&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_s.Ptr,arg_u.Ptr,&&arg_ldu,arg_vt.Ptr,&&arg_ldvt,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-12) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackNetlibStubs.dgesdd_(&&arg_JOBZ,&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_s.Ptr,arg_u.Ptr,&&arg_ldu,arg_vt.Ptr,&&arg_ldvt,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_s
-    NativeUtilities.freeM arg_u
-    NativeUtilities.freeM arg_vt
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgesdd_: JOBZ (argument 1)"
-   | -2  -> invalid_arg "dgesdd_: m (argument 2)"
-   | -3  -> invalid_arg "dgesdd_: n (argument 3)"
-   | -4  -> invalid_arg "dgesdd_: a (argument 4)"
-   | -5  -> invalid_arg "dgesdd_: lda (argument 5)"
-   | -6  -> invalid_arg "dgesdd_: s (argument 6)"
-   | -7  -> invalid_arg "dgesdd_: u (argument 7)"
-   | -8  -> invalid_arg "dgesdd_: ldu (argument 8)"
-   | -9  -> invalid_arg "dgesdd_: vt (argument 9)"
-   | -10 -> invalid_arg "dgesdd_: ldvt (argument 10)"
-   | -11 -> invalid_arg "dgesdd_: work (argument 11)"
-   | -12 -> invalid_arg "dgesdd_: lwork (argument 12)"
-   | -13 -> invalid_arg "dgesdd_: iwork (argument 13)"
-   | -14 -> invalid_arg "dgesdd_: info (argument 14)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgesdd_ : returned %d. The computation failed." n)
-  // fixups
-  let u = Matrix.transpose u
-  let vt = Matrix.transpose vt
-  // result tuple
-  s,u,vt
-
-
-///Single Value Decomposition for Symetric Matrices
- member this.dsygv_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dsygv_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dsygv_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  NativeUtilities.assertDimensions "dsygv_" ("n","Dim2(b)") (n,NativeUtilities.matrixDim2 b);
-  // allocate results
-  let w = Array.zeroCreate  (n)
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_itype = 1
-  let mutable arg_JOBZ = 'V'
-  let mutable arg_uplo = 'U'
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let arg_w = NativeUtilities.pinA w
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackNetlibStubs.dsygv_(&&arg_itype,&&arg_JOBZ,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-11) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackNetlibStubs.dsygv_(&&arg_itype,&&arg_JOBZ,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeA arg_w
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dsygv_: itype (argument 1)"
-   | -2  -> invalid_arg "dsygv_: JOBZ (argument 2)"
-   | -3  -> invalid_arg "dsygv_: uplo (argument 3)"
-   | -4  -> invalid_arg "dsygv_: n (argument 4)"
-   | -5  -> invalid_arg "dsygv_: a (argument 5)"
-   | -6  -> invalid_arg "dsygv_: lda (argument 6)"
-   | -7  -> invalid_arg "dsygv_: b (argument 7)"
-   | -8  -> invalid_arg "dsygv_: ldb (argument 8)"
-   | -9  -> invalid_arg "dsygv_: w (argument 9)"
-   | -10 -> invalid_arg "dsygv_: work (argument 10)"
-   | -11 -> invalid_arg "dsygv_: lwork (argument 11)"
-   | -12 -> invalid_arg "dsygv_: info (argument 12)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dsygv_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,b,w
-
-
-///Single Value Decomposition for Symetric Matrices Divide and Conquer
- member this.dsygvd_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dsygvd_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dsygvd_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  NativeUtilities.assertDimensions "dsygvd_" ("n","Dim2(b)") (n,NativeUtilities.matrixDim2 b);
-  // allocate results
-  let w = Array.zeroCreate  (n)
-  let work = Array.zeroCreate  (1)
-  let iwork = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_itype = 1
-  let mutable arg_JOBZ = 'V'
-  let mutable arg_uplo = 'U'
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let arg_w = NativeUtilities.pinA w
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let arg_iwork = NativeUtilities.pinA iwork
-  let mutable arg_liwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackNetlibStubs.dsygvd_(&&arg_itype,&&arg_JOBZ,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_liwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  if arg_info = 0   or arg_info=(-11)  or arg_info=(-13) then
-    arg_lwork <- int32 work.[0]
-    arg_liwork <-  iwork.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  let arg_iwork = NativeUtilities.pinA (Array.zeroCreate arg_liwork : int[])
-  // call function
-  try
-    LapackNetlibStubs.dsygvd_(&&arg_itype,&&arg_JOBZ,&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_w.Ptr,arg_work.Ptr,&&arg_lwork,arg_iwork.Ptr,&&arg_liwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeA arg_w
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dsygvd_: itype (argument 1)"
-   | -2  -> invalid_arg "dsygvd_: JOBZ (argument 2)"
-   | -3  -> invalid_arg "dsygvd_: uplo (argument 3)"
-   | -4  -> invalid_arg "dsygvd_: n (argument 4)"
-   | -5  -> invalid_arg "dsygvd_: a (argument 5)"
-   | -6  -> invalid_arg "dsygvd_: lda (argument 6)"
-   | -7  -> invalid_arg "dsygvd_: b (argument 7)"
-   | -8  -> invalid_arg "dsygvd_: ldb (argument 8)"
-   | -9  -> invalid_arg "dsygvd_: w (argument 9)"
-   | -10 -> invalid_arg "dsygvd_: work (argument 10)"
-   | -11 -> invalid_arg "dsygvd_: lwork (argument 11)"
-   | -12 -> invalid_arg "dsygvd_: iwork (argument 12)"
-   | -13 -> invalid_arg "dsygvd_: liwork (argument 13)"
-   | -14 -> invalid_arg "dsygvd_: info (argument 14)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dsygvd_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,b,w
-
-
-///LU factorization to compute the solution to a real  system of linear equations 
- member this.dgesvx_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dgesvx_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dgesvx_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  let nrhs = NativeUtilities.matrixDim2 b in
-  // allocate results
-  let af = Matrix.zero (n) (n)
-  let ipiv = Array.zeroCreate  (n)
-  let r = Array.zeroCreate  (n)
-  let c = Array.zeroCreate  (n)
-  let x = Matrix.zero (n) (nrhs)
-  let ferr = Array.zeroCreate  (nrhs)
-  let berr = Array.zeroCreate  (nrhs)
-  let work = Array.zeroCreate  (4*n)
-  let iwork = Array.zeroCreate  (n)
-  // transpose
-  let a = Matrix.transpose a
-  let af = Matrix.transpose af
-  let b = Matrix.transpose b
-  let x = Matrix.transpose x
-  // setup actuals
-  let mutable arg_fact = 'E'
-  let mutable arg_transx = 'n'
-  let mutable arg_n = n
-  let mutable arg_nrhs = nrhs
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_af = NativeUtilities.pinM af
-  let mutable arg_ldaf = max 1 n
-  let arg_ipiv = NativeUtilities.pinA ipiv
-  let mutable arg_equed = 'n'
-  let arg_r = NativeUtilities.pinA r
-  let arg_c = NativeUtilities.pinA c
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let arg_x = NativeUtilities.pinM x
-  let mutable arg_ldx = max 1 n
-  let mutable arg_rcond = 0.0
-  let arg_ferr = NativeUtilities.pinA ferr
-  let arg_berr = NativeUtilities.pinA berr
-  let arg_work = NativeUtilities.pinA work
-  let arg_iwork = NativeUtilities.pinA iwork
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackNetlibStubs.dgesvx_(&&arg_fact,&&arg_transx,&&arg_n,&&arg_nrhs,arg_a.Ptr,&&arg_lda,arg_af.Ptr,&&arg_ldaf,arg_ipiv.Ptr,&&arg_equed,arg_r.Ptr,arg_c.Ptr,arg_b.Ptr,&&arg_ldb,arg_x.Ptr,&&arg_ldx,&&arg_rcond,arg_ferr.Ptr,arg_berr.Ptr,arg_work.Ptr,arg_iwork.Ptr,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_af
-    NativeUtilities.freeA arg_ipiv
-    NativeUtilities.freeA arg_r
-    NativeUtilities.freeA arg_c
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeM arg_x
-    NativeUtilities.freeA arg_ferr
-    NativeUtilities.freeA arg_berr
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgesvx_: fact (argument 1)"
-   | -2  -> invalid_arg "dgesvx_: transx (argument 2)"
-   | -3  -> invalid_arg "dgesvx_: n (argument 3)"
-   | -4  -> invalid_arg "dgesvx_: nrhs (argument 4)"
-   | -5  -> invalid_arg "dgesvx_: a (argument 5)"
-   | -6  -> invalid_arg "dgesvx_: lda (argument 6)"
-   | -7  -> invalid_arg "dgesvx_: af (argument 7)"
-   | -8  -> invalid_arg "dgesvx_: ldaf (argument 8)"
-   | -9  -> invalid_arg "dgesvx_: ipiv (argument 9)"
-   | -10 -> invalid_arg "dgesvx_: equed (argument 10)"
-   | -11 -> invalid_arg "dgesvx_: r (argument 11)"
-   | -12 -> invalid_arg "dgesvx_: c (argument 12)"
-   | -13 -> invalid_arg "dgesvx_: b (argument 13)"
-   | -14 -> invalid_arg "dgesvx_: ldb (argument 14)"
-   | -15 -> invalid_arg "dgesvx_: x (argument 15)"
-   | -16 -> invalid_arg "dgesvx_: ldx (argument 16)"
-   | -17 -> invalid_arg "dgesvx_: rcond (argument 17)"
-   | -18 -> invalid_arg "dgesvx_: ferr (argument 18)"
-   | -19 -> invalid_arg "dgesvx_: berr (argument 19)"
-   | -20 -> invalid_arg "dgesvx_: work (argument 20)"
-   | -21 -> invalid_arg "dgesvx_: iwork (argument 21)"
-   | -22 -> invalid_arg "dgesvx_: info (argument 22)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgesvx_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let af = Matrix.transpose af
-  let b = Matrix.transpose b
-  let x = Matrix.transpose x
-  // result tuple
-  a,af,ipiv,arg_equed,r,c,b,x,arg_rcond,ferr,berr
-
-
-///Cholesky Factorisation - Expert
- member this.dposvx_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dposvx_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dposvx_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  let nrhs = NativeUtilities.matrixDim2 b in
-  // allocate results
-  let af = Matrix.zero (n) (n)
-  let s = Array.zeroCreate  (n)
-  let x = Matrix.zero (n) (nrhs)
-  let ferr = Array.zeroCreate  (nrhs)
-  let berr = Array.zeroCreate  (nrhs)
-  let work = Array.zeroCreate  (3*n)
-  let iwork = Array.zeroCreate  (n)
-  // transpose
-  let a = Matrix.transpose a
-  let af = Matrix.transpose af
-  let b = Matrix.transpose b
-  let x = Matrix.transpose x
-  // setup actuals
-  let mutable arg_fact = 'E'
-  let mutable arg_uplo = 'U'
-  let mutable arg_n = n
-  let mutable arg_nrhs = nrhs
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_af = NativeUtilities.pinM af
-  let mutable arg_ldaf = max 1 n
-  let mutable arg_equed = 'n'
-  let arg_s = NativeUtilities.pinA s
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let arg_x = NativeUtilities.pinM x
-  let mutable arg_ldx = max 1 n
-  let mutable arg_rcond = 0.0
-  let arg_ferr = NativeUtilities.pinA ferr
-  let arg_berr = NativeUtilities.pinA berr
-  let arg_work = NativeUtilities.pinA work
-  let arg_iwork = NativeUtilities.pinA iwork
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackNetlibStubs.dposvx_(&&arg_fact,&&arg_uplo,&&arg_n,&&arg_nrhs,arg_a.Ptr,&&arg_lda,arg_af.Ptr,&&arg_ldaf,&&arg_equed,arg_s.Ptr,arg_b.Ptr,&&arg_ldb,arg_x.Ptr,&&arg_ldx,&&arg_rcond,arg_ferr.Ptr,arg_berr.Ptr,arg_work.Ptr,arg_iwork.Ptr,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_af
-    NativeUtilities.freeA arg_s
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeM arg_x
-    NativeUtilities.freeA arg_ferr
-    NativeUtilities.freeA arg_berr
-    NativeUtilities.freeA arg_work
-    NativeUtilities.freeA arg_iwork
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dposvx_: fact (argument 1)"
-   | -2  -> invalid_arg "dposvx_: uplo (argument 2)"
-   | -3  -> invalid_arg "dposvx_: n (argument 3)"
-   | -4  -> invalid_arg "dposvx_: nrhs (argument 4)"
-   | -5  -> invalid_arg "dposvx_: a (argument 5)"
-   | -6  -> invalid_arg "dposvx_: lda (argument 6)"
-   | -7  -> invalid_arg "dposvx_: af (argument 7)"
-   | -8  -> invalid_arg "dposvx_: ldaf (argument 8)"
-   | -9  -> invalid_arg "dposvx_: equed (argument 9)"
-   | -10 -> invalid_arg "dposvx_: s (argument 10)"
-   | -11 -> invalid_arg "dposvx_: b (argument 11)"
-   | -12 -> invalid_arg "dposvx_: ldb (argument 12)"
-   | -13 -> invalid_arg "dposvx_: x (argument 13)"
-   | -14 -> invalid_arg "dposvx_: ldx (argument 14)"
-   | -15 -> invalid_arg "dposvx_: rcond (argument 15)"
-   | -16 -> invalid_arg "dposvx_: ferr (argument 16)"
-   | -17 -> invalid_arg "dposvx_: berr (argument 17)"
-   | -18 -> invalid_arg "dposvx_: work (argument 18)"
-   | -19 -> invalid_arg "dposvx_: iwork (argument 19)"
-   | -20 -> invalid_arg "dposvx_: info (argument 20)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dposvx_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let af = Matrix.transpose af
-  let b = Matrix.transpose b
-  let x = Matrix.transpose x
-  // result tuple
-  a,af,arg_equed,s,b,x,arg_rcond,ferr,berr
-
-
-///Cholesky factorisation of a real symmetric positive definite matrix
- member this.dpotrf_((uplo),(a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dpotrf_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  // allocate results
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_uplo = uplo
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackNetlibStubs.dpotrf_(&&arg_uplo,&&arg_n,arg_a.Ptr,&&arg_lda,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dpotrf_: uplo (argument 1)"
-   | -2  -> invalid_arg "dpotrf_: n (argument 2)"
-   | -3  -> invalid_arg "dpotrf_: a (argument 3)"
-   | -4  -> invalid_arg "dpotrf_: lda (argument 4)"
-   | -5  -> invalid_arg "dpotrf_: info (argument 5)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dpotrf_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a
-
-
-///LU factorisation of general matrix using partial pivoting and row interchanges
- member this.dgetrf_((a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  // allocate results
-  let ipiv = Array.zeroCreate  (min m n)
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_ipiv = NativeUtilities.pinA ipiv
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackNetlibStubs.dgetrf_(&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_ipiv.Ptr,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_ipiv
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgetrf_: m (argument 1)"
-   | -2  -> invalid_arg "dgetrf_: n (argument 2)"
-   | -3  -> invalid_arg "dgetrf_: a (argument 3)"
-   | -4  -> invalid_arg "dgetrf_: lda (argument 4)"
-   | -5  -> invalid_arg "dgetrf_: ipiv (argument 5)"
-   | -6  -> invalid_arg "dgetrf_: info (argument 6)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgetrf_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a,ipiv
-
-
-///QR Factorisation
- member this.dgeqrf_((a:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  // allocate results
-  let tau = Array.zeroCreate  (min m n)
-  let work = Array.zeroCreate  (1)
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_tau = NativeUtilities.pinA tau
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = -1
-  let mutable arg_info = 0
-  // ask for work array size
-  try
-    LapackNetlibStubs.dgeqrf_(&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_tau.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeA arg_work
-  if arg_info = 0   or arg_info=(-7) then
-    arg_lwork <- int32 work.[0]
-  else assert(false)
-  let arg_work = NativeUtilities.pinA (Array.zeroCreate arg_lwork : float[])
-  // call function
-  try
-    LapackNetlibStubs.dgeqrf_(&&arg_m,&&arg_n,arg_a.Ptr,&&arg_lda,arg_tau.Ptr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeA arg_tau
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dgeqrf_: m (argument 1)"
-   | -2  -> invalid_arg "dgeqrf_: n (argument 2)"
-   | -3  -> invalid_arg "dgeqrf_: a (argument 3)"
-   | -4  -> invalid_arg "dgeqrf_: lda (argument 4)"
-   | -5  -> invalid_arg "dgeqrf_: tau (argument 5)"
-   | -6  -> invalid_arg "dgeqrf_: work (argument 6)"
-   | -7  -> invalid_arg "dgeqrf_: lwork (argument 7)"
-   | -8  -> invalid_arg "dgeqrf_: info (argument 8)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dgeqrf_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  // result tuple
-  a,tau
-
-
-///Matrix Vector Multiplication
- member this.dgemv_((a:matrix),(x:vector)) = 
-  // input copies
-  let a = Matrix.copy a
-  let x = Vector.copy x
-  // dimensions
-  let m = NativeUtilities.matrixDim1 a in
-  let n = NativeUtilities.matrixDim2 a in
-  NativeUtilities.assertDimensions "dgemv_" ("n","Dim(x)") (n,NativeUtilities.vectorDim  x);
-  // allocate results
-  let y = Vector.zero (m)
-  // transpose
-  let a = Matrix.transpose a
-  // setup actuals
-  let mutable arg_trans = 'n'
-  let mutable arg_m = m
-  let mutable arg_n = n
-  let mutable arg_alpha = 1.0
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 m
-  let arg_x = NativeUtilities.pinV x
-  let mutable arg_incx = 1
-  let mutable arg_beta = 1.0
-  let arg_y = NativeUtilities.pinV y
-  let mutable arg_incx = 1
-  // call function
-  try
-    LapackNetlibStubs.dgemv_(&&arg_trans,&&arg_m,&&arg_n,&&arg_alpha,arg_a.Ptr,&&arg_lda,arg_x.Ptr,&&arg_incx,&&arg_beta,arg_y.Ptr,&&arg_incx)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeV arg_x
-    NativeUtilities.freeV arg_y
-  // INFO
-  // fixups
-  // result tuple
-  y
-
-
-///EigenValues and Eigen Vectors for nonsymetruc matrices
- member this.dggev_((a:matrix),(b:matrix)) = 
-  // input copies
-  let a = Matrix.copy a
-  let b = Matrix.copy b
-  // dimensions
-  let n = NativeUtilities.matrixDim1 a in
-  NativeUtilities.assertDimensions "dggev_" ("n","Dim2(a)") (n,NativeUtilities.matrixDim2 a);
-  NativeUtilities.assertDimensions "dggev_" ("n","Dim1(b)") (n,NativeUtilities.matrixDim1 b);
-  NativeUtilities.assertDimensions "dggev_" ("n","Dim2(b)") (n,NativeUtilities.matrixDim2 b);
-  // allocate results
-  let alphar = Array.zeroCreate  (n)
-  let alphai = Array.zeroCreate  (n)
-  let beta = Array.zeroCreate  (n)
-  let vl = Array2D.zeroCreate (n) (n)
-  let vr = Array2D.zeroCreate (n) (n)
-  let work = Array.zeroCreate  ((8*n))
-  // transpose
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // setup actuals
-  let mutable arg_jobvl = 'N'
-  let mutable arg_jobvr = 'V'
-  let mutable arg_n = n
-  let arg_a = NativeUtilities.pinM a
-  let mutable arg_lda = max 1 n
-  let arg_b = NativeUtilities.pinM b
-  let mutable arg_ldb = max 1 n
-  let arg_alphar = NativeUtilities.pinA alphar
-  let arg_alphai = NativeUtilities.pinA alphai
-  let arg_beta = NativeUtilities.pinA beta
-  let arg_vl = NativeUtilities.pinA2 vl
-  let mutable arg_ldvl = n
-  let arg_vr = NativeUtilities.pinA2 vr
-  let mutable arg_ldvr = n
-  let arg_work = NativeUtilities.pinA work
-  let mutable arg_lwork = (8*n)
-  let mutable arg_info = 0
-  // call function
-  try
-    LapackNetlibStubs.dggev_(&&arg_jobvl,&&arg_jobvr,&&arg_n,arg_a.Ptr,&&arg_lda,arg_b.Ptr,&&arg_ldb,arg_alphar.Ptr,arg_alphai.Ptr,arg_beta.Ptr,arg_vl.Ptr,&&arg_ldvl,arg_vr.Ptr,&&arg_ldvr,arg_work.Ptr,&&arg_lwork,&&arg_info)
-  finally
-    NativeUtilities.freeM arg_a
-    NativeUtilities.freeM arg_b
-    NativeUtilities.freeA arg_alphar
-    NativeUtilities.freeA arg_alphai
-    NativeUtilities.freeA arg_beta
-    NativeUtilities.freeA2 arg_vl
-    NativeUtilities.freeA2 arg_vr
-    NativeUtilities.freeA arg_work
-  // INFO
-  match arg_info with
-   | -1  -> invalid_arg "dggev_: jobvl (argument 1)"
-   | -2  -> invalid_arg "dggev_: jobvr (argument 2)"
-   | -3  -> invalid_arg "dggev_: n (argument 3)"
-   | -4  -> invalid_arg "dggev_: a (argument 4)"
-   | -5  -> invalid_arg "dggev_: lda (argument 5)"
-   | -6  -> invalid_arg "dggev_: b (argument 6)"
-   | -7  -> invalid_arg "dggev_: ldb (argument 7)"
-   | -8  -> invalid_arg "dggev_: alphar (argument 8)"
-   | -9  -> invalid_arg "dggev_: alphai (argument 9)"
-   | -10 -> invalid_arg "dggev_: beta (argument 10)"
-   | -11 -> invalid_arg "dggev_: vl (argument 11)"
-   | -12 -> invalid_arg "dggev_: ldvl (argument 12)"
-   | -13 -> invalid_arg "dggev_: vr (argument 13)"
-   | -14 -> invalid_arg "dggev_: ldvr (argument 14)"
-   | -15 -> invalid_arg "dggev_: work (argument 15)"
-   | -16 -> invalid_arg "dggev_: lwork (argument 16)"
-   | -17 -> invalid_arg "dggev_: info (argument 17)"
-   | 0   -> ()
-   | n   -> failwith (sprintf "dggev_ : returned %d. The computation failed." n)
-  // fixups
-  let a = Matrix.transpose a
-  let b = Matrix.transpose b
-  // result tuple
-  a,b,alphar,alphai,beta,vr
-
- end
-end
-module LapackNetlib = begin
- let NetlibProvider = new Microsoft.FSharp.Math.Experimental.Provider<_>("Netlib",[|"blas.dll";"lapack.dll"|],fun () -> new LapackNetlibService() :> ILapack)
-end
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_netlib.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_netlib.fsi
deleted file mode 100644
index 8edaa418..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/lapack_service_netlib.fsi
+++ /dev/null
@@ -1,5 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Math.Bindings.Internals
-module LapackNetlib =
-  val NetlibProvider : Microsoft.FSharp.Math.Experimental.Provider
-module LapackNetlibStubs = begin end
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra.fs
deleted file mode 100644
index c47bbd36..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra.fs
+++ /dev/null
@@ -1,201 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.Math.Experimental
-
-open Microsoft.FSharp.Math
-
-module LinearAlgebra = 
-  // This module is the dispatcher to BLAS/LAPACK service implementation vs managed implementation
-  // It is the user facing module.
-  open Microsoft.FSharp.Math.Bindings.Internals
-  open Microsoft.FSharp.Math.Experimental
-  
-  type Permutation = Microsoft.FSharp.Compatibility.permutation
-
-  let Lapack         = LinearAlgebraService.LAPACKService // The service/provider object
-  let MKLProvider    = LapackMKL.MKLProvider              // MKL provider
-  let NetlibProvider = LapackNetlib.NetlibProvider        // Netlib provider
-
-  module Locals = 
-    let HaveService() = Lapack.Available()
-  open Locals
-
-  let SolveTriangularLinearSystem (A:matrix) (b:vector) (isLower:bool) =
-    if HaveService() then LinearAlgebraService.solveTriangularForVector A b isLower
-                     else LinearAlgebraManaged.SolveTriangularLinearSystem A b isLower
-                   
-  let SolveTriangularLinearSystems (A:matrix) (B:matrix) (isLower:bool) =
-    if HaveService() then LinearAlgebraService.solveTriangularForMatrix A B isLower
-                     else LinearAlgebraManaged.SolveTriangularLinearSystems A B isLower
-  
-  let SolveLinearSystem (A:matrix) (b:vector) =
-    if HaveService() then LinearAlgebraService.preDivideByVector A b
-                     else LinearAlgebraManaged.SolveLinearSystem A b
-                   
-  let SolveLinearSystems (A:matrix) (B:matrix) =
-    if HaveService() then LinearAlgebraService.preDivideByMatrix A B
-                     else LinearAlgebraManaged.SolveLinearSystems A B
-
-  /// Given A[n,m] and B[n] solve for x[m] such that Ax = B
-  /// This call may fail.
-  let preDivideByVector A b = 
-    if HaveService() then LinearAlgebraService.preDivideByVector A b
-                     else LinearAlgebraManaged.SolveLinearSystem A b
-    
-
-  /// Given A[n,m] and B[n,k] solve for X[m,k] such that AX = B
-  /// This call may fail.
-  let preDivideByMatrix a b = 
-    if HaveService() then LinearAlgebraService.preDivideByMatrix a b
-                     else LinearAlgebraManaged.SolveLinearSystems a b
-    
-  /// Compute eigenvalue/eigenvector decomposition of a square real matrix.
-  /// Returns two arrays containing the eigenvalues and eigenvectors, which may be complex.
-  /// This call may fail.
-  let EigenSpectrum m = 
-    if HaveService() then let evals, evecs = LinearAlgebraService.eigenvectors m
-                          let n = evals.Length
-                          Vector.Generic.init n (fun i -> evals.[i]), Matrix.Generic.init n n (fun i j -> (evecs.[i]).[j])
-                     else LinearAlgebraManaged.eigenvectors m
-                           
-  /// Compute eigenvalues of a square real matrix.
-  /// Returns arrays containing the eigenvalues which may be complex.
-  /// This call may fail.
-  let EigenValues m =
-    if HaveService() then let evals = LinearAlgebraService.eigenvalues m
-                          let n = evals.Length
-                          Vector.Generic.init n (fun i -> evals.[i])
-                     else LinearAlgebraManaged.eigenvalues m
-
-  /// Compute eigenvalues for a real symmetric matrix.
-  /// Returns array of real eigenvalues.
-  /// This call may fail.
-  let EigenValuesWhenSymmetric a =
-    if HaveService() then let evals = LinearAlgebraService.symmetricEigenvalues a
-                          let n = evals.Length
-                          Vector.init n (fun i -> evals.[i])
-                     else LinearAlgebraManaged.symmetricEigenvalues a
-    
-  /// Compute eigenvalues and eigenvectors for a real symmetric matrix.
-  /// Returns arrays of the values and vectors (both based on reals).
-  /// This call may fail.
-  let EigenSpectrumWhenSymmetric a =
-    if HaveService() then let evals, evecs = LinearAlgebraService.symmetricEigenvectors a
-                          let n = evals.Length
-                          Vector.init n (fun i -> evals.[i]), Matrix.init n n (fun i j -> (evecs.[i]).[j])
-                     else LinearAlgebraManaged.symmetricEigenvectors a
-    
-  /// Given A[n,n] find it's inverse.
-  /// This call may fail.
-  let Inverse a = 
-    if HaveService() then LinearAlgebraService.inverse a
-                     else LinearAlgebraManaged.Inverse a
-
-  /// Given A[m,n] and B[m] solves AX = B for X[n].
-  /// When m=>n, have over constrained system, finds least squares solution for X.
-  /// When mn and RX[m,n] is R[n,n] row extended with (m-n) zero rows.
-  let QR a = 
-    if HaveService() then LinearAlgebraService.QR a
-                     else LinearAlgebraManaged.QR a
-  
-  let SVD a = 
-    if HaveService() then let U,D,V = LinearAlgebraService.SVD a
-                          U,Vector.of_array D,V
-                     else LinearAlgebraManaged.SVD a
-
-  let Hessenberg A =
-    if HaveService() then failwith "Not implemented yet."// REVIEW LinearAlgebraService.Hessenberg A
-                     else LinearAlgebraManaged.Hessenberg A
-
-  /// This method computes the condition number by just dividing the largest singular value
-  /// by the smallest.
-  let Condition (A:matrix) =
-    let _,D,_ = SVD A
-    D.[0] / D.[D.Length-1]
-
-  /// Compute the determinant of a matrix by performing an LU decomposition since if A = P'LU,
-  /// then det(A) = det(P') * det(L) * det(U).
-  let Determinant A =
-    let P,_,U = LU A
-    // Compute the sign of a permutation REVIEW maybe this should go into permutation?
-    let PermutationSign (len,p) =
-        let a = Array.init len (fun i -> p i)                        // Get an array representation of the permutation
-        let v = Array.init len                                         // Find the positions of all the positions in the permutation
-                            (fun i -> Array.findIndex (fun x -> x = i) a)
-        let mutable sign = 1.0                                              // Remember the sign
-        for i=0 to len-2 do                                            // Start transposing elements keeping track of how many
-            if a.[i] <> i then                                              // transpositions we have taken.
-                a.[v.[i]] <- a.[i]
-                a.[i] <- i
-                v.[a.[v.[i]]] <- v.[i]
-                v.[i] <- i
-                sign <- -sign
-        assert(a = [|0 .. len-1|])
-        assert(v = [|0 .. len-1|])
-        sign
-    let n = A.NumRows
-    let P = (fun i -> P i)
-    (PermutationSign (n,P)) * (Vector.prod U.Diagonal)
-        
-
-
-(*TESTING
-#load "lapack_base.fs";;
-#load "lapack.fs";;
-#load "lapack_service_mkl.fs";;
-//#r "fsharp.math.lapack.dll";;
-open Microsoft.FSharp.Math.Experimental.LinearAlgebra
-open Microsoft.FSharp.Math;;
-
-Microsoft.FSharp.Math.Bindings.Internals.LapackMKL.register();;
-verbose := true;;
-let A = (Matrix.of_list [[10.0; 1.0];[1.0;10.0]]);;
-let B = symmetricPositiveDefiniteCholeskyLU A
-let A = (Matrix.of_list [[10.0;  1.0; 0.0];
-                         [ 1.0; 10.0; 0.0];
-                         [ 1.0;  0.0; 2.0]])
-let r,vs,tau = QR A
-let h v tau = Matrix.iden
-
-#q;;
-
-let A = (Matrix.of_list [[10.0; 12.0; 0.3];
-                         [ 1.0; 13.0; 0.2];
-                         [99.0;-12.0; 2.0]])
-let m,n = matrixDims A
-// QR check
-let q,r = QR A
-q * r - A
-let [|h1;h2;h3|] = hs
-let Q = h1 * (h2 * h3)
-Q * r - A
-let h (v:vector) tau = Matrix.identity 3 - (tau:float) $* (v * v.Transpose)
-let hs = Array.map2 h vs tau
-
-// SVD check
-let vs,U,W = SVD A
-let VS = Matrix.init 3 3 (fun r c -> if r=c then vs.[r] else 0.0)
-U * VS * W - A
-
-*)
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra.fsi
deleted file mode 100644
index e6fc489b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra.fsi
+++ /dev/null
@@ -1,82 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Math.Experimental
-
-open Microsoft.FSharp.Math
-open Microsoft.FSharp.Math.Experimental
-open Microsoft.FSharp.Math.Bindings.Internals
-open Microsoft.FSharp.Collections
-
-/// Attribution and acknowledgement:
-///
-/// These modules provide linear algebra functionality on F# matrix types.
-/// Some functionality is implemented using a provider model.
-/// The providers dynamic link to BLAS and Lapack DLLs.
-///
-/// There are currently providers for:
-/// a) blas.dll and lapack.dll which can be built from netlib.org sources.
-/// b) the High Performance Intel(R) Math Kernel Library (MKL) runtime DLLs.
-///
-/// For information on the Intel(R) MKL High Performance library, please see:
-/// http://www.intel.com/cd/software/products/asmo-na/eng/307757.htm
-  
-module LinearAlgebra =
-    type Permutation = Microsoft.FSharp.Compatibility.permutation
-    
-    /// The LAPACK and BLAS service.
-    /// The default providers are already registered.
-    /// The service is primed to auto start on the first service request.
-    val Lapack         : Service
-
-    /// The MKL provider for the BLAS/LAPACK service
-    val MKLProvider    : Provider
-
-    /// The Netlib provider for the BLAS/LAPACK service
-    val NetlibProvider : Provider
-    
-    /// Computes the determinant of a matrix. Uses an LU factorization to compute the determinant.
-    val Determinant : matrix -> float
-    /// Estimates the condition number of matrix A in 2-norm using an SVD decomposition of A.
-    val Condition : A:matrix -> float
-    
-    /// Solves a system of linear equations for vector x when A is triangular: Ax=b. The isLower
-    /// flag specifies whether the input argument A is lower triangular. Uses BLAS *trsv if possible.
-    val SolveTriangularLinearSystem : A:matrix -> b:vector -> isLower:bool -> vector
-    /// Solves a system of linear equations for every column vector of B when A is triangular: AX=B. The isLower
-    /// flag specifies whether the input argument A is lower triangular. Uses BLAS *trsm if possible.
-    val SolveTriangularLinearSystems : A:matrix -> B:matrix -> isLower:bool -> matrix
-    
-    /// Solves the linear system Ax=b when given A and b with no particular structure for A assumed. The method may
-    /// fail when A is singular.
-    val SolveLinearSystem : A:matrix -> b:vector -> vector
-    /// Solves the linear system Ax=B when given A and B with no particular structure for A nor B assumed. The method may
-    /// fail when A is singular.
-    val SolveLinearSystems : A:matrix -> B:matrix -> matrix
-    
-    /// Compute the LU decomposition of matrix A: PA=LU. Uses LAPACK *getrf if possible.
-    val LU : A:matrix -> P:Microsoft.FSharp.Compatibility.permutation * L:matrix * U:matrix
-    /// Compute the cholesky decomposition of matrix A: A = C’C. Uses LAPACK *potrf if possible.
-    val Cholesky : A:matrix -> matrix
-    /// Computes the inverse of matrix A. Uses LAPACK *gesv on an identity matrix if possible.
-    val Inverse : A:matrix -> matrix
-    
-    /// Compute the QR factorization of matrix A: A=QR. Uses LAPACK *geqrf if possible.
-    val QR : A:matrix -> Q:matrix * R:matrix
-    
-    /// Compute the SVD of matrix A: A=UDV'. The singular values are returned in descending
-    /// order. Uses LAPACK *gesvd if possible.
-    val SVD : A:matrix -> U:matrix * D:Vector * V:matrix
-    
-    /// Compute the eigenvalues of matrix A: A=UVU'. Uses LAPACK *geev if possible.
-    val EigenValues : A:matrix -> Vector
-    /// Compute the eigenvalue-eigenvector decomposition of matrix A: A=UVU'. Uses LAPACK *geev if possible.
-    val EigenSpectrum : A:matrix -> V:Vector * U:Matrix
-    /// Compute the eigenvalues of matrix A: A=UVU'. Uses LAPACK *syev if possible.
-    val EigenValuesWhenSymmetric : A:matrix -> vector
-    /// Compute the eigenvalue-eigenvector decomposition of matrix A: A=UVU'. Uses LAPACK *syev if possible.
-    val EigenSpectrumWhenSymmetric : A:matrix -> V:vector * U:matrix
-    /// Compute a Hessenberg form of the matrix A. Uses LAPACK *gehrd if possible.
-    val Hessenberg : A:matrix -> Q:matrix * H:matrix
-    
-    /// Computes a least squares solution using a QR factorization; e.g. min_x ||b - Ax||
-    /// using the 2-norm. Uses LAPACK *gels if possible.
-    val LeastSquares : A:matrix -> b:vector -> vector
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra_managed.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra_managed.fs
deleted file mode 100644
index c54d73bc..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra_managed.fs
+++ /dev/null
@@ -1,238 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.Math.Experimental
-
-open Microsoft.FSharp.Math
-open Microsoft.FSharp.Math.Bindings.Internals.NativeUtilities
-
-/// This module is for internal use only.
-module LinearAlgebraManaged = 
-  
-    let NYI () = failwith "Not yet implemented, managed fallback linear algebra ops coming soon"
-    
-    type Permutation = Permutation of int * (int -> int)
-    
-    let SVD A = NYI()
-    let EigenSpectrum A = NYI()
-    let Condition A = NYI()
-
-    let eigenvectors m = NYI()
-    let eigenvalues m = NYI()
-    let symmetricEigenvalues a = NYI()
-    let symmetricEigenvectors a = NYI()
-
-    let SolveTriangularLinearSystems K B isLower =
-        if isLower then
-            let (nK,mK) = matrixDims K
-            let (nB,mB) = matrixDims B
-            if nK<>mK || nB<> nK then invalid_arg "Cannot do backward substitution on non-square matrices."
-            let X = Matrix.zero nK mK
-            for i=0 to nK-1 do
-                for k=0 to mB-1 do
-                    let s = ref B.[i,k]
-                    for j=0 to i-1 do
-                        s := !s - K.[i,j] * X.[j,k]
-                    done
-                    X.[i,k] <- !s / K.[i,i]
-                done
-            done
-            X
-        else
-            let (nK,mK) = matrixDims K
-            let (nB,mB) = matrixDims B
-            if nK<>mK || nB<> nK then invalid_arg "Cannot do backward substitution on non-square matrices."
-            let X = Matrix.zero nK mK
-            for i=0 to nK-1 do
-                for k=0 to mB-1 do
-                    let s = ref B.[nK-i-1,k]
-                    for j=0 to i-1 do
-                        s := !s - K.[nK-i-1,nK-j-1] * X.[nK-j-1,k]
-                    done
-                    X.[nK-i-1,k] <- !s / K.[nK-i-1,nK-i-1]
-                done
-            done
-            X
-
-    let SolveTriangularLinearSystem K v isLower = (SolveTriangularLinearSystems K (Matrix.of_vector v) isLower).Column 0
-
-    type range = int * int
-
-    let inline sumfR f ((a,b):range) =
-        let mutable res = 0.0 in
-        for i = a to b do
-            res <- res + f i
-        res
-      
-
-    let Cholesky (a: matrix) =
-        let nA,mA = a.Dimensions
-        if nA<>mA              then invalid_arg "choleskyFactor: not square";
-        let lres = Matrix.zero nA nA (* nA=mA *)
-        for j=0 to nA-1 do
-        for i=j to nA-1 do (* j <= i *)
-          (* Consider a_ij = sum(k=0...n-1)  (lres_ik . lresT_kj)
-           *               = sum(k=0...n-1)  (lres_ik . lres_jk)
-           *               = sum(k=0...j-1)  (lres_ik . lres_jk) + lres_ij . lres_jj + (0 when k>j)
-           *               = psum                                + lres_ij . lres_jj
-           * This determines lres_ij terms of preceeding terms.
-           * lres_ij depends on lres_ik and lres_jk (and maybe lres_ii) for k lres.[i,k] * lres.[j,k]) (0,j-1)
-          let a_ij = a.[i,j]
-          if i=j then
-            let t = (a_ij - psum)
-            if t >= 0.0 then lres.[i,i] <- (System.Math.Sqrt t) else invalid_arg "choleskyFactor: not symmetric postive definite"
-          else
-            lres.[i,j] <- ((a_ij - psum) / lres.[j,j])
-        done
-        done;
-        // if not (isLowerTriangular lres) then failwith "choleskyFactor: not lower triangular result";
-        lres.Transpose  // REVIEW optimize this so we don't have to take transpose ...
-    
-    let LU A =
-        let (nA,mA) = matrixDims A
-        if nA<>mA then invalid_arg "lu: not square";
-        let L = Matrix.zero nA nA
-        let U = Matrix.copy A
-        let P = [| 0 .. nA-1 |]
-        let abs (x:float) = System.Math.Abs x
-        let swapR X i j =                           //  REVIEW should we make this a general method?
-            let (nX,mX) = matrixDims X
-            let t = X.[i .. i,0 .. ]
-            for k=0 to mX-1 do
-                X.[i,k] <- X.[j,k]
-                X.[j,k] <- t.[0,k]
-            done
-            
-        for i=0 to nA-2 do
-            let mutable maxi = i        //  Find the biggest pivot element.
-            for k=i+1 to nA-1 do
-                if abs(U.[maxi,i]) < abs(U.[k,i]) then maxi <- k
-            done
-            //let maxi = maxIndex (i+1) (nA-1) (fun k -> abs(U.[k,i]))
-            
-            if maxi <> i then
-                swapR U i maxi     // Swap rows if needed.
-                swapR L i maxi     // REVIEW can be made more performant.
-                let t = P.[i]
-                P.[i] <- P.[maxi]
-                P.[maxi] <- t
-            
-            for j=i+1 to nA-1 do
-                L.[j,i] <- U.[j,i] / U.[i,i]
-                for k=i+1 to nA-1 do
-                    U.[j,k] <- U.[j,k] - L.[j,i] * U.[i,k]
-                done
-                U.[j,i] <- 0.0
-            done
-        done
-        (((*P.Length,*)Permutation.of_array P),L + Matrix.identity nA,U)
-    
-    let SolveLinearSystem (A:matrix) (b:vector) =
-        let (n,m) = matrixDims A
-        if n <> m then invalid_arg "Matrix must be square." 
-        let P,L,U = LU A
-        (SolveTriangularLinearSystem U (SolveTriangularLinearSystem L (b.Permute P) true) false)
-        
-    let SolveLinearSystems (A:matrix) (B:matrix) =
-        let (n,m) = matrixDims A
-        if n <> m then invalid_arg "Matrix must be square." 
-        let P,L,U = LU A
-        (SolveTriangularLinearSystems U (SolveTriangularLinearSystems L (B.PermuteRows P) true) false)
-    
-    let Inverse A =
-        let (n,m) = matrixDims A
-        if n <> m then invalid_arg "Matrix must be square when computing its inverse." 
-        let P,L,U = LU A
-        (SolveTriangularLinearSystems U (SolveTriangularLinearSystems L ((Matrix.identity n).PermuteRows P) true) false)
-        
-    /// Generates a unit vector [1 0 .. 0 ].
-    let unitV k = let e = Vector.create k 0.0 in e.[0] <- 1.0; e
-
-    /// Computes the sign of a floating point number.
-    let sign (f: float) = float (System.Math.Sign f)                    // REVIEW put in float library.
-
-    /// This method computes and performs a Householder reflection. It will change the
-    /// input matrix and return the reflection vector.
-    let HouseholderTransform (A:matrix) (i:int) =
-        // REVIEW do this using views and get rid of the i.
-        let (n,m) = matrixDims A
-        let x = A.[i..,i..i].Column 0                       // Get part of the i'th column of the matrix.
-        let nx = Vector.norm x
-        let vu = x + sign(x.[0]) * nx * (unitV (n-i))               // Compute the reflector.
-        let v = 1.0/(Vector.norm vu) * vu                           // Normalize reflector.
-        
-        // Perform the reflection.
-        let v'A = RowVector.init (m-i) (fun j -> v.Transpose * (A.[i..,i+j..i+j].Column 0))
-        for l=i to n-1 do
-            for k=i to m-1 do
-                A.[l,k] <- A.[l,k] - 2.0 * v.[l-i] * v'A.[k-i]
-        v                                                              // Return reflection vector.
-            
-    let QR (A:matrix) =
-        let (n,m) = matrixDims A
-        let mutable Q = Matrix.identity n                                   // Keeps track of the orthogonal matrix.
-        let R = Matrix.copy A
-
-        // This method will update the orhogonal transformation fast when given a reflection vector.
-        let UpdateQ (Q:matrix) (v:vector) =
-            let n = Vector.length v
-            let (nQ,mQ) = matrixDims Q
-            
-            // Cache the computation of Q*v.
-            let Qv = Vector.init nQ (fun i -> (Q.[i..i,nQ-n..].Row 0) * v)
-
-            // Update the orthogonal transformation.
-            for i=0 to nQ-1 do
-                for j=nQ-n to nQ-1 do
-                    Q.[i,j] <- Q.[i,j] - 2.0 * Qv.[i] * v.[j-nQ+n]
-            ()
-        
-        // This QR implementation keeps the unreduced part of A in R. It computes reflectors one at a time
-        // and reduces R column by column. In the process it keeps track of the Q matrix.
-        for i=0 to (min n m)-1 do
-            let v = HouseholderTransform R i
-            UpdateQ Q v
-        Q,R
-
-    let Hessenberg (A:matrix) =
-        // REVIEW we can do with less copying here.
-        let (n,m) = matrixDims A
-        if n<>m then invalid_arg "Currently only implemented for square matrices."
-        let mutable Q = Matrix.identity n                                   // Keeps track of the orthogonal matrix.
-        let R = A.[1..,*]
-
-        // This method will update the orhogonal transformation fast when given a reflection vector.
-        let UpdateQ (Q:matrix) (v:vector) =
-            let n = Vector.length v
-            let (nQ,mQ) = matrixDims Q
-            
-            // Cache the computation of Q*v.
-            let Qv = Vector.init nQ (fun i -> (Q.[i..i,nQ-n..].Row 0) * v)
-
-            // Update the orthogonal transformation.
-            for i=0 to nQ-1 do
-                for j=nQ-n to nQ-1 do
-                    Q.[i,j] <- Q.[i,j] - 2.0 * Qv.[i] * v.[j-nQ+n]
-            ()
-        
-        // This QR implementation keeps the unreduced part of A in R. It computes reflectors one at a time
-        // and reduces R column by column. In the process it keeps track of the Q matrix.
-        for i=0 to n-2 do
-            let v = HouseholderTransform R i
-            UpdateQ Q v
-        Q,Matrix.init n m (fun i j -> if i = 0 then A.[i,j] else R.[i-1,j])
-        
-    let leastSquares A (b: vector) =
-        let (m,n) = matrixDims A
-        // Is this an overdetermined or underdetermined system?
-        if m > n then
-            let Q,R = QR A
-            let Qtb = Q.Transpose * b
-            SolveTriangularLinearSystem R.[0..n-1,0..n-1] Qtb.[0..n-1] false
-        else
-            let Q,R = QR A
-            let Qtb = Q.Transpose * b
-            let s = SolveTriangularLinearSystem R.[0..m-1,0..m-1] Qtb false
-            Vector.init n (fun i -> if i < m then s.[i] else 0.0)
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra_service.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra_service.fs
deleted file mode 100644
index 91340151..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/linear_algebra_service.fs
+++ /dev/null
@@ -1,175 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Math.Experimental
-
-/// This module is for internal use only.
-module LinearAlgebraService = 
-
-  /// Attribution and acknowledgement:
-  ///
-  /// These modules provide linear algebra functionality on F# matrix types.
-  /// The functionality is implemented using a provider model.
-  /// The providers dynamic link to BLAS and Lapack DLLs.
-  ///
-  /// There are currently providers for:
-  /// a) blas.dll and lapack.dll which can be built from netlib.org sources.
-  /// b) the High Performance Intel(R) Math Kernel Library (MKL) runtime DLLs.
-  ///
-  /// For information on the Intel(R) MKL High Performance library, please see:
-  /// http://www.intel.com/cd/software/products/asmo-na/eng/307757.htm
-  ///
-
-  open Microsoft.FSharp.Math
-  open Microsoft.FSharp.Math.Bindings
-  open Microsoft.FSharp.Math.Bindings.Internals
-  open Microsoft.FSharp.Math.Bindings.Internals.NativeUtilities
-  open Microsoft.FSharp.Collections
-  open System.IO
-  
-  open Microsoft.FSharp.Math.Experimental
-
-  let MKLProvider    = LapackMKL.MKLProvider
-  let NetlibProvider = LapackNetlib.NetlibProvider    
-  let LAPACKService = new Service([MKLProvider;NetlibProvider])
-
-  let Service() = 
-    match LAPACKService.Service() with
-    | Some svc -> svc
-    | None     -> failwith "LAPACK service either not available, or not started"
-  
-  /// Compute eigenvalue/eigenvector decomposition of a square real matrix.
-  /// Returns two arrays containing the eigenvalues and eigenvectors, which may be complex.
-  /// This call may fail.
-  let eigenvectors m = 
-    let complex r = Complex.mkRect(r,0.0)
-    let makeEigenVectors (wr:float[],wi:float[],vr:float[,]) =
-      let n = wr.Length
-      let eigenValues  = Array.init n (fun i -> Complex.mkRect(wr.[i],wi.[i]))
-      let cvr = Array.init n (fun i -> Vector.Generic.init n (fun j -> complex vr.[i,j]))
-      let eigenVectors = Array.zeroCreate n : Vector array // zeros....
-      let mutable i = 0
-      while (i < n) do      
-        if wi.[i] = 0.0 then
-          eigenVectors.[i] <-  cvr.[i]
-          i <- i + 1
-        else
-          assert(wi.[i] = -wi.[i+1]) // better error message?
-          eigenVectors.[i]   <- cvr.[i] + Complex.OneI * cvr.[i+1]
-          eigenVectors.[i+1] <- cvr.[i] - Complex.OneI * cvr.[i+1]
-          i <- i + 2
-      done
-      eigenValues,eigenVectors
-    Service().dgeev_ ('V',m) |> makeEigenVectors
-      
-  /// Compute eigenvalues of a square real matrix.
-  /// Returns arrays containing the eigenvalues which may be complex.
-  /// This call may fail.
-  let eigenvalues m = 
-    let complex r = Complex.mkRect(r,0.0)
-    let makeEigenValues (wr:float[],wi:float[],_) =
-      let n = wr.Length
-      let eigenValues  = Array.init n (fun i -> Complex.mkRect(wr.[i],wi.[i]))
-      eigenValues
-    Service().dgeev_ ('N',m) |> makeEigenValues
-
-  /// Compute eigenvalues for a real symmetric matrix.
-  /// Returns array of real eigenvalues.
-  /// This call may fail.
-  let symmetricEigenvalues a =
-    let a,lambdas = Service().dsyev_ ('N','U',a)
-    lambdas
-
-  /// Compute eigenvalues and eigenvectors for a real symmetric matrix.
-  /// Returns arrays of the values and vectors (both based on reals).
-  /// This call may fail.
-  let symmetricEigenvectors a =
-    let n,m = matrixDims a
-    let a,lambdas = Service().dsyev_ ('V','U',a)
-    let vs = Array.init n (fun j -> Vector.init n (fun i -> a.[i,j]))
-    lambdas,vs
-
-  /// Given A[n,m] and B[n] solve for x[m] such that Ax = B
-  /// This call may fail.
-  let preDivideByVector A b = 
-    let _,_,x  = Service().dgesv_(A,Matrix.of_vector b)
-    Matrix.to_vector x
-
-  /// Given A[n,m] and B[n,k] solve for X[m,k] such that AX = B
-  /// This call may fail.
-  let preDivideByMatrix a b = 
-    let _,_,x  = Service().dgesv_(a,b)
-    x
-
-  let solveTriangularForVector a b isLower =
-    // NOTE: L and U transposed. Check. Is this the right away around?
-    Service().dtrsv_((if isLower then 'u' else 'l'),a,b) (* CHECK: parser error without brackets? *)
-
-  let solveTriangularForMatrix a b isLower = 
-    // NOTE: L and U transposed. Check. Is this the right away around?
-    Service().dtrsm_((if isLower then 'u' else 'l'),a,b) (* CHECK: parser error without brackets? *)
-
-  /// Given A[n,n] find it's inverse.
-  /// This call may fail.
-  let inverse a = 
-    let n,m = matrixDims a
-    NativeUtilities.assertDimensions "inverse" ("rows","columns") (n,m)
-    let _,_,x  = Service().dgesv_(a,Matrix.identity n)
-    x
-
-  /// Given A[m,n] and B[m] solves AX = B for X[n].
-  /// When m=>n, have over constrained system, finds least squares solution for X.
-  /// When mn then Matrix.of_vector b else Matrix.init n 1 (fun i j -> if i b.[i,0])
-
-  /// Given A[n,n] real symmetric positive definite.
-  /// Finds the cholesky decomposition L such that L' * L = A.
-  /// May fail if not positive definite.
-  let Cholesky a = 
-    let n,_ = matrixDims a  
-    let b = Service().dpotrf_('U',a)
-    let b = Matrix.init n n (fun i j -> if j>=i then b.[i,j] else 0.0)
-    b
-  
-  /// Given A[n,n] real matrix.
-  /// Finds P,L,U such that L*U = P*A with L,U lower/upper triangular.
-  let LU a = 
-    // This method translates a BLAS/LAPACK permutation into an FSharp.Collections.Permutation.
-    // The BLAS/LAPACK permutation (P: int array) encodes that in step i, row i and P.[i] were
-    // swapped. 
-    let TranslatePermutation P =
-        let n = Array.length P
-        let x = [|0 .. n-1|]
-        for l=0 to n-1 do
-            let t = x.[l]
-            x.[l] <- x.[P.[l]]
-            x.[P.[l]] <- t
-        ((*n,*)Permutation.of_array(x))
-    let n,m = matrixDims a  
-    let lu,p = Service().dgetrf_(a)
-    let l = Matrix.init n m (fun i j -> if j if j>=i then lu.[i,j] else 0.0)
-    p |> Array.map (fun i -> i-1) |> TranslatePermutation,l,u
-
-  /// Given A[m,n] finds Q[m,m] and R[k,n] where k = min m n.
-  /// Have A = Q.R  when m<=n.
-  /// Have A = Q.RX when m>n and RX[m,n] is R[n,n] row extended with (m-n) zero rows.
-  let QR a = 
-    let m,n = matrixDims a
-    let k = min m n 
-    let res,tau = Service().dgeqrf_(a)
-    let R  = Matrix.init k n (fun r c -> if r <= c then res.[r,c] else 0.0)
-    let ks = [| 0 .. (k-1) |]
-    let vs = ks |> Array.map (fun i -> Vector.init m (fun j -> if j < i then 0.0 else
-                                                               if j = i then 1.0 else
-                                                               res.[j,i]))
-    let h (v:vector) tau = Matrix.identity m - (tau:float) * (v * v.Transpose)
-    let hs = Array.map2 h vs tau
-    let Q  = Array.reduceBack ( * ) hs
-    Q,R (*,tau,vs,hs*)
-
-  let SVD a = 
-    let vs,u,w = Service().dgesvd_ a
-    u,vs,w
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/service.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/service.fs
deleted file mode 100644
index aaca95fc..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/service.fs
+++ /dev/null
@@ -1,163 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Math.Experimental
-
-// NOTE: Abstractable code.
-//   This file is a Service/Provider model cache with pre-checks that supporting DLLs are available.
-//   This is not LAPACK specific, and is more generally useful.
-//   It has been abstracted over the underlying service type (ILapack becomes 'a).
-//   The providers could have other pre-conditions, e.g. machine architecture, OS, etc.
-
-open Microsoft.FSharp.Collections
-open System.IO
-open System.Collections.Generic
- 
-/// Generic provider with unmanaged DLL dependencies.
-type Provider<'a>(name:string,requiredDLLs:string[],provide:unit -> 'a) = 
-    // NOTE: The dependencies could be extended to include architecture.
-    member this.Name         = name 
-    member this.RequiredDLLs = requiredDLLs
-    member this.Provide()    = provide()   
-  
-module Locals =     
-    let mkProvider (name,requireDLLs,provide) = Provider(name,requireDLLs,provide) 
-    
-    let noRepeats xs = xs |> Set.of_list |> Set.to_list
-    let noLaterRepeats xs =
-      let collect (soFar,revXs) x =
-        if Set.contains x soFar then (soFar,revXs) else (Set.add x soFar,x::revXs)
-      let (soFar,revXs) = List.fold collect (Set.empty,[]) xs
-      List.rev revXs
-    
-    let searchPathsForDLLImports() =         
-      // The providers have DLL dependencies via their platform-invoke DLLImport attributes.
-      // The DLLs search procedure for those DLLs is described below. (follow links).
-      // Here, we compute those paths (a superset of them).
-      // 
-      // From: VC++ Programming Guide: Search Path Used by Windows to Locate a DLL
-      //   http://msdn2.microsoft.com/en-us/library/7d83bc18(VS.80).aspx
-      //
-      // Search order:
-      //   The directory where the executable module for the current process is located.
-      //   The current directory.
-      //   The Windows system directory. The GetSystemDirectory function retrieves the path of this directory.
-      //   The Windows directory. The GetWindowsDirectory function retrieves the path of this directory.
-      //   The directories listed in the PATH environment variable.
-      //
-      // From: Development Impacts of Security Changes in Windows Server 2003
-      //   http://msdn2.microsoft.com/en-us/library/ms972822.aspx
-      // This reports that system directories are now searched first.
-      //
-      let windowsSystemDir = System.Environment.SystemDirectory
-      let windowsDir       = System.IO.Path.GetDirectoryName(windowsSystemDir)
-      let currentExeDirs   =
-        // This includes EXE directory, and loaded DLL directories.
-        // It may be an over-estimate of the search path.
-        let proc = System.Diagnostics.Process.GetCurrentProcess()
-        let mods  : System.Diagnostics.ProcessModule list = proc.Modules |> Seq.cast |> Seq.to_list
-        mods     |> List.map (fun m -> Path.GetDirectoryName m.FileName) |> noRepeats
-      let currentDir = System.Environment.CurrentDirectory 
-      let pathDirs =
-        match System.Environment.GetEnvironmentVariable("PATH") with
-        | null  -> []
-        | paths -> paths.Split([|';'|]) |> Array.to_list      
-      let orderedSearchPaths = windowsSystemDir :: windowsDir :: (currentExeDirs @ [currentDir] @ pathDirs)
-      noLaterRepeats orderedSearchPaths
-    
-    let pathDLLs (path:string) = if not (Directory.Exists path) then [||] else Directory.GetFiles(path,"*.DLL")       
-    
-    let dllFilename (dll:string) = (Path.GetFileName dll).ToLower() // normalizes filename
-        
-    let loadableDLLPaths() =
-      // Makes a table of (DLL,availablePaths)
-      // This is reusable code...
-      let paths = searchPathsForDLLImports()
-      let dllPaths = new Dictionary>()
-      let add path dll = 
-        let dll = dllFilename dll
-        if not (dllPaths.ContainsKey(dll)) then dllPaths.[dll] <- new ResizeArray<_>()
-        dllPaths.[dll].Add(path)
-      List.iter (fun path -> Array.iter (add path) (pathDLLs path)) paths
-      dllPaths
-
-    let loadableProvider (dllPaths:Dictionary<_,_>) (provider:Provider<'a>) = 
-      let dllAvailable    (dll:string) = dllPaths.ContainsKey(dllFilename dll)
-      let availableReason (dll:string) = let quote s = "'" ^ s ^ "'"
-                                         let paths = dllPaths.[dllFilename dll] |> ResizeArray.to_list
-                                         let pathNote path = sprintf "Required %s seen in %s" dll path
-                                         System.String.Join("\n", Array.of_list(List.map pathNote paths))
-      if Array.forall dllAvailable provider.RequiredDLLs then
-        let justification = System.String.Join("\n", Array.map availableReason provider.RequiredDLLs)
-        let justification = "Provider: " ^ provider.Name ^ "\n" ^ justification
-        Some (provider,justification)
-      else
-        None
-        
-    let checkProvider p = 
-      match loadableProvider (loadableDLLPaths()) p with
-      | None                   -> "Provider is not loadable"
-      | Some (p,justification) -> justification
-        
-    // This type is internal to Service (motivates nested types).
-    type 'a ServiceState =
-    | ServiceDisabled                          // service disabled, do not look for it.
-    | ServiceEnabledUninitialised              // service enabled, but no search made yet.
-    | ServiceEnabledOK     of 'a * string      // service enabled, and justification string for diagnostics.
-    | ServiceEnabledFailed                     // service enabled, but DLLs not found, or load failed.
-
-open Locals
-  
-type Provider<'a> with
-    member this.Check() = checkProvider this
-
-type Service<'a>(providers:Provider<'a> seq) =
-    let mutable providers = Seq.to_array providers                // possible providers configuration state
-    let mutable state = ServiceEnabledUninitialised               // service state
-    
-    /// Service Providers
-    member this.Providers with get()  = providers
-                           and set(x) = providers <- x
-    
-    /// Disable the service.
-    member this.Stop()       = state <- ServiceDisabled
-
-    /// Use the LAPACK service from the given provider.
-    /// If the supporting DLLs are not available, this may fail (now or later).
-    member this.StartWith(p:Provider<'a>) =
-      let justification = 
-          match loadableProvider (loadableDLLPaths()) p with
-          | None                   -> "The provider DLLs did not appear to be present, the service may fail"
-          | Some (p,justification) -> justification      
-      state <- ServiceEnabledOK (p.Provide(),justification)
-
-    /// Start the service with the first provider that looks loadable.     
-    member this.Start() =
-      let candidates = Array.choose (loadableProvider (loadableDLLPaths())) providers
-      if candidates.Length=0 then                                     // guard
-        state <- ServiceEnabledFailed
-        false
-      else
-        let provider,justification = candidates.[0]
-        state <- ServiceEnabledOK (provider.Provide(),justification)  // index covered by guard above
-        true
-
-    member this.Service() = 
-      if state = ServiceEnabledUninitialised then this.Start() |> ignore
-      match state with
-        | ServiceDisabled                          
-        | ServiceEnabledUninitialised  // (The above initialisation call must have failed)
-        | ServiceEnabledFailed                     -> None
-        | ServiceEnabledOK (service,justification) -> Some service
-    
-    member this.Available() =         
-      match state with
-        | ServiceDisabled            
-        | ServiceEnabledFailed        
-        | ServiceEnabledUninitialised              -> false
-        | ServiceEnabledOK (service,justification) -> true
-                        
-    member this.Status() =         
-      match state with
-        | ServiceDisabled                          -> "Disabled"           
-        | ServiceEnabledFailed                     -> "Failed to start"
-        | ServiceEnabledUninitialised              -> "Will auto enable on demand"
-        | ServiceEnabledOK (service,justification) -> "Enabled\n" ^ justification
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/service.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/service.fsi
deleted file mode 100644
index e6fe1ef5..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/lapack/service.fsi
+++ /dev/null
@@ -1,19 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Math.Experimental
-
-type Provider<'a> =
-    new : name:string * requiredDLLs:string [] * provide:(unit -> 'a) -> Provider<'a>
-    member Provide : unit -> 'a
-    member Name : string
-    member RequiredDLLs : string []
-    member Check : unit -> string  
-  
-type Service<'a> =
-    new : providers:seq> -> Service<'a>
-    member Start     : unit -> bool
-    member StartWith : p:Provider<'a> -> unit
-    member Stop      : unit -> unit
-    member Service   : unit -> 'a option
-    member Available : unit -> bool
-    member Status    : unit -> string
-    member Providers : Provider<'a> array with get,set
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/matrix.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/matrix.fs
deleted file mode 100644
index 947fb448..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/matrix.fs
+++ /dev/null
@@ -1,2504 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-//----------------------------------------------------------------------------
-// An implementation of generic dense and sparse matrix types.
-//
-// Overview and suffix documentation
-//    _GU  = generic unspecialized (Matrix, Vector etc.) 
-//    _GUA = generic unspecialized op on (underlying) array
-//    _DS  = Double specialized (Matrix = matrix, Vector = vector etc.)
-//
-//    DM   = dense matrix
-//    SM   = sparse matrix
-//    V    = vector (dense)
-//    RV   = row vector (dense)
-
-namespace Microsoft.FSharp.Math
-
-    #nowarn "60" // implementations in augmentations
-    #nowarn "69" // implementations in augmentations
-
-    open Microsoft.FSharp.Math
-    open System
-    open System.Globalization
-    open System.Collections
-    open System.Collections.Generic
-    open System.Diagnostics
-    type permutation = int -> int
-
-
-    module Helpers = 
-        let sparseNYI() = failwith "this operation is not supported on sparse matrices"
-        let sparseNotMutable() = failwith "sparse matrices are not mutable"
-        
-        []
-        let opsdata<'T> = GlobalAssociations.TryGetNumericAssociation<'T>()
-    
-    open Helpers
-    
-    /// The value stored for the dictionary of numeric operations. If none is present then this indicates
-    /// no operations are known for this type.
-    type OpsData<'T> = INumeric<'T> option
-
-    type DenseMatrix<'T>(opsData : OpsData<'T>, values : 'T[,]) = 
-        member m.OpsData =  opsData
-        member m.Values =  values
-        member m.NumRows = values.GetLength(0)
-        member m.NumCols = values.GetLength(1)
-
-        member m.ElementOps = 
-            match opsData with 
-            | None -> raise (new System.NotSupportedException("The element type carried by this matrix does not support numeric operations"))
-            | Some a -> a
-
-        member m.Item
-           with get (i,j) = values.[i,j]
-           and  set (i,j) x = values.[i,j] <- x
-
-
-
-    type SparseMatrix<'T>(opsData : OpsData<'T>, sparseValues : 'T array, sparseRowOffsets : int array, ncols:int, columnValues: int array) = 
-        member m.OpsData = opsData; 
-        member m.NumCols = ncols
-        member m.NumRows = sparseRowOffsets.Length - 1
-        member m.SparseColumnValues = columnValues
-        member m.SparseRowOffsets =  sparseRowOffsets (* nrows + 1 elements *)
-        member m.SparseValues =  sparseValues
-
-        member m.ElementOps = 
-              match opsData with 
-              | None -> raise (new System.NotSupportedException("The element type carried by this matrix does not support numeric operations"))
-              | Some a -> a
-
-        member m.MinIndexForRow i = m.SparseRowOffsets.[i]
-        member m.MaxIndexForRow i = m.SparseRowOffsets.[i+1]
-              
-
-        member m.Item 
-            with get (i,j) = 
-                let imax = m.NumRows
-                let jmax = m.NumCols
-                if j < 0 || j >= jmax || i < 0 || i >= imax then raise (new System.ArgumentOutOfRangeException()) else
-                let kmin = m.MinIndexForRow i
-                let kmax = m.MaxIndexForRow i
-                let rec loopRow k =
-                    (* note: could do a binary chop here *)
-                    if k >= kmax then m.ElementOps.Zero else
-                    let j2 = columnValues.[k]
-                    if j < j2 then m.ElementOps.Zero else
-                    if j = j2 then sparseValues.[k] else 
-                    loopRow (k+1)
-                loopRow kmin
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-    []
-#endif
-    []
-    []
-    //[>)>]
-    type Matrix<'T> = 
-        | DenseRepr of DenseMatrix<'T>
-        | SparseRepr of SparseMatrix<'T>
-        interface System.IComparable
-        interface IStructuralComparable
-        interface IStructuralEquatable
-        interface IEnumerable<'T> 
-        interface IEnumerable
-
-        member m.ElementOps = match m with DenseRepr mr -> mr.ElementOps | SparseRepr mr -> mr.ElementOps
-        member m.NumRows    = match m with DenseRepr mr -> mr.NumRows    | SparseRepr mr ->  mr.NumRows
-        member m.NumCols    = match m with DenseRepr mr -> mr.NumCols    | SparseRepr mr ->  mr.NumCols
-
-        member m.Item 
-            with get (i,j) = 
-                match m with 
-                | DenseRepr dm -> dm.[i,j]
-                | SparseRepr sm -> sm.[i,j]
-            and set (i,j) x = 
-              match m with 
-              | DenseRepr dm -> dm.[i,j] <- x
-              | SparseRepr _ -> sparseNotMutable()
-
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-        member m.IsDense = match m with DenseRepr mr -> true | SparseRepr mr -> false
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-        member m.IsSparse = match m with DenseRepr mr -> false | SparseRepr mr -> true
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-        member m.InternalSparseColumnValues = match m with DenseRepr mr -> invalidOp "not a sparse matrix" | SparseRepr mr -> mr.SparseColumnValues
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-        member m.InternalSparseRowOffsets = match m with DenseRepr mr -> invalidOp "not a sparse matrix" | SparseRepr mr -> mr.SparseRowOffsets
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-        member m.InternalSparseValues = match m with DenseRepr mr -> invalidOp "not a sparse matrix" | SparseRepr mr -> mr.SparseValues
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-        member m.InternalDenseValues = match m with DenseRepr mr -> mr.Values | SparseRepr mr -> invalidOp "not a dense matrix" 
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-    []
-#endif
-#if FX_NO_DEBUG_PROXIES
-#else
-    [>)>]
-#endif
-    []
-    []
-    type RowVector<'T>(opsRV : INumeric<'T> option, arrRV : 'T array ) =
-        interface System.IComparable
-        interface IStructuralComparable
-        interface IStructuralEquatable 
-
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-        member x.InternalValues = arrRV
-        member x.Values = arrRV
-        member x.OpsData = opsRV
-        
-        
-        interface IEnumerable<'T> with 
-            member x.GetEnumerator() = (arrRV :> seq<_>).GetEnumerator()
-        interface IEnumerable  with 
-            member x.GetEnumerator() = (arrRV :> IEnumerable).GetEnumerator()
-
-        member x.Length = arrRV.Length
-        member x.NumCols = arrRV.Length
-        member x.ElementOps = 
-            match opsRV with 
-            | None -> raise (new System.NotSupportedException("The element type carried by this row vector does not support numeric operations"))
-            | Some a -> a
-
-        member v.Item
-           with get i = arrRV.[i]
-           and  set i x = arrRV.[i] <- x
-
-    and 
-        []
-        RowVectorDebugView<'T>(v: RowVector<'T>)  =  
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-             []
-#endif
-             member x.Items = v |> Seq.truncate 1000 |> Seq.to_array 
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-    []
-#endif
-#if FX_NO_DEBUG_PROXIES
-#else
-    [>)>]
-#endif
-    []
-    []
-    type Vector<'T>(opsV : INumeric<'T> option, arrV : 'T array) =
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-        member x.InternalValues = arrV
-        member x.Values = arrV
-        member x.OpsData = opsV
-        interface System.IComparable
-        interface IStructuralComparable
-        interface IStructuralEquatable 
-
-        interface IEnumerable<'T> with 
-            member x.GetEnumerator() = (arrV :> seq<_>).GetEnumerator()
-        interface IEnumerable  with 
-            member x.GetEnumerator() = (arrV :> IEnumerable).GetEnumerator()
-        
-
-        member m.Length = arrV.Length
-        member m.NumRows = arrV.Length
-        member m.ElementOps = 
-            match opsV with 
-            | None -> raise (new System.NotSupportedException("The element type carried by this vector does not support numeric operations"))
-            | Some a -> a
-        member v.Item
-           with get i = arrV.[i]
-           and  set i x = arrV.[i] <- x
-
-#if FX_NO_DEBUG_PROXIES
-#else
-    and 
-        []
-        VectorDebugView<'T>(v: Vector<'T>)  =  
-
-             []
-             member x.Items = v |> Seq.truncate 1000 |> Seq.to_array 
-#endif
-
-
-    /// Implementations of operations that will work for any type
-    module GenericImpl = 
-
-        type OpsData<'T> = INumeric<'T> option
-
-        let opsOfOpsData (d : OpsData<'T>)  =
-             match d with 
-             | None -> raise (new System.NotSupportedException("The element type '"+(typeof<'T>).ToString()+"' carried by this vector or matrix does not support numeric operations (i.e. does not have a registered numeric association)"))
-             | Some a -> a
-
-        let getNormOps (ops:INumeric<'T>) = 
-            match box ops with
-              | :? INormFloat<'T> as ops -> ops
-              | _ -> raise (new System.NotSupportedException("The element type '"+(typeof<'T>.ToString())+"' carried by this vector or matrix does not support the INormFloat<_> operation (i.e. does not have a registered numeric association that supports this type)"))
-
-        let mkDenseMatrixGU ops arr = DenseMatrix(ops,arr)
-        let mkRowVecGU ops arr = RowVector(ops, arr)
-        let mkVecGU ops arr = Vector(ops,arr)
-
-        let inline getArray2  (arrDM : _[,]) i j   = arrDM.[i,j]
-        let inline setArray2  (arrDM  : _[,]) i j x = arrDM.[i,j] <- x
-
-        let inline createArray m = Array.zeroCreate m
-
-        let inline createArray2 m n = Array2D.zeroCreate m n
-
-        let inline assignArray2 m n f arr =  
-            for i = 0 to m - 1 do 
-                for j = 0 to n - 1 do 
-                    (arr  : _[,]).[i,j] <- f i j
-
-        let inline assignDenseMatrixGU f (a:DenseMatrix<_>) = 
-            assignArray2 a.NumRows a.NumCols f a.Values
-        
-        let inline assignArray m f (arr : _[]) = 
-            for i = 0 to m - 1 do 
-                arr.[i] <- f i
-
-        let inline assignVecGU f (a:Vector<_>) = 
-            assignArray a.NumRows f a.Values
-        
-        let inline assignRowVecGU f (a:RowVector<_>) = 
-            assignArray a.NumCols f a.Values
-        
-        let inline createDenseMatrixGU ops m n f = (* inline eliminates unknown f call *)
-            let arr = createArray2 m n 
-            assignArray2 m n f arr;
-            DenseMatrix(ops,arr)
-        
-        let createRowVecGU ops m f = 
-            let arr = createArray m 
-            assignArray m f arr;
-            mkRowVecGU ops arr
-        
-        let inline createVecGU ops m f = (* inline eliminates unknown f call *)
-            let arr = createArray m 
-            assignArray m f arr;
-            mkVecGU ops arr
-
-        /// Create a matrix from a sparse sequence 
-        let initSparseMatrixGU maxi maxj ops s = 
-
-            (* nb. could use sorted dictionary but that is in System.dll *)
-            let tab = Array.create maxi null
-            let count = ref 0
-            for (i,j,v) in s do
-                if i < 0 || i >= maxi || j <0 || j >= maxj then failwith "initial value out of range";
-                count := !count + 1;
-                let tab2 = 
-                    match tab.[i] with 
-                    | null -> 
-                        let tab2 = new Dictionary<_,_>(3) 
-                        tab.[i] <- tab2;
-                        tab2
-                    | tab2 -> tab2
-                tab2.[j] <- v
-            // optimize this line....
-            let offsA =  
-               let rowsAcc = Array.zeroCreate (maxi + 1)
-               let mutable acc = 0 
-               for i = 0 to maxi-1 do 
-                  rowsAcc.[i] <- acc;
-                  acc <- match tab.[i] with 
-                          | null -> acc
-                          | tab2 -> acc+tab.[i].Count
-               rowsAcc.[maxi] <- acc;
-               rowsAcc
-               
-            let colsA,valsA = 
-               let colsAcc = new ResizeArray<_>(!count)
-               let valsAcc = new ResizeArray<_>(!count)
-               for i = 0 to maxi-1 do 
-                  match tab.[i] with 
-                  | null -> ()
-                  | tab2 -> tab2 |> Seq.to_array |> Array.sortBy (fun kvp -> kvp.Key) |> Array.iter (fun kvp -> colsAcc.Add(kvp.Key); valsAcc.Add(kvp.Value));
-               colsAcc.ToArray(), valsAcc.ToArray()
-
-            SparseMatrix(opsData=ops, sparseValues=valsA, sparseRowOffsets=offsA, ncols=maxj, columnValues=colsA)
-        
-        let zeroizeDenseMatrixGUA arr  m n : DenseMatrix<'T> = 
-            let opsData = opsdata<'T> 
-            let ops = opsOfOpsData opsData 
-            let zero = ops.Zero 
-            assignArray2 m n (fun i j -> zero) arr;
-            DenseMatrix(opsData,arr)
-
-        let zeroizeArray opsData arr m  = 
-            let ops = opsOfOpsData opsData 
-            let zero = ops.Zero 
-            assignArray m (fun i -> zero) arr
-
-        let zeroizeVecGUA arr m  : Vector<'T> = 
-            let opsData = opsdata<'T> 
-            zeroizeArray opsData arr m;
-            mkVecGU opsData arr
-
-        let zeroizeRowVecGUA arr m  : RowVector<'T> = 
-            let opsData = opsdata<'T> 
-            zeroizeArray opsData arr m;
-            mkRowVecGU opsData arr
-
-        let listDenseMatrixGU ops xss =
-            let m = List.length xss
-            match xss with 
-            | [] -> invalidArg "xss" "unexpected empty list"
-            | h :: t -> 
-              let n = List.length h
-              if not (List.forall (fun xs -> List.length xs=n) t) then invalidArg "xss" "the lists are not all of the same length";
-              let values = (Array2D.zeroCreate m n) 
-              List.iteri (fun i rw -> List.iteri (fun j x -> values.[i,j] <- x) rw) xss;
-              DenseMatrix(ops,values)
-        
-        let listRowVecGU ops xs = mkRowVecGU ops (Array.of_list xs) 
-        let listVecGU ops xs = mkVecGU ops (Array.of_list xs) 
-
-        let seqDenseMatrixGU ops xss = listDenseMatrixGU ops (xss |> Seq.to_list |> List.map Seq.to_list)
-        let seqVecGU  ops xss = listVecGU ops (xss |> Seq.to_list)
-        let seqRowVecGU ops xss = listRowVecGU ops (xss |> Seq.to_list)
-
-        let inline binaryOpDenseMatrixGU f (a:DenseMatrix<_>) (b:DenseMatrix<_>) = (* pointwise binary operator *)
-            let nA = a.NumCols
-            let mA = a.NumRows
-            let nB = b.NumCols 
-            let mB = b.NumRows
-            if nA<>nB || mA<>mB then invalidArg "a" "the two matrices do not have compatible dimensions";
-            let arrA = a.Values 
-            let arrB = b.Values 
-            createDenseMatrixGU a.OpsData mA nA (fun i j -> f (getArray2 arrA i j) (getArray2 arrB i j))
-
-
-        let nonZeroEntriesSparseMatrixGU  (a:SparseMatrix<_>) = 
-            // This is heavily used, and this version is much faster than
-            // the sequence operators.
-            let entries = new ResizeArray<_>(a.SparseColumnValues.Length)
-            let imax = a.NumRows
-            let ops = a.ElementOps 
-            let zero = ops.Zero
-            for i in 0 .. imax - 1 do
-              let kmin = a.MinIndexForRow i
-              let kmax = a.MaxIndexForRow i
-              for k in kmin .. kmax - 1 do
-                  let j = a.SparseColumnValues.[k]
-                  let v = a.SparseValues.[k]
-                  if v <> zero then
-                    entries.Add((i,j,v))
-            (entries :> seq<_>)
-
-        let nonzeroEntriesDenseMatrixGU  (a:DenseMatrix<_>) = 
-            let imax = a.NumRows
-            let jmax = a.NumCols
-            let ops = a.ElementOps 
-            let zero = ops.Zero
-            seq { for i in 0 .. imax - 1 do 
-                    for j in 0 .. jmax - 1 do 
-                        let v = a.[i,j] 
-                        if v <> zero then
-                             yield (i,j,v) }
-
-
-        // pointwise operation on two sparse matrices. f must be zero-zero-preserving, i.e. (f 0 0 = 0) 
-        let binaryOpSparseMatrixGU f (a:SparseMatrix<_>) (b:SparseMatrix<_>) = 
-            let ops = a.ElementOps 
-            let zero = ops.Zero
-            let imin1 = 0
-            let imax1 = a.NumRows  
-            let imax2 = b.NumRows
-            let jmax1 = a.NumCols
-            let jmax2 = b.NumCols
-            if imax1 <> imax2 || jmax1 <> jmax2 then invalidArg "b" "the two matrices do not have compatible dimensions";
-            let imin = 0
-            let imax = imax1
-            let jmax = jmax1
-            let rowsR = Array.zeroCreate (imax+1)
-            let colsR = new ResizeArray<_>(max a.SparseColumnValues.Length b.SparseColumnValues.Length)
-            let valsR = new ResizeArray<_>(max a.SparseValues.Length b.SparseValues.Length)
-            let jMax = ref 0 
-            let rec loopRows i  = 
-                rowsR.[i] <- valsR.Count;            
-                if i >= imax1 then () else
-                let kmin1 = a.MinIndexForRow i
-                let kmax1 = a.MaxIndexForRow i 
-                let kmin2 = b.MinIndexForRow i
-                let kmax2 = b.MaxIndexForRow i
-                let rec loopRow k1 k2  =
-                    if k1 >= kmax1 && k2 >= kmax2 then () else
-                    let j1 = if k1 >= kmax1 then jmax else a.SparseColumnValues.[k1]
-                    let j2 = if k2 >= kmax2 then jmax else b.SparseColumnValues.[k2]
-                    let v1 = if j1 <= j2 then a.SparseValues.[k1] else zero
-                    let v2 = if j2 <= j1 then b.SparseValues.[k2] else zero
-                    let jR = min j1 j2
-                    let vR = f v1 v2
-                    (* if vR <> zero then  *)
-                    colsR.Add(jR);
-                    valsR.Add(vR);
-                    loopRow (if j1 <= j2 then k1+1 else k1) (if j2 <= j1 then k2+1 else k2)
-                loopRow kmin1 kmin2;
-                loopRows (i+1) 
-            loopRows imin;
-            SparseMatrix(opsData= a.OpsData, 
-                         sparseRowOffsets=rowsR, 
-                         ncols= a.NumCols, 
-                         columnValues=colsR.ToArray(), 
-                         sparseValues=valsR.ToArray())
-
-        let inline binaryOpRowVecGU f (a:RowVector<_>) (b:RowVector<_>) = (* pointwise binary operator *)
-            let mA = a.NumCols
-            let mB = b.NumCols
-            if mA<>mB then invalidArg "b" "the two vectors do not have compatible dimensions"
-            createRowVecGU a.OpsData mA (fun i -> f a.[i] b.[i])
-
-        let inline binaryOpVecGU f (a:Vector<_>) (b:Vector<_>) = (* pointwise binary operator *)
-            let mA = a.NumRows
-            let mB = b.NumRows
-            if mA<>mB then invalidArg "b" "the two vectors do not have compatible dimensions"
-            createVecGU a.OpsData mA (fun i -> f a.[i] b.[i])
-
-        let inline unaryOpDenseMatrixGU f (a:DenseMatrix<_>) =
-            let nA = a.NumCols 
-            let mA = a.NumRows 
-            let arrA = a.Values 
-            createDenseMatrixGU a.OpsData mA nA (fun i j -> f (getArray2 arrA i j))
-
-        let inline unaryOpRowVecGU f (a:RowVector<_>) =
-            let mA = a.NumCols
-            let arrA = a.Values 
-            createRowVecGU a.OpsData mA (fun j -> f arrA.[j])
-
-        let inline unaryOpVectorGU f (a:Vector<_>) =
-            let mA = a.NumRows 
-            let arrA = a.Values 
-            createVecGU a.OpsData mA (fun i -> f arrA.[i])
-
-        let unaryOpSparseGU f (a:SparseMatrix<_>) = (* pointwise zero-zero-preserving binary operator (f 0 = 0) *)
-            SparseMatrix(opsData=a.OpsData,
-                         sparseRowOffsets=Array.copy a.SparseRowOffsets, 
-                         columnValues=Array.copy a.SparseColumnValues, 
-                         sparseValues=Array.map f a.SparseValues, 
-                         ncols=a.NumCols)
-
-        // Strictly speaking, sparse arrays are non mutable so no copy is ever needed.  But implementing it *)
-        // anyway in case we move to mutability *)
-        let copySparseGU (a:SparseMatrix<_>) = 
-            SparseMatrix(opsData=a.OpsData,
-                         sparseRowOffsets=Array.copy a.SparseRowOffsets, 
-                         columnValues=Array.copy a.SparseColumnValues,
-                         sparseValues=Array.copy a.SparseValues, 
-                         ncols=a.NumCols)
-
-        let addDenseMatrixGU  (a:DenseMatrix<_>)  b = let ops = a.ElementOps in binaryOpDenseMatrixGU (fun x y -> ops.Add(x, y)) a b
-        let addSparseMatrixGU (a:SparseMatrix<_>) b = let ops = a.ElementOps in binaryOpSparseMatrixGU (fun x y -> ops.Add(x, y)) a b
-        let addRowVecGU       (a:RowVector<_>)    b = let ops = a.ElementOps in binaryOpRowVecGU (fun x y -> ops.Add(x, y)) a b
-        let addVecGU          (a:Vector<_>)       b = let ops = a.ElementOps in binaryOpVecGU  (fun x y -> ops.Add(x, y)) a b 
-
-        let subDenseMatrixGU  (a:DenseMatrix<_>)  b = let ops = a.ElementOps in binaryOpDenseMatrixGU (fun x y -> ops.Subtract(x, y)) a b
-        let subSparseMatrixGU (a:SparseMatrix<_>) b = let ops = a.ElementOps in binaryOpSparseMatrixGU (fun x y -> ops.Subtract(x, y)) a b
-        let subRowVecGU       (a:RowVector<_>)    b = let ops = a.ElementOps in binaryOpRowVecGU (fun x y -> ops.Subtract(x, y)) a b
-        let subVecGU          (a:Vector<_>)       b = let ops = a.ElementOps in binaryOpVecGU  (fun x y -> ops.Subtract(x, y)) a b 
-
-        ///Point-wise multiplication 
-        let cptMulDenseMatrixGU  (a:DenseMatrix<_>)  b = let ops = a.ElementOps in binaryOpDenseMatrixGU  (fun x y -> ops.Multiply(x, y)) a b
-        let cptMulSparseMatrixGU (a:SparseMatrix<_>) b = let ops = a.ElementOps in binaryOpSparseMatrixGU  (fun x y -> ops.Multiply(x, y)) a b
-        let cptMulRowVecGU       (a:RowVector<_>)    b = let ops = a.ElementOps in binaryOpRowVecGU (fun x y -> ops.Multiply(x, y)) a b
-        let cptMulVecGU          (a:Vector<_>)       b = let ops = a.ElementOps in binaryOpVecGU  (fun x y -> ops.Multiply(x, y)) a b
-
-        let cptMaxDenseMatrixGU  (a:DenseMatrix<_>) b = let ops = a.ElementOps in binaryOpDenseMatrixGU  max a b
-        let cptMinDenseMatrixGU  (a:DenseMatrix<_>) b = let ops = a.ElementOps in binaryOpDenseMatrixGU  min a b
-        let cptMaxSparseMatrixGU (a:SparseMatrix<_>) b = let ops = a.ElementOps in binaryOpSparseMatrixGU  max a b
-        let cptMinSparseMatrixGU (a:SparseMatrix<_>) b = let ops = a.ElementOps in binaryOpSparseMatrixGU  min a b
-
-        let cptMaxVecGU (a:Vector<_>) b = let ops = a.ElementOps in binaryOpVecGU max a b
-        let cptMinVecGU (a:Vector<_>) b = let ops = a.ElementOps in binaryOpVecGU min a b
-
-        let add (ops : INumeric<'T>) x y = ops.Add(x,y) 
-        let sub (ops : INumeric<'T>) x y = ops.Subtract(x,y) 
-        let mul (ops : INumeric<'T>) x y = ops.Multiply(x,y) 
-
-        let inline foldR f z (a,b) = 
-            let mutable res = z in
-            for i = a to b do
-                res <- f res i
-            res
-
-        let inline sumfR f (a,b) =
-            let mutable res = 0.0 
-            for i = a to b do
-                res <- res + f i
-            res
-          
-
-        let inline sumRGU (ops : INumeric<_>) f r = 
-            let zero = ops.Zero 
-            r |> foldR (fun z k -> add ops z (f k)) zero
-
-        let genericMulDenseMatrix (a:DenseMatrix<_>) (b:DenseMatrix<_>) =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            let nB = b.NumCols 
-            let mB = b.NumRows
-            if nA<>mB then invalidArg "b" "the two matrices do not have compatible dimensions"
-            let ops = a.ElementOps 
-            let arrA = a.Values 
-            let arrB = b.Values 
-            createDenseMatrixGU a.OpsData mA nB
-              (fun i j -> (0,nA - 1) |> sumRGU ops (fun k -> mul ops (getArray2 arrA i k) (getArray2 arrB k j)))
-
-        let debug = false
-        
-        // SParse matrix multiplication algorithm. inline to get specialization at the 'double' type
-        let inline genericMulSparse zero add mul (a:SparseMatrix<_>) (b:SparseMatrix<_>) =
-            let nA = a.NumCols
-            let mA = a.NumRows
-            let nB = b.NumCols 
-            let mB = b.NumRows
-            if nA<>mB then invalidArg "b" "the two matrices do not have compatible dimensions"
-            let C = new ResizeArray<_>()
-            let jC = new ResizeArray<_>()
-            let MA1 = mA + 1 
-            let offsAcc = Array.zeroCreate MA1
-            let index = Array.zeroCreate mA
-            let temp = Array.create mA zero
-            let ptr = new Dictionary<_,_>(11)
-            if debug then printf "start, #items in result = %d, #offsAcc = %d, mA = %d\n" jC.Count offsAcc.Length mA;
-
-            let mutable mlast = 0
-            for i = 0 to mA-1 do
-                if debug then printf "i = %d, mlast = %d\n" i mlast;
-                offsAcc.[i] <- mlast
-                
-                let kmin1 = a.MinIndexForRow i
-                let kmax1 = a.MaxIndexForRow i
-                if kmin1 < kmax1 then 
-                    let mutable itemp = 0
-                    let mutable ptrNeedsClear = true // clear the ptr table on demand.  
-                    for j = kmin1 to kmax1 - 1 do
-                      if debug then printf "  j = %d\n" j;
-                      let ja_j = a.SparseColumnValues.[j]
-                      let kmin2 = b.MinIndexForRow ja_j
-                      let kmax2 = b.MaxIndexForRow ja_j
-                      for k = kmin2 to kmax2 - 1 do
-                        let jb_k = b.SparseColumnValues.[k]
-                        if debug then printf "    i = %d, j = %d, k = %d, ja_j = %d, jb_k = %d\n" i j k ja_j jb_k;
-                        let va = a.SparseValues.[j] 
-                        let vb = b.SparseValues.[k]
-                        if debug then printf "    va = %O, vb = %O\n" va vb;
-                        let summand = mul va vb
-                        if debug then printf "    summand = %O\n" summand;
-                        if ptrNeedsClear then (ptr.Clear();ptrNeedsClear <- false);
-
-                        if not (ptr.ContainsKey(jb_k)) then
-                            if debug then printf "    starting entry %d\n" jb_k;
-                            ptr.[jb_k] <- itemp
-                            let ptr_jb_k = itemp
-                            temp.[ptr_jb_k] <- summand
-                            index.[ptr_jb_k] <- jb_k
-                            itemp <- itemp + 1
-                        else
-                            if debug then printf "    adding to entry %d\n" jb_k;
-                            let ptr_jb_k = ptr.[jb_k]
-                            temp.[ptr_jb_k] <- add temp.[ptr_jb_k] summand
-                      done
-                    done
-                    if itemp > 0 then 
-                        // Sort by index. 
-                        // REVIEW: avoid the allocations here
-                        let sorted = (temp.[0..itemp-1],index.[0..itemp-1]) ||> Array.zip 
-                        Array.sortInPlaceBy (fun (v,idx) -> idx) sorted
-                        for s = 0 to itemp-1 do
-                            let (v,idx) = sorted.[s]
-                            if debug then printf "  writing value %O at index %d to result matrix\n" v idx;
-                            C.Add(v)
-                            jC.Add(idx)
-                        if debug then printf " itemp = %d, mlast = %d\n" itemp mlast;
-                        mlast <- mlast + itemp 
-            done
-            offsAcc.[mA] <- mlast;
-            if debug then printf "done, #items in result = %d, #offsAcc = %d, mA = %d\n" jC.Count offsAcc.Length mA;
-            SparseMatrix(opsData = a.OpsData,
-                         sparseRowOffsets=offsAcc,
-                         ncols= nB,
-                         columnValues=jC.ToArray(),
-                         sparseValues=C.ToArray())
-
-        let mulSparseMatrixGU (a: SparseMatrix<_>) b =
-            let ops = a.ElementOps 
-            let zero = ops.Zero
-            genericMulSparse zero (add ops) (mul ops) a b
-
-
-        let mulRowVecVecGU (a:RowVector<_>) (b:Vector<_>) =
-            let mA = a.NumCols 
-            let nB = b.NumRows 
-            if mA<>nB then invalidArg "b" "the two vectors do not have compatible dimensions"
-            let ops = a.ElementOps 
-            (0,mA - 1) |> sumRGU ops (fun k -> mul ops a.[k] b.[k])
-
-        let rowvecDenseMatrixGU (x:RowVector<_>) = createDenseMatrixGU x.OpsData 1         x.NumCols (fun _ j -> x.[j]) 
-        let vectorDenseMatrixGU (x:Vector<_>)    = createDenseMatrixGU x.OpsData  x.NumRows 1         (fun i _ -> x.[i]) 
-
-        let mulVecRowVecGU a b = genericMulDenseMatrix (vectorDenseMatrixGU a) (rowvecDenseMatrixGU b)
-
-        let mulRowVecDenseMatrixGU (a:RowVector<_>) (b:DenseMatrix<_>) =
-            let    nA = a.NumCols 
-            let nB = b.NumCols
-            let mB = b.NumRows 
-            if nA<>mB then invalidArg "b" "the two vectors do not have compatible dimensions"
-            let ops = a.ElementOps 
-            let arrA = a.Values 
-            let arrB = b.Values 
-            createRowVecGU a.OpsData nB 
-              (fun j -> (0,nA - 1) |> sumRGU ops (fun k -> mul ops arrA.[k] (getArray2 arrB k j)))
-
-        let mulDenseMatrixVecGU (a:DenseMatrix<_>) (b:Vector<_>) =
-            let nA = a.NumCols 
-            let mA = a.NumRows 
-            let mB    = b.NumRows
-            if nA<>mB then invalidArg "b" "the two inputs do not have compatible dimensions"
-            let ops = b.ElementOps 
-            let arrA = a.Values 
-            let arrB = b.Values 
-            createVecGU b.OpsData mA
-              (fun i -> (0,nA - 1) |> sumRGU ops (fun k -> mul ops (getArray2 arrA i k) arrB.[k]))
-
-        let mulSparseVecGU (a:SparseMatrix<_>) (b:Vector<_>) =
-            let nA = a.NumCols 
-            let mA = a.NumRows 
-            let mB    = b.NumRows 
-            if nA<>mB then invalidArg "b" "the two inputs do not have compatible dimensions"
-            let ops = b.ElementOps 
-            let zero = ops.Zero
-            createVecGU b.OpsData mA (fun i -> 
-                let mutable acc = zero
-                for k = a.MinIndexForRow i to a.MaxIndexForRow i - 1 do
-                  let j = a.SparseColumnValues.[k]
-                  let v = a.SparseValues.[k] 
-                  acc <- add ops acc (mul ops v b.[j]);
-                acc)
-
-        let mulRVSparseMatrixGU (a:RowVector<_>) (b:SparseMatrix<_>) =
-            let nA = b.NumCols
-            let mA = b.NumRows 
-            let mB    = a.NumCols 
-            if mA<>mB then invalidArg "b" "the two inputs do not have compatible dimensions"
-            let ops = b.ElementOps 
-            let arr = createArray nA 
-            zeroizeArray a.OpsData arr nA;
-            for i = 0 to mA - 1 do
-              for k = b.MinIndexForRow i to b.MaxIndexForRow i - 1 do
-                let j = b.SparseColumnValues.[k]
-                let v = b.SparseValues.[k] 
-                arr.[j] <- add ops arr.[j] (mul ops a.[i] v)
-            mkRowVecGU a.OpsData arr
-
-
-        let scaleDenseMatrixGU  k (a:DenseMatrix<_>)  = let ops = a.ElementOps in unaryOpDenseMatrixGU (fun x -> ops.Multiply(k,x)) a
-        let scaleRowVecGU       k (a:RowVector<_>)    = let ops = a.ElementOps in unaryOpRowVecGU (fun x -> ops.Multiply(k,x)) a
-        let scaleVecGU          k (a:Vector<_>)       = let ops = a.ElementOps in unaryOpVectorGU  (fun x -> ops.Multiply(k,x)) a
-        let scaleSparseMatrixGU k (a:SparseMatrix<_>) = let ops = a.ElementOps in unaryOpSparseGU (fun x -> ops.Multiply(k,x)) a
-        let negDenseMatrixGU  (a:DenseMatrix<_>)  = let ops = a.ElementOps in unaryOpDenseMatrixGU (fun x -> ops.Negate(x)) a
-        let negRowVecGU       (a:RowVector<_>)    = let ops = a.ElementOps in unaryOpRowVecGU (fun x -> ops.Negate(x)) a
-        let negVecGU          (a:Vector<_>)       = let ops = a.ElementOps in unaryOpVectorGU  (fun x -> ops.Negate(x)) a
-        let negSparseMatrixGU (a:SparseMatrix<_>) = let ops = a.ElementOps in unaryOpSparseGU (fun x -> ops.Negate(x)) a
-
-        let mapDenseMatrixGU f (a : DenseMatrix<'T>) : DenseMatrix<'T> = 
-            let arrA = a.Values 
-            createDenseMatrixGU a.OpsData a.NumRows a.NumCols (fun i j -> f (getArray2 arrA i j))
-
-        let mapVecGU f (a:Vector<_>) = 
-            let mA= a.NumRows
-            createVecGU a.OpsData mA (fun i -> f a.[i])
-
-        let copyDenseMatrixGU (a : DenseMatrix<'T>) : DenseMatrix<'T> = 
-            let arrA = a.Values 
-            createDenseMatrixGU a.OpsData a.NumRows a.NumCols (fun i j -> getArray2 arrA i j)
-
-        let copyVecGU (a:Vector<_>) = 
-            let mA= a.NumRows
-            createVecGU a.OpsData mA (fun i -> a.[i])
-
-        let copyRowVecGU (a:RowVector<_>) = 
-            let mA= a.NumCols
-            createRowVecGU a.OpsData mA (fun i -> a.[i])
-
-        let to_denseSparseMatrixGU (a:SparseMatrix<_>) = 
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            createDenseMatrixGU a.OpsData mA nA (fun i j -> a.[i,j])
-          
-        let mapiDenseMatrixGU f (a: DenseMatrix<'T>) : DenseMatrix<'T> = 
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            let arrA = a.Values 
-            createDenseMatrixGU a.OpsData mA nA (fun i j -> f i j (getArray2 arrA i j))
-
-        let mapiRowVecGU f (a:RowVector<_>) = 
-            let mA= a.NumCols
-            createRowVecGU a.OpsData mA (fun i -> f i a.[i])
-
-        let mapiVecGU f (a:Vector<_>) = 
-            let mA= a.NumRows
-            createVecGU a.OpsData mA (fun i -> f i a.[i])
-
-        let permuteVecGU (p:permutation) (a:Vector<_>) = 
-            let mA= a.NumRows 
-            createVecGU a.OpsData mA (fun i -> a.[p i])
-
-        let permuteRowVecGU (p:permutation) (a:RowVector<_>) = 
-            let mA= a.NumCols 
-            createRowVecGU a.OpsData mA (fun i -> a.[p i])
-
-        let inline inplace_mapiDenseMatrixGU f (a:DenseMatrix<_>) = 
-            let arrA = a.Values 
-            assignDenseMatrixGU (fun i j -> f i j (getArray2 arrA i j)) a
-
-        let inline inplace_mapiRowVecGU f (a:RowVector<_>) = 
-            assignRowVecGU (fun i -> f i a.[i]) a
-
-        let inline inplace_mapiVecGU f (a:Vector<_>) = 
-            assignVecGU (fun i -> f i a.[i]) a
-
-        let inline foldDenseMatrixGU f z (a:DenseMatrix<_>) =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            let arrA = a.Values 
-            let mutable acc = z
-            for i = 0 to mA-1 do
-                for j = 0 to nA-1 do 
-                   acc <- f acc (getArray2 arrA i j)
-            acc
-        
-        let inline foldVecGU f z (a:Vector<_>) =
-            let mA = a.NumRows
-            let mutable acc = z
-            for i = 0 to mA-1 do acc <- f acc a.[i]
-            acc
-        
-        let inline foldiDenseMatrixGU f z (a:DenseMatrix<_>) =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            let arrA = a.Values 
-            let mutable acc = z
-            for i = 0 to mA-1 do
-                for j = 0 to nA-1 do 
-                   acc <- f i j acc (getArray2 arrA i j)
-            acc
-        
-        let inline foldiVecGU f z (a:Vector<_>) =
-            let mA = a.NumRows
-            let mutable acc = z
-            for i = 0 to mA-1 do acc <- f i acc a.[i]
-            acc
-        
-        let rec forallR f (n,m) = (n > m) || (f n && forallR f (n+1,m))
-        let rec existsR f (n,m) = (n <= m) && (f n || existsR f (n+1,m))
-        
-        let foralliDenseMatrixGU pred (a:DenseMatrix<_>) =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            let arrA = a.Values 
-            (0,mA-1) |> forallR  (fun i ->
-            (0,nA-1) |> forallR  (fun j ->
-            pred i j (getArray2 arrA i j)))
-
-        let foralliVecGU pred (a:Vector<_>) =
-            let mA = a.NumRows
-            (0,mA-1) |> forallR  (fun i ->
-            pred i a.[i])
-
-        let existsiDenseMatrixGU pred (a:DenseMatrix<_>) =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            let arrA = a.Values 
-            (0,mA-1) |> existsR (fun i ->
-            (0,nA-1) |> existsR (fun j ->
-            pred i j (getArray2 arrA i j)))
-
-        let existsiVecGU pred (a:Vector<_>) =
-            let mA = a.NumRows
-            (0,mA-1) |> existsR (fun i ->
-            pred i a.[i])
-
-        let sumDenseMatrixGU  (a:DenseMatrix<_>) = 
-            let ops = a.ElementOps 
-            let zero = ops.Zero 
-            foldDenseMatrixGU (fun acc aij -> add ops acc aij) zero a
-
-        let sumSparseMatrixGU  (a:SparseMatrix<_>) = 
-            let ops = a.ElementOps 
-            let zero = ops.Zero 
-            a |> nonZeroEntriesSparseMatrixGU |> Seq.fold (fun acc (_,_,aij) -> add ops acc aij) zero 
-
-        let sumVecGU (a:Vector<_>) = 
-            let ops = a.ElementOps 
-            let zero = ops.Zero 
-            foldVecGU (fun acc ai -> add ops acc ai) zero a
-
-        let prodDenseMatrixGU (a:DenseMatrix<_>) = 
-            let ops = a.ElementOps 
-            let one = ops.One 
-            foldDenseMatrixGU (fun acc aij -> mul ops acc aij) one a
-
-        let prodSparseMatrixGU  (a:SparseMatrix<_>) = a |> to_denseSparseMatrixGU |> prodDenseMatrixGU
-
-        let inline fold2DenseMatrixGU f z (a:DenseMatrix<_>) (b:DenseMatrix<_>) =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            let nB = b.NumCols 
-            let mB = b.NumRows
-            if nA <> nB || mA <> mB then invalidArg "b" "the two matrices do not have compatible dimensions"
-            let arrA = a.Values 
-            let arrB = b.Values 
-            let mutable acc = z
-            for i = 0 to mA-1 do
-                for j = 0 to nA-1 do 
-                   acc <- f acc (getArray2 arrA i j) (getArray2 arrB i j)
-            acc
-
-        let inline fold2VecGU f z (a:Vector<_>) (b:Vector<_>) =
-            let mA = a.NumRows
-            let mB = b.NumRows
-            if  mA <> mB then invalidArg "b" "the two vectors do not have compatible dimensions"
-            let mutable acc = z
-            for i = 0 to mA-1 do acc <- f acc a.[i] b.[i]
-            acc
-
-        let dotDenseMatrixGU (a:DenseMatrix<_>) b =
-            let ops = a.ElementOps 
-            fold2DenseMatrixGU (fun z va vb -> add ops z (mul ops va vb)) ops.Zero a b
-
-        let dotVecGU (a:Vector<_>) b =
-            let ops =   a.ElementOps
-            let zero = ops.Zero 
-            fold2VecGU  (fun z va vb -> add ops z (mul ops va vb)) zero a b 
-
-        let normDenseMatrixGU (a:DenseMatrix<_>) = 
-            let normOps = getNormOps a.ElementOps
-            foldDenseMatrixGU (fun z aij -> z + ((normOps.Norm aij)**2.0)) 0.0 a |> sqrt
-
-        let normSparseMatrixGU (a:SparseMatrix<_>) = 
-            let normOps = getNormOps a.ElementOps
-            a |> nonZeroEntriesSparseMatrixGU |> Seq.fold (fun acc (_,_,aij) -> acc + ((normOps.Norm aij)**2.0)) 0.0 |> sqrt
-
-        let inplaceAddDenseMatrixGU  (a:DenseMatrix<_>) (b:DenseMatrix<_>) = 
-            let ops = a.ElementOps 
-            let arrB = b.Values 
-            inplace_mapiDenseMatrixGU  (fun i j x -> add ops x (getArray2 arrB i j)) a
-        
-        let inplaceAddVecGU  (a:Vector<_>) (b:Vector<_>) = 
-            let ops = a.ElementOps 
-            inplace_mapiVecGU  (fun i x   -> add ops x b.[i]) a
-
-        let inplaceAddRowVecGU (a:RowVector<_>) (b:Vector<_>) = 
-            let ops = a.ElementOps 
-            inplace_mapiRowVecGU (fun i x   -> add ops x b.[i]) a
-
-        let inplaceSubDenseMatrixGU  (a:DenseMatrix<_>) (b:DenseMatrix<_>) = 
-            let ops = a.ElementOps 
-            let arrB = b.Values 
-            inplace_mapiDenseMatrixGU  (fun i j x -> sub ops x (getArray2  arrB i j)) a
-
-        let inplaceSubVecGU (a:Vector<_>) (b:Vector<_>) = 
-            let ops = a.ElementOps
-            inplace_mapiVecGU  (fun i x   -> sub ops x b.[i]) a
-
-        let inplaceSubRowVecGU (a:RowVector<_>) (b:Vector<_>) = 
-            let ops = a.ElementOps 
-            inplace_mapiRowVecGU (fun i x   -> sub ops x b.[i]  ) a
-
-        let inplaceCptMulDenseMatrixGU  (a:DenseMatrix<_>) (b:DenseMatrix<_>) = 
-            let ops = a.ElementOps 
-            let arrB = b.Values 
-            inplace_mapiDenseMatrixGU  (fun i j x -> mul ops x (getArray2  arrB i j)) a
-
-        let inplaceCptMulVecGU (a:Vector<_>) (b:Vector<_>) = 
-            let ops = a.ElementOps  
-            inplace_mapiVecGU  (fun i x   -> mul ops x b.[i]) a
-
-        let inplaceCptMulRowVecGU (a:RowVector<_>) (b:Vector<_>) = 
-            let ops = a.ElementOps 
-            inplace_mapiRowVecGU (fun i x   -> mul ops x b.[i]  ) a
-
-        let inplaceScaleDenseMatrixGU  x (a:DenseMatrix<_>) = 
-            let ops = a.ElementOps 
-            inplace_mapiDenseMatrixGU  (fun i j y -> ops.Multiply(x,y)) a
-
-        let inplaceScaleVecGU  x (a:Vector<_>) = 
-            let ops = a.ElementOps  
-            inplace_mapiVecGU  (fun i y   -> ops.Multiply(x,y)) a
-
-        let inplaceScaleRowVecGU x (a:RowVector<_>) = 
-            let ops = a.ElementOps 
-            inplace_mapiRowVecGU (fun i y   -> ops.Multiply(x,y)) a
-
-
-        let wrapList (pre,mid,post) show l = 
-            match l with 
-            | []    -> [pre;post]
-            | [x]   -> [pre;show x;post]
-            | x::xs -> [pre;show x] @ (List.collect (fun x -> [mid;show x]) xs) @ [post]
-
-        let showItem opsData  x = 
-            try 
-              let ops = opsOfOpsData opsData 
-              ops.ToString(x,"g10",System.Globalization.CultureInfo.InvariantCulture) 
-            with :? System.NotSupportedException -> (box x).ToString()
-        
-        let mapR f (n,m) = if m < n then [] else List.init (m-n+1) (fun i -> f (n+i))
-
-        let primShowDenseMatrixGU (sepX,sepR) (a : DenseMatrix<'e>) =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            let ops = a.OpsData 
-            let showLine i = wrapList ("[",";","]") (showItem ops) ((0,nA-1) |> mapR  (fun j -> a.[i,j])) |> Array.of_list |> System.String.Concat
-            wrapList ("matrix [",";"+sepX,"]"+sepR) showLine [0..mA-1] |> Array.of_list |> System.String.Concat
-
-        let showDenseMatrixGU     m = primShowDenseMatrixGU ("\n","\n") m
-        let debugShowDenseMatrixGU m = primShowDenseMatrixGU (""  ,""  ) m
-        
-        let showVecGU s (a : Vector<_>) =
-            let mA = a.NumRows
-            let ops = a.OpsData 
-            wrapList (s+" [",";","]") (showItem ops) ((0,mA-1) |> mapR  (fun i -> a.[i])) |> Array.of_list |> System.String.Concat 
-
-        let showRowVecGU s (a : RowVector<_>) =
-            let mA = a.NumCols
-            let ops = a.OpsData 
-            wrapList (s+" [",";","]") (showItem ops) ((0,mA-1) |> mapR  (fun i -> a.[i])) |> Array.of_list |> System.String.Concat 
-
-
-    /// Implementations of operations specific to floating point types
-    module DoubleImpl = 
-
-        module GU = GenericImpl
-        open Instances
-        
-        // Element type OpsData
-        //type elem = float
-        let zero = 0.0
-        let one  = 1.0
-        let inline sub (x:float) (y:float) = x - y
-        let inline add (x:float) (y:float) = x + y
-        let inline mul (x:float) (y:float) = x * y
-        let inline neg (x:float) = -x
-
-        // Specialized: these know the relevant set of 
-        // ops without doing a table lookup based on runtime type
-        let FloatOps = Some (FloatNumerics :> INumeric)
-        let inline initDenseMatrixDS m n f = GU.createDenseMatrixGU FloatOps m n f
-        let inline createRowVecDS m f      = GU.createRowVecGU      FloatOps m f
-        let inline createVecDS m f         = GU.createVecGU         FloatOps m f
-        let inline mkDenseMatrixDS  arr    = GU.mkDenseMatrixGU     FloatOps arr
-        let inline mkRowVecDS arr          = GU.mkRowVecGU          FloatOps arr
-        let inline mkVecDS  arr            = GU.mkVecGU             FloatOps arr
-        let inline listDenseMatrixDS  ll   = GU.listDenseMatrixGU   FloatOps ll
-        let inline listRowVecDS l          = GU.listRowVecGU        FloatOps l
-        let inline listVecDS  l            = GU.listVecGU           FloatOps l
-        let inline seqDenseMatrixDS  ll    = GU.seqDenseMatrixGU    FloatOps ll
-        let inline seqRowVecDS l           = GU.seqRowVecGU         FloatOps l
-        let inline seqVecDS  l             = GU.seqVecGU            FloatOps l
-
-        let constDenseMatrixDS  m n x      = GU.createDenseMatrixGU  FloatOps m n (fun i j -> x)
-        let constRowVecDS m x              = GU.createRowVecGU FloatOps m   (fun i -> x)
-        let constVecDS  m x                = GU.createVecGU  FloatOps m   (fun i -> x)
-        let scalarDenseMatrixDS   x        = constDenseMatrixDS  1 1 x 
-        let scalarRowVecDS  x              = constRowVecDS 1   x 
-        let scalarVecDS   x                = constVecDS  1   x 
-
-        // Beware - when compiled with non-generic code createArray2 creates an array of null values,
-        // not zero values.  Hence the optimized version can only be used when compiling with generics.
-        let inline zeroDenseMatrixDS m n = 
-          let arr = GU.createArray2 m n 
-          GU.mkDenseMatrixGU FloatOps arr
-        // Specialized: these inline down to the efficient loops we need
-        let addDenseMatrixDS     a b = GU.binaryOpDenseMatrixGU  add a b
-        let addSparseDS     a b = GU.binaryOpSparseMatrixGU  add a b
-        let addRowVecDS    a b = GU.binaryOpRowVecGU add a b
-        let addVecDS     a b = GU.binaryOpVecGU  add a b
-        let subDenseMatrixDS     a b = GU.binaryOpDenseMatrixGU  sub a b 
-        let subSparseDS     a b = GU.binaryOpSparseMatrixGU  sub a b 
-        let mulSparseDS     a b = GU.genericMulSparse zero add mul a b
-        let subRowVecDS    a b = GU.binaryOpRowVecGU sub a b 
-        let subVecDS     a b = GU.binaryOpVecGU  sub a b 
-        let cptMulDenseMatrixDS  a b = GU.binaryOpDenseMatrixGU  mul a b
-        let cptMulSparseDS  a b = GU.binaryOpSparseMatrixGU  mul a b
-        let cptMulRowVecDS a b = GU.binaryOpRowVecGU mul a b
-        let cptMulVecDS  a b = GU.binaryOpVecGU  mul a b
-        type smatrix = SparseMatrix
-        type dmatrix = DenseMatrix
-        type vector = Vector
-        type rowvec = RowVector
-        let cptMaxDenseMatrixDS  (a:dmatrix) (b:dmatrix) = GU.binaryOpDenseMatrixGU  max a b
-        let cptMinDenseMatrixDS  (a:dmatrix) (b:dmatrix) = GU.binaryOpDenseMatrixGU  min a b
-        let cptMaxSparseDS  (a:smatrix) (b:smatrix) = GU.binaryOpSparseMatrixGU  max a b
-        let cptMinSparseDS  (a:smatrix) (b:smatrix) = GU.binaryOpSparseMatrixGU  min a b
-        let cptMaxVecDS  (a:vector) (b:vector) = GU.binaryOpVecGU  max a b
-        let cptMinVecDS  (a:vector) (b:vector) = GU.binaryOpVecGU  min a b
-
-        // Don't make any mistake about these ones re. performance.
-        let mulDenseMatrixDS (a:dmatrix) (b:dmatrix) =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            let nB = b.NumCols 
-            let mB = b.NumRows
-            if nA<>mB then invalidArg "b" "the two matrices do not have compatible dimensions"
-            // Beware - when compiled with non-generic code createArray2 creates an array of null values,
-            // not zero values.  However we fill in all the entries to the array, hence OK.
-            let arr = GU.createArray2 mA nB 
-            let arrA = a.Values 
-            let arrB = b.Values 
-            for i = 0 to mA - 1 do 
-                for j = 0 to nB - 1 do 
-                    let mutable r = 0.0 
-                    for k = 0 to mB - 1 do 
-                        r <- r + mul (GU.getArray2 arrA i k) (GU.getArray2 arrB k j)
-                    GU.setArray2 arr i j r
-            mkDenseMatrixDS arr
-
-        let mulRowVecDenseMatrixDS (a:rowvec) (b:dmatrix) =
-            let nA = a.NumCols 
-            let nB = b.NumCols 
-            let mB = b.NumRows
-            if nA<>mB then invalidArg "b" "the two inputs do not have compatible dimensions"
-            let arr = Array.zeroCreate nB 
-            let arrA = a.Values 
-            let arrB = b.Values 
-            for j = 0 to nB - 1 do 
-                let mutable r = 0.0 
-                for k = 0 to mB - 1 do 
-                    r <- r + mul arrA.[k] (GU.getArray2 arrB k j)
-                arr.[j] <- r
-            mkRowVecDS arr
-
-        let mulDenseMatrixVecDS (a:dmatrix) (b:vector) =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            let mB = b.NumRows 
-            if nA<>mB then invalidArg "b" "the two inputs do not have compatible dimensions"
-            let arr = Array.zeroCreate mA 
-            let arrA = a.Values 
-            let arrB = b.Values 
-            for i = 0 to mA - 1 do 
-                let mutable r = 0.0 
-                for k = 0 to nA - 1 do 
-                    r <- r + mul (GU.getArray2 arrA i k) arrB.[k]
-                arr.[i] <- r
-            mkVecDS arr
-
-        let mulRowVecVecDS (a:rowvec) (b:vector) =
-            let nA = a.NumCols 
-            let mB = b.NumRows 
-            if nA<>mB then invalidArg "b" "the two vectors do not have compatible dimensions"
-            let arrA = a.Values 
-            let arrB = b.Values 
-            let mutable r = 0.0 
-            for k = 0 to nA - 1 do 
-                r <- r + mul arrA.[k] arrB.[k]
-            r
-
-        let rowvecDenseMatrixDS (x:rowvec) = initDenseMatrixDS 1          x.NumCols (fun _ j -> x.[j]) 
-        let vectorDenseMatrixDS (x:vector) = initDenseMatrixDS x.NumRows  1         (fun i _ -> x.[i]) 
-        let mulVecRowVecDS a b = mulDenseMatrixDS (vectorDenseMatrixDS a) (rowvecDenseMatrixDS b) 
-
-        let scaleDenseMatrixDS   k m = GU.unaryOpDenseMatrixGU  (fun x -> mul k x) m
-        let scaleSparseDS   k m = GU.unaryOpSparseGU  (fun x -> mul k x) m
-        let scaleRowVecDS  k m = GU.unaryOpRowVecGU (fun x -> mul k x) m
-        let scaleVecDS   k m = GU.unaryOpVectorGU  (fun x -> mul k x) m
-        let negDenseMatrixDS     m   = GU.unaryOpDenseMatrixGU  (fun x -> neg x) m
-        let negSparseDS     m   = GU.unaryOpSparseGU  (fun x -> neg x) m
-        let negRowVecDS    m   = GU.unaryOpRowVecGU (fun x -> neg x) m
-        let negVecDS     m   = GU.unaryOpVectorGU  (fun x -> neg x) m
-
-        let traceDenseMatrixDS (a:dmatrix) =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            if nA<>mA then invalidArg "a" "expected a square matrix";
-            let arrA = a.Values 
-            (0,nA-1) |> GU.sumfR (fun i -> GU.getArray2 arrA i i) 
-
-        let sumDenseMatrixDS  a = GU.foldDenseMatrixGU add zero a
-        let sumVecDS   a = GU.foldVecGU  add zero a
-        let prodDenseMatrixDS a = GU.foldDenseMatrixGU mul one  a
-        let prodVecDS  a = GU.foldVecGU  mul one  a
-
-        let dotDenseMatrixDS a b = GU.fold2DenseMatrixGU (fun z va vb -> add z (mul va vb)) zero a b
-        let dotVecDS a b = GU.fold2VecGU (fun z va vb -> add z (mul va vb)) zero a b
-        let sumfDenseMatrixDS  f m = GU.foldDenseMatrixGU (fun acc aij -> add acc (f aij)) zero m
-        let normDenseMatrixDS m = sqrt (sumfDenseMatrixDS (fun x -> x*x) m)
-
-        let inplaceAddDenseMatrixDS  a (b:DenseMatrix<_>) = let arrB = b.Values  in GU.inplace_mapiDenseMatrixGU  (fun i j x -> x + GU.getArray2 arrB i j) a
-        let inplaceAddVecDS    a (b:Vector<_>) = let arrB = b.Values  in GU.inplace_mapiVecGU  (fun i x   -> x + arrB.[i]) a
-        let inplace_addRowVecDS a (b:RowVector<_>) = let arrB = b.Values in GU.inplace_mapiRowVecGU (fun i x   -> x + arrB.[i]) a
-        let inplaceSubDenseMatrixDS  a (b:DenseMatrix<_>) = let arrB = b.Values  in GU.inplace_mapiDenseMatrixGU  (fun i j x -> x - GU.getArray2  arrB i j) a
-        let inplaceSubVecDS  a (b:Vector<_>) = let arrB = b.Values  in GU.inplace_mapiVecGU  (fun i x   -> x - arrB.[i]) a
-        let inplace_subRowVecDS a (b:RowVector<_>) = let arrB = b.Values in GU.inplace_mapiRowVecGU (fun i x   -> x - arrB.[i]) a
-        let inplaceCptMulDenseMatrixDS  a (b:DenseMatrix<_>) = let arrB = b.Values  in GU.inplace_mapiDenseMatrixGU  (fun i j x -> x * GU.getArray2 arrB i j) a
-        let inplaceCptMulVecDS  a (b:Vector<_>) = let arrB = b.Values  in GU.inplace_mapiVecGU  (fun i x   -> x * arrB.[i]) a
-        let inplace_cptMulRowVecDS a (b:RowVector<_>) = let arrB = b.Values in GU.inplace_mapiRowVecGU (fun i x   -> x * arrB.[i]) a
-        let inplaceScaleDenseMatrixDS  (a:float) b = GU.inplace_mapiDenseMatrixGU  (fun i j x -> a * x) b
-        let inplaceScaleVecDS  (a:float) b = GU.inplace_mapiVecGU  (fun i x   -> a * x) b
-        let inplace_scaleRowVecDS (a:float) b = GU.inplace_mapiRowVecGU (fun i x   -> a * x) b
-
-
-
-    /// Generic operations that, when used on floating point types, use the specialized versions in DoubleImpl
-    module SpecializedGenericImpl = 
-
-        open Microsoft.FSharp.Math.Instances
-        open Microsoft.FSharp.Math.GlobalAssociations
-
-        module GU = GenericImpl
-        module DS = DoubleImpl
-
-          
-        type smatrix = SparseMatrix
-        type dmatrix = DenseMatrix
-        type vector = Vector
-        type rowvec = RowVector
-        let inline dense x = DenseRepr(x)
-        let inline sparse x = SparseRepr(x)
-        let inline createMx  ops m n f = GU.createDenseMatrixGU ops m n f |> dense
-        let inline createVx  ops m f   = GU.createVecGU ops m f
-        let inline createRVx ops m f   = GU.createRowVecGU ops m f
-
-        let nonZeroEntriesM a   = 
-            match a with 
-            | DenseRepr a -> GU.nonzeroEntriesDenseMatrixGU a 
-            | SparseRepr a -> GU.nonZeroEntriesSparseMatrixGU a 
-
-        /// Merge two sorted sequences
-        let mergeSorted cf (s1: seq<'T>) (s2: seq<'b>) =
-            seq { use e1 = s1.GetEnumerator()
-                  use e2 = s2.GetEnumerator()
-                  let havee1 = ref (e1.MoveNext())
-                  let havee2 = ref (e2.MoveNext())
-                  while !havee1 || !havee2 do
-                    if !havee1 && !havee2 then
-                        let v1 = e1.Current
-                        let v2 = e2.Current
-                        let c = cf v1 v2 
-                        if c < 0 then 
-                            do havee1 := e1.MoveNext()
-                            yield Some(v1),None
-                        elif c = 0 then
-                            do havee1 := e1.MoveNext()
-                            do havee2 := e2.MoveNext()
-                            yield Some(v1),Some(v2)
-                        else 
-                            do havee2 := e2.MoveNext()
-                            yield (None,Some(v2))
-                    elif !havee1 then 
-                        let v1 = e1.Current
-                        do havee1 := e1.MoveNext()
-                        yield (Some(v1),None)
-                    else 
-                        let v2 = e2.Current
-                        do havee2 := e2.MoveNext()
-                        yield (None,Some(v2)) }
-
-        /// Non-zero entries from two sequences
-        let mergedNonZeroEntriesM  (a:Matrix<_>) (b:Matrix<_>) = 
-            let ops = a.ElementOps 
-            let zero = ops.Zero
-            mergeSorted (fun (i1,j1,_) (i2,j2,_) -> let c = compare i1 i2 in if c <> 0 then c else compare j1 j2) (nonZeroEntriesM a) (nonZeroEntriesM b)
-            |> Seq.map (function | Some(i,j,v1),Some(_,_,v2) -> (i,j,v1,v2)
-                                 | Some(i,j,v1),None         -> (i,j,v1,zero)
-                                 | None,        Some(i,j,v2) -> (i,j,zero,v2)
-                                 | None,        None          -> failwith "unreachable")
-
-
-        
-        // Creation
-        let listM    xss : Matrix<'T>    = GU.listDenseMatrixGU opsdata<'T> xss |> dense
-        let listV    xss : Vector<'T>    = GU.listVecGU         opsdata<'T> xss
-        let listRV   xss : RowVector<'T> = GU.listRowVecGU      opsdata<'T> xss
-
-        let arrayM    xss : Matrix<'T>    = GU.mkDenseMatrixGU  opsdata<'T> (Array2D.copy xss) |> dense
-        let arrayV    xss : Vector<'T>    = GU.mkVecGU          opsdata<'T> (Array.copy xss)
-        let arrayRV   xss : RowVector<'T> = GU.mkRowVecGU       opsdata<'T> (Array.copy xss)
-
-        let seqM    xss : Matrix<'T>    = GU.seqDenseMatrixGU   opsdata<'T> xss |> dense
-        let seqV    xss : Vector<'T>    = GU.seqVecGU           opsdata<'T> xss
-        let seqRV   xss : RowVector<'T> = GU.seqRowVecGU        opsdata<'T> xss
-
-        let initM  m n f : Matrix<'T>    = GU.createDenseMatrixGU opsdata<'T> m n f |> dense
-        let initRV m   f : RowVector<'T> = GU.createRowVecGU      opsdata<'T> m   f
-        let initV  m   f : Vector<'T>    = GU.createVecGU         opsdata<'T> m   f
-
-        let inline inplace_assignM  f a = 
-            match a with 
-            | SparseRepr a -> sparseNotMutable()
-            | DenseRepr a -> GU.assignDenseMatrixGU  f a
-        let inline assignV  f a = GU.assignVecGU  f a
-
-        let coerce2 x = unbox(box(x))
-        let loosenDM (x: dmatrix) : DenseMatrix<_>  = coerce2 x
-        let loosenSM (x: smatrix) : SparseMatrix<_> = coerce2 x
-        let loosenV  (x: vector)  : Vector<_>       = coerce2 x
-        let loosenRV (x: rowvec)  : RowVector<_>    = coerce2 x
-        let loosenF  (x: float)   : 'T              = coerce2 x
-
-        let tightenDM (x: DenseMatrix<_>)  : dmatrix = coerce2 x
-        let tightenSM (x: SparseMatrix<_>) : smatrix = coerce2 x
-        let tightenV  (x: Vector<_>)       : vector  = coerce2 x
-        let tightenRV (x: RowVector<_>)    : rowvec  = coerce2 x
-        let tightenF  (x: 'T)              : float   = coerce2 x
-
-        let zeroM m n = 
-            let arr = GU.createArray2 m n
-            // This is quite performance critical
-            // Avoid assigining zeros into the array
-            match box arr with 
-            | :? (float[,])   as arr -> GU.mkDenseMatrixGU DS.FloatOps arr |> loosenDM |> dense
-            | _ -> 
-            GU.zeroizeDenseMatrixGUA arr m n  |> dense
-
-        let zeroV m  : Vector<'T> = 
-            let arr = GU.createArray m 
-            // Avoid assigining zeros into the array
-            match box (arr: 'T[]) with 
-            | :? (float[])   as arr -> GU.mkVecGU DS.FloatOps arr |> loosenV
-            | _ -> 
-            GU.zeroizeVecGUA arr m
-
-        let zeroRV m  : RowVector<'T> = 
-            let arr = GU.createArray m 
-            // Avoid assigining zeros into the array
-            match box (arr: 'T[]) with 
-            | :? (float[])   as arr -> GU.mkRowVecGU DS.FloatOps arr |> loosenRV
-            | _ -> 
-            GU.zeroizeRowVecGUA arr m
-            
-        let initNumericM m n f   = 
-            let arr = GU.createArray2 m n 
-            let opsData = opsdata<'T> 
-            let ops = GU.opsOfOpsData opsData 
-            GU.assignArray2 m n (f ops) arr;
-            GU.mkDenseMatrixGU opsData arr |> dense
-
-        let identityM m   = 
-          let arr = GU.createArray2 m m 
-          // This is quite performance critical
-          // Avoid assigining zeros into the array
-          match box arr with 
-          | :? (float[,])   as arr -> 
-              for i = 0 to m - 1 do 
-                 arr.[i,i] <- 1.0 
-              GU.mkDenseMatrixGU DS.FloatOps arr |> loosenDM |> dense
-          | _ -> 
-          let opsData = opsdata<'T> 
-          let ops = GU.opsOfOpsData opsData 
-          let zero = ops.Zero 
-          let one = ops.One 
-          GU.assignArray2 m m (fun i j -> if i = j then one else zero) arr;
-          GU.mkDenseMatrixGU opsData arr |> dense
-
-        let createNumericV m f  : Vector<'T> = 
-            let arr = GU.createArray m 
-            let opsData = opsdata<'T> 
-            let ops = GU.opsOfOpsData opsData 
-            GU.assignArray m (f ops) arr;
-            GU.mkVecGU opsData arr
-            
-        let constM  m n x = initM  m n (fun i j -> x)
-        let constRV m x   = initRV m   (fun i -> x)
-        let constV  m x   = initV  m   (fun i -> x)
-        let scalarM   x = constM 1 1 x 
-        let scalarRV  x = constRV 1 x 
-        let scalarV   x = constV 1 x 
-
-        let diagnM (v:Vector<_>) n = 
-            let ops = v.ElementOps
-            let zero = ops.Zero 
-            let nV = v.NumRows + (if n < 0 then -n else n) 
-            createMx v.OpsData nV nV (fun i j -> if i+n=j then v.[i] else zero)
-
-        let diagM v = diagnM v 0
-
-        let constDiagM  n x : Matrix<'T> = 
-            let opsData = opsdata<'T> 
-            let ops = GU.opsOfOpsData opsData 
-            let zero = ops.Zero 
-            createMx opsData n n (fun i j -> if i=j then x else zero) 
-
-        // Note: we drop sparseness on pointwise multiplication of sparse and dense.
-        let inline binaryOpM opDenseDS opDenseGU opSparseDS opSparseMatrixGU a b = 
-            match a,b with 
-            | DenseRepr a,DenseRepr b -> 
-                match box a with 
-                | (:? dmatrix as a) -> opDenseDS   a (tightenDM b) |> loosenDM |> dense
-                | _                 -> opDenseGU a b                           |> dense
-            | SparseRepr a,SparseRepr b ->
-                match box a with 
-                | (:? smatrix as a) -> opSparseDS a (tightenSM b) |> loosenSM |> sparse
-                | _                 -> opSparseMatrixGU a b                         |> sparse
-            | SparseRepr a, DenseRepr b     -> opDenseGU (GU.to_denseSparseMatrixGU a) b         |> dense
-            | DenseRepr  a, SparseRepr b    -> opDenseGU a (GU.to_denseSparseMatrixGU b)         |> dense
-
-        let inline unaryOpM opDenseDS opDenseGU opSparseDS opSparseMatrixGU  b = 
-            match b with 
-            | DenseRepr b -> 
-                match box b with 
-                | (:? dmatrix as b)  -> opDenseDS b |> loosenDM |> dense
-                | _                  -> opDenseGU b             |> dense
-            | SparseRepr b ->             
-                match box b with 
-                | (:? smatrix as b) -> opSparseDS b |> loosenSM |> sparse
-                | _                 -> opSparseMatrixGU b             |> sparse
-
-        let inline floatUnaryOpM opDenseDS opDenseGU opSparseDS opSparseMatrixGU  b = 
-            match b with 
-            | DenseRepr b -> 
-                match box b with 
-                | (:? dmatrix as b)  -> opDenseDS b |> loosenF
-                | _                  -> opDenseGU b             
-            | SparseRepr b ->             
-                match box b with 
-                | (:? smatrix as b) -> opSparseDS b |> loosenF 
-                | _                 -> opSparseMatrixGU b             
-
-        let addM a b = binaryOpM DS.addDenseMatrixDS GU.addDenseMatrixGU DS.addSparseDS GU.addSparseMatrixGU a b
-        let subM a b = binaryOpM DS.subDenseMatrixDS GU.subDenseMatrixGU DS.subSparseDS GU.subSparseMatrixGU a b
-        let mulM a b = binaryOpM DS.mulDenseMatrixDS GU.genericMulDenseMatrix DS.mulSparseDS GU.mulSparseMatrixGU a b
-        let cptMulM a b = binaryOpM DS.cptMulDenseMatrixDS GU.cptMulDenseMatrixGU DS.cptMulSparseDS GU.cptMulSparseMatrixGU a b
-        let cptMaxM a b = binaryOpM DS.cptMaxDenseMatrixDS GU.cptMaxDenseMatrixGU DS.cptMaxSparseDS GU.cptMaxSparseMatrixGU a b
-        let cptMinM a b = binaryOpM DS.cptMinDenseMatrixDS GU.cptMinDenseMatrixGU DS.cptMinSparseDS GU.cptMinSparseMatrixGU a b
-
-        let addRV a b = 
-            match box a with 
-            | (:? rowvec as a) -> DS.addRowVecDS a (tightenRV b) |> loosenRV
-            | _                -> GU.addRowVecGU a b
-
-        let addV a b = 
-            match box a with 
-            | (:? vector as a) -> DS.addVecDS a (tightenV b) |> loosenV
-            | _                -> GU.addVecGU a b
-
-        let subRV a b = 
-            match box a with 
-            | (:? rowvec as a) -> DS.subRowVecDS   a (tightenRV b) |> loosenRV
-            | _                -> GU.subRowVecGU a b
-
-        let subV a b = 
-            match box a with 
-            | (:? vector as a) -> DS.subVecDS   a (tightenV b) |> loosenV
-            | _                -> GU.subVecGU a b
-
-        let mulRVM a b = 
-            match b with 
-            | DenseRepr b -> 
-                match box a with 
-                | (:? rowvec as a) -> DS.mulRowVecDenseMatrixDS   a (tightenDM b) |> loosenRV
-                | _                -> GU.mulRowVecDenseMatrixGU a b
-            | SparseRepr b -> GU.mulRVSparseMatrixGU a b
-
-        let mulMV a b = 
-            match a with 
-            | DenseRepr a -> 
-                match box a with 
-                | (:? dmatrix as a) -> DS.mulDenseMatrixVecDS   a (tightenV b) |> loosenV
-                | _                 -> GU.mulDenseMatrixVecGU a b
-            | SparseRepr a -> GU.mulSparseVecGU a b 
-
-        let mulRVV a b = 
-            match box a with 
-            | (:? rowvec as a) -> DS.mulRowVecVecDS   a (tightenV b) |> loosenF
-            | _                -> GU.mulRowVecVecGU a b
-
-        let mulVRV a b = 
-          match box a with 
-          | (:? vector as a) -> DS.mulVecRowVecDS   a (tightenRV b) |> loosenDM |> dense
-          | _                -> GU.mulVecRowVecGU a b |> dense
-
-        let cptMulRV a b = 
-          match box a with 
-          | (:? rowvec as a) -> DS.cptMulRowVecDS   a (tightenRV b) |> loosenRV
-          | _                -> GU.cptMulRowVecGU a b
-
-        let cptMulV a b = 
-          match box a with 
-          | (:? vector as a) -> DS.cptMulVecDS   a (tightenV b) |> loosenV
-          | _                -> GU.cptMulVecGU a b
-
-        let cptMaxV a b = 
-          match box a with 
-          | (:? vector as a) -> DS.cptMaxVecDS   a (tightenV b) |> loosenV
-          | _                -> GU.cptMaxVecGU a b
-
-        let cptMinV a b = 
-          match box a with 
-          | (:? vector as a) -> DS.cptMinVecDS   a (tightenV b) |> loosenV
-          | _                -> GU.cptMinVecGU a b
-
-        let scaleM a b = unaryOpM (fun b -> DS.scaleDenseMatrixDS (tightenF a) b) (GU.scaleDenseMatrixGU a)
-                              (fun b -> DS.scaleSparseDS (tightenF a) b) (GU.scaleSparseMatrixGU a) b
-
-        let scaleRV a b = 
-          match box b with 
-          | (:? rowvec as b)  -> DS.scaleRowVecDS (tightenF a) b |> loosenRV 
-          | _                 -> GU.scaleRowVecGU a b
-
-        let scaleV a b = 
-          match box b with 
-          | (:? vector as b)  -> DS.scaleVecDS (tightenF a) b |> loosenV
-          | _                 -> GU.scaleVecGU a b
-
-        let dotM a b = 
-          match a,b with 
-          | DenseRepr a,DenseRepr b -> 
-              match box b with 
-              | (:? dmatrix as b)  -> DS.dotDenseMatrixDS   (tightenDM a) b |> loosenF
-              | _                  -> GU.dotDenseMatrixGU a b
-          | _ ->  
-              let ops = a.ElementOps 
-              mergedNonZeroEntriesM a b |> Seq.fold (fun z (_,_,va,vb) -> GU.add ops z (GU.mul ops va vb)) ops.Zero 
-
-        let dotV a b = 
-          match box b with 
-          | (:? vector as b)  -> DS.dotVecDS   (tightenV a) b |> loosenF
-          | _                 -> GU.dotVecGU a b
-
-        let negM a = unaryOpM DS.negDenseMatrixDS GU.negDenseMatrixGU DS.negSparseDS GU.negSparseMatrixGU a
-
-        let negRV a = 
-          match box a with 
-          | (:? rowvec as a) -> DS.negRowVecDS a |> loosenRV
-          | _               ->  GU.negRowVecGU a
-
-        let negV a = 
-          match box a with 
-          | (:? vector as a) -> DS.negVecDS a |> loosenV
-          | _               ->  GU.negVecGU a
-
-        let traceMGU (a:Matrix<_>) =
-          let nA = a.NumCols  
-          let mA = a.NumRows 
-          if nA<>mA then invalidArg "a" "expected a square matrix";
-          let ops = a.ElementOps 
-          (0,nA-1) |> GU.sumRGU ops (fun i -> a.[i,i]) 
-
-        let traceM a = floatUnaryOpM DS.traceDenseMatrixDS (dense >> traceMGU) (sparse >> traceMGU) (sparse >> traceMGU) a
-        let sumM a = floatUnaryOpM DS.sumDenseMatrixDS GU.sumDenseMatrixGU GU.sumSparseMatrixGU GU.sumSparseMatrixGU a
-        let prodM a = floatUnaryOpM DS.prodDenseMatrixDS GU.prodDenseMatrixGU GU.prodSparseMatrixGU GU.prodSparseMatrixGU a
-        let normM a = floatUnaryOpM DS.normDenseMatrixDS GU.normDenseMatrixGU GU.normSparseMatrixGU GU.normSparseMatrixGU a
-
-        let opsM a = 
-            match a with 
-            | DenseRepr a -> a.OpsData 
-            | SparseRepr a -> a.OpsData 
-        
-        let transM a = 
-            match a with 
-            | DenseRepr a -> 
-                createMx a.OpsData a.NumCols a.NumRows (fun i j -> a.[j,i])
-            | SparseRepr a -> 
-                a |> GU.nonZeroEntriesSparseMatrixGU  |> Seq.map (fun (i,j,v) -> (j,i,v)) |> GU.initSparseMatrixGU a.NumCols a.NumRows a.OpsData |> sparse
-        
-        let permuteRows (p: permutation) a =
-            match a with
-            | DenseRepr a ->
-                createMx a.OpsData a.NumCols a.NumRows (fun i j -> a.[p i,j])
-            | SparseRepr a ->
-                a |> GU.nonZeroEntriesSparseMatrixGU  |> Seq.map (fun (i,j,v) -> (p i,j,v)) |> GU.initSparseMatrixGU a.NumCols a.NumRows a.OpsData |> sparse
-
-        let permuteColumns (p: permutation) a =
-            match a with
-            | DenseRepr a ->
-                createMx a.OpsData a.NumCols a.NumRows (fun i j -> a.[i,p j])
-            | SparseRepr a ->
-                a |> GU.nonZeroEntriesSparseMatrixGU  |> Seq.map (fun (i,j,v) -> (i,p j,v)) |> GU.initSparseMatrixGU a.NumCols a.NumRows a.OpsData |> sparse
-
-        let transRV (a:RowVector<_>) = 
-            createVx a.OpsData  a.NumCols (fun i -> a.[i])
-
-        let transV (a:Vector<_>)  = 
-            createRVx a.OpsData a.NumRows (fun i -> a.[i])
-
-        let inplaceAddM a b = 
-            match a,b with 
-            | DenseRepr a,DenseRepr b -> 
-                match box a with 
-                | (:? dmatrix as a) -> DS.inplaceAddDenseMatrixDS   a (tightenDM b)
-                | _                 -> GU.inplaceAddDenseMatrixGU a b
-            | _ -> sparseNotMutable()
-
-        let inplaceAddV a b = 
-            match box a with 
-            | (:? vector as a) -> DS.inplaceAddVecDS   a (tightenV b)
-            | _                -> GU.inplaceAddVecGU a b
-
-        let inplaceSubM a b = 
-            match a,b with 
-            | DenseRepr a,DenseRepr b -> 
-                match box a with 
-                | (:? dmatrix as a) -> DS.inplaceSubDenseMatrixDS   a (tightenDM b)
-                | _                -> GU.inplaceSubDenseMatrixGU a b
-            | _ -> sparseNotMutable()
-
-        let inplaceSubV a b = 
-            match box a with 
-            | (:? vector as a) -> DS.inplaceSubVecDS   a (tightenV b)
-            | _                -> GU.inplaceSubVecGU a b
-
-
-        let inplaceCptMulM a b = 
-            match a,b with 
-            | DenseRepr a,DenseRepr b -> 
-                match box a with 
-                | (:? dmatrix as a) -> DS.inplaceCptMulDenseMatrixDS   a (tightenDM b)
-                | _                -> GU.inplaceCptMulDenseMatrixGU a b
-            | _ -> sparseNotMutable()
-
-        let inplaceCptMulV a b = 
-            match box a with 
-            | (:? vector as a) -> DS.inplaceCptMulVecDS   a (tightenV b)
-            | _                -> GU.inplaceCptMulVecGU a b
-
-        let inplaceScaleM a b = 
-            match b with 
-            | DenseRepr b -> 
-                match box b with 
-                | (:? dmatrix as b)  -> DS.inplaceScaleDenseMatrixDS   (tightenF a) b
-                | _                 -> GU.inplaceScaleDenseMatrixGU a b
-            | _ -> sparseNotMutable()
-
-        let inplaceScaleV a b = 
-            match box b with 
-            | (:? vector as b)  -> DS.inplaceScaleVecDS   (tightenF a) b
-            | _                 -> GU.inplaceScaleVecGU a b
-
-        let existsM  f a = 
-            match a with 
-            | SparseRepr a -> sparseNYI() // note: martin says "run f on a token element if it's not full"
-            | DenseRepr a -> GU.existsiDenseMatrixGU  (fun _ _ -> f) a
-
-        let existsV  f a = GU.existsiVecGU  (fun _ -> f) a
-
-        let forallM  f a = 
-            match a with 
-            | SparseRepr a -> sparseNYI()
-            | DenseRepr a -> GU.foralliDenseMatrixGU  (fun _ _ -> f) a
-
-        let forallV  f a = GU.foralliVecGU  (fun _ -> f) a
-
-        let existsiM  f a = 
-            match a with 
-            | SparseRepr a -> sparseNYI()
-            | DenseRepr a -> GU.existsiDenseMatrixGU  f a
-
-        let existsiV  f a = GU.existsiVecGU  f a
-
-        let foralliM  f a = 
-            match a with 
-            | SparseRepr a -> sparseNYI()
-            | DenseRepr a -> GU.foralliDenseMatrixGU  f a
-
-        let foralliV  f a = GU.foralliVecGU  f a
-
-        let mapM  f a = 
-            match a with 
-            | SparseRepr a -> sparseNYI()
-            | DenseRepr a -> DenseRepr(GU.mapDenseMatrixGU f a)
-
-        let mapV  f a = GU.mapVecGU f a
-
-        let copyM  a = 
-            match a with 
-            | SparseRepr a -> SparseRepr (GU.copySparseGU a)
-            | DenseRepr a -> DenseRepr (GU.copyDenseMatrixGU a)
-
-        let copyV  a = GU.copyVecGU a
-
-        let copyRV  a = GU.copyRowVecGU a
-
-        let mapiM  f a = 
-            match a with 
-            | SparseRepr a -> sparseNYI()
-            | DenseRepr a -> DenseRepr (GU.mapiDenseMatrixGU f a)
-
-        let mapiV  f a = GU.mapiVecGU f a
-        let permuteV p a = GU.permuteVecGU p a
-        let permuteRV p a = GU.permuteRowVecGU p a
-
-        let mapiRV  f a = GU.mapiRowVecGU f a
-
-        let to_denseM a = 
-            match a with 
-            | SparseRepr a -> GU.to_denseSparseMatrixGU a |> dense
-            | DenseRepr _ -> a
-
-        let initSparseM i j x : Matrix<'T> = 
-            let opsData = opsdata<'T> 
-            GU.initSparseMatrixGU i j opsData x |> sparse
-          
-        let initDenseM i j x : Matrix<'T> = 
-            let r = zeroM i j
-            x |> Seq.iter (fun (i,j,v) -> r.[i,j] <- v);
-            r
-
-        let getDiagnM (a:Matrix<_>) n =
-            let nA = a.NumCols 
-            let mA = a.NumRows
-            if nA<>mA then invalidArg "a" "expected a square matrix";
-            let ops = a.ElementOps 
-            let ni = if n < 0 then -n else 0 
-            let nj = if n > 0 then  n else 0 
-            GU.createVecGU (opsM a) (max (nA-abs(n)) 0) (fun i -> a.[i+ni,i+nj]) 
-
-        let getDiagM  a = getDiagnM a 0
-
-        let inline inplace_mapiM  f a = 
-            match a with 
-            | SparseRepr a -> sparseNotMutable()
-            | DenseRepr a -> GU.inplace_mapiDenseMatrixGU f a
-
-        let inline inplace_mapiV  f a = GU.inplace_mapiVecGU f a
-        
-        let inline foldM  f z a = 
-            match a with 
-            | SparseRepr a -> sparseNYI()
-            | DenseRepr a -> GU.foldDenseMatrixGU f z a
-
-        let inline foldV  f z a = GU.foldVecGU f z a
-
-        let inline foldiM  f z a = 
-            match a with 
-            | SparseRepr a -> sparseNYI()
-            | DenseRepr a -> GU.foldiDenseMatrixGU f z a
-
-        let inline foldiV  f z a = GU.foldiVecGU f z a
-
-        let compareM (comp: IComparer) (a:Matrix<'T>) (b:Matrix<'T>) = 
-            let nA = a.NumCols 
-            let mA = a.NumRows 
-            let nB = b.NumCols 
-            let mB = b.NumRows 
-            let c = compare mA mB 
-            if c <> 0 then c else
-            let c = compare nA nB 
-            if c <> 0 then c else
-            match a,b with 
-            | DenseRepr a, DenseRepr b -> 
-              let rec go2 i j = 
-                 if j < nA then 
-                   let c = comp.Compare( a.[i,j], b.[i,j])
-                   if c <> 0 then c else 
-                   go2 i (j+1) 
-                 else 0 
-              let rec go1 i = 
-                 if i < mA then 
-                   let c = go2 i 0 
-                   if c <> 0 then c 
-                   else go1 (i+1) 
-                 else 0 
-              go1 0
-            | _ -> 
-              match (mergedNonZeroEntriesM a b |> Seq.tryPick (fun (i,j,v1,v2) -> let c = comp.Compare(v1,v2) in if c = 0 then None else Some(c))) with
-              | None -> 0
-              | Some(c) -> c
-             
-        let equalsM (comp: IEqualityComparer) (a:Matrix<'T>) (b:Matrix<'T>) = 
-            let nA = a.NumCols 
-            let mA = a.NumRows 
-            let nB = b.NumCols 
-            let mB = b.NumRows 
-            (mA = mB ) && (nA = nB) && 
-            match a,b with 
-            | DenseRepr a, DenseRepr b -> 
-              let rec go2 i j =  j >= nA || (comp.Equals( a.[i,j], b.[i,j]) && go2 i (j+1) )
-              let rec go1 i = i >= mA || (go2 i 0  && go1 (i+1))
-              go1 0
-            | _ -> 
-              mergedNonZeroEntriesM a b |> Seq.forall (fun (i,j,v1,v2) -> comp.Equals(v1,v2))
-             
-
-        let compareV (comp: IComparer) (a:Vector<'T>) (b:Vector<'T>) = 
-            let mA = a.NumRows
-            let mB = b.NumRows 
-            let c = compare mA mB 
-            if c <> 0 then c else
-            let rec go2 j = 
-               if j < mA then 
-                 let c = comp.Compare(a.[j],b.[j])
-                 if c <> 0 then c else go2 (j+1) 
-               else 0 
-            go2 0
-
-        let equalsV (comp: IEqualityComparer) (a:Vector<'T>) (b:Vector<'T>) = 
-            let mA = a.NumRows
-            let mB = b.NumRows 
-            (mA = mB) && 
-            let rec go2 j = (j >= mA) || (comp.Equals(a.[j],b.[j]) && go2 (j+1))
-            go2 0
-
-        let equalsRV (comp: IEqualityComparer) (a:RowVector<'T>) (b:RowVector<'T>) = 
-            let mA = a.NumCols 
-            let mB = b.NumCols 
-            (mA = mB) && 
-            let rec go2 j = (j >= mA) || (comp.Equals(a.[j],b.[j]) && go2 (j+1))
-            go2 0
-
-        let compareRV (comp: IComparer) (a:RowVector<'T>) (b:RowVector<'T>) = 
-            let mA = a.NumCols 
-            let mB = b.NumCols 
-            let c = compare mA mB 
-            if c <> 0 then c else
-            let rec go2 j = 
-               if j < mA then 
-                 let c = comp.Compare(a.[j],b.[j])
-                 if c <> 0 then c else go2 (j+1) 
-               else 0 
-            go2 0
-
-        let inline combineHash x y = (x <<< 1) + y + 631 
-
-        let hashM (comp:IEqualityComparer) (a:Matrix<_>) = 
-            let nA = a.NumCols 
-            let mA = a.NumRows 
-            let acc = hash mA + hash nA
-            a |> nonZeroEntriesM |> Seq.truncate 20 |> Seq.fold (fun z v -> combineHash z (comp.GetHashCode v)) acc
-          
-        let hashV (comp:IEqualityComparer) (a:Vector<_>) = 
-            let mA = a.NumRows 
-            hash mA +
-            (let mutable c = 0 
-             for i = 0 to mA - 1 do
-                 c <- combineHash c (comp.GetHashCode a.[i])
-             c)
-          
-        let hashRV (comp:IEqualityComparer) (a:RowVector<_>) = 
-            let mA = a.NumCols 
-            hash mA +
-            (let mutable c = 0 
-             for i = 0 to mA - 1 do
-                 c <- combineHash c (comp.GetHashCode a.[i])
-             c)
-          
-        type range = int * int
-
-        let startR ((a,b) : range)   = a
-        let countR ((a,b) : range)   = (b-a)+1
-        let idxR    ((a,b) : range) i = a+i
-        let inR    ((a,b) : range) i = a <= i && i <= b
-        
-        let getRowM  (a:Matrix<_>) i = createRVx (opsM a) a.NumCols (fun j -> a.[i,j])
-        let selColM  (a:Matrix<_>) j = createVx (opsM a) a.NumRows (fun i -> a.[i,j]) 
-        let getRegionV  (a:Vector<_>)    r      = createVx a.OpsData (countR r) (fun i -> a.[idxR r i]) 
-        let getRegionRV (a:RowVector<_>) r      = createRVx a.OpsData (countR r) (fun i -> a.[idxR r i]) 
-
-        let getRegionM  a ri rj    = 
-            match a with 
-            | DenseRepr a -> createMx a.OpsData (countR ri) (countR rj) (fun i j -> a.[idxR ri i, idxR rj j]) 
-            | _ -> nonZeroEntriesM a 
-                   |> Seq.filter (fun (i,j,_) -> inR ri i && inR rj j) 
-                   |> Seq.map (fun (i,j,v) -> (i-startR ri,j-startR rj,v)) 
-                   |> initSparseM (countR ri) (countR rj)
-
-        let getColsM (a:Matrix<_>) rj         = getRegionM a (0,a.NumRows - 1) rj
-        let getRowsM (a:Matrix<_>) ri         = getRegionM a ri (0,a.NumCols - 1)
-
-        let rowvecM (x:RowVector<_>) = initM 1         x.NumCols (fun _ j -> x.[j]) 
-        let vectorM (x:Vector<_>) = initM x.NumRows  1         (fun i _ -> x.[i])  
-        let to_vectorM x = selColM x 0 
-        let to_rowvecM x = getRowM x 0 
-        let to_scalarM (x:Matrix<_>) = x.[0,0]
-
-
-
-//----------------------------------------------------------------------------
-// type Matrix<'T> augmentation
-//--------------------------------------------------------------------------*)
-
-    type Matrix<'T> with
-        static member ( +  )(a: Matrix<'T>,b) = SpecializedGenericImpl.addM a b
-        static member ( -  )(a: Matrix<'T>,b) = SpecializedGenericImpl.subM a b
-        []
-        static member ( *  )(a: Matrix<'T>,b) = SpecializedGenericImpl.mulM a b
-        []
-        static member ( *  )(a: Matrix<'T>,b : Vector<'T>) = SpecializedGenericImpl.mulMV a b
-
-        []
-        static member ( * )((m: Matrix<'T>),k : 'T) = SpecializedGenericImpl.scaleM k m
-
-        static member ( .* )(a: Matrix<'T>,b) = SpecializedGenericImpl.cptMulM a b
-        []
-        static member ( * )(k,m: Matrix<'T>) = SpecializedGenericImpl.scaleM k m
-        static member ( ~- )(m: Matrix<'T>)     = SpecializedGenericImpl.negM m
-        static member ( ~+ )(m: Matrix<'T>)     = m
-
-        member m.GetSlice (?start1,?finish1,?start2,?finish2) = 
-            let start1 = match start1 with None -> 0 | Some v -> v 
-            let finish1 = match finish1 with None -> m.NumRows - 1 | Some v -> v 
-            let start2 = match start2 with None -> 0 | Some v -> v 
-            let finish2 = match finish2 with None -> m.NumCols - 1 | Some v -> v 
-            SpecializedGenericImpl.getRegionM m (start1,finish1) (start2,finish2)
-
-        member m.SetSlice (?start1,?finish1,?start2,?finish2,vs:Matrix<_>) = 
-            let start1 = match start1 with None -> 0 | Some v -> v 
-            let finish1 = match finish1 with None -> m.NumRows - 1 | Some v -> v 
-            let start2 = match start2 with None -> 0 | Some v -> v 
-            let finish2 = match finish2 with None -> m.NumCols - 1 | Some v -> v 
-            for i = start1 to finish1  do 
-               for j = start2 to finish2 do
-                   m.[i,j] <- vs.[i-start1,j-start2]
-
-        override m.ToString() = 
-           match m with 
-           | DenseRepr m -> GenericImpl.showDenseMatrixGU m
-           | SparseRepr m -> ""
-
-        member m.DebugDisplay = 
-           let txt = 
-               match m with 
-               | DenseRepr m -> GenericImpl.debugShowDenseMatrixGU m
-               | SparseRepr m -> ""
-           new System.Text.StringBuilder(txt)  // return an object with a ToString with the right value, rather than a string. (strings get shown using quotes)
-
-        member m.StructuredDisplayAsArray =  
-            let rec layout m = 
-                match m with 
-                | DenseRepr dm -> box (Array2D.init m.NumRows m.NumCols (fun i j -> m.[i,j]))
-                | SparseRepr sm -> (if m.NumRows < 20 && m.NumCols < 20 then layout (SpecializedGenericImpl.to_denseM m) else box(SpecializedGenericImpl.nonZeroEntriesM m))
-            layout m
-        member m.Dimensions = m.NumRows,m.NumCols
-
-        member m.Transpose = SpecializedGenericImpl.transM m
-        member m.PermuteRows (p: permutation) : Matrix<'T> = SpecializedGenericImpl.permuteRows p m
-        member m.PermuteColumns (p: permutation) : Matrix<'T> = SpecializedGenericImpl.permuteColumns p m
-
-        interface IEnumerable<'T> with 
-            member m.GetEnumerator() = 
-               (seq { for i in 0 .. m.NumRows-1 do
-                        for j in 0 .. m.NumCols - 1 do 
-                            yield m.[i,j] }).GetEnumerator()
-
-        interface IEnumerable with 
-            member m.GetEnumerator() =  ((m :> IEnumerable<_>).GetEnumerator() :> IEnumerator)
-                                    
-        interface System.IComparable with 
-             member m.CompareTo(yobj:obj) = SpecializedGenericImpl.compareM (LanguagePrimitives.FSharpComparer()) m (yobj :?> Matrix<'T>)
-             
-        interface IStructuralComparable with
-            member m.CompareTo(yobj:obj,comp:System.Collections.IComparer) = SpecializedGenericImpl.compareM comp m (yobj :?> Matrix<'T>)
-            
-        override m.GetHashCode() = SpecializedGenericImpl.hashM (LanguagePrimitives.FSharpEqualityComparer()) m 
-        override m.Equals(yobj:obj) = 
-            match yobj with 
-            | :? Matrix<'T> as m2 -> SpecializedGenericImpl.equalsM (LanguagePrimitives.FSharpEqualityComparer()) m m2
-            | _ -> false
-        
-        interface IStructuralEquatable with
-            member m.GetHashCode(comp:System.Collections.IEqualityComparer) = SpecializedGenericImpl.hashM comp m
-            member m.Equals(yobj:obj,comp:System.Collections.IEqualityComparer) = 
-                match yobj with 
-                | :? Matrix<'T> as m2 -> SpecializedGenericImpl.equalsM comp m m2
-                | _ -> false
-
-
-//----------------------------------------------------------------------------
-// type Vector<'T> augmentation
-//--------------------------------------------------------------------------*)
-
-    type Vector<'T> with
-        static member ( +  )(a: Vector<'T>,b) = SpecializedGenericImpl.addV a b
-        static member ( -  )(a: Vector<'T>,b) = SpecializedGenericImpl.subV a b
-        static member ( .* )(a: Vector<'T>,b) = SpecializedGenericImpl.cptMulV a b
-        
-        []
-        static member ( * )(k,m: Vector<'T>) = SpecializedGenericImpl.scaleV k m
-        
-        []
-        static member ( * )(a: Vector<'T>,b) = SpecializedGenericImpl.mulVRV a b
-        
-        []
-        static member ( * )(m: Vector<'T>,k) = SpecializedGenericImpl.scaleV k m
-        
-        static member ( ~- )(m: Vector<'T>)     = SpecializedGenericImpl.negV m
-        static member ( ~+ )(m: Vector<'T>)     = m
-
-        member m.GetSlice (?start,?finish) = 
-            let start = match start with None -> 0 | Some v -> v 
-            let finish = match finish with None -> m.NumRows - 1 | Some v -> v 
-            SpecializedGenericImpl.getRegionV m (start,finish)
-
-        member m.SetSlice (?start,?finish,vs:Vector<_>) = 
-            let start = match start with None -> 0 | Some v -> v 
-            let finish = match finish with None -> m.NumRows - 1 | Some v -> v 
-            for i = start to finish  do 
-                   m.[i] <- vs.[i-start]
-
-
-        override m.ToString() = GenericImpl.showVecGU "vector" m
-
-        member m.DebugDisplay = 
-            let txt = GenericImpl.showVecGU "vector" m
-            new System.Text.StringBuilder(txt)  // return an object with a ToString with the right value, rather than a string. (strings get shown using quotes)
-
-        member m.StructuredDisplayAsArray =  Array.init m.NumRows (fun i -> m.[i])
-
-        member m.Details = m.Values
-
-        member m.Transpose = SpecializedGenericImpl.transV m
-        
-        member m.Permute (p:permutation) = SpecializedGenericImpl.permuteV p m
-      
-        interface System.IComparable with 
-             member m.CompareTo(y:obj) = SpecializedGenericImpl.compareV (LanguagePrimitives.FSharpComparer()) m (y :?> Vector<'T>)
-        
-        interface IStructuralComparable with
-            member m.CompareTo(y:obj,comp:System.Collections.IComparer) = SpecializedGenericImpl.compareV comp m (y :?> Vector<'T>)
-
-        interface IStructuralEquatable with
-            member x.GetHashCode(comp) = SpecializedGenericImpl.hashV comp x
-            member x.Equals(yobj,comp) = 
-                match yobj with 
-                | :? Vector<'T> as v2 -> SpecializedGenericImpl.equalsV comp x v2
-                | _ -> false
-
-        override x.GetHashCode() = 
-            SpecializedGenericImpl.hashV (LanguagePrimitives.FSharpEqualityComparer()) x
-
-        override x.Equals(yobj) = 
-            match yobj with 
-            | :? Vector<'T> as v2 -> SpecializedGenericImpl.equalsV (LanguagePrimitives.FSharpEqualityComparer()) x v2
-            | _ -> false
-
-//----------------------------------------------------------------------------
-// type RowVector<'T> augmentation
-//--------------------------------------------------------------------------*)
-
-    type RowVector<'T> with
-        static member ( +  )(a: RowVector<'T>,b) = SpecializedGenericImpl.addRV a b
-        static member ( -  )(a: RowVector<'T>,b) = SpecializedGenericImpl.subRV a b
-        static member ( .* )(a: RowVector<'T>,b) = SpecializedGenericImpl.cptMulRV a b
-        []
-        static member ( * )(k,v: RowVector<'T>) = SpecializedGenericImpl.scaleRV k v
-        
-        []
-        static member ( * )(a: RowVector<'T>,b: Matrix<'T>) = SpecializedGenericImpl.mulRVM a b
-        []
-        static member ( * )(a: RowVector<'T>,b:Vector<'T>) = SpecializedGenericImpl.mulRVV a b
-        []
-        static member ( * )(v: RowVector<'T>,k:'T) = SpecializedGenericImpl.scaleRV k v
-        
-        static member ( ~- )(v: RowVector<'T>)     = SpecializedGenericImpl.negRV v
-        static member ( ~+ )(v: RowVector<'T>)     = v
-
-        member m.GetSlice (?start,?finish) = 
-            let start = match start with None -> 0 | Some v -> v
-            let finish = match finish with None -> m.NumCols - 1 | Some v -> v 
-            SpecializedGenericImpl.getRegionRV m (start,finish)
-
-        member m.SetSlice (?start,?finish,vs:RowVector<_>) = 
-            let start = match start with None -> 0 | Some v -> v 
-            let finish = match finish with None -> m.NumCols - 1 | Some v -> v 
-            for i = start to finish  do 
-                   m.[i] <- vs.[i-start]
-
-        override m.ToString() = GenericImpl.showRowVecGU "rowvec" m
-
-        member m.DebugDisplay = 
-            let txt = GenericImpl.showRowVecGU "rowvec" m
-            new System.Text.StringBuilder(txt)  // return an object with a ToString with the right value, rather than a string. (strings get shown using quotes)
-
-        member m.StructuredDisplayAsArray =  Array.init m.NumCols (fun i -> m.[i])
-
-        member m.Details = m.Values
-
-        member m.Transpose = SpecializedGenericImpl.transRV m
-        
-        member m.Permute (p:permutation) = SpecializedGenericImpl.permuteRV p m
-      
-        interface System.IComparable with 
-            member m.CompareTo(y) = SpecializedGenericImpl.compareRV (LanguagePrimitives.FSharpComparer()) m (y :?> RowVector<'T>)
-        
-        interface IStructuralComparable with
-            member m.CompareTo(y,comp) = SpecializedGenericImpl.compareRV comp m (y :?> RowVector<'T>)
-
-        interface IStructuralEquatable with
-            member x.GetHashCode(comp) = SpecializedGenericImpl.hashRV comp x
-            member x.Equals(yobj,comp) = 
-                match yobj with 
-                | :? RowVector<'T> as rv2 -> SpecializedGenericImpl.equalsRV comp x rv2
-                | _ -> false
-
-        override x.GetHashCode() = 
-            SpecializedGenericImpl.hashRV (LanguagePrimitives.FSharpEqualityComparer()) x
-
-        override x.Equals(yobj) = 
-            match yobj with 
-            | :? RowVector<'T> as rv2 -> SpecializedGenericImpl.equalsRV (LanguagePrimitives.FSharpEqualityComparer()) x rv2
-            | _ -> false
-
-    type matrix = Matrix
-    type vector = Vector
-    type rowvec = RowVector
-
-    module MRandom = 
-        let seed = 99
-        let randomGen = new System.Random(seed)
-        let float f = randomGen.NextDouble() * f 
-
-
-    []
-    module Matrix = begin
-        
-        module Generic = begin
-
-            module MS = SpecializedGenericImpl
-
-            // Accessors
-            let get (a:Matrix<_>) i j   = a.[i,j]
-            let set (a:Matrix<_>) i j x = a.[i,j] <- x
-            
-            // Creation
-            let of_list    xss      = MS.listM  xss
-            let of_seq     xss      = MS.seqM  xss
-            let init  m n f       = MS.initM  m n f
-            let of_array2 arr       = MS.arrayM arr
-            let to_array2 (m:Matrix<_>) = Array2D.init m.NumRows m.NumCols (fun i j -> get m i j)
-            let initNumeric m n f = MS.initNumericM m n f
-            let inplace_assign f a          = MS.inplace_assignM  f a
-            let zero m n            = MS.zeroM m n
-            let identity m            = MS.identityM m
-            let create  m n x     = MS.constM m n x
-            let of_scalar   x       = MS.scalarM x
-            let diag v              = MS.diagM v
-            let initDiagonal v              = MS.diagM v
-            let init_diagonal v              = initDiagonal v
-            let constDiag   n x     = MS.constDiagM n x
-          
-            // Operators
-            let add a b = MS.addM a b
-            let sub a b = MS.subM a b
-            let mul a b = MS.mulM a b
-            let mulRV a b = MS.mulRVM a b
-            let mulV a b = MS.mulMV a b
-            let cptMul a b = MS.cptMulM a b
-            let cptMax a b = MS.cptMaxM a b
-            let cptMin a b = MS.cptMinM a b
-            let scale a b = MS.scaleM a b
-            let dot a b = MS.dotM a b
-            let neg a = MS.negM a 
-            let trace a = MS.traceM a
-            let sum a = MS.sumM a
-            let prod a = MS.prodM a
-            let norm a = MS.normM a
-            let transpose a = MS.transM a
-            let inplace_add a b = MS.inplaceAddM a b
-            let inplace_sub a b = MS.inplaceSubM a b
-            let inplace_cptMul a b = MS.inplaceCptMulM a b
-            let inplace_scale a b = MS.inplaceScaleM a b
-            let exists  f a = MS.existsM  f a
-            let forall  f a = MS.forallM  f a
-            let existsi  f a = MS.existsiM  f a
-            let foralli  f a = MS.foralliM  f a
-            let map  f a = MS.mapM f a
-            let copy a = MS.copyM a
-            let mapi  f a = MS.mapiM f a
-            let getDiagN  a n = MS.getDiagnM a n
-            let getDiag  a = MS.getDiagnM a 0
-            let to_dense a = MS.to_denseM a 
-            let initDense i j a = MS.initDenseM i j a 
-            let initSparse i j a = MS.initSparseM i j a 
-            let init_dense i j a = initDense i j a
-            let init_sparse i j a = initSparse i j a
-            let nonzero_entries a = MS.nonZeroEntriesM a 
-            let inplace_mapi  f a = MS.inplace_mapiM f a
-            let fold  f z a = MS.foldM f z a
-            let foldi  f z a = MS.foldiM f z a
-          
-            let compare a b = MS.compareM (LanguagePrimitives.FSharpComparer()) a b
-            let hash a = MS.hashM (LanguagePrimitives.FSharpEqualityComparer()) a
-            let getRow  a i          = MS.getRowM a i
-            let getCol  a j          = MS.selColM a j
-            let getCols a i1 i2         = MS.getColsM a (i1,i1+i2-1)
-            let getRows a j1 j2         = MS.getRowsM a (j1,j1+j2-1)
-            let getRegion  a i1 j1 i2 j2      = MS.getRegionM a (i1,i1+i2-1) (j1,j1+j2-1)
-            
-            let of_rowvec x = MS.rowvecM x
-            let of_vector x = MS.vectorM x
-            let to_vector x = MS.to_vectorM x
-            let to_rowvec x = MS.to_rowvecM x
-            let to_scalar x = MS.to_scalarM x
-         
-        end
-
-        module MG = Generic
-        module DS = DoubleImpl
-        module GU = GenericImpl
-        module MS = SpecializedGenericImpl
-
-        // Element type OpsData
-        type elem = float
-
-        // Accessors
-        let get (a:matrix) i j   = MG.get a i j
-        let set (a:matrix) i j x = MG.set a i j x
-        
-        // Creation
-        let init  m n f = DS.initDenseMatrixDS  m n f |> MS.dense 
-        let of_list    xss   = DS.listDenseMatrixDS    xss |> MS.dense
-        let of_seq     xss   = DS.seqDenseMatrixDS    xss |> MS.dense
-        let diag  (v:vector)   = MG.diag v 
-        let initDiagonal  (v:vector)   = MG.diag v 
-        let init_diagonal v   = initDiagonal   v
-        let constDiag  n x : matrix  = MG.constDiag n x 
-        let create  m n x  = DS.constDenseMatrixDS  m n x |> MS.dense
-        let of_scalar x     = DS.scalarDenseMatrixDS x |> MS.dense
-
-        let of_array2 arr : matrix = MG.of_array2 arr
-        let to_array2 (m : matrix) = MG.to_array2 m
-
-        let getDiagN  (a:matrix) n = MG.getDiagN a n
-        let getDiag  (a:matrix) = MG.getDiag a
-
-        // Operators
-        let add (a:matrix) (b:matrix) = MS.addM   a b
-        let sub (a:matrix) (b:matrix) = MS.subM   a b
-        let mul (a:matrix) (b:matrix) = MS.mulM   a b
-        let mulV (a:matrix) (b:vector) = MS.mulMV   a b
-        let mulRV (a:rowvec) (b:matrix) = MS.mulRVM   a b
-        let cptMul (a:matrix) (b:matrix) = MS.cptMulM   a b
-        let cptMax (a:matrix) (b:matrix) = MS.cptMaxM a b
-        let cptMin (a:matrix) (b:matrix) = MS.cptMinM a b
-        let scale a (b:matrix) = MS.scaleM   a b
-        let neg (a:matrix)  = MS.negM a
-        let trace (a:matrix)  = MS.traceM a
-        let transpose  (a:matrix) = MG.transpose a
-        let forall f (a:matrix) = MG.forall f a
-        let exists  f (a:matrix) = MG.exists f a
-        let foralli f (a:matrix) = MG.foralli f a
-        let existsi  f (a:matrix) = MG.existsi f a
-        let map  f (a:matrix) = MG.map f a
-        let copy  (a:matrix) = MG.copy a
-        let mapi  f (a:matrix) : matrix = MG.mapi f a
-        let fold  f z (a:matrix) = MG.fold f z a
-        let foldi  f z (a:matrix) = MG.foldi f z a
-
-        let to_dense (a:matrix) = MG.to_dense a 
-        let initDense i j a : matrix = MG.initDense i j a 
-        let initSparse i j a : matrix = MG.initSparse i j a 
-        let init_dense i j a = initDense i j a
-        let init_sparse i j a = initSparse i j a
-        let nonzero_entries (a:matrix) = MG.nonzero_entries a 
-
-        let zero m n  = DS.zeroDenseMatrixDS m n |> MS.dense
-        let identity m  : matrix = MG.identity m 
-        
-        let ones m n  = create m n 1.0
-        
-        let getRow (a:matrix) i      = MG.getRow a i
-        let getCol (a:matrix) j      = MG.getCol a j
-        let getCols (a:matrix) i1 i2    = MG.getCols a i1 i2
-        let getRows (a:matrix) j1 j2    = MG.getRows a j1 j2
-        let getRegion (a:matrix) i1 j1 i2 j2    = MG.getRegion a i1 j1 i2 j2
-
-        let rowRange (a:Matrix<_>) = (0,a.NumRows - 1)
-        let colRange (a:Matrix<_>) = (0,a.NumCols - 1)
-        let wholeRegion a = (colRange a, rowRange a)
-        
-        let foldByRow f (z:Vector<'T>) (a:matrix) = 
-          colRange a |> GU.foldR (fun z j -> MS.mapiV (fun i z -> f z (get a i j)) z) z
-        let foldByCol f (z:RowVector<'T>) (a:matrix) = 
-          rowRange a |> GU.foldR (fun z i -> MS.mapiRV (fun j z -> f z (get a i j)) z) z
-
-        let foldRow f (z:'T) (a:matrix) i = 
-          colRange a |> GU.foldR (fun (z:'T) j -> f z (get a i j)) z
-        let foldCol f (z:'T) (a:matrix) j = 
-          rowRange a |> GU.foldR (fun (z:'T) i -> f z (get a i j)) z
-
-        let sum (a:matrix)  = MS.sumM a
-        let prod (a:matrix)  = MS.prodM a
-        let norm  (a:matrix) = MS.normM  a
-        let dot (a:matrix) b = MS.dotM a b
-
-        let cptPow  a y = map (fun x -> x ** y) a
-        
-        // Functions that only make sense on this type
-        let randomize v = map (fun vij -> MRandom.float vij) v      (* res_ij = random [0,vij] values *)
-
-        let of_rowvec x : matrix = MS.rowvecM x
-        let of_vector x : matrix = MS.vectorM x
-        let to_vector x : vector = MS.to_vectorM x
-        let to_rowvec x : rowvec = MS.to_rowvecM x
-        let to_scalar x : float = MS.to_scalarM x
-
-        // Mutation
-        let inplace_assign  f (a:matrix) = MG.inplace_assign f a
-        let inplace_mapi  f (a:matrix) = MG.inplace_mapi f a
-        let inplace_add  (a:matrix) b = MS.inplaceAddM a b
-        let inplace_sub  (a:matrix) b = MS.inplaceSubM a b
-        let inplace_cptMul (a:matrix) b = MS.inplaceCptMulM a b
-        let inplace_scale  a (b:matrix) = MS.inplaceScaleM a b
-
-    end
-
-
-//----------------------------------------------------------------------------
-// module Vector
-//--------------------------------------------------------------------------*)
-      
-    []
-    module Vector = 
-
-        module Generic = 
-
-          module OpsS = SpecializedGenericImpl
-
-          let get (a:Vector<_>) i   = a.[i]
-          let set (a:Vector<_>) i x = a.[i] <- x
-          let length (v:Vector<_>) = v.Length
-          let of_list    xss   = OpsS.listV xss
-          let of_seq    xss   = OpsS.seqV xss
-          let init  m   f = OpsS.initV m f
-          let initNumeric  m   f = OpsS.createNumericV m f
-          let of_array arr       = OpsS.arrayV arr
-          let to_array (v:Vector<_>) = Array.init v.Length (get v)
-
-          let create  m x   = OpsS.constV m x
-          let zero n = OpsS.zeroV n
-          let ones n = OpsS.createNumericV n (fun ops i -> ops.One)
-          let of_scalar   x = OpsS.scalarV x
-          let add a b = OpsS.addV a b
-          let sub a b = OpsS.subV a b
-          let mulRVV a b = OpsS.mulRVV a b
-          let mulVRV a b = OpsS.mulVRV a b
-          let cptMul a b = OpsS.cptMulV a b
-          let cptMax a b = OpsS.cptMaxV a b
-          let cptMin a b = OpsS.cptMinV a b
-          let scale a b = OpsS.scaleV a b
-          let dot a b = OpsS.dotV a b
-          let neg a = OpsS.negV a 
-          let transpose a = OpsS.transV a 
-          let inplace_add a b = OpsS.inplaceAddV a b
-          let inplace_sub a b = OpsS.inplaceSubV a b
-          let inplace_cptMul a b = OpsS.inplaceCptMulV a b
-          let inplace_scale a b = OpsS.inplaceScaleV a b
-          let exists  f a = OpsS.existsV  f a
-          let forall  f a = OpsS.forallV  f a
-          let existsi  f a = OpsS.existsiV  f a
-          let foralli  f a = OpsS.foralliV  f a
-          let map  f a = OpsS.mapV f a
-          let mapi f a = OpsS.mapiV f a
-          let copy a = OpsS.copyV a
-          let inplace_mapi  f a = OpsS.inplace_mapiV f a
-          let fold  f z a = OpsS.foldV f z a
-          let foldi  f z a = OpsS.foldiV f z a
-          let compare a b = OpsS.compareV a b
-          let hash a = OpsS.hashV a
-          let inplace_assign  f a = OpsS.assignV f a
-          let sum  (a:Vector<_>) = let ops = a.ElementOps in fold (fun x y -> ops.Add(x,y)) ops.Zero a
-          let prod (a:Vector<_>) = let ops = a.ElementOps in fold (fun x y -> ops.Multiply(x,y)) ops.One a
-          let norm (a:Vector<_>) = 
-              let normOps = GenericImpl.getNormOps a.ElementOps 
-              sqrt (fold (fun x y -> x + normOps.Norm(y)**2.0) 0.0 a)
-
-        module VG = Generic
-        module VecDS = DoubleImpl
-        module VecGU = GenericImpl
-
-        let get (a:vector) j   = VG.get a j 
-        let set (a:vector) j x = VG.set a j x
-        let length (a:vector)     = VG.length a
-        let nrows (a:vector)   = VG.length a
-        let init  m   f = VecDS.createVecDS  m   f
-        let of_array arr : vector = VG.of_array arr
-        let to_array (m : vector) = VG.to_array m
-
-        type range = int * int
-        let countR ((a,b) : range)   = (b-a)+1
-        let idxR    ((a,b) : range) i = a+i
-        type rangef = float * float * float // start, skip, end
-        let countRF ((a,d,b) : rangef)   = System.Convert.ToInt32((b-a)/d) + 1
-        //let countRF ((a,d,b) : rangef)   = Float.to_int((b-a)/d) + 1
-        let idxRF  ((a,d,b) : rangef) i = System.Math.Min (a + d * float(i),b)
-
-        let range n1 n2    = let r = (n1,n2)   in init (countR  r) (fun i -> float(idxR r i)) 
-
-        let rangef a b c  = let r = (a,b,c) in init (countRF r) (fun i -> idxRF r i)
-
-        let of_list    xs    = VecDS.listVecDS    xs
-        let of_seq    xs    = VecDS.seqVecDS    xs
-        let create  m   x  = VecDS.constVecDS  m   x
-        let of_scalar x     = VecDS.scalarVecDS x
-        let add a b = VecDS.addVecDS   a b
-        let sub a b = VecDS.subVecDS   a b
-        let mulRVV a b = VecDS.mulRowVecVecDS   a b
-        let mulVRV a b = VecDS.mulVecRowVecDS   a b 
-        let cptMul a b = VecDS.cptMulVecDS   a b
-        let cptMax a b = VecDS.cptMaxVecDS a b
-        let cptMin a b = VecDS.cptMinVecDS a b
-        let scale a b = VecDS.scaleVecDS   a b
-        let neg a  = VecDS.negVecDS a
-        let dot a b = VecDS.dotVecDS a b
-        let transpose  (a:vector) = VG.transpose a
-        let exists  f (a:vector) = VG.exists f a
-        let forall  f (a:vector) = VG.forall f a
-        let existsi  f (a:vector) = VG.existsi f a
-        let foralli  f (a:vector) = VG.foralli f a
-        let map  f (a:vector) = VG.map f a
-        let copy (a:vector) = VG.copy a
-        let mapi  f (a:vector) : vector = VG.mapi f a
-        let fold  f z (a:vector) = VG.fold f z a
-        let foldi  f z (a:vector) = VG.foldi f z a
-        let zero n = create n 0.0
-        let ones n = create n 1.0
-        let sum a  = VecDS.sumVecDS a
-        let prod a   = fold      (fun x y -> x * y) 1.0 a
-        let norm  (a:vector) = sqrt (fold (fun x y -> x + y * y) 0.0 a) (* fixed *)
-        let cptPow  a y = map  (fun x -> x ** y) a
-        let inplace_assign  f (a:vector) = VG.inplace_assign f a
-        let inplace_mapi f (a:vector) = VG.inplace_mapi f a
-        let inplace_add a b = VecDS.inplaceAddVecDS a b
-        let inplace_sub a b = VecDS.inplaceSubVecDS a b
-        let inplace_cptMul a b = VecDS.inplaceCptMulVecDS a b
-        let inplace_scale a b = VecDS.inplaceScaleVecDS a b  
-
-
-//----------------------------------------------------------------------------
-// module RowVector
-//--------------------------------------------------------------------------*)
-
-    []
-    module RowVector = 
-
-        module Generic = 
-
-            module OpsS = SpecializedGenericImpl
-
-            let get (a:RowVector<_>) i          = a.[i]
-            let set (a:RowVector<_>) i x        = a.[i] <- x
-            let zero n           = OpsS.zeroRV n
-            let length (v:RowVector<_>) = v.Length
-            let init m   f       = OpsS.initRV m   f
-            let create  m x      = OpsS.constRV m x
-            let transpose a      = OpsS.transRV a
-            let copy a           = OpsS.copyRV a
-            let of_list a        = OpsS.listRV a
-            let of_array a        = OpsS.arrayRV a
-            let of_seq a         = OpsS.seqRV a
-
-            let to_array m         = Array.init (length m) (get m)
-
-        module RVG = Generic
-
-        let get (a:rowvec) i   = RVG.get a i 
-        let set (a:rowvec) i x = RVG.set a i x
-        let length (a:rowvec)  = RVG.length a
-        let ncols (a:rowvec)   = RVG.length a
-        let of_array arr : rowvec = RVG.of_array arr
-        let to_array (m : rowvec) = RVG.to_array m
-        
-        let init m   f : rowvec      = RVG.init m   f
-        let create m   f : rowvec    = RVG.create m   f
-        let zero n = create n 0.0
-        let of_list x : rowvec       = RVG.of_list x
-        let of_seq x : rowvec       = RVG.of_seq x
-        let transpose x : vector     = RVG.transpose x
-        let copy x : rowvec          = RVG.copy x
-
-
-    type Matrix<'T> with 
-        member x.ToArray2()        = Matrix.Generic.to_array2 x
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-
-        member x.NonZeroEntries    = Matrix.Generic.nonzero_entries x
-        member x.ToScalar()        = Matrix.Generic.to_scalar x
-        member x.ToRowVector()     = Matrix.Generic.to_rowvec x               
-        member x.ToVector()        = Matrix.Generic.to_vector x
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-        member x.Norm              = Matrix.Generic.norm x
-
-        member x.Column(n)         = Matrix.Generic.getCol x n
-        member x.Row(n)            = Matrix.Generic.getRow x n
-        member x.Columns (i,ni)    = Matrix.Generic.getCols x i ni
-        member x.Rows (j,nj)       = Matrix.Generic.getRows x j nj
-        member x.Region(i,j,ni,nj) = Matrix.Generic.getRegion x i j ni nj
-        member x.GetDiagonal(i)    = Matrix.Generic.getDiagN x i
-
-#if FX_NO_DEBUG_DISPLAYS
-#else
-        []
-#endif
-        member x.Diagonal          = Matrix.Generic.getDiag x
-
-
-
-        member x.Copy () = Matrix.Generic.copy x
-
-
-    type Vector<'T> with 
-        member x.ToArray() = Vector.Generic.to_array x
-        member x.Norm      = Vector.Generic.norm x
-        member x.Copy ()   = Vector.Generic.copy x
-
-
-    type RowVector<'T> with 
-        member x.ToArray() = RowVector.Generic.to_array x
-        member x.Copy ()   = RowVector.Generic.copy x
-
-
-namespace Microsoft.FSharp.Core
-
-    /// The type of floating-point matrices.  See Microsoft.FSharp.Math
-    type matrix = Microsoft.FSharp.Math.matrix
-    /// The type of floating-point vectors.  See Microsoft.FSharp.Math
-    type vector = Microsoft.FSharp.Math.vector
-    /// The type of floating-point row vectors.  See Microsoft.FSharp.Math
-    type rowvec = Microsoft.FSharp.Math.rowvec
-
-    []
-    module MatrixCommonExtensions = 
-
-        let matrix ll = Microsoft.FSharp.Math.Matrix.of_seq ll
-        let vector l  = Microsoft.FSharp.Math.Vector.of_seq  l
-        let rowvec l  = Microsoft.FSharp.Math.RowVector.of_seq l
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/matrix.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/matrix.fsi
deleted file mode 100644
index de00734b..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/matrix.fsi
+++ /dev/null
@@ -1,970 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.Math
-
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Math
-open System
-
-/// The type of matrices. The arithmetic operations on the element type are determined by inspection on the element type itself.
-/// Two representations are supported: sparse and dense. 
-[]
-type Matrix<'T> = 
-
-    /// Get the number of rows in the matrix
-    member NumRows : int
-
-    /// Get the number of columns in the matrix
-    member NumCols : int
-
-    /// Get the number of (rows,columns) in the matrix
-    member Dimensions : int * int
-
-    /// Get the item at the given position in the matrix
-    member Item : int * int -> 'T with get,set
-
-    /// Supports the slicing syntax 'A.[idx1..idx2,idx1..idx2]'
-    member GetSlice : start1:int option * finish1:int option * start2:int option * finish2:int option -> Matrix<'T>
-
-    /// Supports the slicing syntax 'A.[idx1..idx2,idx1..idx2] <- B'
-    member SetSlice : start1:int option * finish1:int option * start2:int option * finish2:int option * Matrix<'T> -> unit
-    
-    /// Retrieve the dictionary of numeric operations associated with the element
-    /// type of this matrix.  Accessing the property may raise an NotSupportedException if the element
-    /// type doesn't support any numeric operations.  The object returned
-    /// may support additional numeric operations such as IFractional: 
-    /// this can be determined by a dynamic type test against the object
-    /// returned.
-    member ElementOps : INumeric<'T>
-
-    /// Point-wise addition of two matrices.  An InvalidArgument exception will be
-    /// raised if the dimensions do not match.
-    static member ( +  ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
-
-    /// Point-wise subtraction of two matrices. An InvalidArgument exception will be
-    /// raised if the dimensions do not match.
-    static member ( -  ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
-
-    /// Matrix negation.   
-    static member ( ~- ) : Matrix<'T>              -> Matrix<'T>
-
-    /// Prefix '+' operator. A nop.
-    static member ( ~+ ) : Matrix<'T>              -> Matrix<'T>
-
-    /// Matrix multiplication.   An InvalidArgument exception will be
-    /// raised if the dimensions do not match.
-    []
-    static member ( * ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
-
-    /// Matrix-vector multiplication.   
-    []
-    static member ( * ) : Matrix<'T> * Vector<'T> -> Vector<'T>
-
-    /// Multiply each element of a matrix by the given scalar value
-    []
-    static member ( * ) : Matrix<'T> * 'T          -> Matrix<'T>
-
-    /// Pointwise matrix multiplication.   An InvalidArgument exception will be
-    /// raised if the dimensions do not match.
-    static member ( .* ) : Matrix<'T> * Matrix<'T>  -> Matrix<'T>
-
-    /// Multiply each element of a matrix by the given scalar value
-    []
-    static member ( * ) : 'T          * Matrix<'T> -> Matrix<'T>
-    
-    /// Get the transpose of the matrix.
-    member Transpose : Matrix<'T>
-    
-    /// Permutes the rows of the matrix.
-    member PermuteRows : permutation:(int -> int) -> Matrix<'T>
-    
-    /// Permutes the columns of the matrix.
-    member PermuteColumns : permutation:(int -> int) -> Matrix<'T>
-
-
-    //interface IMatrix<'T>
-    interface System.IComparable
-    interface IStructuralComparable
-    interface IStructuralEquatable
-    interface System.Collections.Generic.IEnumerable<'T>
-    override GetHashCode : unit -> int
-    override Equals : obj -> bool
-  
-    /// Return a new array containing the elements of the given matrix
-    member ToArray2 : unit -> 'T[,]  
-    /// Return the non-zero entries of a sparse or dense matrix
-    member NonZeroEntries: seq 
-    /// Convert the matrix to a row vector
-    member ToRowVector : unit -> RowVector<'T>                 
-    /// Convert the matrix to a column vector
-    member ToVector : unit -> Vector<'T> 
-
-    /// Returns sqrt(sum(norm(x)*(norm(x))) of all the elements of a matrix.
-    /// The element type of the matrix must have an associated instance of INormFloat<'T> (see GlobalAssociations) ((else NotSupportedException)).
-    member Norm : float
-
-    /// Select a column from a matrix
-    member Column : index:int -> Vector<'T>
-    /// Select a row from a matrix
-    member Row :  index:int -> RowVector<'T>
-    /// Select a range of columns from a matrix
-    member Columns : start:int  * length:int -> Matrix<'T>
-    /// Select a range of rows from a matrix
-    member Rows : start:int * length:int -> Matrix<'T>
-    /// Select a region from a matrix
-    member Region : starti:int * startj:int * lengthi:int * lengthj:int -> Matrix<'T>
-
-
-    /// Return the nth diagonal of a matrix, as a vector.  Diagonal 0 is the primary
-    /// diagonal, positive diagonals are further to the upper-right of the matrix.
-    member GetDiagonal : int -> Vector<'T>
-
-    /// Get the main diagonal of a matrix, as a vector
-    member Diagonal : Vector<'T>
-
-    /// Create a new matrix that is a copy of the given array
-    member Copy : unit -> Matrix<'T>
-
-    /// Get the internal array of values for a dense matrix. This property 
-    /// should only be used when interoperating with other matrix libraries.
-    member InternalDenseValues : 'T[,]
-    /// Get the internal array of values for a sparse matrix. This property 
-    /// should only be used when interoperating with other matrix libraries.
-    member InternalSparseValues : 'T[]
-    /// Get the internal array of row offsets for a sparse matrix. This property 
-    /// should only be used when interoperating with other matrix libraries.
-    member InternalSparseRowOffsets : int[]
-    /// Get the internal array of column values for a sparse matrix. This property 
-    /// should only be used when interoperating with other matrix libraries.
-    member InternalSparseColumnValues : int[]
-
-    /// Indicates if the matrix uses the sparse representation.
-    member IsSparse : bool
-
-    /// Indicates if the matrix uses the dense representation.
-    member IsDense : bool
-
-/// The type of column vectors.  The arithmetic operations on the element type are determined by inspection 
-/// on the element type itself
-and 
-
-  []
-  Vector<'T> = 
-
-
-    /// Get the underlying internal array of values for the vector. This property 
-    /// should only be used when interoperating with other matrix libraries.
-    member InternalValues : 'T[]
-
-    /// Gets the number of entries in the vector
-    member Length : int
-    /// Gets the number of rows in the vector
-    member NumRows : int
-    /// Gets an item from the the vector
-    member Item : int -> 'T with get,set
-    /// Gets the element operations for the element type of the vector, if any
-    member ElementOps : INumeric<'T>
-    
-    /// Supports the slicing syntax 'v.[idx1..idx2]'
-    member GetSlice      : start:int option * finish:int option -> Vector<'T>
-
-    /// Supports the slicing syntax 'v.[idx1..idx2] <- v2'
-    member SetSlice      : start:int option * finish:int option * src:Vector<'T> -> unit
-
-    /// Add two vectors, pointwise
-    static member ( +  ) : Vector<'T>    * Vector<'T> -> Vector<'T>
-    /// Subtract two vectors, pointwise
-    static member ( -  ) : Vector<'T>    * Vector<'T> -> Vector<'T>
-    /// Negate a vector
-    static member ( ~- ) : Vector<'T>                  -> Vector<'T>
-    /// Return the input vector 
-    static member ( ~+ ) : Vector<'T>                  -> Vector<'T>
-
-    /// Pointwise multiplication of two vectors.
-    static member ( .* ) : Vector<'T>    * Vector<'T> -> Vector<'T>
-
-    /// Multiply each element of a vector by the given scalar value.
-    []
-    static member ( * ) : 'T             * Vector<'T> -> Vector<'T>
-
-    []
-    /// Multiply a column vector and a row vector to produce a matrix
-    static member ( * )   : Vector<'T>    * RowVector<'T> -> Matrix<'T>
-
-    []
-    /// Multiply a vector by a scalar
-    static member ( * )   : Vector<'T>    * 'T          -> Vector<'T>
-
-    /// Get the transpose of the vector.
-    member Transpose : RowVector<'T>
-    
-    /// Permute the elements of the vector.
-    member Permute : permutation:(int -> int) -> Vector<'T>    
-    
-    interface System.IComparable
-    interface IStructuralComparable
-    interface IStructuralEquatable
-    interface System.Collections.Generic.IEnumerable<'T>
-    override GetHashCode : unit -> int
-    override Equals : obj -> bool
-
-    /// Return a new array containing a copy of the elements of the given vector
-    member ToArray : unit    -> 'T[]
-
-    /// Computes the 2-norm of a vector: sqrt(x.Transpose*x).
-    member Norm : float
-
-    /// Create a new matrix that is a copy of the given array
-    member Copy : unit -> Vector<'T>
-
-
-
-
-
-/// The type of row vectors.  
-and []
-    RowVector<'T> =
-
-    /// Get the underlying internal array of values for the vector. This property 
-    /// should only be used when interoperating with other matrix libraries.
-    member InternalValues : 'T[]
-
-    // Basic access
-    member Length : int
-    member NumCols : int
-    member Item : int -> 'T with get,set
-    member ElementOps : INumeric<'T>
-
-    /// Supports the slicing syntax 'rv.[idx1..idx2]'
-    member GetSlice      : start:int option * finish:int option -> RowVector<'T>
-
-    /// Supports the slicing syntax 'rv.[idx1..idx2] <- rv2'
-    member SetSlice      : start:int option * finish:int option * src:RowVector<'T> -> unit
-
-
-    // Basic operators
-    static member ( +  )  : RowVector<'T>    * RowVector<'T> -> RowVector<'T>
-
-    static member ( -  )  : RowVector<'T>    * RowVector<'T> -> RowVector<'T>
-
-    static member ( ~- )  : RowVector<'T>                  -> RowVector<'T>
-
-    static member ( ~+ )  : RowVector<'T>                  -> RowVector<'T>
-
-    static member ( .* )  : RowVector<'T> * RowVector<'T>    -> RowVector<'T>
-    
-    []
-    static member ( * ) : RowVector<'T> * Vector<'T>    -> 'T
-
-    []
-    static member ( * )   : RowVector<'T> * Matrix<'T>    -> RowVector<'T>
-
-    []
-    static member ( * )   : RowVector<'T> * 'T            -> RowVector<'T>
-
-    []
-    static member ( * )  : 'T            * RowVector<'T>    -> RowVector<'T>
-
-    /// Get the transpose of the row vector.
-    member Transpose : Vector<'T>
-    
-    /// Permute the elements of the row vector.
-    member Permute : permutation:(int -> int) -> RowVector<'T>  
-
-    interface System.IComparable
-    interface IStructuralComparable
-    interface IStructuralEquatable
-    interface System.Collections.Generic.IEnumerable<'T>
-    override GetHashCode : unit -> int
-    override Equals : obj -> bool
-
-    /// Return a new array containing a copy of the elements of the given vector
-    member ToArray : unit    -> 'T[]
-
-
-    /// Create a new matrix that is a copy of the given array
-    member Copy : unit -> RowVector<'T>
-
-  
-/// The type of floating point matrices
-type matrix = Matrix
-/// The type of floating point column vectors
-type vector = Vector
-/// The type of floating point row vectors
-type rowvec = RowVector
-
-/// Operations to manipulate floating
-/// point matrices.  The submodule Matrix.Generic contains a 
-/// matching set of operations to manipulate matrix types carrying
-/// arbitrary element types.
-[]
-[]
-module Matrix =
-
-
-    /// Get an element of a matrix
-    val get : matrix -> int -> int -> float
-
-    /// Set an element of a matrix
-    val set : matrix -> int -> int -> float -> unit
-
-    // Creation: general
-    val init  : int -> int -> (int -> int -> float) -> matrix
-
-    /// Create a matrix with all entries the given constant
-    val create : int -> int -> float -> matrix
-    
-    /// Create a dense representation matrix with the given entries. 
-    val initDense : int -> int -> seq -> matrix
-
-    /// Create a sparse representation matrix with the given entries. Not all 
-    /// operations are available for sparse matrices, and mutation is not permitted.
-    /// If an operation on sparse matrices raises a runtime exception then consider 
-    /// converting to a dense matrix using to_dense.
-    val initSparse : int -> int -> seq -> matrix
-
-    // Create a sequence that iterates the non-zero entries in the martrix
-    []
-    val nonzero_entries : matrix -> seq 
-        
-    /// Create a matrix with all entries zero
-    val zero     : int -> int          -> matrix
-    
-    /// Create a square matrix with the constant 1.0 lying on diagonal
-    val identity      : int -> matrix
-
-    /// Create a square matrix with the given vector lying on diagonal
-    val initDiagonal : vector -> matrix
-    
-    val of_list   : float list list     -> matrix
-    val of_seq    : seq<#seq>   -> matrix
-    val of_array2 : float[,]            -> matrix
-    val to_array2 : matrix              -> float[,]
-    val of_scalar : float               -> matrix
-    val of_rowvec : rowvec              -> matrix
-    val of_vector : vector              -> matrix
-
-    val to_scalar : matrix              -> float                
-    val to_rowvec : matrix              -> rowvec                
-    val to_vector : matrix              -> vector
-    /// Ensure that a matrix uses dense representation.  See init_sparse
-    val to_dense  : matrix              -> matrix
-
-    ///Point-wise maximum element of two matrices
-    val cptMax    : matrix -> matrix -> matrix
-    
-    ///Point-wise minimum element of two matrices
-    val cptMin    : matrix -> matrix -> matrix
-    
-    ///Add two matrices (operator +)
-    val add       : matrix -> matrix -> matrix
-
-    []
-    val mul       : matrix -> matrix -> matrix
-
-    ///Dot product
-    val dot       : matrix -> matrix -> float
-
-    ///Pointwise exponential of a matrix.
-    val cptPow       : matrix -> float -> matrix
-
-    ///Transpose of a matrix.  Use also m.Transpose
-    val transpose     :           matrix -> matrix
-
-    /// Sum of the diagonal elements of the matrix
-    val trace     : matrix -> float
-    
-    ///Generate a new matrix of the same size as the input with random entries 
-    ///drawn from the range 0..aij.  Random numbers are generated using a globally 
-    ///shared System.Random instance with the initial seed 99.
-    val randomize : matrix -> matrix
-
-    ///Sum all the elements of a matrix
-    val sum       : matrix -> float
-
-    ///Multiply all the elements of the matrix
-    val prod      : matrix -> float
-
-    ///sqrt(sum(x*x)) of all the elements of a matrix
-    val norm      : matrix -> float
-
-    /// Check if a predicate holds for all elements of a matrix
-    val forall  : (float -> bool) -> matrix -> bool
-
-    /// Check if a predicate holds for at least one element of a matrix
-    val exists  : (float -> bool) -> matrix -> bool 
-
-    /// Check if a predicate holds for all elements of a matrix
-    val foralli  : (int -> int -> float -> bool) -> matrix -> bool
-
-    /// Check if a predicate holds for at least one element of a matrix
-    val existsi  : (int -> int -> float -> bool) -> matrix -> bool 
-
-    /// Fold the given function over all elements of a matrix
-    val fold      : ('T -> float -> 'T) -> 'T         -> matrix -> 'T
-
-    /// Fold the given function over all elements of a matrix
-    val foldi      : (int -> int -> 'T -> float -> 'T) -> 'T         -> matrix -> 'T
-
-    /// Fold the given function down each column of a matrix
-    val foldByCol : ('T -> float -> 'T) -> RowVector<'T> -> matrix -> RowVector<'T>
-
-    /// Fold the given function along each row of a matrix
-    val foldByRow : ('T -> float -> 'T) -> Vector<'T> -> matrix -> Vector<'T>
-
-    /// Fold the given function along a particular column of a matrix
-    val foldCol   : ('T -> float -> 'T) -> 'T         -> matrix -> int -> 'T 
-
-    /// Fold the given function down a particular row of a matrix
-    val foldRow   : ('T -> float -> 'T) -> 'T         -> matrix -> int -> 'T
-    
-    /// Map the given function over each element of the matrix, producing a new matrix
-    val map  : (float -> float) -> matrix -> matrix
-   
-    /// Map the given indexed function over each element of the matrix, producing a new matrix
-    val mapi  : (int -> int -> float -> float) -> matrix -> matrix
-   
-    /// Create a new matrix that is a copy of the given array
-    val copy : matrix -> matrix
-   
-    /// In-place addition mutates first matrix argument.
-    val inplace_add    : matrix -> matrix -> unit
-
-    /// In-place subtraction mutates first matrix argument. 
-    val inplace_sub    : matrix -> matrix -> unit
-
-    []
-    val init_diagonal : vector -> matrix
-    []
-    val constDiag : int -> float        -> matrix
-
-    []
-    val diag      : vector -> matrix
-    []
-    val init_dense : int -> int -> seq -> matrix
-    []
-    val init_sparse : int -> int -> seq -> matrix
-    []
-    val cptMul    : matrix -> matrix -> matrix
-    []
-    val mulV      : matrix -> vector -> vector
-    []
-    val mulRV     : rowvec -> matrix -> rowvec
-    []
-    val sub       : matrix -> matrix -> matrix
-    []
-    val neg       :           matrix -> matrix
-    []
-    val scale     : float  -> matrix -> matrix
-    []
-    val getCol  : matrix -> int -> vector
-    []
-    val getRow  : matrix -> int -> rowvec
-    []
-    val getCols : matrix -> start:int -> length:int -> matrix
-    []
-    val getRows : matrix -> start:int -> length:int -> matrix
-    []
-    val getRegion  : matrix -> starti:int -> startj:int -> lengthi:int -> lengthj:int -> matrix
-    []
-    val getDiagN : matrix -> int    -> vector
-    []
-    val getDiag  : matrix           -> vector
-    []
-    val inplace_assign       : (int -> int -> float) -> matrix -> unit
-    []
-    val inplace_mapi  : (int -> int -> float -> float) -> matrix -> unit
-    []
-    val inplace_cptMul : matrix -> matrix -> unit
-    []
-    val inplace_scale  : float -> matrix -> unit
-
-    /// Operations to manipulate matrix types carrying
-    /// arbitrary element types.  The names and types of the operations match those
-    /// in the containing module Math.Matrix.  
-    ///
-    /// The numeric operations on the element type (add, zero etc.) are inferred from the type
-    /// argument itself. That is, for some operations 
-    /// the element type of the matrix must have an associated instance of INumeric<'T> 
-    /// or some more specific numeric association (see GlobalAssociations) ((else NotSupportedException)).
-    []
-    module Generic =
-        // Accessors
-
-        /// Get an element from a matrix.  The indexes are given in row/column order.
-        val get   : Matrix<'T> -> int -> int -> 'T
-        /// Set an element in a matrix.  The indexes are given in row/column order.
-        val set   : Matrix<'T> -> int -> int -> 'T -> unit
-
-        /// Create a matrix from the given (usually constant) data  
-        val of_list      : 'T list list       -> Matrix<'T>
-        val of_seq       : seq<#seq<'T>>     -> Matrix<'T>
-
-        /// Create a matrix from the given (usually constant) data  
-        val of_array2    : 'T[,]              -> Matrix<'T>
-
-        /// Return a new array containing the elements of the given matrix
-        val to_array2 : Matrix<'T>         -> 'T[,]  
-
-        /// Create a matrix containing the given value at every element.
-        val create     : int -> int -> 'T   -> Matrix<'T>
-
-        val initDense : int -> int -> seq  -> Matrix<'T>
-
-        val initSparse : int -> int -> seq  -> Matrix<'T>
-
-        /// Create a 1x1 matrix containing the given value 
-        val of_scalar    : 'T                 -> Matrix<'T>
-
-        val of_rowvec  : RowVector<'T>     -> Matrix<'T>
-        val of_vector  : Vector<'T>        -> Matrix<'T>
-
-        val to_scalar : Matrix<'T>         -> 'T                
-        val to_rowvec : Matrix<'T>         -> RowVector<'T>                 
-        val to_vector : Matrix<'T>         -> Vector<'T> 
-
-        /// Create a matrix using the given function to compute the item at each index.
-        val init : int -> int -> (int -> int -> 'T) -> Matrix<'T>
-
-        /// Create a matrix using the given function to compute the item at each index.
-        /// The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)).
-        /// The function is passed the dictionary of associated operations in addition to the index pair.
-        val initNumeric  : int -> int -> (INumeric<'T> -> int -> int -> 'T)        -> Matrix<'T>
-
-        /// Create a matrix containing the zero element at each index.
-        /// The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)).
-        val zero      : int -> int         -> Matrix<'T>
-
-        /// Create a square matrix with the one for the element type lying on diagonal
-        /// The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)).
-        val identity      : int -> Matrix<'T>
-
-        /// Create a matrix containing the given vector along the diagonal.
-        /// The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)).
-        val initDiagonal : Vector<'T>        -> Matrix<'T>
-
-        ///Take the pointwise maximum of two matrices
-        val cptMax    : Matrix<'T> -> Matrix<'T> -> Matrix<'T>
-
-        ///Take the pointwise maximum of two matrices
-        val cptMin    : Matrix<'T> -> Matrix<'T> -> Matrix<'T>
-
-        /// Sum of the point-wise multiple of the two matrices.
-        /// The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)).
-        val dot       : Matrix<'T> -> Matrix<'T> -> 'T
-
-
-        /// Return a new matrix which is the transpose of the input matrix
-        val transpose : Matrix<'T> -> Matrix<'T>
-
-        val trace     : Matrix<'T> -> 'T
-        val sum       : Matrix<'T> -> 'T
-        val prod      : Matrix<'T> -> 'T
-        /// Returns sqrt(sum(norm(x)*(norm(x))) of all the elements of a matrix.
-        /// The element type of the matrix must have an associated instance of INormFloat<'T> (see GlobalAssociations) ((else NotSupportedException)).
-        val norm      : Matrix<'T> -> float
-
-        // Second-order query operators
-        val fold  : folder:('State -> 'T -> 'State) -> 'State -> Matrix<'T> -> 'State
-        val foldi  : (int -> int -> 'State -> 'T -> 'State) -> 'State -> Matrix<'T> -> 'State
-        val forall: ('T -> bool)           -> Matrix<'T> -> bool
-        val exists: ('T -> bool)           -> Matrix<'T> -> bool 
-        val foralli: (int -> int -> 'T -> bool)           -> Matrix<'T> -> bool
-        val existsi: (int -> int -> 'T -> bool)           -> Matrix<'T> -> bool 
-
-        /// Create a new matrix that is a copy of the given array
-        val copy : Matrix<'T> -> Matrix<'T>
-   
-        // Second-order constructors
-        val map   : ('T -> 'T) -> Matrix<'T> -> Matrix<'T>
-
-        val mapi  : (int -> int -> 'T -> 'T) -> Matrix<'T> -> Matrix<'T>
-
-        val inplace_add    : Matrix<'T> -> Matrix<'T> -> unit
-        val inplace_sub    : Matrix<'T> -> Matrix<'T> -> unit
-
-
-        []
-        val init_diagonal : Vector<'T>        -> Matrix<'T>
-        []
-        val init_dense : int -> int -> seq  -> Matrix<'T>
-        []
-        val init_sparse : int -> int -> seq  -> Matrix<'T>
-        []
-        val nonzero_entries : Matrix<'T> -> seq 
-        []
-        val constDiag : int -> 'T          -> Matrix<'T>
-        []
-        val add       : Matrix<'T> -> Matrix<'T> -> Matrix<'T>
-        []
-        val diag      : Vector<'T>        -> Matrix<'T>
-        []
-        val mul       : Matrix<'T> -> Matrix<'T> -> Matrix<'T>
-        []
-        val mulV      : Matrix<'T> -> Vector<'T> -> Vector<'T>
-        []
-        val mulRV     : RowVector<'T> -> Matrix<'T> -> RowVector<'T>
-        []
-        val cptMul    : Matrix<'T> -> Matrix<'T> -> Matrix<'T>
-        []
-        val sub       : Matrix<'T> -> Matrix<'T> -> Matrix<'T>
-        []
-        val neg       : Matrix<'T> -> Matrix<'T>
-        []
-        val scale     : 'T  -> Matrix<'T> -> Matrix<'T>
-        []
-        val getCol  : Matrix<'T> -> int -> Vector<'T>
-        []
-        val getRow  : Matrix<'T> -> int -> RowVector<'T>
-        []
-        val getCols : Matrix<'T> -> start:int -> length:int -> Matrix<'T>
-        []
-        val getRows : Matrix<'T> -> start:int -> length:int -> Matrix<'T>
-        []
-        val getRegion  : Matrix<'T> -> starti:int -> startj:int -> lengthi:int -> lengthj:int -> Matrix<'T>
-        []
-        val getDiagN : Matrix<'T> -> int    -> Vector<'T>
-        []
-        val getDiag  : Matrix<'T>           -> Vector<'T>
-        []
-        val compare  : Matrix<'T> -> Matrix<'T> -> int
-        []
-        val hash     : Matrix<'T> -> int
-        []
-        val inplace_assign       : (int -> int -> 'T) -> Matrix<'T> -> unit
-        []
-        val inplace_mapi  : (int -> int -> 'T -> 'T) -> Matrix<'T> -> unit
-        []
-        val inplace_cptMul : Matrix<'T> -> Matrix<'T> -> unit
-        []
-        val inplace_scale  : 'T -> Matrix<'T> -> unit
-
-
-/// Operations to manipulate floating
-/// point column vectors.  The submodule VectorOps.Generic contains a 
-/// matching set of operations to manipulate column vectors carrying
-/// arbitrary element types.
-[]
-[]
-module Vector =
-
-    /// Get an element of a column vector
-    val get   : vector -> int -> float
-
-    /// Set an element of a column vector
-    val set   : vector -> int -> float -> unit
-
-    /// Get the dimensions (number of rows) of a column vector.  Identical to nrows
-    val length   : vector -> int 
-
-    // Creation: general
-    val init  : int ->        (int -> float)        -> vector
-
-    /// Create a vector from a list of numbers
-    val of_list   : float list          -> vector
-    
-    val of_seq    : seq         -> vector
-
-    /// Create a vector from an array of double precision floats
-    val of_array  : float array         -> vector
-
-    /// Return a new array containing a copy of the elements of the given vector
-    val to_array  : vector           -> float array
-    
-    /// Create a 1-element vector
-    val of_scalar  : float              -> vector
-
-    /// Generate a vector of the given length where each entry contains the given value
-    val create    : int        -> float -> vector
-    
-    /// Return a vector of the given length where every entry is zero.
-    val zero     : int                 -> vector
-    
-    /// Create a vector that represents a mesh over the given range
-    /// e.g. rangef (-1.0) 0.5 1.0 = vector [ -1.0; -0.5; 0.0; 0.5; 1.0]
-    val rangef : float -> float -> float -> vector
-    
-    /// Create a vector that represents a integral mesh over the given range
-    /// e.g. range 1 5 = vector [ 1.;2.;3.;4.;5. ]
-    val range  : int -> int              -> vector
-      
-    ///Dot product
-    val dot       : vector -> vector -> float
-
-    ///Pointwise exponential of a vector.
-    val cptPow    : vector -> float -> vector
-
-    ///Transpose of a matrix.  Use also m.Transpose
-    val transpose     :           vector -> rowvec
-
-    ///Sum all the elements of a vector
-    val sum       : vector -> float
-
-    ///Multiply all the elements of the matrix
-    val prod      : vector -> float
-
-    /// Computes the 2-norm of a vector: sqrt(x.Transpose*x).
-    val norm      : vector -> float
-
-    // Second-order query operators
-    val forall  : (float -> bool) -> vector -> bool
-
-    val exists  : (float -> bool) -> vector -> bool 
-
-    val foralli  : (int ->        float -> bool) -> vector -> bool
-
-    val existsi  : (int ->        float -> bool) -> vector -> bool 
-
-    val fold      : ('T -> float -> 'T) -> 'T         -> vector -> 'T
-
-    val foldi      : (int -> 'T -> float -> 'T) -> 'T         -> vector -> 'T
-
-    val copy : vector -> vector
-    
-    // Second-order constructors
-    val map  : (float -> float) -> vector -> vector
-   
-    // Second-order constructors
-    val mapi  : (int        -> float -> float) -> vector -> vector
-   
-    []
-    val add       : vector -> vector -> vector
-    []
-    val sub       : vector -> vector -> vector
-    []
-    val neg       :           vector -> vector
-    []
-    val inplace_assign       : (int ->        float) -> vector -> unit
-    []
-    val inplace_mapi  : (int ->        float -> float) -> vector -> unit
-    []
-    val inplace_add    : vector -> vector -> unit
-    []
-    val inplace_sub    : vector -> vector -> unit
-    []
-    val inplace_cptMul : vector -> vector -> unit
-    []
-    val inplace_scale  : float -> vector -> unit
-    []
-    val cptMul    : vector -> vector -> vector
-    []
-    val scale     : float  -> vector -> vector
-
-    
-    /// Operations to manipulate column vectors carrying
-    /// arbitrary element types.  
-    module Generic =
-        // Accessors
-
-        /// Get an element of a column vector
-        val get   : Vector<'T> -> int -> 'T
-
-        /// Set an element of a column vector
-        val set   : Vector<'T> -> int -> 'T -> unit
-
-        /// Get the dimensions (number of rows) of a column vector.  Identical to nrows
-        val length   : Vector<'T> -> int 
-
-        /// Creation: general
-        val init  : int ->        (int -> 'T)        -> Vector<'T>
-
-        /// Creation: useful when the element type has associated operations.
-        val initNumeric  : int ->        (INumeric<'T> -> int -> 'T)        -> Vector<'T>
-
-        /// Create a vector from a list of numbers
-        val of_list   : 'T list          -> Vector<'T>
-      
-        /// Create a vector from a sequence of numbers
-        val of_seq    : seq<'T>         -> Vector<'T>
-
-        /// Create a 1-element vector
-        val of_scalar  : 'T              -> Vector<'T>
-
-        /// Create a vector from an array of elements
-        val of_array  : 'T[]         -> Vector<'T>
-
-        /// Return a new array containing a copy of the elements of the given vector
-        val to_array  : Vector<'T>    -> 'T[]
-
-        /// Generate a vector of the given length where each entry contains the given value
-        val create    : int        -> 'T -> Vector<'T>
-      
-        /// Return a vector of the given length where every entry is zero.
-        val zero     : int                 -> Vector<'T>
-      
-        ///Point-wise multiplication of two vectors (operator .*)
-        []
-        val cptMul    : Vector<'T> -> Vector<'T> -> Vector<'T>
-      
-        ///Take the pointwise maximum of two vectors
-        val cptMax    : Vector<'T> -> Vector<'T> -> Vector<'T>
-
-        ///Take the pointwise minimum of two vectors
-        val cptMin    : Vector<'T> -> Vector<'T> -> Vector<'T>
-
-        ///Add two vectors (operator +)
-        []
-        val add       : Vector<'T> -> Vector<'T> -> Vector<'T>
-
-        ///Subtract one vector from another (operator -)
-        []
-        val sub       : Vector<'T> -> Vector<'T> -> Vector<'T>
-
-        ///Dot product
-        val dot       : Vector<'T> -> Vector<'T> -> 'T
-
-        ///Negation of the vector (each element is negated) (unary operator -)
-        []
-        val neg       : Vector<'T> -> Vector<'T>
-
-        ///Transpose of a matrix.  Use also m.Transpose
-        val transpose : Vector<'T> -> RowVector<'T>
-
-        ///Pointwise multiplication of a matrix by a scalar
-        []
-        val scale     : 'T  -> Vector<'T> -> Vector<'T>
-
-        ///Sum all the elements of a vector
-        val sum       : Vector<'T> -> 'T
-      
-        ///Multiply all the elements of the matrix
-        val prod      : Vector<'T> -> 'T
-
-        /// Computes the 2-norm of a vector: sqrt(x.Transpose*x).
-        val norm      : Vector<'T> -> float
-
-        // Second-order query operators
-        val forall  : predicate:('T -> bool) -> Vector<'T> -> bool
-        val exists  : predicate:('T -> bool) -> Vector<'T> -> bool 
-        val foralli  : (int -> 'T -> bool) -> Vector<'T> -> bool
-        val existsi  : (int -> 'T -> bool) -> Vector<'T> -> bool 
-        val fold      : folder:('State -> 'T -> 'State) -> 'State -> Vector<'T> -> 'State
-        val foldi      : (int -> 'State -> 'T -> 'State) -> 'State -> Vector<'T> -> 'State
-        val copy: Vector<'T> -> Vector<'T>
-        
-        // Second-order constructors
-        val map  : ('T -> 'T) -> Vector<'T> -> Vector<'T>
-     
-        // Map the given function over each element.  The function is passed the
-        // index of the element within the matrix
-        val mapi  : (int        -> 'T -> 'T) -> Vector<'T> -> Vector<'T>
-     
-        // In-place Mutation 
-        []
-        val inplace_assign : (int -> 'T) -> Vector<'T> -> unit
-        // In-place Mutation 
-        []
-        val inplace_mapi  : (int -> 'T -> 'T) -> Vector<'T> -> unit
-        // In-place Mutation 
-        []
-        val inplace_add    : Vector<'T> -> Vector<'T> -> unit
-        // In-place Mutation 
-        []
-        val inplace_sub    : Vector<'T> -> Vector<'T> -> unit
-        // In-place Mutation 
-        []
-        val inplace_cptMul : Vector<'T> -> Vector<'T> -> unit
-        // In-place Mutation 
-        []
-        val inplace_scale  : 'T -> Vector<'T> -> unit
-
-
-
-/// Operations to manipulate floating
-/// point row vectors.  These are included for completeness and are
-/// nearly always transposed to column vectors.
-[]
-[]
-module RowVector =
-
-    /// Get an element of a column vector
-    val get   : rowvec -> int -> float
-
-    /// Set an element of a column rowvec
-    val set   : rowvec -> int -> float -> unit
-
-    /// Get the dimensions (number of rows) of a column rowvec.  
-    val length   : rowvec -> int 
-
-      /// Create by constant initialization
-    val create : int -> float  -> rowvec
-      /// Create by comprehension
-    val init : int ->  (int -> float) -> rowvec
-
-    /// Return a vector of the given length where every entry is zero.
-    val zero     : int -> rowvec
-
-    // Transpose the row vector
-    val transpose : rowvec -> vector
-
-    // Copy the row vector
-    val copy : rowvec -> rowvec
-
-    /// Create a vector from a list of numbers
-    val of_list   : float list          -> rowvec
-
-    val of_seq    : seq         -> rowvec
-
-    /// Create a vector from an array of double precision floats
-    val of_array  : float array         -> rowvec
-
-    /// Return a new array containing a copy of the elements of the given vector
-    val to_array  : rowvec              -> float array
-    
-    
-    /// Operations to manipulate row vectors types carrying
-    /// arbitrary element types. 
-    module Generic =
-        // Accessors
-
-        /// Get an element from a column vector.  
-        val get   : RowVector<'T> -> int -> 'T
-        /// Set an element in a column vector.  
-        val set   : RowVector<'T> -> int -> 'T -> unit
-        /// Get the number of rows in a column vector.  
-        val length: RowVector<'T> -> int 
-        /// Transpose the row vector
-        val transpose        : RowVector<'T>  -> Vector<'T> 
-        /// Create by comprehension
-        val init       : int ->        (int -> 'T)        -> RowVector<'T> 
-        /// Create by constant initialization
-        val create       : int ->      'T  -> RowVector<'T> 
-        /// Return a vector of the given length where every entry is zero.
-        val zero     : int                 -> RowVector<'T>
-        /// Create a row vector from a list of elements
-        val of_list   : 'T list          -> RowVector<'T> 
-        /// Create a row vector from a sequence of elements
-        val of_seq    : seq<'T>         -> RowVector<'T> 
-
-        /// Create a row vector from an array of elements
-        val of_array  : 'T[]         -> RowVector<'T>
-
-        /// Return a new array containing a copy of the elements of the given vector
-        val to_array  : RowVector<'T>    -> 'T[]         
-
-  
-        // Copy the row vector
-        val copy    :   RowVector<'T> -> RowVector<'T>
-
-
-
-namespace Microsoft.FSharp.Core
-
-    /// The type of floating-point matrices.  See Microsoft.FSharp.Math
-    type matrix = Microsoft.FSharp.Math.matrix
-    /// The type of floating-point vectors.  See Microsoft.FSharp.Math
-    type vector = Microsoft.FSharp.Math.vector
-    /// The type of floating-point row vectors.  See Microsoft.FSharp.Math
-    type rowvec = Microsoft.FSharp.Math.rowvec
-
-
-    []
-    module MatrixCommonExtensions = 
-        /// Builds a matrix from a sequence of sequence of floats.
-        val matrix : seq<#seq> -> matrix
-        /// Builds a (column) vector from a sequence of floats.
-        val vector : seq -> vector
-        /// Builds a (row) vector from a sequence of floats.
-        val rowvec : seq -> rowvec
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/q.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/q.fs
deleted file mode 100644
index bc7ec0c7..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/q.fs
+++ /dev/null
@@ -1,374 +0,0 @@
-// (c) Microsoft Corporation. All rights reserved 
-
-#nowarn "44"  // OK to use the "compiler only" function RangeGeneric
-namespace Microsoft.FSharp.Math
-
-    open Microsoft.FSharp.Collections
-    open Microsoft.FSharp.Core
-    open Microsoft.FSharp.Math
-    open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-    open Microsoft.FSharp.Primitives.Basics
-    open Microsoft.FSharp.Core.Operators
-    open System
-    open System.Globalization
-
-    module BigRationalLargeImpl = 
-        let ZeroI = new BigInt(0)
-        let OneI = new BigInt(1)
-        let bigint (x:int) = new BigInt(x)
-        let ToDoubleI (x:bigint) = 
-#if FX_ATLEAST_40
-            (BigInt.op_Explicit x : double)
-#else
-            BigInt.ToDouble x
-#endif
-
-        let ToInt32I x = 
-#if FX_ATLEAST_40
-            (BigInt.op_Explicit x : int32)
-#else
-            BigInt.ToInt32 x
-#endif
-    open BigRationalLargeImpl
-        
-    []
-    type BigRationalLarge = 
-        | Q of BigInt * BigInt // invariants: (p,q) in lowest form, q >= 0 
-
-        override n.ToString() =
-            let (Q(p,q)) = n 
-            if q.IsOne then p.ToString() 
-            else p.ToString() + "/" + q.ToString()
-
-
-        static member Hash (Q(ap,aq) as q) = 
-            // This hash code must be identical to the hash for BigInt when the numbers coincide.
-            if aq.IsOne then ap.GetHashCode() else (ap.GetHashCode() <<< 3) + aq.GetHashCode()
-        
-
-        override x.GetHashCode()            = BigRationalLarge.Hash(x)
-        
-        static member Equals(Q(ap,aq), Q(bp,bq)) = 
-            BigInt.(=)  (ap,bp) && BigInt.(=) (aq,bq)   // normal form, so structural equality 
-        
-        static member LessThan(Q(ap,aq), Q(bp,bq)) = 
-            BigInt.(<)  (ap * bq,bp * aq)
-        
-        // note: performance improvement possible here
-        static member Compare(p,q) = 
-            if BigRationalLarge.LessThan(p,q) then -1 
-            elif BigRationalLarge.LessThan(q,p)then  1 
-            else 0 
-
-        interface System.IComparable with 
-            member this.CompareTo(obj:obj) = 
-                match obj with 
-                | :? BigRationalLarge as that -> BigRationalLarge.Compare(this,that)
-                | _ -> invalidArg "obj" "the object does not have the correct type"
-
-        override this.Equals(that:obj) = 
-            match that with 
-            | :? BigRationalLarge as that -> BigRationalLarge.Equals(this,that)
-            | _ -> false
-
-        member x.IsNegative = let (Q(ap,aq)) = x in sign ap < 0
-        member x.IsPositive = let (Q(ap,aq)) = x in sign ap > 0
-
-        member x.Numerator = let (Q(p,q)) = x in p
-        member x.Denominator = let (Q(p,q)) = x in q
-        member x.Sign = (let (Q(p,q)) = x in sign p)
-
-        static member ToDouble (Q(p,q)) = 
-            ToDoubleI p / ToDoubleI q
-
-        static member Normalize (p:BigInt,q:BigInt) =
-            if q.IsZero then
-                raise (System.DivideByZeroException())  (* throw for any x/0 *)
-            elif q.IsOne then
-                Q(p,q)
-            else
-#if FX_ATLEAST_40
-                let k = BigInt.GreatestCommonDivisor(p,q)
-#else
-                let k = BigInt.Gcd(p,q)
-#endif
-                let p = p / k 
-                let q = q / k 
-                if sign q < 0 then Q(-p,-q) else Q(p,q)
-
-        static member Rational  (p:int,q:int) = BigRationalLarge.Normalize (bigint p,bigint q)
-        static member RationalZ (p,q) = BigRationalLarge.Normalize (p,q)
-       
-        static member Parse (str:string) =
-          let len = str.Length 
-          if len=0 then invalidArg "str" "empty string";
-          let j = str.IndexOf '/' 
-          if j >= 0 then 
-              let p = BigInt.Parse (str.Substring(0,j)) 
-              let q = BigInt.Parse (str.Substring(j+1,len-j-1)) 
-              BigRationalLarge.RationalZ (p,q)
-          else
-              let p = BigInt.Parse str 
-              BigRationalLarge.RationalZ (p,OneI)
-        
-        static member (~-) (Q(bp,bq))    = Q(-bp,bq)          // still coprime, bq >= 0 
-        static member (+) (Q(ap,aq),Q(bp,bq)) = BigRationalLarge.Normalize ((ap * bq) + (bp * aq),aq * bq)
-        static member (-) (Q(ap,aq),Q(bp,bq)) = BigRationalLarge.Normalize ((ap * bq) - (bp * aq),aq * bq)
-        static member (*) (Q(ap,aq),Q(bp,bq)) = BigRationalLarge.Normalize (ap * bp,aq * bq)
-        static member (/) (Q(ap,aq),Q(bp,bq)) = BigRationalLarge.Normalize (ap * bq,aq * bp)
-        static member ( ~+ )(n1:BigRationalLarge) = n1
-        
-(*
-        static member Floor (Q(p,q)) =
-            let d,r = BigInt.DivRem (p,q)          // p = d.q + r 
-            if sign r < 0 
-            then d - OneI                  // r -ve, so round down 
-            else d
-        
-        static member Ceiling (Q(p,q)) =
-           let d,r = BigInt.DivRem (p,q)          // p = d.q + r 
-           if sign r > 0 
-           then d + OneI                 // when r +ve, adjust up 
-           else d
-*)
-        
-    []
-    module BigRationalLarge = 
-    
-        let inv    (Q(ap,aq)) = BigRationalLarge.Normalize(aq,ap)    
-
-#if FX_ATLEAST_40
-        let pown (Q(p,q)) (n:int) = Q(BigInt.Pow(p,n),BigInt.Pow  (q,n))
-#else
-        let pow  (Q(p,q)) (z:bigint) = Q(BigInt.Pow(p,z),BigInt.Pow  (q,z))     // p,q powers still coprime 
-        let powi q (n:int) = let z = bigint n in pow q z
-#endif
-        
-        let equal (Q(ap,aq)) (Q(bp,bq)) = ap=bp && aq=bq   // normal form, so structural equality 
-        let lt    a b = BigRationalLarge.LessThan(a,b)
-        let gt    a b = BigRationalLarge.LessThan(b,a)
-        let lte   (Q(ap,aq)) (Q(bp,bq)) = BigInt.(<=) (ap * bq,bp * aq)
-        let gte   (Q(ap,aq)) (Q(bp,bq)) = BigInt.(>=) (ap * bq,bp * aq)
-
-        let of_bigint   z = BigRationalLarge.RationalZ(z,OneI )
-        let of_int n = BigRationalLarge.Rational(n,1)
-       
-        // integer part
-        let integer (Q(p,q)) =
-            let d,r = BigInt.DivRem (p,q)          // have p = d.q + r, |r| < |q| 
-            if r < ZeroI
-            then d - OneI                 // p = (d-1).q + (r+q) 
-            else d                             // p =     d.q + r 
-        
-
-(*
-        let two = BigInt 2
-        let round (Q(p,q)) =
-            let d,r = BigInt.DivRem (p,q)             // have p = d.q + r  for  |r| 0 then
-                if BigInt.(<) (q / two,r) 
-                then OneI + d                 // have q/2 < r < q   , round up 
-                else d                         // have 0   < r <= q/2, note 1/2 rounds down 
-            elif s < 0 then
-              if BigInt.(<=) (q / two, -r) 
-              then  OneI - d                  // have -1 < r <= q/2 , round down. note 1/2 rounds down again 
-              else d                           // have -q/2 < r < 0  , rounds up 
-            else d                             // have r=0 
-*)
-        
-      
-        
-    //----------------------------------------------------------------------------
-    // BigNum
-    //--------------------------------------------------------------------------
-
-    []
-    []
-    type BigNum =
-        | Z of BigInt
-        | Q of BigRationalLarge
-
-        static member ( + )(n1,n2) = 
-            match n1,n2 with
-            | Z z ,Z zz -> Z (z + zz)
-            | Q q ,Q qq -> Q (q + qq)
-            | Z z ,Q qq -> Q (BigRationalLarge.of_bigint z + qq)
-            | Q q ,Z zz -> Q (q  + BigRationalLarge.of_bigint zz)
-
-        static member ( * )(n1,n2) = 
-            match n1,n2 with
-            | Z z ,Z zz -> Z (z * zz)
-            | Q q ,Q qq -> Q (q * qq)
-            | Z z ,Q qq -> Q (BigRationalLarge.of_bigint z * qq)
-            | Q q ,Z zz -> Q (q  * BigRationalLarge.of_bigint zz)
-
-        static member ( - )(n1,n2) = 
-            match n1,n2 with
-            | Z z ,Z zz -> Z (z - zz)
-            | Q q ,Q qq -> Q (q - qq)
-            | Z z ,Q qq -> Q (BigRationalLarge.of_bigint z - qq)
-            | Q q ,Z zz -> Q (q  - BigRationalLarge.of_bigint zz)
-
-        static member ( / )(n1,n2) = 
-            match n1,n2 with
-            | Z z ,Z zz -> Q (BigRationalLarge.RationalZ(z,zz))
-            | Q q ,Q qq -> Q (q / qq)
-            | Z z ,Q qq -> Q (BigRationalLarge.of_bigint z / qq)
-            | Q q ,Z zz -> Q (q  / BigRationalLarge.of_bigint zz)
-
-        static member ( ~- )(n1) = 
-            match n1 with
-            | Z z -> Z (-z)
-            | Q q -> Q (-q)
-
-        static member ( ~+ )(n1:BigNum) = n1
-
-        // nb. Q and Z hash codes must match up - see notes above
-        override n.GetHashCode() = 
-            match n with 
-            | Z z -> z.GetHashCode()
-            | Q q -> q.GetHashCode() 
-
-        override this.Equals(obj:obj) = 
-            match obj with 
-            | :? BigNum as that -> BigNum.(=)(this, that)
-            | _ -> false
-
-        interface System.IComparable with 
-            member n1.CompareTo(obj:obj) = 
-                match obj with 
-                | :? BigNum as n2 -> 
-                      if BigNum.(<)(n1, n2) then -1 elif BigNum.(=)(n1, n2) then 0 else 1
-                | _ -> invalidArg "obj" "the objects are not comparable"
-
-        static member FromInt (x:int) = Z (bigint x)
-        static member FromBigInt x = Z x
-
-        static member Zero = BigNum.FromInt(0) 
-        static member One = BigNum.FromInt(1) 
-
-
-        static member PowN (n,i:int) =
-            match n with
-#if FX_ATLEAST_40
-            | Z z -> Z (BigInt.Pow (z,i))
-            | Q q -> Q (BigRationalLarge.pown q i)
-#else
-            | Z z -> Z (BigInt.Pow (z,bigint i))
-            | Q q -> Q (BigRationalLarge.powi q i)
-#endif
-
-        static member op_Equality (n,nn) = 
-            match n,nn with
-            | Z z ,Z zz -> BigInt.(=) (z,zz)
-            | Q q ,Q qq -> (BigRationalLarge.equal q qq)
-            | Z z ,Q qq -> (BigRationalLarge.equal (BigRationalLarge.of_bigint z) qq)
-            | Q q ,Z zz -> (BigRationalLarge.equal q (BigRationalLarge.of_bigint zz))
-        static member op_Inequality (n,nn) = not (BigNum.op_Equality(n,nn))
-    
-        static member op_LessThan (n,nn) = 
-            match n,nn with
-            | Z z ,Z zz -> BigInt.(<) (z,zz)
-            | Q q ,Q qq -> (BigRationalLarge.lt q qq)
-            | Z z ,Q qq -> (BigRationalLarge.lt (BigRationalLarge.of_bigint z) qq)
-            | Q q ,Z zz -> (BigRationalLarge.lt q (BigRationalLarge.of_bigint zz))
-        static member op_GreaterThan (n,nn) = 
-            match n,nn with
-            | Z z ,Z zz -> BigInt.(>) (z,zz)
-            | Q q ,Q qq -> (BigRationalLarge.gt q qq)
-            | Z z ,Q qq -> (BigRationalLarge.gt (BigRationalLarge.of_bigint z) qq)
-            | Q q ,Z zz -> (BigRationalLarge.gt q (BigRationalLarge.of_bigint zz))
-        static member op_LessThanOrEqual (n,nn) = 
-            match n,nn with
-            | Z z ,Z zz -> BigInt.(<=) (z,zz)
-            | Q q ,Q qq -> (BigRationalLarge.lte q qq)
-            | Z z ,Q qq -> (BigRationalLarge.lte (BigRationalLarge.of_bigint z) qq)
-            | Q q ,Z zz -> (BigRationalLarge.lte q (BigRationalLarge.of_bigint zz))
-        static member op_GreaterThanOrEqual (n,nn) = 
-            match n,nn with
-            | Z z ,Z zz -> BigInt.(>=) (z,zz)
-            | Q q ,Q qq -> (BigRationalLarge.gte q qq)
-            | Z z ,Q qq -> (BigRationalLarge.gte (BigRationalLarge.of_bigint z) qq)
-            | Q q ,Z zz -> (BigRationalLarge.gte q (BigRationalLarge.of_bigint zz))
-        
-
-        member n.IsNegative = 
-            match n with 
-            | Z z -> sign z < 0 
-            | Q q -> q.IsNegative
-
-        member n.IsPositive = 
-            match n with 
-            | Z z -> sign z > 0
-            | Q q -> q.IsPositive
-            
-        member n.Numerator = 
-            match n with 
-            | Z z -> z
-            | Q q -> q.Numerator
-
-        member n.Denominator = 
-            match n with 
-            | Z z -> OneI
-            | Q q -> q.Denominator
-
-        member n.Sign = 
-            if n.IsNegative then -1 
-            elif n.IsPositive then  1 
-            else 0
-
-        static member Abs(n:BigNum) = 
-            if n.IsNegative then -n else n
-
-        static member ToDouble(n:BigNum) = 
-            match n with
-            | Z z -> ToDoubleI z
-            | Q q -> BigRationalLarge.ToDouble q
-
-        static member ToBigInt(n:BigNum) = 
-            match n with 
-            | Z z -> z
-            | Q q -> BigRationalLarge.integer q 
-
-        static member ToInt32(n:BigNum) = 
-            match n with 
-            | Z z -> ToInt32I(z)
-            | Q q -> ToInt32I(BigRationalLarge.integer q )
-
-        override n.ToString() = 
-            match n with 
-            | Z z -> z.ToString()
-            | Q q -> q.ToString()
-
-        member x.StructuredDisplayString = x.ToString()
-                   
-        static member Parse(s:string) = Q (BigRationalLarge.Parse s)
-
-    type BigRational = BigNum
-    type bignum = BigNum
-
-namespace Microsoft.FSharp.Core
-    open Microsoft.FSharp.Math
-    type bignum = BigNum
-
-    // FxCop suppressions 
-    open System.Diagnostics.CodeAnalysis  
-    []
-    []
-    []
-    []
-    []
-    []
-    []
-    []
-    []
-    []
-    do()
-
-    module NumericLiteralN = 
-        let FromZero () = BigNum.Zero 
-        let FromOne () = BigNum.One 
-        let FromInt32 i = BigNum.FromInt i
-        let FromInt64 (i64:int64) = BigNum.FromBigInt (new BigInt(i64))
-        let FromString s = BigNum.Parse s
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/q.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/q.fsi
deleted file mode 100644
index e47137c3..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/math/q.fsi
+++ /dev/null
@@ -1,88 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.Math
-
-    open Microsoft.FSharp.Core
-    open Microsoft.FSharp.Math
-    open System
-      
-    /// The type of arbitrary-sized rational numbers
-    []
-    type BigNum =
-        /// Return the sum of two rational numbers
-        static member ( + ) : BigNum * BigNum -> BigNum
-        /// Return the product of two rational numbers
-        static member ( * ) : BigNum * BigNum -> BigNum
-        /// Return the difference of two rational numbers
-        static member ( - ) : BigNum * BigNum -> BigNum
-        /// Return the ratio of two rational numbers
-        static member ( / ) : BigNum * BigNum -> BigNum
-        /// Return the negation of a rational number
-        static member ( ~- ): BigNum          -> BigNum
-        /// Return the given rational number
-        static member ( ~+ ): BigNum          -> BigNum
-
-        override ToString: unit -> string
-        override GetHashCode: unit -> int
-        interface System.IComparable
-
-        /// Get zero as a rational number
-        static member Zero : BigNum  
-        /// Get one as a rational number
-        static member One : BigNum  
-        /// This operator is for use from other .NET languages
-        static member op_Equality : BigNum * BigNum -> bool
-        /// This operator is for use from other .NET languages
-        static member op_Inequality : BigNum * BigNum -> bool
-        /// This operator is for use from other .NET languages
-        static member op_LessThan: BigNum * BigNum -> bool 
-        /// This operator is for use from other .NET languages
-        static member op_GreaterThan: BigNum * BigNum -> bool 
-        /// This operator is for use from other .NET languages
-        static member op_LessThanOrEqual: BigNum * BigNum -> bool 
-        /// This operator is for use from other .NET languages
-        static member op_GreaterThanOrEqual: BigNum * BigNum -> bool
-        
-        /// Return a boolean indicating if this rational number is strictly negative
-        member IsNegative: bool 
-        /// Return a boolean indicating if this rational number is strictly positive
-        member IsPositive: bool 
-
-        /// Return the numerator of the normalized rational number
-        member Numerator: bigint
-        /// Return the denominator of the normalized rational number
-        member Denominator: bigint
-
-        /// Return the absolute value of a rational number 
-        static member Abs : BigNum -> BigNum
-        /// Return the sign of a rational number; 0, +1 or -1
-        member Sign : int 
-        /// Return the result of raising the given rational number to the given power
-        static member PowN : BigNum * int -> BigNum
-        /// Return the result of converting the given integer to a rational number
-        static member FromInt : int         -> BigNum  
-        /// Return the result of converting the given big integer to a rational number
-        static member FromBigInt : bigint      -> BigNum  
-        /// Return the result of converting the given rational number to a floating point number
-        static member ToDouble: BigNum -> float 
-        /// Return the result of converting the given rational number to a big integer
-        static member ToBigInt: BigNum -> bigint
-        /// Return the result of converting the given rational number to an integer
-        static member ToInt32 : BigNum -> int
-        /// Return the result of converting the string to a rational number 
-        static member Parse: string -> BigNum
-
-    type BigRational = BigNum
-
-    type bignum = BigNum
-
-namespace Microsoft.FSharp.Core
-
-    type bignum = Microsoft.FSharp.Math.BigNum
-    []
-    module NumericLiteralN = 
-        val FromZero : unit -> bignum
-        val FromOne : unit -> bignum
-        val FromInt32 : int32 -> bignum
-        val FromInt64 : int64 -> bignum
-        val FromString : string -> bignum
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/num.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/num.fs
deleted file mode 100644
index 397773a5..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/num.fs
+++ /dev/null
@@ -1,61 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-(* Rebind z,q,nums to implement the ocaml library APIs *)
-
-module Microsoft.FSharp.Compatibility.OCaml.Num
-open Microsoft.FSharp.Compatibility.OCaml
-open Microsoft.FSharp.Compatibility.OCaml.Pervasives
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Math
-
-type num = bignum
-
-let Big_int(x) = BigNum.FromBigInt x
-let Int(x) = BigNum.FromInt x
-
-let minus_num(x:bignum) = (x)
-  
-let add_num (x:bignum) y = x + y 
-let sub_num (x:bignum) y = x - y 
-let mult_num (x:bignum) y = x *  y 
-let div_num  (x:bignum) y = x / y 
-let abs_num (x:bignum) = abs x
-let succ_num (x:bignum) = x + BigNum.One
-let pred_num (x:bignum) = x - BigNum.One
-let pow_num (x:bignum) n = BigNum.PowN(x,n)
-let incr_num r = r := succ_num !r
-let decr_num r = (r := pred_num !r)
-
-let sign_num(n:bignum) = sign n
-
-let ( +/ ) x y = add_num x y 
-let ( -/ ) x y = sub_num x y 
-let ( */ ) x y = mult_num x y 
-let ( >/ ) (x:bignum) y = x > y 
-let ( =/ ) (x:bignum) y = x >= y 
-
-
-let compare_num (x:bignum) y = compare x y 
-let max_num  (x:bignum) y = max x y 
-let min_num  (x:bignum) y = min x y 
-let to_float (n:bignum) = float n
-
-let ( <>/ ) x y = not ((compare_num x y) = 0)
-let ( =/ ) x y = ((compare_num x y) = 0)
-
-let big_int_of_num(n) = BigNum.ToBigInt n
-let num_of_big_int(x) = Big_int x 
-let float_of_num(x:bignum) = float x
-let int_of_num(x:bignum) = int x
-
-let neg (x:bignum) = - x
-let add (x:bignum) y = x + y
-let sub (x:bignum) y = x - y 
-let mul (x:bignum) y = x * y 
-let div (x:bignum) y = x / y 
-let pow (x:bignum) y = BigNum.PowN(x,y)
-
-let string_of_num (x:bignum) = x.ToString()
-let num_of_string (s:string) = BigNum.Parse(s)
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/num.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/num.fsi
deleted file mode 100644
index 990a4d44..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/num.fsi
+++ /dev/null
@@ -1,57 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.   The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.  The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-
-[]
-module Microsoft.FSharp.Compatibility.OCaml.Num
-open Microsoft.FSharp.Compatibility.OCaml
-open Microsoft.FSharp.Compatibility.OCaml.Pervasives
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Math
-
-// Note: the BigNum type support overloaded operators in F#
-type num = bignum
-
-val Big_int: bigint -> num
-val Int: int -> num
-
-val minus_num   : num -> num
-  
-val add_num  : num -> num -> num 
-val sub_num  : num -> num -> num 
-val mult_num  : num -> num -> num 
-val div_num  : num -> num -> num
-val abs_num   : num -> num
-val succ_num  : num -> num
-val pred_num  : num -> num
-val pow_num   : num -> int -> num
-val incr_num  : num ref -> unit
-val decr_num  : num ref -> unit
-val sign_num: num -> int
-
-val string_of_num: num -> string
-val num_of_string: string -> num 
-
-val ( +/ )      : num -> num -> num 
-val ( -/ )      : num -> num -> num 
-val ( */ )      : num -> num -> num 
-
-val ( >/ )      : num -> num -> bool
-val (  num -> bool
-val ( <=/ )      : num -> num -> bool
-val ( >=/ )      : num -> num -> bool
-val ( <>/ )      : num -> num -> bool
-val ( =/ )      : num -> num -> bool
-
-val compare_num : num -> num -> int
-val max_num  : num -> num -> num 
-val min_num  : num -> num -> num
-val float_of_num: num -> float 
-val int_of_num: num -> int
-val big_int_of_num: num -> bigint
-val num_of_big_int: bigint -> num
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/obj.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/obj.fs
deleted file mode 100644
index d628b16a..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/obj.fs
+++ /dev/null
@@ -1,19 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.  
-//===========================================================================
-
-#if INTERNALIZED_POWER_PACK
-module internal Internal.Utilities.Obj
-#else
-module Microsoft.FSharp.Compatibility.OCaml.Obj
-#endif
-
-type t = obj
-let repr x = box x
-let obj (x:obj) = unbox x
-let magic x = obj (repr x)
-let nullobj = (null : obj)
-
-
-let eq (x: 'a)  (y: 'a) = LanguagePrimitives.PhysicalEquality x y
-let not_eq (x:'a) (y:'a) = not (LanguagePrimitives.PhysicalEquality x y)
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/obj.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/obj.fsi
deleted file mode 100644
index a2a08773..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/obj.fsi
+++ /dev/null
@@ -1,40 +0,0 @@
-
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.  The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.  The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-
-#if INTERNALIZED_POWER_PACK
-module internal Internal.Utilities.Obj
-#else
-module Microsoft.FSharp.Compatibility.OCaml.Obj
-#endif
-
-[]
-type t = obj
-
-[]
-val magic: 'a -> 'b
-
-[]
-val nullobj: obj
-
-/// See Microsoft.FSharp.Core.Operators.unbox
-[]
-val obj: obj -> 'a
-
-/// See Microsoft.FSharp.Core.Operators.box
-[]
-val repr: 'a -> obj
-
-/// See Microsoft.FSharp.Core.LanguagePrimitives.PhysicalEquality
-[]
-val eq: 'a -> 'a -> bool
-
-[]
-/// Negation of Obj.eq (i.e. reference/physical inequality)
-val not_eq: 'a -> 'a -> bool
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/parsing.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/parsing.fs
deleted file mode 100644
index 352dd38d..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/parsing.fs
+++ /dev/null
@@ -1,51 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-// Parsing: support fsyacc-generated parsers
-
-#if INTERNALIZED_POWER_PACK
-
-module internal Internal.Utilities.Compatibility.OCaml.Parsing
-open Internal.Utilities.Text.Lexing
-open Internal.Utilities.Text.Parsing
-
-#else
-[]
-module Microsoft.FSharp.Compatibility.OCaml.Parsing
-open Microsoft.FSharp.Text.Lexing
-open Microsoft.FSharp.Text.Parsing
-open Microsoft.FSharp.Compatibility.OCaml
-#endif
-
-
-let err _  = failwith "You must generate your parser using the '--ml-compatibility' option or call 'Parsing.set_parse_state parseState' in each action before using functions from the Parsing module.  This is because the module uses global state which must be set up for use in each parsing action. Review the notes in the 'Microsoft.FSharp.Compatibility.OCaml.Parsing' module if you are using parsers on multiple threads."
-let dummyProvider = 
-    { new IParseState with 
-        member x.InputRange(i) = err();
-        member p.InputStartPosition(n) = err();
-        member p.InputEndPosition(n) = err();
-        member x.ResultRange = err();
-        member x.GetInput(i) = err();
-        member x.ParserLocalStore = err();
-        member x.RaiseError() = err()  
-      }
-
-let mutable parse_information = dummyProvider
-let set_parse_state (x:IParseState) = parse_information <- x
-
-let enforce_nonnull_pos p = 
-  match (box p) with 
-  | null -> Position.Empty
-  | _ -> p
-
-let symbol_start_pos ()   = parse_information.ResultRange   |> fst |> enforce_nonnull_pos
-let symbol_end_pos ()     = parse_information.ResultRange   |> snd |> enforce_nonnull_pos
-let rhs_start_pos (n:int) = parse_information.InputRange(n) |> fst |> enforce_nonnull_pos
-let rhs_end_pos (n:int)   = parse_information.InputRange(n) |> snd |> enforce_nonnull_pos
-
-exception Parse_error  = RecoverableParseError
-let parse_error s = parse_information.RaiseError()(failwith s : unit)
-
-let symbol_start () = (symbol_start_pos()).pos_cnum
-let symbol_end () = (symbol_end_pos()).pos_cnum
-let rhs_start n = (rhs_start_pos n).pos_cnum
-let rhs_end n = (rhs_end_pos n).pos_cnum
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/parsing.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/parsing.fsi
deleted file mode 100644
index 7b57aebc..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/parsing.fsi
+++ /dev/null
@@ -1,62 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.   The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.  The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-
-/// Parsing: parser support for parsers produced by fsyacc.
-///
-/// Parsers generated by fsyacc provide location information within parser
-/// actions.  However that information is not available globally, but
-/// rather is accessed via the functions available on the following local
-/// variable which is available in all parser actions:
-///
-///    parseState : 'a Microsoft.FSharp.Text.Parsing.IParseState
-///
-/// However, this is not compatible with the parser specifications used
-/// with ocamlyacc and similar tools, which make a single parser state available
-/// globally.  If you wish to use a global parser state (e.g. so your code will
-/// cross-compile with OCaml) then you can use the functions in this file.
-/// You will need to either generate the parser with '--ml-compatibility' option 
-/// or add the code
-///
-///       Parsing.set_parse_state parseState;
-///
-/// at the start of each action of your grammar.  The functions below
-/// simply report the results of corresponding calls to the latest object
-/// specified by a call to set_parse_state.
-///
-/// Note that there could be unprotected multi-threaded concurrent access for the
-/// parser information, so you should not in general use these
-/// functions if there may be more than one parser active, and
-/// should instead use the functions directly available from the parseState
-/// object.
-#if INTERNALIZED_POWER_PACK
-module internal Internal.Utilities.Compatibility.OCaml.Parsing
-open Internal.Utilities
-open Internal.Utilities.Text.Parsing
-#else
-[]
-module Microsoft.FSharp.Compatibility.OCaml.Parsing
-open Microsoft.FSharp.Text.Parsing
-open Microsoft.FSharp.Compatibility.OCaml
-#endif
-
-val rhs_end: int -> int
-val rhs_end_pos: int -> Lexing.position
-val rhs_start: int -> int
-val rhs_start_pos: int -> Lexing.position
-val symbol_end: unit -> int
-val symbol_end_pos: unit -> Lexing.position
-val symbol_start: unit -> int
-val symbol_start_pos: unit -> Lexing.position
-
-val set_parse_state: IParseState -> unit
-
-/// You can initialize error recovery by raising the Parse_error exception. 
-
-exception Parse_error = Microsoft.FSharp.Text.Parsing.RecoverableParseError
-
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/permutation.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/permutation.fs
deleted file mode 100644
index d3d600e6..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/permutation.fs
+++ /dev/null
@@ -1,48 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-namespace Microsoft.FSharp.Compatibility
-
-type permutation = int -> int
-
-module Permutation =
-
-    let invalidArg arg msg = raise (new System.ArgumentException((msg:string),(arg:string)))        
-
-    let of_fresh_array (arr:_[]) = 
-        let arr2 = Array.zeroCreate arr.Length
-        for i = 0 to arr.Length - 1 do 
-            let x = arr.[i] 
-            if x < 0 or x >= arr.Length then invalidArg "arr" "invalid permutation" 
-            arr2.[x] <- 1
-        for i = 0 to arr.Length - 1 do 
-            if arr2.[i] <> 1 then invalidArg "arr" "invalid permutation"
-        (fun k -> arr.[k])
-
-    let of_array (arr:_[]) = arr |> Array.copy |> of_fresh_array
-
-    let of_pairs  (mappings: seq) = 
-      let p = dict mappings 
-      (fun k -> if p.ContainsKey k then p.[k] else k)
-
-    let swap (n:int) (m:int) = 
-      (fun k -> if k = n then m elif k = m then n else k)
-
-    let reversal size = 
-      if size <= 0 then invalidArg "size" "a permutation size must be positive";
-      (fun k -> (size - 1 - k))
-
-    let rotation size distance = 
-      if size <= 0 then invalidArg "size" "a permutation size must be positive";
-      if abs distance >= size then invalidArg "distance" "the absolute value of the distance must be less than the size of the permutation";
-      (fun k -> (k + size + distance) % size)
-
-    let identity (k:int) = k
-    
-    let inverse size p =
-        if size <= 0 then invalidArg "size" "a permutation size must be positive";
-        let arr2 = Array.zeroCreate size
-        for i = 0 to size - 1 do
-             arr2.[p i] <- i
-        of_fresh_array arr2
-
-    
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/permutation.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/permutation.fsi
deleted file mode 100644
index b6577a08..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/permutation.fsi
+++ /dev/null
@@ -1,36 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Collections
-
-type permutation = int -> int
-
-module Permutation =
-    /// Create a permutation by specifying the result of permuting [| 0 .. n-1 |]. For example, 
-    /// Permutation.of_array [| 1;2;0 |]  specifies a permutation that rotates all elements right one place.
-    val of_array : destinations:int array -> permutation
-
-    /// Create a permutation by specifying (source,destination) index pairs. For example,
-    /// Permutation(3,[ (0,2);(1,0); (2,1) ]) specifies a permutation that rotates 
-    /// all elements left one place. Not all elements need be given, e.g. 
-    /// Permutation(5,[ (1,2);(2,1) |]) specifies a permutation that swaps elements at indexes
-    /// 1 and 2.
-    val of_pairs : mappings: seq -> permutation
-    
-    /// Return a swaps the given two elements over any size
-    val swap: n:int -> m:int -> permutation
-
-    /// Return a permutation that, when applied, maps index 0 to size-1, size-1 to 0 etc.
-    val reversal: size:int -> permutation
-
-    /// Return a permutation that rotates right by the given distance. If the distance
-    /// is negative then a left rotation results.
-    val rotation: size:int -> distance:int -> permutation
-    
-    /// The identity permutation over any size
-    val identity : permutation
-    
-    val inverse : size: int -> p:permutation -> permutation
-    
\ No newline at end of file
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/pervasives.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/pervasives.fs
deleted file mode 100644
index 1d33e041..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/pervasives.fs
+++ /dev/null
@@ -1,731 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.  
-
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Pervasives
-open Internal.Utilities
-#else
-module Microsoft.FSharp.Compatibility.OCaml.Pervasives
-#endif
-
-#nowarn "62" // compatibility warnings
-#nowarn "35"  // 'deprecated' warning about redefining '<' etc.
-#nowarn "86"  // 'deprecated' warning about redefining '<' etc.
-#nowarn "60"  // override implementations in intrinsic extensions
-#nowarn "69"  // interface implementations in intrinsic extensions
-
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Core.Operators
-open System.Collections.Generic
-
-exception Match_failure  = Microsoft.FSharp.Core.MatchFailure
-exception Assert_failure of string * int * int 
-
-exception End_of_file      = System.IO.EndOfStreamException
-exception Out_of_memory    = System.OutOfMemoryException
-exception Division_by_zero = System.DivideByZeroException
-exception Stack_overflow   = System.StackOverflowException 
-
-let Not_found<'a> = (new KeyNotFoundException("The item was not found during a search or in a collection") :> exn)
-let (|Not_found|_|) (inp:exn) = match inp with :? KeyNotFoundException -> Some() | _ -> None
-
-let Invalid_argument (msg:string) = (new System.ArgumentException(msg) :> exn)
-let (|Invalid_argument|_|) (inp:exn) = match inp with :? System.ArgumentException as e -> Some(e.Message) | _ -> None
-
-let inline (==)    (x:'a) (y:'a) = LanguagePrimitives.PhysicalEquality x y
-let inline (!=)    (x:'a) (y:'a) = not (LanguagePrimitives.PhysicalEquality x y)
-let inline (mod)  (x:int) (y:int)  = Operators.(%) x y
-let inline (land) (x:int) (y:int)  = Operators.(&&&) x y
-let inline (lor)  (x:int) (y:int)  = Operators.(|||) x y
-let inline (lxor) (x:int) (y:int)  = Operators.(^^^) x y
-let inline lnot   (x:int)          = Operators.(~~~) x
-let inline (lsl)  (x:int) (y:int)  = Operators.(<<<) x y
-let inline (lsr)  (x:int) (y:int)  = int32 (uint32 x >>> y)
-let inline (asr)  (x:int) (y:int)  = Operators.(>>>) x y
-
-let int_neg (x:int) = -x
-let (~-.)  (x:float)           =  -x
-let (~+.)  (x:float)           =  x
-let (+.)   (x:float) (y:float) =  x+y
-let (-.)   (x:float) (y:float) =  x-y
-let ( *.)  (x:float) (y:float) =  x*y
-let ( /.)  (x:float) (y:float) =  x/y
-
-let inline (.())   (arr: _[]) n = arr.[n]
-let inline (.()<-) (arr: _[]) n x = arr.[n] <- x
-
-let succ (x:int) = x + 1
-let pred (x:int) = x - 1
-let max_int = 0x7FFFFFFF // 2147483647 
-let min_int = 0x80000000 // -2147483648 
-
-(*  mod_float x y = x - y * q where q = truncate(a/b) and truncate x removes fractional part of x *)
-let truncate (x:float) : int = int32 x
-
-#if FX_NO_TRUNCATE
-let truncatef (x:float) = 
-    if x >= 0.0 then 
-        System.Math.Floor x
-    else
-        System.Math.Ceiling x
-#else
-let truncatef (x:float) = System.Math.Truncate x
-#endif
-let mod_float x y = x - y * truncatef(x/y)
-let float_of_int (x:int) =  float x
-let ldexp x (n:int) = x * (2.0 ** float n)
-let modf x = let integral = Operators.floor x in (integral, x - integral)
-let int_of_float x =  truncate x
-
-let neg_infinity = System.Double.NegativeInfinity
-let max_float    = System.Double.MaxValue 
-let min_float    =  0x0010000000000000LF
-let epsilon_float = 0x3CB0000000000000LF // Int64.float_of_bits 4372995238176751616L
-
-type fpclass = FP_normal (* | FP_subnormal *)  | FP_zero| FP_infinite | FP_nan      
-
-let classify_float (x:float) = 
-    if System.Double.IsNaN x then FP_nan
-    elif System.Double.IsNegativeInfinity x then FP_infinite
-    elif System.Double.IsPositiveInfinity x then FP_infinite
-    elif x = 0.0 then FP_zero
-    else FP_normal
-       
-let abs_float (x:float)           = Operators.abs x
-
-let int_of_char (c:char) = System.Convert.ToInt32(c)
-let char_of_int (x:int) = System.Convert.ToChar(x)
-
-let string_of_bool b = if b then "true" else "false"
-let bool_of_string s = 
-  match s with 
-  | "true" -> true 
-  | "false" -> false
-  | _ -> raise (System.ArgumentException("bool_of_string"))
-
-let string_of_int (x:int) = x.ToString()
-let int_of_string (s:string) = try int32 s with _ -> failwith "int_of_string"
-let string_of_float (x:float) = x.ToString()
-let float_of_string (s:string) = try float s with _ -> failwith "float_of_string"
-
-let string_to_int   x = int_of_string x
-
-
-//--------------------------------------------------------------------------
-// I/O
-//
-// OCaml-compatible channels conflate binary and text IO. It is very inconvenient to introduce
-// out_channel as a new abstract type, as this means functions like fprintf can't be used in 
-// conjunction with TextWriter values.  Hence we pretend that OCaml channels are TextWriters, and 
-// implement TextWriters in such a way the the implementation contains an optional binary stream
-// which is utilized by the OCaml binary I/O methods.
-//
-// Notes on the implementation: We discriminate between three kinds of 
-// readers/writers since various operations are possible on each kind.
-// StreamReaders/StreamWriters inherit from text readers/writers and
-// thus support more functionality.  We could just support two 
-// constructors (Binary and Text) and use dynamic type tests on the underlying .NET
-// objects to detect the cases where we have StreamWriters.
-//--------------------------------------------------------------------------
-open System.Text
-open System.IO
-
-type writer = 
-  | StreamW of StreamWriter
-  | TextW of (unit -> TextWriter)
-  | BinaryW of BinaryWriter
-
-
-[]
-do()
-
-let defaultEncoding =
-#if FX_NO_DEFAULT_ENCODING
-        // default encoding on Silverlight is UTF8 (to aling with e.g. System.IO.StreamReader)
-        Encoding.UTF8
-#else
-        Encoding.Default
-#endif
-
-type out_channel = TextWriter
-type OutChannelImpl(w: writer) = 
-    inherit TextWriter()
-    let mutable writer = w
-    member x.Writer with get() = writer and set(w) = writer <- w
-    
-    member x.Stream = 
-        match writer with 
-        | TextW tw -> failwith "cannot access a stream for this channel"
-        | BinaryW bw -> bw.BaseStream 
-        | StreamW sw -> sw.BaseStream
-    member x.TextWriter = 
-        match writer with 
-        | StreamW sw -> (sw :> TextWriter)
-        | TextW tw -> tw()
-        | _ -> failwith "binary channels created using the OCaml-compatible Pervasives.open_out_bin cannot be used as TextWriters.  Consider using 'System.IO.BinaryWriter' in preference to creating channels using open_out_bin."
-        
-    member x.StreamWriter = 
-        match writer with 
-        | StreamW sw -> sw
-        | _ -> failwith "cannot access a stream writer for this channel"
-    member x.BinaryWriter = 
-        match writer with 
-        | BinaryW w -> w
-        | _ -> failwith "cannot access a binary writer for this channel"
-
-type open_flag =
-  | Open_rdonly | Open_wronly | Open_append
-  | Open_creat | Open_trunc | Open_excl
-  | Open_binary | Open_text 
-#if FX_NO_NONBLOCK_IO
-#else
-  | Open_nonblock
-#endif
-  | Open_encoding of Encoding
-
-type reader = 
-  | StreamR of StreamReader
-  | TextR of (unit -> TextReader)
-  | BinaryR of BinaryReader
-
-/// See OutChannelImpl
-type in_channel = System.IO.TextReader
-type InChannelImpl(r : reader) = 
-    inherit TextReader()
-    let mutable reader = r
-    member x.Reader with get() = reader and set(r) = reader <- r
-    
-    member x.Stream =
-        match reader with 
-        | TextR tw -> failwith "cannot access a stream for this channel"
-        | BinaryR bw -> bw.BaseStream 
-        | StreamR sw -> sw.BaseStream
-    member x.TextReader = 
-        match reader with 
-        | StreamR sw -> (sw :> TextReader)
-        | TextR tw -> tw()
-        | _ -> failwith "binary channels created using the OCaml-compatible Pervasives.open_in_bin cannot be used as TextReaders  If necessary use the OCaml compatible binary input methods Pervasvies.input etc. to read from this channel. Consider using 'System.IO.BinaryReader' in preference to channels created using open_in_bin."
-        
-    member x.StreamReader = 
-        match reader with 
-        | StreamR sw -> sw
-        | _ -> failwith "cannot access a stream writer for this channel"
-    member x.BinaryReader = 
-        match reader with 
-        | BinaryR w -> w
-        | _ -> failwith "cannot access a binary writer for this channel"
-
-let (!!) (os : out_channel) = 
-    match os with 
-    | :? OutChannelImpl as os -> os.Writer
-    | :? StreamWriter as sw -> StreamW sw
-    | _ -> TextW (fun () -> os)
-let (<--) (os: out_channel) os' = 
-    match os with 
-    | :? OutChannelImpl as os -> os.Writer <- os'
-    | _ -> failwith "the mode may not be adjusted on a writer not created with one of the Pervasives.open_* functions"
-    
-let stream_to_BinaryWriter s    = BinaryW (new BinaryWriter(s))
-let stream_to_StreamWriter (encoding : Encoding) (s : Stream) =   StreamW (new StreamWriter(s,encoding))
-
-module OutChannel = 
-    let to_Stream (os:out_channel) =
-      match !!os with 
-      | BinaryW bw -> bw.BaseStream 
-      | StreamW sw -> sw.BaseStream
-      | TextW tw -> failwith "to_Stream: cannot access a stream for this channel"
-      
-    let to_StreamWriter (os:out_channel) =
-      match !!os with 
-      | StreamW sw -> sw
-      | _ -> failwith "to_StreamWriter: cannot access a stream writer for this channel"
-      
-    let to_TextWriter (os:out_channel) =
-      match !!os with 
-      | StreamW sw -> (sw :> TextWriter)
-      | TextW tw -> tw()
-      | _ -> os
-      
-    let of_StreamWriter w =
-      new OutChannelImpl(StreamW(w)) :> out_channel
-
-    let to_BinaryWriter (os:out_channel) =
-      match !!os with 
-      | BinaryW bw -> bw
-      | _ -> failwith "to_BinaryWriter: cannot access a binary writer for this channel"
-      
-    let of_BinaryWriter w =
-      new OutChannelImpl(BinaryW w) :> out_channel
-      
-    let of_TextWriter (w:TextWriter) =
-      let absw = 
-        match w with 
-        | :? StreamWriter as sw -> StreamW sw
-        | tw -> TextW (fun () -> tw) in
-      new OutChannelImpl(absw) :> out_channel
-        
-    let of_Stream encoding (s : Stream) =   new OutChannelImpl(stream_to_StreamWriter encoding s) :> out_channel
-      
-let listContains x l = List.exists (fun y -> x = y) l
-
-let open_out_gen flags (perm:int) (s:string) = 
-    // permissions are ignored 
-    let app = listContains Open_append flags in 
-    let access = 
-        match listContains Open_rdonly flags, listContains Open_wronly flags with
-        | true, true -> invalidArg "flags" "invalid access for reading"
-        | true, false -> invalidArg "flags" "invalid access for writing" // FileAccess.Read 
-        | false, true ->  FileAccess.Write
-        | false, false -> (if app then FileAccess.Write else FileAccess.ReadWrite)  
-    let mode =
-        match (listContains Open_excl flags,app, listContains Open_creat flags, listContains Open_trunc flags) with
-        | (true,false,false,false) -> FileMode.CreateNew
-        | false,false,true,false -> FileMode.Create
-        | false,false,false,false -> FileMode.OpenOrCreate
-        | false,false,false,true -> FileMode.Truncate
-        | false,false,true,true -> FileMode.OpenOrCreate
-        | false,true,false,false -> FileMode.Append
-        | _ -> invalidArg "flags" "invalid mode" 
-    let share = FileShare.Read 
-    let bufferSize = 0x1000 
-#if FX_NO_NONBLOCK_IO
-    let stream = (new FileStream(s,mode,access,share,bufferSize)) 
-#else
-    let allowAsync = listContains Open_nonblock flags 
-    let stream = (new FileStream(s,mode,access,share,bufferSize,allowAsync)) 
-#endif
-    match listContains Open_binary flags, listContains Open_text flags with 
-    | true,true -> invalidArg "flags" "mixed text/binary flags"
-    | true,false -> (new OutChannelImpl(stream_to_BinaryWriter stream ) :> out_channel)
-    | false,_ ->
-        let encoding = List.tryPick (function Open_encoding e -> Some(e) | _ -> None) flags 
-        let encoding = match encoding with None -> defaultEncoding | Some e -> e 
-        OutChannel.of_Stream encoding (stream :> Stream)
-        
-let open_out_encoded (e:Encoding) (s:string) = open_out_gen [Open_text; Open_wronly; Open_creat; Open_encoding e] 777 s
-let open_out_utf8 (s:string) = open_out_encoded Encoding.UTF8 s
-let open_out (s:string) = open_out_gen [Open_text; Open_wronly; Open_creat] 777 s
-let open_out_bin (s:string) = open_out_gen [Open_binary; Open_wronly; Open_creat] 777 s
-
-let flush (os:out_channel) = 
-    match !!os with 
-    | TextW tw   -> (tw()).Flush() // the default method does not flush, is it overriden for the console? 
-    | BinaryW bw -> bw.Flush()
-    | StreamW sw -> sw.Flush()
-
-let close_out (os:out_channel) = 
-    match !!os with 
-    | TextW tw -> (tw()).Close()
-    | BinaryW bw -> bw.Close()
-    | StreamW sw -> sw.Close()
-
-let prim_output_newline (os:out_channel) = 
-    match !!os with 
-    | TextW tw -> (tw()).WriteLine()
-    | BinaryW bw -> invalidArg "os" "the channel is a binary channel"
-    | StreamW sw -> sw.WriteLine()
-
-let output_string (os:out_channel) (s:string) = 
-    match !!os with 
-    | TextW tw -> (tw()).Write(s)
-    | BinaryW bw -> 
-         // Write using a char array - writing a string writes it length-prefixed! 
-         bw.Write (Array.init s.Length (fun i -> s.[i]) )
-    | StreamW sw -> sw.Write(s)
-
-let prim_output_int (os:out_channel) (s:int) = 
-    match !!os with 
-    | TextW tw -> (tw()).Write(s)
-    | BinaryW bw -> invalidArg "os" "the channel is a binary channel"
-    | StreamW sw -> sw.Write(s)
-
-let prim_output_float (os:out_channel) (s:float) = 
-    match !!os with 
-    | TextW tw -> (tw()).Write(s)
-    | BinaryW bw -> invalidArg "os" "the channel is a binary channel"
-    | StreamW sw -> sw.Write(s)
-
-let output_char (os:out_channel) (c:char) = 
-    match !!os with 
-    | TextW tw -> 
-        (tw()).Write(c)
-    | BinaryW bw -> 
-        if int c > 255 then invalidArg "c" "unicode characters of value > 255 may not be written to binary channels"
-        bw.Write(byte c)
-    | StreamW sw -> 
-        sw.Write(c)
-
-let output_chars (os:out_channel) (c:char[]) start len  = 
-    match !!os with 
-    | TextW tw -> (tw()).Write(c,start,len)
-    | BinaryW bw -> bw.Write(c,start,len)
-    | StreamW sw -> sw.Write(c,start,len)
-
-let seek_out (os:out_channel) (n:int) = 
-    match !!os with 
-    | StreamW sw -> 
-        sw.Flush();   
-        (OutChannel.to_Stream os).Seek(int64 n,SeekOrigin.Begin) |> ignore
-    | TextW _ ->
-        (OutChannel.to_Stream os).Seek(int64 n,SeekOrigin.Begin) |> ignore
-    | BinaryW bw -> 
-        bw.Flush();
-        bw.Seek(n,SeekOrigin.Begin) |> ignore
-
-let pos_out (os:out_channel) = flush os; int32 ((OutChannel.to_Stream os).Position)
-let out_channel_length (os:out_channel) = flush os; int32 ((OutChannel.to_Stream os).Length)
-
-let output (os:out_channel) (buf: byte[]) (x:int) (len: int) = 
-    match !!os with 
-    | BinaryW bw -> bw.Write(buf,x,len)
-    | TextW _ | StreamW _ -> 
-        output_string os (defaultEncoding.GetString(buf,x,len))
-
-let output_bytearray (os:out_channel) (b: byte[]) = output os b 0  b.Length
-
-let output_byte (os:out_channel) (x:int) = 
-    match !!os with 
-    | BinaryW bw -> bw.Write(byte (x % 256))
-    | TextW _  | StreamW _ -> output_char os (char (x % 256))
-
-let output_binary_int (os:out_channel) (x:int) = 
-    match !!os with 
-    | BinaryW bw -> bw.Write x
-    | _ -> failwith "output_binary_int: not a binary stream"
-
-let set_binary_mode_out (os:out_channel) b = 
-    match !!os with 
-    | StreamW _ when not b -> ()
-    | BinaryW _ when b -> ()
-    | BinaryW bw -> 
-            os <--  stream_to_StreamWriter defaultEncoding (OutChannel.to_Stream os)
-    | StreamW bw -> os <-- stream_to_BinaryWriter (OutChannel.to_Stream os)
-    | TextW _ when b -> failwith "cannot set this stream to binary mode"
-    | TextW _ -> ()
-
-let print_int (x:int)        = prim_output_int stdout x
-let print_float (x:float)    = prim_output_float stdout x
-let print_string (x:string)  = output_string stdout x
-let print_newline ()         = prim_output_newline stdout
-let print_endline (x:string) = print_string x; print_newline ()
-let print_char (c:char)      = output_char stdout c
-
-let prerr_int (x:int)        = prim_output_int stderr x
-let prerr_float (x:float)    = prim_output_float stderr x
-let prerr_string (x:string)  = output_string stderr x
-let prerr_newline ()         = prim_output_newline stderr
-let prerr_endline (x:string) = prerr_string x; prerr_newline ()
-let prerr_char (c:char)      = output_char stderr c
-
-#if FX_NO_BINARY_SERIALIZATION
-#else
-let output_value (os:out_channel) (x: 'a) = 
-    let formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter() in
-    formatter.Serialize(OutChannel.to_Stream os,box [x]);
-    flush os
-#endif
-
-let (!!!) (c : in_channel) = 
-    match c with 
-    | :? InChannelImpl as c -> c.Reader
-    | :? StreamReader as sr -> StreamR sr
-    | _ -> TextR (fun () -> c)
-let (<---) (c: in_channel) r = 
-    match c with 
-    | :? InChannelImpl as c -> c.Reader<- r
-    | _ -> failwith "the mode may only be adjusted channels created with one of the Pervasives.open_* functions"
-
-let mk_BinaryReader (s: Stream) = BinaryR (new BinaryReader(s))
-let mk_StreamReader e (s: Stream) = StreamR (new StreamReader(s, e,false))
-module InChannel = 
-
-    let of_Stream (e:Encoding) (s: Stream) =   new InChannelImpl(mk_StreamReader e s) :> in_channel
-    let of_StreamReader w =
-      new InChannelImpl (StreamR w) :> in_channel
-
-    let of_BinaryReader r =
-      new InChannelImpl (BinaryR r) :> in_channel
-      
-    let of_TextReader (r: TextReader) =
-      let absr = 
-        match r with 
-        | :? StreamReader as sr -> StreamR sr
-        | tr -> TextR (fun () -> tr) in
-      new InChannelImpl(absr) :> in_channel
-
-    let to_StreamReader (c:in_channel) =
-      match !!!c with 
-      | StreamR sr -> sr
-      | _ -> failwith "to_StreamReader: cannot access a stream reader for this channel"
-      
-    let to_BinaryReader (is:in_channel) =
-      match !!!is with 
-      | BinaryR sr -> sr
-      | _ -> failwith "to_BinaryReader: cannot access a binary reader for this channel"
-      
-    let to_TextReader (is:in_channel) =
-      match !!!is with 
-      | TextR tr ->tr()
-      | _ -> is
-      
-    let to_Stream (is:in_channel) =
-      match !!!is with 
-      | BinaryR bw -> bw.BaseStream
-      | StreamR sw -> sw.BaseStream
-      | _ -> failwith "cannot seek, set position or calculate length of this stream"
-
-// permissions are ignored 
-let open_in_gen flags (perm:int) (s:string) = 
-    let access = 
-      match listContains Open_rdonly flags, listContains Open_wronly flags with
-      | true, true -> invalidArg "flags" "invalid access"
-      | true, false -> FileAccess.Read 
-      | false, true -> invalidArg "flags" "invalid access for reading"
-      | false, false -> FileAccess.ReadWrite 
-    let mode = 
-      match listContains Open_excl flags,listContains Open_append flags, listContains Open_creat flags, listContains Open_trunc flags with
-      | false,false,false,false -> FileMode.Open
-      | _ -> invalidArg "flags" "invalid mode for reading" 
-    let share = FileShare.Read 
-    let bufferSize = 0x1000 
-#if FX_NO_NONBLOCK_IO
-    let stream = new FileStream(s,mode,access,share,bufferSize) :> Stream 
-#else
-    let allowAsync = listContains Open_nonblock flags 
-    let stream = new FileStream(s,mode,access,share,bufferSize,allowAsync) :> Stream 
-#endif
-    match listContains Open_binary flags, listContains Open_text flags with 
-    | true,true -> invalidArg "flags" "mixed text/binary flags specified"
-    | true,false -> new InChannelImpl (mk_BinaryReader stream ) :> in_channel
-    | false,_ ->
-        let encoding = List.tryPick (function Open_encoding e -> Some(e) | _ -> None) flags 
-        let encoding = match encoding with None -> defaultEncoding | Some e -> e 
-        InChannel.of_Stream encoding stream
-  
-let open_in_encoded (e:Encoding) (s:string) = open_in_gen [Open_text; Open_rdonly; Open_encoding e] 777 s
-let open_in_utf8 (s:string) = open_in_encoded Encoding.UTF8 s
-let open_in (s:string) = open_in_gen [Open_text; Open_rdonly] 777 s
-let open_in_bin (s:string) = open_in_gen [Open_binary; Open_rdonly] 777 s
-
-let close_in (is:in_channel) = 
-  match !!!is with 
-  | TextR tw -> (tw()).Close()
-  | BinaryR bw -> bw.Close()
-  | StreamR sw -> sw.Close()
-
-let input_line (is:in_channel) = 
-    match !!!is with 
-    | BinaryR bw -> failwith "input_line: binary mode"
-    | TextR tw -> match tw().ReadLine() with null -> raise End_of_file | res -> res
-    | StreamR sw -> match sw.ReadLine() with null -> raise End_of_file | res -> res
-
-let input_byte (is:in_channel) = 
-    match !!!is with 
-    | BinaryR bw ->  int (bw.ReadByte())
-    | TextR tr -> let b = (tr()).Read() in if b = -1 then raise End_of_file else int (byte b)
-    | StreamR sr -> let b = sr.Read() in if b = -1 then raise End_of_file else int (byte b)
-
-let prim_peek (is:in_channel) = 
-    match !!!is with 
-    | BinaryR bw ->  bw.PeekChar()
-    | TextR tr -> (tr()).Peek()
-    | StreamR sr -> sr.Peek()
-
-let prim_input_char (is:in_channel) = 
-    match !!!is with 
-    | BinaryR bw ->  (try int(bw.ReadByte()) with End_of_file -> -1)
-    | TextR tr -> (tr()).Read() 
-    | StreamR sr -> sr.Read()
-
-let input_char (is:in_channel) = 
-    match !!!is with 
-    | BinaryR bw ->  char_of_int (input_byte is)
-    | TextR tr -> let b = (tr()).Read() in if b = -1 then raise End_of_file else (char b)
-    | StreamR sr -> let b = sr.Read() in if b = -1 then raise End_of_file else (char b)
-
-let input_chars (is:in_channel) (buf:char[]) start len = 
-    match !!!is with 
-    | BinaryR bw ->  bw.Read(buf,start,len)
-    | TextR trf -> let tr = trf() in tr.Read(buf,start,len) 
-    | StreamR sr -> sr.Read(buf,start,len) 
-
-let seek_in (is:in_channel) (n:int) = 
-    begin match !!!is with 
-    | StreamR sw -> sw.DiscardBufferedData() 
-    | TextR _ | BinaryR _ -> ()
-    end;
-    ignore ((InChannel.to_Stream is).Seek(int64 n,SeekOrigin.Begin))
-
-let pos_in (is:in_channel)  = int32 ((InChannel.to_Stream is).Position)
-let in_channel_length (is:in_channel)  = int32 ((InChannel.to_Stream is).Length)
-
-let input_bytes_from_TextReader (tr : TextReader) (enc : Encoding) (buf: byte[]) (x:int) (len: int) = 
-    /// Don't read too many characters!
-    let lenc = (len * 99) / enc.GetMaxByteCount(100) in 
-    let charbuf : char[] = Array.zeroCreate lenc in
-    let nRead = tr.Read(charbuf,x,lenc) in
-    let count = enc.GetBytes(charbuf,x,lenc,buf,x) in
-    count
-
-let input (is: in_channel) (buf: byte[]) (x:int) (len: int) = 
-    match !!!is with 
-    | StreamR sr  ->  (InChannel.to_Stream is).Read(buf,x,len)
-    | TextR trf   -> 
-        input_bytes_from_TextReader (trf()) defaultEncoding buf x len  
-    | BinaryR br -> br.Read(buf,x,len)
-
-let really_input (is:in_channel) (buf: byte[]) (x:int) (len: int) = 
-    let mutable n = 0 
-    let mutable i = 1 
-    while (if i > 0 then n < len else false) do 
-        i <- input is buf (x+n) (len-n);
-        n <- n + i
-    
-let unsafe_really_input (is:in_channel) buf x len = really_input is buf x len
-
-let input_binary_int (is:in_channel) = 
-    match !!!is with 
-    | BinaryR bw -> bw.ReadInt32()
-    | _ -> failwith "input_binary_int: not a binary stream"
-
-let set_binary_mode_in (is:in_channel) b = 
-    match !!!is with 
-    | StreamR _ when not b -> ()
-    | BinaryR _ when b -> ()
-    | BinaryR bw -> is <---  mk_StreamReader defaultEncoding (InChannel.to_Stream is)
-    | StreamR bw -> is <--- mk_BinaryReader (InChannel.to_Stream is)
-    | TextR _ when b -> failwith "set_binary_mode_in: cannot set this stream to binary mode"
-    | TextR _ -> ()
-
-let read_line ()  = stdout.Flush(); input_line stdin
-let read_int ()   = int_of_string (read_line())
-let read_float () = float_of_string (read_line ())
-
-#if FX_NO_BINARY_SERIALIZATION
-#else
-let input_value (is:in_channel) = 
-    let formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter() 
-    let res = formatter.Deserialize(InChannel.to_Stream is) 
-    match ((unbox res) : 'a list) with 
-    | [x] -> x
-    | _ -> failwith "input_value: expected one item"
-#endif
-
-type InChannelImpl with 
-    override x.Dispose(deep:bool) = if deep then close_in (x :> in_channel)
-    override x.Peek() = prim_peek (x :> in_channel) 
-    override x.Read() = prim_input_char (x :> in_channel) 
-    override x.Read((buffer:char[]),(index:int),(count:int)) = input_chars (x :> in_channel) buffer index count
-    
-
-type OutChannelImpl with 
-    override x.Dispose(deep:bool) = if deep then close_out (x :> out_channel)
-    override x.Encoding = x.TextWriter.Encoding
-    override x.FormatProvider = x.TextWriter.FormatProvider
-    override x.NewLine = x.TextWriter.NewLine
-    []
-    override x.Write(s:string) = output_string (x :> out_channel) s
-    []
-    override x.Write(c:char) = output_char (x :> out_channel) c
-    []
-    override x.Write(c:char[]) = output_chars (x :> out_channel) c 0 c.Length
-    override x.Write((c:char[]),(index:int),(count:int)) = output_chars (x :> out_channel) c index count
-    
-// deprecated members
-let binary_reader_to_in_channel  x = InChannel.of_BinaryReader x
-let stream_reader_to_in_channel  x = InChannel.of_StreamReader x
-let text_reader_to_in_channel    x = InChannel.of_TextReader x
-let stream_to_in_channel     enc x = InChannel.of_Stream enc x
-let in_channel_to_stream         (x:in_channel) = InChannel.to_Stream x
-let in_channel_to_text_reader    (x:in_channel) = InChannel.to_TextReader x
-let in_channel_to_stream_reader  (x:in_channel) = InChannel.to_StreamReader x
-let in_channel_to_binary_reader  (x:in_channel) = InChannel.to_BinaryReader x
-let binary_writer_to_out_channel x = OutChannel.of_BinaryWriter x
-let stream_writer_to_out_channel x = OutChannel.of_StreamWriter x
-let text_writer_to_out_channel   x = OutChannel.of_TextWriter x
-let stream_to_out_channel    enc x = OutChannel.of_Stream enc x
-let out_channel_to_stream        (x:out_channel) = OutChannel.to_Stream x
-let out_channel_to_text_writer   (x:out_channel) = OutChannel.to_TextWriter x
-let out_channel_to_stream_writer (x:out_channel) = OutChannel.to_StreamWriter x
-let out_channel_to_binary_writer (x:out_channel) = OutChannel.to_BinaryWriter x
-
-type ('a,'b,'c,'d) format4 = Microsoft.FSharp.Text.Format<'a,'b,'c,'d>
-type ('a,'b,'c) format = Microsoft.FSharp.Text.Format<'a,'b,'c,'c>
-exception Exit
-
-
-let invalid_arg s = raise (System.ArgumentException(s))
-
-module Pervasives = 
-
-    let hash  (x: 'a) = LanguagePrimitives.GenericHash x
-
-#if FX_NO_EXIT
-#else
-    let exit (n:int) = Operators.exit n
-#endif
-
-    let incr x = x.contents <- x.contents + 1
-    let decr x = x.contents <- x.contents - 1
-
-    let (@) l1 l2 = l1 @ l2
-    // NOTE: inline to call site since LanguagePrimitives. have static type optimisation 
-    let (=)     (x:'a) (y:'a) = Operators.(=) x y
-    let (<>)    (x:'a) (y:'a) = Operators.(<>) x y 
-    let (<)     (x:'a) (y:'a) = Operators.(<) x y
-    let (>)     (x:'a) (y:'a) = Operators.(>) x y
-    let (<=)    (x:'a) (y:'a) = Operators.(<=) x y
-    let (>=)    (x:'a) (y:'a) = Operators.(>=) x y
-    let min     (x:'a) (y:'a) = Operators.min x y
-    let max     (x:'a) (y:'a) = Operators.max x y
-    let compare (x:'a) (y:'a) = LanguagePrimitives.GenericComparison x y
-
-    let (~+) x = Operators.(~+) x
-    //  inline (~-) x = LanguagePrimitives.(~-) x 
-
-    let (+) (x:int) (y:int)   = Operators.(+) x y
-    let (-) (x:int) (y:int)   = Operators.(-) x y
-    let ( * ) (x:int) (y:int) = Operators.( * ) x y
-    let (/) (x:int) (y:int)   = Operators.(/) x y
-    let not (b:bool) = Operators.not b
-    type 'a ref = Microsoft.FSharp.Core.Ref<'a>
-    type 'a option = Microsoft.FSharp.Core.Option<'a>
-    type 'a list = Microsoft.FSharp.Collections.List<'a>
-    type exn = System.Exception
-    exception Failure = Microsoft.FSharp.Core.Failure
-    let raise (e:exn) = Operators.raise e
-    let failwith s = raise (Failure s)
-    let fst (x,y) = x
-    let snd (x,y) = y
-
-    let ref x = { contents=x }
-    let (!) x = x.contents
-    let (:=) x y = x.contents <- y
-
-    let float (x:int) =  Operators.float x
-    let float32 (n:int) =  Operators.float32 n
-    let abs (x:int) = Operators.abs x
-    let ignore x = ()
-    let invalid_arg s = raise (System.ArgumentException(s))
-    let (^) (x:string) (y:string) = System.String.Concat(x,y)
-    let sqrt      (x:float)           = Operators.sqrt x
-    let exp       (x:float)           = Operators.exp x
-    let log       (x:float)           = Operators.log x
-    let log10     (x:float)           = Operators.log10 x
-    let cos       (x:float)           = Operators.cos x
-    let sin       (x:float)           = Operators.sin x
-    let tan       (x:float)           = Operators.tan x
-    let acos      (x:float)           = Operators.acos x
-    let asin      (x:float)           = Operators.asin x
-    let atan      (x:float)           = Operators.atan x
-    let atan2     (x:float) (y:float) = Operators.atan2 x y
-    let cosh      (x:float)           = Operators.cosh x
-    let sinh      (x:float)           = Operators.sinh x
-    let tanh      (x:float)           = Operators.tanh x
-    let ceil      (x:float)           = Operators.ceil x
-    let floor     (x:float)           = Operators.floor x
-
-    let ( ** ) (x:float) (y:float) = Operators.( ** ) x y
-    let truncate (x:float) = Operators.int32 x
-    let nan          = System.Double.NaN 
-    let infinity     = System.Double.PositiveInfinity
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/pervasives.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/pervasives.fsi
deleted file mode 100644
index e6c2df6a..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/pervasives.fsi
+++ /dev/null
@@ -1,850 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008. The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match. The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-///Pervasives: Additional OCaml-compatible bindings 
-#if INTERNALIZED_POWER_PACK
-module (* internal *) Internal.Utilities.Pervasives
-#else
-module Microsoft.FSharp.Compatibility.OCaml.Pervasives
-#endif
-
-#nowarn "62" // compatibility warnings
-#nowarn "35"  // 'deprecated' warning about redefining '<' etc.
-#nowarn "86"  // 'deprecated' warning about redefining '<' etc.
-
-open System
-open System.IO
-open System.Collections.Generic
-open Microsoft.FSharp.Core
-
-//--------------------------------------------------------------------------
-//Pointer (physical) equality and hashing.
-
-///Reference/physical equality. 
-///True if boxed versions of the inputs are reference-equal, OR if
-///both are value types and the implementation of Object.Equals for the type
-///of the first argument returns true on the boxed versions of the inputs. 
-///
-///In normal use on reference types or non-mutable value types this function 
-///has the following properties:
-///   - returns 'true' for two F# values where mutation of data
-///     in mutable fields of one affects mutation of data in the other
-///   - will return 'true' if (=) returns true
-///   - hashq will return equal hashes if (==) returns 'true'
-///
-///The use on mutable value types is not recommended.
-[]
-val inline (==): 'a -> 'a -> bool
-/// Negation of the '==' operator, see also Obj.eq
-[ y' or 'not(LanguagePrimitives.PhysicalEquality x y)'")>]
-val inline (!=): 'a -> 'a -> bool
-[]
-val inline (mod): int -> int -> int 
-[]
-val inline (land): int -> int -> int 
-[]
-val inline (lor) : int -> int -> int 
-[]
-val inline (lxor): int -> int -> int
-[]
-val inline lnot  : int -> int
-[]
-val inline (lsl): int -> int -> int
-[>> y' on an unsigned type instead of 'x lsr y'. The precedence of these operators differs, so you may need to add parentheses")>]
-val inline (lsr): int -> int -> int
-[>> y' instead of 'x asr y'. The precedence of these operators differs, so you may need to add parentheses")>]
-val inline (asr): int -> int -> int
-
-/// 1D Array element get-accessor ('getter')
-[]
-val inline ( .() ) : 'a array -> int -> 'a
-/// 1D Array element set-accessor ('setter')
-[]
-val inline ( .()<- ) : 'a array -> int -> 'a -> unit
-
-//--------------------------------------------------------------------------
-//Integer-specific arithmetic
-
-/// n-1 (no overflow checking)
-[]
-val pred: int -> int
-/// n+1 (no overflow checking)
-[]
-val succ: int -> int
-
-/// The lowest representable value in the 'int' type
-[]
-val min_int : int
-/// The highest representable value in the 'int' type
-[]
-val max_int : int
-
-/// Negation on integers of the 'int' type
-[]
-val int_neg : int -> int
-
-//--------------------------------------------------------------------------
-//Exceptions
-
-[]
-exception End_of_file = System.IO.EndOfStreamException
-[]
-exception Out_of_memory = System.OutOfMemoryException
-[]
-exception Division_by_zero = System.DivideByZeroException
-[]
-exception Stack_overflow = System.StackOverflowException 
-
-[]
-val Not_found<'a> : exn
-[]
-val (|Not_found|_|) : exn -> unit option
-
-[]
-exception Exit 
-
-///  Non-exhaustive match failures will raise Match failures
-/// A future release of F# may map this exception to a corresponding .NET exception.
-[]
-exception Match_failure = Microsoft.FSharp.Core.MatchFailure
-
-/// The exception thrown by 'assert' failures.
-/// A future release of F# may map this exception to a corresponding .NET exception.
-[]
-exception Assert_failure of string * int * int 
-
-/// The exception thrown by invalid_arg and misues of F# library functions
-[]
-val Invalid_argument : string -> exn
-[]
-val (|Invalid_argument|_|) : exn -> string option
-
-//--------------------------------------------------------------------------
-//Floating point.
-//
-//The following operators only manipulate 'float64' numbers. The operators  '+' etc. may also be used.
-
-/// This value is present primarily for compatibility with other versions of ML
-[]
-val ( *. ): float -> float -> float
-/// This value is present primarily for compatibility with other versions of ML. In F#
-/// the overloaded operators may be used.
-[]
-val ( +. ): float -> float -> float
-/// This value is present primarily for compatibility with other versions of ML. In F#
-/// the overloaded operators may be used.
-[]
-val ( -. ): float -> float -> float
-/// This value is present primarily for compatibility with other versions of ML. In F#
-/// the overloaded operators may be used.
-[]
-val ( ~-. ): float -> float
-/// This value is present primarily for compatibility with other versions of ML. In F#
-/// the overloaded operators may be used.
-[]
-val ( ~+. ): float -> float
-/// This value is present primarily for compatibility with other versions of ML. In F#
-/// the overloaded operators may be used.
-[]
-val ( /. ): float -> float -> float
-
-[]
-val abs_float: float -> float
-
-/// This value is present primarily for compatibility with other versions of ML
-/// The highest representable positive value in the 'float' type
-[]
-val max_float: float
-
-/// This value is present primarily for compatibility with other versions of ML
-/// The lowest non-denormalized positive IEEE64 float
-[]
-val min_float: float
-
-/// This value is present primarily for compatibility with other versions of ML
-/// The smallest value that when added to 1.0 gives a different value to 1.0
-[]
-val epsilon_float: float
-
-/// This value is present primarily for compatibility with other versions of ML
-[]
-val mod_float: float -> float -> float
-
-/// This value is present primarily for compatibility with other versions of ML
-[]
-val modf: float -> float * float
-
-/// This value is present primarily for compatibility with other versions of ML
-[]
-val neg_infinity: float
-
-[]
-val ldexp: float -> int -> float
-
-[]
-type fpclass = 
-  | FP_normal
-  | FP_zero
-  | FP_infinite
-  | FP_nan
-
-[]
-val classify_float: float -> fpclass
-
-//--------------------------------------------------------------------------
-//Common conversions. See also conversions such as
-//Float32.to_int etc.
-
-
-[]
-val bool_of_string: string -> bool
-
-[]
-val char_of_int: int -> char
-
-[]
-val int_of_char: char -> int
-
-[]
-val int_of_string: string -> int
-
-[]
-val int_of_float: float -> int
-
-[]
-val string_of_bool: bool -> string
-
-[]
-val string_of_float: float -> string
-
-[]
-val string_of_int: int -> string
-
-[]
-val float_of_int: int -> float
-
-[]
-val float_of_string: string -> float
-
-
-//--------------------------------------------------------------------------
-//I/O
-//
-//Caveat: These functions do not have precisely the same behaviour as 
-//corresponding functions in other ML implementations, e.g. OCaml. 
-//For example they may raise .NET exceptions rather than Sys_error.
-
-  
-/// This type is present primarily for compatibility with other versions of ML. When
-/// not cross-compiling we recommend using the .NET I/O libraries
-[]
-type open_flag = 
-  | Open_rdonly
-  | Open_wronly
-  | Open_append
-  | Open_creat
-  | Open_trunc
-  | Open_excl
-  | Open_binary
-  | Open_text
-#if FX_NO_NONBLOCK_IO
-#else
-  | Open_nonblock
-#endif
-  | Open_encoding of System.Text.Encoding
-
-//--------------------------------------------------------------------------
-
-
-/// A pseudo-abstraction over binary and textual input channels.
-/// OCaml-compatible channels conflate binary and text IO, and for this reasons their
-/// use from F# is somewhat deprecated (direct use of System.IO StreamReader, TextReader and 
-/// BinaryReader objects is preferred, e.g. see System.IO.File.OpenText). 
-/// Well-written OCaml-compatible code that simply opens either a channel in text or binary 
-/// mode and then does text or binary I/O using the OCaml-compatible functions below
-/// will work, though care must be taken with regard to end-of-line characters (see 
-/// input_char below).
-///
-/// This library pretends that an in_channel is just a System.IO.TextReader. Channel values
-/// created using open_in_bin maintain a private System.IO.BinaryReader, which will be used whenever
-/// you do I/O using this channel. 
-///
-/// InChannel.of_BinaryReader and InChannel.of_StreamReader allow you to build input 
-/// channels out of the corresponding .NET abstractions.
-[]
-type in_channel = System.IO.TextReader
-    
-
-/// Open the given file to read. 
-///
-///In the absence of an explicit encoding (e.g. using Open_encoding) open_in
-///uses the default text encoding (System.Text.Encoding.Default). If you want to read a file
-///regardless of encoding then you should use binary modes. Note that .NET's 
-///"new StreamReader" function defaults to use a utf8 encoding, and also attempts
-///to determine an automatic encoding by looking for "byteorder-marks" at the head
-///of a text file. This function does not do this.
-///
-/// No CR-LF translation is done on input.
-[]
-val open_in: path:string -> in_channel
-
-/// Open the given file to read in text-mode using the UTF8 encoding
-[]
-val open_in_utf8: path:string -> in_channel
-
-/// Open the given file to read in binary-mode 
-[]
-val open_in_bin: path:string -> in_channel
-
-/// Open the given file in the mode specified by the given flags
-[]
-val open_in_gen: flags: open_flag list -> int -> path:string -> in_channel
-
-/// Close the channel
-[]
-val close_in: channel:in_channel -> unit
-
-/// Return the length of the input channel
-[]
-val in_channel_length: channel:in_channel -> int
-
-/// Attempt to input the given number of bytes from the channel, writing them into the
-/// buffer at the given start position. Does not block if the bytes are not available.
-///
-/// The use of this function with a channel performing byte-to-character translation (e.g. one
-/// created with open_in, open_in_utf8 or open_in_encoded, or one 
-/// or built from a StreamReader or TextReader) is not recommended.
-/// Instead, open the channel using open_in_bin or InChannel.of_BinaryReader.
-///
-/// If used with a StreamReader channel, i.e. one created using 
-/// open_in, open_in_utf8 or open_in_encoded, or one 
-/// or built from a StreamReader, this function reads bytes directly from the underlying
-/// BaseStream. This may not be appropriate if any other input techniques are being
-/// used on the channel.
-///
-/// If used with a TextReader channel (e.g. stdin), this function reads characters from the
-/// stream and then fills some of the byte array with the decoding of these into 
-/// bytes, where the decoding is performed using the System.Text.Encoding.Default encoding
-///
-/// Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
-[]
-val input: channel:in_channel -> buffer:byte[] -> index:int -> count:int -> int
-
-/// Attempt to input characters from a channel. Does not block if inpout is not available.
-/// Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
-///
-/// No CRLF translation is done on input, even in text mode. That is, if an input file
-/// has '\r\n' (CRLF) line terminators both characters will be seen in the input.
-[]
-val input_chars: channel:in_channel -> buffer:char[] -> index:int -> count:int -> int
-
-/// Input a binary integer from a binary channel. Compatible with output_binary_int.
-[]
-val input_binary_int: channel:in_channel -> int
-
-/// Input a single byte. 
-/// For text channels this only accepts characters with a UTF16 encoding that fits in a byte, e.g. ASCII.
-/// Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
-[]
-val input_byte: channel:in_channel -> int
-
-/// Input a single character. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
-[]
-val input_char: channel:in_channel -> char
-
-/// Input a single line. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
-[]
-val input_line: channel:in_channel -> string
-
-#if FX_NO_BINARY_SERIALIZATION
-#else
-/// Input a single serialized value from a binary stream. Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
-[]
-val input_value: channel:in_channel -> 'a
-#endif
-/// Report the current position in the input channel
-[]
-val pos_in: channel:in_channel -> int
-
-/// Reads bytes from the channel. Blocks if the bytes are not available.
-/// See 'input' for treatment of text channels.
-/// Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
-[]
-val really_input: channel:in_channel -> buffer:byte[] -> index:int -> count:int -> unit
-
-/// Reads bytes from the channel. Blocks if the bytes are not available.
-/// For text channels this only accepts UTF-16 bytes with an encoding less than 256.
-/// Raise End_of_file (= System.IO.EndOfStreamException) if end of file reached.
-[]
-val seek_in: channel:in_channel -> int -> unit
-
-/// Set the binary mode to true or false. If the binary mode is changed from "true" to 
-/// "false" then a StreamReader is created to read the binary stream. The StreamReader uses 
-/// the default text encoding System.Text.Encoding.Default
-[]
-val set_binary_mode_in: channel:in_channel -> bool -> unit
-
-[]
-val unsafe_really_input: channel:in_channel -> byte[] -> int -> int -> unit
-
-//--------------------------------------------------------------------------
-//Output channels (out_channel). 
-
-/// An pseudo-abstraction over binary and textual output channels.
-/// OCaml-compatible channels conflate binary and text IO, and for this reasons their
-/// use from F# is somewhat deprecated The direct use of System.IO StreamWriter, TextWriter and 
-/// BinaryWriter objects is preferred, e.g. see System.IO.File.CreateText). Well-written OCaml code 
-/// that simply opens either a channel in text or binary mode and then does text 
-/// or binary I/O using the OCaml functions will work, though care must 
-/// be taken with regard to end-of-line characters (see output_char below).
-///
-/// This library pretends that an out_channel is just a System.IO.TextWriter. Channels
-/// created using open_out_bin maintain a private System.IO.BinaryWriter, which will be used whenever
-/// do I/O using this channel. 
-[]
-type out_channel  = System.IO.TextWriter
-
-/// Open the given file to write in text-mode using the
-/// System.Text.Encoding.Default encoding
-///
-/// See output_char for a description of CR-LF translation
-/// done on output.
-[]
-val open_out: path:string -> out_channel
-
-/// Open the given file to write in text-mode using the given encoding
-[]
-val open_out_encoded:  encoding: System.Text.Encoding -> path:string -> out_channel
-
-/// Open the given file to write in text-mode using the UTF8 encoding
-[]
-val open_out_utf8: path:string -> out_channel
-
-/// Open the given file to write in binary-mode 
-[]
-val open_out_bin: path:string -> out_channel
-
-/// Open the given file to write in the mode according to the specified flags
-[]
-val open_out_gen: open_flag list -> int -> path:string -> out_channel
-
-/// Close the given output channel
-[]
-val close_out: channel:out_channel -> unit
-
-/// Return the length of the output channel. 
-/// Raise an exception if not an app
-[]
-val out_channel_length: channel:out_channel -> int
-
-/// Write the given range of bytes to the output channel. 
-[]
-val output: channel:out_channel -> bytes:byte[] -> index:int -> count:int -> unit
-
-/// Write the given integer to the output channel in binary format.
-/// Only valid on binary channels.
-[]
-val output_binary_int: channel:out_channel -> int:int -> unit
-
-/// Write the given byte to the output channel. No CRLF translation is
-/// performed.
-[]
-val output_byte: channel:out_channel -> byte:int -> unit
-
-/// Write all the given bytes to the output channel. No CRLF translation is
-/// performed.
-[]
-val output_bytearray: channel:out_channel -> bytes:byte[] -> unit
-
-/// Write the given Unicode character to the output channel. 
-///
-/// If the output channel is a binary stream and the UTF-16 value of the Unicode character is greater
-/// than 255 then ArgumentException is thrown.
-///
-/// No CRLF translation is done on output. That is, if the output character is
-/// '\n' (LF) characters they will not be written as '\r\n' (CRLF) characters, regardless
-/// of whether the underlying operating system or output stream uses CRLF as the default
-/// line-feed character.
-[]
-val output_char: channel:out_channel -> char -> unit
-
-/// Write the given Unicode string to the output channel. See output_char for the treatment of
-/// '\n' characters within the string.
-[]
-val output_string: channel:out_channel -> string -> unit
-
-#if FX_NO_BINARY_SERIALIZATION
-#else
-/// Serialize the given value to the output channel.
-[]
-val output_value: channel:out_channel -> 'a -> unit
-#endif
-/// Return the current position in the output channel, measured from the
-/// start of the channel. Not valid on all channels.
-[]
-val pos_out: channel:out_channel -> int
-
-/// Set the current position in the output channel, measured from the
-/// start of the channel.
-[]
-val seek_out: channel:out_channel -> int -> unit
-
-/// Set the binary mode. If the binary mode is changed from "true" to 
-/// "false" then a StreamWriter is created to write the binary stream. The StreamWriter uses 
-/// the default text encoding System.Text.Encoding.Default.
-[]
-val set_binary_mode_out: channel:out_channel -> bool -> unit
-
-/// Flush all pending output on the channel to the physical
-/// output device.
-[]
-val flush: channel:out_channel -> unit
-
-//--------------------------------------------------------------------------
-//Printing data to stdout/stderr
-
-
-/// Print a character to the stderr stream
-[]
-val prerr_char: char -> unit
-[]
-val prerr_endline: string -> unit
-[]
-val prerr_float: float -> unit
-[]
-val prerr_int: int -> unit
-[]
-val prerr_newline: unit -> unit
-[]
-val prerr_string: string -> unit
-
-[]
-val print_char: char -> unit
-//[]
-val print_endline: string -> unit
-[]
-val print_float: float -> unit
-[]
-val print_int: int -> unit
-
-[]
-val print_newline: unit -> unit
-[]
-val print_string: string -> unit
-
-//--------------------------------------------------------------------------
-//Reading data from the console.
-
-
-///Read a floating point number from the console.
-[ float' instead")>]
-val read_float: unit -> float
-
-///Read an integer from the console.
-[ int' instead")>]
-val read_int: unit -> int
-
-///Read a line from the console, without the end-of-line character.
-[]
-val read_line: unit -> string
-
-
-//--------------------------------------------------------------------------
-
-
-[]
-module InChannel =
-    ///Link .NET IO with the out_channel/in_channel model
-    []
-    val to_Stream: in_channel -> System.IO.Stream
-
-    /// Access the underlying stream-based objects for the channel
-    []
-    val to_TextReader: in_channel -> System.IO.TextReader
-
-    /// Access the underlying stream-based objects for the channel
-    []
-    val to_StreamReader: in_channel -> System.IO.StreamReader
-    /// Access the underlying stream-based objects for the channel
-    []
-    val to_BinaryReader: in_channel -> System.IO.BinaryReader
-
-    ///Link .NET IO with the out_channel/in_channel model
-    []
-    val of_BinaryReader: System.IO.BinaryReader -> in_channel
-    ///Link .NET IO with the out_channel/in_channel model
-    []
-    val of_StreamReader: System.IO.StreamReader -> in_channel
-    ///Link .NET IO with the out_channel/in_channel model
-    []
-    val of_TextReader: System.IO.TextReader -> in_channel
-    /// Wrap a stream by creating a StreamReader for the 
-    /// stream and then wrapping is as an input channel.
-    /// A text encoding must be given, e.g. System.Text.Encoding.UTF8
-    []
-    val of_Stream:  System.Text.Encoding -> System.IO.Stream -> in_channel
-
-    
-[]
-module OutChannel =
-    ///Link .NET IO with the out_channel/in_channel model
-    []
-    val of_BinaryWriter: System.IO.BinaryWriter -> out_channel
-    ///Link .NET IO with the out_channel/in_channel model
-    []
-    val of_StreamWriter: System.IO.StreamWriter -> out_channel
-    ///Link .NET IO with the out_channel/in_channel model
-    []
-    val of_TextWriter: System.IO.TextWriter -> out_channel
-
-    /// Wrap a stream by creating a StreamWriter for the 
-    /// stream and then wrapping is as an output channel.
-    /// A text encoding must be given, e.g. System.Text.Encoding.UTF8
-    []
-    val of_Stream: System.Text.Encoding -> System.IO.Stream -> out_channel
-
-    /// Access the underlying stream-based objects for the channel
-    []
-    val to_Stream: out_channel -> System.IO.Stream
-    /// Access the underlying stream-based objects for the channel
-    []
-    val to_TextWriter: out_channel -> System.IO.TextWriter
-    /// Access the underlying stream-based objects for the channel
-    []
-    val to_StreamWriter: out_channel -> System.IO.StreamWriter
-    /// Access the underlying stream-based objects for the channel
-    []
-    val to_BinaryWriter: out_channel -> System.IO.BinaryWriter
-
-[]
-val binary_reader_to_in_channel: System.IO.BinaryReader -> in_channel
-[]
-val binary_writer_to_out_channel: System.IO.BinaryWriter -> out_channel
-[]
-val stream_reader_to_in_channel: System.IO.StreamReader -> in_channel
-[]
-val stream_writer_to_out_channel: System.IO.StreamWriter -> out_channel
-[]
-val text_reader_to_in_channel: System.IO.TextReader -> in_channel
-[]
-val text_writer_to_out_channel: System.IO.TextWriter -> out_channel
-[]
-val stream_to_in_channel:  System.Text.Encoding -> System.IO.Stream -> in_channel
-[]
-val stream_to_out_channel: System.Text.Encoding -> System.IO.Stream -> out_channel
-[]
-val in_channel_to_stream: in_channel -> System.IO.Stream
-[]
-val in_channel_to_text_reader: in_channel -> System.IO.TextReader
-[]
-val in_channel_to_stream_reader: in_channel -> System.IO.StreamReader
-[]
-val in_channel_to_binary_reader: in_channel -> System.IO.BinaryReader
-[]
-val out_channel_to_stream: out_channel -> System.IO.Stream
-[]
-val out_channel_to_text_writer: out_channel -> System.IO.TextWriter
-[]
-val out_channel_to_stream_writer: out_channel -> System.IO.StreamWriter
-[]
-val out_channel_to_binary_writer: out_channel -> System.IO.BinaryWriter
-
-
-[ instead")>]
-type ('a,'b,'c,'d) format4 = Microsoft.FSharp.Text.Format<'a,'b,'c,'d>
-[ instead")>]
-type ('a,'b,'c) format = Microsoft.FSharp.Text.Format<'a,'b,'c,'c>
-
-/// Throw an Invalid_argument exception
-val invalid_arg: string -> 'a
-
-
-//--------------------------------------------------------------------------
-// OCaml path-lookup compatibility. All these constructs are in scope already
-// for F# from Microsoft.FSharp.Operators and elsewhere. This module 
-// is Microsoft.FSharp.Compatibility.OCaml.Pervasives.Pervasives and is only included 
-// to resolve references in OCaml code written "compare" etc.
-// We hide these away in the sub-module called "Pervasives" because we don't
-// particularly want normal references such as "compare" to resolve to the 
-// values in Pervasives.
-
-
-[]
-module Pervasives = 
-    //--------------------------------------------------------------------------
-    // Comparison based on F# term structure and/or calls to System.IComparable
-
-    ///Structural less-than comparison
-    []
-    val (<): 'a -> 'a -> bool
-    ///Structural less-than-or-equal comparison
-    []
-    val (<=): 'a -> 'a -> bool
-    ///Structural inequality
-    []
-    val (<>): 'a -> 'a -> bool
-    ///Structural equality
-    []
-    val (=): 'a -> 'a -> bool
-    ///Structural greater-than
-    []
-    val (>): 'a -> 'a -> bool
-    ///Structural greater-than-or-equal
-    []
-    val (>=): 'a -> 'a -> bool
-
-    ///Structural comparison
-    []
-    val compare: 'a -> 'a -> int
-    ///Maximum based on structural comparison
-    []
-    val max: 'a -> 'a -> 'a
-    ///Minimum based on structural comparison
-    []
-    val min: 'a -> 'a -> 'a
-
-    ///The "hash" function is a structural hash function. It is 
-    ///designed to return equal hash values for items that are 
-    ///equal according to the polymorphic equality 
-    ///function Pervasives.(=) (i.e. the standard "=" operator).
-    []
-    val hash: 'a -> int
-
-    []
-    val (+)  : int -> int -> int
-    []
-    val (-)  : int -> int -> int
-    []
-    val ( * ): int -> int -> int
-    []
-    val (/)  : int -> int -> int
-
-    ///Absolute value of the given integer
-    []
-    val abs : int -> int
-
-    ///Dereference a mutable reference cell
-    []
-    val (!) : 'a ref -> 'a
-
-    ///Assign to a mutable reference cell
-    []
-    val (:=): 'a ref -> 'a -> unit
-
-    ///Create a mutable reference cell
-    []
-    val ref : 'a -> 'a ref
-
-    /// Throw a 'Failure' exception
-    []
-    val failwith: string -> 'a
-
-    /// Throw an exception
-    []
-    val raise: exn -> 'a
-
-    []
-    val fst: ('a * 'b) -> 'a
-    []
-    val snd: ('a * 'b) -> 'b
-
-    []
-    val ignore: 'a -> unit
-    []
-    val not: bool -> bool
-
-    ///Decrement a mutable reference cell containing an integer
-    []
-    val decr: int ref -> unit
-
-    ///Increment a mutable reference cell containing an integer
-    []
-    val incr: int ref -> unit
-    
-#if FX_NO_EXIT
-#else
-    ///Exit the current hardware isolated process, if security settings permit,
-    ///otherwise raise an exception. Calls System.Environment.Exit.
-    []
-    val exit: int -> 'a   
-#endif
-    /// Concatenate two strings. The overlaoded operator '+' may also be used.
-    []
-    val (^): string -> string -> string
-    /// Concatenate two lists.
-    []
-    val (@): 'a list -> 'a list -> 'a list
-
-    /// The exception thrown by failure and many other F# functions
-    /// A future release of F# may map this exception to a corresponding .NET exception.
-    []
-    exception Failure = Microsoft.FSharp.Core.Failure
-
-    []
-    val float: int -> float
-    []
-    val acos: float -> float
-    []
-    val asin: float -> float
-    []
-    val atan: float -> float
-    []
-    val atan2: float -> float -> float
-    []
-    val ceil: float -> float
-    []
-    val exp: float -> float
-
-    []
-    val floor: float -> float
-    []
-    val log: float -> float
-    []
-    val log10: float -> float
-    []
-    val sqrt: float -> float
-
-    []
-    val cos: float -> float
-    []
-    val cosh: float -> float
-    []
-    val sin: float -> float
-    []
-    val sinh: float -> float
-    []
-    val tan: float -> float
-    []
-    val tanh: float -> float
-    []
-    val truncate: float -> int
-
-    []
-    val ( **  ): float -> float -> float
-
-    []
-    val nan: float
-
-    []
-    val infinity: float
-
-    ///The type of pointers to mutable reference cells
-    []
-    type 'a ref = Microsoft.FSharp.Core.Ref<'a>
-
-    ///The type of None/Some options
-    []
-    type 'a option = Microsoft.FSharp.Core.Option<'a>
-
-    ///The type of simple immutable lists 
-    []
-    type 'a list = Microsoft.FSharp.Collections.List<'a>
-
-    []
-    type exn = System.Exception
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-lexing.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-lexing.fs
deleted file mode 100644
index c08eacef..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-lexing.fs
+++ /dev/null
@@ -1,382 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-#nowarn "47" // recursive initialization of LexBuffer
-
-#if INTERNALIZED_POWER_PACK
-namespace Internal.Utilities.Text.Lexing
-
-#else
-namespace Microsoft.FSharp.Text.Lexing 
-#endif
-
-    open Microsoft.FSharp.Core
-    open Microsoft.FSharp.Collections
-    open System.Collections.Generic
-
-    type Position = 
-        { pos_fname : string;
-          pos_lnum : int;
-          pos_bol : int;
-          pos_cnum : int; }
-        member x.FileName = x.pos_fname
-        member x.Line = x.pos_lnum
-        member x.Char = x.pos_cnum
-        member x.AbsoluteOffset = x.pos_cnum
-        member x.StartOfLine = x.pos_bol
-        member x.StartOfLineAbsoluteOffset = x.pos_bol
-        member x.Column = x.pos_cnum - x.pos_bol
-        member pos.NextLine = {pos with pos_lnum = pos.Line+1; pos_bol = pos.AbsoluteOffset }
-        member pos.EndOfToken(n) = {pos with pos_cnum=pos.pos_cnum + n }
-        member pos.AsNewLinePos() = pos.NextLine
-        member pos.ShiftColumnBy(by) = {pos with pos_cnum = pos.pos_cnum + by}
-        static member Empty = {pos_fname=""; pos_lnum= 0; pos_bol= 0; pos_cnum=0 }
-        static member FirstLine(filename) = {pos_fname=filename; pos_lnum= 1; pos_bol= 0; pos_cnum=0 }
-
-    type LexBufferFiller<'char> = 
-        { fillSync : (LexBuffer<'char> -> unit) option
-          fillAsync : (LexBuffer<'char> -> Async) option } 
-        
-    and []
-        LexBuffer<'char>(filler: LexBufferFiller<'char>) as this = 
-        let context = new Dictionary(1) in 
-        let extendBufferSync = (fun () -> match filler.fillSync with Some refill -> refill this | None -> invalidOp "attempt to read synchronously from an asynchronous lex buffer")
-        let extendBufferAsync = (fun () -> match filler.fillAsync with Some refill -> refill this | None -> invalidOp "attempt to read asynchronously from a synchronous lex buffer")
-        let mutable buffer=[||];
-        /// number of valid charactes beyond bufferScanStart 
-        let mutable bufferMaxScanLength=0;
-        /// count into the buffer when scanning 
-        let mutable bufferScanStart=0;
-        /// number of characters scanned so far 
-        let mutable bufferScanLength=0;
-        /// length of the scan at the last accepting state 
-        let mutable lexemeLength=0;
-        /// action related to the last accepting state 
-        let mutable bufferAcceptAction=0;
-        let mutable eof = false;
-        let mutable startPos = Position.Empty ;
-        let mutable endPos = Position.Empty
-
-        let getLexemeChar () n =  buffer.[n+bufferScanStart]
-        let getLexeme () = buffer.[bufferScanStart..bufferScanStart+lexemeLength-1]
-        let getLexemeLength () = lexemeLength
-          
-        // Throw away all the input besides the lexeme 
-              
-        let discardInput () = 
-            let keep = Array.sub buffer bufferScanStart bufferScanLength
-            let nkeep = keep.Length 
-            Array.blit keep 0 buffer 0 nkeep;
-            bufferScanStart <- 0;
-            bufferMaxScanLength <- nkeep
-                 
-              
-        member lexbuf.EndOfScan () : int =
-            // Printf.eprintf "endOfScan, lexBuffer.lexemeLength = %d\n" lexBuffer.lexemeLength;
-            if bufferAcceptAction < 0 then 
-                failwith "unrecognized input"
-
-            //  Printf.printf "endOfScan %d state %d on unconsumed input '%c' (%d)\n" a s (Char.chr inp) inp;
-            //   Printf.eprintf "accept, lexeme = %s\n" (lexeme lexBuffer); 
-            lexbuf.StartPos <- endPos;
-            lexbuf.EndPos <- endPos.EndOfToken(lexbuf.LexemeLength);
-            bufferAcceptAction
-
-        member lexbuf.StartPos
-           with get() = startPos
-           and  set(b) =  startPos <- b
-           
-        member lexbuf.EndPos 
-           with get() = endPos
-           and  set(b) =  endPos <- b
-
-        member lexbuf.Lexeme         = Array.sub buffer bufferScanStart lexemeLength
-        member lexbuf.LexemeChar(n)  = buffer.[n+bufferScanStart]
-        
-        member lexbuf.BufferLocalStore = (context :> IDictionary<_,_>)
-        member lexbuf.LexemeLength        with get() : int = lexemeLength    and set v = lexemeLength <- v
-        member internal lexbuf.Buffer              with get() : 'char[] = buffer              and set v = buffer <- v
-        member internal lexbuf.BufferMaxScanLength with get() = bufferMaxScanLength and set v = bufferMaxScanLength <- v
-        member internal lexbuf.BufferScanLength    with get() = bufferScanLength    and set v = bufferScanLength <- v
-        member internal lexbuf.BufferScanStart     with get() : int = bufferScanStart     and set v = bufferScanStart <- v
-        member internal lexbuf.BufferAcceptAction  with get() = bufferAcceptAction  and set v = bufferAcceptAction <- v
-        member internal lexbuf.RefillBuffer = extendBufferSync
-        member internal lexbuf.AsyncRefillBuffer = extendBufferAsync
-
-        static member LexemeString(lexbuf:LexBuffer) = 
-            new System.String(lexbuf.Buffer,lexbuf.BufferScanStart,lexbuf.LexemeLength)
-
-        member lexbuf.IsPastEndOfStream 
-           with get() = eof
-           and  set(b) =  eof <- b
-
-        member lexbuf.DiscardInput() = discardInput ()
-
-        member x.BufferScanPos = bufferScanStart + bufferScanLength
-
-        member lexbuf.EnsureBufferSize n = 
-            if lexbuf.BufferScanPos + n >= buffer.Length then 
-                let repl = Array.zeroCreate (lexbuf.BufferScanPos + n) 
-                Array.blit buffer bufferScanStart repl bufferScanStart bufferScanLength;
-                buffer <- repl
-
-        static member FromReadFunctions (syncRead : ('char[] * int * int -> int) option, asyncRead : ('char[] * int * int -> Async) option) : LexBuffer<'char> = 
-            let extension= Array.zeroCreate 4096
-            let fillers = 
-                { fillSync = 
-                    match syncRead with 
-                    | None -> None
-                    | Some read -> 
-                         Some (fun lexBuffer -> 
-                             let n = read(extension,0,extension.Length)
-                             lexBuffer.EnsureBufferSize n;
-                             Array.blit extension 0 lexBuffer.Buffer lexBuffer.BufferScanPos n;
-                             lexBuffer.BufferMaxScanLength <- lexBuffer.BufferScanLength + n); 
-                  fillAsync = 
-                    match asyncRead with 
-                    | None -> None
-                    | Some read -> 
-                         Some (fun lexBuffer -> 
-                                  async { 
-                                      let! n = read(extension,0,extension.Length)
-                                      lexBuffer.EnsureBufferSize n;
-                                      Array.blit extension 0 lexBuffer.Buffer lexBuffer.BufferScanPos n;
-                                      lexBuffer.BufferMaxScanLength <- lexBuffer.BufferScanLength + n }) }
-            new LexBuffer<_>(fillers)
-
-        // A full type signature is required on this method because it is used at more specific types within its own scope
-        static member FromFunction (f : 'char[] * int * int -> int) : LexBuffer<'char> =  LexBuffer<_>.FromReadFunctions(Some(f),None)
-        static member FromAsyncFunction (f : 'char[] * int * int -> Async) : LexBuffer<'char> =  LexBuffer<_>.FromReadFunctions(None,Some(f))
-              
-        static member FromCharFunction f : LexBuffer = 
-            LexBuffer.FromFunction(fun (buff,start,len) -> 
-                let buff2 = Array.zeroCreate len
-                let n = f buff2 len 
-                Array.blit buff2 0 buff start len
-                n)
-        static member FromByteFunction f : LexBuffer = 
-            LexBuffer.FromFunction(fun (buff,start,len) -> 
-                let buff2 = Array.zeroCreate len
-                let n = f buff2 len 
-                Array.blit buff2 0 buff start len
-                n)
-
-        // A full type signature is required on this method because it is used at more specific types within its own scope
-        static member FromArray (s: 'char[]) : LexBuffer<'char> = 
-            let lexBuffer = 
-                new LexBuffer<_> 
-                    { fillSync = Some (fun _ -> ()); 
-                      fillAsync = Some (fun _ -> async { return () }) }
-            let buffer = Array.copy s 
-            lexBuffer.Buffer <- buffer;
-            lexBuffer.BufferMaxScanLength <- buffer.Length;
-            lexBuffer
-
-        static member FromBytes    (arr) = LexBuffer.FromArray(arr)
-        static member FromChars    (arr) = LexBuffer.FromArray(arr) 
-
-        static member FromTextReader (tr:System.IO.TextReader)  : LexBuffer = 
-           LexBuffer.FromFunction(tr.Read) 
-
-        static member FromBinaryReader (br:System.IO.BinaryReader)  : LexBuffer = 
-           LexBuffer.FromFunction(br.Read) 
-
-        static member FromStream (stream:System.IO.Stream)  : LexBuffer = 
-           LexBuffer.FromReadFunctions(Some(stream.Read),Some(fun (buf,offset,len) -> stream.AsyncRead(buf,offset=offset,count=len))) 
-
-    module GenericImplFragments = 
-        let startInterpret(lexBuffer:LexBuffer<_>)= 
-            lexBuffer.BufferScanStart <- lexBuffer.BufferScanStart + lexBuffer.LexemeLength;
-            lexBuffer.BufferMaxScanLength <- lexBuffer.BufferMaxScanLength - lexBuffer.LexemeLength;
-            lexBuffer.BufferScanLength <- 0;
-            lexBuffer.LexemeLength <- 0;
-            lexBuffer.BufferAcceptAction <- -1;
-
-        let afterRefill (trans: uint16[] array,sentinel,lexBuffer:LexBuffer<_>,scanUntilSentinel,endOfScan,state,eofPos) = 
-            // end of file occurs if we couldn't extend the buffer 
-            if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then  
-                let snew = int trans.[state].[eofPos] // == EOF 
-                if snew = sentinel then 
-                    endOfScan()
-                else 
-                    if lexBuffer.IsPastEndOfStream then failwith "End of file on lexing stream";
-                    lexBuffer.IsPastEndOfStream <- true;
-                    // Printf.printf "state %d --> %d on eof\n" state snew;
-                    scanUntilSentinel snew 
-            else 
-                scanUntilSentinel state 
-
-        let onAccept (lexBuffer:LexBuffer<_>,a) = 
-            lexBuffer.LexemeLength <- lexBuffer.BufferScanLength;
-            lexBuffer.BufferAcceptAction <- a;
-
-    open GenericImplFragments
-
-    []
-    type AsciiTables(trans: uint16[] array, accept: uint16[]) =
-            
-        /// Interpret tables for an ascii lexer generated by fslex. 
-        member tables.Interpret(initialState,lexBuffer : LexBuffer) = 
-        
-            let rec scanUntilSentinel state =
-                let sentinel = 255 * 256 + 255 
-                // Return an endOfScan after consuming the input 
-                let a = int accept.[state] 
-                if a <> sentinel then 
-                    onAccept (lexBuffer,a)
-                
-                if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then 
-                    lexBuffer.DiscardInput();
-                    lexBuffer.RefillBuffer ();
-                  // end of file occurs if we couldn't extend the buffer 
-                    afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,lexBuffer.EndOfScan,state,256 (* == EOF *) )
-                else
-                    // read a character - end the scan if there are no further transitions 
-                    let inp = int(lexBuffer.Buffer.[lexBuffer.BufferScanPos])
-                    let snew = int trans.[state].[inp] 
-                    if snew = sentinel then 
-                        lexBuffer.EndOfScan()
-                    else 
-                        lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
-                        // Printf.printf "state %d --> %d on '%c' (%d)\n" state snew (Char.chr inp) inp;
-                        scanUntilSentinel snew 
-              
-            startInterpret(lexBuffer)
-            scanUntilSentinel initialState
-
-        /// Interpret tables for an ascii lexer generated by fslex. 
-        member tables.AsyncInterpret(initialState,lexBuffer : LexBuffer) = 
-        
-            let rec scanUntilSentinel state : Async = 
-                async {  
-                    let sentinel = 255 * 256 + 255 
-                    // Return an endOfScan after consuming the input 
-                    let a = int accept.[state] 
-                    if a <> sentinel then 
-                        onAccept (lexBuffer,a)
-                    
-                    if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then 
-                        lexBuffer.DiscardInput();
-                        do! lexBuffer.AsyncRefillBuffer ();
-                       // end of file occurs if we couldn't extend the buffer 
-                        return! afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,endOfScan,state,256 (* == EOF *) )
-                    else
-                        // read a character - end the scan if there are no further transitions 
-                        let inp = int(lexBuffer.Buffer.[lexBuffer.BufferScanPos])
-                        let snew = int trans.[state].[inp] 
-                        if snew = sentinel then 
-                            return! endOfScan()
-                        else 
-                            lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
-                            return! scanUntilSentinel snew 
-                }
-            and endOfScan() = 
-                async { return lexBuffer.EndOfScan() }
-            startInterpret(lexBuffer)
-            scanUntilSentinel initialState
-
-
-        static member Create(trans,accept) = new AsciiTables(trans,accept)
-
-    []
-    type UnicodeTables(trans: uint16[] array, accept: uint16[]) = 
-        let sentinel = 255 * 256 + 255 
-        let numUnicodeCategories = 30 
-        let numLowUnicodeChars = 128 
-        let numSpecificUnicodeChars = (trans.[0].Length - 1 - numLowUnicodeChars - numUnicodeCategories)/2
-        let lookupUnicodeCharacters (state,inp) = 
-            let inpAsInt = int inp
-            // Is it a fast ASCII character?
-            if inpAsInt < numLowUnicodeChars then 
-                int trans.[state].[inpAsInt]
-            else 
-                // Search for a specific unicode character
-                let baseForSpecificUnicodeChars = numLowUnicodeChars
-                let rec loop i = 
-                    if i >= numSpecificUnicodeChars then 
-                        // OK, if we failed then read the 'others' entry in the alphabet,
-                        // which covers all Unicode characters not covered in other
-                        // ways
-                        let baseForUnicodeCategories = numLowUnicodeChars+numSpecificUnicodeChars*2
-                        let unicodeCategory = System.Char.GetUnicodeCategory(inp)
-                        //System.Console.WriteLine("inp = {0}, unicodeCategory = {1}", [| box inp; box unicodeCategory |]);
-                        int trans.[state].[baseForUnicodeCategories + int32 unicodeCategory]
-                    else 
-                        // This is the specific unicode character
-                        let c = char (int trans.[state].[baseForSpecificUnicodeChars+i*2])
-                        //System.Console.WriteLine("c = {0}, inp = {1}, i = {2}", [| box c; box inp; box i |]);
-                        // OK, have we found the entry for a specific unicode character?
-                        if c = inp
-                        then int trans.[state].[baseForSpecificUnicodeChars+i*2+1]
-                        else loop(i+1)
-                
-                loop 0
-        let eofPos    = numLowUnicodeChars + 2*numSpecificUnicodeChars + numUnicodeCategories 
-        // Each row for the Unicode table has format 
-        //      128 entries for ASCII characters
-        //      A variable number of 2*UInt16 entries for SpecificUnicodeChars 
-        //      30 entries, one for each UnicodeCategory
-        //      1 entry for EOF
-
-        member tables.Interpret(initialState,lexBuffer : LexBuffer) = 
-
-            let rec scanUntilSentinel state =
-                // Return an endOfScan after consuming the input 
-                let a = int accept.[state] 
-                if a <> sentinel then 
-                    onAccept(lexBuffer,a)
-                
-                if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then 
-                    lexBuffer.DiscardInput();
-                    lexBuffer.RefillBuffer ();
-                  // end of file occurs if we couldn't extend the buffer 
-                    afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,lexBuffer.EndOfScan,state,eofPos)
-                else
-                    // read a character - end the scan if there are no further transitions 
-                    let inp = lexBuffer.Buffer.[lexBuffer.BufferScanPos]
-                    
-                    // Find the new state
-                    let snew = lookupUnicodeCharacters (state,inp)
-
-                    if snew = sentinel then 
-                        lexBuffer.EndOfScan()
-                    else 
-                        lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
-                        // Printf.printf "state %d --> %d on '%c' (%d)\n" s snew (char inp) inp;
-                        scanUntilSentinel snew 
-                  
-            startInterpret(lexBuffer)
-            scanUntilSentinel initialState
-
-        member tables.AsyncInterpret(initialState,lexBuffer : LexBuffer) = 
-
-            let rec scanUntilSentinel state =
-                async {
-                    // Return an endOfScan after consuming the input 
-                    let a = int accept.[state] 
-                    if a <> sentinel then 
-                        onAccept(lexBuffer,a)
-                    
-                    if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then 
-                        lexBuffer.DiscardInput();
-                        lexBuffer.RefillBuffer ();
-                        // end of file occurs if we couldn't extend the buffer 
-                        return! afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,endOfScan,state,eofPos)
-                    else
-                        // read a character - end the scan if there are no further transitions 
-                        let inp = lexBuffer.Buffer.[lexBuffer.BufferScanPos]
-                        
-                        // Find the new state
-                        let snew = lookupUnicodeCharacters (state,inp)
-
-                        if snew = sentinel then 
-                            return! endOfScan()
-                        else 
-                            lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
-                            return! scanUntilSentinel snew 
-                }
-            and endOfScan() = 
-                async { return lexBuffer.EndOfScan() } 
-            startInterpret(lexBuffer)
-            scanUntilSentinel initialState
-
-        static member Create(trans,accept) = new UnicodeTables(trans,accept)
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-lexing.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-lexing.fsi
deleted file mode 100644
index 02900145..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-lexing.fsi
+++ /dev/null
@@ -1,115 +0,0 @@
-//==========================================================================
-// LexBuffers are for use with automatically generated lexical analyzers,
-// in particular those produced by 'fslex'.
-//
-// (c) Microsoft Corporation 2005-2008.
-//===========================================================================
-
-#if INTERNALIZED_POWER_PACK
-namespace Internal.Utilities.Text.Lexing
-#else
-namespace Microsoft.FSharp.Text.Lexing 
-#endif
-
-open System.Collections.Generic
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Control
-
-/// Position information stored for lexing tokens
-type Position = 
-    { pos_fname: string;
-      pos_lnum: int;
-      pos_bol: int;
-      pos_cnum: int; }
-     /// The file name associated with the input stream.
-     member FileName : string
-     /// The line number in the input stream, assuming fresh positions have been updated 
-     /// using AsNewLinePos() and by modifying the EndPos property of the LexBuffer.
-     member Line : int
-     []
-     member Char : int
-     /// The character number in the input stream
-     member AbsoluteOffset : int
-     /// Return absolute offset of the start of the line marked by the position
-     member StartOfLineAbsoluteOffset : int
-     /// Return the column number marked by the position, i.e. the difference between the AbsoluteOffset and the StartOfLineAbsoluteOffset
-     member Column : int
-     // Given a position just beyond the end of a line, return a position at the start of the next line
-     member NextLine : Position     
-     
-     /// Given a position at the start of a token of length n, return a position just beyond the end of the token
-     member EndOfToken: n:int -> Position
-     /// Gives a position shifted by specified number of characters
-     member ShiftColumnBy: by:int -> Position
-     
-     []
-     member AsNewLinePos : unit -> Position
-     
-     /// Get an arbitrary position, with the empty string as filename, and  
-     static member Empty : Position
-
-     /// Get a position corresponding to the first line (line number 1) in a given file
-     static member FirstLine : filename:string -> Position
-    
-[]
-type LexBuffer<'char> =
-    /// The start position for the lexeme
-    member StartPos: Position with get,set
-    /// The end position for the lexeme
-    member EndPos: Position with get,set
-    /// The matched string 
-    member Lexeme: 'char array
-    
-    /// Fast helper to turn the matched characters into a string, avoiding an intermediate array
-    static member LexemeString : LexBuffer -> string
-    
-    /// The length of the matched string 
-    member LexemeLength: int
-    /// Fetch a particular character in the matched string 
-    member LexemeChar: int -> 'char
-
-    /// Dynamically typed, non-lexically scoped parameter table
-    member BufferLocalStore : IDictionary
-    
-    /// True if the refill of the buffer ever failed , or if explicitly set to true.
-    member IsPastEndOfStream: bool with get,set
-    /// Remove all input, though don't discard the current lexeme 
-    member DiscardInput: unit -> unit
-    /// Adjust the start position associated with the lexbuf
-
-    // Create implementations of lexbufs
-    static member FromBytes: byte[] -> LexBuffer
-    static member FromChars: char[] -> LexBuffer
-    static member FromFunction: ('char[] * int * int -> int) -> LexBuffer<'char>
-    static member FromAsyncFunction: ('char[] * int * int -> Async) -> LexBuffer<'char>
-
-
-    [.FromFunction instead")>]
-    static member FromCharFunction: (char[] -> int -> int) -> LexBuffer
-    [.FromFunction instead")>]
-    static member FromByteFunction: (byte[] -> int -> int) -> LexBuffer
-
-    static member FromTextReader: System.IO.TextReader -> LexBuffer
-    static member FromBinaryReader: System.IO.BinaryReader -> LexBuffer
-
-
-/// The type of tables for an ascii lexer generated by fslex. 
-[]
-type AsciiTables =
-    static member Create : uint16[] array * uint16[] -> AsciiTables
-    /// Interpret tables for an ascii lexer generated by fslex. 
-    member Interpret:  initialState:int * LexBuffer  -> int
-    /// Interpret tables for an ascii lexer generated by fslex, processing input asynchronously
-    member AsyncInterpret:  initialState:int * LexBuffer -> Async
-
-
-/// The type of tables for an unicode lexer generated by fslex. 
-[]
-type UnicodeTables =
-    static member Create : uint16[] array * uint16[] -> UnicodeTables
-    /// Interpret tables for a unicode lexer generated by fslex. 
-    member Interpret:  initialState:int * LexBuffer -> int
-
-    /// Interpret tables for a unicode lexer generated by fslex, processing input asynchronously
-    member AsyncInterpret:  initialState:int * LexBuffer -> Async
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-parsing.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-parsing.fs
deleted file mode 100644
index 022df1b5..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-parsing.fs
+++ /dev/null
@@ -1,483 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-
-namespace  Internal.Utilities.Text.Parsing
-open Internal.Utilities
-open Internal.Utilities.Text.Lexing
-
-#else
-namespace Microsoft.FSharp.Text.Parsing
-open Microsoft.FSharp.Text.Lexing
-#endif
-
-open System
-open System.Collections.Generic
-
-type IParseState = 
-    abstract InputRange: int -> Position * Position
-    abstract InputEndPosition: int -> Position 
-    abstract InputStartPosition: int -> Position 
-    abstract ResultRange: Position * Position
-    abstract GetInput: int -> obj 
-    abstract ParserLocalStore : IDictionary
-    abstract RaiseError<'b> : unit -> 'b 
-
-//-------------------------------------------------------------------------
-// This context is passed to the error reporter when a syntax error occurs
-
-[]
-type ParseErrorContext<'tok>
-         (//lexbuf: LexBuffer<_>,
-          stateStack:int list,
-          parseState: IParseState, 
-          reduceTokens: int list, 
-          currentToken: 'tok option, 
-          reducibleProductions: int list list, 
-          shiftableTokens: int list , 
-          message : string) =
-      //member x.LexBuffer = lexbuf
-      member x.StateStack  = stateStack
-      member x.ReduceTokens = reduceTokens
-      member x.CurrentToken = currentToken
-      member x.ParseState = parseState
-      member x.ReducibleProductions = reducibleProductions
-      member x.ShiftTokens = shiftableTokens
-      member x.Message = message
-
-
-//-------------------------------------------------------------------------
-// This is the data structure emitted as code by FSYACC.  
-
-type Tables<'tok> = 
-    { reductions: (IParseState -> obj) array;
-      endOfInputTag: int;
-      tagOfToken: 'tok -> int;
-      dataOfToken: 'tok -> obj; 
-      actionTableElements: uint16[];  
-      actionTableRowOffsets: uint16[];
-      reductionSymbolCounts: uint16[];
-      immediateActions: uint16[];
-      gotos: uint16[];
-      sparseGotoTableRowOffsets: uint16[];
-      stateToProdIdxsTableElements: uint16[];  
-      stateToProdIdxsTableRowOffsets: uint16[];  
-      productionToNonTerminalTable: uint16[];
-      /// For fsyacc.exe, this entry is filled in by context from the generated parser file. If no 'parse_error' function
-      /// is defined by the user then ParseHelpers.parse_error is used by default (ParseHelpers is opened
-      /// at the top of the generated parser file)
-      parseError:  ParseErrorContext<'tok> -> unit;
-      numTerminals: int;
-      tagOfErrorTerminal: int }
-
-//-------------------------------------------------------------------------
-// An implementation of stacks.
-
-// This type is in System.dll so for the moment we can't use it in FSharp.Core.dll
-//type Stack<'a> = System.Collections.Generic.Stack<'a>
-
-type Stack<'a>(n)  = 
-    let mutable contents = Array.zeroCreate<'a>(n)
-    let mutable count = 0
-
-    member buf.Ensure newSize = 
-        let oldSize = Array.length contents
-        if newSize > oldSize then 
-            let old = contents
-            contents <- Array.zeroCreate (max newSize (oldSize * 2));
-            Array.blit old 0 contents 0 count;
-    
-    member buf.Count = count
-    member buf.Pop() = count <- count - 1
-    member buf.Peep() = contents.[count - 1]
-    member buf.Top(n) = [ for x in contents.[max 0 (count-n)..count - 1] -> x ] |> List.rev
-    member buf.Push(x) =
-        buf.Ensure(count + 1); 
-        contents.[count] <- x; 
-        count <- count + 1
-        
-    member buf.IsEmpty = (count = 0)
-    member buf.PrintStack() = 
-        for i = 0 to (count - 1) do 
-            System.Console.Write("{0}{1}",(contents.[i]),if i=count-1 then ":" else "-") 
-          
-exception RecoverableParseError
-exception Accept of obj
-
-module Implementation = 
-
-#if DEBUG
-    let debug = false
-#endif
-    
-    // Definitions shared with fsyacc 
-    let anyMarker = 0xffff
-    let shiftFlag = 0x0000
-    let reduceFlag = 0x4000
-    let errorFlag = 0x8000
-    let acceptFlag = 0xc000
-    let actionMask = 0xc000
-
-    let actionValue action = action &&& (~~~ actionMask)                                    
-    let actionKind action = action &&& actionMask
-    
-    //-------------------------------------------------------------------------
-    // Read the tables written by FSYACC.  
-
-    type AssocTable(elemTab:uint16[], offsetTab:uint16[]) =
-        let cache = new Dictionary<_,_>(2000)
-
-        member t.readAssoc (minElemNum,maxElemNum,defaultValueOfAssoc,keyToFind) =     
-            // do a binary chop on the table 
-            let elemNumber : int = (minElemNum+maxElemNum)/2
-            if elemNumber = maxElemNum 
-            then defaultValueOfAssoc
-            else 
-                let x = int elemTab.[elemNumber*2]
-                if keyToFind = x then 
-                    int elemTab.[elemNumber*2+1]
-                elif keyToFind < x then t.readAssoc (minElemNum ,elemNumber,defaultValueOfAssoc,keyToFind)
-                else                    t.readAssoc (elemNumber+1,maxElemNum,defaultValueOfAssoc,keyToFind)
-
-        member t.Read(rowNumber ,keyToFind) =
-        
-            // First check the sparse lookaside table
-            // Performance note: without this lookaside table the binary chop in readAssoc
-            // takes up around 10% of of parsing time 
-            // for parsing intensive samples such as the bootstrapped F# compiler.
-            //
-            // Note: using a .NET Dictionary for this int -> int table looks like it could be sub-optimal.
-            // Some other better sparse lookup table may be better.
-            let mutable res = 0 
-            let cacheKey = (rowNumber <<< 16) ||| keyToFind
-            let ok = cache.TryGetValue(cacheKey, &res) 
-            if ok then res 
-            else
-                let headOfTable = int offsetTab.[rowNumber]
-                let firstElemNumber = headOfTable + 1           
-                let numberOfElementsInAssoc = int elemTab.[headOfTable*2]
-                let defaultValueOfAssoc = int elemTab.[headOfTable*2+1]          
-                let res = t.readAssoc (firstElemNumber,(firstElemNumber+numberOfElementsInAssoc),defaultValueOfAssoc,keyToFind)
-                cache.[cacheKey] <- res
-                res
-
-        // Read all entries in the association table
-        // Used during error recovery to find all valid entries in the table
-        member x.ReadAll(n) =       
-            let headOfTable = int offsetTab.[n]
-            let firstElemNumber = headOfTable + 1           
-            let numberOfElementsInAssoc = int32 elemTab.[headOfTable*2]           
-            let defaultValueOfAssoc = int elemTab.[headOfTable*2+1]          
-            [ for i in firstElemNumber .. (firstElemNumber+numberOfElementsInAssoc-1) -> 
-                (int elemTab.[i*2], int elemTab.[i*2+1]) ], defaultValueOfAssoc
-
-    type IdxToIdxListTable(elemTab:uint16[], offsetTab:uint16[]) =
-
-        // Read all entries in a row of the table
-        member x.ReadAll(n) =       
-            let headOfTable = int offsetTab.[n]
-            let firstElemNumber = headOfTable + 1           
-            let numberOfElements = int32 elemTab.[headOfTable]           
-            [ for i in firstElemNumber .. (firstElemNumber+numberOfElements-1) -> int elemTab.[i] ]
-
-    //-------------------------------------------------------------------------
-    // interpret the tables emitted by FSYACC.  
-
-    []
-    type ValueInfo = 
-        struct
-            val value: obj
-            val startPos: Position
-            val endPos: Position
-            new(value,startPos,endPos) = { value=value; startPos=startPos;endPos=endPos }
-        end
-
-    let interpret (tables: Tables<'tok>) lexer (lexbuf : LexBuffer<_>) initialState =                                                                      
-        let localStore = new Dictionary() in
-        localStore.["LexBuffer"] <- lexbuf;
-#if DEBUG
-        if debug then System.Console.WriteLine("\nParser: interpret tables");
-#endif
-        let stateStack : Stack = new Stack<_>(100)
-        stateStack.Push(initialState);
-        let valueStack = new Stack(100)
-        let mutable haveLookahead = false                                                                              
-        let mutable lookaheadToken = Unchecked.defaultof<'tok>
-        let mutable lookaheadEndPos = Unchecked.defaultof
-        let mutable lookaheadStartPos = Unchecked.defaultof
-        let mutable finished = false
-        // After an error occurs, we suppress errors until we've shifted three tokens in a row.
-        let mutable errorSuppressionCountDown = 0
-        
-        // When we hit the end-of-file we don't fail straight away but rather keep permitting shift
-        // and reduce against the last token in the token stream 20 times or until we've accepted
-        // or exhausted the stack. This allows error recovery rules of the form
-        //      input : realInput EOF | realInput error EOF | error EOF
-        // where consuming one EOF to trigger an error doesn't result in overall parse failure 
-        // catastrophe and the loss of intermediate results.
-        //
-        let mutable inEofCountDown = false
-        let mutable eofCountDown = 20 // Number of EOFs to supply at the end for error recovery
-        // The 100 here means a maximum of 100 elements for each rule
-        let ruleStartPoss = (Array.zeroCreate 100 : Position array)              
-        let ruleEndPoss   = (Array.zeroCreate 100 : Position array)              
-        let ruleValues    = (Array.zeroCreate 100 : obj array)              
-        let lhsPos        = (Array.zeroCreate 2 : Position array)                                            
-        let reductions = tables.reductions
-        let actionTable = new AssocTable(tables.actionTableElements, tables.actionTableRowOffsets)
-        let gotoTable = new AssocTable(tables.gotos, tables.sparseGotoTableRowOffsets)
-        let stateToProdIdxsTable = new IdxToIdxListTable(tables.stateToProdIdxsTableElements, tables.stateToProdIdxsTableRowOffsets)
-
-        let parseState =                                                                                            
-            { new IParseState with 
-                member p.InputRange(n) = ruleStartPoss.[n-1], ruleEndPoss.[n-1]; 
-                member p.InputStartPosition(n) = ruleStartPoss.[n-1]
-                member p.InputEndPosition(n) = ruleEndPoss.[n-1]; 
-                member p.GetInput(n)    = ruleValues.[n-1];        
-                member p.ResultRange    = (lhsPos.[0], lhsPos.[1]);  
-                member p.ParserLocalStore = (localStore :> IDictionary<_,_>); 
-                member p.RaiseError()  = raise RecoverableParseError  (* NOTE: this binding tests the fairly complex logic associated with an object expression implementing a generic abstract method *)
-            }       
-
-#if DEBUG
-        let report haveLookahead lookaheadToken = 
-            if haveLookahead then sprintf "%A" lookaheadToken 
-            else "[TBC]"
-#endif
-
-        // Pop the stack until we can shift the 'error' token. If 'tokenOpt' is given
-        // then keep popping until we can shift both the 'error' token and the token in 'tokenOpt'.
-        // This is used at end-of-file to make sure we can shift both the 'error' token and the 'EOF' token.
-        let rec popStackUntilErrorShifted(tokenOpt) =
-            // Keep popping the stack until the "error" terminal is shifted
-#if DEBUG
-            if debug then System.Console.WriteLine("popStackUntilErrorShifted");
-#endif
-            if stateStack.IsEmpty then 
-#if DEBUG
-                if debug then 
-                    System.Console.WriteLine("state stack empty during error recovery - generating parse error");
-#endif
-                failwith "parse error";
-            
-            let currState = stateStack.Peep()
-#if DEBUG
-            if debug then 
-                System.Console.WriteLine("In state {0} during error recovery", currState);
-#endif
-            
-            let action = actionTable.Read(currState, tables.tagOfErrorTerminal)
-            
-            if actionKind action = shiftFlag &&  
-                (match tokenOpt with 
-                 | None -> true
-                 | Some(token) -> 
-                    let nextState = actionValue action 
-                    actionKind (actionTable.Read(nextState, tables.tagOfToken(token))) = shiftFlag) then
-
-#if DEBUG
-                if debug then System.Console.WriteLine("shifting error, continuing with error recovery");
-#endif
-                let nextState = actionValue action 
-                // The "error" non terminal needs position information, though it tends to be unreliable.
-                // Use the StartPos/EndPos from the lex buffer
-                valueStack.Push(ValueInfo(box (), lexbuf.StartPos, lexbuf.EndPos));
-                stateStack.Push(nextState)
-            else
-                if valueStack.IsEmpty then 
-                    failwith "parse error";
-#if DEBUG
-                if debug then 
-                    System.Console.WriteLine("popping stack during error recovery");
-#endif
-                valueStack.Pop();
-                stateStack.Pop();
-                popStackUntilErrorShifted(tokenOpt)
-
-        while not finished do                                                                                    
-            if stateStack.IsEmpty then 
-                finished <- true
-            else
-                let state = stateStack.Peep()
-#if DEBUG
-                if debug then (Console.Write("{0} value(state), state ",valueStack.Count); stateStack.PrintStack())
-#endif
-                let action = 
-                    let immediateAction = int tables.immediateActions.[state]
-                    if not (immediateAction = anyMarker) then
-                        // Action has been pre-determined, no need to lookahead 
-                        // Expecting it to be a Reduce action on a non-fakeStartNonTerminal ? 
-                        immediateAction
-                    else
-                        // Lookahead required to determine action 
-                        if not haveLookahead then 
-                            if lexbuf.IsPastEndOfStream then 
-                                // When the input runs out, keep supplying the last token for eofCountDown times
-                                if eofCountDown>0 then
-                                    haveLookahead <- true
-                                    eofCountDown <- eofCountDown - 1
-                                    inEofCountDown <- true
-                                else 
-                                    haveLookahead <- false
-                            else 
-                                lookaheadToken <- lexer lexbuf
-                                lookaheadStartPos <- lexbuf.StartPos
-                                lookaheadEndPos <- lexbuf.EndPos
-                                haveLookahead <- true;
-
-                        let tag = 
-                            if haveLookahead then tables.tagOfToken lookaheadToken 
-                            else tables.endOfInputTag   
-                                    
-                        // Printf.printf "state %d\n" state  
-                        actionTable.Read(state,tag)
-                        
-                let kind = actionKind action 
-                if kind = shiftFlag then (
-                    if errorSuppressionCountDown > 0 then 
-                        errorSuppressionCountDown <- errorSuppressionCountDown - 1;
-#if DEBUG
-                        if debug then Console.WriteLine("shifting, reduced errorRecoverylevel to {0}\n", errorSuppressionCountDown);
-#endif
-                    let nextState = actionValue action                                     
-                    if not haveLookahead then failwith "shift on end of input!";
-                    let data = tables.dataOfToken lookaheadToken
-                    valueStack.Push(ValueInfo(data, lookaheadStartPos, lookaheadEndPos));
-                    stateStack.Push(nextState);                                                                
-#if DEBUG
-                    if debug then Console.WriteLine("shift/consume input {0}, shift to state {1}", report haveLookahead lookaheadToken, nextState);
-#endif
-                    haveLookahead <- false
-
-                ) elif kind = reduceFlag then
-                    let prod = actionValue action                                     
-                    let reduction = reductions.[prod]                                                             
-                    let n = int tables.reductionSymbolCounts.[prod]
-                       // pop the symbols, populate the values and populate the locations                              
-#if DEBUG
-                    if debug then Console.Write("reduce popping {0} values/states, lookahead {1}", n, report haveLookahead lookaheadToken);
-#endif
-                    for i = 0 to n - 1 do                                                                             
-                        if valueStack.IsEmpty then failwith "empty symbol stack";
-                        let topVal = valueStack.Peep()
-                        valueStack.Pop();
-                        stateStack.Pop();
-                        ruleValues.[(n-i)-1] <- topVal.value;  
-                        ruleStartPoss.[(n-i)-1] <- topVal.startPos;  
-                        ruleEndPoss.[(n-i)-1] <- topVal.endPos;  
-                        if i = 0 then lhsPos.[1] <- topVal.endPos;                                     
-                        if i = n - 1 then lhsPos.[0] <- topVal.startPos
-                    done;                                                                                             
-                    // Use the lookahead token to populate the locations if the rhs is empty                        
-                    if n = 0 then 
-                        if haveLookahead then 
-                           lhsPos.[0] <- lookaheadStartPos;                                                                     
-                           lhsPos.[1] <- lookaheadEndPos;                                                                       
-                        else 
-                           lhsPos.[0] <- lexbuf.StartPos;
-                           lhsPos.[1] <- lexbuf.EndPos;
-                    try                                                                                               
-                          // Printf.printf "reduce %d\n" prod;                                                       
-                        let redResult = reduction parseState                                                          
-                        valueStack.Push(ValueInfo(redResult, lhsPos.[0], lhsPos.[1]));
-                        let currState = stateStack.Peep()
-                        let newGotoState = gotoTable.Read(int tables.productionToNonTerminalTable.[prod], currState)
-                        stateStack.Push(newGotoState)
-#if DEBUG
-                        if debug then Console.WriteLine(" goto state {0}", newGotoState)
-#endif
-                    with                                                                                              
-                    | Accept res ->                                                                            
-                          finished <- true;                                                                             
-                          valueStack.Push(ValueInfo(res, lhsPos.[0], lhsPos.[1])) 
-                    | RecoverableParseError ->
-#if DEBUG
-                          if debug then Console.WriteLine("RecoverableParseErrorException...\n");
-#endif
-                          popStackUntilErrorShifted(None);
-                          // User code raised a Parse_error. Don't report errors again until three tokens have been shifted 
-                          errorSuppressionCountDown <- 3
-                elif kind = errorFlag then (
-#if DEBUG
-                    if debug then Console.Write("ErrorFlag... ");
-#endif
-                    // Silently discard inputs and don't report errors 
-                    // until three tokens in a row have been shifted 
-#if DEBUG
-                    if debug then printfn "error on token '%A' " (if haveLookahead then Some(lookaheadToken) else None);
-#endif
-                    if errorSuppressionCountDown > 0 then 
-                        // If we're in the end-of-file count down then we're very keen to 'Accept'.
-                        // We can only do this by repeatedly popping the stack until we can shift both an 'error' token
-                        // and an EOF token. 
-                        if inEofCountDown && eofCountDown < 10 then 
-#if DEBUG
-                            if debug then printfn "poppin stack, lokking to shift both 'error' and that token, during end-of-file error recovery" ;
-#endif
-                            popStackUntilErrorShifted(if haveLookahead then Some(lookaheadToken) else None);
-
-                        // If we don't haveLookahead then the end-of-file count down is over and we have no further options.
-                        if not haveLookahead then 
-                            failwith "parse error: unexpected end of file"
-                            
-#if DEBUG
-                        if debug then printfn "discarding token '%A' during error suppression" (if haveLookahead then Some(lookaheadToken) else None);
-#endif
-                        // Discard the token
-                        haveLookahead <- false
-                        // Try again to shift three tokens
-                        errorSuppressionCountDown <- 3
-                    else (
-
-                        let currentToken = if haveLookahead then Some(lookaheadToken) else None
-                        let actions,defaultAction = actionTable.ReadAll(state) 
-                        let explicit = Set.of_list [ for (tag,action) in actions -> tag ]
-                        
-                        let shiftableTokens = 
-                           [ for (tag,action) in actions do
-                                 if (actionKind action) = shiftFlag then 
-                                     yield tag
-                             if actionKind defaultAction = shiftFlag  then
-                                 for tag in 0 .. tables.numTerminals-1 do  
-                                    if not (explicit.Contains(tag)) then 
-                                         yield tag ] in
-
-                        let stateStack = stateStack.Top(12) in
-                        let reducibleProductions = 
-                            [ for state in stateStack do 
-                               yield stateToProdIdxsTable.ReadAll(state)  ]
-
-                        let reduceTokens = 
-                           [ for (tag,action) in actions do
-                                if actionKind(action) = reduceFlag then
-                                    yield tag
-                             if actionKind(defaultAction) = reduceFlag  then
-                                 for tag in 0 .. tables.numTerminals-1 do  
-                                    if not (explicit.Contains(tag)) then 
-                                         yield tag ] in
-                        //let activeRules = stateStack |> List.iter (fun state -> 
-                        let errorContext = new ParseErrorContext<'tok>(stateStack,parseState, reduceTokens,currentToken,reducibleProductions, shiftableTokens, "syntax error")
-                        tables.parseError(errorContext);
-                        popStackUntilErrorShifted(None);
-                        errorSuppressionCountDown <- 3;
-#if DEBUG
-                        if debug then System.Console.WriteLine("generated syntax error and shifted error token, haveLookahead = {0}\n", haveLookahead);
-#endif
-                    )
-                ) elif kind = acceptFlag then 
-                    finished <- true
-#if DEBUG
-                else
-                  if debug then System.Console.WriteLine("ALARM!!! drop through case in parser");  
-#endif
-        done;                                                                                                     
-        // OK, we're done - read off the overall generated value
-        valueStack.Peep().value
-
-type Tables<'tok> with
-    member tables.Interpret (lexer,lexbuf,initialState) = 
-        Implementation.interpret tables lexer lexbuf initialState
-    
-module ParseHelpers = 
-    let parse_error (s:string) = ()
-    let parse_error_rich = (None : (ParseErrorContext<_> -> unit) option)
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-parsing.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-parsing.fsi
deleted file mode 100644
index 014a750a..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/prim-parsing.fsi
+++ /dev/null
@@ -1,73 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2009.
-//=========================================================================
-
-#if INTERNALIZED_POWER_PACK
-namespace  Internal.Utilities.Text.Parsing
-open Internal.Utilities
-open Internal.Utilities.Text.Lexing
-#else
-namespace Microsoft.FSharp.Text.Parsing
-open Microsoft.FSharp.Text.Lexing
-#endif
-
-open System.Collections.Generic
-
-/// Parsers generated by FsPars provide information from within parser
-/// actions.  This is accessed via the functions available on the local
-/// variable parseState within parser actions
-type IParseState = 
-    abstract InputRange: int -> Position * Position
-    abstract InputEndPosition: int -> Position 
-    abstract InputStartPosition: int -> Position 
-    abstract ResultRange: Position * Position
-    abstract GetInput   : int -> obj 
-    // Dynamically typed, non-lexically scoped local store
-    abstract ParserLocalStore : IDictionary
-    abstract RaiseError<'b> : unit -> 'b 
-
-
-[]
-type ParseErrorContext<'tok> =
-      member StateStack  : int list
-      member ParseState : IParseState
-      member ReduceTokens: int list
-      member ReducibleProductions : int list list
-      member CurrentToken : 'tok option
-      member ShiftTokens : int list
-      member Message : string
-
-/// Tables generated by fsyacc
-type Tables<'tok> = 
-    { reductions: (IParseState -> obj) array ;
-      endOfInputTag: int;
-      tagOfToken: 'tok -> int;
-      dataOfToken: 'tok -> obj; 
-      // The Action table
-      actionTableElements: uint16[];
-      actionTableRowOffsets: uint16[];
-      // The number of symbols for each reduction
-      reductionSymbolCounts: uint16[];
-      immediateActions: uint16[];      
-      // The Goto table
-      gotos: uint16[];
-      sparseGotoTableRowOffsets: uint16[];
-      // This table tells us which productions are active for which states
-      stateToProdIdxsTableElements: uint16[];  
-      stateToProdIdxsTableRowOffsets: uint16[];  
-      // This table is logically part of the Goto table
-      productionToNonTerminalTable: uint16[];
-      // This function is used to hold the user specified "parse_error" or "parse_error_rich" functions
-      parseError:  ParseErrorContext<'tok> -> unit;
-      // This holds the total number of terminals 
-      numTerminals: int;
-      tagOfErrorTerminal: int }
-    member Interpret :  lexer:(LexBuffer<'char> -> 'tok) * lexbuf:LexBuffer<'char> * startState:int -> obj 
-
-exception Accept of obj
-exception RecoverableParseError
-
-module ParseHelpers =
-   val parse_error_rich: (ParseErrorContext<'tok> -> unit) option
-   val parse_error: string -> unit
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/printexc.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/printexc.fs
deleted file mode 100644
index beba5073..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/printexc.fs
+++ /dev/null
@@ -1,17 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008. The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.
-//===========================================================================
-
-module Microsoft.FSharp.Compatibility.OCaml.Printexc
-
-
-let to_string (e:exn) = 
-  match e with 
-  | Failure s -> s
-  | :? System.ArgumentException as e -> sprintf "invalid argument: %s" e.Message
-  | MatchFailure(s,n,m) -> sprintf "match failure, file '%s', line %d, column %d" s n m
-  | _ -> sprintf "%A\n" e
-
-let print f x = try f x with e -> stderr.WriteLine (to_string e) ; raise e 
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/printexc.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/printexc.fsi
deleted file mode 100644
index fa132d22..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/printexc.fsi
+++ /dev/null
@@ -1,15 +0,0 @@
-//==========================================================================
-// (c) Microsoft Corporation 2005-2008.  The interface to the module 
-// is similar to that found in versions of other ML implementations, 
-// but is not an exact match.  The type signatures in this interface
-// are an edited version of those generated automatically by running 
-// "bin\fsc.exe -i" on the implementation file.
-//===========================================================================
-
-/// Compatibility module to display data about exceptions.
-[]
-module Microsoft.FSharp.Compatibility.OCaml.Printexc
-
-val print: mapping:('a -> 'b) -> 'a -> 'b
-val to_string: exn -> string
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/resizearray.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/resizearray.fs
deleted file mode 100644
index 3e7a324c..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/resizearray.fs
+++ /dev/null
@@ -1,316 +0,0 @@
-// (c) Microsoft Corporation 2005-2009. 
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities
-#else
-namespace Microsoft.FSharp.Collections
-#endif
-
-[]
-module ResizeArray = 
-
-    let length (arr: ResizeArray<'a>) =  arr.Count
-    let get (arr: ResizeArray<'a>) (n:int) =  arr.[n]
-    let set (arr: ResizeArray<'a>) (n:int) (x:'a) =  arr.[n] <- x
-    let create  (n:int) x = new ResizeArray<_> (seq { for i in 1 .. n -> x })
-    let init (n:int) (f: int -> 'a) =  new ResizeArray<_> (seq { for i in 0 .. n-1 -> f i })
-
-    let blit (arr1:ResizeArray<'a>) start1 (arr2: ResizeArray<'a>) start2 len =
-        if start1 < 0 then invalidArg "start1" "index must be positive"
-        if start2 < 0 then invalidArg "start2" "index must be positive"
-        if len < 0 then invalidArg "len" "length must be positive"
-        if start1 + len > length arr1 then invalidArg "start1" "(start1+len) out of range"
-        if start2 + len > length arr2 then invalidArg "start2" "(start2+len) out of range"
-        for i = 0 to len - 1 do 
-            arr2.[start2+i] <- arr1.[start1 + i]
-
-    let concat (arrs:ResizeArray<'a> list) = new ResizeArray<_> (seq { for arr in arrs do for x in arr do yield x })
-    let append (arr1:ResizeArray<'a>) (arr2:ResizeArray<'a>) = concat [arr1; arr2]
-
-    let sub (arr:ResizeArray<'a>) start len =
-        if start < 0 then invalidArg "start" "index must be positive"
-        if len < 0 then invalidArg "len" "length must be positive"
-        if start + len > length arr then invalidArg "len" "length must be positive"
-        new ResizeArray<_> (seq { for i in start .. start+len-1 -> arr.[i] })
-
-    let fill (arr:ResizeArray<'a>) (start:int) (len:int) (x:'a) =
-        if start < 0 then invalidArg "start" "index must be positive"
-        if len < 0 then invalidArg "len" "length must be positive"
-        if start + len > length arr then invalidArg "len" "length must be positive"
-        for i = start to start + len - 1 do 
-            arr.[i] <- x
-
-    let copy      (arr:ResizeArray<'a>) = new ResizeArray<_>(arr)
-
-    let to_list (arr:ResizeArray<_>) =
-        let mutable res = []
-        for i = length arr - 1 downto 0 do
-            res <- arr.[i] :: res
-        res
-
-    let of_list (l: _ list) =
-        let len = l.Length
-        let res = new ResizeArray<_>(len)
-        let rec add = function
-          | [] -> ()
-          | e::l -> res.Add(e); add l
-        add l
-        res
-
-    let iter f (arr:ResizeArray<_>) = 
-        for i = 0 to arr.Count - 1 do
-            f arr.[i]
-
-    let map f (arr:ResizeArray<_>) =
-        let len = length arr
-        let res = new ResizeArray<_>(len)
-        for i = 0 to len - 1 do
-            res.Add(f arr.[i])
-        res
-
-    let mapi f (arr:ResizeArray<_>) =
-        let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f)
-        let len = length arr
-        let res = new ResizeArray<_>(len)
-        for i = 0 to len - 1 do
-            res.Add(f.Invoke(i, arr.[i]))
-        res
-        
-    let iteri f (arr:ResizeArray<_>) =
-        let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f)
-        for i = 0 to arr.Count - 1 do
-            f.Invoke(i, arr.[i])
-
-    let exists (f: 'a -> bool) (arr:ResizeArray<'a>) =
-        let len = length arr 
-        let rec loop i = i < len && (f arr.[i] || loop (i+1))
-        loop 0
-
-    let for_all f (arr:ResizeArray<_>) =
-        let len = length arr
-        let rec loop i = i >= len || (f arr.[i] && loop (i+1))
-        loop 0
-
-    let indexNotFound() = raise (new System.Collections.Generic.KeyNotFoundException("An index satisfying the predicate was not found in the collection"))
-
-    let find f (arr:ResizeArray<_>) = 
-        let rec loop i = 
-            if i >= length arr then indexNotFound()
-            elif f arr.[i] then arr.[i]
-            else loop (i+1)
-        loop 0
-
-    let first f (arr:ResizeArray<_>) =
-        let rec loop i = 
-            if i >= length arr then None else
-            match f arr.[i] with 
-            | None -> loop(i+1)
-            | res -> res
-        loop 0
-
-    let tryfind f (arr:ResizeArray<_>) = 
-        let rec loop i = 
-            if i >= length arr then None
-            elif f arr.[i] then Some arr.[i]
-            else loop (i+1)
-        loop 0
-
-    let iter2 f (arr1:ResizeArray<'a>) (arr2:ResizeArray<'b>) = 
-        let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f)
-        let len1 = length arr1
-        if len1 <> length arr2 then invalidArg "arr2" "the arrays have different lengths"
-        for i = 0 to len1 - 1 do 
-            f.Invoke(arr1.[i], arr2.[i])
-
-    let map2 f (arr1:ResizeArray<'a>) (arr2:ResizeArray<'b>) = 
-        let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f)
-        let len1 = length arr1
-        if len1 <> length arr2 then invalidArg "arr2" "the arrays have different lengths"
-        let res = new ResizeArray<_>(len1)
-        for i = 0 to len1 - 1 do
-            res.Add(f.Invoke(arr1.[i], arr2.[i]))
-        res
-
-    let choose f (arr:ResizeArray<_>) = 
-        let res = new ResizeArray<_>() 
-        for i = 0 to length arr - 1 do
-            match f arr.[i] with 
-            | None -> ()
-            | Some b -> res.Add(b)
-        res
-
-    let filter f (arr:ResizeArray<_>) = 
-        let res = new ResizeArray<_>() 
-        for i = 0 to length arr - 1 do 
-            let x = arr.[i] 
-            if f x then res.Add(x)
-        res
-
-    let partition f (arr:ResizeArray<_>) = 
-      let res1 = new ResizeArray<_>()
-      let res2 = new ResizeArray<_>()
-      for i = 0 to length arr - 1 do 
-          let x = arr.[i] 
-          if f x then res1.Add(x) else res2.Add(x)
-      res1, res2
-
-    let rev (arr:ResizeArray<_>) = 
-      let len = length arr 
-      let res = new ResizeArray<_>(len)
-      for i = len - 1 downto 0 do 
-          res.Add(arr.[i])
-      res
-
-    let fold_right (f : 'a -> 'b -> 'b) (arr:ResizeArray<'a>) (acc: 'b) =
-        let mutable res = acc 
-        let len = length arr 
-        for i = len - 1 downto 0 do 
-            res <- f (get arr i) res
-        res
-
-    let fold_left (f : 'a -> 'b -> 'a) (acc: 'a) (arr:ResizeArray<'b>) =
-        let mutable res = acc 
-        let len = length arr 
-        for i = 0 to len - 1 do 
-            res <- f res (get arr i)
-        res
-
-    let to_array (arr:ResizeArray<'a>) = arr.ToArray()
-    let of_array (arr :  'a array) = new ResizeArray<_>(arr)
-    let to_seq (arr : ResizeArray<'a>) = arr :> seq<_>
-
-    let sort f (arr :  ResizeArray<'a>) = arr.Sort (System.Comparison(f))
-    let sort_by f (arr :  ResizeArray<'a>) = arr.Sort (System.Comparison(fun x y -> compare (f x) (f y)))
-
-
-    let exists2 f (arr1:ResizeArray<_>) (arr2:ResizeArray<_>) =
-        let len1 = length arr1
-        if len1 <> length arr2 then invalidArg "arr2" "the arrays have different lengths"
-        let rec loop i = i < len1 && (f arr1.[i] arr2.[i] || loop (i+1))
-        loop 0
-
-    let find_index f (arr:ResizeArray<_>) =
-        let rec go n = if n >= length arr then indexNotFound() elif f arr.[n] then n else go (n+1)
-        go 0
-
-    let find_indexi f (arr: ResizeArray<_>) =
-        let rec go n = if n >= length arr then indexNotFound() elif f n arr.[n] then n else go (n+1)
-        go 0
-
-    let fold_sub_left f acc (arr: ResizeArray<_>) start fin = 
-        let mutable res = acc
-        for i = start to fin do
-            res <- f res arr.[i] 
-        res
-
-    let fold_sub_right f (arr: ResizeArray<_>) start fin acc = 
-        let mutable res = acc 
-        for i = fin downto start do
-            res <- f arr.[i] res
-        res
-
-    let reduce_left f (arr : ResizeArray<_>) =
-        let arrn = length arr
-        if arrn = 0 then invalidArg "arr" "the input array may not be empty"
-        else fold_sub_left f arr.[0] arr 1 (arrn - 1)
-        
-    let reduce_right f (arr: ResizeArray<_>) = 
-        let arrn = length arr
-        if arrn = 0 then invalidArg "arr" "the input array may not be empty"
-        else fold_sub_right f arr 0 (arrn - 2) arr.[arrn - 1]
-
-    let fold_left2 f (acc: 'a) (arr1:ResizeArray<'a1>) (arr2:ResizeArray<'a2>) =
-        let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f)
-        let mutable res = acc 
-        let len = length arr1
-        if len <> length arr2 then invalidArg "arr2" "the arrays have different lengths"
-        for i = 0 to len - 1 do
-            res <- f.Invoke(res,arr1.[i],arr2.[i])
-        res
-
-    let fold_right2 f (arr1:ResizeArray<'a1>) (arr2: ResizeArray<'a2>) (acc: 'b) =
-        let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f)
-        let mutable res = acc 
-        let len = length arr1
-        if len <> length arr2 then invalidArg "arr2" "the arrays have different lengths"
-        for i = len - 1 downto 0 do 
-            res <- f.Invoke(arr1.[i],arr2.[i],res)
-        res
-
-    let for_all2 f (arr1: ResizeArray<_>) (arr2: ResizeArray<_>) = 
-        let len1 = length arr1
-        if len1 <> length arr2 then invalidArg "arr2" "the arrays have different lengths"
-        let rec loop i = i >= len1 || (f arr1.[i] arr2.[i] && loop (i+1))
-        loop 0
-        
-    let is_empty (arr: ResizeArray<_>) = length (arr:ResizeArray<_>) = 0
-    
-    let iteri2 f (arr1: ResizeArray<'a>) (arr2: ResizeArray<'b>) =
-        let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f)
-        let len1 = length arr1
-        if len1 <> length arr2 then invalidArg "arr2" "the arrays have different lengths"
-        for i = 0 to len1 - 1 do 
-            f.Invoke(i,arr1.[i], arr2.[i])
-
-    let mapi2 (f: int -> 'a -> 'b -> 'c) (arr1: ResizeArray<'a>) (arr2: ResizeArray<'b>) = 
-        let f = OptimizedClosures.FastFunc3<_,_,_,_>.Adapt(f)
-        let len1 = length arr1
-        if len1 <> length arr2 then invalidArg "arr2" "the arrays have different lengths"
-        init len1 (fun i -> f.Invoke(i, arr1.[i], arr2.[i]))
-
-    let scan_sub_right f (arr: ResizeArray<'a>) start fin acc = 
-        let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f)
-        let mutable state = acc
-        let res = create (2+fin-start) acc
-        for i = fin downto start do
-            state <- f.Invoke(arr.[i], state)
-            res.[i - start] <- state
-        res
-
-    let scan_sub_left f  acc (arr : ResizeArray<'a>) start fin = 
-        let f = OptimizedClosures.FastFunc2<_,_,_>.Adapt(f)
-        let mutable state = acc
-        let res = create (fin-start+2) acc
-        for i = start to fin do
-            state <- f.Invoke(state, arr.[i])
-            res.[i - start+1] <- state
-        res
-
-    let scan_left f acc (arr : ResizeArray<'a>) = 
-        let arrn = length arr
-        scan_sub_left f acc arr 0 (arrn - 1)
-
-    let scan_right f (arr : ResizeArray<'a>) acc = 
-        let arrn = length arr
-        scan_sub_right f arr 0 (arrn - 1) acc
-
-    let singleton x =
-        let res = new ResizeArray<_>(1)
-        res.Add(x)
-        res
-
-    let tryfind_index f (arr: ResizeArray<'a>) = 
-        let rec go n = if n >= length arr then None elif f arr.[n] then Some n else go (n+1)
-        go 0
-        
-    let tryfind_indexi f (arr: ResizeArray<'a>) = 
-        let rec go n = if n >= length arr then None elif f n arr.[n] then Some n else go (n+1)
-        go 0
-    
-    let zip (arr1:ResizeArray<_>) (arr2: ResizeArray<_>) = 
-        let len1 = length arr1 
-        if len1 <> length arr2 then invalidArg "arr2" "the arrays have different lengths"
-        init len1 (fun i -> arr1.[i], arr2.[i])
-
-    let unzip (arr:ResizeArray<_>) = 
-        let len = length arr
-        let res1 = new ResizeArray<_>(len)
-        let res2 = new ResizeArray<_>(len)
-        for i = 0 to len - 1 do 
-            let x,y = arr.[i] 
-            res1.Add(x)
-            res2.Add(y)
-        res1,res2
-
-    let combine (arr1:ResizeArray<'a>) (arr2:ResizeArray<'b>) = zip arr1 arr2
-    let split (arr:ResizeArray<_>) = unzip arr
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/resizearray.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/resizearray.fsi
deleted file mode 100644
index b259e347..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/resizearray.fsi
+++ /dev/null
@@ -1,231 +0,0 @@
-//==========================================================================
-// ResizeArray
-// 
-// (c) Microsoft Corporation 2005-2008.  
-//===========================================================================
-
-#if INTERNALIZED_POWER_PACK
-namespace (* internal *) Internal.Utilities
-#else
-namespace Microsoft.FSharp.Collections
-#endif
-
-
-open System
-open System.Collections.Generic
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-
-[]
-/// Generic operations on the type System.Collections.Generic.List, which is called ResizeArray in the F# libraries.
-module ResizeArray =
-
-    /// Return the length of the collection.  You can also use property arr.Length.
-    val length: ResizeArray<'a> -> int
-
-    /// Fetch an element from the collection.  You can also use the syntax arr.[idx].
-    val get: ResizeArray<'a> -> int -> 'a
-
-    /// Set the value of an element in the collection.  You can also use the syntax arr.[idx] <- e.
-    val set: ResizeArray<'a> -> int -> 'a -> unit
-
-    /// Create an array whose elements are all initially the given value.
-    val create: int -> 'a -> ResizeArray<'a>
-     
-    /// Create an array by calling the given generator on each index.
-    val init: int -> (int -> 'a) -> ResizeArray<'a>
-
-    ///Build a new array that contains the elements of the first array followed by the elements of the second array
-    val append: ResizeArray<'a> -> ResizeArray<'a> -> ResizeArray<'a>
-
-    ///Build a new array that contains the elements of each of the given list of arrays
-    val concat: ResizeArray<'a> list -> ResizeArray<'a>
-
-    ///Build a new array that contains the given subrange specified by
-    ///starting index and length.
-    val sub: ResizeArray<'a> -> int -> int -> ResizeArray<'a>
-
-    ///Build a new array that contains the elements of the given array
-    val copy: ResizeArray<'a> -> ResizeArray<'a>
-
-    ///Fill a range of the collection with the given element
-    val fill: ResizeArray<'a> -> int -> int -> 'a -> unit
-
-    ///Read a range of elements from the first array and write them into the second.
-    val blit: ResizeArray<'a> -> int -> ResizeArray<'a> -> int -> int -> unit
-
-    ///Build a list from the given array
-    val to_list: ResizeArray<'a> -> 'a list
-
-    ///Build an array from the given list
-    val of_list: 'a list -> ResizeArray<'a>
-
-    /// Apply 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_left: ('a -> 'b -> 'a) -> 'a -> ResizeArray<'b> -> 'a
-
-    /// Apply 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 fold_right: ('a -> 'b -> 'b) -> ResizeArray<'a> -> 'b -> 'b
-
-    ///Apply the given function to each element of the array. 
-    val iter: ('a -> unit) -> ResizeArray<'a> -> unit
-
-    ///Build a new array whose elements are the results of applying the given function
-    ///to each of the elements of the array.
-    val map: ('a -> 'b) -> ResizeArray<'a> -> ResizeArray<'b>
-
-    ///Apply the given function to two arrays simultaneously. The
-    ///two arrays must have the same lengths, otherwise an Invalid_argument exception is
-    ///raised.
-    val iter2: ('a -> 'b -> unit) -> ResizeArray<'a> -> ResizeArray<'b> -> unit
-
-    ///Build 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.
-    val map2: ('a -> 'b -> 'c) -> ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<'c>
-
-    ///Apply the given function to each element of the array.  The integer passed to the
-    ///function indicates the index of element.
-    val iteri: (int -> 'a -> unit) -> ResizeArray<'a> -> unit
-
-    ///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: (int -> 'a -> 'b) -> ResizeArray<'a> -> ResizeArray<'b>
-
-    /// Test if any element of the array satisfies the given predicate.
-    /// If the input function is f and the elements are i0...iN 
-    /// then computes p i0 or ... or p iN.
-    val exists: ('a -> bool) -> ResizeArray<'a> -> bool
-
-    /// Test if all elements of the array satisfy the given predicate.
-    /// If the input function is f and the elements are i0...iN and "j0...jN"
-    /// then computes p i0 && ... && p iN.
-    val for_all: ('a -> bool) -> ResizeArray<'a> -> bool
-
-    ///Return a new collection containing only the elements of the collection
-    ///for which the given predicate returns true
-    val filter: ('a -> bool) -> ResizeArray<'a> -> ResizeArray<'a>
-
-    ///Split the collection into two collections, containing the 
-    ///elements for which the given predicate returns true and false
-    ///respectively 
-    val partition: ('a -> bool) -> ResizeArray<'a> -> ResizeArray<'a> * ResizeArray<'a>
-
-    ///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: ('a -> 'b option) -> ResizeArray<'a> -> ResizeArray<'b>
-
-    ///Return the first element for which the given function returns true.
-    ///Raise KeyNotFoundException if no such element exists.
-    val find: ('a -> bool) -> ResizeArray<'a> -> 'a
-
-    ///Return the first element for which the given function returns true.
-    ///Return None if no such element exists.
-    val tryfind: ('a -> bool) -> ResizeArray<'a> -> 'a option
-
-    ///Apply the given function to successive elements, returning the first
-    ///result where function returns "Some(x)" for some x.
-    val first: ('a -> 'b option) -> ResizeArray<'a> -> 'b option
-
-    ///Combine the two arrays into an array of pairs. The two arrays must have equal lengths.
-    val combine: ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<('a * 'b)>
-
-    ///Split a list of pairs into two lists
-    val split: ResizeArray<('a * 'b)> -> (ResizeArray<'a> * ResizeArray<'b>)
-
-    ///Return a new array with the elements in reverse order
-    val rev: ResizeArray<'a> -> ResizeArray<'a>
-
-    /// Sort the elements using the given comparison function
-    val sort: ('a -> 'a -> int) -> ResizeArray<'a> -> unit
-
-    /// Sort the elements using the key extractor and generic comparison on the keys
-    val sort_by: ('a -> 'key) -> ResizeArray<'a> -> unit
-
-
-    /// Return a view of the array as an enumerable object
-    val to_seq : ResizeArray<'a> -> seq<'a>
-
-    /// Test elements of the two arrays pairwise to see if any pair of element satisfies the given predicate.
-    /// Raise ArgumentException if the arrays have different lengths.
-    val exists2 : ('a -> 'b -> bool) -> ResizeArray<'a> -> ResizeArray<'b> -> bool
-
-    /// Return 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 find_index : ('a -> bool) -> ResizeArray<'a> -> int
-
-    /// Return 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 find_indexi : (int -> 'a -> bool) -> ResizeArray<'a> -> int
-
-    /// Apply 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_left : ('a -> 'a -> 'a) -> ResizeArray<'a> -> 'a
-
-    /// Apply 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 reduce_right : ('a -> 'a -> 'a) -> ResizeArray<'a> -> 'a
-
-    /// Apply 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 fold_left2: ('state -> 'b1 -> 'b2 -> 'state) -> 'state -> ResizeArray<'b1> -> ResizeArray<'b2> -> '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 fold_right2 : ('a1 -> 'a2 -> 'b -> 'b) -> ResizeArray<'a1> -> ResizeArray<'a2> -> 'b -> 'b
-
-    /// Test elements of the two arrays pairwise to see if all pairs of elements satisfy the given predicate.
-    /// Raise ArgumentException if the arrays have different lengths.
-    val for_all2 : ('a -> 'b -> bool) -> ResizeArray<'a> -> ResizeArray<'b> -> bool
-
-    /// Return true if the given array is empty, otherwise false
-    val is_empty : ResizeArray<'a> -> bool
-
-    /// Apply 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 : (int -> 'a -> 'b -> unit) -> ResizeArray<'a> -> ResizeArray<'b> -> unit
-
-    /// Build 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 mapi2 : (int -> 'a -> 'b -> 'c) -> ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<'c>
-
-    /// Like fold_left, but return the intermediary and final results
-    val scan_left : ('b -> 'a -> 'b) -> 'b -> ResizeArray<'a> -> ResizeArray<'b>
-
-    /// Like fold_right, but return both the intermediary and final results
-    val scan_right : ('a -> 'c -> 'c) -> ResizeArray<'a> -> 'c -> ResizeArray<'c>
-
-    /// Return an array containing the given element
-    val singleton : 'a -> ResizeArray<'a>
-    
-    /// Return the index of the first element in the array
-    /// that satisfies the given predicate.
-    val tryfind_index : ('a -> bool) -> ResizeArray<'a> -> int option
-
-    /// Return the index of the first element in the array
-    /// that satisfies the given predicate.
-    val tryfind_indexi : (int -> 'a -> bool) -> ResizeArray<'a> -> int option
-
-    /// Combine the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is
-    /// raised..
-    val zip : ResizeArray<'a> -> ResizeArray<'b> -> ResizeArray<'a * 'b>
-
-    /// Split an array of pairs into two arrays
-    val unzip : ResizeArray<'a * 'b> -> ResizeArray<'a> * ResizeArray<'b>
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sbyte.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sbyte.fs
deleted file mode 100644
index 51c097ef..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sbyte.fs
+++ /dev/null
@@ -1,51 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-namespace Microsoft.FSharp.Compatibility
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-open System
-
-/// Simple operations on signed bytes
-[]
-[]
-module SByte = 
-
-    let compare (x:int8) y = compare x y
-
-    let zero = 0y
-    let one = 1y
-    let minus_one = - 1y
-    let neg (x:int8) =  - x
-    let add (x:int8) (y:int8) = x + y
-    let sub (x:int8) (y:int8) = x - y
-    let mul (x:int8) (y:int8) = x * y
-    let div (x:int8) (y:int8) = x / y
-    let rem (x:int8) (y:int8) = x % y
-    let succ (x:int8) = x + 1y
-    let pred (x:int8) = x - 1y
-    let abs (x:int8) = if x < zero then neg x else x
-    let max_int = 0x7Fuy
-    let min_int = 0x80y
-    let logand (x:int8) (y:int8) = x &&& y
-    let logor (x:int8) (y:int8) = x ||| y
-    let logxor (x:int8) (y:int8) = x ^^^ y
-    let lognot (x:int8) = ~~~ x
-    let shift_left (x:int8) (n:int) =  x <<< n
-    let shift_right (x:int8) (n:int) =  x >>> n
-    let of_uint8 (n:byte)   = sbyte n
-    let to_uint8 (x:int8) = byte x
-
-    let of_byte (n:byte)   = sbyte n
-    let to_byte (x:int8) = byte x
-
-    let of_int (n:int)   = sbyte n
-    let to_int (x:int8) = int x
-
-    let of_int16 (n:int16) = sbyte n
-    let to_int16 (x:int8)  = int16 x
-
-    let of_int32 (n:int32) = sbyte n
-    let to_int32 (x:int8) = int32 x
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/set.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/set.fs
deleted file mode 100644
index 10cc36df..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/set.fs
+++ /dev/null
@@ -1,108 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-#if INTERNALIZED_POWER_PACK
-namespace Internal.Utilities
-#else
-namespace Microsoft.FSharp.Compatibility
-#endif
-
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-open Microsoft.FSharp.Core.Operators
-open Microsoft.FSharp.Collections
-open System.Collections.Generic
-
-module Set = 
-    type 'T t = Set<'T>  
-    let cardinal (s : Set<'T>) = s.Count
-    let elements (s : Set<'T>) = Set.to_list s
-
-        // Fold, left-to-right. 
-        //
-        // NOTE: This matches OCaml behaviour, though differs from the
-        // behaviour of Map.fold which folds right-to-left.
-    // let fold f m z = Set.fold_left (fun z x ->  f x z) z m
-    let inter s1 s2 = Set.intersect s1 s2
-
-
-
-#if INTERNALIZED_POWER_PACK
-#else
-
-    open Microsoft.FSharp.Collections
-
-    // Functor
-    type Provider<'T,'Tag> when 'Tag :> IComparer<'T> =
-       interface
-         //type t = Tagged.Set<'T,'Tag>
-         abstract empty    : Tagged.Set<'T,'Tag>;
-         abstract is_empty : Tagged.Set<'T,'Tag> -> bool;
-         abstract mem      : 'T -> Tagged.Set<'T,'Tag> -> bool;
-         abstract add      : 'T -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract singleton: 'T -> Tagged.Set<'T,'Tag>;
-         abstract remove   : 'T -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract union    : Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract inter    : Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract diff     : Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract iter     : ('T -> unit) -> Tagged.Set<'T,'Tag> -> unit;
-         abstract elements : Tagged.Set<'T,'Tag> -> 'T list;
-         abstract equal    : Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> bool;
-         abstract subset   : Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> bool;
-         abstract compare  : Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> int;
-         abstract for_all  : ('T -> bool) -> Tagged.Set<'T,'Tag> -> bool;
-         abstract exists   : ('T -> bool) -> Tagged.Set<'T,'Tag> -> bool;
-         abstract filter   : ('T -> bool) -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract partition: ('T -> bool) -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> * Tagged.Set<'T,'Tag>;
-         abstract fold     : ('T -> 'b -> 'b) -> Tagged.Set<'T,'Tag> -> 'b -> 'b;
-         abstract cardinal : Tagged.Set<'T,'Tag> -> int;
-         abstract min_elt  : Tagged.Set<'T,'Tag> -> 'T;
-         abstract max_elt  : Tagged.Set<'T,'Tag> -> 'T;
-         abstract choose   : Tagged.Set<'T,'Tag> -> 'T 
-       end
-
-    let gen_inter (s1 : Tagged.Set<_,_>)  (s2 : Tagged.Set<_,_>)  = Tagged.Set<_,_>.Intersection(s1,s2)
-    let gen_diff (s1 : Tagged.Set<_,_>)  (s2 : Tagged.Set<_,_>)   = Tagged.Set<_,_>.Difference(s1,s2)
-    let gen_iter f (s : Tagged.Set<_,_>)  = s.Iterate(f)
-    let gen_elements (s : Tagged.Set<_,_>) = s.ToList()
-    let gen_equal (s1 : Tagged.Set<_,_>)  (s2 : Tagged.Set<_,_>)  =  Tagged.Set<_,_>.Equality(s1,s2)
-    let gen_subset (s1 : Tagged.Set<_,_>)  (s2 : Tagged.Set<_,_>)  = s1.IsSubsetOf(s2)
-    let gen_compare (s1 : Tagged.Set<_,_>)  (s2 : Tagged.Set<_,_>) = Tagged.Set<_,_>.Compare(s1,s2)
-    let gen_for_all f (s : Tagged.Set<_,_>) = s.ForAll f
-    let gen_exists f (s : Tagged.Set<_,_>) = s.Exists f
-    let gen_filter f (s : Tagged.Set<_,_>) = s.Filter f
-    let gen_partition f (s : Tagged.Set<_,_>) = s.Partition f 
-    let gen_fold f (s : Tagged.Set<_,_>) acc = s.Fold f acc
-    let gen_cardinal (s : Tagged.Set<_,_>) = s.Count
-    let gen_size (s : Tagged.Set<_,_>) = s.Count
-    let gen_min_elt (s : Tagged.Set<_,_>) = s.MinimumElement
-    let gen_max_elt (s : Tagged.Set<_,_>) = s.MaximumElement
-
-    let MakeTagged (cf : 'Tag) : Provider<'T,'Tag> when 'Tag :> IComparer<'T> =
-       { new Provider<_,_> with 
-           member p.empty = Tagged.Set<_,_>.Empty(cf);
-           member p.is_empty s = s.IsEmpty;
-           member p.mem x s = s.Contains(x);
-           member p.add x s = s.Add(x);
-           member p.singleton x = Tagged.Set<'T,'Tag>.Singleton(cf,x);
-           member p.remove x s = s.Remove(x);
-           member p.union (s1 : Tagged.Set<_,_>)  (s2 : Tagged.Set<_,_>) = Tagged.Set<_,_>.Union(s1,s2);
-           member p.inter s1 s2 = gen_inter s1 s2 ;
-           member p.diff s1 s2 = gen_diff s1 s2;
-           member p.iter f s= gen_iter f s;
-           member p.elements s = gen_elements s;
-           member p.equal s1 s2= gen_equal s1 s2;
-           member p.subset s1 s2= gen_subset s1 s2;
-           member p.compare s1 s2 = gen_compare s1 s2;
-           member p.for_all f s = gen_for_all f s;
-           member p.fold f s z = gen_fold f s z;
-           member p.exists f s = gen_exists f s;
-           member p.filter f s = gen_filter f s;
-           member p.partition f s = gen_partition f s ;
-           member p.cardinal s = gen_cardinal s;
-           member p.min_elt s = s.MinimumElement;
-           member p.max_elt s = s.MaximumElement; 
-           member p.choose s  = s.Choose }
-
-    type Provider<'T> = Provider<'T, IComparer<'T>>
-    let Make cf  = MakeTagged (ComparisonIdentity.FromFunction cf)
-#endif
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/set.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/set.fsi
deleted file mode 100644
index 63904721..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/set.fsi
+++ /dev/null
@@ -1,104 +0,0 @@
-// (c) Microsoft Corporation 2005-2009.
-
-#if INTERNALIZED_POWER_PACK
-namespace Internal.Utilities
-#else
-namespace Microsoft.FSharp.Compatibility
-#endif
-
-#nowarn "62" // ocaml compat
-
-open System
-open Microsoft.FSharp.Core
-open Microsoft.FSharp.Collections
-open System.Collections.Generic
-
-/// Immutable sets implemented via binary trees
-module Set = 
-    /// For use when not opening the Set module, e.g. Set.t
-    []
-    type 'T t = Microsoft.FSharp.Collections.Set<'T>  
-
-    []
-    val cardinal: Set<'T> -> int
-
-    ///The elements of the set as a list.
-    []
-    val elements: Set<'T> -> 'T list
-
-    // ///Apply the given accumulating function to all the elements of the set
-    // []
-    // val fold: ('T -> 'State -> 'State) -> Set<'T> -> 'State -> 'State
-
-    ///Compute the intersection of the two sets.
-    []
-    val inter: Set<'T> -> Set<'T> -> Set<'T>
-
-
-
-#if INTERNALIZED_POWER_PACK
-#else
-    open Microsoft.FSharp.Collections
-
-    ///A collection of operations for creating and using sets based on a particular comparison function.
-    ///The 'Tag' type parameter is used to track information about the comparison function.
-    []
-    type Provider<'T,'Tag> when 'Tag :> IComparer<'T> =
-       interface
-         abstract empty: Tagged.Set<'T,'Tag>;
-         abstract is_empty: Tagged.Set<'T,'Tag> -> bool;
-         abstract mem: 'T -> Tagged.Set<'T,'Tag> -> bool;
-         abstract add: 'T -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract singleton: 'T -> Tagged.Set<'T,'Tag>;
-         abstract remove: 'T -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract union: Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract inter: Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract diff: Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract iter: ('T -> unit) -> Tagged.Set<'T,'Tag> -> unit;
-         abstract elements: Tagged.Set<'T,'Tag> -> 'T list;
-         abstract equal: Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> bool;
-         abstract subset: Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> bool;
-         abstract compare: Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> -> int;
-         abstract for_all: ('T -> bool) -> Tagged.Set<'T,'Tag> -> bool;
-         abstract exists: ('T -> bool) -> Tagged.Set<'T,'Tag> -> bool;
-         abstract filter: ('T -> bool) -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag>;
-         abstract partition: ('T -> bool) -> Tagged.Set<'T,'Tag> -> Tagged.Set<'T,'Tag> * Tagged.Set<'T,'Tag>;
-         abstract fold:  ('T -> 'State -> 'State) -> Tagged.Set<'T,'Tag> -> 'State -> 'State;
-         abstract cardinal: Tagged.Set<'T,'Tag> -> int;
-         abstract min_elt: Tagged.Set<'T,'Tag> -> 'T;
-         abstract max_elt: Tagged.Set<'T,'Tag> -> 'T;
-         abstract choose: Tagged.Set<'T,'Tag> -> 'T 
-       end
-         
-
-    []
-    type Provider<'T> = Provider<'T, IComparer<'T>>
-
-    /// Build a collection of operations for creating and using 
-    /// maps based on a single consistent comparison function. This returns a record
-    /// that contains the functions you use to create and manipulate maps all of which 
-    /// use this comparison function.  The returned value is much like an ML module. 
-    ///
-    /// Use MakeTagged if you want additional type safety that guarantees that two sets
-    /// based on different comparison functions can never be combined in inconsistent ways.
-    
-    []
-    val Make: ('T -> 'T -> int) -> Provider<'T>
-
-    ///A functor to build a collection of operations for creating and using 
-    /// sets based on the given comparison function. This returns a record that 
-    /// contains the functions you use to create and manipulate maps of
-    /// this kind.  The returned value is much like an ML module. 
-    ///
-    /// To use this function you need to define a new named class that implements IComparer and
-    /// pass an instance of that class as the first argument. For example:
-    ///      type MyComparer() = 
-    ///          interface IComparer<string> with 
-    ///            member self.Compare(x,y) = ...
-    ///
-    /// let MyStringSetProvider = Set.MakeTagged(new MyComparer())
-    []
-    val MakeTagged: ('Tag :> IComparer<'T>) -> Provider<'T,'Tag>
-
-#endif
-
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sformat.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sformat.fs
deleted file mode 100644
index 821e43b9..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sformat.fs
+++ /dev/null
@@ -1,1069 +0,0 @@
-//=========================================================================
-// (c) Microsoft Corporation 2005-2009. 
-//=========================================================================
-
-// This file is compiled 4(!) times in the codebase
-//    - as the internal implementation of printf '%A' formatting 
-//           defines: RUNTIME
-//    - as the internal implementation of structured formatting in the FSharp.Compiler-proto.dll 
-//           defines: INTERNALIZED_POWER_PACK + BUILDING_WITH_LKG
-//    - as the internal implementation of structured formatting in FSharp.Compiler.dll 
-//           defines: INTERNALIZED_POWER_PACK 
-//           NOTE: this implementation is used by fsi.exe. This is very important.
-//    - as the public implementation of structured formatting in the FSharp.PowerPack.dll  
-//           defines:  
-//
-// The one implementation file is used because we very much want to keep the implementations of
-// structured formatting the same for fsi.exe and '%A' printing. However fsi.exe may have
-// a richer feature set.
-//
-// Note no layout objects are ever transferred between the above implementations, and in 
-// all 4 cases the layout types are really different types.
-
-#nowarn "52" // The value has been copied to ensure the original is not mutated by this operation
-
-#if INTERNALIZED_POWER_PACK
-// FSharp.Compiler-proto.dll:
-// FSharp.Compiler.dll:
-namespace Internal.Utilities.StructuredFormat
-#else
-#if RUNTIME 
-// FSharp.Core.dll:
-namespace Microsoft.FSharp.Text.StructuredPrintfImpl
-#else
-// Powerpack: 
-namespace Microsoft.FSharp.Text.StructuredFormat
-#endif
-#endif
-
-    // Breakable block layout implementation.
-    // This is a fresh implementation of pre-existing ideas.
-
-    open System
-    open System.Diagnostics
-    open System.Text
-    open System.IO
-    open System.Reflection
-    open System.Globalization
-    open System.Collections.Generic
-    open Microsoft.FSharp.Core
-    open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
-    open Microsoft.FSharp.Core.Operators
-    open Microsoft.FSharp.Reflection
-    open Microsoft.FSharp.Collections
-    open Microsoft.FSharp.Primitives.Basics
-
-    /// A joint, between 2 layouts, is either:
-    ///  - unbreakable, or
-    ///  - breakable, and if broken the second block has a given indentation.
-    type Joint =
-     | Unbreakable
-     | Breakable of int
-     | Broken of int
-
-    /// Leaf juxt,data,juxt
-    /// Node juxt,left,juxt,right,juxt and joint
-    ///
-    /// If either juxt flag is true, then no space between words.
-    []
-    type Layout =
-     | Leaf of bool * obj * bool
-     | Node of bool * layout * bool * layout * bool * joint
-     | Attr of string * (string * string) list * layout
-
-    and layout = Layout
-    and joint = Joint
-
-    type IEnvironment = 
-        abstract GetLayout : obj -> layout
-        abstract MaxColumns : int
-        abstract MaxRows : int
-     
-    module LayoutOps = 
-        let rec juxtLeft = function
-          | Leaf (jl,text,jr)         -> jl
-          | Node (jl,l,jm,r,jr,joint) -> jl
-          | Attr (tag,attrs,l)        -> juxtLeft l
-
-        let rec juxtRight = function
-          | Leaf (jl,text,jr)         -> jr
-          | Node (jl,l,jm,r,jr,joint) -> jr
-          | Attr (tag,attrs,l)        -> juxtRight l
-
-        let mkNode l r joint =
-           let jl = juxtLeft  l 
-           let jm = juxtRight l || juxtLeft r 
-           let jr = juxtRight r 
-           Node(jl,l,jm,r,jr,joint)
-
-
-        // constructors
-
-
-        let objL   (obj:obj) = Leaf (false,obj,false)
-        let sLeaf  (l,(str:string),r) = Leaf (l,(str:>obj),r)
-        let wordL  str = sLeaf (false,str,false)
-        let sepL   str = sLeaf (true ,str,true)   
-        let rightL str = sLeaf (true ,str,false)   
-        let leftL  str = sLeaf (false,str,true)
-        let emptyL = sLeaf (true,"",true)
-        let isEmptyL = function 
-         | Leaf(true,s,true) -> 
-            match s with 
-            | :? string as s -> s = "" 
-            | _ -> false
-         | _ -> false
-         
-
-        let aboveL  l r = mkNode l r (Broken 0)
-
-        let joinN i l r = mkNode l r (Breakable i)                                      
-        let join  = joinN 0
-        let join1 = joinN 1
-        let join2 = joinN 2
-        let join3 = joinN 3
-
-        let tagAttrL tag attrs l = Attr(tag,attrs,l)
-
-        let apply2 f l r = if isEmptyL l then r else
-                           if isEmptyL r then l else f l r
-
-        let ($$)  l r  = mkNode l r (Unbreakable)
-        let (++)  l r  = mkNode l r (Breakable 0)
-        let (--)  l r  = mkNode l r (Breakable 1)
-        let (---) l r  = mkNode l r (Breakable 2)
-        let (@@)   l r = apply2 (fun l r -> mkNode l r (Broken 0)) l r
-        let (@@-)  l r = apply2 (fun l r -> mkNode l r (Broken 1)) l r
-        let (@@--) l r = apply2 (fun l r -> mkNode l r (Broken 2)) l r
-        let tagListL tagger = function
-            | []    -> emptyL
-            | [x]   -> x
-            | x::xs ->
-                let rec process' prefixL = function
-                    []    -> prefixL
-                  | y::ys -> process' ((tagger prefixL) ++ y) ys
-                in  process' x xs
-            
-        let commaListL x = tagListL (fun prefixL -> prefixL $$ rightL ",") x
-        let semiListL x  = tagListL (fun prefixL -> prefixL $$ rightL ";") x
-        let spaceListL x = tagListL (fun prefixL -> prefixL) x
-        let sepListL x y = tagListL (fun prefixL -> prefixL $$ x) y
-        let bracketL l = leftL "(" $$ l $$ rightL ")"
-        let tupleL xs = bracketL (sepListL (sepL ",") xs)
-        let aboveListL = function
-          | []    -> emptyL
-          | [x]   -> x
-          | x::ys -> List.fold (fun pre y -> pre @@ y) x ys
-
-        let optionL xL = function
-            None   -> wordL "None"
-          | Some x -> wordL "Some" -- (xL x)
-
-        let listL xL xs = leftL "[" $$ sepListL (sepL ";") (List.map xL xs) $$ rightL "]"
-
-        let squareBracketL x = leftL "[" $$ x $$ rightL "]"    
-
-        let braceL         x = leftL "{" $$ x $$ rightL "}"
-
-        let boundedUnfoldL
-                    (itemL     : 'a -> layout)
-                    (project   : 'z -> ('a * 'z) option)
-                    (stopShort : 'z -> bool)
-                    (z : 'z)
-                    maxLength =
-          let rec consume n z =
-            if stopShort z then [wordL "..."] else
-            match project z with
-              | None       -> []  (* exhaused input *)
-              | Some (x,z) -> if n<=0 then [wordL "..."]               (* hit print_length limit *)
-                                      else itemL x :: consume (n-1) z  (* cons recursive... *)
-          consume maxLength z  
-
-        let unfoldL itemL project z maxLength = boundedUnfoldL  itemL project (fun _ -> false) z maxLength
-          
-    /// These are a typical set of options used to control structured formatting.
-    []
-    type FormatOptions = 
-        { FloatingPointFormat: string;
-          AttributeProcessor: (string -> (string * string) list -> bool -> unit);
-#if RUNTIME
-#else
-#if INTERNALIZED_POWER_PACK    // FSharp.Compiler.dll: This is the PrintIntercepts extensibility point currently revealed by fsi.exe's AddPrinter
-          PrintIntercepts: (IEnvironment -> obj -> Layout option) list;
-          StringLimit : int;
-#endif
-#endif
-          FormatProvider: System.IFormatProvider;
-          BindingFlags: System.Reflection.BindingFlags
-          PrintWidth : int; 
-          PrintDepth : int; 
-          PrintLength : int;
-          PrintSize : int;        
-          ShowProperties : bool;
-          ShowIEnumerable: bool; }
-        static member Default =
-            { FormatProvider = (System.Globalization.CultureInfo.InvariantCulture :> System.IFormatProvider);
-#if RUNTIME
-#else
-#if INTERNALIZED_POWER_PACK    // FSharp.Compiler.dll: This is the PrintIntercepts extensibility point currently revealed by fsi.exe's AddPrinter
-              PrintIntercepts = [];
-              StringLimit = System.Int32.MaxValue;
-#endif
-#endif
-              AttributeProcessor= (fun _ _ _ -> ());
-              BindingFlags = System.Reflection.BindingFlags.Public;
-              FloatingPointFormat = "g10";
-              PrintWidth = 80 ; 
-              PrintDepth = 100 ; 
-              PrintLength = 100;
-              PrintSize = 10000;
-              ShowProperties = false;
-              ShowIEnumerable = true; }
-
-
-
-    module ReflectUtils = 
-        open System
-        open System.Reflection
-
-        type TypeInfo =
-          | TupleType of Type list
-          | FunctionType of Type * Type
-          | RecordType of (string * Type) list
-          | SumType of (string * (string * Type) list) list
-          | UnitType
-          | ObjectType of Type
-
-             
-        let isNamedType(typ:Type) = not (typ.IsArray || typ.IsByRef || typ.IsPointer)
-        let equivHeadTypes (ty1:Type) (ty2:Type) = 
-            isNamedType(ty1) &&
-            if ty1.IsGenericType then 
-              ty2.IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(ty2.GetGenericTypeDefinition())
-            else 
-              ty1.Equals(ty2)
-
-        let option = typedefof
-        let func = typedefof<(obj -> obj)>
-
-        let isOptionType typ = equivHeadTypes typ (typeof)
-        let isUnitType typ = equivHeadTypes typ (typeof)
-        let isListType typ = 
-            FSharpType.IsUnion typ && 
-            (let cases = FSharpType.GetUnionCases typ 
-             cases.Length > 0 && equivHeadTypes (typedefof>) cases.[0].DeclaringType)
-
-        module Type =
-
-            let recdDescOfProps props = 
-               props |> Array.to_list |> List.map (fun (p:PropertyInfo) -> p.Name, p.PropertyType) 
-
-            let getTypeInfoOfType (bindingFlags:BindingFlags) (typ:Type) = 
-                if FSharpType.IsTuple(typ)  then TypeInfo.TupleType (FSharpType.GetTupleElements(typ) |> Array.to_list)
-                elif FSharpType.IsFunction(typ) then let ty1,ty2 = FSharpType.GetFunctionElements typ in  TypeInfo.FunctionType( ty1,ty2)
-                elif FSharpType.IsUnion(typ,bindingFlags) then 
-                    let cases = FSharpType.GetUnionCases(typ,bindingFlags) 
-                    match cases with 
-                    | [| |] -> TypeInfo.ObjectType(typ) 
-                    | _ -> 
-                        TypeInfo.SumType(cases |> Array.to_list |> List.map (fun case -> 
-                            let flds = case.GetFields()
-                            case.Name,recdDescOfProps(flds)))
-                elif FSharpType.IsRecord(typ,bindingFlags) then 
-                    let flds = FSharpType.GetRecordFields(typ,bindingFlags) 
-                    TypeInfo.RecordType(recdDescOfProps(flds))
-                else
-                    TypeInfo.ObjectType(typ)
-
-            let IsOptionType (typ:Type) = isOptionType typ
-            let IsListType (typ:Type) = isListType typ
-            let IsUnitType (typ:Type) = isUnitType typ
-
-        type ValueInfo =
-          | TupleValue of obj list
-          | FunctionClosureValue of System.Type * obj
-          | RecordValue of (string * obj) list
-          | ConstructorValue of string * (string * obj) list
-          | ExceptionValue of System.Type * (string * obj) list
-          | UnitValue
-          | ObjectValue of obj
-
-        module Value = 
-       
-            // Analyze an object to see if it the representation
-            // of an F# value.
-            let GetValueInfoOfObject (bindingFlags:BindingFlags) (obj : obj) = 
-              match obj with 
-              | null -> ObjectValue(obj)
-              | _ -> 
-                let reprty = obj.GetType() 
-
-                // First a bunch of special rules for tuples
-                // Because of the way F# currently compiles tuple values 
-                // of size > 7 we can only reliably reflect on sizes up
-                // to 7.
-
-                if FSharpType.IsTuple reprty then 
-                    TupleValue (FSharpValue.GetTupleFields obj |> Array.to_list)
-                elif FSharpType.IsFunction reprty then 
-                    FunctionClosureValue(reprty,obj)
-                    
-                // It must be exception, abstract, record or union.
-                // Either way we assume the only properties defined on
-                // the type are the actual fields of the type.  Again,
-                // we should be reading attributes here that indicate the
-                // true structure of the type, e.g. the order of the fields.   
-                elif FSharpType.IsUnion(reprty,bindingFlags) then 
-                    let tag,vals = FSharpValue.GetUnionFields (obj,reprty,bindingFlags) 
-                    let props = tag.GetFields()
-                    let pvals = (props,vals) ||> Array.map2 (fun prop v -> prop.Name,v)
-                    ConstructorValue(tag.Name, Array.to_list pvals)
-
-                elif FSharpType.IsExceptionRepresentation(reprty,bindingFlags) then 
-                    let props = FSharpType.GetExceptionFields(reprty,bindingFlags) 
-                    let vals = FSharpValue.GetExceptionFields(obj,bindingFlags) 
-                    let pvals = (props,vals) ||> Array.map2 (fun prop v -> prop.Name,v)
-                    ExceptionValue(reprty, pvals |> Array.to_list)
-
-                elif FSharpType.IsRecord(reprty,bindingFlags) then 
-                    let props = FSharpType.GetRecordFields(reprty,bindingFlags) 
-                    RecordValue(props |> Array.map (fun prop -> prop.Name, prop.GetValue(obj,null)) |> Array.to_list)
-                else
-                    ObjectValue(obj)
-
-            // This one is like the above but can make use of additional
-            // statically-known type information to aid in the
-            // analysis of null values. 
-
-            let GetValueInfo bindingFlags (x : 'a)  (* x could be null *) = 
-                let obj = (box x)
-                match obj with 
-                | null -> 
-                   let typ = typeof<'a>
-                   if isOptionType typ then  ConstructorValue("None", [])
-                   elif isUnitType typ then  UnitValue
-                   else ObjectValue(obj)
-                | _ -> 
-                  GetValueInfoOfObject bindingFlags (obj) 
-
-
-            let GetInfo bindingFlags (v:'a) = GetValueInfo bindingFlags (v:'a)
-
-    module Display = 
-
-        open ReflectUtils
-        open LayoutOps
-        let string_of_int (i:int) = i.ToString()
-
-        let typeUsesSystemObjectToString (typ:System.Type) =
-            try let methInfo = typ.GetMethod("ToString",BindingFlags.Public ||| BindingFlags.Instance,null,[| |],null)
-                methInfo.DeclaringType = typeof
-            with e -> false
-
-        /// If "str" ends with "ending" then remove it from "str", otherwise no change.
-        let trimEnding (ending:string) (str:string) =
-#if FX_NO_CULTURE_INFO_ARGS
-          if str.EndsWith(ending) then 
-#else
-          if str.EndsWith(ending,false,CultureInfo.InvariantCulture) then 
-#endif
-              str.Substring(0,str.Length - ending.Length) 
-          else str
-
-        let catchExn f = try Choice1Of2 (f ()) with e -> Choice2Of2 e
-        
-        // An implementation of break stack.
-        // Uses mutable state, relying on linear threading of the state.
-
-        type breaks = 
-            Breaks of
-                int *     // pos of next free slot 
-                int *     // pos of next possible "outer" break - OR - outer=next if none possible 
-                int array // stack of savings, -ve means it has been broken   
-
-        // next  is next slot to push into - aka size of current occupied stack.  
-        // outer counts up from 0, and is next slot to break if break forced.
-        // - if all breaks forced, then outer=next.
-        // - popping under these conditions needs to reduce outer and next.
-        
-
-        //let dumpBreaks prefix (Breaks(next,outer,stack)) = ()
-        //   printf "%s: next=%d outer=%d stack.Length=%d\n" prefix next outer stack.Length;
-        //   stdout.Flush() 
-             
-        let chunkN = 400      
-        let breaks0 () = Breaks(0,0,Array.create chunkN 0)
-
-        let pushBreak saving (Breaks(next,outer,stack)) =
-            //dumpBreaks "pushBreak" (next,outer,stack);
-            let stack = 
-                if next = stack.Length then
-                  Array.init (next + chunkN) (fun i -> if i < next then stack.[i] else 0) // expand if full 
-                else
-                  stack
-           
-            stack.[next] <- saving;
-            Breaks(next+1,outer,stack)
-
-        let popBreak (Breaks(next,outer,stack)) =
-            //dumpBreaks "popBreak" (next,outer,stack);
-            if next=0 then raise (Failure "popBreak: underflow");
-            let topBroke = stack.[next-1] < 0
-            let outer = if outer=next then outer-1 else outer  // if all broken, unwind 
-            let next  = next - 1
-            Breaks(next,outer,stack),topBroke
-
-        let forceBreak (Breaks(next,outer,stack)) =
-            //dumpBreaks "forceBreak" (next,outer,stack);
-            if outer=next then
-              // all broken 
-                None
-            else
-                let saving = stack.[outer]
-                stack.[outer] <- -stack.[outer];    
-                let outer = outer+1
-                Some (Breaks(next,outer,stack),saving)
-
-        // -------------------------------------------------------------------------
-        // fitting
-        // ------------------------------------------------------------------------
-          
-        let squashTo (maxWidth,leafFormatter) layout =
-            if maxWidth <= 0 then layout else 
-            let rec fit breaks (pos,layout) =
-                // breaks = break context, can force to get indentation savings.
-                // pos    = current position in line
-                // layout = to fit
-                //------
-                // returns:
-                // breaks
-                // layout - with breaks put in to fit it.
-                // pos    - current pos in line = rightmost position of last line of block.
-                // offset - width of last line of block
-                // NOTE: offset <= pos -- depending on tabbing of last block
-               
-                let breaks,layout,pos,offset =
-                    match layout with
-                    | Attr (tag,attrs,l) ->
-                        let breaks,layout,pos,offset = fit breaks (pos,l) 
-                        let layout = Attr (tag,attrs,layout) 
-                        breaks,layout,pos,offset
-                    | Leaf (jl,obj,jr) ->
-                        let text:string = leafFormatter obj 
-                        // save the formatted text from the squash
-                        let layout = Leaf(jl,(text :> obj),jr) 
-                        let textWidth = text.Length
-                        let rec fitLeaf breaks pos =
-                          if pos + textWidth <= maxWidth then
-                              breaks,layout,pos + textWidth,textWidth // great, it fits 
-                          else
-                              match forceBreak breaks with
-                              | None                 -> 
-                                  breaks,layout,pos + textWidth,textWidth // tough, no more breaks 
-                              | Some (breaks,saving) -> 
-                                  let pos = pos - saving 
-                                  fitLeaf breaks pos
-                       
-                        fitLeaf breaks pos
-                    | Node (jl,l,jm,r,jr,joint) ->
-                        let mid = if jm then 0 else 1
-                        match joint with
-                        | Unbreakable    ->
-                            let breaks,l,pos,offsetl = fit breaks (pos,l)    // fit left 
-                            let pos = pos + mid                              // fit space if juxt says so 
-                            let breaks,r,pos,offsetr = fit breaks (pos,r)    // fit right 
-                            breaks,Node (jl,l,jm,r,jr,Unbreakable),pos,offsetl + mid + offsetr
-                        | Broken indent ->
-                            let breaks,l,pos,offsetl = fit breaks (pos,l)    // fit left 
-                            let pos = pos - offsetl + indent                 // broken so - offset left + ident 
-                            let breaks,r,pos,offsetr = fit breaks (pos,r)    // fit right 
-                            breaks,Node (jl,l,jm,r,jr,Broken indent),pos,indent + offsetr
-                        | Breakable indent ->
-                            let breaks,l,pos,offsetl = fit breaks (pos,l)    // fit left 
-                            // have a break possibility, with saving 
-                            let saving = offsetl + mid - indent
-                            let pos = pos + mid
-                            if saving>0 then
-                                let breaks = pushBreak saving breaks
-                                let breaks,r,pos,offsetr = fit breaks (pos,r)
-                                let breaks,broken = popBreak breaks
-                                if broken then
-                                    breaks,Node (jl,l,jm,r,jr,Broken indent)   ,pos,indent + offsetr
-                                else
-                                    breaks,Node (jl,l,jm,r,jr,Breakable indent),pos,offsetl + mid + offsetr
-                            else
-                                // actually no saving so no break 
-                                let breaks,r,pos,offsetr = fit breaks (pos,r)
-                                breaks,Node (jl,l,jm,r,jr,Breakable indent)  ,pos,offsetl + mid + offsetr
-               
-               //Printf.printf "\nDone:     pos=%d offset=%d" pos offset;
-                breaks,layout,pos,offset
-           
-            let breaks = breaks0 ()
-            let pos = 0
-            let breaks,layout,pos,offset = fit breaks (pos,layout)
-            layout
-
-        // -------------------------------------------------------------------------
-        // showL
-        // ------------------------------------------------------------------------
-
-        let combine strs = System.String.Concat(Array.of_list(strs) : string[])
-        let showL opts leafFormatter layout =
-            let push x rstrs = x::rstrs
-            let z0 = [],0
-            let addText (rstrs,i) (text:string) = push text rstrs,i + text.Length
-            let index   (rstrs,i)               = i
-            let extract rstrs = combine(List.rev rstrs) 
-            let newLine (rstrs,i) n     = // \n then spaces... 
-                let indent = new System.String(' ', n)
-                let rstrs = push "\n"   rstrs
-                let rstrs = push indent rstrs
-                rstrs,n
-
-            // addL: pos is tab level 
-            let rec addL z pos layout = 
-                match layout with 
-                | Leaf (jl,obj,jr)                 -> 
-                    let text = leafFormatter obj 
-                    addText z text
-                | Node (jl,l,jm,r,jr,Broken indent) 
-                     // Print width = 0 implies 1D layout, no squash
-                     when not (opts.PrintWidth = 0)  -> 
-                    let z = addL z pos l
-                    let z = newLine z (pos+indent)
-                    let z = addL z (pos+indent) r
-                    z
-                | Node (jl,l,jm,r,jr,_)             -> 
-                    let z = addL z pos l
-                    let z = if jm then z else addText z " "
-                    let pos = index z
-                    let z = addL z pos r
-                    z
-                | Attr (tag,attrs,l) ->
-                    addL z pos l
-           
-            let rstrs,i = addL z0 0 layout
-            extract rstrs
-
-
-        // -------------------------------------------------------------------------
-        // outL
-        // ------------------------------------------------------------------------
-
-        let outL outAttribute leafFormatter (chan : TextWriter) layout =
-            // write layout to output chan directly 
-            let write (s:string) = chan.Write(s)
-            // z is just current indent 
-            let z0 = 0
-            let index i = i
-            let addText z text  = write text;  (z + text.Length)
-            let newLine z n     = // \n then spaces... 
-                let indent = new System.String(' ',n)
-                chan.WriteLine();
-                write indent;
-                n
-                
-            // addL: pos is tab level 
-            let rec addL z pos layout = 
-                match layout with 
-                | Leaf (jl,obj,jr)                 -> 
-                    let text = leafFormatter obj 
-                    addText z text
-                | Node (jl,l,jm,r,jr,Broken indent) -> 
-                    let z = addL z pos l
-                    let z = newLine z (pos+indent)
-                    let z = addL z (pos+indent) r
-                    z
-                | Node (jl,l,jm,r,jr,_)             -> 
-                    let z = addL z pos l
-                    let z = if jm then z else addText z " "
-                    let pos = index z
-                    let z = addL z pos r
-                    z 
-                | Attr (tag,attrs,l) ->
-                let _ = outAttribute tag attrs true
-                let z = addL z pos l
-                let _ = outAttribute tag attrs false
-                z
-           
-            let i = addL z0 0 layout
-            ()
-
-        // --------------------------------------------------------------------
-        // pprinter: using general-purpose reflection...
-        // -------------------------------------------------------------------- 
-          
-        let getValueInfo bindingFlags (x:'a) = Value.GetInfo bindingFlags (x:'a)
-
-        let unpackCons recd =
-            match recd with 
-            | [(_,h);(_,t)] -> (h,t)
-            | _             -> failwith "unpackCons"
-
-        let getListValueInfo bindingFlags (x:obj) =
-            match x with 
-            | null -> None 
-            | _ -> 
-                match getValueInfo bindingFlags x with
-                | ConstructorValue ("Cons",recd) -> Some (unpackCons recd)
-                | ConstructorValue ("Empty",[]) -> None
-                | _ -> failwith "List value had unexpected ValueInfo"
-
-        let compactCommaListL xs = sepListL (sepL ",") xs // compact, no spaces around "," 
-        let nullL = wordL "null"
-        let measureL = wordL "()"
-          
-        // --------------------------------------------------------------------
-        // pprinter: attributes
-        // -------------------------------------------------------------------- 
-
-        let makeRecordVerticalL nameXs =
-            let itemL (name,xL) = let labelL = wordL name in ((labelL $$ wordL "=")) -- (xL  $$ (rightL ";"))
-            let braceL xs = (leftL "{") $$ xs $$ (rightL "}")
-            braceL (aboveListL (List.map itemL nameXs))
-
-        let makeRecordHorizontalL nameXs = (* This is a more compact rendering of records - and is more like tuples *)
-            let itemL (name,xL) = let labelL = wordL name in ((labelL $$ wordL "=")) -- xL
-            let braceL xs = (leftL "{") $$ xs $$ (rightL "}")
-            braceL (sepListL (rightL ";")  (List.map itemL nameXs))
-
-        let makeRecordL nameXs = makeRecordVerticalL nameXs (* REVIEW: switch to makeRecordHorizontalL ? *)
-
-        let makePropertiesL nameXs =
-            let itemL (name,v) = 
-               let labelL = wordL name 
-               (labelL $$ wordL "=")
-               $$ (match v with 
-                   | None -> wordL "?" 
-                   | Some xL -> xL)
-               $$ (rightL ";")
-            let braceL xs = (leftL "{") $$ xs $$ (rightL "}")
-            braceL (aboveListL (List.map itemL nameXs))
-
-        let makeListL itemLs =
-            (leftL "[") $$
-            sepListL (rightL ";") itemLs $$
-            (rightL "]")
-
-        let makeArrayL xs =
-            (leftL "[|") $$
-            sepListL (rightL ";") xs $$
-            (rightL "|]")
-
-        let makeArray2L xs = leftL "[" $$ aboveListL xs $$ rightL "]"  
-
-        // --------------------------------------------------------------------
-        // pprinter: anyL - support functions
-        // -------------------------------------------------------------------- 
-
-        let getProperty (obj: obj) name =
-            let ty = obj.GetType()
-#if FX_NO_CULTURE_INFO_ARGS
-            ty.InvokeMember(name, (BindingFlags.GetProperty ||| BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic), null, obj, Array.of_list [ ])
-#else
-            ty.InvokeMember(name, (BindingFlags.GetProperty ||| BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic), null, obj, Array.of_list [ ],CultureInfo.InvariantCulture)
-#endif
-
-        let formatChar isChar c = 
-            match c with 
-            | '\'' when isChar -> "\\\'"
-            | '\"' when not isChar -> "\\\""
-            //| '\n' -> "\\n"
-            //| '\r' -> "\\r"
-            //| '\t' -> "\\t"
-            | '\\' -> "\\\\"
-            | '\b' -> "\\b"
-            | _ when System.Char.IsControl(c) -> 
-                 let d1 = (int c / 100) % 10 
-                 let d2 = (int c / 10) % 10 
-                 let d3 = int c % 10 
-                 "\\" + d1.ToString() + d2.ToString() + d3.ToString()
-            | _ -> c.ToString()
-            
-        let formatString (s:string) =
-            let rec check i = i < s.Length && not (System.Char.IsControl(s,i)) && s.[i] <> '\"' && check (i+1) 
-            let rec conv i acc = if i = s.Length then combine (List.rev acc) else conv (i+1) (formatChar false s.[i] :: acc)  
-            "\"" + s + "\""
-            // REVIEW: should we check for the common case of no control characters? Reinstate the following?
-            //"\"" + (if check 0 then s else conv 0 []) + "\""
-
-        let formatStringInWidth (width:int) (str:string) =
-            // Return a truncated version of the string, e.g.
-            //   "This is the initial text, which has been truncat"+[12 chars]
-            //
-            // Note: The layout code forces breaks based on leaf size and possible break points.
-            //       It does not force leaf size based on width.
-            //       So long leaf-string width can not depend on their printing context...
-            //
-            // The suffix like "+[dd chars]" is 11 chars.
-            //                  12345678901
-            let suffixLength    = 11 // turning point suffix length
-            let prefixMinLength = 12 // arbitrary. If print width is reduced, want to print a minimum of information on strings...
-            let prefixLength = max (width - 2 (*quotes*) - suffixLength) prefixMinLength
-            "\"" ^ (str.Substring(0,prefixLength)) ^ "\"" ^ "+[" ^ (str.Length - prefixLength).ToString() ^ " chars]"
-
-        // --------------------------------------------------------------------
-        // pprinter: anyL
-        // -------------------------------------------------------------------- 
-                           
-        type Precedence = 
-            | BracketIfTupleOrNotAtomic = 2
-            | BracketIfTuple = 3
-            | NeverBracket = 4
-
-        // In fsi.exe, certain objects are not printed for top-level bindings.
-        type ShowMode = ShowAll | ShowTopLevelBinding
-
-        // polymorphic and inner recursion limitations prevent us defining polyL in the recursive loop 
-        let polyL bindingFlags (objL: ShowMode -> int -> Precedence -> ValueInfo -> obj -> Layout) showMode i prec  (x:'a) (* x could be null *) =
-            objL showMode i prec (getValueInfo bindingFlags (x:'a))  (box x) 
-
-        let anyL showMode bindingFlags (opts:FormatOptions) (x:'a) =
-            // showMode = ShowTopLevelBinding on the outermost expression when called from fsi.exe,
-            // This allows certain outputs, e.g. objects that would print as  to be suppressed, etc. See 4343.
-            // Calls to layout proper sub-objects should pass showMode = ShowAll.
-
-            // Precedences to ensure we add brackets in the right places
-            
-            // Keep a record of objects encountered along the way
-            let path = Dictionary(10,HashIdentity.Reference)
-
-            // Roughly count the "nodes" printed, e.g. leaf items and inner nodes, but not every bracket and comma.
-            let size = ref opts.PrintSize
-            let exceededPrintSize() = !size<=0
-            let countNodes n = if !size > 0 then size := !size - n else () (* no need to keep decrementing (and avoid wrap around) *)
-            let stopShort _ = exceededPrintSize() // for unfoldL
-
-            // Recursive descent
-            let rec objL depthLim prec (x:obj) = polyL bindingFlags objWithReprL ShowAll  depthLim prec x (* showMode for inner expr *)
-            and sameObjL depthLim prec (x:obj) = polyL bindingFlags objWithReprL showMode depthLim prec x (* showMode preserved *)
-
-            and objWithReprL showMode depthLim prec (info:ValueInfo) (x:obj) (* x could be null *) =
-                let showModeFilter lay = match showMode with ShowAll -> lay | ShowTopLevelBinding -> emptyL
-                try
-                  if depthLim<=0 || exceededPrintSize() then wordL "..." else
-                  match x with 
-                  | null -> 
-                    reprL showMode (depthLim-1) prec info x
-                  | _    ->
-                    if (path.ContainsKey(x)) then 
-                       wordL "..."
-                    else 
-                        path.Add(x,0);
-                        let res = 
-
-                        // Try the extensibility attribute
-                            match x.GetType().GetCustomAttributes (typeof, true) with
-                            | null | [| |] -> None
-                            | res -> 
-                               let attr = (res.[0] :?> StructuredFormatDisplayAttribute) 
-                               let txt = attr.Value
-                               if txt = null || txt.Length <= 1 then  
-                                   None
-                               else
-                                  let p1 = txt.IndexOf "{"
-                                  let p2 = txt.LastIndexOf "}"
-                                  if p1 < 0 || p2 < 0 || p1+1 >= p2 then 
-                                      None 
-                                  else
-                                      let preText = if p1 <= 0 then "" else txt.[0..p1-1]
-                                      let postText = if p2+1 >= txt.Length then "" else txt.[p2+1..]
-                                      let prop = txt.[p1+1..p2-1]
-                                      match catchExn (fun () -> getProperty x prop) with
-                                        | Choice2Of2 e -> Some (wordL (""))
-                                        | Choice1Of2 alternativeObj ->
-                                            try 
-                                                let alternativeObjL = 
-                                                  match alternativeObj with 
-                                                      // A particular rule is that if the alternative property
-                                                      // returns a string, we turn off auto-quoting and esaping of
-                                                      // the string, i.e. just treat the string as display text.
-                                                      // This allows simple implementations of 
-                                                      // such as
-                                                      //
-                                                      //    []
-                                                      //    type BigInt(signInt:int, v : BigNat) =
-                                                      //        member x.StructuredDisplayString = x.ToString()
-                                                      //
-                                                      | :? string as s -> sepL s
-                                                      | _ -> sameObjL (depthLim-1) Precedence.BracketIfTuple alternativeObj
-                                                countNodes 0 (* 0 means we do not count the preText and postText *)
-                                                Some (leftL preText $$ alternativeObjL $$ rightL postText)
-                                            with _ -> 
-                                              None
-
-#if RUNTIME
-#else
-#if INTERNALIZED_POWER_PACK    // FSharp.Compiler.dll: This is the PrintIntercepts extensibility point currently revealed by fsi.exe's AddPrinter
-                        let res = 
-                            match res with 
-                            | Some _ -> res
-                            | None -> 
-                                let env = { new IEnvironment with
-                                                member env.GetLayout(y) = objL (depthLim-1) Precedence.BracketIfTuple y 
-                                                member env.MaxColumns = opts.PrintLength
-                                                member env.MaxRows = opts.PrintLength }
-                                opts.PrintIntercepts |> List.tryPick (fun intercept -> intercept env x)
-#endif
-#endif
-                        let res = 
-                            match res with 
-                            | Some res -> res
-                            | None     -> reprL showMode (depthLim-1) prec info x
-                        path .Remove(x) |> ignore;
-                        res
-                with
-                  e ->
-                    countNodes 1
-                    wordL ("Error: " + e.Message)
-
-            and recdAtomicTupleL depthLim recd =
-                // tuples up args to UnionConstruction or ExceptionConstructor. no node count.
-                match recd with 
-                | [(_,x)] -> objL depthLim Precedence.BracketIfTupleOrNotAtomic x 
-                | txs     -> leftL "(" $$ compactCommaListL (List.map (snd >> objL depthLim Precedence.BracketIfTuple) txs) $$ rightL ")" 
-
-            and bracketIfL b basicL =
-                if b then (leftL "(") $$ basicL $$ (rightL ")") else basicL
-
-            and reprL showMode depthLim prec repr x (* x could be null *) =
-                let showModeFilter lay = match showMode with ShowAll -> lay | ShowTopLevelBinding -> emptyL                                                             
-                match repr with 
-                | TupleValue vals -> 
-                    let basicL = sepListL (rightL ",") (List.map (objL depthLim Precedence.BracketIfTuple ) vals)
-                    bracketIfL (prec <= Precedence.BracketIfTuple) basicL 
-
-                | RecordValue items -> 
-                    let itemL (name,x) =
-                      countNodes 1 // record labels are counted as nodes. [REVIEW: discussion under 4090].
-                      (name,objL depthLim Precedence.BracketIfTuple x)
-                    makeRecordL (List.map itemL items)
-
-                | ConstructorValue (constr,recd) when (* x is List. Note: "null" is never a valid list value. *)
-                                                      x<>null && Type.IsListType (x.GetType()) ->
-                    match constr with 
-                    | "Cons" -> 
-                        let (x,xs) = unpackCons recd
-                        let project xs = getListValueInfo bindingFlags xs
-                        let itemLs = objL depthLim Precedence.BracketIfTuple x :: boundedUnfoldL (objL depthLim Precedence.BracketIfTuple) project stopShort xs (opts.PrintLength - 1)
-                        makeListL itemLs
-                    | _ ->
-                        countNodes 1
-                        wordL "[]" 
-
-                | ConstructorValue(nm,[])   ->
-                    countNodes 1
-                    (wordL nm)
-
-                | ConstructorValue(nm,recd) ->
-                    countNodes 1 (* e.g. Some (Some (Some (Some 2))) should count for 5 *)
-                    (wordL nm --- recdAtomicTupleL depthLim recd) |> bracketIfL (prec <= Precedence.BracketIfTupleOrNotAtomic)
-
-                | ExceptionValue(ty,recd) ->
-                    countNodes 1
-                    // Bug 4045: ty.Name may have form Exception. We should be using the constructor .
-                    let name = ty.Name |> trimEnding "Exception" (* if present, trim trailing "Exception" from type name *)
-                    match recd with
-                      | []   -> (wordL name)
-                      | recd -> (wordL name --- recdAtomicTupleL depthLim recd) |> bracketIfL (prec <= Precedence.BracketIfTupleOrNotAtomic)
-
-                | FunctionClosureValue(ty,obj) ->
-                    // Q: should function printing include the ty.Name? It does not convey much useful info to most users, e.g. "clo@0_123".    
-                    countNodes 1
-                    wordL ("") |> showModeFilter
-
-                | ObjectValue(obj)  ->
-                    match obj with 
-                    | null -> (countNodes 1; nullL)
-                    | _ -> 
-                    let ty = obj.GetType()
-                    match obj with 
-                    | :? string as s ->
-                        countNodes 1
-#if INTERNALIZED_POWER_PACK  
-                        if s.Length + 2(*quotes*) <= opts.StringLimit then
-                           // With the quotes, it fits within the limit.
-                           wordL (formatString s)
-                        else
-                           // When a string is considered too long to print, there is a choice: what to print?
-                           // a)             -- follows 
-                           // b)      -- follows  and gives just the length
-                           // c) "abcdefg"+[n chars] -- gives a prefix and the remaining chars
-                           wordL (formatStringInWidth opts.StringLimit s)
-#else
-                        wordL (formatString s)  
-#endif                        
-                    | :? System.Array as arr -> 
-                        match arr.Rank with
-                        | 1 -> 
-                             let n = arr.Length
-                             let b1 = arr.GetLowerBound(0) 
-                             let project depthLim = if depthLim=(b1+n) then None else Some (box (arr.GetValue(depthLim)),depthLim+1)
-                             let itemLs = boundedUnfoldL (objL depthLim Precedence.BracketIfTuple) project stopShort b1 opts.PrintLength
-                             makeArrayL (if b1 = 0 then itemLs else wordL("bound1="+string_of_int b1)::itemLs)
-                        | 2 -> 
-                             let n1 = arr.GetLength(0)
-                             let n2 = arr.GetLength(1)
-                             let b1 = arr.GetLowerBound(0) 
-                             let b2 = arr.GetLowerBound(1) 
-                             let project2 x y =
-                               if x>=(b1+n1) || y>=(b2+n2) then None
-                               else Some (box (arr.GetValue(x,y)),y+1)
-                             let rowL x = boundedUnfoldL (objL depthLim Precedence.BracketIfTuple) (project2 x) stopShort b2 opts.PrintLength |> makeListL
-                             let project1 x = if x>=(b1+n1) then None else Some (x,x+1)
-                             let rowsL  = boundedUnfoldL rowL project1 stopShort b1 opts.PrintLength
-                             makeArray2L (if b1=0 && b2 = 0 then rowsL else wordL("bound1=" + string_of_int b1)::wordL("bound2=" + string_of_int b2)::rowsL)
-                          | n -> 
-                             makeArrayL [wordL("rank=" + string_of_int n)]
-                        
-                    | :? System.Collections.IEnumerable as ie ->
-                         if opts.ShowIEnumerable then
-                           let it = ie.GetEnumerator() 
-                           try 
-                             let itemLs = boundedUnfoldL (objL depthLim Precedence.BracketIfTuple) (fun () -> if it.MoveNext() then Some(it.Current,()) else None) stopShort () (1+opts.PrintLength/30)
-                             (wordL "seq" --- makeListL itemLs) |> bracketIfL (prec <= Precedence.BracketIfTupleOrNotAtomic)
-                           finally 
-                              match it with 
-                              | :? System.IDisposable as e -> e.Dispose()
-                              | _ -> ()
-                             
-                         else
-                           // Sequence printing is turned off for declared-values, and maybe be disabled to users.
-                           // There is choice here, what to print?  or ... or ?
-                           // Also, in the declared values case, if the sequence is actually a known non-lazy type (list, array etc etc) we could print it.  
-                           wordL "" |> showModeFilter
-                    | _ ->
-                         if showMode = ShowTopLevelBinding && typeUsesSystemObjectToString (obj.GetType()) then
-                           emptyL
-                         else
-                           countNodes 1
-                           let basicL = LayoutOps.objL obj  (* This burries an obj in the layout, rendered at squash time via a leafFormatter.
-                                                             * If the leafFormatter was directly here, then layout leaves could store strings.
-                                                             *)
-                           match obj with 
-                           | _ when opts.ShowProperties ->
-                              let props = ty.GetProperties(BindingFlags.GetField ||| BindingFlags.Instance ||| BindingFlags.Public)
-                              // massively reign in deep printing of properties 
-                              let nDepth = depthLim/10
-                              System.Array.Sort((props:>System.Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> PropertyInfo).Name) ((p2 :?> PropertyInfo).Name) } );
-                              if props.Length = 0 || (nDepth <= 0) then basicL 
-                              else basicL --- 
-                                     (props 
-                                      |> Array.to_list 
-                                      |> List.map (fun p -> (p.Name,(try Some (objL nDepth Precedence.BracketIfTuple (getProperty obj p.Name)) 
-                                                                     with _ -> None)))
-                                      |> makePropertiesL)
-                           | _ -> basicL 
-                | UnitValue -> countNodes 1; measureL
-
-            polyL bindingFlags objWithReprL showMode opts.PrintDepth Precedence.BracketIfTuple x
-
-        // --------------------------------------------------------------------
-        // pprinter: leafFormatter
-        // --------------------------------------------------------------------
-
-#if Suggestion4299
-        // See bug 4299. Suppress FSI_dddd+ from fsi printer.
-        let fixupForInteractiveFSharpClassesWithNoToString obj (text:string) =
-              // Given obj:T.
-              // If T is a nested type inside a parent type called FSI_dddd, then it looks like an F# Interactive type.
-              // Further, if the .ToString() text starts with "FSI_dddd+T" then it looks like it's the default ToString.
-              // A better test: it is default ToString if the MethodInfo.DeclaringType is System.Object.
-              // In this case, replace "FSI_dddd+T" by "T".
-              // assert(obj <> null)
-              let fullName = obj.GetType().FullName // e.g. "FSI_0123+Name"
-              let name     = obj.GetType().Name     // e.g. "Name"
-              let T = obj.GetType()      
-              if text.StartsWith(fullName) then
-                  // text could be a default .ToString() since it starts with the FullName of the type. More checks...
-                  if T.IsNested &&
-                     T.DeclaringType.Name.StartsWith("FSI_") &&                             // Name has "FSI_" which is 
-                     T.DeclaringType.Name.Substring(4) |> Seq.forall System.Char.IsDigit    // followed by digits?
-                  then
-                      name ^ text.Substring(fullName.Length)    // replace fullName by name at start of text
-                  else
-                      text
-              else
-                text
-#endif
-
-        let leafFormatter (opts:FormatOptions) (obj :obj) =
-            match obj with 
-            | null -> "null"
-            | :? double as d -> 
-                let s = d.ToString(opts.FloatingPointFormat,opts.FormatProvider)
-                if System.Double.IsNaN(d) then "nan"
-                elif System.Double.IsNegativeInfinity(d) then "-infinity"
-                elif System.Double.IsPositiveInfinity(d) then "infinity"
-                elif opts.FloatingPointFormat.[0] = 'g'  && String.forall(fun c -> System.Char.IsDigit(c) || c = '-')  s
-                then s + ".0" 
-                else s
-            | :? single as d -> 
-                (if System.Single.IsNaN(d) then "nan"
-                 elif System.Single.IsNegativeInfinity(d) then "-infinity"
-                 elif System.Single.IsPositiveInfinity(d) then "infinity"
-                 elif opts.FloatingPointFormat.Length >= 1 && opts.FloatingPointFormat.[0] = 'g' 
-                  && float32(System.Int32.MinValue) < d && d < float32(System.Int32.MaxValue) 
-                  && float32(int32(d)) = d 
-                 then (System.Convert.ToInt32 d).ToString(opts.FormatProvider) + ".0"
-                 else d.ToString(opts.FloatingPointFormat,opts.FormatProvider)) 
-                + "f"
-            | :? System.Decimal as d -> d.ToString("g",opts.FormatProvider) + "M"
-            | :? uint64 as d -> d.ToString(opts.FormatProvider) + "UL"
-            | :? int64  as d -> d.ToString(opts.FormatProvider) + "L"
-            | :? int32  as d -> d.ToString(opts.FormatProvider)
-            | :? uint32 as d -> d.ToString(opts.FormatProvider) + "u"
-            | :? int16  as d -> d.ToString(opts.FormatProvider) + "s"
-            | :? uint16 as d -> d.ToString(opts.FormatProvider) + "us"
-            | :? sbyte  as d -> d.ToString(opts.FormatProvider) + "y"
-            | :? byte   as d -> d.ToString(opts.FormatProvider) + "uy"
-            | :? nativeint as d -> d.ToString() + "n"
-            | :? unativeint  as d -> d.ToString() + "un"
-            | :? bool   as b -> (if b then "true" else "false")
-            | :? char   as c -> "\'" + formatChar true c + "\'"
-            | _ -> try  let text = obj.ToString()
-//Suggestion4299. Not yet fixed.
-//#if INTERNALIZED_POWER_PACK
-//                      let text = fixupForInteractiveFSharpClassesWithNoToString obj text
-//#endif  
-                        text
-                   with e ->
-                     // If a .ToString() call throws an exception, catch it and use the message as the result.
-                     // This may be informative, e.g. division by zero etc...
-                     "" 
-
-        let any_to_layout opts x = anyL ShowAll BindingFlags.Public opts x
-
-        let squash_layout opts l = 
-            // Print width = 0 implies 1D layout, no squash
-            if opts.PrintWidth = 0 then 
-                l 
-            else 
-                l |> squashTo (opts.PrintWidth,leafFormatter opts)
-
-        let output_layout opts oc l = 
-            l |> squash_layout opts 
-              |> outL opts.AttributeProcessor (leafFormatter opts) oc
-
-        let layout_to_string opts l = 
-            l |> squash_layout opts 
-              |> showL opts (leafFormatter opts) 
-
-        let output_any_ex opts oc x = x |> any_to_layout opts |> output_layout opts oc
-
-        let output_any oc x = output_any_ex FormatOptions.Default oc x
-
-        let layout_as_string opts x = x |> any_to_layout opts |> layout_to_string opts
-
-        let any_to_string x = layout_as_string FormatOptions.Default x
-
-#if RUNTIME
-        let internal printf_any_to_string opts (bindingFlags:BindingFlags) x = 
-            x |> anyL ShowAll bindingFlags opts |> layout_to_string opts
-#endif
-
-#if INTERNALIZED_POWER_PACK
-        /// Called 
-        let fsi_any_to_layout opts x = anyL ShowTopLevelBinding BindingFlags.Public opts x 
-#endif  
diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sformat.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sformat.fsi
deleted file mode 100644
index 01840acc..00000000
--- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sformat.fsi
+++ /dev/null
@@ -1,257 +0,0 @@
-//=========================================================================
-// (c) Microsoft Corporation 2005-2009. 
-//=========================================================================
-
-// This file is compiled 4(!) times in the codebase
-//    - as the internal implementation of printf '%A' formatting 
-//           defines: RUNTIME
-//    - as the internal implementation of structured formatting in the FSharp.Compiler-proto.dll 
-//           defines: INTERNALIZED_POWER_PACK + BUILDING_WITH_LKG
-//    - as the internal implementation of structured formatting in FSharp.Compiler.dll 
-//           defines: INTERNALIZED_POWER_PACK 
-//           NOTE: this implementation is used by fsi.exe. This is very important.
-//    - as the public implementation of structured formatting in the FSharp.PowerPack.dll  
-//           defines:  
-//
-// The one implementation file is used because we very much want to keep the implementations of
-// structured formatting the same for fsi.exe and '%A' printing. However fsi.exe may have
-// a richer feature set.
-//
-// Note no layout objects are ever transferred between the above implementations, and in 
-// all 4 cases the layout types are really different types.
-
-#if INTERNALIZED_POWER_PACK
-// FSharp.Compiler-proto.dll:
-// FSharp.Compiler.dll:
-namespace Internal.Utilities.StructuredFormat
-#else
-#if RUNTIME 
-// FSharp.Core.dll:
-namespace Microsoft.FSharp.Text.StructuredPrintfImpl
-#else
-// Powerpack: 
-namespace Microsoft.FSharp.Text.StructuredFormat
-#endif
-#endif
-
-    open System
-    open System.IO
-    open Microsoft.FSharp.Core
-    open Microsoft.FSharp.Collections
-    open Microsoft.FSharp.Primitives.Basics
-
-    /// Data representing structured layouts of terms.  
-#if INTERNALIZED_POWER_PACK // FSharp.Compiler-proto.dll, FSharp.Compiler.dll: the F# compiler likes to see these representations
-
-    /// Data representing joints in structured layouts of terms.  The representation
-    /// of this data type is only for the consumption of formatting engines.
-    type Joint =
-        | Unbreakable
-        | Breakable of int
-        | Broken of int
-
-    /// Data representing structured layouts of terms.  The representation
-    /// of this data type is only for the consumption of formatting engines.
-    []
-    type Layout =
-     | Leaf of bool * obj * bool
-     | Node of bool * Layout * bool * Layout * bool * Joint
-     | Attr of string * (string * string) list * Layout
-#else
-#if RUNTIME  // FSharp.Core.dll makes things internal and hides representations
-    type internal Layout
-#else       // FSharp.PowerPack.dll makes things public but hides representations
-    type Layout
-#endif
-#endif
-
-
-#if RUNTIME   // FSharp.Core.dll doesn't use PrintIntercepts
-#else  // FSharp.Compiler.dll, FSharp.Compiler-proto.dll, FSharp.PowerPack.dll
-    type IEnvironment = 
-        /// Return to the layout-generation 
-        /// environment to layout any otherwise uninterpreted object
-        abstract GetLayout : obj -> Layout
-        /// The maximum number of elements for which to generate layout for 
-        /// list-like structures, or columns in table-like 
-        /// structures.  -1 if no maximum.
-        abstract MaxColumns : int
-        /// The maximum number of rows for which to generate layout for table-like 
-        /// structures.  -1 if no maximum.
-        abstract MaxRows : int
-#endif
-      
-    /// A layout is a sequence of strings which have been joined together.
-    /// The strings are classified as words, separators and left and right parenthesis.
-    /// This classification determines where spaces are inserted.
-    /// A joint is either unbreakable, breakable or broken.
-    /// If a joint is broken the RHS layout occurs on the next line with optional indentation.
-    /// A layout can be squashed to for given width which forces breaks as required.
-    module
-#if RUNTIME   // FSharp.Core.dll
-      internal 
-#endif
-         LayoutOps =
-
-        /// The empty layout
-        val emptyL     : Layout
-        /// Is it the empty layout?
-        val isEmptyL   : layout:Layout -> bool
-        
-        /// An uninterpreted leaf, to be interpreted into a string
-        /// by the layout engine. This allows leaf layouts for numbers, strings and
-        /// other atoms to be customized according to culture.
-        val objL       : value:obj -> Layout
-
-        /// An string leaf 
-        val wordL      : text:string -> Layout
-        /// An string which requires no spaces either side.
-        val sepL       : text:string -> Layout
-        /// An string which is right parenthesis (no space on it's left).
-        val rightL     : text:string -> Layout
-        /// An string which is left  parenthesis (no space on the right).
-        val leftL      : text:string -> Layout
-
-        /// Join, unbreakable. 
-        val ( $$ )     : layout1:Layout -> layout2:Layout -> Layout   
-        /// Join, possible break with indent=0
-        val ( ++ )     : layout1:Layout -> layout2:Layout -> Layout   
-        /// Join, possible break with indent=1
-        val ( -- )     : layout1:Layout -> layout2:Layout -> Layout   
-        /// Join, possible break with indent=2 
-        val ( --- )    : layout1:Layout -> layout2:Layout -> Layout   
-        /// Join broken with ident=0
-        val ( @@ )     : layout1:Layout -> layout2:Layout -> Layout   
-        /// Join broken with ident=1 
-        val ( @@- )    : layout1:Layout -> layout2:Layout -> Layout   
-        /// Join broken with ident=2 
-        val ( @@-- )   : layout1:Layout -> layout2:Layout -> Layout   
-
-        /// Join layouts into a comma separated list.
-        val commaListL : layouts:Layout list -> Layout
-          
-        /// Join layouts into a space separated list.    
-        val spaceListL : layouts:Layout list -> Layout
-          
-        /// Join layouts into a semi-colon separated list.
-        val semiListL  : layouts:Layout list -> Layout
-
-        /// Join layouts into a list separated using the given Layout.
-        val sepListL   : layout1:Layout -> layouts:Layout list -> Layout
-
-        /// Wrap round brackets around Layout.
-        val bracketL   : Layout:Layout -> Layout
-        /// Wrap square brackets around layout.    
-        val squareBracketL   : layout:Layout -> Layout
-        /// Wrap braces around layout.        
-        val braceL     : layout:Layout -> Layout
-        /// Form tuple of layouts.            
-        val tupleL     : layouts:Layout list -> Layout
-        /// Layout two vertically.
-        val aboveL     : layout1:Layout -> layout2:Layout -> Layout
-        /// Layout list vertically.    
-        val aboveListL : layouts:Layout list -> Layout
-
-        /// Layout like an F# option.
-        val optionL    : selector:('T -> Layout) -> value:'T option -> Layout
-        /// Layout like an F# list.    
-        val listL      : selector:('T -> Layout) -> value:'T list   -> Layout
-
-        /// See tagL
-        val tagAttrL : text:string -> maps:(string * string) list -> layout:Layout -> Layout
-
-        /// For limitting layout of list-like sequences (lists,arrays,etc).
-        /// unfold a list of items using (project and z) making layout list via itemL.
-        /// If reach maxLength (before exhausting) then truncate.
-        val unfoldL : selector:('T -> Layout) -> folder:('State -> ('T * 'State) option) -> state:'State -> count:int -> Layout list
-
-    /// A record of options to control structural formatting.
-    /// For F# Interactive properties matching those of this value can be accessed via the 'fsi'
-    /// value.
-    /// 
-    /// Floating Point format given in the same format accepted by System.Double.ToString,
-    /// e.g. f6 or g15.
-    ///
-    /// If ShowProperties is set the printing process will evaluate properties of the values being
-    /// displayed.  This may cause additional computation.  
-    ///
-    /// The ShowIEnumerable is set the printing process will force the evalution of IEnumerable objects
-    /// to a small, finite depth, as determined by the printing parameters.
-    /// This may lead to additional computation being performed during printing.
-    ///
-    /// 
-    /// From F# Interactive the default settings can be adjusted using, for example, 
-    /// 
-    ///   open Microsoft.FSharp.Compiler.Interactive.Settings;;
-    ///   setPrintWidth 120;;
-    /// 
- ///
- [] - type -#if RUNTIME // FSharp.Core.dll - internal -#endif - FormatOptions = - { FloatingPointFormat: string - AttributeProcessor: (string -> (string * string) list -> bool -> unit); -#if RUNTIME // FSharp.Core.dll: PrintIntercepts aren't used there -#else -#if INTERNALIZED_POWER_PACK // FSharp.Compiler.dll: This is the PrintIntercepts extensibility point currently revealed by fsi.exe's AddPrinter - PrintIntercepts: (IEnvironment -> obj -> Layout option) list; - StringLimit: int; -#endif -#endif - FormatProvider: System.IFormatProvider - BindingFlags: System.Reflection.BindingFlags - PrintWidth : int - PrintDepth : int - PrintLength : int - PrintSize : int - ShowProperties : bool - ShowIEnumerable: bool } - static member Default : FormatOptions - - module -#if RUNTIME // FSharp.Core.dll - internal -#endif - Display = - - - /// Convert any value to a string using a standard formatter - /// Data is typically formatted in a structured format, e.g. - /// lists are formatted using the "[1;2]" notation. - /// The details of the format are not specified and may change - /// from version to version and according to the flags given - /// to the F# compiler. The format is intended to be human-readable, - /// not machine readable. If alternative generic formats are required - /// you should develop your own formatter, using the code in the - /// implementation of this file as a starting point. - /// - /// Data from other .NET languages is formatted using a virtual - /// call to Object.ToString() on the boxed version of the input. - val any_to_string: value:'T -> string - - /// Ouput any value to a channel using the same set of formatting rules - /// as any_to_string - val output_any: writer:TextWriter -> value:'T -> unit - -#if RUNTIME // FSharp.Core.dll: Most functions aren't needed in FSharp.Core.dll, but we add one entry for printf - val printf_any_to_string: options:FormatOptions -> bindingFlags:System.Reflection.BindingFlags -> value:'T -> string -#else - val any_to_layout : options:FormatOptions -> value:'T -> Layout - val squash_layout : options:FormatOptions -> layout:Layout -> Layout - val output_layout : options:FormatOptions -> writer:TextWriter -> layout:Layout -> unit - val layout_as_string: options:FormatOptions -> value:'T -> string -#endif - - /// Convert any value to a layout using the given formatting options. The - /// layout can then be processed using formatting display engines such as - /// those in the LayoutOps module. any_to_string and output_any are - /// built using any_to_layout with default format options. - val layout_to_string: options:FormatOptions -> layout:Layout -> string - - -#if INTERNALIZED_POWER_PACK - val fsi_any_to_layout : options:FormatOptions -> value:'T -> Layout -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sys.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sys.fs deleted file mode 100644 index 507d98e8..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sys.fs +++ /dev/null @@ -1,69 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. -#if INTERNALIZED_POWER_PACK -module (* internal *) Internal.Utilities.Sys -#else -module Microsoft.FSharp.Compatibility.OCaml.Sys -#endif - -#nowarn "52" // defensive value copy warning, only with warning level 4 - -open System -open System.Reflection -open Microsoft.FSharp.Control - -#if FX_NO_COMMAND_LINE_ARGS -#else -let argv = System.Environment.GetCommandLineArgs() -#endif -let file_exists (s:string) = System.IO.File.Exists(s) -let remove (s:string) = System.IO.File.Delete(s) -let rename (s:string) (s2:string) = System.IO.File.Move(s,s2) - -#if FX_NO_ENVIRONMENT -#else -let getenv (s:string) = - match System.Environment.GetEnvironmentVariable(s) with - | null -> raise (System.Collections.Generic.KeyNotFoundException("the given environment variable was not found")) - | s -> s -#endif - -#if FX_NO_PROCESS_START -#else -let command (s:string) = - let psi = new System.Diagnostics.ProcessStartInfo("cmd","/c "^s) - psi.UseShellExecute <- false; - let p = System.Diagnostics.Process.Start(psi) - p.WaitForExit(); - p.ExitCode -#endif - -let chdir (s:string) = System.IO.Directory.SetCurrentDirectory(s) -let getcwd () = System.IO.Directory.GetCurrentDirectory() - -let word_size = sizeof * 8 - -#if FX_NO_PROCESS_DIAGNOSTICS -#else -// Sys.time only returns the process time from the main thread -// The documentation doesn't guarantee that thread 0 is the main thread, -// but it always appears to be. -let mainThread = - lazy - (let thisProcess = System.Diagnostics.Process.GetCurrentProcess() - let threads = thisProcess.Threads - threads.[0]) - - -let time() = - try mainThread.Force().TotalProcessorTime.TotalSeconds - with _ -> - // If the above failed, e.g. because main thread has exited, then do the following - System.Diagnostics.Process.GetCurrentProcess().UserProcessorTime.TotalSeconds -#endif - -#if FX_NO_APP_DOMAINS -#else -let executable_name = - System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, - System.AppDomain.CurrentDomain.FriendlyName) -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sys.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sys.fsi deleted file mode 100644 index ceff4dc2..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/sys.fsi +++ /dev/null @@ -1,88 +0,0 @@ -//========================================================================== -// (c) Microsoft Corporation 2005-2008. The interface to the module -// is similar to that found in versions of other ML implementations, -// but is not an exact match. The type signatures in this interface -// are an edited version of those generated automatically by running -// "bin\fsc.exe -i" on the implementation file. -//=========================================================================== - -/// Sys: Basic system operations (for ML compatibility) -/// -/// This module is only included to make it possible to cross-compile -/// code with other ML compilers. It may be deprecated and/or removed in -/// a future release. You may wish to use .NET functions directly instead. -#if INTERNALIZED_POWER_PACK -module internal Internal.Utilities.Sys -#else -[] -module Microsoft.FSharp.Compatibility.OCaml.Sys -#endif - -#if FX_NO_COMMAND_LINE_ARGS -#else -/// The array of command line options. Gives the command line arguments -/// as returned by System.Environment.GetCommandLineArgs. -[] -val argv: string array -#endif - -/// Returns true if a file currently exists, using System.IO.File.Exists(s). -[] -val file_exists: string -> bool - -#if FX_NO_ENVIRONMENT -#else -/// Call System.Environment.GetEnvironmentVariable. Raise KeyNotFoundException if the variable is not defined. -[] -val getenv: string -> string -#endif - -/// Deletes a file using System.IO.File.Delete. -[] -val remove: string -> unit - -/// Rename a file on disk using System.IO.File.Move -[] -val rename: string -> string -> unit - -/// Sets the current working directory for the process using System.IO.Directory.SetCurrentDirectory -[] -val chdir: string -> unit - -/// Returns the current working directory for the process using System.IO.Directory.GetCurrentDirectory -[] -val getcwd: unit -> string - -#if FX_NO_PROCESS_START -#else -/// Run the command and return it's exit code. -/// -/// Warning: 'command' currently attempts to execute the string using -/// the 'cmd.exe' shell processor. If it is not present on the system -/// then the operation will fail. Use System.Diagnostics.Process -/// directly to run commands in a portable way, which involves specifying -/// the program to run and the arguments independently. -[] -val command: string -> int -#endif - -#if FX_NO_APP_DOMAINS -#else -/// Path of the current executable, using -/// System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,System.AppDomain.CurrentDomain.FriendlyName) -[] -val executable_name: string -#endif - -/// The number of bits in the "int" type. -[ directly, where this returns a size in bytes")>] -val word_size: int - -#if FX_NO_PROCESS_DIAGNOSTICS -#else -/// Time consumed by the main thread. (for approximate timings). -/// Generally returns only the processor time used by the main -/// thread of the application. -[] -val time: unit -> float -#endif diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint16.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint16.fs deleted file mode 100644 index 092d889b..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint16.fs +++ /dev/null @@ -1,47 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - -namespace Microsoft.FSharp.Compatibility - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - -[] -[] -module UInt16 = - - let compare (x:uint16) y = compare x y - - let zero = 0us - let one = 1us - let add (x:uint16) (y:uint16) = x + y - let sub (x:uint16) (y:uint16) = x - y - let mul (x:uint16) (y:uint16) = x * y - let div (x:uint16) (y:uint16) = x / y - let rem (x:uint16) (y:uint16) = x % y - let succ (x:uint16) = x + 1us - let pred (x:uint16) = x - 1us - let max_int = 0xFFFFus - let min_int = 0us - let logand (x:uint16) (y:uint16) = x &&& y - let logor (x:uint16) (y:uint16) = x ||| y - let logxor (x:uint16) (y:uint16) = x ^^^ y - let lognot (x:uint16) = ~~~ x - let shift_left (x:uint16) (n:int) = x <<< n - let shift_right (x:uint16) (n:int) = x >>> n - - let of_int (n:int) = uint16 n - let to_int (x:uint16) = int x - - let of_int16 (n:int16) = uint16 n - let to_int16 (x:uint16) = int16 x - - let of_int32 (n:int32) = uint16 n - let to_int32 (x:uint16) = int32 x - - let of_uint32 (n:uint32) = uint16 n - let to_uint32 (x:uint16) = uint32 x - - let of_uint8 (n:uint8) = uint16 n - let to_uint8 (x:uint16) = byte x diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint32.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint32.fs deleted file mode 100644 index ece271ba..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint32.fs +++ /dev/null @@ -1,64 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - -namespace Microsoft.FSharp.Compatibility - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - -[] -module UInt32 = - - let compare (x:uint32) y = compare x y - - let zero = 0ul - let one = 1ul - let add (x:uint32) (y:uint32) = x + y - let sub (x:uint32) (y:uint32) = x - y - let mul (x:uint32) (y:uint32) = x * y - let div (x:uint32) (y:uint32) = x / y - let rem (x:uint32) (y:uint32) = x % y - let succ (x:uint32) = x + 1ul - let pred (x:uint32) = x - 1ul - let max_int = 0xFFFFFFFFul - let min_int = 0ul - let logand (x:uint32) (y:uint32) = x &&& y - let logor (x:uint32) (y:uint32) = x ||| y - let logxor (x:uint32) (y:uint32) = x ^^^ y - let lognot (x:uint32) = ~~~x - let shift_left (x:uint32) (n:int) = x <<< n - let shift_right (x:uint32) (n:int) = x >>> n - let of_int (x:int) = uint32 x - let to_int (x:uint32) = int x - let of_int32 (x:int32) = uint32 x - let to_int32 (x:uint32) = int32 x - - let of_float (x:float) = uint32 x - let to_float (x:uint32) = float x - - let of_string (s:string) = try uint32 s with _ -> failwith "UInt32.of_string" - let to_string (x:uint32) = (box x).ToString() - - let bits_of_float32 (x:float32) = - System.BitConverter.ToUInt32(System.BitConverter.GetBytes(x),0) - - let float32_of_bits (x:uint32) = - System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0) - - let float32_to_float (x:float32) = float x - let float_to_float32 (x:float) = float32 x - - let float_of_bits x = float32_to_float (float32_of_bits x) - let bits_of_float x = bits_of_float32 (float_to_float32 x) - - let of_unativeint (x:unativeint) = uint32 x - let to_unativeint (x:uint32) = unativeint x - - let of_uint64 (x:uint64) = uint32 x - let to_uint64 (x:uint32) = uint64 x - - - - let of_float32 (x:float32) = uint32 x - let to_float32 (x:uint32) = float32 x diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint32.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint32.fsi deleted file mode 100644 index b3cdbe24..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint32.fsi +++ /dev/null @@ -1,64 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - -namespace Microsoft.FSharp.Compatibility - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections - -/// UInt32: ML-like operations on 32-bit System.UInt32 numbers. -[] -[] -module UInt32 = - - val zero: uint32 - val one: uint32 - val pred: uint32 -> uint32 - val max_int: uint32 - val min_int: uint32 - val succ: uint32 -> uint32 - - val add: uint32 -> uint32 -> uint32 - val div: uint32 -> uint32 -> uint32 - val mul: uint32 -> uint32 -> uint32 - val rem: uint32 -> uint32 -> uint32 - val sub: uint32 -> uint32 -> uint32 - - val compare: uint32 -> uint32 -> int - - val logand: uint32 -> uint32 -> uint32 - val lognot: uint32 -> uint32 - val logor: uint32 -> uint32 -> uint32 - val logxor: uint32 -> uint32 -> uint32 - val shift_left: uint32 -> int -> uint32 - val shift_right: uint32 -> int -> uint32 - - val of_float: float -> uint32 - val to_float: uint32 -> float - - val of_float32: float32 -> uint32 - val to_float32: uint32 -> float32 - - (* Conversions to int are included because int is the most convenient *) - (* integer type to use from F#. Otherwise conversions are either to *) - (* integers of the same size or same sign *) - val of_int: int -> uint32 - val to_int: uint32 -> int - - val of_int32: int32 -> uint32 - val to_int32: uint32 -> int32 - - val of_uint64: uint64 -> uint32 - val to_uint64: uint32 -> uint64 - - val of_unativeint: unativeint -> uint32 - val to_unativeint: uint32 -> unativeint - - val of_string: string -> uint32 - val to_string: uint32 -> string - - val float_of_bits: uint32 -> float - val bits_of_float: float -> uint32 - - val float32_of_bits: uint32 -> float32 - val bits_of_float32: float32 -> uint32 - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint64.fs b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint64.fs deleted file mode 100644 index 8c47adfd..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint64.fs +++ /dev/null @@ -1,49 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - -namespace Microsoft.FSharp.Compatibility - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Core.Operators -open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - -[] -module UInt64 = - - let compare (x:uint64) y = compare x y - - let zero = 0UL - let one = 1UL - let add (x:uint64) (y:uint64) = x + y - let sub (x:uint64) (y:uint64) = x - y - let mul (x:uint64) (y:uint64) = x * y - let div (x:uint64) (y:uint64) = x / y - let rem (x:uint64) (y:uint64) = x % y - let succ (x:uint64) = x + 1UL - let pred (x:uint64) = x - 1UL - let max_int = 0xFFFFFFFFFFFFFFFFUL - let min_int = 0x0UL - let logand (x:uint64) (y:uint64) = x &&& y - let logor (x:uint64) (y:uint64) = x ||| y - let logxor (x:uint64) (y:uint64) = x ^^^ y - let lognot (x:uint64) = ~~~x - let shift_left (x:uint64) (n:int) = x <<< n - let shift_right (x:uint64) (n:int) = x >>> n - let of_int (n:int) = uint64 n - let to_int (x:uint64) = int x - let of_uint32 (n:uint32) = uint64 n - let to_uint32 (x:uint64) = uint32 x - let of_int64 (n:int64) = uint64 n - let to_int64 (x:uint64) = int64 x - let of_unativeint (n:unativeint) = uint64 n - let to_unativeint (x:uint64) = unativeint x - let of_float (f:float) = uint64 f - let to_float (x:uint64) = float x - - let of_string (s:string) = try uint64 s with _ -> failwith "UInt64.of_string" - let to_string (x:uint64) = (box x).ToString() - let bits_of_float (x:float) = System.BitConverter.ToUInt64(System.BitConverter.GetBytes(x),0) - let float_of_bits (x:uint64) = System.BitConverter.ToDouble(System.BitConverter.GetBytes(x),0) - - let of_float32 (f:float32) = uint64 f - let to_float32 (x:uint64) = float32 x diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint64.fsi b/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint64.fsi deleted file mode 100644 index 415c9ddf..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FSharp.PowerPack/uint64.fsi +++ /dev/null @@ -1,58 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - -namespace Microsoft.FSharp.Compatibility - -open Microsoft.FSharp.Core -open Microsoft.FSharp.Collections - -/// UInt64: basic operations on 64-bit System.UInt64 numbers. -[] -[] -module UInt64 = - - val zero: uint64 - val one: uint64 - val pred: uint64 -> uint64 - val succ: uint64 -> uint64 - val max_int: uint64 - val min_int: uint64 - - val add: uint64 -> uint64 -> uint64 - val div: uint64 -> uint64 -> uint64 - val mul: uint64 -> uint64 -> uint64 - val rem: uint64 -> uint64 -> uint64 - val sub: uint64 -> uint64 -> uint64 - - val compare: uint64 -> uint64 -> int - - val logand: uint64 -> uint64 -> uint64 - val lognot: uint64 -> uint64 - val logor: uint64 -> uint64 -> uint64 - val logxor: uint64 -> uint64 -> uint64 - val shift_left: uint64 -> int -> uint64 - val shift_right: uint64 -> int -> uint64 - - val of_float: float -> uint64 - val to_float: uint64 -> float - - val of_float32: float32 -> uint64 - val to_float32: uint64 -> float32 - - val of_int: int -> uint64 - val to_int: uint64 -> int - - val of_uint32: uint32 -> uint64 - val to_uint32: uint64 -> uint32 - - val of_int64: int64 -> uint64 - val to_int64: uint64 -> int64 - - val of_unativeint: unativeint -> uint64 - val to_unativeint: uint64 -> unativeint - - val of_string: string -> uint64 - val to_string: uint64 -> string - - val float_of_bits: uint64 -> float - val bits_of_float: float -> uint64 - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsLex-proto/FsLex-proto.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/FsLex-proto/FsLex-proto.fsproj deleted file mode 100644 index 80541d70..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsLex-proto/FsLex-proto.fsproj +++ /dev/null @@ -1,77 +0,0 @@ - - - - ..\.. - Proto - - - - - - x86 - {AC2284A5-AA4D-442D-B4FB-E43B2FE9DD2A} - Exe - FsLex-proto - INTERNALIZED_POWER_PACK;BUILDING_PROTO;BUILDING_WITH_LKG;COMPILER;$(DefineConstants) - LKG - true - v2.0 - x86 - - - - --lexlib Internal.Utilities.Text.Lexing - - - --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - - - prim-lexing.fsi - - - prim-lexing.fs - - - prim-parsing.fsi - - - prim-parsing.fs - - - lexing.fsi - - - lexing.fs - - - arg.fsi - - - arg.fs - - - HashSet.fsi - - - HashSet.fs - - - fslexast.fs - - - - - fslex.fs - - - fslex-proto.exe.config - - - - - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/FsLex.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/FsLex/FsLex.fsproj deleted file mode 100644 index 10e3199c..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/FsLex.fsproj +++ /dev/null @@ -1,72 +0,0 @@ - - - ..\.. - - - - Debug - - x86 - {BD2284A5-AA4D-442D-B4FB-E43B2FE9DD2A} - Exe - FsLex - INTERNALIZED_POWER_PACK;$(DefineConstants) - true - v2.0 - x86 - - - - --lexlib Internal.Utilities.Text.Lexing - - - --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - - - - prim-lexing.fsi - - - prim-lexing.fs - - - prim-parsing.fsi - - - prim-parsing.fs - - - lexing.fsi - - - lexing.fs - - - arg.fsi - - - arg.fs - - - HashSet.fsi - - - HashSet.fs - - - - - - - - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/assemblyinfo.fslex.exe.fs b/tools/FSharp_1.9.6.16/source/fsppack/FsLex/assemblyinfo.fslex.exe.fs deleted file mode 100644 index 0b0d74bc..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/assemblyinfo.fslex.exe.fs +++ /dev/null @@ -1,9 +0,0 @@ - -namespace Microsoft.FSharp -open System.Reflection -[] -[] -[] -[] -[] -do() diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslex.fs b/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslex.fs deleted file mode 100644 index e1f7815d..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslex.fs +++ /dev/null @@ -1,216 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. - -#light - -open Fslexast -open Fslexpars -open Microsoft.FSharp.Text.Printf -open Internal.Utilities -open Internal.Utilities.Text.Lexing -open System -open System.Collections.Generic -open System.IO - -//------------------------------------------------------------------ -// This code is duplicated from Microsoft.FSharp.Compiler.UnicodeLexing - -type Lexbuf = LexBuffer - -/// Standard utility to create a Unicode LexBuffer -/// -/// One small annoyance is that LexBuffers and not IDisposable. This means -/// we can't just return the LexBuffer object, since the file it wraps wouldn't -/// get closed when we're finished with the LexBuffer. Hence we return the stream, -/// the reader and the LexBuffer. The caller should dispose the first two when done. -let UnicodeFileAsLexbuf (filename,codePage : int option) : FileStream * StreamReader * Lexbuf = - // Use the .NET functionality to auto-detect the unicode encoding - // It also uses Lexing.from_text_reader to present the bytes read to the lexer in UTF8 decoded form - let stream = new FileStream(filename,FileMode.Open,FileAccess.Read,FileShare.Read) - let reader = - match codePage with - | None -> new StreamReader(stream,true) - | Some n -> new StreamReader(stream,System.Text.Encoding.GetEncoding(n)) - let lexbuf = LexBuffer.FromFunction(reader.Read) - lexbuf.EndPos <- Position.FirstLine(filename); - stream, reader, lexbuf - -//------------------------------------------------------------------ -// This is the program proper - -let input = ref None -let out = ref None -let inputCodePage = ref None -let light = ref None - -let mutable lexlib = "Microsoft.FSharp.Text.Lexing" - -let usage = - [ "-o", Arg.String (fun s -> out := Some s), "Name the output file."; - "--codepage", Arg.Int (fun i -> inputCodePage := Some i), "Assume input lexer specification file is encoded with the given codepage."; - "--light", Arg.Unit (fun () -> light := Some true), "Add #light to the top of the generated file (the default for .fs output files)"; - "--light-off", Arg.Unit (fun () -> light := Some false), "Add #light \"off\" to the top of the generated file"; - "--lexlib", Arg.String (fun s -> lexlib <- s), "Specify the namespace for the implementation of the lexer table interperter (default Microsoft.FSharp.Text.Lexing)"; - "--unicode", Arg.Set unicode, "Produce a lexer for use with 16-bit unicode characters."; - ] - -let _ = Arg.parse usage (fun x -> match !input with Some _ -> failwith "more than one input given" | None -> input := Some x) "fslex " - -let output_int (os: #TextWriter) (n:int) = os.Write(string n) - -let outputCodedUInt16 (os: #TextWriter) (n:int) = - os.Write n; - os.Write "us; "; - -let sentinel = 255 * 256 + 255 - -let lineCount = ref 0 -let cfprintfn (os: #TextWriter) fmt = Printf.ktwprintf (fun () -> incr lineCount; os.WriteLine()) os fmt - -let main() = - try - let filename = (match !input with Some x -> x | None -> failwith "no input given") - let domain = if !unicode then "Unicode" else "Ascii" - let spec = - let stream,reader,lexbuf = UnicodeFileAsLexbuf(filename, !inputCodePage) - use stream = stream - use reader = reader - try - Fslexpars.spec Fslexlex.token lexbuf - with e -> - printf "%s(%d,%d): error: %s" filename lexbuf.StartPos.Line lexbuf.StartPos.Column - (match e with - | Failure s -> s - | _ -> e.Message); - exit 1 - printfn "compiling to dfas (can take a while...)"; - let perRuleData, dfaNodes = Fslexast.Compile spec - let dfaNodes = dfaNodes |> List.sortBy (fun n -> n.Id) - - printfn "%d states" dfaNodes.Length; - printfn "writing output"; - - let output = - match !out with - | Some x -> x - | _ -> - Path.Combine (Path.GetDirectoryName filename,Path.GetFileNameWithoutExtension(filename)) + ".fs" - use os = System.IO.File.CreateText output - - if (!light = Some(false)) || (!light = None && (Path.HasExtension(output) && Path.GetExtension(output) = ".ml")) then - cfprintfn os "#light \"off\""; - else - cfprintfn os "#light"; - - let (code,pos) = spec.TopCode - cfprintfn os "# %d \"%s\"" pos.Line pos.FileName; - cfprintfn os "%s" code; - lineCount := !lineCount + code.Replace("\r","").Split([| '\n' |]).Length; - cfprintfn os "# %d \"%s\"" !lineCount output; - - cfprintfn os "let trans : uint16[] array = "; - cfprintfn os " [| "; - if !unicode then - let specificUnicodeChars = GetSpecificUnicodeChars() - // This emits a (numLowUnicodeChars+NumUnicodeCategories+(2*#specificUnicodeChars)+1) * #states array of encoded UInt16 values - - // Each row for the Unicode table has format - // 128 entries for ASCII characters - // A variable number of 2*UInt16 entries for SpecificUnicodeChars - // 30 entries, one for each UnicodeCategory - // 1 entry for EOF - // - // Each entry is an encoded UInt16 value indicating the next state to transition to for this input. - // - // For the SpecificUnicodeChars the entries are char/next-state pairs. - for state in dfaNodes do - cfprintfn os " (* State %d *)" state.Id; - twprintf os " [| "; - let trans = - let dict = new Dictionary<_,_>() - state.Transitions |> List.iter dict.Add - dict - let emit n = - if trans.ContainsKey(n) then - outputCodedUInt16 os trans.[n].Id - else - outputCodedUInt16 os sentinel - for i = 0 to numLowUnicodeChars-1 do - let c = char i - emit (EncodeChar c); - for c in specificUnicodeChars do - outputCodedUInt16 os (int c); - emit (EncodeChar c); - for i = 0 to NumUnicodeCategories-1 do - emit (EncodeUnicodeCategoryIndex i); - emit Eof; - cfprintfn os "|];" - done; - - else - // Each row for the ASCII table has format - // 256 entries for ASCII characters - // 1 entry for EOF - // - // Each entry is an encoded UInt16 value indicating the next state to transition to for this input. - - // This emits a (256+1) * #states array of encoded UInt16 values - for state in dfaNodes do - cfprintfn os " (* State %d *)" state.Id; - twprintf os " [|"; - let trans = - let dict = new Dictionary<_,_>() - state.Transitions |> List.iter dict.Add - dict - let emit n = - if trans.ContainsKey(n) then - outputCodedUInt16 os trans.[n].Id - else - outputCodedUInt16 os sentinel - for i = 0 to 255 do - let c = char i - emit (EncodeChar c); - emit Eof; - cfprintfn os "|];" - done; - - cfprintfn os " |] "; - - twprintf os "let actions : uint16[] = [|"; - for state in dfaNodes do - if state.Accepted.Length > 0 then - outputCodedUInt16 os (snd state.Accepted.Head) - else - outputCodedUInt16 os sentinel - done; - cfprintfn os "|]"; - cfprintfn os "let _fslex_tables = %s.%sTables.Create(trans,actions)" lexlib domain; - - cfprintfn os "let rec _fslex_dummy () = _fslex_dummy() "; - List.zip perRuleData spec.Rules - |> List.iter (fun ((startNode, actions),(ident,args,_)) -> - cfprintfn os "(* Rule %s *)" ident; - cfprintfn os "and %s %s (lexbuf : %s.LexBuffer<_>) = _fslex_%s %s %d lexbuf" ident (String.Join(" ",Array.of_list args)) lexlib ident (String.Join(" ",Array.of_list args)) startNode.Id; - cfprintfn os "and _fslex_%s %s _fslex_state lexbuf =" ident (String.Join(" ",Array.of_list args)); - cfprintfn os " match _fslex_tables.Interpret(_fslex_state,lexbuf) with" ; - actions |> Seq.iteri (fun i (code,pos) -> - cfprintfn os " | %d -> ( " i; - cfprintfn os "# %d \"%s\"" pos.Line pos.FileName; - let lines = code.Split([| '\r'; '\n' |], StringSplitOptions.RemoveEmptyEntries) - for line in lines do - cfprintfn os " %s" line; - cfprintfn os "# %d \"%s\"" !lineCount output; - cfprintfn os " )") - cfprintfn os " | _ -> failwith \"%s\"" ident) - - let (code,pos) = spec.BottomCode - cfprintfn os ""; - cfprintfn os "# %d \"%s\"" pos.Line pos.FileName; - cfprintfn os "%s" code; - cfprintfn os "# 3000000 \"%s\"" output; - - with e -> - printf "Error: %s" (match e with Failure s -> s | e -> e.ToString()); - exit 1 - - -let _ = main() diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexast.fs b/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexast.fs deleted file mode 100644 index 18db1410..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexast.fs +++ /dev/null @@ -1,401 +0,0 @@ -(* (c) Microsoft Corporation 2005-2008. *) - -#light -#nowarn "35" // This construct is deprecated: This form of object expression is deprecated. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. -#nowarn "62" // This construct is for compatibility with OCaml. - -open System.Collections.Generic -open Microsoft.FSharp.Text -open Microsoft.FSharp.Collections -open Internal.Utilities -open Internal.Utilities.Text.Lexing - -let (|KeyValue|) (kvp:KeyValuePair<_,_>) = kvp.Key,kvp.Value - -type Ident = string -type Code = string * Position - -type Alphabet = uint32 - -let Eof : Alphabet = 0xFFFFFFFEu -let Epsilon : Alphabet = 0xFFFFFFFFu - - -let unicode = ref false - -let unicodeCategories = - dict - [| "Pe", System.Globalization.UnicodeCategory.ClosePunctuation; // (Pe) - "Pc", System.Globalization.UnicodeCategory.ConnectorPunctuation; // (Pc) - "Cc", System.Globalization.UnicodeCategory.Control; // (Cc) - "Sc", System.Globalization.UnicodeCategory.CurrencySymbol; // (Sc) - "Pd", System.Globalization.UnicodeCategory.DashPunctuation; // (Pd) - "Nd", System.Globalization.UnicodeCategory.DecimalDigitNumber; // (Nd) - "Me", System.Globalization.UnicodeCategory.EnclosingMark; // (Me) - "Pf", System.Globalization.UnicodeCategory.FinalQuotePunctuation; // (Pf) - "Cf", enum 15; //System.Globalization.UnicodeCategory.Format; // (Cf) - "Pi", System.Globalization.UnicodeCategory.InitialQuotePunctuation; // (Pi) - "Nl", System.Globalization.UnicodeCategory.LetterNumber; // (Nl) - "Zl", System.Globalization.UnicodeCategory.LineSeparator; // (Zl) - "Ll", System.Globalization.UnicodeCategory.LowercaseLetter; // (Ll) - "Sm", System.Globalization.UnicodeCategory.MathSymbol; // (Sm) - "Lm", System.Globalization.UnicodeCategory.ModifierLetter; // (Lm) - "Sk", System.Globalization.UnicodeCategory.ModifierSymbol; // (Sk) - "Mn", System.Globalization.UnicodeCategory.NonSpacingMark; // (Mn) - "Ps", System.Globalization.UnicodeCategory.OpenPunctuation; // (Ps) - "Lo", System.Globalization.UnicodeCategory.OtherLetter; // (Lo) - "Cn", System.Globalization.UnicodeCategory.OtherNotAssigned; // (Cn) - "No", System.Globalization.UnicodeCategory.OtherNumber; // (No) - "Po", System.Globalization.UnicodeCategory.OtherPunctuation; // (Po) - "So", System.Globalization.UnicodeCategory.OtherSymbol; // (So) - "Zp", System.Globalization.UnicodeCategory.ParagraphSeparator; // (Zp) - "Co", System.Globalization.UnicodeCategory.PrivateUse; // (Co) - "Zs", System.Globalization.UnicodeCategory.SpaceSeparator; // (Zs) - "Mc", System.Globalization.UnicodeCategory.SpacingCombiningMark; // (Mc) - "Cs", System.Globalization.UnicodeCategory.Surrogate; // (Cs) - "Lt", System.Globalization.UnicodeCategory.TitlecaseLetter; // (Lt) - "Lu", System.Globalization.UnicodeCategory.UppercaseLetter; // (Lu) - |] - -let NumUnicodeCategories = unicodeCategories.Count -let _ = assert (NumUnicodeCategories = 30) // see table interpreter -let encodedUnicodeCategoryBase = 0xFFFFFF00u -let EncodeUnicodeCategoryIndex(idx:int) = encodedUnicodeCategoryBase + uint32 idx -let EncodeUnicodeCategory(s:string) = - if not (!unicode) then - failwith "unicode category classes may only be used if --unicode is specified"; - if unicodeCategories.ContainsKey(s) then - EncodeUnicodeCategoryIndex (int32 unicodeCategories.[s]) - else - failwithf "invalid Unicode category: '%s'" s - -let IsUnicodeCategory(x:Alphabet) = (encodedUnicodeCategoryBase <= x) && (x < encodedUnicodeCategoryBase + uint32 NumUnicodeCategories) -let UnicodeCategoryIndex(x:Alphabet) = (x - encodedUnicodeCategoryBase) - -let numLowUnicodeChars = 128 -let _ = assert (numLowUnicodeChars = 128) // see table interpreter -let specificUnicodeChars = new Dictionary<_,_>() -let specificUnicodeCharsDecode = new Dictionary<_,_>() -let EncodeChar(c:char) = - let x = System.Convert.ToUInt32 c - if !unicode then - if x < uint32 numLowUnicodeChars then x - else - if not(specificUnicodeChars.ContainsKey(c)) then - let idx = uint32 numLowUnicodeChars + uint32 specificUnicodeChars.Count - specificUnicodeChars.[c] <- idx - specificUnicodeCharsDecode.[idx] <- c - specificUnicodeChars.[c] - else - if x >= 256u then failwithf "the Unicode character '%c' may not be used unless --unicode is specified" c; - x -let DecodeChar(x:Alphabet) = - if !unicode then - if x < uint32 numLowUnicodeChars then System.Convert.ToChar x - else specificUnicodeCharsDecode.[x] - else - if x >= 256u then failwithf "the Unicode character '%x' may not be used unless --unicode is specified" x; - System.Convert.ToChar x - - - -let NumSpecificUnicodeChars() = specificUnicodeChars.Count -let GetSpecificUnicodeChars() = - specificUnicodeChars - |> Seq.sortBy (fun (KeyValue(k,v)) -> v) - |> Seq.map (fun (KeyValue(k,v)) -> k) - -let GetSingleCharAlphabet() = - if !unicode - then Set.of_list [ for c in 0..numLowUnicodeChars-1 do yield (char c) - for c in GetSpecificUnicodeChars() do yield c ] - else Set.of_list [ for x in 0..255 -> (char x) ] - -let GetAlphabet() = - if !unicode - then Set.of_list [ for c in GetSingleCharAlphabet() do yield EncodeChar c - for uc in 0 .. NumUnicodeCategories-1 do yield EncodeUnicodeCategoryIndex uc ] - else Set.of_list [ for c in GetSingleCharAlphabet() do yield EncodeChar c ] - - -//let DecodeAlphabet (x:Alphabet) = System.Convert.ToChar(x) - -(* -for i in 0 .. 65535 do - let c = char i - if System.Char.GetUnicodeCategory c = System.Globalization.UnicodeCategory.PrivateUse then - printfn "i = %x" i -*) - -type Spec = - { TopCode: Code; - Macros: (Ident * Regexp) list; - Rules: (Ident * Ident list * Clause list) list; - BottomCode: Code } -and Clause = Regexp * Code -and Regexp = - | Alt of Regexp list - | Seq of Regexp list - | Inp of Input - | Star of Regexp - | Macro of Ident -and Input = - | Alphabet of Alphabet - | UnicodeCategory of string - | Any - | NotCharSet of Set - -type NodeId = int - -type NfaNode = - { Id: NodeId; - Name: string; - Transitions: Dictionary; - Accepted: (int * int) list } - -type DfaNode = - { Id: int; - Name: string; - mutable Transitions: (Alphabet * DfaNode) list; - Accepted: (int * int) list } - -type MultiMap<'a,'b> = Dictionary<'a,'b list> -let LookupMultiMap (trDict:MultiMap<_,_>) a = - if trDict.ContainsKey(a) then trDict.[a] else [] - -let AddToMultiMap (trDict:MultiMap<_,_>) a b = - let prev = LookupMultiMap trDict a - trDict.[a] <- b::prev - -type NfaNodeMap() = - let map = new Dictionary(100) - member x.Item with get(nid) = map.[nid] - member x.Count = map.Count - - member x.NewNfaNode(trs,ac) = - let nodeId = map.Count+1 // ID zero is reserved - let trDict = new Dictionary<_,_>(List.length trs) - for (a,b) in trs do - AddToMultiMap trDict a b - - let node = {new NfaNode with Id=nodeId and Name=string nodeId and Transitions=trDict and Accepted=ac} - map.[nodeId] <-node; - node - -let LexerStateToNfa (macros: Map) (clauses: Clause list) = - - /// Table allocating node ids - let nfaNodeMap = new NfaNodeMap() - - /// Compile a regular expression into the NFA - let rec CompileRegexp re dest = - match re with - | Alt res -> - let trs = res |> List.map (fun re -> (Epsilon,CompileRegexp re dest)) - nfaNodeMap.NewNfaNode(trs,[]) - | Seq res -> - List.fold_right (CompileRegexp) res dest - | Inp (Alphabet c) -> - nfaNodeMap.NewNfaNode([(c, dest)],[]) - - | Star re -> - let nfaNode = nfaNodeMap.NewNfaNode([(Epsilon, dest)],[]) - let sre = CompileRegexp re nfaNode - AddToMultiMap nfaNode.Transitions Epsilon sre - nfaNodeMap.NewNfaNode([(Epsilon,sre); (Epsilon,dest)],[]) - | Macro m -> - if not (macros.ContainsKey(m)) then failwith ("The macro "^m^" is not defined"); - CompileRegexp (macros.[m]) dest - - // These cases unwind the difficult cases in the syntax that rely on knowing the - // entire alphabet. - // - // Note we've delayed the expension of these until we've worked out all the 'special' Unicode characters - // mentioned in the entire lexer spec, i.e. we wait until GetAlphabet returns a reliable and stable answer. - | Inp (UnicodeCategory uc) -> - let re = Alt([ yield Inp(Alphabet(EncodeUnicodeCategory uc)) - // Also include any specific characters in this category - for c in GetSingleCharAlphabet() do - if System.Char.GetUnicodeCategory(c) = unicodeCategories.[uc] then - yield Inp(Alphabet(EncodeChar(c))) ]) - CompileRegexp re dest - - | Inp Any -> - let re = Alt([ for n in GetAlphabet() do yield Inp(Alphabet(n)) ]) - CompileRegexp re dest - - | Inp (NotCharSet chars) -> - let re = Alt [ // Include any characters from those in the alphabet besides those that are not immediately excluded - for c in GetSingleCharAlphabet() do - let ec = EncodeChar c - if not (chars.Contains(ec)) then - yield Inp(Alphabet(ec)) - - // Include all unicode categories - // That is, negations _only_ exclude precisely the given set of characters. You can't - // exclude whole classes of characters as yet - if !unicode then - let ucs = chars |> Set.map(DecodeChar >> System.Char.GetUnicodeCategory) - for KeyValue(nm,uc) in unicodeCategories do - //if ucs.Contains(uc) then - // do printfn "warning: the unicode category '\\%s' ('%s') is automatically excluded by this character set negation. Consider adding this to the negation." nm (uc.ToString()) - // yield! [] - //else - yield Inp(Alphabet(EncodeUnicodeCategory nm)) - ] - CompileRegexp re dest - - let actions = new System.Collections.Generic.List<_>() - - /// Compile an acceptance of a regular expression into the NFA - let sTrans macros nodeId (regexp,code) = - let actionId = actions.Count - actions.Add(code) - let sAccept = nfaNodeMap.NewNfaNode([],[(nodeId,actionId)]) - CompileRegexp regexp sAccept - - let trs = clauses |> List.mapi (fun n x -> (Epsilon,sTrans macros n x)) - let nfaStartNode = nfaNodeMap.NewNfaNode(trs,[]) - nfaStartNode,(actions |> Seq.readonly), nfaNodeMap - -// TODO: consider a better representation here. -type NfaNodeIdSetBuilder = HashSet - -type NfaNodeIdSet(nodes: NfaNodeIdSetBuilder) = - let s = nodes |> Seq.to_array |> Array.sort - member x.Representation = s - member x.Elements = s - member x.Fold f z = Array.fold_left f z s - interface System.IComparable with - member x.CompareTo(y:obj) = - let y = (y :?> NfaNodeIdSet) - let xr = x.Representation - let yr = y.Representation - let c = compare xr.Length yr.Length - if c <> 0 then c else - let n = yr.Length - let rec go i = - if i >= n then 0 else - let c = compare xr.[i] yr.[i] - if c <> 0 then c else - go (i+1) - go 0 - - override x.Equals(y:obj) = - match y with - | :? NfaNodeIdSet as y -> - let xr = x.Representation - let yr = y.Representation - let n = yr.Length - xr.Length = n && - (let rec go i = (i < n) && xr.[i] = yr.[i] && go (i+1) - go 0) - | _ -> false - member x.IsEmpty = (s.Length = 0) - member x.Iterate f = s |> Array.iter f - -type NodeSetSet = Set - -let newDfaNodeId = - let i = ref 0 - fun () -> let res = !i in incr i; res - -let NfaToDfa (nfaNodeMap:NfaNodeMap) nfaStartNode = - let numNfaNodes = nfaNodeMap.Count - let rec EClosure1 (acc:NfaNodeIdSetBuilder) (n:NfaNode) = - if not (acc.Contains(n.Id)) then - acc.Add(n.Id); - if n.Transitions.ContainsKey(Epsilon) then - match n.Transitions.[Epsilon] with - | [] -> () // this Clause is an optimization - the list is normally empty - | tr -> - //printfn "n.Id = %A, #Epsilon = %d" n.Id tr.Length - tr |> List.iter (EClosure1 acc) - - let EClosure (moves:list) = - let acc = new NfaNodeIdSetBuilder(10) - for i in moves do - EClosure1 acc nfaNodeMap.[i]; - new NfaNodeIdSet(acc) - - // Compute all the immediate one-step moves for a set of NFA states, as a dictionary - // mapping inputs to destination lists - let ComputeMoves (nset:NfaNodeIdSet) = - let moves = new MultiMap<_,_>() - nset.Iterate(fun nodeId -> - for (KeyValue(inp,dests)) in nfaNodeMap.[nodeId].Transitions do - if inp <> Epsilon then - match dests with - | [] -> () // this Clause is an optimization - the list is normally empty - | tr -> tr |> List.iter(fun dest -> AddToMultiMap moves inp dest.Id)) - moves - - let acc = new NfaNodeIdSetBuilder(10) - EClosure1 acc nfaStartNode; - let nfaSet0 = new NfaNodeIdSet(acc) - - let dfaNodes = ref (Map.Empty) - - let GetDfaNode nfaSet = - if (!dfaNodes).ContainsKey(nfaSet) then - (!dfaNodes).[nfaSet] - else - let dfaNode = - { Id= newDfaNodeId(); - Name = nfaSet.Fold (fun s nid -> nfaNodeMap.[nid].Name^"-"^s) ""; - Transitions=[]; - Accepted= nfaSet.Elements - |> Seq.map (fun nid -> nfaNodeMap.[nid].Accepted) - |> List.concat } - //Printf.printfn "id = %d" dfaNode.Id; - - dfaNodes := (!dfaNodes).Add(nfaSet,dfaNode); - dfaNode - - let workList = ref [nfaSet0] - let doneSet = ref NodeSetSet.Empty - - //let count = ref 0 - let rec Loop () = - match !workList with - | [] -> () - | nfaSet ::t -> - workList := t; - if (!doneSet).Contains(nfaSet) then - Loop () - else - let moves = ComputeMoves nfaSet - for (KeyValue(inp,movesForInput)) in moves do - assert (inp <> Epsilon); - let moveSet = EClosure movesForInput; - if not moveSet.IsEmpty then - //incr count - let dfaNode = GetDfaNode nfaSet - dfaNode.Transitions <- (inp, GetDfaNode moveSet) :: dfaNode.Transitions; - (* Printf.printf "%d (%s) : %s --> %d (%s)\n" dfaNode.Id dfaNode.Name (match inp with EncodeChar c -> String.make 1 c | LEof -> "eof") moveSetDfaNode.Id moveSetDfaNode.Name;*) - workList := moveSet :: !workList; - - doneSet := (!doneSet).Add(nfaSet); - - - Loop() - Loop(); - //Printf.printfn "count = %d" !count; - let ruleStartNode = GetDfaNode nfaSet0 - let ruleNodes = - (!dfaNodes) - |> Seq.map (fun kvp -> kvp.Value) - |> Seq.to_list - |> List.sortBy (fun s -> s.Id) - ruleStartNode,ruleNodes - -let Compile spec = - List.fold_right - (fun (name,args,clauses) (perRuleData,dfaNodes) -> - let nfa, actions, nfaNodeMap = LexerStateToNfa (Map.of_list spec.Macros) clauses - let ruleStartNode, ruleNodes = NfaToDfa nfaNodeMap nfa - //Printf.printfn "name = %s, ruleStartNode = %O" name ruleStartNode.Id; - (ruleStartNode,actions) :: perRuleData, ruleNodes @ dfaNodes) - spec.Rules - ([],[]) - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexlex.fs b/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexlex.fs deleted file mode 100644 index afde7ea2..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexlex.fs +++ /dev/null @@ -1,727 +0,0 @@ -#light -# 1 "fslexlex.fsl" - -(* (c) Microsoft Corporation 2005-2008. *) - -open Fslexast -open Fslexpars -open Internal.Utilities -open Internal.Utilities.Text.Lexing -open System.Text - -let escape c = - match c with - | '\\' -> '\\' - | '\'' -> '\'' - | 'n' -> '\n' - | 't' -> '\t' - | 'b' -> '\b' - | 'r' -> '\r' - | c -> c - -let lexeme (lexbuf : LexBuffer) = new System.String(lexbuf.Lexeme) -let newline (lexbuf:LexBuffer<_>) = lexbuf.EndPos <- lexbuf.EndPos.NextLine - -let unexpected_char lexbuf = - failwith ("Unexpected character '"^(lexeme lexbuf)^"'") - -let digit d = - if d >= '0' && d <= '9' then int32 d - int32 '0' - else failwith "digit" - -let hexdigit d = - if d >= '0' && d <= '9' then digit d - else if d >= 'a' && d <= 'f' then int32 d - int32 'a' + 10 - else if d >= 'A' && d <= 'F' then int32 d - int32 'A' + 10 - else failwithf "bad hexdigit: %c" d - -let trigraph c1 c2 c3 = - char (digit c1 * 100 + digit c2 * 10 + digit c3) - -let hexgraph c1 c2 = - char (hexdigit c1 * 16 + hexdigit c2) - -let unicodegraph_short (s:string) = - if s.Length <> 4 then failwith "unicodegraph"; - char(hexdigit s.[0] * 4096 + hexdigit s.[1] * 256 + hexdigit s.[2] * 16 + hexdigit s.[3]) - -let unicodegraph_long (s:string) = - if s.Length <> 8 then failwith "unicodegraph_long"; - let high = hexdigit s.[0] * 4096 + hexdigit s.[1] * 256 + hexdigit s.[2] * 16 + hexdigit s.[3] in - let low = hexdigit s.[4] * 4096 + hexdigit s.[5] * 256 + hexdigit s.[6] * 16 + hexdigit s.[7] in - if high = 0 then None, char low - else - (* A surrogate pair - see http://www.unicode.org/unicode/uni2book/ch03.pdf, section 3.7 *) - Some (char(0xD800 + ((high * 0x10000 + low - 0x10000) / 0x400))), - char(0xDF30 + ((high * 0x10000 + low - 0x10000) % 0x400)) - - -# 59 "fslexlex.fs" -let trans : uint16[] array = - [| - (* State 0 *) - [| 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 4us; 8us; 8us; 5us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 2us; 8us; 8us; 8us; 8us; 1us; 3us; 9us; 6us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 7us; |]; - (* State 1 *) - [| 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 15us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 65535us; |]; - (* State 2 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 3 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 13us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 4 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 5 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 12us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 6 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 11us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 7 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 8 *) - [| 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 65535us; 10us; 10us; 65535us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 65535us; 10us; 10us; 10us; 10us; 65535us; 65535us; 65535us; 65535us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 65535us; |]; - (* State 9 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 10 *) - [| 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 65535us; 10us; 10us; 65535us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 65535us; 10us; 10us; 10us; 10us; 65535us; 65535us; 65535us; 65535us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 65535us; |]; - (* State 11 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 12 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 13 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 14 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 15 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 14us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 16 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 17 *) - [| 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 22us; 20us; 24us; 24us; 21us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 22us; 24us; 19us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 24us; 18us; 24us; 24us; 24us; 24us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 23us; |]; - (* State 18 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 27us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 27us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 19 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 20 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 21 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 26us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 22 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 23 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 24 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 25 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 26 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 27 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 28 *) - [| 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 35us; 33us; 38us; 38us; 34us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 35us; 38us; 32us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 36us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 38us; 31us; 38us; 38us; 38us; 38us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 30us; 38us; 29us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 37us; |]; - (* State 29 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 30 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 31 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 43us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 43us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 32 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 33 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 34 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 42us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 35 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 36 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 39us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 37 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 38 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 39 *) - [| 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 65535us; 40us; 40us; 65535us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 65535us; |]; - (* State 40 *) - [| 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 65535us; 40us; 40us; 65535us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 65535us; |]; - (* State 41 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 42 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 43 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 44 *) - [| 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 49us; 47us; 51us; 51us; 48us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 49us; 51us; 46us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 51us; 45us; 51us; 51us; 51us; 51us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 50us; |]; - (* State 45 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 54us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 56us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 46 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 47 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 48 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 53us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 49 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 50 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 51 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 52 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 53 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 54 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 55 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 54us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 56 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 57 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 58 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 59 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 60 *) - [| 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 69us; 70us; 87us; 87us; 71us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 69us; 87us; 68us; 87us; 87us; 87us; 87us; 66us; 81us; 82us; 76us; 75us; 87us; 85us; 74us; 86us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 78us; 87us; 77us; 87us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 79us; 87us; 80us; 84us; 83us; 87us; 65us; 72us; 72us; 72us; 63us; 72us; 72us; 72us; 72us; 72us; 72us; 64us; 72us; 72us; 72us; 62us; 72us; 61us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 67us; 73us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 88us; |]; - (* State 61 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 136us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 62 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 132us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 63 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 130us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 64 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 128us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 65 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 126us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 66 *) - [| 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 96us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 65535us; |]; - (* State 67 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 68 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 69 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 70 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 71 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 93us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 72 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 73 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 74 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 75 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 76 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 77 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 78 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 79 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 80 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 81 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 91us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 82 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 83 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 84 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 85 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 86 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 89us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 87 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 88 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 89 *) - [| 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; 90us; 90us; 65535us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; |]; - (* State 90 *) - [| 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; 90us; 90us; 65535us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; |]; - (* State 91 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 92 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 93 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 94 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 95 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 96 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 95us; 65535us; 65535us; 65535us; 65535us; 95us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 97us; 97us; 97us; 97us; 97us; 97us; 97us; 97us; 97us; 97us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 100us; 101us; 101us; 101us; 101us; 101us; 65535us; 95us; 65535us; 65535us; 65535us; 65535us; 65535us; 95us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 95us; 65535us; 65535us; 65535us; 95us; 65535us; 95us; 99us; 65535us; 65535us; 98us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 97 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 98 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 119us; 119us; 119us; 119us; 119us; 119us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 119us; 119us; 119us; 119us; 119us; 119us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 99 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 114us; 114us; 114us; 114us; 114us; 114us; 114us; 114us; 114us; 114us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 114us; 114us; 114us; 114us; 114us; 114us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 114us; 114us; 114us; 114us; 114us; 114us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 100 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 104us; 104us; 104us; 104us; 104us; 104us; 104us; 104us; 104us; 104us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 104us; 104us; 104us; 104us; 104us; 104us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 105us; 105us; 105us; 105us; 105us; 105us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 101 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 102 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 103us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 103 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 104 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 105 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 103us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 106 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 107us; 107us; 107us; 107us; 107us; 107us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 107us; 107us; 107us; 107us; 107us; 107us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 107 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 108us; 108us; 108us; 108us; 108us; 108us; 108us; 108us; 108us; 108us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 108us; 108us; 108us; 108us; 108us; 108us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 108us; 108us; 108us; 108us; 108us; 108us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 108 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 109 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 110us; 110us; 110us; 110us; 110us; 110us; 110us; 110us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 110us; 110us; 110us; 110us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 110us; 110us; 110us; 110us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 110 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 111us; 111us; 111us; 111us; 111us; 111us; 111us; 111us; 111us; 111us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 111us; 111us; 111us; 111us; 111us; 111us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 111us; 111us; 111us; 111us; 111us; 111us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 111 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 112us; 112us; 112us; 112us; 112us; 112us; 112us; 112us; 112us; 112us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 112us; 112us; 112us; 112us; 112us; 112us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 112us; 112us; 112us; 112us; 112us; 112us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 112 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 113us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 113 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 114 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 115us; 115us; 115us; 115us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 115us; 115us; 115us; 115us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 115 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 116us; 116us; 116us; 116us; 116us; 116us; 116us; 116us; 116us; 116us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 116us; 116us; 116us; 116us; 116us; 116us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 116us; 116us; 116us; 116us; 116us; 116us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 116 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 117us; 117us; 117us; 117us; 117us; 117us; 117us; 117us; 117us; 117us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 117us; 117us; 117us; 117us; 117us; 117us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 117us; 117us; 117us; 117us; 117us; 117us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 117 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 118us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 118 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 119 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 120us; 120us; 120us; 120us; 120us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 120us; 120us; 120us; 120us; 120us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 120 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 121 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 122 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 123 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 124us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 124 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 125 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 126 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 127us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 127 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 128 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 129us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 129 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 130 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 131us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 131 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 132 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 133us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 133 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 134us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 134 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 135us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 135 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 136 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 137us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 137 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 138us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 138 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - |] -let actions : uint16[] = [|65535us; 7us; 1us; 7us; 3us; 7us; 7us; 5us; 6us; 7us; 6us; 4us; 3us; 2us; 65535us; 65535us; 0us; 65535us; 5us; 1us; 2us; 5us; 3us; 4us; 5us; 3us; 2us; 0us; 65535us; 0us; 1us; 8us; 3us; 4us; 8us; 5us; 8us; 7us; 8us; 6us; 6us; 5us; 4us; 2us; 65535us; 7us; 3us; 4us; 7us; 5us; 6us; 7us; 5us; 4us; 0us; 65535us; 1us; 65535us; 65535us; 2us; 65535us; 15us; 15us; 15us; 15us; 15us; 31us; 11us; 12us; 13us; 14us; 31us; 15us; 16us; 17us; 18us; 19us; 20us; 21us; 22us; 23us; 24us; 25us; 26us; 27us; 28us; 31us; 31us; 32us; 30us; 30us; 29us; 15us; 14us; 13us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 10us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 9us; 65535us; 65535us; 65535us; 65535us; 8us; 65535us; 65535us; 7us; 65535us; 65535us; 6us; 5us; 15us; 4us; 15us; 3us; 15us; 2us; 15us; 15us; 15us; 1us; 15us; 15us; 0us; |] -let _fslex_tables = Internal.Utilities.Text.Lexing.UnicodeTables.Create(trans,actions) -let rec _fslex_dummy () = _fslex_dummy() -(* Rule token *) -and token (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_token 60 lexbuf -and _fslex_token _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 74 "fslexlex.fsl" - RULE -# 351 "fslexlex.fs" - ) - | 1 -> ( -# 75 "fslexlex.fsl" - PARSE -# 356 "fslexlex.fs" - ) - | 2 -> ( -# 76 "fslexlex.fsl" - EOF -# 361 "fslexlex.fs" - ) - | 3 -> ( -# 77 "fslexlex.fsl" - LET -# 366 "fslexlex.fs" - ) - | 4 -> ( -# 78 "fslexlex.fsl" - AND -# 371 "fslexlex.fs" - ) - | 5 -> ( -# 80 "fslexlex.fsl" - let s = lexeme lexbuf in - CHAR (if s.[1] = '\\' then escape s.[2] else s.[1]) -# 377 "fslexlex.fs" - ) - | 6 -> ( -# 84 "fslexlex.fsl" - let s = lexeme lexbuf in - CHAR (trigraph s.[2] s.[3] s.[4]) -# 383 "fslexlex.fs" - ) - | 7 -> ( -# 88 "fslexlex.fsl" - let s = lexeme lexbuf in - CHAR (hexgraph s.[3] s.[4]) -# 389 "fslexlex.fs" - ) - | 8 -> ( -# 92 "fslexlex.fsl" - let s = lexeme lexbuf in - CHAR (unicodegraph_short s.[3..6]) -# 395 "fslexlex.fs" - ) - | 9 -> ( -# 96 "fslexlex.fsl" - let s = lexeme lexbuf in - match (unicodegraph_long s.[3..10]) with - | None, c -> CHAR(c) - | Some _ , _ -> failwith "Unicode characters needing surrogate pairs are not yet supported by this tool" -# 403 "fslexlex.fs" - ) - | 10 -> ( -# 102 "fslexlex.fsl" - let s = (lexeme lexbuf).[2..3] in - UNICODE_CATEGORY (s) -# 409 "fslexlex.fs" - ) - | 11 -> ( -# 105 "fslexlex.fsl" - let p = lexbuf.StartPos in code p (new StringBuilder 100) lexbuf -# 414 "fslexlex.fs" - ) - | 12 -> ( -# 107 "fslexlex.fsl" - string lexbuf.StartPos (new StringBuilder 100) lexbuf -# 419 "fslexlex.fs" - ) - | 13 -> ( -# 109 "fslexlex.fsl" - token lexbuf -# 424 "fslexlex.fs" - ) - | 14 -> ( -# 110 "fslexlex.fsl" - newline lexbuf; token lexbuf -# 429 "fslexlex.fs" - ) - | 15 -> ( -# 111 "fslexlex.fsl" - IDENT (lexeme lexbuf) -# 434 "fslexlex.fs" - ) - | 16 -> ( -# 112 "fslexlex.fsl" - BAR -# 439 "fslexlex.fs" - ) - | 17 -> ( -# 113 "fslexlex.fsl" - DOT -# 444 "fslexlex.fs" - ) - | 18 -> ( -# 114 "fslexlex.fsl" - PLUS -# 449 "fslexlex.fs" - ) - | 19 -> ( -# 115 "fslexlex.fsl" - STAR -# 454 "fslexlex.fs" - ) - | 20 -> ( -# 116 "fslexlex.fsl" - QMARK -# 459 "fslexlex.fs" - ) - | 21 -> ( -# 117 "fslexlex.fsl" - EQUALS -# 464 "fslexlex.fs" - ) - | 22 -> ( -# 118 "fslexlex.fsl" - LBRACK -# 469 "fslexlex.fs" - ) - | 23 -> ( -# 119 "fslexlex.fsl" - RBRACK -# 474 "fslexlex.fs" - ) - | 24 -> ( -# 120 "fslexlex.fsl" - LPAREN -# 479 "fslexlex.fs" - ) - | 25 -> ( -# 121 "fslexlex.fsl" - RPAREN -# 484 "fslexlex.fs" - ) - | 26 -> ( -# 122 "fslexlex.fsl" - UNDERSCORE -# 489 "fslexlex.fs" - ) - | 27 -> ( -# 123 "fslexlex.fsl" - HAT -# 494 "fslexlex.fs" - ) - | 28 -> ( -# 124 "fslexlex.fsl" - DASH -# 499 "fslexlex.fs" - ) - | 29 -> ( -# 125 "fslexlex.fsl" - ignore(comment lexbuf.StartPos lexbuf); token lexbuf -# 504 "fslexlex.fs" - ) - | 30 -> ( -# 126 "fslexlex.fsl" - token lexbuf -# 509 "fslexlex.fs" - ) - | 31 -> ( -# 127 "fslexlex.fsl" - unexpected_char lexbuf -# 514 "fslexlex.fs" - ) - | 32 -> ( -# 128 "fslexlex.fsl" - EOF -# 519 "fslexlex.fs" - ) - | _ -> failwith "token" -(* Rule string *) -and string p buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_string p buff 44 lexbuf -and _fslex_string p buff _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 130 "fslexlex.fsl" - newline lexbuf; string p buff lexbuf -# 529 "fslexlex.fs" - ) - | 1 -> ( -# 132 "fslexlex.fsl" - let _ = buff.Append (escape (lexeme lexbuf).[1]) in - string p buff lexbuf -# 535 "fslexlex.fs" - ) - | 2 -> ( -# 135 "fslexlex.fsl" - let s = lexeme lexbuf in - let _ = buff.Append (trigraph s.[1] s.[2] s.[3]) in - string p buff lexbuf -# 542 "fslexlex.fs" - ) - | 3 -> ( -# 138 "fslexlex.fsl" - STRING (buff.ToString()) -# 547 "fslexlex.fs" - ) - | 4 -> ( -# 139 "fslexlex.fsl" - newline lexbuf; - let _ = buff.Append System.Environment.NewLine in - string p buff lexbuf -# 554 "fslexlex.fs" - ) - | 5 -> ( -# 143 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf) in - string p buff lexbuf -# 560 "fslexlex.fs" - ) - | 6 -> ( -# 145 "fslexlex.fsl" - failwith (Printf.sprintf "end of file in string started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol)) -# 565 "fslexlex.fs" - ) - | 7 -> ( -# 146 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf).[0] in - string p buff lexbuf -# 571 "fslexlex.fs" - ) - | _ -> failwith "string" -(* Rule code *) -and code p buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_code p buff 28 lexbuf -and _fslex_code p buff _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 149 "fslexlex.fsl" - CODE (buff.ToString(), p) -# 581 "fslexlex.fs" - ) - | 1 -> ( -# 150 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf) in - ignore(code p buff lexbuf); - let _ = buff.Append "}" in - code p buff lexbuf -# 589 "fslexlex.fs" - ) - | 2 -> ( -# 155 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf) in - code p buff lexbuf -# 595 "fslexlex.fs" - ) - | 3 -> ( -# 157 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf) in - ignore(codestring buff lexbuf); - code p buff lexbuf -# 602 "fslexlex.fs" - ) - | 4 -> ( -# 160 "fslexlex.fsl" - newline lexbuf; - let _ = buff.Append System.Environment.NewLine in - code p buff lexbuf -# 609 "fslexlex.fs" - ) - | 5 -> ( -# 164 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf) in - code p buff lexbuf -# 615 "fslexlex.fs" - ) - | 6 -> ( -# 167 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf) in - code p buff lexbuf -# 621 "fslexlex.fs" - ) - | 7 -> ( -# 169 "fslexlex.fsl" - EOF -# 626 "fslexlex.fs" - ) - | 8 -> ( -# 170 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf).[0] in - code p buff lexbuf -# 632 "fslexlex.fs" - ) - | _ -> failwith "code" -(* Rule codestring *) -and codestring buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_codestring buff 17 lexbuf -and _fslex_codestring buff _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 175 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf) in - codestring buff lexbuf -# 643 "fslexlex.fs" - ) - | 1 -> ( -# 177 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf) in - buff.ToString() -# 649 "fslexlex.fs" - ) - | 2 -> ( -# 179 "fslexlex.fsl" - newline lexbuf; - let _ = buff.Append System.Environment.NewLine in - codestring buff lexbuf -# 656 "fslexlex.fs" - ) - | 3 -> ( -# 183 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf) in - codestring buff lexbuf -# 662 "fslexlex.fs" - ) - | 4 -> ( -# 185 "fslexlex.fsl" - failwith "unterminated string in code" -# 667 "fslexlex.fs" - ) - | 5 -> ( -# 186 "fslexlex.fsl" - let _ = buff.Append (lexeme lexbuf).[0] in - codestring buff lexbuf -# 673 "fslexlex.fs" - ) - | _ -> failwith "codestring" -(* Rule comment *) -and comment p (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_comment p 0 lexbuf -and _fslex_comment p _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 190 "fslexlex.fsl" - comment p lexbuf -# 683 "fslexlex.fs" - ) - | 1 -> ( -# 191 "fslexlex.fsl" - ignore(try string lexbuf.StartPos (new StringBuilder 100) lexbuf - with Failure s -> failwith (s ^ "\n" ^ Printf.sprintf "error while processing string nested in comment started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol))); - comment p lexbuf -# 690 "fslexlex.fs" - ) - | 2 -> ( -# 194 "fslexlex.fsl" - ignore(try comment p lexbuf with Failure s -> failwith (s ^ "\n" ^ Printf.sprintf "error while processing nested comment started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol))); - comment p lexbuf -# 696 "fslexlex.fs" - ) - | 3 -> ( -# 196 "fslexlex.fsl" - newline lexbuf; comment p lexbuf -# 701 "fslexlex.fs" - ) - | 4 -> ( -# 197 "fslexlex.fsl" - () -# 706 "fslexlex.fs" - ) - | 5 -> ( -# 198 "fslexlex.fsl" - failwith (Printf.sprintf "end of file in comment started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol)) -# 711 "fslexlex.fs" - ) - | 6 -> ( -# 199 "fslexlex.fsl" - comment p lexbuf -# 716 "fslexlex.fs" - ) - | 7 -> ( -# 200 "fslexlex.fsl" - comment p lexbuf -# 721 "fslexlex.fs" - ) - | _ -> failwith "comment" - -# 203 "fslexlex.fsl" - -# 3000000 "fslexlex.fs" diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexlex.fsl b/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexlex.fsl deleted file mode 100644 index 76ec601b..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexlex.fsl +++ /dev/null @@ -1,202 +0,0 @@ -{ -(* (c) Microsoft Corporation 2005-2008. *) - -open Fslexast -open Fslexpars -open Internal.Utilities -open Internal.Utilities.Text.Lexing -open System.Text - -let escape c = - match c with - | '\\' -> '\\' - | '\'' -> '\'' - | 'n' -> '\n' - | 't' -> '\t' - | 'b' -> '\b' - | 'r' -> '\r' - | c -> c - -let lexeme (lexbuf : LexBuffer) = new System.String(lexbuf.Lexeme) -let newline (lexbuf:LexBuffer<_>) = lexbuf.EndPos <- lexbuf.EndPos.NextLine - -let unexpected_char lexbuf = - failwith ("Unexpected character '"^(lexeme lexbuf)^"'") - -let digit d = - if d >= '0' && d <= '9' then int32 d - int32 '0' - else failwith "digit" - -let hexdigit d = - if d >= '0' && d <= '9' then digit d - else if d >= 'a' && d <= 'f' then int32 d - int32 'a' + 10 - else if d >= 'A' && d <= 'F' then int32 d - int32 'A' + 10 - else failwithf "bad hexdigit: %c" d - -let trigraph c1 c2 c3 = - char (digit c1 * 100 + digit c2 * 10 + digit c3) - -let hexgraph c1 c2 = - char (hexdigit c1 * 16 + hexdigit c2) - -let unicodegraph_short (s:string) = - if s.Length <> 4 then failwith "unicodegraph"; - char(hexdigit s.[0] * 4096 + hexdigit s.[1] * 256 + hexdigit s.[2] * 16 + hexdigit s.[3]) - -let unicodegraph_long (s:string) = - if s.Length <> 8 then failwith "unicodegraph_long"; - let high = hexdigit s.[0] * 4096 + hexdigit s.[1] * 256 + hexdigit s.[2] * 16 + hexdigit s.[3] in - let low = hexdigit s.[4] * 4096 + hexdigit s.[5] * 256 + hexdigit s.[6] * 16 + hexdigit s.[7] in - if high = 0 then None, char low - else - (* A surrogate pair - see http://www.unicode.org/unicode/uni2book/ch03.pdf, section 3.7 *) - Some (char(0xD800 + ((high * 0x10000 + low - 0x10000) / 0x400))), - char(0xDF30 + ((high * 0x10000 + low - 0x10000) % 0x400)) - -} - -let letter = ['A'-'Z'] | ['a'-'z'] -let digit = ['0'-'9'] -let whitespace = [' ' '\t'] -let char = '\'' ( [^'\\'] | ('\\' ( '\\' | '\'' | "\"" | 'n' | 't' | 'b' | 'r'))) '\'' -let hex = ['0'-'9'] | ['A'-'F'] | ['a'-'f'] -let hexgraph = '\\' 'x' hex hex -let trigraph = '\\' digit digit digit -let newline = ('\n' | '\r' '\n') -let ident_start_char = letter -let ident_char = ( ident_start_char| digit | ['\'' '_'] ) -let ident = ident_start_char ident_char* - -let unicodegraph_short = '\\' 'u' hex hex hex hex -let unicodegraph_long = '\\' 'U' hex hex hex hex hex hex hex hex - -rule token = parse - | "rule" {RULE } - | "parse" {PARSE } - | "eof" {EOF } - | "let" {LET } - | "and" {AND } - | char - { let s = lexeme lexbuf in - CHAR (if s.[1] = '\\' then escape s.[2] else s.[1]) } - - | '\'' trigraph '\'' - { let s = lexeme lexbuf in - CHAR (trigraph s.[2] s.[3] s.[4]) } - - | '\'' hexgraph '\'' - { let s = lexeme lexbuf in - CHAR (hexgraph s.[3] s.[4]) } - - | '\'' unicodegraph_short '\'' - { let s = lexeme lexbuf in - CHAR (unicodegraph_short s.[3..6]) } - - | '\'' unicodegraph_long '\'' - { let s = lexeme lexbuf in - match (unicodegraph_long s.[3..10]) with - | None, c -> CHAR(c) - | Some _ , _ -> failwith "Unicode characters needing surrogate pairs are not yet supported by this tool" } - - | '\'' '\\' ['A'-'Z'] ['a'-'z'] '\'' - { let s = (lexeme lexbuf).[2..3] in - UNICODE_CATEGORY (s) } - - | '{' { let p = lexbuf.StartPos in code p (new StringBuilder 100) lexbuf } - - | '"' { string lexbuf.StartPos (new StringBuilder 100) lexbuf } - - | whitespace+ { token lexbuf } - | newline { newline lexbuf; token lexbuf } - | ident_start_char ident_char* { IDENT (lexeme lexbuf) } - | '|' { BAR } - | '.' { DOT } - | '+' { PLUS } - | '*' { STAR } - | '?' { QMARK } - | '=' { EQUALS } - | '[' { LBRACK } - | ']' { RBRACK } - | '(' { LPAREN } - | ')' { RPAREN } - | '_' { UNDERSCORE } - | '^' { HAT } - | '-' { DASH } - | "(*" { ignore(comment lexbuf.StartPos lexbuf); token lexbuf } - | "//" [^'\n''\r']* { token lexbuf } - | _ { unexpected_char lexbuf } - | eof { EOF } -and string p buff = parse - | '\\' newline { newline lexbuf; string p buff lexbuf } - | '\\' ( '"' | '\\' | '\'' | 'n' | 't' | 'b' | 'r') - { let _ = buff.Append (escape (lexeme lexbuf).[1]) in - string p buff lexbuf } - | trigraph - { let s = lexeme lexbuf in - let _ = buff.Append (trigraph s.[1] s.[2] s.[3]) in - string p buff lexbuf } - | '"' { STRING (buff.ToString()) } - | newline { newline lexbuf; - let _ = buff.Append System.Environment.NewLine in - string p buff lexbuf } - | (whitespace | letter | digit) + - { let _ = buff.Append (lexeme lexbuf) in - string p buff lexbuf } - | eof { failwith (Printf.sprintf "end of file in string started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol)) } - | _ { let _ = buff.Append (lexeme lexbuf).[0] in - string p buff lexbuf } -and code p buff = parse - | "}" { CODE (buff.ToString(), p) } - | "{" { let _ = buff.Append (lexeme lexbuf) in - ignore(code p buff lexbuf); - let _ = buff.Append "}" in - code p buff lexbuf } - | '\\' ('"' | '\\') - { let _ = buff.Append (lexeme lexbuf) in - code p buff lexbuf } - | "\"" { let _ = buff.Append (lexeme lexbuf) in - ignore(codestring buff lexbuf); - code p buff lexbuf } - | newline { newline lexbuf; - let _ = buff.Append System.Environment.NewLine in - code p buff lexbuf } - | (whitespace | letter | digit) + - { let _ = buff.Append (lexeme lexbuf) in - code p buff lexbuf } - | "//" [^'\n''\r']* - { let _ = buff.Append (lexeme lexbuf) in - code p buff lexbuf } - | eof { EOF } - | _ { let _ = buff.Append (lexeme lexbuf).[0] in - code p buff lexbuf } - -and codestring buff = parse - | '\\' ('"' | '\\') - { let _ = buff.Append (lexeme lexbuf) in - codestring buff lexbuf } - | '"' { let _ = buff.Append (lexeme lexbuf) in - buff.ToString() } - | newline { newline lexbuf; - let _ = buff.Append System.Environment.NewLine in - codestring buff lexbuf } - | (whitespace | letter | digit) + - { let _ = buff.Append (lexeme lexbuf) in - codestring buff lexbuf } - | eof { failwith "unterminated string in code" } - | _ { let _ = buff.Append (lexeme lexbuf).[0] in - codestring buff lexbuf } - -and comment p = parse - | char { comment p lexbuf } - | '"' { ignore(try string lexbuf.StartPos (new StringBuilder 100) lexbuf - with Failure s -> failwith (s ^ "\n" ^ Printf.sprintf "error while processing string nested in comment started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol))); - comment p lexbuf } - | "(*" { ignore(try comment p lexbuf with Failure s -> failwith (s ^ "\n" ^ Printf.sprintf "error while processing nested comment started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol))); - comment p lexbuf } - | newline { newline lexbuf; comment p lexbuf } - | "*)" { () } - | eof { failwith (Printf.sprintf "end of file in comment started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol)) } - | [^ '\'' '(' '*' '\n' '\r' '"' ')' ]+ { comment p lexbuf } - | _ { comment p lexbuf } - - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexpars.fs b/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexpars.fs deleted file mode 100644 index 1f7b8fc5..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexpars.fs +++ /dev/null @@ -1,650 +0,0 @@ -// Implementation file for parser generated by fsyacc -#light -#nowarn "64";; // turn off warnings that type variables used in production annotations are instantiated to concrete type -open Internal.Utilities.Text.Lexing -open Internal.Utilities.Text.Parsing.ParseHelpers -# 1 "fslexpars.fsy" - -(* (c) Microsoft Corporation 2005-2008. *) - -open Fslexast - - -# 13 "fslexpars.fs" -// This type is the type of tokens accepted by the parser -type token = - | EOF - | BAR - | DOT - | PLUS - | STAR - | QMARK - | EQUALS - | UNDERSCORE - | LBRACK - | RBRACK - | HAT - | DASH - | RULE - | PARSE - | LET - | AND - | LPAREN - | RPAREN - | UNICODE_CATEGORY of (string) - | CHAR of (char) - | CODE of (Fslexast.Code) - | STRING of (string) - | IDENT of (string) -// This type is used to give symbolic names to token indexes, useful for error messages -type tokenId = - | TOKEN_EOF - | TOKEN_BAR - | TOKEN_DOT - | TOKEN_PLUS - | TOKEN_STAR - | TOKEN_QMARK - | TOKEN_EQUALS - | TOKEN_UNDERSCORE - | TOKEN_LBRACK - | TOKEN_RBRACK - | TOKEN_HAT - | TOKEN_DASH - | TOKEN_RULE - | TOKEN_PARSE - | TOKEN_LET - | TOKEN_AND - | TOKEN_LPAREN - | TOKEN_RPAREN - | TOKEN_UNICODE_CATEGORY - | TOKEN_CHAR - | TOKEN_CODE - | TOKEN_STRING - | TOKEN_IDENT - | TOKEN_end_of_input - | TOKEN_error -// This type is used to give symbolic names to token indexes, useful for error messages -type nonTerminalId = - | NONTERM__startspec - | NONTERM_spec - | NONTERM_codeopt - | NONTERM_Macros - | NONTERM_macro - | NONTERM_Rules - | NONTERM_rule - | NONTERM_args - | NONTERM_optbar - | NONTERM_clauses - | NONTERM_clause - | NONTERM_regexp - | NONTERM_charset - -// This function maps tokens to integers indexes -let tagOfToken (t:token) = - match t with - | EOF -> 0 - | BAR -> 1 - | DOT -> 2 - | PLUS -> 3 - | STAR -> 4 - | QMARK -> 5 - | EQUALS -> 6 - | UNDERSCORE -> 7 - | LBRACK -> 8 - | RBRACK -> 9 - | HAT -> 10 - | DASH -> 11 - | RULE -> 12 - | PARSE -> 13 - | LET -> 14 - | AND -> 15 - | LPAREN -> 16 - | RPAREN -> 17 - | UNICODE_CATEGORY _ -> 18 - | CHAR _ -> 19 - | CODE _ -> 20 - | STRING _ -> 21 - | IDENT _ -> 22 - -// This function maps integers indexes to symbolic token ids -let tokenTagToTokenId (tokenIdx:int) = - match tokenIdx with - | 0 -> TOKEN_EOF - | 1 -> TOKEN_BAR - | 2 -> TOKEN_DOT - | 3 -> TOKEN_PLUS - | 4 -> TOKEN_STAR - | 5 -> TOKEN_QMARK - | 6 -> TOKEN_EQUALS - | 7 -> TOKEN_UNDERSCORE - | 8 -> TOKEN_LBRACK - | 9 -> TOKEN_RBRACK - | 10 -> TOKEN_HAT - | 11 -> TOKEN_DASH - | 12 -> TOKEN_RULE - | 13 -> TOKEN_PARSE - | 14 -> TOKEN_LET - | 15 -> TOKEN_AND - | 16 -> TOKEN_LPAREN - | 17 -> TOKEN_RPAREN - | 18 -> TOKEN_UNICODE_CATEGORY - | 19 -> TOKEN_CHAR - | 20 -> TOKEN_CODE - | 21 -> TOKEN_STRING - | 22 -> TOKEN_IDENT - | 25 -> TOKEN_end_of_input - | 23 -> TOKEN_error - | _ -> failwith "tokenTagToTokenId: bad token" - -/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production -let prodIdxToNonTerminal (prodIdx:int) = - match prodIdx with - | 0 -> NONTERM__startspec - | 1 -> NONTERM_spec - | 2 -> NONTERM_codeopt - | 3 -> NONTERM_codeopt - | 4 -> NONTERM_Macros - | 5 -> NONTERM_Macros - | 6 -> NONTERM_macro - | 7 -> NONTERM_Rules - | 8 -> NONTERM_Rules - | 9 -> NONTERM_rule - | 10 -> NONTERM_args - | 11 -> NONTERM_args - | 12 -> NONTERM_optbar - | 13 -> NONTERM_optbar - | 14 -> NONTERM_clauses - | 15 -> NONTERM_clauses - | 16 -> NONTERM_clause - | 17 -> NONTERM_regexp - | 18 -> NONTERM_regexp - | 19 -> NONTERM_regexp - | 20 -> NONTERM_regexp - | 21 -> NONTERM_regexp - | 22 -> NONTERM_regexp - | 23 -> NONTERM_regexp - | 24 -> NONTERM_regexp - | 25 -> NONTERM_regexp - | 26 -> NONTERM_regexp - | 27 -> NONTERM_regexp - | 28 -> NONTERM_regexp - | 29 -> NONTERM_regexp - | 30 -> NONTERM_regexp - | 31 -> NONTERM_charset - | 32 -> NONTERM_charset - | 33 -> NONTERM_charset - | _ -> failwith "prodIdxToNonTerminal: bad production index" - -let _fsyacc_endOfInputTag = 25 -let _fsyacc_tagOfErrorTerminal = 23 - -// This function gets the name of a token as a string -let token_to_string (t:token) = - match t with - | EOF -> "EOF" - | BAR -> "BAR" - | DOT -> "DOT" - | PLUS -> "PLUS" - | STAR -> "STAR" - | QMARK -> "QMARK" - | EQUALS -> "EQUALS" - | UNDERSCORE -> "UNDERSCORE" - | LBRACK -> "LBRACK" - | RBRACK -> "RBRACK" - | HAT -> "HAT" - | DASH -> "DASH" - | RULE -> "RULE" - | PARSE -> "PARSE" - | LET -> "LET" - | AND -> "AND" - | LPAREN -> "LPAREN" - | RPAREN -> "RPAREN" - | UNICODE_CATEGORY _ -> "UNICODE_CATEGORY" - | CHAR _ -> "CHAR" - | CODE _ -> "CODE" - | STRING _ -> "STRING" - | IDENT _ -> "IDENT" - -// This function gets the data carried by a token as an object -let _fsyacc_dataOfToken (t:token) = - match t with - | EOF -> (null : System.Object) - | BAR -> (null : System.Object) - | DOT -> (null : System.Object) - | PLUS -> (null : System.Object) - | STAR -> (null : System.Object) - | QMARK -> (null : System.Object) - | EQUALS -> (null : System.Object) - | UNDERSCORE -> (null : System.Object) - | LBRACK -> (null : System.Object) - | RBRACK -> (null : System.Object) - | HAT -> (null : System.Object) - | DASH -> (null : System.Object) - | RULE -> (null : System.Object) - | PARSE -> (null : System.Object) - | LET -> (null : System.Object) - | AND -> (null : System.Object) - | LPAREN -> (null : System.Object) - | RPAREN -> (null : System.Object) - | UNICODE_CATEGORY _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | CHAR _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | CODE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | STRING _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | IDENT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x -let _fsyacc_gotos = [| 0us; 65535us; 1us; 65535us; 0us; 1us; 2us; 65535us; 0us; 2us; 5us; 6us; 2us; 65535us; 2us; 3us; 8us; 9us; 2us; 65535us; 2us; 8us; 8us; 8us; 2us; 65535us; 4us; 5us; 15us; 16us; 2us; 65535us; 4us; 14us; 15us; 14us; 2us; 65535us; 17us; 18us; 23us; 24us; 1us; 65535us; 20us; 21us; 2us; 65535us; 21us; 22us; 27us; 28us; 2us; 65535us; 21us; 26us; 27us; 26us; 10us; 65535us; 12us; 13us; 13us; 37us; 21us; 29us; 27us; 29us; 29us; 37us; 37us; 37us; 38us; 37us; 39us; 37us; 43us; 38us; 44us; 39us; 5us; 65535us; 46us; 47us; 47us; 55us; 49us; 50us; 50us; 55us; 55us; 55us; |] -let _fsyacc_sparseGotoTableRowOffsets = [|0us; 1us; 3us; 6us; 9us; 12us; 15us; 18us; 21us; 23us; 26us; 29us; 40us; |] -let _fsyacc_stateToProdIdxsTableElements = [| 1us; 0us; 1us; 0us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 2us; 1us; 5us; 1us; 5us; 1us; 6us; 1us; 6us; 1us; 6us; 6us; 6us; 23us; 24us; 25us; 26us; 27us; 2us; 7us; 8us; 1us; 7us; 1us; 7us; 1us; 9us; 1us; 9us; 1us; 9us; 1us; 9us; 1us; 9us; 1us; 9us; 1us; 11us; 1us; 11us; 1us; 13us; 2us; 14us; 15us; 1us; 14us; 1us; 14us; 6us; 16us; 23us; 24us; 25us; 26us; 27us; 1us; 16us; 1us; 17us; 1us; 18us; 1us; 19us; 1us; 20us; 1us; 21us; 1us; 22us; 6us; 23us; 23us; 24us; 25us; 26us; 27us; 6us; 23us; 24us; 25us; 26us; 27us; 27us; 6us; 23us; 24us; 25us; 26us; 27us; 28us; 1us; 24us; 1us; 25us; 1us; 26us; 1us; 27us; 1us; 28us; 1us; 28us; 2us; 29us; 30us; 2us; 29us; 33us; 1us; 29us; 1us; 30us; 2us; 30us; 33us; 1us; 30us; 2us; 31us; 32us; 1us; 32us; 1us; 32us; 2us; 33us; 33us; |] -let _fsyacc_stateToProdIdxsTableRowOffsets = [|0us; 2us; 4us; 6us; 8us; 10us; 12us; 14us; 16us; 18us; 20us; 22us; 24us; 26us; 33us; 36us; 38us; 40us; 42us; 44us; 46us; 48us; 50us; 52us; 54us; 56us; 58us; 61us; 63us; 65us; 72us; 74us; 76us; 78us; 80us; 82us; 84us; 86us; 93us; 100us; 107us; 109us; 111us; 113us; 115us; 117us; 119us; 122us; 125us; 127us; 129us; 132us; 134us; 137us; 139us; 141us; |] -let _fsyacc_action_rows = 56 -let _fsyacc_actionTableElements = [|1us; 16387us; 20us; 7us; 0us; 49152us; 1us; 16388us; 14us; 10us; 1us; 32768us; 12us; 4us; 1us; 32768us; 22us; 17us; 1us; 16387us; 20us; 7us; 0us; 16385us; 0us; 16386us; 1us; 16388us; 14us; 10us; 0us; 16389us; 1us; 32768us; 22us; 11us; 1us; 32768us; 6us; 12us; 8us; 32768us; 0us; 33us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 12us; 16390us; 0us; 33us; 1us; 43us; 3us; 40us; 4us; 41us; 5us; 42us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 1us; 16392us; 15us; 15us; 1us; 32768us; 22us; 17us; 0us; 16391us; 1us; 16394us; 22us; 23us; 1us; 32768us; 6us; 19us; 1us; 32768us; 13us; 20us; 1us; 16396us; 1us; 25us; 8us; 32768us; 0us; 33us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 0us; 16393us; 1us; 16394us; 22us; 23us; 0us; 16395us; 0us; 16397us; 1us; 16399us; 1us; 27us; 8us; 32768us; 0us; 33us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 0us; 16398us; 13us; 32768us; 0us; 33us; 1us; 43us; 3us; 40us; 4us; 41us; 5us; 42us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 20us; 30us; 21us; 35us; 22us; 36us; 0us; 16400us; 0us; 16401us; 0us; 16402us; 0us; 16403us; 0us; 16404us; 0us; 16405us; 0us; 16406us; 11us; 16407us; 0us; 33us; 3us; 40us; 4us; 41us; 5us; 42us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 11us; 16411us; 0us; 33us; 3us; 40us; 4us; 41us; 5us; 42us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 13us; 32768us; 0us; 33us; 1us; 43us; 3us; 40us; 4us; 41us; 5us; 42us; 7us; 34us; 8us; 46us; 16us; 44us; 17us; 45us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 0us; 16408us; 0us; 16409us; 0us; 16410us; 8us; 32768us; 0us; 33us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 8us; 32768us; 0us; 33us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 0us; 16412us; 2us; 32768us; 10us; 49us; 19us; 52us; 2us; 32768us; 9us; 48us; 19us; 52us; 0us; 16413us; 1us; 32768us; 19us; 52us; 2us; 32768us; 9us; 51us; 19us; 52us; 0us; 16414us; 1us; 16415us; 11us; 53us; 1us; 32768us; 19us; 54us; 0us; 16416us; 1us; 16417us; 19us; 52us; |] -let _fsyacc_actionTableRowOffsets = [|0us; 2us; 3us; 5us; 7us; 9us; 11us; 12us; 13us; 15us; 16us; 18us; 20us; 29us; 42us; 44us; 46us; 47us; 49us; 51us; 53us; 55us; 64us; 65us; 67us; 68us; 69us; 71us; 80us; 81us; 95us; 96us; 97us; 98us; 99us; 100us; 101us; 102us; 114us; 126us; 140us; 141us; 142us; 143us; 152us; 161us; 162us; 165us; 168us; 169us; 171us; 174us; 175us; 177us; 179us; 180us; |] -let _fsyacc_reductionSymbolCounts = [|1us; 5us; 1us; 0us; 0us; 2us; 4us; 3us; 1us; 6us; 0us; 2us; 0us; 1us; 3us; 1us; 2us; 1us; 1us; 1us; 1us; 1us; 1us; 2us; 2us; 2us; 2us; 3us; 3us; 3us; 4us; 1us; 3us; 2us; |] -let _fsyacc_productionToNonTerminalTable = [|0us; 1us; 2us; 2us; 3us; 3us; 4us; 5us; 5us; 6us; 7us; 7us; 8us; 8us; 9us; 9us; 10us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 12us; 12us; 12us; |] -let _fsyacc_immediateActions = [|65535us; 49152us; 65535us; 65535us; 65535us; 65535us; 16385us; 16386us; 65535us; 16389us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16391us; 65535us; 65535us; 65535us; 65535us; 65535us; 16393us; 65535us; 16395us; 16397us; 65535us; 65535us; 16398us; 65535us; 16400us; 16401us; 16402us; 16403us; 16404us; 16405us; 16406us; 65535us; 65535us; 65535us; 16408us; 16409us; 16410us; 65535us; 65535us; 16412us; 65535us; 65535us; 16413us; 65535us; 65535us; 16414us; 65535us; 65535us; 16416us; 65535us; |] -let _fsyacc_reductions () = [| -# 245 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Fslexast.Spec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( - raise (Internal.Utilities.Text.Parsing.Accept(Microsoft.FSharp.Core.Operators.box _1)) - ) - : '_startspec)); -# 254 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'codeopt)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'Macros)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'Rules)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'codeopt)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 23 "fslexpars.fsy" - { TopCode=_1;Macros=_2;Rules=_4;BottomCode=_5 } - ) -# 23 "fslexpars.fsy" - : Fslexast.Spec)); -# 268 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Fslexast.Code)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 24 "fslexpars.fsy" - _1 - ) -# 24 "fslexpars.fsy" - : 'codeopt)); -# 279 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 24 "fslexpars.fsy" - "", (parseState.ResultRange |> fst) - ) -# 24 "fslexpars.fsy" - : 'codeopt)); -# 289 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 25 "fslexpars.fsy" - [] - ) -# 25 "fslexpars.fsy" - : 'Macros)); -# 299 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'macro)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'Macros)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 25 "fslexpars.fsy" - _1 :: _2 - ) -# 25 "fslexpars.fsy" - : 'Macros)); -# 311 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 26 "fslexpars.fsy" - (_2, _4) - ) -# 26 "fslexpars.fsy" - : 'macro)); -# 323 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rule)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'Rules)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 27 "fslexpars.fsy" - _1 :: _3 - ) -# 27 "fslexpars.fsy" - : 'Rules)); -# 335 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rule)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 27 "fslexpars.fsy" - [_1] - ) -# 27 "fslexpars.fsy" - : 'Rules)); -# 346 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'args)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'optbar)) in - let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'clauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 28 "fslexpars.fsy" - (_1,_2,_6) - ) -# 28 "fslexpars.fsy" - : 'rule)); -# 360 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 29 "fslexpars.fsy" - [] - ) -# 29 "fslexpars.fsy" - : 'args)); -# 370 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'args)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 29 "fslexpars.fsy" - _1 :: _2 - ) -# 29 "fslexpars.fsy" - : 'args)); -# 382 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 30 "fslexpars.fsy" - - ) -# 30 "fslexpars.fsy" - : 'optbar)); -# 392 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 30 "fslexpars.fsy" - - ) -# 30 "fslexpars.fsy" - : 'optbar)); -# 402 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'clause)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'clauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 31 "fslexpars.fsy" - _1 :: _3 - ) -# 31 "fslexpars.fsy" - : 'clauses)); -# 414 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'clause)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 31 "fslexpars.fsy" - [_1] - ) -# 31 "fslexpars.fsy" - : 'clauses)); -# 425 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : Fslexast.Code)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 32 "fslexpars.fsy" - _1, _2 - ) -# 32 "fslexpars.fsy" - : 'clause)); -# 437 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 34 "fslexpars.fsy" - Inp(Alphabet(EncodeChar _1)) - ) -# 34 "fslexpars.fsy" - : 'regexp)); -# 448 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 35 "fslexpars.fsy" - Inp(UnicodeCategory _1) - ) -# 35 "fslexpars.fsy" - : 'regexp)); -# 459 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 36 "fslexpars.fsy" - Inp(Alphabet(Eof)) - ) -# 36 "fslexpars.fsy" - : 'regexp)); -# 469 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 37 "fslexpars.fsy" - Inp Any - ) -# 37 "fslexpars.fsy" - : 'regexp)); -# 479 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 38 "fslexpars.fsy" - Seq([ for n in 0 .. _1.Length - 1 -> Inp(Alphabet(EncodeChar _1.[n]))]) - ) -# 38 "fslexpars.fsy" - : 'regexp)); -# 490 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 39 "fslexpars.fsy" - Macro(_1) - ) -# 39 "fslexpars.fsy" - : 'regexp)); -# 501 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 40 "fslexpars.fsy" - Seq[_1;_2] - ) -# 40 "fslexpars.fsy" - : 'regexp)); -# 513 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 41 "fslexpars.fsy" - Seq[_1;Star _1] - ) -# 41 "fslexpars.fsy" - : 'regexp)); -# 524 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 42 "fslexpars.fsy" - Star _1 - ) -# 42 "fslexpars.fsy" - : 'regexp)); -# 535 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 43 "fslexpars.fsy" - Alt[Seq[];_1] - ) -# 43 "fslexpars.fsy" - : 'regexp)); -# 546 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 44 "fslexpars.fsy" - Alt[_1;_3] - ) -# 44 "fslexpars.fsy" - : 'regexp)); -# 558 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 45 "fslexpars.fsy" - _2 - ) -# 45 "fslexpars.fsy" - : 'regexp)); -# 569 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'charset)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 46 "fslexpars.fsy" - Alt [ for c in _2 -> Inp(Alphabet(c)) ] - ) -# 46 "fslexpars.fsy" - : 'regexp)); -# 580 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'charset)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 47 "fslexpars.fsy" - Inp(NotCharSet(_3)) - ) -# 47 "fslexpars.fsy" - : 'regexp)); -# 591 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 50 "fslexpars.fsy" - Set.singleton(EncodeChar _1) - ) -# 50 "fslexpars.fsy" - : 'charset)); -# 602 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 51 "fslexpars.fsy" - Set.of_seq [ for c in _1 .. _3 -> EncodeChar c ] - ) -# 51 "fslexpars.fsy" - : 'charset)); -# 614 "fslexpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'charset)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'charset)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 52 "fslexpars.fsy" - Set.union _1 _2 - ) -# 52 "fslexpars.fsy" - : 'charset)); -|] -# 627 "fslexpars.fs" -let tables () : Internal.Utilities.Text.Parsing.Tables<_> = - { reductions= _fsyacc_reductions (); - endOfInputTag = _fsyacc_endOfInputTag; - tagOfToken = tagOfToken; - dataOfToken = _fsyacc_dataOfToken; - actionTableElements = _fsyacc_actionTableElements; - actionTableRowOffsets = _fsyacc_actionTableRowOffsets; - stateToProdIdxsTableElements = _fsyacc_stateToProdIdxsTableElements; - stateToProdIdxsTableRowOffsets = _fsyacc_stateToProdIdxsTableRowOffsets; - reductionSymbolCounts = _fsyacc_reductionSymbolCounts; - immediateActions = _fsyacc_immediateActions; - gotos = _fsyacc_gotos; - sparseGotoTableRowOffsets = _fsyacc_sparseGotoTableRowOffsets; - tagOfErrorTerminal = _fsyacc_tagOfErrorTerminal; - parseError = (fun (ctxt:Internal.Utilities.Text.Parsing.ParseErrorContext<_>) -> - match parse_error_rich with - | Some f -> f ctxt - | None -> parse_error ctxt.Message); - numTerminals = 26; - productionToNonTerminalTable = _fsyacc_productionToNonTerminalTable } -let engine lexer lexbuf startState = (tables ()).Interpret(lexer, lexbuf, startState) -let spec lexer lexbuf : Fslexast.Spec = - Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, 0)) diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexpars.fsy b/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexpars.fsy deleted file mode 100644 index 940be639..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsLex/fslexpars.fsy +++ /dev/null @@ -1,54 +0,0 @@ -%{ -(* (c) Microsoft Corporation 2005-2008. *) - -open Fslexast - -%} - -%type spec -%token STRING IDENT -%token CODE -%token CHAR -%token UNICODE_CATEGORY -%token RULE PARSE LET AND LPAREN RPAREN -%token EOF BAR DOT PLUS STAR QMARK EQUALS UNDERSCORE LBRACK RBRACK HAT DASH -%start spec -%left BAR -%left regexp_alt -%left regexp_seq -%nonassoc regexp_opt -%nonassoc regexp_plus regexp_star -%% - -spec: codeopt Macros RULE Rules codeopt { { TopCode=$1;Macros=$2;Rules=$4;BottomCode=$5 } } -codeopt: CODE { $1 } | { "", (parseState.ResultRange |> fst) } -Macros: { [] } | macro Macros { $1 :: $2 } -macro: LET IDENT EQUALS regexp { ($2, $4) } -Rules: rule AND Rules { $1 :: $3 } | rule { [$1] } -rule: IDENT args EQUALS PARSE optbar clauses { ($1,$2,$6) } -args: { [] } | IDENT args { $1 :: $2 } -optbar: { } | BAR { } -clauses: clause BAR clauses {$1 :: $3 } | clause { [$1] } -clause: regexp CODE { $1, $2 } -regexp: -| CHAR { Inp(Alphabet(EncodeChar $1)) } -| UNICODE_CATEGORY { Inp(UnicodeCategory $1) } -| EOF { Inp(Alphabet(Eof)) } -| UNDERSCORE { Inp Any } -| STRING { Seq([ for n in 0 .. $1.Length - 1 -> Inp(Alphabet(EncodeChar $1.[n]))]) } -| IDENT { Macro($1) } -| regexp regexp %prec regexp_seq { Seq[$1;$2] } -| regexp PLUS %prec regexp_plus { Seq[$1;Star $1] } -| regexp STAR %prec regexp_star { Star $1 } -| regexp QMARK %prec regexp_opt { Alt[Seq[];$1] } -| regexp BAR regexp %prec regexp_alt { Alt[$1;$3] } -| LPAREN regexp RPAREN { $2 } -| LBRACK charset RBRACK { Alt [ for c in $2 -> Inp(Alphabet(c)) ] } -| LBRACK HAT charset RBRACK { Inp(NotCharSet($3)) } - -charset: - | CHAR { Set.singleton(EncodeChar $1) } - | CHAR DASH CHAR { Set.of_seq [ for c in $1 .. $3 -> EncodeChar c ] } - | charset charset { Set.union $1 $2 } - - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc-proto/FsYacc-proto.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/FsYacc-proto/FsYacc-proto.fsproj deleted file mode 100644 index b815fd60..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc-proto/FsYacc-proto.fsproj +++ /dev/null @@ -1,77 +0,0 @@ - - - - ..\.. - Proto - - - - - - x86 - {B3B408E1-A74E-4BF2-970E-C365AF4E192E} - Exe - FsYacc-proto - INTERNALIZED_POWER_PACK;BUILDING_PROTO;BUILDING_WITH_LKG;COMPILER;$(DefineConstants) - true - v2.0 - x86 - LKG - - - - --lexlib Internal.Utilities.Text.Lexing - - - --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - - - prim-lexing.fsi - - - prim-lexing.fs - - - prim-parsing.fsi - - - prim-parsing.fs - - - lexing.fsi - - - lexing.fs - - - arg.fsi - - - arg.fs - - - HashSet.fsi - - - HashSet.fs - - - fsyaccast.fs - - - - - fsyacc.fs - - - fsyacc-proto.exe.config - - - - - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/FsYacc.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/FsYacc.fsproj deleted file mode 100644 index cd5b4d6e..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/FsYacc.fsproj +++ /dev/null @@ -1,74 +0,0 @@ - - - ..\.. - - - - Debug - - x86 - {DDD90630-1CDA-4CB3-9A0A-6A1253478C2D} - Exe - FsYacc - INTERNALIZED_POWER_PACK;$(DefineConstants) - true - v2.0 - x86 - - - - --lexlib Internal.Utilities.Text.Lexing - - - --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - - - assemblyinfo.fsyacc.exe.fs - - - prim-lexing.fsi - - - prim-lexing.fs - - - prim-parsing.fsi - - - prim-parsing.fs - - - lexing.fsi - - - lexing.fs - - - arg.fsi - - - arg.fs - - - HashSet.fsi - - - HashSet.fs - - - - - - - - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/assemblyinfo.fsyacc.exe.fs b/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/assemblyinfo.fsyacc.exe.fs deleted file mode 100644 index cd9b068b..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/assemblyinfo.fsyacc.exe.fs +++ /dev/null @@ -1,9 +0,0 @@ -#light -namespace Microsoft.FSharp -open System.Reflection -[] -[] -[] -[] -[] -do() diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyacc.fs b/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyacc.fs deleted file mode 100644 index dc383852..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyacc.fs +++ /dev/null @@ -1,525 +0,0 @@ -(* (c) Microsoft Corporation 2005-2008. *) -#light - -open System.IO -open System.Collections.Generic -open Microsoft.FSharp.Text.Printf -open Internal.Utilities -open Internal.Utilities.Text.Lexing - -open Fsyaccast - -//------------------------------------------------------------------ -// This code is duplicated from Microsoft.FSharp.Compiler.UnicodeLexing - -type Lexbuf = LexBuffer - -/// Standard utility to create a Unicode LexBuffer -/// -/// One small annoyance is that LexBuffers and not IDisposable. This means -/// we can't just return the LexBuffer object, since the file it wraps wouldn't -/// get closed when we're finished with the LexBuffer. Hence we return the stream, -/// the reader and the LexBuffer. The caller should dispose the first two when done. -let UnicodeFileAsLexbuf (filename,codePage : int option) : FileStream * StreamReader * Lexbuf = - // Use the .NET functionality to auto-detect the unicode encoding - // It also uses Lexing.from_text_reader to present the bytes read to the lexer in UTF8 decoded form - let stream = new FileStream(filename,FileMode.Open,FileAccess.Read,FileShare.Read) - let reader = - match codePage with - | None -> new StreamReader(stream,true) - | Some n -> new StreamReader(stream,System.Text.Encoding.GetEncoding(n)) - let lexbuf = LexBuffer.FromFunction(reader.Read) - lexbuf.EndPos <- Position.FirstLine(filename); - stream, reader, lexbuf - -//------------------------------------------------------------------ -// This is the program proper - -let input = ref None -let modname= ref None -let opens= ref [] -let out = ref None -let tokenize = ref false -let compat = ref false -let log = ref false -let light = ref None -let inputCodePage = ref None -let mutable lexlib = "Microsoft.FSharp.Text.Lexing" -let mutable parslib = "Microsoft.FSharp.Text.Parsing" - -let usage = - [ "-o", Arg.String (fun s -> out := Some s), "Name the output file."; - "-v", Arg.Unit (fun () -> log := true), "Produce a listing file."; - "--module", Arg.String (fun s -> modname := Some s), "Define the F# module name to host the generated parser."; - "--open", Arg.String (fun s -> opens := !opens @ [s]), "Add the given module to the list of those to open in both the generated signature and implementation."; - "--light", Arg.Unit (fun () -> light := Some true), "Add #light to the top of the generated file (the default for .fs and .fsi output files)"; - "--light-off", Arg.Unit (fun () -> light := Some false), "Add #light \"off\" to the top of the generated file"; - "--ml-compatibility", Arg.Set compat, "Support the use of the global state from the 'Parsing' module in MLLib."; - "--tokens", Arg.Set tokenize, "Simply tokenize the specification file itself."; - "--lexlib", Arg.String (fun s -> lexlib <- s), "Specify the namespace for the implementation of the parser table interperter (default Microsoft.FSharp.Text.Parsing)"; - "--parslib", Arg.String (fun s -> parslib <- s), "Specify the namespace for the implementation of the parser table interperter (default Microsoft.FSharp.Text.Parsing)"; - "--codepage", Arg.Int (fun i -> inputCodePage := Some i), "Assume input lexer specification file is encoded with the given codepage."; ] - -let _ = Arg.parse usage (fun x -> match !input with Some _ -> failwith "more than one input given" | None -> input := Some x) "fsyacc " - -let output_int (os: #TextWriter) (n:int) = os.Write(string n) - -let outputCodedUInt16 (os: #TextWriter) (n:int) = - os.Write n; - os.Write "us; "; - -let shiftFlag = 0x0000 -let reduceFlag = 0x4000 -let errorFlag = 0x8000 -let acceptFlag = 0xc000 -let actionMask = 0xc000 - -let anyMarker = 0xffff - -let actionCoding action = - match action with - | Accept -> acceptFlag - | Shift n -> shiftFlag ||| n - | Reduce n -> reduceFlag ||| n - | Error -> errorFlag - -let main() = - let filename = (match !input with Some x -> x | None -> failwith "no input given") in - let spec = - let stream,reader,lexbuf = UnicodeFileAsLexbuf(filename, !inputCodePage) - use stream = stream - use reader = reader - - try - if !tokenize then begin - while true do - printf "tokenize - getting one token"; - let t = Fsyacclex.token lexbuf in - (*F# printf "tokenize - got %s" (Fsyaccpars.token_to_string t); F#*) - if t = Fsyaccpars.EOF then exit 0; - done; - end; - - Fsyaccpars.spec Fsyacclex.token lexbuf - with e -> - printf "%s(%d,%d): error: %s" filename lexbuf.StartPos.Line lexbuf.StartPos.Column e.Message; - exit 1 in - - let has_extension (s:string) = - (s.Length >= 1 && s.[s.Length - 1] = '.') - || Path.HasExtension(s) - - let chop_extension (s:string) = - if not (has_extension s) then invalidArg "s" "the file name does not have an extension" - Path.Combine (Path.GetDirectoryName s,Path.GetFileNameWithoutExtension(s)) - - let checkSuffix (x:string) (y:string) = x.EndsWith(y) - - let output = match !out with Some x -> x | _ -> chop_extension filename ^ (if checkSuffix filename ".mly" then ".ml" else ".fs") in - let outputi = match !out with Some x -> chop_extension x ^ (if checkSuffix x ".ml" then ".mli" else ".fsi") | _ -> chop_extension filename ^ (if checkSuffix filename ".mly" then ".mli" else ".fsi") in - let outputo = - if !log then Some (match !out with Some x -> chop_extension x ^ ".fsyacc.output" | _ -> chop_extension filename ^ ".fsyacc.output") - else None - - use os = (File.CreateText output :> TextWriter) - use osi = (File.CreateText outputi :> TextWriter) - - let lineCountOutput = ref 0 - let lineCountSignature = ref 0 - let cos = (os,lineCountOutput) - let cosi = (osi,lineCountSignature) - let cprintf (os:TextWriter,lineCount) fmt = Printf.twprintf os fmt - let cprintfn (os:TextWriter,lineCount) fmt = Printf.ktwprintf (fun () -> incr lineCount; os.WriteLine()) os fmt - - let logf = - match outputo with - | None -> (fun f -> ()) - | Some filename -> - let oso = (File.CreateText filename :> TextWriter) - (fun f -> f oso) - - logf (fun oso -> fprintfn oso "Output file describing compiled parser placed in %s and %s" output outputi); - - printfn "building tables"; - let spec1 = ProcessParserSpecAst spec - let (prods,states, startStates,actionTable,immediateActionTable,gotoTable,endOfInputTerminalIdx,errorTerminalIdx,nonTerminals) = - CompilerLalrParserSpec logf spec1 - - let (code,pos) = spec.Header - printfn "%d states" states.Length; - printfn "%d nonterminals" gotoTable.[0].Length; - printfn "%d terminals" actionTable.[0].Length; - printfn "%d productions" prods.Length; - printfn "#rows in action table: %d" actionTable.Length; -(* - printfn "#unique rows in action table: %d" (List.length (Array.fold_right (fun row acc -> insert (Array.to_list row) acc) actionTable [])); - printfn "maximum #different actions per state: %d" (Array.fold_right (fun row acc ->max (List.length (List.fold_right insert (Array.to_list row) [])) acc) actionTable 0); - printfn "average #different actions per state: %d" ((Array.fold_right (fun row acc -> (List.length (List.fold_right insert (Array.to_list row) [])) + acc) actionTable 0) / (Array.length states)); -*) - - cprintfn cos "// Implementation file for parser generated by fsyacc"; - cprintfn cosi "// Signature file for parser generated by fsyacc"; - - if (!light = Some(false)) || (!light = None && checkSuffix output ".ml") then - cprintfn cos "#light \"off\""; - cprintfn cosi "#light \"off\""; - else - cprintfn cos "#light"; - cprintfn cosi "#light"; - - match !modname with - | None -> () - | Some s -> - cprintfn cos "module %s" s; - cprintfn cosi "module %s" s; - - cprintfn cos "#nowarn \"64\";; // turn off warnings that type variables used in production annotations are instantiated to concrete type"; - - for s in !opens do - cprintfn cos "open %s" s; - cprintfn cosi "open %s" s; - - cprintfn cos "open %s" lexlib; - cprintfn cos "open %s.ParseHelpers" parslib; - if !compat then - cprintfn cos "open Microsoft.FSharp.Compatibility.OCaml.Parsing"; - - cprintfn cos "# %d \"%s\"" pos.pos_lnum pos.pos_fname; - cprintfn cos "%s" code; - lineCountOutput := !lineCountOutput + code.Replace("\r","").Split([| '\n' |]).Length; - - cprintfn cos "# %d \"%s\"" !lineCountOutput output; - // Print the datatype for the tokens - cprintfn cos "// This type is the type of tokens accepted by the parser"; - for out in [cos;cosi] do - cprintfn out "type token = "; - for id,typ in spec.Tokens do - match typ with - | None -> cprintfn out " | %s" id - | Some ty -> cprintfn out " | %s of (%s)" id ty; - - // Print the datatype for the token names - cprintfn cos "// This type is used to give symbolic names to token indexes, useful for error messages"; - for out in [cos;cosi] do - cprintfn out "type tokenId = "; - for id,typ in spec.Tokens do - cprintfn out " | TOKEN_%s" id; - cprintfn out " | TOKEN_end_of_input"; - cprintfn out " | TOKEN_error"; - - cprintfn cos "// This type is used to give symbolic names to token indexes, useful for error messages"; - for out in [cos;cosi] do - cprintfn out "type nonTerminalId = "; - for nt in nonTerminals do - cprintfn out " | NONTERM_%s" nt; - - cprintfn cos ""; - cprintfn cos "// This function maps tokens to integers indexes"; - cprintfn cos "let tagOfToken (t:token) = "; - cprintfn cos " match t with"; - spec.Tokens |> List.iteri (fun i (id,typ) -> - cprintfn cos " | %s %s -> %d " id (match typ with Some _ -> "_" | None -> "") i); - cprintfn cosi "/// This function maps integers indexes to symbolic token ids"; - cprintfn cosi "val tagOfToken: token -> int"; - - cprintfn cos ""; - cprintfn cos "// This function maps integers indexes to symbolic token ids"; - cprintfn cos "let tokenTagToTokenId (tokenIdx:int) = "; - cprintfn cos " match tokenIdx with"; - spec.Tokens |> List.iteri (fun i (id,typ) -> - cprintfn cos " | %d -> TOKEN_%s " i id) - cprintfn cos " | %d -> TOKEN_end_of_input" endOfInputTerminalIdx; - cprintfn cos " | %d -> TOKEN_error" errorTerminalIdx; - cprintfn cos " | _ -> failwith \"tokenTagToTokenId: bad token\"" - - cprintfn cosi ""; - cprintfn cosi "/// This function maps integers indexes to symbolic token ids"; - cprintfn cosi "val tokenTagToTokenId: int -> tokenId"; - - cprintfn cos ""; - cprintfn cos "/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production"; - cprintfn cos "let prodIdxToNonTerminal (prodIdx:int) = "; - cprintfn cos " match prodIdx with"; - prods |> Array.iteri (fun i (nt,ntIdx,syms,code) -> - cprintfn cos " | %d -> NONTERM_%s " i nt); - cprintfn cos " | _ -> failwith \"prodIdxToNonTerminal: bad production index\"" - - cprintfn cosi ""; - cprintfn cosi "/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production"; - cprintfn cosi "val prodIdxToNonTerminal: int -> nonTerminalId"; - - cprintfn cos ""; - cprintfn cos "let _fsyacc_endOfInputTag = %d " endOfInputTerminalIdx; - cprintfn cos "let _fsyacc_tagOfErrorTerminal = %d" errorTerminalIdx; - cprintfn cos ""; - cprintfn cos "// This function gets the name of a token as a string"; - cprintfn cos "let token_to_string (t:token) = "; - cprintfn cos " match t with "; - spec.Tokens |> List.iteri (fun i (id,typ) -> - cprintfn cos " | %s %s -> \"%s\" " id (match typ with Some _ -> "_" | None -> "") id); - - cprintfn cosi ""; - cprintfn cosi "/// This function gets the name of a token as a string"; - cprintfn cosi "val token_to_string: token -> string"; - - cprintfn cos ""; - cprintfn cos "// This function gets the data carried by a token as an object"; - cprintfn cos "let _fsyacc_dataOfToken (t:token) = "; - cprintfn cos " match t with "; - - for (id,typ) in spec.Tokens do - cprintfn cos " | %s %s -> %s " - id - (match typ with Some _ -> "_fsyacc_x" | None -> "") - (match typ with Some _ -> "Microsoft.FSharp.Core.Operators.box _fsyacc_x" | None -> "(null : System.Object)") - - let tychar = "'cty" - - for (key,_) in spec.Types |> Seq.countBy fst |> Seq.filter (fun (_,n) -> n > 1) do - failwithf "%s is given multiple %%type declarations" key; - - for (key,_) in spec.Tokens |> Seq.countBy fst |> Seq.filter (fun (_,n) -> n > 1) do - failwithf "%s is given %%token declarations" key - - let types = Map.of_list spec.Types - let tokens = Map.of_list spec.Tokens - - let nStates = states.Length - begin - cprintf cos "let _fsyacc_gotos = [| " ; - let numGotoNonTerminals = gotoTable.[0].Length - let gotoIndexes = Array.create numGotoNonTerminals 0 - let gotoTableCurrIndex = ref 0 in - for j = 0 to numGotoNonTerminals-1 do - gotoIndexes.[j] <- !gotoTableCurrIndex; - - (* Count the number of entries in the association table. *) - let count = ref 0 in - for i = 0 to nStates - 1 do - let goto = gotoTable.[i].[j] - match goto with - | None -> () - | Some _ -> incr count - - (* Write the head of the table (i.e. the number of entries and the default value) *) - gotoTableCurrIndex := !gotoTableCurrIndex + 1; - outputCodedUInt16 os !count; - outputCodedUInt16 os anyMarker; - - (* Write the pairs of entries in incremental order by key *) - (* This lets us implement the lookup by a binary chop. *) - for i = 0 to nStates - 1 do - let goto = gotoTable.[i].[j] - match goto with - | None -> () - | Some n -> - gotoTableCurrIndex := !gotoTableCurrIndex + 1; - outputCodedUInt16 os i; - outputCodedUInt16 os n; - cprintfn cos "|]" ; - (* Output offsets into gotos table where the gotos for a particular nonterminal begin *) - cprintf cos "let _fsyacc_sparseGotoTableRowOffsets = [|" ; - for j = 0 to numGotoNonTerminals-1 do - outputCodedUInt16 os gotoIndexes.[j]; - cprintfn cos "|]" ; - end; - - begin - cprintf cos "let _fsyacc_stateToProdIdxsTableElements = [| " ; - let indexes = Array.create states.Length 0 - let currIndex = ref 0 - for j = 0 to states.Length - 1 do - let state = states.[j] - indexes.[j] <- !currIndex; - - (* Write the head of the table (i.e. the number of entries) *) - outputCodedUInt16 os state.Length; - currIndex := !currIndex + state.Length + 1; - - (* Write the pairs of entries in incremental order by key *) - (* This lets us implement the lookup by a binary chop. *) - for prodIdx in state do - outputCodedUInt16 os prodIdx; - cprintfn cos "|]" ; - (* Output offsets into gotos table where the gotos for a particular nonterminal begin *) - cprintf cos "let _fsyacc_stateToProdIdxsTableRowOffsets = [|" ; - for idx in indexes do - outputCodedUInt16 os idx; - cprintfn cos "|]" ; - end; - - begin - let numActionRows = (Array.length actionTable) - let maxActionColumns = Array.length actionTable.[0] - cprintfn cos "let _fsyacc_action_rows = %d" numActionRows; - cprintf cos "let _fsyacc_actionTableElements = [|" ; - let actionIndexes = Array.create numActionRows 0 - - let actionTableCurrIndex = ref 0 - for i = 0 to nStates-1 do - actionIndexes.[i] <- !actionTableCurrIndex; - let actions = actionTable.[i] - let terminalsByAction = new Dictionary<_,int list>(10) - let countPerAction = new Dictionary<_,_>(10) - for terminal = 0 to actions.Length - 1 do - let action = snd actions.[terminal] - if terminalsByAction.ContainsKey action then - terminalsByAction.[action] <- terminal :: terminalsByAction.[action] ; - else - terminalsByAction.[action] <- [terminal]; - if countPerAction.ContainsKey action then - countPerAction.[action] <- countPerAction.[action]+1 - else - countPerAction.[action] <- 1 - - let mostCommonAction = - let mostCommon = ref Error - let max = ref 0 - for (KeyValue(x,y)) in countPerAction do - if y > !max then (mostCommon := x; max := y) - !mostCommon - - (* Count the number of entries in the association table. *) - let count = ref 0 - for (KeyValue(action,terminals)) in terminalsByAction do - for terminals in terminals do - if action <> mostCommonAction then - incr count; - - (* Write the head of the table (i.e. the number of entries and the default value) *) - actionTableCurrIndex := !actionTableCurrIndex + 1; - outputCodedUInt16 os !count; - outputCodedUInt16 os (actionCoding mostCommonAction); - - (* Write the pairs of entries in incremental order by key *) - (* This lets us implement the lookup by a binary chop. *) - for terminal = 0 to Array.length actions-1 do - let action = snd actions.[terminal] in - if action <> mostCommonAction then ( - actionTableCurrIndex := !actionTableCurrIndex + 1; - outputCodedUInt16 os terminal; - outputCodedUInt16 os (actionCoding action); - ); - cprintfn cos "|]" ; - (* Output offsets into actions table where the actions for a particular nonterminal begin *) - cprintf cos "let _fsyacc_actionTableRowOffsets = [|" ; - for j = 0 to numActionRows-1 do - cprintf cos "%a" outputCodedUInt16 actionIndexes.[j]; - cprintfn cos "|]" ; - - end; - begin - cprintf cos "let _fsyacc_reductionSymbolCounts = [|" ; - for nt,ntIdx,syms,code in prods do - cprintf cos "%a" outputCodedUInt16 (List.length syms); - cprintfn cos "|]" ; - end; - begin - cprintf cos "let _fsyacc_productionToNonTerminalTable = [|" ; - for nt,ntIdx,syms,code in prods do - cprintf cos "%a" outputCodedUInt16 ntIdx; - cprintfn cos "|]" ; - end; - begin - cprintf cos "let _fsyacc_immediateActions = [|" ; - for prodIdx in immediateActionTable do - match prodIdx with - | None -> cprintf cos "%a" outputCodedUInt16 anyMarker (* NONE REP *) - | Some act -> cprintf cos "%a" outputCodedUInt16 (actionCoding act) - cprintfn cos "|]" ; - end; - - let getType nt = if types.ContainsKey nt then types.[nt] else "'"^nt - begin - cprintf cos "let _fsyacc_reductions () =" ; - cprintfn cos " [| " ; - for nt,ntIdx,syms,code in prods do - cprintfn cos "# %d \"%s\"" !lineCountOutput output; - cprintfn cos " (fun (parseState : %s.IParseState) ->" parslib - if !compat then - cprintfn cos " Parsing.set_parse_state parseState;" - syms |> List.iteri (fun i sym -> - let tyopt = - match sym with - | Terminal t -> - if tokens.ContainsKey t then - tokens.[t] - else None - | NonTerminal nt -> Some (getType nt) - match tyopt with - | Some ty -> cprintfn cos " let _%d = (let data = parseState.GetInput(%d) in (Microsoft.FSharp.Core.Operators.unbox data : %s)) in" (i+1) (i+1) ty - | None -> ()) - cprintfn cos " Microsoft.FSharp.Core.Operators.box" - cprintfn cos " ("; - cprintfn cos " ("; - match code with - | Some (_,pos) -> cprintfn cos "# %d \"%s\"" pos.pos_lnum pos.pos_fname - | None -> () - match code with - | Some (code,_) -> - let dollar = ref false in - let c = code |> String.collect (fun c -> - if not !dollar && c = '$' then (dollar := true; "") - elif !dollar && c >= '0' && c <= '9' then (dollar := false; "_"^new System.String(c,1)) - elif !dollar then (dollar := false; "$"^new System.String(c,1)) - else new System.String(c,1)) - let lines = c.Split([| '\r'; '\n' |], System.StringSplitOptions.RemoveEmptyEntries); - for line in lines do - cprintfn cos " %s" line; - if !dollar then os.Write '$' - | None -> - cprintfn cos " raise (%s.Accept(Microsoft.FSharp.Core.Operators.box _1))" parslib - cprintfn cos " )"; - // Place the line count back for the type constraint - match code with - | Some (_,pos) -> cprintfn cos "# %d \"%s\"" pos.pos_lnum pos.pos_fname - | None -> () - cprintfn cos " : %s));" (if types.ContainsKey nt then types.[nt] else "'"^nt); - done; - cprintfn cos "|]" ; - end; - cprintfn cos "# %d \"%s\"" !lineCountOutput output; - cprintfn cos "let tables () : %s.Tables<_> = " parslib - cprintfn cos " { reductions= _fsyacc_reductions ();" - cprintfn cos " endOfInputTag = _fsyacc_endOfInputTag;" - cprintfn cos " tagOfToken = tagOfToken;" - cprintfn cos " dataOfToken = _fsyacc_dataOfToken; " - cprintfn cos " actionTableElements = _fsyacc_actionTableElements;" - cprintfn cos " actionTableRowOffsets = _fsyacc_actionTableRowOffsets;" - cprintfn cos " stateToProdIdxsTableElements = _fsyacc_stateToProdIdxsTableElements;" - cprintfn cos " stateToProdIdxsTableRowOffsets = _fsyacc_stateToProdIdxsTableRowOffsets;" - cprintfn cos " reductionSymbolCounts = _fsyacc_reductionSymbolCounts;" - cprintfn cos " immediateActions = _fsyacc_immediateActions;" - cprintfn cos " gotos = _fsyacc_gotos;" - cprintfn cos " sparseGotoTableRowOffsets = _fsyacc_sparseGotoTableRowOffsets;" - cprintfn cos " tagOfErrorTerminal = _fsyacc_tagOfErrorTerminal;" - cprintfn cos " parseError = (fun (ctxt:%s.ParseErrorContext<_>) -> " parslib - cprintfn cos " match parse_error_rich with " - cprintfn cos " | Some f -> f ctxt" - cprintfn cos " | None -> parse_error ctxt.Message);" - - cprintfn cos " numTerminals = %d;" (Array.length actionTable.[0]); - cprintfn cos " productionToNonTerminalTable = _fsyacc_productionToNonTerminalTable }" - cprintfn cos "let engine lexer lexbuf startState = (tables ()).Interpret(lexer, lexbuf, startState)" - - for (id,startState) in List.zip spec.StartSymbols startStates do - if not (types.ContainsKey id) then - failwith ("a %type declaration is required for for start token "^id); - let ty = types.[id] in - cprintfn cos "let %s lexer lexbuf : %s =" id ty; - cprintfn cos " Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, %d))" startState - - for id in spec.StartSymbols do - if not (types.ContainsKey id) then - failwith ("a %type declaration is required for start token "^id); - let ty = types.[id] in - cprintfn cosi "val %s : (%s.LexBuffer<%s> -> token) -> %s.LexBuffer<%s> -> (%s) " id lexlib tychar lexlib tychar ty; - - logf (fun oso -> oso.Close()) - -let _ = - try main() - with e -> - printf "Error: %s" (match e with Failure s -> s | e -> e.Message); - exit 1 - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyaccast.fs b/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyaccast.fs deleted file mode 100644 index 6b24c70f..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyaccast.fs +++ /dev/null @@ -1,963 +0,0 @@ -// (c) Microsoft Corporation 2005-2007. - -#light -#nowarn "62" // This construct is for compatibility with OCaml. - -open System -open System.Collections.Generic -open Microsoft.FSharp.Text.Printf -open Microsoft.FSharp.Collections -open Internal.Utilities -open Internal.Utilities.Text.Lexing - -/// An active pattern that should be in the F# standard library -let (|KeyValue|) (kvp:KeyValuePair<_,_>) = kvp.Key,kvp.Value - - -type Identifier = string -type Code = string * Position - -type ParserSpec= - { Header : Code; - Tokens : (Identifier * string option) list; - Types : (Identifier * string) list; - Associativities: (Identifier * Associativity) list list; - StartSymbols : Identifier list; - Rules : (Identifier * Rule list) list } - -and Rule = Rule of Identifier list * Identifier option * Code option -and Associativity = LeftAssoc | RightAssoc | NonAssoc - -type Terminal = string -type NonTerminal = string -type Symbol = Terminal of Terminal | NonTerminal of NonTerminal -type Symbols = Symbol list - - -//--------------------------------------------------------------------- -// Output Raw Parser Spec AST - -let StringOfSym sym = match sym with Terminal s -> "'" ^ s ^ "'" | NonTerminal s -> s - -let OutputSym os sym = fprintf os "%s" (StringOfSym sym) - -let OutputSyms os syms = - fprintf os "%s" (String.Join(" ",Array.map StringOfSym syms)) - -let OutputTerminalSet os tset = - fprintf os "%s" (String.Join(";", Array.of_seq(tset))) - -let OutputAssoc os p = - match p with - | LeftAssoc -> fprintf os "left" - | RightAssoc -> fprintf os "right" - | NonAssoc -> fprintf os "nonassoc" - - -//--------------------------------------------------------------------- -// PreProcess Raw Parser Spec AST - -type PrecedenceInfo = - | ExplicitPrec of Associativity * int - | NoPrecedence - -type Production = Production of NonTerminal * PrecedenceInfo * Symbols * Code option - -type ProcessedParserSpec = - { Terminals: (Terminal * PrecedenceInfo) list; - NonTerminals: NonTerminal list; - Productions: Production list; - StartSymbols: NonTerminal list } - - -let ProcessParserSpecAst (spec: ParserSpec) = - let explicitPrecInfo = - spec.Associativities - |> List.mapi (fun n precSpecs -> precSpecs |> List.map (fun (precSym, assoc) -> precSym,ExplicitPrec (assoc, 10000 - n))) - |> List.concat - - for (key,_) in explicitPrecInfo |> Seq.countBy fst |> Seq.filter (fun (_,n) -> n > 1) do - failwithf "%s is given two associativities" key - - let explicitPrecInfo = - explicitPrecInfo |> Map.of_list - - let implicitSymPrecInfo = NoPrecedence - let terminals = List.map fst spec.Tokens @ ["error"]in - let terminalSet = Set.of_list terminals - let IsTerminal z = terminalSet.Contains(z) - let prec_of_terminal sym implicitPrecInfo = - if explicitPrecInfo.ContainsKey(sym) then explicitPrecInfo.[sym] - else match implicitPrecInfo with Some x -> x | None -> implicitSymPrecInfo - - let mkSym s = if IsTerminal s then Terminal s else NonTerminal s - let prods = - spec.Rules |> List.mapi (fun i (nonterm,rules) -> - rules |> List.mapi (fun j (Rule(syms,precsym,code)) -> - let precInfo = - let precsym = List.fold_right (fun x acc -> match acc with Some _ -> acc | None -> match x with z when IsTerminal z -> Some z | _ -> acc) syms precsym - let implicitPrecInfo = NoPrecedence - match precsym with - | None -> implicitPrecInfo - | Some sym -> if explicitPrecInfo.ContainsKey(sym) then explicitPrecInfo.[sym] else implicitPrecInfo - Production(nonterm, precInfo, List.map mkSym syms, code))) - |> List.concat - let nonTerminals = List.map fst spec.Rules - let nonTerminalSet = Set.of_list nonTerminals - let checkNonTerminal nt = - if nt <> "error" && not (nonTerminalSet.Contains(nt)) then - failwith (sprintf "NonTerminal '%s' has no productions" nt) - - for (Production(nt,_,syms,_)) in prods do - for sym in syms do - match sym with - | NonTerminal nt -> - checkNonTerminal nt - | Terminal t -> - if not (IsTerminal t) then failwith (sprintf "token %s is not declared" t) - - if spec.StartSymbols= [] then (failwith "at least one %start declaration is required\n"); - - for (nt,_) in spec.Types do - checkNonTerminal nt; - - let terminals = terminals |> List.map (fun t -> (t,prec_of_terminal t None)) - - { Terminals=terminals; - NonTerminals=nonTerminals; - Productions=prods; - StartSymbols=spec.StartSymbols } - - -//------------------------------------------------- -// Process LALR(1) grammars to tables - -type ProductionIndex = int -type ProdictionDotIndex = int - -/// Represent (ProductionIndex,ProdictionDotIndex) as one integer -type Item0 = uint32 - -let mkItem0 (prodIdx,dotIdx) : Item0 = (uint32 prodIdx <<< 16) ||| uint32 dotIdx -let prodIdx_of_item0 (item0:Item0) = int32 (item0 >>> 16) -let dotIdx_of_item0 (item0:Item0) = int32 (item0 &&& 0xFFFFu) - -/// Part of the output of CompilerLalrParserSpec -type Action = - | Shift of int - | Reduce of ProductionIndex - | Accept - | Error - -let outputPrecInfo os p = - match p with - | ExplicitPrec (assoc,n) -> fprintf os "explicit %a %d" OutputAssoc assoc n - | NoPrecedence -> fprintf os "noprec" - - -/// LR(0) kernels -type Kernel = Set - -/// Indexes of LR(0) kernels in the KernelTable -type KernelIdx = int - -/// Indexes in the TerminalTable and NonTerminalTable -type TerminalIndex = int -type NonTerminalIndex = int - -/// Representation of Symbols. -/// Ideally would be declared as -/// type SymbolIndex = PTerminal of TerminalIndex | PNonTerminal of NonTerminalIndex -/// but for performance reasons we embed as a simple integer (saves ~10%) -/// -/// We use an active pattern to reverse the embedding. -type SymbolIndex = int -let PTerminal(i:TerminalIndex) : SymbolIndex = -i-1 -let PNonTerminal(i:NonTerminalIndex) : SymbolIndex = i -let (|PTerminal|PNonTerminal|) x = if x < 0 then PTerminal (-(x+1)) else PNonTerminal x - -type SymbolIndexes = SymbolIndex list - -/// Indexes in the LookaheadTable, SpontaneousTable, PropagateTable -/// Embed in a single integer, since these are faster -/// keys for the dictionary hash tables -/// -/// Logically: -/// -/// type KernelItemIndex = KernelItemIdx of KernelIdx * Item0 -type KernelItemIndex = int64 -let KernelItemIdx (i1,i2) = ((int64 i1) <<< 32) ||| int64 i2 - - -/// Indexes into the memoizing table for the Goto computations -/// Embed in a single integer, since these are faster -/// keys for the dictionary hash tables -/// -/// Logically: -/// -/// type GotoItemIndex = GotoItemIdx of KernelIdx * SymbolIndex -type GotoItemIndex = uint64 -let GotoItemIdx (i1:KernelIdx,i2:SymbolIndex) = (uint64 (uint32 i1) <<< 32) ||| uint64 (uint32 i2) -let (|GotoItemIdx|) (i64:uint64) = int32 ((i64 >>> 32) &&& 0xFFFFFFFFUL), int32 (i64 &&& 0xFFFFFFFFUL) - -/// Create a work list and loop until it is exhausted, calling a worker function for -/// each element. Pass a function to queue additional work on the work list -/// to the worker function -let ProcessWorkList start f = - let work = ref (start : 'a list) - let queueWork = (fun x -> work := x :: !work) - let rec loop() = - match !work with - | [] -> () - | x::t -> - work := t; - f queueWork x; - loop() - loop() - -/// A standard utility to compute a least fixed point of a set under a generative computation -let LeastFixedPoint f set = - let acc = ref set - ProcessWorkList (Set.to_list set) (fun queueWork item -> - f(item) |> List.iter (fun i2 -> if not (Set.contains i2 !acc) then (acc := Set.add i2 !acc; queueWork i2)) ) - !acc - -/// A general standard memoization utility. Be sure to apply to only one (function) argument to build the -/// residue function! -let Memoize f = - let t = new Dictionary<_,_>(1000) - fun x -> - let ok,v = t.TryGetValue(x) - if ok then v else let res = f x in t.[x] <- res; res - -/// A standard utility to create a dictionary from a list of pairs -let CreateDictionary xs = - let dict = new Dictionary<_,_>() - for x,y in xs do dict.Add(x,y) - dict - -/// Allocate indexes for each non-terminal -type NonTerminalTable(nonTerminals:NonTerminal list) = - let nonterminalsWithIdxs = List.mapi (fun (i:NonTerminalIndex) n -> (i,n)) nonTerminals - let nonterminalIdxs = List.map fst nonterminalsWithIdxs - let a = Array.of_list nonTerminals - let b = CreateDictionary [ for i,x in nonterminalsWithIdxs -> x,i ]; - member table.OfIndex(i) = a.[i] - member table.ToIndex(i) = b.[i] - member table.Indexes = nonterminalIdxs - -/// Allocate indexes for each terminal -type TerminalTable(terminals:(Terminal * PrecedenceInfo) list) = - let terminalsWithIdxs = List.mapi (fun i (t,_) -> (i,t)) terminals - let terminalIdxs = List.map fst terminalsWithIdxs - let a = Array.of_list (List.map fst terminals) - let b = Array.of_list (List.map snd terminals) - let c = CreateDictionary [ for i,x in terminalsWithIdxs -> x,i ] - - member table.OfIndex(i) = a.[i] - member table.PrecInfoOfIndex(i) = b.[i] - member table.ToIndex(i) = c.[i] - member table.Indexes = terminalIdxs - -/// Allocate indexes for each production -type ProductionTable(ntTab:NonTerminalTable, termTab:TerminalTable, nonTerminals:string list, prods: Production list) = - let prodsWithIdxs = List.mapi (fun i n -> (i,n)) prods - let a = - prodsWithIdxs - |> List.map(fun (_,Production(_,_,syms,_)) -> - syms - |> Array.of_list - |> Array.map (function - | Terminal t -> PTerminal (termTab.ToIndex t) - | NonTerminal nt -> PNonTerminal (ntTab.ToIndex nt )) ) - |> Array.of_list - let b = Array.of_list (List.map (fun (_,Production(nt,_,_,_)) -> ntTab.ToIndex nt) prodsWithIdxs) - let c = Array.of_list (List.map (fun (_,Production(_,prec,_,_)) -> prec) prodsWithIdxs) - let productions = - nonTerminals - |> List.map(fun nt -> (ntTab.ToIndex nt, List.choose (fun (i,Production(nt2,prec,syms,_)) -> if nt2=nt then Some i else None) prodsWithIdxs)) - |> CreateDictionary - - member prodTab.Symbols(i) = a.[i] - member prodTab.NonTerminal(i) = b.[i] - member prodTab.Precedence(i) = c.[i] - member prodTab.Symbol i n = - let syms = prodTab.Symbols i - if n >= syms.Length then None else Some (syms.[n]) - member prodTab.Productions = productions - -/// A mutable table maping kernels to sets of lookahead tokens -type LookaheadTable() = - let t = new Dictionary>() - member table.Add(x,y) = - let prev = if t.ContainsKey(x) then t.[x] else Set.empty - t.[x] <- prev.Add(y) - member table.Contains(x,y) = t.ContainsKey(x) && t.[x].Contains(y) - member table.GetLookaheads(idx:KernelItemIndex) = - let ok,v = t.TryGetValue(idx) - if ok then v else Set.empty - member table.Count = t |> Seq.fold(fun acc (KeyValue(_,v)) -> v.Count+acc) 0 - -/// A mutable table giving an index to each LR(0) kernel. Kernels are referred to only by index. -type KernelTable(kernels) = - // Give an index to each LR(0) kernel, and from now on refer to them only by index - // Also develop "kernelItemIdx" to refer to individual items within a kernel - let kernelsAndIdxs = List.mapi (fun i x -> (i,x)) kernels - let kernelIdxs = List.map fst kernelsAndIdxs - let toIdxMap = Map.of_list [ for i,x in kernelsAndIdxs -> x,i ] - let ofIdxMap = Array.of_list kernels - member t.Indexes = kernelIdxs - member t.Index(kernel) = toIdxMap.[kernel] - member t.Kernel(i) = ofIdxMap.[i] - -/// Hold the results of cpmuting the LALR(1) closure of an LR(0) kernel -type Closure1Table() = - let t = new Dictionary>() - member table.Add(a,b) = - if not (t.ContainsKey(a)) then t.[a] <- new HashSet<_>() - t.[a].Add(b) - member table.Count = t.Count - member table.IEnumerable = (t :> seq<_>) - member table.Contains(a,b) = t.ContainsKey(a) && t.[a].Contains(b) - -/// A mutable table giving a lookahead set Set for each kernel. The terminals represent the -/// "spontaneous" items for the kernel. TODO: document this more w.r.t. the Dragon book. -type SpontaneousTable() = - let t = new Dictionary>() - member table.Add(a,b) = - if not (t.ContainsKey(a)) then t.[a] <- new HashSet<_>() - t.[a].Add(b) - member table.Count = t.Count - member table.IEnumerable = (t :> seq<_>) - -/// A mutable table giving a Set for each kernel. The kernels represent the -/// "propagate" items for the kernel. TODO: document this more w.r.t. the Dragon book. -type PropagateTable() = - let t = new Dictionary>() - member table.Add(a,b) = - if not (t.ContainsKey(a)) then t.[a] <- new HashSet() - t.[a].Add(b) - member table.Item - with get(a) = - let ok,v = t.TryGetValue(a) - if ok then v :> seq<_> else Seq.empty - member table.Count = t.Count - - -/// Compile a pre-processed LALR parser spec to tables following the Dragon book algorithm -let CompilerLalrParserSpec logf (spec : ProcessedParserSpec) = - let stopWatch = new System.Diagnostics.Stopwatch() - let reportTime() = printfn "time: %A" stopWatch.Elapsed; stopWatch.Reset(); stopWatch.Start() - stopWatch.Start() - - // Augment the grammar - let fakeStartNonTerminals = spec.StartSymbols |> List.map(fun nt -> "_start"^nt) - let nonTerminals = fakeStartNonTerminals@spec.NonTerminals - let endOfInputTerminal = "$$" - let dummyLookahead = "#" - let dummyPrec = NoPrecedence - let terminals = spec.Terminals @ [(dummyLookahead,dummyPrec); (endOfInputTerminal,dummyPrec)] - let prods = List.map2 (fun a b -> Production(a, dummyPrec,[NonTerminal b],None)) fakeStartNonTerminals spec.StartSymbols @ spec.Productions - let startNonTerminalIdx_to_prodIdx (i:int) = i - - // Build indexed tables - let ntTab = NonTerminalTable(nonTerminals) - let termTab = TerminalTable(terminals) - let prodTab = ProductionTable(ntTab,termTab,nonTerminals,prods) - let dummyLookaheadIdx = termTab.ToIndex dummyLookahead - let endOfInputTerminalIdx = termTab.ToIndex endOfInputTerminal - - - // printf "terminalPrecInfo(ELSE) = %a\n" outputPrecInfo (termTab.PrecInfoOfIndex (termTab.ToIndex "ELSE")); - - let errorTerminalIdx = termTab.ToIndex "error" - - // Compute the FIRST function - printf "computing first function..."; stdout.Flush(); - - let computedFirstTable = - let seed = - Map.of_list - [ for term in termTab.Indexes do yield (PTerminal(term),Set.singleton (Some term)) - for nonTerm in ntTab.Indexes do - yield - (PNonTerminal nonTerm, - List.fold_right - (fun prodIdx acc -> match prodTab.Symbol prodIdx 0 with None -> Set.add None acc | Some _ -> acc) - prodTab.Productions.[nonTerm] - Set.empty) ] - - let add changed ss (x,y) = - let s = Map.find x ss - if Set.contains y s then ss - else (changed := true; Map.add x (Set.add y s) ss) - - let oneRound (ss:Map<_,_>) = - let changed = ref false - let frontier = - let res = ref [] - for nonTermX in ntTab.Indexes do - for prodIdx in prodTab.Productions.[nonTermX] do - let rhs = Array.to_list (prodTab.Symbols prodIdx) - let rec place l = - match l with - | (yi::t) -> - res := - List.choose - (function None -> None | Some a -> Some (PNonTerminal nonTermX,Some a)) - (Set.to_list ss.[yi]) - @ !res; - if ss.[yi].Contains(None) then place t; - | [] -> - res := (PNonTerminal nonTermX,None) :: !res - place rhs - !res - let ss' = List.fold (add changed) ss frontier - !changed, ss' - - let rec loop ss = - let changed, ss' = oneRound ss - if changed then loop ss' else ss' - loop seed - - - /// Compute the first set of the given sequence of non-terminals. If any of the non-terminals - /// have an empty token in the first set then we have to iterate through those. - let ComputeFirstSetOfTokenList = - Memoize (fun (str,term) -> - let acc = new System.Collections.Generic.List<_>() - let rec add l = - match l with - | [] -> acc.Add(term) - | sym::moreSyms -> - let firstSetOfSym = computedFirstTable.[sym] - firstSetOfSym |> Set.iter (function None -> () | Some v -> acc.Add(v)) - if firstSetOfSym.Contains(None) then add moreSyms - add str; - Set.of_seq acc) - - // (int,int) representation of LR(0) items - let prodIdx_to_item0 idx = mkItem0(idx,0) - let prec_of_item0 item0 = prodTab.Precedence (prodIdx_of_item0 item0) - let ntIdx_of_item0 item0 = prodTab.NonTerminal (prodIdx_of_item0 item0) - - let lsyms_of_item0 item0 = - let prodIdx = prodIdx_of_item0 item0 - let dotIdx = dotIdx_of_item0 item0 - let syms = prodTab.Symbols prodIdx - syms.[..dotIdx-1] - - let rsyms_of_item0 item0 = - let prodIdx = prodIdx_of_item0 item0 - let dotIdx = dotIdx_of_item0 item0 - let syms = prodTab.Symbols prodIdx - syms.[dotIdx..] - - let rsym_of_item0 item0 = - let prodIdx = prodIdx_of_item0 item0 - let dotIdx = dotIdx_of_item0 item0 - prodTab.Symbol prodIdx dotIdx - - let advance_of_item0 item0 = - let prodIdx = prodIdx_of_item0 item0 - let dotIdx = dotIdx_of_item0 item0 - mkItem0(prodIdx,dotIdx+1) - let fakeStartNonTerminalsSet = Set.of_list (fakeStartNonTerminals |> List.map ntTab.ToIndex) - - let IsStartItem item0 = fakeStartNonTerminalsSet.Contains(ntIdx_of_item0 item0) - let IsKernelItem item0 = (IsStartItem item0 || dotIdx_of_item0 item0 <> 0) - - let StringOfSym sym = match sym with PTerminal s -> "'" ^ termTab.OfIndex s ^ "'" | PNonTerminal s -> ntTab.OfIndex s - - let OutputSym os sym = fprintf os "%s" (StringOfSym sym) - - let OutputSyms os syms = - fprintf os "%s" (String.Join(" ",Array.map StringOfSym syms)) - - // Print items and other stuff - let OutputItem0 os item0 = - fprintf os " %s -> %a . %a" (ntTab.OfIndex (ntIdx_of_item0 item0)) (* outputPrecInfo precInfo *) OutputSyms (lsyms_of_item0 item0) OutputSyms (rsyms_of_item0 item0) - - let OutputItem0Set os s = - Set.iter (fun item -> fprintf os "%a\n" OutputItem0 item) s - - let OutputFirstSet os m = - Set.iter (function None -> fprintf os "" | Some x -> fprintf os " term %s\n" x) m - - let OutputFirstMap os m = - Map.iter (fun x y -> fprintf os "first '%a' = \n%a\n" OutputSym x OutputFirstSet y) m - - let OutputAction os m = - match m with - | Shift n -> fprintf os " shift %d" n - | Reduce prodIdx -> fprintf os " reduce %s --> %a" (ntTab.OfIndex (prodTab.NonTerminal prodIdx)) OutputSyms (prodTab.Symbols prodIdx) - | Error -> fprintf os " error" - | Accept -> fprintf os " accept" - - let OutputActions os m = - Array.iteri (fun i (prec,action) -> let term = termTab.OfIndex i in fprintf os " action '%s' (%a): %a\n" term outputPrecInfo prec OutputAction action) m - - let OutputActionTable os m = - Array.iteri (fun i n -> fprintf os "state %d:\n%a\n" i OutputActions n) m - - let OutputImmediateActions os m = - match m with - | None -> fprintf os "" - | Some a -> OutputAction os a - - let OutputGotos os m = - Array.iteri (fun ntIdx s -> let nonterm = ntTab.OfIndex ntIdx in match s with Some st -> fprintf os " goto %s: %d\n" nonterm st | None -> ()) m - - let OutputCombined os m = - Array.iteri (fun i (a,b,c,d) -> fprintf os "state %d:\n items:\n%a\n actions:\n%a\n immediate action: %a\n gotos:\n%a\n" i OutputItem0Set a OutputActions b OutputImmediateActions c OutputGotos d) m - - let OutputLalrTables os (prods,states, startStates,actionTable,immediateActionTable,gotoTable,endOfInputTerminalIdx,errorTerminalIdx) = - let combined = Array.of_list (List.map2 (fun x (y,(z,w)) -> x,y,z,w) (Array.to_list states) (List.zip (Array.to_list actionTable) (List.zip (Array.to_list immediateActionTable) (Array.to_list gotoTable)))) - fprintfn os "------------------------"; - fprintfn os "states = "; - fprintfn os "%a" OutputCombined combined; - fprintfn os "startStates = %s" (String.Join(";",Array.of_list (List.map string startStates))); - fprintfn os "------------------------" - - - // Closure of LR(0) nonTerminals, items etc - let ComputeClosure0NonTerminal = - Memoize (fun nt -> - let seed = (List.fold_right (prodIdx_to_item0 >> Set.add) prodTab.Productions.[nt] Set.empty) - LeastFixedPoint - (fun item0 -> - match rsym_of_item0 item0 with - | None -> [] - | Some(PNonTerminal ntB) -> List.map prodIdx_to_item0 prodTab.Productions.[ntB] - | Some(PTerminal _) -> []) - seed) - - // Close a symbol under epsilon moves - let ComputeClosure0Symbol rsym acc = - match rsym with - | Some (PNonTerminal nt) -> Set.union (ComputeClosure0NonTerminal nt) acc - | _ -> acc - - // Close a set under epsilon moves - let ComputeClosure0 iset = - Set.fold (fun acc x -> ComputeClosure0Symbol (rsym_of_item0 x) acc) iset iset - - // Right symbols after closing under epsilon moves - let RelevantSymbolsOfKernel kernel = - let kernelClosure0 = ComputeClosure0 kernel - Set.fold (fun acc x -> Option.fold (fun acc x -> Set.add x acc) acc (rsym_of_item0 x)) Set.empty kernelClosure0 - - // Goto set of a kernel of LR(0) nonTerminals, items etc - // Input is kernel, output is kernel - let ComputeGotosOfKernel iset sym = - let isetClosure = ComputeClosure0 iset - let acc = new System.Collections.Generic.List<_>(10) - isetClosure |> Set.iter (fun item0 -> - match rsym_of_item0 item0 with - | Some sym2 when sym = sym2 -> acc.Add(advance_of_item0 item0) - | _ -> ()) - Set.of_seq acc - - // Build the full set of LR(0) kernels - reportTime(); printf "building kernels..."; stdout.Flush(); - let startItems = List.mapi (fun i _ -> prodIdx_to_item0 (startNonTerminalIdx_to_prodIdx i)) fakeStartNonTerminals - let startKernels = List.map Set.singleton startItems - let kernels = - - /// We use a set-of-sets here. F# sets support structural comparison but at the time of writing - /// did not structural hashing. - let acc = ref Set.empty - ProcessWorkList startKernels (fun addToWorkList kernel -> - if not ((!acc).Contains(kernel)) then - acc := (!acc).Add(kernel); - for csym in RelevantSymbolsOfKernel kernel do - let gotoKernel = ComputeGotosOfKernel kernel csym - assert (gotoKernel.Count > 0) - addToWorkList gotoKernel ) - - !acc |> Seq.to_list |> List.map (Set.filter IsKernelItem) - - reportTime(); printf "building kernel table..."; stdout.Flush(); - // Give an index to each LR(0) kernel, and from now on refer to them only by index - let kernelTab = new KernelTable(kernels) - let startKernelIdxs = List.map kernelTab.Index startKernels - let startKernelItemIdxs = List.map2 (fun a b -> KernelItemIdx(a,b)) startKernelIdxs startItems - - let outputKernelItemIdx os (kernelIdx,item0) = - fprintf os "kernel %d, item %a" kernelIdx OutputItem0 item0 - - /// A cached version of the "goto" computation on LR(0) kernels - let gotoKernel = - Memoize (fun (GotoItemIdx(kernelIdx,sym)) -> - let gset = ComputeGotosOfKernel (kernelTab.Kernel kernelIdx) sym - if gset.IsEmpty then None else Some (kernelTab.Index gset)) - - /// Iterate (iset,sym) pairs such that (gotoKernel kernelIdx sym) is not empty - let IterateGotosOfKernel kernelIdx f = - for sym in RelevantSymbolsOfKernel (kernelTab.Kernel kernelIdx) do - match gotoKernel (GotoItemIdx(kernelIdx,sym)) with - | None -> () - | Some k -> f sym k - - - // This is used to compute the closure of an LALR(1) kernel - // - // For each item [A --> X.BY, a] in I - // For each production B -> g in G' - // For each terminal b in FIRST(Ya) - // such that [B --> .g, b] is not in I do - // add [B --> .g, b] to I - - let ComputeClosure1 iset = - let acc = new Closure1Table() - ProcessWorkList iset (fun addToWorkList (item0,pretokens:Set) -> - pretokens |> Set.iter (fun pretoken -> - if not (acc.Contains(item0,pretoken)) then - acc.Add(item0,pretoken) - let rsyms = rsyms_of_item0 item0 - if rsyms.Length > 0 then - match rsyms.[0] with - | (PNonTerminal ntB) -> - let firstSet = ComputeFirstSetOfTokenList (Array.to_list rsyms.[1..],pretoken) - for prodIdx in prodTab.Productions.[ntB] do - addToWorkList (prodIdx_to_item0 prodIdx,firstSet) - | PTerminal _ -> ())) - acc - - // Compute the "spontaneous" and "propagate" maps for each LR(0) kernelItem - // - // Input: The kernal K of a set of LR(0) items I and a grammar symbol X - // - // Output: The lookaheads generated spontaneously by items in I for kernel items - // in goto(I,X) and the items I from which lookaheads are propagated to kernel - // items in goto(I,X) - // - // Method - // 1. Construct LR(0) kernel items (done - above) - // 2. - // TODO: this is very, very slow. - // - // PLAN TO OPTIMIZE THIS; - // - Clarify and comment what's going on here - // - verify if we really have to do these enormouos closure computations - // - assess if it's possible to use the symbol we're looking for to help trim the jset - - reportTime(); printf "computing lookahead relations..."; stdout.Flush(); - - - let spontaneous, propagate = - let closure1OfItem0WithDummy = - Memoize (fun item0 -> ComputeClosure1 [(item0,Set.of_list [dummyLookaheadIdx])]) - - let spontaneous = new SpontaneousTable() - let propagate = new PropagateTable() - let count = ref 0 - - for kernelIdx in kernelTab.Indexes do - printf "."; stdout.Flush(); - //printf "kernelIdx = %d\n" kernelIdx; stdout.Flush(); - let kernel = kernelTab.Kernel(kernelIdx) - for item0 in kernel do - let item0Idx = KernelItemIdx(kernelIdx,item0) - let jset = closure1OfItem0WithDummy item0 - //printf "#jset = %d\n" jset.Count; stdout.Flush(); - for (KeyValue(closureItem0, lookaheadTokens)) in jset.IEnumerable do - incr count - match rsym_of_item0 closureItem0 with - | None -> () - | Some rsym -> - match gotoKernel (GotoItemIdx(kernelIdx,rsym)) with - | None -> () - | Some gotoKernelIdx -> - let gotoItem = advance_of_item0 closureItem0 - let gotoItemIdx = KernelItemIdx(gotoKernelIdx,gotoItem) - for lookaheadToken in lookaheadTokens do - if lookaheadToken = dummyLookaheadIdx - then propagate.Add(item0Idx, gotoItemIdx) - else spontaneous.Add(gotoItemIdx, lookaheadToken) - - - //printfn "#kernelIdxs = %d, count = %d" kernelTab.Indexes.Length !count - spontaneous, - propagate - - //printfn "#spontaneous = %d, #propagate = %d" spontaneous.Count propagate.Count; stdout.Flush(); - - //exit 0; - // Repeatedly use the "spontaneous" and "propagate" maps to build the full set - // of lookaheads for each LR(0) kernelItem. - reportTime(); printf "building lookahead table..."; stdout.Flush(); - let lookaheadTable = - - // Seed the table with the startKernelItems and the spontaneous info - let initialWork = - [ for idx in startKernelItemIdxs do - yield (idx,endOfInputTerminalIdx) - for (KeyValue(kernelItemIdx,lookaheads)) in spontaneous.IEnumerable do - for lookahead in lookaheads do - yield (kernelItemIdx,lookahead) ] - - let acc = new LookaheadTable() - // Compute the closure - ProcessWorkList - initialWork - (fun queueWork (kernelItemIdx,lookahead) -> - acc.Add(kernelItemIdx,lookahead) - for gotoKernelIdx in propagate.[kernelItemIdx] do - if not (acc.Contains(gotoKernelIdx,lookahead)) then - queueWork(gotoKernelIdx,lookahead)) - acc - - //printf "built lookahead table, #lookaheads = %d\n" lookaheadTable.Count; stdout.Flush(); - - reportTime(); printf "building action table..."; stdout.Flush(); - let shiftReduceConflicts = ref 0 - let reduceReduceConflicts = ref 0 - let actionTable, immediateActionTable = - - // Now build the action tables. First a utility to merge the given action - // into the table, taking into account precedences etc. and reporting errors. - let addResolvingPrecedence (arr: _[]) kernelIdx termIdx (precNew, actionNew) = - // printf "DEBUG: state %d: adding action for %s, precNew = %a, actionNew = %a\n" kernelIdx (termTab.OfIndex termIdx) outputPrec precNew OutputAction actionNew; - // We add in order of precedence - however the precedences may be the same, and we give warnings when rpecedence resolution is based on implicit file orderings - - let (precSoFar, actionSoFar) as itemSoFar = arr.[termIdx] - - // printf "DEBUG: state %d: adding action for %s, precNew = %a, precSoFar = %a, actionSoFar = %a\n" kernelIdx (termTab.OfIndex termIdx) outputPrec precNew outputPrec precSoFar OutputAction actionSoFar; - // if compare_prec precSoFar precNew = -1 then failwith "addResolvingPrecedence"; - - let itemNew = (precNew, actionNew) - let winner = - match itemSoFar,itemNew with - | (_,Shift _),(_, Shift _) -> - if actionSoFar <> actionNew then - printf "internal error in fsyacc: shift/shift conflict"; - itemSoFar - - | (((precShift,Shift _) as shiftItem), - ((precReduce,Reduce _) as reduceItem)) - | (((precReduce,Reduce _) as reduceItem), - ((precShift,Shift _) as shiftItem)) -> - match precReduce, precShift with - | (ExplicitPrec (_,p1), ExplicitPrec(assocNew,p2)) -> - if p1 < p2 then shiftItem - elif p1 > p2 then reduceItem - else - match precShift with - | ExplicitPrec(LeftAssoc,_) -> reduceItem - | ExplicitPrec(RightAssoc,_) -> shiftItem - | _ -> - printf "state %d: shift/reduce error on %s\n" kernelIdx (termTab.OfIndex termIdx); - incr shiftReduceConflicts; - shiftItem - | _ -> - printf "state %d: shift/reduce error on %s\n" kernelIdx (termTab.OfIndex termIdx); - incr shiftReduceConflicts; - shiftItem - | ((_,Reduce prodIdx1),(_, Reduce prodIdx2)) -> - printf "state %d: reduce/reduce error on %s\n" kernelIdx (termTab.OfIndex termIdx); - incr reduceReduceConflicts; - if prodIdx1 < prodIdx2 then itemSoFar else itemNew - | _ -> itemNew - arr.[termIdx] <- winner - - - // This build the action table for one state. - let ComputeActions kernelIdx = - let kernel = kernelTab.Kernel kernelIdx - let arr = Array.create terminals.Length (NoPrecedence,Error) - - //printf "building lookahead table LR(1) items for kernelIdx %d\n" kernelIdx; stdout.Flush(); - - // Compute the LR(1) items based on lookaheads - let items = - [ for item0 in kernel do - let kernelItemIdx = KernelItemIdx(kernelIdx,item0) - let lookaheads = lookaheadTable.GetLookaheads(kernelItemIdx) - yield (item0,lookaheads) ] - |> ComputeClosure1 - - for (KeyValue(item0,lookaheads)) in items.IEnumerable do - - let nonTermA = ntIdx_of_item0 item0 - match rsym_of_item0 item0 with - | Some (PTerminal termIdx) -> - let action = - match gotoKernel (GotoItemIdx(kernelIdx,PTerminal termIdx)) with - | None -> failwith "action on terminal should have found a non-empty goto state" - | Some gkernelItemIdx -> Shift gkernelItemIdx - let prec = termTab.PrecInfoOfIndex termIdx - addResolvingPrecedence arr kernelIdx termIdx (prec, action) - | None -> - for lookahead in lookaheads do - if not (IsStartItem(item0)) then - let prodIdx = prodIdx_of_item0 item0 - let prec = prec_of_item0 item0 - let action = (prec, Reduce prodIdx) - addResolvingPrecedence arr kernelIdx lookahead action - elif lookahead = endOfInputTerminalIdx then - let prec = prec_of_item0 item0 - let action = (prec,Accept) - addResolvingPrecedence arr kernelIdx lookahead action - else () - | _ -> () - - // If there is a single item A -> B C . and no Shift or Accept actions (i.e. only Error or Reduce, so the choice of terminal - // cannot affect what we do) then we emit an immediate reduce action for the rule corresponding to that item - // Also do the same for Accept rules. - let closure = (ComputeClosure0 kernel) - - let immediateAction = - match Set.to_list closure with - | [item0] -> - match (rsym_of_item0 item0) with - | None when (let reduceOrErrorAction = function Error | Reduce _ -> true | Shift _ | Accept -> false - termTab.Indexes |> List.for_all(fun terminalIdx -> reduceOrErrorAction (snd(arr.[terminalIdx])))) - -> Some (Reduce (prodIdx_of_item0 item0)) - - | None when (let acceptOrErrorAction = function Error | Accept -> true | Shift _ | Reduce _ -> false - List.for_all (fun terminalIdx -> acceptOrErrorAction (snd(arr.[terminalIdx]))) termTab.Indexes) - -> Some Accept - - | _ -> None - | _ -> None - - // A -> B C . rules give rise to reductions in favour of errors - for item0 in ComputeClosure0 kernel do - let prec = prec_of_item0 item0 - match rsym_of_item0 item0 with - | None -> - for terminalIdx in termTab.Indexes do - if snd(arr.[terminalIdx]) = Error then - let prodIdx = prodIdx_of_item0 item0 - let action = (prec, (if IsStartItem(item0) then Accept else Reduce prodIdx)) - addResolvingPrecedence arr kernelIdx terminalIdx action - | _ -> () - - arr,immediateAction - - let actionInfo = List.map ComputeActions kernelTab.Indexes - Array.of_list (List.map fst actionInfo), - Array.of_list (List.map snd actionInfo) - - // The goto table is much simpler - it is based on LR(0) kernels alone. - - reportTime(); printf "building goto table..."; stdout.Flush(); - let gotoTable = - let gotos kernelIdx = Array.of_list (List.map (fun nt -> gotoKernel (GotoItemIdx(kernelIdx,PNonTerminal nt))) ntTab.Indexes) - Array.of_list (List.map gotos kernelTab.Indexes) - - reportTime(); printfn "returning tables."; stdout.Flush(); - if !shiftReduceConflicts > 0 then printfn "%d shift/reduce conflicts" !shiftReduceConflicts; stdout.Flush(); - if !reduceReduceConflicts > 0 then printfn "%d reduce/reduce conflicts" !reduceReduceConflicts; stdout.Flush(); - - /// The final results - let states = kernels |> Array.of_list - let prods = Array.of_list (List.map (fun (Production(nt,prec,syms,code)) -> (nt, ntTab.ToIndex nt, syms,code)) prods) - - logf (fun logStream -> - printf "writing tables to log\n"; stdout.Flush(); - OutputLalrTables logStream (prods, states, startKernelIdxs, actionTable, immediateActionTable, gotoTable, (termTab.ToIndex endOfInputTerminal), errorTerminalIdx)); - - let states = states |> Array.map (Set.to_list >> List.map prodIdx_of_item0) - (prods, states, startKernelIdxs, - actionTable, immediateActionTable, gotoTable, - (termTab.ToIndex endOfInputTerminal), - errorTerminalIdx, nonTerminals) - - -(* Some examples for testing *) - -(* - -let example1 = - let e = "E" - let t = "Terminal" - let plus = "+" - let mul = "*" - let f = "F" - let lparen = "(" - let rparen = ")" - let id = "id" - - let terminals = [plus; mul; lparen; rparen; id] - let nonTerminals = [e; t; f] - - let p2 = e, (NonAssoc, ExplicitPrec 1), [NonTerminal e; Terminal plus; NonTerminal t], None - let p3 = e, (NonAssoc, ExplicitPrec 2), [NonTerminal t], None in - let p4 = t, (NonAssoc, ExplicitPrec 3), [NonTerminal t; Terminal mul; NonTerminal f], None - let p5 = t, (NonAssoc, ExplicitPrec 4), [NonTerminal f], None - let p6 = f, (NonAssoc, ExplicitPrec 5), [Terminal lparen; NonTerminal e; Terminal rparen], None - let p7 = f, (NonAssoc, ExplicitPrec 6), [Terminal id], None - - let prods = [p2;p3;p4;p5;p6;p7] - Spec(terminals,nonTerminals,prods, [e]) - -let example2 = - let prods = [ "S", (NonAssoc, ExplicitPrec 1), [NonTerminal "C";NonTerminal "C"], None; - "C", (NonAssoc, ExplicitPrec 2), [Terminal "c";NonTerminal "C"], None ; - "C", (NonAssoc, ExplicitPrec 3), [Terminal "d"] , None ]in - Spec(["c";"d"],["S";"C"],prods, ["S"]) - -let example3 = - let terminals = ["+"; "*"; "("; ")"; "id"] - let nonTerminals = ["E"; "Terminal"; "E'"; "F"; "Terminal'"] - let prods = [ "E", (NonAssoc, ExplicitPrec 1), [ NonTerminal "Terminal"; NonTerminal "E'" ], None; - "E'", (NonAssoc, ExplicitPrec 2), [ Terminal "+"; NonTerminal "Terminal"; NonTerminal "E'"], None; - "E'", (NonAssoc, ExplicitPrec 3), [ ], None; - "Terminal", (NonAssoc, ExplicitPrec 4), [ NonTerminal "F"; NonTerminal "Terminal'" ], None; - "Terminal'", (NonAssoc, ExplicitPrec 5), [ Terminal "*"; NonTerminal "F"; NonTerminal "Terminal'"], None; - "Terminal'", (NonAssoc, ExplicitPrec 6), [ ], None; - "F", (NonAssoc, ExplicitPrec 7), [ Terminal "("; NonTerminal "E"; Terminal ")"], None; - "F", (NonAssoc, ExplicitPrec 8), [ Terminal "id"], None ] - Spec(terminals,nonTerminals,prods, ["E"]) - -let example4 = - let terminals = ["+"; "*"; "("; ")"; "id"] - let nonTerminals = ["E"] - let prods = [ "E", (NonAssoc, ExplicitPrec 1), [ NonTerminal "E"; Terminal "+"; NonTerminal "E" ], None; - "E", (NonAssoc, ExplicitPrec 2), [ NonTerminal "E"; Terminal "*"; NonTerminal "E" ], None; - "E", (NonAssoc, ExplicitPrec 3), [ Terminal "("; NonTerminal "E"; Terminal ")"], None; - "E", (NonAssoc, ExplicitPrec 8), [ Terminal "id"], None ] - Spec(terminals,nonTerminals,prods, ["E"]) - -let example5 = - let terminals = ["+"; "*"; "("; ")"; "id"] - let nonTerminals = ["E"] - let prods = [ "E", (NonAssoc, ExplicitPrec 1), [ NonTerminal "E"; Terminal "+"; NonTerminal "E" ], None; - "E", (NonAssoc, ExplicitPrec 2), [ NonTerminal "E"; Terminal "*"; NonTerminal "E" ], None; - "E", (NonAssoc, ExplicitPrec 3), [ Terminal "("; NonTerminal "E"; Terminal ")"], None; - "E", (NonAssoc, ExplicitPrec 8), [ Terminal "id"], None ] - Spec(terminals,nonTerminals,prods, ["E"]) - -let example6 = - let terminals = ["+"; "*"; "("; ")"; "id"; "-"] - let nonTerminals = ["E"] - let prods = [ "E", (RightAssoc, ExplicitPrec 1), [ NonTerminal "E"; Terminal "-"; NonTerminal "E" ], None; - "E", (LeftAssoc, ExplicitPrec 1), [ NonTerminal "E"; Terminal "+"; NonTerminal "E" ], None; - "E", (LeftAssoc, ExplicitPrec 2), [ NonTerminal "E"; Terminal "*"; NonTerminal "E" ], None; - "E", (NonAssoc, ExplicitPrec 3), [ Terminal "("; NonTerminal "E"; Terminal ")"], None; - "E", (NonAssoc, ExplicitPrec 8), [ Terminal "id"], None ] - Spec(terminals,nonTerminals,prods, ["E"]) - - -let example7 = - let prods = [ "S", (NonAssoc, ExplicitPrec 1), [NonTerminal "L";Terminal "="; NonTerminal "R"], None; - "S", (NonAssoc, ExplicitPrec 2), [NonTerminal "R"], None ; - "L", (NonAssoc, ExplicitPrec 3), [Terminal "*"; NonTerminal "R"], None; - "L", (NonAssoc, ExplicitPrec 3), [Terminal "id"], None; - "R", (NonAssoc, ExplicitPrec 3), [NonTerminal "L"], None; ] - Spec(["*";"=";"id"],["S";"L";"R"],prods, ["S"]) - - - -let test ex = CompilerLalrParserSpec stdout ex - -(* let _ = test example2*) -(* let _ = exit 1*) -(* let _ = test example3 -let _ = test example1 -let _ = test example4 -let _ = test example5 -let _ = test example6 *) -*) diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyacclex.fs b/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyacclex.fs deleted file mode 100644 index 75fc0741..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyacclex.fs +++ /dev/null @@ -1,611 +0,0 @@ -#light -# 1 "fsyacclex.fsl" - -(* (c) Microsoft Corporation 2005-2008. *) - -open Fsyaccast -open Fsyaccpars -open System.Text -open Internal.Utilities.Text.Lexing - -let lexeme (lexbuf : LexBuffer) = new System.String(lexbuf.Lexeme) -let newline (lexbuf:LexBuffer<_>) = lexbuf.EndPos <- lexbuf.EndPos.NextLine - -let unexpected_char lexbuf = - failwith ("Unexpected character '"^(lexeme lexbuf)^"'") - -let gettype (s:string) = - if s.Contains("<") then - let n = s.IndexOf("<")in - let m = s.IndexOf(">")in - Some s.[n+1 .. m-1] - else None - - -# 25 "fsyacclex.fs" -let trans : uint16[] array = - [| - (* State 0 *) - [| 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 2us; 6us; 6us; 3us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 7us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 4us; 6us; 6us; 6us; 6us; 1us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 5us; |]; - (* State 1 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 11us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 2 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 3 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 10us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 4 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 9us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 5 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 6 *) - [| 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; |]; - (* State 7 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 8 *) - [| 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; |]; - (* State 9 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 10 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 11 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 12 *) - [| 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 17us; 15us; 19us; 19us; 16us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 17us; 19us; 14us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 19us; 13us; 19us; 19us; 19us; 19us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 18us; |]; - (* State 13 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 22us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 22us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 14 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 15 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 16 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 21us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 17 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 18 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 19 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 20 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 21 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 22 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 23 *) - [| 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 30us; 26us; 33us; 33us; 27us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 30us; 33us; 29us; 33us; 33us; 33us; 33us; 28us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 31us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 33us; 33us; 33us; 33us; 33us; 33us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 25us; 33us; 24us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 32us; |]; - (* State 24 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 25 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 26 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 27 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 28 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 37us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 38us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 29 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 30 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 31 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 34us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 32 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 33 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 34 *) - [| 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 65535us; 35us; 35us; 65535us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 65535us; |]; - (* State 35 *) - [| 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 65535us; 35us; 35us; 65535us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 65535us; |]; - (* State 36 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 37 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 40us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 38 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 39us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 39 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 40us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 40 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 41 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 42 *) - [| 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 46us; 44us; 51us; 51us; 45us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 46us; 51us; 49us; 51us; 51us; 43us; 51us; 48us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 47us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 51us; 51us; 51us; 51us; 51us; 51us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 50us; |]; - (* State 43 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 60us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 44 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 45 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 59us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 46 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 47 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 48 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 53us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 49 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 50 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 51 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 52 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 53 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 54us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 54 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 55 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 56 *) - [| 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 65535us; 57us; 57us; 65535us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 65535us; |]; - (* State 57 *) - [| 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 65535us; 57us; 57us; 65535us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 65535us; |]; - (* State 58 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 59 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 60 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 61 *) - [| 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 68us; 69us; 75us; 75us; 70us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 68us; 75us; 75us; 75us; 75us; 62us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 73us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 74us; 66us; 64us; 75us; 65us; 75us; 75us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 75us; 75us; 75us; 75us; 75us; 75us; 71us; 71us; 71us; 71us; 63us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 71us; 67us; 72us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 76us; |]; - (* State 62 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 88us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 94us; 65535us; 91us; 65535us; 93us; 90us; 89us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 87us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 63 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 83us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 64 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 65 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 66 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 67 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 68 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 82us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 82us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 69 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 70 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 81us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 71 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 72 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 73 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 77us; 65535us; 65535us; 65535us; 65535us; 78us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 74 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 75 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 76 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 77 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 78 *) - [| 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 79us; 79us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; |]; - (* State 79 *) - [| 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; 79us; 79us; 65535us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 65535us; |]; - (* State 80 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 81 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 82 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 82us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 82us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 83 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 84us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 84 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 85us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 85 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 86us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 86 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 80us; 65535us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 80us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 87 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 88 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 89 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 116us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 117us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 90 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 112us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 91 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 109us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 92 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 93 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 102us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 94 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 95us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 95 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 96us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 96 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 97us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 97 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 98us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 98 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 99us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 99 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 100us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 100 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 101us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 101 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 102 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 103us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 103 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 104us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 104 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 105us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 105 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 106 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 107us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 107 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 108us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 108 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 109 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 110 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 111us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 111 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 112 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 113us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 113 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 114us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 114 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 115 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 116 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 117 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 118us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 118 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 119us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 119 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 120 *) - [| 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 65535us; 122us; 122us; 65535us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 65535us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 65535us; |]; - (* State 121 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 122 *) - [| 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 65535us; 124us; 124us; 65535us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 123us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 65535us; |]; - (* State 123 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 124 *) - [| 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 65535us; 124us; 124us; 65535us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 123us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 124us; 65535us; |]; - (* State 125 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 126us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 126 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 127us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 127 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 129us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 129us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 128 *) - [| 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 65535us; 130us; 130us; 65535us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 65535us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 130us; 65535us; |]; - (* State 129 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 129us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 129us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 130 *) - [| 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 65535us; 132us; 132us; 65535us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 131us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 65535us; |]; - (* State 131 *) - [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |]; - (* State 132 *) - [| 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 65535us; 132us; 132us; 65535us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 131us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 132us; 65535us; |]; - |] -let actions : uint16[] = [|65535us; 5us; 1us; 5us; 5us; 3us; 4us; 5us; 4us; 2us; 1us; 0us; 65535us; 5us; 1us; 2us; 5us; 3us; 4us; 5us; 3us; 2us; 0us; 65535us; 0us; 1us; 2us; 8us; 8us; 4us; 5us; 8us; 7us; 8us; 6us; 6us; 5us; 65535us; 65535us; 65535us; 3us; 2us; 65535us; 7us; 1us; 7us; 2us; 7us; 7us; 5us; 6us; 7us; 65535us; 65535us; 65535us; 4us; 3us; 3us; 2us; 1us; 0us; 65535us; 21us; 16us; 10us; 11us; 12us; 13us; 14us; 15us; 21us; 16us; 17us; 21us; 20us; 21us; 22us; 18us; 19us; 19us; 16us; 15us; 14us; 16us; 16us; 16us; 9us; 0us; 1us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 8us; 65535us; 65535us; 65535us; 7us; 65535us; 65535us; 6us; 65535us; 65535us; 4us; 65535us; 65535us; 65535us; 3us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 5us; 65535us; 65535us; 65535us; 2us; 65535us; 65535us; 65535us; 2us; 65535us; |] -let _fslex_tables = Internal.Utilities.Text.Lexing.UnicodeTables.Create(trans,actions) -let rec _fslex_dummy () = _fslex_dummy() -(* Rule token *) -and token (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_token 61 lexbuf -and _fslex_token _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 34 "fsyacclex.fsl" - let p = lexbuf.StartPos in header p (new StringBuilder 100) lexbuf -# 305 "fsyacclex.fs" - ) - | 1 -> ( -# 35 "fsyacclex.fsl" - PERCENT_PERCENT -# 310 "fsyacclex.fs" - ) - | 2 -> ( -# 36 "fsyacclex.fsl" - TOKEN (gettype (lexeme lexbuf)) -# 315 "fsyacclex.fs" - ) - | 3 -> ( -# 37 "fsyacclex.fsl" - START -# 320 "fsyacclex.fs" - ) - | 4 -> ( -# 38 "fsyacclex.fsl" - PREC -# 325 "fsyacclex.fs" - ) - | 5 -> ( -# 39 "fsyacclex.fsl" - TYPE (match gettype (lexeme lexbuf) with Some x -> x | None -> failwith "gettype") -# 330 "fsyacclex.fs" - ) - | 6 -> ( -# 40 "fsyacclex.fsl" - LEFT -# 335 "fsyacclex.fs" - ) - | 7 -> ( -# 41 "fsyacclex.fsl" - RIGHT -# 340 "fsyacclex.fs" - ) - | 8 -> ( -# 42 "fsyacclex.fsl" - NONASSOC -# 345 "fsyacclex.fs" - ) - | 9 -> ( -# 43 "fsyacclex.fsl" - ERROR -# 350 "fsyacclex.fs" - ) - | 10 -> ( -# 44 "fsyacclex.fsl" - LESS -# 355 "fsyacclex.fs" - ) - | 11 -> ( -# 45 "fsyacclex.fsl" - GREATER -# 360 "fsyacclex.fs" - ) - | 12 -> ( -# 46 "fsyacclex.fsl" - SEMI -# 365 "fsyacclex.fs" - ) - | 13 -> ( -# 47 "fsyacclex.fsl" - let p = lexbuf.StartPos in code p (new StringBuilder 100) lexbuf -# 370 "fsyacclex.fs" - ) - | 14 -> ( -# 48 "fsyacclex.fsl" - token lexbuf -# 375 "fsyacclex.fs" - ) - | 15 -> ( -# 49 "fsyacclex.fsl" - newline lexbuf; token lexbuf -# 380 "fsyacclex.fs" - ) - | 16 -> ( -# 50 "fsyacclex.fsl" - IDENT (lexeme lexbuf) -# 385 "fsyacclex.fs" - ) - | 17 -> ( -# 51 "fsyacclex.fsl" - BAR -# 390 "fsyacclex.fs" - ) - | 18 -> ( -# 52 "fsyacclex.fsl" - ignore(comment lexbuf); token lexbuf -# 395 "fsyacclex.fs" - ) - | 19 -> ( -# 53 "fsyacclex.fsl" - token lexbuf -# 400 "fsyacclex.fs" - ) - | 20 -> ( -# 54 "fsyacclex.fsl" - COLON -# 405 "fsyacclex.fs" - ) - | 21 -> ( -# 55 "fsyacclex.fsl" - unexpected_char lexbuf -# 410 "fsyacclex.fs" - ) - | 22 -> ( -# 56 "fsyacclex.fsl" - EOF -# 415 "fsyacclex.fs" - ) - | _ -> failwith "token" -(* Rule header *) -and header p buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_header p buff 42 lexbuf -and _fslex_header p buff _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 58 "fsyacclex.fsl" - HEADER (buff.ToString(), p) -# 425 "fsyacclex.fs" - ) - | 1 -> ( -# 59 "fsyacclex.fsl" - newline lexbuf; - ignore <| buff.Append System.Environment.NewLine; - header p buff lexbuf -# 432 "fsyacclex.fs" - ) - | 2 -> ( -# 63 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - header p buff lexbuf -# 438 "fsyacclex.fs" - ) - | 3 -> ( -# 66 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - header p buff lexbuf -# 444 "fsyacclex.fs" - ) - | 4 -> ( -# 69 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - header p buff lexbuf -# 450 "fsyacclex.fs" - ) - | 5 -> ( -# 72 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - ignore(codestring buff lexbuf); - header p buff lexbuf -# 457 "fsyacclex.fs" - ) - | 6 -> ( -# 75 "fsyacclex.fsl" - EOF -# 462 "fsyacclex.fs" - ) - | 7 -> ( -# 76 "fsyacclex.fsl" - ignore <| buff.Append(lexeme lexbuf).[0]; - header p buff lexbuf -# 468 "fsyacclex.fs" - ) - | _ -> failwith "header" -(* Rule code *) -and code p buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_code p buff 23 lexbuf -and _fslex_code p buff _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 79 "fsyacclex.fsl" - CODE (buff.ToString(), p) -# 478 "fsyacclex.fs" - ) - | 1 -> ( -# 80 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - ignore(code p buff lexbuf); - ignore <| buff.Append "}"; - code p buff lexbuf -# 486 "fsyacclex.fs" - ) - | 2 -> ( -# 84 "fsyacclex.fsl" - newline lexbuf; - ignore <| buff.Append System.Environment.NewLine; - code p buff lexbuf -# 493 "fsyacclex.fs" - ) - | 3 -> ( -# 88 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - code p buff lexbuf -# 499 "fsyacclex.fs" - ) - | 4 -> ( -# 90 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - ignore(codestring buff lexbuf); - code p buff lexbuf -# 506 "fsyacclex.fs" - ) - | 5 -> ( -# 94 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - code p buff lexbuf -# 512 "fsyacclex.fs" - ) - | 6 -> ( -# 97 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - code p buff lexbuf -# 518 "fsyacclex.fs" - ) - | 7 -> ( -# 99 "fsyacclex.fsl" - EOF -# 523 "fsyacclex.fs" - ) - | 8 -> ( -# 100 "fsyacclex.fsl" - ignore <| buff.Append(lexeme lexbuf).[0]; - code p buff lexbuf -# 529 "fsyacclex.fs" - ) - | _ -> failwith "code" -(* Rule codestring *) -and codestring buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_codestring buff 12 lexbuf -and _fslex_codestring buff _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 106 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - codestring buff lexbuf -# 540 "fsyacclex.fs" - ) - | 1 -> ( -# 108 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - buff.ToString() -# 546 "fsyacclex.fs" - ) - | 2 -> ( -# 110 "fsyacclex.fsl" - newline lexbuf; - ignore <| buff.Append System.Environment.NewLine; - codestring buff lexbuf -# 553 "fsyacclex.fs" - ) - | 3 -> ( -# 114 "fsyacclex.fsl" - ignore <| buff.Append (lexeme lexbuf); - codestring buff lexbuf -# 559 "fsyacclex.fs" - ) - | 4 -> ( -# 116 "fsyacclex.fsl" - failwith "unterminated string in code" -# 564 "fsyacclex.fs" - ) - | 5 -> ( -# 117 "fsyacclex.fsl" - ignore <| buff.Append(lexeme lexbuf).[0]; - codestring buff lexbuf -# 570 "fsyacclex.fs" - ) - | _ -> failwith "codestring" -(* Rule comment *) -and comment (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_comment 0 lexbuf -and _fslex_comment _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with - | 0 -> ( -# 122 "fsyacclex.fsl" - ignore(comment lexbuf); comment lexbuf -# 580 "fsyacclex.fs" - ) - | 1 -> ( -# 123 "fsyacclex.fsl" - newline lexbuf; comment lexbuf -# 585 "fsyacclex.fs" - ) - | 2 -> ( -# 124 "fsyacclex.fsl" - () -# 590 "fsyacclex.fs" - ) - | 3 -> ( -# 125 "fsyacclex.fsl" - failwith "end of file in comment" -# 595 "fsyacclex.fs" - ) - | 4 -> ( -# 126 "fsyacclex.fsl" - comment lexbuf -# 600 "fsyacclex.fs" - ) - | 5 -> ( -# 127 "fsyacclex.fsl" - comment lexbuf -# 605 "fsyacclex.fs" - ) - | _ -> failwith "comment" - -# 129 "fsyacclex.fsl" - -# 3000000 "fsyacclex.fs" diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyacclex.fsl b/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyacclex.fsl deleted file mode 100644 index 9e8d3054..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyacclex.fsl +++ /dev/null @@ -1,128 +0,0 @@ -{ -(* (c) Microsoft Corporation 2005-2008. *) - -open Fsyaccast -open Fsyaccpars -open System.Text -open Internal.Utilities.Text.Lexing - -let lexeme (lexbuf : LexBuffer) = new System.String(lexbuf.Lexeme) -let newline (lexbuf:LexBuffer<_>) = lexbuf.EndPos <- lexbuf.EndPos.NextLine - -let unexpected_char lexbuf = - failwith ("Unexpected character '"^(lexeme lexbuf)^"'") - -let gettype (s:string) = - if s.Contains("<") then - let n = s.IndexOf("<")in - let m = s.IndexOf(">")in - Some s.[n+1 .. m-1] - else None - -} - -let letter = ['A'-'Z'] | ['a'-'z'] -let digit = ['0'-'9'] -let whitespace = [' ' '\t'] -let newline = ('\n' | '\r' '\n') -let ident_start_char = letter -let ident_char = ( ident_start_char| digit | ['\'' '_'] ) -let ident = ident_start_char ident_char* -let typ = '<' [^ '\n' '\r' '>']+ '>' - -rule token = parse - | "%{" { let p = lexbuf.StartPos in header p (new StringBuilder 100) lexbuf } - | "%%" { PERCENT_PERCENT } - | "%token" ((whitespace* typ)?) { TOKEN (gettype (lexeme lexbuf)) } - | "%start"{ START } - | "%prec"{ PREC } - | "%type" (whitespace* typ) { TYPE (match gettype (lexeme lexbuf) with Some x -> x | None -> failwith "gettype") } - | "%left" { LEFT } - | "%right" { RIGHT } - | "%nonassoc" { NONASSOC } - | "error" { ERROR } - | '<' { LESS } - | '>' { GREATER } - | ';' { SEMI } - | '{' { let p = lexbuf.StartPos in code p (new StringBuilder 100) lexbuf } - | whitespace+ { token lexbuf } - | newline { newline lexbuf; token lexbuf } - | ident_start_char ident_char* { IDENT (lexeme lexbuf) } - | '|' { BAR } - | "/*" { ignore(comment lexbuf); token lexbuf } - | "//" [^'\n''\r']* { token lexbuf } - | ':' { COLON } - | _ { unexpected_char lexbuf } - | eof { EOF } -and header p buff = parse - | "%}" { HEADER (buff.ToString(), p) } - | newline { newline lexbuf; - ignore <| buff.Append System.Environment.NewLine; - header p buff lexbuf } - | (whitespace | letter | digit) + - { ignore <| buff.Append (lexeme lexbuf); - header p buff lexbuf } - | "//" [^'\n''\r']* - { ignore <| buff.Append (lexeme lexbuf); - header p buff lexbuf } - | "'\"'" | "'\\\"'" - { ignore <| buff.Append (lexeme lexbuf); - header p buff lexbuf } - | "\"" - { ignore <| buff.Append (lexeme lexbuf); - ignore(codestring buff lexbuf); - header p buff lexbuf } - | eof { EOF } - | _ { ignore <| buff.Append(lexeme lexbuf).[0]; - header p buff lexbuf } -and code p buff = parse - | "}" { CODE (buff.ToString(), p) } - | "{" { ignore <| buff.Append (lexeme lexbuf); - ignore(code p buff lexbuf); - ignore <| buff.Append "}"; - code p buff lexbuf } - | newline { newline lexbuf; - ignore <| buff.Append System.Environment.NewLine; - code p buff lexbuf } - | "'\"'" | "'\\\"'" - { ignore <| buff.Append (lexeme lexbuf); - code p buff lexbuf } - | "\"" { ignore <| buff.Append (lexeme lexbuf); - ignore(codestring buff lexbuf); - code p buff lexbuf } - | (whitespace | letter | digit) + - { ignore <| buff.Append (lexeme lexbuf); - code p buff lexbuf } - | "//" [^'\n''\r']* - { ignore <| buff.Append (lexeme lexbuf); - code p buff lexbuf } - | eof { EOF } - | _ { ignore <| buff.Append(lexeme lexbuf).[0]; - code p buff lexbuf } - - -and codestring buff = parse - | '\\' ('"' | '\\') - { ignore <| buff.Append (lexeme lexbuf); - codestring buff lexbuf } - | '"' { ignore <| buff.Append (lexeme lexbuf); - buff.ToString() } - | newline { newline lexbuf; - ignore <| buff.Append System.Environment.NewLine; - codestring buff lexbuf } - | (whitespace | letter | digit) + - { ignore <| buff.Append (lexeme lexbuf); - codestring buff lexbuf } - | eof { failwith "unterminated string in code" } - | _ { ignore <| buff.Append(lexeme lexbuf).[0]; - codestring buff lexbuf } - - -and comment = parse - | "/*" { ignore(comment lexbuf); comment lexbuf } - | newline { newline lexbuf; comment lexbuf } - | "*/" { () } - | eof { failwith "end of file in comment" } - | [^ '/' '*' '\n' '\r' '"' '/' ]+ { comment lexbuf } - | _ { comment lexbuf } - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyaccpars.fs b/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyaccpars.fs deleted file mode 100644 index 94dee669..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyaccpars.fs +++ /dev/null @@ -1,559 +0,0 @@ -// Implementation file for parser generated by fsyacc -#light -#nowarn "64";; // turn off warnings that type variables used in production annotations are instantiated to concrete type -open Internal.Utilities.Text.Lexing -open Internal.Utilities.Text.Parsing.ParseHelpers -# 1 "fsyaccpars.fsy" - -(* (c) Microsoft Corporation 2005-2008. *) - -open Fsyaccast - -#nowarn "62" // This construct is for compatibility with OCaml - - -# 15 "fsyaccpars.fs" -// This type is the type of tokens accepted by the parser -type token = - | TOKEN of (string option) - | TYPE of (string) - | BAR - | PERCENT_PERCENT - | START - | LEFT - | RIGHT - | NONASSOC - | LESS - | GREATER - | COLON - | PREC - | SEMI - | EOF - | ERROR - | HEADER of (Fsyaccast.Code) - | CODE of (Fsyaccast.Code) - | IDENT of (string) -// This type is used to give symbolic names to token indexes, useful for error messages -type tokenId = - | TOKEN_TOKEN - | TOKEN_TYPE - | TOKEN_BAR - | TOKEN_PERCENT_PERCENT - | TOKEN_START - | TOKEN_LEFT - | TOKEN_RIGHT - | TOKEN_NONASSOC - | TOKEN_LESS - | TOKEN_GREATER - | TOKEN_COLON - | TOKEN_PREC - | TOKEN_SEMI - | TOKEN_EOF - | TOKEN_ERROR - | TOKEN_HEADER - | TOKEN_CODE - | TOKEN_IDENT - | TOKEN_end_of_input - | TOKEN_error -// This type is used to give symbolic names to token indexes, useful for error messages -type nonTerminalId = - | NONTERM__startspec - | NONTERM_spec - | NONTERM_headeropt - | NONTERM_decls - | NONTERM_decl - | NONTERM_idents - | NONTERM_rules - | NONTERM_rule - | NONTERM_optbar - | NONTERM_optsemi - | NONTERM_clauses - | NONTERM_clause - | NONTERM_syms - | NONTERM_optprec - -// This function maps tokens to integers indexes -let tagOfToken (t:token) = - match t with - | TOKEN _ -> 0 - | TYPE _ -> 1 - | BAR -> 2 - | PERCENT_PERCENT -> 3 - | START -> 4 - | LEFT -> 5 - | RIGHT -> 6 - | NONASSOC -> 7 - | LESS -> 8 - | GREATER -> 9 - | COLON -> 10 - | PREC -> 11 - | SEMI -> 12 - | EOF -> 13 - | ERROR -> 14 - | HEADER _ -> 15 - | CODE _ -> 16 - | IDENT _ -> 17 - -// This function maps integers indexes to symbolic token ids -let tokenTagToTokenId (tokenIdx:int) = - match tokenIdx with - | 0 -> TOKEN_TOKEN - | 1 -> TOKEN_TYPE - | 2 -> TOKEN_BAR - | 3 -> TOKEN_PERCENT_PERCENT - | 4 -> TOKEN_START - | 5 -> TOKEN_LEFT - | 6 -> TOKEN_RIGHT - | 7 -> TOKEN_NONASSOC - | 8 -> TOKEN_LESS - | 9 -> TOKEN_GREATER - | 10 -> TOKEN_COLON - | 11 -> TOKEN_PREC - | 12 -> TOKEN_SEMI - | 13 -> TOKEN_EOF - | 14 -> TOKEN_ERROR - | 15 -> TOKEN_HEADER - | 16 -> TOKEN_CODE - | 17 -> TOKEN_IDENT - | 20 -> TOKEN_end_of_input - | 18 -> TOKEN_error - | _ -> failwith "tokenTagToTokenId: bad token" - -/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production -let prodIdxToNonTerminal (prodIdx:int) = - match prodIdx with - | 0 -> NONTERM__startspec - | 1 -> NONTERM_spec - | 2 -> NONTERM_headeropt - | 3 -> NONTERM_headeropt - | 4 -> NONTERM_decls - | 5 -> NONTERM_decls - | 6 -> NONTERM_decl - | 7 -> NONTERM_decl - | 8 -> NONTERM_decl - | 9 -> NONTERM_decl - | 10 -> NONTERM_decl - | 11 -> NONTERM_decl - | 12 -> NONTERM_idents - | 13 -> NONTERM_idents - | 14 -> NONTERM_rules - | 15 -> NONTERM_rules - | 16 -> NONTERM_rule - | 17 -> NONTERM_optbar - | 18 -> NONTERM_optbar - | 19 -> NONTERM_optsemi - | 20 -> NONTERM_optsemi - | 21 -> NONTERM_clauses - | 22 -> NONTERM_clauses - | 23 -> NONTERM_clause - | 24 -> NONTERM_syms - | 25 -> NONTERM_syms - | 26 -> NONTERM_syms - | 27 -> NONTERM_optprec - | 28 -> NONTERM_optprec - | _ -> failwith "prodIdxToNonTerminal: bad production index" - -let _fsyacc_endOfInputTag = 20 -let _fsyacc_tagOfErrorTerminal = 18 - -// This function gets the name of a token as a string -let token_to_string (t:token) = - match t with - | TOKEN _ -> "TOKEN" - | TYPE _ -> "TYPE" - | BAR -> "BAR" - | PERCENT_PERCENT -> "PERCENT_PERCENT" - | START -> "START" - | LEFT -> "LEFT" - | RIGHT -> "RIGHT" - | NONASSOC -> "NONASSOC" - | LESS -> "LESS" - | GREATER -> "GREATER" - | COLON -> "COLON" - | PREC -> "PREC" - | SEMI -> "SEMI" - | EOF -> "EOF" - | ERROR -> "ERROR" - | HEADER _ -> "HEADER" - | CODE _ -> "CODE" - | IDENT _ -> "IDENT" - -// This function gets the data carried by a token as an object -let _fsyacc_dataOfToken (t:token) = - match t with - | TOKEN _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | TYPE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | BAR -> (null : System.Object) - | PERCENT_PERCENT -> (null : System.Object) - | START -> (null : System.Object) - | LEFT -> (null : System.Object) - | RIGHT -> (null : System.Object) - | NONASSOC -> (null : System.Object) - | LESS -> (null : System.Object) - | GREATER -> (null : System.Object) - | COLON -> (null : System.Object) - | PREC -> (null : System.Object) - | SEMI -> (null : System.Object) - | EOF -> (null : System.Object) - | ERROR -> (null : System.Object) - | HEADER _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | CODE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x - | IDENT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x -let _fsyacc_gotos = [| 0us; 65535us; 1us; 65535us; 0us; 1us; 1us; 65535us; 0us; 2us; 2us; 65535us; 2us; 3us; 7us; 8us; 2us; 65535us; 2us; 7us; 7us; 7us; 7us; 65535us; 9us; 10us; 11us; 12us; 13us; 14us; 15us; 16us; 17us; 18us; 19us; 20us; 21us; 22us; 2us; 65535us; 4us; 5us; 23us; 24us; 2us; 65535us; 4us; 23us; 23us; 23us; 1us; 65535us; 26us; 27us; 1us; 65535us; 28us; 29us; 2us; 65535us; 27us; 28us; 33us; 34us; 2us; 65535us; 27us; 32us; 33us; 32us; 4us; 65535us; 27us; 35us; 33us; 35us; 38us; 39us; 40us; 41us; 1us; 65535us; 35us; 36us; |] -let _fsyacc_sparseGotoTableRowOffsets = [|0us; 1us; 3us; 5us; 8us; 11us; 19us; 22us; 25us; 27us; 29us; 32us; 35us; 40us; |] -let _fsyacc_stateToProdIdxsTableElements = [| 1us; 0us; 1us; 0us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 2us; 1us; 5us; 1us; 5us; 1us; 6us; 1us; 6us; 1us; 7us; 1us; 7us; 1us; 8us; 1us; 8us; 1us; 9us; 1us; 9us; 1us; 10us; 1us; 10us; 1us; 11us; 1us; 11us; 1us; 12us; 1us; 12us; 2us; 14us; 15us; 1us; 14us; 1us; 16us; 1us; 16us; 1us; 16us; 1us; 16us; 1us; 16us; 1us; 18us; 1us; 20us; 2us; 21us; 22us; 1us; 21us; 1us; 21us; 1us; 23us; 1us; 23us; 1us; 23us; 1us; 24us; 1us; 24us; 1us; 25us; 1us; 25us; 1us; 28us; 1us; 28us; |] -let _fsyacc_stateToProdIdxsTableRowOffsets = [|0us; 2us; 4us; 6us; 8us; 10us; 12us; 14us; 16us; 18us; 20us; 22us; 24us; 26us; 28us; 30us; 32us; 34us; 36us; 38us; 40us; 42us; 44us; 46us; 49us; 51us; 53us; 55us; 57us; 59us; 61us; 63us; 65us; 68us; 70us; 72us; 74us; 76us; 78us; 80us; 82us; 84us; 86us; 88us; |] -let _fsyacc_action_rows = 44 -let _fsyacc_actionTableElements = [|1us; 16387us; 15us; 6us; 0us; 49152us; 6us; 16388us; 0us; 9us; 1us; 11us; 4us; 13us; 5us; 15us; 6us; 17us; 7us; 19us; 1us; 32768us; 3us; 4us; 1us; 32768us; 17us; 25us; 0us; 16385us; 0us; 16386us; 6us; 16388us; 0us; 9us; 1us; 11us; 4us; 13us; 5us; 15us; 6us; 17us; 7us; 19us; 0us; 16389us; 1us; 16397us; 17us; 21us; 0us; 16390us; 1us; 16397us; 17us; 21us; 0us; 16391us; 1us; 16397us; 17us; 21us; 0us; 16392us; 1us; 16397us; 17us; 21us; 0us; 16393us; 1us; 16397us; 17us; 21us; 0us; 16394us; 1us; 16397us; 17us; 21us; 0us; 16395us; 1us; 16397us; 17us; 21us; 0us; 16396us; 1us; 16399us; 17us; 25us; 0us; 16398us; 1us; 32768us; 10us; 26us; 1us; 16401us; 2us; 30us; 2us; 16410us; 14us; 40us; 17us; 38us; 1us; 16403us; 12us; 31us; 0us; 16400us; 0us; 16402us; 0us; 16404us; 1us; 16406us; 2us; 33us; 2us; 16410us; 14us; 40us; 17us; 38us; 0us; 16405us; 1us; 16411us; 11us; 42us; 1us; 32768us; 16us; 37us; 0us; 16407us; 2us; 16410us; 14us; 40us; 17us; 38us; 0us; 16408us; 2us; 16410us; 14us; 40us; 17us; 38us; 0us; 16409us; 1us; 32768us; 17us; 43us; 0us; 16412us; |] -let _fsyacc_actionTableRowOffsets = [|0us; 2us; 3us; 10us; 12us; 14us; 15us; 16us; 23us; 24us; 26us; 27us; 29us; 30us; 32us; 33us; 35us; 36us; 38us; 39us; 41us; 42us; 44us; 45us; 47us; 48us; 50us; 52us; 55us; 57us; 58us; 59us; 60us; 62us; 65us; 66us; 68us; 70us; 71us; 74us; 75us; 78us; 79us; 81us; |] -let _fsyacc_reductionSymbolCounts = [|1us; 4us; 1us; 0us; 0us; 2us; 2us; 2us; 2us; 2us; 2us; 2us; 2us; 0us; 2us; 1us; 5us; 0us; 1us; 0us; 1us; 3us; 1us; 3us; 2us; 2us; 0us; 0us; 2us; |] -let _fsyacc_productionToNonTerminalTable = [|0us; 1us; 2us; 2us; 3us; 3us; 4us; 4us; 4us; 4us; 4us; 4us; 5us; 5us; 6us; 6us; 7us; 8us; 8us; 9us; 9us; 10us; 10us; 11us; 12us; 12us; 12us; 13us; 13us; |] -let _fsyacc_immediateActions = [|65535us; 49152us; 65535us; 65535us; 65535us; 16385us; 16386us; 65535us; 16389us; 65535us; 16390us; 65535us; 16391us; 65535us; 16392us; 65535us; 16393us; 65535us; 16394us; 65535us; 16395us; 65535us; 16396us; 65535us; 16398us; 65535us; 65535us; 65535us; 65535us; 16400us; 16402us; 16404us; 65535us; 65535us; 16405us; 65535us; 65535us; 16407us; 65535us; 16408us; 65535us; 16409us; 65535us; 16412us; |] -let _fsyacc_reductions () = [| -# 213 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Fsyaccast.ParserSpec)) in - Microsoft.FSharp.Core.Operators.box - ( - ( - raise (Internal.Utilities.Text.Parsing.Accept(Microsoft.FSharp.Core.Operators.box _1)) - ) - : '_startspec)); -# 222 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'headeropt)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'decls)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'rules)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 22 "fsyaccpars.fsy" - List.fold_right (fun f x -> f x) _2 { Header=_1;Tokens=[];Types=[];Associativities=[];StartSymbols=[];Rules=_4 } - ) -# 22 "fsyaccpars.fsy" - : Fsyaccast.ParserSpec)); -# 235 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : Fsyaccast.Code)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 26 "fsyaccpars.fsy" - _1 - ) -# 26 "fsyaccpars.fsy" - : 'headeropt)); -# 246 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 28 "fsyaccpars.fsy" - "", (parseState.ResultRange |> fst) - ) -# 28 "fsyaccpars.fsy" - : 'headeropt)); -# 256 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 31 "fsyaccpars.fsy" - [] - ) -# 31 "fsyaccpars.fsy" - : 'decls)); -# 266 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'decl)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'decls)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 32 "fsyaccpars.fsy" - _1 :: _2 - ) -# 32 "fsyaccpars.fsy" - : 'decls)); -# 278 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string option)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 35 "fsyaccpars.fsy" - (fun x -> {x with Tokens = x.Tokens @ (List.map (fun x -> (x,_1)) _2)}) - ) -# 35 "fsyaccpars.fsy" - : 'decl)); -# 290 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 36 "fsyaccpars.fsy" - (fun x -> {x with Types = x.Types @ (List.map (fun x -> (x,_1)) _2)} ) - ) -# 36 "fsyaccpars.fsy" - : 'decl)); -# 302 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 37 "fsyaccpars.fsy" - (fun x -> {x with StartSymbols = x.StartSymbols @ _2} ) - ) -# 37 "fsyaccpars.fsy" - : 'decl)); -# 313 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 38 "fsyaccpars.fsy" - (fun x -> {x with Associativities = x.Associativities @ [(List.map (fun x -> (x,LeftAssoc)) _2)]} ) - ) -# 38 "fsyaccpars.fsy" - : 'decl)); -# 324 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 39 "fsyaccpars.fsy" - (fun x -> {x with Associativities = x.Associativities @ [(List.map (fun x -> (x,RightAssoc)) _2)]} ) - ) -# 39 "fsyaccpars.fsy" - : 'decl)); -# 335 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 40 "fsyaccpars.fsy" - (fun x -> {x with Associativities = x.Associativities @ [(List.map (fun x -> (x,NonAssoc)) _2)]} ) - ) -# 40 "fsyaccpars.fsy" - : 'decl)); -# 346 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 42 "fsyaccpars.fsy" - _1 :: _2 - ) -# 42 "fsyaccpars.fsy" - : 'idents)); -# 358 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 42 "fsyaccpars.fsy" - [] - ) -# 42 "fsyaccpars.fsy" - : 'idents)); -# 368 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rule)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'rules)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 43 "fsyaccpars.fsy" - _1 :: _2 - ) -# 43 "fsyaccpars.fsy" - : 'rules)); -# 380 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rule)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 43 "fsyaccpars.fsy" - [_1] - ) -# 43 "fsyaccpars.fsy" - : 'rules)); -# 391 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'optbar)) in - let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'clauses)) in - let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'optsemi)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 44 "fsyaccpars.fsy" - (_1,_4) - ) -# 44 "fsyaccpars.fsy" - : 'rule)); -# 405 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 45 "fsyaccpars.fsy" - - ) -# 45 "fsyaccpars.fsy" - : 'optbar)); -# 415 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 45 "fsyaccpars.fsy" - - ) -# 45 "fsyaccpars.fsy" - : 'optbar)); -# 425 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 46 "fsyaccpars.fsy" - - ) -# 46 "fsyaccpars.fsy" - : 'optsemi)); -# 435 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 46 "fsyaccpars.fsy" - - ) -# 46 "fsyaccpars.fsy" - : 'optsemi)); -# 445 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'clause)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'clauses)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 47 "fsyaccpars.fsy" - _1 :: _3 - ) -# 47 "fsyaccpars.fsy" - : 'clauses)); -# 457 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'clause)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 47 "fsyaccpars.fsy" - [_1] - ) -# 47 "fsyaccpars.fsy" - : 'clauses)); -# 468 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'syms)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'optprec)) in - let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : Fsyaccast.Code)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 48 "fsyaccpars.fsy" - Rule(_1,_2,Some _3) - ) -# 48 "fsyaccpars.fsy" - : 'clause)); -# 481 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'syms)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 49 "fsyaccpars.fsy" - _1 :: _2 - ) -# 49 "fsyaccpars.fsy" - : 'syms)); -# 493 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'syms)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 49 "fsyaccpars.fsy" - "error" :: _2 - ) -# 49 "fsyaccpars.fsy" - : 'syms)); -# 504 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 49 "fsyaccpars.fsy" - [] - ) -# 49 "fsyaccpars.fsy" - : 'syms)); -# 514 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - Microsoft.FSharp.Core.Operators.box - ( - ( -# 50 "fsyaccpars.fsy" - None - ) -# 50 "fsyaccpars.fsy" - : 'optprec)); -# 524 "fsyaccpars.fs" - (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> - let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in - Microsoft.FSharp.Core.Operators.box - ( - ( -# 50 "fsyaccpars.fsy" - Some _2 - ) -# 50 "fsyaccpars.fsy" - : 'optprec)); -|] -# 536 "fsyaccpars.fs" -let tables () : Internal.Utilities.Text.Parsing.Tables<_> = - { reductions= _fsyacc_reductions (); - endOfInputTag = _fsyacc_endOfInputTag; - tagOfToken = tagOfToken; - dataOfToken = _fsyacc_dataOfToken; - actionTableElements = _fsyacc_actionTableElements; - actionTableRowOffsets = _fsyacc_actionTableRowOffsets; - stateToProdIdxsTableElements = _fsyacc_stateToProdIdxsTableElements; - stateToProdIdxsTableRowOffsets = _fsyacc_stateToProdIdxsTableRowOffsets; - reductionSymbolCounts = _fsyacc_reductionSymbolCounts; - immediateActions = _fsyacc_immediateActions; - gotos = _fsyacc_gotos; - sparseGotoTableRowOffsets = _fsyacc_sparseGotoTableRowOffsets; - tagOfErrorTerminal = _fsyacc_tagOfErrorTerminal; - parseError = (fun (ctxt:Internal.Utilities.Text.Parsing.ParseErrorContext<_>) -> - match parse_error_rich with - | Some f -> f ctxt - | None -> parse_error ctxt.Message); - numTerminals = 21; - productionToNonTerminalTable = _fsyacc_productionToNonTerminalTable } -let engine lexer lexbuf startState = (tables ()).Interpret(lexer, lexbuf, startState) -let spec lexer lexbuf : Fsyaccast.ParserSpec = - Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, 0)) diff --git a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyaccpars.fsy b/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyaccpars.fsy deleted file mode 100644 index 122ae055..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/FsYacc/fsyaccpars.fsy +++ /dev/null @@ -1,52 +0,0 @@ -%{ -(* (c) Microsoft Corporation 2005-2008. *) - -open Fsyaccast - -#nowarn "62" // This construct is for compatibility with OCaml - -%} - -%type spec -%token IDENT -%token HEADER CODE -%token BAR PERCENT_PERCENT START LEFT RIGHT NONASSOC LESS GREATER COLON PREC SEMI EOF ERROR -%token TYPE -%token TOKEN -%start spec -%left BAR -%% - -spec: - headeropt decls PERCENT_PERCENT rules - { List.fold_right (fun f x -> f x) $2 { Header=$1;Tokens=[];Types=[];Associativities=[];StartSymbols=[];Rules=$4 } } - -headeropt: - | HEADER - { $1 } - | - { "", (parseState.ResultRange |> fst)} - -decls: - { [] } - | decl decls { $1 :: $2 } - -decl: - TOKEN idents { (fun x -> {x with Tokens = x.Tokens @ (List.map (fun x -> (x,$1)) $2)}) } - | TYPE idents { (fun x -> {x with Types = x.Types @ (List.map (fun x -> (x,$1)) $2)} ) } - | START idents { (fun x -> {x with StartSymbols = x.StartSymbols @ $2} ) } - | LEFT idents { (fun x -> {x with Associativities = x.Associativities @ [(List.map (fun x -> (x,LeftAssoc)) $2)]} ) } - | RIGHT idents { (fun x -> {x with Associativities = x.Associativities @ [(List.map (fun x -> (x,RightAssoc)) $2)]} ) } - | NONASSOC idents { (fun x -> {x with Associativities = x.Associativities @ [(List.map (fun x -> (x,NonAssoc)) $2)]} ) } - -idents: IDENT idents { $1 :: $2 } | { [] } -rules: rule rules { $1 :: $2 } | rule { [$1] } -rule: IDENT COLON optbar clauses optsemi { ($1,$4) } -optbar: { } | BAR { } -optsemi: { } | SEMI { } -clauses: clause BAR clauses {$1 :: $3 } | clause { [$1] } -clause: syms optprec CODE { Rule($1,$2,Some $3) } -syms: IDENT syms { $1 :: $2 } | ERROR syms { "error" :: $2 } | { [] } -optprec: { None } | PREC IDENT { Some $2 } - - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/Unittests/LibraryTestFx.fs b/tools/FSharp_1.9.6.16/source/fsppack/Unittests/LibraryTestFx.fs deleted file mode 100644 index c18df16c..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/Unittests/LibraryTestFx.fs +++ /dev/null @@ -1,49 +0,0 @@ - -module FSharp.PowerPack.LibraryTestFx - -open System -open System.Collections.Generic - -open NUnit.Framework - -// Workaround for bug 3601, we are issuing an unnecessary warning -#nowarn "0004" - -/// Check that the lamda throws an exception of the given type. Otherwise -/// calls Assert.Fail() -let private CheckThrowsExn<'a when 'a :> exn> (f : unit -> unit) = - let funcThrowsAsExpected = - try - let _ = f () - false // Did not throw! - with - | :? 'a - -> true // Thew null ref, OK - | _ -> false // Did now throw a null ref exception! - if funcThrowsAsExpected - then () - else Assert.Fail() - -// Illegitimate exceptions. Once we've scrubbed the library, we should add an -// attribute to flag these exception's usage as a bug. -//[] -let CheckThrowsFailureException f = CheckThrowsExn f -let CheckThrowsNullRefException f = CheckThrowsExn f -let CheckThrowsIndexOutRangException f = CheckThrowsExn f - -// Legit exceptions -let CheckThrowsNotSupportedException f = CheckThrowsExn f -let CheckThrowsArgumentException f = CheckThrowsExn f -let CheckThrowsArgumentNullException f = CheckThrowsExn f -let CheckThrowsKeyNotFoundException f = CheckThrowsExn f -let CheckThrowsDivideByZeroException f = CheckThrowsExn f -let CheckThrowsInvalidOperationExn f = CheckThrowsExn f - -// Verifies two sequences are equal (same length, equiv elements) -let VerifySeqsEqual seq1 seq2 = - if Seq.length seq1 <> Seq.length seq2 then Assert.Fail() - - let zippedElements = Seq.zip seq1 seq2 - if zippedElements |> Seq.forall (fun (a, b) -> a = b) - then () - else Assert.Fail() \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsppack/Unittests/Microsoft.FSharp.Math/BigNumType.fs b/tools/FSharp_1.9.6.16/source/fsppack/Unittests/Microsoft.FSharp.Math/BigNumType.fs deleted file mode 100644 index c3a5e453..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/Unittests/Microsoft.FSharp.Math/BigNumType.fs +++ /dev/null @@ -1,323 +0,0 @@ -#light - -// Various tests for the: -// Microsoft.FSharp.Math.BigNum type - -namespace Unittests.PowerPack.FSharp_Math - -open System -open FSharp.PowerPack.LibraryTestFx -open NUnit.Framework -open Microsoft.FSharp.Math -open Microsoft.FSharp.Core - -(* -[Test Strategy] -Make sure each method works on: -* positive bignum -* negative bignum -* zero bignum -* large bignum -*) - - -[] -type BigNumType() = - let g_positive1 = 1000000000000000000000000000000000018N - let g_positive2 = 1000000000000000000000000000000000000N - let g_negative1 = -1000000000000000000000000000000000018N - let g_negative2 = -1000000000000000000000000000000000000N - let g_negative3 = -1000000000000000000000000000000000036N - let g_zero = 0N - let g_normal = 88N - let g_bigintpositive = 1000000000000000000000000000000000018I - let g_bigintnegative = -1000000000000000000000000000000000018I - - // Interfaces - [] - member this.IComparable() = - // Legit IC - let ic = g_positive1 :> IComparable - Assert.AreEqual(ic.CompareTo(g_positive1),0) - CheckThrowsArgumentException( fun () -> ic.CompareTo(g_bigintpositive) |> ignore) - - // Base class methods - [] - member this.ObjectToString() = - Assert.AreEqual(g_positive1.ToString(), - "1000000000000000000000000000000000018") - Assert.AreEqual(g_zero.ToString(),"0") - Assert.AreEqual(g_normal.ToString(),"88") - - - [] - member this.System_Object_GetHashCode() = - Assert.AreEqual(g_negative1.GetHashCode(),1210897093) - Assert.AreEqual(g_normal.GetHashCode(),89) - Assert.AreEqual(g_zero.GetHashCode(),1) - () - - // Static methods - [] - member this.Abs() = - Assert.AreEqual(bignum.Abs(g_negative1), g_positive1) - Assert.AreEqual(bignum.Abs(g_negative2), g_positive2) - Assert.AreEqual(bignum.Abs(g_positive1), g_positive1) - Assert.AreEqual(bignum.Abs(g_normal), g_normal) - Assert.AreEqual(bignum.Abs(g_zero), g_zero) - () - - [] - member this.FromBigInt() = - Assert.AreEqual(bignum.FromBigInt(g_bigintpositive), - g_positive1) - Assert.AreEqual(bignum.FromBigInt(g_bigintnegative), - g_negative1) - Assert.AreEqual(bignum.FromBigInt(0I),g_zero) - Assert.AreEqual(bignum.FromBigInt(88I),g_normal) - () - - [] - member this.FromInt() = - Assert.AreEqual(bignum.FromInt(2147483647), 2147483647N) - Assert.AreEqual(bignum.FromInt(-2147483648), -2147483648N) - Assert.AreEqual(bignum.FromInt(0), 0N) - Assert.AreEqual(bignum.FromInt(88), 88N) - () - - [] - member this.One() = - Assert.AreEqual(bignum.One,1N) - () - - [] - member this.Parse() = - Assert.AreEqual(bignum.Parse("100"), 100N) - Assert.AreEqual(bignum.Parse("-100"), -100N) - Assert.AreEqual(bignum.Parse("0"), g_zero) - Assert.AreEqual(bignum.Parse("88"), g_normal) - () - - [] - member this.PowN() = - Assert.AreEqual(bignum.PowN(100N,2), 10000N) - Assert.AreEqual(bignum.PowN(-3N,3), -27N) - Assert.AreEqual(bignum.PowN(g_zero,2147483647), 0N) - Assert.AreEqual(bignum.PowN(g_normal,0), 1N) - () - - - [] - member this.Sign() = - Assert.AreEqual(g_positive1.Sign, 1) - Assert.AreEqual(g_negative1.Sign, -1) - Assert.AreEqual(g_zero.Sign, 0) - Assert.AreEqual(g_normal.Sign, 1) - () - - - - [] - member this.ToBigInt() = - Assert.AreEqual(bignum.ToBigInt(g_positive1), g_bigintpositive) - Assert.AreEqual(bignum.ToBigInt(g_negative1), g_bigintnegative) - Assert.AreEqual(bignum.ToBigInt(g_zero), 0I) - Assert.AreEqual(bignum.ToBigInt(g_normal), 88I) - () - - - - [] - member this.ToDouble() = - Assert.AreEqual(bignum.ToDouble(179769N*1000000000000000N), 1.79769E+20) - Assert.AreEqual(bignum.ToDouble(-179769N*1000000000000000N), -1.79769E+20) - Assert.AreEqual(bignum.ToDouble(0N),0.0) - Assert.AreEqual(bignum.ToDouble(88N),88.0) - () - - - [] - member this.ToInt32() = - Assert.AreEqual(bignum.ToInt32(2147483647N), 2147483647) - Assert.AreEqual(bignum.ToInt32(-2147483648N), -2147483648) - Assert.AreEqual(bignum.ToInt32(0N), 0) - Assert.AreEqual(bignum.ToInt32(88N), 88) - - - - [] - member this.Zero() = - Assert.AreEqual(bignum.Zero,0N) - () - - // operator methods - [] - member this.op_Addition() = - - Assert.AreEqual(100N + 200N, 300N) - Assert.AreEqual((-100N) + (-200N), -300N) - Assert.AreEqual(g_positive1 + g_negative1, 0N) - Assert.AreEqual(g_zero + g_zero,0N) - Assert.AreEqual(g_normal + g_normal, 176N) - Assert.AreEqual(g_normal + g_normal, 176N) - () - - - - [] - member this.op_Division() = - Assert.AreEqual(g_positive1 / g_positive1, 1N) - Assert.AreEqual(-100N / 2N, -50N) - Assert.AreEqual(g_zero / g_positive1, 0N) - () - - [] - member this.op_Equality() = - - Assert.IsTrue((g_positive1 = g_positive1)) - Assert.IsTrue((g_negative1 = g_negative1)) - Assert.IsTrue((g_zero = g_zero)) - Assert.IsTrue((g_normal = g_normal)) - () - - [] - member this.op_GreaterThan() = - Assert.AreEqual((g_positive1 > g_positive2), true) - Assert.AreEqual((g_negative1 > g_negative2), false) - Assert.AreEqual((g_zero > g_zero), false) - Assert.AreEqual((g_normal > g_normal), false) - - - () - [] - member this.op_GreaterThanOrEqual() = - Assert.AreEqual((g_positive1 >= g_positive2), true) - Assert.AreEqual((g_positive2 >= g_positive1), false) - Assert.AreEqual((g_negative1 >= g_negative1), true) - Assert.AreEqual((0N >= g_zero), true) - - () - [] - member this.op_LessThan() = - Assert.AreEqual((g_positive1 < g_positive2), false) - Assert.AreEqual((g_negative1 < g_negative3), false) - Assert.AreEqual((0N < g_zero), false) - - () - [] - member this.op_LessThanOrEqual() = - Assert.AreEqual((g_positive1 <= g_positive2), false) - Assert.AreEqual((g_positive2 <= g_positive1), true) - Assert.AreEqual((g_negative1 <= g_negative1), true) - Assert.AreEqual((0N <= g_zero), true) - - () - - [] - member this.op_Multiply() = - Assert.AreEqual(3N * 5N, 15N) - Assert.AreEqual((-3N) * (-5N), 15N) - Assert.AreEqual((-3N) * 5N, -15N) - Assert.AreEqual(0N * 5N, 0N) - - () - - [] - member this.op_Range() = - let resultPos = [0N .. 2N] - let seqPos = [0N; 1N; 2N] - VerifySeqsEqual resultPos seqPos - - let resultNeg = [-2N .. 0N] - let seqNeg = [-2N; -1N; 0N] - VerifySeqsEqual resultNeg seqNeg - - let resultSmall = [0N ..5N] - let seqSmall = [0N; 1N; 2N; 3N; 4N; 5N] - VerifySeqsEqual resultSmall seqSmall - - () - - - [] - member this.op_RangeStep() = - let resultPos = [0N .. 3N .. 6N] - let seqPos = [0N; 3N; 6N] - VerifySeqsEqual resultPos seqPos - - let resultNeg = [-6N .. 3N .. 0N] - let seqNeg = [-6N; -3N; 0N] - VerifySeqsEqual resultNeg seqNeg - - let resultSmall = [0N .. 3N .. 9N] - let seqSmall = [0N; 3N; 6N; 9N] - VerifySeqsEqual resultSmall seqSmall - - () - - [] - member this.op_Subtraction() = - Assert.AreEqual(g_positive1 - g_positive2,18N) - Assert.AreEqual(g_negative1 - g_negative3,18N) - Assert.AreEqual(0N-g_positive1, g_negative1) - () - - [] - member this.op_UnaryNegation() = - Assert.AreEqual(-g_positive1, g_negative1) - Assert.AreEqual(-g_negative1, g_positive1) - Assert.AreEqual(-0N,0N) - - () - - [] - member this.op_UnaryPlus() = - Assert.AreEqual(+g_positive1,g_positive1) - Assert.AreEqual(+g_negative1,g_negative1) - Assert.AreEqual(+0N, 0N) - - () - - // instance methods - [] - member this.Denominator() = - Assert.AreEqual(g_positive1.Denominator, 1I) - Assert.AreEqual(g_negative1.Denominator, 1I) - Assert.AreEqual(0N.Denominator, 1I) - - () - - [] - member this.IsNegative() = - Assert.IsFalse(g_positive1.IsNegative) - Assert.IsTrue(g_negative1.IsNegative) - - Assert.IsFalse( 0N.IsNegative) - Assert.IsFalse(-0N.IsNegative) - - () - - - [] - member this.IsPositive() = - - Assert.IsTrue(g_positive1.IsPositive) - Assert.IsFalse(g_negative1.IsPositive) - - Assert.IsFalse( 0N.IsPositive) - Assert.IsFalse(-0N.IsPositive) - - () - - [] - member this.Numerator() = - Assert.AreEqual(g_positive1.Numerator, g_bigintpositive) - Assert.AreEqual(g_negative1.Numerator, g_bigintnegative) - Assert.AreEqual(0N.Numerator, 0I) - - () - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsppack/Unittests/UnitTests.PowerPack.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/Unittests/UnitTests.PowerPack.fsproj deleted file mode 100644 index a05adab0..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/Unittests/UnitTests.PowerPack.fsproj +++ /dev/null @@ -1,73 +0,0 @@ - - - ..\.. - - - - Debug - AnyCPU - 2.0 - true - vTip - true - {9605601b-33f9-4806-a732-8e5067296dd7} - Library - PowerPack.UnitTests - PowerPack.UnitTests - v3.5 - PowerPack.UnitTests - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 3 - - - - nunit.core - nunit.core.dll - $(FSharpSourcesRoot)\..\tools\nunit\nunit.core.dll - True - - - nunit.extensions - nunit.extensions.dll - $(FSharpSourcesRoot)\..\tools\nunit\nunit.extensions.dll - True - - - nunit.framework - nunit.framework.dll - - - - 3.5 - - - - - - - - - FSharp.PowerPack - {649fa588-f02e-457c-9fcf-87e46407481f} - True - - - - - - \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.Excel.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.Excel.fsproj deleted file mode 100644 index c05377e1..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.Excel.fsproj +++ /dev/null @@ -1,41 +0,0 @@ - - - - ..\.. - - - - - Library - 2.0 - true - v2.0 - FSharp.PowerPack.Plot.Excel.xml - - - - - - - - - - - - - FSharp.PowerPack.Plot - {6196b0f8-caea-4cf1-af82-1b520f77fe44} - True - - - - FSharp.PowerPack.Plot.Neutral - {6196b0f8-caea-4cf1-af82-1b520f77fe44} - True - - - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.Neutral.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.Neutral.fsproj deleted file mode 100644 index a8bdb95c..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.Neutral.fsproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - ..\.. - - - - - Library - FSharp.PowerPack.Plot.Neutral - true - v2.0 - FSharp.PowerPack.Plot.Neutral.xml - - - - - - - - - - - FSharp.PowerPack.Plot - - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.Xceed.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.Xceed.fsproj deleted file mode 100644 index 02d914f2..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.Xceed.fsproj +++ /dev/null @@ -1,89 +0,0 @@ - - - - ..\.. - - - - - Library - 2.0 - true - v2.0 - FSharp.PowerPack.Plot.Xceed.xml - --resolutions $(OtherFlags) - $(AssemblySearchPaths);$(FSharpSourcesRoot)\..\tools\Xceed\Bin\.NET\ - - - - - - - - - - - Xceed.Chart - Xceed.Chart.dll - $(FSharpSourcesRoot)\..\tools\Xceed\Bin\.NET\Xceed.Chart.dll - true - - - Xceed.Chart.Core - Xceed.Chart.Core.dll - $(FSharpSourcesRoot)\..\tools\Xceed\Bin\.NET\Xceed.Chart.Core.dll - true - - - Xceed.Chart.Graphics2D - Xceed.Chart.Graphics2D.dll - $(FSharpSourcesRoot)\..\tools\Xceed\Bin\.NET\Xceed.Chart.Graphics2D.dll - true - - - Xceed.Chart.GraphicsCore - Xceed.Chart.GraphicsCore.dll - $(FSharpSourcesRoot)\..\tools\Xceed\Bin\.NET\Xceed.Chart.GraphicsCore.dll - true - - - Xceed.Chart.GraphicsGL - Xceed.Chart.GraphicsGL.dll - $(FSharpSourcesRoot)\..\tools\Xceed\Bin\.NET\Xceed.Chart.GraphicsGL.dll - true - - - Xceed.Chart.Standard - Xceed.Chart.Standard.dll - $(FSharpSourcesRoot)\..\tools\Xceed\Bin\.NET\Xceed.Chart.Standard.dll - true - - - Xceed.Chart.UIControls - Xceed.Chart.UIControls.dll - $(FSharpSourcesRoot)\..\tools\Xceed\Bin\.NET\Xceed.Chart.UIControls.dll - true - - - Xceed.Chart.Utilities - Xceed.Chart.Utilities.dll - $(FSharpSourcesRoot)\..\tools\Xceed\Bin\.NET\Xceed.Chart.Utilities.dll - true - - - FSharp.PowerPack.Plot - {6196b0f8-caea-4cf1-af82-1b520f77fe44} - True - - - - FSharp.PowerPack.Plot.Neutral - {6196b0f8-caea-4cf1-af82-1b520f77fe44} - True - - - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.fsproj b/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.fsproj deleted file mode 100644 index 28926ea2..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/charting/FSharp.PowerPack.Plot.fsproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - ..\.. - - - - - Library - FSharp.PowerPack.Plot - true - v2.0 - FSharp.PowerPack.Plot.xml - - - - - - - - - - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/charting/excel.fs b/tools/FSharp_1.9.6.16/source/fsppack/charting/excel.fs deleted file mode 100644 index 28e8683f..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/charting/excel.fs +++ /dev/null @@ -1,622 +0,0 @@ - -namespace Microsoft.FSharp.Plot -module Excel - -open System; -open System.Drawing; -open Microsoft.Office.Interop.Owc11 -open Microsoft.Office.Interop.Excel -open System.Windows.Forms -open Microsoft.FSharp.Plot -open Microsoft.FSharp.Plot.Core // neutral plot datatypes - -let ConvertToObjectArray (xs:'a array)= - let oArray = Array.create (xs.Length) (new obj()) - Array.iteri (fun i x -> oArray.[i] <- (x:>obj) ) xs - oArray - -let RevertBackFromObjArray (xs:obj array)= - let oArray = (Array.zeroCreate xs.Length) - Array.iteri (fun i x -> oArray.[i] <- (unbox x) ) xs - oArray - -type Plot2D() as self= - class - let updateFire,updateEvent = Event.create() - - let mutable m_name = "" - let mutable series : ChSeries =null - let mutable m_bordercolor = Color.Empty - let mutable m_showlabels = false - abstract Create : ChSeries -> unit - - member this.Update = updateEvent : bool IEvent - - /// Does Caption and Set Legend to True - override this.Create (e: ChSeries ) = - series <- e - e.Caption <- m_name - if m_name <> "" then - e.Parent.HasLegend <- true - - let count = e.DataLabelsCollection.Count - for i=0 to count - 1 do e.DataLabelsCollection.Delete(0) - if m_showlabels then e.DataLabelsCollection.Add() |> ignore - - if m_bordercolor <> Color.Empty then - e.Border.Color <- m_bordercolor.Name - - - member this.update() = - if series <> null then this.Create series - updateFire true - - member this.Series - with get () = series - - - member this.Name - with set(s) = - m_name <- s - this.update() - and get() = m_name - - member this.BorderColor - with get() = m_bordercolor - and set (c) = - m_bordercolor <- c - this.update() - - member this.ShowLabels - with get () = m_showlabels - and set (c) = m_showlabels <- c; this.update() - - interface IPlot with - member t.BasePlot = self :> IPlot - end - end;; - -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -type Bars (xys : seq) as self = - class - inherit Plot2D() - let ys,labels = Seq.to_array xys |> Array.split - let mutable m_ys = ConvertToObjectArray ys - let mutable m_labels = ConvertToObjectArray labels - let mutable m_color = Color.Empty - let mutable m_alignment = Alignment.Vertical - - override this.Create (e : ChSeries) = - base.Create(e) - e.Type <- if m_alignment = Alignment.Vertical - then ChartChartTypeEnum.chChartTypeColumnStacked - else ChartChartTypeEnum.chChartTypeBarStacked - e.SetData(ChartDimensionsEnum.chDimValues,-1,m_ys) - e.SetData(ChartDimensionsEnum.chDimCategories, -1 , m_labels) - - if m_color <> Color.Empty then - e.Interior.Color <- m_color.Name - - member this.Alignment - with get()= m_alignment - and set (c)= m_alignment <- c ; this.update() - - member this.Color - with set(c) = - m_color <- c - this.update() - and get() = m_color - - member this.Values - with set(x:float[]) = - m_ys <- ConvertToObjectArray x - this.update() - and get() = RevertBackFromObjArray m_ys : float[] - - member this.Labels - with set (y:string[]) = - m_labels <- ConvertToObjectArray y - this.update() - and get() = RevertBackFromObjArray m_labels : string[] - - -end - - -let RelevantMarkerStyle (m:MarkerStyle) = - match m with - | MarkerStyle.Circle -> ChartMarkerStyleEnum.chMarkerStyleCircle - | MarkerStyle.Diamond -> ChartMarkerStyleEnum.chMarkerStyleDiamond - | MarkerStyle.None -> ChartMarkerStyleEnum.chMarkerStyleNone - | MarkerStyle.Plus -> ChartMarkerStyleEnum.chMarkerStylePlus - | MarkerStyle.Star -> ChartMarkerStyleEnum.chMarkerStyleStar - | MarkerStyle.Triangle -> ChartMarkerStyleEnum.chMarkerStyleTriangle - | MarkerStyle.X -> ChartMarkerStyleEnum.chMarkerStyleX - | _ -> ChartMarkerStyleEnum.chMarkerStyleDiamond - -let RelevantLineStyle (l:LineStyle) = - match l with - | LineStyle.Solid -> ChartLineDashStyleEnum.chLineSolid - | LineStyle.Dashed -> ChartLineDashStyleEnum.chLineDash - | LineStyle.Square -> ChartLineDashStyleEnum.chLineSquareDot - | LineStyle.DotDot -> ChartLineDashStyleEnum.chLineDashDotDot - | _ -> ChartLineDashStyleEnum.chLineRoundDot - - -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// - - -type Lines (xys : seq) as self = - class - inherit Plot2D() - let xs,ys = Seq.to_array xys |> Array.split - let n1, n2 = xs.Length , ys.Length - do assert (n1 = n2) - - let mutable m_linecolor = Color.Empty - let mutable m_linestyle = LineStyle.Solid - let mutable m_smooth = false - let mutable m_linesize = 1 - - let arrange (xs:float array) (ys:float array) = - let xsSorted = xs.Clone() :?> float array - System.Array.Sort(xsSorted) - - let ysnew = Array.create ys.Length 0. - for i = 0 to xs.Length - 1 do - let index= Array.find_index (fun e -> e =xs.[i] ) xsSorted - ysnew.[i] <- ys.[index] - done - xsSorted, ysnew - - let mutable m_markerColor = Color.Empty - - let mutable m_markersize =3 - let mutable m_markerstyle = MarkerStyle.Diamond - - let xs, ys = arrange xs ys - let mutable m_xs = ConvertToObjectArray xs - let mutable m_ys = ConvertToObjectArray ys - - override this.Create (e : ChSeries) = - base.Create(e) - if m_smooth then e.Type <- ChartChartTypeEnum.chChartTypeSmoothLineStackedMarkers - else e.Type <- ChartChartTypeEnum.chChartTypeLineStackedMarkers - - e.Marker.Style <- RelevantMarkerStyle m_markerstyle - e.Marker.Size <- m_markersize - - if m_markerColor <> Color.Empty then - e.Interior.Color <- m_markerColor.Name - - e.Line.DashStyle <- RelevantLineStyle m_linestyle - - if m_linesize > 3 then - e.Line.Weight <- LineWeightEnum.owcLineWeightThick - elif m_linesize >1 then e.Line.Weight <- LineWeightEnum.owcLineWeightMedium - else e.Line.Weight <- LineWeightEnum.owcLineWeightThin - - if m_linecolor <> Color.Empty then - e.Line.Color <- m_linecolor.Name - - e.SetData(ChartDimensionsEnum.chDimValues,-1,m_ys) - e.SetData(ChartDimensionsEnum.chDimCategories,-1,m_xs) - - member this.SmoothLine - with get () = m_smooth - and set(c) = m_smooth<- c ; this.update() - - - member this.LineColor - with get() = m_linecolor - and set (c) = - m_linecolor <- c - this.update() - - member this.MarkerColor - with get() = m_markerColor - and set (c) = - m_markerColor <- c - this.update() - - member this.LineStyle - with get() = m_linestyle - and set(c) = - m_linestyle <- c - this.update() - member this.LineSize - with get () = float m_linesize - and set(c) = m_linesize <- int c - this.update() - member this.MarkerSize - with get () = float m_markersize - and set(c)= - m_markersize <- int c - this.update() - - member this.MarkerStyle - with get() = m_markerstyle - and set(c) = - m_markerstyle <- c - this.update() - - member this.XYValues - with set (v:float[]*float[]) = - let x,y = v - let xs,ys = arrange x y - m_xs <- ConvertToObjectArray xs - m_ys <- ConvertToObjectArray ys - this.update() - and get() = - let x = RevertBackFromObjArray m_xs : float[] - let y = RevertBackFromObjArray m_ys : float[] - x,y - end - -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// - - -type Scatter(xys: seq) as self = - class - inherit Plot2D() - let xs,ys = Seq.to_array xys |> Array.split - let n1, n2 = xs.Length , ys.Length - do assert (n1 = n2) - let mutable series = null : ChSeries - - let mutable m_name = System.String.Empty - - let mutable m_xs = ConvertToObjectArray xs - let mutable m_ys = ConvertToObjectArray ys - - let mutable m_markerColor = Color.Empty - let mutable m_markersize =3 - let mutable m_markerstyle = MarkerStyle.Diamond - - override this.Create (e : ChSeries) = - base.Create(e) - e.Type <- ChartChartTypeEnum.chChartTypeScatterMarkers - - e.Marker.Style <- RelevantMarkerStyle m_markerstyle - e.Marker.Size <- m_markersize - - if m_markerColor <> Color.Empty then - e.Interior.Color <- m_markerColor.Name - - e.SetData(ChartDimensionsEnum.chDimXValues,-1,m_xs) - e.SetData(ChartDimensionsEnum.chDimYValues,-1,m_ys) - - member this.MarkerSize - with get () = float m_markersize - and set(c)= - m_markersize <-int c - this.update() - - member this.MarkerStyle - with get() = m_markerstyle - and set(c) = - m_markerstyle <- c - this.update() - - member this.MarkerColor - with get() = m_markerColor - and set (c) = - m_markerColor <- c - this.update() - - member this.XYValues - with set(v:float[]*float[]) = - let xs,ys = v - m_xs <- ConvertToObjectArray xs - m_ys <- ConvertToObjectArray ys - this.update() - and get() = - let x = RevertBackFromObjArray m_xs : float[] - let y = RevertBackFromObjArray m_ys : float[] - x,y - end - -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// - -type Stock(xs:float[],openY:float[],highY:float[],lowY:float[],closeY:float[]) as self = - class - inherit Plot2D() - let m_xs = ConvertToObjectArray xs - let m_openY = ConvertToObjectArray openY - let m_highY = ConvertToObjectArray highY - let m_lowY = ConvertToObjectArray lowY - let m_closeY = ConvertToObjectArray closeY - - let mutable m_linecolor = Color.Empty - let mutable m_barcolor = Color.Empty - - new (xs:float[],highY:float[],lowY:float[],closeY:float[]) = - new Stock(xs,[||] ,highY ,lowY,closeY) - - override this.Create (e : ChSeries) = - base.Create e - - if m_openY = [||] then - e.Type <- ChartChartTypeEnum.chChartTypeStockHLC - - else - e.Type <- ChartChartTypeEnum.chChartTypeStockOHLC - e.SetData(ChartDimensionsEnum.chDimOpenValues,-1,m_openY) - - e.SetData(ChartDimensionsEnum.chDimCategories,-1,m_xs) - e.SetData(ChartDimensionsEnum.chDimHighValues,-1,m_highY) - e.SetData(ChartDimensionsEnum.chDimLowValues,-1,m_lowY) - e.SetData(ChartDimensionsEnum.chDimCloseValues,-1,m_closeY) - - if m_linecolor <> Color.Empty then e.Line.Color <- m_linecolor.Name - if m_barcolor <> Color.Empty then e.Interior.Color <- m_barcolor.Name - member this.LineColor - with get () = m_linecolor - and set (c) = - m_linecolor <- c - this.update() - - member this.BarColor - with get () = m_barcolor - and set (c) = - m_barcolor <-c - this.update() - end - - - -type Pie(ys:float[],labels:string[]) = - class - inherit Plot2D() - - let mutable m_ys = ConvertToObjectArray ys - let mutable m_labels = ConvertToObjectArray labels - - let mutable m_explose = false - - override this.Create (e : ChSeries) = - base.Create e - if m_explose then - e.Type <- ChartChartTypeEnum.chChartTypePieExploded - e.Explosion <- 3 - else e.Type <- ChartChartTypeEnum.chChartTypePie - - e.SetData(ChartDimensionsEnum.chDimValues,-1,m_ys) - e.SetData(ChartDimensionsEnum.chDimCategories,-1,m_labels) - member this.Values - with get() = RevertBackFromObjArray m_ys : float[] - and set (c :float[]) = m_ys <- ConvertToObjectArray c; this.update() - member this.Explose - with get () = m_explose - and set(c) = - m_explose <- c - this.update() - member this.Labels - with get() = RevertBackFromObjArray m_labels : string[] - and set (c:string[]) = m_labels <- ConvertToObjectArray c; this.update() - end -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// - - - -type Area(xs:float[], ys:float[]) = - class - inherit Plot2D() - - let m_xs = ConvertToObjectArray xs - let m_ys = ConvertToObjectArray ys - - let mutable m_Color = Color.Empty - - override this.Create (e : ChSeries) = - base.Create e - e.Type <- ChartChartTypeEnum.chChartTypeAreaStacked - - e.SetData(ChartDimensionsEnum.chDimValues,-1,m_ys) - e.SetData(ChartDimensionsEnum.chDimCategories,-1,m_xs) - - if m_Color <> Color.Empty then e.Interior.Color <- m_Color .Name - - member this.Color - with get () = m_Color - and set (c) = m_Color <- c - - end -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// - - -type Chart2D() as self = - let panel = new Panel() - let acceptTypes tys (x:IPlot) = List.exists (fun (ty:System.Type) -> ty.IsAssignableFrom(x.GetType())) tys - let chartToolbar = new System.Windows.Forms.ToolStrip(Dock=DockStyle.Bottom) - do panel.Controls.Add(chartToolbar) - let chartContainer = new ChartSpaceClass() - let imageControl = new System.Windows.Forms.PictureBox(Dock =DockStyle.Fill) - let setPicturetoImage (chSpace:ChartSpaceClass) w h = - use memImage = new System.IO.MemoryStream( chartContainer.GetPicture("gif",w,h):?> System.Byte[]) - let image = new System.Drawing.Bitmap(memImage) - memImage.Close() - image - do panel.Controls.Add(imageControl) - let refreshImage () = setPicturetoImage chartContainer imageControl.Width (imageControl.Height- chartToolbar.Height) - - do imageControl.SizeChanged.Add(fun ev-> imageControl.Image <- refreshImage() ) - - let btnSave = new System.Windows.Forms.ToolStripButton(Text ="&Save") - do btnSave.Click.Add( fun _ -> - let saveDialog = new SaveFileDialog() - saveDialog.Filter <- "gif (*.gif)|*.gif|jpg (*.jpg)|*.jpg|png (*.png)|*.png" - if saveDialog.ShowDialog() = DialogResult.OK then - let fileName = saveDialog.FileName - let a = fileName.Split(".".ToCharArray()) - let filterName = a.[a.Length-1] - chartContainer.ExportPicture(fileName,filterName,imageControl.Width,imageControl.Height) - ) - do chartToolbar.Items.Add(btnSave) |>ignore - - let refresh _ = imageControl.Image <- refreshImage() - do refresh() - let aChart = chartContainer.Charts.Add(chartContainer.Charts.Count) - member this.Refresh () = refresh() - interface IIChart with - member this.HasLegend - with get() = aChart.HasLegend - and set(c) = aChart.HasLegend <- c ; refresh() - - member this.Title - with set x = if System.String.IsNullOrEmpty(x) then aChart.HasTitle <- false - else aChart.HasTitle <- true; aChart.Title.Caption <- x - this.Refresh() - and get() = if aChart.HasTitle then aChart.Title.Caption - else System.String.Empty - end - - interface IChart with - member this.Control = panel :> Control - member this.Accepts(x) = acceptTypes [typeof; typeof;typeof;typeof;typeof;typeof ] x - member this.Add(x:IPlot) = - match x with - | :? Plot2D as plot -> - if (this :> IChart).Accepts plot then - let chartSeries= aChart.SeriesCollection.Add(aChart.SeriesCollection.Count) - plot.Create chartSeries - plot.Update.Add refresh - refresh() - else printf "You tried to add an unsupported IChart object..\n" - | ty -> () - member this.Context = [| |] - - member this.Chart = aChart - member this.ChartContainer = chartContainer - - -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -////////////////////////////////////////////////////// -type ExcelChartFactory() = class - let acceptTypes tys (x:IPlot) = List.exists (fun (ty:System.Type) -> ty.IsAssignableFrom(x.GetType())) tys - interface IChartFactory with - override this.Name = "Excel Charts" - override this.Accepts(x) = acceptTypes [typeof; typeof;typeof;typeof;typeof;typeof] x - override this.Create() = (new Chart2D() :> IChart) - end -end - -type ExcelChartProvider () = class - inherit ChartProvider() - let bar (plot :Bars)= - { new IBars with - member t.Alignment with get() = plot.Alignment and set x = plot.Alignment <- x - member t.Color with get() = plot.Color and set x = plot.Color <- x - member t.Labels with get() = plot.Labels and set x = plot.Labels <- x - member t.Values with get() = plot.Values and set x = plot.Values <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels <- x - member t.BasePlot = plot :> IPlot - } - let lines (plot : Lines) = - { - new ILines with - member t.LineColor with get() = plot.LineColor and set x = plot.LineColor <- x - member t.LineStyle with get() = plot.LineStyle and set x = plot.LineStyle <- x - member t.LineSize with get() = plot.LineSize and set x = plot.LineSize <- x - member t.MarkerColor with get() = plot.MarkerColor and set x = plot.MarkerColor <- x - member t.MarkerSize with get() = plot.MarkerSize and set x = plot.MarkerSize <- x - member t.MarkerStyle with get() = plot.MarkerStyle and set x = plot.MarkerStyle <- x - member t.XYValues with get() = plot.XYValues and set x = plot.XYValues <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels <- x - member t.BasePlot = plot :> IPlot - } - let scatter (plot : Scatter) = - { - new IScatter with - member t.MarkerColor with get() = plot.MarkerColor and set x = plot.MarkerColor <- x - member t.MarkerSize with get() = plot.MarkerSize and set x = plot.MarkerSize <- x - member t.MarkerStyle with get() = plot.MarkerStyle and set x = plot.MarkerStyle <- x - member t.XYValues with get() = plot.XYValues and set x = plot.XYValues <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels <- x - member t.BasePlot = plot :> IPlot - } - let stock (plot : Stock) = - { - new IStock with - member t.BarColor with get() = plot.BarColor and set x = plot.BarColor <- x - member t.LineColor with get() = plot.LineColor and set x = plot.LineColor <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels <- x - member t.BasePlot = plot :> IPlot - } - let pie (plot : Pie) = - { - new IPie with - member t.Explose with get() = plot.Explose and set x = plot.Explose <- x - member t.Labels with get() = plot.Labels and set x = plot.Labels <- x - member t.Values with get() = plot.Values and set x = plot.Values <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels <- x - member t.BasePlot = plot :> IPlot - } - let area (plot : Area) = - { - new IArea with - member t.Color with get() = plot.Color and set x = plot.Color <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels<- x - member t.BasePlot = plot :> IPlot - } - override this.Bars(args) = bar(new Bars(args)) - override this.Lines(args) = lines(new Lines(args)) - override this.Scatter(args) = scatter(new Scatter(args)) - override this.Stock (xs,openY,highY,lowY,closeY) - = stock(new Stock(xs,openY,highY,lowY,closeY)) - override this.Stock (xs,highY,lowY,closeY) - = stock(new Stock(xs,highY,lowY,closeY)) - override this.Pie(ys,labels) = pie(new Pie(ys,labels)) - override this.Area(xs,ys) = area(new Area(xs,ys)) -end - -#if extension -type Microsoft.FSharp.Plot.Plotter.myplot with - member this.ExcelBars(args) = (new Bars(args) :> ExcelBars) - member this.ExcelLines(xs,ys) = (new Lines(xs,ys) :> ExcelLines) - member this.ExcelScatter(xs,ys) = (new Scatter(xs,ys) :> ExcelScatter) - member this.ExcelStock (xs,openY,highY,lowY,closeY) = (new Stock(xs,openY,highY,lowY,closeY) :> ExcelStock) - member this.ExcelStock (xs,highY,lowY,closeY) = (new Stock(xs,highY,lowY,closeY) :> ExcelStock) - member this.ExcelPie(ys,labels) = (new Pie(ys,labels) :> ExcelPie) - member this.ExcelArea(xs,ys) = (new Area(xs,ys) :> ExcelArea) - -#endif - -let excelProvider = new ExcelChartProvider() :> ChartProvider -//do Microsoft.FSharp.Plot.Interactive.Plot.addProvider (excelProvider) -let RegisterProvider() = Microsoft.FSharp.Plot.Core.SetProvider excelProvider -do RegisterProvider() - -do Microsoft.FSharp.Plot.Interactive.addFactory (new ExcelChartFactory() :> IChartFactory) diff --git a/tools/FSharp_1.9.6.16/source/fsppack/charting/neutral.fs b/tools/FSharp_1.9.6.16/source/fsppack/charting/neutral.fs deleted file mode 100644 index dbb32bc4..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/charting/neutral.fs +++ /dev/null @@ -1,120 +0,0 @@ -namespace Microsoft.FSharp.Plot -module Core - -open Microsoft.FSharp.Plot -open System.Drawing - -type Alignment = - | Vertical = 0 - | Horizontal =1 - -type LineStyle = - | Solid = 0 - | Dashed = 1 - | Square = 2 - | DotDot = 3 - -type MarkerStyle = - | None = 0 - | Circle = 1 - | Diamond = 2 - | Star = 3 - | Triangle = 4 - | X = 5 - | Plus = 6 - -type IBars = - abstract Alignment : Alignment with get,set - abstract Color : Color with get,set - abstract Labels : string [] with get,set - abstract Values : float [] with get,set - abstract BorderColor : Color with get,set - abstract Name : string with set, get - abstract ShowLabels : bool with set, get - interface IPlot - -type ILines = - abstract LineColor : Color with get,set - abstract LineStyle : LineStyle with get,set - abstract LineSize : float with get,set - abstract MarkerColor : Color with get,set - abstract MarkerSize : float with get,set - abstract MarkerStyle : MarkerStyle with get,set - abstract XYValues : float[]*float[] with get,set - abstract BorderColor : Color with get,set - abstract Name : string with set, get - abstract ShowLabels : bool with set, get - interface IPlot - -type IScatter = - abstract MarkerColor : Color with get,set - abstract MarkerSize : float with get,set - abstract MarkerStyle : MarkerStyle with get,set - abstract XYValues : float [] * float [] with get,set - abstract BorderColor : Color with get,set - abstract Name : string with set, get - abstract ShowLabels : bool with set, get - interface IPlot - -type IStock = - abstract BarColor : Color with get,set - abstract LineColor : Color with get,set - abstract BorderColor : Color with get,set - abstract Name : string with set, get - abstract ShowLabels : bool with set, get - interface IPlot - -type IPie = - abstract Explose : bool with get,set - abstract Labels : string [] with get,set - abstract Values : float [] with get,set - abstract BorderColor : Color with get,set - abstract Name : string with set, get - abstract ShowLabels : bool with set, get - interface IPlot - -type IArea = - abstract Color : Color with get,set - abstract BorderColor : Color with get,set - abstract Name : string with set, get - abstract ShowLabels : bool with set, get - interface IPlot - -type IIChart = - abstract HasLegend : bool with get,set - abstract Title : string with get,set - interface IChart - -[] -type ChartProvider ()= - abstract Bars : seq -> IBars - abstract Lines : seq -> ILines - abstract Scatter : seq -> IScatter - abstract Stock : float[]*float[]*float[]*float[]*float[]-> IStock - abstract Stock : float[]*float[]*float[]*float[]-> IStock - abstract Pie : float[]* string[] -> IPie - abstract Area : float[]*float[] -> IArea - - -type myplot() = - class - // members added via extension methods - end - -let mutable CurrentProvider = None : ChartProvider option - -let GetProvider() = - match CurrentProvider with - | Some p -> p - | None -> let msg = "No plot provider has been registered.\nTry registering one? e.g.\n\nMicrosoft.FSharp.Plot.Xceed.RegisterProvider();;\nMicrosoft.FSharp.Plot.Excel.RegisterProvider();;\n\n" - printf "%s\n" msg - failwith msg -let SetProvider p = CurrentProvider <- Some p - -let Bars(inp) = GetProvider().Bars(inp) -let Lines(inp) = GetProvider().Lines(inp) -let Scatter(inp) = GetProvider().Scatter(inp) -let Stock (xs,openY,highY,lowY,closeY) = GetProvider().Stock(Seq.to_array xs,openY,highY,lowY,closeY) -let Stock2 (xs,highY,lowY,closeY) = GetProvider().Stock(Seq.to_array xs,highY,lowY,closeY) -let Pie(ys,labels) = GetProvider().Pie(Seq.to_array ys,labels) -let Area(xs,ys) = GetProvider().Area(Seq.to_array xs,Seq.to_array ys) \ No newline at end of file diff --git a/tools/FSharp_1.9.6.16/source/fsppack/charting/plot.fs b/tools/FSharp_1.9.6.16/source/fsppack/charting/plot.fs deleted file mode 100644 index b3b83c8a..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/charting/plot.fs +++ /dev/null @@ -1,187 +0,0 @@ -namespace Microsoft.FSharp.Plot -open System -open System.Drawing -open System.Windows.Forms - -// Abstract objects that represent "plottable" items -type IPlot = - abstract BasePlot : IPlot // extend to array of IPlot (for compound plots) - -// Control which can accept selected IPlot objects. -type IChart = - abstract Control : Control - abstract Accepts : IPlot -> bool - abstract Add : IPlot -> unit - abstract Context : MenuItem[] - -// Each -type IChartFactory = - abstract Name : string - abstract Accepts : IPlot -> bool - abstract Create : unit -> IChart - - -// The window management functions for charts/plots. -module Interactive = - - let menuItem str handler = - let item = new MenuItem(str:string) - item.Click.Add(fun _ -> handler()) - item - - // should be a property for dynamic load - let factories = ref [] : IChartFactory list ref - let addFactory f = factories := !factories @ [f] - - // Frames are container Controls in which to add ChartControls. - // Focus is the current/last IChart - where to add next plots where possible. - - // naive next frame - // let nextFrame() = let form = new Form(Visible=true,Title="F# Plot Window") in form :> Control - - // tabbing next frame - // 1. tabControl - let mutable tabControl = null : TabControl - let ensureTabControl() = - if tabControl <> null && not tabControl.IsDisposed then - tabControl - else - let form = new Form(TopMost=true,Width=400,Height=400,Text="F# Plot Window") - let tab = new TabControl() - tabControl <- tab - form.Controls.Add(tab) - form.Show() - tab.Dock <- DockStyle.Fill - let deleteSelected _ = tab.SelectedTab.Dispose() - let deleteNonSelected _ = let keep = tab.SelectedTab - let pages = tab.Controls |> Seq.cast : TabPage seq - pages |> Seq.to_array |> Array.iter (fun page -> if page <> keep then page.Dispose()) - tab.ContextMenu <- new ContextMenu [| menuItem "Delete selected tab" deleteSelected; - menuItem "Delete un-selected tab" deleteNonSelected; - |] - tab - - type myTabPage(chart : IChart) = - inherit TabPage() - let mutable m_chart = chart - member this.Chart - with get() = m_chart - and set ch = m_chart <- ch - - let mutable pageNumber = 0 - let nextFrame (ch) = - let tab2 = ensureTabControl() - let page = new myTabPage(ch) - pageNumber <- pageNumber + 1 - page.Text <- sprintf "P%d" pageNumber - let () = tab2.Controls.Add(page) - tab2.SelectTab(page) - (page :> Control) - - //let mutable focus = ((new TextChartControl() :>IChart) : IChart) // dummy value - //do focus.Control.Dispose() - let setFocus x = () // focus <- x - - let plot(pl:'a :> IPlot) = - let p = pl.BasePlot - match !factories |> List.tryFind (fun fac -> fac.Accepts p) with - | None -> printf "Sorry, not accepted by a registered charting engine\n"; failwith "unknown plot" - | Some fac -> let chart = fac.Create() - let frame = nextFrame(chart) - frame.Controls.Add(chart.Control) - chart.Control.Dock <- DockStyle.Fill - chart.Add p - let items = - [| new MenuItem("-"); - menuItem "Delete" (fun _ -> frame.Dispose()) - |] - frame.ContextMenu <- new ContextMenu(Array.append chart.Context items) - setFocus chart - (pl : 'a) - - open System.Windows.Forms - let chart(ch : 'a :> IChart) = - let frame = nextFrame(ch) - frame.Controls.Add(ch.Control) - ch.Control.Dock <- DockStyle.Fill - let items = - [| new MenuItem("-"); - menuItem "Delete" (fun _ -> frame.Dispose()) - |] - frame.ContextMenu <- new ContextMenu(Array.append ch.Context items) - setFocus ch - (ch : 'a) - - let multiplot(parray : IPlot array) = - let myTab = ensureTabControl() - for p in parray do - let tabPageList : myTabPage list = myTab.Controls |> Seq.cast |> Seq.to_list - let existingTab = tabPageList |> List.tryFind(fun c -> c.Chart.Accepts p) - match existingTab with - | Some(c) -> c.Chart.Add p - | _ -> plot p |> ignore; () - - let replot(p:'a :> IPlot) = - let myTab = ensureTabControl() - if myTab.TabCount > 0 then - let page = myTab.Controls.Item(myTab.SelectedIndex) :?> myTabPage - if page.Chart.Accepts p then - page.Chart.Add p - (p:'a) - else - plot p - else plot p - - type MultiChartControl(tc : TableLayoutPanel) = - let table = tc - interface IChart with - override this.Control = table :> Control - override this.Accepts(x) = false // denies all - override this.Add(x:IPlot) = () - override this.Context = [| |] - - let subplot(parray : IPlot array) = - let calcRowsColumns len = - let rows = int (sqrt (float len) ) - let cols = if (len % rows) > 0 then (len / rows) + 1 - else len / rows - rows,cols - - let r, c = calcRowsColumns parray.Length - let myTab = ensureTabControl() - - let table = new TableLayoutPanel() - table.Dock <- DockStyle.Fill - table.RowCount <- r - table.ColumnCount <- c - - - let arrangeRowsCols (tbl : TableLayoutPanel)= - tbl.RowStyles.Clear() - tbl.ColumnStyles.Clear() - let rows = tbl.RowCount - let cols = tbl.ColumnCount - - for i=0 to tbl.RowCount - 1 do - tbl.RowStyles.Add(new RowStyle(SizeType.Percent, float32 (100/rows))) |>ignore - for i=0 to tbl.ColumnCount - 1 do - tbl.ColumnStyles.Add(new ColumnStyle(SizeType.Percent , float32 (100 / cols))) |>ignore - - arrangeRowsCols table - let multiChart = new MultiChartControl(table) - let frame = nextFrame(multiChart) - frame.Controls.Add table - - Array.iter (fun p -> - match !factories |> List.tryFind (fun fac -> fac.Accepts p) with - | None -> printf "Sorry, %A not accepted by a registered charting engine\n" p - | Some fac -> let chart = fac.Create() - chart.Control.Dock <- DockStyle.Fill - chart.Add p - table.Controls.Add chart.Control - setFocus chart) parray - - - - - diff --git a/tools/FSharp_1.9.6.16/source/fsppack/charting/xceed.fs b/tools/FSharp_1.9.6.16/source/fsppack/charting/xceed.fs deleted file mode 100644 index 4392c7b4..00000000 --- a/tools/FSharp_1.9.6.16/source/fsppack/charting/xceed.fs +++ /dev/null @@ -1,809 +0,0 @@ - - -namespace Microsoft.FSharp.Plot -module Xceed -#nowarn "47" -#nowarn "54" - -let AssertSameSize (arrs: (_ array) list) = - match arrs with - | [] -> () - | arr::arrs -> assert (arrs |> List.forall (fun arr2 -> arr2.Length = arr.Length)) - -open Microsoft.FSharp.Plot -open Microsoft.FSharp.Plot.Core // neutral plot datatypes -open Xceed.Chart.Standard -open Xceed.Chart.GraphicsCore -open Xceed.Chart -open Xceed.Chart.Core -open System.Windows.Forms -open System.Drawing - -//! INDEX: dialog for users to get sitelic xceed developer license key - -let addControl (c:Control) (f:#Control) = f.Controls.Add(c); f - -let groupBox (a:Control) (box:GroupBox) = - box.Controls.Add a - box - -let keyDialog key handler = - let xceedURL = "http://itwebtools/sitelic/resources/subpages/install.asp?productid=168&ptype=77" - let input = new TextBox(Text=key,Dock= DockStyle.Fill) - let wb = new WebBrowser(Dock= DockStyle.Fill) - let table = new TableLayoutPanel(Dock= DockStyle.Fill) - let box1 = new GroupBox(Text="Enter Xceed Chart 4.1 for .NET license key, then press enter" , - Dock= DockStyle.Fill, - Height=48) |> addControl input - let box2 = new GroupBox(Text="Accept conditions of use to obtain license key (CorpNet only)" , - Dock= DockStyle.Fill) |> addControl wb - table.Controls.Add(box1,column=0,row=0) - table.Controls.Add(box2,column=0,row=1) - let form = new Form(Width=600,Height=600,Text="F# Plotting Xceed license initialisation (CorpNet only)") |> addControl table - wb.Navigate xceedURL - input.KeyPress.Add(fun args -> if args.KeyChar = '\013' then - let key = input.Text.Trim() - form.Dispose() - form.DialogResult <- DialogResult.OK - handler key) - form.ShowDialog() - -let keyName = let userRoot = @"HKEY_CURRENT_USER" - let subkey = @"Software\Microsoft Research\FSharp\Plotting" - userRoot ^ "\\" ^ subkey - -let readKey() = match Microsoft.Win32.Registry.GetValue(keyName,"Key41","") with - | :? string as key -> key - | _ -> "" -let writeKey key = Microsoft.Win32.Registry.SetValue(keyName,"Key41",key) - -let GetKey() = - keyDialog (readKey()) writeKey |> ignore - -let MenuItemToggle description v0 handler = - let mi = new MenuItem(Text=description,Checked=v0) - mi.Click.Add(fun _ -> mi.Checked <- not mi.Checked; handler mi.Checked) - mi - -let license() = - let key = readKey() - let key = if key = "" then GetKey(); readKey() else key - Xceed.Chart.Licenser.LicenseKey <- key - -[] -type Plot2D() as self = - let updateFire,updateEvent = Event.create() - let mutable alignment = Alignment.Vertical - abstract Series : SeriesBase - abstract DimensionPreference : AxisScaleMode option array // internal - option preferences on dimension scales - member this.Update = updateEvent : bool IEvent - member this.UpdateFire() = updateFire true - member this.Name - with get () = this.Series.Name - and set (c) = this.Series.Name <- c ; this.UpdateFire |> ignore - member this.Alignment - with get() = alignment - and set(c) = alignment <- c ; this.UpdateFire() - interface IPlot with - member t.BasePlot = self :> IPlot - -type Bars(xys : seq) as self = - inherit Plot2D() - let ys,labels = Seq.to_array xys |> Array.split - let series = new BarSeries(Name="Bar data") - do series.DataLabels.Mode <- DataLabelsMode.None - do Array.iter2 (fun x lab -> series.Add(x,lab)) ys labels - let update() = self.UpdateFire() - override this.Series = (series :> SeriesBase) - - override this.DimensionPreference = [| None; None; None |] - member this.BSeries = series - - member this.Color - with set (c) = series.BarFillEffect.SetSolidColor(c) ; update() - and get() = series.BarFillEffect.Color - - member this.Labels - with get () = - let labs : string list = series.Labels |> Seq.cast |> Seq.to_list - List.to_array labs - and set (c) = series.Labels.Clear(); Array.iter (fun x -> series.Labels.Add(box x) |> ignore) c - update() - - member this.BorderColor - with set(c) = series.BarBorder.Color <- c; update() - and get () = series.BarBorder.Color - - member this.ShowLabels - with get () = series.DataLabels.Mode = DataLabelsMode.Every - and set(c) = if c then series.DataLabels.Mode <- DataLabelsMode.Every - else series.DataLabels.Mode <- DataLabelsMode.None - update() - - - member this.Values - with set (c) = series.Values.Clear(); series.Values.FillFromEnumerable c; update() - and get() = let vals : float list = series.Values |> Seq.cast |> Seq.to_list - List.to_array vals - - - -type HighLow(xys : seq) as self = - inherit Plot2D() - let xys = Seq.to_array xys - let xs = Array.map (fun (x,y,z) -> x) xys - let ys0 = Array.map (fun (x,y,z) -> y) xys - let ys1 = Array.map (fun (x,y,z) -> z) xys - let series = new HighLowSeries(Name = "High Low data") - let n1,n2,n3 = xs.Length,ys0.Length,ys1.Length - do Array.iteri (fun i x -> series.AddHighLow(ys0.[i],ys1.[i],x)) xs - do series.DataLabels.Mode <- DataLabelsMode.None - do series.UseXValues <- true - let update() = self.UpdateFire() - override this.Series = (series :> SeriesBase) - //member this.Size with set(s) = series.Size <- float32 s; update() - member this.Color with set(c) = series.LowFillEffect.Color <- c; series.HighFillEffect.Color <- c; update() - member this.LowColor with set(c) = series.LowFillEffect.Color <- c; update() - member this.HighColor with set(c) = series.HighFillEffect.Color <- c; update() - member this.Highs with set(x:float seq) = series.HighValues.FillFromEnumerable x; update() - member this.Lows with set(x:float seq) = series.HighValues.FillFromEnumerable x; update() - // [] -// new (xs:float[],lowFun,highFun) = new HighLow(xs,Array.map lowFun xs,Array.map highFun xs) - override this.DimensionPreference = [| None; None; Some AxisScaleMode.Numeric |] - -type Points(xys: seq) as self = - inherit Plot2D() - let xs,ys = Seq.to_array xys |> Array.split - let n1,n2 = xs.Length,ys.Length - do assert(n1=n2) - let series = new PointSeries(Name = "Points") - do series.UseXValues <- true - do Array.iter2 (fun x y -> series.AddXY(y,x)) xs ys - do series.Size <- 2.0f - do series.PointBorder.Width <- 0 - do series.DataLabels.Mode <- DataLabelsMode.None - let update() = self.UpdateFire() - member this.DataLabels with set(x) = series.DataLabels.Mode <- x; update() // REVIEW: abstract - member this.Color with set(x) = series.PointFillEffect.Color <- x; update() - member this.Style with set(x) = series.PointStyle <- x; update() // REVIEW: abstract - member this.Size with set(x) = series.Size <- float32 x; update() - override this.Series = (series :> SeriesBase) - override this.DimensionPreference = [| None; None; Some AxisScaleMode.Numeric |] - - member this.SSeries = series - - member this.MarkerColor - with get() = series.PointFillEffect.Color - and set(c) = series.PointFillEffect.Color <- c - member this.MarkerStyle - with get () = match series.Markers.Style with - | PointStyle.Star -> MarkerStyle.Star - | PointStyle.Pyramid -> MarkerStyle.Triangle - | PointStyle.Cross -> MarkerStyle.Plus - | PointStyle.Ellipse -> MarkerStyle.Circle - | PointStyle.DiagonalCross -> MarkerStyle.X - | PointStyle.InvertedPyramid-> MarkerStyle.Diamond - | _ -> MarkerStyle.None - and set (c) = series.Markers.Style <- - match c with - | MarkerStyle.Star -> PointStyle.Star - | MarkerStyle.Triangle -> PointStyle.Pyramid - | MarkerStyle.Plus -> PointStyle.Cross - | MarkerStyle.Circle -> PointStyle.Ellipse - | MarkerStyle.X -> PointStyle.DiagonalCross - | MarkerStyle.Diamond -> PointStyle.InvertedPyramid - | _ -> PointStyle.Bar - update() - - member this.MarkerSize - with get() = float series.Size (*.Markers.Width*) - and set(c) = series.Size <- float32 c; (*series.Markers.Width <- float32 c; *) update() - - member this.BorderColor - with set(c) = series.PointBorder.Color <- c; update() - and get () = series.PointBorder.Color - - member this.ShowLabels - with get () = series.DataLabels.Mode = DataLabelsMode.Every - and set(c) = if c then series.DataLabels.Mode <- DataLabelsMode.Every - else series.DataLabels.Mode <- DataLabelsMode.None - update() - - member this.XYValues - with get() = let xvals : float list = series.XValues |> Seq.cast |> Seq.to_list - let yvals : float list = series.Values |> Seq.cast |> Seq.to_list - ( (List.to_array xvals) , (List.to_array yvals) ) - and set(c) = let xs,ys = c - series.Values.Clear() ; series.XValues.Clear() - Array.iter2 (fun x y -> series.AddXY(y,x)) xs ys - update() - - - -type Lines(xys: seq) as self = - inherit Plot2D() - let xs,ys = Seq.to_array xys |> Array.split - let n1,n2 = xs.Length,ys.Length - do assert(n1=n2) - let series = new LineSeries(Name = "Lines") - do series.UseXValues <- true - do Array.iter2 (fun x y -> series.AddXY(y,x)) xs ys - do series.LineStyle <- LineSeriesStyle.Line - do series.LineWidth <- 0.1f - do series.LineBorder.Width <- 1 - do series.DataLabels.Mode <- DataLabelsMode.None - let update() = self.UpdateFire() - - override this.Series = (series :> SeriesBase) - override this.DimensionPreference = [| None; None; Some AxisScaleMode.Numeric |] - - member this.LSeries = series - - member this.LineColor - with set(c) = series.LineFillEffect.Color <- c; update() - and get () = series.LineFillEffect.Color - member this.LineStyle - with get() = match series.LineBorder.Pattern with - | LinePattern.Dash -> LineStyle.Dashed - | LinePattern.Solid -> LineStyle.Solid - | LinePattern.DashDot -> LineStyle.Square - | LinePattern.DashDotDot-> LineStyle.DotDot - | _ -> LineStyle.Solid - and set(c) = series.LineBorder.Pattern <- - match c with - | LineStyle.Dashed -> LinePattern.Dash - | LineStyle.Solid -> LinePattern.Solid - | LineStyle.Square -> LinePattern.DashDot - | LineStyle.DotDot -> LinePattern.DashDotDot - | _ -> LinePattern.Solid - update() - member this.LineSize - with get() = float series.LineWidth - and set(c) = series.LineWidth <- float32 c ; update() - member this.MarkerColor - with get() = series.Markers.FillEffect.Color - and set(c) = series.Markers.FillEffect.Color <- c ; update() - - member this.MarkerStyle - with get () = match series.Markers.Style with - | PointStyle.Star -> MarkerStyle.Star - | PointStyle.Pyramid -> MarkerStyle.Triangle - | PointStyle.Cross -> MarkerStyle.Plus - | PointStyle.Ellipse -> MarkerStyle.Circle - | PointStyle.DiagonalCross -> MarkerStyle.X - | PointStyle.InvertedPyramid-> MarkerStyle.Diamond - | _ -> MarkerStyle.None - and set (c) = series.Markers.Style <- - match c with - | MarkerStyle.Star -> PointStyle.Star - | MarkerStyle.Triangle -> PointStyle.Pyramid - | MarkerStyle.Plus -> PointStyle.Cross - | MarkerStyle.Circle -> PointStyle.Ellipse - | MarkerStyle.X -> PointStyle.DiagonalCross - | MarkerStyle.Diamond -> PointStyle.InvertedPyramid - | _ -> PointStyle.Bar - update() - - member this.MarkerSize - with get() = float series.Markers.Width - and set(c) = series.Markers.Width <- (float32 c) ; update() - member this.ShowLabels - with get () = series.DataLabels.Mode = DataLabelsMode.Every - and set(c) = if c then series.DataLabels.Mode <- DataLabelsMode.Every - else series.DataLabels.Mode <- DataLabelsMode.None - update() - - member this.BorderColor - with get() = series.LineBorder.Color - and set(c) = series.LineBorder.Color <- c ; update() - - member this.XYValues - with get() = let xvals : float list = series.XValues |> Seq.cast |> Seq.to_list - let yvals : float list = series.Values |> Seq.cast |> Seq.to_list - ( (List.to_array xvals) , (List.to_array yvals) ) - and set(c) = let xs,ys = c - series.Values.Clear() ; series.XValues.Clear() - Array.iter2 (fun x y -> series.AddXY(y,x)) xs ys - update() - - -type Stock(xs:float[],openY:float[],highY:float[],lowY:float[],closeY:float[]) as self = - inherit Plot2D() - - let series = new StockSeries() - - do AssertSameSize [xs;openY;lowY;highY;closeY] - do Array.iteri (fun i x -> series.AddStock(openY.[i],highY.[i],lowY.[i],closeY.[i],x)) xs - do series.DataLabels.Mode <- DataLabelsMode.None - do series.UseXValues <- true - let update() = self.UpdateFire() - override this.Series = (series :> SeriesBase) - //member this.Size with set(s) = series.Size <- float32 s; update() - member this.CandleWidth with set(c) = series.CandleWidth <- float32 c; update() - - new (xs:float[],highY:float[],lowY:float[],closeY:float[]) = - new Stock(xs,[||] ,highY ,lowY,closeY) - [] - new (xs:float[], (openY : float->float), (highY : float->float),lowY,closeY) = new Stock(xs,Array.map openY xs,Array.map highY xs,Array.map lowY xs,Array.map closeY xs) - override this.DimensionPreference = [| None; None; Some AxisScaleMode.Numeric |] - - member this.StockSeries = series - member this.BarColor - with get () = series.DownFillEffect.Color - and set(c) = series.DownFillEffect.Color <- c ; update() - member this.LineColor - with get () = series.UpFillEffect.Color - and set(c) = series.UpFillEffect.Color <- c ;series.DownFillEffect.Color <- c; update() - member this.BorderColor - with get () = series.UpFillEffect.Color - and set(c) = series.UpFillEffect.Color <- c ; update() - member this.ShowLabels - with get () = series.DataLabels.Mode = DataLabelsMode.Every - and set(c) = if c then series.DataLabels.Mode <- DataLabelsMode.Every - else series.DataLabels.Mode <- DataLabelsMode.None - update() - - -type Pie(ys:float[],xplodeList : int[], labels:string[]) as self = - inherit Plot2D() - let series = new PieSeries() - let explode = xplodeList - do Array.iter2 (fun x lab -> series.Add(x,lab); series.Detachments.Add(0 :> obj) |> ignore) ys labels - do Array.iteri (fun index x -> series.Detachments.set_Item(index,x) |> ignore ) explode - let update() = self.UpdateFire() - override this.Series = (series :> SeriesBase) - - new (ys) = new Pie(ys,Array.map (fun y -> 0) ys, Array.map (fun y -> "") ys) - - new(ys, labels:string[]) = - new Pie(ys,Array.map (fun y -> 2) ys,labels) //then - - member this.Detach(i : int, x : int) = - series.Detachments.set_Item(i,x) - member this.ResetDetach() = - Array.iteri (fun index x -> series.Detachments.set_Item(index,0) |> ignore ) explode - override this.DimensionPreference = [| None; None; Some AxisScaleMode.Numeric |] - member this.PieSeries = series - member this.Explose - with get () = series.Detachments.Count > 0 - and set(c) = - if c then - let arrobj = Array.create (series.Values.Count) (new obj()) - Array.iter (fun e-> series.Detachments.Add(arrobj)|> ignore ) arrobj - else series.Detachments.Clear() - update() - - member this.Values - with set (c : float[]) = series.Values.Clear(); series.Values.FillFromEnumerable c; update() - and get() = let vals : float list = series.Values |> Seq.cast |> Seq.to_list - List.to_array vals - member this.Labels - with set (c : string[]) = series.Labels.Clear(); series.Labels.FillFromEnumerable c; update() - and get() = let vals : string list = series.Labels |> Seq.cast |> Seq.to_list - List.to_array vals - member this.ShowLabels - with get () = series.DataLabels.Mode = DataLabelsMode.Every - and set(c) = if c then series.DataLabels.Mode <- DataLabelsMode.Every - else series.DataLabels.Mode <- DataLabelsMode.None - update() - member this.BorderColor - with get () = series.PieBorder.Color - and set(c) = series.PieBorder.Color <- c ; update() - - - - -type Area(xs:float[], ys:float[]) as self = - inherit Plot2D() - let n1,n2 = xs.Length,ys.Length - do assert(n1=n2) - let series = new AreaSeries() - do series.UseXValues <- true - do Array.iter2 (fun x y -> series.AddXY(x,y)) xs ys - let update() = self.UpdateFire() - override this.Series = (series :> SeriesBase) - override this.DimensionPreference = [| None; None; Some AxisScaleMode.Numeric |] - - member this.AreaSeries = series - member this.DataLabels - with set(x) = series.DataLabels.Mode <- x - and get() = series.DataLabels.Mode - - member this.LineStyle - with set(value) = series.Appearance.LineMode <- value - and get () = series.Appearance.LineMode - - member this.EdgeDisplay - with set(value) = series.DropLines <-value - and get()= series.DropLines - member this.BorderColor - with get()= series.AreaBorder.Color - and set (value) = - series.AreaBorder.Color <- value; update() - - member this.Color - with set(value) = series.AreaFillEffect.SetSolidColor(value) ; update() - and get() = series.AreaFillEffect.Color - member this.ShowLabels - with get () = series.DataLabels.Mode = DataLabelsMode.Every - and set(c) = if c then series.DataLabels.Mode <- DataLabelsMode.Every - else series.DataLabels.Mode <- DataLabelsMode.None - update() - - - -type Chart2D() as self = - do license() - let panel = new Panel() - do panel.Dock <- DockStyle.Fill - let toolbar = new ChartToolbarControl(Dock=DockStyle.Top) - do panel.Controls.Add(toolbar) - let myChart = new ChartControl(Height=panel.Height-toolbar.Height, - Location=new Point(0,toolbar.Height), - Width=panel.Width, - Dock=DockStyle.Bottom, - Anchor = (AnchorStyles.Right ||| AnchorStyles.Left ||| AnchorStyles.Top ||| AnchorStyles.Bottom)) - do panel.Controls.Add(myChart) - - do toolbar.ChartControl <- myChart - let arrButtons = new ChartToolbarButtonsArray(toolbar) - do List.iter (arrButtons.Add >> ignore) - [ChartToolbarButtons.ImageExport; ChartToolbarButtons.Print; ChartToolbarButtons.Separator; - ChartToolbarButtons.MouseOffset; ChartToolbarButtons.MouseZoom; ChartToolbarButtons.Separator; - ChartToolbarButtons.ChartEditor; - ] - do toolbar.ButtonsConfig <- arrButtons - let showToolbar flag = - toolbar.Visible <- flag - let barHeight = if flag then toolbar.Height else 0 - myChart.Location <- Point(0,barHeight) - myChart.Height <- panel.Height-barHeight - - do myChart.InteractivityOperations.Add(new TrackballDragOperation()) |> ignore - do myChart.Settings.EnableAntialiasing <- false - - let header = myChart.Labels.AddHeader("Chart2D") - - let aChart = myChart.Charts.get_Item(0) - - do aChart.Wall(ChartWallType.Floor).Width <- 0.01f - do aChart.Wall(ChartWallType.Back ).Width <- 0.01f - do aChart.Wall(ChartWallType.Left ).Width <- 0.01f - do aChart.View.SetPredefinedProjection(PredefinedProjection.PerspectiveTilted) - do aChart.LightModel.SetPredefinedScheme(LightScheme.ShinyTopLeft) - let refresh _ = myChart.Refresh(); Application.DoEvents() - let showHeader = function - | true -> myChart.Labels.Add(header) |> ignore; refresh() - | false -> myChart.Labels.Remove(header) |> ignore; refresh() - let showLegend = function - | true -> myChart.Legends.Item(0).Mode <- LegendMode.Automatic; refresh() // always have Item(0) ?? - | false -> myChart.Legends.Item(0).Mode <- LegendMode.Disabled; refresh() - - let acceptTypes tys (x:IPlot) = List.exists (fun (ty:System.Type) -> ty.IsAssignableFrom(x.GetType())) tys - - interface IChart with - member this.Control = panel :> Control - member this.Accepts(x) = acceptTypes [typeof; typeof; typeof;typeof;typeof;typeof;typeof] x // somebody needs to call this - member this.Add(x:IPlot) = - match x with - | :? Plot2D as plot -> - if (this :> IChart).Accepts plot then - aChart.Series.Add(plot.Series) |> ignore; // add series to chart - plot.Update.Add refresh; // listen to update events from plot - Array.iteri (fun i pref -> - match pref with - | None -> () // no pref for dimension i - | Some mode -> aChart.Axis(2).ScaleMode <- mode) // set pref... - plot.DimensionPreference - refresh() - else printf "You tried to add an unsupported IChart object..\n" - | ty -> () - member this.Context = [| MenuItemToggle "Show Toolbar" true showToolbar; - MenuItemToggle "Show Header" true showHeader; - MenuItemToggle "Show Legend" true showLegend; - |] - member this.Added(plot:Plot2D) = - (this :> IChart).Add(plot) - plot - member this.Title with set x = header.Text <- x; refresh() - member this.Refresh() = myChart.Refresh() - member this.Chart = aChart // expose - member this.Width with set x = aChart.Width <- float32 x // demo required - member this.Height with set x = aChart.Height <- float32 x // demo required - member this.ChartControl = myChart // expose - member this.ScaleNumeric() = - this.Chart.Axis(2).ScaleMode <- AxisScaleMode.Numeric - member this.Header with set(x) = showHeader x; refresh() - member this.Toolbar with set(x) = showToolbar x; refresh() - -type XCeedChartFactory() = - let acceptTypes tys (x:IPlot) = List.exists (fun (ty:System.Type) -> ty.IsAssignableFrom(x.GetType())) tys - interface IChartFactory with - override this.Name = "XCeed Charts" - override this.Accepts(x) = acceptTypes [typeof; typeof; typeof; typeof;typeof;typeof;typeof;typeof] x - override this.Create() = (new Chart2D() :> IChart) // ask xceed provider later - - -[] -type Plot3D() as self = - let updateFire,updateEvent = Event.create() - - - abstract Series : SeriesBase - abstract DimensionPreference : AxisScaleMode option array // internal - option preferences on dimension scales - member this.Update = updateEvent : bool IEvent - member this.UpdateFire() = updateFire true - - interface IPlot with - member t.BasePlot = self :> IPlot - -/// X-Y scatter plot -type Points3D(xs:float[],ys:float[],zs:float[]) as self = - inherit Plot3D() - do AssertSameSize [xs;ys;zs] - let series = new PointSeries(Name="Points") - do series.UseXValues <- true - do series.UseZValues <- true - do Array.iteri (fun i x -> series.AddPoint(ys.[i],x,zs.[i])) xs - do series.Size <- 2.0f - do series.PointBorder.Width <- 0 - do series.DataLabels.Mode <- DataLabelsMode.None - let update() = self.UpdateFire() - member this.Name with set(s) = series.Name <- s; update() - member this.DataLabels with set(x) = series.DataLabels.Mode <- x; update() // REVIEW: abstract - member this.Color with set(x) = series.PointFillEffect.Color <- x; update() - member this.Style with set(x) = series.PointStyle <- x; update() // REVIEW: abstract - member this.Size with set(x) = series.Size <- float32 x; update() - override this.Series = (series :> SeriesBase) - override this.DimensionPreference = [| None; None; Some AxisScaleMode.Numeric |] - -type Lines3D(xs:float[],ys:float[],zs:float[]) as self = - inherit Plot3D() - do AssertSameSize [xs;ys;zs] - let series = new LineSeries(Name="Lines") - do series.UseXValues <- true - do series.UseZValues <- true - do Array.iteri (fun i x -> series.AddXYZ(ys.[i],x,zs.[i])) xs - do series.LineStyle <- LineSeriesStyle.Line - do series.LineWidth <- 0.1f - do series.LineBorder.Width <- 1 - do series.DataLabels.Mode <- DataLabelsMode.None - let update() = self.UpdateFire() - member this.Name with set(s) = series.Name <- s; update() - member this.DataLabels with set(x) = series.DataLabels.Mode <- x; update() // REVIEW: abstract - member this.Color with set(x) = series.LineFillEffect.Color <- x; update() - member this.Style with set(x) = series.LineStyle <- x; update() // REVIEW: abstract - member this.Size with set(x) = series.LineWidth <- float32 x; update() - override this.Series = (series :> SeriesBase) - override this.DimensionPreference = [| None; None; Some AxisScaleMode.Numeric |] - - -type SurfaceGrid3D(xs:float[],ys:float[],f : int -> int -> float) = - inherit Plot3D() - let n1,n2 = xs.Length,ys.Length - let grid = seq {for i in 0 .. n1-1 do for j in 0 .. n2-1 do yield i,j} - let gridSurfaceSeries = new GridSurfaceSeries(Name="Surface Grid") - do gridSurfaceSeries.Data.SetGridSize(n1,n2) - do grid |> Seq.iter (fun (i,j) -> gridSurfaceSeries.Data.SetValue(i,j,f i j)) - override this.Series = (gridSurfaceSeries :> SeriesBase) - override this.DimensionPreference = [| None; None; Some AxisScaleMode.Numeric; Some AxisScaleMode.Numeric; |] - member this.Flat with set(x) = gridSurfaceSeries.DrawFlat <- x - [] - new (xs:float[],ys:float[],f : float -> float -> float) = new SurfaceGrid3D(xs,ys,fun i j -> f xs.[i] ys.[j]) - - -type SurfaceMesh3D(xs:float[],ys:float[],f) as self = - inherit Plot3D() - let n1,n2 = xs.Length,ys.Length - let grid = seq {for i in 0 .. n1-1 do for j in 0 .. n2-1 do yield i,j} - - let meshSurfaceSeries = new MeshSurfaceSeries(Name = "Surface Mesh") - do meshSurfaceSeries.Data.SetGridSize(n1,n2) - let setSurface f = - let eval i j = f xs.[i] ys.[j] : float - grid |> Seq.iter (fun (i,j) -> meshSurfaceSeries.Data.SetValue(i,j,eval i j,xs.[i],ys.[j])) - do setSurface f - let update() = self.UpdateFire() - override this.Series = (meshSurfaceSeries :> SeriesBase) - override this.DimensionPreference = [| None; Some AxisScaleMode.Numeric; Some AxisScaleMode.Numeric; |] - member this.Transparency with set(x) = meshSurfaceSeries.FillEffect.SetTransparencyPercent(x) - member this.Flat with set(x) = meshSurfaceSeries.DrawFlat <- x - member this.Surface with set(f) = setSurface f; update() - - -type Chart3D() as self = - do license() - let panel = new Panel() - let toolbar = new ChartToolbarControl(Dock=DockStyle.Top) - do panel.Controls.Add(toolbar) - let myChart = new ChartControl(Height=panel.Height-toolbar.Height, - Location=new Point(0,toolbar.Height), - Width=panel.Width, - Dock=DockStyle.Bottom, - Anchor = (AnchorStyles.Right ||| AnchorStyles.Left ||| AnchorStyles.Top ||| AnchorStyles.Bottom)) - do panel.Controls.Add(myChart) - - do toolbar.ChartControl <- myChart - let arrButtons = new ChartToolbarButtonsArray(toolbar) - do List.iter (arrButtons.Add >> ignore) - [ChartToolbarButtons.ImageExport; ChartToolbarButtons.Print; ChartToolbarButtons.Separator; - ChartToolbarButtons.MouseTrackball; ChartToolbarButtons.MouseOffset; ChartToolbarButtons.MouseZoom; ChartToolbarButtons.Separator; - ChartToolbarButtons.ChartEditor; - //ChartToolbarButtons.RenderDevice - ] - do toolbar.ButtonsConfig <- arrButtons - let showToolbar flag = // same code as Chart2D - toolbar.Visible <- flag - let barHeight = if flag then toolbar.Height else 0 - myChart.Location <- Point(0,barHeight) - myChart.Height <- panel.Height-barHeight - - do myChart.Settings.RenderDevice <- RenderDevice.OpenGL // for 3D - do myChart.InteractivityOperations.Add(new TrackballDragOperation()) |> ignore - do myChart.Settings.EnableAntialiasing <- false - - let header = myChart.Labels.AddHeader("Chart3D") - let aChart = myChart.Charts.get_Item(0) - - do aChart.Depth <- 40.0f - do aChart.Width <- 40.0f - do aChart.Height <- 40.0f - - do aChart.Wall(ChartWallType.Floor).Width <- 0.01f - do aChart.Wall(ChartWallType.Back ).Width <- 0.01f - do aChart.Wall(ChartWallType.Left ).Width <- 0.01f - do aChart.View.SetPredefinedProjection(PredefinedProjection.PerspectiveTilted) - do aChart.LightModel.SetPredefinedScheme(LightScheme.ShinyTopLeft) - let refresh _ = myChart.Refresh() - let showHeader = function - | true -> myChart.Labels.Add(header) |> ignore; refresh() - | false -> myChart.Labels.Remove(header) |> ignore; refresh() - let showLegend = function - | true -> myChart.Legends.Item(0).Mode <- LegendMode.Automatic; refresh() // always have Item(0) ?? - | false -> myChart.Legends.Item(0).Mode <- LegendMode.Disabled; refresh() - - let acceptTypes tys (x:IPlot) = List.exists (fun (ty:System.Type) -> ty.IsAssignableFrom(x.GetType())) tys - - member this.Add(plot:Plot3D) = - aChart.Series.Add(plot.Series) |> ignore; // add series to chart - plot.Update.Add refresh; // listen to update events from plot - Array.iteri (fun i pref -> match pref with - | None -> () // no pref for dimension i - | Some mode -> aChart.Axis(i).ScaleMode <- mode) // set pref... - plot.DimensionPreference - let axD = aChart.Axis(StandardAxis.Depth) in axD.ScaleMode <- AxisScaleMode.Numeric // what number axis is this? - refresh() - member this.Added(plot:Plot3D) = this.Add(plot); plot - member this.Title with set x = header.Text <- x; refresh() - member this.Refresh() = myChart.Refresh() - member this.Chart = aChart // expose - member this.ChartControl = myChart // expose - - interface IChart with - member this.Control = panel :> Control - member this.Accepts(x) = acceptTypes [typeof;typeof;typeof;typeof] x // somebody needs to call this - member this.Add(x:IPlot) = - match x with - | :? Plot3D as plot -> - if (this :> IChart).Accepts plot then - aChart.Series.Add(plot.Series) |> ignore; // add series to chart - plot.Update.Add refresh; // listen to update events from plot - Array.iteri (fun i pref -> - match pref with - | None -> () // no pref for dimension i - | Some mode -> aChart.Axis(i).ScaleMode <- mode) // set pref... - plot.DimensionPreference - let axD = aChart.Axis(StandardAxis.Depth) in axD.ScaleMode <- AxisScaleMode.Numeric // what number axis is this? - refresh() - else printf "You tried to add an unsupported IChart object..\n" - | ty -> () - member this.Context = [| MenuItemToggle "Show Toolbar" true showToolbar; - MenuItemToggle "Show Header" true showHeader; - MenuItemToggle "Show Legend" true showLegend; - |] - -type XCeedChart3DFactory() = - let acceptTypes tys (x:IPlot) = List.exists (fun ty -> ty = x.GetType()) tys - interface IChartFactory with - override this.Name = "XCeed Charts 2D" - override this.Accepts(x) = acceptTypes [typeof;typeof;typeof;typeof] x - override this.Create() = (new Chart3D() :> IChart) // ask xceed provider later - -(*let x= Bars(xs) -let y = new Bars(args) :> XceedBarsx*) - - -#if extension -type Microsoft.FSharp.Plot.Interactive.myplot with - member this.XceedBars(args) = (new Bars(args) :> XceedBars) - member this.XceedLines(args) = (new Lines(args) :> XceedLines) - member this.XceedPoints(args) = (new Points(args) :> XceedPoints) - member this.XceedStock (xs,openY:float[],highY,lowY,closeY) = (new Stock(xs,openY,highY,lowY,closeY) :> XceedStock) - member this.XceedStock (xs,highY,lowY,closeY) = (new Stock(xs,highY,lowY,closeY) :> XceedStock) - member this.XceedPie(ys,labels) = (new Pie(ys,labels) :> XceedPie) - member this.XceedArea(xs,ys) = (new Area(xs,ys) :> XceedArea) - -#endif - - -type XceedChartProvider () = - inherit ChartProvider() - let bar (plot :Bars)= - { new IBars with - member t.Alignment with get() = plot.Alignment and set x = plot.Alignment <- x - member t.Color with get() = plot.Color and set x = plot.Color <- x - member t.Labels with get() = plot.Labels and set x = plot.Labels <- x - member t.Values with get() = plot.Values and set x = plot.Values <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels <- x - member t.BasePlot = plot :> IPlot - } - let lines (plot : Lines) = - { new ILines with - member t.LineColor with get() = plot.LineColor and set x = plot.LineColor <- x - member t.LineStyle with get() = plot.LineStyle and set x = plot.LineStyle <- x - member t.LineSize with get() = plot.LineSize and set x = plot.LineSize <- x - member t.MarkerColor with get() = plot.MarkerColor and set x = plot.MarkerColor <- x - member t.MarkerSize with get() = plot.MarkerSize and set x = plot.MarkerSize <- x - member t.MarkerStyle with get() = plot.MarkerStyle and set x = plot.MarkerStyle <- x - member t.XYValues with get() = plot.XYValues and set x = plot.XYValues <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels <- x - member t.BasePlot = plot :> IPlot - } - let scatter (plot : Points) = - { new IScatter with - member t.MarkerColor with get() = plot.MarkerColor and set x = plot.MarkerColor <- x - member t.MarkerSize with get() = plot.MarkerSize and set x = plot.MarkerSize <- x - member t.MarkerStyle with get() = plot.MarkerStyle and set x = plot.MarkerStyle <- x - member t.XYValues with get() = plot.XYValues and set x = plot.XYValues <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels <- x - member t.BasePlot = plot :> IPlot - } - let stock (plot : Stock) = - { new IStock with - member t.BarColor with get() = plot.BarColor and set x = plot.BarColor <- x - member t.LineColor with get() = plot.LineColor and set x = plot.LineColor <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels <- x - member t.BasePlot = plot :> IPlot - } - let pie (plot : Pie) = - { new IPie with - member t.Explose with get() = plot.Explose and set x = plot.Explose <- x - member t.Labels with get() = plot.Labels and set x = plot.Labels <- x - member t.Values with get() = plot.Values and set x = plot.Values <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels <- x - member t.BasePlot = plot :> IPlot - } - let area (plot : Area) = - { new IArea with - member t.Color with get() = plot.Color and set x = plot.Color <- x - member t.BorderColor with get() = plot.BorderColor and set x = plot.BorderColor <- x - member t.Name with get() = plot.Name and set x = plot.Name <- x - member t.ShowLabels with get() = plot.ShowLabels and set x = plot.ShowLabels<- x - member t.BasePlot = plot :> IPlot - } - override this.Bars(args) = bar(new Bars(args)) - override this.Lines(args) = lines(new Lines(args)) - override this.Scatter(args) = scatter(new Points(args)) - override this.Stock (xs,openY,highY,lowY,closeY) - = stock(new Stock(xs,openY,highY,lowY,closeY)) - override this.Stock (xs,highY,lowY,closeY) - = stock(new Stock(xs,highY,lowY,closeY)) - override this.Pie(ys,labels) = pie(new Pie(ys,labels)) - override this.Area(xs,ys) = area(new Area(xs,ys)) - -let xceedProvider = new XceedChartProvider() :> ChartProvider -let RegisterProvider() = Microsoft.FSharp.Plot.Core.SetProvider xceedProvider -do RegisterProvider() - -do Microsoft.FSharp.Plot.Interactive.addFactory (new XCeedChartFactory() :> IChartFactory); -do Microsoft.FSharp.Plot.Interactive.addFactory (new XCeedChart3DFactory() :> IChartFactory); diff --git a/tools/FSharp_1.9.6.16/source/fsppack/fs.pubkey b/tools/FSharp_1.9.6.16/source/fsppack/fs.pubkey deleted file mode 100644 index 1c49691a..00000000 Binary files a/tools/FSharp_1.9.6.16/source/fsppack/fs.pubkey and /dev/null differ diff --git a/tools/FSharp_1.9.6.16/source/ilx/cu_erase.ml b/tools/FSharp_1.9.6.16/source/ilx/cu_erase.ml deleted file mode 100644 index 86a45e6a..00000000 --- a/tools/FSharp_1.9.6.16/source/ilx/cu_erase.ml +++ /dev/null @@ -1,956 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved -// -------------------------------------------------------------------- -// Erase discriminated unions. -// -------------------------------------------------------------------- - -#light - -module Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.EraseIlxClassunions - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -open Microsoft.FSharp.Compiler.AbstractIL.Morphs - -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL -module Ilx = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -module Ilprint = Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter -module Illib = Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -open Illib -open Il -open Ilx -open Ilprint - - -// This functor helps us make representation decisions for F# union type compilation -type UnionReprDecisions<'Union,'Alt,'Type> - (getAlternatives: 'Union->'Alt[], - nullPermitted:'Union->bool, - isGeneric:'Union -> bool, - isNullary:'Alt->bool, - nameOfAlt : 'Alt -> string, - makeRootType: 'Union -> 'Type, - makeNestedType: 'Union * string -> 'Type) = - - static let TaggingThresholdFixedConstant = 8 // note: permanently and forever fixed - - member repr.OptimizeAllAlternativesToConstantFieldsInRootClass cu = - let alts = getAlternatives cu - (alts.Length > 1 && Array.forall isNullary alts) && - // can't use static fields for generic nullary constructors - though Whidbey supports this, if we knew we were targetting generics... - not (isGeneric cu) - - member repr.UseRuntimeTypes cu = - let alts = getAlternatives cu - (alts.Length < TaggingThresholdFixedConstant) && - (not (repr.OptimizeAllAlternativesToConstantFieldsInRootClass cu)) - - // WARNING: this must match IsUnionTypeWithNullAsTrueValue in the F# compiler * - // REVIEW: make this attribute controlled - member repr.OptimizeAlternativeToNull (cu,alt) = - let alts = getAlternatives cu - nullPermitted cu && - repr.UseRuntimeTypes cu && (* tags won't work if we're using "null" *) - Array.existsOne isNullary alts && - Array.exists (isNullary >> not) alts && - isNullary alt (* is this the one? *) - - member repr.OptimizingOneAlternativeToNull cu = - let alts = getAlternatives cu - alts |> Array.existsOne (fun alt -> repr.OptimizeAlternativeToNull (cu,alt)) - - member repr.OptimizeSingleNonNullaryAlternativeToRootClass (cu,alt) = - // Check all nullary constructors are being represented without using sub-classes - let alts = getAlternatives cu - alts |> Array.forall (fun alt2 -> - not (isNullary alt2) || - repr.OptimizeAlternativeToNull (cu,alt2)) && - - // Check there is only one non-nullary constructor - Array.existsOne (isNullary >> not) alts && - not (isNullary alt) - - member repr.OptimizeAlternativeToConstantFieldInTaggedRootClass (cu,alt) = - let alts = getAlternatives cu - isNullary alt && - not (isGeneric cu) && - not (repr.OptimizeAlternativeToNull (cu,alt)) && - not (repr.UseRuntimeTypes cu) - - member repr.OptimizeAlternativeToRootClass (cu,alt) = - repr.OptimizeAllAlternativesToConstantFieldsInRootClass cu || - repr.OptimizeAlternativeToConstantFieldInTaggedRootClass (cu,alt) || - repr.OptimizeSingleNonNullaryAlternativeToRootClass(cu,alt) - - member repr.MaintainPossiblyUniqueConstantFieldForAlternative(cu,alt) = - not (repr.OptimizeAlternativeToNull (cu,alt)) && - isNullary alt - - - member repr.TypeForAlterntative (cuspec,alt) = - if repr.OptimizeAlternativeToRootClass (cuspec,alt) || repr.OptimizeAlternativeToNull (cuspec,alt) then makeRootType cuspec - else makeNestedType (cuspec,"_"^nameOfAlt alt) - - -let backend_derived_tref tref nm = mk_tref_in_tref (tref,"_"^nm) - - -let cuspecRepr = - UnionReprDecisions - (altsarray_of_cuspec, - nullPermitted_of_cuspec, - (fun cuspec -> nonNil (inst_of_cuspec cuspec)), - alt_is_nullary, - name_of_alt, - (fun cuspec -> mk_boxed_typ (tref_of_cuspec cuspec) (inst_of_cuspec cuspec)), - (fun (cuspec,nm) -> mk_boxed_typ (mk_tref_in_tref (tref_of_cuspec cuspec,nm)) (inst_of_cuspec cuspec))) - -type NoTypesGeneratedViaThisReprDecider = NoTypesGeneratedViaThisReprDecider -let cudefRepr = - UnionReprDecisions - ((fun (enc,td,cud) -> cud.cudAlternatives), - (fun (enc,td,cud) -> cud.cudNullPermitted), - (fun (enc,td,cud) -> nonNil td.tdGenericParams), - alt_is_nullary, - name_of_alt, - (fun (enc,td,cud) -> NoTypesGeneratedViaThisReprDecider), - (fun ((enc,td,cud),nm) -> NoTypesGeneratedViaThisReprDecider)) - - -type cenv = - { ilg: ILGlobals } - -let mk_bblock2 (a,b) = - mk_bblock { bblockLabel=a; bblockInstrs= Array.of_list b} - - -let getter_prop_name (fields: ILFieldDef[]) i = fields.[i].fdName - -let tester_name nm = "Is"^nm -let tagPropertyName = "Tag" - -(* nb. not currently recording translation assumptions in the default external reference naming scheme *) -let tag_member_name = "tag" -let tag_member_ty ilg = ilg.typ_int32 -let virt_tag_field_id ilg = tag_member_name,tag_member_ty ilg -let backend_field_id fdef = - // Use the lower case name of a field or constructor as the field/parameter name if it differs from the uppercase name - let lowerName = String.uncapitalize fdef.fdName in - let nm = (if lowerName = fdef.fdName then "_" ^ fdef.fdName else lowerName) - nm, fdef.fdType - -let ref_to_field_in_tspec tspec (nm,ty) = mk_fspec_in_boxed_tspec (tspec,nm,ty) - -let const_fname nm = nm^"_uniq" -let const_formal_field_ty nm (baseTypeSpec:ILTypeSpec) = - Type_boxed (mk_tspec(baseTypeSpec.TypeRef, List.mapi (fun i _ -> mk_tyvar_ty (uint16 i)) baseTypeSpec.GenericArgs)) - -let const_fspec nm (baseTypeSpec:ILTypeSpec) = - let const_fid = (const_fname nm,const_formal_field_ty nm baseTypeSpec) - ref_to_field_in_tspec baseTypeSpec const_fid - -let baseTypeSpec_of_cuspec cuspec = mk_tspec (tref_of_cuspec cuspec, inst_of_cuspec cuspec) - -let tspec_of_alt cuspec alt = cuspecRepr.TypeForAlterntative(cuspec,alt) |> tspec_of_typ -let typ_of_alt cuspec (alt:int) = cuspecRepr.TypeForAlterntative(cuspec,(alt_of_cuspec cuspec alt)) - - -let altinfo_of_cuspec cuspec cidx = - let alt = - try Ilx.alt_of_cuspec cuspec cidx - with _ -> failwith ("alternative "^string cidx^" not found") - let tspec = tspec_of_alt cuspec alt - name_of_alt alt,tspec,alt - -let rtt_discriminate derived_tspec = - [ I_isinst (Type_boxed derived_tspec); I_arith AI_ldnull; I_arith AI_cgt_un ] - -let ceq_then after = - match after with - | I_brcmp (BI_brfalse,a,b) -> [I_brcmp (BI_bne_un,a,b)] - | I_brcmp (BI_brtrue,a,b) -> [I_brcmp (BI_beq,a,b)] - | _ -> [I_arith AI_ceq; after] - -let rtt_discriminate_then derived_tspec after = - match after with - | I_brcmp (BI_brfalse,_,_) - | I_brcmp (BI_brtrue,_,_) -> - [ I_isinst (Type_boxed derived_tspec); after ] - | _ -> rtt_discriminate derived_tspec @ [ after ] - -let get_tag cenv cuspec baseTypeSpec = - [ mk_normal_ldfld (ref_to_field_in_tspec baseTypeSpec (virt_tag_field_id cenv.ilg)) ] - -let tag_discriminate cenv cuspec baseTypeSpec cidx = - get_tag cenv cuspec baseTypeSpec - @ [ mk_ldc_i32 (cidx); - I_arith AI_ceq ] - -let tag_discriminate_then cenv cuspec baseTypeSpec cidx after = - get_tag cenv cuspec baseTypeSpec - @ [ mk_ldc_i32 (cidx) ] - @ ceq_then after - -let rec conv_instr cenv tmps inplab outlab instr = - match instr with - | I_other e when is_ilx_ext_instr e -> - match (dest_ilx_ext_instr e) with - | (EI_newdata (cuspec, cidx)) -> - let nm,derived_tspec,alt = altinfo_of_cuspec cuspec cidx - if cuspecRepr.OptimizeAlternativeToNull (cuspec,alt) then - Choice1Of2 [ I_arith AI_ldnull ] - elif cuspecRepr.MaintainPossiblyUniqueConstantFieldForAlternative (cuspec,alt) then - let baseTypeSpec = baseTypeSpec_of_cuspec cuspec - Choice1Of2 [ mk_normal_call (mk_static_nongeneric_mspec_in_boxed_tspec(baseTypeSpec,"get_uniq_"^nm,[],const_formal_field_ty nm baseTypeSpec)) ] - elif cuspecRepr.OptimizeSingleNonNullaryAlternativeToRootClass (cuspec,alt) then - let baseTypeSpec = baseTypeSpec_of_cuspec cuspec - Choice1Of2 [ mk_normal_newobj(mk_ctor_mspec_for_boxed_tspec (baseTypeSpec,List.map (fun fd -> fd.fdType) (Array.to_list (fdefs_of_alt alt)))) ] - else - Choice1Of2 [ mk_normal_newobj(mk_ctor_mspec_for_boxed_tspec (derived_tspec,List.map (fun fd -> fd.fdType) (Array.to_list (fdefs_of_alt alt)))) ] - - | (EI_stdata (cuspec, cidx,fidx)) -> - let nm,derived_tspec,alt = altinfo_of_cuspec cuspec cidx - let (nm,ty) = backend_field_id (fdef_of_alt alt fidx) - Choice1Of2 [ mk_normal_call (mk_nongeneric_instance_mspec_in_boxed_tspec(derived_tspec,"set_"^nm,[ty],Type_void)) ] - - | (EI_lddata (cuspec,cidx,fidx)) -> - let nm,derived_tspec,alt = altinfo_of_cuspec cuspec cidx - let field_id = backend_field_id (fdef_of_alt alt fidx) - - // The only union type to use a mutable field outside its constructor - // is Microsoft.FSharp.Collections.List`1. The mutation is only used inside FSharp.Core.dll. - // This type must hide the field behind a getter/setter property pair. - match derived_tspec.Enclosing with - | ["Microsoft.FSharp.Collections.FSharpList`1"] -> - let (nm,ty) = field_id - Choice1Of2 [ mk_normal_call (mk_nongeneric_instance_mspec_in_boxed_tspec(derived_tspec,"get_"^nm,[],ty)) ] - | _ -> - let ILFieldSpec = ref_to_field_in_tspec derived_tspec field_id - Choice1Of2 [ I_ldfld (Aligned,Nonvolatile, ILFieldSpec) ] - - - | (EI_lddatatag cuspec) -> - let alts = alts_of_cuspec cuspec - if not (cuspecRepr.UseRuntimeTypes cuspec) then - let baseTypeSpec = baseTypeSpec_of_cuspec cuspec - Choice1Of2 (get_tag cenv cuspec baseTypeSpec) - elif List.length alts = 1 then - Choice1Of2 [ I_arith AI_pop; I_arith (AI_ldc(DT_I4,NUM_I4(0))) ] - else - let baseTypeSpec = baseTypeSpec_of_cuspec cuspec - let locn = alloc_tmp tmps (mk_local (mk_typ AsObject baseTypeSpec)) - - let mk_case last inplab cidx fail_lab = - let nm,derived_tspec,alt = altinfo_of_cuspec cuspec cidx - let internal_lab = generate_code_label () - let cmp_null = cuspecRepr.OptimizeAlternativeToNull (cuspec,alt) - if last then - mk_bblock2 (inplab,[ I_arith (AI_ldc(DT_I4,NUM_I4(cidx))); - I_br outlab ]) - else - let test = I_brcmp ((if cmp_null then BI_brtrue else BI_brfalse),fail_lab,internal_lab) - let test_block = - if cmp_null || cuspecRepr.OptimizeSingleNonNullaryAlternativeToRootClass (cuspec,alt) then - [ test ] - elif cuspecRepr.UseRuntimeTypes (cuspec) then - rtt_discriminate_then derived_tspec test - else - tag_discriminate_then cenv cuspec baseTypeSpec cidx test - mk_group_block - ([internal_lab], - [ mk_bblock2 (inplab, I_ldloc locn ::test_block); - mk_bblock2 (internal_lab,[I_arith (AI_ldc(DT_I4,NUM_I4(cidx))); I_br outlab ]) ]) - - // Make the block for the last test. - let last_inplab = generate_code_label () - let last_block = mk_case true last_inplab 0 outlab - - // Make the blocks for the remaining tests. - let _,first_inplab,overall_block = - List.foldBack - (fun _ (n,continue_inplab, continue_block) -> - let new_inplab = generate_code_label () - n+1, - new_inplab, - mk_group_block - ([continue_inplab], - [ mk_case false new_inplab n continue_inplab; - continue_block ])) - (List.tl alts) - (1,last_inplab, last_block) - - // Add on a branch to the first input label. This gets optimized away by the printer/emitter. - Choice2Of2 - (mk_group_block - ([first_inplab], - [ mk_bblock2 (inplab, [ I_stloc locn; I_br first_inplab ]); - overall_block ])) - - | (EI_castdata (canfail,cuspec,cidx)) -> - let nm,derived_tspec,alt = altinfo_of_cuspec cuspec cidx - if cuspecRepr.OptimizeAlternativeToNull (cuspec,alt) then - if canfail then - let baseTypeSpec = baseTypeSpec_of_cuspec cuspec - let internal1 = generate_code_label () - Choice2Of2 - (mk_group_block - ([internal1], - [ mk_bblock2 (inplab, - [ I_arith AI_dup; - I_brcmp (BI_brfalse,outlab, internal1) ]); - mk_bblock2 (internal1, - [ mk_mscorlib_exn_newobj cenv.ilg "System.InvalidCastException"; - I_throw ]); - ] )) - else - // If it can't fail, it's still verifiable just to leave the value on the stack unchecked - Choice1Of2 [] - - elif cuspecRepr.OptimizeSingleNonNullaryAlternativeToRootClass (cuspec,alt) then - Choice1Of2 [] - - else Choice1Of2 [ I_castclass (Type_boxed derived_tspec) ] - - | (EI_brisdata (cuspec,cidx,tg,fail_lab)) -> - let nm,derived_tspec,alt = altinfo_of_cuspec cuspec cidx - if cuspecRepr.OptimizeAlternativeToNull (cuspec,alt) then - Choice1Of2 [ I_brcmp (BI_brtrue,fail_lab,tg) ] - elif cuspecRepr.OptimizeSingleNonNullaryAlternativeToRootClass (cuspec,alt) then - Choice1Of2 [ I_brcmp (BI_brfalse,fail_lab,tg) ] - elif cuspecRepr.UseRuntimeTypes (cuspec) then - Choice1Of2 (rtt_discriminate_then derived_tspec (I_brcmp (BI_brfalse,fail_lab,tg))) - else - let baseTypeSpec = baseTypeSpec_of_cuspec cuspec - Choice1Of2 (tag_discriminate_then cenv cuspec baseTypeSpec cidx (I_brcmp (BI_brfalse,fail_lab,tg))) - - | (EI_isdata (cuspec,cidx)) -> - let nm,derived_tspec,alt = altinfo_of_cuspec cuspec cidx - if cuspecRepr.OptimizeAlternativeToNull (cuspec,alt) then - Choice1Of2 [ I_arith AI_ldnull; I_arith AI_ceq ] - elif cuspecRepr.OptimizeSingleNonNullaryAlternativeToRootClass (cuspec,alt) then - Choice1Of2 [ I_arith AI_ldnull; I_arith AI_cgt_un ] - elif cuspecRepr.UseRuntimeTypes (cuspec) then - Choice1Of2 (rtt_discriminate derived_tspec) - else - let baseTypeSpec = baseTypeSpec_of_cuspec cuspec - Choice1Of2 (tag_discriminate cenv cuspec baseTypeSpec cidx) - - | (EI_datacase (leave_on_stack,cuspec,cases,cont)) -> - let baseTypeSpec = baseTypeSpec_of_cuspec cuspec - - // REVIEW: tag discriminate should map to a switch even for verifiable code - // when we leave the result on the stack - this will need more casts inserted - if (leave_on_stack) || cuspecRepr.UseRuntimeTypes (cuspec) then - let locn = alloc_tmp tmps (mk_local (mk_typ AsObject baseTypeSpec)) - let mk_case last inplab (cidx,tg) fail_lab = - let nm,derived_tspec,alt = altinfo_of_cuspec cuspec cidx - let internal_lab = generate_code_label () - let cmp_null = cuspecRepr.OptimizeAlternativeToNull (cuspec,alt) - let use_one_block = not leave_on_stack - - let test = - let test_instr = - if use_one_block then I_brcmp ((if cmp_null then BI_brfalse else BI_brtrue),tg,fail_lab) - else I_brcmp ((if cmp_null then BI_brtrue else BI_brfalse),fail_lab,internal_lab) - - [ I_ldloc locn ] @ - (if cmp_null || cuspecRepr.OptimizeSingleNonNullaryAlternativeToRootClass (cuspec,alt) then - [ test_instr ] - - elif cuspecRepr.UseRuntimeTypes (cuspec) then - rtt_discriminate_then derived_tspec test_instr - else - tag_discriminate_then cenv cuspec baseTypeSpec cidx test_instr) - - if use_one_block then mk_bblock2 (inplab, test) - else - mk_group_block - ([internal_lab], - [ mk_bblock2 (inplab, test); - mk_bblock2 - (internal_lab, - (if leave_on_stack then - if not cmp_null then - [ I_ldloc locn; I_castclass (Type_boxed derived_tspec) ] - else [ I_ldloc locn ] - else []) @ - [ I_br tg ]) ]) - - // Make the block for the last test. - let last_inplab = generate_code_label () - let last_case,first_cases = - let l2 = List.rev cases in - List.hd l2, List.rev (List.tl l2) - - let last_block = mk_case true last_inplab last_case cont - - // Make the blocks for the remaining tests. - let first_inplab,overall_block = - List.foldBack - (fun case_info (continue_inplab, continue_block) -> - let new_inplab = generate_code_label () - new_inplab, - mk_group_block - ([continue_inplab], - [ mk_case false new_inplab case_info continue_inplab; - continue_block ])) - first_cases - (last_inplab, last_block) - - // Add on a branch to the first input label. This gets optimized - // away by the printer/emitter. - Choice2Of2 - (mk_group_block - ([first_inplab], - [ mk_bblock2 (inplab, [ I_stloc locn; I_br first_inplab ]); - overall_block ])) - else - let mk_case i _ = - if List.mem_assoc (i) cases then - List.assoc (i) cases - else cont - - let dests = List.mapi mk_case (alts_of_cuspec cuspec) - Choice1Of2 ((if leave_on_stack then [I_arith AI_dup] else []) @ - get_tag cenv cuspec baseTypeSpec @ - [ I_switch (dests,cont) ]) - - | _ -> Choice1Of2 [instr] - - | _ -> Choice1Of2 [instr] - - -let conv_ilmbody cenv il = - let tmps = new_tmps (List.length il.ilLocals) - let code= topcode_instr2code (conv_instr cenv tmps) il.ilCode - {il with - ilLocals = il.ilLocals @ get_tmps tmps; - ilCode=code; - ilMaxStack=il.ilMaxStack+2 } - -let conv_mdef cenv md = - {md with mdBody= mbody_ilmbody2ilmbody (conv_ilmbody cenv) md.mdBody } - -let mk_hidden_generated_instance_fdef ilg (nm,ty,init,access) = - mk_instance_fdef (nm,ty,init,access) - |> add_fdef_never_attrs ilg - |> add_fdef_generated_attrs ilg - -let mk_hidden_generated_static_fdef ilg (a,b,c,d,e) = - mk_static_fdef (a,b,c,d,e) - |> add_fdef_never_attrs ilg - |> add_fdef_generated_attrs ilg - -let conv_alternative_def cenv num (td:ILTypeDef) cud info cuspec (baseTypeSpec:ILTypeSpec) alt = - let attr = cud.cudWhere - let nm = name_of_alt alt - let fields = fdefs_of_alt alt - let altTypeSpec = tspec_of_alt cuspec alt - let repr = cudefRepr - - // These attributes get splattered all over the place - // REVIEW: rethink how and where we can attach custom attributes to discriminated unions - let addAltAttribs mdef = { mdef with mdCustomAttrs=alt.altCustomAttrs } - - // The stdata instruction is only ever used for the F# "List" type - // - // Microsoft.FSharp.Collections.List`1 is indeed immutable, but we use mutation on this type internally - // within FSharp.Core.dll - let isTotallyImmutable = (td.Name <> "Microsoft.FSharp.Collections.FSharpList`1") - - let uniqObjMeths = - - if alt_is_nullary alt && repr.MaintainPossiblyUniqueConstantFieldForAlternative (info,alt) then - [ mk_static_nongeneric_mdef - ("get_uniq_"^nm, - cud.cudReprAccess,[],mk_return(Type_boxed baseTypeSpec), - mk_impl(true,[],fields.Length, - nonbranching_instrs_to_code - (let fspec = const_fspec nm baseTypeSpec - [ I_ldsfld (Nonvolatile,fspec) ]), attr)) - |> conv_mdef cenv - |> add_mdef_generated_attrs cenv.ilg ] - else - [] - - let helperMeths,helperProps = - - if cud.cudHelpers then - - let makerMeths,makerProps = - - if alt_is_nullary alt then - - let nullaryMeth = - mk_static_nongeneric_mdef - ("get_"^nm, - cud.cudHelpersAccess,[],mk_return(Type_boxed baseTypeSpec), - mk_impl(true,[],fields.Length, - nonbranching_instrs_to_code - ([ (mk_IlxInstr (EI_newdata (cuspec, num)))]), attr)) - |> conv_mdef cenv - |> add_mdef_generated_attrs cenv.ilg - |> addAltAttribs - - let nullaryProp = - - { propName=nm; - propRTSpecialName=false; - propSpecialName=false; - propSet=None; - propGet=Some(mk_mref(baseTypeSpec.TypeRef,ILCallingConv.Static,"get_"^nm,0,[],Type_boxed baseTypeSpec)); - propCallconv=CC_static; - propType=Type_boxed baseTypeSpec; - propInit=None; - propArgs=[]; - propCustomAttrs=mk_custom_attrs []; } - |> add_pdef_generated_attrs cenv.ilg - |> add_pdef_never_attrs cenv.ilg - - [nullaryMeth],[nullaryProp] - - else - let mdef = - mk_static_nongeneric_mdef - (nm, - cud.cudHelpersAccess, - fields |> Array.map (fun fd -> mk_named_param (fd.fdName, fd.fdType)) |> Array.to_list, - mk_return(Type_boxed baseTypeSpec), - mk_impl(true,[],fields.Length, - nonbranching_instrs_to_code - (Array.to_list (Array.mapi (fun i _ -> I_ldarg (uint16 i)) fields) @ - [ (mk_IlxInstr (EI_newdata (cuspec, num)))]), attr)) - |> conv_mdef cenv - |> add_mdef_generated_attrs cenv.ilg - |> addAltAttribs - - [mdef],[] - - let testerMeths = - if cud.cudAlternatives.Length <= 1 then [] - elif repr.OptimizingOneAlternativeToNull info then [] - else - [ mk_instance_mdef - (tester_name nm, - cud.cudHelpersAccess,[], - mk_return cenv.ilg.typ_bool, - mk_impl(true,[],2,nonbranching_instrs_to_code - [ ldarg_0; - (mk_IlxInstr (EI_isdata (cuspec, num))) ], attr)) - |> conv_mdef cenv - |> add_mdef_generated_attrs cenv.ilg ] - - let getterMeths = - fields - |> Array.mapi (fun i fdef -> - mk_instance_mdef - ("get_"^getter_prop_name fields i, - cud.cudHelpersAccess,[], - mk_return fdef.fdType, - mk_impl(true,[],2, - nonbranching_instrs_to_code - [ ldarg_0; - (mk_IlxInstr (EI_castdata (true,cuspec, num))); - (mk_IlxInstr (EI_lddata (cuspec, num, i)))],attr)) - |> conv_mdef cenv - |> add_mdef_generated_attrs cenv.ilg) - |> Array.to_list - - let getterProps = - fields - |> Array.mapi (fun i fdef -> - { propName=getter_prop_name fields i; - propRTSpecialName=false; - propSpecialName=false; - propSet=None; - propGet=Some(mk_mref(baseTypeSpec.TypeRef,ILCallingConv.Instance,"get_"^getter_prop_name fields i,0,[],fdef.fdType)); - propCallconv=CC_instance; - propType=fdef.fdType; - propInit=None; - propArgs=[]; - propCustomAttrs= fdef.fdCustomAttrs; } - |> add_pdef_generated_attrs cenv.ilg - //|> add_pdef_never_attrs cenv.ilg - ) - |> Array.to_list - - testerMeths @ getterMeths @ makerMeths, getterProps @ makerProps - - else - [],[] - - let typeDefs,debugTypeDefs,nullaryFields = - if repr.OptimizeAlternativeToNull (info,alt) then [], [], [] - elif repr.OptimizeSingleNonNullaryAlternativeToRootClass (info,alt) then [], [], [] - else - let nullaryFields = - if repr.MaintainPossiblyUniqueConstantFieldForAlternative(info,alt) then - let basic = mk_hidden_generated_static_fdef cenv.ilg (const_fname nm, Type_boxed baseTypeSpec, None, None, MemAccess_assembly) - let uniqObjField = { basic with fdInitOnly=true } - let inRootClass = cuspecRepr.OptimizeAlternativeToRootClass (cuspec,alt) - - [ (info,alt, altTypeSpec,num,uniqObjField,inRootClass) ] - else - [] - - let typeDefs,debugTypeDefs = - if repr.OptimizeAllAlternativesToConstantFieldsInRootClass info then [],[] - elif repr.OptimizeAlternativeToConstantFieldInTaggedRootClass (info,alt) then [],[] - else - - let debugTypeDefs, debugAttrs = - if not cud.cudDebugProxies then [], [] - else - - let debugProxyTypeName = altTypeSpec.Name^"@DebugTypeProxy" - let debugProxyTypeSpec = mk_tspec(mk_nested_tref(altTypeSpec.Scope,altTypeSpec.Enclosing, debugProxyTypeName),altTypeSpec.GenericArgs) - let debugProxyFieldName = "_obj" - - let debugProxyFields = - [ mk_hidden_generated_instance_fdef cenv.ilg (debugProxyFieldName,Type_boxed altTypeSpec, None, MemAccess_private) ] - - let debugProxyCtor = - mk_ctor(MemAccess_public (* must always be public - see jared parson blog entry on implementing debugger type proxy *), - [ mk_named_param ("obj",Type_boxed altTypeSpec) ], - mk_impl - (false,[],3, - nonbranching_instrs_to_code - [ yield ldarg_0 - yield mk_normal_call (mk_ctor_mspec_for_boxed_tspec (cenv.ilg.tspec_Object,[])) - yield ldarg_0 - yield I_ldarg 1us; - yield mk_normal_stfld (mk_fspec_in_boxed_tspec (debugProxyTypeSpec,debugProxyFieldName,Type_boxed altTypeSpec)); ],None)) - - |> add_mdef_generated_attrs cenv.ilg - - let debugProxyGetterMeths = - fields - |> Array.mapi (fun i field -> - let nm,ty = backend_field_id field - mk_instance_mdef - ("get_"^getter_prop_name fields i, - MemAccess_public,[], - mk_return field.fdType, - mk_impl(true,[],2, - nonbranching_instrs_to_code - [ ldarg_0; - mk_normal_ldfld (mk_fspec_in_boxed_tspec (debugProxyTypeSpec,debugProxyFieldName,Type_boxed altTypeSpec)); - mk_normal_ldfld (mk_fspec_in_typ(Type_boxed altTypeSpec,nm,ty));],None)) - |> conv_mdef cenv - |> add_mdef_generated_attrs cenv.ilg) - |> Array.to_list - - let debugProxyGetterProps = - fields - |> Array.mapi (fun i fdef -> - { propName=getter_prop_name fields i; - propRTSpecialName=false; - propSpecialName=false; - propSet=None; - propGet=Some(mk_mref(debugProxyTypeSpec.TypeRef,ILCallingConv.Instance,"get_"^getter_prop_name fields i,0,[],fdef.fdType)); - propCallconv=CC_instance; - propType=fdef.fdType; - propInit=None; - propArgs=[]; - propCustomAttrs= fdef.fdCustomAttrs; } - |> add_pdef_generated_attrs cenv.ilg) - |> Array.to_list - let debugProxyTypeDef = - mk_generic_class (debugProxyTypeName, - TypeAccess_nested MemAccess_private, - td.tdGenericParams, - cenv.ilg.typ_Object, [], - mk_mdefs ([debugProxyCtor] @ debugProxyGetterMeths), - mk_fdefs debugProxyFields, - mk_properties debugProxyGetterProps, - mk_events [], - mk_custom_attrs []) - [ { debugProxyTypeDef with tdSpecialName=true } ], - ( [mk_DebuggerTypeProxyAttribute cenv.ilg (Type_boxed debugProxyTypeSpec)] @ cud.cudDebugDisplayAttributes) - - let basicTypeDef = - let basicFields = - fields - |> Array.map (fun field -> - let nm,ty = backend_field_id field - let fdef = mk_hidden_generated_instance_fdef cenv.ilg (nm,ty, None, (if isTotallyImmutable then cud.cudHelpersAccess else MemAccess_assembly)) - { fdef with fdInitOnly=isTotallyImmutable }) - |> Array.to_list - - let virtTagMeths = [] - - let setterMethods = - - // The stdata instruction is only ever used for the F# "List" type - if not isTotallyImmutable then - [ for field in fields do - let nm,ty = backend_field_id field - yield - mk_instance_mdef - ("set_"^nm, - MemAccess_assembly,[mk_unnamed_param ty],mk_return(Type_void), - mk_impl(true,[],2, - nonbranching_instrs_to_code - (let fspec = mk_fspec_in_boxed_tspec(altTypeSpec,nm,ty) - [ I_ldarg 0us; - I_ldarg 1us; - mk_normal_stfld fspec ]), attr)) - |> conv_mdef cenv - |> add_mdef_generated_attrs cenv.ilg - yield - mk_instance_mdef - ("get_"^nm, - cud.cudReprAccess,[],mk_return(ty), - mk_impl(true,[],2, - nonbranching_instrs_to_code - (let fspec = mk_fspec_in_boxed_tspec(altTypeSpec,nm,ty) - [ I_ldarg 0us; - mk_normal_ldfld fspec ]), attr)) - |> conv_mdef cenv - |> add_mdef_generated_attrs cenv.ilg ] - else - [] - - - let basicCtorMeth = - mk_storage_ctor - (attr , - [ yield ldarg_0 - if not (repr.UseRuntimeTypes info) then - yield I_arith (AI_ldc(DT_I4,NUM_I4(num))) - yield mk_normal_call (mk_ctor_mspec_for_boxed_tspec (baseTypeSpec,[cenv.ilg.typ_int32])) - else - yield mk_normal_call (mk_ctor_mspec_for_boxed_tspec (baseTypeSpec,[])) ], - altTypeSpec, - (basicFields |> List.map (fun fdef -> fdef.fdName, fdef.fdType) ), - cud.cudReprAccess) - |> add_mdef_generated_attrs cenv.ilg - - let tdef = - mk_generic_class (altTypeSpec.Name, - TypeAccess_nested cud.cudReprAccess, - td.tdGenericParams, - Type_boxed baseTypeSpec, [], - mk_mdefs (virtTagMeths @ [basicCtorMeth] @ setterMethods), - mk_fdefs basicFields, - mk_properties [], - mk_events [], - mk_custom_attrs debugAttrs) - { tdef with tdSerializable=td.tdSerializable; - tdSpecialName=true } - - [ basicTypeDef ], debugTypeDefs - - - typeDefs,debugTypeDefs,nullaryFields - - (uniqObjMeths@helperMeths),helperProps,typeDefs,debugTypeDefs,nullaryFields - - -let rec conv_cudef cenv enc td cud = - let baseTypeSpec = tspec_for_nested_tdef ScopeRef_local (enc,td) - let cuspec = IlxUnionSpec(IlxUnionRef(baseTypeSpec.TypeRef,cud.cudAlternatives,cud.cudNullPermitted), baseTypeSpec.GenericArgs) - let info = (enc,td,cud) - let repr = cudefRepr - - let _,aux_meths,aux_props,altTypeDefs,debugTypeDefs,nullaryFields = - Array.fold_left - (fun (num,msofar,psofar,csofar,dsofar,fsofar) alt -> - let ms,ps,cls,dcls,flds = conv_alternative_def cenv num td cud info cuspec baseTypeSpec alt - (num+1,msofar@ms, psofar@ps,csofar@cls,dsofar@dcls,fsofar@flds)) - (0,[],[],[],[],[]) - cud.cudAlternatives - - let selfFields,selfCtorMeths,selfNum = - match cud.cudAlternatives |> Array.to_list |> List.findi 0 (fun alt -> repr.OptimizeSingleNonNullaryAlternativeToRootClass (info,alt)) with - | Some (alt,altNum) -> - let fields = alt |> fdefs_of_alt |> Array.to_list |> List.map backend_field_id - let ctor = - mk_simple_storage_ctor - (cud.cudWhere, - (match td.tdExtends with None -> Some cenv.ilg.tspec_Object | Some typ -> Some (tspec_of_typ typ)), - baseTypeSpec, - fields, - cud.cudReprAccess) - |> add_mdef_generated_attrs cenv.ilg - - fields,[ctor],altNum - - | None -> - [],[],0 - - let virttagFields = - if repr.UseRuntimeTypes info then [] - else [ virt_tag_field_id cenv.ilg ] - - let selfAndVirtTagFields = - (selfFields @ virttagFields) - |> List.map (fun (nm,ty)-> - mk_hidden_generated_instance_fdef cenv.ilg (nm,ty, None, cud.cudReprAccess)) - - let virtTagMeths = [] - - let ctorMeths = - if (isNil selfFields && isNil virttagFields && nonNil selfCtorMeths) - || cud.cudAlternatives |> Array.forall (fun alt -> repr.OptimizeSingleNonNullaryAlternativeToRootClass (info,alt)) then - - [] (* no need for a second ctor in these cases *) - - else - [ mk_simple_storage_ctor - (cud.cudWhere, - (match td.tdExtends with None -> Some cenv.ilg.tspec_Object | Some typ -> Some (tspec_of_typ typ)), - baseTypeSpec, - virttagFields, - cud.cudReprAccess) - |> add_mdef_generated_attrs cenv.ilg ] - - // The following two are for the case where we're using virtual tags, and we - // need to generate a class for the nullary constructors we're optimizing to - // constant values. These constants each carry a field giving their appropriate tag. - // i.e. we don't really use virtual dispatch to save space on these. - let nullary_tspec = baseTypeSpec - let nullaryTypeDefs = [] - - // Now initialize the constant fields wherever they are stored... - let add_const_field_init cd = - if isNil nullaryFields then - cd - else - prepend_instrs_to_cctor - [ for (info,alt,altTypeSpec,fidx,fd,inRootClass) in nullaryFields do - let const_fid = (fd.fdName,Type_boxed baseTypeSpec) - let const_fspec = ref_to_field_in_tspec baseTypeSpec const_fid - if repr.UseRuntimeTypes info then - yield mk_normal_newobj (mk_ctor_mspec_for_boxed_tspec (altTypeSpec,[])); - elif inRootClass then - yield I_arith (AI_ldc(DT_I4,NUM_I4(fidx))); - yield mk_normal_newobj (mk_ctor_mspec_for_boxed_tspec (altTypeSpec,[cenv.ilg.typ_int32] )) - else - yield mk_normal_newobj (mk_ctor_mspec_for_boxed_tspec (altTypeSpec,[])); - yield mk_normal_stsfld const_fspec ] - cud.cudWhere - cd - - let tagMeths, tagProps, tagFields = - let tagFields = - cud.cudAlternatives |> Array.mapi (fun num alt -> - let fdef = mk_hidden_generated_static_fdef cenv.ilg ("tag_"^name_of_alt alt,cenv.ilg.typ_int32,Some(FieldInit_int32(num)),None,cud.cudHelpersAccess) - {fdef with fdLiteral = true}) - |> Array.to_list - - let tagMeths,tagProps = - - // If we are using NULL as a representation for an element of this type then we cannot - // use an instance method - if (repr.OptimizingOneAlternativeToNull info) then - [ mk_static_nongeneric_mdef - ("Get"^tagPropertyName, - cud.cudHelpersAccess, - [mk_unnamed_param (Type_boxed baseTypeSpec)], - mk_return (cenv.ilg.typ_int32), - mk_impl(true,[],2, - nonbranching_instrs_to_code - [ ldarg_0; - (mk_IlxInstr (EI_lddatatag cuspec)) ], - cud.cudWhere)) - |> conv_mdef cenv - |> add_mdef_generated_attrs cenv.ilg ], - [] - - else - [ mk_instance_mdef - ("get_"^tagPropertyName, - cud.cudHelpersAccess,[], - mk_return cenv.ilg.typ_int32, - mk_impl(true,[],2, - nonbranching_instrs_to_code - [ ldarg_0; - (mk_IlxInstr (EI_lddatatag cuspec)) ], - cud.cudWhere)) - |> conv_mdef cenv - |> add_mdef_generated_attrs cenv.ilg ], - - [ { propName=tagPropertyName; - propRTSpecialName=false; - propSpecialName=false; - propSet=None; - propGet=Some(mk_mref(baseTypeSpec.TypeRef,ILCallingConv.Instance,"get_"^tagPropertyName,0,[],cenv.ilg.typ_int32)); - propCallconv=CC_instance; - propType=cenv.ilg.typ_int32; - propInit=None; - propArgs=[]; - propCustomAttrs=mk_custom_attrs []; } - |> add_pdef_generated_attrs cenv.ilg - |> add_pdef_never_attrs cenv.ilg ] - - tagMeths,tagProps,tagFields - - // The class can be abstract if each alternative is represented by a derived type - let isAbstract = (altTypeDefs.Length = cud.cudAlternatives.Length) - - // If the class is abstract make the constructor used for the subclasses protected - let ctorMeths = - if isAbstract then - ctorMeths |> List.map (fun mdef -> {mdef with mdAccess=MemAccess_famandassem }) - else - ctorMeths - - let baseTypeDef = - { tdName = td.tdName; - tdNested = mk_tdefs (nullaryTypeDefs @ altTypeDefs @ debugTypeDefs @ dest_tdefs (conv_tdefs cenv (enc@[td]) td.tdNested)); - tdGenericParams= td.tdGenericParams; - tdAccess = td.tdAccess; - tdAbstract = isAbstract; - tdSealed = false; - tdSerializable=td.tdSerializable; - tdComInterop=false; - tdLayout=td.tdLayout; - tdSpecialName=td.tdSpecialName; - tdEncoding=td.tdEncoding ; - tdImplements = td.tdImplements; - tdExtends= (match td.tdExtends with None -> Some cenv.ilg.typ_Object | _ -> td.tdExtends) ; - tdMethodDefs= mk_mdefs (tagMeths @ virtTagMeths @ ctorMeths @ selfCtorMeths @ aux_meths @ List.map (conv_mdef cenv) (dest_mdefs td.tdMethodDefs)); - tdSecurityDecls=td.tdSecurityDecls; - - tdHasSecurity=td.tdHasSecurity; - tdFieldDefs=mk_fdefs (List.map (fun (_,_,_,_,fdef,_) -> fdef) nullaryFields @ - selfAndVirtTagFields @ - tagFields @ - dest_fdefs td.tdFieldDefs); - tdMethodImpls=td.tdMethodImpls; - tdInitSemantics=TypeInit_beforefield; - tdEvents=td.tdEvents; - tdProperties=mk_properties (tagProps @ aux_props @ dest_pdefs td.tdProperties); - tdCustomAttrs=td.tdCustomAttrs; - tdKind = TypeDef_class; } - - let baseTypeDef' = add_const_field_init baseTypeDef - baseTypeDef' - - -and conv_tdef cenv enc td = - match td.tdKind with - | TypeDef_other e when is_ilx_ext_type_def_kind e -> - begin match dest_ilx_ext_type_def_kind e with - | ETypeDef_closure cloinfo -> - {td with tdNested = conv_tdefs cenv (enc@[td]) td.tdNested; - tdMethodDefs=mdefs_mdef2mdef (conv_mdef cenv) td.tdMethodDefs; - tdKind= mk_IlxTypeDefKind(ETypeDef_closure (cloinfo_ilmbody2ilmbody (conv_ilmbody cenv) cloinfo)) } - | ETypeDef_classunion cud -> conv_cudef cenv enc td cud - end - | _ -> - {td with tdNested = conv_tdefs cenv (enc@[td]) td.tdNested; - tdMethodDefs=mdefs_mdef2mdef (conv_mdef cenv) td.tdMethodDefs; } - -and conv_tdefs cenv enc tdefs = - tdefs_tdef2tdef (conv_tdef cenv enc) tdefs - -let ConvModule ilg modul = - let cenv = { ilg=ilg; } - module_tdefs2tdefs (conv_tdefs cenv []) modul - - - diff --git a/tools/FSharp_1.9.6.16/source/ilx/ilxconfig.ml b/tools/FSharp_1.9.6.16/source/ilx/ilxconfig.ml deleted file mode 100644 index 04581f1a..00000000 --- a/tools/FSharp_1.9.6.16/source/ilx/ilxconfig.ml +++ /dev/null @@ -1,8 +0,0 @@ -// (c) Microsoft Corporation 2005-2009. -module Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Ilxconfig -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -let version = "1.9.6.16" -let default_tailcall_implementation = Ilxsettings.AllTailcalls -let default_call_implementation = Ilxsettings.VirtEntriesVirtCode -let default_entrypoint_implementation = Ilxsettings.MultiEntryPoints diff --git a/tools/FSharp_1.9.6.16/source/ilx/ilxerase.ml b/tools/FSharp_1.9.6.16/source/ilx/ilxerase.ml deleted file mode 100644 index 30340661..00000000 --- a/tools/FSharp_1.9.6.16/source/ilx/ilxerase.ml +++ /dev/null @@ -1,31 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved -#light - -module Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Ilxerase - -open Internal.Utilities - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -module Ilprint = Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL - -open Il -open Msilxlib -open Ilxsettings - -let SetNoTailCalls () = - Msilxlib.tailcall_implementation := Ilxsettings.NoTailcalls; - Ilprint.emit_tailcalls := false - -let SetTailCalls () = - Msilxlib.tailcall_implementation := Ilxsettings.AllTailcalls; - Ilprint.emit_tailcalls := true - -let ConvModuleFragment ilg modFragName modul = - let modul = EraseIlxClassunions.ConvModule ilg modul - let modul = Pubclo.ConvModule ilg modul - modul - -let ConvModule ilg modul = ConvModuleFragment ilg modul.modulName modul diff --git a/tools/FSharp_1.9.6.16/source/ilx/ilxsettings.ml b/tools/FSharp_1.9.6.16/source/ilx/ilxsettings.ml deleted file mode 100644 index 785bc578..00000000 --- a/tools/FSharp_1.9.6.16/source/ilx/ilxsettings.ml +++ /dev/null @@ -1,17 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved -module Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Ilxsettings - - -type call_implementation = - | VirtEntriesVirtCode -#if CLOSURES_VIA_POINTERS - | VirtEntriesPtrCode -#endif - -type tailcall_implementation = - | AllTailcalls - | NoTailcalls - -type entrypoint_implementation = - | MultiEntryPoints - diff --git a/tools/FSharp_1.9.6.16/source/ilx/msilxlib.ml b/tools/FSharp_1.9.6.16/source/ilx/msilxlib.ml deleted file mode 100644 index c9095502..00000000 --- a/tools/FSharp_1.9.6.16/source/ilx/msilxlib.ml +++ /dev/null @@ -1,40 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -module Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Msilxlib - -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX - -open Ilxsettings - -let compiling_msilxlib_ref = ref false - -let publickey = PublicKeyToken(Bytes.of_intarray [|103;241;202;169;071;205;028;035|]) - -let version = IL.parse_version Ilxconfig.version - -let ilxLibraryAssemRef = ref (None : ILAssemblyRef option) - -(* How are closures implemented? *) -let call_implementation = ref Ilxconfig.default_call_implementation -let tailcall_implementation = ref Ilxconfig.default_tailcall_implementation -let entrypoint_implementation = ref Ilxconfig.default_entrypoint_implementation - - -let assref nm = ILAssemblyRef.Create(nm, None, Some publickey,false, Some version, None) - -let scoref () = - if !compiling_msilxlib_ref then ScopeRef_local - else - ScopeRef_assembly - (match !ilxLibraryAssemRef with - | Some o -> o - | None -> assref "FSharp.Core" (* failwith "ilxLibraryAssemRef is not set" *) ) - -let ilxNamespace () = "Microsoft.FSharp.Core" - -let minCLIMetadataVersion () = IL.parse_version "2.0.0" - diff --git a/tools/FSharp_1.9.6.16/source/ilx/pubclo.ml b/tools/FSharp_1.9.6.16/source/ilx/pubclo.ml deleted file mode 100644 index e785dd3d..00000000 --- a/tools/FSharp_1.9.6.16/source/ilx/pubclo.ml +++ /dev/null @@ -1,1138 +0,0 @@ -// (c) Microsoft Corporation. All rights reserved - -#light - -module Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Pubclo - -open Internal.Utilities - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -open Microsoft.FSharp.Compiler.AbstractIL.Morphs -open Microsoft.FSharp.Compiler.PrettyNaming - -module Ildiag = Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -module Ilx = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -module Ilprint = Microsoft.FSharp.Compiler.AbstractIL.AsciiWriter -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL -module Illib = Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -open Ildiag -open Illib -open Il -open Ilx -open Ilprint -open Msilxlib -open Ilxsettings - -let add_mdef_generated_attrs_to_tdef ilg tdef = - { tdef with tdMethodDefs = tdef.tdMethodDefs |> dest_mdefs |> List.map (fun md -> md |> add_mdef_generated_attrs ilg) |> mk_mdefs } - -// -------------------------------------------------------------------- -// Erase closures and function types -// by compiling down to code pointers, classes etc. -// -------------------------------------------------------------------- - -let notlazy v = Lazy.CreateFromValue v -let logging = false -let _ = if logging then dprintn "*** warning: Clo2_erase.logging is on" - -let rec strip_upto n test dest x = - if n = 0 then ([],x) else - if test x then - let l,r = dest x - let ls,res = strip_upto (n-1) test dest r - (l::ls),res - else ([],x) - -(* -------------------------------------------------------------------- - * Flags. These need to match the various classes etc. in the - * ILX standard library, and the parts - * of the makefile that select the right standard library for a given - * combination of flags. - * - * Beyond this, the translation inserts classes or value classes for - * the closure environment. - * -------------------------------------------------------------------- *) - -let erase_method_pointers = ref true - -type tyfunc_implementation = - | TyFuncCallVirt - -let tyfunc_implementation = ref TyFuncCallVirt - -#if CLOSURES_VIA_POINTERS -let max_free_vars = ref 2 (* This turns out better than 4... Makes sense for generic code (fewer classes/RTTs), but can't think why for nongenericmorphic code. *) -let min_free_vars = ref 0 -#endif - -let dest_tyabsstruct = function Lambdas_forall(l,r) -> (l,r) | _ -> failwith "no" -let is_tyabsstruct = function Lambdas_forall(l,r) -> true | _ -> false -let is_tyfunc_app = function Apps_tyapp (b,c) ->true | _ -> false - -let strip_tyabsstruct_upto n lambdas = strip_upto n is_tyabsstruct dest_tyabsstruct lambdas - -(* -------------------------------------------------------------------- - * Three very important tables!! - * -------------------------------------------------------------------- *) - -let support_multilam() = true - -(* Supported indirect calling conventions: *) -(* 0 *) -(* 0_1 *) -(* 0_1_1 *) -(* 0_1_1_1 *) -(* 1 *) -(* 1_1 *) -(* 1_1_1 *) -(* 1_1_1_1 *) -(* 1_1_1_1_1 *) -(* plus type applications - up to 7 in one step *) -(* Nb. later code currently takes advantage of the fact that term *) -(* and type applications are never mixed in a single step. *) -let strip_supported_indirect_call apps = - match apps with - | Apps_app(x,Apps_app(y,Apps_app(z,Apps_app(w,Apps_app(v,rest))))) when support_multilam() -> [],[x;y;z;w;v],rest - | Apps_app(x,Apps_app(y,Apps_app(z,Apps_app(w,rest)))) when support_multilam() -> [],[x;y;z;w],rest - | Apps_app(x,Apps_app(y,Apps_app(z,rest))) when support_multilam() -> [],[x;y;z],rest - | Apps_app(x,Apps_app(y,rest)) when support_multilam() -> [],[x;y],rest - | Apps_app(x,rest) -> [],[x],rest - | Apps_tyapp _ -> - let max_tyapps = 1 - let tys,rest = strip_upto max_tyapps is_tyfunc_app dest_tyfunc_app apps - tys,[],rest - | rest -> [],[],rest - -(* Supported conventions for baking closures: *) -(* 0 *) -(* 1 *) -(* 1_1 *) -(* 1_1_1 *) -(* 1_1_1_1 *) -(* 1_1_1_1_1 *) -(* plus type applications - up to 7 in one step *) -(* Nb. later code currently takes advantage of the fact that term *) -(* and type applications are never mixed in a single step. *) -let strip_supported_abstraction lambdas = - match lambdas with - | Lambdas_lambda(x,Lambdas_lambda(y,Lambdas_lambda(z,Lambdas_lambda(w,Lambdas_lambda(v,rest))))) when support_multilam() -> [],[x;y;z;w;v],rest - | Lambdas_lambda(x,Lambdas_lambda(y,Lambdas_lambda(z,Lambdas_lambda(w,rest)))) when support_multilam() -> [],[x;y;z;w],rest - | Lambdas_lambda(x,Lambdas_lambda(y,Lambdas_lambda(z,rest))) when support_multilam() -> [],[x;y;z],rest - | Lambdas_lambda(x,Lambdas_lambda(y,rest)) when support_multilam() -> [],[x;y],rest - | Lambdas_lambda(x,rest) -> [],[x],rest - | Lambdas_forall _ -> - let max_tyapps = 1 - let tys,rest = strip_tyabsstruct_upto max_tyapps lambdas - tys,[],rest - | rest -> [],[],rest - -(* This must correspond to strip_supported_abstraction *) -let is_supported_direct_call = function - | Apps_app (_,Apps_done _) when support_multilam() -> true - | Apps_app (_,Apps_app (_, Apps_done _)) when support_multilam() -> true - | Apps_app (_,Apps_app (_,Apps_app (_, Apps_done _))) when support_multilam() -> true - | Apps_app (_,Apps_app (_,Apps_app (_, Apps_app (_, Apps_done _)))) when support_multilam() -> true - | Apps_tyapp _ -> false - | _ -> false - -(* -------------------------------------------------------------------- - * Prelude for function types. Only use System.Func for now, prepare - * for more refined types later. - * -------------------------------------------------------------------- *) - -let funcbase () = "FastFunc" - -let tref_TyFunc () = (mk_tref (Msilxlib.scoref (), Msilxlib.ilxNamespace () ^ ".TypeFunc")) -let tref_TyFuncStatics () = (mk_tref (Msilxlib.scoref (), Msilxlib.ilxNamespace () ^ ".TyFuncStatics")) -let tspec_TyFunc () = mk_nongeneric_tspec (tref_TyFunc ()) -let mk_typ_TyFunc () = Type_boxed (tspec_TyFunc()) - -let mk_tref_Func1 () = (mk_tref (Msilxlib.scoref (),Msilxlib.ilxNamespace () ^ "." ^ funcbase () ^ "`2")) -let mk_tref_Func1Statics () = (mk_tref (Msilxlib.scoref (),Msilxlib.ilxNamespace () ^ ".FuncStatics")) - -let mk_tref_Func(n) = - if n = 1 then mk_tref_Func1() - else mk_nested_tref (Msilxlib.scoref (), - [Msilxlib.ilxNamespace () ^ ".OptimizedClosures"], - "FastFunc" ^ string n ^ "`"^ string (n + 1)) - -type cenv = - { ilg:ILGlobals; - tref_Func: ILTypeRef array; - tref_TyFunc: ILTypeRef; - typ_TyFunc: ILType; - tref_Func1Statics: ILTypeRef } - -let new_cenv(ilg) = - { ilg=ilg; - tref_Func= Array.init 10 (fun i -> mk_tref_Func(i+1)); - tref_TyFunc=tref_TyFunc(); - typ_TyFunc=mk_typ_TyFunc(); - tref_Func1Statics=mk_tref_Func1Statics() } - -let tref_Func1 cenv = cenv.tref_Func.[0] - -let typ_TyFunc cenv (x:ILGenericParameterDef) (y:ILType) = cenv.typ_TyFunc - -let tspec_Func1 cenv dty rty = mk_tspec (cenv.tref_Func.[0],[dty;rty]) -let typ_Func1 cenv dty rty = Type_boxed (tspec_Func1 cenv dty rty) -let typl_Func cenv dtys rty = List.foldBack (typ_Func1 cenv) dtys rty - -let tref_Func cenv n = if n <= 10 then cenv.tref_Func.[n-1] else mk_tref_Func(n) -let tspec_Func cenv dtys rty = mk_tspec (tref_Func cenv (List.length dtys),dtys @ [rty]) -let typ_Func cenv dtys rty = Type_boxed (tspec_Func cenv dtys rty) - -let rec type_of_apps cenv apps = - match apps with - | Apps_tyapp (gactual,rest) -> cenv.typ_TyFunc - | Apps_app (dty,rest) -> typ_Func1 cenv dty (type_of_apps cenv rest) - | Apps_done rty -> rty - -let rec typ_of_lambdas cenv lam = - match lam with - | Lambdas_return rty -> rty - | Lambdas_lambda(d,r) -> typ_Func1 cenv d.Type (typ_of_lambdas cenv r) - | Lambdas_forall(b,rest) -> cenv.typ_TyFunc - -type spill_cases = - | UnderOrNoSpill of IlxClosureFreeVar list * int -#if CLOSURES_VIA_POINTERS - | OverSpill of IlxClosureFreeVar list * ILBoxity * IlxClosureFreeVar list -#endif - - -#if CLOSURES_VIA_POINTERS -(* -------------------------------------------------------------------- - * Spilling (VirtEntriesPtrCode only) - * -------------------------------------------------------------------- *) - -let mk_fvbundle_name nm = nm^"_FVspill" -let fvbundle_tref_of_tref (tref:ILTypeRef) = ILTypeRef.Create(Scope=tref.Scope, Enclosing=tref.Enclosing, Name=mk_fvbundle_name tref.Name) -let fvbundle_tref_of_clospec clospec = fvbundle_tref_of_tref (tref_of_clospec clospec) - -let tspec_fvbundle fvtref inst = mk_tspec (fvtref,inst) -let typ_fvbundle boxed fvtref inst = mk_typ boxed (tspec_fvbundle fvtref inst) - -let spill_cases fields = - if !call_implementation = VirtEntriesVirtCode then UnderOrNoSpill (fields,0) else - if List.length fields < !min_free_vars then - UnderOrNoSpill (fields, (!min_free_vars - List.length fields)) - else if List.length fields <= !max_free_vars then - UnderOrNoSpill (fields, 0) - else - let a,b = chop (!max_free_vars - 1) fields - OverSpill (a, AsObject,b) - -let tspec_fvbundle_clospec clospec = tspec_fvbundle( fvbundle_tref_of_clospec clospec) (inst_of_clospec clospec) -let typ_fvbundle_clospec clospec = Type_boxed (tspec_fvbundle_clospec clospec) -#else -let spill_cases fields = UnderOrNoSpill (fields,0) -#endif - -(* -------------------------------------------------------------------- - * From closure refs to type refs (VirtEntriesVirtCode only) - * -------------------------------------------------------------------- *) - -let callvirt_tspec_Thunk rty = - let tref = mk_tref(Msilxlib.scoref (),Msilxlib.ilxNamespace () ^ ".Thunk") - mk_tspec(tref,[rty]) - -#if CLOSURES_VIA_POINTERS -(* -------------------------------------------------------------------- - * From closure refs to type refs (VirtEntriesPtrCode only) - * -------------------------------------------------------------------- *) - -let clotempl_fvbundle_fields cenv fvtref inst fields = - if !call_implementation = VirtEntriesVirtCode then failwith "clotempl_fvbundle_fields cenv: call_implementation = VirtEntriesVirtCode"; - match spill_cases fields with - | UnderOrNoSpill (flds,n) -> List.map typ_of_freevar flds @ replicate n cenv.ilg.typ_Object - | OverSpill (a,boxed,b) -> List.map typ_of_freevar a @ [ typ_fvbundle boxed fvtref inst ] - -let clotempl_tspec_Func1Clo (dtys,rty,fields) = - let tref = mk_tref(Msilxlib.scoref (),Msilxlib.ilxNamespace () ^ ".Func"^string (List.length dtys)^"Clo"^string (List.length fields)) - mk_tspec(tref,(dtys@(rty::fields))) - -(* type reference for the function value itself *) -let clospec_to_clotempl_tspec cenv clospec = - match formal_lambdas_of_clospec clospec with - | Lambdas_forall _ | Lambdas_return _ -> clospec_to_class_tspec clospec - | Lambdas_lambda _ -> - let tyargsl,argtys,r = strip_supported_abstraction (formal_lambdas_of_clospec clospec) - assert (tyargsl = []); - let d = argtys - let d' = typs_of_params d - let r' = typ_of_lambdas cenv r - let f' = - let f = actual_freevars_of_clospec clospec - let i = inst_of_clospec clospec - clotempl_fvbundle_fields cenv (fvbundle_tref_of_clospec clospec) i f - clotempl_tspec_Func1Clo (d',r',f') - -let general_clotempl_type_of_clospec cenv clospec = - Type_boxed (clospec_to_clotempl_tspec cenv (generalize_cloref (gparams_of_inst (inst_of_clospec clospec)) (cloref_of_clospec clospec))) -#endif - -(* type reference for the function value itself *) -let clospec_to_class_tspec clospec = mk_tspec(tref_of_clospec clospec, inst_of_clospec clospec) - -(* -------------------------------------------------------------------- - * Fields for free variables in closures - * -------------------------------------------------------------------- *) - -let fv_name fv = fv.fvName - -let clofld_field_name spill clospec n = -#if CLOSURES_VIA_POINTERS - if spill - || (match !call_implementation with | VirtEntriesVirtCode -> true | VirtEntriesPtrCode -> false) - || (match formal_lambdas_of_clospec clospec with | Lambdas_forall _ | Lambdas_return _ -> true | _ -> false) then -#endif - fv_name (List.nth (formal_freevars_of_clospec clospec) n) -#if CLOSURES_VIA_POINTERS - else - "_fv"^string (n+1) -#endif - -let clospec_to_tspec cenv clospec = - match formal_lambdas_of_clospec clospec with - | Lambdas_forall _ | Lambdas_return _ -> clospec_to_class_tspec clospec - | _ -> -#if CLOSURES_VIA_POINTERS - match !call_implementation with - | VirtEntriesPtrCode -> clospec_to_clotempl_tspec cenv clospec - | VirtEntriesVirtCode -> -#endif - clospec_to_class_tspec clospec - -let mk_clofld_ref_clospec cenv clospec n = - let tspec = clospec_to_tspec cenv clospec - match formal_lambdas_of_clospec clospec with - | Lambdas_forall _ | Lambdas_return _ -> - let ty = formal_freevar_type_of_clospec clospec n - mk_fspec_in_boxed_tspec (tspec,clofld_field_name false clospec n,ty) - | Lambdas_lambda (d,_) -> -#if CLOSURES_VIA_POINTERS - match !call_implementation with - | VirtEntriesPtrCode -> - let tyargsl,argtys,r = strip_supported_abstraction (formal_lambdas_of_clospec clospec) - assert (tyargsl = []); - let d = argtys - mk_fspec_in_boxed_tspec - (tspec, - clofld_field_name false clospec n, - Type_tyvar (uint16 (n+ (List.length d + 1)))) - | VirtEntriesVirtCode -> -#endif - let ty = formal_freevar_type_of_clospec clospec n - mk_fspec_in_boxed_tspec (tspec,clofld_field_name false clospec n,ty) - -let mk_nonspill_clofld_ref_clospec cenv clospec n = - mk_clofld_ref_clospec cenv clospec n - -#if CLOSURES_VIA_POINTERS -let mk_spill_clofld_ref_clospec clospec nonspill_size field_num = - let tspec = tspec_fvbundle_clospec clospec - mk_fspec_in_boxed_tspec (tspec,clofld_field_name true clospec field_num,(nth (formal_freevars_of_clospec clospec) field_num).fvType) - -let mk_fvbundle_fldref cenv clospec nonspill_size = - mk_clofld_ref_clospec cenv clospec nonspill_size -#endif - -(* -------------------------------------------------------------------- - * Method to call for a particular multi-application - * -------------------------------------------------------------------- *) - -let mspec_for_multi_value_app cenv (argtys',rty) = - let n = List.length argtys' - let formal_argtys = List.mapi (fun i _ -> Type_tyvar (uint16 i)) argtys' - let formal_rty = Type_tyvar (uint16 n) - let inst = argtys'@[rty] - if List.length argtys' = 1 then - true, - (mk_nongeneric_instance_mspec_in_boxed_tspec - (mk_tspec (tref_Func1 cenv,inst),"Invoke",formal_argtys, formal_rty)) - else - false, - (mk_static_mspec_in_boxed_tspec - (tspec_Func1 cenv (List.hd inst) (List.hd (List.tl inst)), - "InvokeFast", - [typl_Func cenv formal_argtys formal_rty]@ (formal_argtys), - formal_rty, - List.tl (List.tl inst))) - -let callblock_for_multi_value_app cenv do_tailcall (args',rty') inplab outlab = - let callvirt,mr = mspec_for_multi_value_app cenv (args',rty') - let instrs = [if callvirt then I_callvirt (do_tailcall,mr, None) else I_call (do_tailcall,mr, None) ] - if do_tailcall = Tailcall then nonbranching_instrs inplab instrs - else nonbranching_instrs_then_br inplab instrs outlab - -let method_name_for_callclo_ptr nm = nm - -let mspec_for_callclo_virt cenv clospec = - let tyargsl,argtys,rstruct = strip_supported_abstraction (formal_lambdas_of_clospec clospec) - if tyargsl <> [] then failwith "mspec_for_callclo_virt: internal error"; - let rty' = typ_of_lambdas cenv rstruct - let argtys' = typs_of_params argtys - let minst' = inst_of_clospec clospec - (mk_instance_mspec_in_boxed_tspec(clospec_to_tspec cenv clospec,"Invoke",argtys',rty',minst')) - -#if CLOSURES_VIA_POINTERS -let class_name_for_apply_meths = "" - -let mspec_for_callclo_ptr cenv clospec = - let tyargsl,argtys,rstruct = strip_supported_abstraction (formal_lambdas_of_clospec clospec) - if tyargsl <> [] then failwith "mspec_for_callclo_ptr: internal error"; - let rty' = typ_of_lambdas cenv rstruct - let argtys' = typs_of_params argtys - let minst' = inst_of_clospec clospec - let formal_clo_typ = general_clotempl_type_of_clospec cenv clospec - mk_static_mspec_in_nongeneric_boxed_tref - (mk_tref (ScopeRef_local, class_name_for_apply_meths ), - method_name_for_callclo_ptr (tref_of_clospec clospec).Name, - ([formal_clo_typ]@argtys'),rty',minst') -#endif - -let mspec_for_callclo cenv clospec = -#if CLOSURES_VIA_POINTERS - match !call_implementation with - | VirtEntriesPtrCode -> mspec_for_callclo_ptr cenv clospec - | VirtEntriesVirtCode -> -#endif - mspec_for_callclo_virt cenv clospec - -(* -------------------------------------------------------------------- - * Translate instructions.... - * -------------------------------------------------------------------- *) - -#if CLOSURES_VIA_POINTERS -let mk_callptr_baker_mspec cenv clospec actual_argtys' actual_rty' actual_fields' = - let nargs = List.length actual_argtys' - let nfields = List.length actual_fields' - let name_of_baker = "bake"^string nargs^"_"^string nfields - let nfunc_tyvars = nargs+1 - let formal_field_tyvars = List.map (fun n -> Type_tyvar (uint16 (n+nfunc_tyvars-1))) (range 1 nfields) - let formal_ret_tyvar = Type_tyvar (uint16 nargs) - let args = List.map (fun n -> Type_tyvar (uint16 n)) (range 0 (nargs-1)) - let formal_rtyp_of_baker = typl_Func cenv args formal_ret_tyvar - let formal_argtys_of_baker = - formal_field_tyvars@ - [ if !erase_method_pointers then cenv.ilg.typ_UIntPtr - else Type_fptr (mk_callsig(ILCallingConv.Static, [ formal_rtyp_of_baker ] @ args,formal_ret_tyvar))] - - let minst = actual_argtys'@(actual_rty' :: actual_fields') - (* intern_mspec cenv.m *) - (mk_static_mspec_in_nongeneric_boxed_tref(cenv.tref_Func1Statics,name_of_baker,formal_argtys_of_baker,formal_rtyp_of_baker,minst)) -#endif - -let mk_ldfldg lda = (if lda then mk_normal_ldflda else mk_normal_ldfld) -#if CLOSURES_VIA_POINTERS -let mk_ldfld_spill boxed = (if boxed = AsObject then mk_normal_ldfld else mk_normal_ldflda) -#endif - -let conv_stclofld cenv tmps clospec n = - match formal_lambdas_of_clospec clospec with - | Lambdas_forall _ | Lambdas_return _ -> - [ mk_normal_stfld (mk_nonspill_clofld_ref_clospec cenv clospec n) ] - | Lambdas_lambda _ -> - match spill_cases (actual_freevars_of_clospec clospec) with - | UnderOrNoSpill _ -> - [ mk_normal_stfld (mk_nonspill_clofld_ref_clospec cenv clospec n) ] -#if CLOSURES_VIA_POINTERS - | OverSpill (a,_,_) when n < List.length a -> - [ mk_normal_stfld (mk_nonspill_clofld_ref_clospec cenv clospec n) ] - | OverSpill (a,boxed,b) -> - let stored_item_fspec' = mk_spill_clofld_ref_clospec clospec (List.length a) n - let stored_item_typ = actual_typ_of_fspec stored_item_fspec' - let env_fspec = mk_fvbundle_fldref cenv clospec (List.length a) - let locn = alloc_tmp tmps (mk_local stored_item_typ) - [ I_stloc locn; - mk_ldfld_spill boxed env_fspec; - I_ldloc locn; - mk_normal_stfld stored_item_fspec' ] -#endif - -let conv_ldenv cenv lda clospec n = - match formal_lambdas_of_clospec clospec with - | Lambdas_forall _ | Lambdas_return _ -> - [ ldarg_0; - mk_ldfldg lda (mk_nonspill_clofld_ref_clospec cenv clospec n) ] - | Lambdas_lambda _ -> - match spill_cases (formal_freevars_of_clospec clospec) with - | UnderOrNoSpill (a,_) -#if CLOSURES_VIA_POINTERS - | OverSpill (a,_,_) -#endif - when n < List.length a -> - [ ldarg_0; - mk_ldfldg lda (mk_nonspill_clofld_ref_clospec cenv clospec n) ] -#if CLOSURES_VIA_POINTERS - | OverSpill (a,boxed,b) -> - [ (* load up a reference to the spill bundle *) - ldarg_0; - mk_ldfld_spill boxed (mk_fvbundle_fldref cenv clospec (List.length a)); - (* load the field or field address from the spill bundle via the reference *) - mk_ldfldg lda (mk_spill_clofld_ref_clospec clospec (List.length a) n) ] -#endif - | UnderOrNoSpill _ -> failwith "Unexpected" - -let rec conv_instr cenv tmps ((this_genparams,this_clo) as this_info) inplab outlab instr = - match instr with - | (EI_ilzero typ) -> - let n = alloc_tmp tmps (mk_local typ) - Choice1Of2 [ I_ldloca n; I_initobj typ; I_ldloc n ] - | I_other e when is_ilx_ext_instr e -> - match (dest_ilx_ext_instr e) with - | (EI_castclo clospec) -> Choice1Of2 [ I_castclass (Type_boxed (clospec_to_tspec cenv clospec)) ] - - | (EI_isclo clospec) -> Choice1Of2 [ I_isinst (Type_boxed (clospec_to_tspec cenv clospec)) ] - | (EI_newclo clospec) -> - let cspec = clospec_to_tspec cenv clospec - match formal_lambdas_of_clospec clospec with - | Lambdas_forall _ | Lambdas_return _ -> - let fields = formal_freevars_of_clospec clospec - let maker_mspec = (* intern_mspec cenv.m *) (mk_ctor_mspec_for_boxed_tspec (cspec,List.map (typ_of_freevar) fields)) - Choice1Of2 [ I_newobj (maker_mspec,None) ] - | Lambdas_lambda _ -> -#if CLOSURES_VIA_POINTERS - match !call_implementation with - | VirtEntriesPtrCode -> - let code_mspec = mspec_for_callclo_ptr cenv clospec - - let formal_tyargsl,formal_argtys,formal_rstruct = strip_supported_abstraction (formal_lambdas_of_clospec clospec) - if formal_tyargsl <> [] then failwith "newclo: internal error - unexpected type abstraction"; - let formal_rty' = typ_of_lambdas cenv formal_rstruct - let formal_argtys' = typs_of_params formal_argtys - - let actual_tyargsl,actual_argtys,actual_rstruct = strip_supported_abstraction (actual_lambdas_of_clospec clospec) - if actual_tyargsl <> [] then failwith "newclo: internal error - unexpected type abstraction"; - let actual_rty' = typ_of_lambdas cenv actual_rstruct - let actual_argtys' = typs_of_params actual_argtys - - let formal_fields' = List.map (typ_of_freevar) (formal_freevars_of_clospec clospec) - let actual_fields' = actual_freevars_of_clospec clospec - - let inst' = inst_of_clospec clospec - let ld_env = - match spill_cases actual_fields' with - | UnderOrNoSpill (_,n) -> replicate n (I_arith AI_ldnull) - | OverSpill (_,boxed,b) -> - match spill_cases (formal_freevars_of_clospec clospec) with - | OverSpill (_,_,formal_b) -> - [ mk_normal_newobj(mk_ctor_mspec(fvbundle_tref_of_clospec clospec,boxed,List.map (typ_of_freevar) formal_b,inst')) ] - | _ -> failwith "internal error: ld_env" - end - let baker_mspec = - let bundled_fields' = clotempl_fvbundle_fields cenv (fvbundle_tref_of_clospec clospec) inst' actual_fields' - mk_callptr_baker_mspec cenv clospec actual_argtys' actual_rty' bundled_fields' - - Choice1Of2 (ld_env @ [ (mk_IlxInstr (EI_ldftn_then_call (code_mspec, (Normalcall,baker_mspec,None)))) ]) - | VirtEntriesVirtCode -> -#endif - let fields = formal_freevars_of_clospec clospec - let maker_mspec = (* intern_mspec cenv.m *) (mk_ctor_mspec_for_boxed_tspec (cspec,List.map (typ_of_freevar) fields)) - Choice1Of2 [ I_newobj (maker_mspec,None) ] - - | (EI_stclofld (clospec,n)) -> - Choice1Of2 (conv_stclofld cenv tmps clospec n) - - | (EI_ldenv ( n)) -> - match this_clo with - | None -> failwith "ldenv in non-closure" - | Some (_,clospec) -> Choice1Of2 (conv_ldenv cenv false clospec n) - - | (EI_stenv ( n)) -> - match this_clo with - | None -> failwith "stenv in non-closure" - | Some (_,clospec) -> Choice1Of2 (conv_stclofld cenv tmps clospec n) - - | (EI_ldenva ( n)) -> - match this_clo with - | None -> failwith "ldenv in non-closure" - | Some (_,clospec) -> Choice1Of2 (conv_ldenv cenv true clospec n) - - | i when (match i with EI_callfunc _ -> true | EI_callclo _ -> true | _ -> false) -> - (* "callfunc" and "callclo" instructions become a series of indirect *) - (* calls or a single direct call. *) - let var_count = List.length this_genparams - let tl,apps,direct_clo = - match i with - | EI_callfunc (tl,apps) -> tl,apps,None - | EI_callclo (tl,clospec,apps) when not (is_supported_direct_call apps) -> tl,apps,None - | EI_callclo (tl,clospec,apps) -> tl,apps,Some clospec - | _ -> failwith "Unexpected call instruction" - match direct_clo with - | Some clospec -> Choice1Of2 [I_call (tl, mspec_for_callclo cenv clospec,None) ] - | None -> - - (* Unwind the stack until the arguments given in the apps have *) - (* all been popped off. The apps given to this function is *) - (* what remains after the first "strip" of suitable arguments for the *) - (* first call. *) - (* Loaders and storers are returned in groups. Storers are used to pop *) - (* the arguments off the stack that correspond to all the arguments in *) - (* the apps, and the loaders are used to load them back on. *) - let rec unwind apps = - match apps with - | Apps_tyapp (actual,rest) -> - let rest = inst_apps_aux var_count [actual] rest - let storers,loaders = unwind rest - [] :: storers, [] :: loaders - | Apps_app (arg,rest) -> - let storers, loaders =unwind rest - let args_storers,args_loaders = - let locn = alloc_tmp tmps (mk_local arg) - [I_stloc locn], [I_ldloc locn] - args_storers :: storers, args_loaders :: loaders - | Apps_done _ -> - [],[] - - let rec compute_precall fst n rest (loaders: ILInstr list) = - if fst then - let storers,(loaders2 : ILInstr list list) = unwind rest - (List.rev (List.concat storers) : ILInstr list) , ((List.concat loaders2) : ILInstr list) - else - strip_upto n (function (x::y) -> true | _ -> false) (function (x::y) -> (x,y) | _ -> failwith "no!") loaders - - let rec build_app fst loaders apps inplab outlab = - // Strip off one valid indirect call. [fst] indicates if this is the - // first indirect call we're making. The code below makes use of the - // fact that term and type applications are never currently mixed for - // direct calls. - match strip_supported_indirect_call apps with - // Type applications: REVIEW: get rid of curried tyapps - just tuple them - | tyargs,[],_ when tyargs <> [] -> - // strip again, instantiating as we go. we could do this while we count. - let (rev_inst_tyargs, rest') = - List.fold - (fun (rev_args_sofar,cs) _ -> - let actual,rest' = dest_tyfunc_app cs - let rest'' = inst_apps_aux var_count [actual] rest' - ((actual :: rev_args_sofar),rest'')) - ([],apps) - tyargs - let inst_tyargs = List.rev rev_inst_tyargs - let precall,loaders' = compute_precall fst 0 rest' loaders - let more = (match rest' with Apps_done rty -> rty = Type_void | _ -> true) - let do_tailcall = and_tailness tl false - let instrs1 = - precall @ - [ I_callvirt (do_tailcall, - (* intern_mspec cenv.m *) (mk_instance_mspec_in_nongeneric_boxed_tref (cenv.tref_TyFunc, - "Specialize", - [], - cenv.ilg.typ_Object, - inst_tyargs)), None) ] - let instrs1 = - (* TyFunc are represented as Specialize<_> methods returning an object. - * For value types, recover result via unbox and load. - * For reference types, recover via cast. - *) - let rtn_ty = type_of_apps cenv rest' - instrs1 @ [ I_unbox_any rtn_ty] - if do_tailcall = Tailcall then nonbranching_instrs inplab instrs1 - else - let end_of_callblock = generate_code_label () - let block1 = nonbranching_instrs_then_br inplab instrs1 end_of_callblock - let block2 = build_app false loaders' rest' end_of_callblock outlab - mk_group_block ([end_of_callblock],[ block1; block2 ]) - - (* Term applications *) - | [],args,rest when args <> [] -> - let precall,loaders' = compute_precall fst (List.length args) rest loaders - let is_last = (match rest with Apps_done _ -> true | _ -> false) - let rty = (type_of_apps cenv rest) - let args' = args - let rty' = rty - let do_tailcall = and_tailness tl is_last - - let start_of_callblock = generate_code_label () - let precall_block = nonbranching_instrs_then_br inplab precall start_of_callblock - - if do_tailcall = Tailcall then - let callblock = callblock_for_multi_value_app cenv do_tailcall (args',rty') start_of_callblock outlab - mk_group_block ([start_of_callblock],[ precall_block; callblock ]) - else - let end_of_callblock = generate_code_label () - let callblock = callblock_for_multi_value_app cenv do_tailcall (args',rty') start_of_callblock end_of_callblock - let rest_block = build_app false loaders' rest end_of_callblock outlab - mk_group_block ([start_of_callblock; end_of_callblock],[ precall_block; callblock; rest_block ]) - - | [],[],Apps_done rty -> - (* "void" return values are allowed in function types *) - (* but are translated to empty value classes. These *) - (* values need to be popped. *) - nonbranching_instrs_then inplab ([]) (if tl = Tailcall then I_ret else I_br outlab) - | _ -> failwith "*** Error: internal error: unknown indirect calling convention returned by strip_supported_indirect_call" - - Choice2Of2 (build_app true [] apps inplab outlab) - | _ -> Choice1Of2 [instr] - - | _ -> Choice1Of2 [instr] - -// Fix up I_ret instruction. Generalise to selected instr. -let conv_ret_instr returnInstrs inplab outlab instr = - match instr with - | I_ret -> Choice1Of2 returnInstrs - | _ -> Choice1Of2 [instr] - -let conv_ilmbody cenv (this_genparams,this_clo,box_return_ty) il = - let tmps = new_tmps (List.length il.ilLocals) - let locals = il.ilLocals - (* Add a local to keep the result value of a thunk while storing it *) - (* into the result field and returning it. *) - (* Record the local slot number in the environment passed in this_clo *) - let this_clo, new_max = - match this_clo with - | Some clospec -> Some(List.length locals, clospec),il.ilMaxStack+2 (* for calls *) - | None -> None,il.ilMaxStack - let code' = topcode_instr2code (conv_instr cenv tmps (this_genparams,this_clo)) il.ilCode - let code' = match box_return_ty with - | None -> code' - | Some ty -> (* box before returning? e.g. in the case of a TyFunc returning a struct, which compiles to a Specialise<_> method returning an object *) - topcode_instr2code (conv_ret_instr [I_box ty;I_ret]) code' - {il with ilMaxStack=new_max; - ilZeroInit=true; - ilCode= code' ; - ilLocals = locals @ get_tmps tmps } - -let conv_mbody cenv (this_genparams,this_clo) = function - | MethodBody_il il -> MethodBody_il (conv_ilmbody cenv (this_genparams,this_clo,None) il) - | x -> x - -let conv_mdef cenv (this_genparams,this_clo) md = - let b' = conv_mbody cenv ((this_genparams @ md.mdGenericParams) ,this_clo) (dest_mbody md.mdBody) - {md with mdBody=mk_mbody b'} - -(* -------------------------------------------------------------------- - * Build an apply method of the appropriate gparams. - * -------------------------------------------------------------------- *) - -#if CLOSURES_VIA_POINTERS -let mk_callptr_mdef cenv this_clospec this_genparams this_name (pure_argtys,pure_rty) code = - mk_static_mdef - (this_genparams, - method_name_for_callclo_ptr this_name, - MemAccess_public, - (mk_named_param ("this",(Type_boxed (clospec_to_clotempl_tspec cenv this_clospec))) ::pure_argtys), - mk_return pure_rty, - conv_mbody cenv (this_genparams,Some(this_clospec)) (MethodBody_il code)) -#endif - -(* -------------------------------------------------------------------- - * Make fields for free variables of a type abstraction. - * REVIEW: change type abstractions to use other closure mechanisms. - * -------------------------------------------------------------------- *) - -let freevar_of_param p = - let nm = (match p.paramName with Some x -> x | None -> failwith "closure parameters must be given names") - mk_freevar(nm, false,p.paramType) -let local_of_param p = mk_local(p.paramType) - -let mk_genclass_clofld_specs cenv flds = - flds |> List.map (fun fv -> (fv.fvName,fv.fvType)) - -let mk_genclass_clofld_defs cenv flds = - flds - |> List.map (fun fv -> - let fdef = mk_instance_fdef (fv.fvName,fv.fvType,None,MemAccess_public) - if fv.fvCompilerGenerated then - fdef |> add_fdef_never_attrs cenv.ilg - |> add_fdef_generated_attrs cenv.ilg - else - fdef) - -(* -------------------------------------------------------------------- - * Convert a closure. Split and chop if there are too many arguments, - * otherwise build the appropriate kind of thing depending on whether - * it's a type abstraction or a term abstraction. - * -------------------------------------------------------------------- *) - -let rec conv_clodef cenv mdefGen encl td clo = - if logging then dprintn ("//--- clo2_erase.ml, type "^ td.tdName); - let new_tdefs,new_mdefs = - (* the following are shared between cases 1 && 2 *) - let now_name = td.tdName - let now_gparams = td.tdGenericParams - let now_fields = clo.cloFreeVars - let now_tref = mk_nested_tref (ScopeRef_local, encl, now_name) - let now_tspec = generalize_tref now_tref now_gparams - let now_cloref = IlxClosureRef(now_tref,clo.cloStructure,now_fields) - let now_clospec = generalize_cloref now_gparams now_cloref - let tagClo = clo.cloSource - let tagApp = (Lazy.force clo.cloCode).ilSource - - let tyargsl,tmargsl,later_struct = strip_supported_abstraction clo.cloStructure - let later_access = td.tdAccess in (* (if td.tdAccess = TypeAccess_public then TypeAccess_nested MemAccess_public else TypeAccess_nested MemAccess_assembly) in*) - - (* Adjust all the argument and environment accesses *) - let fix_code saved_args = - let nenv = List.length now_fields - let il = Lazy.force clo.cloCode - let nlocs = List.length il.ilLocals - let conv_instr_for_later instr = - let fix_arg mk_env mk_arg n = - let rec find_matchin_arg l c = - match l with - | ((m,_)::t) -> - if n = m then mk_env c - else find_matchin_arg t (c+1) - | [] -> (mk_arg (n - List.length saved_args + 1)) - (find_matchin_arg saved_args 0) - match instr with - | I_ldarg n -> - fix_arg - (fun x -> [ I_ldloc (uint16 (x+nlocs)) ]) - (fun x -> [ I_ldarg (uint16 x )]) - (int n) - | I_starg n -> - fix_arg - (fun x -> [ I_stloc (uint16 (x+nlocs)) ]) - (fun x -> [ I_starg (uint16 x) ]) - (int n) - | I_ldarga n -> - fix_arg - (fun x -> [ I_ldloca (uint16 (x+nlocs)) ]) - (fun x -> [ I_ldarga (uint16 x) ]) - (int n) - | i -> [i] - let main_code = topcode_instr2instrs conv_instr_for_later il.ilCode - let ldenv_code = List.concat (List.mapi (fun n _ -> [ (mk_IlxInstr (EI_ldenv (n + nenv))); I_stloc (uint16 (n+nlocs)) ]) saved_args) - let code = prepend_instrs_to_code ldenv_code main_code - - {il with - ilCode=code; - ilLocals=il.ilLocals @ List.map (snd >> local_of_param) saved_args; - (* maxstack may increase by 1 due to environment loads *) - ilMaxStack=il.ilMaxStack+1 } - - - match tyargsl,tmargsl,later_struct with - // CASE 1 - Type abstraction - | (_ :: _), [],_ -> - let added_genparams = tyargsl - let now_rty = (typ_of_lambdas cenv later_struct) - let purity = List.length tyargsl - - // CASE 1a. Split a type abstraction. - // Adjust all the argument and environment accesses - // Actually that special to do here in the type abstraction case - // nb. should combine the term and type abstraction cases for - // to allow for term and type variables to be mixed in a single - // application. - if (match later_struct with Lambdas_return _ -> false | _ -> true) then - - let now_struct = List.foldBack (fun x y -> Lambdas_forall(x,y)) tyargsl (Lambdas_return now_rty) - let later_name = now_name^"T" - let later_tref = mk_nested_tref (ScopeRef_local,encl,later_name) - let later_gparams = now_gparams @ added_genparams - let self_ty = (typ_of_lambdas cenv now_struct) - let later_fields = now_fields @ [mk_freevar(CompilerGeneratedName ("self"^string now_fields.Length),true,self_ty)] - let later_clospec = - let later_cloref = IlxClosureRef(later_tref,later_struct,later_fields) - generalize_cloref later_gparams later_cloref - - let laterCode = fix_code [(0, mk_named_param (CompilerGeneratedName "self", self_ty))] - let laterTypeDefs = - conv_clodef cenv mdefGen encl - {td with tdGenericParams=later_gparams; - tdAccess=later_access; - tdName=later_name} - {clo with cloStructure=later_struct; - cloFreeVars=later_fields; - cloCode=notlazy laterCode} - - let laterTypeDefs = laterTypeDefs |> List.map (add_mdef_generated_attrs_to_tdef cenv.ilg) - - // This is the code which will get called when then "now" - // arguments get applied. Convert it with the information - // that it is the code for a closure... - let nowCode = - mk_ilmbody - (false,[],List.length now_fields + 1, - nonbranching_instrs_to_code - begin - (* Load up the environment, including self... *) - List.mapi (fun n _ -> (mk_IlxInstr (EI_ldenv n))) now_fields @ - [ ldarg_0 ] @ - (* Make the instance of the delegated closure && return it. *) - (* This passes the method type params. as class type params. *) - [ (mk_IlxInstr (EI_newclo later_clospec)) ] - end, - tagApp) - - let nowTypeDefs = - conv_clodef cenv mdefGen encl - td {clo with cloStructure=now_struct; - cloCode=notlazy nowCode} - nowTypeDefs @ laterTypeDefs, [] - else - (* CASE 1b. Build a type application. *) - (* Currently the sole mbody defines a class and uses *) - (* virtual methods. *) - let box_return_ty = Some now_rty in (* box prior to all I_ret *) - let now_apply_mdef = - mk_generic_virtual_mdef - ("Specialize", - MemAccess_public, - added_genparams, (* method is generic over added ILGenericParameterDefs *) - [], - mk_return(cenv.ilg.typ_Object), - MethodBody_il (conv_ilmbody cenv (now_gparams@added_genparams,Some now_clospec,box_return_ty) - (Lazy.force clo.cloCode))) - let ctor_mdef = - mk_storage_ctor - (tagClo, - ([ ldarg_0] @ - (match !tyfunc_implementation with - | TyFuncCallVirt -> - [ mk_normal_call - ((* intern_mspec cenv.m *) (mk_ctor_mspec_for_boxed_tspec (tspec_of_typ cenv.typ_TyFunc, []))) ])), - now_tspec, - mk_genclass_clofld_specs cenv now_fields, - MemAccess_assembly) - let cloclass = - { tdName = now_name; - tdGenericParams= now_gparams; - tdAccess=td.tdAccess; - tdImplements = []; - tdAbstract = false; - tdNested = mk_tdefs []; - tdSealed = false; - tdSerializable=td.tdSerializable; - tdComInterop=false; - tdSpecialName=false; - tdLayout=TypeLayout_auto; - tdEncoding=TypeEncoding_ansi; - tdInitSemantics=TypeInit_beforefield; - tdExtends= Some (cenv.typ_TyFunc); - tdMethodDefs= mk_mdefs ([ctor_mdef] @ [now_apply_mdef]); - tdFieldDefs= mk_fdefs (mk_genclass_clofld_defs cenv now_fields); - tdCustomAttrs=mk_custom_attrs []; - tdMethodImpls=mk_mimpls []; - tdProperties=mk_properties []; - tdEvents=mk_events []; - - tdHasSecurity=false; - tdSecurityDecls=mk_security_decls []; - tdKind = TypeDef_class;} - [ cloclass], [] - - (* CASE 2 - Term Application *) - | [], (_ :: _ as now_params),_ -> - let now_rty = typ_of_lambdas cenv later_struct - let purity = List.length now_params - - (* CASE 2a - Too Many Term Arguments or Remaining Type arguments - Split the Closure Class in Two *) - if (match later_struct with Lambdas_return _ -> false | _ -> true) then - let now_struct = List.foldBack (fun l r -> Lambdas_lambda(l,r)) now_params (Lambdas_return now_rty) - let later_name = now_name^"D" - let later_tref = mk_nested_tref (ScopeRef_local,encl,later_name) - let later_gparams = now_gparams - (* Number each argument left-to-right, adding one to account for the "this" pointer*) - let self = mk_named_param (CompilerGeneratedName "self", Type_boxed (clospec_to_tspec cenv now_clospec)) - let now_params_nums = (0, self) :: List.mapi (fun i x -> i+1, x) now_params - let saved_args = now_params_nums - let later_fields = now_fields@(List.map (fun (n,p) -> freevar_of_param p) saved_args) - let later_cloref = IlxClosureRef(later_tref,later_struct,later_fields) - let later_clospec = generalize_cloref later_gparams later_cloref - (* This is the code which will first get called. *) - let nowCode = - mk_ilmbody - (false,[],List.length saved_args + List.length now_fields, - nonbranching_instrs_to_code - begin - (* Load up the environment *) - List.mapi (fun n _ -> (mk_IlxInstr (EI_ldenv n))) now_fields @ - (* Load up all the arguments (including self), which become free variables in the delegated closure *) - List.map (fun (n,ty) -> I_ldarg (uint16 n)) saved_args @ - (* Make the instance of the delegated closure && return it. *) - [ (mk_IlxInstr (EI_newclo later_clospec)) ] - end, - tagApp) - let nowTypeDefs = - conv_clodef cenv mdefGen encl - td - {clo with cloStructure=now_struct; - cloCode=notlazy nowCode} - let laterCode = fix_code saved_args - let laterTypeDefs = - conv_clodef cenv mdefGen encl - {td with tdGenericParams=later_gparams; - tdAccess=later_access; - tdName=later_name} - {clo with cloStructure=later_struct; - cloFreeVars=later_fields; - cloCode=notlazy laterCode} - // add 'compiler generated' to all the methods in the 'now' classes - let laterTypeDefs = laterTypeDefs |> List.map (add_mdef_generated_attrs_to_tdef cenv.ilg) - nowTypeDefs @ laterTypeDefs, [] - - else - (* CASE 2b - Build an Term Application Apply method *) - (* CASE 2b1 - Use ldftn. *) - (* Define a class to hold the free variables if the number *) - (* exceeds the maximum. All the variables get held in the class, which *) - (* is a little perverse... *) -#if CLOSURES_VIA_POINTERS - match !call_implementation with - | VirtEntriesPtrCode -> - let spill_classes = - match spill_cases now_fields with - | UnderOrNoSpill (_,_) -> [] - | OverSpill (a,boxed,spill_fields') -> - let spill_tref = fvbundle_tref_of_clospec now_clospec - let spill_genparams = now_gparams - let spill_tspec = generalize_tref spill_tref spill_genparams - let ctor_mdef = mk_simple_storage_ctor(tagClo, Some(cenv.ilg.tspec_Object), spill_tspec, mk_genclass_clofld_specs cenv spill_fields', MemAccess_assembly) - [ { tdName = spill_tref.Name; - tdAccess= td.tdAccess; - tdGenericParams= now_gparams; - tdAbstract = false; - tdSealed = true; - tdNested = mk_tdefs []; tdImplements = []; - tdSerializable=td.tdSerializable; - tdComInterop=false; - tdSpecialName=false; - tdLayout=TypeLayout_auto; - tdEncoding=TypeEncoding_ansi; - tdInitSemantics=TypeInit_beforefield; - tdExtends = Some(cenv.ilg.typ_Object); - tdMethodDefs = mk_mdefs [ctor_mdef]; - tdFieldDefs = mk_genclass_clofld_defs cenv spill_fields'; - tdCustomAttrs=mk_custom_attrs []; - tdMethodImpls=mk_mimpls []; - tdProperties=mk_properties []; - tdEvents=mk_events []; - tdHasSecurity=false; - tdSecurityDecls=mk_security_decls []; - tdKind = TypeDef_class; } ] - spill_classes, - [mk_callptr_mdef cenv now_clospec now_gparams now_name (now_params,now_rty) (Lazy.force clo.cloCode)] - | VirtEntriesVirtCode -> -#endif - (* CASE 2b2. Build a term application as a virtual method. *) - - let now_env_parent_class = typ_Func cenv (typs_of_params now_params) now_rty - let cloclass = - let now_apply_mdef = - mk_virtual_mdef - ("Invoke",MemAccess_public, - now_params, - mk_return now_rty, - MethodBody_il (conv_ilmbody cenv (now_gparams,Some now_clospec,None) (Lazy.force clo.cloCode))) - let ctor_mdef = - mk_storage_ctor - (tagClo, - (* how to call superclass constructor - should be added to pp_erase.ml? *) - [ ldarg_0; - mk_normal_call ((* intern_mspec cenv.m *) (mk_ctor_mspec_for_boxed_tspec (tspec_of_typ now_env_parent_class,[]))) ], - now_tspec, - mk_genclass_clofld_specs cenv now_fields, - MemAccess_assembly) - { tdName = now_name; - tdGenericParams= now_gparams; - tdAccess = td.tdAccess; - tdImplements = []; - tdAbstract = false; - tdSealed = false; - tdSerializable=td.tdSerializable; - tdComInterop=false; - tdSpecialName=false; - tdLayout=TypeLayout_auto; - tdEncoding=TypeEncoding_ansi; - tdInitSemantics=TypeInit_beforefield; - tdNested = mk_tdefs []; - tdExtends= Some now_env_parent_class; - tdMethodDefs= mk_mdefs ([ctor_mdef] @ [now_apply_mdef]); - tdFieldDefs= mk_fdefs (mk_genclass_clofld_defs cenv now_fields); - tdCustomAttrs=mk_custom_attrs []; - tdMethodImpls=mk_mimpls []; - tdProperties=mk_properties []; - tdEvents=mk_events []; - tdHasSecurity=false; - tdSecurityDecls=mk_security_decls []; - tdKind = TypeDef_class; } - [cloclass],[] - | [],[],Lambdas_return _ -> - (* No code is being declared: just bake a (mutable) environment *) - let cloCode' = - match td.tdExtends with - | None -> ilmbody_of_mdef (mk_nongeneric_nothing_ctor tagClo cenv.ilg.tref_Object []) - | Some _ -> conv_ilmbody cenv (now_gparams,Some now_clospec,None) (Lazy.force clo.cloCode) - - let ctor_mdef = - let flds = (mk_genclass_clofld_specs cenv now_fields) - mk_ctor(MemAccess_public, - List.map mk_named_param flds, - mk_impl - (cloCode'.ilZeroInit, - cloCode'.ilLocals, - cloCode'.ilMaxStack, - prepend_instrs_to_code - (List.concat (List.mapi (fun n (nm,ty) -> - [ ldarg_0; - I_ldarg (uint16 (n+1)); - mk_normal_stfld (mk_fspec_in_boxed_tspec (now_tspec,nm,ty)); - ]) flds)) - cloCode'.ilCode, - tagClo)) - - let cloclass = - { td with - tdImplements= td.tdImplements; - tdExtends= (match td.tdExtends with None -> Some cenv.ilg.typ_Object | Some x -> Some(x)); - tdName = now_name; - tdGenericParams= now_gparams; - tdMethodDefs= mk_mdefs (ctor_mdef :: List.map (conv_mdef cenv ( now_gparams,Some now_clospec)) (dest_mdefs td.tdMethodDefs)); - tdFieldDefs= mk_fdefs (mk_genclass_clofld_defs cenv now_fields @ dest_fdefs td.tdFieldDefs); - tdKind = TypeDef_class; } - [cloclass],[] - | a,b,_ -> - failwith ("Unexpected unsupported abstraction sequence, #tyabs = "^string (List.length a) ^ ", #tmabs = "^string (List.length b)) - - mdefGen := !mdefGen@new_mdefs; - new_tdefs - -(* -------------------------------------------------------------------- - * Convert a class - * -------------------------------------------------------------------- *) - -let rec conv_tdef cenv mdefGen encl td = - match td.tdKind with - | TypeDef_other e when is_ilx_ext_type_def_kind e && (match dest_ilx_ext_type_def_kind e with ETypeDef_closure _ -> true | _ -> false) -> - match dest_ilx_ext_type_def_kind e with - | ETypeDef_closure cloinfo -> conv_clodef cenv mdefGen encl td cloinfo - | ETypeDef_classunion _ -> failwith "classunions should have been erased by this time" - | _ -> - [ {td with - tdNested = conv_tdefs cenv mdefGen (encl@[td.tdName]) td.tdNested; - tdMethodDefs=mdefs_mdef2mdef (conv_mdef cenv (td.tdGenericParams,None)) td.tdMethodDefs; } ] - -and conv_tdefs cenv mdefGen encl tdefs = - tdefs_tdef2tdefs (conv_tdef cenv mdefGen encl) tdefs - -let ConvModule ilg modul = - let cenv = new_cenv(ilg) - let mdefGen = ref [] - let new_types = conv_tdefs cenv mdefGen [] modul.modulTypeDefs - let new_meths = !mdefGen -#if CLOSURES_VIA_POINTERS - let new_types = - if new_meths = [] then new_types else - let new_type_for_meths = - mk_simple_tdef - cenv.ilg - (class_name_for_apply_meths, - TypeAccess_private, - mk_mdefs new_meths, - mk_fdefs [], - mk_properties [], - mk_events [], - mk_custom_attrs []) - add_tdef new_type_for_meths new_types -#endif - {modul with modulTypeDefs=new_types} - diff --git a/tools/FSharp_1.9.6.16/source/ilx/pubclo.mli b/tools/FSharp_1.9.6.16/source/ilx/pubclo.mli deleted file mode 100644 index 306a3141..00000000 --- a/tools/FSharp_1.9.6.16/source/ilx/pubclo.mli +++ /dev/null @@ -1,22 +0,0 @@ -(* (c) Microsoft Corporation. All rights reserved *) - -/// Internal use only. Erase closures -module Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Pubclo - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX - -module Il = Microsoft.FSharp.Compiler.AbstractIL.IL -module Ilx = Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types - -open Il -open Ilx - -val ConvModule: ILGlobals -> ILModuleDef -> ILModuleDef (* string is name of module fragment if converting multiple module fragments *) - -type cenv -val typ_Func1 : cenv -> ILType -> ILType -> ILType -val typ_TyFunc : cenv -> ILGenericParameterDef -> ILType -> ILType -val new_cenv : ILGlobals -> cenv -val typ_of_lambdas: cenv -> IlxClosureLambdas -> ILType diff --git a/tools/FSharp_1.9.6.16/source/root.traversal.targets b/tools/FSharp_1.9.6.16/source/root.traversal.targets deleted file mode 100644 index 58eb1d20..00000000 --- a/tools/FSharp_1.9.6.16/source/root.traversal.targets +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/tools/FSharp_1.9.6.16/source/source-build-version b/tools/FSharp_1.9.6.16/source/source-build-version deleted file mode 100644 index cf903662..00000000 --- a/tools/FSharp_1.9.6.16/source/source-build-version +++ /dev/null @@ -1 +0,0 @@ -1.9.6.999 \ No newline at end of file